diff --git a/README.md b/README.md index fb4bed84..204b63c8 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # ThoughtSpot Documentation Site -This repository contains an Antora playbook project for building the documentation site for the ThoughtSpot at docs.thoughtspot.com and cloud-docs.thoughtspot.com. +This repository contains the Antora playbook project for building the ThoughtSpot documentation site at docs.thoughtspot.com and cloud-docs.thoughtspot.com. diff --git a/antora-playbook.yml b/antora-playbook.yml index 1fe97654..ceb6e931 100644 --- a/antora-playbook.yml +++ b/antora-playbook.yml @@ -1,7 +1,9 @@ site: - title: ThoughtSpot Software Documentation - url: https://docs-thoughtspot-com.netlify.app/software + title: ThoughtSpot Documentation + url: https://docs.thoughtspot.com start_page: home::index.adoc + keys: + google_analytics: UA-44946579-2 content: sources: # embedding empty credentials in the URL disables the Edit this Page link for any page created from this repository @@ -9,8 +11,29 @@ content: branches: HEAD start_path: home - url: git@github.com:thoughtspot/thoughtspot-docs.git - branches: ['6.0', '6.1', '6.2', '6.3'] + # Software docs branches + branches: ['6.0', '6.1', '6.2', '6.3', '7.0', '7.1', '7.2', '8.4.1.sw', '8.8.1.sw', '9.0.1.sw', '9.5.0.sw', '9.8.0.sw'] start_path: software/ + - url: git@github.com:thoughtspot/thoughtspot-docs.git + # Cloud docs branches + branches: ['10.0.0.cl', '10.1.0.cl', '10.3.0.cl', '10.4.0.cl'] + start_path: cloud/ + - url: git@github.com:thoughtspot/thoughtspot-docs.git + # Mobile docs branches + branches: [ '3.0.0.mb'] + start_path: mobile/ + - url: git@github.com:thoughtspot/thoughtspot-docs.git + # Spotter docs branch + branches: ['1.0.0.cp'] + start_path: spotter/ + - url: git@github.com:thoughtspot/visual-embed-sdk.git + # dev docs branches + branches: ['7.1.1-sw-docs', '7.2-sw-docs'] + start_path: docs/software + - url: git@github.com:thoughtspot/thoughtspot-docs.git + # Seekwell docs branches + branches: ['seekwell'] + start_path: seekwell/ urls: latest_version_segment_strategy: redirect:to latest_version_segment: latest @@ -25,15 +48,20 @@ ui: snapshot: true asciidoc: attributes: - software: true - cloud: false + #software: true + #cloud: false + page-company: ThoughtSpot tabs: tabs + support-url: https://community.thoughtspot.com/customers/s/contactsupport[ThoughtSpot Support^] + seekwell: SeekWell + latest: 10.1.0.cl + cl-subscription-agreement: https://www.thoughtspot.com/legal/thoughtspot-cloud-subscription-agreement[subscription agreement^] extensions: - - "@djencks/asciidoctor-tabset-block" + - '@asciidoctor/tabs' output: clean: true - dir: build/software + dir: build/ runtime: fetch: true log: - level: error + level: error diff --git a/build-snippets.js b/build-snippets.js index 287e13f3..b1605a5a 100644 --- a/build-snippets.js +++ b/build-snippets.js @@ -10,13 +10,13 @@ const outputFolder = 'embed-snippets' console.log(`folder: ${folder}, basePath: ${basePath}, outputPath: ${outputPath}`) -const docsBaseUrl = 'https://docs.thoughtspot.com/latest' +const docsBaseUrl = 'https://docs.thoughtspot.com/' const embedTemplate = ` - + $title @@ -187,4 +187,4 @@ const filesAndFoldersToCrawl = getFilesAndDirectories(basePath + folder + '/') // console.log('filesAndFoldersToCrawl', JSON.stringify(filesAndFoldersToCrawl)) -generateSnippets(filesAndFoldersToCrawl, '') \ No newline at end of file +generateSnippets(filesAndFoldersToCrawl, '') diff --git a/home/modules/ROOT/attachments/03-fragment-jumper.js b/home/modules/ROOT/attachments/03-fragment-jumper.js new file mode 100644 index 00000000..08a987ab --- /dev/null +++ b/home/modules/ROOT/attachments/03-fragment-jumper.js @@ -0,0 +1,75 @@ +;(function () { + 'use strict' + + const DEBUG = false + + var article = document.querySelector('article.doc') + var toolbar = document.querySelector('.helpbar') + + function decodeFragment (hash) { + return hash && (~hash.indexOf('%') ? decodeURIComponent(hash) : hash).slice(1) + } + + function computePosition (el, sum) { + if (article.contains(el)) { + return computePosition(el.offsetParent, el.offsetTop + sum) + } else { + return sum + } + } + + function jumpToAnchor (e) { + DEBUG && console.log('fragment-jumper jumpToAnchor', e) + DEBUG && console.log('fragment-jumper jumpToAnchor window.scrollY', window.scrollY) + if (e) { + window.location.fragmentJumper || (window.location.fragmentJumper = { scrollY: window.scrollY }) + window.location.hash = '#' + this.id + DEBUG && console.log('fragment-jumper jumpToAnchor after set hash window.scrollY', window.scrollY) + e.preventDefault() + onHashChange({ newURL: window.location.href }) + } + } + + function onHashChange (e) { + DEBUG && console.log('fragment-jumper onHashChange') + DEBUG && e.oldURL && console.log('fragment-jumper old hash', new URL(e.oldURL).hash) + DEBUG && console.log('fragment-jumper new hash', new URL(e.newURL).hash) + DEBUG && console.log('fragment-jumper onHashChange window.location.fragmentJumper', window.location.fragmentJumper) + let scrollY = window.location.fragmentJumper && window.location.fragmentJumper.scrollY + if (!scrollY) { + let target = window.location.fragmentJumper && window.location.fragmentJumper.target + if (!target) { + const fragment = decodeFragment(new URL(e.newURL).hash) + fragment && (target = document.getElementById(fragment)) + } + scrollY = computePosition(target, 0) - toolbar.getBoundingClientRect().bottom + DEBUG && console.log('fragment-jumper target client rectangle', target.getBoundingClientRect()) + DEBUG && console.log('fragment-jumper computed position: toolbar.bottom', toolbar.getBoundingClientRect().bottom) + } + delete window.location.fragmentJumper + DEBUG && console.log('fragment-jumper scrolling to ', scrollY) + window.scrollTo(0, scrollY) + } + + window.addEventListener('load', function jumpOnLoad (e) { + DEBUG && console.log('fragment-jumper jumpOnLoad: location: ', window.location) + var fragment, target + if ((fragment = decodeFragment(window.location.hash)) && (target = document.getElementById(fragment))) { + window.location.fragmentJumper || (window.location.fragmentJumper = { target }) + DEBUG && console.log('fragment-jumper jumpOnLoad: target: ', target) + DEBUG && console.log('fragment-jumper jumpOnLoad: fragmentJumper: ', window.location.fragmentJumper) + // jumpToAnchor.bind(target)() + //TODO does this do anything useful? + setTimeout(onHashChange, 0, { newURL: window.location.href }) + } + window.removeEventListener('load', jumpOnLoad) + }) + + Array.prototype.slice.call(document.querySelectorAll('a[href^="#"]')).forEach(function (el) { + var fragment, target + if ((fragment = decodeFragment(el.hash)) && (target = document.getElementById(fragment))) { + el.addEventListener('click', jumpToAnchor.bind(target)) + } + }) + window.addEventListener('hashchange', onHashChange, false) +})() diff --git a/home/modules/ROOT/attachments/css/style.css b/home/modules/ROOT/attachments/css/style.css new file mode 100755 index 00000000..00dd97fb --- /dev/null +++ b/home/modules/ROOT/attachments/css/style.css @@ -0,0 +1,96 @@ +/* ============================================================================= + HTML5 CSS Reset Minified - Eric Meyer + ========================================================================== */ + +html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent} +body{line-height:1} +article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block} +nav ul{list-style:none} +blockquote,q{quotes:none} +blockquote:before,blockquote:after,q:before,q:after{content:none} +a{margin:0;padding:0;font-size:100%;vertical-align:baseline;background:transparent;text-decoration:none} +mark{background-color:#ff9;color:#000;font-style:italic;font-weight:bold} +del{text-decoration:line-through} +abbr[title],dfn[title]{border-bottom:1px dotted;cursor:help} +table{border-collapse:collapse;border-spacing:0} +hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0} +input,select{vertical-align:middle} +li{list-style:none} + + +/* ============================================================================= + My CSS + ========================================================================== */ + +/* ---- base ---- */ + +html,body{ + width:100%; + height:100%; + background:#111; +} + +html{ + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + +body{ + font:normal 75% Arial, Helvetica, sans-serif; +} + +canvas{ + display:block; + vertical-align:bottom; +} + + +/* ---- stats.js ---- */ + +.count-particles{ + background: #000022; + position: absolute; + top: 48px; + left: 0; + width: 80px; + color: #13E8E9; + font-size: .8em; + text-align: left; + text-indent: 4px; + line-height: 14px; + padding-bottom: 2px; + font-family: Helvetica, Arial, sans-serif; + font-weight: bold; +} + +.js-count-particles{ + font-size: 1.1em; +} + +#stats, +.count-particles{ + -webkit-user-select: none; + margin-top: 5px; + margin-left: 5px; +} + +#stats{ + border-radius: 3px 3px 0 0; + overflow: hidden; +} + +.count-particles{ + border-radius: 0 0 3px 3px; +} + + +/* ---- particles.js container ---- */ + +#particles-js{ + width: 100%; + height: 100%; + background-color: #b61924; + background-image: url(''); + background-size: cover; + background-position: 50% 50%; + background-repeat: no-repeat; +} diff --git a/home/modules/ROOT/attachments/js/app.js b/home/modules/ROOT/attachments/js/app.js new file mode 100644 index 00000000..4b9052e4 --- /dev/null +++ b/home/modules/ROOT/attachments/js/app.js @@ -0,0 +1,133 @@ +/* ----------------------------------------------- +/* How to use? : Check the GitHub README +/* ----------------------------------------------- */ + +/* To load a config file (particles.json) you need to host this demo (MAMP/WAMP/local)... */ +/* +particlesJS.load('particles-js', 'particles.json', function() { + console.log('particles.js loaded - callback'); +}); +*/ + +/* Otherwise just put the config content (json): */ + +particlesJS('particles-js', + + { + "particles": { + "number": { + "value": 80, + "density": { + "enable": true, + "value_area": 800 + } + }, + "color": { + "value": "#ffffff" + }, + "shape": { + "type": "circle", + "stroke": { + "width": 0, + "color": "#000000" + }, + "polygon": { + "nb_sides": 5 + }, + "image": { + "src": "img/github.svg", + "width": 100, + "height": 100 + } + }, + "opacity": { + "value": 0.5, + "random": false, + "anim": { + "enable": false, + "speed": 1, + "opacity_min": 0.1, + "sync": false + } + }, + "size": { + "value": 5, + "random": true, + "anim": { + "enable": false, + "speed": 40, + "size_min": 0.1, + "sync": false + } + }, + "line_linked": { + "enable": true, + "distance": 150, + "color": "#ffffff", + "opacity": 0.4, + "width": 1 + }, + "move": { + "enable": true, + "speed": 6, + "direction": "none", + "random": false, + "straight": false, + "out_mode": "out", + "attract": { + "enable": false, + "rotateX": 600, + "rotateY": 1200 + } + } + }, + "interactivity": { + "detect_on": "canvas", + "events": { + "onhover": { + "enable": true, + "mode": "repulse" + }, + "onclick": { + "enable": true, + "mode": "push" + }, + "resize": true + }, + "modes": { + "grab": { + "distance": 400, + "line_linked": { + "opacity": 1 + } + }, + "bubble": { + "distance": 400, + "size": 40, + "duration": 2, + "opacity": 8, + "speed": 3 + }, + "repulse": { + "distance": 200 + }, + "push": { + "particles_nb": 4 + }, + "remove": { + "particles_nb": 2 + } + } + }, + "retina_detect": true, + "config_demo": { + "hide_card": false, + "background_color": "#b61924", + "background_image": "", + "background_position": "50% 50%", + "background_repeat": "no-repeat", + "background_size": "cover" + } + } + +); \ No newline at end of file diff --git a/home/modules/ROOT/attachments/js/lib/stats.js b/home/modules/ROOT/attachments/js/lib/stats.js new file mode 100644 index 00000000..90b2a274 --- /dev/null +++ b/home/modules/ROOT/attachments/js/lib/stats.js @@ -0,0 +1,149 @@ +/** + * @author mrdoob / http://mrdoob.com/ + */ + +var Stats = function () { + + var startTime = Date.now(), prevTime = startTime; + var ms = 0, msMin = Infinity, msMax = 0; + var fps = 0, fpsMin = Infinity, fpsMax = 0; + var frames = 0, mode = 0; + + var container = document.createElement( 'div' ); + container.id = 'stats'; + container.addEventListener( 'mousedown', function ( event ) { event.preventDefault(); setMode( ++ mode % 2 ) }, false ); + container.style.cssText = 'width:80px;opacity:0.9;cursor:pointer'; + + var fpsDiv = document.createElement( 'div' ); + fpsDiv.id = 'fps'; + fpsDiv.style.cssText = 'padding:0 0 3px 3px;text-align:left;background-color:#002'; + container.appendChild( fpsDiv ); + + var fpsText = document.createElement( 'div' ); + fpsText.id = 'fpsText'; + fpsText.style.cssText = 'color:#0ff;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px'; + fpsText.innerHTML = 'FPS'; + fpsDiv.appendChild( fpsText ); + + var fpsGraph = document.createElement( 'div' ); + fpsGraph.id = 'fpsGraph'; + fpsGraph.style.cssText = 'position:relative;width:74px;height:30px;background-color:#0ff'; + fpsDiv.appendChild( fpsGraph ); + + while ( fpsGraph.children.length < 74 ) { + + var bar = document.createElement( 'span' ); + bar.style.cssText = 'width:1px;height:30px;float:left;background-color:#113'; + fpsGraph.appendChild( bar ); + + } + + var msDiv = document.createElement( 'div' ); + msDiv.id = 'ms'; + msDiv.style.cssText = 'padding:0 0 3px 3px;text-align:left;background-color:#020;display:none'; + container.appendChild( msDiv ); + + var msText = document.createElement( 'div' ); + msText.id = 'msText'; + msText.style.cssText = 'color:#0f0;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px'; + msText.innerHTML = 'MS'; + msDiv.appendChild( msText ); + + var msGraph = document.createElement( 'div' ); + msGraph.id = 'msGraph'; + msGraph.style.cssText = 'position:relative;width:74px;height:30px;background-color:#0f0'; + msDiv.appendChild( msGraph ); + + while ( msGraph.children.length < 74 ) { + + var bar = document.createElement( 'span' ); + bar.style.cssText = 'width:1px;height:30px;float:left;background-color:#131'; + msGraph.appendChild( bar ); + + } + + var setMode = function ( value ) { + + mode = value; + + switch ( mode ) { + + case 0: + fpsDiv.style.display = 'block'; + msDiv.style.display = 'none'; + break; + case 1: + fpsDiv.style.display = 'none'; + msDiv.style.display = 'block'; + break; + } + + }; + + var updateGraph = function ( dom, value ) { + + var child = dom.appendChild( dom.firstChild ); + child.style.height = value + 'px'; + + }; + + return { + + REVISION: 12, + + domElement: container, + + setMode: setMode, + + begin: function () { + + startTime = Date.now(); + + }, + + end: function () { + + var time = Date.now(); + + ms = time - startTime; + msMin = Math.min( msMin, ms ); + msMax = Math.max( msMax, ms ); + + msText.textContent = ms + ' MS (' + msMin + '-' + msMax + ')'; + updateGraph( msGraph, Math.min( 30, 30 - ( ms / 200 ) * 30 ) ); + + frames ++; + + if ( time > prevTime + 1000 ) { + + fps = Math.round( ( frames * 1000 ) / ( time - prevTime ) ); + fpsMin = Math.min( fpsMin, fps ); + fpsMax = Math.max( fpsMax, fps ); + + fpsText.textContent = fps + ' FPS (' + fpsMin + '-' + fpsMax + ')'; + updateGraph( fpsGraph, Math.min( 30, 30 - ( fps / 100 ) * 30 ) ); + + prevTime = time; + frames = 0; + + } + + return time; + + }, + + update: function () { + + startTime = this.end(); + + } + + } + +}; + +if ( typeof module === 'object' ) { + + module.exports = Stats; + +} \ No newline at end of file diff --git a/home/modules/ROOT/attachments/js/particles.js b/home/modules/ROOT/attachments/js/particles.js new file mode 100644 index 00000000..325d8349 --- /dev/null +++ b/home/modules/ROOT/attachments/js/particles.js @@ -0,0 +1,1541 @@ +/* ----------------------------------------------- +/* Author : Vincent Garreau - vincentgarreau.com +/* MIT license: http://opensource.org/licenses/MIT +/* Demo / Generator : vincentgarreau.com/particles.js +/* GitHub : github.com/VincentGarreau/particles.js +/* How to use? : Check the GitHub README +/* v2.0.0 +/* ----------------------------------------------- */ + +var pJS = function(tag_id, params){ + + var canvas_el = document.querySelector('#'+tag_id+' > .particles-js-canvas-el'); + + /* particles.js variables with default values */ + this.pJS = { + canvas: { + el: canvas_el, + w: canvas_el.offsetWidth, + h: canvas_el.offsetHeight + }, + particles: { + number: { + value: 400, + density: { + enable: true, + value_area: 800 + } + }, + color: { + value: '#fff' + }, + shape: { + type: 'circle', + stroke: { + width: 0, + color: '#ff0000' + }, + polygon: { + nb_sides: 5 + }, + image: { + src: '', + width: 100, + height: 100 + } + }, + opacity: { + value: 1, + random: false, + anim: { + enable: false, + speed: 2, + opacity_min: 0, + sync: false + } + }, + size: { + value: 20, + random: false, + anim: { + enable: false, + speed: 20, + size_min: 0, + sync: false + } + }, + line_linked: { + enable: true, + distance: 100, + color: '#fff', + opacity: 1, + width: 1 + }, + move: { + enable: true, + speed: 2, + direction: 'none', + random: false, + straight: false, + out_mode: 'out', + bounce: false, + attract: { + enable: false, + rotateX: 3000, + rotateY: 3000 + } + }, + array: [] + }, + interactivity: { + detect_on: 'canvas', + events: { + onhover: { + enable: true, + mode: 'grab' + }, + onclick: { + enable: true, + mode: 'push' + }, + resize: true + }, + modes: { + grab:{ + distance: 100, + line_linked:{ + opacity: 1 + } + }, + bubble:{ + distance: 200, + size: 80, + duration: 0.4 + }, + repulse:{ + distance: 200, + duration: 0.4 + }, + push:{ + particles_nb: 4 + }, + remove:{ + particles_nb: 2 + } + }, + mouse:{} + }, + retina_detect: false, + fn: { + interact: {}, + modes: {}, + vendors:{} + }, + tmp: {} + }; + + var pJS = this.pJS; + + /* params settings */ + if(params){ + Object.deepExtend(pJS, params); + } + + pJS.tmp.obj = { + size_value: pJS.particles.size.value, + size_anim_speed: pJS.particles.size.anim.speed, + move_speed: pJS.particles.move.speed, + line_linked_distance: pJS.particles.line_linked.distance, + line_linked_width: pJS.particles.line_linked.width, + mode_grab_distance: pJS.interactivity.modes.grab.distance, + mode_bubble_distance: pJS.interactivity.modes.bubble.distance, + mode_bubble_size: pJS.interactivity.modes.bubble.size, + mode_repulse_distance: pJS.interactivity.modes.repulse.distance + }; + + + pJS.fn.retinaInit = function(){ + + if(pJS.retina_detect && window.devicePixelRatio > 1){ + pJS.canvas.pxratio = window.devicePixelRatio; + pJS.tmp.retina = true; + } + else{ + pJS.canvas.pxratio = 1; + pJS.tmp.retina = false; + } + + pJS.canvas.w = pJS.canvas.el.offsetWidth * pJS.canvas.pxratio; + pJS.canvas.h = pJS.canvas.el.offsetHeight * pJS.canvas.pxratio; + + pJS.particles.size.value = pJS.tmp.obj.size_value * pJS.canvas.pxratio; + pJS.particles.size.anim.speed = pJS.tmp.obj.size_anim_speed * pJS.canvas.pxratio; + pJS.particles.move.speed = pJS.tmp.obj.move_speed * pJS.canvas.pxratio; + pJS.particles.line_linked.distance = pJS.tmp.obj.line_linked_distance * pJS.canvas.pxratio; + pJS.interactivity.modes.grab.distance = pJS.tmp.obj.mode_grab_distance * pJS.canvas.pxratio; + pJS.interactivity.modes.bubble.distance = pJS.tmp.obj.mode_bubble_distance * pJS.canvas.pxratio; + pJS.particles.line_linked.width = pJS.tmp.obj.line_linked_width * pJS.canvas.pxratio; + pJS.interactivity.modes.bubble.size = pJS.tmp.obj.mode_bubble_size * pJS.canvas.pxratio; + pJS.interactivity.modes.repulse.distance = pJS.tmp.obj.mode_repulse_distance * pJS.canvas.pxratio; + + }; + + + + /* ---------- pJS functions - canvas ------------ */ + + pJS.fn.canvasInit = function(){ + pJS.canvas.ctx = pJS.canvas.el.getContext('2d'); + }; + + pJS.fn.canvasSize = function(){ + + pJS.canvas.el.width = pJS.canvas.w; + pJS.canvas.el.height = pJS.canvas.h; + + if(pJS && pJS.interactivity.events.resize){ + + window.addEventListener('resize', function(){ + + pJS.canvas.w = pJS.canvas.el.offsetWidth; + pJS.canvas.h = pJS.canvas.el.offsetHeight; + + /* resize canvas */ + if(pJS.tmp.retina){ + pJS.canvas.w *= pJS.canvas.pxratio; + pJS.canvas.h *= pJS.canvas.pxratio; + } + + pJS.canvas.el.width = pJS.canvas.w; + pJS.canvas.el.height = pJS.canvas.h; + + /* repaint canvas on anim disabled */ + if(!pJS.particles.move.enable){ + pJS.fn.particlesEmpty(); + pJS.fn.particlesCreate(); + pJS.fn.particlesDraw(); + pJS.fn.vendors.densityAutoParticles(); + } + + /* density particles enabled */ + pJS.fn.vendors.densityAutoParticles(); + + }); + + } + + }; + + + pJS.fn.canvasPaint = function(){ + pJS.canvas.ctx.fillRect(0, 0, pJS.canvas.w, pJS.canvas.h); + }; + + pJS.fn.canvasClear = function(){ + pJS.canvas.ctx.clearRect(0, 0, pJS.canvas.w, pJS.canvas.h); + }; + + + /* --------- pJS functions - particles ----------- */ + + pJS.fn.particle = function(color, opacity, position){ + + /* size */ + this.radius = (pJS.particles.size.random ? Math.random() : 1) * pJS.particles.size.value; + if(pJS.particles.size.anim.enable){ + this.size_status = false; + this.vs = pJS.particles.size.anim.speed / 100; + if(!pJS.particles.size.anim.sync){ + this.vs = this.vs * Math.random(); + } + } + + /* position */ + this.x = position ? position.x : Math.random() * pJS.canvas.w; + this.y = position ? position.y : Math.random() * pJS.canvas.h; + + /* check position - into the canvas */ + if(this.x > pJS.canvas.w - this.radius*2) this.x = this.x - this.radius; + else if(this.x < this.radius*2) this.x = this.x + this.radius; + if(this.y > pJS.canvas.h - this.radius*2) this.y = this.y - this.radius; + else if(this.y < this.radius*2) this.y = this.y + this.radius; + + /* check position - avoid overlap */ + if(pJS.particles.move.bounce){ + pJS.fn.vendors.checkOverlap(this, position); + } + + /* color */ + this.color = {}; + if(typeof(color.value) == 'object'){ + + if(color.value instanceof Array){ + var color_selected = color.value[Math.floor(Math.random() * pJS.particles.color.value.length)]; + this.color.rgb = hexToRgb(color_selected); + }else{ + if(color.value.r != undefined && color.value.g != undefined && color.value.b != undefined){ + this.color.rgb = { + r: color.value.r, + g: color.value.g, + b: color.value.b + } + } + if(color.value.h != undefined && color.value.s != undefined && color.value.l != undefined){ + this.color.hsl = { + h: color.value.h, + s: color.value.s, + l: color.value.l + } + } + } + + } + else if(color.value == 'random'){ + this.color.rgb = { + r: (Math.floor(Math.random() * (255 - 0 + 1)) + 0), + g: (Math.floor(Math.random() * (255 - 0 + 1)) + 0), + b: (Math.floor(Math.random() * (255 - 0 + 1)) + 0) + } + } + else if(typeof(color.value) == 'string'){ + this.color = color; + this.color.rgb = hexToRgb(this.color.value); + } + + /* opacity */ + this.opacity = (pJS.particles.opacity.random ? Math.random() : 1) * pJS.particles.opacity.value; + if(pJS.particles.opacity.anim.enable){ + this.opacity_status = false; + this.vo = pJS.particles.opacity.anim.speed / 100; + if(!pJS.particles.opacity.anim.sync){ + this.vo = this.vo * Math.random(); + } + } + + /* animation - velocity for speed */ + var velbase = {} + switch(pJS.particles.move.direction){ + case 'top': + velbase = { x:0, y:-1 }; + break; + case 'top-right': + velbase = { x:0.5, y:-0.5 }; + break; + case 'right': + velbase = { x:1, y:-0 }; + break; + case 'bottom-right': + velbase = { x:0.5, y:0.5 }; + break; + case 'bottom': + velbase = { x:0, y:1 }; + break; + case 'bottom-left': + velbase = { x:-0.5, y:1 }; + break; + case 'left': + velbase = { x:-1, y:0 }; + break; + case 'top-left': + velbase = { x:-0.5, y:-0.5 }; + break; + default: + velbase = { x:0, y:0 }; + break; + } + + if(pJS.particles.move.straight){ + this.vx = velbase.x; + this.vy = velbase.y; + if(pJS.particles.move.random){ + this.vx = this.vx * (Math.random()); + this.vy = this.vy * (Math.random()); + } + }else{ + this.vx = velbase.x + Math.random()-0.5; + this.vy = velbase.y + Math.random()-0.5; + } + + // var theta = 2.0 * Math.PI * Math.random(); + // this.vx = Math.cos(theta); + // this.vy = Math.sin(theta); + + this.vx_i = this.vx; + this.vy_i = this.vy; + + + + /* if shape is image */ + + var shape_type = pJS.particles.shape.type; + if(typeof(shape_type) == 'object'){ + if(shape_type instanceof Array){ + var shape_selected = shape_type[Math.floor(Math.random() * shape_type.length)]; + this.shape = shape_selected; + } + }else{ + this.shape = shape_type; + } + + if(this.shape == 'image'){ + var sh = pJS.particles.shape; + this.img = { + src: sh.image.src, + ratio: sh.image.width / sh.image.height + } + if(!this.img.ratio) this.img.ratio = 1; + if(pJS.tmp.img_type == 'svg' && pJS.tmp.source_svg != undefined){ + pJS.fn.vendors.createSvgImg(this); + if(pJS.tmp.pushing){ + this.img.loaded = false; + } + } + } + + + + }; + + + pJS.fn.particle.prototype.draw = function() { + + var p = this; + + if(p.radius_bubble != undefined){ + var radius = p.radius_bubble; + }else{ + var radius = p.radius; + } + + if(p.opacity_bubble != undefined){ + var opacity = p.opacity_bubble; + }else{ + var opacity = p.opacity; + } + + if(p.color.rgb){ + var color_value = 'rgba('+p.color.rgb.r+','+p.color.rgb.g+','+p.color.rgb.b+','+opacity+')'; + }else{ + var color_value = 'hsla('+p.color.hsl.h+','+p.color.hsl.s+'%,'+p.color.hsl.l+'%,'+opacity+')'; + } + + pJS.canvas.ctx.fillStyle = color_value; + pJS.canvas.ctx.beginPath(); + + switch(p.shape){ + + case 'circle': + pJS.canvas.ctx.arc(p.x, p.y, radius, 0, Math.PI * 2, false); + break; + + case 'edge': + pJS.canvas.ctx.rect(p.x-radius, p.y-radius, radius*2, radius*2); + break; + + case 'triangle': + pJS.fn.vendors.drawShape(pJS.canvas.ctx, p.x-radius, p.y+radius / 1.66, radius*2, 3, 2); + break; + + case 'polygon': + pJS.fn.vendors.drawShape( + pJS.canvas.ctx, + p.x - radius / (pJS.particles.shape.polygon.nb_sides/3.5), // startX + p.y - radius / (2.66/3.5), // startY + radius*2.66 / (pJS.particles.shape.polygon.nb_sides/3), // sideLength + pJS.particles.shape.polygon.nb_sides, // sideCountNumerator + 1 // sideCountDenominator + ); + break; + + case 'star': + pJS.fn.vendors.drawShape( + pJS.canvas.ctx, + p.x - radius*2 / (pJS.particles.shape.polygon.nb_sides/4), // startX + p.y - radius / (2*2.66/3.5), // startY + radius*2*2.66 / (pJS.particles.shape.polygon.nb_sides/3), // sideLength + pJS.particles.shape.polygon.nb_sides, // sideCountNumerator + 2 // sideCountDenominator + ); + break; + + case 'image': + + function draw(){ + pJS.canvas.ctx.drawImage( + img_obj, + p.x-radius, + p.y-radius, + radius*2, + radius*2 / p.img.ratio + ); + } + + if(pJS.tmp.img_type == 'svg'){ + var img_obj = p.img.obj; + }else{ + var img_obj = pJS.tmp.img_obj; + } + + if(img_obj){ + draw(); + } + + break; + + } + + pJS.canvas.ctx.closePath(); + + if(pJS.particles.shape.stroke.width > 0){ + pJS.canvas.ctx.strokeStyle = pJS.particles.shape.stroke.color; + pJS.canvas.ctx.lineWidth = pJS.particles.shape.stroke.width; + pJS.canvas.ctx.stroke(); + } + + pJS.canvas.ctx.fill(); + + }; + + + pJS.fn.particlesCreate = function(){ + for(var i = 0; i < pJS.particles.number.value; i++) { + pJS.particles.array.push(new pJS.fn.particle(pJS.particles.color, pJS.particles.opacity.value)); + } + }; + + pJS.fn.particlesUpdate = function(){ + + for(var i = 0; i < pJS.particles.array.length; i++){ + + /* the particle */ + var p = pJS.particles.array[i]; + + // var d = ( dx = pJS.interactivity.mouse.click_pos_x - p.x ) * dx + ( dy = pJS.interactivity.mouse.click_pos_y - p.y ) * dy; + // var f = -BANG_SIZE / d; + // if ( d < BANG_SIZE ) { + // var t = Math.atan2( dy, dx ); + // p.vx = f * Math.cos(t); + // p.vy = f * Math.sin(t); + // } + + /* move the particle */ + if(pJS.particles.move.enable){ + var ms = pJS.particles.move.speed/2; + p.x += p.vx * ms; + p.y += p.vy * ms; + } + + /* change opacity status */ + if(pJS.particles.opacity.anim.enable) { + if(p.opacity_status == true) { + if(p.opacity >= pJS.particles.opacity.value) p.opacity_status = false; + p.opacity += p.vo; + }else { + if(p.opacity <= pJS.particles.opacity.anim.opacity_min) p.opacity_status = true; + p.opacity -= p.vo; + } + if(p.opacity < 0) p.opacity = 0; + } + + /* change size */ + if(pJS.particles.size.anim.enable){ + if(p.size_status == true){ + if(p.radius >= pJS.particles.size.value) p.size_status = false; + p.radius += p.vs; + }else{ + if(p.radius <= pJS.particles.size.anim.size_min) p.size_status = true; + p.radius -= p.vs; + } + if(p.radius < 0) p.radius = 0; + } + + /* change particle position if it is out of canvas */ + if(pJS.particles.move.out_mode == 'bounce'){ + var new_pos = { + x_left: p.radius, + x_right: pJS.canvas.w, + y_top: p.radius, + y_bottom: pJS.canvas.h + } + }else{ + var new_pos = { + x_left: -p.radius, + x_right: pJS.canvas.w + p.radius, + y_top: -p.radius, + y_bottom: pJS.canvas.h + p.radius + } + } + + if(p.x - p.radius > pJS.canvas.w){ + p.x = new_pos.x_left; + p.y = Math.random() * pJS.canvas.h; + } + else if(p.x + p.radius < 0){ + p.x = new_pos.x_right; + p.y = Math.random() * pJS.canvas.h; + } + if(p.y - p.radius > pJS.canvas.h){ + p.y = new_pos.y_top; + p.x = Math.random() * pJS.canvas.w; + } + else if(p.y + p.radius < 0){ + p.y = new_pos.y_bottom; + p.x = Math.random() * pJS.canvas.w; + } + + /* out of canvas modes */ + switch(pJS.particles.move.out_mode){ + case 'bounce': + if (p.x + p.radius > pJS.canvas.w) p.vx = -p.vx; + else if (p.x - p.radius < 0) p.vx = -p.vx; + if (p.y + p.radius > pJS.canvas.h) p.vy = -p.vy; + else if (p.y - p.radius < 0) p.vy = -p.vy; + break; + } + + /* events */ + if(isInArray('grab', pJS.interactivity.events.onhover.mode)){ + pJS.fn.modes.grabParticle(p); + } + + if(isInArray('bubble', pJS.interactivity.events.onhover.mode) || isInArray('bubble', pJS.interactivity.events.onclick.mode)){ + pJS.fn.modes.bubbleParticle(p); + } + + if(isInArray('repulse', pJS.interactivity.events.onhover.mode) || isInArray('repulse', pJS.interactivity.events.onclick.mode)){ + pJS.fn.modes.repulseParticle(p); + } + + /* interaction auto between particles */ + if(pJS.particles.line_linked.enable || pJS.particles.move.attract.enable){ + for(var j = i + 1; j < pJS.particles.array.length; j++){ + var p2 = pJS.particles.array[j]; + + /* link particles */ + if(pJS.particles.line_linked.enable){ + pJS.fn.interact.linkParticles(p,p2); + } + + /* attract particles */ + if(pJS.particles.move.attract.enable){ + pJS.fn.interact.attractParticles(p,p2); + } + + /* bounce particles */ + if(pJS.particles.move.bounce){ + pJS.fn.interact.bounceParticles(p,p2); + } + + } + } + + + } + + }; + + pJS.fn.particlesDraw = function(){ + + /* clear canvas */ + pJS.canvas.ctx.clearRect(0, 0, pJS.canvas.w, pJS.canvas.h); + + /* update each particles param */ + pJS.fn.particlesUpdate(); + + /* draw each particle */ + for(var i = 0; i < pJS.particles.array.length; i++){ + var p = pJS.particles.array[i]; + p.draw(); + } + + }; + + pJS.fn.particlesEmpty = function(){ + pJS.particles.array = []; + }; + + pJS.fn.particlesRefresh = function(){ + + /* init all */ + cancelRequestAnimFrame(pJS.fn.checkAnimFrame); + cancelRequestAnimFrame(pJS.fn.drawAnimFrame); + pJS.tmp.source_svg = undefined; + pJS.tmp.img_obj = undefined; + pJS.tmp.count_svg = 0; + pJS.fn.particlesEmpty(); + pJS.fn.canvasClear(); + + /* restart */ + pJS.fn.vendors.start(); + + }; + + + /* ---------- pJS functions - particles interaction ------------ */ + + pJS.fn.interact.linkParticles = function(p1, p2){ + + var dx = p1.x - p2.x, + dy = p1.y - p2.y, + dist = Math.sqrt(dx*dx + dy*dy); + + /* draw a line between p1 and p2 if the distance between them is under the config distance */ + if(dist <= pJS.particles.line_linked.distance){ + + var opacity_line = pJS.particles.line_linked.opacity - (dist / (1/pJS.particles.line_linked.opacity)) / pJS.particles.line_linked.distance; + + if(opacity_line > 0){ + + /* style */ + var color_line = pJS.particles.line_linked.color_rgb_line; + pJS.canvas.ctx.strokeStyle = 'rgba('+color_line.r+','+color_line.g+','+color_line.b+','+opacity_line+')'; + pJS.canvas.ctx.lineWidth = pJS.particles.line_linked.width; + //pJS.canvas.ctx.lineCap = 'round'; /* performance issue */ + + /* path */ + pJS.canvas.ctx.beginPath(); + pJS.canvas.ctx.moveTo(p1.x, p1.y); + pJS.canvas.ctx.lineTo(p2.x, p2.y); + pJS.canvas.ctx.stroke(); + pJS.canvas.ctx.closePath(); + + } + + } + + }; + + + pJS.fn.interact.attractParticles = function(p1, p2){ + + /* condensed particles */ + var dx = p1.x - p2.x, + dy = p1.y - p2.y, + dist = Math.sqrt(dx*dx + dy*dy); + + if(dist <= pJS.particles.line_linked.distance){ + + var ax = dx/(pJS.particles.move.attract.rotateX*1000), + ay = dy/(pJS.particles.move.attract.rotateY*1000); + + p1.vx -= ax; + p1.vy -= ay; + + p2.vx += ax; + p2.vy += ay; + + } + + + } + + + pJS.fn.interact.bounceParticles = function(p1, p2){ + + var dx = p1.x - p2.x, + dy = p1.y - p2.y, + dist = Math.sqrt(dx*dx + dy*dy), + dist_p = p1.radius+p2.radius; + + if(dist <= dist_p){ + p1.vx = -p1.vx; + p1.vy = -p1.vy; + + p2.vx = -p2.vx; + p2.vy = -p2.vy; + } + + } + + + /* ---------- pJS functions - modes events ------------ */ + + pJS.fn.modes.pushParticles = function(nb, pos){ + + pJS.tmp.pushing = true; + + for(var i = 0; i < nb; i++){ + pJS.particles.array.push( + new pJS.fn.particle( + pJS.particles.color, + pJS.particles.opacity.value, + { + 'x': pos ? pos.pos_x : Math.random() * pJS.canvas.w, + 'y': pos ? pos.pos_y : Math.random() * pJS.canvas.h + } + ) + ) + if(i == nb-1){ + if(!pJS.particles.move.enable){ + pJS.fn.particlesDraw(); + } + pJS.tmp.pushing = false; + } + } + + }; + + + pJS.fn.modes.removeParticles = function(nb){ + + pJS.particles.array.splice(0, nb); + if(!pJS.particles.move.enable){ + pJS.fn.particlesDraw(); + } + + }; + + + pJS.fn.modes.bubbleParticle = function(p){ + + /* on hover event */ + if(pJS.interactivity.events.onhover.enable && isInArray('bubble', pJS.interactivity.events.onhover.mode)){ + + var dx_mouse = p.x - pJS.interactivity.mouse.pos_x, + dy_mouse = p.y - pJS.interactivity.mouse.pos_y, + dist_mouse = Math.sqrt(dx_mouse*dx_mouse + dy_mouse*dy_mouse), + ratio = 1 - dist_mouse / pJS.interactivity.modes.bubble.distance; + + function init(){ + p.opacity_bubble = p.opacity; + p.radius_bubble = p.radius; + } + + /* mousemove - check ratio */ + if(dist_mouse <= pJS.interactivity.modes.bubble.distance){ + + if(ratio >= 0 && pJS.interactivity.status == 'mousemove'){ + + /* size */ + if(pJS.interactivity.modes.bubble.size != pJS.particles.size.value){ + + if(pJS.interactivity.modes.bubble.size > pJS.particles.size.value){ + var size = p.radius + (pJS.interactivity.modes.bubble.size*ratio); + if(size >= 0){ + p.radius_bubble = size; + } + }else{ + var dif = p.radius - pJS.interactivity.modes.bubble.size, + size = p.radius - (dif*ratio); + if(size > 0){ + p.radius_bubble = size; + }else{ + p.radius_bubble = 0; + } + } + + } + + /* opacity */ + if(pJS.interactivity.modes.bubble.opacity != pJS.particles.opacity.value){ + + if(pJS.interactivity.modes.bubble.opacity > pJS.particles.opacity.value){ + var opacity = pJS.interactivity.modes.bubble.opacity*ratio; + if(opacity > p.opacity && opacity <= pJS.interactivity.modes.bubble.opacity){ + p.opacity_bubble = opacity; + } + }else{ + var opacity = p.opacity - (pJS.particles.opacity.value-pJS.interactivity.modes.bubble.opacity)*ratio; + if(opacity < p.opacity && opacity >= pJS.interactivity.modes.bubble.opacity){ + p.opacity_bubble = opacity; + } + } + + } + + } + + }else{ + init(); + } + + + /* mouseleave */ + if(pJS.interactivity.status == 'mouseleave'){ + init(); + } + + } + + /* on click event */ + else if(pJS.interactivity.events.onclick.enable && isInArray('bubble', pJS.interactivity.events.onclick.mode)){ + + + if(pJS.tmp.bubble_clicking){ + var dx_mouse = p.x - pJS.interactivity.mouse.click_pos_x, + dy_mouse = p.y - pJS.interactivity.mouse.click_pos_y, + dist_mouse = Math.sqrt(dx_mouse*dx_mouse + dy_mouse*dy_mouse), + time_spent = (new Date().getTime() - pJS.interactivity.mouse.click_time)/1000; + + if(time_spent > pJS.interactivity.modes.bubble.duration){ + pJS.tmp.bubble_duration_end = true; + } + + if(time_spent > pJS.interactivity.modes.bubble.duration*2){ + pJS.tmp.bubble_clicking = false; + pJS.tmp.bubble_duration_end = false; + } + } + + + function process(bubble_param, particles_param, p_obj_bubble, p_obj, id){ + + if(bubble_param != particles_param){ + + if(!pJS.tmp.bubble_duration_end){ + if(dist_mouse <= pJS.interactivity.modes.bubble.distance){ + if(p_obj_bubble != undefined) var obj = p_obj_bubble; + else var obj = p_obj; + if(obj != bubble_param){ + var value = p_obj - (time_spent * (p_obj - bubble_param) / pJS.interactivity.modes.bubble.duration); + if(id == 'size') p.radius_bubble = value; + if(id == 'opacity') p.opacity_bubble = value; + } + }else{ + if(id == 'size') p.radius_bubble = undefined; + if(id == 'opacity') p.opacity_bubble = undefined; + } + }else{ + if(p_obj_bubble != undefined){ + var value_tmp = p_obj - (time_spent * (p_obj - bubble_param) / pJS.interactivity.modes.bubble.duration), + dif = bubble_param - value_tmp; + value = bubble_param + dif; + if(id == 'size') p.radius_bubble = value; + if(id == 'opacity') p.opacity_bubble = value; + } + } + + } + + } + + if(pJS.tmp.bubble_clicking){ + /* size */ + process(pJS.interactivity.modes.bubble.size, pJS.particles.size.value, p.radius_bubble, p.radius, 'size'); + /* opacity */ + process(pJS.interactivity.modes.bubble.opacity, pJS.particles.opacity.value, p.opacity_bubble, p.opacity, 'opacity'); + } + + } + + }; + + + pJS.fn.modes.repulseParticle = function(p){ + + if(pJS.interactivity.events.onhover.enable && isInArray('repulse', pJS.interactivity.events.onhover.mode) && pJS.interactivity.status == 'mousemove') { + + var dx_mouse = p.x - pJS.interactivity.mouse.pos_x, + dy_mouse = p.y - pJS.interactivity.mouse.pos_y, + dist_mouse = Math.sqrt(dx_mouse*dx_mouse + dy_mouse*dy_mouse); + + var normVec = {x: dx_mouse/dist_mouse, y: dy_mouse/dist_mouse}, + repulseRadius = pJS.interactivity.modes.repulse.distance, + velocity = 100, + repulseFactor = clamp((1/repulseRadius)*(-1*Math.pow(dist_mouse/repulseRadius,2)+1)*repulseRadius*velocity, 0, 50); + + var pos = { + x: p.x + normVec.x * repulseFactor, + y: p.y + normVec.y * repulseFactor + } + + if(pJS.particles.move.out_mode == 'bounce'){ + if(pos.x - p.radius > 0 && pos.x + p.radius < pJS.canvas.w) p.x = pos.x; + if(pos.y - p.radius > 0 && pos.y + p.radius < pJS.canvas.h) p.y = pos.y; + }else{ + p.x = pos.x; + p.y = pos.y; + } + + } + + + else if(pJS.interactivity.events.onclick.enable && isInArray('repulse', pJS.interactivity.events.onclick.mode)) { + + if(!pJS.tmp.repulse_finish){ + pJS.tmp.repulse_count++; + if(pJS.tmp.repulse_count == pJS.particles.array.length){ + pJS.tmp.repulse_finish = true; + } + } + + if(pJS.tmp.repulse_clicking){ + + var repulseRadius = Math.pow(pJS.interactivity.modes.repulse.distance/6, 3); + + var dx = pJS.interactivity.mouse.click_pos_x - p.x, + dy = pJS.interactivity.mouse.click_pos_y - p.y, + d = dx*dx + dy*dy; + + var force = -repulseRadius / d * 1; + + function process(){ + + var f = Math.atan2(dy,dx); + p.vx = force * Math.cos(f); + p.vy = force * Math.sin(f); + + if(pJS.particles.move.out_mode == 'bounce'){ + var pos = { + x: p.x + p.vx, + y: p.y + p.vy + } + if (pos.x + p.radius > pJS.canvas.w) p.vx = -p.vx; + else if (pos.x - p.radius < 0) p.vx = -p.vx; + if (pos.y + p.radius > pJS.canvas.h) p.vy = -p.vy; + else if (pos.y - p.radius < 0) p.vy = -p.vy; + } + + } + + // default + if(d <= repulseRadius){ + process(); + } + + // bang - slow motion mode + // if(!pJS.tmp.repulse_finish){ + // if(d <= repulseRadius){ + // process(); + // } + // }else{ + // process(); + // } + + + }else{ + + if(pJS.tmp.repulse_clicking == false){ + + p.vx = p.vx_i; + p.vy = p.vy_i; + + } + + } + + } + + } + + + pJS.fn.modes.grabParticle = function(p){ + + if(pJS.interactivity.events.onhover.enable && pJS.interactivity.status == 'mousemove'){ + + var dx_mouse = p.x - pJS.interactivity.mouse.pos_x, + dy_mouse = p.y - pJS.interactivity.mouse.pos_y, + dist_mouse = Math.sqrt(dx_mouse*dx_mouse + dy_mouse*dy_mouse); + + /* draw a line between the cursor and the particle if the distance between them is under the config distance */ + if(dist_mouse <= pJS.interactivity.modes.grab.distance){ + + var opacity_line = pJS.interactivity.modes.grab.line_linked.opacity - (dist_mouse / (1/pJS.interactivity.modes.grab.line_linked.opacity)) / pJS.interactivity.modes.grab.distance; + + if(opacity_line > 0){ + + /* style */ + var color_line = pJS.particles.line_linked.color_rgb_line; + pJS.canvas.ctx.strokeStyle = 'rgba('+color_line.r+','+color_line.g+','+color_line.b+','+opacity_line+')'; + pJS.canvas.ctx.lineWidth = pJS.particles.line_linked.width; + //pJS.canvas.ctx.lineCap = 'round'; /* performance issue */ + + /* path */ + pJS.canvas.ctx.beginPath(); + pJS.canvas.ctx.moveTo(p.x, p.y); + pJS.canvas.ctx.lineTo(pJS.interactivity.mouse.pos_x, pJS.interactivity.mouse.pos_y); + pJS.canvas.ctx.stroke(); + pJS.canvas.ctx.closePath(); + + } + + } + + } + + }; + + + + /* ---------- pJS functions - vendors ------------ */ + + pJS.fn.vendors.eventsListeners = function(){ + + /* events target element */ + if(pJS.interactivity.detect_on == 'window'){ + pJS.interactivity.el = window; + }else{ + pJS.interactivity.el = pJS.canvas.el; + } + + + /* detect mouse pos - on hover / click event */ + if(pJS.interactivity.events.onhover.enable || pJS.interactivity.events.onclick.enable){ + + /* el on mousemove */ + pJS.interactivity.el.addEventListener('mousemove', function(e){ + + if(pJS.interactivity.el == window){ + var pos_x = e.clientX, + pos_y = e.clientY; + } + else{ + var pos_x = e.offsetX || e.clientX, + pos_y = e.offsetY || e.clientY; + } + + pJS.interactivity.mouse.pos_x = pos_x; + pJS.interactivity.mouse.pos_y = pos_y; + + if(pJS.tmp.retina){ + pJS.interactivity.mouse.pos_x *= pJS.canvas.pxratio; + pJS.interactivity.mouse.pos_y *= pJS.canvas.pxratio; + } + + pJS.interactivity.status = 'mousemove'; + + }); + + /* el on onmouseleave */ + pJS.interactivity.el.addEventListener('mouseleave', function(e){ + + pJS.interactivity.mouse.pos_x = null; + pJS.interactivity.mouse.pos_y = null; + pJS.interactivity.status = 'mouseleave'; + + }); + + } + + /* on click event */ + if(pJS.interactivity.events.onclick.enable){ + + pJS.interactivity.el.addEventListener('click', function(){ + + pJS.interactivity.mouse.click_pos_x = pJS.interactivity.mouse.pos_x; + pJS.interactivity.mouse.click_pos_y = pJS.interactivity.mouse.pos_y; + pJS.interactivity.mouse.click_time = new Date().getTime(); + + if(pJS.interactivity.events.onclick.enable){ + + switch(pJS.interactivity.events.onclick.mode){ + + case 'push': + if(pJS.particles.move.enable){ + pJS.fn.modes.pushParticles(pJS.interactivity.modes.push.particles_nb, pJS.interactivity.mouse); + }else{ + if(pJS.interactivity.modes.push.particles_nb == 1){ + pJS.fn.modes.pushParticles(pJS.interactivity.modes.push.particles_nb, pJS.interactivity.mouse); + } + else if(pJS.interactivity.modes.push.particles_nb > 1){ + pJS.fn.modes.pushParticles(pJS.interactivity.modes.push.particles_nb); + } + } + break; + + case 'remove': + pJS.fn.modes.removeParticles(pJS.interactivity.modes.remove.particles_nb); + break; + + case 'bubble': + pJS.tmp.bubble_clicking = true; + break; + + case 'repulse': + pJS.tmp.repulse_clicking = true; + pJS.tmp.repulse_count = 0; + pJS.tmp.repulse_finish = false; + setTimeout(function(){ + pJS.tmp.repulse_clicking = false; + }, pJS.interactivity.modes.repulse.duration*1000) + break; + + } + + } + + }); + + } + + + }; + + pJS.fn.vendors.densityAutoParticles = function(){ + + if(pJS.particles.number.density.enable){ + + /* calc area */ + var area = pJS.canvas.el.width * pJS.canvas.el.height / 1000; + if(pJS.tmp.retina){ + area = area/(pJS.canvas.pxratio*2); + } + + /* calc number of particles based on density area */ + var nb_particles = area * pJS.particles.number.value / pJS.particles.number.density.value_area; + + /* add or remove X particles */ + var missing_particles = pJS.particles.array.length - nb_particles; + if(missing_particles < 0) pJS.fn.modes.pushParticles(Math.abs(missing_particles)); + else pJS.fn.modes.removeParticles(missing_particles); + + } + + }; + + + pJS.fn.vendors.checkOverlap = function(p1, position){ + for(var i = 0; i < pJS.particles.array.length; i++){ + var p2 = pJS.particles.array[i]; + + var dx = p1.x - p2.x, + dy = p1.y - p2.y, + dist = Math.sqrt(dx*dx + dy*dy); + + if(dist <= p1.radius + p2.radius){ + p1.x = position ? position.x : Math.random() * pJS.canvas.w; + p1.y = position ? position.y : Math.random() * pJS.canvas.h; + pJS.fn.vendors.checkOverlap(p1); + } + } + }; + + + pJS.fn.vendors.createSvgImg = function(p){ + + /* set color to svg element */ + var svgXml = pJS.tmp.source_svg, + rgbHex = /#([0-9A-F]{3,6})/gi, + coloredSvgXml = svgXml.replace(rgbHex, function (m, r, g, b) { + if(p.color.rgb){ + var color_value = 'rgba('+p.color.rgb.r+','+p.color.rgb.g+','+p.color.rgb.b+','+p.opacity+')'; + }else{ + var color_value = 'hsla('+p.color.hsl.h+','+p.color.hsl.s+'%,'+p.color.hsl.l+'%,'+p.opacity+')'; + } + return color_value; + }); + + /* prepare to create img with colored svg */ + var svg = new Blob([coloredSvgXml], {type: 'image/svg+xml;charset=utf-8'}), + DOMURL = window.URL || window.webkitURL || window, + url = DOMURL.createObjectURL(svg); + + /* create particle img obj */ + var img = new Image(); + img.addEventListener('load', function(){ + p.img.obj = img; + p.img.loaded = true; + DOMURL.revokeObjectURL(url); + pJS.tmp.count_svg++; + }); + img.src = url; + + }; + + + pJS.fn.vendors.destroypJS = function(){ + cancelAnimationFrame(pJS.fn.drawAnimFrame); + canvas_el.remove(); + pJSDom = null; + }; + + + pJS.fn.vendors.drawShape = function(c, startX, startY, sideLength, sideCountNumerator, sideCountDenominator){ + + // By Programming Thomas - https://programmingthomas.wordpress.com/2013/04/03/n-sided-shapes/ + var sideCount = sideCountNumerator * sideCountDenominator; + var decimalSides = sideCountNumerator / sideCountDenominator; + var interiorAngleDegrees = (180 * (decimalSides - 2)) / decimalSides; + var interiorAngle = Math.PI - Math.PI * interiorAngleDegrees / 180; // convert to radians + c.save(); + c.beginPath(); + c.translate(startX, startY); + c.moveTo(0,0); + for (var i = 0; i < sideCount; i++) { + c.lineTo(sideLength,0); + c.translate(sideLength,0); + c.rotate(interiorAngle); + } + //c.stroke(); + c.fill(); + c.restore(); + + }; + + pJS.fn.vendors.exportImg = function(){ + window.open(pJS.canvas.el.toDataURL('image/png'), '_blank'); + }; + + + pJS.fn.vendors.loadImg = function(type){ + + pJS.tmp.img_error = undefined; + + if(pJS.particles.shape.image.src != ''){ + + if(type == 'svg'){ + + var xhr = new XMLHttpRequest(); + xhr.open('GET', pJS.particles.shape.image.src); + xhr.onreadystatechange = function (data) { + if(xhr.readyState == 4){ + if(xhr.status == 200){ + pJS.tmp.source_svg = data.currentTarget.response; + pJS.fn.vendors.checkBeforeDraw(); + }else{ + console.log('Error pJS - Image not found'); + pJS.tmp.img_error = true; + } + } + } + xhr.send(); + + }else{ + + var img = new Image(); + img.addEventListener('load', function(){ + pJS.tmp.img_obj = img; + pJS.fn.vendors.checkBeforeDraw(); + }); + img.src = pJS.particles.shape.image.src; + + } + + }else{ + console.log('Error pJS - No image.src'); + pJS.tmp.img_error = true; + } + + }; + + + pJS.fn.vendors.draw = function(){ + + if(pJS.particles.shape.type == 'image'){ + + if(pJS.tmp.img_type == 'svg'){ + + if(pJS.tmp.count_svg >= pJS.particles.number.value){ + pJS.fn.particlesDraw(); + if(!pJS.particles.move.enable) cancelRequestAnimFrame(pJS.fn.drawAnimFrame); + else pJS.fn.drawAnimFrame = requestAnimFrame(pJS.fn.vendors.draw); + }else{ + //console.log('still loading...'); + if(!pJS.tmp.img_error) pJS.fn.drawAnimFrame = requestAnimFrame(pJS.fn.vendors.draw); + } + + }else{ + + if(pJS.tmp.img_obj != undefined){ + pJS.fn.particlesDraw(); + if(!pJS.particles.move.enable) cancelRequestAnimFrame(pJS.fn.drawAnimFrame); + else pJS.fn.drawAnimFrame = requestAnimFrame(pJS.fn.vendors.draw); + }else{ + if(!pJS.tmp.img_error) pJS.fn.drawAnimFrame = requestAnimFrame(pJS.fn.vendors.draw); + } + + } + + }else{ + pJS.fn.particlesDraw(); + if(!pJS.particles.move.enable) cancelRequestAnimFrame(pJS.fn.drawAnimFrame); + else pJS.fn.drawAnimFrame = requestAnimFrame(pJS.fn.vendors.draw); + } + + }; + + + pJS.fn.vendors.checkBeforeDraw = function(){ + + // if shape is image + if(pJS.particles.shape.type == 'image'){ + + if(pJS.tmp.img_type == 'svg' && pJS.tmp.source_svg == undefined){ + pJS.tmp.checkAnimFrame = requestAnimFrame(check); + }else{ + //console.log('images loaded! cancel check'); + cancelRequestAnimFrame(pJS.tmp.checkAnimFrame); + if(!pJS.tmp.img_error){ + pJS.fn.vendors.init(); + pJS.fn.vendors.draw(); + } + + } + + }else{ + pJS.fn.vendors.init(); + pJS.fn.vendors.draw(); + } + + }; + + + pJS.fn.vendors.init = function(){ + + /* init canvas + particles */ + pJS.fn.retinaInit(); + pJS.fn.canvasInit(); + pJS.fn.canvasSize(); + pJS.fn.canvasPaint(); + pJS.fn.particlesCreate(); + pJS.fn.vendors.densityAutoParticles(); + + /* particles.line_linked - convert hex colors to rgb */ + pJS.particles.line_linked.color_rgb_line = hexToRgb(pJS.particles.line_linked.color); + + }; + + + pJS.fn.vendors.start = function(){ + + if(isInArray('image', pJS.particles.shape.type)){ + pJS.tmp.img_type = pJS.particles.shape.image.src.substr(pJS.particles.shape.image.src.length - 3); + pJS.fn.vendors.loadImg(pJS.tmp.img_type); + }else{ + pJS.fn.vendors.checkBeforeDraw(); + } + + }; + + + + + /* ---------- pJS - start ------------ */ + + + pJS.fn.vendors.eventsListeners(); + + pJS.fn.vendors.start(); + + + +}; + +/* ---------- global functions - vendors ------------ */ + +Object.deepExtend = function(destination, source) { + for (var property in source) { + if (source[property] && source[property].constructor && + source[property].constructor === Object) { + destination[property] = destination[property] || {}; + arguments.callee(destination[property], source[property]); + } else { + destination[property] = source[property]; + } + } + return destination; +}; + +window.requestAnimFrame = (function(){ + return window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + function(callback){ + window.setTimeout(callback, 1000 / 60); + }; +})(); + +window.cancelRequestAnimFrame = ( function() { + return window.cancelAnimationFrame || + window.webkitCancelRequestAnimationFrame || + window.mozCancelRequestAnimationFrame || + window.oCancelRequestAnimationFrame || + window.msCancelRequestAnimationFrame || + clearTimeout +} )(); + +function hexToRgb(hex){ + // By Tim Down - http://stackoverflow.com/a/5624139/3493650 + // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF") + var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; + hex = hex.replace(shorthandRegex, function(m, r, g, b) { + return r + r + g + g + b + b; + }); + var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); + return result ? { + r: parseInt(result[1], 16), + g: parseInt(result[2], 16), + b: parseInt(result[3], 16) + } : null; +}; + +function clamp(number, min, max) { + return Math.min(Math.max(number, min), max); +}; + +function isInArray(value, array) { + return array.indexOf(value) > -1; +} + + +/* ---------- particles.js functions - start ------------ */ + +window.pJSDom = []; + +window.particlesJS = function(tag_id, params){ + + //console.log(params); + + /* no string id? so it's object params, and set the id with default id */ + if(typeof(tag_id) != 'string'){ + params = tag_id; + tag_id = 'particles-js'; + } + + /* no id? set the id to default id */ + if(!tag_id){ + tag_id = 'particles-js'; + } + + /* pJS elements */ + var pJS_tag = document.getElementById(tag_id), + pJS_canvas_class = 'particles-js-canvas-el', + exist_canvas = pJS_tag.getElementsByClassName(pJS_canvas_class); + + /* remove canvas if exists into the pJS target tag */ + if(exist_canvas.length){ + while(exist_canvas.length > 0){ + pJS_tag.removeChild(exist_canvas[0]); + } + } + + /* create canvas element */ + var canvas_el = document.createElement('canvas'); + canvas_el.className = pJS_canvas_class; + + /* set size canvas */ + canvas_el.style.width = "100%"; + canvas_el.style.height = "100%"; + + /* append canvas */ + var canvas = document.getElementById(tag_id).appendChild(canvas_el); + + /* launch particle.js */ + if(canvas != null){ + pJSDom.push(new pJS(tag_id, params)); + } + +}; + +window.particlesJS.load = function(tag_id, path_config_json, callback){ + + /* load json config */ + var xhr = new XMLHttpRequest(); + xhr.open('GET', path_config_json); + xhr.onreadystatechange = function (data) { + if(xhr.readyState == 4){ + if(xhr.status == 200){ + var params = JSON.parse(data.currentTarget.response); + window.particlesJS(tag_id, params); + if(callback) callback(); + }else{ + console.log('Error pJS - XMLHttpRequest status: '+xhr.status); + console.log('Error pJS - File config not found'); + } + } + }; + xhr.send(); + +}; \ No newline at end of file diff --git a/home/modules/ROOT/attachments/js/particles.json b/home/modules/ROOT/attachments/js/particles.json new file mode 100644 index 00000000..04c5fbca --- /dev/null +++ b/home/modules/ROOT/attachments/js/particles.json @@ -0,0 +1,116 @@ +{ + "particles": { + "number": { + "value": 80, + "density": { + "enable": true, + "value_area": 800 + } + }, + "color": { + "value": "#ffffff" + }, + "shape": { + "type": "circle", + "stroke": { + "width": 0, + "color": "#000000" + }, + "polygon": { + "nb_sides": 5 + }, + "image": { + "src": "img/github.svg", + "width": 100, + "height": 100 + } + }, + "opacity": { + "value": 0.5, + "random": false, + "anim": { + "enable": false, + "speed": 1, + "opacity_min": 0.1, + "sync": false + } + }, + "size": { + "value": 5, + "random": true, + "anim": { + "enable": false, + "speed": 40, + "size_min": 0.1, + "sync": false + } + }, + "line_linked": { + "enable": true, + "distance": 150, + "color": "#ffffff", + "opacity": 0.4, + "width": 1 + }, + "move": { + "enable": true, + "speed": 6, + "direction": "none", + "random": false, + "straight": false, + "out_mode": "out", + "attract": { + "enable": false, + "rotateX": 600, + "rotateY": 1200 + } + } + }, + "interactivity": { + "detect_on": "canvas", + "events": { + "onhover": { + "enable": true, + "mode": "repulse" + }, + "onclick": { + "enable": true, + "mode": "push" + }, + "resize": true + }, + "modes": { + "grab": { + "distance": 400, + "line_linked": { + "opacity": 1 + } + }, + "bubble": { + "distance": 400, + "size": 40, + "duration": 2, + "opacity": 8, + "speed": 3 + }, + "repulse": { + "distance": 200 + }, + "push": { + "particles_nb": 4 + }, + "remove": { + "particles_nb": 2 + } + } + }, + "retina_detect": true, + "config_demo": { + "hide_card": false, + "background_color": "#b61924", + "background_image": "", + "background_position": "50% 50%", + "background_repeat": "no-repeat", + "background_size": "cover" + } +} \ No newline at end of file diff --git a/home/modules/ROOT/attachments/sitemap-help-cloud.xml b/home/modules/ROOT/attachments/sitemap-help-cloud.xml new file mode 100644 index 00000000..2ce3b6da --- /dev/null +++ b/home/modules/ROOT/attachments/sitemap-help-cloud.xml @@ -0,0 +1,28278 @@ + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/accessibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/accessing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/action-codes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/admin-console-orgs-page.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/admin-console-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/admin-portal-groups-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/admin-portal-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/admin-portal-users-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/admin-portal-users.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/admin-sign-in.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/administration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/advanced-commands.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/aggregation-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/ai-answers-best-practices.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/ai-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/alerts-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-admin-permissions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-administration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-ai-assist.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-api-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-api.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-cal-fields.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-collaboration-and-discovery.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-connect-your-database.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-connecting-analyst-studio-to-your-database.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-datasets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-dbt-data-freshness.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-dbt-semantic-layer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-definitions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-discovery-api.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-explore-and-share-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-faqs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-github.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-google-sheets-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-google-sheets-testing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-integrations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-managing-database-connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-navigate-and-organize-content.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-notebook.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-open-source-code-attributions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-organizing-reports.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-parameters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-permissions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-query-and-analyze-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-querying-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-report-scheduling-and-sharing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-spaces.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-supported-browsers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-supported-databases.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-visual-explorer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-visualizations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-visualize-and-present-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-viz-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-webhooks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst-studio-workspace-api-tokens.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/analyst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/answer-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/answer-explorer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/ask-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/audit-logs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/authentication-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/authentication-local.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/authentication-org-SAML.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/authentication.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/automated-answer-creation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/business-continuity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/business-user-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/business-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/case-configuration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/catalog-integration-atlan.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/catalog-integration-collibra.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/catalog-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-area-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-axes-options.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-bar-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-candlestick.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-color-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-column-axis-rename.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-column-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-column-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-data-labels.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-data-markers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-donut.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-funnel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-geo-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-geo-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-geo-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-geo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-gridlines.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-high-cardinality.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-html.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-kpi.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-line-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-line-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-lock-type.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-null-missing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-pareto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-pivot-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-radar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-regression-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-sankey.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-scatter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-settings-advanced.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-table-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-treemap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-waterfall.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-x-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-y-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chart-zoom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/charts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-10-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-10-1-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-10-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-10-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-10-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-10-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-9-12-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-9-12-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/coming-soon.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connect-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connection-share.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-adw-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-adw-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-adw-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-adw-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-adw-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-adw-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-adw-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-adw-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-adw-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-adw.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-athena-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-athena-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-athena-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-athena-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-athena-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-athena-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-athena-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-athena-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-athena.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-aurora-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-amazon-rds-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-bridge.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-column-indexing-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-cust-cal-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-cust-cal-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-cust-cal-update.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-cust-cal.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-databricks-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-databricks-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-databricks-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-databricks-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-databricks-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-databricks-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-databricks-oauth-aad.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-databricks-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-databricks-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-databricks-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-databricks-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-databricks-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-databricks-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-databricks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-denodo-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-denodo-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-denodo-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-denodo-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-denodo-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-denodo-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-denodo-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-denodo-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-denodo-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-denodo-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-denodo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-dremio-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-dremio-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-dremio-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-dremio-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-dremio-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-dremio-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-dremio-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-dremio-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-dremio-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-dremio-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-dremio.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-external-tables-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-falcon-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-falcon-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-falcon-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-falcon-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-falcon-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-falcon-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-falcon-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-falcon-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-falcon.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-gbq-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-gbq-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-gbq-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-gbq-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-gbq-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-gbq-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-gbq-ingress.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-gbq-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-gbq-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-gbq-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-gbq-prerequisites.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-gbq-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-gbq-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-genericjdbc-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-genericjdbc-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-genericjdbc-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-genericjdbc-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-genericjdbc-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-genericjdbc-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-genericjdbc-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-genericjdbc-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-genericjdbc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-alloydb-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-alloydb-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-alloydb-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-alloydb-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-alloydb-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-alloydb-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-alloydb-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-alloydb-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-alloydb-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-google-cloud-sql-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-hana-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-hana-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-hana-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-hana-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-hana-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-hana-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-hana-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-hana-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-hana-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-hana.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-ipsec-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-looker-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-looker-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-looker-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-looker-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-looker-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-looker-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-looker-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-looker-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-looker.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mode-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mode-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mode-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mode-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mode-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mode-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mode-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mode-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mode.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-presto-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-presto-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-presto-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-presto-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-presto-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-presto-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-presto-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-presto-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-presto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-private-link-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-query-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-redshift-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-redshift-aws-idc-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-redshift-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-redshift-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-redshift-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-redshift-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-redshift-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-redshift-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-redshift-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-redshift-managed-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-redshift-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-redshift-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-redshift-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-redshift-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-redshift-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-singlestore-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-singlestore-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-singlestore-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-singlestore-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-singlestore-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-singlestore-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-singlestore-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-singlestore-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-singlestore.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-answer-csv-upload.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-csv-upload-config.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-csv-upload.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-okta-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-psc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake-tutorial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-sql-server-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-starburst-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-starburst-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-starburst-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-starburst-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-starburst-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-starburst-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-starburst-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-starburst-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-starburst-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-starburst-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-starburst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-synapse-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-synapse-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-synapse-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-synapse-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-synapse-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-synapse-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-synapse-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-synapse-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-synapse-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-synapse-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-synapse.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-teradata-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-teradata-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-teradata-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-teradata-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-teradata-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-teradata-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-teradata-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-teradata-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-teradata-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-teradata.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-trino-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-trino-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-trino-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-trino-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-trino-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-trino-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-trino-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-trino-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections-trino.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/connectors-categorization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/consumption-pricing-query-based-generate.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/consumption-pricing-query-based-subscription.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/consumption-pricing-query-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/consumption-pricing-storage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/consumption-pricing-time-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/consumption-pricing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/csv-load-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/custom-domains.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/custom-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/custom-sets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/customize-help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-engineer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-load-date-formats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-masking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-modeling-aggreg-additive.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-modeling-attributable-dimension.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-modeling-column-basics.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-modeling-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-modeling-geo-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-modeling-index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-modeling-patterns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-modeling-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-modeling-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-modeling.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-source-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/data-workspace.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/date-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/dbt-integration-metadata-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/dbt-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/deprecation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/developer-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/downloads.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/early-access-enable.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/editions-admin.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/editions-tenant.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/editions-usage-limits.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/faq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/filter-bulk.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/filter-chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/filter-chart.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/filter-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/filter-null.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formula-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formula-answer-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formula-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formulas-aggregation-filtered.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formulas-aggregation-flexible.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formulas-aggregation-group.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formulas-aggregation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formulas-chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formulas-conversion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formulas-cumulative.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formulas-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formulas-keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formulas-logical-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formulas-moving.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formulas-nested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formulas-percent.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formulas-simple-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/geomap-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/geomaps-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/getting-started-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/getting-started-team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/git-version-control.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/glossary.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/group-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/group-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/groups-privileges.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/help-center.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/high-availability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/index_help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/index-statistics-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/indexing-queries-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/it-ops.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/join-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/join-worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-da-DK.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-de-DE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-en-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-es-ES.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-es-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-fi-FI.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-fr-CA.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-fr-FR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-it-IT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-ja-JP.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-ko-KR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-nb-NO.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-nl-NL.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-pt-BR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-pt-PT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-ru-RU.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-sv-SE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-to-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-zh-CN.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords-zh-HANT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-ai-highlights.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-chart-reset.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-comment.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-download-pdf.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-filters-cross.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-filters-linked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-filters-mandatory.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-filters-selective.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-gating-condition-example.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-hyperlink.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-layout-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-link-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-schedule.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-slideshow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-tabs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-verify.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard-visualization-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/locale.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/mobile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/model-data-ui.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/monitor-webhooks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/navigating-thoughtspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/notes-mobile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/object-usage-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/oidc-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/oidc-iamv2.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/okta-iam.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/onboarding-email-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/opensource.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/orgs-administration-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/orgs-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/parameters-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/parameters-use.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/performance-tracking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/personalized-liveboard-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/practice.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/privileges-end-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/public-api-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/push-data-to-external-apps.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/push-data-to-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/query-stats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/query.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/rbac.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/reaggregation-scenarios.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/relationship-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/relationship-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/relationships.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/release-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/rest-api-get-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/results.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/rls-rule-builder-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sage-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sage-enablement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sage-feedback.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sage-search-best-practices.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sage-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/saml-group-mapping.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/saml-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/schedule-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/scheduled-liveboards-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/scheduled-maintenance.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/schema-viewer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/scriptability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-actions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-ai-suggested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-assist-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-assist.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-choose-data-source.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-columns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-conditional-formatting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-data-errors-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-data-refresh-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-download.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-drill-down.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-flags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-growth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-keyword.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-proximity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-spotiq-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-start.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-subquery.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-suggestion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/searches-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/security-data-object.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/security-rls-concept.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/security-rls-implement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/security-rls.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/security-thoughtspot-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/semi-additive-measures.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/semi-additive-modeling.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/share-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/share-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/share-request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/share-revoke-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/share-source-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/share-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/share-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sharing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/show-underlying-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/single-window-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotdev.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotiq-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotiq-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotiq-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotiq-data-model-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotiq-feedback.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotiq-forecasting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotiq-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotiq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotter-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotter-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotter-error.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotter-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotter-training-options.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotter-training-steps.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotter-training.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotter-validate.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotter-worksheet-model.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/spotter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/status.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/style-customization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/support-contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/support-handbook.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sync-gainsight.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sync-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sync-hubspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sync-ms-excel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sync-ms-teams.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sync-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sync-salesforce.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sync-servicenow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sync-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sync-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sync-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/sync-zoho.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/system-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/system-monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/system-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/tables-join-compatible.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/tables-join.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/thoughtspot-excel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/thoughtspot-homepage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/thoughtspot-one-disable-discover-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/thoughtspot-one-homepage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/thoughtspot-one-query-intelligence-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/thoughtspot-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/thoughtspot-slides.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/thoughtspot-sync.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/time-series-anomaly.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/tml-alerts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/tml-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/tml-connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/tml-import-export-multiple.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/tml-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/tml-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/tml-models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/tml-sets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/tml-sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/tml-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/tml-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/tml-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/tml.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/troubleshooting-blanks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/troubleshooting-browser-cache.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/troubleshooting-connectivity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/troubleshooting-formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/troubleshooting-generate-har-file.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/troubleshooting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/ts-bi-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/ts-cloud-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/ts-cloud-requirements-support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/upgrade.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/use-agreement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/user-account-activation-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/user-adoption.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/user-management-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/user-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/user-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/user-onboarding-experience.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/user-productivity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/user-profile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/user-sign-up.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/views-examples.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/views-searches.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/visualize-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/web-notifications.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-10-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-10-1-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-10-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-10-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-10-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-10-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-9-12-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-9-12-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/whats-new-free-trial-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/worksheet-create-setup.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/worksheet-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/worksheet-custom-sort.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/worksheet-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/worksheet-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/worksheet-formula.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/worksheet-inclusion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/worksheet-progressive-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/worksheet-readiness.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.4.0.cl/worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/accessibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/accessing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/action-codes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/admin-console-orgs-page.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/admin-console-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/admin-portal-groups-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/admin-portal-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/admin-portal-users-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/admin-portal-users.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/admin-sign-in.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/administration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/advanced-commands.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/aggregation-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/ai-answers-best-practices.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/ai-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/alerts-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-admin-permissions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-administration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-ai-assist.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-api-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-api.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-cal-fields.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-collaboration-and-discovery.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-connect-your-database.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-connecting-analyst-studio-to-your-database.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-datasets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-dbt-data-freshness.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-dbt-semantic-layer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-definitions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-discovery-api.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-explore-and-share-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-faqs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-github.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-google-sheets-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-google-sheets-testing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-integrations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-managing-database-connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-navigate-and-organize-content.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-notebook.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-open-source-code-attributions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-organizing-reports.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-parameters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-permissions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-query-and-analyze-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-querying-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-report-scheduling-and-sharing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-spaces.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-supported-browsers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-supported-databases.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-visual-explorer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-visualizations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-visualize-and-present-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-viz-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-webhooks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst-studio-workspace-api-tokens.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/analyst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/answer-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/answer-explorer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/ask-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/audit-logs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/authentication-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/authentication-local.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/authentication-org-SAML.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/authentication.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/automated-answer-creation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/business-continuity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/business-user-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/business-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/case-configuration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/catalog-integration-atlan.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/catalog-integration-collibra.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/catalog-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-area-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-axes-options.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-bar-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-candlestick.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-color-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-column-axis-rename.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-column-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-column-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-data-labels.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-data-markers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-donut.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-funnel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-geo-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-geo-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-geo-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-geo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-gridlines.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-high-cardinality.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-html.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-kpi.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-line-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-line-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-lock-type.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-null-missing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-pareto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-pivot-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-radar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-regression-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-sankey.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-scatter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-settings-advanced.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-table-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-treemap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-waterfall.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-x-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-y-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chart-zoom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/charts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-10-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-10-1-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-10-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-10-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-10-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-9-12-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-9-12-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/coming-soon.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connect-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connection-share.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-adw-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-adw-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-adw-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-adw-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-adw-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-adw-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-adw-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-adw-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-adw-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-adw.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-athena-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-athena-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-athena-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-athena-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-athena-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-athena-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-athena-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-athena-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-athena.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-aurora-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-amazon-rds-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-bridge.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-column-indexing-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-cust-cal-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-cust-cal-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-cust-cal-update.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-cust-cal.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-databricks-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-databricks-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-databricks-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-databricks-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-databricks-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-databricks-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-databricks-oauth-aad.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-databricks-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-databricks-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-databricks-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-databricks-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-databricks-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-databricks-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-databricks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-denodo-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-denodo-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-denodo-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-denodo-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-denodo-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-denodo-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-denodo-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-denodo-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-denodo-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-denodo-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-denodo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-dremio-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-dremio-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-dremio-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-dremio-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-dremio-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-dremio-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-dremio-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-dremio-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-dremio-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-dremio-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-dremio.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-external-tables-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-falcon-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-falcon-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-falcon-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-falcon-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-falcon-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-falcon-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-falcon-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-falcon-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-falcon.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-gbq-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-gbq-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-gbq-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-gbq-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-gbq-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-gbq-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-gbq-ingress.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-gbq-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-gbq-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-gbq-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-gbq-prerequisites.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-gbq-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-gbq-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-genericjdbc-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-genericjdbc-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-genericjdbc-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-genericjdbc-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-genericjdbc-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-genericjdbc-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-genericjdbc-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-genericjdbc-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-genericjdbc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-alloydb-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-alloydb-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-alloydb-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-alloydb-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-alloydb-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-alloydb-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-alloydb-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-alloydb-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-alloydb-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-google-cloud-sql-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-hana-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-hana-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-hana-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-hana-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-hana-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-hana-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-hana-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-hana-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-hana-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-hana.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-ipsec-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-looker-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-looker-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-looker-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-looker-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-looker-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-looker-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-looker-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-looker-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-looker.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mode-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mode-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mode-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mode-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mode-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mode-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mode-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mode-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mode.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-presto-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-presto-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-presto-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-presto-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-presto-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-presto-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-presto-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-presto-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-presto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-private-link-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-query-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-redshift-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-redshift-aws-idc-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-redshift-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-redshift-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-redshift-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-redshift-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-redshift-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-redshift-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-redshift-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-redshift-managed-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-redshift-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-redshift-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-redshift-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-redshift-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-redshift-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-singlestore-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-singlestore-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-singlestore-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-singlestore-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-singlestore-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-singlestore-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-singlestore-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-singlestore-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-singlestore.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-answer-csv-upload.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-csv-upload-config.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-csv-upload.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-okta-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-psc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake-tutorial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-sql-server-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-starburst-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-starburst-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-starburst-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-starburst-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-starburst-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-starburst-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-starburst-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-starburst-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-starburst-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-starburst-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-starburst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-synapse-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-synapse-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-synapse-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-synapse-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-synapse-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-synapse-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-synapse-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-synapse-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-synapse-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-synapse-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-synapse.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-teradata-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-teradata-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-teradata-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-teradata-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-teradata-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-teradata-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-teradata-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-teradata-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-teradata-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-teradata.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-trino-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-trino-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-trino-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-trino-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-trino-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-trino-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-trino-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-trino-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections-trino.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/connectors-categorization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/consumption-pricing-query-based-generate.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/consumption-pricing-query-based-subscription.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/consumption-pricing-query-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/consumption-pricing-storage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/consumption-pricing-time-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/consumption-pricing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/csv-load-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/custom-domains.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/custom-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/custom-sets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/customize-help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-engineer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-load-date-formats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-masking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-modeling-aggreg-additive.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-modeling-attributable-dimension.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-modeling-column-basics.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-modeling-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-modeling-geo-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-modeling-index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-modeling-patterns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-modeling-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-modeling-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-modeling.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-source-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/data-workspace.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/date-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/dbt-integration-metadata-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/dbt-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/deprecation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/developer-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/downloads.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/early-access-enable.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/editions-admin.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/editions-tenant.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/editions-usage-limits.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/faq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/filter-bulk.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/filter-chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/filter-chart.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/filter-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/filter-null.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/fixed.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formula-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formula-answer-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formula-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formulas-aggregation-filtered.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formulas-aggregation-flexible.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formulas-aggregation-group.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formulas-aggregation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formulas-chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formulas-conversion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formulas-cumulative.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formulas-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formulas-keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formulas-logical-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formulas-moving.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formulas-nested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formulas-percent.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formulas-simple-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/geomap-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/geomaps-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/getting-started-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/getting-started-team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/git-version-control.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/glossary.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/group-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/group-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/groups-privileges.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/help-center.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/high-availability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/index_help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/index-statistics-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/indexing-queries-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/it-ops.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/join-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/join-worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-da-DK.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-de-DE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-en-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-es-ES.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-es-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-fi-FI.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-fr-CA.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-fr-FR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-it-IT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-ja-JP.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-ko-KR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-nb-NO.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-nl-NL.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-pt-BR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-pt-PT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-ru-RU.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-sv-SE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-to-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-zh-CN.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords-zh-HANT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/known.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-ai-highlights.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-chart-reset.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-comment.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-download-pdf.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-filters-cross.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-filters-linked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-filters-mandatory.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-filters-selective.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-gating-condition-example.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-hyperlink.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-layout-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-link-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-schedule.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-slideshow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-tabs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-verify.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard-visualization-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/locale.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/mobile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/model-data-ui.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/monitor-webhooks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/navigating-thoughtspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/object-usage-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/oidc-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/oidc-iamv2.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/okta-iam.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/onboarding-email-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/opensource.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/orgs-administration-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/orgs-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/parameters-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/parameters-use.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/performance-tracking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/personalized-liveboard-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/practice.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/privileges-end-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/public-api-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/push-data-to-external-apps.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/push-data-to-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/query-stats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/query.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/rbac.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/reaggregation-scenarios.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/relationship-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/relationship-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/relationships.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/release-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/rest-api-get-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/results.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/rls-rule-builder-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sage-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sage-enablement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sage-feedback.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sage-search-best-practices.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sage-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/saml-group-mapping.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/saml-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/schedule-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/scheduled-liveboards-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/scheduled-maintenance.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/schema-viewer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/scriptability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-actions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-ai-suggested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-assist-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-assist.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-choose-data-source.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-columns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-conditional-formatting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-data-errors-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-data-refresh-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-download.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-drill-down.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-flags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-growth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-keyword.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-proximity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-spotiq-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-start.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-subquery.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-suggestion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/searches-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/security-data-object.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/security-rls-concept.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/security-rls-implement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/security-rls.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/security-thoughtspot-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/semi-additive-measures.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/semi-additive-modeling.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/share-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/share-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/share-request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/share-revoke-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/share-source-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/share-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/share-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sharing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/show-underlying-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/single-window-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/spotdev.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/spotiq-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/spotiq-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/spotiq-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/spotiq-data-model-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/spotiq-feedback.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/spotiq-forecasting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/spotiq-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/spotiq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/style-customization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/support-contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/support-handbook.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sync-gainsight.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sync-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sync-hubspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sync-ms-excel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sync-ms-teams.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sync-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sync-salesforce.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sync-servicenow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sync-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sync-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sync-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/sync-zoho.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/system-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/system-monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/system-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/tables-join-compatible.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/tables-join.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/thoughtspot-excel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/thoughtspot-homepage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/thoughtspot-one-disable-discover-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/thoughtspot-one-homepage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/thoughtspot-one-query-intelligence-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/thoughtspot-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/thoughtspot-slides.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/thoughtspot-sync.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/time-series-anomaly.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/tml-alerts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/tml-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/tml-connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/tml-import-export-multiple.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/tml-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/tml-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/tml-models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/tml-sets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/tml-sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/tml-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/tml-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/tml-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/tml.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/troubleshooting-blanks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/troubleshooting-browser-cache.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/troubleshooting-connectivity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/troubleshooting-formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/troubleshooting-generate-har-file.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/troubleshooting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/ts-bi-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/ts-cloud-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/ts-cloud-requirements-support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/upgrade.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/use-agreement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/user-account-activation-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/user-adoption.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/user-management-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/user-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/user-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/user-onboarding-experience.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/user-productivity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/user-profile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/user-sign-up.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/views-examples.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/views-searches.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/visualize-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/web-notifications.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-10-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-10-1-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-10-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-10-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-10-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-9-12-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-9-12-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/whats-new-free-trial-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/worksheet-create-setup.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/worksheet-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/worksheet-custom-sort.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/worksheet-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/worksheet-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/worksheet-formula.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/worksheet-inclusion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/worksheet-progressive-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/worksheet-readiness.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/accessibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/accessing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/action-codes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/admin-console-orgs-page.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/admin-console-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/admin-portal-groups-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/admin-portal-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/admin-portal-users-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/admin-portal-users.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/admin-sign-in.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/administration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/advanced-commands.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/aggregation-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/ai-answers-best-practices.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/ai-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/alerts-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/analyst-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/analyst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/answer-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/answer-explorer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/ask-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/audit-logs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/authentication-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/authentication-local.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/authentication-org-SAML.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/authentication.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/automated-answer-creation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/business-continuity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/business-user-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/business-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/case-configuration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/catalog-integration-atlan.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/catalog-integration-collibra.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/catalog-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-area-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-axes-options.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-bar-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-candlestick.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-color-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-column-axis-rename.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-column-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-column-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-data-labels.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-data-markers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-donut.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-funnel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-gauge.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-geo-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-geo-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-geo-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-geo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-gridlines.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-high-cardinality.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-html.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-kpi.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-line-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-line-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-lock-type.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-null-missing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-pareto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-pivot-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-radar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-regression-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-sankey.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-scatter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-settings-advanced.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-table-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-treemap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-waterfall.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-x-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-y-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chart-zoom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/charts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-10-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-10-1-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-10-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-10-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-9-12-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-9-12-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/coming-soon.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connect-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connection-share.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-adw-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-adw-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-adw-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-adw-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-adw-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-adw-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-adw-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-adw-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-adw-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-adw.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-athena-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-athena-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-athena-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-athena-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-athena-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-athena-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-athena-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-athena-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-athena.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-aurora-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-amazon-rds-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-bridge.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-column-indexing-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-cust-cal-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-cust-cal-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-cust-cal-update.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-cust-cal.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-databricks-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-databricks-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-databricks-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-databricks-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-databricks-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-databricks-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-databricks-oauth-aad.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-databricks-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-databricks-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-databricks-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-databricks-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-databricks-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-databricks-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-databricks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-denodo-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-denodo-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-denodo-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-denodo-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-denodo-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-denodo-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-denodo-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-denodo-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-denodo-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-denodo-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-denodo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-dremio-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-dremio-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-dremio-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-dremio-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-dremio-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-dremio-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-dremio-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-dremio-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-dremio-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-dremio-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-dremio.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-external-tables-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-falcon-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-falcon-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-falcon-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-falcon-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-falcon-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-falcon-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-falcon-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-falcon-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-falcon.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-gbq-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-gbq-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-gbq-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-gbq-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-gbq-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-gbq-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-gbq-ingress.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-gbq-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-gbq-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-gbq-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-gbq-prerequisites.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-gbq-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-gbq-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-genericjdbc-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-genericjdbc-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-genericjdbc-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-genericjdbc-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-genericjdbc-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-genericjdbc-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-genericjdbc-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-genericjdbc-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-genericjdbc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-alloydb-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-alloydb-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-alloydb-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-alloydb-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-alloydb-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-alloydb-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-alloydb-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-alloydb-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-alloydb-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-google-cloud-sql-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-hana-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-hana-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-hana-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-hana-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-hana-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-hana-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-hana-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-hana-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-hana-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-hana.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-ipsec-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-looker-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-looker-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-looker-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-looker-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-looker-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-looker-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-looker-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-looker-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-looker.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mode-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mode-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mode-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mode-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mode-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mode-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mode-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mode-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mode.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-presto-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-presto-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-presto-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-presto-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-presto-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-presto-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-presto-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-presto-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-presto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-private-link-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-query-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-redshift-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-redshift-aws-idc-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-redshift-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-redshift-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-redshift-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-redshift-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-redshift-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-redshift-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-redshift-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-redshift-managed-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-redshift-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-redshift-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-redshift-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-redshift-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-redshift-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-singlestore-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-singlestore-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-singlestore-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-singlestore-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-singlestore-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-singlestore-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-singlestore-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-singlestore-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-singlestore.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-csv-upload-config.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-csv-upload.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-okta-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-psc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake-tutorial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-sql-server-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-starburst-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-starburst-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-starburst-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-starburst-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-starburst-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-starburst-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-starburst-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-starburst-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-starburst-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-starburst-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-starburst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-synapse-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-synapse-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-synapse-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-synapse-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-synapse-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-synapse-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-synapse-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-synapse-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-synapse-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-synapse-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-synapse.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-teradata-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-teradata-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-teradata-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-teradata-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-teradata-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-teradata-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-teradata-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-teradata-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-teradata-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-teradata.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-trino-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-trino-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-trino-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-trino-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-trino-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-trino-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-trino-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-trino-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections-trino.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/consumption-pricing-query-based-generate.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/consumption-pricing-query-based-subscription.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/consumption-pricing-query-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/consumption-pricing-storage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/consumption-pricing-time-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/consumption-pricing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/csv-load-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/custom-domains.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/custom-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/custom-sets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/customize-help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-engineer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-load-date-formats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-masking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-modeling-aggreg-additive.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-modeling-attributable-dimension.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-modeling-column-basics.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-modeling-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-modeling-geo-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-modeling-index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-modeling-patterns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-modeling-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-modeling-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-modeling.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-source-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/data-workspace.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/date-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/dbt-integration-metadata-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/dbt-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/deprecation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/developer-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/downloads.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/early-access-enable.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/editions-admin.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/editions-tenant.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/editions-usage-limits.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/faq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/filter-bulk.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/filter-chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/filter-chart.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/filter-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/filter-null.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/fixed.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formula-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formula-answer-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formula-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formulas-aggregation-filtered.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formulas-aggregation-flexible.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formulas-aggregation-group.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formulas-aggregation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formulas-chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formulas-conversion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formulas-cumulative.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formulas-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formulas-keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formulas-logical-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formulas-moving.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formulas-nested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formulas-percent.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formulas-simple-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/gcp.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/geomap-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/geomaps-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/getting-started-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/getting-started-team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/git-version-control.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/glossary.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/group-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/group-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/groups-privileges.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/help-center.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/high-availability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/index_help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/index-statistics-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/indexing-queries-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/it-ops.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/join-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/join-worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-da-DK.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-de-DE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-en-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-es-ES.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-es-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-fi-FI.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-fr-CA.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-fr-FR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-it-IT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-ja-JP.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-ko-KR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-nb-NO.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-nl-NL.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-pt-BR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-pt-PT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-ru-RU.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-sv-SE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-to-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-zh-CN.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords-zh-HANT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/known.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-ai-highlights.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-chart-reset.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-comment.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-download-pdf.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-filters-cross.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-filters-linked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-filters-mandatory.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-filters-selective.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-gating-condition-example.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-hyperlink.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-layout-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-link-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-schedule.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-slideshow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-tabs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-verify.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard-visualization-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/locale.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/mobile-ask-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/mobile-compare-web.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/mobile-deep-linking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/mobile-deploy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/mobile-drill-down.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/mobile-faq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/mobile-features.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/mobile-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/mobile-install.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/mobile-kpi-change-analysis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/mobile-localization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/mobile-note-tiles.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/mobile-push-notifications.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/mobile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/model-data-ui.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/monitor-webhooks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/navigating-thoughtspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/notes-mobile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/object-usage-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/oidc-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/oidc-iamv2.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/okta-iam.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/onboarding-email-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/opensource.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/orgs-administration-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/orgs-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/parameters-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/parameters-use.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/performance-tracking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/personalized-liveboard-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/practice.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/privileges-end-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/public-api-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/push-data-to-external-apps.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/push-data-to-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/query-stats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/query.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/rbac.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/reaggregation-scenarios.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/relationship-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/relationship-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/relationships.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/release-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/rest-api-get-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/results.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/rls-rule-builder-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sage-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sage-enablement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sage-feedback.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sage-search-best-practices.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sage-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/saml-group-mapping.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/saml-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/schedule-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/scheduled-liveboards-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/scheduled-maintenance.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/schema-viewer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/scriptability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-actions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-ai-suggested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-assist-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-assist.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-choose-data-source.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-columns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-conditional-formatting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-data-errors-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-data-refresh-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-download.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-drill-down.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-flags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-growth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-keyword.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-proximity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-spotiq-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-start.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-subquery.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-suggestion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/searches-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/security-data-object.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/security-rls-concept.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/security-rls-implement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/security-rls.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/security-thoughtspot-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/semi-additive-measures.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/semi-additive-modeling.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/share-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/share-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/share-request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/share-revoke-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/share-source-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/share-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/share-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sharing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/show-underlying-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/spotdev.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/spotiq-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/spotiq-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/spotiq-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/spotiq-data-model-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/spotiq-feedback.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/spotiq-forecasting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/spotiq-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/spotiq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/style-customization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/support-contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/support-handbook.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sync-gainsight.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sync-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sync-hubspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sync-ms-excel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sync-ms-teams.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sync-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sync-salesforce.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sync-servicenow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sync-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sync-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sync-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/sync-zoho.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/system-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/system-monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/system-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/tables-join-compatible.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/tables-join.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/thoughtspot-homepage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/thoughtspot-one-disable-discover-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/thoughtspot-one-homepage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/thoughtspot-one-query-intelligence-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/thoughtspot-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/thoughtspot-slides.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/thoughtspot-sync.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/time-series-anomaly.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/tml-alerts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/tml-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/tml-connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/tml-import-export-multiple.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/tml-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/tml-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/tml-models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/tml-sets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/tml-sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/tml-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/tml-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/tml-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/tml.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/troubleshooting-blanks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/troubleshooting-browser-cache.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/troubleshooting-connectivity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/troubleshooting-formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/troubleshooting-generate-har-file.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/troubleshooting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/ts-bi-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/ts-cloud-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/ts-cloud-requirements-support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/upgrade.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/use-agreement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/user-account-activation-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/user-adoption.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/user-management-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/user-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/user-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/user-onboarding-experience.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/user-productivity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/user-profile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/user-sign-up.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/views-examples.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/views-searches.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/visualize-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/web-notifications.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-10-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-10-1-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-10-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-10-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-9-12-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-9-12-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/whats-new-free-trial-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/worksheet-create-setup.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/worksheet-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/worksheet-custom-sort.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/worksheet-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/worksheet-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/worksheet-formula.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/worksheet-inclusion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/worksheet-progressive-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/worksheet-readiness.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/accessibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/accessing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/action-codes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/admin-console-orgs-page.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/admin-console-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/admin-portal-groups-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/admin-portal-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/admin-portal-users-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/admin-portal-users.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/admin-sign-in.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/administration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/advanced-commands.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/aggregation-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/ai-answers-best-practices.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/ai-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/alerts-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/analyst-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/analyst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/answer-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/answer-explorer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/ask-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/audit-logs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/authentication-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/authentication-local.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/authentication-org-SAML.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/authentication.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/automated-answer-creation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/business-continuity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/business-user-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/business-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/case-configuration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/catalog-integration-atlan.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/catalog-integration-collibra.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/catalog-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-area-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-axes-options.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-bar-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-candlestick.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-color-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-column-axis-rename.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-column-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-column-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-data-labels.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-data-markers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-donut.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-funnel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-geo-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-geo-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-geo-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-geo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-gridlines.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-high-cardinality.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-html.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-kpi.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-line-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-line-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-lock-type.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-null-missing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-pareto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-pivot-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-radar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-regression-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-sankey.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-scatter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-settings-advanced.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-table-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-treemap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-waterfall.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-x-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-y-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chart-zoom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/charts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-10-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-10-1-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-10-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-10-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-9-12-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-9-12-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/coming-soon.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connect-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connection-share.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-adw-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-adw-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-adw-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-adw-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-adw-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-adw-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-adw-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-adw-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-adw-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-adw.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-athena-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-athena-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-athena-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-athena-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-athena-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-athena-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-athena-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-athena-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-athena.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-aurora-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-amazon-rds-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-bridge.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-column-indexing-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-cust-cal-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-cust-cal-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-cust-cal-update.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-cust-cal.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-databricks-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-databricks-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-databricks-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-databricks-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-databricks-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-databricks-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-databricks-oauth-aad.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-databricks-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-databricks-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-databricks-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-databricks-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-databricks-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-databricks-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-databricks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-denodo-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-denodo-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-denodo-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-denodo-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-denodo-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-denodo-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-denodo-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-denodo-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-denodo-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-denodo-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-denodo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-dremio-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-dremio-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-dremio-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-dremio-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-dremio-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-dremio-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-dremio-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-dremio-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-dremio-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-dremio-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-dremio.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-external-tables-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-falcon-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-falcon-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-falcon-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-falcon-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-falcon-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-falcon-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-falcon-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-falcon-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-falcon.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-gbq-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-gbq-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-gbq-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-gbq-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-gbq-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-gbq-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-gbq-ingress.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-gbq-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-gbq-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-gbq-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-gbq-prerequisites.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-gbq-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-gbq-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-genericjdbc-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-genericjdbc-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-genericjdbc-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-genericjdbc-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-genericjdbc-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-genericjdbc-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-genericjdbc-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-genericjdbc-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-genericjdbc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-alloydb-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-alloydb-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-alloydb-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-alloydb-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-alloydb-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-alloydb-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-alloydb-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-alloydb-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-alloydb-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-google-cloud-sql-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-hana-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-hana-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-hana-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-hana-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-hana-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-hana-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-hana-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-hana-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-hana-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-hana.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-ipsec-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-looker-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-looker-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-looker-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-looker-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-looker-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-looker-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-looker-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-looker-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-looker.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mode-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mode-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mode-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mode-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mode-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mode-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mode-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mode-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mode.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-presto-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-presto-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-presto-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-presto-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-presto-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-presto-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-presto-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-presto-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-presto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-private-link-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-query-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-redshift-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-redshift-aws-idc-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-redshift-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-redshift-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-redshift-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-redshift-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-redshift-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-redshift-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-redshift-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-redshift-managed-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-redshift-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-redshift-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-redshift-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-redshift-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-redshift-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-singlestore-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-singlestore-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-singlestore-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-singlestore-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-singlestore-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-singlestore-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-singlestore-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-singlestore-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-singlestore.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-csv-upload-config.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-csv-upload.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-okta-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-psc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake-tutorial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-sql-server-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-starburst-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-starburst-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-starburst-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-starburst-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-starburst-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-starburst-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-starburst-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-starburst-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-starburst-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-starburst-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-starburst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-synapse-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-synapse-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-synapse-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-synapse-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-synapse-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-synapse-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-synapse-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-synapse-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-synapse-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-synapse-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-synapse.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-teradata-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-teradata-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-teradata-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-teradata-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-teradata-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-teradata-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-teradata-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-teradata-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-teradata-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-teradata.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-trino-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-trino-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-trino-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-trino-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-trino-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-trino-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-trino-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-trino-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections-trino.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/consumption-pricing-query-based-generate.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/consumption-pricing-query-based-subscription.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/consumption-pricing-query-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/consumption-pricing-storage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/consumption-pricing-time-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/consumption-pricing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/csv-load-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/custom-domains.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/custom-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/custom-sets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/customize-help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-engineer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-load-date-formats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-masking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-modeling-aggreg-additive.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-modeling-attributable-dimension.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-modeling-column-basics.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-modeling-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-modeling-geo-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-modeling-index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-modeling-patterns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-modeling-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-modeling-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-modeling.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-source-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/data-workspace.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/date-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/dbt-integration-metadata-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/dbt-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/deprecation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/developer-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/downloads.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/early-access-enable.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/editions-admin.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/editions-tenant.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/editions-usage-limits.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/faq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/filter-bulk.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/filter-chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/filter-chart.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/filter-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/filter-null.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/fixed.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formula-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formula-answer-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formula-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formulas-aggregation-filtered.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formulas-aggregation-flexible.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formulas-aggregation-group.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formulas-aggregation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formulas-chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formulas-conversion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formulas-cumulative.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formulas-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formulas-keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formulas-logical-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formulas-moving.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formulas-nested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formulas-percent.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formulas-simple-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/geomap-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/geomaps-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/getting-started-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/getting-started-team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/git-version-control.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/glossary.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/group-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/group-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/groups-privileges.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/help-center.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/high-availability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/index_help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/index-statistics-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/indexing-queries-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/it-ops.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/join-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/join-worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-da-DK.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-de-DE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-en-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-es-ES.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-es-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-fi-FI.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-fr-CA.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-fr-FR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-it-IT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-ja-JP.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-ko-KR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-nb-NO.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-nl-NL.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-pt-BR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-pt-PT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-ru-RU.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-sv-SE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-to-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-zh-CN.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords-zh-HANT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/known.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-ai-highlights.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-chart-reset.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-comment.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-download-pdf.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-filters-cross.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-filters-linked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-filters-mandatory.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-filters-selective.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-gating-condition-example.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-hyperlink.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-layout-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-link-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-schedule.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-slideshow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-tabs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-verify.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard-visualization-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/locale.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/mobile-ask-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/mobile-compare-web.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/mobile-deep-linking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/mobile-deploy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/mobile-drill-down.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/mobile-faq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/mobile-features.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/mobile-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/mobile-install.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/mobile-kpi-change-analysis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/mobile-localization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/mobile-note-tiles.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/mobile-push-notifications.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/mobile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/model-data-ui.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/monitor-webhooks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/navigating-thoughtspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/notes-mobile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/object-usage-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/oidc-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/oidc-iamv2.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/okta-iam.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/onboarding-email-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/opensource.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/orgs-administration-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/orgs-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/parameters-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/parameters-use.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/performance-tracking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/personalized-liveboard-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/practice.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/privileges-end-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/public-api-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/push-data-to-external-apps.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/push-data-to-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/query-stats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/query.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/rbac.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/reaggregation-scenarios.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/relationship-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/relationship-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/relationships.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/release-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/rest-api-get-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/results.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/rls-rule-builder-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sage-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sage-enablement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sage-feedback.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sage-search-best-practices.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sage-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/saml-group-mapping.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/saml-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/schedule-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/scheduled-liveboards-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/scheduled-maintenance.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/schema-viewer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/scriptability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-actions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-ai-suggested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-assist-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-assist.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-choose-data-source.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-columns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-conditional-formatting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-data-errors-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-data-refresh-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-download.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-drill-down.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-flags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-growth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-keyword.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-proximity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-spotiq-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-start.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-subquery.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-suggestion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/searches-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/security-data-object.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/security-rls-concept.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/security-rls-implement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/security-rls.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/security-thoughtspot-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/semi-additive-measures.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/semi-additive-modeling.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/share-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/share-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/share-request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/share-revoke-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/share-source-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/share-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/share-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sharing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/show-underlying-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/spotdev.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/spotiq-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/spotiq-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/spotiq-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/spotiq-data-model-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/spotiq-feedback.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/spotiq-forecasting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/spotiq-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/spotiq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/style-customization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/support-contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/support-handbook.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sync-gainsight.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sync-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sync-hubspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sync-ms-excel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sync-ms-teams.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sync-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sync-salesforce.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sync-servicenow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sync-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sync-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sync-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/sync-zoho.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/system-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/system-monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/system-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/tables-join-compatible.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/tables-join.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/thoughtspot-excel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/thoughtspot-homepage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/thoughtspot-one-disable-discover-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/thoughtspot-one-homepage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/thoughtspot-one-query-intelligence-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/thoughtspot-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/thoughtspot-slides.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/thoughtspot-sync.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/time-series-anomaly.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/tml-alerts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/tml-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/tml-connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/tml-import-export-multiple.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/tml-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/tml-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/tml-models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/tml-sets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/tml-sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/tml-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/tml-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/tml-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/tml.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/troubleshooting-blanks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/troubleshooting-browser-cache.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/troubleshooting-connectivity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/troubleshooting-formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/troubleshooting-generate-har-file.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/troubleshooting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/ts-bi-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/ts-cloud-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/ts-cloud-requirements-support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/upgrade.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/use-agreement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/user-account-activation-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/user-adoption.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/user-management-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/user-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/user-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/user-onboarding-experience.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/user-productivity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/user-profile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/user-sign-up.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/views-examples.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/views-searches.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/visualize-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/web-notifications.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-10-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-10-1-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-10-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-10-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-9-12-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-9-12-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/whats-new-free-trial-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/worksheet-create-setup.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/worksheet-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/worksheet-custom-sort.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/worksheet-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/worksheet-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/worksheet-formula.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/worksheet-inclusion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/worksheet-progressive-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/worksheet-readiness.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/accessibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/accessing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/action-codes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/admin-console-orgs-page.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/admin-console-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/admin-portal-groups-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/admin-portal-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/admin-portal-users-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/admin-portal-users.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/admin-sign-in.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/administration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/advanced-commands.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/aggregation-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/ai-answers-best-practices.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/ai-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/alerts-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/analyst-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/analyst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/answer-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/answer-explorer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/ask-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/audit-logs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/authentication-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/authentication-local.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/authentication.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/automated-answer-creation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/business-continuity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/business-user-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/business-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/case-configuration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/catalog-integration-atlan.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/catalog-integration-collibra.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/catalog-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-area-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-axes-options.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-bar-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-byoc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-candlestick.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-color-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-column-axis-rename.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-column-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-column-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-data-labels.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-data-markers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-donut.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-funnel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-geo-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-geo-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-geo-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-geo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-gridlines.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-high-cardinality.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-html.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-kpi.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-line-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-line-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-lock-type.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-null-missing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-pareto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-pivot-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-radar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-regression-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-sankey.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-scatter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-settings-advanced.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-table-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-treemap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-waterfall.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-x-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-y-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chart-zoom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/charts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-10-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-10-1-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-9-12-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-9-12-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/coming-soon.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connect-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connection-share.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-adw-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-adw-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-adw-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-adw-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-adw-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-adw-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-adw-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-adw-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-adw-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-adw.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-athena-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-athena-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-athena-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-athena-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-athena-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-athena-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-athena-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-athena-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-athena.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-aurora-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-amazon-rds-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-column-indexing-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-cust-cal-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-cust-cal-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-cust-cal-update.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-cust-cal.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-databricks-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-databricks-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-databricks-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-databricks-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-databricks-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-databricks-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-databricks-oauth-aad.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-databricks-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-databricks-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-databricks-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-databricks-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-databricks-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-databricks-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-databricks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-denodo-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-denodo-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-denodo-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-denodo-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-denodo-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-denodo-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-denodo-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-denodo-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-denodo-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-denodo-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-denodo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-dremio-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-dremio-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-dremio-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-dremio-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-dremio-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-dremio-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-dremio-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-dremio-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-dremio-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-dremio-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-dremio.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-external-tables-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-falcon-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-falcon-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-falcon-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-falcon-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-falcon-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-falcon-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-falcon-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-falcon-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-falcon.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-gbq-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-gbq-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-gbq-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-gbq-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-gbq-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-gbq-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-gbq-ingress.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-gbq-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-gbq-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-gbq-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-gbq-prerequisites.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-gbq-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-gbq-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-genericjdbc-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-genericjdbc-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-genericjdbc-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-genericjdbc-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-genericjdbc-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-genericjdbc-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-genericjdbc-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-genericjdbc-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-genericjdbc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-alloydb-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-alloydb-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-alloydb-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-alloydb-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-alloydb-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-alloydb-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-alloydb-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-alloydb-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-alloydb-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-google-cloud-sql-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-hana-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-hana-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-hana-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-hana-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-hana-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-hana-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-hana-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-hana-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-hana-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-hana.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-ipsec-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-looker-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-looker-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-looker-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-looker-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-looker-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-looker-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-looker-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-looker-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-looker.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mode-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mode-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mode-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mode-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mode-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mode-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mode-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mode-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mode.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-presto-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-presto-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-presto-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-presto-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-presto-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-presto-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-presto-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-presto-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-presto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-private-link-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-query-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-redshift-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-redshift-aws-idc-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-redshift-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-redshift-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-redshift-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-redshift-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-redshift-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-redshift-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-redshift-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-redshift-managed-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-redshift-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-redshift-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-redshift-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-redshift-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-redshift-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-singlestore-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-singlestore-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-singlestore-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-singlestore-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-singlestore-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-singlestore-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-singlestore-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-singlestore-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-singlestore.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-csv-upload-config.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-csv-upload.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-okta-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-psc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake-tutorial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-sql-server-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-starburst-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-starburst-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-starburst-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-starburst-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-starburst-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-starburst-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-starburst-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-starburst-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-starburst-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-starburst-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-starburst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-synapse-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-synapse-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-synapse-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-synapse-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-synapse-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-synapse-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-synapse-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-synapse-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-synapse-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-synapse-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-synapse.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-teradata-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-teradata-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-teradata-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-teradata-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-teradata-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-teradata-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-teradata-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-teradata-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-teradata-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-teradata.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-trino-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-trino-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-trino-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-trino-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-trino-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-trino-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-trino-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-trino-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections-trino.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/consumption-pricing-query-based-generate.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/consumption-pricing-query-based-subscription.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/consumption-pricing-query-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/consumption-pricing-storage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/consumption-pricing-time-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/consumption-pricing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/csv-load-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/custom-domains.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/custom-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/custom-sets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/customize-help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-engineer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-load-date-formats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-masking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-modeling-aggreg-additive.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-modeling-attributable-dimension.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-modeling-column-basics.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-modeling-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-modeling-geo-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-modeling-index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-modeling-patterns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-modeling-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-modeling-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-modeling.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-source-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/data-workspace.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/date-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/dbt-integration-metadata-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/dbt-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/deprecation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/developer-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/downloads.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/early-access-enable.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/editions-admin.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/editions-tenant.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/editions-usage-limits.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/faq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/filter-bulk.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/filter-chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/filter-chart.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/filter-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/filter-null.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/fixed.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formula-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formula-answer-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formula-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formulas-aggregation-filtered.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formulas-aggregation-flexible.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formulas-aggregation-group.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formulas-aggregation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formulas-chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formulas-conversion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formulas-cumulative.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formulas-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formulas-keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formulas-logical-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formulas-moving.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formulas-nested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formulas-percent.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formulas-simple-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/gcp.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/geomap-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/geomaps-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/getting-started-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/getting-started-team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/git-version-control.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/glossary.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/group-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/group-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/groups-privileges.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/help-center.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/high-availability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/index_help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/index-statistics-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/indexing-queries-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/it-ops.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/join-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/join-worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-da-DK.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-de-DE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-en-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-es-ES.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-es-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-fi-FI.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-fr-CA.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-fr-FR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-it-IT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-ja-JP.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-ko-KR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-nb-NO.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-nl-NL.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-pt-BR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-pt-PT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-ru-RU.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-sv-SE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-to-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-zh-CN.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords-zh-HANT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/known.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-ai-highlights.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-chart-reset.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-comment.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-download-pdf.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-filters-cross.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-filters-linked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-filters-mandatory.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-filters-selective.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-gating-condition-example.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-hyperlink.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-layout-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-link-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-schedule.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-slideshow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-tabs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-verify.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard-visualization-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/locale.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/mobile-ask-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/mobile-compare-web.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/mobile-deep-linking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/mobile-deploy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/mobile-drill-down.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/mobile-faq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/mobile-features.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/mobile-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/mobile-install.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/mobile-kpi-change-analysis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/mobile-localization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/mobile-note-tiles.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/mobile-push-notifications.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/mobile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/model-data-ui.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/monitor-webhooks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/navigating-thoughtspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/notes-mobile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/object-usage-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/oidc-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/oidc-iamv2.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/okta-iam.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/onboarding-email-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/opensource.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/orgs-administration-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/orgs-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/parameters-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/parameters-use.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/performance-tracking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/personalized-liveboard-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/practice.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/privileges-end-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/public-api-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/push-data-to-external-apps.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/push-data-to-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/query-stats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/query.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/rbac.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/reaggregation-scenarios.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/relationship-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/relationship-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/relationships.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/release-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/rest-api-get-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/results.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/rls-rule-builder-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sage-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sage-enablement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sage-feedback.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sage-search-best-practices.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sage-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/saml-group-mapping.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/saml-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/schedule-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/scheduled-liveboards-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/scheduled-maintenance.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/schema-viewer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/scriptability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-actions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-ai-suggested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-assist-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-assist.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-choose-data-source.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-columns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-conditional-formatting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-data-errors-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-data-refresh-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-download.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-drill-down.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-flags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-growth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-keyword.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-proximity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-spotiq-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-start.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-subquery.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-suggestion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/searches-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/security-data-object.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/security-rls-concept.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/security-rls-implement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/security-rls.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/security-thoughtspot-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/semi-additive-measures.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/semi-additive-modeling.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/share-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/share-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/share-request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/share-revoke-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/share-source-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/share-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/share-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sharing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/show-underlying-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/spotdev.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/spotiq-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/spotiq-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/spotiq-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/spotiq-data-model-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/spotiq-feedback.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/spotiq-forecasting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/spotiq-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/spotiq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/style-customization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/support-contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/support-handbook.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sync-gainsight.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sync-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sync-hubspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sync-ms-excel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sync-ms-teams.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sync-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sync-salesforce.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sync-servicenow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sync-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sync-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sync-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/sync-zoho.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/system-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/system-monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/system-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/tables-join-compatible.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/tables-join.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/thoughtspot-homepage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/thoughtspot-one-disable-discover-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/thoughtspot-one-homepage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/thoughtspot-one-query-intelligence-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/thoughtspot-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/thoughtspot-slides.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/thoughtspot-sync.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/time-series-anomaly.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/tml-alerts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/tml-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/tml-connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/tml-import-export-multiple.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/tml-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/tml-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/tml-models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/tml-sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/tml-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/tml-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/tml-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/tml.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/troubleshooting-blanks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/troubleshooting-browser-cache.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/troubleshooting-connectivity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/troubleshooting-formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/troubleshooting-generate-har-file.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/troubleshooting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/ts-bi-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/ts-cloud-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/ts-cloud-requirements-support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/upgrade.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/use-agreement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/user-account-activation-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/user-adoption.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/user-management-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/user-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/user-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/user-onboarding-experience.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/user-productivity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/user-profile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/user-sign-up.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/views-examples.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/views-searches.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/visualize-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/web-notifications.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-10-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-10-1-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-9-12-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-9-12-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/whats-new-free-trial-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/worksheet-create-setup.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/worksheet-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/worksheet-custom-sort.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/worksheet-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/worksheet-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/worksheet-formula.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/worksheet-inclusion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/worksheet-progressive-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/worksheet-readiness.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/accessibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/accessing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/action-codes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/admin-console-orgs-page.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/admin-console-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/admin-portal-groups-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/admin-portal-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/admin-portal-users-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/admin-portal-users.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/admin-sign-in.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/administration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/advanced-commands.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/aggregation-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/ai-answers-best-practices.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/ai-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/alerts-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/analyst-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/analyst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/answer-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/answer-explorer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/ask-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/audit-logs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/authentication-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/authentication-local.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/authentication.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/automated-answer-creation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/business-continuity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/business-user-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/business-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/case-configuration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/catalog-integration-atlan.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/catalog-integration-collibra.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/catalog-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-area-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-axes-options.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-bar-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-byoc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-candlestick.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-color-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-column-axis-rename.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-column-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-column-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-data-labels.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-data-markers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-donut.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-funnel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-geo-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-geo-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-geo-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-geo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-gridlines.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-high-cardinality.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-html.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-kpi.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-line-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-line-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-lock-type.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-null-missing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-pareto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-pivot-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-radar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-regression-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-sankey.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-scatter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-settings-advanced.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-table-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-treemap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-waterfall.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-x-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-y-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chart-zoom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/charts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-10-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-9-12-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-9-12-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/coming-soon.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connect-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connection-share.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-adw-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-adw-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-adw-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-adw-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-adw-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-adw-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-adw-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-adw-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-adw-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-adw.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-athena-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-athena-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-athena-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-athena-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-athena-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-athena-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-athena-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-athena-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-athena.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-aurora-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-amazon-rds-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-column-indexing-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-cust-cal-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-cust-cal-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-cust-cal-update.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-cust-cal.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-databricks-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-databricks-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-databricks-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-databricks-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-databricks-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-databricks-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-databricks-oauth-aad.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-databricks-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-databricks-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-databricks-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-databricks-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-databricks-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-databricks-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-databricks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-denodo-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-denodo-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-denodo-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-denodo-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-denodo-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-denodo-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-denodo-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-denodo-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-denodo-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-denodo-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-denodo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-dremio-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-dremio-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-dremio-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-dremio-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-dremio-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-dremio-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-dremio-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-dremio-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-dremio-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-dremio-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-dremio.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-external-tables-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-falcon-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-falcon-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-falcon-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-falcon-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-falcon-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-falcon-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-falcon-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-falcon-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-falcon.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-gbq-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-gbq-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-gbq-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-gbq-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-gbq-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-gbq-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-gbq-ingress.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-gbq-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-gbq-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-gbq-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-gbq-prerequisites.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-gbq-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-gbq-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-genericjdbc-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-genericjdbc-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-genericjdbc-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-genericjdbc-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-genericjdbc-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-genericjdbc-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-genericjdbc-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-genericjdbc-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-genericjdbc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-alloydb-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-alloydb-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-alloydb-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-alloydb-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-alloydb-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-alloydb-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-alloydb-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-alloydb-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-alloydb-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-google-cloud-sql-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-hana-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-hana-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-hana-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-hana-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-hana-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-hana-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-hana-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-hana-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-hana-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-hana.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-ipsec-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-looker-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-looker-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-looker-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-looker-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-looker-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-looker-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-looker-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-looker-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-looker.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mode-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mode-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mode-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mode-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mode-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mode-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mode-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mode-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mode.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-presto-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-presto-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-presto-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-presto-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-presto-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-presto-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-presto-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-presto-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-presto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-private-link-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-query-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-redshift-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-redshift-aws-idc-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-redshift-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-redshift-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-redshift-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-redshift-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-redshift-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-redshift-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-redshift-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-redshift-managed-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-redshift-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-redshift-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-redshift-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-redshift-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-redshift-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-singlestore-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-singlestore-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-singlestore-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-singlestore-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-singlestore-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-singlestore-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-singlestore-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-singlestore-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-singlestore.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-csv-upload-config.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-csv-upload.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-okta-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-psc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake-tutorial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-sql-server-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-starburst-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-starburst-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-starburst-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-starburst-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-starburst-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-starburst-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-starburst-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-starburst-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-starburst-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-starburst-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-starburst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-synapse-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-synapse-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-synapse-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-synapse-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-synapse-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-synapse-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-synapse-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-synapse-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-synapse-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-synapse-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-synapse.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-teradata-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-teradata-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-teradata-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-teradata-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-teradata-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-teradata-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-teradata-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-teradata-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-teradata-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-teradata.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-trino-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-trino-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-trino-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-trino-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-trino-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-trino-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-trino-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-trino-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections-trino.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/consumption-pricing-query-based-generate.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/consumption-pricing-query-based-subscription.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/consumption-pricing-query-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/consumption-pricing-storage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/consumption-pricing-time-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/consumption-pricing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/csv-load-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/custom-domains.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/custom-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/custom-sets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/customize-help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-engineer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-load-date-formats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-masking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-modeling-aggreg-additive.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-modeling-attributable-dimension.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-modeling-column-basics.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-modeling-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-modeling-geo-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-modeling-index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-modeling-patterns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-modeling-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-modeling-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-modeling.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-source-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/data-workspace.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/date-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/dbt-integration-metadata-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/dbt-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/deprecation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/developer-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/downloads.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/early-access-enable.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/editions-admin.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/editions-usage-limits.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/faq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/filter-bulk.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/filter-chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/filter-chart.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/filter-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/filter-null.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/fixed.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formula-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formula-answer-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formula-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formulas-aggregation-filtered.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formulas-aggregation-flexible.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formulas-aggregation-group.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formulas-aggregation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formulas-chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formulas-conversion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formulas-cumulative.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formulas-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formulas-keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formulas-logical-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formulas-moving.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formulas-nested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formulas-percent.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formulas-simple-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/gcp.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/geomap-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/geomaps-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/getting-started-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/getting-started-team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/git-version-control.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/glossary.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/group-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/group-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/groups-privileges.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/help-center.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/high-availability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/index_help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/index-statistics-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/indexing-queries-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/it-ops.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/join-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/join-worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-da-DK.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-de-DE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-en-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-es-ES.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-es-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-fi-FI.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-fr-CA.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-fr-FR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-it-IT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-ja-JP.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-ko-KR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-nb-NO.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-nl-NL.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-pt-BR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-pt-PT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-ru-RU.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-sv-SE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-to-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-zh-CN.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords-zh-HANT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/known.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-ai-highlights.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-chart-reset.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-comment.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-download-pdf.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-filters-cross.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-filters-linked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-filters-mandatory.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-filters-selective.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-gating-condition-example.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-hyperlink.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-layout-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-link-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-schedule.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-slideshow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-tabs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-verify.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard-visualization-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/locale.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/mobile-ask-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/mobile-compare-web.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/mobile-deep-linking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/mobile-deploy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/mobile-drill-down.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/mobile-faq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/mobile-features.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/mobile-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/mobile-install.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/mobile-kpi-change-analysis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/mobile-localization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/mobile-note-tiles.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/mobile-push-notifications.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/mobile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/model-data-ui.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/monitor-webhooks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/navigating-thoughtspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/notes-mobile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/object-usage-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/oidc-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/oidc-iamv2.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/okta-iam.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/onboarding-email-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/opensource.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/orgs-administration-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/orgs-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/parameters-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/parameters-use.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/performance-tracking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/personalized-liveboard-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/practice.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/privileges-end-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/public-api-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/push-data-to-external-apps.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/push-data-to-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/query-stats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/query.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/rbac.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/reaggregation-scenarios.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/relationship-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/relationship-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/relationships.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/release-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/rest-api-get-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/results.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/rls-rule-builder-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sage-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sage-enablement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sage-feedback.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sage-search-best-practices.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sage-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/saml-group-mapping.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/saml-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/schedule-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/scheduled-liveboards-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/scheduled-maintenance.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/schema-viewer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/scriptability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-actions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-ai-suggested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-assist-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-assist.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-choose-data-source.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-columns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-conditional-formatting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-data-errors-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-data-refresh-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-download.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-drill-down.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-flags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-growth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-keyword.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-proximity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-spotiq-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-start.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-subquery.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-suggestion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/searches-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/security-data-object.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/security-rls-concept.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/security-rls-implement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/security-rls.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/security-thoughtspot-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/semi-additive-measures.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/semi-additive-modeling.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/share-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/share-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/share-request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/share-revoke-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/share-source-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/share-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/share-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sharing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/show-underlying-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/spotdev.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/spotiq-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/spotiq-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/spotiq-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/spotiq-data-model-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/spotiq-feedback.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/spotiq-forecasting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/spotiq-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/spotiq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/style-customization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/support-contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/support-handbook.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sync-gainsight.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sync-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sync-hubspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sync-ms-excel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sync-ms-teams.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sync-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sync-salesforce.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sync-servicenow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sync-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sync-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sync-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/sync-zoho.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/system-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/system-monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/system-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/tables-join-compatible.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/tables-join.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/thoughtspot-homepage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/thoughtspot-one-disable-discover-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/thoughtspot-one-homepage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/thoughtspot-one-query-intelligence-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/thoughtspot-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/thoughtspot-slides.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/thoughtspot-sync.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/time-series-anomaly.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/tml-alerts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/tml-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/tml-connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/tml-import-export-multiple.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/tml-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/tml-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/tml-sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/tml-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/tml-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/tml-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/tml.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/troubleshooting-blanks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/troubleshooting-browser-cache.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/troubleshooting-connectivity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/troubleshooting-formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/troubleshooting-generate-har-file.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/troubleshooting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/ts-bi-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/ts-cloud-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/ts-cloud-requirements-support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/upgrade.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/use-agreement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/user-account-activation-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/user-adoption.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/user-management-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/user-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/user-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/user-onboarding-experience.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/user-productivity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/user-profile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/user-sign-up.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/views-examples.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/views-searches.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/visualize-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/web-notifications.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-10-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-9-12-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-9-12-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/whats-new-free-trial-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/worksheet-create-setup.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/worksheet-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/worksheet-custom-sort.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/worksheet-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/worksheet-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/worksheet-formula.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/worksheet-inclusion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/worksheet-progressive-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/worksheet-readiness.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/accessibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/accessing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/action-codes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/admin-console-orgs-page.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/admin-console-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/admin-portal-groups-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/admin-portal-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/admin-portal-users-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/admin-portal-users.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/admin-sign-in.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/administration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/advanced-commands.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/aggregation-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/ai-answers-best-practices.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/ai-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/alerts-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/analyst-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/analyst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/answer-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/answer-explorer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/ask-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/audit-logs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/authentication-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/authentication-local.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/authentication.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/automated-answer-creation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/business-continuity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/business-user-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/business-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/case-configuration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/catalog-integration-atlan.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/catalog-integration-collibra.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/catalog-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-area-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-axes-options.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-bar-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-candlestick.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-color-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-column-axis-rename.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-column-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-column-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-data-labels.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-data-markers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-donut.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-funnel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-geo-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-geo-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-geo-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-geo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-gridlines.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-high-cardinality.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-html.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-kpi.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-line-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-line-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-lock-type.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-null-missing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-pareto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-pivot-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-radar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-regression-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-sankey.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-scatter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-settings-advanced.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-table-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-treemap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-waterfall.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-x-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-y-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chart-zoom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/charts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-9-12-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-9-12-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-9-6-0-cl-test.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/coming-soon.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connect-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connection-share.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-adw-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-adw-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-adw-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-adw-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-adw-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-adw-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-adw-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-adw-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-adw-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-adw.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-athena-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-athena-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-athena-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-athena-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-athena-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-athena-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-athena-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-athena-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-athena.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-aurora-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-amazon-rds-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-column-indexing-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-cust-cal-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-cust-cal-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-cust-cal-update.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-cust-cal.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-databricks-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-databricks-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-databricks-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-databricks-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-databricks-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-databricks-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-databricks-oauth-aad.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-databricks-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-databricks-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-databricks-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-databricks-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-databricks-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-databricks-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-databricks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-denodo-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-denodo-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-denodo-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-denodo-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-denodo-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-denodo-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-denodo-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-denodo-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-denodo-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-denodo-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-denodo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-dremio-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-dremio-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-dremio-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-dremio-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-dremio-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-dremio-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-dremio-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-dremio-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-dremio-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-dremio-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-dremio.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-external-tables-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-gbq-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-gbq-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-gbq-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-gbq-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-gbq-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-gbq-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-gbq-ingress.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-gbq-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-gbq-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-gbq-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-gbq-prerequisites.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-gbq-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-gbq-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-genericjdbc-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-genericjdbc-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-genericjdbc-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-genericjdbc-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-genericjdbc-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-genericjdbc-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-genericjdbc-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-genericjdbc-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-genericjdbc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-alloydb-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-alloydb-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-alloydb-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-alloydb-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-alloydb-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-alloydb-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-alloydb-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-alloydb-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-alloydb-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-google-cloud-sql-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-hana-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-hana-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-hana-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-hana-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-hana-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-hana-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-hana-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-hana-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-hana-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-hana.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-ipsec-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-looker-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-looker-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-looker-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-looker-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-looker-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-looker-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-looker-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-looker-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-looker.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mode-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mode-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mode-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mode-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mode-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mode-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mode-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mode-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mode.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-presto-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-presto-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-presto-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-presto-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-presto-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-presto-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-presto-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-presto-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-presto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-private-link-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-query-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-redshift-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-redshift-aws-idc-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-redshift-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-redshift-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-redshift-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-redshift-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-redshift-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-redshift-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-redshift-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-redshift-managed-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-redshift-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-redshift-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-redshift-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-redshift-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-redshift-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-singlestore-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-singlestore-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-singlestore-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-singlestore-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-singlestore-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-singlestore-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-singlestore-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-singlestore-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-singlestore.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-csv-upload-config.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-csv-upload.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-okta-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-psc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake-tutorial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-sql-server-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-starburst-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-starburst-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-starburst-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-starburst-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-starburst-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-starburst-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-starburst-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-starburst-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-starburst-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-starburst-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-starburst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-synapse-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-synapse-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-synapse-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-synapse-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-synapse-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-synapse-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-synapse-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-synapse-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-synapse-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-synapse-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-synapse.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-teradata-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-teradata-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-teradata-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-teradata-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-teradata-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-teradata-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-teradata-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-teradata-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-teradata-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-teradata.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-trino-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-trino-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-trino-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-trino-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-trino-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-trino-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-trino-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-trino-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections-trino.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/consumption-pricing-query-based-generate.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/consumption-pricing-query-based-subscription.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/consumption-pricing-query-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/consumption-pricing-storage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/consumption-pricing-time-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/consumption-pricing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/csv-load-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/custom-domains.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/custom-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/custom-sets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/customize-help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-engineer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-load-date-formats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-masking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-modeling-aggreg-additive.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-modeling-attributable-dimension.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-modeling-column-basics.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-modeling-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-modeling-geo-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-modeling-index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-modeling-patterns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-modeling-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-modeling-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-modeling.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-source-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/data-workspace.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/date-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/dbt-integration-metadata-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/dbt-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/deprecation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/developer-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/downloads.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/early-access-enable.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/editions-admin.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/editions-usage-limits.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/faq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/filter-bulk.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/filter-chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/filter-chart.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/filter-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/filter-null.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/fixed.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formula-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formula-answer-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formula-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formulas-aggregation-filtered.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formulas-aggregation-flexible.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formulas-aggregation-group.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formulas-aggregation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formulas-chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formulas-conversion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formulas-cumulative.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formulas-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formulas-keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formulas-logical-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formulas-moving.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formulas-nested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formulas-percent.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formulas-simple-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/gcp.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/geomap-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/geomaps-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/getting-started-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/getting-started-team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/git-version-control.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/glossary.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/group-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/group-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/groups-privileges.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/help-center.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/high-availability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/index_help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/index-statistics-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/indexing-queries-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/it-ops.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/join-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/join-worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-da-DK.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-de-DE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-en-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-es-ES.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-es-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-fi-FI.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-fr-CA.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-fr-FR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-it-IT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-ja-JP.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-nb-NO.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-nl-NL.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-pt-BR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-pt-PT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-ru-RU.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-sv-SE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-to-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-zh-CN.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords-zh-HANT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/known.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-ai-highlights.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-chart-reset.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-comment.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-download-pdf.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-filters-cross.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-filters-linked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-filters-mandatory.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-filters-selective.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-gating-condition-example.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-hyperlink.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-layout-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-link-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-schedule.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-slideshow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-tabs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-verify.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard-visualization-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/locale.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/mobile-ask-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/mobile-compare-web.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/mobile-deep-linking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/mobile-deploy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/mobile-drill-down.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/mobile-faq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/mobile-features.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/mobile-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/mobile-install.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/mobile-kpi-change-analysis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/mobile-localization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/mobile-note-tiles.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/mobile-push-notifications.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/mobile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/model-data-ui.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/monitor-webhooks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/navigating-thoughtspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/notes-mobile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/object-usage-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/oidc-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/oidc-iamv2.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/okta-iam.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/onboarding-email-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/opensource.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/orgs-administration-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/orgs-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/parameters-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/parameters-use.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/performance-tracking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/personalized-liveboard-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/practice.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/privileges-end-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/public-api-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/push-data-to-external-apps.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/push-data-to-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/query-stats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/query.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/rbac.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/reaggregation-scenarios.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/relationship-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/relationship-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/relationships.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/release-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/rest-api-get-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/results.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/rls-rule-builder-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sage-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sage-enablement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sage-feedback.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sage-search-best-practices.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sage-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/saml-group-mapping.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/saml-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/schedule-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/scheduled-liveboards-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/scheduled-maintenance.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/schema-viewer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/scriptability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-actions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-ai-suggested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-assist-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-assist.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-choose-data-source.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-columns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-conditional-formatting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-data-errors-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-data-refresh-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-download.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-drill-down.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-flags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-growth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-keyword.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-proximity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-spotiq-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-start.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-subquery.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-suggestion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/searches-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/security-data-object.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/security-rls-concept.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/security-rls-implement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/security-rls.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/security-thoughtspot-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/semi-additive-measures.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/semi-additive-modeling.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/share-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/share-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/share-request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/share-revoke-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/share-source-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/share-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/share-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sharing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/show-underlying-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/spotdev.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/spotiq-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/spotiq-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/spotiq-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/spotiq-data-model-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/spotiq-feedback.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/spotiq-forecasting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/spotiq-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/spotiq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/style-customization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/support-contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/support-handbook.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sync-gainsight.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sync-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sync-hubspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sync-ms-excel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sync-ms-teams.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sync-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sync-salesforce.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sync-servicenow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sync-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sync-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sync-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/sync-zoho.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/system-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/system-monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/system-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/tables-join.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/thoughtspot-one-disable-discover-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/thoughtspot-one-homepage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/thoughtspot-one-query-intelligence-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/thoughtspot-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/thoughtspot-slides.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/thoughtspot-sync.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/time-series-anomaly.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/tml-alerts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/tml-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/tml-connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/tml-import-export-multiple.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/tml-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/tml-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/tml-sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/tml-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/tml-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/tml-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/tml.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/troubleshooting-blanks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/troubleshooting-browser-cache.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/troubleshooting-connectivity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/troubleshooting-formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/troubleshooting-generate-har-file.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/troubleshooting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/ts-bi-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/ts-cloud-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/ts-cloud-requirements-support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/upgrade.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/use-agreement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/user-account-activation-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/user-adoption.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/user-management-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/user-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/user-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/user-onboarding-experience.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/user-productivity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/user-profile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/user-sign-up.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/views-examples.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/views-searches.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/visualize-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/web-notifications.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-9-12-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-9-12-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/whats-new-free-trial-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/worksheet-create-setup.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/worksheet-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/worksheet-custom-sort.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/worksheet-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/worksheet-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/worksheet-formula.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/worksheet-inclusion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/worksheet-progressive-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/worksheet-readiness.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/accessibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/accessing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/action-codes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/admin-console-orgs-page.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/admin-console-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/admin-portal-groups-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/admin-portal-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/admin-portal-users-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/admin-portal-users.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/admin-sign-in.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/administration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/advanced-commands.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/aggregation-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/ai-answers-best-practices.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/ai-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/alerts-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/analyst-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/analyst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/answer-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/answer-explorer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/audit-logs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/auth-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/authentication-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/authentication-local.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/authentication.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/automated-answer-creation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/business-continuity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/business-user-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/business-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/case-configuration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/catalog-integration-atlan.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/catalog-integration-collibra.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/catalog-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-area-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-axes-options.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-bar-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-candlestick.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-color-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-column-axis-rename.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-column-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-column-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-data-labels.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-data-markers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-donut.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-funnel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-geo-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-geo-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-geo-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-geo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-gridlines.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-high-cardinality.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-html.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-kpi.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-line-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-line-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-lock-type.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-null-missing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-pareto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-pivot-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-radar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-regression-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-sankey.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-scatter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-settings-advanced.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-table-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-tooltip-customize.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-treemap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-waterfall.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-x-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-y-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chart-zoom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/charts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon-9-12-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/coming-soon.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connect-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connection-share.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-adw-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-adw-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-adw-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-adw-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-adw-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-adw-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-adw-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-adw-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-adw-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-adw.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-athena-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-athena-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-athena-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-athena-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-athena-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-athena-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-athena-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-athena-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-athena.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-aurora-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-amazon-rds-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-column-indexing-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-cust-cal-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-cust-cal-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-cust-cal-update.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-cust-cal.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-databricks-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-databricks-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-databricks-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-databricks-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-databricks-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-databricks-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-databricks-oauth-aad.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-databricks-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-databricks-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-databricks-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-databricks-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-databricks-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-databricks-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-databricks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-denodo-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-denodo-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-denodo-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-denodo-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-denodo-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-denodo-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-denodo-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-denodo-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-denodo-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-denodo-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-denodo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-dremio-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-dremio-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-dremio-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-dremio-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-dremio-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-dremio-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-dremio-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-dremio-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-dremio-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-dremio-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-dremio.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-external-tables-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-gbq-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-gbq-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-gbq-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-gbq-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-gbq-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-gbq-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-gbq-ingress.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-gbq-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-gbq-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-gbq-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-gbq-prerequisites.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-gbq-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-gbq-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-genericjdbc-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-genericjdbc-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-genericjdbc-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-genericjdbc-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-genericjdbc-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-genericjdbc-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-genericjdbc-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-genericjdbc-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-genericjdbc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-alloydb-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-alloydb-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-alloydb-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-alloydb-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-alloydb-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-alloydb-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-alloydb-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-alloydb-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-alloydb-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-google-cloud-sql-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-hana-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-hana-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-hana-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-hana-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-hana-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-hana-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-hana-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-hana-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-hana-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-hana.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-ipsec-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-looker-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-looker-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-looker-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-looker-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-looker-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-looker-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-looker-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-looker-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-looker.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mode-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mode-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mode-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mode-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mode-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mode-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mode-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mode-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mode.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-presto-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-presto-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-presto-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-presto-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-presto-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-presto-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-presto-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-presto-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-presto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-private-link-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-query-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-redshift-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-redshift-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-redshift-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-redshift-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-redshift-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-redshift-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-redshift-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-redshift-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-redshift-managed-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-redshift-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-redshift-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-redshift-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-redshift-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-redshift-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-singlestore-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-singlestore-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-singlestore-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-singlestore-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-singlestore-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-singlestore-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-singlestore-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-singlestore-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-singlestore.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-csv-upload-config.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-csv-upload.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-okta-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-psc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake-tutorial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-sql-server-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-starburst-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-starburst-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-starburst-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-starburst-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-starburst-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-starburst-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-starburst-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-starburst-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-starburst-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-starburst-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-starburst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-synapse-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-synapse-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-synapse-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-synapse-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-synapse-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-synapse-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-synapse-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-synapse-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-synapse-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-synapse-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-synapse.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-teradata-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-teradata-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-teradata-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-teradata-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-teradata-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-teradata-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-teradata-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-teradata-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-teradata-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-teradata.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-trino-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-trino-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-trino-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-trino-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-trino-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-trino-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-trino-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-trino-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections-trino.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/consumption-pricing-query-based-generate.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/consumption-pricing-query-based-subscription.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/consumption-pricing-query-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/consumption-pricing-storage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/consumption-pricing-time-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/consumption-pricing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/csv-load-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/custom-actions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/custom-domains.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/custom-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/custom-sets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/customization-rebranding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/customize-help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-engineer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-load-date-formats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-masking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-modeling-aggreg-additive.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-modeling-attributable-dimension.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-modeling-column-basics.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-modeling-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-modeling-geo-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-modeling-index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-modeling-patterns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-modeling-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-modeling-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-modeling.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-source-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/data-workspace.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/date-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/dbt-integration-metadata-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/dbt-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/deprecation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/developer-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/downloads.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/early-access-enable.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/editions-admin.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/editions-usage-limits.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/faq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/filter-bulk.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/filter-chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/filter-chart.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/filter-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/filter-null.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/fixed.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formula-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formula-answer-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formula-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formulas-aggregation-filtered.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formulas-aggregation-flexible.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formulas-aggregation-group.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formulas-aggregation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formulas-chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formulas-conversion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formulas-cumulative.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formulas-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formulas-keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formulas-logical-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formulas-moving.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formulas-nested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formulas-percent.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formulas-simple-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/gcp.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/geomap-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/geomaps-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/getting-started-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/getting-started-team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/glossary.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/group-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/group-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/groups-privileges.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/help-center.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/high-availability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/index_help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/index-statistics-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/indexing-queries-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/integration-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/intro-embed.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/it-ops.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/join-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/join-worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-da-DK.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-de-DE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-en-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-es-ES.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-es-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-fi-FI.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-fr-CA.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-fr-FR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-it-IT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-ja-JP.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-nb-NO.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-nl-NL.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-pt-BR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-pt-PT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-ru-RU.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-sv-SE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-to-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-zh-CN.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords-zh-HANT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/known.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-ai-highlights.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-chart-reset.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-comment.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-download-pdf.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-filters-cross.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-filters-linked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-filters-mandatory.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-filters-selective.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-gating-condition-example.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-hyperlink.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-layout-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-link-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-schedule.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-slideshow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-tabs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-verify.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard-visualization-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/locale.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/mobile-compare-web.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/mobile-deep-linking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/mobile-deploy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/mobile-drill-down.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/mobile-faq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/mobile-features.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/mobile-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/mobile-install.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/mobile-kpi-change-analysis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/mobile-localization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/mobile-push-notifications.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/mobile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/model-data-ui.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/monitor-webhooks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/navigating-thoughtspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/notes-mobile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/object-usage-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/oidc-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/oidc-iamv2.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/okta-iam.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/onboarding-email-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/opensource.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/orgs-administration-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/orgs-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/parameters-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/parameters-use.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/performance-tracking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/personalized-liveboard-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/practice.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/privileges-end-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/public-api-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/push-data-to-external-apps.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/push-data-to-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/query-stats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/query.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/rbac.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/reaggregation-scenarios.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/relationship-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/relationship-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/relationships.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/release-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/rest-api-get-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/rest-api.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/results.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/rls-rule-builder-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/runtime-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/sage-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/saml-group-mapping.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/saml-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/schedule-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/scheduled-liveboards-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/scheduled-maintenance.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/schema-viewer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/scriptability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-actions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-ai-suggested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-assist-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-assist.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-choose-data-source.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-columns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-conditional-formatting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-data-refresh-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-download.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-drill-down.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-flags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-growth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-keyword.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-proximity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-spotiq-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-start.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-subquery.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-suggestion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/searches-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/security-data-object.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/security-rls-concept.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/security-rls-implement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/security-rls.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/security-thoughtspot-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/share-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/share-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/share-request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/share-revoke-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/share-source-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/share-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/share-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/sharing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/show-underlying-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-databricks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-dei.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-deploy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-facebook.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-google-ad-analysis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-google-analytics.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-hubspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-jira-issue.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-jira-sprint.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-linkedin-ads.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-procurement-vulnerability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-salesforce.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-servicenow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-snowflake-query.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotapps.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotdev-portal.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotdev.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotiq-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotiq-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotiq-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotiq-data-model-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotiq-feedback.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotiq-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/spotiq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/style-customization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/support-contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/support-handbook.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/sync-gainsight.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/sync-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/sync-hubspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/sync-ms-teams.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/sync-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/sync-salesforce.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/sync-servicenow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/sync-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/sync-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/sync-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/sync-zoho.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/system-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/system-monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/system-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/tables-join.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/thoughtspot-one-disable-discover-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/thoughtspot-one-homepage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/thoughtspot-one-query-intelligence-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/thoughtspot-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/thoughtspot-slides.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/thoughtspot-sync.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/time-series-anomaly.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/tml-alerts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/tml-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/tml-import-export-multiple.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/tml-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/tml-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/tml-sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/tml-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/tml-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/tml-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/tml.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/troubleshooting-blanks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/troubleshooting-browser-cache.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/troubleshooting-connectivity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/troubleshooting-formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/troubleshooting-generate-har-file.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/troubleshooting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/ts-bi-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/ts-cloud-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/ts-cloud-requirements-support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/upgrade.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/use-agreement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/user-account-activation-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/user-adoption.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/user-management-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/user-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/user-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/user-onboarding-experience.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/user-profile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/user-sign-up.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/views-examples.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/views-searches.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/visual-embed-sdk.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/visualize-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/web-notifications.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/whats-new-free-trial-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/whats-new-free-trial-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/whats-new-free-trial-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/whats-new-free-trial-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/whats-new-free-trial-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/whats-new-free-trial-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/whats-new-free-trial-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/whats-new-free-trial-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/whats-new-free-trial-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/whats-new-free-trial-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/whats-new-free-trial-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/whats-new-free-trial-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/whats-new-free-trial-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/whats-new-free-trial-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/whats-new-free-trial-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/whats-new-free-trial-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/worksheet-create-setup.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/worksheet-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/worksheet-custom-sort.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/worksheet-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/worksheet-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/worksheet-formula.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/worksheet-inclusion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/worksheet-progressive-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/worksheet-readiness.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/accessibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/accessing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/action-codes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/admin-console-orgs-page.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/admin-console-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/admin-portal-groups-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/admin-portal-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/admin-portal-users-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/admin-portal-users.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/admin-sign-in.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/administration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/aggregation-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/ai-answers-best-practices.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/ai-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/alerts-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/analyst-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/analyst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/answer-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/answer-explorer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/audit-logs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/auth-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/authentication-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/authentication-local.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/authentication.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/automated-answer-creation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/business-continuity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/business-user-onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/business-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/case-configuration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/catalog-integration-atlan.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/catalog-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-area-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-axes-options.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-bar-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-candlestick.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-color-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-column-axis-rename.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-column-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-column-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-data-labels.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-data-markers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-donut.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-funnel.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-geo-area.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-geo-bubble.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-geo-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-geo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-gridlines.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-heatmap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-high-cardinality.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-html.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-kpi.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-line-column-stacked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-line-column.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-lock-type.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-null-missing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-pareto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-pivot-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-radar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-regression-line.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-sankey.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-scatter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-settings-advanced.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-table-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-tooltip-customize.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-treemap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-waterfall.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-x-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-y-axis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chart-zoom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/charts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/coming-soon-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/coming-soon-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/coming-soon-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/coming-soon-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/coming-soon-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/coming-soon-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/coming-soon-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/coming-soon-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/coming-soon-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/coming-soon-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/coming-soon-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/coming-soon-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/coming-soon-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/coming-soon-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/coming-soon-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/coming-soon-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/coming-soon.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connect-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connection-share.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-adw-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-adw-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-adw-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-adw-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-adw-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-adw-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-adw-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-adw-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-adw-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-adw.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-athena-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-athena-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-athena-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-athena-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-athena-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-athena-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-athena-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-athena-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-athena.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-aurora-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-mysql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-amazon-rds-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-column-indexing-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-cust-cal-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-cust-cal-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-cust-cal-update.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-cust-cal.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-databricks-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-databricks-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-databricks-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-databricks-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-databricks-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-databricks-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-databricks-oauth-aad.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-databricks-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-databricks-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-databricks-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-databricks-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-databricks-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-databricks-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-databricks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-denodo-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-denodo-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-denodo-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-denodo-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-denodo-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-denodo-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-denodo-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-denodo-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-denodo-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-denodo-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-denodo.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-dremio-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-dremio-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-dremio-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-dremio-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-dremio-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-dremio-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-dremio-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-dremio-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-dremio-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-dremio-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-dremio.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-external-tables-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-gbq-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-gbq-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-gbq-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-gbq-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-gbq-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-gbq-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-gbq-ingress.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-gbq-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-gbq-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-gbq-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-gbq-prerequisites.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-gbq-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-gbq-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-genericjdbc-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-genericjdbc-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-genericjdbc-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-genericjdbc-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-genericjdbc-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-genericjdbc-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-genericjdbc-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-genericjdbc-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-genericjdbc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-alloydb-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-alloydb-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-alloydb-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-alloydb-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-alloydb-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-alloydb-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-alloydb-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-alloydb-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-alloydb-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-google-cloud-sql-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-hana-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-hana-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-hana-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-hana-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-hana-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-hana-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-hana-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-hana-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-hana-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-hana.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-ipsec-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-mysql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-mysql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-mysql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-mysql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-mysql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-mysql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-mysql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-mysql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-mysql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-postgresql-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-postgresql-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-postgresql-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-postgresql-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-postgresql-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-postgresql-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-postgresql-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-postgresql-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-postgresql-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-postgresql.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-presto-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-presto-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-presto-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-presto-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-presto-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-presto-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-presto-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-presto-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-presto.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-private-link-intro.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-query-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-redshift-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-redshift-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-redshift-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-redshift-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-redshift-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-redshift-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-redshift-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-redshift-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-redshift-managed-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-redshift-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-redshift-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-redshift-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-redshift-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-redshift-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-singlestore-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-singlestore-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-singlestore-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-singlestore-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-singlestore-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-singlestore-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-singlestore-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-singlestore-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-singlestore.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-azure-ad-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-csv-upload-config.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-csv-upload.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-external-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-okta-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-partner.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-psc.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake-tutorial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-sql-server-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-sql-server-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-sql-server-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-sql-server-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-sql-server-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-sql-server-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-sql-server-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-sql-server-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-sql-server-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-sql-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-starburst-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-starburst-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-starburst-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-starburst-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-starburst-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-starburst-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-starburst-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-starburst-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-starburst-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-starburst-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-starburst.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-synapse-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-synapse-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-synapse-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-synapse-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-synapse-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-synapse-oauth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-synapse-open-vpn.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-synapse-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-synapse-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-synapse-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-synapse.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-teradata-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-teradata-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-teradata-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-teradata-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-teradata-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-teradata-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-teradata-private-link.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-teradata-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-teradata-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-teradata.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-trino-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-trino-delete-table-dependencies.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-trino-delete-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-trino-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-trino-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-trino-passthrough.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-trino-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-trino-remap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections-trino.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/connections.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/consumption-pricing-query-based-generate.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/consumption-pricing-query-based-subscription.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/consumption-pricing-query-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/consumption-pricing-storage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/consumption-pricing-time-based.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/consumption-pricing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/csv-load-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/custom-actions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/custom-domains.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/custom-groups.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/customization-rebranding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/customize-help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/data-engineer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/data-load-date-formats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/data-modeling-aggreg-additive.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/data-modeling-attributable-dimension.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/data-modeling-column-basics.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/data-modeling-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/data-modeling-geo-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/data-modeling-index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/data-modeling-patterns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/data-modeling-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/data-modeling-visibility.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/data-modeling.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/data-security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/data-source-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/data-types.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/data-workspace.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/date-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/dbt-integration-metadata-tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/dbt-integration.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/deprecation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/developer-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/downloads.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/early-access-enable.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/editions-admin.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/editions-usage-limits.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/faq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/filter-bulk.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/filter-chart-table.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/filter-chart.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/filter-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/filter-null.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/fixed.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formula-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formula-answer-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formula-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formulas-aggregation-filtered.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formulas-aggregation-flexible.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formulas-aggregation-group.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formulas-aggregation.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formulas-chasm-trap.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formulas-conversion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formulas-cumulative.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formulas-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formulas-keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formulas-logical-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formulas-moving.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formulas-nested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formulas-percent.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formulas-simple-operations.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/gcp.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/geomap-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/geomaps-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/getting-started-free-trial.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/getting-started-team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/glossary.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/group-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/group-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/groups-privileges.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/help-center.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/high-availability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/index_help.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/index-statistics-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/index.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/indexing-queries-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/integration-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/intro-embed.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/it-ops.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/join-add.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/join-worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-da-DK.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-de-DE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-en-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-es-ES.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-es-US.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-fi-FI.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-fr-CA.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-fr-FR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-it-IT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-ja-JP.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-nb-NO.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-nl-NL.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-pt-BR.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-pt-PT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-ru-RU.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-sv-SE.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-to-date.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-zh-CN.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords-zh-HANT.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/keywords.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/known.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-ai-highlights.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-chart-reset.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-comment.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-download-pdf.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-experience-new.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-filters-cross.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-filters-linked.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-filters-mandatory.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-filters-selective.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-gating-condition-example.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-granular-permission.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-hyperlink.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-layout-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-link-copy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-schedule.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-slideshow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-tabs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-verify.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard-visualization-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/locale.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/mobile-compare-web.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/mobile-deep-linking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/mobile-deploy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/mobile-drill-down.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/mobile-faq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/mobile-features.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/mobile-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/mobile-install.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/mobile-kpi-change-analysis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/mobile-localization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/mobile-push-notifications.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/mobile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/model-data-ui.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/models.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/monitor-webhooks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/navigating-thoughtspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/notes-mobile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/notes.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/object-usage-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/oidc-configure.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/oidc-iamv2.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/okta-iam.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/onboarding-email-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/onboarding.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/opensource.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/orgs-administration-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/orgs-overview.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/parameters-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/parameters-use.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/performance-tracking.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/personalized-liveboard-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/practice.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/privileges-end-user.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/public-api-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/push-data-to-external-apps.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/push-data-to-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/query-stats.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/query.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/rbac.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/reaggregation-scenarios.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/relationship-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/relationship-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/relationships.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/release-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/rest-api-get-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/rest-api.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/results.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/rls-rule-builder-reference.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/runtime-filters.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/sage-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/saml-group-mapping.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/saml-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/schedule-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/scheduled-liveboards-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/scheduled-maintenance.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/schema-viewer.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/scriptability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-actions.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-ai-suggested.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-assist-coach.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-assist.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-bar.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-choose-data-source.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-columns.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-conditional-formatting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-data-refresh-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-download.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-drill-down.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-flags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-growth.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-keyword.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-proximity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-sage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-spotiq-settings.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-start.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-subquery.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-suggestion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search-time.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/searches-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/security-data-object.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/security-rls-concept.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/security-rls-implement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/security-rls.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/security-thoughtspot-lifecycle.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/security.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/share-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/share-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/share-request-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/share-revoke-access.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/share-source-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/share-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/share-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/sharing.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/show-underlying-data.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-databricks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-dei.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-deploy.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-facebook.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-google-ad-analysis.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-google-analytics.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-hubspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-jira-issue.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-jira-sprint.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-linkedin-ads.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-procurement-vulnerability.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-salesforce.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-servicenow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-snowflake-query.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotapps.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotdev-portal.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotdev.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotiq-best.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotiq-change.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotiq-custom.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotiq-data-model-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotiq-feedback.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotiq-preferences.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/spotiq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/style-customization.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/support-contact.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/support-handbook.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/sync-gainsight.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/sync-gbq.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/sync-hubspot.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/sync-ms-teams.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/sync-redshift.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/sync-salesforce.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/sync-servicenow.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/sync-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/sync-slack.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/sync-snowflake.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/sync-zoho.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/system-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/system-monitor.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/system-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/tables-join.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/tags.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/team-edition.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/thoughtspot-one-disable-discover-worksheet.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/thoughtspot-one-homepage.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/thoughtspot-one-query-intelligence-liveboard.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/thoughtspot-sheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/thoughtspot-slides.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/thoughtspot-sync.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/time-series-anomaly.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/tml-alerts.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/tml-answers.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/tml-import-export-multiple.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/tml-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/tml-liveboards.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/tml-sql-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/tml-tables.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/tml-views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/tml-worksheets.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/tml.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/troubleshooting-blanks.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/troubleshooting-browser-cache.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/troubleshooting-connectivity.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/troubleshooting-formulas.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/troubleshooting-generate-har-file.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/troubleshooting.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/ts-bi-server.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/ts-cloud-getting-started.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/ts-cloud-requirements-support.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/upgrade.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/use-agreement.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/user-account-activation-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/user-adoption.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/user-management-okta.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/user-management-orgs.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/user-management.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/user-onboarding-experience.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/user-profile.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/user-sign-up.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/views-examples.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/views-searches.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/views.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/visual-embed-sdk.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/visualize-search.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/web-notifications.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/whats-new-free-trial-8-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/whats-new-free-trial-8-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/whats-new-free-trial-8-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/whats-new-free-trial-8-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/whats-new-free-trial-8-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/whats-new-free-trial-8-9-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/whats-new-free-trial-9-0-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/whats-new-free-trial-9-10-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/whats-new-free-trial-9-10-5-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/whats-new-free-trial-9-2-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/whats-new-free-trial-9-3-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/whats-new-free-trial-9-4-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/whats-new-free-trial-9-5-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/whats-new-free-trial-9-6-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/whats-new-free-trial-9-7-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/whats-new-free-trial-9-8-0-cl.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/worksheet-create-setup.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/worksheet-create.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/worksheet-custom-sort.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/worksheet-delete.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/worksheet-edit.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/worksheet-filter.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/worksheet-formula.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/worksheet-inclusion.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/worksheet-progressive-joins.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/worksheet-readiness.html + 2024-11-21T01:56:43.523Z + + + https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/worksheets.html + 2024-11-21T01:56:43.523Z + + \ No newline at end of file diff --git a/home/modules/ROOT/attachments/sitemap-help-software.xml b/home/modules/ROOT/attachments/sitemap-help-software.xml new file mode 100644 index 00000000..3f802c91 --- /dev/null +++ b/home/modules/ROOT/attachments/sitemap-help-software.xml @@ -0,0 +1,21750 @@ + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/accessibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/accessing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/action-codes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/active-directory-federated-services.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/active-directory.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-console-orgs-page.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-console-orgs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-authentication-active-directory.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-authentication-local.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-authentication-saml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-customize-help.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-groups-orgs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-nas-mount-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-onboarding-email-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-performance-tracking.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-reverse-ssh-tunnel.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-search-spotiq-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-smtp-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-snapshot-manage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-ssl-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-style-customization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-system-alerts-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-system-cluster-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-system-information-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-table-status-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-user-adoption-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-users-orgs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal-users.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-portal.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/admin-sign-in.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/administration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/aggregation-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/alerts-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/analyst-onboarding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/analyst.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/answer-experience-new.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/answer-explorer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/audit-logs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/authentication-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/authentication-local.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/authentication.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/automated-answer-creation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/aws-backup-restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/aws-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/aws-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/aws-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/aws-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/aws-prepare-vms.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/azure-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/azure-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/azure-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/azure-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/backup-configure-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/backup-manual.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/backup-modes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/backup-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/backup-strategy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/business-user.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/cable-networking.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/case-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/catalog-integration-atlan.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-area-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-area.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-axes-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-bar-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-bar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-bubble.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-candlestick.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-color-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-column-axis-rename.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-column-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-column-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-column-visibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-column.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-data-labels.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-data-markers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-funnel.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-geo-area.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-geo-bubble.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-geo-heatmap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-geo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-gridlines.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-heatmap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-high-cardinality.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-html.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-kpi-aggregated.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-kpi.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-line-column-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-line-column.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-line.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-lock-type.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-pareto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-pie.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-pivot-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-radar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-regression-line.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-sankey.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-scatter.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-table-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-treemap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-types.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-waterfall.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-x-axis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-y-axis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chart-zoom.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/charts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/chasm-trap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/cluster-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/cluster-manager.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/cluster-replacement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/components.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connection-share.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-adw-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-adw-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-adw-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-adw-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-adw-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-adw-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-adw-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-adw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-athena-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-athena-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-athena-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-athena-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-athena-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-athena-passthrough.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-athena-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-athena-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-athena.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-aurora-mysql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-aurora-mysql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-aurora-mysql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-aurora-mysql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-aurora-mysql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-aurora-mysql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-aurora-mysql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-aurora-mysql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-aurora-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-aurora-postgresql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-aurora-postgresql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-aurora-postgresql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-aurora-postgresql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-aurora-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-aurora-postgresql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-aurora-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-rds-mysql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-rds-mysql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-rds-mysql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-rds-mysql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-rds-mysql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-rds-mysql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-rds-mysql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-rds-mysql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-rds-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-rds-postgresql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-rds-postgresql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-rds-postgresql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-rds-postgresql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-rds-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-rds-postgresql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-amazon-rds-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-aws-secrets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-capacity-planning.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-cust-cal-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-cust-cal-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-cust-cal-update.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-cust-cal.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-databricks-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-databricks-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-databricks-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-databricks-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-databricks-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-databricks-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-databricks-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-databricks-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-databricks-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-databricks.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-denodo-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-denodo-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-denodo-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-denodo-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-denodo-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-denodo-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-denodo-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-denodo-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-denodo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-dremio-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-dremio-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-dremio-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-dremio-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-dremio-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-dremio-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-dremio-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-dremio-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-dremio.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-external-tables-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-gbq-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-gbq-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-gbq-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-gbq-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-gbq-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-gbq-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-gbq-ingress.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-gbq-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-gbq-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-gbq-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-gbq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-genericjdbc-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-genericjdbc-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-genericjdbc-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-genericjdbc-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-genericjdbc-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-genericjdbc-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-genericjdbc-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-genericjdbc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-alloydb-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-alloydb-postgresql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-alloydb-postgresql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-alloydb-postgresql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-alloydb-postgresql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-alloydb-postgresql-passthrough.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-alloydb-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-alloydb-postgresql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-alloydb-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-postgresql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-postgresql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-postgresql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-postgresql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-postgresql-passthrough.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-postgresql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-sql-server-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-sql-server-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-sql-server-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-sql-server-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-sql-server-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-sql-server-passthrough.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-sql-server-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-sql-server-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-google-cloud-sql-sql-server.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-hana-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-hana-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-hana-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-hana-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-hana-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-hana-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-hana-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-hana.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-mysql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-mysql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-mysql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-mysql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-mysql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-mysql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-mysql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-mysql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-passthrough.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-postgresql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-postgresql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-postgresql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-postgresql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-postgresql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-presto-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-presto-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-presto-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-presto-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-presto-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-presto-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-presto-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-presto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-query-tags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-redshift-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-redshift-azure-ad-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-redshift-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-redshift-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-redshift-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-redshift-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-redshift-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-redshift-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-redshift-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-redshift-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-redshift.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-singlestore-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-singlestore-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-singlestore-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-singlestore-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-singlestore-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-singlestore-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-singlestore-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-singlestore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-snowflake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-snowflake-azure-ad-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-snowflake-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-snowflake-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-snowflake-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-snowflake-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-snowflake-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-snowflake-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-snowflake-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-snowflake-okta-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-snowflake-partner.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-snowflake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-snowflake-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-snowflake-tutorial.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-snowflake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-sql-server-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-sql-server-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-sql-server-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-sql-server-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-sql-server-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-sql-server-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-sql-server-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-sql-server.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-starburst-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-starburst-azure-ad-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-starburst-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-starburst-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-starburst-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-starburst-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-starburst-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-starburst-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-starburst-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-starburst.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-synapse-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-synapse-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-synapse-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-synapse-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-synapse-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-synapse-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-synapse-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-synapse-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-synapse.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-teradata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-teradata-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-teradata-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-teradata-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-teradata-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-teradata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-teradata-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-teradata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-trino-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-trino-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-trino-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-trino-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-trino-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-trino-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-trino-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections-trino.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/connections.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/constraints.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/consumption-pricing-query-based-generate.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/consumption-pricing-query-based-subscription.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/consumption-pricing-query-based.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/consumption-pricing-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/consumption-pricing-time-based.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/consumption-pricing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/custom-calendar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/custom-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customer-os-add-node.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customer-os-ansible-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customer-os-artifacts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customer-os-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customer-os-offline-script.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customer-os-packages.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customer-os-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customer-os-untar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customer-os-upgrade.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customer-os.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customize-background.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customize-color-palettes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customize-fonts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customize-footer-text.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customize-help.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customize-logo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/customize-style.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-api-calling.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-api-get.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-api-pagination.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-api-search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-caching.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-compression.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-engineer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-import-ui.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-integration-troubleshooting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-load-date-formats.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-load.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-modeling-aggreg-additive.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-modeling-attributable-dimension.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-modeling-column-basics.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-modeling-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-modeling-geo-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-modeling-index.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-modeling-patterns.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-modeling-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-modeling-synonym.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-modeling-visibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-modeling.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-profile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-source-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-type-conversion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-types.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data-workspace.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-administration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-amazon-aurora-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-amazon-aurora-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-amazon-aurora-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-amazon-aurora.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-amazon-redshift-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-amazon-redshift-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-amazon-redshift-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-amazon-redshift.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-amazon-s3-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-amazon-s3-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-amazon-s3-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-amazon-s3.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-applications.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-azure-blob-storage-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-azure-blob-storage-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-azure-blob-storage-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-azure-blob-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-azure-synapse-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-azure-synapse-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-azure-synapse-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-azure-synapse.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-cassandra-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-cassandra-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-cassandra-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-cassandra.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-databases.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-databricks-delta-lake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-databricks-delta-lake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-databricks-delta-lake-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-databricks-delta-lake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-denodo-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-denodo-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-denodo-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-denodo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-dremio-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-dremio-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-dremio-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-dremio.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-exadata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-exadata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-exadata-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-exadata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-files-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-files-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-files-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-files.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-filesystems.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-google-bigquery-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-google-bigquery-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-google-bigquery-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-google-bigquery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-google-cloud-storage-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-google-cloud-storage-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-google-cloud-storage-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-google-cloud-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-google-sheets-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-google-sheets-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-google-sheets-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-google-sheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-greenplum-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-greenplum-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-greenplum-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-greenplum-utilities.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-greenplum.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-hdfs-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-hdfs-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-hdfs-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-hdfs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-hive-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-hive-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-hive-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-hive.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-home.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-ibm-db2-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-ibm-db2-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-ibm-db2-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-ibm-db2.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-impala-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-impala-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-impala-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-impala.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-jdbc-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-jdbc-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-jdbc-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-jdbc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-key-features.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-mail-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-mariadb-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-mariadb-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-mariadb-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-mariadb.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-memsql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-memsql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-memsql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-memsql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-mongodb-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-mongodb-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-mongodb-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-mongodb.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-mysql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-mysql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-mysql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-mysql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-netezza-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-netezza-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-netezza-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-netezza.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-oracle-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-oracle-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-oracle-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-oracle.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-others.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-postgresql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-presto-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-presto-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-presto-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-presto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-requirements-guidelines.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-rest-api-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-rest-api-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-rest-api-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-rest-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-salesforce-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-salesforce-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-salesforce-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-salesforce.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sap-adaptive-server-enterprise-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sap-adaptive-server-enterprise-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sap-adaptive-server-enterprise-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sap-adaptive-server-enterprise.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sap-hana-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sap-hana-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sap-hana-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sap-hana.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sap-sql-anywhere-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sap-sql-anywhere-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sap-sql-anywhere-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sap-sql-anywhere.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sas-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sas-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sas-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-security-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-snowflake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-snowflake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-snowflake-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-snowflake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-splice-machine-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-splice-machine-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-splice-machine-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-splice-machine.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-splunk-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-splunk-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-splunk-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-splunk.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sql-server-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sql-server-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sql-server-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-sql-server.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-teradata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-teradata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-teradata-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-teradata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-tips.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-user-management-sso.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-vertica-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-vertica-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-vertica-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-vertica.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow-workflow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dataflow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/date-filter.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dbt-integration-metadata-tags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dbt-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dell-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dell-configure-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dell-configure-nodes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dell-connect-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dell-hardware-requirements.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dell-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dell.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/deploying-cloud.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/deployment-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/deployment-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/deprecation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/developer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/disaster-recovery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/disk-failure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/downloads.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/dr-config.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/early-access-enable.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/embed-full.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/embed-methods.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/embed-viz.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/embedding-overview.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/embedding-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/embedding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/end-of-service-centos.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/end-of-service.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/falcon-monitor.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/faq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/filter-bulk.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/filter-chart-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/filter-chart.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/filter-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/filter-null.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/fixed.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formula-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formula-answer-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formula-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formulas-aggregation-filtered.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formulas-aggregation-flexible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formulas-aggregation-group.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formulas-aggregation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formulas-chasm-trap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formulas-conversion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formulas-cumulative.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formulas-date.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formulas-keywords.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formulas-logical-operations.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formulas-moving.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formulas-nested.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formulas-percent.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formulas-simple-operations.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/gcp-backup-restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/gcp-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/gcp-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/gcp-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/gcp-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/gcp.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/geomap-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/geomaps-custom.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/getting-started.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/glossary.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/group-aggregation-basic.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/group-aggregation-customize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/group-aggregation-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/group-aggregation-formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/group-aggregation-inner.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/group-aggregation-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/group-aggregation-querygroups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/group-management-orgs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/group-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/groups-privileges.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/ha-aws-efs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/ha-resilience.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/hardware-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/hardware-deployment.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/help-center.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/index_help.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/index.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/installation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/internal-auth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/it-ops.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/jdbc-driver-use.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/jdbc-driver.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/jdbc-logging.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/jdbc-odbc-prereqs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/jdbc-pentaho.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/join-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/join-worksheet-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/js-api-enable.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/js-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-da-DK.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-de-DE.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-en-US.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-es-ES.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-es-US.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-fi-FI.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-fr-CA.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-fr-FR.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-it-IT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-ja-JP.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-nb-NO.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-nl-NL.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-pt-BR.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-pt-PT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-ru-RU.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-sv-SE.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-zh-CN.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords-zh-HANT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/keywords.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/known.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/ldap-config-ad.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/ldap-ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/ldap-sync-users-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/ldap-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/ldap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-chart-reset.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-copy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-download-pdf.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-experience-new.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-filters-cross.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-filters-linked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-filters-mandatory.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-filters-selective.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-gating-condition-example.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-granular-permission.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-hyperlink.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-layout-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-link-copy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-notes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-slideshow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-tabs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-verify.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboard-visualization-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/load-balancer-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/load-csv.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/locale-set.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/locale.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/login-console.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/logins-admin.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/migration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/mobile-deploy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/mobile-faq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/mobile-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/model-data-ui.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/monitoring-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/multiple-sources-windows.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/nas-mount-backup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/nas-mount.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/navigating-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/network-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/node-failure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/nodesconfig-example.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/notes-mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/notes-release-mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/notes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/object-usage-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/odbc-best-practices.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/odbc-driver-ssis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/odbc-enable-log.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/odbc-jdbc-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/odbc-jdbc-sql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/odbc-linux-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/odbc-windows-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/odbc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/oidc-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/okta-iam.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/onboarding-email-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/onboarding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/opensource.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/orgs-administration-overview.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/orgs-overview.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/parameters-cluster-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/parameters-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/parameters-nodesconfig.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/parameters-use.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/pdfs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/performance-tracking.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/performance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/personalized-liveboard-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/ports.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/practice.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/privileges-end-user.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/public-api-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/r-answers-save-share.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/r-scripts-run.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/r-scripts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/r-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/reaggregation-average-rates.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/reaggregation-scenarios.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/reaggregation-semi-additive-1.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/reaggregation-semi-additive-2.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/reaggregation-supplier-tender.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/relationship-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/relationship-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/relationships.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/relay-host.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/release-lifecycle.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/release.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/rest-api-getstarted.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/rhel-add-node-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/rhel-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/rhel-delete-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/rhel-install-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/rhel-restore-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/rhel-start-stop-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/rhel-upgrade-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/rls-rule-builder-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/runtime-filter-apply.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/runtime-filter-operators.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/runtime-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/saml-configure-siteminder.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/saml-group-mapping.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/saml-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/saml-okta.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/saml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/schedule-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/schedule-materialization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/scheduled-maintenance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/schema-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/schema-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/schema-examples.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/schema-not-found.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/schema-plan.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/schema-prepare.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/schema-script.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/schema-upload.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/schema-viewer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/scriptability.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-actions.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-assist-coach.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-assist.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-bar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-choose-data-source.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-columns.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-conditional-formatting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-data-refresh-time.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-download.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-drill-down.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-growth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-keyword.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-proximity.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-spotiq-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-start.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-subquery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-suggestion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search-time.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/searches-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/secure-monitor-sw-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/secure-monitor-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/security-data-encryption.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/security-data-object.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/security-rls-concept.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/security-rls-implement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/security-rls.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/security-spotiq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/security-system.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/security-thoughtspot-lifecycle.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/send-logs-to-administrator.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/setup-with-gcp-mp.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/sharding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/share-answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/share-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/share-request-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/share-revoke-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/share-source-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/share-user-imported-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/share-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/share-worksheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/sharing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/show-underlying-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/signins.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/smc-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/smc-configure-nodes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/smc-connect-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/smc-hardware-requirements.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/smc-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/smc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/snapshots.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/snippet-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/spotiq-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/spotiq-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/spotiq-comparative.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/spotiq-custom.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/spotiq-data-model-preferences.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/spotiq-feedback.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/spotiq-preferences.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/spotiq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/sql-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/stop-words.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/style-customization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/support-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/support-contact.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/support-handbook.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/support.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/sysadmin-cluster-upgrade.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/sysadmin-overview.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/system-alerts-events.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/system-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/system-monitor.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/system-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/system-worksheet.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/third-party.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/thoughtspot-sheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/throughput.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tml-answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tml-import-export-multiple.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tml-joins.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tml-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tml-sql-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tml-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tml-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tml-worksheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tql-cli-commands.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tql-service-api-ref.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tql-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/troubleshooting-blanks.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/troubleshooting-browser-cache.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/troubleshooting-certificate.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/troubleshooting-char-encoding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/troubleshooting-connectivity.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/troubleshooting-formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/troubleshooting-generate-har-file.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/troubleshooting-intro-data-int.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/troubleshooting-load.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/troubleshooting-logs-share.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/troubleshooting-logs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/troubleshooting-timezone.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/troubleshooting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/trusted-authentication.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/ts-bi-server.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tscli-command-ref.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tsload-api-flags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tsload-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tsload-connector.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tsload-import-csv.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tsload-script.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/tsload.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/use-agreement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/user-adoption.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/user-management-orgs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/user-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/user-onboarding-experience.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/user-profile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/user-request-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/user-sign-up.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/users-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/users.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/view-dematerialize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/view-materialize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/view-refresh.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/views-examples.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/views-materialized.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/views-searches.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/visualize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/vmware-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/vmware-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/vmware-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/vmware.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/whats-new-10-1-0-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/whats-new-8-4-1-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/whats-new-8-8-0-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/whats-new-8-8-1-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/whats-new-9-0-0-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/whats-new-9-0-1-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/whats-new-9-5-0-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/whats-new-9-8-0-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/windows-deploy-ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/windows-odbc-tracing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/worksheet-create-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/worksheet-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/worksheet-custom-sort.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/worksheet-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/worksheet-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/worksheet-filter.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/worksheet-formula.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/worksheet-inclusion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/worksheet-progressive-joins.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/10.1.0.sw/worksheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/accessibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/accessing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/action-codes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/active-directory-federated-services.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/active-directory.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-console-orgs-page.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-console-orgs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-authentication-active-directory.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-authentication-local.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-authentication-saml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-customize-help.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-groups-orgs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-nas-mount-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-onboarding-email-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-performance-tracking.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-reverse-ssh-tunnel.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-search-spotiq-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-smtp-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-snapshot-manage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-ssl-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-style-customization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-system-alerts-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-system-cluster-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-system-information-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-table-status-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-user-adoption-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-users-orgs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal-users.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-portal.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/admin-sign-in.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/administration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/aggregation-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/alerts-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/analyst-onboarding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/analyst.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/answer-experience-new.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/answer-explorer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/audit-logs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/authentication-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/authentication-local.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/authentication.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/automated-answer-creation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/aws-backup-restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/aws-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/aws-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/aws-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/aws-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/aws-prepare-vms.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/azure-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/azure-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/azure-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/azure-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/backup-configure-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/backup-manual.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/backup-modes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/backup-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/backup-strategy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/business-user.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/cable-networking.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/case-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/catalog-integration-atlan.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-area-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-area.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-axes-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-bar-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-bar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-bubble.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-candlestick.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-color-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-column-axis-rename.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-column-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-column-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-column-visibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-column.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-data-labels.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-data-markers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-funnel.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-geo-area.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-geo-bubble.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-geo-heatmap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-geo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-gridlines.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-heatmap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-high-cardinality.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-html.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-kpi-aggregated.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-kpi.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-line-column-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-line-column.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-line.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-lock-type.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-pareto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-pie.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-pivot-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-radar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-regression-line.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-sankey.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-scatter.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-table-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-treemap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-types.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-waterfall.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-x-axis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-y-axis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chart-zoom.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/charts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/chasm-trap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/cluster-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/cluster-manager.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/cluster-replacement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/components.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connection-share.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-adw-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-adw-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-adw-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-adw-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-adw-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-adw-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-adw-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-adw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-athena-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-athena-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-athena-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-athena-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-athena-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-athena-passthrough.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-athena-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-athena-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-athena.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-aurora-mysql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-aurora-mysql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-aurora-mysql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-aurora-mysql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-aurora-mysql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-aurora-mysql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-aurora-mysql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-aurora-mysql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-aurora-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-aurora-postgresql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-aurora-postgresql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-aurora-postgresql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-aurora-postgresql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-aurora-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-aurora-postgresql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-aurora-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-rds-mysql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-rds-mysql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-rds-mysql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-rds-mysql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-rds-mysql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-rds-mysql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-rds-mysql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-rds-mysql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-rds-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-rds-postgresql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-rds-postgresql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-rds-postgresql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-rds-postgresql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-rds-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-rds-postgresql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-amazon-rds-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-aws-secrets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-capacity-planning.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-cust-cal-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-cust-cal-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-cust-cal-update.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-cust-cal.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-databricks-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-databricks-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-databricks-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-databricks-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-databricks-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-databricks-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-databricks-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-databricks-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-databricks-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-databricks.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-denodo-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-denodo-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-denodo-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-denodo-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-denodo-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-denodo-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-denodo-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-denodo-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-denodo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-dremio-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-dremio-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-dremio-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-dremio-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-dremio-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-dremio-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-dremio-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-dremio-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-dremio.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-external-tables-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-gbq-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-gbq-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-gbq-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-gbq-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-gbq-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-gbq-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-gbq-ingress.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-gbq-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-gbq-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-gbq-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-gbq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-genericjdbc-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-genericjdbc-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-genericjdbc-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-genericjdbc-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-genericjdbc-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-genericjdbc-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-genericjdbc-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-genericjdbc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-alloydb-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-alloydb-postgresql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-alloydb-postgresql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-alloydb-postgresql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-alloydb-postgresql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-alloydb-postgresql-passthrough.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-alloydb-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-alloydb-postgresql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-alloydb-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-postgresql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-postgresql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-postgresql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-postgresql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-postgresql-passthrough.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-postgresql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-sql-server-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-sql-server-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-sql-server-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-sql-server-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-sql-server-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-sql-server-passthrough.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-sql-server-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-sql-server-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-google-cloud-sql-sql-server.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-hana-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-hana-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-hana-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-hana-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-hana-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-hana-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-hana-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-hana.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-mysql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-mysql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-mysql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-mysql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-mysql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-mysql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-mysql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-mysql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-passthrough.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-postgresql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-postgresql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-postgresql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-postgresql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-postgresql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-presto-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-presto-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-presto-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-presto-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-presto-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-presto-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-presto-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-presto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-query-tags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-redshift-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-redshift-azure-ad-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-redshift-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-redshift-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-redshift-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-redshift-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-redshift-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-redshift-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-redshift-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-redshift-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-redshift.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-singlestore-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-singlestore-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-singlestore-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-singlestore-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-singlestore-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-singlestore-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-singlestore-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-singlestore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-snowflake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-snowflake-azure-ad-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-snowflake-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-snowflake-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-snowflake-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-snowflake-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-snowflake-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-snowflake-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-snowflake-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-snowflake-okta-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-snowflake-partner.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-snowflake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-snowflake-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-snowflake-tutorial.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-snowflake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-sql-server-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-sql-server-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-sql-server-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-sql-server-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-sql-server-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-sql-server-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-sql-server-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-sql-server.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-starburst-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-starburst-azure-ad-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-starburst-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-starburst-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-starburst-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-starburst-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-starburst-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-starburst-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-starburst-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-starburst.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-synapse-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-synapse-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-synapse-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-synapse-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-synapse-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-synapse-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-synapse-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-synapse-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-synapse.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-teradata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-teradata-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-teradata-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-teradata-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-teradata-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-teradata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-teradata-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-teradata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-trino-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-trino-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-trino-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-trino-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-trino-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-trino-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-trino-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections-trino.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/connections.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/constraints.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/consumption-pricing-query-based-generate.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/consumption-pricing-query-based-subscription.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/consumption-pricing-query-based.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/consumption-pricing-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/consumption-pricing-time-based.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/consumption-pricing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/custom-calendar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/custom-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customer-os-add-node.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customer-os-ansible-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customer-os-artifacts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customer-os-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customer-os-offline-script.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customer-os-packages.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customer-os-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customer-os-untar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customer-os-upgrade.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customer-os.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customize-background.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customize-color-palettes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customize-fonts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customize-footer-text.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customize-help.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customize-logo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/customize-style.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-api-calling.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-api-get.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-api-pagination.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-api-search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-caching.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-compression.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-engineer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-import-ui.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-integration-troubleshooting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-load-date-formats.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-load.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-modeling-aggreg-additive.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-modeling-attributable-dimension.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-modeling-column-basics.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-modeling-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-modeling-geo-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-modeling-index.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-modeling-patterns.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-modeling-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-modeling-synonym.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-modeling-visibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-modeling.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-profile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-source-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-type-conversion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-types.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data-workspace.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-administration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-amazon-aurora-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-amazon-aurora-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-amazon-aurora-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-amazon-aurora.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-amazon-redshift-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-amazon-redshift-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-amazon-redshift-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-amazon-redshift.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-amazon-s3-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-amazon-s3-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-amazon-s3-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-amazon-s3.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-applications.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-azure-blob-storage-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-azure-blob-storage-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-azure-blob-storage-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-azure-blob-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-azure-synapse-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-azure-synapse-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-azure-synapse-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-azure-synapse.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-cassandra-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-cassandra-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-cassandra-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-cassandra.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-databases.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-databricks-delta-lake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-databricks-delta-lake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-databricks-delta-lake-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-databricks-delta-lake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-denodo-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-denodo-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-denodo-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-denodo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-dremio-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-dremio-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-dremio-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-dremio.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-exadata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-exadata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-exadata-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-exadata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-files-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-files-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-files-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-files.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-filesystems.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-google-bigquery-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-google-bigquery-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-google-bigquery-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-google-bigquery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-google-cloud-storage-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-google-cloud-storage-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-google-cloud-storage-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-google-cloud-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-google-sheets-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-google-sheets-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-google-sheets-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-google-sheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-greenplum-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-greenplum-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-greenplum-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-greenplum-utilities.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-greenplum.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-hdfs-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-hdfs-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-hdfs-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-hdfs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-hive-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-hive-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-hive-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-hive.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-home.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-ibm-db2-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-ibm-db2-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-ibm-db2-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-ibm-db2.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-impala-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-impala-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-impala-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-impala.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-jdbc-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-jdbc-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-jdbc-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-jdbc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-key-features.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-mail-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-mariadb-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-mariadb-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-mariadb-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-mariadb.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-memsql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-memsql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-memsql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-memsql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-mongodb-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-mongodb-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-mongodb-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-mongodb.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-mysql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-mysql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-mysql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-mysql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-netezza-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-netezza-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-netezza-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-netezza.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-oracle-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-oracle-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-oracle-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-oracle.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-others.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-postgresql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-presto-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-presto-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-presto-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-presto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-requirements-guidelines.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-rest-api-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-rest-api-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-rest-api-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-rest-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-salesforce-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-salesforce-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-salesforce-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-salesforce.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sap-adaptive-server-enterprise-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sap-adaptive-server-enterprise-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sap-adaptive-server-enterprise-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sap-adaptive-server-enterprise.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sap-hana-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sap-hana-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sap-hana-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sap-hana.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sap-sql-anywhere-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sap-sql-anywhere-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sap-sql-anywhere-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sap-sql-anywhere.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sas-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sas-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sas-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-security-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-snowflake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-snowflake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-snowflake-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-snowflake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-splice-machine-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-splice-machine-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-splice-machine-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-splice-machine.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-splunk-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-splunk-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-splunk-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-splunk.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sql-server-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sql-server-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sql-server-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-sql-server.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-teradata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-teradata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-teradata-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-teradata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-tips.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-user-management-sso.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-vertica-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-vertica-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-vertica-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-vertica.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow-workflow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dataflow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/date-filter.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dbt-integration-metadata-tags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dbt-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dell-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dell-configure-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dell-configure-nodes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dell-connect-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dell-hardware-requirements.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dell-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dell.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/deploying-cloud.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/deployment-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/deployment-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/deprecation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/developer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/disaster-recovery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/disk-failure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/downloads.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/dr-config.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/early-access-enable.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/embed-full.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/embed-methods.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/embed-viz.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/embedding-overview.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/embedding-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/embedding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/end-of-service-centos.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/end-of-service.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/falcon-monitor.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/faq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/filter-bulk.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/filter-chart-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/filter-chart.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/filter-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/filter-null.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/fixed.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formula-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formula-answer-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formula-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formulas-aggregation-filtered.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formulas-aggregation-flexible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formulas-aggregation-group.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formulas-aggregation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formulas-chasm-trap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formulas-conversion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formulas-cumulative.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formulas-date.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formulas-keywords.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formulas-logical-operations.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formulas-moving.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formulas-nested.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formulas-percent.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formulas-simple-operations.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/gcp-backup-restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/gcp-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/gcp-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/gcp-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/gcp-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/gcp.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/geomap-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/geomaps-custom.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/getting-started.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/glossary.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/group-aggregation-basic.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/group-aggregation-customize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/group-aggregation-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/group-aggregation-formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/group-aggregation-inner.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/group-aggregation-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/group-aggregation-querygroups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/group-management-orgs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/group-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/groups-privileges.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/ha-aws-efs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/ha-resilience.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/hardware-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/hardware-deployment.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/help-center.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/index_help.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/index.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/installation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/internal-auth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/it-ops.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/jdbc-driver-use.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/jdbc-driver.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/jdbc-logging.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/jdbc-odbc-prereqs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/jdbc-pentaho.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/join-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/join-worksheet-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/js-api-enable.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/js-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-da-DK.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-de-DE.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-en-US.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-es-ES.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-es-US.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-fi-FI.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-fr-CA.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-fr-FR.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-it-IT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-ja-JP.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-nb-NO.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-nl-NL.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-pt-BR.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-pt-PT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-ru-RU.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-sv-SE.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-zh-CN.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords-zh-HANT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/keywords.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/known.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/ldap-config-ad.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/ldap-ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/ldap-sync-users-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/ldap-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/ldap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-chart-reset.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-copy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-download-pdf.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-experience-new.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-filters-cross.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-filters-linked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-filters-mandatory.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-filters-selective.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-gating-condition-example.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-granular-permission.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-hyperlink.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-layout-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-link-copy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-notes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-slideshow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-tabs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-verify.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboard-visualization-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/load-balancer-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/load-csv.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/locale-set.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/locale.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/login-console.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/logins-admin.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/migration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/mobile-deploy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/mobile-faq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/mobile-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/model-data-ui.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/monitoring-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/multiple-sources-windows.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/nas-mount-backup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/nas-mount.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/navigating-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/network-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/node-failure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/nodesconfig-example.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/notes-mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/notes-release-mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/notes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/object-usage-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/odbc-best-practices.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/odbc-driver-ssis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/odbc-enable-log.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/odbc-jdbc-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/odbc-jdbc-sql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/odbc-linux-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/odbc-windows-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/odbc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/oidc-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/okta-iam.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/onboarding-email-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/onboarding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/opensource.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/orgs-administration-overview.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/orgs-overview.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/parameters-cluster-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/parameters-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/parameters-nodesconfig.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/parameters-use.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/pdfs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/performance-tracking.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/performance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/personalized-liveboard-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/ports.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/practice.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/privileges-end-user.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/public-api-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/r-answers-save-share.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/r-scripts-run.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/r-scripts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/r-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/reaggregation-average-rates.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/reaggregation-scenarios.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/reaggregation-semi-additive-1.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/reaggregation-semi-additive-2.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/reaggregation-supplier-tender.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/relationship-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/relationship-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/relationships.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/relay-host.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/release-lifecycle.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/release.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/rest-api-getstarted.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/rhel-add-node-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/rhel-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/rhel-delete-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/rhel-install-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/rhel-restore-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/rhel-start-stop-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/rhel-upgrade-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/rls-rule-builder-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/runtime-filter-apply.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/runtime-filter-operators.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/runtime-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/saml-configure-siteminder.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/saml-group-mapping.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/saml-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/saml-okta.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/saml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/schedule-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/schedule-materialization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/scheduled-maintenance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/schema-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/schema-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/schema-examples.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/schema-not-found.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/schema-plan.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/schema-prepare.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/schema-script.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/schema-upload.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/schema-viewer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/scriptability.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-actions.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-assist-coach.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-assist.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-bar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-choose-data-source.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-columns.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-conditional-formatting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-data-refresh-time.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-download.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-drill-down.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-growth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-keyword.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-proximity.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-spotiq-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-start.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-subquery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-suggestion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search-time.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/searches-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/secure-monitor-sw-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/secure-monitor-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/security-data-encryption.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/security-data-object.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/security-rls-concept.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/security-rls-implement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/security-rls.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/security-spotiq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/security-system.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/security-thoughtspot-lifecycle.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/send-logs-to-administrator.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/setup-with-gcp-mp.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/sharding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/share-answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/share-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/share-request-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/share-revoke-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/share-source-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/share-user-imported-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/share-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/share-worksheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/sharing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/show-underlying-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/signins.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/smc-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/smc-configure-nodes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/smc-connect-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/smc-hardware-requirements.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/smc-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/smc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/snapshots.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/snippet-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/spotiq-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/spotiq-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/spotiq-comparative.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/spotiq-custom.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/spotiq-data-model-preferences.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/spotiq-feedback.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/spotiq-preferences.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/spotiq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/sql-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/stop-words.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/style-customization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/support-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/support-contact.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/support-handbook.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/support.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/sysadmin-cluster-upgrade.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/sysadmin-overview.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/system-alerts-events.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/system-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/system-monitor.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/system-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/system-worksheet.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/third-party.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/thoughtspot-sheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/throughput.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tml-answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tml-import-export-multiple.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tml-joins.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tml-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tml-sql-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tml-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tml-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tml-worksheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tql-cli-commands.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tql-service-api-ref.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tql-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/troubleshooting-blanks.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/troubleshooting-browser-cache.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/troubleshooting-certificate.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/troubleshooting-char-encoding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/troubleshooting-connectivity.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/troubleshooting-formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/troubleshooting-generate-har-file.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/troubleshooting-intro-data-int.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/troubleshooting-load.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/troubleshooting-logs-share.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/troubleshooting-logs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/troubleshooting-timezone.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/troubleshooting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/trusted-authentication.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/ts-bi-server.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tscli-command-ref.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tsload-api-flags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tsload-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tsload-connector.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tsload-import-csv.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tsload-script.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/tsload.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/use-agreement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/user-adoption.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/user-management-orgs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/user-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/user-onboarding-experience.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/user-profile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/user-request-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/user-sign-up.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/users-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/users.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/view-dematerialize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/view-materialize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/view-refresh.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/views-examples.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/views-materialized.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/views-searches.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/visualize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/vmware-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/vmware-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/vmware-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/vmware.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/whats-new-8-4-1-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/whats-new-8-8-0-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/whats-new-8-8-1-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/whats-new-9-0-0-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/whats-new-9-0-1-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/whats-new-9-5-0-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/whats-new-9-8-0-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/windows-deploy-ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/windows-odbc-tracing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/worksheet-create-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/worksheet-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/worksheet-custom-sort.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/worksheet-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/worksheet-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/worksheet-filter.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/worksheet-formula.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/worksheet-inclusion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/worksheet-progressive-joins.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/worksheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/accessibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/accessing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/action-codes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/active-directory-federated-services.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/active-directory.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-authentication-active-directory.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-authentication-local.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-authentication-saml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-customize-help.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-nas-mount-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-onboarding-email-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-performance-tracking.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-reverse-ssh-tunnel.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-search-spotiq-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-smtp-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-snapshot-manage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-ssl-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-style-customization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-system-alerts-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-system-cluster-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-system-information-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-table-status-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-user-adoption-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal-users.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-portal.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/admin-sign-in.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/administration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/aggregation-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/alerts-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/analyst-onboarding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/analyst.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/answer-experience-new.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/answer-explorer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/audit-logs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/authentication.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/automated-answer-creation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/aws-backup-restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/aws-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/aws-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/aws-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/aws-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/aws-prepare-vms.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/azure-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/azure-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/azure-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/azure-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/backup-configure-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/backup-manual.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/backup-modes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/backup-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/backup-strategy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/business-user.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/cable-networking.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/case-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-area-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-area.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-axes-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-bar-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-bar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-bubble.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-candlestick.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-color-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-column-axis-rename.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-column-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-column-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-column-visibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-column.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-data-labels.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-data-markers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-funnel.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-geo-area.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-geo-bubble.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-geo-heatmap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-geo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-gridlines.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-heatmap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-high-cardinality.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-html.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-kpi-aggregated.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-kpi.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-line-column-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-line-column.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-line.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-lock-type.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-pareto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-pie.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-pivot-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-radar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-regression-line.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-sankey.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-scatter.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-table-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-treemap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-types.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-waterfall.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-x-axis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-y-axis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chart-zoom.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/charts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/chasm-trap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/cluster-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/cluster-manager.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/cluster-replacement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/components.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connection-share.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-adw-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-adw-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-adw-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-adw-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-adw-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-adw-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-adw-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-adw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-aurora-mysql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-aurora-mysql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-aurora-mysql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-aurora-mysql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-aurora-mysql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-aurora-mysql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-aurora-mysql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-aurora-mysql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-aurora-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-aurora-postgresql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-aurora-postgresql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-aurora-postgresql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-aurora-postgresql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-aurora-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-aurora-postgresql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-aurora-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-rds-mysql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-rds-mysql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-rds-mysql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-rds-mysql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-rds-mysql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-rds-mysql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-rds-mysql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-rds-mysql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-rds-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-rds-postgresql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-rds-postgresql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-rds-postgresql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-rds-postgresql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-rds-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-rds-postgresql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-amazon-rds-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-aws-secrets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-capacity-planning.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-cust-cal-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-cust-cal-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-cust-cal-update.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-cust-cal.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-databricks-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-databricks-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-databricks-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-databricks-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-databricks-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-databricks-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-databricks-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-databricks-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-databricks.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-denodo-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-denodo-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-denodo-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-denodo-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-denodo-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-denodo-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-denodo-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-denodo-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-denodo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-dremio-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-dremio-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-dremio-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-dremio-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-dremio-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-dremio-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-dremio-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-dremio-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-dremio.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-external-tables-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-gbq-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-gbq-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-gbq-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-gbq-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-gbq-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-gbq-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-gbq-ingress.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-gbq-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-gbq-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-gbq-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-gbq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-genericjdbc-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-genericjdbc-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-genericjdbc-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-genericjdbc-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-genericjdbc-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-genericjdbc-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-genericjdbc-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-genericjdbc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-hana-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-hana-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-hana-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-hana-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-hana-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-hana-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-hana-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-hana.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-mysql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-mysql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-mysql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-mysql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-mysql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-mysql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-mysql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-mysql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-passthrough.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-postgresql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-postgresql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-postgresql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-postgresql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-postgresql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-presto-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-presto-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-presto-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-presto-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-presto-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-presto-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-presto-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-presto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-query-tags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-redshift-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-redshift-azure-ad-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-redshift-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-redshift-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-redshift-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-redshift-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-redshift-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-redshift-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-redshift-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-redshift-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-redshift.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-singlestore-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-singlestore-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-singlestore-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-singlestore-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-singlestore-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-singlestore-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-singlestore-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-singlestore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-snowflake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-snowflake-azure-ad-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-snowflake-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-snowflake-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-snowflake-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-snowflake-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-snowflake-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-snowflake-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-snowflake-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-snowflake-okta-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-snowflake-partner.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-snowflake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-snowflake-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-snowflake-tutorial.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-snowflake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-sql-server-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-sql-server-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-sql-server-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-sql-server-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-sql-server-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-sql-server-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-sql-server-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-sql-server.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-starburst-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-starburst-azure-ad-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-starburst-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-starburst-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-starburst-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-starburst-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-starburst-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-starburst-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-starburst-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-starburst.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-synapse-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-synapse-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-synapse-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-synapse-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-synapse-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-synapse-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-synapse-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-synapse-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-synapse.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-teradata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-teradata-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-teradata-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-teradata-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-teradata-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-teradata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-teradata-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-teradata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-trino-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-trino-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-trino-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-trino-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-trino-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-trino-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-trino-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections-trino.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/connections.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/constraints.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/consumption-pricing-query-based-generate.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/consumption-pricing-query-based-subscription.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/consumption-pricing-query-based.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/consumption-pricing-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/consumption-pricing-time-based.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/consumption-pricing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/custom-calendar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/custom-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/customer-os-add-node.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/customer-os-ansible-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/customer-os-artifacts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/customer-os-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/customer-os-offline-script.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/customer-os-packages.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/customer-os-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/customer-os-untar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/customer-os-upgrade.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/customer-os.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/customization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/customize-background.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/customize-color-palettes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/customize-fonts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/customize-footer-text.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/customize-logo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/customize-style.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-api-calling.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-api-get.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-api-pagination.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-api-search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-caching.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-compression.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-engineer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-import-ui.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-integration-troubleshooting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-load-date-formats.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-load.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-modeling-aggreg-additive.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-modeling-attributable-dimension.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-modeling-column-basics.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-modeling-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-modeling-geo-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-modeling-index.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-modeling-patterns.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-modeling-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-modeling-synonym.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-modeling-visibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-modeling.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-profile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-source-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-type-conversion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-types.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data-workspace.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-administration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-amazon-aurora-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-amazon-aurora-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-amazon-aurora-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-amazon-aurora.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-amazon-redshift-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-amazon-redshift-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-amazon-redshift-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-amazon-redshift.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-amazon-s3-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-amazon-s3-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-amazon-s3-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-amazon-s3.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-applications.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-azure-blob-storage-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-azure-blob-storage-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-azure-blob-storage-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-azure-blob-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-azure-synapse-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-azure-synapse-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-azure-synapse-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-azure-synapse.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-cassandra-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-cassandra-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-cassandra-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-cassandra.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-databases.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-databricks-delta-lake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-databricks-delta-lake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-databricks-delta-lake-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-databricks-delta-lake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-denodo-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-denodo-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-denodo-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-denodo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-dremio-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-dremio-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-dremio-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-dremio.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-exadata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-exadata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-exadata-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-exadata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-files-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-files-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-files-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-files.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-filesystems.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-google-bigquery-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-google-bigquery-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-google-bigquery-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-google-bigquery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-google-cloud-storage-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-google-cloud-storage-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-google-cloud-storage-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-google-cloud-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-google-sheets-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-google-sheets-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-google-sheets-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-google-sheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-greenplum-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-greenplum-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-greenplum-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-greenplum-utilities.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-greenplum.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-hdfs-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-hdfs-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-hdfs-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-hdfs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-hive-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-hive-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-hive-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-hive.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-home.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-ibm-db2-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-ibm-db2-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-ibm-db2-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-ibm-db2.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-impala-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-impala-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-impala-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-impala.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-jdbc-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-jdbc-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-jdbc-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-jdbc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-key-features.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-mail-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-mariadb-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-mariadb-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-mariadb-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-mariadb.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-memsql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-memsql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-memsql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-memsql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-mongodb-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-mongodb-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-mongodb-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-mongodb.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-mysql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-mysql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-mysql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-mysql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-netezza-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-netezza-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-netezza-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-netezza.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-oracle-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-oracle-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-oracle-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-oracle.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-others.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-postgresql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-presto-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-presto-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-presto-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-presto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-requirements-guidelines.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-rest-api-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-rest-api-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-rest-api-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-rest-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-salesforce-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-salesforce-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-salesforce-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-salesforce.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sap-adaptive-server-enterprise-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sap-adaptive-server-enterprise-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sap-adaptive-server-enterprise-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sap-adaptive-server-enterprise.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sap-hana-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sap-hana-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sap-hana-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sap-hana.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sap-sql-anywhere-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sap-sql-anywhere-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sap-sql-anywhere-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sap-sql-anywhere.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sas-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sas-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sas-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-security-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-snowflake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-snowflake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-snowflake-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-snowflake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-splice-machine-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-splice-machine-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-splice-machine-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-splice-machine.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-splunk-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-splunk-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-splunk-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-splunk.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sql-server-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sql-server-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sql-server-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-sql-server.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-teradata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-teradata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-teradata-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-teradata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-tips.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-user-management-sso.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-vertica-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-vertica-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-vertica-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-vertica.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow-workflow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dataflow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/date-filter.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dbt-integration-metadata-tags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dbt-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dell-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dell-configure-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dell-configure-nodes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dell-connect-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dell-hardware-requirements.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dell-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dell.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/deploying-cloud.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/deployment-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/deployment-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/deprecation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/developer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/disaster-recovery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/disk-failure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/downloads.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/dr-config.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/early-access-enable.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/embed-full.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/embed-methods.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/embed-viz.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/embedding-overview.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/embedding-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/embedding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/end-of-service-centos.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/end-of-service.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/falcon-monitor.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/faq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/filter-bulk.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/filter-chart-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/filter-chart.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/filter-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/filter-null.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/fixed.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formula-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formula-answer-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formula-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formulas-aggregation-filtered.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formulas-aggregation-flexible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formulas-aggregation-group.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formulas-aggregation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formulas-chasm-trap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formulas-conversion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formulas-cumulative.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formulas-date.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formulas-keywords.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formulas-logical-operations.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formulas-moving.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formulas-nested.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formulas-percent.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formulas-simple-operations.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/gcp-backup-restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/gcp-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/gcp-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/gcp-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/gcp-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/gcp.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/geomap-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/geomaps-custom.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/getting-started.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/glossary.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/group-aggregation-basic.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/group-aggregation-customize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/group-aggregation-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/group-aggregation-formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/group-aggregation-inner.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/group-aggregation-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/group-aggregation-querygroups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/group-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/groups-privileges.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/ha-aws-efs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/ha-resilience.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/hardware-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/hardware-deployment.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/help-center.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/index_help.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/index.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/installation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/internal-auth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/it-ops.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/jdbc-driver-use.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/jdbc-driver.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/jdbc-logging.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/jdbc-odbc-prereqs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/jdbc-pentaho.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/join-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/join-worksheet-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/js-api-enable.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/js-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-da-DK.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-de-DE.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-en-US.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-es-ES.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-es-US.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-fi-FI.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-fr-CA.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-fr-FR.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-it-IT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-ja-JP.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-nb-NO.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-nl-NL.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-pt-BR.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-pt-PT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-ru-RU.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-sv-SE.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-zh-CN.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords-zh-HANT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/keywords.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/known.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/ldap-config-ad.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/ldap-ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/ldap-sync-users-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/ldap-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/ldap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-chart-reset.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-copy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-download-pdf.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-experience-new.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-filters-cross.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-filters-linked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-filters-mandatory.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-filters-selective.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-gating-condition-example.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-granular-permission.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-hyperlink.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-layout-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-link-copy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-notes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-slideshow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-tabs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-verify.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboard-visualization-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/load-balancer-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/load-csv.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/locale-set.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/locale.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/login-console.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/logins-admin.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/migration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/mobile-deploy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/mobile-faq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/mobile-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/model-data-ui.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/monitoring-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/multiple-sources-windows.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/nas-mount-backup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/nas-mount.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/navigating-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/network-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/node-failure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/nodesconfig-example.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/notes-mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/notes-release-mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/notes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/object-usage-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/odbc-best-practices.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/odbc-driver-ssis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/odbc-enable-log.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/odbc-jdbc-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/odbc-jdbc-sql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/odbc-linux-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/odbc-windows-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/odbc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/oidc-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/onboarding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/opensource.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/parameters-cluster-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/parameters-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/parameters-nodesconfig.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/parameters-use.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/performance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/ports.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/practice.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/privileges-end-user.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/public-api-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/r-answers-save-share.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/r-scripts-run.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/r-scripts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/r-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/reaggregation-average-rates.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/reaggregation-scenarios.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/reaggregation-semi-additive-1.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/reaggregation-semi-additive-2.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/reaggregation-supplier-tender.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/relationship-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/relationship-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/relationships.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/relay-host.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/release-lifecycle.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/release.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/rest-api-getstarted.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/rhel-add-node-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/rhel-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/rhel-delete-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/rhel-install-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/rhel-restore-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/rhel-start-stop-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/rhel-upgrade-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/rls-rule-builder-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/runtime-filter-apply.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/runtime-filter-operators.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/runtime-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/saml-configure-siteminder.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/saml-group-mapping.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/saml-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/saml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/schedule-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/schedule-materialization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/schema-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/schema-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/schema-examples.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/schema-not-found.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/schema-plan.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/schema-prepare.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/schema-script.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/schema-upload.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/schema-viewer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/scriptability.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search-actions.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search-assist-coach.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search-assist.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search-bar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search-choose-data-source.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search-columns.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search-conditional-formatting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search-data-refresh-time.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search-download.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search-drill-down.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search-growth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search-keyword.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search-proximity.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search-start.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search-subquery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search-suggestion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search-time.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/searches-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/secure-monitor-sw-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/secure-monitor-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/security-data-encryption.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/security-data-object.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/security-rls-concept.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/security-rls-implement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/security-rls.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/security-spotiq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/security-system.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/security-thoughtspot-lifecycle.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/send-logs-to-administrator.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/setup-with-gcp-mp.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/sharding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/share-answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/share-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/share-request-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/share-revoke-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/share-source-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/share-user-imported-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/share-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/share-worksheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/sharing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/show-underlying-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/signins.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/smc-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/smc-configure-nodes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/smc-connect-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/smc-hardware-requirements.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/smc-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/smc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/snapshots.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/snippet-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/spotiq-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/spotiq-comparative.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/spotiq-custom.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/spotiq-data-model-preferences.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/spotiq-feedback.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/spotiq-preferences.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/spotiq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/sql-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/stop-words.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/support-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/support-contact.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/support-handbook.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/support.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/sysadmin-cluster-upgrade.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/sysadmin-overview.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/system-alerts-events.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/system-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/system-monitor.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/system-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/system-worksheet.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/third-party.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/thoughtspot-sheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/throughput.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tml-answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tml-import-export-multiple.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tml-joins.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tml-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tml-sql-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tml-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tml-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tml-worksheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tql-cli-commands.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tql-service-api-ref.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tql-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/troubleshooting-blanks.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/troubleshooting-browser-cache.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/troubleshooting-certificate.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/troubleshooting-char-encoding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/troubleshooting-connectivity.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/troubleshooting-formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/troubleshooting-generate-har-file.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/troubleshooting-intro-data-int.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/troubleshooting-load.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/troubleshooting-logs-share.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/troubleshooting-logs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/troubleshooting-timezone.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/troubleshooting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/trusted-authentication.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/ts-bi-server.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tscli-command-ref.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tsload-api-flags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tsload-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tsload-connector.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tsload-import-csv.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tsload-script.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/tsload.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/use-agreement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/user-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/user-onboarding-experience.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/user-profile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/user-request-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/user-sign-up.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/users-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/users.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/view-dematerialize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/view-materialize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/view-refresh.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/views-examples.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/views-materialized.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/views-searches.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/visualize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/vmware-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/vmware-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/vmware-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/vmware.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/whats-new-8-4-1-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/whats-new-8-8-0-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/whats-new-8-8-1-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/whats-new-9-0-0-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/whats-new-9-0-1-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/whats-new-9-5-0-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/windows-deploy-ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/windows-odbc-tracing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/worksheet-create-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/worksheet-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/worksheet-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/worksheet-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/worksheet-filter.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/worksheet-formula.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/worksheet-inclusion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/worksheet-progressive-joins.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/worksheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/accessibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/accessing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/action-codes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/active-directory-federated-services.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/active-directory.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-authentication-active-directory.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-authentication-local.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-authentication-saml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-customize-help.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-nas-mount-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-onboarding-email-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-performance-tracking.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-reverse-ssh-tunnel.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-search-spotiq-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-smtp-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-snapshot-manage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-ssl-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-style-customization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-system-alerts-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-system-cluster-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-system-information-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-table-status-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-user-adoption-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal-users.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-portal.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/admin-sign-in.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/administration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/aggregation-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/alerts-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/analyst-onboarding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/analyst.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/answer-experience-new.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/answer-explorer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/audit-logs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/authentication.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/automated-answer-creation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/aws-backup-restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/aws-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/aws-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/aws-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/aws-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/aws-prepare-vms.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/azure-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/azure-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/azure-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/azure-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/backup-configure-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/backup-manual.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/backup-modes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/backup-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/backup-strategy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/business-user.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/cable-networking.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/case-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-area-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-area.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-axes-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-bar-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-bar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-bubble.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-candlestick.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-color-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-column-axis-rename.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-column-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-column-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-column-visibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-column.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-data-labels.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-data-markers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-funnel.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-geo-area.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-geo-bubble.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-geo-heatmap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-geo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-gridlines.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-heatmap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-high-cardinality.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-html.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-kpi.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-line-column-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-line-column.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-line.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-lock-type.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-pareto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-pie.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-pivot-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-radar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-regression-line.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-sankey.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-scatter.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-table-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-treemap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-types.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-waterfall.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-x-axis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-y-axis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chart-zoom.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/charts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/chasm-trap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/cluster-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/cluster-manager.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/cluster-replacement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/components.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connection-share.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-adw-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-adw-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-adw-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-adw-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-adw-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-adw-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-adw-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-adw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-aws-secrets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-capacity-planning.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-cust-cal-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-cust-cal-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-cust-cal-update.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-cust-cal.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-databricks-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-databricks-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-databricks-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-databricks-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-databricks-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-databricks-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-databricks-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-databricks-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-databricks.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-denodo-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-denodo-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-denodo-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-denodo-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-denodo-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-denodo-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-denodo-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-denodo-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-denodo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-dremio-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-dremio-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-dremio-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-dremio-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-dremio-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-dremio-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-dremio-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-dremio-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-dremio.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-external-tables-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-gbq-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-gbq-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-gbq-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-gbq-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-gbq-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-gbq-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-gbq-ingress.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-gbq-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-gbq-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-gbq-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-gbq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-hana-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-hana-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-hana-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-hana-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-hana-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-hana-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-hana-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-hana.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-passthrough.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-postgresql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-postgresql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-postgresql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-postgresql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-postgresql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-presto-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-presto-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-presto-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-presto-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-presto-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-presto-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-presto-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-presto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-query-tags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-redshift-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-redshift-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-redshift-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-redshift-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-redshift-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-redshift-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-redshift-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-redshift-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-redshift-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-redshift.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-snowflake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-snowflake-azure-ad-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-snowflake-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-snowflake-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-snowflake-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-snowflake-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-snowflake-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-snowflake-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-snowflake-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-snowflake-okta-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-snowflake-partner.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-snowflake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-snowflake-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-snowflake-tutorial.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-snowflake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-starburst-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-starburst-azure-ad-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-starburst-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-starburst-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-starburst-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-starburst-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-starburst-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-starburst-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-starburst-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-starburst.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-synapse-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-synapse-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-synapse-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-synapse-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-synapse-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-synapse-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-synapse-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-synapse-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-synapse.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-teradata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-teradata-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-teradata-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-teradata-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-teradata-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-teradata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-teradata-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-teradata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-trino-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-trino-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-trino-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-trino-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-trino-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-trino-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-trino-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections-trino.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/connections.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/constraints.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/consumption-pricing-query-based-generate.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/consumption-pricing-query-based-subscription.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/consumption-pricing-query-based.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/consumption-pricing-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/consumption-pricing-time-based.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/consumption-pricing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/custom-calendar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/customer-os-add-node.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/customer-os-ansible-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/customer-os-artifacts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/customer-os-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/customer-os-offline-script.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/customer-os-packages.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/customer-os-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/customer-os-untar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/customer-os-upgrade.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/customer-os.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/customization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/customize-background.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/customize-color-palettes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/customize-fonts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/customize-footer-text.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/customize-logo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/customize-style.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-api-calling.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-api-get.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-api-pagination.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-api-search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-caching.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-compression.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-engineer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-import-ui.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-integration-troubleshooting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-load-date-formats.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-load.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-modeling-aggreg-additive.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-modeling-attributable-dimension.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-modeling-column-basics.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-modeling-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-modeling-geo-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-modeling-index.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-modeling-patterns.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-modeling-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-modeling-synonym.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-modeling-visibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-modeling.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-profile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-source-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-type-conversion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-types.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data-workspace.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-administration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-amazon-aurora-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-amazon-aurora-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-amazon-aurora-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-amazon-aurora.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-amazon-redshift-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-amazon-redshift-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-amazon-redshift-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-amazon-redshift.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-amazon-s3-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-amazon-s3-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-amazon-s3-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-amazon-s3.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-applications.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-azure-blob-storage-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-azure-blob-storage-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-azure-blob-storage-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-azure-blob-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-azure-synapse-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-azure-synapse-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-azure-synapse-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-azure-synapse.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-cassandra-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-cassandra-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-cassandra-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-cassandra.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-databases.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-databricks-delta-lake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-databricks-delta-lake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-databricks-delta-lake-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-databricks-delta-lake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-denodo-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-denodo-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-denodo-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-denodo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-dremio-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-dremio-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-dremio-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-dremio.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-exadata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-exadata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-exadata-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-exadata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-files-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-files-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-files-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-files.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-filesystems.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-google-bigquery-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-google-bigquery-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-google-bigquery-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-google-bigquery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-google-cloud-storage-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-google-cloud-storage-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-google-cloud-storage-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-google-cloud-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-google-sheets-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-google-sheets-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-google-sheets-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-google-sheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-greenplum-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-greenplum-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-greenplum-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-greenplum-utilities.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-greenplum.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-hdfs-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-hdfs-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-hdfs-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-hdfs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-hive-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-hive-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-hive-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-hive.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-home.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-ibm-db2-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-ibm-db2-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-ibm-db2-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-ibm-db2.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-impala-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-impala-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-impala-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-impala.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-jdbc-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-jdbc-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-jdbc-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-jdbc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-key-features.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-mail-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-mariadb-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-mariadb-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-mariadb-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-mariadb.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-memsql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-memsql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-memsql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-memsql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-mongodb-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-mongodb-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-mongodb-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-mongodb.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-mysql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-mysql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-mysql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-mysql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-netezza-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-netezza-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-netezza-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-netezza.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-oracle-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-oracle-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-oracle-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-oracle.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-others.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-postgresql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-presto-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-presto-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-presto-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-presto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-requirements-guidelines.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-rest-api-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-rest-api-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-rest-api-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-rest-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-salesforce-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-salesforce-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-salesforce-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-salesforce.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sap-adaptive-server-enterprise-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sap-adaptive-server-enterprise-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sap-adaptive-server-enterprise-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sap-adaptive-server-enterprise.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sap-hana-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sap-hana-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sap-hana-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sap-hana.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sap-sql-anywhere-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sap-sql-anywhere-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sap-sql-anywhere-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sap-sql-anywhere.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sas-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sas-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sas-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-security-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-snowflake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-snowflake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-snowflake-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-snowflake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-splice-machine-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-splice-machine-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-splice-machine-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-splice-machine.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-splunk-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-splunk-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-splunk-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-splunk.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sql-server-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sql-server-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sql-server-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-sql-server.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-teradata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-teradata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-teradata-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-teradata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-tips.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-user-management-sso.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-vertica-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-vertica-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-vertica-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-vertica.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow-workflow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dataflow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dbt-integration-metadata-tags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dbt-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dell-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dell-configure-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dell-configure-nodes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dell-connect-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dell-hardware-requirements.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dell-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dell.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/deploying-cloud.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/deployment-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/deployment-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/deprecation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/developer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/disaster-recovery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/disk-failure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/downloads.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/dr-config.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/early-access-enable.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/embed-full.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/embed-methods.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/embed-viz.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/embedding-overview.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/embedding-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/embedding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/end-of-service-centos.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/end-of-service.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/falcon-monitor.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/faq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/filter-bulk.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/filter-chart-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/filter-chart.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/filter-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/filter-null.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/fixed.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/formula-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/formula-answer-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/formula-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/formulas-aggregation-filtered.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/formulas-aggregation-flexible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/formulas-aggregation-group.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/formulas-aggregation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/formulas-chasm-trap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/formulas-conversion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/formulas-cumulative.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/formulas-date.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/formulas-logical-operations.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/formulas-moving.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/formulas-nested.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/formulas-percent.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/formulas-simple-operations.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/gcp-backup-restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/gcp-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/gcp-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/gcp-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/gcp-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/gcp.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/geomap-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/geomaps-custom.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/getting-started.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/glossary.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/group-aggregation-basic.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/group-aggregation-customize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/group-aggregation-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/group-aggregation-formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/group-aggregation-inner.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/group-aggregation-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/group-aggregation-querygroups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/group-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/groups-privileges.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/ha-aws-efs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/ha-resilience.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/hardware-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/hardware-deployment.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/help-center.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/index_help.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/index.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/installation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/internal-auth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/it-ops.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/jdbc-driver-use.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/jdbc-driver.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/jdbc-logging.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/jdbc-odbc-prereqs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/jdbc-pentaho.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/join-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/join-worksheet-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/js-api-enable.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/js-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords-da-DK.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords-de-DE.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords-en-US.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords-es-ES.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords-es-US.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords-fi-FI.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords-fr-CA.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords-fr-FR.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords-it-IT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords-ja-JP.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords-nb-NO.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords-nl-NL.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords-pt-BR.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords-pt-PT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords-sv-SE.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords-zh-CN.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords-zh-HANT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/keywords.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/known.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/ldap-config-ad.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/ldap-ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/ldap-sync-users-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/ldap-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/ldap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-chart-reset.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-copy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-download-pdf.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-experience-new.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-filters-linked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-filters-mandatory.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-filters-selective.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-gating-condition-example.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-granular-permission.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-hyperlink.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-layout-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-link-copy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-slideshow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-tabs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboard-visualization-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/load-balancer-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/load-csv.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/locale-set.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/locale.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/login-console.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/logins-admin.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/migration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/mobile-deploy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/mobile-faq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/mobile-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/model-data-ui.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/monitoring-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/multiple-sources-windows.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/nas-mount-backup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/nas-mount.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/navigating-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/network-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/node-failure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/nodesconfig-example.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/notes-mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/notes-release-mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/notes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/object-usage-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/odbc-best-practices.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/odbc-driver-ssis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/odbc-enable-log.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/odbc-jdbc-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/odbc-jdbc-sql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/odbc-linux-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/odbc-windows-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/odbc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/oidc-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/onboarding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/opensource.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/parameters-cluster-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/parameters-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/parameters-nodesconfig.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/parameters-use.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/performance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/ports.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/practice.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/privileges-end-user.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/public-api-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/r-answers-save-share.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/r-scripts-run.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/r-scripts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/r-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/reaggregation-average-rates.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/reaggregation-scenarios.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/reaggregation-semi-additive-1.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/reaggregation-semi-additive-2.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/reaggregation-supplier-tender.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/relationship-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/relationship-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/relationships.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/relay-host.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/release-lifecycle.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/release.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/rest-api-getstarted.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/rhel-add-node-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/rhel-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/rhel-delete-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/rhel-install-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/rhel-restore-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/rhel-start-stop-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/rhel-upgrade-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/rls-rule-builder-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/runtime-filter-apply.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/runtime-filter-operators.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/runtime-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/saml-configure-siteminder.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/saml-group-mapping.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/saml-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/saml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/schedule-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/schedule-materialization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/schema-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/schema-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/schema-examples.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/schema-not-found.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/schema-plan.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/schema-prepare.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/schema-script.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/schema-upload.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/schema-viewer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/scriptability.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search-actions.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search-assist-coach.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search-assist.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search-bar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search-choose-data-source.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search-columns.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search-conditional-formatting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search-data-refresh-time.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search-download.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search-drill-down.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search-growth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search-keyword.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search-proximity.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search-start.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search-subquery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search-suggestion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search-time.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/searches-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/secure-monitor-sw-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/secure-monitor-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/security-data-encryption.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/security-data-object.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/security-rls-concept.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/security-rls-implement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/security-rls.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/security-spotiq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/security-system.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/security-thoughtspot-lifecycle.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/send-logs-to-administrator.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/setup-with-gcp-mp.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/sharding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/share-answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/share-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/share-request-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/share-revoke-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/share-source-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/share-user-imported-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/share-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/share-worksheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/sharing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/show-underlying-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/signins.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/smc-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/smc-configure-nodes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/smc-connect-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/smc-hardware-requirements.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/smc-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/smc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/snapshots.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/snippet-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/spotiq-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/spotiq-comparative.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/spotiq-custom.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/spotiq-data-model-preferences.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/spotiq-feedback.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/spotiq-preferences.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/spotiq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/sql-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/stop-words.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/support-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/support-contact.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/support-handbook.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/support.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/sysadmin-cluster-upgrade.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/sysadmin-overview.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/system-alerts-events.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/system-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/system-monitor.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/system-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/system-worksheet.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/third-party.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/throughput.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tml-answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tml-import-export-multiple.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tml-joins.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tml-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tml-sql-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tml-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tml-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tml-worksheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tql-cli-commands.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tql-service-api-ref.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tql-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/troubleshooting-blanks.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/troubleshooting-browser-cache.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/troubleshooting-certificate.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/troubleshooting-char-encoding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/troubleshooting-connectivity.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/troubleshooting-formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/troubleshooting-generate-har-file.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/troubleshooting-intro-data-int.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/troubleshooting-load.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/troubleshooting-logs-share.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/troubleshooting-logs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/troubleshooting-timezone.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/troubleshooting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/trusted-authentication.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/ts-bi-server.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tscli-command-ref.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tsload-api-flags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tsload-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tsload-connector.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tsload-import-csv.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tsload-script.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/tsload.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/use-agreement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/user-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/user-onboarding-experience.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/user-profile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/user-request-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/user-sign-up.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/users-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/users.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/view-dematerialize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/view-materialize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/view-refresh.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/views-examples.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/views-materialized.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/views-searches.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/visualize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/vmware-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/vmware-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/vmware-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/vmware.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/whats-new-8-4-1-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/whats-new-8-8-0-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/whats-new-8-8-1-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/whats-new-9-0-0-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/whats-new-9-0-1-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/windows-deploy-ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/windows-odbc-tracing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/worksheet-create-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/worksheet-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/worksheet-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/worksheet-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/worksheet-filter.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/worksheet-formula.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/worksheet-inclusion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/worksheet-progressive-joins.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/worksheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/accessibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/accessing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/action-codes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/active-directory-federated-services.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/active-directory.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-authentication-active-directory.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-authentication-local.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-authentication-saml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-customize-help.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-nas-mount-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-onboarding-email-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-performance-tracking.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-reverse-ssh-tunnel.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-search-spotiq-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-smtp-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-snapshot-manage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-ssl-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-style-customization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-system-alerts-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-system-cluster-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-system-information-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-table-status-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-user-adoption-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal-users.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-portal.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/admin-sign-in.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/administration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/aggregation-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/alerts-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/analyst-onboarding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/analyst.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/answer-experience-new.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/answer-explorer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/audit-logs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/authentication.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/automated-answer-creation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/aws-backup-restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/aws-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/aws-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/aws-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/aws-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/aws-prepare-vms.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/azure-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/azure-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/azure-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/azure-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/backup-configure-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/backup-manual.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/backup-modes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/backup-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/backup-strategy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/business-user.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/cable-networking.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/case-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-area-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-area.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-axes-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-bar-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-bar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-bubble.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-candlestick.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-color-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-column-axis-rename.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-column-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-column-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-column-visibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-column.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-data-labels.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-data-markers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-funnel.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-geo-area.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-geo-bubble.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-geo-heatmap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-geo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-gridlines.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-heatmap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-high-cardinality.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-html.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-kpi.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-line-column-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-line-column.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-line.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-lock-type.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-pareto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-pie.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-pivot-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-radar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-regression-line.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-sankey.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-scatter.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-table-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-treemap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-types.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-waterfall.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-x-axis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-y-axis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chart-zoom.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/charts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/chasm-trap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/cluster-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/cluster-manager.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/cluster-replacement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/components.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connection-share.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-adw-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-adw-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-adw-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-adw-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-adw-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-adw-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-adw-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-adw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-aws-secrets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-cust-cal-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-cust-cal-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-cust-cal-update.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-cust-cal.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-databricks-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-databricks-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-databricks-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-databricks-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-databricks-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-databricks-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-databricks-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-databricks-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-databricks.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-denodo-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-denodo-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-denodo-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-denodo-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-denodo-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-denodo-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-denodo-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-denodo-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-denodo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-dremio-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-dremio-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-dremio-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-dremio-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-dremio-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-dremio-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-dremio-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-dremio-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-dremio.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-external-tables-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-gbq-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-gbq-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-gbq-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-gbq-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-gbq-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-gbq-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-gbq-ingress.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-gbq-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-gbq-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-gbq-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-gbq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-hana-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-hana-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-hana-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-hana-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-hana-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-hana-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-hana-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-hana.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-passthrough.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-postgresql-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-postgresql-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-postgresql-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-postgresql-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-postgresql-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-presto-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-presto-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-presto-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-presto-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-presto-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-presto-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-presto-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-presto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-query-tags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-redshift-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-redshift-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-redshift-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-redshift-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-redshift-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-redshift-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-redshift-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-redshift-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-redshift-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-redshift-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-redshift.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-snowflake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-snowflake-azure-ad-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-snowflake-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-snowflake-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-snowflake-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-snowflake-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-snowflake-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-snowflake-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-snowflake-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-snowflake-okta-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-snowflake-partner.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-snowflake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-snowflake-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-snowflake-tutorial.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-snowflake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-starburst-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-starburst-azure-ad-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-starburst-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-starburst-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-starburst-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-starburst-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-starburst-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-starburst-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-starburst-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-starburst.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-synapse-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-synapse-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-synapse-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-synapse-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-synapse-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-synapse-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-synapse-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-synapse-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-synapse.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-teradata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-teradata-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-teradata-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-teradata-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-teradata-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-teradata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-teradata-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-teradata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-trino-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-trino-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-trino-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-trino-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-trino-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-trino-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-trino-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections-trino.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/connections.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/constraints.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/consumption-pricing-query-based-generate.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/consumption-pricing-query-based-subscription.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/consumption-pricing-query-based.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/consumption-pricing-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/consumption-pricing-time-based.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/consumption-pricing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/custom-calendar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/customer-os-add-node.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/customer-os-ansible-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/customer-os-artifacts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/customer-os-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/customer-os-offline-script.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/customer-os-packages.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/customer-os-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/customer-os-untar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/customer-os-upgrade.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/customer-os.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/customization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/customize-background.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/customize-color-palettes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/customize-fonts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/customize-footer-text.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/customize-logo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/customize-style.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-api-calling.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-api-get.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-api-pagination.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-api-search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-caching.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-compression.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-engineer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-import-ui.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-integration-troubleshooting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-load-date-formats.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-load.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-modeling-aggreg-additive.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-modeling-attributable-dimension.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-modeling-column-basics.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-modeling-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-modeling-geo-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-modeling-index.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-modeling-patterns.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-modeling-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-modeling-synonym.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-modeling-visibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-modeling.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-profile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-source-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-type-conversion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-types.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data-workspace.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-administration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-amazon-aurora-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-amazon-aurora-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-amazon-aurora-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-amazon-aurora.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-amazon-redshift-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-amazon-redshift-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-amazon-redshift-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-amazon-redshift.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-amazon-s3-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-amazon-s3-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-amazon-s3-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-amazon-s3.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-applications.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-azure-blob-storage-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-azure-blob-storage-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-azure-blob-storage-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-azure-blob-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-azure-synapse-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-azure-synapse-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-azure-synapse-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-azure-synapse.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-cassandra-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-cassandra-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-cassandra-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-cassandra.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-databases.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-databricks-delta-lake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-databricks-delta-lake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-databricks-delta-lake-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-databricks-delta-lake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-denodo-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-denodo-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-denodo-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-denodo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-dremio-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-dremio-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-dremio-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-dremio.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-exadata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-exadata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-exadata-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-exadata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-files-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-files-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-files-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-files.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-filesystems.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-google-bigquery-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-google-bigquery-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-google-bigquery-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-google-bigquery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-google-cloud-storage-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-google-cloud-storage-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-google-cloud-storage-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-google-cloud-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-google-sheets-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-google-sheets-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-google-sheets-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-google-sheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-greenplum-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-greenplum-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-greenplum-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-greenplum-utilities.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-greenplum.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-hdfs-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-hdfs-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-hdfs-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-hdfs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-hive-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-hive-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-hive-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-hive.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-home.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-ibm-db2-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-ibm-db2-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-ibm-db2-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-ibm-db2.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-impala-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-impala-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-impala-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-impala.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-jdbc-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-jdbc-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-jdbc-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-jdbc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-key-features.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-mail-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-mariadb-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-mariadb-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-mariadb-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-mariadb.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-memsql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-memsql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-memsql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-memsql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-mongodb-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-mongodb-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-mongodb-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-mongodb.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-mysql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-mysql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-mysql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-mysql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-netezza-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-netezza-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-netezza-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-netezza.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-oracle-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-oracle-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-oracle-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-oracle.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-others.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-postgresql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-presto-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-presto-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-presto-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-presto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-requirements-guidelines.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-rest-api-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-rest-api-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-rest-api-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-rest-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-salesforce-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-salesforce-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-salesforce-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-salesforce.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sap-adaptive-server-enterprise-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sap-adaptive-server-enterprise-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sap-adaptive-server-enterprise-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sap-adaptive-server-enterprise.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sap-hana-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sap-hana-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sap-hana-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sap-hana.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sap-sql-anywhere-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sap-sql-anywhere-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sap-sql-anywhere-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sap-sql-anywhere.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sas-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sas-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sas-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-security-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-snowflake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-snowflake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-snowflake-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-snowflake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-splice-machine-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-splice-machine-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-splice-machine-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-splice-machine.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-splunk-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-splunk-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-splunk-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-splunk.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sql-server-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sql-server-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sql-server-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-sql-server.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-teradata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-teradata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-teradata-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-teradata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-tips.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-user-management-sso.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-vertica-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-vertica-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-vertica-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-vertica.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow-workflow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dataflow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dbt-integration-metadata-tags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dbt-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dell-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dell-configure-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dell-configure-nodes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dell-connect-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dell-hardware-requirements.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dell-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dell.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/deploying-cloud.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/deployment-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/deployment-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/deprecation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/developer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/disaster-recovery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/disk-failure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/downloads.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/dr-config.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/early-access-enable.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/embed-full.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/embed-methods.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/embed-viz.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/embedding-overview.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/embedding-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/embedding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/end-of-service-centos.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/end-of-service.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/falcon-monitor.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/faq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/filter-bulk.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/filter-chart-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/filter-chart.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/filter-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/filter-null.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/fixed.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/formula-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/formula-answer-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/formula-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/formulas-aggregation-filtered.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/formulas-aggregation-flexible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/formulas-aggregation-group.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/formulas-aggregation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/formulas-chasm-trap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/formulas-conversion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/formulas-cumulative.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/formulas-date.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/formulas-logical-operations.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/formulas-moving.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/formulas-nested.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/formulas-percent.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/formulas-simple-operations.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/gcp-backup-restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/gcp-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/gcp-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/gcp-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/gcp-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/gcp.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/geomap-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/geomaps-custom.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/getting-started.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/glossary.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/group-aggregation-basic.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/group-aggregation-customize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/group-aggregation-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/group-aggregation-formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/group-aggregation-inner.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/group-aggregation-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/group-aggregation-querygroups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/group-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/groups-privileges.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/ha-aws-efs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/ha-resilience.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/hardware-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/hardware-deployment.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/help-center.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/index_help.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/index.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/installation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/internal-auth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/it-ops.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/jdbc-driver-use.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/jdbc-driver.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/jdbc-logging.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/jdbc-odbc-prereqs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/jdbc-pentaho.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/join-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/join-worksheet-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/js-api-enable.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/js-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords-da-DK.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords-de-DE.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords-en-US.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords-es-ES.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords-es-US.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords-fi-FI.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords-fr-CA.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords-fr-FR.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords-it-IT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords-ja-JP.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords-nb-NO.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords-nl-NL.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords-pt-BR.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords-pt-PT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords-sv-SE.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords-zh-CN.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords-zh-HANT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/keywords.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/known.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/ldap-config-ad.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/ldap-ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/ldap-sync-users-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/ldap-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/ldap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-chart-reset.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-copy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-download-pdf.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-experience-new.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-filters-linked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-filters-mandatory.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-filters-selective.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-gating-condition-example.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-granular-permission.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-hyperlink.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-layout-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-link-copy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-slideshow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-tabs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboard-visualization-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/load-balancer-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/load-csv.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/locale-set.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/locale.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/login-console.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/logins-admin.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/migration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/mobile-deploy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/mobile-faq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/mobile-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/model-data-ui.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/monitoring-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/multiple-sources-windows.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/nas-mount-backup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/nas-mount.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/navigating-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/network-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/node-failure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/nodesconfig-example.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/notes-mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/notes-release-mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/notes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/object-usage-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/odbc-best-practices.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/odbc-driver-ssis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/odbc-enable-log.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/odbc-jdbc-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/odbc-jdbc-sql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/odbc-linux-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/odbc-windows-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/odbc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/oidc-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/onboarding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/opensource.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/parameters-cluster-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/parameters-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/parameters-nodesconfig.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/parameters-use.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/pdfs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/performance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/ports.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/practice.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/privileges-end-user.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/public-api-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/r-answers-save-share.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/r-scripts-run.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/r-scripts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/r-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/reaggregation-average-rates.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/reaggregation-scenarios.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/reaggregation-semi-additive-1.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/reaggregation-semi-additive-2.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/reaggregation-supplier-tender.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/relationship-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/relationship-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/relationships.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/relay-host.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/release-lifecycle.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/release.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/rest-api-getstarted.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/rhel-add-node-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/rhel-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/rhel-delete-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/rhel-install-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/rhel-restore-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/rhel-start-stop-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/rhel-upgrade-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/rls-rule-builder-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/runtime-filter-apply.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/runtime-filter-operators.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/runtime-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/saml-configure-siteminder.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/saml-group-mapping.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/saml-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/saml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/schedule-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/schedule-materialization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/schema-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/schema-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/schema-examples.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/schema-not-found.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/schema-plan.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/schema-prepare.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/schema-script.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/schema-upload.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/schema-viewer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/scriptability.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search-actions.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search-assist-coach.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search-assist.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search-bar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search-choose-data-source.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search-columns.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search-conditional-formatting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search-data-refresh-time.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search-download.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search-drill-down.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search-growth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search-keyword.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search-proximity.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search-start.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search-subquery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search-suggestion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search-time.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/searches-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/secure-monitor-sw-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/secure-monitor-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/security-data-encryption.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/security-data-object.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/security-rls-concept.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/security-rls-implement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/security-rls.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/security-spotiq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/security-system.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/security-thoughtspot-lifecycle.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/send-logs-to-administrator.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/setup-with-gcp-mp.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/sharding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/share-answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/share-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/share-request-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/share-revoke-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/share-source-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/share-user-imported-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/share-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/share-worksheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/sharing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/show-underlying-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/signins.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/smc-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/smc-configure-nodes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/smc-connect-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/smc-hardware-requirements.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/smc-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/smc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/snapshots.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/snippet-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/spotiq-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/spotiq-comparative.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/spotiq-custom.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/spotiq-data-model-preferences.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/spotiq-feedback.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/spotiq-preferences.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/spotiq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/sql-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/stop-words.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/support-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/support-contact.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/support-handbook.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/support.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/sysadmin-cluster-upgrade.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/sysadmin-overview.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/system-alerts-events.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/system-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/system-monitor.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/system-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/system-worksheet.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/third-party.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/throughput.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tml-answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tml-import-export-multiple.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tml-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tml-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tml-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tml-worksheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tql-cli-commands.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tql-service-api-ref.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tql-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/troubleshooting-blanks.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/troubleshooting-browser-cache.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/troubleshooting-certificate.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/troubleshooting-char-encoding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/troubleshooting-connectivity.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/troubleshooting-formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/troubleshooting-generate-har-file.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/troubleshooting-intro-data-int.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/troubleshooting-load.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/troubleshooting-logs-share.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/troubleshooting-logs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/troubleshooting-timezone.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/troubleshooting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/trusted-authentication.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tscli-command-ref.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tsload-api-flags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tsload-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tsload-connector.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tsload-import-csv.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tsload-script.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/tsload.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/use-agreement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/user-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/user-onboarding-experience.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/user-profile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/user-request-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/user-sign-up.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/users-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/users.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/view-dematerialize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/view-materialize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/view-refresh.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/views-examples.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/views-materialized.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/views-searches.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/visualize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/vmware-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/vmware-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/vmware-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/vmware.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/whats-new-8-4-1-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/whats-new-8-8-0-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/whats-new-8-8-1-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/whats-new-9-0-0-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/windows-deploy-ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/windows-odbc-tracing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/worksheet-create-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/worksheet-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/worksheet-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/worksheet-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/worksheet-filter.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/worksheet-formula.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/worksheet-inclusion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/worksheet-progressive-joins.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/worksheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/accessibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/accessing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/action-codes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/active-directory-federated-services.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/active-directory.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-authentication-active-directory.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-authentication-local.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-authentication-saml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-customize-help.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-nas-mount-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-onboarding-email-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-performance-tracking.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-reverse-ssh-tunnel.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-search-spotiq-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-smtp-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-snapshot-manage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-ssl-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-style-customization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-system-alerts-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-system-cluster-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-system-information-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-table-status-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-user-adoption-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal-users.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-portal.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/admin-sign-in.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/administration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/aggregation-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/al2-add-node.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/al2-install-offline.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/al2-install-online.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/al2-packages.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/al2-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/al2-ts-artifacts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/al2-upgrade.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/al2.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/alerts-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/analyst-onboarding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/analyst.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/answer-experience-new.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/answer-explorer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/audit-logs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/authentication.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/automated-answer-creation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/aws-backup-restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/aws-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/aws-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/aws-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/aws-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/aws-prepare-vms.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/azure-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/azure-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/azure-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/azure-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/backup-configure-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/backup-manual.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/backup-modes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/backup-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/backup-strategy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/business-user.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/cable-networking.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/case-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-area-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-area.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-axes-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-bar-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-bar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-bubble.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-candlestick.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-color-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-column-axis-rename.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-column-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-column-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-column-visibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-column.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-data-labels.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-data-markers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-funnel.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-geo-area.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-geo-bubble.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-geo-heatmap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-geo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-gridlines.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-heatmap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-high-cardinality.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-html.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-kpi.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-line-column-stacked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-line-column.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-line.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-lock-type.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-pareto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-pie.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-pivot-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-radar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-regression-line.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-sankey.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-scatter.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-table-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-treemap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-types.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-waterfall.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-x-axis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-y-axis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chart-zoom.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/charts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/chasm-trap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/cluster-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/cluster-manager.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/cluster-replacement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/components.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-adw-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-adw-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-adw-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-adw-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-adw-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-adw-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-adw-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-adw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-aws-secrets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-cust-cal-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-cust-cal-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-cust-cal-update.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-cust-cal.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-databricks-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-databricks-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-databricks-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-databricks-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-databricks-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-databricks-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-databricks-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-databricks-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-databricks.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-denodo-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-denodo-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-denodo-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-denodo-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-denodo-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-denodo-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-denodo-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-denodo-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-denodo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-dremio-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-dremio-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-dremio-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-dremio-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-dremio-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-dremio-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-dremio-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-dremio-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-dremio.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-external-tables-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-gbq-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-gbq-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-gbq-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-gbq-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-gbq-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-gbq-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-gbq-ingress.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-gbq-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-gbq-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-gbq-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-gbq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-hana-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-hana-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-hana-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-hana-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-hana-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-hana-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-hana-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-hana.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-passthrough.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-presto-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-presto-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-presto-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-presto-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-presto-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-presto-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-presto-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-presto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-query-tags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-redshift-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-redshift-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-redshift-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-redshift-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-redshift-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-redshift-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-redshift-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-redshift-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-redshift-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-redshift-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-redshift.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-snowflake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-snowflake-azure-ad-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-snowflake-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-snowflake-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-snowflake-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-snowflake-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-snowflake-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-snowflake-external-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-snowflake-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-snowflake-okta-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-snowflake-partner.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-snowflake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-snowflake-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-snowflake-tutorial.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-snowflake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-starburst-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-starburst-azure-ad-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-starburst-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-starburst-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-starburst-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-starburst-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-starburst-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-starburst-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-starburst-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-starburst.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-synapse-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-synapse-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-synapse-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-synapse-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-synapse-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-synapse-oauth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-synapse-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-synapse-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-synapse.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-teradata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-teradata-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-teradata-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-teradata-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-teradata-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-teradata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-teradata-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-teradata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-trino-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-trino-delete-table-dependencies.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-trino-delete-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-trino-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-trino-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-trino-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-trino-remap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections-trino.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/connections.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/constraints.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/consumption-pricing-query-based-generate.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/consumption-pricing-query-based-subscription.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/consumption-pricing-query-based.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/consumption-pricing-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/consumption-pricing-time-based.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/consumption-pricing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/custom-calendar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/customization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/customize-background.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/customize-color-palettes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/customize-fonts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/customize-footer-text.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/customize-logo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/customize-style.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-api-calling.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-api-get.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-api-pagination.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-api-search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-caching.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-compression.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-engineer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-import-ui.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-integration-troubleshooting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-load-date-formats.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-load.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-modeling-aggreg-additive.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-modeling-attributable-dimension.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-modeling-column-basics.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-modeling-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-modeling-geo-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-modeling-index.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-modeling-patterns.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-modeling-settings.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-modeling-synonym.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-modeling-visibility.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-modeling.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-profile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-source-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-type-conversion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-types.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data-workspace.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-administration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-amazon-aurora-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-amazon-aurora-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-amazon-aurora-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-amazon-aurora.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-amazon-redshift-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-amazon-redshift-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-amazon-redshift-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-amazon-redshift.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-amazon-s3-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-amazon-s3-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-amazon-s3-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-amazon-s3.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-applications.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-azure-blob-storage-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-azure-blob-storage-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-azure-blob-storage-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-azure-blob-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-azure-synapse-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-azure-synapse-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-azure-synapse-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-azure-synapse.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-cassandra-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-cassandra-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-cassandra-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-cassandra.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-databases.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-databricks-delta-lake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-databricks-delta-lake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-databricks-delta-lake-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-databricks-delta-lake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-denodo-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-denodo-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-denodo-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-denodo.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-dremio-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-dremio-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-dremio-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-dremio.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-exadata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-exadata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-exadata-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-exadata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-files-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-files-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-files-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-files.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-filesystems.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-google-bigquery-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-google-bigquery-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-google-bigquery-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-google-bigquery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-google-cloud-storage-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-google-cloud-storage-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-google-cloud-storage-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-google-cloud-storage.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-google-sheets-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-google-sheets-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-google-sheets-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-google-sheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-greenplum-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-greenplum-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-greenplum-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-greenplum-utilities.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-greenplum.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-hdfs-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-hdfs-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-hdfs-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-hdfs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-hive-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-hive-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-hive-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-hive.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-home.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-ibm-db2-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-ibm-db2-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-ibm-db2-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-ibm-db2.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-impala-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-impala-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-impala-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-impala.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-jdbc-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-jdbc-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-jdbc-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-jdbc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-key-features.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-mail-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-mariadb-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-mariadb-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-mariadb-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-mariadb.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-memsql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-memsql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-memsql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-memsql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-mongodb-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-mongodb-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-mongodb-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-mongodb.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-mysql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-mysql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-mysql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-mysql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-netezza-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-netezza-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-netezza-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-netezza.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-oracle-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-oracle-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-oracle-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-oracle.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-others.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-postgresql-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-postgresql-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-postgresql-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-postgresql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-presto-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-presto-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-presto-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-presto.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-requirements-guidelines.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-rest-api-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-rest-api-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-rest-api-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-rest-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-salesforce-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-salesforce-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-salesforce-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-salesforce.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sap-adaptive-server-enterprise-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sap-adaptive-server-enterprise-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sap-adaptive-server-enterprise-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sap-adaptive-server-enterprise.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sap-hana-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sap-hana-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sap-hana-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sap-hana.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sap-sql-anywhere-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sap-sql-anywhere-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sap-sql-anywhere-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sap-sql-anywhere.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sas-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sas-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sas-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-security-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-snowflake-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-snowflake-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-snowflake-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-snowflake.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-splice-machine-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-splice-machine-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-splice-machine-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-splice-machine.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-splunk-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-splunk-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-splunk-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-splunk.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sql-server-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sql-server-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sql-server-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-sql-server.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-teradata-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-teradata-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-teradata-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-teradata.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-tips.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-user-management-sso.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-vertica-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-vertica-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-vertica-sync.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-vertica.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow-workflow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dataflow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dbt-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dell-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dell-configure-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dell-configure-nodes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dell-connect-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dell-hardware-requirements.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dell-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dell.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/deploying-cloud.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/deployment-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/deployment-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/deprecation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/developer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/disaster-recovery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/disk-failure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/downloads.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/dr-config.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/embed-full.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/embed-methods.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/embed-viz.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/embedding-overview.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/embedding-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/embedding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/end-of-service-centos.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/end-of-service.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/falcon-monitor.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/faq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/filter-bulk.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/filter-chart-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/filter-chart.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/filter-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/filter-null.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/fixed.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/formula-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/formula-answer-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/formula-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/formulas-aggregation-filtered.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/formulas-aggregation-flexible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/formulas-aggregation-group.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/formulas-aggregation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/formulas-chasm-trap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/formulas-conversion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/formulas-cumulative.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/formulas-date.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/formulas-logical-operations.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/formulas-moving.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/formulas-nested.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/formulas-percent.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/formulas-simple-operations.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/gcp-backup-restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/gcp-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/gcp-configuration-options.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/gcp-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/gcp-launch-instance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/gcp.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/geomap-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/getting-started.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/glossary.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/group-aggregation-basic.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/group-aggregation-customize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/group-aggregation-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/group-aggregation-formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/group-aggregation-inner.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/group-aggregation-intro.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/group-aggregation-querygroups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/group-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/groups-privileges.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/ha-aws-efs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/ha-resilience.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/hardware-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/hardware-deployment.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/help-center.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/index_help.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/index.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/installation.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/internal-auth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/it-ops.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/jdbc-driver-use.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/jdbc-driver.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/jdbc-logging.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/jdbc-odbc-prereqs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/jdbc-pentaho.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/join-add.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/join-worksheet-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/js-api-enable.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/js-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords-da-DK.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords-de-DE.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords-en-US.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords-es-ES.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords-es-US.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords-fi-FI.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords-fr-CA.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords-fr-FR.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords-it-IT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords-ja-JP.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords-nb-NO.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords-nl-NL.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords-pt-BR.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords-pt-PT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords-sv-SE.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords-zh-CN.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords-zh-HANT.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/keywords.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/known.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/ldap-config-ad.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/ldap-ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/ldap-sync-users-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/ldap-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/ldap.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboard-chart-reset.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboard-copy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboard-download-pdf.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboard-experience-new.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboard-filters-linked.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboard-filters-selective.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboard-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboard-gating-condition-example.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboard-granular-permission.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboard-hyperlink.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboard-layout-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboard-link-copy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboard-schedule.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboard-search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboard-slideshow.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboard-tabs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboard-visualization-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/load-balancer-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/load-csv.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/locale-set.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/locale.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/login-console.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/logins-admin.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/migration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/mobile-deploy.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/mobile-faq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/mobile-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/model-data-ui.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/monitoring-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/multiple-sources-windows.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/nas-mount-backup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/nas-mount.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/navigating-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/network-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/node-failure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/nodesconfig-example.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/notes-mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/notes-release-mobile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/notes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/object-usage-liveboard.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/odbc-best-practices.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/odbc-driver-ssis.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/odbc-enable-log.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/odbc-jdbc-configuration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/odbc-jdbc-sql.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/odbc-linux-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/odbc-windows-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/odbc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/oidc-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/onboarding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/opensource.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/parameters-cluster-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/parameters-nodesconfig.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/performance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/ports.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/practice.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/privileges-end-user.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/public-api-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/python-upgrade.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/r-answers-save-share.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/r-scripts-run.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/r-scripts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/r-thoughtspot.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/reaggregation-average-rates.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/reaggregation-scenarios.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/reaggregation-semi-additive-1.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/reaggregation-semi-additive-2.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/reaggregation-supplier-tender.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/relationship-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/relationship-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/relationships.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/relay-host.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/release.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/rest-api-getstarted.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/restore.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/rhel-add-node-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/rhel-add-node.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/rhel-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/rhel-delete-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/rhel-install-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/rhel-install-offline.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/rhel-install-online.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/rhel-packages.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/rhel-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/rhel-restore-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/rhel-start-stop-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/rhel-ts-artifacts.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/rhel-upgrade-ansible.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/rhel-upgrade.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/rhel.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/rls-rule-builder-reference.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/runtime-filter-apply.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/runtime-filter-operators.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/runtime-filters.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/saml-configure-siteminder.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/saml-group-mapping.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/saml-integration.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/saml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/schedule-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/schedule-materialization.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/schema-change.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/schema-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/schema-examples.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/schema-not-found.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/schema-plan.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/schema-prepare.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/schema-script.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/schema-upload.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/schema-viewer.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/scriptability.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search-actions.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search-assist-coach.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search-assist.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search-bar.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search-choose-data-source.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search-columns.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search-conditional-formatting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search-data-refresh-time.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search-download.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search-drill-down.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search-growth.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search-keyword.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search-proximity.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search-start.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search-subquery.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search-suggestion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search-time.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/search.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/searches-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/secure-monitor-sw-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/secure-monitor-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/security-data-encryption.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/security-data-object.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/security-rls-concept.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/security-rls-implement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/security-rls.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/security-spotiq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/security-system.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/security-thoughtspot-lifecycle.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/send-logs-to-administrator.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/setup-with-gcp-mp.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/sharding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/share-answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/share-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/share-request-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/share-revoke-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/share-source-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/share-user-imported-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/share-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/share-worksheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/sharing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/show-underlying-data.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/signins.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/smc-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/smc-configure-nodes.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/smc-connect-appliance.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/smc-hardware-requirements.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/smc-prerequisites.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/smc.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/snapshots.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/snippet-test.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/spotiq-best.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/spotiq-comparative.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/spotiq-custom.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/spotiq-data-model-preferences.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/spotiq-feedback.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/spotiq-preferences.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/spotiq.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/sql-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/stop-words.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/support-configure.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/support-contact.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/support-handbook.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/support.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/sysadmin-cluster-upgrade.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/sysadmin-overview.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/system-alerts-events.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/system-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/system-monitor.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/system-security.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/system-worksheet.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/third-party.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/throughput.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tml-answers.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tml-import-export-multiple.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tml-joins.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tml-liveboards.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tml-sql-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tml-tables.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tml-views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tml-worksheets.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tml.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tql-cli-commands.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tql-service-api-ref.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tql-table.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/troubleshooting-blanks.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/troubleshooting-browser-cache.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/troubleshooting-certificate.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/troubleshooting-char-encoding.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/troubleshooting-connectivity.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/troubleshooting-formulas.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/troubleshooting-generate-har-file.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/troubleshooting-intro-data-int.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/troubleshooting-load.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/troubleshooting-logs-share.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/troubleshooting-logs.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/troubleshooting-timezone.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/troubleshooting.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/trusted-authentication.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/ts-bi-server.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tscli-command-ref.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tsload-api-flags.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tsload-api.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tsload-connector.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tsload-import-csv.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tsload-script.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/tsload.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/use-agreement.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/user-management.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/user-onboarding-experience.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/user-profile.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/user-request-access.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/user-sign-up.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/users-groups.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/users.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/view-dematerialize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/view-materialize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/view-refresh.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/views-examples.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/views-materialized.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/views-searches.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/views.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/visualize.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/vmware-cluster-install.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/vmware-installing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/vmware-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/vmware.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/whats-new-8-4-1-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/whats-new-8-8-0-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/whats-new-8-8-1-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/whats-new-9-0-1-sw.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/windows-deploy-ssl.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/windows-odbc-tracing.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/worksheet-create-setup.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/worksheet-create.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/worksheet-delete.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/worksheet-edit.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/worksheet-filter.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/worksheet-formula.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/worksheet-inclusion.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/worksheet-progressive-joins.html + 2024-10-15T18:11:33.646Z + + + https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/worksheets.html + 2024-10-15T18:11:33.646Z + + \ No newline at end of file diff --git a/home/modules/ROOT/images/cloud.png b/home/modules/ROOT/images/cloud.png new file mode 100644 index 00000000..6db320e4 Binary files /dev/null and b/home/modules/ROOT/images/cloud.png differ diff --git a/home/modules/ROOT/images/developer.png b/home/modules/ROOT/images/developer.png new file mode 100644 index 00000000..2024f6bf Binary files /dev/null and b/home/modules/ROOT/images/developer.png differ diff --git a/home/modules/ROOT/images/free-trial-account-expiry.png b/home/modules/ROOT/images/free-trial-account-expiry.png new file mode 100644 index 00000000..d93e6f3f Binary files /dev/null and b/home/modules/ROOT/images/free-trial-account-expiry.png differ diff --git a/home/modules/ROOT/images/free-trial-add-connection-redshift.png b/home/modules/ROOT/images/free-trial-add-connection-redshift.png new file mode 100644 index 00000000..4d208d93 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-add-connection-redshift.png differ diff --git a/home/modules/ROOT/images/free-trial-add-snowflake-connection.png b/home/modules/ROOT/images/free-trial-add-snowflake-connection.png new file mode 100644 index 00000000..97f7a072 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-add-snowflake-connection.png differ diff --git a/home/modules/ROOT/images/free-trial-checklist-exit.png b/home/modules/ROOT/images/free-trial-checklist-exit.png new file mode 100644 index 00000000..d9c11da5 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-checklist-exit.png differ diff --git a/home/modules/ROOT/images/free-trial-confirm-meeting.png b/home/modules/ROOT/images/free-trial-confirm-meeting.png new file mode 100644 index 00000000..990628e6 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-confirm-meeting.png differ diff --git a/home/modules/ROOT/images/free-trial-connection-confirm.png b/home/modules/ROOT/images/free-trial-connection-confirm.png new file mode 100644 index 00000000..dfeac119 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-connection-confirm.png differ diff --git a/home/modules/ROOT/images/free-trial-countdown-banner-1.png b/home/modules/ROOT/images/free-trial-countdown-banner-1.png new file mode 100644 index 00000000..2ceb634c Binary files /dev/null and b/home/modules/ROOT/images/free-trial-countdown-banner-1.png differ diff --git a/home/modules/ROOT/images/free-trial-countdown-banner-7.png b/home/modules/ROOT/images/free-trial-countdown-banner-7.png new file mode 100644 index 00000000..defbb442 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-countdown-banner-7.png differ diff --git a/home/modules/ROOT/images/free-trial-csv-delete-dependencies.png b/home/modules/ROOT/images/free-trial-csv-delete-dependencies.png new file mode 100644 index 00000000..918a777d Binary files /dev/null and b/home/modules/ROOT/images/free-trial-csv-delete-dependencies.png differ diff --git a/home/modules/ROOT/images/free-trial-data-connections.png b/home/modules/ROOT/images/free-trial-data-connections.png new file mode 100644 index 00000000..e8b176ee Binary files /dev/null and b/home/modules/ROOT/images/free-trial-data-connections.png differ diff --git a/home/modules/ROOT/images/free-trial-data-security.png b/home/modules/ROOT/images/free-trial-data-security.png new file mode 100644 index 00000000..6e3dc6c5 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-data-security.png differ diff --git a/home/modules/ROOT/images/free-trial-duplicate-columns.png b/home/modules/ROOT/images/free-trial-duplicate-columns.png new file mode 100644 index 00000000..734ea57a Binary files /dev/null and b/home/modules/ROOT/images/free-trial-duplicate-columns.png differ diff --git a/home/modules/ROOT/images/free-trial-embrace-intercom.png b/home/modules/ROOT/images/free-trial-embrace-intercom.png new file mode 100644 index 00000000..0e243742 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-embrace-intercom.png differ diff --git a/home/modules/ROOT/images/free-trial-embrace-table-columns.png b/home/modules/ROOT/images/free-trial-embrace-table-columns.png new file mode 100644 index 00000000..a8d71764 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-embrace-table-columns.png differ diff --git a/home/modules/ROOT/images/free-trial-error-report.png b/home/modules/ROOT/images/free-trial-error-report.png new file mode 100644 index 00000000..7cb2ed41 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-error-report.png differ diff --git a/home/modules/ROOT/images/free-trial-expert-calendar.png b/home/modules/ROOT/images/free-trial-expert-calendar.png new file mode 100644 index 00000000..8f37cbca Binary files /dev/null and b/home/modules/ROOT/images/free-trial-expert-calendar.png differ diff --git a/home/modules/ROOT/images/free-trial-invite-others.png b/home/modules/ROOT/images/free-trial-invite-others.png new file mode 100644 index 00000000..f75cb37f Binary files /dev/null and b/home/modules/ROOT/images/free-trial-invite-others.png differ diff --git a/home/modules/ROOT/images/free-trial-invite.png b/home/modules/ROOT/images/free-trial-invite.png new file mode 100644 index 00000000..85692662 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-invite.png differ diff --git a/home/modules/ROOT/images/free-trial-invited-spotiq.png b/home/modules/ROOT/images/free-trial-invited-spotiq.png new file mode 100644 index 00000000..080d6ffc Binary files /dev/null and b/home/modules/ROOT/images/free-trial-invited-spotiq.png differ diff --git a/home/modules/ROOT/images/free-trial-learn-more.png b/home/modules/ROOT/images/free-trial-learn-more.png new file mode 100644 index 00000000..45b322a5 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-learn-more.png differ diff --git a/home/modules/ROOT/images/free-trial-login-email-address.png b/home/modules/ROOT/images/free-trial-login-email-address.png new file mode 100644 index 00000000..66bc263f Binary files /dev/null and b/home/modules/ROOT/images/free-trial-login-email-address.png differ diff --git a/home/modules/ROOT/images/free-trial-no-search-prompt.png b/home/modules/ROOT/images/free-trial-no-search-prompt.png new file mode 100644 index 00000000..f17a39dd Binary files /dev/null and b/home/modules/ROOT/images/free-trial-no-search-prompt.png differ diff --git a/home/modules/ROOT/images/free-trial-password-checklist.png b/home/modules/ROOT/images/free-trial-password-checklist.png new file mode 100644 index 00000000..65a9a0ac Binary files /dev/null and b/home/modules/ROOT/images/free-trial-password-checklist.png differ diff --git a/home/modules/ROOT/images/free-trial-password-reset.png b/home/modules/ROOT/images/free-trial-password-reset.png new file mode 100644 index 00000000..3a4b1e56 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-password-reset.png differ diff --git a/home/modules/ROOT/images/free-trial-preexisting-join.png b/home/modules/ROOT/images/free-trial-preexisting-join.png new file mode 100644 index 00000000..b9710f75 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-preexisting-join.png differ diff --git a/home/modules/ROOT/images/free-trial-search-prompt.png b/home/modules/ROOT/images/free-trial-search-prompt.png new file mode 100644 index 00000000..cc2e021c Binary files /dev/null and b/home/modules/ROOT/images/free-trial-search-prompt.png differ diff --git a/home/modules/ROOT/images/free-trial-snowflake-partner-connect.png b/home/modules/ROOT/images/free-trial-snowflake-partner-connect.png new file mode 100644 index 00000000..b9a0591a Binary files /dev/null and b/home/modules/ROOT/images/free-trial-snowflake-partner-connect.png differ diff --git a/home/modules/ROOT/images/free-trial-snowflake-url.png b/home/modules/ROOT/images/free-trial-snowflake-url.png new file mode 100644 index 00000000..6e9b5038 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-snowflake-url.png differ diff --git a/home/modules/ROOT/images/free-trial-username-error.png b/home/modules/ROOT/images/free-trial-username-error.png new file mode 100644 index 00000000..19748f04 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-username-error.png differ diff --git a/home/modules/ROOT/images/free-trial-view-details.png b/home/modules/ROOT/images/free-trial-view-details.png new file mode 100644 index 00000000..fce95f16 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-view-details.png differ diff --git a/home/modules/ROOT/images/free-trial-whats-new.png b/home/modules/ROOT/images/free-trial-whats-new.png new file mode 100644 index 00000000..77704527 Binary files /dev/null and b/home/modules/ROOT/images/free-trial-whats-new.png differ diff --git a/home/modules/ROOT/images/icon-help-10px.png b/home/modules/ROOT/images/icon-help-10px.png new file mode 100644 index 00000000..27234762 Binary files /dev/null and b/home/modules/ROOT/images/icon-help-10px.png differ diff --git a/home/modules/ROOT/images/just-logo-black-40px.png b/home/modules/ROOT/images/just-logo-black-40px.png new file mode 100644 index 00000000..82a9e498 Binary files /dev/null and b/home/modules/ROOT/images/just-logo-black-40px.png differ diff --git a/home/modules/ROOT/images/mode.png b/home/modules/ROOT/images/mode.png new file mode 100644 index 00000000..c10523f7 Binary files /dev/null and b/home/modules/ROOT/images/mode.png differ diff --git a/home/modules/ROOT/images/mode_g.svg b/home/modules/ROOT/images/mode_g.svg new file mode 100644 index 00000000..93bfa8a0 --- /dev/null +++ b/home/modules/ROOT/images/mode_g.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/home/modules/ROOT/images/reset-button.gif b/home/modules/ROOT/images/reset-button.gif new file mode 100644 index 00000000..2238dd01 Binary files /dev/null and b/home/modules/ROOT/images/reset-button.gif differ diff --git a/home/modules/ROOT/images/search-answers-bar.png b/home/modules/ROOT/images/search-answers-bar.png new file mode 100644 index 00000000..a93501b3 Binary files /dev/null and b/home/modules/ROOT/images/search-answers-bar.png differ diff --git a/home/modules/ROOT/images/search-answers-unicode.png b/home/modules/ROOT/images/search-answers-unicode.png new file mode 100644 index 00000000..32fe7ab3 Binary files /dev/null and b/home/modules/ROOT/images/search-answers-unicode.png differ diff --git a/home/modules/ROOT/images/send-to-slack.png b/home/modules/ROOT/images/send-to-slack.png new file mode 100644 index 00000000..def9aa2c Binary files /dev/null and b/home/modules/ROOT/images/send-to-slack.png differ diff --git a/home/modules/ROOT/images/software.png b/home/modules/ROOT/images/software.png new file mode 100644 index 00000000..83fa8edd Binary files /dev/null and b/home/modules/ROOT/images/software.png differ diff --git a/home/modules/ROOT/images/worksheet-saving-dialog.gif b/home/modules/ROOT/images/worksheet-saving-dialog.gif new file mode 100644 index 00000000..2bca0116 Binary files /dev/null and b/home/modules/ROOT/images/worksheet-saving-dialog.gif differ diff --git a/home/modules/ROOT/pages/free-trial__whats-new.adoc b/home/modules/ROOT/pages/free-trial__whats-new.adoc new file mode 100644 index 00000000..f8527ac3 --- /dev/null +++ b/home/modules/ROOT/pages/free-trial__whats-new.adoc @@ -0,0 +1,798 @@ +:page-layout: home + +++++ + + + + whats-new + + + + +
+

January 12, 2022

+
+
+

Free Trial Make It Shine

+
+

These are the changes we made to Free Trial this week:

+
+
+
    +
  • +

    We fixed a bug preventing new users from creating a Free Trial account using Snowflake Partner Connect. +Free Trial snowflake partner connect

    +
  • +
+
+
+
+
+
+

December 16, 2021

+
+
+

Free Trial Make It Shine

+
+

These are the changes we made to Free Trial this week:

+
+
+
    +
  • +

    Users now see search suggestions for indexed formula columns.

    +
  • +
  • +

    We fixed a bug causing queries with multiple one-to-many joins, or “fan trap” queries, to erroneously over-count data when the Primary Key/Foreign Key was not identified in metadata.

    +
  • +
+
+
+
+
+
+

December 9, 2021

+
+
+

Free Trial Make It Shine

+
+

These are the changes we made to Free Trial this week:

+
+
+
    +
  • +

    ThoughtSpot now displays rotating messages while loading the worksheet you create in Setup. +worksheet saving dialog

    +
  • +
  • +

    Users now see a warning to delete dependent objects before deleting or replacing uploaded CSV files from Free Trial. +free trial csv delete dependencies

    +
  • +
+
+
+
+
+
+

November 11, 2021

+
+
+

Free Trial Make It Shine

+
+

These are the changes we made to Free Trial this week:

+
+
+
    +
  • +

    When you create a connection in Setup, ThoughtSpot now automatically selects that connection for Step 2: model data and create a worksheet.

    +
  • +
  • +

    We fixed a bug that caused Intercom to relaunch when users click Upgrade now.

    +
  • +
  • +

    To avoid SQL syntax errors, duplicate column names in a worksheet now use the syntax table_name-column_name instead of table_name::column_name.

    +
  • +
  • +

    We removed the Snowflake OAuth option for creating a connection for Free Trial to prevent user confusion.

    +
  • +
+
+
+
+
+
+

October 21, 2021

+
+
+

ThoughtSpot Data Security

+
+

When you create a connection in ThoughtSpot, your data is only accessible to you and to the teammates you invite. +Your data remains in your data warehouse while you use ThoughtSpot to run live queries. +ThoughtSpot only stores your tables’ metadata and the index values you set for your columns. +You can now access information about ThoughtSpot’s Data Security policies from within Free Trial Setup.
+free trial data security

+
+
+

To learn more about data security in ThoughtSpot, see ThoughtSpot Cloud: Comprehensive Data Security for Analytics.

+
+
+
+

Free Trial Make It Shine

+
+

These are the changes we made to Free Trial this week:

+
+
+
    +
  • +

    We fixed a bug preventing the optional message entered when you invite a new user to Free Trial from displaying in the invited user’s email.

    +
  • +
  • +

    We fixed a bug that generated a message to contact your ThoughtSpot administrator upon clicking the Signup button. +Now, new users can proceed directly to the Sign up page.

    +
  • +
+
+
+
+
+
+

October 7, 2021

+
+
+

Free Trial Make It Shine

+
+

These are the changes we made to Free Trial this week:

+
+
+
    +
  • +

    Users now see an Intercom offer to provide help when they encounter an error setting up a connection.

    +
    +

    free trial embrace intercom

    +
    +
  • +
  • +

    Users can now click on the numbered steps at the top of the screen during Onboarding to proceed to the next step.

    +
  • +
+
+
+
+
+
+

September 30, 2021

+
+
+

Free Trial Make It Shine

+
+

These are the changes we made to Free Trial this week:

+
+
+
    +
  • +

    We fixed an issue where attempts to skip steps during Onboarding by clicking the numbered steps at the top of the screen caused loading delays.

    +
  • +
  • +

    We fixed an issue where the Free Trial "Invite others" feature created duplicate objects on the third-party service ThoughtSpot uses to send emails.

    +
  • +
  • +

    We fixed an issue where Redshift fact tables timed out during loading in the Modeling stage of Setup.

    +
  • +
+
+
+
+
+
+

September 20, 2021

+
+
+

Data source tooltips

+
+

ThoughtSpot allows you to search on multiple data sources as long as your sources are related by a join. +When you select the data source for your search, unrelated data sources gray out in the Data Sources side panel. +To find out why a data source is marked unavailable, click on the data source name for a tooltip explanation.

+
+
+
+

Free Trial Make It Shine

+
+

These are the changes we made to Free Trial this week:

+
+
+
    +
  • +

    We fixed toast notifications on the homepage to display multiple changes to the same component.

    +
  • +
  • +

    Users with accounts where the maximum file upload count is 0 no longer see the option to upload CSV files during setup.

    +
  • +
  • +

    Users can now exit 3-step setup at any time.

    +
    +

    free trial checklist exit

    +
    +
  • +
  • +

    Column titles in all capital letters now correct to title-case during auto-worksheet creation.

    +
  • +
+
+
+
+
+
+

Aug 19, 2021

+
+
+

Worksheet Column tooltips

+
+

When editing a Worksheet in the Columns tab, you can rename the columns, add searchable synonyms, change search indexing, among other options. +To learn more about changes you can make and about the default column behavior, hover over each column type to see a brief explanation of the column meaning. +In the example below, hovering over the “Hidden” column type reveals that selecting Yes removes a column from appearing during searches.

+
+
+
+

Free Trial Make It Shine

+
+

These are the changes we made to Free Trial this week:

+
+
+
    +
  • +

    Joins created during Auto Worksheet setup now default to many-to-one join type, rather than one-to-one. +For more information, see Join cardinality.

    +
  • +
  • +

    When logging in for the first time as an Analyst, ThoughtSpot prompts you to first set up a connection, rather than searching on sample data.

    +
  • +
  • +

    When setting up an Embrace connection, the final step of set-up now asks users to choose both tables and columns for the connection. +free trial embrace table columns

    +
  • +
+
+
+
+
+
+

Aug 12, 2021

+
+
+

Invitation to shared groups

+
+

Users invited to Free Trial through the “Invite others” feature now share access to all groups belonging to the user who invited them. +This feature facilitates team sharing and analysis of data objects belonging to shared groups. +Due to shared group privileges, invited users can now access SpotIQ insights from the SpotIQ tab, and can upload CSV files from the Setup tab.

+
+
+
+free trial invited spotiq +
+
+
+
+
+
+

Aug 5, 2021

+
+
+

Naming joins in Free Trial

+
+

Previously, the Create join process automatically named joins according to the source and destination table names. +This practice prevented users from creating multiple joins between the same two tables. +To avoid duplicate join name errors, you can now give each join a unique name during the join creation process.

+
+
+
+

Error message details

+
+

We revised the error messaging in Free Trial to include more pertinent details. +Now, you can click View Details to see the reason for any error message, and to send an error report to ThoughtSpot.
+free trial view details
+free trial error report

+
+
+
+

Free Trial Make It Shine

+
+

We applied this fix to Free Trial:

+
+
+
    +
  • +

    Users invited to join Free Trial through the “invite others” feature can now upload CSV files.

    +
  • +
+
+
+
+
+
+

June 30, 2021

+
+
+

Worksheet creation with existing joins

+
+

When you select a fact table with existing joins during worksheet creation in Setup, ThoughtSpot automatically adopts the existing join. +To simplify worksheet creation, ThoughtSpot now displays the names of pre-existing table joins. +To change existing joins and create a new worksheet based on your fact table, navigate to the Data tab and select the table to delete the existing join(s).

+
+
+
+free trial preexisting join +
+
+
+
+

Free Trial Make It Shine

+
+

These are the changes we made to Free Trial:

+
+
+
    +
  • +

    To streamline user login, the login page now remembers user email addresses.

    +
  • +
  • +

    The fact table description in worksheet creation now reads: "A fact table contains metrics like sales revenue, balance amount, or quantity. +Typically, the table with the most records is your fact table."

    +
  • +
+
+
+
+
+
+

June 23, 2021

+
+
+

These are the changes we made to Free Trial:

+
+
+
    +
  • +

    To facilitate connecting to your data using Redshift, users now see a connection creation checklist during the Redshift connection process.
    +free trial add connection redshift

    +
  • +
  • +

    The more options menu on the Data page no longer contains the option to View CSV after a user deletes a previously uploaded CSV file. +Now, users can immediately upload a new CSV file by selecting Upload CSV.

    +
  • +
  • +

    We made the following design changes to Free Trial:

    +
    +
      +
    • +

      We adjusted the size of the video thumbnail that appears during Analyst onboarding.

      +
    • +
    • +

      We adjusted the size and height of the Name Your Worksheet dropdown during worksheet creation in Setup.

      +
    • +
    +
    +
  • +
+
+
+
+
+

June 11, 2021

+
+
+

Free Trial invite others

+
+

We streamlined the process to invite another user to Free Trial. +Now, you can invite others directly from within Free Trial, and the invitee receives the Free Trial activation email in their inbox. +Users you invite automatically join your group, and can access your shared data objects (worksheets, answers, pinboards, etc.). +You can invite a maximum of five new users to join your group.

+
+
+

To invite a teammate to Free Trial, simply navigate to the Setup tab, click Invite others at the bottom of the screen, and enter your teammate’s email.

+
+
+
+free trial invite others +
+
+
+
+free trial invite +
+
+
+
+
+
+

June 9, 2021

+
+
+

Password creation checklist

+
+

We redesigned the account creation page to clarify the password requirements for new users. +Now, when you first log in to Free Trial, the password verification checklist appears. +Your password must meet the following requirements:

+
+
+
    +
  • +

    The password must be 8 characters or more in length.

    +
  • +
  • +

    The password must include at least 1 uppercase letter, 1 lowercase letter, 1 number, and 1 special character.

    +
  • +
  • +

    The password must pass a complexity test based on an external library. +This test ensures password complexity and uniqueness by checking for known patterns or words that are too simple. +If the password is not complex enough, ThoughtSpot rejects it, even if it fulfills the other requirements. +Refer to the Dropbox password library for more information.

    +
  • +
  • +

    The password cannot use certain blocked words. +By default, the blocked words are: your username and any part of your display name.

    +
    +

    free trial password checklist

    +
    +
  • +
+
+
+
+

Worksheet creation tooltips in Setup

+
+

To simplify the process of creating worksheets on Free Trial, we added tooltips to explain the difference between fact tables and dimension tables. +When creating a worksheet, you first select the fact table that forms the base of your business use case, then add dimension tables with common dimensions to your fact table. +For example, to create a Sales worksheet, you join together a sales fact table with dimension tables that share common dimensions like date, region, and store.

+
+
+

The worksheet creation tooltips appear when you create a worksheet during onboarding. +To view examples of typical fact tables, proceed to step one of the worksheet creation process in Setup, and click the information icon to the right of the Select a fact table dialog. +To view examples of typical dimension tables, click the information icon to the right of the Select up to 4 dimension tables dialog.

+
+
+
+

Free Trial Make It Shine

+
+

These are the fixes we applied to Free Trial:

+
+
+
    +
  • +

    We resolved bugs to improve search data and answer functionality.

    +
  • +
+
+
+
+
+
+

May 26, 2021

+
+
+

Free Trial Make It Shine

+
+

These are the fixes we applied to Free Trial:

+
+
+
    +
  • +

    To facilitate account creation and login, Free Trial login now asks for email address rather than user name. +free trial login email address

    +
  • +
  • +

    The countdown banner for users on their last day of Free Trial now reads: “Only 1 day remaining in your free trial. +Get ThoughtSpot for your organization. +Upgrade now.” free trial countdown banner 1

    +
  • +
  • +

    The connection creation interface prompts users to “confirm” their connection. +free trial connection confirm

    +
  • +
  • +

    ThoughtSpot Free Trial does not send password reset emails to expired accounts.

    +
  • +
+
+
+
+
+
+

May 12, 2021

+
+
+

These are the changes we made to Free Trial.

+
+
+
    +
  • +

    We fixed the username/password error message when users create a Snowflake connection. +Previously, users who entered an incorrect username or password would see a Snowflake IP whitelisting error message.

    +
    +

    free trial username error

    +
    +
  • +
  • +

    We removed the prompt to Search now after users create a connection. +Now, users can return directly to Setup to continue setting up their Free Trial account.

    +
    +

    Before:
    +free trial search prompt
    +After:
    +free trial no search prompt

    +
    +
  • +
+
+
+
+
+

May 5, 2021

+
+
+

Schedule time with product experts

+
+

To improve your product experience, we have added a feature to schedule one-on-one meetings with product experts. +Now, when you run into an error or have a question about the product, you can reach out for help without ever leaving your page.

+
+
+

To schedule a meeting, click Book 1:1 expert help at the top of the page. +Choose a time within the calendar, and enter your name and email before clicking Confirm Booking. +After confirmation, you will receive a link to your Zoom meeting.
+free trial expert calendar
+free trial confirm meeting

+
+
+
+

What’s New with Free Trial

+
+

We added a "What’s New" section to the ThoughtSpot Information Center. +This section highlights important features for different user personas. +Click on the help icon icon help 10px. +when the red notification appears to see new features. +Click Learn More to browse our documentation, or click Try it now to experience it for yourself.

+
+
+
+free trial whats new +
+
+
+
+free trial learn more +
+
+
+
+

Worksheet duplicate column names error

+
+

When creating a Worksheet, all columns must have unique names. +In order to prevent column name duplicate errors, ThoughtSpot highlights duplicate column names during Worksheet creation, before you can save the Worksheet. +In previous releases, the Cannot add duplicate column names error message did not specify which columns were duplicates. +We believe all analysts, including those on Free Trial, will love this enhancement.

+
+
+
+free trial duplicate columns +
+
+
+
+

Add a Snowflake connection

+
+

We made the following changes to simplify the process of adding a Snowflake connection:

+
+
+
    +
  • +

    By default, ThoughtSpot directs users to use Service Account. +Previously, Use OAuth was the default option.

    +
  • +
  • +

    We added a reminder that the Snowflake database name is case-sensitive.

    +
  • +
  • +

    We added a connection creation checklist for Snowflake.

    +
    +

    free trial add snowflake connection

    +
    +
  • +
+
+
+
+
+
+

April 28, 2021

+
+
+

Free Trial Countdown

+
+

We added a white banner to the top of the screen to count down users’ remaining days on Free Trial. +The countdown banner turns yellow once you have reached your final week on Free Trial. +At any time, you can click Upgrade now to upgrade to a paid account. +The Upgrade now link takes you to Intercom to connect to ThoughtSpot.

+
+
+
+free trial countdown banner 7 +
+
+
+
+

Simplified Snowflake account name

+
+

We simplified the steps to add a Snowflake connection. +When prompted to enter the Snowflake account name, you can now copy-paste the entire URL of your Snowflake account, and ThoughtSpot will extract the account name for you. +Previously, users had to select the account name from the URL and enter it in the Snowflake account field.

+
+
+
+free trial snowflake url +
+
+
+
+

ThoughtSpot connections

+
+

We renamed ThoughtSpot Embrace to Connections within the product. +Now, Free Trial users can access Connections by clicking Connections on the Data page. +Functions like sql_int_op that were previously available under Embrace passthrough are now available under Connection passthrough.

+
+
+
+free trial data connections +
+
+
+
+
+
+

April 7, 2021

+
+
+

These are the issues we fixed in the Free Trial April 7th release.

+
+
+
    +
  • +

    Users who attempt to log in after completing their 30-day free trial see a prompt to contact Sales.

    +
    +

    free trial account expiry

    +
    +
  • +
  • +

    Users who attempt to log in with a previous password see an error message on their first attempt. +Previously, they would need to attempt twice to see this error message.

    +
    +

    free trial password reset

    +
    +
  • +
+
+
+
+
+

March 31, 2021

+
+
+

Unicode support

+
+

We added unicode character matching in Search Answers, extending support to all languages and character sets. +You can now search all artifacts that use unicode characters in titles, descriptions, metadata, and keywords, and see the correct results.

+
+
+
+search answers unicode +
+
+
+
+
+ +++++ diff --git a/home/modules/ROOT/pages/index.adoc b/home/modules/ROOT/pages/index.adoc index 3a124439..abdebde0 100644 --- a/home/modules/ROOT/pages/index.adoc +++ b/home/modules/ROOT/pages/index.adoc @@ -1,40 +1,235 @@ -= ThoughtSpot Documentation += Welcome to ThoughtSpot Documentation :page-layout: home -Choose the documentation you need from the following choices: +++++ + + +++++ + +[.lead] +**Choose your documentation:** [.conceal-title] == {empty} ++++ -
-
- + + +
+
+
+ +
+ + + ++++ diff --git a/home/modules/ROOT/pages/product-matrix.adoc b/home/modules/ROOT/pages/product-matrix.adoc new file mode 100644 index 00000000..54cdf185 --- /dev/null +++ b/home/modules/ROOT/pages/product-matrix.adoc @@ -0,0 +1,121 @@ +[.conceal-title] += {empty} +:page-layout: snippet + +++++ + +++++ + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ThoughtSpot SoftwareThoughtSpot Cloud
Who installs and manages CustomerThoughtSpot
Falcon in-memory database YesNo
Cluster scale Multi-node clustersSingle node or 3 node for HA
Connect to cloud data warehousesYesYes
Search DataYesYes
SpotIQ Auto Analyze YesYes
Visualize
+ (Answers, Liveboards, follow and related features)
YesYes
 Mobile appYesYes
Data workspaceYes*Yes
SpotAppsYes*Yes
KPI charts YesYes
ThoughtSpot EmbeddedYes**Yes
ThoughtSpot Sage: AI/GPT-assisted featuresNoYes
Monitor, anomaly detection, contextual explain changeNoYes
Eureka (search Answers)NoYes
ThoughtSpot Sync (SeekWell Destinations) NoYes
* SpotApps must be manually installed in Software.
** Available as an option for Software starting with the 8.4.x.sw release.
+
+
+++++ diff --git a/home/modules/ROOT/pages/robots.txt b/home/modules/ROOT/pages/robots.txt new file mode 100644 index 00000000..e53ba301 --- /dev/null +++ b/home/modules/ROOT/pages/robots.txt @@ -0,0 +1 @@ +# Algolia-Crawler-Verif: E4E8AD1E2F7362AB diff --git a/home/modules/ROOT/pages/survey_thanks.adoc b/home/modules/ROOT/pages/survey_thanks.adoc new file mode 100644 index 00000000..883e0fcb --- /dev/null +++ b/home/modules/ROOT/pages/survey_thanks.adoc @@ -0,0 +1,30 @@ +:page-layout: snippet + +++++ + + + + + + + + + + Thanks! + + +
Thanks for your feedback!
+ + +++++ diff --git a/lib/asciidoctor-performance-patch.js b/lib/asciidoctor-performance-patch.js new file mode 100644 index 00000000..91a41e73 --- /dev/null +++ b/lib/asciidoctor-performance-patch.js @@ -0,0 +1,23 @@ +'use strict' + +// Fixes a performance issue with Asciidoctor.js 2 when used with Node.js 10 +module.exports = () => { + const Asciidoctor = global.Opal.Asciidoctor + + Asciidoctor.Reader.prototype.$shift = function () { + this.lineno++ + if (this.look_ahead) this.look_ahead-- + return this.lines.shift() + } + + Asciidoctor.PreprocessorReader.prototype.$shift = function () { + this.lineno++ + if (this.look_ahead) this.look_ahead-- + const line = this.lines.shift() + if (this.unescape_next_line) { + this.unescape_next_line = false + return line.substr(1) + } + return line + } +} diff --git a/netlify.toml b/netlify.toml index 39eda8c2..0813af56 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,8 +1,429 @@ [build.environment] CI = "true" -NODE_VERSION = "10" -# WARNING netlify-build ignores NPM_FLAGS when installing plugins, so use low-level NPM_CONFIG_ flag instead -#NPM_FLAGS = "--no-optional" +NODE_VERSION = "16" +NODE_OPTIONS= "--max-old-space-size=8096" NPM_CONFIG_OPTIONAL = "false" ANTORA_CACHE_DIR = "node_modules/.cache/antora" -NODE_OPTIONS = "--max-old-space-size=4096" + +[build] +command = "node_modules/.bin/antora antora-playbook.yml --stacktrace --log-format=pretty" + +# security policies +[[headers]] + for = "/*" +[headers.values] + Content-Security-Policy = "default-src * 'unsafe-eval' 'unsafe-inline' data: filesystem: about: blob:;" + +# all redirects for site - test + +# redirect for product connectivity check start + +[[redirects]] + from = "https://docs.thoughtspot.com/blanknetworkconnect.png" + to = "https://docs.thoughtspot.com/software/latest/_images/blanknetworkconnect.png" + status = 301 + force = true + +# redirect any netlify address url to real address +# redirect for home of sw and cloud docs + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw.cu2?pendo=1" + to = "https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw?pendo=1" + status = 301 + force = true # COMMENT: global redirect for 9.7.0.cl old doc site url to latest cloud + +[[redirects]] + from = "https://docs.thoughtspot.com/cloud/9.12.5.cl/notes.html" + to = "https://docs.thoughtspot.com/cloud/latest/notes" + status = 301 + force = true # COMMENT: redirect 9.10.5.cl release notes to 9.10.0.cl until prod cluster upgradeds + +# For Gilead redirects from old cloud-docs url, checkout the thoughtspot.github.io repo check out the ts8.nov.cl branch and add/update the redirects in the netlify.toml file, then merge them and make sure the cloud-docs.thoughtspo.tcom site in Netlify re-deploys. + + +[[redirects]] + from = "https://docs.thoughtspot.com/8.4.1.sw.cu1/release/help-center" + to = "https://docs.thoughtspot.com/software/8.4.1.sw/help-center" + status = 301 + force = true # COMMENT: ensure that we always redirect + +# rewrite to publish older hidden doc version for Candian Tire - begin + +[[redirects]] + from = "https://docs.thoughtspot.com/cloud/9.3.0.cl/*" + to = "https://9-3-0-cl-docs-archive.netlify.app/cloud/9.3.0.cl/:splat" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/9.3.0.cl/release/help-center" + to = "https://docs.thoughtspot.com/cloud/9.3.0.cl/help-center" + status = 301 + force = true # COMMENT: ensure that we always redirect + +# rewrite to publish older hidden doc version - end + +# rewrite to publish gartner at hidden doc version - begin + +[[redirects]] +from = "https://docs.thoughtspot.com/cloud/9.9.0.cl/*" +to = "https://ts-9-9-0-cl.netlify.app/cloud/9.9.0.cl/:splat" +status = 200 +force = true # COMMENT: ensure that we always redirect + +# rewrite to publish gartner at hidden doc version - end + +# rewrites for help - start + +[[redirects]] + from = "https://docs.thoughtspot.com/software/8.8.1.sw.cu1/*" + to = "https://docs.thoughtspot.com/software/8.8.1.sw/:splat" + status = 301 + force = true # COMMENT: global redirect for 8.8.1.sw.cu1 to sw 8.8.1.sw + + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw.cu1/" + to = "https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/" + status = 301 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/8.4.1.sw/" + to = "https://help-software-thoughtspot.netlify.app/software/8.4.1.sw/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/8.4.1.sw.cu1/" + to = "https://help-software-thoughtspot.netlify.app/software/8.4.1.sw/" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/8.8.1.sw/" + to = "https://help-software-thoughtspot.netlify.app/software/8.8.1.sw/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/9.0.0.sw/" + to = "https://help-software-thoughtspot.netlify.app/software/9.0.0.sw/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/9.0.1.sw/" + to = "https://help-software-thoughtspot.netlify.app/software/9.0.1.sw/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/9.5.0.sw/" + to = "https://help-software-thoughtspot.netlify.app/software/9.5.0.sw/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/9.5.1.sw/" + to = "https://help-software-thoughtspot.netlify.app/software/9.5.1.sw/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/9.8.0.sw/" + to = "https://help-software-thoughtspot.netlify.app/software/9.8.0.sw/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/9.11.0.sw/" + to = "https://help-software-thoughtspot.netlify.app/software/9.11.0.sw/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/10.0.0.sw/" + to = "https://help-software-thoughtspot.netlify.app/software/10.0.0.sw/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/10.0.1.sw/" + to = "https://help-software-thoughtspot.netlify.app/software/10.0.1.sw/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/10.5.0.sw/" + to = "https://help-software-thoughtspot.netlify.app/software/10.5.0.sw/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/10.5.1.sw/" + to = "https://help-software-thoughtspot.netlify.app/software/10.5.1.sw/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/10.11.0.sw/" + to = "https://help-software-thoughtspot.netlify.app/software/10.11.0.sw/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/11.0.1.sw/" + to = "https://help-software-thoughtspot.netlify.app/software/11.0.1.sw/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/10.3.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/10.3.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/10.2.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/10.2.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/10.1.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/10.1.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/10.0.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/10.0.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.5.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/9.12.5.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/9.12.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/9.12.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.5.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/9.10.5.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/9.10.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/9.10.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/9.9.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/9.9.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/9.8.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/9.8.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/9.7.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/9.7.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/9.6.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/9.6.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/9.5.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/9.4.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/9.4.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/9.4.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/9.3.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/9.3.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/9.2.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/9.2.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/9.1.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/9.1.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/9.0.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/9.0.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/8.10.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/8.10.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/8.9.0.cl/" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/8.9.0.cl/index_help" + status = 200 + force = true # COMMENT: ensure that we always redirect + +# Algolia pendo search test rewrite for cloud + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/cloud/*" + to = "https://help-cloud-thoughtspot.netlify.app/cloud/:splat" + status = 200 + force = true # COMMENT: ensure that we always redirect + +# Algolia pendo search test rewrite for cloud + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/software/*" + to = "https://help-software-thoughtspot.netlify.app/software/:splat" + status = 200 + force = true # COMMENT: ensure that we always redirect + +# Algolia pendo search test rewrite for cloud + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/sitemap-cloud.xml" + to = "https://help-cloud-thoughtspot.netlify.app/sitemap-cloud.xml" + status = 200 + force = true # COMMENT: ensure that we always redirect + +# Algolia pendo search test rewrite for sitemaps cloud + +[[redirects]] + from = "https://docs.thoughtspot.com/ghyer95y3/sitemap-software.xml" + to = "https://help-software-thoughtspot.netlify.app/sitemap-software.xml" + status = 200 + force = true # COMMENT: ensure that we always redirect + +# Algolia pendo search test rewrite for sitemaps software + +# rewrites for help - end + +# confirmation email redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/software/latest/welcome-intro.html" + to = "https://docs.thoughtspot.com/software/latest/deployment-sw" + status = 301 + force = true # COMMENT: ensure that we always redirect + +# redirect for EA custom sorting in 9.8.0.cl + +# [[redirects]] +# from = "https://docs.thoughtspot.com/cloud/9.8.0.cl/customSorting" +# to = "https://docs.thoughtspot.com/cloud/latest/worksheet-create" +# status = 301 +# force = true # COMMENT: ensure that we always redirect + +# site-wide redirects + +# 8.10.0.cl uprade page to 8.9.0.cl (until customer cluster upgrade) + +[[redirects]] + from = "https://docs.thoughtspot.com/cloud/8.10.0.cl/upgrade" + to = "https://docs.thoughtspot.com/cloud/latest/upgrade" + status = 301 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/software/8.8.0.sw/*" + to = "https://la-docs.thoughtspot.com/software/8.8.0.sw/:splat" + status = 301 + force = true # COMMENT: global redirect for 8.8.0.sw to LA docs site + +[[redirects]] + from = "https://docs.thoughtspot.com/software/9.8.0.sw/*" + to = "https://docs.thoughtspot.com/software/latest/:splat" + status = 301 + force = true # COMMENT: global redirect for 9.8.0.sw to sw latest + +[[redirects]] + from = "https://docs.thoughtspot.com/software/9.5.0.sw.cu1/*" + to = "https://docs.thoughtspot.com/software/latest/:splat" + status = 301 + force = true # COMMENT: global redirect for 9.5.0.sw.cu1 to sw latest + +[[redirects]] + from = "https://docs.thoughtspot.com/software/9.0.1.sw.cu1/*" + to = "https://docs.thoughtspot.com/software/9.0.1.sw/:splat" + status = 301 + force = true # COMMENT: global redirect for 9.0.1.sw.cu1 to sw 9.0.1.sw + +[[redirects]] + from = "https://docs.thoughtspot.com/software/8.8.1.sw.cu1/*" + to = "https://docs.thoughtspot.com/software/8.8.1.sw/:splat" + status = 301 + force = true # COMMENT: global redirect for 8.8.1.sw.cu1 to sw 8.8.1.sw + +[[redirects]] + from = "https://docs.thoughtspot.com/software/8.8.1.sw.CU1/*" + to = "https://docs.thoughtspot.com/software/8.8.1.sw/:splat" + status = 301 + force = true # COMMENT: global redirect for 8.8.1.sw.CU1 to sw 8.8.1.sw + +[[redirects]] + from = "https://docs.thoughtspot.com/software/8.4.1.sw.cu1/*" + to = "https://docs.thoughtspot.com/software/8.4.1.sw/:splat" + status = 301 + force = true # COMMENT: global redirect for 8.4.1.sw.cu1 to sw 8.4.1.sw + +[[redirects]] + from = "https://docs.thoughtspot.com/software/8.4.1.sw.CU1/*" + to = "https://docs.thoughtspot.com/software/8.4.1.sw/:splat" + status = 301 + force = true # COMMENT: global redirect for 8.4.1.sw.CU1 to sw 8.4.1.sw + +[[redirects]] + from = "https://docs.thoughtspot.com/cloud/9.10.5.cl/*" + to = "https://docs.thoughtspot.com/cloud/latest/:splat" + status = 301 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/cloud/9.12.5.cl/*" + to = "https://docs.thoughtspot.com/cloud/latest/:splat" + status = 301 + force = true # COMMENT: ensure that we always redirect + +[[redirects]] + from = "https://docs.thoughtspot.com/cloud/9.7.0.cl/*" + to = "https://docs.thoughtspot.com/cloud/latest/:splat" + status = 301 + force = true # COMMENT: ensure that we always redirect + diff --git a/node_modules/.bin/antora b/node_modules/.bin/antora deleted file mode 120000 index 2d813b0b..00000000 --- a/node_modules/.bin/antora +++ /dev/null @@ -1 +0,0 @@ -../@antora/cli/bin/antora \ No newline at end of file diff --git a/node_modules/.bin/crc32 b/node_modules/.bin/crc32 deleted file mode 120000 index 9f8b79c5..00000000 --- a/node_modules/.bin/crc32 +++ /dev/null @@ -1 +0,0 @@ -../crc-32/bin/crc32.njs \ No newline at end of file diff --git a/node_modules/.bin/handlebars b/node_modules/.bin/handlebars deleted file mode 120000 index fb7d090f..00000000 --- a/node_modules/.bin/handlebars +++ /dev/null @@ -1 +0,0 @@ -../handlebars/bin/handlebars \ No newline at end of file diff --git a/node_modules/.bin/isogit b/node_modules/.bin/isogit deleted file mode 120000 index 25cb356a..00000000 --- a/node_modules/.bin/isogit +++ /dev/null @@ -1 +0,0 @@ -../isomorphic-git/cli.cjs \ No newline at end of file diff --git a/node_modules/.bin/js-yaml b/node_modules/.bin/js-yaml deleted file mode 120000 index 9dbd010d..00000000 --- a/node_modules/.bin/js-yaml +++ /dev/null @@ -1 +0,0 @@ -../js-yaml/bin/js-yaml.js \ No newline at end of file diff --git a/node_modules/.bin/json5 b/node_modules/.bin/json5 deleted file mode 120000 index 217f3798..00000000 --- a/node_modules/.bin/json5 +++ /dev/null @@ -1 +0,0 @@ -../json5/lib/cli.js \ No newline at end of file diff --git a/node_modules/.bin/pino b/node_modules/.bin/pino deleted file mode 120000 index 9855bfce..00000000 --- a/node_modules/.bin/pino +++ /dev/null @@ -1 +0,0 @@ -../pino/bin.js \ No newline at end of file diff --git a/node_modules/.bin/pino-pretty b/node_modules/.bin/pino-pretty deleted file mode 120000 index 8a5f3e70..00000000 --- a/node_modules/.bin/pino-pretty +++ /dev/null @@ -1 +0,0 @@ -../pino-pretty/bin.js \ No newline at end of file diff --git a/node_modules/.bin/printj b/node_modules/.bin/printj deleted file mode 120000 index 2a58c10f..00000000 --- a/node_modules/.bin/printj +++ /dev/null @@ -1 +0,0 @@ -../printj/bin/printj.njs \ No newline at end of file diff --git a/node_modules/.bin/sha.js b/node_modules/.bin/sha.js deleted file mode 120000 index 3c761051..00000000 --- a/node_modules/.bin/sha.js +++ /dev/null @@ -1 +0,0 @@ -../sha.js/bin.js \ No newline at end of file diff --git a/node_modules/.bin/uglifyjs b/node_modules/.bin/uglifyjs deleted file mode 120000 index fef3468b..00000000 --- a/node_modules/.bin/uglifyjs +++ /dev/null @@ -1 +0,0 @@ -../uglify-js/bin/uglifyjs \ No newline at end of file diff --git a/node_modules/@antora/asciidoc-loader/LICENSE b/node_modules/@antora/asciidoc-loader/LICENSE deleted file mode 100644 index a612ad98..00000000 --- a/node_modules/@antora/asciidoc-loader/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/node_modules/@antora/asciidoc-loader/README.md b/node_modules/@antora/asciidoc-loader/README.md deleted file mode 100644 index e7a74548..00000000 --- a/node_modules/@antora/asciidoc-loader/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Antora AsciiDoc Loader - -The AsciiDoc Loader is a reusable library for handling AsciiDoc content in Antora. -It loads AsciiDoc content into an AsciiDoc Document object (AST) for use in an Antora documentation pipeline. - -The AsciiDoc loader wraps [Asciidoctor.js](https://asciidoctor.org/docs/asciidoctor.js/) and adds several extensions that enable AsciiDoc to work in an Antora environment. -These extensions include: - -* An include processor that resolves files from the content catalog. -* A cross reference converter that resolves references between pages based on Antora's page reference system. -* Automatic resolution of paths to images and attachments. -* Implicit document attributes that pass information from the Antora environment. - -[Antora](https://antora.org) is a modular static site generator designed for creating documentation sites from AsciiDoc documents. -Its site generator pipeline aggregates documents from versioned content repositories and processes them using [Asciidoctor](https://asciidoctor.org). - -## Copyright and License - -Copyright (C) 2017-present [OpenDevise Inc.](https://opendevise.com) and the [Antora Project](https://antora.org). - -Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0). diff --git a/node_modules/@antora/asciidoc-loader/lib/constants.js b/node_modules/@antora/asciidoc-loader/lib/constants.js deleted file mode 100644 index d3474f2c..00000000 --- a/node_modules/@antora/asciidoc-loader/lib/constants.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -module.exports = Object.freeze({ - $Antora () {}, - EXAMPLES_DIR_TOKEN: 'example$', - PARTIALS_DIR_TOKEN: 'partial$', -}) diff --git a/node_modules/@antora/asciidoc-loader/lib/converter/create.js b/node_modules/@antora/asciidoc-loader/lib/converter/create.js deleted file mode 100644 index ac6161ff..00000000 --- a/node_modules/@antora/asciidoc-loader/lib/converter/create.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict' - -const convertImageRef = require('./../image/convert-image-ref') -const convertPageRef = require('./../xref/convert-page-ref') -const defineHtml5Converter = require('./html5') - -/** - * Creates an HTML5 converter instance with Antora enhancements. - * - * @memberof asciidoc-loader - * - * @param {File} file - The virtual file whose contents is an AsciiDoc source document. - * @param {ContentCatalog} contentCatalog - The catalog of all virtual content files in the site. - * @param {Object} config - AsciiDoc processor configuration options. - * - * @returns {Converter} An enhanced instance of Asciidoctor's HTML5 converter. - */ -function createConverter (file, contentCatalog, config) { - const relativizePageRefs = config.relativizePageRefs !== false - return defineHtml5Converter().$new('html5', undefined, { - onImageRef: (resourceSpec) => convertImageRef(resourceSpec, file, contentCatalog), - onPageRef: (pageSpec, content) => convertPageRef(pageSpec, content, file, contentCatalog, relativizePageRefs), - }) -} - -module.exports = createConverter diff --git a/node_modules/@antora/asciidoc-loader/lib/converter/html5.js b/node_modules/@antora/asciidoc-loader/lib/converter/html5.js deleted file mode 100644 index 68764f29..00000000 --- a/node_modules/@antora/asciidoc-loader/lib/converter/html5.js +++ /dev/null @@ -1,117 +0,0 @@ -'use strict' - -const Opal = global.Opal -const { $Antora } = require('../constants') -const $logger = Symbol('logger') -const $imageRefCallback = Symbol('imageRefCallback') -const $pageRefCallback = Symbol('pageRefCallback') -const converterFor = Opal.Asciidoctor.Converter.$for.bind(Opal.Asciidoctor.Converter) - -let classDef - -const defineHtml5Converter = () => { - const superclass = converterFor('html5') - if (classDef) { - if (classDef.$superclass() !== superclass) { - Object.setPrototypeOf(classDef.$$prototype, (classDef.$$super = superclass).$$prototype) - } - return classDef - } - - classDef = Opal.klass(Opal.Antora || Opal.module(null, 'Antora', $Antora), superclass, 'Html5Converter') - - Opal.defn(classDef, '$initialize', function initialize (backend, opts, callbacks) { - Opal.send(this, Opal.find_super_dispatcher(this, 'initialize', initialize), [backend, opts]) - this[$pageRefCallback] = callbacks.onPageRef - this[$imageRefCallback] = callbacks.onImageRef - }) - - Opal.defn(classDef, '$convert_inline_anchor', function convertInlineAnchor (node) { - if (node.getType() === 'xref') { - let callback - let refSpec = - node.getAttribute('path', undefined, false) || - // NOTE detect and convert self reference into a page reference - (node.target === '#' && - node.getText() == null && - node.getAttribute('refid', undefined, false) == null && - node.getDocument().getAttribute('page-relative-src-path')) - if (refSpec && (callback = this[$pageRefCallback])) { - const attrs = node.getAttributes() - const fragment = attrs.fragment - if (fragment) refSpec += '#' + fragment - const { content, target, internal, unresolved } = callback(refSpec, node.getText()) - let type - if (internal) { - type = 'xref' - attrs.path = undefined - attrs.fragment = attrs.refid = fragment - } else { - type = 'link' - if (unresolved) { - const logger = this[$logger] || (this[$logger] = this.$logger()) - let msg = 'target of xref not found: ' + refSpec - const loc = node.getParent().getSourceLocation() - if (loc) msg = this.$message_with_context(msg, Opal.hash2(['source_location'], { source_location: loc })) - logger.error(msg) - attrs.role = `page unresolved${attrs.role ? ' ' + attrs.role : ''}` - } else { - attrs.role = `page${attrs.role ? ' ' + attrs.role : ''}` - } - } - const attributes = Opal.hash2(Object.keys(attrs), attrs) - const options = Opal.hash2(['type', 'target', 'attributes'], { type, target, attributes }) - node = Opal.Asciidoctor.Inline.$new(node.getParent(), 'anchor', content, options) - } - } - return Opal.send(this, Opal.find_super_dispatcher(this, 'convert_inline_anchor', convertInlineAnchor), [node]) - }) - - Opal.defn(classDef, '$convert_image', function convertImage (node) { - return Opal.send(this, Opal.find_super_dispatcher(this, 'convert_image', convertImage), [ - transformImageNode(this, node, node.getAttribute('target')), - ]) - }) - - Opal.defn(classDef, '$convert_inline_image', function convertInlineImage (node) { - return Opal.send(this, Opal.find_super_dispatcher(this, 'convert_inline_image', convertInlineImage), [ - transformImageNode(this, node, node.getTarget()), - ]) - }) - - return classDef -} - -function transformImageNode (converter, node, imageTarget) { - if (matchesResourceSpec(imageTarget)) { - const imageRefCallback = converter[$imageRefCallback] - if (imageRefCallback) { - const alt = node.getAttribute('alt', undefined, false) - if (node.isAttribute('default-alt', alt, false)) node.setAttribute('alt', alt.split(/[@:]/).pop()) - Opal.defs(node, '$image_uri', (imageSpec) => imageRefCallback(imageSpec) || imageSpec) - } - } - if (node.hasAttribute('xref')) { - const refSpec = node.getAttribute('xref', '', false) - if (refSpec.charAt() === '#') { - node.setAttribute('link', refSpec) - } else if (refSpec.endsWith('.adoc') || ~refSpec.indexOf('.adoc#')) { - const pageRefCallback = converter[$pageRefCallback] - if (pageRefCallback) { - const { target, unresolved } = pageRefCallback(refSpec, '[image]') - const role = node.getAttribute('role', undefined, false) - node.setAttribute('role', `link-page${unresolved ? ' link-unresolved' : ''}${role ? ' ' + role : ''}`) - node.setAttribute('link', target) - } - } else { - node.setAttribute('link', '#' + refSpec) - } - } - return node -} - -function matchesResourceSpec (target) { - return !(~target.indexOf(':') && (~target.indexOf('://') || (target.startsWith('data:') && ~target.indexOf(',')))) -} - -module.exports = defineHtml5Converter diff --git a/node_modules/@antora/asciidoc-loader/lib/create-extension-registry.js b/node_modules/@antora/asciidoc-loader/lib/create-extension-registry.js deleted file mode 100644 index e6a5e0b4..00000000 --- a/node_modules/@antora/asciidoc-loader/lib/create-extension-registry.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict' - -const IncludeProcessor = require('./include/include-processor') - -/** - * Creates an extension registry instance that provides extensions to integrate AsciiDoc into Antora. - * - * This registry includes a built-in include processor that resolves the target of include directives - * to files in Antora's virtual content catalog. - * - * @memberof asciidoc-loader - * - * @param {Asciidoctor} asciidoctor - Asciidoctor API. - * @param {Object} callbacks - Callback functions. - * @param {Function} callbacks.onInclude - A function that resolves the target of an include. - * - * @returns {Registry} An instance of Asciidoctor's extension registry. - */ -function createExtensionRegistry (asciidoctor, callbacks) { - const registry = asciidoctor.Extensions.create() - registry.includeProcessor(IncludeProcessor.$new(callbacks.onInclude)) - return registry -} - -module.exports = createExtensionRegistry diff --git a/node_modules/@antora/asciidoc-loader/lib/image/convert-image-ref.js b/node_modules/@antora/asciidoc-loader/lib/image/convert-image-ref.js deleted file mode 100644 index 99959658..00000000 --- a/node_modules/@antora/asciidoc-loader/lib/image/convert-image-ref.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict' - -const computeRelativeUrlPath = require('../util/compute-relative-url-path') - -function convertImageRef (resourceSpec, currentPage, contentCatalog) { - const image = contentCatalog.resolveResource(resourceSpec, currentPage.src, 'image', ['image']) - if (image) return computeRelativeUrlPath(currentPage.pub.url, image.pub.url) -} - -module.exports = convertImageRef diff --git a/node_modules/@antora/asciidoc-loader/lib/include/include-processor.js b/node_modules/@antora/asciidoc-loader/lib/include/include-processor.js deleted file mode 100644 index 7160e4e6..00000000 --- a/node_modules/@antora/asciidoc-loader/lib/include/include-processor.js +++ /dev/null @@ -1,262 +0,0 @@ -'use strict' - -const Opal = global.Opal - -const { $Antora } = require('../constants') -const DBL_COLON = '::' -const DBL_SQUARE = '[]' -const NEWLINE_RX = /\r\n?|\n/ -const TAG_DIRECTIVE_RX = /\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m - -const IncludeProcessor = (() => { - const $callback = Symbol('callback') - const classDef = Opal.klass( - Opal.Antora || Opal.module(null, 'Antora', $Antora), - Opal.Asciidoctor.Extensions.IncludeProcessor, - 'IncludeProcessor' - ) - - Opal.defn(classDef, '$initialize', function initialize (callback) { - Opal.send(this, Opal.find_super_dispatcher(this, 'initialize', initialize)) - this[$callback] = callback - }) - - Opal.defn(classDef, '$process', function (doc, reader, target, attrs) { - if (reader.maxdepth === Opal.nil) return - const sourceCursor = reader.$cursor_at_prev_line() - if (reader.$include_depth() >= Opal.hash_get(reader.maxdepth, 'curr')) { - log('error', `maximum include depth of ${Opal.hash_get(reader.maxdepth, 'rel')} exceeded`, reader, sourceCursor) - return - } - const resolvedFile = this[$callback](doc, target, sourceCursor) - if (resolvedFile) { - let includeContents - let linenums - let tags - let startLineNum - if ((linenums = getLines(attrs))) { - ;[includeContents, startLineNum] = filterLinesByLineNumbers(reader, target, resolvedFile, linenums) - } else if ((tags = getTags(attrs))) { - ;[includeContents, startLineNum] = filterLinesByTags(reader, target, resolvedFile, tags, sourceCursor) - } else { - includeContents = resolvedFile.contents - startLineNum = 1 - } - Opal.hash_put(attrs, 'partial-option', '') - // eslint-disable-next-line no-new-wrappers - const file = Object.assign(new String(resolvedFile.file), { - src: resolvedFile.src, - parent: { file: reader.file, lineno: reader.lineno - 1 }, - }) - reader.pushInclude(includeContents, file, resolvedFile.path, startLineNum, attrs) - } else { - if (attrs['$key?']('optional-option')) { - log('info', `optional include dropped because include file not found: ${target}`, reader, sourceCursor) - } else { - log('error', `target of include not found: ${target}`, reader, sourceCursor) - reader.$unshift(`Unresolved include directive in ${sourceCursor.file} - include::${target}[]`) - } - } - }) - - return classDef -})() - -function getLines (attrs) { - if (attrs['$key?']('lines')) { - const lines = attrs['$[]']('lines') - if (lines) { - const linenums = [] - let filtered - ;(~lines.indexOf(',') ? lines.split(',') : lines.split(';')) - .filter((it) => it) - .forEach((linedef) => { - filtered = true - let delim - let from - if (~(delim = linedef.indexOf('..'))) { - from = linedef.substr(0, delim) - let to = linedef.substr(delim + 2) - if ((to = parseInt(to, 10) || -1) > 0) { - if ((from = parseInt(from, 10) || -1) > 0) { - for (let i = from; i <= to; i++) linenums.push(i) - } - } else if (to === -1 && (from = parseInt(from, 10) || -1) > 0) { - linenums.push(from, Infinity) - } - } else if ((from = parseInt(linedef, 10) || -1) > 0) { - linenums.push(from) - } - }) - if (linenums.length) return [...new Set(linenums.sort((a, b) => a - b))] - if (filtered) return [] - } - } -} - -function getTags (attrs) { - if (attrs['$key?']('tag')) { - const tag = attrs['$[]']('tag') - if (tag && tag !== '!') { - return tag.charAt() === '!' ? new Map().set(tag.substr(1), false) : new Map().set(tag, true) - } - } else if (attrs['$key?']('tags')) { - const tags = attrs['$[]']('tags') - if (tags) { - const result = new Map() - let any = false - tags.split(~tags.indexOf(',') ? ',' : ';').forEach((tag) => { - if (tag && tag !== '!') { - any = true - tag.charAt() === '!' ? result.set(tag.substr(1), false) : result.set(tag, true) - } - }) - if (any) return result - } - } -} - -function filterLinesByLineNumbers (reader, target, file, linenums) { - let lineNum = 0 - let startLineNum - let selectRest - const lines = [] - file.contents.split(NEWLINE_RX).some((line) => { - lineNum++ - if (selectRest || (selectRest = linenums[0] === Infinity)) { - if (!startLineNum) startLineNum = lineNum - lines.push(line) - } else { - if (linenums[0] === lineNum) { - if (!startLineNum) startLineNum = lineNum - linenums.shift() - lines.push(line) - } - if (!linenums.length) return true - } - }) - return [lines, startLineNum || 1] -} - -function filterLinesByTags (reader, target, file, tags, sourceCursor) { - let selectingDefault, selecting, wildcard - const globstar = tags.get('**') - const star = tags.get('*') - if (globstar === undefined) { - if (star === undefined) { - selectingDefault = selecting = !mapContainsValue(tags, true) - } else { - if ((wildcard = star) || tags.keys().next().value !== '*') { - selectingDefault = selecting = false - } else { - selectingDefault = selecting = !wildcard - } - tags.delete('*') - } - } else { - tags.delete('**') - selectingDefault = selecting = globstar - if (star === undefined) { - if (!globstar && tags.values().next().value === false) wildcard = true - } else { - tags.delete('*') - wildcard = star - } - } - - const lines = [] - const tagStack = [] - const foundTags = [] - let activeTag - let lineNum = 0 - let startLineNum - file.contents.split(NEWLINE_RX).forEach((line) => { - lineNum++ - let m - if (~line.indexOf(DBL_COLON) && ~line.indexOf(DBL_SQUARE) && (m = line.match(TAG_DIRECTIVE_RX))) { - const thisTag = m[2] - if (m[1]) { - if (thisTag === activeTag) { - tagStack.shift() - ;[activeTag, selecting] = tagStack.length ? tagStack[0] : [undefined, selectingDefault] - } else if (tags.has(thisTag)) { - const idx = tagStack.findIndex(([name]) => name === thisTag) - if (~idx) { - tagStack.splice(idx, 1) - log( - 'warn', - `mismatched end tag (expected '${activeTag}' but found '${thisTag}') ` + - `at line ${lineNum} of include file: ${file.file})`, - reader, - sourceCursor, - createIncludeCursor(reader, file, target, lineNum) - ) - } else { - log( - 'warn', - `unexpected end tag '${thisTag}' at line ${lineNum} of include file: ${file.file}`, - reader, - sourceCursor, - createIncludeCursor(reader, file, target, lineNum) - ) - } - } - } else if (tags.has(thisTag)) { - foundTags.push(thisTag) - tagStack.unshift([(activeTag = thisTag), (selecting = tags.get(thisTag)), lineNum]) - } else if (wildcard !== undefined) { - selecting = activeTag && !selecting ? false : wildcard - tagStack.unshift([(activeTag = thisTag), selecting, lineNum]) - } - } else if (selecting) { - if (!startLineNum) startLineNum = lineNum - lines.push(line) - } - }) - if (tagStack.length) { - tagStack.forEach(([tagName, _, tagLineNum]) => - log( - 'warn', - `detected unclosed tag '${tagName}' starting at line ${tagLineNum} of include file: ${file.file}`, - reader, - sourceCursor, - createIncludeCursor(reader, file, target, tagLineNum) - ) - ) - } - if (foundTags.length) foundTags.forEach((name) => tags.delete(name)) - if (tags.size) { - log( - 'warn', - `tag${tags.size > 1 ? 's' : ''} '${[...tags.keys()].join(', ')}' not found in include file: ${file.file}`, - reader, - sourceCursor, - createIncludeCursor(reader, file, target, 0) - ) - } - return [lines, startLineNum || 1] -} - -function createIncludeCursor (reader, { file, src }, path, lineno) { - return reader.$create_include_cursor( - // eslint-disable-next-line no-new-wrappers - Object.assign(new String(file), { src, parent: { file: reader.file, lineno: reader.lineno - 1 } }), - path, - lineno - ) -} - -function log (severity, message, reader, sourceCursor, includeCursor = undefined) { - const opts = includeCursor - ? { source_location: sourceCursor, include_location: includeCursor } - : { source_location: sourceCursor } - reader.$logger()['$' + severity](reader.$message_with_context(message, Opal.hash(opts))) -} - -function mapContainsValue (map, value) { - for (const v of map.values()) { - if (v === value) return true - } -} - -module.exports = IncludeProcessor diff --git a/node_modules/@antora/asciidoc-loader/lib/include/resolve-include-file.js b/node_modules/@antora/asciidoc-loader/lib/include/resolve-include-file.js deleted file mode 100644 index 634b17c6..00000000 --- a/node_modules/@antora/asciidoc-loader/lib/include/resolve-include-file.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict' - -const { posix: path } = require('path') -const splitOnce = require('../util/split-once') - -const { EXAMPLES_DIR_TOKEN, PARTIALS_DIR_TOKEN } = require('../constants') -const RESOURCE_ID_DETECTOR_RX = /[$:@]/ - -/** - * Resolves the specified target of an include directive to a virtual file in the content catalog. - * - * @memberof asciidoc-loader - * - * @param {String} target - The target of the include directive to resolve. - * @param {File} page - The outermost virtual file from which the include originated (not - * necessarily the current file). - * @param {Cursor} cursor - The cursor of the reader for file that contains the include directive. - * @param {ContentCatalog} catalog - The content catalog that contains the virtual files in the site. - * @returns {Object} A map containing the file, path, and contents of the resolved file. - */ -function resolveIncludeFile (target, page, cursor, catalog) { - const src = (cursor.file || {}).src || page.src - let resolved - let family - let relative - // @deprecated interpret non-URL target as resource ID starting in Antora 4 - if (RESOURCE_ID_DETECTOR_RX.test(target)) { - // NOTE support legacy {partialsdir} and {examplesdir} prefixes (same as resource ID w/ only family and relative) - if (target.startsWith(PARTIALS_DIR_TOKEN) || target.startsWith(EXAMPLES_DIR_TOKEN)) { - ;[family, relative] = splitOnce(target, '$') - if (relative.charAt() === '/') relative = relative.substr(1) - resolved = catalog.getById({ - component: src.component, - version: src.version, - module: src.module, - family, - relative, - }) - // NOTE require family segment for now - } else if (~target.indexOf('$')) { - resolved = catalog.resolveResource(target, extractResourceId(src)) - } - } else { - resolved = catalog.getByPath({ - component: src.component, - version: src.version, - // QUESTION does cursor.dir always contain the value we expect? - path: path.join(cursor.dir.toString(), target), - }) - } - if (resolved) { - const resolvedSrc = resolved.src - return { - src: resolvedSrc, - file: resolvedSrc.path, - path: resolvedSrc.basename, - // NOTE src.contents holds AsciiDoc source for page marked as a partial - // QUESTION should we only use src.contents if family is 'page' and mediaType is 'text/asciidoc'? - contents: (resolvedSrc.contents || resolved.contents || '').toString(), - } - } -} - -function extractResourceId ({ component, version, module: module_, family, relative }) { - return { component, version, module: module_, family, relative } -} - -module.exports = resolveIncludeFile diff --git a/node_modules/@antora/asciidoc-loader/lib/index.js b/node_modules/@antora/asciidoc-loader/lib/index.js deleted file mode 100644 index 7913979e..00000000 --- a/node_modules/@antora/asciidoc-loader/lib/index.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -/** - * AsciiDoc Loader component for Antora - * - * Uses Asciidoctor.js to load AsciiDoc content in a way that integrates tightly - * with the Antora environment. It resolves include files, page references, and - * image references to files in Antora's virtual content catalog. - * - * @namespace asciidoc-loader - */ -module.exports = require('./load-asciidoc') diff --git a/node_modules/@antora/asciidoc-loader/lib/load-asciidoc.js b/node_modules/@antora/asciidoc-loader/lib/load-asciidoc.js deleted file mode 100644 index c3627ffa..00000000 --- a/node_modules/@antora/asciidoc-loader/lib/load-asciidoc.js +++ /dev/null @@ -1,212 +0,0 @@ -'use strict' - -const asciidoctor = require('@asciidoctor/core')() -const Opal = global.Opal -const Extensions = asciidoctor.Extensions -const createConverter = require('./converter/create') -const createExtensionRegistry = require('./create-extension-registry') -const LoggerAdapter = require('./logger/adapter') -const ospath = require('path') -const { posix: path } = ospath -const resolveIncludeFile = require('./include/resolve-include-file') - -const BLANK_LINE_BUF = Buffer.from('\n\n') -const DOCTITLE_MARKER_BUF = Buffer.from('= ') -const DOT_RELATIVE_RX = new RegExp(`^\\.{1,2}[/${ospath.sep.replace('/', '').replace('\\', '\\\\')}]`) -const { EXAMPLES_DIR_TOKEN, PARTIALS_DIR_TOKEN } = require('./constants') -const EXTENSION_DSL_TYPES = Extensions.$constants(false).filter((name) => name.endsWith('Dsl')) - -/** - * Loads the AsciiDoc source from the specified file into a Document object. - * - * Uses the Asciidoctor.js load API to parse the source of the file into an Asciidoctor Document object. Sets options - * and attributes that provide integration with the Antora environment. Options include a custom converter and extension - * registry to handle page references and include directives, respectively. It also assigns attributes that provide - * context either for the author (e.g., env=site) or pipeline (e.g., docfile). - * - * @memberof asciidoc-loader - * - * @param {File} file - The virtual file whose contents is an AsciiDoc source document. - * @param {ContentCatalog} [contentCatalog=undefined] - The catalog of all virtual content files in the site. - * @param {Object} [config={}] - AsciiDoc processor configuration options. - * @param {Object} [config.attributes={}] - Shared AsciiDoc attributes to assign to the document. - * @param {Array} [config.extensions=[]] - Self-registering AsciiDoc processor extension functions. - * @param {Boolean} [config.relativizePageRefs=true] - Configures the AsciiDoc processor to generate relative page - * references (relative to the current page) instead of root relative (relative to the site root). - * - * @returns {Document} An Asciidoctor Document object created from the source of the specified file. - */ -function loadAsciiDoc (file, contentCatalog = undefined, config = {}) { - const { family, relative, extname = path.extname(relative) } = file.src - const intrinsicAttrs = { - docname: (family === 'nav' ? 'nav$' : '') + relative.substr(0, relative.length - extname.length), - docfile: file.path, - // NOTE docdir implicitly sets base_dir on document; Opal only expands value to absolute path if it starts with ./ - docdir: file.dirname, - docfilesuffix: extname, - imagesdir: path.join(file.pub.moduleRootPath, '_images'), - attachmentsdir: path.join(file.pub.moduleRootPath, '_attachments'), - examplesdir: EXAMPLES_DIR_TOKEN, - partialsdir: PARTIALS_DIR_TOKEN, - } - const attributes = Object.assign( - family === 'page' ? { 'page-partial': '@' } : {}, - config.attributes, - intrinsicAttrs, - computePageAttrs(file.src, contentCatalog) - ) - const extensionRegistry = createExtensionRegistry(asciidoctor, { - onInclude: contentCatalog - ? (doc, target, cursor) => resolveIncludeFile(target, file, cursor, contentCatalog) - : () => undefined, - }) - const extensions = config.extensions || [] - if (extensions.length) extensions.forEach((ext) => ext.register(extensionRegistry, { file, contentCatalog, config })) - const loggerAdapter = LoggerAdapter.logger.noop ? false : LoggerAdapter.$new(file.src) - const opts = { attributes, extension_registry: extensionRegistry, safe: 'safe', logger: loggerAdapter } - if (config.doctype) opts.doctype = config.doctype - if (config.sourcemap) opts.sourcemap = true - let contents = file.contents - if (config.headerOnly) { - opts.parse_header_only = true - const firstBlankLineIdx = contents.indexOf(BLANK_LINE_BUF) - if (~firstBlankLineIdx) { - const partialContents = contents.slice(0, firstBlankLineIdx) - const doctitleIdx = partialContents.indexOf(DOCTITLE_MARKER_BUF) - if (!doctitleIdx || partialContents[doctitleIdx - 1] === 10) contents = partialContents - } - } else if (contentCatalog) { - attributes.relfilesuffix = '.adoc' // NOTE relfilesuffix must be set for page-to-page xrefs to work correctly - opts.converter = createConverter(file, contentCatalog, config) - } - const doc = asciidoctor.load(contents.toString(), opts) - if (extensions.length) freeExtensions() - return doc -} - -// QUESTION should we soft set the page-id attribute? -function computePageAttrs ({ component: componentName, version, module: module_, relative, origin }, contentCatalog) { - const attrs = {} - attrs['page-component-name'] = componentName - attrs['page-component-version'] = attrs['page-version'] = version - const component = contentCatalog && contentCatalog.getComponent(componentName) - if (component) { - const componentVersion = component.versions.find((it) => it.version === version) - if (componentVersion) attrs['page-component-display-version'] = componentVersion.displayVersion - attrs['page-component-title'] = component.title - } - attrs['page-module'] = module_ - attrs['page-relative-src-path'] = relative - if (origin) { - attrs['page-origin-type'] = origin.type - attrs['page-origin-url'] = origin.url - attrs['page-origin-start-path'] = origin.startPath - if (origin.branch) { - attrs['page-origin-refname'] = attrs['page-origin-branch'] = origin.branch - attrs['page-origin-reftype'] = 'branch' - } else { - attrs['page-origin-refname'] = attrs['page-origin-tag'] = origin.tag - attrs['page-origin-reftype'] = 'tag' - } - if (origin.worktree) { - attrs['page-origin-worktree'] = origin.worktree - attrs['page-origin-refhash'] = '(worktree)' - } else { - attrs['page-origin-refhash'] = origin.refhash - } - } - return attrs -} - -function extractAsciiDocMetadata (doc) { - const metadata = { attributes: doc.getAttributes() } - if (doc.hasHeader()) { - const doctitle = (metadata.doctitle = doc.getDocumentTitle()) - const xreftext = (metadata.xreftext = doc.$reftext().$to_s() || doctitle) - const navtitle = doc.getAttribute('navtitle') - metadata.navtitle = navtitle ? doc.$apply_reftext_subs(navtitle) : xreftext - } - return metadata -} - -/** - * Resolves a global AsciiDoc configuration object from data in the playbook. - * - * Reads data from the asciidoc category of the playbook and resolves it into a global AsciiDoc configuration object - * that can be used by the loadAsciiDoc function. This configuration object consists of built-in attributes as well as a - * shallow clone of the data from the asciidoc category in the playbook. - * - * The main purpose of this function is to resolve extension references in the playbook to extension - * functions. If the extension is scoped, the function is stored in this object. If the extension is global, it is - * registered with the global extension registry, then discarded. - * - * @memberof asciidoc-loader - * - * @param {Object} playbook - The configuration object for Antora (default: {}). - * @param {Object} playbook.asciidoc - The AsciiDoc configuration data in the playbook. - * - * @returns {Object} A resolved configuration object to be used by the loadAsciiDoc function. - */ -function resolveAsciiDocConfig (playbook = {}) { - const attributes = { - env: 'site', - 'env-site': '', - 'site-gen': 'antora', - 'site-gen-antora': '', - 'attribute-missing': 'warn', - 'data-uri': null, - icons: 'font', - sectanchors: '', - 'source-highlighter': 'highlight.js', - } - if (playbook.site) { - const site = playbook.site - if (site.title) attributes['site-title'] = site.title - if (site.url) attributes['site-url'] = site.url - } - if (!playbook.asciidoc) return { attributes } - // TODO process !name attributes - const { extensions, ...config } = Object.assign({ attributes }, playbook.asciidoc, { - attributes: Object.assign(attributes, playbook.asciidoc.attributes), - }) - if (extensions && extensions.length) { - const scopedExtensions = extensions.reduce((accum, extensionPath) => { - if (extensionPath.charAt() === '.' && DOT_RELATIVE_RX.test(extensionPath)) { - // NOTE require resolves a dot-relative path relative to current file; resolve relative to playbook dir instead - extensionPath = ospath.resolve(playbook.dir || '.', extensionPath) - } else if (!ospath.isAbsolute(extensionPath)) { - // NOTE appending node_modules prevents require from looking elsewhere before looking in these paths - const paths = [playbook.dir || '.', ospath.dirname(__dirname)].map((root) => ospath.join(root, 'node_modules')) - extensionPath = require.resolve(extensionPath, { paths }) - } - const extension = require(extensionPath) - if ('register' in extension) { - accum.push(extension) - } else if (!isExtensionRegistered(extension, Extensions)) { - // QUESTION should we assign an antora-specific group name? - Extensions.register(extension) - } - return accum - }, []) - if (scopedExtensions.length) config.extensions = scopedExtensions - } - return config -} - -function isExtensionRegistered (ext, registry) { - return Object.values(registry.getGroups()).includes(ext) -} - -/** - * Low-level operation to free objects from memory that have been weaved into an extension DSL module - */ -function freeExtensions () { - EXTENSION_DSL_TYPES.forEach((type) => (Opal.const_get_local(Extensions, type).$$iclasses.length = 0)) -} - -module.exports = Object.assign(loadAsciiDoc, { - loadAsciiDoc, - extractAsciiDocMetadata, - resolveAsciiDocConfig, - resolveConfig: resolveAsciiDocConfig, // @deprecated scheduled to be removed in Antora 4 -}) diff --git a/node_modules/@antora/asciidoc-loader/lib/logger/adapter.js b/node_modules/@antora/asciidoc-loader/lib/logger/adapter.js deleted file mode 100644 index c1b8c315..00000000 --- a/node_modules/@antora/asciidoc-loader/lib/logger/adapter.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict' - -const Opal = global.Opal -const logger = require('@antora/logger')('asciidoctor') - -const { $Antora } = require('../constants') - -const LoggerAdapter = (() => { - const classDef = Opal.klass(Opal.Antora || Opal.module(null, 'Antora', $Antora), Opal.Logger, 'LoggerAdapter') - - const severityMap = ((Severity) => - new Map( - Severity.$constants().reduce( - (accum, name) => { - const lowerName = name.toLowerCase() - if (lowerName === 'unknown') return accum - const val = Severity[name] - return accum.concat([ - [lowerName, val], - [val, lowerName], - ]) - }, - [ - ['silent', Infinity], - [Infinity, 'silent'], - ] - ) - ))(classDef.$superclass().Severity) - - Opal.defn(classDef, '$initialize', function initialize (context) { - Opal.send(this, Opal.find_super_dispatcher(this, 'initialize', initialize), [Opal.nil]) - const delegate = logger.unwrap() - this.level = severityMap.get(delegate.level) || severityMap.get('info') - this.failureLevel = severityMap.get(delegate.failureLevel) || Infinity - this.context = context - this.delegate = delegate - }) - - Opal.defn(classDef, '$add', function add (severity, message, progname) { - if (severity < this.level) { - if (severity >= this.failureLevel) this.delegate.setFailOnExit() - return true - } - if (message === Opal.nil) { - const block = add.$$p - if (block) { - message = block() - add.$$p = null - } else { - message = progname - } - } - if (message.$$is_hash) message = Object.assign({}, message.$$smap) - const logMethod = severityMap.get(severity) || 'info' - const logObject = { file: this.context } - if (message.text != null) { - let loc - if ((loc = message.include_location)) { - message = message.text.replace(/ (of|in) include file: .+/, ' $1 include file') - } else { - loc = message.source_location - message = message.text - } - if (loc) { - const file = loc.file - if (file.src) { - logObject.file = file.src - logObject.line = loc.lineno || undefined - const stack = (logObject.stack = []) - let ancestor = { file } - while ((ancestor = ancestor.file.parent)) { - stack.push({ file: ancestor.file.src || this.context, line: ancestor.lineno }) - } - //if (stack.length > 10) stack.splice(0, stack.length - 10) - } else { - logObject.line = loc.lineno - } - } - } - this.delegate[logMethod](logObject, message) - return true - }) - - return classDef -})() - -module.exports = Object.assign(LoggerAdapter, { logger }) diff --git a/node_modules/@antora/asciidoc-loader/lib/util/compute-relative-url-path.js b/node_modules/@antora/asciidoc-loader/lib/util/compute-relative-url-path.js deleted file mode 100644 index 74ab7934..00000000 --- a/node_modules/@antora/asciidoc-loader/lib/util/compute-relative-url-path.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict' - -const { posix: path } = require('path') - -/** - * Computes the shortest relative path between two URLs. - * - * This function takes into account directory index URLs and extensionless - * URLs. It assumes it's working with root-relative URLs, not qualified URLs - * with potentially different hosts. - * - * @memberof asciidoc-loader - * - * @param {String} from - The root-relative start URL. - * @param {String} to - The root-relative target URL. - * @param {String} [hash=''] - The URL hash to append to the URL (not #). - * - * @returns {String} The shortest relative path to travel from the start URL to the target URL. - */ -function computeRelativeUrlPath (from, to, hash = '') { - if (to.charAt() === '/') { - return to === from - ? hash || (isDir(to) ? './' : path.basename(to)) - : (path.relative(path.dirname(from + '.'), to) || '.') + (isDir(to) ? '/' + hash : hash) - } else { - return to + hash - } -} - -function isDir (str) { - return str.charAt(str.length - 1) === '/' -} - -module.exports = computeRelativeUrlPath diff --git a/node_modules/@antora/asciidoc-loader/lib/util/split-once.js b/node_modules/@antora/asciidoc-loader/lib/util/split-once.js deleted file mode 100644 index 18dd5a3e..00000000 --- a/node_modules/@antora/asciidoc-loader/lib/util/split-once.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict' - -/** - * Splits the specified string at the first occurrence of the specified separator. - * - * @memberof asciidoc-loader - * - * @param {String} string - The string to split. - * @param {String} separator - A single character on which to split the string. - * @returns {String[]} A 2-element Array that contains the string before and after the separator, if - * the separator is found, otherwise a single-element Array that contains the original string. - */ -function splitOnce (string, separator) { - const separatorIdx = string.indexOf(separator) - return ~separatorIdx ? [string.substr(0, separatorIdx), string.substr(separatorIdx + 1)] : [string] -} - -module.exports = splitOnce diff --git a/node_modules/@antora/asciidoc-loader/lib/xref/convert-page-ref.js b/node_modules/@antora/asciidoc-loader/lib/xref/convert-page-ref.js deleted file mode 100644 index c76d5e44..00000000 --- a/node_modules/@antora/asciidoc-loader/lib/xref/convert-page-ref.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict' - -const computeRelativeUrlPath = require('../util/compute-relative-url-path') - -/** - * Converts the specified page reference to the data necessary to build an HTML link. - * - * Parses the page reference (page ID and optional fragment), resolves the corresponding file from - * the content catalog, then grabs its publication (root-relative) path. If the relativize param is - * true, transforms the root-relative path to a relative path from the current page to the target - * page. Uses the resulting path to create the href for an HTML link that points to the published - * target page. - * - * @memberof asciidoc-loader - * - * @param {String} refSpec - The target of a page xref macro, which is a page ID spec with an optional - * fragment identifier. - * @param {String} content - The content (i.e., formatted text) of the link (undefined if not specified). - * @param {File} currentPage - The virtual file for the current page, which serves as the context. - * @param {ContentCatalog} contentCatalog - The content catalog that contains the virtual files in the site. - * @param {Boolean} [relativize=true] - Compute the target relative to the current page. - * @returns {Object} A map ({ content, target, internal, unresolved }) containing the resolved - * content and target to make an HTML link, and hints to indicate if the reference is either - * internal or unresolved. - */ -function convertPageRef (refSpec, content, currentPage, contentCatalog, relativize = true) { - let pageSpec - let hash - let target - let targetPage - if (~(hash = refSpec.indexOf('#'))) { - pageSpec = refSpec.substr(0, hash) - hash = refSpec.substr(hash) - } else { - pageSpec = refSpec - hash = '' - } - if (!((targetPage = contentCatalog.resolvePage(pageSpec, currentPage.src)) && targetPage.pub)) { - return { content: content || refSpec, target: '#' + refSpec, unresolved: true } - } - if (relativize) { - target = computeRelativeUrlPath(currentPage.pub.url, targetPage.pub.url, hash) - if (target === hash) return { content, target, internal: true } - } else { - target = targetPage.pub.url + hash - } - if (!content) { - if (hash) { - content = pageSpec + hash - } else { - content = - (currentPage.src.family === 'nav' - ? (targetPage.asciidoc || {}).navtitle - : (targetPage.asciidoc || {}).xreftext) || pageSpec - } - } - return { content, target } -} - -module.exports = convertPageRef diff --git a/node_modules/@antora/asciidoc-loader/package.json b/node_modules/@antora/asciidoc-loader/package.json deleted file mode 100644 index 7a721b95..00000000 --- a/node_modules/@antora/asciidoc-loader/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "_from": "@antora/asciidoc-loader@3.0.0-alpha.7", - "_id": "@antora/asciidoc-loader@3.0.0-alpha.7", - "_inBundle": false, - "_integrity": "sha512-PyHNhwQ+4cfB9TrWrIJnxfOGiGmwFnSuZlLqLEe99rnIl2TY6IG8E8pbcak5TzqOM8HJoGtGIx52yZ2hF7a+rw==", - "_location": "/@antora/asciidoc-loader", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@antora/asciidoc-loader@3.0.0-alpha.7", - "name": "@antora/asciidoc-loader", - "escapedName": "@antora%2fasciidoc-loader", - "scope": "@antora", - "rawSpec": "3.0.0-alpha.7", - "saveSpec": null, - "fetchSpec": "3.0.0-alpha.7" - }, - "_requiredBy": [ - "/@antora/document-converter", - "/@antora/navigation-builder", - "/@antora/redirect-producer", - "/@antora/site-generator-default" - ], - "_resolved": "https://registry.npmjs.org/@antora/asciidoc-loader/-/asciidoc-loader-3.0.0-alpha.7.tgz", - "_shasum": "ae7486607d4d9a304a03696f88e856596a916a43", - "_spec": "@antora/asciidoc-loader@3.0.0-alpha.7", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/site-generator-default", - "author": { - "name": "OpenDevise Inc.", - "url": "https://opendevise.com" - }, - "bugs": { - "url": "https://gitlab.com/antora/antora/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Dan Allen", - "email": "dan@opendevise.com" - }, - { - "name": "Sarah White", - "email": "sarah@opendevise.com" - }, - { - "name": "Guillaume Grossetie", - "email": "g.grossetie@gmail.com" - }, - { - "name": "David Jencks", - "email": "djencks@apache.org" - } - ], - "dependencies": { - "@antora/logger": "3.0.0-alpha.7", - "@asciidoctor/core": "~2.2" - }, - "deprecated": false, - "description": "Loads AsciiDoc content into an Asciidoctor Document object (AST) for use in an Antora documentation pipeline.", - "engines": { - "node": ">=10.17.0" - }, - "files": [ - "lib/" - ], - "gitHead": "fbd597b3680474f2083cda8a7facf1e2848c08e0", - "homepage": "https://antora.org", - "keywords": [ - "antora", - "antora-component", - "asciidoc", - "asciidoctor", - "documentation", - "static site", - "web publishing" - ], - "license": "MPL-2.0", - "main": "lib/index.js", - "name": "@antora/asciidoc-loader", - "repository": { - "type": "git", - "url": "git+https://gitlab.com/antora/antora.git" - }, - "version": "3.0.0-alpha.7" -} diff --git a/node_modules/@antora/cli/LICENSE b/node_modules/@antora/cli/LICENSE deleted file mode 100644 index a612ad98..00000000 --- a/node_modules/@antora/cli/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/node_modules/@antora/cli/README.md b/node_modules/@antora/cli/README.md deleted file mode 100644 index c959629e..00000000 --- a/node_modules/@antora/cli/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# Antora CLI - -The command line interface (CLI) for Antora. - -[Antora](https://antora.org) is a modular static site generator designed for creating documentation sites from AsciiDoc documents. -Its site generator pipeline aggregates documents from versioned content repositories and processes them using [Asciidoctor](https://asciidoctor.org). - -To run Antora, you need both the CLI and a site generator pipeline. -Once these packages are installed, you can use the `antora` command to generate your site. - -## How to Install - -Let's start by installing the CLI. - -```sh -npm install -g @antora/cli -``` - -This package adds the `antora` command to your PATH. -You can check by running: - -```sh -antora -v -``` - -Next, install a site generator. -The default site generator will be sufficient for most users. - -```sh -npm install -g @antora/site-generator-default -``` - -The `antora` command (specifically the implicit `generate` subcommand) will look for this package by default. - -## How to Use - -To run Antora, you'll need a playbook file and at least one content (source) repository. -Consult the [quickstart](https://docs.antora.org/antora/latest/install-and-run-quickstart/) to find an example. - -Once you have your content sources set up, just point the `antora` command at your playbook file: - -```sh -antora antora-playbook.yml -``` - -The `antora` command will output the generated site to the _build/site_ folder by default. - -## Copyright and License - -Copyright (C) 2017-present [OpenDevise Inc.](https://opendevise.com) and the [Antora Project](https://antora.org). - -Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0). diff --git a/node_modules/@antora/cli/bin/antora b/node_modules/@antora/cli/bin/antora deleted file mode 100755 index 0152346a..00000000 --- a/node_modules/@antora/cli/bin/antora +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node - -'use strict' - -require('..')() diff --git a/node_modules/@antora/cli/lib/cli.js b/node_modules/@antora/cli/lib/cli.js deleted file mode 100644 index b836343b..00000000 --- a/node_modules/@antora/cli/lib/cli.js +++ /dev/null @@ -1,134 +0,0 @@ -#!/usr/bin/env node - -'use strict' - -const cli = require('./commander') -// Q: can we ask the playbook builder for the config schema? -const configSchema = require('@antora/playbook-builder/lib/config/schema') -const convict = require('@antora/playbook-builder/lib/solitary-convict') -const { finalizeLogger } = require('@antora/logger') -const ospath = require('path') - -const DOT_RELATIVE_RX = new RegExp(`^\\.{1,2}[/${ospath.sep.replace('/', '').replace('\\', '\\\\')}]`) -const { version: VERSION } = require('../package.json') - -async function run (argv = process.argv) { - const args = argv.slice(2) - return cli.parseAsync(args.length ? args : ['help'], { from: 'user' }) -} - -function exitWithError (err, showStack, msg = undefined) { - if (!msg) msg = err.message || err - if (showStack) { - let stack - if ((stack = err.backtrace)) { - msg = [`error: ${msg}`, ...stack.slice(1)].join('\n') - } else if ((stack = err.stack)) { - msg = stack.startsWith(`${err.name}: ${msg}\n`) ? stack : [msg, ...stack.split('\n').slice(1)].join('\n') - } else { - msg = `error: ${msg} (no stack)` - } - console.error(msg) - } else { - console.error(`error: ${msg}\nAdd the --stacktrace option to see the cause.`) - } - process.exit(1) -} - -function getTTYColumns () { - return process.env.COLUMNS || process.stdout.columns || 80 -} - -function requireLibraries (requirePaths) { - if (requirePaths) requirePaths.forEach((requirePath) => requireLibrary(requirePath)) -} - -function requireLibrary (requirePath, cwd = process.cwd()) { - if (requirePath.charAt() === '.' && DOT_RELATIVE_RX.test(requirePath)) { - // NOTE require resolves a dot-relative path relative to current file; resolve relative to cwd instead - requirePath = ospath.resolve(requirePath) - } else if (!ospath.isAbsolute(requirePath)) { - // NOTE appending node_modules prevents require from looking elsewhere before looking in these paths - const paths = [cwd, ospath.dirname(__dirname)].map((start) => ospath.join(start, 'node_modules')) - requirePath = require.resolve(requirePath, { paths }) - } - return require(requirePath) -} - -cli - .allowExcessArguments(false) - .configureOutput({ getOutHelpWidth: getTTYColumns, getErrHelpWidth: getTTYColumns }) - .storeOptionsAsProperties() - .name('antora') - .version(VERSION, '-v, --version', 'Output the version number.') - .description('A modular, multi-repository documentation site generator for AsciiDoc.') - .usage('[options] [[command] [args]]') - .helpOption('-h, --help', 'Output usage information.') - .addHelpText( - 'after', - function () { - const name = this.name() - return this.createHelp().wrap( - ` \nRun '${name} --help' to see options and examples for a command (e.g., ${name} generate --help).`, - getTTYColumns(), - 0 - ) - }.bind(cli) - ) - .option('-r, --require ', 'Require library (aka node module) or script before executing command.') - .on('option:require', (requirePath) => (cli.requirePaths = [...(cli.requirePaths || []), requirePath])) - .option('--stacktrace', 'Print the stacktrace to the console if the application fails.') - -cli - .command('generate ', { isDefault: true }) - .description('Generate a documentation site specified in .') - .optionsFromConvict(convict(configSchema), { exclude: 'playbook' }) - .addOption( - cli - .createOption('--generator ', 'The site generator library.') - .default('@antora/site-generator-default', '@antora/site-generator-default') - ) - .action(async (playbookFile, options, command) => { - try { - requireLibraries(cli.requirePaths) - } catch (err) { - exitWithError(err, cli.stacktrace) - } - const generator = options.generator - let generateSite - try { - generateSite = requireLibrary(generator, ospath.resolve(playbookFile, '..')) - } catch (err) { - let msg = 'Generator not found or failed to load.' - if (generator && generator.charAt() !== '.') msg += ` Try installing the '${generator}' package.` - exitWithError(err, cli.stacktrace, msg) - } - const args = cli.rawArgs.slice(cli.rawArgs.indexOf(command.name()) + 1) - args.splice(args.indexOf(playbookFile), 0, '--playbook') - // TODO support passing a preloaded convict config as third option; gets new args and env - return generateSite(args, process.env) - .then(finalizeLogger) - .then((failOnExit) => process.exit(failOnExit ? 1 : process.exitCode)) - .catch((err) => finalizeLogger().then(() => exitWithError(err, cli.stacktrace))) - }) - .options.sort((a, b) => a.long.localeCompare(b.long)) - -cli.command('help [command]', { hidden: true }).action((name, options, command) => { - if (name) { - const helpCommand = cli.commands.find((candidate) => candidate.name() === name) - if (helpCommand) { - helpCommand.help() - } else { - console.error( - `'${name}' is not a valid command in ${cli.name()}. See '${cli.name()} --help' for a list of commands.` - ) - process.exit(1) - } - } else { - cli.help() - } -}) - -cli.command('version', { hidden: true }).action(() => cli.emit('option:version')) - -module.exports = run diff --git a/node_modules/@antora/cli/lib/commander.js b/node_modules/@antora/cli/lib/commander.js deleted file mode 100644 index a56c110e..00000000 --- a/node_modules/@antora/cli/lib/commander.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict' - -const commander = require('commander') -require('./commander/options-from-convict') - -module.exports = commander diff --git a/node_modules/@antora/cli/lib/commander/options-from-convict.js b/node_modules/@antora/cli/lib/commander/options-from-convict.js deleted file mode 100644 index 3a2eae48..00000000 --- a/node_modules/@antora/cli/lib/commander/options-from-convict.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict' - -const { Command } = require('commander') - -Command.prototype.optionsFromConvict = function (convictConfig, opts = {}) { - let exclude = opts.exclude - if (exclude && !Array.isArray(exclude)) exclude = [exclude] - getOptions(convictConfig).forEach(({ name, form, description, default: default_, choices }) => { - if (exclude && exclude.includes(name)) return - this.addOption( - choices - ? this.createOption(form, description) - .default(default_, default_) - .choices(choices) - : this.createOption(form, description).default(default_, default_) - ) - }) - return this -} - -function getOptions (config) { - //return collectOptions(config._schema._cvtProperties).sort((a, b) => a.name.localeCompare(b.name)) - return collectOptions(config._schema._cvtProperties) -} - -function collectOptions (props, context = undefined) { - return Object.entries(props).reduce((accum, [key, value]) => { - if ('_cvtProperties' in value) { - accum.push(...collectOptions(value._cvtProperties, context ? `${context}.${key}` : key)) - } else if ('arg' in value) { - const { arg, format, default: default_ } = value - const option = { name: arg, form: `--${arg}`, description: value.doc, format: format } - if (Array.isArray(format)) { - option.form += ' ' - option.choices = Object.defineProperty(format.slice(0), 'map', { value: () => format }) - } else if (format !== 'boolean') { - option.form += ` <${arg.substr(arg.lastIndexOf('-') + 1, arg.length)}>` - } - if (default_ === null) { - //option.mandatory = true - option.description += ' (required)' - } else if (default_ && default_.constructor !== Object) { - option.default = default_ - } - accum.push(option) - //if (format === 'boolean') accum.push({ form: `--no-${arg}`, format: format }) - } - return accum - }, []) -} diff --git a/node_modules/@antora/cli/package.json b/node_modules/@antora/cli/package.json deleted file mode 100644 index 947c282c..00000000 --- a/node_modules/@antora/cli/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "_from": "@antora/cli@3.0.0-alpha.7", - "_id": "@antora/cli@3.0.0-alpha.7", - "_inBundle": false, - "_integrity": "sha512-DQSochNSvJIA2FEfRLvYXxL/LzpNcFgwB7ehJ+SCW/yAf3SEuKQo02L3FDVeLb9UtPx8dDdn74/yd+LMOzWJzw==", - "_location": "/@antora/cli", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@antora/cli@3.0.0-alpha.7", - "name": "@antora/cli", - "escapedName": "@antora%2fcli", - "scope": "@antora", - "rawSpec": "3.0.0-alpha.7", - "saveSpec": null, - "fetchSpec": "3.0.0-alpha.7" - }, - "_requiredBy": [ - "#DEV:/" - ], - "_resolved": "https://registry.npmjs.org/@antora/cli/-/cli-3.0.0-alpha.7.tgz", - "_shasum": "6c850f5ddd5f9eff7764d317646a73bd5fa48794", - "_spec": "@antora/cli@3.0.0-alpha.7", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com", - "author": { - "name": "OpenDevise Inc.", - "url": "https://opendevise.com" - }, - "bin": { - "antora": "bin/antora" - }, - "bugs": { - "url": "https://gitlab.com/antora/antora/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Dan Allen", - "email": "dan@opendevise.com" - }, - { - "name": "Sarah White", - "email": "sarah@opendevise.com" - } - ], - "dependencies": { - "@antora/logger": "3.0.0-alpha.7", - "@antora/playbook-builder": "3.0.0-alpha.7", - "commander": "~7.2" - }, - "deprecated": false, - "description": "The command line interface for Antora.", - "devDependencies": { - "@antora/site-publisher": "3.0.0-alpha.7", - "convict": "~6.1", - "kapok-js": "~0.10" - }, - "engines": { - "node": ">=10.17.0" - }, - "files": [ - "bin/", - "lib/" - ], - "gitHead": "fbd597b3680474f2083cda8a7facf1e2848c08e0", - "homepage": "https://antora.org", - "keywords": [ - "antora", - "cli", - "generator", - "documentation", - "static site", - "web publishing" - ], - "license": "MPL-2.0", - "main": "lib/cli.js", - "name": "@antora/cli", - "repository": { - "type": "git", - "url": "git+https://gitlab.com/antora/antora.git" - }, - "version": "3.0.0-alpha.7" -} diff --git a/node_modules/@antora/content-aggregator/LICENSE b/node_modules/@antora/content-aggregator/LICENSE deleted file mode 100644 index a612ad98..00000000 --- a/node_modules/@antora/content-aggregator/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/node_modules/@antora/content-aggregator/README.md b/node_modules/@antora/content-aggregator/README.md deleted file mode 100644 index 0f3a99d2..00000000 --- a/node_modules/@antora/content-aggregator/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Antora Content Aggregator - -The Content Aggregator is a component in Antora responsible for fetching and aggregating content distributed across multiple local and remote git repositories for use in an Antora documentation pipeline. - -[Antora](https://antora.org) is a modular static site generator designed for creating documentation sites from AsciiDoc documents. -Its site generator pipeline aggregates documents from versioned content repositories and processes them using [Asciidoctor](https://asciidoctor.org). - -## Copyright and License - -Copyright (C) 2017-present [OpenDevise Inc.](https://opendevise.com) and the [Antora Project](https://antora.org). - -Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0). diff --git a/node_modules/@antora/content-aggregator/lib/aggregate-content.js b/node_modules/@antora/content-aggregator/lib/aggregate-content.js deleted file mode 100644 index 5fcd14fc..00000000 --- a/node_modules/@antora/content-aggregator/lib/aggregate-content.js +++ /dev/null @@ -1,1038 +0,0 @@ -'use strict' - -const camelCaseKeys = require('camelcase-keys') -const { createHash } = require('crypto') -const createHttpPlugin = require('./git-plugin-http') -const decodeUint8Data = require('./decode-uint8-data') -const EventEmitter = require('events') -const expandPath = require('@antora/expand-path-helper') -const File = require('./file') -const flattenDeep = require('./flatten-deep') -const fs = require('fs') -const { promises: fsp } = fs -const getCacheDir = require('cache-directory') -const GitCredentialManagerStore = require('./git-credential-manager-store') -const git = require('isomorphic-git') -const { NotFoundError, ObjectTypeError, UnknownTransportError, UrlParseError } = git.Errors -const invariably = { false: () => false, void: () => undefined, emptyArray: () => [] } -const { makeRe: makePicomatchRx } = require('picomatch') -const matcher = require('matcher') -const MultiProgress = require('multi-progress') -const ospath = require('path') -const { posix: path } = ospath -const posixify = ospath.sep === '\\' ? (p) => p.replace(/\\/g, '/') : undefined -const { fs: resolvePathGlobsFs, git: resolvePathGlobsGit } = require('./resolve-path-globs') -const { Transform } = require('stream') -const map = (transform, flush = undefined) => new Transform({ objectMode: true, transform, flush }) -const vfs = require('vinyl-fs') -const yaml = require('js-yaml') - -const { - COMPONENT_DESC_FILENAME, - CONTENT_CACHE_FOLDER, - CONTENT_GLOB, - FILE_MODES, - GIT_CORE, - GIT_OPERATION_LABEL_LENGTH, - GIT_PROGRESS_PHASES, - PICOMATCH_VERSION_OPTS, - SYMLINK_FILE_MODE, - VALID_STATE_FILENAME, -} = require('./constants') - -const ANY_SEPARATOR_RX = /[:/]/ -const CSV_RX = /\s*,\s*/ -const VENTILATED_CSV_RX = /\s*,\s+/ -const EDIT_URL_TEMPLATE_VAR_RX = /\{(web_url|ref(?:hash|name)|path)\}/g -const GIT_SUFFIX_RX = /(?:(?:(?:\.git)?\/)?\.git|\/)$/ -const GIT_URI_DETECTOR_RX = /:(?:\/\/|[^/\\])/ -const HEADS_DIR_RX = /^heads\// -const HOSTED_GIT_REPO_RX = /^(?:https?:\/\/|.+@)(git(?:hub|lab)\.com|bitbucket\.org|pagure\.io)[/:](.+?)(?:\.git)?$/ -const HTTP_ERROR_CODE_RX = new RegExp('^' + git.Errors.HttpError.code + '$', 'i') -const PATH_SEPARATOR_RX = /[/]/g -const SHORTEN_REF_RX = /^refs\/(?:heads|remotes\/[^/]+|tags)\// -const SPACE_RX = / /g -const SUPERFLUOUS_SEPARATORS_RX = /^\/+|\/+$|\/+(?=\/)/g -const URL_AUTH_CLEANER_RX = /^(https?:\/\/)[^/@]*@/ -const URL_AUTH_EXTRACTOR_RX = /^(https?:\/\/)(?:([^/:@]+)?(?::([^/@]+)?)?@)?(.*)/ - -/** - * Aggregates files from the specified content sources so they can be loaded - * into Antora's virtual file catalog. - * - * Currently assumes each source points to a local or remote git repository. - * Clones the repository, if necessary, then walks the git tree (or worktree) of - * the specified branches and tags, starting from the specified start path(s). - * Creates a virtual file containing the contents and location metadata for each - * file matched. The files are then roughly organized by component version. - * - * @memberof content-aggregator - * - * @param {Object} playbook - The configuration object for Antora. - * @param {Object} playbook.dir - The working directory of the playbook. - * @param {Object} playbook.runtime - The runtime configuration object for Antora. - * @param {String} [playbook.runtime.cacheDir=undefined] - The base cache directory. - * @param {Boolean} [playbook.runtime.fetch=undefined] - Whether to fetch - * updates from managed git repositories. - * @param {Boolean} [playbook.runtime.quiet=false] - Whether to be suppress progress - * bars that show progress of clone and fetch operations. - * @param {Array} playbook.git - The git configuration object for Antora. - * @param {Boolean} [playbook.git.ensureGitSuffix=true] - Whether the .git - * suffix is automatically appended to each repository URL, if missing. - * @param {Array} playbook.content - An array of content sources. - * - * @returns {Promise} A map of files organized by component version. - */ -function aggregateContent (playbook) { - const startDir = playbook.dir || '.' - const { branches, editUrl, tags, sources } = playbook.content - const { cacheDir, fetch, quiet } = playbook.runtime - return ensureCacheDir(cacheDir, startDir).then((resolvedCacheDir) => { - const gitPlugins = loadGitPlugins( - Object.assign({ ensureGitSuffix: true }, playbook.git), - playbook.network || {}, - startDir - ) - const sourcesByUrl = sources.reduce( - (accum, source) => accum.set(source.url, [...(accum.get(source.url) || []), source]), - new Map() - ) - const progress = !quiet && createProgress(sourcesByUrl.keys(), process.stdout) - return Promise.all( - [...sourcesByUrl.entries()].map(([url, sources]) => - loadRepository(url, { - cacheDir: resolvedCacheDir, - gitPlugins, - fetchTags: tagsSpecified(sources, tags), - progress, - fetch, - startDir, - }).then(({ repo, authStatus }) => - Promise.all( - sources.map((source) => { - source = Object.assign({ branches, editUrl, tags }, source) - // NOTE if repository is managed (has a url), we can assume the remote name is origin - // TODO if the repo has no remotes, then remoteName should be undefined - const remoteName = repo.url ? 'origin' : source.remote || 'origin' - return collectFilesFromSource(source, repo, remoteName, authStatus) - }) - ) - ) - ) - ) - .then(buildAggregate) - .catch((err) => { - progress && progress.terminate() - throw err - }) - }) -} - -function buildAggregate (componentVersionBuckets) { - const aggregateMap = flattenDeep(componentVersionBuckets).reduce((accum, batch) => { - const key = batch.version + '@' + batch.name - const entry = accum.get(key) - return accum.set(key, entry ? Object.assign(entry, batch, { files: [...entry.files, ...batch.files] }) : batch) - }, new Map()) - return [...aggregateMap.values()] -} - -async function loadRepository (url, opts) { - let dir - let repo - let authStatus - if (~url.indexOf(':') && GIT_URI_DETECTOR_RX.test(url)) { - let displayUrl - let credentials - ;({ displayUrl, url, credentials } = extractCredentials(url)) - const { cacheDir, fetch, fetchTags, gitPlugins, progress } = opts - dir = ospath.join(cacheDir, generateCloneFolderName(displayUrl)) - // NOTE the presence of the url property on the repo object implies the repository is remote - repo = { cache: {}, dir, fs, gitdir: dir, noCheckout: true, url } - const validStateFile = ospath.join(dir, VALID_STATE_FILENAME) - try { - await fsp.access(validStateFile) - if (fetch) { - await fsp.unlink(validStateFile) - const fetchOpts = buildFetchOptions(repo, progress, displayUrl, credentials, gitPlugins, fetchTags, 'fetch') - await git - .fetch(fetchOpts) - .then(() => { - const credentialManager = gitPlugins.credentialManager - authStatus = credentials ? 'auth-embedded' : credentialManager.status({ url }) ? 'auth-required' : undefined - return git.setConfig(Object.assign({ path: 'remote.origin.private', value: authStatus }, repo)) - }) - .catch((fetchErr) => { - if (fetchOpts.onProgress) fetchOpts.onProgress.finish(fetchErr) - if (HTTP_ERROR_CODE_RX.test(fetchErr.code) && fetchErr.data.statusCode === 401) fetchErr.rethrow = true - throw fetchErr - }) - .then(() => fsp.writeFile(validStateFile, '').catch(invariably.void)) - .then(() => fetchOpts.onProgress && fetchOpts.onProgress.finish()) - } else { - authStatus = await git.getConfig(Object.assign({ path: 'remote.origin.private' }, repo)) - } - } catch (gitErr) { - await rmdir(dir) - if (gitErr.rethrow) throw transformGitCloneError(gitErr, displayUrl) - const fetchOpts = buildFetchOptions(repo, progress, displayUrl, credentials, gitPlugins, fetchTags, 'clone') - await git - .clone(fetchOpts) - .then(() => git.resolveRef(Object.assign({ ref: 'HEAD', depth: 1 }, repo))) - .then(() => { - const credentialManager = gitPlugins.credentialManager - authStatus = credentials ? 'auth-embedded' : credentialManager.status({ url }) ? 'auth-required' : undefined - return git.setConfig(Object.assign({ path: 'remote.origin.private', value: authStatus }, repo)) - }) - .catch(async (cloneErr) => { - await rmdir(dir) - // FIXME triggering the error handler here causes assertion problems in the test suite - //if (fetchOpts.onProgress) fetchOpts.onProgress.finish(cloneErr) - throw transformGitCloneError(cloneErr, displayUrl) - }) - .then(() => fsp.writeFile(validStateFile, '').catch(invariably.void)) - .then(() => fetchOpts.onProgress && fetchOpts.onProgress.finish()) - } - } else if (await isDirectory((dir = expandPath(url, '~+', opts.startDir)))) { - repo = (await isDirectory(ospath.join(dir, '.git'))) - ? { cache: {}, dir, fs } - : { cache: {}, dir, fs, gitdir: dir, noCheckout: true } - try { - await git.resolveRef(Object.assign({ ref: 'HEAD', depth: 1 }, repo)) - } catch { - throw new Error( - `Local content source must be a git repository: ${dir}${url !== dir ? ' (url: ' + url + ')' : ''}` - ) - } - } else { - throw new Error(`Local content source does not exist: ${dir}${url !== dir ? ' (url: ' + url + ')' : ''}`) - } - return { repo, authStatus } -} - -function extractCredentials (url) { - if ((url.startsWith('https://') || url.startsWith('http://')) && ~url.indexOf('@')) { - // Common oauth2 formats: (QUESTION should we try to coerce token only into one of these formats?) - // GitHub: :x-oauth-basic@ (or @) - // GitHub App: x-access-token:@ - // GitLab: oauth2:@ - // BitBucket: x-token-auth:@ - const [, scheme, username, password, rest] = url.match(URL_AUTH_EXTRACTOR_RX) - const displayUrl = (url = scheme + rest) - // NOTE if only username is present, assume it's an oauth token and set password to empty string - const credentials = username ? { username, password: password || '' } : {} - return { displayUrl, url, credentials } - } else if (url.startsWith('git@')) { - return { displayUrl: url, url: 'https://' + url.substr(4).replace(':', '/') } - } else { - return { displayUrl: url, url } - } -} - -async function collectFilesFromSource (source, repo, remoteName, authStatus) { - const originUrl = repo.url || (await resolveRemoteUrl(repo, remoteName)) - return selectReferences(source, repo, remoteName).then((refs) => - Promise.all(refs.map((ref) => collectFilesFromReference(source, repo, remoteName, authStatus, ref, originUrl))) - ) -} - -// QUESTION should we resolve HEAD to a ref eagerly to avoid having to do a match on it? -async function selectReferences (source, repo, remote) { - let { branches: branchPatterns, tags: tagPatterns, worktrees: worktreePatterns = '.' } = source - const isBare = repo.noCheckout - const refs = new Map() - if (tagPatterns) { - tagPatterns = Array.isArray(tagPatterns) - ? tagPatterns.map((pattern) => String(pattern)) - : String(tagPatterns).split(CSV_RX) - if (tagPatterns.length) { - const tags = await git.listTags(repo) - for (const shortname of tags.length ? matcher(tags, tagPatterns) : tags) { - // NOTE tags are stored using symbol keys to distinguish them from branches - refs.set(Symbol(shortname), { shortname, fullname: 'tags/' + shortname, type: 'tag' }) - } - } - } - if (branchPatterns) { - if (worktreePatterns) { - if (worktreePatterns === '.') { - worktreePatterns = ['.'] - } else if (worktreePatterns === true) { - worktreePatterns = ['.', '*'] - } else { - worktreePatterns = Array.isArray(worktreePatterns) - ? worktreePatterns.map((pattern) => String(pattern)) - : String(worktreePatterns).split(CSV_RX) - } - } - const branchPatternsString = String(branchPatterns) - if (branchPatternsString === 'HEAD' || branchPatternsString === '.') { - const currentBranch = await getCurrentBranchName(repo, remote) - if (currentBranch) { - branchPatterns = [currentBranch] - } else { - if (!isBare) { - // NOTE current branch is undefined when HEAD is detached - const ref = { shortname: 'HEAD', fullname: 'HEAD', type: 'branch', detached: true } - if (worktreePatterns[0] === '.') ref.head = repo.dir - refs.set('HEAD', ref) - } - return [...refs.values()] - } - } else if ( - (branchPatterns = Array.isArray(branchPatterns) - ? branchPatterns.map((pattern) => String(pattern)) - : branchPatternsString.split(CSV_RX)).length - ) { - let headBranchIdx - // NOTE we can assume at least two entries if HEAD or . are present - if (~(headBranchIdx = branchPatterns.indexOf('HEAD')) || ~(headBranchIdx = branchPatterns.indexOf('.'))) { - const currentBranch = await getCurrentBranchName(repo, remote) - if (currentBranch) { - // NOTE ignore if current branch is already in list - if (~branchPatterns.indexOf(currentBranch)) { - branchPatterns.splice(headBranchIdx, 1) - } else { - branchPatterns[headBranchIdx] = currentBranch - } - } else { - if (!isBare) { - // NOTE current branch is undefined when HEAD is detached - const ref = { shortname: 'HEAD', fullname: 'HEAD', type: 'branch', detached: true } - if (worktreePatterns[0] === '.' && (worktreePatterns = worktreePatterns.slice(1))) ref.head = repo.dir - refs.set('HEAD', ref) - } - branchPatterns.splice(headBranchIdx, 1) - } - } - } else { - return [...refs.values()] - } - // NOTE isomorphic-git includes HEAD in list of remote branches (see https://isomorphic-git.org/docs/listBranches) - const remoteBranches = (await git.listBranches(Object.assign({ remote }, repo))).filter((it) => it !== 'HEAD') - if (remoteBranches.length) { - for (const shortname of matcher(remoteBranches, branchPatterns)) { - refs.set(shortname, { shortname, fullname: path.join('remotes', remote, shortname), type: 'branch', remote }) - } - } - // NOTE only consider local branches if repo has a worktree or there are no remote tracking branches - if (!isBare) { - const localBranches = await git.listBranches(repo) - if (localBranches.length) { - const worktrees = await findWorktrees(repo, worktreePatterns) - for (const shortname of matcher(localBranches, branchPatterns)) { - const ref = { shortname, fullname: 'heads/' + shortname, type: 'branch' } - if (worktrees.has(shortname)) ref.head = worktrees.get(shortname) - refs.set(shortname, ref) - } - } - } else if (!remoteBranches.length) { - // QUESTION should local branches be used if the only remote branch is HEAD? - const localBranches = await git.listBranches(repo) - for (const shortname of localBranches.length ? matcher(localBranches, branchPatterns) : localBranches) { - refs.set(shortname, { shortname, fullname: 'heads/' + shortname, type: 'branch' }) - } - } - } - return [...refs.values()] -} - -/** - * Returns the current branch name unless the HEAD is detached. - */ -function getCurrentBranchName (repo, remote) { - let refPromise - if (repo.noCheckout) { - refPromise = git - .resolveRef(Object.assign({ ref: 'refs/remotes/' + remote + '/HEAD', depth: 2 }, repo)) - .catch(() => git.resolveRef(Object.assign({ ref: 'HEAD', depth: 2 }, repo))) - } else { - refPromise = git.resolveRef(Object.assign({ ref: 'HEAD', depth: 2 }, repo)) - } - return refPromise.then((ref) => (ref.startsWith('refs/') ? ref.replace(SHORTEN_REF_RX, '') : undefined)) -} - -async function collectFilesFromReference (source, repo, remoteName, authStatus, ref, originUrl) { - const url = repo.url - const displayUrl = url || repo.dir - const { version, editUrl } = source - const worktreePath = ref.head - if (!worktreePath) { - ref.oid = await git.resolveRef( - Object.assign(ref.detached ? { ref: 'HEAD', depth: 1 } : { ref: 'refs/' + ref.fullname }, repo) - ) - } - if ('startPaths' in source) { - let startPaths - startPaths = Array.isArray((startPaths = source.startPaths)) - ? startPaths.map(coerceToString).map(cleanStartPath) - : (startPaths = coerceToString(startPaths)) && startPaths.split(VENTILATED_CSV_RX).map(cleanStartPath) - startPaths = await (worktreePath - ? resolvePathGlobsFs(worktreePath, startPaths) - : resolvePathGlobsGit(repo, ref.oid, startPaths)) - if (!startPaths.length) { - const refInfo = `ref: ${ref.fullname.replace(HEADS_DIR_RX, '')}${worktreePath ? ' ' : ''}` - throw new Error(`no start paths found in ${displayUrl} (${refInfo})`) - } - return Promise.all( - startPaths.map((startPath) => - collectFilesFromStartPath(startPath, repo, authStatus, ref, worktreePath, originUrl, editUrl, version) - ) - ) - } - const startPath = cleanStartPath(coerceToString(source.startPath)) - return collectFilesFromStartPath(startPath, repo, authStatus, ref, worktreePath, originUrl, editUrl, version) -} - -function collectFilesFromStartPath (startPath, repo, authStatus, ref, worktreePath, originUrl, editUrl, version) { - return (worktreePath - ? readFilesFromWorktree(worktreePath, startPath) - : readFilesFromGitTree(repo, ref.oid, startPath) - ) - .then((files) => { - const componentVersionBucket = loadComponentDescriptor(files, ref, version) - const origin = computeOrigin(originUrl, authStatus, ref, startPath, worktreePath, editUrl) - componentVersionBucket.files = files.map((file) => assignFileProperties(file, origin)) - return componentVersionBucket - }) - .catch((err) => { - const refInfo = `ref: ${ref.fullname.replace(HEADS_DIR_RX, '')}${worktreePath ? ' ' : ''}` - const pathInfo = !startPath || err.message.startsWith('the start path ') ? '' : ' | path: ' + startPath - throw Object.assign(err, { message: `${err.message} in ${repo.url || repo.dir} (${refInfo}${pathInfo})` }) - }) -} - -function readFilesFromWorktree (worktreePath, startPath) { - const cwd = ospath.join(worktreePath, startPath) - return fsp - .stat(cwd) - .catch(() => { - throw new Error(`the start path '${startPath}' does not exist`) - }) - .then((stat) => { - if (!stat.isDirectory()) throw new Error(`the start path '${startPath}' is not a directory`) - return new Promise((resolve, reject) => - vfs - .src(CONTENT_GLOB, { cwd, follow: true, removeBOM: false }) - .on('error', (err) => { - if (err.code === 'ENOENT' && err.syscall === 'stat') { - try { - if (fs.lstatSync(err.path).isSymbolicLink()) { - err.message = `Broken symbolic link detected at ${ospath.relative(cwd, err.path)}` - } - } catch {} - } else if (err.code === 'ELOOP') { - err.message = `Symbolic link cycle detected at ${ospath.relative(cwd, err.path)}` - } - reject(err) - }) - .pipe(relativizeFiles()) - .pipe(collectFiles(resolve)) - ) - }) -} - -/** - * Transforms the path of every file in the stream to a relative posix path. - * - * Applies a mapping function to all files in the stream so they end up with a - * posixified path relative to the file's base instead of the filesystem root. - * This mapper also filters out any directories (indicated by file.isNull()) - * that got caught up in the glob. - */ -function relativizeFiles () { - return map((file, enc, next) => { - if (file.isNull()) { - next() - } else { - next( - null, - new File({ - path: posixify ? posixify(file.relative) : file.relative, - contents: file.contents, - stat: file.stat, - src: { abspath: file.path }, - }) - ) - } - }) -} - -function collectFiles (done) { - const accum = [] - return map( - (file, enc, next) => { - accum.push(file) - next() - }, - () => done(accum) - ) -} - -function readFilesFromGitTree (repo, oid, startPath) { - return git - .readTree(Object.assign({ oid }, repo)) - .then((root) => - getGitTreeAtStartPath(repo, oid, startPath).then((start) => - srcGitTree(repo, Object.assign(root, { dirname: '' }), start) - ) - ) -} - -function getGitTreeAtStartPath (repo, oid, startPath) { - return git - .readTree(Object.assign({ oid, filepath: startPath }, repo)) - .catch((err) => { - const m = err instanceof ObjectTypeError && err.data.expected === 'tree' ? 'is not a directory' : 'does not exist' - throw new Error(`the start path '${startPath}' ${m}`) - }) - .then((result) => Object.assign(result, { dirname: startPath })) -} - -function srcGitTree (repo, root, start) { - return new Promise((resolve, reject) => { - const files = [] - createGitTreeWalker(repo, root, filterGitEntry) - .on('entry', (entry) => files.push(entryToFile(entry))) - .on('error', reject) - .on('end', () => resolve(Promise.all(files))) - .walk(start) - }) -} - -function createGitTreeWalker (repo, root, filter) { - return Object.assign(new EventEmitter(), { - walk (start) { - return ( - visitGitTree(this, repo, root, filter, start) - .then(() => this.emit('end')) - // NOTE if error is thrown, promises already being resolved won't halt - .catch((err) => this.emit('error', err)) - ) - }, - }) -} - -function visitGitTree (emitter, repo, root, filter, parent, dirname = '', following = new Set()) { - const reads = [] - for (const entry of parent.tree) { - const filterVerdict = filter(entry) - if (filterVerdict) { - const vfilePath = dirname ? path.join(dirname, entry.path) : entry.path - if (entry.type === 'tree') { - reads.push( - git.readTree(Object.assign({ oid: entry.oid }, repo)).then((subtree) => { - Object.assign(subtree, { dirname: path.join(parent.dirname, entry.path) }) - return visitGitTree(emitter, repo, root, filter, subtree, vfilePath, following) - }) - ) - } else if (entry.type === 'blob') { - let mode - if (entry.mode === SYMLINK_FILE_MODE) { - reads.push( - readGitSymlink(repo, root, parent, entry, following) - .catch((err) => { - // NOTE this error could be caught after promise chain has already been rejected - if (err instanceof NotFoundError) { - err.message = `Broken symbolic link detected at ${vfilePath}` - } else if (err.code === 'SymbolicLinkCycleError') { - err.message = `Symbolic link cycle detected at ${vfilePath}` - } - throw err - }) - .then((target) => { - if (target.type === 'tree') { - return visitGitTree(emitter, repo, root, filter, target, vfilePath, new Set(following).add(entry.oid)) - } else if (target.type === 'blob' && filterVerdict === true && (mode = FILE_MODES[target.mode])) { - emitter.emit('entry', Object.assign({ mode, oid: target.oid, path: vfilePath }, repo)) - } - }) - ) - } else if ((mode = FILE_MODES[entry.mode])) { - emitter.emit('entry', Object.assign({ mode, oid: entry.oid, path: vfilePath }, repo)) - } - } - } - } - return Promise.all(reads) -} - -function readGitSymlink (repo, root, parent, { oid }, following) { - if (following.size !== (following = new Set(following).add(oid)).size) { - return git.readBlob(Object.assign({ oid }, repo)).then(({ blob: target }) => { - target = posixify && process.env.NODE_ENV === 'test' ? posixify(decodeUint8Data(target)) : decodeUint8Data(target) - let targetParent - if (parent.dirname) { - const dirname = parent.dirname + '/' - target = path.join(dirname, target) - if (target.startsWith(dirname)) { - target = target.substr(dirname.length) - targetParent = parent - } else { - targetParent = root - } - } else { - target = path.normalize(target) - targetParent = root - } - return readGitObjectAtPath(repo, root, targetParent, target.split('/'), following) - }) - } - const err = { name: 'SymbolicLinkCycleError', code: 'SymbolicLinkCycleError', oid } - return Promise.reject(Object.assign(new Error(`Symbolic link cycle found at oid: ${err.oid}`), err)) -} - -// QUESTION: could we use this to resolve the start path too? -function readGitObjectAtPath (repo, root, parent, pathSegments, following) { - const firstPathSegment = pathSegments[0] - for (const entry of parent.tree) { - if (entry.path === firstPathSegment) { - return entry.type === 'tree' - ? git.readTree(Object.assign({ oid: entry.oid }, repo)).then((subtree) => { - Object.assign(subtree, { dirname: path.join(parent.dirname, entry.path) }) - return (pathSegments = pathSegments.slice(1)).length - ? readGitObjectAtPath(repo, root, subtree, pathSegments, following) - : Object.assign(subtree, { type: 'tree' }) - }) - : entry.mode === SYMLINK_FILE_MODE - ? readGitSymlink(repo, root, parent, entry, following) - : Promise.resolve(entry) - } - } - return Promise.reject(new NotFoundError(`No file or directory found at "${parent.oid}:${pathSegments.join('/')}"`)) -} - -/** - * Returns true (or 'treeOnly' if the entry is a symlink tree) if the entry - * should be processed or false if it should be skipped. An entry with a path - * (basename) that begins with dot ('.') is marked as skipped. - */ -function filterGitEntry (entry) { - const entryPath = entry.path - if (entryPath.charAt() === '.') return false - if (entry.type === 'tree') return entry.mode === SYMLINK_FILE_MODE ? 'treeOnly' : true - return entryPath.charAt(entryPath.length - 1) !== '~' -} - -function entryToFile (entry) { - return git.readBlob(entry).then(({ blob: contents }) => { - const stat = new fs.Stats() - stat.mode = entry.mode - stat.mtime = undefined - stat.size = contents.byteLength - contents = Buffer.from(contents.buffer) - return new File({ path: entry.path, contents, stat }) - }) -} - -function loadComponentDescriptor (files, ref, version) { - const descriptorFileIdx = files.findIndex((file) => file.path === COMPONENT_DESC_FILENAME) - if (descriptorFileIdx < 0) throw new Error(`${COMPONENT_DESC_FILENAME} not found`) - const descriptorFile = files[descriptorFileIdx] - files.splice(descriptorFileIdx, 1) - let data - try { - data = yaml.load(descriptorFile.contents.toString()) - } catch (err) { - throw Object.assign(err, { message: `${COMPONENT_DESC_FILENAME} has invalid syntax; ${err.message}` }) - } - if (data.name == null) throw new Error(`${COMPONENT_DESC_FILENAME} is missing a name`) - const name = (data.name = String(data.name)) - if (name === '.' || name === '..' || ~name.indexOf('/')) { - throw new Error(`name in ${COMPONENT_DESC_FILENAME} cannot have path segments: ${name}`) - } - if ('version' in data) version = data.version - if (!version) { - if (version === undefined) throw new Error(`${COMPONENT_DESC_FILENAME} is missing a version`) - version = '' - } else if (version === true) { - version = ref.shortname.replace(PATH_SEPARATOR_RX, '-') - } else if (version.constructor === Object) { - const refname = ref.shortname - let matched - if (refname in version) { - matched = version[refname] - } else if ( - !Object.entries(version).some(([pattern, replacement]) => { - const result = refname.replace(makePicomatchRx(pattern, PICOMATCH_VERSION_OPTS), '\0' + replacement) - if (result === refname) return false - matched = result.substr(1) - return true - }) - ) { - matched = refname - } - if (matched === '.' || matched === '..') { - throw new Error(`version in ${COMPONENT_DESC_FILENAME} cannot have path segments: ${matched}`) - } - version = matched.replace(PATH_SEPARATOR_RX, '-') - } else if ((version = String(version)) === '.' || version === '..' || ~version.indexOf('/')) { - throw new Error(`version in ${COMPONENT_DESC_FILENAME} cannot have path segments: ${version}`) - } - data.version = version - return camelCaseKeys(data, { deep: true, stopPaths: ['asciidoc'] }) -} - -function computeOrigin (url, authStatus, ref, startPath, worktreePath = undefined, editUrl = true) { - const { shortname: refname, oid: refhash, type: reftype } = ref - const remote = !url.startsWith('file://') - const origin = { type: 'git', refname, startPath } - if (authStatus) origin.private = authStatus - origin[reftype] = refname - if (worktreePath) { - if (remote) origin.url = url - origin.fileUriPattern = - (posixify ? 'file:///' + posixify(worktreePath) : 'file://' + worktreePath) + path.join('/', startPath, '%s') - origin.worktree = worktreePath - } else { - origin.url = url - origin.refhash = refhash - } - if (remote) origin.webUrl = url.replace(GIT_SUFFIX_RX, '') - if (editUrl === true) { - let match - if (url && (match = url.match(HOSTED_GIT_REPO_RX))) { - const host = match[1] - let action - let category = '' - if (host === 'pagure.io') { - action = 'blob' - category = 'f' - } else if (host === 'bitbucket.org') { - action = 'src' - } else { - action = reftype === 'branch' ? 'edit' : 'blob' - } - origin.editUrlPattern = 'https://' + path.join(match[1], match[2], action, refname, category, startPath, '%s') - } - } else if (editUrl) { - const vars = { - path: () => (startPath ? path.join(startPath, '%s') : '%s'), - refhash: () => refhash, - refname: () => refname, - web_url: () => origin.webUrl || '', - } - origin.editUrlPattern = editUrl.replace(EDIT_URL_TEMPLATE_VAR_RX, (_, name) => vars[name]()) - } - return origin -} - -function assignFileProperties (file, origin) { - if (!file.src) file.src = {} - Object.assign(file.src, { path: file.path, basename: file.basename, stem: file.stem, extname: file.extname, origin }) - if (origin.fileUriPattern) { - const fileUri = origin.fileUriPattern.replace('%s', file.src.path) - file.src.fileUri = ~fileUri.indexOf(' ') ? fileUri.replace(SPACE_RX, '%20') : fileUri - } - if (origin.editUrlPattern) { - const editUrl = origin.editUrlPattern.replace('%s', file.src.path) - file.src.editUrl = ~editUrl.indexOf(' ') ? editUrl.replace(SPACE_RX, '%20') : editUrl - } - return file -} - -function buildFetchOptions (repo, progress, displayUrl, credentialsFromUrl, gitPlugins, fetchTags, operation) { - const { credentialManager, http, urlRouter } = gitPlugins - const onAuth = resolveCredentials.bind(credentialManager, new Map().set(undefined, credentialsFromUrl)) - const onAuthFailure = onAuth - const onAuthSuccess = (url) => credentialManager.approved({ url }) - const opts = Object.assign({ corsProxy: false, depth: 1, http, onAuth, onAuthFailure, onAuthSuccess }, repo) - if (urlRouter) opts.url = urlRouter.ensureGitSuffix(opts.url) - if (progress) opts.onProgress = createProgressListener(progress, displayUrl, operation) - if (operation === 'fetch') { - opts.prune = true - if (fetchTags) opts.tags = opts.pruneTags = true - } else if (!fetchTags) { - opts.noTags = true - } - return opts -} - -function createProgress (urls, term) { - if (term.isTTY && term.columns > 59) { - let maxUrlLength = 0 - for (const url of urls) { - if (~url.indexOf(':') && GIT_URI_DETECTOR_RX.test(url)) { - const urlLength = extractCredentials(url).displayUrl.length - if (urlLength > maxUrlLength) maxUrlLength = urlLength - } - } - const progress = new MultiProgress(term) - // NOTE remove the width of the operation, then partition the difference between the url and bar - progress.maxLabelWidth = Math.min(Math.ceil((term.columns - GIT_OPERATION_LABEL_LENGTH) / 2), maxUrlLength) - return progress - } -} - -function createProgressListener (progress, progressLabel, operation) { - const progressBar = progress.newBar(formatProgressBar(progressLabel, progress.maxLabelWidth, operation), { - complete: '#', - incomplete: '-', - renderThrottle: 25, - total: 100, - }) - const ticks = progressBar.stream.columns - progressBar.fmt.replace(':bar', '').length - // NOTE leave room for indeterminate progress at end of bar; this isn't strictly needed for a bare clone - progressBar.scaleFactor = Math.max(0, (ticks - 1) / ticks) - progressBar.tick(0) - return Object.assign(onGitProgress.bind(progressBar), { finish: onGitComplete.bind(progressBar) }) -} - -function formatProgressBar (label, maxLabelWidth, operation) { - const paddingSize = maxLabelWidth - label.length - let padding = '' - if (paddingSize < 0) { - label = '...' + label.substr(-paddingSize + 3) - } else if (paddingSize) { - padding = ' '.repeat(paddingSize) - } - // NOTE assume operation has a fixed length - return `[${operation}] ${label}${padding} [:bar]` -} - -function onGitProgress ({ phase, loaded, total }) { - const phaseIdx = GIT_PROGRESS_PHASES.indexOf(phase) - if (~phaseIdx) { - const scaleFactor = this.scaleFactor - let ratio = ((loaded / total) * scaleFactor) / GIT_PROGRESS_PHASES.length - if (phaseIdx) ratio += (phaseIdx * scaleFactor) / GIT_PROGRESS_PHASES.length - // NOTE: updates are automatically throttled based on renderThrottle option - this.update(ratio > scaleFactor ? scaleFactor : ratio) - } -} - -function onGitComplete (err) { - if (err) { - // TODO: could use progressBar.interrupt() to replace bar with message instead - this.chars.incomplete = '?' - this.update(0) - // NOTE: force progress bar to update regardless of throttle setting - this.render(undefined, true) - } else { - this.update(1) - } -} - -function resolveCredentials (credentialsFromUrlHolder, url, auth) { - const credentialsFromUrl = credentialsFromUrlHolder.get() - if ('Authorization' in auth.headers) { - if (!credentialsFromUrl) return this.rejected({ url, auth }) - credentialsFromUrlHolder.clear() - } else if (credentialsFromUrl) { - return credentialsFromUrl - } else { - auth = undefined - } - return this.fill({ url }).then((credentials) => - credentials - ? { username: credentials.token || credentials.username, password: credentials.token ? '' : credentials.password } - : this.rejected({ url, auth }) - ) -} - -/** - * Generates a safe, unique folder name for a git URL. - * - * The purpose of this function is generate a safe, unique folder name for the cloned - * repository that gets stored in the cache directory. - * - * The generated folder name follows the pattern: --.git - * - * @param {String} url - The repository URL to convert. - * @returns {String} The generated folder name. - */ -function generateCloneFolderName (url) { - let normalizedUrl = url.toLowerCase() - if (posixify) normalizedUrl = posixify(normalizedUrl) - normalizedUrl = normalizedUrl.replace(GIT_SUFFIX_RX, '') - const basename = normalizedUrl.split(ANY_SEPARATOR_RX).pop() - const hash = createHash('sha1') - hash.update(normalizedUrl) - return basename + '-' + hash.digest('hex') + '.git' -} - -/** - * Resolve the HTTP URL of the specified remote for the given repository, removing embedded auth if present. - * - * @param {Repository} repo - The repository on which to operate. - * @param {String} remoteName - The name of the remote to resolve. - * @returns {String} The URL of the specified remote, if present. - */ -function resolveRemoteUrl (repo, remoteName) { - return git.getConfig(Object.assign({ path: 'remote.' + remoteName + '.url' }, repo)).then((url) => { - if (!url) return posixify ? 'file:///' + posixify(repo.dir) : 'file://' + repo.dir - if (url.startsWith('https://') || url.startsWith('http://')) { - return ~url.indexOf('@') ? url.replace(URL_AUTH_CLEANER_RX, '$1') : url - } else if (url.startsWith('git@')) { - return 'https://' + url.substr(4).replace(':', '/') - } - }) -} - -/** - * Checks whether the specified URL matches a directory on the local filesystem. - * - * @param {String} url - The URL to check. - * @return {Boolean} A flag indicating whether the URL matches a directory on the local filesystem. - */ -function isDirectory (url) { - return fsp - .stat(url) - .then((stat) => stat.isDirectory()) - .catch(invariably.false) -} - -/** - * Removes the specified directory (including all of its contents) or file. - * Equivalent to fs.promises.rmdir(dir, { recursive: true }) in Node 12. - */ -function rmdir (dir) { - return fsp - .readdir(dir, { withFileTypes: true }) - .then((lst) => - Promise.all( - lst.map((it) => - it.isDirectory() - ? rmdir(ospath.join(dir, it.name)) - : fsp.unlink(ospath.join(dir, it.name)).catch((unlinkErr) => { - if (unlinkErr.code !== 'ENOENT') throw unlinkErr - }) - ) - ) - ) - .then(() => fsp.rmdir(dir)) - .catch((err) => { - if (err.code === 'ENOENT') return - if (err.code === 'ENOTDIR') { - return fsp.unlink(dir).catch((unlinkErr) => { - if (unlinkErr.code !== 'ENOENT') throw unlinkErr - }) - } - throw err - }) -} - -function tagsSpecified (sources, defaultTags) { - return ~sources.findIndex((source) => { - const tags = source.tags || defaultTags || [] - return Array.isArray(tags) ? tags.length : true - }) -} - -function loadGitPlugins (gitConfig, networkConfig, startDir) { - const plugins = (git.cores || git.default.cores || new Map()).get(GIT_CORE) || new Map() - let credentialManager, urlRouter - if ((credentialManager = plugins.get('credentialManager'))) { - if (typeof credentialManager.configure === 'function') { - credentialManager.configure({ config: gitConfig.credentials, startDir }) - } - if (typeof credentialManager.status !== 'function') Object.assign(credentialManager, { status () {} }) - } else { - credentialManager = new GitCredentialManagerStore().configure({ config: gitConfig.credentials, startDir }) - } - if (gitConfig.ensureGitSuffix) urlRouter = { ensureGitSuffix: (url) => (url.endsWith('.git') ? url : url + '.git') } - const http = plugins.get('http') || createHttpPlugin(networkConfig, 'git/isomorphic-git@' + git.version()) - return { credentialManager, http, urlRouter } -} - -/** - * Expands the content cache directory path and ensures it exists. - * - * @param {String} preferredCacheDir - The preferred cache directory. If the value is undefined, - * the user's cache folder is used. - * @param {String} startDir - The directory to use in place of a leading '.' segment. - * - * @returns {Promise} A promise that resolves to the absolute content cache directory. - */ -function ensureCacheDir (preferredCacheDir, startDir) { - // QUESTION should fallback directory be relative to cwd, playbook dir, or tmpdir? - const baseCacheDir = - preferredCacheDir == null - ? getCacheDir('antora' + (process.env.NODE_ENV === 'test' ? '-test' : '')) || ospath.resolve('.antora/cache') - : expandPath(preferredCacheDir, '~+', startDir) - const cacheDir = ospath.join(baseCacheDir, CONTENT_CACHE_FOLDER) - return fsp - .mkdir(cacheDir, { recursive: true }) - .then(() => cacheDir) - .catch((err) => { - throw Object.assign(err, { message: `Failed to create content cache directory: ${cacheDir}; ${err.message}` }) - }) -} - -function transformGitCloneError (err, displayUrl) { - let wrappedMsg - let trimMessage - if (HTTP_ERROR_CODE_RX.test(err.code)) { - switch (err.data.statusCode) { - case 401: - wrappedMsg = err.rejected - ? 'Content repository not found or credentials were rejected' - : 'Content repository not found or requires credentials' - break - case 404: - wrappedMsg = 'Content repository not found' - break - default: - wrappedMsg = err.message - trimMessage = true - } - } else if (err instanceof UrlParseError || err instanceof UnknownTransportError) { - wrappedMsg = 'Content source uses an unsupported transport protocol' - } else if (err.code === 'ENOTFOUND') { - wrappedMsg = `Content repository host could not be resolved: ${err.hostname}` - } else { - wrappedMsg = `${err.name}: ${err.message}` - trimMessage = true - } - if (trimMessage) { - wrappedMsg = ~(wrappedMsg = wrappedMsg.trimRight()).indexOf('. ') ? wrappedMsg : wrappedMsg.replace(/\.$/, '') - } - const wrappedErr = new Error(`${wrappedMsg} (url: ${displayUrl})`) - wrappedErr.stack += `\nCaused by: ${err.stack || 'unknown'}` - return wrappedErr -} - -function coerceToString (value) { - return value == null ? '' : String(value) -} - -function cleanStartPath (value) { - return value && ~value.indexOf('/') ? value.replace(SUPERFLUOUS_SEPARATORS_RX, '') : value -} - -function findWorktrees (repo, patterns) { - if (!patterns.length) return new Map() - const linkedOnly = patterns[0] === '.' ? !(patterns = patterns.slice(1)) : true - let worktreesDir - return (patterns.length - ? fsp - .readdir((worktreesDir = ospath.join(repo.dir, '.git', 'worktrees'))) - .catch(invariably.emptyArray) - .then((worktreeNames) => matcher(worktreeNames, [...patterns])) - .then((worktreeNames) => - worktreeNames.length - ? Promise.all( - worktreeNames.map((worktreeName) => { - const gitdir = ospath.resolve(worktreesDir, worktreeName) - // NOTE uses name of worktree as branch name if HEAD is detached - return git - .currentBranch(Object.assign({}, repo, { gitdir })) - .then((branch = worktreeName) => - fsp - .readFile(ospath.join(gitdir, 'gitdir'), 'utf8') - .then((contents) => ({ branch, dir: ospath.dirname(contents.trimRight()) })) - ) - }) - ).then((entries) => entries.reduce((accum, it) => accum.set(it.branch, it.dir), new Map())) - : new Map() - ) - : Promise.resolve(new Map()) - ).then((worktrees) => - linkedOnly - ? worktrees - : git.currentBranch(repo).then((branch) => (branch ? worktrees.set(branch, repo.dir) : worktrees)) - ) -} - -module.exports = aggregateContent -module.exports._computeOrigin = computeOrigin diff --git a/node_modules/@antora/content-aggregator/lib/constants.js b/node_modules/@antora/content-aggregator/lib/constants.js deleted file mode 100644 index 9179b31e..00000000 --- a/node_modules/@antora/content-aggregator/lib/constants.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict' - -module.exports = Object.freeze({ - COMPONENT_DESC_FILENAME: 'antora.yml', - CONTENT_CACHE_FOLDER: 'content/2', - CONTENT_GLOB: '**/*[!~]', - FILE_MODES: { 100644: 0o100666 & ~process.umask(), 100755: 0o100777 & ~process.umask() }, - GIT_CORE: 'antora', - GIT_OPERATION_LABEL_LENGTH: 8, - GIT_PROGRESS_PHASES: ['Counting objects', 'Compressing objects', 'Receiving objects', 'Resolving deltas'], - PICOMATCH_VERSION_OPTS: { - bash: true, - debug: false, - dot: true, - fastpaths: false, - lookbehinds: false, - noextglob: true, - noglobstar: true, - nonegate: true, - noquantifiers: true, - strictSlashes: true, - }, - SYMLINK_FILE_MODE: '120000', - VALID_STATE_FILENAME: 'valid', -}) diff --git a/node_modules/@antora/content-aggregator/lib/decode-uint8-data.js b/node_modules/@antora/content-aggregator/lib/decode-uint8-data.js deleted file mode 100644 index 7c9926ad..00000000 --- a/node_modules/@antora/content-aggregator/lib/decode-uint8-data.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict' - -module.exports = (({ StringDecoder }) => { - const decoder = new StringDecoder() - return decoder.write.bind(decoder) -})(require('string_decoder')) diff --git a/node_modules/@antora/content-aggregator/lib/file.js b/node_modules/@antora/content-aggregator/lib/file.js deleted file mode 100644 index 3fe11708..00000000 --- a/node_modules/@antora/content-aggregator/lib/file.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict' - -const Vinyl = require('vinyl') - -class File extends Vinyl { - get path () { - return this.history[this.history.length - 1] - } - - set path (path_) { - this.history.push(path_) - } - - get relative () { - return this.history[this.history.length - 1] - } -} - -module.exports = File diff --git a/node_modules/@antora/content-aggregator/lib/flatten-deep.js b/node_modules/@antora/content-aggregator/lib/flatten-deep.js deleted file mode 100644 index 28e51f41..00000000 --- a/node_modules/@antora/content-aggregator/lib/flatten-deep.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -function flattenDeep (array, accum = []) { - const len = array.length - for (let i = 0, it; i < len; i++) { - Array.isArray((it = array[i])) ? flattenDeep(it, accum) : accum.push(it) - } - return accum -} - -module.exports = flattenDeep diff --git a/node_modules/@antora/content-aggregator/lib/git-credential-manager-store.js b/node_modules/@antora/content-aggregator/lib/git-credential-manager-store.js deleted file mode 100644 index 9b65890a..00000000 --- a/node_modules/@antora/content-aggregator/lib/git-credential-manager-store.js +++ /dev/null @@ -1,115 +0,0 @@ -'use strict' - -const { homedir } = require('os') -const expandPath = require('@antora/expand-path-helper') -const { promises: fsp } = require('fs') -const ospath = require('path') - -class GitCredentialManagerStore { - configure ({ config, startDir }) { - this.entries = undefined - this.urls = {} - if ((this.contents = (config = config || {}).contents)) { - this.path = undefined - } else if (config.path) { - this.path = expandPath(config.path, '~+', startDir) - } else { - this.path = undefined - } - return this - } - - async load () { - if (this.entries) return this.entries - return (this.entries = new Promise((resolve) => { - let contentsPromise - let delimiter = '\n' - if (this.contents) { - contentsPromise = Promise.resolve(this.contents) - delimiter = /[,\n]/ - } else if (this.path) { - contentsPromise = fsp - .access(this.path) - .then(() => fsp.readFile(this.path, 'utf8')) - .catch(() => undefined) - } else { - const homeGitCredentialsPath = ospath.join(homedir(), '.git-credentials') - const xdgConfigGitCredentialsPath = ospath.join( - process.env.XDG_CONFIG_HOME || ospath.join(homedir(), '.config'), - 'git', - 'credentials' - ) - contentsPromise = fsp - .access(homeGitCredentialsPath) - .then(() => fsp.readFile(homeGitCredentialsPath, 'utf8')) - .catch(() => - fsp - .access(xdgConfigGitCredentialsPath) - .then(() => fsp.readFile(xdgConfigGitCredentialsPath, 'utf8')) - .catch(() => undefined) - ) - } - contentsPromise.then((contents) => { - if (contents) { - resolve( - contents - .trim() - .split(delimiter) - .reduce((accum, url) => { - try { - const { username, password, hostname, pathname } = new URL(url) - let credentials - if (password) { - credentials = { username: decodeURIComponent(username), password: decodeURIComponent(password) } - } else if (username) { - credentials = { username: decodeURIComponent(username), password: '' } - } else { - return accum - } - if (pathname === '/') { - accum[hostname] = credentials - } else { - accum[hostname + pathname] = credentials - if (!pathname.endsWith('.git')) accum[hostname + pathname + '.git'] = credentials - } - } catch {} - return accum - }, {}) - ) - } else { - resolve({}) - } - }) - })) - } - - async fill ({ url }) { - this.urls[url] = 'requested' - return this.load().then((entries) => { - if (!Object.keys(entries).length) return - const { hostname, pathname } = new URL(url) - return entries[hostname + pathname] || entries[hostname] - }) - } - - async approved ({ url }) { - this.urls[url] = 'approved' - } - - async rejected ({ url, auth }) { - this.urls[url] = 'rejected' - const statusCode = 401 - const statusMessage = 'HTTP Basic: Access Denied' - const err = new Error(`HTTP Error: ${statusCode} ${statusMessage}`) - err.name = err.code = 'HttpError' - err.data = { statusCode, statusMessage } - if (auth) err.rejected = true - throw err - } - - status ({ url }) { - return this.urls[url] - } -} - -module.exports = GitCredentialManagerStore diff --git a/node_modules/@antora/content-aggregator/lib/git-plugin-http.js b/node_modules/@antora/content-aggregator/lib/git-plugin-http.js deleted file mode 100644 index 33b886ba..00000000 --- a/node_modules/@antora/content-aggregator/lib/git-plugin-http.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict' - -const get = require('simple-get') - -function distillResponse (res) { - const { url, method, statusCode, statusMessage, headers } = res - return { url, method, statusCode, statusMessage, headers, body: res } -} - -async function mergeBuffers (data) { - if (!Array.isArray(data)) return data - if (data.length === 1 && data[0] instanceof Buffer) return data[0] - const buffers = [] - let offset = 0 - let size = 0 - for await (const chunk of data) { - buffers.push(chunk) - size += chunk.byteLength - } - data = new Uint8Array(size) - for (const buffer of buffers) { - data.set(buffer, offset) - offset += buffer.byteLength - } - return Buffer.from(data.buffer) -} - -module.exports = ({ httpProxy, httpsProxy, noProxy }, userAgent) => { - if (httpsProxy || httpProxy) { - const { HttpProxyAgent, HttpsProxyAgent } = require('hpagent') - const shouldProxy = require('should-proxy') - return { - async request ({ url, method, headers, body }) { - headers['user-agent'] = userAgent - body = await mergeBuffers(body) - const proxy = url.startsWith('https:') - ? { ProxyAgent: HttpsProxyAgent, url: httpsProxy } - : { ProxyAgent: HttpProxyAgent, url: httpProxy } - let agent - if (proxy.url && shouldProxy(url, { no_proxy: noProxy })) { - // see https://github.com/delvedor/hpagent/issues/18 - const { protocol, hostname, port, username, password } = new URL(proxy.url) - const proxyUrl = { protocol, hostname, port, username: username || null, password: password || null } - agent = new proxy.ProxyAgent({ proxy: proxyUrl }) - } - return new Promise((resolve, reject) => - get({ url, method, agent, headers, body }, (err, res) => (err ? reject(err) : resolve(distillResponse(res)))) - ) - }, - } - } else { - return { - async request ({ url, method, headers, body }) { - headers['user-agent'] = userAgent - body = await mergeBuffers(body) - return new Promise((resolve, reject) => - get({ url, method, headers, body }, (err, res) => (err ? reject(err) : resolve(distillResponse(res)))) - ) - }, - } - } -} diff --git a/node_modules/@antora/content-aggregator/lib/index.js b/node_modules/@antora/content-aggregator/lib/index.js deleted file mode 100644 index a9f18c1e..00000000 --- a/node_modules/@antora/content-aggregator/lib/index.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -/** - * Content Aggregator component for Antora - * - * Responsible for aggregating the content from multiple repositories and - * references into a raw aggregate of virtual files that can be organized by a - * subsequent step in the pipeline. - * - * @namespace content-aggregator - */ -module.exports = require('./aggregate-content') diff --git a/node_modules/@antora/content-aggregator/lib/resolve-path-globs.js b/node_modules/@antora/content-aggregator/lib/resolve-path-globs.js deleted file mode 100644 index bfd2a000..00000000 --- a/node_modules/@antora/content-aggregator/lib/resolve-path-globs.js +++ /dev/null @@ -1,167 +0,0 @@ -'use strict' - -const { expand: expandBraces } = require('braces') -const flattenDeep = require('./flatten-deep') -const { promises: fsp } = require('fs') -const git = require('isomorphic-git') -const invariably = { true: () => true, false: () => false, void: () => undefined, emptyArray: () => [] } -const { makeRe: makePicomatchRx } = require('picomatch') - -const RX_ESCAPE_EXCEPT_GLOB = /[.+?^${}()|[\]\\]/g -const RX_MAGIC_DETECTOR = /[*{]/ -const RX_QUESTION_MARK = /\?/g -const PICOMATCH_OPTS = { nobracket: true, noextglob: true, noglobstar: true, noquantifiers: true } -const PICOMATCH_NEGATED_OPTS = { nobracket: true, noextglob: true, noquantifiers: true } - -function resolvePathGlobs (base, patterns, listDirents, retrievePath, tree = { path: '' }) { - return patterns.reduce((paths, pattern) => { - if (pattern.charAt() === '!') { - return paths.then((resolvedPaths) => { - if (resolvedPaths.length) { - if (~pattern.indexOf('?')) pattern = pattern.replace(RX_QUESTION_MARK, '\\?') - const rx = makePicomatchRx(pattern, PICOMATCH_NEGATED_OPTS) - return resolvedPaths.filter(rx.test.bind(rx)) - } else { - return resolvedPaths - } - }) - } else if (RX_MAGIC_DETECTOR.test(pattern)) { - return glob(base, pattern.split('/'), listDirents, retrievePath, tree).then((nestedPaths) => - paths.then((resolvedPaths) => [...resolvedPaths, ...nestedPaths]) - ) - } - return paths.then((resolvedPaths) => [...resolvedPaths, pattern]) - }, Promise.resolve([])) -} - -async function glob (base, patternSegments, listDirents, retrievePath, { oid, path, globbed }) { - let patternSegment = patternSegments[0] - patternSegments = patternSegments.slice(1) - if (RX_MAGIC_DETECTOR.test(patternSegment)) { - let isMatch - let explicit - if (patternSegment === '*') { - isMatch = (it) => it.charAt() !== '.' - } else if (~patternSegment.indexOf('{')) { - if (globbed) { - if (patternSegment.charAt() === '!') patternSegment = '\\' + patternSegment - if (~patternSegment.indexOf('?')) patternSegment = patternSegment.replace(RX_QUESTION_MARK, '\\?') - isMatch = (isMatch = makePicomatchRx(patternSegment, PICOMATCH_OPTS)).test.bind(isMatch) - } else if (~patternSegment.indexOf('*')) { - const [wildPatterns, literals] = expandBraces(patternSegment).reduce( - ([wild, literal], it) => (~it.indexOf('*') ? [[...wild, it], literal] : [wild, [...literal, it]]), - [[], []] - ) - isMatch = (isMatch = makeAlternationMatcherRx(wildPatterns)).test.bind(isMatch) - explicit = new Set(literals) - } else { - return expandBraces(patternSegment).map((it) => joinPath(path, it)) - } - } else { - isMatch = (isMatch = makeMatcherRx(patternSegment)).test.bind(isMatch) - } - let dirents = await listDirents(base, oid || path) - if (explicit) dirents = dirents.filter((dirent) => !explicit.has(dirent.name)) - const discovered = flattenDeep( - await Promise.all( - dirents.map((dirent) => - dirent.isDirectory() && isMatch(dirent.name) - ? patternSegments.length - ? glob(base, patternSegments, listDirents, retrievePath, { - oid: dirent.oid, - path: joinPath(path, dirent.name), - globbed: true, - }) - : joinPath(path, dirent.name) - : [] - ) - ) - ) - return explicit ? [...[...explicit].map((it) => joinPath(path, it)), ...discovered] : discovered - } else { - const [magicBase, nextSegment] = extractMagicBase(patternSegments, patternSegment) - patternSegment = magicBase - if (nextSegment) { - const obj = await retrievePath(base, { oid, path }, patternSegment) - if (obj) { - return glob(base, patternSegments, listDirents, retrievePath, { - oid: obj.oid, - path: joinPath(path, patternSegment), - }) - } else if ((patternSegment += '/' + patternSegments.join('/')).indexOf('{')) { - return expandBraces(patternSegment).map((it) => joinPath(path, it)) - } else { - return [joinPath(path, patternSegment)] - } - } else if (globbed) { - return (await retrievePath(base, { oid, path }, patternSegment)) ? [joinPath(path, patternSegment)] : [] - } else { - return [joinPath(path, patternSegment)] - } - } -} - -function regexpEscapeWithGlob (str) { - // we don't escape "-" since it's meaningless in a literal - return str.replace(RX_ESCAPE_EXCEPT_GLOB, '\\$&').replace('*', '.*') -} - -function extractMagicBase (patternSegments, base) { - let nextSegment - if (patternSegments.length) { - while ((nextSegment = patternSegments[0])) { - if (RX_MAGIC_DETECTOR.test(nextSegment)) break - base += '/' + patternSegments.shift() - } - } - return [base, nextSegment] -} - -function listDirentsFs (base, path) { - return readdirWithFileTypes(base + '/' + path) -} - -function listDirentsGit (repo, treeOid) { - return git - .readTree(Object.assign({ oid: treeOid, filepath: '' }, repo)) - .then(({ tree: entries }) => - entries.map(({ type, oid, path: name }) => ({ name, oid, isDirectory: invariably[type === 'tree'] })) - ) - .catch(invariably.emptyArray) -} - -function makeAlternationMatcherRx (patterns) { - return new RegExp('^(?:' + patterns.map(patternToRx).join('|') + ')$') -} - -function makeMatcherRx (pattern) { - return new RegExp('^' + patternToRx(pattern) + '$') -} - -function patternToRx (pattern) { - return (pattern.charAt() === '.' ? '' : '(?!\\.)') + regexpEscapeWithGlob(pattern) -} - -function readdirWithFileTypes (dir) { - return fsp.readdir(dir, { withFileTypes: true }).catch(invariably.emptyArray) -} - -function retrievePathFs (base, { path }, subpath) { - return fsp - .access(base + '/' + joinPath(path, subpath)) - .then(invariably.true) - .catch(invariably.false) -} - -function retrievePathGit (repo, { oid }, filepath) { - return git.readObject(Object.assign({ oid, filepath, format: 'deflated' }, repo)).catch(invariably.void) -} - -function joinPath (parent, child) { - return parent ? parent + '/' + child : child -} - -module.exports = { - fs: (baseDir, patterns) => resolvePathGlobs(baseDir, patterns, listDirentsFs, retrievePathFs), - git: (repo, oid, patterns) => resolvePathGlobs(repo, patterns, listDirentsGit, retrievePathGit, { oid }), -} diff --git a/node_modules/@antora/content-aggregator/package.json b/node_modules/@antora/content-aggregator/package.json deleted file mode 100644 index d2b0f1aa..00000000 --- a/node_modules/@antora/content-aggregator/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_from": "@antora/content-aggregator@3.0.0-alpha.7", - "_id": "@antora/content-aggregator@3.0.0-alpha.7", - "_inBundle": false, - "_integrity": "sha512-YV98rAHCHQXTTAVovHl+RtGfU11mBhSB4rrlmpu2aZGAkSw8x2FMwAx72wJMkIhkWXmGQYdjS2g9jOXcYqjlCA==", - "_location": "/@antora/content-aggregator", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@antora/content-aggregator@3.0.0-alpha.7", - "name": "@antora/content-aggregator", - "escapedName": "@antora%2fcontent-aggregator", - "scope": "@antora", - "rawSpec": "3.0.0-alpha.7", - "saveSpec": null, - "fetchSpec": "3.0.0-alpha.7" - }, - "_requiredBy": [ - "/@antora/site-generator-default" - ], - "_resolved": "https://registry.npmjs.org/@antora/content-aggregator/-/content-aggregator-3.0.0-alpha.7.tgz", - "_shasum": "7784a1191f07a63baace58673d67ad6749ac787a", - "_spec": "@antora/content-aggregator@3.0.0-alpha.7", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/site-generator-default", - "author": { - "name": "OpenDevise Inc.", - "url": "https://opendevise.com" - }, - "bugs": { - "url": "https://gitlab.com/antora/antora/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Dan Allen", - "email": "dan@opendevise.com" - }, - { - "name": "Sarah White", - "email": "sarah@opendevise.com" - }, - { - "name": "Hubert SABLONNIÈRE", - "email": "hubert.sablonniere@gmail.com" - }, - { - "name": "Balachandran Sivakumar", - "email": "balachandran@balachandran.org" - } - ], - "dependencies": { - "@antora/expand-path-helper": "~1.0", - "braces": "~3.0", - "cache-directory": "~2.0", - "camelcase-keys": "~6.2", - "hpagent": "~0.1.0", - "isomorphic-git": "~1.8", - "js-yaml": "~4.1", - "matcher": "~4.0", - "multi-progress": "~4.0", - "picomatch": "~2.3", - "progress": "~2.0", - "should-proxy": "~1.0", - "simple-get": "~4.0", - "vinyl": "~2.2", - "vinyl-fs": "~3.0" - }, - "deprecated": false, - "description": "Fetches and aggregates content from distributed sources for use in an Antora documentation pipeline.", - "engines": { - "node": ">=10.17.0" - }, - "files": [ - "lib/" - ], - "gitHead": "fbd597b3680474f2083cda8a7facf1e2848c08e0", - "homepage": "https://antora.org", - "keywords": [ - "antora", - "antora-component", - "git", - "isomorphic-git", - "content", - "documentation", - "static site", - "web publishing" - ], - "license": "MPL-2.0", - "main": "lib/index.js", - "name": "@antora/content-aggregator", - "repository": { - "type": "git", - "url": "git+https://gitlab.com/antora/antora.git" - }, - "version": "3.0.0-alpha.7" -} diff --git a/node_modules/@antora/content-classifier/LICENSE b/node_modules/@antora/content-classifier/LICENSE deleted file mode 100644 index a612ad98..00000000 --- a/node_modules/@antora/content-classifier/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/node_modules/@antora/content-classifier/README.md b/node_modules/@antora/content-classifier/README.md deleted file mode 100644 index 05a78065..00000000 --- a/node_modules/@antora/content-classifier/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Antora Content Classifier - -The Content Classifier is a component in Antora responsible for organizing aggregated content into a virtual file catalog for use in an Antora documentation pipeline. - -[Antora](https://antora.org) is a modular static site generator designed for creating documentation sites from AsciiDoc documents. -Its site generator pipeline aggregates documents from versioned content repositories and processes them using [Asciidoctor](https://asciidoctor.org). - -## Copyright and License - -Copyright (C) 2017-present [OpenDevise Inc.](https://opendevise.com) and the [Antora Project](https://antora.org). - -Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0). diff --git a/node_modules/@antora/content-classifier/lib/classify-content.js b/node_modules/@antora/content-classifier/lib/classify-content.js deleted file mode 100644 index 568e4df8..00000000 --- a/node_modules/@antora/content-classifier/lib/classify-content.js +++ /dev/null @@ -1,166 +0,0 @@ -'use strict' - -const ContentCatalog = require('./content-catalog') - -/** - * Organizes the raw aggregate of virtual files into a {ContentCatalog}. - * - * @memberof content-classifier - * - * @param {Object} playbook - The configuration object for Antora. - * @param {Object} playbook.site - Site-related configuration data. - * @param {String} playbook.site.startPage - The start page for the site; redirects from base URL. - * @param {Object} playbook.urls - URL settings for the site. - * @param {String} playbook.urls.htmlExtensionStyle - The style to use when computing page URLs. - * @param {Object} aggregate - The raw aggregate of virtual file objects to be classified. - * @param {Object} [siteAsciiDocConfig={}] - Site-wide AsciiDoc processor configuration options. - * @returns {ContentCatalog} A structured catalog of content components and virtual content files. - */ -function classifyContent (playbook, aggregate, siteAsciiDocConfig = {}) { - const contentCatalog = new ContentCatalog(playbook) - aggregate - .reduce((accum, componentVersionData) => { - const { name, version } = componentVersionData - // drop startPage to defer registration of start page - // drop files since they aren't needed to register component version - const { files, startPage, ...descriptor } = Object.assign({}, componentVersionData, { - asciidoc: resolveAsciiDocConfig(siteAsciiDocConfig, componentVersionData), - }) - return new Map(accum).set( - contentCatalog.registerComponentVersion(name, version, descriptor), - componentVersionData - ) - }, new Map()) - .forEach((componentVersionData, componentVersion) => { - const { name, version } = componentVersion - const { files, nav, startPage } = componentVersionData - delete componentVersionData.files // clean up memory - files.forEach((file) => allocateSrc(file, name, version, nav) && contentCatalog.addFile(file)) - contentCatalog.registerComponentVersionStartPage(name, componentVersion, startPage) - }) - contentCatalog.registerSiteStartPage(playbook.site.startPage) - return contentCatalog -} - -function allocateSrc (file, component, version, nav) { - const extname = file.src.extname - const filepath = file.path - const navInfo = nav && getNavInfo(filepath, nav) - const pathSegments = filepath.split('/') - if (navInfo) { - if (extname !== '.adoc') return // ignore file - file.nav = navInfo - file.src.family = 'nav' - if (pathSegments[0] === 'modules' && pathSegments.length > 2) { - file.src.module = pathSegments[1] - // relative to modules/ - file.src.relative = pathSegments.slice(2).join('/') - file.src.moduleRootPath = calculateRootPath(pathSegments.length - 3) - } else { - // relative to root - file.src.relative = filepath - } - } else if (pathSegments[0] === 'modules') { - let familyFolder = pathSegments[2] - switch (familyFolder) { - case 'pages': - // this location for partials is deprecated; warn starting in Antora 3.x - if (pathSegments[3] === '_partials') { - file.src.family = 'partial' - // relative to modules//pages/_partials (deprecated) - file.src.relative = pathSegments.slice(4).join('/') - } else if (extname === '.adoc') { - file.src.family = 'page' - // relative to modules//pages - file.src.relative = pathSegments.slice(3).join('/') - } else { - return // ignore file - } - break - case 'assets': - switch ((familyFolder = pathSegments[3])) { - case 'attachments': - case 'images': - if (!extname) return // ignore file - file.src.family = familyFolder.substr(0, familyFolder.length - 1) - // relative to modules//assets/s - file.src.relative = pathSegments.slice(4).join('/') - break - default: - return // ignore file - } - break - case 'attachments': - case 'images': - if (!extname) return - file.src.family = familyFolder.substr(0, familyFolder.length - 1) - // relative to modules//s - file.src.relative = pathSegments.slice(3).join('/') - break - case 'examples': - case 'partials': - file.src.family = familyFolder.substr(0, familyFolder.length - 1) - // relative to modules//s - file.src.relative = pathSegments.slice(3).join('/') - break - default: - return // ignore file - } - file.src.module = pathSegments[1] - file.src.moduleRootPath = calculateRootPath(pathSegments.length - 3) - } else { - return // ignore file - } - file.src.component = component - file.src.version = version - return true -} - -/** - * Return navigation properties if this file is registered as a navigation file. - * - * @param {String} filepath - The path of the virtual file to match. - * @param {Array} nav - The array of navigation entries from the component descriptor. - * - * @returns {Object} An object of properties, which includes the navigation - * index, if this file is a navigation file, or undefined if it's not. - */ -function getNavInfo (filepath, nav) { - const index = nav.findIndex((candidate) => candidate === filepath) - if (~index) return { index } -} - -function resolveAsciiDocConfig (siteAsciiDocConfig, { asciidoc }) { - const scopedAttributes = (asciidoc || {}).attributes - if (scopedAttributes) { - const siteAttributes = siteAsciiDocConfig.attributes - if (siteAttributes) { - const attributes = Object.keys(scopedAttributes).reduce((accum, name) => { - if (name in siteAttributes) { - const currentVal = siteAttributes[name] - if (currentVal === false || String(currentVal).endsWith('@')) accum[name] = scopedAttributes[name] - } else { - accum[name] = scopedAttributes[name] - } - return accum - }, {}) - return Object.keys(attributes).length - ? Object.assign({}, siteAsciiDocConfig, { attributes: Object.assign({}, siteAttributes, attributes) }) - : siteAsciiDocConfig - } else { - return Object.assign({}, siteAsciiDocConfig, { attributes: scopedAttributes }) - } - } else { - return siteAsciiDocConfig - } -} - -function calculateRootPath (depth) { - return depth - ? Array(depth) - .fill('..') - .join('/') - : '.' -} - -module.exports = classifyContent diff --git a/node_modules/@antora/content-classifier/lib/constants.js b/node_modules/@antora/content-classifier/lib/constants.js deleted file mode 100644 index 378497b7..00000000 --- a/node_modules/@antora/content-classifier/lib/constants.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict' - -module.exports = Object.freeze({ - START_ALIAS_ID: Object.freeze({ component: '', version: '', module: '', family: 'alias', relative: 'index.adoc' }), - START_PAGE_ID: Object.freeze({ component: '', version: '', module: '', family: 'page', relative: 'index.adoc' }), -}) diff --git a/node_modules/@antora/content-classifier/lib/content-catalog.js b/node_modules/@antora/content-classifier/lib/content-catalog.js deleted file mode 100644 index 76b5aa74..00000000 --- a/node_modules/@antora/content-classifier/lib/content-catalog.js +++ /dev/null @@ -1,565 +0,0 @@ -'use strict' - -const File = require('./file') -const logger = require('./logger') -const { lookup: resolveMimeType } = require('./mime-types-with-asciidoc') -const parseResourceId = require('./util/parse-resource-id') -const { posix: path } = require('path') -const resolveResource = require('./util/resolve-resource') -const versionCompare = require('./util/version-compare-desc') - -const { START_ALIAS_ID, START_PAGE_ID } = require('./constants') -const SPACE_RX = / /g - -const $components = Symbol('components') -const $files = Symbol('files') - -class ContentCatalog { - constructor (playbook = {}) { - this[$components] = new Map() - this[$files] = new Map() - const urls = playbook.urls || {} - this.htmlUrlExtensionStyle = urls.htmlExtensionStyle || 'default' - this.urlRedirectFacility = urls.redirectFacility || 'static' - this.latestVersionUrlSegment = urls.latestVersionSegment - this.latestPrereleaseVersionUrlSegment = urls.latestPrereleaseVersionSegment - if (this.latestVersionUrlSegment == null && this.latestPrereleaseVersionUrlSegment == null) { - this.latestVersionUrlSegmentStrategy = undefined - } else { - this.latestVersionUrlSegmentStrategy = urls.latestVersionSegmentStrategy || 'replace' - if (this.latestVersionUrlSegmentStrategy === 'redirect:from') { - if (!this.latestVersionUrlSegment) this.latestVersionUrlSegment = undefined - if (!this.latestPrereleaseVersionUrlSegment) { - this.latestPrereleaseVersionUrlSegment = undefined - if (!this.latestVersionUrlSegment) this.latestVersionUrlSegmentStrategy = undefined - } - } - } - } - - /** - * Registers a new component version with the content catalog. Also registers the component if it does not yet exist. - * - * @param {String} name - The name of the component to which this component version belongs. - * @param {String} version - The version of the component to register. - * @param {Object} [descriptor={}] - The configuration data for the component version. - * @param {Object} [descriptor.asciidoc=undefined] - The AsciiDoc configuration for this component version. - * @param {String} [descriptor.displayVersion=version] - The display version for this component version. - * @param {Boolean|String} [descriptor.prerelease=undefined] - The prerelease flag for this version. If the value - * is a String, it implies true and is appended to the display version, separated if necessary by a space. - * @param {Boolean|String} [descriptor.startPage=undefined] - The page specifier for the start page. The start page - * is only registered if this property is truthy. A String value will be used to resolve a start page within this - * component version. A true value is a special case to tell this method to register the default start page and is - * intended for testing. - * @param {String} [descriptor.title=name] - The title for this component version. - */ - registerComponentVersion (name, version, descriptor = {}) { - const { asciidoc, displayVersion, prerelease, startPage: startPageSpec, title } = descriptor - const componentVersion = { displayVersion: displayVersion || version || 'default', title: title || name, version } - Object.defineProperty(componentVersion, 'name', { value: name, enumerable: true }) - if (prerelease) { - componentVersion.prerelease = prerelease - if (!displayVersion && prerelease.constructor === String) { - if (version) { - const ch0 = prerelease.charAt() - componentVersion.displayVersion = `${version}${ch0 === '-' || ch0 === '.' ? '' : ' '}${prerelease}` - } else { - componentVersion.displayVersion = prerelease - } - } - } - if (asciidoc) componentVersion.asciidoc = asciidoc - const component = this[$components].get(name) - if (component) { - const componentVersions = component.versions - const insertIdx = componentVersions.findIndex(({ version: candidate }) => { - if (candidate === version) throw new Error(`Duplicate version detected for component ${name}: ${version}`) - return versionCompare(candidate, version) > 0 - }) - if (~insertIdx) { - componentVersions.splice(insertIdx, 0, componentVersion) - } else { - componentVersions.push(componentVersion) - } - if ((component.latest = componentVersions.find((candidate) => !candidate.prerelease))) { - if (componentVersions[0] !== component.latest) component.latestPrerelease = componentVersions[0] - } else { - component.latest = componentVersions[0] - } - } else { - this[$components].set( - name, - Object.defineProperties( - { name, latest: componentVersion, versions: [componentVersion] }, - { - asciidoc: { - get () { - return this.latest.asciidoc - }, - }, - title: { - get () { - return this.latest.title - }, - }, - url: { - get () { - return this.latest.url - }, - }, - } - ) - ) - } - if (startPageSpec) { - this.registerComponentVersionStartPage(name, componentVersion, startPageSpec === true ? undefined : startPageSpec) - } - return componentVersion - } - - addFile (file) { - const src = file.src - let family = src.family - const key = generateKey(src) - if (this[$files].has(key)) { - if (family === 'alias') { - throw new Error(`Duplicate alias: ${generateResourceSpec(src)}`) - } else { - const details = [this.getById(src), file].map((it, idx) => ` ${idx + 1}: ${getFileLocation(it)}`).join('\n') - if (family === 'nav') { - throw new Error(`Duplicate nav in ${src.version}@${src.component}: ${file.path}\n${details}`) - } else { - throw new Error(`Duplicate ${family}: ${generateResourceSpec(src)}\n${details}`) - } - } - } - // NOTE: if the path property is not set, assume the src likely needs to be prepared - // another option is to assume that if the file is not a vinyl object, the src likely needs to be prepared - // a vinyl object is one indication the file was created and prepared by the content aggregator - //if (!src.path) prepareSrc(src) - //if (!File.isVinyl(file)) file = new File(file) - if (!File.isVinyl(file)) { - prepareSrc(src) - file = new File(file) - } - if (family === 'alias') { - src.mediaType = 'text/asciidoc' - file.mediaType = 'text/html' - // NOTE: an alias masquerades as the target file - family = file.rel.src.family - // QUESTION: should we preserve the mediaType property on file if already defined? - } else if (!(file.mediaType = src.mediaType) && !('mediaType' in src)) { - file.mediaType = src.mediaType = resolveMimeType(src.extname) || (family === 'page' ? 'text/asciidoc' : undefined) - } - let publishable - let versionSegment - if (file.out) { - publishable = true - } else if ('out' in file) { - delete file.out - } else if ( - (family === 'page' || family === 'image' || family === 'attachment') && - ('/' + src.relative).indexOf('/_') < 0 - ) { - publishable = true - versionSegment = computeVersionSegment.bind(this)(src.component, src.version) - file.out = computeOut(src, family, versionSegment, this.htmlUrlExtensionStyle) - } - if (!file.pub && (publishable || family === 'nav')) { - if (versionSegment == null) versionSegment = computeVersionSegment.bind(this)(src.component, src.version) - file.pub = computePub(src, file.out, family, versionSegment, this.htmlUrlExtensionStyle) - } - this[$files].set(key, file) - return file - } - - findBy (criteria) { - const criteriaEntries = Object.entries(criteria) - const accum = [] - for (const candidate of this[$files].values()) { - const candidateSrc = candidate.src - if (criteriaEntries.every(([key, val]) => candidateSrc[key] === val)) accum.push(candidate) - } - return accum - } - - getById ({ component, version, module: module_, family, relative }) { - return this[$files].get(generateKey({ component, version, module: module_, family, relative })) - } - - getByPath ({ component, version, path: path_ }) { - for (const candidate of this[$files].values()) { - if (candidate.path === path_ && candidate.src.component === component && candidate.src.version === version) { - return candidate - } - } - } - - getComponent (name) { - return this[$components].get(name) - } - - getComponentVersion (component, version) { - return (component.versions || (this.getComponent(component) || {}).versions || []).find( - ({ version: candidate }) => candidate === version - ) - } - - getComponents () { - return [...this[$components].values()] - } - - getComponentsSortedBy (property) { - return this.getComponents().sort((a, b) => a[property].localeCompare(b[property])) - } - - getFiles () { - return [...this[$files].values()] - } - - getPages (filter) { - const accum = [] - if (filter) { - for (const candidate of this[$files].values()) { - if (candidate.src.family === 'page' && filter(candidate)) accum.push(candidate) - } - } else { - for (const candidate of this[$files].values()) { - if (candidate.src.family === 'page') accum.push(candidate) - } - } - return accum - } - - // TODO add `follow` argument to control whether alias is followed - getSiteStartPage () { - return this.getById(START_PAGE_ID) || (this.getById(START_ALIAS_ID) || {}).rel - } - - registerComponentVersionStartPage (name, componentVersion, startPageSpec = undefined) { - let version = componentVersion.version - if (version == null) { - // QUESTION: should we warn or throw error if component version cannot be found? - if (!(componentVersion = this.getComponentVersion(name, componentVersion))) return - version = componentVersion.version - } - let startPage - let startPageSrc - const indexPageId = { component: name, version, module: 'ROOT', family: 'page', relative: 'index.adoc' } - if (startPageSpec) { - if ( - (startPage = this.resolvePage(startPageSpec, indexPageId)) && - (startPageSrc = startPage.src).component === name && - startPageSrc.version === version - ) { - if ((startPageSrc.module !== 'ROOT' || startPageSrc.relative !== 'index.adoc') && !this.getById(indexPageId)) { - this.addFile({ src: Object.assign({}, indexPageId, { family: 'alias' }), rel: startPage }) - } - } else { - // TODO pass componentVersion as logObject - logger.warn( - 'Start page specified for %s@%s %s: %s', - version, - name, - startPage === false ? 'has invalid syntax' : 'not found', - startPageSpec - ) - startPage = this.getById(indexPageId) - } - } else { - startPage = this.getById(indexPageId) - } - if (startPage) { - componentVersion.url = startPage.pub.url - } else { - // QUESTION: should we warn if the default start page cannot be found? - const versionSegment = computeVersionSegment.bind(this)(name, version) - componentVersion.url = computePub( - (startPageSrc = prepareSrc(Object.assign({}, indexPageId, { family: 'page' }))), - computeOut(startPageSrc, startPageSrc.family, versionSegment, this.htmlUrlExtensionStyle), - startPageSrc.family, - versionSegment, - this.htmlUrlExtensionStyle - ).url - } - - const symbolicVersionAlias = createSymbolicVersionAlias( - name, - version, - computeVersionSegment.bind(this)(name, version, 'alias'), - this.latestVersionUrlSegmentStrategy - ) - if (symbolicVersionAlias) this.addFile(symbolicVersionAlias) - } - - registerSiteStartPage (startPageSpec) { - if (!startPageSpec) return - const rel = this.resolvePage(startPageSpec) - if (rel) { - return this.addFile({ src: Object.assign({}, START_ALIAS_ID), rel }) - } else if (rel === false) { - logger.warn('Start page specified for site has invalid syntax: %s', startPageSpec) - } else if (~startPageSpec.indexOf(':')) { - logger.warn('Start page specified for site not found: %s', startPageSpec) - } else { - logger.warn('Missing component name in start page for site: %s', startPageSpec) - } - } - - // QUESTION should this be addPageAlias? - registerPageAlias (spec, target) { - // .adoc file extension will be required on ID spec for page alias starting in Antora 4 (possibly in Antora 3) - const inferredSpec = spec.endsWith('.adoc') ? undefined : spec + '.adoc' - const src = parseResourceId(inferredSpec || spec, target.src, 'page', ['page']) - // QUESTION should we throw an error if alias is invalid? - if (!src || (inferredSpec && src.relative === '.adoc')) return - const component = this.getComponent(src.component) - if (component) { - // NOTE version is not set when alias specifies a component, but not a version - if (src.version == null) src.version = component.latest.version - const existingPage = this.getById(src) - if (existingPage) { - throw new Error( - existingPage === target - ? `Page cannot define alias that references itself: ${generateResourceSpec(src)}` + - ` (specified as: ${spec})\n source: ${getFileLocation(existingPage)}` - : `Page alias cannot reference an existing page: ${generateResourceSpec(src)} (specified as: ${spec})\n` + - ` source: ${getFileLocation(target)}\n` + - ` existing page: ${getFileLocation(existingPage)}` - ) - } - const existingAlias = this.getById(Object.assign({}, src, { family: 'alias' })) - if (existingAlias) { - throw new Error( - `Duplicate alias: ${generateResourceSpec(src)} (specified as: ${spec})\n` + - ` source: ${getFileLocation(target)}` - ) - } - } else if (src.version == null) { - // QUESTION should we skip registering alias in this case? - src.version = '' - } - src.family = 'alias' - // NOTE the redirect producer will populate contents when the redirect facility is 'static' - const alias = this.addFile({ src, rel: target }) - // NOTE record the first alias this target claims as the preferred one - if (!target.rel) target.rel = alias - return alias - } - - /** - * Attempts to resolve a string contextual page ID spec to a file in the catalog. - * - * Parses the specified contextual page ID spec into a page ID object, then attempts to lookup a - * file with this page ID in the catalog. If a component is specified, but not a version, the - * latest version of the component stored in the catalog is used. If a file cannot be resolved, - * the function returns undefined. If the spec does not match the page ID syntax, this function - * throws an error. - * - * @param {String} spec - The contextual page ID spec (e.g., version@component:module:topic/page.adoc). - * @param {ContentCatalog} catalog - The content catalog in which to resolve the page file. - * @param {Object} [ctx={}] - The context to use to qualified the contextual page ID. - * - * @return {File} The virtual file to which the contextual page ID spec refers, or undefined if the - * file cannot be resolved. - */ - resolvePage (spec, context = {}) { - return this.resolveResource(spec, context, 'page', ['page']) - } - - resolveResource (spec, context = {}, defaultFamily = undefined, permittedFamilies = undefined) { - return resolveResource(spec, this, context, defaultFamily, permittedFamilies) - } - - exportToModel () { - return [ - this.findBy, - { name: 'getAll', bind: (to) => this.getAll.bind(to) }, - this.getById, - this.getComponent, - this.getComponentVersion, - this.getComponents, - this.getComponentsSortedBy, - this.getFiles, - this.getPages, - this.getSiteStartPage, - this.resolvePage, - this.resolveResource, - ].reduce((proxy, method) => (proxy[method.name] = method.bind(this)) && proxy, new (class ContentCatalogProxy {})()) - } -} - -/** - * @deprecated superceded by getFiles(); scheduled to be removed in Antora 4 - */ -ContentCatalog.prototype.getAll = ContentCatalog.prototype.getFiles - -function generateKey ({ component, version, module: module_, family, relative }) { - return `${version}@${component}:${module_}:${family}$${relative}` -} - -function generateResourceSpec ({ component, version, module: module_, family, relative }, shorthand = true) { - return ( - `${version}@${component}:${shorthand && module_ === 'ROOT' ? '' : module_}:` + - (family === 'page' || family === 'alias' ? '' : `${family}$`) + - relative - ) -} - -function prepareSrc (src) { - let { basename, extname, stem } = src - let update - if (basename == null) { - update = true - basename = path.basename(src.relative) - } - if (stem == null) { - update = true - if (extname == null) { - if (~(extname = basename.lastIndexOf('.'))) { - stem = basename.substr(0, extname) - extname = basename.substr(extname) - } else { - stem = basename - extname = '' - } - } else { - stem = basename.substr(0, basename.length - extname.length) - } - } else if (extname == null) { - update = true - extname = basename.substr(stem.length) - } - return update ? Object.assign(src, { basename, extname, stem }) : src -} - -function computeOut (src, family, version, htmlUrlExtensionStyle) { - let { component, module: module_, basename, extname, relative, stem } = src - if (module_ === 'ROOT') module_ = '' - let indexifyPathSegment = '' - let familyPathSegment = '' - - if (family === 'page') { - if (stem !== 'index' && htmlUrlExtensionStyle === 'indexify') { - basename = 'index.html' - indexifyPathSegment = stem - } else if (extname === '.adoc') { - basename = stem + '.html' - } - } else if (family === 'image') { - familyPathSegment = '_images' - } else if (family === 'attachment') { - familyPathSegment = '_attachments' - } - - const modulePath = path.join(component, version, module_) - const dirname = path.join(modulePath, familyPathSegment, path.dirname(relative), indexifyPathSegment) - const path_ = path.join(dirname, basename) - const moduleRootPath = path.relative(dirname, modulePath) || '.' - const rootPath = path.relative(dirname, '') || '.' - - return { dirname, basename, path: path_, moduleRootPath, rootPath } -} - -function computePub (src, out, family, version, htmlUrlExtensionStyle) { - const pub = {} - let url - if (family === 'nav') { - const urlSegments = version ? [src.component, version] : [src.component] - if (src.module && src.module !== 'ROOT') urlSegments.push(src.module) - // an artificial URL used for resolving page references in navigation model - url = '/' + urlSegments.join('/') + '/' - pub.moduleRootPath = '.' - } else if (family === 'page') { - const urlSegments = out.path.split('/') - const lastUrlSegmentIdx = urlSegments.length - 1 - if (htmlUrlExtensionStyle === 'drop') { - // drop just the .html extension or, if the filename is index.html, the whole segment - const lastUrlSegment = urlSegments[lastUrlSegmentIdx] - urlSegments[lastUrlSegmentIdx] = - lastUrlSegment === 'index.html' ? '' : lastUrlSegment.substr(0, lastUrlSegment.length - 5) - } else if (htmlUrlExtensionStyle === 'indexify') { - urlSegments[lastUrlSegmentIdx] = '' - } - url = '/' + urlSegments.join('/') - } else { - url = '/' + out.path - if (family === 'alias' && !src.relative.length) pub.splat = true - } - - pub.url = ~url.indexOf(' ') ? url.replace(SPACE_RX, '%20') : url - - if (out) { - pub.moduleRootPath = out.moduleRootPath - pub.rootPath = out.rootPath - } - - return pub -} - -function computeVersionSegment (name, version, mode) { - if (mode === 'original') return !version || version === 'master' ? '' : version - const strategy = this.latestVersionUrlSegmentStrategy - // NOTE: special exception; revisit in Antora 3 - if (!version || version === 'master') { - if (mode !== 'alias') return '' - if (strategy === 'redirect:to') return - } - if (strategy === 'redirect:to' || strategy === (mode === 'alias' ? 'redirect:from' : 'replace')) { - const component = this.getComponent(name) - const componentVersion = component && this.getComponentVersion(component, version) - if (componentVersion) { - const segment = - componentVersion === component.latest - ? this.latestVersionUrlSegment - : componentVersion === component.latestPrerelease - ? this.latestPrereleaseVersionUrlSegment - : undefined - return segment == null ? version : segment - } - } - return version -} - -function createSymbolicVersionAlias (component, version, symbolicVersionSegment, strategy) { - if (symbolicVersionSegment == null || symbolicVersionSegment === version) return - const family = 'alias' - const baseVersionAliasSrc = { component, module: 'ROOT', family, relative: '', basename: '', stem: '', extname: '' } - const symbolicVersionAliasSrc = Object.assign({}, baseVersionAliasSrc, { version: symbolicVersionSegment }) - const symbolicVersionAlias = { - src: symbolicVersionAliasSrc, - pub: computePub( - symbolicVersionAliasSrc, - computeOut(symbolicVersionAliasSrc, family, symbolicVersionSegment), - family - ), - } - const originalVersionAliasSrc = Object.assign({}, baseVersionAliasSrc, { version }) - const originalVersionSegment = computeVersionSegment(component, version, 'original') - const originalVersionAlias = { - src: originalVersionAliasSrc, - pub: computePub( - originalVersionAliasSrc, - computeOut(originalVersionAliasSrc, family, originalVersionSegment), - family - ), - } - if (strategy === 'redirect:to') { - originalVersionAlias.out = undefined - originalVersionAlias.rel = symbolicVersionAlias - return originalVersionAlias - } else { - symbolicVersionAlias.out = undefined - symbolicVersionAlias.rel = originalVersionAlias - return symbolicVersionAlias - } -} - -function getFileLocation ({ path: path_, src: { abspath, origin } }) { - return ( - abspath || - (origin ? `${path.join(origin.startPath, path_)} in ${origin.url} (ref: ${origin.branch || origin.tag})` : path_) - ) -} - -module.exports = ContentCatalog diff --git a/node_modules/@antora/content-classifier/lib/file.js b/node_modules/@antora/content-classifier/lib/file.js deleted file mode 100644 index 3fe11708..00000000 --- a/node_modules/@antora/content-classifier/lib/file.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict' - -const Vinyl = require('vinyl') - -class File extends Vinyl { - get path () { - return this.history[this.history.length - 1] - } - - set path (path_) { - this.history.push(path_) - } - - get relative () { - return this.history[this.history.length - 1] - } -} - -module.exports = File diff --git a/node_modules/@antora/content-classifier/lib/index.js b/node_modules/@antora/content-classifier/lib/index.js deleted file mode 100644 index 1501b698..00000000 --- a/node_modules/@antora/content-classifier/lib/index.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -/** - * Content Classifier component for Antora - * - * Organizes virtual files in the raw aggregate into a virtual content - * catalog. This catalog can be used by other components in Antora to find - * files by select properties, such as family, component, or version. - * - * @namespace content-classifier - */ -module.exports = require('./classify-content') diff --git a/node_modules/@antora/content-classifier/lib/logger.js b/node_modules/@antora/content-classifier/lib/logger.js deleted file mode 100644 index 3cafb475..00000000 --- a/node_modules/@antora/content-classifier/lib/logger.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict' - -module.exports = require('@antora/logger')(require('../package.json').name) diff --git a/node_modules/@antora/content-classifier/lib/mime-types-with-asciidoc.js b/node_modules/@antora/content-classifier/lib/mime-types-with-asciidoc.js deleted file mode 100644 index 1e964ed7..00000000 --- a/node_modules/@antora/content-classifier/lib/mime-types-with-asciidoc.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' - -const mimeTypes = require('mime-types') - -mimeTypes.types.adoc = 'text/asciidoc' -mimeTypes.extensions['text/asciidoc'] = ['adoc'] - -module.exports = mimeTypes diff --git a/node_modules/@antora/content-classifier/lib/util/parse-resource-id.js b/node_modules/@antora/content-classifier/lib/util/parse-resource-id.js deleted file mode 100644 index 33cdfde2..00000000 --- a/node_modules/@antora/content-classifier/lib/util/parse-resource-id.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict' - -// matches pattern version@component:module:family$relative -// ex. 1.0@antora:asciidoc:syntax/lists.adoc -const RESOURCE_ID_RX = /^(?:([^@:$]+)@)?(?:(?:([^@:$]+):)?(?:([^@:$]+))?:)?(?:([^@:$]+)\$)?([^:$][^@:$]*)$/ -const RESOURCE_ID_RX_GROUP = { version: 1, component: 2, module: 3, family: 4, relative: 5 } - -/** - * Parses a contextual resource ID spec into a file src object. - * - * Parses the specified resource ID spec to produce a resource ID object (an identifier shorthand - * that corresponds to the identity stored in the src property of a virtual file). If a context - * object is provided, it will be used to qualify the identifier, populating the component, version, - * and/or module properties, as necessary. - * - * * If a component is specified, but a version is not, the version remains undefined. - * * If a component is specified, but a module is not, the module defaults to "ROOT". - * * If the family is not specified, the default family is used. - * * If the family is specified, it is validated against the permitted families. - * - * @memberof content-classifier - * - * @param {String} spec - The contextual resource ID spec (e.g., version@component:module:family$relative). - * @param {Object} [ctx={}] - The src context. - * @param {String} [defaultFamily='page'] - The default family to use if family is not specified in the spec. - * This value is always used instead of family value provided by the ctx. - * @param {Array} [permittedFamilies=undefined] - An optional array of family names to allow. - * - * @returns {Object} A resource ID object that can be used to look up the file in the content - * catalog. If the spec is malformed, the return value is undefined. - */ -function parseResourceId (spec, ctx = {}, defaultFamily = 'page', permittedFamilies = undefined) { - const match = spec.match(RESOURCE_ID_RX) - if (!match) return - - let version = match[RESOURCE_ID_RX_GROUP.version] - let component = match[RESOURCE_ID_RX_GROUP.component] - let module_ = match[RESOURCE_ID_RX_GROUP.module] - let family = match[RESOURCE_ID_RX_GROUP.family] - let relative = match[RESOURCE_ID_RX_GROUP.relative] - - if (version === '_') version = '' - - if (component) { - if (!module_) module_ = 'ROOT' - } else { - component = ctx.component - if (version == null) version = ctx.version - if (!module_) module_ = ctx.module - } - - if (family) { - if (permittedFamilies && !permittedFamilies.includes(family)) family = undefined - } else { - family = defaultFamily - } - - if (~relative.indexOf('/')) { - relative = relative - .split('/') - .filter((it) => it && it !== '.' && it !== '..') - .join('/') - } - - return { component, version, module: module_, family, relative } -} - -module.exports = parseResourceId diff --git a/node_modules/@antora/content-classifier/lib/util/resolve-resource.js b/node_modules/@antora/content-classifier/lib/util/resolve-resource.js deleted file mode 100644 index a9dc5a03..00000000 --- a/node_modules/@antora/content-classifier/lib/util/resolve-resource.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict' - -const parseResourceId = require('./parse-resource-id') - -/** - * Attempts to resolve a contextual resource ID spec to a file in the catalog. - * - * Parses the specified contextual resource ID spec into a resource ID object using parseResourceId, - * then attempts to locate a file with this resource ID in the catalog. If a component is specified, but - * not a version, the latest version of the component is used from the catalog. If a file cannot be - * resolved, and the family is "page", then the search is attempted again for an "alias". If a file - * still cannot be found, the function returns undefined. If the spec does not match the resource ID - * syntax, or the specified family is not permitted, this function returns false. - * - * @memberof content-classifier - * - * @param {String} spec - The contextual resource ID spec (e.g., version@component:module:family$relative). - * @param {ContentCatalog} catalog - The content catalog in which to resolve the page file. - * @param {Object} [ctx={}] - The src context. - * @param {String} [defaultFamily=undefined] - The default family to use if family is not specified in spec. - * The value "page" is used if not specified. This value is always used instead of family value provided by the ctx. - * @param {Array} [permittedFamilies=undefined] - An optional array of family names to allow. - * - * @return {File} The virtual file to which the contextual resource ID spec refers, undefined if - * the file cannot be resolved, or false if the resource ID spec is invalid. - */ -function resolveResource (spec, catalog, ctx = {}, defaultFamily = undefined, permittedFamilies = undefined) { - const id = parseResourceId(spec, ctx, defaultFamily, permittedFamilies) - - if (!id || !id.family) return false - if (id.version == null) { - const component = catalog.getComponent(id.component) - if (!component) return - id.version = component.latest.version - } - if (!id.module) id.module = 'ROOT' - - return ( - catalog.getById(id) || - (id.family === 'page' ? (catalog.getById(Object.assign({}, id, { family: 'alias' })) || {}).rel : undefined) - ) -} - -module.exports = resolveResource diff --git a/node_modules/@antora/content-classifier/lib/util/version-compare-desc.js b/node_modules/@antora/content-classifier/lib/util/version-compare-desc.js deleted file mode 100644 index 222e0cf8..00000000 --- a/node_modules/@antora/content-classifier/lib/util/version-compare-desc.js +++ /dev/null @@ -1,86 +0,0 @@ -'use strict' - -const NUMBERS = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'] -const { isInteger } = Number - -/** - * An augmented semantic version comparison function. - * - * Augments the semantic version comparison algorithm with the following enhancements: - * - * * Discard the leading "v" character, if present and the version string is a semantic version. - * * Compare non-semantic versions as strings in reverse alphabetical order (e.g., xenial comes before trusty). - * * Compare semantic versions in descending order (e.g., 2.0.0 comes before 1.0.0). - * - * This function assumes that the string is a semantic version if it begins with a number (or a "v" - * followed by a number) and contains a "." character or it's a parsable number. - * - * @param {String} a - The left version string. - * @param {String} b - The right version string. - * @returns 0 if the versions match, -1 if a is greater, or 1 if b is greater. - */ -function versionCompareDesc (a, b) { - if (a === b) return 0 - if (a && b) { - const semverA = resolveSemver(a) - const semverB = resolveSemver(b) - if (semverA) { - return semverB ? -semverCompare(semverA, semverB) : 1 - } else { - return semverB ? -1 : -a.localeCompare(b, 'en', { numeric: true }) - } - } - return a ? 1 : -1 -} - -function resolveSemver (str) { - const chr0 = str.charAt() - if (chr0 === 'v') { - if (isDigit(str.charAt(1)) && (str = str.substr(1)) && (~str.indexOf('.') || isDigit(str.charAt()))) { - return str - } - } else if (isDigit(chr0) && (~str.indexOf('.') || isInteger(Number(str)))) { - return str - } -} - -function isDigit (chr) { - return NUMBERS.includes(chr) -} - -function semverCompare (a, b) { - let preA - let preB - const preOffsetA = a.indexOf('-') - const preOffsetB = b.indexOf('-') - if (~preOffsetA) { - preA = a.substr(preOffsetA + 1) - a = a.substr(0, preOffsetA) - } - if (~preOffsetB) { - preB = b.substr(preOffsetB + 1) - b = b.substr(0, preOffsetB) - } - const numsA = a.split('.') - const numsB = b.split('.') - for (let i = 0; i < 3; i++) { - const numA = Number(numsA[i] || 0) - const numB = Number(numsB[i] || 0) - if (numA > numB) { - return 1 - } else if (numB > numA) { - return -1 - } else if (isNaN(numA)) { - if (!isNaN(numB)) return -1 - } else if (isNaN(numB)) { - return 1 - } - } - if (preA == null) { - return preB == null ? 0 : 1 - } else { - return preB == null ? -1 : preA.localeCompare(preB, 'en', { numeric: true }) - } -} - -module.exports = versionCompareDesc diff --git a/node_modules/@antora/content-classifier/package.json b/node_modules/@antora/content-classifier/package.json deleted file mode 100644 index bac950d2..00000000 --- a/node_modules/@antora/content-classifier/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_from": "@antora/content-classifier@3.0.0-alpha.7", - "_id": "@antora/content-classifier@3.0.0-alpha.7", - "_inBundle": false, - "_integrity": "sha512-/hb5MN6ynBdHzvA54cPWbo4/68QrA6/K/zROPh0V/x71OqqYcoC6Qtu3KIaFqBk/XmNCqbXWxMUISl+H5W++tQ==", - "_location": "/@antora/content-classifier", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@antora/content-classifier@3.0.0-alpha.7", - "name": "@antora/content-classifier", - "escapedName": "@antora%2fcontent-classifier", - "scope": "@antora", - "rawSpec": "3.0.0-alpha.7", - "saveSpec": null, - "fetchSpec": "3.0.0-alpha.7" - }, - "_requiredBy": [ - "/@antora/site-generator-default", - "/@antora/site-mapper" - ], - "_resolved": "https://registry.npmjs.org/@antora/content-classifier/-/content-classifier-3.0.0-alpha.7.tgz", - "_shasum": "e564ff2be46a672e88e5551fb67d3f70ced7c436", - "_spec": "@antora/content-classifier@3.0.0-alpha.7", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/site-generator-default", - "author": { - "name": "OpenDevise Inc.", - "url": "https://opendevise.com" - }, - "bugs": { - "url": "https://gitlab.com/antora/antora/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Dan Allen", - "email": "dan@opendevise.com" - }, - { - "name": "Sarah White", - "email": "sarah@opendevise.com" - }, - { - "name": "Hubert SABLONNIÈRE", - "email": "hubert.sablonniere@gmail.com" - } - ], - "dependencies": { - "@antora/logger": "3.0.0-alpha.7", - "mime-types": "~2.1", - "vinyl": "~2.2" - }, - "deprecated": false, - "description": "Organizes aggregated content into a virtual file catalog for use in an Antora documentation pipeline.", - "engines": { - "node": ">=10.17.0" - }, - "files": [ - "lib/" - ], - "gitHead": "fbd597b3680474f2083cda8a7facf1e2848c08e0", - "homepage": "https://antora.org", - "keywords": [ - "antora", - "antora-component", - "content", - "documentation", - "static site", - "web publishing" - ], - "license": "MPL-2.0", - "main": "lib/index.js", - "name": "@antora/content-classifier", - "repository": { - "type": "git", - "url": "git+https://gitlab.com/antora/antora.git" - }, - "version": "3.0.0-alpha.7" -} diff --git a/node_modules/@antora/document-converter/LICENSE b/node_modules/@antora/document-converter/LICENSE deleted file mode 100644 index a612ad98..00000000 --- a/node_modules/@antora/document-converter/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/node_modules/@antora/document-converter/README.md b/node_modules/@antora/document-converter/README.md deleted file mode 100644 index 01ce257b..00000000 --- a/node_modules/@antora/document-converter/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Antora Document Converter - -The Document Converter is a component in Antora responsible for converting AsciiDoc documents to embeddable HTML for use in an Antora documentation pipeline. - -[Antora](https://antora.org) is a modular static site generator designed for creating documentation sites from AsciiDoc documents. -Its site generator pipeline aggregates documents from versioned content repositories and processes them using [Asciidoctor](https://asciidoctor.org). - -## Copyright and License - -Copyright (C) 2017-present [OpenDevise Inc.](https://opendevise.com) and the [Antora Project](https://antora.org). - -Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0). diff --git a/node_modules/@antora/document-converter/lib/convert-document.js b/node_modules/@antora/document-converter/lib/convert-document.js deleted file mode 100644 index 0899fa38..00000000 --- a/node_modules/@antora/document-converter/lib/convert-document.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict' - -const { loadAsciiDoc, extractAsciiDocMetadata } = require('@antora/asciidoc-loader') - -/** - * Converts the contents on the specified file from AsciiDoc to embedded HTML. - * - * It first delegates to the AsciiDoc Loader to load the AsciiDoc contents on - * the specified virtual file to a Document object. It then grabs the document - * attributes from that Document and assigns them to the asciidoc.attributes - * property on the file. If the document has a document header, it assigns the - * doctitle, xreftext, and navtitle to the asciidoc property on that file. If - * the page-partial attributes is set, it backs up the AsciiDoc source on the - * src.contents property. It then converts the Document to embedded HTML, wraps - * it in a Buffer, and assigns it to the contents property on the file. Finally, - * the mediaType property is updated to 'text/html'. - * - * @memberof document-converter - * - * @param {File} file - The virtual file whose contents is an AsciiDoc source document. - * @param {ContentCatalog} [contentCatalog=undefined] - The catalog of all virtual content files in the site. - * @param {Object} [asciidocConfig={}] - AsciiDoc processor configuration options specific to this file. - * - * @returns {File} The virtual file that was converted. - */ -function convertDocument (file, contentCatalog = undefined, asciidocConfig = {}) { - const doc = loadAsciiDoc(file, contentCatalog, asciidocConfig) - if (!file.asciidoc) { - file.asciidoc = extractAsciiDocMetadata(doc) - if (doc.hasAttribute('page-partial')) file.src.contents = file.contents - } - file.contents = Buffer.from(doc.convert()) - file.mediaType = 'text/html' - return file -} - -module.exports = convertDocument diff --git a/node_modules/@antora/document-converter/lib/convert-documents.js b/node_modules/@antora/document-converter/lib/convert-documents.js deleted file mode 100644 index 0694ba8c..00000000 --- a/node_modules/@antora/document-converter/lib/convert-documents.js +++ /dev/null @@ -1,77 +0,0 @@ -'use strict' - -const convertDocument = require('./convert-document') -const { loadAsciiDoc, extractAsciiDocMetadata } = require('@antora/asciidoc-loader') - -/** - * Converts the contents of publishable pages with the media type text/asciidoc - * in the content catalog to embedded HTML. - * - * First finds all publishable AsciiDoc files (identified by the media type - * text/asciidoc) in the page family in the content catalog. Then runs through - * all those files and loads the document header into the asciidoc property on - * the file and registers any page aliases. If the page-partial attribute is - * set, it backs up the AsciiDoc source to the src.contents property. It then - * runs through all the pages again and converts the contents to embedded HTML - * by delegating to the convertDocument function. The function then returns all - * the files in the page family (even those which don't have the media type - * text/asciidoc). All the files returned from this function are intended to be - * composed (i.e., wrapped in an HTML layout) by the page composer. - * - * @memberof document-converter - * - * @param {ContentCatalog} contentCatalog - The catalog of all virtual content files in the site. - * @param {Object} [siteAsciiDocConfig={}] - Site-wide AsciiDoc processor configuration options. - * - * @returns {Array} The publishable virtual files in the page family taken from the content catalog. - */ -function convertDocuments (contentCatalog, siteAsciiDocConfig = {}) { - const mainAsciiDocConfigs = new Map() - contentCatalog.getComponents().forEach(({ name: component, versions }) => { - versions.forEach(({ version, asciidoc }) => { - mainAsciiDocConfigs.set(buildCacheKey({ component, version }), asciidoc) - }) - }) - const headerAsciiDocConfigs = new Map() - const headerOverrides = { extensions: [], headerOnly: true } - for (const [cacheKey, mainAsciiDocConfig] of mainAsciiDocConfigs) { - headerAsciiDocConfigs.set(cacheKey, Object.assign({}, mainAsciiDocConfig, headerOverrides)) - } - return contentCatalog - .getPages((page) => page.out) - .map((page) => { - if (page.mediaType === 'text/asciidoc') { - const asciidocConfig = headerAsciiDocConfigs.get(buildCacheKey(page.src)) - const { attributes } = (page.asciidoc = extractAsciiDocMetadata( - loadAsciiDoc(page, contentCatalog, asciidocConfig || Object.assign({}, siteAsciiDocConfig, headerOverrides)) - )) - Object.defineProperty(page, 'title', { - get () { - return this.asciidoc.doctitle - }, - }) - registerPageAliases(attributes['page-aliases'], page, contentCatalog) - if ('page-partial' in attributes) page.src.contents = page.contents - } - return page - }) - .map((page) => - page.mediaType === 'text/asciidoc' - ? convertDocument(page, contentCatalog, mainAsciiDocConfigs.get(buildCacheKey(page.src)) || siteAsciiDocConfig) - : page - ) - .map((page) => delete page.src.contents && page) -} - -function buildCacheKey ({ component, version }) { - return version + '@' + component -} - -function registerPageAliases (aliases, targetFile, contentCatalog) { - if (!aliases) return - return aliases - .split(',') - .forEach((spec) => (spec = spec.trim()) && contentCatalog.registerPageAlias(spec, targetFile)) -} - -module.exports = Object.assign(convertDocuments, { convertDocuments, convertDocument }) diff --git a/node_modules/@antora/document-converter/lib/index.js b/node_modules/@antora/document-converter/lib/index.js deleted file mode 100644 index 104f2851..00000000 --- a/node_modules/@antora/document-converter/lib/index.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -/** - * Document Converter component for Antora - * - * Using the AsciiDoc Loader, converts the contents of AsciiDoc files to - * embedded HTML and assigns AsciiDoc-related metadata, such as page attributes, - * to the file. - * - * @namespace document-converter - */ -module.exports = require('./convert-documents') diff --git a/node_modules/@antora/document-converter/package.json b/node_modules/@antora/document-converter/package.json deleted file mode 100644 index 9c7ed5b8..00000000 --- a/node_modules/@antora/document-converter/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_from": "@antora/document-converter@3.0.0-alpha.7", - "_id": "@antora/document-converter@3.0.0-alpha.7", - "_inBundle": false, - "_integrity": "sha512-nEs5idWvVDw1Ynq0IiqhgMxHSjxfFHgSgd2EW6M9Wam3nxBSMwzQ7G+QqkMLDnzJfk2HbAYseRlIMikyVMc5aQ==", - "_location": "/@antora/document-converter", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@antora/document-converter@3.0.0-alpha.7", - "name": "@antora/document-converter", - "escapedName": "@antora%2fdocument-converter", - "scope": "@antora", - "rawSpec": "3.0.0-alpha.7", - "saveSpec": null, - "fetchSpec": "3.0.0-alpha.7" - }, - "_requiredBy": [ - "/@antora/site-generator-default" - ], - "_resolved": "https://registry.npmjs.org/@antora/document-converter/-/document-converter-3.0.0-alpha.7.tgz", - "_shasum": "2bd565ef08d34384f8091cf98dbcad5985f012ab", - "_spec": "@antora/document-converter@3.0.0-alpha.7", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/site-generator-default", - "author": { - "name": "OpenDevise Inc.", - "url": "https://opendevise.com" - }, - "bugs": { - "url": "https://gitlab.com/antora/antora/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Dan Allen", - "email": "dan@opendevise.com" - }, - { - "name": "Sarah White", - "email": "sarah@opendevise.com" - }, - { - "name": "Guillaume Grossetie", - "email": "g.grossetie@gmail.com" - }, - { - "name": "Hubert SABLONNIÈRE", - "email": "hubert.sablonniere@gmail.com" - } - ], - "dependencies": { - "@antora/asciidoc-loader": "3.0.0-alpha.7" - }, - "deprecated": false, - "description": "Converts AsciiDoc documents to embeddable HTML for use in an Antora documentation pipeline.", - "engines": { - "node": ">=10.17.0" - }, - "files": [ - "lib/" - ], - "gitHead": "fbd597b3680474f2083cda8a7facf1e2848c08e0", - "homepage": "https://antora.org", - "keywords": [ - "antora", - "antora-component", - "asciidoc", - "asciidoctor", - "converter", - "documentation", - "static site", - "web publishing" - ], - "license": "MPL-2.0", - "main": "lib/index.js", - "name": "@antora/document-converter", - "repository": { - "type": "git", - "url": "git+https://gitlab.com/antora/antora.git" - }, - "version": "3.0.0-alpha.7" -} diff --git a/node_modules/@antora/expand-path-helper/CHANGELOG.adoc b/node_modules/@antora/expand-path-helper/CHANGELOG.adoc deleted file mode 100644 index 8468264f..00000000 --- a/node_modules/@antora/expand-path-helper/CHANGELOG.adoc +++ /dev/null @@ -1,31 +0,0 @@ -= Changelog - -This document provides a summary of all notable changes by release. -For a detailed view of what's changed, refer to the repository's https://gitlab.com/antora/expand-path-helper/commits/master[commit history]. - -== 1.0.0 (2018-02-27) - -* initial stable release -* test cases when parameters are explicitly undefined - -== 1.0.0-rc.3 (2018-02-23) - -* BREAKING: change order of parameters to `path, start = '~+', dot = '.'` -* link leading dot segment to start value by default -* allow both start and dot parameters to accept an arbitrary path -* allow start and dot parameters to be controlled independently -* rewrite tests to match new parameter order -* update API doc and README -* clarify in README that function generates paths which are system dependent -* add npm package badge to README - -== 1.0.0-rc.2 (2018-02-22) - -* add third argument to make default prefix for relative path configurable -* use `+~` as default value for default prefix -* add API docs and more examples to README -* switch README to AsciiDoc; add scripts to include Markdown version in package - -== 1.0.0-rc.1 (2018-02-22) - -* initial release diff --git a/node_modules/@antora/expand-path-helper/LICENSE b/node_modules/@antora/expand-path-helper/LICENSE deleted file mode 100644 index a612ad98..00000000 --- a/node_modules/@antora/expand-path-helper/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/node_modules/@antora/expand-path-helper/README.md b/node_modules/@antora/expand-path-helper/README.md deleted file mode 100644 index 274e96ed..00000000 --- a/node_modules/@antora/expand-path-helper/README.md +++ /dev/null @@ -1,111 +0,0 @@ -# @antora/expand-path-helper - -A module for Node.js that provides a helper function to expand a path to an absolute path. -This function expands the first segment if it matches a shorthand expression, dot (`.`), tilde (`~`), or tilde plus (`~+`). -The expanded path is system dependent. -Developed for use in Antora. - -## Install - -```sh -$ npm i @antora/expand-path-helper -``` - -or - -```sh -$ yarn add @antora/expand-path-helper -``` - -## API - -```js -function expandPath (path, start = '~+', dot = '.') { ... } -``` - -Converts path to an absolute path. - -* `path` - The path to expand. -This parameter is required and must not be falsy. -* `start` - The starting directory from which to anchor a relative path. -This parameter is optional. -It defaults to the current working directory of the process (`~+`). -* `dot` - The value to use to replace a leading dot (`.`) segment. -This parameter is optional. -If the value of this parameter is itself `.`, which is the default, it uses the value of the start parameter. - -The main purpose of this function is path expansion. -If the first segment of the path, the value of the start parameter, or the value of the dot parameter matches `~` or `~+`, that value is expanded to the user's home directory or current working directory, respectively. -If the first segment of the path matches `.`, that value is replaced with the value of the dot parameter after being expanded. - -## Usage - -The output of `expandPath` depends on the system on which it is run (specifically on the `path.sep` value). - -### *nix - -```js -const expandPath = require('@antora/expand-path-helper') - -expandPath('/absolute/path') -//=> /absolute/path - -expandPath('foo/bar') -//=> /current/directory/foo/bar - -expandPath('./foo/bar') -//=> /current/directory/foo/bar - -expandPath('~/foo/bar') -//=> /home/user/foo/bar - -expandPath('~+/foo/bar') -//=> /current/directory/foo/bar - -expandPath('foo/bar', '/start/dir') -//=> /start/dir/foo/bar - -expandPath('./foo/bar', '/start/dir') -//=> /start/dir/foo/bar - -expandPath('./foo/bar', '~+', '/start/dir') -//=> /start/dir/foo/bar -``` - -### Windows - -```js -const expandPath = require('@antora/expand-path-helper') - -expandPath('C:\\absolute\\path') -//=> C:\absolute\path - -expandPath('foo\\bar') -//=> C:\current\directory\foo\bar - -expandPath('.\\foo\\bar') -//=> C:\current\directory\foo\bar - -expandPath('~\\foo\\bar') -//=> C:\Users\user\foo\bar - -expandPath('~+\\foo\\bar') -//=> C:\current\directory\foo\bar - -expandPath('foo\\bar', 'C:\\start\\dir') -//=> C:\start\dir\foo\bar - -expandPath('.\\foo\\bar', 'C:\\start\\dir') -//=> C:\start\dir\foo\bar - -expandPath('.\\foo\\bar', '~+', 'C:\\start\\dir') -//=> C:\start\dir\foo\bar -``` - -On Windows, the input path may contain forward slashes, but the expanded path will always have backslashes. - -## Copyright and License - -Copyright (C) 2018 OpenDevise Inc. and the Antora Project. - -Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0). diff --git a/node_modules/@antora/expand-path-helper/lib/index.js b/node_modules/@antora/expand-path-helper/lib/index.js deleted file mode 100644 index 5e81330d..00000000 --- a/node_modules/@antora/expand-path-helper/lib/index.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict' - -const { cwd } = process -const { homedir } = require('os') -const { isAbsolute, join, normalize, resolve, sep } = require('path') - -const SEPARATOR_CC = sep === '\\' ? '[/\\\\]' : '/' -const DOT_RELATIVE_RX = new RegExp(`^\\.${SEPARATOR_CC}`) -const HOME_RELATIVE_RX = new RegExp(`^~${SEPARATOR_CC}`) -const PWD_RELATIVE_RX = new RegExp(`^~\\+${SEPARATOR_CC}`) - -/** - * Converts path to an absolute path. - * - * If path is absolute, its value is normalized. If the first segment of path - * is a tilde (~), that segment is replaced with the home directory of the - * current user. If the first segment of path is a tilde followed by a plus - * (~+), that segment is replaced with the current working directory of the - * process. If path is relative, path is resolved starting from start. If path - * has a leading dot (.) segment, that segment is replaced with dot after that - * value is expanded. - * - * @param {String} path - The path to expand. - * @param {String} [start='~+'] - The path to use as a starting point for a - * relative path. Unless absolute, the value will first be expanded starting - * from the current working directory of the process. - * @param {String} [dot='.'] - The value used to replace a leading dot segment. - * If the value is '.', then the start value is used. - * - * @returns {String} An absolute path. - */ -function expandPath (path, start = '~+', dot = '.') { - if (path === '.') { - if (dot === '.') dot = start - return dot === '~' ? homedir() : (dot === '~+' ? cwd() : resolve(dot)) - } else if (path === '~') { - return homedir() - } else if (path === '~+') { - return cwd() - } else if (!path) { - throw new TypeError('path must be a string. Received ' + path) - } - const ch0 = path.charAt() - if (ch0 === '.') { - if (DOT_RELATIVE_RX.test(path) && dot !== '.') start = dot - } else if (ch0 === '~') { - if (HOME_RELATIVE_RX.test(path)) { - return join(homedir(), path.substr(2)) - } else if (PWD_RELATIVE_RX.test(path)) { - return join(cwd(), path.substr(3)) - } - } else if (isAbsolute(path)) { - return normalize(path) - } - if (start === '.') start = dot - return start === '~+' ? join(cwd(), path) : (start === '~' ? join(homedir(), path) : resolve(start, path)) -} - -module.exports = expandPath diff --git a/node_modules/@antora/expand-path-helper/package.json b/node_modules/@antora/expand-path-helper/package.json deleted file mode 100644 index cf3332cf..00000000 --- a/node_modules/@antora/expand-path-helper/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "_from": "@antora/expand-path-helper@~1.0", - "_id": "@antora/expand-path-helper@1.0.0", - "_inBundle": false, - "_integrity": "sha512-hg3y6M3OvRTb7jtLAnwwloYDxafbyKYttcf16kGCXvP7Wqosh7c+Ag+ltaZ7VSebpzpphO/umb/BXdpU7rxapw==", - "_location": "/@antora/expand-path-helper", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@antora/expand-path-helper@~1.0", - "name": "@antora/expand-path-helper", - "escapedName": "@antora%2fexpand-path-helper", - "scope": "@antora", - "rawSpec": "~1.0", - "saveSpec": null, - "fetchSpec": "~1.0" - }, - "_requiredBy": [ - "/@antora/content-aggregator", - "/@antora/logger", - "/@antora/site-publisher", - "/@antora/ui-loader" - ], - "_resolved": "https://registry.npmjs.org/@antora/expand-path-helper/-/expand-path-helper-1.0.0.tgz", - "_shasum": "3bfd6938ab86d4709af8d869cbf3bb17b8fe8912", - "_spec": "@antora/expand-path-helper@~1.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/logger", - "author": { - "name": "OpenDevise Inc.", - "url": "https://opendevise.com" - }, - "bugs": { - "url": "https://gitlab.com/antora/expand-path-helper/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Dan Allen", - "email": "dan@opendevise.com" - } - ], - "deprecated": false, - "description": "A helper function to expand a path to an absolute path, including expanding the first segment if it matches a shorthand expression, dot (.), tilde (~), or tilde plus (~+).", - "devDependencies": { - "chai": "^4.1.2", - "eslint": "^4.18.0", - "eslint-config-standard": "^11.0.0", - "eslint-plugin-import": "^2.8.0", - "eslint-plugin-node": "^6.0.0", - "eslint-plugin-promise": "^3.6.0", - "eslint-plugin-standard": "^3.0.1", - "mocha": "^5.0.1", - "nyc": "^11.5.0" - }, - "files": [ - "lib/" - ], - "homepage": "https://gitlab.com/antora/expand-path-helper#readme", - "keywords": [ - "path", - "absolute", - "relative", - "pwd", - "home" - ], - "license": "MPL-2.0", - "main": "lib/index.js", - "name": "@antora/expand-path-helper", - "nyc": { - "cache": true, - "cacheDir": "node_modules/.cache/nyc", - "include": [ - "lib/**/*.js" - ], - "reporter": [ - "lcov" - ] - }, - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://gitlab.com/antora/expand-path-helper.git" - }, - "scripts": { - "cov": "nyc _mocha test", - "lint": "eslint **/*.js", - "test": "_mocha test" - }, - "version": "1.0.0" -} diff --git a/node_modules/@antora/logger/LICENSE b/node_modules/@antora/logger/LICENSE deleted file mode 100644 index a612ad98..00000000 --- a/node_modules/@antora/logger/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/node_modules/@antora/logger/README.md b/node_modules/@antora/logger/README.md deleted file mode 100644 index 3632694e..00000000 --- a/node_modules/@antora/logger/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Antora Logger - -The Logger is a component in Antora responsible for providing the infrastructure for logging, shaping, and reporting application messages. -The logger is typically configured once per run of Antora. -Each component then gets its own logger, which is a proxy of a named child of the root logger. -Messages can be emitted in a structured (JSON) log format so they can be piped to a separate application for processing/transport or emitted in a pretty format to make them easier for an author to comprehend. - -[Antora](https://antora.org) is a modular static site generator designed for creating documentation sites from AsciiDoc documents. -Its site generator pipeline aggregates documents from versioned content repositories and processes them using [Asciidoctor](https://asciidoctor.org). - -## Copyright and License - -Copyright (C) 2017-present [OpenDevise Inc.](https://opendevise.com) and the [Antora Project](https://antora.org). - -Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0). diff --git a/node_modules/@antora/logger/lib/index.js b/node_modules/@antora/logger/lib/index.js deleted file mode 100644 index 692537fa..00000000 --- a/node_modules/@antora/logger/lib/index.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict' - -/** - * Logger component for Antora - * - * Responsible for providing the infrastructure for logging, shaping, and - * reporting application messages. The logger is typically configured once per - * run of Antora. Each component then gets its own logger, which is a proxy of - * a named child of the root logger. Messages can be emitted in a structured - * (JSON) log format so they can be piped to a separate application for - * processing/transport or emitted in a pretty format to make them easier for - * an author to comprehend. - * - * @namespace logger - */ -module.exports = require('./logger') diff --git a/node_modules/@antora/logger/lib/logger.js b/node_modules/@antora/logger/lib/logger.js deleted file mode 100644 index f5799b8d..00000000 --- a/node_modules/@antora/logger/lib/logger.js +++ /dev/null @@ -1,218 +0,0 @@ -'use strict' - -const { EventEmitter, once } = require('events') -const expandPath = require('@antora/expand-path-helper') -const fs = require('fs') -const ospath = require('path') -const { posix: path } = ospath -const { - destination: buildDest, - levels: { labels: levelLabels, values: levelValues }, - symbols: { streamSym }, - pino, -} = require('pino') - -const closedLogger = { closed: true } -const finalizers = [] -const INF = Infinity -const minLevel = levelLabels[Math.min.apply(null, Object.keys(levelLabels))] -const noopLogger = pino({ base: null, enabled: false, timestamp: false }, {}) -const rootLoggerHolder = new Map() -const standardStreams = { 1: 'stdout', 2: 'stderr', stderr: 2, stdout: 1 } - -function close () { - const rootLogger = rootLoggerHolder.get() || closedLogger - if (rootLogger.closed) return - const strm = Object.assign(rootLogger, closedLogger)[streamSym] - if (strm instanceof EventEmitter && typeof strm.end === 'function' && (strm._buf || !(strm.fd in standardStreams))) { - const waitForClose = once(strm, 'close').catch(() => undefined) - strm.end() - finalizers.push(waitForClose) - } -} - -function configure ({ name, level = 'info', levelFormat, failureLevel = 'silent', format, destination } = {}, baseDir) { - const silent = (levelValues[level] || (level === 'all' ? (level = minLevel) : INF)) === INF - if (silent && (levelValues[failureLevel] || INF) === INF && (rootLoggerHolder.get() || {}).noop) return module.exports - close() - const prettyPrint = format === 'pretty' - let colorize, dest - if (!(silent || typeof (destination || (destination = {})).write === 'function')) { - const { file, append = true, bufferSize, ...destOpts } = destination - if (bufferSize != null) destOpts.minLength = bufferSize - if (file && !(dest = standardStreams[file])) { - dest = expandPath(file, '~+', baseDir) - try { - fs.mkdirSync(ospath.dirname(dest), { recursive: true }) - if (!append) fs.unlinkSync(dest) - } catch {} - } else if (process.env.NODE_ENV !== 'test') { - colorize = true - } - destination = buildDest(prettyPrint ? dest || 2 : Object.assign({ sync: true }, destOpts, { dest: dest || 1 })) - } - const logger = addFailOnExitHooks( - silent - ? Object.assign(Object.create(Object.getPrototypeOf(noopLogger)), noopLogger) - : pino( - { - name, - base: {}, - level, - formatters: { level: levelFormat === 'number' ? (_, level) => ({ level }) : (level) => ({ level }) }, - hooks: { - // NOTE logMethod only called if log level is enabled - logMethod (args, method) { - const arg0 = args[0] - if (arg0.constructor === Object) { - const { file, line, stack, ...obj } = arg0 - // NOTE we assume file key is a file.src object - args[0] = file ? Object.assign(obj, reshapeFileForLog(arg0)) : obj - } - method.apply(this, args) - }, - }, - prettyPrint: prettyPrint && { - customPrettifiers: { - file: ({ path: path_, line }) => (line == null ? path_ : `${path_}:${line}`), - stack: (stack, _, log) => { - let prevSource = log.source - return stack - .map(({ file: { path: path_, line }, source }) => { - const file = `${path_}:${line}` - const repeatSource = - prevSource && - source.url === prevSource.url && - source.refname === prevSource.refname && - source.startPath === prevSource.startPath - prevSource = source - if (repeatSource) return `\n file: ${file}` - const { url, worktree, refname, startPath } = source - source = worktree - ? `${worktree} (refname: ${refname} ${startPath ? ', start path: ' + startPath : ''})` - : `${url || ''} (refname: ${refname}${startPath ? ', start path: ' + startPath : ''})` - return `\n file: ${file}\n source: ${source}` - }) - .join('') - }, - source: ({ url, worktree, refname, startPath }) => - worktree - ? `${worktree} (refname: ${refname} ${startPath ? ', start path: ' + startPath : ''})` - : `${url || ''} (refname: ${refname}${startPath ? ', start path: ' + startPath : ''})`, - }, - suppressFlushSyncWarning: true, - translateTime: 'SYS:HH:MM:ss.l', // Q: do we really need ms? should we honor DATE_FORMAT env var? - ...(colorize ? undefined : { colorize: false }), - }, - }, - destination - ), - failureLevel - ) - rootLoggerHolder.set(undefined, logger) - return module.exports -} - -function get (name) { - if (name === null) return rootLoggerHolder.get() - return new Proxy(noopLogger, { - resolveTarget () { - if ((this.ownRootLogger || closedLogger).closed) { - if ((this.ownRootLogger = rootLoggerHolder.get() || closedLogger).closed) { - ;(this.ownRootLogger = configure().get(null)).warn( - 'logger not configured; creating logger with default settings' - ) - } - this.target = undefined - } - return this.target || (this.target = name ? this.ownRootLogger.child({ name }) : this.ownRootLogger) - }, - get (_, property) { - return property === 'unwrap' ? () => this.resolveTarget() : this.resolveTarget()[property] - }, - set (_, property, value) { - this.resolveTarget()[property] = value - return true - }, - }) -} - -function finalize () { - close() - return Promise.all(finalizers.splice(0, finalizers.length)).then(() => (rootLoggerHolder.get() || {}).failOnExit) -} - -function reshapeFileForLog ({ file: { abspath, origin, path: vpath }, line, stack }) { - if (origin) { - const { url, refname, startPath, worktree } = origin - const logObject = { - file: { path: abspath || path.join(startPath, vpath), line }, - source: worktree - ? { url, worktree, refname, startPath: startPath || undefined } - : { url, refname, startPath: startPath || undefined }, - } - if (stack) logObject.stack = stack.map(reshapeFileForLog) - return logObject - } - return stack ? { file: { path: vpath, line }, stack: stack.map(reshapeFileForLog) } : { file: { path: vpath, line } } -} - -function addFailOnExitHooks (logger, failureLevel = undefined) { - let failureLevelVal - if (failureLevel === undefined) { - failureLevelVal = logger.failureLevelVal - } else { - logger.failureLevelVal = failureLevelVal = levelValues[failureLevel] || INF - Object.defineProperty(logger, 'failureLevel', { - enumerable: true, - get () { - return levelLabels[this.failureLevelVal] - }, - }) - logger.setFailOnExit = setFailOnExit.bind(logger) - logger.child = ((method) => - function (bindings) { - return addFailOnExitHooks(method.call(this, bindings)) - })(logger.child) - } - Object.defineProperty(logger, 'noop', { - enumerable: true, - get () { - return this.levelVal === INF && this.failureLevelVal === INF - }, - }) - if (failureLevelVal !== INF) { - for (const [levelName, levelVal] of Object.entries(levelValues)) { - if (levelVal >= failureLevelVal) logger[levelName] = decorateWithSetFailOnExit(logger[levelName]) - } - } - return logger -} - -function decorateWithSetFailOnExit (method) { - return method.name === 'noop' - ? callSetFailOnExit - : function (...args) { - this.setFailOnExit() - method.apply(this, args) - } -} - -function callSetFailOnExit () { - this.setFailOnExit() -} - -function setFailOnExit () { - this.failOnExit = true -} - -module.exports = Object.assign(get, { - close, - closeLogger: close, - configure, - configureLogger: configure, - finalize, - finalizeLogger: finalize, - get, - getLogger: get, -}) diff --git a/node_modules/@antora/logger/package.json b/node_modules/@antora/logger/package.json deleted file mode 100644 index 23ee184c..00000000 --- a/node_modules/@antora/logger/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_from": "@antora/logger@3.0.0-alpha.7", - "_id": "@antora/logger@3.0.0-alpha.7", - "_inBundle": false, - "_integrity": "sha512-NiqhWmaynK/MfhRAPO7BDesPUoCqPobjn+dOMhWoDIFZeqPpYpe8PKnqK1WSA1VQMnRSbwZBqa68RhJdK+RQmg==", - "_location": "/@antora/logger", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@antora/logger@3.0.0-alpha.7", - "name": "@antora/logger", - "escapedName": "@antora%2flogger", - "scope": "@antora", - "rawSpec": "3.0.0-alpha.7", - "saveSpec": null, - "fetchSpec": "3.0.0-alpha.7" - }, - "_requiredBy": [ - "/@antora/asciidoc-loader", - "/@antora/cli", - "/@antora/content-classifier", - "/@antora/page-composer", - "/@antora/playbook-builder" - ], - "_resolved": "https://registry.npmjs.org/@antora/logger/-/logger-3.0.0-alpha.7.tgz", - "_shasum": "37ab32a2ca7836d9afe05335ab37dc2a970d4a86", - "_spec": "@antora/logger@3.0.0-alpha.7", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/cli", - "author": { - "name": "OpenDevise Inc.", - "url": "https://opendevise.com" - }, - "bugs": { - "url": "https://gitlab.com/antora/antora/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Dan Allen", - "email": "dan@opendevise.com" - }, - { - "name": "Sarah White", - "email": "sarah@opendevise.com" - } - ], - "dependencies": { - "@antora/expand-path-helper": "~1.0", - "pino": "~6.11", - "pino-pretty": "~5.1" - }, - "deprecated": false, - "description": "The logger for Antora.", - "engines": { - "node": ">=10.17.0" - }, - "files": [ - "lib/" - ], - "gitHead": "fbd597b3680474f2083cda8a7facf1e2848c08e0", - "homepage": "https://antora.org", - "keywords": [ - "antora", - "logger", - "logging", - "generator", - "documentation", - "static site", - "web publishing" - ], - "license": "MPL-2.0", - "main": "lib/index.js", - "name": "@antora/logger", - "repository": { - "type": "git", - "url": "git+https://gitlab.com/antora/antora.git" - }, - "version": "3.0.0-alpha.7" -} diff --git a/node_modules/@antora/navigation-builder/LICENSE b/node_modules/@antora/navigation-builder/LICENSE deleted file mode 100644 index a612ad98..00000000 --- a/node_modules/@antora/navigation-builder/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/node_modules/@antora/navigation-builder/README.md b/node_modules/@antora/navigation-builder/README.md deleted file mode 100644 index 800ffe46..00000000 --- a/node_modules/@antora/navigation-builder/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Antora Navigation Builder - -The Navigation Builder is a component in Antora responsible for building a navigation catalog sourced from navigation files. -This navigation catalog can be used to add site navigation to pages in an Antora documentation pipeline. - -[Antora](https://antora.org) is a modular static site generator designed for creating documentation sites from AsciiDoc documents. -Its site generator pipeline aggregates documents from versioned content repositories and processes them using [Asciidoctor](https://asciidoctor.org). - -## Copyright and License - -Copyright (C) 2017-present [OpenDevise Inc.](https://opendevise.com) and the [Antora Project](https://antora.org). - -Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0). diff --git a/node_modules/@antora/navigation-builder/lib/build-navigation.js b/node_modules/@antora/navigation-builder/lib/build-navigation.js deleted file mode 100644 index 786fde7d..00000000 --- a/node_modules/@antora/navigation-builder/lib/build-navigation.js +++ /dev/null @@ -1,122 +0,0 @@ -'use strict' - -const loadAsciiDoc = require('@antora/asciidoc-loader') -const NavigationCatalog = require('./navigation-catalog') - -const LINK_RX = /(.+?)<\/a>/ - -/** - * Builds a {NavigationCatalog} from files in the navigation family that are - * stored in the content catalog. - * - * Queries the content catalog for files in the navigation family. Then uses - * the AsciiDoc Loader component to parse the source of each file into an - * Asciidoctor Document object. It then looks in each file for one or more nested - * unordered lists, which are used to build the navigation trees. It then - * combines those trees in sorted order as a navigation set, which gets - * stored in the navigation catalog by component/version pair. - * - * @memberof navigation-builder - * - * @param {ContentCatalog} [contentCatalog=undefined] - The content catalog - * that provides access to the virtual files in the site. - * @param {Object} [asciidocConfig={}] - AsciiDoc processor configuration options. Extensions are not propagated. - * Sets the relativizePageRefs option to false before passing to the loadAsciiDoc function. - * @param {Object} [asciidocConfig.attributes={}] - Shared AsciiDoc attributes to assign to the document. - * - * @returns {NavigationCatalog} A navigation catalog built from the navigation files in the content catalog. - */ -function buildNavigation (contentCatalog, siteAsciiDocConfig = {}) { - const navCatalog = new NavigationCatalog() - const navAsciiDocConfig = { doctype: 'article', extensions: [], relativizePageRefs: false } - contentCatalog - .findBy({ family: 'nav' }) - .reduce((accum, navFile) => { - const { component, version } = navFile.src - const key = version + '@' + component - const val = accum.get(key) - if (val) return new Map(accum).set(key, Object.assign({}, val, { navFiles: [...val.navFiles, navFile] })) - const componentVersion = contentCatalog.getComponentVersion(component, version) - const asciidocConfig = Object.assign({}, componentVersion.asciidoc || siteAsciiDocConfig, navAsciiDocConfig) - return new Map(accum).set(key, { component, version, componentVersion, asciidocConfig, navFiles: [navFile] }) - }, new Map()) - .forEach(({ component, version, componentVersion, asciidocConfig, navFiles }) => { - const trees = navFiles.reduce((accum, navFile) => { - accum.push(...loadNavigationFile(navFile, contentCatalog, asciidocConfig)) - return accum - }, []) - componentVersion.navigation = navCatalog.addNavigation(component, version, trees) - }) - return navCatalog -} - -function loadNavigationFile (navFile, contentCatalog, asciidocConfig) { - const lists = loadAsciiDoc(navFile, contentCatalog, asciidocConfig).blocks.filter((b) => b.getContext() === 'ulist') - if (!lists.length) return [] - const index = navFile.nav.index - return lists.map((list, idx) => { - const tree = buildNavigationTree(list.getTitle(), list.getItems()) - tree.root = true - tree.order = idx ? parseFloat((index + idx / lists.length).toFixed(4)) : index - return tree - }) -} - -function getChildListItems (listItem) { - const blocks = listItem.getBlocks() - const candidate = blocks[0] - if (candidate) { - if (blocks.length === 1 && candidate.getContext() === 'ulist') { - return candidate.getItems() - } else { - let context - return blocks.reduce((accum, block) => { - if ( - (context = block.getContext()) === 'ulist' || - (context === 'open' && (block = block.getBlocks()[0]) && block.getContext() === 'ulist') - ) { - accum.push(...block.getItems()) - } - return accum - }, []) - } - } else { - return [] - } -} - -function buildNavigationTree (formattedContent, items) { - const entry = formattedContent ? partitionContent(formattedContent) : {} - if (items.length) entry.items = items.map((item) => buildNavigationTree(item.getText(), getChildListItems(item))) - return entry -} - -// atomize? distill? decompose? -function partitionContent (content) { - if (~content.indexOf(' candidate.order >= tree.order) - ~insertIdx ? navigation.splice(insertIdx, 0, tree) : navigation.push(tree) - return navigation - } - - addNavigation (component, version, trees) { - return (this[$sets][generateKey(component, version)] = trees.sort((a, b) => a.order - b.order)) - } - - getNavigation (component, version) { - return this[$sets][generateKey(component, version)] - } -} - -function generateKey (component, version) { - return version + '@' + component -} - -module.exports = NavigationCatalog diff --git a/node_modules/@antora/navigation-builder/package.json b/node_modules/@antora/navigation-builder/package.json deleted file mode 100644 index 8bd07cbe..00000000 --- a/node_modules/@antora/navigation-builder/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "@antora/navigation-builder@3.0.0-alpha.7", - "_id": "@antora/navigation-builder@3.0.0-alpha.7", - "_inBundle": false, - "_integrity": "sha512-69FU/9JNKxvG0N3fQJkSyVi2jkxBmRUV3hLAFkJ6W0k+Memn6L4BVauHCUWBDOK8jIhO/WuAdhkLM0zfQbG8vg==", - "_location": "/@antora/navigation-builder", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@antora/navigation-builder@3.0.0-alpha.7", - "name": "@antora/navigation-builder", - "escapedName": "@antora%2fnavigation-builder", - "scope": "@antora", - "rawSpec": "3.0.0-alpha.7", - "saveSpec": null, - "fetchSpec": "3.0.0-alpha.7" - }, - "_requiredBy": [ - "/@antora/site-generator-default" - ], - "_resolved": "https://registry.npmjs.org/@antora/navigation-builder/-/navigation-builder-3.0.0-alpha.7.tgz", - "_shasum": "12454e84cc17ab50e0260149aa9b9450c436809c", - "_spec": "@antora/navigation-builder@3.0.0-alpha.7", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/site-generator-default", - "author": { - "name": "OpenDevise Inc.", - "url": "https://opendevise.com" - }, - "bugs": { - "url": "https://gitlab.com/antora/antora/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Dan Allen", - "email": "dan@opendevise.com" - }, - { - "name": "Sarah White", - "email": "sarah@opendevise.com" - } - ], - "dependencies": { - "@antora/asciidoc-loader": "3.0.0-alpha.7" - }, - "deprecated": false, - "description": "Builds a navigation catalog from navigation files for adding site navigation to pages in an Antora documentation pipeline.", - "engines": { - "node": ">=10.17.0" - }, - "files": [ - "lib/" - ], - "gitHead": "fbd597b3680474f2083cda8a7facf1e2848c08e0", - "homepage": "https://antora.org", - "keywords": [ - "antora", - "antora-component", - "navigation", - "asciidoc", - "documentation", - "static site", - "web publishing" - ], - "license": "MPL-2.0", - "main": "lib/index.js", - "name": "@antora/navigation-builder", - "repository": { - "type": "git", - "url": "git+https://gitlab.com/antora/antora.git" - }, - "version": "3.0.0-alpha.7" -} diff --git a/node_modules/@antora/page-composer/LICENSE b/node_modules/@antora/page-composer/LICENSE deleted file mode 100644 index a612ad98..00000000 --- a/node_modules/@antora/page-composer/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/node_modules/@antora/page-composer/README.md b/node_modules/@antora/page-composer/README.md deleted file mode 100644 index d2265be5..00000000 --- a/node_modules/@antora/page-composer/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Antora Page Composer - -The Page Composer is a component in Antora responsible for wrapping the embeddable HTML contents of each page file from the content catalog in an HTML page layout. -This step yields the standalone HTML pages in the generated site produced by an Antora documentation pipeline. - -[Antora](https://antora.org) is a modular static site generator designed for creating documentation sites from AsciiDoc documents. -Its site generator pipeline aggregates documents from versioned content repositories and processes them using [Asciidoctor](https://asciidoctor.org). - -## Copyright and License - -Copyright (C) 2017-present [OpenDevise Inc.](https://opendevise.com) and the [Antora Project](https://antora.org). - -Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0). diff --git a/node_modules/@antora/page-composer/lib/build-ui-model.js b/node_modules/@antora/page-composer/lib/build-ui-model.js deleted file mode 100644 index e60da004..00000000 --- a/node_modules/@antora/page-composer/lib/build-ui-model.js +++ /dev/null @@ -1,293 +0,0 @@ -'use strict' - -const { posix: path } = require('path') - -const { DEFAULT_LAYOUT_NAME } = require('./constants') -const { version: VERSION } = require('../package.json') - -function buildBaseUiModel (playbook, contentCatalog, env) { - const contentCatalogModel = contentCatalog.exportToModel() - return { - antoraVersion: VERSION, - contentCatalog: contentCatalogModel, - env, - site: buildSiteUiModel(playbook, contentCatalogModel), - } -} - -function buildUiModel (baseUiModel, file, contentCatalog, navigationCatalog) { - const siteUiModel = baseUiModel.site - const siteRootPath = file.pub.rootPath || siteUiModel.path || '' - const uiRootPath = siteRootPath + siteUiModel.ui.url - return Object.assign({}, baseUiModel, { - page: buildPageUiModel(siteUiModel, file, contentCatalog, navigationCatalog), - siteRootPath, - uiRootPath, - }) -} - -function buildSiteUiModel (playbook, contentCatalog) { - const model = { title: playbook.site.title } - - let siteUrl = playbook.site.url - if (siteUrl) { - if (siteUrl === '/') { - model.url = siteUrl - model.path = '' - } else { - if (siteUrl.charAt(siteUrl.length - 1) === '/') siteUrl = siteUrl.substr(0, siteUrl.length - 1) - if (siteUrl.charAt() === '/') { - model.path = siteUrl - } else if ((model.path = new URL(siteUrl).pathname) === '/') { - model.path = '' - } - model.url = siteUrl - } - } - - const startPage = contentCatalog.getSiteStartPage() - if (startPage) model.homeUrl = startPage.pub.url - - model.components = contentCatalog.getComponentsSortedBy('title').reduce((map, it) => (map[it.name] = it) && map, {}) - // NOTE: duplicate site.keys since original is frozen - model.keys = Object.assign({}, playbook.site.keys) - - const uiConfig = playbook.ui - model.ui = { - url: path.resolve('/', uiConfig.outputDir), - defaultLayout: uiConfig.defaultLayout || DEFAULT_LAYOUT_NAME, - } - - return model -} - -function buildPageUiModel (siteUiModel, file, contentCatalog, navigationCatalog) { - const src = file.src - if (src.stem === '404' && !src.component) return { layout: '404', title: file.title } - const { component: component_, version, module: module_, relative: relativeSrcPath, origin, editUrl, fileUri } = src - - // QUESTION should attributes be scoped to AsciiDoc, or should this work regardless of markup language? file.data? - const asciidoc = file.asciidoc || {} - const attributes = asciidoc.attributes || {} - const pageAttributes = Object.entries(attributes).reduce((accum, [name, val]) => { - if (name.startsWith('page-')) accum[name.substr(5)] = val - return accum - }, {}) - - const url = file.pub.url - const component = contentCatalog.getComponent(component_) - const componentVersion = contentCatalog.getComponentVersion(component, version) - // QUESTION can we cache versions on file.rel so only computed once per page version lineage? - const versions = component.versions.length > 1 ? getPageVersions(file, component, contentCatalog) : undefined - const title = file.title || asciidoc.doctitle - - const model = { - contents: file.contents, - layout: pageAttributes.layout || siteUiModel.ui.defaultLayout, - title, - url, - author: attributes.author, - description: attributes.description, - keywords: attributes.keywords, - role: attributes.docrole, - attributes: pageAttributes, - component, - version, - displayVersion: componentVersion.displayVersion, - componentVersion, - module: module_, - relativeSrcPath, - origin, - versions, - editUrl, - fileUri, - home: url === siteUiModel.homeUrl, - } - - if (navigationCatalog) attachNavProperties(model, url, title, navigationCatalog.getNavigation(component_, version)) - - if (versions) { - Object.defineProperty(model, 'latest', { - get () { - return this.versions.find((candidate) => candidate.latest) - }, - }) - } - - // NOTE site URL has already been normalized at this point - const siteUrl = siteUiModel.url - if (siteUrl && siteUrl.charAt() !== '/') { - if (versions) { - let latestReached - // NOTE latest not guaranteed to match latest component version since the page may be missing in that version - const latest = versions.find((it) => (latestReached || (latestReached = it.latest)) && !it.missing) - // NOTE latest can be undefined if page is only in prerelease and the prerelease version is not the latest version - if (latest && !latest.prerelease) { - let canonicalUrl = latest.url - if (canonicalUrl === url || canonicalUrl.charAt() === '/') canonicalUrl = siteUrl + canonicalUrl - model.canonicalUrl = file.pub.canonicalUrl = canonicalUrl - } - } else if (!componentVersion.prerelease) { - model.canonicalUrl = file.pub.canonicalUrl = siteUrl + url - } - } - - return model -} - -// QUESTION should this function go in ContentCatalog? -function getPageVersions (page, component, contentCatalog) { - let basePageId = page.src - const componentVersions = component.versions - const pageVersion = basePageId.version - const thisVersionIdx = componentVersions.findIndex(({ version }) => version === pageVersion) - const thisVersion = componentVersions[thisVersionIdx] - const newerVersions = componentVersions.slice(0, thisVersionIdx) - const olderVersions = componentVersions.slice(thisVersionIdx + 1) - const latestVersion = component.latest - let pageVersions = newerVersions - .reverse() - .reduce((accum, componentVersion) => { - let relPage - const relPageId = Object.assign({}, basePageId, { version: componentVersion.version }) - if ( - !(relPage = contentCatalog.getById(relPageId)) && - (relPage = (contentCatalog.getById((relPageId.family = 'alias') && relPageId) || {}).rel) - ) { - // NOTE: don't follow alias that falls outside of component version - if (relPage.src.version === relPageId.version && relPage.src.component === relPageId.component) { - // NOTE: keep searching from target of alias - basePageId = relPage.src - } else { - // QUESTION: should we mark the page as missing or link outside the component version? - //relPage = undefined - } - } - accum.push( - Object.assign( - componentVersion === latestVersion ? { latest: true } : {}, - componentVersion, - relPage ? { url: relPage.pub.url } : { missing: true } - ) - ) - return accum - }, []) - .reverse() - pageVersions.push( - Object.assign(thisVersion === latestVersion ? { latest: true } : {}, thisVersion, { url: page.pub.url }) - ) - basePageId = page.src - let prevPage = page - pageVersions = olderVersions.reduce((accum, componentVersion) => { - let relPage - let primaryAliasSrc - const relPageId = Object.assign({}, basePageId, { version: componentVersion.version }) - if ((relPage = contentCatalog.getById(relPageId))) { - prevPage = relPage - } else if ( - prevPage && - (primaryAliasSrc = (prevPage.rel || {}).src) && - // NOTE: if alias is located in different component or version, it doesn't give us any useful information - primaryAliasSrc.version === prevPage.src.version && - primaryAliasSrc.component === prevPage.src.component - ) { - relPageId.module = primaryAliasSrc.module - relPageId.relative = primaryAliasSrc.relative - if ((relPage = contentCatalog.getById(relPageId))) { - // NOTE: keep searching from target of alias - basePageId = (prevPage = relPage).src - } else if ((relPage = (contentCatalog.getById((relPageId.family = 'alias') && relPageId) || {}).rel)) { - // NOTE: don't follow alias that falls outside of component version - if (relPage.src.version === relPageId.version && relPage.src.component === relPageId.component) { - // NOTE: keep searching from target of alias - basePageId = (prevPage = relPage).src - } else { - // QUESTION: should we update version on prevPage so older versions can continue to follow it? - prevPage = undefined - // QUESTION: should we mark the page as missing or link outside the component version? - //relPage = undefined - } - } - } - accum.push( - Object.assign( - componentVersion === latestVersion ? { latest: true } : {}, - componentVersion, - relPage ? { url: relPage.pub.url } : { missing: true } - ) - ) - return accum - }, pageVersions) - return pageVersions -} - -function attachNavProperties (model, currentUrl, title, navigation = []) { - if (!(model.navigation = navigation).length) return - const startPageUrl = model.componentVersion.url - const { match, ancestors, previous, next } = findNavItem({ ancestors: [], seekNext: true, currentUrl }, navigation) - if (match) { - // QUESTION should we filter out component start page from the breadcrumbs? - const breadcrumbs = ancestors.filter((item) => 'content' in item).reverse() - const parent = breadcrumbs.find((item) => item.urlType === 'internal') - breadcrumbs.reverse().push(match) - model.breadcrumbs = breadcrumbs - if (parent) model.parent = parent - if (previous) { - model.previous = previous - } else if (currentUrl !== startPageUrl) { - model.previous = { content: model.componentVersion.title, url: startPageUrl, urlType: 'internal', discrete: true } - } - if (next) model.next = next - } else { - const orphan = { content: title, url: currentUrl, urlType: 'internal', discrete: true } - if (title) model.breadcrumbs = [orphan] - if (currentUrl === startPageUrl) { - const { next: first } = findNavItem({ ancestors: [], match: orphan, seekNext: true, currentUrl }, navigation) - if (first) model.next = first - } - } -} - -function findNavItem (correlated, siblings, root = true, siblingIdx = 0, candidate = undefined) { - if (!(candidate = candidate || siblings[siblingIdx])) { - return correlated - } else if (correlated.match) { - if (candidate.urlType === 'internal' && !matchesPage(candidate, correlated.currentUrl)) { - correlated.next = candidate - return correlated - } - } else if (candidate.urlType === 'internal') { - if (matchesPage(candidate, correlated.currentUrl)) { - correlated.match = candidate - if (!correlated.seekNext) return correlated - } else if (!(correlated.previous && matchesPage(candidate, correlated.previous.url, correlated.previous.hash))) { - correlated.previous = candidate - } - } - const children = candidate.items || [] - if (children.length) { - const ancestors = correlated.ancestors - correlated = findNavItem( - correlated.match ? correlated : Object.assign({}, correlated, { ancestors: [...ancestors, candidate] }), - children, - false - ) - if (correlated.match) { - if (!correlated.seekNext || correlated.next) return correlated - } else { - correlated.ancestors = ancestors - } - } - if (++siblingIdx < siblings.length) { - correlated = findNavItem(correlated, siblings, root, siblingIdx) - } else if (root && !correlated.match) { - delete correlated.previous - } - return correlated -} - -function matchesPage (candidate, url, hash = undefined) { - return candidate.url === (hash ? url.substr(0, url.length - hash.length) : url) + (candidate.hash || '') -} - -module.exports = { buildBaseUiModel, buildSiteUiModel, buildPageUiModel, buildUiModel } diff --git a/node_modules/@antora/page-composer/lib/constants.js b/node_modules/@antora/page-composer/lib/constants.js deleted file mode 100644 index b7c0db80..00000000 --- a/node_modules/@antora/page-composer/lib/constants.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -module.exports = Object.freeze({ - DEFAULT_LAYOUT_NAME: 'default', -}) diff --git a/node_modules/@antora/page-composer/lib/create-page-composer.js b/node_modules/@antora/page-composer/lib/create-page-composer.js deleted file mode 100644 index b0b8156e..00000000 --- a/node_modules/@antora/page-composer/lib/create-page-composer.js +++ /dev/null @@ -1,101 +0,0 @@ -'use strict' - -const { buildBaseUiModel, buildUiModel } = require('./build-ui-model') -const handlebars = require('handlebars') -const logger = require('./logger') -const relativize = require('./helpers/relativize') -const resolvePage = require('./helpers/resolve-page') -const resolvePageURL = require('./helpers/resolve-page-url') -const requireFromString = require('require-from-string') - -/** - * Generates a function to wrap the page contents in a page layout. - * - * Compiles the Handlebars layouts, along with the partials and helpers, and - * builds the shared site UI model. Passes these objects to a generated - * function, which can then be used to apply a layout template to pages. - * - * @memberof page-composer - * - * @param {Object} playbook - The configuration object for Antora. - * @param {ContentCatalog} contentCatalog - The content catalog - * that provides access to the virtual files in the site. - * @param {UiCatalog} uiCatalog - The file catalog - * that provides access to the UI files for the site. - * @param {Object} [env=process.env] - A map of environment variables. - * @returns {Function} A function to compose a page (i.e., wrap the embeddable - * HTML contents in a standalone page layout). - */ -function createPageComposer (playbook, contentCatalog, uiCatalog, env = process.env) { - handlebars.registerHelper('relativize', relativize) - handlebars.registerHelper('resolvePage', resolvePage) - handlebars.registerHelper('resolvePageURL', resolvePageURL) - uiCatalog - .findByType('helper') - .forEach(({ path, stem, contents }) => - handlebars.registerHelper(stem, requireFromString(contents.toString(), path)) - ) - uiCatalog.findByType('partial').forEach(({ stem, contents }) => handlebars.registerPartial(stem, contents.toString())) - const layouts = uiCatalog - .findByType('layout') - .reduce( - (accum, { path: srcName, stem, contents }) => - accum.set(stem, handlebars.compile(contents.toString(), { preventIndent: true, srcName })), - new Map() - ) - return createPageComposerInternal(buildBaseUiModel(playbook, contentCatalog, env), layouts) -} - -function createPageComposerInternal (baseUiModel, layouts) { - /** - * Wraps the embeddable HTML contents of the specified file in a page layout. - * - * Builds a UI model from the file and its context, executes on the specified - * page layout on that model, and assigns the result to the contents property - * of the file. If no layout is specified on the file, the default layout is - * used. - * - * @memberof page-composer - * - * @param {File} file - The virtual file the contains embeddable HTML - * contents to wrap in a layout. - * @param {ContentCatalog} _contentCatalog - The content catalog - * that provides access to the virtual files in the site (ignored). - * @param {NavigationCatalog} navigationCatalog - The navigation catalog - * that provides access to the navigation for each component version. - * @returns {File} The file whose contents were wrapped in the specified page layout. - */ - return function composePage (file, _contentCatalog, navigationCatalog) { - // QUESTION should we pass the playbook to the uiModel? - const uiModel = buildUiModel(baseUiModel, file, baseUiModel.contentCatalog, navigationCatalog) - let layout = uiModel.page.layout - if (!layouts.has(layout)) { - if (layout === '404') throw new Error('404 layout not found') - const defaultLayout = uiModel.site.ui.defaultLayout - if (defaultLayout === layout) { - throw new Error(`${layout} layout not found`) - } else if (!layouts.has(defaultLayout)) { - throw new Error(`Neither ${layout} layout or fallback ${defaultLayout} layout found`) - } - logger.warn("page layout '%s' specified by page not found; using default layout", layout) - layout = defaultLayout - } - // QUESTION should we call trim() on result? - try { - file.contents = Buffer.from(layouts.get(layout)(uiModel)) - } catch (err) { - throw transformHandlebarsError(err, layout) - } - return file - } -} - -function transformHandlebarsError ({ message, stack }, layout) { - const m = stack.match(/^ *at Object\.ret \[as (.+?)\]/m) - const templatePath = `${m ? 'partials/' + m[1] : 'layouts/' + layout}.hbs` - const err = new Error(`${message}${~message.indexOf('\n') ? '\n^ ' : ' '}in UI template ${templatePath}`) - err.stack = [err.toString(), stack.substr(message.length + 8)].join('\n') - return err -} - -module.exports = createPageComposer diff --git a/node_modules/@antora/page-composer/lib/helpers/relativize.js b/node_modules/@antora/page-composer/lib/helpers/relativize.js deleted file mode 100644 index 039ac6a4..00000000 --- a/node_modules/@antora/page-composer/lib/helpers/relativize.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict' - -const { posix: path } = require('path') - -module.exports = (to, { data }) => { - if (!to) return '#' - if (to.charAt() !== '/') return to - const from = data.root.page.url - if (!from) return (data.root.site.path || '') + to - let hash = '' - const hashIdx = to.indexOf('#') - if (~hashIdx) { - hash = to.substr(hashIdx) - to = to.substr(0, hashIdx) - } - return to === from - ? hash || (isDir(to) ? './' : path.basename(to)) - : (path.relative(path.dirname(from + '.'), to) || '.') + (isDir(to) ? '/' + hash : hash) -} - -function isDir (str) { - return str.charAt(str.length - 1) === '/' -} diff --git a/node_modules/@antora/page-composer/lib/helpers/resolve-page-url.js b/node_modules/@antora/page-composer/lib/helpers/resolve-page-url.js deleted file mode 100644 index 3f887e8b..00000000 --- a/node_modules/@antora/page-composer/lib/helpers/resolve-page-url.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -module.exports = (spec, { data, hash: context }) => { - if (!spec) return - const { contentCatalog, page } = data.root - if (page.component) { - context = Object.assign({ component: page.component.name, version: page.version, module: page.module }, context) - } - const file = contentCatalog.resolvePage(spec, context) - if (file) return file.pub.url -} diff --git a/node_modules/@antora/page-composer/lib/helpers/resolve-page.js b/node_modules/@antora/page-composer/lib/helpers/resolve-page.js deleted file mode 100644 index a4c70a93..00000000 --- a/node_modules/@antora/page-composer/lib/helpers/resolve-page.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict' - -const { buildPageUiModel } = require('./../build-ui-model') - -module.exports = (spec, { data, hash: context }) => { - if (!spec) return - const { contentCatalog, page, site } = data.root - const raw = 'model' in context && (context.model ? !delete context.model : delete context.model) - if (page.component) { - context = Object.assign({ component: page.component.name, version: page.version, module: page.module }, context) - } - const file = contentCatalog.resolvePage(spec, context) - if (file) return raw ? file : buildPageUiModel(site, file, contentCatalog) -} diff --git a/node_modules/@antora/page-composer/lib/index.js b/node_modules/@antora/page-composer/lib/index.js deleted file mode 100644 index 92654ea8..00000000 --- a/node_modules/@antora/page-composer/lib/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -/** - * Page Composer component for Antora - * - * Wraps the embedded HTML contents of a page file in the content catalog in - * a standalone page layout. - * - * @namespace page-composer - */ -module.exports = require('./create-page-composer') diff --git a/node_modules/@antora/page-composer/lib/logger.js b/node_modules/@antora/page-composer/lib/logger.js deleted file mode 100644 index 3cafb475..00000000 --- a/node_modules/@antora/page-composer/lib/logger.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict' - -module.exports = require('@antora/logger')(require('../package.json').name) diff --git a/node_modules/@antora/page-composer/package.json b/node_modules/@antora/page-composer/package.json deleted file mode 100644 index 71c2b3c7..00000000 --- a/node_modules/@antora/page-composer/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "@antora/page-composer@3.0.0-alpha.7", - "_id": "@antora/page-composer@3.0.0-alpha.7", - "_inBundle": false, - "_integrity": "sha512-XaujKukaXrulIIiG+dXLieISHxElmNzU/1QRdbBKbUgABtrpTz+HegEXLHzav5Q/d8IBB7xWylN2u8bzbhJLEg==", - "_location": "/@antora/page-composer", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@antora/page-composer@3.0.0-alpha.7", - "name": "@antora/page-composer", - "escapedName": "@antora%2fpage-composer", - "scope": "@antora", - "rawSpec": "3.0.0-alpha.7", - "saveSpec": null, - "fetchSpec": "3.0.0-alpha.7" - }, - "_requiredBy": [ - "/@antora/site-generator-default" - ], - "_resolved": "https://registry.npmjs.org/@antora/page-composer/-/page-composer-3.0.0-alpha.7.tgz", - "_shasum": "13ee73e8c66dcf16d4d621b2c1041c77e0b1eca8", - "_spec": "@antora/page-composer@3.0.0-alpha.7", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/site-generator-default", - "author": { - "name": "OpenDevise Inc.", - "url": "https://opendevise.com" - }, - "bugs": { - "url": "https://gitlab.com/antora/antora/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Dan Allen", - "email": "dan@opendevise.com" - }, - { - "name": "Sarah White", - "email": "sarah@opendevise.com" - } - ], - "dependencies": { - "@antora/logger": "3.0.0-alpha.7", - "handlebars": "~4.7", - "require-from-string": "~2.0" - }, - "deprecated": false, - "description": "Wraps the embeddable HTML contents of each page file from the content catalog in a page layout to yield standalone pages in an Antora documentation pipeline.", - "engines": { - "node": ">=10.17.0" - }, - "files": [ - "lib/" - ], - "gitHead": "fbd597b3680474f2083cda8a7facf1e2848c08e0", - "homepage": "https://antora.org", - "keywords": [ - "antora", - "antora-component", - "handlebars", - "html", - "documentation", - "static site", - "web publishing" - ], - "license": "MPL-2.0", - "main": "lib/index.js", - "name": "@antora/page-composer", - "repository": { - "type": "git", - "url": "git+https://gitlab.com/antora/antora.git" - }, - "version": "3.0.0-alpha.7" -} diff --git a/node_modules/@antora/playbook-builder/LICENSE b/node_modules/@antora/playbook-builder/LICENSE deleted file mode 100644 index a612ad98..00000000 --- a/node_modules/@antora/playbook-builder/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/node_modules/@antora/playbook-builder/README.md b/node_modules/@antora/playbook-builder/README.md deleted file mode 100644 index b028d38a..00000000 --- a/node_modules/@antora/playbook-builder/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Antora Playbook Builder - -The Playbook Builder is the configuration component for Antora. -It's responsible for building a playbook object from user input that's then used for configuring components in an Antora generator pipeline. - -[Antora](https://antora.org) is a modular static site generator designed for creating documentation sites from AsciiDoc documents. -Its site generator pipeline aggregates documents from versioned content repositories and processes them using [Asciidoctor](https://asciidoctor.org). - -## Copyright and License - -Copyright (C) 2017-present [OpenDevise Inc.](https://opendevise.com) and the [Antora Project](https://antora.org). - -Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0). diff --git a/node_modules/@antora/playbook-builder/lib/build-playbook.js b/node_modules/@antora/playbook-builder/lib/build-playbook.js deleted file mode 100644 index b7e737cd..00000000 --- a/node_modules/@antora/playbook-builder/lib/build-playbook.js +++ /dev/null @@ -1,103 +0,0 @@ -'use strict' - -const camelCaseKeys = require('camelcase-keys') -const { configureLogger } = require('@antora/logger') -const convict = require('./solitary-convict') -const fs = require('fs') -const { hasOwnProperty } = Object.prototype -const ospath = require('path') - -/** - * Builds a playbook object according to the provided schema from the specified - * arguments and environment variables. - * - * Accepts an array of command line arguments (in the form of option flags and - * switches) and a map of environment variables and translates this data into a - * playbook object according the the specified schema. If no schema is - * specified, the default schema provided by this package is used. - * - * @memberof playbook-builder - * - * @param {Array} [args=[]] - An array of arguments in the form of command line - * option flags and switches. Should begin with the first flag or switch. - * @param {Object} [env={}] - A map of environment variables. - * @param {Object} [schema=undefined] - A convict configuration schema. - * - * @returns {Object} A playbook object containing a hierarchical structure that - * mirrors the configuration schema. With the exception of the top-level asciidoc - * key and its descendants, all keys in the playbook are camelCased. - */ -function buildPlaybook (args = [], env = {}, schema = undefined) { - const config = loadConvictConfig(args, env, schema) - - const relSpecFilePath = config.get('playbook') - if (relSpecFilePath) { - let absSpecFilePath = ospath.resolve(relSpecFilePath) - if (ospath.extname(absSpecFilePath)) { - if (!fs.existsSync(absSpecFilePath)) { - let details = '' - if (relSpecFilePath !== absSpecFilePath) { - details = ` (path: ${relSpecFilePath}${ospath.isAbsolute(relSpecFilePath) ? '' : ', cwd: ' + process.cwd()})` - } - throw new Error(`playbook file not found at ${absSpecFilePath}${details}`) - } - } else if (fs.existsSync(absSpecFilePath + '.yml')) { - absSpecFilePath += '.yml' - } else if (fs.existsSync(absSpecFilePath + '.json')) { - absSpecFilePath += '.json' - } else if (fs.existsSync(absSpecFilePath + '.toml')) { - absSpecFilePath += '.toml' - } else { - const details = `(path: ${relSpecFilePath}${ospath.isAbsolute(relSpecFilePath) ? '' : ', cwd: ' + process.cwd()})` - throw new Error( - `playbook file not found at ${absSpecFilePath}.yml, ${absSpecFilePath}.json, or ${absSpecFilePath}.toml ` + - details - ) - } - config.loadFile(absSpecFilePath) - if (relSpecFilePath !== absSpecFilePath) config.set('playbook', absSpecFilePath) - } - - config.validate({ allowed: 'strict' }) - - return exportModel(config) -} - -function loadConvictConfig (args, env, customSchema) { - return convict(customSchema || require('./config/schema'), { args, env }) -} - -function freeze (o) { - let v - for (const k in o) hasOwnProperty.call(o, k) && (Object.isFrozen((v = o[k])) || freeze(v)) - return Object.freeze(o) -} - -function exportModel (config) { - const schemaProperties = config._schema._cvtProperties - const data = config.getProperties() - if ( - 'site' in schemaProperties && - 'keys' in schemaProperties.site._cvtProperties && - '__private__google_analytics_key' in schemaProperties.site._cvtProperties - ) { - const site = data.site - if (site.__private__google_analytics_key != null) site.keys.google_analytics = site.__private__google_analytics_key - delete site.__private__google_analytics_key - } - const playbook = camelCaseKeys(data, { deep: true, stopPaths: ['asciidoc'] }) - playbook.dir = playbook.playbook ? ospath.dirname((playbook.file = playbook.playbook)) : process.cwd() - const runtime = (playbook.runtime || false).constructor === Object && playbook.runtime - if (runtime) { - const log = (runtime.log || false).constructor === Object && runtime.log - if (runtime.silent) { - if (runtime.quiet === false) runtime.quiet = true - if (log && 'level' in log) log.level = 'silent' - } - if (log) configureLogger(log, playbook.dir) - } - delete playbook.playbook - return freeze(playbook) -} - -module.exports = buildPlaybook diff --git a/node_modules/@antora/playbook-builder/lib/config/schema.js b/node_modules/@antora/playbook-builder/lib/config/schema.js deleted file mode 100644 index 90a715ee..00000000 --- a/node_modules/@antora/playbook-builder/lib/config/schema.js +++ /dev/null @@ -1,311 +0,0 @@ -'use strict' - -module.exports = { - playbook: { - doc: 'Location of the playbook file.', - format: String, - default: undefined, - arg: 'playbook', - }, - site: { - start_page: { - doc: 'The start page for the site, redirected from the site index.', - format: String, - default: undefined, - arg: 'start-page', - }, - title: { - doc: 'The title of the site.', - format: String, - default: undefined, - arg: 'title', - }, - url: { - doc: 'The base URL (absolute URL or pathname) of the published site. Should not include a trailing slash.', - format: 'url-or-pathname', - default: undefined, - arg: 'url', - env: 'URL', - }, - robots: { - doc: 'Controls generation of robots.txt if site.url is set (allowed values: allow, disallow, or custom string).', - format: String, - default: undefined, - }, - keys: { - doc: 'An API key (in the form name=value) to pass to the UI model. May be specified multiple times.', - format: 'primitive-map', - default: {}, - arg: 'key', - }, - // NOTE used to map arg and env for site.keys.google_analytics key - __private__google_analytics_key: { - doc: [ - 'The Google Analytics account key.', - '(Deprecated; will be removed in Antora 4; define using --key google-analytics= instead)', - ].join('\n'), - format: String, - default: undefined, - arg: 'google-analytics-key', - env: 'GOOGLE_ANALYTICS_KEY', - }, - }, - content: { - branches: { - doc: 'The default branch pattern to use when no specific pattern is provided.', - format: Array, - default: ['HEAD', 'v*'], - }, - edit_url: { - doc: 'The default edit URL setting when no specific setting is provided.', - format: 'boolean-or-string', - default: true, - }, - sources: { - doc: 'The list of git repositories + branch patterns to use.', - format: Array, - default: [], - }, - tags: { - doc: 'The default tag pattern to use when no specific pattern is provided.', - format: Array, - default: undefined, - }, - }, - ui: { - bundle: { - url: { - doc: 'The URL of the UI bundle. Can be a path on the local filesystem.', - format: String, - arg: 'ui-bundle-url', - default: null, - }, - snapshot: { - doc: 'Whether the bundle URL points to a snapshot that changes over time.', - format: Boolean, - default: false, - }, - start_path: { - doc: 'The relative path inside the bundle from which to start reading files.', - format: String, - default: '', - }, - }, - output_dir: { - doc: 'The output directory path relative to the site root where the UI files should be written.', - format: String, - default: '_', - }, - default_layout: { - doc: 'The default layout to apply to pages that do not specify a layout.', - format: String, - default: undefined, - }, - supplemental_files: { - doc: 'Supplemental file list or a directory of files to append to the UI bundle.', - format: 'dir-or-virtual-files', - default: undefined, - }, - }, - asciidoc: { - attributes: { - doc: 'A document attribute to set on each page. May be specified multiple times.', - format: 'map', - default: {}, - arg: 'attribute', - }, - extensions: { - doc: 'A list of require paths for registering extensions per instance of the AsciiDoc processor.', - format: Array, - default: [], - }, - sourcemap: { - doc: 'Enables the sourcemap option on the AsciiDoc processor, which adds file and line information to blocks.', - format: Boolean, - default: false, - arg: 'asciidoc-sourcemap', - }, - }, - git: { - credentials: { - path: { - doc: 'The path to a git credentials file matching the format used by git-credential-store.', - format: String, - default: undefined, - arg: 'git-credentials-path', - env: 'GIT_CREDENTIALS_PATH', - }, - contents: { - doc: 'The git credentials data matching the format used by git-credentials-store (optionally comma-separated).', - format: String, - default: undefined, - env: 'GIT_CREDENTIALS', - }, - }, - ensure_git_suffix: { - doc: 'Instructs the git client to automatically append .git to the repository URL if absent.', - format: Boolean, - default: true, - }, - }, - network: { - http_proxy: { - doc: 'The URL of the proxy to use for HTTP URLs.', - format: 'url', - default: undefined, - arg: 'http-proxy', - env: 'http_proxy', - }, - https_proxy: { - doc: 'The URL of the proxy to use for HTTPS URLs.', - format: 'url', - default: undefined, - arg: 'https-proxy', - env: 'https_proxy', - }, - no_proxy: { - doc: 'A comma-separated list of domains and IPs that should not be proxied.', - format: String, - default: undefined, - arg: 'noproxy', - env: 'no_proxy', - }, - }, - runtime: { - cache_dir: { - doc: 'The cache directory. (default: antora folder under cache dir for current user)', - format: String, - default: undefined, - arg: 'cache-dir', - env: 'ANTORA_CACHE_DIR', - }, - fetch: { - doc: 'Download updates from remote resources. Includes content repositories and the UI bundle.', - format: Boolean, - default: false, - arg: 'fetch', - }, - quiet: { - doc: 'Do not write any messages to stdout.', - format: Boolean, - default: false, - arg: 'quiet', - }, - silent: { - doc: 'Suppress all messages.', - format: Boolean, - default: false, - arg: 'silent', - }, - log: { - level: { - doc: 'Set the minimum log level of messages that get logged.', - format: ['all', 'debug', 'info', 'warn', 'error', 'fatal', 'silent'], - default: 'warn', - arg: 'log-level', - env: 'ANTORA_LOG_LEVEL', - }, - level_format: { - doc: 'Set the format to use for the log level in structured log messages.', - format: ['number', 'label'], - default: 'label', - arg: 'log-level-format', - env: 'ANTORA_LOG_LEVEL_FORMAT', - }, - failure_level: { - doc: 'Set the log level tolerance that, when exceeded, will cause the application to fail on exit.', - format: ['warn', 'error', 'fatal', 'none'], - default: 'fatal', - arg: 'log-failure-level', - env: 'ANTORA_LOG_FAILURE_LEVEL', - }, - format: new Proxy( - { - doc: 'Set the format of log messages. Defaults to json if CI=true, pretty otherwise.', - format: ['json', 'pretty'], - default: undefined, - arg: 'log-format', - env: 'ANTORA_LOG_FORMAT', - }, - { - get (target, property) { - if (property !== 'default') return target[property] - return process.env.CI === 'true' || process.env.NODE_ENV === 'test' ? 'json' : 'pretty' - }, - } - ), - destination: { - file: { - doc: 'Write log messages to this file or stream. Defaults to stderr if format is pretty, stdout otherwise.', - format: String, - default: undefined, - arg: 'log-file', - env: 'ANTORA_LOG_FILE', - }, - append: { - doc: 'Whether to append messages to the log file if it already exists.', - format: Boolean, - default: true, - }, - buffer_size: { - doc: 'The size of the log buffer that must be exceeded before writing a chunk to the destination.', - format: Number, - default: 0, - }, - sync: { - doc: 'Whether to immediately flush messages to the destination when the buffer size is exceeded.', - format: Boolean, - default: true, - }, - }, - }, - }, - urls: { - html_extension_style: { - doc: 'The user-facing URL extension to use for HTML pages.', - format: ['default', 'drop', 'indexify'], - default: 'default', - arg: 'html-url-extension-style', - }, - latest_version_segment_strategy: { - doc: 'The strategy to use for cloaking the latest version or prerelease version segment in the URL.', - format: ['replace', 'redirect:to', 'redirect:from'], - default: undefined, - }, - latest_prerelease_version_segment: { - doc: 'The value to use instead of the latest prerelease version segment in the URL.', - format: String, - default: undefined, - }, - latest_version_segment: { - doc: 'The value to use instead of the latest version segment in the URL.', - format: String, - default: undefined, - }, - redirect_facility: { - doc: 'The facility for handling page alias and start page redirections.', - format: ['disabled', 'httpd', 'netlify', 'nginx', 'static'], - default: 'static', - arg: 'redirect-facility', - }, - }, - output: { - clean: { - doc: 'Remove destination path before publishing (fs only).', - format: Boolean, - default: false, - arg: 'clean', - }, - dir: { - doc: 'The directory where the site should be published. (default: build/site)', - format: String, - default: undefined, - arg: 'to-dir', - }, - destinations: { - doc: 'A list of destinations where the generated site should be published.', - format: Array, - default: undefined, - }, - }, -} diff --git a/node_modules/@antora/playbook-builder/lib/index.js b/node_modules/@antora/playbook-builder/lib/index.js deleted file mode 100644 index ff37416c..00000000 --- a/node_modules/@antora/playbook-builder/lib/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -/** - * Playbook Builder component for Antora - * - * Builds a configuration object called a playbook from user input. The playbook - * is used for configuring successive documentation components in Antora. - * - * @namespace playbook-builder - */ -module.exports = require('./build-playbook') diff --git a/node_modules/@antora/playbook-builder/lib/solitary-convict.js b/node_modules/@antora/playbook-builder/lib/solitary-convict.js deleted file mode 100644 index a6a387e4..00000000 --- a/node_modules/@antora/playbook-builder/lib/solitary-convict.js +++ /dev/null @@ -1,137 +0,0 @@ -'use strict' - -const convict = require('convict') -const json = require('json5') -const toml = require('@iarna/toml') -const yaml = require('js-yaml') - -const ARGS_SCANNER_RX = /(?:([^=,]+)|(?==))(?:,|$|=(|("|').*?\3|[^,]+)(?:,|$))/g -const PRIMITIVE_TYPES = [Boolean, Number, String] - -/** - * A convict function wrapper that registers custom formats and parsers and - * isolates the configuration from the process environment by default. - */ -function solitaryConvict (schema, opts) { - registerFormats(convict) - registerParsers(convict) - return convict(schema, opts || { args: [], env: {} }) -} - -function registerParsers (convict) { - convict.addParser([ - { extension: 'json', parse: json.parse }, - { extension: 'toml', parse: toml.parse }, - { extension: 'yaml', parse: yaml.load }, - { extension: 'yml', parse: yaml.load }, - { - extension: '*', - parse: () => { - throw new Error('Unexpected playbook file type (must be yml, json, or toml') - }, - }, - ]) -} - -function registerFormats (convict) { - convict.addFormat({ - name: 'map', - validate: (val) => { - if (!(val == null || val.constructor === Object)) throw new Error('must be a map (i.e., key/value pairs)') - }, - coerce: (val, config, name) => { - if (config == null) return val - const accum = config.has(name) ? config.get(name) : {} - let match - ARGS_SCANNER_RX.lastIndex = 0 - while ((match = ARGS_SCANNER_RX.exec(val))) { - const [, k, v] = match - if (k) accum[k] = v ? (v === '-' ? '-' : yaml.load(v)) : '' - } - return accum - }, - }) - convict.addFormat({ - name: 'primitive-map', - validate: (val) => { - if (val == null) return - if ( - !( - val.constructor === Object && - Object.entries(val).every(([k, v]) => k && (!v || ~PRIMITIVE_TYPES.indexOf(v.constructor))) - ) - ) { - throw new Error('must be a primitive map (i.e., key/value pairs, primitive values only)') - } - }, - coerce: (val, config, name) => { - if (config == null) return val - const accum = config.has(name) ? config.get(name) : {} - let match - ARGS_SCANNER_RX.lastIndex = 0 - while ((match = ARGS_SCANNER_RX.exec(val))) { - const [, k, v] = match - if (k) { - let parsed - if (v && v !== '-') { - parsed = yaml.load(v) - if (parsed && PRIMITIVE_TYPES.indexOf(parsed.constructor) < 0) parsed = v - } else { - parsed = v || '' - } - accum[~k.indexOf('-') ? k.replace(/-/g, '_') : k] = parsed - } - } - return accum - }, - }) - convict.addFormat({ - name: 'boolean-or-string', - validate: (val) => { - if (!(val == null || val.constructor === String || val.constructor === Boolean)) { - throw new Error('must be a boolean or string') - } - }, - }) - convict.addFormat({ - name: 'dir-or-virtual-files', - validate: (val) => { - if (!(val == null || val.constructor === String || Array.isArray(val))) { - throw new Error('must be a directory path or list of virtual files') - } - }, - }) - convict.addFormat({ - name: 'url', - validate: (val) => { - if (val == null) return - if (val.constructor !== String) throw new Error('must be a string') - let protocol - try { - protocol = new URL(val).protocol - } catch { - throw new Error('must be a valid URL') - } - if (!(protocol === 'https:' || protocol === 'http:')) throw new Error('must be an HTTP or HTTPS URL') - }, - }) - convict.addFormat({ - name: 'url-or-pathname', - validate: (val) => { - if (val == null) return - if (val.constructor !== String) throw new Error('must be a string') - let parsedUrl - try { - parsedUrl = new URL((val.charAt() === '/' ? 'https://example.org' : '') + val) - } catch { - throw new Error('must be a valid URL or a pathname (i.e., root-relative path)') - } - if (parsedUrl.protocol !== 'https:' && parsedUrl.protocol !== 'http:') { - throw new Error('must be an HTTP or HTTPS URL or a pathname (i.e., root-relative path)') - } - if (~parsedUrl.pathname.indexOf('%20')) throw new Error('pathname segment must not contain spaces') - }, - }) -} - -module.exports = solitaryConvict diff --git a/node_modules/@antora/playbook-builder/package.json b/node_modules/@antora/playbook-builder/package.json deleted file mode 100644 index 7147001d..00000000 --- a/node_modules/@antora/playbook-builder/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_from": "@antora/playbook-builder@3.0.0-alpha.7", - "_id": "@antora/playbook-builder@3.0.0-alpha.7", - "_inBundle": false, - "_integrity": "sha512-qussIcBunzaRsPagED3IifFnWcc9okFnq+eyyN8FEF40AOyH/ZkSJvkyb//GPdfsa8rELj0BRvIrdUMiefIH/A==", - "_location": "/@antora/playbook-builder", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@antora/playbook-builder@3.0.0-alpha.7", - "name": "@antora/playbook-builder", - "escapedName": "@antora%2fplaybook-builder", - "scope": "@antora", - "rawSpec": "3.0.0-alpha.7", - "saveSpec": null, - "fetchSpec": "3.0.0-alpha.7" - }, - "_requiredBy": [ - "/@antora/cli", - "/@antora/site-generator-default" - ], - "_resolved": "https://registry.npmjs.org/@antora/playbook-builder/-/playbook-builder-3.0.0-alpha.7.tgz", - "_shasum": "f8d6b6b69e0a697352d0957f52a7632ff53822f4", - "_spec": "@antora/playbook-builder@3.0.0-alpha.7", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/cli", - "author": { - "name": "OpenDevise Inc.", - "url": "https://opendevise.com" - }, - "bugs": { - "url": "https://gitlab.com/antora/antora/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Dan Allen", - "email": "dan@opendevise.com" - }, - { - "name": "Sarah White", - "email": "sarah@opendevise.com" - }, - { - "name": "Hubert SABLONNIÈRE", - "email": "hubert.sablonniere@gmail.com" - } - ], - "dependencies": { - "@antora/logger": "3.0.0-alpha.7", - "@iarna/toml": "~2.2", - "camelcase-keys": "~6.2", - "convict": "~6.1", - "js-yaml": "~4.1", - "json5": "~2.2" - }, - "deprecated": false, - "description": "Builds a playbook object from user input for configuring successive documentation components in an Antora pipeline.", - "engines": { - "node": ">=10.17.0" - }, - "files": [ - "lib/" - ], - "gitHead": "fbd597b3680474f2083cda8a7facf1e2848c08e0", - "homepage": "https://antora.org", - "keywords": [ - "antora", - "antora-component", - "config", - "documentation", - "static site", - "web publishing" - ], - "license": "MPL-2.0", - "main": "lib/index.js", - "name": "@antora/playbook-builder", - "repository": { - "type": "git", - "url": "git+https://gitlab.com/antora/antora.git" - }, - "version": "3.0.0-alpha.7" -} diff --git a/node_modules/@antora/redirect-producer/LICENSE b/node_modules/@antora/redirect-producer/LICENSE deleted file mode 100644 index a612ad98..00000000 --- a/node_modules/@antora/redirect-producer/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/node_modules/@antora/redirect-producer/README.md b/node_modules/@antora/redirect-producer/README.md deleted file mode 100644 index 908b2053..00000000 --- a/node_modules/@antora/redirect-producer/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Antora Redirect Producer - -The redirect producer is the component in Antora responsible for producing redirects (HTTP redirections) to a given page from its registered aliases. -These redirects are derived from alias entries in the content catalog. - -This component can produce redirects using different facilities. -If the deployment environment does not offer redirect capabilities, Antora can output static HTML redirect pages (for client-side redirection). -If redirect capabilities are available in the deployment environment, such as rewrite rules in nginx, Antora can output a suitable server configuration file (for server-side redirection). - -[Antora](https://antora.org) is a modular static site generator designed for creating documentation sites from AsciiDoc documents. -Its site generator pipeline aggregates documents from versioned content repositories and processes them using [Asciidoctor](https://asciidoctor.org). - -## Copyright and License - -Copyright (C) 2017-present [OpenDevise Inc.](https://opendevise.com) and the [Antora Project](https://antora.org). - -Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0). diff --git a/node_modules/@antora/redirect-producer/lib/index.js b/node_modules/@antora/redirect-producer/lib/index.js deleted file mode 100644 index a73f6deb..00000000 --- a/node_modules/@antora/redirect-producer/lib/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict' - -/** - * Redirect Producer component for Antora - * - * Produces HTTP redirection configuration suitable for the redirect facility - * provided by the target environment (e.g., static bounce pages, nginx - * rewrite rules, mod_rewrite rules, netlify redirects file, etc.). - */ -module.exports = require('./produce-redirects') diff --git a/node_modules/@antora/redirect-producer/lib/produce-redirects.js b/node_modules/@antora/redirect-producer/lib/produce-redirects.js deleted file mode 100644 index 17ea1633..00000000 --- a/node_modules/@antora/redirect-producer/lib/produce-redirects.js +++ /dev/null @@ -1,152 +0,0 @@ -'use strict' - -const computeRelativeUrlPath = require('@antora/asciidoc-loader/lib/util/compute-relative-url-path') -const File = require('vinyl') - -const ENCODED_SPACE_RX = /%20/g - -/** - * Produces redirects (HTTP redirections) for registered page aliases. - * - * Iterates over files in the alias family from the content catalog and creates artifacts that - * handle redirects from the URL of each alias to the target URL. The artifact that is created - * depends on the redirect facility in use. If the redirect facility is static (the default), this - * function populates the contents of the alias file with an HTML redirect page (i.e., bounce page). - * If the redirect facility is nginx, this function creates and returns an nginx configuration file - * that contains rewrite rules for each alias. If the redirect facility is disabled, this function - * unpublishes the alias files by removing the out property on each alias file. - * - * @memberof redirect-producer - * - * @param {Object} playbook - The configuration object for Antora. - * @param {Object} playbook.site - Site-related configuration data. - * @param {String} playbook.site.url - The base URL of the site. - * @param {String} playbook.urls - URL-related configuration data. - * @param {String} playbook.urls.redirectFacility - The redirect facility for - * which redirect configuration is being produced. - * @param {ContentCatalog} contentCatalog - The content catalog that provides - * access to the virtual content files (i.e., pages) in the site. - * @returns {Array} An array of File objects that contain rewrite configuration for the web server. - */ -function produceRedirects (playbook, contentCatalog) { - const aliases = contentCatalog.findBy({ family: 'alias' }) - if (!aliases.length) return [] - let siteUrl = playbook.site.url - if (siteUrl) { - if (siteUrl === '/') siteUrl = '' - else if (siteUrl.charAt(siteUrl.length - 1) === '/') siteUrl = siteUrl.substr(0, siteUrl.length - 1) - } - switch (playbook.urls.redirectFacility) { - case 'httpd': - return createHttpdHtaccess(aliases, extractUrlPath(siteUrl)) - case 'netlify': - return createNetlifyRedirects( - aliases, - extractUrlPath(siteUrl), - (playbook.urls.htmlExtensionStyle || 'default') === 'default' - ) - case 'nginx': - return createNginxRewriteConf(aliases, extractUrlPath(siteUrl)) - case 'static': - return populateStaticRedirectFiles( - aliases.filter((it) => it.out), - siteUrl - ) - default: - return unpublish(aliases) - } -} - -function extractUrlPath (url) { - if (url) { - if (url.charAt() === '/') return url - const urlPath = new URL(url).pathname - return urlPath === '/' ? '' : urlPath - } else { - return '' - } -} - -function createHttpdHtaccess (files, urlPath) { - const rules = files.reduce((accum, file) => { - delete file.out - let fromUrl = file.pub.url - fromUrl = ~fromUrl.indexOf('%20') ? `'${urlPath}${fromUrl.replace(ENCODED_SPACE_RX, ' ')}'` : urlPath + fromUrl - let toUrl = file.rel.pub.url - toUrl = ~toUrl.indexOf('%20') ? `'${urlPath}${toUrl.replace(ENCODED_SPACE_RX, ' ')}'` : urlPath + toUrl - // see https://httpd.apache.org/docs/current/en/mod/mod_alias.html#redirect - // NOTE: redirect rule for directory prefix does not require trailing slash - accum.push(`Redirect ${file.pub.splat ? '302' : '301'} ${fromUrl} ${toUrl}`) - return accum - }, []) - return [new File({ contents: Buffer.from(rules.join('\n') + '\n'), out: { path: '.htaccess' } })] -} - -// NOTE: a trailing slash on the pathname will be ignored -// see https://docs.netlify.com/routing/redirects/redirect-options/#trailing-slash -// however, we keep it when generating the rules for clarity -function createNetlifyRedirects (files, urlPath, includeDirectoryRedirects = false) { - const rules = files.reduce((accum, file) => { - delete file.out - const fromUrl = urlPath + file.pub.url - const toUrl = urlPath + file.rel.pub.url - if (file.pub.splat) { - accum.push(`${fromUrl}/* ${toUrl}/:splat 302!`) - } else { - accum.push(`${fromUrl} ${toUrl} 301!`) - if (includeDirectoryRedirects && fromUrl.endsWith('/index.html')) { - accum.push(`${fromUrl.substr(0, fromUrl.length - 10)} ${toUrl} 301!`) - } - } - return accum - }, []) - return [new File({ contents: Buffer.from(rules.join('\n') + '\n'), out: { path: '_redirects' } })] -} - -function createNginxRewriteConf (files, urlPath) { - const rules = files.map((file) => { - delete file.out - let fromUrl = file.pub.url - fromUrl = ~fromUrl.indexOf('%20') ? `'${urlPath}${fromUrl.replace(ENCODED_SPACE_RX, ' ')}'` : urlPath + fromUrl - let toUrl = file.rel.pub.url - toUrl = ~toUrl.indexOf('%20') ? `'${urlPath}${toUrl.replace(ENCODED_SPACE_RX, ' ')}'` : urlPath + toUrl - if (file.pub.splat) { - return `location ^~ ${fromUrl}/ { rewrite ^${regexpEscape(fromUrl)}/(.*)$ ${regexpEscape(toUrl)}/$1 redirect; }` - } else { - return `location = ${fromUrl} { return 301 ${toUrl}; }` - } - }) - return [new File({ contents: Buffer.from(rules.join('\n') + '\n'), out: { path: '.etc/nginx/rewrite.conf' } })] -} - -function populateStaticRedirectFiles (files, siteUrl) { - files.forEach((file) => (file.contents = Buffer.from(createStaticRedirectContents(file, siteUrl) + '\n'))) - return [] -} - -function createStaticRedirectContents (file, siteUrl) { - const targetUrl = file.rel.pub.url - const relativeUrl = computeRelativeUrlPath(file.pub.url, targetUrl) - const canonicalUrl = siteUrl && siteUrl.charAt() !== '/' ? siteUrl + targetUrl : undefined - const canonicalLink = canonicalUrl ? `\n` : '' - return ` - -${canonicalLink} - - -Redirect Notice -

Redirect Notice

-

The page you requested has been relocated to ${canonicalUrl || relativeUrl}.

` -} - -function unpublish (files) { - files.forEach((file) => delete file.out) - return [] -} - -function regexpEscape (str) { - // we don't escape "-" since it's meaningless in a literal - return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') -} - -module.exports = produceRedirects diff --git a/node_modules/@antora/redirect-producer/package.json b/node_modules/@antora/redirect-producer/package.json deleted file mode 100644 index 64aaa68f..00000000 --- a/node_modules/@antora/redirect-producer/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "@antora/redirect-producer@3.0.0-alpha.7", - "_id": "@antora/redirect-producer@3.0.0-alpha.7", - "_inBundle": false, - "_integrity": "sha512-4iRjkgnt6vy32oVAqHXJuUdTs5wOPATacXejQZPzuccC9tQFCS4XXu0EGopbj7iaD9Ou0IyljYU+oasNemCmww==", - "_location": "/@antora/redirect-producer", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@antora/redirect-producer@3.0.0-alpha.7", - "name": "@antora/redirect-producer", - "escapedName": "@antora%2fredirect-producer", - "scope": "@antora", - "rawSpec": "3.0.0-alpha.7", - "saveSpec": null, - "fetchSpec": "3.0.0-alpha.7" - }, - "_requiredBy": [ - "/@antora/site-generator-default" - ], - "_resolved": "https://registry.npmjs.org/@antora/redirect-producer/-/redirect-producer-3.0.0-alpha.7.tgz", - "_shasum": "e7c4b2ab82d7d4239c1b9c245a58f7069e07ef1d", - "_spec": "@antora/redirect-producer@3.0.0-alpha.7", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/site-generator-default", - "author": { - "name": "OpenDevise Inc.", - "url": "https://opendevise.com" - }, - "bugs": { - "url": "https://gitlab.com/antora/antora/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Dan Allen", - "email": "dan@opendevise.com" - }, - { - "name": "Sarah White", - "email": "sarah@opendevise.com" - } - ], - "dependencies": { - "@antora/asciidoc-loader": "3.0.0-alpha.7", - "vinyl": "~2.2" - }, - "deprecated": false, - "description": "Produces redirects (HTTP redirections) for pages in an Antora site.", - "engines": { - "node": ">=10.17.0" - }, - "files": [ - "lib/" - ], - "gitHead": "fbd597b3680474f2083cda8a7facf1e2848c08e0", - "homepage": "https://antora.org", - "keywords": [ - "antora", - "antora-component", - "redirects", - "documentation", - "static site", - "web publishing" - ], - "license": "MPL-2.0", - "main": "lib/index.js", - "name": "@antora/redirect-producer", - "repository": { - "type": "git", - "url": "git+https://gitlab.com/antora/antora.git" - }, - "version": "3.0.0-alpha.7" -} diff --git a/node_modules/@antora/site-generator-default/LICENSE b/node_modules/@antora/site-generator-default/LICENSE deleted file mode 100644 index a612ad98..00000000 --- a/node_modules/@antora/site-generator-default/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/node_modules/@antora/site-generator-default/README.md b/node_modules/@antora/site-generator-default/README.md deleted file mode 100644 index 4015681f..00000000 --- a/node_modules/@antora/site-generator-default/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Antora Default Site Generator - -This is the default site generator pipeline for Antora. -This pipeline is invoked by the `generate` command of Antora's CLI to produce and publish static documentation sites. - -[Antora](https://antora.org) is a modular static site generator designed for creating documentation sites from AsciiDoc documents. -Its site generator pipeline aggregates documents from versioned content repositories and processes them using [Asciidoctor](https://asciidoctor.org). - -## Copyright and License - -Copyright (C) 2017-present [OpenDevise Inc.](https://opendevise.com) and the [Antora Project](https://antora.org). - -Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0). diff --git a/node_modules/@antora/site-generator-default/lib/generate-site.js b/node_modules/@antora/site-generator-default/lib/generate-site.js deleted file mode 100644 index e072fd78..00000000 --- a/node_modules/@antora/site-generator-default/lib/generate-site.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict' - -const aggregateContent = require('@antora/content-aggregator') -const buildNavigation = require('@antora/navigation-builder') -const buildPlaybook = require('@antora/playbook-builder') -const classifyContent = require('@antora/content-classifier') -const convertDocuments = require('@antora/document-converter') -const createPageComposer = require('@antora/page-composer') -const loadUi = require('@antora/ui-loader') -const mapSite = require('@antora/site-mapper') -const produceRedirects = require('@antora/redirect-producer') -const publishSite = require('@antora/site-publisher') -const { resolveAsciiDocConfig } = require('@antora/asciidoc-loader') - -async function generateSite (args, env) { - const playbook = buildPlaybook(args, env) - const asciidocConfig = resolveAsciiDocConfig(playbook) - const [contentCatalog, uiCatalog] = await Promise.all([ - aggregateContent(playbook).then((contentAggregate) => classifyContent(playbook, contentAggregate, asciidocConfig)), - loadUi(playbook), - ]) - const pages = convertDocuments(contentCatalog, asciidocConfig) - const navigationCatalog = buildNavigation(contentCatalog, asciidocConfig) - const composePage = createPageComposer(playbook, contentCatalog, uiCatalog, env) - pages.forEach((page) => composePage(page, contentCatalog, navigationCatalog)) - const siteFiles = [...mapSite(playbook, pages), ...produceRedirects(playbook, contentCatalog)] - if (playbook.site.url) siteFiles.push(composePage(create404Page())) - const siteCatalog = { getFiles: () => siteFiles } - return publishSite(playbook, [contentCatalog, uiCatalog, siteCatalog]).then((publications) => { - if (!playbook.runtime.quiet && process.stdout.isTTY) { - process.stdout.write('Site generation complete!\n') - publications.forEach( - ({ fileUri }) => fileUri && process.stdout.write(`View the site by visiting ${fileUri} in a browser.\n`) - ) - } - return publications - }) -} - -function create404Page () { - return { - title: 'Page Not Found', - mediaType: 'text/html', - src: { stem: '404' }, - out: { path: '404.html' }, - pub: { url: '/404.html', rootPath: '' }, - } -} - -module.exports = generateSite diff --git a/node_modules/@antora/site-generator-default/lib/index.js b/node_modules/@antora/site-generator-default/lib/index.js deleted file mode 100644 index bc13001e..00000000 --- a/node_modules/@antora/site-generator-default/lib/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict' - -/** - * Default Site Generator component for Antora - * - * Runs an Antora pipeline using the default set of components with a focus on - * producing and publishing a documentation site. This component represents - * just one way the Antora components can be organized into a site generation - * pipeline. - * - * @namespace site-generator-default - */ -module.exports = require('./generate-site') diff --git a/node_modules/@antora/site-generator-default/package.json b/node_modules/@antora/site-generator-default/package.json deleted file mode 100644 index 7b65ae00..00000000 --- a/node_modules/@antora/site-generator-default/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "_from": "@antora/site-generator-default@3.0.0-alpha.7", - "_id": "@antora/site-generator-default@3.0.0-alpha.7", - "_inBundle": false, - "_integrity": "sha512-Pz3wwFpc0J3kax7VTOTaFn+7mAJCa2KUNdES3o1K/7sGTuVeDYlYrE+W7Pd59ZwjWu0WPf4mIOV2ny1H5Ag1jw==", - "_location": "/@antora/site-generator-default", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@antora/site-generator-default@3.0.0-alpha.7", - "name": "@antora/site-generator-default", - "escapedName": "@antora%2fsite-generator-default", - "scope": "@antora", - "rawSpec": "3.0.0-alpha.7", - "saveSpec": null, - "fetchSpec": "3.0.0-alpha.7" - }, - "_requiredBy": [ - "#DEV:/" - ], - "_resolved": "https://registry.npmjs.org/@antora/site-generator-default/-/site-generator-default-3.0.0-alpha.7.tgz", - "_shasum": "6dcef7025596cc972e5a5e55f3ae750a1af89f6c", - "_spec": "@antora/site-generator-default@3.0.0-alpha.7", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com", - "author": { - "name": "OpenDevise Inc.", - "url": "https://opendevise.com" - }, - "bugs": { - "url": "https://gitlab.com/antora/antora/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Dan Allen", - "email": "dan@opendevise.com" - }, - { - "name": "Sarah White", - "email": "sarah@opendevise.com" - } - ], - "dependencies": { - "@antora/asciidoc-loader": "3.0.0-alpha.7", - "@antora/content-aggregator": "3.0.0-alpha.7", - "@antora/content-classifier": "3.0.0-alpha.7", - "@antora/document-converter": "3.0.0-alpha.7", - "@antora/navigation-builder": "3.0.0-alpha.7", - "@antora/page-composer": "3.0.0-alpha.7", - "@antora/playbook-builder": "3.0.0-alpha.7", - "@antora/redirect-producer": "3.0.0-alpha.7", - "@antora/site-mapper": "3.0.0-alpha.7", - "@antora/site-publisher": "3.0.0-alpha.7", - "@antora/ui-loader": "3.0.0-alpha.7" - }, - "deprecated": false, - "description": "The default site generator pipeline for producing and publishing static documentation sites with Antora.", - "engines": { - "node": ">=10.17.0" - }, - "files": [ - "lib/" - ], - "gitHead": "fbd597b3680474f2083cda8a7facf1e2848c08e0", - "homepage": "https://antora.org", - "keywords": [ - "antora", - "antora-component", - "generator", - "pipeline", - "documentation", - "static site", - "web publishing" - ], - "license": "MPL-2.0", - "main": "lib/index.js", - "name": "@antora/site-generator-default", - "repository": { - "type": "git", - "url": "git+https://gitlab.com/antora/antora.git" - }, - "version": "3.0.0-alpha.7" -} diff --git a/node_modules/@antora/site-mapper/LICENSE b/node_modules/@antora/site-mapper/LICENSE deleted file mode 100644 index a612ad98..00000000 --- a/node_modules/@antora/site-mapper/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/node_modules/@antora/site-mapper/README.md b/node_modules/@antora/site-mapper/README.md deleted file mode 100644 index fec50c80..00000000 --- a/node_modules/@antora/site-mapper/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Antora Site Mapper - -The Site Mapper is a component in Antora responsible for generating the sitemap files for the site. -These files, which are intended to be read by crawlers, provide a list of all published pages by URL. -The sitemap entries are partitioned by component into sitemap index files, which are then referenced by the main sitemap file. - -[Antora](https://antora.org) is a modular static site generator designed for creating documentation sites from AsciiDoc documents. -Its site generator pipeline aggregates documents from versioned content repositories and processes them using [Asciidoctor](https://asciidoctor.org). - -## Copyright and License - -Copyright (C) 2017-present [OpenDevise Inc.](https://opendevise.com) and the [Antora Project](https://antora.org). - -Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0). diff --git a/node_modules/@antora/site-mapper/lib/index.js b/node_modules/@antora/site-mapper/lib/index.js deleted file mode 100644 index 0fd3bc58..00000000 --- a/node_modules/@antora/site-mapper/lib/index.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -/** - * Site Mapper component for Antora - * - * Maps the site by creating sitemap files. These files, which are intended to be read by crawlers, - * provide a list of all published pages by URL. The sitemap entries are partitioned by component - * into sitemap index files, which are then referenced by the main sitemap file. - * - * @namespace site-mapper - */ -module.exports = require('./map-site') diff --git a/node_modules/@antora/site-mapper/lib/map-site.js b/node_modules/@antora/site-mapper/lib/map-site.js deleted file mode 100644 index 6ef8f265..00000000 --- a/node_modules/@antora/site-mapper/lib/map-site.js +++ /dev/null @@ -1,152 +0,0 @@ -'use strict' - -const File = require('vinyl') -const versionCompare = require('@antora/content-classifier/lib/util/version-compare-desc') - -const XML_DECL = '' -const SITEMAPS_NS = 'http://www.sitemaps.org/schemas/sitemap/0.9' -const SITEMAP_STEM = 'sitemap' -const SITEMAP_PREFIX = 'sitemap-' - -/** - * Maps the site by creating sitemap files. - * - * Iterates over the specified pages and creates sitemap files that list the - * URLs for these pages. If there's only one component, all the entries are - * added to a sitemap.xml file that gets published to the root of the site. If - * there's more than one component, the sitemaps are partitioned into separate - * files by component (e.g., sitemap-component-name.xml). The URL of those - * component sitemaps are listed in the sitemap.xml index file that gets - * published to the root of the site. - * - * The entries are listed in alphabetical order by URL. URLs with newer - * versions are listed before URLs of older versions according to the semantic - * versioning-based sorting algorithm used in Antora. - * - * The sitemaps are only created if a url for the site has been defined to - * the site.url property in the playbook. - * - * If the site.robots key is set in the playbook, this function generates a - * robots.txt file from that value. If the value matches the string 'allow' the - * function creates a robots.txt file that allows access from all user agents - * to all paths. If the value matches the string 'disallow', the function - * creates a robots.txt file that disallows access from all user agents to all - * paths. Otherwise, if the value is non-empty (i.e., a custom string), the - * function creates a robots.txt file using that value. - * - * @memberof site-mapper - * - * @param {Object} playbook - The configuration object for Antora. - * @param {Object} playbook.site - Site-related configuration data. - * @param {String} playbook.site.url - The base URL of the site. - * @param {Array} pages - The publishable pages to to map. - * @returns {Array} An array of File objects that represent the sitemaps. - */ -function mapSite (playbook, pages) { - let siteUrl = playbook.site.url - if (!(siteUrl && pages.length)) return [] - const robots = playbook.site.robots - if (siteUrl.charAt() === '/') return robots ? [createRobotsExclusionFile(robots)] : [] - if (siteUrl.charAt(siteUrl.length - 1) === '/') siteUrl = siteUrl.substr(0, siteUrl.length - 1) - const lastmodISO = new Date().toISOString() - let sitemaps = pages.reduce((accum, file) => { - const componentSitemap = getSitemapForComponent(siteUrl, accum, file.src.component) - const version = file.src.version - componentSitemap.entries.push({ - url: file.pub.url, - version, - lastmodISO, - }) - componentSitemap.versions.add(version) - return accum - }, new Map()) - sitemaps = [...sitemaps.keys()] - .sort((a, b) => a.localeCompare(b)) - .map((component) => { - const sitemap = sitemaps.get(component) - let sitemapEntries = sitemap.entries - delete sitemap.entries - sitemapEntries.sort((a, b) => a.url.localeCompare(b.url)) - if (sitemap.versions.size > 1) sitemapEntries.sort((a, b) => versionCompare(a.version, b.version)) - delete sitemap.versions - sitemapEntries = sitemapEntries.map(createUrlElement.bind(null, siteUrl)) - sitemap.contents = Buffer.from(createSitemapDocument(sitemapEntries) + '\n') - return sitemap - }) - let sitemapIndex - if (sitemaps.length > 1) { - const sitemapIndexEntries = sitemaps.map(createSitemapElement.bind(null, siteUrl)) - sitemapIndex = new File({ contents: Buffer.from(createSitemapIndexDocument(sitemapIndexEntries) + '\n') }) - sitemaps.unshift(sitemapIndex) - } else { - sitemapIndex = sitemaps[0] - } - const basename = SITEMAP_STEM + '.xml' - sitemapIndex.out = { path: basename } - sitemapIndex.pub = { url: '/' + basename } - return robots ? [...sitemaps, createRobotsExclusionFile(robots)] : sitemaps -} - -function getSitemapForComponent (siteUrl, sitemaps, component) { - if (sitemaps.has(component)) { - return sitemaps.get(component) - } else { - const basename = `${SITEMAP_PREFIX}${component}.xml` - const componentSitemap = new File({ - entries: [], - out: { path: basename }, - pub: { url: '/' + basename }, - versions: new Set(), - }) - sitemaps.set(component, componentSitemap) - return componentSitemap - } -} - -function createSitemapElement (siteUrl, sitemap) { - return ` -${siteUrl}${escapeHtml(sitemap.pub.url)} -` -} - -function createSitemapIndexDocument (entries) { - return `${XML_DECL} - -${entries.join('\n')} -` -} - -function createUrlElement (siteUrl, entry) { - return ` -${siteUrl}${escapeHtml(entry.url)} -${entry.lastmodISO} -` -} - -function createSitemapDocument (entries) { - return `${XML_DECL} - -${entries.join('\n')} -` -} - -function createRobotsExclusionFile (robots) { - if (robots === 'allow') { - robots = 'User-agent: *\nAllow: /' - } else if (robots === 'disallow') { - robots = 'User-agent: *\nDisallow: /' - } else { - robots = robots.trimRight() - } - return new File({ - out: { path: 'robots.txt' }, - pub: { url: '/robots.txt' }, - contents: Buffer.from(robots + '\n'), - }) -} - -function escapeHtml (str) { - return str.replace(/&/g, '&').replace(/=10.17.0" - }, - "files": [ - "lib/" - ], - "gitHead": "fbd597b3680474f2083cda8a7facf1e2848c08e0", - "homepage": "https://antora.org", - "keywords": [ - "antora", - "antora-component", - "sitemap", - "documentation", - "static site", - "web publishing" - ], - "license": "MPL-2.0", - "main": "lib/index.js", - "name": "@antora/site-mapper", - "repository": { - "type": "git", - "url": "git+https://gitlab.com/antora/antora.git" - }, - "version": "3.0.0-alpha.7" -} diff --git a/node_modules/@antora/site-publisher/LICENSE b/node_modules/@antora/site-publisher/LICENSE deleted file mode 100644 index a612ad98..00000000 --- a/node_modules/@antora/site-publisher/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/node_modules/@antora/site-publisher/README.md b/node_modules/@antora/site-publisher/README.md deleted file mode 100644 index 97b01680..00000000 --- a/node_modules/@antora/site-publisher/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Antora Site Publisher - -The Site Publisher is a component in Antora responsible for publishing (i.e., writing) the generated files to the destination(s) specified in the playbook. -More than one destination may be specified, and this component supports different destination types (via providers) such as a filesystem directory or an archive file. -Custom providers can be used to add support for additional destinations. - -[Antora](https://antora.org) is a modular static site generator designed for creating documentation sites from AsciiDoc documents. -Its site generator pipeline aggregates documents from versioned content repositories and processes them using [Asciidoctor](https://asciidoctor.org). - -## Copyright and License - -Copyright (C) 2017-present [OpenDevise Inc.](https://opendevise.com) and the [Antora Project](https://antora.org). - -Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0). diff --git a/node_modules/@antora/site-publisher/lib/constants.js b/node_modules/@antora/site-publisher/lib/constants.js deleted file mode 100644 index 71ec8257..00000000 --- a/node_modules/@antora/site-publisher/lib/constants.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict' - -module.exports = Object.freeze({ - DEFAULT_DEST_FS: './build/site', - DEFAULT_DEST_ARCHIVE: './build/site.zip', -}) diff --git a/node_modules/@antora/site-publisher/lib/index.js b/node_modules/@antora/site-publisher/lib/index.js deleted file mode 100644 index 46282a6c..00000000 --- a/node_modules/@antora/site-publisher/lib/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -/** - * Site Publisher component for Antora - * - * Publishes the files generated in an Antora documentation pipeline to the - * destination(s) specified in the playbook. - * - * @namespace site-publisher - */ -module.exports = require('./publish-site') diff --git a/node_modules/@antora/site-publisher/lib/providers/archive.js b/node_modules/@antora/site-publisher/lib/providers/archive.js deleted file mode 100644 index 079dee9a..00000000 --- a/node_modules/@antora/site-publisher/lib/providers/archive.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict' - -const expandPath = require('@antora/expand-path-helper') -const publishStream = require('./common/publish-stream') -const { dest: vzipDest } = require('gulp-vinyl-zip') - -const { DEFAULT_DEST_ARCHIVE } = require('../constants.js') - -// FIXME right now we're assuming the archive is a zip -function publishToArchive (config, files, playbook) { - const destFile = config.path || DEFAULT_DEST_ARCHIVE - const absDestFile = expandPath(destFile, '~+', playbook.dir || '.') - const report = { provider: 'archive', path: destFile, resolvedPath: absDestFile } - return publishStream(vzipDest(absDestFile), files).then(() => report) -} - -module.exports = publishToArchive diff --git a/node_modules/@antora/site-publisher/lib/providers/common/publish-stream.js b/node_modules/@antora/site-publisher/lib/providers/common/publish-stream.js deleted file mode 100644 index 8492cc70..00000000 --- a/node_modules/@antora/site-publisher/lib/providers/common/publish-stream.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict' - -/** - * Pipes the stream of files to the specified Vinyl destination adapter. - * - * Pipes a stream of virtual files to the specified Vinyl destination adapter - * (a stream transform function) and returns a Promise that resolves when the - * stream ends. - * - * @memberof site-publisher - * - * @param {Function} destAdapter - A Vinyl destination adapter, preconfigured to - * write to a destination (e.g., `require('vinyl-fs').dest('path/to/dir')`). - * @param {Readable} files - A Readable stream of virtual files to publish. - * @returns {Promise} A promise that resolves when the stream has ended. - */ -function publishStream (destAdapter, files) { - return new Promise((resolve, reject) => - files - .pipe(destAdapter) - .on('error', reject) - .on('end', resolve) - ) -} - -module.exports = publishStream diff --git a/node_modules/@antora/site-publisher/lib/providers/fs.js b/node_modules/@antora/site-publisher/lib/providers/fs.js deleted file mode 100644 index 0c290528..00000000 --- a/node_modules/@antora/site-publisher/lib/providers/fs.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict' - -const expandPath = require('@antora/expand-path-helper') -const { promises: fsp } = require('fs') -const ospath = require('path') -const posixify = ospath.sep === '\\' ? (p) => p.replace(/\\/g, '/') : undefined -const publishStream = require('./common/publish-stream') -const { dest: vfsDest } = require('vinyl-fs') - -const { DEFAULT_DEST_FS } = require('../constants.js') - -function publishToFs (config, files, playbook) { - const destDir = config.path || DEFAULT_DEST_FS - const absDestDir = expandPath(destDir, '~+', playbook.dir || '.') - const report = { - provider: 'fs', - path: destDir, - resolvedPath: absDestDir, - fileUri: 'file://' + (posixify ? '/' + posixify(absDestDir) : absDestDir), - } - return config.clean - ? rmdir(absDestDir) - .then(() => publishStream(vfsDest(absDestDir), files)) - .then(() => report) - : publishStream(vfsDest(absDestDir), files).then(() => report) -} - -/** - * Removes the specified directory (including all of its contents) or file. - * Equivalent to fs.promises.rmdir(dir, { recursive: true }) in Node 12. - */ -function rmdir (dir) { - return fsp - .readdir(dir, { withFileTypes: true }) - .then((lst) => - Promise.all( - lst.map((it) => - it.isDirectory() - ? rmdir(ospath.join(dir, it.name)) - : fsp.unlink(ospath.join(dir, it.name)).catch((unlinkErr) => { - if (unlinkErr.code !== 'ENOENT') throw unlinkErr - }) - ) - ) - ) - .then(() => fsp.rmdir(dir)) - .catch((err) => { - if (err.code === 'ENOENT') return - if (err.code === 'ENOTDIR') { - return fsp.unlink(dir).catch((unlinkErr) => { - if (unlinkErr.code !== 'ENOENT') throw unlinkErr - }) - } - throw err - }) -} - -module.exports = publishToFs diff --git a/node_modules/@antora/site-publisher/lib/publish-site.js b/node_modules/@antora/site-publisher/lib/publish-site.js deleted file mode 100644 index 3825a8fe..00000000 --- a/node_modules/@antora/site-publisher/lib/publish-site.js +++ /dev/null @@ -1,99 +0,0 @@ -'use strict' - -const ReadableOutputFileArray = require('./readable-output-file-array') -const requireProvider = require('./require-provider')() - -const { DEFAULT_DEST_FS } = require('./constants.js') - -/** - * Publishes all publishable files in the specified catalogs using the - * destination providers specified in the playbook. - * - * This function starts by retrieving all publishable files from the specified - * collection of catalogs (currently those files with an out property). It then - * resolves the publish function for each destination provider specified in the - * playbook (i.e., `output.destinations`). If the provider is not known, the - * publish function for that provider is resolved by requiring a module (or - * relative path) having the same name as the provider. Once the publish - * function is resolved, the configuration specified in the playbook for that - * provider is bound to the function as its first argument. This function then - * iterates over all publish providers and passes a Readable of the publishable - * files as the second argument and the playbook as the third. The path of each - * file has been updated to match the `out.path` value (currently by - * instantiating a copy of the file). - * - * If a directory is specified directly on the output property of the playbook - * (i.e., `output.dir`), that directory is used to create or override the first - * fs provider in the list of destinations. If the clean property is set directly - * on the output property of the playbook (i.e., `output.clean`), the clean - * property is added to the configuration for each provider. - * - * @memberof site-publisher - * - * @param {Object} playbook - The configuration object for Antora that provides - * access to the output destinations. - * @param {Array} catalogs - The collection of catalogs from which to retrieve the - * publishable virtual files. - * @returns Nothing. - */ -// QUESTION should this function return a report of virtual files that were published (by provider) -async function publishSite (playbook, catalogs) { - const output = playbook.output - const destinations = getDestinations(output) - - if (!destinations.length) return [] - - const clean = output.clean - const publishers = destinations.map((destination) => { - const { provider, options } = resolveDestination(destination, clean) - switch (provider) { - case 'archive': - case 'fs': - return require('./providers/' + provider).bind(null, options) - default: - try { - return requireProvider(provider, playbook.dir || '.').bind(null, options) - } catch { - throw new Error('Unsupported destination provider: ' + provider) - } - } - }) - - // Q: add getPublishableFiles / getOutFiles; return a stream? or getOutFilesAsStream? - const filesToPublish = catalogs.reduce((accum, catalog) => { - // remove fallback check for getFiles on site catalog in Antora 4 - accum.push(...(catalog.getFiles || catalog.getAll).apply(catalog).filter((file) => file.out)) - return accum - }, []) - - return Promise.all(publishers.map((publish) => publish(new ReadableOutputFileArray(filesToPublish), playbook))) -} - -function getDestinations (output) { - let destinations = output.destinations - if (output.dir) { - if (destinations && destinations.length) { - destinations = destinations.slice(0) - const primaryFsDestIdx = destinations.findIndex(({ provider: candidate }) => candidate === 'fs') - if (~primaryFsDestIdx) { - ;(destinations[primaryFsDestIdx] = Object.assign({}, destinations[primaryFsDestIdx])).path = output.dir - } else { - destinations.unshift({ provider: 'fs', path: output.dir }) - } - } else { - destinations = [{ provider: 'fs', path: output.dir }] - } - } else if (!destinations) { - destinations = [{ provider: 'fs', path: DEFAULT_DEST_FS }] - } - - return destinations -} - -function resolveDestination (destination, clean) { - const { provider, ...options } = destination - if (clean) options.clean = true - return { provider, options } -} - -module.exports = publishSite diff --git a/node_modules/@antora/site-publisher/lib/readable-output-file-array.js b/node_modules/@antora/site-publisher/lib/readable-output-file-array.js deleted file mode 100644 index ddb81ee0..00000000 --- a/node_modules/@antora/site-publisher/lib/readable-output-file-array.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict' - -const { Readable } = require('stream') -const Vinyl = require('vinyl') - -class File extends Vinyl { - get relative () { - return this.path - } -} - -class ReadableOutputFileArray extends Readable { - constructor (array) { - super({ objectMode: true }) - this.array = array.slice(0) - } - - _read (size) { - const read = this.array.splice(0, size) - while (read.length) this.push(toOutputFile(read.shift())) - if (!this.array.length) this.push(null) - } -} - -function toOutputFile (file) { - // Q: do we also need to clone contents and stat? - return new File({ contents: file.contents, path: file.out.path, stat: file.stat }) -} - -module.exports = ReadableOutputFileArray diff --git a/node_modules/@antora/site-publisher/lib/require-provider.js b/node_modules/@antora/site-publisher/lib/require-provider.js deleted file mode 100644 index 9369664e..00000000 --- a/node_modules/@antora/site-publisher/lib/require-provider.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict' - -const ospath = require('path') - -const DOT_RELATIVE_RX = new RegExp(`^\\.{1,2}[/${ospath.sep.replace('/', '').replace('\\', '\\\\')}]`) - -/** - * Generates a function to resolve and require a custom provider. - * - * @memberof site-publisher - * - * @returns {Function} A function to require a provider. - */ -function createRequireProvider () { - const requestCache = new Map() - /** - * Requires a provider, first resolving the path if necessary. - * - * If the request is an absolute path, that value is used as is. If the - * request begins with a dot (.), the value is resolved relative to the - * specified base directory. Otherwise, the request is resolved as the name - * of a node module, a search which includes the node_modules folder in the - * specified base directory. The resolved value is then passed to the require - * function and the result returned. - * - * @param {String} request - The path or module name to resolve. - * @param {String} requireBase - The absolute path from which to resolve a - * relative path or module name. - * - * @returns {Object} The object returned by calling require on the resolved path. - */ - return function requireProvider (request, requireBase) { - let resolved = requestCache.get(request) - if (!resolved) { - if (request.charAt() === '.' && DOT_RELATIVE_RX.test(request)) { - resolved = ospath.resolve(requireBase, request) - } else if (ospath.isAbsolute(request)) { - resolved = request - } else { - // NOTE appending node_modules prevents require from looking elsewhere before looking in these paths - const paths = [requireBase, ospath.dirname(__dirname)].map((start) => ospath.join(start, 'node_modules')) - resolved = require.resolve(request, { paths }) - } - requestCache.set(request, resolved) - } - - return require(resolved) - } -} - -module.exports = createRequireProvider diff --git a/node_modules/@antora/site-publisher/package.json b/node_modules/@antora/site-publisher/package.json deleted file mode 100644 index d6d3661a..00000000 --- a/node_modules/@antora/site-publisher/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "@antora/site-publisher@3.0.0-alpha.7", - "_id": "@antora/site-publisher@3.0.0-alpha.7", - "_inBundle": false, - "_integrity": "sha512-ia2YzE+L00mWtXbDt59Azcvo+4ZM97wiorsxeSBGjT7tFKqO0+BJiZfTwIvEyNPNar7tDvDQj7j996S57DN83A==", - "_location": "/@antora/site-publisher", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@antora/site-publisher@3.0.0-alpha.7", - "name": "@antora/site-publisher", - "escapedName": "@antora%2fsite-publisher", - "scope": "@antora", - "rawSpec": "3.0.0-alpha.7", - "saveSpec": null, - "fetchSpec": "3.0.0-alpha.7" - }, - "_requiredBy": [ - "/@antora/site-generator-default" - ], - "_resolved": "https://registry.npmjs.org/@antora/site-publisher/-/site-publisher-3.0.0-alpha.7.tgz", - "_shasum": "a28e7e1558250c339ebe06429146b3e9917f84d5", - "_spec": "@antora/site-publisher@3.0.0-alpha.7", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/site-generator-default", - "author": { - "name": "OpenDevise Inc.", - "url": "https://opendevise.com" - }, - "bugs": { - "url": "https://gitlab.com/antora/antora/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Dan Allen", - "email": "dan@opendevise.com" - }, - { - "name": "Sarah White", - "email": "sarah@opendevise.com" - } - ], - "dependencies": { - "@antora/expand-path-helper": "~1.0", - "gulp-vinyl-zip": "~2.2", - "vinyl": "~2.2", - "vinyl-fs": "~3.0" - }, - "deprecated": false, - "description": "Publishes the files generated in an Antora documentation pipeline to the destination(s) specified in the playbook.", - "engines": { - "node": ">=10.17.0" - }, - "files": [ - "lib/" - ], - "gitHead": "fbd597b3680474f2083cda8a7facf1e2848c08e0", - "homepage": "https://antora.org", - "keywords": [ - "antora", - "antora-component", - "publisher", - "documentation", - "static site", - "web publishing" - ], - "license": "MPL-2.0", - "main": "lib/index.js", - "name": "@antora/site-publisher", - "repository": { - "type": "git", - "url": "git+https://gitlab.com/antora/antora.git" - }, - "version": "3.0.0-alpha.7" -} diff --git a/node_modules/@antora/ui-loader/LICENSE b/node_modules/@antora/ui-loader/LICENSE deleted file mode 100644 index a612ad98..00000000 --- a/node_modules/@antora/ui-loader/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/node_modules/@antora/ui-loader/README.md b/node_modules/@antora/ui-loader/README.md deleted file mode 100644 index bd4ec99e..00000000 --- a/node_modules/@antora/ui-loader/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Antora UI Loader - -The UI Loader is a component in Antora responsible for downloading and caching the UI bundle, then extracting and loading the files from that bundle into a UI catalog. -The UI files are combined with the content files at the end of the Antora documentation pipeline to produce a complete site. - -[Antora](https://antora.org) is a modular static site generator designed for creating documentation sites from AsciiDoc documents. -Its site generator pipeline aggregates documents from versioned content repositories and processes them using [Asciidoctor](https://asciidoctor.org). - -## Copyright and License - -Copyright (C) 2017-present [OpenDevise Inc.](https://opendevise.com) and the [Antora Project](https://antora.org). - -Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0). diff --git a/node_modules/@antora/ui-loader/lib/constants.js b/node_modules/@antora/ui-loader/lib/constants.js deleted file mode 100644 index 09ca453f..00000000 --- a/node_modules/@antora/ui-loader/lib/constants.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -module.exports = Object.freeze({ - SUPPLEMENTAL_FILES_GLOB: '**/*', - UI_CACHE_FOLDER: 'ui', - UI_DESC_FILENAME: 'ui.yml', -}) diff --git a/node_modules/@antora/ui-loader/lib/file.js b/node_modules/@antora/ui-loader/lib/file.js deleted file mode 100644 index 8302c039..00000000 --- a/node_modules/@antora/ui-loader/lib/file.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict' - -const { Readable } = require('stream') -const { Stats } = require('fs') -const Vinyl = require('vinyl') - -const DEFAULT_FILE_MODE = 0o100666 & ~process.umask() - -class File extends Vinyl { - get path () { - return this.history[this.history.length - 1] - } - - set path (path_) { - this.history.push(path_) - } - - get relative () { - return this.history[this.history.length - 1] - } -} - -class MemoryFile extends File { - constructor (file) { - const contents = file.contents || Buffer.alloc(0) - const stat = Object.assign(new Stats(), { mode: DEFAULT_FILE_MODE, mtime: undefined, size: contents.length }) - super(Object.assign({}, file, { contents, stat })) - } -} - -class ReadableFile extends Readable { - constructor (file) { - super({ objectMode: true }) - this._file = file - } - - _read () { - this.push(this._file) - this._file = null - } -} - -module.exports = { File, MemoryFile, ReadableFile } diff --git a/node_modules/@antora/ui-loader/lib/index.js b/node_modules/@antora/ui-loader/lib/index.js deleted file mode 100644 index bc170fda..00000000 --- a/node_modules/@antora/ui-loader/lib/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -/** - * UI Loader component for Antora - * - * Loads the UI files from the specified bundle and makes them available - * through the UiCatalog. - * - * @namespace ui-loader - */ -module.exports = require('./load-ui') diff --git a/node_modules/@antora/ui-loader/lib/load-ui.js b/node_modules/@antora/ui-loader/lib/load-ui.js deleted file mode 100644 index 299e03ab..00000000 --- a/node_modules/@antora/ui-loader/lib/load-ui.js +++ /dev/null @@ -1,378 +0,0 @@ -'use strict' - -const camelCaseKeys = require('camelcase-keys') -const concat = require('simple-concat') -const { createHash } = require('crypto') -const expandPath = require('@antora/expand-path-helper') -const { File, MemoryFile, ReadableFile } = require('./file') -const { promises: fsp } = require('fs') -const { concat: get } = require('simple-get') -const getCacheDir = require('cache-directory') -const minimatchAll = require('minimatch-all') -const ospath = require('path') -const { posix: path } = ospath -const posixify = ospath.sep === '\\' ? (p) => p.replace(/\\/g, '/') : undefined -const { Transform } = require('stream') -const map = (transform, flush = undefined) => new Transform({ objectMode: true, transform, flush }) -const UiCatalog = require('./ui-catalog') -const yaml = require('js-yaml') -const vfs = require('vinyl-fs') -const vzip = require('gulp-vinyl-zip') - -const { UI_CACHE_FOLDER, UI_DESC_FILENAME, SUPPLEMENTAL_FILES_GLOB } = require('./constants') -const URI_SCHEME_RX = /^https?:\/\// -const EXT_RX = /\.[a-z]{2,3}$/ - -/** - * Loads the files in the specified UI bundle (zip archive) into a UiCatalog, - * first downloading the bundle if necessary. - * - * Looks for UI bundle at the path specified in the ui.bundle.url property of - * the playbook. If the path is a URI, it downloads the file and caches it at a - * unique path to avoid this step in future calls. It then reads all the files - * from the bundle into memory, skipping any files that fall outside of the - * start path specified in the ui.startPath property of the playbook. Finally, - * it classifies the files and adds them to a UiCatalog, which is then - * returned. - * - * @memberof ui-loader - * @param {Object} playbook - The configuration object for Antora. - * @param {Object} playbook.dir - The working directory of the playbook. - * @param {Object} playbook.runtime - The runtime configuration object for Antora. - * @param {String} [playbook.runtime.cacheDir=undefined] - The base cache directory. - * @param {Boolean} [playbook.runtime.fetch=false] - Forces the bundle to be - * retrieved if configured as a snapshot. - * @param {Object} playbook.network - The network configuration object for Antora. - * @param {String} [playbook.network.httpProxy=undefined] - The URL of the proxy to use for HTTP URLs. - * @param {String} [playbook.network.httpsProxy=undefined] - The URL of the proxy to use for HTTPS URLs. - * @param {String} [playbook.network.noProxy=undefined] - The list of domains and IPs that should not be proxied. - * @param {Object} playbook.ui - The UI configuration object for Antora. - * @param {String} playbook.ui.bundle - The UI bundle configuration. - * @param {String} playbook.ui.bundle.url - The path (relative or absolute) or URI - * of the UI bundle to use. - * @param {String} [playbook.ui.bundle.startPath=''] - The path inside the bundle from - * which to start reading files. - * @param {Boolean} [playbook.ui.bundle.snapshot=false] - Whether to treat the - * bundle URL as a snapshot (i.e., retrieve again if playbook.runtime.fetch is - * true). - * @param {Array} [playbook.ui.supplementalFiles=undefined] - An array of - * additional files to overlay onto the files from the UI bundle. - * @param {String} [playbook.ui.outputDir='_'] - The path relative to the site root - * where the UI files should be published. - * - * @returns {UiCatalog} A catalog of UI files which were read from the bundle. - */ -async function loadUi (playbook) { - const startDir = playbook.dir || '.' - const { bundle, supplementalFiles: supplementalFilesSpec, outputDir } = playbook.ui - const bundleUrl = bundle.url - let resolveBundle - if (isUrl(bundleUrl)) { - const { cacheDir, fetch } = playbook.runtime || {} - resolveBundle = ensureCacheDir(cacheDir, startDir).then((absCacheDir) => { - const cachePath = ospath.join(absCacheDir, `${sha1(bundleUrl)}.zip`) - return fetch && bundle.snapshot - ? downloadBundle(bundleUrl, cachePath, createAgent(bundleUrl, playbook.network || {})) - : fsp - .stat(cachePath) - .then((stat) => new File({ path: cachePath, stat })) - .catch(() => downloadBundle(bundleUrl, cachePath, createAgent(bundleUrl, playbook.network || {}))) - }) - } else { - const localPath = expandPath(bundleUrl, '~+', startDir) - resolveBundle = fsp - .stat(localPath) - .then((stat) => new File({ path: localPath, stat })) - .catch(() => { - throw new Error( - `Specified UI ${path.extname(localPath) ? 'bundle' : 'directory'} does not exist: ` + - (bundleUrl === localPath ? bundleUrl : `${localPath} (resolved from url: ${bundleUrl})`) - ) - }) - } - const files = await Promise.all([ - resolveBundle.then((bundleFile) => - new Promise((resolve, reject) => - bundleFile.isDirectory() - ? vfs - .src('**/*', { cwd: bundleFile.path, removeBOM: false }) - .on('error', reject) - .pipe(relativizeFiles()) - .pipe(collectFiles(resolve)) - : vzip - .src(bundleFile.path) - .on('error', (err) => reject(Object.assign(err, { message: `not a valid zip file; ${err.message}` }))) - .pipe(selectFilesStartingFrom(bundle.startPath)) - .pipe(bufferizeContents()) - .on('error', reject) - .pipe(collectFiles(resolve)) - ).catch((err) => { - const wrapped = new Error( - `Failed to read UI ${bundleFile.isDirectory() ? 'directory' : 'bundle'}: ` + - (bundleUrl === bundleFile.path ? bundleUrl : `${bundleFile.path} (resolved from url: ${bundleUrl})`) - ) - wrapped.stack += '\nCaused by: ' + (err.stack || 'unknown') - throw wrapped - }) - ), - srcSupplementalFiles(supplementalFilesSpec, startDir), - ]).then(([bundleFiles, supplementalFiles]) => mergeFiles(bundleFiles, supplementalFiles)) - const config = loadConfig(files, outputDir) - const catalog = new UiCatalog() - files.forEach((file) => classifyFile(file, config) && catalog.addFile(file)) - return catalog -} - -function isUrl (string) { - return ~string.indexOf('://') && URI_SCHEME_RX.test(string) -} - -function sha1 (string) { - const shasum = createHash('sha1') - shasum.update(string) - return shasum.digest('hex') -} - -/** - * Resolves the content cache directory and ensures it exists. - * - * @param {String} customCacheDir - The custom base cache directory. If the value is undefined, - * the user's cache folder is used. - * @param {String} startDir - The directory from which to resolve a leading '.' segment. - * - * @returns {Promise} A promise that resolves to the absolute ui cache directory. - */ -function ensureCacheDir (customCacheDir, startDir) { - // QUESTION should fallback directory be relative to cwd, playbook dir, or tmpdir? - const baseCacheDir = - customCacheDir == null - ? getCacheDir('antora' + (process.env.NODE_ENV === 'test' ? '-test' : '')) || ospath.resolve('.antora/cache') - : expandPath(customCacheDir, '~+', startDir) - const cacheDir = ospath.join(baseCacheDir, UI_CACHE_FOLDER) - return fsp - .mkdir(cacheDir, { recursive: true }) - .then(() => cacheDir) - .catch((err) => { - throw Object.assign(err, { message: `Failed to create UI cache directory: ${cacheDir}; ${err.message}` }) - }) -} - -function createAgent (url, { httpProxy, httpsProxy, noProxy }) { - if (httpsProxy || httpProxy) { - const { HttpProxyAgent, HttpsProxyAgent } = require('hpagent') - const proxy = url.startsWith('https:') - ? { ProxyAgent: HttpsProxyAgent, url: httpsProxy } - : { ProxyAgent: HttpProxyAgent, url: httpProxy } - if (proxy.url && require('should-proxy')(url, { no_proxy: noProxy })) { - // see https://github.com/delvedor/hpagent/issues/18 - const { protocol, hostname, port, username, password } = new URL(proxy.url) - const proxyUrl = { protocol, hostname, port, username: username || null, password: password || null } - return new proxy.ProxyAgent({ proxy: proxyUrl }) - } - } -} - -function downloadBundle (url, to, agent) { - return new Promise((resolve, reject) => { - get({ url, agent }, (err, response, contents) => { - if (err) reject(err) - if (response.statusCode !== 200) { - const message = `Response code ${response.statusCode} (${response.statusMessage})` - return reject(Object.assign(new Error(message), { name: 'HTTPError' })) - } - new ReadableFile(new MemoryFile({ path: ospath.basename(to), contents })) - .pipe(vzip.src()) - .on('error', (err) => - reject(Object.assign(err, { message: `not a valid zip file; ${err.message}`, summary: 'Invalid UI bundle' })) - ) - .on('finish', function () { - fsp - .mkdir(ospath.dirname(to), { recursive: true }) - .then(() => fsp.writeFile(to, contents)) - .then(() => resolve(new File({ path: to, stat: { isDirectory: () => false } }))) - }) - }) - }).catch((err) => { - const wrapped = new Error(`${err.summary || 'Failed to download UI bundle'}: ${url}`) - wrapped.stack += '\nCaused by: ' + (err.stack || 'unknown') - throw wrapped - }) -} - -function selectFilesStartingFrom (startPath) { - if (!startPath || (startPath = path.join('/', startPath + '/')) === '/') { - return map((file, _, next) => { - if (file.isNull()) { - next() - } else { - next( - null, - new File({ path: posixify ? posixify(file.path) : file.path, contents: file.contents, stat: file.stat }) - ) - } - }) - } else { - startPath = startPath.substr(1) - const startPathOffset = startPath.length - return map((file, _, next) => { - if (file.isNull()) { - next() - } else { - const path_ = posixify ? posixify(file.path) : file.path - if (path_.length > startPathOffset && path_.startsWith(startPath)) { - next(null, new File({ path: path_.substr(startPathOffset), contents: file.contents, stat: file.stat })) - } else { - next() - } - } - }) - } -} - -function bufferizeContents () { - return map((file, _, next) => { - // NOTE gulp-vinyl-zip automatically converts the contents of an empty file to a Buffer - if (file.isStream()) { - concat(file.contents, (err, contents) => { - if (err) return next(err) - file.stat.size = (file.contents = contents).length - next(null, file) - }) - } else { - file.stat.size = file.contents.length - next(null, file) - } - }) -} - -function collectFiles (done) { - const files = new Map() - return map( - (file, _, next) => { - files.set(file.path, file) - next() - }, - () => done(files) - ) -} - -function srcSupplementalFiles (filesSpec, startDir) { - if (!filesSpec) { - return new Map() - } else if (Array.isArray(filesSpec)) { - return Promise.all( - filesSpec.reduce((accum, { path: path_, contents: contents_ }) => { - if (!path_) { - return accum - } else if (contents_) { - if (~contents_.indexOf('\n') || !EXT_RX.test(contents_)) { - accum.push(new MemoryFile({ path: path_, contents: Buffer.from(contents_) })) - } else { - contents_ = expandPath(contents_, '~+', startDir) - accum.push( - fsp - .stat(contents_) - .then((stat) => fsp.readFile(contents_).then((contents) => new File({ path: path_, contents, stat }))) - ) - } - } else { - accum.push(new MemoryFile({ path: path_ })) - } - return accum - }, []) - ).then((files) => files.reduce((accum, file) => accum.set(file.path, file) && accum, new Map())) - } else { - const cwd = expandPath(filesSpec, '~+', startDir) - return fsp - .access(cwd) - .then( - () => - new Promise((resolve, reject) => - vfs - .src(SUPPLEMENTAL_FILES_GLOB, { cwd, dot: true, removeBOM: false }) - .on('error', reject) - .pipe(relativizeFiles()) - .pipe(collectFiles(resolve)) - ) - ) - .catch((err) => { - // Q: should we skip unreadable files? - throw Object.assign(err, { message: `problem encountered while reading ui.supplemental_files: ${err.message}` }) - }) - } -} - -function relativizeFiles () { - return map((file, _, next) => { - if (file.isNull()) { - next() - } else { - const path_ = posixify ? posixify(file.relative) : file.relative - next(null, new File({ cwd: file.cwd, path: path_, contents: file.contents, stat: file.stat, local: true })) - } - }) -} - -function mergeFiles (files, supplementalFiles) { - if (supplementalFiles.size) supplementalFiles.forEach((file) => files.set(file.path, file)) - return files -} - -function loadConfig (files, outputDir) { - const configFile = files.get(UI_DESC_FILENAME) - if (configFile) { - files.delete(UI_DESC_FILENAME) - const config = camelCaseKeys(yaml.load(configFile.contents.toString()), { deep: true }) - if (outputDir !== undefined) config.outputDir = outputDir - const staticFiles = config.staticFiles - if (staticFiles) { - if (!Array.isArray(staticFiles)) { - config.staticFiles = [staticFiles] - } else if (staticFiles.length === 0) { - delete config.staticFiles - } - } - return config - } else { - return { outputDir } - } -} - -function classifyFile (file, config) { - if (config.staticFiles && isStaticFile(file, config.staticFiles)) { - file.type = 'static' - file.out = resolveOut(file, '') - } else if (file.local && ~('/' + file.relative).indexOf('/.')) { - file = undefined - } else { - file.type = resolveType(file) - if (file.type === 'asset') file.out = resolveOut(file, config.outputDir) - } - return file -} - -function isStaticFile (file, staticFiles) { - return minimatchAll(file.path, staticFiles) -} - -function resolveType (file) { - const firstPathSegment = file.path.split('/', 1)[0] - if (firstPathSegment === 'layouts') { - return 'layout' - } else if (firstPathSegment === 'helpers') { - return 'helper' - } else if (firstPathSegment === 'partials') { - return 'partial' - } else { - return 'asset' - } -} - -function resolveOut (file, outputDir = '_') { - let dirname = path.join(outputDir, file.dirname) - if (dirname.charAt() === '/') dirname = dirname.substr(1) - const basename = file.basename - return { dirname, basename, path: path.join(dirname, basename) } -} - -module.exports = loadUi diff --git a/node_modules/@antora/ui-loader/lib/ui-catalog.js b/node_modules/@antora/ui-loader/lib/ui-catalog.js deleted file mode 100644 index a533c963..00000000 --- a/node_modules/@antora/ui-loader/lib/ui-catalog.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict' - -const $files = Symbol('files') - -class UiCatalog { - constructor () { - this[$files] = new Map() - } - - getFiles () { - return [...this[$files].values()] - } - - addFile (file) { - const key = generateKey(file) - if (this[$files].has(key)) { - throw new Error('Duplicate file') - } - this[$files].set(key, file) - } - - findByType (type) { - const accum = [] - for (const candidate of this[$files].values()) { - if (candidate.type === type) accum.push(candidate) - } - return accum - } -} - -/** - * @deprecated superceded by getFiles(); scheduled to be removed in Antora 4 - */ -UiCatalog.prototype.getAll = UiCatalog.prototype.getFiles - -function generateKey ({ type, path }) { - return type + '$' + path -} - -module.exports = UiCatalog diff --git a/node_modules/@antora/ui-loader/package.json b/node_modules/@antora/ui-loader/package.json deleted file mode 100644 index f58175d9..00000000 --- a/node_modules/@antora/ui-loader/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "_from": "@antora/ui-loader@3.0.0-alpha.7", - "_id": "@antora/ui-loader@3.0.0-alpha.7", - "_inBundle": false, - "_integrity": "sha512-IjS0y2VJ3InMs10nEi1GcwVwh3CR/2teJwifiJOi+5S1uJ1QjSZTc231YIKdtVieZQ18swTxtfrZi2nJ5VPFfA==", - "_location": "/@antora/ui-loader", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@antora/ui-loader@3.0.0-alpha.7", - "name": "@antora/ui-loader", - "escapedName": "@antora%2fui-loader", - "scope": "@antora", - "rawSpec": "3.0.0-alpha.7", - "saveSpec": null, - "fetchSpec": "3.0.0-alpha.7" - }, - "_requiredBy": [ - "/@antora/site-generator-default" - ], - "_resolved": "https://registry.npmjs.org/@antora/ui-loader/-/ui-loader-3.0.0-alpha.7.tgz", - "_shasum": "5fbed2a021627881f97b8cd3c16454d1e40926b1", - "_spec": "@antora/ui-loader@3.0.0-alpha.7", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/site-generator-default", - "author": { - "name": "OpenDevise Inc.", - "url": "https://opendevise.com" - }, - "bugs": { - "url": "https://gitlab.com/antora/antora/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Dan Allen", - "email": "dan@opendevise.com" - }, - { - "name": "Sarah White", - "email": "sarah@opendevise.com" - }, - { - "name": "Hubert SABLONNIÈRE", - "email": "hubert.sablonniere@gmail.com" - }, - { - "name": "Guillaume Grossetie", - "email": "g.grossetie@gmail.com" - } - ], - "dependencies": { - "@antora/expand-path-helper": "~1.0", - "cache-directory": "~2.0", - "camelcase-keys": "~6.2", - "gulp-vinyl-zip": "~2.2", - "hpagent": "~0.1.0", - "js-yaml": "~4.1", - "minimatch-all": "~1.1", - "should-proxy": "~1.0", - "simple-concat": "~1.0", - "simple-get": "~4.0", - "vinyl": "~2.2", - "vinyl-fs": "~3.0" - }, - "deprecated": false, - "description": "Downloads a UI bundle, if necessary, and loads the files into a UI catalog for use in an Antora documentation pipeline.", - "engines": { - "node": ">=10.17.0" - }, - "files": [ - "lib/" - ], - "gitHead": "fbd597b3680474f2083cda8a7facf1e2848c08e0", - "homepage": "https://antora.org", - "keywords": [ - "antora", - "antora-component", - "ui", - "theme", - "documentation", - "static site", - "web publishing" - ], - "license": "MPL-2.0", - "main": "lib/index.js", - "name": "@antora/ui-loader", - "repository": { - "type": "git", - "url": "git+https://gitlab.com/antora/antora.git" - }, - "version": "3.0.0-alpha.7" -} diff --git a/node_modules/@asciidoctor/core/LICENSE b/node_modules/@asciidoctor/core/LICENSE deleted file mode 100644 index 617359bc..00000000 --- a/node_modules/@asciidoctor/core/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (C) 2019 Dan Allen, Guillaume Grossetie, Anthonny Quérouil and the Asciidoctor Project - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@asciidoctor/core/README.md b/node_modules/@asciidoctor/core/README.md deleted file mode 100644 index 727fb3d5..00000000 --- a/node_modules/@asciidoctor/core/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Asciidoctor core - -This package provides Asciidoctor core functionality: - -- parser -- built-in converters -- extensions - -## Install - - $ npm i @asciidoctor/core --save - -## Usage - -Here is a simple example that converts AsciiDoc to HTML5: - -**sample.js** - -```javascript -const asciidoctor = require('@asciidoctor/core')() // <1> -const content = 'http://asciidoctor.org[*Asciidoctor*] ' + - 'running on https://opalrb.com[_Opal_] ' + - 'brings AsciiDoc to Node.js!' -const html = asciidoctor.convert(content) // <2> -console.log(html) // <3> -``` -- <1> Instantiate the Asciidoctor.js library -- <2> Convert AsciiDoc content to HTML5 using Asciidoctor.js -- <3> Print the HTML5 output to the console - -Save the file as _sample.js_ and run it using the `node` command: - - $ node sample.js - -You should see the following output in your terminal: - -```html -
-

Asciidoctor running on Opal brings AsciiDoc to Node.js!

-
-``` - -If you want to know more about Asciidoctor.js, please read the [User Manual](https://asciidoctor-docs.netlify.com/asciidoctor.js/). - -## Changelog - -Refer to the [CHANGELOG](https://github.com/asciidoctor/asciidoctor.js/blob/master/CHANGELOG.adoc) for a complete list of changes. diff --git a/node_modules/@asciidoctor/core/dist/browser/asciidoctor.js b/node_modules/@asciidoctor/core/dist/browser/asciidoctor.js deleted file mode 100644 index 58f7bf77..00000000 --- a/node_modules/@asciidoctor/core/dist/browser/asciidoctor.js +++ /dev/null @@ -1,46907 +0,0 @@ -/** - * @license Asciidoctor.js 2.2.4 | MIT | https://github.com/asciidoctor/asciidoctor.js - */ -(function(undefined) { - // @note - // A few conventions for the documentation of this file: - // 1. Always use "//" (in contrast with "/**/") - // 2. The syntax used is Yardoc (yardoc.org), which is intended for Ruby (se below) - // 3. `@param` and `@return` types should be preceded by `JS.` when referring to - // JavaScript constructors (e.g. `JS.Function`) otherwise Ruby is assumed. - // 4. `nil` and `null` being unambiguous refer to the respective - // objects/values in Ruby and JavaScript - // 5. This is still WIP :) so please give feedback and suggestions on how - // to improve or for alternative solutions - // - // The way the code is digested before going through Yardoc is a secret kept - // in the docs repo (https://github.com/opal/docs/tree/master). - - var global_object = this, console; - - // Detect the global object - if (typeof(global) !== 'undefined') { global_object = global; } - if (typeof(window) !== 'undefined') { global_object = window; } - - // Setup a dummy console object if missing - if (typeof(global_object.console) === 'object') { - console = global_object.console; - } else if (global_object.console == null) { - console = global_object.console = {}; - } else { - console = {}; - } - - if (!('log' in console)) { console.log = function () {}; } - if (!('warn' in console)) { console.warn = console.log; } - - if (typeof(global_object.Opal) !== 'undefined') { - console.warn('Opal already loaded. Loading twice can cause troubles, please fix your setup.'); - return global_object.Opal; - } - - var nil; - - // The actual class for BasicObject - var BasicObject; - - // The actual Object class. - // The leading underscore is to avoid confusion with window.Object() - var _Object; - - // The actual Module class - var Module; - - // The actual Class class - var Class; - - // The Opal object that is exposed globally - var Opal = this.Opal = {}; - - // This is a useful reference to global object inside ruby files - Opal.global = global_object; - global_object.Opal = Opal; - - // Configure runtime behavior with regards to require and unsupported fearures - Opal.config = { - missing_require_severity: 'error', // error, warning, ignore - unsupported_features_severity: 'warning', // error, warning, ignore - enable_stack_trace: true // true, false - } - - // Minify common function calls - var $hasOwn = Object.hasOwnProperty; - var $bind = Function.prototype.bind; - var $setPrototype = Object.setPrototypeOf; - var $slice = Array.prototype.slice; - var $splice = Array.prototype.splice; - - // Nil object id is always 4 - var nil_id = 4; - - // Generates even sequential numbers greater than 4 - // (nil_id) to serve as unique ids for ruby objects - var unique_id = nil_id; - - // Return next unique id - Opal.uid = function() { - unique_id += 2; - return unique_id; - }; - - // Retrieve or assign the id of an object - Opal.id = function(obj) { - if (obj.$$is_number) return (obj * 2)+1; - if (obj.$$id != null) { - return obj.$$id; - }; - $defineProperty(obj, '$$id', Opal.uid()); - return obj.$$id; - }; - - // Globals table - Opal.gvars = {}; - - // Exit function, this should be replaced by platform specific implementation - // (See nodejs and chrome for examples) - Opal.exit = function(status) { if (Opal.gvars.DEBUG) console.log('Exited with status '+status); }; - - // keeps track of exceptions for $! - Opal.exceptions = []; - - // @private - // Pops an exception from the stack and updates `$!`. - Opal.pop_exception = function() { - Opal.gvars["!"] = Opal.exceptions.pop() || nil; - } - - // Inspect any kind of object, including non Ruby ones - Opal.inspect = function(obj) { - if (obj === undefined) { - return "undefined"; - } - else if (obj === null) { - return "null"; - } - else if (!obj.$$class) { - return obj.toString(); - } - else { - return obj.$inspect(); - } - } - - function $defineProperty(object, name, initialValue) { - if (typeof(object) === "string") { - // Special case for: - // s = "string" - // def s.m; end - // String class is the only class that: - // + compiles to JS primitive - // + allows method definition directly on instances - // numbers, true, false and nil do not support it. - object[name] = initialValue; - } else { - Object.defineProperty(object, name, { - value: initialValue, - enumerable: false, - configurable: true, - writable: true - }); - } - } - - Opal.defineProperty = $defineProperty; - - Opal.slice = $slice; - - - // Truth - // ----- - - Opal.truthy = function(val) { - return (val !== nil && val != null && (!val.$$is_boolean || val == true)); - }; - - Opal.falsy = function(val) { - return (val === nil || val == null || (val.$$is_boolean && val == false)) - }; - - - // Constants - // --------- - // - // For future reference: - // - The Rails autoloading guide (http://guides.rubyonrails.org/v5.0/autoloading_and_reloading_constants.html) - // - @ConradIrwin's 2012 post on “Everything you ever wanted to know about constant lookup in Ruby” (http://cirw.in/blog/constant-lookup.html) - // - // Legend of MRI concepts/names: - // - constant reference (cref): the module/class that acts as a namespace - // - nesting: the namespaces wrapping the current scope, e.g. nesting inside - // `module A; module B::C; end; end` is `[B::C, A]` - - // Get the constant in the scope of the current cref - function const_get_name(cref, name) { - if (cref) return cref.$$const[name]; - } - - // Walk up the nesting array looking for the constant - function const_lookup_nesting(nesting, name) { - var i, ii, result, constant; - - if (nesting.length === 0) return; - - // If the nesting is not empty the constant is looked up in its elements - // and in order. The ancestors of those elements are ignored. - for (i = 0, ii = nesting.length; i < ii; i++) { - constant = nesting[i].$$const[name]; - if (constant != null) return constant; - } - } - - // Walk up the ancestors chain looking for the constant - function const_lookup_ancestors(cref, name) { - var i, ii, result, ancestors; - - if (cref == null) return; - - ancestors = Opal.ancestors(cref); - - for (i = 0, ii = ancestors.length; i < ii; i++) { - if (ancestors[i].$$const && $hasOwn.call(ancestors[i].$$const, name)) { - return ancestors[i].$$const[name]; - } - } - } - - // Walk up Object's ancestors chain looking for the constant, - // but only if cref is missing or a module. - function const_lookup_Object(cref, name) { - if (cref == null || cref.$$is_module) { - return const_lookup_ancestors(_Object, name); - } - } - - // Call const_missing if nothing else worked - function const_missing(cref, name, skip_missing) { - if (!skip_missing) { - return (cref || _Object).$const_missing(name); - } - } - - // Look for the constant just in the current cref or call `#const_missing` - Opal.const_get_local = function(cref, name, skip_missing) { - var result; - - if (cref == null) return; - - if (cref === '::') cref = _Object; - - if (!cref.$$is_module && !cref.$$is_class) { - throw new Opal.TypeError(cref.toString() + " is not a class/module"); - } - - result = const_get_name(cref, name); if (result != null) return result; - result = const_missing(cref, name, skip_missing); if (result != null) return result; - } - - // Look for the constant relative to a cref or call `#const_missing` (when the - // constant is prefixed by `::`). - Opal.const_get_qualified = function(cref, name, skip_missing) { - var result, cache, cached, current_version = Opal.const_cache_version; - - if (cref == null) return; - - if (cref === '::') cref = _Object; - - if (!cref.$$is_module && !cref.$$is_class) { - throw new Opal.TypeError(cref.toString() + " is not a class/module"); - } - - if ((cache = cref.$$const_cache) == null) { - $defineProperty(cref, '$$const_cache', Object.create(null)); - cache = cref.$$const_cache; - } - cached = cache[name]; - - if (cached == null || cached[0] !== current_version) { - ((result = const_get_name(cref, name)) != null) || - ((result = const_lookup_ancestors(cref, name)) != null); - cache[name] = [current_version, result]; - } else { - result = cached[1]; - } - - return result != null ? result : const_missing(cref, name, skip_missing); - }; - - // Initialize the top level constant cache generation counter - Opal.const_cache_version = 1; - - // Look for the constant in the open using the current nesting and the nearest - // cref ancestors or call `#const_missing` (when the constant has no :: prefix). - Opal.const_get_relative = function(nesting, name, skip_missing) { - var cref = nesting[0], result, current_version = Opal.const_cache_version, cache, cached; - - if ((cache = nesting.$$const_cache) == null) { - $defineProperty(nesting, '$$const_cache', Object.create(null)); - cache = nesting.$$const_cache; - } - cached = cache[name]; - - if (cached == null || cached[0] !== current_version) { - ((result = const_get_name(cref, name)) != null) || - ((result = const_lookup_nesting(nesting, name)) != null) || - ((result = const_lookup_ancestors(cref, name)) != null) || - ((result = const_lookup_Object(cref, name)) != null); - - cache[name] = [current_version, result]; - } else { - result = cached[1]; - } - - return result != null ? result : const_missing(cref, name, skip_missing); - }; - - // Register the constant on a cref and opportunistically set the name of - // unnamed classes/modules. - Opal.const_set = function(cref, name, value) { - if (cref == null || cref === '::') cref = _Object; - - if (value.$$is_a_module) { - if (value.$$name == null || value.$$name === nil) value.$$name = name; - if (value.$$base_module == null) value.$$base_module = cref; - } - - cref.$$const = (cref.$$const || Object.create(null)); - cref.$$const[name] = value; - - // Add a short helper to navigate constants manually. - // @example - // Opal.$$.Regexp.$$.IGNORECASE - cref.$$ = cref.$$const; - - Opal.const_cache_version++; - - // Expose top level constants onto the Opal object - if (cref === _Object) Opal[name] = value; - - // Name new class directly onto current scope (Opal.Foo.Baz = klass) - $defineProperty(cref, name, value); - - return value; - }; - - // Get all the constants reachable from a given cref, by default will include - // inherited constants. - Opal.constants = function(cref, inherit) { - if (inherit == null) inherit = true; - - var module, modules = [cref], module_constants, i, ii, constants = {}, constant; - - if (inherit) modules = modules.concat(Opal.ancestors(cref)); - if (inherit && cref.$$is_module) modules = modules.concat([Opal.Object]).concat(Opal.ancestors(Opal.Object)); - - for (i = 0, ii = modules.length; i < ii; i++) { - module = modules[i]; - - // Don not show Objects constants unless we're querying Object itself - if (cref !== _Object && module == _Object) break; - - for (constant in module.$$const) { - constants[constant] = true; - } - } - - return Object.keys(constants); - }; - - // Remove a constant from a cref. - Opal.const_remove = function(cref, name) { - Opal.const_cache_version++; - - if (cref.$$const[name] != null) { - var old = cref.$$const[name]; - delete cref.$$const[name]; - return old; - } - - if (cref.$$autoload != null && cref.$$autoload[name] != null) { - delete cref.$$autoload[name]; - return nil; - } - - throw Opal.NameError.$new("constant "+cref+"::"+cref.$name()+" not defined"); - }; - - - // Modules & Classes - // ----------------- - - // A `class Foo; end` expression in ruby is compiled to call this runtime - // method which either returns an existing class of the given name, or creates - // a new class in the given `base` scope. - // - // If a constant with the given name exists, then we check to make sure that - // it is a class and also that the superclasses match. If either of these - // fail, then we raise a `TypeError`. Note, `superclass` may be null if one - // was not specified in the ruby code. - // - // We pass a constructor to this method of the form `function ClassName() {}` - // simply so that classes show up with nicely formatted names inside debuggers - // in the web browser (or node/sprockets). - // - // The `scope` is the current `self` value where the class is being created - // from. We use this to get the scope for where the class should be created. - // If `scope` is an object (not a class/module), we simple get its class and - // use that as the scope instead. - // - // @param scope [Object] where the class is being created - // @param superclass [Class,null] superclass of the new class (may be null) - // @param id [String] the name of the class to be created - // @param constructor [JS.Function] function to use as constructor - // - // @return new [Class] or existing ruby class - // - Opal.allocate_class = function(name, superclass) { - var klass, constructor; - - if (superclass != null && superclass.$$bridge) { - // Inheritance from bridged classes requires - // calling original JS constructors - constructor = function() { - var args = $slice.call(arguments), - self = new ($bind.apply(superclass.$$constructor, [null].concat(args)))(); - - // and replacing a __proto__ manually - $setPrototype(self, klass.$$prototype); - return self; - } - } else { - constructor = function(){}; - } - - if (name) { - $defineProperty(constructor, 'displayName', '::'+name); - } - - klass = constructor; - - $defineProperty(klass, '$$name', name); - $defineProperty(klass, '$$constructor', constructor); - $defineProperty(klass, '$$prototype', constructor.prototype); - $defineProperty(klass, '$$const', {}); - $defineProperty(klass, '$$is_class', true); - $defineProperty(klass, '$$is_a_module', true); - $defineProperty(klass, '$$super', superclass); - $defineProperty(klass, '$$cvars', {}); - $defineProperty(klass, '$$own_included_modules', []); - $defineProperty(klass, '$$own_prepended_modules', []); - $defineProperty(klass, '$$ancestors', []); - $defineProperty(klass, '$$ancestors_cache_version', null); - - $defineProperty(klass.$$prototype, '$$class', klass); - - // By default if there are no singleton class methods - // __proto__ is Class.prototype - // Later singleton methods generate a singleton_class - // and inject it into ancestors chain - if (Opal.Class) { - $setPrototype(klass, Opal.Class.prototype); - } - - if (superclass != null) { - $setPrototype(klass.$$prototype, superclass.$$prototype); - - if (superclass.$$meta) { - // If superclass has metaclass then we have explicitely inherit it. - Opal.build_class_singleton_class(klass); - } - }; - - return klass; - } - - - function find_existing_class(scope, name) { - // Try to find the class in the current scope - var klass = const_get_name(scope, name); - - // If the class exists in the scope, then we must use that - if (klass) { - // Make sure the existing constant is a class, or raise error - if (!klass.$$is_class) { - throw Opal.TypeError.$new(name + " is not a class"); - } - - return klass; - } - } - - function ensureSuperclassMatch(klass, superclass) { - if (klass.$$super !== superclass) { - throw Opal.TypeError.$new("superclass mismatch for class " + klass.$$name); - } - } - - Opal.klass = function(scope, superclass, name) { - var bridged; - - if (scope == null) { - // Global scope - scope = _Object; - } else if (!scope.$$is_class && !scope.$$is_module) { - // Scope is an object, use its class - scope = scope.$$class; - } - - // If the superclass is not an Opal-generated class then we're bridging a native JS class - if (superclass != null && !superclass.hasOwnProperty('$$is_class')) { - bridged = superclass; - superclass = _Object; - } - - var klass = find_existing_class(scope, name); - - if (klass) { - if (superclass) { - // Make sure existing class has same superclass - ensureSuperclassMatch(klass, superclass); - } - return klass; - } - - // Class doesn't exist, create a new one with given superclass... - - // Not specifying a superclass means we can assume it to be Object - if (superclass == null) { - superclass = _Object; - } - - // Create the class object (instance of Class) - klass = Opal.allocate_class(name, superclass); - Opal.const_set(scope, name, klass); - - // Call .inherited() hook with new class on the superclass - if (superclass.$inherited) { - superclass.$inherited(klass); - } - - if (bridged) { - Opal.bridge(bridged, klass); - } - - return klass; - } - - // Define new module (or return existing module). The given `scope` is basically - // the current `self` value the `module` statement was defined in. If this is - // a ruby module or class, then it is used, otherwise if the scope is a ruby - // object then that objects real ruby class is used (e.g. if the scope is the - // main object, then the top level `Object` class is used as the scope). - // - // If a module of the given name is already defined in the scope, then that - // instance is just returned. - // - // If there is a class of the given name in the scope, then an error is - // generated instead (cannot have a class and module of same name in same scope). - // - // Otherwise, a new module is created in the scope with the given name, and that - // new instance is returned back (to be referenced at runtime). - // - // @param scope [Module, Class] class or module this definition is inside - // @param id [String] the name of the new (or existing) module - // - // @return [Module] - Opal.allocate_module = function(name) { - var constructor = function(){}; - if (name) { - $defineProperty(constructor, 'displayName', name+'.$$constructor'); - } - - var module = constructor; - - if (name) - $defineProperty(constructor, 'displayName', name+'.constructor'); - - $defineProperty(module, '$$name', name); - $defineProperty(module, '$$prototype', constructor.prototype); - $defineProperty(module, '$$const', {}); - $defineProperty(module, '$$is_module', true); - $defineProperty(module, '$$is_a_module', true); - $defineProperty(module, '$$cvars', {}); - $defineProperty(module, '$$iclasses', []); - $defineProperty(module, '$$own_included_modules', []); - $defineProperty(module, '$$own_prepended_modules', []); - $defineProperty(module, '$$ancestors', [module]); - $defineProperty(module, '$$ancestors_cache_version', null); - - $setPrototype(module, Opal.Module.prototype); - - return module; - } - - function find_existing_module(scope, name) { - var module = const_get_name(scope, name); - if (module == null && scope === _Object) module = const_lookup_ancestors(_Object, name); - - if (module) { - if (!module.$$is_module && module !== _Object) { - throw Opal.TypeError.$new(name + " is not a module"); - } - } - - return module; - } - - Opal.module = function(scope, name) { - var module; - - if (scope == null) { - // Global scope - scope = _Object; - } else if (!scope.$$is_class && !scope.$$is_module) { - // Scope is an object, use its class - scope = scope.$$class; - } - - module = find_existing_module(scope, name); - - if (module) { - return module; - } - - // Module doesnt exist, create a new one... - module = Opal.allocate_module(name); - Opal.const_set(scope, name, module); - - return module; - } - - // Return the singleton class for the passed object. - // - // If the given object alredy has a singleton class, then it will be stored on - // the object as the `$$meta` property. If this exists, then it is simply - // returned back. - // - // Otherwise, a new singleton object for the class or object is created, set on - // the object at `$$meta` for future use, and then returned. - // - // @param object [Object] the ruby object - // @return [Class] the singleton class for object - Opal.get_singleton_class = function(object) { - if (object.$$meta) { - return object.$$meta; - } - - if (object.hasOwnProperty('$$is_class')) { - return Opal.build_class_singleton_class(object); - } else if (object.hasOwnProperty('$$is_module')) { - return Opal.build_module_singletin_class(object); - } else { - return Opal.build_object_singleton_class(object); - } - }; - - // Build the singleton class for an existing class. Class object are built - // with their singleton class already in the prototype chain and inheriting - // from their superclass object (up to `Class` itself). - // - // NOTE: Actually in MRI a class' singleton class inherits from its - // superclass' singleton class which in turn inherits from Class. - // - // @param klass [Class] - // @return [Class] - Opal.build_class_singleton_class = function(klass) { - var superclass, meta; - - if (klass.$$meta) { - return klass.$$meta; - } - - // The singleton_class superclass is the singleton_class of its superclass; - // but BasicObject has no superclass (its `$$super` is null), thus we - // fallback on `Class`. - superclass = klass === BasicObject ? Class : Opal.get_singleton_class(klass.$$super); - - meta = Opal.allocate_class(null, superclass, function(){}); - - $defineProperty(meta, '$$is_singleton', true); - $defineProperty(meta, '$$singleton_of', klass); - $defineProperty(klass, '$$meta', meta); - $setPrototype(klass, meta.$$prototype); - // Restoring ClassName.class - $defineProperty(klass, '$$class', Opal.Class); - - return meta; - }; - - Opal.build_module_singletin_class = function(mod) { - if (mod.$$meta) { - return mod.$$meta; - } - - var meta = Opal.allocate_class(null, Opal.Module, function(){}); - - $defineProperty(meta, '$$is_singleton', true); - $defineProperty(meta, '$$singleton_of', mod); - $defineProperty(mod, '$$meta', meta); - $setPrototype(mod, meta.$$prototype); - // Restoring ModuleName.class - $defineProperty(mod, '$$class', Opal.Module); - - return meta; - } - - // Build the singleton class for a Ruby (non class) Object. - // - // @param object [Object] - // @return [Class] - Opal.build_object_singleton_class = function(object) { - var superclass = object.$$class, - klass = Opal.allocate_class(nil, superclass, function(){}); - - $defineProperty(klass, '$$is_singleton', true); - $defineProperty(klass, '$$singleton_of', object); - - delete klass.$$prototype.$$class; - - $defineProperty(object, '$$meta', klass); - - $setPrototype(object, object.$$meta.$$prototype); - - return klass; - }; - - Opal.is_method = function(prop) { - return (prop[0] === '$' && prop[1] !== '$'); - } - - Opal.instance_methods = function(mod) { - var exclude = [], results = [], ancestors = Opal.ancestors(mod); - - for (var i = 0, l = ancestors.length; i < l; i++) { - var ancestor = ancestors[i], - proto = ancestor.$$prototype; - - if (proto.hasOwnProperty('$$dummy')) { - proto = proto.$$define_methods_on; - } - - var props = Object.getOwnPropertyNames(proto); - - for (var j = 0, ll = props.length; j < ll; j++) { - var prop = props[j]; - - if (Opal.is_method(prop)) { - var method_name = prop.slice(1), - method = proto[prop]; - - if (method.$$stub && exclude.indexOf(method_name) === -1) { - exclude.push(method_name); - } - - if (!method.$$stub && results.indexOf(method_name) === -1 && exclude.indexOf(method_name) === -1) { - results.push(method_name); - } - } - } - } - - return results; - } - - Opal.own_instance_methods = function(mod) { - var results = [], - proto = mod.$$prototype; - - if (proto.hasOwnProperty('$$dummy')) { - proto = proto.$$define_methods_on; - } - - var props = Object.getOwnPropertyNames(proto); - - for (var i = 0, length = props.length; i < length; i++) { - var prop = props[i]; - - if (Opal.is_method(prop)) { - var method = proto[prop]; - - if (!method.$$stub) { - var method_name = prop.slice(1); - results.push(method_name); - } - } - } - - return results; - } - - Opal.methods = function(obj) { - return Opal.instance_methods(Opal.get_singleton_class(obj)); - } - - Opal.own_methods = function(obj) { - return Opal.own_instance_methods(Opal.get_singleton_class(obj)); - } - - Opal.receiver_methods = function(obj) { - var mod = Opal.get_singleton_class(obj); - var singleton_methods = Opal.own_instance_methods(mod); - var instance_methods = Opal.own_instance_methods(mod.$$super); - return singleton_methods.concat(instance_methods); - } - - // Returns an object containing all pairs of names/values - // for all class variables defined in provided +module+ - // and its ancestors. - // - // @param module [Module] - // @return [Object] - Opal.class_variables = function(module) { - var ancestors = Opal.ancestors(module), - i, length = ancestors.length, - result = {}; - - for (i = length - 1; i >= 0; i--) { - var ancestor = ancestors[i]; - - for (var cvar in ancestor.$$cvars) { - result[cvar] = ancestor.$$cvars[cvar]; - } - } - - return result; - } - - // Sets class variable with specified +name+ to +value+ - // in provided +module+ - // - // @param module [Module] - // @param name [String] - // @param value [Object] - Opal.class_variable_set = function(module, name, value) { - var ancestors = Opal.ancestors(module), - i, length = ancestors.length; - - for (i = length - 2; i >= 0; i--) { - var ancestor = ancestors[i]; - - if ($hasOwn.call(ancestor.$$cvars, name)) { - ancestor.$$cvars[name] = value; - return value; - } - } - - module.$$cvars[name] = value; - - return value; - } - - function isRoot(proto) { - return proto.hasOwnProperty('$$iclass') && proto.hasOwnProperty('$$root'); - } - - function own_included_modules(module) { - var result = [], mod, proto = Object.getPrototypeOf(module.$$prototype); - - while (proto) { - if (proto.hasOwnProperty('$$class')) { - // superclass - break; - } - mod = protoToModule(proto); - if (mod) { - result.push(mod); - } - proto = Object.getPrototypeOf(proto); - } - - return result; - } - - function own_prepended_modules(module) { - var result = [], mod, proto = Object.getPrototypeOf(module.$$prototype); - - if (module.$$prototype.hasOwnProperty('$$dummy')) { - while (proto) { - if (proto === module.$$prototype.$$define_methods_on) { - break; - } - - mod = protoToModule(proto); - if (mod) { - result.push(mod); - } - - proto = Object.getPrototypeOf(proto); - } - } - - return result; - } - - - // The actual inclusion of a module into a class. - // - // ## Class `$$parent` and `iclass` - // - // To handle `super` calls, every class has a `$$parent`. This parent is - // used to resolve the next class for a super call. A normal class would - // have this point to its superclass. However, if a class includes a module - // then this would need to take into account the module. The module would - // also have to then point its `$$parent` to the actual superclass. We - // cannot modify modules like this, because it might be included in more - // then one class. To fix this, we actually insert an `iclass` as the class' - // `$$parent` which can then point to the superclass. The `iclass` acts as - // a proxy to the actual module, so the `super` chain can then search it for - // the required method. - // - // @param module [Module] the module to include - // @param includer [Module] the target class to include module into - // @return [null] - Opal.append_features = function(module, includer) { - var module_ancestors = Opal.ancestors(module); - var iclasses = []; - - if (module_ancestors.indexOf(includer) !== -1) { - throw Opal.ArgumentError.$new('cyclic include detected'); - } - - for (var i = 0, length = module_ancestors.length; i < length; i++) { - var ancestor = module_ancestors[i], iclass = create_iclass(ancestor); - $defineProperty(iclass, '$$included', true); - iclasses.push(iclass); - } - var includer_ancestors = Opal.ancestors(includer), - chain = chain_iclasses(iclasses), - start_chain_after, - end_chain_on; - - if (includer_ancestors.indexOf(module) === -1) { - // first time include - - // includer -> chain.first -> ...chain... -> chain.last -> includer.parent - start_chain_after = includer.$$prototype; - end_chain_on = Object.getPrototypeOf(includer.$$prototype); - } else { - // The module has been already included, - // we don't need to put it into the ancestors chain again, - // but this module may have new included modules. - // If it's true we need to copy them. - // - // The simplest way is to replace ancestors chain from - // parent - // | - // `module` iclass (has a $$root flag) - // | - // ...previos chain of module.included_modules ... - // | - // "next ancestor" (has a $$root flag or is a real class) - // - // to - // parent - // | - // `module` iclass (has a $$root flag) - // | - // ...regenerated chain of module.included_modules - // | - // "next ancestor" (has a $$root flag or is a real class) - // - // because there are no intermediate classes between `parent` and `next ancestor`. - // It doesn't break any prototypes of other objects as we don't change class references. - - var proto = includer.$$prototype, parent = proto, module_iclass = Object.getPrototypeOf(parent); - - while (module_iclass != null) { - if (isRoot(module_iclass) && module_iclass.$$module === module) { - break; - } - - parent = module_iclass; - module_iclass = Object.getPrototypeOf(module_iclass); - } - - var next_ancestor = Object.getPrototypeOf(module_iclass); - - // skip non-root iclasses (that were recursively included) - while (next_ancestor.hasOwnProperty('$$iclass') && !isRoot(next_ancestor)) { - next_ancestor = Object.getPrototypeOf(next_ancestor); - } - - start_chain_after = parent; - end_chain_on = next_ancestor; - } - - $setPrototype(start_chain_after, chain.first); - $setPrototype(chain.last, end_chain_on); - - // recalculate own_included_modules cache - includer.$$own_included_modules = own_included_modules(includer); - - Opal.const_cache_version++; - } - - Opal.prepend_features = function(module, prepender) { - // Here we change the ancestors chain from - // - // prepender - // | - // parent - // - // to: - // - // dummy(prepender) - // | - // iclass(module) - // | - // iclass(prepender) - // | - // parent - var module_ancestors = Opal.ancestors(module); - var iclasses = []; - - if (module_ancestors.indexOf(prepender) !== -1) { - throw Opal.ArgumentError.$new('cyclic prepend detected'); - } - - for (var i = 0, length = module_ancestors.length; i < length; i++) { - var ancestor = module_ancestors[i], iclass = create_iclass(ancestor); - $defineProperty(iclass, '$$prepended', true); - iclasses.push(iclass); - } - - var chain = chain_iclasses(iclasses), - dummy_prepender = prepender.$$prototype, - previous_parent = Object.getPrototypeOf(dummy_prepender), - prepender_iclass, - start_chain_after, - end_chain_on; - - if (dummy_prepender.hasOwnProperty('$$dummy')) { - // The module already has some prepended modules - // which means that we don't need to make it "dummy" - prepender_iclass = dummy_prepender.$$define_methods_on; - } else { - // Making the module "dummy" - prepender_iclass = create_dummy_iclass(prepender); - flush_methods_in(prepender); - $defineProperty(dummy_prepender, '$$dummy', true); - $defineProperty(dummy_prepender, '$$define_methods_on', prepender_iclass); - - // Converting - // dummy(prepender) -> previous_parent - // to - // dummy(prepender) -> iclass(prepender) -> previous_parent - $setPrototype(dummy_prepender, prepender_iclass); - $setPrototype(prepender_iclass, previous_parent); - } - - var prepender_ancestors = Opal.ancestors(prepender); - - if (prepender_ancestors.indexOf(module) === -1) { - // first time prepend - - start_chain_after = dummy_prepender; - - // next $$root or prepender_iclass or non-$$iclass - end_chain_on = Object.getPrototypeOf(dummy_prepender); - while (end_chain_on != null) { - if ( - end_chain_on.hasOwnProperty('$$root') || - end_chain_on === prepender_iclass || - !end_chain_on.hasOwnProperty('$$iclass') - ) { - break; - } - - end_chain_on = Object.getPrototypeOf(end_chain_on); - } - } else { - throw Opal.RuntimeError.$new("Prepending a module multiple times is not supported"); - } - - $setPrototype(start_chain_after, chain.first); - $setPrototype(chain.last, end_chain_on); - - // recalculate own_prepended_modules cache - prepender.$$own_prepended_modules = own_prepended_modules(prepender); - - Opal.const_cache_version++; - } - - function flush_methods_in(module) { - var proto = module.$$prototype, - props = Object.getOwnPropertyNames(proto); - - for (var i = 0; i < props.length; i++) { - var prop = props[i]; - if (Opal.is_method(prop)) { - delete proto[prop]; - } - } - } - - function create_iclass(module) { - var iclass = create_dummy_iclass(module); - - if (module.$$is_module) { - module.$$iclasses.push(iclass); - } - - return iclass; - } - - // Dummy iclass doesn't receive updates when the module gets a new method. - function create_dummy_iclass(module) { - var iclass = {}, - proto = module.$$prototype; - - if (proto.hasOwnProperty('$$dummy')) { - proto = proto.$$define_methods_on; - } - - var props = Object.getOwnPropertyNames(proto), - length = props.length, i; - - for (i = 0; i < length; i++) { - var prop = props[i]; - $defineProperty(iclass, prop, proto[prop]); - } - - $defineProperty(iclass, '$$iclass', true); - $defineProperty(iclass, '$$module', module); - - return iclass; - } - - function chain_iclasses(iclasses) { - var length = iclasses.length, first = iclasses[0]; - - $defineProperty(first, '$$root', true); - - if (length === 1) { - return { first: first, last: first }; - } - - var previous = first; - - for (var i = 1; i < length; i++) { - var current = iclasses[i]; - $setPrototype(previous, current); - previous = current; - } - - - return { first: iclasses[0], last: iclasses[length - 1] }; - } - - // For performance, some core Ruby classes are toll-free bridged to their - // native JavaScript counterparts (e.g. a Ruby Array is a JavaScript Array). - // - // This method is used to setup a native constructor (e.g. Array), to have - // its prototype act like a normal Ruby class. Firstly, a new Ruby class is - // created using the native constructor so that its prototype is set as the - // target for the new class. Note: all bridged classes are set to inherit - // from Object. - // - // Example: - // - // Opal.bridge(self, Function); - // - // @param klass [Class] the Ruby class to bridge - // @param constructor [JS.Function] native JavaScript constructor to use - // @return [Class] returns the passed Ruby class - // - Opal.bridge = function(native_klass, klass) { - if (native_klass.hasOwnProperty('$$bridge')) { - throw Opal.ArgumentError.$new("already bridged"); - } - - var klass_to_inject, klass_reference; - - klass_to_inject = klass.$$super || Opal.Object; - klass_reference = klass; - var original_prototype = klass.$$prototype; - - // constructor is a JS function with a prototype chain like: - // - constructor - // - super - // - // What we need to do is to inject our class (with its prototype chain) - // between constructor and super. For example, after injecting ::Object - // into JS String we get: - // - // - constructor (window.String) - // - Opal.Object - // - Opal.Kernel - // - Opal.BasicObject - // - super (window.Object) - // - null - // - $defineProperty(native_klass, '$$bridge', klass); - $setPrototype(native_klass.prototype, (klass.$$super || Opal.Object).$$prototype); - $defineProperty(klass, '$$prototype', native_klass.prototype); - - $defineProperty(klass.$$prototype, '$$class', klass); - $defineProperty(klass, '$$constructor', native_klass); - $defineProperty(klass, '$$bridge', true); - }; - - function protoToModule(proto) { - if (proto.hasOwnProperty('$$dummy')) { - return; - } else if (proto.hasOwnProperty('$$iclass')) { - return proto.$$module; - } else if (proto.hasOwnProperty('$$class')) { - return proto.$$class; - } - } - - function own_ancestors(module) { - return module.$$own_prepended_modules.concat([module]).concat(module.$$own_included_modules); - } - - // The Array of ancestors for a given module/class - Opal.ancestors = function(module) { - if (!module) { return []; } - - if (module.$$ancestors_cache_version === Opal.const_cache_version) { - return module.$$ancestors; - } - - var result = [], i, mods, length; - - for (i = 0, mods = own_ancestors(module), length = mods.length; i < length; i++) { - result.push(mods[i]); - } - - if (module.$$super) { - for (i = 0, mods = Opal.ancestors(module.$$super), length = mods.length; i < length; i++) { - result.push(mods[i]); - } - } - - module.$$ancestors_cache_version = Opal.const_cache_version; - module.$$ancestors = result; - - return result; - } - - Opal.included_modules = function(module) { - var result = [], mod = null, proto = Object.getPrototypeOf(module.$$prototype); - - for (; proto && Object.getPrototypeOf(proto); proto = Object.getPrototypeOf(proto)) { - mod = protoToModule(proto); - if (mod && mod.$$is_module && proto.$$iclass && proto.$$included) { - result.push(mod); - } - } - - return result; - } - - - // Method Missing - // -------------- - - // Methods stubs are used to facilitate method_missing in opal. A stub is a - // placeholder function which just calls `method_missing` on the receiver. - // If no method with the given name is actually defined on an object, then it - // is obvious to say that the stub will be called instead, and then in turn - // method_missing will be called. - // - // When a file in ruby gets compiled to javascript, it includes a call to - // this function which adds stubs for every method name in the compiled file. - // It should then be safe to assume that method_missing will work for any - // method call detected. - // - // Method stubs are added to the BasicObject prototype, which every other - // ruby object inherits, so all objects should handle method missing. A stub - // is only added if the given property name (method name) is not already - // defined. - // - // Note: all ruby methods have a `$` prefix in javascript, so all stubs will - // have this prefix as well (to make this method more performant). - // - // Opal.add_stubs(["$foo", "$bar", "$baz="]); - // - // All stub functions will have a private `$$stub` property set to true so - // that other internal methods can detect if a method is just a stub or not. - // `Kernel#respond_to?` uses this property to detect a methods presence. - // - // @param stubs [Array] an array of method stubs to add - // @return [undefined] - Opal.add_stubs = function(stubs) { - var proto = Opal.BasicObject.$$prototype; - - for (var i = 0, length = stubs.length; i < length; i++) { - var stub = stubs[i], existing_method = proto[stub]; - - if (existing_method == null || existing_method.$$stub) { - Opal.add_stub_for(proto, stub); - } - } - }; - - // Add a method_missing stub function to the given prototype for the - // given name. - // - // @param prototype [Prototype] the target prototype - // @param stub [String] stub name to add (e.g. "$foo") - // @return [undefined] - Opal.add_stub_for = function(prototype, stub) { - var method_missing_stub = Opal.stub_for(stub); - $defineProperty(prototype, stub, method_missing_stub); - }; - - // Generate the method_missing stub for a given method name. - // - // @param method_name [String] The js-name of the method to stub (e.g. "$foo") - // @return [undefined] - Opal.stub_for = function(method_name) { - function method_missing_stub() { - // Copy any given block onto the method_missing dispatcher - this.$method_missing.$$p = method_missing_stub.$$p; - - // Set block property to null ready for the next call (stop false-positives) - method_missing_stub.$$p = null; - - // call method missing with correct args (remove '$' prefix on method name) - var args_ary = new Array(arguments.length); - for(var i = 0, l = args_ary.length; i < l; i++) { args_ary[i] = arguments[i]; } - - return this.$method_missing.apply(this, [method_name.slice(1)].concat(args_ary)); - } - - method_missing_stub.$$stub = true; - - return method_missing_stub; - }; - - - // Methods - // ------- - - // Arity count error dispatcher for methods - // - // @param actual [Fixnum] number of arguments given to method - // @param expected [Fixnum] expected number of arguments - // @param object [Object] owner of the method +meth+ - // @param meth [String] method name that got wrong number of arguments - // @raise [ArgumentError] - Opal.ac = function(actual, expected, object, meth) { - var inspect = ''; - if (object.$$is_a_module) { - inspect += object.$$name + '.'; - } - else { - inspect += object.$$class.$$name + '#'; - } - inspect += meth; - - throw Opal.ArgumentError.$new('[' + inspect + '] wrong number of arguments(' + actual + ' for ' + expected + ')'); - }; - - // Arity count error dispatcher for blocks - // - // @param actual [Fixnum] number of arguments given to block - // @param expected [Fixnum] expected number of arguments - // @param context [Object] context of the block definition - // @raise [ArgumentError] - Opal.block_ac = function(actual, expected, context) { - var inspect = "`block in " + context + "'"; - - throw Opal.ArgumentError.$new(inspect + ': wrong number of arguments (' + actual + ' for ' + expected + ')'); - }; - - // Super dispatcher - Opal.find_super_dispatcher = function(obj, mid, current_func, defcheck, defs) { - var jsid = '$' + mid, ancestors, super_method; - - if (obj.hasOwnProperty('$$meta')) { - ancestors = Opal.ancestors(obj.$$meta); - } else { - ancestors = Opal.ancestors(obj.$$class); - } - - var current_index = ancestors.indexOf(current_func.$$owner); - - for (var i = current_index + 1; i < ancestors.length; i++) { - var ancestor = ancestors[i], - proto = ancestor.$$prototype; - - if (proto.hasOwnProperty('$$dummy')) { - proto = proto.$$define_methods_on; - } - - if (proto.hasOwnProperty(jsid)) { - var method = proto[jsid]; - - if (!method.$$stub) { - super_method = method; - } - break; - } - } - - if (!defcheck && super_method == null && Opal.Kernel.$method_missing === obj.$method_missing) { - // method_missing hasn't been explicitly defined - throw Opal.NoMethodError.$new('super: no superclass method `'+mid+"' for "+obj, mid); - } - - return super_method; - }; - - // Iter dispatcher for super in a block - Opal.find_iter_super_dispatcher = function(obj, jsid, current_func, defcheck, implicit) { - var call_jsid = jsid; - - if (!current_func) { - throw Opal.RuntimeError.$new("super called outside of method"); - } - - if (implicit && current_func.$$define_meth) { - throw Opal.RuntimeError.$new("implicit argument passing of super from method defined by define_method() is not supported. Specify all arguments explicitly"); - } - - if (current_func.$$def) { - call_jsid = current_func.$$jsid; - } - - return Opal.find_super_dispatcher(obj, call_jsid, current_func, defcheck); - }; - - // Used to return as an expression. Sometimes, we can't simply return from - // a javascript function as if we were a method, as the return is used as - // an expression, or even inside a block which must "return" to the outer - // method. This helper simply throws an error which is then caught by the - // method. This approach is expensive, so it is only used when absolutely - // needed. - // - Opal.ret = function(val) { - Opal.returner.$v = val; - throw Opal.returner; - }; - - // Used to break out of a block. - Opal.brk = function(val, breaker) { - breaker.$v = val; - throw breaker; - }; - - // Builds a new unique breaker, this is to avoid multiple nested breaks to get - // in the way of each other. - Opal.new_brk = function() { - return new Error('unexpected break'); - }; - - // handles yield calls for 1 yielded arg - Opal.yield1 = function(block, arg) { - if (typeof(block) !== "function") { - throw Opal.LocalJumpError.$new("no block given"); - } - - var has_mlhs = block.$$has_top_level_mlhs_arg, - has_trailing_comma = block.$$has_trailing_comma_in_args; - - if (block.length > 1 || ((has_mlhs || has_trailing_comma) && block.length === 1)) { - arg = Opal.to_ary(arg); - } - - if ((block.length > 1 || (has_trailing_comma && block.length === 1)) && arg.$$is_array) { - return block.apply(null, arg); - } - else { - return block(arg); - } - }; - - // handles yield for > 1 yielded arg - Opal.yieldX = function(block, args) { - if (typeof(block) !== "function") { - throw Opal.LocalJumpError.$new("no block given"); - } - - if (block.length > 1 && args.length === 1) { - if (args[0].$$is_array) { - return block.apply(null, args[0]); - } - } - - if (!args.$$is_array) { - var args_ary = new Array(args.length); - for(var i = 0, l = args_ary.length; i < l; i++) { args_ary[i] = args[i]; } - - return block.apply(null, args_ary); - } - - return block.apply(null, args); - }; - - // Finds the corresponding exception match in candidates. Each candidate can - // be a value, or an array of values. Returns null if not found. - Opal.rescue = function(exception, candidates) { - for (var i = 0; i < candidates.length; i++) { - var candidate = candidates[i]; - - if (candidate.$$is_array) { - var result = Opal.rescue(exception, candidate); - - if (result) { - return result; - } - } - else if (candidate === Opal.JS.Error) { - return candidate; - } - else if (candidate['$==='](exception)) { - return candidate; - } - } - - return null; - }; - - Opal.is_a = function(object, klass) { - if (klass != null && object.$$meta === klass || object.$$class === klass) { - return true; - } - - if (object.$$is_number && klass.$$is_number_class) { - return true; - } - - var i, length, ancestors = Opal.ancestors(object.$$is_class ? Opal.get_singleton_class(object) : (object.$$meta || object.$$class)); - - for (i = 0, length = ancestors.length; i < length; i++) { - if (ancestors[i] === klass) { - return true; - } - } - - return false; - }; - - // Helpers for extracting kwsplats - // Used for: { **h } - Opal.to_hash = function(value) { - if (value.$$is_hash) { - return value; - } - else if (value['$respond_to?']('to_hash', true)) { - var hash = value.$to_hash(); - if (hash.$$is_hash) { - return hash; - } - else { - throw Opal.TypeError.$new("Can't convert " + value.$$class + - " to Hash (" + value.$$class + "#to_hash gives " + hash.$$class + ")"); - } - } - else { - throw Opal.TypeError.$new("no implicit conversion of " + value.$$class + " into Hash"); - } - }; - - // Helpers for implementing multiple assignment - // Our code for extracting the values and assigning them only works if the - // return value is a JS array. - // So if we get an Array subclass, extract the wrapped JS array from it - - // Used for: a, b = something (no splat) - Opal.to_ary = function(value) { - if (value.$$is_array) { - return value; - } - else if (value['$respond_to?']('to_ary', true)) { - var ary = value.$to_ary(); - if (ary === nil) { - return [value]; - } - else if (ary.$$is_array) { - return ary; - } - else { - throw Opal.TypeError.$new("Can't convert " + value.$$class + - " to Array (" + value.$$class + "#to_ary gives " + ary.$$class + ")"); - } - } - else { - return [value]; - } - }; - - // Used for: a, b = *something (with splat) - Opal.to_a = function(value) { - if (value.$$is_array) { - // A splatted array must be copied - return value.slice(); - } - else if (value['$respond_to?']('to_a', true)) { - var ary = value.$to_a(); - if (ary === nil) { - return [value]; - } - else if (ary.$$is_array) { - return ary; - } - else { - throw Opal.TypeError.$new("Can't convert " + value.$$class + - " to Array (" + value.$$class + "#to_a gives " + ary.$$class + ")"); - } - } - else { - return [value]; - } - }; - - // Used for extracting keyword arguments from arguments passed to - // JS function. If provided +arguments+ list doesn't have a Hash - // as a last item, returns a blank Hash. - // - // @param parameters [Array] - // @return [Hash] - // - Opal.extract_kwargs = function(parameters) { - var kwargs = parameters[parameters.length - 1]; - if (kwargs != null && kwargs['$respond_to?']('to_hash', true)) { - $splice.call(parameters, parameters.length - 1, 1); - return kwargs.$to_hash(); - } - else { - return Opal.hash2([], {}); - } - } - - // Used to get a list of rest keyword arguments. Method takes the given - // keyword args, i.e. the hash literal passed to the method containing all - // keyword arguemnts passed to method, as well as the used args which are - // the names of required and optional arguments defined. This method then - // just returns all key/value pairs which have not been used, in a new - // hash literal. - // - // @param given_args [Hash] all kwargs given to method - // @param used_args [Object] all keys used as named kwargs - // @return [Hash] - // - Opal.kwrestargs = function(given_args, used_args) { - var keys = [], - map = {}, - key = null, - given_map = given_args.$$smap; - - for (key in given_map) { - if (!used_args[key]) { - keys.push(key); - map[key] = given_map[key]; - } - } - - return Opal.hash2(keys, map); - }; - - // Calls passed method on a ruby object with arguments and block: - // - // Can take a method or a method name. - // - // 1. When method name gets passed it invokes it by its name - // and calls 'method_missing' when object doesn't have this method. - // Used internally by Opal to invoke method that takes a block or a splat. - // 2. When method (i.e. method body) gets passed, it doesn't trigger 'method_missing' - // because it doesn't know the name of the actual method. - // Used internally by Opal to invoke 'super'. - // - // @example - // var my_array = [1, 2, 3, 4] - // Opal.send(my_array, 'length') # => 4 - // Opal.send(my_array, my_array.$length) # => 4 - // - // Opal.send(my_array, 'reverse!') # => [4, 3, 2, 1] - // Opal.send(my_array, my_array['$reverse!']') # => [4, 3, 2, 1] - // - // @param recv [Object] ruby object - // @param method [Function, String] method body or name of the method - // @param args [Array] arguments that will be passed to the method call - // @param block [Function] ruby block - // @return [Object] returning value of the method call - Opal.send = function(recv, method, args, block) { - var body = (typeof(method) === 'string') ? recv['$'+method] : method; - - if (body != null) { - if (typeof block === 'function') { - body.$$p = block; - } - return body.apply(recv, args); - } - - return recv.$method_missing.apply(recv, [method].concat(args)); - } - - Opal.lambda = function(block) { - block.$$is_lambda = true; - return block; - } - - // Used to define methods on an object. This is a helper method, used by the - // compiled source to define methods on special case objects when the compiler - // can not determine the destination object, or the object is a Module - // instance. This can get called by `Module#define_method` as well. - // - // ## Modules - // - // Any method defined on a module will come through this runtime helper. - // The method is added to the module body, and the owner of the method is - // set to be the module itself. This is used later when choosing which - // method should show on a class if more than 1 included modules define - // the same method. Finally, if the module is in `module_function` mode, - // then the method is also defined onto the module itself. - // - // ## Classes - // - // This helper will only be called for classes when a method is being - // defined indirectly; either through `Module#define_method`, or by a - // literal `def` method inside an `instance_eval` or `class_eval` body. In - // either case, the method is simply added to the class' prototype. A special - // exception exists for `BasicObject` and `Object`. These two classes are - // special because they are used in toll-free bridged classes. In each of - // these two cases, extra work is required to define the methods on toll-free - // bridged class' prototypes as well. - // - // ## Objects - // - // If a simple ruby object is the object, then the method is simply just - // defined on the object as a singleton method. This would be the case when - // a method is defined inside an `instance_eval` block. - // - // @param obj [Object, Class] the actual obj to define method for - // @param jsid [String] the JavaScript friendly method name (e.g. '$foo') - // @param body [JS.Function] the literal JavaScript function used as method - // @return [null] - // - Opal.def = function(obj, jsid, body) { - // Special case for a method definition in the - // top-level namespace - if (obj === Opal.top) { - Opal.defn(Opal.Object, jsid, body) - } - // if instance_eval is invoked on a module/class, it sets inst_eval_mod - else if (!obj.$$eval && obj.$$is_a_module) { - Opal.defn(obj, jsid, body); - } - else { - Opal.defs(obj, jsid, body); - } - }; - - // Define method on a module or class (see Opal.def). - Opal.defn = function(module, jsid, body) { - body.displayName = jsid; - body.$$owner = module; - - var proto = module.$$prototype; - if (proto.hasOwnProperty('$$dummy')) { - proto = proto.$$define_methods_on; - } - $defineProperty(proto, jsid, body); - - if (module.$$is_module) { - if (module.$$module_function) { - Opal.defs(module, jsid, body) - } - - for (var i = 0, iclasses = module.$$iclasses, length = iclasses.length; i < length; i++) { - var iclass = iclasses[i]; - $defineProperty(iclass, jsid, body); - } - } - - var singleton_of = module.$$singleton_of; - if (module.$method_added && !module.$method_added.$$stub && !singleton_of) { - module.$method_added(jsid.substr(1)); - } - else if (singleton_of && singleton_of.$singleton_method_added && !singleton_of.$singleton_method_added.$$stub) { - singleton_of.$singleton_method_added(jsid.substr(1)); - } - } - - // Define a singleton method on the given object (see Opal.def). - Opal.defs = function(obj, jsid, body) { - if (obj.$$is_string || obj.$$is_number) { - throw Opal.TypeError.$new("can't define singleton"); - } - Opal.defn(Opal.get_singleton_class(obj), jsid, body) - }; - - // Called from #remove_method. - Opal.rdef = function(obj, jsid) { - if (!$hasOwn.call(obj.$$prototype, jsid)) { - throw Opal.NameError.$new("method '" + jsid.substr(1) + "' not defined in " + obj.$name()); - } - - delete obj.$$prototype[jsid]; - - if (obj.$$is_singleton) { - if (obj.$$prototype.$singleton_method_removed && !obj.$$prototype.$singleton_method_removed.$$stub) { - obj.$$prototype.$singleton_method_removed(jsid.substr(1)); - } - } - else { - if (obj.$method_removed && !obj.$method_removed.$$stub) { - obj.$method_removed(jsid.substr(1)); - } - } - }; - - // Called from #undef_method. - Opal.udef = function(obj, jsid) { - if (!obj.$$prototype[jsid] || obj.$$prototype[jsid].$$stub) { - throw Opal.NameError.$new("method '" + jsid.substr(1) + "' not defined in " + obj.$name()); - } - - Opal.add_stub_for(obj.$$prototype, jsid); - - if (obj.$$is_singleton) { - if (obj.$$prototype.$singleton_method_undefined && !obj.$$prototype.$singleton_method_undefined.$$stub) { - obj.$$prototype.$singleton_method_undefined(jsid.substr(1)); - } - } - else { - if (obj.$method_undefined && !obj.$method_undefined.$$stub) { - obj.$method_undefined(jsid.substr(1)); - } - } - }; - - function is_method_body(body) { - return (typeof(body) === "function" && !body.$$stub); - } - - Opal.alias = function(obj, name, old) { - var id = '$' + name, - old_id = '$' + old, - body = obj.$$prototype['$' + old], - alias; - - // When running inside #instance_eval the alias refers to class methods. - if (obj.$$eval) { - return Opal.alias(Opal.get_singleton_class(obj), name, old); - } - - if (!is_method_body(body)) { - var ancestor = obj.$$super; - - while (typeof(body) !== "function" && ancestor) { - body = ancestor[old_id]; - ancestor = ancestor.$$super; - } - - if (!is_method_body(body) && obj.$$is_module) { - // try to look into Object - body = Opal.Object.$$prototype[old_id] - } - - if (!is_method_body(body)) { - throw Opal.NameError.$new("undefined method `" + old + "' for class `" + obj.$name() + "'") - } - } - - // If the body is itself an alias use the original body - // to keep the max depth at 1. - if (body.$$alias_of) body = body.$$alias_of; - - // We need a wrapper because otherwise properties - // would be ovrewritten on the original body. - alias = function() { - var block = alias.$$p, args, i, ii; - - args = new Array(arguments.length); - for(i = 0, ii = arguments.length; i < ii; i++) { - args[i] = arguments[i]; - } - - if (block != null) { alias.$$p = null } - - return Opal.send(this, body, args, block); - }; - - // Try to make the browser pick the right name - alias.displayName = name; - alias.length = body.length; - alias.$$arity = body.$$arity; - alias.$$parameters = body.$$parameters; - alias.$$source_location = body.$$source_location; - alias.$$alias_of = body; - alias.$$alias_name = name; - - Opal.defn(obj, id, alias); - - return obj; - }; - - Opal.alias_native = function(obj, name, native_name) { - var id = '$' + name, - body = obj.$$prototype[native_name]; - - if (typeof(body) !== "function" || body.$$stub) { - throw Opal.NameError.$new("undefined native method `" + native_name + "' for class `" + obj.$name() + "'") - } - - Opal.defn(obj, id, body); - - return obj; - }; - - - // Hashes - // ------ - - Opal.hash_init = function(hash) { - hash.$$smap = Object.create(null); - hash.$$map = Object.create(null); - hash.$$keys = []; - }; - - Opal.hash_clone = function(from_hash, to_hash) { - to_hash.$$none = from_hash.$$none; - to_hash.$$proc = from_hash.$$proc; - - for (var i = 0, keys = from_hash.$$keys, smap = from_hash.$$smap, len = keys.length, key, value; i < len; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = smap[key]; - } else { - value = key.value; - key = key.key; - } - - Opal.hash_put(to_hash, key, value); - } - }; - - Opal.hash_put = function(hash, key, value) { - if (key.$$is_string) { - if (!$hasOwn.call(hash.$$smap, key)) { - hash.$$keys.push(key); - } - hash.$$smap[key] = value; - return; - } - - var key_hash, bucket, last_bucket; - key_hash = hash.$$by_identity ? Opal.id(key) : key.$hash(); - - if (!$hasOwn.call(hash.$$map, key_hash)) { - bucket = {key: key, key_hash: key_hash, value: value}; - hash.$$keys.push(bucket); - hash.$$map[key_hash] = bucket; - return; - } - - bucket = hash.$$map[key_hash]; - - while (bucket) { - if (key === bucket.key || key['$eql?'](bucket.key)) { - last_bucket = undefined; - bucket.value = value; - break; - } - last_bucket = bucket; - bucket = bucket.next; - } - - if (last_bucket) { - bucket = {key: key, key_hash: key_hash, value: value}; - hash.$$keys.push(bucket); - last_bucket.next = bucket; - } - }; - - Opal.hash_get = function(hash, key) { - if (key.$$is_string) { - if ($hasOwn.call(hash.$$smap, key)) { - return hash.$$smap[key]; - } - return; - } - - var key_hash, bucket; - key_hash = hash.$$by_identity ? Opal.id(key) : key.$hash(); - - if ($hasOwn.call(hash.$$map, key_hash)) { - bucket = hash.$$map[key_hash]; - - while (bucket) { - if (key === bucket.key || key['$eql?'](bucket.key)) { - return bucket.value; - } - bucket = bucket.next; - } - } - }; - - Opal.hash_delete = function(hash, key) { - var i, keys = hash.$$keys, length = keys.length, value; - - if (key.$$is_string) { - if (!$hasOwn.call(hash.$$smap, key)) { - return; - } - - for (i = 0; i < length; i++) { - if (keys[i] === key) { - keys.splice(i, 1); - break; - } - } - - value = hash.$$smap[key]; - delete hash.$$smap[key]; - return value; - } - - var key_hash = key.$hash(); - - if (!$hasOwn.call(hash.$$map, key_hash)) { - return; - } - - var bucket = hash.$$map[key_hash], last_bucket; - - while (bucket) { - if (key === bucket.key || key['$eql?'](bucket.key)) { - value = bucket.value; - - for (i = 0; i < length; i++) { - if (keys[i] === bucket) { - keys.splice(i, 1); - break; - } - } - - if (last_bucket && bucket.next) { - last_bucket.next = bucket.next; - } - else if (last_bucket) { - delete last_bucket.next; - } - else if (bucket.next) { - hash.$$map[key_hash] = bucket.next; - } - else { - delete hash.$$map[key_hash]; - } - - return value; - } - last_bucket = bucket; - bucket = bucket.next; - } - }; - - Opal.hash_rehash = function(hash) { - for (var i = 0, length = hash.$$keys.length, key_hash, bucket, last_bucket; i < length; i++) { - - if (hash.$$keys[i].$$is_string) { - continue; - } - - key_hash = hash.$$keys[i].key.$hash(); - - if (key_hash === hash.$$keys[i].key_hash) { - continue; - } - - bucket = hash.$$map[hash.$$keys[i].key_hash]; - last_bucket = undefined; - - while (bucket) { - if (bucket === hash.$$keys[i]) { - if (last_bucket && bucket.next) { - last_bucket.next = bucket.next; - } - else if (last_bucket) { - delete last_bucket.next; - } - else if (bucket.next) { - hash.$$map[hash.$$keys[i].key_hash] = bucket.next; - } - else { - delete hash.$$map[hash.$$keys[i].key_hash]; - } - break; - } - last_bucket = bucket; - bucket = bucket.next; - } - - hash.$$keys[i].key_hash = key_hash; - - if (!$hasOwn.call(hash.$$map, key_hash)) { - hash.$$map[key_hash] = hash.$$keys[i]; - continue; - } - - bucket = hash.$$map[key_hash]; - last_bucket = undefined; - - while (bucket) { - if (bucket === hash.$$keys[i]) { - last_bucket = undefined; - break; - } - last_bucket = bucket; - bucket = bucket.next; - } - - if (last_bucket) { - last_bucket.next = hash.$$keys[i]; - } - } - }; - - Opal.hash = function() { - var arguments_length = arguments.length, args, hash, i, length, key, value; - - if (arguments_length === 1 && arguments[0].$$is_hash) { - return arguments[0]; - } - - hash = new Opal.Hash(); - Opal.hash_init(hash); - - if (arguments_length === 1 && arguments[0].$$is_array) { - args = arguments[0]; - length = args.length; - - for (i = 0; i < length; i++) { - if (args[i].length !== 2) { - throw Opal.ArgumentError.$new("value not of length 2: " + args[i].$inspect()); - } - - key = args[i][0]; - value = args[i][1]; - - Opal.hash_put(hash, key, value); - } - - return hash; - } - - if (arguments_length === 1) { - args = arguments[0]; - for (key in args) { - if ($hasOwn.call(args, key)) { - value = args[key]; - - Opal.hash_put(hash, key, value); - } - } - - return hash; - } - - if (arguments_length % 2 !== 0) { - throw Opal.ArgumentError.$new("odd number of arguments for Hash"); - } - - for (i = 0; i < arguments_length; i += 2) { - key = arguments[i]; - value = arguments[i + 1]; - - Opal.hash_put(hash, key, value); - } - - return hash; - }; - - // A faster Hash creator for hashes that just use symbols and - // strings as keys. The map and keys array can be constructed at - // compile time, so they are just added here by the constructor - // function. - // - Opal.hash2 = function(keys, smap) { - var hash = new Opal.Hash(); - - hash.$$smap = smap; - hash.$$map = Object.create(null); - hash.$$keys = keys; - - return hash; - }; - - // Create a new range instance with first and last values, and whether the - // range excludes the last value. - // - Opal.range = function(first, last, exc) { - var range = new Opal.Range(); - range.begin = first; - range.end = last; - range.excl = exc; - - return range; - }; - - // Get the ivar name for a given name. - // Mostly adds a trailing $ to reserved names. - // - Opal.ivar = function(name) { - if ( - // properties - name === "constructor" || - name === "displayName" || - name === "__count__" || - name === "__noSuchMethod__" || - name === "__parent__" || - name === "__proto__" || - - // methods - name === "hasOwnProperty" || - name === "valueOf" - ) - { - return name + "$"; - } - - return name; - }; - - - // Regexps - // ------- - - // Escape Regexp special chars letting the resulting string be used to build - // a new Regexp. - // - Opal.escape_regexp = function(str) { - return str.replace(/([-[\]\/{}()*+?.^$\\| ])/g, '\\$1') - .replace(/[\n]/g, '\\n') - .replace(/[\r]/g, '\\r') - .replace(/[\f]/g, '\\f') - .replace(/[\t]/g, '\\t'); - }; - - // Create a global Regexp from a RegExp object and cache the result - // on the object itself ($$g attribute). - // - Opal.global_regexp = function(pattern) { - if (pattern.global) { - return pattern; // RegExp already has the global flag - } - if (pattern.$$g == null) { - pattern.$$g = new RegExp(pattern.source, (pattern.multiline ? 'gm' : 'g') + (pattern.ignoreCase ? 'i' : '')); - } else { - pattern.$$g.lastIndex = null; // reset lastIndex property - } - return pattern.$$g; - }; - - // Create a global multiline Regexp from a RegExp object and cache the result - // on the object itself ($$gm or $$g attribute). - // - Opal.global_multiline_regexp = function(pattern) { - var result; - if (pattern.multiline) { - if (pattern.global) { - return pattern; // RegExp already has the global and multiline flag - } - // we are using the $$g attribute because the Regexp is already multiline - if (pattern.$$g != null) { - result = pattern.$$g; - } else { - result = pattern.$$g = new RegExp(pattern.source, 'gm' + (pattern.ignoreCase ? 'i' : '')); - } - } else if (pattern.$$gm != null) { - result = pattern.$$gm; - } else { - result = pattern.$$gm = new RegExp(pattern.source, 'gm' + (pattern.ignoreCase ? 'i' : '')); - } - result.lastIndex = null; // reset lastIndex property - return result; - }; - - // Require system - // -------------- - - Opal.modules = {}; - Opal.loaded_features = ['corelib/runtime']; - Opal.current_dir = '.'; - Opal.require_table = {'corelib/runtime': true}; - - Opal.normalize = function(path) { - var parts, part, new_parts = [], SEPARATOR = '/'; - - if (Opal.current_dir !== '.') { - path = Opal.current_dir.replace(/\/*$/, '/') + path; - } - - path = path.replace(/^\.\//, ''); - path = path.replace(/\.(rb|opal|js)$/, ''); - parts = path.split(SEPARATOR); - - for (var i = 0, ii = parts.length; i < ii; i++) { - part = parts[i]; - if (part === '') continue; - (part === '..') ? new_parts.pop() : new_parts.push(part) - } - - return new_parts.join(SEPARATOR); - }; - - Opal.loaded = function(paths) { - var i, l, path; - - for (i = 0, l = paths.length; i < l; i++) { - path = Opal.normalize(paths[i]); - - if (Opal.require_table[path]) { - continue; - } - - Opal.loaded_features.push(path); - Opal.require_table[path] = true; - } - }; - - Opal.load = function(path) { - path = Opal.normalize(path); - - Opal.loaded([path]); - - var module = Opal.modules[path]; - - if (module) { - module(Opal); - } - else { - var severity = Opal.config.missing_require_severity; - var message = 'cannot load such file -- ' + path; - - if (severity === "error") { - if (Opal.LoadError) { - throw Opal.LoadError.$new(message) - } else { - throw message - } - } - else if (severity === "warning") { - console.warn('WARNING: LoadError: ' + message); - } - } - - return true; - }; - - Opal.require = function(path) { - path = Opal.normalize(path); - - if (Opal.require_table[path]) { - return false; - } - - return Opal.load(path); - }; - - - // Strings - // ------- - - Opal.encodings = Object.create(null); - - // Sets the encoding on a string, will treat string literals as frozen strings - // raising a FrozenError. - // @param str [String] the string on which the encoding should be set. - // @param name [String] the canonical name of the encoding - Opal.set_encoding = function(str, name) { - if (typeof str === 'string') - throw Opal.FrozenError.$new("can't modify frozen String"); - - var encoding = Opal.encodings[name]; - - if (encoding === str.encoding) { return str; } - - str.encoding = encoding; - - return str; - }; - - // @returns a String object with the encoding set from a string literal - Opal.enc = function(str, name) { - var dup = new String(str); - Opal.set_encoding(dup, name); - dup.internal_encoding = dup.encoding; - return dup - } - - - // Initialization - // -------------- - function $BasicObject() {}; - function $Object() {}; - function $Module() {}; - function $Class() {}; - - Opal.BasicObject = BasicObject = Opal.allocate_class('BasicObject', null, $BasicObject); - Opal.Object = _Object = Opal.allocate_class('Object', Opal.BasicObject, $Object); - Opal.Module = Module = Opal.allocate_class('Module', Opal.Object, $Module); - Opal.Class = Class = Opal.allocate_class('Class', Opal.Module, $Class); - - $setPrototype(Opal.BasicObject, Opal.Class.$$prototype); - $setPrototype(Opal.Object, Opal.Class.$$prototype); - $setPrototype(Opal.Module, Opal.Class.$$prototype); - $setPrototype(Opal.Class, Opal.Class.$$prototype); - - // BasicObject can reach itself, avoid const_set to skip the $$base_module logic - BasicObject.$$const["BasicObject"] = BasicObject; - - // Assign basic constants - Opal.const_set(_Object, "BasicObject", BasicObject); - Opal.const_set(_Object, "Object", _Object); - Opal.const_set(_Object, "Module", Module); - Opal.const_set(_Object, "Class", Class); - - // Fix booted classes to have correct .class value - BasicObject.$$class = Class; - _Object.$$class = Class; - Module.$$class = Class; - Class.$$class = Class; - - // Forward .toString() to #to_s - $defineProperty(_Object.$$prototype, 'toString', function() { - var to_s = this.$to_s(); - if (to_s.$$is_string && typeof(to_s) === 'object') { - // a string created using new String('string') - return to_s.valueOf(); - } else { - return to_s; - } - }); - - // Make Kernel#require immediately available as it's needed to require all the - // other corelib files. - $defineProperty(_Object.$$prototype, '$require', Opal.require); - - // Add a short helper to navigate constants manually. - // @example - // Opal.$$.Regexp.$$.IGNORECASE - Opal.$$ = _Object.$$; - - // Instantiate the main object - Opal.top = new _Object(); - Opal.top.$to_s = Opal.top.$inspect = function() { return 'main' }; - - - // Nil - function $NilClass() {}; - Opal.NilClass = Opal.allocate_class('NilClass', Opal.Object, $NilClass); - Opal.const_set(_Object, 'NilClass', Opal.NilClass); - nil = Opal.nil = new Opal.NilClass(); - nil.$$id = nil_id; - nil.call = nil.apply = function() { throw Opal.LocalJumpError.$new('no block given'); }; - - // Errors - Opal.breaker = new Error('unexpected break (old)'); - Opal.returner = new Error('unexpected return'); - TypeError.$$super = Error; -}).call(this); -Opal.loaded(["corelib/runtime.js"]); -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/helpers"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy; - - Opal.add_stubs(['$new', '$class', '$===', '$respond_to?', '$raise', '$type_error', '$__send__', '$coerce_to', '$nil?', '$<=>', '$coerce_to!', '$!=', '$[]', '$upcase']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Opal'); - - var $nesting = [self].concat($parent_nesting), $Opal_bridge$1, $Opal_type_error$2, $Opal_coerce_to$3, $Opal_coerce_to$excl$4, $Opal_coerce_to$ques$5, $Opal_try_convert$6, $Opal_compare$7, $Opal_destructure$8, $Opal_respond_to$ques$9, $Opal_inspect_obj$10, $Opal_instance_variable_name$excl$11, $Opal_class_variable_name$excl$12, $Opal_const_name$excl$13, $Opal_pristine$14; - - - Opal.defs(self, '$bridge', $Opal_bridge$1 = function $$bridge(constructor, klass) { - var self = this; - - return Opal.bridge(constructor, klass); - }, $Opal_bridge$1.$$arity = 2); - Opal.defs(self, '$type_error', $Opal_type_error$2 = function $$type_error(object, type, method, coerced) { - var $a, self = this; - - - - if (method == null) { - method = nil; - }; - - if (coerced == null) { - coerced = nil; - }; - if ($truthy(($truthy($a = method) ? coerced : $a))) { - return $$($nesting, 'TypeError').$new("" + "can't convert " + (object.$class()) + " into " + (type) + " (" + (object.$class()) + "#" + (method) + " gives " + (coerced.$class()) + ")") - } else { - return $$($nesting, 'TypeError').$new("" + "no implicit conversion of " + (object.$class()) + " into " + (type)) - }; - }, $Opal_type_error$2.$$arity = -3); - Opal.defs(self, '$coerce_to', $Opal_coerce_to$3 = function $$coerce_to(object, type, method) { - var self = this; - - - if ($truthy(type['$==='](object))) { - return object}; - if ($truthy(object['$respond_to?'](method))) { - } else { - self.$raise(self.$type_error(object, type)) - }; - return object.$__send__(method); - }, $Opal_coerce_to$3.$$arity = 3); - Opal.defs(self, '$coerce_to!', $Opal_coerce_to$excl$4 = function(object, type, method) { - var self = this, coerced = nil; - - - coerced = self.$coerce_to(object, type, method); - if ($truthy(type['$==='](coerced))) { - } else { - self.$raise(self.$type_error(object, type, method, coerced)) - }; - return coerced; - }, $Opal_coerce_to$excl$4.$$arity = 3); - Opal.defs(self, '$coerce_to?', $Opal_coerce_to$ques$5 = function(object, type, method) { - var self = this, coerced = nil; - - - if ($truthy(object['$respond_to?'](method))) { - } else { - return nil - }; - coerced = self.$coerce_to(object, type, method); - if ($truthy(coerced['$nil?']())) { - return nil}; - if ($truthy(type['$==='](coerced))) { - } else { - self.$raise(self.$type_error(object, type, method, coerced)) - }; - return coerced; - }, $Opal_coerce_to$ques$5.$$arity = 3); - Opal.defs(self, '$try_convert', $Opal_try_convert$6 = function $$try_convert(object, type, method) { - var self = this; - - - if ($truthy(type['$==='](object))) { - return object}; - if ($truthy(object['$respond_to?'](method))) { - return object.$__send__(method) - } else { - return nil - }; - }, $Opal_try_convert$6.$$arity = 3); - Opal.defs(self, '$compare', $Opal_compare$7 = function $$compare(a, b) { - var self = this, compare = nil; - - - compare = a['$<=>'](b); - if ($truthy(compare === nil)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (a.$class()) + " with " + (b.$class()) + " failed")}; - return compare; - }, $Opal_compare$7.$$arity = 2); - Opal.defs(self, '$destructure', $Opal_destructure$8 = function $$destructure(args) { - var self = this; - - - if (args.length == 1) { - return args[0]; - } - else if (args.$$is_array) { - return args; - } - else { - var args_ary = new Array(args.length); - for(var i = 0, l = args_ary.length; i < l; i++) { args_ary[i] = args[i]; } - - return args_ary; - } - - }, $Opal_destructure$8.$$arity = 1); - Opal.defs(self, '$respond_to?', $Opal_respond_to$ques$9 = function(obj, method, include_all) { - var self = this; - - - - if (include_all == null) { - include_all = false; - }; - - if (obj == null || !obj.$$class) { - return false; - } - ; - return obj['$respond_to?'](method, include_all); - }, $Opal_respond_to$ques$9.$$arity = -3); - Opal.defs(self, '$inspect_obj', $Opal_inspect_obj$10 = function $$inspect_obj(obj) { - var self = this; - - return Opal.inspect(obj); - }, $Opal_inspect_obj$10.$$arity = 1); - Opal.defs(self, '$instance_variable_name!', $Opal_instance_variable_name$excl$11 = function(name) { - var self = this; - - - name = $$($nesting, 'Opal')['$coerce_to!'](name, $$($nesting, 'String'), "to_str"); - if ($truthy(/^@[a-zA-Z_][a-zA-Z0-9_]*?$/.test(name))) { - } else { - self.$raise($$($nesting, 'NameError').$new("" + "'" + (name) + "' is not allowed as an instance variable name", name)) - }; - return name; - }, $Opal_instance_variable_name$excl$11.$$arity = 1); - Opal.defs(self, '$class_variable_name!', $Opal_class_variable_name$excl$12 = function(name) { - var self = this; - - - name = $$($nesting, 'Opal')['$coerce_to!'](name, $$($nesting, 'String'), "to_str"); - if ($truthy(name.length < 3 || name.slice(0,2) !== '@@')) { - self.$raise($$($nesting, 'NameError').$new("" + "`" + (name) + "' is not allowed as a class variable name", name))}; - return name; - }, $Opal_class_variable_name$excl$12.$$arity = 1); - Opal.defs(self, '$const_name!', $Opal_const_name$excl$13 = function(const_name) { - var self = this; - - - const_name = $$($nesting, 'Opal')['$coerce_to!'](const_name, $$($nesting, 'String'), "to_str"); - if ($truthy(const_name['$[]'](0)['$!='](const_name['$[]'](0).$upcase()))) { - self.$raise($$($nesting, 'NameError'), "" + "wrong constant name " + (const_name))}; - return const_name; - }, $Opal_const_name$excl$13.$$arity = 1); - Opal.defs(self, '$pristine', $Opal_pristine$14 = function $$pristine(owner_class, $a) { - var $post_args, method_names, self = this; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - method_names = $post_args;; - - var method_name, method; - for (var i = method_names.length - 1; i >= 0; i--) { - method_name = method_names[i]; - method = owner_class.$$prototype['$'+method_name]; - - if (method && !method.$$stub) { - method.$$pristine = true; - } - } - ; - return nil; - }, $Opal_pristine$14.$$arity = -2); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/module"] = function(Opal) { - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $lambda = Opal.lambda, $range = Opal.range, $hash2 = Opal.hash2; - - Opal.add_stubs(['$module_eval', '$to_proc', '$===', '$raise', '$equal?', '$<', '$>', '$nil?', '$attr_reader', '$attr_writer', '$class_variable_name!', '$new', '$const_name!', '$=~', '$inject', '$split', '$const_get', '$==', '$!~', '$start_with?', '$bind', '$call', '$class', '$append_features', '$included', '$name', '$cover?', '$size', '$merge', '$compile', '$proc', '$any?', '$prepend_features', '$prepended', '$to_s', '$__id__', '$constants', '$include?', '$copy_class_variables', '$copy_constants']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Module'); - - var $nesting = [self].concat($parent_nesting), $Module_allocate$1, $Module_initialize$2, $Module_$eq_eq_eq$3, $Module_$lt$4, $Module_$lt_eq$5, $Module_$gt$6, $Module_$gt_eq$7, $Module_$lt_eq_gt$8, $Module_alias_method$9, $Module_alias_native$10, $Module_ancestors$11, $Module_append_features$12, $Module_attr_accessor$13, $Module_attr_reader$14, $Module_attr_writer$15, $Module_autoload$16, $Module_class_variables$17, $Module_class_variable_get$18, $Module_class_variable_set$19, $Module_class_variable_defined$ques$20, $Module_remove_class_variable$21, $Module_constants$22, $Module_constants$23, $Module_nesting$24, $Module_const_defined$ques$25, $Module_const_get$26, $Module_const_missing$28, $Module_const_set$29, $Module_public_constant$30, $Module_define_method$31, $Module_remove_method$33, $Module_singleton_class$ques$34, $Module_include$35, $Module_included_modules$36, $Module_include$ques$37, $Module_instance_method$38, $Module_instance_methods$39, $Module_included$40, $Module_extended$41, $Module_extend_object$42, $Module_method_added$43, $Module_method_removed$44, $Module_method_undefined$45, $Module_module_eval$46, $Module_module_exec$48, $Module_method_defined$ques$49, $Module_module_function$50, $Module_name$51, $Module_prepend$52, $Module_prepend_features$53, $Module_prepended$54, $Module_remove_const$55, $Module_to_s$56, $Module_undef_method$57, $Module_instance_variables$58, $Module_dup$59, $Module_copy_class_variables$60, $Module_copy_constants$61; - - - Opal.defs(self, '$allocate', $Module_allocate$1 = function $$allocate() { - var self = this; - - - var module = Opal.allocate_module(nil, function(){}); - // Link the prototype of Module subclasses - if (self !== Opal.Module) Object.setPrototypeOf(module, self.$$prototype); - return module; - - }, $Module_allocate$1.$$arity = 0); - - Opal.def(self, '$initialize', $Module_initialize$2 = function $$initialize() { - var $iter = $Module_initialize$2.$$p, block = $iter || nil, self = this; - - if ($iter) $Module_initialize$2.$$p = null; - - - if ($iter) $Module_initialize$2.$$p = null;; - if ((block !== nil)) { - return $send(self, 'module_eval', [], block.$to_proc()) - } else { - return nil - }; - }, $Module_initialize$2.$$arity = 0); - - Opal.def(self, '$===', $Module_$eq_eq_eq$3 = function(object) { - var self = this; - - - if ($truthy(object == null)) { - return false}; - return Opal.is_a(object, self);; - }, $Module_$eq_eq_eq$3.$$arity = 1); - - Opal.def(self, '$<', $Module_$lt$4 = function(other) { - var self = this; - - - if ($truthy($$($nesting, 'Module')['$==='](other))) { - } else { - self.$raise($$($nesting, 'TypeError'), "compared with non class/module") - }; - - var working = self, - ancestors, - i, length; - - if (working === other) { - return false; - } - - for (i = 0, ancestors = Opal.ancestors(self), length = ancestors.length; i < length; i++) { - if (ancestors[i] === other) { - return true; - } - } - - for (i = 0, ancestors = Opal.ancestors(other), length = ancestors.length; i < length; i++) { - if (ancestors[i] === self) { - return false; - } - } - - return nil; - ; - }, $Module_$lt$4.$$arity = 1); - - Opal.def(self, '$<=', $Module_$lt_eq$5 = function(other) { - var $a, self = this; - - return ($truthy($a = self['$equal?'](other)) ? $a : $rb_lt(self, other)) - }, $Module_$lt_eq$5.$$arity = 1); - - Opal.def(self, '$>', $Module_$gt$6 = function(other) { - var self = this; - - - if ($truthy($$($nesting, 'Module')['$==='](other))) { - } else { - self.$raise($$($nesting, 'TypeError'), "compared with non class/module") - }; - return $rb_lt(other, self); - }, $Module_$gt$6.$$arity = 1); - - Opal.def(self, '$>=', $Module_$gt_eq$7 = function(other) { - var $a, self = this; - - return ($truthy($a = self['$equal?'](other)) ? $a : $rb_gt(self, other)) - }, $Module_$gt_eq$7.$$arity = 1); - - Opal.def(self, '$<=>', $Module_$lt_eq_gt$8 = function(other) { - var self = this, lt = nil; - - - - if (self === other) { - return 0; - } - ; - if ($truthy($$($nesting, 'Module')['$==='](other))) { - } else { - return nil - }; - lt = $rb_lt(self, other); - if ($truthy(lt['$nil?']())) { - return nil}; - if ($truthy(lt)) { - return -1 - } else { - return 1 - }; - }, $Module_$lt_eq_gt$8.$$arity = 1); - - Opal.def(self, '$alias_method', $Module_alias_method$9 = function $$alias_method(newname, oldname) { - var self = this; - - - Opal.alias(self, newname, oldname); - return self; - }, $Module_alias_method$9.$$arity = 2); - - Opal.def(self, '$alias_native', $Module_alias_native$10 = function $$alias_native(mid, jsid) { - var self = this; - - - - if (jsid == null) { - jsid = mid; - }; - Opal.alias_native(self, mid, jsid); - return self; - }, $Module_alias_native$10.$$arity = -2); - - Opal.def(self, '$ancestors', $Module_ancestors$11 = function $$ancestors() { - var self = this; - - return Opal.ancestors(self); - }, $Module_ancestors$11.$$arity = 0); - - Opal.def(self, '$append_features', $Module_append_features$12 = function $$append_features(includer) { - var self = this; - - - Opal.append_features(self, includer); - return self; - }, $Module_append_features$12.$$arity = 1); - - Opal.def(self, '$attr_accessor', $Module_attr_accessor$13 = function $$attr_accessor($a) { - var $post_args, names, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - names = $post_args;; - $send(self, 'attr_reader', Opal.to_a(names)); - return $send(self, 'attr_writer', Opal.to_a(names)); - }, $Module_attr_accessor$13.$$arity = -1); - Opal.alias(self, "attr", "attr_accessor"); - - Opal.def(self, '$attr_reader', $Module_attr_reader$14 = function $$attr_reader($a) { - var $post_args, names, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - names = $post_args;; - - var proto = self.$$prototype; - - for (var i = names.length - 1; i >= 0; i--) { - var name = names[i], - id = '$' + name, - ivar = Opal.ivar(name); - - // the closure here is needed because name will change at the next - // cycle, I wish we could use let. - var body = (function(ivar) { - return function() { - if (this[ivar] == null) { - return nil; - } - else { - return this[ivar]; - } - }; - })(ivar); - - // initialize the instance variable as nil - Opal.defineProperty(proto, ivar, nil); - - body.$$parameters = []; - body.$$arity = 0; - - Opal.defn(self, id, body); - } - ; - return nil; - }, $Module_attr_reader$14.$$arity = -1); - - Opal.def(self, '$attr_writer', $Module_attr_writer$15 = function $$attr_writer($a) { - var $post_args, names, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - names = $post_args;; - - var proto = self.$$prototype; - - for (var i = names.length - 1; i >= 0; i--) { - var name = names[i], - id = '$' + name + '=', - ivar = Opal.ivar(name); - - // the closure here is needed because name will change at the next - // cycle, I wish we could use let. - var body = (function(ivar){ - return function(value) { - return this[ivar] = value; - } - })(ivar); - - body.$$parameters = [['req']]; - body.$$arity = 1; - - // initialize the instance variable as nil - Opal.defineProperty(proto, ivar, nil); - - Opal.defn(self, id, body); - } - ; - return nil; - }, $Module_attr_writer$15.$$arity = -1); - - Opal.def(self, '$autoload', $Module_autoload$16 = function $$autoload(const$, path) { - var self = this; - - - if (self.$$autoload == null) self.$$autoload = {}; - Opal.const_cache_version++; - self.$$autoload[const$] = path; - return nil; - - }, $Module_autoload$16.$$arity = 2); - - Opal.def(self, '$class_variables', $Module_class_variables$17 = function $$class_variables() { - var self = this; - - return Object.keys(Opal.class_variables(self)); - }, $Module_class_variables$17.$$arity = 0); - - Opal.def(self, '$class_variable_get', $Module_class_variable_get$18 = function $$class_variable_get(name) { - var self = this; - - - name = $$($nesting, 'Opal')['$class_variable_name!'](name); - - var value = Opal.class_variables(self)[name]; - if (value == null) { - self.$raise($$($nesting, 'NameError').$new("" + "uninitialized class variable " + (name) + " in " + (self), name)) - } - return value; - ; - }, $Module_class_variable_get$18.$$arity = 1); - - Opal.def(self, '$class_variable_set', $Module_class_variable_set$19 = function $$class_variable_set(name, value) { - var self = this; - - - name = $$($nesting, 'Opal')['$class_variable_name!'](name); - return Opal.class_variable_set(self, name, value);; - }, $Module_class_variable_set$19.$$arity = 2); - - Opal.def(self, '$class_variable_defined?', $Module_class_variable_defined$ques$20 = function(name) { - var self = this; - - - name = $$($nesting, 'Opal')['$class_variable_name!'](name); - return Opal.class_variables(self).hasOwnProperty(name);; - }, $Module_class_variable_defined$ques$20.$$arity = 1); - - Opal.def(self, '$remove_class_variable', $Module_remove_class_variable$21 = function $$remove_class_variable(name) { - var self = this; - - - name = $$($nesting, 'Opal')['$class_variable_name!'](name); - - if (Opal.hasOwnProperty.call(self.$$cvars, name)) { - var value = self.$$cvars[name]; - delete self.$$cvars[name]; - return value; - } else { - self.$raise($$($nesting, 'NameError'), "" + "cannot remove " + (name) + " for " + (self)) - } - ; - }, $Module_remove_class_variable$21.$$arity = 1); - - Opal.def(self, '$constants', $Module_constants$22 = function $$constants(inherit) { - var self = this; - - - - if (inherit == null) { - inherit = true; - }; - return Opal.constants(self, inherit);; - }, $Module_constants$22.$$arity = -1); - Opal.defs(self, '$constants', $Module_constants$23 = function $$constants(inherit) { - var self = this; - - - ; - - if (inherit == null) { - var nesting = (self.$$nesting || []).concat(Opal.Object), - constant, constants = {}, - i, ii; - - for(i = 0, ii = nesting.length; i < ii; i++) { - for (constant in nesting[i].$$const) { - constants[constant] = true; - } - } - return Object.keys(constants); - } else { - return Opal.constants(self, inherit) - } - ; - }, $Module_constants$23.$$arity = -1); - Opal.defs(self, '$nesting', $Module_nesting$24 = function $$nesting() { - var self = this; - - return self.$$nesting || []; - }, $Module_nesting$24.$$arity = 0); - - Opal.def(self, '$const_defined?', $Module_const_defined$ques$25 = function(name, inherit) { - var self = this; - - - - if (inherit == null) { - inherit = true; - }; - name = $$($nesting, 'Opal')['$const_name!'](name); - if ($truthy(name['$=~']($$$($$($nesting, 'Opal'), 'CONST_NAME_REGEXP')))) { - } else { - self.$raise($$($nesting, 'NameError').$new("" + "wrong constant name " + (name), name)) - }; - - var module, modules = [self], module_constants, i, ii; - - // Add up ancestors if inherit is true - if (inherit) { - modules = modules.concat(Opal.ancestors(self)); - - // Add Object's ancestors if it's a module – modules have no ancestors otherwise - if (self.$$is_module) { - modules = modules.concat([Opal.Object]).concat(Opal.ancestors(Opal.Object)); - } - } - - for (i = 0, ii = modules.length; i < ii; i++) { - module = modules[i]; - if (module.$$const[name] != null) { - return true; - } - } - - return false; - ; - }, $Module_const_defined$ques$25.$$arity = -2); - - Opal.def(self, '$const_get', $Module_const_get$26 = function $$const_get(name, inherit) { - var $$27, self = this; - - - - if (inherit == null) { - inherit = true; - }; - name = $$($nesting, 'Opal')['$const_name!'](name); - - if (name.indexOf('::') === 0 && name !== '::'){ - name = name.slice(2); - } - ; - if ($truthy(name.indexOf('::') != -1 && name != '::')) { - return $send(name.$split("::"), 'inject', [self], ($$27 = function(o, c){var self = $$27.$$s || this; - - - - if (o == null) { - o = nil; - }; - - if (c == null) { - c = nil; - }; - return o.$const_get(c);}, $$27.$$s = self, $$27.$$arity = 2, $$27))}; - if ($truthy(name['$=~']($$$($$($nesting, 'Opal'), 'CONST_NAME_REGEXP')))) { - } else { - self.$raise($$($nesting, 'NameError').$new("" + "wrong constant name " + (name), name)) - }; - - if (inherit) { - return $$([self], name); - } else { - return Opal.const_get_local(self, name); - } - ; - }, $Module_const_get$26.$$arity = -2); - - Opal.def(self, '$const_missing', $Module_const_missing$28 = function $$const_missing(name) { - var self = this, full_const_name = nil; - - - - if (self.$$autoload) { - var file = self.$$autoload[name]; - - if (file) { - self.$require(file); - - return self.$const_get(name); - } - } - ; - full_const_name = (function() {if (self['$==']($$($nesting, 'Object'))) { - return name - } else { - return "" + (self) + "::" + (name) - }; return nil; })(); - return self.$raise($$($nesting, 'NameError').$new("" + "uninitialized constant " + (full_const_name), name)); - }, $Module_const_missing$28.$$arity = 1); - - Opal.def(self, '$const_set', $Module_const_set$29 = function $$const_set(name, value) { - var $a, self = this; - - - name = $$($nesting, 'Opal')['$const_name!'](name); - if ($truthy(($truthy($a = name['$!~']($$$($$($nesting, 'Opal'), 'CONST_NAME_REGEXP'))) ? $a : name['$start_with?']("::")))) { - self.$raise($$($nesting, 'NameError').$new("" + "wrong constant name " + (name), name))}; - Opal.const_set(self, name, value); - return value; - }, $Module_const_set$29.$$arity = 2); - - Opal.def(self, '$public_constant', $Module_public_constant$30 = function $$public_constant(const_name) { - var self = this; - - return nil - }, $Module_public_constant$30.$$arity = 1); - - Opal.def(self, '$define_method', $Module_define_method$31 = function $$define_method(name, method) { - var $iter = $Module_define_method$31.$$p, block = $iter || nil, $a, $$32, self = this, $case = nil; - - if ($iter) $Module_define_method$31.$$p = null; - - - if ($iter) $Module_define_method$31.$$p = null;; - ; - if ($truthy(method === undefined && block === nil)) { - self.$raise($$($nesting, 'ArgumentError'), "tried to create a Proc object without a block")}; - block = ($truthy($a = block) ? $a : (function() {$case = method; - if ($$($nesting, 'Proc')['$===']($case)) {return method} - else if ($$($nesting, 'Method')['$===']($case)) {return method.$to_proc().$$unbound} - else if ($$($nesting, 'UnboundMethod')['$===']($case)) {return $lambda(($$32 = function($b){var self = $$32.$$s || this, $post_args, args, bound = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - bound = method.$bind(self); - return $send(bound, 'call', Opal.to_a(args));}, $$32.$$s = self, $$32.$$arity = -1, $$32))} - else {return self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + (block.$class()) + " (expected Proc/Method)")}})()); - - var id = '$' + name; - - block.$$jsid = name; - block.$$s = null; - block.$$def = block; - block.$$define_meth = true; - - Opal.defn(self, id, block); - - return name; - ; - }, $Module_define_method$31.$$arity = -2); - - Opal.def(self, '$remove_method', $Module_remove_method$33 = function $$remove_method($a) { - var $post_args, names, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - names = $post_args;; - - for (var i = 0, length = names.length; i < length; i++) { - Opal.rdef(self, "$" + names[i]); - } - ; - return self; - }, $Module_remove_method$33.$$arity = -1); - - Opal.def(self, '$singleton_class?', $Module_singleton_class$ques$34 = function() { - var self = this; - - return !!self.$$is_singleton; - }, $Module_singleton_class$ques$34.$$arity = 0); - - Opal.def(self, '$include', $Module_include$35 = function $$include($a) { - var $post_args, mods, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - mods = $post_args;; - - for (var i = mods.length - 1; i >= 0; i--) { - var mod = mods[i]; - - if (!mod.$$is_module) { - self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + ((mod).$class()) + " (expected Module)"); - } - - (mod).$append_features(self); - (mod).$included(self); - } - ; - return self; - }, $Module_include$35.$$arity = -1); - - Opal.def(self, '$included_modules', $Module_included_modules$36 = function $$included_modules() { - var self = this; - - return Opal.included_modules(self); - }, $Module_included_modules$36.$$arity = 0); - - Opal.def(self, '$include?', $Module_include$ques$37 = function(mod) { - var self = this; - - - if (!mod.$$is_module) { - self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + ((mod).$class()) + " (expected Module)"); - } - - var i, ii, mod2, ancestors = Opal.ancestors(self); - - for (i = 0, ii = ancestors.length; i < ii; i++) { - mod2 = ancestors[i]; - if (mod2 === mod && mod2 !== self) { - return true; - } - } - - return false; - - }, $Module_include$ques$37.$$arity = 1); - - Opal.def(self, '$instance_method', $Module_instance_method$38 = function $$instance_method(name) { - var self = this; - - - var meth = self.$$prototype['$' + name]; - - if (!meth || meth.$$stub) { - self.$raise($$($nesting, 'NameError').$new("" + "undefined method `" + (name) + "' for class `" + (self.$name()) + "'", name)); - } - - return $$($nesting, 'UnboundMethod').$new(self, meth.$$owner || self, meth, name); - - }, $Module_instance_method$38.$$arity = 1); - - Opal.def(self, '$instance_methods', $Module_instance_methods$39 = function $$instance_methods(include_super) { - var self = this; - - - - if (include_super == null) { - include_super = true; - }; - - if ($truthy(include_super)) { - return Opal.instance_methods(self); - } else { - return Opal.own_instance_methods(self); - } - ; - }, $Module_instance_methods$39.$$arity = -1); - - Opal.def(self, '$included', $Module_included$40 = function $$included(mod) { - var self = this; - - return nil - }, $Module_included$40.$$arity = 1); - - Opal.def(self, '$extended', $Module_extended$41 = function $$extended(mod) { - var self = this; - - return nil - }, $Module_extended$41.$$arity = 1); - - Opal.def(self, '$extend_object', $Module_extend_object$42 = function $$extend_object(object) { - var self = this; - - return nil - }, $Module_extend_object$42.$$arity = 1); - - Opal.def(self, '$method_added', $Module_method_added$43 = function $$method_added($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $Module_method_added$43.$$arity = -1); - - Opal.def(self, '$method_removed', $Module_method_removed$44 = function $$method_removed($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $Module_method_removed$44.$$arity = -1); - - Opal.def(self, '$method_undefined', $Module_method_undefined$45 = function $$method_undefined($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $Module_method_undefined$45.$$arity = -1); - - Opal.def(self, '$module_eval', $Module_module_eval$46 = function $$module_eval($a) { - var $iter = $Module_module_eval$46.$$p, block = $iter || nil, $post_args, args, $b, $$47, self = this, string = nil, file = nil, _lineno = nil, default_eval_options = nil, compiling_options = nil, compiled = nil; - - if ($iter) $Module_module_eval$46.$$p = null; - - - if ($iter) $Module_module_eval$46.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy(($truthy($b = block['$nil?']()) ? !!Opal.compile : $b))) { - - if ($truthy($range(1, 3, false)['$cover?'](args.$size()))) { - } else { - $$($nesting, 'Kernel').$raise($$($nesting, 'ArgumentError'), "wrong number of arguments (0 for 1..3)") - }; - $b = [].concat(Opal.to_a(args)), (string = ($b[0] == null ? nil : $b[0])), (file = ($b[1] == null ? nil : $b[1])), (_lineno = ($b[2] == null ? nil : $b[2])), $b; - default_eval_options = $hash2(["file", "eval"], {"file": ($truthy($b = file) ? $b : "(eval)"), "eval": true}); - compiling_options = Opal.hash({ arity_check: false }).$merge(default_eval_options); - compiled = $$($nesting, 'Opal').$compile(string, compiling_options); - block = $send($$($nesting, 'Kernel'), 'proc', [], ($$47 = function(){var self = $$47.$$s || this; - - - return (function(self) { - return eval(compiled); - })(self) - }, $$47.$$s = self, $$47.$$arity = 0, $$47)); - } else if ($truthy(args['$any?']())) { - $$($nesting, 'Kernel').$raise($$($nesting, 'ArgumentError'), "" + ("" + "wrong number of arguments (" + (args.$size()) + " for 0)") + "\n\n NOTE:If you want to enable passing a String argument please add \"require 'opal-parser'\" to your script\n")}; - - var old = block.$$s, - result; - - block.$$s = null; - result = block.apply(self, [self]); - block.$$s = old; - - return result; - ; - }, $Module_module_eval$46.$$arity = -1); - Opal.alias(self, "class_eval", "module_eval"); - - Opal.def(self, '$module_exec', $Module_module_exec$48 = function $$module_exec($a) { - var $iter = $Module_module_exec$48.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Module_module_exec$48.$$p = null; - - - if ($iter) $Module_module_exec$48.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - if (block === nil) { - self.$raise($$($nesting, 'LocalJumpError'), "no block given") - } - - var block_self = block.$$s, result; - - block.$$s = null; - result = block.apply(self, args); - block.$$s = block_self; - - return result; - ; - }, $Module_module_exec$48.$$arity = -1); - Opal.alias(self, "class_exec", "module_exec"); - - Opal.def(self, '$method_defined?', $Module_method_defined$ques$49 = function(method) { - var self = this; - - - var body = self.$$prototype['$' + method]; - return (!!body) && !body.$$stub; - - }, $Module_method_defined$ques$49.$$arity = 1); - - Opal.def(self, '$module_function', $Module_module_function$50 = function $$module_function($a) { - var $post_args, methods, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - methods = $post_args;; - - if (methods.length === 0) { - self.$$module_function = true; - } - else { - for (var i = 0, length = methods.length; i < length; i++) { - var meth = methods[i], - id = '$' + meth, - func = self.$$prototype[id]; - - Opal.defs(self, id, func); - } - } - - return self; - ; - }, $Module_module_function$50.$$arity = -1); - - Opal.def(self, '$name', $Module_name$51 = function $$name() { - var self = this; - - - if (self.$$full_name) { - return self.$$full_name; - } - - var result = [], base = self; - - while (base) { - // Give up if any of the ancestors is unnamed - if (base.$$name === nil || base.$$name == null) return nil; - - result.unshift(base.$$name); - - base = base.$$base_module; - - if (base === Opal.Object) { - break; - } - } - - if (result.length === 0) { - return nil; - } - - return self.$$full_name = result.join('::'); - - }, $Module_name$51.$$arity = 0); - - Opal.def(self, '$prepend', $Module_prepend$52 = function $$prepend($a) { - var $post_args, mods, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - mods = $post_args;; - - if (mods.length === 0) { - self.$raise($$($nesting, 'ArgumentError'), "wrong number of arguments (given 0, expected 1+)") - } - - for (var i = mods.length - 1; i >= 0; i--) { - var mod = mods[i]; - - if (!mod.$$is_module) { - self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + ((mod).$class()) + " (expected Module)"); - } - - (mod).$prepend_features(self); - (mod).$prepended(self); - } - ; - return self; - }, $Module_prepend$52.$$arity = -1); - - Opal.def(self, '$prepend_features', $Module_prepend_features$53 = function $$prepend_features(prepender) { - var self = this; - - - - if (!self.$$is_module) { - self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + (self.$class()) + " (expected Module)"); - } - - Opal.prepend_features(self, prepender) - ; - return self; - }, $Module_prepend_features$53.$$arity = 1); - - Opal.def(self, '$prepended', $Module_prepended$54 = function $$prepended(mod) { - var self = this; - - return nil - }, $Module_prepended$54.$$arity = 1); - - Opal.def(self, '$remove_const', $Module_remove_const$55 = function $$remove_const(name) { - var self = this; - - return Opal.const_remove(self, name); - }, $Module_remove_const$55.$$arity = 1); - - Opal.def(self, '$to_s', $Module_to_s$56 = function $$to_s() { - var $a, self = this; - - return ($truthy($a = Opal.Module.$name.call(self)) ? $a : "" + "#<" + (self.$$is_module ? 'Module' : 'Class') + ":0x" + (self.$__id__().$to_s(16)) + ">") - }, $Module_to_s$56.$$arity = 0); - - Opal.def(self, '$undef_method', $Module_undef_method$57 = function $$undef_method($a) { - var $post_args, names, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - names = $post_args;; - - for (var i = 0, length = names.length; i < length; i++) { - Opal.udef(self, "$" + names[i]); - } - ; - return self; - }, $Module_undef_method$57.$$arity = -1); - - Opal.def(self, '$instance_variables', $Module_instance_variables$58 = function $$instance_variables() { - var self = this, consts = nil; - - - consts = (Opal.Module.$$nesting = $nesting, self.$constants()); - - var result = []; - - for (var name in self) { - if (self.hasOwnProperty(name) && name.charAt(0) !== '$' && name !== 'constructor' && !consts['$include?'](name)) { - result.push('@' + name); - } - } - - return result; - ; - }, $Module_instance_variables$58.$$arity = 0); - - Opal.def(self, '$dup', $Module_dup$59 = function $$dup() { - var $iter = $Module_dup$59.$$p, $yield = $iter || nil, self = this, copy = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Module_dup$59.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - copy = $send(self, Opal.find_super_dispatcher(self, 'dup', $Module_dup$59, false), $zuper, $iter); - copy.$copy_class_variables(self); - copy.$copy_constants(self); - return copy; - }, $Module_dup$59.$$arity = 0); - - Opal.def(self, '$copy_class_variables', $Module_copy_class_variables$60 = function $$copy_class_variables(other) { - var self = this; - - - for (var name in other.$$cvars) { - self.$$cvars[name] = other.$$cvars[name]; - } - - }, $Module_copy_class_variables$60.$$arity = 1); - return (Opal.def(self, '$copy_constants', $Module_copy_constants$61 = function $$copy_constants(other) { - var self = this; - - - var name, other_constants = other.$$const; - - for (name in other_constants) { - Opal.const_set(self, name, other_constants[name]); - } - - }, $Module_copy_constants$61.$$arity = 1), nil) && 'copy_constants'; - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/class"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $send = Opal.send; - - Opal.add_stubs(['$require', '$class_eval', '$to_proc', '$initialize_copy', '$allocate', '$name', '$to_s']); - - self.$require("corelib/module"); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Class'); - - var $nesting = [self].concat($parent_nesting), $Class_new$1, $Class_allocate$2, $Class_inherited$3, $Class_initialize_dup$4, $Class_new$5, $Class_superclass$6, $Class_to_s$7; - - - Opal.defs(self, '$new', $Class_new$1 = function(superclass) { - var $iter = $Class_new$1.$$p, block = $iter || nil, self = this; - - if ($iter) $Class_new$1.$$p = null; - - - if ($iter) $Class_new$1.$$p = null;; - - if (superclass == null) { - superclass = $$($nesting, 'Object'); - }; - - if (!superclass.$$is_class) { - throw Opal.TypeError.$new("superclass must be a Class"); - } - - var klass = Opal.allocate_class(nil, superclass); - superclass.$inherited(klass); - (function() {if ((block !== nil)) { - return $send((klass), 'class_eval', [], block.$to_proc()) - } else { - return nil - }; return nil; })() - return klass; - ; - }, $Class_new$1.$$arity = -1); - - Opal.def(self, '$allocate', $Class_allocate$2 = function $$allocate() { - var self = this; - - - var obj = new self.$$constructor(); - obj.$$id = Opal.uid(); - return obj; - - }, $Class_allocate$2.$$arity = 0); - - Opal.def(self, '$inherited', $Class_inherited$3 = function $$inherited(cls) { - var self = this; - - return nil - }, $Class_inherited$3.$$arity = 1); - - Opal.def(self, '$initialize_dup', $Class_initialize_dup$4 = function $$initialize_dup(original) { - var self = this; - - - self.$initialize_copy(original); - - self.$$name = null; - self.$$full_name = null; - ; - }, $Class_initialize_dup$4.$$arity = 1); - - Opal.def(self, '$new', $Class_new$5 = function($a) { - var $iter = $Class_new$5.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Class_new$5.$$p = null; - - - if ($iter) $Class_new$5.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - var object = self.$allocate(); - Opal.send(object, object.$initialize, args, block); - return object; - ; - }, $Class_new$5.$$arity = -1); - - Opal.def(self, '$superclass', $Class_superclass$6 = function $$superclass() { - var self = this; - - return self.$$super || nil; - }, $Class_superclass$6.$$arity = 0); - return (Opal.def(self, '$to_s', $Class_to_s$7 = function $$to_s() { - var $iter = $Class_to_s$7.$$p, $yield = $iter || nil, self = this; - - if ($iter) $Class_to_s$7.$$p = null; - - var singleton_of = self.$$singleton_of; - - if (singleton_of && (singleton_of.$$is_a_module)) { - return "" + "#"; - } - else if (singleton_of) { - // a singleton class created from an object - return "" + "#>"; - } - return $send(self, Opal.find_super_dispatcher(self, 'to_s', $Class_to_s$7, false), [], null); - - }, $Class_to_s$7.$$arity = 0), nil) && 'to_s'; - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/basic_object"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $range = Opal.range, $hash2 = Opal.hash2, $send = Opal.send; - - Opal.add_stubs(['$==', '$!', '$nil?', '$cover?', '$size', '$raise', '$merge', '$compile', '$proc', '$any?', '$inspect', '$new']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'BasicObject'); - - var $nesting = [self].concat($parent_nesting), $BasicObject_initialize$1, $BasicObject_$eq_eq$2, $BasicObject_eql$ques$3, $BasicObject___id__$4, $BasicObject___send__$5, $BasicObject_$excl$6, $BasicObject_$not_eq$7, $BasicObject_instance_eval$8, $BasicObject_instance_exec$10, $BasicObject_singleton_method_added$11, $BasicObject_singleton_method_removed$12, $BasicObject_singleton_method_undefined$13, $BasicObject_class$14, $BasicObject_method_missing$15; - - - - Opal.def(self, '$initialize', $BasicObject_initialize$1 = function $$initialize($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $BasicObject_initialize$1.$$arity = -1); - - Opal.def(self, '$==', $BasicObject_$eq_eq$2 = function(other) { - var self = this; - - return self === other; - }, $BasicObject_$eq_eq$2.$$arity = 1); - - Opal.def(self, '$eql?', $BasicObject_eql$ques$3 = function(other) { - var self = this; - - return self['$=='](other) - }, $BasicObject_eql$ques$3.$$arity = 1); - Opal.alias(self, "equal?", "=="); - - Opal.def(self, '$__id__', $BasicObject___id__$4 = function $$__id__() { - var self = this; - - - if (self.$$id != null) { - return self.$$id; - } - Opal.defineProperty(self, '$$id', Opal.uid()); - return self.$$id; - - }, $BasicObject___id__$4.$$arity = 0); - - Opal.def(self, '$__send__', $BasicObject___send__$5 = function $$__send__(symbol, $a) { - var $iter = $BasicObject___send__$5.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $BasicObject___send__$5.$$p = null; - - - if ($iter) $BasicObject___send__$5.$$p = null;; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - - var func = self['$' + symbol] - - if (func) { - if (block !== nil) { - func.$$p = block; - } - - return func.apply(self, args); - } - - if (block !== nil) { - self.$method_missing.$$p = block; - } - - return self.$method_missing.apply(self, [symbol].concat(args)); - ; - }, $BasicObject___send__$5.$$arity = -2); - - Opal.def(self, '$!', $BasicObject_$excl$6 = function() { - var self = this; - - return false - }, $BasicObject_$excl$6.$$arity = 0); - - Opal.def(self, '$!=', $BasicObject_$not_eq$7 = function(other) { - var self = this; - - return self['$=='](other)['$!']() - }, $BasicObject_$not_eq$7.$$arity = 1); - - Opal.def(self, '$instance_eval', $BasicObject_instance_eval$8 = function $$instance_eval($a) { - var $iter = $BasicObject_instance_eval$8.$$p, block = $iter || nil, $post_args, args, $b, $$9, self = this, string = nil, file = nil, _lineno = nil, default_eval_options = nil, compiling_options = nil, compiled = nil; - - if ($iter) $BasicObject_instance_eval$8.$$p = null; - - - if ($iter) $BasicObject_instance_eval$8.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy(($truthy($b = block['$nil?']()) ? !!Opal.compile : $b))) { - - if ($truthy($range(1, 3, false)['$cover?'](args.$size()))) { - } else { - $$$('::', 'Kernel').$raise($$$('::', 'ArgumentError'), "wrong number of arguments (0 for 1..3)") - }; - $b = [].concat(Opal.to_a(args)), (string = ($b[0] == null ? nil : $b[0])), (file = ($b[1] == null ? nil : $b[1])), (_lineno = ($b[2] == null ? nil : $b[2])), $b; - default_eval_options = $hash2(["file", "eval"], {"file": ($truthy($b = file) ? $b : "(eval)"), "eval": true}); - compiling_options = Opal.hash({ arity_check: false }).$merge(default_eval_options); - compiled = $$$('::', 'Opal').$compile(string, compiling_options); - block = $send($$$('::', 'Kernel'), 'proc', [], ($$9 = function(){var self = $$9.$$s || this; - - - return (function(self) { - return eval(compiled); - })(self) - }, $$9.$$s = self, $$9.$$arity = 0, $$9)); - } else if ($truthy(args['$any?']())) { - $$$('::', 'Kernel').$raise($$$('::', 'ArgumentError'), "" + "wrong number of arguments (" + (args.$size()) + " for 0)")}; - - var old = block.$$s, - result; - - block.$$s = null; - - // Need to pass $$eval so that method definitions know if this is - // being done on a class/module. Cannot be compiler driven since - // send(:instance_eval) needs to work. - if (self.$$is_a_module) { - self.$$eval = true; - try { - result = block.call(self, self); - } - finally { - self.$$eval = false; - } - } - else { - result = block.call(self, self); - } - - block.$$s = old; - - return result; - ; - }, $BasicObject_instance_eval$8.$$arity = -1); - - Opal.def(self, '$instance_exec', $BasicObject_instance_exec$10 = function $$instance_exec($a) { - var $iter = $BasicObject_instance_exec$10.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $BasicObject_instance_exec$10.$$p = null; - - - if ($iter) $BasicObject_instance_exec$10.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy(block)) { - } else { - $$$('::', 'Kernel').$raise($$$('::', 'ArgumentError'), "no block given") - }; - - var block_self = block.$$s, - result; - - block.$$s = null; - - if (self.$$is_a_module) { - self.$$eval = true; - try { - result = block.apply(self, args); - } - finally { - self.$$eval = false; - } - } - else { - result = block.apply(self, args); - } - - block.$$s = block_self; - - return result; - ; - }, $BasicObject_instance_exec$10.$$arity = -1); - - Opal.def(self, '$singleton_method_added', $BasicObject_singleton_method_added$11 = function $$singleton_method_added($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $BasicObject_singleton_method_added$11.$$arity = -1); - - Opal.def(self, '$singleton_method_removed', $BasicObject_singleton_method_removed$12 = function $$singleton_method_removed($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $BasicObject_singleton_method_removed$12.$$arity = -1); - - Opal.def(self, '$singleton_method_undefined', $BasicObject_singleton_method_undefined$13 = function $$singleton_method_undefined($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $BasicObject_singleton_method_undefined$13.$$arity = -1); - - Opal.def(self, '$class', $BasicObject_class$14 = function() { - var self = this; - - return self.$$class; - }, $BasicObject_class$14.$$arity = 0); - return (Opal.def(self, '$method_missing', $BasicObject_method_missing$15 = function $$method_missing(symbol, $a) { - var $iter = $BasicObject_method_missing$15.$$p, block = $iter || nil, $post_args, args, self = this, message = nil; - - if ($iter) $BasicObject_method_missing$15.$$p = null; - - - if ($iter) $BasicObject_method_missing$15.$$p = null;; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - message = (function() {if ($truthy(self.$inspect && !self.$inspect.$$stub)) { - return "" + "undefined method `" + (symbol) + "' for " + (self.$inspect()) + ":" + (self.$$class) - } else { - return "" + "undefined method `" + (symbol) + "' for " + (self.$$class) - }; return nil; })(); - return $$$('::', 'Kernel').$raise($$$('::', 'NoMethodError').$new(message, symbol)); - }, $BasicObject_method_missing$15.$$arity = -2), nil) && 'method_missing'; - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/kernel"] = function(Opal) { - function $rb_le(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy, $gvars = Opal.gvars, $hash2 = Opal.hash2, $send = Opal.send, $klass = Opal.klass; - - Opal.add_stubs(['$raise', '$new', '$inspect', '$!', '$=~', '$==', '$object_id', '$class', '$coerce_to?', '$<<', '$allocate', '$copy_instance_variables', '$copy_singleton_methods', '$initialize_clone', '$initialize_copy', '$define_method', '$singleton_class', '$to_proc', '$initialize_dup', '$for', '$empty?', '$pop', '$call', '$coerce_to', '$append_features', '$extend_object', '$extended', '$__id__', '$to_s', '$instance_variable_name!', '$respond_to?', '$to_int', '$coerce_to!', '$Integer', '$nil?', '$===', '$enum_for', '$result', '$any?', '$print', '$format', '$puts', '$each', '$<=', '$length', '$[]', '$exception', '$is_a?', '$rand', '$respond_to_missing?', '$try_convert!', '$expand_path', '$join', '$start_with?', '$new_seed', '$srand', '$sym', '$arg', '$open', '$include']); - - (function($base, $parent_nesting) { - var self = $module($base, 'Kernel'); - - var $nesting = [self].concat($parent_nesting), $Kernel_method_missing$1, $Kernel_$eq_tilde$2, $Kernel_$excl_tilde$3, $Kernel_$eq_eq_eq$4, $Kernel_$lt_eq_gt$5, $Kernel_method$6, $Kernel_methods$7, $Kernel_public_methods$8, $Kernel_Array$9, $Kernel_at_exit$10, $Kernel_caller$11, $Kernel_class$12, $Kernel_copy_instance_variables$13, $Kernel_copy_singleton_methods$14, $Kernel_clone$15, $Kernel_initialize_clone$16, $Kernel_define_singleton_method$17, $Kernel_dup$18, $Kernel_initialize_dup$19, $Kernel_enum_for$20, $Kernel_equal$ques$21, $Kernel_exit$22, $Kernel_extend$23, $Kernel_hash$24, $Kernel_initialize_copy$25, $Kernel_inspect$26, $Kernel_instance_of$ques$27, $Kernel_instance_variable_defined$ques$28, $Kernel_instance_variable_get$29, $Kernel_instance_variable_set$30, $Kernel_remove_instance_variable$31, $Kernel_instance_variables$32, $Kernel_Integer$33, $Kernel_Float$34, $Kernel_Hash$35, $Kernel_is_a$ques$36, $Kernel_itself$37, $Kernel_lambda$38, $Kernel_load$39, $Kernel_loop$40, $Kernel_nil$ques$42, $Kernel_printf$43, $Kernel_proc$44, $Kernel_puts$45, $Kernel_p$46, $Kernel_print$48, $Kernel_warn$49, $Kernel_raise$50, $Kernel_rand$51, $Kernel_respond_to$ques$52, $Kernel_respond_to_missing$ques$53, $Kernel_require$54, $Kernel_require_relative$55, $Kernel_require_tree$56, $Kernel_singleton_class$57, $Kernel_sleep$58, $Kernel_srand$59, $Kernel_String$60, $Kernel_tap$61, $Kernel_to_proc$62, $Kernel_to_s$63, $Kernel_catch$64, $Kernel_throw$65, $Kernel_open$66, $Kernel_yield_self$67; - - - - Opal.def(self, '$method_missing', $Kernel_method_missing$1 = function $$method_missing(symbol, $a) { - var $iter = $Kernel_method_missing$1.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Kernel_method_missing$1.$$p = null; - - - if ($iter) $Kernel_method_missing$1.$$p = null;; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - return self.$raise($$($nesting, 'NoMethodError').$new("" + "undefined method `" + (symbol) + "' for " + (self.$inspect()), symbol, args)); - }, $Kernel_method_missing$1.$$arity = -2); - - Opal.def(self, '$=~', $Kernel_$eq_tilde$2 = function(obj) { - var self = this; - - return false - }, $Kernel_$eq_tilde$2.$$arity = 1); - - Opal.def(self, '$!~', $Kernel_$excl_tilde$3 = function(obj) { - var self = this; - - return self['$=~'](obj)['$!']() - }, $Kernel_$excl_tilde$3.$$arity = 1); - - Opal.def(self, '$===', $Kernel_$eq_eq_eq$4 = function(other) { - var $a, self = this; - - return ($truthy($a = self.$object_id()['$=='](other.$object_id())) ? $a : self['$=='](other)) - }, $Kernel_$eq_eq_eq$4.$$arity = 1); - - Opal.def(self, '$<=>', $Kernel_$lt_eq_gt$5 = function(other) { - var self = this; - - - // set guard for infinite recursion - self.$$comparable = true; - - var x = self['$=='](other); - - if (x && x !== nil) { - return 0; - } - - return nil; - - }, $Kernel_$lt_eq_gt$5.$$arity = 1); - - Opal.def(self, '$method', $Kernel_method$6 = function $$method(name) { - var self = this; - - - var meth = self['$' + name]; - - if (!meth || meth.$$stub) { - self.$raise($$($nesting, 'NameError').$new("" + "undefined method `" + (name) + "' for class `" + (self.$class()) + "'", name)); - } - - return $$($nesting, 'Method').$new(self, meth.$$owner || self.$class(), meth, name); - - }, $Kernel_method$6.$$arity = 1); - - Opal.def(self, '$methods', $Kernel_methods$7 = function $$methods(all) { - var self = this; - - - - if (all == null) { - all = true; - }; - - if ($truthy(all)) { - return Opal.methods(self); - } else { - return Opal.own_methods(self); - } - ; - }, $Kernel_methods$7.$$arity = -1); - - Opal.def(self, '$public_methods', $Kernel_public_methods$8 = function $$public_methods(all) { - var self = this; - - - - if (all == null) { - all = true; - }; - - if ($truthy(all)) { - return Opal.methods(self); - } else { - return Opal.receiver_methods(self); - } - ; - }, $Kernel_public_methods$8.$$arity = -1); - - Opal.def(self, '$Array', $Kernel_Array$9 = function $$Array(object) { - var self = this; - - - var coerced; - - if (object === nil) { - return []; - } - - if (object.$$is_array) { - return object; - } - - coerced = $$($nesting, 'Opal')['$coerce_to?'](object, $$($nesting, 'Array'), "to_ary"); - if (coerced !== nil) { return coerced; } - - coerced = $$($nesting, 'Opal')['$coerce_to?'](object, $$($nesting, 'Array'), "to_a"); - if (coerced !== nil) { return coerced; } - - return [object]; - - }, $Kernel_Array$9.$$arity = 1); - - Opal.def(self, '$at_exit', $Kernel_at_exit$10 = function $$at_exit() { - var $iter = $Kernel_at_exit$10.$$p, block = $iter || nil, $a, self = this; - if ($gvars.__at_exit__ == null) $gvars.__at_exit__ = nil; - - if ($iter) $Kernel_at_exit$10.$$p = null; - - - if ($iter) $Kernel_at_exit$10.$$p = null;; - $gvars.__at_exit__ = ($truthy($a = $gvars.__at_exit__) ? $a : []); - return $gvars.__at_exit__['$<<'](block); - }, $Kernel_at_exit$10.$$arity = 0); - - Opal.def(self, '$caller', $Kernel_caller$11 = function $$caller($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return []; - }, $Kernel_caller$11.$$arity = -1); - - Opal.def(self, '$class', $Kernel_class$12 = function() { - var self = this; - - return self.$$class; - }, $Kernel_class$12.$$arity = 0); - - Opal.def(self, '$copy_instance_variables', $Kernel_copy_instance_variables$13 = function $$copy_instance_variables(other) { - var self = this; - - - var keys = Object.keys(other), i, ii, name; - for (i = 0, ii = keys.length; i < ii; i++) { - name = keys[i]; - if (name.charAt(0) !== '$' && other.hasOwnProperty(name)) { - self[name] = other[name]; - } - } - - }, $Kernel_copy_instance_variables$13.$$arity = 1); - - Opal.def(self, '$copy_singleton_methods', $Kernel_copy_singleton_methods$14 = function $$copy_singleton_methods(other) { - var self = this; - - - var i, name, names, length; - - if (other.hasOwnProperty('$$meta')) { - var other_singleton_class = Opal.get_singleton_class(other); - var self_singleton_class = Opal.get_singleton_class(self); - names = Object.getOwnPropertyNames(other_singleton_class.$$prototype); - - for (i = 0, length = names.length; i < length; i++) { - name = names[i]; - if (Opal.is_method(name)) { - self_singleton_class.$$prototype[name] = other_singleton_class.$$prototype[name]; - } - } - - self_singleton_class.$$const = Object.assign({}, other_singleton_class.$$const); - Object.setPrototypeOf( - self_singleton_class.$$prototype, - Object.getPrototypeOf(other_singleton_class.$$prototype) - ); - } - - for (i = 0, names = Object.getOwnPropertyNames(other), length = names.length; i < length; i++) { - name = names[i]; - if (name.charAt(0) === '$' && name.charAt(1) !== '$' && other.hasOwnProperty(name)) { - self[name] = other[name]; - } - } - - }, $Kernel_copy_singleton_methods$14.$$arity = 1); - - Opal.def(self, '$clone', $Kernel_clone$15 = function $$clone($kwargs) { - var freeze, self = this, copy = nil; - - - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - freeze = $kwargs.$$smap["freeze"]; - if (freeze == null) { - freeze = true - }; - copy = self.$class().$allocate(); - copy.$copy_instance_variables(self); - copy.$copy_singleton_methods(self); - copy.$initialize_clone(self); - return copy; - }, $Kernel_clone$15.$$arity = -1); - - Opal.def(self, '$initialize_clone', $Kernel_initialize_clone$16 = function $$initialize_clone(other) { - var self = this; - - return self.$initialize_copy(other) - }, $Kernel_initialize_clone$16.$$arity = 1); - - Opal.def(self, '$define_singleton_method', $Kernel_define_singleton_method$17 = function $$define_singleton_method(name, method) { - var $iter = $Kernel_define_singleton_method$17.$$p, block = $iter || nil, self = this; - - if ($iter) $Kernel_define_singleton_method$17.$$p = null; - - - if ($iter) $Kernel_define_singleton_method$17.$$p = null;; - ; - return $send(self.$singleton_class(), 'define_method', [name, method], block.$to_proc()); - }, $Kernel_define_singleton_method$17.$$arity = -2); - - Opal.def(self, '$dup', $Kernel_dup$18 = function $$dup() { - var self = this, copy = nil; - - - copy = self.$class().$allocate(); - copy.$copy_instance_variables(self); - copy.$initialize_dup(self); - return copy; - }, $Kernel_dup$18.$$arity = 0); - - Opal.def(self, '$initialize_dup', $Kernel_initialize_dup$19 = function $$initialize_dup(other) { - var self = this; - - return self.$initialize_copy(other) - }, $Kernel_initialize_dup$19.$$arity = 1); - - Opal.def(self, '$enum_for', $Kernel_enum_for$20 = function $$enum_for($a, $b) { - var $iter = $Kernel_enum_for$20.$$p, block = $iter || nil, $post_args, method, args, self = this; - - if ($iter) $Kernel_enum_for$20.$$p = null; - - - if ($iter) $Kernel_enum_for$20.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - if ($post_args.length > 0) { - method = $post_args[0]; - $post_args.splice(0, 1); - } - if (method == null) { - method = "each"; - }; - - args = $post_args;; - return $send($$($nesting, 'Enumerator'), 'for', [self, method].concat(Opal.to_a(args)), block.$to_proc()); - }, $Kernel_enum_for$20.$$arity = -1); - Opal.alias(self, "to_enum", "enum_for"); - - Opal.def(self, '$equal?', $Kernel_equal$ques$21 = function(other) { - var self = this; - - return self === other; - }, $Kernel_equal$ques$21.$$arity = 1); - - Opal.def(self, '$exit', $Kernel_exit$22 = function $$exit(status) { - var $a, self = this, block = nil; - if ($gvars.__at_exit__ == null) $gvars.__at_exit__ = nil; - - - - if (status == null) { - status = true; - }; - $gvars.__at_exit__ = ($truthy($a = $gvars.__at_exit__) ? $a : []); - while (!($truthy($gvars.__at_exit__['$empty?']()))) { - - block = $gvars.__at_exit__.$pop(); - block.$call(); - }; - - if (status.$$is_boolean) { - status = status ? 0 : 1; - } else { - status = $$($nesting, 'Opal').$coerce_to(status, $$($nesting, 'Integer'), "to_int") - } - - Opal.exit(status); - ; - return nil; - }, $Kernel_exit$22.$$arity = -1); - - Opal.def(self, '$extend', $Kernel_extend$23 = function $$extend($a) { - var $post_args, mods, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - mods = $post_args;; - - var singleton = self.$singleton_class(); - - for (var i = mods.length - 1; i >= 0; i--) { - var mod = mods[i]; - - if (!mod.$$is_module) { - self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + ((mod).$class()) + " (expected Module)"); - } - - (mod).$append_features(singleton); - (mod).$extend_object(self); - (mod).$extended(self); - } - ; - return self; - }, $Kernel_extend$23.$$arity = -1); - - Opal.def(self, '$hash', $Kernel_hash$24 = function $$hash() { - var self = this; - - return self.$__id__() - }, $Kernel_hash$24.$$arity = 0); - - Opal.def(self, '$initialize_copy', $Kernel_initialize_copy$25 = function $$initialize_copy(other) { - var self = this; - - return nil - }, $Kernel_initialize_copy$25.$$arity = 1); - - Opal.def(self, '$inspect', $Kernel_inspect$26 = function $$inspect() { - var self = this; - - return self.$to_s() - }, $Kernel_inspect$26.$$arity = 0); - - Opal.def(self, '$instance_of?', $Kernel_instance_of$ques$27 = function(klass) { - var self = this; - - - if (!klass.$$is_class && !klass.$$is_module) { - self.$raise($$($nesting, 'TypeError'), "class or module required"); - } - - return self.$$class === klass; - - }, $Kernel_instance_of$ques$27.$$arity = 1); - - Opal.def(self, '$instance_variable_defined?', $Kernel_instance_variable_defined$ques$28 = function(name) { - var self = this; - - - name = $$($nesting, 'Opal')['$instance_variable_name!'](name); - return Opal.hasOwnProperty.call(self, name.substr(1));; - }, $Kernel_instance_variable_defined$ques$28.$$arity = 1); - - Opal.def(self, '$instance_variable_get', $Kernel_instance_variable_get$29 = function $$instance_variable_get(name) { - var self = this; - - - name = $$($nesting, 'Opal')['$instance_variable_name!'](name); - - var ivar = self[Opal.ivar(name.substr(1))]; - - return ivar == null ? nil : ivar; - ; - }, $Kernel_instance_variable_get$29.$$arity = 1); - - Opal.def(self, '$instance_variable_set', $Kernel_instance_variable_set$30 = function $$instance_variable_set(name, value) { - var self = this; - - - name = $$($nesting, 'Opal')['$instance_variable_name!'](name); - return self[Opal.ivar(name.substr(1))] = value;; - }, $Kernel_instance_variable_set$30.$$arity = 2); - - Opal.def(self, '$remove_instance_variable', $Kernel_remove_instance_variable$31 = function $$remove_instance_variable(name) { - var self = this; - - - name = $$($nesting, 'Opal')['$instance_variable_name!'](name); - - var key = Opal.ivar(name.substr(1)), - val; - if (self.hasOwnProperty(key)) { - val = self[key]; - delete self[key]; - return val; - } - ; - return self.$raise($$($nesting, 'NameError'), "" + "instance variable " + (name) + " not defined"); - }, $Kernel_remove_instance_variable$31.$$arity = 1); - - Opal.def(self, '$instance_variables', $Kernel_instance_variables$32 = function $$instance_variables() { - var self = this; - - - var result = [], ivar; - - for (var name in self) { - if (self.hasOwnProperty(name) && name.charAt(0) !== '$') { - if (name.substr(-1) === '$') { - ivar = name.slice(0, name.length - 1); - } else { - ivar = name; - } - result.push('@' + ivar); - } - } - - return result; - - }, $Kernel_instance_variables$32.$$arity = 0); - - Opal.def(self, '$Integer', $Kernel_Integer$33 = function $$Integer(value, base) { - var self = this; - - - ; - - var i, str, base_digits; - - if (!value.$$is_string) { - if (base !== undefined) { - self.$raise($$($nesting, 'ArgumentError'), "base specified for non string value") - } - if (value === nil) { - self.$raise($$($nesting, 'TypeError'), "can't convert nil into Integer") - } - if (value.$$is_number) { - if (value === Infinity || value === -Infinity || isNaN(value)) { - self.$raise($$($nesting, 'FloatDomainError'), value) - } - return Math.floor(value); - } - if (value['$respond_to?']("to_int")) { - i = value.$to_int(); - if (i !== nil) { - return i; - } - } - return $$($nesting, 'Opal')['$coerce_to!'](value, $$($nesting, 'Integer'), "to_i"); - } - - if (value === "0") { - return 0; - } - - if (base === undefined) { - base = 0; - } else { - base = $$($nesting, 'Opal').$coerce_to(base, $$($nesting, 'Integer'), "to_int"); - if (base === 1 || base < 0 || base > 36) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid radix " + (base)) - } - } - - str = value.toLowerCase(); - - str = str.replace(/(\d)_(?=\d)/g, '$1'); - - str = str.replace(/^(\s*[+-]?)(0[bodx]?)/, function (_, head, flag) { - switch (flag) { - case '0b': - if (base === 0 || base === 2) { - base = 2; - return head; - } - case '0': - case '0o': - if (base === 0 || base === 8) { - base = 8; - return head; - } - case '0d': - if (base === 0 || base === 10) { - base = 10; - return head; - } - case '0x': - if (base === 0 || base === 16) { - base = 16; - return head; - } - } - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid value for Integer(): \"" + (value) + "\"") - }); - - base = (base === 0 ? 10 : base); - - base_digits = '0-' + (base <= 10 ? base - 1 : '9a-' + String.fromCharCode(97 + (base - 11))); - - if (!(new RegExp('^\\s*[+-]?[' + base_digits + ']+\\s*$')).test(str)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid value for Integer(): \"" + (value) + "\"") - } - - i = parseInt(str, base); - - if (isNaN(i)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid value for Integer(): \"" + (value) + "\"") - } - - return i; - ; - }, $Kernel_Integer$33.$$arity = -2); - - Opal.def(self, '$Float', $Kernel_Float$34 = function $$Float(value) { - var self = this; - - - var str; - - if (value === nil) { - self.$raise($$($nesting, 'TypeError'), "can't convert nil into Float") - } - - if (value.$$is_string) { - str = value.toString(); - - str = str.replace(/(\d)_(?=\d)/g, '$1'); - - //Special case for hex strings only: - if (/^\s*[-+]?0[xX][0-9a-fA-F]+\s*$/.test(str)) { - return self.$Integer(str); - } - - if (!/^\s*[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?\s*$/.test(str)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid value for Float(): \"" + (value) + "\"") - } - - return parseFloat(str); - } - - return $$($nesting, 'Opal')['$coerce_to!'](value, $$($nesting, 'Float'), "to_f"); - - }, $Kernel_Float$34.$$arity = 1); - - Opal.def(self, '$Hash', $Kernel_Hash$35 = function $$Hash(arg) { - var $a, self = this; - - - if ($truthy(($truthy($a = arg['$nil?']()) ? $a : arg['$==']([])))) { - return $hash2([], {})}; - if ($truthy($$($nesting, 'Hash')['$==='](arg))) { - return arg}; - return $$($nesting, 'Opal')['$coerce_to!'](arg, $$($nesting, 'Hash'), "to_hash"); - }, $Kernel_Hash$35.$$arity = 1); - - Opal.def(self, '$is_a?', $Kernel_is_a$ques$36 = function(klass) { - var self = this; - - - if (!klass.$$is_class && !klass.$$is_module) { - self.$raise($$($nesting, 'TypeError'), "class or module required"); - } - - return Opal.is_a(self, klass); - - }, $Kernel_is_a$ques$36.$$arity = 1); - - Opal.def(self, '$itself', $Kernel_itself$37 = function $$itself() { - var self = this; - - return self - }, $Kernel_itself$37.$$arity = 0); - Opal.alias(self, "kind_of?", "is_a?"); - - Opal.def(self, '$lambda', $Kernel_lambda$38 = function $$lambda() { - var $iter = $Kernel_lambda$38.$$p, block = $iter || nil, self = this; - - if ($iter) $Kernel_lambda$38.$$p = null; - - - if ($iter) $Kernel_lambda$38.$$p = null;; - return Opal.lambda(block);; - }, $Kernel_lambda$38.$$arity = 0); - - Opal.def(self, '$load', $Kernel_load$39 = function $$load(file) { - var self = this; - - - file = $$($nesting, 'Opal')['$coerce_to!'](file, $$($nesting, 'String'), "to_str"); - return Opal.load(file); - }, $Kernel_load$39.$$arity = 1); - - Opal.def(self, '$loop', $Kernel_loop$40 = function $$loop() { - var $$41, $a, $iter = $Kernel_loop$40.$$p, $yield = $iter || nil, self = this, e = nil; - - if ($iter) $Kernel_loop$40.$$p = null; - - if (($yield !== nil)) { - } else { - return $send(self, 'enum_for', ["loop"], ($$41 = function(){var self = $$41.$$s || this; - - return $$$($$($nesting, 'Float'), 'INFINITY')}, $$41.$$s = self, $$41.$$arity = 0, $$41)) - }; - while ($truthy(true)) { - - try { - Opal.yieldX($yield, []) - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StopIteration')])) {e = $err; - try { - return e.$result() - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - }; - return self; - }, $Kernel_loop$40.$$arity = 0); - - Opal.def(self, '$nil?', $Kernel_nil$ques$42 = function() { - var self = this; - - return false - }, $Kernel_nil$ques$42.$$arity = 0); - Opal.alias(self, "object_id", "__id__"); - - Opal.def(self, '$printf', $Kernel_printf$43 = function $$printf($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy(args['$any?']())) { - self.$print($send(self, 'format', Opal.to_a(args)))}; - return nil; - }, $Kernel_printf$43.$$arity = -1); - - Opal.def(self, '$proc', $Kernel_proc$44 = function $$proc() { - var $iter = $Kernel_proc$44.$$p, block = $iter || nil, self = this; - - if ($iter) $Kernel_proc$44.$$p = null; - - - if ($iter) $Kernel_proc$44.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to create Proc object without a block") - }; - block.$$is_lambda = false; - return block; - }, $Kernel_proc$44.$$arity = 0); - - Opal.def(self, '$puts', $Kernel_puts$45 = function $$puts($a) { - var $post_args, strs, self = this; - if ($gvars.stdout == null) $gvars.stdout = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - strs = $post_args;; - return $send($gvars.stdout, 'puts', Opal.to_a(strs)); - }, $Kernel_puts$45.$$arity = -1); - - Opal.def(self, '$p', $Kernel_p$46 = function $$p($a) { - var $post_args, args, $$47, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - $send(args, 'each', [], ($$47 = function(obj){var self = $$47.$$s || this; - if ($gvars.stdout == null) $gvars.stdout = nil; - - - - if (obj == null) { - obj = nil; - }; - return $gvars.stdout.$puts(obj.$inspect());}, $$47.$$s = self, $$47.$$arity = 1, $$47)); - if ($truthy($rb_le(args.$length(), 1))) { - return args['$[]'](0) - } else { - return args - }; - }, $Kernel_p$46.$$arity = -1); - - Opal.def(self, '$print', $Kernel_print$48 = function $$print($a) { - var $post_args, strs, self = this; - if ($gvars.stdout == null) $gvars.stdout = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - strs = $post_args;; - return $send($gvars.stdout, 'print', Opal.to_a(strs)); - }, $Kernel_print$48.$$arity = -1); - - Opal.def(self, '$warn', $Kernel_warn$49 = function $$warn($a) { - var $post_args, strs, $b, self = this; - if ($gvars.VERBOSE == null) $gvars.VERBOSE = nil; - if ($gvars.stderr == null) $gvars.stderr = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - strs = $post_args;; - if ($truthy(($truthy($b = $gvars.VERBOSE['$nil?']()) ? $b : strs['$empty?']()))) { - return nil - } else { - return $send($gvars.stderr, 'puts', Opal.to_a(strs)) - }; - }, $Kernel_warn$49.$$arity = -1); - - Opal.def(self, '$raise', $Kernel_raise$50 = function $$raise(exception, string, _backtrace) { - var self = this; - if ($gvars["!"] == null) $gvars["!"] = nil; - - - ; - - if (string == null) { - string = nil; - }; - - if (_backtrace == null) { - _backtrace = nil; - }; - - if (exception == null && $gvars["!"] !== nil) { - throw $gvars["!"]; - } - if (exception == null) { - exception = $$($nesting, 'RuntimeError').$new(); - } - else if (exception.$$is_string) { - exception = $$($nesting, 'RuntimeError').$new(exception); - } - // using respond_to? and not an undefined check to avoid method_missing matching as true - else if (exception.$$is_class && exception['$respond_to?']("exception")) { - exception = exception.$exception(string); - } - else if (exception['$is_a?']($$($nesting, 'Exception'))) { - // exception is fine - } - else { - exception = $$($nesting, 'TypeError').$new("exception class/object expected"); - } - - if ($gvars["!"] !== nil) { - Opal.exceptions.push($gvars["!"]); - } - - $gvars["!"] = exception; - - throw exception; - ; - }, $Kernel_raise$50.$$arity = -1); - Opal.alias(self, "fail", "raise"); - - Opal.def(self, '$rand', $Kernel_rand$51 = function $$rand(max) { - var self = this; - - - ; - - if (max === undefined) { - return $$$($$($nesting, 'Random'), 'DEFAULT').$rand(); - } - - if (max.$$is_number) { - if (max < 0) { - max = Math.abs(max); - } - - if (max % 1 !== 0) { - max = max.$to_i(); - } - - if (max === 0) { - max = undefined; - } - } - ; - return $$$($$($nesting, 'Random'), 'DEFAULT').$rand(max); - }, $Kernel_rand$51.$$arity = -1); - - Opal.def(self, '$respond_to?', $Kernel_respond_to$ques$52 = function(name, include_all) { - var self = this; - - - - if (include_all == null) { - include_all = false; - }; - if ($truthy(self['$respond_to_missing?'](name, include_all))) { - return true}; - - var body = self['$' + name]; - - if (typeof(body) === "function" && !body.$$stub) { - return true; - } - ; - return false; - }, $Kernel_respond_to$ques$52.$$arity = -2); - - Opal.def(self, '$respond_to_missing?', $Kernel_respond_to_missing$ques$53 = function(method_name, include_all) { - var self = this; - - - - if (include_all == null) { - include_all = false; - }; - return false; - }, $Kernel_respond_to_missing$ques$53.$$arity = -2); - - Opal.def(self, '$require', $Kernel_require$54 = function $$require(file) { - var self = this; - - - file = $$($nesting, 'Opal')['$coerce_to!'](file, $$($nesting, 'String'), "to_str"); - return Opal.require(file); - }, $Kernel_require$54.$$arity = 1); - - Opal.def(self, '$require_relative', $Kernel_require_relative$55 = function $$require_relative(file) { - var self = this; - - - $$($nesting, 'Opal')['$try_convert!'](file, $$($nesting, 'String'), "to_str"); - file = $$($nesting, 'File').$expand_path($$($nesting, 'File').$join(Opal.current_file, "..", file)); - return Opal.require(file); - }, $Kernel_require_relative$55.$$arity = 1); - - Opal.def(self, '$require_tree', $Kernel_require_tree$56 = function $$require_tree(path) { - var self = this; - - - var result = []; - - path = $$($nesting, 'File').$expand_path(path) - path = Opal.normalize(path); - if (path === '.') path = ''; - for (var name in Opal.modules) { - if ((name)['$start_with?'](path)) { - result.push([name, Opal.require(name)]); - } - } - - return result; - - }, $Kernel_require_tree$56.$$arity = 1); - Opal.alias(self, "send", "__send__"); - Opal.alias(self, "public_send", "__send__"); - - Opal.def(self, '$singleton_class', $Kernel_singleton_class$57 = function $$singleton_class() { - var self = this; - - return Opal.get_singleton_class(self); - }, $Kernel_singleton_class$57.$$arity = 0); - - Opal.def(self, '$sleep', $Kernel_sleep$58 = function $$sleep(seconds) { - var self = this; - - - - if (seconds == null) { - seconds = nil; - }; - - if (seconds === nil) { - self.$raise($$($nesting, 'TypeError'), "can't convert NilClass into time interval") - } - if (!seconds.$$is_number) { - self.$raise($$($nesting, 'TypeError'), "" + "can't convert " + (seconds.$class()) + " into time interval") - } - if (seconds < 0) { - self.$raise($$($nesting, 'ArgumentError'), "time interval must be positive") - } - var get_time = Opal.global.performance ? - function() {return performance.now()} : - function() {return new Date()} - - var t = get_time(); - while (get_time() - t <= seconds * 1000); - return seconds; - ; - }, $Kernel_sleep$58.$$arity = -1); - - Opal.def(self, '$srand', $Kernel_srand$59 = function $$srand(seed) { - var self = this; - - - - if (seed == null) { - seed = $$($nesting, 'Random').$new_seed(); - }; - return $$($nesting, 'Random').$srand(seed); - }, $Kernel_srand$59.$$arity = -1); - - Opal.def(self, '$String', $Kernel_String$60 = function $$String(str) { - var $a, self = this; - - return ($truthy($a = $$($nesting, 'Opal')['$coerce_to?'](str, $$($nesting, 'String'), "to_str")) ? $a : $$($nesting, 'Opal')['$coerce_to!'](str, $$($nesting, 'String'), "to_s")) - }, $Kernel_String$60.$$arity = 1); - - Opal.def(self, '$tap', $Kernel_tap$61 = function $$tap() { - var $iter = $Kernel_tap$61.$$p, block = $iter || nil, self = this; - - if ($iter) $Kernel_tap$61.$$p = null; - - - if ($iter) $Kernel_tap$61.$$p = null;; - Opal.yield1(block, self); - return self; - }, $Kernel_tap$61.$$arity = 0); - - Opal.def(self, '$to_proc', $Kernel_to_proc$62 = function $$to_proc() { - var self = this; - - return self - }, $Kernel_to_proc$62.$$arity = 0); - - Opal.def(self, '$to_s', $Kernel_to_s$63 = function $$to_s() { - var self = this; - - return "" + "#<" + (self.$class()) + ":0x" + (self.$__id__().$to_s(16)) + ">" - }, $Kernel_to_s$63.$$arity = 0); - - Opal.def(self, '$catch', $Kernel_catch$64 = function(sym) { - var $iter = $Kernel_catch$64.$$p, $yield = $iter || nil, self = this, e = nil; - - if ($iter) $Kernel_catch$64.$$p = null; - try { - return Opal.yieldX($yield, []); - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'UncaughtThrowError')])) {e = $err; - try { - - if (e.$sym()['$=='](sym)) { - return e.$arg()}; - return self.$raise(); - } finally { Opal.pop_exception() } - } else { throw $err; } - } - }, $Kernel_catch$64.$$arity = 1); - - Opal.def(self, '$throw', $Kernel_throw$65 = function($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return self.$raise($$($nesting, 'UncaughtThrowError'), args); - }, $Kernel_throw$65.$$arity = -1); - - Opal.def(self, '$open', $Kernel_open$66 = function $$open($a) { - var $iter = $Kernel_open$66.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Kernel_open$66.$$p = null; - - - if ($iter) $Kernel_open$66.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send($$($nesting, 'File'), 'open', Opal.to_a(args), block.$to_proc()); - }, $Kernel_open$66.$$arity = -1); - - Opal.def(self, '$yield_self', $Kernel_yield_self$67 = function $$yield_self() { - var $$68, $iter = $Kernel_yield_self$67.$$p, $yield = $iter || nil, self = this; - - if ($iter) $Kernel_yield_self$67.$$p = null; - - if (($yield !== nil)) { - } else { - return $send(self, 'enum_for', ["yield_self"], ($$68 = function(){var self = $$68.$$s || this; - - return 1}, $$68.$$s = self, $$68.$$arity = 0, $$68)) - }; - return Opal.yield1($yield, self);; - }, $Kernel_yield_self$67.$$arity = 0); - })($nesting[0], $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Object'); - - var $nesting = [self].concat($parent_nesting); - - return self.$include($$($nesting, 'Kernel')) - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/error"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $module = Opal.module, $hash2 = Opal.hash2; - - Opal.add_stubs(['$new', '$clone', '$to_s', '$empty?', '$class', '$raise', '$+', '$attr_reader', '$[]', '$>', '$length', '$inspect']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Exception'); - - var $nesting = [self].concat($parent_nesting), $Exception_new$1, $Exception_exception$2, $Exception_initialize$3, $Exception_backtrace$4, $Exception_exception$5, $Exception_message$6, $Exception_inspect$7, $Exception_set_backtrace$8, $Exception_to_s$9; - - self.$$prototype.message = nil; - - var stack_trace_limit; - Opal.defs(self, '$new', $Exception_new$1 = function($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - var message = (args.length > 0) ? args[0] : nil; - var error = new self.$$constructor(message); - error.name = self.$$name; - error.message = message; - Opal.send(error, error.$initialize, args); - - // Error.captureStackTrace() will use .name and .toString to build the - // first line of the stack trace so it must be called after the error - // has been initialized. - // https://nodejs.org/dist/latest-v6.x/docs/api/errors.html - if (Opal.config.enable_stack_trace && Error.captureStackTrace) { - // Passing Kernel.raise will cut the stack trace from that point above - Error.captureStackTrace(error, stack_trace_limit); - } - - return error; - ; - }, $Exception_new$1.$$arity = -1); - stack_trace_limit = self.$new; - Opal.defs(self, '$exception', $Exception_exception$2 = function $$exception($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'new', Opal.to_a(args)); - }, $Exception_exception$2.$$arity = -1); - - Opal.def(self, '$initialize', $Exception_initialize$3 = function $$initialize($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return self.message = (args.length > 0) ? args[0] : nil;; - }, $Exception_initialize$3.$$arity = -1); - - Opal.def(self, '$backtrace', $Exception_backtrace$4 = function $$backtrace() { - var self = this; - - - if (self.backtrace) { - // nil is a valid backtrace - return self.backtrace; - } - - var backtrace = self.stack; - - if (typeof(backtrace) === 'string') { - return backtrace.split("\n").slice(0, 15); - } - else if (backtrace) { - return backtrace.slice(0, 15); - } - - return []; - - }, $Exception_backtrace$4.$$arity = 0); - - Opal.def(self, '$exception', $Exception_exception$5 = function $$exception(str) { - var self = this; - - - - if (str == null) { - str = nil; - }; - - if (str === nil || self === str) { - return self; - } - - var cloned = self.$clone(); - cloned.message = str; - return cloned; - ; - }, $Exception_exception$5.$$arity = -1); - - Opal.def(self, '$message', $Exception_message$6 = function $$message() { - var self = this; - - return self.$to_s() - }, $Exception_message$6.$$arity = 0); - - Opal.def(self, '$inspect', $Exception_inspect$7 = function $$inspect() { - var self = this, as_str = nil; - - - as_str = self.$to_s(); - if ($truthy(as_str['$empty?']())) { - return self.$class().$to_s() - } else { - return "" + "#<" + (self.$class().$to_s()) + ": " + (self.$to_s()) + ">" - }; - }, $Exception_inspect$7.$$arity = 0); - - Opal.def(self, '$set_backtrace', $Exception_set_backtrace$8 = function $$set_backtrace(backtrace) { - var self = this; - - - var valid = true, i, ii; - - if (backtrace === nil) { - self.backtrace = nil; - } else if (backtrace.$$is_string) { - self.backtrace = [backtrace]; - } else { - if (backtrace.$$is_array) { - for (i = 0, ii = backtrace.length; i < ii; i++) { - if (!backtrace[i].$$is_string) { - valid = false; - break; - } - } - } else { - valid = false; - } - - if (valid === false) { - self.$raise($$($nesting, 'TypeError'), "backtrace must be Array of String") - } - - self.backtrace = backtrace; - } - - return backtrace; - - }, $Exception_set_backtrace$8.$$arity = 1); - return (Opal.def(self, '$to_s', $Exception_to_s$9 = function $$to_s() { - var $a, $b, self = this; - - return ($truthy($a = ($truthy($b = self.message) ? self.message.$to_s() : $b)) ? $a : self.$class().$to_s()) - }, $Exception_to_s$9.$$arity = 0), nil) && 'to_s'; - })($nesting[0], Error, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'ScriptError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'Exception'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'SyntaxError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'ScriptError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'LoadError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'ScriptError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NotImplementedError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'ScriptError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'SystemExit'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'Exception'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NoMemoryError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'Exception'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'SignalException'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'Exception'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Interrupt'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'Exception'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'SecurityError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'Exception'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'StandardError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'Exception'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'EncodingError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'ZeroDivisionError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NameError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NoMethodError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'NameError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'RuntimeError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'FrozenError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'RuntimeError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'LocalJumpError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'TypeError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'ArgumentError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'IndexError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'StopIteration'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'IndexError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'KeyError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'IndexError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'RangeError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'FloatDomainError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'RangeError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'IOError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'SystemCallError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Errno'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'EINVAL'); - - var $nesting = [self].concat($parent_nesting), $EINVAL_new$10; - - return (Opal.defs(self, '$new', $EINVAL_new$10 = function(name) { - var $iter = $EINVAL_new$10.$$p, $yield = $iter || nil, self = this, message = nil; - - if ($iter) $EINVAL_new$10.$$p = null; - - - if (name == null) { - name = nil; - }; - message = "Invalid argument"; - if ($truthy(name)) { - message = $rb_plus(message, "" + " - " + (name))}; - return $send(self, Opal.find_super_dispatcher(self, 'new', $EINVAL_new$10, false, self.$$class.$$prototype), [message], null); - }, $EINVAL_new$10.$$arity = -1), nil) && 'new' - })($nesting[0], $$($nesting, 'SystemCallError'), $nesting) - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'UncaughtThrowError'); - - var $nesting = [self].concat($parent_nesting), $UncaughtThrowError_initialize$11; - - self.$$prototype.sym = nil; - - self.$attr_reader("sym", "arg"); - return (Opal.def(self, '$initialize', $UncaughtThrowError_initialize$11 = function $$initialize(args) { - var $iter = $UncaughtThrowError_initialize$11.$$p, $yield = $iter || nil, self = this; - - if ($iter) $UncaughtThrowError_initialize$11.$$p = null; - - self.sym = args['$[]'](0); - if ($truthy($rb_gt(args.$length(), 1))) { - self.arg = args['$[]'](1)}; - return $send(self, Opal.find_super_dispatcher(self, 'initialize', $UncaughtThrowError_initialize$11, false), ["" + "uncaught throw " + (self.sym.$inspect())], null); - }, $UncaughtThrowError_initialize$11.$$arity = 1), nil) && 'initialize'; - })($nesting[0], $$($nesting, 'ArgumentError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NameError'); - - var $nesting = [self].concat($parent_nesting), $NameError_initialize$12; - - - self.$attr_reader("name"); - return (Opal.def(self, '$initialize', $NameError_initialize$12 = function $$initialize(message, name) { - var $iter = $NameError_initialize$12.$$p, $yield = $iter || nil, self = this; - - if ($iter) $NameError_initialize$12.$$p = null; - - - if (name == null) { - name = nil; - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $NameError_initialize$12, false), [message], null); - return (self.name = name); - }, $NameError_initialize$12.$$arity = -2), nil) && 'initialize'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NoMethodError'); - - var $nesting = [self].concat($parent_nesting), $NoMethodError_initialize$13; - - - self.$attr_reader("args"); - return (Opal.def(self, '$initialize', $NoMethodError_initialize$13 = function $$initialize(message, name, args) { - var $iter = $NoMethodError_initialize$13.$$p, $yield = $iter || nil, self = this; - - if ($iter) $NoMethodError_initialize$13.$$p = null; - - - if (name == null) { - name = nil; - }; - - if (args == null) { - args = []; - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $NoMethodError_initialize$13, false), [message, name], null); - return (self.args = args); - }, $NoMethodError_initialize$13.$$arity = -2), nil) && 'initialize'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'StopIteration'); - - var $nesting = [self].concat($parent_nesting); - - return self.$attr_reader("result") - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'KeyError'); - - var $nesting = [self].concat($parent_nesting), $KeyError_initialize$14, $KeyError_receiver$15, $KeyError_key$16; - - self.$$prototype.receiver = self.$$prototype.key = nil; - - - Opal.def(self, '$initialize', $KeyError_initialize$14 = function $$initialize(message, $kwargs) { - var receiver, key, $iter = $KeyError_initialize$14.$$p, $yield = $iter || nil, self = this; - - if ($iter) $KeyError_initialize$14.$$p = null; - - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - receiver = $kwargs.$$smap["receiver"]; - if (receiver == null) { - receiver = nil - }; - - key = $kwargs.$$smap["key"]; - if (key == null) { - key = nil - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $KeyError_initialize$14, false), [message], null); - self.receiver = receiver; - return (self.key = key); - }, $KeyError_initialize$14.$$arity = -2); - - Opal.def(self, '$receiver', $KeyError_receiver$15 = function $$receiver() { - var $a, self = this; - - return ($truthy($a = self.receiver) ? $a : self.$raise($$($nesting, 'ArgumentError'), "no receiver is available")) - }, $KeyError_receiver$15.$$arity = 0); - return (Opal.def(self, '$key', $KeyError_key$16 = function $$key() { - var $a, self = this; - - return ($truthy($a = self.key) ? $a : self.$raise($$($nesting, 'ArgumentError'), "no key is available")) - }, $KeyError_key$16.$$arity = 0), nil) && 'key'; - })($nesting[0], null, $nesting); - return (function($base, $parent_nesting) { - var self = $module($base, 'JS'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Error'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], null, $nesting) - })($nesting[0], $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/constants"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - - Opal.const_set($nesting[0], 'RUBY_PLATFORM', "opal"); - Opal.const_set($nesting[0], 'RUBY_ENGINE', "opal"); - Opal.const_set($nesting[0], 'RUBY_VERSION', "2.5.1"); - Opal.const_set($nesting[0], 'RUBY_ENGINE_VERSION', "0.11.99.dev"); - Opal.const_set($nesting[0], 'RUBY_RELEASE_DATE', "2018-12-25"); - Opal.const_set($nesting[0], 'RUBY_PATCHLEVEL', 0); - Opal.const_set($nesting[0], 'RUBY_REVISION', 0); - Opal.const_set($nesting[0], 'RUBY_COPYRIGHT', "opal - Copyright (C) 2013-2018 Adam Beynon and the Opal contributors"); - return Opal.const_set($nesting[0], 'RUBY_DESCRIPTION', "" + "opal " + ($$($nesting, 'RUBY_ENGINE_VERSION')) + " (" + ($$($nesting, 'RUBY_RELEASE_DATE')) + " revision " + ($$($nesting, 'RUBY_REVISION')) + ")"); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["opal/base"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - self.$require("corelib/runtime"); - self.$require("corelib/helpers"); - self.$require("corelib/module"); - self.$require("corelib/class"); - self.$require("corelib/basic_object"); - self.$require("corelib/kernel"); - self.$require("corelib/error"); - return self.$require("corelib/constants"); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/nil"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy; - - Opal.add_stubs(['$raise', '$name', '$new', '$>', '$length', '$Rational']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NilClass'); - - var $nesting = [self].concat($parent_nesting), $NilClass_$excl$2, $NilClass_$$3, $NilClass_$$4, $NilClass_$$5, $NilClass_$eq_eq$6, $NilClass_dup$7, $NilClass_clone$8, $NilClass_inspect$9, $NilClass_nil$ques$10, $NilClass_singleton_class$11, $NilClass_to_a$12, $NilClass_to_h$13, $NilClass_to_i$14, $NilClass_to_s$15, $NilClass_to_c$16, $NilClass_rationalize$17, $NilClass_to_r$18, $NilClass_instance_variables$19; - - - self.$$prototype.$$meta = self; - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $allocate$1; - - - - Opal.def(self, '$allocate', $allocate$1 = function $$allocate() { - var self = this; - - return self.$raise($$($nesting, 'TypeError'), "" + "allocator undefined for " + (self.$name())) - }, $allocate$1.$$arity = 0); - - - Opal.udef(self, '$' + "new");; - return nil;; - })(Opal.get_singleton_class(self), $nesting); - - Opal.def(self, '$!', $NilClass_$excl$2 = function() { - var self = this; - - return true - }, $NilClass_$excl$2.$$arity = 0); - - Opal.def(self, '$&', $NilClass_$$3 = function(other) { - var self = this; - - return false - }, $NilClass_$$3.$$arity = 1); - - Opal.def(self, '$|', $NilClass_$$4 = function(other) { - var self = this; - - return other !== false && other !== nil; - }, $NilClass_$$4.$$arity = 1); - - Opal.def(self, '$^', $NilClass_$$5 = function(other) { - var self = this; - - return other !== false && other !== nil; - }, $NilClass_$$5.$$arity = 1); - - Opal.def(self, '$==', $NilClass_$eq_eq$6 = function(other) { - var self = this; - - return other === nil; - }, $NilClass_$eq_eq$6.$$arity = 1); - - Opal.def(self, '$dup', $NilClass_dup$7 = function $$dup() { - var self = this; - - return nil - }, $NilClass_dup$7.$$arity = 0); - - Opal.def(self, '$clone', $NilClass_clone$8 = function $$clone($kwargs) { - var freeze, self = this; - - - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - freeze = $kwargs.$$smap["freeze"]; - if (freeze == null) { - freeze = true - }; - return nil; - }, $NilClass_clone$8.$$arity = -1); - - Opal.def(self, '$inspect', $NilClass_inspect$9 = function $$inspect() { - var self = this; - - return "nil" - }, $NilClass_inspect$9.$$arity = 0); - - Opal.def(self, '$nil?', $NilClass_nil$ques$10 = function() { - var self = this; - - return true - }, $NilClass_nil$ques$10.$$arity = 0); - - Opal.def(self, '$singleton_class', $NilClass_singleton_class$11 = function $$singleton_class() { - var self = this; - - return $$($nesting, 'NilClass') - }, $NilClass_singleton_class$11.$$arity = 0); - - Opal.def(self, '$to_a', $NilClass_to_a$12 = function $$to_a() { - var self = this; - - return [] - }, $NilClass_to_a$12.$$arity = 0); - - Opal.def(self, '$to_h', $NilClass_to_h$13 = function $$to_h() { - var self = this; - - return Opal.hash(); - }, $NilClass_to_h$13.$$arity = 0); - - Opal.def(self, '$to_i', $NilClass_to_i$14 = function $$to_i() { - var self = this; - - return 0 - }, $NilClass_to_i$14.$$arity = 0); - Opal.alias(self, "to_f", "to_i"); - - Opal.def(self, '$to_s', $NilClass_to_s$15 = function $$to_s() { - var self = this; - - return "" - }, $NilClass_to_s$15.$$arity = 0); - - Opal.def(self, '$to_c', $NilClass_to_c$16 = function $$to_c() { - var self = this; - - return $$($nesting, 'Complex').$new(0, 0) - }, $NilClass_to_c$16.$$arity = 0); - - Opal.def(self, '$rationalize', $NilClass_rationalize$17 = function $$rationalize($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy($rb_gt(args.$length(), 1))) { - self.$raise($$($nesting, 'ArgumentError'))}; - return self.$Rational(0, 1); - }, $NilClass_rationalize$17.$$arity = -1); - - Opal.def(self, '$to_r', $NilClass_to_r$18 = function $$to_r() { - var self = this; - - return self.$Rational(0, 1) - }, $NilClass_to_r$18.$$arity = 0); - return (Opal.def(self, '$instance_variables', $NilClass_instance_variables$19 = function $$instance_variables() { - var self = this; - - return [] - }, $NilClass_instance_variables$19.$$arity = 0), nil) && 'instance_variables'; - })($nesting[0], null, $nesting); - return Opal.const_set($nesting[0], 'NIL', nil); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/boolean"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2; - - Opal.add_stubs(['$raise', '$name']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Boolean'); - - var $nesting = [self].concat($parent_nesting), $Boolean___id__$2, $Boolean_$excl$3, $Boolean_$$4, $Boolean_$$5, $Boolean_$$6, $Boolean_$eq_eq$7, $Boolean_singleton_class$8, $Boolean_to_s$9, $Boolean_dup$10, $Boolean_clone$11; - - - Opal.defineProperty(self.$$prototype, '$$is_boolean', true); - Opal.defineProperty(self.$$prototype, '$$meta', self); - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $allocate$1; - - - - Opal.def(self, '$allocate', $allocate$1 = function $$allocate() { - var self = this; - - return self.$raise($$($nesting, 'TypeError'), "" + "allocator undefined for " + (self.$name())) - }, $allocate$1.$$arity = 0); - - - Opal.udef(self, '$' + "new");; - return nil;; - })(Opal.get_singleton_class(self), $nesting); - - Opal.def(self, '$__id__', $Boolean___id__$2 = function $$__id__() { - var self = this; - - return self.valueOf() ? 2 : 0; - }, $Boolean___id__$2.$$arity = 0); - Opal.alias(self, "object_id", "__id__"); - - Opal.def(self, '$!', $Boolean_$excl$3 = function() { - var self = this; - - return self != true; - }, $Boolean_$excl$3.$$arity = 0); - - Opal.def(self, '$&', $Boolean_$$4 = function(other) { - var self = this; - - return (self == true) ? (other !== false && other !== nil) : false; - }, $Boolean_$$4.$$arity = 1); - - Opal.def(self, '$|', $Boolean_$$5 = function(other) { - var self = this; - - return (self == true) ? true : (other !== false && other !== nil); - }, $Boolean_$$5.$$arity = 1); - - Opal.def(self, '$^', $Boolean_$$6 = function(other) { - var self = this; - - return (self == true) ? (other === false || other === nil) : (other !== false && other !== nil); - }, $Boolean_$$6.$$arity = 1); - - Opal.def(self, '$==', $Boolean_$eq_eq$7 = function(other) { - var self = this; - - return (self == true) === other.valueOf(); - }, $Boolean_$eq_eq$7.$$arity = 1); - Opal.alias(self, "equal?", "=="); - Opal.alias(self, "eql?", "=="); - - Opal.def(self, '$singleton_class', $Boolean_singleton_class$8 = function $$singleton_class() { - var self = this; - - return $$($nesting, 'Boolean') - }, $Boolean_singleton_class$8.$$arity = 0); - - Opal.def(self, '$to_s', $Boolean_to_s$9 = function $$to_s() { - var self = this; - - return (self == true) ? 'true' : 'false'; - }, $Boolean_to_s$9.$$arity = 0); - - Opal.def(self, '$dup', $Boolean_dup$10 = function $$dup() { - var self = this; - - return self - }, $Boolean_dup$10.$$arity = 0); - return (Opal.def(self, '$clone', $Boolean_clone$11 = function $$clone($kwargs) { - var freeze, self = this; - - - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - freeze = $kwargs.$$smap["freeze"]; - if (freeze == null) { - freeze = true - }; - return self; - }, $Boolean_clone$11.$$arity = -1), nil) && 'clone'; - })($nesting[0], Boolean, $nesting); - Opal.const_set($nesting[0], 'TrueClass', $$($nesting, 'Boolean')); - Opal.const_set($nesting[0], 'FalseClass', $$($nesting, 'Boolean')); - Opal.const_set($nesting[0], 'TRUE', true); - return Opal.const_set($nesting[0], 'FALSE', false); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/comparable"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy; - - Opal.add_stubs(['$===', '$>', '$<', '$equal?', '$<=>', '$normalize', '$raise', '$class']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Comparable'); - - var $nesting = [self].concat($parent_nesting), $Comparable_normalize$1, $Comparable_$eq_eq$2, $Comparable_$gt$3, $Comparable_$gt_eq$4, $Comparable_$lt$5, $Comparable_$lt_eq$6, $Comparable_between$ques$7, $Comparable_clamp$8; - - - Opal.defs(self, '$normalize', $Comparable_normalize$1 = function $$normalize(what) { - var self = this; - - - if ($truthy($$($nesting, 'Integer')['$==='](what))) { - return what}; - if ($truthy($rb_gt(what, 0))) { - return 1}; - if ($truthy($rb_lt(what, 0))) { - return -1}; - return 0; - }, $Comparable_normalize$1.$$arity = 1); - - Opal.def(self, '$==', $Comparable_$eq_eq$2 = function(other) { - var self = this, cmp = nil; - - try { - - if ($truthy(self['$equal?'](other))) { - return true}; - - if (self["$<=>"] == Opal.Kernel["$<=>"]) { - return false; - } - - // check for infinite recursion - if (self.$$comparable) { - delete self.$$comparable; - return false; - } - ; - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - return false - }; - return $$($nesting, 'Comparable').$normalize(cmp) == 0; - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return false - } finally { Opal.pop_exception() } - } else { throw $err; } - } - }, $Comparable_$eq_eq$2.$$arity = 1); - - Opal.def(self, '$>', $Comparable_$gt$3 = function(other) { - var self = this, cmp = nil; - - - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed") - }; - return $$($nesting, 'Comparable').$normalize(cmp) > 0; - }, $Comparable_$gt$3.$$arity = 1); - - Opal.def(self, '$>=', $Comparable_$gt_eq$4 = function(other) { - var self = this, cmp = nil; - - - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed") - }; - return $$($nesting, 'Comparable').$normalize(cmp) >= 0; - }, $Comparable_$gt_eq$4.$$arity = 1); - - Opal.def(self, '$<', $Comparable_$lt$5 = function(other) { - var self = this, cmp = nil; - - - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed") - }; - return $$($nesting, 'Comparable').$normalize(cmp) < 0; - }, $Comparable_$lt$5.$$arity = 1); - - Opal.def(self, '$<=', $Comparable_$lt_eq$6 = function(other) { - var self = this, cmp = nil; - - - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed") - }; - return $$($nesting, 'Comparable').$normalize(cmp) <= 0; - }, $Comparable_$lt_eq$6.$$arity = 1); - - Opal.def(self, '$between?', $Comparable_between$ques$7 = function(min, max) { - var self = this; - - - if ($rb_lt(self, min)) { - return false}; - if ($rb_gt(self, max)) { - return false}; - return true; - }, $Comparable_between$ques$7.$$arity = 2); - - Opal.def(self, '$clamp', $Comparable_clamp$8 = function $$clamp(min, max) { - var self = this, cmp = nil; - - - cmp = min['$<=>'](max); - if ($truthy(cmp)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (min.$class()) + " with " + (max.$class()) + " failed") - }; - if ($truthy($rb_gt($$($nesting, 'Comparable').$normalize(cmp), 0))) { - self.$raise($$($nesting, 'ArgumentError'), "min argument must be smaller than max argument")}; - if ($truthy($rb_lt($$($nesting, 'Comparable').$normalize(self['$<=>'](min)), 0))) { - return min}; - if ($truthy($rb_gt($$($nesting, 'Comparable').$normalize(self['$<=>'](max)), 0))) { - return max}; - return self; - }, $Comparable_clamp$8.$$arity = 2); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/regexp"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $gvars = Opal.gvars; - - Opal.add_stubs(['$nil?', '$[]', '$raise', '$escape', '$options', '$to_str', '$new', '$join', '$coerce_to!', '$!', '$match', '$coerce_to?', '$begin', '$coerce_to', '$=~', '$attr_reader', '$===', '$inspect', '$to_a']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'RegexpError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Regexp'); - - var $nesting = [self].concat($parent_nesting), $Regexp_$eq_eq$6, $Regexp_$eq_eq_eq$7, $Regexp_$eq_tilde$8, $Regexp_inspect$9, $Regexp_match$10, $Regexp_match$ques$11, $Regexp_$$12, $Regexp_source$13, $Regexp_options$14, $Regexp_casefold$ques$15; - - - Opal.const_set($nesting[0], 'IGNORECASE', 1); - Opal.const_set($nesting[0], 'EXTENDED', 2); - Opal.const_set($nesting[0], 'MULTILINE', 4); - Opal.defineProperty(self.$$prototype, '$$is_regexp', true); - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $allocate$1, $escape$2, $last_match$3, $union$4, $new$5; - - - - Opal.def(self, '$allocate', $allocate$1 = function $$allocate() { - var $iter = $allocate$1.$$p, $yield = $iter || nil, self = this, allocated = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $allocate$1.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - allocated = $send(self, Opal.find_super_dispatcher(self, 'allocate', $allocate$1, false), $zuper, $iter); - allocated.uninitialized = true; - return allocated; - }, $allocate$1.$$arity = 0); - - Opal.def(self, '$escape', $escape$2 = function $$escape(string) { - var self = this; - - return Opal.escape_regexp(string); - }, $escape$2.$$arity = 1); - - Opal.def(self, '$last_match', $last_match$3 = function $$last_match(n) { - var self = this; - if ($gvars["~"] == null) $gvars["~"] = nil; - - - - if (n == null) { - n = nil; - }; - if ($truthy(n['$nil?']())) { - return $gvars["~"] - } else { - return $gvars["~"]['$[]'](n) - }; - }, $last_match$3.$$arity = -1); - Opal.alias(self, "quote", "escape"); - - Opal.def(self, '$union', $union$4 = function $$union($a) { - var $post_args, parts, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - parts = $post_args;; - - var is_first_part_array, quoted_validated, part, options, each_part_options; - if (parts.length == 0) { - return /(?!)/; - } - // return fast if there's only one element - if (parts.length == 1 && parts[0].$$is_regexp) { - return parts[0]; - } - // cover the 2 arrays passed as arguments case - is_first_part_array = parts[0].$$is_array; - if (parts.length > 1 && is_first_part_array) { - self.$raise($$($nesting, 'TypeError'), "no implicit conversion of Array into String") - } - // deal with splat issues (related to https://github.com/opal/opal/issues/858) - if (is_first_part_array) { - parts = parts[0]; - } - options = undefined; - quoted_validated = []; - for (var i=0; i < parts.length; i++) { - part = parts[i]; - if (part.$$is_string) { - quoted_validated.push(self.$escape(part)); - } - else if (part.$$is_regexp) { - each_part_options = (part).$options(); - if (options != undefined && options != each_part_options) { - self.$raise($$($nesting, 'TypeError'), "All expressions must use the same options") - } - options = each_part_options; - quoted_validated.push('('+part.source+')'); - } - else { - quoted_validated.push(self.$escape((part).$to_str())); - } - } - ; - return self.$new((quoted_validated).$join("|"), options); - }, $union$4.$$arity = -1); - return (Opal.def(self, '$new', $new$5 = function(regexp, options) { - var self = this; - - - ; - - if (regexp.$$is_regexp) { - return new RegExp(regexp); - } - - regexp = $$($nesting, 'Opal')['$coerce_to!'](regexp, $$($nesting, 'String'), "to_str"); - - if (regexp.charAt(regexp.length - 1) === '\\' && regexp.charAt(regexp.length - 2) !== '\\') { - self.$raise($$($nesting, 'RegexpError'), "" + "too short escape sequence: /" + (regexp) + "/") - } - - if (options === undefined || options['$!']()) { - return new RegExp(regexp); - } - - if (options.$$is_number) { - var temp = ''; - if ($$($nesting, 'IGNORECASE') & options) { temp += 'i'; } - if ($$($nesting, 'MULTILINE') & options) { temp += 'm'; } - options = temp; - } - else { - options = 'i'; - } - - return new RegExp(regexp, options); - ; - }, $new$5.$$arity = -2), nil) && 'new'; - })(Opal.get_singleton_class(self), $nesting); - - Opal.def(self, '$==', $Regexp_$eq_eq$6 = function(other) { - var self = this; - - return other instanceof RegExp && self.toString() === other.toString(); - }, $Regexp_$eq_eq$6.$$arity = 1); - - Opal.def(self, '$===', $Regexp_$eq_eq_eq$7 = function(string) { - var self = this; - - return self.$match($$($nesting, 'Opal')['$coerce_to?'](string, $$($nesting, 'String'), "to_str")) !== nil - }, $Regexp_$eq_eq_eq$7.$$arity = 1); - - Opal.def(self, '$=~', $Regexp_$eq_tilde$8 = function(string) { - var $a, self = this; - if ($gvars["~"] == null) $gvars["~"] = nil; - - return ($truthy($a = self.$match(string)) ? $gvars["~"].$begin(0) : $a) - }, $Regexp_$eq_tilde$8.$$arity = 1); - Opal.alias(self, "eql?", "=="); - - Opal.def(self, '$inspect', $Regexp_inspect$9 = function $$inspect() { - var self = this; - - - var regexp_format = /^\/(.*)\/([^\/]*)$/; - var value = self.toString(); - var matches = regexp_format.exec(value); - if (matches) { - var regexp_pattern = matches[1]; - var regexp_flags = matches[2]; - var chars = regexp_pattern.split(''); - var chars_length = chars.length; - var char_escaped = false; - var regexp_pattern_escaped = ''; - for (var i = 0; i < chars_length; i++) { - var current_char = chars[i]; - if (!char_escaped && current_char == '/') { - regexp_pattern_escaped = regexp_pattern_escaped.concat('\\'); - } - regexp_pattern_escaped = regexp_pattern_escaped.concat(current_char); - if (current_char == '\\') { - if (char_escaped) { - // does not over escape - char_escaped = false; - } else { - char_escaped = true; - } - } else { - char_escaped = false; - } - } - return '/' + regexp_pattern_escaped + '/' + regexp_flags; - } else { - return value; - } - - }, $Regexp_inspect$9.$$arity = 0); - - Opal.def(self, '$match', $Regexp_match$10 = function $$match(string, pos) { - var $iter = $Regexp_match$10.$$p, block = $iter || nil, self = this; - if ($gvars["~"] == null) $gvars["~"] = nil; - - if ($iter) $Regexp_match$10.$$p = null; - - - if ($iter) $Regexp_match$10.$$p = null;; - ; - - if (self.uninitialized) { - self.$raise($$($nesting, 'TypeError'), "uninitialized Regexp") - } - - if (pos === undefined) { - if (string === nil) return ($gvars["~"] = nil); - var m = self.exec($$($nesting, 'Opal').$coerce_to(string, $$($nesting, 'String'), "to_str")); - if (m) { - ($gvars["~"] = $$($nesting, 'MatchData').$new(self, m)); - return block === nil ? $gvars["~"] : Opal.yield1(block, $gvars["~"]); - } else { - return ($gvars["~"] = nil); - } - } - - pos = $$($nesting, 'Opal').$coerce_to(pos, $$($nesting, 'Integer'), "to_int"); - - if (string === nil) { - return ($gvars["~"] = nil); - } - - string = $$($nesting, 'Opal').$coerce_to(string, $$($nesting, 'String'), "to_str"); - - if (pos < 0) { - pos += string.length; - if (pos < 0) { - return ($gvars["~"] = nil); - } - } - - // global RegExp maintains state, so not using self/this - var md, re = Opal.global_regexp(self); - - while (true) { - md = re.exec(string); - if (md === null) { - return ($gvars["~"] = nil); - } - if (md.index >= pos) { - ($gvars["~"] = $$($nesting, 'MatchData').$new(re, md)); - return block === nil ? $gvars["~"] : Opal.yield1(block, $gvars["~"]); - } - re.lastIndex = md.index + 1; - } - ; - }, $Regexp_match$10.$$arity = -2); - - Opal.def(self, '$match?', $Regexp_match$ques$11 = function(string, pos) { - var self = this; - - - ; - - if (self.uninitialized) { - self.$raise($$($nesting, 'TypeError'), "uninitialized Regexp") - } - - if (pos === undefined) { - return string === nil ? false : self.test($$($nesting, 'Opal').$coerce_to(string, $$($nesting, 'String'), "to_str")); - } - - pos = $$($nesting, 'Opal').$coerce_to(pos, $$($nesting, 'Integer'), "to_int"); - - if (string === nil) { - return false; - } - - string = $$($nesting, 'Opal').$coerce_to(string, $$($nesting, 'String'), "to_str"); - - if (pos < 0) { - pos += string.length; - if (pos < 0) { - return false; - } - } - - // global RegExp maintains state, so not using self/this - var md, re = Opal.global_regexp(self); - - md = re.exec(string); - if (md === null || md.index < pos) { - return false; - } else { - return true; - } - ; - }, $Regexp_match$ques$11.$$arity = -2); - - Opal.def(self, '$~', $Regexp_$$12 = function() { - var self = this; - if ($gvars._ == null) $gvars._ = nil; - - return self['$=~']($gvars._) - }, $Regexp_$$12.$$arity = 0); - - Opal.def(self, '$source', $Regexp_source$13 = function $$source() { - var self = this; - - return self.source; - }, $Regexp_source$13.$$arity = 0); - - Opal.def(self, '$options', $Regexp_options$14 = function $$options() { - var self = this; - - - if (self.uninitialized) { - self.$raise($$($nesting, 'TypeError'), "uninitialized Regexp") - } - var result = 0; - // should be supported in IE6 according to https://msdn.microsoft.com/en-us/library/7f5z26w4(v=vs.94).aspx - if (self.multiline) { - result |= $$($nesting, 'MULTILINE'); - } - if (self.ignoreCase) { - result |= $$($nesting, 'IGNORECASE'); - } - return result; - - }, $Regexp_options$14.$$arity = 0); - - Opal.def(self, '$casefold?', $Regexp_casefold$ques$15 = function() { - var self = this; - - return self.ignoreCase; - }, $Regexp_casefold$ques$15.$$arity = 0); - return Opal.alias(self, "to_s", "source"); - })($nesting[0], RegExp, $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'MatchData'); - - var $nesting = [self].concat($parent_nesting), $MatchData_initialize$16, $MatchData_$$$17, $MatchData_offset$18, $MatchData_$eq_eq$19, $MatchData_begin$20, $MatchData_end$21, $MatchData_captures$22, $MatchData_inspect$23, $MatchData_length$24, $MatchData_to_a$25, $MatchData_to_s$26, $MatchData_values_at$27; - - self.$$prototype.matches = nil; - - self.$attr_reader("post_match", "pre_match", "regexp", "string"); - - Opal.def(self, '$initialize', $MatchData_initialize$16 = function $$initialize(regexp, match_groups) { - var self = this; - - - $gvars["~"] = self; - self.regexp = regexp; - self.begin = match_groups.index; - self.string = match_groups.input; - self.pre_match = match_groups.input.slice(0, match_groups.index); - self.post_match = match_groups.input.slice(match_groups.index + match_groups[0].length); - self.matches = []; - - for (var i = 0, length = match_groups.length; i < length; i++) { - var group = match_groups[i]; - - if (group == null) { - self.matches.push(nil); - } - else { - self.matches.push(group); - } - } - ; - }, $MatchData_initialize$16.$$arity = 2); - - Opal.def(self, '$[]', $MatchData_$$$17 = function($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self.matches, '[]', Opal.to_a(args)); - }, $MatchData_$$$17.$$arity = -1); - - Opal.def(self, '$offset', $MatchData_offset$18 = function $$offset(n) { - var self = this; - - - if (n !== 0) { - self.$raise($$($nesting, 'ArgumentError'), "MatchData#offset only supports 0th element") - } - return [self.begin, self.begin + self.matches[n].length]; - - }, $MatchData_offset$18.$$arity = 1); - - Opal.def(self, '$==', $MatchData_$eq_eq$19 = function(other) { - var $a, $b, $c, $d, self = this; - - - if ($truthy($$($nesting, 'MatchData')['$==='](other))) { - } else { - return false - }; - return ($truthy($a = ($truthy($b = ($truthy($c = ($truthy($d = self.string == other.string) ? self.regexp.toString() == other.regexp.toString() : $d)) ? self.pre_match == other.pre_match : $c)) ? self.post_match == other.post_match : $b)) ? self.begin == other.begin : $a); - }, $MatchData_$eq_eq$19.$$arity = 1); - Opal.alias(self, "eql?", "=="); - - Opal.def(self, '$begin', $MatchData_begin$20 = function $$begin(n) { - var self = this; - - - if (n !== 0) { - self.$raise($$($nesting, 'ArgumentError'), "MatchData#begin only supports 0th element") - } - return self.begin; - - }, $MatchData_begin$20.$$arity = 1); - - Opal.def(self, '$end', $MatchData_end$21 = function $$end(n) { - var self = this; - - - if (n !== 0) { - self.$raise($$($nesting, 'ArgumentError'), "MatchData#end only supports 0th element") - } - return self.begin + self.matches[n].length; - - }, $MatchData_end$21.$$arity = 1); - - Opal.def(self, '$captures', $MatchData_captures$22 = function $$captures() { - var self = this; - - return self.matches.slice(1) - }, $MatchData_captures$22.$$arity = 0); - - Opal.def(self, '$inspect', $MatchData_inspect$23 = function $$inspect() { - var self = this; - - - var str = "#"; - - }, $MatchData_inspect$23.$$arity = 0); - - Opal.def(self, '$length', $MatchData_length$24 = function $$length() { - var self = this; - - return self.matches.length - }, $MatchData_length$24.$$arity = 0); - Opal.alias(self, "size", "length"); - - Opal.def(self, '$to_a', $MatchData_to_a$25 = function $$to_a() { - var self = this; - - return self.matches - }, $MatchData_to_a$25.$$arity = 0); - - Opal.def(self, '$to_s', $MatchData_to_s$26 = function $$to_s() { - var self = this; - - return self.matches[0] - }, $MatchData_to_s$26.$$arity = 0); - return (Opal.def(self, '$values_at', $MatchData_values_at$27 = function $$values_at($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - var i, a, index, values = []; - - for (i = 0; i < args.length; i++) { - - if (args[i].$$is_range) { - a = (args[i]).$to_a(); - a.unshift(i, 1); - Array.prototype.splice.apply(args, a); - } - - index = $$($nesting, 'Opal')['$coerce_to!'](args[i], $$($nesting, 'Integer'), "to_int"); - - if (index < 0) { - index += self.matches.length; - if (index < 0) { - values.push(nil); - continue; - } - } - - values.push(self.matches[index]); - } - - return values; - ; - }, $MatchData_values_at$27.$$arity = -1), nil) && 'values_at'; - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/string"] = function(Opal) { - function $rb_divide(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs / rhs : lhs['$/'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send, $gvars = Opal.gvars; - - Opal.add_stubs(['$require', '$include', '$coerce_to?', '$coerce_to', '$raise', '$===', '$format', '$to_s', '$respond_to?', '$to_str', '$<=>', '$==', '$=~', '$new', '$force_encoding', '$casecmp', '$empty?', '$ljust', '$ceil', '$/', '$+', '$rjust', '$floor', '$to_a', '$each_char', '$to_proc', '$coerce_to!', '$copy_singleton_methods', '$initialize_clone', '$initialize_dup', '$enum_for', '$size', '$chomp', '$[]', '$to_i', '$each_line', '$class', '$match', '$match?', '$captures', '$proc', '$succ', '$escape']); - - self.$require("corelib/comparable"); - self.$require("corelib/regexp"); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'String'); - - var $nesting = [self].concat($parent_nesting), $String___id__$1, $String_try_convert$2, $String_new$3, $String_initialize$4, $String_$percent$5, $String_$$6, $String_$plus$7, $String_$lt_eq_gt$8, $String_$eq_eq$9, $String_$eq_tilde$10, $String_$$$11, $String_b$12, $String_capitalize$13, $String_casecmp$14, $String_casecmp$ques$15, $String_center$16, $String_chars$17, $String_chomp$18, $String_chop$19, $String_chr$20, $String_clone$21, $String_dup$22, $String_count$23, $String_delete$24, $String_delete_prefix$25, $String_delete_suffix$26, $String_downcase$27, $String_each_char$28, $String_each_line$30, $String_empty$ques$31, $String_end_with$ques$32, $String_gsub$33, $String_hash$34, $String_hex$35, $String_include$ques$36, $String_index$37, $String_inspect$38, $String_intern$39, $String_lines$40, $String_length$41, $String_ljust$42, $String_lstrip$43, $String_ascii_only$ques$44, $String_match$45, $String_match$ques$46, $String_next$47, $String_oct$48, $String_ord$49, $String_partition$50, $String_reverse$51, $String_rindex$52, $String_rjust$53, $String_rpartition$54, $String_rstrip$55, $String_scan$56, $String_split$57, $String_squeeze$58, $String_start_with$ques$59, $String_strip$60, $String_sub$61, $String_sum$62, $String_swapcase$63, $String_to_f$64, $String_to_i$65, $String_to_proc$66, $String_to_s$68, $String_tr$69, $String_tr_s$70, $String_upcase$71, $String_upto$72, $String_instance_variables$73, $String__load$74, $String_unicode_normalize$75, $String_unicode_normalized$ques$76, $String_unpack$77, $String_unpack1$78; - - - self.$include($$($nesting, 'Comparable')); - - Opal.defineProperty(self.$$prototype, '$$is_string', true); - - Opal.defineProperty(self.$$prototype, '$$cast', function(string) { - var klass = this.$$class; - if (klass.$$constructor === String) { - return string; - } else { - return new klass.$$constructor(string); - } - }); - ; - - Opal.def(self, '$__id__', $String___id__$1 = function $$__id__() { - var self = this; - - return self.toString(); - }, $String___id__$1.$$arity = 0); - Opal.alias(self, "object_id", "__id__"); - Opal.defs(self, '$try_convert', $String_try_convert$2 = function $$try_convert(what) { - var self = this; - - return $$($nesting, 'Opal')['$coerce_to?'](what, $$($nesting, 'String'), "to_str") - }, $String_try_convert$2.$$arity = 1); - Opal.defs(self, '$new', $String_new$3 = function(str) { - var self = this; - - - - if (str == null) { - str = ""; - }; - str = $$($nesting, 'Opal').$coerce_to(str, $$($nesting, 'String'), "to_str"); - return new self.$$constructor(str);; - }, $String_new$3.$$arity = -1); - - Opal.def(self, '$initialize', $String_initialize$4 = function $$initialize(str) { - var self = this; - - - ; - - if (str === undefined) { - return self; - } - ; - return self.$raise($$($nesting, 'NotImplementedError'), "Mutable strings are not supported in Opal."); - }, $String_initialize$4.$$arity = -1); - - Opal.def(self, '$%', $String_$percent$5 = function(data) { - var self = this; - - if ($truthy($$($nesting, 'Array')['$==='](data))) { - return $send(self, 'format', [self].concat(Opal.to_a(data))) - } else { - return self.$format(self, data) - } - }, $String_$percent$5.$$arity = 1); - - Opal.def(self, '$*', $String_$$6 = function(count) { - var self = this; - - - count = $$($nesting, 'Opal').$coerce_to(count, $$($nesting, 'Integer'), "to_int"); - - if (count < 0) { - self.$raise($$($nesting, 'ArgumentError'), "negative argument") - } - - if (count === 0) { - return self.$$cast(''); - } - - var result = '', - string = self.toString(); - - // All credit for the bit-twiddling magic code below goes to Mozilla - // polyfill implementation of String.prototype.repeat() posted here: - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat - - if (string.length * count >= 1 << 28) { - self.$raise($$($nesting, 'RangeError'), "multiply count must not overflow maximum string size") - } - - for (;;) { - if ((count & 1) === 1) { - result += string; - } - count >>>= 1; - if (count === 0) { - break; - } - string += string; - } - - return self.$$cast(result); - - }, $String_$$6.$$arity = 1); - - Opal.def(self, '$+', $String_$plus$7 = function(other) { - var self = this; - - - other = $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'String'), "to_str"); - return self + other.$to_s(); - }, $String_$plus$7.$$arity = 1); - - Opal.def(self, '$<=>', $String_$lt_eq_gt$8 = function(other) { - var self = this; - - if ($truthy(other['$respond_to?']("to_str"))) { - - other = other.$to_str().$to_s(); - return self > other ? 1 : (self < other ? -1 : 0);; - } else { - - var cmp = other['$<=>'](self); - - if (cmp === nil) { - return nil; - } - else { - return cmp > 0 ? -1 : (cmp < 0 ? 1 : 0); - } - - } - }, $String_$lt_eq_gt$8.$$arity = 1); - - Opal.def(self, '$==', $String_$eq_eq$9 = function(other) { - var self = this; - - - if (other.$$is_string) { - return self.toString() === other.toString(); - } - if ($$($nesting, 'Opal')['$respond_to?'](other, "to_str")) { - return other['$=='](self); - } - return false; - - }, $String_$eq_eq$9.$$arity = 1); - Opal.alias(self, "eql?", "=="); - Opal.alias(self, "===", "=="); - - Opal.def(self, '$=~', $String_$eq_tilde$10 = function(other) { - var self = this; - - - if (other.$$is_string) { - self.$raise($$($nesting, 'TypeError'), "type mismatch: String given"); - } - - return other['$=~'](self); - - }, $String_$eq_tilde$10.$$arity = 1); - - Opal.def(self, '$[]', $String_$$$11 = function(index, length) { - var self = this; - - - ; - - var size = self.length, exclude; - - if (index.$$is_range) { - exclude = index.excl; - length = $$($nesting, 'Opal').$coerce_to(index.end, $$($nesting, 'Integer'), "to_int"); - index = $$($nesting, 'Opal').$coerce_to(index.begin, $$($nesting, 'Integer'), "to_int"); - - if (Math.abs(index) > size) { - return nil; - } - - if (index < 0) { - index += size; - } - - if (length < 0) { - length += size; - } - - if (!exclude) { - length += 1; - } - - length = length - index; - - if (length < 0) { - length = 0; - } - - return self.$$cast(self.substr(index, length)); - } - - - if (index.$$is_string) { - if (length != null) { - self.$raise($$($nesting, 'TypeError')) - } - return self.indexOf(index) !== -1 ? self.$$cast(index) : nil; - } - - - if (index.$$is_regexp) { - var match = self.match(index); - - if (match === null) { - ($gvars["~"] = nil) - return nil; - } - - ($gvars["~"] = $$($nesting, 'MatchData').$new(index, match)) - - if (length == null) { - return self.$$cast(match[0]); - } - - length = $$($nesting, 'Opal').$coerce_to(length, $$($nesting, 'Integer'), "to_int"); - - if (length < 0 && -length < match.length) { - return self.$$cast(match[length += match.length]); - } - - if (length >= 0 && length < match.length) { - return self.$$cast(match[length]); - } - - return nil; - } - - - index = $$($nesting, 'Opal').$coerce_to(index, $$($nesting, 'Integer'), "to_int"); - - if (index < 0) { - index += size; - } - - if (length == null) { - if (index >= size || index < 0) { - return nil; - } - return self.$$cast(self.substr(index, 1)); - } - - length = $$($nesting, 'Opal').$coerce_to(length, $$($nesting, 'Integer'), "to_int"); - - if (length < 0) { - return nil; - } - - if (index > size || index < 0) { - return nil; - } - - return self.$$cast(self.substr(index, length)); - ; - }, $String_$$$11.$$arity = -2); - Opal.alias(self, "byteslice", "[]"); - - Opal.def(self, '$b', $String_b$12 = function $$b() { - var self = this; - - return self.$force_encoding("binary") - }, $String_b$12.$$arity = 0); - - Opal.def(self, '$capitalize', $String_capitalize$13 = function $$capitalize() { - var self = this; - - return self.$$cast(self.charAt(0).toUpperCase() + self.substr(1).toLowerCase()); - }, $String_capitalize$13.$$arity = 0); - - Opal.def(self, '$casecmp', $String_casecmp$14 = function $$casecmp(other) { - var self = this; - - - if ($truthy(other['$respond_to?']("to_str"))) { - } else { - return nil - }; - other = $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'String'), "to_str").$to_s(); - - var ascii_only = /^[\x00-\x7F]*$/; - if (ascii_only.test(self) && ascii_only.test(other)) { - self = self.toLowerCase(); - other = other.toLowerCase(); - } - ; - return self['$<=>'](other); - }, $String_casecmp$14.$$arity = 1); - - Opal.def(self, '$casecmp?', $String_casecmp$ques$15 = function(other) { - var self = this; - - - var cmp = self.$casecmp(other); - if (cmp === nil) { - return nil; - } else { - return cmp === 0; - } - - }, $String_casecmp$ques$15.$$arity = 1); - - Opal.def(self, '$center', $String_center$16 = function $$center(width, padstr) { - var self = this; - - - - if (padstr == null) { - padstr = " "; - }; - width = $$($nesting, 'Opal').$coerce_to(width, $$($nesting, 'Integer'), "to_int"); - padstr = $$($nesting, 'Opal').$coerce_to(padstr, $$($nesting, 'String'), "to_str").$to_s(); - if ($truthy(padstr['$empty?']())) { - self.$raise($$($nesting, 'ArgumentError'), "zero width padding")}; - if ($truthy(width <= self.length)) { - return self}; - - var ljustified = self.$ljust($rb_divide($rb_plus(width, self.length), 2).$ceil(), padstr), - rjustified = self.$rjust($rb_divide($rb_plus(width, self.length), 2).$floor(), padstr); - - return self.$$cast(rjustified + ljustified.slice(self.length)); - ; - }, $String_center$16.$$arity = -2); - - Opal.def(self, '$chars', $String_chars$17 = function $$chars() { - var $iter = $String_chars$17.$$p, block = $iter || nil, self = this; - - if ($iter) $String_chars$17.$$p = null; - - - if ($iter) $String_chars$17.$$p = null;; - if ($truthy(block)) { - } else { - return self.$each_char().$to_a() - }; - return $send(self, 'each_char', [], block.$to_proc()); - }, $String_chars$17.$$arity = 0); - - Opal.def(self, '$chomp', $String_chomp$18 = function $$chomp(separator) { - var self = this; - if ($gvars["/"] == null) $gvars["/"] = nil; - - - - if (separator == null) { - separator = $gvars["/"]; - }; - if ($truthy(separator === nil || self.length === 0)) { - return self}; - separator = $$($nesting, 'Opal')['$coerce_to!'](separator, $$($nesting, 'String'), "to_str").$to_s(); - - var result; - - if (separator === "\n") { - result = self.replace(/\r?\n?$/, ''); - } - else if (separator === "") { - result = self.replace(/(\r?\n)+$/, ''); - } - else if (self.length >= separator.length) { - var tail = self.substr(self.length - separator.length, separator.length); - - if (tail === separator) { - result = self.substr(0, self.length - separator.length); - } - } - - if (result != null) { - return self.$$cast(result); - } - ; - return self; - }, $String_chomp$18.$$arity = -1); - - Opal.def(self, '$chop', $String_chop$19 = function $$chop() { - var self = this; - - - var length = self.length, result; - - if (length <= 1) { - result = ""; - } else if (self.charAt(length - 1) === "\n" && self.charAt(length - 2) === "\r") { - result = self.substr(0, length - 2); - } else { - result = self.substr(0, length - 1); - } - - return self.$$cast(result); - - }, $String_chop$19.$$arity = 0); - - Opal.def(self, '$chr', $String_chr$20 = function $$chr() { - var self = this; - - return self.charAt(0); - }, $String_chr$20.$$arity = 0); - - Opal.def(self, '$clone', $String_clone$21 = function $$clone() { - var self = this, copy = nil; - - - copy = self.slice(); - copy.$copy_singleton_methods(self); - copy.$initialize_clone(self); - return copy; - }, $String_clone$21.$$arity = 0); - - Opal.def(self, '$dup', $String_dup$22 = function $$dup() { - var self = this, copy = nil; - - - copy = self.slice(); - copy.$initialize_dup(self); - return copy; - }, $String_dup$22.$$arity = 0); - - Opal.def(self, '$count', $String_count$23 = function $$count($a) { - var $post_args, sets, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - sets = $post_args;; - - if (sets.length === 0) { - self.$raise($$($nesting, 'ArgumentError'), "ArgumentError: wrong number of arguments (0 for 1+)") - } - var char_class = char_class_from_char_sets(sets); - if (char_class === null) { - return 0; - } - return self.length - self.replace(new RegExp(char_class, 'g'), '').length; - ; - }, $String_count$23.$$arity = -1); - - Opal.def(self, '$delete', $String_delete$24 = function($a) { - var $post_args, sets, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - sets = $post_args;; - - if (sets.length === 0) { - self.$raise($$($nesting, 'ArgumentError'), "ArgumentError: wrong number of arguments (0 for 1+)") - } - var char_class = char_class_from_char_sets(sets); - if (char_class === null) { - return self; - } - return self.$$cast(self.replace(new RegExp(char_class, 'g'), '')); - ; - }, $String_delete$24.$$arity = -1); - - Opal.def(self, '$delete_prefix', $String_delete_prefix$25 = function $$delete_prefix(prefix) { - var self = this; - - - if (!prefix.$$is_string) { - (prefix = $$($nesting, 'Opal').$coerce_to(prefix, $$($nesting, 'String'), "to_str")) - } - - if (self.slice(0, prefix.length) === prefix) { - return self.$$cast(self.slice(prefix.length)); - } else { - return self; - } - - }, $String_delete_prefix$25.$$arity = 1); - - Opal.def(self, '$delete_suffix', $String_delete_suffix$26 = function $$delete_suffix(suffix) { - var self = this; - - - if (!suffix.$$is_string) { - (suffix = $$($nesting, 'Opal').$coerce_to(suffix, $$($nesting, 'String'), "to_str")) - } - - if (self.slice(self.length - suffix.length) === suffix) { - return self.$$cast(self.slice(0, self.length - suffix.length)); - } else { - return self; - } - - }, $String_delete_suffix$26.$$arity = 1); - - Opal.def(self, '$downcase', $String_downcase$27 = function $$downcase() { - var self = this; - - return self.$$cast(self.toLowerCase()); - }, $String_downcase$27.$$arity = 0); - - Opal.def(self, '$each_char', $String_each_char$28 = function $$each_char() { - var $iter = $String_each_char$28.$$p, block = $iter || nil, $$29, self = this; - - if ($iter) $String_each_char$28.$$p = null; - - - if ($iter) $String_each_char$28.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["each_char"], ($$29 = function(){var self = $$29.$$s || this; - - return self.$size()}, $$29.$$s = self, $$29.$$arity = 0, $$29)) - }; - - for (var i = 0, length = self.length; i < length; i++) { - Opal.yield1(block, self.charAt(i)); - } - ; - return self; - }, $String_each_char$28.$$arity = 0); - - Opal.def(self, '$each_line', $String_each_line$30 = function $$each_line(separator) { - var $iter = $String_each_line$30.$$p, block = $iter || nil, self = this; - if ($gvars["/"] == null) $gvars["/"] = nil; - - if ($iter) $String_each_line$30.$$p = null; - - - if ($iter) $String_each_line$30.$$p = null;; - - if (separator == null) { - separator = $gvars["/"]; - }; - if ((block !== nil)) { - } else { - return self.$enum_for("each_line", separator) - }; - - if (separator === nil) { - Opal.yield1(block, self); - - return self; - } - - separator = $$($nesting, 'Opal').$coerce_to(separator, $$($nesting, 'String'), "to_str") - - var a, i, n, length, chomped, trailing, splitted; - - if (separator.length === 0) { - for (a = self.split(/(\n{2,})/), i = 0, n = a.length; i < n; i += 2) { - if (a[i] || a[i + 1]) { - var value = (a[i] || "") + (a[i + 1] || ""); - Opal.yield1(block, self.$$cast(value)); - } - } - - return self; - } - - chomped = self.$chomp(separator); - trailing = self.length != chomped.length; - splitted = chomped.split(separator); - - for (i = 0, length = splitted.length; i < length; i++) { - if (i < length - 1 || trailing) { - Opal.yield1(block, self.$$cast(splitted[i] + separator)); - } - else { - Opal.yield1(block, self.$$cast(splitted[i])); - } - } - ; - return self; - }, $String_each_line$30.$$arity = -1); - - Opal.def(self, '$empty?', $String_empty$ques$31 = function() { - var self = this; - - return self.length === 0; - }, $String_empty$ques$31.$$arity = 0); - - Opal.def(self, '$end_with?', $String_end_with$ques$32 = function($a) { - var $post_args, suffixes, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - suffixes = $post_args;; - - for (var i = 0, length = suffixes.length; i < length; i++) { - var suffix = $$($nesting, 'Opal').$coerce_to(suffixes[i], $$($nesting, 'String'), "to_str").$to_s(); - - if (self.length >= suffix.length && - self.substr(self.length - suffix.length, suffix.length) == suffix) { - return true; - } - } - ; - return false; - }, $String_end_with$ques$32.$$arity = -1); - Opal.alias(self, "equal?", "==="); - - Opal.def(self, '$gsub', $String_gsub$33 = function $$gsub(pattern, replacement) { - var $iter = $String_gsub$33.$$p, block = $iter || nil, self = this; - - if ($iter) $String_gsub$33.$$p = null; - - - if ($iter) $String_gsub$33.$$p = null;; - ; - - if (replacement === undefined && block === nil) { - return self.$enum_for("gsub", pattern); - } - - var result = '', match_data = nil, index = 0, match, _replacement; - - if (pattern.$$is_regexp) { - pattern = Opal.global_multiline_regexp(pattern); - } else { - pattern = $$($nesting, 'Opal').$coerce_to(pattern, $$($nesting, 'String'), "to_str"); - pattern = new RegExp(pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'gm'); - } - - var lastIndex; - while (true) { - match = pattern.exec(self); - - if (match === null) { - ($gvars["~"] = nil) - result += self.slice(index); - break; - } - - match_data = $$($nesting, 'MatchData').$new(pattern, match); - - if (replacement === undefined) { - lastIndex = pattern.lastIndex; - _replacement = block(match[0]); - pattern.lastIndex = lastIndex; // save and restore lastIndex - } - else if (replacement.$$is_hash) { - _replacement = (replacement)['$[]'](match[0]).$to_s(); - } - else { - if (!replacement.$$is_string) { - replacement = $$($nesting, 'Opal').$coerce_to(replacement, $$($nesting, 'String'), "to_str"); - } - _replacement = replacement.replace(/([\\]+)([0-9+&`'])/g, function (original, slashes, command) { - if (slashes.length % 2 === 0) { - return original; - } - switch (command) { - case "+": - for (var i = match.length - 1; i > 0; i--) { - if (match[i] !== undefined) { - return slashes.slice(1) + match[i]; - } - } - return ''; - case "&": return slashes.slice(1) + match[0]; - case "`": return slashes.slice(1) + self.slice(0, match.index); - case "'": return slashes.slice(1) + self.slice(match.index + match[0].length); - default: return slashes.slice(1) + (match[command] || ''); - } - }).replace(/\\\\/g, '\\'); - } - - if (pattern.lastIndex === match.index) { - result += (_replacement + self.slice(index, match.index + 1)) - pattern.lastIndex += 1; - } - else { - result += (self.slice(index, match.index) + _replacement) - } - index = pattern.lastIndex; - } - - ($gvars["~"] = match_data) - return self.$$cast(result); - ; - }, $String_gsub$33.$$arity = -2); - - Opal.def(self, '$hash', $String_hash$34 = function $$hash() { - var self = this; - - return self.toString(); - }, $String_hash$34.$$arity = 0); - - Opal.def(self, '$hex', $String_hex$35 = function $$hex() { - var self = this; - - return self.$to_i(16) - }, $String_hex$35.$$arity = 0); - - Opal.def(self, '$include?', $String_include$ques$36 = function(other) { - var self = this; - - - if (!other.$$is_string) { - (other = $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'String'), "to_str")) - } - return self.indexOf(other) !== -1; - - }, $String_include$ques$36.$$arity = 1); - - Opal.def(self, '$index', $String_index$37 = function $$index(search, offset) { - var self = this; - - - ; - - var index, - match, - regex; - - if (offset === undefined) { - offset = 0; - } else { - offset = $$($nesting, 'Opal').$coerce_to(offset, $$($nesting, 'Integer'), "to_int"); - if (offset < 0) { - offset += self.length; - if (offset < 0) { - return nil; - } - } - } - - if (search.$$is_regexp) { - regex = Opal.global_multiline_regexp(search); - while (true) { - match = regex.exec(self); - if (match === null) { - ($gvars["~"] = nil); - index = -1; - break; - } - if (match.index >= offset) { - ($gvars["~"] = $$($nesting, 'MatchData').$new(regex, match)) - index = match.index; - break; - } - regex.lastIndex = match.index + 1; - } - } else { - search = $$($nesting, 'Opal').$coerce_to(search, $$($nesting, 'String'), "to_str"); - if (search.length === 0 && offset > self.length) { - index = -1; - } else { - index = self.indexOf(search, offset); - } - } - - return index === -1 ? nil : index; - ; - }, $String_index$37.$$arity = -2); - - Opal.def(self, '$inspect', $String_inspect$38 = function $$inspect() { - var self = this; - - - var escapable = /[\\\"\x00-\x1f\u007F-\u009F\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - meta = { - '\u0007': '\\a', - '\u001b': '\\e', - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '\v': '\\v', - '"' : '\\"', - '\\': '\\\\' - }, - escaped = self.replace(escapable, function (chr) { - return meta[chr] || '\\u' + ('0000' + chr.charCodeAt(0).toString(16).toUpperCase()).slice(-4); - }); - return '"' + escaped.replace(/\#[\$\@\{]/g, '\\$&') + '"'; - - }, $String_inspect$38.$$arity = 0); - - Opal.def(self, '$intern', $String_intern$39 = function $$intern() { - var self = this; - - return self.toString(); - }, $String_intern$39.$$arity = 0); - - Opal.def(self, '$lines', $String_lines$40 = function $$lines(separator) { - var $iter = $String_lines$40.$$p, block = $iter || nil, self = this, e = nil; - if ($gvars["/"] == null) $gvars["/"] = nil; - - if ($iter) $String_lines$40.$$p = null; - - - if ($iter) $String_lines$40.$$p = null;; - - if (separator == null) { - separator = $gvars["/"]; - }; - e = $send(self, 'each_line', [separator], block.$to_proc()); - if ($truthy(block)) { - return self - } else { - return e.$to_a() - }; - }, $String_lines$40.$$arity = -1); - - Opal.def(self, '$length', $String_length$41 = function $$length() { - var self = this; - - return self.length; - }, $String_length$41.$$arity = 0); - - Opal.def(self, '$ljust', $String_ljust$42 = function $$ljust(width, padstr) { - var self = this; - - - - if (padstr == null) { - padstr = " "; - }; - width = $$($nesting, 'Opal').$coerce_to(width, $$($nesting, 'Integer'), "to_int"); - padstr = $$($nesting, 'Opal').$coerce_to(padstr, $$($nesting, 'String'), "to_str").$to_s(); - if ($truthy(padstr['$empty?']())) { - self.$raise($$($nesting, 'ArgumentError'), "zero width padding")}; - if ($truthy(width <= self.length)) { - return self}; - - var index = -1, - result = ""; - - width -= self.length; - - while (++index < width) { - result += padstr; - } - - return self.$$cast(self + result.slice(0, width)); - ; - }, $String_ljust$42.$$arity = -2); - - Opal.def(self, '$lstrip', $String_lstrip$43 = function $$lstrip() { - var self = this; - - return self.replace(/^\s*/, ''); - }, $String_lstrip$43.$$arity = 0); - - Opal.def(self, '$ascii_only?', $String_ascii_only$ques$44 = function() { - var self = this; - - return self.match(/[ -~\n]*/)[0] === self; - }, $String_ascii_only$ques$44.$$arity = 0); - - Opal.def(self, '$match', $String_match$45 = function $$match(pattern, pos) { - var $iter = $String_match$45.$$p, block = $iter || nil, $a, self = this; - - if ($iter) $String_match$45.$$p = null; - - - if ($iter) $String_match$45.$$p = null;; - ; - if ($truthy(($truthy($a = $$($nesting, 'String')['$==='](pattern)) ? $a : pattern['$respond_to?']("to_str")))) { - pattern = $$($nesting, 'Regexp').$new(pattern.$to_str())}; - if ($truthy($$($nesting, 'Regexp')['$==='](pattern))) { - } else { - self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + (pattern.$class()) + " (expected Regexp)") - }; - return $send(pattern, 'match', [self, pos], block.$to_proc()); - }, $String_match$45.$$arity = -2); - - Opal.def(self, '$match?', $String_match$ques$46 = function(pattern, pos) { - var $a, self = this; - - - ; - if ($truthy(($truthy($a = $$($nesting, 'String')['$==='](pattern)) ? $a : pattern['$respond_to?']("to_str")))) { - pattern = $$($nesting, 'Regexp').$new(pattern.$to_str())}; - if ($truthy($$($nesting, 'Regexp')['$==='](pattern))) { - } else { - self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + (pattern.$class()) + " (expected Regexp)") - }; - return pattern['$match?'](self, pos); - }, $String_match$ques$46.$$arity = -2); - - Opal.def(self, '$next', $String_next$47 = function $$next() { - var self = this; - - - var i = self.length; - if (i === 0) { - return self.$$cast(''); - } - var result = self; - var first_alphanum_char_index = self.search(/[a-zA-Z0-9]/); - var carry = false; - var code; - while (i--) { - code = self.charCodeAt(i); - if ((code >= 48 && code <= 57) || - (code >= 65 && code <= 90) || - (code >= 97 && code <= 122)) { - switch (code) { - case 57: - carry = true; - code = 48; - break; - case 90: - carry = true; - code = 65; - break; - case 122: - carry = true; - code = 97; - break; - default: - carry = false; - code += 1; - } - } else { - if (first_alphanum_char_index === -1) { - if (code === 255) { - carry = true; - code = 0; - } else { - carry = false; - code += 1; - } - } else { - carry = true; - } - } - result = result.slice(0, i) + String.fromCharCode(code) + result.slice(i + 1); - if (carry && (i === 0 || i === first_alphanum_char_index)) { - switch (code) { - case 65: - break; - case 97: - break; - default: - code += 1; - } - if (i === 0) { - result = String.fromCharCode(code) + result; - } else { - result = result.slice(0, i) + String.fromCharCode(code) + result.slice(i); - } - carry = false; - } - if (!carry) { - break; - } - } - return self.$$cast(result); - - }, $String_next$47.$$arity = 0); - - Opal.def(self, '$oct', $String_oct$48 = function $$oct() { - var self = this; - - - var result, - string = self, - radix = 8; - - if (/^\s*_/.test(string)) { - return 0; - } - - string = string.replace(/^(\s*[+-]?)(0[bodx]?)(.+)$/i, function (original, head, flag, tail) { - switch (tail.charAt(0)) { - case '+': - case '-': - return original; - case '0': - if (tail.charAt(1) === 'x' && flag === '0x') { - return original; - } - } - switch (flag) { - case '0b': - radix = 2; - break; - case '0': - case '0o': - radix = 8; - break; - case '0d': - radix = 10; - break; - case '0x': - radix = 16; - break; - } - return head + tail; - }); - - result = parseInt(string.replace(/_(?!_)/g, ''), radix); - return isNaN(result) ? 0 : result; - - }, $String_oct$48.$$arity = 0); - - Opal.def(self, '$ord', $String_ord$49 = function $$ord() { - var self = this; - - return self.charCodeAt(0); - }, $String_ord$49.$$arity = 0); - - Opal.def(self, '$partition', $String_partition$50 = function $$partition(sep) { - var self = this; - - - var i, m; - - if (sep.$$is_regexp) { - m = sep.exec(self); - if (m === null) { - i = -1; - } else { - $$($nesting, 'MatchData').$new(sep, m); - sep = m[0]; - i = m.index; - } - } else { - sep = $$($nesting, 'Opal').$coerce_to(sep, $$($nesting, 'String'), "to_str"); - i = self.indexOf(sep); - } - - if (i === -1) { - return [self, '', '']; - } - - return [ - self.slice(0, i), - self.slice(i, i + sep.length), - self.slice(i + sep.length) - ]; - - }, $String_partition$50.$$arity = 1); - - Opal.def(self, '$reverse', $String_reverse$51 = function $$reverse() { - var self = this; - - return self.split('').reverse().join(''); - }, $String_reverse$51.$$arity = 0); - - Opal.def(self, '$rindex', $String_rindex$52 = function $$rindex(search, offset) { - var self = this; - - - ; - - var i, m, r, _m; - - if (offset === undefined) { - offset = self.length; - } else { - offset = $$($nesting, 'Opal').$coerce_to(offset, $$($nesting, 'Integer'), "to_int"); - if (offset < 0) { - offset += self.length; - if (offset < 0) { - return nil; - } - } - } - - if (search.$$is_regexp) { - m = null; - r = Opal.global_multiline_regexp(search); - while (true) { - _m = r.exec(self); - if (_m === null || _m.index > offset) { - break; - } - m = _m; - r.lastIndex = m.index + 1; - } - if (m === null) { - ($gvars["~"] = nil) - i = -1; - } else { - $$($nesting, 'MatchData').$new(r, m); - i = m.index; - } - } else { - search = $$($nesting, 'Opal').$coerce_to(search, $$($nesting, 'String'), "to_str"); - i = self.lastIndexOf(search, offset); - } - - return i === -1 ? nil : i; - ; - }, $String_rindex$52.$$arity = -2); - - Opal.def(self, '$rjust', $String_rjust$53 = function $$rjust(width, padstr) { - var self = this; - - - - if (padstr == null) { - padstr = " "; - }; - width = $$($nesting, 'Opal').$coerce_to(width, $$($nesting, 'Integer'), "to_int"); - padstr = $$($nesting, 'Opal').$coerce_to(padstr, $$($nesting, 'String'), "to_str").$to_s(); - if ($truthy(padstr['$empty?']())) { - self.$raise($$($nesting, 'ArgumentError'), "zero width padding")}; - if ($truthy(width <= self.length)) { - return self}; - - var chars = Math.floor(width - self.length), - patterns = Math.floor(chars / padstr.length), - result = Array(patterns + 1).join(padstr), - remaining = chars - result.length; - - return self.$$cast(result + padstr.slice(0, remaining) + self); - ; - }, $String_rjust$53.$$arity = -2); - - Opal.def(self, '$rpartition', $String_rpartition$54 = function $$rpartition(sep) { - var self = this; - - - var i, m, r, _m; - - if (sep.$$is_regexp) { - m = null; - r = Opal.global_multiline_regexp(sep); - - while (true) { - _m = r.exec(self); - if (_m === null) { - break; - } - m = _m; - r.lastIndex = m.index + 1; - } - - if (m === null) { - i = -1; - } else { - $$($nesting, 'MatchData').$new(r, m); - sep = m[0]; - i = m.index; - } - - } else { - sep = $$($nesting, 'Opal').$coerce_to(sep, $$($nesting, 'String'), "to_str"); - i = self.lastIndexOf(sep); - } - - if (i === -1) { - return ['', '', self]; - } - - return [ - self.slice(0, i), - self.slice(i, i + sep.length), - self.slice(i + sep.length) - ]; - - }, $String_rpartition$54.$$arity = 1); - - Opal.def(self, '$rstrip', $String_rstrip$55 = function $$rstrip() { - var self = this; - - return self.replace(/[\s\u0000]*$/, ''); - }, $String_rstrip$55.$$arity = 0); - - Opal.def(self, '$scan', $String_scan$56 = function $$scan(pattern) { - var $iter = $String_scan$56.$$p, block = $iter || nil, self = this; - - if ($iter) $String_scan$56.$$p = null; - - - if ($iter) $String_scan$56.$$p = null;; - - var result = [], - match_data = nil, - match; - - if (pattern.$$is_regexp) { - pattern = Opal.global_multiline_regexp(pattern); - } else { - pattern = $$($nesting, 'Opal').$coerce_to(pattern, $$($nesting, 'String'), "to_str"); - pattern = new RegExp(pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'gm'); - } - - while ((match = pattern.exec(self)) != null) { - match_data = $$($nesting, 'MatchData').$new(pattern, match); - if (block === nil) { - match.length == 1 ? result.push(match[0]) : result.push((match_data).$captures()); - } else { - match.length == 1 ? block(match[0]) : block.call(self, (match_data).$captures()); - } - if (pattern.lastIndex === match.index) { - pattern.lastIndex += 1; - } - } - - ($gvars["~"] = match_data) - - return (block !== nil ? self : result); - ; - }, $String_scan$56.$$arity = 1); - Opal.alias(self, "size", "length"); - Opal.alias(self, "slice", "[]"); - - Opal.def(self, '$split', $String_split$57 = function $$split(pattern, limit) { - var $a, self = this; - if ($gvars[";"] == null) $gvars[";"] = nil; - - - ; - ; - - if (self.length === 0) { - return []; - } - - if (limit === undefined) { - limit = 0; - } else { - limit = $$($nesting, 'Opal')['$coerce_to!'](limit, $$($nesting, 'Integer'), "to_int"); - if (limit === 1) { - return [self]; - } - } - - if (pattern === undefined || pattern === nil) { - pattern = ($truthy($a = $gvars[";"]) ? $a : " "); - } - - var result = [], - string = self.toString(), - index = 0, - match, - i, ii; - - if (pattern.$$is_regexp) { - pattern = Opal.global_multiline_regexp(pattern); - } else { - pattern = $$($nesting, 'Opal').$coerce_to(pattern, $$($nesting, 'String'), "to_str").$to_s(); - if (pattern === ' ') { - pattern = /\s+/gm; - string = string.replace(/^\s+/, ''); - } else { - pattern = new RegExp(pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'gm'); - } - } - - result = string.split(pattern); - - if (result.length === 1 && result[0] === string) { - return [self.$$cast(result[0])]; - } - - while ((i = result.indexOf(undefined)) !== -1) { - result.splice(i, 1); - } - - function castResult() { - for (i = 0; i < result.length; i++) { - result[i] = self.$$cast(result[i]); - } - } - - if (limit === 0) { - while (result[result.length - 1] === '') { - result.length -= 1; - } - castResult(); - return result; - } - - match = pattern.exec(string); - - if (limit < 0) { - if (match !== null && match[0] === '' && pattern.source.indexOf('(?=') === -1) { - for (i = 0, ii = match.length; i < ii; i++) { - result.push(''); - } - } - castResult(); - return result; - } - - if (match !== null && match[0] === '') { - result.splice(limit - 1, result.length - 1, result.slice(limit - 1).join('')); - castResult(); - return result; - } - - if (limit >= result.length) { - castResult(); - return result; - } - - i = 0; - while (match !== null) { - i++; - index = pattern.lastIndex; - if (i + 1 === limit) { - break; - } - match = pattern.exec(string); - } - result.splice(limit - 1, result.length - 1, string.slice(index)); - castResult(); - return result; - ; - }, $String_split$57.$$arity = -1); - - Opal.def(self, '$squeeze', $String_squeeze$58 = function $$squeeze($a) { - var $post_args, sets, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - sets = $post_args;; - - if (sets.length === 0) { - return self.$$cast(self.replace(/(.)\1+/g, '$1')); - } - var char_class = char_class_from_char_sets(sets); - if (char_class === null) { - return self; - } - return self.$$cast(self.replace(new RegExp('(' + char_class + ')\\1+', 'g'), '$1')); - ; - }, $String_squeeze$58.$$arity = -1); - - Opal.def(self, '$start_with?', $String_start_with$ques$59 = function($a) { - var $post_args, prefixes, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - prefixes = $post_args;; - - for (var i = 0, length = prefixes.length; i < length; i++) { - var prefix = $$($nesting, 'Opal').$coerce_to(prefixes[i], $$($nesting, 'String'), "to_str").$to_s(); - - if (self.indexOf(prefix) === 0) { - return true; - } - } - - return false; - ; - }, $String_start_with$ques$59.$$arity = -1); - - Opal.def(self, '$strip', $String_strip$60 = function $$strip() { - var self = this; - - return self.replace(/^\s*/, '').replace(/[\s\u0000]*$/, ''); - }, $String_strip$60.$$arity = 0); - - Opal.def(self, '$sub', $String_sub$61 = function $$sub(pattern, replacement) { - var $iter = $String_sub$61.$$p, block = $iter || nil, self = this; - - if ($iter) $String_sub$61.$$p = null; - - - if ($iter) $String_sub$61.$$p = null;; - ; - - if (!pattern.$$is_regexp) { - pattern = $$($nesting, 'Opal').$coerce_to(pattern, $$($nesting, 'String'), "to_str"); - pattern = new RegExp(pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')); - } - - var result, match = pattern.exec(self); - - if (match === null) { - ($gvars["~"] = nil) - result = self.toString(); - } else { - $$($nesting, 'MatchData').$new(pattern, match) - - if (replacement === undefined) { - - if (block === nil) { - self.$raise($$($nesting, 'ArgumentError'), "wrong number of arguments (1 for 2)") - } - result = self.slice(0, match.index) + block(match[0]) + self.slice(match.index + match[0].length); - - } else if (replacement.$$is_hash) { - - result = self.slice(0, match.index) + (replacement)['$[]'](match[0]).$to_s() + self.slice(match.index + match[0].length); - - } else { - - replacement = $$($nesting, 'Opal').$coerce_to(replacement, $$($nesting, 'String'), "to_str"); - - replacement = replacement.replace(/([\\]+)([0-9+&`'])/g, function (original, slashes, command) { - if (slashes.length % 2 === 0) { - return original; - } - switch (command) { - case "+": - for (var i = match.length - 1; i > 0; i--) { - if (match[i] !== undefined) { - return slashes.slice(1) + match[i]; - } - } - return ''; - case "&": return slashes.slice(1) + match[0]; - case "`": return slashes.slice(1) + self.slice(0, match.index); - case "'": return slashes.slice(1) + self.slice(match.index + match[0].length); - default: return slashes.slice(1) + (match[command] || ''); - } - }).replace(/\\\\/g, '\\'); - - result = self.slice(0, match.index) + replacement + self.slice(match.index + match[0].length); - } - } - - return self.$$cast(result); - ; - }, $String_sub$61.$$arity = -2); - Opal.alias(self, "succ", "next"); - - Opal.def(self, '$sum', $String_sum$62 = function $$sum(n) { - var self = this; - - - - if (n == null) { - n = 16; - }; - - n = $$($nesting, 'Opal').$coerce_to(n, $$($nesting, 'Integer'), "to_int"); - - var result = 0, - length = self.length, - i = 0; - - for (; i < length; i++) { - result += self.charCodeAt(i); - } - - if (n <= 0) { - return result; - } - - return result & (Math.pow(2, n) - 1); - ; - }, $String_sum$62.$$arity = -1); - - Opal.def(self, '$swapcase', $String_swapcase$63 = function $$swapcase() { - var self = this; - - - var str = self.replace(/([a-z]+)|([A-Z]+)/g, function($0,$1,$2) { - return $1 ? $0.toUpperCase() : $0.toLowerCase(); - }); - - if (self.constructor === String) { - return str; - } - - return self.$class().$new(str); - - }, $String_swapcase$63.$$arity = 0); - - Opal.def(self, '$to_f', $String_to_f$64 = function $$to_f() { - var self = this; - - - if (self.charAt(0) === '_') { - return 0; - } - - var result = parseFloat(self.replace(/_/g, '')); - - if (isNaN(result) || result == Infinity || result == -Infinity) { - return 0; - } - else { - return result; - } - - }, $String_to_f$64.$$arity = 0); - - Opal.def(self, '$to_i', $String_to_i$65 = function $$to_i(base) { - var self = this; - - - - if (base == null) { - base = 10; - }; - - var result, - string = self.toLowerCase(), - radix = $$($nesting, 'Opal').$coerce_to(base, $$($nesting, 'Integer'), "to_int"); - - if (radix === 1 || radix < 0 || radix > 36) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid radix " + (radix)) - } - - if (/^\s*_/.test(string)) { - return 0; - } - - string = string.replace(/^(\s*[+-]?)(0[bodx]?)(.+)$/, function (original, head, flag, tail) { - switch (tail.charAt(0)) { - case '+': - case '-': - return original; - case '0': - if (tail.charAt(1) === 'x' && flag === '0x' && (radix === 0 || radix === 16)) { - return original; - } - } - switch (flag) { - case '0b': - if (radix === 0 || radix === 2) { - radix = 2; - return head + tail; - } - break; - case '0': - case '0o': - if (radix === 0 || radix === 8) { - radix = 8; - return head + tail; - } - break; - case '0d': - if (radix === 0 || radix === 10) { - radix = 10; - return head + tail; - } - break; - case '0x': - if (radix === 0 || radix === 16) { - radix = 16; - return head + tail; - } - break; - } - return original - }); - - result = parseInt(string.replace(/_(?!_)/g, ''), radix); - return isNaN(result) ? 0 : result; - ; - }, $String_to_i$65.$$arity = -1); - - Opal.def(self, '$to_proc', $String_to_proc$66 = function $$to_proc() { - var $$67, $iter = $String_to_proc$66.$$p, $yield = $iter || nil, self = this, method_name = nil; - - if ($iter) $String_to_proc$66.$$p = null; - - method_name = $rb_plus("$", self.valueOf()); - return $send(self, 'proc', [], ($$67 = function($a){var self = $$67.$$s || this, $iter = $$67.$$p, block = $iter || nil, $post_args, args; - - - - if ($iter) $$67.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - if (args.length === 0) { - self.$raise($$($nesting, 'ArgumentError'), "no receiver given") - } - - var recv = args[0]; - - if (recv == null) recv = nil; - - var body = recv[method_name]; - - if (!body) { - return recv.$method_missing.apply(recv, args); - } - - if (typeof block === 'function') { - body.$$p = block; - } - - if (args.length === 1) { - return body.call(recv); - } else { - return body.apply(recv, args.slice(1)); - } - ;}, $$67.$$s = self, $$67.$$arity = -1, $$67)); - }, $String_to_proc$66.$$arity = 0); - - Opal.def(self, '$to_s', $String_to_s$68 = function $$to_s() { - var self = this; - - return self.toString(); - }, $String_to_s$68.$$arity = 0); - Opal.alias(self, "to_str", "to_s"); - Opal.alias(self, "to_sym", "intern"); - - Opal.def(self, '$tr', $String_tr$69 = function $$tr(from, to) { - var self = this; - - - from = $$($nesting, 'Opal').$coerce_to(from, $$($nesting, 'String'), "to_str").$to_s(); - to = $$($nesting, 'Opal').$coerce_to(to, $$($nesting, 'String'), "to_str").$to_s(); - - if (from.length == 0 || from === to) { - return self; - } - - var i, in_range, c, ch, start, end, length; - var subs = {}; - var from_chars = from.split(''); - var from_length = from_chars.length; - var to_chars = to.split(''); - var to_length = to_chars.length; - - var inverse = false; - var global_sub = null; - if (from_chars[0] === '^' && from_chars.length > 1) { - inverse = true; - from_chars.shift(); - global_sub = to_chars[to_length - 1] - from_length -= 1; - } - - var from_chars_expanded = []; - var last_from = null; - in_range = false; - for (i = 0; i < from_length; i++) { - ch = from_chars[i]; - if (last_from == null) { - last_from = ch; - from_chars_expanded.push(ch); - } - else if (ch === '-') { - if (last_from === '-') { - from_chars_expanded.push('-'); - from_chars_expanded.push('-'); - } - else if (i == from_length - 1) { - from_chars_expanded.push('-'); - } - else { - in_range = true; - } - } - else if (in_range) { - start = last_from.charCodeAt(0); - end = ch.charCodeAt(0); - if (start > end) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid range \"" + (String.fromCharCode(start)) + "-" + (String.fromCharCode(end)) + "\" in string transliteration") - } - for (c = start + 1; c < end; c++) { - from_chars_expanded.push(String.fromCharCode(c)); - } - from_chars_expanded.push(ch); - in_range = null; - last_from = null; - } - else { - from_chars_expanded.push(ch); - } - } - - from_chars = from_chars_expanded; - from_length = from_chars.length; - - if (inverse) { - for (i = 0; i < from_length; i++) { - subs[from_chars[i]] = true; - } - } - else { - if (to_length > 0) { - var to_chars_expanded = []; - var last_to = null; - in_range = false; - for (i = 0; i < to_length; i++) { - ch = to_chars[i]; - if (last_to == null) { - last_to = ch; - to_chars_expanded.push(ch); - } - else if (ch === '-') { - if (last_to === '-') { - to_chars_expanded.push('-'); - to_chars_expanded.push('-'); - } - else if (i == to_length - 1) { - to_chars_expanded.push('-'); - } - else { - in_range = true; - } - } - else if (in_range) { - start = last_to.charCodeAt(0); - end = ch.charCodeAt(0); - if (start > end) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid range \"" + (String.fromCharCode(start)) + "-" + (String.fromCharCode(end)) + "\" in string transliteration") - } - for (c = start + 1; c < end; c++) { - to_chars_expanded.push(String.fromCharCode(c)); - } - to_chars_expanded.push(ch); - in_range = null; - last_to = null; - } - else { - to_chars_expanded.push(ch); - } - } - - to_chars = to_chars_expanded; - to_length = to_chars.length; - } - - var length_diff = from_length - to_length; - if (length_diff > 0) { - var pad_char = (to_length > 0 ? to_chars[to_length - 1] : ''); - for (i = 0; i < length_diff; i++) { - to_chars.push(pad_char); - } - } - - for (i = 0; i < from_length; i++) { - subs[from_chars[i]] = to_chars[i]; - } - } - - var new_str = '' - for (i = 0, length = self.length; i < length; i++) { - ch = self.charAt(i); - var sub = subs[ch]; - if (inverse) { - new_str += (sub == null ? global_sub : ch); - } - else { - new_str += (sub != null ? sub : ch); - } - } - return self.$$cast(new_str); - ; - }, $String_tr$69.$$arity = 2); - - Opal.def(self, '$tr_s', $String_tr_s$70 = function $$tr_s(from, to) { - var self = this; - - - from = $$($nesting, 'Opal').$coerce_to(from, $$($nesting, 'String'), "to_str").$to_s(); - to = $$($nesting, 'Opal').$coerce_to(to, $$($nesting, 'String'), "to_str").$to_s(); - - if (from.length == 0) { - return self; - } - - var i, in_range, c, ch, start, end, length; - var subs = {}; - var from_chars = from.split(''); - var from_length = from_chars.length; - var to_chars = to.split(''); - var to_length = to_chars.length; - - var inverse = false; - var global_sub = null; - if (from_chars[0] === '^' && from_chars.length > 1) { - inverse = true; - from_chars.shift(); - global_sub = to_chars[to_length - 1] - from_length -= 1; - } - - var from_chars_expanded = []; - var last_from = null; - in_range = false; - for (i = 0; i < from_length; i++) { - ch = from_chars[i]; - if (last_from == null) { - last_from = ch; - from_chars_expanded.push(ch); - } - else if (ch === '-') { - if (last_from === '-') { - from_chars_expanded.push('-'); - from_chars_expanded.push('-'); - } - else if (i == from_length - 1) { - from_chars_expanded.push('-'); - } - else { - in_range = true; - } - } - else if (in_range) { - start = last_from.charCodeAt(0); - end = ch.charCodeAt(0); - if (start > end) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid range \"" + (String.fromCharCode(start)) + "-" + (String.fromCharCode(end)) + "\" in string transliteration") - } - for (c = start + 1; c < end; c++) { - from_chars_expanded.push(String.fromCharCode(c)); - } - from_chars_expanded.push(ch); - in_range = null; - last_from = null; - } - else { - from_chars_expanded.push(ch); - } - } - - from_chars = from_chars_expanded; - from_length = from_chars.length; - - if (inverse) { - for (i = 0; i < from_length; i++) { - subs[from_chars[i]] = true; - } - } - else { - if (to_length > 0) { - var to_chars_expanded = []; - var last_to = null; - in_range = false; - for (i = 0; i < to_length; i++) { - ch = to_chars[i]; - if (last_from == null) { - last_from = ch; - to_chars_expanded.push(ch); - } - else if (ch === '-') { - if (last_to === '-') { - to_chars_expanded.push('-'); - to_chars_expanded.push('-'); - } - else if (i == to_length - 1) { - to_chars_expanded.push('-'); - } - else { - in_range = true; - } - } - else if (in_range) { - start = last_from.charCodeAt(0); - end = ch.charCodeAt(0); - if (start > end) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid range \"" + (String.fromCharCode(start)) + "-" + (String.fromCharCode(end)) + "\" in string transliteration") - } - for (c = start + 1; c < end; c++) { - to_chars_expanded.push(String.fromCharCode(c)); - } - to_chars_expanded.push(ch); - in_range = null; - last_from = null; - } - else { - to_chars_expanded.push(ch); - } - } - - to_chars = to_chars_expanded; - to_length = to_chars.length; - } - - var length_diff = from_length - to_length; - if (length_diff > 0) { - var pad_char = (to_length > 0 ? to_chars[to_length - 1] : ''); - for (i = 0; i < length_diff; i++) { - to_chars.push(pad_char); - } - } - - for (i = 0; i < from_length; i++) { - subs[from_chars[i]] = to_chars[i]; - } - } - var new_str = '' - var last_substitute = null - for (i = 0, length = self.length; i < length; i++) { - ch = self.charAt(i); - var sub = subs[ch] - if (inverse) { - if (sub == null) { - if (last_substitute == null) { - new_str += global_sub; - last_substitute = true; - } - } - else { - new_str += ch; - last_substitute = null; - } - } - else { - if (sub != null) { - if (last_substitute == null || last_substitute !== sub) { - new_str += sub; - last_substitute = sub; - } - } - else { - new_str += ch; - last_substitute = null; - } - } - } - return self.$$cast(new_str); - ; - }, $String_tr_s$70.$$arity = 2); - - Opal.def(self, '$upcase', $String_upcase$71 = function $$upcase() { - var self = this; - - return self.$$cast(self.toUpperCase()); - }, $String_upcase$71.$$arity = 0); - - Opal.def(self, '$upto', $String_upto$72 = function $$upto(stop, excl) { - var $iter = $String_upto$72.$$p, block = $iter || nil, self = this; - - if ($iter) $String_upto$72.$$p = null; - - - if ($iter) $String_upto$72.$$p = null;; - - if (excl == null) { - excl = false; - }; - if ((block !== nil)) { - } else { - return self.$enum_for("upto", stop, excl) - }; - stop = $$($nesting, 'Opal').$coerce_to(stop, $$($nesting, 'String'), "to_str"); - - var a, b, s = self.toString(); - - if (s.length === 1 && stop.length === 1) { - - a = s.charCodeAt(0); - b = stop.charCodeAt(0); - - while (a <= b) { - if (excl && a === b) { - break; - } - - block(String.fromCharCode(a)); - - a += 1; - } - - } else if (parseInt(s, 10).toString() === s && parseInt(stop, 10).toString() === stop) { - - a = parseInt(s, 10); - b = parseInt(stop, 10); - - while (a <= b) { - if (excl && a === b) { - break; - } - - block(a.toString()); - - a += 1; - } - - } else { - - while (s.length <= stop.length && s <= stop) { - if (excl && s === stop) { - break; - } - - block(s); - - s = (s).$succ(); - } - - } - return self; - ; - }, $String_upto$72.$$arity = -2); - - function char_class_from_char_sets(sets) { - function explode_sequences_in_character_set(set) { - var result = '', - i, len = set.length, - curr_char, - skip_next_dash, - char_code_from, - char_code_upto, - char_code; - for (i = 0; i < len; i++) { - curr_char = set.charAt(i); - if (curr_char === '-' && i > 0 && i < (len - 1) && !skip_next_dash) { - char_code_from = set.charCodeAt(i - 1); - char_code_upto = set.charCodeAt(i + 1); - if (char_code_from > char_code_upto) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid range \"" + (char_code_from) + "-" + (char_code_upto) + "\" in string transliteration") - } - for (char_code = char_code_from + 1; char_code < char_code_upto + 1; char_code++) { - result += String.fromCharCode(char_code); - } - skip_next_dash = true; - i++; - } else { - skip_next_dash = (curr_char === '\\'); - result += curr_char; - } - } - return result; - } - - function intersection(setA, setB) { - if (setA.length === 0) { - return setB; - } - var result = '', - i, len = setA.length, - chr; - for (i = 0; i < len; i++) { - chr = setA.charAt(i); - if (setB.indexOf(chr) !== -1) { - result += chr; - } - } - return result; - } - - var i, len, set, neg, chr, tmp, - pos_intersection = '', - neg_intersection = ''; - - for (i = 0, len = sets.length; i < len; i++) { - set = $$($nesting, 'Opal').$coerce_to(sets[i], $$($nesting, 'String'), "to_str"); - neg = (set.charAt(0) === '^' && set.length > 1); - set = explode_sequences_in_character_set(neg ? set.slice(1) : set); - if (neg) { - neg_intersection = intersection(neg_intersection, set); - } else { - pos_intersection = intersection(pos_intersection, set); - } - } - - if (pos_intersection.length > 0 && neg_intersection.length > 0) { - tmp = ''; - for (i = 0, len = pos_intersection.length; i < len; i++) { - chr = pos_intersection.charAt(i); - if (neg_intersection.indexOf(chr) === -1) { - tmp += chr; - } - } - pos_intersection = tmp; - neg_intersection = ''; - } - - if (pos_intersection.length > 0) { - return '[' + $$($nesting, 'Regexp').$escape(pos_intersection) + ']'; - } - - if (neg_intersection.length > 0) { - return '[^' + $$($nesting, 'Regexp').$escape(neg_intersection) + ']'; - } - - return null; - } - ; - - Opal.def(self, '$instance_variables', $String_instance_variables$73 = function $$instance_variables() { - var self = this; - - return [] - }, $String_instance_variables$73.$$arity = 0); - Opal.defs(self, '$_load', $String__load$74 = function $$_load($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'new', Opal.to_a(args)); - }, $String__load$74.$$arity = -1); - - Opal.def(self, '$unicode_normalize', $String_unicode_normalize$75 = function $$unicode_normalize(form) { - var self = this; - - - ; - return self.toString();; - }, $String_unicode_normalize$75.$$arity = -1); - - Opal.def(self, '$unicode_normalized?', $String_unicode_normalized$ques$76 = function(form) { - var self = this; - - - ; - return true; - }, $String_unicode_normalized$ques$76.$$arity = -1); - - Opal.def(self, '$unpack', $String_unpack$77 = function $$unpack(format) { - var self = this; - - return self.$raise("To use String#unpack, you must first require 'corelib/string/unpack'.") - }, $String_unpack$77.$$arity = 1); - return (Opal.def(self, '$unpack1', $String_unpack1$78 = function $$unpack1(format) { - var self = this; - - return self.$raise("To use String#unpack1, you must first require 'corelib/string/unpack'.") - }, $String_unpack1$78.$$arity = 1), nil) && 'unpack1'; - })($nesting[0], String, $nesting); - return Opal.const_set($nesting[0], 'Symbol', $$($nesting, 'String')); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/enumerable"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_divide(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs / rhs : lhs['$/'](rhs); - } - function $rb_le(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy, $send = Opal.send, $falsy = Opal.falsy, $hash2 = Opal.hash2, $lambda = Opal.lambda; - - Opal.add_stubs(['$each', '$public_send', '$destructure', '$to_enum', '$enumerator_size', '$new', '$yield', '$raise', '$slice_when', '$!', '$enum_for', '$flatten', '$map', '$warn', '$proc', '$==', '$nil?', '$respond_to?', '$coerce_to!', '$>', '$*', '$coerce_to', '$try_convert', '$<', '$+', '$-', '$ceil', '$/', '$size', '$__send__', '$length', '$<=', '$[]', '$push', '$<<', '$[]=', '$===', '$inspect', '$<=>', '$first', '$reverse', '$sort', '$to_proc', '$compare', '$call', '$dup', '$to_a', '$sort!', '$map!', '$key?', '$values', '$zip']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Enumerable'); - - var $nesting = [self].concat($parent_nesting), $Enumerable_all$ques$1, $Enumerable_any$ques$5, $Enumerable_chunk$9, $Enumerable_chunk_while$12, $Enumerable_collect$14, $Enumerable_collect_concat$16, $Enumerable_count$19, $Enumerable_cycle$23, $Enumerable_detect$25, $Enumerable_drop$27, $Enumerable_drop_while$28, $Enumerable_each_cons$29, $Enumerable_each_entry$31, $Enumerable_each_slice$33, $Enumerable_each_with_index$35, $Enumerable_each_with_object$37, $Enumerable_entries$39, $Enumerable_find_all$40, $Enumerable_find_index$42, $Enumerable_first$45, $Enumerable_grep$48, $Enumerable_grep_v$50, $Enumerable_group_by$52, $Enumerable_include$ques$54, $Enumerable_inject$56, $Enumerable_lazy$57, $Enumerable_enumerator_size$59, $Enumerable_max$60, $Enumerable_max_by$61, $Enumerable_min$63, $Enumerable_min_by$64, $Enumerable_minmax$66, $Enumerable_minmax_by$68, $Enumerable_none$ques$69, $Enumerable_one$ques$73, $Enumerable_partition$77, $Enumerable_reject$79, $Enumerable_reverse_each$81, $Enumerable_slice_before$83, $Enumerable_slice_after$85, $Enumerable_slice_when$88, $Enumerable_sort$90, $Enumerable_sort_by$92, $Enumerable_sum$97, $Enumerable_take$99, $Enumerable_take_while$100, $Enumerable_uniq$102, $Enumerable_zip$104; - - - - function comparableForPattern(value) { - if (value.length === 0) { - value = [nil]; - } - - if (value.length > 1) { - value = [value]; - } - - return value; - } - ; - - Opal.def(self, '$all?', $Enumerable_all$ques$1 = function(pattern) {try { - - var $iter = $Enumerable_all$ques$1.$$p, block = $iter || nil, $$2, $$3, $$4, self = this; - - if ($iter) $Enumerable_all$ques$1.$$p = null; - - - if ($iter) $Enumerable_all$ques$1.$$p = null;; - ; - if ($truthy(pattern !== undefined)) { - $send(self, 'each', [], ($$2 = function($a){var self = $$2.$$s || this, $post_args, value, comparable = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - comparable = comparableForPattern(value); - if ($truthy($send(pattern, 'public_send', ["==="].concat(Opal.to_a(comparable))))) { - return nil - } else { - Opal.ret(false) - };}, $$2.$$s = self, $$2.$$arity = -1, $$2)) - } else if ((block !== nil)) { - $send(self, 'each', [], ($$3 = function($a){var self = $$3.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($truthy(Opal.yieldX(block, Opal.to_a(value)))) { - return nil - } else { - Opal.ret(false) - };}, $$3.$$s = self, $$3.$$arity = -1, $$3)) - } else { - $send(self, 'each', [], ($$4 = function($a){var self = $$4.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($truthy($$($nesting, 'Opal').$destructure(value))) { - return nil - } else { - Opal.ret(false) - };}, $$4.$$s = self, $$4.$$arity = -1, $$4)) - }; - return true; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_all$ques$1.$$arity = -1); - - Opal.def(self, '$any?', $Enumerable_any$ques$5 = function(pattern) {try { - - var $iter = $Enumerable_any$ques$5.$$p, block = $iter || nil, $$6, $$7, $$8, self = this; - - if ($iter) $Enumerable_any$ques$5.$$p = null; - - - if ($iter) $Enumerable_any$ques$5.$$p = null;; - ; - if ($truthy(pattern !== undefined)) { - $send(self, 'each', [], ($$6 = function($a){var self = $$6.$$s || this, $post_args, value, comparable = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - comparable = comparableForPattern(value); - if ($truthy($send(pattern, 'public_send', ["==="].concat(Opal.to_a(comparable))))) { - Opal.ret(true) - } else { - return nil - };}, $$6.$$s = self, $$6.$$arity = -1, $$6)) - } else if ((block !== nil)) { - $send(self, 'each', [], ($$7 = function($a){var self = $$7.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($truthy(Opal.yieldX(block, Opal.to_a(value)))) { - Opal.ret(true) - } else { - return nil - };}, $$7.$$s = self, $$7.$$arity = -1, $$7)) - } else { - $send(self, 'each', [], ($$8 = function($a){var self = $$8.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($truthy($$($nesting, 'Opal').$destructure(value))) { - Opal.ret(true) - } else { - return nil - };}, $$8.$$s = self, $$8.$$arity = -1, $$8)) - }; - return false; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_any$ques$5.$$arity = -1); - - Opal.def(self, '$chunk', $Enumerable_chunk$9 = function $$chunk() { - var $iter = $Enumerable_chunk$9.$$p, block = $iter || nil, $$10, $$11, self = this; - - if ($iter) $Enumerable_chunk$9.$$p = null; - - - if ($iter) $Enumerable_chunk$9.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'to_enum', ["chunk"], ($$10 = function(){var self = $$10.$$s || this; - - return self.$enumerator_size()}, $$10.$$s = self, $$10.$$arity = 0, $$10)) - }; - return $send($$$('::', 'Enumerator'), 'new', [], ($$11 = function(yielder){var self = $$11.$$s || this; - - - - if (yielder == null) { - yielder = nil; - }; - - var previous = nil, accumulate = []; - - function releaseAccumulate() { - if (accumulate.length > 0) { - yielder.$yield(previous, accumulate) - } - } - - self.$each.$$p = function(value) { - var key = Opal.yield1(block, value); - - if (key === nil) { - releaseAccumulate(); - accumulate = []; - previous = nil; - } else { - if (previous === nil || previous === key) { - accumulate.push(value); - } else { - releaseAccumulate(); - accumulate = [value]; - } - - previous = key; - } - } - - self.$each(); - - releaseAccumulate(); - ;}, $$11.$$s = self, $$11.$$arity = 1, $$11)); - }, $Enumerable_chunk$9.$$arity = 0); - - Opal.def(self, '$chunk_while', $Enumerable_chunk_while$12 = function $$chunk_while() { - var $iter = $Enumerable_chunk_while$12.$$p, block = $iter || nil, $$13, self = this; - - if ($iter) $Enumerable_chunk_while$12.$$p = null; - - - if ($iter) $Enumerable_chunk_while$12.$$p = null;; - if ((block !== nil)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "no block given") - }; - return $send(self, 'slice_when', [], ($$13 = function(before, after){var self = $$13.$$s || this; - - - - if (before == null) { - before = nil; - }; - - if (after == null) { - after = nil; - }; - return Opal.yieldX(block, [before, after])['$!']();}, $$13.$$s = self, $$13.$$arity = 2, $$13)); - }, $Enumerable_chunk_while$12.$$arity = 0); - - Opal.def(self, '$collect', $Enumerable_collect$14 = function $$collect() { - var $iter = $Enumerable_collect$14.$$p, block = $iter || nil, $$15, self = this; - - if ($iter) $Enumerable_collect$14.$$p = null; - - - if ($iter) $Enumerable_collect$14.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["collect"], ($$15 = function(){var self = $$15.$$s || this; - - return self.$enumerator_size()}, $$15.$$s = self, $$15.$$arity = 0, $$15)) - }; - - var result = []; - - self.$each.$$p = function() { - var value = Opal.yieldX(block, arguments); - - result.push(value); - }; - - self.$each(); - - return result; - ; - }, $Enumerable_collect$14.$$arity = 0); - - Opal.def(self, '$collect_concat', $Enumerable_collect_concat$16 = function $$collect_concat() { - var $iter = $Enumerable_collect_concat$16.$$p, block = $iter || nil, $$17, $$18, self = this; - - if ($iter) $Enumerable_collect_concat$16.$$p = null; - - - if ($iter) $Enumerable_collect_concat$16.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["collect_concat"], ($$17 = function(){var self = $$17.$$s || this; - - return self.$enumerator_size()}, $$17.$$s = self, $$17.$$arity = 0, $$17)) - }; - return $send(self, 'map', [], ($$18 = function(item){var self = $$18.$$s || this; - - - - if (item == null) { - item = nil; - }; - return Opal.yield1(block, item);;}, $$18.$$s = self, $$18.$$arity = 1, $$18)).$flatten(1); - }, $Enumerable_collect_concat$16.$$arity = 0); - - Opal.def(self, '$count', $Enumerable_count$19 = function $$count(object) { - var $iter = $Enumerable_count$19.$$p, block = $iter || nil, $$20, $$21, $$22, self = this, result = nil; - - if ($iter) $Enumerable_count$19.$$p = null; - - - if ($iter) $Enumerable_count$19.$$p = null;; - ; - result = 0; - - if (object != null && block !== nil) { - self.$warn("warning: given block not used") - } - ; - if ($truthy(object != null)) { - block = $send(self, 'proc', [], ($$20 = function($a){var self = $$20.$$s || this, $post_args, args; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $$($nesting, 'Opal').$destructure(args)['$=='](object);}, $$20.$$s = self, $$20.$$arity = -1, $$20)) - } else if ($truthy(block['$nil?']())) { - block = $send(self, 'proc', [], ($$21 = function(){var self = $$21.$$s || this; - - return true}, $$21.$$s = self, $$21.$$arity = 0, $$21))}; - $send(self, 'each', [], ($$22 = function($a){var self = $$22.$$s || this, $post_args, args; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy(Opal.yieldX(block, args))) { - return result++; - } else { - return nil - };}, $$22.$$s = self, $$22.$$arity = -1, $$22)); - return result; - }, $Enumerable_count$19.$$arity = -1); - - Opal.def(self, '$cycle', $Enumerable_cycle$23 = function $$cycle(n) { - var $iter = $Enumerable_cycle$23.$$p, block = $iter || nil, $$24, self = this; - - if ($iter) $Enumerable_cycle$23.$$p = null; - - - if ($iter) $Enumerable_cycle$23.$$p = null;; - - if (n == null) { - n = nil; - }; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["cycle", n], ($$24 = function(){var self = $$24.$$s || this; - - if ($truthy(n['$nil?']())) { - if ($truthy(self['$respond_to?']("size"))) { - return $$$($$($nesting, 'Float'), 'INFINITY') - } else { - return nil - } - } else { - - n = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_gt(n, 0))) { - return $rb_times(self.$enumerator_size(), n) - } else { - return 0 - }; - }}, $$24.$$s = self, $$24.$$arity = 0, $$24)) - }; - if ($truthy(n['$nil?']())) { - } else { - - n = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int"); - if ($truthy(n <= 0)) { - return nil}; - }; - - var result, - all = [], i, length, value; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = Opal.yield1(block, param); - - all.push(param); - } - - self.$each(); - - if (result !== undefined) { - return result; - } - - if (all.length === 0) { - return nil; - } - - if (n === nil) { - while (true) { - for (i = 0, length = all.length; i < length; i++) { - value = Opal.yield1(block, all[i]); - } - } - } - else { - while (n > 1) { - for (i = 0, length = all.length; i < length; i++) { - value = Opal.yield1(block, all[i]); - } - - n--; - } - } - ; - }, $Enumerable_cycle$23.$$arity = -1); - - Opal.def(self, '$detect', $Enumerable_detect$25 = function $$detect(ifnone) {try { - - var $iter = $Enumerable_detect$25.$$p, block = $iter || nil, $$26, self = this; - - if ($iter) $Enumerable_detect$25.$$p = null; - - - if ($iter) $Enumerable_detect$25.$$p = null;; - ; - if ((block !== nil)) { - } else { - return self.$enum_for("detect", ifnone) - }; - $send(self, 'each', [], ($$26 = function($a){var self = $$26.$$s || this, $post_args, args, value = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - value = $$($nesting, 'Opal').$destructure(args); - if ($truthy(Opal.yield1(block, value))) { - Opal.ret(value) - } else { - return nil - };}, $$26.$$s = self, $$26.$$arity = -1, $$26)); - - if (ifnone !== undefined) { - if (typeof(ifnone) === 'function') { - return ifnone(); - } else { - return ifnone; - } - } - ; - return nil; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_detect$25.$$arity = -1); - - Opal.def(self, '$drop', $Enumerable_drop$27 = function $$drop(number) { - var self = this; - - - number = $$($nesting, 'Opal').$coerce_to(number, $$($nesting, 'Integer'), "to_int"); - if ($truthy(number < 0)) { - self.$raise($$($nesting, 'ArgumentError'), "attempt to drop negative size")}; - - var result = [], - current = 0; - - self.$each.$$p = function() { - if (number <= current) { - result.push($$($nesting, 'Opal').$destructure(arguments)); - } - - current++; - }; - - self.$each() - - return result; - ; - }, $Enumerable_drop$27.$$arity = 1); - - Opal.def(self, '$drop_while', $Enumerable_drop_while$28 = function $$drop_while() { - var $iter = $Enumerable_drop_while$28.$$p, block = $iter || nil, self = this; - - if ($iter) $Enumerable_drop_while$28.$$p = null; - - - if ($iter) $Enumerable_drop_while$28.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("drop_while") - }; - - var result = [], - dropping = true; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments); - - if (dropping) { - var value = Opal.yield1(block, param); - - if ($falsy(value)) { - dropping = false; - result.push(param); - } - } - else { - result.push(param); - } - }; - - self.$each(); - - return result; - ; - }, $Enumerable_drop_while$28.$$arity = 0); - - Opal.def(self, '$each_cons', $Enumerable_each_cons$29 = function $$each_cons(n) { - var $iter = $Enumerable_each_cons$29.$$p, block = $iter || nil, $$30, self = this; - - if ($iter) $Enumerable_each_cons$29.$$p = null; - - - if ($iter) $Enumerable_each_cons$29.$$p = null;; - if ($truthy(arguments.length != 1)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (arguments.length) + " for 1)")}; - n = $$($nesting, 'Opal').$try_convert(n, $$($nesting, 'Integer'), "to_int"); - if ($truthy(n <= 0)) { - self.$raise($$($nesting, 'ArgumentError'), "invalid size")}; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["each_cons", n], ($$30 = function(){var self = $$30.$$s || this, $a, enum_size = nil; - - - enum_size = self.$enumerator_size(); - if ($truthy(enum_size['$nil?']())) { - return nil - } else if ($truthy(($truthy($a = enum_size['$=='](0)) ? $a : $rb_lt(enum_size, n)))) { - return 0 - } else { - return $rb_plus($rb_minus(enum_size, n), 1) - };}, $$30.$$s = self, $$30.$$arity = 0, $$30)) - }; - - var buffer = [], result = nil; - - self.$each.$$p = function() { - var element = $$($nesting, 'Opal').$destructure(arguments); - buffer.push(element); - if (buffer.length > n) { - buffer.shift(); - } - if (buffer.length == n) { - Opal.yield1(block, buffer.slice(0, n)); - } - } - - self.$each(); - - return result; - ; - }, $Enumerable_each_cons$29.$$arity = 1); - - Opal.def(self, '$each_entry', $Enumerable_each_entry$31 = function $$each_entry($a) { - var $iter = $Enumerable_each_entry$31.$$p, block = $iter || nil, $post_args, data, $$32, self = this; - - if ($iter) $Enumerable_each_entry$31.$$p = null; - - - if ($iter) $Enumerable_each_entry$31.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - data = $post_args;; - if ((block !== nil)) { - } else { - return $send(self, 'to_enum', ["each_entry"].concat(Opal.to_a(data)), ($$32 = function(){var self = $$32.$$s || this; - - return self.$enumerator_size()}, $$32.$$s = self, $$32.$$arity = 0, $$32)) - }; - - self.$each.$$p = function() { - var item = $$($nesting, 'Opal').$destructure(arguments); - - Opal.yield1(block, item); - } - - self.$each.apply(self, data); - - return self; - ; - }, $Enumerable_each_entry$31.$$arity = -1); - - Opal.def(self, '$each_slice', $Enumerable_each_slice$33 = function $$each_slice(n) { - var $iter = $Enumerable_each_slice$33.$$p, block = $iter || nil, $$34, self = this; - - if ($iter) $Enumerable_each_slice$33.$$p = null; - - - if ($iter) $Enumerable_each_slice$33.$$p = null;; - n = $$($nesting, 'Opal').$coerce_to(n, $$($nesting, 'Integer'), "to_int"); - if ($truthy(n <= 0)) { - self.$raise($$($nesting, 'ArgumentError'), "invalid slice size")}; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["each_slice", n], ($$34 = function(){var self = $$34.$$s || this; - - if ($truthy(self['$respond_to?']("size"))) { - return $rb_divide(self.$size(), n).$ceil() - } else { - return nil - }}, $$34.$$s = self, $$34.$$arity = 0, $$34)) - }; - - var result, - slice = [] - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments); - - slice.push(param); - - if (slice.length === n) { - Opal.yield1(block, slice); - slice = []; - } - }; - - self.$each(); - - if (result !== undefined) { - return result; - } - - // our "last" group, if smaller than n then won't have been yielded - if (slice.length > 0) { - Opal.yield1(block, slice); - } - ; - return nil; - }, $Enumerable_each_slice$33.$$arity = 1); - - Opal.def(self, '$each_with_index', $Enumerable_each_with_index$35 = function $$each_with_index($a) { - var $iter = $Enumerable_each_with_index$35.$$p, block = $iter || nil, $post_args, args, $$36, self = this; - - if ($iter) $Enumerable_each_with_index$35.$$p = null; - - - if ($iter) $Enumerable_each_with_index$35.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["each_with_index"].concat(Opal.to_a(args)), ($$36 = function(){var self = $$36.$$s || this; - - return self.$enumerator_size()}, $$36.$$s = self, $$36.$$arity = 0, $$36)) - }; - - var result, - index = 0; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments); - - block(param, index); - - index++; - }; - - self.$each.apply(self, args); - - if (result !== undefined) { - return result; - } - ; - return self; - }, $Enumerable_each_with_index$35.$$arity = -1); - - Opal.def(self, '$each_with_object', $Enumerable_each_with_object$37 = function $$each_with_object(object) { - var $iter = $Enumerable_each_with_object$37.$$p, block = $iter || nil, $$38, self = this; - - if ($iter) $Enumerable_each_with_object$37.$$p = null; - - - if ($iter) $Enumerable_each_with_object$37.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["each_with_object", object], ($$38 = function(){var self = $$38.$$s || this; - - return self.$enumerator_size()}, $$38.$$s = self, $$38.$$arity = 0, $$38)) - }; - - var result; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments); - - block(param, object); - }; - - self.$each(); - - if (result !== undefined) { - return result; - } - ; - return object; - }, $Enumerable_each_with_object$37.$$arity = 1); - - Opal.def(self, '$entries', $Enumerable_entries$39 = function $$entries($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - var result = []; - - self.$each.$$p = function() { - result.push($$($nesting, 'Opal').$destructure(arguments)); - }; - - self.$each.apply(self, args); - - return result; - ; - }, $Enumerable_entries$39.$$arity = -1); - Opal.alias(self, "find", "detect"); - - Opal.def(self, '$find_all', $Enumerable_find_all$40 = function $$find_all() { - var $iter = $Enumerable_find_all$40.$$p, block = $iter || nil, $$41, self = this; - - if ($iter) $Enumerable_find_all$40.$$p = null; - - - if ($iter) $Enumerable_find_all$40.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["find_all"], ($$41 = function(){var self = $$41.$$s || this; - - return self.$enumerator_size()}, $$41.$$s = self, $$41.$$arity = 0, $$41)) - }; - - var result = []; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = Opal.yield1(block, param); - - if ($truthy(value)) { - result.push(param); - } - }; - - self.$each(); - - return result; - ; - }, $Enumerable_find_all$40.$$arity = 0); - - Opal.def(self, '$find_index', $Enumerable_find_index$42 = function $$find_index(object) {try { - - var $iter = $Enumerable_find_index$42.$$p, block = $iter || nil, $$43, $$44, self = this, index = nil; - - if ($iter) $Enumerable_find_index$42.$$p = null; - - - if ($iter) $Enumerable_find_index$42.$$p = null;; - ; - if ($truthy(object === undefined && block === nil)) { - return self.$enum_for("find_index")}; - - if (object != null && block !== nil) { - self.$warn("warning: given block not used") - } - ; - index = 0; - if ($truthy(object != null)) { - $send(self, 'each', [], ($$43 = function($a){var self = $$43.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($$($nesting, 'Opal').$destructure(value)['$=='](object)) { - Opal.ret(index)}; - return index += 1;;}, $$43.$$s = self, $$43.$$arity = -1, $$43)) - } else { - $send(self, 'each', [], ($$44 = function($a){var self = $$44.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($truthy(Opal.yieldX(block, Opal.to_a(value)))) { - Opal.ret(index)}; - return index += 1;;}, $$44.$$s = self, $$44.$$arity = -1, $$44)) - }; - return nil; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_find_index$42.$$arity = -1); - - Opal.def(self, '$first', $Enumerable_first$45 = function $$first(number) {try { - - var $$46, $$47, self = this, result = nil, current = nil; - - - ; - if ($truthy(number === undefined)) { - return $send(self, 'each', [], ($$46 = function(value){var self = $$46.$$s || this; - - - - if (value == null) { - value = nil; - }; - Opal.ret(value);}, $$46.$$s = self, $$46.$$arity = 1, $$46)) - } else { - - result = []; - number = $$($nesting, 'Opal').$coerce_to(number, $$($nesting, 'Integer'), "to_int"); - if ($truthy(number < 0)) { - self.$raise($$($nesting, 'ArgumentError'), "attempt to take negative size")}; - if ($truthy(number == 0)) { - return []}; - current = 0; - $send(self, 'each', [], ($$47 = function($a){var self = $$47.$$s || this, $post_args, args; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - result.push($$($nesting, 'Opal').$destructure(args)); - if ($truthy(number <= ++current)) { - Opal.ret(result) - } else { - return nil - };}, $$47.$$s = self, $$47.$$arity = -1, $$47)); - return result; - }; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_first$45.$$arity = -1); - Opal.alias(self, "flat_map", "collect_concat"); - - Opal.def(self, '$grep', $Enumerable_grep$48 = function $$grep(pattern) { - var $iter = $Enumerable_grep$48.$$p, block = $iter || nil, $$49, self = this, result = nil; - - if ($iter) $Enumerable_grep$48.$$p = null; - - - if ($iter) $Enumerable_grep$48.$$p = null;; - result = []; - $send(self, 'each', [], ($$49 = function($a){var self = $$49.$$s || this, $post_args, value, cmp = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - cmp = comparableForPattern(value); - if ($truthy($send(pattern, '__send__', ["==="].concat(Opal.to_a(cmp))))) { - } else { - return nil; - }; - if ((block !== nil)) { - - if ($truthy($rb_gt(value.$length(), 1))) { - value = [value]}; - value = Opal.yieldX(block, Opal.to_a(value)); - } else if ($truthy($rb_le(value.$length(), 1))) { - value = value['$[]'](0)}; - return result.$push(value);}, $$49.$$s = self, $$49.$$arity = -1, $$49)); - return result; - }, $Enumerable_grep$48.$$arity = 1); - - Opal.def(self, '$grep_v', $Enumerable_grep_v$50 = function $$grep_v(pattern) { - var $iter = $Enumerable_grep_v$50.$$p, block = $iter || nil, $$51, self = this, result = nil; - - if ($iter) $Enumerable_grep_v$50.$$p = null; - - - if ($iter) $Enumerable_grep_v$50.$$p = null;; - result = []; - $send(self, 'each', [], ($$51 = function($a){var self = $$51.$$s || this, $post_args, value, cmp = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - cmp = comparableForPattern(value); - if ($truthy($send(pattern, '__send__', ["==="].concat(Opal.to_a(cmp))))) { - return nil;}; - if ((block !== nil)) { - - if ($truthy($rb_gt(value.$length(), 1))) { - value = [value]}; - value = Opal.yieldX(block, Opal.to_a(value)); - } else if ($truthy($rb_le(value.$length(), 1))) { - value = value['$[]'](0)}; - return result.$push(value);}, $$51.$$s = self, $$51.$$arity = -1, $$51)); - return result; - }, $Enumerable_grep_v$50.$$arity = 1); - - Opal.def(self, '$group_by', $Enumerable_group_by$52 = function $$group_by() { - var $iter = $Enumerable_group_by$52.$$p, block = $iter || nil, $$53, $a, self = this, hash = nil, $writer = nil; - - if ($iter) $Enumerable_group_by$52.$$p = null; - - - if ($iter) $Enumerable_group_by$52.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["group_by"], ($$53 = function(){var self = $$53.$$s || this; - - return self.$enumerator_size()}, $$53.$$s = self, $$53.$$arity = 0, $$53)) - }; - hash = $hash2([], {}); - - var result; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = Opal.yield1(block, param); - - ($truthy($a = hash['$[]'](value)) ? $a : (($writer = [value, []]), $send(hash, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))['$<<'](param); - } - - self.$each(); - - if (result !== undefined) { - return result; - } - ; - return hash; - }, $Enumerable_group_by$52.$$arity = 0); - - Opal.def(self, '$include?', $Enumerable_include$ques$54 = function(obj) {try { - - var $$55, self = this; - - - $send(self, 'each', [], ($$55 = function($a){var self = $$55.$$s || this, $post_args, args; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($$($nesting, 'Opal').$destructure(args)['$=='](obj)) { - Opal.ret(true) - } else { - return nil - };}, $$55.$$s = self, $$55.$$arity = -1, $$55)); - return false; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_include$ques$54.$$arity = 1); - - Opal.def(self, '$inject', $Enumerable_inject$56 = function $$inject(object, sym) { - var $iter = $Enumerable_inject$56.$$p, block = $iter || nil, self = this; - - if ($iter) $Enumerable_inject$56.$$p = null; - - - if ($iter) $Enumerable_inject$56.$$p = null;; - ; - ; - - var result = object; - - if (block !== nil && sym === undefined) { - self.$each.$$p = function() { - var value = $$($nesting, 'Opal').$destructure(arguments); - - if (result === undefined) { - result = value; - return; - } - - value = Opal.yieldX(block, [result, value]); - - result = value; - }; - } - else { - if (sym === undefined) { - if (!$$($nesting, 'Symbol')['$==='](object)) { - self.$raise($$($nesting, 'TypeError'), "" + (object.$inspect()) + " is not a Symbol"); - } - - sym = object; - result = undefined; - } - - self.$each.$$p = function() { - var value = $$($nesting, 'Opal').$destructure(arguments); - - if (result === undefined) { - result = value; - return; - } - - result = (result).$__send__(sym, value); - }; - } - - self.$each(); - - return result == undefined ? nil : result; - ; - }, $Enumerable_inject$56.$$arity = -1); - - Opal.def(self, '$lazy', $Enumerable_lazy$57 = function $$lazy() { - var $$58, self = this; - - return $send($$$($$($nesting, 'Enumerator'), 'Lazy'), 'new', [self, self.$enumerator_size()], ($$58 = function(enum$, $a){var self = $$58.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - return $send(enum$, 'yield', Opal.to_a(args));}, $$58.$$s = self, $$58.$$arity = -2, $$58)) - }, $Enumerable_lazy$57.$$arity = 0); - - Opal.def(self, '$enumerator_size', $Enumerable_enumerator_size$59 = function $$enumerator_size() { - var self = this; - - if ($truthy(self['$respond_to?']("size"))) { - return self.$size() - } else { - return nil - } - }, $Enumerable_enumerator_size$59.$$arity = 0); - Opal.alias(self, "map", "collect"); - - Opal.def(self, '$max', $Enumerable_max$60 = function $$max(n) { - var $iter = $Enumerable_max$60.$$p, block = $iter || nil, self = this; - - if ($iter) $Enumerable_max$60.$$p = null; - - - if ($iter) $Enumerable_max$60.$$p = null;; - ; - - if (n === undefined || n === nil) { - var result, value; - - self.$each.$$p = function() { - var item = $$($nesting, 'Opal').$destructure(arguments); - - if (result === undefined) { - result = item; - return; - } - - if (block !== nil) { - value = Opal.yieldX(block, [item, result]); - } else { - value = (item)['$<=>'](result); - } - - if (value === nil) { - self.$raise($$($nesting, 'ArgumentError'), "comparison failed"); - } - - if (value > 0) { - result = item; - } - } - - self.$each(); - - if (result === undefined) { - return nil; - } else { - return result; - } - } - ; - n = $$($nesting, 'Opal').$coerce_to(n, $$($nesting, 'Integer'), "to_int"); - return $send(self, 'sort', [], block.$to_proc()).$reverse().$first(n); - }, $Enumerable_max$60.$$arity = -1); - - Opal.def(self, '$max_by', $Enumerable_max_by$61 = function $$max_by() { - var $iter = $Enumerable_max_by$61.$$p, block = $iter || nil, $$62, self = this; - - if ($iter) $Enumerable_max_by$61.$$p = null; - - - if ($iter) $Enumerable_max_by$61.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["max_by"], ($$62 = function(){var self = $$62.$$s || this; - - return self.$enumerator_size()}, $$62.$$s = self, $$62.$$arity = 0, $$62)) - }; - - var result, - by; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = Opal.yield1(block, param); - - if (result === undefined) { - result = param; - by = value; - return; - } - - if ((value)['$<=>'](by) > 0) { - result = param - by = value; - } - }; - - self.$each(); - - return result === undefined ? nil : result; - ; - }, $Enumerable_max_by$61.$$arity = 0); - Opal.alias(self, "member?", "include?"); - - Opal.def(self, '$min', $Enumerable_min$63 = function $$min() { - var $iter = $Enumerable_min$63.$$p, block = $iter || nil, self = this; - - if ($iter) $Enumerable_min$63.$$p = null; - - - if ($iter) $Enumerable_min$63.$$p = null;; - - var result; - - if (block !== nil) { - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments); - - if (result === undefined) { - result = param; - return; - } - - var value = block(param, result); - - if (value === nil) { - self.$raise($$($nesting, 'ArgumentError'), "comparison failed"); - } - - if (value < 0) { - result = param; - } - }; - } - else { - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments); - - if (result === undefined) { - result = param; - return; - } - - if ($$($nesting, 'Opal').$compare(param, result) < 0) { - result = param; - } - }; - } - - self.$each(); - - return result === undefined ? nil : result; - ; - }, $Enumerable_min$63.$$arity = 0); - - Opal.def(self, '$min_by', $Enumerable_min_by$64 = function $$min_by() { - var $iter = $Enumerable_min_by$64.$$p, block = $iter || nil, $$65, self = this; - - if ($iter) $Enumerable_min_by$64.$$p = null; - - - if ($iter) $Enumerable_min_by$64.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["min_by"], ($$65 = function(){var self = $$65.$$s || this; - - return self.$enumerator_size()}, $$65.$$s = self, $$65.$$arity = 0, $$65)) - }; - - var result, - by; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = Opal.yield1(block, param); - - if (result === undefined) { - result = param; - by = value; - return; - } - - if ((value)['$<=>'](by) < 0) { - result = param - by = value; - } - }; - - self.$each(); - - return result === undefined ? nil : result; - ; - }, $Enumerable_min_by$64.$$arity = 0); - - Opal.def(self, '$minmax', $Enumerable_minmax$66 = function $$minmax() { - var $iter = $Enumerable_minmax$66.$$p, block = $iter || nil, $a, $$67, self = this; - - if ($iter) $Enumerable_minmax$66.$$p = null; - - - if ($iter) $Enumerable_minmax$66.$$p = null;; - block = ($truthy($a = block) ? $a : $send(self, 'proc', [], ($$67 = function(a, b){var self = $$67.$$s || this; - - - - if (a == null) { - a = nil; - }; - - if (b == null) { - b = nil; - }; - return a['$<=>'](b);}, $$67.$$s = self, $$67.$$arity = 2, $$67))); - - var min = nil, max = nil, first_time = true; - - self.$each.$$p = function() { - var element = $$($nesting, 'Opal').$destructure(arguments); - if (first_time) { - min = max = element; - first_time = false; - } else { - var min_cmp = block.$call(min, element); - - if (min_cmp === nil) { - self.$raise($$($nesting, 'ArgumentError'), "comparison failed") - } else if (min_cmp > 0) { - min = element; - } - - var max_cmp = block.$call(max, element); - - if (max_cmp === nil) { - self.$raise($$($nesting, 'ArgumentError'), "comparison failed") - } else if (max_cmp < 0) { - max = element; - } - } - } - - self.$each(); - - return [min, max]; - ; - }, $Enumerable_minmax$66.$$arity = 0); - - Opal.def(self, '$minmax_by', $Enumerable_minmax_by$68 = function $$minmax_by() { - var $iter = $Enumerable_minmax_by$68.$$p, block = $iter || nil, self = this; - - if ($iter) $Enumerable_minmax_by$68.$$p = null; - - - if ($iter) $Enumerable_minmax_by$68.$$p = null;; - return self.$raise($$($nesting, 'NotImplementedError')); - }, $Enumerable_minmax_by$68.$$arity = 0); - - Opal.def(self, '$none?', $Enumerable_none$ques$69 = function(pattern) {try { - - var $iter = $Enumerable_none$ques$69.$$p, block = $iter || nil, $$70, $$71, $$72, self = this; - - if ($iter) $Enumerable_none$ques$69.$$p = null; - - - if ($iter) $Enumerable_none$ques$69.$$p = null;; - ; - if ($truthy(pattern !== undefined)) { - $send(self, 'each', [], ($$70 = function($a){var self = $$70.$$s || this, $post_args, value, comparable = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - comparable = comparableForPattern(value); - if ($truthy($send(pattern, 'public_send', ["==="].concat(Opal.to_a(comparable))))) { - Opal.ret(false) - } else { - return nil - };}, $$70.$$s = self, $$70.$$arity = -1, $$70)) - } else if ((block !== nil)) { - $send(self, 'each', [], ($$71 = function($a){var self = $$71.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($truthy(Opal.yieldX(block, Opal.to_a(value)))) { - Opal.ret(false) - } else { - return nil - };}, $$71.$$s = self, $$71.$$arity = -1, $$71)) - } else { - $send(self, 'each', [], ($$72 = function($a){var self = $$72.$$s || this, $post_args, value, item = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - item = $$($nesting, 'Opal').$destructure(value); - if ($truthy(item)) { - Opal.ret(false) - } else { - return nil - };}, $$72.$$s = self, $$72.$$arity = -1, $$72)) - }; - return true; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_none$ques$69.$$arity = -1); - - Opal.def(self, '$one?', $Enumerable_one$ques$73 = function(pattern) {try { - - var $iter = $Enumerable_one$ques$73.$$p, block = $iter || nil, $$74, $$75, $$76, self = this, count = nil; - - if ($iter) $Enumerable_one$ques$73.$$p = null; - - - if ($iter) $Enumerable_one$ques$73.$$p = null;; - ; - count = 0; - if ($truthy(pattern !== undefined)) { - $send(self, 'each', [], ($$74 = function($a){var self = $$74.$$s || this, $post_args, value, comparable = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - comparable = comparableForPattern(value); - if ($truthy($send(pattern, 'public_send', ["==="].concat(Opal.to_a(comparable))))) { - - count = $rb_plus(count, 1); - if ($truthy($rb_gt(count, 1))) { - Opal.ret(false) - } else { - return nil - }; - } else { - return nil - };}, $$74.$$s = self, $$74.$$arity = -1, $$74)) - } else if ((block !== nil)) { - $send(self, 'each', [], ($$75 = function($a){var self = $$75.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($truthy(Opal.yieldX(block, Opal.to_a(value)))) { - } else { - return nil; - }; - count = $rb_plus(count, 1); - if ($truthy($rb_gt(count, 1))) { - Opal.ret(false) - } else { - return nil - };}, $$75.$$s = self, $$75.$$arity = -1, $$75)) - } else { - $send(self, 'each', [], ($$76 = function($a){var self = $$76.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($truthy($$($nesting, 'Opal').$destructure(value))) { - } else { - return nil; - }; - count = $rb_plus(count, 1); - if ($truthy($rb_gt(count, 1))) { - Opal.ret(false) - } else { - return nil - };}, $$76.$$s = self, $$76.$$arity = -1, $$76)) - }; - return count['$=='](1); - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_one$ques$73.$$arity = -1); - - Opal.def(self, '$partition', $Enumerable_partition$77 = function $$partition() { - var $iter = $Enumerable_partition$77.$$p, block = $iter || nil, $$78, self = this; - - if ($iter) $Enumerable_partition$77.$$p = null; - - - if ($iter) $Enumerable_partition$77.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["partition"], ($$78 = function(){var self = $$78.$$s || this; - - return self.$enumerator_size()}, $$78.$$s = self, $$78.$$arity = 0, $$78)) - }; - - var truthy = [], falsy = [], result; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = Opal.yield1(block, param); - - if ($truthy(value)) { - truthy.push(param); - } - else { - falsy.push(param); - } - }; - - self.$each(); - - return [truthy, falsy]; - ; - }, $Enumerable_partition$77.$$arity = 0); - Opal.alias(self, "reduce", "inject"); - - Opal.def(self, '$reject', $Enumerable_reject$79 = function $$reject() { - var $iter = $Enumerable_reject$79.$$p, block = $iter || nil, $$80, self = this; - - if ($iter) $Enumerable_reject$79.$$p = null; - - - if ($iter) $Enumerable_reject$79.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["reject"], ($$80 = function(){var self = $$80.$$s || this; - - return self.$enumerator_size()}, $$80.$$s = self, $$80.$$arity = 0, $$80)) - }; - - var result = []; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = Opal.yield1(block, param); - - if ($falsy(value)) { - result.push(param); - } - }; - - self.$each(); - - return result; - ; - }, $Enumerable_reject$79.$$arity = 0); - - Opal.def(self, '$reverse_each', $Enumerable_reverse_each$81 = function $$reverse_each() { - var $iter = $Enumerable_reverse_each$81.$$p, block = $iter || nil, $$82, self = this; - - if ($iter) $Enumerable_reverse_each$81.$$p = null; - - - if ($iter) $Enumerable_reverse_each$81.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["reverse_each"], ($$82 = function(){var self = $$82.$$s || this; - - return self.$enumerator_size()}, $$82.$$s = self, $$82.$$arity = 0, $$82)) - }; - - var result = []; - - self.$each.$$p = function() { - result.push(arguments); - }; - - self.$each(); - - for (var i = result.length - 1; i >= 0; i--) { - Opal.yieldX(block, result[i]); - } - - return result; - ; - }, $Enumerable_reverse_each$81.$$arity = 0); - Opal.alias(self, "select", "find_all"); - - Opal.def(self, '$slice_before', $Enumerable_slice_before$83 = function $$slice_before(pattern) { - var $iter = $Enumerable_slice_before$83.$$p, block = $iter || nil, $$84, self = this; - - if ($iter) $Enumerable_slice_before$83.$$p = null; - - - if ($iter) $Enumerable_slice_before$83.$$p = null;; - ; - if ($truthy(pattern === undefined && block === nil)) { - self.$raise($$($nesting, 'ArgumentError'), "both pattern and block are given")}; - if ($truthy(pattern !== undefined && block !== nil || arguments.length > 1)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (arguments.length) + " expected 1)")}; - return $send($$($nesting, 'Enumerator'), 'new', [], ($$84 = function(e){var self = $$84.$$s || this; - - - - if (e == null) { - e = nil; - }; - - var slice = []; - - if (block !== nil) { - if (pattern === undefined) { - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = Opal.yield1(block, param); - - if ($truthy(value) && slice.length > 0) { - e['$<<'](slice); - slice = []; - } - - slice.push(param); - }; - } - else { - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = block(param, pattern.$dup()); - - if ($truthy(value) && slice.length > 0) { - e['$<<'](slice); - slice = []; - } - - slice.push(param); - }; - } - } - else { - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = pattern['$==='](param); - - if ($truthy(value) && slice.length > 0) { - e['$<<'](slice); - slice = []; - } - - slice.push(param); - }; - } - - self.$each(); - - if (slice.length > 0) { - e['$<<'](slice); - } - ;}, $$84.$$s = self, $$84.$$arity = 1, $$84)); - }, $Enumerable_slice_before$83.$$arity = -1); - - Opal.def(self, '$slice_after', $Enumerable_slice_after$85 = function $$slice_after(pattern) { - var $iter = $Enumerable_slice_after$85.$$p, block = $iter || nil, $$86, $$87, self = this; - - if ($iter) $Enumerable_slice_after$85.$$p = null; - - - if ($iter) $Enumerable_slice_after$85.$$p = null;; - ; - if ($truthy(pattern === undefined && block === nil)) { - self.$raise($$($nesting, 'ArgumentError'), "both pattern and block are given")}; - if ($truthy(pattern !== undefined && block !== nil || arguments.length > 1)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (arguments.length) + " expected 1)")}; - if ($truthy(pattern !== undefined)) { - block = $send(self, 'proc', [], ($$86 = function(e){var self = $$86.$$s || this; - - - - if (e == null) { - e = nil; - }; - return pattern['$==='](e);}, $$86.$$s = self, $$86.$$arity = 1, $$86))}; - return $send($$($nesting, 'Enumerator'), 'new', [], ($$87 = function(yielder){var self = $$87.$$s || this; - - - - if (yielder == null) { - yielder = nil; - }; - - var accumulate; - - self.$each.$$p = function() { - var element = $$($nesting, 'Opal').$destructure(arguments), - end_chunk = Opal.yield1(block, element); - - if (accumulate == null) { - accumulate = []; - } - - if ($truthy(end_chunk)) { - accumulate.push(element); - yielder.$yield(accumulate); - accumulate = null; - } else { - accumulate.push(element) - } - } - - self.$each(); - - if (accumulate != null) { - yielder.$yield(accumulate); - } - ;}, $$87.$$s = self, $$87.$$arity = 1, $$87)); - }, $Enumerable_slice_after$85.$$arity = -1); - - Opal.def(self, '$slice_when', $Enumerable_slice_when$88 = function $$slice_when() { - var $iter = $Enumerable_slice_when$88.$$p, block = $iter || nil, $$89, self = this; - - if ($iter) $Enumerable_slice_when$88.$$p = null; - - - if ($iter) $Enumerable_slice_when$88.$$p = null;; - if ((block !== nil)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "wrong number of arguments (0 for 1)") - }; - return $send($$($nesting, 'Enumerator'), 'new', [], ($$89 = function(yielder){var self = $$89.$$s || this; - - - - if (yielder == null) { - yielder = nil; - }; - - var slice = nil, last_after = nil; - - self.$each_cons.$$p = function() { - var params = $$($nesting, 'Opal').$destructure(arguments), - before = params[0], - after = params[1], - match = Opal.yieldX(block, [before, after]); - - last_after = after; - - if (slice === nil) { - slice = []; - } - - if ($truthy(match)) { - slice.push(before); - yielder.$yield(slice); - slice = []; - } else { - slice.push(before); - } - } - - self.$each_cons(2); - - if (slice !== nil) { - slice.push(last_after); - yielder.$yield(slice); - } - ;}, $$89.$$s = self, $$89.$$arity = 1, $$89)); - }, $Enumerable_slice_when$88.$$arity = 0); - - Opal.def(self, '$sort', $Enumerable_sort$90 = function $$sort() { - var $iter = $Enumerable_sort$90.$$p, block = $iter || nil, $$91, self = this, ary = nil; - - if ($iter) $Enumerable_sort$90.$$p = null; - - - if ($iter) $Enumerable_sort$90.$$p = null;; - ary = self.$to_a(); - if ((block !== nil)) { - } else { - block = $lambda(($$91 = function(a, b){var self = $$91.$$s || this; - - - - if (a == null) { - a = nil; - }; - - if (b == null) { - b = nil; - }; - return a['$<=>'](b);}, $$91.$$s = self, $$91.$$arity = 2, $$91)) - }; - return $send(ary, 'sort', [], block.$to_proc()); - }, $Enumerable_sort$90.$$arity = 0); - - Opal.def(self, '$sort_by', $Enumerable_sort_by$92 = function $$sort_by() { - var $iter = $Enumerable_sort_by$92.$$p, block = $iter || nil, $$93, $$94, $$95, $$96, self = this, dup = nil; - - if ($iter) $Enumerable_sort_by$92.$$p = null; - - - if ($iter) $Enumerable_sort_by$92.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["sort_by"], ($$93 = function(){var self = $$93.$$s || this; - - return self.$enumerator_size()}, $$93.$$s = self, $$93.$$arity = 0, $$93)) - }; - dup = $send(self, 'map', [], ($$94 = function(){var self = $$94.$$s || this, arg = nil; - - - arg = $$($nesting, 'Opal').$destructure(arguments); - return [Opal.yield1(block, arg), arg];}, $$94.$$s = self, $$94.$$arity = 0, $$94)); - $send(dup, 'sort!', [], ($$95 = function(a, b){var self = $$95.$$s || this; - - - - if (a == null) { - a = nil; - }; - - if (b == null) { - b = nil; - }; - return (a[0])['$<=>'](b[0]);}, $$95.$$s = self, $$95.$$arity = 2, $$95)); - return $send(dup, 'map!', [], ($$96 = function(i){var self = $$96.$$s || this; - - - - if (i == null) { - i = nil; - }; - return i[1];;}, $$96.$$s = self, $$96.$$arity = 1, $$96)); - }, $Enumerable_sort_by$92.$$arity = 0); - - Opal.def(self, '$sum', $Enumerable_sum$97 = function $$sum(initial) { - var $$98, $iter = $Enumerable_sum$97.$$p, $yield = $iter || nil, self = this, result = nil; - - if ($iter) $Enumerable_sum$97.$$p = null; - - - if (initial == null) { - initial = 0; - }; - result = initial; - $send(self, 'each', [], ($$98 = function($a){var self = $$98.$$s || this, $post_args, args, item = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - item = (function() {if (($yield !== nil)) { - return Opal.yieldX($yield, Opal.to_a(args)); - } else { - return $$($nesting, 'Opal').$destructure(args) - }; return nil; })(); - return (result = $rb_plus(result, item));}, $$98.$$s = self, $$98.$$arity = -1, $$98)); - return result; - }, $Enumerable_sum$97.$$arity = -1); - - Opal.def(self, '$take', $Enumerable_take$99 = function $$take(num) { - var self = this; - - return self.$first(num) - }, $Enumerable_take$99.$$arity = 1); - - Opal.def(self, '$take_while', $Enumerable_take_while$100 = function $$take_while() {try { - - var $iter = $Enumerable_take_while$100.$$p, block = $iter || nil, $$101, self = this, result = nil; - - if ($iter) $Enumerable_take_while$100.$$p = null; - - - if ($iter) $Enumerable_take_while$100.$$p = null;; - if ($truthy(block)) { - } else { - return self.$enum_for("take_while") - }; - result = []; - return $send(self, 'each', [], ($$101 = function($a){var self = $$101.$$s || this, $post_args, args, value = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - value = $$($nesting, 'Opal').$destructure(args); - if ($truthy(Opal.yield1(block, value))) { - } else { - Opal.ret(result) - }; - return result.push(value);;}, $$101.$$s = self, $$101.$$arity = -1, $$101)); - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_take_while$100.$$arity = 0); - - Opal.def(self, '$uniq', $Enumerable_uniq$102 = function $$uniq() { - var $iter = $Enumerable_uniq$102.$$p, block = $iter || nil, $$103, self = this, hash = nil; - - if ($iter) $Enumerable_uniq$102.$$p = null; - - - if ($iter) $Enumerable_uniq$102.$$p = null;; - hash = $hash2([], {}); - $send(self, 'each', [], ($$103 = function($a){var self = $$103.$$s || this, $post_args, args, value = nil, produced = nil, $writer = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - value = $$($nesting, 'Opal').$destructure(args); - produced = (function() {if ((block !== nil)) { - return Opal.yield1(block, value); - } else { - return value - }; return nil; })(); - if ($truthy(hash['$key?'](produced))) { - return nil - } else { - - $writer = [produced, value]; - $send(hash, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - };}, $$103.$$s = self, $$103.$$arity = -1, $$103)); - return hash.$values(); - }, $Enumerable_uniq$102.$$arity = 0); - Opal.alias(self, "to_a", "entries"); - - Opal.def(self, '$zip', $Enumerable_zip$104 = function $$zip($a) { - var $iter = $Enumerable_zip$104.$$p, block = $iter || nil, $post_args, others, self = this; - - if ($iter) $Enumerable_zip$104.$$p = null; - - - if ($iter) $Enumerable_zip$104.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - others = $post_args;; - return $send(self.$to_a(), 'zip', Opal.to_a(others)); - }, $Enumerable_zip$104.$$arity = -1); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/enumerator"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send, $falsy = Opal.falsy; - - Opal.add_stubs(['$require', '$include', '$allocate', '$new', '$to_proc', '$coerce_to', '$nil?', '$empty?', '$+', '$class', '$__send__', '$===', '$call', '$enum_for', '$size', '$destructure', '$inspect', '$any?', '$[]', '$raise', '$yield', '$each', '$enumerator_size', '$respond_to?', '$try_convert', '$<', '$for']); - - self.$require("corelib/enumerable"); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Enumerator'); - - var $nesting = [self].concat($parent_nesting), $Enumerator_for$1, $Enumerator_initialize$2, $Enumerator_each$3, $Enumerator_size$4, $Enumerator_with_index$5, $Enumerator_inspect$7; - - self.$$prototype.size = self.$$prototype.args = self.$$prototype.object = self.$$prototype.method = nil; - - self.$include($$($nesting, 'Enumerable')); - self.$$prototype.$$is_enumerator = true; - Opal.defs(self, '$for', $Enumerator_for$1 = function(object, $a, $b) { - var $iter = $Enumerator_for$1.$$p, block = $iter || nil, $post_args, method, args, self = this; - - if ($iter) $Enumerator_for$1.$$p = null; - - - if ($iter) $Enumerator_for$1.$$p = null;; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - if ($post_args.length > 0) { - method = $post_args[0]; - $post_args.splice(0, 1); - } - if (method == null) { - method = "each"; - }; - - args = $post_args;; - - var obj = self.$allocate(); - - obj.object = object; - obj.size = block; - obj.method = method; - obj.args = args; - - return obj; - ; - }, $Enumerator_for$1.$$arity = -2); - - Opal.def(self, '$initialize', $Enumerator_initialize$2 = function $$initialize($a) { - var $iter = $Enumerator_initialize$2.$$p, block = $iter || nil, $post_args, self = this; - - if ($iter) $Enumerator_initialize$2.$$p = null; - - - if ($iter) $Enumerator_initialize$2.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - if ($truthy(block)) { - - self.object = $send($$($nesting, 'Generator'), 'new', [], block.$to_proc()); - self.method = "each"; - self.args = []; - self.size = arguments[0] || nil; - if ($truthy(self.size)) { - return (self.size = $$($nesting, 'Opal').$coerce_to(self.size, $$($nesting, 'Integer'), "to_int")) - } else { - return nil - }; - } else { - - self.object = arguments[0]; - self.method = arguments[1] || "each"; - self.args = $slice.call(arguments, 2); - return (self.size = nil); - }; - }, $Enumerator_initialize$2.$$arity = -1); - - Opal.def(self, '$each', $Enumerator_each$3 = function $$each($a) { - var $iter = $Enumerator_each$3.$$p, block = $iter || nil, $post_args, args, $b, self = this; - - if ($iter) $Enumerator_each$3.$$p = null; - - - if ($iter) $Enumerator_each$3.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy(($truthy($b = block['$nil?']()) ? args['$empty?']() : $b))) { - return self}; - args = $rb_plus(self.args, args); - if ($truthy(block['$nil?']())) { - return $send(self.$class(), 'new', [self.object, self.method].concat(Opal.to_a(args)))}; - return $send(self.object, '__send__', [self.method].concat(Opal.to_a(args)), block.$to_proc()); - }, $Enumerator_each$3.$$arity = -1); - - Opal.def(self, '$size', $Enumerator_size$4 = function $$size() { - var self = this; - - if ($truthy($$($nesting, 'Proc')['$==='](self.size))) { - return $send(self.size, 'call', Opal.to_a(self.args)) - } else { - return self.size - } - }, $Enumerator_size$4.$$arity = 0); - - Opal.def(self, '$with_index', $Enumerator_with_index$5 = function $$with_index(offset) { - var $iter = $Enumerator_with_index$5.$$p, block = $iter || nil, $$6, self = this; - - if ($iter) $Enumerator_with_index$5.$$p = null; - - - if ($iter) $Enumerator_with_index$5.$$p = null;; - - if (offset == null) { - offset = 0; - }; - offset = (function() {if ($truthy(offset)) { - return $$($nesting, 'Opal').$coerce_to(offset, $$($nesting, 'Integer'), "to_int") - } else { - return 0 - }; return nil; })(); - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["with_index", offset], ($$6 = function(){var self = $$6.$$s || this; - - return self.$size()}, $$6.$$s = self, $$6.$$arity = 0, $$6)) - }; - - var result, index = offset; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = block(param, index); - - index++; - - return value; - } - - return self.$each(); - ; - }, $Enumerator_with_index$5.$$arity = -1); - Opal.alias(self, "with_object", "each_with_object"); - - Opal.def(self, '$inspect', $Enumerator_inspect$7 = function $$inspect() { - var self = this, result = nil; - - - result = "" + "#<" + (self.$class()) + ": " + (self.object.$inspect()) + ":" + (self.method); - if ($truthy(self.args['$any?']())) { - result = $rb_plus(result, "" + "(" + (self.args.$inspect()['$[]']($$($nesting, 'Range').$new(1, -2))) + ")")}; - return $rb_plus(result, ">"); - }, $Enumerator_inspect$7.$$arity = 0); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Generator'); - - var $nesting = [self].concat($parent_nesting), $Generator_initialize$8, $Generator_each$9; - - self.$$prototype.block = nil; - - self.$include($$($nesting, 'Enumerable')); - - Opal.def(self, '$initialize', $Generator_initialize$8 = function $$initialize() { - var $iter = $Generator_initialize$8.$$p, block = $iter || nil, self = this; - - if ($iter) $Generator_initialize$8.$$p = null; - - - if ($iter) $Generator_initialize$8.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'LocalJumpError'), "no block given") - }; - return (self.block = block); - }, $Generator_initialize$8.$$arity = 0); - return (Opal.def(self, '$each', $Generator_each$9 = function $$each($a) { - var $iter = $Generator_each$9.$$p, block = $iter || nil, $post_args, args, self = this, yielder = nil; - - if ($iter) $Generator_each$9.$$p = null; - - - if ($iter) $Generator_each$9.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - yielder = $send($$($nesting, 'Yielder'), 'new', [], block.$to_proc()); - - try { - args.unshift(yielder); - - Opal.yieldX(self.block, args); - } - catch (e) { - if (e === $breaker) { - return $breaker.$v; - } - else { - throw e; - } - } - ; - return self; - }, $Generator_each$9.$$arity = -1), nil) && 'each'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Yielder'); - - var $nesting = [self].concat($parent_nesting), $Yielder_initialize$10, $Yielder_yield$11, $Yielder_$lt$lt$12; - - self.$$prototype.block = nil; - - - Opal.def(self, '$initialize', $Yielder_initialize$10 = function $$initialize() { - var $iter = $Yielder_initialize$10.$$p, block = $iter || nil, self = this; - - if ($iter) $Yielder_initialize$10.$$p = null; - - - if ($iter) $Yielder_initialize$10.$$p = null;; - return (self.block = block); - }, $Yielder_initialize$10.$$arity = 0); - - Opal.def(self, '$yield', $Yielder_yield$11 = function($a) { - var $post_args, values, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - values = $post_args;; - - var value = Opal.yieldX(self.block, values); - - if (value === $breaker) { - throw $breaker; - } - - return value; - ; - }, $Yielder_yield$11.$$arity = -1); - return (Opal.def(self, '$<<', $Yielder_$lt$lt$12 = function($a) { - var $post_args, values, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - values = $post_args;; - $send(self, 'yield', Opal.to_a(values)); - return self; - }, $Yielder_$lt$lt$12.$$arity = -1), nil) && '<<'; - })($nesting[0], null, $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Lazy'); - - var $nesting = [self].concat($parent_nesting), $Lazy_initialize$13, $Lazy_lazy$16, $Lazy_collect$17, $Lazy_collect_concat$19, $Lazy_drop$23, $Lazy_drop_while$25, $Lazy_enum_for$27, $Lazy_find_all$28, $Lazy_grep$30, $Lazy_reject$33, $Lazy_take$35, $Lazy_take_while$37, $Lazy_inspect$39; - - self.$$prototype.enumerator = nil; - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'StopLazyError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'Exception'), $nesting); - - Opal.def(self, '$initialize', $Lazy_initialize$13 = function $$initialize(object, size) { - var $iter = $Lazy_initialize$13.$$p, block = $iter || nil, $$14, self = this; - - if ($iter) $Lazy_initialize$13.$$p = null; - - - if ($iter) $Lazy_initialize$13.$$p = null;; - - if (size == null) { - size = nil; - }; - if ((block !== nil)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to call lazy new without a block") - }; - self.enumerator = object; - return $send(self, Opal.find_super_dispatcher(self, 'initialize', $Lazy_initialize$13, false), [size], ($$14 = function(yielder, $a){var self = $$14.$$s || this, $post_args, each_args, $$15; - - - - if (yielder == null) { - yielder = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - each_args = $post_args;; - try { - return $send(object, 'each', Opal.to_a(each_args), ($$15 = function($b){var self = $$15.$$s || this, $post_args, args; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - args.unshift(yielder); - - Opal.yieldX(block, args); - ;}, $$15.$$s = self, $$15.$$arity = -1, $$15)) - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'Exception')])) { - try { - return nil - } finally { Opal.pop_exception() } - } else { throw $err; } - };}, $$14.$$s = self, $$14.$$arity = -2, $$14)); - }, $Lazy_initialize$13.$$arity = -2); - Opal.alias(self, "force", "to_a"); - - Opal.def(self, '$lazy', $Lazy_lazy$16 = function $$lazy() { - var self = this; - - return self - }, $Lazy_lazy$16.$$arity = 0); - - Opal.def(self, '$collect', $Lazy_collect$17 = function $$collect() { - var $iter = $Lazy_collect$17.$$p, block = $iter || nil, $$18, self = this; - - if ($iter) $Lazy_collect$17.$$p = null; - - - if ($iter) $Lazy_collect$17.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to call lazy map without a block") - }; - return $send($$($nesting, 'Lazy'), 'new', [self, self.$enumerator_size()], ($$18 = function(enum$, $a){var self = $$18.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - - var value = Opal.yieldX(block, args); - - enum$.$yield(value); - ;}, $$18.$$s = self, $$18.$$arity = -2, $$18)); - }, $Lazy_collect$17.$$arity = 0); - - Opal.def(self, '$collect_concat', $Lazy_collect_concat$19 = function $$collect_concat() { - var $iter = $Lazy_collect_concat$19.$$p, block = $iter || nil, $$20, self = this; - - if ($iter) $Lazy_collect_concat$19.$$p = null; - - - if ($iter) $Lazy_collect_concat$19.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to call lazy map without a block") - }; - return $send($$($nesting, 'Lazy'), 'new', [self, nil], ($$20 = function(enum$, $a){var self = $$20.$$s || this, $post_args, args, $$21, $$22; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - - var value = Opal.yieldX(block, args); - - if ((value)['$respond_to?']("force") && (value)['$respond_to?']("each")) { - $send((value), 'each', [], ($$21 = function(v){var self = $$21.$$s || this; - - - - if (v == null) { - v = nil; - }; - return enum$.$yield(v);}, $$21.$$s = self, $$21.$$arity = 1, $$21)) - } - else { - var array = $$($nesting, 'Opal').$try_convert(value, $$($nesting, 'Array'), "to_ary"); - - if (array === nil) { - enum$.$yield(value); - } - else { - $send((value), 'each', [], ($$22 = function(v){var self = $$22.$$s || this; - - - - if (v == null) { - v = nil; - }; - return enum$.$yield(v);}, $$22.$$s = self, $$22.$$arity = 1, $$22)); - } - } - ;}, $$20.$$s = self, $$20.$$arity = -2, $$20)); - }, $Lazy_collect_concat$19.$$arity = 0); - - Opal.def(self, '$drop', $Lazy_drop$23 = function $$drop(n) { - var $$24, self = this, current_size = nil, set_size = nil, dropped = nil; - - - n = $$($nesting, 'Opal').$coerce_to(n, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_lt(n, 0))) { - self.$raise($$($nesting, 'ArgumentError'), "attempt to drop negative size")}; - current_size = self.$enumerator_size(); - set_size = (function() {if ($truthy($$($nesting, 'Integer')['$==='](current_size))) { - if ($truthy($rb_lt(n, current_size))) { - return n - } else { - return current_size - } - } else { - return current_size - }; return nil; })(); - dropped = 0; - return $send($$($nesting, 'Lazy'), 'new', [self, set_size], ($$24 = function(enum$, $a){var self = $$24.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - if ($truthy($rb_lt(dropped, n))) { - return (dropped = $rb_plus(dropped, 1)) - } else { - return $send(enum$, 'yield', Opal.to_a(args)) - };}, $$24.$$s = self, $$24.$$arity = -2, $$24)); - }, $Lazy_drop$23.$$arity = 1); - - Opal.def(self, '$drop_while', $Lazy_drop_while$25 = function $$drop_while() { - var $iter = $Lazy_drop_while$25.$$p, block = $iter || nil, $$26, self = this, succeeding = nil; - - if ($iter) $Lazy_drop_while$25.$$p = null; - - - if ($iter) $Lazy_drop_while$25.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to call lazy drop_while without a block") - }; - succeeding = true; - return $send($$($nesting, 'Lazy'), 'new', [self, nil], ($$26 = function(enum$, $a){var self = $$26.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - if ($truthy(succeeding)) { - - var value = Opal.yieldX(block, args); - - if ($falsy(value)) { - succeeding = false; - - $send(enum$, 'yield', Opal.to_a(args)); - } - - } else { - return $send(enum$, 'yield', Opal.to_a(args)) - };}, $$26.$$s = self, $$26.$$arity = -2, $$26)); - }, $Lazy_drop_while$25.$$arity = 0); - - Opal.def(self, '$enum_for', $Lazy_enum_for$27 = function $$enum_for($a, $b) { - var $iter = $Lazy_enum_for$27.$$p, block = $iter || nil, $post_args, method, args, self = this; - - if ($iter) $Lazy_enum_for$27.$$p = null; - - - if ($iter) $Lazy_enum_for$27.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - if ($post_args.length > 0) { - method = $post_args[0]; - $post_args.splice(0, 1); - } - if (method == null) { - method = "each"; - }; - - args = $post_args;; - return $send(self.$class(), 'for', [self, method].concat(Opal.to_a(args)), block.$to_proc()); - }, $Lazy_enum_for$27.$$arity = -1); - - Opal.def(self, '$find_all', $Lazy_find_all$28 = function $$find_all() { - var $iter = $Lazy_find_all$28.$$p, block = $iter || nil, $$29, self = this; - - if ($iter) $Lazy_find_all$28.$$p = null; - - - if ($iter) $Lazy_find_all$28.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to call lazy select without a block") - }; - return $send($$($nesting, 'Lazy'), 'new', [self, nil], ($$29 = function(enum$, $a){var self = $$29.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - - var value = Opal.yieldX(block, args); - - if ($truthy(value)) { - $send(enum$, 'yield', Opal.to_a(args)); - } - ;}, $$29.$$s = self, $$29.$$arity = -2, $$29)); - }, $Lazy_find_all$28.$$arity = 0); - Opal.alias(self, "flat_map", "collect_concat"); - - Opal.def(self, '$grep', $Lazy_grep$30 = function $$grep(pattern) { - var $iter = $Lazy_grep$30.$$p, block = $iter || nil, $$31, $$32, self = this; - - if ($iter) $Lazy_grep$30.$$p = null; - - - if ($iter) $Lazy_grep$30.$$p = null;; - if ($truthy(block)) { - return $send($$($nesting, 'Lazy'), 'new', [self, nil], ($$31 = function(enum$, $a){var self = $$31.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - - var param = $$($nesting, 'Opal').$destructure(args), - value = pattern['$==='](param); - - if ($truthy(value)) { - value = Opal.yield1(block, param); - - enum$.$yield(Opal.yield1(block, param)); - } - ;}, $$31.$$s = self, $$31.$$arity = -2, $$31)) - } else { - return $send($$($nesting, 'Lazy'), 'new', [self, nil], ($$32 = function(enum$, $a){var self = $$32.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - - var param = $$($nesting, 'Opal').$destructure(args), - value = pattern['$==='](param); - - if ($truthy(value)) { - enum$.$yield(param); - } - ;}, $$32.$$s = self, $$32.$$arity = -2, $$32)) - }; - }, $Lazy_grep$30.$$arity = 1); - Opal.alias(self, "map", "collect"); - Opal.alias(self, "select", "find_all"); - - Opal.def(self, '$reject', $Lazy_reject$33 = function $$reject() { - var $iter = $Lazy_reject$33.$$p, block = $iter || nil, $$34, self = this; - - if ($iter) $Lazy_reject$33.$$p = null; - - - if ($iter) $Lazy_reject$33.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to call lazy reject without a block") - }; - return $send($$($nesting, 'Lazy'), 'new', [self, nil], ($$34 = function(enum$, $a){var self = $$34.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - - var value = Opal.yieldX(block, args); - - if ($falsy(value)) { - $send(enum$, 'yield', Opal.to_a(args)); - } - ;}, $$34.$$s = self, $$34.$$arity = -2, $$34)); - }, $Lazy_reject$33.$$arity = 0); - - Opal.def(self, '$take', $Lazy_take$35 = function $$take(n) { - var $$36, self = this, current_size = nil, set_size = nil, taken = nil; - - - n = $$($nesting, 'Opal').$coerce_to(n, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_lt(n, 0))) { - self.$raise($$($nesting, 'ArgumentError'), "attempt to take negative size")}; - current_size = self.$enumerator_size(); - set_size = (function() {if ($truthy($$($nesting, 'Integer')['$==='](current_size))) { - if ($truthy($rb_lt(n, current_size))) { - return n - } else { - return current_size - } - } else { - return current_size - }; return nil; })(); - taken = 0; - return $send($$($nesting, 'Lazy'), 'new', [self, set_size], ($$36 = function(enum$, $a){var self = $$36.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - if ($truthy($rb_lt(taken, n))) { - - $send(enum$, 'yield', Opal.to_a(args)); - return (taken = $rb_plus(taken, 1)); - } else { - return self.$raise($$($nesting, 'StopLazyError')) - };}, $$36.$$s = self, $$36.$$arity = -2, $$36)); - }, $Lazy_take$35.$$arity = 1); - - Opal.def(self, '$take_while', $Lazy_take_while$37 = function $$take_while() { - var $iter = $Lazy_take_while$37.$$p, block = $iter || nil, $$38, self = this; - - if ($iter) $Lazy_take_while$37.$$p = null; - - - if ($iter) $Lazy_take_while$37.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to call lazy take_while without a block") - }; - return $send($$($nesting, 'Lazy'), 'new', [self, nil], ($$38 = function(enum$, $a){var self = $$38.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - - var value = Opal.yieldX(block, args); - - if ($truthy(value)) { - $send(enum$, 'yield', Opal.to_a(args)); - } - else { - self.$raise($$($nesting, 'StopLazyError')); - } - ;}, $$38.$$s = self, $$38.$$arity = -2, $$38)); - }, $Lazy_take_while$37.$$arity = 0); - Opal.alias(self, "to_enum", "enum_for"); - return (Opal.def(self, '$inspect', $Lazy_inspect$39 = function $$inspect() { - var self = this; - - return "" + "#<" + (self.$class()) + ": " + (self.enumerator.$inspect()) + ">" - }, $Lazy_inspect$39.$$arity = 0), nil) && 'inspect'; - })($nesting[0], self, $nesting); - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/numeric"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_divide(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs / rhs : lhs['$/'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $hash2 = Opal.hash2; - - Opal.add_stubs(['$require', '$include', '$instance_of?', '$class', '$Float', '$respond_to?', '$coerce', '$__send__', '$===', '$raise', '$equal?', '$-', '$*', '$div', '$<', '$-@', '$ceil', '$to_f', '$denominator', '$to_r', '$==', '$floor', '$/', '$%', '$Complex', '$zero?', '$numerator', '$abs', '$arg', '$coerce_to!', '$round', '$to_i', '$truncate', '$>']); - - self.$require("corelib/comparable"); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Numeric'); - - var $nesting = [self].concat($parent_nesting), $Numeric_coerce$1, $Numeric___coerced__$2, $Numeric_$lt_eq_gt$3, $Numeric_$plus$$4, $Numeric_$minus$$5, $Numeric_$percent$6, $Numeric_abs$7, $Numeric_abs2$8, $Numeric_angle$9, $Numeric_ceil$10, $Numeric_conj$11, $Numeric_denominator$12, $Numeric_div$13, $Numeric_divmod$14, $Numeric_fdiv$15, $Numeric_floor$16, $Numeric_i$17, $Numeric_imag$18, $Numeric_integer$ques$19, $Numeric_nonzero$ques$20, $Numeric_numerator$21, $Numeric_polar$22, $Numeric_quo$23, $Numeric_real$24, $Numeric_real$ques$25, $Numeric_rect$26, $Numeric_round$27, $Numeric_to_c$28, $Numeric_to_int$29, $Numeric_truncate$30, $Numeric_zero$ques$31, $Numeric_positive$ques$32, $Numeric_negative$ques$33, $Numeric_dup$34, $Numeric_clone$35, $Numeric_finite$ques$36, $Numeric_infinite$ques$37; - - - self.$include($$($nesting, 'Comparable')); - - Opal.def(self, '$coerce', $Numeric_coerce$1 = function $$coerce(other) { - var self = this; - - - if ($truthy(other['$instance_of?'](self.$class()))) { - return [other, self]}; - return [self.$Float(other), self.$Float(self)]; - }, $Numeric_coerce$1.$$arity = 1); - - Opal.def(self, '$__coerced__', $Numeric___coerced__$2 = function $$__coerced__(method, other) { - var $a, $b, self = this, a = nil, b = nil, $case = nil; - - if ($truthy(other['$respond_to?']("coerce"))) { - - $b = other.$coerce(self), $a = Opal.to_ary($b), (a = ($a[0] == null ? nil : $a[0])), (b = ($a[1] == null ? nil : $a[1])), $b; - return a.$__send__(method, b); - } else { - return (function() {$case = method; - if ("+"['$===']($case) || "-"['$===']($case) || "*"['$===']($case) || "/"['$===']($case) || "%"['$===']($case) || "&"['$===']($case) || "|"['$===']($case) || "^"['$===']($case) || "**"['$===']($case)) {return self.$raise($$($nesting, 'TypeError'), "" + (other.$class()) + " can't be coerced into Numeric")} - else if (">"['$===']($case) || ">="['$===']($case) || "<"['$===']($case) || "<="['$===']($case) || "<=>"['$===']($case)) {return self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed")} - else { return nil }})() - } - }, $Numeric___coerced__$2.$$arity = 2); - - Opal.def(self, '$<=>', $Numeric_$lt_eq_gt$3 = function(other) { - var self = this; - - - if ($truthy(self['$equal?'](other))) { - return 0}; - return nil; - }, $Numeric_$lt_eq_gt$3.$$arity = 1); - - Opal.def(self, '$+@', $Numeric_$plus$$4 = function() { - var self = this; - - return self - }, $Numeric_$plus$$4.$$arity = 0); - - Opal.def(self, '$-@', $Numeric_$minus$$5 = function() { - var self = this; - - return $rb_minus(0, self) - }, $Numeric_$minus$$5.$$arity = 0); - - Opal.def(self, '$%', $Numeric_$percent$6 = function(other) { - var self = this; - - return $rb_minus(self, $rb_times(other, self.$div(other))) - }, $Numeric_$percent$6.$$arity = 1); - - Opal.def(self, '$abs', $Numeric_abs$7 = function $$abs() { - var self = this; - - if ($rb_lt(self, 0)) { - return self['$-@']() - } else { - return self - } - }, $Numeric_abs$7.$$arity = 0); - - Opal.def(self, '$abs2', $Numeric_abs2$8 = function $$abs2() { - var self = this; - - return $rb_times(self, self) - }, $Numeric_abs2$8.$$arity = 0); - - Opal.def(self, '$angle', $Numeric_angle$9 = function $$angle() { - var self = this; - - if ($rb_lt(self, 0)) { - return $$$($$($nesting, 'Math'), 'PI') - } else { - return 0 - } - }, $Numeric_angle$9.$$arity = 0); - Opal.alias(self, "arg", "angle"); - - Opal.def(self, '$ceil', $Numeric_ceil$10 = function $$ceil(ndigits) { - var self = this; - - - - if (ndigits == null) { - ndigits = 0; - }; - return self.$to_f().$ceil(ndigits); - }, $Numeric_ceil$10.$$arity = -1); - - Opal.def(self, '$conj', $Numeric_conj$11 = function $$conj() { - var self = this; - - return self - }, $Numeric_conj$11.$$arity = 0); - Opal.alias(self, "conjugate", "conj"); - - Opal.def(self, '$denominator', $Numeric_denominator$12 = function $$denominator() { - var self = this; - - return self.$to_r().$denominator() - }, $Numeric_denominator$12.$$arity = 0); - - Opal.def(self, '$div', $Numeric_div$13 = function $$div(other) { - var self = this; - - - if (other['$=='](0)) { - self.$raise($$($nesting, 'ZeroDivisionError'), "divided by o")}; - return $rb_divide(self, other).$floor(); - }, $Numeric_div$13.$$arity = 1); - - Opal.def(self, '$divmod', $Numeric_divmod$14 = function $$divmod(other) { - var self = this; - - return [self.$div(other), self['$%'](other)] - }, $Numeric_divmod$14.$$arity = 1); - - Opal.def(self, '$fdiv', $Numeric_fdiv$15 = function $$fdiv(other) { - var self = this; - - return $rb_divide(self.$to_f(), other) - }, $Numeric_fdiv$15.$$arity = 1); - - Opal.def(self, '$floor', $Numeric_floor$16 = function $$floor(ndigits) { - var self = this; - - - - if (ndigits == null) { - ndigits = 0; - }; - return self.$to_f().$floor(ndigits); - }, $Numeric_floor$16.$$arity = -1); - - Opal.def(self, '$i', $Numeric_i$17 = function $$i() { - var self = this; - - return self.$Complex(0, self) - }, $Numeric_i$17.$$arity = 0); - - Opal.def(self, '$imag', $Numeric_imag$18 = function $$imag() { - var self = this; - - return 0 - }, $Numeric_imag$18.$$arity = 0); - Opal.alias(self, "imaginary", "imag"); - - Opal.def(self, '$integer?', $Numeric_integer$ques$19 = function() { - var self = this; - - return false - }, $Numeric_integer$ques$19.$$arity = 0); - Opal.alias(self, "magnitude", "abs"); - Opal.alias(self, "modulo", "%"); - - Opal.def(self, '$nonzero?', $Numeric_nonzero$ques$20 = function() { - var self = this; - - if ($truthy(self['$zero?']())) { - return nil - } else { - return self - } - }, $Numeric_nonzero$ques$20.$$arity = 0); - - Opal.def(self, '$numerator', $Numeric_numerator$21 = function $$numerator() { - var self = this; - - return self.$to_r().$numerator() - }, $Numeric_numerator$21.$$arity = 0); - Opal.alias(self, "phase", "arg"); - - Opal.def(self, '$polar', $Numeric_polar$22 = function $$polar() { - var self = this; - - return [self.$abs(), self.$arg()] - }, $Numeric_polar$22.$$arity = 0); - - Opal.def(self, '$quo', $Numeric_quo$23 = function $$quo(other) { - var self = this; - - return $rb_divide($$($nesting, 'Opal')['$coerce_to!'](self, $$($nesting, 'Rational'), "to_r"), other) - }, $Numeric_quo$23.$$arity = 1); - - Opal.def(self, '$real', $Numeric_real$24 = function $$real() { - var self = this; - - return self - }, $Numeric_real$24.$$arity = 0); - - Opal.def(self, '$real?', $Numeric_real$ques$25 = function() { - var self = this; - - return true - }, $Numeric_real$ques$25.$$arity = 0); - - Opal.def(self, '$rect', $Numeric_rect$26 = function $$rect() { - var self = this; - - return [self, 0] - }, $Numeric_rect$26.$$arity = 0); - Opal.alias(self, "rectangular", "rect"); - - Opal.def(self, '$round', $Numeric_round$27 = function $$round(digits) { - var self = this; - - - ; - return self.$to_f().$round(digits); - }, $Numeric_round$27.$$arity = -1); - - Opal.def(self, '$to_c', $Numeric_to_c$28 = function $$to_c() { - var self = this; - - return self.$Complex(self, 0) - }, $Numeric_to_c$28.$$arity = 0); - - Opal.def(self, '$to_int', $Numeric_to_int$29 = function $$to_int() { - var self = this; - - return self.$to_i() - }, $Numeric_to_int$29.$$arity = 0); - - Opal.def(self, '$truncate', $Numeric_truncate$30 = function $$truncate(ndigits) { - var self = this; - - - - if (ndigits == null) { - ndigits = 0; - }; - return self.$to_f().$truncate(ndigits); - }, $Numeric_truncate$30.$$arity = -1); - - Opal.def(self, '$zero?', $Numeric_zero$ques$31 = function() { - var self = this; - - return self['$=='](0) - }, $Numeric_zero$ques$31.$$arity = 0); - - Opal.def(self, '$positive?', $Numeric_positive$ques$32 = function() { - var self = this; - - return $rb_gt(self, 0) - }, $Numeric_positive$ques$32.$$arity = 0); - - Opal.def(self, '$negative?', $Numeric_negative$ques$33 = function() { - var self = this; - - return $rb_lt(self, 0) - }, $Numeric_negative$ques$33.$$arity = 0); - - Opal.def(self, '$dup', $Numeric_dup$34 = function $$dup() { - var self = this; - - return self - }, $Numeric_dup$34.$$arity = 0); - - Opal.def(self, '$clone', $Numeric_clone$35 = function $$clone($kwargs) { - var freeze, self = this; - - - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - freeze = $kwargs.$$smap["freeze"]; - if (freeze == null) { - freeze = true - }; - return self; - }, $Numeric_clone$35.$$arity = -1); - - Opal.def(self, '$finite?', $Numeric_finite$ques$36 = function() { - var self = this; - - return true - }, $Numeric_finite$ques$36.$$arity = 0); - return (Opal.def(self, '$infinite?', $Numeric_infinite$ques$37 = function() { - var self = this; - - return nil - }, $Numeric_infinite$ques$37.$$arity = 0), nil) && 'infinite?'; - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/array"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - function $rb_ge(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $hash2 = Opal.hash2, $send = Opal.send, $gvars = Opal.gvars; - - Opal.add_stubs(['$require', '$include', '$to_a', '$warn', '$raise', '$replace', '$respond_to?', '$to_ary', '$coerce_to', '$coerce_to?', '$===', '$join', '$to_str', '$class', '$hash', '$<=>', '$==', '$object_id', '$inspect', '$enum_for', '$bsearch_index', '$to_proc', '$nil?', '$coerce_to!', '$>', '$*', '$enumerator_size', '$empty?', '$size', '$map', '$equal?', '$dup', '$each', '$[]', '$dig', '$eql?', '$length', '$begin', '$end', '$exclude_end?', '$flatten', '$__id__', '$to_s', '$new', '$max', '$min', '$!', '$>=', '$**', '$delete_if', '$reverse', '$rotate', '$rand', '$at', '$keep_if', '$shuffle!', '$<', '$sort', '$sort_by', '$!=', '$times', '$[]=', '$-', '$<<', '$values', '$is_a?', '$last', '$first', '$upto', '$reject', '$pristine', '$singleton_class']); - - self.$require("corelib/enumerable"); - self.$require("corelib/numeric"); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Array'); - - var $nesting = [self].concat($parent_nesting), $Array_$$$1, $Array_initialize$2, $Array_try_convert$3, $Array_$$4, $Array_$$5, $Array_$$6, $Array_$plus$7, $Array_$minus$8, $Array_$lt$lt$9, $Array_$lt_eq_gt$10, $Array_$eq_eq$11, $Array_$$$12, $Array_$$$eq$13, $Array_any$ques$14, $Array_assoc$15, $Array_at$16, $Array_bsearch_index$17, $Array_bsearch$18, $Array_cycle$19, $Array_clear$21, $Array_count$22, $Array_initialize_copy$23, $Array_collect$24, $Array_collect$excl$26, $Array_combination$28, $Array_repeated_combination$30, $Array_compact$32, $Array_compact$excl$33, $Array_concat$34, $Array_delete$37, $Array_delete_at$38, $Array_delete_if$39, $Array_dig$41, $Array_drop$42, $Array_dup$43, $Array_each$44, $Array_each_index$46, $Array_empty$ques$48, $Array_eql$ques$49, $Array_fetch$50, $Array_fill$51, $Array_first$52, $Array_flatten$53, $Array_flatten$excl$54, $Array_hash$55, $Array_include$ques$56, $Array_index$57, $Array_insert$58, $Array_inspect$59, $Array_join$60, $Array_keep_if$61, $Array_last$63, $Array_length$64, $Array_max$65, $Array_min$66, $Array_permutation$67, $Array_repeated_permutation$69, $Array_pop$71, $Array_product$72, $Array_push$73, $Array_rassoc$74, $Array_reject$75, $Array_reject$excl$77, $Array_replace$79, $Array_reverse$80, $Array_reverse$excl$81, $Array_reverse_each$82, $Array_rindex$84, $Array_rotate$85, $Array_rotate$excl$86, $Array_sample$89, $Array_select$90, $Array_select$excl$92, $Array_shift$94, $Array_shuffle$95, $Array_shuffle$excl$96, $Array_slice$excl$97, $Array_sort$98, $Array_sort$excl$99, $Array_sort_by$excl$100, $Array_take$102, $Array_take_while$103, $Array_to_a$104, $Array_to_h$105, $Array_transpose$106, $Array_uniq$109, $Array_uniq$excl$110, $Array_unshift$111, $Array_values_at$112, $Array_zip$115, $Array_inherited$116, $Array_instance_variables$117, $Array_pack$119; - - - self.$include($$($nesting, 'Enumerable')); - Opal.defineProperty(self.$$prototype, '$$is_array', true); - - // Recent versions of V8 (> 7.1) only use an optimized implementation when Array.prototype is unmodified. - // For instance, "array-splice.tq" has a "fast path" (ExtractFastJSArray, defined in "src/codegen/code-stub-assembler.cc") - // but it's only enabled when "IsPrototypeInitialArrayPrototype()" is true. - // - // Older versions of V8 were using relatively fast JS-with-extensions code even when Array.prototype is modified: - // https://github.com/v8/v8/blob/7.0.1/src/js/array.js#L599-L642 - // - // In short, Array operations are slow in recent versions of V8 when the Array.prototype has been tampered. - // So, when possible, we are using faster open-coded version to boost the performance. - - // As of V8 8.4, depending on the size of the array, this is up to ~25x times faster than Array#shift() - // Implementation is heavily inspired by: https://github.com/nodejs/node/blob/ba684805b6c0eded76e5cd89ee00328ac7a59365/lib/internal/util.js#L341-L347 - function shiftNoArg(list) { - var r = list[0]; - var index = 1; - var length = list.length; - for (; index < length; index++) { - list[index - 1] = list[index]; - } - list.pop(); - return r; - } - - function toArraySubclass(obj, klass) { - if (klass.$$name === Opal.Array) { - return obj; - } else { - return klass.$allocate().$replace((obj).$to_a()); - } - } - ; - Opal.defs(self, '$[]', $Array_$$$1 = function($a) { - var $post_args, objects, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - objects = $post_args;; - return toArraySubclass(objects, self);; - }, $Array_$$$1.$$arity = -1); - - Opal.def(self, '$initialize', $Array_initialize$2 = function $$initialize(size, obj) { - var $iter = $Array_initialize$2.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_initialize$2.$$p = null; - - - if ($iter) $Array_initialize$2.$$p = null;; - - if (size == null) { - size = nil; - }; - - if (obj == null) { - obj = nil; - }; - - if (obj !== nil && block !== nil) { - self.$warn("warning: block supersedes default value argument") - } - - if (size > $$$($$($nesting, 'Integer'), 'MAX')) { - self.$raise($$($nesting, 'ArgumentError'), "array size too big") - } - - if (arguments.length > 2) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (arguments.length) + " for 0..2)") - } - - if (arguments.length === 0) { - self.splice(0, self.length); - return self; - } - - if (arguments.length === 1) { - if (size.$$is_array) { - self.$replace(size.$to_a()) - return self; - } else if (size['$respond_to?']("to_ary")) { - self.$replace(size.$to_ary()) - return self; - } - } - - size = $$($nesting, 'Opal').$coerce_to(size, $$($nesting, 'Integer'), "to_int") - - if (size < 0) { - self.$raise($$($nesting, 'ArgumentError'), "negative array size") - } - - self.splice(0, self.length); - var i, value; - - if (block === nil) { - for (i = 0; i < size; i++) { - self.push(obj); - } - } - else { - for (i = 0, value; i < size; i++) { - value = block(i); - self[i] = value; - } - } - - return self; - ; - }, $Array_initialize$2.$$arity = -1); - Opal.defs(self, '$try_convert', $Array_try_convert$3 = function $$try_convert(obj) { - var self = this; - - return $$($nesting, 'Opal')['$coerce_to?'](obj, $$($nesting, 'Array'), "to_ary") - }, $Array_try_convert$3.$$arity = 1); - - Opal.def(self, '$&', $Array_$$4 = function(other) { - var self = this; - - - other = (function() {if ($truthy($$($nesting, 'Array')['$==='](other))) { - return other.$to_a() - } else { - return $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'Array'), "to_ary").$to_a() - }; return nil; })(); - - var result = [], hash = $hash2([], {}), i, length, item; - - for (i = 0, length = other.length; i < length; i++) { - Opal.hash_put(hash, other[i], true); - } - - for (i = 0, length = self.length; i < length; i++) { - item = self[i]; - if (Opal.hash_delete(hash, item) !== undefined) { - result.push(item); - } - } - - return result; - ; - }, $Array_$$4.$$arity = 1); - - Opal.def(self, '$|', $Array_$$5 = function(other) { - var self = this; - - - other = (function() {if ($truthy($$($nesting, 'Array')['$==='](other))) { - return other.$to_a() - } else { - return $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'Array'), "to_ary").$to_a() - }; return nil; })(); - - var hash = $hash2([], {}), i, length, item; - - for (i = 0, length = self.length; i < length; i++) { - Opal.hash_put(hash, self[i], true); - } - - for (i = 0, length = other.length; i < length; i++) { - Opal.hash_put(hash, other[i], true); - } - - return hash.$keys(); - ; - }, $Array_$$5.$$arity = 1); - - Opal.def(self, '$*', $Array_$$6 = function(other) { - var self = this; - - - if ($truthy(other['$respond_to?']("to_str"))) { - return self.$join(other.$to_str())}; - other = $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'Integer'), "to_int"); - if ($truthy(other < 0)) { - self.$raise($$($nesting, 'ArgumentError'), "negative argument")}; - - var result = [], - converted = self.$to_a(); - - for (var i = 0; i < other; i++) { - result = result.concat(converted); - } - - return toArraySubclass(result, self.$class()); - ; - }, $Array_$$6.$$arity = 1); - - Opal.def(self, '$+', $Array_$plus$7 = function(other) { - var self = this; - - - other = (function() {if ($truthy($$($nesting, 'Array')['$==='](other))) { - return other.$to_a() - } else { - return $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'Array'), "to_ary").$to_a() - }; return nil; })(); - return self.concat(other);; - }, $Array_$plus$7.$$arity = 1); - - Opal.def(self, '$-', $Array_$minus$8 = function(other) { - var self = this; - - - other = (function() {if ($truthy($$($nesting, 'Array')['$==='](other))) { - return other.$to_a() - } else { - return $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'Array'), "to_ary").$to_a() - }; return nil; })(); - if ($truthy(self.length === 0)) { - return []}; - if ($truthy(other.length === 0)) { - return self.slice()}; - - var result = [], hash = $hash2([], {}), i, length, item; - - for (i = 0, length = other.length; i < length; i++) { - Opal.hash_put(hash, other[i], true); - } - - for (i = 0, length = self.length; i < length; i++) { - item = self[i]; - if (Opal.hash_get(hash, item) === undefined) { - result.push(item); - } - } - - return result; - ; - }, $Array_$minus$8.$$arity = 1); - - Opal.def(self, '$<<', $Array_$lt$lt$9 = function(object) { - var self = this; - - - self.push(object); - return self; - }, $Array_$lt$lt$9.$$arity = 1); - - Opal.def(self, '$<=>', $Array_$lt_eq_gt$10 = function(other) { - var self = this; - - - if ($truthy($$($nesting, 'Array')['$==='](other))) { - other = other.$to_a() - } else if ($truthy(other['$respond_to?']("to_ary"))) { - other = other.$to_ary().$to_a() - } else { - return nil - }; - - if (self.$hash() === other.$hash()) { - return 0; - } - - var count = Math.min(self.length, other.length); - - for (var i = 0; i < count; i++) { - var tmp = (self[i])['$<=>'](other[i]); - - if (tmp !== 0) { - return tmp; - } - } - - return (self.length)['$<=>'](other.length); - ; - }, $Array_$lt_eq_gt$10.$$arity = 1); - - Opal.def(self, '$==', $Array_$eq_eq$11 = function(other) { - var self = this; - - - var recursed = {}; - - function _eqeq(array, other) { - var i, length, a, b; - - if (array === other) - return true; - - if (!other.$$is_array) { - if ($$($nesting, 'Opal')['$respond_to?'](other, "to_ary")) { - return (other)['$=='](array); - } else { - return false; - } - } - - if (array.$$constructor !== Array) - array = (array).$to_a(); - if (other.$$constructor !== Array) - other = (other).$to_a(); - - if (array.length !== other.length) { - return false; - } - - recursed[(array).$object_id()] = true; - - for (i = 0, length = array.length; i < length; i++) { - a = array[i]; - b = other[i]; - if (a.$$is_array) { - if (b.$$is_array && b.length !== a.length) { - return false; - } - if (!recursed.hasOwnProperty((a).$object_id())) { - if (!_eqeq(a, b)) { - return false; - } - } - } else { - if (!(a)['$=='](b)) { - return false; - } - } - } - - return true; - } - - return _eqeq(self, other); - - }, $Array_$eq_eq$11.$$arity = 1); - - function $array_slice_range(self, index) { - var size = self.length, - exclude, from, to, result; - - exclude = index.excl; - from = Opal.Opal.$coerce_to(index.begin, Opal.Integer, 'to_int'); - to = Opal.Opal.$coerce_to(index.end, Opal.Integer, 'to_int'); - - if (from < 0) { - from += size; - - if (from < 0) { - return nil; - } - } - - if (from > size) { - return nil; - } - - if (to < 0) { - to += size; - - if (to < 0) { - return []; - } - } - - if (!exclude) { - to += 1; - } - - result = self.slice(from, to); - return toArraySubclass(result, self.$class()); - } - - function $array_slice_index_length(self, index, length) { - var size = self.length, - exclude, from, to, result; - - index = Opal.Opal.$coerce_to(index, Opal.Integer, 'to_int'); - - if (index < 0) { - index += size; - - if (index < 0) { - return nil; - } - } - - if (length === undefined) { - if (index >= size || index < 0) { - return nil; - } - - return self[index]; - } - else { - length = Opal.Opal.$coerce_to(length, Opal.Integer, 'to_int'); - - if (length < 0 || index > size || index < 0) { - return nil; - } - - result = self.slice(index, index + length); - } - return toArraySubclass(result, self.$class()); - } - ; - - Opal.def(self, '$[]', $Array_$$$12 = function(index, length) { - var self = this; - - - ; - - if (index.$$is_range) { - return $array_slice_range(self, index); - } - else { - return $array_slice_index_length(self, index, length); - } - ; - }, $Array_$$$12.$$arity = -2); - - Opal.def(self, '$[]=', $Array_$$$eq$13 = function(index, value, extra) { - var self = this, data = nil, length = nil; - - - ; - var i, size = self.length;; - if ($truthy($$($nesting, 'Range')['$==='](index))) { - - data = (function() {if ($truthy($$($nesting, 'Array')['$==='](value))) { - return value.$to_a() - } else if ($truthy(value['$respond_to?']("to_ary"))) { - return value.$to_ary().$to_a() - } else { - return [value] - }; return nil; })(); - - var exclude = index.excl, - from = $$($nesting, 'Opal').$coerce_to(index.begin, $$($nesting, 'Integer'), "to_int"), - to = $$($nesting, 'Opal').$coerce_to(index.end, $$($nesting, 'Integer'), "to_int"); - - if (from < 0) { - from += size; - - if (from < 0) { - self.$raise($$($nesting, 'RangeError'), "" + (index.$inspect()) + " out of range"); - } - } - - if (to < 0) { - to += size; - } - - if (!exclude) { - to += 1; - } - - if (from > size) { - for (i = size; i < from; i++) { - self[i] = nil; - } - } - - if (to < 0) { - self.splice.apply(self, [from, 0].concat(data)); - } - else { - self.splice.apply(self, [from, to - from].concat(data)); - } - - return value; - ; - } else { - - if ($truthy(extra === undefined)) { - length = 1 - } else { - - length = value; - value = extra; - data = (function() {if ($truthy($$($nesting, 'Array')['$==='](value))) { - return value.$to_a() - } else if ($truthy(value['$respond_to?']("to_ary"))) { - return value.$to_ary().$to_a() - } else { - return [value] - }; return nil; })(); - }; - - var old; - - index = $$($nesting, 'Opal').$coerce_to(index, $$($nesting, 'Integer'), "to_int"); - length = $$($nesting, 'Opal').$coerce_to(length, $$($nesting, 'Integer'), "to_int"); - - if (index < 0) { - old = index; - index += size; - - if (index < 0) { - self.$raise($$($nesting, 'IndexError'), "" + "index " + (old) + " too small for array; minimum " + (-self.length)); - } - } - - if (length < 0) { - self.$raise($$($nesting, 'IndexError'), "" + "negative length (" + (length) + ")") - } - - if (index > size) { - for (i = size; i < index; i++) { - self[i] = nil; - } - } - - if (extra === undefined) { - self[index] = value; - } - else { - self.splice.apply(self, [index, length].concat(data)); - } - - return value; - ; - }; - }, $Array_$$$eq$13.$$arity = -3); - - Opal.def(self, '$any?', $Array_any$ques$14 = function(pattern) { - var $iter = $Array_any$ques$14.$$p, block = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Array_any$ques$14.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if ($iter) $Array_any$ques$14.$$p = null;; - ; - if (self.length === 0) return false; - return $send(self, Opal.find_super_dispatcher(self, 'any?', $Array_any$ques$14, false), $zuper, $iter); - }, $Array_any$ques$14.$$arity = -1); - - Opal.def(self, '$assoc', $Array_assoc$15 = function $$assoc(object) { - var self = this; - - - for (var i = 0, length = self.length, item; i < length; i++) { - if (item = self[i], item.length && (item[0])['$=='](object)) { - return item; - } - } - - return nil; - - }, $Array_assoc$15.$$arity = 1); - - Opal.def(self, '$at', $Array_at$16 = function $$at(index) { - var self = this; - - - index = $$($nesting, 'Opal').$coerce_to(index, $$($nesting, 'Integer'), "to_int"); - - if (index < 0) { - index += self.length; - } - - if (index < 0 || index >= self.length) { - return nil; - } - - return self[index]; - ; - }, $Array_at$16.$$arity = 1); - - Opal.def(self, '$bsearch_index', $Array_bsearch_index$17 = function $$bsearch_index() { - var $iter = $Array_bsearch_index$17.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_bsearch_index$17.$$p = null; - - - if ($iter) $Array_bsearch_index$17.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("bsearch_index") - }; - - var min = 0, - max = self.length, - mid, - val, - ret, - smaller = false, - satisfied = nil; - - while (min < max) { - mid = min + Math.floor((max - min) / 2); - val = self[mid]; - ret = Opal.yield1(block, val); - - if (ret === true) { - satisfied = mid; - smaller = true; - } - else if (ret === false || ret === nil) { - smaller = false; - } - else if (ret.$$is_number) { - if (ret === 0) { return mid; } - smaller = (ret < 0); - } - else { - self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + ((ret).$class()) + " (must be numeric, true, false or nil)") - } - - if (smaller) { max = mid; } else { min = mid + 1; } - } - - return satisfied; - ; - }, $Array_bsearch_index$17.$$arity = 0); - - Opal.def(self, '$bsearch', $Array_bsearch$18 = function $$bsearch() { - var $iter = $Array_bsearch$18.$$p, block = $iter || nil, self = this, index = nil; - - if ($iter) $Array_bsearch$18.$$p = null; - - - if ($iter) $Array_bsearch$18.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("bsearch") - }; - index = $send(self, 'bsearch_index', [], block.$to_proc()); - - if (index != null && index.$$is_number) { - return self[index]; - } else { - return index; - } - ; - }, $Array_bsearch$18.$$arity = 0); - - Opal.def(self, '$cycle', $Array_cycle$19 = function $$cycle(n) { - var $iter = $Array_cycle$19.$$p, block = $iter || nil, $$20, $a, self = this; - - if ($iter) $Array_cycle$19.$$p = null; - - - if ($iter) $Array_cycle$19.$$p = null;; - - if (n == null) { - n = nil; - }; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["cycle", n], ($$20 = function(){var self = $$20.$$s || this; - - if ($truthy(n['$nil?']())) { - return $$$($$($nesting, 'Float'), 'INFINITY') - } else { - - n = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_gt(n, 0))) { - return $rb_times(self.$enumerator_size(), n) - } else { - return 0 - }; - }}, $$20.$$s = self, $$20.$$arity = 0, $$20)) - }; - if ($truthy(($truthy($a = self['$empty?']()) ? $a : n['$=='](0)))) { - return nil}; - - var i, length, value; - - if (n === nil) { - while (true) { - for (i = 0, length = self.length; i < length; i++) { - value = Opal.yield1(block, self[i]); - } - } - } - else { - n = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int"); - if (n <= 0) { - return self; - } - - while (n > 0) { - for (i = 0, length = self.length; i < length; i++) { - value = Opal.yield1(block, self[i]); - } - - n--; - } - } - ; - return self; - }, $Array_cycle$19.$$arity = -1); - - Opal.def(self, '$clear', $Array_clear$21 = function $$clear() { - var self = this; - - - self.splice(0, self.length); - return self; - }, $Array_clear$21.$$arity = 0); - - Opal.def(self, '$count', $Array_count$22 = function $$count(object) { - var $iter = $Array_count$22.$$p, block = $iter || nil, $a, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Array_count$22.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if ($iter) $Array_count$22.$$p = null;; - - if (object == null) { - object = nil; - }; - if ($truthy(($truthy($a = object) ? $a : block))) { - return $send(self, Opal.find_super_dispatcher(self, 'count', $Array_count$22, false), $zuper, $iter) - } else { - return self.$size() - }; - }, $Array_count$22.$$arity = -1); - - Opal.def(self, '$initialize_copy', $Array_initialize_copy$23 = function $$initialize_copy(other) { - var self = this; - - return self.$replace(other) - }, $Array_initialize_copy$23.$$arity = 1); - - Opal.def(self, '$collect', $Array_collect$24 = function $$collect() { - var $iter = $Array_collect$24.$$p, block = $iter || nil, $$25, self = this; - - if ($iter) $Array_collect$24.$$p = null; - - - if ($iter) $Array_collect$24.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["collect"], ($$25 = function(){var self = $$25.$$s || this; - - return self.$size()}, $$25.$$s = self, $$25.$$arity = 0, $$25)) - }; - - var result = []; - - for (var i = 0, length = self.length; i < length; i++) { - var value = Opal.yield1(block, self[i]); - result.push(value); - } - - return result; - ; - }, $Array_collect$24.$$arity = 0); - - Opal.def(self, '$collect!', $Array_collect$excl$26 = function() { - var $iter = $Array_collect$excl$26.$$p, block = $iter || nil, $$27, self = this; - - if ($iter) $Array_collect$excl$26.$$p = null; - - - if ($iter) $Array_collect$excl$26.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["collect!"], ($$27 = function(){var self = $$27.$$s || this; - - return self.$size()}, $$27.$$s = self, $$27.$$arity = 0, $$27)) - }; - - for (var i = 0, length = self.length; i < length; i++) { - var value = Opal.yield1(block, self[i]); - self[i] = value; - } - ; - return self; - }, $Array_collect$excl$26.$$arity = 0); - - function binomial_coefficient(n, k) { - if (n === k || k === 0) { - return 1; - } - - if (k > 0 && n > k) { - return binomial_coefficient(n - 1, k - 1) + binomial_coefficient(n - 1, k); - } - - return 0; - } - ; - - Opal.def(self, '$combination', $Array_combination$28 = function $$combination(n) { - var $$29, $iter = $Array_combination$28.$$p, $yield = $iter || nil, self = this, num = nil; - - if ($iter) $Array_combination$28.$$p = null; - - num = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int"); - if (($yield !== nil)) { - } else { - return $send(self, 'enum_for', ["combination", num], ($$29 = function(){var self = $$29.$$s || this; - - return binomial_coefficient(self.length, num)}, $$29.$$s = self, $$29.$$arity = 0, $$29)) - }; - - var i, length, stack, chosen, lev, done, next; - - if (num === 0) { - Opal.yield1($yield, []) - } else if (num === 1) { - for (i = 0, length = self.length; i < length; i++) { - Opal.yield1($yield, [self[i]]) - } - } - else if (num === self.length) { - Opal.yield1($yield, self.slice()) - } - else if (num >= 0 && num < self.length) { - stack = []; - for (i = 0; i <= num + 1; i++) { - stack.push(0); - } - - chosen = []; - lev = 0; - done = false; - stack[0] = -1; - - while (!done) { - chosen[lev] = self[stack[lev+1]]; - while (lev < num - 1) { - lev++; - next = stack[lev+1] = stack[lev] + 1; - chosen[lev] = self[next]; - } - Opal.yield1($yield, chosen.slice()) - lev++; - do { - done = (lev === 0); - stack[lev]++; - lev--; - } while ( stack[lev+1] + num === self.length + lev + 1 ); - } - } - ; - return self; - }, $Array_combination$28.$$arity = 1); - - Opal.def(self, '$repeated_combination', $Array_repeated_combination$30 = function $$repeated_combination(n) { - var $$31, $iter = $Array_repeated_combination$30.$$p, $yield = $iter || nil, self = this, num = nil; - - if ($iter) $Array_repeated_combination$30.$$p = null; - - num = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int"); - if (($yield !== nil)) { - } else { - return $send(self, 'enum_for', ["repeated_combination", num], ($$31 = function(){var self = $$31.$$s || this; - - return binomial_coefficient(self.length + num - 1, num);}, $$31.$$s = self, $$31.$$arity = 0, $$31)) - }; - - function iterate(max, from, buffer, self) { - if (buffer.length == max) { - var copy = buffer.slice(); - Opal.yield1($yield, copy) - return; - } - for (var i = from; i < self.length; i++) { - buffer.push(self[i]); - iterate(max, i, buffer, self); - buffer.pop(); - } - } - - if (num >= 0) { - iterate(num, 0, [], self); - } - ; - return self; - }, $Array_repeated_combination$30.$$arity = 1); - - Opal.def(self, '$compact', $Array_compact$32 = function $$compact() { - var self = this; - - - var result = []; - - for (var i = 0, length = self.length, item; i < length; i++) { - if ((item = self[i]) !== nil) { - result.push(item); - } - } - - return result; - - }, $Array_compact$32.$$arity = 0); - - Opal.def(self, '$compact!', $Array_compact$excl$33 = function() { - var self = this; - - - var original = self.length; - - for (var i = 0, length = self.length; i < length; i++) { - if (self[i] === nil) { - self.splice(i, 1); - - length--; - i--; - } - } - - return self.length === original ? nil : self; - - }, $Array_compact$excl$33.$$arity = 0); - - Opal.def(self, '$concat', $Array_concat$34 = function $$concat($a) { - var $post_args, others, $$35, $$36, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - others = $post_args;; - others = $send(others, 'map', [], ($$35 = function(other){var self = $$35.$$s || this; - - - - if (other == null) { - other = nil; - }; - other = (function() {if ($truthy($$($nesting, 'Array')['$==='](other))) { - return other.$to_a() - } else { - return $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'Array'), "to_ary").$to_a() - }; return nil; })(); - if ($truthy(other['$equal?'](self))) { - other = other.$dup()}; - return other;}, $$35.$$s = self, $$35.$$arity = 1, $$35)); - $send(others, 'each', [], ($$36 = function(other){var self = $$36.$$s || this; - - - - if (other == null) { - other = nil; - }; - - for (var i = 0, length = other.length; i < length; i++) { - self.push(other[i]); - } - ;}, $$36.$$s = self, $$36.$$arity = 1, $$36)); - return self; - }, $Array_concat$34.$$arity = -1); - - Opal.def(self, '$delete', $Array_delete$37 = function(object) { - var $iter = $Array_delete$37.$$p, $yield = $iter || nil, self = this; - - if ($iter) $Array_delete$37.$$p = null; - - var original = self.length; - - for (var i = 0, length = original; i < length; i++) { - if ((self[i])['$=='](object)) { - self.splice(i, 1); - - length--; - i--; - } - } - - if (self.length === original) { - if (($yield !== nil)) { - return Opal.yieldX($yield, []); - } - return nil; - } - return object; - - }, $Array_delete$37.$$arity = 1); - - Opal.def(self, '$delete_at', $Array_delete_at$38 = function $$delete_at(index) { - var self = this; - - - index = $$($nesting, 'Opal').$coerce_to(index, $$($nesting, 'Integer'), "to_int"); - - if (index < 0) { - index += self.length; - } - - if (index < 0 || index >= self.length) { - return nil; - } - - var result = self[index]; - - self.splice(index, 1); - - return result; - - }, $Array_delete_at$38.$$arity = 1); - - Opal.def(self, '$delete_if', $Array_delete_if$39 = function $$delete_if() { - var $iter = $Array_delete_if$39.$$p, block = $iter || nil, $$40, self = this; - - if ($iter) $Array_delete_if$39.$$p = null; - - - if ($iter) $Array_delete_if$39.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["delete_if"], ($$40 = function(){var self = $$40.$$s || this; - - return self.$size()}, $$40.$$s = self, $$40.$$arity = 0, $$40)) - }; - - for (var i = 0, length = self.length, value; i < length; i++) { - value = block(self[i]); - - if (value !== false && value !== nil) { - self.splice(i, 1); - - length--; - i--; - } - } - ; - return self; - }, $Array_delete_if$39.$$arity = 0); - - Opal.def(self, '$dig', $Array_dig$41 = function $$dig(idx, $a) { - var $post_args, idxs, self = this, item = nil; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - idxs = $post_args;; - item = self['$[]'](idx); - - if (item === nil || idxs.length === 0) { - return item; - } - ; - if ($truthy(item['$respond_to?']("dig"))) { - } else { - self.$raise($$($nesting, 'TypeError'), "" + (item.$class()) + " does not have #dig method") - }; - return $send(item, 'dig', Opal.to_a(idxs)); - }, $Array_dig$41.$$arity = -2); - - Opal.def(self, '$drop', $Array_drop$42 = function $$drop(number) { - var self = this; - - - if (number < 0) { - self.$raise($$($nesting, 'ArgumentError')) - } - - return self.slice(number); - - }, $Array_drop$42.$$arity = 1); - - Opal.def(self, '$dup', $Array_dup$43 = function $$dup() { - var $iter = $Array_dup$43.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Array_dup$43.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if (self.$$class === Opal.Array && - self.$$class.$allocate.$$pristine && - self.$copy_instance_variables.$$pristine && - self.$initialize_dup.$$pristine) { - return self.slice(0); - } - ; - return $send(self, Opal.find_super_dispatcher(self, 'dup', $Array_dup$43, false), $zuper, $iter); - }, $Array_dup$43.$$arity = 0); - - Opal.def(self, '$each', $Array_each$44 = function $$each() { - var $iter = $Array_each$44.$$p, block = $iter || nil, $$45, self = this; - - if ($iter) $Array_each$44.$$p = null; - - - if ($iter) $Array_each$44.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["each"], ($$45 = function(){var self = $$45.$$s || this; - - return self.$size()}, $$45.$$s = self, $$45.$$arity = 0, $$45)) - }; - - for (var i = 0, length = self.length; i < length; i++) { - var value = Opal.yield1(block, self[i]); - } - ; - return self; - }, $Array_each$44.$$arity = 0); - - Opal.def(self, '$each_index', $Array_each_index$46 = function $$each_index() { - var $iter = $Array_each_index$46.$$p, block = $iter || nil, $$47, self = this; - - if ($iter) $Array_each_index$46.$$p = null; - - - if ($iter) $Array_each_index$46.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["each_index"], ($$47 = function(){var self = $$47.$$s || this; - - return self.$size()}, $$47.$$s = self, $$47.$$arity = 0, $$47)) - }; - - for (var i = 0, length = self.length; i < length; i++) { - var value = Opal.yield1(block, i); - } - ; - return self; - }, $Array_each_index$46.$$arity = 0); - - Opal.def(self, '$empty?', $Array_empty$ques$48 = function() { - var self = this; - - return self.length === 0; - }, $Array_empty$ques$48.$$arity = 0); - - Opal.def(self, '$eql?', $Array_eql$ques$49 = function(other) { - var self = this; - - - var recursed = {}; - - function _eql(array, other) { - var i, length, a, b; - - if (!other.$$is_array) { - return false; - } - - other = other.$to_a(); - - if (array.length !== other.length) { - return false; - } - - recursed[(array).$object_id()] = true; - - for (i = 0, length = array.length; i < length; i++) { - a = array[i]; - b = other[i]; - if (a.$$is_array) { - if (b.$$is_array && b.length !== a.length) { - return false; - } - if (!recursed.hasOwnProperty((a).$object_id())) { - if (!_eql(a, b)) { - return false; - } - } - } else { - if (!(a)['$eql?'](b)) { - return false; - } - } - } - - return true; - } - - return _eql(self, other); - - }, $Array_eql$ques$49.$$arity = 1); - - Opal.def(self, '$fetch', $Array_fetch$50 = function $$fetch(index, defaults) { - var $iter = $Array_fetch$50.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_fetch$50.$$p = null; - - - if ($iter) $Array_fetch$50.$$p = null;; - ; - - var original = index; - - index = $$($nesting, 'Opal').$coerce_to(index, $$($nesting, 'Integer'), "to_int"); - - if (index < 0) { - index += self.length; - } - - if (index >= 0 && index < self.length) { - return self[index]; - } - - if (block !== nil && defaults != null) { - self.$warn("warning: block supersedes default value argument") - } - - if (block !== nil) { - return block(original); - } - - if (defaults != null) { - return defaults; - } - - if (self.length === 0) { - self.$raise($$($nesting, 'IndexError'), "" + "index " + (original) + " outside of array bounds: 0...0") - } - else { - self.$raise($$($nesting, 'IndexError'), "" + "index " + (original) + " outside of array bounds: -" + (self.length) + "..." + (self.length)); - } - ; - }, $Array_fetch$50.$$arity = -2); - - Opal.def(self, '$fill', $Array_fill$51 = function $$fill($a) { - var $iter = $Array_fill$51.$$p, block = $iter || nil, $post_args, args, $b, $c, self = this, one = nil, two = nil, obj = nil, left = nil, right = nil; - - if ($iter) $Array_fill$51.$$p = null; - - - if ($iter) $Array_fill$51.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - var i, length, value;; - if ($truthy(block)) { - - if ($truthy(args.length > 2)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (args.$length()) + " for 0..2)")}; - $c = args, $b = Opal.to_ary($c), (one = ($b[0] == null ? nil : $b[0])), (two = ($b[1] == null ? nil : $b[1])), $c; - } else { - - if ($truthy(args.length == 0)) { - self.$raise($$($nesting, 'ArgumentError'), "wrong number of arguments (0 for 1..3)") - } else if ($truthy(args.length > 3)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (args.$length()) + " for 1..3)")}; - $c = args, $b = Opal.to_ary($c), (obj = ($b[0] == null ? nil : $b[0])), (one = ($b[1] == null ? nil : $b[1])), (two = ($b[2] == null ? nil : $b[2])), $c; - }; - if ($truthy($$($nesting, 'Range')['$==='](one))) { - - if ($truthy(two)) { - self.$raise($$($nesting, 'TypeError'), "length invalid with range")}; - left = $$($nesting, 'Opal').$coerce_to(one.$begin(), $$($nesting, 'Integer'), "to_int"); - if ($truthy(left < 0)) { - left += this.length}; - if ($truthy(left < 0)) { - self.$raise($$($nesting, 'RangeError'), "" + (one.$inspect()) + " out of range")}; - right = $$($nesting, 'Opal').$coerce_to(one.$end(), $$($nesting, 'Integer'), "to_int"); - if ($truthy(right < 0)) { - right += this.length}; - if ($truthy(one['$exclude_end?']())) { - } else { - right += 1 - }; - if ($truthy(right <= left)) { - return self}; - } else if ($truthy(one)) { - - left = $$($nesting, 'Opal').$coerce_to(one, $$($nesting, 'Integer'), "to_int"); - if ($truthy(left < 0)) { - left += this.length}; - if ($truthy(left < 0)) { - left = 0}; - if ($truthy(two)) { - - right = $$($nesting, 'Opal').$coerce_to(two, $$($nesting, 'Integer'), "to_int"); - if ($truthy(right == 0)) { - return self}; - right += left; - } else { - right = this.length - }; - } else { - - left = 0; - right = this.length; - }; - if ($truthy(left > this.length)) { - - for (i = this.length; i < right; i++) { - self[i] = nil; - } - }; - if ($truthy(right > this.length)) { - this.length = right}; - if ($truthy(block)) { - - for (length = this.length; left < right; left++) { - value = block(left); - self[left] = value; - } - - } else { - - for (length = this.length; left < right; left++) { - self[left] = obj; - } - - }; - return self; - }, $Array_fill$51.$$arity = -1); - - Opal.def(self, '$first', $Array_first$52 = function $$first(count) { - var self = this; - - - ; - - if (count == null) { - return self.length === 0 ? nil : self[0]; - } - - count = $$($nesting, 'Opal').$coerce_to(count, $$($nesting, 'Integer'), "to_int"); - - if (count < 0) { - self.$raise($$($nesting, 'ArgumentError'), "negative array size"); - } - - return self.slice(0, count); - ; - }, $Array_first$52.$$arity = -1); - - Opal.def(self, '$flatten', $Array_flatten$53 = function $$flatten(level) { - var self = this; - - - ; - - function _flatten(array, level) { - var result = [], - i, length, - item, ary; - - array = (array).$to_a(); - - for (i = 0, length = array.length; i < length; i++) { - item = array[i]; - - if (!$$($nesting, 'Opal')['$respond_to?'](item, "to_ary", true)) { - result.push(item); - continue; - } - - ary = (item).$to_ary(); - - if (ary === nil) { - result.push(item); - continue; - } - - if (!ary.$$is_array) { - self.$raise($$($nesting, 'TypeError')); - } - - if (ary === self) { - self.$raise($$($nesting, 'ArgumentError')); - } - - switch (level) { - case undefined: - result = result.concat(_flatten(ary)); - break; - case 0: - result.push(ary); - break; - default: - result.push.apply(result, _flatten(ary, level - 1)); - } - } - return result; - } - - if (level !== undefined) { - level = $$($nesting, 'Opal').$coerce_to(level, $$($nesting, 'Integer'), "to_int"); - } - - return toArraySubclass(_flatten(self, level), self.$class()); - ; - }, $Array_flatten$53.$$arity = -1); - - Opal.def(self, '$flatten!', $Array_flatten$excl$54 = function(level) { - var self = this; - - - ; - - var flattened = self.$flatten(level); - - if (self.length == flattened.length) { - for (var i = 0, length = self.length; i < length; i++) { - if (self[i] !== flattened[i]) { - break; - } - } - - if (i == length) { - return nil; - } - } - - self.$replace(flattened); - ; - return self; - }, $Array_flatten$excl$54.$$arity = -1); - - Opal.def(self, '$hash', $Array_hash$55 = function $$hash() { - var self = this; - - - var top = (Opal.hash_ids === undefined), - result = ['A'], - hash_id = self.$object_id(), - item, i, key; - - try { - if (top) { - Opal.hash_ids = Object.create(null); - } - - // return early for recursive structures - if (Opal.hash_ids[hash_id]) { - return 'self'; - } - - for (key in Opal.hash_ids) { - item = Opal.hash_ids[key]; - if (self['$eql?'](item)) { - return 'self'; - } - } - - Opal.hash_ids[hash_id] = self; - - for (i = 0; i < self.length; i++) { - item = self[i]; - result.push(item.$hash()); - } - - return result.join(','); - } finally { - if (top) { - Opal.hash_ids = undefined; - } - } - - }, $Array_hash$55.$$arity = 0); - - Opal.def(self, '$include?', $Array_include$ques$56 = function(member) { - var self = this; - - - for (var i = 0, length = self.length; i < length; i++) { - if ((self[i])['$=='](member)) { - return true; - } - } - - return false; - - }, $Array_include$ques$56.$$arity = 1); - - Opal.def(self, '$index', $Array_index$57 = function $$index(object) { - var $iter = $Array_index$57.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_index$57.$$p = null; - - - if ($iter) $Array_index$57.$$p = null;; - ; - - var i, length, value; - - if (object != null && block !== nil) { - self.$warn("warning: given block not used") - } - - if (object != null) { - for (i = 0, length = self.length; i < length; i++) { - if ((self[i])['$=='](object)) { - return i; - } - } - } - else if (block !== nil) { - for (i = 0, length = self.length; i < length; i++) { - value = block(self[i]); - - if (value !== false && value !== nil) { - return i; - } - } - } - else { - return self.$enum_for("index"); - } - - return nil; - ; - }, $Array_index$57.$$arity = -1); - - Opal.def(self, '$insert', $Array_insert$58 = function $$insert(index, $a) { - var $post_args, objects, self = this; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - objects = $post_args;; - - index = $$($nesting, 'Opal').$coerce_to(index, $$($nesting, 'Integer'), "to_int"); - - if (objects.length > 0) { - if (index < 0) { - index += self.length + 1; - - if (index < 0) { - self.$raise($$($nesting, 'IndexError'), "" + (index) + " is out of bounds"); - } - } - if (index > self.length) { - for (var i = self.length; i < index; i++) { - self.push(nil); - } - } - - self.splice.apply(self, [index, 0].concat(objects)); - } - ; - return self; - }, $Array_insert$58.$$arity = -2); - - Opal.def(self, '$inspect', $Array_inspect$59 = function $$inspect() { - var self = this; - - - var result = [], - id = self.$__id__(); - - for (var i = 0, length = self.length; i < length; i++) { - var item = self['$[]'](i); - - if ((item).$__id__() === id) { - result.push('[...]'); - } - else { - result.push((item).$inspect()); - } - } - - return '[' + result.join(', ') + ']'; - - }, $Array_inspect$59.$$arity = 0); - - Opal.def(self, '$join', $Array_join$60 = function $$join(sep) { - var self = this; - if ($gvars[","] == null) $gvars[","] = nil; - - - - if (sep == null) { - sep = nil; - }; - if ($truthy(self.length === 0)) { - return ""}; - if ($truthy(sep === nil)) { - sep = $gvars[","]}; - - var result = []; - var i, length, item, tmp; - - for (i = 0, length = self.length; i < length; i++) { - item = self[i]; - - if ($$($nesting, 'Opal')['$respond_to?'](item, "to_str")) { - tmp = (item).$to_str(); - - if (tmp !== nil) { - result.push((tmp).$to_s()); - - continue; - } - } - - if ($$($nesting, 'Opal')['$respond_to?'](item, "to_ary")) { - tmp = (item).$to_ary(); - - if (tmp === self) { - self.$raise($$($nesting, 'ArgumentError')); - } - - if (tmp !== nil) { - result.push((tmp).$join(sep)); - - continue; - } - } - - if ($$($nesting, 'Opal')['$respond_to?'](item, "to_s")) { - tmp = (item).$to_s(); - - if (tmp !== nil) { - result.push(tmp); - - continue; - } - } - - self.$raise($$($nesting, 'NoMethodError').$new("" + (Opal.inspect(item)) + " doesn't respond to #to_str, #to_ary or #to_s", "to_str")); - } - - if (sep === nil) { - return result.join(''); - } - else { - return result.join($$($nesting, 'Opal')['$coerce_to!'](sep, $$($nesting, 'String'), "to_str").$to_s()); - } - ; - }, $Array_join$60.$$arity = -1); - - Opal.def(self, '$keep_if', $Array_keep_if$61 = function $$keep_if() { - var $iter = $Array_keep_if$61.$$p, block = $iter || nil, $$62, self = this; - - if ($iter) $Array_keep_if$61.$$p = null; - - - if ($iter) $Array_keep_if$61.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["keep_if"], ($$62 = function(){var self = $$62.$$s || this; - - return self.$size()}, $$62.$$s = self, $$62.$$arity = 0, $$62)) - }; - - for (var i = 0, length = self.length, value; i < length; i++) { - value = block(self[i]); - - if (value === false || value === nil) { - self.splice(i, 1); - - length--; - i--; - } - } - ; - return self; - }, $Array_keep_if$61.$$arity = 0); - - Opal.def(self, '$last', $Array_last$63 = function $$last(count) { - var self = this; - - - ; - - if (count == null) { - return self.length === 0 ? nil : self[self.length - 1]; - } - - count = $$($nesting, 'Opal').$coerce_to(count, $$($nesting, 'Integer'), "to_int"); - - if (count < 0) { - self.$raise($$($nesting, 'ArgumentError'), "negative array size"); - } - - if (count > self.length) { - count = self.length; - } - - return self.slice(self.length - count, self.length); - ; - }, $Array_last$63.$$arity = -1); - - Opal.def(self, '$length', $Array_length$64 = function $$length() { - var self = this; - - return self.length; - }, $Array_length$64.$$arity = 0); - Opal.alias(self, "map", "collect"); - Opal.alias(self, "map!", "collect!"); - - Opal.def(self, '$max', $Array_max$65 = function $$max(n) { - var $iter = $Array_max$65.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_max$65.$$p = null; - - - if ($iter) $Array_max$65.$$p = null;; - ; - return $send(self.$each(), 'max', [n], block.$to_proc()); - }, $Array_max$65.$$arity = -1); - - Opal.def(self, '$min', $Array_min$66 = function $$min() { - var $iter = $Array_min$66.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_min$66.$$p = null; - - - if ($iter) $Array_min$66.$$p = null;; - return $send(self.$each(), 'min', [], block.$to_proc()); - }, $Array_min$66.$$arity = 0); - - // Returns the product of from, from-1, ..., from - how_many + 1. - function descending_factorial(from, how_many) { - var count = how_many >= 0 ? 1 : 0; - while (how_many) { - count *= from; - from--; - how_many--; - } - return count; - } - ; - - Opal.def(self, '$permutation', $Array_permutation$67 = function $$permutation(num) { - var $iter = $Array_permutation$67.$$p, block = $iter || nil, $$68, self = this, perm = nil, used = nil; - - if ($iter) $Array_permutation$67.$$p = null; - - - if ($iter) $Array_permutation$67.$$p = null;; - ; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["permutation", num], ($$68 = function(){var self = $$68.$$s || this; - - return descending_factorial(self.length, num === undefined ? self.length : num);}, $$68.$$s = self, $$68.$$arity = 0, $$68)) - }; - - var permute, offensive, output; - - if (num === undefined) { - num = self.length; - } - else { - num = $$($nesting, 'Opal').$coerce_to(num, $$($nesting, 'Integer'), "to_int") - } - - if (num < 0 || self.length < num) { - // no permutations, yield nothing - } - else if (num === 0) { - // exactly one permutation: the zero-length array - Opal.yield1(block, []) - } - else if (num === 1) { - // this is a special, easy case - for (var i = 0; i < self.length; i++) { - Opal.yield1(block, [self[i]]) - } - } - else { - // this is the general case - (perm = $$($nesting, 'Array').$new(num)); - (used = $$($nesting, 'Array').$new(self.length, false)); - - permute = function(num, perm, index, used, blk) { - self = this; - for(var i = 0; i < self.length; i++){ - if(used['$[]'](i)['$!']()) { - perm[index] = i; - if(index < num - 1) { - used[i] = true; - permute.call(self, num, perm, index + 1, used, blk); - used[i] = false; - } - else { - output = []; - for (var j = 0; j < perm.length; j++) { - output.push(self[perm[j]]); - } - Opal.yield1(blk, output); - } - } - } - } - - if ((block !== nil)) { - // offensive (both definitions) copy. - offensive = self.slice(); - permute.call(offensive, num, perm, 0, used, block); - } - else { - permute.call(self, num, perm, 0, used, block); - } - } - ; - return self; - }, $Array_permutation$67.$$arity = -1); - - Opal.def(self, '$repeated_permutation', $Array_repeated_permutation$69 = function $$repeated_permutation(n) { - var $$70, $iter = $Array_repeated_permutation$69.$$p, $yield = $iter || nil, self = this, num = nil; - - if ($iter) $Array_repeated_permutation$69.$$p = null; - - num = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int"); - if (($yield !== nil)) { - } else { - return $send(self, 'enum_for', ["repeated_permutation", num], ($$70 = function(){var self = $$70.$$s || this; - - if ($truthy($rb_ge(num, 0))) { - return self.$size()['$**'](num) - } else { - return 0 - }}, $$70.$$s = self, $$70.$$arity = 0, $$70)) - }; - - function iterate(max, buffer, self) { - if (buffer.length == max) { - var copy = buffer.slice(); - Opal.yield1($yield, copy) - return; - } - for (var i = 0; i < self.length; i++) { - buffer.push(self[i]); - iterate(max, buffer, self); - buffer.pop(); - } - } - - iterate(num, [], self.slice()); - ; - return self; - }, $Array_repeated_permutation$69.$$arity = 1); - - Opal.def(self, '$pop', $Array_pop$71 = function $$pop(count) { - var self = this; - - - ; - if ($truthy(count === undefined)) { - - if ($truthy(self.length === 0)) { - return nil}; - return self.pop();}; - count = $$($nesting, 'Opal').$coerce_to(count, $$($nesting, 'Integer'), "to_int"); - if ($truthy(count < 0)) { - self.$raise($$($nesting, 'ArgumentError'), "negative array size")}; - if ($truthy(self.length === 0)) { - return []}; - if ($truthy(count > self.length)) { - return self.splice(0, self.length); - } else { - return self.splice(self.length - count, self.length); - }; - }, $Array_pop$71.$$arity = -1); - - Opal.def(self, '$product', $Array_product$72 = function $$product($a) { - var $iter = $Array_product$72.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Array_product$72.$$p = null; - - - if ($iter) $Array_product$72.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - var result = (block !== nil) ? null : [], - n = args.length + 1, - counters = new Array(n), - lengths = new Array(n), - arrays = new Array(n), - i, m, subarray, len, resultlen = 1; - - arrays[0] = self; - for (i = 1; i < n; i++) { - arrays[i] = $$($nesting, 'Opal').$coerce_to(args[i - 1], $$($nesting, 'Array'), "to_ary"); - } - - for (i = 0; i < n; i++) { - len = arrays[i].length; - if (len === 0) { - return result || self; - } - resultlen *= len; - if (resultlen > 2147483647) { - self.$raise($$($nesting, 'RangeError'), "too big to product") - } - lengths[i] = len; - counters[i] = 0; - } - - outer_loop: for (;;) { - subarray = []; - for (i = 0; i < n; i++) { - subarray.push(arrays[i][counters[i]]); - } - if (result) { - result.push(subarray); - } else { - Opal.yield1(block, subarray) - } - m = n - 1; - counters[m]++; - while (counters[m] === lengths[m]) { - counters[m] = 0; - if (--m < 0) break outer_loop; - counters[m]++; - } - } - - return result || self; - ; - }, $Array_product$72.$$arity = -1); - - Opal.def(self, '$push', $Array_push$73 = function $$push($a) { - var $post_args, objects, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - objects = $post_args;; - - for (var i = 0, length = objects.length; i < length; i++) { - self.push(objects[i]); - } - ; - return self; - }, $Array_push$73.$$arity = -1); - Opal.alias(self, "append", "push"); - - Opal.def(self, '$rassoc', $Array_rassoc$74 = function $$rassoc(object) { - var self = this; - - - for (var i = 0, length = self.length, item; i < length; i++) { - item = self[i]; - - if (item.length && item[1] !== undefined) { - if ((item[1])['$=='](object)) { - return item; - } - } - } - - return nil; - - }, $Array_rassoc$74.$$arity = 1); - - Opal.def(self, '$reject', $Array_reject$75 = function $$reject() { - var $iter = $Array_reject$75.$$p, block = $iter || nil, $$76, self = this; - - if ($iter) $Array_reject$75.$$p = null; - - - if ($iter) $Array_reject$75.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["reject"], ($$76 = function(){var self = $$76.$$s || this; - - return self.$size()}, $$76.$$s = self, $$76.$$arity = 0, $$76)) - }; - - var result = []; - - for (var i = 0, length = self.length, value; i < length; i++) { - value = block(self[i]); - - if (value === false || value === nil) { - result.push(self[i]); - } - } - return result; - ; - }, $Array_reject$75.$$arity = 0); - - Opal.def(self, '$reject!', $Array_reject$excl$77 = function() { - var $iter = $Array_reject$excl$77.$$p, block = $iter || nil, $$78, self = this, original = nil; - - if ($iter) $Array_reject$excl$77.$$p = null; - - - if ($iter) $Array_reject$excl$77.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["reject!"], ($$78 = function(){var self = $$78.$$s || this; - - return self.$size()}, $$78.$$s = self, $$78.$$arity = 0, $$78)) - }; - original = self.$length(); - $send(self, 'delete_if', [], block.$to_proc()); - if (self.$length()['$=='](original)) { - return nil - } else { - return self - }; - }, $Array_reject$excl$77.$$arity = 0); - - Opal.def(self, '$replace', $Array_replace$79 = function $$replace(other) { - var self = this; - - - other = (function() {if ($truthy($$($nesting, 'Array')['$==='](other))) { - return other.$to_a() - } else { - return $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'Array'), "to_ary").$to_a() - }; return nil; })(); - - self.splice(0, self.length); - self.push.apply(self, other); - ; - return self; - }, $Array_replace$79.$$arity = 1); - - Opal.def(self, '$reverse', $Array_reverse$80 = function $$reverse() { - var self = this; - - return self.slice(0).reverse(); - }, $Array_reverse$80.$$arity = 0); - - Opal.def(self, '$reverse!', $Array_reverse$excl$81 = function() { - var self = this; - - return self.reverse(); - }, $Array_reverse$excl$81.$$arity = 0); - - Opal.def(self, '$reverse_each', $Array_reverse_each$82 = function $$reverse_each() { - var $iter = $Array_reverse_each$82.$$p, block = $iter || nil, $$83, self = this; - - if ($iter) $Array_reverse_each$82.$$p = null; - - - if ($iter) $Array_reverse_each$82.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["reverse_each"], ($$83 = function(){var self = $$83.$$s || this; - - return self.$size()}, $$83.$$s = self, $$83.$$arity = 0, $$83)) - }; - $send(self.$reverse(), 'each', [], block.$to_proc()); - return self; - }, $Array_reverse_each$82.$$arity = 0); - - Opal.def(self, '$rindex', $Array_rindex$84 = function $$rindex(object) { - var $iter = $Array_rindex$84.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_rindex$84.$$p = null; - - - if ($iter) $Array_rindex$84.$$p = null;; - ; - - var i, value; - - if (object != null && block !== nil) { - self.$warn("warning: given block not used") - } - - if (object != null) { - for (i = self.length - 1; i >= 0; i--) { - if (i >= self.length) { - break; - } - if ((self[i])['$=='](object)) { - return i; - } - } - } - else if (block !== nil) { - for (i = self.length - 1; i >= 0; i--) { - if (i >= self.length) { - break; - } - - value = block(self[i]); - - if (value !== false && value !== nil) { - return i; - } - } - } - else if (object == null) { - return self.$enum_for("rindex"); - } - - return nil; - ; - }, $Array_rindex$84.$$arity = -1); - - Opal.def(self, '$rotate', $Array_rotate$85 = function $$rotate(n) { - var self = this; - - - - if (n == null) { - n = 1; - }; - n = $$($nesting, 'Opal').$coerce_to(n, $$($nesting, 'Integer'), "to_int"); - - var ary, idx, firstPart, lastPart; - - if (self.length === 1) { - return self.slice(); - } - if (self.length === 0) { - return []; - } - - ary = self.slice(); - idx = n % ary.length; - - firstPart = ary.slice(idx); - lastPart = ary.slice(0, idx); - return firstPart.concat(lastPart); - ; - }, $Array_rotate$85.$$arity = -1); - - Opal.def(self, '$rotate!', $Array_rotate$excl$86 = function(cnt) { - var self = this, ary = nil; - - - - if (cnt == null) { - cnt = 1; - }; - - if (self.length === 0 || self.length === 1) { - return self; - } - ; - cnt = $$($nesting, 'Opal').$coerce_to(cnt, $$($nesting, 'Integer'), "to_int"); - ary = self.$rotate(cnt); - return self.$replace(ary); - }, $Array_rotate$excl$86.$$arity = -1); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'SampleRandom'); - - var $nesting = [self].concat($parent_nesting), $SampleRandom_initialize$87, $SampleRandom_rand$88; - - self.$$prototype.rng = nil; - - - Opal.def(self, '$initialize', $SampleRandom_initialize$87 = function $$initialize(rng) { - var self = this; - - return (self.rng = rng) - }, $SampleRandom_initialize$87.$$arity = 1); - return (Opal.def(self, '$rand', $SampleRandom_rand$88 = function $$rand(size) { - var self = this, random = nil; - - - random = $$($nesting, 'Opal').$coerce_to(self.rng.$rand(size), $$($nesting, 'Integer'), "to_int"); - if ($truthy(random < 0)) { - self.$raise($$($nesting, 'RangeError'), "random value must be >= 0")}; - if ($truthy(random < size)) { - } else { - self.$raise($$($nesting, 'RangeError'), "random value must be less than Array size") - }; - return random; - }, $SampleRandom_rand$88.$$arity = 1), nil) && 'rand'; - })($nesting[0], null, $nesting); - - Opal.def(self, '$sample', $Array_sample$89 = function $$sample(count, options) { - var $a, self = this, o = nil, rng = nil; - - - ; - ; - if ($truthy(count === undefined)) { - return self.$at($$($nesting, 'Kernel').$rand(self.length))}; - if ($truthy(options === undefined)) { - if ($truthy((o = $$($nesting, 'Opal')['$coerce_to?'](count, $$($nesting, 'Hash'), "to_hash")))) { - - options = o; - count = nil; - } else { - - options = nil; - count = $$($nesting, 'Opal').$coerce_to(count, $$($nesting, 'Integer'), "to_int"); - } - } else { - - count = $$($nesting, 'Opal').$coerce_to(count, $$($nesting, 'Integer'), "to_int"); - options = $$($nesting, 'Opal').$coerce_to(options, $$($nesting, 'Hash'), "to_hash"); - }; - if ($truthy(($truthy($a = count) ? count < 0 : $a))) { - self.$raise($$($nesting, 'ArgumentError'), "count must be greater than 0")}; - if ($truthy(options)) { - rng = options['$[]']("random")}; - rng = (function() {if ($truthy(($truthy($a = rng) ? rng['$respond_to?']("rand") : $a))) { - return $$($nesting, 'SampleRandom').$new(rng) - } else { - return $$($nesting, 'Kernel') - }; return nil; })(); - if ($truthy(count)) { - } else { - return self[rng.$rand(self.length)] - }; - - - var abandon, spin, result, i, j, k, targetIndex, oldValue; - - if (count > self.length) { - count = self.length; - } - - switch (count) { - case 0: - return []; - break; - case 1: - return [self[rng.$rand(self.length)]]; - break; - case 2: - i = rng.$rand(self.length); - j = rng.$rand(self.length); - if (i === j) { - j = i === 0 ? i + 1 : i - 1; - } - return [self[i], self[j]]; - break; - default: - if (self.length / count > 3) { - abandon = false; - spin = 0; - - result = $$($nesting, 'Array').$new(count); - i = 1; - - result[0] = rng.$rand(self.length); - while (i < count) { - k = rng.$rand(self.length); - j = 0; - - while (j < i) { - while (k === result[j]) { - spin++; - if (spin > 100) { - abandon = true; - break; - } - k = rng.$rand(self.length); - } - if (abandon) { break; } - - j++; - } - - if (abandon) { break; } - - result[i] = k; - - i++; - } - - if (!abandon) { - i = 0; - while (i < count) { - result[i] = self[result[i]]; - i++; - } - - return result; - } - } - - result = self.slice(); - - for (var c = 0; c < count; c++) { - targetIndex = rng.$rand(self.length); - oldValue = result[c]; - result[c] = result[targetIndex]; - result[targetIndex] = oldValue; - } - - return count === self.length ? result : (result)['$[]'](0, count); - } - ; - }, $Array_sample$89.$$arity = -1); - - Opal.def(self, '$select', $Array_select$90 = function $$select() { - var $iter = $Array_select$90.$$p, block = $iter || nil, $$91, self = this; - - if ($iter) $Array_select$90.$$p = null; - - - if ($iter) $Array_select$90.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["select"], ($$91 = function(){var self = $$91.$$s || this; - - return self.$size()}, $$91.$$s = self, $$91.$$arity = 0, $$91)) - }; - - var result = []; - - for (var i = 0, length = self.length, item, value; i < length; i++) { - item = self[i]; - - value = Opal.yield1(block, item); - - if (Opal.truthy(value)) { - result.push(item); - } - } - - return result; - ; - }, $Array_select$90.$$arity = 0); - - Opal.def(self, '$select!', $Array_select$excl$92 = function() { - var $iter = $Array_select$excl$92.$$p, block = $iter || nil, $$93, self = this; - - if ($iter) $Array_select$excl$92.$$p = null; - - - if ($iter) $Array_select$excl$92.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["select!"], ($$93 = function(){var self = $$93.$$s || this; - - return self.$size()}, $$93.$$s = self, $$93.$$arity = 0, $$93)) - }; - - var original = self.length; - $send(self, 'keep_if', [], block.$to_proc()); - return self.length === original ? nil : self; - ; - }, $Array_select$excl$92.$$arity = 0); - - Opal.def(self, '$shift', $Array_shift$94 = function $$shift(count) { - var self = this; - - - ; - if ($truthy(count === undefined)) { - - if ($truthy(self.length === 0)) { - return nil}; - return shiftNoArg(self);}; - count = $$($nesting, 'Opal').$coerce_to(count, $$($nesting, 'Integer'), "to_int"); - if ($truthy(count < 0)) { - self.$raise($$($nesting, 'ArgumentError'), "negative array size")}; - if ($truthy(self.length === 0)) { - return []}; - return self.splice(0, count);; - }, $Array_shift$94.$$arity = -1); - Opal.alias(self, "size", "length"); - - Opal.def(self, '$shuffle', $Array_shuffle$95 = function $$shuffle(rng) { - var self = this; - - - ; - return self.$dup().$to_a()['$shuffle!'](rng); - }, $Array_shuffle$95.$$arity = -1); - - Opal.def(self, '$shuffle!', $Array_shuffle$excl$96 = function(rng) { - var self = this; - - - ; - - var randgen, i = self.length, j, tmp; - - if (rng !== undefined) { - rng = $$($nesting, 'Opal')['$coerce_to?'](rng, $$($nesting, 'Hash'), "to_hash"); - - if (rng !== nil) { - rng = rng['$[]']("random"); - - if (rng !== nil && rng['$respond_to?']("rand")) { - randgen = rng; - } - } - } - - while (i) { - if (randgen) { - j = randgen.$rand(i).$to_int(); - - if (j < 0) { - self.$raise($$($nesting, 'RangeError'), "" + "random number too small " + (j)) - } - - if (j >= i) { - self.$raise($$($nesting, 'RangeError'), "" + "random number too big " + (j)) - } - } - else { - j = self.$rand(i); - } - - tmp = self[--i]; - self[i] = self[j]; - self[j] = tmp; - } - - return self; - ; - }, $Array_shuffle$excl$96.$$arity = -1); - Opal.alias(self, "slice", "[]"); - - Opal.def(self, '$slice!', $Array_slice$excl$97 = function(index, length) { - var self = this, result = nil, range = nil, range_start = nil, range_end = nil, start = nil; - - - ; - result = nil; - if ($truthy(length === undefined)) { - if ($truthy($$($nesting, 'Range')['$==='](index))) { - - range = index; - result = self['$[]'](range); - range_start = $$($nesting, 'Opal').$coerce_to(range.$begin(), $$($nesting, 'Integer'), "to_int"); - range_end = $$($nesting, 'Opal').$coerce_to(range.$end(), $$($nesting, 'Integer'), "to_int"); - - if (range_start < 0) { - range_start += self.length; - } - - if (range_end < 0) { - range_end += self.length; - } else if (range_end >= self.length) { - range_end = self.length - 1; - if (range.excl) { - range_end += 1; - } - } - - var range_length = range_end - range_start; - if (range.excl) { - range_end -= 1; - } else { - range_length += 1; - } - - if (range_start < self.length && range_start >= 0 && range_end < self.length && range_end >= 0 && range_length > 0) { - self.splice(range_start, range_length); - } - ; - } else { - - start = $$($nesting, 'Opal').$coerce_to(index, $$($nesting, 'Integer'), "to_int"); - - if (start < 0) { - start += self.length; - } - - if (start < 0 || start >= self.length) { - return nil; - } - - result = self[start]; - - if (start === 0) { - self.shift(); - } else { - self.splice(start, 1); - } - ; - } - } else { - - start = $$($nesting, 'Opal').$coerce_to(index, $$($nesting, 'Integer'), "to_int"); - length = $$($nesting, 'Opal').$coerce_to(length, $$($nesting, 'Integer'), "to_int"); - - if (length < 0) { - return nil; - } - - var end = start + length; - - result = self['$[]'](start, length); - - if (start < 0) { - start += self.length; - } - - if (start + length > self.length) { - length = self.length - start; - } - - if (start < self.length && start >= 0) { - self.splice(start, length); - } - ; - }; - return result; - }, $Array_slice$excl$97.$$arity = -2); - - Opal.def(self, '$sort', $Array_sort$98 = function $$sort() { - var $iter = $Array_sort$98.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_sort$98.$$p = null; - - - if ($iter) $Array_sort$98.$$p = null;; - if ($truthy(self.length > 1)) { - } else { - return self - }; - - if (block === nil) { - block = function(a, b) { - return (a)['$<=>'](b); - }; - } - - return self.slice().sort(function(x, y) { - var ret = block(x, y); - - if (ret === nil) { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + ((x).$inspect()) + " with " + ((y).$inspect()) + " failed"); - } - - return $rb_gt(ret, 0) ? 1 : ($rb_lt(ret, 0) ? -1 : 0); - }); - ; - }, $Array_sort$98.$$arity = 0); - - Opal.def(self, '$sort!', $Array_sort$excl$99 = function() { - var $iter = $Array_sort$excl$99.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_sort$excl$99.$$p = null; - - - if ($iter) $Array_sort$excl$99.$$p = null;; - - var result; - - if ((block !== nil)) { - result = $send((self.slice()), 'sort', [], block.$to_proc()); - } - else { - result = (self.slice()).$sort(); - } - - self.length = 0; - for(var i = 0, length = result.length; i < length; i++) { - self.push(result[i]); - } - - return self; - ; - }, $Array_sort$excl$99.$$arity = 0); - - Opal.def(self, '$sort_by!', $Array_sort_by$excl$100 = function() { - var $iter = $Array_sort_by$excl$100.$$p, block = $iter || nil, $$101, self = this; - - if ($iter) $Array_sort_by$excl$100.$$p = null; - - - if ($iter) $Array_sort_by$excl$100.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["sort_by!"], ($$101 = function(){var self = $$101.$$s || this; - - return self.$size()}, $$101.$$s = self, $$101.$$arity = 0, $$101)) - }; - return self.$replace($send(self, 'sort_by', [], block.$to_proc())); - }, $Array_sort_by$excl$100.$$arity = 0); - - Opal.def(self, '$take', $Array_take$102 = function $$take(count) { - var self = this; - - - if (count < 0) { - self.$raise($$($nesting, 'ArgumentError')); - } - - return self.slice(0, count); - - }, $Array_take$102.$$arity = 1); - - Opal.def(self, '$take_while', $Array_take_while$103 = function $$take_while() { - var $iter = $Array_take_while$103.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_take_while$103.$$p = null; - - - if ($iter) $Array_take_while$103.$$p = null;; - - var result = []; - - for (var i = 0, length = self.length, item, value; i < length; i++) { - item = self[i]; - - value = block(item); - - if (value === false || value === nil) { - return result; - } - - result.push(item); - } - - return result; - ; - }, $Array_take_while$103.$$arity = 0); - - Opal.def(self, '$to_a', $Array_to_a$104 = function $$to_a() { - var self = this; - - return self - }, $Array_to_a$104.$$arity = 0); - Opal.alias(self, "to_ary", "to_a"); - - Opal.def(self, '$to_h', $Array_to_h$105 = function $$to_h() { - var self = this; - - - var i, len = self.length, ary, key, val, hash = $hash2([], {}); - - for (i = 0; i < len; i++) { - ary = $$($nesting, 'Opal')['$coerce_to?'](self[i], $$($nesting, 'Array'), "to_ary"); - if (!ary.$$is_array) { - self.$raise($$($nesting, 'TypeError'), "" + "wrong element type " + ((ary).$class()) + " at " + (i) + " (expected array)") - } - if (ary.length !== 2) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong array length at " + (i) + " (expected 2, was " + ((ary).$length()) + ")") - } - key = ary[0]; - val = ary[1]; - Opal.hash_put(hash, key, val); - } - - return hash; - - }, $Array_to_h$105.$$arity = 0); - Opal.alias(self, "to_s", "inspect"); - - Opal.def(self, '$transpose', $Array_transpose$106 = function $$transpose() { - var $$107, self = this, result = nil, max = nil; - - - if ($truthy(self['$empty?']())) { - return []}; - result = []; - max = nil; - $send(self, 'each', [], ($$107 = function(row){var self = $$107.$$s || this, $a, $$108; - - - - if (row == null) { - row = nil; - }; - row = (function() {if ($truthy($$($nesting, 'Array')['$==='](row))) { - return row.$to_a() - } else { - return $$($nesting, 'Opal').$coerce_to(row, $$($nesting, 'Array'), "to_ary").$to_a() - }; return nil; })(); - max = ($truthy($a = max) ? $a : row.length); - if ($truthy((row.length)['$!='](max))) { - self.$raise($$($nesting, 'IndexError'), "" + "element size differs (" + (row.length) + " should be " + (max) + ")")}; - return $send((row.length), 'times', [], ($$108 = function(i){var self = $$108.$$s || this, $b, entry = nil, $writer = nil; - - - - if (i == null) { - i = nil; - }; - entry = ($truthy($b = result['$[]'](i)) ? $b : (($writer = [i, []]), $send(result, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - return entry['$<<'](row.$at(i));}, $$108.$$s = self, $$108.$$arity = 1, $$108));}, $$107.$$s = self, $$107.$$arity = 1, $$107)); - return result; - }, $Array_transpose$106.$$arity = 0); - - Opal.def(self, '$uniq', $Array_uniq$109 = function $$uniq() { - var $iter = $Array_uniq$109.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_uniq$109.$$p = null; - - - if ($iter) $Array_uniq$109.$$p = null;; - - var hash = $hash2([], {}), i, length, item, key; - - if (block === nil) { - for (i = 0, length = self.length; i < length; i++) { - item = self[i]; - if (Opal.hash_get(hash, item) === undefined) { - Opal.hash_put(hash, item, item); - } - } - } - else { - for (i = 0, length = self.length; i < length; i++) { - item = self[i]; - key = Opal.yield1(block, item); - if (Opal.hash_get(hash, key) === undefined) { - Opal.hash_put(hash, key, item); - } - } - } - - return toArraySubclass((hash).$values(), self.$class()); - ; - }, $Array_uniq$109.$$arity = 0); - - Opal.def(self, '$uniq!', $Array_uniq$excl$110 = function() { - var $iter = $Array_uniq$excl$110.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_uniq$excl$110.$$p = null; - - - if ($iter) $Array_uniq$excl$110.$$p = null;; - - var original_length = self.length, hash = $hash2([], {}), i, length, item, key; - - for (i = 0, length = original_length; i < length; i++) { - item = self[i]; - key = (block === nil ? item : Opal.yield1(block, item)); - - if (Opal.hash_get(hash, key) === undefined) { - Opal.hash_put(hash, key, item); - continue; - } - - self.splice(i, 1); - length--; - i--; - } - - return self.length === original_length ? nil : self; - ; - }, $Array_uniq$excl$110.$$arity = 0); - - Opal.def(self, '$unshift', $Array_unshift$111 = function $$unshift($a) { - var $post_args, objects, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - objects = $post_args;; - - for (var i = objects.length - 1; i >= 0; i--) { - self.unshift(objects[i]); - } - ; - return self; - }, $Array_unshift$111.$$arity = -1); - Opal.alias(self, "prepend", "unshift"); - - Opal.def(self, '$values_at', $Array_values_at$112 = function $$values_at($a) { - var $post_args, args, $$113, self = this, out = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - out = []; - $send(args, 'each', [], ($$113 = function(elem){var self = $$113.$$s || this, $$114, finish = nil, start = nil, i = nil; - - - - if (elem == null) { - elem = nil; - }; - if ($truthy(elem['$is_a?']($$($nesting, 'Range')))) { - - finish = $$($nesting, 'Opal').$coerce_to(elem.$last(), $$($nesting, 'Integer'), "to_int"); - start = $$($nesting, 'Opal').$coerce_to(elem.$first(), $$($nesting, 'Integer'), "to_int"); - - if (start < 0) { - start = start + self.length; - return nil;; - } - ; - - if (finish < 0) { - finish = finish + self.length; - } - if (elem['$exclude_end?']()) { - finish--; - } - if (finish < start) { - return nil;; - } - ; - return $send(start, 'upto', [finish], ($$114 = function(i){var self = $$114.$$s || this; - - - - if (i == null) { - i = nil; - }; - return out['$<<'](self.$at(i));}, $$114.$$s = self, $$114.$$arity = 1, $$114)); - } else { - - i = $$($nesting, 'Opal').$coerce_to(elem, $$($nesting, 'Integer'), "to_int"); - return out['$<<'](self.$at(i)); - };}, $$113.$$s = self, $$113.$$arity = 1, $$113)); - return out; - }, $Array_values_at$112.$$arity = -1); - - Opal.def(self, '$zip', $Array_zip$115 = function $$zip($a) { - var $iter = $Array_zip$115.$$p, block = $iter || nil, $post_args, others, $b, self = this; - - if ($iter) $Array_zip$115.$$p = null; - - - if ($iter) $Array_zip$115.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - others = $post_args;; - - var result = [], size = self.length, part, o, i, j, jj; - - for (j = 0, jj = others.length; j < jj; j++) { - o = others[j]; - if (o.$$is_array) { - continue; - } - if (o.$$is_enumerator) { - if (o.$size() === Infinity) { - others[j] = o.$take(size); - } else { - others[j] = o.$to_a(); - } - continue; - } - others[j] = ($truthy($b = $$($nesting, 'Opal')['$coerce_to?'](o, $$($nesting, 'Array'), "to_ary")) ? $b : $$($nesting, 'Opal')['$coerce_to!'](o, $$($nesting, 'Enumerator'), "each")).$to_a(); - } - - for (i = 0; i < size; i++) { - part = [self[i]]; - - for (j = 0, jj = others.length; j < jj; j++) { - o = others[j][i]; - - if (o == null) { - o = nil; - } - - part[j + 1] = o; - } - - result[i] = part; - } - - if (block !== nil) { - for (i = 0; i < size; i++) { - block(result[i]); - } - - return nil; - } - - return result; - ; - }, $Array_zip$115.$$arity = -1); - Opal.defs(self, '$inherited', $Array_inherited$116 = function $$inherited(klass) { - var self = this; - - - klass.$$prototype.$to_a = function() { - return this.slice(0, this.length); - } - - }, $Array_inherited$116.$$arity = 1); - - Opal.def(self, '$instance_variables', $Array_instance_variables$117 = function $$instance_variables() { - var $$118, $iter = $Array_instance_variables$117.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Array_instance_variables$117.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - return $send($send(self, Opal.find_super_dispatcher(self, 'instance_variables', $Array_instance_variables$117, false), $zuper, $iter), 'reject', [], ($$118 = function(ivar){var self = $$118.$$s || this, $a; - - - - if (ivar == null) { - ivar = nil; - }; - return ($truthy($a = /^@\d+$/.test(ivar)) ? $a : ivar['$==']("@length"));}, $$118.$$s = self, $$118.$$arity = 1, $$118)) - }, $Array_instance_variables$117.$$arity = 0); - $$($nesting, 'Opal').$pristine(self.$singleton_class(), "allocate"); - $$($nesting, 'Opal').$pristine(self, "copy_instance_variables", "initialize_dup"); - return (Opal.def(self, '$pack', $Array_pack$119 = function $$pack($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return self.$raise("To use Array#pack, you must first require 'corelib/array/pack'."); - }, $Array_pack$119.$$arity = -1), nil) && 'pack'; - })($nesting[0], Array, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/hash"] = function(Opal) { - function $rb_ge(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy; - - Opal.add_stubs(['$require', '$include', '$coerce_to?', '$[]', '$merge!', '$allocate', '$raise', '$coerce_to!', '$each', '$fetch', '$>=', '$>', '$==', '$compare_by_identity', '$lambda?', '$abs', '$arity', '$enum_for', '$size', '$respond_to?', '$class', '$dig', '$new', '$inspect', '$map', '$to_proc', '$flatten', '$eql?', '$default', '$dup', '$default_proc', '$default_proc=', '$-', '$default=', '$proc']); - - self.$require("corelib/enumerable"); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Hash'); - - var $nesting = [self].concat($parent_nesting), $Hash_$$$1, $Hash_allocate$2, $Hash_try_convert$3, $Hash_initialize$4, $Hash_$eq_eq$5, $Hash_$gt_eq$6, $Hash_$gt$8, $Hash_$lt$9, $Hash_$lt_eq$10, $Hash_$$$11, $Hash_$$$eq$12, $Hash_assoc$13, $Hash_clear$14, $Hash_clone$15, $Hash_compact$16, $Hash_compact$excl$17, $Hash_compare_by_identity$18, $Hash_compare_by_identity$ques$19, $Hash_default$20, $Hash_default$eq$21, $Hash_default_proc$22, $Hash_default_proc$eq$23, $Hash_delete$24, $Hash_delete_if$25, $Hash_dig$27, $Hash_each$28, $Hash_each_key$30, $Hash_each_value$32, $Hash_empty$ques$34, $Hash_fetch$35, $Hash_fetch_values$36, $Hash_flatten$38, $Hash_has_key$ques$39, $Hash_has_value$ques$40, $Hash_hash$41, $Hash_index$42, $Hash_indexes$43, $Hash_inspect$44, $Hash_invert$45, $Hash_keep_if$46, $Hash_keys$48, $Hash_length$49, $Hash_merge$50, $Hash_merge$excl$51, $Hash_rassoc$52, $Hash_rehash$53, $Hash_reject$54, $Hash_reject$excl$56, $Hash_replace$58, $Hash_select$59, $Hash_select$excl$61, $Hash_shift$63, $Hash_slice$64, $Hash_to_a$65, $Hash_to_h$66, $Hash_to_hash$67, $Hash_to_proc$68, $Hash_transform_keys$70, $Hash_transform_keys$excl$72, $Hash_transform_values$74, $Hash_transform_values$excl$76, $Hash_values$78; - - - self.$include($$($nesting, 'Enumerable')); - self.$$prototype.$$is_hash = true; - Opal.defs(self, '$[]', $Hash_$$$1 = function($a) { - var $post_args, argv, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - argv = $post_args;; - - var hash, argc = argv.length, i; - - if (argc === 1) { - hash = $$($nesting, 'Opal')['$coerce_to?'](argv['$[]'](0), $$($nesting, 'Hash'), "to_hash"); - if (hash !== nil) { - return self.$allocate()['$merge!'](hash); - } - - argv = $$($nesting, 'Opal')['$coerce_to?'](argv['$[]'](0), $$($nesting, 'Array'), "to_ary"); - if (argv === nil) { - self.$raise($$($nesting, 'ArgumentError'), "odd number of arguments for Hash") - } - - argc = argv.length; - hash = self.$allocate(); - - for (i = 0; i < argc; i++) { - if (!argv[i].$$is_array) continue; - switch(argv[i].length) { - case 1: - hash.$store(argv[i][0], nil); - break; - case 2: - hash.$store(argv[i][0], argv[i][1]); - break; - default: - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid number of elements (" + (argv[i].length) + " for 1..2)") - } - } - - return hash; - } - - if (argc % 2 !== 0) { - self.$raise($$($nesting, 'ArgumentError'), "odd number of arguments for Hash") - } - - hash = self.$allocate(); - - for (i = 0; i < argc; i += 2) { - hash.$store(argv[i], argv[i + 1]); - } - - return hash; - ; - }, $Hash_$$$1.$$arity = -1); - Opal.defs(self, '$allocate', $Hash_allocate$2 = function $$allocate() { - var self = this; - - - var hash = new self.$$constructor(); - - Opal.hash_init(hash); - - hash.$$none = nil; - hash.$$proc = nil; - - return hash; - - }, $Hash_allocate$2.$$arity = 0); - Opal.defs(self, '$try_convert', $Hash_try_convert$3 = function $$try_convert(obj) { - var self = this; - - return $$($nesting, 'Opal')['$coerce_to?'](obj, $$($nesting, 'Hash'), "to_hash") - }, $Hash_try_convert$3.$$arity = 1); - - Opal.def(self, '$initialize', $Hash_initialize$4 = function $$initialize(defaults) { - var $iter = $Hash_initialize$4.$$p, block = $iter || nil, self = this; - - if ($iter) $Hash_initialize$4.$$p = null; - - - if ($iter) $Hash_initialize$4.$$p = null;; - ; - - if (defaults !== undefined && block !== nil) { - self.$raise($$($nesting, 'ArgumentError'), "wrong number of arguments (1 for 0)") - } - self.$$none = (defaults === undefined ? nil : defaults); - self.$$proc = block; - - return self; - ; - }, $Hash_initialize$4.$$arity = -1); - - Opal.def(self, '$==', $Hash_$eq_eq$5 = function(other) { - var self = this; - - - if (self === other) { - return true; - } - - if (!other.$$is_hash) { - return false; - } - - if (self.$$keys.length !== other.$$keys.length) { - return false; - } - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, other_value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - other_value = other.$$smap[key]; - } else { - value = key.value; - other_value = Opal.hash_get(other, key.key); - } - - if (other_value === undefined || !value['$eql?'](other_value)) { - return false; - } - } - - return true; - - }, $Hash_$eq_eq$5.$$arity = 1); - - Opal.def(self, '$>=', $Hash_$gt_eq$6 = function(other) { - var $$7, self = this, result = nil; - - - other = $$($nesting, 'Opal')['$coerce_to!'](other, $$($nesting, 'Hash'), "to_hash"); - - if (self.$$keys.length < other.$$keys.length) { - return false - } - ; - result = true; - $send(other, 'each', [], ($$7 = function(other_key, other_val){var self = $$7.$$s || this, val = nil; - - - - if (other_key == null) { - other_key = nil; - }; - - if (other_val == null) { - other_val = nil; - }; - val = self.$fetch(other_key, null); - - if (val == null || val !== other_val) { - result = false; - return; - } - ;}, $$7.$$s = self, $$7.$$arity = 2, $$7)); - return result; - }, $Hash_$gt_eq$6.$$arity = 1); - - Opal.def(self, '$>', $Hash_$gt$8 = function(other) { - var self = this; - - - other = $$($nesting, 'Opal')['$coerce_to!'](other, $$($nesting, 'Hash'), "to_hash"); - - if (self.$$keys.length <= other.$$keys.length) { - return false - } - ; - return $rb_ge(self, other); - }, $Hash_$gt$8.$$arity = 1); - - Opal.def(self, '$<', $Hash_$lt$9 = function(other) { - var self = this; - - - other = $$($nesting, 'Opal')['$coerce_to!'](other, $$($nesting, 'Hash'), "to_hash"); - return $rb_gt(other, self); - }, $Hash_$lt$9.$$arity = 1); - - Opal.def(self, '$<=', $Hash_$lt_eq$10 = function(other) { - var self = this; - - - other = $$($nesting, 'Opal')['$coerce_to!'](other, $$($nesting, 'Hash'), "to_hash"); - return $rb_ge(other, self); - }, $Hash_$lt_eq$10.$$arity = 1); - - Opal.def(self, '$[]', $Hash_$$$11 = function(key) { - var self = this; - - - var value = Opal.hash_get(self, key); - - if (value !== undefined) { - return value; - } - - return self.$default(key); - - }, $Hash_$$$11.$$arity = 1); - - Opal.def(self, '$[]=', $Hash_$$$eq$12 = function(key, value) { - var self = this; - - - Opal.hash_put(self, key, value); - return value; - - }, $Hash_$$$eq$12.$$arity = 2); - - Opal.def(self, '$assoc', $Hash_assoc$13 = function $$assoc(object) { - var self = this; - - - for (var i = 0, keys = self.$$keys, length = keys.length, key; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - if ((key)['$=='](object)) { - return [key, self.$$smap[key]]; - } - } else { - if ((key.key)['$=='](object)) { - return [key.key, key.value]; - } - } - } - - return nil; - - }, $Hash_assoc$13.$$arity = 1); - - Opal.def(self, '$clear', $Hash_clear$14 = function $$clear() { - var self = this; - - - Opal.hash_init(self); - return self; - - }, $Hash_clear$14.$$arity = 0); - - Opal.def(self, '$clone', $Hash_clone$15 = function $$clone() { - var self = this; - - - var hash = new self.$$class(); - - Opal.hash_init(hash); - Opal.hash_clone(self, hash); - - return hash; - - }, $Hash_clone$15.$$arity = 0); - - Opal.def(self, '$compact', $Hash_compact$16 = function $$compact() { - var self = this; - - - var hash = Opal.hash(); - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, obj; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - if (value !== nil) { - Opal.hash_put(hash, key, value); - } - } - - return hash; - - }, $Hash_compact$16.$$arity = 0); - - Opal.def(self, '$compact!', $Hash_compact$excl$17 = function() { - var self = this; - - - var changes_were_made = false; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, obj; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - if (value === nil) { - if (Opal.hash_delete(self, key) !== undefined) { - changes_were_made = true; - length--; - i--; - } - } - } - - return changes_were_made ? self : nil; - - }, $Hash_compact$excl$17.$$arity = 0); - - Opal.def(self, '$compare_by_identity', $Hash_compare_by_identity$18 = function $$compare_by_identity() { - var self = this; - - - var i, ii, key, keys = self.$$keys, identity_hash; - - if (self.$$by_identity) return self; - if (self.$$keys.length === 0) { - self.$$by_identity = true - return self; - } - - identity_hash = $hash2([], {}).$compare_by_identity(); - for(i = 0, ii = keys.length; i < ii; i++) { - key = keys[i]; - if (!key.$$is_string) key = key.key; - Opal.hash_put(identity_hash, key, Opal.hash_get(self, key)); - } - - self.$$by_identity = true; - self.$$map = identity_hash.$$map; - self.$$smap = identity_hash.$$smap; - return self; - - }, $Hash_compare_by_identity$18.$$arity = 0); - - Opal.def(self, '$compare_by_identity?', $Hash_compare_by_identity$ques$19 = function() { - var self = this; - - return self.$$by_identity === true; - }, $Hash_compare_by_identity$ques$19.$$arity = 0); - - Opal.def(self, '$default', $Hash_default$20 = function(key) { - var self = this; - - - ; - - if (key !== undefined && self.$$proc !== nil && self.$$proc !== undefined) { - return self.$$proc.$call(self, key); - } - if (self.$$none === undefined) { - return nil; - } - return self.$$none; - ; - }, $Hash_default$20.$$arity = -1); - - Opal.def(self, '$default=', $Hash_default$eq$21 = function(object) { - var self = this; - - - self.$$proc = nil; - self.$$none = object; - - return object; - - }, $Hash_default$eq$21.$$arity = 1); - - Opal.def(self, '$default_proc', $Hash_default_proc$22 = function $$default_proc() { - var self = this; - - - if (self.$$proc !== undefined) { - return self.$$proc; - } - return nil; - - }, $Hash_default_proc$22.$$arity = 0); - - Opal.def(self, '$default_proc=', $Hash_default_proc$eq$23 = function(default_proc) { - var self = this; - - - var proc = default_proc; - - if (proc !== nil) { - proc = $$($nesting, 'Opal')['$coerce_to!'](proc, $$($nesting, 'Proc'), "to_proc"); - - if ((proc)['$lambda?']() && (proc).$arity().$abs() !== 2) { - self.$raise($$($nesting, 'TypeError'), "default_proc takes two arguments"); - } - } - - self.$$none = nil; - self.$$proc = proc; - - return default_proc; - - }, $Hash_default_proc$eq$23.$$arity = 1); - - Opal.def(self, '$delete', $Hash_delete$24 = function(key) { - var $iter = $Hash_delete$24.$$p, block = $iter || nil, self = this; - - if ($iter) $Hash_delete$24.$$p = null; - - - if ($iter) $Hash_delete$24.$$p = null;; - - var value = Opal.hash_delete(self, key); - - if (value !== undefined) { - return value; - } - - if (block !== nil) { - return Opal.yield1(block, key); - } - - return nil; - ; - }, $Hash_delete$24.$$arity = 1); - - Opal.def(self, '$delete_if', $Hash_delete_if$25 = function $$delete_if() { - var $iter = $Hash_delete_if$25.$$p, block = $iter || nil, $$26, self = this; - - if ($iter) $Hash_delete_if$25.$$p = null; - - - if ($iter) $Hash_delete_if$25.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["delete_if"], ($$26 = function(){var self = $$26.$$s || this; - - return self.$size()}, $$26.$$s = self, $$26.$$arity = 0, $$26)) - }; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, obj; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - obj = block(key, value); - - if (obj !== false && obj !== nil) { - if (Opal.hash_delete(self, key) !== undefined) { - length--; - i--; - } - } - } - - return self; - ; - }, $Hash_delete_if$25.$$arity = 0); - Opal.alias(self, "dup", "clone"); - - Opal.def(self, '$dig', $Hash_dig$27 = function $$dig(key, $a) { - var $post_args, keys, self = this, item = nil; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - keys = $post_args;; - item = self['$[]'](key); - - if (item === nil || keys.length === 0) { - return item; - } - ; - if ($truthy(item['$respond_to?']("dig"))) { - } else { - self.$raise($$($nesting, 'TypeError'), "" + (item.$class()) + " does not have #dig method") - }; - return $send(item, 'dig', Opal.to_a(keys)); - }, $Hash_dig$27.$$arity = -2); - - Opal.def(self, '$each', $Hash_each$28 = function $$each() { - var $iter = $Hash_each$28.$$p, block = $iter || nil, $$29, self = this; - - if ($iter) $Hash_each$28.$$p = null; - - - if ($iter) $Hash_each$28.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["each"], ($$29 = function(){var self = $$29.$$s || this; - - return self.$size()}, $$29.$$s = self, $$29.$$arity = 0, $$29)) - }; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - Opal.yield1(block, [key, value]); - } - - return self; - ; - }, $Hash_each$28.$$arity = 0); - - Opal.def(self, '$each_key', $Hash_each_key$30 = function $$each_key() { - var $iter = $Hash_each_key$30.$$p, block = $iter || nil, $$31, self = this; - - if ($iter) $Hash_each_key$30.$$p = null; - - - if ($iter) $Hash_each_key$30.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["each_key"], ($$31 = function(){var self = $$31.$$s || this; - - return self.$size()}, $$31.$$s = self, $$31.$$arity = 0, $$31)) - }; - - for (var i = 0, keys = self.$$keys, length = keys.length, key; i < length; i++) { - key = keys[i]; - - block(key.$$is_string ? key : key.key); - } - - return self; - ; - }, $Hash_each_key$30.$$arity = 0); - Opal.alias(self, "each_pair", "each"); - - Opal.def(self, '$each_value', $Hash_each_value$32 = function $$each_value() { - var $iter = $Hash_each_value$32.$$p, block = $iter || nil, $$33, self = this; - - if ($iter) $Hash_each_value$32.$$p = null; - - - if ($iter) $Hash_each_value$32.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["each_value"], ($$33 = function(){var self = $$33.$$s || this; - - return self.$size()}, $$33.$$s = self, $$33.$$arity = 0, $$33)) - }; - - for (var i = 0, keys = self.$$keys, length = keys.length, key; i < length; i++) { - key = keys[i]; - - block(key.$$is_string ? self.$$smap[key] : key.value); - } - - return self; - ; - }, $Hash_each_value$32.$$arity = 0); - - Opal.def(self, '$empty?', $Hash_empty$ques$34 = function() { - var self = this; - - return self.$$keys.length === 0; - }, $Hash_empty$ques$34.$$arity = 0); - Opal.alias(self, "eql?", "=="); - - Opal.def(self, '$fetch', $Hash_fetch$35 = function $$fetch(key, defaults) { - var $iter = $Hash_fetch$35.$$p, block = $iter || nil, self = this; - - if ($iter) $Hash_fetch$35.$$p = null; - - - if ($iter) $Hash_fetch$35.$$p = null;; - ; - - var value = Opal.hash_get(self, key); - - if (value !== undefined) { - return value; - } - - if (block !== nil) { - return block(key); - } - - if (defaults !== undefined) { - return defaults; - } - ; - return self.$raise($$($nesting, 'KeyError').$new("" + "key not found: " + (key.$inspect()), $hash2(["key", "receiver"], {"key": key, "receiver": self}))); - }, $Hash_fetch$35.$$arity = -2); - - Opal.def(self, '$fetch_values', $Hash_fetch_values$36 = function $$fetch_values($a) { - var $iter = $Hash_fetch_values$36.$$p, block = $iter || nil, $post_args, keys, $$37, self = this; - - if ($iter) $Hash_fetch_values$36.$$p = null; - - - if ($iter) $Hash_fetch_values$36.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - keys = $post_args;; - return $send(keys, 'map', [], ($$37 = function(key){var self = $$37.$$s || this; - - - - if (key == null) { - key = nil; - }; - return $send(self, 'fetch', [key], block.$to_proc());}, $$37.$$s = self, $$37.$$arity = 1, $$37)); - }, $Hash_fetch_values$36.$$arity = -1); - - Opal.def(self, '$flatten', $Hash_flatten$38 = function $$flatten(level) { - var self = this; - - - - if (level == null) { - level = 1; - }; - level = $$($nesting, 'Opal')['$coerce_to!'](level, $$($nesting, 'Integer'), "to_int"); - - var result = []; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - result.push(key); - - if (value.$$is_array) { - if (level === 1) { - result.push(value); - continue; - } - - result = result.concat((value).$flatten(level - 2)); - continue; - } - - result.push(value); - } - - return result; - ; - }, $Hash_flatten$38.$$arity = -1); - - Opal.def(self, '$has_key?', $Hash_has_key$ques$39 = function(key) { - var self = this; - - return Opal.hash_get(self, key) !== undefined; - }, $Hash_has_key$ques$39.$$arity = 1); - - Opal.def(self, '$has_value?', $Hash_has_value$ques$40 = function(value) { - var self = this; - - - for (var i = 0, keys = self.$$keys, length = keys.length, key; i < length; i++) { - key = keys[i]; - - if (((key.$$is_string ? self.$$smap[key] : key.value))['$=='](value)) { - return true; - } - } - - return false; - - }, $Hash_has_value$ques$40.$$arity = 1); - - Opal.def(self, '$hash', $Hash_hash$41 = function $$hash() { - var self = this; - - - var top = (Opal.hash_ids === undefined), - hash_id = self.$object_id(), - result = ['Hash'], - key, item; - - try { - if (top) { - Opal.hash_ids = Object.create(null); - } - - if (Opal[hash_id]) { - return 'self'; - } - - for (key in Opal.hash_ids) { - item = Opal.hash_ids[key]; - if (self['$eql?'](item)) { - return 'self'; - } - } - - Opal.hash_ids[hash_id] = self; - - for (var i = 0, keys = self.$$keys, length = keys.length; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - result.push([key, self.$$smap[key].$hash()]); - } else { - result.push([key.key_hash, key.value.$hash()]); - } - } - - return result.sort().join(); - - } finally { - if (top) { - Opal.hash_ids = undefined; - } - } - - }, $Hash_hash$41.$$arity = 0); - Opal.alias(self, "include?", "has_key?"); - - Opal.def(self, '$index', $Hash_index$42 = function $$index(object) { - var self = this; - - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - if ((value)['$=='](object)) { - return key; - } - } - - return nil; - - }, $Hash_index$42.$$arity = 1); - - Opal.def(self, '$indexes', $Hash_indexes$43 = function $$indexes($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - var result = []; - - for (var i = 0, length = args.length, key, value; i < length; i++) { - key = args[i]; - value = Opal.hash_get(self, key); - - if (value === undefined) { - result.push(self.$default()); - continue; - } - - result.push(value); - } - - return result; - ; - }, $Hash_indexes$43.$$arity = -1); - Opal.alias(self, "indices", "indexes"); - var inspect_ids; - - Opal.def(self, '$inspect', $Hash_inspect$44 = function $$inspect() { - var self = this; - - - var top = (inspect_ids === undefined), - hash_id = self.$object_id(), - result = []; - - try { - if (top) { - inspect_ids = {}; - } - - if (inspect_ids.hasOwnProperty(hash_id)) { - return '{...}'; - } - - inspect_ids[hash_id] = true; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - result.push(key.$inspect() + '=>' + value.$inspect()); - } - - return '{' + result.join(', ') + '}'; - - } finally { - if (top) { - inspect_ids = undefined; - } - } - - }, $Hash_inspect$44.$$arity = 0); - - Opal.def(self, '$invert', $Hash_invert$45 = function $$invert() { - var self = this; - - - var hash = Opal.hash(); - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - Opal.hash_put(hash, value, key); - } - - return hash; - - }, $Hash_invert$45.$$arity = 0); - - Opal.def(self, '$keep_if', $Hash_keep_if$46 = function $$keep_if() { - var $iter = $Hash_keep_if$46.$$p, block = $iter || nil, $$47, self = this; - - if ($iter) $Hash_keep_if$46.$$p = null; - - - if ($iter) $Hash_keep_if$46.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["keep_if"], ($$47 = function(){var self = $$47.$$s || this; - - return self.$size()}, $$47.$$s = self, $$47.$$arity = 0, $$47)) - }; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, obj; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - obj = block(key, value); - - if (obj === false || obj === nil) { - if (Opal.hash_delete(self, key) !== undefined) { - length--; - i--; - } - } - } - - return self; - ; - }, $Hash_keep_if$46.$$arity = 0); - Opal.alias(self, "key", "index"); - Opal.alias(self, "key?", "has_key?"); - - Opal.def(self, '$keys', $Hash_keys$48 = function $$keys() { - var self = this; - - - var result = []; - - for (var i = 0, keys = self.$$keys, length = keys.length, key; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - result.push(key); - } else { - result.push(key.key); - } - } - - return result; - - }, $Hash_keys$48.$$arity = 0); - - Opal.def(self, '$length', $Hash_length$49 = function $$length() { - var self = this; - - return self.$$keys.length; - }, $Hash_length$49.$$arity = 0); - Opal.alias(self, "member?", "has_key?"); - - Opal.def(self, '$merge', $Hash_merge$50 = function $$merge(other) { - var $iter = $Hash_merge$50.$$p, block = $iter || nil, self = this; - - if ($iter) $Hash_merge$50.$$p = null; - - - if ($iter) $Hash_merge$50.$$p = null;; - return $send(self.$dup(), 'merge!', [other], block.$to_proc()); - }, $Hash_merge$50.$$arity = 1); - - Opal.def(self, '$merge!', $Hash_merge$excl$51 = function(other) { - var $iter = $Hash_merge$excl$51.$$p, block = $iter || nil, self = this; - - if ($iter) $Hash_merge$excl$51.$$p = null; - - - if ($iter) $Hash_merge$excl$51.$$p = null;; - - if (!other.$$is_hash) { - other = $$($nesting, 'Opal')['$coerce_to!'](other, $$($nesting, 'Hash'), "to_hash"); - } - - var i, other_keys = other.$$keys, length = other_keys.length, key, value, other_value; - - if (block === nil) { - for (i = 0; i < length; i++) { - key = other_keys[i]; - - if (key.$$is_string) { - other_value = other.$$smap[key]; - } else { - other_value = key.value; - key = key.key; - } - - Opal.hash_put(self, key, other_value); - } - - return self; - } - - for (i = 0; i < length; i++) { - key = other_keys[i]; - - if (key.$$is_string) { - other_value = other.$$smap[key]; - } else { - other_value = key.value; - key = key.key; - } - - value = Opal.hash_get(self, key); - - if (value === undefined) { - Opal.hash_put(self, key, other_value); - continue; - } - - Opal.hash_put(self, key, block(key, value, other_value)); - } - - return self; - ; - }, $Hash_merge$excl$51.$$arity = 1); - - Opal.def(self, '$rassoc', $Hash_rassoc$52 = function $$rassoc(object) { - var self = this; - - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - if ((value)['$=='](object)) { - return [key, value]; - } - } - - return nil; - - }, $Hash_rassoc$52.$$arity = 1); - - Opal.def(self, '$rehash', $Hash_rehash$53 = function $$rehash() { - var self = this; - - - Opal.hash_rehash(self); - return self; - - }, $Hash_rehash$53.$$arity = 0); - - Opal.def(self, '$reject', $Hash_reject$54 = function $$reject() { - var $iter = $Hash_reject$54.$$p, block = $iter || nil, $$55, self = this; - - if ($iter) $Hash_reject$54.$$p = null; - - - if ($iter) $Hash_reject$54.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["reject"], ($$55 = function(){var self = $$55.$$s || this; - - return self.$size()}, $$55.$$s = self, $$55.$$arity = 0, $$55)) - }; - - var hash = Opal.hash(); - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, obj; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - obj = block(key, value); - - if (obj === false || obj === nil) { - Opal.hash_put(hash, key, value); - } - } - - return hash; - ; - }, $Hash_reject$54.$$arity = 0); - - Opal.def(self, '$reject!', $Hash_reject$excl$56 = function() { - var $iter = $Hash_reject$excl$56.$$p, block = $iter || nil, $$57, self = this; - - if ($iter) $Hash_reject$excl$56.$$p = null; - - - if ($iter) $Hash_reject$excl$56.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["reject!"], ($$57 = function(){var self = $$57.$$s || this; - - return self.$size()}, $$57.$$s = self, $$57.$$arity = 0, $$57)) - }; - - var changes_were_made = false; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, obj; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - obj = block(key, value); - - if (obj !== false && obj !== nil) { - if (Opal.hash_delete(self, key) !== undefined) { - changes_were_made = true; - length--; - i--; - } - } - } - - return changes_were_made ? self : nil; - ; - }, $Hash_reject$excl$56.$$arity = 0); - - Opal.def(self, '$replace', $Hash_replace$58 = function $$replace(other) { - var self = this, $writer = nil; - - - other = $$($nesting, 'Opal')['$coerce_to!'](other, $$($nesting, 'Hash'), "to_hash"); - - Opal.hash_init(self); - - for (var i = 0, other_keys = other.$$keys, length = other_keys.length, key, value, other_value; i < length; i++) { - key = other_keys[i]; - - if (key.$$is_string) { - other_value = other.$$smap[key]; - } else { - other_value = key.value; - key = key.key; - } - - Opal.hash_put(self, key, other_value); - } - ; - if ($truthy(other.$default_proc())) { - - $writer = [other.$default_proc()]; - $send(self, 'default_proc=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = [other.$default()]; - $send(self, 'default=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - return self; - }, $Hash_replace$58.$$arity = 1); - - Opal.def(self, '$select', $Hash_select$59 = function $$select() { - var $iter = $Hash_select$59.$$p, block = $iter || nil, $$60, self = this; - - if ($iter) $Hash_select$59.$$p = null; - - - if ($iter) $Hash_select$59.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["select"], ($$60 = function(){var self = $$60.$$s || this; - - return self.$size()}, $$60.$$s = self, $$60.$$arity = 0, $$60)) - }; - - var hash = Opal.hash(); - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, obj; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - obj = block(key, value); - - if (obj !== false && obj !== nil) { - Opal.hash_put(hash, key, value); - } - } - - return hash; - ; - }, $Hash_select$59.$$arity = 0); - - Opal.def(self, '$select!', $Hash_select$excl$61 = function() { - var $iter = $Hash_select$excl$61.$$p, block = $iter || nil, $$62, self = this; - - if ($iter) $Hash_select$excl$61.$$p = null; - - - if ($iter) $Hash_select$excl$61.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["select!"], ($$62 = function(){var self = $$62.$$s || this; - - return self.$size()}, $$62.$$s = self, $$62.$$arity = 0, $$62)) - }; - - var result = nil; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, obj; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - obj = block(key, value); - - if (obj === false || obj === nil) { - if (Opal.hash_delete(self, key) !== undefined) { - length--; - i--; - } - result = self; - } - } - - return result; - ; - }, $Hash_select$excl$61.$$arity = 0); - - Opal.def(self, '$shift', $Hash_shift$63 = function $$shift() { - var self = this; - - - var keys = self.$$keys, - key; - - if (keys.length > 0) { - key = keys[0]; - - key = key.$$is_string ? key : key.key; - - return [key, Opal.hash_delete(self, key)]; - } - - return self.$default(nil); - - }, $Hash_shift$63.$$arity = 0); - Opal.alias(self, "size", "length"); - - Opal.def(self, '$slice', $Hash_slice$64 = function $$slice($a) { - var $post_args, keys, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - keys = $post_args;; - - var result = Opal.hash(); - - for (var i = 0, length = keys.length; i < length; i++) { - var key = keys[i], value = Opal.hash_get(self, key); - - if (value !== undefined) { - Opal.hash_put(result, key, value); - } - } - - return result; - ; - }, $Hash_slice$64.$$arity = -1); - Opal.alias(self, "store", "[]="); - - Opal.def(self, '$to_a', $Hash_to_a$65 = function $$to_a() { - var self = this; - - - var result = []; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - result.push([key, value]); - } - - return result; - - }, $Hash_to_a$65.$$arity = 0); - - Opal.def(self, '$to_h', $Hash_to_h$66 = function $$to_h() { - var self = this; - - - if (self.$$class === Opal.Hash) { - return self; - } - - var hash = new Opal.Hash(); - - Opal.hash_init(hash); - Opal.hash_clone(self, hash); - - return hash; - - }, $Hash_to_h$66.$$arity = 0); - - Opal.def(self, '$to_hash', $Hash_to_hash$67 = function $$to_hash() { - var self = this; - - return self - }, $Hash_to_hash$67.$$arity = 0); - - Opal.def(self, '$to_proc', $Hash_to_proc$68 = function $$to_proc() { - var $$69, self = this; - - return $send(self, 'proc', [], ($$69 = function(key){var self = $$69.$$s || this; - - - ; - - if (key == null) { - self.$raise($$($nesting, 'ArgumentError'), "no key given") - } - ; - return self['$[]'](key);}, $$69.$$s = self, $$69.$$arity = -1, $$69)) - }, $Hash_to_proc$68.$$arity = 0); - Opal.alias(self, "to_s", "inspect"); - - Opal.def(self, '$transform_keys', $Hash_transform_keys$70 = function $$transform_keys() { - var $iter = $Hash_transform_keys$70.$$p, block = $iter || nil, $$71, self = this; - - if ($iter) $Hash_transform_keys$70.$$p = null; - - - if ($iter) $Hash_transform_keys$70.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["transform_keys"], ($$71 = function(){var self = $$71.$$s || this; - - return self.$size()}, $$71.$$s = self, $$71.$$arity = 0, $$71)) - }; - - var result = Opal.hash(); - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - key = Opal.yield1(block, key); - - Opal.hash_put(result, key, value); - } - - return result; - ; - }, $Hash_transform_keys$70.$$arity = 0); - - Opal.def(self, '$transform_keys!', $Hash_transform_keys$excl$72 = function() { - var $iter = $Hash_transform_keys$excl$72.$$p, block = $iter || nil, $$73, self = this; - - if ($iter) $Hash_transform_keys$excl$72.$$p = null; - - - if ($iter) $Hash_transform_keys$excl$72.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["transform_keys!"], ($$73 = function(){var self = $$73.$$s || this; - - return self.$size()}, $$73.$$s = self, $$73.$$arity = 0, $$73)) - }; - - var keys = Opal.slice.call(self.$$keys), - i, length = keys.length, key, value, new_key; - - for (i = 0; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - new_key = Opal.yield1(block, key); - - Opal.hash_delete(self, key); - Opal.hash_put(self, new_key, value); - } - - return self; - ; - }, $Hash_transform_keys$excl$72.$$arity = 0); - - Opal.def(self, '$transform_values', $Hash_transform_values$74 = function $$transform_values() { - var $iter = $Hash_transform_values$74.$$p, block = $iter || nil, $$75, self = this; - - if ($iter) $Hash_transform_values$74.$$p = null; - - - if ($iter) $Hash_transform_values$74.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["transform_values"], ($$75 = function(){var self = $$75.$$s || this; - - return self.$size()}, $$75.$$s = self, $$75.$$arity = 0, $$75)) - }; - - var result = Opal.hash(); - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - value = Opal.yield1(block, value); - - Opal.hash_put(result, key, value); - } - - return result; - ; - }, $Hash_transform_values$74.$$arity = 0); - - Opal.def(self, '$transform_values!', $Hash_transform_values$excl$76 = function() { - var $iter = $Hash_transform_values$excl$76.$$p, block = $iter || nil, $$77, self = this; - - if ($iter) $Hash_transform_values$excl$76.$$p = null; - - - if ($iter) $Hash_transform_values$excl$76.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["transform_values!"], ($$77 = function(){var self = $$77.$$s || this; - - return self.$size()}, $$77.$$s = self, $$77.$$arity = 0, $$77)) - }; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - value = Opal.yield1(block, value); - - Opal.hash_put(self, key, value); - } - - return self; - ; - }, $Hash_transform_values$excl$76.$$arity = 0); - Opal.alias(self, "update", "merge!"); - Opal.alias(self, "value?", "has_value?"); - Opal.alias(self, "values_at", "indexes"); - return (Opal.def(self, '$values', $Hash_values$78 = function $$values() { - var self = this; - - - var result = []; - - for (var i = 0, keys = self.$$keys, length = keys.length, key; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - result.push(self.$$smap[key]); - } else { - result.push(key.value); - } - } - - return result; - - }, $Hash_values$78.$$arity = 0), nil) && 'values'; - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/number"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_divide(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs / rhs : lhs['$/'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - function $rb_le(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); - } - function $rb_ge(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send, $hash2 = Opal.hash2; - - Opal.add_stubs(['$require', '$bridge', '$raise', '$name', '$class', '$Float', '$respond_to?', '$coerce_to!', '$__coerced__', '$===', '$!', '$>', '$**', '$new', '$<', '$to_f', '$==', '$nan?', '$infinite?', '$enum_for', '$+', '$-', '$gcd', '$lcm', '$%', '$/', '$frexp', '$to_i', '$ldexp', '$rationalize', '$*', '$<<', '$to_r', '$truncate', '$-@', '$size', '$<=', '$>=', '$<=>', '$compare', '$any?']); - - self.$require("corelib/numeric"); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Number'); - - var $nesting = [self].concat($parent_nesting), $Number_coerce$2, $Number___id__$3, $Number_$plus$4, $Number_$minus$5, $Number_$$6, $Number_$slash$7, $Number_$percent$8, $Number_$$9, $Number_$$10, $Number_$$11, $Number_$lt$12, $Number_$lt_eq$13, $Number_$gt$14, $Number_$gt_eq$15, $Number_$lt_eq_gt$16, $Number_$lt$lt$17, $Number_$gt$gt$18, $Number_$$$19, $Number_$plus$$20, $Number_$minus$$21, $Number_$$22, $Number_$$$23, $Number_$eq_eq_eq$24, $Number_$eq_eq$25, $Number_abs$26, $Number_abs2$27, $Number_allbits$ques$28, $Number_anybits$ques$29, $Number_angle$30, $Number_bit_length$31, $Number_ceil$32, $Number_chr$33, $Number_denominator$34, $Number_downto$35, $Number_equal$ques$37, $Number_even$ques$38, $Number_floor$39, $Number_gcd$40, $Number_gcdlcm$41, $Number_integer$ques$42, $Number_is_a$ques$43, $Number_instance_of$ques$44, $Number_lcm$45, $Number_next$46, $Number_nobits$ques$47, $Number_nonzero$ques$48, $Number_numerator$49, $Number_odd$ques$50, $Number_ord$51, $Number_pow$52, $Number_pred$53, $Number_quo$54, $Number_rationalize$55, $Number_remainder$56, $Number_round$57, $Number_step$58, $Number_times$60, $Number_to_f$62, $Number_to_i$63, $Number_to_r$64, $Number_to_s$65, $Number_truncate$66, $Number_digits$67, $Number_divmod$68, $Number_upto$69, $Number_zero$ques$71, $Number_size$72, $Number_nan$ques$73, $Number_finite$ques$74, $Number_infinite$ques$75, $Number_positive$ques$76, $Number_negative$ques$77; - - - $$($nesting, 'Opal').$bridge(Number, self); - Opal.defineProperty(self.$$prototype, '$$is_number', true); - self.$$is_number_class = true; - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $allocate$1; - - - - Opal.def(self, '$allocate', $allocate$1 = function $$allocate() { - var self = this; - - return self.$raise($$($nesting, 'TypeError'), "" + "allocator undefined for " + (self.$name())) - }, $allocate$1.$$arity = 0); - - - Opal.udef(self, '$' + "new");; - return nil;; - })(Opal.get_singleton_class(self), $nesting); - - Opal.def(self, '$coerce', $Number_coerce$2 = function $$coerce(other) { - var self = this; - - - if (other === nil) { - self.$raise($$($nesting, 'TypeError'), "" + "can't convert " + (other.$class()) + " into Float"); - } - else if (other.$$is_string) { - return [self.$Float(other), self]; - } - else if (other['$respond_to?']("to_f")) { - return [$$($nesting, 'Opal')['$coerce_to!'](other, $$($nesting, 'Float'), "to_f"), self]; - } - else if (other.$$is_number) { - return [other, self]; - } - else { - self.$raise($$($nesting, 'TypeError'), "" + "can't convert " + (other.$class()) + " into Float"); - } - - }, $Number_coerce$2.$$arity = 1); - - Opal.def(self, '$__id__', $Number___id__$3 = function $$__id__() { - var self = this; - - return (self * 2) + 1; - }, $Number___id__$3.$$arity = 0); - Opal.alias(self, "object_id", "__id__"); - - Opal.def(self, '$+', $Number_$plus$4 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self + other; - } - else { - return self.$__coerced__("+", other); - } - - }, $Number_$plus$4.$$arity = 1); - - Opal.def(self, '$-', $Number_$minus$5 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self - other; - } - else { - return self.$__coerced__("-", other); - } - - }, $Number_$minus$5.$$arity = 1); - - Opal.def(self, '$*', $Number_$$6 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self * other; - } - else { - return self.$__coerced__("*", other); - } - - }, $Number_$$6.$$arity = 1); - - Opal.def(self, '$/', $Number_$slash$7 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self / other; - } - else { - return self.$__coerced__("/", other); - } - - }, $Number_$slash$7.$$arity = 1); - Opal.alias(self, "fdiv", "/"); - - Opal.def(self, '$%', $Number_$percent$8 = function(other) { - var self = this; - - - if (other.$$is_number) { - if (other == -Infinity) { - return other; - } - else if (other == 0) { - self.$raise($$($nesting, 'ZeroDivisionError'), "divided by 0"); - } - else if (other < 0 || self < 0) { - return (self % other + other) % other; - } - else { - return self % other; - } - } - else { - return self.$__coerced__("%", other); - } - - }, $Number_$percent$8.$$arity = 1); - - Opal.def(self, '$&', $Number_$$9 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self & other; - } - else { - return self.$__coerced__("&", other); - } - - }, $Number_$$9.$$arity = 1); - - Opal.def(self, '$|', $Number_$$10 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self | other; - } - else { - return self.$__coerced__("|", other); - } - - }, $Number_$$10.$$arity = 1); - - Opal.def(self, '$^', $Number_$$11 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self ^ other; - } - else { - return self.$__coerced__("^", other); - } - - }, $Number_$$11.$$arity = 1); - - Opal.def(self, '$<', $Number_$lt$12 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self < other; - } - else { - return self.$__coerced__("<", other); - } - - }, $Number_$lt$12.$$arity = 1); - - Opal.def(self, '$<=', $Number_$lt_eq$13 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self <= other; - } - else { - return self.$__coerced__("<=", other); - } - - }, $Number_$lt_eq$13.$$arity = 1); - - Opal.def(self, '$>', $Number_$gt$14 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self > other; - } - else { - return self.$__coerced__(">", other); - } - - }, $Number_$gt$14.$$arity = 1); - - Opal.def(self, '$>=', $Number_$gt_eq$15 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self >= other; - } - else { - return self.$__coerced__(">=", other); - } - - }, $Number_$gt_eq$15.$$arity = 1); - - var spaceship_operator = function(self, other) { - if (other.$$is_number) { - if (isNaN(self) || isNaN(other)) { - return nil; - } - - if (self > other) { - return 1; - } else if (self < other) { - return -1; - } else { - return 0; - } - } - else { - return self.$__coerced__("<=>", other); - } - } - ; - - Opal.def(self, '$<=>', $Number_$lt_eq_gt$16 = function(other) { - var self = this; - - try { - return spaceship_operator(self, other); - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'ArgumentError')])) { - try { - return nil - } finally { Opal.pop_exception() } - } else { throw $err; } - } - }, $Number_$lt_eq_gt$16.$$arity = 1); - - Opal.def(self, '$<<', $Number_$lt$lt$17 = function(count) { - var self = this; - - - count = $$($nesting, 'Opal')['$coerce_to!'](count, $$($nesting, 'Integer'), "to_int"); - return count > 0 ? self << count : self >> -count; - }, $Number_$lt$lt$17.$$arity = 1); - - Opal.def(self, '$>>', $Number_$gt$gt$18 = function(count) { - var self = this; - - - count = $$($nesting, 'Opal')['$coerce_to!'](count, $$($nesting, 'Integer'), "to_int"); - return count > 0 ? self >> count : self << -count; - }, $Number_$gt$gt$18.$$arity = 1); - - Opal.def(self, '$[]', $Number_$$$19 = function(bit) { - var self = this; - - - bit = $$($nesting, 'Opal')['$coerce_to!'](bit, $$($nesting, 'Integer'), "to_int"); - - if (bit < 0) { - return 0; - } - if (bit >= 32) { - return self < 0 ? 1 : 0; - } - return (self >> bit) & 1; - ; - }, $Number_$$$19.$$arity = 1); - - Opal.def(self, '$+@', $Number_$plus$$20 = function() { - var self = this; - - return +self; - }, $Number_$plus$$20.$$arity = 0); - - Opal.def(self, '$-@', $Number_$minus$$21 = function() { - var self = this; - - return -self; - }, $Number_$minus$$21.$$arity = 0); - - Opal.def(self, '$~', $Number_$$22 = function() { - var self = this; - - return ~self; - }, $Number_$$22.$$arity = 0); - - Opal.def(self, '$**', $Number_$$$23 = function(other) { - var $a, $b, self = this; - - if ($truthy($$($nesting, 'Integer')['$==='](other))) { - if ($truthy(($truthy($a = $$($nesting, 'Integer')['$==='](self)['$!']()) ? $a : $rb_gt(other, 0)))) { - return Math.pow(self, other); - } else { - return $$($nesting, 'Rational').$new(self, 1)['$**'](other) - } - } else if ($truthy((($a = $rb_lt(self, 0)) ? ($truthy($b = $$($nesting, 'Float')['$==='](other)) ? $b : $$($nesting, 'Rational')['$==='](other)) : $rb_lt(self, 0)))) { - return $$($nesting, 'Complex').$new(self, 0)['$**'](other.$to_f()) - } else if ($truthy(other.$$is_number != null)) { - return Math.pow(self, other); - } else { - return self.$__coerced__("**", other) - } - }, $Number_$$$23.$$arity = 1); - - Opal.def(self, '$===', $Number_$eq_eq_eq$24 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self.valueOf() === other.valueOf(); - } - else if (other['$respond_to?']("==")) { - return other['$=='](self); - } - else { - return false; - } - - }, $Number_$eq_eq_eq$24.$$arity = 1); - - Opal.def(self, '$==', $Number_$eq_eq$25 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self.valueOf() === other.valueOf(); - } - else if (other['$respond_to?']("==")) { - return other['$=='](self); - } - else { - return false; - } - - }, $Number_$eq_eq$25.$$arity = 1); - - Opal.def(self, '$abs', $Number_abs$26 = function $$abs() { - var self = this; - - return Math.abs(self); - }, $Number_abs$26.$$arity = 0); - - Opal.def(self, '$abs2', $Number_abs2$27 = function $$abs2() { - var self = this; - - return Math.abs(self * self); - }, $Number_abs2$27.$$arity = 0); - - Opal.def(self, '$allbits?', $Number_allbits$ques$28 = function(mask) { - var self = this; - - - mask = $$($nesting, 'Opal')['$coerce_to!'](mask, $$($nesting, 'Integer'), "to_int"); - return (self & mask) == mask;; - }, $Number_allbits$ques$28.$$arity = 1); - - Opal.def(self, '$anybits?', $Number_anybits$ques$29 = function(mask) { - var self = this; - - - mask = $$($nesting, 'Opal')['$coerce_to!'](mask, $$($nesting, 'Integer'), "to_int"); - return (self & mask) !== 0;; - }, $Number_anybits$ques$29.$$arity = 1); - - Opal.def(self, '$angle', $Number_angle$30 = function $$angle() { - var self = this; - - - if ($truthy(self['$nan?']())) { - return self}; - - if (self == 0) { - if (1 / self > 0) { - return 0; - } - else { - return Math.PI; - } - } - else if (self < 0) { - return Math.PI; - } - else { - return 0; - } - ; - }, $Number_angle$30.$$arity = 0); - Opal.alias(self, "arg", "angle"); - Opal.alias(self, "phase", "angle"); - - Opal.def(self, '$bit_length', $Number_bit_length$31 = function $$bit_length() { - var self = this; - - - if ($truthy($$($nesting, 'Integer')['$==='](self))) { - } else { - self.$raise($$($nesting, 'NoMethodError').$new("" + "undefined method `bit_length` for " + (self) + ":Float", "bit_length")) - }; - - if (self === 0 || self === -1) { - return 0; - } - - var result = 0, - value = self < 0 ? ~self : self; - - while (value != 0) { - result += 1; - value >>>= 1; - } - - return result; - ; - }, $Number_bit_length$31.$$arity = 0); - - Opal.def(self, '$ceil', $Number_ceil$32 = function $$ceil(ndigits) { - var self = this; - - - - if (ndigits == null) { - ndigits = 0; - }; - - var f = self.$to_f(); - - if (f % 1 === 0 && ndigits >= 0) { - return f; - } - - var factor = Math.pow(10, ndigits), - result = Math.ceil(f * factor) / factor; - - if (f % 1 === 0) { - result = Math.round(result); - } - - return result; - ; - }, $Number_ceil$32.$$arity = -1); - - Opal.def(self, '$chr', $Number_chr$33 = function $$chr(encoding) { - var self = this; - - - ; - return String.fromCharCode(self);; - }, $Number_chr$33.$$arity = -1); - - Opal.def(self, '$denominator', $Number_denominator$34 = function $$denominator() { - var $a, $iter = $Number_denominator$34.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Number_denominator$34.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if ($truthy(($truthy($a = self['$nan?']()) ? $a : self['$infinite?']()))) { - return 1 - } else { - return $send(self, Opal.find_super_dispatcher(self, 'denominator', $Number_denominator$34, false), $zuper, $iter) - } - }, $Number_denominator$34.$$arity = 0); - - Opal.def(self, '$downto', $Number_downto$35 = function $$downto(stop) { - var $iter = $Number_downto$35.$$p, block = $iter || nil, $$36, self = this; - - if ($iter) $Number_downto$35.$$p = null; - - - if ($iter) $Number_downto$35.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["downto", stop], ($$36 = function(){var self = $$36.$$s || this; - - - if ($truthy($$($nesting, 'Numeric')['$==='](stop))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (stop.$class()) + " failed") - }; - if ($truthy($rb_gt(stop, self))) { - return 0 - } else { - return $rb_plus($rb_minus(self, stop), 1) - };}, $$36.$$s = self, $$36.$$arity = 0, $$36)) - }; - - if (!stop.$$is_number) { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (stop.$class()) + " failed") - } - for (var i = self; i >= stop; i--) { - block(i); - } - ; - return self; - }, $Number_downto$35.$$arity = 1); - Opal.alias(self, "eql?", "=="); - - Opal.def(self, '$equal?', $Number_equal$ques$37 = function(other) { - var $a, self = this; - - return ($truthy($a = self['$=='](other)) ? $a : isNaN(self) && isNaN(other)) - }, $Number_equal$ques$37.$$arity = 1); - - Opal.def(self, '$even?', $Number_even$ques$38 = function() { - var self = this; - - return self % 2 === 0; - }, $Number_even$ques$38.$$arity = 0); - - Opal.def(self, '$floor', $Number_floor$39 = function $$floor(ndigits) { - var self = this; - - - - if (ndigits == null) { - ndigits = 0; - }; - - var f = self.$to_f(); - - if (f % 1 === 0 && ndigits >= 0) { - return f; - } - - var factor = Math.pow(10, ndigits), - result = Math.floor(f * factor) / factor; - - if (f % 1 === 0) { - result = Math.round(result); - } - - return result; - ; - }, $Number_floor$39.$$arity = -1); - - Opal.def(self, '$gcd', $Number_gcd$40 = function $$gcd(other) { - var self = this; - - - if ($truthy($$($nesting, 'Integer')['$==='](other))) { - } else { - self.$raise($$($nesting, 'TypeError'), "not an integer") - }; - - var min = Math.abs(self), - max = Math.abs(other); - - while (min > 0) { - var tmp = min; - - min = max % min; - max = tmp; - } - - return max; - ; - }, $Number_gcd$40.$$arity = 1); - - Opal.def(self, '$gcdlcm', $Number_gcdlcm$41 = function $$gcdlcm(other) { - var self = this; - - return [self.$gcd(), self.$lcm()] - }, $Number_gcdlcm$41.$$arity = 1); - - Opal.def(self, '$integer?', $Number_integer$ques$42 = function() { - var self = this; - - return self % 1 === 0; - }, $Number_integer$ques$42.$$arity = 0); - - Opal.def(self, '$is_a?', $Number_is_a$ques$43 = function(klass) { - var $a, $iter = $Number_is_a$ques$43.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Number_is_a$ques$43.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - if ($truthy((($a = klass['$==']($$($nesting, 'Integer'))) ? $$($nesting, 'Integer')['$==='](self) : klass['$==']($$($nesting, 'Integer'))))) { - return true}; - if ($truthy((($a = klass['$==']($$($nesting, 'Integer'))) ? $$($nesting, 'Integer')['$==='](self) : klass['$==']($$($nesting, 'Integer'))))) { - return true}; - if ($truthy((($a = klass['$==']($$($nesting, 'Float'))) ? $$($nesting, 'Float')['$==='](self) : klass['$==']($$($nesting, 'Float'))))) { - return true}; - return $send(self, Opal.find_super_dispatcher(self, 'is_a?', $Number_is_a$ques$43, false), $zuper, $iter); - }, $Number_is_a$ques$43.$$arity = 1); - Opal.alias(self, "kind_of?", "is_a?"); - - Opal.def(self, '$instance_of?', $Number_instance_of$ques$44 = function(klass) { - var $a, $iter = $Number_instance_of$ques$44.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Number_instance_of$ques$44.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - if ($truthy((($a = klass['$==']($$($nesting, 'Integer'))) ? $$($nesting, 'Integer')['$==='](self) : klass['$==']($$($nesting, 'Integer'))))) { - return true}; - if ($truthy((($a = klass['$==']($$($nesting, 'Integer'))) ? $$($nesting, 'Integer')['$==='](self) : klass['$==']($$($nesting, 'Integer'))))) { - return true}; - if ($truthy((($a = klass['$==']($$($nesting, 'Float'))) ? $$($nesting, 'Float')['$==='](self) : klass['$==']($$($nesting, 'Float'))))) { - return true}; - return $send(self, Opal.find_super_dispatcher(self, 'instance_of?', $Number_instance_of$ques$44, false), $zuper, $iter); - }, $Number_instance_of$ques$44.$$arity = 1); - - Opal.def(self, '$lcm', $Number_lcm$45 = function $$lcm(other) { - var self = this; - - - if ($truthy($$($nesting, 'Integer')['$==='](other))) { - } else { - self.$raise($$($nesting, 'TypeError'), "not an integer") - }; - - if (self == 0 || other == 0) { - return 0; - } - else { - return Math.abs(self * other / self.$gcd(other)); - } - ; - }, $Number_lcm$45.$$arity = 1); - Opal.alias(self, "magnitude", "abs"); - Opal.alias(self, "modulo", "%"); - - Opal.def(self, '$next', $Number_next$46 = function $$next() { - var self = this; - - return self + 1; - }, $Number_next$46.$$arity = 0); - - Opal.def(self, '$nobits?', $Number_nobits$ques$47 = function(mask) { - var self = this; - - - mask = $$($nesting, 'Opal')['$coerce_to!'](mask, $$($nesting, 'Integer'), "to_int"); - return (self & mask) == 0;; - }, $Number_nobits$ques$47.$$arity = 1); - - Opal.def(self, '$nonzero?', $Number_nonzero$ques$48 = function() { - var self = this; - - return self == 0 ? nil : self; - }, $Number_nonzero$ques$48.$$arity = 0); - - Opal.def(self, '$numerator', $Number_numerator$49 = function $$numerator() { - var $a, $iter = $Number_numerator$49.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Number_numerator$49.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if ($truthy(($truthy($a = self['$nan?']()) ? $a : self['$infinite?']()))) { - return self - } else { - return $send(self, Opal.find_super_dispatcher(self, 'numerator', $Number_numerator$49, false), $zuper, $iter) - } - }, $Number_numerator$49.$$arity = 0); - - Opal.def(self, '$odd?', $Number_odd$ques$50 = function() { - var self = this; - - return self % 2 !== 0; - }, $Number_odd$ques$50.$$arity = 0); - - Opal.def(self, '$ord', $Number_ord$51 = function $$ord() { - var self = this; - - return self - }, $Number_ord$51.$$arity = 0); - - Opal.def(self, '$pow', $Number_pow$52 = function $$pow(b, m) { - var self = this; - - - ; - - if (self == 0) { - self.$raise($$($nesting, 'ZeroDivisionError'), "divided by 0") - } - - if (m === undefined) { - return self['$**'](b); - } else { - if (!($$($nesting, 'Integer')['$==='](b))) { - self.$raise($$($nesting, 'TypeError'), "Integer#pow() 2nd argument not allowed unless a 1st argument is integer") - } - - if (b < 0) { - self.$raise($$($nesting, 'TypeError'), "Integer#pow() 1st argument cannot be negative when 2nd argument specified") - } - - if (!($$($nesting, 'Integer')['$==='](m))) { - self.$raise($$($nesting, 'TypeError'), "Integer#pow() 2nd argument not allowed unless all arguments are integers") - } - - if (m === 0) { - self.$raise($$($nesting, 'ZeroDivisionError'), "divided by 0") - } - - return self['$**'](b)['$%'](m) - } - ; - }, $Number_pow$52.$$arity = -2); - - Opal.def(self, '$pred', $Number_pred$53 = function $$pred() { - var self = this; - - return self - 1; - }, $Number_pred$53.$$arity = 0); - - Opal.def(self, '$quo', $Number_quo$54 = function $$quo(other) { - var $iter = $Number_quo$54.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Number_quo$54.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if ($truthy($$($nesting, 'Integer')['$==='](self))) { - return $send(self, Opal.find_super_dispatcher(self, 'quo', $Number_quo$54, false), $zuper, $iter) - } else { - return $rb_divide(self, other) - } - }, $Number_quo$54.$$arity = 1); - - Opal.def(self, '$rationalize', $Number_rationalize$55 = function $$rationalize(eps) { - var $a, $b, self = this, f = nil, n = nil; - - - ; - - if (arguments.length > 1) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (arguments.length) + " for 0..1)"); - } - ; - if ($truthy($$($nesting, 'Integer')['$==='](self))) { - return $$($nesting, 'Rational').$new(self, 1) - } else if ($truthy(self['$infinite?']())) { - return self.$raise($$($nesting, 'FloatDomainError'), "Infinity") - } else if ($truthy(self['$nan?']())) { - return self.$raise($$($nesting, 'FloatDomainError'), "NaN") - } else if ($truthy(eps == null)) { - - $b = $$($nesting, 'Math').$frexp(self), $a = Opal.to_ary($b), (f = ($a[0] == null ? nil : $a[0])), (n = ($a[1] == null ? nil : $a[1])), $b; - f = $$($nesting, 'Math').$ldexp(f, $$$($$($nesting, 'Float'), 'MANT_DIG')).$to_i(); - n = $rb_minus(n, $$$($$($nesting, 'Float'), 'MANT_DIG')); - return $$($nesting, 'Rational').$new($rb_times(2, f), (1)['$<<']($rb_minus(1, n))).$rationalize($$($nesting, 'Rational').$new(1, (1)['$<<']($rb_minus(1, n)))); - } else { - return self.$to_r().$rationalize(eps) - }; - }, $Number_rationalize$55.$$arity = -1); - - Opal.def(self, '$remainder', $Number_remainder$56 = function $$remainder(y) { - var self = this; - - return $rb_minus(self, $rb_times(y, $rb_divide(self, y).$truncate())) - }, $Number_remainder$56.$$arity = 1); - - Opal.def(self, '$round', $Number_round$57 = function $$round(ndigits) { - var $a, $b, self = this, _ = nil, exp = nil; - - - ; - if ($truthy($$($nesting, 'Integer')['$==='](self))) { - - if ($truthy(ndigits == null)) { - return self}; - if ($truthy(($truthy($a = $$($nesting, 'Float')['$==='](ndigits)) ? ndigits['$infinite?']() : $a))) { - self.$raise($$($nesting, 'RangeError'), "Infinity")}; - ndigits = $$($nesting, 'Opal')['$coerce_to!'](ndigits, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_lt(ndigits, $$$($$($nesting, 'Integer'), 'MIN')))) { - self.$raise($$($nesting, 'RangeError'), "out of bounds")}; - if ($truthy(ndigits >= 0)) { - return self}; - ndigits = ndigits['$-@'](); - - if (0.415241 * ndigits - 0.125 > self.$size()) { - return 0; - } - - var f = Math.pow(10, ndigits), - x = Math.floor((Math.abs(x) + f / 2) / f) * f; - - return self < 0 ? -x : x; - ; - } else { - - if ($truthy(($truthy($a = self['$nan?']()) ? ndigits == null : $a))) { - self.$raise($$($nesting, 'FloatDomainError'), "NaN")}; - ndigits = $$($nesting, 'Opal')['$coerce_to!'](ndigits || 0, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_le(ndigits, 0))) { - if ($truthy(self['$nan?']())) { - self.$raise($$($nesting, 'RangeError'), "NaN") - } else if ($truthy(self['$infinite?']())) { - self.$raise($$($nesting, 'FloatDomainError'), "Infinity")} - } else if (ndigits['$=='](0)) { - return Math.round(self) - } else if ($truthy(($truthy($a = self['$nan?']()) ? $a : self['$infinite?']()))) { - return self}; - $b = $$($nesting, 'Math').$frexp(self), $a = Opal.to_ary($b), (_ = ($a[0] == null ? nil : $a[0])), (exp = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy($rb_ge(ndigits, $rb_minus($rb_plus($$$($$($nesting, 'Float'), 'DIG'), 2), (function() {if ($truthy($rb_gt(exp, 0))) { - return $rb_divide(exp, 4) - } else { - return $rb_minus($rb_divide(exp, 3), 1) - }; return nil; })())))) { - return self}; - if ($truthy($rb_lt(ndigits, (function() {if ($truthy($rb_gt(exp, 0))) { - return $rb_plus($rb_divide(exp, 3), 1) - } else { - return $rb_divide(exp, 4) - }; return nil; })()['$-@']()))) { - return 0}; - return Math.round(self * Math.pow(10, ndigits)) / Math.pow(10, ndigits);; - }; - }, $Number_round$57.$$arity = -1); - - Opal.def(self, '$step', $Number_step$58 = function $$step($a, $b, $c) { - var $iter = $Number_step$58.$$p, block = $iter || nil, $post_args, $kwargs, limit, step, to, by, $$59, self = this, positional_args = nil, keyword_args = nil; - - if ($iter) $Number_step$58.$$p = null; - - - if ($iter) $Number_step$58.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - $kwargs = Opal.extract_kwargs($post_args); - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - if ($post_args.length > 0) { - limit = $post_args[0]; - $post_args.splice(0, 1); - }; - - if ($post_args.length > 0) { - step = $post_args[0]; - $post_args.splice(0, 1); - }; - - to = $kwargs.$$smap["to"];; - - by = $kwargs.$$smap["by"];; - - if (limit !== undefined && to !== undefined) { - self.$raise($$($nesting, 'ArgumentError'), "to is given twice") - } - - if (step !== undefined && by !== undefined) { - self.$raise($$($nesting, 'ArgumentError'), "step is given twice") - } - - function validateParameters() { - if (to !== undefined) { - limit = to; - } - - if (limit === undefined) { - limit = nil; - } - - if (step === nil) { - self.$raise($$($nesting, 'TypeError'), "step must be numeric") - } - - if (step === 0) { - self.$raise($$($nesting, 'ArgumentError'), "step can't be 0") - } - - if (by !== undefined) { - step = by; - } - - if (step === nil || step == null) { - step = 1; - } - - var sign = step['$<=>'](0); - - if (sign === nil) { - self.$raise($$($nesting, 'ArgumentError'), "" + "0 can't be coerced into " + (step.$class())) - } - - if (limit === nil || limit == null) { - limit = sign > 0 ? $$$($$($nesting, 'Float'), 'INFINITY') : $$$($$($nesting, 'Float'), 'INFINITY')['$-@'](); - } - - $$($nesting, 'Opal').$compare(self, limit) - } - - function stepFloatSize() { - if ((step > 0 && self > limit) || (step < 0 && self < limit)) { - return 0; - } else if (step === Infinity || step === -Infinity) { - return 1; - } else { - var abs = Math.abs, floor = Math.floor, - err = (abs(self) + abs(limit) + abs(limit - self)) / abs(step) * $$$($$($nesting, 'Float'), 'EPSILON'); - - if (err === Infinity || err === -Infinity) { - return 0; - } else { - if (err > 0.5) { - err = 0.5; - } - - return floor((limit - self) / step + err) + 1 - } - } - } - - function stepSize() { - validateParameters(); - - if (step === 0) { - return Infinity; - } - - if (step % 1 !== 0) { - return stepFloatSize(); - } else if ((step > 0 && self > limit) || (step < 0 && self < limit)) { - return 0; - } else { - var ceil = Math.ceil, abs = Math.abs, - lhs = abs(self - limit) + 1, - rhs = abs(step); - - return ceil(lhs / rhs); - } - } - ; - if ((block !== nil)) { - } else { - - positional_args = []; - keyword_args = $hash2([], {}); - - if (limit !== undefined) { - positional_args.push(limit); - } - - if (step !== undefined) { - positional_args.push(step); - } - - if (to !== undefined) { - Opal.hash_put(keyword_args, "to", to); - } - - if (by !== undefined) { - Opal.hash_put(keyword_args, "by", by); - } - - if (keyword_args['$any?']()) { - positional_args.push(keyword_args); - } - ; - return $send(self, 'enum_for', ["step"].concat(Opal.to_a(positional_args)), ($$59 = function(){var self = $$59.$$s || this; - - return stepSize();}, $$59.$$s = self, $$59.$$arity = 0, $$59)); - }; - - validateParameters(); - - if (step === 0) { - while (true) { - block(self); - } - } - - if (self % 1 !== 0 || limit % 1 !== 0 || step % 1 !== 0) { - var n = stepFloatSize(); - - if (n > 0) { - if (step === Infinity || step === -Infinity) { - block(self); - } else { - var i = 0, d; - - if (step > 0) { - while (i < n) { - d = i * step + self; - if (limit < d) { - d = limit; - } - block(d); - i += 1; - } - } else { - while (i < n) { - d = i * step + self; - if (limit > d) { - d = limit; - } - block(d); - i += 1 - } - } - } - } - } else { - var value = self; - - if (step > 0) { - while (value <= limit) { - block(value); - value += step; - } - } else { - while (value >= limit) { - block(value); - value += step - } - } - } - - return self; - ; - }, $Number_step$58.$$arity = -1); - Opal.alias(self, "succ", "next"); - - Opal.def(self, '$times', $Number_times$60 = function $$times() { - var $iter = $Number_times$60.$$p, block = $iter || nil, $$61, self = this; - - if ($iter) $Number_times$60.$$p = null; - - - if ($iter) $Number_times$60.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["times"], ($$61 = function(){var self = $$61.$$s || this; - - return self}, $$61.$$s = self, $$61.$$arity = 0, $$61)) - }; - - for (var i = 0; i < self; i++) { - block(i); - } - ; - return self; - }, $Number_times$60.$$arity = 0); - - Opal.def(self, '$to_f', $Number_to_f$62 = function $$to_f() { - var self = this; - - return self - }, $Number_to_f$62.$$arity = 0); - - Opal.def(self, '$to_i', $Number_to_i$63 = function $$to_i() { - var self = this; - - return parseInt(self, 10); - }, $Number_to_i$63.$$arity = 0); - Opal.alias(self, "to_int", "to_i"); - - Opal.def(self, '$to_r', $Number_to_r$64 = function $$to_r() { - var $a, $b, self = this, f = nil, e = nil; - - if ($truthy($$($nesting, 'Integer')['$==='](self))) { - return $$($nesting, 'Rational').$new(self, 1) - } else { - - $b = $$($nesting, 'Math').$frexp(self), $a = Opal.to_ary($b), (f = ($a[0] == null ? nil : $a[0])), (e = ($a[1] == null ? nil : $a[1])), $b; - f = $$($nesting, 'Math').$ldexp(f, $$$($$($nesting, 'Float'), 'MANT_DIG')).$to_i(); - e = $rb_minus(e, $$$($$($nesting, 'Float'), 'MANT_DIG')); - return $rb_times(f, $$$($$($nesting, 'Float'), 'RADIX')['$**'](e)).$to_r(); - } - }, $Number_to_r$64.$$arity = 0); - - Opal.def(self, '$to_s', $Number_to_s$65 = function $$to_s(base) { - var $a, self = this; - - - - if (base == null) { - base = 10; - }; - base = $$($nesting, 'Opal')['$coerce_to!'](base, $$($nesting, 'Integer'), "to_int"); - if ($truthy(($truthy($a = $rb_lt(base, 2)) ? $a : $rb_gt(base, 36)))) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid radix " + (base))}; - return self.toString(base);; - }, $Number_to_s$65.$$arity = -1); - - Opal.def(self, '$truncate', $Number_truncate$66 = function $$truncate(ndigits) { - var self = this; - - - - if (ndigits == null) { - ndigits = 0; - }; - - var f = self.$to_f(); - - if (f % 1 === 0 && ndigits >= 0) { - return f; - } - - var factor = Math.pow(10, ndigits), - result = parseInt(f * factor, 10) / factor; - - if (f % 1 === 0) { - result = Math.round(result); - } - - return result; - ; - }, $Number_truncate$66.$$arity = -1); - Opal.alias(self, "inspect", "to_s"); - - Opal.def(self, '$digits', $Number_digits$67 = function $$digits(base) { - var self = this; - - - - if (base == null) { - base = 10; - }; - if ($rb_lt(self, 0)) { - self.$raise($$$($$($nesting, 'Math'), 'DomainError'), "out of domain")}; - base = $$($nesting, 'Opal')['$coerce_to!'](base, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_lt(base, 2))) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid radix " + (base))}; - - var value = self, result = []; - - while (value !== 0) { - result.push(value % base); - value = parseInt(value / base, 10); - } - - return result; - ; - }, $Number_digits$67.$$arity = -1); - - Opal.def(self, '$divmod', $Number_divmod$68 = function $$divmod(other) { - var $a, $iter = $Number_divmod$68.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Number_divmod$68.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if ($truthy(($truthy($a = self['$nan?']()) ? $a : other['$nan?']()))) { - return self.$raise($$($nesting, 'FloatDomainError'), "NaN") - } else if ($truthy(self['$infinite?']())) { - return self.$raise($$($nesting, 'FloatDomainError'), "Infinity") - } else { - return $send(self, Opal.find_super_dispatcher(self, 'divmod', $Number_divmod$68, false), $zuper, $iter) - } - }, $Number_divmod$68.$$arity = 1); - - Opal.def(self, '$upto', $Number_upto$69 = function $$upto(stop) { - var $iter = $Number_upto$69.$$p, block = $iter || nil, $$70, self = this; - - if ($iter) $Number_upto$69.$$p = null; - - - if ($iter) $Number_upto$69.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["upto", stop], ($$70 = function(){var self = $$70.$$s || this; - - - if ($truthy($$($nesting, 'Numeric')['$==='](stop))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (stop.$class()) + " failed") - }; - if ($truthy($rb_lt(stop, self))) { - return 0 - } else { - return $rb_plus($rb_minus(stop, self), 1) - };}, $$70.$$s = self, $$70.$$arity = 0, $$70)) - }; - - if (!stop.$$is_number) { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (stop.$class()) + " failed") - } - for (var i = self; i <= stop; i++) { - block(i); - } - ; - return self; - }, $Number_upto$69.$$arity = 1); - - Opal.def(self, '$zero?', $Number_zero$ques$71 = function() { - var self = this; - - return self == 0; - }, $Number_zero$ques$71.$$arity = 0); - - Opal.def(self, '$size', $Number_size$72 = function $$size() { - var self = this; - - return 4 - }, $Number_size$72.$$arity = 0); - - Opal.def(self, '$nan?', $Number_nan$ques$73 = function() { - var self = this; - - return isNaN(self); - }, $Number_nan$ques$73.$$arity = 0); - - Opal.def(self, '$finite?', $Number_finite$ques$74 = function() { - var self = this; - - return self != Infinity && self != -Infinity && !isNaN(self); - }, $Number_finite$ques$74.$$arity = 0); - - Opal.def(self, '$infinite?', $Number_infinite$ques$75 = function() { - var self = this; - - - if (self == Infinity) { - return +1; - } - else if (self == -Infinity) { - return -1; - } - else { - return nil; - } - - }, $Number_infinite$ques$75.$$arity = 0); - - Opal.def(self, '$positive?', $Number_positive$ques$76 = function() { - var self = this; - - return self != 0 && (self == Infinity || 1 / self > 0); - }, $Number_positive$ques$76.$$arity = 0); - return (Opal.def(self, '$negative?', $Number_negative$ques$77 = function() { - var self = this; - - return self == -Infinity || 1 / self < 0; - }, $Number_negative$ques$77.$$arity = 0), nil) && 'negative?'; - })($nesting[0], $$($nesting, 'Numeric'), $nesting); - Opal.const_set($nesting[0], 'Fixnum', $$($nesting, 'Number')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Integer'); - - var $nesting = [self].concat($parent_nesting); - - - self.$$is_number_class = true; - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $allocate$78, $eq_eq_eq$79, $sqrt$80; - - - - Opal.def(self, '$allocate', $allocate$78 = function $$allocate() { - var self = this; - - return self.$raise($$($nesting, 'TypeError'), "" + "allocator undefined for " + (self.$name())) - }, $allocate$78.$$arity = 0); - - Opal.udef(self, '$' + "new");; - - Opal.def(self, '$===', $eq_eq_eq$79 = function(other) { - var self = this; - - - if (!other.$$is_number) { - return false; - } - - return (other % 1) === 0; - - }, $eq_eq_eq$79.$$arity = 1); - return (Opal.def(self, '$sqrt', $sqrt$80 = function $$sqrt(n) { - var self = this; - - - n = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int"); - - if (n < 0) { - self.$raise($$$($$($nesting, 'Math'), 'DomainError'), "Numerical argument is out of domain - \"isqrt\"") - } - - return parseInt(Math.sqrt(n), 10); - ; - }, $sqrt$80.$$arity = 1), nil) && 'sqrt'; - })(Opal.get_singleton_class(self), $nesting); - Opal.const_set($nesting[0], 'MAX', Math.pow(2, 30) - 1); - return Opal.const_set($nesting[0], 'MIN', -Math.pow(2, 30)); - })($nesting[0], $$($nesting, 'Numeric'), $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Float'); - - var $nesting = [self].concat($parent_nesting); - - - self.$$is_number_class = true; - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $allocate$81, $eq_eq_eq$82; - - - - Opal.def(self, '$allocate', $allocate$81 = function $$allocate() { - var self = this; - - return self.$raise($$($nesting, 'TypeError'), "" + "allocator undefined for " + (self.$name())) - }, $allocate$81.$$arity = 0); - - Opal.udef(self, '$' + "new");; - return (Opal.def(self, '$===', $eq_eq_eq$82 = function(other) { - var self = this; - - return !!other.$$is_number; - }, $eq_eq_eq$82.$$arity = 1), nil) && '==='; - })(Opal.get_singleton_class(self), $nesting); - Opal.const_set($nesting[0], 'INFINITY', Infinity); - Opal.const_set($nesting[0], 'MAX', Number.MAX_VALUE); - Opal.const_set($nesting[0], 'MIN', Number.MIN_VALUE); - Opal.const_set($nesting[0], 'NAN', NaN); - Opal.const_set($nesting[0], 'DIG', 15); - Opal.const_set($nesting[0], 'MANT_DIG', 53); - Opal.const_set($nesting[0], 'RADIX', 2); - return Opal.const_set($nesting[0], 'EPSILON', Number.EPSILON || 2.2204460492503130808472633361816E-16); - })($nesting[0], $$($nesting, 'Numeric'), $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/range"] = function(Opal) { - function $rb_le(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_divide(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs / rhs : lhs['$/'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - function $rb_ge(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$require', '$include', '$attr_reader', '$raise', '$<=>', '$include?', '$<=', '$<', '$enum_for', '$upto', '$to_proc', '$respond_to?', '$class', '$succ', '$!', '$==', '$===', '$exclude_end?', '$eql?', '$begin', '$end', '$last', '$to_a', '$>', '$-', '$abs', '$to_i', '$coerce_to!', '$ceil', '$/', '$size', '$loop', '$+', '$*', '$>=', '$each_with_index', '$%', '$bsearch', '$inspect', '$[]', '$hash']); - - self.$require("corelib/enumerable"); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Range'); - - var $nesting = [self].concat($parent_nesting), $Range_initialize$1, $Range_$eq_eq$2, $Range_$eq_eq_eq$3, $Range_cover$ques$4, $Range_each$5, $Range_eql$ques$6, $Range_exclude_end$ques$7, $Range_first$8, $Range_last$9, $Range_max$10, $Range_min$11, $Range_size$12, $Range_step$13, $Range_bsearch$17, $Range_to_s$18, $Range_inspect$19, $Range_marshal_load$20, $Range_hash$21; - - self.$$prototype.begin = self.$$prototype.end = self.$$prototype.excl = nil; - - self.$include($$($nesting, 'Enumerable')); - self.$$prototype.$$is_range = true; - self.$attr_reader("begin", "end"); - - Opal.def(self, '$initialize', $Range_initialize$1 = function $$initialize(first, last, exclude) { - var self = this; - - - - if (exclude == null) { - exclude = false; - }; - if ($truthy(self.begin)) { - self.$raise($$($nesting, 'NameError'), "'initialize' called twice")}; - if ($truthy(first['$<=>'](last))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "bad value for range") - }; - self.begin = first; - self.end = last; - return (self.excl = exclude); - }, $Range_initialize$1.$$arity = -3); - - Opal.def(self, '$==', $Range_$eq_eq$2 = function(other) { - var self = this; - - - if (!other.$$is_range) { - return false; - } - - return self.excl === other.excl && - self.begin == other.begin && - self.end == other.end; - - }, $Range_$eq_eq$2.$$arity = 1); - - Opal.def(self, '$===', $Range_$eq_eq_eq$3 = function(value) { - var self = this; - - return self['$include?'](value) - }, $Range_$eq_eq_eq$3.$$arity = 1); - - Opal.def(self, '$cover?', $Range_cover$ques$4 = function(value) { - var $a, self = this, beg_cmp = nil, end_cmp = nil; - - - beg_cmp = self.begin['$<=>'](value); - if ($truthy(($truthy($a = beg_cmp) ? $rb_le(beg_cmp, 0) : $a))) { - } else { - return false - }; - end_cmp = value['$<=>'](self.end); - if ($truthy(self.excl)) { - return ($truthy($a = end_cmp) ? $rb_lt(end_cmp, 0) : $a) - } else { - return ($truthy($a = end_cmp) ? $rb_le(end_cmp, 0) : $a) - }; - }, $Range_cover$ques$4.$$arity = 1); - - Opal.def(self, '$each', $Range_each$5 = function $$each() { - var $iter = $Range_each$5.$$p, block = $iter || nil, $a, self = this, current = nil, last = nil; - - if ($iter) $Range_each$5.$$p = null; - - - if ($iter) $Range_each$5.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("each") - }; - - var i, limit; - - if (self.begin.$$is_number && self.end.$$is_number) { - if (self.begin % 1 !== 0 || self.end % 1 !== 0) { - self.$raise($$($nesting, 'TypeError'), "can't iterate from Float") - } - - for (i = self.begin, limit = self.end + (function() {if ($truthy(self.excl)) { - return 0 - } else { - return 1 - }; return nil; })(); i < limit; i++) { - block(i); - } - - return self; - } - - if (self.begin.$$is_string && self.end.$$is_string) { - $send(self.begin, 'upto', [self.end, self.excl], block.$to_proc()) - return self; - } - ; - current = self.begin; - last = self.end; - if ($truthy(current['$respond_to?']("succ"))) { - } else { - self.$raise($$($nesting, 'TypeError'), "" + "can't iterate from " + (current.$class())) - }; - while ($truthy($rb_lt(current['$<=>'](last), 0))) { - - Opal.yield1(block, current); - current = current.$succ(); - }; - if ($truthy(($truthy($a = self.excl['$!']()) ? current['$=='](last) : $a))) { - Opal.yield1(block, current)}; - return self; - }, $Range_each$5.$$arity = 0); - - Opal.def(self, '$eql?', $Range_eql$ques$6 = function(other) { - var $a, $b, self = this; - - - if ($truthy($$($nesting, 'Range')['$==='](other))) { - } else { - return false - }; - return ($truthy($a = ($truthy($b = self.excl['$==='](other['$exclude_end?']())) ? self.begin['$eql?'](other.$begin()) : $b)) ? self.end['$eql?'](other.$end()) : $a); - }, $Range_eql$ques$6.$$arity = 1); - - Opal.def(self, '$exclude_end?', $Range_exclude_end$ques$7 = function() { - var self = this; - - return self.excl - }, $Range_exclude_end$ques$7.$$arity = 0); - - Opal.def(self, '$first', $Range_first$8 = function $$first(n) { - var $iter = $Range_first$8.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Range_first$8.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - ; - if ($truthy(n == null)) { - return self.begin}; - return $send(self, Opal.find_super_dispatcher(self, 'first', $Range_first$8, false), $zuper, $iter); - }, $Range_first$8.$$arity = -1); - Opal.alias(self, "include?", "cover?"); - - Opal.def(self, '$last', $Range_last$9 = function $$last(n) { - var self = this; - - - ; - if ($truthy(n == null)) { - return self.end}; - return self.$to_a().$last(n); - }, $Range_last$9.$$arity = -1); - - Opal.def(self, '$max', $Range_max$10 = function $$max() { - var $a, $iter = $Range_max$10.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Range_max$10.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if (($yield !== nil)) { - return $send(self, Opal.find_super_dispatcher(self, 'max', $Range_max$10, false), $zuper, $iter) - } else if ($truthy($rb_gt(self.begin, self.end))) { - return nil - } else if ($truthy(($truthy($a = self.excl) ? self.begin['$=='](self.end) : $a))) { - return nil - } else { - return self.excl ? self.end - 1 : self.end - } - }, $Range_max$10.$$arity = 0); - Opal.alias(self, "member?", "cover?"); - - Opal.def(self, '$min', $Range_min$11 = function $$min() { - var $a, $iter = $Range_min$11.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Range_min$11.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if (($yield !== nil)) { - return $send(self, Opal.find_super_dispatcher(self, 'min', $Range_min$11, false), $zuper, $iter) - } else if ($truthy($rb_gt(self.begin, self.end))) { - return nil - } else if ($truthy(($truthy($a = self.excl) ? self.begin['$=='](self.end) : $a))) { - return nil - } else { - return self.begin - } - }, $Range_min$11.$$arity = 0); - - Opal.def(self, '$size', $Range_size$12 = function $$size() { - var $a, self = this, range_begin = nil, range_end = nil, infinity = nil; - - - range_begin = self.begin; - range_end = self.end; - if ($truthy(self.excl)) { - range_end = $rb_minus(range_end, 1)}; - if ($truthy(($truthy($a = $$($nesting, 'Numeric')['$==='](range_begin)) ? $$($nesting, 'Numeric')['$==='](range_end) : $a))) { - } else { - return nil - }; - if ($truthy($rb_lt(range_end, range_begin))) { - return 0}; - infinity = $$$($$($nesting, 'Float'), 'INFINITY'); - if ($truthy([range_begin.$abs(), range_end.$abs()]['$include?'](infinity))) { - return infinity}; - return (Math.abs(range_end - range_begin) + 1).$to_i(); - }, $Range_size$12.$$arity = 0); - - Opal.def(self, '$step', $Range_step$13 = function $$step(n) { - var $$14, $$15, $$16, $iter = $Range_step$13.$$p, $yield = $iter || nil, self = this, i = nil; - - if ($iter) $Range_step$13.$$p = null; - - - if (n == null) { - n = 1; - }; - - function coerceStepSize() { - if (!n.$$is_number) { - n = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int") - } - - if (n < 0) { - self.$raise($$($nesting, 'ArgumentError'), "step can't be negative") - } else if (n === 0) { - self.$raise($$($nesting, 'ArgumentError'), "step can't be 0") - } - } - - function enumeratorSize() { - if (!self.begin['$respond_to?']("succ")) { - return nil; - } - - if (self.begin.$$is_string && self.end.$$is_string) { - return nil; - } - - if (n % 1 === 0) { - return $rb_divide(self.$size(), n).$ceil(); - } else { - // n is a float - var begin = self.begin, end = self.end, - abs = Math.abs, floor = Math.floor, - err = (abs(begin) + abs(end) + abs(end - begin)) / abs(n) * $$$($$($nesting, 'Float'), 'EPSILON'), - size; - - if (err > 0.5) { - err = 0.5; - } - - if (self.excl) { - size = floor((end - begin) / n - err); - if (size * n + begin < end) { - size++; - } - } else { - size = floor((end - begin) / n + err) + 1 - } - - return size; - } - } - ; - if (($yield !== nil)) { - } else { - return $send(self, 'enum_for', ["step", n], ($$14 = function(){var self = $$14.$$s || this; - - - coerceStepSize(); - return enumeratorSize(); - }, $$14.$$s = self, $$14.$$arity = 0, $$14)) - }; - coerceStepSize(); - if ($truthy(self.begin.$$is_number && self.end.$$is_number)) { - - i = 0; - (function(){var $brk = Opal.new_brk(); try {return $send(self, 'loop', [], ($$15 = function(){var self = $$15.$$s || this, current = nil; - if (self.begin == null) self.begin = nil; - if (self.excl == null) self.excl = nil; - if (self.end == null) self.end = nil; - - - current = $rb_plus(self.begin, $rb_times(i, n)); - if ($truthy(self.excl)) { - if ($truthy($rb_ge(current, self.end))) { - - Opal.brk(nil, $brk)} - } else if ($truthy($rb_gt(current, self.end))) { - - Opal.brk(nil, $brk)}; - Opal.yield1($yield, current); - return (i = $rb_plus(i, 1));}, $$15.$$s = self, $$15.$$brk = $brk, $$15.$$arity = 0, $$15)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})(); - } else { - - - if (self.begin.$$is_string && self.end.$$is_string && n % 1 !== 0) { - self.$raise($$($nesting, 'TypeError'), "no implicit conversion to float from string") - } - ; - $send(self, 'each_with_index', [], ($$16 = function(value, idx){var self = $$16.$$s || this; - - - - if (value == null) { - value = nil; - }; - - if (idx == null) { - idx = nil; - }; - if (idx['$%'](n)['$=='](0)) { - return Opal.yield1($yield, value); - } else { - return nil - };}, $$16.$$s = self, $$16.$$arity = 2, $$16)); - }; - return self; - }, $Range_step$13.$$arity = -1); - - Opal.def(self, '$bsearch', $Range_bsearch$17 = function $$bsearch() { - var $iter = $Range_bsearch$17.$$p, block = $iter || nil, self = this; - - if ($iter) $Range_bsearch$17.$$p = null; - - - if ($iter) $Range_bsearch$17.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("bsearch") - }; - if ($truthy(self.begin.$$is_number && self.end.$$is_number)) { - } else { - self.$raise($$($nesting, 'TypeError'), "" + "can't do binary search for " + (self.begin.$class())) - }; - return $send(self.$to_a(), 'bsearch', [], block.$to_proc()); - }, $Range_bsearch$17.$$arity = 0); - - Opal.def(self, '$to_s', $Range_to_s$18 = function $$to_s() { - var self = this; - - return "" + (self.begin) + ((function() {if ($truthy(self.excl)) { - return "..." - } else { - return ".." - }; return nil; })()) + (self.end) - }, $Range_to_s$18.$$arity = 0); - - Opal.def(self, '$inspect', $Range_inspect$19 = function $$inspect() { - var self = this; - - return "" + (self.begin.$inspect()) + ((function() {if ($truthy(self.excl)) { - return "..." - } else { - return ".." - }; return nil; })()) + (self.end.$inspect()) - }, $Range_inspect$19.$$arity = 0); - - Opal.def(self, '$marshal_load', $Range_marshal_load$20 = function $$marshal_load(args) { - var self = this; - - - self.begin = args['$[]']("begin"); - self.end = args['$[]']("end"); - return (self.excl = args['$[]']("excl")); - }, $Range_marshal_load$20.$$arity = 1); - return (Opal.def(self, '$hash', $Range_hash$21 = function $$hash() { - var self = this; - - return [self.begin, self.end, self.excl].$hash() - }, $Range_hash$21.$$arity = 0), nil) && 'hash'; - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/proc"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$raise', '$coerce_to!']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Proc'); - - var $nesting = [self].concat($parent_nesting), $Proc_new$1, $Proc_call$2, $Proc_to_proc$3, $Proc_lambda$ques$4, $Proc_arity$5, $Proc_source_location$6, $Proc_binding$7, $Proc_parameters$8, $Proc_curry$9, $Proc_dup$10; - - - Opal.defineProperty(self.$$prototype, '$$is_proc', true); - Opal.defineProperty(self.$$prototype, '$$is_lambda', false); - Opal.defs(self, '$new', $Proc_new$1 = function() { - var $iter = $Proc_new$1.$$p, block = $iter || nil, self = this; - - if ($iter) $Proc_new$1.$$p = null; - - - if ($iter) $Proc_new$1.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to create a Proc object without a block") - }; - return block; - }, $Proc_new$1.$$arity = 0); - - Opal.def(self, '$call', $Proc_call$2 = function $$call($a) { - var $iter = $Proc_call$2.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Proc_call$2.$$p = null; - - - if ($iter) $Proc_call$2.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - if (block !== nil) { - self.$$p = block; - } - - var result, $brk = self.$$brk; - - if ($brk) { - try { - if (self.$$is_lambda) { - result = self.apply(null, args); - } - else { - result = Opal.yieldX(self, args); - } - } catch (err) { - if (err === $brk) { - return $brk.$v - } - else { - throw err - } - } - } - else { - if (self.$$is_lambda) { - result = self.apply(null, args); - } - else { - result = Opal.yieldX(self, args); - } - } - - return result; - ; - }, $Proc_call$2.$$arity = -1); - Opal.alias(self, "[]", "call"); - Opal.alias(self, "===", "call"); - Opal.alias(self, "yield", "call"); - - Opal.def(self, '$to_proc', $Proc_to_proc$3 = function $$to_proc() { - var self = this; - - return self - }, $Proc_to_proc$3.$$arity = 0); - - Opal.def(self, '$lambda?', $Proc_lambda$ques$4 = function() { - var self = this; - - return !!self.$$is_lambda; - }, $Proc_lambda$ques$4.$$arity = 0); - - Opal.def(self, '$arity', $Proc_arity$5 = function $$arity() { - var self = this; - - - if (self.$$is_curried) { - return -1; - } else { - return self.$$arity; - } - - }, $Proc_arity$5.$$arity = 0); - - Opal.def(self, '$source_location', $Proc_source_location$6 = function $$source_location() { - var self = this; - - - if (self.$$is_curried) { return nil; }; - return nil; - }, $Proc_source_location$6.$$arity = 0); - - Opal.def(self, '$binding', $Proc_binding$7 = function $$binding() { - var self = this; - - - if (self.$$is_curried) { self.$raise($$($nesting, 'ArgumentError'), "Can't create Binding") }; - return nil; - }, $Proc_binding$7.$$arity = 0); - - Opal.def(self, '$parameters', $Proc_parameters$8 = function $$parameters() { - var self = this; - - - if (self.$$is_curried) { - return [["rest"]]; - } else if (self.$$parameters) { - if (self.$$is_lambda) { - return self.$$parameters; - } else { - var result = [], i, length; - - for (i = 0, length = self.$$parameters.length; i < length; i++) { - var parameter = self.$$parameters[i]; - - if (parameter[0] === 'req') { - // required arguments always have name - parameter = ['opt', parameter[1]]; - } - - result.push(parameter); - } - - return result; - } - } else { - return []; - } - - }, $Proc_parameters$8.$$arity = 0); - - Opal.def(self, '$curry', $Proc_curry$9 = function $$curry(arity) { - var self = this; - - - ; - - if (arity === undefined) { - arity = self.length; - } - else { - arity = $$($nesting, 'Opal')['$coerce_to!'](arity, $$($nesting, 'Integer'), "to_int"); - if (self.$$is_lambda && arity !== self.length) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (arity) + " for " + (self.length) + ")") - } - } - - function curried () { - var args = $slice.call(arguments), - length = args.length, - result; - - if (length > arity && self.$$is_lambda && !self.$$is_curried) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (length) + " for " + (arity) + ")") - } - - if (length >= arity) { - return self.$call.apply(self, args); - } - - result = function () { - return curried.apply(null, - args.concat($slice.call(arguments))); - } - result.$$is_lambda = self.$$is_lambda; - result.$$is_curried = true; - - return result; - }; - - curried.$$is_lambda = self.$$is_lambda; - curried.$$is_curried = true; - return curried; - ; - }, $Proc_curry$9.$$arity = -1); - - Opal.def(self, '$dup', $Proc_dup$10 = function $$dup() { - var self = this; - - - var original_proc = self.$$original_proc || self, - proc = function () { - return original_proc.apply(this, arguments); - }; - - for (var prop in self) { - if (self.hasOwnProperty(prop)) { - proc[prop] = self[prop]; - } - } - - return proc; - - }, $Proc_dup$10.$$arity = 0); - return Opal.alias(self, "clone", "dup"); - })($nesting[0], Function, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/method"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$attr_reader', '$arity', '$new', '$class', '$join', '$source_location', '$raise']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Method'); - - var $nesting = [self].concat($parent_nesting), $Method_initialize$1, $Method_arity$2, $Method_parameters$3, $Method_source_location$4, $Method_comments$5, $Method_call$6, $Method_unbind$7, $Method_to_proc$8, $Method_inspect$9; - - self.$$prototype.method = self.$$prototype.receiver = self.$$prototype.owner = self.$$prototype.name = nil; - - self.$attr_reader("owner", "receiver", "name"); - - Opal.def(self, '$initialize', $Method_initialize$1 = function $$initialize(receiver, owner, method, name) { - var self = this; - - - self.receiver = receiver; - self.owner = owner; - self.name = name; - return (self.method = method); - }, $Method_initialize$1.$$arity = 4); - - Opal.def(self, '$arity', $Method_arity$2 = function $$arity() { - var self = this; - - return self.method.$arity() - }, $Method_arity$2.$$arity = 0); - - Opal.def(self, '$parameters', $Method_parameters$3 = function $$parameters() { - var self = this; - - return self.method.$$parameters - }, $Method_parameters$3.$$arity = 0); - - Opal.def(self, '$source_location', $Method_source_location$4 = function $$source_location() { - var $a, self = this; - - return ($truthy($a = self.method.$$source_location) ? $a : ["(eval)", 0]) - }, $Method_source_location$4.$$arity = 0); - - Opal.def(self, '$comments', $Method_comments$5 = function $$comments() { - var $a, self = this; - - return ($truthy($a = self.method.$$comments) ? $a : []) - }, $Method_comments$5.$$arity = 0); - - Opal.def(self, '$call', $Method_call$6 = function $$call($a) { - var $iter = $Method_call$6.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Method_call$6.$$p = null; - - - if ($iter) $Method_call$6.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - self.method.$$p = block; - - return self.method.apply(self.receiver, args); - ; - }, $Method_call$6.$$arity = -1); - Opal.alias(self, "[]", "call"); - - Opal.def(self, '$unbind', $Method_unbind$7 = function $$unbind() { - var self = this; - - return $$($nesting, 'UnboundMethod').$new(self.receiver.$class(), self.owner, self.method, self.name) - }, $Method_unbind$7.$$arity = 0); - - Opal.def(self, '$to_proc', $Method_to_proc$8 = function $$to_proc() { - var self = this; - - - var proc = self.$call.bind(self); - proc.$$unbound = self.method; - proc.$$is_lambda = true; - proc.$$arity = self.method.$$arity; - proc.$$parameters = self.method.$$parameters; - return proc; - - }, $Method_to_proc$8.$$arity = 0); - return (Opal.def(self, '$inspect', $Method_inspect$9 = function $$inspect() { - var self = this; - - return "" + "#<" + (self.$class()) + ": " + (self.receiver.$class()) + "#" + (self.name) + " (defined in " + (self.owner) + " in " + (self.$source_location().$join(":")) + ")>" - }, $Method_inspect$9.$$arity = 0), nil) && 'inspect'; - })($nesting[0], null, $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'UnboundMethod'); - - var $nesting = [self].concat($parent_nesting), $UnboundMethod_initialize$10, $UnboundMethod_arity$11, $UnboundMethod_parameters$12, $UnboundMethod_source_location$13, $UnboundMethod_comments$14, $UnboundMethod_bind$15, $UnboundMethod_inspect$16; - - self.$$prototype.method = self.$$prototype.owner = self.$$prototype.name = self.$$prototype.source = nil; - - self.$attr_reader("source", "owner", "name"); - - Opal.def(self, '$initialize', $UnboundMethod_initialize$10 = function $$initialize(source, owner, method, name) { - var self = this; - - - self.source = source; - self.owner = owner; - self.method = method; - return (self.name = name); - }, $UnboundMethod_initialize$10.$$arity = 4); - - Opal.def(self, '$arity', $UnboundMethod_arity$11 = function $$arity() { - var self = this; - - return self.method.$arity() - }, $UnboundMethod_arity$11.$$arity = 0); - - Opal.def(self, '$parameters', $UnboundMethod_parameters$12 = function $$parameters() { - var self = this; - - return self.method.$$parameters - }, $UnboundMethod_parameters$12.$$arity = 0); - - Opal.def(self, '$source_location', $UnboundMethod_source_location$13 = function $$source_location() { - var $a, self = this; - - return ($truthy($a = self.method.$$source_location) ? $a : ["(eval)", 0]) - }, $UnboundMethod_source_location$13.$$arity = 0); - - Opal.def(self, '$comments', $UnboundMethod_comments$14 = function $$comments() { - var $a, self = this; - - return ($truthy($a = self.method.$$comments) ? $a : []) - }, $UnboundMethod_comments$14.$$arity = 0); - - Opal.def(self, '$bind', $UnboundMethod_bind$15 = function $$bind(object) { - var self = this; - - - if (self.owner.$$is_module || Opal.is_a(object, self.owner)) { - return $$($nesting, 'Method').$new(object, self.owner, self.method, self.name); - } - else { - self.$raise($$($nesting, 'TypeError'), "" + "can't bind singleton method to a different class (expected " + (object) + ".kind_of?(" + (self.owner) + " to be true)"); - } - - }, $UnboundMethod_bind$15.$$arity = 1); - return (Opal.def(self, '$inspect', $UnboundMethod_inspect$16 = function $$inspect() { - var self = this; - - return "" + "#<" + (self.$class()) + ": " + (self.source) + "#" + (self.name) + " (defined in " + (self.owner) + " in " + (self.$source_location().$join(":")) + ")>" - }, $UnboundMethod_inspect$16.$$arity = 0), nil) && 'inspect'; - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/variables"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $gvars = Opal.gvars, $hash2 = Opal.hash2; - - Opal.add_stubs(['$new']); - - $gvars['&'] = $gvars['~'] = $gvars['`'] = $gvars["'"] = nil; - $gvars.LOADED_FEATURES = ($gvars["\""] = Opal.loaded_features); - $gvars.LOAD_PATH = ($gvars[":"] = []); - $gvars["/"] = "\n"; - $gvars[","] = nil; - Opal.const_set($nesting[0], 'ARGV', []); - Opal.const_set($nesting[0], 'ARGF', $$($nesting, 'Object').$new()); - Opal.const_set($nesting[0], 'ENV', $hash2([], {})); - $gvars.VERBOSE = false; - $gvars.DEBUG = false; - return ($gvars.SAFE = 0); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["opal/regexp_anchors"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module; - - Opal.add_stubs(['$==', '$new']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Opal'); - - var $nesting = [self].concat($parent_nesting); - - - Opal.const_set($nesting[0], 'REGEXP_START', (function() {if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - return "^" - } else { - return nil - }; return nil; })()); - Opal.const_set($nesting[0], 'REGEXP_END', (function() {if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - return "$" - } else { - return nil - }; return nil; })()); - Opal.const_set($nesting[0], 'FORBIDDEN_STARTING_IDENTIFIER_CHARS', "\\u0001-\\u002F\\u003A-\\u0040\\u005B-\\u005E\\u0060\\u007B-\\u007F"); - Opal.const_set($nesting[0], 'FORBIDDEN_ENDING_IDENTIFIER_CHARS', "\\u0001-\\u0020\\u0022-\\u002F\\u003A-\\u003E\\u0040\\u005B-\\u005E\\u0060\\u007B-\\u007F"); - Opal.const_set($nesting[0], 'INLINE_IDENTIFIER_REGEXP', $$($nesting, 'Regexp').$new("" + "[^" + ($$($nesting, 'FORBIDDEN_STARTING_IDENTIFIER_CHARS')) + "]*[^" + ($$($nesting, 'FORBIDDEN_ENDING_IDENTIFIER_CHARS')) + "]")); - Opal.const_set($nesting[0], 'FORBIDDEN_CONST_NAME_CHARS', "\\u0001-\\u0020\\u0021-\\u002F\\u003B-\\u003F\\u0040\\u005B-\\u005E\\u0060\\u007B-\\u007F"); - Opal.const_set($nesting[0], 'CONST_NAME_REGEXP', $$($nesting, 'Regexp').$new("" + ($$($nesting, 'REGEXP_START')) + "(::)?[A-Z][^" + ($$($nesting, 'FORBIDDEN_CONST_NAME_CHARS')) + "]*" + ($$($nesting, 'REGEXP_END')))); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["opal/mini"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - self.$require("opal/base"); - self.$require("corelib/nil"); - self.$require("corelib/boolean"); - self.$require("corelib/string"); - self.$require("corelib/comparable"); - self.$require("corelib/enumerable"); - self.$require("corelib/enumerator"); - self.$require("corelib/array"); - self.$require("corelib/hash"); - self.$require("corelib/number"); - self.$require("corelib/range"); - self.$require("corelib/proc"); - self.$require("corelib/method"); - self.$require("corelib/regexp"); - self.$require("corelib/variables"); - return self.$require("opal/regexp_anchors"); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/string/encoding"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var $$11, $$14, $$17, $$20, $$23, self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$require', '$+', '$[]', '$new', '$to_proc', '$each', '$const_set', '$sub', '$==', '$default_external', '$upcase', '$raise', '$attr_accessor', '$attr_reader', '$register', '$length', '$bytes', '$to_a', '$each_byte', '$dup', '$bytesize', '$enum_for', '$coerce_to!', '$find', '$<']); - - self.$require("corelib/string"); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Encoding'); - - var $nesting = [self].concat($parent_nesting), $Encoding_register$1, $Encoding_find$3, $Encoding_initialize$4, $Encoding_ascii_compatible$ques$5, $Encoding_dummy$ques$6, $Encoding_to_s$7, $Encoding_inspect$8, $Encoding_each_byte$9, $Encoding_bytesize$10; - - self.$$prototype.ascii = self.$$prototype.dummy = self.$$prototype.name = nil; - - Opal.defineProperty(self, '$$register', {}); - Opal.defs(self, '$register', $Encoding_register$1 = function $$register(name, options) { - var $iter = $Encoding_register$1.$$p, block = $iter || nil, $a, $$2, self = this, names = nil, encoding = nil, register = nil; - - if ($iter) $Encoding_register$1.$$p = null; - - - if ($iter) $Encoding_register$1.$$p = null;; - - if (options == null) { - options = $hash2([], {}); - }; - names = $rb_plus([name], ($truthy($a = options['$[]']("aliases")) ? $a : [])); - encoding = $send($$($nesting, 'Class'), 'new', [self], block.$to_proc()).$new(name, names, ($truthy($a = options['$[]']("ascii")) ? $a : false), ($truthy($a = options['$[]']("dummy")) ? $a : false)); - register = self["$$register"]; - return $send(names, 'each', [], ($$2 = function(encoding_name){var self = $$2.$$s || this; - - - - if (encoding_name == null) { - encoding_name = nil; - }; - self.$const_set(encoding_name.$sub("-", "_"), encoding); - return register["" + "$$" + (encoding_name)] = encoding;}, $$2.$$s = self, $$2.$$arity = 1, $$2)); - }, $Encoding_register$1.$$arity = -2); - Opal.defs(self, '$find', $Encoding_find$3 = function $$find(name) { - var $a, self = this, register = nil, encoding = nil; - - - if (name['$==']("default_external")) { - return self.$default_external()}; - register = self["$$register"]; - encoding = ($truthy($a = register["" + "$$" + (name)]) ? $a : register["" + "$$" + (name.$upcase())]); - if ($truthy(encoding)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "unknown encoding name - " + (name)) - }; - return encoding; - }, $Encoding_find$3.$$arity = 1); - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting); - - return self.$attr_accessor("default_external") - })(Opal.get_singleton_class(self), $nesting); - self.$attr_reader("name", "names"); - - Opal.def(self, '$initialize', $Encoding_initialize$4 = function $$initialize(name, names, ascii, dummy) { - var self = this; - - - self.name = name; - self.names = names; - self.ascii = ascii; - return (self.dummy = dummy); - }, $Encoding_initialize$4.$$arity = 4); - - Opal.def(self, '$ascii_compatible?', $Encoding_ascii_compatible$ques$5 = function() { - var self = this; - - return self.ascii - }, $Encoding_ascii_compatible$ques$5.$$arity = 0); - - Opal.def(self, '$dummy?', $Encoding_dummy$ques$6 = function() { - var self = this; - - return self.dummy - }, $Encoding_dummy$ques$6.$$arity = 0); - - Opal.def(self, '$to_s', $Encoding_to_s$7 = function $$to_s() { - var self = this; - - return self.name - }, $Encoding_to_s$7.$$arity = 0); - - Opal.def(self, '$inspect', $Encoding_inspect$8 = function $$inspect() { - var self = this; - - return "" + "#" - }, $Encoding_inspect$8.$$arity = 0); - - Opal.def(self, '$each_byte', $Encoding_each_byte$9 = function $$each_byte($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError')); - }, $Encoding_each_byte$9.$$arity = -1); - - Opal.def(self, '$bytesize', $Encoding_bytesize$10 = function $$bytesize($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError')); - }, $Encoding_bytesize$10.$$arity = -1); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'EncodingError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'CompatibilityError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'EncodingError'), $nesting); - })($nesting[0], null, $nesting); - $send($$($nesting, 'Encoding'), 'register', ["UTF-8", $hash2(["aliases", "ascii"], {"aliases": ["CP65001"], "ascii": true})], ($$11 = function(){var self = $$11.$$s || this, $each_byte$12, $bytesize$13; - - - - Opal.def(self, '$each_byte', $each_byte$12 = function $$each_byte(string) { - var $iter = $each_byte$12.$$p, block = $iter || nil, self = this; - - if ($iter) $each_byte$12.$$p = null; - - - if ($iter) $each_byte$12.$$p = null;; - - var units = Infinity - var codePoint - var length = string.length - var leadSurrogate = null - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) { - Opal.yield1(block, 0xEF); - Opal.yield1(block, 0xBF); - Opal.yield1(block, 0xBD); - } - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) { - Opal.yield1(block, 0xEF); - Opal.yield1(block, 0xBF); - Opal.yield1(block, 0xBD); - } - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) { - Opal.yield1(block, 0xEF); - Opal.yield1(block, 0xBF); - Opal.yield1(block, 0xBD); - } - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) { - Opal.yield1(block, 0xEF); - Opal.yield1(block, 0xBF); - Opal.yield1(block, 0xBD); - } - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - Opal.yield1(block, codePoint); - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - Opal.yield1(block, codePoint >> 0x6 | 0xC0); - Opal.yield1(block, codePoint & 0x3F | 0x80); - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - Opal.yield1(block, codePoint >> 0xC | 0xE0); - Opal.yield1(block, codePoint >> 0x6 & 0x3F | 0x80); - Opal.yield1(block, codePoint & 0x3F | 0x80); - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - Opal.yield1(block, codePoint >> 0x12 | 0xF0); - Opal.yield1(block, codePoint >> 0xC & 0x3F | 0x80); - Opal.yield1(block, codePoint >> 0x6 & 0x3F | 0x80); - Opal.yield1(block, codePoint & 0x3F | 0x80); - } else { - // Invalid code point - } - } - ; - }, $each_byte$12.$$arity = 1); - return (Opal.def(self, '$bytesize', $bytesize$13 = function $$bytesize(string) { - var self = this; - - return string.$bytes().$length() - }, $bytesize$13.$$arity = 1), nil) && 'bytesize';}, $$11.$$s = self, $$11.$$arity = 0, $$11)); - $send($$($nesting, 'Encoding'), 'register', ["UTF-16LE"], ($$14 = function(){var self = $$14.$$s || this, $each_byte$15, $bytesize$16; - - - - Opal.def(self, '$each_byte', $each_byte$15 = function $$each_byte(string) { - var $iter = $each_byte$15.$$p, block = $iter || nil, self = this; - - if ($iter) $each_byte$15.$$p = null; - - - if ($iter) $each_byte$15.$$p = null;; - - for (var i = 0, length = string.length; i < length; i++) { - var code = string.charCodeAt(i); - - Opal.yield1(block, code & 0xff); - Opal.yield1(block, code >> 8); - } - ; - }, $each_byte$15.$$arity = 1); - return (Opal.def(self, '$bytesize', $bytesize$16 = function $$bytesize(string) { - var self = this; - - return string.$bytes().$length() - }, $bytesize$16.$$arity = 1), nil) && 'bytesize';}, $$14.$$s = self, $$14.$$arity = 0, $$14)); - $send($$($nesting, 'Encoding'), 'register', ["UTF-16BE"], ($$17 = function(){var self = $$17.$$s || this, $each_byte$18, $bytesize$19; - - - - Opal.def(self, '$each_byte', $each_byte$18 = function $$each_byte(string) { - var $iter = $each_byte$18.$$p, block = $iter || nil, self = this; - - if ($iter) $each_byte$18.$$p = null; - - - if ($iter) $each_byte$18.$$p = null;; - - for (var i = 0, length = string.length; i < length; i++) { - var code = string.charCodeAt(i); - - Opal.yield1(block, code >> 8); - Opal.yield1(block, code & 0xff); - } - ; - }, $each_byte$18.$$arity = 1); - return (Opal.def(self, '$bytesize', $bytesize$19 = function $$bytesize(string) { - var self = this; - - return string.$bytes().$length() - }, $bytesize$19.$$arity = 1), nil) && 'bytesize';}, $$17.$$s = self, $$17.$$arity = 0, $$17)); - $send($$($nesting, 'Encoding'), 'register', ["UTF-32LE"], ($$20 = function(){var self = $$20.$$s || this, $each_byte$21, $bytesize$22; - - - - Opal.def(self, '$each_byte', $each_byte$21 = function $$each_byte(string) { - var $iter = $each_byte$21.$$p, block = $iter || nil, self = this; - - if ($iter) $each_byte$21.$$p = null; - - - if ($iter) $each_byte$21.$$p = null;; - - for (var i = 0, length = string.length; i < length; i++) { - var code = string.charCodeAt(i); - - Opal.yield1(block, code & 0xff); - Opal.yield1(block, code >> 8); - } - ; - }, $each_byte$21.$$arity = 1); - return (Opal.def(self, '$bytesize', $bytesize$22 = function $$bytesize(string) { - var self = this; - - return string.$bytes().$length() - }, $bytesize$22.$$arity = 1), nil) && 'bytesize';}, $$20.$$s = self, $$20.$$arity = 0, $$20)); - $send($$($nesting, 'Encoding'), 'register', ["ASCII-8BIT", $hash2(["aliases", "ascii", "dummy"], {"aliases": ["BINARY", "US-ASCII", "ASCII"], "ascii": true, "dummy": true})], ($$23 = function(){var self = $$23.$$s || this, $each_byte$24, $bytesize$25; - - - - Opal.def(self, '$each_byte', $each_byte$24 = function $$each_byte(string) { - var $iter = $each_byte$24.$$p, block = $iter || nil, self = this; - - if ($iter) $each_byte$24.$$p = null; - - - if ($iter) $each_byte$24.$$p = null;; - - for (var i = 0, length = string.length; i < length; i++) { - var code = string.charCodeAt(i); - Opal.yield1(block, code & 0xff); - Opal.yield1(block, code >> 8); - } - ; - }, $each_byte$24.$$arity = 1); - return (Opal.def(self, '$bytesize', $bytesize$25 = function $$bytesize(string) { - var self = this; - - return string.$bytes().$length() - }, $bytesize$25.$$arity = 1), nil) && 'bytesize';}, $$23.$$s = self, $$23.$$arity = 0, $$23)); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'String'); - - var $nesting = [self].concat($parent_nesting), $String_bytes$26, $String_bytesize$27, $String_each_byte$28, $String_encode$29, $String_force_encoding$30, $String_getbyte$31, $String_valid_encoding$ques$32; - - self.$$prototype.bytes = self.$$prototype.internal_encoding = nil; - - self.$attr_reader("encoding"); - self.$attr_reader("internal_encoding"); - Opal.defineProperty(String.prototype, 'bytes', nil); - Opal.defineProperty(String.prototype, 'encoding', $$$($$($nesting, 'Encoding'), 'UTF_8')); - Opal.defineProperty(String.prototype, 'internal_encoding', $$$($$($nesting, 'Encoding'), 'UTF_8')); - - Opal.def(self, '$bytes', $String_bytes$26 = function $$bytes() { - var $a, self = this; - - - self.bytes = ($truthy($a = self.bytes) ? $a : self.$each_byte().$to_a()); - return self.bytes.$dup(); - }, $String_bytes$26.$$arity = 0); - - Opal.def(self, '$bytesize', $String_bytesize$27 = function $$bytesize() { - var self = this; - - return self.internal_encoding.$bytesize(self) - }, $String_bytesize$27.$$arity = 0); - - Opal.def(self, '$each_byte', $String_each_byte$28 = function $$each_byte() { - var $iter = $String_each_byte$28.$$p, block = $iter || nil, self = this; - - if ($iter) $String_each_byte$28.$$p = null; - - - if ($iter) $String_each_byte$28.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("each_byte") - }; - $send(self.internal_encoding, 'each_byte', [self], block.$to_proc()); - return self; - }, $String_each_byte$28.$$arity = 0); - - Opal.def(self, '$encode', $String_encode$29 = function $$encode(encoding) { - var self = this; - - return Opal.enc(self, encoding); - }, $String_encode$29.$$arity = 1); - - Opal.def(self, '$force_encoding', $String_force_encoding$30 = function $$force_encoding(encoding) { - var self = this; - - - if (encoding === self.encoding) { return self; } - - encoding = $$($nesting, 'Opal')['$coerce_to!'](encoding, $$($nesting, 'String'), "to_s"); - encoding = $$($nesting, 'Encoding').$find(encoding); - - if (encoding === self.encoding) { return self; } - - self.encoding = encoding; - return self; - - }, $String_force_encoding$30.$$arity = 1); - - Opal.def(self, '$getbyte', $String_getbyte$31 = function $$getbyte(idx) { - var self = this, string_bytes = nil; - - - string_bytes = self.$bytes(); - idx = $$($nesting, 'Opal')['$coerce_to!'](idx, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_lt(string_bytes.$length(), idx))) { - return nil}; - return string_bytes['$[]'](idx); - }, $String_getbyte$31.$$arity = 1); - return (Opal.def(self, '$valid_encoding?', $String_valid_encoding$ques$32 = function() { - var self = this; - - return true - }, $String_valid_encoding$ques$32.$$arity = 0), nil) && 'valid_encoding?'; - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/struct"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_ge(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$require', '$include', '$const_name!', '$unshift', '$map', '$coerce_to!', '$new', '$each', '$define_struct_attribute', '$allocate', '$initialize', '$alias_method', '$module_eval', '$to_proc', '$const_set', '$==', '$raise', '$<<', '$members', '$define_method', '$instance_eval', '$class', '$last', '$>', '$length', '$-', '$keys', '$any?', '$join', '$[]', '$[]=', '$each_with_index', '$hash', '$===', '$<', '$-@', '$size', '$>=', '$include?', '$to_sym', '$instance_of?', '$__id__', '$eql?', '$enum_for', '$name', '$+', '$each_pair', '$inspect', '$each_with_object', '$flatten', '$to_a', '$respond_to?', '$dig']); - - self.$require("corelib/enumerable"); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Struct'); - - var $nesting = [self].concat($parent_nesting), $Struct_new$1, $Struct_define_struct_attribute$6, $Struct_members$9, $Struct_inherited$10, $Struct_initialize$12, $Struct_members$15, $Struct_hash$16, $Struct_$$$17, $Struct_$$$eq$18, $Struct_$eq_eq$19, $Struct_eql$ques$20, $Struct_each$21, $Struct_each_pair$24, $Struct_length$27, $Struct_to_a$28, $Struct_inspect$30, $Struct_to_h$32, $Struct_values_at$34, $Struct_dig$36; - - - self.$include($$($nesting, 'Enumerable')); - Opal.defs(self, '$new', $Struct_new$1 = function(const_name, $a, $b) { - var $iter = $Struct_new$1.$$p, block = $iter || nil, $post_args, $kwargs, args, keyword_init, $$2, $$3, self = this, klass = nil; - - if ($iter) $Struct_new$1.$$p = null; - - - if ($iter) $Struct_new$1.$$p = null;; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - $kwargs = Opal.extract_kwargs($post_args); - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - args = $post_args;; - - keyword_init = $kwargs.$$smap["keyword_init"]; - if (keyword_init == null) { - keyword_init = false - }; - if ($truthy(const_name)) { - - try { - const_name = $$($nesting, 'Opal')['$const_name!'](const_name) - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'TypeError'), $$($nesting, 'NameError')])) { - try { - - args.$unshift(const_name); - const_name = nil; - } finally { Opal.pop_exception() } - } else { throw $err; } - };}; - $send(args, 'map', [], ($$2 = function(arg){var self = $$2.$$s || this; - - - - if (arg == null) { - arg = nil; - }; - return $$($nesting, 'Opal')['$coerce_to!'](arg, $$($nesting, 'String'), "to_str");}, $$2.$$s = self, $$2.$$arity = 1, $$2)); - klass = $send($$($nesting, 'Class'), 'new', [self], ($$3 = function(){var self = $$3.$$s || this, $$4; - - - $send(args, 'each', [], ($$4 = function(arg){var self = $$4.$$s || this; - - - - if (arg == null) { - arg = nil; - }; - return self.$define_struct_attribute(arg);}, $$4.$$s = self, $$4.$$arity = 1, $$4)); - return (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $new$5; - - - - Opal.def(self, '$new', $new$5 = function($a) { - var $post_args, args, self = this, instance = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - instance = self.$allocate(); - instance.$$data = {}; - $send(instance, 'initialize', Opal.to_a(args)); - return instance; - }, $new$5.$$arity = -1); - return self.$alias_method("[]", "new"); - })(Opal.get_singleton_class(self), $nesting);}, $$3.$$s = self, $$3.$$arity = 0, $$3)); - if ($truthy(block)) { - $send(klass, 'module_eval', [], block.$to_proc())}; - klass.$$keyword_init = keyword_init; - if ($truthy(const_name)) { - $$($nesting, 'Struct').$const_set(const_name, klass)}; - return klass; - }, $Struct_new$1.$$arity = -2); - Opal.defs(self, '$define_struct_attribute', $Struct_define_struct_attribute$6 = function $$define_struct_attribute(name) { - var $$7, $$8, self = this; - - - if (self['$==']($$($nesting, 'Struct'))) { - self.$raise($$($nesting, 'ArgumentError'), "you cannot define attributes to the Struct class")}; - self.$members()['$<<'](name); - $send(self, 'define_method', [name], ($$7 = function(){var self = $$7.$$s || this; - - return self.$$data[name];}, $$7.$$s = self, $$7.$$arity = 0, $$7)); - return $send(self, 'define_method', ["" + (name) + "="], ($$8 = function(value){var self = $$8.$$s || this; - - - - if (value == null) { - value = nil; - }; - return self.$$data[name] = value;;}, $$8.$$s = self, $$8.$$arity = 1, $$8)); - }, $Struct_define_struct_attribute$6.$$arity = 1); - Opal.defs(self, '$members', $Struct_members$9 = function $$members() { - var $a, self = this; - if (self.members == null) self.members = nil; - - - if (self['$==']($$($nesting, 'Struct'))) { - self.$raise($$($nesting, 'ArgumentError'), "the Struct class has no members")}; - return (self.members = ($truthy($a = self.members) ? $a : [])); - }, $Struct_members$9.$$arity = 0); - Opal.defs(self, '$inherited', $Struct_inherited$10 = function $$inherited(klass) { - var $$11, self = this, members = nil; - if (self.members == null) self.members = nil; - - - members = self.members; - return $send(klass, 'instance_eval', [], ($$11 = function(){var self = $$11.$$s || this; - - return (self.members = members)}, $$11.$$s = self, $$11.$$arity = 0, $$11)); - }, $Struct_inherited$10.$$arity = 1); - - Opal.def(self, '$initialize', $Struct_initialize$12 = function $$initialize($a) { - var $post_args, args, $b, $$13, $$14, self = this, kwargs = nil, extra = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy(self.$class().$$keyword_init)) { - - kwargs = ($truthy($b = args.$last()) ? $b : $hash2([], {})); - if ($truthy(($truthy($b = $rb_gt(args.$length(), 1)) ? $b : (args.length === 1 && !kwargs.$$is_hash)))) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (given " + (args.$length()) + ", expected 0)")}; - extra = $rb_minus(kwargs.$keys(), self.$class().$members()); - if ($truthy(extra['$any?']())) { - self.$raise($$($nesting, 'ArgumentError'), "" + "unknown keywords: " + (extra.$join(", ")))}; - return $send(self.$class().$members(), 'each', [], ($$13 = function(name){var self = $$13.$$s || this, $writer = nil; - - - - if (name == null) { - name = nil; - }; - $writer = [name, kwargs['$[]'](name)]; - $send(self, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$13.$$s = self, $$13.$$arity = 1, $$13)); - } else { - - if ($truthy($rb_gt(args.$length(), self.$class().$members().$length()))) { - self.$raise($$($nesting, 'ArgumentError'), "struct size differs")}; - return $send(self.$class().$members(), 'each_with_index', [], ($$14 = function(name, index){var self = $$14.$$s || this, $writer = nil; - - - - if (name == null) { - name = nil; - }; - - if (index == null) { - index = nil; - }; - $writer = [name, args['$[]'](index)]; - $send(self, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$14.$$s = self, $$14.$$arity = 2, $$14)); - }; - }, $Struct_initialize$12.$$arity = -1); - - Opal.def(self, '$members', $Struct_members$15 = function $$members() { - var self = this; - - return self.$class().$members() - }, $Struct_members$15.$$arity = 0); - - Opal.def(self, '$hash', $Struct_hash$16 = function $$hash() { - var self = this; - - return $$($nesting, 'Hash').$new(self.$$data).$hash() - }, $Struct_hash$16.$$arity = 0); - - Opal.def(self, '$[]', $Struct_$$$17 = function(name) { - var self = this; - - - if ($truthy($$($nesting, 'Integer')['$==='](name))) { - - if ($truthy($rb_lt(name, self.$class().$members().$size()['$-@']()))) { - self.$raise($$($nesting, 'IndexError'), "" + "offset " + (name) + " too small for struct(size:" + (self.$class().$members().$size()) + ")")}; - if ($truthy($rb_ge(name, self.$class().$members().$size()))) { - self.$raise($$($nesting, 'IndexError'), "" + "offset " + (name) + " too large for struct(size:" + (self.$class().$members().$size()) + ")")}; - name = self.$class().$members()['$[]'](name); - } else if ($truthy($$($nesting, 'String')['$==='](name))) { - - if(!self.$$data.hasOwnProperty(name)) { - self.$raise($$($nesting, 'NameError').$new("" + "no member '" + (name) + "' in struct", name)) - } - - } else { - self.$raise($$($nesting, 'TypeError'), "" + "no implicit conversion of " + (name.$class()) + " into Integer") - }; - name = $$($nesting, 'Opal')['$coerce_to!'](name, $$($nesting, 'String'), "to_str"); - return self.$$data[name];; - }, $Struct_$$$17.$$arity = 1); - - Opal.def(self, '$[]=', $Struct_$$$eq$18 = function(name, value) { - var self = this; - - - if ($truthy($$($nesting, 'Integer')['$==='](name))) { - - if ($truthy($rb_lt(name, self.$class().$members().$size()['$-@']()))) { - self.$raise($$($nesting, 'IndexError'), "" + "offset " + (name) + " too small for struct(size:" + (self.$class().$members().$size()) + ")")}; - if ($truthy($rb_ge(name, self.$class().$members().$size()))) { - self.$raise($$($nesting, 'IndexError'), "" + "offset " + (name) + " too large for struct(size:" + (self.$class().$members().$size()) + ")")}; - name = self.$class().$members()['$[]'](name); - } else if ($truthy($$($nesting, 'String')['$==='](name))) { - if ($truthy(self.$class().$members()['$include?'](name.$to_sym()))) { - } else { - self.$raise($$($nesting, 'NameError').$new("" + "no member '" + (name) + "' in struct", name)) - } - } else { - self.$raise($$($nesting, 'TypeError'), "" + "no implicit conversion of " + (name.$class()) + " into Integer") - }; - name = $$($nesting, 'Opal')['$coerce_to!'](name, $$($nesting, 'String'), "to_str"); - return self.$$data[name] = value;; - }, $Struct_$$$eq$18.$$arity = 2); - - Opal.def(self, '$==', $Struct_$eq_eq$19 = function(other) { - var self = this; - - - if ($truthy(other['$instance_of?'](self.$class()))) { - } else { - return false - }; - - var recursed1 = {}, recursed2 = {}; - - function _eqeq(struct, other) { - var key, a, b; - - recursed1[(struct).$__id__()] = true; - recursed2[(other).$__id__()] = true; - - for (key in struct.$$data) { - a = struct.$$data[key]; - b = other.$$data[key]; - - if ($$($nesting, 'Struct')['$==='](a)) { - if (!recursed1.hasOwnProperty((a).$__id__()) || !recursed2.hasOwnProperty((b).$__id__())) { - if (!_eqeq(a, b)) { - return false; - } - } - } else { - if (!(a)['$=='](b)) { - return false; - } - } - } - - return true; - } - - return _eqeq(self, other); - ; - }, $Struct_$eq_eq$19.$$arity = 1); - - Opal.def(self, '$eql?', $Struct_eql$ques$20 = function(other) { - var self = this; - - - if ($truthy(other['$instance_of?'](self.$class()))) { - } else { - return false - }; - - var recursed1 = {}, recursed2 = {}; - - function _eqeq(struct, other) { - var key, a, b; - - recursed1[(struct).$__id__()] = true; - recursed2[(other).$__id__()] = true; - - for (key in struct.$$data) { - a = struct.$$data[key]; - b = other.$$data[key]; - - if ($$($nesting, 'Struct')['$==='](a)) { - if (!recursed1.hasOwnProperty((a).$__id__()) || !recursed2.hasOwnProperty((b).$__id__())) { - if (!_eqeq(a, b)) { - return false; - } - } - } else { - if (!(a)['$eql?'](b)) { - return false; - } - } - } - - return true; - } - - return _eqeq(self, other); - ; - }, $Struct_eql$ques$20.$$arity = 1); - - Opal.def(self, '$each', $Struct_each$21 = function $$each() { - var $$22, $$23, $iter = $Struct_each$21.$$p, $yield = $iter || nil, self = this; - - if ($iter) $Struct_each$21.$$p = null; - - if (($yield !== nil)) { - } else { - return $send(self, 'enum_for', ["each"], ($$22 = function(){var self = $$22.$$s || this; - - return self.$size()}, $$22.$$s = self, $$22.$$arity = 0, $$22)) - }; - $send(self.$class().$members(), 'each', [], ($$23 = function(name){var self = $$23.$$s || this; - - - - if (name == null) { - name = nil; - }; - return Opal.yield1($yield, self['$[]'](name));;}, $$23.$$s = self, $$23.$$arity = 1, $$23)); - return self; - }, $Struct_each$21.$$arity = 0); - - Opal.def(self, '$each_pair', $Struct_each_pair$24 = function $$each_pair() { - var $$25, $$26, $iter = $Struct_each_pair$24.$$p, $yield = $iter || nil, self = this; - - if ($iter) $Struct_each_pair$24.$$p = null; - - if (($yield !== nil)) { - } else { - return $send(self, 'enum_for', ["each_pair"], ($$25 = function(){var self = $$25.$$s || this; - - return self.$size()}, $$25.$$s = self, $$25.$$arity = 0, $$25)) - }; - $send(self.$class().$members(), 'each', [], ($$26 = function(name){var self = $$26.$$s || this; - - - - if (name == null) { - name = nil; - }; - return Opal.yield1($yield, [name, self['$[]'](name)]);;}, $$26.$$s = self, $$26.$$arity = 1, $$26)); - return self; - }, $Struct_each_pair$24.$$arity = 0); - - Opal.def(self, '$length', $Struct_length$27 = function $$length() { - var self = this; - - return self.$class().$members().$length() - }, $Struct_length$27.$$arity = 0); - Opal.alias(self, "size", "length"); - - Opal.def(self, '$to_a', $Struct_to_a$28 = function $$to_a() { - var $$29, self = this; - - return $send(self.$class().$members(), 'map', [], ($$29 = function(name){var self = $$29.$$s || this; - - - - if (name == null) { - name = nil; - }; - return self['$[]'](name);}, $$29.$$s = self, $$29.$$arity = 1, $$29)) - }, $Struct_to_a$28.$$arity = 0); - Opal.alias(self, "values", "to_a"); - - Opal.def(self, '$inspect', $Struct_inspect$30 = function $$inspect() { - var $a, $$31, self = this, result = nil; - - - result = "#"); - return result; - }, $Struct_inspect$30.$$arity = 0); - Opal.alias(self, "to_s", "inspect"); - - Opal.def(self, '$to_h', $Struct_to_h$32 = function $$to_h() { - var $$33, self = this; - - return $send(self.$class().$members(), 'each_with_object', [$hash2([], {})], ($$33 = function(name, h){var self = $$33.$$s || this, $writer = nil; - - - - if (name == null) { - name = nil; - }; - - if (h == null) { - h = nil; - }; - $writer = [name, self['$[]'](name)]; - $send(h, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$33.$$s = self, $$33.$$arity = 2, $$33)) - }, $Struct_to_h$32.$$arity = 0); - - Opal.def(self, '$values_at', $Struct_values_at$34 = function $$values_at($a) { - var $post_args, args, $$35, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - args = $send(args, 'map', [], ($$35 = function(arg){var self = $$35.$$s || this; - - - - if (arg == null) { - arg = nil; - }; - return arg.$$is_range ? arg.$to_a() : arg;}, $$35.$$s = self, $$35.$$arity = 1, $$35)).$flatten(); - - var result = []; - for (var i = 0, len = args.length; i < len; i++) { - if (!args[i].$$is_number) { - self.$raise($$($nesting, 'TypeError'), "" + "no implicit conversion of " + ((args[i]).$class()) + " into Integer") - } - result.push(self['$[]'](args[i])); - } - return result; - ; - }, $Struct_values_at$34.$$arity = -1); - return (Opal.def(self, '$dig', $Struct_dig$36 = function $$dig(key, $a) { - var $post_args, keys, self = this, item = nil; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - keys = $post_args;; - item = (function() {if ($truthy(key.$$is_string && self.$$data.hasOwnProperty(key))) { - return self.$$data[key] || nil; - } else { - return nil - }; return nil; })(); - - if (item === nil || keys.length === 0) { - return item; - } - ; - if ($truthy(item['$respond_to?']("dig"))) { - } else { - self.$raise($$($nesting, 'TypeError'), "" + (item.$class()) + " does not have #dig method") - }; - return $send(item, 'dig', Opal.to_a(keys)); - }, $Struct_dig$36.$$arity = -2), nil) && 'dig'; - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/io"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $module = Opal.module, $send = Opal.send, $gvars = Opal.gvars, $truthy = Opal.truthy, $writer = nil; - - Opal.add_stubs(['$attr_accessor', '$size', '$write', '$join', '$map', '$String', '$empty?', '$concat', '$chomp', '$getbyte', '$getc', '$raise', '$new', '$write_proc=', '$-', '$extend']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'IO'); - - var $nesting = [self].concat($parent_nesting), $IO_tty$ques$1, $IO_closed$ques$2, $IO_write$3, $IO_flush$4; - - self.$$prototype.tty = self.$$prototype.closed = nil; - - Opal.const_set($nesting[0], 'SEEK_SET', 0); - Opal.const_set($nesting[0], 'SEEK_CUR', 1); - Opal.const_set($nesting[0], 'SEEK_END', 2); - - Opal.def(self, '$tty?', $IO_tty$ques$1 = function() { - var self = this; - - return self.tty - }, $IO_tty$ques$1.$$arity = 0); - - Opal.def(self, '$closed?', $IO_closed$ques$2 = function() { - var self = this; - - return self.closed - }, $IO_closed$ques$2.$$arity = 0); - self.$attr_accessor("write_proc"); - - Opal.def(self, '$write', $IO_write$3 = function $$write(string) { - var self = this; - - - self.write_proc(string); - return string.$size(); - }, $IO_write$3.$$arity = 1); - self.$attr_accessor("sync", "tty"); - - Opal.def(self, '$flush', $IO_flush$4 = function $$flush() { - var self = this; - - return nil - }, $IO_flush$4.$$arity = 0); - (function($base, $parent_nesting) { - var self = $module($base, 'Writable'); - - var $nesting = [self].concat($parent_nesting), $Writable_$lt$lt$5, $Writable_print$6, $Writable_puts$8; - - - - Opal.def(self, '$<<', $Writable_$lt$lt$5 = function(string) { - var self = this; - - - self.$write(string); - return self; - }, $Writable_$lt$lt$5.$$arity = 1); - - Opal.def(self, '$print', $Writable_print$6 = function $$print($a) { - var $post_args, args, $$7, self = this; - if ($gvars[","] == null) $gvars[","] = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - self.$write($send(args, 'map', [], ($$7 = function(arg){var self = $$7.$$s || this; - - - - if (arg == null) { - arg = nil; - }; - return self.$String(arg);}, $$7.$$s = self, $$7.$$arity = 1, $$7)).$join($gvars[","])); - return nil; - }, $Writable_print$6.$$arity = -1); - - Opal.def(self, '$puts', $Writable_puts$8 = function $$puts($a) { - var $post_args, args, $$9, self = this, newline = nil; - if ($gvars["/"] == null) $gvars["/"] = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - newline = $gvars["/"]; - if ($truthy(args['$empty?']())) { - self.$write($gvars["/"]) - } else { - self.$write($send(args, 'map', [], ($$9 = function(arg){var self = $$9.$$s || this; - - - - if (arg == null) { - arg = nil; - }; - return self.$String(arg).$chomp();}, $$9.$$s = self, $$9.$$arity = 1, $$9)).$concat([nil]).$join(newline)) - }; - return nil; - }, $Writable_puts$8.$$arity = -1); - })($nesting[0], $nesting); - return (function($base, $parent_nesting) { - var self = $module($base, 'Readable'); - - var $nesting = [self].concat($parent_nesting), $Readable_readbyte$10, $Readable_readchar$11, $Readable_readline$12, $Readable_readpartial$13; - - - - Opal.def(self, '$readbyte', $Readable_readbyte$10 = function $$readbyte() { - var self = this; - - return self.$getbyte() - }, $Readable_readbyte$10.$$arity = 0); - - Opal.def(self, '$readchar', $Readable_readchar$11 = function $$readchar() { - var self = this; - - return self.$getc() - }, $Readable_readchar$11.$$arity = 0); - - Opal.def(self, '$readline', $Readable_readline$12 = function $$readline(sep) { - var self = this; - if ($gvars["/"] == null) $gvars["/"] = nil; - - - - if (sep == null) { - sep = $gvars["/"]; - }; - return self.$raise($$($nesting, 'NotImplementedError')); - }, $Readable_readline$12.$$arity = -1); - - Opal.def(self, '$readpartial', $Readable_readpartial$13 = function $$readpartial(integer, outbuf) { - var self = this; - - - - if (outbuf == null) { - outbuf = nil; - }; - return self.$raise($$($nesting, 'NotImplementedError')); - }, $Readable_readpartial$13.$$arity = -2); - })($nesting[0], $nesting); - })($nesting[0], null, $nesting); - Opal.const_set($nesting[0], 'STDERR', ($gvars.stderr = $$($nesting, 'IO').$new())); - Opal.const_set($nesting[0], 'STDIN', ($gvars.stdin = $$($nesting, 'IO').$new())); - Opal.const_set($nesting[0], 'STDOUT', ($gvars.stdout = $$($nesting, 'IO').$new())); - var console = Opal.global.console; - - $writer = [typeof(process) === 'object' && typeof(process.stdout) === 'object' ? function(s){process.stdout.write(s)} : function(s){console.log(s)}]; - $send($$($nesting, 'STDOUT'), 'write_proc=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [typeof(process) === 'object' && typeof(process.stderr) === 'object' ? function(s){process.stderr.write(s)} : function(s){console.warn(s)}]; - $send($$($nesting, 'STDERR'), 'write_proc=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - $$($nesting, 'STDOUT').$extend($$$($$($nesting, 'IO'), 'Writable')); - return $$($nesting, 'STDERR').$extend($$$($$($nesting, 'IO'), 'Writable')); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/main"] = function(Opal) { - var $to_s$1, $include$2, self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$include']); - - Opal.defs(self, '$to_s', $to_s$1 = function $$to_s() { - var self = this; - - return "main" - }, $to_s$1.$$arity = 0); - return (Opal.defs(self, '$include', $include$2 = function $$include(mod) { - var self = this; - - return $$($nesting, 'Object').$include(mod) - }, $include$2.$$arity = 1), nil) && 'include'; -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/dir"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$[]']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Dir'); - - var $nesting = [self].concat($parent_nesting); - - return (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $chdir$1, $pwd$2, $home$3; - - - - Opal.def(self, '$chdir', $chdir$1 = function $$chdir(dir) { - var $iter = $chdir$1.$$p, $yield = $iter || nil, self = this, prev_cwd = nil; - - if ($iter) $chdir$1.$$p = null; - return (function() { try { - - prev_cwd = Opal.current_dir; - Opal.current_dir = dir; - return Opal.yieldX($yield, []);; - } finally { - Opal.current_dir = prev_cwd - }; })() - }, $chdir$1.$$arity = 1); - - Opal.def(self, '$pwd', $pwd$2 = function $$pwd() { - var self = this; - - return Opal.current_dir || '.'; - }, $pwd$2.$$arity = 0); - Opal.alias(self, "getwd", "pwd"); - return (Opal.def(self, '$home', $home$3 = function $$home() { - var $a, self = this; - - return ($truthy($a = $$($nesting, 'ENV')['$[]']("HOME")) ? $a : ".") - }, $home$3.$$arity = 0), nil) && 'home'; - })(Opal.get_singleton_class(self), $nesting) - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/file"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $range = Opal.range, $send = Opal.send; - - Opal.add_stubs(['$respond_to?', '$to_path', '$pwd', '$split', '$sub', '$+', '$unshift', '$join', '$home', '$raise', '$start_with?', '$absolute_path', '$coerce_to!', '$basename', '$empty?', '$rindex', '$[]', '$nil?', '$==', '$-', '$length', '$gsub', '$find', '$=~', '$map', '$each_with_index', '$flatten', '$reject', '$to_proc', '$end_with?']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'File'); - - var $nesting = [self].concat($parent_nesting), windows_root_rx = nil; - - - Opal.const_set($nesting[0], 'Separator', Opal.const_set($nesting[0], 'SEPARATOR', "/")); - Opal.const_set($nesting[0], 'ALT_SEPARATOR', nil); - Opal.const_set($nesting[0], 'PATH_SEPARATOR', ":"); - Opal.const_set($nesting[0], 'FNM_SYSCASE', 0); - windows_root_rx = /^[a-zA-Z]:(?:\\|\/)/; - return (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $absolute_path$1, $expand_path$2, $dirname$3, $basename$4, $extname$5, $exist$ques$6, $directory$ques$7, $join$9, $split$12; - - - - Opal.def(self, '$absolute_path', $absolute_path$1 = function $$absolute_path(path, basedir) { - var $a, self = this, sep = nil, sep_chars = nil, new_parts = nil, path_abs = nil, basedir_abs = nil, parts = nil, leading_sep = nil, abs = nil, new_path = nil; - - - - if (basedir == null) { - basedir = nil; - }; - sep = $$($nesting, 'SEPARATOR'); - sep_chars = $sep_chars(); - new_parts = []; - path = (function() {if ($truthy(path['$respond_to?']("to_path"))) { - return path.$to_path() - } else { - return path - }; return nil; })(); - basedir = ($truthy($a = basedir) ? $a : $$($nesting, 'Dir').$pwd()); - path_abs = path.substr(0, sep.length) === sep || windows_root_rx.test(path); - basedir_abs = basedir.substr(0, sep.length) === sep || windows_root_rx.test(basedir); - if ($truthy(path_abs)) { - - parts = path.$split(new RegExp("" + "[" + (sep_chars) + "]")); - leading_sep = windows_root_rx.test(path) ? '' : path.$sub(new RegExp("" + "^([" + (sep_chars) + "]+).*$"), "\\1"); - abs = true; - } else { - - parts = $rb_plus(basedir.$split(new RegExp("" + "[" + (sep_chars) + "]")), path.$split(new RegExp("" + "[" + (sep_chars) + "]"))); - leading_sep = windows_root_rx.test(basedir) ? '' : basedir.$sub(new RegExp("" + "^([" + (sep_chars) + "]+).*$"), "\\1"); - abs = basedir_abs; - }; - - var part; - for (var i = 0, ii = parts.length; i < ii; i++) { - part = parts[i]; - - if ( - (part === nil) || - (part === '' && ((new_parts.length === 0) || abs)) || - (part === '.' && ((new_parts.length === 0) || abs)) - ) { - continue; - } - if (part === '..') { - new_parts.pop(); - } else { - new_parts.push(part); - } - } - - if (!abs && parts[0] !== '.') { - new_parts.$unshift(".") - } - ; - new_path = new_parts.$join(sep); - if ($truthy(abs)) { - new_path = $rb_plus(leading_sep, new_path)}; - return new_path; - }, $absolute_path$1.$$arity = -2); - - Opal.def(self, '$expand_path', $expand_path$2 = function $$expand_path(path, basedir) { - var self = this, sep = nil, sep_chars = nil, home = nil, leading_sep = nil, home_path_regexp = nil; - - - - if (basedir == null) { - basedir = nil; - }; - sep = $$($nesting, 'SEPARATOR'); - sep_chars = $sep_chars(); - if ($truthy(path[0] === '~' || (basedir && basedir[0] === '~'))) { - - home = $$($nesting, 'Dir').$home(); - if ($truthy(home)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "couldn't find HOME environment -- expanding `~'") - }; - leading_sep = windows_root_rx.test(home) ? '' : home.$sub(new RegExp("" + "^([" + (sep_chars) + "]+).*$"), "\\1"); - if ($truthy(home['$start_with?'](leading_sep))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "non-absolute home") - }; - home = $rb_plus(home, sep); - home_path_regexp = new RegExp("" + "^\\~(?:" + (sep) + "|$)"); - path = path.$sub(home_path_regexp, home); - if ($truthy(basedir)) { - basedir = basedir.$sub(home_path_regexp, home)};}; - return self.$absolute_path(path, basedir); - }, $expand_path$2.$$arity = -2); - Opal.alias(self, "realpath", "expand_path"); - - // Coerce a given path to a path string using #to_path and #to_str - function $coerce_to_path(path) { - if ($truthy((path)['$respond_to?']("to_path"))) { - path = path.$to_path(); - } - - path = $$($nesting, 'Opal')['$coerce_to!'](path, $$($nesting, 'String'), "to_str"); - - return path; - } - - // Return a RegExp compatible char class - function $sep_chars() { - if ($$($nesting, 'ALT_SEPARATOR') === nil) { - return Opal.escape_regexp($$($nesting, 'SEPARATOR')); - } else { - return Opal.escape_regexp($rb_plus($$($nesting, 'SEPARATOR'), $$($nesting, 'ALT_SEPARATOR'))); - } - } - ; - - Opal.def(self, '$dirname', $dirname$3 = function $$dirname(path) { - var self = this, sep_chars = nil; - - - sep_chars = $sep_chars(); - path = $coerce_to_path(path); - - var absolute = path.match(new RegExp("" + "^[" + (sep_chars) + "]")); - - path = path.replace(new RegExp("" + "[" + (sep_chars) + "]+$"), ''); // remove trailing separators - path = path.replace(new RegExp("" + "[^" + (sep_chars) + "]+$"), ''); // remove trailing basename - path = path.replace(new RegExp("" + "[" + (sep_chars) + "]+$"), ''); // remove final trailing separators - - if (path === '') { - return absolute ? '/' : '.'; - } - - return path; - ; - }, $dirname$3.$$arity = 1); - - Opal.def(self, '$basename', $basename$4 = function $$basename(name, suffix) { - var self = this, sep_chars = nil; - - - - if (suffix == null) { - suffix = nil; - }; - sep_chars = $sep_chars(); - name = $coerce_to_path(name); - - if (name.length == 0) { - return name; - } - - if (suffix !== nil) { - suffix = $$($nesting, 'Opal')['$coerce_to!'](suffix, $$($nesting, 'String'), "to_str") - } else { - suffix = null; - } - - name = name.replace(new RegExp("" + "(.)[" + (sep_chars) + "]*$"), '$1'); - name = name.replace(new RegExp("" + "^(?:.*[" + (sep_chars) + "])?([^" + (sep_chars) + "]+)$"), '$1'); - - if (suffix === ".*") { - name = name.replace(/\.[^\.]+$/, ''); - } else if(suffix !== null) { - suffix = Opal.escape_regexp(suffix); - name = name.replace(new RegExp("" + (suffix) + "$"), ''); - } - - return name; - ; - }, $basename$4.$$arity = -2); - - Opal.def(self, '$extname', $extname$5 = function $$extname(path) { - var $a, self = this, filename = nil, last_dot_idx = nil; - - - path = $coerce_to_path(path); - filename = self.$basename(path); - if ($truthy(filename['$empty?']())) { - return ""}; - last_dot_idx = filename['$[]']($range(1, -1, false)).$rindex("."); - if ($truthy(($truthy($a = last_dot_idx['$nil?']()) ? $a : $rb_plus(last_dot_idx, 1)['$==']($rb_minus(filename.$length(), 1))))) { - return "" - } else { - return filename['$[]'](Opal.Range.$new($rb_plus(last_dot_idx, 1), -1, false)) - }; - }, $extname$5.$$arity = 1); - - Opal.def(self, '$exist?', $exist$ques$6 = function(path) { - var self = this; - - return Opal.modules[path] != null - }, $exist$ques$6.$$arity = 1); - Opal.alias(self, "exists?", "exist?"); - - Opal.def(self, '$directory?', $directory$ques$7 = function(path) { - var $$8, self = this, files = nil, file = nil; - - - files = []; - - for (var key in Opal.modules) { - files.push(key) - } - ; - path = path.$gsub(new RegExp("" + "(^." + ($$($nesting, 'SEPARATOR')) + "+|" + ($$($nesting, 'SEPARATOR')) + "+$)")); - file = $send(files, 'find', [], ($$8 = function(f){var self = $$8.$$s || this; - - - - if (f == null) { - f = nil; - }; - return f['$=~'](new RegExp("" + "^" + (path)));}, $$8.$$s = self, $$8.$$arity = 1, $$8)); - return file; - }, $directory$ques$7.$$arity = 1); - - Opal.def(self, '$join', $join$9 = function $$join($a) { - var $post_args, paths, $$10, $$11, self = this, result = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - paths = $post_args;; - if ($truthy(paths['$empty?']())) { - return ""}; - result = ""; - paths = $send(paths.$flatten().$each_with_index(), 'map', [], ($$10 = function(item, index){var self = $$10.$$s || this, $b; - - - - if (item == null) { - item = nil; - }; - - if (index == null) { - index = nil; - }; - if ($truthy((($b = index['$=='](0)) ? item['$empty?']() : index['$=='](0)))) { - return $$($nesting, 'SEPARATOR') - } else if ($truthy((($b = paths.$length()['$==']($rb_plus(index, 1))) ? item['$empty?']() : paths.$length()['$==']($rb_plus(index, 1))))) { - return $$($nesting, 'SEPARATOR') - } else { - return item - };}, $$10.$$s = self, $$10.$$arity = 2, $$10)); - paths = $send(paths, 'reject', [], "empty?".$to_proc()); - $send(paths, 'each_with_index', [], ($$11 = function(item, index){var self = $$11.$$s || this, $b, next_item = nil; - - - - if (item == null) { - item = nil; - }; - - if (index == null) { - index = nil; - }; - next_item = paths['$[]']($rb_plus(index, 1)); - if ($truthy(next_item['$nil?']())) { - return (result = "" + (result) + (item)) - } else { - - if ($truthy(($truthy($b = item['$end_with?']($$($nesting, 'SEPARATOR'))) ? next_item['$start_with?']($$($nesting, 'SEPARATOR')) : $b))) { - item = item.$sub(new RegExp("" + ($$($nesting, 'SEPARATOR')) + "+$"), "")}; - return (result = (function() {if ($truthy(($truthy($b = item['$end_with?']($$($nesting, 'SEPARATOR'))) ? $b : next_item['$start_with?']($$($nesting, 'SEPARATOR'))))) { - return "" + (result) + (item) - } else { - return "" + (result) + (item) + ($$($nesting, 'SEPARATOR')) - }; return nil; })()); - };}, $$11.$$s = self, $$11.$$arity = 2, $$11)); - return result; - }, $join$9.$$arity = -1); - return (Opal.def(self, '$split', $split$12 = function $$split(path) { - var self = this; - - return path.$split($$($nesting, 'SEPARATOR')) - }, $split$12.$$arity = 1), nil) && 'split'; - })(Opal.get_singleton_class(self), $nesting); - })($nesting[0], $$($nesting, 'IO'), $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/process"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$const_set', '$size', '$<<', '$__register_clock__', '$to_f', '$now', '$new', '$[]', '$raise']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Process'); - - var $nesting = [self].concat($parent_nesting), $Process___register_clock__$1, $Process_pid$2, $Process_times$3, $Process_clock_gettime$4, monotonic = nil; - - - self.__clocks__ = []; - Opal.defs(self, '$__register_clock__', $Process___register_clock__$1 = function $$__register_clock__(name, func) { - var self = this; - if (self.__clocks__ == null) self.__clocks__ = nil; - - - self.$const_set(name, self.__clocks__.$size()); - return self.__clocks__['$<<'](func); - }, $Process___register_clock__$1.$$arity = 2); - self.$__register_clock__("CLOCK_REALTIME", function() { return Date.now() }); - monotonic = false; - - if (Opal.global.performance) { - monotonic = function() { - return performance.now() - }; - } - else if (Opal.global.process && process.hrtime) { - // let now be the base to get smaller numbers - var hrtime_base = process.hrtime(); - - monotonic = function() { - var hrtime = process.hrtime(hrtime_base); - var us = (hrtime[1] / 1000) | 0; // cut below microsecs; - return ((hrtime[0] * 1000) + (us / 1000)); - }; - } - ; - if ($truthy(monotonic)) { - self.$__register_clock__("CLOCK_MONOTONIC", monotonic)}; - Opal.defs(self, '$pid', $Process_pid$2 = function $$pid() { - var self = this; - - return 0 - }, $Process_pid$2.$$arity = 0); - Opal.defs(self, '$times', $Process_times$3 = function $$times() { - var self = this, t = nil; - - - t = $$($nesting, 'Time').$now().$to_f(); - return $$$($$($nesting, 'Benchmark'), 'Tms').$new(t, t, t, t, t); - }, $Process_times$3.$$arity = 0); - return (Opal.defs(self, '$clock_gettime', $Process_clock_gettime$4 = function $$clock_gettime(clock_id, unit) { - var $a, self = this, clock = nil; - if (self.__clocks__ == null) self.__clocks__ = nil; - - - - if (unit == null) { - unit = "float_second"; - }; - ($truthy($a = (clock = self.__clocks__['$[]'](clock_id))) ? $a : self.$raise($$$($$($nesting, 'Errno'), 'EINVAL'), "" + "clock_gettime(" + (clock_id) + ") " + (self.__clocks__['$[]'](clock_id)))); - - var ms = clock(); - switch (unit) { - case 'float_second': return (ms / 1000); // number of seconds as a float (default) - case 'float_millisecond': return (ms / 1); // number of milliseconds as a float - case 'float_microsecond': return (ms * 1000); // number of microseconds as a float - case 'second': return ((ms / 1000) | 0); // number of seconds as an integer - case 'millisecond': return ((ms / 1) | 0); // number of milliseconds as an integer - case 'microsecond': return ((ms * 1000) | 0); // number of microseconds as an integer - case 'nanosecond': return ((ms * 1000000) | 0); // number of nanoseconds as an integer - default: self.$raise($$($nesting, 'ArgumentError'), "" + "unexpected unit: " + (unit)) - } - ; - }, $Process_clock_gettime$4.$$arity = -2), nil) && 'clock_gettime'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Signal'); - - var $nesting = [self].concat($parent_nesting), $Signal_trap$5; - - return (Opal.defs(self, '$trap', $Signal_trap$5 = function $$trap($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $Signal_trap$5.$$arity = -1), nil) && 'trap' - })($nesting[0], null, $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'GC'); - - var $nesting = [self].concat($parent_nesting), $GC_start$6; - - return (Opal.defs(self, '$start', $GC_start$6 = function $$start() { - var self = this; - - return nil - }, $GC_start$6.$$arity = 0), nil) && 'start' - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/unsupported"] = function(Opal) { - var $public$35, $private$36, self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $module = Opal.module; - - Opal.add_stubs(['$raise', '$warn', '$%']); - - - var warnings = {}; - - function handle_unsupported_feature(message) { - switch (Opal.config.unsupported_features_severity) { - case 'error': - $$($nesting, 'Kernel').$raise($$($nesting, 'NotImplementedError'), message) - break; - case 'warning': - warn(message) - break; - default: // ignore - // noop - } - } - - function warn(string) { - if (warnings[string]) { - return; - } - - warnings[string] = true; - self.$warn(string); - } -; - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'String'); - - var $nesting = [self].concat($parent_nesting), $String_$lt$lt$1, $String_capitalize$excl$2, $String_chomp$excl$3, $String_chop$excl$4, $String_downcase$excl$5, $String_gsub$excl$6, $String_lstrip$excl$7, $String_next$excl$8, $String_reverse$excl$9, $String_slice$excl$10, $String_squeeze$excl$11, $String_strip$excl$12, $String_sub$excl$13, $String_succ$excl$14, $String_swapcase$excl$15, $String_tr$excl$16, $String_tr_s$excl$17, $String_upcase$excl$18, $String_prepend$19, $String_$$$eq$20, $String_clear$21, $String_encode$excl$22, $String_unicode_normalize$excl$23; - - - var ERROR = "String#%s not supported. Mutable String methods are not supported in Opal."; - - Opal.def(self, '$<<', $String_$lt$lt$1 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("<<")); - }, $String_$lt$lt$1.$$arity = -1); - - Opal.def(self, '$capitalize!', $String_capitalize$excl$2 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("capitalize!")); - }, $String_capitalize$excl$2.$$arity = -1); - - Opal.def(self, '$chomp!', $String_chomp$excl$3 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("chomp!")); - }, $String_chomp$excl$3.$$arity = -1); - - Opal.def(self, '$chop!', $String_chop$excl$4 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("chop!")); - }, $String_chop$excl$4.$$arity = -1); - - Opal.def(self, '$downcase!', $String_downcase$excl$5 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("downcase!")); - }, $String_downcase$excl$5.$$arity = -1); - - Opal.def(self, '$gsub!', $String_gsub$excl$6 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("gsub!")); - }, $String_gsub$excl$6.$$arity = -1); - - Opal.def(self, '$lstrip!', $String_lstrip$excl$7 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("lstrip!")); - }, $String_lstrip$excl$7.$$arity = -1); - - Opal.def(self, '$next!', $String_next$excl$8 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("next!")); - }, $String_next$excl$8.$$arity = -1); - - Opal.def(self, '$reverse!', $String_reverse$excl$9 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("reverse!")); - }, $String_reverse$excl$9.$$arity = -1); - - Opal.def(self, '$slice!', $String_slice$excl$10 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("slice!")); - }, $String_slice$excl$10.$$arity = -1); - - Opal.def(self, '$squeeze!', $String_squeeze$excl$11 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("squeeze!")); - }, $String_squeeze$excl$11.$$arity = -1); - - Opal.def(self, '$strip!', $String_strip$excl$12 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("strip!")); - }, $String_strip$excl$12.$$arity = -1); - - Opal.def(self, '$sub!', $String_sub$excl$13 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("sub!")); - }, $String_sub$excl$13.$$arity = -1); - - Opal.def(self, '$succ!', $String_succ$excl$14 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("succ!")); - }, $String_succ$excl$14.$$arity = -1); - - Opal.def(self, '$swapcase!', $String_swapcase$excl$15 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("swapcase!")); - }, $String_swapcase$excl$15.$$arity = -1); - - Opal.def(self, '$tr!', $String_tr$excl$16 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("tr!")); - }, $String_tr$excl$16.$$arity = -1); - - Opal.def(self, '$tr_s!', $String_tr_s$excl$17 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("tr_s!")); - }, $String_tr_s$excl$17.$$arity = -1); - - Opal.def(self, '$upcase!', $String_upcase$excl$18 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("upcase!")); - }, $String_upcase$excl$18.$$arity = -1); - - Opal.def(self, '$prepend', $String_prepend$19 = function $$prepend($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("prepend")); - }, $String_prepend$19.$$arity = -1); - - Opal.def(self, '$[]=', $String_$$$eq$20 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("[]=")); - }, $String_$$$eq$20.$$arity = -1); - - Opal.def(self, '$clear', $String_clear$21 = function $$clear($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("clear")); - }, $String_clear$21.$$arity = -1); - - Opal.def(self, '$encode!', $String_encode$excl$22 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("encode!")); - }, $String_encode$excl$22.$$arity = -1); - return (Opal.def(self, '$unicode_normalize!', $String_unicode_normalize$excl$23 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("unicode_normalize!")); - }, $String_unicode_normalize$excl$23.$$arity = -1), nil) && 'unicode_normalize!'; - })($nesting[0], null, $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Kernel'); - - var $nesting = [self].concat($parent_nesting), $Kernel_freeze$24, $Kernel_frozen$ques$25; - - - var ERROR = "Object freezing is not supported by Opal"; - - Opal.def(self, '$freeze', $Kernel_freeze$24 = function $$freeze() { - var self = this; - - - handle_unsupported_feature(ERROR); - return self; - }, $Kernel_freeze$24.$$arity = 0); - - Opal.def(self, '$frozen?', $Kernel_frozen$ques$25 = function() { - var self = this; - - - handle_unsupported_feature(ERROR); - return false; - }, $Kernel_frozen$ques$25.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Kernel'); - - var $nesting = [self].concat($parent_nesting), $Kernel_taint$26, $Kernel_untaint$27, $Kernel_tainted$ques$28; - - - var ERROR = "Object tainting is not supported by Opal"; - - Opal.def(self, '$taint', $Kernel_taint$26 = function $$taint() { - var self = this; - - - handle_unsupported_feature(ERROR); - return self; - }, $Kernel_taint$26.$$arity = 0); - - Opal.def(self, '$untaint', $Kernel_untaint$27 = function $$untaint() { - var self = this; - - - handle_unsupported_feature(ERROR); - return self; - }, $Kernel_untaint$27.$$arity = 0); - - Opal.def(self, '$tainted?', $Kernel_tainted$ques$28 = function() { - var self = this; - - - handle_unsupported_feature(ERROR); - return false; - }, $Kernel_tainted$ques$28.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Module'); - - var $nesting = [self].concat($parent_nesting), $Module_public$29, $Module_private_class_method$30, $Module_private_method_defined$ques$31, $Module_private_constant$32; - - - - Opal.def(self, '$public', $Module_public$29 = function($a) { - var $post_args, methods, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - methods = $post_args;; - - if (methods.length === 0) { - self.$$module_function = false; - } - - return nil; - ; - }, $Module_public$29.$$arity = -1); - Opal.alias(self, "private", "public"); - Opal.alias(self, "protected", "public"); - Opal.alias(self, "nesting", "public"); - - Opal.def(self, '$private_class_method', $Module_private_class_method$30 = function $$private_class_method($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self; - }, $Module_private_class_method$30.$$arity = -1); - Opal.alias(self, "public_class_method", "private_class_method"); - - Opal.def(self, '$private_method_defined?', $Module_private_method_defined$ques$31 = function(obj) { - var self = this; - - return false - }, $Module_private_method_defined$ques$31.$$arity = 1); - - Opal.def(self, '$private_constant', $Module_private_constant$32 = function $$private_constant($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $Module_private_constant$32.$$arity = -1); - Opal.alias(self, "protected_method_defined?", "private_method_defined?"); - Opal.alias(self, "public_instance_methods", "instance_methods"); - Opal.alias(self, "public_instance_method", "instance_method"); - return Opal.alias(self, "public_method_defined?", "method_defined?"); - })($nesting[0], null, $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Kernel'); - - var $nesting = [self].concat($parent_nesting), $Kernel_private_methods$33; - - - - Opal.def(self, '$private_methods', $Kernel_private_methods$33 = function $$private_methods($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return []; - }, $Kernel_private_methods$33.$$arity = -1); - Opal.alias(self, "private_instance_methods", "private_methods"); - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Kernel'); - - var $nesting = [self].concat($parent_nesting), $Kernel_eval$34; - - - Opal.def(self, '$eval', $Kernel_eval$34 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), "" + "To use Kernel#eval, you must first require 'opal-parser'. " + ("" + "See https://github.com/opal/opal/blob/" + ($$($nesting, 'RUBY_ENGINE_VERSION')) + "/docs/opal_parser.md for details.")); - }, $Kernel_eval$34.$$arity = -1) - })($nesting[0], $nesting); - Opal.defs(self, '$public', $public$35 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $public$35.$$arity = -1); - return (Opal.defs(self, '$private', $private$36 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $private$36.$$arity = -1), nil) && 'private'; -}; - -/* Generated by Opal 0.11.99.dev */ -(function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - self.$require("opal/base"); - self.$require("opal/mini"); - self.$require("corelib/string/encoding"); - self.$require("corelib/struct"); - self.$require("corelib/io"); - self.$require("corelib/main"); - self.$require("corelib/dir"); - self.$require("corelib/file"); - self.$require("corelib/process"); - return self.$require("corelib/unsupported"); -})(Opal); - - -// UMD Module -(function (root, factory) { - if (typeof module === 'object' && module.exports) { - // Node. Does not work with strict CommonJS, but - // only CommonJS-like environments that support module.exports, - // like Node. - module.exports = factory - } else if (typeof define === 'function' && define.amd) { - // AMD. Register a named module. - define('asciidoctor', ['module'], function (module) { - return factory(module.config()) - }) - } else { - // Browser globals (root is window) - root.Asciidoctor = factory - } -}(this, function (moduleConfig) { -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/browser/file"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass; - - Opal.add_stubs(['$new']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'File'); - - var $nesting = [self].concat($parent_nesting), $File_read$1; - - return (Opal.defs(self, '$read', $File_read$1 = function $$read(path) { - var self = this; - - - var data = ''; - var status = -1; - try { - var xhr = new XMLHttpRequest(); - xhr.open('GET', path, false); - xhr.addEventListener('load', function() { - status = this.status; - // status is 0 for local file mode (i.e., file://) - if (status === 0 || status === 200) { - data = this.responseText; - } - }); - xhr.overrideMimeType('text/plain'); - xhr.send(); - } - catch (e) { - throw $$($nesting, 'IOError').$new('Error reading file or directory: ' + path + '; reason: ' + e.message); - } - // assume that no data in local file mode means it doesn't exist - if (status === 404 || (status === 0 && !data)) { - throw $$($nesting, 'IOError').$new('No such file or directory: ' + path); - } - return data; - - }, $File_read$1.$$arity = 1), nil) && 'read' - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/browser"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - - var platform, engine, framework, ioModule; - - if (typeof moduleConfig === 'object' && typeof moduleConfig.runtime === 'object') { - var runtime = moduleConfig.runtime; - platform = runtime.platform; - engine = runtime.engine; - framework = runtime.framework; - ioModule = runtime.ioModule; - } - ioModule = ioModule || 'xmlhttprequest'; - platform = platform || 'browser'; - engine = engine || ''; - framework = framework || ''; -; - Opal.const_set($nesting[0], 'JAVASCRIPT_IO_MODULE', ioModule); - Opal.const_set($nesting[0], 'JAVASCRIPT_PLATFORM', platform); - Opal.const_set($nesting[0], 'JAVASCRIPT_ENGINE', engine); - Opal.const_set($nesting[0], 'JAVASCRIPT_FRAMEWORK', framework); - return self.$require("asciidoctor/js/opal_ext/browser/file"); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/browser/abstract_node"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy; - - Opal.add_stubs(['$uriish?', '$[]', '$web_path', '$path_resolver', '$descends_from?', '$base_dir', '$start_with?', '$attr?', '$join', '$prepare_source_string', '$read', '$fetch', '$warn', '$logger', '$normalize_system_path', '$read_asset']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'AbstractNode'); - - var $nesting = [self].concat($parent_nesting), $AbstractNode_read_contents$1, $AbstractNode_generate_data_uri_from_uri$2; - - self.$$prototype.document = nil; - - - Opal.def(self, '$read_contents', $AbstractNode_read_contents$1 = function $$read_contents(target, opts) { - var $a, $b, $c, self = this, doc = nil, start = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - doc = self.document; - if ($truthy(($truthy($a = $$($nesting, 'Helpers')['$uriish?'](target)) ? $a : ($truthy($b = ($truthy($c = (start = opts['$[]']("start"))) ? $$($nesting, 'Helpers')['$uriish?'](start) : $c)) ? (target = doc.$path_resolver().$web_path(target, start)) : $b)))) { - if ($truthy(($truthy($a = ($truthy($b = doc.$path_resolver()['$descends_from?'](target, doc.$base_dir())) ? $b : target['$start_with?']("chrome://"))) ? $a : doc['$attr?']("allow-uri-read")))) { - - try { - if ($truthy(opts['$[]']("normalize"))) { - return $$($nesting, 'Helpers').$prepare_source_string($$$('::', 'File').$read(target)).$join($$($nesting, 'LF')) - } else { - return $$$('::', 'File').$read(target) - } - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - - if ($truthy(opts.$fetch("warn_on_failure", true))) { - self.$logger().$warn("" + "could not retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target))}; - return nil; - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - } else { - - if ($truthy(opts.$fetch("warn_on_failure", true))) { - self.$logger().$warn("" + "cannot retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target) + " (allow-uri-read attribute not enabled)")}; - return nil; - } - } else { - - target = self.$normalize_system_path(target, opts['$[]']("start"), nil, $hash2(["target_name"], {"target_name": ($truthy($a = opts['$[]']("label")) ? $a : "asset")})); - return self.$read_asset(target, $hash2(["normalize", "warn_on_failure", "label"], {"normalize": opts['$[]']("normalize"), "warn_on_failure": opts.$fetch("warn_on_failure", true), "label": opts['$[]']("label")})); - }; - }, $AbstractNode_read_contents$1.$$arity = -2); - return (Opal.def(self, '$generate_data_uri_from_uri', $AbstractNode_generate_data_uri_from_uri$2 = function $$generate_data_uri_from_uri(image_uri, cache_uri) { - var self = this; - - - - if (cache_uri == null) { - cache_uri = false; - }; - - var contentType = '' - var b64encoded = '' - var status = -1 - - try { - var xhr = new XMLHttpRequest() - xhr.open('GET', image_uri, false) - // the response type cannot be changed for synchronous requests made from a document - // xhr.responseType = 'arraybuffer' - xhr.overrideMimeType('text/plain; charset=x-user-defined') - xhr.addEventListener('load', function() { - status = this.status - // status is 0 for local file mode (i.e., file://) - if (status === 0 || status === 200) { - var binary = '' - var rawText = this.responseText - for (var i = 0, len = rawText.length; i < len; ++i) { - var c = rawText.charCodeAt(i) - var byteCode = c & 0xff // byte at offset i - binary += String.fromCharCode(byteCode) - } - b64encoded = btoa(binary) - contentType = this.getResponseHeader('content-type') - } - }) - xhr.send(null) - // try to detect the MIME Type from the file extension - if (!contentType) { - if (image_uri.endsWith('.jpeg') || image_uri.endsWith('.jpg') || image_uri.endsWith('.jpe')) { - contentType = 'image/jpg' - } else if (image_uri.endsWith('.png')) { - contentType = 'image/png' - } else if (image_uri.endsWith('.svg')) { - contentType = 'image/svg+xml' - } else if (image_uri.endsWith('.bmp')) { - contentType = 'image/bmp' - } else if (image_uri.endsWith('.tif') || image_uri.endsWith('.tiff')) { - contentType = 'image/tiff' - } - } - } - catch (e) { - // something bad happened! - status = 0 - } - - // assume that no data in local file mode means it doesn't exist - if (status === 404 || (status === 0 && (!b64encoded || !contentType))) { - self.$logger().$warn('could not retrieve image data from URI: ' + image_uri) - return image_uri - } - return 'data:' + contentType + ';base64,' + b64encoded - ; - }, $AbstractNode_generate_data_uri_from_uri$2.$$arity = -2), nil) && 'generate_data_uri_from_uri'; - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/browser/open_uri"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $send = Opal.send; - - Opal.add_stubs(['$new', '$path']); - return (function($base, $parent_nesting) { - var self = $module($base, 'OpenURI'); - - var $nesting = [self].concat($parent_nesting), $OpenURI_open_uri$1; - - Opal.defs($$($nesting, 'OpenURI'), '$open_uri', $OpenURI_open_uri$1 = function $$open_uri(name, $a) { - var $post_args, rest, $iter = $OpenURI_open_uri$1.$$p, $yield = $iter || nil, self = this, file = nil; - - if ($iter) $OpenURI_open_uri$1.$$p = null; - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - rest = $post_args;; - file = $send($$($nesting, 'File'), 'new', [self.$path()].concat(Opal.to_a(rest))); - if (($yield !== nil)) { - return Opal.yield1($yield, file); - } else { - return file - }; - }, $OpenURI_open_uri$1.$$arity = -2) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/browser/path_resolver"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$absolute_path?', '$start_with?']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'PathResolver'); - - var $nesting = [self].concat($parent_nesting), $PathResolver_root$ques$1; - - return (Opal.def(self, '$root?', $PathResolver_root$ques$1 = function(path) { - var $a, self = this; - - return ($truthy($a = self['$absolute_path?'](path)) ? $a : path['$start_with?']("file://", "http://", "https://", "chrome://")) - }, $PathResolver_root$ques$1.$$arity = 1), nil) && 'root?' - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/browser/reader"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$posixify', '$new', '$base_dir', '$start_with?', '$uriish?', '$descends_from?', '$key?', '$attributes', '$replace_next_line', '$absolute_path?', '$==', '$empty?', '$!', '$slice', '$length']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'PreprocessorReader'); - - var $nesting = [self].concat($parent_nesting), $PreprocessorReader_resolve_include_path$1; - - self.$$prototype.path_resolver = self.$$prototype.document = self.$$prototype.include_stack = self.$$prototype.dir = nil; - return (Opal.def(self, '$resolve_include_path', $PreprocessorReader_resolve_include_path$1 = function $$resolve_include_path(target, attrlist, attributes) { - var $a, self = this, p_target = nil, target_type = nil, base_dir = nil, inc_path = nil, relpath = nil, ctx_dir = nil, top_level = nil, offset = nil; - - - p_target = (self.path_resolver = ($truthy($a = self.path_resolver) ? $a : $$($nesting, 'PathResolver').$new("\\"))).$posixify(target); - $a = ["file", self.document.$base_dir()], (target_type = $a[0]), (base_dir = $a[1]), $a; - if ($truthy(p_target['$start_with?']("file://"))) { - inc_path = (relpath = p_target) - } else if ($truthy($$($nesting, 'Helpers')['$uriish?'](p_target))) { - - if ($truthy(($truthy($a = self.path_resolver['$descends_from?'](p_target, base_dir)) ? $a : self.document.$attributes()['$key?']("allow-uri-read")))) { - } else { - return self.$replace_next_line("" + "link:" + (target) + "[" + (attrlist) + "]") - }; - inc_path = (relpath = p_target); - } else if ($truthy(self.path_resolver['$absolute_path?'](p_target))) { - inc_path = (relpath = "" + "file://" + ((function() {if ($truthy(p_target['$start_with?']("/"))) { - return "" - } else { - return "/" - }; return nil; })()) + (p_target)) - } else if ((ctx_dir = (function() {if ($truthy((top_level = self.include_stack['$empty?']()))) { - return base_dir - } else { - return self.dir - }; return nil; })())['$=='](".")) { - inc_path = (relpath = p_target) - } else if ($truthy(($truthy($a = ctx_dir['$start_with?']("file://")) ? $a : $$($nesting, 'Helpers')['$uriish?'](ctx_dir)['$!']()))) { - - inc_path = "" + (ctx_dir) + "/" + (p_target); - if ($truthy(top_level)) { - relpath = p_target - } else if ($truthy(($truthy($a = base_dir['$=='](".")) ? $a : (offset = self.path_resolver['$descends_from?'](inc_path, base_dir))['$!']()))) { - relpath = inc_path - } else { - relpath = inc_path.$slice(offset, inc_path.$length()) - }; - } else if ($truthy(top_level)) { - inc_path = "" + (ctx_dir) + "/" + ((relpath = p_target)) - } else if ($truthy(($truthy($a = (offset = self.path_resolver['$descends_from?'](ctx_dir, base_dir))) ? $a : self.document.$attributes()['$key?']("allow-uri-read")))) { - - inc_path = "" + (ctx_dir) + "/" + (p_target); - relpath = (function() {if ($truthy(offset)) { - - return inc_path.$slice(offset, inc_path.$length()); - } else { - return p_target - }; return nil; })(); - } else { - return self.$replace_next_line("" + "link:" + (target) + "[" + (attrlist) + "]") - }; - return [inc_path, "file", relpath]; - }, $PreprocessorReader_resolve_include_path$1.$$arity = 3), nil) && 'resolve_include_path' - })($nesting[0], $$($nesting, 'Reader'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/browser"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$==', '$require']); - if ($$($nesting, 'JAVASCRIPT_IO_MODULE')['$==']("xmlhttprequest")) { - - self.$require("asciidoctor/js/asciidoctor_ext/browser/abstract_node"); - self.$require("asciidoctor/js/asciidoctor_ext/browser/open_uri"); - self.$require("asciidoctor/js/asciidoctor_ext/browser/path_resolver"); - return self.$require("asciidoctor/js/asciidoctor_ext/browser/reader"); - } else { - return nil - } -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["set"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_le(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send, $module = Opal.module; - - Opal.add_stubs(['$include', '$new', '$nil?', '$===', '$raise', '$each', '$add', '$merge', '$class', '$respond_to?', '$subtract', '$dup', '$join', '$to_a', '$equal?', '$instance_of?', '$==', '$instance_variable_get', '$is_a?', '$size', '$all?', '$include?', '$[]=', '$-', '$enum_for', '$[]', '$<<', '$replace', '$delete', '$select', '$each_key', '$to_proc', '$empty?', '$eql?', '$instance_eval', '$clear', '$<', '$<=', '$keys']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Set'); - - var $nesting = [self].concat($parent_nesting), $Set_$$$1, $Set_initialize$2, $Set_dup$4, $Set_$minus$5, $Set_inspect$6, $Set_$eq_eq$7, $Set_add$9, $Set_classify$10, $Set_collect$excl$13, $Set_delete$15, $Set_delete$ques$16, $Set_delete_if$17, $Set_add$ques$20, $Set_each$21, $Set_empty$ques$22, $Set_eql$ques$23, $Set_clear$25, $Set_include$ques$26, $Set_merge$27, $Set_replace$29, $Set_size$30, $Set_subtract$31, $Set_$$33, $Set_superset$ques$34, $Set_proper_superset$ques$36, $Set_subset$ques$38, $Set_proper_subset$ques$40, $Set_to_a$42; - - self.$$prototype.hash = nil; - - self.$include($$($nesting, 'Enumerable')); - Opal.defs(self, '$[]', $Set_$$$1 = function($a) { - var $post_args, ary, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - ary = $post_args;; - return self.$new(ary); - }, $Set_$$$1.$$arity = -1); - - Opal.def(self, '$initialize', $Set_initialize$2 = function $$initialize(enum$) { - var $iter = $Set_initialize$2.$$p, block = $iter || nil, $$3, self = this; - - if ($iter) $Set_initialize$2.$$p = null; - - - if ($iter) $Set_initialize$2.$$p = null;; - - if (enum$ == null) { - enum$ = nil; - }; - self.hash = $hash2([], {}); - if ($truthy(enum$['$nil?']())) { - return nil}; - if ($truthy($$($nesting, 'Enumerable')['$==='](enum$))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "value must be enumerable") - }; - if ($truthy(block)) { - return $send(enum$, 'each', [], ($$3 = function(item){var self = $$3.$$s || this; - - - - if (item == null) { - item = nil; - }; - return self.$add(Opal.yield1(block, item));}, $$3.$$s = self, $$3.$$arity = 1, $$3)) - } else { - return self.$merge(enum$) - }; - }, $Set_initialize$2.$$arity = -1); - - Opal.def(self, '$dup', $Set_dup$4 = function $$dup() { - var self = this, result = nil; - - - result = self.$class().$new(); - return result.$merge(self); - }, $Set_dup$4.$$arity = 0); - - Opal.def(self, '$-', $Set_$minus$5 = function(enum$) { - var self = this; - - - if ($truthy(enum$['$respond_to?']("each"))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "value must be enumerable") - }; - return self.$dup().$subtract(enum$); - }, $Set_$minus$5.$$arity = 1); - Opal.alias(self, "difference", "-"); - - Opal.def(self, '$inspect', $Set_inspect$6 = function $$inspect() { - var self = this; - - return "" + "#" - }, $Set_inspect$6.$$arity = 0); - - Opal.def(self, '$==', $Set_$eq_eq$7 = function(other) { - var $a, $$8, self = this; - - if ($truthy(self['$equal?'](other))) { - return true - } else if ($truthy(other['$instance_of?'](self.$class()))) { - return self.hash['$=='](other.$instance_variable_get("@hash")) - } else if ($truthy(($truthy($a = other['$is_a?']($$($nesting, 'Set'))) ? self.$size()['$=='](other.$size()) : $a))) { - return $send(other, 'all?', [], ($$8 = function(o){var self = $$8.$$s || this; - if (self.hash == null) self.hash = nil; - - - - if (o == null) { - o = nil; - }; - return self.hash['$include?'](o);}, $$8.$$s = self, $$8.$$arity = 1, $$8)) - } else { - return false - } - }, $Set_$eq_eq$7.$$arity = 1); - - Opal.def(self, '$add', $Set_add$9 = function $$add(o) { - var self = this, $writer = nil; - - - - $writer = [o, true]; - $send(self.hash, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return self; - }, $Set_add$9.$$arity = 1); - Opal.alias(self, "<<", "add"); - - Opal.def(self, '$classify', $Set_classify$10 = function $$classify() { - var $iter = $Set_classify$10.$$p, block = $iter || nil, $$11, $$12, self = this, result = nil; - - if ($iter) $Set_classify$10.$$p = null; - - - if ($iter) $Set_classify$10.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("classify") - }; - result = $send($$($nesting, 'Hash'), 'new', [], ($$11 = function(h, k){var self = $$11.$$s || this, $writer = nil; - - - - if (h == null) { - h = nil; - }; - - if (k == null) { - k = nil; - }; - $writer = [k, self.$class().$new()]; - $send(h, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$11.$$s = self, $$11.$$arity = 2, $$11)); - $send(self, 'each', [], ($$12 = function(item){var self = $$12.$$s || this; - - - - if (item == null) { - item = nil; - }; - return result['$[]'](Opal.yield1(block, item)).$add(item);}, $$12.$$s = self, $$12.$$arity = 1, $$12)); - return result; - }, $Set_classify$10.$$arity = 0); - - Opal.def(self, '$collect!', $Set_collect$excl$13 = function() { - var $iter = $Set_collect$excl$13.$$p, block = $iter || nil, $$14, self = this, result = nil; - - if ($iter) $Set_collect$excl$13.$$p = null; - - - if ($iter) $Set_collect$excl$13.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("collect!") - }; - result = self.$class().$new(); - $send(self, 'each', [], ($$14 = function(item){var self = $$14.$$s || this; - - - - if (item == null) { - item = nil; - }; - return result['$<<'](Opal.yield1(block, item));}, $$14.$$s = self, $$14.$$arity = 1, $$14)); - return self.$replace(result); - }, $Set_collect$excl$13.$$arity = 0); - Opal.alias(self, "map!", "collect!"); - - Opal.def(self, '$delete', $Set_delete$15 = function(o) { - var self = this; - - - self.hash.$delete(o); - return self; - }, $Set_delete$15.$$arity = 1); - - Opal.def(self, '$delete?', $Set_delete$ques$16 = function(o) { - var self = this; - - if ($truthy(self['$include?'](o))) { - - self.$delete(o); - return self; - } else { - return nil - } - }, $Set_delete$ques$16.$$arity = 1); - - Opal.def(self, '$delete_if', $Set_delete_if$17 = function $$delete_if() { - var $$18, $$19, $iter = $Set_delete_if$17.$$p, $yield = $iter || nil, self = this; - - if ($iter) $Set_delete_if$17.$$p = null; - - if (($yield !== nil)) { - } else { - return self.$enum_for("delete_if") - }; - $send($send(self, 'select', [], ($$18 = function(o){var self = $$18.$$s || this; - - - - if (o == null) { - o = nil; - }; - return Opal.yield1($yield, o);;}, $$18.$$s = self, $$18.$$arity = 1, $$18)), 'each', [], ($$19 = function(o){var self = $$19.$$s || this; - if (self.hash == null) self.hash = nil; - - - - if (o == null) { - o = nil; - }; - return self.hash.$delete(o);}, $$19.$$s = self, $$19.$$arity = 1, $$19)); - return self; - }, $Set_delete_if$17.$$arity = 0); - - Opal.def(self, '$add?', $Set_add$ques$20 = function(o) { - var self = this; - - if ($truthy(self['$include?'](o))) { - return nil - } else { - return self.$add(o) - } - }, $Set_add$ques$20.$$arity = 1); - - Opal.def(self, '$each', $Set_each$21 = function $$each() { - var $iter = $Set_each$21.$$p, block = $iter || nil, self = this; - - if ($iter) $Set_each$21.$$p = null; - - - if ($iter) $Set_each$21.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("each") - }; - $send(self.hash, 'each_key', [], block.$to_proc()); - return self; - }, $Set_each$21.$$arity = 0); - - Opal.def(self, '$empty?', $Set_empty$ques$22 = function() { - var self = this; - - return self.hash['$empty?']() - }, $Set_empty$ques$22.$$arity = 0); - - Opal.def(self, '$eql?', $Set_eql$ques$23 = function(other) { - var $$24, self = this; - - return self.hash['$eql?']($send(other, 'instance_eval', [], ($$24 = function(){var self = $$24.$$s || this; - if (self.hash == null) self.hash = nil; - - return self.hash}, $$24.$$s = self, $$24.$$arity = 0, $$24))) - }, $Set_eql$ques$23.$$arity = 1); - - Opal.def(self, '$clear', $Set_clear$25 = function $$clear() { - var self = this; - - - self.hash.$clear(); - return self; - }, $Set_clear$25.$$arity = 0); - - Opal.def(self, '$include?', $Set_include$ques$26 = function(o) { - var self = this; - - return self.hash['$include?'](o) - }, $Set_include$ques$26.$$arity = 1); - Opal.alias(self, "member?", "include?"); - - Opal.def(self, '$merge', $Set_merge$27 = function $$merge(enum$) { - var $$28, self = this; - - - $send(enum$, 'each', [], ($$28 = function(item){var self = $$28.$$s || this; - - - - if (item == null) { - item = nil; - }; - return self.$add(item);}, $$28.$$s = self, $$28.$$arity = 1, $$28)); - return self; - }, $Set_merge$27.$$arity = 1); - - Opal.def(self, '$replace', $Set_replace$29 = function $$replace(enum$) { - var self = this; - - - self.$clear(); - self.$merge(enum$); - return self; - }, $Set_replace$29.$$arity = 1); - - Opal.def(self, '$size', $Set_size$30 = function $$size() { - var self = this; - - return self.hash.$size() - }, $Set_size$30.$$arity = 0); - Opal.alias(self, "length", "size"); - - Opal.def(self, '$subtract', $Set_subtract$31 = function $$subtract(enum$) { - var $$32, self = this; - - - $send(enum$, 'each', [], ($$32 = function(item){var self = $$32.$$s || this; - - - - if (item == null) { - item = nil; - }; - return self.$delete(item);}, $$32.$$s = self, $$32.$$arity = 1, $$32)); - return self; - }, $Set_subtract$31.$$arity = 1); - - Opal.def(self, '$|', $Set_$$33 = function(enum$) { - var self = this; - - - if ($truthy(enum$['$respond_to?']("each"))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "value must be enumerable") - }; - return self.$dup().$merge(enum$); - }, $Set_$$33.$$arity = 1); - - Opal.def(self, '$superset?', $Set_superset$ques$34 = function(set) { - var $a, $$35, self = this; - - - ($truthy($a = set['$is_a?']($$($nesting, 'Set'))) ? $a : self.$raise($$($nesting, 'ArgumentError'), "value must be a set")); - if ($truthy($rb_lt(self.$size(), set.$size()))) { - return false}; - return $send(set, 'all?', [], ($$35 = function(o){var self = $$35.$$s || this; - - - - if (o == null) { - o = nil; - }; - return self['$include?'](o);}, $$35.$$s = self, $$35.$$arity = 1, $$35)); - }, $Set_superset$ques$34.$$arity = 1); - Opal.alias(self, ">=", "superset?"); - - Opal.def(self, '$proper_superset?', $Set_proper_superset$ques$36 = function(set) { - var $a, $$37, self = this; - - - ($truthy($a = set['$is_a?']($$($nesting, 'Set'))) ? $a : self.$raise($$($nesting, 'ArgumentError'), "value must be a set")); - if ($truthy($rb_le(self.$size(), set.$size()))) { - return false}; - return $send(set, 'all?', [], ($$37 = function(o){var self = $$37.$$s || this; - - - - if (o == null) { - o = nil; - }; - return self['$include?'](o);}, $$37.$$s = self, $$37.$$arity = 1, $$37)); - }, $Set_proper_superset$ques$36.$$arity = 1); - Opal.alias(self, ">", "proper_superset?"); - - Opal.def(self, '$subset?', $Set_subset$ques$38 = function(set) { - var $a, $$39, self = this; - - - ($truthy($a = set['$is_a?']($$($nesting, 'Set'))) ? $a : self.$raise($$($nesting, 'ArgumentError'), "value must be a set")); - if ($truthy($rb_lt(set.$size(), self.$size()))) { - return false}; - return $send(self, 'all?', [], ($$39 = function(o){var self = $$39.$$s || this; - - - - if (o == null) { - o = nil; - }; - return set['$include?'](o);}, $$39.$$s = self, $$39.$$arity = 1, $$39)); - }, $Set_subset$ques$38.$$arity = 1); - Opal.alias(self, "<=", "subset?"); - - Opal.def(self, '$proper_subset?', $Set_proper_subset$ques$40 = function(set) { - var $a, $$41, self = this; - - - ($truthy($a = set['$is_a?']($$($nesting, 'Set'))) ? $a : self.$raise($$($nesting, 'ArgumentError'), "value must be a set")); - if ($truthy($rb_le(set.$size(), self.$size()))) { - return false}; - return $send(self, 'all?', [], ($$41 = function(o){var self = $$41.$$s || this; - - - - if (o == null) { - o = nil; - }; - return set['$include?'](o);}, $$41.$$s = self, $$41.$$arity = 1, $$41)); - }, $Set_proper_subset$ques$40.$$arity = 1); - Opal.alias(self, "<", "proper_subset?"); - Opal.alias(self, "+", "|"); - Opal.alias(self, "union", "|"); - return (Opal.def(self, '$to_a', $Set_to_a$42 = function $$to_a() { - var self = this; - - return self.hash.$keys() - }, $Set_to_a$42.$$arity = 0), nil) && 'to_a'; - })($nesting[0], null, $nesting); - return (function($base, $parent_nesting) { - var self = $module($base, 'Enumerable'); - - var $nesting = [self].concat($parent_nesting), $Enumerable_to_set$43; - - - Opal.def(self, '$to_set', $Enumerable_to_set$43 = function $$to_set($a, $b) { - var $iter = $Enumerable_to_set$43.$$p, block = $iter || nil, $post_args, klass, args, self = this; - - if ($iter) $Enumerable_to_set$43.$$p = null; - - - if ($iter) $Enumerable_to_set$43.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - if ($post_args.length > 0) { - klass = $post_args[0]; - $post_args.splice(0, 1); - } - if (klass == null) { - klass = $$($nesting, 'Set'); - }; - - args = $post_args;; - return $send(klass, 'new', [self].concat(Opal.to_a(args)), block.$to_proc()); - }, $Enumerable_to_set$43.$$arity = -1) - })($nesting[0], $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/kernel"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $send = Opal.send; - - Opal.add_stubs(['$new']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Kernel'); - - var $nesting = [self].concat($parent_nesting), $Kernel_open$1, $Kernel___dir__$2; - - - - Opal.def(self, '$open', $Kernel_open$1 = function $$open(path, $a) { - var $post_args, rest, $iter = $Kernel_open$1.$$p, $yield = $iter || nil, self = this, file = nil; - - if ($iter) $Kernel_open$1.$$p = null; - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - rest = $post_args;; - file = $send($$($nesting, 'File'), 'new', [path].concat(Opal.to_a(rest))); - if (($yield !== nil)) { - return Opal.yield1($yield, file); - } else { - return file - }; - }, $Kernel_open$1.$$arity = -2); - - Opal.def(self, '$__dir__', $Kernel___dir__$2 = function $$__dir__() { - var self = this; - - return "" - }, $Kernel___dir__$2.$$arity = 0); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/file"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $gvars = Opal.gvars; - - Opal.add_stubs(['$attr_reader', '$delete', '$gsub', '$read', '$size', '$to_enum', '$chomp', '$each_line', '$readlines', '$split']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'File'); - - var $nesting = [self].concat($parent_nesting), $File_initialize$1, $File_read$2, $File_each_line$3, $File_readlines$4; - - self.$$prototype.eof = self.$$prototype.path = nil; - - self.$attr_reader("eof"); - self.$attr_reader("lineno"); - self.$attr_reader("path"); - - Opal.def(self, '$initialize', $File_initialize$1 = function $$initialize(path, flags) { - var self = this, encoding_flag_regexp = nil; - - - - if (flags == null) { - flags = "r"; - }; - self.path = path; - self.contents = nil; - self.eof = false; - self.lineno = 0; - flags = flags.$delete("b"); - encoding_flag_regexp = /:(.*)/; - flags = flags.$gsub(encoding_flag_regexp, ""); - return (self.flags = flags); - }, $File_initialize$1.$$arity = -2); - - Opal.def(self, '$read', $File_read$2 = function $$read() { - var self = this, res = nil; - - if ($truthy(self.eof)) { - return "" - } else { - - res = $$($nesting, 'File').$read(self.path); - self.eof = true; - self.lineno = res.$size(); - return res; - } - }, $File_read$2.$$arity = 0); - - Opal.def(self, '$each_line', $File_each_line$3 = function $$each_line(separator) { - var $iter = $File_each_line$3.$$p, block = $iter || nil, self = this, lines = nil; - if ($gvars["/"] == null) $gvars["/"] = nil; - - if ($iter) $File_each_line$3.$$p = null; - - - if ($iter) $File_each_line$3.$$p = null;; - - if (separator == null) { - separator = $gvars["/"]; - }; - if ($truthy(self.eof)) { - return (function() {if ((block !== nil)) { - return self - } else { - return [].$to_enum() - }; return nil; })()}; - if ((block !== nil)) { - - lines = $$($nesting, 'File').$read(self.path); - - self.eof = false; - self.lineno = 0; - var chomped = lines.$chomp(), - trailing = lines.length != chomped.length, - splitted = chomped.split(separator); - for (var i = 0, length = splitted.length; i < length; i++) { - self.lineno += 1; - if (i < length - 1 || trailing) { - Opal.yield1(block, splitted[i] + separator); - } - else { - Opal.yield1(block, splitted[i]); - } - } - self.eof = true; - ; - return self; - } else { - return self.$read().$each_line() - }; - }, $File_each_line$3.$$arity = -1); - - Opal.def(self, '$readlines', $File_readlines$4 = function $$readlines() { - var self = this; - - return $$($nesting, 'File').$readlines(self.path) - }, $File_readlines$4.$$arity = 0); - return (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $readlines$5, $file$ques$6, $readable$ques$7, $read$8; - - - - Opal.def(self, '$readlines', $readlines$5 = function $$readlines(path, separator) { - var self = this, content = nil; - if ($gvars["/"] == null) $gvars["/"] = nil; - - - - if (separator == null) { - separator = $gvars["/"]; - }; - content = $$($nesting, 'File').$read(path); - return content.$split(separator); - }, $readlines$5.$$arity = -2); - - Opal.def(self, '$file?', $file$ques$6 = function(path) { - var self = this; - - return true - }, $file$ques$6.$$arity = 1); - - Opal.def(self, '$readable?', $readable$ques$7 = function(path) { - var self = this; - - return true - }, $readable$ques$7.$$arity = 1); - return (Opal.def(self, '$read', $read$8 = function $$read(path) { - var self = this; - - return "" - }, $read$8.$$arity = 1), nil) && 'read'; - })(Opal.get_singleton_class(self), $nesting); - })($nesting[0], null, $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'IO'); - - var $nesting = [self].concat($parent_nesting), $IO_read$9; - - return (Opal.defs(self, '$read', $IO_read$9 = function $$read(path) { - var self = this; - - return $$($nesting, 'File').$read(path) - }, $IO_read$9.$$arity = 1), nil) && 'read' - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/match_data"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $send = Opal.send; - - Opal.add_stubs(['$[]=', '$-']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'MatchData'); - - var $nesting = [self].concat($parent_nesting), $MatchData_$$$eq$1; - - self.$$prototype.matches = nil; - return (Opal.def(self, '$[]=', $MatchData_$$$eq$1 = function(idx, val) { - var self = this, $writer = nil; - - - $writer = [idx, val]; - $send(self.matches, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $MatchData_$$$eq$1.$$arity = 2), nil) && '[]=' - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/string"] = function(Opal) { - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$method_defined?', '$<', '$length', '$bytes', '$to_s', '$byteslice', '$==', '$_original_unpack']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'String'); - - var $nesting = [self].concat($parent_nesting), $String_limit_bytesize$1, $String_unpack$2; - - - if ($truthy(self['$method_defined?']("limit_bytesize"))) { - } else { - - Opal.def(self, '$limit_bytesize', $String_limit_bytesize$1 = function $$limit_bytesize(size) { - var self = this, result = nil; - - - if ($truthy($rb_lt(size, self.$bytes().$length()))) { - } else { - return self.$to_s() - }; - result = self.$byteslice(0, size); - return result.$to_s(); - }, $String_limit_bytesize$1.$$arity = 1) - }; - if ($truthy(self['$method_defined?']("limit"))) { - } else { - Opal.alias(self, "limit", "limit_bytesize") - }; - Opal.alias(self, "_original_unpack", "unpack"); - return (Opal.def(self, '$unpack', $String_unpack$2 = function $$unpack(format) { - var self = this; - - if (format['$==']("C3")) { - - var bytes = [] - for (var i=0; i < 3; i++) { - if (i < self.length) { - bytes.push(self.charCodeAt(i)) - } else { - bytes.push(nil) - } - } - return bytes - - } else { - return self.$_original_unpack(format) - } - }, $String_unpack$2.$$arity = 1), nil) && 'unpack'; - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/uri"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module; - - Opal.add_stubs(['$extend']); - return (function($base, $parent_nesting) { - var self = $module($base, 'URI'); - - var $nesting = [self].concat($parent_nesting), $URI_parse$1, $URI_path$2; - - - Opal.defs(self, '$parse', $URI_parse$1 = function $$parse(str) { - var self = this; - - return str.$extend($$($nesting, 'URI')) - }, $URI_parse$1.$$arity = 1); - - Opal.def(self, '$path', $URI_path$2 = function $$path() { - var self = this; - - return self - }, $URI_path$2.$$arity = 0); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/base64"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $truthy = Opal.truthy; - - Opal.add_stubs(['$delete']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Base64'); - - var $nesting = [self].concat($parent_nesting), $Base64_decode64$1, $Base64_encode64$2, $Base64_strict_decode64$3, $Base64_strict_encode64$4, $Base64_urlsafe_decode64$5, $Base64_urlsafe_encode64$6; - - - - var encode, decode; - encode = Opal.global.btoa || function (input) { - var buffer; - if (input instanceof Buffer) { - buffer = input; - } else { - buffer = Buffer.from(input.toString(), 'binary'); - } - return buffer.toString('base64'); - }; - decode = Opal.global.atob || function (input) { - return Buffer.from(input, 'base64').toString('binary'); - }; - ; - Opal.defs(self, '$decode64', $Base64_decode64$1 = function $$decode64(string) { - var self = this; - - return decode(string.replace(/\r?\n/g, '')); - }, $Base64_decode64$1.$$arity = 1); - Opal.defs(self, '$encode64', $Base64_encode64$2 = function $$encode64(string) { - var self = this; - - return encode(string).replace(/(.{60})/g, "$1\n").replace(/([^\n])$/g, "$1\n"); - }, $Base64_encode64$2.$$arity = 1); - Opal.defs(self, '$strict_decode64', $Base64_strict_decode64$3 = function $$strict_decode64(string) { - var self = this; - - return decode(string); - }, $Base64_strict_decode64$3.$$arity = 1); - Opal.defs(self, '$strict_encode64', $Base64_strict_encode64$4 = function $$strict_encode64(string) { - var self = this; - - return encode(string); - }, $Base64_strict_encode64$4.$$arity = 1); - Opal.defs(self, '$urlsafe_decode64', $Base64_urlsafe_decode64$5 = function $$urlsafe_decode64(string) { - var self = this; - - return decode(string.replace(/\-/g, '+').replace(/_/g, '/')); - }, $Base64_urlsafe_decode64$5.$$arity = 1); - Opal.defs(self, '$urlsafe_encode64', $Base64_urlsafe_encode64$6 = function $$urlsafe_encode64(string, $kwargs) { - var padding, self = this, str = nil; - - - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - padding = $kwargs.$$smap["padding"]; - if (padding == null) { - padding = true - }; - str = encode(string).replace(/\+/g, '-').replace(/\//g, '_'); - if ($truthy(padding)) { - } else { - str = str.$delete("=") - }; - return str; - }, $Base64_urlsafe_encode64$6.$$arity = -2); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/number"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$coerce_to!', '$>']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Number'); - - var $nesting = [self].concat($parent_nesting), $Number_round$1; - - return (Opal.def(self, '$round', $Number_round$1 = function $$round(ndigits) { - var self = this; - - - ; - ndigits = $$($nesting, 'Opal')['$coerce_to!'](ndigits, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_gt(ndigits, 0))) { - return Number(self.toFixed(ndigits)); - } else { - return Math.round(self); - }; - }, $Number_round$1.$$arity = -1), nil) && 'round' - })($nesting[0], $$($nesting, 'Numeric'), $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - self.$require("asciidoctor/js/opal_ext/kernel"); - self.$require("asciidoctor/js/opal_ext/file"); - self.$require("asciidoctor/js/opal_ext/match_data"); - self.$require("asciidoctor/js/opal_ext/string"); - self.$require("asciidoctor/js/opal_ext/uri"); - self.$require("asciidoctor/js/opal_ext/base64"); - self.$require("asciidoctor/js/opal_ext/number"); - -// suppress "not supported" warning messages from Opal -Opal.config.unsupported_features_severity = 'ignore' - -// Load specific runtime -self.$require("asciidoctor/js/opal_ext/browser"); -; -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/rx"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $send = Opal.send, $gvars = Opal.gvars, $truthy = Opal.truthy; - - Opal.add_stubs(['$gsub', '$+', '$unpack_hex_range']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting), $Asciidoctor_unpack_hex_range$1; - - - Opal.const_set($nesting[0], 'HEX_RANGE_RX', /([A-F0-9]{4})(?:-([A-F0-9]{4}))?/); - Opal.defs(self, '$unpack_hex_range', $Asciidoctor_unpack_hex_range$1 = function $$unpack_hex_range(str) { - var $$2, self = this; - - return $send(str, 'gsub', [$$($nesting, 'HEX_RANGE_RX')], ($$2 = function(){var self = $$2.$$s || this, $a, $b; - - return "" + "\\u" + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](1))) + (($truthy($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](2))) ? "" + "-\\u" + ((($b = $gvars['~']) === nil ? nil : $b['$[]'](2))) : $a))}, $$2.$$s = self, $$2.$$arity = 0, $$2)) - }, $Asciidoctor_unpack_hex_range$1.$$arity = 1); - Opal.const_set($nesting[0], 'P_L', $rb_plus("A-Za-z", self.$unpack_hex_range("00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D037F03860388-038A038C038E-03A103A3-03F503F7-0481048A-052F0531-055605590561-058705D0-05EA05F0-05F20620-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280840-085808A0-08B20904-0939093D09500958-09610971-09800985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10CF10CF20D05-0D0C0D0E-0D100D12-0D3A0D3D0D4E0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC-0EDF0F000F40-0F470F49-0F6C0F88-0F8C1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510C710CD10D0-10FA10FC-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA16F1-16F81700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191E1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1BBA-1BE51C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11CF51CF61D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209C21022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2CF22CF32D00-2D252D272D2D2D30-2D672D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31BA31F0-31FF3400-4DB54E00-9FCCA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A66EA67F-A69DA6A0-A6E5A717-A71FA722-A788A78B-A78EA790-A7ADA7B0A7B1A7F7-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFA9E0-A9E4A9E6-A9EFA9FA-A9FEAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA7E-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDAAE0-AAEAAAF2-AAF4AB01-AB06AB09-AB0EAB11-AB16AB20-AB26AB28-AB2EAB30-AB5AAB5C-AB5FAB64AB65ABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC"))); - Opal.const_set($nesting[0], 'P_Nl', self.$unpack_hex_range("16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF")); - Opal.const_set($nesting[0], 'P_Nd', $rb_plus("0-9", self.$unpack_hex_range("0660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0DE6-0DEF0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19D91A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9A9F0-A9F9AA50-AA59ABF0-ABF9FF10-FF19"))); - Opal.const_set($nesting[0], 'P_Pc', self.$unpack_hex_range("005F203F20402054FE33FE34FE4D-FE4FFF3F")); - Opal.const_set($nesting[0], 'CC_ALPHA', "" + ($$($nesting, 'P_L')) + ($$($nesting, 'P_Nl'))); - Opal.const_set($nesting[0], 'CG_ALPHA', "" + "[" + ($$($nesting, 'CC_ALPHA')) + "]"); - Opal.const_set($nesting[0], 'CC_ALNUM', "" + ($$($nesting, 'CC_ALPHA')) + ($$($nesting, 'P_Nd'))); - Opal.const_set($nesting[0], 'CG_ALNUM', "" + "[" + ($$($nesting, 'CC_ALNUM')) + "]"); - Opal.const_set($nesting[0], 'CC_WORD', "" + ($$($nesting, 'CC_ALNUM')) + ($$($nesting, 'P_Pc'))); - Opal.const_set($nesting[0], 'CG_WORD', "" + "[" + ($$($nesting, 'CC_WORD')) + "]"); - Opal.const_set($nesting[0], 'CG_BLANK', "[ \\t]"); - Opal.const_set($nesting[0], 'CC_EOL', "(?=\\n|$)"); - Opal.const_set($nesting[0], 'CG_GRAPH', "[^\\s\\x00-\\x1F\\x7F]"); - Opal.const_set($nesting[0], 'CC_ALL', "[\\s\\S]"); - Opal.const_set($nesting[0], 'CC_ANY', "[^\\n]"); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["strscan"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $send = Opal.send; - - Opal.add_stubs(['$attr_reader', '$anchor', '$scan_until', '$length', '$size', '$rest', '$pos=', '$-', '$private']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'StringScanner'); - - var $nesting = [self].concat($parent_nesting), $StringScanner_initialize$1, $StringScanner_beginning_of_line$ques$2, $StringScanner_scan$3, $StringScanner_scan_until$4, $StringScanner_$$$5, $StringScanner_check$6, $StringScanner_check_until$7, $StringScanner_peek$8, $StringScanner_eos$ques$9, $StringScanner_exist$ques$10, $StringScanner_skip$11, $StringScanner_skip_until$12, $StringScanner_get_byte$13, $StringScanner_match$ques$14, $StringScanner_pos$eq$15, $StringScanner_matched_size$16, $StringScanner_post_match$17, $StringScanner_pre_match$18, $StringScanner_reset$19, $StringScanner_rest$20, $StringScanner_rest$ques$21, $StringScanner_rest_size$22, $StringScanner_terminate$23, $StringScanner_unscan$24, $StringScanner_anchor$25; - - self.$$prototype.pos = self.$$prototype.string = self.$$prototype.working = self.$$prototype.matched = self.$$prototype.prev_pos = self.$$prototype.match = nil; - - self.$attr_reader("pos"); - self.$attr_reader("matched"); - - Opal.def(self, '$initialize', $StringScanner_initialize$1 = function $$initialize(string) { - var self = this; - - - self.string = string; - self.pos = 0; - self.matched = nil; - self.working = string; - return (self.match = []); - }, $StringScanner_initialize$1.$$arity = 1); - self.$attr_reader("string"); - - Opal.def(self, '$beginning_of_line?', $StringScanner_beginning_of_line$ques$2 = function() { - var self = this; - - return self.pos === 0 || self.string.charAt(self.pos - 1) === "\n" - }, $StringScanner_beginning_of_line$ques$2.$$arity = 0); - Opal.alias(self, "bol?", "beginning_of_line?"); - - Opal.def(self, '$scan', $StringScanner_scan$3 = function $$scan(pattern) { - var self = this; - - - pattern = self.$anchor(pattern); - - var result = pattern.exec(self.working); - - if (result == null) { - return self.matched = nil; - } - else if (typeof(result) === 'object') { - self.prev_pos = self.pos; - self.pos += result[0].length; - self.working = self.working.substring(result[0].length); - self.matched = result[0]; - self.match = result; - - return result[0]; - } - else if (typeof(result) === 'string') { - self.pos += result.length; - self.working = self.working.substring(result.length); - - return result; - } - else { - return nil; - } - ; - }, $StringScanner_scan$3.$$arity = 1); - - Opal.def(self, '$scan_until', $StringScanner_scan_until$4 = function $$scan_until(pattern) { - var self = this; - - - pattern = self.$anchor(pattern); - - var pos = self.pos, - working = self.working, - result; - - while (true) { - result = pattern.exec(working); - pos += 1; - working = working.substr(1); - - if (result == null) { - if (working.length === 0) { - return self.matched = nil; - } - - continue; - } - - self.matched = self.string.substr(self.pos, pos - self.pos - 1 + result[0].length); - self.prev_pos = pos - 1; - self.pos = pos; - self.working = working.substr(result[0].length); - - return self.matched; - } - ; - }, $StringScanner_scan_until$4.$$arity = 1); - - Opal.def(self, '$[]', $StringScanner_$$$5 = function(idx) { - var self = this; - - - var match = self.match; - - if (idx < 0) { - idx += match.length; - } - - if (idx < 0 || idx >= match.length) { - return nil; - } - - if (match[idx] == null) { - return nil; - } - - return match[idx]; - - }, $StringScanner_$$$5.$$arity = 1); - - Opal.def(self, '$check', $StringScanner_check$6 = function $$check(pattern) { - var self = this; - - - pattern = self.$anchor(pattern); - - var result = pattern.exec(self.working); - - if (result == null) { - return self.matched = nil; - } - - return self.matched = result[0]; - ; - }, $StringScanner_check$6.$$arity = 1); - - Opal.def(self, '$check_until', $StringScanner_check_until$7 = function $$check_until(pattern) { - var self = this; - - - var prev_pos = self.prev_pos, - pos = self.pos; - - var result = self.$scan_until(pattern); - - if (result !== nil) { - self.matched = result.substr(-1); - self.working = self.string.substr(pos); - } - - self.prev_pos = prev_pos; - self.pos = pos; - - return result; - - }, $StringScanner_check_until$7.$$arity = 1); - - Opal.def(self, '$peek', $StringScanner_peek$8 = function $$peek(length) { - var self = this; - - return self.working.substring(0, length) - }, $StringScanner_peek$8.$$arity = 1); - - Opal.def(self, '$eos?', $StringScanner_eos$ques$9 = function() { - var self = this; - - return self.working.length === 0 - }, $StringScanner_eos$ques$9.$$arity = 0); - - Opal.def(self, '$exist?', $StringScanner_exist$ques$10 = function(pattern) { - var self = this; - - - var result = pattern.exec(self.working); - - if (result == null) { - return nil; - } - else if (result.index == 0) { - return 0; - } - else { - return result.index + 1; - } - - }, $StringScanner_exist$ques$10.$$arity = 1); - - Opal.def(self, '$skip', $StringScanner_skip$11 = function $$skip(pattern) { - var self = this; - - - pattern = self.$anchor(pattern); - - var result = pattern.exec(self.working); - - if (result == null) { - return self.matched = nil; - } - else { - var match_str = result[0]; - var match_len = match_str.length; - - self.matched = match_str; - self.prev_pos = self.pos; - self.pos += match_len; - self.working = self.working.substring(match_len); - - return match_len; - } - ; - }, $StringScanner_skip$11.$$arity = 1); - - Opal.def(self, '$skip_until', $StringScanner_skip_until$12 = function $$skip_until(pattern) { - var self = this; - - - var result = self.$scan_until(pattern); - - if (result === nil) { - return nil; - } - else { - self.matched = result.substr(-1); - - return result.length; - } - - }, $StringScanner_skip_until$12.$$arity = 1); - - Opal.def(self, '$get_byte', $StringScanner_get_byte$13 = function $$get_byte() { - var self = this; - - - var result = nil; - - if (self.pos < self.string.length) { - self.prev_pos = self.pos; - self.pos += 1; - result = self.matched = self.working.substring(0, 1); - self.working = self.working.substring(1); - } - else { - self.matched = nil; - } - - return result; - - }, $StringScanner_get_byte$13.$$arity = 0); - Opal.alias(self, "getch", "get_byte"); - - Opal.def(self, '$match?', $StringScanner_match$ques$14 = function(pattern) { - var self = this; - - - pattern = self.$anchor(pattern); - - var result = pattern.exec(self.working); - - if (result == null) { - return nil; - } - else { - self.prev_pos = self.pos; - - return result[0].length; - } - ; - }, $StringScanner_match$ques$14.$$arity = 1); - - Opal.def(self, '$pos=', $StringScanner_pos$eq$15 = function(pos) { - var self = this; - - - - if (pos < 0) { - pos += self.string.$length(); - } - ; - self.pos = pos; - return (self.working = self.string.slice(pos)); - }, $StringScanner_pos$eq$15.$$arity = 1); - - Opal.def(self, '$matched_size', $StringScanner_matched_size$16 = function $$matched_size() { - var self = this; - - - if (self.matched === nil) { - return nil; - } - - return self.matched.length - - }, $StringScanner_matched_size$16.$$arity = 0); - - Opal.def(self, '$post_match', $StringScanner_post_match$17 = function $$post_match() { - var self = this; - - - if (self.matched === nil) { - return nil; - } - - return self.string.substr(self.pos); - - }, $StringScanner_post_match$17.$$arity = 0); - - Opal.def(self, '$pre_match', $StringScanner_pre_match$18 = function $$pre_match() { - var self = this; - - - if (self.matched === nil) { - return nil; - } - - return self.string.substr(0, self.prev_pos); - - }, $StringScanner_pre_match$18.$$arity = 0); - - Opal.def(self, '$reset', $StringScanner_reset$19 = function $$reset() { - var self = this; - - - self.working = self.string; - self.matched = nil; - return (self.pos = 0); - }, $StringScanner_reset$19.$$arity = 0); - - Opal.def(self, '$rest', $StringScanner_rest$20 = function $$rest() { - var self = this; - - return self.working - }, $StringScanner_rest$20.$$arity = 0); - - Opal.def(self, '$rest?', $StringScanner_rest$ques$21 = function() { - var self = this; - - return self.working.length !== 0 - }, $StringScanner_rest$ques$21.$$arity = 0); - - Opal.def(self, '$rest_size', $StringScanner_rest_size$22 = function $$rest_size() { - var self = this; - - return self.$rest().$size() - }, $StringScanner_rest_size$22.$$arity = 0); - - Opal.def(self, '$terminate', $StringScanner_terminate$23 = function $$terminate() { - var self = this, $writer = nil; - - - self.match = nil; - - $writer = [self.string.$length()]; - $send(self, 'pos=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - }, $StringScanner_terminate$23.$$arity = 0); - - Opal.def(self, '$unscan', $StringScanner_unscan$24 = function $$unscan() { - var self = this; - - - self.pos = self.prev_pos; - self.prev_pos = nil; - self.match = nil; - return self; - }, $StringScanner_unscan$24.$$arity = 0); - self.$private(); - return (Opal.def(self, '$anchor', $StringScanner_anchor$25 = function $$anchor(pattern) { - var self = this; - - - var flags = pattern.toString().match(/\/([^\/]+)$/); - flags = flags ? flags[1] : undefined; - return new RegExp('^(?:' + pattern.source + ')', flags); - - }, $StringScanner_anchor$25.$$arity = 1), nil) && 'anchor'; - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - self.$require("asciidoctor/js/opal_ext"); - self.$require("asciidoctor/js/rx"); - return self.$require("strscan"); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/core_ext/nil_or_empty"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$method_defined?']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NilClass'); - - var $nesting = [self].concat($parent_nesting); - - if ($truthy(self['$method_defined?']("nil_or_empty?"))) { - return nil - } else { - return Opal.alias(self, "nil_or_empty?", "nil?") - } - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'String'); - - var $nesting = [self].concat($parent_nesting); - - if ($truthy(self['$method_defined?']("nil_or_empty?"))) { - return nil - } else { - return Opal.alias(self, "nil_or_empty?", "empty?") - } - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Array'); - - var $nesting = [self].concat($parent_nesting); - - if ($truthy(self['$method_defined?']("nil_or_empty?"))) { - return nil - } else { - return Opal.alias(self, "nil_or_empty?", "empty?") - } - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Hash'); - - var $nesting = [self].concat($parent_nesting); - - if ($truthy(self['$method_defined?']("nil_or_empty?"))) { - return nil - } else { - return Opal.alias(self, "nil_or_empty?", "empty?") - } - })($nesting[0], null, $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Numeric'); - - var $nesting = [self].concat($parent_nesting); - - if ($truthy(self['$method_defined?']("nil_or_empty?"))) { - return nil - } else { - return Opal.alias(self, "nil_or_empty?", "nil?") - } - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/core_ext/hash/merge"] = function(Opal) { - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var $$1, self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $send = Opal.send, $truthy = Opal.truthy, $hash2 = Opal.hash2; - - Opal.add_stubs(['$==', '$arity', '$instance_method', '$send', '$new', '$<', '$length', '$>', '$inject', '$merge', '$[]']); - if ($$($nesting, 'Hash').$instance_method("merge").$arity()['$=='](1)) { - return $$($nesting, 'Hash').$send("prepend", $send($$($nesting, 'Module'), 'new', [], ($$1 = function(){var self = $$1.$$s || this, $merge$2; - - return (Opal.def(self, '$merge', $merge$2 = function $$merge($a) { - var $post_args, args, $$3, $iter = $merge$2.$$p, $yield = $iter || nil, self = this, len = nil; - - if ($iter) $merge$2.$$p = null; - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy($rb_lt((len = args.$length()), 1))) { - return $send(self, Opal.find_super_dispatcher(self, 'merge', $merge$2, false), [$hash2([], {})], null) - } else { - - if ($truthy($rb_gt(len, 1))) { - return $send(args, 'inject', [self], ($$3 = function(acc, arg){var self = $$3.$$s || this; - - - - if (acc == null) { - acc = nil; - }; - - if (arg == null) { - arg = nil; - }; - return acc.$merge(arg);}, $$3.$$s = self, $$3.$$arity = 2, $$3)) - } else { - - return $send(self, Opal.find_super_dispatcher(self, 'merge', $merge$2, false), [args['$[]'](0)], null); - }; - }; - }, $merge$2.$$arity = -1), nil) && 'merge'}, $$1.$$s = self, $$1.$$arity = 0, $$1))) - } else { - return nil - } -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/core_ext/match_data/names"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $truthy = Opal.truthy, $klass = Opal.klass; - - Opal.add_stubs(['$method_defined?']); - if ($truthy($$($nesting, 'MatchData')['$method_defined?']("names"))) { - return nil - } else { - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'MatchData'); - - var $nesting = [self].concat($parent_nesting), $MatchData_names$1; - - return (Opal.def(self, '$names', $MatchData_names$1 = function $$names() { - var self = this; - - return [] - }, $MatchData_names$1.$$arity = 0), nil) && 'names' - })($nesting[0], null, $nesting) - } -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/core_ext"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$==']); - - self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/nil_or_empty"); - self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/hash/merge"); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - return self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/match_data/names") - } else { - return nil - }; -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/helpers"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy, $gvars = Opal.gvars, $send = Opal.send, $hash2 = Opal.hash2; - - Opal.add_stubs(['$module_function', '$require', '$include?', '$include', '$==', '$===', '$path', '$message', '$raise', '$warn', '$logger', '$chomp', '$empty?', '$slice', '$unpack', '$[]', '$byteslice', '$bytesize', '$[]=', '$-', '$map', '$rstrip', '$encode', '$encoding', '$nil_or_empty?', '$!=', '$tap', '$each_line', '$<<', '$match?', '$gsub', '$rindex', '$index', '$basename', '$extname', '$!', '$length', '$directory?', '$dirname', '$mkdir_p', '$mkdir', '$private_constant', '$join', '$divmod', '$*', '$+', '$to_s', '$to_i', '$succ', '$class_for_name', '$const_get']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'Helpers'); - - var $nesting = [self].concat($parent_nesting), $Helpers_require_library$1, $Helpers_prepare_source_array$2, $Helpers_prepare_source_string$11, $Helpers_uriish$ques$16, $Helpers_encode_uri_component$17, $Helpers_encode_spaces_in_uri$18, $Helpers_rootname$19, $Helpers_basename$20, $Helpers_extname$ques$21, $Helpers_extname$22, $Helpers_extname$23, $Helpers_mkdir_p$24, $Helpers_int_to_roman$25, $Helpers_nextval$27, $Helpers_resolve_class$28, $Helpers_class_for_name$29; - - - self.$module_function(); - - Opal.def(self, '$require_library', $Helpers_require_library$1 = function $$require_library(name, gem_name, on_failure) { - var self = this, $case = nil, details = nil; - if ($gvars["!"] == null) $gvars["!"] = nil; - - - - if (gem_name == null) { - gem_name = true; - }; - - if (on_failure == null) { - on_failure = "abort"; - }; - try { - return self.$require(name) - } catch ($err) { - if (Opal.rescue($err, [$$$('::', 'LoadError')])) { - try { - - if ($truthy(self['$include?']($$($nesting, 'Logging')))) { - } else { - self.$include($$($nesting, 'Logging')) - }; - if ($truthy(gem_name)) { - - if (gem_name['$=='](true)) { - gem_name = name}; - $case = on_failure; - if ("abort"['$===']($case)) { - details = (function() {if ($gvars["!"].$path()['$=='](gem_name)) { - return "" - } else { - return "" + " (reason: " + ((function() {if ($truthy($gvars["!"].$path())) { - return "" + "cannot load '" + ($gvars["!"].$path()) + "'" - } else { - return $gvars["!"].$message() - }; return nil; })()) + ")" - }; return nil; })(); - self.$raise($$$('::', 'LoadError'), "" + "asciidoctor: FAILED: required gem '" + (gem_name) + "' is not available" + (details) + ". Processing aborted.");} - else if ("warn"['$===']($case)) { - details = (function() {if ($gvars["!"].$path()['$=='](gem_name)) { - return "" - } else { - return "" + " (reason: " + ((function() {if ($truthy($gvars["!"].$path())) { - return "" + "cannot load '" + ($gvars["!"].$path()) + "'" - } else { - return $gvars["!"].$message() - }; return nil; })()) + ")" - }; return nil; })(); - self.$logger().$warn("" + "optional gem '" + (gem_name) + "' is not available" + (details) + ". Functionality disabled.");}; - } else { - $case = on_failure; - if ("abort"['$===']($case)) {self.$raise($$$('::', 'LoadError'), "" + "asciidoctor: FAILED: " + ($gvars["!"].$message().$chomp(".")) + ". Processing aborted.")} - else if ("warn"['$===']($case)) {self.$logger().$warn("" + ($gvars["!"].$message().$chomp(".")) + ". Functionality disabled.")} - }; - return nil; - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - }, $Helpers_require_library$1.$$arity = -2); - - Opal.def(self, '$prepare_source_array', $Helpers_prepare_source_array$2 = function $$prepare_source_array(data, trim_end) { - var $$3, $$4, $$5, $$6, $$7, $$8, $$9, $$10, self = this, leading_2_bytes = nil, leading_bytes = nil, first = nil, $writer = nil; - - - - if (trim_end == null) { - trim_end = true; - }; - if ($truthy(data['$empty?']())) { - return []}; - if ((leading_2_bytes = (leading_bytes = (first = data['$[]'](0)).$unpack("C3")).$slice(0, 2))['$==']($$($nesting, 'BOM_BYTES_UTF_16LE'))) { - - - $writer = [0, first.$byteslice(2, first.$bytesize())]; - $send(data, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return (function() {if ($truthy(trim_end)) { - return $send(data, 'map', [], ($$3 = function(line){var self = $$3.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line.$encode($$($nesting, 'UTF_8'), $$$($$$('::', 'Encoding'), 'UTF_16LE')).$rstrip();}, $$3.$$s = self, $$3.$$arity = 1, $$3)) - } else { - return $send(data, 'map', [], ($$4 = function(line){var self = $$4.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line.$encode($$($nesting, 'UTF_8'), $$$($$$('::', 'Encoding'), 'UTF_16LE')).$chomp();}, $$4.$$s = self, $$4.$$arity = 1, $$4)) - }; return nil; })(); - } else if (leading_2_bytes['$==']($$($nesting, 'BOM_BYTES_UTF_16BE'))) { - - - $writer = [0, first.$byteslice(2, first.$bytesize())]; - $send(data, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return (function() {if ($truthy(trim_end)) { - return $send(data, 'map', [], ($$5 = function(line){var self = $$5.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line.$encode($$($nesting, 'UTF_8'), $$$($$$('::', 'Encoding'), 'UTF_16BE')).$rstrip();}, $$5.$$s = self, $$5.$$arity = 1, $$5)) - } else { - return $send(data, 'map', [], ($$6 = function(line){var self = $$6.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line.$encode($$($nesting, 'UTF_8'), $$$($$$('::', 'Encoding'), 'UTF_16BE')).$chomp();}, $$6.$$s = self, $$6.$$arity = 1, $$6)) - }; return nil; })(); - } else if (leading_bytes['$==']($$($nesting, 'BOM_BYTES_UTF_8'))) { - - $writer = [0, first.$byteslice(3, first.$bytesize())]; - $send(data, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if (first.$encoding()['$==']($$($nesting, 'UTF_8'))) { - if ($truthy(trim_end)) { - return $send(data, 'map', [], ($$7 = function(line){var self = $$7.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line.$rstrip();}, $$7.$$s = self, $$7.$$arity = 1, $$7)) - } else { - return $send(data, 'map', [], ($$8 = function(line){var self = $$8.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line.$chomp();}, $$8.$$s = self, $$8.$$arity = 1, $$8)) - } - } else if ($truthy(trim_end)) { - return $send(data, 'map', [], ($$9 = function(line){var self = $$9.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line.$encode($$($nesting, 'UTF_8')).$rstrip();}, $$9.$$s = self, $$9.$$arity = 1, $$9)) - } else { - return $send(data, 'map', [], ($$10 = function(line){var self = $$10.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line.$encode($$($nesting, 'UTF_8')).$chomp();}, $$10.$$s = self, $$10.$$arity = 1, $$10)) - }; - }, $Helpers_prepare_source_array$2.$$arity = -2); - - Opal.def(self, '$prepare_source_string', $Helpers_prepare_source_string$11 = function $$prepare_source_string(data, trim_end) { - var $$12, $$14, self = this, leading_2_bytes = nil, leading_bytes = nil; - - - - if (trim_end == null) { - trim_end = true; - }; - if ($truthy(data['$nil_or_empty?']())) { - return []}; - if ((leading_2_bytes = (leading_bytes = data.$unpack("C3")).$slice(0, 2))['$==']($$($nesting, 'BOM_BYTES_UTF_16LE'))) { - data = data.$byteslice(2, data.$bytesize()).$encode($$($nesting, 'UTF_8'), $$$($$$('::', 'Encoding'), 'UTF_16LE')) - } else if (leading_2_bytes['$==']($$($nesting, 'BOM_BYTES_UTF_16BE'))) { - data = data.$byteslice(2, data.$bytesize()).$encode($$($nesting, 'UTF_8'), $$$($$$('::', 'Encoding'), 'UTF_16BE')) - } else if (leading_bytes['$==']($$($nesting, 'BOM_BYTES_UTF_8'))) { - - data = data.$byteslice(3, data.$bytesize()); - if (data.$encoding()['$==']($$($nesting, 'UTF_8'))) { - } else { - data = data.$encode($$($nesting, 'UTF_8')) - }; - } else if ($truthy(data.$encoding()['$!=']($$($nesting, 'UTF_8')))) { - data = data.$encode($$($nesting, 'UTF_8'))}; - if ($truthy(trim_end)) { - return $send([], 'tap', [], ($$12 = function(lines){var self = $$12.$$s || this, $$13; - - - - if (lines == null) { - lines = nil; - }; - return $send(data, 'each_line', [], ($$13 = function(line){var self = $$13.$$s || this; - - - - if (line == null) { - line = nil; - }; - return lines['$<<'](line.$rstrip());}, $$13.$$s = self, $$13.$$arity = 1, $$13));}, $$12.$$s = self, $$12.$$arity = 1, $$12)) - } else { - return $send([], 'tap', [], ($$14 = function(lines){var self = $$14.$$s || this, $$15; - - - - if (lines == null) { - lines = nil; - }; - return $send(data, 'each_line', [], ($$15 = function(line){var self = $$15.$$s || this; - - - - if (line == null) { - line = nil; - }; - return lines['$<<'](line.$chomp());}, $$15.$$s = self, $$15.$$arity = 1, $$15));}, $$14.$$s = self, $$14.$$arity = 1, $$14)) - }; - }, $Helpers_prepare_source_string$11.$$arity = -2); - - Opal.def(self, '$uriish?', $Helpers_uriish$ques$16 = function(str) { - var $a, self = this; - - return ($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$match?'](str) : $a) - }, $Helpers_uriish$ques$16.$$arity = 1); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - - Opal.def(self, '$encode_uri_component', $Helpers_encode_uri_component$17 = function $$encode_uri_component(str) { - var self = this; - - - return encodeURIComponent(str).replace(/%20|[!'()*]/g, function (m) { - return m === '%20' ? '+' : '%' + m.charCodeAt(0).toString(16) - }) - - }, $Helpers_encode_uri_component$17.$$arity = 1) - } else { - nil - }; - - Opal.def(self, '$encode_spaces_in_uri', $Helpers_encode_spaces_in_uri$18 = function $$encode_spaces_in_uri(str) { - var self = this; - - if ($truthy(str['$include?'](" "))) { - - return str.$gsub(" ", "%20"); - } else { - return str - } - }, $Helpers_encode_spaces_in_uri$18.$$arity = 1); - - Opal.def(self, '$rootname', $Helpers_rootname$19 = function $$rootname(filename) { - var self = this, last_dot_idx = nil; - - if ($truthy((last_dot_idx = filename.$rindex(".")))) { - if ($truthy(filename.$index("/", last_dot_idx))) { - return filename - } else { - - return filename.$slice(0, last_dot_idx); - } - } else { - return filename - } - }, $Helpers_rootname$19.$$arity = 1); - - Opal.def(self, '$basename', $Helpers_basename$20 = function $$basename(filename, drop_ext) { - var self = this; - - - - if (drop_ext == null) { - drop_ext = nil; - }; - if ($truthy(drop_ext)) { - return $$$('::', 'File').$basename(filename, (function() {if (drop_ext['$=='](true)) { - - return self.$extname(filename); - } else { - return drop_ext - }; return nil; })()) - } else { - return $$$('::', 'File').$basename(filename) - }; - }, $Helpers_basename$20.$$arity = -2); - - Opal.def(self, '$extname?', $Helpers_extname$ques$21 = function(path) { - var $a, self = this, last_dot_idx = nil; - - return ($truthy($a = (last_dot_idx = path.$rindex("."))) ? path.$index("/", last_dot_idx)['$!']() : $a) - }, $Helpers_extname$ques$21.$$arity = 1); - if ($truthy($$$($$$('::', 'File'), 'ALT_SEPARATOR'))) { - - Opal.def(self, '$extname', $Helpers_extname$22 = function $$extname(path, fallback) { - var $a, self = this, last_dot_idx = nil; - - - - if (fallback == null) { - fallback = ""; - }; - if ($truthy((last_dot_idx = path.$rindex(".")))) { - if ($truthy(($truthy($a = path.$index("/", last_dot_idx)) ? $a : path.$index($$$($$$('::', 'File'), 'ALT_SEPARATOR'), last_dot_idx)))) { - return fallback - } else { - - return path.$slice(last_dot_idx, path.$length()); - } - } else { - return fallback - }; - }, $Helpers_extname$22.$$arity = -2) - } else { - - Opal.def(self, '$extname', $Helpers_extname$23 = function $$extname(path, fallback) { - var self = this, last_dot_idx = nil; - - - - if (fallback == null) { - fallback = ""; - }; - if ($truthy((last_dot_idx = path.$rindex(".")))) { - if ($truthy(path.$index("/", last_dot_idx))) { - return fallback - } else { - - return path.$slice(last_dot_idx, path.$length()); - } - } else { - return fallback - }; - }, $Helpers_extname$23.$$arity = -2) - }; - - Opal.def(self, '$mkdir_p', $Helpers_mkdir_p$24 = function $$mkdir_p(dir) { - var self = this, parent_dir = nil; - - if ($truthy($$$('::', 'File')['$directory?'](dir))) { - return nil - } else { - - if ((parent_dir = $$$('::', 'File').$dirname(dir))['$=='](".")) { - } else { - self.$mkdir_p(parent_dir) - }; - - try { - return $$$('::', 'Dir').$mkdir(dir) - } catch ($err) { - if (Opal.rescue($err, [$$$('::', 'SystemCallError')])) { - try { - if ($truthy($$$('::', 'File')['$directory?'](dir))) { - return nil - } else { - return self.$raise() - } - } finally { Opal.pop_exception() } - } else { throw $err; } - };; - } - }, $Helpers_mkdir_p$24.$$arity = 1); - Opal.const_set($nesting[0], 'ROMAN_NUMERALS', $hash2(["M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"], {"M": 1000, "CM": 900, "D": 500, "CD": 400, "C": 100, "XC": 90, "L": 50, "XL": 40, "X": 10, "IX": 9, "V": 5, "IV": 4, "I": 1})); - self.$private_constant("ROMAN_NUMERALS"); - - Opal.def(self, '$int_to_roman', $Helpers_int_to_roman$25 = function $$int_to_roman(val) { - var $$26, self = this; - - return $send($$($nesting, 'ROMAN_NUMERALS'), 'map', [], ($$26 = function(l, i){var self = $$26.$$s || this, $a, $b, repeat = nil; - - - - if (l == null) { - l = nil; - }; - - if (i == null) { - i = nil; - }; - $b = val.$divmod(i), $a = Opal.to_ary($b), (repeat = ($a[0] == null ? nil : $a[0])), (val = ($a[1] == null ? nil : $a[1])), $b; - return $rb_times(l, repeat);}, $$26.$$s = self, $$26.$$arity = 2, $$26)).$join() - }, $Helpers_int_to_roman$25.$$arity = 1); - - Opal.def(self, '$nextval', $Helpers_nextval$27 = function $$nextval(current) { - var self = this, intval = nil; - - if ($truthy($$$('::', 'Integer')['$==='](current))) { - return $rb_plus(current, 1) - } else if ((intval = current.$to_i()).$to_s()['$=='](current.$to_s())) { - return $rb_plus(intval, 1) - } else { - return current.$succ() - } - }, $Helpers_nextval$27.$$arity = 1); - - Opal.def(self, '$resolve_class', $Helpers_resolve_class$28 = function $$resolve_class(object) { - var self = this; - - if ($truthy($$$('::', 'Class')['$==='](object))) { - return object - } else { - - if ($truthy($$$('::', 'String')['$==='](object))) { - - return self.$class_for_name(object); - } else { - return nil - }; - } - }, $Helpers_resolve_class$28.$$arity = 1); - - Opal.def(self, '$class_for_name', $Helpers_class_for_name$29 = function $$class_for_name(qualified_name) { - var self = this, resolved = nil; - - try { - - if ($truthy($$$('::', 'Class')['$===']((resolved = $$$('::', 'Object').$const_get(qualified_name, false))))) { - } else { - self.$raise() - }; - return resolved; - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return self.$raise($$$('::', 'NameError'), "" + "Could not resolve class for name: " + (qualified_name)) - } finally { Opal.pop_exception() } - } else { throw $err; } - } - }, $Helpers_class_for_name$29.$$arity = 1); - })($nesting[0], $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["logger"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_le(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $module = Opal.module, $send = Opal.send, $truthy = Opal.truthy; - - Opal.add_stubs(['$include', '$to_h', '$map', '$constants', '$const_get', '$to_s', '$format', '$chr', '$strftime', '$message_as_string', '$===', '$+', '$message', '$class', '$join', '$backtrace', '$inspect', '$attr_reader', '$attr_accessor', '$new', '$key', '$upcase', '$raise', '$add', '$to_proc', '$<=', '$<', '$write', '$call', '$[]', '$now']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Logger'); - - var $nesting = [self].concat($parent_nesting), $Logger$1, $Logger_initialize$4, $Logger_level$eq$5, $Logger_info$6, $Logger_debug$7, $Logger_warn$8, $Logger_error$9, $Logger_fatal$10, $Logger_unknown$11, $Logger_info$ques$12, $Logger_debug$ques$13, $Logger_warn$ques$14, $Logger_error$ques$15, $Logger_fatal$ques$16, $Logger_add$17; - - self.$$prototype.level = self.$$prototype.progname = self.$$prototype.pipe = self.$$prototype.formatter = nil; - - (function($base, $parent_nesting) { - var self = $module($base, 'Severity'); - - var $nesting = [self].concat($parent_nesting); - - - Opal.const_set($nesting[0], 'DEBUG', 0); - Opal.const_set($nesting[0], 'INFO', 1); - Opal.const_set($nesting[0], 'WARN', 2); - Opal.const_set($nesting[0], 'ERROR', 3); - Opal.const_set($nesting[0], 'FATAL', 4); - Opal.const_set($nesting[0], 'UNKNOWN', 5); - })($nesting[0], $nesting); - self.$include($$($nesting, 'Severity')); - Opal.const_set($nesting[0], 'SEVERITY_LABELS', $send($$($nesting, 'Severity').$constants(), 'map', [], ($Logger$1 = function(s){var self = $Logger$1.$$s || this; - - - - if (s == null) { - s = nil; - }; - return [$$($nesting, 'Severity').$const_get(s), s.$to_s()];}, $Logger$1.$$s = self, $Logger$1.$$arity = 1, $Logger$1)).$to_h()); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Formatter'); - - var $nesting = [self].concat($parent_nesting), $Formatter_call$2, $Formatter_message_as_string$3; - - - Opal.const_set($nesting[0], 'MESSAGE_FORMAT', "%s, [%s] %5s -- %s: %s\n"); - Opal.const_set($nesting[0], 'DATE_TIME_FORMAT', "%Y-%m-%dT%H:%M:%S.%6N"); - - Opal.def(self, '$call', $Formatter_call$2 = function $$call(severity, time, progname, msg) { - var self = this; - - return self.$format($$($nesting, 'MESSAGE_FORMAT'), severity.$chr(), time.$strftime($$($nesting, 'DATE_TIME_FORMAT')), severity, progname, self.$message_as_string(msg)) - }, $Formatter_call$2.$$arity = 4); - return (Opal.def(self, '$message_as_string', $Formatter_message_as_string$3 = function $$message_as_string(msg) { - var $a, self = this, $case = nil; - - return (function() {$case = msg; - if ($$$('::', 'String')['$===']($case)) {return msg} - else if ($$$('::', 'Exception')['$===']($case)) {return $rb_plus("" + (msg.$message()) + " (" + (msg.$class()) + ")\n", ($truthy($a = msg.$backtrace()) ? $a : []).$join("\n"))} - else {return msg.$inspect()}})() - }, $Formatter_message_as_string$3.$$arity = 1), nil) && 'message_as_string'; - })($nesting[0], null, $nesting); - self.$attr_reader("level"); - self.$attr_accessor("progname"); - self.$attr_accessor("formatter"); - - Opal.def(self, '$initialize', $Logger_initialize$4 = function $$initialize(pipe) { - var self = this; - - - self.pipe = pipe; - self.level = $$($nesting, 'DEBUG'); - return (self.formatter = $$($nesting, 'Formatter').$new()); - }, $Logger_initialize$4.$$arity = 1); - - Opal.def(self, '$level=', $Logger_level$eq$5 = function(severity) { - var self = this, level = nil; - - if ($truthy($$$('::', 'Integer')['$==='](severity))) { - return (self.level = severity) - } else if ($truthy((level = $$($nesting, 'SEVERITY_LABELS').$key(severity.$to_s().$upcase())))) { - return (self.level = level) - } else { - return self.$raise($$($nesting, 'ArgumentError'), "" + "invalid log level: " + (severity)) - } - }, $Logger_level$eq$5.$$arity = 1); - - Opal.def(self, '$info', $Logger_info$6 = function $$info(progname) { - var $iter = $Logger_info$6.$$p, block = $iter || nil, self = this; - - if ($iter) $Logger_info$6.$$p = null; - - - if ($iter) $Logger_info$6.$$p = null;; - - if (progname == null) { - progname = nil; - }; - return $send(self, 'add', [$$($nesting, 'INFO'), nil, progname], block.$to_proc()); - }, $Logger_info$6.$$arity = -1); - - Opal.def(self, '$debug', $Logger_debug$7 = function $$debug(progname) { - var $iter = $Logger_debug$7.$$p, block = $iter || nil, self = this; - - if ($iter) $Logger_debug$7.$$p = null; - - - if ($iter) $Logger_debug$7.$$p = null;; - - if (progname == null) { - progname = nil; - }; - return $send(self, 'add', [$$($nesting, 'DEBUG'), nil, progname], block.$to_proc()); - }, $Logger_debug$7.$$arity = -1); - - Opal.def(self, '$warn', $Logger_warn$8 = function $$warn(progname) { - var $iter = $Logger_warn$8.$$p, block = $iter || nil, self = this; - - if ($iter) $Logger_warn$8.$$p = null; - - - if ($iter) $Logger_warn$8.$$p = null;; - - if (progname == null) { - progname = nil; - }; - return $send(self, 'add', [$$($nesting, 'WARN'), nil, progname], block.$to_proc()); - }, $Logger_warn$8.$$arity = -1); - - Opal.def(self, '$error', $Logger_error$9 = function $$error(progname) { - var $iter = $Logger_error$9.$$p, block = $iter || nil, self = this; - - if ($iter) $Logger_error$9.$$p = null; - - - if ($iter) $Logger_error$9.$$p = null;; - - if (progname == null) { - progname = nil; - }; - return $send(self, 'add', [$$($nesting, 'ERROR'), nil, progname], block.$to_proc()); - }, $Logger_error$9.$$arity = -1); - - Opal.def(self, '$fatal', $Logger_fatal$10 = function $$fatal(progname) { - var $iter = $Logger_fatal$10.$$p, block = $iter || nil, self = this; - - if ($iter) $Logger_fatal$10.$$p = null; - - - if ($iter) $Logger_fatal$10.$$p = null;; - - if (progname == null) { - progname = nil; - }; - return $send(self, 'add', [$$($nesting, 'FATAL'), nil, progname], block.$to_proc()); - }, $Logger_fatal$10.$$arity = -1); - - Opal.def(self, '$unknown', $Logger_unknown$11 = function $$unknown(progname) { - var $iter = $Logger_unknown$11.$$p, block = $iter || nil, self = this; - - if ($iter) $Logger_unknown$11.$$p = null; - - - if ($iter) $Logger_unknown$11.$$p = null;; - - if (progname == null) { - progname = nil; - }; - return $send(self, 'add', [$$($nesting, 'UNKNOWN'), nil, progname], block.$to_proc()); - }, $Logger_unknown$11.$$arity = -1); - - Opal.def(self, '$info?', $Logger_info$ques$12 = function() { - var self = this; - - return $rb_le(self.level, $$($nesting, 'INFO')) - }, $Logger_info$ques$12.$$arity = 0); - - Opal.def(self, '$debug?', $Logger_debug$ques$13 = function() { - var self = this; - - return $rb_le(self.level, $$($nesting, 'DEBUG')) - }, $Logger_debug$ques$13.$$arity = 0); - - Opal.def(self, '$warn?', $Logger_warn$ques$14 = function() { - var self = this; - - return $rb_le(self.level, $$($nesting, 'WARN')) - }, $Logger_warn$ques$14.$$arity = 0); - - Opal.def(self, '$error?', $Logger_error$ques$15 = function() { - var self = this; - - return $rb_le(self.level, $$($nesting, 'ERROR')) - }, $Logger_error$ques$15.$$arity = 0); - - Opal.def(self, '$fatal?', $Logger_fatal$ques$16 = function() { - var self = this; - - return $rb_le(self.level, $$($nesting, 'FATAL')) - }, $Logger_fatal$ques$16.$$arity = 0); - return (Opal.def(self, '$add', $Logger_add$17 = function $$add(severity, message, progname) { - var $iter = $Logger_add$17.$$p, block = $iter || nil, $a, self = this; - - if ($iter) $Logger_add$17.$$p = null; - - - if ($iter) $Logger_add$17.$$p = null;; - - if (message == null) { - message = nil; - }; - - if (progname == null) { - progname = nil; - }; - if ($truthy($rb_lt((severity = ($truthy($a = severity) ? $a : $$($nesting, 'UNKNOWN'))), self.level))) { - return true}; - progname = ($truthy($a = progname) ? $a : self.progname); - if ($truthy(message)) { - } else if ((block !== nil)) { - message = Opal.yieldX(block, []) - } else { - - message = progname; - progname = self.progname; - }; - self.pipe.$write(self.formatter.$call(($truthy($a = $$($nesting, 'SEVERITY_LABELS')['$[]'](severity)) ? $a : "ANY"), $$$('::', 'Time').$now(), progname, message)); - return true; - }, $Logger_add$17.$$arity = -2), nil) && 'add'; - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/logging"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $hash2 = Opal.hash2, $gvars = Opal.gvars; - - Opal.add_stubs(['$require', '$attr_reader', '$progname=', '$-', '$new', '$formatter=', '$level=', '$>', '$[]', '$===', '$inspect', '$tap', '$each', '$constants', '$const_get', '$[]=', '$<<', '$clear', '$empty?', '$max', '$map', '$attr_accessor', '$memoize_logger', '$private', '$private_class_method', '$extend', '$logger', '$merge']); - - self.$require("logger"); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Logger'); - - var $nesting = [self].concat($parent_nesting), $Logger_initialize$1, $Logger_add$2; - - self.$$prototype.max_severity = nil; - - self.$attr_reader("max_severity"); - - Opal.def(self, '$initialize', $Logger_initialize$1 = function $$initialize($a) { - var $post_args, args, $iter = $Logger_initialize$1.$$p, $yield = $iter || nil, self = this, $writer = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Logger_initialize$1.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $Logger_initialize$1, false), $zuper, $iter); - - $writer = ["asciidoctor"]; - $send(self, 'progname=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [$$($nesting, 'BasicFormatter').$new()]; - $send(self, 'formatter=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [$$($nesting, 'WARN')]; - $send(self, 'level=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - }, $Logger_initialize$1.$$arity = -1); - - Opal.def(self, '$add', $Logger_add$2 = function $$add(severity, message, progname) { - var $a, $iter = $Logger_add$2.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Logger_add$2.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if (message == null) { - message = nil; - }; - - if (progname == null) { - progname = nil; - }; - if ($truthy($rb_gt((severity = ($truthy($a = severity) ? $a : $$($nesting, 'UNKNOWN'))), (self.max_severity = ($truthy($a = self.max_severity) ? $a : severity))))) { - self.max_severity = severity}; - return $send(self, Opal.find_super_dispatcher(self, 'add', $Logger_add$2, false), $zuper, $iter); - }, $Logger_add$2.$$arity = -2); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'BasicFormatter'); - - var $nesting = [self].concat($parent_nesting), $BasicFormatter_call$3; - - - Opal.const_set($nesting[0], 'SEVERITY_LABELS', $hash2(["WARN", "FATAL"], {"WARN": "WARNING", "FATAL": "FAILED"})); - return (Opal.def(self, '$call', $BasicFormatter_call$3 = function $$call(severity, _, progname, msg) { - var $a, self = this; - - return "" + (progname) + ": " + (($truthy($a = $$($nesting, 'SEVERITY_LABELS')['$[]'](severity)) ? $a : severity)) + ": " + ((function() {if ($truthy($$$('::', 'String')['$==='](msg))) { - return msg - } else { - return msg.$inspect() - }; return nil; })()) + ($$($nesting, 'LF')) - }, $BasicFormatter_call$3.$$arity = 4), nil) && 'call'; - })($nesting[0], $$($nesting, 'Formatter'), $nesting); - return (function($base, $parent_nesting) { - var self = $module($base, 'AutoFormattingMessage'); - - var $nesting = [self].concat($parent_nesting), $AutoFormattingMessage_inspect$4; - - - Opal.def(self, '$inspect', $AutoFormattingMessage_inspect$4 = function $$inspect() { - var self = this, sloc = nil; - - if ($truthy((sloc = self['$[]']("source_location")))) { - return "" + (sloc) + ": " + (self['$[]']("text")) - } else { - return self['$[]']("text") - } - }, $AutoFormattingMessage_inspect$4.$$arity = 0) - })($nesting[0], $nesting); - })($nesting[0], $$$('::', 'Logger'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'MemoryLogger'); - - var $nesting = [self].concat($parent_nesting), $MemoryLogger$5, $MemoryLogger_initialize$7, $MemoryLogger_add$8, $MemoryLogger_clear$9, $MemoryLogger_empty$ques$10, $MemoryLogger_max_severity$11; - - self.$$prototype.messages = nil; - - Opal.const_set($nesting[0], 'SEVERITY_LABELS', $send($hash2([], {}), 'tap', [], ($MemoryLogger$5 = function(accum){var self = $MemoryLogger$5.$$s || this, $$6; - - - - if (accum == null) { - accum = nil; - }; - return $send($$($nesting, 'Severity').$constants(false), 'each', [], ($$6 = function(c){var self = $$6.$$s || this, $writer = nil; - - - - if (c == null) { - c = nil; - }; - $writer = [$$($nesting, 'Severity').$const_get(c, false), c]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$6.$$s = self, $$6.$$arity = 1, $$6));}, $MemoryLogger$5.$$s = self, $MemoryLogger$5.$$arity = 1, $MemoryLogger$5))); - self.$attr_reader("messages"); - - Opal.def(self, '$initialize', $MemoryLogger_initialize$7 = function $$initialize() { - var self = this, $writer = nil; - - - - $writer = [$$($nesting, 'WARN')]; - $send(self, 'level=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return (self.messages = []); - }, $MemoryLogger_initialize$7.$$arity = 0); - - Opal.def(self, '$add', $MemoryLogger_add$8 = function $$add(severity, message, progname) { - var $a, $iter = $MemoryLogger_add$8.$$p, $yield = $iter || nil, self = this; - - if ($iter) $MemoryLogger_add$8.$$p = null; - - - if (message == null) { - message = nil; - }; - - if (progname == null) { - progname = nil; - }; - if ($truthy(message)) { - } else { - message = (function() {if (($yield !== nil)) { - return Opal.yieldX($yield, []); - } else { - return progname - }; return nil; })() - }; - self.messages['$<<']($hash2(["severity", "message"], {"severity": $$($nesting, 'SEVERITY_LABELS')['$[]'](($truthy($a = severity) ? $a : $$($nesting, 'UNKNOWN'))), "message": message})); - return true; - }, $MemoryLogger_add$8.$$arity = -2); - - Opal.def(self, '$clear', $MemoryLogger_clear$9 = function $$clear() { - var self = this; - - return self.messages.$clear() - }, $MemoryLogger_clear$9.$$arity = 0); - - Opal.def(self, '$empty?', $MemoryLogger_empty$ques$10 = function() { - var self = this; - - return self.messages['$empty?']() - }, $MemoryLogger_empty$ques$10.$$arity = 0); - return (Opal.def(self, '$max_severity', $MemoryLogger_max_severity$11 = function $$max_severity() { - var $$12, self = this; - - if ($truthy(self['$empty?']())) { - return nil - } else { - return $send(self.messages, 'map', [], ($$12 = function(m){var self = $$12.$$s || this; - - - - if (m == null) { - m = nil; - }; - return $$($nesting, 'Severity').$const_get(m['$[]']("severity"), false);}, $$12.$$s = self, $$12.$$arity = 1, $$12)).$max() - } - }, $MemoryLogger_max_severity$11.$$arity = 0), nil) && 'max_severity'; - })($nesting[0], $$$('::', 'Logger'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NullLogger'); - - var $nesting = [self].concat($parent_nesting), $NullLogger_initialize$13, $NullLogger_add$14; - - self.$$prototype.max_severity = nil; - - self.$attr_reader("max_severity"); - - Opal.def(self, '$initialize', $NullLogger_initialize$13 = function $$initialize() { - var self = this, $writer = nil; - - - $writer = [$$($nesting, 'WARN')]; - $send(self, 'level=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $NullLogger_initialize$13.$$arity = 0); - return (Opal.def(self, '$add', $NullLogger_add$14 = function $$add(severity, message, progname) { - var $a, self = this; - - - - if (message == null) { - message = nil; - }; - - if (progname == null) { - progname = nil; - }; - if ($truthy($rb_gt((severity = ($truthy($a = severity) ? $a : $$($nesting, 'UNKNOWN'))), (self.max_severity = ($truthy($a = self.max_severity) ? $a : severity))))) { - self.max_severity = severity}; - return true; - }, $NullLogger_add$14.$$arity = -2), nil) && 'add'; - })($nesting[0], $$$('::', 'Logger'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'LoggerManager'); - - var $nesting = [self].concat($parent_nesting); - - - self.logger_class = $$($nesting, 'Logger'); - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $logger$15, $logger$eq$16, $memoize_logger$17; - - - self.$attr_accessor("logger_class"); - - Opal.def(self, '$logger', $logger$15 = function $$logger(pipe) { - var $a, self = this; - if (self.logger == null) self.logger = nil; - if (self.logger_class == null) self.logger_class = nil; - if ($gvars.stderr == null) $gvars.stderr = nil; - - - - if (pipe == null) { - pipe = $gvars.stderr; - }; - self.$memoize_logger(); - return (self.logger = ($truthy($a = self.logger) ? $a : self.logger_class.$new(pipe))); - }, $logger$15.$$arity = -1); - - Opal.def(self, '$logger=', $logger$eq$16 = function(new_logger) { - var $a, self = this; - if (self.logger_class == null) self.logger_class = nil; - if ($gvars.stderr == null) $gvars.stderr = nil; - - return (self.logger = ($truthy($a = new_logger) ? $a : self.logger_class.$new($gvars.stderr))) - }, $logger$eq$16.$$arity = 1); - self.$private(); - return (Opal.def(self, '$memoize_logger', $memoize_logger$17 = function $$memoize_logger() { - var self = this; - - return (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting); - - - Opal.alias(self, "logger", "logger"); - return self.$attr_reader("logger"); - })(Opal.get_singleton_class(self), $nesting) - }, $memoize_logger$17.$$arity = 0), nil) && 'memoize_logger'; - })(Opal.get_singleton_class(self), $nesting); - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Logging'); - - var $nesting = [self].concat($parent_nesting), $a, $Logging_included$18, $Logging_logger$19, $Logging_message_with_context$20; - - - self.$private_class_method(($truthy($a = (Opal.defs(self, '$included', $Logging_included$18 = function $$included(into) { - var self = this; - - return into.$extend($$($nesting, 'Logging')) - }, $Logging_included$18.$$arity = 1), nil) && 'included') ? $a : "included")); - - Opal.def(self, '$logger', $Logging_logger$19 = function $$logger() { - var self = this; - - return $$($nesting, 'LoggerManager').$logger() - }, $Logging_logger$19.$$arity = 0); - - Opal.def(self, '$message_with_context', $Logging_message_with_context$20 = function $$message_with_context(text, context) { - var self = this; - - - - if (context == null) { - context = $hash2([], {}); - }; - return $hash2(["text"], {"text": text}).$merge(context).$extend($$$($$($nesting, 'Logger'), 'AutoFormattingMessage')); - }, $Logging_message_with_context$20.$$arity = -2); - })($nesting[0], $nesting); - })($nesting[0], $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/rx"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy, $hash = Opal.hash; - - Opal.add_stubs(['$==', '$join', '$to_a', '$new', '$empty?', '$escape', '$[]=', '$-']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting), $Asciidoctor$1, $Asciidoctor$2; - - - (function($base, $parent_nesting) { - var self = $module($base, 'Rx'); - - var $nesting = [self].concat($parent_nesting); - - nil - })($nesting[0], $nesting); - Opal.const_set($nesting[0], 'AuthorInfoLineRx', new RegExp("" + "^(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "\\-'.]*)(?: +(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "\\-'.]*))?(?: +(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "\\-'.]*))?(?: +<([^>]+)>)?$")); - Opal.const_set($nesting[0], 'AuthorDelimiterRx', /;(?: |$)/); - Opal.const_set($nesting[0], 'RevisionInfoLineRx', new RegExp("" + "^(?:[^\\d{]*(" + ($$($nesting, 'CC_ANY')) + "*?),)? *(?!:)(" + ($$($nesting, 'CC_ANY')) + "*?)(?: *(?!^),?: *(" + ($$($nesting, 'CC_ANY')) + "*))?$")); - Opal.const_set($nesting[0], 'ManpageTitleVolnumRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) *\\( *(" + ($$($nesting, 'CC_ANY')) + "+?) *\\)$")); - Opal.const_set($nesting[0], 'ManpageNamePurposeRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) +- +(" + ($$($nesting, 'CC_ANY')) + "+)$")); - Opal.const_set($nesting[0], 'ConditionalDirectiveRx', new RegExp("" + "^(\\\\)?(ifdef|ifndef|ifeval|endif)::(\\S*?(?:([,+])\\S*?)?)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$")); - Opal.const_set($nesting[0], 'EvalExpressionRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) *([=!><]=|[><]) *(" + ($$($nesting, 'CC_ANY')) + "+)$")); - Opal.const_set($nesting[0], 'IncludeDirectiveRx', new RegExp("" + "^(\\\\)?include::([^\\[][^\\[]*)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$")); - Opal.const_set($nesting[0], 'TagDirectiveRx', /\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m); - Opal.const_set($nesting[0], 'AttributeEntryRx', new RegExp("" + "^:(!?" + ($$($nesting, 'CG_WORD')) + "[^:]*):(?:[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*))?$")); - Opal.const_set($nesting[0], 'InvalidAttributeNameCharsRx', new RegExp("" + "[^" + ($$($nesting, 'CC_WORD')) + "-]")); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - Opal.const_set($nesting[0], 'AttributeEntryPassMacroRx', new RegExp("" + "^pass:([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*)\\]$")) - } else { - nil - }; - Opal.const_set($nesting[0], 'AttributeReferenceRx', new RegExp("" + "(\\\\)?\\{(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*|(set|counter2?):" + ($$($nesting, 'CC_ANY')) + "+?)(\\\\)?\\}")); - Opal.const_set($nesting[0], 'BlockAnchorRx', new RegExp("" + "^\\[\\[(?:|([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+))?)\\]\\]$")); - Opal.const_set($nesting[0], 'BlockAttributeListRx', new RegExp("" + "^\\[(|[" + ($$($nesting, 'CC_WORD')) + ".#%{,\"']" + ($$($nesting, 'CC_ANY')) + "*)\\]$")); - Opal.const_set($nesting[0], 'BlockAttributeLineRx', new RegExp("" + "^\\[(?:|[" + ($$($nesting, 'CC_WORD')) + ".#%{,\"']" + ($$($nesting, 'CC_ANY')) + "*|\\[(?:|[" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*(?:, *" + ($$($nesting, 'CC_ANY')) + "+)?)\\])\\]$")); - Opal.const_set($nesting[0], 'BlockTitleRx', new RegExp("" + "^\\.(\\.?[^ \\t.]" + ($$($nesting, 'CC_ANY')) + "*)$")); - Opal.const_set($nesting[0], 'AdmonitionParagraphRx', new RegExp("" + "^(" + ($$($nesting, 'ADMONITION_STYLES').$to_a().$join("|")) + "):[ \\t]+")); - Opal.const_set($nesting[0], 'LiteralParagraphRx', new RegExp("" + "^([ \\t]+" + ($$($nesting, 'CC_ANY')) + "*)$")); - Opal.const_set($nesting[0], 'AtxSectionTitleRx', new RegExp("" + "^(=={0,5})[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "+?)(?:[ \\t]+\\1)?$")); - Opal.const_set($nesting[0], 'ExtAtxSectionTitleRx', new RegExp("" + "^(=={0,5}|#\\\#{0,5})[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "+?)(?:[ \\t]+\\1)?$")); - Opal.const_set($nesting[0], 'SetextSectionTitleRx', new RegExp("" + "^((?!\\.)" + ($$($nesting, 'CC_ANY')) + "*?" + ($$($nesting, 'CG_ALNUM')) + ($$($nesting, 'CC_ANY')) + "*)$")); - Opal.const_set($nesting[0], 'InlineSectionAnchorRx', new RegExp("" + " (\\\\)?\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+))?\\]\\]$")); - Opal.const_set($nesting[0], 'InvalidSectionIdCharsRx', new RegExp("" + "<[^>]+>|&(?:[a-z][a-z]+\\d{0,2}|#\\d\\d\\d{0,4}|#x[\\da-f][\\da-f][\\da-f]{0,3});|[^ " + ($$($nesting, 'CC_WORD')) + "\\-.]+?")); - Opal.const_set($nesting[0], 'SectionLevelStyleRx', /^sect\d$/); - Opal.const_set($nesting[0], 'AnyListRx', new RegExp("" + "^(?:[ \\t]*(?:-|\\*\\**|\\.\\.*|\\u2022|\\d+\\.|[a-zA-Z]\\.|[IVXivx]+\\))[ \\t]|(?!//[^/])[ \\t]*[^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?(?::::{0,2}|;;)(?:$|[ \\t])|<(?:\\d+|\\.)>[ \\t])")); - Opal.const_set($nesting[0], 'UnorderedListRx', new RegExp("" + "^[ \\t]*(-|\\*\\**|\\u2022)[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$")); - Opal.const_set($nesting[0], 'OrderedListRx', new RegExp("" + "^[ \\t]*(\\.\\.*|\\d+\\.|[a-zA-Z]\\.|[IVXivx]+\\))[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$")); - Opal.const_set($nesting[0], 'OrderedListMarkerRxMap', $hash2(["arabic", "loweralpha", "lowerroman", "upperalpha", "upperroman"], {"arabic": /\d+\./, "loweralpha": /[a-z]\./, "lowerroman": /[ivx]+\)/, "upperalpha": /[A-Z]\./, "upperroman": /[IVX]+\)/})); - Opal.const_set($nesting[0], 'DescriptionListRx', new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?)(:::{0,2}|;;)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)")); - Opal.const_set($nesting[0], 'DescriptionListSiblingRx', $hash2(["::", ":::", "::::", ";;"], {"::": new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?[^:]|[^ \\t:])(::)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)"), ":::": new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?[^:]|[^ \\t:])(:::)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)"), "::::": new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?[^:]|[^ \\t:])(::::)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)"), ";;": new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?)(;;)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)")})); - Opal.const_set($nesting[0], 'CalloutListRx', new RegExp("" + "^<(\\d+|\\.)>[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$")); - Opal.const_set($nesting[0], 'CalloutExtractRx', /((?:\/\/|#|--|;;) ?)?(\\)?(?=(?: ?\\?)*$)/); - Opal.const_set($nesting[0], 'CalloutExtractRxt', "(\\\\)?<()(\\d+|\\.)>(?=(?: ?\\\\?<(?:\\d+|\\.)>)*$)"); - Opal.const_set($nesting[0], 'CalloutExtractRxMap', $send($$$('::', 'Hash'), 'new', [], ($Asciidoctor$1 = function(h, k){var self = $Asciidoctor$1.$$s || this, $writer = nil; - - - - if (h == null) { - h = nil; - }; - - if (k == null) { - k = nil; - }; - $writer = [k, new RegExp("" + "(" + ((function() {if ($truthy(k['$empty?']())) { - return "" - } else { - return "" + ($$$('::', 'Regexp').$escape(k)) + " ?" - }; return nil; })()) + ")?" + ($$($nesting, 'CalloutExtractRxt')))]; - $send(h, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $Asciidoctor$1.$$s = self, $Asciidoctor$1.$$arity = 2, $Asciidoctor$1))); - Opal.const_set($nesting[0], 'CalloutScanRx', new RegExp("" + "\\\\?(?=(?: ?\\\\?)*" + ($$($nesting, 'CC_EOL')) + ")")); - Opal.const_set($nesting[0], 'CalloutSourceRx', new RegExp("" + "((?://|#|--|;;) ?)?(\\\\)?<!?(|--)(\\d+|\\.)\\3>(?=(?: ?\\\\?<!?\\3(?:\\d+|\\.)\\3>)*" + ($$($nesting, 'CC_EOL')) + ")")); - Opal.const_set($nesting[0], 'CalloutSourceRxt', "" + "(\\\\)?<()(\\d+|\\.)>(?=(?: ?\\\\?<(?:\\d+|\\.)>)*" + ($$($nesting, 'CC_EOL')) + ")"); - Opal.const_set($nesting[0], 'CalloutSourceRxMap', $send($$$('::', 'Hash'), 'new', [], ($Asciidoctor$2 = function(h, k){var self = $Asciidoctor$2.$$s || this, $writer = nil; - - - - if (h == null) { - h = nil; - }; - - if (k == null) { - k = nil; - }; - $writer = [k, new RegExp("" + "(" + ((function() {if ($truthy(k['$empty?']())) { - return "" - } else { - return "" + ($$$('::', 'Regexp').$escape(k)) + " ?" - }; return nil; })()) + ")?" + ($$($nesting, 'CalloutSourceRxt')))]; - $send(h, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $Asciidoctor$2.$$s = self, $Asciidoctor$2.$$arity = 2, $Asciidoctor$2))); - Opal.const_set($nesting[0], 'ListRxMap', $hash2(["ulist", "olist", "dlist", "colist"], {"ulist": $$($nesting, 'UnorderedListRx'), "olist": $$($nesting, 'OrderedListRx'), "dlist": $$($nesting, 'DescriptionListRx'), "colist": $$($nesting, 'CalloutListRx')})); - Opal.const_set($nesting[0], 'ColumnSpecRx', /^(?:(\d+)\*)?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?(\d+%?|~)?([a-z])?$/); - Opal.const_set($nesting[0], 'CellSpecStartRx', /^[ \t]*(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/); - Opal.const_set($nesting[0], 'CellSpecEndRx', /[ \t]+(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/); - Opal.const_set($nesting[0], 'CustomBlockMacroRx', new RegExp("" + "^(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*)::(|\\S|\\S" + ($$($nesting, 'CC_ANY')) + "*?\\S)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$")); - Opal.const_set($nesting[0], 'BlockMediaMacroRx', new RegExp("" + "^(image|video|audio)::(\\S|\\S" + ($$($nesting, 'CC_ANY')) + "*?\\S)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$")); - Opal.const_set($nesting[0], 'BlockTocMacroRx', new RegExp("" + "^toc::\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$")); - Opal.const_set($nesting[0], 'InlineAnchorRx', new RegExp("" + "(\\\\)?(?:\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]|anchor:([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)\\[(?:\\]|(" + ($$($nesting, 'CC_ANY')) + "*?[^\\\\])\\]))")); - Opal.const_set($nesting[0], 'InlineAnchorScanRx', new RegExp("" + "(?:^|[^\\\\\\[])\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]|(?:^|[^\\\\])anchor:([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)\\[(?:\\]|(" + ($$($nesting, 'CC_ANY')) + "*?[^\\\\])\\])")); - Opal.const_set($nesting[0], 'LeadingInlineAnchorRx', new RegExp("" + "^\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]")); - Opal.const_set($nesting[0], 'InlineBiblioAnchorRx', new RegExp("" + "^\\[\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]\\]")); - Opal.const_set($nesting[0], 'InlineEmailRx', new RegExp("" + "([\\\\>:/])?" + ($$($nesting, 'CG_WORD')) + "(?:&|[" + ($$($nesting, 'CC_WORD')) + "\\-.%+])*@" + ($$($nesting, 'CG_ALNUM')) + "[" + ($$($nesting, 'CC_ALNUM')) + "_\\-.]*\\.[a-zA-Z]{2,5}\\b")); - Opal.const_set($nesting[0], 'InlineFootnoteMacroRx', new RegExp("" + "\\\\?footnote(?:(ref):|:([" + ($$($nesting, 'CC_WORD')) + "-]+)?)\\[(?:|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\]))\\](?!)", 'm')); - Opal.const_set($nesting[0], 'InlineImageMacroRx', new RegExp("" + "\\\\?i(?:mage|con):([^:\\s\\[](?:[^\\n\\[]*[^\\s\\[])?)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm')); - Opal.const_set($nesting[0], 'InlineIndextermMacroRx', new RegExp("" + "\\\\?(?:(indexterm2?):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]|\\(\\((" + ($$($nesting, 'CC_ALL')) + "+?)\\)\\)(?!\\)))", 'm')); - Opal.const_set($nesting[0], 'InlineKbdBtnMacroRx', new RegExp("" + "(\\\\)?(kbd|btn):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm')); - Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|<|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://[^\\s\\[\\]<]*([^\\s.,\\[\\]<]))(?:\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])?", 'm')); - Opal.const_set($nesting[0], 'InlineLinkMacroRx', new RegExp("" + "\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm')); - Opal.const_set($nesting[0], 'MacroNameRx', new RegExp("" + "^" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*$")); - Opal.const_set($nesting[0], 'InlineStemMacroRx', new RegExp("" + "\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm')); - Opal.const_set($nesting[0], 'InlineMenuMacroRx', new RegExp("" + "\\\\?menu:(" + ($$($nesting, 'CG_WORD')) + "|[" + ($$($nesting, 'CC_WORD')) + "&][^\\n\\[]*[^\\s\\[])\\[ *(?:|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\]))\\]", 'm')); - Opal.const_set($nesting[0], 'InlineMenuRx', new RegExp("" + "\\\\?\"([" + ($$($nesting, 'CC_WORD')) + "&][^\"]*?[ \\n]+>[ \\n]+[^\"]*)\"")); - Opal.const_set($nesting[0], 'InlinePassRx', $hash(false, ["+", "`", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:])(?:\\[([^\\]]+)\\])?(\\\\?(\\+|`)(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\4)(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], true, ["`", nil, new RegExp("" + "(^|[^`" + ($$($nesting, 'CC_WORD')) + "])(?:\\[([^\\]]+)\\])?(\\\\?(`)([^`\\s]|[^`\\s]" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\4)(?![`" + ($$($nesting, 'CC_WORD')) + "])", 'm')])); - Opal.const_set($nesting[0], 'SinglePlusInlinePassRx', new RegExp("" + "^(\\\\)?\\+(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\+$", 'm')); - Opal.const_set($nesting[0], 'InlinePassMacroRx', new RegExp("" + "(?:(?:(\\\\?)\\[([^\\]]+)\\])?(\\\\{0,2})(\\+\\+\\+?|\\$\\$)(" + ($$($nesting, 'CC_ALL')) + "*?)\\4|(\\\\?)pass:([a-z]+(?:,[a-z-]+)*)?\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])", 'm')); - Opal.const_set($nesting[0], 'InlineXrefMacroRx', new RegExp("" + "\\\\?(?:<<([" + ($$($nesting, 'CC_WORD')) + "#/.:{]" + ($$($nesting, 'CC_ALL')) + "*?)>>|xref:([" + ($$($nesting, 'CC_WORD')) + "#/.:{]" + ($$($nesting, 'CC_ALL')) + "*?)\\[(?:\\]|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]))", 'm')); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - Opal.const_set($nesting[0], 'HardLineBreakRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "*) \\+$", 'm')) - } else { - nil - }; - Opal.const_set($nesting[0], 'MarkdownThematicBreakRx', /^ {0,3}([-*_])( *)\1\2\1$/); - Opal.const_set($nesting[0], 'ExtLayoutBreakRx', /^(?:'{3,}|<{3,}|([-*_])( *)\1\2\1)$/); - Opal.const_set($nesting[0], 'BlankLineRx', /\n{2,}/); - Opal.const_set($nesting[0], 'EscapedSpaceRx', /\\([ \t\n])/); - Opal.const_set($nesting[0], 'ReplaceableTextRx', /[&']|--|\.\.\.|\([CRT]M?\)/); - Opal.const_set($nesting[0], 'SpaceDelimiterRx', /([^\\])[ \t\n]+/); - Opal.const_set($nesting[0], 'SubModifierSniffRx', /[+-]/); - Opal.const_set($nesting[0], 'TrailingDigitsRx', /\d+$/); - Opal.const_set($nesting[0], 'UriSniffRx', new RegExp("" + "^" + ($$($nesting, 'CG_ALPHA')) + "[" + ($$($nesting, 'CC_ALNUM')) + ".+-]+:/{0,2}")); - Opal.const_set($nesting[0], 'XmlSanitizeRx', /<[^>]+>/); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/substitutors"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $hash = Opal.hash, $truthy = Opal.truthy, $send = Opal.send, $gvars = Opal.gvars; - - Opal.add_stubs(['$freeze', '$+', '$keys', '$empty?', '$!', '$===', '$[]', '$join', '$include?', '$extract_passthroughs', '$each', '$sub_specialchars', '$sub_quotes', '$sub_attributes', '$sub_replacements', '$sub_macros', '$highlight_source', '$sub_callouts', '$sub_post_replacements', '$warn', '$logger', '$restore_passthroughs', '$clear', '$split', '$apply_subs', '$==', '$gsub', '$match?', '$compat_mode', '$convert_quoted_text', '$attributes', '$shift', '$store_attribute', '$!=', '$attribute_undefined', '$counter', '$key?', '$downcase', '$attribute_missing', '$info', '$squeeze', '$delete', '$reject', '$start_with?', '$do_replacement', '$extensions', '$inline_macros?', '$inline_macros', '$regexp', '$instance', '$slice', '$length', '$names', '$config', '$merge', '$[]=', '$-', '$normalize_text', '$parse_attributes', '$process_method', '$expand_subs', '$text', '$text=', '$convert', '$class', '$strip', '$>', '$index', '$min', '$compact', '$end_with?', '$map', '$chop', '$new', '$pop', '$rstrip', '$register', '$tr', '$basename', '$parse', '$<<', '$lstrip', '$split_simple_csv', '$partition', '$extract_attributes_from_text', '$sub', '$encode_uri_component', '$style', '$extname?', '$rindex', '$info?', '$catalog', '$fetch', '$outfilesuffix', '$natural_xrefs', '$resolve_id', '$find', '$footnotes', '$id', '$<', '$size', '$attr?', '$attr', '$to_s', '$read_next_id', '$callouts', '$syntax_highlighter', '$highlight?', '$sub_source', '$extract_callouts', '$name', '$to_sym', '$to_i', '$resolve_lines_to_highlight', '$highlight', '$nil_or_empty?', '$restore_callouts', '$count', '$to_a', '$|', '$sort', '$*', '$parse_quoted_text_attributes', '$resolve_pass_subs', '$extract_inner_passthrough', '$basebackend?', '$error', '$chr', '$drop', '$&', '$resolve_subs', '$resolve_block_subs', '$parse_into', '$private', '$=~', '$shorthand_property_syntax', '$concat', '$each_char']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'Substitutors'); - - var $nesting = [self].concat($parent_nesting), $Substitutors_apply_subs$1, $Substitutors_apply_normal_subs$3, $Substitutors_apply_header_subs$4, $Substitutors_apply_reftext_subs$5, $Substitutors_sub_specialchars$6, $Substitutors_sub_quotes$7, $Substitutors_sub_attributes$10, $Substitutors_sub_replacements$16, $Substitutors_sub_macros$19, $Substitutors_sub_post_replacements$41, $Substitutors_sub_source$44, $Substitutors_sub_callouts$45, $Substitutors_highlight_source$47, $Substitutors_resolve_lines_to_highlight$48, $Substitutors_extract_passthroughs$51, $Substitutors_restore_passthroughs$55, $Substitutors_resolve_subs$57, $Substitutors_resolve_block_subs$59, $Substitutors_resolve_pass_subs$60, $Substitutors_expand_subs$61, $Substitutors_commit_subs$63, $Substitutors_parse_attributes$64, $Substitutors_extract_attributes_from_text$65, $Substitutors_extract_callouts$66, $Substitutors_restore_callouts$69, $Substitutors_extract_inner_passthrough$72, $Substitutors_convert_quoted_text$73, $Substitutors_do_replacement$74, $Substitutors_parse_quoted_text_attributes$75, $Substitutors_normalize_text$76, $Substitutors_split_simple_csv$77; - - - Opal.const_set($nesting[0], 'SpecialCharsRx', /[<&>]/); - Opal.const_set($nesting[0], 'SpecialCharsTr', $hash2([">", "<", "&"], {">": ">", "<": "<", "&": "&"})); - Opal.const_set($nesting[0], 'QuotedTextSniffRx', $hash(false, /[*_`#^~]/, true, /[*'_+#^~]/)); - Opal.const_set($nesting[0], 'BASIC_SUBS', ["specialcharacters"]).$freeze(); - Opal.const_set($nesting[0], 'HEADER_SUBS', ["specialcharacters", "attributes"]).$freeze(); - Opal.const_set($nesting[0], 'NO_SUBS', []).$freeze(); - Opal.const_set($nesting[0], 'NORMAL_SUBS', ["specialcharacters", "quotes", "attributes", "replacements", "macros", "post_replacements"]).$freeze(); - Opal.const_set($nesting[0], 'REFTEXT_SUBS', ["specialcharacters", "quotes", "replacements"]).$freeze(); - Opal.const_set($nesting[0], 'VERBATIM_SUBS', ["specialcharacters", "callouts"]).$freeze(); - Opal.const_set($nesting[0], 'SUB_GROUPS', $hash2(["none", "normal", "verbatim", "specialchars"], {"none": $$($nesting, 'NO_SUBS'), "normal": $$($nesting, 'NORMAL_SUBS'), "verbatim": $$($nesting, 'VERBATIM_SUBS'), "specialchars": $$($nesting, 'BASIC_SUBS')})); - Opal.const_set($nesting[0], 'SUB_HINTS', $hash2(["a", "m", "n", "p", "q", "r", "c", "v"], {"a": "attributes", "m": "macros", "n": "normal", "p": "post_replacements", "q": "quotes", "r": "replacements", "c": "specialcharacters", "v": "verbatim"})); - Opal.const_set($nesting[0], 'SUB_OPTIONS', $hash2(["block", "inline"], {"block": $rb_plus($rb_plus($$($nesting, 'SUB_GROUPS').$keys(), $$($nesting, 'NORMAL_SUBS')), ["callouts"]), "inline": $rb_plus($$($nesting, 'SUB_GROUPS').$keys(), $$($nesting, 'NORMAL_SUBS'))})); - Opal.const_set($nesting[0], 'CAN', "\u0018"); - Opal.const_set($nesting[0], 'DEL', "\u007F"); - Opal.const_set($nesting[0], 'PASS_START', "\u0096"); - Opal.const_set($nesting[0], 'PASS_END', "\u0097"); - Opal.const_set($nesting[0], 'PassSlotRx', new RegExp("" + ($$($nesting, 'PASS_START')) + "(\\d+)" + ($$($nesting, 'PASS_END')))); - Opal.const_set($nesting[0], 'HighlightedPassSlotRx', new RegExp("" + "]*>" + ($$($nesting, 'PASS_START')) + "[^\\d]*(\\d+)[^\\d]*]*>" + ($$($nesting, 'PASS_END')) + "")); - Opal.const_set($nesting[0], 'RS', "\\"); - Opal.const_set($nesting[0], 'R_SB', "]"); - Opal.const_set($nesting[0], 'ESC_R_SB', "\\]"); - Opal.const_set($nesting[0], 'PLUS', "+"); - - Opal.def(self, '$apply_subs', $Substitutors_apply_subs$1 = function $$apply_subs(text, subs) { - var $a, $$2, self = this, is_multiline = nil, passthrus = nil, clear_passthrus = nil; - if (self.passthroughs == null) self.passthroughs = nil; - if (self.passthroughs_locked == null) self.passthroughs_locked = nil; - - - - if (subs == null) { - subs = $$($nesting, 'NORMAL_SUBS'); - }; - if ($truthy(($truthy($a = text['$empty?']()) ? $a : subs['$!']()))) { - return text}; - if ($truthy((is_multiline = $$$('::', 'Array')['$==='](text)))) { - text = (function() {if ($truthy(text['$[]'](1))) { - - return text.$join($$($nesting, 'LF')); - } else { - return text['$[]'](0) - }; return nil; })()}; - if ($truthy(subs['$include?']("macros"))) { - - text = self.$extract_passthroughs(text); - if ($truthy(self.passthroughs['$empty?']())) { - } else { - - passthrus = self.passthroughs; - self.passthroughs_locked = ($truthy($a = self.passthroughs_locked) ? $a : (clear_passthrus = true)); - };}; - $send(subs, 'each', [], ($$2 = function(type){var self = $$2.$$s || this, $case = nil; - - - - if (type == null) { - type = nil; - }; - return (function() {$case = type; - if ("specialcharacters"['$===']($case)) {return (text = self.$sub_specialchars(text))} - else if ("quotes"['$===']($case)) {return (text = self.$sub_quotes(text))} - else if ("attributes"['$===']($case)) {if ($truthy(text['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - return (text = self.$sub_attributes(text)) - } else { - return nil - }} - else if ("replacements"['$===']($case)) {return (text = self.$sub_replacements(text))} - else if ("macros"['$===']($case)) {return (text = self.$sub_macros(text))} - else if ("highlight"['$===']($case)) {return (text = self.$highlight_source(text, subs['$include?']("callouts")))} - else if ("callouts"['$===']($case)) {if ($truthy(subs['$include?']("highlight"))) { - return nil - } else { - return (text = self.$sub_callouts(text)) - }} - else if ("post_replacements"['$===']($case)) {return (text = self.$sub_post_replacements(text))} - else {return self.$logger().$warn("" + "unknown substitution type " + (type))}})();}, $$2.$$s = self, $$2.$$arity = 1, $$2)); - if ($truthy(passthrus)) { - - text = self.$restore_passthroughs(text); - if ($truthy(clear_passthrus)) { - - passthrus.$clear(); - self.passthroughs_locked = nil;};}; - if ($truthy(is_multiline)) { - - return text.$split($$($nesting, 'LF'), -1); - } else { - return text - }; - }, $Substitutors_apply_subs$1.$$arity = -2); - - Opal.def(self, '$apply_normal_subs', $Substitutors_apply_normal_subs$3 = function $$apply_normal_subs(text) { - var self = this; - - return self.$apply_subs(text, $$($nesting, 'NORMAL_SUBS')) - }, $Substitutors_apply_normal_subs$3.$$arity = 1); - - Opal.def(self, '$apply_header_subs', $Substitutors_apply_header_subs$4 = function $$apply_header_subs(text) { - var self = this; - - return self.$apply_subs(text, $$($nesting, 'HEADER_SUBS')) - }, $Substitutors_apply_header_subs$4.$$arity = 1); - Opal.alias(self, "apply_title_subs", "apply_subs"); - - Opal.def(self, '$apply_reftext_subs', $Substitutors_apply_reftext_subs$5 = function $$apply_reftext_subs(text) { - var self = this; - - return self.$apply_subs(text, $$($nesting, 'REFTEXT_SUBS')) - }, $Substitutors_apply_reftext_subs$5.$$arity = 1); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - - Opal.def(self, '$sub_specialchars', $Substitutors_sub_specialchars$6 = function $$sub_specialchars(text) { - var $a, $b, self = this; - - if ($truthy(($truthy($a = ($truthy($b = text['$include?'](">")) ? $b : text['$include?']("&"))) ? $a : text['$include?']("<")))) { - - return text.$gsub($$($nesting, 'SpecialCharsRx'), $$($nesting, 'SpecialCharsTr')); - } else { - return text - } - }, $Substitutors_sub_specialchars$6.$$arity = 1) - } else { - nil - }; - Opal.alias(self, "sub_specialcharacters", "sub_specialchars"); - - Opal.def(self, '$sub_quotes', $Substitutors_sub_quotes$7 = function $$sub_quotes(text) { - var $$8, self = this, compat = nil; - if (self.document == null) self.document = nil; - - - if ($truthy($$($nesting, 'QuotedTextSniffRx')['$[]']((compat = self.document.$compat_mode()))['$match?'](text))) { - $send($$($nesting, 'QUOTE_SUBS')['$[]'](compat), 'each', [], ($$8 = function(type, scope, pattern){var self = $$8.$$s || this, $$9; - - - - if (type == null) { - type = nil; - }; - - if (scope == null) { - scope = nil; - }; - - if (pattern == null) { - pattern = nil; - }; - return (text = $send(text, 'gsub', [pattern], ($$9 = function(){var self = $$9.$$s || this; - if ($gvars["~"] == null) $gvars["~"] = nil; - - return self.$convert_quoted_text($gvars["~"], type, scope)}, $$9.$$s = self, $$9.$$arity = 0, $$9)));}, $$8.$$s = self, $$8.$$arity = 3, $$8))}; - return text; - }, $Substitutors_sub_quotes$7.$$arity = 1); - - Opal.def(self, '$sub_attributes', $Substitutors_sub_attributes$10 = function $$sub_attributes(text, opts) { - var $$11, $$13, $$14, $$15, self = this, doc_attrs = nil, drop = nil, drop_line = nil, drop_line_severity = nil, drop_empty_line = nil, attribute_undefined = nil, attribute_missing = nil, lines = nil; - if (self.document == null) self.document = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - doc_attrs = self.document.$attributes(); - drop = (drop_line = (drop_line_severity = (drop_empty_line = (attribute_undefined = (attribute_missing = nil))))); - text = $send(text, 'gsub', [$$($nesting, 'AttributeReferenceRx')], ($$11 = function(){var self = $$11.$$s || this, $a, $b, $c, $$12, $case = nil, args = nil, _ = nil, value = nil, key = nil; - if (self.document == null) self.document = nil; - - if ($truthy(($truthy($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))['$==']($$($nesting, 'RS'))) ? $a : (($b = $gvars['~']) === nil ? nil : $b['$[]'](4))['$==']($$($nesting, 'RS'))))) { - return "" + "{" + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](2))) + "}" - } else if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](3)))) { - return (function() {$case = (args = (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)).$split(":", 3)).$shift(); - if ("set"['$===']($case)) { - $b = $$($nesting, 'Parser').$store_attribute(args['$[]'](0), ($truthy($c = args['$[]'](1)) ? $c : ""), self.document), $a = Opal.to_ary($b), (_ = ($a[0] == null ? nil : $a[0])), (value = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy(($truthy($a = value) ? $a : (attribute_undefined = ($truthy($b = attribute_undefined) ? $b : ($truthy($c = doc_attrs['$[]']("attribute-undefined")) ? $c : $$($nesting, 'Compliance').$attribute_undefined())))['$!=']("drop-line")))) { - return (drop = (drop_empty_line = $$($nesting, 'DEL'))) - } else { - return (drop = (drop_line = $$($nesting, 'CAN'))) - };} - else if ("counter2"['$===']($case)) { - $send(self.document, 'counter', Opal.to_a(args)); - return (drop = (drop_empty_line = $$($nesting, 'DEL')));} - else {return $send(self.document, 'counter', Opal.to_a(args))}})() - } else if ($truthy(doc_attrs['$key?']((key = (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)).$downcase())))) { - return doc_attrs['$[]'](key) - } else if ($truthy((value = $$($nesting, 'INTRINSIC_ATTRIBUTES')['$[]'](key)))) { - return value - } else { - return (function() {$case = (attribute_missing = ($truthy($a = attribute_missing) ? $a : ($truthy($b = ($truthy($c = opts['$[]']("attribute_missing")) ? $c : doc_attrs['$[]']("attribute-missing"))) ? $b : $$($nesting, 'Compliance').$attribute_missing()))); - if ("drop"['$===']($case)) {return (drop = (drop_empty_line = $$($nesting, 'DEL')))} - else if ("drop-line"['$===']($case)) { - if ((drop_line_severity = ($truthy($a = drop_line_severity) ? $a : ($truthy($b = opts['$[]']("drop_line_severity")) ? $b : "info")))['$==']("info")) { - $send(self.$logger(), 'info', [], ($$12 = function(){var self = $$12.$$s || this; - - return "" + "dropping line containing reference to missing attribute: " + (key)}, $$12.$$s = self, $$12.$$arity = 0, $$12))}; - return (drop = (drop_line = $$($nesting, 'CAN')));} - else if ("warn"['$===']($case)) { - self.$logger().$warn("" + "skipping reference to missing attribute: " + (key)); - return (($a = $gvars['~']) === nil ? nil : $a['$[]'](0));} - else {return (($a = $gvars['~']) === nil ? nil : $a['$[]'](0))}})() - }}, $$11.$$s = self, $$11.$$arity = 0, $$11)); - if ($truthy(drop)) { - if ($truthy(drop_empty_line)) { - - lines = text.$squeeze($$($nesting, 'DEL')).$split($$($nesting, 'LF'), -1); - if ($truthy(drop_line)) { - return $send(lines, 'reject', [], ($$13 = function(line){var self = $$13.$$s || this, $a, $b, $c; - - - - if (line == null) { - line = nil; - }; - return ($truthy($a = ($truthy($b = ($truthy($c = line['$==']($$($nesting, 'DEL'))) ? $c : line['$==']($$($nesting, 'CAN')))) ? $b : line['$start_with?']($$($nesting, 'CAN')))) ? $a : line['$include?']($$($nesting, 'CAN')));}, $$13.$$s = self, $$13.$$arity = 1, $$13)).$join($$($nesting, 'LF')).$delete($$($nesting, 'DEL')) - } else { - return $send(lines, 'reject', [], ($$14 = function(line){var self = $$14.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line['$==']($$($nesting, 'DEL'));}, $$14.$$s = self, $$14.$$arity = 1, $$14)).$join($$($nesting, 'LF')).$delete($$($nesting, 'DEL')) - }; - } else if ($truthy(text['$include?']($$($nesting, 'LF')))) { - return $send(text.$split($$($nesting, 'LF'), -1), 'reject', [], ($$15 = function(line){var self = $$15.$$s || this, $a, $b; - - - - if (line == null) { - line = nil; - }; - return ($truthy($a = ($truthy($b = line['$==']($$($nesting, 'CAN'))) ? $b : line['$start_with?']($$($nesting, 'CAN')))) ? $a : line['$include?']($$($nesting, 'CAN')));}, $$15.$$s = self, $$15.$$arity = 1, $$15)).$join($$($nesting, 'LF')) - } else { - return "" - } - } else { - return text - }; - }, $Substitutors_sub_attributes$10.$$arity = -2); - - Opal.def(self, '$sub_replacements', $Substitutors_sub_replacements$16 = function $$sub_replacements(text) { - var $$17, self = this; - - - if ($truthy($$($nesting, 'ReplaceableTextRx')['$match?'](text))) { - $send($$($nesting, 'REPLACEMENTS'), 'each', [], ($$17 = function(pattern, replacement, restore){var self = $$17.$$s || this, $$18; - - - - if (pattern == null) { - pattern = nil; - }; - - if (replacement == null) { - replacement = nil; - }; - - if (restore == null) { - restore = nil; - }; - return (text = $send(text, 'gsub', [pattern], ($$18 = function(){var self = $$18.$$s || this; - if ($gvars["~"] == null) $gvars["~"] = nil; - - return self.$do_replacement($gvars["~"], replacement, restore)}, $$18.$$s = self, $$18.$$arity = 0, $$18)));}, $$17.$$s = self, $$17.$$arity = 3, $$17))}; - return text; - }, $Substitutors_sub_replacements$16.$$arity = 1); - - Opal.def(self, '$sub_macros', $Substitutors_sub_macros$19 = function $$sub_macros(text) { - var $a, $$20, $b, $$22, $$25, $$27, $$29, $$30, $$33, $$34, $$35, $$36, $$37, $$38, $$39, self = this, found_square_bracket = nil, found_colon = nil, found_macroish = nil, found_macroish_short = nil, doc_attrs = nil, doc = nil, extensions = nil; - if (self.document == null) self.document = nil; - if (self.context == null) self.context = nil; - if (self.parent == null) self.parent = nil; - - - found_square_bracket = text['$include?']("["); - found_colon = text['$include?'](":"); - found_macroish = ($truthy($a = found_square_bracket) ? found_colon : $a); - found_macroish_short = ($truthy($a = found_macroish) ? text['$include?'](":[") : $a); - doc_attrs = (doc = self.document).$attributes(); - if ($truthy(($truthy($a = (extensions = doc.$extensions())) ? extensions['$inline_macros?']() : $a))) { - $send(extensions.$inline_macros(), 'each', [], ($$20 = function(extension){var self = $$20.$$s || this, $$21; - - - - if (extension == null) { - extension = nil; - }; - return (text = $send(text, 'gsub', [extension.$instance().$regexp()], ($$21 = function(){var self = $$21.$$s || this, $b, $c, match = nil, target = nil, content = nil, attributes = nil, default_attrs = nil, ext_config = nil, $writer = nil, replacement = nil, inline_subs = nil; - if ($gvars["~"] == null) $gvars["~"] = nil; - - - if ($truthy((match = (($b = $gvars['~']) === nil ? nil : $b['$[]'](0)))['$start_with?']($$($nesting, 'RS')))) { - return (($b = $gvars['~']) === nil ? nil : $b['$[]'](0)).$slice(1, (($b = $gvars['~']) === nil ? nil : $b['$[]'](0)).$length());}; - if ($truthy($gvars["~"].$names()['$empty?']())) { - $b = [(($c = $gvars['~']) === nil ? nil : $c['$[]'](1)), (($c = $gvars['~']) === nil ? nil : $c['$[]'](2))], (target = $b[0]), (content = $b[1]), $b - } else { - $b = [(function() { try { - return $gvars["~"]['$[]']("target") - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return nil - } finally { Opal.pop_exception() } - } else { throw $err; } - }})(), (function() { try { - return $gvars["~"]['$[]']("content") - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return nil - } finally { Opal.pop_exception() } - } else { throw $err; } - }})()], (target = $b[0]), (content = $b[1]), $b - }; - attributes = (function() {if ($truthy((default_attrs = (ext_config = extension.$config())['$[]']("default_attrs")))) { - return default_attrs.$merge() - } else { - return $hash2([], {}) - }; return nil; })(); - if ($truthy(content)) { - - if ($truthy(content['$empty?']())) { - if (ext_config['$[]']("content_model")['$==']("attributes")) { - } else { - - $writer = ["text", content]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } - } else { - - content = self.$normalize_text(content, true, true); - if (ext_config['$[]']("content_model")['$==']("attributes")) { - self.$parse_attributes(content, ($truthy($b = ($truthy($c = ext_config['$[]']("positional_attrs")) ? $c : ext_config['$[]']("pos_attrs"))) ? $b : []), $hash2(["into"], {"into": attributes})) - } else { - - $writer = ["text", content]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - }; - target = ($truthy($b = target) ? $b : (function() {if (ext_config['$[]']("format")['$==']("short")) { - return content - } else { - return target - }; return nil; })());}; - if ($truthy($$($nesting, 'Inline')['$===']((replacement = extension.$process_method()['$[]'](self, target, attributes))))) { - - if ($truthy(($truthy($b = (inline_subs = replacement.$attributes().$delete("subs"))) ? (inline_subs = self.$expand_subs(inline_subs, "custom inline macro")) : $b))) { - - $writer = [self.$apply_subs(replacement.$text(), inline_subs)]; - $send(replacement, 'text=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return replacement.$convert(); - } else if ($truthy(replacement)) { - - self.$logger().$info("" + "expected substitution value for custom inline macro to be of type Inline; got " + (replacement.$class()) + ": " + (match)); - return replacement; - } else { - return "" - };}, $$21.$$s = self, $$21.$$arity = 0, $$21)));}, $$20.$$s = self, $$20.$$arity = 1, $$20))}; - if ($truthy(doc_attrs['$key?']("experimental"))) { - - if ($truthy(($truthy($a = found_macroish_short) ? ($truthy($b = text['$include?']("kbd:")) ? $b : text['$include?']("btn:")) : $a))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineKbdBtnMacroRx')], ($$22 = function(){var self = $$22.$$s || this, $c, $$23, $$24, keys = nil, delim_idx = nil, delim = nil, $writer = nil; - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](1)))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length()) - } else if ((($c = $gvars['~']) === nil ? nil : $c['$[]'](2))['$==']("kbd")) { - - if ($truthy((keys = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)).$strip())['$include?']($$($nesting, 'R_SB')))) { - keys = keys.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))}; - if ($truthy(($truthy($c = $rb_gt(keys.$length(), 1)) ? (delim_idx = (function() {if ($truthy((delim_idx = keys.$index(",", 1)))) { - return [delim_idx, keys.$index("+", 1)].$compact().$min() - } else { - - return keys.$index("+", 1); - }; return nil; })()) : $c))) { - - delim = keys.$slice(delim_idx, 1); - if ($truthy(keys['$end_with?'](delim))) { - - keys = $send(keys.$chop().$split(delim, -1), 'map', [], ($$23 = function(key){var self = $$23.$$s || this; - - - - if (key == null) { - key = nil; - }; - return key.$strip();}, $$23.$$s = self, $$23.$$arity = 1, $$23)); - - $writer = [-1, $rb_plus(keys['$[]'](-1), delim)]; - $send(keys, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - keys = $send(keys.$split(delim), 'map', [], ($$24 = function(key){var self = $$24.$$s || this; - - - - if (key == null) { - key = nil; - }; - return key.$strip();}, $$24.$$s = self, $$24.$$arity = 1, $$24)) - }; - } else { - keys = [keys] - }; - return $$($nesting, 'Inline').$new(self, "kbd", nil, $hash2(["attributes"], {"attributes": $hash2(["keys"], {"keys": keys})})).$convert(); - } else { - return $$($nesting, 'Inline').$new(self, "button", self.$normalize_text((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)), true, true)).$convert() - }}, $$22.$$s = self, $$22.$$arity = 0, $$22))}; - if ($truthy(($truthy($a = found_macroish) ? text['$include?']("menu:") : $a))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineMenuMacroRx')], ($$25 = function(){var self = $$25.$$s || this, $c, $$26, menu = nil, items = nil, delim = nil, submenus = nil, menuitem = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - menu = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1)); - if ($truthy((items = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2))))) { - - if ($truthy(items['$include?']($$($nesting, 'R_SB')))) { - items = items.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))}; - if ($truthy((delim = (function() {if ($truthy(items['$include?'](">"))) { - return ">" - } else { - - if ($truthy(items['$include?'](","))) { - return "," - } else { - return nil - }; - }; return nil; })()))) { - - submenus = $send(items.$split(delim), 'map', [], ($$26 = function(it){var self = $$26.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$strip();}, $$26.$$s = self, $$26.$$arity = 1, $$26)); - menuitem = submenus.$pop(); - } else { - $c = [[], items.$rstrip()], (submenus = $c[0]), (menuitem = $c[1]), $c - }; - } else { - $c = [[], nil], (submenus = $c[0]), (menuitem = $c[1]), $c - }; - return $$($nesting, 'Inline').$new(self, "menu", nil, $hash2(["attributes"], {"attributes": $hash2(["menu", "submenus", "menuitem"], {"menu": menu, "submenus": submenus, "menuitem": menuitem})})).$convert();}, $$25.$$s = self, $$25.$$arity = 0, $$25))}; - if ($truthy(($truthy($a = text['$include?']("\"")) ? text['$include?'](">") : $a))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineMenuRx')], ($$27 = function(){var self = $$27.$$s || this, $c, $d, $e, $$28, menu = nil, submenus = nil, menuitem = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - $d = $send((($e = $gvars['~']) === nil ? nil : $e['$[]'](1)).$split(">"), 'map', [], ($$28 = function(it){var self = $$28.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$strip();}, $$28.$$s = self, $$28.$$arity = 1, $$28)), $c = Opal.to_ary($d), (menu = ($c[0] == null ? nil : $c[0])), (submenus = $slice.call($c, 1)), $d; - menuitem = submenus.$pop(); - return $$($nesting, 'Inline').$new(self, "menu", nil, $hash2(["attributes"], {"attributes": $hash2(["menu", "submenus", "menuitem"], {"menu": menu, "submenus": submenus, "menuitem": menuitem})})).$convert();}, $$27.$$s = self, $$27.$$arity = 0, $$27))};}; - if ($truthy(($truthy($a = found_macroish) ? ($truthy($b = text['$include?']("image:")) ? $b : text['$include?']("icon:")) : $a))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineImageMacroRx')], ($$29 = function(){var self = $$29.$$s || this, $c, type = nil, posattrs = nil, target = nil, attrs = nil, $writer = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length()); - } else if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']("icon:"))) { - $c = ["icon", ["size"]], (type = $c[0]), (posattrs = $c[1]), $c - } else { - $c = ["image", ["alt", "width", "height"]], (type = $c[0]), (posattrs = $c[1]), $c - }; - target = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1)); - attrs = self.$parse_attributes((($c = $gvars['~']) === nil ? nil : $c['$[]'](2)), posattrs, $hash2(["unescape_input"], {"unescape_input": true})); - if (type['$==']("icon")) { - } else { - - doc.$register("images", target); - - $writer = ["imagesdir", doc_attrs['$[]']("imagesdir")]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }; - ($truthy($c = attrs['$[]']("alt")) ? $c : (($writer = ["alt", (($writer = ["default-alt", $$($nesting, 'Helpers').$basename(target, true).$tr("_-", " ")]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - return $$($nesting, 'Inline').$new(self, "image", nil, $hash2(["type", "target", "attributes"], {"type": type, "target": target, "attributes": attrs})).$convert();}, $$29.$$s = self, $$29.$$arity = 0, $$29))}; - if ($truthy(($truthy($a = ($truthy($b = text['$include?']("((")) ? text['$include?']("))") : $b)) ? $a : ($truthy($b = found_macroish_short) ? text['$include?']("dexterm") : $b)))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineIndextermMacroRx')], ($$30 = function(){var self = $$30.$$s || this, $c, $$31, $d, $$32, $case = nil, attrlist = nil, primary = nil, attrs = nil, $writer = nil, terms = nil, secondary = nil, tertiary = nil, see_also = nil, term = nil, visible = nil, before = nil, after = nil, _ = nil, see = nil, subbed_term = nil; - - return (function() {$case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1)); - if ("indexterm"['$===']($case)) { - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - if ($truthy((attrlist = self.$normalize_text((($c = $gvars['~']) === nil ? nil : $c['$[]'](2)), true, true))['$include?']("="))) { - if ($truthy((primary = (attrs = $$($nesting, 'AttributeList').$new(attrlist, self).$parse())['$[]'](1)))) { - - - $writer = ["terms", (terms = [primary])]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy((secondary = attrs['$[]'](2)))) { - - terms['$<<'](secondary); - if ($truthy((tertiary = attrs['$[]'](3)))) { - terms['$<<'](tertiary)};}; - if ($truthy((see_also = attrs['$[]']("see-also")))) { - - $writer = ["see-also", (function() {if ($truthy(see_also['$include?'](","))) { - return $send(see_also.$split(","), 'map', [], ($$31 = function(it){var self = $$31.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$lstrip();}, $$31.$$s = self, $$31.$$arity = 1, $$31)) - } else { - return [see_also] - }; return nil; })()]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - } else { - attrs = $hash2(["terms"], {"terms": (terms = attrlist)}) - } - } else { - attrs = $hash2(["terms"], {"terms": (terms = self.$split_simple_csv(attrlist))}) - }; - return $$($nesting, 'Inline').$new(self, "indexterm", nil, $hash2(["attributes"], {"attributes": attrs})).$convert();} - else if ("indexterm2"['$===']($case)) { - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - if ($truthy((term = self.$normalize_text((($c = $gvars['~']) === nil ? nil : $c['$[]'](2)), true, true))['$include?']("="))) { - - term = ($truthy($c = ($truthy($d = (attrs = $$($nesting, 'AttributeList').$new(term, self).$parse())['$[]'](1)) ? $d : (attrs = nil))) ? $c : term); - if ($truthy(($truthy($c = attrs) ? (see_also = attrs['$[]']("see-also")) : $c))) { - - $writer = ["see-also", (function() {if ($truthy(see_also['$include?'](","))) { - return $send(see_also.$split(","), 'map', [], ($$32 = function(it){var self = $$32.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$lstrip();}, $$32.$$s = self, $$32.$$arity = 1, $$32)) - } else { - return [see_also] - }; return nil; })()]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];};}; - return $$($nesting, 'Inline').$new(self, "indexterm", term, $hash2(["attributes", "type"], {"attributes": attrs, "type": "visible"})).$convert();} - else { - text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)); - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - if ($truthy(($truthy($c = text['$start_with?']("(")) ? text['$end_with?'](")") : $c))) { - - text = text.$slice(1, $rb_minus(text.$length(), 2)); - $c = [true, "(", ")"], (visible = $c[0]), (before = $c[1]), (after = $c[2]), $c; - } else { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length()); - } - } else { - - visible = true; - if ($truthy(text['$start_with?']("("))) { - if ($truthy(text['$end_with?'](")"))) { - $c = [text.$slice(1, $rb_minus(text.$length(), 2)), false], (text = $c[0]), (visible = $c[1]), $c - } else { - $c = [text.$slice(1, text.$length()), "(", ""], (text = $c[0]), (before = $c[1]), (after = $c[2]), $c - } - } else if ($truthy(text['$end_with?'](")"))) { - $c = [text.$chop(), "", ")"], (text = $c[0]), (before = $c[1]), (after = $c[2]), $c}; - }; - if ($truthy(visible)) { - - if ($truthy((term = self.$normalize_text(text, true))['$include?'](";&"))) { - if ($truthy(term['$include?'](" >> "))) { - - $d = term.$partition(" >> "), $c = Opal.to_ary($d), (term = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (see = ($c[2] == null ? nil : $c[2])), $d; - attrs = $hash2(["see"], {"see": see}); - } else if ($truthy(term['$include?'](" &> "))) { - - $d = term.$split(" &> "), $c = Opal.to_ary($d), (term = ($c[0] == null ? nil : $c[0])), (see_also = $slice.call($c, 1)), $d; - attrs = $hash2(["see-also"], {"see-also": see_also});}}; - subbed_term = $$($nesting, 'Inline').$new(self, "indexterm", term, $hash2(["attributes", "type"], {"attributes": attrs, "type": "visible"})).$convert(); - } else { - - attrs = $hash2([], {}); - if ($truthy((terms = self.$normalize_text(text, true))['$include?'](";&"))) { - if ($truthy(terms['$include?'](" >> "))) { - - $d = terms.$partition(" >> "), $c = Opal.to_ary($d), (terms = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (see = ($c[2] == null ? nil : $c[2])), $d; - - $writer = ["see", see]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else if ($truthy(terms['$include?'](" &> "))) { - - $d = terms.$split(" &> "), $c = Opal.to_ary($d), (terms = ($c[0] == null ? nil : $c[0])), (see_also = $slice.call($c, 1)), $d; - - $writer = ["see-also", see_also]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}}; - - $writer = ["terms", (terms = self.$split_simple_csv(terms))]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - subbed_term = $$($nesting, 'Inline').$new(self, "indexterm", nil, $hash2(["attributes"], {"attributes": attrs})).$convert(); - }; - if ($truthy(before)) { - return "" + (before) + (subbed_term) + (after) - } else { - return subbed_term - };}})()}, $$30.$$s = self, $$30.$$arity = 0, $$30))}; - if ($truthy(($truthy($a = found_colon) ? text['$include?']("://") : $a))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineLinkRx')], ($$33 = function(){var self = $$33.$$s || this, $c, $d, target = nil, prefix = nil, suffix = nil, $case = nil, attrs = nil, link_opts = nil, $writer = nil; - - - if ($truthy((target = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)))['$start_with?']($$($nesting, 'RS')))) { - return "" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))) + (target.$slice(1, target.$length())) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](4)));}; - $c = [(($d = $gvars['~']) === nil ? nil : $d['$[]'](1)), ""], (prefix = $c[0]), (suffix = $c[1]), $c; - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](4)))) { - - if (prefix['$==']("link:")) { - prefix = ""}; - text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4)); - } else { - - $case = prefix; - if ("link:"['$===']($case) || "\""['$===']($case) || "'"['$===']($case)) {return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));}; - text = ""; - $case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)); - if (")"['$===']($case) || "?"['$===']($case) || "!"['$===']($case)) { - target = target.$chop(); - if ($truthy((($c = (suffix = (($d = $gvars['~']) === nil ? nil : $d['$[]'](3)))['$=='](")")) ? target['$end_with?'](".", "?", "!") : (suffix = (($d = $gvars['~']) === nil ? nil : $d['$[]'](3)))['$=='](")")))) { - - suffix = $rb_plus(target['$[]'](-1), suffix); - target = target.$chop();}; - if ($truthy(target['$end_with?']("://"))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};} - else if (";"['$===']($case)) { - if ($truthy(($truthy($c = prefix['$start_with?']("<")) ? target['$end_with?'](">") : $c))) { - - prefix = prefix.$slice(4, prefix.$length()); - target = target.$slice(0, $rb_minus(target.$length(), 4)); - } else if ($truthy((target = target.$chop())['$end_with?'](")"))) { - - target = target.$chop(); - suffix = ");"; - } else { - suffix = ";" - }; - if ($truthy(target['$end_with?']("://"))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};} - else if (":"['$===']($case)) { - if ($truthy((target = target.$chop())['$end_with?'](")"))) { - - target = target.$chop(); - suffix = "):"; - } else { - suffix = ":" - }; - if ($truthy(target['$end_with?']("://"))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};}; - }; - $c = [nil, $hash2(["type"], {"type": "link"})], (attrs = $c[0]), (link_opts = $c[1]), $c; - if ($truthy(text['$empty?']())) { - } else { - - if ($truthy(text['$include?']($$($nesting, 'R_SB')))) { - text = text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))}; - if ($truthy(($truthy($c = doc.$compat_mode()['$!']()) ? text['$include?']("=") : $c))) { - - $d = self.$extract_attributes_from_text(text, ""), $c = Opal.to_ary($d), (text = ($c[0] == null ? nil : $c[0])), (attrs = ($c[1] == null ? nil : $c[1])), $d; - - $writer = ["id", attrs['$[]']("id")]; - $send(link_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - if ($truthy(text['$end_with?']("^"))) { - - text = text.$chop(); - if ($truthy(attrs)) { - ($truthy($c = attrs['$[]']("window")) ? $c : (($writer = ["window", "_blank"]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - } else { - attrs = $hash2(["window"], {"window": "_blank"}) - };}; - }; - if ($truthy(text['$empty?']())) { - - text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) { - - return target.$sub($$($nesting, 'UriSniffRx'), ""); - } else { - return target - }; return nil; })(); - if ($truthy(attrs)) { - - $writer = ["role", (function() {if ($truthy(attrs['$key?']("role"))) { - return "" + "bare " + (attrs['$[]']("role")) - } else { - return "bare" - }; return nil; })()]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - attrs = $hash2(["role"], {"role": "bare"}) - };}; - doc.$register("links", (($writer = ["target", target]), $send(link_opts, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy(attrs)) { - - $writer = ["attributes", attrs]; - $send(link_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return "" + (prefix) + ($$($nesting, 'Inline').$new(self, "anchor", text, link_opts).$convert()) + (suffix);}, $$33.$$s = self, $$33.$$arity = 0, $$33))}; - if ($truthy(($truthy($a = found_macroish) ? ($truthy($b = text['$include?']("link:")) ? $b : text['$include?']("ilto:")) : $a))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineLinkMacroRx')], ($$34 = function(){var self = $$34.$$s || this, $c, $d, mailto = nil, target = nil, mailto_text = nil, attrs = nil, link_opts = nil, $writer = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length()); - } else if ($truthy((mailto = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1))))) { - target = $rb_plus("mailto:", (mailto_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)))) - } else { - target = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)) - }; - $c = [nil, $hash2(["type"], {"type": "link"})], (attrs = $c[0]), (link_opts = $c[1]), $c; - if ($truthy((text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))['$empty?']())) { - } else { - - if ($truthy(text['$include?']($$($nesting, 'R_SB')))) { - text = text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))}; - if ($truthy(mailto)) { - if ($truthy(($truthy($c = doc.$compat_mode()['$!']()) ? text['$include?'](",") : $c))) { - - $d = self.$extract_attributes_from_text(text, ""), $c = Opal.to_ary($d), (text = ($c[0] == null ? nil : $c[0])), (attrs = ($c[1] == null ? nil : $c[1])), $d; - - $writer = ["id", attrs['$[]']("id")]; - $send(link_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(attrs['$key?'](2))) { - if ($truthy(attrs['$key?'](3))) { - target = "" + (target) + "?subject=" + ($$($nesting, 'Helpers').$encode_uri_component(attrs['$[]'](2))) + "&body=" + ($$($nesting, 'Helpers').$encode_uri_component(attrs['$[]'](3))) - } else { - target = "" + (target) + "?subject=" + ($$($nesting, 'Helpers').$encode_uri_component(attrs['$[]'](2))) - }};} - } else if ($truthy(($truthy($c = doc.$compat_mode()['$!']()) ? text['$include?']("=") : $c))) { - - $d = self.$extract_attributes_from_text(text, ""), $c = Opal.to_ary($d), (text = ($c[0] == null ? nil : $c[0])), (attrs = ($c[1] == null ? nil : $c[1])), $d; - - $writer = ["id", attrs['$[]']("id")]; - $send(link_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - if ($truthy(text['$end_with?']("^"))) { - - text = text.$chop(); - if ($truthy(attrs)) { - ($truthy($c = attrs['$[]']("window")) ? $c : (($writer = ["window", "_blank"]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - } else { - attrs = $hash2(["window"], {"window": "_blank"}) - };}; - }; - if ($truthy(text['$empty?']())) { - if ($truthy(mailto)) { - text = mailto_text - } else { - - if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) { - if ($truthy((text = target.$sub($$($nesting, 'UriSniffRx'), ""))['$empty?']())) { - text = target} - } else { - text = target - }; - if ($truthy(attrs)) { - - $writer = ["role", (function() {if ($truthy(attrs['$key?']("role"))) { - return "" + "bare " + (attrs['$[]']("role")) - } else { - return "bare" - }; return nil; })()]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - attrs = $hash2(["role"], {"role": "bare"}) - }; - }}; - doc.$register("links", (($writer = ["target", target]), $send(link_opts, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy(attrs)) { - - $writer = ["attributes", attrs]; - $send(link_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return $$($nesting, 'Inline').$new(self, "anchor", text, link_opts).$convert();}, $$34.$$s = self, $$34.$$arity = 0, $$34))}; - if ($truthy(text['$include?']("@"))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineEmailRx')], ($$35 = function(){var self = $$35.$$s || this, $c, target = nil, address = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](1)))) { - return (function() {if ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))['$==']($$($nesting, 'RS'))) { - - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length()); - } else { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)) - }; return nil; })();}; - target = $rb_plus("mailto:", (address = (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)))); - doc.$register("links", target); - return $$($nesting, 'Inline').$new(self, "anchor", address, $hash2(["type", "target"], {"type": "link", "target": target})).$convert();}, $$35.$$s = self, $$35.$$arity = 0, $$35))}; - if ($truthy(($truthy($a = ($truthy($b = found_square_bracket) ? self.context['$==']("list_item") : $b)) ? self.parent.$style()['$==']("bibliography") : $a))) { - text = $send(text, 'sub', [$$($nesting, 'InlineBiblioAnchorRx')], ($$36 = function(){var self = $$36.$$s || this, $c; - - return $$($nesting, 'Inline').$new(self, "anchor", (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)), $hash2(["type", "id"], {"type": "bibref", "id": (($c = $gvars['~']) === nil ? nil : $c['$[]'](1))})).$convert()}, $$36.$$s = self, $$36.$$arity = 0, $$36))}; - if ($truthy(($truthy($a = ($truthy($b = found_square_bracket) ? text['$include?']("[[") : $b)) ? $a : ($truthy($b = found_macroish) ? text['$include?']("or:") : $b)))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineAnchorRx')], ($$37 = function(){var self = $$37.$$s || this, $c, $d, id = nil, reftext = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](1)))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - if ($truthy((id = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2))))) { - reftext = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)) - } else { - - id = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4)); - if ($truthy(($truthy($c = (reftext = (($d = $gvars['~']) === nil ? nil : $d['$[]'](5)))) ? reftext['$include?']($$($nesting, 'R_SB')) : $c))) { - reftext = reftext.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))}; - }; - return $$($nesting, 'Inline').$new(self, "anchor", reftext, $hash2(["type", "id"], {"type": "ref", "id": id})).$convert();}, $$37.$$s = self, $$37.$$arity = 0, $$37))}; - if ($truthy(($truthy($a = ($truthy($b = text['$include?']("&")) ? text['$include?'](";&l") : $b)) ? $a : ($truthy($b = found_macroish) ? text['$include?']("xref:") : $b)))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineXrefMacroRx')], ($$38 = function(){var self = $$38.$$s || this, $c, $d, attrs = nil, refid = nil, macro = nil, fragment = nil, hash_idx = nil, fragment_len = nil, path = nil, src2src = nil, target = nil, $writer = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - attrs = $hash2([], {}); - if ($truthy((refid = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1))))) { - - $d = refid.$split(",", 2), $c = Opal.to_ary($d), (refid = ($c[0] == null ? nil : $c[0])), (text = ($c[1] == null ? nil : $c[1])), $d; - if ($truthy(text)) { - text = text.$lstrip()}; - } else { - - macro = true; - refid = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)); - if ($truthy((text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3))))) { - - if ($truthy(text['$include?']($$($nesting, 'R_SB')))) { - text = text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))}; - if ($truthy(($truthy($c = doc.$compat_mode()['$!']()) ? text['$include?']("=") : $c))) { - $d = self.$extract_attributes_from_text(text), $c = Opal.to_ary($d), (text = ($c[0] == null ? nil : $c[0])), (attrs = ($c[1] == null ? nil : $c[1])), $d};}; - }; - if ($truthy(doc.$compat_mode())) { - fragment = refid - } else if ($truthy((hash_idx = refid.$index("#")))) { - if ($truthy($rb_gt(hash_idx, 0))) { - - if ($truthy($rb_gt((fragment_len = $rb_minus($rb_minus(refid.$length(), 1), hash_idx)), 0))) { - $c = [refid.$slice(0, hash_idx), refid.$slice($rb_plus(hash_idx, 1), fragment_len)], (path = $c[0]), (fragment = $c[1]), $c - } else { - path = refid.$chop() - }; - if ($truthy(macro)) { - if ($truthy(path['$end_with?'](".adoc"))) { - src2src = (path = path.$slice(0, $rb_minus(path.$length(), 5))) - } else if ($truthy($$($nesting, 'Helpers')['$extname?'](path)['$!']())) { - src2src = path} - } else if ($truthy($send(path, 'end_with?', Opal.to_a($$($nesting, 'ASCIIDOC_EXTENSIONS').$keys())))) { - src2src = (path = path.$slice(0, path.$rindex("."))) - } else { - src2src = path - }; - } else { - $c = [refid, refid.$slice(1, refid.$length())], (target = $c[0]), (fragment = $c[1]), $c - } - } else if ($truthy(macro)) { - if ($truthy(refid['$end_with?'](".adoc"))) { - src2src = (path = refid.$slice(0, $rb_minus(refid.$length(), 5))) - } else if ($truthy($$($nesting, 'Helpers')['$extname?'](refid))) { - path = refid - } else { - fragment = refid - } - } else { - fragment = refid - }; - if ($truthy(target)) { - - refid = fragment; - if ($truthy(($truthy($c = self.$logger()['$info?']()) ? doc.$catalog()['$[]']("refs")['$[]'](refid)['$!']() : $c))) { - self.$logger().$info("" + "possible invalid reference: " + (refid))}; - } else if ($truthy(path)) { - if ($truthy(($truthy($c = src2src) ? ($truthy($d = doc.$attributes()['$[]']("docname")['$=='](path)) ? $d : doc.$catalog()['$[]']("includes")['$[]'](path)) : $c))) { - if ($truthy(fragment)) { - - $c = [fragment, nil, "" + "#" + (fragment)], (refid = $c[0]), (path = $c[1]), (target = $c[2]), $c; - if ($truthy(($truthy($c = self.$logger()['$info?']()) ? doc.$catalog()['$[]']("refs")['$[]'](refid)['$!']() : $c))) { - self.$logger().$info("" + "possible invalid reference: " + (refid))}; - } else { - $c = [nil, nil, "#"], (refid = $c[0]), (path = $c[1]), (target = $c[2]), $c - } - } else { - - $c = [path, "" + (($truthy($d = doc.$attributes()['$[]']("relfileprefix")) ? $d : "")) + (path) + ((function() {if ($truthy(src2src)) { - - return doc.$attributes().$fetch("relfilesuffix", doc.$outfilesuffix()); - } else { - return "" - }; return nil; })())], (refid = $c[0]), (path = $c[1]), $c; - if ($truthy(fragment)) { - $c = ["" + (refid) + "#" + (fragment), "" + (path) + "#" + (fragment)], (refid = $c[0]), (target = $c[1]), $c - } else { - target = path - }; - } - } else if ($truthy(($truthy($c = doc.$compat_mode()) ? $c : $$($nesting, 'Compliance').$natural_xrefs()['$!']()))) { - - $c = [fragment, "" + "#" + (fragment)], (refid = $c[0]), (target = $c[1]), $c; - if ($truthy(($truthy($c = self.$logger()['$info?']()) ? doc.$catalog()['$[]']("refs")['$[]'](refid)['$!']() : $c))) { - self.$logger().$info("" + "possible invalid reference: " + (refid))}; - } else if ($truthy(doc.$catalog()['$[]']("refs")['$[]'](fragment))) { - $c = [fragment, "" + "#" + (fragment)], (refid = $c[0]), (target = $c[1]), $c - } else if ($truthy(($truthy($c = ($truthy($d = fragment['$include?'](" ")) ? $d : fragment.$downcase()['$!='](fragment))) ? (refid = doc.$resolve_id(fragment)) : $c))) { - $c = [refid, "" + "#" + (refid)], (fragment = $c[0]), (target = $c[1]), $c - } else { - - $c = [fragment, "" + "#" + (fragment)], (refid = $c[0]), (target = $c[1]), $c; - if ($truthy(self.$logger()['$info?']())) { - self.$logger().$info("" + "possible invalid reference: " + (refid))}; - }; - - $writer = ["path", path]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["fragment", fragment]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["refid", refid]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return $$($nesting, 'Inline').$new(self, "anchor", text, $hash2(["type", "target", "attributes"], {"type": "xref", "target": target, "attributes": attrs})).$convert();}, $$38.$$s = self, $$38.$$arity = 0, $$38))}; - if ($truthy(($truthy($a = found_macroish) ? text['$include?']("tnote") : $a))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineFootnoteMacroRx')], ($$39 = function(){var self = $$39.$$s || this, $c, $d, $e, $$40, id = nil, footnote = nil, index = nil, type = nil, target = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](1)))) { - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))) { - - $d = (($e = $gvars['~']) === nil ? nil : $e['$[]'](3)).$split(",", 2), $c = Opal.to_ary($d), (id = ($c[0] == null ? nil : $c[0])), (text = ($c[1] == null ? nil : $c[1])), $d; - if ($truthy(doc.$compat_mode())) { - } else { - self.$logger().$warn("" + "found deprecated footnoteref macro: " + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))) + "; use footnote macro with target instead") - }; - } else { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)); - } - } else { - - id = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)); - text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)); - }; - if ($truthy(id)) { - if ($truthy((footnote = $send(doc.$footnotes(), 'find', [], ($$40 = function(candidate){var self = $$40.$$s || this; - - - - if (candidate == null) { - candidate = nil; - }; - return candidate.$id()['$=='](id);}, $$40.$$s = self, $$40.$$arity = 1, $$40))))) { - - $c = [footnote.$index(), footnote.$text()], (index = $c[0]), (text = $c[1]), $c; - $c = ["xref", id, nil], (type = $c[0]), (target = $c[1]), (id = $c[2]), $c; - } else if ($truthy(text)) { - - text = self.$restore_passthroughs(self.$normalize_text(text, true, true)); - index = doc.$counter("footnote-number"); - doc.$register("footnotes", $$$($$($nesting, 'Document'), 'Footnote').$new(index, id, text)); - $c = ["ref", nil], (type = $c[0]), (target = $c[1]), $c; - } else { - - self.$logger().$warn("" + "invalid footnote reference: " + (id)); - $c = ["xref", id, id, nil], (type = $c[0]), (target = $c[1]), (text = $c[2]), (id = $c[3]), $c; - } - } else if ($truthy(text)) { - - text = self.$restore_passthroughs(self.$normalize_text(text, true, true)); - index = doc.$counter("footnote-number"); - doc.$register("footnotes", $$$($$($nesting, 'Document'), 'Footnote').$new(index, id, text)); - type = (target = nil); - } else { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)); - }; - return $$($nesting, 'Inline').$new(self, "footnote", text, $hash2(["attributes", "id", "target", "type"], {"attributes": $hash2(["index"], {"index": index}), "id": id, "target": target, "type": type})).$convert();}, $$39.$$s = self, $$39.$$arity = 0, $$39))}; - return text; - }, $Substitutors_sub_macros$19.$$arity = 1); - - Opal.def(self, '$sub_post_replacements', $Substitutors_sub_post_replacements$41 = function $$sub_post_replacements(text) { - var $a, $$42, $$43, self = this, lines = nil, last = nil; - if (self.attributes == null) self.attributes = nil; - if (self.document == null) self.document = nil; - - if ($truthy(($truthy($a = self.attributes['$[]']("hardbreaks-option")) ? $a : self.document.$attributes()['$[]']("hardbreaks-option")))) { - - lines = text.$split($$($nesting, 'LF'), -1); - if ($truthy($rb_lt(lines.$size(), 2))) { - return text}; - last = lines.$pop(); - return $send(lines, 'map', [], ($$42 = function(line){var self = $$42.$$s || this; - - - - if (line == null) { - line = nil; - }; - return $$($nesting, 'Inline').$new(self, "break", (function() {if ($truthy(line['$end_with?']($$($nesting, 'HARD_LINE_BREAK')))) { - - return line.$slice(0, $rb_minus(line.$length(), 2)); - } else { - return line - }; return nil; })(), $hash2(["type"], {"type": "line"})).$convert();}, $$42.$$s = self, $$42.$$arity = 1, $$42))['$<<'](last).$join($$($nesting, 'LF')); - } else if ($truthy(($truthy($a = text['$include?']($$($nesting, 'PLUS'))) ? text['$include?']($$($nesting, 'HARD_LINE_BREAK')) : $a))) { - return $send(text, 'gsub', [$$($nesting, 'HardLineBreakRx')], ($$43 = function(){var self = $$43.$$s || this, $b; - - return $$($nesting, 'Inline').$new(self, "break", (($b = $gvars['~']) === nil ? nil : $b['$[]'](1)), $hash2(["type"], {"type": "line"})).$convert()}, $$43.$$s = self, $$43.$$arity = 0, $$43)) - } else { - return text - } - }, $Substitutors_sub_post_replacements$41.$$arity = 1); - - Opal.def(self, '$sub_source', $Substitutors_sub_source$44 = function $$sub_source(source, process_callouts) { - var self = this; - - if ($truthy(process_callouts)) { - return self.$sub_callouts(self.$sub_specialchars(source)) - } else { - - return self.$sub_specialchars(source); - } - }, $Substitutors_sub_source$44.$$arity = 2); - - Opal.def(self, '$sub_callouts', $Substitutors_sub_callouts$45 = function $$sub_callouts(text) { - var $$46, self = this, callout_rx = nil, autonum = nil; - - - callout_rx = (function() {if ($truthy(self['$attr?']("line-comment"))) { - return $$($nesting, 'CalloutSourceRxMap')['$[]'](self.$attr("line-comment")) - } else { - return $$($nesting, 'CalloutSourceRx') - }; return nil; })(); - autonum = 0; - return $send(text, 'gsub', [callout_rx], ($$46 = function(){var self = $$46.$$s || this, $a, $b; - if (self.document == null) self.document = nil; - - if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](2)))) { - return (($a = $gvars['~']) === nil ? nil : $a['$[]'](0)).$sub($$($nesting, 'RS'), "") - } else { - return $$($nesting, 'Inline').$new(self, "callout", (function() {if ((($a = $gvars['~']) === nil ? nil : $a['$[]'](4))['$=='](".")) { - return (autonum = $rb_plus(autonum, 1)).$to_s() - } else { - return (($a = $gvars['~']) === nil ? nil : $a['$[]'](4)) - }; return nil; })(), $hash2(["id", "attributes"], {"id": self.document.$callouts().$read_next_id(), "attributes": $hash2(["guard"], {"guard": ($truthy($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))) ? $a : (function() {if ((($b = $gvars['~']) === nil ? nil : $b['$[]'](3))['$==']("--")) { - return [""] - } else { - return nil - }; return nil; })())})})).$convert() - }}, $$46.$$s = self, $$46.$$arity = 0, $$46)); - }, $Substitutors_sub_callouts$45.$$arity = 1); - - Opal.def(self, '$highlight_source', $Substitutors_highlight_source$47 = function $$highlight_source(source, process_callouts) { - var $a, $b, $c, self = this, syntax_hl = nil, callout_marks = nil, doc_attrs = nil, syntax_hl_name = nil, linenums_mode = nil, start_line_number = nil, highlight_lines = nil, highlighted = nil, source_offset = nil; - if (self.document == null) self.document = nil; - if (self.passthroughs == null) self.passthroughs = nil; - - - if ($truthy(($truthy($a = (syntax_hl = self.document.$syntax_highlighter())) ? syntax_hl['$highlight?']() : $a))) { - } else { - return self.$sub_source(source, process_callouts) - }; - if ($truthy(process_callouts)) { - $b = self.$extract_callouts(source), $a = Opal.to_ary($b), (source = ($a[0] == null ? nil : $a[0])), (callout_marks = ($a[1] == null ? nil : $a[1])), $b}; - doc_attrs = self.document.$attributes(); - syntax_hl_name = syntax_hl.$name(); - if ($truthy((linenums_mode = (function() {if ($truthy(self['$attr?']("linenums"))) { - return ($truthy($a = doc_attrs['$[]']("" + (syntax_hl_name) + "-linenums-mode")) ? $a : "table").$to_sym() - } else { - return nil - }; return nil; })()))) { - if ($truthy($rb_lt((start_line_number = self.$attr("start", 1).$to_i()), 1))) { - start_line_number = 1}}; - if ($truthy(self['$attr?']("highlight"))) { - highlight_lines = self.$resolve_lines_to_highlight(source, self.$attr("highlight"), start_line_number)}; - $b = syntax_hl.$highlight(self, source, self.$attr("language"), $hash2(["callouts", "css_mode", "highlight_lines", "number_lines", "start_line_number", "style"], {"callouts": callout_marks, "css_mode": ($truthy($c = doc_attrs['$[]']("" + (syntax_hl_name) + "-css")) ? $c : "class").$to_sym(), "highlight_lines": highlight_lines, "number_lines": linenums_mode, "start_line_number": start_line_number, "style": doc_attrs['$[]']("" + (syntax_hl_name) + "-style")})), $a = Opal.to_ary($b), (highlighted = ($a[0] == null ? nil : $a[0])), (source_offset = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy(self.passthroughs['$empty?']())) { - } else { - highlighted = highlighted.$gsub($$($nesting, 'HighlightedPassSlotRx'), "" + ($$($nesting, 'PASS_START')) + "\\1" + ($$($nesting, 'PASS_END'))) - }; - if ($truthy(callout_marks['$nil_or_empty?']())) { - return highlighted - } else { - - return self.$restore_callouts(highlighted, callout_marks, source_offset); - }; - }, $Substitutors_highlight_source$47.$$arity = 2); - - Opal.def(self, '$resolve_lines_to_highlight', $Substitutors_resolve_lines_to_highlight$48 = function $$resolve_lines_to_highlight(source, spec, start) { - var $$49, $$50, self = this, lines = nil, shift = nil; - - - - if (start == null) { - start = nil; - }; - lines = []; - if ($truthy(spec['$include?'](" "))) { - spec = spec.$delete(" ")}; - $send((function() {if ($truthy(spec['$include?'](","))) { - - return spec.$split(","); - } else { - - return spec.$split(";"); - }; return nil; })(), 'map', [], ($$49 = function(entry){var self = $$49.$$s || this, $a, $b, negate = nil, delim = nil, from = nil, to = nil, line = nil; - - - - if (entry == null) { - entry = nil; - }; - if ($truthy(entry['$start_with?']("!"))) { - - entry = entry.$slice(1, entry.$length()); - negate = true;}; - if ($truthy((delim = (function() {if ($truthy(entry['$include?'](".."))) { - return ".." - } else { - - if ($truthy(entry['$include?']("-"))) { - return "-" - } else { - return nil - }; - }; return nil; })()))) { - - $b = entry.$partition(delim), $a = Opal.to_ary($b), (from = ($a[0] == null ? nil : $a[0])), (delim = ($a[1] == null ? nil : $a[1])), (to = ($a[2] == null ? nil : $a[2])), $b; - if ($truthy(($truthy($a = to['$empty?']()) ? $a : $rb_lt((to = to.$to_i()), 0)))) { - to = $rb_plus(source.$count($$($nesting, 'LF')), 1)}; - if ($truthy(negate)) { - return (lines = $rb_minus(lines, Opal.Range.$new(from.$to_i(), to, false).$to_a())) - } else { - return (lines = lines['$|'](Opal.Range.$new(from.$to_i(), to, false).$to_a())) - }; - } else if ($truthy(negate)) { - return lines.$delete(entry.$to_i()) - } else if ($truthy(lines['$include?']((line = entry.$to_i()))['$!']())) { - return lines['$<<'](line) - } else { - return nil - };}, $$49.$$s = self, $$49.$$arity = 1, $$49)); - if ((shift = (function() {if ($truthy(start)) { - return $rb_minus(start, 1) - } else { - return 0 - }; return nil; })())['$=='](0)) { - } else { - lines = $send(lines, 'map', [], ($$50 = function(it){var self = $$50.$$s || this; - - - - if (it == null) { - it = nil; - }; - return $rb_minus(it, shift);}, $$50.$$s = self, $$50.$$arity = 1, $$50)) - }; - return lines.$sort(); - }, $Substitutors_resolve_lines_to_highlight$48.$$arity = -3); - - Opal.def(self, '$extract_passthroughs', $Substitutors_extract_passthroughs$51 = function $$extract_passthroughs(text) { - var $a, $b, $$52, $$53, $$54, self = this, compat_mode = nil, passthrus = nil, pass_inline_char1 = nil, pass_inline_char2 = nil, pass_inline_rx = nil; - if (self.document == null) self.document = nil; - if (self.passthroughs == null) self.passthroughs = nil; - - - compat_mode = self.document.$compat_mode(); - passthrus = self.passthroughs; - if ($truthy(($truthy($a = ($truthy($b = text['$include?']("++")) ? $b : text['$include?']("$$"))) ? $a : text['$include?']("ss:")))) { - text = $send(text, 'gsub', [$$($nesting, 'InlinePassMacroRx')], ($$52 = function(){var self = $$52.$$s || this, $c, boundary = nil, attrlist = nil, escape_count = nil, preceding = nil, old_behavior = nil, attributes = nil, subs = nil, $writer = nil, passthru_key = nil; - - - if ($truthy((boundary = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4))))) { - - if ($truthy(($truthy($c = compat_mode) ? boundary['$==']("++") : $c))) { - return "" + ((function() {if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](2)))) { - return "" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))) + "[" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](2))) + "]" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](3))) - } else { - return "" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](3))) - }; return nil; })()) + "++" + (self.$extract_passthroughs((($c = $gvars['~']) === nil ? nil : $c['$[]'](5)))) + "++";}; - if ($truthy((attrlist = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2))))) { - if ($truthy($rb_gt((escape_count = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)).$length()), 0))) { - return "" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))) + "[" + (attrlist) + "]" + ($rb_times($$($nesting, 'RS'), $rb_minus(escape_count, 1))) + (boundary) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](5))) + (boundary); - } else if ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))['$==']($$($nesting, 'RS'))) { - preceding = "" + "[" + (attrlist) + "]" - } else { - - if ($truthy((($c = boundary['$==']("++")) ? attrlist['$end_with?']("x-") : boundary['$==']("++")))) { - - old_behavior = true; - attrlist = attrlist.$slice(0, $rb_minus(attrlist.$length(), 2));}; - attributes = self.$parse_quoted_text_attributes(attrlist); - } - } else if ($truthy($rb_gt((escape_count = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)).$length()), 0))) { - return "" + ($rb_times($$($nesting, 'RS'), $rb_minus(escape_count, 1))) + (boundary) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](5))) + (boundary);}; - subs = (function() {if (boundary['$==']("+++")) { - return [] - } else { - return $$($nesting, 'BASIC_SUBS') - }; return nil; })(); - if ($truthy(attributes)) { - if ($truthy(old_behavior)) { - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "type", "attributes"], {"text": (($c = $gvars['~']) === nil ? nil : $c['$[]'](5)), "subs": $$($nesting, 'NORMAL_SUBS'), "type": "monospaced", "attributes": attributes})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "type", "attributes"], {"text": (($c = $gvars['~']) === nil ? nil : $c['$[]'](5)), "subs": subs, "type": "unquoted", "attributes": attributes})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } - } else { - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs"], {"text": (($c = $gvars['~']) === nil ? nil : $c['$[]'](5)), "subs": subs})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - } else { - - if ((($c = $gvars['~']) === nil ? nil : $c['$[]'](6))['$==']($$($nesting, 'RS'))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - if ($truthy((subs = (($c = $gvars['~']) === nil ? nil : $c['$[]'](7))))) { - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs"], {"text": self.$normalize_text((($c = $gvars['~']) === nil ? nil : $c['$[]'](8)), nil, true), "subs": self.$resolve_pass_subs(subs)})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text"], {"text": self.$normalize_text((($c = $gvars['~']) === nil ? nil : $c['$[]'](8)), nil, true)})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - }; - return "" + (($truthy($c = preceding) ? $c : "")) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$52.$$s = self, $$52.$$arity = 0, $$52))}; - $b = $$($nesting, 'InlinePassRx')['$[]'](compat_mode), $a = Opal.to_ary($b), (pass_inline_char1 = ($a[0] == null ? nil : $a[0])), (pass_inline_char2 = ($a[1] == null ? nil : $a[1])), (pass_inline_rx = ($a[2] == null ? nil : $a[2])), $b; - if ($truthy(($truthy($a = text['$include?'](pass_inline_char1)) ? $a : ($truthy($b = pass_inline_char2) ? text['$include?'](pass_inline_char2) : $b)))) { - text = $send(text, 'gsub', [pass_inline_rx], ($$53 = function(){var self = $$53.$$s || this, $c, preceding = nil, attrlist = nil, quoted_text = nil, escape_mark = nil, format_mark = nil, content = nil, old_behavior = nil, attributes = nil, $writer = nil, passthru_key = nil, subs = nil; - - - preceding = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1)); - attrlist = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)); - if ($truthy((quoted_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))['$start_with?']($$($nesting, 'RS')))) { - escape_mark = $$($nesting, 'RS')}; - format_mark = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4)); - content = (($c = $gvars['~']) === nil ? nil : $c['$[]'](5)); - if ($truthy(compat_mode)) { - old_behavior = true - } else if ($truthy((old_behavior = ($truthy($c = attrlist) ? attrlist['$end_with?']("x-") : $c)))) { - attrlist = attrlist.$slice(0, $rb_minus(attrlist.$length(), 2))}; - if ($truthy(attrlist)) { - if ($truthy((($c = format_mark['$==']("`")) ? old_behavior['$!']() : format_mark['$==']("`")))) { - return self.$extract_inner_passthrough(content, "" + (preceding) + "[" + (attrlist) + "]" + (escape_mark)); - } else if ($truthy(escape_mark)) { - return "" + (preceding) + "[" + (attrlist) + "]" + (quoted_text.$slice(1, quoted_text.$length())); - } else if (preceding['$==']($$($nesting, 'RS'))) { - preceding = "" + "[" + (attrlist) + "]" - } else { - attributes = self.$parse_quoted_text_attributes(attrlist) - } - } else if ($truthy((($c = format_mark['$==']("`")) ? old_behavior['$!']() : format_mark['$==']("`")))) { - return self.$extract_inner_passthrough(content, "" + (preceding) + (escape_mark)); - } else if ($truthy(escape_mark)) { - return "" + (preceding) + (quoted_text.$slice(1, quoted_text.$length()));}; - if ($truthy(compat_mode)) { - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "attributes", "type"], {"text": content, "subs": $$($nesting, 'BASIC_SUBS'), "attributes": attributes, "type": "monospaced"})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else if ($truthy(attributes)) { - if ($truthy(old_behavior)) { - - subs = (function() {if (format_mark['$==']("`")) { - return $$($nesting, 'BASIC_SUBS') - } else { - return $$($nesting, 'NORMAL_SUBS') - }; return nil; })(); - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "attributes", "type"], {"text": content, "subs": subs, "attributes": attributes, "type": "monospaced"})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "attributes", "type"], {"text": content, "subs": $$($nesting, 'BASIC_SUBS'), "attributes": attributes, "type": "unquoted"})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } - } else { - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs"], {"text": content, "subs": $$($nesting, 'BASIC_SUBS')})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - return "" + (preceding) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$53.$$s = self, $$53.$$arity = 0, $$53))}; - if ($truthy(($truthy($a = text['$include?'](":")) ? ($truthy($b = text['$include?']("stem:")) ? $b : text['$include?']("math:")) : $a))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineStemMacroRx')], ($$54 = function(){var self = $$54.$$s || this, $c, $d, type = nil, subs = nil, content = nil, $writer = nil, passthru_key = nil; - if (self.document == null) self.document = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - if ((type = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1)).$to_sym())['$==']("stem")) { - type = $$($nesting, 'STEM_TYPE_ALIASES')['$[]'](self.document.$attributes()['$[]']("stem")).$to_sym()}; - subs = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)); - content = self.$normalize_text((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)), nil, true); - if ($truthy(($truthy($c = (($d = type['$==']("latexmath")) ? content['$start_with?']("$") : type['$==']("latexmath"))) ? content['$end_with?']("$") : $c))) { - content = content.$slice(1, $rb_minus(content.$length(), 2))}; - subs = (function() {if ($truthy(subs)) { - - return self.$resolve_pass_subs(subs); - } else { - - if ($truthy(self.document['$basebackend?']("html"))) { - return $$($nesting, 'BASIC_SUBS') - } else { - return nil - }; - }; return nil; })(); - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "type"], {"text": content, "subs": subs, "type": type})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return "" + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$54.$$s = self, $$54.$$arity = 0, $$54))}; - return text; - }, $Substitutors_extract_passthroughs$51.$$arity = 1); - - Opal.def(self, '$restore_passthroughs', $Substitutors_restore_passthroughs$55 = function $$restore_passthroughs(text) { - var $$56, self = this, passthrus = nil; - if (self.passthroughs == null) self.passthroughs = nil; - - - passthrus = self.passthroughs; - return $send(text, 'gsub', [$$($nesting, 'PassSlotRx')], ($$56 = function(){var self = $$56.$$s || this, $a, pass = nil, subbed_text = nil, type = nil, attributes = nil, id = nil; - - if ($truthy((pass = passthrus['$[]']((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)).$to_i())))) { - - subbed_text = self.$apply_subs(pass['$[]']("text"), pass['$[]']("subs")); - if ($truthy((type = pass['$[]']("type")))) { - - if ($truthy((attributes = pass['$[]']("attributes")))) { - id = attributes['$[]']("id")}; - subbed_text = $$($nesting, 'Inline').$new(self, "quoted", subbed_text, $hash2(["type", "id", "attributes"], {"type": type, "id": id, "attributes": attributes})).$convert();}; - if ($truthy(subbed_text['$include?']($$($nesting, 'PASS_START')))) { - return self.$restore_passthroughs(subbed_text) - } else { - return subbed_text - }; - } else { - - self.$logger().$error("" + "unresolved passthrough detected: " + (text)); - return "??pass??"; - }}, $$56.$$s = self, $$56.$$arity = 0, $$56)); - }, $Substitutors_restore_passthroughs$55.$$arity = 1); - - Opal.def(self, '$resolve_subs', $Substitutors_resolve_subs$57 = function $$resolve_subs(subs, type, defaults, subject) { - var $$58, self = this, candidates = nil, modifiers_present = nil, resolved = nil, invalid = nil; - - - - if (type == null) { - type = "block"; - }; - - if (defaults == null) { - defaults = nil; - }; - - if (subject == null) { - subject = nil; - }; - if ($truthy(subs['$nil_or_empty?']())) { - return nil}; - candidates = nil; - if ($truthy(subs['$include?'](" "))) { - subs = subs.$delete(" ")}; - modifiers_present = $$($nesting, 'SubModifierSniffRx')['$match?'](subs); - $send(subs.$split(","), 'each', [], ($$58 = function(key){var self = $$58.$$s || this, $a, $b, modifier_operation = nil, first = nil, resolved_keys = nil, resolved_key = nil, candidate = nil, $case = nil; - - - - if (key == null) { - key = nil; - }; - modifier_operation = nil; - if ($truthy(modifiers_present)) { - if ((first = key.$chr())['$==']("+")) { - - modifier_operation = "append"; - key = key.$slice(1, key.$length()); - } else if (first['$==']("-")) { - - modifier_operation = "remove"; - key = key.$slice(1, key.$length()); - } else if ($truthy(key['$end_with?']("+"))) { - - modifier_operation = "prepend"; - key = key.$chop();}}; - key = key.$to_sym(); - if ($truthy((($a = type['$==']("inline")) ? ($truthy($b = key['$==']("verbatim")) ? $b : key['$==']("v")) : type['$==']("inline")))) { - resolved_keys = $$($nesting, 'BASIC_SUBS') - } else if ($truthy($$($nesting, 'SUB_GROUPS')['$key?'](key))) { - resolved_keys = $$($nesting, 'SUB_GROUPS')['$[]'](key) - } else if ($truthy(($truthy($a = (($b = type['$==']("inline")) ? key.$length()['$=='](1) : type['$==']("inline"))) ? $$($nesting, 'SUB_HINTS')['$key?'](key) : $a))) { - - resolved_key = $$($nesting, 'SUB_HINTS')['$[]'](key); - if ($truthy((candidate = $$($nesting, 'SUB_GROUPS')['$[]'](resolved_key)))) { - resolved_keys = candidate - } else { - resolved_keys = [resolved_key] - }; - } else { - resolved_keys = [key] - }; - if ($truthy(modifier_operation)) { - - candidates = ($truthy($a = candidates) ? $a : (function() {if ($truthy(defaults)) { - - return defaults.$drop(0); - } else { - return [] - }; return nil; })()); - return (function() {$case = modifier_operation; - if ("append"['$===']($case)) {return (candidates = $rb_plus(candidates, resolved_keys))} - else if ("prepend"['$===']($case)) {return (candidates = $rb_plus(resolved_keys, candidates))} - else if ("remove"['$===']($case)) {return (candidates = $rb_minus(candidates, resolved_keys))} - else { return nil }})(); - } else { - - candidates = ($truthy($a = candidates) ? $a : []); - return (candidates = $rb_plus(candidates, resolved_keys)); - };}, $$58.$$s = self, $$58.$$arity = 1, $$58)); - if ($truthy(candidates)) { - } else { - return nil - }; - resolved = candidates['$&']($$($nesting, 'SUB_OPTIONS')['$[]'](type)); - if ($truthy($rb_minus(candidates, resolved)['$empty?']())) { - } else { - - invalid = $rb_minus(candidates, resolved); - self.$logger().$warn("" + "invalid substitution type" + ((function() {if ($truthy($rb_gt(invalid.$size(), 1))) { - return "s" - } else { - return "" - }; return nil; })()) + ((function() {if ($truthy(subject)) { - return " for " - } else { - return "" - }; return nil; })()) + (subject) + ": " + (invalid.$join(", "))); - }; - return resolved; - }, $Substitutors_resolve_subs$57.$$arity = -2); - - Opal.def(self, '$resolve_block_subs', $Substitutors_resolve_block_subs$59 = function $$resolve_block_subs(subs, defaults, subject) { - var self = this; - - return self.$resolve_subs(subs, "block", defaults, subject) - }, $Substitutors_resolve_block_subs$59.$$arity = 3); - - Opal.def(self, '$resolve_pass_subs', $Substitutors_resolve_pass_subs$60 = function $$resolve_pass_subs(subs) { - var self = this; - - return self.$resolve_subs(subs, "inline", nil, "passthrough macro") - }, $Substitutors_resolve_pass_subs$60.$$arity = 1); - - Opal.def(self, '$expand_subs', $Substitutors_expand_subs$61 = function $$expand_subs(subs, subject) { - var $a, $$62, self = this, expanded_subs = nil; - - - - if (subject == null) { - subject = nil; - }; - if ($truthy($$$('::', 'Symbol')['$==='](subs))) { - if (subs['$==']("none")) { - return nil - } else { - return ($truthy($a = $$($nesting, 'SUB_GROUPS')['$[]'](subs)) ? $a : [subs]) - } - } else if ($truthy($$$('::', 'Array')['$==='](subs))) { - - expanded_subs = []; - $send(subs, 'each', [], ($$62 = function(key){var self = $$62.$$s || this, sub_group = nil; - - - - if (key == null) { - key = nil; - }; - if (key['$==']("none")) { - return nil - } else if ($truthy((sub_group = $$($nesting, 'SUB_GROUPS')['$[]'](key)))) { - return (expanded_subs = $rb_plus(expanded_subs, sub_group)) - } else { - return expanded_subs['$<<'](key) - };}, $$62.$$s = self, $$62.$$arity = 1, $$62)); - if ($truthy(expanded_subs['$empty?']())) { - return nil - } else { - return expanded_subs - }; - } else { - return self.$resolve_subs(subs, "inline", nil, subject) - }; - }, $Substitutors_expand_subs$61.$$arity = -2); - - Opal.def(self, '$commit_subs', $Substitutors_commit_subs$63 = function $$commit_subs() { - var $a, $b, $c, $d, self = this, default_subs = nil, $case = nil, custom_subs = nil, syntax_hl = nil, idx = nil, $writer = nil; - if (self.default_subs == null) self.default_subs = nil; - if (self.content_model == null) self.content_model = nil; - if (self.context == null) self.context = nil; - if (self.subs == null) self.subs = nil; - if (self.attributes == null) self.attributes = nil; - if (self.style == null) self.style = nil; - if (self.document == null) self.document = nil; - - - if ($truthy((default_subs = self.default_subs))) { - } else { - $case = self.content_model; - if ("simple"['$===']($case)) {default_subs = $$($nesting, 'NORMAL_SUBS')} - else if ("verbatim"['$===']($case)) {default_subs = (function() {if (self.context['$==']("verse")) { - return $$($nesting, 'NORMAL_SUBS') - } else { - return $$($nesting, 'VERBATIM_SUBS') - }; return nil; })()} - else if ("raw"['$===']($case)) {default_subs = (function() {if (self.context['$==']("stem")) { - return $$($nesting, 'BASIC_SUBS') - } else { - return $$($nesting, 'NO_SUBS') - }; return nil; })()} - else {return self.subs} - }; - if ($truthy((custom_subs = self.attributes['$[]']("subs")))) { - self.subs = ($truthy($a = self.$resolve_block_subs(custom_subs, default_subs, self.context)) ? $a : []) - } else { - self.subs = default_subs.$drop(0) - }; - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = (($d = self.context['$==']("listing")) ? self.style['$==']("source") : self.context['$==']("listing"))) ? (syntax_hl = self.document.$syntax_highlighter()) : $c)) ? syntax_hl['$highlight?']() : $b)) ? (idx = self.subs.$index("specialcharacters")) : $a))) { - - $writer = [idx, "highlight"]; - $send(self.subs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return nil; - }, $Substitutors_commit_subs$63.$$arity = 0); - - Opal.def(self, '$parse_attributes', $Substitutors_parse_attributes$64 = function $$parse_attributes(attrlist, posattrs, opts) { - var $a, self = this, block = nil, into = nil; - if (self.document == null) self.document = nil; - - - - if (posattrs == null) { - posattrs = []; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy((function() {if ($truthy(attrlist)) { - return attrlist['$empty?']() - } else { - return true - }; return nil; })())) { - return $hash2([], {})}; - if ($truthy(opts['$[]']("unescape_input"))) { - attrlist = self.$normalize_text(attrlist, true, true)}; - if ($truthy(($truthy($a = opts['$[]']("sub_input")) ? attrlist['$include?']($$($nesting, 'ATTR_REF_HEAD')) : $a))) { - attrlist = self.document.$sub_attributes(attrlist)}; - if ($truthy(opts['$[]']("sub_result"))) { - block = self}; - if ($truthy((into = opts['$[]']("into")))) { - return $$($nesting, 'AttributeList').$new(attrlist, block).$parse_into(into, posattrs) - } else { - return $$($nesting, 'AttributeList').$new(attrlist, block).$parse(posattrs) - }; - }, $Substitutors_parse_attributes$64.$$arity = -2); - self.$private(); - - Opal.def(self, '$extract_attributes_from_text', $Substitutors_extract_attributes_from_text$65 = function $$extract_attributes_from_text(text, default_text) { - var self = this, attrlist = nil, resolved_text = nil, attrs = nil; - - - - if (default_text == null) { - default_text = nil; - }; - attrlist = (function() {if ($truthy(text['$include?']($$($nesting, 'LF')))) { - - return text.$tr($$($nesting, 'LF'), " "); - } else { - return text - }; return nil; })(); - if ($truthy((resolved_text = (attrs = $$($nesting, 'AttributeList').$new(attrlist, self).$parse())['$[]'](1)))) { - if (resolved_text['$=='](attrlist)) { - return [text, attrs.$clear()] - } else { - return [resolved_text, attrs] - } - } else { - return [default_text, attrs] - }; - }, $Substitutors_extract_attributes_from_text$65.$$arity = -2); - - Opal.def(self, '$extract_callouts', $Substitutors_extract_callouts$66 = function $$extract_callouts(source) { - var $$67, self = this, callout_marks = nil, autonum = nil, lineno = nil, last_lineno = nil, callout_rx = nil; - - - callout_marks = $hash2([], {}); - autonum = (lineno = 0); - last_lineno = nil; - callout_rx = (function() {if ($truthy(self['$attr?']("line-comment"))) { - return $$($nesting, 'CalloutExtractRxMap')['$[]'](self.$attr("line-comment")) - } else { - return $$($nesting, 'CalloutExtractRx') - }; return nil; })(); - source = $send(source.$split($$($nesting, 'LF'), -1), 'map', [], ($$67 = function(line){var self = $$67.$$s || this, $$68; - - - - if (line == null) { - line = nil; - }; - lineno = $rb_plus(lineno, 1); - return $send(line, 'gsub', [callout_rx], ($$68 = function(){var self = $$68.$$s || this, $a, $b, $writer = nil; - - if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](2)))) { - return (($a = $gvars['~']) === nil ? nil : $a['$[]'](0)).$sub($$($nesting, 'RS'), "") - } else { - - ($truthy($a = callout_marks['$[]'](lineno)) ? $a : (($writer = [lineno, []]), $send(callout_marks, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))['$<<']([($truthy($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))) ? $a : (function() {if ((($b = $gvars['~']) === nil ? nil : $b['$[]'](3))['$==']("--")) { - return [""] - } else { - return nil - }; return nil; })()), (function() {if ((($a = $gvars['~']) === nil ? nil : $a['$[]'](4))['$=='](".")) { - return (autonum = $rb_plus(autonum, 1)).$to_s() - } else { - return (($a = $gvars['~']) === nil ? nil : $a['$[]'](4)) - }; return nil; })()]); - last_lineno = lineno; - return ""; - }}, $$68.$$s = self, $$68.$$arity = 0, $$68));}, $$67.$$s = self, $$67.$$arity = 1, $$67)).$join($$($nesting, 'LF')); - if ($truthy(last_lineno)) { - if (last_lineno['$=='](lineno)) { - source = "" + (source) + ($$($nesting, 'LF'))} - } else { - callout_marks = nil - }; - return [source, callout_marks]; - }, $Substitutors_extract_callouts$66.$$arity = 1); - - Opal.def(self, '$restore_callouts', $Substitutors_restore_callouts$69 = function $$restore_callouts(source, callout_marks, source_offset) { - var $$70, self = this, preamble = nil, lineno = nil; - - - - if (source_offset == null) { - source_offset = nil; - }; - if ($truthy(source_offset)) { - - preamble = source.$slice(0, source_offset); - source = source.$slice(source_offset, source.$length()); - } else { - preamble = "" - }; - lineno = 0; - return $rb_plus(preamble, $send(source.$split($$($nesting, 'LF'), -1), 'map', [], ($$70 = function(line){var self = $$70.$$s || this, $a, $b, $$71, conums = nil, guard = nil, numeral = nil; - if (self.document == null) self.document = nil; - - - - if (line == null) { - line = nil; - }; - if ($truthy((conums = callout_marks.$delete((lineno = $rb_plus(lineno, 1)))))) { - if (conums.$size()['$=='](1)) { - - $b = conums['$[]'](0), $a = Opal.to_ary($b), (guard = ($a[0] == null ? nil : $a[0])), (numeral = ($a[1] == null ? nil : $a[1])), $b; - return "" + (line) + ($$($nesting, 'Inline').$new(self, "callout", numeral, $hash2(["id", "attributes"], {"id": self.document.$callouts().$read_next_id(), "attributes": $hash2(["guard"], {"guard": guard})})).$convert()); - } else { - return "" + (line) + ($send(conums, 'map', [], ($$71 = function(guard_it, numeral_it){var self = $$71.$$s || this; - if (self.document == null) self.document = nil; - - - - if (guard_it == null) { - guard_it = nil; - }; - - if (numeral_it == null) { - numeral_it = nil; - }; - return $$($nesting, 'Inline').$new(self, "callout", numeral_it, $hash2(["id", "attributes"], {"id": self.document.$callouts().$read_next_id(), "attributes": $hash2(["guard"], {"guard": guard_it})})).$convert();}, $$71.$$s = self, $$71.$$arity = 2, $$71)).$join(" ")) - } - } else { - return line - };}, $$70.$$s = self, $$70.$$arity = 1, $$70)).$join($$($nesting, 'LF'))); - }, $Substitutors_restore_callouts$69.$$arity = -3); - - Opal.def(self, '$extract_inner_passthrough', $Substitutors_extract_inner_passthrough$72 = function $$extract_inner_passthrough(text, pre) { - var $a, $b, self = this, $writer = nil, passthru_key = nil; - if (self.passthroughs == null) self.passthroughs = nil; - - if ($truthy(($truthy($a = ($truthy($b = text['$end_with?']("+")) ? text['$start_with?']("+", "\\+") : $b)) ? $$($nesting, 'SinglePlusInlinePassRx')['$=~'](text) : $a))) { - if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)))) { - return "" + (pre) + "`+" + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](2))) + "+`" - } else { - - - $writer = [(passthru_key = self.passthroughs.$size()), $hash2(["text", "subs"], {"text": (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), "subs": $$($nesting, 'BASIC_SUBS')})]; - $send(self.passthroughs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return "" + (pre) + "`" + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END')) + "`"; - } - } else { - return "" + (pre) + "`" + (text) + "`" - } - }, $Substitutors_extract_inner_passthrough$72.$$arity = 2); - - Opal.def(self, '$convert_quoted_text', $Substitutors_convert_quoted_text$73 = function $$convert_quoted_text(match, type, scope) { - var $a, self = this, attrs = nil, unescaped_attrs = nil, attrlist = nil, id = nil, attributes = nil; - - - if ($truthy(match['$[]'](0)['$start_with?']($$($nesting, 'RS')))) { - if ($truthy((($a = scope['$==']("constrained")) ? (attrs = match['$[]'](2)) : scope['$==']("constrained")))) { - unescaped_attrs = "" + "[" + (attrs) + "]" - } else { - return match['$[]'](0).$slice(1, match['$[]'](0).$length()) - }}; - if (scope['$==']("constrained")) { - if ($truthy(unescaped_attrs)) { - return "" + (unescaped_attrs) + ($$($nesting, 'Inline').$new(self, "quoted", match['$[]'](3), $hash2(["type"], {"type": type})).$convert()) - } else { - - if ($truthy((attrlist = match['$[]'](2)))) { - - id = (attributes = self.$parse_quoted_text_attributes(attrlist))['$[]']("id"); - if (type['$==']("mark")) { - type = "unquoted"};}; - return "" + (match['$[]'](1)) + ($$($nesting, 'Inline').$new(self, "quoted", match['$[]'](3), $hash2(["type", "id", "attributes"], {"type": type, "id": id, "attributes": attributes})).$convert()); - } - } else { - - if ($truthy((attrlist = match['$[]'](1)))) { - - id = (attributes = self.$parse_quoted_text_attributes(attrlist))['$[]']("id"); - if (type['$==']("mark")) { - type = "unquoted"};}; - return $$($nesting, 'Inline').$new(self, "quoted", match['$[]'](2), $hash2(["type", "id", "attributes"], {"type": type, "id": id, "attributes": attributes})).$convert(); - }; - }, $Substitutors_convert_quoted_text$73.$$arity = 3); - - Opal.def(self, '$do_replacement', $Substitutors_do_replacement$74 = function $$do_replacement(m, replacement, restore) { - var self = this, captured = nil, $case = nil; - - if ($truthy((captured = m['$[]'](0))['$include?']($$($nesting, 'RS')))) { - return captured.$sub($$($nesting, 'RS'), "") - } else { - return (function() {$case = restore; - if ("none"['$===']($case)) {return replacement} - else if ("bounding"['$===']($case)) {return $rb_plus($rb_plus(m['$[]'](1), replacement), m['$[]'](2))} - else {return $rb_plus(m['$[]'](1), replacement)}})() - } - }, $Substitutors_do_replacement$74.$$arity = 3); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - - Opal.def(self, '$parse_quoted_text_attributes', $Substitutors_parse_quoted_text_attributes$75 = function $$parse_quoted_text_attributes(str) { - var $a, $b, self = this, segments = nil, id = nil, more_roles = nil, roles = nil, attrs = nil, $writer = nil; - - - if ($truthy(str['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - str = self.$sub_attributes(str)}; - if ($truthy(str['$include?'](","))) { - str = str.$slice(0, str.$index(","))}; - if ($truthy((str = str.$strip())['$empty?']())) { - return $hash2([], {}) - } else if ($truthy(($truthy($a = str['$start_with?'](".", "#")) ? $$($nesting, 'Compliance').$shorthand_property_syntax() : $a))) { - - segments = str.$split("#", 2); - if ($truthy($rb_gt(segments.$size(), 1))) { - $b = segments['$[]'](1).$split("."), $a = Opal.to_ary($b), (id = ($a[0] == null ? nil : $a[0])), (more_roles = $slice.call($a, 1)), $b - } else { - more_roles = [] - }; - roles = (function() {if ($truthy(segments['$[]'](0)['$empty?']())) { - return [] - } else { - return segments['$[]'](0).$split(".") - }; return nil; })(); - if ($truthy($rb_gt(roles.$size(), 1))) { - roles.$shift()}; - if ($truthy($rb_gt(more_roles.$size(), 0))) { - roles.$concat(more_roles)}; - attrs = $hash2([], {}); - if ($truthy(id)) { - - $writer = ["id", id]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(roles['$empty?']())) { - } else { - - $writer = ["role", roles.$join(" ")]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - return attrs; - } else { - return $hash2(["role"], {"role": str}) - }; - }, $Substitutors_parse_quoted_text_attributes$75.$$arity = 1); - - Opal.def(self, '$normalize_text', $Substitutors_normalize_text$76 = function $$normalize_text(text, normalize_whitespace, unescape_closing_square_brackets) { - var $a, self = this; - - - - if (normalize_whitespace == null) { - normalize_whitespace = nil; - }; - - if (unescape_closing_square_brackets == null) { - unescape_closing_square_brackets = nil; - }; - if ($truthy(text['$empty?']())) { - } else { - - if ($truthy(normalize_whitespace)) { - text = text.$strip().$tr($$($nesting, 'LF'), " ")}; - if ($truthy(($truthy($a = unescape_closing_square_brackets) ? text['$include?']($$($nesting, 'R_SB')) : $a))) { - text = text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))}; - }; - return text; - }, $Substitutors_normalize_text$76.$$arity = -2); - - Opal.def(self, '$split_simple_csv', $Substitutors_split_simple_csv$77 = function $$split_simple_csv(str) { - var $$78, $$79, self = this, values = nil, accum = nil, quote_open = nil; - - if ($truthy(str['$empty?']())) { - return [] - } else if ($truthy(str['$include?']("\""))) { - - values = []; - accum = ""; - quote_open = nil; - $send(str, 'each_char', [], ($$78 = function(c){var self = $$78.$$s || this, $case = nil; - - - - if (c == null) { - c = nil; - }; - return (function() {$case = c; - if (","['$===']($case)) {if ($truthy(quote_open)) { - return (accum = $rb_plus(accum, c)) - } else { - - values['$<<'](accum.$strip()); - return (accum = ""); - }} - else if ("\""['$===']($case)) {return (quote_open = quote_open['$!']())} - else {return (accum = $rb_plus(accum, c))}})();}, $$78.$$s = self, $$78.$$arity = 1, $$78)); - return values['$<<'](accum.$strip()); - } else { - return $send(str.$split(","), 'map', [], ($$79 = function(it){var self = $$79.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$strip();}, $$79.$$s = self, $$79.$$arity = 1, $$79)) - } - }, $Substitutors_split_simple_csv$77.$$arity = 1); - })($nesting[0], $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/version"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module; - - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - Opal.const_set($nesting[0], 'VERSION', "2.0.15") - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/abstract_node"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$include', '$attr_reader', '$attr_accessor', '$==', '$document', '$to_s', '$[]', '$merge', '$raise', '$converter', '$attributes', '$key?', '$[]=', '$-', '$delete', '$tap', '$new', '$each_key', '$end_with?', '$<<', '$slice', '$length', '$update', '$split', '$include?', '$===', '$join', '$empty?', '$apply_reftext_subs', '$attr?', '$attr', '$extname?', '$image_uri', '$<', '$safe', '$uriish?', '$encode_spaces_in_uri', '$normalize_web_path', '$generate_data_uri_from_uri', '$generate_data_uri', '$extname', '$normalize_system_path', '$readable?', '$strict_encode64', '$binread', '$warn', '$logger', '$require_library', '$!', '$open_uri', '$content_type', '$read', '$base_dir', '$root?', '$path_resolver', '$system_path', '$web_path', '$!=', '$prepare_source_string', '$fetch', '$read_asset']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'AbstractNode'); - - var $nesting = [self].concat($parent_nesting), $AbstractNode_initialize$1, $AbstractNode_block$ques$2, $AbstractNode_inline$ques$3, $AbstractNode_converter$4, $AbstractNode_parent$eq$5, $AbstractNode_attr$6, $AbstractNode_attr$ques$7, $AbstractNode_set_attr$8, $AbstractNode_remove_attr$9, $AbstractNode_option$ques$10, $AbstractNode_set_option$11, $AbstractNode_enabled_options$12, $AbstractNode_update_attributes$15, $AbstractNode_role$16, $AbstractNode_roles$17, $AbstractNode_role$ques$18, $AbstractNode_has_role$ques$19, $AbstractNode_role$eq$20, $AbstractNode_add_role$21, $AbstractNode_remove_role$22, $AbstractNode_reftext$23, $AbstractNode_reftext$ques$24, $AbstractNode_icon_uri$25, $AbstractNode_image_uri$26, $AbstractNode_media_uri$27, $AbstractNode_generate_data_uri$28, $AbstractNode_generate_data_uri_from_uri$29, $AbstractNode_normalize_asset_path$31, $AbstractNode_normalize_system_path$32, $AbstractNode_normalize_web_path$33, $AbstractNode_read_asset$34, $AbstractNode_read_contents$35, $AbstractNode_is_uri$ques$38; - - self.$$prototype.document = self.$$prototype.attributes = self.$$prototype.parent = nil; - - self.$include($$($nesting, 'Substitutors'), $$($nesting, 'Logging')); - self.$attr_reader("attributes"); - self.$attr_reader("context"); - self.$attr_reader("document"); - self.$attr_accessor("id"); - self.$attr_reader("node_name"); - self.$attr_reader("parent"); - - Opal.def(self, '$initialize', $AbstractNode_initialize$1 = function $$initialize(parent, context, opts) { - var self = this, attrs = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if (context['$==']("document")) { - self.document = self - } else if ($truthy(parent)) { - self.document = (self.parent = parent).$document()}; - self.node_name = (self.context = context).$to_s(); - self.attributes = (function() {if ($truthy((attrs = opts['$[]']("attributes")))) { - return attrs.$merge() - } else { - return $hash2([], {}) - }; return nil; })(); - return (self.passthroughs = []); - }, $AbstractNode_initialize$1.$$arity = -3); - - Opal.def(self, '$block?', $AbstractNode_block$ques$2 = function() { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError')) - }, $AbstractNode_block$ques$2.$$arity = 0); - - Opal.def(self, '$inline?', $AbstractNode_inline$ques$3 = function() { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError')) - }, $AbstractNode_inline$ques$3.$$arity = 0); - - Opal.def(self, '$converter', $AbstractNode_converter$4 = function $$converter() { - var self = this; - - return self.document.$converter() - }, $AbstractNode_converter$4.$$arity = 0); - - Opal.def(self, '$parent=', $AbstractNode_parent$eq$5 = function(parent) { - var $a, self = this; - - return $a = [parent, parent.$document()], (self.parent = $a[0]), (self.document = $a[1]), $a - }, $AbstractNode_parent$eq$5.$$arity = 1); - - Opal.def(self, '$attr', $AbstractNode_attr$6 = function $$attr(name, default_value, fallback_name) { - var $a, $b, $c, $d, self = this; - - - - if (default_value == null) { - default_value = nil; - }; - - if (fallback_name == null) { - fallback_name = nil; - }; - return ($truthy($a = self.attributes['$[]'](name.$to_s())) ? $a : ($truthy($b = ($truthy($c = ($truthy($d = fallback_name) ? self.parent : $d)) ? self.document.$attributes()['$[]']((function() {if (fallback_name['$=='](true)) { - return name - } else { - return fallback_name - }; return nil; })().$to_s()) : $c)) ? $b : default_value)); - }, $AbstractNode_attr$6.$$arity = -2); - - Opal.def(self, '$attr?', $AbstractNode_attr$ques$7 = function(name, expected_value, fallback_name) { - var $a, $b, self = this; - - - - if (expected_value == null) { - expected_value = nil; - }; - - if (fallback_name == null) { - fallback_name = nil; - }; - if ($truthy(expected_value)) { - return expected_value['$=='](($truthy($a = self.attributes['$[]'](name.$to_s())) ? $a : (function() {if ($truthy(($truthy($b = fallback_name) ? self.parent : $b))) { - return self.document.$attributes()['$[]']((function() {if (fallback_name['$=='](true)) { - return name - } else { - return fallback_name - }; return nil; })().$to_s()) - } else { - return nil - }; return nil; })())) - } else { - return ($truthy($a = self.attributes['$key?'](name.$to_s())) ? $a : (function() {if ($truthy(($truthy($b = fallback_name) ? self.parent : $b))) { - - return self.document.$attributes()['$key?']((function() {if (fallback_name['$=='](true)) { - return name - } else { - return fallback_name - }; return nil; })().$to_s()); - } else { - return false - }; return nil; })()) - }; - }, $AbstractNode_attr$ques$7.$$arity = -2); - - Opal.def(self, '$set_attr', $AbstractNode_set_attr$8 = function $$set_attr(name, value, overwrite) { - var $a, self = this, $writer = nil; - - - - if (value == null) { - value = ""; - }; - - if (overwrite == null) { - overwrite = true; - }; - if ($truthy((($a = overwrite['$=='](false)) ? self.attributes['$key?'](name) : overwrite['$=='](false)))) { - return false - } else { - - - $writer = [name, value]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return true; - }; - }, $AbstractNode_set_attr$8.$$arity = -2); - - Opal.def(self, '$remove_attr', $AbstractNode_remove_attr$9 = function $$remove_attr(name) { - var self = this; - - return self.attributes.$delete(name) - }, $AbstractNode_remove_attr$9.$$arity = 1); - - Opal.def(self, '$option?', $AbstractNode_option$ques$10 = function(name) { - var self = this; - - if ($truthy(self.attributes['$[]']("" + (name) + "-option"))) { - return true - } else { - return false - } - }, $AbstractNode_option$ques$10.$$arity = 1); - - Opal.def(self, '$set_option', $AbstractNode_set_option$11 = function $$set_option(name) { - var self = this, $writer = nil; - - - - $writer = ["" + (name) + "-option", ""]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return nil; - }, $AbstractNode_set_option$11.$$arity = 1); - - Opal.def(self, '$enabled_options', $AbstractNode_enabled_options$12 = function $$enabled_options() { - var $$13, self = this; - - return $send($$$('::', 'Set').$new(), 'tap', [], ($$13 = function(accum){var self = $$13.$$s || this, $$14; - if (self.attributes == null) self.attributes = nil; - - - - if (accum == null) { - accum = nil; - }; - return $send(self.attributes, 'each_key', [], ($$14 = function(k){var self = $$14.$$s || this; - - - - if (k == null) { - k = nil; - }; - if ($truthy(k.$to_s()['$end_with?']("-option"))) { - return accum['$<<'](k.$slice(0, $rb_minus(k.$length(), 7))) - } else { - return nil - };}, $$14.$$s = self, $$14.$$arity = 1, $$14));}, $$13.$$s = self, $$13.$$arity = 1, $$13)) - }, $AbstractNode_enabled_options$12.$$arity = 0); - - Opal.def(self, '$update_attributes', $AbstractNode_update_attributes$15 = function $$update_attributes(new_attributes) { - var self = this; - - return self.attributes.$update(new_attributes) - }, $AbstractNode_update_attributes$15.$$arity = 1); - - Opal.def(self, '$role', $AbstractNode_role$16 = function $$role() { - var self = this; - - return self.attributes['$[]']("role") - }, $AbstractNode_role$16.$$arity = 0); - - Opal.def(self, '$roles', $AbstractNode_roles$17 = function $$roles() { - var self = this, val = nil; - - if ($truthy((val = self.attributes['$[]']("role")))) { - return val.$split() - } else { - return [] - } - }, $AbstractNode_roles$17.$$arity = 0); - - Opal.def(self, '$role?', $AbstractNode_role$ques$18 = function(expected_value) { - var self = this; - - - - if (expected_value == null) { - expected_value = nil; - }; - if ($truthy(expected_value)) { - return expected_value['$=='](self.attributes['$[]']("role")) - } else { - - return self.attributes['$key?']("role"); - }; - }, $AbstractNode_role$ques$18.$$arity = -1); - - Opal.def(self, '$has_role?', $AbstractNode_has_role$ques$19 = function(name) { - var self = this, val = nil; - - if ($truthy((val = self.attributes['$[]']("role")))) { - - return ((("" + " ") + (val)) + " ")['$include?']("" + " " + (name) + " "); - } else { - return false - } - }, $AbstractNode_has_role$ques$19.$$arity = 1); - - Opal.def(self, '$role=', $AbstractNode_role$eq$20 = function(names) { - var self = this, $writer = nil; - - - $writer = ["role", (function() {if ($truthy($$$('::', 'Array')['$==='](names))) { - - return names.$join(" "); - } else { - return names - }; return nil; })()]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $AbstractNode_role$eq$20.$$arity = 1); - - Opal.def(self, '$add_role', $AbstractNode_add_role$21 = function $$add_role(name) { - var self = this, val = nil, $writer = nil; - - if ($truthy((val = self.attributes['$[]']("role")))) { - if ($truthy(((("" + " ") + (val)) + " ")['$include?']("" + " " + (name) + " "))) { - return false - } else { - - - $writer = ["role", "" + (val) + " " + (name)]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return true; - } - } else { - - - $writer = ["role", name]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return true; - } - }, $AbstractNode_add_role$21.$$arity = 1); - - Opal.def(self, '$remove_role', $AbstractNode_remove_role$22 = function $$remove_role(name) { - var $a, self = this, val = nil, $writer = nil; - - if ($truthy(($truthy($a = (val = self.attributes['$[]']("role"))) ? (val = val.$split()).$delete(name) : $a))) { - - if ($truthy(val['$empty?']())) { - self.attributes.$delete("role") - } else { - - $writer = ["role", val.$join(" ")]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - return true; - } else { - return false - } - }, $AbstractNode_remove_role$22.$$arity = 1); - - Opal.def(self, '$reftext', $AbstractNode_reftext$23 = function $$reftext() { - var self = this, val = nil; - - if ($truthy((val = self.attributes['$[]']("reftext")))) { - - return self.$apply_reftext_subs(val); - } else { - return nil - } - }, $AbstractNode_reftext$23.$$arity = 0); - - Opal.def(self, '$reftext?', $AbstractNode_reftext$ques$24 = function() { - var self = this; - - return self.attributes['$key?']("reftext") - }, $AbstractNode_reftext$ques$24.$$arity = 0); - - Opal.def(self, '$icon_uri', $AbstractNode_icon_uri$25 = function $$icon_uri(name) { - var self = this, icon = nil; - - - if ($truthy(self['$attr?']("icon"))) { - - icon = self.$attr("icon"); - if ($truthy($$($nesting, 'Helpers')['$extname?'](icon))) { - } else { - icon = "" + (icon) + "." + (self.document.$attr("icontype", "png")) - }; - } else { - icon = "" + (name) + "." + (self.document.$attr("icontype", "png")) - }; - return self.$image_uri(icon, "iconsdir"); - }, $AbstractNode_icon_uri$25.$$arity = 1); - - Opal.def(self, '$image_uri', $AbstractNode_image_uri$26 = function $$image_uri(target_image, asset_dir_key) { - var $a, $b, $c, $d, self = this, doc = nil, images_base = nil; - - - - if (asset_dir_key == null) { - asset_dir_key = "imagesdir"; - }; - if ($truthy(($truthy($a = $rb_lt((doc = self.document).$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE'))) ? doc['$attr?']("data-uri") : $a))) { - if ($truthy(($truthy($a = ($truthy($b = $$($nesting, 'Helpers')['$uriish?'](target_image)) ? (target_image = $$($nesting, 'Helpers').$encode_spaces_in_uri(target_image)) : $b)) ? $a : ($truthy($b = ($truthy($c = ($truthy($d = asset_dir_key) ? (images_base = doc.$attr(asset_dir_key)) : $d)) ? $$($nesting, 'Helpers')['$uriish?'](images_base) : $c)) ? (target_image = self.$normalize_web_path(target_image, images_base, false)) : $b)))) { - if ($truthy(doc['$attr?']("allow-uri-read"))) { - - return self.$generate_data_uri_from_uri(target_image, doc['$attr?']("cache-uri")); - } else { - return target_image - } - } else { - return self.$generate_data_uri(target_image, asset_dir_key) - } - } else { - return self.$normalize_web_path(target_image, (function() {if ($truthy(asset_dir_key)) { - - return doc.$attr(asset_dir_key); - } else { - return nil - }; return nil; })()) - }; - }, $AbstractNode_image_uri$26.$$arity = -2); - - Opal.def(self, '$media_uri', $AbstractNode_media_uri$27 = function $$media_uri(target, asset_dir_key) { - var self = this; - - - - if (asset_dir_key == null) { - asset_dir_key = "imagesdir"; - }; - return self.$normalize_web_path(target, (function() {if ($truthy(asset_dir_key)) { - return self.document.$attr(asset_dir_key) - } else { - return nil - }; return nil; })()); - }, $AbstractNode_media_uri$27.$$arity = -2); - - Opal.def(self, '$generate_data_uri', $AbstractNode_generate_data_uri$28 = function $$generate_data_uri(target_image, asset_dir_key) { - var self = this, ext = nil, mimetype = nil, image_path = nil; - - - - if (asset_dir_key == null) { - asset_dir_key = nil; - }; - if ($truthy((ext = $$($nesting, 'Helpers').$extname(target_image, nil)))) { - mimetype = (function() {if (ext['$=='](".svg")) { - return "image/svg+xml" - } else { - return "" + "image/" + (ext.$slice(1, ext.$length())) - }; return nil; })() - } else { - mimetype = "application/octet-stream" - }; - if ($truthy(asset_dir_key)) { - image_path = self.$normalize_system_path(target_image, self.document.$attr(asset_dir_key), nil, $hash2(["target_name"], {"target_name": "image"})) - } else { - image_path = self.$normalize_system_path(target_image) - }; - if ($truthy($$$('::', 'File')['$readable?'](image_path))) { - return "" + "data:" + (mimetype) + ";base64," + ($$$('::', 'Base64').$strict_encode64($$$('::', 'File').$binread(image_path))) - } else { - - self.$logger().$warn("" + "image to embed not found or not readable: " + (image_path)); - return "" + "data:" + (mimetype) + ";base64,"; - }; - }, $AbstractNode_generate_data_uri$28.$$arity = -2); - - Opal.def(self, '$generate_data_uri_from_uri', $AbstractNode_generate_data_uri_from_uri$29 = function $$generate_data_uri_from_uri(image_uri, cache_uri) { - var $a, $b, $$30, self = this, mimetype = nil, bindata = nil; - - - - if (cache_uri == null) { - cache_uri = false; - }; - if ($truthy(cache_uri)) { - $$($nesting, 'Helpers').$require_library("open-uri/cached", "open-uri-cached") - } else if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL')['$!']())) { - $$$('::', 'OpenURI')}; - - try { - - $b = $send($$$('::', 'OpenURI'), 'open_uri', [image_uri, $$($nesting, 'URI_READ_MODE')], ($$30 = function(f){var self = $$30.$$s || this; - - - - if (f == null) { - f = nil; - }; - return [f.$content_type(), f.$read()];}, $$30.$$s = self, $$30.$$arity = 1, $$30)), $a = Opal.to_ary($b), (mimetype = ($a[0] == null ? nil : $a[0])), (bindata = ($a[1] == null ? nil : $a[1])), $b; - return "" + "data:" + (mimetype) + ";base64," + ($$$('::', 'Base64').$strict_encode64(bindata)); - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - - self.$logger().$warn("" + "could not retrieve image data from URI: " + (image_uri)); - return image_uri; - } finally { Opal.pop_exception() } - } else { throw $err; } - };; - }, $AbstractNode_generate_data_uri_from_uri$29.$$arity = -2); - - Opal.def(self, '$normalize_asset_path', $AbstractNode_normalize_asset_path$31 = function $$normalize_asset_path(asset_ref, asset_name, autocorrect) { - var self = this; - - - - if (asset_name == null) { - asset_name = "path"; - }; - - if (autocorrect == null) { - autocorrect = true; - }; - return self.$normalize_system_path(asset_ref, self.document.$base_dir(), nil, $hash2(["target_name", "recover"], {"target_name": asset_name, "recover": autocorrect})); - }, $AbstractNode_normalize_asset_path$31.$$arity = -2); - - Opal.def(self, '$normalize_system_path', $AbstractNode_normalize_system_path$32 = function $$normalize_system_path(target, start, jail, opts) { - var self = this, doc = nil; - - - - if (start == null) { - start = nil; - }; - - if (jail == null) { - jail = nil; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy($rb_lt((doc = self.document).$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) { - if ($truthy(start)) { - if ($truthy(doc.$path_resolver()['$root?'](start))) { - } else { - start = $$$('::', 'File').$join(doc.$base_dir(), start) - } - } else { - start = doc.$base_dir() - } - } else { - - if ($truthy(start)) { - } else { - start = doc.$base_dir() - }; - if ($truthy(jail)) { - } else { - jail = doc.$base_dir() - }; - }; - return doc.$path_resolver().$system_path(target, start, jail, opts); - }, $AbstractNode_normalize_system_path$32.$$arity = -2); - - Opal.def(self, '$normalize_web_path', $AbstractNode_normalize_web_path$33 = function $$normalize_web_path(target, start, preserve_uri_target) { - var $a, self = this; - - - - if (start == null) { - start = nil; - }; - - if (preserve_uri_target == null) { - preserve_uri_target = true; - }; - if ($truthy(($truthy($a = preserve_uri_target) ? $$($nesting, 'Helpers')['$uriish?'](target) : $a))) { - return $$($nesting, 'Helpers').$encode_spaces_in_uri(target) - } else { - return self.document.$path_resolver().$web_path(target, start) - }; - }, $AbstractNode_normalize_web_path$33.$$arity = -2); - - Opal.def(self, '$read_asset', $AbstractNode_read_asset$34 = function $$read_asset(path, opts) { - var $a, self = this; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy($$$('::', 'Hash')['$==='](opts))) { - } else { - opts = $hash2(["warn_on_failure"], {"warn_on_failure": opts['$!='](false)}) - }; - if ($truthy($$$('::', 'File')['$readable?'](path))) { - if ($truthy(opts['$[]']("normalize"))) { - - return $$($nesting, 'Helpers').$prepare_source_string($$$('::', 'File').$read(path, $hash2(["mode"], {"mode": $$($nesting, 'FILE_READ_MODE')}))).$join($$($nesting, 'LF')); - } else { - - return $$$('::', 'File').$read(path, $hash2(["mode"], {"mode": $$($nesting, 'FILE_READ_MODE')})); - } - } else if ($truthy(opts['$[]']("warn_on_failure"))) { - - self.$logger().$warn("" + (($truthy($a = self.$attr("docfile")) ? $a : "")) + ": " + (($truthy($a = opts['$[]']("label")) ? $a : "file")) + " does not exist or cannot be read: " + (path)); - return nil; - } else { - return nil - }; - }, $AbstractNode_read_asset$34.$$arity = -2); - - Opal.def(self, '$read_contents', $AbstractNode_read_contents$35 = function $$read_contents(target, opts) { - var $a, $b, $c, $$36, $$37, self = this, doc = nil, start = nil, contents = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - doc = self.document; - if ($truthy(($truthy($a = $$($nesting, 'Helpers')['$uriish?'](target)) ? $a : ($truthy($b = ($truthy($c = (start = opts['$[]']("start"))) ? $$($nesting, 'Helpers')['$uriish?'](start) : $c)) ? (target = doc.$path_resolver().$web_path(target, start)) : $b)))) { - if ($truthy(doc['$attr?']("allow-uri-read"))) { - - if ($truthy(doc['$attr?']("cache-uri"))) { - $$($nesting, 'Helpers').$require_library("open-uri/cached", "open-uri-cached")}; - - try { - if ($truthy(opts['$[]']("normalize"))) { - contents = $$($nesting, 'Helpers').$prepare_source_string($send($$$('::', 'OpenURI'), 'open_uri', [target, $$($nesting, 'URI_READ_MODE')], ($$36 = function(f){var self = $$36.$$s || this; - - - - if (f == null) { - f = nil; - }; - return f.$read();}, $$36.$$s = self, $$36.$$arity = 1, $$36))).$join($$($nesting, 'LF')) - } else { - contents = $send($$$('::', 'OpenURI'), 'open_uri', [target, $$($nesting, 'URI_READ_MODE')], ($$37 = function(f){var self = $$37.$$s || this; - - - - if (f == null) { - f = nil; - }; - return f.$read();}, $$37.$$s = self, $$37.$$arity = 1, $$37)) - } - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - if ($truthy(opts.$fetch("warn_on_failure", true))) { - self.$logger().$warn("" + "could not retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target))} - } finally { Opal.pop_exception() } - } else { throw $err; } - };; - } else if ($truthy(opts.$fetch("warn_on_failure", true))) { - self.$logger().$warn("" + "cannot retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target) + " (allow-uri-read attribute not enabled)")} - } else { - - target = self.$normalize_system_path(target, opts['$[]']("start"), nil, $hash2(["target_name"], {"target_name": ($truthy($a = opts['$[]']("label")) ? $a : "asset")})); - contents = self.$read_asset(target, $hash2(["normalize", "warn_on_failure", "label"], {"normalize": opts['$[]']("normalize"), "warn_on_failure": opts.$fetch("warn_on_failure", true), "label": opts['$[]']("label")})); - }; - if ($truthy(($truthy($a = ($truthy($b = contents) ? opts['$[]']("warn_if_empty") : $b)) ? contents['$empty?']() : $a))) { - self.$logger().$warn("" + "contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " is empty: " + (target))}; - return contents; - }, $AbstractNode_read_contents$35.$$arity = -2); - return (Opal.def(self, '$is_uri?', $AbstractNode_is_uri$ques$38 = function(str) { - var self = this; - - return $$($nesting, 'Helpers')['$uriish?'](str) - }, $AbstractNode_is_uri$ques$38.$$arity = 1), nil) && 'is_uri?'; - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/abstract_block"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy; - - Opal.add_stubs(['$attr_reader', '$attr_writer', '$attr_accessor', '$==', '$===', '$level', '$file', '$lineno', '$playback_attributes', '$convert', '$converter', '$join', '$map', '$to_s', '$parent', '$parent=', '$-', '$<<', '$empty?', '$>', '$Integer', '$find_by_internal', '$to_proc', '$context', '$[]', '$items', '$+', '$find_index', '$include?', '$next_adjacent_block', '$blocks', '$select', '$sub_specialchars', '$match?', '$sub_replacements', '$title', '$apply_title_subs', '$delete', '$reftext', '$!', '$nil_or_empty?', '$sub_placeholder', '$sub_quotes', '$compat_mode', '$attributes', '$chomp', '$increment_and_store_counter', '$index=', '$numbered', '$sectname', '$counter', '$numeral=', '$numeral', '$caption=', '$int_to_roman', '$each', '$assign_numeral', '$reindex_sections', '$protected', '$has_role?', '$raise', '$header?', '$!=', '$flatten', '$head', '$rows', '$merge', '$body', '$foot', '$style', '$inner_document']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'AbstractBlock'); - - var $nesting = [self].concat($parent_nesting), $AbstractBlock_initialize$1, $AbstractBlock_block$ques$2, $AbstractBlock_inline$ques$3, $AbstractBlock_file$4, $AbstractBlock_lineno$5, $AbstractBlock_convert$6, $AbstractBlock_content$7, $AbstractBlock_context$eq$9, $AbstractBlock_$lt$lt$10, $AbstractBlock_blocks$ques$11, $AbstractBlock_sections$ques$12, $AbstractBlock_number$13, $AbstractBlock_number$eq$14, $AbstractBlock_find_by$15, $AbstractBlock_next_adjacent_block$16, $AbstractBlock_sections$18, $AbstractBlock_alt$20, $AbstractBlock_caption$21, $AbstractBlock_captioned_title$22, $AbstractBlock_list_marker_keyword$23, $AbstractBlock_title$24, $AbstractBlock_title$ques$25, $AbstractBlock_title$eq$26, $AbstractBlock_sub$ques$27, $AbstractBlock_remove_sub$28, $AbstractBlock_xreftext$29, $AbstractBlock_assign_caption$30, $AbstractBlock_assign_numeral$31, $AbstractBlock_reindex_sections$32, $AbstractBlock_find_by_internal$34; - - self.$$prototype.source_location = self.$$prototype.document = self.$$prototype.attributes = self.$$prototype.blocks = self.$$prototype.next_section_index = self.$$prototype.numeral = self.$$prototype.context = self.$$prototype.parent = self.$$prototype.caption = self.$$prototype.style = self.$$prototype.converted_title = self.$$prototype.title = self.$$prototype.subs = self.$$prototype.next_section_ordinal = self.$$prototype.id = self.$$prototype.header = nil; - - self.$attr_reader("blocks"); - self.$attr_writer("caption"); - self.$attr_accessor("content_model"); - self.$attr_accessor("level"); - self.$attr_accessor("numeral"); - self.$attr_accessor("source_location"); - self.$attr_accessor("style"); - self.$attr_reader("subs"); - - Opal.def(self, '$initialize', $AbstractBlock_initialize$1 = function $$initialize(parent, context, opts) { - var $a, $iter = $AbstractBlock_initialize$1.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $AbstractBlock_initialize$1.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if (opts == null) { - opts = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $AbstractBlock_initialize$1, false), $zuper, $iter); - self.content_model = "compound"; - self.blocks = []; - self.subs = []; - self.id = (self.title = (self.caption = (self.numeral = (self.style = (self.default_subs = (self.source_location = nil)))))); - if ($truthy(($truthy($a = context['$==']("document")) ? $a : context['$==']("section")))) { - - self.level = (self.next_section_index = 0); - return (self.next_section_ordinal = 1); - } else if ($truthy($$($nesting, 'AbstractBlock')['$==='](parent))) { - return (self.level = parent.$level()) - } else { - return (self.level = nil) - }; - }, $AbstractBlock_initialize$1.$$arity = -3); - - Opal.def(self, '$block?', $AbstractBlock_block$ques$2 = function() { - var self = this; - - return true - }, $AbstractBlock_block$ques$2.$$arity = 0); - - Opal.def(self, '$inline?', $AbstractBlock_inline$ques$3 = function() { - var self = this; - - return false - }, $AbstractBlock_inline$ques$3.$$arity = 0); - - Opal.def(self, '$file', $AbstractBlock_file$4 = function $$file() { - var $a, self = this; - - return ($truthy($a = self.source_location) ? self.source_location.$file() : $a) - }, $AbstractBlock_file$4.$$arity = 0); - - Opal.def(self, '$lineno', $AbstractBlock_lineno$5 = function $$lineno() { - var $a, self = this; - - return ($truthy($a = self.source_location) ? self.source_location.$lineno() : $a) - }, $AbstractBlock_lineno$5.$$arity = 0); - - Opal.def(self, '$convert', $AbstractBlock_convert$6 = function $$convert() { - var self = this; - - - self.document.$playback_attributes(self.attributes); - return self.$converter().$convert(self); - }, $AbstractBlock_convert$6.$$arity = 0); - Opal.alias(self, "render", "convert"); - - Opal.def(self, '$content', $AbstractBlock_content$7 = function $$content() { - var $$8, self = this; - - return $send(self.blocks, 'map', [], ($$8 = function(b){var self = $$8.$$s || this; - - - - if (b == null) { - b = nil; - }; - return b.$convert();}, $$8.$$s = self, $$8.$$arity = 1, $$8)).$join($$($nesting, 'LF')) - }, $AbstractBlock_content$7.$$arity = 0); - - Opal.def(self, '$context=', $AbstractBlock_context$eq$9 = function(context) { - var self = this; - - return (self.node_name = (self.context = context).$to_s()) - }, $AbstractBlock_context$eq$9.$$arity = 1); - - Opal.def(self, '$<<', $AbstractBlock_$lt$lt$10 = function(block) { - var self = this, $writer = nil; - - - if (block.$parent()['$=='](self)) { - } else { - - $writer = [self]; - $send(block, 'parent=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - self.blocks['$<<'](block); - return self; - }, $AbstractBlock_$lt$lt$10.$$arity = 1); - Opal.alias(self, "append", "<<"); - - Opal.def(self, '$blocks?', $AbstractBlock_blocks$ques$11 = function() { - var self = this; - - if ($truthy(self.blocks['$empty?']())) { - return false - } else { - return true - } - }, $AbstractBlock_blocks$ques$11.$$arity = 0); - - Opal.def(self, '$sections?', $AbstractBlock_sections$ques$12 = function() { - var self = this; - - return $rb_gt(self.next_section_index, 0) - }, $AbstractBlock_sections$ques$12.$$arity = 0); - - Opal.def(self, '$number', $AbstractBlock_number$13 = function $$number() { - var self = this; - - try { - - return self.$Integer(self.numeral); - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return self.numeral - } finally { Opal.pop_exception() } - } else { throw $err; } - } - }, $AbstractBlock_number$13.$$arity = 0); - - Opal.def(self, '$number=', $AbstractBlock_number$eq$14 = function(val) { - var self = this; - - return (self.numeral = val.$to_s()) - }, $AbstractBlock_number$eq$14.$$arity = 1); - - Opal.def(self, '$find_by', $AbstractBlock_find_by$15 = function $$find_by(selector) { - var $iter = $AbstractBlock_find_by$15.$$p, block = $iter || nil, self = this, result = nil; - - if ($iter) $AbstractBlock_find_by$15.$$p = null; - - - if ($iter) $AbstractBlock_find_by$15.$$p = null;; - - if (selector == null) { - selector = $hash2([], {}); - }; - try { - return $send(self, 'find_by_internal', [selector, (result = [])], block.$to_proc()) - } catch ($err) { - if (Opal.rescue($err, [$$$('::', 'StopIteration')])) { - try { - return result - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - }, $AbstractBlock_find_by$15.$$arity = -1); - Opal.alias(self, "query", "find_by"); - - Opal.def(self, '$next_adjacent_block', $AbstractBlock_next_adjacent_block$16 = function $$next_adjacent_block() { - var $a, $$17, self = this, p = nil, sib = nil; - - if (self.context['$==']("document")) { - return nil - } else if ($truthy((($a = (p = self.parent).$context()['$==']("dlist")) ? self.context['$==']("list_item") : (p = self.parent).$context()['$==']("dlist")))) { - if ($truthy((sib = p.$items()['$[]']($rb_plus($send(p.$items(), 'find_index', [], ($$17 = function(terms, desc){var self = $$17.$$s || this, $b; - - - - if (terms == null) { - terms = nil; - }; - - if (desc == null) { - desc = nil; - }; - return ($truthy($b = terms['$include?'](self)) ? $b : desc['$=='](self));}, $$17.$$s = self, $$17.$$arity = 2, $$17)), 1))))) { - return sib - } else { - return p.$next_adjacent_block() - } - } else if ($truthy((sib = p.$blocks()['$[]']($rb_plus(p.$blocks().$find_index(self), 1))))) { - return sib - } else { - return p.$next_adjacent_block() - } - }, $AbstractBlock_next_adjacent_block$16.$$arity = 0); - - Opal.def(self, '$sections', $AbstractBlock_sections$18 = function $$sections() { - var $$19, self = this; - - return $send(self.blocks, 'select', [], ($$19 = function(block){var self = $$19.$$s || this; - - - - if (block == null) { - block = nil; - }; - return block.$context()['$==']("section");}, $$19.$$s = self, $$19.$$arity = 1, $$19)) - }, $AbstractBlock_sections$18.$$arity = 0); - - Opal.def(self, '$alt', $AbstractBlock_alt$20 = function $$alt() { - var self = this, text = nil; - - if ($truthy((text = self.attributes['$[]']("alt")))) { - if (text['$=='](self.attributes['$[]']("default-alt"))) { - return self.$sub_specialchars(text) - } else { - - text = self.$sub_specialchars(text); - if ($truthy($$($nesting, 'ReplaceableTextRx')['$match?'](text))) { - - return self.$sub_replacements(text); - } else { - return text - }; - } - } else { - return "" - } - }, $AbstractBlock_alt$20.$$arity = 0); - - Opal.def(self, '$caption', $AbstractBlock_caption$21 = function $$caption() { - var self = this; - - if (self.context['$==']("admonition")) { - return self.attributes['$[]']("textlabel") - } else { - return self.caption - } - }, $AbstractBlock_caption$21.$$arity = 0); - - Opal.def(self, '$captioned_title', $AbstractBlock_captioned_title$22 = function $$captioned_title() { - var self = this; - - return "" + (self.caption) + (self.$title()) - }, $AbstractBlock_captioned_title$22.$$arity = 0); - - Opal.def(self, '$list_marker_keyword', $AbstractBlock_list_marker_keyword$23 = function $$list_marker_keyword(list_type) { - var $a, self = this; - - - - if (list_type == null) { - list_type = nil; - }; - return $$($nesting, 'ORDERED_LIST_KEYWORDS')['$[]'](($truthy($a = list_type) ? $a : self.style)); - }, $AbstractBlock_list_marker_keyword$23.$$arity = -1); - - Opal.def(self, '$title', $AbstractBlock_title$24 = function $$title() { - var $a, $b, self = this; - - return (self.converted_title = ($truthy($a = self.converted_title) ? $a : ($truthy($b = self.title) ? self.$apply_title_subs(self.title) : $b))) - }, $AbstractBlock_title$24.$$arity = 0); - - Opal.def(self, '$title?', $AbstractBlock_title$ques$25 = function() { - var self = this; - - if ($truthy(self.title)) { - return true - } else { - return false - } - }, $AbstractBlock_title$ques$25.$$arity = 0); - - Opal.def(self, '$title=', $AbstractBlock_title$eq$26 = function(val) { - var self = this; - - - self.converted_title = nil; - return (self.title = val); - }, $AbstractBlock_title$eq$26.$$arity = 1); - - Opal.def(self, '$sub?', $AbstractBlock_sub$ques$27 = function(name) { - var self = this; - - return self.subs['$include?'](name) - }, $AbstractBlock_sub$ques$27.$$arity = 1); - - Opal.def(self, '$remove_sub', $AbstractBlock_remove_sub$28 = function $$remove_sub(sub) { - var self = this; - - - self.subs.$delete(sub); - return nil; - }, $AbstractBlock_remove_sub$28.$$arity = 1); - - Opal.def(self, '$xreftext', $AbstractBlock_xreftext$29 = function $$xreftext(xrefstyle) { - var $a, $b, self = this, val = nil, $case = nil, quoted_title = nil, caption_attr_name = nil, prefix = nil; - - - - if (xrefstyle == null) { - xrefstyle = nil; - }; - if ($truthy(($truthy($a = (val = self.$reftext())) ? val['$empty?']()['$!']() : $a))) { - return val - } else if ($truthy(($truthy($a = ($truthy($b = xrefstyle) ? self.title : $b)) ? self.caption['$nil_or_empty?']()['$!']() : $a))) { - return (function() {$case = xrefstyle; - if ("full"['$===']($case)) { - quoted_title = self.$sub_placeholder(self.$sub_quotes((function() {if ($truthy(self.document.$compat_mode())) { - return "``%s''" - } else { - return "\"`%s`\"" - }; return nil; })()), self.$title()); - if ($truthy(($truthy($a = ($truthy($b = self.numeral) ? (caption_attr_name = $$($nesting, 'CAPTION_ATTRIBUTE_NAMES')['$[]'](self.context)) : $b)) ? (prefix = self.document.$attributes()['$[]'](caption_attr_name)) : $a))) { - return "" + (prefix) + " " + (self.numeral) + ", " + (quoted_title) - } else { - return "" + (self.caption.$chomp(". ")) + ", " + (quoted_title) - };} - else if ("short"['$===']($case)) {if ($truthy(($truthy($a = ($truthy($b = self.numeral) ? (caption_attr_name = $$($nesting, 'CAPTION_ATTRIBUTE_NAMES')['$[]'](self.context)) : $b)) ? (prefix = self.document.$attributes()['$[]'](caption_attr_name)) : $a))) { - return "" + (prefix) + " " + (self.numeral) - } else { - return self.caption.$chomp(". ") - }} - else {return self.$title()}})() - } else { - return self.$title() - }; - }, $AbstractBlock_xreftext$29.$$arity = -1); - - Opal.def(self, '$assign_caption', $AbstractBlock_assign_caption$30 = function $$assign_caption(value, caption_context) { - var $a, $b, self = this, attr_name = nil, prefix = nil; - - - - if (caption_context == null) { - caption_context = self.context; - }; - if ($truthy(($truthy($a = ($truthy($b = self.caption) ? $b : self.title['$!']())) ? $a : (self.caption = ($truthy($b = value) ? $b : self.document.$attributes()['$[]']("caption")))))) { - return nil - } else if ($truthy(($truthy($a = (attr_name = $$($nesting, 'CAPTION_ATTRIBUTE_NAMES')['$[]'](caption_context))) ? (prefix = self.document.$attributes()['$[]'](attr_name)) : $a))) { - - self.caption = "" + (prefix) + " " + ((self.numeral = self.document.$increment_and_store_counter("" + (caption_context) + "-number", self))) + ". "; - return nil; - } else { - return nil - }; - }, $AbstractBlock_assign_caption$30.$$arity = -2); - - Opal.def(self, '$assign_numeral', $AbstractBlock_assign_numeral$31 = function $$assign_numeral(section) { - var $a, self = this, $writer = nil, like = nil, sectname = nil, caption = nil; - - - self.next_section_index = $rb_plus((($writer = [self.next_section_index]), $send(section, 'index=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]), 1); - if ($truthy((like = section.$numbered()))) { - if ((sectname = section.$sectname())['$==']("appendix")) { - - - $writer = [self.document.$counter("appendix-number", "A")]; - $send(section, 'numeral=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [(function() {if ($truthy((caption = self.document.$attributes()['$[]']("appendix-caption")))) { - return "" + (caption) + " " + (section.$numeral()) + ": " - } else { - return "" + (section.$numeral()) + ". " - }; return nil; })()]; - $send(section, 'caption=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else if ($truthy(($truthy($a = sectname['$==']("chapter")) ? $a : like['$==']("chapter")))) { - - $writer = [self.document.$counter("chapter-number", 1).$to_s()]; - $send(section, 'numeral=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - - $writer = [(function() {if (sectname['$==']("part")) { - - return $$($nesting, 'Helpers').$int_to_roman(self.next_section_ordinal); - } else { - return self.next_section_ordinal.$to_s() - }; return nil; })()]; - $send(section, 'numeral=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - self.next_section_ordinal = $rb_plus(self.next_section_ordinal, 1); - }}; - return nil; - }, $AbstractBlock_assign_numeral$31.$$arity = 1); - - Opal.def(self, '$reindex_sections', $AbstractBlock_reindex_sections$32 = function $$reindex_sections() { - var $$33, self = this; - - - self.next_section_index = 0; - self.next_section_ordinal = 1; - return $send(self.blocks, 'each', [], ($$33 = function(block){var self = $$33.$$s || this; - - - - if (block == null) { - block = nil; - }; - if (block.$context()['$==']("section")) { - - self.$assign_numeral(block); - return block.$reindex_sections(); - } else { - return nil - };}, $$33.$$s = self, $$33.$$arity = 1, $$33)); - }, $AbstractBlock_reindex_sections$32.$$arity = 0); - self.$protected(); - return (Opal.def(self, '$find_by_internal', $AbstractBlock_find_by_internal$34 = function $$find_by_internal(selector, result) { - var $iter = $AbstractBlock_find_by_internal$34.$$p, block = $iter || nil, $a, $b, $c, $d, $$35, $$36, $$37, $$39, $$41, $$43, self = this, any_context = nil, context_selector = nil, style_selector = nil, role_selector = nil, id_selector = nil, verdict = nil, $case = nil; - - if ($iter) $AbstractBlock_find_by_internal$34.$$p = null; - - - if ($iter) $AbstractBlock_find_by_internal$34.$$p = null;; - - if (selector == null) { - selector = $hash2([], {}); - }; - - if (result == null) { - result = []; - }; - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = ($truthy($d = (any_context = (function() {if ($truthy((context_selector = selector['$[]']("context")))) { - return nil - } else { - return true - }; return nil; })())) ? $d : context_selector['$=='](self.context))) ? ($truthy($d = (style_selector = selector['$[]']("style"))['$!']()) ? $d : style_selector['$=='](self.style)) : $c)) ? ($truthy($c = (role_selector = selector['$[]']("role"))['$!']()) ? $c : self['$has_role?'](role_selector)) : $b)) ? ($truthy($b = (id_selector = selector['$[]']("id"))['$!']()) ? $b : id_selector['$=='](self.id)) : $a))) { - if ((block !== nil)) { - if ($truthy((verdict = Opal.yield1(block, self)))) { - $case = verdict; - if ("prune"['$===']($case)) { - result['$<<'](self); - if ($truthy(id_selector)) { - self.$raise($$$('::', 'StopIteration'))}; - return result;} - else if ("reject"['$===']($case)) { - if ($truthy(id_selector)) { - self.$raise($$$('::', 'StopIteration'))}; - return result;} - else if ("stop"['$===']($case)) {self.$raise($$$('::', 'StopIteration'))} - else { - result['$<<'](self); - if ($truthy(id_selector)) { - self.$raise($$$('::', 'StopIteration'))};} - } else if ($truthy(id_selector)) { - self.$raise($$$('::', 'StopIteration'))} - } else { - - result['$<<'](self); - if ($truthy(id_selector)) { - self.$raise($$$('::', 'StopIteration'))}; - }}; - $case = self.context; - if ("document"['$===']($case)) {if (context_selector['$==']("document")) { - } else { - - if ($truthy(($truthy($a = self['$header?']()) ? ($truthy($b = any_context) ? $b : context_selector['$==']("section")) : $a))) { - $send(self.header, 'find_by_internal', [selector, result], block.$to_proc())}; - $send(self.blocks, 'each', [], ($$35 = function(b){var self = $$35.$$s || this, $e; - - - - if (b == null) { - b = nil; - }; - if ($truthy((($e = context_selector['$==']("section")) ? b.$context()['$!=']("section") : context_selector['$==']("section")))) { - return nil;}; - return $send(b, 'find_by_internal', [selector, result], block.$to_proc());}, $$35.$$s = self, $$35.$$arity = 1, $$35)); - }} - else if ("dlist"['$===']($case)) {if ($truthy(($truthy($a = any_context) ? $a : context_selector['$!=']("section")))) { - $send(self.blocks.$flatten(), 'each', [], ($$36 = function(b){var self = $$36.$$s || this; - - - - if (b == null) { - b = nil; - }; - if ($truthy(b)) { - return $send(b, 'find_by_internal', [selector, result], block.$to_proc()) - } else { - return nil - };}, $$36.$$s = self, $$36.$$arity = 1, $$36))}} - else if ("table"['$===']($case)) {if ($truthy(selector['$[]']("traverse_documents"))) { - - $send(self.$rows().$head(), 'each', [], ($$37 = function(r){var self = $$37.$$s || this, $$38; - - - - if (r == null) { - r = nil; - }; - return $send(r, 'each', [], ($$38 = function(c){var self = $$38.$$s || this; - - - - if (c == null) { - c = nil; - }; - return $send(c, 'find_by_internal', [selector, result], block.$to_proc());}, $$38.$$s = self, $$38.$$arity = 1, $$38));}, $$37.$$s = self, $$37.$$arity = 1, $$37)); - if (context_selector['$==']("inner_document")) { - selector = selector.$merge($hash2(["context"], {"context": "document"}))}; - $send($rb_plus(self.$rows().$body(), self.$rows().$foot()), 'each', [], ($$39 = function(r){var self = $$39.$$s || this, $$40; - - - - if (r == null) { - r = nil; - }; - return $send(r, 'each', [], ($$40 = function(c){var self = $$40.$$s || this; - - - - if (c == null) { - c = nil; - }; - $send(c, 'find_by_internal', [selector, result], block.$to_proc()); - if (c.$style()['$==']("asciidoc")) { - return $send(c.$inner_document(), 'find_by_internal', [selector, result], block.$to_proc()) - } else { - return nil - };}, $$40.$$s = self, $$40.$$arity = 1, $$40));}, $$39.$$s = self, $$39.$$arity = 1, $$39)); - } else { - $send($rb_plus($rb_plus(self.$rows().$head(), self.$rows().$body()), self.$rows().$foot()), 'each', [], ($$41 = function(r){var self = $$41.$$s || this, $$42; - - - - if (r == null) { - r = nil; - }; - return $send(r, 'each', [], ($$42 = function(c){var self = $$42.$$s || this; - - - - if (c == null) { - c = nil; - }; - return $send(c, 'find_by_internal', [selector, result], block.$to_proc());}, $$42.$$s = self, $$42.$$arity = 1, $$42));}, $$41.$$s = self, $$41.$$arity = 1, $$41)) - }} - else {$send(self.blocks, 'each', [], ($$43 = function(b){var self = $$43.$$s || this, $e; - - - - if (b == null) { - b = nil; - }; - if ($truthy((($e = context_selector['$==']("section")) ? b.$context()['$!=']("section") : context_selector['$==']("section")))) { - return nil;}; - return $send(b, 'find_by_internal', [selector, result], block.$to_proc());}, $$43.$$s = self, $$43.$$arity = 1, $$43))}; - return result; - }, $AbstractBlock_find_by_internal$34.$$arity = -1), nil) && 'find_by_internal'; - })($nesting[0], $$($nesting, 'AbstractNode'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/attribute_list"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash = Opal.hash, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$new', '$[]', '$update', '$parse', '$parse_attribute', '$eos?', '$skip_delimiter', '$+', '$rekey', '$each_with_index', '$[]=', '$-', '$private', '$skip_blank', '$peek', '$===', '$parse_attribute_value', '$get_byte', '$start_with?', '$scan_name', '$end_with?', '$rstrip', '$string', '$==', '$unscan', '$scan_to_delimiter', '$*', '$include?', '$delete', '$each', '$split', '$empty?', '$apply_subs', '$scan_to_quote', '$gsub', '$skip', '$scan']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'AttributeList'); - - var $nesting = [self].concat($parent_nesting), $AttributeList_initialize$1, $AttributeList_parse_into$2, $AttributeList_parse$3, $AttributeList_rekey$4, $AttributeList_rekey$5, $AttributeList_parse_attribute$7, $AttributeList_parse_attribute_value$9, $AttributeList_skip_blank$10, $AttributeList_skip_delimiter$11, $AttributeList_scan_name$12, $AttributeList_scan_to_delimiter$13, $AttributeList_scan_to_quote$14; - - self.$$prototype.attributes = self.$$prototype.scanner = self.$$prototype.delimiter = self.$$prototype.block = self.$$prototype.delimiter_skip_pattern = self.$$prototype.delimiter_boundary_pattern = nil; - - Opal.const_set($nesting[0], 'APOS', "'"); - Opal.const_set($nesting[0], 'BACKSLASH', "\\"); - Opal.const_set($nesting[0], 'QUOT', "\""); - Opal.const_set($nesting[0], 'BoundaryRx', $hash($$($nesting, 'QUOT'), /.*?[^\\](?=")/, $$($nesting, 'APOS'), /.*?[^\\](?=')/, ",", /.*?(?=[ \t]*(,|$))/)); - Opal.const_set($nesting[0], 'EscapedQuotes', $hash($$($nesting, 'QUOT'), "\\\"", $$($nesting, 'APOS'), "\\'")); - Opal.const_set($nesting[0], 'NameRx', new RegExp("" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "\\-.]*")); - Opal.const_set($nesting[0], 'BlankRx', /[ \t]+/); - Opal.const_set($nesting[0], 'SkipRx', $hash2([","], {",": /[ \t]*(,|$)/})); - - Opal.def(self, '$initialize', $AttributeList_initialize$1 = function $$initialize(source, block, delimiter) { - var self = this; - - - - if (block == null) { - block = nil; - }; - - if (delimiter == null) { - delimiter = ","; - }; - self.scanner = $$$('::', 'StringScanner').$new(source); - self.block = block; - self.delimiter = delimiter; - self.delimiter_skip_pattern = $$($nesting, 'SkipRx')['$[]'](delimiter); - self.delimiter_boundary_pattern = $$($nesting, 'BoundaryRx')['$[]'](delimiter); - return (self.attributes = nil); - }, $AttributeList_initialize$1.$$arity = -2); - - Opal.def(self, '$parse_into', $AttributeList_parse_into$2 = function $$parse_into(attributes, positional_attrs) { - var self = this; - - - - if (positional_attrs == null) { - positional_attrs = []; - }; - return attributes.$update(self.$parse(positional_attrs)); - }, $AttributeList_parse_into$2.$$arity = -2); - - Opal.def(self, '$parse', $AttributeList_parse$3 = function $$parse(positional_attrs) { - var $a, self = this, index = nil; - - - - if (positional_attrs == null) { - positional_attrs = []; - }; - if ($truthy(self.attributes)) { - return self.attributes}; - self.attributes = $hash2([], {}); - index = 0; - while ($truthy(self.$parse_attribute(index, positional_attrs))) { - - if ($truthy(self.scanner['$eos?']())) { - break;}; - self.$skip_delimiter(); - index = $rb_plus(index, 1); - }; - return self.attributes; - }, $AttributeList_parse$3.$$arity = -1); - - Opal.def(self, '$rekey', $AttributeList_rekey$4 = function $$rekey(positional_attrs) { - var self = this; - - return $$($nesting, 'AttributeList').$rekey(self.attributes, positional_attrs) - }, $AttributeList_rekey$4.$$arity = 1); - Opal.defs(self, '$rekey', $AttributeList_rekey$5 = function $$rekey(attributes, positional_attrs) { - var $$6, self = this; - - - $send(positional_attrs, 'each_with_index', [], ($$6 = function(key, index){var self = $$6.$$s || this, $a, val = nil, $writer = nil; - - - - if (key == null) { - key = nil; - }; - - if (index == null) { - index = nil; - }; - if ($truthy(($truthy($a = key) ? (val = attributes['$[]']($rb_plus(index, 1))) : $a))) { - - $writer = [key, val]; - $send(attributes, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - return nil - };}, $$6.$$s = self, $$6.$$arity = 2, $$6)); - return attributes; - }, $AttributeList_rekey$5.$$arity = 2); - self.$private(); - - Opal.def(self, '$parse_attribute', $AttributeList_parse_attribute$7 = function $$parse_attribute(index, positional_attrs) { - var $a, $b, $$8, self = this, continue$ = nil, $case = nil, name = nil, single_quoted = nil, skipped = nil, c = nil, value = nil, $writer = nil, positional_attr_name = nil; - - - continue$ = true; - self.$skip_blank(); - $case = self.scanner.$peek(1); - if ($$($nesting, 'QUOT')['$===']($case)) {name = self.$parse_attribute_value(self.scanner.$get_byte())} - else if ($$($nesting, 'APOS')['$===']($case)) { - name = self.$parse_attribute_value(self.scanner.$get_byte()); - if ($truthy(name['$start_with?']($$($nesting, 'APOS')))) { - } else { - single_quoted = true - };} - else { - skipped = ($truthy($a = ($truthy($b = (name = self.$scan_name())) ? self.$skip_blank() : $b)) ? $a : 0); - if ($truthy(self.scanner['$eos?']())) { - - if ($truthy(($truthy($a = name) ? $a : self.scanner.$string().$rstrip()['$end_with?'](self.delimiter)))) { - } else { - return nil - }; - continue$ = nil; - } else if ((c = self.scanner.$get_byte())['$=='](self.delimiter)) { - self.scanner.$unscan() - } else if ($truthy(name)) { - if (c['$==']("=")) { - - self.$skip_blank(); - $case = (c = self.scanner.$get_byte()); - if ($$($nesting, 'QUOT')['$===']($case)) {value = self.$parse_attribute_value(c)} - else if ($$($nesting, 'APOS')['$===']($case)) { - value = self.$parse_attribute_value(c); - if ($truthy(value['$start_with?']($$($nesting, 'APOS')))) { - } else { - single_quoted = true - };} - else if (self.delimiter['$===']($case)) { - value = ""; - self.scanner.$unscan();} - else if (nil['$===']($case)) {value = ""} - else { - value = "" + (c) + (self.$scan_to_delimiter()); - if (value['$==']("None")) { - return true};}; - } else { - name = "" + (name) + ($rb_times(" ", skipped)) + (c) + (self.$scan_to_delimiter()) - } - } else { - name = "" + (c) + (self.$scan_to_delimiter()) - };}; - if ($truthy(value)) { - $case = name; - if ("options"['$===']($case) || "opts"['$===']($case)) {if ($truthy(value['$include?'](","))) { - - if ($truthy(value['$include?'](" "))) { - value = value.$delete(" ")}; - $send(value.$split(","), 'each', [], ($$8 = function(opt){var self = $$8.$$s || this, $writer = nil; - if (self.attributes == null) self.attributes = nil; - - - - if (opt == null) { - opt = nil; - }; - if ($truthy(opt['$empty?']())) { - return nil - } else { - - $writer = ["" + (opt) + "-option", ""]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - };}, $$8.$$s = self, $$8.$$arity = 1, $$8)); - } else if ($truthy(value['$empty?']())) { - } else { - - $writer = ["" + (value) + "-option", ""]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }} - else {if ($truthy(($truthy($a = single_quoted) ? self.block : $a))) { - $case = name; - if ("title"['$===']($case) || "reftext"['$===']($case)) { - $writer = [name, value]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - else { - $writer = [name, self.block.$apply_subs(value)]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - } else { - - $writer = [name, value]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }} - } else { - - if ($truthy(($truthy($a = single_quoted) ? self.block : $a))) { - name = self.block.$apply_subs(name)}; - if ($truthy(($truthy($a = (positional_attr_name = positional_attrs['$[]'](index))) ? name : $a))) { - - $writer = [positional_attr_name, name]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - - $writer = [$rb_plus(index, 1), name]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }; - return continue$; - }, $AttributeList_parse_attribute$7.$$arity = 2); - - Opal.def(self, '$parse_attribute_value', $AttributeList_parse_attribute_value$9 = function $$parse_attribute_value(quote) { - var self = this, value = nil; - - if (self.scanner.$peek(1)['$=='](quote)) { - - self.scanner.$get_byte(); - return ""; - } else if ($truthy((value = self.$scan_to_quote(quote)))) { - - self.scanner.$get_byte(); - if ($truthy(value['$include?']($$($nesting, 'BACKSLASH')))) { - - return value.$gsub($$($nesting, 'EscapedQuotes')['$[]'](quote), quote); - } else { - return value - }; - } else { - return "" + (quote) + (self.$scan_to_delimiter()) - } - }, $AttributeList_parse_attribute_value$9.$$arity = 1); - - Opal.def(self, '$skip_blank', $AttributeList_skip_blank$10 = function $$skip_blank() { - var self = this; - - return self.scanner.$skip($$($nesting, 'BlankRx')) - }, $AttributeList_skip_blank$10.$$arity = 0); - - Opal.def(self, '$skip_delimiter', $AttributeList_skip_delimiter$11 = function $$skip_delimiter() { - var self = this; - - return self.scanner.$skip(self.delimiter_skip_pattern) - }, $AttributeList_skip_delimiter$11.$$arity = 0); - - Opal.def(self, '$scan_name', $AttributeList_scan_name$12 = function $$scan_name() { - var self = this; - - return self.scanner.$scan($$($nesting, 'NameRx')) - }, $AttributeList_scan_name$12.$$arity = 0); - - Opal.def(self, '$scan_to_delimiter', $AttributeList_scan_to_delimiter$13 = function $$scan_to_delimiter() { - var self = this; - - return self.scanner.$scan(self.delimiter_boundary_pattern) - }, $AttributeList_scan_to_delimiter$13.$$arity = 0); - return (Opal.def(self, '$scan_to_quote', $AttributeList_scan_to_quote$14 = function $$scan_to_quote(quote) { - var self = this; - - return self.scanner.$scan($$($nesting, 'BoundaryRx')['$[]'](quote)) - }, $AttributeList_scan_to_quote$14.$$arity = 1), nil) && 'scan_to_quote'; - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/block"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy; - - Opal.add_stubs(['$default=', '$-', '$attr_accessor', '$[]', '$key?', '$==', '$===', '$drop', '$delete', '$[]=', '$commit_subs', '$nil_or_empty?', '$prepare_source_string', '$apply_subs', '$join', '$<', '$size', '$empty?', '$rstrip', '$shift', '$pop', '$warn', '$logger', '$to_s', '$class', '$object_id', '$inspect']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Block'); - - var $nesting = [self].concat($parent_nesting), $Block_initialize$1, $Block_content$2, $Block_source$3, $Block_to_s$4, $writer = nil; - - self.$$prototype.attributes = self.$$prototype.content_model = self.$$prototype.lines = self.$$prototype.subs = self.$$prototype.blocks = self.$$prototype.context = self.$$prototype.style = nil; - - - $writer = ["simple"]; - $send(Opal.const_set($nesting[0], 'DEFAULT_CONTENT_MODEL', $hash2(["audio", "image", "listing", "literal", "stem", "open", "page_break", "pass", "thematic_break", "video"], {"audio": "empty", "image": "empty", "listing": "verbatim", "literal": "verbatim", "stem": "raw", "open": "compound", "page_break": "empty", "pass": "raw", "thematic_break": "empty", "video": "empty"})), 'default=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - Opal.alias(self, "blockname", "context"); - self.$attr_accessor("lines"); - - Opal.def(self, '$initialize', $Block_initialize$1 = function $$initialize(parent, context, opts) { - var $a, $iter = $Block_initialize$1.$$p, $yield = $iter || nil, self = this, subs = nil, $writer = nil, raw_source = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Block_initialize$1.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if (opts == null) { - opts = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $Block_initialize$1, false), $zuper, $iter); - self.content_model = ($truthy($a = opts['$[]']("content_model")) ? $a : $$($nesting, 'DEFAULT_CONTENT_MODEL')['$[]'](context)); - if ($truthy(opts['$key?']("subs"))) { - if ($truthy((subs = opts['$[]']("subs")))) { - - if (subs['$==']("default")) { - self.default_subs = opts['$[]']("default_subs") - } else if ($truthy($$$('::', 'Array')['$==='](subs))) { - - self.default_subs = subs.$drop(0); - self.attributes.$delete("subs"); - } else { - - self.default_subs = nil; - - $writer = ["subs", "" + (subs)]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }; - self.$commit_subs(); - } else { - - self.default_subs = []; - self.attributes.$delete("subs"); - } - } else { - self.default_subs = nil - }; - if ($truthy((raw_source = opts['$[]']("source"))['$nil_or_empty?']())) { - return (self.lines = []) - } else if ($truthy($$$('::', 'String')['$==='](raw_source))) { - return (self.lines = $$($nesting, 'Helpers').$prepare_source_string(raw_source)) - } else { - return (self.lines = raw_source.$drop(0)) - }; - }, $Block_initialize$1.$$arity = -3); - - Opal.def(self, '$content', $Block_content$2 = function $$content() { - var $a, $b, $iter = $Block_content$2.$$p, $yield = $iter || nil, self = this, $case = nil, result = nil, first = nil, last = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Block_content$2.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - return (function() {$case = self.content_model; - if ("compound"['$===']($case)) {return $send(self, Opal.find_super_dispatcher(self, 'content', $Block_content$2, false), $zuper, $iter)} - else if ("simple"['$===']($case)) {return self.$apply_subs(self.lines.$join($$($nesting, 'LF')), self.subs)} - else if ("verbatim"['$===']($case) || "raw"['$===']($case)) { - result = self.$apply_subs(self.lines, self.subs); - if ($truthy($rb_lt(result.$size(), 2))) { - return result['$[]'](0) - } else { - - while ($truthy(($truthy($b = (first = result['$[]'](0))) ? first.$rstrip()['$empty?']() : $b))) { - result.$shift() - }; - while ($truthy(($truthy($b = (last = result['$[]'](-1))) ? last.$rstrip()['$empty?']() : $b))) { - result.$pop() - }; - return result.$join($$($nesting, 'LF')); - };} - else { - if (self.content_model['$==']("empty")) { - } else { - self.$logger().$warn("" + "Unknown content model '" + (self.content_model) + "' for block: " + (self.$to_s())) - }; - return nil;}})() - }, $Block_content$2.$$arity = 0); - - Opal.def(self, '$source', $Block_source$3 = function $$source() { - var self = this; - - return self.lines.$join($$($nesting, 'LF')) - }, $Block_source$3.$$arity = 0); - return (Opal.def(self, '$to_s', $Block_to_s$4 = function $$to_s() { - var self = this, content_summary = nil; - - - content_summary = (function() {if (self.content_model['$==']("compound")) { - return "" + "blocks: " + (self.blocks.$size()) - } else { - return "" + "lines: " + (self.lines.$size()) - }; return nil; })(); - return "" + "#<" + (self.$class()) + "@" + (self.$object_id()) + " {context: " + (self.context.$inspect()) + ", content_model: " + (self.content_model.$inspect()) + ", style: " + (self.style.$inspect()) + ", " + (content_summary) + "}>"; - }, $Block_to_s$4.$$arity = 0), nil) && 'to_s'; - })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/callouts"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_le(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$next_list', '$<<', '$current_list', '$to_i', '$generate_next_callout_id', '$+', '$<=', '$size', '$[]', '$-', '$chop', '$join', '$map', '$==', '$<', '$private', '$generate_callout_id']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Callouts'); - - var $nesting = [self].concat($parent_nesting), $Callouts_initialize$1, $Callouts_register$2, $Callouts_read_next_id$3, $Callouts_callout_ids$4, $Callouts_current_list$6, $Callouts_next_list$7, $Callouts_rewind$8, $Callouts_generate_next_callout_id$9, $Callouts_generate_callout_id$10; - - self.$$prototype.co_index = self.$$prototype.lists = self.$$prototype.list_index = nil; - - - Opal.def(self, '$initialize', $Callouts_initialize$1 = function $$initialize() { - var self = this; - - - self.lists = []; - self.list_index = 0; - return self.$next_list(); - }, $Callouts_initialize$1.$$arity = 0); - - Opal.def(self, '$register', $Callouts_register$2 = function $$register(li_ordinal) { - var self = this, id = nil; - - - self.$current_list()['$<<']($hash2(["ordinal", "id"], {"ordinal": li_ordinal.$to_i(), "id": (id = self.$generate_next_callout_id())})); - self.co_index = $rb_plus(self.co_index, 1); - return id; - }, $Callouts_register$2.$$arity = 1); - - Opal.def(self, '$read_next_id', $Callouts_read_next_id$3 = function $$read_next_id() { - var self = this, id = nil, list = nil; - - - id = nil; - list = self.$current_list(); - if ($truthy($rb_le(self.co_index, list.$size()))) { - id = list['$[]']($rb_minus(self.co_index, 1))['$[]']("id")}; - self.co_index = $rb_plus(self.co_index, 1); - return id; - }, $Callouts_read_next_id$3.$$arity = 0); - - Opal.def(self, '$callout_ids', $Callouts_callout_ids$4 = function $$callout_ids(li_ordinal) { - var $$5, self = this; - - return $send(self.$current_list(), 'map', [], ($$5 = function(it){var self = $$5.$$s || this; - - - - if (it == null) { - it = nil; - }; - if (it['$[]']("ordinal")['$=='](li_ordinal)) { - return "" + (it['$[]']("id")) + " " - } else { - return "" - };}, $$5.$$s = self, $$5.$$arity = 1, $$5)).$join().$chop() - }, $Callouts_callout_ids$4.$$arity = 1); - - Opal.def(self, '$current_list', $Callouts_current_list$6 = function $$current_list() { - var self = this; - - return self.lists['$[]']($rb_minus(self.list_index, 1)) - }, $Callouts_current_list$6.$$arity = 0); - - Opal.def(self, '$next_list', $Callouts_next_list$7 = function $$next_list() { - var self = this; - - - self.list_index = $rb_plus(self.list_index, 1); - if ($truthy($rb_lt(self.lists.$size(), self.list_index))) { - self.lists['$<<']([])}; - self.co_index = 1; - return nil; - }, $Callouts_next_list$7.$$arity = 0); - - Opal.def(self, '$rewind', $Callouts_rewind$8 = function $$rewind() { - var self = this; - - - self.list_index = 1; - self.co_index = 1; - return nil; - }, $Callouts_rewind$8.$$arity = 0); - self.$private(); - - Opal.def(self, '$generate_next_callout_id', $Callouts_generate_next_callout_id$9 = function $$generate_next_callout_id() { - var self = this; - - return self.$generate_callout_id(self.list_index, self.co_index) - }, $Callouts_generate_next_callout_id$9.$$arity = 0); - return (Opal.def(self, '$generate_callout_id', $Callouts_generate_callout_id$10 = function $$generate_callout_id(list_index, co_index) { - var self = this; - - return "" + "CO" + (list_index) + "-" + (co_index) - }, $Callouts_generate_callout_id$10.$$arity = 2), nil) && 'generate_callout_id'; - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/converter"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send, $klass = Opal.klass, $gvars = Opal.gvars; - - Opal.add_stubs(['$autoload', '$__dir__', '$attr_reader', '$raise', '$class', '$[]', '$sub', '$slice', '$length', '$==', '$[]=', '$backend_traits', '$-', '$derive_backend_traits', '$register', '$map', '$to_s', '$new', '$create', '$default', '$each', '$default=', '$registry', '$for', '$===', '$supports_templates?', '$merge', '$private', '$include', '$delete', '$clear', '$private_class_method', '$send', '$extend', '$node_name', '$+', '$receiver', '$name', '$warn', '$logger', '$respond_to?', '$content']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'Converter'); - - var $nesting = [self].concat($parent_nesting), $Converter_initialize$1, $Converter_convert$2, $Converter_handles$ques$3, $Converter_derive_backend_traits$4, $a, $Converter_included$28; - - - self.$autoload("CompositeConverter", "" + (self.$__dir__()) + "/converter/composite"); - self.$autoload("TemplateConverter", "" + (self.$__dir__()) + "/converter/template"); - self.$attr_reader("backend"); - - Opal.def(self, '$initialize', $Converter_initialize$1 = function $$initialize(backend, opts) { - var self = this; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - return (self.backend = backend); - }, $Converter_initialize$1.$$arity = -2); - - Opal.def(self, '$convert', $Converter_convert$2 = function $$convert(node, transform, opts) { - var self = this; - if (self.backend == null) self.backend = nil; - - - - if (transform == null) { - transform = nil; - }; - - if (opts == null) { - opts = nil; - }; - return self.$raise($$$('::', 'NotImplementedError'), "" + (self.$class()) + " (backend: " + (self.backend) + ") must implement the #" + ("convert") + " method"); - }, $Converter_convert$2.$$arity = -2); - - Opal.def(self, '$handles?', $Converter_handles$ques$3 = function(transform) { - var self = this; - - return true - }, $Converter_handles$ques$3.$$arity = 1); - Opal.defs(self, '$derive_backend_traits', $Converter_derive_backend_traits$4 = function $$derive_backend_traits(backend, basebackend) { - var $a, self = this, outfilesuffix = nil, filetype = nil; - - - - if (basebackend == null) { - basebackend = nil; - }; - if ($truthy(backend)) { - } else { - return $hash2([], {}) - }; - if ($truthy((outfilesuffix = $$($nesting, 'DEFAULT_EXTENSIONS')['$[]']((basebackend = ($truthy($a = basebackend) ? $a : backend.$sub($$($nesting, 'TrailingDigitsRx'), ""))))))) { - filetype = outfilesuffix.$slice(1, outfilesuffix.$length()) - } else { - outfilesuffix = "" + "." + ((filetype = basebackend)) - }; - if (filetype['$==']("html")) { - return $hash2(["basebackend", "filetype", "htmlsyntax", "outfilesuffix"], {"basebackend": basebackend, "filetype": filetype, "htmlsyntax": "html", "outfilesuffix": outfilesuffix}) - } else { - return $hash2(["basebackend", "filetype", "outfilesuffix"], {"basebackend": basebackend, "filetype": filetype, "outfilesuffix": outfilesuffix}) - }; - }, $Converter_derive_backend_traits$4.$$arity = -2); - (function($base, $parent_nesting) { - var self = $module($base, 'BackendTraits'); - - var $nesting = [self].concat($parent_nesting), $BackendTraits_basebackend$5, $BackendTraits_filetype$6, $BackendTraits_htmlsyntax$7, $BackendTraits_outfilesuffix$8, $BackendTraits_supports_templates$9, $BackendTraits_supports_templates$ques$10, $BackendTraits_init_backend_traits$11, $BackendTraits_backend_traits$12, $BackendTraits_derive_backend_traits$13; - - - - Opal.def(self, '$basebackend', $BackendTraits_basebackend$5 = function $$basebackend(value) { - var self = this, $writer = nil; - - - - if (value == null) { - value = nil; - }; - if ($truthy(value)) { - - - $writer = ["basebackend", value]; - $send(self.$backend_traits(value), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - return self.$backend_traits()['$[]']("basebackend") - }; - }, $BackendTraits_basebackend$5.$$arity = -1); - - Opal.def(self, '$filetype', $BackendTraits_filetype$6 = function $$filetype(value) { - var self = this, $writer = nil; - - - - if (value == null) { - value = nil; - }; - if ($truthy(value)) { - - - $writer = ["filetype", value]; - $send(self.$backend_traits(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - return self.$backend_traits()['$[]']("filetype") - }; - }, $BackendTraits_filetype$6.$$arity = -1); - - Opal.def(self, '$htmlsyntax', $BackendTraits_htmlsyntax$7 = function $$htmlsyntax(value) { - var self = this, $writer = nil; - - - - if (value == null) { - value = nil; - }; - if ($truthy(value)) { - - - $writer = ["htmlsyntax", value]; - $send(self.$backend_traits(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - return self.$backend_traits()['$[]']("htmlsyntax") - }; - }, $BackendTraits_htmlsyntax$7.$$arity = -1); - - Opal.def(self, '$outfilesuffix', $BackendTraits_outfilesuffix$8 = function $$outfilesuffix(value) { - var self = this, $writer = nil; - - - - if (value == null) { - value = nil; - }; - if ($truthy(value)) { - - - $writer = ["outfilesuffix", value]; - $send(self.$backend_traits(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - return self.$backend_traits()['$[]']("outfilesuffix") - }; - }, $BackendTraits_outfilesuffix$8.$$arity = -1); - - Opal.def(self, '$supports_templates', $BackendTraits_supports_templates$9 = function $$supports_templates(value) { - var self = this, $writer = nil; - - - - if (value == null) { - value = true; - }; - $writer = ["supports_templates", value]; - $send(self.$backend_traits(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $BackendTraits_supports_templates$9.$$arity = -1); - - Opal.def(self, '$supports_templates?', $BackendTraits_supports_templates$ques$10 = function() { - var self = this; - - return self.$backend_traits()['$[]']("supports_templates") - }, $BackendTraits_supports_templates$ques$10.$$arity = 0); - - Opal.def(self, '$init_backend_traits', $BackendTraits_init_backend_traits$11 = function $$init_backend_traits(value) { - var $a, self = this; - - - - if (value == null) { - value = nil; - }; - return (self.backend_traits = ($truthy($a = value) ? $a : $hash2([], {}))); - }, $BackendTraits_init_backend_traits$11.$$arity = -1); - - Opal.def(self, '$backend_traits', $BackendTraits_backend_traits$12 = function $$backend_traits(basebackend) { - var $a, self = this; - if (self.backend_traits == null) self.backend_traits = nil; - if (self.backend == null) self.backend = nil; - - - - if (basebackend == null) { - basebackend = nil; - }; - return (self.backend_traits = ($truthy($a = self.backend_traits) ? $a : $$($nesting, 'Converter').$derive_backend_traits(self.backend, basebackend))); - }, $BackendTraits_backend_traits$12.$$arity = -1); - Opal.alias(self, "backend_info", "backend_traits"); - Opal.defs(self, '$derive_backend_traits', $BackendTraits_derive_backend_traits$13 = function $$derive_backend_traits(backend, basebackend) { - var self = this; - - - - if (basebackend == null) { - basebackend = nil; - }; - return $$($nesting, 'Converter').$derive_backend_traits(backend, basebackend); - }, $BackendTraits_derive_backend_traits$13.$$arity = -2); - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Config'); - - var $nesting = [self].concat($parent_nesting), $Config_register_for$14; - - - Opal.def(self, '$register_for', $Config_register_for$14 = function $$register_for($a) { - var $post_args, backends, $$15, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - backends = $post_args;; - return $send($$($nesting, 'Converter'), 'register', [self].concat(Opal.to_a($send(backends, 'map', [], ($$15 = function(backend){var self = $$15.$$s || this; - - - - if (backend == null) { - backend = nil; - }; - return backend.$to_s();}, $$15.$$s = self, $$15.$$arity = 1, $$15))))); - }, $Config_register_for$14.$$arity = -1) - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Factory'); - - var $nesting = [self].concat($parent_nesting), $Factory_new$16, $Factory_default$17, $Factory_create$18, $Factory_register$19, $Factory_for$21, $Factory_create$22, $Factory_converters$23, $Factory_registry$24; - - - Opal.defs(self, '$new', $Factory_new$16 = function($a, $b) { - var $post_args, $kwargs, converters, proxy_default, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - $kwargs = Opal.extract_kwargs($post_args); - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - if ($post_args.length > 0) { - converters = $post_args[0]; - $post_args.splice(0, 1); - } - if (converters == null) { - converters = nil; - }; - - proxy_default = $kwargs.$$smap["proxy_default"]; - if (proxy_default == null) { - proxy_default = true - }; - if ($truthy(proxy_default)) { - - return $$($nesting, 'DefaultFactoryProxy').$new(converters); - } else { - - return $$($nesting, 'CustomFactory').$new(converters); - }; - }, $Factory_new$16.$$arity = -1); - Opal.defs(self, '$default', $Factory_default$17 = function($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $$($nesting, 'Converter'); - }, $Factory_default$17.$$arity = -1); - Opal.defs(self, '$create', $Factory_create$18 = function $$create(backend, opts) { - var self = this; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - return self.$default().$create(backend, opts); - }, $Factory_create$18.$$arity = -2); - - Opal.def(self, '$register', $Factory_register$19 = function $$register(converter, $a) { - var $post_args, backends, $$20, self = this; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - backends = $post_args;; - return $send(backends, 'each', [], ($$20 = function(backend){var self = $$20.$$s || this, $writer = nil; - - - - if (backend == null) { - backend = nil; - }; - if (backend['$==']("*")) { - - - $writer = [converter]; - $send(self.$registry(), 'default=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - - - $writer = [backend, converter]; - $send(self.$registry(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - };}, $$20.$$s = self, $$20.$$arity = 1, $$20)); - }, $Factory_register$19.$$arity = -2); - - Opal.def(self, '$for', $Factory_for$21 = function(backend) { - var self = this; - - return self.$registry()['$[]'](backend) - }, $Factory_for$21.$$arity = 1); - - Opal.def(self, '$create', $Factory_create$22 = function $$create(backend, opts) { - var $a, $b, self = this, converter = nil, template_dirs = nil, delegate_backend = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy((converter = self.$for(backend)))) { - - if ($truthy($$$('::', 'Class')['$==='](converter))) { - converter = converter.$new(backend, opts)}; - if ($truthy(($truthy($a = ($truthy($b = (template_dirs = opts['$[]']("template_dirs"))) ? $$($nesting, 'BackendTraits')['$==='](converter) : $b)) ? converter['$supports_templates?']() : $a))) { - return $$($nesting, 'CompositeConverter').$new(backend, $$($nesting, 'TemplateConverter').$new(backend, template_dirs, opts), converter, $hash2(["backend_traits_source"], {"backend_traits_source": converter})) - } else { - return converter - }; - } else if ($truthy((template_dirs = opts['$[]']("template_dirs")))) { - if ($truthy(($truthy($a = (delegate_backend = opts['$[]']("delegate_backend"))) ? (converter = self.$for(delegate_backend)) : $a))) { - - if ($truthy($$$('::', 'Class')['$==='](converter))) { - converter = converter.$new(delegate_backend, opts)}; - return $$($nesting, 'CompositeConverter').$new(backend, $$($nesting, 'TemplateConverter').$new(backend, template_dirs, opts), converter, $hash2(["backend_traits_source"], {"backend_traits_source": converter})); - } else { - return $$($nesting, 'TemplateConverter').$new(backend, template_dirs, opts) - } - } else { - return nil - }; - }, $Factory_create$22.$$arity = -2); - - Opal.def(self, '$converters', $Factory_converters$23 = function $$converters() { - var self = this; - - return self.$registry().$merge() - }, $Factory_converters$23.$$arity = 0); - self.$private(); - - Opal.def(self, '$registry', $Factory_registry$24 = function $$registry() { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Factory')) + " subclass " + (self.$class()) + " must implement the #" + ("registry") + " method") - }, $Factory_registry$24.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'CustomFactory'); - - var $nesting = [self].concat($parent_nesting), $CustomFactory_initialize$25, $CustomFactory_unregister_all$26; - - - self.$include($$($nesting, 'Factory')); - - Opal.def(self, '$initialize', $CustomFactory_initialize$25 = function $$initialize(seed_registry) { - var self = this, $writer = nil; - - - - if (seed_registry == null) { - seed_registry = nil; - }; - if ($truthy(seed_registry)) { - - - $writer = [seed_registry.$delete("*")]; - $send(seed_registry, 'default=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return (self.registry = seed_registry); - } else { - return (self.registry = $hash2([], {})) - }; - }, $CustomFactory_initialize$25.$$arity = -1); - - Opal.def(self, '$unregister_all', $CustomFactory_unregister_all$26 = function $$unregister_all() { - var self = this, $writer = nil; - - - $writer = [nil]; - $send(self.$registry().$clear(), 'default=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $CustomFactory_unregister_all$26.$$arity = 0); - self.$private(); - return self.$attr_reader("registry"); - })($nesting[0], null, $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'DefaultFactory'); - - var $nesting = [self].concat($parent_nesting), $DefaultFactory_registry$27; - - - self.$include($$($nesting, 'Factory')); - self.$private(); - (Opal.class_variable_set($nesting[0], '@@registry', $hash2([], {}))); - - Opal.def(self, '$registry', $DefaultFactory_registry$27 = function $$registry() { - var $a, self = this; - - return (($a = $nesting[0].$$cvars['@@registry']) == null ? nil : $a) - }, $DefaultFactory_registry$27.$$arity = 0); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'DefaultFactoryProxy'); - - var $nesting = [self].concat($parent_nesting); - - - self.$include($$($nesting, 'DefaultFactory')); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - return nil - } else { - return nil - }; - })($nesting[0], $$($nesting, 'CustomFactory'), $nesting); - self.$private_class_method(($truthy($a = (Opal.defs(self, '$included', $Converter_included$28 = function $$included(into) { - var self = this; - - - into.$send("include", $$($nesting, 'BackendTraits')); - return into.$extend($$($nesting, 'Config')); - }, $Converter_included$28.$$arity = 1), nil) && 'included') ? $a : "included")); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Base'); - - var $nesting = [self].concat($parent_nesting), $Base_convert$29, $Base_handles$ques$30, $Base_content_only$31, $Base_skip$32; - - self.$$prototype.backend = nil; - - self.$include($$($nesting, 'Converter'), $$($nesting, 'Logging')); - - Opal.def(self, '$convert', $Base_convert$29 = function $$convert(node, transform, opts) { - var $a, $b, self = this, ex = nil; - if ($gvars["!"] == null) $gvars["!"] = nil; - - - - if (transform == null) { - transform = node.$node_name(); - }; - - if (opts == null) { - opts = nil; - }; - try { - if ($truthy(opts)) { - - return self.$send($rb_plus("convert_", transform), node, opts); - } else { - - return self.$send($rb_plus("convert_", transform), node); - } - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - - if ($truthy(($truthy($a = ($truthy($b = $$$('::', 'NoMethodError')['$===']((ex = $gvars["!"]))) ? ex.$receiver()['$=='](self) : $b)) ? ex.$name().$to_s()['$=='](transform) : $a))) { - } else { - self.$raise() - }; - self.$logger().$warn("" + "missing convert handler for " + (ex.$name()) + " node in " + (self.backend) + " backend (" + (self.$class()) + ")"); - return nil; - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - }, $Base_convert$29.$$arity = -2); - - Opal.def(self, '$handles?', $Base_handles$ques$30 = function(transform) { - var self = this; - - return self['$respond_to?']("" + "convert_" + (transform)) - }, $Base_handles$ques$30.$$arity = 1); - - Opal.def(self, '$content_only', $Base_content_only$31 = function $$content_only(node) { - var self = this; - - return node.$content() - }, $Base_content_only$31.$$arity = 1); - return (Opal.def(self, '$skip', $Base_skip$32 = function $$skip(node) { - var self = this; - - return nil - }, $Base_skip$32.$$arity = 1), nil) && 'skip'; - })($nesting[0], null, $nesting); - self.$extend($$($nesting, 'DefaultFactory')); - })($nesting[0], $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/document"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_ge(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $hash2 = Opal.hash2, $hash = Opal.hash, $gvars = Opal.gvars; - - Opal.add_stubs(['$new', '$attr_reader', '$nil?', '$<<', '$[]', '$[]=', '$-', '$include?', '$strip', '$squeeze', '$gsub', '$empty?', '$!', '$rpartition', '$attr_accessor', '$delete', '$base_dir', '$options', '$merge', '$catalog', '$instance_variable_get', '$attributes', '$safe', '$compat_mode', '$outfilesuffix', '$sourcemap', '$path_resolver', '$converter', '$extensions', '$syntax_highlighter', '$each', '$end_with?', '$start_with?', '$slice', '$length', '$chop', '$==', '$downcase', '$extname', '$===', '$value_for_name', '$key?', '$freeze', '$attribute_undefined', '$attribute_missing', '$update', '$&', '$keys', '$name_for_value', '$expand_path', '$pwd', '$>=', '$+', '$abs', '$to_i', '$delete_if', '$update_doctype_attributes', '$cursor', '$parse', '$restore_attributes', '$update_backend_attributes', '$fetch', '$fill_datetime_attributes', '$activate', '$groups', '$create', '$to_proc', '$preprocessors?', '$preprocessors', '$process_method', '$tree_processors?', '$tree_processors', '$!=', '$counter', '$attribute_locked?', '$nextval', '$nil_or_empty?', '$to_s', '$value', '$save_to', '$register', '$tap', '$xreftext', '$source', '$source_lines', '$doctitle', '$sectname=', '$title=', '$first_section', '$title', '$reftext', '$>', '$<', '$find', '$context', '$assign_numeral', '$clear_playback_attributes', '$save_attributes', '$name', '$negate', '$rewind', '$replace', '$apply_attribute_value_subs', '$delete?', '$start', '$doctype', '$content_model', '$warn', '$logger', '$content', '$convert', '$postprocessors?', '$postprocessors', '$record', '$write', '$respond_to?', '$chomp', '$class', '$write_alternate_pages', '$map', '$split', '$resolve_docinfo_subs', '$normalize_system_path', '$read_asset', '$apply_subs', '$docinfo_processors?', '$join', '$concat', '$compact', '$docinfo_processors', '$object_id', '$inspect', '$size', '$private', '$=~', '$resolve_pass_subs', '$apply_header_subs', '$limit_bytesize', '$bytesize', '$valid_encoding?', '$byteslice', '$resolve_subs', '$utc', '$at', '$Integer', '$now', '$index', '$strftime', '$year', '$utc_offset', '$partition', '$create_converter', '$basebackend', '$filetype', '$htmlsyntax', '$derive_backend_traits', '$raise']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Document'); - - var $nesting = [self].concat($parent_nesting), $Document$1, $Document_initialize$8, $Document_parse$11, $Document_parsed$ques$14, $Document_counter$15, $Document_increment_and_store_counter$16, $Document_register$17, $Document_resolve_id$18, $Document_footnotes$ques$23, $Document_footnotes$24, $Document_callouts$25, $Document_nested$ques$26, $Document_embedded$ques$27, $Document_extensions$ques$28, $Document_source$29, $Document_source_lines$30, $Document_basebackend$ques$31, $Document_title$32, $Document_title$eq$33, $Document_doctitle$34, $Document_xreftext$35, $Document_author$36, $Document_authors$37, $Document_revdate$38, $Document_notitle$39, $Document_noheader$40, $Document_nofooter$41, $Document_first_section$42, $Document_header$ques$44, $Document_$lt$lt$45, $Document_finalize_header$46, $Document_playback_attributes$47, $Document_restore_attributes$49, $Document_set_attribute$50, $Document_delete_attribute$51, $Document_attribute_locked$ques$52, $Document_set_header_attribute$53, $Document_convert$54, $Document_write$56, $Document_content$57, $Document_docinfo$58, $Document_docinfo_processors$ques$61, $Document_to_s$62, $Document_apply_attribute_value_subs$63, $Document_limit_bytesize$64, $Document_resolve_docinfo_subs$65, $Document_create_converter$66, $Document_clear_playback_attributes$67, $Document_save_attributes$68, $Document_fill_datetime_attributes$70, $Document_update_backend_attributes$71, $Document_update_doctype_attributes$72; - - self.$$prototype.attributes = self.$$prototype.safe = self.$$prototype.sourcemap = self.$$prototype.reader = self.$$prototype.base_dir = self.$$prototype.parsed = self.$$prototype.parent_document = self.$$prototype.extensions = self.$$prototype.options = self.$$prototype.counters = self.$$prototype.catalog = self.$$prototype.reftexts = self.$$prototype.header = self.$$prototype.blocks = self.$$prototype.header_attributes = self.$$prototype.attributes_modified = self.$$prototype.backend = self.$$prototype.attribute_overrides = self.$$prototype.timings = self.$$prototype.converter = self.$$prototype.outfilesuffix = self.$$prototype.docinfo_processor_extensions = self.$$prototype.document = self.$$prototype.max_attribute_value_size = self.$$prototype.id = self.$$prototype.doctype = nil; - - Opal.const_set($nesting[0], 'ImageReference', $send($$$('::', 'Struct'), 'new', ["target", "imagesdir"], ($Document$1 = function(){var self = $Document$1.$$s || this; - - return Opal.alias(self, "to_s", "target")}, $Document$1.$$s = self, $Document$1.$$arity = 0, $Document$1))); - Opal.const_set($nesting[0], 'Footnote', $$$('::', 'Struct').$new("index", "id", "text")); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'AttributeEntry'); - - var $nesting = [self].concat($parent_nesting), $AttributeEntry_initialize$2, $AttributeEntry_save_to$3; - - - self.$attr_reader("name", "value", "negate"); - - Opal.def(self, '$initialize', $AttributeEntry_initialize$2 = function $$initialize(name, value, negate) { - var self = this; - - - - if (negate == null) { - negate = nil; - }; - self.name = name; - self.value = value; - return (self.negate = (function() {if ($truthy(negate['$nil?']())) { - return value['$nil?']() - } else { - return negate - }; return nil; })()); - }, $AttributeEntry_initialize$2.$$arity = -3); - return (Opal.def(self, '$save_to', $AttributeEntry_save_to$3 = function $$save_to(block_attributes) { - var $a, self = this, $writer = nil; - - - ($truthy($a = block_attributes['$[]']("attribute_entries")) ? $a : (($writer = ["attribute_entries", []]), $send(block_attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))['$<<'](self); - return self; - }, $AttributeEntry_save_to$3.$$arity = 1), nil) && 'save_to'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Title'); - - var $nesting = [self].concat($parent_nesting), $Title_initialize$4, $Title_sanitized$ques$5, $Title_subtitle$ques$6, $Title_to_s$7; - - self.$$prototype.sanitized = self.$$prototype.subtitle = self.$$prototype.combined = nil; - - self.$attr_reader("main"); - Opal.alias(self, "title", "main"); - self.$attr_reader("subtitle"); - self.$attr_reader("combined"); - - Opal.def(self, '$initialize', $Title_initialize$4 = function $$initialize(val, opts) { - var $a, $b, self = this, sep = nil, _ = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy(($truthy($a = (self.sanitized = opts['$[]']("sanitize"))) ? val['$include?']("<") : $a))) { - val = val.$gsub($$($nesting, 'XmlSanitizeRx'), "").$squeeze(" ").$strip()}; - if ($truthy(($truthy($a = (sep = ($truthy($b = opts['$[]']("separator")) ? $b : ":"))['$empty?']()) ? $a : val['$include?']((sep = "" + (sep) + " "))['$!']()))) { - - self.main = val; - self.subtitle = nil; - } else { - $b = val.$rpartition(sep), $a = Opal.to_ary($b), (self.main = ($a[0] == null ? nil : $a[0])), (_ = ($a[1] == null ? nil : $a[1])), (self.subtitle = ($a[2] == null ? nil : $a[2])), $b - }; - return (self.combined = val); - }, $Title_initialize$4.$$arity = -2); - - Opal.def(self, '$sanitized?', $Title_sanitized$ques$5 = function() { - var self = this; - - return self.sanitized - }, $Title_sanitized$ques$5.$$arity = 0); - - Opal.def(self, '$subtitle?', $Title_subtitle$ques$6 = function() { - var self = this; - - if ($truthy(self.subtitle)) { - return true - } else { - return false - } - }, $Title_subtitle$ques$6.$$arity = 0); - return (Opal.def(self, '$to_s', $Title_to_s$7 = function $$to_s() { - var self = this; - - return self.combined - }, $Title_to_s$7.$$arity = 0), nil) && 'to_s'; - })($nesting[0], null, $nesting); - Opal.const_set($nesting[0], 'Author', $$$('::', 'Struct').$new("name", "firstname", "middlename", "lastname", "initials", "email")); - self.$attr_reader("safe"); - self.$attr_reader("compat_mode"); - self.$attr_reader("backend"); - self.$attr_reader("doctype"); - self.$attr_accessor("sourcemap"); - self.$attr_reader("catalog"); - Opal.alias(self, "references", "catalog"); - self.$attr_reader("counters"); - self.$attr_reader("header"); - self.$attr_reader("base_dir"); - self.$attr_reader("options"); - self.$attr_reader("outfilesuffix"); - self.$attr_reader("parent_document"); - self.$attr_reader("reader"); - self.$attr_reader("path_resolver"); - self.$attr_reader("converter"); - self.$attr_reader("syntax_highlighter"); - self.$attr_reader("extensions"); - - Opal.def(self, '$initialize', $Document_initialize$8 = function $$initialize(data, options) { - var $a, $$9, $b, $c, $$10, $d, $e, $f, $g, $iter = $Document_initialize$8.$$p, $yield = $iter || nil, self = this, parent_doc = nil, $writer = nil, attr_overrides = nil, parent_doctype = nil, initialize_extensions = nil, to_file = nil, safe_mode = nil, input_mtime = nil, standalone = nil, attrs = nil, safe_mode_name = nil, base_dir_val = nil, backend_val = nil, doctype_val = nil, size = nil, initial_backend = nil, ext_registry = nil, ext_block = nil; - - if ($iter) $Document_initialize$8.$$p = null; - - - if (data == null) { - data = nil; - }; - - if (options == null) { - options = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $Document_initialize$8, false), [self, "document"], null); - if ($truthy((parent_doc = options.$delete("parent")))) { - - self.parent_document = parent_doc; - ($truthy($a = options['$[]']("base_dir")) ? $a : (($writer = ["base_dir", parent_doc.$base_dir()]), $send(options, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy(parent_doc.$options()['$[]']("catalog_assets"))) { - - $writer = ["catalog_assets", true]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - self.catalog = parent_doc.$catalog().$merge($hash2(["footnotes"], {"footnotes": []})); - self.attribute_overrides = (attr_overrides = parent_doc.$instance_variable_get("@attribute_overrides").$merge(parent_doc.$attributes())); - attr_overrides.$delete("compat-mode"); - parent_doctype = attr_overrides.$delete("doctype"); - attr_overrides.$delete("notitle"); - attr_overrides.$delete("showtitle"); - attr_overrides.$delete("toc"); - - $writer = ["toc-placement", ($truthy($a = attr_overrides.$delete("toc-placement")) ? $a : "auto")]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - attr_overrides.$delete("toc-position"); - self.safe = parent_doc.$safe(); - if ($truthy((self.compat_mode = parent_doc.$compat_mode()))) { - - $writer = ["compat-mode", ""]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - self.outfilesuffix = parent_doc.$outfilesuffix(); - self.sourcemap = parent_doc.$sourcemap(); - self.timings = nil; - self.path_resolver = parent_doc.$path_resolver(); - self.converter = parent_doc.$converter(); - initialize_extensions = nil; - self.extensions = parent_doc.$extensions(); - self.syntax_highlighter = parent_doc.$syntax_highlighter(); - } else { - - self.parent_document = nil; - self.catalog = $hash2(["ids", "refs", "footnotes", "links", "images", "callouts", "includes"], {"ids": $hash2([], {}), "refs": $hash2([], {}), "footnotes": [], "links": [], "images": [], "callouts": $$($nesting, 'Callouts').$new(), "includes": $hash2([], {})}); - self.attribute_overrides = (attr_overrides = $hash2([], {})); - $send(($truthy($a = options['$[]']("attributes")) ? $a : $hash2([], {})), 'each', [], ($$9 = function(key, val){var self = $$9.$$s || this, $b; - - - - if (key == null) { - key = nil; - }; - - if (val == null) { - val = nil; - }; - if ($truthy(key['$end_with?']("@"))) { - if ($truthy(key['$start_with?']("!"))) { - $b = [key.$slice(1, $rb_minus(key.$length(), 2)), false], (key = $b[0]), (val = $b[1]), $b - } else if ($truthy(key['$end_with?']("!@"))) { - $b = [key.$slice(0, $rb_minus(key.$length(), 2)), false], (key = $b[0]), (val = $b[1]), $b - } else { - $b = [key.$chop(), "" + (val) + "@"], (key = $b[0]), (val = $b[1]), $b - } - } else if ($truthy(key['$start_with?']("!"))) { - $b = [key.$slice(1, key.$length()), (function() {if (val['$==']("@")) { - return false - } else { - return nil - }; return nil; })()], (key = $b[0]), (val = $b[1]), $b - } else if ($truthy(key['$end_with?']("!"))) { - $b = [key.$chop(), (function() {if (val['$==']("@")) { - return false - } else { - return nil - }; return nil; })()], (key = $b[0]), (val = $b[1]), $b}; - - $writer = [key.$downcase(), val]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];;}, $$9.$$s = self, $$9.$$arity = 2, $$9)); - if ($truthy((to_file = options['$[]']("to_file")))) { - - $writer = ["outfilesuffix", $$($nesting, 'Helpers').$extname(to_file)]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy((safe_mode = options['$[]']("safe"))['$!']())) { - self.safe = $$$($$($nesting, 'SafeMode'), 'SECURE') - } else if ($truthy($$$('::', 'Integer')['$==='](safe_mode))) { - self.safe = safe_mode - } else { - self.safe = (function() { try { - - return $$($nesting, 'SafeMode').$value_for_name(safe_mode); - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return $$$($$($nesting, 'SafeMode'), 'SECURE') - } finally { Opal.pop_exception() } - } else { throw $err; } - }})() - }; - input_mtime = options.$delete("input_mtime"); - self.compat_mode = attr_overrides['$key?']("compat-mode"); - self.sourcemap = options['$[]']("sourcemap"); - self.timings = options.$delete("timings"); - self.path_resolver = $$($nesting, 'PathResolver').$new(); - initialize_extensions = (function() {if ($truthy(($truthy($a = (($c = $$$('::', 'Asciidoctor', 'skip_raise')) && ($b = $$$($c, 'Extensions', 'skip_raise')) ? 'constant' : nil)) ? $a : options['$key?']("extensions")))) { - return $$$($$$('::', 'Asciidoctor'), 'Extensions') - } else { - return nil - }; return nil; })(); - self.extensions = nil; - if ($truthy(($truthy($a = options['$key?']("header_footer")) ? options['$key?']("standalone")['$!']() : $a))) { - - $writer = ["standalone", options['$[]']("header_footer")]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - }; - self.parsed = (self.reftexts = (self.header = (self.header_attributes = nil))); - self.counters = $hash2([], {}); - self.attributes_modified = $$$('::', 'Set').$new(); - self.docinfo_processor_extensions = $hash2([], {}); - standalone = options['$[]']("standalone"); - (self.options = options).$freeze(); - attrs = self.attributes; - if ($truthy(parent_doc)) { - } else { - - - $writer = ["attribute-undefined", $$($nesting, 'Compliance').$attribute_undefined()]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["attribute-missing", $$($nesting, 'Compliance').$attribute_missing()]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - attrs.$update($$($nesting, 'DEFAULT_ATTRIBUTES')); - }; - if ($truthy(standalone)) { - - - $writer = ["embedded", nil]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["copycss", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["iconfont-remote", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["stylesheet", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["webfonts", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - - - $writer = ["embedded", ""]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(($truthy($a = attr_overrides['$key?']("showtitle")) ? attr_overrides.$keys()['$&'](["notitle", "showtitle"])['$[]'](-1)['$==']("showtitle") : $a))) { - - $writer = ["notitle", $hash(nil, "", false, "@", "@", false)['$[]'](attr_overrides['$[]']("showtitle"))]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else if ($truthy(attr_overrides['$key?']("notitle"))) { - - $writer = ["showtitle", $hash(nil, "", false, "@", "@", false)['$[]'](attr_overrides['$[]']("notitle"))]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = ["notitle", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - }; - - $writer = ["asciidoctor", ""]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["asciidoctor-version", $$$($$$('::', 'Asciidoctor'), 'VERSION')]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["safe-mode-name", (safe_mode_name = $$($nesting, 'SafeMode').$name_for_value(self.safe))]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["" + "safe-mode-" + (safe_mode_name), ""]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["safe-mode-level", self.safe]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - ($truthy($a = attr_overrides['$[]']("max-include-depth")) ? $a : (($writer = ["max-include-depth", 64]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - ($truthy($a = attr_overrides['$[]']("allow-uri-read")) ? $a : (($writer = ["allow-uri-read", nil]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy(attr_overrides['$key?']("numbered"))) { - - $writer = ["sectnums", attr_overrides.$delete("numbered")]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(attr_overrides['$key?']("hardbreaks"))) { - - $writer = ["hardbreaks-option", attr_overrides.$delete("hardbreaks")]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy((base_dir_val = options['$[]']("base_dir")))) { - self.base_dir = (($writer = ["docdir", $$$('::', 'File').$expand_path(base_dir_val)]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]) - } else if ($truthy(attr_overrides['$[]']("docdir"))) { - self.base_dir = attr_overrides['$[]']("docdir") - } else { - self.base_dir = (($writer = ["docdir", $$$('::', 'Dir').$pwd()]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]) - }; - if ($truthy((backend_val = options['$[]']("backend")))) { - - $writer = ["backend", "" + (backend_val)]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy((doctype_val = options['$[]']("doctype")))) { - - $writer = ["doctype", "" + (doctype_val)]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy($rb_ge(self.safe, $$$($$($nesting, 'SafeMode'), 'SERVER')))) { - - ($truthy($a = attr_overrides['$[]']("copycss")) ? $a : (($writer = ["copycss", nil]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - ($truthy($a = attr_overrides['$[]']("source-highlighter")) ? $a : (($writer = ["source-highlighter", nil]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - ($truthy($a = attr_overrides['$[]']("backend")) ? $a : (($writer = ["backend", $$($nesting, 'DEFAULT_BACKEND')]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy(($truthy($a = parent_doc['$!']()) ? attr_overrides['$key?']("docfile") : $a))) { - - $writer = ["docfile", attr_overrides['$[]']("docfile")['$[]'](Opal.Range.$new($rb_plus(attr_overrides['$[]']("docdir").$length(), 1), -1, false))]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - - $writer = ["docdir", ""]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - ($truthy($a = attr_overrides['$[]']("user-home")) ? $a : (($writer = ["user-home", "."]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy($rb_ge(self.safe, $$$($$($nesting, 'SafeMode'), 'SECURE')))) { - - if ($truthy(attr_overrides['$key?']("max-attribute-value-size"))) { - } else { - - $writer = ["max-attribute-value-size", 4096]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy(attr_overrides['$key?']("linkcss"))) { - } else { - - $writer = ["linkcss", ""]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - ($truthy($a = attr_overrides['$[]']("icons")) ? $a : (($writer = ["icons", nil]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));}; - } else { - ($truthy($a = attr_overrides['$[]']("user-home")) ? $a : (($writer = ["user-home", $$($nesting, 'USER_HOME')]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - }; - self.max_attribute_value_size = (function() {if ($truthy((size = ($truthy($a = attr_overrides['$[]']("max-attribute-value-size")) ? $a : (($writer = ["max-attribute-value-size", nil]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))))) { - return size.$to_i().$abs() - } else { - return nil - }; return nil; })(); - $send(attr_overrides, 'delete_if', [], ($$10 = function(key, val){var self = $$10.$$s || this, $d, verdict = nil; - - - - if (key == null) { - key = nil; - }; - - if (val == null) { - val = nil; - }; - if ($truthy(val)) { - - if ($truthy(($truthy($d = $$$('::', 'String')['$==='](val)) ? val['$end_with?']("@") : $d))) { - $d = [val.$chop(), true], (val = $d[0]), (verdict = $d[1]), $d}; - - $writer = [key, val]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - - attrs.$delete(key); - verdict = val['$=='](false); - }; - return verdict;}, $$10.$$s = self, $$10.$$arity = 2, $$10)); - if ($truthy(parent_doc)) { - - self.backend = attrs['$[]']("backend"); - if ((self.doctype = (($writer = ["doctype", parent_doctype]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))['$==']($$($nesting, 'DEFAULT_DOCTYPE'))) { - } else { - self.$update_doctype_attributes($$($nesting, 'DEFAULT_DOCTYPE')) - }; - self.reader = $$($nesting, 'Reader').$new(data, options['$[]']("cursor")); - if ($truthy(self.sourcemap)) { - self.source_location = self.reader.$cursor()}; - $$($nesting, 'Parser').$parse(self.reader, self); - self.$restore_attributes(); - return (self.parsed = true); - } else { - - self.backend = nil; - if ((initial_backend = ($truthy($a = attrs['$[]']("backend")) ? $a : $$($nesting, 'DEFAULT_BACKEND')))['$==']("manpage")) { - self.doctype = (($writer = ["doctype", (($writer = ["doctype", "manpage"]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]) - } else { - self.doctype = ($truthy($a = attrs['$[]']("doctype")) ? $a : (($writer = ["doctype", $$($nesting, 'DEFAULT_DOCTYPE')]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - }; - self.$update_backend_attributes(initial_backend, true); - ($truthy($a = attrs['$[]']("stylesdir")) ? $a : (($writer = ["stylesdir", "."]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - ($truthy($a = attrs['$[]']("iconsdir")) ? $a : (($writer = ["iconsdir", "" + (attrs.$fetch("imagesdir", "./images")) + "/icons"]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - self.$fill_datetime_attributes(attrs, input_mtime); - if ($truthy(initialize_extensions)) { - if ($truthy((ext_registry = options['$[]']("extension_registry")))) { - if ($truthy(($truthy($a = $$$($$($nesting, 'Extensions'), 'Registry')['$==='](ext_registry)) ? $a : ($truthy($d = (($g = $$$('::', 'AsciidoctorJ', 'skip_raise')) && ($f = $$$($g, 'Extensions', 'skip_raise')) && ($e = $$$($f, 'ExtensionRegistry', 'skip_raise')) ? 'constant' : nil)) ? $$$($$$($$$('::', 'AsciidoctorJ'), 'Extensions'), 'ExtensionRegistry')['$==='](ext_registry) : $d)))) { - self.extensions = ext_registry.$activate(self)} - } else if ($truthy((ext_block = options['$[]']("extensions"))['$nil?']())) { - if ($truthy($$($nesting, 'Extensions').$groups()['$empty?']())) { - } else { - self.extensions = $$$($$($nesting, 'Extensions'), 'Registry').$new().$activate(self) - } - } else if ($truthy($$$('::', 'Proc')['$==='](ext_block))) { - self.extensions = $send($$($nesting, 'Extensions'), 'create', [], ext_block.$to_proc()).$activate(self)}}; - self.reader = $$($nesting, 'PreprocessorReader').$new(self, data, $$$($$($nesting, 'Reader'), 'Cursor').$new(attrs['$[]']("docfile"), self.base_dir), $hash2(["normalize"], {"normalize": true})); - if ($truthy(self.sourcemap)) { - return (self.source_location = self.reader.$cursor()) - } else { - return nil - }; - }; - }, $Document_initialize$8.$$arity = -1); - - Opal.def(self, '$parse', $Document_parse$11 = function $$parse(data) { - var $a, $$12, $$13, self = this, doc = nil, exts = nil; - - - - if (data == null) { - data = nil; - }; - if ($truthy(self.parsed)) { - return self - } else { - - doc = self; - if ($truthy(data)) { - - self.reader = $$($nesting, 'PreprocessorReader').$new(doc, data, $$$($$($nesting, 'Reader'), 'Cursor').$new(self.attributes['$[]']("docfile"), self.base_dir), $hash2(["normalize"], {"normalize": true})); - if ($truthy(self.sourcemap)) { - self.source_location = self.reader.$cursor()};}; - if ($truthy(($truthy($a = (exts = (function() {if ($truthy(self.parent_document)) { - return nil - } else { - return self.extensions - }; return nil; })())) ? exts['$preprocessors?']() : $a))) { - $send(exts.$preprocessors(), 'each', [], ($$12 = function(ext){var self = $$12.$$s || this, $b; - if (self.reader == null) self.reader = nil; - - - - if (ext == null) { - ext = nil; - }; - return (self.reader = ($truthy($b = ext.$process_method()['$[]'](doc, self.reader)) ? $b : self.reader));}, $$12.$$s = self, $$12.$$arity = 1, $$12))}; - $$($nesting, 'Parser').$parse(self.reader, doc, $hash2(["header_only"], {"header_only": self.options['$[]']("parse_header_only")})); - self.$restore_attributes(); - if ($truthy(($truthy($a = exts) ? exts['$tree_processors?']() : $a))) { - $send(exts.$tree_processors(), 'each', [], ($$13 = function(ext){var self = $$13.$$s || this, $b, $c, result = nil; - - - - if (ext == null) { - ext = nil; - }; - if ($truthy(($truthy($b = ($truthy($c = (result = ext.$process_method()['$[]'](doc))) ? $$($nesting, 'Document')['$==='](result) : $c)) ? result['$!='](doc) : $b))) { - return (doc = result) - } else { - return nil - };}, $$13.$$s = self, $$13.$$arity = 1, $$13))}; - self.parsed = true; - return doc; - }; - }, $Document_parse$11.$$arity = -1); - - Opal.def(self, '$parsed?', $Document_parsed$ques$14 = function() { - var self = this; - - return self.parsed - }, $Document_parsed$ques$14.$$arity = 0); - - Opal.def(self, '$counter', $Document_counter$15 = function $$counter(name, seed) { - var $a, self = this, locked = nil, curr_val = nil, next_val = nil, $writer = nil; - - - - if (seed == null) { - seed = nil; - }; - if ($truthy(self.parent_document)) { - return self.parent_document.$counter(name, seed)}; - if ($truthy(($truthy($a = (locked = self['$attribute_locked?'](name))) ? (curr_val = self.counters['$[]'](name)) : $a))) { - next_val = (($writer = [name, $$($nesting, 'Helpers').$nextval(curr_val)]), $send(self.counters, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]) - } else if ($truthy((curr_val = self.attributes['$[]'](name))['$nil_or_empty?']()['$!']())) { - next_val = (($writer = [name, $$($nesting, 'Helpers').$nextval(curr_val)]), $send(self.counters, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]) - } else if ($truthy(seed)) { - next_val = (($writer = [name, (function() {if (seed['$=='](seed.$to_i().$to_s())) { - return seed.$to_i() - } else { - return seed - }; return nil; })()]), $send(self.counters, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]) - } else { - next_val = (($writer = [name, 1]), $send(self.counters, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]) - }; - if ($truthy(locked)) { - } else { - - $writer = [name, next_val]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - return next_val; - }, $Document_counter$15.$$arity = -2); - - Opal.def(self, '$increment_and_store_counter', $Document_increment_and_store_counter$16 = function $$increment_and_store_counter(counter_name, block) { - var self = this; - - return $$($nesting, 'AttributeEntry').$new(counter_name, self.$counter(counter_name)).$save_to(block.$attributes()).$value() - }, $Document_increment_and_store_counter$16.$$arity = 2); - Opal.alias(self, "counter_increment", "increment_and_store_counter"); - - Opal.def(self, '$register', $Document_register$17 = function $$register(type, value) { - var $a, self = this, $case = nil, id = nil, $logical_op_recvr_tmp_1 = nil, $writer = nil, ref = nil; - - return (function() {$case = type; - if ("ids"['$===']($case)) {return self.$register("refs", [(id = value['$[]'](0)), $$($nesting, 'Inline').$new(self, "anchor", value['$[]'](1), $hash2(["type", "id"], {"type": "ref", "id": id}))])} - else if ("refs"['$===']($case)) { - - $logical_op_recvr_tmp_1 = self.catalog['$[]']("refs"); - ($truthy($a = $logical_op_recvr_tmp_1['$[]'](value['$[]'](0))) ? $a : (($writer = [value['$[]'](0), (ref = value['$[]'](1))]), $send($logical_op_recvr_tmp_1, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));; - return ref;} - else if ("footnotes"['$===']($case)) {return self.catalog['$[]'](type)['$<<'](value)} - else {if ($truthy(self.options['$[]']("catalog_assets"))) { - return self.catalog['$[]'](type)['$<<']((function() {if (type['$==']("images")) { - - return $$($nesting, 'ImageReference').$new(value, self.attributes['$[]']("imagesdir")); - } else { - return value - }; return nil; })()) - } else { - return nil - }}})() - }, $Document_register$17.$$arity = 2); - - Opal.def(self, '$resolve_id', $Document_resolve_id$18 = function $$resolve_id(text) { - var $$19, $$21, self = this, resolved_id = nil; - - if ($truthy(self.reftexts)) { - return self.reftexts['$[]'](text) - } else if ($truthy(self.parsed)) { - return $send((self.reftexts = $hash2([], {})), 'tap', [], ($$19 = function(accum){var self = $$19.$$s || this, $$20; - if (self.catalog == null) self.catalog = nil; - - - - if (accum == null) { - accum = nil; - }; - return $send(self.catalog['$[]']("refs"), 'each', [], ($$20 = function(id, ref){var self = $$20.$$s || this, $a, $writer = nil; - - - - if (id == null) { - id = nil; - }; - - if (ref == null) { - ref = nil; - }; - return ($truthy($a = accum['$[]'](ref.$xreftext())) ? $a : (($writer = [ref.$xreftext(), id]), $send(accum, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));}, $$20.$$s = self, $$20.$$arity = 2, $$20));}, $$19.$$s = self, $$19.$$arity = 1, $$19))['$[]'](text) - } else { - - resolved_id = nil; - (function(){var $brk = Opal.new_brk(); try {return $send((self.reftexts = $hash2([], {})), 'tap', [], ($$21 = function(accum){var self = $$21.$$s || this, $$22; - if (self.catalog == null) self.catalog = nil; - - - - if (accum == null) { - accum = nil; - }; - return (function(){var $brk = Opal.new_brk(); try {return $send(self.catalog['$[]']("refs"), 'each', [], ($$22 = function(id, ref){var self = $$22.$$s || this, $a, xreftext = nil, $writer = nil; - - - - if (id == null) { - id = nil; - }; - - if (ref == null) { - ref = nil; - }; - if ((xreftext = ref.$xreftext())['$=='](text)) { - - - Opal.brk((resolved_id = id), $brk); - } else { - - return ($truthy($a = accum['$[]'](xreftext)) ? $a : (($writer = [xreftext, id]), $send(accum, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - };}, $$22.$$s = self, $$22.$$brk = $brk, $$22.$$arity = 2, $$22)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})();}, $$21.$$s = self, $$21.$$brk = $brk, $$21.$$arity = 1, $$21)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})(); - self.reftexts = nil; - return resolved_id; - } - }, $Document_resolve_id$18.$$arity = 1); - - Opal.def(self, '$footnotes?', $Document_footnotes$ques$23 = function() { - var self = this; - - if ($truthy(self.catalog['$[]']("footnotes")['$empty?']())) { - return false - } else { - return true - } - }, $Document_footnotes$ques$23.$$arity = 0); - - Opal.def(self, '$footnotes', $Document_footnotes$24 = function $$footnotes() { - var self = this; - - return self.catalog['$[]']("footnotes") - }, $Document_footnotes$24.$$arity = 0); - - Opal.def(self, '$callouts', $Document_callouts$25 = function $$callouts() { - var self = this; - - return self.catalog['$[]']("callouts") - }, $Document_callouts$25.$$arity = 0); - - Opal.def(self, '$nested?', $Document_nested$ques$26 = function() { - var self = this; - - if ($truthy(self.parent_document)) { - return true - } else { - return false - } - }, $Document_nested$ques$26.$$arity = 0); - - Opal.def(self, '$embedded?', $Document_embedded$ques$27 = function() { - var self = this; - - return self.attributes['$key?']("embedded") - }, $Document_embedded$ques$27.$$arity = 0); - - Opal.def(self, '$extensions?', $Document_extensions$ques$28 = function() { - var self = this; - - if ($truthy(self.extensions)) { - return true - } else { - return false - } - }, $Document_extensions$ques$28.$$arity = 0); - - Opal.def(self, '$source', $Document_source$29 = function $$source() { - var self = this; - - if ($truthy(self.reader)) { - return self.reader.$source() - } else { - return nil - } - }, $Document_source$29.$$arity = 0); - - Opal.def(self, '$source_lines', $Document_source_lines$30 = function $$source_lines() { - var self = this; - - if ($truthy(self.reader)) { - return self.reader.$source_lines() - } else { - return nil - } - }, $Document_source_lines$30.$$arity = 0); - - Opal.def(self, '$basebackend?', $Document_basebackend$ques$31 = function(base) { - var self = this; - - return self.attributes['$[]']("basebackend")['$=='](base) - }, $Document_basebackend$ques$31.$$arity = 1); - - Opal.def(self, '$title', $Document_title$32 = function $$title() { - var self = this; - - return self.$doctitle() - }, $Document_title$32.$$arity = 0); - - Opal.def(self, '$title=', $Document_title$eq$33 = function(title) { - var self = this, sect = nil, $writer = nil; - - - if ($truthy((sect = self.header))) { - } else { - - $writer = ["header"]; - $send((sect = (self.header = $$($nesting, 'Section').$new(self, 0))), 'sectname=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - - $writer = [title]; - $send(sect, 'title=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - }, $Document_title$eq$33.$$arity = 1); - - Opal.def(self, '$doctitle', $Document_doctitle$34 = function $$doctitle(opts) { - var $a, self = this, val = nil, sect = nil, separator = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy((val = self.attributes['$[]']("title")))) { - } else if ($truthy((sect = self.$first_section()))) { - val = sect.$title() - } else if ($truthy(($truthy($a = opts['$[]']("use_fallback")) ? (val = self.attributes['$[]']("untitled-label")) : $a)['$!']())) { - return nil}; - if ($truthy((separator = opts['$[]']("partition")))) { - return $$($nesting, 'Title').$new(val, opts.$merge($hash2(["separator"], {"separator": (function() {if (separator['$=='](true)) { - return self.attributes['$[]']("title-separator") - } else { - return separator - }; return nil; })()}))) - } else if ($truthy(($truthy($a = opts['$[]']("sanitize")) ? val['$include?']("<") : $a))) { - return val.$gsub($$($nesting, 'XmlSanitizeRx'), "").$squeeze(" ").$strip() - } else { - return val - }; - }, $Document_doctitle$34.$$arity = -1); - Opal.alias(self, "name", "doctitle"); - - Opal.def(self, '$xreftext', $Document_xreftext$35 = function $$xreftext(xrefstyle) { - var $a, self = this, val = nil; - - - - if (xrefstyle == null) { - xrefstyle = nil; - }; - if ($truthy(($truthy($a = (val = self.$reftext())) ? val['$empty?']()['$!']() : $a))) { - return val - } else { - return self.$title() - }; - }, $Document_xreftext$35.$$arity = -1); - - Opal.def(self, '$author', $Document_author$36 = function $$author() { - var self = this; - - return self.attributes['$[]']("author") - }, $Document_author$36.$$arity = 0); - - Opal.def(self, '$authors', $Document_authors$37 = function $$authors() { - var $a, self = this, attrs = nil, authors = nil, num_authors = nil, idx = nil; - - if ($truthy((attrs = self.attributes)['$key?']("author"))) { - - authors = [$$($nesting, 'Author').$new(attrs['$[]']("author"), attrs['$[]']("firstname"), attrs['$[]']("middlename"), attrs['$[]']("lastname"), attrs['$[]']("authorinitials"), attrs['$[]']("email"))]; - if ($truthy($rb_gt((num_authors = ($truthy($a = attrs['$[]']("authorcount")) ? $a : 0)), 1))) { - - idx = 1; - while ($truthy($rb_lt(idx, num_authors))) { - - idx = $rb_plus(idx, 1); - authors['$<<']($$($nesting, 'Author').$new(attrs['$[]']("" + "author_" + (idx)), attrs['$[]']("" + "firstname_" + (idx)), attrs['$[]']("" + "middlename_" + (idx)), attrs['$[]']("" + "lastname_" + (idx)), attrs['$[]']("" + "authorinitials_" + (idx)), attrs['$[]']("" + "email_" + (idx)))); - };}; - return authors; - } else { - return [] - } - }, $Document_authors$37.$$arity = 0); - - Opal.def(self, '$revdate', $Document_revdate$38 = function $$revdate() { - var self = this; - - return self.attributes['$[]']("revdate") - }, $Document_revdate$38.$$arity = 0); - - Opal.def(self, '$notitle', $Document_notitle$39 = function $$notitle() { - var self = this; - - return self.attributes['$key?']("notitle") - }, $Document_notitle$39.$$arity = 0); - - Opal.def(self, '$noheader', $Document_noheader$40 = function $$noheader() { - var self = this; - - return self.attributes['$key?']("noheader") - }, $Document_noheader$40.$$arity = 0); - - Opal.def(self, '$nofooter', $Document_nofooter$41 = function $$nofooter() { - var self = this; - - return self.attributes['$key?']("nofooter") - }, $Document_nofooter$41.$$arity = 0); - - Opal.def(self, '$first_section', $Document_first_section$42 = function $$first_section() { - var $a, $$43, self = this; - - return ($truthy($a = self.header) ? $a : $send(self.blocks, 'find', [], ($$43 = function(e){var self = $$43.$$s || this; - - - - if (e == null) { - e = nil; - }; - return e.$context()['$==']("section");}, $$43.$$s = self, $$43.$$arity = 1, $$43))) - }, $Document_first_section$42.$$arity = 0); - - Opal.def(self, '$header?', $Document_header$ques$44 = function() { - var self = this; - - if ($truthy(self.header)) { - return true - } else { - return false - } - }, $Document_header$ques$44.$$arity = 0); - Opal.alias(self, "has_header?", "header?"); - - Opal.def(self, '$<<', $Document_$lt$lt$45 = function(block) { - var $iter = $Document_$lt$lt$45.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Document_$lt$lt$45.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - if (block.$context()['$==']("section")) { - self.$assign_numeral(block)}; - return $send(self, Opal.find_super_dispatcher(self, '<<', $Document_$lt$lt$45, false), $zuper, $iter); - }, $Document_$lt$lt$45.$$arity = 1); - - Opal.def(self, '$finalize_header', $Document_finalize_header$46 = function $$finalize_header(unrooted_attributes, header_valid) { - var self = this, $writer = nil; - - - - if (header_valid == null) { - header_valid = true; - }; - self.$clear_playback_attributes(unrooted_attributes); - self.$save_attributes(); - if ($truthy(header_valid)) { - } else { - - $writer = ["invalid-header", true]; - $send(unrooted_attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - return unrooted_attributes; - }, $Document_finalize_header$46.$$arity = -2); - - Opal.def(self, '$playback_attributes', $Document_playback_attributes$47 = function $$playback_attributes(block_attributes) { - var $$48, self = this; - - if ($truthy(block_attributes['$key?']("attribute_entries"))) { - return $send(block_attributes['$[]']("attribute_entries"), 'each', [], ($$48 = function(entry){var self = $$48.$$s || this, name = nil, $writer = nil; - if (self.attributes == null) self.attributes = nil; - - - - if (entry == null) { - entry = nil; - }; - name = entry.$name(); - if ($truthy(entry.$negate())) { - - self.attributes.$delete(name); - if (name['$==']("compat-mode")) { - return (self.compat_mode = false) - } else { - return nil - }; - } else { - - - $writer = [name, entry.$value()]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if (name['$==']("compat-mode")) { - return (self.compat_mode = true) - } else { - return nil - }; - };}, $$48.$$s = self, $$48.$$arity = 1, $$48)) - } else { - return nil - } - }, $Document_playback_attributes$47.$$arity = 1); - - Opal.def(self, '$restore_attributes', $Document_restore_attributes$49 = function $$restore_attributes() { - var self = this; - - - if ($truthy(self.parent_document)) { - } else { - self.catalog['$[]']("callouts").$rewind() - }; - return self.attributes.$replace(self.header_attributes); - }, $Document_restore_attributes$49.$$arity = 0); - - Opal.def(self, '$set_attribute', $Document_set_attribute$50 = function $$set_attribute(name, value) { - var $a, self = this, $writer = nil, $case = nil; - - - - if (value == null) { - value = ""; - }; - if ($truthy(self['$attribute_locked?'](name))) { - return nil - } else { - - if ($truthy(value['$empty?']())) { - } else { - value = self.$apply_attribute_value_subs(value) - }; - if ($truthy(self.header_attributes)) { - - $writer = [name, value]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $case = name; - if ("backend"['$===']($case)) {self.$update_backend_attributes(value, ($truthy($a = self.attributes_modified['$delete?']("htmlsyntax")) ? value['$=='](self.backend) : $a))} - else if ("doctype"['$===']($case)) {self.$update_doctype_attributes(value)} - else { - $writer = [name, value]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - self.attributes_modified['$<<'](name); - }; - return value; - }; - }, $Document_set_attribute$50.$$arity = -2); - - Opal.def(self, '$delete_attribute', $Document_delete_attribute$51 = function $$delete_attribute(name) { - var self = this; - - if ($truthy(self['$attribute_locked?'](name))) { - return false - } else { - - self.attributes.$delete(name); - self.attributes_modified['$<<'](name); - return true; - } - }, $Document_delete_attribute$51.$$arity = 1); - - Opal.def(self, '$attribute_locked?', $Document_attribute_locked$ques$52 = function(name) { - var self = this; - - return self.attribute_overrides['$key?'](name) - }, $Document_attribute_locked$ques$52.$$arity = 1); - - Opal.def(self, '$set_header_attribute', $Document_set_header_attribute$53 = function $$set_header_attribute(name, value, overwrite) { - var $a, self = this, attrs = nil, $writer = nil; - - - - if (value == null) { - value = ""; - }; - - if (overwrite == null) { - overwrite = true; - }; - attrs = ($truthy($a = self.header_attributes) ? $a : self.attributes); - if ($truthy((($a = overwrite['$=='](false)) ? attrs['$key?'](name) : overwrite['$=='](false)))) { - return false - } else { - - - $writer = [name, value]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return true; - }; - }, $Document_set_header_attribute$53.$$arity = -2); - - Opal.def(self, '$convert', $Document_convert$54 = function $$convert(opts) { - var $a, $$55, self = this, $writer = nil, block = nil, output = nil, transform = nil, exts = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy(self.timings)) { - self.timings.$start("convert")}; - if ($truthy(self.parsed)) { - } else { - self.$parse() - }; - if ($truthy(($truthy($a = $rb_ge(self.safe, $$$($$($nesting, 'SafeMode'), 'SERVER'))) ? $a : opts['$empty?']()))) { - } else { - - if ($truthy((($writer = ["outfile", opts['$[]']("outfile")]), $send(self.attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))) { - } else { - self.attributes.$delete("outfile") - }; - if ($truthy((($writer = ["outdir", opts['$[]']("outdir")]), $send(self.attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))) { - } else { - self.attributes.$delete("outdir") - }; - }; - if (self.$doctype()['$==']("inline")) { - if ($truthy((block = ($truthy($a = self.blocks['$[]'](0)) ? $a : self.header)))) { - if ($truthy(($truthy($a = block.$content_model()['$==']("compound")) ? $a : block.$content_model()['$==']("empty")))) { - self.$logger().$warn("no inline candidate; use the inline doctype to convert a single paragragh, verbatim, or raw block") - } else { - output = block.$content() - }} - } else { - - if ($truthy(opts['$key?']("standalone"))) { - transform = (function() {if ($truthy(opts['$[]']("standalone"))) { - return "document" - } else { - return "embedded" - }; return nil; })() - } else if ($truthy(opts['$key?']("header_footer"))) { - transform = (function() {if ($truthy(opts['$[]']("header_footer"))) { - return "document" - } else { - return "embedded" - }; return nil; })() - } else { - transform = (function() {if ($truthy(self.options['$[]']("standalone"))) { - return "document" - } else { - return "embedded" - }; return nil; })() - }; - output = self.converter.$convert(self, transform); - }; - if ($truthy(self.parent_document)) { - } else if ($truthy(($truthy($a = (exts = self.extensions)) ? exts['$postprocessors?']() : $a))) { - $send(exts.$postprocessors(), 'each', [], ($$55 = function(ext){var self = $$55.$$s || this; - - - - if (ext == null) { - ext = nil; - }; - return (output = ext.$process_method()['$[]'](self, output));}, $$55.$$s = self, $$55.$$arity = 1, $$55))}; - if ($truthy(self.timings)) { - self.timings.$record("convert")}; - return output; - }, $Document_convert$54.$$arity = -1); - Opal.alias(self, "render", "convert"); - - Opal.def(self, '$write', $Document_write$56 = function $$write(output, target) { - var $a, $b, self = this; - - - if ($truthy(self.timings)) { - self.timings.$start("write")}; - if ($truthy($$($nesting, 'Writer')['$==='](self.converter))) { - self.converter.$write(output, target) - } else { - - if ($truthy(target['$respond_to?']("write"))) { - if ($truthy(output['$nil_or_empty?']())) { - } else { - - target.$write(output.$chomp()); - target.$write($$($nesting, 'LF')); - } - } else { - $$$('::', 'File').$write(target, output, $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')})) - }; - if ($truthy(($truthy($a = (($b = self.backend['$==']("manpage")) ? $$$('::', 'String')['$==='](target) : self.backend['$==']("manpage"))) ? self.converter.$class()['$respond_to?']("write_alternate_pages") : $a))) { - self.converter.$class().$write_alternate_pages(self.attributes['$[]']("mannames"), self.attributes['$[]']("manvolnum"), target)}; - }; - if ($truthy(self.timings)) { - self.timings.$record("write")}; - return nil; - }, $Document_write$56.$$arity = 2); - - Opal.def(self, '$content', $Document_content$57 = function $$content() { - var $iter = $Document_content$57.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Document_content$57.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - self.attributes.$delete("title"); - return $send(self, Opal.find_super_dispatcher(self, 'content', $Document_content$57, false), $zuper, $iter); - }, $Document_content$57.$$arity = 0); - - Opal.def(self, '$docinfo', $Document_docinfo$58 = function $$docinfo(location, suffix) { - var $$59, $a, $$60, self = this, qualifier = nil, docinfo = nil, content = nil, docinfo_file = nil, docinfo_dir = nil, docinfo_subs = nil, docinfo_path = nil, shared_docinfo = nil, private_docinfo = nil; - - - - if (location == null) { - location = "head"; - }; - - if (suffix == null) { - suffix = nil; - }; - if ($truthy($rb_lt(self.$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')))) { - - if (location['$==']("head")) { - } else { - qualifier = "" + "-" + (location) - }; - if ($truthy(suffix)) { - } else { - suffix = self.outfilesuffix - }; - if ($truthy((docinfo = self.attributes['$[]']("docinfo"))['$nil_or_empty?']())) { - if ($truthy(self.attributes['$key?']("docinfo2"))) { - docinfo = ["private", "shared"] - } else if ($truthy(self.attributes['$key?']("docinfo1"))) { - docinfo = ["shared"] - } else { - docinfo = (function() {if ($truthy(docinfo)) { - return ["private"] - } else { - return nil - }; return nil; })() - } - } else { - docinfo = $send(docinfo.$split(","), 'map', [], ($$59 = function(it){var self = $$59.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$strip();}, $$59.$$s = self, $$59.$$arity = 1, $$59)) - }; - if ($truthy(docinfo)) { - - content = []; - $a = ["" + "docinfo" + (qualifier) + (suffix), self.attributes['$[]']("docinfodir"), self.$resolve_docinfo_subs()], (docinfo_file = $a[0]), (docinfo_dir = $a[1]), (docinfo_subs = $a[2]), $a; - if ($truthy(docinfo['$&'](["shared", "" + "shared-" + (location)])['$empty?']())) { - } else { - - docinfo_path = self.$normalize_system_path(docinfo_file, docinfo_dir); - if ($truthy((shared_docinfo = self.$read_asset(docinfo_path, $hash2(["normalize"], {"normalize": true}))))) { - content['$<<'](self.$apply_subs(shared_docinfo, docinfo_subs))}; - }; - if ($truthy(($truthy($a = self.attributes['$[]']("docname")['$nil_or_empty?']()) ? $a : docinfo['$&'](["private", "" + "private-" + (location)])['$empty?']()))) { - } else { - - docinfo_path = self.$normalize_system_path("" + (self.attributes['$[]']("docname")) + "-" + (docinfo_file), docinfo_dir); - if ($truthy((private_docinfo = self.$read_asset(docinfo_path, $hash2(["normalize"], {"normalize": true}))))) { - content['$<<'](self.$apply_subs(private_docinfo, docinfo_subs))}; - };};}; - if ($truthy(($truthy($a = self.extensions) ? self['$docinfo_processors?'](location) : $a))) { - return ($truthy($a = content) ? $a : []).$concat($send(self.docinfo_processor_extensions['$[]'](location), 'map', [], ($$60 = function(ext){var self = $$60.$$s || this; - - - - if (ext == null) { - ext = nil; - }; - return ext.$process_method()['$[]'](self);}, $$60.$$s = self, $$60.$$arity = 1, $$60)).$compact()).$join($$($nesting, 'LF')) - } else if ($truthy(content)) { - return content.$join($$($nesting, 'LF')) - } else { - return "" - }; - }, $Document_docinfo$58.$$arity = -1); - - Opal.def(self, '$docinfo_processors?', $Document_docinfo_processors$ques$61 = function(location) { - var $a, self = this, $writer = nil; - - - - if (location == null) { - location = "head"; - }; - if ($truthy(self.docinfo_processor_extensions['$key?'](location))) { - return self.docinfo_processor_extensions['$[]'](location)['$!='](false) - } else if ($truthy(($truthy($a = self.extensions) ? self.document.$extensions()['$docinfo_processors?'](location) : $a))) { - return (($writer = [location, self.document.$extensions().$docinfo_processors(location)]), $send(self.docinfo_processor_extensions, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])['$!']()['$!']() - } else { - - $writer = [location, false]; - $send(self.docinfo_processor_extensions, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }; - }, $Document_docinfo_processors$ques$61.$$arity = -1); - - Opal.def(self, '$to_s', $Document_to_s$62 = function $$to_s() { - var self = this; - - return "" + "#<" + (self.$class()) + "@" + (self.$object_id()) + " {doctype: " + (self.$doctype().$inspect()) + ", doctitle: " + ((function() {if ($truthy(self.header['$!='](nil))) { - return self.header.$title() - } else { - return nil - }; return nil; })().$inspect()) + ", blocks: " + (self.blocks.$size()) + "}>" - }, $Document_to_s$62.$$arity = 0); - self.$private(); - - Opal.def(self, '$apply_attribute_value_subs', $Document_apply_attribute_value_subs$63 = function $$apply_attribute_value_subs(value) { - var $a, self = this; - - - if ($truthy($$($nesting, 'AttributeEntryPassMacroRx')['$=~'](value))) { - - value = (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)); - if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)))) { - value = self.$apply_subs(value, self.$resolve_pass_subs((($a = $gvars['~']) === nil ? nil : $a['$[]'](1))))}; - } else { - value = self.$apply_header_subs(value) - }; - if ($truthy(self.max_attribute_value_size)) { - - return self.$limit_bytesize(value, self.max_attribute_value_size); - } else { - return value - }; - }, $Document_apply_attribute_value_subs$63.$$arity = 1); - - Opal.def(self, '$limit_bytesize', $Document_limit_bytesize$64 = function $$limit_bytesize(str, max) { - var $a, self = this; - - - if ($truthy($rb_gt(str.$bytesize(), max))) { - while (!($truthy((str = str.$byteslice(0, max))['$valid_encoding?']()))) { - max = $rb_minus(max, 1) - }}; - return str; - }, $Document_limit_bytesize$64.$$arity = 2); - - Opal.def(self, '$resolve_docinfo_subs', $Document_resolve_docinfo_subs$65 = function $$resolve_docinfo_subs() { - var self = this; - - if ($truthy(self.attributes['$key?']("docinfosubs"))) { - - return self.$resolve_subs(self.attributes['$[]']("docinfosubs"), "block", nil, "docinfo"); - } else { - return ["attributes"] - } - }, $Document_resolve_docinfo_subs$65.$$arity = 0); - - Opal.def(self, '$create_converter', $Document_create_converter$66 = function $$create_converter(backend, delegate_backend) { - var $a, self = this, converter_opts = nil, template_dirs = nil, opts = nil, $writer = nil, converter = nil; - - - converter_opts = $hash2(["document", "htmlsyntax"], {"document": self, "htmlsyntax": self.attributes['$[]']("htmlsyntax")}); - if ($truthy((template_dirs = ($truthy($a = (opts = self.options)['$[]']("template_dirs")) ? $a : opts['$[]']("template_dir"))))) { - - - $writer = ["template_dirs", [].concat(Opal.to_a(template_dirs))]; - $send(converter_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["template_cache", opts.$fetch("template_cache", true)]; - $send(converter_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["template_engine", opts['$[]']("template_engine")]; - $send(converter_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["template_engine_options", opts['$[]']("template_engine_options")]; - $send(converter_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["eruby", opts['$[]']("eruby")]; - $send(converter_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["safe", self.safe]; - $send(converter_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(delegate_backend)) { - - $writer = ["delegate_backend", delegate_backend]; - $send(converter_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];};}; - if ($truthy((converter = opts['$[]']("converter")))) { - return $$$($$($nesting, 'Converter'), 'CustomFactory').$new($hash(backend, converter)).$create(backend, converter_opts) - } else { - return opts.$fetch("converter_factory", $$($nesting, 'Converter')).$create(backend, converter_opts) - }; - }, $Document_create_converter$66.$$arity = 2); - - Opal.def(self, '$clear_playback_attributes', $Document_clear_playback_attributes$67 = function $$clear_playback_attributes(attributes) { - var self = this; - - return attributes.$delete("attribute_entries") - }, $Document_clear_playback_attributes$67.$$arity = 1); - - Opal.def(self, '$save_attributes', $Document_save_attributes$68 = function $$save_attributes() { - var $a, $$69, self = this, attrs = nil, doctitle_val = nil, $writer = nil, toc_val = nil, toc_position_val = nil, toc_placement_val = nil, default_toc_position = nil, default_toc_class = nil, position = nil, $case = nil, icons_val = nil, basebackend = nil, syntax_hl_name = nil, syntax_hl_factory = nil, syntax_hls = nil; - - - if ($truthy(($truthy($a = (attrs = self.attributes)['$key?']("doctitle")) ? $a : (doctitle_val = self.$doctitle())['$!']()))) { - } else { - - $writer = ["doctitle", doctitle_val]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - self.id = ($truthy($a = self.id) ? $a : attrs['$[]']("css-signature")); - if ($truthy((toc_val = (function() {if ($truthy(attrs.$delete("toc2"))) { - return "left" - } else { - return attrs['$[]']("toc") - }; return nil; })()))) { - - toc_position_val = (function() {if ($truthy(($truthy($a = (toc_placement_val = attrs.$fetch("toc-placement", "macro"))) ? toc_placement_val['$!=']("auto") : $a))) { - return toc_placement_val - } else { - return attrs['$[]']("toc-position") - }; return nil; })(); - if ($truthy(($truthy($a = toc_val['$empty?']()) ? toc_position_val['$nil_or_empty?']() : $a))) { - } else { - - default_toc_position = "left"; - default_toc_class = "toc2"; - position = (function() {if ($truthy(toc_position_val['$nil_or_empty?']())) { - - if ($truthy(toc_val['$empty?']())) { - return default_toc_position - } else { - return toc_val - }; - } else { - return toc_position_val - }; return nil; })(); - - $writer = ["toc", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["toc-placement", "auto"]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - $case = position; - if ("left"['$===']($case) || "<"['$===']($case) || "<"['$===']($case)) { - $writer = ["toc-position", "left"]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - else if ("right"['$===']($case) || ">"['$===']($case) || ">"['$===']($case)) { - $writer = ["toc-position", "right"]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - else if ("top"['$===']($case) || "^"['$===']($case)) { - $writer = ["toc-position", "top"]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - else if ("bottom"['$===']($case) || "v"['$===']($case)) { - $writer = ["toc-position", "bottom"]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - else if ("preamble"['$===']($case) || "macro"['$===']($case)) { - - $writer = ["toc-position", "content"]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["toc-placement", position]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - default_toc_class = nil;} - else { - attrs.$delete("toc-position"); - default_toc_class = nil;}; - if ($truthy(default_toc_class)) { - ($truthy($a = attrs['$[]']("toc-class")) ? $a : (($writer = ["toc-class", default_toc_class]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))}; - };}; - if ($truthy(($truthy($a = (icons_val = attrs['$[]']("icons"))) ? attrs['$key?']("icontype")['$!']() : $a))) { - $case = icons_val; - if (""['$===']($case) || "font"['$===']($case)) {nil} - else { - - $writer = ["icons", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if (icons_val['$==']("image")) { - } else { - - $writer = ["icontype", icons_val]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - };}}; - if ($truthy((self.compat_mode = attrs['$key?']("compat-mode")))) { - if ($truthy(attrs['$key?']("language"))) { - - $writer = ["source-language", attrs['$[]']("language")]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}}; - if ($truthy(self.parent_document)) { - } else { - - if ((basebackend = attrs['$[]']("basebackend"))['$==']("html")) { - if ($truthy(($truthy($a = (syntax_hl_name = attrs['$[]']("source-highlighter"))) ? attrs['$[]']("" + (syntax_hl_name) + "-unavailable")['$!']() : $a))) { - if ($truthy((syntax_hl_factory = self.options['$[]']("syntax_highlighter_factory")))) { - self.syntax_highlighter = syntax_hl_factory.$create(syntax_hl_name, self.backend, $hash2(["document"], {"document": self})) - } else if ($truthy((syntax_hls = self.options['$[]']("syntax_highlighters")))) { - self.syntax_highlighter = $$$($$($nesting, 'SyntaxHighlighter'), 'DefaultFactoryProxy').$new(syntax_hls).$create(syntax_hl_name, self.backend, $hash2(["document"], {"document": self})) - } else { - self.syntax_highlighter = $$($nesting, 'SyntaxHighlighter').$create(syntax_hl_name, self.backend, $hash2(["document"], {"document": self})) - }} - } else if (basebackend['$==']("docbook")) { - - if ($truthy(($truthy($a = self['$attribute_locked?']("toc")) ? $a : self.attributes_modified['$include?']("toc")))) { - } else { - - $writer = ["toc", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy(($truthy($a = self['$attribute_locked?']("sectnums")) ? $a : self.attributes_modified['$include?']("sectnums")))) { - } else { - - $writer = ["sectnums", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - };}; - self.outfilesuffix = attrs['$[]']("outfilesuffix"); - $send($$($nesting, 'FLEXIBLE_ATTRIBUTES'), 'each', [], ($$69 = function(name){var self = $$69.$$s || this, $b; - if (self.attribute_overrides == null) self.attribute_overrides = nil; - - - - if (name == null) { - name = nil; - }; - if ($truthy(($truthy($b = self.attribute_overrides['$key?'](name)) ? self.attribute_overrides['$[]'](name) : $b))) { - return self.attribute_overrides.$delete(name) - } else { - return nil - };}, $$69.$$s = self, $$69.$$arity = 1, $$69)); - }; - return (self.header_attributes = attrs.$merge()); - }, $Document_save_attributes$68.$$arity = 0); - - Opal.def(self, '$fill_datetime_attributes', $Document_fill_datetime_attributes$70 = function $$fill_datetime_attributes(attrs, input_mtime) { - var $a, $b, self = this, now = nil, source_date_epoch = nil, localdate = nil, $writer = nil, localtime = nil, docdate = nil, doctime = nil; - - - now = (function() {if ($truthy($$$('::', 'ENV')['$key?']("SOURCE_DATE_EPOCH"))) { - - return (source_date_epoch = $$$('::', 'Time').$at(self.$Integer($$$('::', 'ENV')['$[]']("SOURCE_DATE_EPOCH"))).$utc()); - } else { - return $$$('::', 'Time').$now() - }; return nil; })(); - if ($truthy((localdate = attrs['$[]']("localdate")))) { - ($truthy($a = attrs['$[]']("localyear")) ? $a : (($writer = ["localyear", (function() {if (localdate.$index("-")['$=='](4)) { - - return localdate.$slice(0, 4); - } else { - return nil - }; return nil; })()]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - } else { - - localdate = (($writer = ["localdate", now.$strftime("%F")]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]); - ($truthy($a = attrs['$[]']("localyear")) ? $a : (($writer = ["localyear", now.$year().$to_s()]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - }; - localtime = ($truthy($a = attrs['$[]']("localtime")) ? $a : (($writer = ["localtime", now.$strftime("" + "%T " + ((function() {if (now.$utc_offset()['$=='](0)) { - return "UTC" - } else { - return "%z" - }; return nil; })()))]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - ($truthy($a = attrs['$[]']("localdatetime")) ? $a : (($writer = ["localdatetime", "" + (localdate) + " " + (localtime)]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - input_mtime = ($truthy($a = ($truthy($b = source_date_epoch) ? $b : input_mtime)) ? $a : now); - if ($truthy((docdate = attrs['$[]']("docdate")))) { - ($truthy($a = attrs['$[]']("docyear")) ? $a : (($writer = ["docyear", (function() {if (docdate.$index("-")['$=='](4)) { - - return docdate.$slice(0, 4); - } else { - return nil - }; return nil; })()]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - } else { - - docdate = (($writer = ["docdate", input_mtime.$strftime("%F")]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]); - ($truthy($a = attrs['$[]']("docyear")) ? $a : (($writer = ["docyear", input_mtime.$year().$to_s()]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - }; - doctime = ($truthy($a = attrs['$[]']("doctime")) ? $a : (($writer = ["doctime", input_mtime.$strftime("" + "%T " + ((function() {if (input_mtime.$utc_offset()['$=='](0)) { - return "UTC" - } else { - return "%z" - }; return nil; })()))]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - ($truthy($a = attrs['$[]']("docdatetime")) ? $a : (($writer = ["docdatetime", "" + (docdate) + " " + (doctime)]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - return nil; - }, $Document_fill_datetime_attributes$70.$$arity = 2); - - Opal.def(self, '$update_backend_attributes', $Document_update_backend_attributes$71 = function $$update_backend_attributes(new_backend, init) { - var $a, $b, self = this, current_backend = nil, current_basebackend = nil, attrs = nil, current_doctype = nil, actual_backend = nil, _ = nil, $writer = nil, delegate_backend = nil, converter = nil, new_basebackend = nil, new_filetype = nil, htmlsyntax = nil, backend_traits = nil, current_filetype = nil, page_width = nil; - - - - if (init == null) { - init = nil; - }; - if ($truthy(($truthy($a = init) ? $a : new_backend['$!='](self.backend)))) { - - current_backend = self.backend; - current_basebackend = (attrs = self.attributes)['$[]']("basebackend"); - current_doctype = self.doctype; - if ($truthy(new_backend['$include?'](":"))) { - $b = new_backend.$partition(":"), $a = Opal.to_ary($b), (actual_backend = ($a[0] == null ? nil : $a[0])), (_ = ($a[1] == null ? nil : $a[1])), (new_backend = ($a[2] == null ? nil : $a[2])), $b}; - if ($truthy(new_backend['$start_with?']("xhtml"))) { - - - $writer = ["htmlsyntax", "xml"]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - new_backend = new_backend.$slice(1, new_backend.$length()); - } else if ($truthy(new_backend['$start_with?']("html"))) { - ($truthy($a = attrs['$[]']("htmlsyntax")) ? $a : (($writer = ["htmlsyntax", "html"]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))}; - new_backend = ($truthy($a = $$($nesting, 'BACKEND_ALIASES')['$[]'](new_backend)) ? $a : new_backend); - if ($truthy(actual_backend)) { - $a = [actual_backend, new_backend], (new_backend = $a[0]), (delegate_backend = $a[1]), $a}; - if ($truthy(current_doctype)) { - - if ($truthy(current_backend)) { - - attrs.$delete("" + "backend-" + (current_backend)); - attrs.$delete("" + "backend-" + (current_backend) + "-doctype-" + (current_doctype));}; - - $writer = ["" + "backend-" + (new_backend) + "-doctype-" + (current_doctype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["" + "doctype-" + (current_doctype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else if ($truthy(current_backend)) { - attrs.$delete("" + "backend-" + (current_backend))}; - - $writer = ["" + "backend-" + (new_backend), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - self.backend = (($writer = ["backend", new_backend]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]); - if ($truthy($$$($$($nesting, 'Converter'), 'BackendTraits')['$===']((converter = self.$create_converter(new_backend, delegate_backend))))) { - - new_basebackend = converter.$basebackend(); - new_filetype = converter.$filetype(); - if ($truthy((htmlsyntax = converter.$htmlsyntax()))) { - - $writer = ["htmlsyntax", htmlsyntax]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(init)) { - ($truthy($a = attrs['$[]']("outfilesuffix")) ? $a : (($writer = ["outfilesuffix", converter.$outfilesuffix()]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - } else if ($truthy(self['$attribute_locked?']("outfilesuffix"))) { - } else { - - $writer = ["outfilesuffix", converter.$outfilesuffix()]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - } else if ($truthy(converter)) { - - backend_traits = $$($nesting, 'Converter').$derive_backend_traits(new_backend); - new_basebackend = backend_traits['$[]']("basebackend"); - new_filetype = backend_traits['$[]']("filetype"); - if ($truthy(init)) { - ($truthy($a = attrs['$[]']("outfilesuffix")) ? $a : (($writer = ["outfilesuffix", backend_traits['$[]']("outfilesuffix")]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - } else if ($truthy(self['$attribute_locked?']("outfilesuffix"))) { - } else { - - $writer = ["outfilesuffix", backend_traits['$[]']("outfilesuffix")]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - } else { - self.$raise($$$('::', 'NotImplementedError'), "" + "asciidoctor: FAILED: missing converter for backend '" + (new_backend) + "'. Processing aborted.") - }; - self.converter = converter; - if ($truthy((current_filetype = attrs['$[]']("filetype")))) { - attrs.$delete("" + "filetype-" + (current_filetype))}; - - $writer = ["filetype", new_filetype]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["" + "filetype-" + (new_filetype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy((page_width = $$($nesting, 'DEFAULT_PAGE_WIDTHS')['$[]'](new_basebackend)))) { - - $writer = ["pagewidth", page_width]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - attrs.$delete("pagewidth") - }; - if ($truthy(new_basebackend['$!='](current_basebackend))) { - - if ($truthy(current_doctype)) { - - if ($truthy(current_basebackend)) { - - attrs.$delete("" + "basebackend-" + (current_basebackend)); - attrs.$delete("" + "basebackend-" + (current_basebackend) + "-doctype-" + (current_doctype));}; - - $writer = ["" + "basebackend-" + (new_basebackend) + "-doctype-" + (current_doctype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else if ($truthy(current_basebackend)) { - attrs.$delete("" + "basebackend-" + (current_basebackend))}; - - $writer = ["" + "basebackend-" + (new_basebackend), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["basebackend", new_basebackend]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - return new_backend; - } else { - return nil - }; - }, $Document_update_backend_attributes$71.$$arity = -2); - return (Opal.def(self, '$update_doctype_attributes', $Document_update_doctype_attributes$72 = function $$update_doctype_attributes(new_doctype) { - var $a, self = this, attrs = nil, current_backend = nil, current_basebackend = nil, current_doctype = nil, $writer = nil; - - if ($truthy(($truthy($a = new_doctype) ? new_doctype['$!='](self.doctype) : $a))) { - - $a = [self.backend, (attrs = self.attributes)['$[]']("basebackend"), self.doctype], (current_backend = $a[0]), (current_basebackend = $a[1]), (current_doctype = $a[2]), $a; - if ($truthy(current_doctype)) { - - attrs.$delete("" + "doctype-" + (current_doctype)); - if ($truthy(current_backend)) { - - attrs.$delete("" + "backend-" + (current_backend) + "-doctype-" + (current_doctype)); - - $writer = ["" + "backend-" + (current_backend) + "-doctype-" + (new_doctype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - if ($truthy(current_basebackend)) { - - attrs.$delete("" + "basebackend-" + (current_basebackend) + "-doctype-" + (current_doctype)); - - $writer = ["" + "basebackend-" + (current_basebackend) + "-doctype-" + (new_doctype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - } else { - - if ($truthy(current_backend)) { - - $writer = ["" + "backend-" + (current_backend) + "-doctype-" + (new_doctype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(current_basebackend)) { - - $writer = ["" + "basebackend-" + (current_basebackend) + "-doctype-" + (new_doctype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - }; - - $writer = ["" + "doctype-" + (new_doctype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return (self.doctype = (($writer = ["doctype", new_doctype]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - } else { - return nil - } - }, $Document_update_doctype_attributes$72.$$arity = 1), nil) && 'update_doctype_attributes'; - })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/inline"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy; - - Opal.add_stubs(['$attr_accessor', '$attr_reader', '$[]', '$convert', '$converter', '$attr', '$==', '$apply_reftext_subs', '$reftext']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Inline'); - - var $nesting = [self].concat($parent_nesting), $Inline_initialize$1, $Inline_block$ques$2, $Inline_inline$ques$3, $Inline_convert$4, $Inline_alt$5, $Inline_reftext$ques$6, $Inline_reftext$7, $Inline_xreftext$8; - - self.$$prototype.text = self.$$prototype.type = nil; - - self.$attr_accessor("text"); - self.$attr_reader("type"); - self.$attr_accessor("target"); - - Opal.def(self, '$initialize', $Inline_initialize$1 = function $$initialize(parent, context, text, opts) { - var $iter = $Inline_initialize$1.$$p, $yield = $iter || nil, self = this; - - if ($iter) $Inline_initialize$1.$$p = null; - - - if (text == null) { - text = nil; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $Inline_initialize$1, false), [parent, context, opts], null); - self.node_name = "" + "inline_" + (context); - self.text = text; - self.id = opts['$[]']("id"); - self.type = opts['$[]']("type"); - return (self.target = opts['$[]']("target")); - }, $Inline_initialize$1.$$arity = -3); - - Opal.def(self, '$block?', $Inline_block$ques$2 = function() { - var self = this; - - return false - }, $Inline_block$ques$2.$$arity = 0); - - Opal.def(self, '$inline?', $Inline_inline$ques$3 = function() { - var self = this; - - return true - }, $Inline_inline$ques$3.$$arity = 0); - - Opal.def(self, '$convert', $Inline_convert$4 = function $$convert() { - var self = this; - - return self.$converter().$convert(self) - }, $Inline_convert$4.$$arity = 0); - Opal.alias(self, "render", "convert"); - - Opal.def(self, '$alt', $Inline_alt$5 = function $$alt() { - var $a, self = this; - - return ($truthy($a = self.$attr("alt")) ? $a : "") - }, $Inline_alt$5.$$arity = 0); - - Opal.def(self, '$reftext?', $Inline_reftext$ques$6 = function() { - var $a, $b, self = this; - - return ($truthy($a = self.text) ? ($truthy($b = self.type['$==']("ref")) ? $b : self.type['$==']("bibref")) : $a) - }, $Inline_reftext$ques$6.$$arity = 0); - - Opal.def(self, '$reftext', $Inline_reftext$7 = function $$reftext() { - var self = this, val = nil; - - if ($truthy((val = self.text))) { - - return self.$apply_reftext_subs(val); - } else { - return nil - } - }, $Inline_reftext$7.$$arity = 0); - return (Opal.def(self, '$xreftext', $Inline_xreftext$8 = function $$xreftext(xrefstyle) { - var self = this; - - - - if (xrefstyle == null) { - xrefstyle = nil; - }; - return self.$reftext(); - }, $Inline_xreftext$8.$$arity = -1), nil) && 'xreftext'; - })($nesting[0], $$($nesting, 'AbstractNode'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/list"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy; - - Opal.add_stubs(['$==', '$next_list', '$callouts', '$class', '$object_id', '$inspect', '$size', '$items', '$attr_accessor', '$level', '$drop', '$nil_or_empty?', '$apply_subs', '$empty?', '$===', '$[]', '$outline?', '$!', '$simple?', '$source', '$shift', '$context', '$parent']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'List'); - - var $nesting = [self].concat($parent_nesting), $List_initialize$1, $List_outline$ques$2, $List_convert$3, $List_to_s$4; - - self.$$prototype.context = self.$$prototype.document = self.$$prototype.style = nil; - - Opal.alias(self, "items", "blocks"); - Opal.alias(self, "content", "blocks"); - Opal.alias(self, "items?", "blocks?"); - - Opal.def(self, '$initialize', $List_initialize$1 = function $$initialize(parent, context, opts) { - var $iter = $List_initialize$1.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $List_initialize$1.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if (opts == null) { - opts = $hash2([], {}); - }; - return $send(self, Opal.find_super_dispatcher(self, 'initialize', $List_initialize$1, false), $zuper, $iter); - }, $List_initialize$1.$$arity = -3); - - Opal.def(self, '$outline?', $List_outline$ques$2 = function() { - var $a, self = this; - - return ($truthy($a = self.context['$==']("ulist")) ? $a : self.context['$==']("olist")) - }, $List_outline$ques$2.$$arity = 0); - - Opal.def(self, '$convert', $List_convert$3 = function $$convert() { - var $iter = $List_convert$3.$$p, $yield = $iter || nil, self = this, result = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $List_convert$3.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if (self.context['$==']("colist")) { - - result = $send(self, Opal.find_super_dispatcher(self, 'convert', $List_convert$3, false), $zuper, $iter); - self.document.$callouts().$next_list(); - return result; - } else { - return $send(self, Opal.find_super_dispatcher(self, 'convert', $List_convert$3, false), $zuper, $iter) - } - }, $List_convert$3.$$arity = 0); - Opal.alias(self, "render", "convert"); - return (Opal.def(self, '$to_s', $List_to_s$4 = function $$to_s() { - var self = this; - - return "" + "#<" + (self.$class()) + "@" + (self.$object_id()) + " {context: " + (self.context.$inspect()) + ", style: " + (self.style.$inspect()) + ", items: " + (self.$items().$size()) + "}>" - }, $List_to_s$4.$$arity = 0), nil) && 'to_s'; - })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'ListItem'); - - var $nesting = [self].concat($parent_nesting), $ListItem_initialize$5, $ListItem_text$ques$6, $ListItem_text$7, $ListItem_text$eq$8, $ListItem_simple$ques$9, $ListItem_compound$ques$10, $ListItem_fold_first$11, $ListItem_to_s$12; - - self.$$prototype.text = self.$$prototype.subs = self.$$prototype.blocks = nil; - - Opal.alias(self, "list", "parent"); - self.$attr_accessor("marker"); - - Opal.def(self, '$initialize', $ListItem_initialize$5 = function $$initialize(parent, text) { - var $iter = $ListItem_initialize$5.$$p, $yield = $iter || nil, self = this; - - if ($iter) $ListItem_initialize$5.$$p = null; - - - if (text == null) { - text = nil; - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $ListItem_initialize$5, false), [parent, "list_item"], null); - self.text = text; - self.level = parent.$level(); - return (self.subs = $$($nesting, 'NORMAL_SUBS').$drop(0)); - }, $ListItem_initialize$5.$$arity = -2); - - Opal.def(self, '$text?', $ListItem_text$ques$6 = function() { - var self = this; - - if ($truthy(self.text['$nil_or_empty?']())) { - return false - } else { - return true - } - }, $ListItem_text$ques$6.$$arity = 0); - - Opal.def(self, '$text', $ListItem_text$7 = function $$text() { - var $a, self = this; - - return ($truthy($a = self.text) ? self.$apply_subs(self.text, self.subs) : $a) - }, $ListItem_text$7.$$arity = 0); - - Opal.def(self, '$text=', $ListItem_text$eq$8 = function(val) { - var self = this; - - return (self.text = val) - }, $ListItem_text$eq$8.$$arity = 1); - - Opal.def(self, '$simple?', $ListItem_simple$ques$9 = function() { - var $a, $b, $c, self = this, blk = nil; - - return ($truthy($a = self.blocks['$empty?']()) ? $a : ($truthy($b = (($c = self.blocks.$size()['$=='](1)) ? $$($nesting, 'List')['$===']((blk = self.blocks['$[]'](0))) : self.blocks.$size()['$=='](1))) ? blk['$outline?']() : $b)) - }, $ListItem_simple$ques$9.$$arity = 0); - - Opal.def(self, '$compound?', $ListItem_compound$ques$10 = function() { - var self = this; - - return self['$simple?']()['$!']() - }, $ListItem_compound$ques$10.$$arity = 0); - - Opal.def(self, '$fold_first', $ListItem_fold_first$11 = function $$fold_first() { - var self = this; - - - self.text = (function() {if ($truthy(self.text['$nil_or_empty?']())) { - return self.blocks.$shift().$source() - } else { - return "" + (self.text) + ($$($nesting, 'LF')) + (self.blocks.$shift().$source()) - }; return nil; })(); - return nil; - }, $ListItem_fold_first$11.$$arity = 0); - return (Opal.def(self, '$to_s', $ListItem_to_s$12 = function $$to_s() { - var $a, self = this; - - return "" + "#<" + (self.$class()) + "@" + (self.$object_id()) + " {list_context: " + (self.$parent().$context().$inspect()) + ", text: " + (self.text.$inspect()) + ", blocks: " + (($truthy($a = self.blocks) ? $a : []).$size()) + "}>" - }, $ListItem_to_s$12.$$arity = 0), nil) && 'to_s'; - })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/parser"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $hash2 = Opal.hash2, $gvars = Opal.gvars; - - Opal.add_stubs(['$include', '$new', '$proc', '$start_with?', '$match?', '$is_delimited_block?', '$private_class_method', '$parse_document_header', '$[]', '$has_more_lines?', '$next_section', '$assign_numeral', '$<<', '$blocks', '$skip_blank_lines', '$parse_block_metadata_lines', '$attributes', '$is_next_line_doctitle?', '$finalize_header', '$nil_or_empty?', '$title=', '$-', '$sourcemap', '$cursor', '$parse_section_title', '$id=', '$include?', '$sub_specialchars', '$[]=', '$sub_attributes', '$source_location=', '$header', '$attribute_locked?', '$id', '$clear', '$delete', '$instance_variable_get', '$parse_header_metadata', '$==', '$!', '$register', '$doctype', '$parse_manpage_header', '$=~', '$downcase', '$error', '$logger', '$message_with_context', '$cursor_at_line', '$backend', '$save', '$update', '$is_next_line_section?', '$initialize_section', '$join', '$map', '$read_lines_until', '$lstrip', '$split', '$title', '$restore_save', '$discard_save', '$context', '$empty?', '$header?', '$!=', '$attr?', '$attr', '$key?', '$document', '$+', '$level', '$special', '$sectname', '$to_i', '$<', '$>', '$warn', '$next_block', '$blocks?', '$style', '$context=', '$style=', '$parent=', '$size', '$content_model', '$shift', '$unwrap_standalone_preamble', '$source_location', '$merge', '$fetch', '$parse_block_metadata_line', '$extensions', '$block_macros?', '$mark', '$read_line', '$terminator', '$to_s', '$masq', '$to_sym', '$registered_for_block?', '$debug?', '$debug', '$cursor_at_mark', '$strict_verbatim_paragraphs', '$unshift_line', '$markdown_syntax', '$keys', '$chr', '$uniform?', '$length', '$end_with?', '$===', '$parse_attributes', '$attribute_missing', '$tr', '$basename', '$assign_caption', '$registered_for_block_macro?', '$config', '$process_method', '$replace', '$parse_callout_list', '$callouts', '$parse_list', '$parse_description_list', '$underline_style_section_titles', '$is_section_title?', '$peek_line', '$atx_section_title?', '$generate_id', '$level=', '$read_paragraph_lines', '$adjust_indentation!', '$map!', '$slice', '$pop', '$build_block', '$apply_subs', '$chop', '$catalog_inline_anchors', '$rekey', '$index', '$strip', '$parse_table', '$each', '$raise', '$title?', '$update_attributes', '$commit_subs', '$sub?', '$catalog_callouts', '$source', '$remove_sub', '$block_terminates_paragraph', '$to_proc', '$nil?', '$lines', '$parse_blocks', '$parse_list_item', '$items', '$scan', '$gsub', '$count', '$advance', '$dup', '$match', '$callout_ids', '$next_list', '$catalog_inline_anchor', '$marker=', '$catalog_inline_biblio_anchor', '$set_option', '$text=', '$resolve_ordered_list_marker', '$read_lines_for_list_item', '$skip_line_comments', '$unshift_lines', '$fold_first', '$text?', '$is_sibling_list_item?', '$concat', '$find', '$casecmp', '$sectname=', '$special=', '$numbered=', '$numbered', '$lineno', '$peek_lines', '$setext_section_title?', '$abs', '$cursor_at_prev_line', '$process_attribute_entries', '$next_line_empty?', '$process_authors', '$apply_header_subs', '$rstrip', '$each_with_index', '$compact', '$squeeze', '$to_a', '$parse_style_attribute', '$process_attribute_entry', '$skip_comment_lines', '$store_attribute', '$sanitize_attribute_name', '$set_attribute', '$save_to', '$delete_attribute', '$ord', '$int_to_roman', '$resolve_list_marker', '$parse_colspecs', '$create_columns', '$has_header_option=', '$format', '$starts_with_delimiter?', '$close_open_cell', '$parse_cellspec', '$delimiter', '$match_delimiter', '$pre_match', '$post_match', '$buffer_has_unclosed_quotes?', '$skip_past_delimiter', '$buffer', '$buffer=', '$skip_past_escaped_delimiter', '$keep_cell_open', '$push_cellspec', '$close_cell', '$cell_open?', '$columns', '$assign_column_widths', '$partition_header_footer', '$upto', '$partition', '$shorthand_property_syntax', '$each_char', '$yield_buffered_attribute', '$any?', '$*', '$each_byte', '$%']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Parser'); - - var $nesting = [self].concat($parent_nesting), $Parser$1, $Parser$2, $Parser$3, $Parser_parse$4, $Parser_parse_document_header$5, $Parser_parse_manpage_header$6, $Parser_next_section$9, $Parser_next_block$10, $Parser_read_paragraph_lines$14, $Parser_is_delimited_block$ques$15, $Parser_build_block$16, $Parser_parse_blocks$17, $Parser_parse_list$18, $Parser_catalog_callouts$19, $Parser_catalog_inline_anchor$21, $Parser_catalog_inline_anchors$22, $Parser_catalog_inline_biblio_anchor$24, $Parser_parse_description_list$25, $Parser_parse_callout_list$26, $Parser_parse_list_item$27, $Parser_read_lines_for_list_item$28, $Parser_initialize_section$34, $Parser_is_next_line_section$ques$35, $Parser_is_next_line_doctitle$ques$36, $Parser_is_section_title$ques$37, $Parser_atx_section_title$ques$38, $Parser_setext_section_title$ques$39, $Parser_parse_section_title$40, $Parser_parse_header_metadata$41, $Parser_process_authors$46, $Parser_parse_block_metadata_lines$51, $Parser_parse_block_metadata_line$52, $Parser_process_attribute_entries$53, $Parser_process_attribute_entry$54, $Parser_store_attribute$55, $Parser_resolve_list_marker$56, $Parser_resolve_ordered_list_marker$57, $Parser_is_sibling_list_item$ques$59, $Parser_parse_table$60, $Parser_parse_colspecs$61, $Parser_parse_cellspec$65, $Parser_parse_style_attribute$66, $Parser_yield_buffered_attribute$69, $Parser_adjust_indentation$excl$70, $Parser_uniform$ques$79, $Parser_sanitize_attribute_name$80; - - - self.$include($$($nesting, 'Logging')); - Opal.const_set($nesting[0], 'BlockMatchData', $$($nesting, 'Struct').$new("context", "masq", "tip", "terminator")); - Opal.const_set($nesting[0], 'TAB', "\t"); - Opal.const_set($nesting[0], 'TabIndentRx', /^\t+/); - Opal.const_set($nesting[0], 'StartOfBlockProc', $send(self, 'proc', [], ($Parser$1 = function(l){var self = $Parser$1.$$s || this, $a, $b; - - - - if (l == null) { - l = nil; - }; - return ($truthy($a = ($truthy($b = l['$start_with?']("[")) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](l) : $b)) ? $a : self['$is_delimited_block?'](l));}, $Parser$1.$$s = self, $Parser$1.$$arity = 1, $Parser$1))); - Opal.const_set($nesting[0], 'StartOfListProc', $send(self, 'proc', [], ($Parser$2 = function(l){var self = $Parser$2.$$s || this; - - - - if (l == null) { - l = nil; - }; - return $$($nesting, 'AnyListRx')['$match?'](l);}, $Parser$2.$$s = self, $Parser$2.$$arity = 1, $Parser$2))); - Opal.const_set($nesting[0], 'StartOfBlockOrListProc', $send(self, 'proc', [], ($Parser$3 = function(l){var self = $Parser$3.$$s || this, $a, $b, $c; - - - - if (l == null) { - l = nil; - }; - return ($truthy($a = ($truthy($b = self['$is_delimited_block?'](l)) ? $b : ($truthy($c = l['$start_with?']("[")) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](l) : $c))) ? $a : $$($nesting, 'AnyListRx')['$match?'](l));}, $Parser$3.$$s = self, $Parser$3.$$arity = 1, $Parser$3))); - Opal.const_set($nesting[0], 'NoOp', nil); - Opal.const_set($nesting[0], 'AuthorKeys', ["author", "authorinitials", "firstname", "middlename", "lastname", "email"]); - Opal.const_set($nesting[0], 'TableCellHorzAlignments', $hash2(["<", ">", "^"], {"<": "left", ">": "right", "^": "center"})); - Opal.const_set($nesting[0], 'TableCellVertAlignments', $hash2(["<", ">", "^"], {"<": "top", ">": "bottom", "^": "middle"})); - Opal.const_set($nesting[0], 'TableCellStyles', $hash2(["d", "s", "e", "m", "h", "l", "a"], {"d": "none", "s": "strong", "e": "emphasis", "m": "monospaced", "h": "header", "l": "literal", "a": "asciidoc"})); - self.$private_class_method("new"); - Opal.defs(self, '$parse', $Parser_parse$4 = function $$parse(reader, document, options) { - var $a, $b, $c, self = this, block_attributes = nil, new_section = nil; - - - - if (options == null) { - options = $hash2([], {}); - }; - block_attributes = self.$parse_document_header(reader, document); - if ($truthy(options['$[]']("header_only"))) { - } else { - while ($truthy(reader['$has_more_lines?']())) { - - $c = self.$next_section(reader, document, block_attributes), $b = Opal.to_ary($c), (new_section = ($b[0] == null ? nil : $b[0])), (block_attributes = ($b[1] == null ? nil : $b[1])), $c; - if ($truthy(new_section)) { - - document.$assign_numeral(new_section); - document.$blocks()['$<<'](new_section);}; - } - }; - return document; - }, $Parser_parse$4.$$arity = -3); - Opal.defs(self, '$parse_document_header', $Parser_parse_document_header$5 = function $$parse_document_header(reader, document) { - var $a, $b, self = this, block_attrs = nil, doc_attrs = nil, implicit_doctitle = nil, val = nil, $writer = nil, doctitle_attr_val = nil, source_location = nil, _ = nil, l0_section_title = nil, atx = nil, separator = nil, doc_id = nil, role = nil, reftext = nil, modified_attrs = nil; - - - block_attrs = (function() {if ($truthy(reader.$skip_blank_lines())) { - - return self.$parse_block_metadata_lines(reader, document); - } else { - return $hash2([], {}) - }; return nil; })(); - doc_attrs = document.$attributes(); - if ($truthy(($truthy($a = (implicit_doctitle = self['$is_next_line_doctitle?'](reader, block_attrs, doc_attrs['$[]']("leveloffset")))) ? block_attrs['$[]']("title") : $a))) { - return document.$finalize_header(block_attrs, false)}; - if ($truthy((val = doc_attrs['$[]']("doctitle"))['$nil_or_empty?']())) { - } else { - - $writer = [(doctitle_attr_val = val)]; - $send(document, 'title=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy(implicit_doctitle)) { - - if ($truthy(document.$sourcemap())) { - source_location = reader.$cursor()}; - $b = self.$parse_section_title(reader, document), $a = Opal.to_ary($b), document['$id='](($a[0] == null ? nil : $a[0])), (_ = ($a[1] == null ? nil : $a[1])), (l0_section_title = ($a[2] == null ? nil : $a[2])), (_ = ($a[3] == null ? nil : $a[3])), (atx = ($a[4] == null ? nil : $a[4])), $b; - if ($truthy(doctitle_attr_val)) { - l0_section_title = nil - } else { - - - $writer = [l0_section_title]; - $send(document, 'title=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy((($writer = ["doctitle", (doctitle_attr_val = document.$sub_specialchars(l0_section_title))]), $send(doc_attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - - $writer = ["doctitle", (doctitle_attr_val = document.$sub_attributes(doctitle_attr_val, $hash2(["attribute_missing"], {"attribute_missing": "skip"})))]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - }; - if ($truthy(source_location)) { - - $writer = [source_location]; - $send(document.$header(), 'source_location=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(($truthy($a = atx) ? $a : document['$attribute_locked?']("compat-mode")))) { - } else { - - $writer = ["compat-mode", ""]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy((separator = block_attrs['$[]']("separator")))) { - if ($truthy(document['$attribute_locked?']("title-separator"))) { - } else { - - $writer = ["title-separator", separator]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }}; - if ($truthy((doc_id = block_attrs['$[]']("id")))) { - - $writer = [doc_id]; - $send(document, 'id=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - doc_id = document.$id() - }; - if ($truthy((role = block_attrs['$[]']("role")))) { - - $writer = ["role", role]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy((reftext = block_attrs['$[]']("reftext")))) { - - $writer = ["reftext", reftext]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - block_attrs.$clear(); - (modified_attrs = document.$instance_variable_get("@attributes_modified")).$delete("doctitle"); - self.$parse_header_metadata(reader, document); - if ($truthy(modified_attrs['$include?']("doctitle"))) { - if ($truthy(($truthy($a = (val = doc_attrs['$[]']("doctitle"))['$nil_or_empty?']()) ? $a : val['$=='](doctitle_attr_val)))) { - - $writer = ["doctitle", doctitle_attr_val]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = [val]; - $send(document, 'title=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } - } else if ($truthy(l0_section_title['$!']())) { - modified_attrs['$<<']("doctitle")}; - if ($truthy(doc_id)) { - document.$register("refs", [doc_id, document])};}; - if (document.$doctype()['$==']("manpage")) { - self.$parse_manpage_header(reader, document, block_attrs)}; - return document.$finalize_header(block_attrs); - }, $Parser_parse_document_header$5.$$arity = 2); - Opal.defs(self, '$parse_manpage_header', $Parser_parse_manpage_header$6 = function $$parse_manpage_header(reader, document, block_attributes) { - var $a, $b, $$7, $$8, self = this, doc_attrs = nil, $writer = nil, manvolnum = nil, mantitle = nil, manname = nil, name_section_level = nil, name_section = nil, name_section_buffer = nil, mannames = nil, manpurpose = nil, error_msg = nil; - - - if ($truthy($$($nesting, 'ManpageTitleVolnumRx')['$=~']((doc_attrs = document.$attributes())['$[]']("doctitle")))) { - - - $writer = ["manvolnum", (manvolnum = (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)))]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["mantitle", (function() {if ($truthy((mantitle = (($a = $gvars['~']) === nil ? nil : $a['$[]'](1)))['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - - return document.$sub_attributes(mantitle); - } else { - return mantitle - }; return nil; })().$downcase()]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - - self.$logger().$error(self.$message_with_context("non-conforming manpage title", $hash2(["source_location"], {"source_location": reader.$cursor_at_line(1)}))); - - $writer = ["mantitle", ($truthy($a = ($truthy($b = doc_attrs['$[]']("doctitle")) ? $b : doc_attrs['$[]']("docname"))) ? $a : "command")]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["manvolnum", (manvolnum = "1")]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }; - if ($truthy(($truthy($a = (manname = doc_attrs['$[]']("manname"))) ? doc_attrs['$[]']("manpurpose") : $a))) { - - ($truthy($a = doc_attrs['$[]']("manname-title")) ? $a : (($writer = ["manname-title", "Name"]), $send(doc_attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - - $writer = ["mannames", [manname]]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if (document.$backend()['$==']("manpage")) { - - - $writer = ["docname", manname]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["outfilesuffix", "" + "." + (manvolnum)]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - } else { - - reader.$skip_blank_lines(); - reader.$save(); - block_attributes.$update(self.$parse_block_metadata_lines(reader, document)); - if ($truthy((name_section_level = self['$is_next_line_section?'](reader, $hash2([], {}))))) { - if (name_section_level['$=='](1)) { - - name_section = self.$initialize_section(reader, document, $hash2([], {})); - name_section_buffer = $send(reader.$read_lines_until($hash2(["break_on_blank_lines", "skip_line_comments"], {"break_on_blank_lines": true, "skip_line_comments": true})), 'map', [], ($$7 = function(l){var self = $$7.$$s || this; - - - - if (l == null) { - l = nil; - }; - return l.$lstrip();}, $$7.$$s = self, $$7.$$arity = 1, $$7)).$join(" "); - if ($truthy($$($nesting, 'ManpageNamePurposeRx')['$=~'](name_section_buffer))) { - - if ($truthy((manname = (($a = $gvars['~']) === nil ? nil : $a['$[]'](1)))['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - manname = document.$sub_attributes(manname)}; - if ($truthy(manname['$include?'](","))) { - manname = (mannames = $send(manname.$split(","), 'map', [], ($$8 = function(n){var self = $$8.$$s || this; - - - - if (n == null) { - n = nil; - }; - return n.$lstrip();}, $$8.$$s = self, $$8.$$arity = 1, $$8)))['$[]'](0) - } else { - mannames = [manname] - }; - if ($truthy((manpurpose = (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)))['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - manpurpose = document.$sub_attributes(manpurpose)}; - ($truthy($a = doc_attrs['$[]']("manname-title")) ? $a : (($writer = ["manname-title", name_section.$title()]), $send(doc_attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy(name_section.$id())) { - - $writer = ["manname-id", name_section.$id()]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - - $writer = ["manname", manname]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["mannames", mannames]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["manpurpose", manpurpose]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if (document.$backend()['$==']("manpage")) { - - - $writer = ["docname", manname]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["outfilesuffix", "" + "." + (manvolnum)]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - } else { - error_msg = "non-conforming name section body" - }; - } else { - error_msg = "name section must be at level 1" - } - } else { - error_msg = "name section expected" - }; - if ($truthy(error_msg)) { - - reader.$restore_save(); - self.$logger().$error(self.$message_with_context(error_msg, $hash2(["source_location"], {"source_location": reader.$cursor()}))); - - $writer = ["manname", (manname = ($truthy($a = doc_attrs['$[]']("docname")) ? $a : "command"))]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["mannames", [manname]]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if (document.$backend()['$==']("manpage")) { - - - $writer = ["docname", manname]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["outfilesuffix", "" + "." + (manvolnum)]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - } else { - reader.$discard_save() - }; - }; - return nil; - }, $Parser_parse_manpage_header$6.$$arity = 3); - Opal.defs(self, '$next_section', $Parser_next_section$9 = function $$next_section(reader, parent, attributes) { - var $a, $b, $c, $d, self = this, preamble = nil, intro = nil, part = nil, has_header = nil, book = nil, document = nil, $writer = nil, section = nil, current_level = nil, expected_next_level = nil, expected_next_level_alt = nil, title = nil, sectname = nil, next_level = nil, expected_condition = nil, new_section = nil, block_cursor = nil, new_block = nil, first_block = nil, child_block = nil; - - - - if (attributes == null) { - attributes = $hash2([], {}); - }; - preamble = (intro = (part = false)); - if ($truthy(($truthy($a = (($b = parent.$context()['$==']("document")) ? parent.$blocks()['$empty?']() : parent.$context()['$==']("document"))) ? ($truthy($b = ($truthy($c = (has_header = parent['$header?']())) ? $c : attributes.$delete("invalid-header"))) ? $b : self['$is_next_line_section?'](reader, attributes)['$!']()) : $a))) { - - book = (document = parent).$doctype()['$==']("book"); - if ($truthy(($truthy($a = has_header) ? $a : ($truthy($b = book) ? attributes['$[]'](1)['$!=']("abstract") : $b)))) { - - preamble = (intro = $$($nesting, 'Block').$new(parent, "preamble", $hash2(["content_model"], {"content_model": "compound"}))); - if ($truthy(($truthy($a = book) ? parent['$attr?']("preface-title") : $a))) { - - $writer = [parent.$attr("preface-title")]; - $send(preamble, 'title=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - parent.$blocks()['$<<'](preamble);}; - section = parent; - current_level = 0; - if ($truthy(parent.$attributes()['$key?']("fragment"))) { - expected_next_level = -1 - } else if ($truthy(book)) { - $a = [1, 0], (expected_next_level = $a[0]), (expected_next_level_alt = $a[1]), $a - } else { - expected_next_level = 1 - }; - } else { - - book = (document = parent.$document()).$doctype()['$==']("book"); - section = self.$initialize_section(reader, parent, attributes); - attributes = (function() {if ($truthy((title = attributes['$[]']("title")))) { - return $hash2(["title"], {"title": title}) - } else { - return $hash2([], {}) - }; return nil; })(); - expected_next_level = $rb_plus((current_level = section.$level()), 1); - if (current_level['$=='](0)) { - part = book - } else if ($truthy((($a = current_level['$=='](1)) ? section.$special() : current_level['$=='](1)))) { - if ($truthy(($truthy($a = ($truthy($b = (sectname = section.$sectname())['$==']("appendix")) ? $b : sectname['$==']("preface"))) ? $a : sectname['$==']("abstract")))) { - } else { - expected_next_level = nil - }}; - }; - reader.$skip_blank_lines(); - while ($truthy(reader['$has_more_lines?']())) { - - self.$parse_block_metadata_lines(reader, document, attributes); - if ($truthy((next_level = self['$is_next_line_section?'](reader, attributes)))) { - - if ($truthy(document['$attr?']("leveloffset"))) { - - next_level = $rb_plus(next_level, document.$attr("leveloffset").$to_i()); - if ($truthy($rb_lt(next_level, 0))) { - next_level = 0};}; - if ($truthy($rb_gt(next_level, current_level))) { - - if ($truthy(expected_next_level)) { - if ($truthy(($truthy($b = ($truthy($c = next_level['$=='](expected_next_level)) ? $c : ($truthy($d = expected_next_level_alt) ? next_level['$=='](expected_next_level_alt) : $d))) ? $b : $rb_lt(expected_next_level, 0)))) { - } else { - - expected_condition = (function() {if ($truthy(expected_next_level_alt)) { - return "" + "expected levels " + (expected_next_level_alt) + " or " + (expected_next_level) - } else { - return "" + "expected level " + (expected_next_level) - }; return nil; })(); - self.$logger().$warn(self.$message_with_context("" + "section title out of sequence: " + (expected_condition) + ", got level " + (next_level), $hash2(["source_location"], {"source_location": reader.$cursor()}))); - } - } else { - self.$logger().$error(self.$message_with_context("" + (sectname) + " sections do not support nested sections", $hash2(["source_location"], {"source_location": reader.$cursor()}))) - }; - $c = self.$next_section(reader, section, attributes), $b = Opal.to_ary($c), (new_section = ($b[0] == null ? nil : $b[0])), (attributes = ($b[1] == null ? nil : $b[1])), $c; - section.$assign_numeral(new_section); - section.$blocks()['$<<'](new_section); - } else if ($truthy((($b = next_level['$=='](0)) ? section['$=='](document) : next_level['$=='](0)))) { - - if ($truthy(book)) { - } else { - self.$logger().$error(self.$message_with_context("level 0 sections can only be used when doctype is book", $hash2(["source_location"], {"source_location": reader.$cursor()}))) - }; - $c = self.$next_section(reader, section, attributes), $b = Opal.to_ary($c), (new_section = ($b[0] == null ? nil : $b[0])), (attributes = ($b[1] == null ? nil : $b[1])), $c; - section.$assign_numeral(new_section); - section.$blocks()['$<<'](new_section); - } else { - break; - }; - } else { - - block_cursor = reader.$cursor(); - if ($truthy((new_block = self.$next_block(reader, ($truthy($b = intro) ? $b : section), attributes, $hash2(["parse_metadata"], {"parse_metadata": false}))))) { - - if ($truthy(part)) { - if ($truthy(section['$blocks?']()['$!']())) { - if ($truthy(new_block.$style()['$!=']("partintro"))) { - if (new_block.$context()['$==']("paragraph")) { - - - $writer = ["open"]; - $send(new_block, 'context=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["partintro"]; - $send(new_block, 'style=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - - - $writer = [(intro = $$($nesting, 'Block').$new(section, "open", $hash2(["content_model"], {"content_model": "compound"})))]; - $send(new_block, 'parent=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["partintro"]; - $send(intro, 'style=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - section.$blocks()['$<<'](intro); - }} - } else if (section.$blocks().$size()['$=='](1)) { - - first_block = section.$blocks()['$[]'](0); - if ($truthy(($truthy($b = intro['$!']()) ? first_block.$content_model()['$==']("compound") : $b))) { - self.$logger().$error(self.$message_with_context("illegal block content outside of partintro block", $hash2(["source_location"], {"source_location": block_cursor}))) - } else if ($truthy(first_block.$content_model()['$!=']("compound"))) { - - - $writer = [(intro = $$($nesting, 'Block').$new(section, "open", $hash2(["content_model"], {"content_model": "compound"})))]; - $send(new_block, 'parent=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["partintro"]; - $send(intro, 'style=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - section.$blocks().$shift(); - if (first_block.$style()['$==']("partintro")) { - - - $writer = ["paragraph"]; - $send(first_block, 'context=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [nil]; - $send(first_block, 'style=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - intro['$<<'](first_block); - section.$blocks()['$<<'](intro);};}}; - ($truthy($b = intro) ? $b : section).$blocks()['$<<'](new_block); - attributes.$clear();}; - }; - if ($truthy($b = reader.$skip_blank_lines())) { - $b - } else { - break; - }; - }; - if ($truthy(part)) { - if ($truthy(($truthy($a = section['$blocks?']()) ? section.$blocks()['$[]'](-1).$context()['$==']("section") : $a))) { - } else { - self.$logger().$error(self.$message_with_context("invalid part, must have at least one section (e.g., chapter, appendix, etc.)", $hash2(["source_location"], {"source_location": reader.$cursor()}))) - } - } else if ($truthy(preamble)) { - if ($truthy(preamble['$blocks?']())) { - if ($truthy(($truthy($a = ($truthy($b = book) ? $b : document.$blocks()['$[]'](1))) ? $a : $$($nesting, 'Compliance').$unwrap_standalone_preamble()['$!']()))) { - if ($truthy(document.$sourcemap())) { - - $writer = [preamble.$blocks()['$[]'](0).$source_location()]; - $send(preamble, 'source_location=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - } else { - - document.$blocks().$shift(); - while ($truthy((child_block = preamble.$blocks().$shift()))) { - document['$<<'](child_block) - }; - } - } else { - document.$blocks().$shift() - }}; - return [(function() {if ($truthy(section['$!='](parent))) { - return section - } else { - return nil - }; return nil; })(), attributes.$merge()]; - }, $Parser_next_section$9.$$arity = -3); - Opal.defs(self, '$next_block', $Parser_next_block$10 = function $$next_block(reader, parent, attributes, options) {try { - - var $a, $b, $c, $d, $$11, $$12, $$13, self = this, skipped = nil, text_only = nil, document = nil, extensions = nil, block_extensions = nil, block_macro_extensions = nil, this_line = nil, doc_attrs = nil, style = nil, block = nil, block_context = nil, cloaked_context = nil, terminator = nil, delimited_block = nil, $writer = nil, indented = nil, md_syntax = nil, ch0 = nil, layout_break_chars = nil, ll = nil, blk_ctx = nil, target = nil, blk_attrs = nil, $case = nil, posattrs = nil, expanded_target = nil, scaledwidth = nil, block_title = nil, extension = nil, report_unknown_block_macro = nil, content = nil, ext_config = nil, default_attrs = nil, float_id = nil, float_reftext = nil, float_level = nil, lines = nil, content_adjacent = nil, admonition_name = nil, credit_line = nil, attribution = nil, citetitle = nil, language = nil, comma_idx = nil, block_cursor = nil, block_reader = nil, content_model = nil, positional_attrs = nil, block_id = nil; - if ($gvars["~"] == null) $gvars["~"] = nil; - - - - if (attributes == null) { - attributes = $hash2([], {}); - }; - - if (options == null) { - options = $hash2([], {}); - }; - if ($truthy((skipped = reader.$skip_blank_lines()))) { - } else { - return nil - }; - if ($truthy(($truthy($a = (text_only = options['$[]']("text_only"))) ? $rb_gt(skipped, 0) : $a))) { - - options.$delete("text_only"); - text_only = nil;}; - document = parent.$document(); - if ($truthy(options.$fetch("parse_metadata", true))) { - while ($truthy(self.$parse_block_metadata_line(reader, document, attributes, options))) { - - reader.$shift(); - ($truthy($b = reader.$skip_blank_lines()) ? $b : Opal.ret(nil)); - }}; - if ($truthy((extensions = document.$extensions()))) { - $a = [extensions['$blocks?'](), extensions['$block_macros?']()], (block_extensions = $a[0]), (block_macro_extensions = $a[1]), $a}; - reader.$mark(); - $a = [reader.$read_line(), document.$attributes(), attributes['$[]'](1)], (this_line = $a[0]), (doc_attrs = $a[1]), (style = $a[2]), $a; - block = (block_context = (cloaked_context = (terminator = nil))); - if ($truthy((delimited_block = self['$is_delimited_block?'](this_line, true)))) { - - block_context = (cloaked_context = delimited_block.$context()); - terminator = delimited_block.$terminator(); - if ($truthy(style)) { - if (style['$=='](block_context.$to_s())) { - } else if ($truthy(delimited_block.$masq()['$include?'](style))) { - block_context = style.$to_sym() - } else if ($truthy(($truthy($a = delimited_block.$masq()['$include?']("admonition")) ? $$($nesting, 'ADMONITION_STYLES')['$include?'](style) : $a))) { - block_context = "admonition" - } else if ($truthy(($truthy($a = block_extensions) ? extensions['$registered_for_block?'](style, block_context) : $a))) { - block_context = style.$to_sym() - } else { - - if ($truthy(self.$logger()['$debug?']())) { - self.$logger().$debug(self.$message_with_context("" + "unknown style for " + (block_context) + " block: " + (style), $hash2(["source_location"], {"source_location": reader.$cursor_at_mark()})))}; - style = block_context.$to_s(); - } - } else { - style = (($writer = ["style", block_context.$to_s()]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]) - };}; - if ($truthy(delimited_block)) { - } else { - while ($truthy(true)) { - - if ($truthy(($truthy($b = ($truthy($c = style) ? $$($nesting, 'Compliance').$strict_verbatim_paragraphs() : $c)) ? $$($nesting, 'VERBATIM_STYLES')['$include?'](style) : $b))) { - - block_context = style.$to_sym(); - reader.$unshift_line(this_line); - break;;}; - if ($truthy(text_only)) { - indented = this_line['$start_with?'](" ", $$($nesting, 'TAB')) - } else { - - md_syntax = $$($nesting, 'Compliance').$markdown_syntax(); - if ($truthy(this_line['$start_with?'](" "))) { - - $b = [true, " "], (indented = $b[0]), (ch0 = $b[1]), $b; - if ($truthy(($truthy($b = ($truthy($c = md_syntax) ? $send(this_line.$lstrip(), 'start_with?', Opal.to_a($$($nesting, 'MARKDOWN_THEMATIC_BREAK_CHARS').$keys())) : $c)) ? $$($nesting, 'MarkdownThematicBreakRx')['$match?'](this_line) : $b))) { - - block = $$($nesting, 'Block').$new(parent, "thematic_break", $hash2(["content_model"], {"content_model": "empty"})); - break;;}; - } else if ($truthy(this_line['$start_with?']($$($nesting, 'TAB')))) { - $b = [true, $$($nesting, 'TAB')], (indented = $b[0]), (ch0 = $b[1]), $b - } else { - - $b = [false, this_line.$chr()], (indented = $b[0]), (ch0 = $b[1]), $b; - layout_break_chars = (function() {if ($truthy(md_syntax)) { - return $$($nesting, 'HYBRID_LAYOUT_BREAK_CHARS') - } else { - return $$($nesting, 'LAYOUT_BREAK_CHARS') - }; return nil; })(); - if ($truthy(($truthy($b = layout_break_chars['$key?'](ch0)) ? (function() {if ($truthy(md_syntax)) { - - return $$($nesting, 'ExtLayoutBreakRx')['$match?'](this_line); - } else { - return ($truthy($c = self['$uniform?'](this_line, ch0, (ll = this_line.$length()))) ? $rb_gt(ll, 2) : $c) - }; return nil; })() : $b))) { - - block = $$($nesting, 'Block').$new(parent, layout_break_chars['$[]'](ch0), $hash2(["content_model"], {"content_model": "empty"})); - break;; - } else if ($truthy(($truthy($b = this_line['$end_with?']("]")) ? this_line['$include?']("::") : $b))) { - if ($truthy(($truthy($b = ($truthy($c = ch0['$==']("i")) ? $c : this_line['$start_with?']("video:", "audio:"))) ? $$($nesting, 'BlockMediaMacroRx')['$=~'](this_line) : $b))) { - - $b = [(($c = $gvars['~']) === nil ? nil : $c['$[]'](1)).$to_sym(), (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)), (($c = $gvars['~']) === nil ? nil : $c['$[]'](3))], (blk_ctx = $b[0]), (target = $b[1]), (blk_attrs = $b[2]), $b; - block = $$($nesting, 'Block').$new(parent, blk_ctx, $hash2(["content_model"], {"content_model": "empty"})); - if ($truthy(blk_attrs)) { - - $case = blk_ctx; - if ("video"['$===']($case)) {posattrs = ["poster", "width", "height"]} - else if ("audio"['$===']($case)) {posattrs = []} - else {posattrs = ["alt", "width", "height"]}; - block.$parse_attributes(blk_attrs, posattrs, $hash2(["sub_input", "into"], {"sub_input": true, "into": attributes}));}; - if ($truthy(attributes['$key?']("style"))) { - attributes.$delete("style")}; - if ($truthy(target['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - if ($truthy(($truthy($b = ($truthy($c = (expanded_target = block.$sub_attributes(target))['$empty?']()) ? ($truthy($d = doc_attrs['$[]']("attribute-missing")) ? $d : $$($nesting, 'Compliance').$attribute_missing())['$==']("drop-line") : $c)) ? block.$sub_attributes($rb_plus(target, " "), $hash2(["attribute_missing", "drop_line_severity"], {"attribute_missing": "drop-line", "drop_line_severity": "ignore"}))['$empty?']() : $b))) { - - attributes.$clear(); - return nil; - } else { - target = expanded_target - }}; - if (blk_ctx['$==']("image")) { - - document.$register("images", target); - - $writer = ["imagesdir", doc_attrs['$[]']("imagesdir")]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - ($truthy($b = attributes['$[]']("alt")) ? $b : (($writer = ["alt", ($truthy($c = style) ? $c : (($writer = ["default-alt", $$($nesting, 'Helpers').$basename(target, true).$tr("_-", " ")]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy((scaledwidth = attributes.$delete("scaledwidth"))['$nil_or_empty?']())) { - } else { - - $writer = ["scaledwidth", (function() {if ($truthy($$($nesting, 'TrailingDigitsRx')['$match?'](scaledwidth))) { - return "" + (scaledwidth) + "%" - } else { - return scaledwidth - }; return nil; })()]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy(attributes['$[]']("title"))) { - - - $writer = [(block_title = attributes.$delete("title"))]; - $send(block, 'title=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - block.$assign_caption(attributes.$delete("caption"), "figure");};}; - - $writer = ["target", target]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - break;; - } else if ($truthy(($truthy($b = (($c = ch0['$==']("t")) ? this_line['$start_with?']("toc:") : ch0['$==']("t"))) ? $$($nesting, 'BlockTocMacroRx')['$=~'](this_line) : $b))) { - - block = $$($nesting, 'Block').$new(parent, "toc", $hash2(["content_model"], {"content_model": "empty"})); - if ($truthy((($b = $gvars['~']) === nil ? nil : $b['$[]'](1)))) { - block.$parse_attributes((($b = $gvars['~']) === nil ? nil : $b['$[]'](1)), [], $hash2(["into"], {"into": attributes}))}; - break;; - } else if ($truthy((function() {if ($truthy(block_macro_extensions)) { - - return ($truthy($b = ($truthy($c = $$($nesting, 'CustomBlockMacroRx')['$=~'](this_line)) ? (extension = extensions['$registered_for_block_macro?']((($d = $gvars['~']) === nil ? nil : $d['$[]'](1)))) : $c)) ? $b : (report_unknown_block_macro = self.$logger()['$debug?']())); - } else { - - return ($truthy($b = self.$logger()['$debug?']()) ? (report_unknown_block_macro = $$($nesting, 'CustomBlockMacroRx')['$=~'](this_line)) : $b); - }; return nil; })())) { - if ($truthy(report_unknown_block_macro)) { - self.$logger().$debug(self.$message_with_context("" + "unknown name for block macro: " + ((($b = $gvars['~']) === nil ? nil : $b['$[]'](1))), $hash2(["source_location"], {"source_location": reader.$cursor_at_mark()}))) - } else { - - content = (($b = $gvars['~']) === nil ? nil : $b['$[]'](3)); - if ($truthy((target = (($b = $gvars['~']) === nil ? nil : $b['$[]'](2)))['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - if ($truthy(($truthy($b = ($truthy($c = (expanded_target = parent.$sub_attributes(target))['$empty?']()) ? ($truthy($d = doc_attrs['$[]']("attribute-missing")) ? $d : $$($nesting, 'Compliance').$attribute_missing())['$==']("drop-line") : $c)) ? parent.$sub_attributes($rb_plus(target, " "), $hash2(["attribute_missing", "drop_line_severity"], {"attribute_missing": "drop-line", "drop_line_severity": "ignore"}))['$empty?']() : $b))) { - - attributes.$clear(); - return nil; - } else { - target = expanded_target - }}; - if ((ext_config = extension.$config())['$[]']("content_model")['$==']("attributes")) { - if ($truthy(content)) { - document.$parse_attributes(content, ($truthy($b = ($truthy($c = ext_config['$[]']("positional_attrs")) ? $c : ext_config['$[]']("pos_attrs"))) ? $b : []), $hash2(["sub_input", "into"], {"sub_input": true, "into": attributes}))} - } else { - - $writer = ["text", ($truthy($b = content) ? $b : "")]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy((default_attrs = ext_config['$[]']("default_attrs")))) { - $send(attributes, 'update', [default_attrs], ($$11 = function(_, old_v){var self = $$11.$$s || this; - - - - if (_ == null) { - _ = nil; - }; - - if (old_v == null) { - old_v = nil; - }; - return old_v;}, $$11.$$s = self, $$11.$$arity = 2, $$11))}; - if ($truthy((block = extension.$process_method()['$[]'](parent, target, attributes)))) { - - attributes.$replace(block.$attributes()); - break;; - } else { - - attributes.$clear(); - return nil; - }; - }}}; - }; - }; - if ($truthy(($truthy($b = ($truthy($c = indented['$!']()) ? (ch0 = ($truthy($d = ch0) ? $d : this_line.$chr()))['$==']("<") : $c)) ? $$($nesting, 'CalloutListRx')['$=~'](this_line) : $b))) { - - reader.$unshift_line(this_line); - block = self.$parse_callout_list(reader, $gvars["~"], parent, document.$callouts()); - - $writer = ["style", "arabic"]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - break;; - } else if ($truthy($$($nesting, 'UnorderedListRx')['$match?'](this_line))) { - - reader.$unshift_line(this_line); - if ($truthy(($truthy($b = ($truthy($c = style['$!']()) ? $$($nesting, 'Section')['$==='](parent) : $c)) ? parent.$sectname()['$==']("bibliography") : $b))) { - - $writer = ["style", (style = "bibliography")]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - block = self.$parse_list(reader, "ulist", parent, style); - break;; - } else if ($truthy($$($nesting, 'OrderedListRx')['$match?'](this_line))) { - - reader.$unshift_line(this_line); - block = self.$parse_list(reader, "olist", parent, style); - if ($truthy(block.$style())) { - - $writer = ["style", block.$style()]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - break;; - } else if ($truthy(($truthy($b = ($truthy($c = this_line['$include?']("::")) ? $c : this_line['$include?'](";;"))) ? $$($nesting, 'DescriptionListRx')['$=~'](this_line) : $b))) { - - reader.$unshift_line(this_line); - block = self.$parse_description_list(reader, $gvars["~"], parent); - break;; - } else if ($truthy(($truthy($b = ($truthy($c = style['$==']("float")) ? $c : style['$==']("discrete"))) ? (function() {if ($truthy($$($nesting, 'Compliance').$underline_style_section_titles())) { - - return self['$is_section_title?'](this_line, reader.$peek_line()); - } else { - return ($truthy($c = indented['$!']()) ? self['$atx_section_title?'](this_line) : $c) - }; return nil; })() : $b))) { - - reader.$unshift_line(this_line); - $c = self.$parse_section_title(reader, document, attributes['$[]']("id")), $b = Opal.to_ary($c), (float_id = ($b[0] == null ? nil : $b[0])), (float_reftext = ($b[1] == null ? nil : $b[1])), (block_title = ($b[2] == null ? nil : $b[2])), (float_level = ($b[3] == null ? nil : $b[3])), $c; - if ($truthy(float_reftext)) { - - $writer = ["reftext", float_reftext]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - block = $$($nesting, 'Block').$new(parent, "floating_title", $hash2(["content_model"], {"content_model": "empty"})); - - $writer = [block_title]; - $send(block, 'title=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - attributes.$delete("title"); - - $writer = [($truthy($b = float_id) ? $b : (function() {if ($truthy(doc_attrs['$key?']("sectids"))) { - - return $$($nesting, 'Section').$generate_id(block.$title(), document); - } else { - return nil - }; return nil; })())]; - $send(block, 'id=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [float_level]; - $send(block, 'level=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - break;; - } else if ($truthy(($truthy($b = style) ? style['$!=']("normal") : $b))) { - if ($truthy($$($nesting, 'PARAGRAPH_STYLES')['$include?'](style))) { - - block_context = style.$to_sym(); - cloaked_context = "paragraph"; - reader.$unshift_line(this_line); - break;; - } else if ($truthy($$($nesting, 'ADMONITION_STYLES')['$include?'](style))) { - - block_context = "admonition"; - cloaked_context = "paragraph"; - reader.$unshift_line(this_line); - break;; - } else if ($truthy(($truthy($b = block_extensions) ? extensions['$registered_for_block?'](style, "paragraph") : $b))) { - - block_context = style.$to_sym(); - cloaked_context = "paragraph"; - reader.$unshift_line(this_line); - break;; - } else { - - if ($truthy(self.$logger()['$debug?']())) { - self.$logger().$debug(self.$message_with_context("" + "unknown style for paragraph: " + (style), $hash2(["source_location"], {"source_location": reader.$cursor_at_mark()})))}; - style = nil; - }}; - reader.$unshift_line(this_line); - if ($truthy(($truthy($b = indented) ? style['$!']() : $b))) { - - lines = self.$read_paragraph_lines(reader, (content_adjacent = (function() {if (skipped['$=='](0)) { - return options['$[]']("list_type") - } else { - return nil - }; return nil; })()), $hash2(["skip_line_comments"], {"skip_line_comments": text_only})); - self['$adjust_indentation!'](lines); - if ($truthy(($truthy($b = text_only) ? $b : content_adjacent['$==']("dlist")))) { - block = $$($nesting, 'Block').$new(parent, "paragraph", $hash2(["content_model", "source", "attributes"], {"content_model": "simple", "source": lines, "attributes": attributes})) - } else { - block = $$($nesting, 'Block').$new(parent, "literal", $hash2(["content_model", "source", "attributes"], {"content_model": "verbatim", "source": lines, "attributes": attributes})) - }; - } else { - - lines = self.$read_paragraph_lines(reader, (($b = skipped['$=='](0)) ? options['$[]']("list_type") : skipped['$=='](0)), $hash2(["skip_line_comments"], {"skip_line_comments": true})); - if ($truthy(text_only)) { - - if ($truthy(($truthy($b = indented) ? style['$==']("normal") : $b))) { - self['$adjust_indentation!'](lines)}; - block = $$($nesting, 'Block').$new(parent, "paragraph", $hash2(["content_model", "source", "attributes"], {"content_model": "simple", "source": lines, "attributes": attributes})); - } else if ($truthy(($truthy($b = ($truthy($c = $$($nesting, 'ADMONITION_STYLE_HEADS')['$include?'](ch0)) ? this_line['$include?'](":") : $c)) ? $$($nesting, 'AdmonitionParagraphRx')['$=~'](this_line) : $b))) { - - - $writer = [0, (($b = $gvars['~']) === nil ? nil : $b.$post_match())]; - $send(lines, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["name", (admonition_name = (($writer = ["style", (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]).$downcase())]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["textlabel", ($truthy($b = attributes.$delete("caption")) ? $b : doc_attrs['$[]']("" + (admonition_name) + "-caption"))]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - block = $$($nesting, 'Block').$new(parent, "admonition", $hash2(["content_model", "source", "attributes"], {"content_model": "simple", "source": lines, "attributes": attributes})); - } else if ($truthy(($truthy($b = ($truthy($c = md_syntax) ? ch0['$=='](">") : $c)) ? this_line['$start_with?']("> ") : $b))) { - - $send(lines, 'map!', [], ($$12 = function(line){var self = $$12.$$s || this; - - - - if (line == null) { - line = nil; - }; - if (line['$=='](">")) { - - return line.$slice(1, line.$length()); - } else { - - if ($truthy(line['$start_with?']("> "))) { - - return line.$slice(2, line.$length()); - } else { - return line - }; - };}, $$12.$$s = self, $$12.$$arity = 1, $$12)); - if ($truthy(lines['$[]'](-1)['$start_with?']("-- "))) { - - credit_line = (credit_line = lines.$pop()).$slice(3, credit_line.$length()); - if ($truthy(lines['$empty?']())) { - } else { - while ($truthy(lines['$[]'](-1)['$empty?']())) { - lines.$pop() - } - };}; - - $writer = ["style", "quote"]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - block = self.$build_block("quote", "compound", false, parent, $$($nesting, 'Reader').$new(lines), attributes); - if ($truthy(credit_line)) { - - $c = block.$apply_subs(credit_line).$split(", ", 2), $b = Opal.to_ary($c), (attribution = ($b[0] == null ? nil : $b[0])), (citetitle = ($b[1] == null ? nil : $b[1])), $c; - if ($truthy(attribution)) { - - $writer = ["attribution", attribution]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(citetitle)) { - - $writer = ["citetitle", citetitle]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];};}; - } else if ($truthy(($truthy($b = ($truthy($c = (($d = ch0['$==']("\"")) ? $rb_gt(lines.$size(), 1) : ch0['$==']("\""))) ? lines['$[]'](-1)['$start_with?']("-- ") : $c)) ? lines['$[]'](-2)['$end_with?']("\"") : $b))) { - - - $writer = [0, this_line.$slice(1, this_line.$length())]; - $send(lines, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - credit_line = (credit_line = lines.$pop()).$slice(3, credit_line.$length()); - while ($truthy(lines['$[]'](-1)['$empty?']())) { - lines.$pop() - }; - lines['$<<'](lines.$pop().$chop()); - - $writer = ["style", "quote"]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - block = $$($nesting, 'Block').$new(parent, "quote", $hash2(["content_model", "source", "attributes"], {"content_model": "simple", "source": lines, "attributes": attributes})); - $c = block.$apply_subs(credit_line).$split(", ", 2), $b = Opal.to_ary($c), (attribution = ($b[0] == null ? nil : $b[0])), (citetitle = ($b[1] == null ? nil : $b[1])), $c; - if ($truthy(attribution)) { - - $writer = ["attribution", attribution]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(citetitle)) { - - $writer = ["citetitle", citetitle]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - } else { - - if ($truthy(($truthy($b = indented) ? style['$==']("normal") : $b))) { - self['$adjust_indentation!'](lines)}; - block = $$($nesting, 'Block').$new(parent, "paragraph", $hash2(["content_model", "source", "attributes"], {"content_model": "simple", "source": lines, "attributes": attributes})); - }; - self.$catalog_inline_anchors(lines.$join($$($nesting, 'LF')), block, document, reader); - }; - break;; - } - }; - if ($truthy(block)) { - } else { - $case = block_context; - if ("listing"['$===']($case) || "source"['$===']($case)) { - if ($truthy(($truthy($a = block_context['$==']("source")) ? $a : ($truthy($b = attributes['$[]'](1)['$!']()) ? (language = ($truthy($c = attributes['$[]'](2)) ? $c : doc_attrs['$[]']("source-language"))) : $b)))) { - - if ($truthy(language)) { - - - $writer = ["style", "source"]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["language", language]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - $$($nesting, 'AttributeList').$rekey(attributes, [nil, nil, "linenums"]); - } else { - - $$($nesting, 'AttributeList').$rekey(attributes, [nil, "language", "linenums"]); - if ($truthy(attributes['$key?']("language"))) { - } else if ($truthy(doc_attrs['$key?']("source-language"))) { - - $writer = ["language", doc_attrs['$[]']("source-language")]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - }; - if ($truthy(attributes['$key?']("linenums"))) { - } else if ($truthy(($truthy($a = attributes['$[]']("linenums-option")) ? $a : doc_attrs['$[]']("source-linenums-option")))) { - - $writer = ["linenums", ""]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(attributes['$key?']("indent"))) { - } else if ($truthy(doc_attrs['$key?']("source-indent"))) { - - $writer = ["indent", doc_attrs['$[]']("source-indent")]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];};}; - block = self.$build_block("listing", "verbatim", terminator, parent, reader, attributes);} - else if ("fenced_code"['$===']($case)) { - - $writer = ["style", "source"]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy($rb_gt((ll = this_line.$length()), 3))) { - if ($truthy((comma_idx = (language = this_line.$slice(3, ll)).$index(",")))) { - if ($truthy($rb_gt(comma_idx, 0))) { - - language = language.$slice(0, comma_idx).$strip(); - if ($truthy($rb_lt(comma_idx, $rb_minus(ll, 4)))) { - - $writer = ["linenums", ""]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - } else if ($truthy($rb_gt(ll, 4))) { - - $writer = ["linenums", ""]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - } else { - language = language.$lstrip() - }}; - if ($truthy(language['$nil_or_empty?']())) { - if ($truthy(doc_attrs['$key?']("source-language"))) { - - $writer = ["language", doc_attrs['$[]']("source-language")]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - } else { - - $writer = ["language", language]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy(attributes['$key?']("linenums"))) { - } else if ($truthy(($truthy($a = attributes['$[]']("linenums-option")) ? $a : doc_attrs['$[]']("source-linenums-option")))) { - - $writer = ["linenums", ""]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(attributes['$key?']("indent"))) { - } else if ($truthy(doc_attrs['$key?']("source-indent"))) { - - $writer = ["indent", doc_attrs['$[]']("source-indent")]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - terminator = terminator.$slice(0, 3); - block = self.$build_block("listing", "verbatim", terminator, parent, reader, attributes);} - else if ("table"['$===']($case)) { - block_cursor = reader.$cursor(); - block_reader = $$($nesting, 'Reader').$new(reader.$read_lines_until($hash2(["terminator", "skip_line_comments", "context", "cursor"], {"terminator": terminator, "skip_line_comments": true, "context": "table", "cursor": "at_mark"})), block_cursor); - if ($truthy(terminator['$start_with?']("|", "!"))) { - } else { - ($truthy($a = attributes['$[]']("format")) ? $a : (($writer = ["format", (function() {if ($truthy(terminator['$start_with?'](","))) { - return "csv" - } else { - return "dsv" - }; return nil; })()]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - }; - block = self.$parse_table(block_reader, parent, attributes);} - else if ("sidebar"['$===']($case)) {block = self.$build_block(block_context, "compound", terminator, parent, reader, attributes)} - else if ("admonition"['$===']($case)) { - - $writer = ["name", (admonition_name = style.$downcase())]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["textlabel", ($truthy($a = attributes.$delete("caption")) ? $a : doc_attrs['$[]']("" + (admonition_name) + "-caption"))]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - block = self.$build_block(block_context, "compound", terminator, parent, reader, attributes);} - else if ("open"['$===']($case) || "abstract"['$===']($case) || "partintro"['$===']($case)) {block = self.$build_block("open", "compound", terminator, parent, reader, attributes)} - else if ("literal"['$===']($case)) {block = self.$build_block(block_context, "verbatim", terminator, parent, reader, attributes)} - else if ("example"['$===']($case)) { - if ($truthy(attributes['$[]']("collapsible-option"))) { - - $writer = ["caption", ""]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - block = self.$build_block(block_context, "compound", terminator, parent, reader, attributes);} - else if ("quote"['$===']($case) || "verse"['$===']($case)) { - $$($nesting, 'AttributeList').$rekey(attributes, [nil, "attribution", "citetitle"]); - block = self.$build_block(block_context, (function() {if (block_context['$==']("verse")) { - return "verbatim" - } else { - return "compound" - }; return nil; })(), terminator, parent, reader, attributes);} - else if ("stem"['$===']($case) || "latexmath"['$===']($case) || "asciimath"['$===']($case)) { - if (block_context['$==']("stem")) { - - $writer = ["style", $$($nesting, 'STEM_TYPE_ALIASES')['$[]'](($truthy($a = attributes['$[]'](2)) ? $a : doc_attrs['$[]']("stem")))]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - block = self.$build_block("stem", "raw", terminator, parent, reader, attributes);} - else if ("pass"['$===']($case)) {block = self.$build_block(block_context, "raw", terminator, parent, reader, attributes)} - else if ("comment"['$===']($case)) { - self.$build_block(block_context, "skip", terminator, parent, reader, attributes); - attributes.$clear(); - return nil;} - else {if ($truthy(($truthy($a = block_extensions) ? (extension = extensions['$registered_for_block?'](block_context, cloaked_context)) : $a))) { - - if ((content_model = (ext_config = extension.$config())['$[]']("content_model"))['$==']("skip")) { - } else { - - if ($truthy((positional_attrs = ($truthy($a = ext_config['$[]']("positional_attrs")) ? $a : ext_config['$[]']("pos_attrs")))['$nil_or_empty?']())) { - } else { - $$($nesting, 'AttributeList').$rekey(attributes, $rb_plus([nil], positional_attrs)) - }; - if ($truthy((default_attrs = ext_config['$[]']("default_attrs")))) { - $send(default_attrs, 'each', [], ($$13 = function(k, v){var self = $$13.$$s || this, $e; - - - - if (k == null) { - k = nil; - }; - - if (v == null) { - v = nil; - }; - return ($truthy($e = attributes['$[]'](k)) ? $e : (($writer = [k, v]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));}, $$13.$$s = self, $$13.$$arity = 2, $$13))}; - - $writer = ["cloaked-context", cloaked_context]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }; - if ($truthy((block = self.$build_block(block_context, content_model, terminator, parent, reader, attributes, $hash2(["extension"], {"extension": extension}))))) { - } else { - - attributes.$clear(); - return nil; - }; - } else { - self.$raise("" + "Unsupported block type " + (block_context) + " at " + (reader.$cursor())) - }} - }; - if ($truthy(document.$sourcemap())) { - - $writer = [reader.$cursor_at_mark()]; - $send(block, 'source_location=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(attributes['$[]']("title"))) { - - - $writer = [(block_title = attributes.$delete("title"))]; - $send(block, 'title=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy($$($nesting, 'CAPTION_ATTRIBUTE_NAMES')['$[]'](block.$context()))) { - block.$assign_caption(attributes.$delete("caption"))};}; - - $writer = [attributes['$[]']("style")]; - $send(block, 'style=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy((block_id = ($truthy($a = block.$id()) ? $a : (($writer = [attributes['$[]']("id")]), $send(block, 'id=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))))) { - - if ($truthy((function() {if ($truthy(block_title)) { - - return block_title['$include?']($$($nesting, 'ATTR_REF_HEAD')); - } else { - return block['$title?']() - }; return nil; })())) { - block.$title()}; - if ($truthy(document.$register("refs", [block_id, block]))) { - } else { - self.$logger().$warn(self.$message_with_context("" + "id assigned to block already in use: " + (block_id), $hash2(["source_location"], {"source_location": reader.$cursor_at_mark()}))) - };}; - if ($truthy(attributes['$empty?']())) { - } else { - block.$update_attributes(attributes) - }; - block.$commit_subs(); - if ($truthy(block['$sub?']("callouts"))) { - if ($truthy(self.$catalog_callouts(block.$source(), document))) { - } else { - block.$remove_sub("callouts") - }}; - return block; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Parser_next_block$10.$$arity = -3); - Opal.defs(self, '$read_paragraph_lines', $Parser_read_paragraph_lines$14 = function $$read_paragraph_lines(reader, break_at_list, opts) { - var self = this, $writer = nil, break_condition = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - - $writer = ["break_on_blank_lines", true]; - $send(opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["break_on_list_continuation", true]; - $send(opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["preserve_last_line", true]; - $send(opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - break_condition = (function() {if ($truthy(break_at_list)) { - - if ($truthy($$($nesting, 'Compliance').$block_terminates_paragraph())) { - return $$($nesting, 'StartOfBlockOrListProc') - } else { - return $$($nesting, 'StartOfListProc') - }; - } else { - - if ($truthy($$($nesting, 'Compliance').$block_terminates_paragraph())) { - return $$($nesting, 'StartOfBlockProc') - } else { - return $$($nesting, 'NoOp') - }; - }; return nil; })(); - return $send(reader, 'read_lines_until', [opts], break_condition.$to_proc()); - }, $Parser_read_paragraph_lines$14.$$arity = -3); - Opal.defs(self, '$is_delimited_block?', $Parser_is_delimited_block$ques$15 = function(line, return_match_data) { - var $a, $b, self = this, line_len = nil, tip = nil, tip_len = nil, context = nil, masq = nil; - - - - if (return_match_data == null) { - return_match_data = nil; - }; - if ($truthy(($truthy($a = $rb_gt((line_len = line.$length()), 1)) ? $$($nesting, 'DELIMITED_BLOCK_HEADS')['$[]'](line.$slice(0, 2)) : $a))) { - } else { - return nil - }; - if (line_len['$=='](2)) { - - tip = line; - tip_len = 2; - } else { - - if ($truthy($rb_lt(line_len, 5))) { - - tip = line; - tip_len = line_len; - } else { - tip = line.$slice(0, (tip_len = 4)) - }; - if ($truthy(($truthy($a = $$($nesting, 'Compliance').$markdown_syntax()) ? tip['$start_with?']("`") : $a))) { - if (tip_len['$=='](4)) { - if (tip['$==']("````")) { - return nil - } else if ((tip = tip.$chop())['$==']("```")) { - - line = tip; - line_len = (tip_len = 3); - } else { - return nil - } - } else if (tip['$==']("```")) { - } else { - return nil - } - } else if (tip_len['$=='](3)) { - return nil}; - }; - $b = $$($nesting, 'DELIMITED_BLOCKS')['$[]'](tip), $a = Opal.to_ary($b), (context = ($a[0] == null ? nil : $a[0])), (masq = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy(($truthy($a = context) ? ($truthy($b = line_len['$=='](tip_len)) ? $b : self['$uniform?'](line.$slice(1, line_len), $$($nesting, 'DELIMITED_BLOCK_TAILS')['$[]'](tip), $rb_minus(line_len, 1))) : $a))) { - if ($truthy(return_match_data)) { - - return $$($nesting, 'BlockMatchData').$new(context, masq, tip, line); - } else { - return true - } - } else { - return nil - }; - }, $Parser_is_delimited_block$ques$15.$$arity = -2); - Opal.defs(self, '$build_block', $Parser_build_block$16 = function $$build_block(block_context, content_model, terminator, parent, reader, attributes, options) { - var $a, self = this, skip_processing = nil, parse_as_content_model = nil, lines = nil, block_reader = nil, block_cursor = nil, tab_size = nil, indent = nil, extension = nil, block = nil; - - - - if (options == null) { - options = $hash2([], {}); - }; - if (content_model['$==']("skip")) { - $a = [true, "simple"], (skip_processing = $a[0]), (parse_as_content_model = $a[1]), $a - } else if (content_model['$==']("raw")) { - $a = [false, "simple"], (skip_processing = $a[0]), (parse_as_content_model = $a[1]), $a - } else { - $a = [false, content_model], (skip_processing = $a[0]), (parse_as_content_model = $a[1]), $a - }; - if ($truthy(terminator['$nil?']())) { - - if (parse_as_content_model['$==']("verbatim")) { - lines = reader.$read_lines_until($hash2(["break_on_blank_lines", "break_on_list_continuation"], {"break_on_blank_lines": true, "break_on_list_continuation": true})) - } else { - - if (content_model['$==']("compound")) { - content_model = "simple"}; - lines = self.$read_paragraph_lines(reader, false, $hash2(["skip_line_comments", "skip_processing"], {"skip_line_comments": true, "skip_processing": skip_processing})); - }; - block_reader = nil; - } else if ($truthy(parse_as_content_model['$!=']("compound"))) { - - lines = reader.$read_lines_until($hash2(["terminator", "skip_processing", "context", "cursor"], {"terminator": terminator, "skip_processing": skip_processing, "context": block_context, "cursor": "at_mark"})); - block_reader = nil; - } else if (terminator['$=='](false)) { - - lines = nil; - block_reader = reader; - } else { - - lines = nil; - block_cursor = reader.$cursor(); - block_reader = $$($nesting, 'Reader').$new(reader.$read_lines_until($hash2(["terminator", "skip_processing", "context", "cursor"], {"terminator": terminator, "skip_processing": skip_processing, "context": block_context, "cursor": "at_mark"})), block_cursor); - }; - if (content_model['$==']("verbatim")) { - - tab_size = ($truthy($a = attributes['$[]']("tabsize")) ? $a : parent.$document().$attributes()['$[]']("tabsize")).$to_i(); - if ($truthy((indent = attributes['$[]']("indent")))) { - self['$adjust_indentation!'](lines, indent.$to_i(), tab_size) - } else if ($truthy($rb_gt(tab_size, 0))) { - self['$adjust_indentation!'](lines, -1, tab_size)}; - } else if (content_model['$==']("skip")) { - return nil}; - if ($truthy((extension = options['$[]']("extension")))) { - - attributes.$delete("style"); - if ($truthy((block = extension.$process_method()['$[]'](parent, ($truthy($a = block_reader) ? $a : $$($nesting, 'Reader').$new(lines)), attributes.$merge())))) { - - attributes.$replace(block.$attributes()); - if ($truthy((($a = block.$content_model()['$==']("compound")) ? (lines = block.$lines())['$empty?']()['$!']() : block.$content_model()['$==']("compound")))) { - - content_model = "compound"; - block_reader = $$($nesting, 'Reader').$new(lines);}; - } else { - return nil - }; - } else { - block = $$($nesting, 'Block').$new(parent, block_context, $hash2(["content_model", "source", "attributes"], {"content_model": content_model, "source": lines, "attributes": attributes})) - }; - if (content_model['$==']("compound")) { - self.$parse_blocks(block_reader, block)}; - return block; - }, $Parser_build_block$16.$$arity = -7); - Opal.defs(self, '$parse_blocks', $Parser_parse_blocks$17 = function $$parse_blocks(reader, parent, attributes) { - var $a, $b, $c, self = this, block = nil; - - - - if (attributes == null) { - attributes = nil; - }; - if ($truthy(attributes)) { - while ($truthy(($truthy($b = ($truthy($c = (block = self.$next_block(reader, parent, attributes.$merge()))) ? parent.$blocks()['$<<'](block) : $c)) ? $b : reader['$has_more_lines?']()))) { - - } - } else { - while ($truthy(($truthy($b = ($truthy($c = (block = self.$next_block(reader, parent))) ? parent.$blocks()['$<<'](block) : $c)) ? $b : reader['$has_more_lines?']()))) { - - } - }; - return nil; - }, $Parser_parse_blocks$17.$$arity = -3); - Opal.defs(self, '$parse_list', $Parser_parse_list$18 = function $$parse_list(reader, list_type, parent, style) { - var $a, $b, self = this, list_block = nil, list_rx = nil, list_item = nil; - if ($gvars["~"] == null) $gvars["~"] = nil; - - - list_block = $$($nesting, 'List').$new(parent, list_type); - list_rx = $$($nesting, 'ListRxMap')['$[]'](list_type); - while ($truthy(($truthy($b = reader['$has_more_lines?']()) ? list_rx['$=~'](reader.$peek_line()) : $b))) { - - if ($truthy((list_item = self.$parse_list_item(reader, list_block, $gvars["~"], (($b = $gvars['~']) === nil ? nil : $b['$[]'](1)), style)))) { - list_block.$items()['$<<'](list_item)}; - if ($truthy($b = reader.$skip_blank_lines())) { - $b - } else { - break; - }; - }; - return list_block; - }, $Parser_parse_list$18.$$arity = 4); - Opal.defs(self, '$catalog_callouts', $Parser_catalog_callouts$19 = function $$catalog_callouts(text, document) { - var $$20, self = this, found = nil, autonum = nil; - - - found = false; - autonum = 0; - if ($truthy(text['$include?']("<"))) { - $send(text, 'scan', [$$($nesting, 'CalloutScanRx')], ($$20 = function(){var self = $$20.$$s || this, $a; - - - if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](0))['$start_with?']("\\"))) { - } else { - document.$callouts().$register((function() {if ((($a = $gvars['~']) === nil ? nil : $a['$[]'](2))['$=='](".")) { - return (autonum = $rb_plus(autonum, 1)).$to_s() - } else { - return (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)) - }; return nil; })()) - }; - return (found = true);}, $$20.$$s = self, $$20.$$arity = 0, $$20))}; - return found; - }, $Parser_catalog_callouts$19.$$arity = 2); - Opal.defs(self, '$catalog_inline_anchor', $Parser_catalog_inline_anchor$21 = function $$catalog_inline_anchor(id, reftext, node, location, doc) { - var $a, self = this; - - - - if (doc == null) { - doc = node.$document(); - }; - if ($truthy(($truthy($a = reftext) ? reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')) : $a))) { - reftext = doc.$sub_attributes(reftext)}; - if ($truthy(doc.$register("refs", [id, $$($nesting, 'Inline').$new(node, "anchor", reftext, $hash2(["type", "id"], {"type": "ref", "id": id}))]))) { - } else { - - if ($truthy($$($nesting, 'Reader')['$==='](location))) { - location = location.$cursor()}; - self.$logger().$warn(self.$message_with_context("" + "id assigned to anchor already in use: " + (id), $hash2(["source_location"], {"source_location": location}))); - }; - return nil; - }, $Parser_catalog_inline_anchor$21.$$arity = -5); - Opal.defs(self, '$catalog_inline_anchors', $Parser_catalog_inline_anchors$22 = function $$catalog_inline_anchors(text, block, document, reader) { - var $a, $$23, self = this; - - - if ($truthy(($truthy($a = text['$include?']("[[")) ? $a : text['$include?']("or:")))) { - $send(text, 'scan', [$$($nesting, 'InlineAnchorScanRx')], ($$23 = function(){var self = $$23.$$s || this, $b, $c, $d, id = nil, reftext = nil, location = nil, offset = nil; - - - if ($truthy((id = (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))))) { - if ($truthy(($truthy($b = ($truthy($c = (reftext = (($d = $gvars['~']) === nil ? nil : $d['$[]'](2)))) ? reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')) : $c)) ? (reftext = document.$sub_attributes(reftext))['$empty?']() : $b))) { - return nil;} - } else { - - id = (($b = $gvars['~']) === nil ? nil : $b['$[]'](3)); - if ($truthy((reftext = (($b = $gvars['~']) === nil ? nil : $b['$[]'](4))))) { - if ($truthy(reftext['$include?']("]"))) { - - reftext = reftext.$gsub("\\]", "]"); - if ($truthy(reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - reftext = document.$sub_attributes(reftext)}; - } else if ($truthy(($truthy($b = reftext['$include?']($$($nesting, 'ATTR_REF_HEAD'))) ? (reftext = document.$sub_attributes(reftext))['$empty?']() : $b))) { - return nil;}}; - }; - if ($truthy(document.$register("refs", [id, $$($nesting, 'Inline').$new(block, "anchor", reftext, $hash2(["type", "id"], {"type": "ref", "id": id}))]))) { - return nil - } else { - - location = reader.$cursor_at_mark(); - if ($truthy($rb_gt((offset = $rb_plus((($b = $gvars['~']) === nil ? nil : $b.$pre_match()).$count($$($nesting, 'LF')), (function() {if ($truthy((($b = $gvars['~']) === nil ? nil : $b['$[]'](0))['$start_with?']($$($nesting, 'LF')))) { - return 1 - } else { - return 0 - }; return nil; })())), 0))) { - (location = location.$dup()).$advance(offset)}; - return self.$logger().$warn(self.$message_with_context("" + "id assigned to anchor already in use: " + (id), $hash2(["source_location"], {"source_location": location}))); - };}, $$23.$$s = self, $$23.$$arity = 0, $$23))}; - return nil; - }, $Parser_catalog_inline_anchors$22.$$arity = 4); - Opal.defs(self, '$catalog_inline_biblio_anchor', $Parser_catalog_inline_biblio_anchor$24 = function $$catalog_inline_biblio_anchor(id, reftext, node, reader) { - var $a, self = this; - - - if ($truthy(node.$document().$register("refs", [id, $$($nesting, 'Inline').$new(node, "anchor", ($truthy($a = reftext) ? "" + "[" + (reftext) + "]" : $a), $hash2(["type", "id"], {"type": "bibref", "id": id}))]))) { - } else { - self.$logger().$warn(self.$message_with_context("" + "id assigned to bibliography anchor already in use: " + (id), $hash2(["source_location"], {"source_location": reader.$cursor()}))) - }; - return nil; - }, $Parser_catalog_inline_biblio_anchor$24.$$arity = 4); - Opal.defs(self, '$parse_description_list', $Parser_parse_description_list$25 = function $$parse_description_list(reader, match, parent) { - var $a, $b, self = this, list_block = nil, sibling_pattern = nil, current_pair = nil, next_pair = nil, $writer = nil; - if ($gvars["~"] == null) $gvars["~"] = nil; - - - list_block = $$($nesting, 'List').$new(parent, "dlist"); - sibling_pattern = $$($nesting, 'DescriptionListSiblingRx')['$[]'](match['$[]'](2)); - list_block.$items()['$<<']((current_pair = self.$parse_list_item(reader, list_block, match, sibling_pattern))); - while ($truthy(($truthy($b = reader['$has_more_lines?']()) ? sibling_pattern['$=~'](reader.$peek_line()) : $b))) { - - next_pair = self.$parse_list_item(reader, list_block, $gvars["~"], sibling_pattern); - if ($truthy(current_pair['$[]'](1))) { - list_block.$items()['$<<']((current_pair = next_pair)) - } else { - - current_pair['$[]'](0)['$<<'](next_pair['$[]'](0)['$[]'](0)); - - $writer = [1, next_pair['$[]'](1)]; - $send(current_pair, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }; - }; - return list_block; - }, $Parser_parse_description_list$25.$$arity = 3); - Opal.defs(self, '$parse_callout_list', $Parser_parse_callout_list$26 = function $$parse_callout_list(reader, match, parent, callouts) { - var $a, $b, $c, self = this, list_block = nil, next_index = nil, autonum = nil, num = nil, list_item = nil, coids = nil, $writer = nil; - - - list_block = $$($nesting, 'List').$new(parent, "colist"); - next_index = 1; - autonum = 0; - while ($truthy(($truthy($b = match) ? $b : ($truthy($c = (match = $$($nesting, 'CalloutListRx').$match(reader.$peek_line()))) ? reader.$mark() : $c)))) { - - if ((num = match['$[]'](1))['$=='](".")) { - num = (autonum = $rb_plus(autonum, 1)).$to_s()}; - if (num['$=='](next_index.$to_s())) { - } else { - self.$logger().$warn(self.$message_with_context("" + "callout list item index: expected " + (next_index) + ", got " + (num), $hash2(["source_location"], {"source_location": reader.$cursor_at_mark()}))) - }; - if ($truthy((list_item = self.$parse_list_item(reader, list_block, match, "<1>")))) { - - list_block.$items()['$<<'](list_item); - if ($truthy((coids = callouts.$callout_ids(list_block.$items().$size()))['$empty?']())) { - self.$logger().$warn(self.$message_with_context("" + "no callout found for <" + (list_block.$items().$size()) + ">", $hash2(["source_location"], {"source_location": reader.$cursor_at_mark()}))) - } else { - - $writer = ["coids", coids]; - $send(list_item.$attributes(), '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - };}; - next_index = $rb_plus(next_index, 1); - match = nil; - }; - callouts.$next_list(); - return list_block; - }, $Parser_parse_callout_list$26.$$arity = 4); - Opal.defs(self, '$parse_list_item', $Parser_parse_list_item$27 = function $$parse_list_item(reader, list_block, match, sibling_trait, style) { - var $a, $b, self = this, list_type = nil, dlist = nil, list_term = nil, term_text = nil, item_text = nil, has_text = nil, list_item = nil, $writer = nil, sourcemap_assignment_deferred = nil, ordinal = nil, implicit_style = nil, block_cursor = nil, list_item_reader = nil, comment_lines = nil, subsequent_line = nil, content_adjacent = nil, block = nil, first_block = nil; - - - - if (style == null) { - style = nil; - }; - if ((list_type = list_block.$context())['$==']("dlist")) { - - dlist = true; - list_term = $$($nesting, 'ListItem').$new(list_block, (term_text = match['$[]'](1))); - if ($truthy(($truthy($a = term_text['$start_with?']("[[")) ? $$($nesting, 'LeadingInlineAnchorRx')['$=~'](term_text) : $a))) { - self.$catalog_inline_anchor((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), ($truthy($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](2))) ? $a : (($b = $gvars['~']) === nil ? nil : $b.$post_match()).$lstrip()), list_term, reader)}; - if ($truthy((item_text = match['$[]'](3)))) { - has_text = true}; - list_item = $$($nesting, 'ListItem').$new(list_block, item_text); - if ($truthy(list_block.$document().$sourcemap())) { - - - $writer = [reader.$cursor()]; - $send(list_term, 'source_location=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(has_text)) { - - $writer = [list_term.$source_location()]; - $send(list_item, 'source_location=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - sourcemap_assignment_deferred = true - };}; - } else { - - has_text = true; - list_item = $$($nesting, 'ListItem').$new(list_block, (item_text = match['$[]'](2))); - if ($truthy(list_block.$document().$sourcemap())) { - - $writer = [reader.$cursor()]; - $send(list_item, 'source_location=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if (list_type['$==']("ulist")) { - - - $writer = [sibling_trait]; - $send(list_item, 'marker=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(item_text['$start_with?']("["))) { - if ($truthy(($truthy($a = style) ? style['$==']("bibliography") : $a))) { - if ($truthy($$($nesting, 'InlineBiblioAnchorRx')['$=~'](item_text))) { - self.$catalog_inline_biblio_anchor((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), list_item, reader)} - } else if ($truthy(item_text['$start_with?']("[["))) { - if ($truthy($$($nesting, 'LeadingInlineAnchorRx')['$=~'](item_text))) { - self.$catalog_inline_anchor((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), list_item, reader)} - } else if ($truthy(item_text['$start_with?']("[ ] ", "[x] ", "[*] "))) { - - list_block.$set_option("checklist"); - - $writer = ["checkbox", ""]; - $send(list_item.$attributes(), '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(item_text['$start_with?']("[ "))) { - } else { - - $writer = ["checked", ""]; - $send(list_item.$attributes(), '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - - $writer = [item_text.$slice(4, item_text.$length())]; - $send(list_item, 'text=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}}; - } else if (list_type['$==']("olist")) { - - $b = self.$resolve_ordered_list_marker(sibling_trait, (ordinal = list_block.$items().$size()), true, reader), $a = Opal.to_ary($b), (sibling_trait = ($a[0] == null ? nil : $a[0])), (implicit_style = ($a[1] == null ? nil : $a[1])), $b; - - $writer = [sibling_trait]; - $send(list_item, 'marker=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy((($a = ordinal['$=='](0)) ? style['$!']() : ordinal['$=='](0)))) { - - $writer = [($truthy($a = implicit_style) ? $a : ($truthy($b = $$($nesting, 'ORDERED_LIST_STYLES')['$[]']($rb_minus(sibling_trait.$length(), 1))) ? $b : "arabic").$to_s())]; - $send(list_block, 'style=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(($truthy($a = item_text['$start_with?']("[[")) ? $$($nesting, 'LeadingInlineAnchorRx')['$=~'](item_text) : $a))) { - self.$catalog_inline_anchor((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), list_item, reader)}; - } else { - - - $writer = [sibling_trait]; - $send(list_item, 'marker=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(($truthy($a = item_text['$start_with?']("[[")) ? $$($nesting, 'LeadingInlineAnchorRx')['$=~'](item_text) : $a))) { - self.$catalog_inline_anchor((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), list_item, reader)}; - }; - }; - reader.$shift(); - block_cursor = reader.$cursor(); - list_item_reader = $$($nesting, 'Reader').$new(self.$read_lines_for_list_item(reader, list_type, sibling_trait, has_text), block_cursor); - if ($truthy(list_item_reader['$has_more_lines?']())) { - - if ($truthy(sourcemap_assignment_deferred)) { - - $writer = [block_cursor]; - $send(list_item, 'source_location=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - comment_lines = list_item_reader.$skip_line_comments(); - if ($truthy((subsequent_line = list_item_reader.$peek_line()))) { - - if ($truthy(comment_lines['$empty?']())) { - } else { - list_item_reader.$unshift_lines(comment_lines) - }; - if ($truthy(subsequent_line['$empty?']())) { - } else { - - content_adjacent = true; - if ($truthy(dlist)) { - } else { - has_text = nil - }; - };}; - if ($truthy((block = self.$next_block(list_item_reader, list_item, $hash2([], {}), $hash2(["text_only", "list_type"], {"text_only": (function() {if ($truthy(has_text)) { - return nil - } else { - return true - }; return nil; })(), "list_type": list_type}))))) { - list_item.$blocks()['$<<'](block)}; - while ($truthy(list_item_reader['$has_more_lines?']())) { - if ($truthy((block = self.$next_block(list_item_reader, list_item, $hash2([], {}), $hash2(["list_type"], {"list_type": list_type}))))) { - list_item.$blocks()['$<<'](block)} - }; - if ($truthy(($truthy($a = ($truthy($b = content_adjacent) ? (first_block = list_item.$blocks()['$[]'](0)) : $b)) ? first_block.$context()['$==']("paragraph") : $a))) { - list_item.$fold_first()};}; - if ($truthy(dlist)) { - return [[list_term], (function() {if ($truthy(($truthy($a = list_item['$text?']()) ? $a : list_item['$blocks?']()))) { - return list_item - } else { - return nil - }; return nil; })()] - } else { - return list_item - }; - }, $Parser_parse_list_item$27.$$arity = -5); - Opal.defs(self, '$read_lines_for_list_item', $Parser_read_lines_for_list_item$28 = function $$read_lines_for_list_item(reader, list_type, sibling_trait, has_text) { - var $a, $b, $c, $$29, $$30, $$31, $$32, $$33, self = this, buffer = nil, continuation = nil, within_nested_list = nil, detached_continuation = nil, dlist = nil, this_line = nil, prev_line = nil, $writer = nil, match = nil, nested_list_type = nil, last_line = nil; - - - - if (sibling_trait == null) { - sibling_trait = nil; - }; - - if (has_text == null) { - has_text = true; - }; - buffer = []; - continuation = "inactive"; - within_nested_list = false; - detached_continuation = nil; - dlist = list_type['$==']("dlist"); - while ($truthy(reader['$has_more_lines?']())) { - - this_line = reader.$read_line(); - if ($truthy(self['$is_sibling_list_item?'](this_line, list_type, sibling_trait))) { - break;}; - prev_line = (function() {if ($truthy(buffer['$empty?']())) { - return nil - } else { - return buffer['$[]'](-1) - }; return nil; })(); - if (prev_line['$==']($$($nesting, 'LIST_CONTINUATION'))) { - - if (continuation['$==']("inactive")) { - - continuation = "active"; - has_text = true; - if ($truthy(within_nested_list)) { - } else { - - $writer = [-1, ""]; - $send(buffer, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - };}; - if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) { - - if ($truthy(continuation['$!=']("frozen"))) { - - continuation = "frozen"; - buffer['$<<'](this_line);}; - this_line = nil; - continue;;};}; - if ($truthy((match = self['$is_delimited_block?'](this_line, true)))) { - if (continuation['$==']("active")) { - - buffer['$<<'](this_line); - buffer.$concat(reader.$read_lines_until($hash2(["terminator", "read_last_line", "context"], {"terminator": match.$terminator(), "read_last_line": true, "context": nil}))); - continuation = "inactive"; - } else { - break; - } - } else if ($truthy(($truthy($b = ($truthy($c = dlist) ? continuation['$!=']("active") : $c)) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](this_line) : $b))) { - break; - } else if ($truthy((($b = continuation['$==']("active")) ? this_line['$empty?']()['$!']() : continuation['$==']("active")))) { - if ($truthy($$($nesting, 'LiteralParagraphRx')['$match?'](this_line))) { - - reader.$unshift_line(this_line); - if ($truthy(dlist)) { - buffer.$concat($send(reader, 'read_lines_until', [$hash2(["preserve_last_line", "break_on_blank_lines", "break_on_list_continuation"], {"preserve_last_line": true, "break_on_blank_lines": true, "break_on_list_continuation": true})], ($$29 = function(line){var self = $$29.$$s || this; - - - - if (line == null) { - line = nil; - }; - return self['$is_sibling_list_item?'](line, list_type, sibling_trait);}, $$29.$$s = self, $$29.$$arity = 1, $$29))) - } else { - buffer.$concat(reader.$read_lines_until($hash2(["preserve_last_line", "break_on_blank_lines", "break_on_list_continuation"], {"preserve_last_line": true, "break_on_blank_lines": true, "break_on_list_continuation": true}))) - }; - continuation = "inactive"; - } else if ($truthy(($truthy($b = ($truthy($c = $$($nesting, 'BlockTitleRx')['$match?'](this_line)) ? $c : $$($nesting, 'BlockAttributeLineRx')['$match?'](this_line))) ? $b : $$($nesting, 'AttributeEntryRx')['$match?'](this_line)))) { - buffer['$<<'](this_line) - } else { - - if ($truthy((nested_list_type = $send((function() {if ($truthy(within_nested_list)) { - return ["dlist"] - } else { - return $$($nesting, 'NESTABLE_LIST_CONTEXTS') - }; return nil; })(), 'find', [], ($$30 = function(ctx){var self = $$30.$$s || this; - - - - if (ctx == null) { - ctx = nil; - }; - return $$($nesting, 'ListRxMap')['$[]'](ctx)['$match?'](this_line);}, $$30.$$s = self, $$30.$$arity = 1, $$30))))) { - - within_nested_list = true; - if ($truthy((($b = nested_list_type['$==']("dlist")) ? (($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$nil_or_empty?']() : nested_list_type['$==']("dlist")))) { - has_text = false};}; - buffer['$<<'](this_line); - continuation = "inactive"; - } - } else if ($truthy(($truthy($b = prev_line) ? prev_line['$empty?']() : $b))) { - - if ($truthy(this_line['$empty?']())) { - - if ($truthy((this_line = ($truthy($b = reader.$skip_blank_lines()) ? reader.$read_line() : $b)))) { - } else { - break; - }; - if ($truthy(self['$is_sibling_list_item?'](this_line, list_type, sibling_trait))) { - break;};}; - if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) { - - detached_continuation = buffer.$size(); - buffer['$<<'](this_line); - } else if ($truthy(has_text)) { - if ($truthy(self['$is_sibling_list_item?'](this_line, list_type, sibling_trait))) { - break; - } else if ($truthy((nested_list_type = $send($$($nesting, 'NESTABLE_LIST_CONTEXTS'), 'find', [], ($$31 = function(ctx){var self = $$31.$$s || this; - - - - if (ctx == null) { - ctx = nil; - }; - return $$($nesting, 'ListRxMap')['$[]'](ctx)['$=~'](this_line);}, $$31.$$s = self, $$31.$$arity = 1, $$31))))) { - - buffer['$<<'](this_line); - within_nested_list = true; - if ($truthy((($b = nested_list_type['$==']("dlist")) ? (($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$nil_or_empty?']() : nested_list_type['$==']("dlist")))) { - has_text = false}; - } else if ($truthy($$($nesting, 'LiteralParagraphRx')['$match?'](this_line))) { - - reader.$unshift_line(this_line); - if ($truthy(dlist)) { - buffer.$concat($send(reader, 'read_lines_until', [$hash2(["preserve_last_line", "break_on_blank_lines", "break_on_list_continuation"], {"preserve_last_line": true, "break_on_blank_lines": true, "break_on_list_continuation": true})], ($$32 = function(line){var self = $$32.$$s || this; - - - - if (line == null) { - line = nil; - }; - return self['$is_sibling_list_item?'](line, list_type, sibling_trait);}, $$32.$$s = self, $$32.$$arity = 1, $$32))) - } else { - buffer.$concat(reader.$read_lines_until($hash2(["preserve_last_line", "break_on_blank_lines", "break_on_list_continuation"], {"preserve_last_line": true, "break_on_blank_lines": true, "break_on_list_continuation": true}))) - }; - } else { - break; - } - } else { - - if ($truthy(within_nested_list)) { - } else { - buffer.$pop() - }; - buffer['$<<'](this_line); - has_text = true; - }; - } else { - - if ($truthy(this_line['$empty?']())) { - } else { - has_text = true - }; - if ($truthy((nested_list_type = $send((function() {if ($truthy(within_nested_list)) { - return ["dlist"] - } else { - return $$($nesting, 'NESTABLE_LIST_CONTEXTS') - }; return nil; })(), 'find', [], ($$33 = function(ctx){var self = $$33.$$s || this; - - - - if (ctx == null) { - ctx = nil; - }; - return $$($nesting, 'ListRxMap')['$[]'](ctx)['$=~'](this_line);}, $$33.$$s = self, $$33.$$arity = 1, $$33))))) { - - within_nested_list = true; - if ($truthy((($b = nested_list_type['$==']("dlist")) ? (($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$nil_or_empty?']() : nested_list_type['$==']("dlist")))) { - has_text = false};}; - buffer['$<<'](this_line); - }; - this_line = nil; - }; - if ($truthy(this_line)) { - reader.$unshift_line(this_line)}; - if ($truthy(detached_continuation)) { - - $writer = [detached_continuation, ""]; - $send(buffer, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - while (!($truthy(buffer['$empty?']()))) { - if ($truthy((last_line = buffer['$[]'](-1))['$empty?']())) { - buffer.$pop() - } else { - - if (last_line['$==']($$($nesting, 'LIST_CONTINUATION'))) { - buffer.$pop()}; - break;; - } - }; - return buffer; - }, $Parser_read_lines_for_list_item$28.$$arity = -3); - Opal.defs(self, '$initialize_section', $Parser_initialize_section$34 = function $$initialize_section(reader, parent, attributes) { - var $a, $b, self = this, document = nil, book = nil, doctype = nil, source_location = nil, sect_style = nil, sect_id = nil, sect_reftext = nil, sect_title = nil, sect_level = nil, sect_atx = nil, $writer = nil, sect_name = nil, sect_special = nil, sect_numbered = nil, section = nil, id = nil, generated_id = nil; - - - - if (attributes == null) { - attributes = $hash2([], {}); - }; - document = parent.$document(); - book = (doctype = document.$doctype())['$==']("book"); - if ($truthy(document.$sourcemap())) { - source_location = reader.$cursor()}; - sect_style = attributes['$[]'](1); - $b = self.$parse_section_title(reader, document, attributes['$[]']("id")), $a = Opal.to_ary($b), (sect_id = ($a[0] == null ? nil : $a[0])), (sect_reftext = ($a[1] == null ? nil : $a[1])), (sect_title = ($a[2] == null ? nil : $a[2])), (sect_level = ($a[3] == null ? nil : $a[3])), (sect_atx = ($a[4] == null ? nil : $a[4])), $b; - if ($truthy(sect_reftext)) { - - $writer = ["reftext", sect_reftext]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - sect_reftext = attributes['$[]']("reftext") - }; - if ($truthy(sect_style)) { - if ($truthy(($truthy($a = book) ? sect_style['$==']("abstract") : $a))) { - $a = ["chapter", 1], (sect_name = $a[0]), (sect_level = $a[1]), $a - } else if ($truthy(($truthy($a = sect_style['$start_with?']("sect")) ? $$($nesting, 'SectionLevelStyleRx')['$match?'](sect_style) : $a))) { - sect_name = "section" - } else { - - $a = [sect_style, true], (sect_name = $a[0]), (sect_special = $a[1]), $a; - if (sect_level['$=='](0)) { - sect_level = 1}; - sect_numbered = sect_name['$==']("appendix"); - } - } else if ($truthy(book)) { - sect_name = (function() {if (sect_level['$=='](0)) { - return "part" - } else { - - if ($truthy($rb_gt(sect_level, 1))) { - return "section" - } else { - return "chapter" - }; - }; return nil; })() - } else if ($truthy((($a = doctype['$==']("manpage")) ? sect_title.$casecmp("synopsis")['$=='](0) : doctype['$==']("manpage")))) { - $a = ["synopsis", true], (sect_name = $a[0]), (sect_special = $a[1]), $a - } else { - sect_name = "section" - }; - section = $$($nesting, 'Section').$new(parent, sect_level); - $a = [sect_id, sect_title, sect_name, source_location], section['$id=']($a[0]), section['$title=']($a[1]), section['$sectname=']($a[2]), section['$source_location=']($a[3]), $a; - if ($truthy(sect_special)) { - - - $writer = [true]; - $send(section, 'special=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(sect_numbered)) { - - $writer = [true]; - $send(section, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else if (document.$attributes()['$[]']("sectnums")['$==']("all")) { - - $writer = [(function() {if ($truthy(($truthy($a = book) ? sect_level['$=='](1) : $a))) { - return "chapter" - } else { - return true - }; return nil; })()]; - $send(section, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - } else if ($truthy(($truthy($a = document.$attributes()['$[]']("sectnums")) ? $rb_gt(sect_level, 0) : $a))) { - - $writer = [(function() {if ($truthy(section.$special())) { - return ($truthy($a = parent.$numbered()) ? true : $a) - } else { - return true - }; return nil; })()]; - $send(section, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else if ($truthy(($truthy($a = ($truthy($b = book) ? sect_level['$=='](0) : $b)) ? document.$attributes()['$[]']("partnums") : $a))) { - - $writer = [true]; - $send(section, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy((id = ($truthy($a = section.$id()) ? $a : (($writer = [(function() {if ($truthy(document.$attributes()['$key?']("sectids"))) { - - return (generated_id = $$($nesting, 'Section').$generate_id(section.$title(), document)); - } else { - return nil - }; return nil; })()]), $send(section, 'id=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))))) { - - if ($truthy(generated_id)) { - } else if ($truthy(sect_title['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - section.$title()}; - if ($truthy(document.$register("refs", [id, section]))) { - } else { - self.$logger().$warn(self.$message_with_context("" + "id assigned to section already in use: " + (id), $hash2(["source_location"], {"source_location": reader.$cursor_at_line($rb_minus(reader.$lineno(), (function() {if ($truthy(sect_atx)) { - return 1 - } else { - return 2 - }; return nil; })()))}))) - };}; - section.$update_attributes(attributes); - reader.$skip_blank_lines(); - return section; - }, $Parser_initialize_section$34.$$arity = -3); - Opal.defs(self, '$is_next_line_section?', $Parser_is_next_line_section$ques$35 = function(reader, attributes) { - var $a, $b, self = this, style = nil, next_lines = nil; - - if ($truthy(($truthy($a = (style = attributes['$[]'](1))) ? ($truthy($b = style['$==']("discrete")) ? $b : style['$==']("float")) : $a))) { - return nil - } else if ($truthy($$($nesting, 'Compliance').$underline_style_section_titles())) { - - next_lines = reader.$peek_lines(2, ($truthy($a = style) ? style['$==']("comment") : $a)); - return self['$is_section_title?'](($truthy($a = next_lines['$[]'](0)) ? $a : ""), next_lines['$[]'](1)); - } else { - return self['$atx_section_title?'](($truthy($a = reader.$peek_line()) ? $a : "")) - } - }, $Parser_is_next_line_section$ques$35.$$arity = 2); - Opal.defs(self, '$is_next_line_doctitle?', $Parser_is_next_line_doctitle$ques$36 = function(reader, attributes, leveloffset) { - var $a, self = this, sect_level = nil; - - if ($truthy(leveloffset)) { - return ($truthy($a = (sect_level = self['$is_next_line_section?'](reader, attributes))) ? $rb_plus(sect_level, leveloffset.$to_i())['$=='](0) : $a) - } else { - return self['$is_next_line_section?'](reader, attributes)['$=='](0) - } - }, $Parser_is_next_line_doctitle$ques$36.$$arity = 3); - Opal.defs(self, '$is_section_title?', $Parser_is_section_title$ques$37 = function(line1, line2) { - var $a, self = this; - - - - if (line2 == null) { - line2 = nil; - }; - return ($truthy($a = self['$atx_section_title?'](line1)) ? $a : (function() {if ($truthy(line2['$nil_or_empty?']())) { - return nil - } else { - return self['$setext_section_title?'](line1, line2) - }; return nil; })()); - }, $Parser_is_section_title$ques$37.$$arity = -2); - Opal.defs(self, '$atx_section_title?', $Parser_atx_section_title$ques$38 = function(line) { - var $a, self = this; - - if ($truthy((function() {if ($truthy($$($nesting, 'Compliance').$markdown_syntax())) { - - return ($truthy($a = line['$start_with?']("=", "#")) ? $$($nesting, 'ExtAtxSectionTitleRx')['$=~'](line) : $a); - } else { - - return ($truthy($a = line['$start_with?']("=")) ? $$($nesting, 'AtxSectionTitleRx')['$=~'](line) : $a); - }; return nil; })())) { - return $rb_minus((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)).$length(), 1) - } else { - return nil - } - }, $Parser_atx_section_title$ques$38.$$arity = 1); - Opal.defs(self, '$setext_section_title?', $Parser_setext_section_title$ques$39 = function(line1, line2) { - var $a, $b, $c, self = this, level = nil, line2_ch0 = nil, line2_len = nil; - - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = (level = $$($nesting, 'SETEXT_SECTION_LEVELS')['$[]']((line2_ch0 = line2.$chr())))) ? self['$uniform?'](line2, line2_ch0, (line2_len = line2.$length())) : $c)) ? $$($nesting, 'SetextSectionTitleRx')['$match?'](line1) : $b)) ? $rb_lt($rb_minus(line1.$length(), line2_len).$abs(), 2) : $a))) { - return level - } else { - return nil - } - }, $Parser_setext_section_title$ques$39.$$arity = 2); - Opal.defs(self, '$parse_section_title', $Parser_parse_section_title$40 = function $$parse_section_title(reader, document, sect_id) { - var $a, $b, $c, $d, $e, self = this, sect_reftext = nil, line1 = nil, sect_level = nil, sect_title = nil, atx = nil, line2 = nil, line2_ch0 = nil, line2_len = nil; - - - - if (sect_id == null) { - sect_id = nil; - }; - sect_reftext = nil; - line1 = reader.$read_line(); - if ($truthy((function() {if ($truthy($$($nesting, 'Compliance').$markdown_syntax())) { - - return ($truthy($a = line1['$start_with?']("=", "#")) ? $$($nesting, 'ExtAtxSectionTitleRx')['$=~'](line1) : $a); - } else { - - return ($truthy($a = line1['$start_with?']("=")) ? $$($nesting, 'AtxSectionTitleRx')['$=~'](line1) : $a); - }; return nil; })())) { - - $a = [$rb_minus((($b = $gvars['~']) === nil ? nil : $b['$[]'](1)).$length(), 1), (($b = $gvars['~']) === nil ? nil : $b['$[]'](2)), true], (sect_level = $a[0]), (sect_title = $a[1]), (atx = $a[2]), $a; - if ($truthy(sect_id)) { - } else if ($truthy(($truthy($a = ($truthy($b = sect_title['$end_with?']("]]")) ? $$($nesting, 'InlineSectionAnchorRx')['$=~'](sect_title) : $b)) ? (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))['$!']() : $a))) { - $a = [sect_title.$slice(0, $rb_minus(sect_title.$length(), (($b = $gvars['~']) === nil ? nil : $b['$[]'](0)).$length())), (($b = $gvars['~']) === nil ? nil : $b['$[]'](2)), (($b = $gvars['~']) === nil ? nil : $b['$[]'](3))], (sect_title = $a[0]), (sect_id = $a[1]), (sect_reftext = $a[2]), $a}; - } else if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = ($truthy($d = ($truthy($e = $$($nesting, 'Compliance').$underline_style_section_titles()) ? (line2 = reader.$peek_line(true)) : $e)) ? (sect_level = $$($nesting, 'SETEXT_SECTION_LEVELS')['$[]']((line2_ch0 = line2.$chr()))) : $d)) ? self['$uniform?'](line2, line2_ch0, (line2_len = line2.$length())) : $c)) ? (sect_title = ($truthy($c = $$($nesting, 'SetextSectionTitleRx')['$=~'](line1)) ? (($d = $gvars['~']) === nil ? nil : $d['$[]'](1)) : $c)) : $b)) ? $rb_lt($rb_minus(line1.$length(), line2_len).$abs(), 2) : $a))) { - - atx = false; - if ($truthy(sect_id)) { - } else if ($truthy(($truthy($a = ($truthy($b = sect_title['$end_with?']("]]")) ? $$($nesting, 'InlineSectionAnchorRx')['$=~'](sect_title) : $b)) ? (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))['$!']() : $a))) { - $a = [sect_title.$slice(0, $rb_minus(sect_title.$length(), (($b = $gvars['~']) === nil ? nil : $b['$[]'](0)).$length())), (($b = $gvars['~']) === nil ? nil : $b['$[]'](2)), (($b = $gvars['~']) === nil ? nil : $b['$[]'](3))], (sect_title = $a[0]), (sect_id = $a[1]), (sect_reftext = $a[2]), $a}; - reader.$shift(); - } else { - self.$raise("" + "Unrecognized section at " + (reader.$cursor_at_prev_line())) - }; - if ($truthy(document['$attr?']("leveloffset"))) { - - sect_level = $rb_plus(sect_level, document.$attr("leveloffset").$to_i()); - if ($truthy($rb_lt(sect_level, 0))) { - sect_level = 0};}; - return [sect_id, sect_reftext, sect_title, sect_level, atx]; - }, $Parser_parse_section_title$40.$$arity = -3); - Opal.defs(self, '$parse_header_metadata', $Parser_parse_header_metadata$41 = function $$parse_header_metadata(reader, document) { - var $a, $$42, $$43, $$44, self = this, doc_attrs = nil, implicit_authors = nil, metadata = nil, implicit_author = nil, implicit_authorinitials = nil, author_metadata = nil, rev_metadata = nil, rev_line = nil, match = nil, $writer = nil, component = nil, author_line = nil, authors = nil, author_idx = nil, author_key = nil, explicit = nil, sparse = nil, author_override = nil; - - - - if (document == null) { - document = nil; - }; - doc_attrs = ($truthy($a = document) ? document.$attributes() : $a); - self.$process_attribute_entries(reader, document); - $a = [(implicit_authors = $hash2([], {})), nil, nil], (metadata = $a[0]), (implicit_author = $a[1]), (implicit_authorinitials = $a[2]), $a; - if ($truthy(($truthy($a = reader['$has_more_lines?']()) ? reader['$next_line_empty?']()['$!']() : $a))) { - - if ($truthy((author_metadata = self.$process_authors(reader.$read_line()))['$empty?']())) { - } else { - - if ($truthy(document)) { - - $send(author_metadata, 'each', [], ($$42 = function(key, val){var self = $$42.$$s || this, $writer = nil; - - - - if (key == null) { - key = nil; - }; - - if (val == null) { - val = nil; - }; - if ($truthy(doc_attrs['$key?'](key))) { - return nil - } else { - - $writer = [key, (function() {if ($truthy($$$('::', 'String')['$==='](val))) { - - return document.$apply_header_subs(val); - } else { - return val - }; return nil; })()]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - };}, $$42.$$s = self, $$42.$$arity = 2, $$42)); - implicit_author = doc_attrs['$[]']("author"); - implicit_authorinitials = doc_attrs['$[]']("authorinitials"); - implicit_authors = doc_attrs['$[]']("authors");}; - metadata = author_metadata; - }; - self.$process_attribute_entries(reader, document); - rev_metadata = $hash2([], {}); - if ($truthy(($truthy($a = reader['$has_more_lines?']()) ? reader['$next_line_empty?']()['$!']() : $a))) { - - rev_line = reader.$read_line(); - if ($truthy((match = $$($nesting, 'RevisionInfoLineRx').$match(rev_line)))) { - - if ($truthy(match['$[]'](1))) { - - $writer = ["revnumber", match['$[]'](1).$rstrip()]; - $send(rev_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy((component = match['$[]'](2).$strip())['$empty?']())) { - } else if ($truthy(($truthy($a = match['$[]'](1)['$!']()) ? component['$start_with?']("v") : $a))) { - - $writer = ["revnumber", component.$slice(1, component.$length())]; - $send(rev_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = ["revdate", component]; - $send(rev_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy(match['$[]'](3))) { - - $writer = ["revremark", match['$[]'](3).$rstrip()]; - $send(rev_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - } else { - reader.$unshift_line(rev_line) - };}; - if ($truthy(rev_metadata['$empty?']())) { - } else { - - if ($truthy(document)) { - $send(rev_metadata, 'each', [], ($$43 = function(key, val){var self = $$43.$$s || this; - - - - if (key == null) { - key = nil; - }; - - if (val == null) { - val = nil; - }; - if ($truthy(doc_attrs['$key?'](key))) { - return nil - } else { - - $writer = [key, document.$apply_header_subs(val)]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - };}, $$43.$$s = self, $$43.$$arity = 2, $$43))}; - metadata.$update(rev_metadata); - }; - self.$process_attribute_entries(reader, document); - reader.$skip_blank_lines(); - } else { - author_metadata = $hash2([], {}) - }; - if ($truthy(document)) { - - if ($truthy(($truthy($a = doc_attrs['$key?']("author")) ? (author_line = doc_attrs['$[]']("author"))['$!='](implicit_author) : $a))) { - - author_metadata = self.$process_authors(author_line, true, false); - if ($truthy(doc_attrs['$[]']("authorinitials")['$!='](implicit_authorinitials))) { - author_metadata.$delete("authorinitials")}; - } else if ($truthy(($truthy($a = doc_attrs['$key?']("authors")) ? (author_line = doc_attrs['$[]']("authors"))['$!='](implicit_authors) : $a))) { - author_metadata = self.$process_authors(author_line, true) - } else { - - $a = [[], 1, "author_1", false, false], (authors = $a[0]), (author_idx = $a[1]), (author_key = $a[2]), (explicit = $a[3]), (sparse = $a[4]), $a; - while ($truthy(doc_attrs['$key?'](author_key))) { - - if ((author_override = doc_attrs['$[]'](author_key))['$=='](author_metadata['$[]'](author_key))) { - - authors['$<<'](nil); - sparse = true; - } else { - - authors['$<<'](author_override); - explicit = true; - }; - author_key = "" + "author_" + ((author_idx = $rb_plus(author_idx, 1))); - }; - if ($truthy(explicit)) { - - if ($truthy(sparse)) { - $send(authors, 'each_with_index', [], ($$44 = function(author, idx){var self = $$44.$$s || this, $$45, name_idx = nil; - - - - if (author == null) { - author = nil; - }; - - if (idx == null) { - idx = nil; - }; - if ($truthy(author)) { - return nil - } else { - - $writer = [idx, $send([author_metadata['$[]']("" + "firstname_" + ((name_idx = $rb_plus(idx, 1)))), author_metadata['$[]']("" + "middlename_" + (name_idx)), author_metadata['$[]']("" + "lastname_" + (name_idx))].$compact(), 'map', [], ($$45 = function(it){var self = $$45.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$tr(" ", "_");}, $$45.$$s = self, $$45.$$arity = 1, $$45)).$join(" ")]; - $send(authors, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - };}, $$44.$$s = self, $$44.$$arity = 2, $$44))}; - author_metadata = self.$process_authors(authors, true, false); - } else { - author_metadata = $hash2([], {}) - }; - }; - if ($truthy(author_metadata['$empty?']())) { - ($truthy($a = metadata['$[]']("authorcount")) ? $a : (($writer = ["authorcount", (($writer = ["authorcount", 0]), $send(doc_attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]), $send(metadata, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - } else { - - doc_attrs.$update(author_metadata); - if ($truthy(($truthy($a = doc_attrs['$key?']("email")['$!']()) ? doc_attrs['$key?']("email_1") : $a))) { - - $writer = ["email", doc_attrs['$[]']("email_1")]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - };}; - return metadata; - }, $Parser_parse_header_metadata$41.$$arity = -2); - Opal.defs(self, '$process_authors', $Parser_process_authors$46 = function $$process_authors(author_line, names_only, multiple) { - var $a, $$47, self = this, author_metadata = nil, author_idx = nil, $writer = nil; - - - - if (names_only == null) { - names_only = false; - }; - - if (multiple == null) { - multiple = true; - }; - author_metadata = $hash2([], {}); - author_idx = 0; - $send((function() {if ($truthy(($truthy($a = multiple) ? author_line['$include?'](";") : $a))) { - - return author_line.$split($$($nesting, 'AuthorDelimiterRx')); - } else { - return [].concat(Opal.to_a(author_line)) - }; return nil; })(), 'each', [], ($$47 = function(author_entry){var self = $$47.$$s || this, $$48, $$49, $b, $$50, key_map = nil, $writer = nil, segments = nil, match = nil, author = nil, fname = nil, mname = nil, lname = nil; - - - - if (author_entry == null) { - author_entry = nil; - }; - if ($truthy(author_entry['$empty?']())) { - return nil;}; - key_map = $hash2([], {}); - if ((author_idx = $rb_plus(author_idx, 1))['$=='](1)) { - $send($$($nesting, 'AuthorKeys'), 'each', [], ($$48 = function(key){var self = $$48.$$s || this, $writer = nil; - - - - if (key == null) { - key = nil; - }; - $writer = [key.$to_sym(), key]; - $send(key_map, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$48.$$s = self, $$48.$$arity = 1, $$48)) - } else { - $send($$($nesting, 'AuthorKeys'), 'each', [], ($$49 = function(key){var self = $$49.$$s || this, $writer = nil; - - - - if (key == null) { - key = nil; - }; - $writer = [key.$to_sym(), "" + (key) + "_" + (author_idx)]; - $send(key_map, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$49.$$s = self, $$49.$$arity = 1, $$49)) - }; - if ($truthy(names_only)) { - - if ($truthy(author_entry['$include?']("<"))) { - - - $writer = [key_map['$[]']("author"), author_entry.$tr("_", " ")]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - author_entry = author_entry.$gsub($$($nesting, 'XmlSanitizeRx'), "");}; - if ((segments = author_entry.$split(nil, 3)).$size()['$=='](3)) { - segments['$<<'](segments.$pop().$squeeze(" "))}; - } else if ($truthy((match = $$($nesting, 'AuthorInfoLineRx').$match(author_entry)))) { - (segments = match.$to_a()).$shift()}; - if ($truthy(segments)) { - - author = (($writer = [key_map['$[]']("firstname"), (fname = segments['$[]'](0).$tr("_", " "))]), $send(author_metadata, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]); - - $writer = [key_map['$[]']("authorinitials"), fname.$chr()]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(segments['$[]'](1))) { - if ($truthy(segments['$[]'](2))) { - - - $writer = [key_map['$[]']("middlename"), (mname = segments['$[]'](1).$tr("_", " "))]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [key_map['$[]']("lastname"), (lname = segments['$[]'](2).$tr("_", " "))]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - author = $rb_plus($rb_plus($rb_plus($rb_plus(fname, " "), mname), " "), lname); - - $writer = [key_map['$[]']("authorinitials"), "" + (fname.$chr()) + (mname.$chr()) + (lname.$chr())]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - - - $writer = [key_map['$[]']("lastname"), (lname = segments['$[]'](1).$tr("_", " "))]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - author = $rb_plus($rb_plus(fname, " "), lname); - - $writer = [key_map['$[]']("authorinitials"), "" + (fname.$chr()) + (lname.$chr())]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }}; - ($truthy($b = author_metadata['$[]'](key_map['$[]']("author"))) ? $b : (($writer = [key_map['$[]']("author"), author]), $send(author_metadata, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy(($truthy($b = names_only) ? $b : segments['$[]'](3)['$!']()))) { - } else { - - $writer = [key_map['$[]']("email"), segments['$[]'](3)]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - } else { - - - $writer = [key_map['$[]']("author"), (($writer = [key_map['$[]']("firstname"), (fname = author_entry.$squeeze(" ").$strip())]), $send(author_metadata, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [key_map['$[]']("authorinitials"), fname.$chr()]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }; - if (author_idx['$=='](1)) { - - $writer = ["authors", author_metadata['$[]'](key_map['$[]']("author"))]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - - if (author_idx['$=='](2)) { - $send($$($nesting, 'AuthorKeys'), 'each', [], ($$50 = function(key){var self = $$50.$$s || this; - - - - if (key == null) { - key = nil; - }; - if ($truthy(author_metadata['$key?'](key))) { - - $writer = ["" + (key) + "_1", author_metadata['$[]'](key)]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - return nil - };}, $$50.$$s = self, $$50.$$arity = 1, $$50))}; - - $writer = ["authors", "" + (author_metadata['$[]']("authors")) + ", " + (author_metadata['$[]'](key_map['$[]']("author")))]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - };}, $$47.$$s = self, $$47.$$arity = 1, $$47)); - - $writer = ["authorcount", author_idx]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return author_metadata; - }, $Parser_process_authors$46.$$arity = -2); - Opal.defs(self, '$parse_block_metadata_lines', $Parser_parse_block_metadata_lines$51 = function $$parse_block_metadata_lines(reader, document, attributes, options) { - var $a, $b, self = this; - - - - if (attributes == null) { - attributes = $hash2([], {}); - }; - - if (options == null) { - options = $hash2([], {}); - }; - while ($truthy(self.$parse_block_metadata_line(reader, document, attributes, options))) { - - reader.$shift(); - if ($truthy($b = reader.$skip_blank_lines())) { - $b - } else { - break; - }; - }; - return attributes; - }, $Parser_parse_block_metadata_lines$51.$$arity = -3); - Opal.defs(self, '$parse_block_metadata_line', $Parser_parse_block_metadata_line$52 = function $$parse_block_metadata_line(reader, document, attributes, options) { - var $a, $b, self = this, next_line = nil, normal = nil, $writer = nil, reftext = nil, current_style = nil, ll = nil; - if ($gvars["~"] == null) $gvars["~"] = nil; - - - - if (options == null) { - options = $hash2([], {}); - }; - if ($truthy(($truthy($a = (next_line = reader.$peek_line())) ? (function() {if ($truthy(options['$[]']("text_only"))) { - - return next_line['$start_with?']("[", "/"); - } else { - - return (normal = next_line['$start_with?']("[", ".", "/", ":")); - }; return nil; })() : $a))) { - if ($truthy(next_line['$start_with?']("["))) { - if ($truthy(next_line['$start_with?']("[["))) { - if ($truthy(($truthy($a = next_line['$end_with?']("]]")) ? $$($nesting, 'BlockAnchorRx')['$=~'](next_line) : $a))) { - - - $writer = ["id", (($a = $gvars['~']) === nil ? nil : $a['$[]'](1))]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy((reftext = (($a = $gvars['~']) === nil ? nil : $a['$[]'](2))))) { - - $writer = ["reftext", (function() {if ($truthy(reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - - return document.$sub_attributes(reftext); - } else { - return reftext - }; return nil; })()]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return true; - } else { - return nil - } - } else if ($truthy(($truthy($a = next_line['$end_with?']("]")) ? $$($nesting, 'BlockAttributeListRx')['$=~'](next_line) : $a))) { - - current_style = attributes['$[]'](1); - if ($truthy(document.$parse_attributes((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), [], $hash2(["sub_input", "sub_result", "into"], {"sub_input": true, "sub_result": true, "into": attributes}))['$[]'](1))) { - - $writer = [1, ($truthy($a = self.$parse_style_attribute(attributes, reader)) ? $a : current_style)]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return true; - } else { - return nil - } - } else if ($truthy(($truthy($a = normal) ? next_line['$start_with?'](".") : $a))) { - if ($truthy($$($nesting, 'BlockTitleRx')['$=~'](next_line))) { - - - $writer = ["title", (($a = $gvars['~']) === nil ? nil : $a['$[]'](1))]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return true; - } else { - return nil - } - } else if ($truthy(($truthy($a = normal['$!']()) ? $a : next_line['$start_with?']("/")))) { - if ($truthy(next_line['$start_with?']("//"))) { - if (next_line['$==']("//")) { - return true - } else if ($truthy(($truthy($a = normal) ? self['$uniform?'](next_line, "/", (ll = next_line.$length())) : $a))) { - if (ll['$=='](3)) { - return nil - } else { - - reader.$read_lines_until($hash2(["terminator", "skip_first_line", "preserve_last_line", "skip_processing", "context"], {"terminator": next_line, "skip_first_line": true, "preserve_last_line": true, "skip_processing": true, "context": "comment"})); - return true; - } - } else if ($truthy(next_line['$start_with?']("///"))) { - return nil - } else { - return true - } - } else { - return nil - } - } else if ($truthy(($truthy($a = ($truthy($b = normal) ? next_line['$start_with?'](":") : $b)) ? $$($nesting, 'AttributeEntryRx')['$=~'](next_line) : $a))) { - - self.$process_attribute_entry(reader, document, attributes, $gvars["~"]); - return true; - } else { - return nil - } - } else { - return nil - }; - }, $Parser_parse_block_metadata_line$52.$$arity = -4); - Opal.defs(self, '$process_attribute_entries', $Parser_process_attribute_entries$53 = function $$process_attribute_entries(reader, document, attributes) { - var $a, self = this; - - - - if (attributes == null) { - attributes = nil; - }; - reader.$skip_comment_lines(); - while ($truthy(self.$process_attribute_entry(reader, document, attributes))) { - - reader.$shift(); - reader.$skip_comment_lines(); - }; - }, $Parser_process_attribute_entries$53.$$arity = -3); - Opal.defs(self, '$process_attribute_entry', $Parser_process_attribute_entry$54 = function $$process_attribute_entry(reader, document, attributes, match) { - var $a, $b, $c, self = this, value = nil, con = nil, next_line = nil, keep_open = nil; - - - - if (attributes == null) { - attributes = nil; - }; - - if (match == null) { - match = nil; - }; - if ($truthy(($truthy($a = match) ? $a : (match = (function() {if ($truthy(reader['$has_more_lines?']())) { - - return $$($nesting, 'AttributeEntryRx').$match(reader.$peek_line()); - } else { - return nil - }; return nil; })())))) { - - if ($truthy((value = match['$[]'](2))['$nil_or_empty?']())) { - value = "" - } else if ($truthy(value['$end_with?']($$($nesting, 'LINE_CONTINUATION'), $$($nesting, 'LINE_CONTINUATION_LEGACY')))) { - - $a = [value.$slice($rb_minus(value.$length(), 2), 2), value.$slice(0, $rb_minus(value.$length(), 2)).$rstrip()], (con = $a[0]), (value = $a[1]), $a; - while ($truthy(($truthy($b = reader.$advance()) ? (next_line = ($truthy($c = reader.$peek_line()) ? $c : ""))['$empty?']()['$!']() : $b))) { - - next_line = next_line.$lstrip(); - if ($truthy((keep_open = next_line['$end_with?'](con)))) { - next_line = next_line.$slice(0, $rb_minus(next_line.$length(), 2)).$rstrip()}; - value = "" + (value) + ((function() {if ($truthy(value['$end_with?']($$($nesting, 'HARD_LINE_BREAK')))) { - return $$($nesting, 'LF') - } else { - return " " - }; return nil; })()) + (next_line); - if ($truthy(keep_open)) { - } else { - break; - }; - };}; - self.$store_attribute(match['$[]'](1), value, document, attributes); - return true; - } else { - return nil - }; - }, $Parser_process_attribute_entry$54.$$arity = -3); - Opal.defs(self, '$store_attribute', $Parser_store_attribute$55 = function $$store_attribute(name, value, doc, attrs) { - var $a, self = this, resolved_value = nil; - - - - if (doc == null) { - doc = nil; - }; - - if (attrs == null) { - attrs = nil; - }; - if ($truthy(name['$end_with?']("!"))) { - - name = name.$chop(); - value = nil; - } else if ($truthy(name['$start_with?']("!"))) { - - name = name.$slice(1, name.$length()); - value = nil;}; - if ((name = self.$sanitize_attribute_name(name))['$==']("numbered")) { - name = "sectnums" - } else if (name['$==']("hardbreaks")) { - name = "hardbreaks-option" - } else if (name['$==']("showtitle")) { - self.$store_attribute("notitle", (function() {if ($truthy(value)) { - return nil - } else { - return "" - }; return nil; })(), doc, attrs)}; - if ($truthy(doc)) { - if ($truthy(value)) { - - if (name['$==']("leveloffset")) { - if ($truthy(value['$start_with?']("+"))) { - value = $rb_plus(doc.$attr("leveloffset", 0).$to_i(), value.$slice(1, value.$length()).$to_i()).$to_s() - } else if ($truthy(value['$start_with?']("-"))) { - value = $rb_minus(doc.$attr("leveloffset", 0).$to_i(), value.$slice(1, value.$length()).$to_i()).$to_s()}}; - if ($truthy((resolved_value = doc.$set_attribute(name, value)))) { - - value = resolved_value; - if ($truthy(attrs)) { - $$$($$($nesting, 'Document'), 'AttributeEntry').$new(name, value).$save_to(attrs)};}; - } else if ($truthy(($truthy($a = doc.$delete_attribute(name)) ? attrs : $a))) { - $$$($$($nesting, 'Document'), 'AttributeEntry').$new(name, value).$save_to(attrs)} - } else if ($truthy(attrs)) { - $$$($$($nesting, 'Document'), 'AttributeEntry').$new(name, value).$save_to(attrs)}; - return [name, value]; - }, $Parser_store_attribute$55.$$arity = -3); - Opal.defs(self, '$resolve_list_marker', $Parser_resolve_list_marker$56 = function $$resolve_list_marker(list_type, marker, ordinal, validate, reader) { - var self = this; - - - - if (ordinal == null) { - ordinal = 0; - }; - - if (validate == null) { - validate = false; - }; - - if (reader == null) { - reader = nil; - }; - if (list_type['$==']("ulist")) { - return marker - } else if (list_type['$==']("olist")) { - return self.$resolve_ordered_list_marker(marker, ordinal, validate, reader)['$[]'](0) - } else { - return "<1>" - }; - }, $Parser_resolve_list_marker$56.$$arity = -3); - Opal.defs(self, '$resolve_ordered_list_marker', $Parser_resolve_ordered_list_marker$57 = function $$resolve_ordered_list_marker(marker, ordinal, validate, reader) { - var $$58, $a, self = this, $case = nil, style = nil, expected = nil, actual = nil; - - - - if (ordinal == null) { - ordinal = 0; - }; - - if (validate == null) { - validate = false; - }; - - if (reader == null) { - reader = nil; - }; - if ($truthy(marker['$start_with?']("."))) { - return [marker]}; - $case = (style = $send($$($nesting, 'ORDERED_LIST_STYLES'), 'find', [], ($$58 = function(s){var self = $$58.$$s || this; - - - - if (s == null) { - s = nil; - }; - return $$($nesting, 'OrderedListMarkerRxMap')['$[]'](s)['$match?'](marker);}, $$58.$$s = self, $$58.$$arity = 1, $$58))); - if ("arabic"['$===']($case)) { - if ($truthy(validate)) { - - expected = $rb_plus(ordinal, 1); - actual = marker.$to_i();}; - marker = "1.";} - else if ("loweralpha"['$===']($case)) { - if ($truthy(validate)) { - - expected = $rb_plus("a"['$[]'](0).$ord(), ordinal).$chr(); - actual = marker.$chop();}; - marker = "a.";} - else if ("upperalpha"['$===']($case)) { - if ($truthy(validate)) { - - expected = $rb_plus("A"['$[]'](0).$ord(), ordinal).$chr(); - actual = marker.$chop();}; - marker = "A.";} - else if ("lowerroman"['$===']($case)) { - if ($truthy(validate)) { - - expected = $$($nesting, 'Helpers').$int_to_roman($rb_plus(ordinal, 1)).$downcase(); - actual = marker.$chop();}; - marker = "i)";} - else if ("upperroman"['$===']($case)) { - if ($truthy(validate)) { - - expected = $$($nesting, 'Helpers').$int_to_roman($rb_plus(ordinal, 1)); - actual = marker.$chop();}; - marker = "I)";}; - if ($truthy(($truthy($a = validate) ? expected['$!='](actual) : $a))) { - self.$logger().$warn(self.$message_with_context("" + "list item index: expected " + (expected) + ", got " + (actual), $hash2(["source_location"], {"source_location": reader.$cursor()})))}; - return [marker, style]; - }, $Parser_resolve_ordered_list_marker$57.$$arity = -2); - Opal.defs(self, '$is_sibling_list_item?', $Parser_is_sibling_list_item$ques$59 = function(line, list_type, sibling_trait) { - var $a, $b, self = this; - - if ($truthy($$$('::', 'Regexp')['$==='](sibling_trait))) { - return sibling_trait['$match?'](line) - } else { - return ($truthy($a = $$($nesting, 'ListRxMap')['$[]'](list_type)['$=~'](line)) ? sibling_trait['$=='](self.$resolve_list_marker(list_type, (($b = $gvars['~']) === nil ? nil : $b['$[]'](1)))) : $a) - } - }, $Parser_is_sibling_list_item$ques$59.$$arity = 3); - Opal.defs(self, '$parse_table', $Parser_parse_table$60 = function $$parse_table(table_reader, parent, attributes) { - var $a, $b, $c, $d, self = this, table = nil, colspecs = nil, explicit_colspecs = nil, skipped = nil, $writer = nil, implicit_header = nil, parser_ctx = nil, format = nil, loop_idx = nil, implicit_header_boundary = nil, line = nil, beyond_first = nil, next_cellspec = nil, m = nil, pre_match = nil, post_match = nil, $case = nil, cell_text = nil, $logical_op_recvr_tmp_2 = nil; - - - table = $$($nesting, 'Table').$new(parent, attributes); - if ($truthy(($truthy($a = attributes['$key?']("cols")) ? (colspecs = self.$parse_colspecs(attributes['$[]']("cols")))['$empty?']()['$!']() : $a))) { - - table.$create_columns(colspecs); - explicit_colspecs = true;}; - skipped = ($truthy($a = table_reader.$skip_blank_lines()) ? $a : 0); - if ($truthy(attributes['$[]']("header-option"))) { - - $writer = [true]; - $send(table, 'has_header_option=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else if ($truthy((($a = skipped['$=='](0)) ? attributes['$[]']("noheader-option")['$!']() : skipped['$=='](0)))) { - - - $writer = ["implicit"]; - $send(table, 'has_header_option=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - implicit_header = true;}; - parser_ctx = $$$($$($nesting, 'Table'), 'ParserContext').$new(table_reader, table, attributes); - $a = [parser_ctx.$format(), -1, nil], (format = $a[0]), (loop_idx = $a[1]), (implicit_header_boundary = $a[2]), $a; - $a = false; while ($a || $truthy((line = table_reader.$read_line()))) {$a = false; - - if ($truthy(($truthy($b = (beyond_first = $rb_gt((loop_idx = $rb_plus(loop_idx, 1)), 0))) ? line['$empty?']() : $b))) { - - line = nil; - if ($truthy(implicit_header_boundary)) { - implicit_header_boundary = $rb_plus(implicit_header_boundary, 1)}; - } else if (format['$==']("psv")) { - if ($truthy(parser_ctx['$starts_with_delimiter?'](line))) { - - line = line.$slice(1, line.$length()); - parser_ctx.$close_open_cell(); - if ($truthy(implicit_header_boundary)) { - implicit_header_boundary = nil}; - } else { - - $c = self.$parse_cellspec(line, "start", parser_ctx.$delimiter()), $b = Opal.to_ary($c), (next_cellspec = ($b[0] == null ? nil : $b[0])), (line = ($b[1] == null ? nil : $b[1])), $c; - if ($truthy(next_cellspec)) { - - parser_ctx.$close_open_cell(next_cellspec); - if ($truthy(implicit_header_boundary)) { - implicit_header_boundary = nil}; - } else if ($truthy(($truthy($b = implicit_header_boundary) ? implicit_header_boundary['$=='](loop_idx) : $b))) { - - $writer = [(implicit_header = (implicit_header_boundary = nil))]; - $send(table, 'has_header_option=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - }}; - if ($truthy(beyond_first)) { - } else { - - table_reader.$mark(); - if ($truthy(implicit_header)) { - if ($truthy(($truthy($b = table_reader['$has_more_lines?']()) ? table_reader.$peek_line()['$empty?']() : $b))) { - implicit_header_boundary = 1 - } else { - - $writer = [(implicit_header = nil)]; - $send(table, 'has_header_option=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }}; - }; - $b = false; while ($b || $truthy(true)) {$b = false; - if ($truthy(($truthy($c = line) ? (m = parser_ctx.$match_delimiter(line)) : $c))) { - - $c = [m.$pre_match(), m.$post_match()], (pre_match = $c[0]), (post_match = $c[1]), $c; - $case = format; - if ("csv"['$===']($case)) { - if ($truthy(parser_ctx['$buffer_has_unclosed_quotes?'](pre_match))) { - - parser_ctx.$skip_past_delimiter(pre_match); - if ($truthy((line = post_match)['$empty?']())) { - break;}; - $b = true; continue;;}; - - $writer = ["" + (parser_ctx.$buffer()) + (pre_match)]; - $send(parser_ctx, 'buffer=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;} - else if ("dsv"['$===']($case)) { - if ($truthy(pre_match['$end_with?']("\\"))) { - - parser_ctx.$skip_past_escaped_delimiter(pre_match); - if ($truthy((line = post_match)['$empty?']())) { - - - $writer = ["" + (parser_ctx.$buffer()) + ($$($nesting, 'LF'))]; - $send(parser_ctx, 'buffer=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - parser_ctx.$keep_cell_open(); - break;;}; - $b = true; continue;;}; - - $writer = ["" + (parser_ctx.$buffer()) + (pre_match)]; - $send(parser_ctx, 'buffer=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;} - else { - if ($truthy(pre_match['$end_with?']("\\"))) { - - parser_ctx.$skip_past_escaped_delimiter(pre_match); - if ($truthy((line = post_match)['$empty?']())) { - - - $writer = ["" + (parser_ctx.$buffer()) + ($$($nesting, 'LF'))]; - $send(parser_ctx, 'buffer=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - parser_ctx.$keep_cell_open(); - break;;}; - $b = true; continue;;}; - $d = self.$parse_cellspec(pre_match), $c = Opal.to_ary($d), (next_cellspec = ($c[0] == null ? nil : $c[0])), (cell_text = ($c[1] == null ? nil : $c[1])), $d; - parser_ctx.$push_cellspec(next_cellspec); - - $writer = ["" + (parser_ctx.$buffer()) + (cell_text)]; - $send(parser_ctx, 'buffer=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - if ($truthy((line = post_match)['$empty?']())) { - line = nil}; - parser_ctx.$close_cell(); - } else { - - - $writer = ["" + (parser_ctx.$buffer()) + (line) + ($$($nesting, 'LF'))]; - $send(parser_ctx, 'buffer=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - $case = format; - if ("csv"['$===']($case)) {if ($truthy(parser_ctx['$buffer_has_unclosed_quotes?']())) { - - if ($truthy(($truthy($c = implicit_header_boundary) ? loop_idx['$=='](0) : $c))) { - - $writer = [(implicit_header = (implicit_header_boundary = nil))]; - $send(table, 'has_header_option=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - parser_ctx.$keep_cell_open(); - } else { - parser_ctx.$close_cell(true) - }} - else if ("dsv"['$===']($case)) {parser_ctx.$close_cell(true)} - else {parser_ctx.$keep_cell_open()}; - break;; - } - }; - if ($truthy(parser_ctx['$cell_open?']())) { - if ($truthy(table_reader['$has_more_lines?']())) { - } else { - parser_ctx.$close_cell(true) - } - } else { - if ($truthy($b = table_reader.$skip_blank_lines())) { - $b - } else { - break; - } - }; - }; - if ($truthy(($truthy($a = (($logical_op_recvr_tmp_2 = table.$attributes()), ($truthy($b = $logical_op_recvr_tmp_2['$[]']("colcount")) ? $b : (($writer = ["colcount", table.$columns().$size()]), $send($logical_op_recvr_tmp_2, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])))['$=='](0)) ? $a : explicit_colspecs))) { - } else { - table.$assign_column_widths() - }; - if ($truthy(implicit_header)) { - - $writer = [true]; - $send(table, 'has_header_option=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - table.$partition_header_footer(attributes); - return table; - }, $Parser_parse_table$60.$$arity = 3); - Opal.defs(self, '$parse_colspecs', $Parser_parse_colspecs$61 = function $$parse_colspecs(records) { - var $$62, $$63, self = this, specs = nil; - - - if ($truthy(records['$include?'](" "))) { - records = records.$delete(" ")}; - if (records['$=='](records.$to_i().$to_s())) { - return $send($$$('::', 'Array'), 'new', [records.$to_i()], ($$62 = function(){var self = $$62.$$s || this; - - return $hash2(["width"], {"width": 1})}, $$62.$$s = self, $$62.$$arity = 0, $$62))}; - specs = []; - $send((function() {if ($truthy(records['$include?'](","))) { - - return records.$split(",", -1); - } else { - - return records.$split(";", -1); - }; return nil; })(), 'each', [], ($$63 = function(record){var self = $$63.$$s || this, $a, $b, $$64, m = nil, spec = nil, colspec = nil, rowspec = nil, $writer = nil, width = nil; - - - - if (record == null) { - record = nil; - }; - if ($truthy(record['$empty?']())) { - return specs['$<<']($hash2(["width"], {"width": 1})) - } else if ($truthy((m = $$($nesting, 'ColumnSpecRx').$match(record)))) { - - spec = $hash2([], {}); - if ($truthy(m['$[]'](2))) { - - $b = m['$[]'](2).$split("."), $a = Opal.to_ary($b), (colspec = ($a[0] == null ? nil : $a[0])), (rowspec = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy(($truthy($a = colspec['$nil_or_empty?']()['$!']()) ? $$($nesting, 'TableCellHorzAlignments')['$key?'](colspec) : $a))) { - - $writer = ["halign", $$($nesting, 'TableCellHorzAlignments')['$[]'](colspec)]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(($truthy($a = rowspec['$nil_or_empty?']()['$!']()) ? $$($nesting, 'TableCellVertAlignments')['$key?'](rowspec) : $a))) { - - $writer = ["valign", $$($nesting, 'TableCellVertAlignments')['$[]'](rowspec)]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];};}; - if ($truthy((width = m['$[]'](3)))) { - - $writer = ["width", (function() {if (width['$==']("~")) { - return -1 - } else { - return width.$to_i() - }; return nil; })()]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = ["width", 1]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy(($truthy($a = m['$[]'](4)) ? $$($nesting, 'TableCellStyles')['$key?'](m['$[]'](4)) : $a))) { - - $writer = ["style", $$($nesting, 'TableCellStyles')['$[]'](m['$[]'](4))]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(m['$[]'](1))) { - return $send((1), 'upto', [m['$[]'](1).$to_i()], ($$64 = function(){var self = $$64.$$s || this; - - return specs['$<<'](spec.$merge())}, $$64.$$s = self, $$64.$$arity = 0, $$64)) - } else { - return specs['$<<'](spec) - }; - } else { - return nil - };}, $$63.$$s = self, $$63.$$arity = 1, $$63)); - return specs; - }, $Parser_parse_colspecs$61.$$arity = 1); - Opal.defs(self, '$parse_cellspec', $Parser_parse_cellspec$65 = function $$parse_cellspec(line, pos, delimiter) { - var $a, $b, self = this, m = nil, rest = nil, spec_part = nil, spec = nil, colspec = nil, rowspec = nil, $writer = nil; - - - - if (pos == null) { - pos = "end"; - }; - - if (delimiter == null) { - delimiter = nil; - }; - $a = [nil, ""], (m = $a[0]), (rest = $a[1]), $a; - if (pos['$==']("start")) { - if ($truthy(line['$include?'](delimiter))) { - - $b = line.$partition(delimiter), $a = Opal.to_ary($b), (spec_part = ($a[0] == null ? nil : $a[0])), (delimiter = ($a[1] == null ? nil : $a[1])), (rest = ($a[2] == null ? nil : $a[2])), $b; - if ($truthy((m = $$($nesting, 'CellSpecStartRx').$match(spec_part)))) { - if ($truthy(m['$[]'](0)['$empty?']())) { - return [$hash2([], {}), rest]} - } else { - return [nil, line] - }; - } else { - return [nil, line] - } - } else if ($truthy((m = $$($nesting, 'CellSpecEndRx').$match(line)))) { - - if ($truthy(m['$[]'](0).$lstrip()['$empty?']())) { - return [$hash2([], {}), line.$rstrip()]}; - rest = m.$pre_match(); - } else { - return [$hash2([], {}), line] - }; - spec = $hash2([], {}); - if ($truthy(m['$[]'](1))) { - - $b = m['$[]'](1).$split("."), $a = Opal.to_ary($b), (colspec = ($a[0] == null ? nil : $a[0])), (rowspec = ($a[1] == null ? nil : $a[1])), $b; - colspec = (function() {if ($truthy(colspec['$nil_or_empty?']())) { - return 1 - } else { - return colspec.$to_i() - }; return nil; })(); - rowspec = (function() {if ($truthy(rowspec['$nil_or_empty?']())) { - return 1 - } else { - return rowspec.$to_i() - }; return nil; })(); - if (m['$[]'](2)['$==']("+")) { - - if (colspec['$=='](1)) { - } else { - - $writer = ["colspan", colspec]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if (rowspec['$=='](1)) { - } else { - - $writer = ["rowspan", rowspec]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - } else if (m['$[]'](2)['$==']("*")) { - if (colspec['$=='](1)) { - } else { - - $writer = ["repeatcol", colspec]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }};}; - if ($truthy(m['$[]'](3))) { - - $b = m['$[]'](3).$split("."), $a = Opal.to_ary($b), (colspec = ($a[0] == null ? nil : $a[0])), (rowspec = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy(($truthy($a = colspec['$nil_or_empty?']()['$!']()) ? $$($nesting, 'TableCellHorzAlignments')['$key?'](colspec) : $a))) { - - $writer = ["halign", $$($nesting, 'TableCellHorzAlignments')['$[]'](colspec)]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(($truthy($a = rowspec['$nil_or_empty?']()['$!']()) ? $$($nesting, 'TableCellVertAlignments')['$key?'](rowspec) : $a))) { - - $writer = ["valign", $$($nesting, 'TableCellVertAlignments')['$[]'](rowspec)]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];};}; - if ($truthy(($truthy($a = m['$[]'](4)) ? $$($nesting, 'TableCellStyles')['$key?'](m['$[]'](4)) : $a))) { - - $writer = ["style", $$($nesting, 'TableCellStyles')['$[]'](m['$[]'](4))]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return [spec, rest]; - }, $Parser_parse_cellspec$65.$$arity = -2); - Opal.defs(self, '$parse_style_attribute', $Parser_parse_style_attribute$66 = function $$parse_style_attribute(attributes, reader) { - var $a, $b, $$67, $$68, self = this, raw_style = nil, name = nil, accum = nil, parsed_attrs = nil, parsed_style = nil, $writer = nil, existing_role = nil; - - - - if (reader == null) { - reader = nil; - }; - if ($truthy(($truthy($a = ($truthy($b = (raw_style = attributes['$[]'](1))) ? raw_style['$include?'](" ")['$!']() : $b)) ? $$($nesting, 'Compliance').$shorthand_property_syntax() : $a))) { - - name = nil; - accum = ""; - parsed_attrs = $hash2([], {}); - $send(raw_style, 'each_char', [], ($$67 = function(c){var self = $$67.$$s || this, $case = nil; - - - - if (c == null) { - c = nil; - }; - return (function() {$case = c; - if ("."['$===']($case)) { - self.$yield_buffered_attribute(parsed_attrs, name, accum, reader); - accum = ""; - return (name = "role");} - else if ("#"['$===']($case)) { - self.$yield_buffered_attribute(parsed_attrs, name, accum, reader); - accum = ""; - return (name = "id");} - else if ("%"['$===']($case)) { - self.$yield_buffered_attribute(parsed_attrs, name, accum, reader); - accum = ""; - return (name = "option");} - else {return (accum = $rb_plus(accum, c))}})();}, $$67.$$s = self, $$67.$$arity = 1, $$67)); - if ($truthy(name)) { - - self.$yield_buffered_attribute(parsed_attrs, name, accum, reader); - if ($truthy((parsed_style = parsed_attrs['$[]']("style")))) { - - $writer = ["style", parsed_style]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(parsed_attrs['$key?']("id"))) { - - $writer = ["id", parsed_attrs['$[]']("id")]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(parsed_attrs['$key?']("role"))) { - - $writer = ["role", (function() {if ($truthy((existing_role = attributes['$[]']("role"))['$nil_or_empty?']())) { - - return parsed_attrs['$[]']("role").$join(" "); - } else { - return "" + (existing_role) + " " + (parsed_attrs['$[]']("role").$join(" ")) - }; return nil; })()]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(parsed_attrs['$key?']("option"))) { - $send(parsed_attrs['$[]']("option"), 'each', [], ($$68 = function(opt){var self = $$68.$$s || this; - - - - if (opt == null) { - opt = nil; - }; - $writer = ["" + (opt) + "-option", ""]; - $send(attributes, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$68.$$s = self, $$68.$$arity = 1, $$68))}; - return parsed_style; - } else { - - $writer = ["style", raw_style]; - $send(attributes, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }; - } else { - - $writer = ["style", raw_style]; - $send(attributes, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }; - }, $Parser_parse_style_attribute$66.$$arity = -2); - Opal.defs(self, '$yield_buffered_attribute', $Parser_yield_buffered_attribute$69 = function $$yield_buffered_attribute(attrs, name, value, reader) { - var $a, self = this, $writer = nil; - - - if ($truthy(name)) { - if ($truthy(value['$empty?']())) { - if ($truthy(reader)) { - self.$logger().$warn(self.$message_with_context("" + "invalid empty " + (name) + " detected in style attribute", $hash2(["source_location"], {"source_location": reader.$cursor_at_prev_line()}))) - } else { - self.$logger().$warn("" + "invalid empty " + (name) + " detected in style attribute") - } - } else if (name['$==']("id")) { - - if ($truthy(attrs['$key?']("id"))) { - if ($truthy(reader)) { - self.$logger().$warn(self.$message_with_context("multiple ids detected in style attribute", $hash2(["source_location"], {"source_location": reader.$cursor_at_prev_line()}))) - } else { - self.$logger().$warn("multiple ids detected in style attribute") - }}; - - $writer = [name, value]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - ($truthy($a = attrs['$[]'](name)) ? $a : (($writer = [name, []]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))['$<<'](value) - } - } else if ($truthy(value['$empty?']())) { - } else { - - $writer = ["style", value]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - return nil; - }, $Parser_yield_buffered_attribute$69.$$arity = 4); - Opal.defs(self, '$adjust_indentation!', $Parser_adjust_indentation$excl$70 = function(lines, indent_size, tab_size) { - var $a, $$71, $$72, $$75, $$76, $$77, $$78, self = this, full_tab_space = nil, block_indent = nil, new_block_indent = nil; - - - - if (indent_size == null) { - indent_size = 0; - }; - - if (tab_size == null) { - tab_size = 0; - }; - if ($truthy(lines['$empty?']())) { - return nil}; - if ($truthy(($truthy($a = $rb_gt(tab_size, 0)) ? $send(lines, 'any?', [], ($$71 = function(line){var self = $$71.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line['$include?']($$($nesting, 'TAB'));}, $$71.$$s = self, $$71.$$arity = 1, $$71)) : $a))) { - - full_tab_space = $rb_times(" ", tab_size); - (function(){var $brk = Opal.new_brk(); try {return $send(lines, 'map!', [], ($$72 = function(line){var self = $$72.$$s || this, $$73, $$74, tab_idx = nil, leading_tabs = nil, spaces_added = nil, idx = nil, result = nil; - - - - if (line == null) { - line = nil; - }; - if ($truthy(line['$empty?']())) { - return line - } else if ($truthy((tab_idx = line.$index($$($nesting, 'TAB'))))) { - - if (tab_idx['$=='](0)) { - - leading_tabs = 0; - (function(){var $brk = Opal.new_brk(); try {return $send(line, 'each_byte', [], ($$73 = function(b){var self = $$73.$$s || this; - - - - if (b == null) { - b = nil; - }; - if (b['$=='](9)) { - } else { - - Opal.brk(nil, $brk) - }; - return (leading_tabs = $rb_plus(leading_tabs, 1));}, $$73.$$s = self, $$73.$$brk = $brk, $$73.$$arity = 1, $$73)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})(); - line = "" + ($rb_times(full_tab_space, leading_tabs)) + (line.$slice(leading_tabs, line.$length())); - if ($truthy(line['$include?']($$($nesting, 'TAB')))) { - } else { - return line; - };}; - spaces_added = 0; - idx = 0; - result = ""; - $send(line, 'each_char', [], ($$74 = function(c){var self = $$74.$$s || this, offset = nil, spaces = nil; - - - - if (c == null) { - c = nil; - }; - if (c['$==']($$($nesting, 'TAB'))) { - if ((offset = $rb_plus(idx, spaces_added))['$%'](tab_size)['$=='](0)) { - - spaces_added = $rb_plus(spaces_added, $rb_minus(tab_size, 1)); - result = $rb_plus(result, full_tab_space); - } else { - - if ((spaces = $rb_minus(tab_size, offset['$%'](tab_size)))['$=='](1)) { - } else { - spaces_added = $rb_plus(spaces_added, $rb_minus(spaces, 1)) - }; - result = $rb_plus(result, $rb_times(" ", spaces)); - } - } else { - result = $rb_plus(result, c) - }; - return (idx = $rb_plus(idx, 1));}, $$74.$$s = self, $$74.$$arity = 1, $$74)); - return result; - } else { - return line - };}, $$72.$$s = self, $$72.$$brk = $brk, $$72.$$arity = 1, $$72)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})();}; - if ($truthy($rb_lt(indent_size, 0))) { - return nil}; - block_indent = nil; - (function(){var $brk = Opal.new_brk(); try {return $send(lines, 'each', [], ($$75 = function(line){var self = $$75.$$s || this, $b, line_indent = nil; - - - - if (line == null) { - line = nil; - }; - if ($truthy(line['$empty?']())) { - return nil;}; - if ((line_indent = $rb_minus(line.$length(), line.$lstrip().$length()))['$=='](0)) { - - block_indent = nil; - - Opal.brk(nil, $brk);}; - if ($truthy(($truthy($b = block_indent) ? $rb_lt(block_indent, line_indent) : $b))) { - return nil - } else { - return (block_indent = line_indent) - };}, $$75.$$s = self, $$75.$$brk = $brk, $$75.$$arity = 1, $$75)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})(); - if (indent_size['$=='](0)) { - if ($truthy(block_indent)) { - $send(lines, 'map!', [], ($$76 = function(line){var self = $$76.$$s || this; - - - - if (line == null) { - line = nil; - }; - if ($truthy(line['$empty?']())) { - return line - } else { - - return line.$slice(block_indent, line.$length()); - };}, $$76.$$s = self, $$76.$$arity = 1, $$76))} - } else { - - new_block_indent = $rb_times(" ", indent_size); - if ($truthy(block_indent)) { - $send(lines, 'map!', [], ($$77 = function(line){var self = $$77.$$s || this; - - - - if (line == null) { - line = nil; - }; - if ($truthy(line['$empty?']())) { - return line - } else { - return $rb_plus(new_block_indent, line.$slice(block_indent, line.$length())) - };}, $$77.$$s = self, $$77.$$arity = 1, $$77)) - } else { - $send(lines, 'map!', [], ($$78 = function(line){var self = $$78.$$s || this; - - - - if (line == null) { - line = nil; - }; - if ($truthy(line['$empty?']())) { - return line - } else { - return $rb_plus(new_block_indent, line) - };}, $$78.$$s = self, $$78.$$arity = 1, $$78)) - }; - }; - return nil; - }, $Parser_adjust_indentation$excl$70.$$arity = -2); - Opal.defs(self, '$uniform?', $Parser_uniform$ques$79 = function(str, chr, len) { - var self = this; - - return str.$count(chr)['$=='](len) - }, $Parser_uniform$ques$79.$$arity = 3); - return (Opal.defs(self, '$sanitize_attribute_name', $Parser_sanitize_attribute_name$80 = function $$sanitize_attribute_name(name) { - var self = this; - - return name.$gsub($$($nesting, 'InvalidAttributeNameCharsRx'), "").$downcase() - }, $Parser_sanitize_attribute_name$80.$$arity = 1), nil) && 'sanitize_attribute_name'; - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/path_resolver"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy, $hash2 = Opal.hash2, $send = Opal.send, $gvars = Opal.gvars; - - Opal.add_stubs(['$include', '$attr_accessor', '$root?', '$posixify', '$expand_path', '$pwd', '$start_with?', '$==', '$match?', '$absolute_path?', '$+', '$length', '$descends_from?', '$slice', '$to_s', '$relative_path_from', '$new', '$include?', '$tr', '$partition_path', '$each', '$pop', '$<<', '$join_path', '$[]', '$web_root?', '$unc?', '$index', '$split', '$delete', '$[]=', '$-', '$join', '$raise', '$!', '$fetch', '$warn', '$logger', '$empty?', '$nil_or_empty?', '$chomp', '$!=', '$>', '$size', '$extract_uri_prefix', '$end_with?', '$gsub', '$private', '$=~']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'PathResolver'); - - var $nesting = [self].concat($parent_nesting), $PathResolver_initialize$1, $PathResolver_absolute_path$ques$2, $a, $PathResolver_root$ques$3, $PathResolver_unc$ques$4, $PathResolver_web_root$ques$5, $PathResolver_descends_from$ques$6, $PathResolver_relative_path$7, $PathResolver_posixify$8, $PathResolver_expand_path$9, $PathResolver_partition_path$11, $PathResolver_join_path$12, $PathResolver_system_path$13, $PathResolver_web_path$16, $PathResolver_extract_uri_prefix$18; - - self.$$prototype.file_separator = self.$$prototype._partition_path_web = self.$$prototype._partition_path_sys = self.$$prototype.working_dir = nil; - - self.$include($$($nesting, 'Logging')); - Opal.const_set($nesting[0], 'DOT', "."); - Opal.const_set($nesting[0], 'DOT_DOT', ".."); - Opal.const_set($nesting[0], 'DOT_SLASH', "./"); - Opal.const_set($nesting[0], 'SLASH', "/"); - Opal.const_set($nesting[0], 'BACKSLASH', "\\"); - Opal.const_set($nesting[0], 'DOUBLE_SLASH', "//"); - Opal.const_set($nesting[0], 'WindowsRootRx', /^(?:[a-zA-Z]:)?[\\\/]/); - self.$attr_accessor("file_separator"); - self.$attr_accessor("working_dir"); - - Opal.def(self, '$initialize', $PathResolver_initialize$1 = function $$initialize(file_separator, working_dir) { - var $a, $b, self = this; - - - - if (file_separator == null) { - file_separator = nil; - }; - - if (working_dir == null) { - working_dir = nil; - }; - self.file_separator = ($truthy($a = ($truthy($b = file_separator) ? $b : $$$($$$('::', 'File'), 'ALT_SEPARATOR'))) ? $a : $$$($$$('::', 'File'), 'SEPARATOR')); - self.working_dir = (function() {if ($truthy(working_dir)) { - - if ($truthy(self['$root?'](working_dir))) { - - return self.$posixify(working_dir); - } else { - - return $$$('::', 'File').$expand_path(working_dir); - }; - } else { - return $$$('::', 'Dir').$pwd() - }; return nil; })(); - self._partition_path_sys = $hash2([], {}); - return (self._partition_path_web = $hash2([], {})); - }, $PathResolver_initialize$1.$$arity = -1); - - Opal.def(self, '$absolute_path?', $PathResolver_absolute_path$ques$2 = function(path) { - var $a, $b, self = this; - - return ($truthy($a = path['$start_with?']($$($nesting, 'SLASH'))) ? $a : (($b = self.file_separator['$==']($$($nesting, 'BACKSLASH'))) ? $$($nesting, 'WindowsRootRx')['$match?'](path) : self.file_separator['$==']($$($nesting, 'BACKSLASH')))) - }, $PathResolver_absolute_path$ques$2.$$arity = 1); - if ($truthy((($a = $$($nesting, 'RUBY_ENGINE')['$==']("opal")) ? $$$('::', 'JAVASCRIPT_IO_MODULE')['$==']("xmlhttprequest") : $$($nesting, 'RUBY_ENGINE')['$==']("opal")))) { - - Opal.def(self, '$root?', $PathResolver_root$ques$3 = function(path) { - var $a, self = this; - - return ($truthy($a = self['$absolute_path?'](path)) ? $a : path['$start_with?']("file://", "http://", "https://")) - }, $PathResolver_root$ques$3.$$arity = 1) - } else { - Opal.alias(self, "root?", "absolute_path?") - }; - - Opal.def(self, '$unc?', $PathResolver_unc$ques$4 = function(path) { - var self = this; - - return path['$start_with?']($$($nesting, 'DOUBLE_SLASH')) - }, $PathResolver_unc$ques$4.$$arity = 1); - - Opal.def(self, '$web_root?', $PathResolver_web_root$ques$5 = function(path) { - var self = this; - - return path['$start_with?']($$($nesting, 'SLASH')) - }, $PathResolver_web_root$ques$5.$$arity = 1); - - Opal.def(self, '$descends_from?', $PathResolver_descends_from$ques$6 = function(path, base) { - var $a, self = this; - - if (base['$=='](path)) { - return 0 - } else if (base['$==']($$($nesting, 'SLASH'))) { - return ($truthy($a = path['$start_with?']($$($nesting, 'SLASH'))) ? 1 : $a) - } else { - return ($truthy($a = path['$start_with?']($rb_plus(base, $$($nesting, 'SLASH')))) ? $rb_plus(base.$length(), 1) : $a) - } - }, $PathResolver_descends_from$ques$6.$$arity = 2); - - Opal.def(self, '$relative_path', $PathResolver_relative_path$7 = function $$relative_path(path, base) { - var self = this, offset = nil; - - if ($truthy(self['$root?'](path))) { - if ($truthy((offset = self['$descends_from?'](path, base)))) { - return path.$slice(offset, path.$length()) - } else { - - try { - return $$($nesting, 'Pathname').$new(path).$relative_path_from($$($nesting, 'Pathname').$new(base)).$to_s() - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return path - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - } - } else { - return path - } - }, $PathResolver_relative_path$7.$$arity = 2); - - Opal.def(self, '$posixify', $PathResolver_posixify$8 = function $$posixify(path) { - var $a, self = this; - - if ($truthy(path)) { - if ($truthy((($a = self.file_separator['$==']($$($nesting, 'BACKSLASH'))) ? path['$include?']($$($nesting, 'BACKSLASH')) : self.file_separator['$==']($$($nesting, 'BACKSLASH'))))) { - - return path.$tr($$($nesting, 'BACKSLASH'), $$($nesting, 'SLASH')); - } else { - return path - } - } else { - return "" - } - }, $PathResolver_posixify$8.$$arity = 1); - Opal.alias(self, "posixfy", "posixify"); - - Opal.def(self, '$expand_path', $PathResolver_expand_path$9 = function $$expand_path(path) { - var $a, $b, $$10, self = this, path_segments = nil, path_root = nil, resolved_segments = nil; - - - $b = self.$partition_path(path), $a = Opal.to_ary($b), (path_segments = ($a[0] == null ? nil : $a[0])), (path_root = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy(path['$include?']($$($nesting, 'DOT_DOT')))) { - - resolved_segments = []; - $send(path_segments, 'each', [], ($$10 = function(segment){var self = $$10.$$s || this; - - - - if (segment == null) { - segment = nil; - }; - if (segment['$==']($$($nesting, 'DOT_DOT'))) { - return resolved_segments.$pop() - } else { - return resolved_segments['$<<'](segment) - };}, $$10.$$s = self, $$10.$$arity = 1, $$10)); - return self.$join_path(resolved_segments, path_root); - } else { - return self.$join_path(path_segments, path_root) - }; - }, $PathResolver_expand_path$9.$$arity = 1); - - Opal.def(self, '$partition_path', $PathResolver_partition_path$11 = function $$partition_path(path, web) { - var self = this, result = nil, cache = nil, posix_path = nil, root = nil, path_segments = nil, $writer = nil; - - - - if (web == null) { - web = nil; - }; - if ($truthy((result = (cache = (function() {if ($truthy(web)) { - return self._partition_path_web - } else { - return self._partition_path_sys - }; return nil; })())['$[]'](path)))) { - return result}; - posix_path = self.$posixify(path); - if ($truthy(web)) { - if ($truthy(self['$web_root?'](posix_path))) { - root = $$($nesting, 'SLASH') - } else if ($truthy(posix_path['$start_with?']($$($nesting, 'DOT_SLASH')))) { - root = $$($nesting, 'DOT_SLASH')} - } else if ($truthy(self['$root?'](posix_path))) { - if ($truthy(self['$unc?'](posix_path))) { - root = $$($nesting, 'DOUBLE_SLASH') - } else if ($truthy(posix_path['$start_with?']($$($nesting, 'SLASH')))) { - root = $$($nesting, 'SLASH') - } else { - root = posix_path.$slice(0, $rb_plus(posix_path.$index($$($nesting, 'SLASH')), 1)) - } - } else if ($truthy(posix_path['$start_with?']($$($nesting, 'DOT_SLASH')))) { - root = $$($nesting, 'DOT_SLASH')}; - path_segments = (function() {if ($truthy(root)) { - - return posix_path.$slice(root.$length(), posix_path.$length()); - } else { - return posix_path - }; return nil; })().$split($$($nesting, 'SLASH')); - path_segments.$delete($$($nesting, 'DOT')); - - $writer = [path, [path_segments, root]]; - $send(cache, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - }, $PathResolver_partition_path$11.$$arity = -2); - - Opal.def(self, '$join_path', $PathResolver_join_path$12 = function $$join_path(segments, root) { - var self = this; - - - - if (root == null) { - root = nil; - }; - if ($truthy(root)) { - return "" + (root) + (segments.$join($$($nesting, 'SLASH'))) - } else { - - return segments.$join($$($nesting, 'SLASH')); - }; - }, $PathResolver_join_path$12.$$arity = -2); - - Opal.def(self, '$system_path', $PathResolver_system_path$13 = function $$system_path(target, start, jail, opts) { - var $a, $b, $$14, $$15, self = this, target_path = nil, target_segments = nil, jail_segments = nil, jail_root = nil, recheck = nil, start_segments = nil, start_root = nil, resolved_segments = nil, unresolved_segments = nil, warned = nil; - - - - if (start == null) { - start = nil; - }; - - if (jail == null) { - jail = nil; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy(jail)) { - - if ($truthy(self['$root?'](jail))) { - } else { - self.$raise($$$('::', 'SecurityError'), "" + "Jail is not an absolute path: " + (jail)) - }; - jail = self.$posixify(jail);}; - if ($truthy(target)) { - if ($truthy(self['$root?'](target))) { - - target_path = self.$expand_path(target); - if ($truthy(($truthy($a = jail) ? self['$descends_from?'](target_path, jail)['$!']() : $a))) { - if ($truthy(opts.$fetch("recover", true))) { - - self.$logger().$warn("" + (($truthy($a = opts['$[]']("target_name")) ? $a : "path")) + " is outside of jail; recovering automatically"); - $b = self.$partition_path(target_path), $a = Opal.to_ary($b), (target_segments = ($a[0] == null ? nil : $a[0])), $b; - $b = self.$partition_path(jail), $a = Opal.to_ary($b), (jail_segments = ($a[0] == null ? nil : $a[0])), (jail_root = ($a[1] == null ? nil : $a[1])), $b; - return self.$join_path($rb_plus(jail_segments, target_segments), jail_root); - } else { - self.$raise($$$('::', 'SecurityError'), "" + (($truthy($a = opts['$[]']("target_name")) ? $a : "path")) + " " + (target) + " is outside of jail: " + (jail) + " (disallowed in safe mode)") - }}; - return target_path; - } else { - $b = self.$partition_path(target), $a = Opal.to_ary($b), (target_segments = ($a[0] == null ? nil : $a[0])), $b - } - } else { - target_segments = [] - }; - if ($truthy(target_segments['$empty?']())) { - if ($truthy(start['$nil_or_empty?']())) { - return ($truthy($a = jail) ? $a : self.working_dir) - } else if ($truthy(self['$root?'](start))) { - if ($truthy(jail)) { - start = self.$posixify(start) - } else { - return self.$expand_path(start) - } - } else { - - $b = self.$partition_path(start), $a = Opal.to_ary($b), (target_segments = ($a[0] == null ? nil : $a[0])), $b; - start = ($truthy($a = jail) ? $a : self.working_dir); - } - } else if ($truthy(start['$nil_or_empty?']())) { - start = ($truthy($a = jail) ? $a : self.working_dir) - } else if ($truthy(self['$root?'](start))) { - if ($truthy(jail)) { - start = self.$posixify(start)} - } else { - start = "" + (($truthy($a = jail) ? $a : self.working_dir).$chomp("/")) + "/" + (start) - }; - if ($truthy(($truthy($a = ($truthy($b = jail) ? (recheck = self['$descends_from?'](start, jail)['$!']()) : $b)) ? self.file_separator['$==']($$($nesting, 'BACKSLASH')) : $a))) { - - $b = self.$partition_path(start), $a = Opal.to_ary($b), (start_segments = ($a[0] == null ? nil : $a[0])), (start_root = ($a[1] == null ? nil : $a[1])), $b; - $b = self.$partition_path(jail), $a = Opal.to_ary($b), (jail_segments = ($a[0] == null ? nil : $a[0])), (jail_root = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy(start_root['$!='](jail_root))) { - if ($truthy(opts.$fetch("recover", true))) { - - self.$logger().$warn("" + "start path for " + (($truthy($a = opts['$[]']("target_name")) ? $a : "path")) + " is outside of jail root; recovering automatically"); - start_segments = jail_segments; - recheck = false; - } else { - self.$raise($$$('::', 'SecurityError'), "" + "start path for " + (($truthy($a = opts['$[]']("target_name")) ? $a : "path")) + " " + (start) + " refers to location outside jail root: " + (jail) + " (disallowed in safe mode)") - }}; - } else { - $b = self.$partition_path(start), $a = Opal.to_ary($b), (start_segments = ($a[0] == null ? nil : $a[0])), (jail_root = ($a[1] == null ? nil : $a[1])), $b - }; - if ($truthy((resolved_segments = $rb_plus(start_segments, target_segments))['$include?']($$($nesting, 'DOT_DOT')))) { - - $a = [resolved_segments, []], (unresolved_segments = $a[0]), (resolved_segments = $a[1]), $a; - if ($truthy(jail)) { - - if ($truthy(jail_segments)) { - } else { - $b = self.$partition_path(jail), $a = Opal.to_ary($b), (jail_segments = ($a[0] == null ? nil : $a[0])), $b - }; - warned = false; - $send(unresolved_segments, 'each', [], ($$14 = function(segment){var self = $$14.$$s || this, $c; - - - - if (segment == null) { - segment = nil; - }; - if (segment['$==']($$($nesting, 'DOT_DOT'))) { - if ($truthy($rb_gt(resolved_segments.$size(), jail_segments.$size()))) { - return resolved_segments.$pop() - } else if ($truthy(opts.$fetch("recover", true))) { - if ($truthy(warned)) { - return nil - } else { - - self.$logger().$warn("" + (($truthy($c = opts['$[]']("target_name")) ? $c : "path")) + " has illegal reference to ancestor of jail; recovering automatically"); - return (warned = true); - } - } else { - return self.$raise($$$('::', 'SecurityError'), "" + (($truthy($c = opts['$[]']("target_name")) ? $c : "path")) + " " + (target) + " refers to location outside jail: " + (jail) + " (disallowed in safe mode)") - } - } else { - return resolved_segments['$<<'](segment) - };}, $$14.$$s = self, $$14.$$arity = 1, $$14)); - } else { - $send(unresolved_segments, 'each', [], ($$15 = function(segment){var self = $$15.$$s || this; - - - - if (segment == null) { - segment = nil; - }; - if (segment['$==']($$($nesting, 'DOT_DOT'))) { - return resolved_segments.$pop() - } else { - return resolved_segments['$<<'](segment) - };}, $$15.$$s = self, $$15.$$arity = 1, $$15)) - };}; - if ($truthy(recheck)) { - - target_path = self.$join_path(resolved_segments, jail_root); - if ($truthy(self['$descends_from?'](target_path, jail))) { - return target_path - } else if ($truthy(opts.$fetch("recover", true))) { - - self.$logger().$warn("" + (($truthy($a = opts['$[]']("target_name")) ? $a : "path")) + " is outside of jail; recovering automatically"); - if ($truthy(jail_segments)) { - } else { - $b = self.$partition_path(jail), $a = Opal.to_ary($b), (jail_segments = ($a[0] == null ? nil : $a[0])), $b - }; - return self.$join_path($rb_plus(jail_segments, target_segments), jail_root); - } else { - return self.$raise($$$('::', 'SecurityError'), "" + (($truthy($a = opts['$[]']("target_name")) ? $a : "path")) + " " + (target) + " is outside of jail: " + (jail) + " (disallowed in safe mode)") - }; - } else { - return self.$join_path(resolved_segments, jail_root) - }; - }, $PathResolver_system_path$13.$$arity = -2); - - Opal.def(self, '$web_path', $PathResolver_web_path$16 = function $$web_path(target, start) { - var $a, $b, $$17, self = this, uri_prefix = nil, target_segments = nil, target_root = nil, resolved_segments = nil, resolved_path = nil; - - - - if (start == null) { - start = nil; - }; - target = self.$posixify(target); - start = self.$posixify(start); - if ($truthy(($truthy($a = start['$nil_or_empty?']()) ? $a : self['$web_root?'](target)))) { - } else { - $b = self.$extract_uri_prefix("" + (start) + ((function() {if ($truthy(start['$end_with?']($$($nesting, 'SLASH')))) { - return "" - } else { - return $$($nesting, 'SLASH') - }; return nil; })()) + (target)), $a = Opal.to_ary($b), (target = ($a[0] == null ? nil : $a[0])), (uri_prefix = ($a[1] == null ? nil : $a[1])), $b - }; - $b = self.$partition_path(target, true), $a = Opal.to_ary($b), (target_segments = ($a[0] == null ? nil : $a[0])), (target_root = ($a[1] == null ? nil : $a[1])), $b; - resolved_segments = []; - $send(target_segments, 'each', [], ($$17 = function(segment){var self = $$17.$$s || this, $c; - - - - if (segment == null) { - segment = nil; - }; - if (segment['$==']($$($nesting, 'DOT_DOT'))) { - if ($truthy(resolved_segments['$empty?']())) { - if ($truthy(($truthy($c = target_root) ? target_root['$!=']($$($nesting, 'DOT_SLASH')) : $c))) { - return nil - } else { - return resolved_segments['$<<'](segment) - } - } else if (resolved_segments['$[]'](-1)['$==']($$($nesting, 'DOT_DOT'))) { - return resolved_segments['$<<'](segment) - } else { - return resolved_segments.$pop() - } - } else { - return resolved_segments['$<<'](segment) - };}, $$17.$$s = self, $$17.$$arity = 1, $$17)); - if ($truthy((resolved_path = self.$join_path(resolved_segments, target_root))['$include?'](" "))) { - resolved_path = resolved_path.$gsub(" ", "%20")}; - if ($truthy(uri_prefix)) { - return "" + (uri_prefix) + (resolved_path) - } else { - return resolved_path - }; - }, $PathResolver_web_path$16.$$arity = -2); - self.$private(); - return (Opal.def(self, '$extract_uri_prefix', $PathResolver_extract_uri_prefix$18 = function $$extract_uri_prefix(str) { - var $a, self = this; - - if ($truthy(($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$=~'](str) : $a))) { - return [str.$slice((($a = $gvars['~']) === nil ? nil : $a['$[]'](0)).$length(), str.$length()), (($a = $gvars['~']) === nil ? nil : $a['$[]'](0))] - } else { - return str - } - }, $PathResolver_extract_uri_prefix$18.$$arity = 1), nil) && 'extract_uri_prefix'; - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/reader"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - function $rb_ge(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_divide(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs / rhs : lhs['$/'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send, $gvars = Opal.gvars, $hash = Opal.hash; - - Opal.add_stubs(['$include', '$attr_reader', '$+', '$attr_accessor', '$!', '$===', '$split', '$file', '$dir', '$dirname', '$path', '$basename', '$lineno', '$prepare_lines', '$drop', '$empty?', '$nil_or_empty?', '$peek_line', '$>', '$slice', '$[]', '$length', '$process_line', '$times', '$shift', '$read_line', '$<<', '$-', '$unshift_all', '$has_more_lines?', '$join', '$read_lines', '$unshift', '$start_with?', '$==', '$*', '$read_lines_until', '$size', '$clear', '$cursor', '$[]=', '$!=', '$fetch', '$cursor_at_mark', '$warn', '$logger', '$message_with_context', '$new', '$tap', '$each', '$instance_variables', '$instance_variable_get', '$instance_variable_set', '$class', '$object_id', '$inspect', '$private', '$prepare_source_array', '$prepare_source_string', '$chomp', '$valid_encoding?', '$to_s', '$raise', '$to_i', '$attributes', '$catalog', '$pop_include', '$parse', '$path=', '$dup', '$end_with?', '$keys', '$rindex', '$rootname', '$key?', '$attr', '$>=', '$nil?', '$extensions?', '$include_processors?', '$extensions', '$include_processors', '$map', '$skip_front_matter!', '$pop', '$adjust_indentation!', '$include?', '$=~', '$preprocess_conditional_directive', '$preprocess_include_directive', '$downcase', '$error', '$none?', '$any?', '$all?', '$strip', '$send', '$resolve_expr_val', '$replace_next_line', '$rstrip', '$sub_attributes', '$attribute_missing', '$info', '$parse_attributes', '$find', '$handles?', '$instance', '$process_method', '$safe', '$resolve_include_path', '$method', '$split_delimited_value', '$partition', '$<', '$/', '$to_a', '$uniq', '$sort', '$call', '$each_line', '$infinite?', '$push_include', '$delete', '$create_include_cursor', '$delete_at', '$read', '$uriish?', '$attr?', '$require_library', '$normalize_system_path', '$file?', '$relative_path', '$path_resolver', '$base_dir', '$to_f']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Reader'); - - var $nesting = [self].concat($parent_nesting), $Reader_initialize$4, $Reader_has_more_lines$ques$5, $Reader_empty$ques$6, $Reader_next_line_empty$ques$7, $Reader_peek_line$8, $Reader_peek_lines$9, $Reader_read_line$11, $Reader_read_lines$12, $Reader_read$13, $Reader_advance$14, $Reader_unshift_line$15, $Reader_unshift_lines$16, $Reader_replace_next_line$17, $Reader_skip_blank_lines$18, $Reader_skip_comment_lines$19, $Reader_skip_line_comments$20, $Reader_terminate$21, $Reader_read_lines_until$22, $Reader_shift$23, $Reader_unshift$24, $Reader_unshift_all$25, $Reader_cursor$26, $Reader_cursor_at_line$27, $Reader_cursor_at_mark$28, $Reader_cursor_before_mark$29, $Reader_cursor_at_prev_line$30, $Reader_mark$31, $Reader_line_info$32, $Reader_lines$33, $Reader_string$34, $Reader_source$35, $Reader_save$36, $Reader_restore_save$39, $Reader_discard_save$41, $Reader_to_s$42, $Reader_prepare_lines$43, $Reader_process_line$44; - - self.$$prototype.file = self.$$prototype.lines = self.$$prototype.look_ahead = self.$$prototype.unescape_next_line = self.$$prototype.lineno = self.$$prototype.process_lines = self.$$prototype.dir = self.$$prototype.path = self.$$prototype.mark = self.$$prototype.source_lines = self.$$prototype.saved = nil; - - self.$include($$($nesting, 'Logging')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Cursor'); - - var $nesting = [self].concat($parent_nesting), $Cursor_initialize$1, $Cursor_advance$2, $Cursor_line_info$3; - - self.$$prototype.lineno = self.$$prototype.path = nil; - - self.$attr_reader("file", "dir", "path", "lineno"); - - Opal.def(self, '$initialize', $Cursor_initialize$1 = function $$initialize(file, dir, path, lineno) { - var $a, self = this; - - - - if (dir == null) { - dir = nil; - }; - - if (path == null) { - path = nil; - }; - - if (lineno == null) { - lineno = 1; - }; - return $a = [file, dir, path, lineno], (self.file = $a[0]), (self.dir = $a[1]), (self.path = $a[2]), (self.lineno = $a[3]), $a; - }, $Cursor_initialize$1.$$arity = -2); - - Opal.def(self, '$advance', $Cursor_advance$2 = function $$advance(num) { - var self = this; - - return (self.lineno = $rb_plus(self.lineno, num)) - }, $Cursor_advance$2.$$arity = 1); - - Opal.def(self, '$line_info', $Cursor_line_info$3 = function $$line_info() { - var self = this; - - return "" + (self.path) + ": line " + (self.lineno) - }, $Cursor_line_info$3.$$arity = 0); - return Opal.alias(self, "to_s", "line_info"); - })($nesting[0], null, $nesting); - self.$attr_reader("file"); - self.$attr_reader("dir"); - self.$attr_reader("path"); - self.$attr_reader("lineno"); - self.$attr_reader("source_lines"); - self.$attr_accessor("process_lines"); - self.$attr_accessor("unterminated"); - - Opal.def(self, '$initialize', $Reader_initialize$4 = function $$initialize(data, cursor, opts) { - var $a, $b, self = this; - - - - if (data == null) { - data = nil; - }; - - if (cursor == null) { - cursor = nil; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy(cursor['$!']())) { - - self.file = nil; - self.dir = "."; - self.path = ""; - self.lineno = 1; - } else if ($truthy($$$('::', 'String')['$==='](cursor))) { - - self.file = cursor; - $b = $$$('::', 'File').$split(self.file), $a = Opal.to_ary($b), (self.dir = ($a[0] == null ? nil : $a[0])), (self.path = ($a[1] == null ? nil : $a[1])), $b; - self.lineno = 1; - } else { - - if ($truthy((self.file = cursor.$file()))) { - - self.dir = ($truthy($a = cursor.$dir()) ? $a : $$$('::', 'File').$dirname(self.file)); - self.path = ($truthy($a = cursor.$path()) ? $a : $$$('::', 'File').$basename(self.file)); - } else { - - self.dir = ($truthy($a = cursor.$dir()) ? $a : "."); - self.path = ($truthy($a = cursor.$path()) ? $a : ""); - }; - self.lineno = ($truthy($a = cursor.$lineno()) ? $a : 1); - }; - self.lines = self.$prepare_lines(data, opts); - self.source_lines = self.lines.$drop(0); - self.mark = nil; - self.look_ahead = 0; - self.process_lines = true; - self.unescape_next_line = false; - self.unterminated = nil; - return (self.saved = nil); - }, $Reader_initialize$4.$$arity = -1); - - Opal.def(self, '$has_more_lines?', $Reader_has_more_lines$ques$5 = function() { - var self = this; - - if ($truthy(self.lines['$empty?']())) { - - self.look_ahead = 0; - return false; - } else { - return true - } - }, $Reader_has_more_lines$ques$5.$$arity = 0); - - Opal.def(self, '$empty?', $Reader_empty$ques$6 = function() { - var self = this; - - if ($truthy(self.lines['$empty?']())) { - - self.look_ahead = 0; - return true; - } else { - return false - } - }, $Reader_empty$ques$6.$$arity = 0); - Opal.alias(self, "eof?", "empty?"); - - Opal.def(self, '$next_line_empty?', $Reader_next_line_empty$ques$7 = function() { - var self = this; - - return self.$peek_line()['$nil_or_empty?']() - }, $Reader_next_line_empty$ques$7.$$arity = 0); - - Opal.def(self, '$peek_line', $Reader_peek_line$8 = function $$peek_line(direct) { - var $a, self = this, line = nil; - - - - if (direct == null) { - direct = false; - }; - if ($truthy(($truthy($a = direct) ? $a : $rb_gt(self.look_ahead, 0)))) { - if ($truthy(self.unescape_next_line)) { - - return (line = self.lines['$[]'](0)).$slice(1, line.$length()); - } else { - return self.lines['$[]'](0) - } - } else if ($truthy(self.lines['$empty?']())) { - - self.look_ahead = 0; - return nil; - } else if ($truthy((line = self.$process_line(self.lines['$[]'](0))))) { - return line - } else { - return self.$peek_line() - }; - }, $Reader_peek_line$8.$$arity = -1); - - Opal.def(self, '$peek_lines', $Reader_peek_lines$9 = function $$peek_lines(num, direct) { - var $a, $$10, self = this, old_look_ahead = nil, result = nil; - - - - if (num == null) { - num = nil; - }; - - if (direct == null) { - direct = false; - }; - old_look_ahead = self.look_ahead; - result = []; - (function(){var $brk = Opal.new_brk(); try {return $send(($truthy($a = num) ? $a : $$($nesting, 'MAX_INT')), 'times', [], ($$10 = function(){var self = $$10.$$s || this, line = nil; - if (self.lineno == null) self.lineno = nil; - - if ($truthy((line = (function() {if ($truthy(direct)) { - return self.$shift() - } else { - return self.$read_line() - }; return nil; })()))) { - return result['$<<'](line) - } else { - - if ($truthy(direct)) { - self.lineno = $rb_minus(self.lineno, 1)}; - - Opal.brk(nil, $brk); - }}, $$10.$$s = self, $$10.$$brk = $brk, $$10.$$arity = 0, $$10)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})(); - if ($truthy(result['$empty?']())) { - } else { - - self.$unshift_all(result); - if ($truthy(direct)) { - self.look_ahead = old_look_ahead}; - }; - return result; - }, $Reader_peek_lines$9.$$arity = -1); - - Opal.def(self, '$read_line', $Reader_read_line$11 = function $$read_line() { - var $a, self = this; - - if ($truthy(($truthy($a = $rb_gt(self.look_ahead, 0)) ? $a : self['$has_more_lines?']()))) { - return self.$shift() - } else { - return nil - } - }, $Reader_read_line$11.$$arity = 0); - - Opal.def(self, '$read_lines', $Reader_read_lines$12 = function $$read_lines() { - var $a, self = this, lines = nil; - - - lines = []; - while ($truthy(self['$has_more_lines?']())) { - lines['$<<'](self.$shift()) - }; - return lines; - }, $Reader_read_lines$12.$$arity = 0); - Opal.alias(self, "readlines", "read_lines"); - - Opal.def(self, '$read', $Reader_read$13 = function $$read() { - var self = this; - - return self.$read_lines().$join($$($nesting, 'LF')) - }, $Reader_read$13.$$arity = 0); - - Opal.def(self, '$advance', $Reader_advance$14 = function $$advance() { - var self = this; - - if ($truthy(self.$shift())) { - return true - } else { - return false - } - }, $Reader_advance$14.$$arity = 0); - - Opal.def(self, '$unshift_line', $Reader_unshift_line$15 = function $$unshift_line(line_to_restore) { - var self = this; - - - self.$unshift(line_to_restore); - return nil; - }, $Reader_unshift_line$15.$$arity = 1); - Opal.alias(self, "restore_line", "unshift_line"); - - Opal.def(self, '$unshift_lines', $Reader_unshift_lines$16 = function $$unshift_lines(lines_to_restore) { - var self = this; - - - self.$unshift_all(lines_to_restore); - return nil; - }, $Reader_unshift_lines$16.$$arity = 1); - Opal.alias(self, "restore_lines", "unshift_lines"); - - Opal.def(self, '$replace_next_line', $Reader_replace_next_line$17 = function $$replace_next_line(replacement) { - var self = this; - - - self.$shift(); - self.$unshift(replacement); - return true; - }, $Reader_replace_next_line$17.$$arity = 1); - Opal.alias(self, "replace_line", "replace_next_line"); - - Opal.def(self, '$skip_blank_lines', $Reader_skip_blank_lines$18 = function $$skip_blank_lines() { - var $a, self = this, num_skipped = nil, next_line = nil; - - - if ($truthy(self['$empty?']())) { - return nil}; - num_skipped = 0; - while ($truthy((next_line = self.$peek_line()))) { - if ($truthy(next_line['$empty?']())) { - - self.$shift(); - num_skipped = $rb_plus(num_skipped, 1); - } else { - return num_skipped - } - }; - }, $Reader_skip_blank_lines$18.$$arity = 0); - - Opal.def(self, '$skip_comment_lines', $Reader_skip_comment_lines$19 = function $$skip_comment_lines() { - var $a, $b, self = this, next_line = nil, ll = nil; - - - if ($truthy(self['$empty?']())) { - return nil}; - while ($truthy(($truthy($b = (next_line = self.$peek_line())) ? next_line['$empty?']()['$!']() : $b))) { - if ($truthy(next_line['$start_with?']("//"))) { - if ($truthy(next_line['$start_with?']("///"))) { - if ($truthy(($truthy($b = $rb_gt((ll = next_line.$length()), 3)) ? next_line['$==']($rb_times("/", ll)) : $b))) { - self.$read_lines_until($hash2(["terminator", "skip_first_line", "read_last_line", "skip_processing", "context"], {"terminator": next_line, "skip_first_line": true, "read_last_line": true, "skip_processing": true, "context": "comment"})) - } else { - break; - } - } else { - self.$shift() - } - } else { - break; - } - }; - return nil; - }, $Reader_skip_comment_lines$19.$$arity = 0); - - Opal.def(self, '$skip_line_comments', $Reader_skip_line_comments$20 = function $$skip_line_comments() { - var $a, $b, self = this, comment_lines = nil, next_line = nil; - - - if ($truthy(self['$empty?']())) { - return []}; - comment_lines = []; - while ($truthy(($truthy($b = (next_line = self.$peek_line())) ? next_line['$empty?']()['$!']() : $b))) { - if ($truthy(next_line['$start_with?']("//"))) { - comment_lines['$<<'](self.$shift()) - } else { - break; - } - }; - return comment_lines; - }, $Reader_skip_line_comments$20.$$arity = 0); - - Opal.def(self, '$terminate', $Reader_terminate$21 = function $$terminate() { - var self = this; - - - self.lineno = $rb_plus(self.lineno, self.lines.$size()); - self.lines.$clear(); - self.look_ahead = 0; - return nil; - }, $Reader_terminate$21.$$arity = 0); - - Opal.def(self, '$read_lines_until', $Reader_read_lines_until$22 = function $$read_lines_until(options) { - var $a, $b, $c, $d, $iter = $Reader_read_lines_until$22.$$p, $yield = $iter || nil, self = this, result = nil, restore_process_lines = nil, terminator = nil, start_cursor = nil, break_on_blank_lines = nil, break_on_list_continuation = nil, skip_comments = nil, complete = nil, line_read = nil, line_restored = nil, line = nil, $writer = nil, context = nil; - - if ($iter) $Reader_read_lines_until$22.$$p = null; - - - if (options == null) { - options = $hash2([], {}); - }; - result = []; - if ($truthy(($truthy($a = self.process_lines) ? options['$[]']("skip_processing") : $a))) { - - self.process_lines = false; - restore_process_lines = true;}; - if ($truthy((terminator = options['$[]']("terminator")))) { - - start_cursor = ($truthy($a = options['$[]']("cursor")) ? $a : self.$cursor()); - break_on_blank_lines = false; - break_on_list_continuation = false; - } else { - - break_on_blank_lines = options['$[]']("break_on_blank_lines"); - break_on_list_continuation = options['$[]']("break_on_list_continuation"); - }; - skip_comments = options['$[]']("skip_line_comments"); - complete = (line_read = (line_restored = nil)); - if ($truthy(options['$[]']("skip_first_line"))) { - self.$shift()}; - while ($truthy(($truthy($b = complete['$!']()) ? (line = self.$read_line()) : $b))) { - - complete = (function() {while ($truthy(true)) { - - if ($truthy(($truthy($c = terminator) ? line['$=='](terminator) : $c))) { - return true}; - if ($truthy(($truthy($c = break_on_blank_lines) ? line['$empty?']() : $c))) { - return true}; - if ($truthy(($truthy($c = ($truthy($d = break_on_list_continuation) ? line_read : $d)) ? line['$==']($$($nesting, 'LIST_CONTINUATION')) : $c))) { - - - $writer = ["preserve_last_line", true]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return true;}; - if ($truthy((($c = ($yield !== nil)) ? Opal.yield1($yield, line) : ($yield !== nil)))) { - return true}; - return false; - }; return nil; })(); - if ($truthy(complete)) { - - if ($truthy(options['$[]']("read_last_line"))) { - - result['$<<'](line); - line_read = true;}; - if ($truthy(options['$[]']("preserve_last_line"))) { - - self.$unshift(line); - line_restored = true;}; - } else if ($truthy(($truthy($b = ($truthy($c = skip_comments) ? line['$start_with?']("//") : $c)) ? line['$start_with?']("///")['$!']() : $b))) { - } else { - - result['$<<'](line); - line_read = true; - }; - }; - if ($truthy(restore_process_lines)) { - - self.process_lines = true; - if ($truthy(($truthy($a = line_restored) ? terminator['$!']() : $a))) { - self.look_ahead = $rb_minus(self.look_ahead, 1)};}; - if ($truthy(($truthy($a = ($truthy($b = terminator) ? terminator['$!='](line) : $b)) ? (context = options.$fetch("context", terminator)) : $a))) { - - if (start_cursor['$==']("at_mark")) { - start_cursor = self.$cursor_at_mark()}; - self.$logger().$warn(self.$message_with_context("" + "unterminated " + (context) + " block", $hash2(["source_location"], {"source_location": start_cursor}))); - self.unterminated = true;}; - return result; - }, $Reader_read_lines_until$22.$$arity = -1); - - Opal.def(self, '$shift', $Reader_shift$23 = function $$shift() { - var self = this; - - - self.lineno = $rb_plus(self.lineno, 1); - if (self.look_ahead['$=='](0)) { - } else { - self.look_ahead = $rb_minus(self.look_ahead, 1) - }; - return self.lines.$shift(); - }, $Reader_shift$23.$$arity = 0); - - Opal.def(self, '$unshift', $Reader_unshift$24 = function $$unshift(line) { - var self = this; - - - self.lineno = $rb_minus(self.lineno, 1); - self.look_ahead = $rb_plus(self.look_ahead, 1); - return self.lines.$unshift(line); - }, $Reader_unshift$24.$$arity = 1); - - Opal.def(self, '$unshift_all', $Reader_unshift_all$25 = function $$unshift_all(lines) { - var self = this; - - - self.lineno = $rb_minus(self.lineno, lines.$size()); - self.look_ahead = $rb_plus(self.look_ahead, lines.$size()); - return $send(self.lines, 'unshift', Opal.to_a(lines)); - }, $Reader_unshift_all$25.$$arity = 1); - - Opal.def(self, '$cursor', $Reader_cursor$26 = function $$cursor() { - var self = this; - - return $$($nesting, 'Cursor').$new(self.file, self.dir, self.path, self.lineno) - }, $Reader_cursor$26.$$arity = 0); - - Opal.def(self, '$cursor_at_line', $Reader_cursor_at_line$27 = function $$cursor_at_line(lineno) { - var self = this; - - return $$($nesting, 'Cursor').$new(self.file, self.dir, self.path, lineno) - }, $Reader_cursor_at_line$27.$$arity = 1); - - Opal.def(self, '$cursor_at_mark', $Reader_cursor_at_mark$28 = function $$cursor_at_mark() { - var self = this; - - if ($truthy(self.mark)) { - return $send($$($nesting, 'Cursor'), 'new', Opal.to_a(self.mark)) - } else { - return self.$cursor() - } - }, $Reader_cursor_at_mark$28.$$arity = 0); - - Opal.def(self, '$cursor_before_mark', $Reader_cursor_before_mark$29 = function $$cursor_before_mark() { - var $a, $b, self = this, m_file = nil, m_dir = nil, m_path = nil, m_lineno = nil; - - if ($truthy(self.mark)) { - - $b = self.mark, $a = Opal.to_ary($b), (m_file = ($a[0] == null ? nil : $a[0])), (m_dir = ($a[1] == null ? nil : $a[1])), (m_path = ($a[2] == null ? nil : $a[2])), (m_lineno = ($a[3] == null ? nil : $a[3])), $b; - return $$($nesting, 'Cursor').$new(m_file, m_dir, m_path, $rb_minus(m_lineno, 1)); - } else { - return $$($nesting, 'Cursor').$new(self.file, self.dir, self.path, $rb_minus(self.lineno, 1)) - } - }, $Reader_cursor_before_mark$29.$$arity = 0); - - Opal.def(self, '$cursor_at_prev_line', $Reader_cursor_at_prev_line$30 = function $$cursor_at_prev_line() { - var self = this; - - return $$($nesting, 'Cursor').$new(self.file, self.dir, self.path, $rb_minus(self.lineno, 1)) - }, $Reader_cursor_at_prev_line$30.$$arity = 0); - - Opal.def(self, '$mark', $Reader_mark$31 = function $$mark() { - var self = this; - - return (self.mark = [self.file, self.dir, self.path, self.lineno]) - }, $Reader_mark$31.$$arity = 0); - - Opal.def(self, '$line_info', $Reader_line_info$32 = function $$line_info() { - var self = this; - - return "" + (self.path) + ": line " + (self.lineno) - }, $Reader_line_info$32.$$arity = 0); - - Opal.def(self, '$lines', $Reader_lines$33 = function $$lines() { - var self = this; - - return self.lines.$drop(0) - }, $Reader_lines$33.$$arity = 0); - - Opal.def(self, '$string', $Reader_string$34 = function $$string() { - var self = this; - - return self.lines.$join($$($nesting, 'LF')) - }, $Reader_string$34.$$arity = 0); - - Opal.def(self, '$source', $Reader_source$35 = function $$source() { - var self = this; - - return self.source_lines.$join($$($nesting, 'LF')) - }, $Reader_source$35.$$arity = 0); - - Opal.def(self, '$save', $Reader_save$36 = function $$save() { - var $$37, self = this; - - - self.saved = $send($hash2([], {}), 'tap', [], ($$37 = function(accum){var self = $$37.$$s || this, $$38; - - - - if (accum == null) { - accum = nil; - }; - return $send(self.$instance_variables(), 'each', [], ($$38 = function(name){var self = $$38.$$s || this, $a, $writer = nil, val = nil; - - - - if (name == null) { - name = nil; - }; - if ($truthy(($truthy($a = name['$==']("@saved")) ? $a : name['$==']("@source_lines")))) { - return nil - } else { - - $writer = [name, (function() {if ($truthy($$$('::', 'Array')['$===']((val = self.$instance_variable_get(name))))) { - - return val.$drop(0); - } else { - return val - }; return nil; })()]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - };}, $$38.$$s = self, $$38.$$arity = 1, $$38));}, $$37.$$s = self, $$37.$$arity = 1, $$37)); - return nil; - }, $Reader_save$36.$$arity = 0); - - Opal.def(self, '$restore_save', $Reader_restore_save$39 = function $$restore_save() { - var $$40, self = this; - - if ($truthy(self.saved)) { - - $send(self.saved, 'each', [], ($$40 = function(name, val){var self = $$40.$$s || this; - - - - if (name == null) { - name = nil; - }; - - if (val == null) { - val = nil; - }; - return self.$instance_variable_set(name, val);}, $$40.$$s = self, $$40.$$arity = 2, $$40)); - return (self.saved = nil); - } else { - return nil - } - }, $Reader_restore_save$39.$$arity = 0); - - Opal.def(self, '$discard_save', $Reader_discard_save$41 = function $$discard_save() { - var self = this; - - return (self.saved = nil) - }, $Reader_discard_save$41.$$arity = 0); - - Opal.def(self, '$to_s', $Reader_to_s$42 = function $$to_s() { - var self = this; - - return "" + "#<" + (self.$class()) + "@" + (self.$object_id()) + " {path: " + (self.path.$inspect()) + ", line: " + (self.lineno) + "}>" - }, $Reader_to_s$42.$$arity = 0); - self.$private(); - - Opal.def(self, '$prepare_lines', $Reader_prepare_lines$43 = function $$prepare_lines(data, opts) { - var self = this, normalize = nil, trim_end = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - try { - if ($truthy((normalize = opts['$[]']("normalize")))) { - - trim_end = (function() {if (normalize['$==']("chomp")) { - return false - } else { - return true - }; return nil; })(); - if ($truthy($$$('::', 'Array')['$==='](data))) { - - return $$($nesting, 'Helpers').$prepare_source_array(data, trim_end); - } else { - - return $$($nesting, 'Helpers').$prepare_source_string(data, trim_end); - }; - } else if ($truthy($$$('::', 'Array')['$==='](data))) { - return data.$drop(0) - } else if ($truthy(data)) { - return data.$chomp().$split($$($nesting, 'LF'), -1) - } else { - return [] - } - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - if ($truthy((function() {if ($truthy($$$('::', 'Array')['$==='](data))) { - return data.$join() - } else { - return data.$to_s() - }; return nil; })()['$valid_encoding?']())) { - return self.$raise() - } else { - return self.$raise($$$('::', 'ArgumentError'), "source is either binary or contains invalid Unicode data") - } - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - }, $Reader_prepare_lines$43.$$arity = -2); - return (Opal.def(self, '$process_line', $Reader_process_line$44 = function $$process_line(line) { - var self = this; - - - if ($truthy(self.process_lines)) { - self.look_ahead = $rb_plus(self.look_ahead, 1)}; - return line; - }, $Reader_process_line$44.$$arity = 1), nil) && 'process_line'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'PreprocessorReader'); - - var $nesting = [self].concat($parent_nesting), $PreprocessorReader_initialize$45, $PreprocessorReader_has_more_lines$ques$46, $PreprocessorReader_empty$ques$47, $PreprocessorReader_peek_line$48, $PreprocessorReader_push_include$49, $PreprocessorReader_include_depth$50, $PreprocessorReader_exceeds_max_depth$ques$51, $PreprocessorReader_shift$52, $PreprocessorReader_include_processors$ques$53, $PreprocessorReader_create_include_cursor$54, $PreprocessorReader_to_s$55, $PreprocessorReader_prepare_lines$57, $PreprocessorReader_process_line$58, $PreprocessorReader_preprocess_conditional_directive$59, $PreprocessorReader_preprocess_include_directive$64, $PreprocessorReader_resolve_include_path$77, $PreprocessorReader_pop_include$79, $PreprocessorReader_split_delimited_value$80, $PreprocessorReader_skip_front_matter$excl$81, $PreprocessorReader_resolve_expr_val$82; - - self.$$prototype.include_stack = self.$$prototype.lines = self.$$prototype.file = self.$$prototype.dir = self.$$prototype.path = self.$$prototype.lineno = self.$$prototype.maxdepth = self.$$prototype.process_lines = self.$$prototype.includes = self.$$prototype.document = self.$$prototype.unescape_next_line = self.$$prototype.include_processor_extensions = self.$$prototype.look_ahead = self.$$prototype.skipping = self.$$prototype.conditional_stack = nil; - - self.$attr_reader("include_stack"); - - Opal.def(self, '$initialize', $PreprocessorReader_initialize$45 = function $$initialize(document, data, cursor, opts) { - var $a, $iter = $PreprocessorReader_initialize$45.$$p, $yield = $iter || nil, self = this, default_include_depth = nil; - - if ($iter) $PreprocessorReader_initialize$45.$$p = null; - - - if (data == null) { - data = nil; - }; - - if (cursor == null) { - cursor = nil; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - self.document = document; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $PreprocessorReader_initialize$45, false), [data, cursor, opts], null); - if ($truthy($rb_gt((default_include_depth = ($truthy($a = document.$attributes()['$[]']("max-include-depth")) ? $a : 64).$to_i()), 0))) { - self.maxdepth = $hash2(["abs", "curr", "rel"], {"abs": default_include_depth, "curr": default_include_depth, "rel": default_include_depth}) - } else { - self.maxdepth = nil - }; - self.include_stack = []; - self.includes = document.$catalog()['$[]']("includes"); - self.skipping = false; - self.conditional_stack = []; - return (self.include_processor_extensions = nil); - }, $PreprocessorReader_initialize$45.$$arity = -2); - - Opal.def(self, '$has_more_lines?', $PreprocessorReader_has_more_lines$ques$46 = function() { - var self = this; - - if ($truthy(self.$peek_line())) { - return true - } else { - return false - } - }, $PreprocessorReader_has_more_lines$ques$46.$$arity = 0); - - Opal.def(self, '$empty?', $PreprocessorReader_empty$ques$47 = function() { - var self = this; - - if ($truthy(self.$peek_line())) { - return false - } else { - return true - } - }, $PreprocessorReader_empty$ques$47.$$arity = 0); - Opal.alias(self, "eof?", "empty?"); - - Opal.def(self, '$peek_line', $PreprocessorReader_peek_line$48 = function $$peek_line(direct) { - var $iter = $PreprocessorReader_peek_line$48.$$p, $yield = $iter || nil, self = this, line = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $PreprocessorReader_peek_line$48.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if (direct == null) { - direct = false; - }; - if ($truthy((line = $send(self, Opal.find_super_dispatcher(self, 'peek_line', $PreprocessorReader_peek_line$48, false), $zuper, $iter)))) { - return line - } else if ($truthy(self.include_stack['$empty?']())) { - return nil - } else { - - self.$pop_include(); - return self.$peek_line(direct); - }; - }, $PreprocessorReader_peek_line$48.$$arity = -1); - - Opal.def(self, '$push_include', $PreprocessorReader_push_include$49 = function $$push_include(data, file, path, lineno, attributes) { - var $a, self = this, $writer = nil, dir = nil, rel_maxdepth = nil, curr_maxdepth = nil, abs_maxdepth = nil, old_leveloffset = nil; - - - - if (file == null) { - file = nil; - }; - - if (path == null) { - path = nil; - }; - - if (lineno == null) { - lineno = 1; - }; - - if (attributes == null) { - attributes = $hash2([], {}); - }; - self.include_stack['$<<']([self.lines, self.file, self.dir, self.path, self.lineno, self.maxdepth, self.process_lines]); - if ($truthy((self.file = file))) { - - if ($truthy($$$('::', 'String')['$==='](file))) { - self.dir = $$$('::', 'File').$dirname(file) - } else if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) { - self.dir = $$$('::', 'URI').$parse($$$('::', 'File').$dirname((file = file.$to_s()))) - } else { - - - $writer = [(function() {if ((dir = $$$('::', 'File').$dirname(file.$path()))['$==']("/")) { - return "" - } else { - return dir - }; return nil; })()]; - $send((self.dir = file.$dup()), 'path=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - file = file.$to_s(); - }; - self.path = (path = ($truthy($a = path) ? $a : $$$('::', 'File').$basename(file))); - if ($truthy((self.process_lines = $send(file, 'end_with?', Opal.to_a($$($nesting, 'ASCIIDOC_EXTENSIONS').$keys()))))) { - - $writer = [path.$slice(0, path.$rindex(".")), (function() {if ($truthy(attributes['$[]']("partial-option"))) { - return nil - } else { - return true - }; return nil; })()]; - $send(self.includes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - } else { - - self.dir = "."; - self.process_lines = true; - if ($truthy((self.path = path))) { - - $writer = [$$($nesting, 'Helpers').$rootname(path), (function() {if ($truthy(attributes['$[]']("partial-option"))) { - return nil - } else { - return true - }; return nil; })()]; - $send(self.includes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - self.path = "" - }; - }; - self.lineno = lineno; - if ($truthy(($truthy($a = self.maxdepth) ? attributes['$key?']("depth") : $a))) { - if ($truthy($rb_gt((rel_maxdepth = attributes['$[]']("depth").$to_i()), 0))) { - - if ($truthy($rb_gt((curr_maxdepth = $rb_plus(self.include_stack.$size(), rel_maxdepth)), (abs_maxdepth = self.maxdepth['$[]']("abs"))))) { - curr_maxdepth = (rel_maxdepth = abs_maxdepth)}; - self.maxdepth = $hash2(["abs", "curr", "rel"], {"abs": abs_maxdepth, "curr": curr_maxdepth, "rel": rel_maxdepth}); - } else { - self.maxdepth = $hash2(["abs", "curr", "rel"], {"abs": self.maxdepth['$[]']("abs"), "curr": self.include_stack.$size(), "rel": 0}) - }}; - if ($truthy((self.lines = self.$prepare_lines(data, $hash2(["normalize", "condense", "indent"], {"normalize": ($truthy($a = self.process_lines) ? $a : "chomp"), "condense": false, "indent": attributes['$[]']("indent")})))['$empty?']())) { - self.$pop_include() - } else { - - if ($truthy(attributes['$key?']("leveloffset"))) { - - self.lines.$unshift(""); - self.lines.$unshift("" + ":leveloffset: " + (attributes['$[]']("leveloffset"))); - self.lines['$<<'](""); - if ($truthy((old_leveloffset = self.document.$attr("leveloffset")))) { - self.lines['$<<']("" + ":leveloffset: " + (old_leveloffset)) - } else { - self.lines['$<<'](":leveloffset!:") - }; - self.lineno = $rb_minus(self.lineno, 2);}; - self.look_ahead = 0; - }; - return self; - }, $PreprocessorReader_push_include$49.$$arity = -2); - - Opal.def(self, '$include_depth', $PreprocessorReader_include_depth$50 = function $$include_depth() { - var self = this; - - return self.include_stack.$size() - }, $PreprocessorReader_include_depth$50.$$arity = 0); - - Opal.def(self, '$exceeds_max_depth?', $PreprocessorReader_exceeds_max_depth$ques$51 = function() { - var $a, $b, self = this; - - return ($truthy($a = ($truthy($b = self.maxdepth) ? $rb_ge(self.include_stack.$size(), self.maxdepth['$[]']("curr")) : $b)) ? self.maxdepth['$[]']("rel") : $a) - }, $PreprocessorReader_exceeds_max_depth$ques$51.$$arity = 0); - Opal.alias(self, "exceeded_max_depth?", "exceeds_max_depth?"); - - Opal.def(self, '$shift', $PreprocessorReader_shift$52 = function $$shift() { - var $iter = $PreprocessorReader_shift$52.$$p, $yield = $iter || nil, self = this, line = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $PreprocessorReader_shift$52.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if ($truthy(self.unescape_next_line)) { - - self.unescape_next_line = false; - return (line = $send(self, Opal.find_super_dispatcher(self, 'shift', $PreprocessorReader_shift$52, false), $zuper, $iter)).$slice(1, line.$length()); - } else { - return $send(self, Opal.find_super_dispatcher(self, 'shift', $PreprocessorReader_shift$52, false), $zuper, $iter) - } - }, $PreprocessorReader_shift$52.$$arity = 0); - - Opal.def(self, '$include_processors?', $PreprocessorReader_include_processors$ques$53 = function() { - var $a, self = this; - - if ($truthy(self.include_processor_extensions['$nil?']())) { - if ($truthy(($truthy($a = self.document['$extensions?']()) ? self.document.$extensions()['$include_processors?']() : $a))) { - return (self.include_processor_extensions = self.document.$extensions().$include_processors())['$!']()['$!']() - } else { - return (self.include_processor_extensions = false) - } - } else { - return self.include_processor_extensions['$!='](false) - } - }, $PreprocessorReader_include_processors$ques$53.$$arity = 0); - - Opal.def(self, '$create_include_cursor', $PreprocessorReader_create_include_cursor$54 = function $$create_include_cursor(file, path, lineno) { - var self = this, dir = nil; - - - if ($truthy($$$('::', 'String')['$==='](file))) { - dir = $$$('::', 'File').$dirname(file) - } else if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) { - dir = $$$('::', 'File').$dirname((file = file.$to_s())) - } else { - - dir = (function() {if ((dir = $$$('::', 'File').$dirname(file.$path()))['$==']("")) { - return "/" - } else { - return dir - }; return nil; })(); - file = file.$to_s(); - }; - return $$($nesting, 'Cursor').$new(file, dir, path, lineno); - }, $PreprocessorReader_create_include_cursor$54.$$arity = 3); - - Opal.def(self, '$to_s', $PreprocessorReader_to_s$55 = function $$to_s() { - var $$56, self = this; - - return "" + "#<" + (self.$class()) + "@" + (self.$object_id()) + " {path: " + (self.path.$inspect()) + ", line: " + (self.lineno) + ", include depth: " + (self.include_stack.$size()) + ", include stack: [" + ($send(self.include_stack, 'map', [], ($$56 = function(inc){var self = $$56.$$s || this; - - - - if (inc == null) { - inc = nil; - }; - return inc.$to_s();}, $$56.$$s = self, $$56.$$arity = 1, $$56)).$join(", ")) + "]}>" - }, $PreprocessorReader_to_s$55.$$arity = 0); - self.$private(); - - Opal.def(self, '$prepare_lines', $PreprocessorReader_prepare_lines$57 = function $$prepare_lines(data, opts) { - var $a, $b, $iter = $PreprocessorReader_prepare_lines$57.$$p, $yield = $iter || nil, self = this, result = nil, front_matter = nil, $writer = nil, last = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $PreprocessorReader_prepare_lines$57.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if (opts == null) { - opts = $hash2([], {}); - }; - result = $send(self, Opal.find_super_dispatcher(self, 'prepare_lines', $PreprocessorReader_prepare_lines$57, false), $zuper, $iter); - if ($truthy(($truthy($a = self.document) ? self.document.$attributes()['$[]']("skip-front-matter") : $a))) { - if ($truthy((front_matter = self['$skip_front_matter!'](result)))) { - - $writer = ["front-matter", front_matter.$join($$($nesting, 'LF'))]; - $send(self.document.$attributes(), '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}}; - if ($truthy(opts.$fetch("condense", true))) { - while ($truthy(($truthy($b = (last = result['$[]'](-1))) ? last['$empty?']() : $b))) { - result.$pop() - }}; - if ($truthy(opts['$[]']("indent"))) { - $$($nesting, 'Parser')['$adjust_indentation!'](result, opts['$[]']("indent").$to_i(), self.document.$attr("tabsize").$to_i())}; - return result; - }, $PreprocessorReader_prepare_lines$57.$$arity = -2); - - Opal.def(self, '$process_line', $PreprocessorReader_process_line$58 = function $$process_line(line) { - var $a, $b, self = this; - - - if ($truthy(self.process_lines)) { - } else { - return line - }; - if ($truthy(line['$empty?']())) { - - self.look_ahead = $rb_plus(self.look_ahead, 1); - return line;}; - if ($truthy(($truthy($a = ($truthy($b = line['$end_with?']("]")) ? line['$start_with?']("[")['$!']() : $b)) ? line['$include?']("::") : $a))) { - if ($truthy(($truthy($a = line['$include?']("if")) ? $$($nesting, 'ConditionalDirectiveRx')['$=~'](line) : $a))) { - if ((($a = $gvars['~']) === nil ? nil : $a['$[]'](1))['$==']("\\")) { - - self.unescape_next_line = true; - self.look_ahead = $rb_plus(self.look_ahead, 1); - return line.$slice(1, line.$length()); - } else if ($truthy(self.$preprocess_conditional_directive((($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](3)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](4)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](5))))) { - - self.$shift(); - return nil; - } else { - - self.look_ahead = $rb_plus(self.look_ahead, 1); - return line; - } - } else if ($truthy(self.skipping)) { - - self.$shift(); - return nil; - } else if ($truthy(($truthy($a = line['$start_with?']("inc", "\\inc")) ? $$($nesting, 'IncludeDirectiveRx')['$=~'](line) : $a))) { - if ((($a = $gvars['~']) === nil ? nil : $a['$[]'](1))['$==']("\\")) { - - self.unescape_next_line = true; - self.look_ahead = $rb_plus(self.look_ahead, 1); - return line.$slice(1, line.$length()); - } else if ($truthy(self.$preprocess_include_directive((($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](3))))) { - return nil - } else { - - self.look_ahead = $rb_plus(self.look_ahead, 1); - return line; - } - } else { - - self.look_ahead = $rb_plus(self.look_ahead, 1); - return line; - } - } else if ($truthy(self.skipping)) { - - self.$shift(); - return nil; - } else { - - self.look_ahead = $rb_plus(self.look_ahead, 1); - return line; - }; - }, $PreprocessorReader_process_line$58.$$arity = 1); - - Opal.def(self, '$preprocess_conditional_directive', $PreprocessorReader_preprocess_conditional_directive$59 = function $$preprocess_conditional_directive(keyword, target, delimiter, text) { - var $a, $$60, $$61, $$62, $$63, self = this, no_target = nil, pair = nil, skip = nil, $case = nil, lhs = nil, op = nil, rhs = nil; - - - if ($truthy((no_target = target['$empty?']()))) { - } else { - target = target.$downcase() - }; - if (keyword['$==']("endif")) { - - if ($truthy(text)) { - self.$logger().$error(self.$message_with_context("" + "malformed preprocessor directive - text not permitted: endif::" + (target) + "[" + (text) + "]", $hash2(["source_location"], {"source_location": self.$cursor()}))) - } else if ($truthy(self.conditional_stack['$empty?']())) { - self.$logger().$error(self.$message_with_context("" + "unmatched preprocessor directive: endif::" + (target) + "[]", $hash2(["source_location"], {"source_location": self.$cursor()}))) - } else if ($truthy(($truthy($a = no_target) ? $a : target['$==']((pair = self.conditional_stack['$[]'](-1))['$[]']("target"))))) { - - self.conditional_stack.$pop(); - self.skipping = (function() {if ($truthy(self.conditional_stack['$empty?']())) { - return false - } else { - return self.conditional_stack['$[]'](-1)['$[]']("skipping") - }; return nil; })(); - } else { - self.$logger().$error(self.$message_with_context("" + "mismatched preprocessor directive: endif::" + (target) + "[], expected endif::" + (pair['$[]']("target")) + "[]", $hash2(["source_location"], {"source_location": self.$cursor()}))) - }; - return true; - } else if ($truthy(self.skipping)) { - skip = false - } else { - $case = keyword; - if ("ifdef"['$===']($case)) { - if ($truthy(no_target)) { - - self.$logger().$error(self.$message_with_context("" + "malformed preprocessor directive - missing target: ifdef::[" + (text) + "]", $hash2(["source_location"], {"source_location": self.$cursor()}))); - return true;}; - $case = delimiter; - if (","['$===']($case)) {skip = $send(target.$split(",", -1), 'none?', [], ($$60 = function(name){var self = $$60.$$s || this; - if (self.document == null) self.document = nil; - - - - if (name == null) { - name = nil; - }; - return self.document.$attributes()['$key?'](name);}, $$60.$$s = self, $$60.$$arity = 1, $$60))} - else if ("+"['$===']($case)) {skip = $send(target.$split("+", -1), 'any?', [], ($$61 = function(name){var self = $$61.$$s || this; - if (self.document == null) self.document = nil; - - - - if (name == null) { - name = nil; - }; - return self.document.$attributes()['$key?'](name)['$!']();}, $$61.$$s = self, $$61.$$arity = 1, $$61))} - else {skip = self.document.$attributes()['$key?'](target)['$!']()};} - else if ("ifndef"['$===']($case)) { - if ($truthy(no_target)) { - - self.$logger().$error(self.$message_with_context("" + "malformed preprocessor directive - missing target: ifndef::[" + (text) + "]", $hash2(["source_location"], {"source_location": self.$cursor()}))); - return true;}; - $case = delimiter; - if (","['$===']($case)) {skip = $send(target.$split(",", -1), 'any?', [], ($$62 = function(name){var self = $$62.$$s || this; - if (self.document == null) self.document = nil; - - - - if (name == null) { - name = nil; - }; - return self.document.$attributes()['$key?'](name);}, $$62.$$s = self, $$62.$$arity = 1, $$62))} - else if ("+"['$===']($case)) {skip = $send(target.$split("+", -1), 'all?', [], ($$63 = function(name){var self = $$63.$$s || this; - if (self.document == null) self.document = nil; - - - - if (name == null) { - name = nil; - }; - return self.document.$attributes()['$key?'](name);}, $$63.$$s = self, $$63.$$arity = 1, $$63))} - else {skip = self.document.$attributes()['$key?'](target)};} - else if ("ifeval"['$===']($case)) {if ($truthy(no_target)) { - if ($truthy(($truthy($a = text) ? $$($nesting, 'EvalExpressionRx')['$=~'](text.$strip()) : $a))) { - - lhs = (($a = $gvars['~']) === nil ? nil : $a['$[]'](1)); - op = (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)); - rhs = (($a = $gvars['~']) === nil ? nil : $a['$[]'](3)); - skip = (function() {if ($truthy(self.$resolve_expr_val(lhs).$send(op, self.$resolve_expr_val(rhs)))) { - return false - } else { - return true - }; return nil; })(); - } else { - - self.$logger().$error(self.$message_with_context("" + "malformed preprocessor directive - " + ((function() {if ($truthy(text)) { - return "invalid expression" - } else { - return "missing expression" - }; return nil; })()) + ": ifeval::[" + (text) + "]", $hash2(["source_location"], {"source_location": self.$cursor()}))); - return true; - } - } else { - - self.$logger().$error(self.$message_with_context("" + "malformed preprocessor directive - target not permitted: ifeval::" + (target) + "[" + (text) + "]", $hash2(["source_location"], {"source_location": self.$cursor()}))); - return true; - }} - }; - if ($truthy(($truthy($a = keyword['$==']("ifeval")) ? $a : text['$!']()))) { - - if ($truthy(skip)) { - self.skipping = true}; - self.conditional_stack['$<<']($hash2(["target", "skip", "skipping"], {"target": target, "skip": skip, "skipping": self.skipping})); - } else if ($truthy(($truthy($a = self.skipping) ? $a : skip))) { - } else { - - self.$replace_next_line(text.$rstrip()); - self.$unshift(""); - if ($truthy(text['$start_with?']("include::"))) { - self.look_ahead = $rb_minus(self.look_ahead, 1)}; - }; - return true; - }, $PreprocessorReader_preprocess_conditional_directive$59.$$arity = 4); - - Opal.def(self, '$preprocess_include_directive', $PreprocessorReader_preprocess_include_directive$64 = function $$preprocess_include_directive(target, attrlist) { - var $a, $b, $$65, $$66, $$67, $$68, $$69, $$70, $$72, $$75, $$76, self = this, doc = nil, expanded_target = nil, attr_missing = nil, ext = nil, parsed_attrs = nil, inc_path = nil, target_type = nil, relpath = nil, reader = nil, read_mode = nil, enc = nil, $writer = nil, read_mode_params = nil, inc_linenos = nil, inc_tags = nil, tag = nil, inc_lines = nil, inc_offset = nil, inc_lineno = nil, tag_stack = nil, tags_used = nil, active_tag = nil, select = nil, base_select = nil, wildcard = nil, missing_tags = nil, inc_content = nil; - - - doc = self.document; - if ($truthy(($truthy($a = (expanded_target = target)['$include?']($$($nesting, 'ATTR_REF_HEAD'))) ? (expanded_target = doc.$sub_attributes(target, $hash2(["attribute_missing"], {"attribute_missing": (function() {if ((attr_missing = ($truthy($b = doc.$attributes()['$[]']("attribute-missing")) ? $b : $$($nesting, 'Compliance').$attribute_missing()))['$==']("warn")) { - return "drop-line" - } else { - return attr_missing - }; return nil; })()})))['$empty?']() : $a))) { - if ($truthy((($a = attr_missing['$==']("drop-line")) ? doc.$sub_attributes($rb_plus(target, " "), $hash2(["attribute_missing", "drop_line_severity"], {"attribute_missing": "drop-line", "drop_line_severity": "ignore"}))['$empty?']() : attr_missing['$==']("drop-line")))) { - - $send(self.$logger(), 'info', [], ($$65 = function(){var self = $$65.$$s || this; - - return self.$message_with_context("" + "include dropped due to missing attribute: include::" + (target) + "[" + (attrlist) + "]", $hash2(["source_location"], {"source_location": self.$cursor()}))}, $$65.$$s = self, $$65.$$arity = 0, $$65)); - self.$shift(); - return true; - } else if ($truthy(doc.$parse_attributes(attrlist, [], $hash2(["sub_input"], {"sub_input": true}))['$[]']("optional-option"))) { - - $send(self.$logger(), 'info', [], ($$66 = function(){var self = $$66.$$s || this, $c; - - return self.$message_with_context("" + "optional include dropped " + ((function() {if ($truthy((($c = attr_missing['$==']("warn")) ? doc.$sub_attributes($rb_plus(target, " "), $hash2(["attribute_missing", "drop_line_severity"], {"attribute_missing": "drop-line", "drop_line_severity": "ignore"}))['$empty?']() : attr_missing['$==']("warn")))) { - return "due to missing attribute" - } else { - return "because resolved target is blank" - }; return nil; })()) + ": include::" + (target) + "[" + (attrlist) + "]", $hash2(["source_location"], {"source_location": self.$cursor()}))}, $$66.$$s = self, $$66.$$arity = 0, $$66)); - self.$shift(); - return true; - } else { - - self.$logger().$warn(self.$message_with_context("" + "include dropped " + ((function() {if ($truthy((($a = attr_missing['$==']("warn")) ? doc.$sub_attributes($rb_plus(target, " "), $hash2(["attribute_missing", "drop_line_severity"], {"attribute_missing": "drop-line", "drop_line_severity": "ignore"}))['$empty?']() : attr_missing['$==']("warn")))) { - return "due to missing attribute" - } else { - return "because resolved target is blank" - }; return nil; })()) + ": include::" + (target) + "[" + (attrlist) + "]", $hash2(["source_location"], {"source_location": self.$cursor()}))); - return self.$replace_next_line("" + "Unresolved directive in " + (self.path) + " - include::" + (target) + "[" + (attrlist) + "]"); - } - } else if ($truthy(($truthy($a = self['$include_processors?']()) ? (ext = $send(self.include_processor_extensions, 'find', [], ($$67 = function(candidate){var self = $$67.$$s || this; - - - - if (candidate == null) { - candidate = nil; - }; - return candidate.$instance()['$handles?'](expanded_target);}, $$67.$$s = self, $$67.$$arity = 1, $$67))) : $a))) { - - self.$shift(); - ext.$process_method()['$[]'](doc, self, expanded_target, doc.$parse_attributes(attrlist, [], $hash2(["sub_input"], {"sub_input": true}))); - return true; - } else if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')))) { - return self.$replace_next_line("" + "link:" + (expanded_target) + "[]") - } else if ($truthy(self.maxdepth)) { - - if ($truthy($rb_ge(self.include_stack.$size(), self.maxdepth['$[]']("curr")))) { - - self.$logger().$error(self.$message_with_context("" + "maximum include depth of " + (self.maxdepth['$[]']("rel")) + " exceeded", $hash2(["source_location"], {"source_location": self.$cursor()}))); - return nil;}; - parsed_attrs = doc.$parse_attributes(attrlist, [], $hash2(["sub_input"], {"sub_input": true})); - $b = self.$resolve_include_path(expanded_target, attrlist, parsed_attrs), $a = Opal.to_ary($b), (inc_path = ($a[0] == null ? nil : $a[0])), (target_type = ($a[1] == null ? nil : $a[1])), (relpath = ($a[2] == null ? nil : $a[2])), $b; - if (target_type['$==']("file")) { - - reader = $$$('::', 'File').$method("open"); - read_mode = $$($nesting, 'FILE_READ_MODE'); - } else if (target_type['$==']("uri")) { - - reader = $$$('::', 'OpenURI').$method("open_uri"); - read_mode = $$($nesting, 'URI_READ_MODE'); - } else { - return inc_path - }; - if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) { - } else if ($truthy(($truthy($a = (enc = parsed_attrs['$[]']("encoding"))) ? (function() { try { - return $$$('::', 'Encoding').$find(enc) - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return nil - } finally { Opal.pop_exception() } - } else { throw $err; } - }})() : $a))) { - - - $writer = [1, enc]; - $send((read_mode_params = read_mode.$split(":")), '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - read_mode = read_mode_params.$join(":");}; - inc_linenos = (inc_tags = nil); - if ($truthy(attrlist)) { - if ($truthy(parsed_attrs['$key?']("lines"))) { - - inc_linenos = []; - $send(self.$split_delimited_value(parsed_attrs['$[]']("lines")), 'each', [], ($$68 = function(linedef){var self = $$68.$$s || this, $c, $d, from = nil, _ = nil, to = nil; - - - - if (linedef == null) { - linedef = nil; - }; - if ($truthy(linedef['$include?'](".."))) { - - $d = linedef.$partition(".."), $c = Opal.to_ary($d), (from = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (to = ($c[2] == null ? nil : $c[2])), $d; - return (inc_linenos = $rb_plus(inc_linenos, (function() {if ($truthy(($truthy($c = to['$empty?']()) ? $c : $rb_lt((to = to.$to_i()), 0)))) { - return [from.$to_i(), $rb_divide(1, 0)] - } else { - return Opal.Range.$new(from.$to_i(), to, false).$to_a() - }; return nil; })())); - } else { - return inc_linenos['$<<'](linedef.$to_i()) - };}, $$68.$$s = self, $$68.$$arity = 1, $$68)); - inc_linenos = (function() {if ($truthy(inc_linenos['$empty?']())) { - return nil - } else { - return inc_linenos.$sort().$uniq() - }; return nil; })(); - } else if ($truthy(parsed_attrs['$key?']("tag"))) { - if ($truthy(($truthy($a = (tag = parsed_attrs['$[]']("tag"))['$empty?']()) ? $a : tag['$==']("!")))) { - } else { - inc_tags = (function() {if ($truthy(tag['$start_with?']("!"))) { - return $hash(tag.$slice(1, tag.$length()), false) - } else { - return $hash(tag, true) - }; return nil; })() - } - } else if ($truthy(parsed_attrs['$key?']("tags"))) { - - inc_tags = $hash2([], {}); - $send(self.$split_delimited_value(parsed_attrs['$[]']("tags")), 'each', [], ($$69 = function(tagdef){var self = $$69.$$s || this, $c; - - - - if (tagdef == null) { - tagdef = nil; - }; - if ($truthy(($truthy($c = tagdef['$empty?']()) ? $c : tagdef['$==']("!")))) { - return nil - } else if ($truthy(tagdef['$start_with?']("!"))) { - - $writer = [tagdef.$slice(1, tagdef.$length()), false]; - $send(inc_tags, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = [tagdef, true]; - $send(inc_tags, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - };}, $$69.$$s = self, $$69.$$arity = 1, $$69)); - if ($truthy(inc_tags['$empty?']())) { - inc_tags = nil};}}; - if ($truthy(inc_linenos)) { - - $a = [[], nil, 0], (inc_lines = $a[0]), (inc_offset = $a[1]), (inc_lineno = $a[2]), $a; - - try { - (function(){var $brk = Opal.new_brk(); try {return $send(reader, 'call', [inc_path, read_mode], ($$70 = function(f){var self = $$70.$$s || this, $$71, select_remaining = nil; - - - - if (f == null) { - f = nil; - }; - select_remaining = nil; - return (function(){var $brk = Opal.new_brk(); try {return $send(f, 'each_line', [], ($$71 = function(l){var self = $$71.$$s || this, $c, $d, select = nil; - - - - if (l == null) { - l = nil; - }; - inc_lineno = $rb_plus(inc_lineno, 1); - if ($truthy(($truthy($c = select_remaining) ? $c : ($truthy($d = $$$('::', 'Float')['$===']((select = inc_linenos['$[]'](0)))) ? (select_remaining = select['$infinite?']()) : $d)))) { - - inc_offset = ($truthy($c = inc_offset) ? $c : inc_lineno); - return inc_lines['$<<'](l); - } else { - - if (select['$=='](inc_lineno)) { - - inc_offset = ($truthy($c = inc_offset) ? $c : inc_lineno); - inc_lines['$<<'](l); - inc_linenos.$shift();}; - if ($truthy(inc_linenos['$empty?']())) { - - Opal.brk(nil, $brk) - } else { - return nil - }; - };}, $$71.$$s = self, $$71.$$brk = $brk, $$71.$$arity = 1, $$71)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})();}, $$70.$$s = self, $$70.$$brk = $brk, $$70.$$arity = 1, $$70)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})() - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - - self.$logger().$error(self.$message_with_context("" + "include " + (target_type) + " not readable: " + (inc_path), $hash2(["source_location"], {"source_location": self.$cursor()}))); - return self.$replace_next_line("" + "Unresolved directive in " + (self.path) + " - include::" + (expanded_target) + "[" + (attrlist) + "]"); - } finally { Opal.pop_exception() } - } else { throw $err; } - };; - self.$shift(); - if ($truthy(inc_offset)) { - - - $writer = ["partial-option", ""]; - $send(parsed_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - self.$push_include(inc_lines, inc_path, relpath, inc_offset, parsed_attrs);}; - } else if ($truthy(inc_tags)) { - - $a = [[], nil, 0, [], $$$('::', 'Set').$new(), nil], (inc_lines = $a[0]), (inc_offset = $a[1]), (inc_lineno = $a[2]), (tag_stack = $a[3]), (tags_used = $a[4]), (active_tag = $a[5]), $a; - if ($truthy(inc_tags['$key?']("**"))) { - if ($truthy(inc_tags['$key?']("*"))) { - - select = (base_select = inc_tags.$delete("**")); - wildcard = inc_tags.$delete("*"); - } else { - select = (base_select = (wildcard = inc_tags.$delete("**"))) - } - } else if ($truthy(inc_tags['$key?']("*"))) { - select = (base_select = (wildcard = inc_tags.$delete("*"))['$!']()) - } else { - select = (base_select = false) - }; - - try { - $send(reader, 'call', [inc_path, read_mode], ($$72 = function(f){var self = $$72.$$s || this, $c, $$73, dbl_co = nil, dbl_sb = nil; - - - - if (f == null) { - f = nil; - }; - $c = ["::", "[]"], (dbl_co = $c[0]), (dbl_sb = $c[1]), $c; - return $send(f, 'each_line', [], ($$73 = function(l){var self = $$73.$$s || this, $d, $e, $$74, this_tag = nil, include_cursor = nil, idx = nil; - - - - if (l == null) { - l = nil; - }; - inc_lineno = $rb_plus(inc_lineno, 1); - if ($truthy(($truthy($d = ($truthy($e = l['$include?'](dbl_co)) ? l['$include?'](dbl_sb) : $e)) ? $$($nesting, 'TagDirectiveRx')['$=~'](l) : $d))) { - - this_tag = (($d = $gvars['~']) === nil ? nil : $d['$[]'](2)); - if ($truthy((($d = $gvars['~']) === nil ? nil : $d['$[]'](1)))) { - if (this_tag['$=='](active_tag)) { - - tag_stack.$pop(); - return $e = (function() {if ($truthy(tag_stack['$empty?']())) { - return [nil, base_select] - } else { - return tag_stack['$[]'](-1) - }; return nil; })(), $d = Opal.to_ary($e), (active_tag = ($d[0] == null ? nil : $d[0])), (select = ($d[1] == null ? nil : $d[1])), $e; - } else if ($truthy(inc_tags['$key?'](this_tag))) { - - include_cursor = self.$create_include_cursor(inc_path, expanded_target, inc_lineno); - if ($truthy((idx = $send(tag_stack, 'rindex', [], ($$74 = function(key){var self = $$74.$$s || this; - - - - if (key == null) { - key = nil; - }; - return key['$=='](this_tag);}, $$74.$$s = self, $$74.$$arity = 1, $$74.$$has_trailing_comma_in_args = true, $$74))))) { - - if (idx['$=='](0)) { - tag_stack.$shift() - } else { - - tag_stack.$delete_at(idx); - }; - return self.$logger().$warn(self.$message_with_context("" + "mismatched end tag (expected '" + (active_tag) + "' but found '" + (this_tag) + "') at line " + (inc_lineno) + " of include " + (target_type) + ": " + (inc_path), $hash2(["source_location", "include_location"], {"source_location": self.$cursor(), "include_location": include_cursor}))); - } else { - return self.$logger().$warn(self.$message_with_context("" + "unexpected end tag '" + (this_tag) + "' at line " + (inc_lineno) + " of include " + (target_type) + ": " + (inc_path), $hash2(["source_location", "include_location"], {"source_location": self.$cursor(), "include_location": include_cursor}))) - }; - } else { - return nil - } - } else if ($truthy(inc_tags['$key?'](this_tag))) { - - tags_used['$<<'](this_tag); - return tag_stack['$<<']([(active_tag = this_tag), (select = inc_tags['$[]'](this_tag)), inc_lineno]); - } else if ($truthy(wildcard['$nil?']()['$!']())) { - - select = (function() {if ($truthy(($truthy($d = active_tag) ? select['$!']() : $d))) { - return false - } else { - return wildcard - }; return nil; })(); - return tag_stack['$<<']([(active_tag = this_tag), select, inc_lineno]); - } else { - return nil - }; - } else if ($truthy(select)) { - - inc_offset = ($truthy($d = inc_offset) ? $d : inc_lineno); - return inc_lines['$<<'](l); - } else { - return nil - };}, $$73.$$s = self, $$73.$$arity = 1, $$73));}, $$72.$$s = self, $$72.$$arity = 1, $$72)) - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - - self.$logger().$error(self.$message_with_context("" + "include " + (target_type) + " not readable: " + (inc_path), $hash2(["source_location"], {"source_location": self.$cursor()}))); - return self.$replace_next_line("" + "Unresolved directive in " + (self.path) + " - include::" + (expanded_target) + "[" + (attrlist) + "]"); - } finally { Opal.pop_exception() } - } else { throw $err; } - };; - if ($truthy(tag_stack['$empty?']())) { - } else { - $send(tag_stack, 'each', [], ($$75 = function(tag_name, _, tag_lineno){var self = $$75.$$s || this; - - - - if (tag_name == null) { - tag_name = nil; - }; - - if (_ == null) { - _ = nil; - }; - - if (tag_lineno == null) { - tag_lineno = nil; - }; - return self.$logger().$warn(self.$message_with_context("" + "detected unclosed tag '" + (tag_name) + "' starting at line " + (tag_lineno) + " of include " + (target_type) + ": " + (inc_path), $hash2(["source_location", "include_location"], {"source_location": self.$cursor(), "include_location": self.$create_include_cursor(inc_path, expanded_target, tag_lineno)})));}, $$75.$$s = self, $$75.$$arity = 3, $$75)) - }; - if ($truthy((missing_tags = $rb_minus(inc_tags.$keys(), tags_used.$to_a()))['$empty?']())) { - } else { - self.$logger().$warn(self.$message_with_context("" + "tag" + ((function() {if ($truthy($rb_gt(missing_tags.$size(), 1))) { - return "s" - } else { - return "" - }; return nil; })()) + " '" + (missing_tags.$join(", ")) + "' not found in include " + (target_type) + ": " + (inc_path), $hash2(["source_location"], {"source_location": self.$cursor()}))) - }; - self.$shift(); - if ($truthy(inc_offset)) { - - if ($truthy(($truthy($a = ($truthy($b = base_select) ? wildcard : $b)) ? inc_tags['$empty?']() : $a))) { - } else { - - $writer = ["partial-option", ""]; - $send(parsed_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - self.$push_include(inc_lines, inc_path, relpath, inc_offset, parsed_attrs);}; - } else { - - try { - - inc_content = $send(reader, 'call', [inc_path, read_mode], ($$76 = function(f){var self = $$76.$$s || this; - - - - if (f == null) { - f = nil; - }; - return f.$read();}, $$76.$$s = self, $$76.$$arity = 1, $$76)); - self.$shift(); - self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs); - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - - self.$logger().$error(self.$message_with_context("" + "include " + (target_type) + " not readable: " + (inc_path), $hash2(["source_location"], {"source_location": self.$cursor()}))); - return self.$replace_next_line("" + "Unresolved directive in " + (self.path) + " - include::" + (expanded_target) + "[" + (attrlist) + "]"); - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - }; - return true; - } else { - return nil - }; - }, $PreprocessorReader_preprocess_include_directive$64.$$arity = 2); - - Opal.def(self, '$resolve_include_path', $PreprocessorReader_resolve_include_path$77 = function $$resolve_include_path(target, attrlist, attributes) { - var $a, $b, $$78, self = this, doc = nil, inc_path = nil, relpath = nil; - - - doc = self.document; - if ($truthy(($truthy($a = $$($nesting, 'Helpers')['$uriish?'](target)) ? $a : (function() {if ($truthy($$$('::', 'String')['$==='](self.dir))) { - return nil - } else { - - return (target = "" + (self.dir) + "/" + (target)); - }; return nil; })()))) { - - if ($truthy(doc['$attr?']("allow-uri-read"))) { - } else { - return self.$replace_next_line("" + "link:" + (target) + "[" + (attrlist) + "]") - }; - if ($truthy(doc['$attr?']("cache-uri"))) { - if ($truthy((($b = $$$('::', 'OpenURI', 'skip_raise')) && ($a = $$$($b, 'Cache', 'skip_raise')) ? 'constant' : nil))) { - } else { - $$($nesting, 'Helpers').$require_library("open-uri/cached", "open-uri-cached") - } - } else if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL')['$!']())) { - $$$('::', 'OpenURI')}; - return [$$$('::', 'URI').$parse(target), "uri", target]; - } else { - - inc_path = doc.$normalize_system_path(target, self.dir, nil, $hash2(["target_name"], {"target_name": "include file"})); - if ($truthy($$$('::', 'File')['$file?'](inc_path))) { - } else if ($truthy(attributes['$[]']("optional-option"))) { - - $send(self.$logger(), 'info', [], ($$78 = function(){var self = $$78.$$s || this; - - return self.$message_with_context("" + "optional include dropped because include file not found: " + (inc_path), $hash2(["source_location"], {"source_location": self.$cursor()}))}, $$78.$$s = self, $$78.$$arity = 0, $$78)); - self.$shift(); - return true; - } else { - - self.$logger().$error(self.$message_with_context("" + "include file not found: " + (inc_path), $hash2(["source_location"], {"source_location": self.$cursor()}))); - return self.$replace_next_line("" + "Unresolved directive in " + (self.path) + " - include::" + (target) + "[" + (attrlist) + "]"); - }; - relpath = doc.$path_resolver().$relative_path(inc_path, doc.$base_dir()); - return [inc_path, "file", relpath]; - }; - }, $PreprocessorReader_resolve_include_path$77.$$arity = 3); - - Opal.def(self, '$pop_include', $PreprocessorReader_pop_include$79 = function $$pop_include() { - var $a, $b, self = this; - - if ($truthy($rb_gt(self.include_stack.$size(), 0))) { - - $b = self.include_stack.$pop(), $a = Opal.to_ary($b), (self.lines = ($a[0] == null ? nil : $a[0])), (self.file = ($a[1] == null ? nil : $a[1])), (self.dir = ($a[2] == null ? nil : $a[2])), (self.path = ($a[3] == null ? nil : $a[3])), (self.lineno = ($a[4] == null ? nil : $a[4])), (self.maxdepth = ($a[5] == null ? nil : $a[5])), (self.process_lines = ($a[6] == null ? nil : $a[6])), $b; - self.look_ahead = 0; - return nil; - } else { - return nil - } - }, $PreprocessorReader_pop_include$79.$$arity = 0); - - Opal.def(self, '$split_delimited_value', $PreprocessorReader_split_delimited_value$80 = function $$split_delimited_value(val) { - var self = this; - - if ($truthy(val['$include?'](","))) { - - return val.$split(","); - } else { - - return val.$split(";"); - } - }, $PreprocessorReader_split_delimited_value$80.$$arity = 1); - - Opal.def(self, '$skip_front_matter!', $PreprocessorReader_skip_front_matter$excl$81 = function(data, increment_linenos) { - var $a, $b, self = this, front_matter = nil, original_data = nil; - - - - if (increment_linenos == null) { - increment_linenos = true; - }; - front_matter = nil; - if (data['$[]'](0)['$==']("---")) { - - original_data = data.$drop(0); - data.$shift(); - front_matter = []; - if ($truthy(increment_linenos)) { - self.lineno = $rb_plus(self.lineno, 1)}; - while ($truthy(($truthy($b = data['$empty?']()['$!']()) ? data['$[]'](0)['$!=']("---") : $b))) { - - front_matter['$<<'](data.$shift()); - if ($truthy(increment_linenos)) { - self.lineno = $rb_plus(self.lineno, 1)}; - }; - if ($truthy(data['$empty?']())) { - - $send(data, 'unshift', Opal.to_a(original_data)); - if ($truthy(increment_linenos)) { - self.lineno = 0}; - front_matter = nil; - } else { - - data.$shift(); - if ($truthy(increment_linenos)) { - self.lineno = $rb_plus(self.lineno, 1)}; - };}; - return front_matter; - }, $PreprocessorReader_skip_front_matter$excl$81.$$arity = -2); - return (Opal.def(self, '$resolve_expr_val', $PreprocessorReader_resolve_expr_val$82 = function $$resolve_expr_val(val) { - var $a, $b, self = this, quoted = nil; - - - if ($truthy(($truthy($a = ($truthy($b = val['$start_with?']("\"")) ? val['$end_with?']("\"") : $b)) ? $a : ($truthy($b = val['$start_with?']("'")) ? val['$end_with?']("'") : $b)))) { - - quoted = true; - val = val.$slice(1, $rb_minus(val.$length(), 1)); - } else { - quoted = false - }; - if ($truthy(val['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - val = self.document.$sub_attributes(val, $hash2(["attribute_missing"], {"attribute_missing": "drop"}))}; - if ($truthy(quoted)) { - return val - } else if ($truthy(val['$empty?']())) { - return nil - } else if (val['$==']("true")) { - return true - } else if (val['$==']("false")) { - return false - } else if ($truthy(val.$rstrip()['$empty?']())) { - return " " - } else if ($truthy(val['$include?']("."))) { - return val.$to_f() - } else { - return val.$to_i() - }; - }, $PreprocessorReader_resolve_expr_val$82.$$arity = 1), nil) && 'resolve_expr_val'; - })($nesting[0], $$($nesting, 'Reader'), $nesting); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/section"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy; - - Opal.add_stubs(['$attr_accessor', '$attr_reader', '$===', '$+', '$level', '$special', '$generate_id', '$title', '$==', '$>', '$sectnum', '$reftext', '$!', '$empty?', '$sub_placeholder', '$sub_quotes', '$compat_mode', '$[]', '$attributes', '$context', '$assign_numeral', '$class', '$object_id', '$inspect', '$size', '$length', '$chr', '$[]=', '$-', '$gsub', '$downcase', '$delete', '$tr_s', '$end_with?', '$chop', '$start_with?', '$slice', '$key?', '$catalog', '$unique_id_start_index']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Section'); - - var $nesting = [self].concat($parent_nesting), $Section_initialize$1, $Section_generate_id$2, $Section_sectnum$3, $Section_xreftext$4, $Section_$lt$lt$5, $Section_to_s$6, $Section_generate_id$7; - - self.$$prototype.document = self.$$prototype.level = self.$$prototype.parent = self.$$prototype.numeral = self.$$prototype.numbered = self.$$prototype.sectname = self.$$prototype.title = self.$$prototype.blocks = nil; - - self.$attr_accessor("index"); - self.$attr_accessor("sectname"); - self.$attr_accessor("special"); - self.$attr_accessor("numbered"); - self.$attr_reader("caption"); - - Opal.def(self, '$initialize', $Section_initialize$1 = function $$initialize(parent, level, numbered, opts) { - var $a, $b, $iter = $Section_initialize$1.$$p, $yield = $iter || nil, self = this; - - if ($iter) $Section_initialize$1.$$p = null; - - - if (parent == null) { - parent = nil; - }; - - if (level == null) { - level = nil; - }; - - if (numbered == null) { - numbered = false; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $Section_initialize$1, false), [parent, "section", opts], null); - if ($truthy($$($nesting, 'Section')['$==='](parent))) { - $a = [($truthy($b = level) ? $b : $rb_plus(parent.$level(), 1)), parent.$special()], (self.level = $a[0]), (self.special = $a[1]), $a - } else { - $a = [($truthy($b = level) ? $b : 1), false], (self.level = $a[0]), (self.special = $a[1]), $a - }; - self.numbered = numbered; - return (self.index = 0); - }, $Section_initialize$1.$$arity = -1); - Opal.alias(self, "name", "title"); - - Opal.def(self, '$generate_id', $Section_generate_id$2 = function $$generate_id() { - var self = this; - - return $$($nesting, 'Section').$generate_id(self.$title(), self.document) - }, $Section_generate_id$2.$$arity = 0); - - Opal.def(self, '$sectnum', $Section_sectnum$3 = function $$sectnum(delimiter, append) { - var $a, self = this; - - - - if (delimiter == null) { - delimiter = "."; - }; - - if (append == null) { - append = nil; - }; - append = ($truthy($a = append) ? $a : (function() {if (append['$=='](false)) { - return "" - } else { - return delimiter - }; return nil; })()); - if ($truthy(($truthy($a = $rb_gt(self.level, 1)) ? $$($nesting, 'Section')['$==='](self.parent) : $a))) { - return "" + (self.parent.$sectnum(delimiter, delimiter)) + (self.numeral) + (append) - } else { - return "" + (self.numeral) + (append) - }; - }, $Section_sectnum$3.$$arity = -1); - - Opal.def(self, '$xreftext', $Section_xreftext$4 = function $$xreftext(xrefstyle) { - var $a, self = this, val = nil, $case = nil, type = nil, quoted_title = nil, signifier = nil; - - - - if (xrefstyle == null) { - xrefstyle = nil; - }; - if ($truthy(($truthy($a = (val = self.$reftext())) ? val['$empty?']()['$!']() : $a))) { - return val - } else if ($truthy(xrefstyle)) { - if ($truthy(self.numbered)) { - return (function() {$case = xrefstyle; - if ("full"['$===']($case)) { - if ($truthy(($truthy($a = (type = self.sectname)['$==']("chapter")) ? $a : type['$==']("appendix")))) { - quoted_title = self.$sub_placeholder(self.$sub_quotes("_%s_"), self.$title()) - } else { - quoted_title = self.$sub_placeholder(self.$sub_quotes((function() {if ($truthy(self.document.$compat_mode())) { - return "``%s''" - } else { - return "\"`%s`\"" - }; return nil; })()), self.$title()) - }; - if ($truthy((signifier = self.document.$attributes()['$[]']("" + (type) + "-refsig")))) { - return "" + (signifier) + " " + (self.$sectnum(".", ",")) + " " + (quoted_title) - } else { - return "" + (self.$sectnum(".", ",")) + " " + (quoted_title) - };} - else if ("short"['$===']($case)) {if ($truthy((signifier = self.document.$attributes()['$[]']("" + (self.sectname) + "-refsig")))) { - return "" + (signifier) + " " + (self.$sectnum(".", "")) - } else { - return self.$sectnum(".", "") - }} - else {if ($truthy(($truthy($a = (type = self.sectname)['$==']("chapter")) ? $a : type['$==']("appendix")))) { - - return self.$sub_placeholder(self.$sub_quotes("_%s_"), self.$title()); - } else { - return self.$title() - }}})() - } else if ($truthy(($truthy($a = (type = self.sectname)['$==']("chapter")) ? $a : type['$==']("appendix")))) { - - return self.$sub_placeholder(self.$sub_quotes("_%s_"), self.$title()); - } else { - return self.$title() - } - } else { - return self.$title() - }; - }, $Section_xreftext$4.$$arity = -1); - - Opal.def(self, '$<<', $Section_$lt$lt$5 = function(block) { - var $iter = $Section_$lt$lt$5.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Section_$lt$lt$5.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - if (block.$context()['$==']("section")) { - self.$assign_numeral(block)}; - return $send(self, Opal.find_super_dispatcher(self, '<<', $Section_$lt$lt$5, false), $zuper, $iter); - }, $Section_$lt$lt$5.$$arity = 1); - - Opal.def(self, '$to_s', $Section_to_s$6 = function $$to_s() { - var $iter = $Section_to_s$6.$$p, $yield = $iter || nil, self = this, formal_title = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Section_to_s$6.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if ($truthy(self.title)) { - - formal_title = (function() {if ($truthy(self.numbered)) { - return "" + (self.$sectnum()) + " " + (self.title) - } else { - return self.title - }; return nil; })(); - return "" + "#<" + (self.$class()) + "@" + (self.$object_id()) + " {level: " + (self.level) + ", title: " + (formal_title.$inspect()) + ", blocks: " + (self.blocks.$size()) + "}>"; - } else { - return $send(self, Opal.find_super_dispatcher(self, 'to_s', $Section_to_s$6, false), $zuper, $iter) - } - }, $Section_to_s$6.$$arity = 0); - return (Opal.defs(self, '$generate_id', $Section_generate_id$7 = function $$generate_id(title, document) { - var $a, $b, self = this, attrs = nil, pre = nil, sep = nil, no_sep = nil, $writer = nil, sep_sub = nil, gen_id = nil, ids = nil, cnt = nil, candidate_id = nil; - - - attrs = document.$attributes(); - pre = ($truthy($a = attrs['$[]']("idprefix")) ? $a : "_"); - if ($truthy((sep = attrs['$[]']("idseparator")))) { - if ($truthy(($truthy($a = sep.$length()['$=='](1)) ? $a : ($truthy($b = (no_sep = sep['$empty?']())['$!']()) ? (sep = (($writer = ["idseparator", sep.$chr()]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) : $b)))) { - sep_sub = (function() {if ($truthy(($truthy($a = sep['$==']("-")) ? $a : sep['$=='](".")))) { - return " .-" - } else { - return "" + " " + (sep) + ".-" - }; return nil; })()} - } else { - $a = ["_", " _.-"], (sep = $a[0]), (sep_sub = $a[1]), $a - }; - gen_id = "" + (pre) + (title.$downcase().$gsub($$($nesting, 'InvalidSectionIdCharsRx'), "")); - if ($truthy(no_sep)) { - gen_id = gen_id.$delete(" ") - } else { - - gen_id = gen_id.$tr_s(sep_sub, sep); - if ($truthy(gen_id['$end_with?'](sep))) { - gen_id = gen_id.$chop()}; - if ($truthy(($truthy($a = pre['$empty?']()) ? gen_id['$start_with?'](sep) : $a))) { - gen_id = gen_id.$slice(1, gen_id.$length())}; - }; - if ($truthy(document.$catalog()['$[]']("refs")['$key?'](gen_id))) { - - ids = document.$catalog()['$[]']("refs"); - cnt = $$($nesting, 'Compliance').$unique_id_start_index(); - while ($truthy(ids['$[]']((candidate_id = "" + (gen_id) + (sep) + (cnt))))) { - cnt = $rb_plus(cnt, 1) - }; - return candidate_id; - } else { - return gen_id - }; - }, $Section_generate_id$7.$$arity = 2), nil) && 'generate_id'; - })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/stylesheets"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy, $hash2 = Opal.hash2; - - Opal.add_stubs(['$join', '$new', '$rstrip', '$read', '$primary_stylesheet_data', '$write', '$primary_stylesheet_name', '$stylesheet_basename', '$for', '$read_stylesheet', '$coderay_stylesheet_data', '$coderay_stylesheet_name', '$pygments_stylesheet_data', '$pygments_stylesheet_name']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Stylesheets'); - - var $nesting = [self].concat($parent_nesting), $Stylesheets_instance$1, $Stylesheets_primary_stylesheet_name$2, $Stylesheets_primary_stylesheet_data$3, $Stylesheets_embed_primary_stylesheet$4, $Stylesheets_write_primary_stylesheet$5, $Stylesheets_coderay_stylesheet_name$6, $Stylesheets_coderay_stylesheet_data$7, $Stylesheets_embed_coderay_stylesheet$8, $Stylesheets_write_coderay_stylesheet$9, $Stylesheets_pygments_stylesheet_name$10, $Stylesheets_pygments_stylesheet_data$11, $Stylesheets_embed_pygments_stylesheet$12, $Stylesheets_write_pygments_stylesheet$13; - - self.$$prototype.primary_stylesheet_data = nil; - - Opal.const_set($nesting[0], 'DEFAULT_STYLESHEET_NAME', "asciidoctor.css"); - Opal.const_set($nesting[0], 'STYLESHEETS_DIR', $$$('::', 'File').$join($$($nesting, 'DATA_DIR'), "stylesheets")); - self.__instance__ = self.$new(); - Opal.defs(self, '$instance', $Stylesheets_instance$1 = function $$instance() { - var self = this; - if (self.__instance__ == null) self.__instance__ = nil; - - return self.__instance__ - }, $Stylesheets_instance$1.$$arity = 0); - - Opal.def(self, '$primary_stylesheet_name', $Stylesheets_primary_stylesheet_name$2 = function $$primary_stylesheet_name() { - var self = this; - - return $$($nesting, 'DEFAULT_STYLESHEET_NAME') - }, $Stylesheets_primary_stylesheet_name$2.$$arity = 0); - - Opal.def(self, '$primary_stylesheet_data', $Stylesheets_primary_stylesheet_data$3 = function $$primary_stylesheet_data() { - var $a, self = this; - - return (self.primary_stylesheet_data = ($truthy($a = self.primary_stylesheet_data) ? $a : $$$('::', 'File').$read($$$('::', 'File').$join($$($nesting, 'STYLESHEETS_DIR'), "asciidoctor-default.css"), $hash2(["mode"], {"mode": $$($nesting, 'FILE_READ_MODE')})).$rstrip())) - }, $Stylesheets_primary_stylesheet_data$3.$$arity = 0); - - Opal.def(self, '$embed_primary_stylesheet', $Stylesheets_embed_primary_stylesheet$4 = function $$embed_primary_stylesheet() { - var self = this; - - return "" + "" - }, $Stylesheets_embed_primary_stylesheet$4.$$arity = 0); - - Opal.def(self, '$write_primary_stylesheet', $Stylesheets_write_primary_stylesheet$5 = function $$write_primary_stylesheet(target_dir) { - var self = this; - - - - if (target_dir == null) { - target_dir = "."; - }; - return $$$('::', 'File').$write($$$('::', 'File').$join(target_dir, self.$primary_stylesheet_name()), self.$primary_stylesheet_data(), $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')})); - }, $Stylesheets_write_primary_stylesheet$5.$$arity = -1); - - Opal.def(self, '$coderay_stylesheet_name', $Stylesheets_coderay_stylesheet_name$6 = function $$coderay_stylesheet_name() { - var self = this; - - return $$($nesting, 'SyntaxHighlighter').$for("coderay").$stylesheet_basename() - }, $Stylesheets_coderay_stylesheet_name$6.$$arity = 0); - - Opal.def(self, '$coderay_stylesheet_data', $Stylesheets_coderay_stylesheet_data$7 = function $$coderay_stylesheet_data() { - var self = this; - - return $$($nesting, 'SyntaxHighlighter').$for("coderay").$read_stylesheet() - }, $Stylesheets_coderay_stylesheet_data$7.$$arity = 0); - - Opal.def(self, '$embed_coderay_stylesheet', $Stylesheets_embed_coderay_stylesheet$8 = function $$embed_coderay_stylesheet() { - var self = this; - - return "" + "" - }, $Stylesheets_embed_coderay_stylesheet$8.$$arity = 0); - - Opal.def(self, '$write_coderay_stylesheet', $Stylesheets_write_coderay_stylesheet$9 = function $$write_coderay_stylesheet(target_dir) { - var self = this; - - - - if (target_dir == null) { - target_dir = "."; - }; - return $$$('::', 'File').$write($$$('::', 'File').$join(target_dir, self.$coderay_stylesheet_name()), self.$coderay_stylesheet_data(), $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')})); - }, $Stylesheets_write_coderay_stylesheet$9.$$arity = -1); - - Opal.def(self, '$pygments_stylesheet_name', $Stylesheets_pygments_stylesheet_name$10 = function $$pygments_stylesheet_name(style) { - var self = this; - - - - if (style == null) { - style = nil; - }; - return $$($nesting, 'SyntaxHighlighter').$for("pygments").$stylesheet_basename(style); - }, $Stylesheets_pygments_stylesheet_name$10.$$arity = -1); - - Opal.def(self, '$pygments_stylesheet_data', $Stylesheets_pygments_stylesheet_data$11 = function $$pygments_stylesheet_data(style) { - var self = this; - - - - if (style == null) { - style = nil; - }; - return $$($nesting, 'SyntaxHighlighter').$for("pygments").$read_stylesheet(style); - }, $Stylesheets_pygments_stylesheet_data$11.$$arity = -1); - - Opal.def(self, '$embed_pygments_stylesheet', $Stylesheets_embed_pygments_stylesheet$12 = function $$embed_pygments_stylesheet(style) { - var self = this; - - - - if (style == null) { - style = nil; - }; - return "" + ""; - }, $Stylesheets_embed_pygments_stylesheet$12.$$arity = -1); - return (Opal.def(self, '$write_pygments_stylesheet', $Stylesheets_write_pygments_stylesheet$13 = function $$write_pygments_stylesheet(target_dir, style) { - var self = this; - - - - if (target_dir == null) { - target_dir = "."; - }; - - if (style == null) { - style = nil; - }; - return $$$('::', 'File').$write($$$('::', 'File').$join(target_dir, self.$pygments_stylesheet_name(style)), self.$pygments_stylesheet_data(style), $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')})); - }, $Stylesheets_write_pygments_stylesheet$13.$$arity = -1), nil) && 'write_pygments_stylesheet'; - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/table"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - function $rb_divide(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs / rhs : lhs['$/'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy, $gvars = Opal.gvars; - - Opal.add_stubs(['$attr_accessor', '$attr_reader', '$new', '$[]', '$>', '$to_i', '$<', '$==', '$[]=', '$-', '$attributes', '$truncate', '$*', '$/', '$to_f', '$empty?', '$body', '$each', '$<<', '$size', '$+', '$assign_column_widths', '$warn', '$logger', '$update_attributes', '$assign_width', '$round', '$map', '$shift', '$reinitialize', '$head=', '$nil?', '$unshift', '$pop', '$foot=', '$parent', '$sourcemap', '$dup', '$header_row?', '$table', '$style', '$merge', '$delete', '$start_with?', '$rstrip', '$slice', '$length', '$advance', '$lstrip', '$strip', '$split', '$include?', '$readlines', '$catalog_inline_anchor', '$=~', '$apply_subs', '$convert', '$text', '$!=', '$file', '$lineno', '$to_s', '$include', '$to_set', '$mark', '$key?', '$nested?', '$document', '$error', '$message_with_context', '$cursor_at_prev_line', '$nil_or_empty?', '$escape', '$columns', '$match', '$chop', '$end_with?', '$gsub', '$!', '$push_cellspec', '$cell_open?', '$close_cell', '$take_cellspec', '$squeeze', '$upto', '$times', '$cursor_before_mark', '$rowspan', '$activate_rowspan', '$colspan', '$end_of_row?', '$close_row', '$private', '$rows', '$effective_column_visits']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Table'); - - var $nesting = [self].concat($parent_nesting), $Table_initialize$4, $Table_header_row$ques$5, $Table_create_columns$6, $Table_assign_column_widths$8, $Table_partition_header_footer$12; - - self.$$prototype.attributes = self.$$prototype.document = self.$$prototype.has_header_option = self.$$prototype.rows = self.$$prototype.columns = nil; - - Opal.const_set($nesting[0], 'DEFAULT_PRECISION', 4); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Rows'); - - var $nesting = [self].concat($parent_nesting), $Rows_initialize$1, $Rows_by_section$2, $Rows_to_h$3; - - self.$$prototype.head = self.$$prototype.body = self.$$prototype.foot = nil; - - self.$attr_accessor("head", "foot", "body"); - - Opal.def(self, '$initialize', $Rows_initialize$1 = function $$initialize(head, foot, body) { - var self = this; - - - - if (head == null) { - head = []; - }; - - if (foot == null) { - foot = []; - }; - - if (body == null) { - body = []; - }; - self.head = head; - self.foot = foot; - return (self.body = body); - }, $Rows_initialize$1.$$arity = -1); - Opal.alias(self, "[]", "send"); - - Opal.def(self, '$by_section', $Rows_by_section$2 = function $$by_section() { - var self = this; - - return [["head", self.head], ["body", self.body], ["foot", self.foot]] - }, $Rows_by_section$2.$$arity = 0); - return (Opal.def(self, '$to_h', $Rows_to_h$3 = function $$to_h() { - var self = this; - - return $hash2(["head", "body", "foot"], {"head": self.head, "body": self.body, "foot": self.foot}) - }, $Rows_to_h$3.$$arity = 0), nil) && 'to_h'; - })($nesting[0], null, $nesting); - self.$attr_accessor("columns"); - self.$attr_accessor("rows"); - self.$attr_accessor("has_header_option"); - self.$attr_reader("caption"); - - Opal.def(self, '$initialize', $Table_initialize$4 = function $$initialize(parent, attributes) { - var $a, $b, $iter = $Table_initialize$4.$$p, $yield = $iter || nil, self = this, pcwidth = nil, pcwidth_intval = nil, $writer = nil, abswidth_val = nil; - - if ($iter) $Table_initialize$4.$$p = null; - - $send(self, Opal.find_super_dispatcher(self, 'initialize', $Table_initialize$4, false), [parent, "table"], null); - self.rows = $$($nesting, 'Rows').$new(); - self.columns = []; - self.has_header_option = false; - if ($truthy((pcwidth = attributes['$[]']("width")))) { - if ($truthy(($truthy($a = $rb_gt((pcwidth_intval = pcwidth.$to_i()), 100)) ? $a : $rb_lt(pcwidth_intval, 1)))) { - if ($truthy((($a = pcwidth_intval['$=='](0)) ? ($truthy($b = pcwidth['$==']("0")) ? $b : pcwidth['$==']("0%")) : pcwidth_intval['$=='](0)))) { - } else { - pcwidth_intval = 100 - }} - } else { - pcwidth_intval = 100 - }; - - $writer = ["tablepcwidth", pcwidth_intval]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(self.document.$attributes()['$[]']("pagewidth"))) { - - $writer = ["tableabswidth", (function() {if ((abswidth_val = $rb_times($rb_divide(pcwidth_intval, 100), self.document.$attributes()['$[]']("pagewidth").$to_f()).$truncate($$($nesting, 'DEFAULT_PRECISION')))['$=='](abswidth_val.$to_i())) { - return abswidth_val.$to_i() - } else { - return abswidth_val - }; return nil; })()]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(attributes['$[]']("rotate-option"))) { - - $writer = ["orientation", "landscape"]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - return nil - }; - }, $Table_initialize$4.$$arity = 2); - - Opal.def(self, '$header_row?', $Table_header_row$ques$5 = function() { - var $a, self = this, val = nil; - - if ($truthy(($truthy($a = (val = self.has_header_option)) ? self.rows.$body()['$empty?']() : $a))) { - return val - } else { - return nil - } - }, $Table_header_row$ques$5.$$arity = 0); - - Opal.def(self, '$create_columns', $Table_create_columns$6 = function $$create_columns(colspecs) { - var $$7, $a, self = this, cols = nil, autowidth_cols = nil, width_base = nil, num_cols = nil, $writer = nil; - - - cols = []; - autowidth_cols = nil; - width_base = 0; - $send(colspecs, 'each', [], ($$7 = function(colspec){var self = $$7.$$s || this, $a, colwidth = nil; - - - - if (colspec == null) { - colspec = nil; - }; - colwidth = colspec['$[]']("width"); - cols['$<<']($$($nesting, 'Column').$new(self, cols.$size(), colspec)); - if ($truthy($rb_lt(colwidth, 0))) { - return (autowidth_cols = ($truthy($a = autowidth_cols) ? $a : []))['$<<'](cols['$[]'](-1)) - } else { - return (width_base = $rb_plus(width_base, colwidth)) - };}, $$7.$$s = self, $$7.$$arity = 1, $$7)); - if ($truthy($rb_gt((num_cols = (self.columns = cols).$size()), 0))) { - - - $writer = ["colcount", num_cols]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(($truthy($a = $rb_gt(width_base, 0)) ? $a : autowidth_cols))) { - } else { - width_base = nil - }; - self.$assign_column_widths(width_base, autowidth_cols);}; - return nil; - }, $Table_create_columns$6.$$arity = 1); - - Opal.def(self, '$assign_column_widths', $Table_assign_column_widths$8 = function $$assign_column_widths(width_base, autowidth_cols) { - var $$9, $$10, $$11, self = this, precision = nil, total_width = nil, col_pcwidth = nil, autowidth = nil, autowidth_attrs = nil; - - - - if (width_base == null) { - width_base = nil; - }; - - if (autowidth_cols == null) { - autowidth_cols = nil; - }; - precision = $$($nesting, 'DEFAULT_PRECISION'); - total_width = (col_pcwidth = 0); - if ($truthy(width_base)) { - - if ($truthy(autowidth_cols)) { - - if ($truthy($rb_gt(width_base, 100))) { - - autowidth = 0; - self.$logger().$warn("" + "total column width must not exceed 100% when using autowidth columns; got " + (width_base) + "%"); - } else { - - autowidth = $rb_divide($rb_minus(100, width_base), autowidth_cols.$size()).$truncate(precision); - if (autowidth.$to_i()['$=='](autowidth)) { - autowidth = autowidth.$to_i()}; - width_base = 100; - }; - autowidth_attrs = $hash2(["width", "autowidth-option"], {"width": autowidth, "autowidth-option": ""}); - $send(autowidth_cols, 'each', [], ($$9 = function(col){var self = $$9.$$s || this; - - - - if (col == null) { - col = nil; - }; - return col.$update_attributes(autowidth_attrs);}, $$9.$$s = self, $$9.$$arity = 1, $$9));}; - $send(self.columns, 'each', [], ($$10 = function(col){var self = $$10.$$s || this; - - - - if (col == null) { - col = nil; - }; - return (total_width = $rb_plus(total_width, (col_pcwidth = col.$assign_width(nil, width_base, precision))));}, $$10.$$s = self, $$10.$$arity = 1, $$10)); - } else { - - col_pcwidth = $rb_divide(100, self.columns.$size()).$truncate(precision); - if (col_pcwidth.$to_i()['$=='](col_pcwidth)) { - col_pcwidth = col_pcwidth.$to_i()}; - $send(self.columns, 'each', [], ($$11 = function(col){var self = $$11.$$s || this; - - - - if (col == null) { - col = nil; - }; - return (total_width = $rb_plus(total_width, col.$assign_width(col_pcwidth, nil, precision)));}, $$11.$$s = self, $$11.$$arity = 1, $$11)); - }; - if (total_width['$=='](100)) { - } else { - self.columns['$[]'](-1).$assign_width($rb_plus($rb_minus(100, total_width), col_pcwidth).$round(precision), nil, precision) - }; - return nil; - }, $Table_assign_column_widths$8.$$arity = -1); - return (Opal.def(self, '$partition_header_footer', $Table_partition_header_footer$12 = function $$partition_header_footer(attrs) { - var $$13, $$14, $a, self = this, num_body_rows = nil, $writer = nil, body = nil; - - - num_body_rows = (($writer = ["rowcount", (body = self.rows.$body()).$size()]), $send(self.attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]); - if ($truthy($rb_gt(num_body_rows, 0))) { - if ($truthy(self.has_header_option)) { - - - $writer = [[$send(body.$shift(), 'map', [], ($$13 = function(cell){var self = $$13.$$s || this; - - - - if (cell == null) { - cell = nil; - }; - return cell.$reinitialize(true);}, $$13.$$s = self, $$13.$$arity = 1, $$13))]]; - $send(self.rows, 'head=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - num_body_rows = $rb_minus(num_body_rows, 1); - } else if ($truthy(self.has_header_option['$nil?']())) { - - self.has_header_option = false; - body.$unshift($send(body.$shift(), 'map', [], ($$14 = function(cell){var self = $$14.$$s || this; - - - - if (cell == null) { - cell = nil; - }; - return cell.$reinitialize(false);}, $$14.$$s = self, $$14.$$arity = 1, $$14)));}}; - if ($truthy(($truthy($a = $rb_gt(num_body_rows, 0)) ? attrs['$[]']("footer-option") : $a))) { - - $writer = [[body.$pop()]]; - $send(self.rows, 'foot=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return nil; - }, $Table_partition_header_footer$12.$$arity = 1), nil) && 'partition_header_footer'; - })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Column'); - - var $nesting = [self].concat($parent_nesting), $Column_initialize$15, $Column_assign_width$16, $Column_block$ques$17, $Column_inline$ques$18; - - self.$$prototype.attributes = nil; - - self.$attr_accessor("style"); - - Opal.def(self, '$initialize', $Column_initialize$15 = function $$initialize(table, index, attributes) { - var $a, $iter = $Column_initialize$15.$$p, $yield = $iter || nil, self = this, $writer = nil; - - if ($iter) $Column_initialize$15.$$p = null; - - - if (attributes == null) { - attributes = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $Column_initialize$15, false), [table, "table_column"], null); - self.style = attributes['$[]']("style"); - - $writer = ["colnumber", $rb_plus(index, 1)]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - ($truthy($a = attributes['$[]']("width")) ? $a : (($writer = ["width", 1]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - ($truthy($a = attributes['$[]']("halign")) ? $a : (($writer = ["halign", "left"]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - ($truthy($a = attributes['$[]']("valign")) ? $a : (($writer = ["valign", "top"]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - return self.$update_attributes(attributes); - }, $Column_initialize$15.$$arity = -3); - Opal.alias(self, "table", "parent"); - - Opal.def(self, '$assign_width', $Column_assign_width$16 = function $$assign_width(col_pcwidth, width_base, precision) { - var self = this, $writer = nil, col_abswidth = nil; - - - if ($truthy(width_base)) { - - col_pcwidth = $rb_divide($rb_times(self.attributes['$[]']("width").$to_f(), 100), width_base).$truncate(precision); - if (col_pcwidth.$to_i()['$=='](col_pcwidth)) { - col_pcwidth = col_pcwidth.$to_i()};}; - if ($truthy(self.$parent().$attributes()['$[]']("tableabswidth"))) { - - $writer = ["colabswidth", (function() {if ((col_abswidth = $rb_times($rb_divide(col_pcwidth, 100), self.$parent().$attributes()['$[]']("tableabswidth")).$truncate(precision))['$=='](col_abswidth.$to_i())) { - return col_abswidth.$to_i() - } else { - return col_abswidth - }; return nil; })()]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - - $writer = ["colpcwidth", col_pcwidth]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - }, $Column_assign_width$16.$$arity = 3); - - Opal.def(self, '$block?', $Column_block$ques$17 = function() { - var self = this; - - return false - }, $Column_block$ques$17.$$arity = 0); - return (Opal.def(self, '$inline?', $Column_inline$ques$18 = function() { - var self = this; - - return false - }, $Column_inline$ques$18.$$arity = 0), nil) && 'inline?'; - })($$($nesting, 'Table'), $$($nesting, 'AbstractNode'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Cell'); - - var $nesting = [self].concat($parent_nesting), $Cell_initialize$19, $Cell_reinitialize$20, $Cell_catalog_inline_anchor$21, $Cell_text$22, $Cell_text$eq$23, $Cell_content$24, $Cell_lines$26, $Cell_source$27, $Cell_file$28, $Cell_lineno$29, $Cell_to_s$30; - - self.$$prototype.document = self.$$prototype.reinitialize_args = self.$$prototype.attributes = self.$$prototype.cursor = self.$$prototype.text = self.$$prototype.subs = self.$$prototype.style = self.$$prototype.inner_document = self.$$prototype.source_location = self.$$prototype.colspan = self.$$prototype.rowspan = nil; - - Opal.const_set($nesting[0], 'DOUBLE_LF', $rb_times($$($nesting, 'LF'), 2)); - self.$attr_accessor("colspan"); - self.$attr_accessor("rowspan"); - Opal.alias(self, "column", "parent"); - self.$attr_reader("inner_document"); - - Opal.def(self, '$initialize', $Cell_initialize$19 = function $$initialize(column, cell_text, attributes, opts) { - var $a, $b, $c, $iter = $Cell_initialize$19.$$p, $yield = $iter || nil, self = this, in_header_row = nil, cell_style = nil, asciidoc = nil, inner_document_cursor = nil, lines_advanced = nil, literal = nil, normal_psv = nil, parent_doctitle = nil, inner_document_lines = nil, unprocessed_line1 = nil, preprocessed_lines = nil, $writer = nil; - - if ($iter) $Cell_initialize$19.$$p = null; - - - if (attributes == null) { - attributes = $hash2([], {}); - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $Cell_initialize$19, false), [column, "table_cell"], null); - self.cursor = (self.reinitialize_args = nil); - if ($truthy(self.document.$sourcemap())) { - self.source_location = opts['$[]']("cursor").$dup()}; - if ($truthy(column)) { - - if ($truthy((in_header_row = column.$table()['$header_row?']()))) { - if ($truthy((($a = in_header_row['$==']("implicit")) ? (cell_style = ($truthy($b = column.$style()) ? $b : ($truthy($c = attributes) ? attributes['$[]']("style") : $c))) : in_header_row['$==']("implicit")))) { - - if ($truthy(($truthy($a = cell_style['$==']("asciidoc")) ? $a : cell_style['$==']("literal")))) { - self.reinitialize_args = [column, cell_text, ($truthy($a = attributes) ? attributes.$merge() : $a), opts]}; - cell_style = nil;} - } else { - cell_style = column.$style() - }; - self.$update_attributes(column.$attributes());}; - if ($truthy(attributes)) { - - if ($truthy(attributes['$empty?']())) { - self.colspan = (self.rowspan = nil) - } else { - - $a = [attributes.$delete("colspan"), attributes.$delete("rowspan")], (self.colspan = $a[0]), (self.rowspan = $a[1]), $a; - if ($truthy(in_header_row)) { - } else { - cell_style = ($truthy($a = attributes['$[]']("style")) ? $a : cell_style) - }; - self.$update_attributes(attributes); - }; - if (cell_style['$==']("asciidoc")) { - - asciidoc = true; - inner_document_cursor = opts['$[]']("cursor"); - if ($truthy((cell_text = cell_text.$rstrip())['$start_with?']($$($nesting, 'LF')))) { - - lines_advanced = 1; - while ($truthy((cell_text = cell_text.$slice(1, cell_text.$length()))['$start_with?']($$($nesting, 'LF')))) { - lines_advanced = $rb_plus(lines_advanced, 1) - }; - inner_document_cursor.$advance(lines_advanced); - } else { - cell_text = cell_text.$lstrip() - }; - } else if (cell_style['$==']("literal")) { - - literal = true; - cell_text = cell_text.$rstrip(); - while ($truthy(cell_text['$start_with?']($$($nesting, 'LF')))) { - cell_text = cell_text.$slice(1, cell_text.$length()) - }; - } else { - - normal_psv = true; - cell_text = (function() {if ($truthy(cell_text)) { - return cell_text.$strip() - } else { - return "" - }; return nil; })(); - }; - } else { - - self.colspan = (self.rowspan = nil); - if (cell_style['$==']("asciidoc")) { - - asciidoc = true; - inner_document_cursor = opts['$[]']("cursor");}; - }; - if ($truthy(asciidoc)) { - - parent_doctitle = self.document.$attributes().$delete("doctitle"); - inner_document_lines = cell_text.$split($$($nesting, 'LF'), -1); - if ($truthy(inner_document_lines['$empty?']())) { - } else if ($truthy((unprocessed_line1 = inner_document_lines['$[]'](0))['$include?']("::"))) { - - preprocessed_lines = $$($nesting, 'PreprocessorReader').$new(self.document, [unprocessed_line1]).$readlines(); - if ($truthy((($a = unprocessed_line1['$=='](preprocessed_lines['$[]'](0))) ? $rb_lt(preprocessed_lines.$size(), 2) : unprocessed_line1['$=='](preprocessed_lines['$[]'](0))))) { - } else { - - inner_document_lines.$shift(); - if ($truthy(preprocessed_lines['$empty?']())) { - } else { - $send(inner_document_lines, 'unshift', Opal.to_a(preprocessed_lines)) - }; - };}; - self.inner_document = $$($nesting, 'Document').$new(inner_document_lines, $hash2(["standalone", "parent", "cursor"], {"standalone": false, "parent": self.document, "cursor": inner_document_cursor})); - if ($truthy(parent_doctitle['$nil?']())) { - } else { - - $writer = ["doctitle", parent_doctitle]; - $send(self.document.$attributes(), '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - self.subs = nil; - } else if ($truthy(literal)) { - - self.content_model = "verbatim"; - self.subs = $$($nesting, 'BASIC_SUBS'); - } else { - - if ($truthy(normal_psv)) { - if ($truthy(in_header_row)) { - self.cursor = opts['$[]']("cursor") - } else { - self.$catalog_inline_anchor(cell_text, opts['$[]']("cursor")) - }}; - self.content_model = "simple"; - self.subs = $$($nesting, 'NORMAL_SUBS'); - }; - self.text = cell_text; - return (self.style = cell_style); - }, $Cell_initialize$19.$$arity = -3); - - Opal.def(self, '$reinitialize', $Cell_reinitialize$20 = function $$reinitialize(has_header) { - var self = this; - - - if ($truthy(has_header)) { - self.reinitialize_args = nil - } else if ($truthy(self.reinitialize_args)) { - return $send($$$($$($nesting, 'Table'), 'Cell'), 'new', Opal.to_a(self.reinitialize_args)) - } else { - self.style = self.attributes['$[]']("style") - }; - if ($truthy(self.cursor)) { - self.$catalog_inline_anchor()}; - return self; - }, $Cell_reinitialize$20.$$arity = 1); - - Opal.def(self, '$catalog_inline_anchor', $Cell_catalog_inline_anchor$21 = function $$catalog_inline_anchor(cell_text, cursor) { - var $a, self = this; - - - - if (cell_text == null) { - cell_text = self.text; - }; - - if (cursor == null) { - cursor = nil; - }; - if ($truthy(cursor)) { - } else { - $a = [self.cursor, nil], (cursor = $a[0]), (self.cursor = $a[1]), $a - }; - if ($truthy(($truthy($a = cell_text['$start_with?']("[[")) ? $$($nesting, 'LeadingInlineAnchorRx')['$=~'](cell_text) : $a))) { - return $$($nesting, 'Parser').$catalog_inline_anchor((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), self, cursor, self.document) - } else { - return nil - }; - }, $Cell_catalog_inline_anchor$21.$$arity = -1); - - Opal.def(self, '$text', $Cell_text$22 = function $$text() { - var self = this; - - return self.$apply_subs(self.text, self.subs) - }, $Cell_text$22.$$arity = 0); - - Opal.def(self, '$text=', $Cell_text$eq$23 = function(val) { - var self = this; - - return (self.text = val) - }, $Cell_text$eq$23.$$arity = 1); - - Opal.def(self, '$content', $Cell_content$24 = function $$content() { - var $$25, $a, self = this, cell_style = nil, subbed_text = nil; - - if ((cell_style = self.style)['$==']("asciidoc")) { - return self.inner_document.$convert() - } else if ($truthy(self.text['$include?']($$($nesting, 'DOUBLE_LF')))) { - return $send(self.$text().$split($$($nesting, 'BlankLineRx')), 'map', [], ($$25 = function(para){var self = $$25.$$s || this, $a; - - - - if (para == null) { - para = nil; - }; - if ($truthy(($truthy($a = cell_style) ? cell_style['$!=']("header") : $a))) { - return $$($nesting, 'Inline').$new(self.$parent(), "quoted", para, $hash2(["type"], {"type": cell_style})).$convert() - } else { - return para - };}, $$25.$$s = self, $$25.$$arity = 1, $$25)) - } else if ($truthy((subbed_text = self.$text())['$empty?']())) { - return [] - } else if ($truthy(($truthy($a = cell_style) ? cell_style['$!=']("header") : $a))) { - return [$$($nesting, 'Inline').$new(self.$parent(), "quoted", subbed_text, $hash2(["type"], {"type": cell_style})).$convert()] - } else { - return [subbed_text] - } - }, $Cell_content$24.$$arity = 0); - - Opal.def(self, '$lines', $Cell_lines$26 = function $$lines() { - var self = this; - - return self.text.$split($$($nesting, 'LF')) - }, $Cell_lines$26.$$arity = 0); - - Opal.def(self, '$source', $Cell_source$27 = function $$source() { - var self = this; - - return self.text - }, $Cell_source$27.$$arity = 0); - - Opal.def(self, '$file', $Cell_file$28 = function $$file() { - var $a, self = this; - - return ($truthy($a = self.source_location) ? self.source_location.$file() : $a) - }, $Cell_file$28.$$arity = 0); - - Opal.def(self, '$lineno', $Cell_lineno$29 = function $$lineno() { - var $a, self = this; - - return ($truthy($a = self.source_location) ? self.source_location.$lineno() : $a) - }, $Cell_lineno$29.$$arity = 0); - return (Opal.def(self, '$to_s', $Cell_to_s$30 = function $$to_s() { - var $a, $iter = $Cell_to_s$30.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Cell_to_s$30.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - return "" + ($send(self, Opal.find_super_dispatcher(self, 'to_s', $Cell_to_s$30, false), $zuper, $iter).$to_s()) + " - [text: " + (self.text) + ", colspan: " + (($truthy($a = self.colspan) ? $a : 1)) + ", rowspan: " + (($truthy($a = self.rowspan) ? $a : 1)) + ", attributes: " + (self.attributes) + "]" - }, $Cell_to_s$30.$$arity = 0), nil) && 'to_s'; - })($$($nesting, 'Table'), $$($nesting, 'AbstractBlock'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'ParserContext'); - - var $nesting = [self].concat($parent_nesting), $ParserContext_initialize$31, $ParserContext_starts_with_delimiter$ques$32, $ParserContext_match_delimiter$33, $ParserContext_skip_past_delimiter$34, $ParserContext_skip_past_escaped_delimiter$35, $ParserContext_buffer_has_unclosed_quotes$ques$36, $ParserContext_take_cellspec$37, $ParserContext_push_cellspec$38, $ParserContext_keep_cell_open$39, $ParserContext_mark_cell_closed$40, $ParserContext_cell_open$ques$41, $ParserContext_cell_closed$ques$42, $ParserContext_close_open_cell$43, $ParserContext_close_cell$44, $ParserContext_close_row$47, $ParserContext_activate_rowspan$48, $ParserContext_end_of_row$ques$50, $ParserContext_effective_column_visits$51, $ParserContext_advance$52; - - self.$$prototype.delimiter = self.$$prototype.delimiter_rx = self.$$prototype.buffer = self.$$prototype.cellspecs = self.$$prototype.cell_open = self.$$prototype.format = self.$$prototype.start_cursor_data = self.$$prototype.reader = self.$$prototype.table = self.$$prototype.current_row = self.$$prototype.colcount = self.$$prototype.column_visits = self.$$prototype.active_rowspans = self.$$prototype.linenum = nil; - - self.$include($$($nesting, 'Logging')); - Opal.const_set($nesting[0], 'FORMATS', ["psv", "csv", "dsv", "tsv"].$to_set()); - Opal.const_set($nesting[0], 'DELIMITERS', $hash2(["psv", "csv", "dsv", "tsv", "!sv"], {"psv": ["|", /\|/], "csv": [",", /,/], "dsv": [":", /:/], "tsv": ["\t", /\t/], "!sv": ["!", /!/]})); - self.$attr_accessor("table"); - self.$attr_accessor("format"); - self.$attr_reader("colcount"); - self.$attr_accessor("buffer"); - self.$attr_reader("delimiter"); - self.$attr_reader("delimiter_re"); - - Opal.def(self, '$initialize', $ParserContext_initialize$31 = function $$initialize(reader, table, attributes) { - var $a, $b, self = this, xsv = nil, sep = nil; - - - - if (attributes == null) { - attributes = $hash2([], {}); - }; - self.start_cursor_data = (self.reader = reader).$mark(); - self.table = table; - if ($truthy(attributes['$key?']("format"))) { - if ($truthy($$($nesting, 'FORMATS')['$include?']((xsv = attributes['$[]']("format"))))) { - if (xsv['$==']("tsv")) { - self.format = "csv" - } else if ($truthy((($a = (self.format = xsv)['$==']("psv")) ? table.$document()['$nested?']() : (self.format = xsv)['$==']("psv")))) { - xsv = "!sv"} - } else { - - self.$logger().$error(self.$message_with_context("" + "illegal table format: " + (xsv), $hash2(["source_location"], {"source_location": reader.$cursor_at_prev_line()}))); - $a = ["psv", (function() {if ($truthy(table.$document()['$nested?']())) { - return "!sv" - } else { - return "psv" - }; return nil; })()], (self.format = $a[0]), (xsv = $a[1]), $a; - } - } else { - $a = ["psv", (function() {if ($truthy(table.$document()['$nested?']())) { - return "!sv" - } else { - return "psv" - }; return nil; })()], (self.format = $a[0]), (xsv = $a[1]), $a - }; - if ($truthy(attributes['$key?']("separator"))) { - if ($truthy((sep = attributes['$[]']("separator"))['$nil_or_empty?']())) { - $b = $$($nesting, 'DELIMITERS')['$[]'](xsv), $a = Opal.to_ary($b), (self.delimiter = ($a[0] == null ? nil : $a[0])), (self.delimiter_rx = ($a[1] == null ? nil : $a[1])), $b - } else if (sep['$==']("\\t")) { - $b = $$($nesting, 'DELIMITERS')['$[]']("tsv"), $a = Opal.to_ary($b), (self.delimiter = ($a[0] == null ? nil : $a[0])), (self.delimiter_rx = ($a[1] == null ? nil : $a[1])), $b - } else { - $a = [sep, new RegExp($$$('::', 'Regexp').$escape(sep))], (self.delimiter = $a[0]), (self.delimiter_rx = $a[1]), $a - } - } else { - $b = $$($nesting, 'DELIMITERS')['$[]'](xsv), $a = Opal.to_ary($b), (self.delimiter = ($a[0] == null ? nil : $a[0])), (self.delimiter_rx = ($a[1] == null ? nil : $a[1])), $b - }; - self.colcount = (function() {if ($truthy(table.$columns()['$empty?']())) { - return -1 - } else { - return table.$columns().$size() - }; return nil; })(); - self.buffer = ""; - self.cellspecs = []; - self.cell_open = false; - self.active_rowspans = [0]; - self.column_visits = 0; - self.current_row = []; - return (self.linenum = -1); - }, $ParserContext_initialize$31.$$arity = -3); - - Opal.def(self, '$starts_with_delimiter?', $ParserContext_starts_with_delimiter$ques$32 = function(line) { - var self = this; - - return line['$start_with?'](self.delimiter) - }, $ParserContext_starts_with_delimiter$ques$32.$$arity = 1); - - Opal.def(self, '$match_delimiter', $ParserContext_match_delimiter$33 = function $$match_delimiter(line) { - var self = this; - - return self.delimiter_rx.$match(line) - }, $ParserContext_match_delimiter$33.$$arity = 1); - - Opal.def(self, '$skip_past_delimiter', $ParserContext_skip_past_delimiter$34 = function $$skip_past_delimiter(pre) { - var self = this; - - - self.buffer = "" + (self.buffer) + (pre) + (self.delimiter); - return nil; - }, $ParserContext_skip_past_delimiter$34.$$arity = 1); - - Opal.def(self, '$skip_past_escaped_delimiter', $ParserContext_skip_past_escaped_delimiter$35 = function $$skip_past_escaped_delimiter(pre) { - var self = this; - - - self.buffer = "" + (self.buffer) + (pre.$chop()) + (self.delimiter); - return nil; - }, $ParserContext_skip_past_escaped_delimiter$35.$$arity = 1); - - Opal.def(self, '$buffer_has_unclosed_quotes?', $ParserContext_buffer_has_unclosed_quotes$ques$36 = function(append) { - var $a, $b, self = this, record = nil, trailing_quote = nil; - - - - if (append == null) { - append = nil; - }; - if ((record = (function() {if ($truthy(append)) { - return $rb_plus(self.buffer, append).$strip() - } else { - return self.buffer.$strip() - }; return nil; })())['$==']("\"")) { - return true - } else if ($truthy(record['$start_with?']("\""))) { - if ($truthy(($truthy($a = ($truthy($b = (trailing_quote = record['$end_with?']("\""))) ? record['$end_with?']("\"\"") : $b)) ? $a : record['$start_with?']("\"\"")))) { - return ($truthy($a = (record = record.$gsub("\"\"", ""))['$start_with?']("\"")) ? record['$end_with?']("\"")['$!']() : $a) - } else { - return trailing_quote['$!']() - } - } else { - return false - }; - }, $ParserContext_buffer_has_unclosed_quotes$ques$36.$$arity = -1); - - Opal.def(self, '$take_cellspec', $ParserContext_take_cellspec$37 = function $$take_cellspec() { - var self = this; - - return self.cellspecs.$shift() - }, $ParserContext_take_cellspec$37.$$arity = 0); - - Opal.def(self, '$push_cellspec', $ParserContext_push_cellspec$38 = function $$push_cellspec(cellspec) { - var $a, self = this; - - - - if (cellspec == null) { - cellspec = $hash2([], {}); - }; - self.cellspecs['$<<'](($truthy($a = cellspec) ? $a : $hash2([], {}))); - return nil; - }, $ParserContext_push_cellspec$38.$$arity = -1); - - Opal.def(self, '$keep_cell_open', $ParserContext_keep_cell_open$39 = function $$keep_cell_open() { - var self = this; - - - self.cell_open = true; - return nil; - }, $ParserContext_keep_cell_open$39.$$arity = 0); - - Opal.def(self, '$mark_cell_closed', $ParserContext_mark_cell_closed$40 = function $$mark_cell_closed() { - var self = this; - - - self.cell_open = false; - return nil; - }, $ParserContext_mark_cell_closed$40.$$arity = 0); - - Opal.def(self, '$cell_open?', $ParserContext_cell_open$ques$41 = function() { - var self = this; - - return self.cell_open - }, $ParserContext_cell_open$ques$41.$$arity = 0); - - Opal.def(self, '$cell_closed?', $ParserContext_cell_closed$ques$42 = function() { - var self = this; - - return self.cell_open['$!']() - }, $ParserContext_cell_closed$ques$42.$$arity = 0); - - Opal.def(self, '$close_open_cell', $ParserContext_close_open_cell$43 = function $$close_open_cell(next_cellspec) { - var self = this; - - - - if (next_cellspec == null) { - next_cellspec = $hash2([], {}); - }; - self.$push_cellspec(next_cellspec); - if ($truthy(self['$cell_open?']())) { - self.$close_cell(true)}; - self.$advance(); - return nil; - }, $ParserContext_close_open_cell$43.$$arity = -1); - - Opal.def(self, '$close_cell', $ParserContext_close_cell$44 = function $$close_cell(eol) {try { - - var $a, $b, $$45, self = this, cell_text = nil, cellspec = nil, repeat = nil; - - - - if (eol == null) { - eol = false; - }; - if (self.format['$==']("psv")) { - - cell_text = self.buffer; - self.buffer = ""; - if ($truthy((cellspec = self.$take_cellspec()))) { - repeat = ($truthy($a = cellspec.$delete("repeatcol")) ? $a : 1) - } else { - - self.$logger().$error(self.$message_with_context("table missing leading separator; recovering automatically", $hash2(["source_location"], {"source_location": $send($$$($$($nesting, 'Reader'), 'Cursor'), 'new', Opal.to_a(self.start_cursor_data))}))); - cellspec = $hash2([], {}); - repeat = 1; - }; - } else { - - cell_text = self.buffer.$strip(); - self.buffer = ""; - cellspec = nil; - repeat = 1; - if ($truthy(($truthy($a = (($b = self.format['$==']("csv")) ? cell_text['$empty?']()['$!']() : self.format['$==']("csv"))) ? cell_text['$include?']("\"") : $a))) { - if ($truthy(($truthy($a = cell_text['$start_with?']("\"")) ? cell_text['$end_with?']("\"") : $a))) { - if ($truthy((cell_text = cell_text.$slice(1, $rb_minus(cell_text.$length(), 2))))) { - cell_text = cell_text.$strip().$squeeze("\"") - } else { - - self.$logger().$error(self.$message_with_context("unclosed quote in CSV data; setting cell to empty", $hash2(["source_location"], {"source_location": self.reader.$cursor_at_prev_line()}))); - cell_text = ""; - } - } else { - cell_text = cell_text.$squeeze("\"") - }}; - }; - $send((1), 'upto', [repeat], ($$45 = function(i){var self = $$45.$$s || this, $c, $d, $$46, $e, column = nil, extra_cols = nil, offset = nil, cell = nil; - if (self.colcount == null) self.colcount = nil; - if (self.table == null) self.table = nil; - if (self.current_row == null) self.current_row = nil; - if (self.reader == null) self.reader = nil; - if (self.column_visits == null) self.column_visits = nil; - if (self.linenum == null) self.linenum = nil; - - - - if (i == null) { - i = nil; - }; - if (self.colcount['$=='](-1)) { - - self.table.$columns()['$<<']((column = $$$($$($nesting, 'Table'), 'Column').$new(self.table, $rb_minus($rb_plus(self.table.$columns().$size(), i), 1)))); - if ($truthy(($truthy($c = ($truthy($d = cellspec) ? cellspec['$key?']("colspan") : $d)) ? $rb_gt((extra_cols = $rb_minus(cellspec['$[]']("colspan").$to_i(), 1)), 0) : $c))) { - - offset = self.table.$columns().$size(); - $send(extra_cols, 'times', [], ($$46 = function(j){var self = $$46.$$s || this; - if (self.table == null) self.table = nil; - - - - if (j == null) { - j = nil; - }; - return self.table.$columns()['$<<']($$$($$($nesting, 'Table'), 'Column').$new(self.table, $rb_plus(offset, j)));}, $$46.$$s = self, $$46.$$arity = 1, $$46));}; - } else if ($truthy((column = self.table.$columns()['$[]'](self.current_row.$size())))) { - } else { - - self.$logger().$error(self.$message_with_context("dropping cell because it exceeds specified number of columns", $hash2(["source_location"], {"source_location": self.reader.$cursor_before_mark()}))); - Opal.ret(nil); - }; - cell = $$$($$($nesting, 'Table'), 'Cell').$new(column, cell_text, cellspec, $hash2(["cursor"], {"cursor": self.reader.$cursor_before_mark()})); - self.reader.$mark(); - if ($truthy(($truthy($c = cell.$rowspan()['$!']()) ? $c : cell.$rowspan()['$=='](1)))) { - } else { - self.$activate_rowspan(cell.$rowspan(), ($truthy($c = cell.$colspan()) ? $c : 1)) - }; - self.column_visits = $rb_plus(self.column_visits, ($truthy($c = cell.$colspan()) ? $c : 1)); - self.current_row['$<<'](cell); - if ($truthy(($truthy($c = self['$end_of_row?']()) ? ($truthy($d = ($truthy($e = self.colcount['$!='](-1)) ? $e : $rb_gt(self.linenum, 0))) ? $d : ($truthy($e = eol) ? i['$=='](repeat) : $e)) : $c))) { - return self.$close_row() - } else { - return nil - };}, $$45.$$s = self, $$45.$$arity = 1, $$45)); - self.cell_open = false; - return nil; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $ParserContext_close_cell$44.$$arity = -1); - self.$private(); - - Opal.def(self, '$close_row', $ParserContext_close_row$47 = function $$close_row() { - var $a, self = this, $writer = nil; - - - self.table.$rows().$body()['$<<'](self.current_row); - if (self.colcount['$=='](-1)) { - self.colcount = self.column_visits}; - self.column_visits = 0; - self.current_row = []; - self.active_rowspans.$shift(); - ($truthy($a = self.active_rowspans['$[]'](0)) ? $a : (($writer = [0, 0]), $send(self.active_rowspans, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - return nil; - }, $ParserContext_close_row$47.$$arity = 0); - - Opal.def(self, '$activate_rowspan', $ParserContext_activate_rowspan$48 = function $$activate_rowspan(rowspan, colspan) { - var $$49, self = this; - - - $send((1), 'upto', [$rb_minus(rowspan, 1)], ($$49 = function(i){var self = $$49.$$s || this, $a, $writer = nil; - if (self.active_rowspans == null) self.active_rowspans = nil; - - - - if (i == null) { - i = nil; - }; - $writer = [i, $rb_plus(($truthy($a = self.active_rowspans['$[]'](i)) ? $a : 0), colspan)]; - $send(self.active_rowspans, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$49.$$s = self, $$49.$$arity = 1, $$49)); - return nil; - }, $ParserContext_activate_rowspan$48.$$arity = 2); - - Opal.def(self, '$end_of_row?', $ParserContext_end_of_row$ques$50 = function() { - var $a, self = this; - - return ($truthy($a = self.colcount['$=='](-1)) ? $a : self.$effective_column_visits()['$=='](self.colcount)) - }, $ParserContext_end_of_row$ques$50.$$arity = 0); - - Opal.def(self, '$effective_column_visits', $ParserContext_effective_column_visits$51 = function $$effective_column_visits() { - var self = this; - - return $rb_plus(self.column_visits, self.active_rowspans['$[]'](0)) - }, $ParserContext_effective_column_visits$51.$$arity = 0); - return (Opal.def(self, '$advance', $ParserContext_advance$52 = function $$advance() { - var self = this; - - return (self.linenum = $rb_plus(self.linenum, 1)) - }, $ParserContext_advance$52.$$arity = 0), nil) && 'advance'; - })($$($nesting, 'Table'), null, $nesting); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/writer"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy, $hash2 = Opal.hash2; - - Opal.add_stubs(['$respond_to?', '$write', '$+', '$chomp', '$include']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - - (function($base, $parent_nesting) { - var self = $module($base, 'Writer'); - - var $nesting = [self].concat($parent_nesting), $Writer_write$1; - - - Opal.def(self, '$write', $Writer_write$1 = function $$write(output, target) { - var self = this; - - - if ($truthy(target['$respond_to?']("write"))) { - target.$write($rb_plus(output.$chomp(), $$($nesting, 'LF'))) - } else { - $$$('::', 'File').$write(target, output, $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')})) - }; - return nil; - }, $Writer_write$1.$$arity = 2) - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'VoidWriter'); - - var $nesting = [self].concat($parent_nesting), $VoidWriter_write$2; - - - self.$include($$($nesting, 'Writer')); - - Opal.def(self, '$write', $VoidWriter_write$2 = function $$write(output, target) { - var self = this; - - return nil - }, $VoidWriter_write$2.$$arity = 2); - })($nesting[0], $nesting); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/load"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$merge', '$[]', '$start', '$key?', '$!=', '$logger', '$new', '$logger=', '$-', '$!', '$===', '$dup', '$tap', '$each', '$partition', '$[]=', '$split', '$gsub', '$+', '$respond_to?', '$keys', '$raise', '$join', '$ancestors', '$class', '$==', '$at', '$to_i', '$mtime', '$absolute_path', '$path', '$dirname', '$basename', '$extname', '$read', '$rewind', '$drop', '$record', '$parse', '$exception', '$message', '$set_backtrace', '$backtrace', '$stack_trace', '$stack_trace=', '$open', '$load']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $load$1, $load_file$8; - - - - Opal.def(self, '$load', $load$1 = function $$load(input, options) { - var $a, $b, $c, $d, $$2, $$4, $$6, self = this, timings = nil, logger = nil, $writer = nil, attrs = nil, input_path = nil, source = nil, doc = nil, ex = nil, context = nil, wrapped_ex = nil; - - - - if (options == null) { - options = $hash2([], {}); - }; - try { - - options = options.$merge(); - if ($truthy((timings = options['$[]']("timings")))) { - timings.$start("read")}; - if ($truthy(($truthy($a = options['$key?']("logger")) ? (logger = options['$[]']("logger"))['$!=']($$($nesting, 'LoggerManager').$logger()) : $a))) { - - $writer = [($truthy($a = logger) ? $a : $$($nesting, 'NullLogger').$new())]; - $send($$($nesting, 'LoggerManager'), 'logger=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy((attrs = options['$[]']("attributes"))['$!']())) { - attrs = $hash2([], {}) - } else if ($truthy($$$('::', 'Hash')['$==='](attrs))) { - attrs = attrs.$merge() - } else if ($truthy(($truthy($a = (($d = $$$('::', 'Java', 'skip_raise')) && ($c = $$$($d, 'JavaUtil', 'skip_raise')) && ($b = $$$($c, 'Map', 'skip_raise')) ? 'constant' : nil)) ? $$$($$$($$$('::', 'Java'), 'JavaUtil'), 'Map')['$==='](attrs) : $a))) { - attrs = attrs.$dup() - } else if ($truthy($$$('::', 'Array')['$==='](attrs))) { - attrs = $send($hash2([], {}), 'tap', [], ($$2 = function(accum){var self = $$2.$$s || this, $$3; - - - - if (accum == null) { - accum = nil; - }; - return $send(attrs, 'each', [], ($$3 = function(entry){var self = $$3.$$s || this, $e, $f, k = nil, _ = nil, v = nil; - - - - if (entry == null) { - entry = nil; - }; - $f = entry.$partition("="), $e = Opal.to_ary($f), (k = ($e[0] == null ? nil : $e[0])), (_ = ($e[1] == null ? nil : $e[1])), (v = ($e[2] == null ? nil : $e[2])), $f; - - $writer = [k, v]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];;}, $$3.$$s = self, $$3.$$arity = 1, $$3));}, $$2.$$s = self, $$2.$$arity = 1, $$2)) - } else if ($truthy($$$('::', 'String')['$==='](attrs))) { - attrs = $send($hash2([], {}), 'tap', [], ($$4 = function(accum){var self = $$4.$$s || this, $$5; - - - - if (accum == null) { - accum = nil; - }; - return $send(attrs.$gsub($$($nesting, 'SpaceDelimiterRx'), $rb_plus("\\1", $$($nesting, 'NULL'))).$gsub($$($nesting, 'EscapedSpaceRx'), "\\1").$split($$($nesting, 'NULL')), 'each', [], ($$5 = function(entry){var self = $$5.$$s || this, $e, $f, k = nil, _ = nil, v = nil; - - - - if (entry == null) { - entry = nil; - }; - $f = entry.$partition("="), $e = Opal.to_ary($f), (k = ($e[0] == null ? nil : $e[0])), (_ = ($e[1] == null ? nil : $e[1])), (v = ($e[2] == null ? nil : $e[2])), $f; - - $writer = [k, v]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];;}, $$5.$$s = self, $$5.$$arity = 1, $$5));}, $$4.$$s = self, $$4.$$arity = 1, $$4)) - } else if ($truthy(($truthy($a = attrs['$respond_to?']("keys")) ? attrs['$respond_to?']("[]") : $a))) { - attrs = $send($hash2([], {}), 'tap', [], ($$6 = function(accum){var self = $$6.$$s || this, $$7; - - - - if (accum == null) { - accum = nil; - }; - return $send(attrs.$keys(), 'each', [], ($$7 = function(k){var self = $$7.$$s || this; - - - - if (k == null) { - k = nil; - }; - $writer = [k, attrs['$[]'](k)]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$7.$$s = self, $$7.$$arity = 1, $$7));}, $$6.$$s = self, $$6.$$arity = 1, $$6)) - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "illegal type for attributes option: " + (attrs.$class().$ancestors().$join(" < "))) - }; - if ($truthy($$$('::', 'File')['$==='](input))) { - - - $writer = ["input_mtime", (function() {if ($$($nesting, 'RUBY_ENGINE')['$==']("jruby")) { - - return $$$('::', 'Time').$at(input.$mtime().$to_i()); - } else { - return input.$mtime() - }; return nil; })()]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["docfile", (input_path = $$$('::', 'File').$absolute_path(input.$path()))]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["docdir", $$$('::', 'File').$dirname(input_path)]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["docname", $$($nesting, 'Helpers').$basename(input_path, (($writer = ["docfilesuffix", $$($nesting, 'Helpers').$extname(input_path)]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - source = input.$read(); - } else if ($truthy(input['$respond_to?']("read"))) { - - try { - input.$rewind() - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - nil - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - source = input.$read(); - } else if ($truthy($$$('::', 'String')['$==='](input))) { - source = input - } else if ($truthy($$$('::', 'Array')['$==='](input))) { - source = input.$drop(0) - } else if ($truthy(input)) { - self.$raise($$$('::', 'ArgumentError'), "" + "unsupported input type: " + (input.$class()))}; - if ($truthy(timings)) { - - timings.$record("read"); - timings.$start("parse");}; - - $writer = ["attributes", attrs]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - doc = (function() {if (options['$[]']("parse")['$=='](false)) { - - return $$($nesting, 'Document').$new(source, options); - } else { - return $$($nesting, 'Document').$new(source, options).$parse() - }; return nil; })(); - if ($truthy(timings)) { - timings.$record("parse")}; - return doc; - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {ex = $err; - try { - - - try { - - context = "" + "asciidoctor: FAILED: " + (($truthy($a = attrs['$[]']("docfile")) ? $a : "")) + ": Failed to load AsciiDoc document"; - if ($truthy(ex['$respond_to?']("exception"))) { - - wrapped_ex = ex.$exception("" + (context) + " - " + (ex.$message())); - wrapped_ex.$set_backtrace(ex.$backtrace()); - wrapped_ex.stack = ex.stack; - } else { - - wrapped_ex = ex.$class().$new(context, ex); - - $writer = [ex.$stack_trace()]; - $send(wrapped_ex, 'stack_trace=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }; - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - wrapped_ex = ex - } finally { Opal.pop_exception() } - } else { throw $err; } - };; - return self.$raise(wrapped_ex); - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - }, $load$1.$$arity = -2); - return (Opal.def(self, '$load_file', $load_file$8 = function $$load_file(filename, options) { - var $$9, self = this; - - - - if (options == null) { - options = $hash2([], {}); - }; - return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$9 = function(file){var self = $$9.$$s || this; - - - - if (file == null) { - file = nil; - }; - return self.$load(file, options);}, $$9.$$s = self, $$9.$$arity = 1, $$9)); - }, $load_file$8.$$arity = -2), nil) && 'load_file'; - })(Opal.get_singleton_class(self), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/convert"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_ge(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$delete', '$merge', '$===', '$absolute_path', '$path', '$load', '$respond_to?', '$[]=', '$-', '$key?', '$fetch', '$[]', '$dirname', '$expand_path', '$join', '$attributes', '$outfilesuffix', '$==', '$raise', '$pwd', '$>=', '$safe', '$normalize_system_path', '$mkdir_p', '$directory?', '$!', '$convert', '$write', '$<', '$attr?', '$basebackend?', '$attr', '$uriish?', '$include?', '$syntax_highlighter', '$write_stylesheet?', '$write_primary_stylesheet', '$instance', '$to_s', '$!=', '$read_asset', '$file?', '$write_stylesheet', '$open']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $convert$1, $convert_file$2; - - - - Opal.def(self, '$convert', $convert$1 = function $$convert(input, options) { - var $a, $b, $c, $d, $e, self = this, to_dir = nil, mkdirs = nil, $case = nil, to_file = nil, write_to_target = nil, sibling_path = nil, stream_output = nil, $writer = nil, outdir = nil, doc = nil, outfile = nil, working_dir = nil, jail = nil, output = nil, stylesdir = nil, stylesheet = nil, copy_asciidoctor_stylesheet = nil, copy_user_stylesheet = nil, copy_syntax_hl_stylesheet = nil, syntax_hl = nil, stylesoutdir = nil, stylesheet_src = nil, stylesheet_dest = nil, stylesheet_data = nil, stylesheet_outdir = nil; - - - - if (options == null) { - options = $hash2([], {}); - }; - (options = options.$merge()).$delete("parse"); - to_dir = options.$delete("to_dir"); - mkdirs = options.$delete("mkdirs"); - $case = (to_file = options.$delete("to_file")); - if (true['$===']($case) || nil['$===']($case)) { - if ($truthy((write_to_target = to_dir))) { - } else if ($truthy($$$('::', 'File')['$==='](input))) { - sibling_path = $$$('::', 'File').$absolute_path(input.$path())}; - to_file = nil;} - else if (false['$===']($case)) {to_file = nil} - else if ("/dev/null"['$===']($case)) {return self.$load(input, options)} - else {if ($truthy((stream_output = to_file['$respond_to?']("write")))) { - } else { - - $writer = ["to_file", (write_to_target = to_file)]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }}; - if ($truthy(options['$key?']("standalone"))) { - } else if ($truthy(($truthy($a = sibling_path) ? $a : write_to_target))) { - - $writer = ["standalone", options.$fetch("header_footer", true)]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else if ($truthy(options['$key?']("header_footer"))) { - - $writer = ["standalone", options['$[]']("header_footer")]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(sibling_path)) { - - $writer = ["to_dir", (outdir = $$$('::', 'File').$dirname(sibling_path))]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else if ($truthy(write_to_target)) { - if ($truthy(to_dir)) { - if ($truthy(to_file)) { - - $writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path(to_file, to_dir))]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = ["to_dir", $$$('::', 'File').$expand_path(to_dir)]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } - } else if ($truthy(to_file)) { - - $writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path(to_file))]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}}; - doc = self.$load(input, options); - if ($truthy(sibling_path)) { - - outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix())); - if (outfile['$=='](sibling_path)) { - self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))}; - } else if ($truthy(write_to_target)) { - - working_dir = (function() {if ($truthy(options['$key?']("base_dir"))) { - - return $$$('::', 'File').$expand_path(options['$[]']("base_dir")); - } else { - return $$$('::', 'Dir').$pwd() - }; return nil; })(); - jail = (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) { - return working_dir - } else { - return nil - }; return nil; })(); - if ($truthy(to_dir)) { - - outdir = doc.$normalize_system_path(to_dir, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false})); - if ($truthy(to_file)) { - - outfile = doc.$normalize_system_path(to_file, outdir, nil, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false})); - outdir = $$$('::', 'File').$dirname(outfile); - } else { - outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix())) - }; - } else if ($truthy(to_file)) { - - outfile = doc.$normalize_system_path(to_file, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false})); - outdir = $$$('::', 'File').$dirname(outfile);}; - if ($truthy(($truthy($a = $$$('::', 'File')['$==='](input)) ? outfile['$==']($$$('::', 'File').$absolute_path(input.$path())) : $a))) { - self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))}; - if ($truthy(mkdirs)) { - $$($nesting, 'Helpers').$mkdir_p(outdir) - } else if ($truthy($$$('::', 'File')['$directory?'](outdir))) { - } else { - self.$raise($$$('::', 'IOError'), "" + "target directory does not exist: " + (to_dir) + " (hint: set :mkdirs option)") - }; - } else { - - outfile = to_file; - outdir = nil; - }; - if ($truthy(($truthy($a = outfile) ? stream_output['$!']() : $a))) { - output = doc.$convert($hash2(["outfile", "outdir"], {"outfile": outfile, "outdir": outdir})) - } else { - output = doc.$convert() - }; - if ($truthy(outfile)) { - - doc.$write(output, outfile); - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = ($truthy($d = ($truthy($e = stream_output['$!']()) ? $rb_lt(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $e)) ? doc['$attr?']("linkcss") : $d)) ? doc['$attr?']("copycss") : $c)) ? doc['$basebackend?']("html") : $b)) ? ($truthy($b = (stylesdir = doc.$attr("stylesdir"))) ? $$($nesting, 'Helpers')['$uriish?'](stylesdir) : $b)['$!']() : $a))) { - - if ($truthy((stylesheet = doc.$attr("stylesheet")))) { - if ($truthy($$($nesting, 'DEFAULT_STYLESHEET_KEYS')['$include?'](stylesheet))) { - copy_asciidoctor_stylesheet = true - } else if ($truthy($$($nesting, 'Helpers')['$uriish?'](stylesheet)['$!']())) { - copy_user_stylesheet = true}}; - copy_syntax_hl_stylesheet = ($truthy($a = (syntax_hl = doc.$syntax_highlighter())) ? syntax_hl['$write_stylesheet?'](doc) : $a); - if ($truthy(($truthy($a = ($truthy($b = copy_asciidoctor_stylesheet) ? $b : copy_user_stylesheet)) ? $a : copy_syntax_hl_stylesheet))) { - - stylesoutdir = doc.$normalize_system_path(stylesdir, outdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) { - return outdir - } else { - return nil - }; return nil; })()); - if ($truthy(mkdirs)) { - $$($nesting, 'Helpers').$mkdir_p(stylesoutdir) - } else if ($truthy($$$('::', 'File')['$directory?'](stylesoutdir))) { - } else { - self.$raise($$$('::', 'IOError'), "" + "target stylesheet directory does not exist: " + (stylesoutdir) + " (hint: set :mkdirs option)") - }; - if ($truthy(copy_asciidoctor_stylesheet)) { - $$($nesting, 'Stylesheets').$instance().$write_primary_stylesheet(stylesoutdir) - } else if ($truthy(copy_user_stylesheet)) { - - if ($truthy(($truthy($a = (stylesheet_src = doc.$attr("copycss"))['$==']("")) ? $a : stylesheet_src['$=='](true)))) { - stylesheet_src = doc.$normalize_system_path(stylesheet) - } else { - stylesheet_src = doc.$normalize_system_path(stylesheet_src.$to_s()) - }; - stylesheet_dest = doc.$normalize_system_path(stylesheet, stylesoutdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) { - return outdir - } else { - return nil - }; return nil; })()); - if ($truthy(($truthy($a = stylesheet_src['$!='](stylesheet_dest)) ? (stylesheet_data = doc.$read_asset(stylesheet_src, $hash2(["warn_on_failure", "label"], {"warn_on_failure": $$$('::', 'File')['$file?'](stylesheet_dest)['$!'](), "label": "stylesheet"}))) : $a))) { - - if ($truthy(($truthy($a = (stylesheet_outdir = $$$('::', 'File').$dirname(stylesheet_dest))['$!='](stylesoutdir)) ? $$$('::', 'File')['$directory?'](stylesheet_outdir)['$!']() : $a))) { - if ($truthy(mkdirs)) { - $$($nesting, 'Helpers').$mkdir_p(stylesheet_outdir) - } else { - self.$raise($$$('::', 'IOError'), "" + "target stylesheet directory does not exist: " + (stylesheet_outdir) + " (hint: set :mkdirs option)") - }}; - $$$('::', 'File').$write(stylesheet_dest, stylesheet_data, $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')}));};}; - if ($truthy(copy_syntax_hl_stylesheet)) { - syntax_hl.$write_stylesheet(doc, stylesoutdir)};};}; - return doc; - } else { - return output - }; - }, $convert$1.$$arity = -2); - - Opal.def(self, '$convert_file', $convert_file$2 = function $$convert_file(filename, options) { - var $$3, self = this; - - - - if (options == null) { - options = $hash2([], {}); - }; - return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$3 = function(file){var self = $$3.$$s || this; - - - - if (file == null) { - file = nil; - }; - return self.$convert(file, options);}, $$3.$$s = self, $$3.$$arity = 1, $$3)); - }, $convert_file$2.$$arity = -2); - Opal.alias(self, "render", "convert"); - return Opal.alias(self, "render_file", "convert_file"); - })(Opal.get_singleton_class(self), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/syntax_highlighter/highlightjs"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy; - - Opal.add_stubs(['$register_for', '$merge', '$proc', '$[]=', '$-', '$attr', '$[]', '$==', '$attr?', '$join', '$map', '$split', '$lstrip']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'HighlightJsAdapter'); - - var $nesting = [self].concat($parent_nesting), $HighlightJsAdapter_initialize$1, $HighlightJsAdapter_format$2, $HighlightJsAdapter_docinfo$ques$4, $HighlightJsAdapter_docinfo$5; - - - self.$register_for("highlightjs", "highlight.js"); - - Opal.def(self, '$initialize', $HighlightJsAdapter_initialize$1 = function $$initialize($a) { - var $post_args, args, $iter = $HighlightJsAdapter_initialize$1.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $HighlightJsAdapter_initialize$1.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $HighlightJsAdapter_initialize$1, false), $zuper, $iter); - return (self.name = (self.pre_class = "highlightjs")); - }, $HighlightJsAdapter_initialize$1.$$arity = -1); - - Opal.def(self, '$format', $HighlightJsAdapter_format$2 = function $$format(node, lang, opts) { - var $$3, $iter = $HighlightJsAdapter_format$2.$$p, $yield = $iter || nil, self = this; - - if ($iter) $HighlightJsAdapter_format$2.$$p = null; - return $send(self, Opal.find_super_dispatcher(self, 'format', $HighlightJsAdapter_format$2, false), [node, lang, opts.$merge($hash2(["transform"], {"transform": $send(self, 'proc', [], ($$3 = function(_, code){var self = $$3.$$s || this, $a, $writer = nil; - - - - if (_ == null) { - _ = nil; - }; - - if (code == null) { - code = nil; - }; - $writer = ["class", "" + "language-" + (($truthy($a = lang) ? $a : "none")) + " hljs"]; - $send(code, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$3.$$s = self, $$3.$$arity = 2, $$3))}))], null) - }, $HighlightJsAdapter_format$2.$$arity = 3); - - Opal.def(self, '$docinfo?', $HighlightJsAdapter_docinfo$ques$4 = function(location) { - var self = this; - - return true - }, $HighlightJsAdapter_docinfo$ques$4.$$arity = 1); - return (Opal.def(self, '$docinfo', $HighlightJsAdapter_docinfo$5 = function $$docinfo(location, doc, opts) { - var $$6, self = this, base_url = nil; - - - base_url = doc.$attr("highlightjsdir", "" + (opts['$[]']("cdn_base_url")) + "/highlight.js/" + ($$($nesting, 'HIGHLIGHT_JS_VERSION'))); - if (location['$==']("head")) { - return "" + "" - } else { - return "" + "\n" + ((function() {if ($truthy(doc['$attr?']("highlightjs-languages"))) { - return $send(doc.$attr("highlightjs-languages").$split(","), 'map', [], ($$6 = function(lang){var self = $$6.$$s || this; - - - - if (lang == null) { - lang = nil; - }; - return "" + "\n";}, $$6.$$s = self, $$6.$$arity = 1, $$6)).$join() - } else { - return "" - }; return nil; })()) + "" - }; - }, $HighlightJsAdapter_docinfo$5.$$arity = 3), nil) && 'docinfo'; - })($$($nesting, 'SyntaxHighlighter'), $$$($$($nesting, 'SyntaxHighlighter'), 'Base'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send, $klass = Opal.klass; - - Opal.add_stubs(['$attr_reader', '$raise', '$class', '$private_class_method', '$extend', '$register', '$map', '$to_s', '$each', '$[]=', '$registry', '$-', '$[]', '$for', '$===', '$new', '$name', '$private', '$include', '$==', '$delete', '$join', '$content']); - - (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'SyntaxHighlighter'); - - var $nesting = [self].concat($parent_nesting), $SyntaxHighlighter_initialize$1, $SyntaxHighlighter_docinfo$ques$2, $SyntaxHighlighter_docinfo$3, $SyntaxHighlighter_highlight$ques$4, $SyntaxHighlighter_highlight$5, $SyntaxHighlighter_format$6, $SyntaxHighlighter_write_stylesheet$ques$7, $SyntaxHighlighter_write_stylesheet$8, $a, $SyntaxHighlighter_included$9; - - - self.$attr_reader("name"); - - Opal.def(self, '$initialize', $SyntaxHighlighter_initialize$1 = function $$initialize(name, backend, opts) { - var self = this; - - - - if (backend == null) { - backend = "html5"; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - return (self.name = (self.pre_class = name)); - }, $SyntaxHighlighter_initialize$1.$$arity = -2); - - Opal.def(self, '$docinfo?', $SyntaxHighlighter_docinfo$ques$2 = function(location) { - var self = this; - - return nil - }, $SyntaxHighlighter_docinfo$ques$2.$$arity = 1); - - Opal.def(self, '$docinfo', $SyntaxHighlighter_docinfo$3 = function $$docinfo(location, doc, opts) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'SyntaxHighlighter')) + " subclass " + (self.$class()) + " must implement the #" + ("docinfo") + " method since #docinfo? returns true") - }, $SyntaxHighlighter_docinfo$3.$$arity = 3); - - Opal.def(self, '$highlight?', $SyntaxHighlighter_highlight$ques$4 = function() { - var self = this; - - return nil - }, $SyntaxHighlighter_highlight$ques$4.$$arity = 0); - - Opal.def(self, '$highlight', $SyntaxHighlighter_highlight$5 = function $$highlight(node, source, lang, opts) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'SyntaxHighlighter')) + " subclass " + (self.$class()) + " must implement the #" + ("highlight") + " method since #highlight? returns true") - }, $SyntaxHighlighter_highlight$5.$$arity = 4); - - Opal.def(self, '$format', $SyntaxHighlighter_format$6 = function $$format(node, lang, opts) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'SyntaxHighlighter')) + " subclass " + (self.$class()) + " must implement the #" + ("format") + " method") - }, $SyntaxHighlighter_format$6.$$arity = 3); - - Opal.def(self, '$write_stylesheet?', $SyntaxHighlighter_write_stylesheet$ques$7 = function(doc) { - var self = this; - - return nil - }, $SyntaxHighlighter_write_stylesheet$ques$7.$$arity = 1); - - Opal.def(self, '$write_stylesheet', $SyntaxHighlighter_write_stylesheet$8 = function $$write_stylesheet(doc, to_dir) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'SyntaxHighlighter')) + " subclass " + (self.$class()) + " must implement the #" + ("write_stylesheet") + " method since #write_stylesheet? returns true") - }, $SyntaxHighlighter_write_stylesheet$8.$$arity = 2); - self.$private_class_method(($truthy($a = (Opal.defs(self, '$included', $SyntaxHighlighter_included$9 = function $$included(into) { - var self = this; - - return into.$extend($$($nesting, 'Config')) - }, $SyntaxHighlighter_included$9.$$arity = 1), nil) && 'included') ? $a : "included")); - (function($base, $parent_nesting) { - var self = $module($base, 'Config'); - - var $nesting = [self].concat($parent_nesting), $Config_register_for$10; - - - Opal.def(self, '$register_for', $Config_register_for$10 = function $$register_for($a) { - var $post_args, names, $$11, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - names = $post_args;; - return $send($$($nesting, 'SyntaxHighlighter'), 'register', [self].concat(Opal.to_a($send(names, 'map', [], ($$11 = function(name){var self = $$11.$$s || this; - - - - if (name == null) { - name = nil; - }; - return name.$to_s();}, $$11.$$s = self, $$11.$$arity = 1, $$11))))); - }, $Config_register_for$10.$$arity = -1) - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Factory'); - - var $nesting = [self].concat($parent_nesting), $Factory_register$12, $Factory_for$14, $Factory_create$15, $Factory_registry$16; - - - - Opal.def(self, '$register', $Factory_register$12 = function $$register(syntax_highlighter, $a) { - var $post_args, names, $$13, self = this; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - names = $post_args;; - return $send(names, 'each', [], ($$13 = function(name){var self = $$13.$$s || this, $writer = nil; - - - - if (name == null) { - name = nil; - }; - $writer = [name, syntax_highlighter]; - $send(self.$registry(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$13.$$s = self, $$13.$$arity = 1, $$13)); - }, $Factory_register$12.$$arity = -2); - - Opal.def(self, '$for', $Factory_for$14 = function(name) { - var self = this; - - return self.$registry()['$[]'](name) - }, $Factory_for$14.$$arity = 1); - - Opal.def(self, '$create', $Factory_create$15 = function $$create(name, backend, opts) { - var self = this, syntax_hl = nil; - - - - if (backend == null) { - backend = "html5"; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy((syntax_hl = self.$for(name)))) { - - if ($truthy($$$('::', 'Class')['$==='](syntax_hl))) { - syntax_hl = syntax_hl.$new(name, backend, opts)}; - if ($truthy(syntax_hl.$name())) { - } else { - self.$raise($$$('::', 'NameError'), "" + (syntax_hl.$class()) + " must specify a value for `name'") - }; - return syntax_hl; - } else { - return nil - }; - }, $Factory_create$15.$$arity = -2); - self.$private(); - - Opal.def(self, '$registry', $Factory_registry$16 = function $$registry() { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Factory')) + " subclass " + (self.$class()) + " must implement the #" + ("registry") + " method") - }, $Factory_registry$16.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'CustomFactory'); - - var $nesting = [self].concat($parent_nesting), $CustomFactory_initialize$17, $CustomFactory_registry$18; - - self.$$prototype.registry = nil; - - self.$include($$($nesting, 'Factory')); - - Opal.def(self, '$initialize', $CustomFactory_initialize$17 = function $$initialize(seed_registry) { - var $a, self = this; - - - - if (seed_registry == null) { - seed_registry = nil; - }; - return (self.registry = ($truthy($a = seed_registry) ? $a : $hash2([], {}))); - }, $CustomFactory_initialize$17.$$arity = -1); - self.$private(); - return (Opal.def(self, '$registry', $CustomFactory_registry$18 = function $$registry() { - var self = this; - - return self.registry - }, $CustomFactory_registry$18.$$arity = 0), nil) && 'registry'; - })($nesting[0], null, $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'DefaultFactory'); - - var $nesting = [self].concat($parent_nesting), $DefaultFactory_registry$19; - - - self.$include($$($nesting, 'Factory')); - self.$private(); - (Opal.class_variable_set($nesting[0], '@@registry', $hash2([], {}))); - - Opal.def(self, '$registry', $DefaultFactory_registry$19 = function $$registry() { - var $a, self = this; - - return (($a = $nesting[0].$$cvars['@@registry']) == null ? nil : $a) - }, $DefaultFactory_registry$19.$$arity = 0); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'DefaultFactoryProxy'); - - var $nesting = [self].concat($parent_nesting); - - - self.$include($$($nesting, 'DefaultFactory')); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - return nil - } else { - return nil - }; - })($nesting[0], $$($nesting, 'CustomFactory'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Base'); - - var $nesting = [self].concat($parent_nesting), $Base_format$20; - - self.$$prototype.pre_class = nil; - - self.$include($$($nesting, 'SyntaxHighlighter')); - return (Opal.def(self, '$format', $Base_format$20 = function $$format(node, lang, opts) { - var $$21, $$22, self = this, class_attr_val = nil, transform = nil, pre = nil, code = nil, $writer = nil; - - - class_attr_val = (function() {if ($truthy(opts['$[]']("nowrap"))) { - return "" + (self.pre_class) + " highlight nowrap" - } else { - return "" + (self.pre_class) + " highlight" - }; return nil; })(); - if ($truthy((transform = opts['$[]']("transform")))) { - - transform['$[]']((pre = $hash2(["class"], {"class": class_attr_val})), (code = (function() {if ($truthy(lang)) { - return $hash2(["data-lang"], {"data-lang": lang}) - } else { - return $hash2([], {}) - }; return nil; })())); - if ($truthy((lang = code.$delete("data-lang")))) { - - $writer = ["data-lang", lang]; - $send(code, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return "" + "" + (node.$content()) + ""; - } else { - return "" + "
" + (node.$content()) + "
" - }; - }, $Base_format$20.$$arity = 3), nil) && 'format'; - })($nesting[0], null, $nesting); - self.$extend($$($nesting, 'DefaultFactory')); - })($nesting[0], $nesting) - })($nesting[0], $nesting); - self.$require("asciidoctor/syntax_highlighter.rb"+ '/../' + "syntax_highlighter/highlightjs"); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - return nil - } else { - return nil - }; -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/timings"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy, $gvars = Opal.gvars; - - Opal.add_stubs(['$now', '$[]=', '$-', '$delete', '$reduce', '$+', '$[]', '$>', '$time', '$puts', '$%', '$to_f', '$read_parse', '$convert', '$read_parse_convert', '$private', '$const_defined?', '$==', '$clock_gettime']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Timings'); - - var $nesting = [self].concat($parent_nesting), $Timings_initialize$1, $Timings_start$2, $Timings_record$3, $Timings_time$4, $Timings_read$6, $Timings_parse$7, $Timings_read_parse$8, $Timings_convert$9, $Timings_read_parse_convert$10, $Timings_write$11, $Timings_total$12, $Timings_print_report$13, $a, $b, $c, $d, $e, $Timings_now$14, $Timings_now$15; - - self.$$prototype.timers = self.$$prototype.log = nil; - - - Opal.def(self, '$initialize', $Timings_initialize$1 = function $$initialize() { - var self = this; - - - self.log = $hash2([], {}); - return (self.timers = $hash2([], {})); - }, $Timings_initialize$1.$$arity = 0); - - Opal.def(self, '$start', $Timings_start$2 = function $$start(key) { - var self = this, $writer = nil; - - - $writer = [key, self.$now()]; - $send(self.timers, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $Timings_start$2.$$arity = 1); - - Opal.def(self, '$record', $Timings_record$3 = function $$record(key) { - var self = this, $writer = nil; - - - $writer = [key, $rb_minus(self.$now(), self.timers.$delete(key))]; - $send(self.log, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $Timings_record$3.$$arity = 1); - - Opal.def(self, '$time', $Timings_time$4 = function $$time($a) { - var $post_args, keys, $$5, self = this, time = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - keys = $post_args;; - time = $send(keys, 'reduce', [0], ($$5 = function(sum, key){var self = $$5.$$s || this, $b; - if (self.log == null) self.log = nil; - - - - if (sum == null) { - sum = nil; - }; - - if (key == null) { - key = nil; - }; - return $rb_plus(sum, ($truthy($b = self.log['$[]'](key)) ? $b : 0));}, $$5.$$s = self, $$5.$$arity = 2, $$5)); - if ($truthy($rb_gt(time, 0))) { - return time - } else { - return nil - }; - }, $Timings_time$4.$$arity = -1); - - Opal.def(self, '$read', $Timings_read$6 = function $$read() { - var self = this; - - return self.$time("read") - }, $Timings_read$6.$$arity = 0); - - Opal.def(self, '$parse', $Timings_parse$7 = function $$parse() { - var self = this; - - return self.$time("parse") - }, $Timings_parse$7.$$arity = 0); - - Opal.def(self, '$read_parse', $Timings_read_parse$8 = function $$read_parse() { - var self = this; - - return self.$time("read", "parse") - }, $Timings_read_parse$8.$$arity = 0); - - Opal.def(self, '$convert', $Timings_convert$9 = function $$convert() { - var self = this; - - return self.$time("convert") - }, $Timings_convert$9.$$arity = 0); - - Opal.def(self, '$read_parse_convert', $Timings_read_parse_convert$10 = function $$read_parse_convert() { - var self = this; - - return self.$time("read", "parse", "convert") - }, $Timings_read_parse_convert$10.$$arity = 0); - - Opal.def(self, '$write', $Timings_write$11 = function $$write() { - var self = this; - - return self.$time("write") - }, $Timings_write$11.$$arity = 0); - - Opal.def(self, '$total', $Timings_total$12 = function $$total() { - var self = this; - - return self.$time("read", "parse", "convert", "write") - }, $Timings_total$12.$$arity = 0); - - Opal.def(self, '$print_report', $Timings_print_report$13 = function $$print_report(to, subject) { - var self = this; - if ($gvars.stdout == null) $gvars.stdout = nil; - - - - if (to == null) { - to = $gvars.stdout; - }; - - if (subject == null) { - subject = nil; - }; - if ($truthy(subject)) { - to.$puts("" + "Input file: " + (subject))}; - to.$puts("" + " Time to read and parse source: " + ("%05.5f"['$%'](self.$read_parse().$to_f()))); - to.$puts("" + " Time to convert document: " + ("%05.5f"['$%'](self.$convert().$to_f()))); - return to.$puts("" + " Total time (read, parse and convert): " + ("%05.5f"['$%'](self.$read_parse_convert().$to_f()))); - }, $Timings_print_report$13.$$arity = -1); - self.$private(); - if ($truthy(($truthy($a = $$$('::', 'Process')['$const_defined?']("CLOCK_MONOTONIC", false)) ? ((($b = $$$('::', 'Process', 'skip_raise')) && ($c = $b, $c) && ($d = $c) && ((($e = $d.$clock_gettime) && !$e.$$stub) || $d['$respond_to_missing?']('clock_gettime'))) ? 'method' : nil)['$==']("method") : $a))) { - - Opal.const_set($nesting[0], 'CLOCK_ID', $$$($$$('::', 'Process'), 'CLOCK_MONOTONIC')); - return (Opal.def(self, '$now', $Timings_now$14 = function $$now() { - var self = this; - - return $$$('::', 'Process').$clock_gettime($$($nesting, 'CLOCK_ID')) - }, $Timings_now$14.$$arity = 0), nil) && 'now'; - } else { - return (Opal.def(self, '$now', $Timings_now$15 = function $$now() { - var self = this; - - return $$$('::', 'Time').$now() - }, $Timings_now$15.$$arity = 0), nil) && 'now' - }; - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/converter/composite"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy; - - Opal.add_stubs(['$attr_reader', '$each', '$respond_to?', '$composed', '$init_backend_traits', '$backend_traits', '$new', '$find_converter', '$[]=', '$-', '$convert', '$converter_for', '$node_name', '$[]', '$handles?', '$raise']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'CompositeConverter'); - - var $nesting = [self].concat($parent_nesting), $CompositeConverter_initialize$1, $CompositeConverter_convert$4, $CompositeConverter_converter_for$5, $CompositeConverter_find_converter$6; - - self.$$prototype.converter_cache = self.$$prototype.converters = nil; - - self.$attr_reader("converters"); - - Opal.def(self, '$initialize', $CompositeConverter_initialize$1 = function $$initialize(backend, $a, $b) { - var $post_args, $kwargs, converters, backend_traits_source, $$2, $$3, self = this; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - $kwargs = Opal.extract_kwargs($post_args); - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - converters = $post_args;; - - backend_traits_source = $kwargs.$$smap["backend_traits_source"]; - if (backend_traits_source == null) { - backend_traits_source = nil - }; - self.backend = backend; - $send((self.converters = converters), 'each', [], ($$2 = function(converter){var self = $$2.$$s || this; - - - - if (converter == null) { - converter = nil; - }; - if ($truthy(converter['$respond_to?']("composed"))) { - return converter.$composed(self) - } else { - return nil - };}, $$2.$$s = self, $$2.$$arity = 1, $$2)); - if ($truthy(backend_traits_source)) { - self.$init_backend_traits(backend_traits_source.$backend_traits())}; - return (self.converter_cache = $send($$$('::', 'Hash'), 'new', [], ($$3 = function(hash, key){var self = $$3.$$s || this, $writer = nil; - - - - if (hash == null) { - hash = nil; - }; - - if (key == null) { - key = nil; - }; - $writer = [key, self.$find_converter(key)]; - $send(hash, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$3.$$s = self, $$3.$$arity = 2, $$3))); - }, $CompositeConverter_initialize$1.$$arity = -2); - - Opal.def(self, '$convert', $CompositeConverter_convert$4 = function $$convert(node, transform, opts) { - var $a, self = this; - - - - if (transform == null) { - transform = nil; - }; - - if (opts == null) { - opts = nil; - }; - return self.$converter_for((transform = ($truthy($a = transform) ? $a : node.$node_name()))).$convert(node, transform, opts); - }, $CompositeConverter_convert$4.$$arity = -2); - - Opal.def(self, '$converter_for', $CompositeConverter_converter_for$5 = function $$converter_for(transform) { - var self = this; - - return self.converter_cache['$[]'](transform) - }, $CompositeConverter_converter_for$5.$$arity = 1); - return (Opal.def(self, '$find_converter', $CompositeConverter_find_converter$6 = function $$find_converter(transform) {try { - - var $$7, self = this; - - - $send(self.converters, 'each', [], ($$7 = function(candidate){var self = $$7.$$s || this; - - - - if (candidate == null) { - candidate = nil; - }; - if ($truthy(candidate['$handles?'](transform))) { - Opal.ret(candidate) - } else { - return nil - };}, $$7.$$s = self, $$7.$$arity = 1, $$7)); - return self.$raise("" + "Could not find a converter to handle transform: " + (transform)); - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $CompositeConverter_find_converter$6.$$arity = 1), nil) && 'find_converter'; - })($$($nesting, 'Converter'), $$$($$($nesting, 'Converter'), 'Base'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/converter/html5"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_le(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy, $gvars = Opal.gvars; - - Opal.add_stubs(['$register_for', '$default=', '$-', '$==', '$[]', '$init_backend_traits', '$node_name', '$convert_inline_quoted', '$convert_paragraph', '$convert_inline_anchor', '$convert_section', '$convert_listing', '$convert_literal', '$convert_ulist', '$convert_olist', '$convert_dlist', '$convert_admonition', '$convert_colist', '$convert_embedded', '$convert_example', '$convert_floating_title', '$convert_image', '$convert_inline_break', '$convert_inline_button', '$convert_inline_callout', '$convert_inline_footnote', '$convert_inline_image', '$convert_inline_indexterm', '$convert_inline_kbd', '$convert_inline_menu', '$convert_open', '$convert_page_break', '$convert_preamble', '$convert_quote', '$convert_sidebar', '$convert_stem', '$convert_table', '$convert_thematic_break', '$convert_verse', '$convert_video', '$convert_document', '$convert_toc', '$convert_pass', '$convert_audio', '$empty?', '$attr', '$attr?', '$<<', '$include?', '$sub_replacements', '$gsub', '$extname', '$slice', '$length', '$doctitle', '$normalize_web_path', '$primary_stylesheet_data', '$instance', '$read_contents', '$syntax_highlighter', '$size', '$docinfo', '$id', '$sections?', '$doctype', '$role?', '$role', '$join', '$noheader', '$convert', '$converter', '$generate_manname_section', '$header?', '$notitle', '$title', '$header', '$each', '$authors', '$>', '$name', '$email', '$sub_macros', '$+', '$downcase', '$concat', '$content', '$footnotes?', '$!', '$footnotes', '$index', '$text', '$nofooter', '$docinfo?', '$[]=', '$delete_at', '$inspect', '$!=', '$to_i', '$attributes', '$document', '$sections', '$level', '$caption', '$captioned_title', '$numbered', '$<=', '$<', '$sectname', '$sectnum', '$convert_outline', '$title?', '$icon_uri', '$compact', '$media_uri', '$option?', '$append_boolean_attribute', '$style', '$items', '$blocks?', '$===', '$text?', '$chomp', '$safe', '$read_svg_contents', '$alt', '$image_uri', '$encode_attribute_value', '$append_link_constraint_attrs', '$highlight?', '$to_sym', '$format', '$*', '$count', '$start_with?', '$end_with?', '$list_marker_keyword', '$parent', '$warn', '$logger', '$context', '$error', '$new', '$columns', '$to_h', '$rows', '$colspan', '$rowspan', '$unshift', '$shift', '$pop', '$split', '$nil_or_empty?', '$type', '$catalog', '$get_root_document', '$xreftext', '$target', '$reftext', '$map', '$chop', '$sub', '$match', '$private', '$upcase', '$nested?', '$parent_document', '$to_s', '$handles?', '$send']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Html5Converter'); - - var $nesting = [self].concat($parent_nesting), $Html5Converter_initialize$1, $Html5Converter_convert$2, $Html5Converter_convert_document$3, $Html5Converter_convert_embedded$6, $Html5Converter_convert_outline$8, $Html5Converter_convert_section$10, $Html5Converter_convert_admonition$11, $Html5Converter_convert_audio$12, $Html5Converter_convert_colist$13, $Html5Converter_convert_dlist$16, $Html5Converter_convert_example$23, $Html5Converter_convert_floating_title$24, $Html5Converter_convert_image$25, $Html5Converter_convert_listing$26, $Html5Converter_convert_literal$27, $Html5Converter_convert_stem$28, $Html5Converter_convert_olist$30, $Html5Converter_convert_open$32, $Html5Converter_convert_page_break$33, $Html5Converter_convert_paragraph$34, $Html5Converter_convert_preamble$35, $Html5Converter_convert_quote$36, $Html5Converter_convert_thematic_break$37, $Html5Converter_convert_sidebar$38, $Html5Converter_convert_table$39, $Html5Converter_convert_toc$44, $Html5Converter_convert_ulist$45, $Html5Converter_convert_verse$47, $Html5Converter_convert_video$48, $Html5Converter_convert_inline_anchor$49, $Html5Converter_convert_inline_break$50, $Html5Converter_convert_inline_button$51, $Html5Converter_convert_inline_callout$52, $Html5Converter_convert_inline_footnote$53, $Html5Converter_convert_inline_image$54, $Html5Converter_convert_inline_indexterm$57, $Html5Converter_convert_inline_kbd$58, $Html5Converter_convert_inline_menu$59, $Html5Converter_convert_inline_quoted$60, $Html5Converter_read_svg_contents$61, $Html5Converter_append_boolean_attribute$63, $Html5Converter_append_link_constraint_attrs$64, $Html5Converter_encode_attribute_value$65, $Html5Converter_generate_manname_section$66, $Html5Converter_get_root_document$67, $Html5Converter_method_missing$68, $writer = nil; - - self.$$prototype.void_element_slash = self.$$prototype.xml_mode = self.$$prototype.refs = self.$$prototype.resolving_xref = nil; - - self.$register_for("html5"); - - $writer = [["", ""]]; - $send(Opal.const_set($nesting[0], 'QUOTE_TAGS', $hash2(["monospaced", "emphasis", "strong", "double", "single", "mark", "superscript", "subscript", "asciimath", "latexmath"], {"monospaced": ["", "", true], "emphasis": ["", "", true], "strong": ["", "", true], "double": ["“", "”"], "single": ["‘", "’"], "mark": ["", "", true], "superscript": ["", "", true], "subscript": ["", "", true], "asciimath": ["\\$", "\\$"], "latexmath": ["\\(", "\\)"]})), 'default=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - Opal.const_set($nesting[0], 'DropAnchorRx', /<(?:a\b[^>]*|\/a)>/); - Opal.const_set($nesting[0], 'StemBreakRx', / *\\\n(?:\\?\n)*|\n\n+/); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - - Opal.const_set($nesting[0], 'SvgPreambleRx', new RegExp("" + "^" + ($$($nesting, 'CC_ALL')) + "*?(?=])")); - Opal.const_set($nesting[0], 'SvgStartTagRx', /^]*)?>/); - } else { - nil - }; - Opal.const_set($nesting[0], 'DimensionAttributeRx', new RegExp("" + "\\s(?:width|height|style)=([\"'])" + ($$($nesting, 'CC_ANY')) + "*?\\1")); - - Opal.def(self, '$initialize', $Html5Converter_initialize$1 = function $$initialize(backend, opts) { - var self = this, syntax = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - self.backend = backend; - if (opts['$[]']("htmlsyntax")['$==']("xml")) { - - syntax = "xml"; - self.xml_mode = true; - self.void_element_slash = "/"; - } else { - - syntax = "html"; - self.xml_mode = nil; - self.void_element_slash = ""; - }; - return self.$init_backend_traits($hash2(["basebackend", "filetype", "htmlsyntax", "outfilesuffix", "supports_templates"], {"basebackend": "html", "filetype": "html", "htmlsyntax": syntax, "outfilesuffix": ".html", "supports_templates": true})); - }, $Html5Converter_initialize$1.$$arity = -2); - - Opal.def(self, '$convert', $Html5Converter_convert$2 = function $$convert(node, transform, opts) { - var $iter = $Html5Converter_convert$2.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Html5Converter_convert$2.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if (transform == null) { - transform = node.$node_name(); - }; - - if (opts == null) { - opts = nil; - }; - if (transform['$==']("inline_quoted")) { - return self.$convert_inline_quoted(node) - } else if (transform['$==']("paragraph")) { - return self.$convert_paragraph(node) - } else if (transform['$==']("inline_anchor")) { - return self.$convert_inline_anchor(node) - } else if (transform['$==']("section")) { - return self.$convert_section(node) - } else if (transform['$==']("listing")) { - return self.$convert_listing(node) - } else if (transform['$==']("literal")) { - return self.$convert_literal(node) - } else if (transform['$==']("ulist")) { - return self.$convert_ulist(node) - } else if (transform['$==']("olist")) { - return self.$convert_olist(node) - } else if (transform['$==']("dlist")) { - return self.$convert_dlist(node) - } else if (transform['$==']("admonition")) { - return self.$convert_admonition(node) - } else if (transform['$==']("colist")) { - return self.$convert_colist(node) - } else if (transform['$==']("embedded")) { - return self.$convert_embedded(node) - } else if (transform['$==']("example")) { - return self.$convert_example(node) - } else if (transform['$==']("floating_title")) { - return self.$convert_floating_title(node) - } else if (transform['$==']("image")) { - return self.$convert_image(node) - } else if (transform['$==']("inline_break")) { - return self.$convert_inline_break(node) - } else if (transform['$==']("inline_button")) { - return self.$convert_inline_button(node) - } else if (transform['$==']("inline_callout")) { - return self.$convert_inline_callout(node) - } else if (transform['$==']("inline_footnote")) { - return self.$convert_inline_footnote(node) - } else if (transform['$==']("inline_image")) { - return self.$convert_inline_image(node) - } else if (transform['$==']("inline_indexterm")) { - return self.$convert_inline_indexterm(node) - } else if (transform['$==']("inline_kbd")) { - return self.$convert_inline_kbd(node) - } else if (transform['$==']("inline_menu")) { - return self.$convert_inline_menu(node) - } else if (transform['$==']("open")) { - return self.$convert_open(node) - } else if (transform['$==']("page_break")) { - return self.$convert_page_break(node) - } else if (transform['$==']("preamble")) { - return self.$convert_preamble(node) - } else if (transform['$==']("quote")) { - return self.$convert_quote(node) - } else if (transform['$==']("sidebar")) { - return self.$convert_sidebar(node) - } else if (transform['$==']("stem")) { - return self.$convert_stem(node) - } else if (transform['$==']("table")) { - return self.$convert_table(node) - } else if (transform['$==']("thematic_break")) { - return self.$convert_thematic_break(node) - } else if (transform['$==']("verse")) { - return self.$convert_verse(node) - } else if (transform['$==']("video")) { - return self.$convert_video(node) - } else if (transform['$==']("document")) { - return self.$convert_document(node) - } else if (transform['$==']("toc")) { - return self.$convert_toc(node) - } else if (transform['$==']("pass")) { - return self.$convert_pass(node) - } else if (transform['$==']("audio")) { - return self.$convert_audio(node) - } else { - return $send(self, Opal.find_super_dispatcher(self, 'convert', $Html5Converter_convert$2, false), $zuper, $iter) - }; - }, $Html5Converter_convert$2.$$arity = -2); - - Opal.def(self, '$convert_document', $Html5Converter_convert_document$3 = function $$convert_document(node) { - var $a, $b, $c, $$4, $$5, self = this, br = nil, slash = nil, asset_uri_scheme = nil, cdn_base_url = nil, linkcss = nil, max_width_attr = nil, result = nil, lang_attribute = nil, authors = nil, icon_href = nil, icon_type = nil, icon_ext = nil, webfonts = nil, iconfont_stylesheet = nil, syntax_hl = nil, syntax_hl_docinfo_head_idx = nil, docinfo_content = nil, id_attr = nil, sectioned = nil, classes = nil, details = nil, idx = nil, $writer = nil, eqnums_val = nil, eqnums_opt = nil; - - - br = "" + ""; - if ($truthy((asset_uri_scheme = node.$attr("asset-uri-scheme", "https"))['$empty?']())) { - } else { - asset_uri_scheme = "" + (asset_uri_scheme) + ":" - }; - cdn_base_url = "" + (asset_uri_scheme) + "//cdnjs.cloudflare.com/ajax/libs"; - linkcss = node['$attr?']("linkcss"); - max_width_attr = (function() {if ($truthy(node['$attr?']("max-width"))) { - return "" + " style=\"max-width: " + (node.$attr("max-width")) + ";\"" - } else { - return "" - }; return nil; })(); - result = [""]; - lang_attribute = (function() {if ($truthy(node['$attr?']("nolang"))) { - return "" - } else { - return "" + " lang=\"" + (node.$attr("lang", "en")) + "\"" - }; return nil; })(); - result['$<<']("" + ""); - result['$<<']("" + "\n" + "\n" + "\n" + "\n" + ""); - if ($truthy(node['$attr?']("app-name"))) { - result['$<<']("" + "")}; - if ($truthy(node['$attr?']("description"))) { - result['$<<']("" + "")}; - if ($truthy(node['$attr?']("keywords"))) { - result['$<<']("" + "")}; - if ($truthy(node['$attr?']("authors"))) { - result['$<<']("" + "")}; - if ($truthy(node['$attr?']("copyright"))) { - result['$<<']("" + "")}; - if ($truthy(node['$attr?']("favicon"))) { - - if ($truthy((icon_href = node.$attr("favicon"))['$empty?']())) { - - icon_href = "favicon.ico"; - icon_type = "image/x-icon"; - } else if ($truthy((icon_ext = $$($nesting, 'Helpers').$extname(icon_href, nil)))) { - icon_type = (function() {if (icon_ext['$=='](".ico")) { - return "image/x-icon" - } else { - return "" + "image/" + (icon_ext.$slice(1, icon_ext.$length())) - }; return nil; })() - } else { - icon_type = "image/x-icon" - }; - result['$<<']("" + "");}; - result['$<<']("" + "" + (node.$doctitle($hash2(["sanitize", "use_fallback"], {"sanitize": true, "use_fallback": true}))) + ""); - if ($truthy($$($nesting, 'DEFAULT_STYLESHEET_KEYS')['$include?'](node.$attr("stylesheet")))) { - - if ($truthy((webfonts = node.$attr("webfonts")))) { - result['$<<']("" + "")}; - if ($truthy(linkcss)) { - result['$<<']("" + "") - } else { - result['$<<']("" + "") - }; - } else if ($truthy(node['$attr?']("stylesheet"))) { - if ($truthy(linkcss)) { - result['$<<']("" + "") - } else { - result['$<<']("" + "") - }}; - if ($truthy(node['$attr?']("icons", "font"))) { - if ($truthy(node['$attr?']("iconfont-remote"))) { - result['$<<']("" + "") - } else { - - iconfont_stylesheet = "" + (node.$attr("iconfont-name", "font-awesome")) + ".css"; - result['$<<']("" + ""); - }}; - if ($truthy((syntax_hl = node.$syntax_highlighter()))) { - result['$<<']((syntax_hl_docinfo_head_idx = result.$size()))}; - if ($truthy((docinfo_content = node.$docinfo())['$empty?']())) { - } else { - result['$<<'](docinfo_content) - }; - result['$<<'](""); - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = (sectioned = node['$sections?']())) ? node['$attr?']("toc-class") : $c)) ? node['$attr?']("toc") : $b)) ? node['$attr?']("toc-placement", "auto") : $a))) { - classes = [node.$doctype(), node.$attr("toc-class"), "" + "toc-" + (node.$attr("toc-position", "header"))] - } else { - classes = [node.$doctype()] - }; - if ($truthy(node['$role?']())) { - classes['$<<'](node.$role())}; - result['$<<']("" + ""); - if ($truthy((docinfo_content = node.$docinfo("header"))['$empty?']())) { - } else { - result['$<<'](docinfo_content) - }; - if ($truthy(node.$noheader())) { - } else { - - result['$<<']("" + "
"); - if (node.$doctype()['$==']("manpage")) { - - result['$<<']("" + "

" + (node.$doctitle()) + " Manual Page

"); - if ($truthy(($truthy($a = ($truthy($b = sectioned) ? node['$attr?']("toc") : $b)) ? node['$attr?']("toc-placement", "auto") : $a))) { - result['$<<']("" + "
\n" + "
" + (node.$attr("toc-title")) + "
\n" + (node.$converter().$convert(node, "outline")) + "\n" + "
")}; - if ($truthy(node['$attr?']("manpurpose"))) { - result['$<<'](self.$generate_manname_section(node))}; - } else { - - if ($truthy(node['$header?']())) { - - if ($truthy(node.$notitle())) { - } else { - result['$<<']("" + "

" + (node.$header().$title()) + "

") - }; - details = []; - idx = 1; - $send(node.$authors(), 'each', [], ($$4 = function(author){var self = $$4.$$s || this; - - - - if (author == null) { - author = nil; - }; - details['$<<']("" + "" + (node.$sub_replacements(author.$name())) + "" + (br)); - if ($truthy(author.$email())) { - details['$<<']("" + "" + (node.$sub_macros(author.$email())) + "" + (br))}; - return (idx = $rb_plus(idx, 1));}, $$4.$$s = self, $$4.$$arity = 1, $$4)); - if ($truthy(node['$attr?']("revnumber"))) { - details['$<<']("" + "" + (($truthy($a = node.$attr("version-label")) ? $a : "").$downcase()) + " " + (node.$attr("revnumber")) + ((function() {if ($truthy(node['$attr?']("revdate"))) { - return "," - } else { - return "" - }; return nil; })()) + "")}; - if ($truthy(node['$attr?']("revdate"))) { - details['$<<']("" + "" + (node.$attr("revdate")) + "")}; - if ($truthy(node['$attr?']("revremark"))) { - details['$<<']("" + (br) + "" + (node.$attr("revremark")) + "")}; - if ($truthy(details['$empty?']())) { - } else { - - result['$<<']("
"); - result.$concat(details); - result['$<<']("
"); - };}; - if ($truthy(($truthy($a = ($truthy($b = sectioned) ? node['$attr?']("toc") : $b)) ? node['$attr?']("toc-placement", "auto") : $a))) { - result['$<<']("" + "
\n" + "
" + (node.$attr("toc-title")) + "
\n" + (node.$converter().$convert(node, "outline")) + "\n" + "
")}; - }; - result['$<<']("
"); - }; - result['$<<']("" + "
\n" + (node.$content()) + "\n" + "
"); - if ($truthy(($truthy($a = node['$footnotes?']()) ? node['$attr?']("nofootnotes")['$!']() : $a))) { - - result['$<<']("" + "
\n" + ""); - $send(node.$footnotes(), 'each', [], ($$5 = function(footnote){var self = $$5.$$s || this; - - - - if (footnote == null) { - footnote = nil; - }; - return result['$<<']("" + "
\n" + "" + (footnote.$index()) + ". " + (footnote.$text()) + "\n" + "
");}, $$5.$$s = self, $$5.$$arity = 1, $$5)); - result['$<<']("
");}; - if ($truthy(node.$nofooter())) { - } else { - - result['$<<']("" + "
"); - result['$<<']("
"); - if ($truthy(node['$attr?']("revnumber"))) { - result['$<<']("" + (node.$attr("version-label")) + " " + (node.$attr("revnumber")) + (br))}; - if ($truthy(($truthy($a = node['$attr?']("last-update-label")) ? node['$attr?']("reproducible")['$!']() : $a))) { - result['$<<']("" + (node.$attr("last-update-label")) + " " + (node.$attr("docdatetime")))}; - result['$<<']("
"); - result['$<<']("
"); - }; - if ($truthy(syntax_hl)) { - - if ($truthy(syntax_hl['$docinfo?']("head"))) { - - $writer = [syntax_hl_docinfo_head_idx, syntax_hl.$docinfo("head", node, $hash2(["cdn_base_url", "linkcss", "self_closing_tag_slash"], {"cdn_base_url": cdn_base_url, "linkcss": linkcss, "self_closing_tag_slash": slash}))]; - $send(result, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - result.$delete_at(syntax_hl_docinfo_head_idx) - }; - if ($truthy(syntax_hl['$docinfo?']("footer"))) { - result['$<<'](syntax_hl.$docinfo("footer", node, $hash2(["cdn_base_url", "linkcss", "self_closing_tag_slash"], {"cdn_base_url": cdn_base_url, "linkcss": linkcss, "self_closing_tag_slash": slash})))};}; - if ($truthy(node['$attr?']("stem"))) { - - eqnums_val = node.$attr("eqnums", "none"); - if ($truthy(eqnums_val['$empty?']())) { - eqnums_val = "AMS"}; - eqnums_opt = "" + " equationNumbers: { autoNumber: \"" + (eqnums_val) + "\" } "; - result['$<<']("" + "\n" + "");}; - if ($truthy((docinfo_content = node.$docinfo("footer"))['$empty?']())) { - } else { - result['$<<'](docinfo_content) - }; - result['$<<'](""); - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_document$3.$$arity = 1); - - Opal.def(self, '$convert_embedded', $Html5Converter_convert_embedded$6 = function $$convert_embedded(node) { - var $a, $b, $c, $$7, self = this, result = nil, id_attr = nil, toc_p = nil; - - - result = []; - if (node.$doctype()['$==']("manpage")) { - - if ($truthy(node.$notitle())) { - } else { - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - result['$<<']("" + "" + (node.$doctitle()) + " Manual Page"); - }; - if ($truthy(node['$attr?']("manpurpose"))) { - result['$<<'](self.$generate_manname_section(node))}; - } else if ($truthy(($truthy($a = node['$header?']()) ? node.$notitle()['$!']() : $a))) { - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - result['$<<']("" + "" + (node.$header().$title()) + "");}; - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = node['$sections?']()) ? node['$attr?']("toc") : $c)) ? (toc_p = node.$attr("toc-placement"))['$!=']("macro") : $b)) ? toc_p['$!=']("preamble") : $a))) { - result['$<<']("" + "
\n" + "
" + (node.$attr("toc-title")) + "
\n" + (node.$converter().$convert(node, "outline")) + "\n" + "
")}; - result['$<<'](node.$content()); - if ($truthy(($truthy($a = node['$footnotes?']()) ? node['$attr?']("nofootnotes")['$!']() : $a))) { - - result['$<<']("" + "
\n" + ""); - $send(node.$footnotes(), 'each', [], ($$7 = function(footnote){var self = $$7.$$s || this; - - - - if (footnote == null) { - footnote = nil; - }; - return result['$<<']("" + "
\n" + "" + (footnote.$index()) + ". " + (footnote.$text()) + "\n" + "
");}, $$7.$$s = self, $$7.$$arity = 1, $$7)); - result['$<<']("
");}; - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_embedded$6.$$arity = 1); - - Opal.def(self, '$convert_outline', $Html5Converter_convert_outline$8 = function $$convert_outline(node, opts) { - var $a, $b, $$9, self = this, sectnumlevels = nil, toclevels = nil, sections = nil, result = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy(node['$sections?']())) { - } else { - return nil - }; - sectnumlevels = ($truthy($a = opts['$[]']("sectnumlevels")) ? $a : ($truthy($b = node.$document().$attributes()['$[]']("sectnumlevels")) ? $b : 3).$to_i()); - toclevels = ($truthy($a = opts['$[]']("toclevels")) ? $a : ($truthy($b = node.$document().$attributes()['$[]']("toclevels")) ? $b : 2).$to_i()); - sections = node.$sections(); - result = ["" + "
    "]; - $send(sections, 'each', [], ($$9 = function(section){var self = $$9.$$s || this, $c, slevel = nil, stitle = nil, signifier = nil, child_toc_level = nil; - - - - if (section == null) { - section = nil; - }; - slevel = section.$level(); - if ($truthy(section.$caption())) { - stitle = section.$captioned_title() - } else if ($truthy(($truthy($c = section.$numbered()) ? $rb_le(slevel, sectnumlevels) : $c))) { - if ($truthy(($truthy($c = $rb_lt(slevel, 2)) ? node.$document().$doctype()['$==']("book") : $c))) { - if (section.$sectname()['$==']("chapter")) { - stitle = "" + ((function() {if ($truthy((signifier = node.$document().$attributes()['$[]']("chapter-signifier")))) { - return "" + (signifier) + " " - } else { - return "" - }; return nil; })()) + (section.$sectnum()) + " " + (section.$title()) - } else if (section.$sectname()['$==']("part")) { - stitle = "" + ((function() {if ($truthy((signifier = node.$document().$attributes()['$[]']("part-signifier")))) { - return "" + (signifier) + " " - } else { - return "" - }; return nil; })()) + (section.$sectnum(nil, ":")) + " " + (section.$title()) - } else { - stitle = "" + (section.$sectnum()) + " " + (section.$title()) - } - } else { - stitle = "" + (section.$sectnum()) + " " + (section.$title()) - } - } else { - stitle = section.$title() - }; - if ($truthy(stitle['$include?']("" + (stitle) + ""); - result['$<<'](child_toc_level); - return result['$<<'](""); - } else { - return result['$<<']("" + "
  • " + (stitle) + "
  • ") - };}, $$9.$$s = self, $$9.$$arity = 1, $$9)); - result['$<<']("
"); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_outline$8.$$arity = -2); - - Opal.def(self, '$convert_section', $Html5Converter_convert_section$10 = function $$convert_section(node) { - var $a, $b, self = this, doc_attrs = nil, level = nil, title = nil, signifier = nil, id_attr = nil, id = nil, role = nil; - - - doc_attrs = node.$document().$attributes(); - level = node.$level(); - if ($truthy(node.$caption())) { - title = node.$captioned_title() - } else if ($truthy(($truthy($a = node.$numbered()) ? $rb_le(level, ($truthy($b = doc_attrs['$[]']("sectnumlevels")) ? $b : 3).$to_i()) : $a))) { - if ($truthy(($truthy($a = $rb_lt(level, 2)) ? node.$document().$doctype()['$==']("book") : $a))) { - if (node.$sectname()['$==']("chapter")) { - title = "" + ((function() {if ($truthy((signifier = doc_attrs['$[]']("chapter-signifier")))) { - return "" + (signifier) + " " - } else { - return "" - }; return nil; })()) + (node.$sectnum()) + " " + (node.$title()) - } else if (node.$sectname()['$==']("part")) { - title = "" + ((function() {if ($truthy((signifier = doc_attrs['$[]']("part-signifier")))) { - return "" + (signifier) + " " - } else { - return "" - }; return nil; })()) + (node.$sectnum(nil, ":")) + " " + (node.$title()) - } else { - title = "" + (node.$sectnum()) + " " + (node.$title()) - } - } else { - title = "" + (node.$sectnum()) + " " + (node.$title()) - } - } else { - title = node.$title() - }; - if ($truthy(node.$id())) { - - id_attr = "" + " id=\"" + ((id = node.$id())) + "\""; - if ($truthy(doc_attrs['$[]']("sectlinks"))) { - title = "" + "" + (title) + ""}; - if ($truthy(doc_attrs['$[]']("sectanchors"))) { - if (doc_attrs['$[]']("sectanchors")['$==']("after")) { - title = "" + (title) + "" - } else { - title = "" + "" + (title) - }}; - } else { - id_attr = "" - }; - if (level['$=='](0)) { - return "" + "" + (title) + "\n" + (node.$content()) - } else { - return "" + "
\n" + "" + (title) + "\n" + ((function() {if (level['$=='](1)) { - return "" + "
\n" + (node.$content()) + "\n" + "
" - } else { - return node.$content() - }; return nil; })()) + "\n" + "
" - }; - }, $Html5Converter_convert_section$10.$$arity = 1); - - Opal.def(self, '$convert_admonition', $Html5Converter_convert_admonition$11 = function $$convert_admonition(node) { - var $a, self = this, id_attr = nil, name = nil, title_element = nil, label = nil, role = nil; - - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - name = node.$attr("name"); - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
" + (node.$title()) + "
\n" - } else { - return "" - }; return nil; })(); - if ($truthy(node.$document()['$attr?']("icons"))) { - if ($truthy(($truthy($a = node.$document()['$attr?']("icons", "font")) ? node['$attr?']("icon")['$!']() : $a))) { - label = "" + "" - } else { - label = "" + "\""" - } - } else { - label = "" + "
" + (node.$attr("textlabel")) + "
" - }; - return "" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "
\n" + (label) + "\n" + "\n" + (title_element) + (node.$content()) + "\n" + "
\n" + ""; - }, $Html5Converter_convert_admonition$11.$$arity = 1); - - Opal.def(self, '$convert_audio', $Html5Converter_convert_audio$12 = function $$convert_audio(node) { - var $a, self = this, xml = nil, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, start_t = nil, end_t = nil, time_anchor = nil; - - - xml = self.xml_mode; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["audioblock", node.$role()].$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
" + (node.$title()) + "
\n" - } else { - return "" - }; return nil; })(); - start_t = node.$attr("start"); - end_t = node.$attr("end"); - time_anchor = (function() {if ($truthy(($truthy($a = start_t) ? $a : end_t))) { - return "" + "#t=" + (($truthy($a = start_t) ? $a : "")) + ((function() {if ($truthy(end_t)) { - return "" + "," + (end_t) - } else { - return "" - }; return nil; })()) - } else { - return "" - }; return nil; })(); - return "" + "\n" + (title_element) + "
\n" + "\n" + "
\n" + ""; - }, $Html5Converter_convert_audio$12.$$arity = 1); - - Opal.def(self, '$convert_colist', $Html5Converter_convert_colist$13 = function $$convert_colist(node) { - var $a, $$14, $$15, self = this, result = nil, id_attribute = nil, classes = nil, class_attribute = nil, font_icons = nil, num = nil; - - - result = []; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["colist", node.$style(), node.$role()].$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - result['$<<']("" + ""); - if ($truthy(node['$title?']())) { - result['$<<']("" + "
" + (node.$title()) + "
")}; - if ($truthy(node.$document()['$attr?']("icons"))) { - - result['$<<'](""); - $a = [node.$document()['$attr?']("icons", "font"), 0], (font_icons = $a[0]), (num = $a[1]), $a; - $send(node.$items(), 'each', [], ($$14 = function(item){var self = $$14.$$s || this, num_label = nil; - if (self.void_element_slash == null) self.void_element_slash = nil; - - - - if (item == null) { - item = nil; - }; - num = $rb_plus(num, 1); - if ($truthy(font_icons)) { - num_label = "" + "" + (num) + "" - } else { - num_label = "" + "\""" - }; - return result['$<<']("" + "\n" + "\n" + "\n" + "");}, $$14.$$s = self, $$14.$$arity = 1, $$14)); - result['$<<']("
" + (num_label) + "" + (item.$text()) + ((function() {if ($truthy(item['$blocks?']())) { - return $rb_plus($$($nesting, 'LF'), item.$content()) - } else { - return "" - }; return nil; })()) + "
"); - } else { - - result['$<<']("
    "); - $send(node.$items(), 'each', [], ($$15 = function(item){var self = $$15.$$s || this; - - - - if (item == null) { - item = nil; - }; - return result['$<<']("" + "
  1. \n" + "

    " + (item.$text()) + "

    " + ((function() {if ($truthy(item['$blocks?']())) { - return $rb_plus($$($nesting, 'LF'), item.$content()) - } else { - return "" - }; return nil; })()) + "\n" + "
  2. ");}, $$15.$$s = self, $$15.$$arity = 1, $$15)); - result['$<<']("
"); - }; - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_colist$13.$$arity = 1); - - Opal.def(self, '$convert_dlist', $Html5Converter_convert_dlist$16 = function $$convert_dlist(node) { - var $$17, $a, $$19, $$21, self = this, result = nil, id_attribute = nil, classes = nil, $case = nil, class_attribute = nil, slash = nil, col_style_attribute = nil, dt_style_attribute = nil; - - - result = []; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = (function() {$case = node.$style(); - if ("qanda"['$===']($case)) {return ["qlist", "qanda", node.$role()]} - else if ("horizontal"['$===']($case)) {return ["hdlist", node.$role()]} - else {return ["dlist", node.$style(), node.$role()]}})().$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - result['$<<']("" + ""); - if ($truthy(node['$title?']())) { - result['$<<']("" + "
" + (node.$title()) + "
")}; - $case = node.$style(); - if ("qanda"['$===']($case)) { - result['$<<']("
    "); - $send(node.$items(), 'each', [], ($$17 = function(terms, dd){var self = $$17.$$s || this, $$18; - - - - if (terms == null) { - terms = nil; - }; - - if (dd == null) { - dd = nil; - }; - result['$<<']("
  1. "); - $send(terms, 'each', [], ($$18 = function(dt){var self = $$18.$$s || this; - - - - if (dt == null) { - dt = nil; - }; - return result['$<<']("" + "

    " + (dt.$text()) + "

    ");}, $$18.$$s = self, $$18.$$arity = 1, $$18)); - if ($truthy(dd)) { - - if ($truthy(dd['$text?']())) { - result['$<<']("" + "

    " + (dd.$text()) + "

    ")}; - if ($truthy(dd['$blocks?']())) { - result['$<<'](dd.$content())};}; - return result['$<<']("
  2. ");}, $$17.$$s = self, $$17.$$arity = 2, $$17)); - result['$<<']("
");} - else if ("horizontal"['$===']($case)) { - slash = self.void_element_slash; - result['$<<'](""); - if ($truthy(($truthy($a = node['$attr?']("labelwidth")) ? $a : node['$attr?']("itemwidth")))) { - - result['$<<'](""); - col_style_attribute = (function() {if ($truthy(node['$attr?']("labelwidth"))) { - return "" + " style=\"width: " + (node.$attr("labelwidth").$chomp("%")) + "%;\"" - } else { - return "" - }; return nil; })(); - result['$<<']("" + ""); - col_style_attribute = (function() {if ($truthy(node['$attr?']("itemwidth"))) { - return "" + " style=\"width: " + (node.$attr("itemwidth").$chomp("%")) + "%;\"" - } else { - return "" - }; return nil; })(); - result['$<<']("" + ""); - result['$<<']("");}; - $send(node.$items(), 'each', [], ($$19 = function(terms, dd){var self = $$19.$$s || this, $$20, first_term = nil; - - - - if (terms == null) { - terms = nil; - }; - - if (dd == null) { - dd = nil; - }; - result['$<<'](""); - result['$<<']("" + ""); - result['$<<'](""); - return result['$<<']("");}, $$19.$$s = self, $$19.$$arity = 2, $$19)); - result['$<<']("
"); - first_term = true; - $send(terms, 'each', [], ($$20 = function(dt){var self = $$20.$$s || this; - - - - if (dt == null) { - dt = nil; - }; - if ($truthy(first_term)) { - } else { - result['$<<']("" + "") - }; - result['$<<'](dt.$text()); - return (first_term = nil);}, $$20.$$s = self, $$20.$$arity = 1, $$20)); - result['$<<'](""); - if ($truthy(dd)) { - - if ($truthy(dd['$text?']())) { - result['$<<']("" + "

" + (dd.$text()) + "

")}; - if ($truthy(dd['$blocks?']())) { - result['$<<'](dd.$content())};}; - result['$<<']("
");} - else { - result['$<<']("
"); - dt_style_attribute = (function() {if ($truthy(node.$style())) { - return "" - } else { - return " class=\"hdlist1\"" - }; return nil; })(); - $send(node.$items(), 'each', [], ($$21 = function(terms, dd){var self = $$21.$$s || this, $$22; - - - - if (terms == null) { - terms = nil; - }; - - if (dd == null) { - dd = nil; - }; - $send(terms, 'each', [], ($$22 = function(dt){var self = $$22.$$s || this; - - - - if (dt == null) { - dt = nil; - }; - return result['$<<']("" + "" + (dt.$text()) + "");}, $$22.$$s = self, $$22.$$arity = 1, $$22)); - if ($truthy(dd)) { - - result['$<<']("
"); - if ($truthy(dd['$text?']())) { - result['$<<']("" + "

" + (dd.$text()) + "

")}; - if ($truthy(dd['$blocks?']())) { - result['$<<'](dd.$content())}; - return result['$<<']("
"); - } else { - return nil - };}, $$21.$$s = self, $$21.$$arity = 2, $$21)); - result['$<<']("
");}; - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_dlist$16.$$arity = 1); - - Opal.def(self, '$convert_example', $Html5Converter_convert_example$23 = function $$convert_example(node) { - var self = this, id_attribute = nil, class_attribute = nil, summary_element = nil, title_element = nil, role = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - if ($truthy(node['$option?']("collapsible"))) { - - class_attribute = (function() {if ($truthy(node.$role())) { - return "" + " class=\"" + (node.$role()) + "\"" - } else { - return "" - }; return nil; })(); - summary_element = (function() {if ($truthy(node['$title?']())) { - return "" + "" + (node.$title()) + "" - } else { - return "Details" - }; return nil; })(); - return "" + "\n" + (summary_element) + "\n" + "
\n" + (node.$content()) + "\n" + "
\n" + ""; - } else { - - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
" + (node.$captioned_title()) + "
\n" - } else { - return "" - }; return nil; })(); - return "" + "\n" + (title_element) + "
\n" + (node.$content()) + "\n" + "
\n" + ""; - }; - }, $Html5Converter_convert_example$23.$$arity = 1); - - Opal.def(self, '$convert_floating_title', $Html5Converter_convert_floating_title$24 = function $$convert_floating_title(node) { - var self = this, tag_name = nil, id_attribute = nil, classes = nil; - - - tag_name = "" + "h" + ($rb_plus(node.$level(), 1)); - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = [node.$style(), node.$role()].$compact(); - return "" + "<" + (tag_name) + (id_attribute) + " class=\"" + (classes.$join(" ")) + "\">" + (node.$title()) + ""; - }, $Html5Converter_convert_floating_title$24.$$arity = 1); - - Opal.def(self, '$convert_image', $Html5Converter_convert_image$25 = function $$convert_image(node) { - var $a, $b, $c, self = this, target = nil, width_attr = nil, height_attr = nil, svg = nil, obj = nil, img = nil, fallback = nil, id_attr = nil, classes = nil, class_attr = nil, title_el = nil; - - - target = node.$attr("target"); - width_attr = (function() {if ($truthy(node['$attr?']("width"))) { - return "" + " width=\"" + (node.$attr("width")) + "\"" - } else { - return "" - }; return nil; })(); - height_attr = (function() {if ($truthy(node['$attr?']("height"))) { - return "" + " height=\"" + (node.$attr("height")) + "\"" - } else { - return "" - }; return nil; })(); - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = node['$attr?']("format", "svg")) ? $c : target['$include?'](".svg"))) ? $rb_lt(node.$document().$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $b)) ? ($truthy($b = (svg = node['$option?']("inline"))) ? $b : (obj = node['$option?']("interactive"))) : $a))) { - if ($truthy(svg)) { - img = ($truthy($a = self.$read_svg_contents(node, target)) ? $a : "" + "" + (node.$alt()) + "") - } else if ($truthy(obj)) { - - fallback = (function() {if ($truthy(node['$attr?']("fallback"))) { - return "" + "\""" - } else { - return "" + "" + (node.$alt()) + "" - }; return nil; })(); - img = "" + "" + (fallback) + "";}}; - img = ($truthy($a = img) ? $a : "" + "\"""); - if ($truthy(node['$attr?']("link"))) { - img = "" + "" + (img) + ""}; - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["imageblock"]; - if ($truthy(node['$attr?']("float"))) { - classes['$<<'](node.$attr("float"))}; - if ($truthy(node['$attr?']("align"))) { - classes['$<<']("" + "text-" + (node.$attr("align")))}; - if ($truthy(node.$role())) { - classes['$<<'](node.$role())}; - class_attr = "" + " class=\"" + (classes.$join(" ")) + "\""; - title_el = (function() {if ($truthy(node['$title?']())) { - return "" + "\n
" + (node.$captioned_title()) + "
" - } else { - return "" - }; return nil; })(); - return "" + "\n" + "
\n" + (img) + "\n" + "
" + (title_el) + "\n" + ""; - }, $Html5Converter_convert_image$25.$$arity = 1); - - Opal.def(self, '$convert_listing', $Html5Converter_convert_listing$26 = function $$convert_listing(node) { - var $a, self = this, nowrap = nil, lang = nil, syntax_hl = nil, opts = nil, doc_attrs = nil, $writer = nil, pre_open = nil, pre_close = nil, id_attribute = nil, title_element = nil, role = nil; - - - nowrap = ($truthy($a = node['$option?']("nowrap")) ? $a : node.$document()['$attr?']("prewrap")['$!']()); - if (node.$style()['$==']("source")) { - - lang = node.$attr("language"); - if ($truthy((syntax_hl = node.$document().$syntax_highlighter()))) { - - opts = (function() {if ($truthy(syntax_hl['$highlight?']())) { - return $hash2(["css_mode", "style"], {"css_mode": ($truthy($a = (doc_attrs = node.$document().$attributes())['$[]']("" + (syntax_hl.$name()) + "-css")) ? $a : "class").$to_sym(), "style": doc_attrs['$[]']("" + (syntax_hl.$name()) + "-style")}) - } else { - return $hash2([], {}) - }; return nil; })(); - - $writer = ["nowrap", nowrap]; - $send(opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - - pre_open = "" + "
";
-            pre_close = "
"; - }; - } else { - - pre_open = "" + ""; - pre_close = ""; - }; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
" + (node.$captioned_title()) + "
\n" - } else { - return "" - }; return nil; })(); - return "" + "\n" + (title_element) + "
\n" + ((function() {if ($truthy(syntax_hl)) { - - return syntax_hl.$format(node, lang, opts); - } else { - return $rb_plus($rb_plus(pre_open, ($truthy($a = node.$content()) ? $a : "")), pre_close) - }; return nil; })()) + "\n" + "
\n" + ""; - }, $Html5Converter_convert_listing$26.$$arity = 1); - - Opal.def(self, '$convert_literal', $Html5Converter_convert_literal$27 = function $$convert_literal(node) { - var $a, self = this, id_attribute = nil, title_element = nil, nowrap = nil, role = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
" + (node.$title()) + "
\n" - } else { - return "" - }; return nil; })(); - nowrap = ($truthy($a = node.$document()['$attr?']("prewrap")['$!']()) ? $a : node['$option?']("nowrap")); - return "" + "\n" + (title_element) + "
\n" + "" + (node.$content()) + "\n" + "
\n" + ""; - }, $Html5Converter_convert_literal$27.$$arity = 1); - - Opal.def(self, '$convert_stem', $Html5Converter_convert_stem$28 = function $$convert_stem(node) { - var $a, $b, $$29, self = this, id_attribute = nil, title_element = nil, style = nil, open = nil, close = nil, equation = nil, br = nil, role = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
" + (node.$title()) + "
\n" - } else { - return "" - }; return nil; })(); - $b = $$($nesting, 'BLOCK_MATH_DELIMITERS')['$[]']((style = node.$style().$to_sym())), $a = Opal.to_ary($b), (open = ($a[0] == null ? nil : $a[0])), (close = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy((equation = node.$content()))) { - - if ($truthy((($a = style['$==']("asciimath")) ? equation['$include?']($$($nesting, 'LF')) : style['$==']("asciimath")))) { - - br = "" + ($$($nesting, 'LF')) + ""; - equation = $send(equation, 'gsub', [$$($nesting, 'StemBreakRx')], ($$29 = function(){var self = $$29.$$s || this, $c; - - return "" + (close) + ($rb_times(br, $rb_minus((($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$count($$($nesting, 'LF')), 1))) + ($$($nesting, 'LF')) + (open)}, $$29.$$s = self, $$29.$$arity = 0, $$29));}; - if ($truthy(($truthy($a = equation['$start_with?'](open)) ? equation['$end_with?'](close) : $a))) { - } else { - equation = "" + (open) + (equation) + (close) - }; - } else { - equation = "" - }; - return "" + "\n" + (title_element) + "
\n" + (equation) + "\n" + "
\n" + ""; - }, $Html5Converter_convert_stem$28.$$arity = 1); - - Opal.def(self, '$convert_olist', $Html5Converter_convert_olist$30 = function $$convert_olist(node) { - var $$31, self = this, result = nil, id_attribute = nil, classes = nil, class_attribute = nil, type_attribute = nil, keyword = nil, start_attribute = nil, reversed_attribute = nil; - - - result = []; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["olist", node.$style(), node.$role()].$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - result['$<<']("" + ""); - if ($truthy(node['$title?']())) { - result['$<<']("" + "
" + (node.$title()) + "
")}; - type_attribute = (function() {if ($truthy((keyword = node.$list_marker_keyword()))) { - return "" + " type=\"" + (keyword) + "\"" - } else { - return "" - }; return nil; })(); - start_attribute = (function() {if ($truthy(node['$attr?']("start"))) { - return "" + " start=\"" + (node.$attr("start")) + "\"" - } else { - return "" - }; return nil; })(); - reversed_attribute = (function() {if ($truthy(node['$option?']("reversed"))) { - - return self.$append_boolean_attribute("reversed", self.xml_mode); - } else { - return "" - }; return nil; })(); - result['$<<']("" + "
    "); - $send(node.$items(), 'each', [], ($$31 = function(item){var self = $$31.$$s || this; - - - - if (item == null) { - item = nil; - }; - if ($truthy(item.$id())) { - result['$<<']("" + "
  1. ") - } else if ($truthy(item.$role())) { - result['$<<']("" + "
  2. ") - } else { - result['$<<']("
  3. ") - }; - result['$<<']("" + "

    " + (item.$text()) + "

    "); - if ($truthy(item['$blocks?']())) { - result['$<<'](item.$content())}; - return result['$<<']("
  4. ");}, $$31.$$s = self, $$31.$$arity = 1, $$31)); - result['$<<']("
"); - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_olist$30.$$arity = 1); - - Opal.def(self, '$convert_open', $Html5Converter_convert_open$32 = function $$convert_open(node) { - var $a, $b, $c, self = this, style = nil, id_attr = nil, title_el = nil, role = nil; - - if ((style = node.$style())['$==']("abstract")) { - if ($truthy((($a = node.$parent()['$=='](node.$document())) ? node.$document().$doctype()['$==']("book") : node.$parent()['$=='](node.$document())))) { - - self.$logger().$warn("abstract block cannot be used in a document without a title when doctype is book. Excluding block content."); - return ""; - } else { - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_el = (function() {if ($truthy(node['$title?']())) { - return "" + "
" + (node.$title()) + "
\n" - } else { - return "" - }; return nil; })(); - return "" + "\n" + (title_el) + "
\n" + (node.$content()) + "\n" + "
\n" + ""; - } - } else if ($truthy((($a = style['$==']("partintro")) ? ($truthy($b = ($truthy($c = $rb_gt(node.$level(), 0)) ? $c : node.$parent().$context()['$!=']("section"))) ? $b : node.$document().$doctype()['$!=']("book")) : style['$==']("partintro")))) { - - self.$logger().$error("partintro block can only be used when doctype is book and must be a child of a book part. Excluding block content."); - return ""; - } else { - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_el = (function() {if ($truthy(node['$title?']())) { - return "" + "
" + (node.$title()) + "
\n" - } else { - return "" - }; return nil; })(); - return "" + "" - }, $Html5Converter_convert_page_break$33.$$arity = 1); - - Opal.def(self, '$convert_paragraph', $Html5Converter_convert_paragraph$34 = function $$convert_paragraph(node) { - var self = this, attributes = nil; - - - if ($truthy(node.$role())) { - attributes = "" + ((function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })()) + " class=\"paragraph " + (node.$role()) + "\"" - } else if ($truthy(node.$id())) { - attributes = "" + " id=\"" + (node.$id()) + "\" class=\"paragraph\"" - } else { - attributes = " class=\"paragraph\"" - }; - if ($truthy(node['$title?']())) { - return "" + "\n" + "
" + (node.$title()) + "
\n" + "

" + (node.$content()) + "

\n" + "" - } else { - return "" + "\n" + "

" + (node.$content()) + "

\n" + "" - }; - }, $Html5Converter_convert_paragraph$34.$$arity = 1); - Opal.alias(self, "convert_pass", "content_only"); - - Opal.def(self, '$convert_preamble', $Html5Converter_convert_preamble$35 = function $$convert_preamble(node) { - var $a, $b, self = this, doc = nil, toc = nil; - - - if ($truthy(($truthy($a = ($truthy($b = (doc = node.$document())['$attr?']("toc-placement", "preamble")) ? doc['$sections?']() : $b)) ? doc['$attr?']("toc") : $a))) { - toc = "" + "\n" + "
\n" + "
" + (doc.$attr("toc-title")) + "
\n" + (doc.$converter().$convert(doc, "outline")) + "\n" + "
" - } else { - toc = "" - }; - return "" + "
\n" + "
\n" + (node.$content()) + "\n" + "
" + (toc) + "\n" + "
"; - }, $Html5Converter_convert_preamble$35.$$arity = 1); - - Opal.def(self, '$convert_quote', $Html5Converter_convert_quote$36 = function $$convert_quote(node) { - var $a, self = this, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, attribution = nil, citetitle = nil, cite_element = nil, attribution_text = nil, attribution_element = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["quoteblock", node.$role()].$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "\n
" + (node.$title()) + "
" - } else { - return "" - }; return nil; })(); - attribution = (function() {if ($truthy(node['$attr?']("attribution"))) { - - return node.$attr("attribution"); - } else { - return nil - }; return nil; })(); - citetitle = (function() {if ($truthy(node['$attr?']("citetitle"))) { - - return node.$attr("citetitle"); - } else { - return nil - }; return nil; })(); - if ($truthy(($truthy($a = attribution) ? $a : citetitle))) { - - cite_element = (function() {if ($truthy(citetitle)) { - return "" + "" + (citetitle) + "" - } else { - return "" - }; return nil; })(); - attribution_text = (function() {if ($truthy(attribution)) { - return "" + "— " + (attribution) + ((function() {if ($truthy(citetitle)) { - return "" + "\n" - } else { - return "" - }; return nil; })()) - } else { - return "" - }; return nil; })(); - attribution_element = "" + "\n
\n" + (attribution_text) + (cite_element) + "\n
"; - } else { - attribution_element = "" - }; - return "" + "" + (title_element) + "\n" + "
\n" + (node.$content()) + "\n" + "
" + (attribution_element) + "\n" + ""; - }, $Html5Converter_convert_quote$36.$$arity = 1); - - Opal.def(self, '$convert_thematic_break', $Html5Converter_convert_thematic_break$37 = function $$convert_thematic_break(node) { - var self = this; - - return "" + "" - }, $Html5Converter_convert_thematic_break$37.$$arity = 1); - - Opal.def(self, '$convert_sidebar', $Html5Converter_convert_sidebar$38 = function $$convert_sidebar(node) { - var self = this, id_attribute = nil, title_element = nil, role = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
" + (node.$title()) + "
\n" - } else { - return "" - }; return nil; })(); - return "" + "\n" + "
\n" + (title_element) + (node.$content()) + "\n" + "
\n" + ""; - }, $Html5Converter_convert_sidebar$38.$$arity = 1); - - Opal.def(self, '$convert_table', $Html5Converter_convert_table$39 = function $$convert_table(node) { - var $a, $$40, $$41, self = this, result = nil, id_attribute = nil, frame = nil, classes = nil, stripes = nil, styles = nil, autowidth = nil, tablewidth = nil, role = nil, class_attribute = nil, style_attribute = nil, slash = nil; - - - result = []; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - if ((frame = node.$attr("frame", "all", "table-frame"))['$==']("topbot")) { - frame = "ends"}; - classes = ["tableblock", "" + "frame-" + (frame), "" + "grid-" + (node.$attr("grid", "all", "table-grid"))]; - if ($truthy((stripes = node.$attr("stripes", nil, "table-stripes")))) { - classes['$<<']("" + "stripes-" + (stripes))}; - styles = []; - if ($truthy(($truthy($a = (autowidth = node['$option?']("autowidth"))) ? node['$attr?']("width")['$!']() : $a))) { - classes['$<<']("fit-content") - } else if ((tablewidth = node.$attr("tablepcwidth"))['$=='](100)) { - classes['$<<']("stretch") - } else { - styles['$<<']("" + "width: " + (tablewidth) + "%;") - }; - if ($truthy(node['$attr?']("float"))) { - classes['$<<'](node.$attr("float"))}; - if ($truthy((role = node.$role()))) { - classes['$<<'](role)}; - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - style_attribute = (function() {if ($truthy(styles['$empty?']())) { - return "" - } else { - return "" + " style=\"" + (styles.$join(" ")) + "\"" - }; return nil; })(); - result['$<<']("" + ""); - if ($truthy(node['$title?']())) { - result['$<<']("" + "" + (node.$captioned_title()) + "")}; - if ($truthy($rb_gt(node.$attr("rowcount"), 0))) { - - slash = self.void_element_slash; - result['$<<'](""); - if ($truthy(autowidth)) { - result = $rb_plus(result, $$($nesting, 'Array').$new(node.$columns().$size(), "" + "")) - } else { - $send(node.$columns(), 'each', [], ($$40 = function(col){var self = $$40.$$s || this; - - - - if (col == null) { - col = nil; - }; - return result['$<<']((function() {if ($truthy(col['$option?']("autowidth"))) { - return "" + "" - } else { - return "" + "" - }; return nil; })());}, $$40.$$s = self, $$40.$$arity = 1, $$40)) - }; - result['$<<'](""); - $send(node.$rows().$to_h(), 'each', [], ($$41 = function(tsec, rows){var self = $$41.$$s || this, $$42; - - - - if (tsec == null) { - tsec = nil; - }; - - if (rows == null) { - rows = nil; - }; - if ($truthy(rows['$empty?']())) { - return nil;}; - result['$<<']("" + ""); - $send(rows, 'each', [], ($$42 = function(row){var self = $$42.$$s || this, $$43; - - - - if (row == null) { - row = nil; - }; - result['$<<'](""); - $send(row, 'each', [], ($$43 = function(cell){var self = $$43.$$s || this, $b, cell_content = nil, $case = nil, cell_tag_name = nil, cell_class_attribute = nil, cell_colspan_attribute = nil, cell_rowspan_attribute = nil, cell_style_attribute = nil; - - - - if (cell == null) { - cell = nil; - }; - if (tsec['$==']("head")) { - cell_content = cell.$text() - } else { - $case = cell.$style(); - if ("asciidoc"['$===']($case)) {cell_content = "" + "
" + (cell.$content()) + "
"} - else if ("literal"['$===']($case)) {cell_content = "" + "
" + (cell.$text()) + "
"} - else {cell_content = (function() {if ($truthy((cell_content = cell.$content())['$empty?']())) { - return "" - } else { - return "" + "

" + (cell_content.$join("" + "

\n" + "

")) + "

" - }; return nil; })()} - }; - cell_tag_name = (function() {if ($truthy(($truthy($b = tsec['$==']("head")) ? $b : cell.$style()['$==']("header")))) { - return "th" - } else { - return "td" - }; return nil; })(); - cell_class_attribute = "" + " class=\"tableblock halign-" + (cell.$attr("halign")) + " valign-" + (cell.$attr("valign")) + "\""; - cell_colspan_attribute = (function() {if ($truthy(cell.$colspan())) { - return "" + " colspan=\"" + (cell.$colspan()) + "\"" - } else { - return "" - }; return nil; })(); - cell_rowspan_attribute = (function() {if ($truthy(cell.$rowspan())) { - return "" + " rowspan=\"" + (cell.$rowspan()) + "\"" - } else { - return "" - }; return nil; })(); - cell_style_attribute = (function() {if ($truthy(node.$document()['$attr?']("cellbgcolor"))) { - return "" + " style=\"background-color: " + (node.$document().$attr("cellbgcolor")) + ";\"" - } else { - return "" - }; return nil; })(); - return result['$<<']("" + "<" + (cell_tag_name) + (cell_class_attribute) + (cell_colspan_attribute) + (cell_rowspan_attribute) + (cell_style_attribute) + ">" + (cell_content) + "");}, $$43.$$s = self, $$43.$$arity = 1, $$43)); - return result['$<<']("");}, $$42.$$s = self, $$42.$$arity = 1, $$42)); - return result['$<<']("" + "
");}, $$41.$$s = self, $$41.$$arity = 2, $$41));}; - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_table$39.$$arity = 1); - - Opal.def(self, '$convert_toc', $Html5Converter_convert_toc$44 = function $$convert_toc(node) { - var $a, $b, self = this, doc = nil, id_attr = nil, title_id_attr = nil, title = nil, levels = nil, role = nil; - - - if ($truthy(($truthy($a = ($truthy($b = (doc = node.$document())['$attr?']("toc-placement", "macro")) ? doc['$sections?']() : $b)) ? doc['$attr?']("toc") : $a))) { - } else { - return "" - }; - if ($truthy(node.$id())) { - - id_attr = "" + " id=\"" + (node.$id()) + "\""; - title_id_attr = "" + " id=\"" + (node.$id()) + "title\""; - } else { - - id_attr = " id=\"toc\""; - title_id_attr = " id=\"toctitle\""; - }; - title = (function() {if ($truthy(node['$title?']())) { - return node.$title() - } else { - - return doc.$attr("toc-title"); - }; return nil; })(); - levels = (function() {if ($truthy(node['$attr?']("levels"))) { - return node.$attr("levels").$to_i() - } else { - return nil - }; return nil; })(); - role = (function() {if ($truthy(node['$role?']())) { - return node.$role() - } else { - - return doc.$attr("toc-class", "toc"); - }; return nil; })(); - return "" + "\n" + "" + (title) + "\n" + (doc.$converter().$convert(doc, "outline", $hash2(["toclevels"], {"toclevels": levels}))) + "\n" + ""; - }, $Html5Converter_convert_toc$44.$$arity = 1); - - Opal.def(self, '$convert_ulist', $Html5Converter_convert_ulist$45 = function $$convert_ulist(node) { - var $$46, self = this, result = nil, id_attribute = nil, div_classes = nil, marker_checked = nil, marker_unchecked = nil, checklist = nil, ul_class_attribute = nil; - - - result = []; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - div_classes = ["ulist", node.$style(), node.$role()].$compact(); - marker_checked = (marker_unchecked = ""); - if ($truthy((checklist = node['$option?']("checklist")))) { - - div_classes.$unshift(div_classes.$shift(), "checklist"); - ul_class_attribute = " class=\"checklist\""; - if ($truthy(node['$option?']("interactive"))) { - if ($truthy(self.xml_mode)) { - - marker_checked = " "; - marker_unchecked = " "; - } else { - - marker_checked = " "; - marker_unchecked = " "; - } - } else if ($truthy(node.$document()['$attr?']("icons", "font"))) { - - marker_checked = " "; - marker_unchecked = " "; - } else { - - marker_checked = "✓ "; - marker_unchecked = "❏ "; - }; - } else { - ul_class_attribute = (function() {if ($truthy(node.$style())) { - return "" + " class=\"" + (node.$style()) + "\"" - } else { - return "" - }; return nil; })() - }; - result['$<<']("" + ""); - if ($truthy(node['$title?']())) { - result['$<<']("" + "
" + (node.$title()) + "
")}; - result['$<<']("" + ""); - $send(node.$items(), 'each', [], ($$46 = function(item){var self = $$46.$$s || this, $a; - - - - if (item == null) { - item = nil; - }; - if ($truthy(item.$id())) { - result['$<<']("" + "
  • ") - } else if ($truthy(item.$role())) { - result['$<<']("" + "
  • ") - } else { - result['$<<']("
  • ") - }; - if ($truthy(($truthy($a = checklist) ? item['$attr?']("checkbox") : $a))) { - result['$<<']("" + "

    " + ((function() {if ($truthy(item['$attr?']("checked"))) { - return marker_checked - } else { - return marker_unchecked - }; return nil; })()) + (item.$text()) + "

    ") - } else { - result['$<<']("" + "

    " + (item.$text()) + "

    ") - }; - if ($truthy(item['$blocks?']())) { - result['$<<'](item.$content())}; - return result['$<<']("
  • ");}, $$46.$$s = self, $$46.$$arity = 1, $$46)); - result['$<<'](""); - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_ulist$45.$$arity = 1); - - Opal.def(self, '$convert_verse', $Html5Converter_convert_verse$47 = function $$convert_verse(node) { - var $a, self = this, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, attribution = nil, citetitle = nil, cite_element = nil, attribution_text = nil, attribution_element = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["verseblock", node.$role()].$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "\n
    " + (node.$title()) + "
    " - } else { - return "" - }; return nil; })(); - attribution = (function() {if ($truthy(node['$attr?']("attribution"))) { - - return node.$attr("attribution"); - } else { - return nil - }; return nil; })(); - citetitle = (function() {if ($truthy(node['$attr?']("citetitle"))) { - - return node.$attr("citetitle"); - } else { - return nil - }; return nil; })(); - if ($truthy(($truthy($a = attribution) ? $a : citetitle))) { - - cite_element = (function() {if ($truthy(citetitle)) { - return "" + "" + (citetitle) + "" - } else { - return "" - }; return nil; })(); - attribution_text = (function() {if ($truthy(attribution)) { - return "" + "— " + (attribution) + ((function() {if ($truthy(citetitle)) { - return "" + "\n" - } else { - return "" - }; return nil; })()) - } else { - return "" - }; return nil; })(); - attribution_element = "" + "\n
    \n" + (attribution_text) + (cite_element) + "\n
    "; - } else { - attribution_element = "" - }; - return "" + "" + (title_element) + "\n" + "
    " + (node.$content()) + "
    " + (attribution_element) + "\n" + ""; - }, $Html5Converter_convert_verse$47.$$arity = 1); - - Opal.def(self, '$convert_video', $Html5Converter_convert_video$48 = function $$convert_video(node) { - var $a, $b, self = this, xml = nil, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, width_attribute = nil, height_attribute = nil, $case = nil, asset_uri_scheme = nil, start_anchor = nil, delimiter = nil, autoplay_param = nil, loop_param = nil, muted_param = nil, rel_param_val = nil, start_param = nil, end_param = nil, has_loop_param = nil, mute_param = nil, controls_param = nil, fs_param = nil, fs_attribute = nil, modest_param = nil, theme_param = nil, hl_param = nil, target = nil, list = nil, list_param = nil, playlist = nil, poster_attribute = nil, val = nil, preload_attribute = nil, start_t = nil, end_t = nil, time_anchor = nil; - - - xml = self.xml_mode; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["videoblock"]; - if ($truthy(node['$attr?']("float"))) { - classes['$<<'](node.$attr("float"))}; - if ($truthy(node['$attr?']("align"))) { - classes['$<<']("" + "text-" + (node.$attr("align")))}; - if ($truthy(node.$role())) { - classes['$<<'](node.$role())}; - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "\n
    " + (node.$title()) + "
    " - } else { - return "" - }; return nil; })(); - width_attribute = (function() {if ($truthy(node['$attr?']("width"))) { - return "" + " width=\"" + (node.$attr("width")) + "\"" - } else { - return "" - }; return nil; })(); - height_attribute = (function() {if ($truthy(node['$attr?']("height"))) { - return "" + " height=\"" + (node.$attr("height")) + "\"" - } else { - return "" - }; return nil; })(); - return (function() {$case = node.$attr("poster"); - if ("vimeo"['$===']($case)) { - if ($truthy((asset_uri_scheme = node.$document().$attr("asset-uri-scheme", "https"))['$empty?']())) { - } else { - asset_uri_scheme = "" + (asset_uri_scheme) + ":" - }; - start_anchor = (function() {if ($truthy(node['$attr?']("start"))) { - return "" + "#at=" + (node.$attr("start")) - } else { - return "" - }; return nil; })(); - delimiter = ["?"]; - autoplay_param = (function() {if ($truthy(node['$option?']("autoplay"))) { - return "" + (($truthy($a = delimiter.$pop()) ? $a : "&")) + "autoplay=1" - } else { - return "" - }; return nil; })(); - loop_param = (function() {if ($truthy(node['$option?']("loop"))) { - return "" + (($truthy($a = delimiter.$pop()) ? $a : "&")) + "loop=1" - } else { - return "" - }; return nil; })(); - muted_param = (function() {if ($truthy(node['$option?']("muted"))) { - return "" + (($truthy($a = delimiter.$pop()) ? $a : "&")) + "muted=1" - } else { - return "" - }; return nil; })(); - return "" + "" + (title_element) + "\n" + "
    \n" + "\n" + "
    \n" + "";} - else if ("youtube"['$===']($case)) { - if ($truthy((asset_uri_scheme = node.$document().$attr("asset-uri-scheme", "https"))['$empty?']())) { - } else { - asset_uri_scheme = "" + (asset_uri_scheme) + ":" - }; - rel_param_val = (function() {if ($truthy(node['$option?']("related"))) { - return 1 - } else { - return 0 - }; return nil; })(); - start_param = (function() {if ($truthy(node['$attr?']("start"))) { - return "" + "&start=" + (node.$attr("start")) - } else { - return "" - }; return nil; })(); - end_param = (function() {if ($truthy(node['$attr?']("end"))) { - return "" + "&end=" + (node.$attr("end")) - } else { - return "" - }; return nil; })(); - autoplay_param = (function() {if ($truthy(node['$option?']("autoplay"))) { - return "&autoplay=1" - } else { - return "" - }; return nil; })(); - loop_param = (function() {if ($truthy((has_loop_param = node['$option?']("loop")))) { - return "&loop=1" - } else { - return "" - }; return nil; })(); - mute_param = (function() {if ($truthy(node['$option?']("muted"))) { - return "&mute=1" - } else { - return "" - }; return nil; })(); - controls_param = (function() {if ($truthy(node['$option?']("nocontrols"))) { - return "&controls=0" - } else { - return "" - }; return nil; })(); - if ($truthy(node['$option?']("nofullscreen"))) { - - fs_param = "&fs=0"; - fs_attribute = ""; - } else { - - fs_param = ""; - fs_attribute = self.$append_boolean_attribute("allowfullscreen", xml); - }; - modest_param = (function() {if ($truthy(node['$option?']("modest"))) { - return "&modestbranding=1" - } else { - return "" - }; return nil; })(); - theme_param = (function() {if ($truthy(node['$attr?']("theme"))) { - return "" + "&theme=" + (node.$attr("theme")) - } else { - return "" - }; return nil; })(); - hl_param = (function() {if ($truthy(node['$attr?']("lang"))) { - return "" + "&hl=" + (node.$attr("lang")) - } else { - return "" - }; return nil; })(); - $b = node.$attr("target").$split("/", 2), $a = Opal.to_ary($b), (target = ($a[0] == null ? nil : $a[0])), (list = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy((list = ($truthy($a = list) ? $a : node.$attr("list"))))) { - list_param = "" + "&list=" + (list) - } else { - - $b = target.$split(",", 2), $a = Opal.to_ary($b), (target = ($a[0] == null ? nil : $a[0])), (playlist = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy((playlist = ($truthy($a = playlist) ? $a : node.$attr("playlist"))))) { - list_param = "" + "&playlist=" + (playlist) - } else { - list_param = (function() {if ($truthy(has_loop_param)) { - return "" + "&playlist=" + (target) - } else { - return "" - }; return nil; })() - }; - }; - return "" + "" + (title_element) + "\n" + "
    \n" + "\n" + "
    \n" + "";} - else { - poster_attribute = (function() {if ($truthy((val = node.$attr("poster"))['$nil_or_empty?']())) { - return "" - } else { - return "" + " poster=\"" + (node.$media_uri(val)) + "\"" - }; return nil; })(); - preload_attribute = (function() {if ($truthy((val = node.$attr("preload"))['$nil_or_empty?']())) { - return "" - } else { - return "" + " preload=\"" + (val) + "\"" - }; return nil; })(); - start_t = node.$attr("start"); - end_t = node.$attr("end"); - time_anchor = (function() {if ($truthy(($truthy($a = start_t) ? $a : end_t))) { - return "" + "#t=" + (($truthy($a = start_t) ? $a : "")) + ((function() {if ($truthy(end_t)) { - return "" + "," + (end_t) - } else { - return "" - }; return nil; })()) - } else { - return "" - }; return nil; })(); - return "" + "" + (title_element) + "\n" + "
    \n" + "\n" + "
    \n" + "";}})(); - }, $Html5Converter_convert_video$48.$$arity = 1); - - Opal.def(self, '$convert_inline_anchor', $Html5Converter_convert_inline_anchor$49 = function $$convert_inline_anchor(node) { - var $a, $b, self = this, $case = nil, path = nil, attrs = nil, text = nil, ref = nil, refid = nil, top = nil, outer = nil; - - return (function() {$case = node.$type(); - if ("xref"['$===']($case)) { - if ($truthy((path = node.$attributes()['$[]']("path")))) { - - attrs = self.$append_link_constraint_attrs(node, (function() {if ($truthy(node.$role())) { - return ["" + " class=\"" + (node.$role()) + "\""] - } else { - return [] - }; return nil; })()).$join(); - text = ($truthy($a = node.$text()) ? $a : path); - } else { - - attrs = (function() {if ($truthy(node.$role())) { - return "" + " class=\"" + (node.$role()) + "\"" - } else { - return "" - }; return nil; })(); - if ($truthy((text = node.$text()))) { - } else if ($truthy($$($nesting, 'AbstractNode')['$===']((ref = ($truthy($a = (self.refs = ($truthy($b = self.refs) ? $b : node.$document().$catalog()['$[]']("refs")))['$[]']((refid = node.$attributes()['$[]']("refid")))) ? $a : (function() {if ($truthy(refid['$nil_or_empty?']())) { - - return (top = self.$get_root_document(node)); - } else { - return nil - }; return nil; })()))))) { - if ($truthy(($truthy($a = (self.resolving_xref = ($truthy($b = self.resolving_xref) ? $b : (outer = true)))) ? outer : $a))) { - - if ($truthy((text = ref.$xreftext(node.$attr("xrefstyle", nil, true))))) { - if ($truthy(text['$include?']("" + (text) + "";} - else if ("ref"['$===']($case)) {return "" + ""} - else if ("link"['$===']($case)) { - attrs = (function() {if ($truthy(node.$id())) { - return ["" + " id=\"" + (node.$id()) + "\""] - } else { - return [] - }; return nil; })(); - if ($truthy(node.$role())) { - attrs['$<<']("" + " class=\"" + (node.$role()) + "\"")}; - if ($truthy(node['$attr?']("title"))) { - attrs['$<<']("" + " title=\"" + (node.$attr("title")) + "\"")}; - return "" + "" + (node.$text()) + "";} - else if ("bibref"['$===']($case)) {return "" + "[" + (($truthy($a = node.$reftext()) ? $a : node.$id())) + "]"} - else { - self.$logger().$warn("" + "unknown anchor type: " + (node.$type().$inspect())); - return nil;}})() - }, $Html5Converter_convert_inline_anchor$49.$$arity = 1); - - Opal.def(self, '$convert_inline_break', $Html5Converter_convert_inline_break$50 = function $$convert_inline_break(node) { - var self = this; - - return "" + (node.$text()) + "" - }, $Html5Converter_convert_inline_break$50.$$arity = 1); - - Opal.def(self, '$convert_inline_button', $Html5Converter_convert_inline_button$51 = function $$convert_inline_button(node) { - var self = this; - - return "" + "" + (node.$text()) + "" - }, $Html5Converter_convert_inline_button$51.$$arity = 1); - - Opal.def(self, '$convert_inline_callout', $Html5Converter_convert_inline_callout$52 = function $$convert_inline_callout(node) { - var self = this, src = nil, guard = nil; - - if ($truthy(node.$document()['$attr?']("icons", "font"))) { - return "" + "(" + (node.$text()) + ")" - } else if ($truthy(node.$document()['$attr?']("icons"))) { - - src = node.$icon_uri("" + "callouts/" + (node.$text())); - return "" + "\"""; - } else if ($truthy($$$('::', 'Array')['$===']((guard = node.$attributes()['$[]']("guard"))))) { - return "" + "<!--(" + (node.$text()) + ")-->" - } else { - return "" + (guard) + "(" + (node.$text()) + ")" - } - }, $Html5Converter_convert_inline_callout$52.$$arity = 1); - - Opal.def(self, '$convert_inline_footnote', $Html5Converter_convert_inline_footnote$53 = function $$convert_inline_footnote(node) { - var self = this, index = nil, id_attr = nil; - - if ($truthy((index = node.$attr("index")))) { - if (node.$type()['$==']("xref")) { - return "" + "[" + (index) + "]" - } else { - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"_footnote_" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - return "" + "[" + (index) + "]"; - } - } else if (node.$type()['$==']("xref")) { - return "" + "[" + (node.$text()) + "]" - } else { - return nil - } - }, $Html5Converter_convert_inline_footnote$53.$$arity = 1); - - Opal.def(self, '$convert_inline_image', $Html5Converter_convert_inline_image$54 = function $$convert_inline_image(node) { - var $a, $b, $$55, $$56, $c, $d, self = this, type = nil, class_attr_val = nil, title_attr = nil, img = nil, target = nil, attrs = nil, svg = nil, obj = nil, fallback = nil, role = nil; - - - if ($truthy((($a = (type = ($truthy($b = node.$type()) ? $b : "image"))['$==']("icon")) ? node.$document()['$attr?']("icons", "font") : (type = ($truthy($b = node.$type()) ? $b : "image"))['$==']("icon")))) { - - class_attr_val = "" + "fa fa-" + (node.$target()); - $send($hash2(["size", "rotate", "flip"], {"size": "fa-", "rotate": "fa-rotate-", "flip": "fa-flip-"}), 'each', [], ($$55 = function(key, prefix){var self = $$55.$$s || this; - - - - if (key == null) { - key = nil; - }; - - if (prefix == null) { - prefix = nil; - }; - if ($truthy(node['$attr?'](key))) { - return (class_attr_val = "" + (class_attr_val) + " " + (prefix) + (node.$attr(key))) - } else { - return nil - };}, $$55.$$s = self, $$55.$$arity = 2, $$55)); - title_attr = (function() {if ($truthy(node['$attr?']("title"))) { - return "" + " title=\"" + (node.$attr("title")) + "\"" - } else { - return "" - }; return nil; })(); - img = "" + ""; - } else if ($truthy((($a = type['$==']("icon")) ? node.$document()['$attr?']("icons")['$!']() : type['$==']("icon")))) { - img = "" + "[" + (node.$alt()) + "]" - } else { - - target = node.$target(); - attrs = $send(["width", "height", "title"], 'map', [], ($$56 = function(name){var self = $$56.$$s || this; - - - - if (name == null) { - name = nil; - }; - if ($truthy(node['$attr?'](name))) { - return "" + " " + (name) + "=\"" + (node.$attr(name)) + "\"" - } else { - return "" - };}, $$56.$$s = self, $$56.$$arity = 1, $$56)).$join(); - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = type['$!=']("icon")) ? ($truthy($d = node['$attr?']("format", "svg")) ? $d : target['$include?'](".svg")) : $c)) ? $rb_lt(node.$document().$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $b)) ? ($truthy($b = (svg = node['$option?']("inline"))) ? $b : (obj = node['$option?']("interactive"))) : $a))) { - if ($truthy(svg)) { - img = ($truthy($a = self.$read_svg_contents(node, target)) ? $a : "" + "" + (node.$alt()) + "") - } else if ($truthy(obj)) { - - fallback = (function() {if ($truthy(node['$attr?']("fallback"))) { - return "" + "\""" - } else { - return "" + "" + (node.$alt()) + "" - }; return nil; })(); - img = "" + "" + (fallback) + "";}}; - img = ($truthy($a = img) ? $a : "" + "\"""); - }; - if ($truthy(node['$attr?']("link"))) { - img = "" + "" + (img) + ""}; - if ($truthy((role = node.$role()))) { - if ($truthy(node['$attr?']("float"))) { - class_attr_val = "" + (type) + " " + (node.$attr("float")) + " " + (role) - } else { - class_attr_val = "" + (type) + " " + (role) - } - } else if ($truthy(node['$attr?']("float"))) { - class_attr_val = "" + (type) + " " + (node.$attr("float")) - } else { - class_attr_val = type - }; - return "" + "" + (img) + ""; - }, $Html5Converter_convert_inline_image$54.$$arity = 1); - - Opal.def(self, '$convert_inline_indexterm', $Html5Converter_convert_inline_indexterm$57 = function $$convert_inline_indexterm(node) { - var self = this; - - if (node.$type()['$==']("visible")) { - return node.$text() - } else { - return "" - } - }, $Html5Converter_convert_inline_indexterm$57.$$arity = 1); - - Opal.def(self, '$convert_inline_kbd', $Html5Converter_convert_inline_kbd$58 = function $$convert_inline_kbd(node) { - var self = this, keys = nil; - - if ((keys = node.$attr("keys")).$size()['$=='](1)) { - return "" + "" + (keys['$[]'](0)) + "" - } else { - return "" + "" + (keys.$join("+")) + "" - } - }, $Html5Converter_convert_inline_kbd$58.$$arity = 1); - - Opal.def(self, '$convert_inline_menu', $Html5Converter_convert_inline_menu$59 = function $$convert_inline_menu(node) { - var self = this, caret = nil, submenu_joiner = nil, menu = nil, submenus = nil, menuitem = nil; - - - caret = (function() {if ($truthy(node.$document()['$attr?']("icons", "font"))) { - return "  " - } else { - return "  " - }; return nil; })(); - submenu_joiner = "" + "" + (caret) + ""; - menu = node.$attr("menu"); - if ($truthy((submenus = node.$attr("submenus"))['$empty?']())) { - if ($truthy((menuitem = node.$attr("menuitem")))) { - return "" + "" + (menu) + "" + (caret) + "" + (menuitem) + "" - } else { - return "" + "" + (menu) + "" - } - } else { - return "" + "" + (menu) + "" + (caret) + "" + (submenus.$join(submenu_joiner)) + "" + (caret) + "" + (node.$attr("menuitem")) + "" - }; - }, $Html5Converter_convert_inline_menu$59.$$arity = 1); - - Opal.def(self, '$convert_inline_quoted', $Html5Converter_convert_inline_quoted$60 = function $$convert_inline_quoted(node) { - var $a, $b, self = this, open = nil, close = nil, tag = nil, class_attr = nil; - - - $b = $$($nesting, 'QUOTE_TAGS')['$[]'](node.$type()), $a = Opal.to_ary($b), (open = ($a[0] == null ? nil : $a[0])), (close = ($a[1] == null ? nil : $a[1])), (tag = ($a[2] == null ? nil : $a[2])), $b; - if ($truthy(node.$id())) { - - class_attr = (function() {if ($truthy(node.$role())) { - return "" + " class=\"" + (node.$role()) + "\"" - } else { - return "" - }; return nil; })(); - if ($truthy(tag)) { - return "" + (open.$chop()) + " id=\"" + (node.$id()) + "\"" + (class_attr) + ">" + (node.$text()) + (close) - } else { - return "" + "" + (open) + (node.$text()) + (close) + "" - }; - } else if ($truthy(node.$role())) { - if ($truthy(tag)) { - return "" + (open.$chop()) + " class=\"" + (node.$role()) + "\">" + (node.$text()) + (close) - } else { - return "" + "" + (open) + (node.$text()) + (close) + "" - } - } else { - return "" + (open) + (node.$text()) + (close) - }; - }, $Html5Converter_convert_inline_quoted$60.$$arity = 1); - - Opal.def(self, '$read_svg_contents', $Html5Converter_read_svg_contents$61 = function $$read_svg_contents(node, target) { - var $$62, self = this, svg = nil, old_start_tag = nil, new_start_tag = nil, start_tag_match = nil; - - - if ($truthy((svg = node.$read_contents(target, $hash2(["start", "normalize", "label", "warn_if_empty"], {"start": node.$document().$attr("imagesdir"), "normalize": true, "label": "SVG", "warn_if_empty": true}))))) { - - if ($truthy(svg['$empty?']())) { - return nil}; - if ($truthy(svg['$start_with?']("");}, $$62.$$s = self, $$62.$$arity = 1, $$62)); - if ($truthy(new_start_tag)) { - svg = "" + (new_start_tag) + (svg['$[]'](Opal.Range.$new(old_start_tag.$length(), -1, false)))};}; - return svg; - }, $Html5Converter_read_svg_contents$61.$$arity = 2); - self.$private(); - - Opal.def(self, '$append_boolean_attribute', $Html5Converter_append_boolean_attribute$63 = function $$append_boolean_attribute(name, xml) { - var self = this; - - if ($truthy(xml)) { - return "" + " " + (name) + "=\"" + (name) + "\"" - } else { - return "" + " " + (name) - } - }, $Html5Converter_append_boolean_attribute$63.$$arity = 2); - - Opal.def(self, '$append_link_constraint_attrs', $Html5Converter_append_link_constraint_attrs$64 = function $$append_link_constraint_attrs(node, attrs) { - var $a, self = this, rel = nil, window = nil; - - - - if (attrs == null) { - attrs = []; - }; - if ($truthy(node['$option?']("nofollow"))) { - rel = "nofollow"}; - if ($truthy((window = node.$attributes()['$[]']("window")))) { - - attrs['$<<']("" + " target=\"" + (window) + "\""); - if ($truthy(($truthy($a = window['$==']("_blank")) ? $a : node['$option?']("noopener")))) { - attrs['$<<']((function() {if ($truthy(rel)) { - return "" + " rel=\"" + (rel) + " noopener\"" - } else { - return " rel=\"noopener\"" - }; return nil; })())}; - } else if ($truthy(rel)) { - attrs['$<<']("" + " rel=\"" + (rel) + "\"")}; - return attrs; - }, $Html5Converter_append_link_constraint_attrs$64.$$arity = -2); - - Opal.def(self, '$encode_attribute_value', $Html5Converter_encode_attribute_value$65 = function $$encode_attribute_value(val) { - var self = this; - - if ($truthy(val['$include?']("\""))) { - - return val.$gsub("\"", """); - } else { - return val - } - }, $Html5Converter_encode_attribute_value$65.$$arity = 1); - - Opal.def(self, '$generate_manname_section', $Html5Converter_generate_manname_section$66 = function $$generate_manname_section(node) { - var $a, self = this, manname_title = nil, next_section = nil, next_section_title = nil, manname_id_attr = nil, manname_id = nil; - - - manname_title = node.$attr("manname-title", "Name"); - if ($truthy(($truthy($a = (next_section = node.$sections()['$[]'](0))) ? (next_section_title = next_section.$title())['$=='](next_section_title.$upcase()) : $a))) { - manname_title = manname_title.$upcase()}; - manname_id_attr = (function() {if ($truthy((manname_id = node.$attr("manname-id")))) { - return "" + " id=\"" + (manname_id) + "\"" - } else { - return "" - }; return nil; })(); - return "" + "" + (manname_title) + "\n" + "
    \n" + "

    " + (node.$attr("mannames").$join(", ")) + " - " + (node.$attr("manpurpose")) + "

    \n" + "
    "; - }, $Html5Converter_generate_manname_section$66.$$arity = 1); - - Opal.def(self, '$get_root_document', $Html5Converter_get_root_document$67 = function $$get_root_document(node) { - var $a, self = this; - - - while ($truthy((node = node.$document())['$nested?']())) { - node = node.$parent_document() - }; - return node; - }, $Html5Converter_get_root_document$67.$$arity = 1); - return (Opal.def(self, '$method_missing', $Html5Converter_method_missing$68 = function $$method_missing(id, $a) { - var $post_args, params, $b, $iter = $Html5Converter_method_missing$68.$$p, $yield = $iter || nil, self = this, name = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Html5Converter_method_missing$68.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - params = $post_args;; - if ($truthy(($truthy($b = (name = id.$to_s())['$start_with?']("convert_")['$!']()) ? self['$handles?'](name) : $b))) { - - return $send(self, 'send', ["" + "convert_" + (name)].concat(Opal.to_a(params))); - } else { - return $send(self, Opal.find_super_dispatcher(self, 'method_missing', $Html5Converter_method_missing$68, false), $zuper, $iter) - }; - }, $Html5Converter_method_missing$68.$$arity = -2), nil) && 'method_missing'; - })($$($nesting, 'Converter'), $$$($$($nesting, 'Converter'), 'Base'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/extensions"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy, $hash2 = Opal.hash2, $send = Opal.send, $hash = Opal.hash; - - Opal.add_stubs(['$==', '$[]=', '$config', '$-', '$const_defined?', '$singleton_class?', '$include', '$const_get', '$extend', '$attr_reader', '$merge', '$class', '$update', '$raise', '$document', '$doctype', '$[]', '$+', '$level', '$delete', '$>', '$casecmp', '$new', '$title=', '$sectname=', '$special=', '$fetch', '$numbered=', '$!', '$key?', '$attr?', '$special', '$numbered', '$generate_id', '$title', '$id=', '$update_attributes', '$tr', '$basename', '$create_block', '$assign_caption', '$===', '$parse_blocks', '$empty?', '$include?', '$sub_attributes', '$parse', '$each', '$define_method', '$unshift', '$shift', '$send', '$size', '$binding', '$receiver', '$define_singleton_method', '$instance_exec', '$to_proc', '$call', '$option', '$flatten', '$respond_to?', '$to_s', '$partition', '$to_i', '$<<', '$compact', '$inspect', '$attr_accessor', '$to_set', '$match?', '$resolve_regexp', '$method', '$register', '$values', '$groups', '$arity', '$activate', '$add_document_processor', '$any?', '$select', '$add_syntax_processor', '$to_sym', '$instance_variable_get', '$kind', '$private', '$join', '$map', '$split', '$capitalize', '$instance_variable_set', '$resolve_args', '$enable_dsl', '$singleton_class', '$process_block_given?', '$source_location', '$freeze', '$resolve_class', '$<', '$update_config', '$as_symbol', '$name', '$name=', '$pop', '$-@', '$next_auto_id', '$generate_name']); - - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'Extensions'); - - var $nesting = [self].concat($parent_nesting); - - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Processor'); - - var $nesting = [self].concat($parent_nesting), $Processor_initialize$4, $Processor_update_config$5, $Processor_process$6, $Processor_create_section$7, $Processor_create_block$8, $Processor_create_list$9, $Processor_create_list_item$10, $Processor_create_image_block$11, $Processor_create_inline$12, $Processor_parse_content$13, $Processor_parse_attributes$14, $Processor$15; - - self.$$prototype.config = nil; - - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $config$1, $option$2, $enable_dsl$3; - - - - Opal.def(self, '$config', $config$1 = function $$config() { - var $a, self = this; - if (self.config == null) self.config = nil; - - return (self.config = ($truthy($a = self.config) ? $a : $hash2([], {}))) - }, $config$1.$$arity = 0); - - Opal.def(self, '$option', $option$2 = function $$option(key, default_value) { - var self = this, $writer = nil; - - - $writer = [key, default_value]; - $send(self.$config(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $option$2.$$arity = 2); - - Opal.def(self, '$enable_dsl', $enable_dsl$3 = function $$enable_dsl() { - var self = this; - - if ($truthy(self['$const_defined?']("DSL"))) { - if ($truthy(self['$singleton_class?']())) { - return self.$include(self.$const_get("DSL")) - } else { - return self.$extend(self.$const_get("DSL")) - } - } else { - return nil - } - }, $enable_dsl$3.$$arity = 0); - return Opal.alias(self, "use_dsl", "enable_dsl"); - })(Opal.get_singleton_class(self), $nesting); - self.$attr_reader("config"); - - Opal.def(self, '$initialize', $Processor_initialize$4 = function $$initialize(config) { - var self = this; - - - - if (config == null) { - config = $hash2([], {}); - }; - return (self.config = self.$class().$config().$merge(config)); - }, $Processor_initialize$4.$$arity = -1); - - Opal.def(self, '$update_config', $Processor_update_config$5 = function $$update_config(config) { - var self = this; - - return self.config.$update(config) - }, $Processor_update_config$5.$$arity = 1); - - Opal.def(self, '$process', $Processor_process$6 = function $$process($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Processor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method"); - }, $Processor_process$6.$$arity = -1); - - Opal.def(self, '$create_section', $Processor_create_section$7 = function $$create_section(parent, title, attrs, opts) { - var $a, self = this, doc = nil, book = nil, doctype = nil, level = nil, style = nil, sectname = nil, special = nil, sect = nil, $writer = nil, id = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - doc = parent.$document(); - book = (doctype = doc.$doctype())['$==']("book"); - level = ($truthy($a = opts['$[]']("level")) ? $a : $rb_plus(parent.$level(), 1)); - if ($truthy((style = attrs.$delete("style")))) { - if ($truthy(($truthy($a = book) ? style['$==']("abstract") : $a))) { - $a = ["chapter", 1], (sectname = $a[0]), (level = $a[1]), $a - } else { - - $a = [style, true], (sectname = $a[0]), (special = $a[1]), $a; - if (level['$=='](0)) { - level = 1}; - } - } else if ($truthy(book)) { - sectname = (function() {if (level['$=='](0)) { - return "part" - } else { - - if ($truthy($rb_gt(level, 1))) { - return "section" - } else { - return "chapter" - }; - }; return nil; })() - } else if ($truthy((($a = doctype['$==']("manpage")) ? title.$casecmp("synopsis")['$=='](0) : doctype['$==']("manpage")))) { - $a = ["synopsis", true], (sectname = $a[0]), (special = $a[1]), $a - } else { - sectname = "section" - }; - sect = $$($nesting, 'Section').$new(parent, level); - $a = [title, sectname], sect['$title=']($a[0]), sect['$sectname=']($a[1]), $a; - if ($truthy(special)) { - - - $writer = [true]; - $send(sect, 'special=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(opts.$fetch("numbered", style['$==']("appendix")))) { - - $writer = [true]; - $send(sect, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else if ($truthy(($truthy($a = opts['$key?']("numbered")['$!']()) ? doc['$attr?']("sectnums", "all") : $a))) { - - $writer = [(function() {if ($truthy(($truthy($a = book) ? level['$=='](1) : $a))) { - return "chapter" - } else { - return true - }; return nil; })()]; - $send(sect, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - } else if ($truthy($rb_gt(level, 0))) { - if ($truthy(opts.$fetch("numbered", doc['$attr?']("sectnums")))) { - - $writer = [(function() {if ($truthy(sect.$special())) { - return ($truthy($a = parent.$numbered()) ? true : $a) - } else { - return true - }; return nil; })()]; - $send(sect, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - } else if ($truthy(opts.$fetch("numbered", ($truthy($a = book) ? doc['$attr?']("partnums") : $a)))) { - - $writer = [true]; - $send(sect, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ((id = attrs['$[]']("id"))['$=='](false)) { - attrs.$delete("id") - } else { - - $writer = [(($writer = ["id", ($truthy($a = id) ? $a : (function() {if ($truthy(doc['$attr?']("sectids"))) { - - return $$($nesting, 'Section').$generate_id(sect.$title(), doc); - } else { - return nil - }; return nil; })())]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]; - $send(sect, 'id=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - sect.$update_attributes(attrs); - return sect; - }, $Processor_create_section$7.$$arity = -4); - - Opal.def(self, '$create_block', $Processor_create_block$8 = function $$create_block(parent, context, source, attrs, opts) { - var self = this; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - return $$($nesting, 'Block').$new(parent, context, $hash2(["source", "attributes"], {"source": source, "attributes": attrs}).$merge(opts)); - }, $Processor_create_block$8.$$arity = -5); - - Opal.def(self, '$create_list', $Processor_create_list$9 = function $$create_list(parent, context, attrs) { - var self = this, list = nil; - - - - if (attrs == null) { - attrs = nil; - }; - list = $$($nesting, 'List').$new(parent, context); - if ($truthy(attrs)) { - list.$update_attributes(attrs)}; - return list; - }, $Processor_create_list$9.$$arity = -3); - - Opal.def(self, '$create_list_item', $Processor_create_list_item$10 = function $$create_list_item(parent, text) { - var self = this; - - - - if (text == null) { - text = nil; - }; - return $$($nesting, 'ListItem').$new(parent, text); - }, $Processor_create_list_item$10.$$arity = -2); - - Opal.def(self, '$create_image_block', $Processor_create_image_block$11 = function $$create_image_block(parent, attrs, opts) { - var $a, self = this, target = nil, $writer = nil, title = nil, block = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy((target = attrs['$[]']("target")))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "Unable to create an image block, target attribute is required") - }; - ($truthy($a = attrs['$[]']("alt")) ? $a : (($writer = ["alt", (($writer = ["default-alt", $$($nesting, 'Helpers').$basename(target, true).$tr("_-", " ")]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - title = (function() {if ($truthy(attrs['$key?']("title"))) { - - return attrs.$delete("title"); - } else { - return nil - }; return nil; })(); - block = self.$create_block(parent, "image", nil, attrs, opts); - if ($truthy(title)) { - - - $writer = [title]; - $send(block, 'title=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - block.$assign_caption(attrs.$delete("caption"), "figure");}; - return block; - }, $Processor_create_image_block$11.$$arity = -3); - - Opal.def(self, '$create_inline', $Processor_create_inline$12 = function $$create_inline(parent, context, text, opts) { - var self = this; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - return $$($nesting, 'Inline').$new(parent, context, text, (function() {if (context['$==']("quoted")) { - - return $hash2(["type"], {"type": "unquoted"}).$merge(opts); - } else { - return opts - }; return nil; })()); - }, $Processor_create_inline$12.$$arity = -4); - - Opal.def(self, '$parse_content', $Processor_parse_content$13 = function $$parse_content(parent, content, attributes) { - var self = this, reader = nil; - - - - if (attributes == null) { - attributes = nil; - }; - reader = (function() {if ($truthy($$($nesting, 'Reader')['$==='](content))) { - return content - } else { - - return $$($nesting, 'Reader').$new(content); - }; return nil; })(); - $$($nesting, 'Parser').$parse_blocks(reader, parent, attributes); - return parent; - }, $Processor_parse_content$13.$$arity = -3); - - Opal.def(self, '$parse_attributes', $Processor_parse_attributes$14 = function $$parse_attributes(block, attrlist, opts) { - var $a, self = this; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy((function() {if ($truthy(attrlist)) { - return attrlist['$empty?']() - } else { - return true - }; return nil; })())) { - return $hash2([], {})}; - if ($truthy(($truthy($a = opts['$[]']("sub_attributes")) ? attrlist['$include?']($$($nesting, 'ATTR_REF_HEAD')) : $a))) { - attrlist = block.$sub_attributes(attrlist)}; - return $$($nesting, 'AttributeList').$new(attrlist).$parse(($truthy($a = opts['$[]']("positional_attributes")) ? $a : [])); - }, $Processor_parse_attributes$14.$$arity = -3); - return $send([["create_paragraph", "create_block", "paragraph"], ["create_open_block", "create_block", "open"], ["create_example_block", "create_block", "example"], ["create_pass_block", "create_block", "pass"], ["create_listing_block", "create_block", "listing"], ["create_literal_block", "create_block", "literal"], ["create_anchor", "create_inline", "anchor"], ["create_inline_pass", "create_inline", "quoted"]], 'each', [], ($Processor$15 = function(method_name, delegate_method_name, context){var self = $Processor$15.$$s || this, $$16; - - - - if (method_name == null) { - method_name = nil; - }; - - if (delegate_method_name == null) { - delegate_method_name = nil; - }; - - if (context == null) { - context = nil; - }; - return $send(self, 'define_method', [method_name], ($$16 = function($a){var self = $$16.$$s || this, $post_args, args; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - args.$unshift(args.$shift(), context); - return $send(self, 'send', [delegate_method_name].concat(Opal.to_a(args)));}, $$16.$$s = self, $$16.$$arity = -1, $$16));}, $Processor$15.$$s = self, $Processor$15.$$arity = 3, $Processor$15)); - })($nesting[0], null, $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'ProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $ProcessorDsl_option$17, $ProcessorDsl_process$18, $ProcessorDsl_process_block_given$ques$20; - - - - Opal.def(self, '$option', $ProcessorDsl_option$17 = function $$option(key, value) { - var self = this, $writer = nil; - - - $writer = [key, value]; - $send(self.$config(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $ProcessorDsl_option$17.$$arity = 2); - - Opal.def(self, '$process', $ProcessorDsl_process$18 = function $$process($a) { - var $iter = $ProcessorDsl_process$18.$$p, block = $iter || nil, $post_args, args, $b, $$19, self = this, context = nil; - if (self.process_block == null) self.process_block = nil; - - if ($iter) $ProcessorDsl_process$18.$$p = null; - - - if ($iter) $ProcessorDsl_process$18.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ((block !== nil)) { - - if ($truthy(args['$empty?']())) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "wrong number of arguments (given " + (args.$size()) + ", expected 0)") - }; - if ($truthy(($truthy($b = block.$binding()) ? self['$=='](block.$binding().$receiver()) : $b))) { - } else { - - context = self; - $send(block, 'define_singleton_method', ["call"], ($$19 = function($c){var self = $$19.$$s || this, $post_args, m_args; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - m_args = $post_args;; - return $send(context, 'instance_exec', Opal.to_a(m_args), block.$to_proc());}, $$19.$$s = self, $$19.$$arity = -1, $$19)); - }; - return (self.process_block = block); - } else if ($truthy((($b = self['process_block'], $b != null && $b !== nil) ? 'instance-variable' : nil))) { - return $send(self.process_block, 'call', Opal.to_a(args)) - } else { - return self.$raise($$$('::', 'NotImplementedError'), "" + (self.$class()) + " #" + ("process") + " method called before being registered") - }; - }, $ProcessorDsl_process$18.$$arity = -1); - - Opal.def(self, '$process_block_given?', $ProcessorDsl_process_block_given$ques$20 = function() { - var $a, self = this; - - return (($a = self['process_block'], $a != null && $a !== nil) ? 'instance-variable' : nil) - }, $ProcessorDsl_process_block_given$ques$20.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'DocumentProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $DocumentProcessorDsl_prefer$21; - - - self.$include($$($nesting, 'ProcessorDsl')); - - Opal.def(self, '$prefer', $DocumentProcessorDsl_prefer$21 = function $$prefer() { - var self = this; - - return self.$option("position", ">>") - }, $DocumentProcessorDsl_prefer$21.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'SyntaxProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $SyntaxProcessorDsl_named$22, $SyntaxProcessorDsl_content_model$23, $SyntaxProcessorDsl_positional_attributes$24, $SyntaxProcessorDsl_default_attributes$25, $SyntaxProcessorDsl_resolve_attributes$26; - - - self.$include($$($nesting, 'ProcessorDsl')); - - Opal.def(self, '$named', $SyntaxProcessorDsl_named$22 = function $$named(value) { - var self = this; - - if ($truthy($$($nesting, 'Processor')['$==='](self))) { - return (self.name = value) - } else { - return self.$option("name", value) - } - }, $SyntaxProcessorDsl_named$22.$$arity = 1); - - Opal.def(self, '$content_model', $SyntaxProcessorDsl_content_model$23 = function $$content_model(value) { - var self = this; - - return self.$option("content_model", value) - }, $SyntaxProcessorDsl_content_model$23.$$arity = 1); - Opal.alias(self, "parse_content_as", "content_model"); - - Opal.def(self, '$positional_attributes', $SyntaxProcessorDsl_positional_attributes$24 = function $$positional_attributes($a) { - var $post_args, value, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - return self.$option("positional_attrs", value.$flatten()); - }, $SyntaxProcessorDsl_positional_attributes$24.$$arity = -1); - Opal.alias(self, "name_positional_attributes", "positional_attributes"); - Opal.alias(self, "positional_attrs", "positional_attributes"); - - Opal.def(self, '$default_attributes', $SyntaxProcessorDsl_default_attributes$25 = function $$default_attributes(value) { - var self = this; - - return self.$option("default_attrs", value) - }, $SyntaxProcessorDsl_default_attributes$25.$$arity = 1); - Opal.alias(self, "default_attrs", "default_attributes"); - - Opal.def(self, '$resolve_attributes', $SyntaxProcessorDsl_resolve_attributes$26 = function $$resolve_attributes($a) { - var $post_args, args, $b, $$27, $$28, self = this, $case = nil, names = nil, defaults = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy($rb_gt(args.$size(), 1))) { - } else if ($truthy((args = args.$fetch(0, true))['$respond_to?']("to_sym"))) { - args = [args]}; - return (function() {$case = args; - if (true['$===']($case)) { - self.$option("positional_attrs", []); - return self.$option("default_attrs", $hash2([], {}));} - else if ($$$('::', 'Array')['$===']($case)) { - $b = [[], $hash2([], {})], (names = $b[0]), (defaults = $b[1]), $b; - $send(args, 'each', [], ($$27 = function(arg){var self = $$27.$$s || this, $c, $d, name = nil, _ = nil, value = nil, idx = nil, $writer = nil; - - - - if (arg == null) { - arg = nil; - }; - if ($truthy((arg = arg.$to_s())['$include?']("="))) { - - $d = arg.$partition("="), $c = Opal.to_ary($d), (name = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (value = ($c[2] == null ? nil : $c[2])), $d; - if ($truthy(name['$include?'](":"))) { - - $d = name.$partition(":"), $c = Opal.to_ary($d), (idx = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (name = ($c[2] == null ? nil : $c[2])), $d; - idx = (function() {if (idx['$==']("@")) { - return names.$size() - } else { - return idx.$to_i() - }; return nil; })(); - - $writer = [idx, name]; - $send(names, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - - $writer = [name, value]; - $send(defaults, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else if ($truthy(arg['$include?'](":"))) { - - $d = arg.$partition(":"), $c = Opal.to_ary($d), (idx = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (name = ($c[2] == null ? nil : $c[2])), $d; - idx = (function() {if (idx['$==']("@")) { - return names.$size() - } else { - return idx.$to_i() - }; return nil; })(); - - $writer = [idx, name]; - $send(names, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - return names['$<<'](arg) - };}, $$27.$$s = self, $$27.$$arity = 1, $$27)); - self.$option("positional_attrs", names.$compact()); - return self.$option("default_attrs", defaults);} - else if ($$$('::', 'Hash')['$===']($case)) { - $b = [[], $hash2([], {})], (names = $b[0]), (defaults = $b[1]), $b; - $send(args, 'each', [], ($$28 = function(key, val){var self = $$28.$$s || this, $c, $d, name = nil, idx = nil, _ = nil, $writer = nil; - - - - if (key == null) { - key = nil; - }; - - if (val == null) { - val = nil; - }; - if ($truthy((name = key.$to_s())['$include?'](":"))) { - - $d = name.$partition(":"), $c = Opal.to_ary($d), (idx = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (name = ($c[2] == null ? nil : $c[2])), $d; - idx = (function() {if (idx['$==']("@")) { - return names.$size() - } else { - return idx.$to_i() - }; return nil; })(); - - $writer = [idx, name]; - $send(names, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - if ($truthy(val)) { - - $writer = [name, val]; - $send(defaults, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - return nil - };}, $$28.$$s = self, $$28.$$arity = 2, $$28)); - self.$option("positional_attrs", names.$compact()); - return self.$option("default_attrs", defaults);} - else {return self.$raise($$$('::', 'ArgumentError'), "" + "unsupported attributes specification for macro: " + (args.$inspect()))}})(); - }, $SyntaxProcessorDsl_resolve_attributes$26.$$arity = -1); - Opal.alias(self, "resolves_attributes", "resolve_attributes"); - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Preprocessor'); - - var $nesting = [self].concat($parent_nesting), $Preprocessor_process$29; - - return (Opal.def(self, '$process', $Preprocessor_process$29 = function $$process(document, reader) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Preprocessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $Preprocessor_process$29.$$arity = 2), nil) && 'process' - })($nesting[0], $$($nesting, 'Processor'), $nesting); - Opal.const_set($$($nesting, 'Preprocessor'), 'DSL', $$($nesting, 'DocumentProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'TreeProcessor'); - - var $nesting = [self].concat($parent_nesting), $TreeProcessor_process$30; - - return (Opal.def(self, '$process', $TreeProcessor_process$30 = function $$process(document) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'TreeProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $TreeProcessor_process$30.$$arity = 1), nil) && 'process' - })($nesting[0], $$($nesting, 'Processor'), $nesting); - Opal.const_set($$($nesting, 'TreeProcessor'), 'DSL', $$($nesting, 'DocumentProcessorDsl')); - Opal.const_set($nesting[0], 'Treeprocessor', $$($nesting, 'TreeProcessor')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Postprocessor'); - - var $nesting = [self].concat($parent_nesting), $Postprocessor_process$31; - - return (Opal.def(self, '$process', $Postprocessor_process$31 = function $$process(document, output) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Postprocessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $Postprocessor_process$31.$$arity = 2), nil) && 'process' - })($nesting[0], $$($nesting, 'Processor'), $nesting); - Opal.const_set($$($nesting, 'Postprocessor'), 'DSL', $$($nesting, 'DocumentProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'IncludeProcessor'); - - var $nesting = [self].concat($parent_nesting), $IncludeProcessor_process$32, $IncludeProcessor_handles$ques$33; - - - - Opal.def(self, '$process', $IncludeProcessor_process$32 = function $$process(document, reader, target, attributes) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'IncludeProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $IncludeProcessor_process$32.$$arity = 4); - return (Opal.def(self, '$handles?', $IncludeProcessor_handles$ques$33 = function(target) { - var self = this; - - return true - }, $IncludeProcessor_handles$ques$33.$$arity = 1), nil) && 'handles?'; - })($nesting[0], $$($nesting, 'Processor'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'IncludeProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $IncludeProcessorDsl_handles$ques$34; - - - self.$include($$($nesting, 'DocumentProcessorDsl')); - - Opal.def(self, '$handles?', $IncludeProcessorDsl_handles$ques$34 = function($a) { - var $iter = $IncludeProcessorDsl_handles$ques$34.$$p, block = $iter || nil, $post_args, args, $b, self = this; - if (self.handles_block == null) self.handles_block = nil; - - if ($iter) $IncludeProcessorDsl_handles$ques$34.$$p = null; - - - if ($iter) $IncludeProcessorDsl_handles$ques$34.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ((block !== nil)) { - - if ($truthy(args['$empty?']())) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "wrong number of arguments (given " + (args.$size()) + ", expected 0)") - }; - return (self.handles_block = block); - } else if ($truthy((($b = self['handles_block'], $b != null && $b !== nil) ? 'instance-variable' : nil))) { - return self.handles_block.$call(args['$[]'](0)) - } else { - return true - }; - }, $IncludeProcessorDsl_handles$ques$34.$$arity = -1); - })($nesting[0], $nesting); - Opal.const_set($$($nesting, 'IncludeProcessor'), 'DSL', $$($nesting, 'IncludeProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'DocinfoProcessor'); - - var $nesting = [self].concat($parent_nesting), $DocinfoProcessor_initialize$35, $DocinfoProcessor_process$36; - - self.$$prototype.config = nil; - - - Opal.def(self, '$initialize', $DocinfoProcessor_initialize$35 = function $$initialize(config) { - var $a, $iter = $DocinfoProcessor_initialize$35.$$p, $yield = $iter || nil, self = this, $writer = nil; - - if ($iter) $DocinfoProcessor_initialize$35.$$p = null; - - - if (config == null) { - config = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $DocinfoProcessor_initialize$35, false), [config], null); - return ($truthy($a = self.config['$[]']("location")) ? $a : (($writer = ["location", "head"]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - }, $DocinfoProcessor_initialize$35.$$arity = -1); - return (Opal.def(self, '$process', $DocinfoProcessor_process$36 = function $$process(document) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'DocinfoProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $DocinfoProcessor_process$36.$$arity = 1), nil) && 'process'; - })($nesting[0], $$($nesting, 'Processor'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'DocinfoProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $DocinfoProcessorDsl_at_location$37; - - - self.$include($$($nesting, 'DocumentProcessorDsl')); - - Opal.def(self, '$at_location', $DocinfoProcessorDsl_at_location$37 = function $$at_location(value) { - var self = this; - - return self.$option("location", value) - }, $DocinfoProcessorDsl_at_location$37.$$arity = 1); - })($nesting[0], $nesting); - Opal.const_set($$($nesting, 'DocinfoProcessor'), 'DSL', $$($nesting, 'DocinfoProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'BlockProcessor'); - - var $nesting = [self].concat($parent_nesting), $BlockProcessor_initialize$38, $BlockProcessor_process$39; - - self.$$prototype.config = nil; - - self.$attr_accessor("name"); - - Opal.def(self, '$initialize', $BlockProcessor_initialize$38 = function $$initialize(name, config) { - var $a, $iter = $BlockProcessor_initialize$38.$$p, $yield = $iter || nil, self = this, $case = nil, $writer = nil; - - if ($iter) $BlockProcessor_initialize$38.$$p = null; - - - if (name == null) { - name = nil; - }; - - if (config == null) { - config = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $BlockProcessor_initialize$38, false), [config], null); - self.name = ($truthy($a = name) ? $a : self.config['$[]']("name")); - $case = self.config['$[]']("contexts"); - if ($$$('::', 'NilClass')['$===']($case)) {($truthy($a = self.config['$[]']("contexts")) ? $a : (($writer = ["contexts", ["open", "paragraph"].$to_set()]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))} - else if ($$$('::', 'Symbol')['$===']($case)) { - $writer = ["contexts", [self.config['$[]']("contexts")].$to_set()]; - $send(self.config, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - else { - $writer = ["contexts", self.config['$[]']("contexts").$to_set()]; - $send(self.config, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return ($truthy($a = self.config['$[]']("content_model")) ? $a : (($writer = ["content_model", "compound"]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - }, $BlockProcessor_initialize$38.$$arity = -1); - return (Opal.def(self, '$process', $BlockProcessor_process$39 = function $$process(parent, reader, attributes) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'BlockProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $BlockProcessor_process$39.$$arity = 3), nil) && 'process'; - })($nesting[0], $$($nesting, 'Processor'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'BlockProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $BlockProcessorDsl_contexts$40; - - - self.$include($$($nesting, 'SyntaxProcessorDsl')); - - Opal.def(self, '$contexts', $BlockProcessorDsl_contexts$40 = function $$contexts($a) { - var $post_args, value, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - return self.$option("contexts", value.$flatten().$to_set()); - }, $BlockProcessorDsl_contexts$40.$$arity = -1); - Opal.alias(self, "on_contexts", "contexts"); - Opal.alias(self, "on_context", "contexts"); - Opal.alias(self, "bind_to", "contexts"); - })($nesting[0], $nesting); - Opal.const_set($$($nesting, 'BlockProcessor'), 'DSL', $$($nesting, 'BlockProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'MacroProcessor'); - - var $nesting = [self].concat($parent_nesting), $MacroProcessor_initialize$41, $MacroProcessor_process$42; - - self.$$prototype.config = nil; - - self.$attr_accessor("name"); - - Opal.def(self, '$initialize', $MacroProcessor_initialize$41 = function $$initialize(name, config) { - var $a, $iter = $MacroProcessor_initialize$41.$$p, $yield = $iter || nil, self = this, $writer = nil; - - if ($iter) $MacroProcessor_initialize$41.$$p = null; - - - if (name == null) { - name = nil; - }; - - if (config == null) { - config = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $MacroProcessor_initialize$41, false), [config], null); - self.name = ($truthy($a = name) ? $a : self.config['$[]']("name")); - return ($truthy($a = self.config['$[]']("content_model")) ? $a : (($writer = ["content_model", "attributes"]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - }, $MacroProcessor_initialize$41.$$arity = -1); - return (Opal.def(self, '$process', $MacroProcessor_process$42 = function $$process(parent, target, attributes) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'MacroProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $MacroProcessor_process$42.$$arity = 3), nil) && 'process'; - })($nesting[0], $$($nesting, 'Processor'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'MacroProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $MacroProcessorDsl_resolve_attributes$43; - - - self.$include($$($nesting, 'SyntaxProcessorDsl')); - - Opal.def(self, '$resolve_attributes', $MacroProcessorDsl_resolve_attributes$43 = function $$resolve_attributes($a) { - var $post_args, args, $b, $iter = $MacroProcessorDsl_resolve_attributes$43.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $MacroProcessorDsl_resolve_attributes$43.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy((($b = args.$size()['$=='](1)) ? args['$[]'](0)['$!']() : args.$size()['$=='](1)))) { - return self.$option("content_model", "text") - } else { - - $send(self, Opal.find_super_dispatcher(self, 'resolve_attributes', $MacroProcessorDsl_resolve_attributes$43, false), $zuper, $iter); - return self.$option("content_model", "attributes"); - }; - }, $MacroProcessorDsl_resolve_attributes$43.$$arity = -1); - Opal.alias(self, "resolves_attributes", "resolve_attributes"); - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'BlockMacroProcessor'); - - var $nesting = [self].concat($parent_nesting), $BlockMacroProcessor_name$44; - - self.$$prototype.name = nil; - return (Opal.def(self, '$name', $BlockMacroProcessor_name$44 = function $$name() { - var self = this; - - - if ($truthy($$($nesting, 'MacroNameRx')['$match?'](self.name.$to_s()))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "invalid name for block macro: " + (self.name)) - }; - return self.name; - }, $BlockMacroProcessor_name$44.$$arity = 0), nil) && 'name' - })($nesting[0], $$($nesting, 'MacroProcessor'), $nesting); - Opal.const_set($$($nesting, 'BlockMacroProcessor'), 'DSL', $$($nesting, 'MacroProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'InlineMacroProcessor'); - - var $nesting = [self].concat($parent_nesting), $InlineMacroProcessor_regexp$45, $InlineMacroProcessor_resolve_regexp$46; - - self.$$prototype.config = self.$$prototype.name = nil; - - (Opal.class_variable_set($nesting[0], '@@rx_cache', $hash2([], {}))); - - Opal.def(self, '$regexp', $InlineMacroProcessor_regexp$45 = function $$regexp() { - var $a, self = this, $writer = nil; - - return ($truthy($a = self.config['$[]']("regexp")) ? $a : (($writer = ["regexp", self.$resolve_regexp(self.name.$to_s(), self.config['$[]']("format"))]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - }, $InlineMacroProcessor_regexp$45.$$arity = 0); - return (Opal.def(self, '$resolve_regexp', $InlineMacroProcessor_resolve_regexp$46 = function $$resolve_regexp(name, format) { - var $a, $b, self = this, $writer = nil; - - - if ($truthy($$($nesting, 'MacroNameRx')['$match?'](name))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "invalid name for inline macro: " + (name)) - }; - return ($truthy($a = (($b = $nesting[0].$$cvars['@@rx_cache']) == null ? nil : $b)['$[]']([name, format])) ? $a : (($writer = [[name, format], new RegExp("" + "\\\\?" + (name) + ":" + ((function() {if (format['$==']("short")) { - return "(){0}" - } else { - return "(\\S+?)" - }; return nil; })()) + "\\[(|" + ($$($nesting, 'CC_ANY')) + "*?[^\\\\])\\]")]), $send((($b = $nesting[0].$$cvars['@@rx_cache']) == null ? nil : $b), '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - }, $InlineMacroProcessor_resolve_regexp$46.$$arity = 2), nil) && 'resolve_regexp'; - })($nesting[0], $$($nesting, 'MacroProcessor'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'InlineMacroProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $InlineMacroProcessorDsl_format$47, $InlineMacroProcessorDsl_match$48; - - - self.$include($$($nesting, 'MacroProcessorDsl')); - - Opal.def(self, '$format', $InlineMacroProcessorDsl_format$47 = function $$format(value) { - var self = this; - - return self.$option("format", value) - }, $InlineMacroProcessorDsl_format$47.$$arity = 1); - Opal.alias(self, "match_format", "format"); - Opal.alias(self, "using_format", "format"); - - Opal.def(self, '$match', $InlineMacroProcessorDsl_match$48 = function $$match(value) { - var self = this; - - return self.$option("regexp", value) - }, $InlineMacroProcessorDsl_match$48.$$arity = 1); - })($nesting[0], $nesting); - Opal.const_set($$($nesting, 'InlineMacroProcessor'), 'DSL', $$($nesting, 'InlineMacroProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Extension'); - - var $nesting = [self].concat($parent_nesting), $Extension_initialize$49; - - - self.$attr_reader("kind"); - self.$attr_reader("config"); - self.$attr_reader("instance"); - return (Opal.def(self, '$initialize', $Extension_initialize$49 = function $$initialize(kind, instance, config) { - var self = this; - - - self.kind = kind; - self.instance = instance; - return (self.config = config); - }, $Extension_initialize$49.$$arity = 3), nil) && 'initialize'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'ProcessorExtension'); - - var $nesting = [self].concat($parent_nesting), $ProcessorExtension_initialize$50; - - - self.$attr_reader("process_method"); - return (Opal.def(self, '$initialize', $ProcessorExtension_initialize$50 = function $$initialize(kind, instance, process_method) { - var $a, $iter = $ProcessorExtension_initialize$50.$$p, $yield = $iter || nil, self = this; - - if ($iter) $ProcessorExtension_initialize$50.$$p = null; - - - if (process_method == null) { - process_method = nil; - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $ProcessorExtension_initialize$50, false), [kind, instance, instance.$config()], null); - return (self.process_method = ($truthy($a = process_method) ? $a : instance.$method("process"))); - }, $ProcessorExtension_initialize$50.$$arity = -3), nil) && 'initialize'; - })($nesting[0], $$($nesting, 'Extension'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Group'); - - var $nesting = [self].concat($parent_nesting), $Group_activate$52; - - - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $register$51; - - return (Opal.def(self, '$register', $register$51 = function $$register(name) { - var self = this; - - - - if (name == null) { - name = nil; - }; - return $$($nesting, 'Extensions').$register(name, self); - }, $register$51.$$arity = -1), nil) && 'register' - })(Opal.get_singleton_class(self), $nesting); - return (Opal.def(self, '$activate', $Group_activate$52 = function $$activate(registry) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError')) - }, $Group_activate$52.$$arity = 1), nil) && 'activate'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Registry'); - - var $nesting = [self].concat($parent_nesting), $Registry_initialize$53, $Registry_activate$54, $Registry_preprocessor$56, $Registry_preprocessors$ques$57, $Registry_preprocessors$58, $Registry_tree_processor$59, $Registry_tree_processors$ques$60, $Registry_tree_processors$61, $Registry_postprocessor$62, $Registry_postprocessors$ques$63, $Registry_postprocessors$64, $Registry_include_processor$65, $Registry_include_processors$ques$66, $Registry_include_processors$67, $Registry_docinfo_processor$68, $Registry_docinfo_processors$ques$69, $Registry_docinfo_processors$71, $Registry_block$73, $Registry_blocks$ques$74, $Registry_registered_for_block$ques$75, $Registry_find_block_extension$76, $Registry_block_macro$77, $Registry_block_macros$ques$78, $Registry_registered_for_block_macro$ques$79, $Registry_find_block_macro_extension$80, $Registry_inline_macro$81, $Registry_inline_macros$ques$82, $Registry_registered_for_inline_macro$ques$83, $Registry_find_inline_macro_extension$84, $Registry_inline_macros$85, $Registry_prefer$86, $Registry_add_document_processor$87, $Registry_add_syntax_processor$89, $Registry_resolve_args$91, $Registry_as_symbol$92; - - self.$$prototype.groups = self.$$prototype.preprocessor_extensions = self.$$prototype.tree_processor_extensions = self.$$prototype.postprocessor_extensions = self.$$prototype.include_processor_extensions = self.$$prototype.docinfo_processor_extensions = self.$$prototype.block_extensions = self.$$prototype.block_macro_extensions = self.$$prototype.inline_macro_extensions = nil; - - self.$attr_reader("document"); - self.$attr_reader("groups"); - - Opal.def(self, '$initialize', $Registry_initialize$53 = function $$initialize(groups) { - var self = this; - - - - if (groups == null) { - groups = $hash2([], {}); - }; - self.groups = groups; - self.preprocessor_extensions = (self.tree_processor_extensions = (self.postprocessor_extensions = (self.include_processor_extensions = (self.docinfo_processor_extensions = (self.block_extensions = (self.block_macro_extensions = (self.inline_macro_extensions = nil))))))); - return (self.document = nil); - }, $Registry_initialize$53.$$arity = -1); - - Opal.def(self, '$activate', $Registry_activate$54 = function $$activate(document) { - var $$55, self = this, ext_groups = nil; - - - self.document = document; - if ($truthy((ext_groups = $rb_plus($$($nesting, 'Extensions').$groups().$values(), self.groups.$values()))['$empty?']())) { - } else { - $send(ext_groups, 'each', [], ($$55 = function(group){var self = $$55.$$s || this, $case = nil; - - - - if (group == null) { - group = nil; - }; - return (function() {$case = group; - if ($$$('::', 'Proc')['$===']($case)) {return (function() {$case = group.$arity(); - if ((0)['$===']($case) || (-1)['$===']($case)) {return $send(self, 'instance_exec', [], group.$to_proc())} - else if ((1)['$===']($case)) {return group.$call(self)} - else { return nil }})()} - else if ($$$('::', 'Class')['$===']($case)) {return group.$new().$activate(self)} - else {return group.$activate(self)}})();}, $$55.$$s = self, $$55.$$arity = 1, $$55)) - }; - return self; - }, $Registry_activate$54.$$arity = 1); - - Opal.def(self, '$preprocessor', $Registry_preprocessor$56 = function $$preprocessor($a) { - var $iter = $Registry_preprocessor$56.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_preprocessor$56.$$p = null; - - - if ($iter) $Registry_preprocessor$56.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_document_processor', ["preprocessor", args], block.$to_proc()); - }, $Registry_preprocessor$56.$$arity = -1); - - Opal.def(self, '$preprocessors?', $Registry_preprocessors$ques$57 = function() { - var self = this; - - return self.preprocessor_extensions['$!']()['$!']() - }, $Registry_preprocessors$ques$57.$$arity = 0); - - Opal.def(self, '$preprocessors', $Registry_preprocessors$58 = function $$preprocessors() { - var self = this; - - return self.preprocessor_extensions - }, $Registry_preprocessors$58.$$arity = 0); - - Opal.def(self, '$tree_processor', $Registry_tree_processor$59 = function $$tree_processor($a) { - var $iter = $Registry_tree_processor$59.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_tree_processor$59.$$p = null; - - - if ($iter) $Registry_tree_processor$59.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_document_processor', ["tree_processor", args], block.$to_proc()); - }, $Registry_tree_processor$59.$$arity = -1); - - Opal.def(self, '$tree_processors?', $Registry_tree_processors$ques$60 = function() { - var self = this; - - return self.tree_processor_extensions['$!']()['$!']() - }, $Registry_tree_processors$ques$60.$$arity = 0); - - Opal.def(self, '$tree_processors', $Registry_tree_processors$61 = function $$tree_processors() { - var self = this; - - return self.tree_processor_extensions - }, $Registry_tree_processors$61.$$arity = 0); - Opal.alias(self, "treeprocessor", "tree_processor"); - Opal.alias(self, "treeprocessors?", "tree_processors?"); - Opal.alias(self, "treeprocessors", "tree_processors"); - - Opal.def(self, '$postprocessor', $Registry_postprocessor$62 = function $$postprocessor($a) { - var $iter = $Registry_postprocessor$62.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_postprocessor$62.$$p = null; - - - if ($iter) $Registry_postprocessor$62.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_document_processor', ["postprocessor", args], block.$to_proc()); - }, $Registry_postprocessor$62.$$arity = -1); - - Opal.def(self, '$postprocessors?', $Registry_postprocessors$ques$63 = function() { - var self = this; - - return self.postprocessor_extensions['$!']()['$!']() - }, $Registry_postprocessors$ques$63.$$arity = 0); - - Opal.def(self, '$postprocessors', $Registry_postprocessors$64 = function $$postprocessors() { - var self = this; - - return self.postprocessor_extensions - }, $Registry_postprocessors$64.$$arity = 0); - - Opal.def(self, '$include_processor', $Registry_include_processor$65 = function $$include_processor($a) { - var $iter = $Registry_include_processor$65.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_include_processor$65.$$p = null; - - - if ($iter) $Registry_include_processor$65.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_document_processor', ["include_processor", args], block.$to_proc()); - }, $Registry_include_processor$65.$$arity = -1); - - Opal.def(self, '$include_processors?', $Registry_include_processors$ques$66 = function() { - var self = this; - - return self.include_processor_extensions['$!']()['$!']() - }, $Registry_include_processors$ques$66.$$arity = 0); - - Opal.def(self, '$include_processors', $Registry_include_processors$67 = function $$include_processors() { - var self = this; - - return self.include_processor_extensions - }, $Registry_include_processors$67.$$arity = 0); - - Opal.def(self, '$docinfo_processor', $Registry_docinfo_processor$68 = function $$docinfo_processor($a) { - var $iter = $Registry_docinfo_processor$68.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_docinfo_processor$68.$$p = null; - - - if ($iter) $Registry_docinfo_processor$68.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_document_processor', ["docinfo_processor", args], block.$to_proc()); - }, $Registry_docinfo_processor$68.$$arity = -1); - - Opal.def(self, '$docinfo_processors?', $Registry_docinfo_processors$ques$69 = function(location) { - var $$70, self = this; - - - - if (location == null) { - location = nil; - }; - if ($truthy(self.docinfo_processor_extensions)) { - if ($truthy(location)) { - return $send(self.docinfo_processor_extensions, 'any?', [], ($$70 = function(ext){var self = $$70.$$s || this; - - - - if (ext == null) { - ext = nil; - }; - return ext.$config()['$[]']("location")['$=='](location);}, $$70.$$s = self, $$70.$$arity = 1, $$70)) - } else { - return true - } - } else { - return false - }; - }, $Registry_docinfo_processors$ques$69.$$arity = -1); - - Opal.def(self, '$docinfo_processors', $Registry_docinfo_processors$71 = function $$docinfo_processors(location) { - var $$72, self = this; - - - - if (location == null) { - location = nil; - }; - if ($truthy(self.docinfo_processor_extensions)) { - if ($truthy(location)) { - return $send(self.docinfo_processor_extensions, 'select', [], ($$72 = function(ext){var self = $$72.$$s || this; - - - - if (ext == null) { - ext = nil; - }; - return ext.$config()['$[]']("location")['$=='](location);}, $$72.$$s = self, $$72.$$arity = 1, $$72)) - } else { - return self.docinfo_processor_extensions - } - } else { - return nil - }; - }, $Registry_docinfo_processors$71.$$arity = -1); - - Opal.def(self, '$block', $Registry_block$73 = function $$block($a) { - var $iter = $Registry_block$73.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_block$73.$$p = null; - - - if ($iter) $Registry_block$73.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_syntax_processor', ["block", args], block.$to_proc()); - }, $Registry_block$73.$$arity = -1); - - Opal.def(self, '$blocks?', $Registry_blocks$ques$74 = function() { - var self = this; - - return self.block_extensions['$!']()['$!']() - }, $Registry_blocks$ques$74.$$arity = 0); - - Opal.def(self, '$registered_for_block?', $Registry_registered_for_block$ques$75 = function(name, context) { - var self = this, ext = nil; - - if ($truthy((ext = self.block_extensions['$[]'](name.$to_sym())))) { - if ($truthy(ext.$config()['$[]']("contexts")['$include?'](context))) { - return ext - } else { - return false - } - } else { - return false - } - }, $Registry_registered_for_block$ques$75.$$arity = 2); - - Opal.def(self, '$find_block_extension', $Registry_find_block_extension$76 = function $$find_block_extension(name) { - var self = this; - - return self.block_extensions['$[]'](name.$to_sym()) - }, $Registry_find_block_extension$76.$$arity = 1); - - Opal.def(self, '$block_macro', $Registry_block_macro$77 = function $$block_macro($a) { - var $iter = $Registry_block_macro$77.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_block_macro$77.$$p = null; - - - if ($iter) $Registry_block_macro$77.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_syntax_processor', ["block_macro", args], block.$to_proc()); - }, $Registry_block_macro$77.$$arity = -1); - - Opal.def(self, '$block_macros?', $Registry_block_macros$ques$78 = function() { - var self = this; - - return self.block_macro_extensions['$!']()['$!']() - }, $Registry_block_macros$ques$78.$$arity = 0); - - Opal.def(self, '$registered_for_block_macro?', $Registry_registered_for_block_macro$ques$79 = function(name) { - var self = this, ext = nil; - - if ($truthy((ext = self.block_macro_extensions['$[]'](name.$to_sym())))) { - return ext - } else { - return false - } - }, $Registry_registered_for_block_macro$ques$79.$$arity = 1); - - Opal.def(self, '$find_block_macro_extension', $Registry_find_block_macro_extension$80 = function $$find_block_macro_extension(name) { - var self = this; - - return self.block_macro_extensions['$[]'](name.$to_sym()) - }, $Registry_find_block_macro_extension$80.$$arity = 1); - - Opal.def(self, '$inline_macro', $Registry_inline_macro$81 = function $$inline_macro($a) { - var $iter = $Registry_inline_macro$81.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_inline_macro$81.$$p = null; - - - if ($iter) $Registry_inline_macro$81.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_syntax_processor', ["inline_macro", args], block.$to_proc()); - }, $Registry_inline_macro$81.$$arity = -1); - - Opal.def(self, '$inline_macros?', $Registry_inline_macros$ques$82 = function() { - var self = this; - - return self.inline_macro_extensions['$!']()['$!']() - }, $Registry_inline_macros$ques$82.$$arity = 0); - - Opal.def(self, '$registered_for_inline_macro?', $Registry_registered_for_inline_macro$ques$83 = function(name) { - var self = this, ext = nil; - - if ($truthy((ext = self.inline_macro_extensions['$[]'](name.$to_sym())))) { - return ext - } else { - return false - } - }, $Registry_registered_for_inline_macro$ques$83.$$arity = 1); - - Opal.def(self, '$find_inline_macro_extension', $Registry_find_inline_macro_extension$84 = function $$find_inline_macro_extension(name) { - var self = this; - - return self.inline_macro_extensions['$[]'](name.$to_sym()) - }, $Registry_find_inline_macro_extension$84.$$arity = 1); - - Opal.def(self, '$inline_macros', $Registry_inline_macros$85 = function $$inline_macros() { - var self = this; - - return self.inline_macro_extensions.$values() - }, $Registry_inline_macros$85.$$arity = 0); - - Opal.def(self, '$prefer', $Registry_prefer$86 = function $$prefer($a) { - var $iter = $Registry_prefer$86.$$p, block = $iter || nil, $post_args, args, self = this, extension = nil, arg0 = nil, extensions_store = nil; - - if ($iter) $Registry_prefer$86.$$p = null; - - - if ($iter) $Registry_prefer$86.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - extension = (function() {if ($truthy($$($nesting, 'ProcessorExtension')['$===']((arg0 = args.$shift())))) { - return arg0 - } else { - - return $send(self, 'send', [arg0].concat(Opal.to_a(args)), block.$to_proc()); - }; return nil; })(); - extensions_store = self.$instance_variable_get(((("" + "@") + (extension.$kind())) + "_extensions").$to_sym()); - extensions_store.$unshift(extensions_store.$delete(extension)); - return extension; - }, $Registry_prefer$86.$$arity = -1); - self.$private(); - - Opal.def(self, '$add_document_processor', $Registry_add_document_processor$87 = function $$add_document_processor(kind, args) { - var $iter = $Registry_add_document_processor$87.$$p, block = $iter || nil, $$88, $a, $b, $c, self = this, kind_name = nil, kind_class_symbol = nil, kind_class = nil, kind_java_class = nil, kind_store = nil, extension = nil, config = nil, processor = nil, processor_class = nil, processor_instance = nil; - - if ($iter) $Registry_add_document_processor$87.$$p = null; - - - if ($iter) $Registry_add_document_processor$87.$$p = null;; - kind_name = kind.$to_s().$tr("_", " "); - kind_class_symbol = $send(kind_name.$split(), 'map', [], ($$88 = function(it){var self = $$88.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$capitalize();}, $$88.$$s = self, $$88.$$arity = 1, $$88)).$join().$to_sym(); - kind_class = $$($nesting, 'Extensions').$const_get(kind_class_symbol, false); - kind_java_class = (function() {if ($truthy((($a = $$$('::', 'AsciidoctorJ', 'skip_raise')) ? 'constant' : nil))) { - - return $$$($$$('::', 'AsciidoctorJ'), 'Extensions').$const_get(kind_class_symbol, false); - } else { - return nil - }; return nil; })(); - kind_store = ($truthy($b = self.$instance_variable_get(((("" + "@") + (kind)) + "_extensions").$to_sym())) ? $b : self.$instance_variable_set(((("" + "@") + (kind)) + "_extensions").$to_sym(), [])); - extension = (function() {if ((block !== nil)) { - - config = self.$resolve_args(args, 1); - (processor = kind_class.$new(config)).$singleton_class().$enable_dsl(); - if (block.$arity()['$=='](0)) { - $send(processor, 'instance_exec', [], block.$to_proc()) - } else { - Opal.yield1(block, processor) - }; - if ($truthy(processor['$process_block_given?']())) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location())) - }; - processor.$freeze(); - return $$($nesting, 'ProcessorExtension').$new(kind, processor); - } else { - - $c = self.$resolve_args(args, 2), $b = Opal.to_ary($c), (processor = ($b[0] == null ? nil : $b[0])), (config = ($b[1] == null ? nil : $b[1])), $c; - if ($truthy((processor_class = $$($nesting, 'Helpers').$resolve_class(processor)))) { - - if ($truthy(($truthy($b = $rb_lt(processor_class, kind_class)) ? $b : ($truthy($c = kind_java_class) ? $rb_lt(processor_class, kind_java_class) : $c)))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "Invalid type for " + (kind_name) + " extension: " + (processor)) - }; - processor_instance = processor_class.$new(config); - processor_instance.$freeze(); - return $$($nesting, 'ProcessorExtension').$new(kind, processor_instance); - } else if ($truthy(($truthy($b = kind_class['$==='](processor)) ? $b : ($truthy($c = kind_java_class) ? kind_java_class['$==='](processor) : $c)))) { - - processor.$update_config(config); - processor.$freeze(); - return $$($nesting, 'ProcessorExtension').$new(kind, processor); - } else { - return self.$raise($$$('::', 'ArgumentError'), "" + "Invalid arguments specified for registering " + (kind_name) + " extension: " + (args)) - }; - }; return nil; })(); - if (extension.$config()['$[]']("position")['$=='](">>")) { - - kind_store.$unshift(extension); - } else { - - kind_store['$<<'](extension); - }; - return extension; - }, $Registry_add_document_processor$87.$$arity = 2); - - Opal.def(self, '$add_syntax_processor', $Registry_add_syntax_processor$89 = function $$add_syntax_processor(kind, args) { - var $iter = $Registry_add_syntax_processor$89.$$p, block = $iter || nil, $$90, $a, $b, $c, self = this, kind_name = nil, kind_class_symbol = nil, kind_class = nil, kind_java_class = nil, kind_store = nil, name = nil, config = nil, processor = nil, $writer = nil, processor_class = nil, processor_instance = nil; - - if ($iter) $Registry_add_syntax_processor$89.$$p = null; - - - if ($iter) $Registry_add_syntax_processor$89.$$p = null;; - kind_name = kind.$to_s().$tr("_", " "); - kind_class_symbol = $send(kind_name.$split(), 'map', [], ($$90 = function(it){var self = $$90.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$capitalize();}, $$90.$$s = self, $$90.$$arity = 1, $$90))['$<<']("Processor").$join().$to_sym(); - kind_class = $$($nesting, 'Extensions').$const_get(kind_class_symbol, false); - kind_java_class = (function() {if ($truthy((($a = $$$('::', 'AsciidoctorJ', 'skip_raise')) ? 'constant' : nil))) { - - return $$$($$$('::', 'AsciidoctorJ'), 'Extensions').$const_get(kind_class_symbol, false); - } else { - return nil - }; return nil; })(); - kind_store = ($truthy($b = self.$instance_variable_get(((("" + "@") + (kind)) + "_extensions").$to_sym())) ? $b : self.$instance_variable_set(((("" + "@") + (kind)) + "_extensions").$to_sym(), $hash2([], {}))); - if ((block !== nil)) { - - $c = self.$resolve_args(args, 2), $b = Opal.to_ary($c), (name = ($b[0] == null ? nil : $b[0])), (config = ($b[1] == null ? nil : $b[1])), $c; - (processor = kind_class.$new(self.$as_symbol(name), config)).$singleton_class().$enable_dsl(); - if (block.$arity()['$=='](0)) { - $send(processor, 'instance_exec', [], block.$to_proc()) - } else { - Opal.yield1(block, processor) - }; - if ($truthy((name = self.$as_symbol(processor.$name())))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension at " + (block.$source_location())) - }; - if ($truthy(processor['$process_block_given?']())) { - } else { - self.$raise($$$('::', 'NoMethodError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location())) - }; - processor.$freeze(); - - $writer = [name, $$($nesting, 'ProcessorExtension').$new(kind, processor)]; - $send(kind_store, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - - $c = self.$resolve_args(args, 3), $b = Opal.to_ary($c), (processor = ($b[0] == null ? nil : $b[0])), (name = ($b[1] == null ? nil : $b[1])), (config = ($b[2] == null ? nil : $b[2])), $c; - if ($truthy((processor_class = $$($nesting, 'Helpers').$resolve_class(processor)))) { - - if ($truthy(($truthy($b = $rb_lt(processor_class, kind_class)) ? $b : ($truthy($c = kind_java_class) ? $rb_lt(processor_class, kind_java_class) : $c)))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "Class specified for " + (kind_name) + " extension does not inherit from " + (kind_class) + ": " + (processor)) - }; - processor_instance = processor_class.$new(self.$as_symbol(name), config); - if ($truthy((name = self.$as_symbol(processor_instance.$name())))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension: " + (processor)) - }; - processor_instance.$freeze(); - - $writer = [name, $$($nesting, 'ProcessorExtension').$new(kind, processor_instance)]; - $send(kind_store, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else if ($truthy(($truthy($b = kind_class['$==='](processor)) ? $b : ($truthy($c = kind_java_class) ? kind_java_class['$==='](processor) : $c)))) { - - processor.$update_config(config); - if ($truthy((name = (function() {if ($truthy(name)) { - - - $writer = [self.$as_symbol(name)]; - $send(processor, 'name=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - - return self.$as_symbol(processor.$name()); - }; return nil; })()))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension: " + (processor)) - }; - processor.$freeze(); - - $writer = [name, $$($nesting, 'ProcessorExtension').$new(kind, processor)]; - $send(kind_store, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - return self.$raise($$$('::', 'ArgumentError'), "" + "Invalid arguments specified for registering " + (kind_name) + " extension: " + (args)) - }; - }; - }, $Registry_add_syntax_processor$89.$$arity = 2); - - Opal.def(self, '$resolve_args', $Registry_resolve_args$91 = function $$resolve_args(args, expect) { - var self = this, opts = nil, missing = nil; - - - opts = (function() {if ($truthy($$$('::', 'Hash')['$==='](args['$[]'](-1)))) { - return args.$pop() - } else { - return $hash2([], {}) - }; return nil; })(); - if (expect['$=='](1)) { - return opts}; - if ($truthy($rb_gt((missing = $rb_minus($rb_minus(expect, 1), args.$size())), 0))) { - args = $rb_plus(args, $$$('::', 'Array').$new(missing)) - } else if ($truthy($rb_lt(missing, 0))) { - args.$pop(missing['$-@']())}; - args['$<<'](opts); - return args; - }, $Registry_resolve_args$91.$$arity = 2); - return (Opal.def(self, '$as_symbol', $Registry_as_symbol$92 = function $$as_symbol(name) { - var self = this; - - if ($truthy(name)) { - return name.$to_sym() - } else { - return nil - } - }, $Registry_as_symbol$92.$$arity = 1), nil) && 'as_symbol'; - })($nesting[0], null, $nesting); - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $generate_name$93, $next_auto_id$94, $groups$95, $create$96, $register$97, $unregister_all$98, $unregister$99; - - - - Opal.def(self, '$generate_name', $generate_name$93 = function $$generate_name() { - var self = this; - - return "" + "extgrp" + (self.$next_auto_id()) - }, $generate_name$93.$$arity = 0); - - Opal.def(self, '$next_auto_id', $next_auto_id$94 = function $$next_auto_id() { - var $a, self = this; - if (self.auto_id == null) self.auto_id = nil; - - - self.auto_id = ($truthy($a = self.auto_id) ? $a : -1); - return (self.auto_id = $rb_plus(self.auto_id, 1)); - }, $next_auto_id$94.$$arity = 0); - - Opal.def(self, '$groups', $groups$95 = function $$groups() { - var $a, self = this; - if (self.groups == null) self.groups = nil; - - return (self.groups = ($truthy($a = self.groups) ? $a : $hash2([], {}))) - }, $groups$95.$$arity = 0); - - Opal.def(self, '$create', $create$96 = function $$create(name) { - var $iter = $create$96.$$p, block = $iter || nil, $a, self = this; - - if ($iter) $create$96.$$p = null; - - - if ($iter) $create$96.$$p = null;; - - if (name == null) { - name = nil; - }; - if ((block !== nil)) { - return $$($nesting, 'Registry').$new($hash(($truthy($a = name) ? $a : self.$generate_name()), block)) - } else { - return $$($nesting, 'Registry').$new() - }; - }, $create$96.$$arity = -1); - - Opal.def(self, '$register', $register$97 = function $$register($a) { - var $iter = $register$97.$$p, block = $iter || nil, $post_args, args, $b, self = this, argc = nil, resolved_group = nil, group = nil, name = nil, $writer = nil; - - if ($iter) $register$97.$$p = null; - - - if ($iter) $register$97.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - argc = args.$size(); - if ((block !== nil)) { - resolved_group = block - } else if ($truthy((group = args.$pop()))) { - resolved_group = ($truthy($b = $$($nesting, 'Helpers').$resolve_class(group)) ? $b : group) - } else { - self.$raise($$$('::', 'ArgumentError'), "Extension group to register not specified") - }; - name = ($truthy($b = args.$pop()) ? $b : self.$generate_name()); - if ($truthy(args['$empty?']())) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "Wrong number of arguments (" + (argc) + " for 1..2)") - }; - - $writer = [name.$to_sym(), resolved_group]; - $send(self.$groups(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - }, $register$97.$$arity = -1); - - Opal.def(self, '$unregister_all', $unregister_all$98 = function $$unregister_all() { - var self = this; - - - self.groups = $hash2([], {}); - return nil; - }, $unregister_all$98.$$arity = 0); - return (Opal.def(self, '$unregister', $unregister$99 = function $$unregister($a) { - var $post_args, names, $$100, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - names = $post_args;; - $send(names, 'each', [], ($$100 = function(group){var self = $$100.$$s || this; - if (self.groups == null) self.groups = nil; - - - - if (group == null) { - group = nil; - }; - return self.groups.$delete(group.$to_sym());}, $$100.$$s = self, $$100.$$arity = 1, $$100)); - return nil; - }, $unregister$99.$$arity = -1), nil) && 'unregister'; - })(Opal.get_singleton_class(self), $nesting); - })($nesting[0], $nesting) - })($nesting[0], $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/stylesheet"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$rstrip', '$read', '$join']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Stylesheets'); - - var $nesting = [self].concat($parent_nesting), $Stylesheets_primary_stylesheet_data$1; - - self.$$prototype.primary_stylesheet_data = nil; - return (Opal.def(self, '$primary_stylesheet_data', $Stylesheets_primary_stylesheet_data$1 = function $$primary_stylesheet_data() { - var $a, self = this; - - return (self.primary_stylesheet_data = ($truthy($a = self.primary_stylesheet_data) ? $a : $$$('::', 'IO').$read($$$('::', 'File').$join("css", "asciidoctor.css")).$rstrip())) - }, $Stylesheets_primary_stylesheet_data$1.$$arity = 0), nil) && 'primary_stylesheet_data' - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/document"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass; - - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Document'); - - var $nesting = [self].concat($parent_nesting), $Document_fill_datetime_attributes$1; - - return (Opal.def(self, '$fill_datetime_attributes', $Document_fill_datetime_attributes$1 = function $$fill_datetime_attributes(attrs, input_mtime) { - var self = this; - - - var $truthy = Opal.truthy - var $falsy = Opal.falsy - var nil = Opal.nil - var utc_offset - var source_date_epoch - - var getYear = function (time, utc_offset) { - return utc_offset === 0 ? time.getUTCFullYear() : time.getFullYear() - } - var getMonth = function (time, utc_offset) { - return utc_offset === 0 ? time.getUTCMonth() : time.getMonth() - } - var getDay = function (time, utc_offset) { - return utc_offset === 0 ? time.getUTCDate() : time.getDate() - } - var getHours = function (time, utc_offset) { - return utc_offset === 0 ? time.getUTCHours() : time.getHours() - } - - var now = new Date() - // See https://reproducible-builds.org/specs/source-date-epoch/ - if (Opal.const_get_qualified('::', 'ENV')['$key?']('SOURCE_DATE_EPOCH')) { - now.setTime(parseInt(Opal.const_get_qualified('::', 'ENV')['$[]']('SOURCE_DATE_EPOCH')) * 1000) - source_date_epoch = now - utc_offset = 0 // utc - } else { - utc_offset = -now.getTimezoneOffset() / 60 // local date - } - // localdate and localyear - if ($truthy((localdate = attrs['$[]']('localdate')))) { - if ($falsy(localyear = attrs['$[]']('localyear'))) { - localyear = localdate.indexOf('-') === 4 ? localdate.substring(0, 4) : nil - attrs['$[]=']('localyear', localyear) - } - } else { - var now_year = getYear(now, utc_offset).toString() - var now_month = ('0' + (getMonth(now, utc_offset) + 1)).slice(-2) - var now_day = ('0' + getDay(now, utc_offset)).slice(-2) - localdate = now_year + '-' + now_month + '-' + now_day - attrs['$[]=']('localdate', localdate) - localyear = now_year - attrs['$[]=']('localyear', now_year) - } - // localtime - if ($falsy((localtime = attrs['$[]']('localtime')))) { - var hours = ('0' + (getHours(now, utc_offset))).slice(-2) - var minutes = ('0' + (now.getMinutes())).slice(-2) - var seconds = ('0' + (now.getSeconds())).slice(-2) - var utc_offset_format - if (utc_offset === 0) { - utc_offset_format = 'UTC' - } else if (utc_offset > 0) { - utc_offset_format = ('+0' + (utc_offset * 100)).slice(-5) - } else { - utc_offset_format = ('-0' + (-utc_offset * 100)).slice(-5) - } - localtime = hours + ':' + minutes + ':' + seconds + ' ' + utc_offset_format - attrs['$[]=']('localtime', localtime) - } - // localdatetime - if ($falsy((localdatetime = attrs['$[]']('localdatetime')))) { - localdatetime = localdate + ' ' + localtime - attrs['$[]=']('localdatetime', localdatetime) - } - - // docdate, doctime and docdatetime should default to localdate, localtime and localdatetime if not otherwise set - if ($truthy(source_date_epoch)) { - input_mtime = source_date_epoch - } else if ($truthy(input_mtime)) { - utc_offset = -input_mtime.getTimezoneOffset() / 60 - } else { - input_mtime = now - } - - // docdate and docyear - if ($truthy(docdate = attrs['$[]']('docdate'))) { - attrs['$[]=']('docyear', docdate.indexOf('-') === 4 ? docdate.substring(0, 4) : nil) - } else { - var mtime_year = getYear(input_mtime, utc_offset).toString() - var mtime_month = ('0' + (getMonth(input_mtime, utc_offset) + 1)).slice(-2) - var mtime_day = ('0' + (getDay(input_mtime, utc_offset))).slice(-2) - docdate = mtime_year + '-' + mtime_month + '-' + mtime_day - attrs['$[]=']('docdate', docdate) - if ($falsy(attrs['$[]']('docyear'))) { - attrs['$[]=']('docyear', mtime_year) - } - } - // doctime - if ($falsy(doctime = attrs['$[]']('doctime'))) { - var mtime_hours = ('0' + (getHours(input_mtime, utc_offset))).slice(-2) - var mtime_minutes = ('0' + (input_mtime.getMinutes())).slice(-2) - var mtime_seconds = ('0' + (input_mtime.getSeconds())).slice(-2) - if (utc_offset === 0) { - utc_offset_format = 'UTC' - } else if (utc_offset > 0) { - utc_offset_format = ('+0' + (utc_offset * 100)).slice(-5) - } else { - utc_offset_format = ('-0' + (-utc_offset * 100)).slice(-5) - } - doctime = mtime_hours + ':' + mtime_minutes + ':' + mtime_seconds + ' ' + utc_offset_format - attrs['$[]=']('doctime', doctime) - } - // docdatetime - if ($falsy(attrs['$[]']('docdatetime'))) { - attrs['$[]=']('docdatetime', docdate + ' ' + doctime) - } - return nil - - }, $Document_fill_datetime_attributes$1.$$arity = 2), nil) && 'fill_datetime_attributes' - })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/substitutors"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module; - - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'Substitutors'); - - var $nesting = [self].concat($parent_nesting), $Substitutors_sub_placeholder$1; - - - Opal.def(self, '$sub_placeholder', $Substitutors_sub_placeholder$1 = function $$sub_placeholder(format_string, replacement) { - var self = this; - - return format_string.replace('%s', replacement); - }, $Substitutors_sub_placeholder$1.$$arity = 2) - })($nesting[0], $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/parser"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy; - - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Parser'); - - var $nesting = [self].concat($parent_nesting), $Parser_uniform$ques$1, $Parser_uniform$ques$2; - - if ($truthy(String.prototype.repeat)) { - return (Opal.defs(self, '$uniform?', $Parser_uniform$ques$1 = function(str, chr, len) { - var self = this; - - return chr.repeat(len) === str; - }, $Parser_uniform$ques$1.$$arity = 3), nil) && 'uniform?' - } else { - return (Opal.defs(self, '$uniform?', $Parser_uniform$ques$2 = function(str, chr, len) { - var self = this; - - return Array.apply(null, { length: len }).map(function () { return chr }).join('') === str; - }, $Parser_uniform$ques$2.$$arity = 3), nil) && 'uniform?' - } - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/syntax_highlighter"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy; - - Opal.add_stubs(['$key?', '$registry', '$[]', '$include?', '$include', '$empty?', '$debug', '$logger', '$join', '$keys']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'SyntaxHighlighter'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'Factory'); - - var $nesting = [self].concat($parent_nesting), $Factory_for$1; - - - Opal.def(self, '$for', $Factory_for$1 = function(name) { - var self = this; - - if ($truthy(self.$registry()['$key?'](name))) { - return self.$registry()['$[]'](name) - } else { - - if ($truthy(self['$include?']($$($nesting, 'Logging')))) { - } else { - self.$include($$($nesting, 'Logging')) - }; - if ($truthy(self.$registry()['$empty?']())) { - self.$logger().$debug("no syntax highlighter available, functionality disabled.") - } else { - self.$logger().$debug("" + "syntax highlighter named '" + (name) + "' is not available, must be one of: '" + (self.$registry().$keys().$join("', '")) + "'.") - }; - return nil; - } - }, $Factory_for$1.$$arity = 1) - })($nesting[0], $nesting) - })($nesting[0], $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - self.$require("asciidoctor/js/asciidoctor_ext/stylesheet"); - self.$require("asciidoctor/js/asciidoctor_ext/document"); - self.$require("asciidoctor/js/asciidoctor_ext/substitutors"); - self.$require("asciidoctor/js/asciidoctor_ext/parser"); - self.$require("asciidoctor/js/asciidoctor_ext/syntax_highlighter"); - -// Load specific runtime -self.$require("asciidoctor/js/asciidoctor_ext/browser"); -; -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/logger"] = function(Opal) { - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$chr', '$rjust', '$message_as_string', '$<', '$write', '$call', '$[]']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Logger'); - - var $nesting = [self].concat($parent_nesting), $Logger_add$2; - - self.$$prototype.level = self.$$prototype.progname = self.$$prototype.pipe = self.$$prototype.formatter = nil; - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Formatter'); - - var $nesting = [self].concat($parent_nesting), $Formatter_call$1; - - return (Opal.def(self, '$call', $Formatter_call$1 = function $$call(severity, time, progname, msg) { - var self = this, time_format = nil; - - - time_format = time.getFullYear() + '-' + ('0'+(time.getMonth()+1)).slice(-2) + '-' + ('0'+time.getDate()).slice(-2) + 'T' + ('0'+time.getHours()).slice(-2) + ':' + ('0'+time.getMinutes()).slice(-2) + ':' + ('0'+time.getSeconds()).slice(-2) + '.' + ('00' + new Date().getMilliseconds() * 1000).slice(-6); - return "" + (severity.$chr()) + ", [" + (time_format) + "] " + (severity.$rjust(5)) + " -- " + (progname) + ": " + (self.$message_as_string(msg)); - }, $Formatter_call$1.$$arity = 4), nil) && 'call' - })($nesting[0], null, $nesting); - return (Opal.def(self, '$add', $Logger_add$2 = function $$add(severity, message, progname) { - var $iter = $Logger_add$2.$$p, block = $iter || nil, $a, self = this; - - if ($iter) $Logger_add$2.$$p = null; - - - if ($iter) $Logger_add$2.$$p = null;; - - if (message == null) { - message = nil; - }; - - if (progname == null) { - progname = nil; - }; - if ($truthy($rb_lt((severity = ($truthy($a = severity) ? $a : $$($nesting, 'UNKNOWN'))), self.level))) { - return true}; - progname = ($truthy($a = progname) ? $a : self.progname); - if ($truthy(message)) { - } else if ((block !== nil)) { - message = Opal.yieldX(block, []) - } else { - - message = progname; - progname = self.progname; - }; - self.pipe.$write(self.formatter.$call(($truthy($a = $$($nesting, 'SEVERITY_LABELS')['$[]'](severity)) ? $a : "ANY"), new Date(), progname, message)); - return true; - }, $Logger_add$2.$$arity = -2), nil) && 'add'; - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/postscript"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - self.$require("asciidoctor/converter/composite"); - self.$require("asciidoctor/converter/html5"); - self.$require("asciidoctor/extensions"); - self.$require("asciidoctor/js/asciidoctor_ext"); - return self.$require("asciidoctor/js/opal_ext/logger"); -}; - -/* Generated by Opal 0.11.99.dev */ -(function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy; - - Opal.add_stubs(['$require', '$==', '$tap', '$each', '$constants', '$const_get', '$downcase', '$to_s', '$[]=', '$-', '$upcase', '$[]', '$values', '$new', '$attr_reader', '$instance_variable_set', '$send', '$singleton_class', '$<<', '$define', '$dirname', '$absolute_path', '$__dir__', '$join', '$home', '$pwd', '$to_set', '$chr', '$each_key', '$slice', '$length', '$merge', '$default=', '$drop', '$insert']); - - self.$require("set"); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - self.$require("asciidoctor/js") - } else { - nil - }; - (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting), $a, $b, $Asciidoctor$7, $Asciidoctor$9, $Asciidoctor$11, $Asciidoctor$13, $writer = nil; - - - Opal.const_set($nesting[0], 'RUBY_ENGINE_OPAL', Opal.const_set($nesting[0], 'RUBY_ENGINE', $$$('::', 'RUBY_ENGINE'))['$==']("opal")); - (function($base, $parent_nesting) { - var self = $module($base, 'SafeMode'); - - var $nesting = [self].concat($parent_nesting), $SafeMode$1, $SafeMode_value_for_name$3, $SafeMode_name_for_value$4, $SafeMode_names$5; - - - Opal.const_set($nesting[0], 'UNSAFE', 0); - Opal.const_set($nesting[0], 'SAFE', 1); - Opal.const_set($nesting[0], 'SERVER', 10); - Opal.const_set($nesting[0], 'SECURE', 20); - self.names_by_value = $send($hash2([], {}), 'tap', [], ($SafeMode$1 = function(accum){var self = $SafeMode$1.$$s || this, $$2; - - - - if (accum == null) { - accum = nil; - }; - return $send(self.$constants(false), 'each', [], ($$2 = function(sym){var self = $$2.$$s || this, $writer = nil; - - - - if (sym == null) { - sym = nil; - }; - $writer = [self.$const_get(sym, false), sym.$to_s().$downcase()]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$2.$$s = self, $$2.$$arity = 1, $$2));}, $SafeMode$1.$$s = self, $SafeMode$1.$$arity = 1, $SafeMode$1)); - Opal.defs(self, '$value_for_name', $SafeMode_value_for_name$3 = function $$value_for_name(name) { - var self = this; - - return self.$const_get(name.$upcase(), false) - }, $SafeMode_value_for_name$3.$$arity = 1); - Opal.defs(self, '$name_for_value', $SafeMode_name_for_value$4 = function $$name_for_value(value) { - var self = this; - if (self.names_by_value == null) self.names_by_value = nil; - - return self.names_by_value['$[]'](value) - }, $SafeMode_name_for_value$4.$$arity = 1); - Opal.defs(self, '$names', $SafeMode_names$5 = function $$names() { - var self = this; - if (self.names_by_value == null) self.names_by_value = nil; - - return self.names_by_value.$values() - }, $SafeMode_names$5.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Compliance'); - - var $nesting = [self].concat($parent_nesting); - - - self.keys = $$$('::', 'Set').$new(); - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $define$6; - - - self.$attr_reader("keys"); - return (Opal.def(self, '$define', $define$6 = function $$define(key, value) { - var self = this; - if (self.keys == null) self.keys = nil; - - - self.$instance_variable_set("" + "@" + (key), value); - self.$singleton_class().$send("attr_accessor", key); - self.keys['$<<'](key); - return nil; - }, $define$6.$$arity = 2), nil) && 'define'; - })(Opal.get_singleton_class(self), $nesting); - self.$define("block_terminates_paragraph", true); - self.$define("strict_verbatim_paragraphs", true); - self.$define("underline_style_section_titles", true); - self.$define("unwrap_standalone_preamble", true); - self.$define("attribute_missing", "skip"); - self.$define("attribute_undefined", "drop-line"); - self.$define("shorthand_property_syntax", true); - self.$define("natural_xrefs", true); - self.$define("unique_id_start_index", 2); - self.$define("markdown_syntax", true); - })($nesting[0], $nesting); - if ($truthy((($a = $$($nesting, 'ROOT_DIR', 'skip_raise')) ? 'constant' : nil))) { - } else { - Opal.const_set($nesting[0], 'ROOT_DIR', $$$('::', 'File').$dirname($$$('::', 'File').$absolute_path(self.$__dir__()))) - }; - Opal.const_set($nesting[0], 'LIB_DIR', $$$('::', 'File').$join($$($nesting, 'ROOT_DIR'), "lib")); - Opal.const_set($nesting[0], 'DATA_DIR', $$$('::', 'File').$join($$($nesting, 'ROOT_DIR'), "data")); - Opal.const_set($nesting[0], 'USER_HOME', (function() { try { - return $$$('::', 'Dir').$home() - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - - return ($truthy($b = $$$('::', 'ENV')['$[]']("HOME")) ? $b : $$$('::', 'Dir').$pwd()); - } finally { Opal.pop_exception() } - } else { throw $err; } - }})()); - Opal.const_set($nesting[0], 'LF', "\n"); - Opal.const_set($nesting[0], 'NULL', "\u0000"); - Opal.const_set($nesting[0], 'TAB', "\t"); - Opal.const_set($nesting[0], 'MAX_INT', 9007199254740991); - Opal.const_set($nesting[0], 'UTF_8', $$$($$$('::', 'Encoding'), 'UTF_8')); - Opal.const_set($nesting[0], 'BOM_BYTES_UTF_8', [239, 187, 191]); - Opal.const_set($nesting[0], 'BOM_BYTES_UTF_16LE', [255, 254]); - Opal.const_set($nesting[0], 'BOM_BYTES_UTF_16BE', [254, 255]); - Opal.const_set($nesting[0], 'FILE_READ_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) { - return "r" - } else { - return "rb:utf-8:utf-8" - }; return nil; })()); - Opal.const_set($nesting[0], 'URI_READ_MODE', $$($nesting, 'FILE_READ_MODE')); - Opal.const_set($nesting[0], 'FILE_WRITE_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) { - return "w" - } else { - return "w:utf-8" - }; return nil; })()); - Opal.const_set($nesting[0], 'DEFAULT_DOCTYPE', "article"); - Opal.const_set($nesting[0], 'DEFAULT_BACKEND', "html5"); - Opal.const_set($nesting[0], 'DEFAULT_STYLESHEET_KEYS', ["", "DEFAULT"].$to_set()); - Opal.const_set($nesting[0], 'DEFAULT_STYLESHEET_NAME', "asciidoctor.css"); - Opal.const_set($nesting[0], 'BACKEND_ALIASES', $hash2(["html", "docbook"], {"html": "html5", "docbook": "docbook5"})); - Opal.const_set($nesting[0], 'DEFAULT_PAGE_WIDTHS', $hash2(["docbook"], {"docbook": 425})); - Opal.const_set($nesting[0], 'DEFAULT_EXTENSIONS', $hash2(["html", "docbook", "pdf", "epub", "manpage", "asciidoc"], {"html": ".html", "docbook": ".xml", "pdf": ".pdf", "epub": ".epub", "manpage": ".man", "asciidoc": ".adoc"})); - Opal.const_set($nesting[0], 'ASCIIDOC_EXTENSIONS', $hash2([".adoc", ".asciidoc", ".asc", ".ad", ".txt"], {".adoc": true, ".asciidoc": true, ".asc": true, ".ad": true, ".txt": true})); - Opal.const_set($nesting[0], 'SETEXT_SECTION_LEVELS', $hash2(["=", "-", "~", "^", "+"], {"=": 0, "-": 1, "~": 2, "^": 3, "+": 4})); - Opal.const_set($nesting[0], 'ADMONITION_STYLES', ["NOTE", "TIP", "IMPORTANT", "WARNING", "CAUTION"].$to_set()); - Opal.const_set($nesting[0], 'ADMONITION_STYLE_HEADS', $send($$$('::', 'Set').$new(), 'tap', [], ($Asciidoctor$7 = function(accum){var self = $Asciidoctor$7.$$s || this, $$8; - - - - if (accum == null) { - accum = nil; - }; - return $send($$($nesting, 'ADMONITION_STYLES'), 'each', [], ($$8 = function(s){var self = $$8.$$s || this; - - - - if (s == null) { - s = nil; - }; - return accum['$<<'](s.$chr());}, $$8.$$s = self, $$8.$$arity = 1, $$8));}, $Asciidoctor$7.$$s = self, $Asciidoctor$7.$$arity = 1, $Asciidoctor$7))); - Opal.const_set($nesting[0], 'PARAGRAPH_STYLES', ["comment", "example", "literal", "listing", "normal", "open", "pass", "quote", "sidebar", "source", "verse", "abstract", "partintro"].$to_set()); - Opal.const_set($nesting[0], 'VERBATIM_STYLES', ["literal", "listing", "source", "verse"].$to_set()); - Opal.const_set($nesting[0], 'DELIMITED_BLOCKS', $hash2(["--", "----", "....", "====", "****", "____", "++++", "|===", ",===", ":===", "!===", "////", "```"], {"--": ["open", ["comment", "example", "literal", "listing", "pass", "quote", "sidebar", "source", "verse", "admonition", "abstract", "partintro"].$to_set()], "----": ["listing", ["literal", "source"].$to_set()], "....": ["literal", ["listing", "source"].$to_set()], "====": ["example", ["admonition"].$to_set()], "****": ["sidebar", $$$('::', 'Set').$new()], "____": ["quote", ["verse"].$to_set()], "++++": ["pass", ["stem", "latexmath", "asciimath"].$to_set()], "|===": ["table", $$$('::', 'Set').$new()], ",===": ["table", $$$('::', 'Set').$new()], ":===": ["table", $$$('::', 'Set').$new()], "!===": ["table", $$$('::', 'Set').$new()], "////": ["comment", $$$('::', 'Set').$new()], "```": ["fenced_code", $$$('::', 'Set').$new()]})); - Opal.const_set($nesting[0], 'DELIMITED_BLOCK_HEADS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$9 = function(accum){var self = $Asciidoctor$9.$$s || this, $$10; - - - - if (accum == null) { - accum = nil; - }; - return $send($$($nesting, 'DELIMITED_BLOCKS'), 'each_key', [], ($$10 = function(k){var self = $$10.$$s || this, $writer = nil; - - - - if (k == null) { - k = nil; - }; - $writer = [k.$slice(0, 2), true]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$10.$$s = self, $$10.$$arity = 1, $$10));}, $Asciidoctor$9.$$s = self, $Asciidoctor$9.$$arity = 1, $Asciidoctor$9))); - Opal.const_set($nesting[0], 'DELIMITED_BLOCK_TAILS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$11 = function(accum){var self = $Asciidoctor$11.$$s || this, $$12; - - - - if (accum == null) { - accum = nil; - }; - return $send($$($nesting, 'DELIMITED_BLOCKS'), 'each_key', [], ($$12 = function(k){var self = $$12.$$s || this, $writer = nil; - - - - if (k == null) { - k = nil; - }; - if (k.$length()['$=='](4)) { - - $writer = [k, k['$[]']($rb_minus(k.$length(), 1))]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - return nil - };}, $$12.$$s = self, $$12.$$arity = 1, $$12));}, $Asciidoctor$11.$$s = self, $Asciidoctor$11.$$arity = 1, $Asciidoctor$11))); - Opal.const_set($nesting[0], 'CAPTION_ATTRIBUTE_NAMES', $hash2(["example", "figure", "listing", "table"], {"example": "example-caption", "figure": "figure-caption", "listing": "listing-caption", "table": "table-caption"})); - Opal.const_set($nesting[0], 'LAYOUT_BREAK_CHARS', $hash2(["'", "<"], {"'": "thematic_break", "<": "page_break"})); - Opal.const_set($nesting[0], 'MARKDOWN_THEMATIC_BREAK_CHARS', $hash2(["-", "*", "_"], {"-": "thematic_break", "*": "thematic_break", "_": "thematic_break"})); - Opal.const_set($nesting[0], 'HYBRID_LAYOUT_BREAK_CHARS', $$($nesting, 'LAYOUT_BREAK_CHARS').$merge($$($nesting, 'MARKDOWN_THEMATIC_BREAK_CHARS'))); - Opal.const_set($nesting[0], 'NESTABLE_LIST_CONTEXTS', ["ulist", "olist", "dlist"]); - Opal.const_set($nesting[0], 'ORDERED_LIST_STYLES', ["arabic", "loweralpha", "lowerroman", "upperalpha", "upperroman"]); - Opal.const_set($nesting[0], 'ORDERED_LIST_KEYWORDS', $hash2(["loweralpha", "lowerroman", "upperalpha", "upperroman"], {"loweralpha": "a", "lowerroman": "i", "upperalpha": "A", "upperroman": "I"})); - Opal.const_set($nesting[0], 'ATTR_REF_HEAD', "{"); - Opal.const_set($nesting[0], 'LIST_CONTINUATION', "+"); - Opal.const_set($nesting[0], 'HARD_LINE_BREAK', " +"); - Opal.const_set($nesting[0], 'LINE_CONTINUATION', " \\"); - Opal.const_set($nesting[0], 'LINE_CONTINUATION_LEGACY', " +"); - Opal.const_set($nesting[0], 'BLOCK_MATH_DELIMITERS', $hash2(["asciimath", "latexmath"], {"asciimath": ["\\$", "\\$"], "latexmath": ["\\[", "\\]"]})); - Opal.const_set($nesting[0], 'INLINE_MATH_DELIMITERS', $hash2(["asciimath", "latexmath"], {"asciimath": ["\\$", "\\$"], "latexmath": ["\\(", "\\)"]})); - - $writer = ["asciimath"]; - $send(Opal.const_set($nesting[0], 'STEM_TYPE_ALIASES', $hash2(["latexmath", "latex", "tex"], {"latexmath": "latexmath", "latex": "latexmath", "tex": "latexmath"})), 'default=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - Opal.const_set($nesting[0], 'FONT_AWESOME_VERSION', "4.7.0"); - Opal.const_set($nesting[0], 'HIGHLIGHT_JS_VERSION', "9.18.3"); - Opal.const_set($nesting[0], 'MATHJAX_VERSION', "2.7.9"); - Opal.const_set($nesting[0], 'DEFAULT_ATTRIBUTES', $hash2(["appendix-caption", "appendix-refsig", "caution-caption", "chapter-refsig", "example-caption", "figure-caption", "important-caption", "last-update-label", "note-caption", "part-refsig", "prewrap", "sectids", "section-refsig", "table-caption", "tip-caption", "toc-placement", "toc-title", "untitled-label", "version-label", "warning-caption"], {"appendix-caption": "Appendix", "appendix-refsig": "Appendix", "caution-caption": "Caution", "chapter-refsig": "Chapter", "example-caption": "Example", "figure-caption": "Figure", "important-caption": "Important", "last-update-label": "Last updated", "note-caption": "Note", "part-refsig": "Part", "prewrap": "", "sectids": "", "section-refsig": "Section", "table-caption": "Table", "tip-caption": "Tip", "toc-placement": "auto", "toc-title": "Table of Contents", "untitled-label": "Untitled", "version-label": "Version", "warning-caption": "Warning"})); - Opal.const_set($nesting[0], 'FLEXIBLE_ATTRIBUTES', ["sectnums"]); - Opal.const_set($nesting[0], 'INTRINSIC_ATTRIBUTES', $hash2(["startsb", "endsb", "vbar", "caret", "asterisk", "tilde", "plus", "backslash", "backtick", "blank", "empty", "sp", "two-colons", "two-semicolons", "nbsp", "deg", "zwsp", "quot", "apos", "lsquo", "rsquo", "ldquo", "rdquo", "wj", "brvbar", "pp", "cpp", "amp", "lt", "gt"], {"startsb": "[", "endsb": "]", "vbar": "|", "caret": "^", "asterisk": "*", "tilde": "~", "plus": "+", "backslash": "\\", "backtick": "`", "blank": "", "empty": "", "sp": " ", "two-colons": "::", "two-semicolons": ";;", "nbsp": " ", "deg": "°", "zwsp": "​", "quot": """, "apos": "'", "lsquo": "‘", "rsquo": "’", "ldquo": "“", "rdquo": "”", "wj": "⁠", "brvbar": "¦", "pp": "++", "cpp": "C++", "amp": "&", "lt": "<", "gt": ">"})); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - Opal.const_set($nesting[0], 'QUOTE_SUBS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$13 = function(accum){var self = $Asciidoctor$13.$$s || this, normal = nil, compat = nil; - - - - if (accum == null) { - accum = nil; - }; - - $writer = [false, (normal = [["strong", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?\\*\\*(" + ($$($nesting, 'CC_ALL')) + "+?)\\*\\*", 'm')], ["strong", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?\\*(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\*(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["double", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?\"`(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)`\"(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["single", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:`}])(?:\\[([^\\]]+)\\])?'`(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)`'(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["monospaced", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?``(" + ($$($nesting, 'CC_ALL')) + "+?)``", 'm')], ["monospaced", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:\"'`}])(?:\\[([^\\]]+)\\])?`(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)`(?![" + ($$($nesting, 'CC_WORD')) + "\"'`])", 'm')], ["emphasis", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?__(" + ($$($nesting, 'CC_ALL')) + "+?)__", 'm')], ["emphasis", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?_(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)_(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["mark", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?##(" + ($$($nesting, 'CC_ALL')) + "+?)##", 'm')], ["mark", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + "&;:}])(?:\\[([^\\]]+)\\])?#(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)#(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["superscript", "unconstrained", /\\?(?:\[([^\]]+)\])?\^(\S+?)\^/], ["subscript", "unconstrained", /\\?(?:\[([^\]]+)\])?~(\S+?)~/]])]; - $send(accum, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [true, (compat = normal.$drop(0))]; - $send(accum, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [2, ["double", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?``(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)''(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')]]; - $send(compat, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [3, ["single", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?`(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)'(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')]]; - $send(compat, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [4, ["monospaced", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?\\+\\+(" + ($$($nesting, 'CC_ALL')) + "+?)\\+\\+", 'm')]]; - $send(compat, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [5, ["monospaced", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?\\+(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\+(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')]]; - $send(compat, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return compat.$insert(3, ["emphasis", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?'(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)'(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')]);}, $Asciidoctor$13.$$s = self, $Asciidoctor$13.$$arity = 1, $Asciidoctor$13))); - Opal.const_set($nesting[0], 'REPLACEMENTS', [[/\\?\(C\)/, "©", "none"], [/\\?\(R\)/, "®", "none"], [/\\?\(TM\)/, "™", "none"], [/(?: |\n|^|\\)--(?: |\n|$)/, " — ", "none"], [new RegExp("" + "(" + ($$($nesting, 'CG_WORD')) + ")\\\\?--(?=" + ($$($nesting, 'CG_WORD')) + ")"), "—​", "leading"], [/\\?\.\.\./, "…​", "none"], [/\\?`'/, "’", "none"], [new RegExp("" + "(" + ($$($nesting, 'CG_ALNUM')) + ")\\\\?'(?=" + ($$($nesting, 'CG_ALPHA')) + ")"), "’", "leading"], [/\\?->/, "→", "none"], [/\\?=>/, "⇒", "none"], [/\\?<-/, "←", "none"], [/\\?<=/, "⇐", "none"], [/\\?(&)amp;((?:[a-zA-Z][a-zA-Z]+\d{0,2}|#\d\d\d{0,4}|#x[\da-fA-F][\da-fA-F][\da-fA-F]{0,3});)/, "", "bounding"]]); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - })($nesting[0], $nesting); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/core_ext"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/helpers"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/logging"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/rx"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/substitutors"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/version"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/abstract_node"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/abstract_block"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/attribute_list"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/block"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/callouts"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/converter"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/document"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/inline"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/list"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/parser"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/path_resolver"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/reader"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/section"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/stylesheets"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/table"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/writer"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/load"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/convert"); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/syntax_highlighter"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/timings"); - return self.$require("asciidoctor/js/postscript"); - } else { - return nil - }; -})(Opal); - - -/* global Opal */ - -/** - * Convert a JSON to an (Opal) Hash. - * @private - */ -var toHash = function (object) { - return object && !object.$$is_hash ? Opal.hash2(Object.keys(object), object) : object -} - -/** - * Convert an (Opal) Hash to JSON. - * @private - */ -var fromHash = function (hash) { - var object = {} - if (hash) { - var stringMap = hash.$$smap - for (var stringMapKey in stringMap) { - var stringMapValue = stringMap[stringMapKey] - object[stringMapKey] = stringMapValue === Opal.nil ? undefined : stringMapValue - } - var numericMap = hash.$$map - if (numericMap) { - var positional = [] - for (var numericMapKey in numericMap) { - var entry = numericMap[numericMapKey] - var numericMapValue = entry.value - var index = entry.key - 1 - positional[index] = numericMapValue === Opal.nil ? undefined : numericMapValue - } - if (positional.length > 0) { - object.$positional = positional - } - } - } - return object -} - -var fromHashKeys = function (hash) { - var object = {} - if (hash) { - var data = hash.$$keys - for (var key in data) { - var value = data[key].value - object[key.toString()] = value === Opal.nil ? undefined : value - } - } - return object -} - -/** - * @private - */ -var prepareOptions = function (options) { - options = toHash(options) - if (options) { - var attrs = options['$[]']('attributes') - if (attrs && typeof attrs === 'object' && attrs.constructor.name === 'Object') { - options = options.$dup() - options['$[]=']('attributes', toHash(attrs)) - } - } - return options -} - -function initializeClass (superClass, className, functions, defaultFunctions, argProxyFunctions) { - var scope = Opal.klass(Opal.Object, superClass, className, function () { }) - var postConstructFunction - var initializeFunction - var constructorFunction - var defaultFunctionsOverridden = {} - for (var functionName in functions) { - if (Object.prototype.hasOwnProperty.call(functions, functionName)) { - (function (functionName) { - var userFunction = functions[functionName] - if (functionName === 'postConstruct') { - postConstructFunction = userFunction - } else if (functionName === 'initialize') { - initializeFunction = userFunction - } else if (functionName === 'constructor') { - constructorFunction = userFunction - } else { - if (defaultFunctions && Object.prototype.hasOwnProperty.call(defaultFunctions, functionName)) { - defaultFunctionsOverridden[functionName] = true - } - Opal.def(scope, '$' + functionName, function () { - var args - if (argProxyFunctions && Object.prototype.hasOwnProperty.call(argProxyFunctions, functionName)) { - args = argProxyFunctions[functionName](arguments) - } else { - args = arguments - } - return userFunction.apply(this, args) - }) - } - }(functionName)) - } - } - var initialize - if (typeof constructorFunction === 'function') { - initialize = function () { - var args = Array.from(arguments) - for (var i = 0; i < args.length; i++) { - // convert all (Opal) Hash arguments to JSON. - if (typeof args[i] === 'object' && '$$smap' in args[i]) { - args[i] = fromHash(args[i]) - } - } - args.unshift(null) - var result = new (Function.prototype.bind.apply(constructorFunction, args)) // eslint-disable-line - Object.assign(this, result) - if (typeof postConstructFunction === 'function') { - postConstructFunction.bind(this)() - } - } - } else if (typeof initializeFunction === 'function') { - initialize = function () { - var args = Array.from(arguments) - for (var i = 0; i < args.length; i++) { - // convert all (Opal) Hash arguments to JSON. - if (typeof args[i] === 'object' && '$$smap' in args[i]) { - args[i] = fromHash(args[i]) - } - } - initializeFunction.apply(this, args) - if (typeof postConstructFunction === 'function') { - postConstructFunction.bind(this)() - } - } - } else { - initialize = function () { - Opal.send(this, Opal.find_super_dispatcher(this, 'initialize', initialize)) - if (typeof postConstructFunction === 'function') { - postConstructFunction.bind(this)() - } - } - } - Opal.def(scope, '$initialize', initialize) - Opal.def(scope, 'super', function (func) { - if (typeof func === 'function') { - Opal.send(this, Opal.find_super_dispatcher(this, func.name, func)) - } else { - // Bind the initialize function to super(); - var argumentsList = Array.from(arguments) - for (var i = 0; i < argumentsList.length; i++) { - // convert all (Opal) Hash arguments to JSON. - if (typeof argumentsList[i] === 'object') { - argumentsList[i] = toHash(argumentsList[i]) - } - } - Opal.send(this, Opal.find_super_dispatcher(this, 'initialize', initialize), argumentsList) - } - }) - if (defaultFunctions) { - for (var defaultFunctionName in defaultFunctions) { - if (Object.prototype.hasOwnProperty.call(defaultFunctions, defaultFunctionName) && !Object.prototype.hasOwnProperty.call(defaultFunctionsOverridden, defaultFunctionName)) { - (function (defaultFunctionName) { - var defaultFunction = defaultFunctions[defaultFunctionName] - Opal.def(scope, '$' + defaultFunctionName, function () { - return defaultFunction.apply(this, arguments) - }) - }(defaultFunctionName)) - } - } - } - return scope -} - -// Asciidoctor API - -/** - * @namespace - * @description - * The main application interface (API) for Asciidoctor. - * This API provides methods to parse AsciiDoc content and convert it to various output formats using built-in or third-party converters. - * - * An AsciiDoc document can be as simple as a single line of content, - * though it more commonly starts with a document header that declares the document title and document attribute definitions. - * The document header is then followed by zero or more section titles, optionally nested, to organize the paragraphs, blocks, lists, etc. of the document. - * - * By default, the processor converts the AsciiDoc document to HTML 5 using a built-in converter. - * However, this behavior can be changed by specifying a different backend (e.g., +docbook+). - * A backend is a keyword for an output format (e.g., DocBook). - * That keyword, in turn, is used to select a converter, which carries out the request to convert the document to that format. - * - * @example - * asciidoctor.convertFile('document.adoc', { 'safe': 'safe' }) // Convert an AsciiDoc file - * - * asciidoctor.convert("I'm using *Asciidoctor* version {asciidoctor-version}.", { 'safe': 'safe' }) // Convert an AsciiDoc string - * - * const doc = asciidoctor.loadFile('document.adoc', { 'safe': 'safe' }) // Parse an AsciiDoc file into a document object - * - * const doc = asciidoctor.load("= Document Title\n\nfirst paragraph\n\nsecond paragraph", { 'safe': 'safe' }) // Parse an AsciiDoc string into a document object - */ -var Asciidoctor = Opal.Asciidoctor.$$class - -/** - * Get Asciidoctor core version number. - * - * @returns {string} - the version number of Asciidoctor core. - * @memberof Asciidoctor - */ -Asciidoctor.prototype.getCoreVersion = function () { - return this.$$const.VERSION -} - -/** - * Get Asciidoctor.js runtime environment information. - * - * @returns {Object} - the runtime environment including the ioModule, the platform, the engine and the framework. - * @memberof Asciidoctor - */ -Asciidoctor.prototype.getRuntime = function () { - return { - ioModule: Opal.const_get_qualified('::', 'JAVASCRIPT_IO_MODULE'), - platform: Opal.const_get_qualified('::', 'JAVASCRIPT_PLATFORM'), - engine: Opal.const_get_qualified('::', 'JAVASCRIPT_ENGINE'), - framework: Opal.const_get_qualified('::', 'JAVASCRIPT_FRAMEWORK') - } -} - -/** - * Parse the AsciiDoc source input into an {@link Document} and convert it to the specified backend format. - * - * Accepts input as a Buffer or String. - * - * @param {string|Buffer} input - AsciiDoc input as String or Buffer - * @param {Object} options - a JSON of options to control processing (default: {}) - * @returns {string|Document} - the {@link Document} object if the converted String is written to a file, - * otherwise the converted String - * @example - * var input = '= Hello, AsciiDoc!\n' + - * 'Guillaume Grossetie \n\n' + - * 'An introduction to http://asciidoc.org[AsciiDoc].\n\n' + - * '== First Section\n\n' + - * '* item 1\n' + - * '* item 2\n'; - * - * var html = asciidoctor.convert(input); - * @memberof Asciidoctor - */ -Asciidoctor.prototype.convert = function (input, options) { - if (typeof input === 'object' && input.constructor.name === 'Buffer') { - input = input.toString('utf8') - } - var result = this.$convert(input, prepareOptions(options)) - return result === Opal.nil ? '' : result -} - -/** - * Parse the AsciiDoc source input into an {@link Document} and convert it to the specified backend format. - * - * @param {string} filename - source filename - * @param {Object} options - a JSON of options to control processing (default: {}) - * @returns {string|Document} - the {@link Document} object if the converted String is written to a file, - * otherwise the converted String - * @example - * var html = asciidoctor.convertFile('./document.adoc'); - * @memberof Asciidoctor - */ -Asciidoctor.prototype.convertFile = function (filename, options) { - return this.$convert_file(filename, prepareOptions(options)) -} - -/** - * Parse the AsciiDoc source input into an {@link Document} - * - * Accepts input as a Buffer or String. - * - * @param {string|Buffer} input - AsciiDoc input as String or Buffer - * @param {Object} options - a JSON of options to control processing (default: {}) - * @returns {Document} - the {@link Document} object - * @memberof Asciidoctor - */ -Asciidoctor.prototype.load = function (input, options) { - if (typeof input === 'object' && input.constructor.name === 'Buffer') { - input = input.toString('utf8') - } - return this.$load(input, prepareOptions(options)) -} - -/** - * Parse the contents of the AsciiDoc source file into an {@link Document} - * - * @param {string} filename - source filename - * @param {Object} options - a JSON of options to control processing (default: {}) - * @returns {Document} - the {@link Document} object - * @memberof Asciidoctor - */ -Asciidoctor.prototype.loadFile = function (filename, options) { - return this.$load_file(filename, prepareOptions(options)) -} - -// AbstractBlock API - -/** - * @namespace - * @extends AbstractNode - */ -var AbstractBlock = Opal.Asciidoctor.AbstractBlock - -/** - * Append a block to this block's list of child blocks. - * @param {AbstractBlock} block - the block to append - * @returns {AbstractBlock} - the parent block to which this block was appended. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.append = function (block) { - this.$append(block) - return this -} - -/** - * Get the String title of this Block with title substitions applied - * - * The following substitutions are applied to block and section titles: - * - * specialcharacters, quotes, replacements, macros, attributes and post_replacements - * - * @returns {string} - the converted String title for this Block, or undefined if the title is not set. - * @example - * block.title // "Foo 3^ # {two-colons} Bar(1)" - * block.getTitle(); // "Foo 3^ # :: Bar(1)" - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getTitle = function () { - var title = this.$title() - return title === Opal.nil ? undefined : title -} - -/** - * Set the String block title. - * - * @param {string} title - The block title - * @returns {string} - the new String title assigned to this Block. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.setTitle = function (title) { - title = typeof title === 'undefined' ? Opal.nil : title - return this['$title='](title) -} - -/** - * Generate and assign caption to block if not already assigned. - * - * If the block has a title and a caption prefix is available for this block, - * then build a caption from this information, assign it a number and store it - * to the caption attribute on the block. - * - * If a caption has already been assigned to this block, do nothing. - * - * The parts of a complete caption are: . - * This partial caption represents the part the precedes the title. - * - * @param {string} value - the String caption to assign to this block or nil to use document attribute. - * @param {string} captionContext - the String context to use when resolving caption-related attributes. - * If not provided, the name of the context for this block is used. Only certain contexts allow the caption to be looked up. - * - * @memberof AbstractBlock - */ -AbstractBlock.prototype.assignCaption = function (value, captionContext) { - value = typeof value === 'undefined' ? Opal.nil : value - captionContext = typeof captionContext === 'undefined' ? null : captionContext - this.$assign_caption(value, captionContext) -} - -/** - * Convenience method that returns the interpreted title of the Block - * with the caption prepended. - * Concatenates the value of this Block's caption instance variable and the - * return value of this Block's title method. No space is added between the - * two values. If the Block does not have a caption, the interpreted title is - * returned. - * - * @returns {string} - the converted String title prefixed with the caption, or just the converted String title if no caption is set - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getCaptionedTitle = function () { - return this.$captioned_title() -} - -/** - * Get the style (block type qualifier) for this block. - * - * @returns {string} - the style for this block - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getStyle = function () { - var style = this.style - return style === Opal.nil ? undefined : style -} - -/** - * Set the style for this block. - * - * @param {string} style - Style - * @memberof AbstractBlock - */ -AbstractBlock.prototype.setStyle = function (style) { - this.style = style -} - -/** - * Get the location in the AsciiDoc source where this block begins. - * - * @returns {string} - the style for this block - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getSourceLocation = function () { - var sourceLocation = this.source_location - if (sourceLocation === Opal.nil) { - return undefined - } - sourceLocation.getFile = function () { - var file = this.file - return file === Opal.nil ? undefined : file - } - sourceLocation.getDirectory = function () { - var dir = this.dir - return dir === Opal.nil ? undefined : dir - } - sourceLocation.getPath = function () { - var path = this.path - return path === Opal.nil ? undefined : path - } - sourceLocation.getLineNumber = function () { - var lineno = this.lineno - return lineno === Opal.nil ? undefined : lineno - } - return sourceLocation -} - -/** - * Get the caption for this block. - * - * @returns {string} - the caption for this block - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getCaption = function () { - var caption = this.$caption() - return caption === Opal.nil ? undefined : caption -} - -/** - * Set the caption for this block. - * - * @param {string} caption - Caption - * @memberof AbstractBlock - */ -AbstractBlock.prototype.setCaption = function (caption) { - this.caption = typeof caption === 'undefined' ? Opal.nil : caption -} - -/** - * Get the level of this section or the section level in which this block resides. - * - * @returns {number} - the level (Integer) of this section - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getLevel = function () { - var level = this.level - return level === Opal.nil ? undefined : level -} - -/** - * Get the substitution keywords to be applied to the contents of this block. - * - * @returns {Array<string>} - the list of {string} substitution keywords associated with this block. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getSubstitutions = function () { - return this.subs -} - -/** - * Check whether a given substitution keyword is present in the substitutions for this block. - * - * @returns {boolean} - whether the substitution is present on this block. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.hasSubstitution = function (substitution) { - return this['$sub?'](substitution) -} - -/** - * Remove the specified substitution keyword from the list of substitutions for this block. - * - * @memberof AbstractBlock - */ -AbstractBlock.prototype.removeSubstitution = function (substitution) { - this.$remove_sub(substitution) -} - -/** - * Checks if the {@link AbstractBlock} contains any child blocks. - * - * @returns {boolean} - whether the {@link AbstractBlock} has child blocks. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.hasBlocks = function () { - return this.blocks.length > 0 -} - -/** - * Get the list of {@link AbstractBlock} sub-blocks for this block. - * - * @returns {Array<AbstractBlock>} - a list of {@link AbstractBlock} sub-blocks - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getBlocks = function () { - return this.blocks -} - -/** - * Get the converted result of the child blocks by converting the children appropriate to content model that this block supports. - * - * @returns {string} - the converted result of the child blocks - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getContent = function () { - return this.$content() -} - -/** - * Get the converted content for this block. - * If the block has child blocks, the content method should cause them to be converted - * and returned as content that can be included in the parent block's template. - * - * @returns {string} - the converted String content for this block - * @memberof AbstractBlock - */ -AbstractBlock.prototype.convert = function () { - return this.$convert() -} - -/** - * Query for all descendant block-level nodes in the document tree - * that match the specified selector (context, style, id, and/or role). - * If a function block is given, it's used as an additional filter. - * If no selector or function block is supplied, all block-level nodes in the tree are returned. - * @param {Object} [selector] - * @param {function} [block] - * @example - * doc.findBy({'context': 'section'}); - * // => { level: 0, title: "Hello, AsciiDoc!", blocks: 0 } - * // => { level: 1, title: "First Section", blocks: 1 } - * - * doc.findBy({'context': 'section'}, function (section) { return section.getLevel() === 1; }); - * // => { level: 1, title: "First Section", blocks: 1 } - * - * doc.findBy({'context': 'listing', 'style': 'source'}); - * // => { context: :listing, content_model: :verbatim, style: "source", lines: 1 } - * - * @returns {Array<AbstractBlock>} - a list of block-level nodes that match the filter or an empty list if no matches are found - * @memberof AbstractBlock - */ -AbstractBlock.prototype.findBy = function (selector, block) { - if (typeof block === 'undefined' && typeof selector === 'function') { - return Opal.send(this, 'find_by', null, selector) - } else if (typeof block === 'function') { - return Opal.send(this, 'find_by', [toHash(selector)], block) - } else { - return this.$find_by(toHash(selector)) - } -} - -/** - * Get the source line number where this block started. - * @returns {number} - the source line number where this block started - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getLineNumber = function () { - var lineno = this.$lineno() - return lineno === Opal.nil ? undefined : lineno -} - -/** - * Check whether this block has any child Section objects. - * Only applies to Document and Section instances. - * @returns {boolean} - true if this block has child Section objects, otherwise false - * @memberof AbstractBlock - */ -AbstractBlock.prototype.hasSections = function () { - // REMIND: call directly the underlying method "$sections?" - // once https://github.com/asciidoctor/asciidoctor/pull/3591 is merged and a new version is released. - // return this['$sections?']() - return this.next_section_index !== Opal.nil && this.next_section_index > 0 -} - -/** - * Get the Array of child Section objects. - * Only applies to Document and Section instances. - * @memberof AbstractBlock - * @returns {Array<Section>} - an {Array} of {@link Section} objects - */ -AbstractBlock.prototype.getSections = function () { - return this.$sections() -} - -/** - * Get the numeral of this block (if section, relative to parent, otherwise absolute). - * Only assigned to section if automatic section numbering is enabled. - * Only assigned to formal block (block with title) if corresponding caption attribute is present. - * If the section is an appendix, the numeral is a letter (starting with A). - * @returns {string} - the numeral - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getNumeral = function () { - return this.$numeral() -} - -/** - * Set the numeral of this block. - * @param {string} value - The numeral value - * @memberof AbstractBlock - */ -AbstractBlock.prototype.setNumeral = function (value) { - this['$numeral='](value) -} - -/** - * A convenience method that checks whether the title of this block is defined. - * - * @returns {boolean} - a {boolean} indicating whether this block has a title. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.hasTitle = function () { - return this['$title?']() -} - -/** - * Returns the converted alt text for this block image. - * @returns {string} - the {string} value of the alt attribute with XML special character and replacement substitutions applied. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getAlt = function () { - return this.$alt() -} - -// Section API - -/** - * @description - * Methods for managing sections of AsciiDoc content in a document. - * - * @example - * <pre> - * section = asciidoctor.Section.create() - * section.setTitle('Section 1') - * section.setId('sect1') - * section.getBlocks().length // 0 - * section.getId() // "sect1" - * section.append(newBlock) - * section.getBlocks().length // 1 - * </pre> - * @namespace - * @extends AbstractBlock - */ -var Section = Opal.Asciidoctor.Section - -/** - * Create a {Section} object. - * @param {AbstractBlock} [parent] - The parent AbstractBlock. If set, must be a Document or Section object (default: undefined) - * @param {number} [level] - The Integer level of this section (default: 1 more than parent level or 1 if parent not defined) - * @param {boolean} [numbered] - A Boolean indicating whether numbering is enabled for this Section (default: false) - * @param {Object} [opts] - An optional JSON of options (default: {}) - * @returns {Section} - a new {Section} object - * @memberof Section - */ -Section.create = function (parent, level, numbered, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return this.$new(parent, level, numbered, toHash(opts)) -} - -/** - * Set the level of this section or the section level in which this block resides. - * @param {number} level - Level (Integer) - * @memberof AbstractBlock - */ -Section.prototype.setLevel = function (level) { - this.level = level -} - -/** - * Get the 0-based index order of this section within the parent block. - * @returns {number} - * @memberof Section - */ -Section.prototype.getIndex = function () { - return this.index -} - -/** - * Set the 0-based index order of this section within the parent block. - * @param {string} index - The index order of this section - * @memberof Section - */ -Section.prototype.setIndex = function (index) { - this.index = index -} - -/** - * Get the section name of this section. - * @returns {string|undefined} - * @memberof Section - */ -Section.prototype.getSectionName = function () { - var sectname = this.sectname - return sectname === Opal.nil ? undefined : sectname -} - -/** - * Set the section name of this section. - * @param {string} value - The section name - * @memberof Section - */ -Section.prototype.setSectionName = function (value) { - this.sectname = value -} - -/** - * Get the flag to indicate whether this is a special section or a child of one. - * @returns {boolean} - * @memberof Section - */ -Section.prototype.isSpecial = function () { - return this.special -} - -/** - * Set the flag to indicate whether this is a special section or a child of one. - * @param {boolean} value - A flag to indicated if this is a special section - * @memberof Section - */ -Section.prototype.setSpecial = function (value) { - this.special = value -} - -/** - * Get the state of the numbered attribute at this section (need to preserve for creating TOC). - * @returns {boolean} - * @memberof Section - */ -Section.prototype.isNumbered = function () { - return this.numbered -} - -/** - * Get the caption for this section (only relevant for appendices). - * @returns {string} - * @memberof Section - */ -Section.prototype.getCaption = function () { - var value = this.caption - return value === Opal.nil ? undefined : value -} - -/** - * Get the name of the Section (title) - * @returns {string} - * @see {@link AbstractBlock#getTitle} - * @memberof Section - */ -Section.prototype.getName = function () { - return this.getTitle() -} - -/** - * @description - * Methods for managing AsciiDoc content blocks. - * - * @example - * block = asciidoctor.Block.create(parent, 'paragraph', {source: '_This_ is a <test>'}) - * block.getContent() - * // "<em>This</em> is a <test>" - * - * @namespace - * @extends AbstractBlock - */ -var Block = Opal.Asciidoctor.Block - -/** - * Create a {Block} object. - * @param {AbstractBlock} parent - The parent {AbstractBlock} with a compound content model to which this {Block} will be appended. - * @param {string} context - The context name for the type of content (e.g., "paragraph"). - * @param {Object} [opts] - a JSON of options to customize block initialization: (default: {}) - * @param {string} opts.content_model - indicates whether blocks can be nested in this {Block} ("compound"), - * otherwise how the lines should be processed ("simple", "verbatim", "raw", "empty"). (default: "simple") - * @param {Object} opts.attributes - a JSON of attributes (key/value pairs) to assign to this {Block}. (default: {}) - * @param {string|Array<string>} opts.source - a String or {Array} of raw source for this {Block}. (default: undefined) - * - * IMPORTANT: If you don't specify the `subs` option, you must explicitly call the `commit_subs` method to resolve and assign the substitutions - * to this block (which are resolved from the `subs` attribute, if specified, or the default substitutions based on this block's context). - * If you want to use the default subs for a block, pass the option `subs: "default"`. - * You can override the default subs using the `default_subs` option. - * - * @returns {Block} - a new {Block} object - * @memberof Block - */ -Block.create = function (parent, context, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return this.$new(parent, context, toHash(opts)) -} - -/** - * Get the source of this block. - * @returns {string} - the String source of this block. - * @memberof Block - */ -Block.prototype.getSource = function () { - return this.$source() -} - -/** - * Get the source lines of this block. - * @returns {Array<string>} - the String {Array} of source lines for this block. - * @memberof Block - */ -Block.prototype.getSourceLines = function () { - return this.lines -} - -// AbstractNode API - -/** - * @namespace - * @description - * An abstract base class that provides state and methods for managing a node of AsciiDoc content. - * The state and methods on this class are common to all content segments in an AsciiDoc document. - */ -var AbstractNode = Opal.Asciidoctor.AbstractNode - -/** - * Apply the specified substitutions to the text. - * If no substitutions are specified, the following substitutions are applied: - * <code>specialcharacters</code>, <code>quotes</code>, <code>attributes</code>, <code>replacements</code>, <code>macros</code>, and <code>post_replacements</code>. - * - * @param {string|Array<string>} text - The String or String Array of text to process; must not be undefined. - * @param {Array<string>} [subs] - The substitutions to perform; must be an Array or undefined. - * @returns {string|Array<string>} - a String or String Array to match the type of the text argument with substitutions applied. - * @memberof AbstractNode - */ -AbstractNode.prototype.applySubstitutions = function (text, subs) { - return this.$apply_subs(text, subs) -} - -/** - * Resolve the list of comma-delimited subs against the possible options. - * - * @param {string} subs - The comma-delimited String of substitution names or aliases. - * @param {string} [type] - A String representing the context for which the subs are being resolved (default: 'block'). - * @param {Array<string>} [defaults] - An Array of substitutions to start with when computing incremental substitutions (default: undefined). - * @param {string} [subject] - The String to use in log messages to communicate the subject for which subs are being resolved (default: undefined) - * - * @returns {Array<string>} - An Array of Strings representing the substitution operation or nothing if no subs are found. - * @memberof AbstractNode - */ -AbstractNode.prototype.resolveSubstitutions = function (subs, type, defaults, subject) { - if (typeof type === 'undefined') { - type = 'block' - } - if (typeof defaults === 'undefined') { - defaults = Opal.nil - } - if (typeof subject === 'undefined') { - subject = Opal.nil - } - const value = this.$resolve_subs(subs, type, defaults, subject) - return value === Opal.nil ? undefined : value -} - -/** - * Call {@link AbstractNode#resolveSubstitutions} for the 'block' type. - * - * @see {@link AbstractNode#resolveSubstitutions} - */ -AbstractNode.prototype.resolveBlockSubstitutions = function (subs, defaults, subject) { - return this.resolveSubstitutions(subs, 'block', defaults, subject) -} - -/** - * Call {@link AbstractNode#resolveSubstitutions} for the 'inline' type with the subject set as passthrough macro. - * - * @see {@link AbstractNode#resolveSubstitutions} - */ -AbstractNode.prototype.resolvePassSubstitutions = function (subs) { - return this.resolveSubstitutions(subs, 'inline', undefined, 'passthrough macro') -} - -/** - * @returns {string} - the String name of this node - * @memberof AbstractNode - */ -AbstractNode.prototype.getNodeName = function () { - return this.node_name -} - -/** - * @returns {Object} - the JSON of attributes for this node - * @memberof AbstractNode - */ -AbstractNode.prototype.getAttributes = function () { - return fromHash(this.attributes) -} - -/** - * Get the value of the specified attribute. - * If the attribute is not found on this node, fallback_name is set, and this node is not the Document node, get the value of the specified attribute from the Document node. - * - * Look for the specified attribute in the attributes on this node and return the value of the attribute, if found. - * Otherwise, if fallback_name is set (default: same as name) and this node is not the Document node, look for that attribute on the Document node and return its value, if found. - * Otherwise, return the default value (default: undefined). - * - * @param {string} name - The String of the attribute to resolve. - * @param {*} [defaultValue] - The {Object} value to return if the attribute is not found (default: undefined). - * @param {string} [fallbackName] - The String of the attribute to resolve on the Document if the attribute is not found on this node (default: same as name). - * - * @returns {*} - the {Object} value (typically a String) of the attribute or defaultValue if the attribute is not found. - * @memberof AbstractNode - */ -AbstractNode.prototype.getAttribute = function (name, defaultValue, fallbackName) { - var value = this.$attr(name, defaultValue, fallbackName) - return value === Opal.nil ? undefined : value -} - -/** - * Check whether the specified attribute is present on this node. - * - * @param {string} name - The String of the attribute to resolve. - * @returns {boolean} - true if the attribute is present, otherwise false - * @memberof AbstractNode - */ -AbstractNode.prototype.hasAttribute = function (name) { - return name in this.attributes.$$smap -} - -/** - * Check if the specified attribute is defined using the same logic as {AbstractNode#getAttribute}, optionally performing acomparison with the expected value if specified. - * - * Look for the specified attribute in the attributes on this node. - * If not found, fallback_name is specified (default: same as name), and this node is not the Document node, look for that attribute on the Document node. - * In either case, if the attribute is found, and the comparison value is truthy, return whether the two values match. - * Otherwise, return whether the attribute was found. - * - * @param {string} name - The String name of the attribute to resolve. - * @param {*} [expectedValue] - The expected Object value of the attribute (default: undefined). - * @param {string} fallbackName - The String of the attribute to resolve on the Document if the attribute is not found on this node (default: same as name). - * - * @returns {boolean} - a Boolean indicating whether the attribute exists and, if a truthy comparison value is specified, whether the value of the attribute matches the comparison value. - * @memberof AbstractNode - */ -AbstractNode.prototype.isAttribute = function (name, expectedValue, fallbackName) { - var result = this['$attr?'](name, expectedValue, fallbackName) - return result === Opal.nil ? false : result -} - -/** - * Assign the value to the attribute name for the current node. - * - * @param {string} name - The String attribute name to assign - * @param {*} value - The Object value to assign to the attribute (default: '') - * @param {boolean} overwrite - A Boolean indicating whether to assign the attribute if currently present in the attributes JSON (default: true) - * - * @returns {boolean} - a Boolean indicating whether the assignment was performed - * @memberof AbstractNode - */ -AbstractNode.prototype.setAttribute = function (name, value, overwrite) { - if (typeof overwrite === 'undefined') overwrite = true - return this.$set_attr(name, value, overwrite) -} - -/** - * Remove the attribute from the current node. - * @param {string} name - The String attribute name to remove - * @returns {string} - the previous {string} value, or undefined if the attribute was not present. - * @memberof AbstractNode - */ -AbstractNode.prototype.removeAttribute = function (name) { - var value = this.$remove_attr(name) - return value === Opal.nil ? undefined : value -} - -/** - * Get the {@link Document} to which this node belongs. - * - * @returns {Document} - the {@link Document} object to which this node belongs. - * @memberof AbstractNode - */ -AbstractNode.prototype.getDocument = function () { - return this.document -} - -/** - * Get the {@link AbstractNode} to which this node is attached. - * - * @memberof AbstractNode - * @returns {AbstractNode} - the {@link AbstractNode} object to which this node is attached, - * or undefined if this node has no parent. - */ -AbstractNode.prototype.getParent = function () { - var parent = this.parent - return parent === Opal.nil ? undefined : parent -} - -/** - * @returns {boolean} - true if this {AbstractNode} is an instance of {Inline} - * @memberof AbstractNode - */ -AbstractNode.prototype.isInline = function () { - return this['$inline?']() -} - -/** - * @returns {boolean} - true if this {AbstractNode} is an instance of {Block} - * @memberof AbstractNode - */ -AbstractNode.prototype.isBlock = function () { - return this['$block?']() -} - -/** - * Checks if the role attribute is set on this node and, if an expected value is given, whether the space-separated role matches that value. - * - * @param {string} expectedValue - The expected String value of the role (optional, default: undefined) - * - * @returns {boolean} - a Boolean indicating whether the role attribute is set on this node and, if an expected value is given, whether the space-separated role matches that value. - * @memberof AbstractNode - */ -AbstractNode.prototype.isRole = function (expectedValue) { - return this['$role?'](expectedValue) -} - -/** - * Retrieves the space-separated String role for this node. - * - * @returns {string} - the role as a space-separated String. - * @memberof AbstractNode - */ -AbstractNode.prototype.getRole = function () { - return this.$role() -} - -/** - * Checks if the specified role is present in the list of roles for this node. - * - * @param {string} name - The String name of the role to find. - * - * @returns {boolean} - a Boolean indicating whether this node has the specified role. - * @memberof AbstractNode - */ -AbstractNode.prototype.hasRole = function (name) { - return this['$has_role?'](name) -} - -/** - * Retrieves the String role names for this node as an Array. - * - * @returns {Array<string>} - the role names as a String {Array}, which is empty if the role attribute is absent on this node. - * @memberof AbstractNode - */ -AbstractNode.prototype.getRoles = function () { - return this.$roles() -} - -/** - * Adds the given role directly to this node. - * - * @param {string} name - The name of the role to add - * - * @returns {boolean} - a Boolean indicating whether the role was added. - * @memberof AbstractNode - */ -AbstractNode.prototype.addRole = function (name) { - return this.$add_role(name) -} - -/** - * Public: Removes the given role directly from this node. - * - * @param {string} name - The name of the role to remove - * - * @returns {boolean} - a Boolean indicating whether the role was removed. - * @memberof AbstractNode - */ -AbstractNode.prototype.removeRole = function (name) { - return this.$remove_role(name) -} - -/** - * A convenience method that checks if the reftext attribute is defined. - * @returns {boolean} - A Boolean indicating whether the reftext attribute is defined - * @memberof AbstractNode - */ -AbstractNode.prototype.isReftext = function () { - return this['$reftext?']() -} - -/** - * A convenience method that returns the value of the reftext attribute with substitutions applied. - * @returns {string|undefined} - the value of the reftext attribute with substitutions applied. - * @memberof AbstractNode - */ -AbstractNode.prototype.getReftext = function () { - var reftext = this.$reftext() - return reftext === Opal.nil ? undefined : reftext -} - -/** - * @returns {string} - Get the context name for this node - * @memberof AbstractNode - */ -AbstractNode.prototype.getContext = function () { - var context = this.context - // Automatically convert Opal pseudo-symbol to String - return typeof context === 'string' ? context : context.toString() -} - -/** - * @returns {string} - the String id of this node - * @memberof AbstractNode - */ -AbstractNode.prototype.getId = function () { - var id = this.id - return id === Opal.nil ? undefined : id -} - -/** - * @param {string} id - the String id of this node - * @memberof AbstractNode - */ -AbstractNode.prototype.setId = function (id) { - this.id = id -} - -/** - * A convenience method to check if the specified option attribute is enabled on the current node. - * Check if the option is enabled. This method simply checks to see if the <name>-option attribute is defined on the current node. - * - * @param {string} name - the String name of the option - * - * @return {boolean} - a Boolean indicating whether the option has been specified - * @memberof AbstractNode - */ -AbstractNode.prototype.isOption = function (name) { - return this['$option?'](name) -} - -/** - * Set the specified option on this node. - * This method sets the specified option on this node by setting the <name>-option attribute. - * - * @param {string} name - the String name of the option - * - * @memberof AbstractNode - */ -AbstractNode.prototype.setOption = function (name) { - return this.$set_option(name) -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.getIconUri = function (name) { - return this.$icon_uri(name) -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.getMediaUri = function (target, assetDirKey) { - return this.$media_uri(target, assetDirKey) -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.getImageUri = function (targetImage, assetDirKey) { - return this.$image_uri(targetImage, assetDirKey) -} - -/** - * Get the {Converter} instance being used to convert the current {Document}. - * @returns {Object} - * @memberof AbstractNode - */ -AbstractNode.prototype.getConverter = function () { - return this.$converter() -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.readContents = function (target, options) { - return this.$read_contents(target, toHash(options)) -} - -/** - * Read the contents of the file at the specified path. - * This method assumes that the path is safe to read. - * It checks that the file is readable before attempting to read it. - * - * @param path - the {string} path from which to read the contents - * @param {Object} options - a JSON {Object} of options to control processing (default: {}) - * @param {boolean} options.warn_on_failure - a {boolean} that controls whether a warning is issued if the file cannot be read (default: false) - * @param {boolean} options.normalize - a {boolean} that controls whether the lines are normalized and coerced to UTF-8 (default: false) - * - * @returns {string} - the String content of the file at the specified path, or undefined if the file does not exist. - * @memberof AbstractNode - */ -AbstractNode.prototype.readAsset = function (path, options) { - var result = this.$read_asset(path, toHash(options)) - return result === Opal.nil ? undefined : result -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.normalizeWebPath = function (target, start, preserveTargetUri) { - return this.$normalize_web_path(target, start, preserveTargetUri) -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.normalizeSystemPath = function (target, start, jail, options) { - return this.$normalize_system_path(target, start, jail, toHash(options)) -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.normalizeAssetPath = function (assetRef, assetName, autoCorrect) { - return this.$normalize_asset_path(assetRef, assetName, autoCorrect) -} - -// Document API - -/** - * The {@link Document} class represents a parsed AsciiDoc document. - * - * Document is the root node of a parsed AsciiDoc document.<br/> - * It provides an abstract syntax tree (AST) that represents the structure of the AsciiDoc document - * from which the Document object was parsed. - * - * Although the constructor can be used to create an empty document object, - * more commonly, you'll load the document object from AsciiDoc source - * using the primary API methods on {@link Asciidoctor}. - * When using one of these APIs, you almost always want to set the safe mode to 'safe' (or 'unsafe') - * to enable all of Asciidoctor's features. - * - * <pre> - * var doc = Asciidoctor.load('= Hello, AsciiDoc!', { 'safe': 'safe' }) - * // => Asciidoctor::Document { doctype: "article", doctitle: "Hello, AsciiDoc!", blocks: 0 } - * </pre> - * - * Instances of this class can be used to extract information from the document or alter its structure. - * As such, the Document object is most often used in extensions and by integrations. - * - * The most basic usage of the Document object is to retrieve the document's title. - * - * <pre> - * var source = '= Document Title' - * var doc = asciidoctor.load(source, { 'safe': 'safe' }) - * console.log(doc.getTitle()) // 'Document Title' - * </pre> - * - * You can also use the Document object to access document attributes defined in the header, such as the author and doctype. - * @namespace - * @extends AbstractBlock - */ -var Document = Opal.Asciidoctor.Document - -/** - * Returns a JSON {Object} of references captured by the processor. - * - * @returns {Object} - a JSON {Object} of {AbstractNode} in the document. - * @memberof Document - */ -Document.prototype.getRefs = function () { - return fromHash(this.catalog.$$smap.refs) -} - -/** - * Returns an {Array} of {Document/ImageReference} captured by the processor. - * - * @returns {Array<ImageReference>} - an {Array} of {Document/ImageReference} in the document. - * Will return an empty array if the option "catalog_assets: true" was not defined on the processor. - * @memberof Document - */ -Document.prototype.getImages = function () { - return this.catalog.$$smap.images -} - -/** - * Returns an {Array} of links captured by the processor. - * - * @returns {Array<string>} - an {Array} of links in the document. - * Will return an empty array if: - * - the function was called before the document was converted - * - the option "catalog_assets: true" was not defined on the processor - * @memberof Document - */ -Document.prototype.getLinks = function () { - return this.catalog.$$smap.links -} - -/** - * @returns {boolean} - true if the document has footnotes otherwise false - * @memberof Document - */ -Document.prototype.hasFootnotes = function () { - return this['$footnotes?']() -} - -/** - * Returns an {Array} of {Document/Footnote} captured by the processor. - * - * @returns {Array<Footnote>} - an {Array} of {Document/Footnote} in the document. - * Will return an empty array if the function was called before the document was converted. - * @memberof Document - */ -Document.prototype.getFootnotes = function () { - return this.$footnotes() -} - -/** - * Returns the level-0 {Section} (i.e. the document title). - * Only stores the title, not the header attributes. - * - * @returns {string} - the level-0 {Section}. - * @memberof Document - */ -Document.prototype.getHeader = function () { - return this.header -} - -/** - * @memberof Document - */ -Document.prototype.setAttribute = function (name, value) { - return this.$set_attribute(name, value) -} - -/** - - * @memberof Document - */ -Document.prototype.removeAttribute = function (name) { - this.attributes.$delete(name) - this.attribute_overrides.$delete(name) -} - -/** - * Convert the AsciiDoc document using the templates loaded by the Converter. - * If a "template_dir" is not specified, or a template is missing, the converter will fall back to using the appropriate built-in template. - * - * @param {Object} [options] - a JSON of options to control processing (default: {}) - * - * @returns {string} - * @memberof Document - */ -Document.prototype.convert = function (options) { - var result = this.$convert(toHash(options)) - return result === Opal.nil ? '' : result -} - -/** - * Write the output to the specified file. - * - * If the converter responds to "write", delegate the work of writing the file to that method. - * Otherwise, write the output the specified file. - * - * @param {string} output - * @param {string} target - * - * @memberof Document - */ -Document.prototype.write = function (output, target) { - return this.$write(output, target) -} - -/** - * @returns {string} - the full name of the author as a String - * @memberof Document - */ -Document.prototype.getAuthor = function () { - return this.$author() -} - -/** - * @returns {string} - * @memberof Document - */ -Document.prototype.getSource = function () { - return this.$source() -} - -/** - * @returns {Array<string>} - * @memberof Document - */ -Document.prototype.getSourceLines = function () { - return this.$source_lines() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.isNested = function () { - return this['$nested?']() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.isEmbedded = function () { - return this['$embedded?']() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.hasExtensions = function () { - return this['$extensions?']() -} - -/** - * Get the value of the doctype attribute for this document. - * @returns {string} - * @memberof Document - */ -Document.prototype.getDoctype = function () { - return this.doctype -} - -/** - * Get the value of the backend attribute for this document. - * @returns {string} - * @memberof Document - */ -Document.prototype.getBackend = function () { - return this.backend -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.isBasebackend = function (base) { - return this['$basebackend?'](base) -} - -/** - * Get the title explicitly defined in the document attributes. - * @returns {string} - * @see {@link AbstractNode#getAttributes} - * @memberof Document - */ -Document.prototype.getTitle = function () { - var title = this.$title() - return title === Opal.nil ? undefined : title -} - -/** - * Set the title on the document header - * - * Set the title of the document header to the specified value. - * If the header does not exist, it is first created. - * - * @param {string} title - the String title to assign as the title of the document header - * - * @returns {string} - the new String title assigned to the document header - * @memberof Document - */ -Document.prototype.setTitle = function (title) { - return this['$title='](title) -} - -/** - * @returns {Document/Title} - a {@link Document/Title} - * @memberof Document - */ -Document.prototype.getDocumentTitle = function (options) { - var doctitle = this.$doctitle(toHash(options)) - return doctitle === Opal.nil ? undefined : doctitle -} - -/** - * @see {@link Document#getDocumentTitle} - * @memberof Document - */ -Document.prototype.getDoctitle = Document.prototype.getDocumentTitle - -/** - * Get the document catalog JSON object. - * @returns {Object} - * @memberof Document - */ -Document.prototype.getCatalog = function () { - return fromHash(this.catalog) -} - -/** - * - * @returns {Object} - * @see Document#getCatalog - * @memberof Document - */ -Document.prototype.getReferences = Document.prototype.getCatalog - -/** - * Get the document revision date from document header (document attribute <code>revdate</code>). - * @returns {string} - * @memberof Document - */ -Document.prototype.getRevisionDate = function () { - return this.getAttribute('revdate') -} - -/** - * @see Document#getRevisionDate - * @returns {string} - * @memberof Document - */ -Document.prototype.getRevdate = function () { - return this.getRevisionDate() -} - -/** - * Get the document revision number from document header (document attribute <code>revnumber</code>). - * @returns {string} - * @memberof Document - */ -Document.prototype.getRevisionNumber = function () { - return this.getAttribute('revnumber') -} - -/** - * Get the document revision remark from document header (document attribute <code>revremark</code>). - * @returns {string} - * @memberof Document - */ -Document.prototype.getRevisionRemark = function () { - return this.getAttribute('revremark') -} - -/** - * Assign a value to the specified attribute in the document header. - * - * The assignment will be visible when the header attributes are restored, - * typically between processor phases (e.g., between parse and convert). - * - * @param {string} name - The {string} attribute name to assign - * @param {Object} value - The {Object} value to assign to the attribute (default: '') - * @param {boolean} overwrite - A {boolean} indicating whether to assign the attribute - * if already present in the attributes Hash (default: true) - * - * @returns {boolean} - true if the assignment was performed otherwise false - * @memberof Document - */ -Document.prototype.setHeaderAttribute = function (name, value, overwrite) { - if (typeof overwrite === 'undefined') overwrite = true - if (typeof value === 'undefined') value = '' - return this.$set_header_attribute(name, value, overwrite) -} - -/** - * Convenience method to retrieve the authors of this document as an {Array} of {Document/Author} objects. - * - * This method is backed by the author-related attributes on the document. - * - * @returns {Array<Author>} - an {Array} of {Document/Author} objects. - * @memberof Document - */ -Document.prototype.getAuthors = function () { - return this.$authors() -} - -// Document.Footnote API - -/** - * @namespace - * @module Document/Footnote - */ -var Footnote = Document.Footnote - -/** - * @returns {number} - the footnote's index - * @memberof Document/Footnote - */ -Footnote.prototype.getIndex = function () { - var index = this.$$data.index - return index === Opal.nil ? undefined : index -} - -/** - * @returns {number} - the footnote's id - * @memberof Document/Footnote - */ -Footnote.prototype.getId = function () { - var id = this.$$data.id - return id === Opal.nil ? undefined : id -} - -/** - * @returns {string} - the footnote's text - * @memberof Document/Footnote - */ -Footnote.prototype.getText = function () { - var text = this.$$data.text - return text === Opal.nil ? undefined : text -} - -// Document.ImageReference API - -/** - * @class - * @module Document/ImageReference - */ -var ImageReference = Document.ImageReference - -/** - * @returns {string} - the image's target - * @memberof Document/ImageReference - */ -ImageReference.prototype.getTarget = function () { - return this.$$data.target -} - -/** - * @returns {string} - the image's directory (imagesdir attribute) - * @memberof Document/ImageReference - */ -ImageReference.prototype.getImagesDirectory = function () { - var value = this.$$data.imagesdir - return value === Opal.nil ? undefined : value -} - -// Document.Author API - -/** - * The Author class represents information about an author extracted from document attributes. - * @namespace - * @module Document/Author - */ -var Author = Document.Author - -/** - * @returns {string} - the author's full name - * @memberof Document/Author - */ -Author.prototype.getName = function () { - var name = this.$$data.name - return name === Opal.nil ? undefined : name -} - -/** - * @returns {string} - the author's first name - * @memberof Document/Author - */ -Author.prototype.getFirstName = function () { - var firstName = this.$$data.firstname - return firstName === Opal.nil ? undefined : firstName -} - -/** - * @returns {string} - the author's middle name (or undefined if the author has no middle name) - * @memberof Document/Author - */ -Author.prototype.getMiddleName = function () { - var middleName = this.$$data.middlename - return middleName === Opal.nil ? undefined : middleName -} - -/** - * @returns {string} - the author's last name - * @memberof Document/Author - */ -Author.prototype.getLastName = function () { - var lastName = this.$$data.lastname - return lastName === Opal.nil ? undefined : lastName -} - -/** - * @returns {string} - the author's initials (by default based on the author's name) - * @memberof Document/Author - */ -Author.prototype.getInitials = function () { - var initials = this.$$data.initials - return initials === Opal.nil ? undefined : initials -} - -/** - * @returns {string} - the author's email - * @memberof Document/Author - */ -Author.prototype.getEmail = function () { - var email = this.$$data.email - return email === Opal.nil ? undefined : email -} - -// private constructor -Document.RevisionInfo = function (date, number, remark) { - this.date = date - this.number = number - this.remark = remark -} - -/** - * @class - * @namespace - * @module Document/RevisionInfo - */ -var RevisionInfo = Document.RevisionInfo - -/** - * Get the document revision date from document header (document attribute <code>revdate</code>). - * @returns {string} - * @memberof Document/RevisionInfo - */ -RevisionInfo.prototype.getDate = function () { - return this.date -} - -/** - * Get the document revision number from document header (document attribute <code>revnumber</code>). - * @returns {string} - * @memberof Document/RevisionInfo - */ -RevisionInfo.prototype.getNumber = function () { - return this.number -} - -/** - * Get the document revision remark from document header (document attribute <code>revremark</code>). - * A short summary of changes in this document revision. - * @returns {string} - * @memberof Document/RevisionInfo - */ -RevisionInfo.prototype.getRemark = function () { - return this.remark -} - -/** - * @returns {boolean} - true if the revision info is empty (ie. not defined), otherwise false - * @memberof Document/RevisionInfo - */ -RevisionInfo.prototype.isEmpty = function () { - return this.date === undefined && this.number === undefined && this.remark === undefined -} - -// SafeMode API - -/** - * @namespace - */ -var SafeMode = Opal.Asciidoctor.SafeMode - -/** - * @param {string} name - the name of the security level - * @returns {number} - the integer value of the corresponding security level - */ -SafeMode.getValueForName = function (name) { - return this.$value_for_name(name) -} - -/** - * @param {number} value - the integer value of the security level - * @returns {string} - the name of the corresponding security level - */ -SafeMode.getNameForValue = function (value) { - var name = this.$name_for_value(value) - return name === Opal.nil ? undefined : name -} - -/** - * @returns {Array<string>} - the String {Array} of security levels - */ -SafeMode.getNames = function () { - return this.$names() -} - -// Callouts API - -/** - * Maintains a catalog of callouts and their associations. - * @namespace - */ -var Callouts = Opal.Asciidoctor.Callouts - -/** - * Create a new Callouts. - * @returns {Callouts} - a new Callouts - * @memberof Callouts - */ -Callouts.create = function () { - return this.$new() -} - -/** - * Register a new callout for the given list item ordinal. - * Generates a unique id for this callout based on the index of the next callout list in the document and the index of this callout since the end of the last callout list. - * - * @param {number} ordinal - the Integer ordinal (1-based) of the list item to which this callout is to be associated - * @returns {string} - The unique String id of this callout - * @example - * callouts = asciidoctor.Callouts.create() - * callouts.register(1) - * // => "CO1-1" - * callouts.nextList() - * callouts.register(2) - * // => "CO2-1" - * @memberof Callouts - */ - -Callouts.prototype.register = function (ordinal) { - return this.$register(ordinal) -} -/** - * Get the next callout index in the document. - * - * Reads the next callout index in the document and advances the pointer. - * This method is used during conversion to retrieve the unique id of the callout that was generated during parsing. - * - * @returns {string} - The unique String id of the next callout in the document - * @memberof Callouts - */ -Callouts.prototype.readNextId = function () { - return this.$read_next_id() -} - -/** - * et a space-separated list of callout ids for the specified list item. - * @param {number} ordinal - the Integer ordinal (1-based) of the list item for which to retrieve the callouts - * @returns {string} - a space-separated String of callout ids associated with the specified list item - * @memberof Callouts - */ -Callouts.prototype.getCalloutIds = function (ordinal) { - return this.$callout_ids(ordinal) -} - -/** - * @memberof Callouts - */ -Callouts.prototype.getLists = function () { - var lists = this.lists - if (lists && lists.length > 0) { - for (var i = 0; i < lists.length; i++) { - var list = lists[i] - if (list && list.length > 0) { - for (var j = 0; j < list.length; j++) { - if (typeof list[j] === 'object' && '$$smap' in list[j]) { - list[j] = fromHash(list[j]) - } - } - } - } - } - return lists -} - -/** - * @memberof Callouts - */ -Callouts.prototype.getListIndex = function () { - return this.list_index -} - -/** - * The current list for which callouts are being collected. - * @returns {Array} - The Array of callouts at the position of the list index pointer - * @memberof Callouts - */ -Callouts.prototype.getCurrentList = function () { - var currentList = this.$current_list() - if (currentList && currentList.length > 0) { - for (var i = 0; i < currentList.length; i++) { - if (typeof currentList[i] === 'object' && '$$smap' in currentList[i]) { - currentList[i] = fromHash(currentList[i]) - } - } - } - return currentList -} - -/** - * Advance to the next callout list in the document. - * @memberof Callouts - */ -Callouts.prototype.nextList = function () { - return this.$nextList() -} - -/** - * Rewind the list index pointer, intended to be used when switching from the parsing to conversion phase. - * @memberof Callouts - */ -Callouts.prototype.rewind = function () { - return this.$rewind() -} - -/** - * @returns {Document/RevisionInfo} - a {@link Document/RevisionInfo} - * @memberof Document - */ -Document.prototype.getRevisionInfo = function () { - return new Document.RevisionInfo(this.getRevisionDate(), this.getRevisionNumber(), this.getRevisionRemark()) -} - -/** - * @returns {boolean} - true if the document contains revision info, otherwise false - * @memberof Document - */ -Document.prototype.hasRevisionInfo = function () { - var revisionInfo = this.getRevisionInfo() - return !revisionInfo.isEmpty() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.getNotitle = function () { - return this.$notitle() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.getNoheader = function () { - return this.$noheader() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.getNofooter = function () { - return this.$nofooter() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.hasHeader = function () { - return this['$header?']() -} - -/** - * Replay attribute assignments at the block level. - * - * <i>This method belongs to an internal API that deals with how attributes are managed by the processor.</i> - * If you understand why this group of methods are necessary, and what they do, feel free to use them. - * <strong>However, keep in mind they are subject to change at any time.</strong> - * - * @param {Object} blockAttributes - A JSON of attributes - * @memberof Document - */ -Document.prototype.playbackAttributes = function (blockAttributes) { - blockAttributes = toHash(blockAttributes) - if (blockAttributes) { - var attrEntries = blockAttributes['$[]']('attribute_entries') - if (attrEntries && Array.isArray(attrEntries)) { - var result = [] - for (var i = 0; i < attrEntries.length; i++) { - var attrEntryObject = attrEntries[i] - if (attrEntryObject && typeof attrEntryObject === 'object' && attrEntryObject.constructor.name === 'Object') { - attrEntryObject.$name = function () { - return this.name - } - attrEntryObject.$value = function () { - return this.value - } - attrEntryObject.$negate = function () { - return this.negate - } - } - result.push(attrEntryObject) - } - blockAttributes['$[]=']('attribute_entries', result) - } - } - this.$playback_attributes(blockAttributes) -} - -/** - * Delete the specified attribute from the document if the name is not locked. - * If the attribute is locked, false is returned. - * Otherwise, the attribute is deleted. - * - * @param {string} name - the String attribute name - * - * @returns {boolean} - true if the attribute was deleted, false if it was not because it's locked - * @memberof Document - */ -Document.prototype.deleteAttribute = function (name) { - return this.$delete_attribute(name) -} - -/** - * Determine if the attribute has been locked by being assigned in document options. - * - * @param {string} key - The attribute key to check - * - * @returns {boolean} - true if the attribute is locked, false otherwise - * @memberof Document - */ -Document.prototype.isAttributeLocked = function (key) { - return this['$attribute_locked?'](key) -} - -/** - * Restore the attributes to the previously saved state (attributes in header). - * - * @memberof Document - */ -Document.prototype.restoreAttributes = function () { - return this.$restore_attributes() -} - -/** - * Parse the AsciiDoc source stored in the {Reader} into an abstract syntax tree. - * - * If the data parameter is not nil, create a new {PreprocessorReader} and assigned it to the reader property of this object. - * Otherwise, continue with the reader that was created when the {Document} was instantiated. - * Pass the reader to {Parser.parse} to parse the source data into an abstract syntax tree. - * - * If parsing has already been performed, this method returns without performing any processing. - * - * @param {string|Array<string>} [data] - The optional replacement AsciiDoc source data as a String or String Array. (default: undefined) - * - * @returns {Document} - this {Document} - * @memberof Document - */ -Document.prototype.parse = function (data) { - return this.$parse(data) -} - -/** - * @memberof Document - */ -Document.prototype.getDocinfo = function (docinfoLocation, suffix) { - return this.$docinfo(docinfoLocation, suffix) -} - -/** - * @param {string} [docinfoLocation] - A {string} for checking docinfo extensions at a given location (head or footer) (default: head) - * @returns {boolean} - * @memberof Document - */ -Document.prototype.hasDocinfoProcessors = function (docinfoLocation) { - return this['$docinfo_processors?'](docinfoLocation) -} - -/** - * Increment the specified counter and store it in the block's attributes. - * - * @param {string} counterName - the String name of the counter attribute - * @param {Block} block - the {Block} on which to save the counter - * - * @returns {number} - the next number in the sequence for the specified counter - * @memberof Document - */ -Document.prototype.incrementAndStoreCounter = function (counterName, block) { - return this.$increment_and_store_counter(counterName, block) -} - -/** - * @deprecated Please use {Document#incrementAndStoreCounter} method. - * @memberof Document - */ -Document.prototype.counterIncrement = Document.prototype.incrementAndStoreCounter - -/** - * Get the named counter and take the next number in the sequence. - * - * @param {string} name - the String name of the counter - * @param {string|number} seed - the initial value as a String or Integer - * - * @returns {number} the next number in the sequence for the specified counter - * @memberof Document - */ -Document.prototype.counter = function (name, seed) { - return this.$counter(name, seed) -} - -/** - * A read-only integer value indicating the level of security that should be enforced while processing this document. - * The value must be set in the Document constructor using the "safe" option. - * - * A value of 0 (UNSAFE) disables any of the security features enforced by Asciidoctor. - * - * A value of 1 (SAFE) closely parallels safe mode in AsciiDoc. - * In particular, it prevents access to files which reside outside of the parent directory of the source file and disables any macro other than the include directive. - * - * A value of 10 (SERVER) disallows the document from setting attributes that would affect the conversion of the document, - * in addition to all the security features of SafeMode.SAFE. - * For instance, this level forbids changing the backend or source-highlighter using an attribute defined in the source document header. - * This is the most fundamental level of security for server deployments (hence the name). - * - * A value of 20 (SECURE) disallows the document from attempting to read files from the file system and including the contents of them into the document, - * in addition to all the security features of SafeMode.SECURE. - * In particular, it disallows use of the include::[] directive and the embedding of binary content (data uri), stylesheets and JavaScripts referenced by the document. - * (Asciidoctor and trusted extensions may still be allowed to embed trusted content into the document). - * - * Since Asciidoctor is aiming for wide adoption, 20 (SECURE) is the default value and is recommended for server deployments. - * - * A value of 100 (PARANOID) is planned to disallow the use of passthrough macros and prevents the document from setting any known attributes, - * in addition to all the security features of SafeMode.SECURE. - * Please note that this level is not currently implemented (and therefore not enforced)! - * - * @returns {number} - An integer value indicating the level of security - * @memberof Document - */ -Document.prototype.getSafe = function () { - return this.safe -} - -/** - * Get the Boolean AsciiDoc compatibility mode. - * Enabling this attribute activates the following syntax changes: - * - * * single quotes as constrained emphasis formatting marks - * * single backticks parsed as inline literal, formatted as monospace - * * single plus parsed as constrained, monospaced inline formatting - * * double plus parsed as constrained, monospaced inline formatting - * - * @returns {boolean} - * @memberof Document - */ -Document.prototype.getCompatMode = function () { - return this.compat_mode -} - -/** - * Get the Boolean flag that indicates whether source map information should be tracked by the parser. - * @returns {boolean} - * @memberof Document - */ -Document.prototype.getSourcemap = function () { - var sourcemap = this.sourcemap - return sourcemap === Opal.nil ? false : sourcemap -} - -/** - * Set the Boolean flag that indicates whether source map information should be tracked by the parser. - * @param {boolean} value - * @memberof Document - */ -Document.prototype.setSourcemap = function (value) { - this.sourcemap = value -} - -/** - * Get the JSON of document counters. - * @returns {Object} - * @memberof Document - */ -Document.prototype.getCounters = function () { - return fromHash(this.counters) -} - -/** - * @returns {Object} - * @memberof Document - */ -Document.prototype.getCallouts = function () { - return this.$callouts() -} - -/** - * Get the String base directory for converting this document. - * - * Defaults to directory of the source file. - * If the source is a string, defaults to the current directory. - * @returns {string} - * @memberof Document - */ -Document.prototype.getBaseDir = function () { - return this.base_dir -} - -/** - * Get the JSON of resolved options used to initialize this {Document}. - * @returns {Object} - * @memberof Document - */ -Document.prototype.getOptions = function () { - return fromHash(this.options) -} - -/** - * Get the outfilesuffix defined at the end of the header. - * @returns {string} - * @memberof Document - */ -Document.prototype.getOutfilesuffix = function () { - return this.outfilesuffix -} - -/** - * Get a reference to the parent Document of this nested document. - * @returns {Document|undefined} - * @memberof Document - */ -Document.prototype.getParentDocument = function () { - var parentDocument = this.parent_document - return parentDocument === Opal.nil ? undefined : parentDocument -} - -/** - * Get the {Reader} associated with this document. - * @returns {Object} - * @memberof Document - */ -Document.prototype.getReader = function () { - return this.reader -} - -/** - * Get the {Converter} instance being used to convert the current {Document}. - * @returns {Object} - * @memberof Document - */ -Document.prototype.getConverter = function () { - return this.converter -} - -/** - * Get the activated {Extensions.Registry} associated with this document. - * @returns {Extensions/Registry} - * @memberof Document - */ -Document.prototype.getExtensions = function () { - var extensions = this.extensions - return extensions === Opal.nil ? undefined : extensions -} - -// Document.Title API - -/** - * A partitioned title (i.e., title & subtitle). - * @namespace - * @module Document/Title - */ -var Title = Document.Title - -/** - * @returns {string} - * @memberof Document/Title - */ -Title.prototype.getMain = function () { - return this.main -} - -/** - * @returns {string} - * @memberof Document/Title - */ -Title.prototype.getCombined = function () { - return this.combined -} - -/** - * @returns {string} - * @memberof Document/Title - */ -Title.prototype.getSubtitle = function () { - var subtitle = this.subtitle - return subtitle === Opal.nil ? undefined : subtitle -} - -/** - * @returns {boolean} - * @memberof Document/Title - */ -Title.prototype.isSanitized = function () { - var sanitized = this['$sanitized?']() - return sanitized === Opal.nil ? false : sanitized -} - -/** - * @returns {boolean} - * @memberof Document/Title - */ -Title.prototype.hasSubtitle = function () { - return this['$subtitle?']() -} - -// Inline API - -/** - * Methods for managing inline elements in AsciiDoc block. - * @namespace - * @extends AbstractNode - */ -var Inline = Opal.Asciidoctor.Inline - -/** - * Create a new Inline element. - * @param {AbstractBlock} parent - * @param {string} context - * @param {string|undefined} text - * @param {Object|undefined} opts - * @returns {Inline} - a new Inline element - * @memberof Inline - */ -Inline.create = function (parent, context, text, opts) { - return this.$new(parent, context, text, prepareOptions(opts)) -} - -/** - * Get the converted content for this inline node. - * - * @returns {string} - the converted String content for this inline node - * @memberof Inline - */ -Inline.prototype.convert = function () { - return this.$convert() -} - -/** - * Get the converted String text of this Inline node, if applicable. - * - * @returns {string|undefined} - the converted String text for this Inline node, or undefined if not applicable for this node. - * @memberof Inline - */ -Inline.prototype.getText = function () { - var text = this.$text() - return text === Opal.nil ? undefined : text -} - -/** - * Get the String sub-type (aka qualifier) of this Inline node. - * - * This value is used to distinguish different variations of the same node - * category, such as different types of anchors. - * - * @returns {string} - the string sub-type of this Inline node. - * @memberof Inline - */ -Inline.prototype.getType = function () { - return this.$type() -} - -/** - * Get the primary String target of this Inline node. - * - * @returns {string|undefined} - the string target of this Inline node. - * @memberof Inline - */ -Inline.prototype.getTarget = function () { - var target = this.$target() - return target === Opal.nil ? undefined : target -} - -/** - * Returns the converted alt text for this inline image. - * - * @returns {string} - the String value of the alt attribute. - * @memberof Inline - */ -Inline.prototype.getAlt = function () { - return this.$alt() -} - -// List API - -/** - * Methods for managing AsciiDoc lists (ordered, unordered and description lists). - * @namespace - * @extends AbstractBlock - */ -var List = Opal.Asciidoctor.List - -/** - * Checks if the {@link List} contains any child {@link ListItem}. - * - * @memberof List - * @returns {boolean} - whether the {@link List} has child {@link ListItem}. - */ -List.prototype.hasItems = function () { - return this['$items?']() -} - -/** - * Get the Array of {@link ListItem} nodes for this {@link List}. - * - * @returns {Array<ListItem>} - an Array of {@link ListItem} nodes. - * @memberof List - */ -List.prototype.getItems = function () { - return this.blocks -} - -// ListItem API - -/** - * Methods for managing items for AsciiDoc olists, ulist, and dlists. - * - * In a description list (dlist), each item is a tuple that consists of a 2-item Array of ListItem terms and a ListItem description (i.e., [[term, term, ...], desc]. - * If a description is not set, then the second entry in the tuple is nil. - * @namespace - * @extends AbstractBlock - */ -var ListItem = Opal.Asciidoctor.ListItem - -/** - * Get the converted String text of this {@link ListItem} node. - * - * @returns {string} - the converted String text for this {@link ListItem} node. - * @memberof ListItem - */ -ListItem.prototype.getText = function () { - return this.$text() -} - -/** - * Set the String source text of this {@link ListItem} node. - * - * @returns {string} - the new String text assigned to this {@link ListItem} - * @memberof ListItem - */ -ListItem.prototype.setText = function (text) { - return this['$text='](text) -} - -/** - * A convenience method that checks whether the text of this {@link ListItem} is not blank (i.e. not undefined or empty string). - * - * @returns {boolean} - whether the text is not blank - * @memberof ListItem - */ -ListItem.prototype.hasText = function () { - return this['$text?']() -} - -/** - * Get the {string} used to mark this {@link ListItem}. - * - * @returns {string} - * @memberof ListItem - */ -ListItem.prototype.getMarker = function () { - return this.marker -} - -/** - * Set the {string} used to mark this {@link ListItem}. - * - * @param {string} marker - the {string} used to mark this {@link ListItem} - * @memberof ListItem - */ -ListItem.prototype.setMarker = function (marker) { - this.marker = marker -} - -/** - * Get the {@link List} to which this {@link ListItem} is attached. - * - * @returns {List} - the {@link List} object to which this {@link ListItem} is attached, - * or undefined if this node has no parent. - * @memberof ListItem - */ -ListItem.prototype.getList = function () { - return this.$list() -} - -/** - * @see {@link ListItem#getList} - * @memberof ListItem - */ -ListItem.prototype.getParent = ListItem.prototype.getList - -// Reader API - -/** @namespace */ -var Reader = Opal.Asciidoctor.Reader - -/** - * Push source onto the front of the reader and switch the context based on the file, document-relative path and line information given. - * - * This method is typically used in an IncludeProcessor to add source read from the target specified. - * - * @param {string} data - * @param {string|undefined} file - * @param {string|undefined} path - * @param {number} lineno - The line number - * @param {Object} attributes - a JSON of attributes - * @returns {Reader} - this {Reader} object. - * @memberof Reader - */ -Reader.prototype.pushInclude = function (data, file, path, lineno, attributes) { - return this.$push_include(data, file, path, lineno, toHash(attributes)) -} - -/** - * Get the current location of the reader's cursor, which encapsulates the file, dir, path, and lineno of the file being read. - * - * @returns {Cursor} - * @memberof Reader - */ -Reader.prototype.getCursor = function () { - return this.$cursor() -} - -/** - * Get the remaining unprocessed lines, without consuming them, as an {Array} of {string}. - * - * Lines will not be consumed from the Reader (ie. you will be able to read these lines again). - * - * @returns {Array<string>} - the remaining unprocessed lines as an {Array} of {string}. - * @memberof Reader - */ -Reader.prototype.getLines = function () { - return this.$lines() -} - -/** - * Get the remaining unprocessed lines, without consuming them, as a {string}. - * - * Lines will not be consumed from the Reader (ie. you will be able to read these lines again). - * - * @returns {string} - the remaining unprocessed lines as a {string} (joined by linefeed characters). - * @memberof Reader - */ -Reader.prototype.getString = function () { - return this.$string() -} - -/** - * Check whether there are any lines left to read. - * If a previous call to this method resulted in a value of false, immediately returned the cached value. - * Otherwise, delegate to peekLine to determine if there is a next line available. - * - * @returns {boolean} - true if there are more lines, false if there are not. - * @memberof Reader - */ -Reader.prototype.hasMoreLines = function () { - return this['$has_more_lines?']() -} - -/** - * Check whether this reader is empty (contains no lines). - * - * @returns {boolean} - true if there are no more lines to peek, otherwise false. - * @memberof Reader - */ -Reader.prototype.isEmpty = function () { - return this['$empty?']() -} - -/** - * Peek at the next line. - * Processes the line if not already marked as processed, but does not consume it (ie. you will be able to read this line again). - * - * This method will probe the reader for more lines. - * If there is a next line that has not previously been visited, the line is passed to the Reader#processLine method to be initialized. - * This call gives sub-classes the opportunity to do preprocessing. - * If the return value of the Reader#processLine is undefined, the data is assumed to be changed and Reader#peekLine is invoked again to perform further processing. - * - * If hasMoreLines is called immediately before peekLine, the direct flag is implicitly true (since the line is flagged as visited). - * - * @param {boolean} direct - A {boolean} flag to bypasses the check for more lines and immediately returns the first element of the internal lines {Array}. (default: false) - * @returns {string} - the next line as a {string} if there are lines remaining. - * @memberof Reader - */ -Reader.prototype.peekLine = function (direct) { - direct = direct || false - var line = this.$peek_line(direct) - return line === Opal.nil ? undefined : line -} - -/** - * Consume, preprocess, and return the next line. - * - * Line will be consumed from the Reader (ie. you won't be able to read this line again). - * - * @returns {string} - the next line as a {string} if data is present. - * @memberof Reader - */ -Reader.prototype.readLine = function () { - var line = this.$read_line() - return line === Opal.nil ? undefined : line -} - -/** - * Consume, preprocess, and return the remaining lines. - * - * This method calls Reader#readLine repeatedly until all lines are consumed and returns the lines as an {Array} of {string}. - * This method differs from Reader#getLines in that it processes each line in turn, hence triggering any preprocessors implemented in sub-classes. - * - * Lines will be consumed from the Reader (ie. you won't be able to read these lines again). - * - * @returns {Array<string>} - the lines read as an {Array} of {string}. - * @memberof Reader - */ -Reader.prototype.readLines = function () { - return this.$read_lines() -} - -/** - * Consume, preprocess, and return the remaining lines joined as a {string}. - * - * Delegates to Reader#readLines, then joins the result. - * - * Lines will be consumed from the Reader (ie. you won't be able to read these lines again). - * - * @returns {string} - the lines read joined as a {string} - * @memberof Reader - */ -Reader.prototype.read = function () { - return this.$read() -} - -/** - * Advance to the next line by discarding the line at the front of the stack. - * - * @returns {boolean} - a Boolean indicating whether there was a line to discard. - * @memberof Reader - */ -Reader.prototype.advance = function () { - return this.$advance() -} - -// Cursor API - -/** @namespace */ -var Cursor = Opal.Asciidoctor.Reader.Cursor - -/** - * Get the file associated to the cursor. - * @returns {string|undefined} - * @memberof Cursor - */ -Cursor.prototype.getFile = function () { - var file = this.file - return file === Opal.nil ? undefined : file -} - -/** - * Get the directory associated to the cursor. - * @returns {string|undefined} - the directory associated to the cursor - * @memberof Cursor - */ -Cursor.prototype.getDirectory = function () { - var dir = this.dir - return dir === Opal.nil ? undefined : dir -} - -/** - * Get the path associated to the cursor. - * @returns {string|undefined} - the path associated to the cursor (or '<stdin>') - * @memberof Cursor - */ -Cursor.prototype.getPath = function () { - var path = this.path - return path === Opal.nil ? undefined : path -} - -/** - * Get the line number of the cursor. - * @returns {number|undefined} - the line number of the cursor - * @memberof Cursor - */ -Cursor.prototype.getLineNumber = function () { - return this.lineno -} - -// Logger API (available in Asciidoctor 1.5.7+) - -function initializeLoggerFormatterClass (className, functions) { - var superclass = Opal.const_get_qualified(Opal.Logger, 'Formatter') - return initializeClass(superclass, className, functions, {}, { - call: function (args) { - for (var i = 0; i < args.length; i++) { - // convert all (Opal) Hash arguments to JSON. - if (typeof args[i] === 'object' && '$$smap' in args[i]) { - args[i] = fromHash(args[i]) - } - } - return args - } - }) -} - -function initializeLoggerClass (className, functions) { - var superClass = Opal.const_get_qualified(Opal.Asciidoctor, 'Logger') - return initializeClass(superClass, className, functions, {}, { - add: function (args) { - if (args.length >= 2 && typeof args[2] === 'object' && '$$smap' in args[2]) { - var message = args[2] - var messageObject = fromHash(message) - messageObject.getText = function () { - return this.text - } - messageObject.getSourceLocation = function () { - return this.source_location - } - messageObject.$inspect = function () { - var sourceLocation = this.getSourceLocation() - if (sourceLocation) { - return sourceLocation.getPath() + ': line ' + sourceLocation.getLineNumber() + ': ' + this.getText() - } else { - return this.getText() - } - } - args[2] = messageObject - } - if (args.length >= 1) { - args[1] = args[1] === Opal.nil ? undefined : args[1] - } - return args - } - }) -} - -/** - * @namespace - */ -var LoggerManager = Opal.const_get_qualified(Opal.Asciidoctor, 'LoggerManager', true) - -// Alias -Opal.Asciidoctor.LoggerManager = LoggerManager - -/** - * @memberof LoggerManager - */ -LoggerManager.getLogger = function () { - return this.$logger() -} - -/** - * @memberof LoggerManager - */ -LoggerManager.setLogger = function (logger) { - this.logger = logger -} - -/** - * @memberof LoggerManager - */ -LoggerManager.newLogger = function (name, functions) { - return initializeLoggerClass(name, functions).$new() -} - -/** - * @memberof LoggerManager - */ -LoggerManager.newFormatter = function (name, functions) { - return initializeLoggerFormatterClass(name, functions).$new() -} - -/** - * @namespace - */ -var LoggerSeverity = Opal.const_get_qualified(Opal.Logger, 'Severity', true) - -// Alias -Opal.Asciidoctor.LoggerSeverity = LoggerSeverity - -/** - * @memberof LoggerSeverity - */ -LoggerSeverity.get = function (severity) { - return LoggerSeverity.$constants()[severity] -} - -/** - * @namespace - */ -var LoggerFormatter = Opal.const_get_qualified(Opal.Logger, 'Formatter', true) - -// Alias -Opal.Asciidoctor.LoggerFormatter = LoggerFormatter - -/** - * @memberof LoggerFormatter - */ -LoggerFormatter.prototype.call = function (severity, time, programName, message) { - return this.$call(LoggerSeverity.get(severity), time, programName, message) -} - -/** - * @namespace - */ -var MemoryLogger = Opal.const_get_qualified(Opal.Asciidoctor, 'MemoryLogger', true) - -// Alias -Opal.Asciidoctor.MemoryLogger = MemoryLogger - -/** - * Create a new MemoryLogger. - * @returns {MemoryLogger} - a MemoryLogger - * @memberof MemoryLogger - */ -MemoryLogger.create = function () { - return this.$new() -} - -/** - * @returns {Array<Object>} - a list of messages - * @memberof MemoryLogger - */ -MemoryLogger.prototype.getMessages = function () { - var messages = this.messages - var result = [] - for (var i = 0; i < messages.length; i++) { - var message = messages[i] - var messageObject = fromHash(message) - if (typeof messageObject.message === 'string') { - messageObject.getText = function () { - return this.message - } - } else { - // also convert the message attribute - messageObject.message = fromHash(messageObject.message) - messageObject.getText = function () { - return this.message.text - } - } - messageObject.getSeverity = function () { - return this.severity.toString() - } - messageObject.getSourceLocation = function () { - return this.message.source_location - } - result.push(messageObject) - } - return result -} - -var Logging = Opal.const_get_qualified(Opal.Asciidoctor, 'Logging', true) - -Opal.Asciidoctor.Logging = Logging - -Logging.getLogger = function () { - return LoggerManager.$logger() -} - -Logging.createLogMessage = function (text, context) { - return Logging.prototype.$message_with_context(text, toHash(context)) -} - -// alias - -/** - * @memberof Reader - */ -Reader.prototype.getLogger = Logging.getLogger -/** - * @memberof Reader - */ -Reader.prototype.createLogMessage = Logging.createLogMessage - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.getLogger = Logging.getLogger -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.createLogMessage = Logging.createLogMessage - -/** - * @namespace - */ -var Logger = Opal.const_get_qualified(Opal.Asciidoctor, 'Logger', true) - -// Alias -Opal.Asciidoctor.Logger = Logger - -/** - * @returns {number|undefined} - the maximum severity - * @memberof Logger - */ -Logger.prototype.getMaxSeverity = function () { - var result = this.max_severity - return result === Opal.nil ? undefined : result -} -/** - * @returns {LoggerFormatter} - the formatter - * @memberof Logger - */ -Logger.prototype.getFormatter = function () { - return this.formatter -} -/** - * @param {LoggerFormatter} formatter - the formatter - * @memberof Logger - */ -Logger.prototype.setFormatter = function (formatter) { - this.formatter = formatter -} -/** - * @returns {number} - the logging severity threshold - * @memberof Logger - */ -Logger.prototype.getLevel = function () { - return this.level -} -/** - * @param {number} level - the logging severity threshold - * @memberof Logger - */ -Logger.prototype.setLevel = function (level) { - this.level = level -} -/** - * @returns {string} - the program name - * @memberof Logger - */ -Logger.prototype.getProgramName = function () { - return this.progname -} -/** - * @param {string} programName - the program name - * @memberof Logger - */ -Logger.prototype.setProgramName = function (programName) { - this.progname = programName -} - -var RubyLogger = Opal.const_get_qualified('::', 'Logger') - -var log = function (logger, level, message) { - logger['$' + level](message) -} -RubyLogger.prototype.add = function (severity, message, programName) { - var severityValue = typeof severity === 'string' ? LoggerSeverity[severity.toUpperCase()] : severity - this.$add(severityValue, message, programName) -} -RubyLogger.prototype.log = RubyLogger.prototype.add -RubyLogger.prototype.debug = function (message) { - log(this, 'debug', message) -} -RubyLogger.prototype.info = function (message) { - log(this, 'info', message) -} -RubyLogger.prototype.warn = function (message) { - log(this, 'warn', message) -} -RubyLogger.prototype.error = function (message) { - log(this, 'error', message) -} -RubyLogger.prototype.fatal = function (message) { - log(this, 'fatal', message) -} -RubyLogger.prototype.isDebugEnabled = function () { - return this['$debug?']() -} -RubyLogger.prototype.isInfoEnabled = function () { - return this['$info?']() -} -RubyLogger.prototype.isWarnEnabled = function () { - return this['$warn?']() -} -RubyLogger.prototype.isErrorEnabled = function () { - return this['$error?']() -} -RubyLogger.prototype.isFatalEnabled = function () { - return this['$fatal?']() -} - -/** - * @namespace - */ -var NullLogger = Opal.const_get_qualified(Opal.Asciidoctor, 'NullLogger', true) - -// Alias -Opal.Asciidoctor.NullLogger = NullLogger - -/** - * Create a new NullLogger. - * @returns {NullLogger} - a NullLogger - * @memberof NullLogger - */ -NullLogger.create = function () { - return this.$new() -} - -/** - * @returns {number|undefined} - the maximum severity - * @memberof NullLogger - */ -NullLogger.prototype.getMaxSeverity = function () { - return this.max_severity -} - -// Alias -Opal.Asciidoctor.StopIteration = Opal.StopIteration - -/** - * @namespace - */ -var Timings = Opal.const_get_qualified(Opal.Asciidoctor, 'Timings', true) - -// Alias -Opal.Asciidoctor.Timings = Timings - -/** - * Create a new Timings. - * @returns {Timings} - a Timings - * @memberof Timings - */ -Timings.create = function () { - return this.$new() -} - -/** - * Print a report to the specified output. - * The report will include: - * - the time to read and parse source - * - the time to convert document - * - the total time (read, parse and convert) - * @param {RubyLogger|console|Object} [to] - an optional output (by default stdout) - * @param {string} [subject] - an optional subject (usually the file name) - * @memberof Timings - */ -Timings.prototype.printReport = function (to, subject) { - var outputFunction - if (to) { - if (typeof to.$add === 'function') { - outputFunction = function (message) { - to.$add(1, message) - } - } else if (typeof to.log === 'function') { - outputFunction = to.log - } else if (typeof to.write === 'function') { - outputFunction = function (message) { - to.write(message, 'utf-8') - } - } else { - throw new Error('The output should be a Stream (with a write function), an object with a log function or a Ruby Logger (with a add function)') - } - } else { - outputFunction = function (message) { - Opal.gvars.stdout.$write(message) - } - } - if (subject) { - outputFunction('Input file: ' + subject) - } - outputFunction(' Time to read and parse source: ' + this.$read_parse().toFixed(2)) - outputFunction(' Time to convert document: ' + this.$convert().toFixed(2)) - outputFunction(' Total time (read, parse and convert): ' + this.$read_parse_convert().toFixed(2)) -} - -/** - * @namespace - * @description - * This API is experimental and subject to change. - * - * A pluggable adapter for integrating a syntax (aka code) highlighter into AsciiDoc processing. - * - * There are two types of syntax highlighter adapters. The first performs syntax highlighting during the convert phase. - * This adapter type must define a "handlesHighlighting" method that returns true. - * The companion "highlight" method will then be called to handle the "specialcharacters" substitution for source blocks. - * - * The second assumes syntax highlighting is performed on the client (e.g., when the HTML document is loaded). - * This adapter type must define a "hasDocinfo" method that returns true. - * The companion "docinfo" method will then be called to insert markup into the output document. - * The docinfo functionality is available to both adapter types. - * - * Asciidoctor.js provides several a built-in adapter for highlight.js. - * Additional adapters can be registered using SyntaxHighlighter.register. - */ -var SyntaxHighlighter = Opal.const_get_qualified(Opal.Asciidoctor, 'SyntaxHighlighter', true) - -// Alias -Opal.Asciidoctor.SyntaxHighlighter = SyntaxHighlighter - -/** - * Associates the syntax highlighter class or object with the specified names. - * - * @description This API is experimental and subject to change. - * - * @param {string|Array} names - A {string} name or an {Array} of {string} names - * @param functions - A list of functions representing a {SyntaxHighlighter} or a {SyntaxHighlighter} class to instantiate - * @memberof SyntaxHighlighter - */ -SyntaxHighlighter.register = function (names, functions) { - var name = typeof names === 'string' ? names : names[0] - if (typeof functions === 'function') { - var classObject = functions - var prototype = classObject.prototype - var properties = Object.getOwnPropertyNames(prototype) - functions = {} - for (var propertyIdx in properties) { - var propertyName = properties[propertyIdx] - functions[propertyName] = prototype[propertyName] - } - } - var scope = initializeClass(SyntaxHighlighterBase, name, functions, {}, { - format: function (args) { - if (args.length >= 2 && typeof args[2] === 'object' && '$$smap' in args[2]) { - args[2] = fromHash(args[2]) - } - if (args.length >= 1) { - args[1] = args[1] === Opal.nil ? undefined : args[1] - } - return args - }, - highlight: function (args) { - if (args.length >= 3 && typeof args[3] === 'object' && '$$smap' in args[3]) { - var opts = args[3] - opts = fromHash(opts) - for (var key in opts) { - var value = opts[key] - if (key === 'callouts') { - var callouts = fromHashKeys(value) - for (var idx in callouts) { - var callout = callouts[idx] - for (var i = 0; i < callout.length; i++) { - var items = callout[i] - for (var j = 0; j < items.length; j++) { - items[j] = items[j] === Opal.nil ? undefined : items[j] - } - } - } - opts[key] = callouts - } else { - opts[key] = value === Opal.nil ? undefined : value - } - } - args[3] = opts - } - if (args.length >= 2) { - args[2] = args[2] === Opal.nil ? undefined : args[2] - } - return args - } - }) - for (var functionName in functions) { - if (Object.prototype.hasOwnProperty.call(functions, functionName)) { - (function (functionName) { - var userFunction = functions[functionName] - if (functionName === 'handlesHighlighting') { - Opal.def(scope, '$highlight?', function () { - return userFunction.call() - }) - } else if (functionName === 'hasDocinfo') { - Opal.def(scope, '$docinfo?', function (location) { - return userFunction.apply(this, [location]) - }) - } - }(functionName)) - } - } - Opal.def(scope, '$name', function () { - return name - }) - SyntaxHighlighter.$register(scope, names) - return scope -} - -/** - * Retrieves the syntax highlighter class or object registered for the specified name. - * - * @description This API is experimental and subject to change. - * - * @param {string} name - The {string} name of the syntax highlighter to retrieve. - * @returns {SyntaxHighlighter} - the {SyntaxHighlighter} registered for this name. - * @memberof SyntaxHighlighter - */ -SyntaxHighlighter.get = function (name) { - var result = SyntaxHighlighter.$for(name) - return result === Opal.nil ? undefined : result -} - -/** - * @deprecated Please use {SyntaxHighlighter#get} method as "for" is a reserved keyword. - */ -SyntaxHighlighter.for = SyntaxHighlighter.get - -/** - * @namespace - */ -var SyntaxHighlighterBase = Opal.const_get_qualified(SyntaxHighlighter, 'Base', true) - -// Alias -Opal.Asciidoctor.SyntaxHighlighterBase = SyntaxHighlighterBase - -/** - * Statically register the current class in the registry for the specified names. - * - * @description This API is experimental and subject to change. - * - * @param {string|Array<string>} names - A {string} name or an {Array} of {string} names - * @memberof SyntaxHighlighterBase - */ -SyntaxHighlighterBase.prototype.registerFor = function (names) { - SyntaxHighlighter.$register(this, names) -} - -// Table API - -/** - * Methods for managing AsciiDoc tables. - * @namespace - * @extends AbstractBlock - */ -var Table = Opal.Asciidoctor.Table - -/** - * Create a new Table element. - * @param {AbstractBlock} parent - * @param {Object|undefined} attributes - * @returns {Table} - a new {Table} object - */ -Table.create = function (parent, attributes) { - return this.$new(parent, toHash(attributes)) -} - -/** - * Get the caption of the table. - * @returns {string} - * @memberof Table - */ -Table.prototype.getCaption = function () { - return this.caption -} - -/** - * Get the rows of this table. - * @returns {Table.Rows} - an {Table.Rows} object with the members "head", "body" and "foot" - * @memberof Table - */ -Table.prototype.getRows = function () { - return this.rows -} - -/** - * Get the columns of this table. - * @returns {Array<Column>} - * @memberof Table - */ -Table.prototype.getColumns = function () { - return this.columns -} - -/** - * Get the head rows of this table. - * @returns {Array<Array<Cell>>} - an Array of Array of Cell - * @memberof Table - */ -Table.prototype.getHeadRows = function () { - return this.rows.head -} - -/** - * Check if the table has a head rows. - * @returns {boolean} - * @memberof Table - */ -Table.prototype.hasHeadRows = function () { - return this.rows !== Opal.nil && this.rows.head.length > 0 -} - -/** - * Get the body rows of this table. - * @returns {Array<Array<Cell>>} - an Array of Array of Cell - * @memberof Table - */ -Table.prototype.getBodyRows = function () { - return this.rows.body -} - -/** - * Check if the table has a body rows. - * @returns {boolean} - */ -Table.prototype.hasBodyRows = function () { - return this.rows !== Opal.nil && this.rows.body.length > 0 -} - -/** - * Get the foot rows of this table. - * @returns {Array<Array<Cell>>} - an Array of Array of Cell - * @memberof Table - */ -Table.prototype.getFootRows = function () { - return this.rows.foot -} - -/** - * Check if the table has a foot rows. - * @returns {boolean} - */ -Table.prototype.hasFootRows = function () { - return this.rows !== Opal.nil && this.rows.foot.length > 0 -} - -/** - * Check if the table has a header option set. - * @returns {boolean} - * @memberof Table - */ -Table.prototype.hasHeaderOption = function () { - return this.has_header_option -} - -/** - * Check if the table has the footer option set. - * @returns {boolean} - * @memberof Table - */ -Table.prototype.hasFooterOption = function () { - var footerOption = this.getAttributes()['footer-option'] - return footerOption === '' -} - -/** - * Check if the table has the autowidth option set. - * @returns {boolean} - * @memberof Table - */ -Table.prototype.hasAutowidthOption = function () { - var autowidthOption = this.getAttributes()['autowidth-option'] - return autowidthOption === '' -} - -/** - * Get the number of rows in the table. - * Please note that the header and footer rows are also counted. - * @returns {number|undefined} - * @memberof Table - */ -Table.prototype.getRowCount = function () { - return this.getAttribute('rowcount') -} - -/** - * Set the number of rows in the table. - * Please note that the header and footer rows are also counted. - * @param {number} value - the value - * @memberof Table - */ -Table.prototype.setRowCount = function (value) { - this.setAttribute('rowcount', value) -} - -/** - * Get the number of columns in the table. - * @returns {number|undefined} - * @memberof Table - */ -Table.prototype.getColumnCount = function () { - return this.getAttribute('colcount') -} - -/** - * Set the number of columns in the table. - * @param {number} value - the value - * @memberof Table - */ -Table.prototype.setColumnCount = function (value) { - this.setAttribute('colcount', value) -} - -// Rows - -/** - * @namespace - */ -var Rows = Opal.Asciidoctor.Table.Rows - -/** - * Create a new Rows element. - * @param {array<array<Cell>>} head - * @param {array<array<Cell>>} foot - * @param {array<array<Cell>>} body - * @returns Rows - */ -Rows.create = function (head, foot, body) { - return this.$new(head, foot, body) -} - -/** - * Get head rows. - * @returns {array<array<Cell>>} - */ -Rows.prototype.getHead = function () { - return this.head -} - -/** - * Get foot rows. - * @returns {array<array<Cell>>} - */ -Rows.prototype.getFoot = function () { - return this.foot -} - -/** - * Get body rows. - * @returns {array<array<Cell>>} - */ -Rows.prototype.getBody = function () { - return this.body -} - -/** - * Retrieve the rows grouped by section as a nested Array. - * - * Creates a 2-dimensional array of two element entries. - * The first element is the section name as a string. - * The second element is the Array of rows in that section. - * The entries are in document order (head, foot, body). - * @returns {[[string, array<array<Cell>>], [string, array<array<Cell>>], [string, array<array<Cell>>]]} - */ -Rows.prototype.bySection = function () { - return [['head', this.head], ['body', this.body], ['foot', this.foot]] -} - -// Table Column - -/** - * Methods to manage the columns of an AsciiDoc table. - * In particular, it keeps track of the column specs. - * @namespace - * @extends AbstractNode - */ -var Column = Opal.Asciidoctor.Table.Column - -/** - * Create a new Column element. - * @param {Table} table - * @param {number} index - * @param {Object|undefined} attributes - * @returns Column - */ -Column.create = function (table, index, attributes) { - return this.$new(table, index, toHash(attributes)) -} - -/** - * Get the column number of this cell. - * @returns {number|undefined} - * @memberof Column - */ -Column.prototype.getColumnNumber = function () { - return this.getAttribute('colnumber') -} - -/** - * Get the width of this cell. - * @returns {string|undefined} - * @memberof Column - */ -Column.prototype.getWidth = function () { - return this.getAttribute('width') -} - -/** - * Get the horizontal align of this cell. - * @returns {string|undefined} - * @memberof Column - */ -Column.prototype.getHorizontalAlign = function () { - return this.getAttribute('halign') -} - -/** - * Get the vertical align of this cell. - * @returns {string|undefined} - * @memberof Column - */ -Column.prototype.getVerticalAlign = function () { - return this.getAttribute('valign') -} - -/** - * Get the style of this cell. - * @returns {string} - * @memberof Column - */ -Column.prototype.getStyle = function () { - var style = this.style - return style === Opal.nil ? undefined : style -} - -// Table Cell - -/** - * Methods for managing the cells in an AsciiDoc table. - * @namespace - * @extends AbstractBlock - */ -var Cell = Opal.Asciidoctor.Table.Cell - -/** - * Create a new Cell element - * @param {Column} column - * @param {string} cellText - * @param {Object|undefined} attributes - * @param {Object|undefined} opts - * @returns {Cell} - */ -Cell.create = function (column, cellText, attributes, opts) { - return this.$new(column, cellText, toHash(attributes), toHash(opts)) -} - -/** - * Get the column span of this {@link Cell} node. - * @returns {number} - An Integer of the number of columns this cell will span (default: undefined) - * @memberof Cell - */ -Cell.prototype.getColumnSpan = function () { - var colspan = this.colspan - return colspan === Opal.nil ? undefined : colspan -} - -/** - * Set the column span of this {@link Cell} node. - * @param {number} value - * @returns {number} - The new colspan value - * @memberof Cell - */ -Cell.prototype.setColumnSpan = function (value) { - return this['$colspan='](value) -} - -/** - * Get the row span of this {@link Cell} node - * @returns {number|undefined} - An Integer of the number of rows this cell will span (default: undefined) - * @memberof Cell - */ -Cell.prototype.getRowSpan = function () { - var rowspan = this.rowspan - return rowspan === Opal.nil ? undefined : rowspan -} - -/** - * Set the row span of this {@link Cell} node - * @param {number} value - * @returns {number} - The new rowspan value - * @memberof Cell - */ -Cell.prototype.setRowSpan = function (value) { - return this['$rowspan='](value) -} - -/** - * Get the content of the cell. - * This method should not be used for cells in the head row or that have the literal style. - * @returns {string} - * @memberof Cell - */ -Cell.prototype.getContent = function () { - return this.$content() -} - -/** - * Get the text of the cell. - * @returns {string} - * @memberof Cell - */ -Cell.prototype.getText = function () { - return this.$text() -} - -/** - * Get the source of the cell. - * @returns {string} - * @memberof Cell - */ -Cell.prototype.getSource = function () { - return this.$source() -} - -/** - * Get the lines of the cell. - * @returns {Array<string>} - * @memberof Cell - */ -Cell.prototype.getLines = function () { - return this.$lines() -} - -/** - * Get the line number of the cell. - * @returns {number|undefined} - * @memberof Cell - */ -Cell.prototype.getLineNumber = function () { - var lineno = this.$lineno() - return lineno === Opal.nil ? undefined : lineno -} - -/** - * Get the source file of the cell. - * @returns {string|undefined} - * @memberof Cell - */ -Cell.prototype.getFile = function () { - var file = this.$file() - return file === Opal.nil ? undefined : file -} - -/** - * Get the style of the cell. - * @returns {string|undefined} - * @memberof Cell - */ -Cell.prototype.getStyle = function () { - var style = this.$style() - return style === Opal.nil ? undefined : style -} - -/** - * Get the column of this cell. - * @returns {Column|undefined} - * @memberof Cell - */ -Cell.prototype.getColumn = function () { - var column = this.$column() - return column === Opal.nil ? undefined : column -} - -/** - * Get the width of this cell. - * @returns {string|undefined} - * @memberof Cell - */ -Cell.prototype.getWidth = function () { - return this.getAttribute('width') -} - -/** - * Get the column width in percentage of this cell. - * @returns {string|undefined} - * @memberof Cell - */ -Cell.prototype.getColumnPercentageWidth = function () { - return this.getAttribute('colpcwidth') -} - -/** - * Get the nested {Document} of this cell when style is 'asciidoc'. - * @returns {Document|undefined} - the nested {Document} - * @memberof Cell - */ -Cell.prototype.getInnerDocument = function () { - var innerDocument = this.inner_document - return innerDocument === Opal.nil ? undefined : innerDocument -} - -// Templates - -/** - * @description - * This API is experimental and subject to change. - * - * Please note that this API is currently only available in a Node environment. - * We recommend to use a custom converter if you are running in the browser. - * - * @namespace - * @module Converter/TemplateConverter - */ -var TemplateConverter = Opal.Asciidoctor.Converter.TemplateConverter - -if (TemplateConverter) { - // Alias - Opal.Asciidoctor.TemplateConverter = TemplateConverter - - /** - * Create a new TemplateConverter. - * @param {string} backend - the backend name - * @param templateDirectories - a list of template directories - * @param {Object} opts - a JSON of options - * @param {string} opts.template_engine - the name of the template engine - * @param {Object} [opts.template_cache] - an optional template cache - * @param {Object} [opts.template_cache.scans] - a JSON of template objects keyed by template name keyed by path patterns - * @param {Object} [opts.template_cache.templates] - a JSON of template objects keyed by file paths - * @returns {TemplateConverter} - * @memberof Converter/TemplateConverter - */ - TemplateConverter.create = function (backend, templateDirectories, opts) { - if (opts && opts.template_cache) { - opts.template_cache = toHash(opts.template_cache) - } - this.$new(backend, templateDirectories, toHash(opts)) - } - - /** - * @returns {Object} - The global cache - * @memberof Converter/TemplateConverter - */ - TemplateConverter.getCache = function () { - var caches = fromHash(this.caches) - if (caches) { - if (caches.scans) { - caches.scans = fromHash(caches.scans) - for (var key in caches.scans) { - caches.scans[key] = fromHash(caches.scans[key]) - } - } - if (caches.templates) { - caches.templates = fromHash(caches.templates) - } - } - return caches - } - - /** - * Clear the global cache. - * @memberof Converter/TemplateConverter - */ - TemplateConverter.clearCache = function () { - this.$clear_caches() - } - - /** - * Convert an {AbstractNode} to the backend format using the named template. - * - * Looks for a template that matches the value of the template name or, - * if the template name is not specified, the value of the {@see AbstractNode.getNodeName} function. - * - * @param {AbstractNode} node - the AbstractNode to convert - * @param {string} templateName - the {string} name of the template to use, or the node name of the node if a template name is not specified. (optional, default: undefined) - * @param {Object} opts - an optional JSON that is passed as local variables to the template. (optional, default: undefined) - * @returns {string} - The {string} result from rendering the template - * @memberof Converter/TemplateConverter - */ - TemplateConverter.prototype.convert = function (node, templateName, opts) { - return this.$convert(node, templateName, toHash(opts)) - } - - /** - * Checks whether there is a template registered with the specified name. - * - * @param {string} name - the {string} template name - * @returns {boolean} - a {boolean} that indicates whether a template is registered for the specified template name. - * @memberof Converter/TemplateConverter - */ - TemplateConverter.prototype.handles = function (name) { - return this['$handles?'](name) - } - - /** - * Retrieves the templates that this converter manages. - * - * @returns {Object} - a JSON of template objects keyed by template name - * @memberof Converter/TemplateConverter - */ - TemplateConverter.prototype.getTemplates = function () { - return fromHash(this.$templates()) - } - - /** - * Registers a template with this converter. - * - * @param {string} name - the {string} template name - * @param {Object} template - the template object to register - * @returns {Object} - the template object - * @memberof Converter/TemplateConverter - */ - TemplateConverter.prototype.register = function (name, template) { - return this.$register(name, template) - } - - /** - * @namespace - * @description - * This API is experimental and subject to change. - * - * Please note that this API is currently only available in a Node environment. - * We recommend to use a custom converter if you are running in the browser. - * - * A pluggable adapter for integrating a template engine into the built-in template converter. - */ - var TemplateEngine = {} - TemplateEngine.registry = {} - - // Alias - Opal.Asciidoctor.TemplateEngine = TemplateEngine - - /** - * Register a template engine adapter for the given names. - * @param {string|Array} names - a {string} name or an {Array} of {string} names - * @param {Object} templateEngineAdapter - a template engine adapter instance - * @example - * const fs = require('fs') - * class DotTemplateEngineAdapter { - * constructor () { - * this.doT = require('dot') - * } - * compile (file, _) { - * const templateFn = this.doT.template(fs.readFileSync(file, 'utf8')) - * return { - * render: templateFn - * } - * } - * } - * asciidoctor.TemplateEngine.register('dot, new DotTemplateEngineAdapter()) - * @memberof TemplateEngine - */ - TemplateEngine.register = function (names, templateEngineAdapter) { - if (typeof names === 'string') { - this.registry[names] = templateEngineAdapter - } else { - // array - for (var i = 0; i < names.length; i++) { - var name = names[i] - this.registry[name] = templateEngineAdapter - } - } - } -} - -/* global Opal, fromHash, toHash, initializeClass */ -// Extensions API - -/** - * @private - */ -var toBlock = function (block) { - // arity is a mandatory field - block.$$arity = block.length - return block -} - -var registerExtension = function (registry, type, processor, name) { - if (typeof processor === 'object' || processor.$$is_class) { - // processor is an instance or a class - return registry['$' + type](processor, name) - } else { - // processor is a function/lambda - return Opal.send(registry, type, name && [name], toBlock(processor)) - } -} - -/** - * @namespace - * @description - * Extensions provide a way to participate in the parsing and converting - * phases of the AsciiDoc processor or extend the AsciiDoc syntax. - * - * The various extensions participate in AsciiDoc processing as follows: - * - * 1. After the source lines are normalized, {{@link Extensions/Preprocessor}}s modify or replace - * the source lines before parsing begins. {{@link Extensions/IncludeProcessor}}s are used to - * process include directives for targets which they claim to handle. - * 2. The Parser parses the block-level content into an abstract syntax tree. - * Custom blocks and block macros are processed by associated {{@link Extensions/BlockProcessor}}s - * and {{@link Extensions/BlockMacroProcessor}}s, respectively. - * 3. {{@link Extensions/TreeProcessor}}s are run on the abstract syntax tree. - * 4. Conversion of the document begins, at which point inline markup is processed - * and converted. Custom inline macros are processed by associated {InlineMacroProcessor}s. - * 5. {{@link Extensions/Postprocessor}}s modify or replace the converted document. - * 6. The output is written to the output stream. - * - * Extensions may be registered globally using the {Extensions.register} method - * or added to a custom {Registry} instance and passed as an option to a single - * Asciidoctor processor. - * - * @example - * asciidoctor.Extensions.register(function () { - * this.block(function () { - * var self = this; - * self.named('shout'); - * self.onContext('paragraph'); - * self.process(function (parent, reader) { - * var lines = reader.getLines().map(function (l) { return l.toUpperCase(); }); - * return self.createBlock(parent, 'paragraph', lines); - * }); - * }); - * }); - */ -var Extensions = Opal.const_get_qualified(Opal.Asciidoctor, 'Extensions') - -// Alias -Opal.Asciidoctor.Extensions = Extensions - -/** - * Create a new {@link Extensions/Registry}. - * @param {string} name - * @param {function} block - * @memberof Extensions - * @returns {Extensions/Registry} - returns a {@link Extensions/Registry} - */ -Extensions.create = function (name, block) { - if (typeof name === 'function' && typeof block === 'undefined') { - return Opal.send(this, 'create', null, toBlock(name)) - } else if (typeof block === 'function') { - return Opal.send(this, 'create', [name], toBlock(block)) - } else { - return this.$create() - } -} - -/** - * @memberof Extensions - */ -Extensions.register = function (name, block) { - if (typeof name === 'function' && typeof block === 'undefined') { - return Opal.send(this, 'register', null, toBlock(name)) - } else { - return Opal.send(this, 'register', [name], toBlock(block)) - } -} - -/** - * Get statically-registered extension groups. - * @memberof Extensions - */ -Extensions.getGroups = function () { - return fromHash(this.$groups()) -} - -/** - * Unregister all statically-registered extension groups. - * @memberof Extensions - */ -Extensions.unregisterAll = function () { - this.$unregister_all() -} - -/** - * Unregister the specified statically-registered extension groups. - * - * NOTE Opal cannot delete an entry from a Hash that is indexed by symbol, so - * we have to resort to using low-level operations in this method. - * - * @memberof Extensions - */ -Extensions.unregister = function () { - var names = Array.prototype.concat.apply([], arguments) - var groups = this.$groups() - var groupNameIdx = {} - for (var i = 0, groupSymbolNames = groups.$$keys; i < groupSymbolNames.length; i++) { - var groupSymbolName = groupSymbolNames[i] - groupNameIdx[groupSymbolName.toString()] = groupSymbolName - } - for (var j = 0; j < names.length; j++) { - var groupStringName = names[j] - if (groupStringName in groupNameIdx) Opal.hash_delete(groups, groupNameIdx[groupStringName]) - } -} - -/** - * @namespace - * @module Extensions/Registry - */ -var Registry = Extensions.Registry - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.getGroups = Extensions.getGroups - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.unregisterAll = function () { - this.groups = Opal.hash() -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.unregister = Extensions.unregister - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.prefer = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - if (typeof processor === 'object' || processor.$$is_class) { - // processor is an instance or a class - return this.$prefer(name, processor) - } else { - // processor is a function/lambda - return Opal.send(this, 'prefer', name && [name], toBlock(processor)) - } -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.block = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'block', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.inlineMacro = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'inline_macro', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.includeProcessor = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'include_processor', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.blockMacro = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'block_macro', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.treeProcessor = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'tree_processor', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.postprocessor = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'postprocessor', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.preprocessor = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'preprocessor', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.docinfoProcessor = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'docinfo_processor', processor, name) -} - -/** - * Checks whether any {{@link Extensions/Preprocessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/Preprocessor}} extensions are registered. - */ -Registry.prototype.hasPreprocessors = function () { - return this['$preprocessors?']() -} - -/** - * Checks whether any {{@link Extensions/TreeProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/TreeProcessor}} extensions are registered. - */ -Registry.prototype.hasTreeProcessors = function () { - return this['$tree_processors?']() -} - -/** - * Checks whether any {{@link Extensions/IncludeProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/IncludeProcessor}} extensions are registered. - */ -Registry.prototype.hasIncludeProcessors = function () { - return this['$include_processors?']() -} - -/** - * Checks whether any {{@link Extensions/Postprocessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/Postprocessor}} extensions are registered. - */ -Registry.prototype.hasPostprocessors = function () { - return this['$postprocessors?']() -} - -/** - * Checks whether any {{@link Extensions/DocinfoProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @param location - A {string} for selecting docinfo extensions at a given location (head or footer) (default: undefined) - * @returns a {boolean} indicating whether any {{@link Extensions/DocinfoProcessor}} extensions are registered. - */ -Registry.prototype.hasDocinfoProcessors = function (location) { - return this['$docinfo_processors?'](location) -} - -/** - * Checks whether any {{@link Extensions/BlockProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/BlockProcessor}} extensions are registered. - */ -Registry.prototype.hasBlocks = function () { - return this['$blocks?']() -} - -/** - * Checks whether any {{@link Extensions/BlockMacroProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/BlockMacroProcessor}} extensions are registered. - */ -Registry.prototype.hasBlockMacros = function () { - return this['$block_macros?']() -} - -/** - * Checks whether any {{@link Extensions/InlineMacroProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/InlineMacroProcessor}} extensions are registered. - */ -Registry.prototype.hasInlineMacros = function () { - return this['$inline_macros?']() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/Preprocessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getPreprocessors = function () { - return this.$preprocessors() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/TreeProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getTreeProcessors = function () { - return this.$tree_processors() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/IncludeProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getIncludeProcessors = function () { - return this.$include_processors() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/Postprocessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getPostprocessors = function () { - return this.$postprocessors() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/DocinfoProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @param location - A {string} for selecting docinfo extensions at a given location (head or footer) (default: undefined) - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getDocinfoProcessors = function (location) { - return this.$docinfo_processors(location) -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/BlockProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getBlocks = function () { - return this.block_extensions.$values() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/BlockMacroProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getBlockMacros = function () { - return this.block_macro_extensions.$values() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/InlineMacroProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getInlineMacros = function () { - return this.$inline_macros() -} - -/** - * Get any {{@link Extensions/InlineMacroProcessor}} extensions are registered to handle the specified inline macro name. - * - * @param name - the {string} inline macro name - * @memberof Extensions/Registry - * @returns the Extension proxy object for the {{@link Extensions/InlineMacroProcessor}} that matches the inline macro name or undefined if no match is found. - */ -Registry.prototype.getInlineMacroFor = function (name) { - var result = this['$registered_for_inline_macro?'](name) - return result === false ? undefined : result -} - -/** - * Get any {{@link Extensions/BlockProcessor}} extensions are registered to handle the specified block name appearing on the specified context. - * @param name - the {string} block name - * @param context - the context of the block: paragraph, open... (optional) - * @memberof Extensions/Registry - * @returns the Extension proxy object for the {{@link Extensions/BlockProcessor}} that matches the block name and context or undefined if no match is found. - */ -Registry.prototype.getBlockFor = function (name, context) { - if (typeof context === 'undefined') { - var ext = this.$find_block_extension(name) - return ext === Opal.nil ? undefined : ext - } - var result = this['$registered_for_block?'](name, context) - return result === false ? undefined : result -} - -/** - * Get any {{@link Extensions/BlockMacroProcessor}} extensions are registered to handle the specified macro name. - * - * @param name - the {string} macro name - * @memberof Extensions/Registry - * @returns the Extension proxy object for the {{@link Extensions/BlockMacroProcessor}} that matches the macro name or undefined if no match is found. - */ -Registry.prototype.getBlockMacroFor = function (name) { - var result = this['$registered_for_block_macro?'](name) - return result === false ? undefined : result -} - -/** - * @namespace - * @module Extensions/Processor - */ -var Processor = Extensions.Processor - -/** - * The extension will be added to the beginning of the list for that extension type. (default is append). - * @memberof Extensions/Processor - * @deprecated Please use the <code>prefer</pre> function on the {@link Extensions/Registry}, - * the {@link Extensions/IncludeProcessor}, - * the {@link Extensions/TreeProcessor}, - * the {@link Extensions/Postprocessor}, - * the {@link Extensions/Preprocessor} - * or the {@link Extensions/DocinfoProcessor} - */ -Processor.prototype.prepend = function () { - this.$option('position', '>>') -} - -/** - * @memberof Extensions/Processor - */ -Processor.prototype.process = function (block) { - var handler = { - apply: function (target, thisArg, argumentsList) { - for (var i = 0; i < argumentsList.length; i++) { - // convert all (Opal) Hash arguments to JSON. - if (typeof argumentsList[i] === 'object' && '$$smap' in argumentsList[i]) { - argumentsList[i] = fromHash(argumentsList[i]) - } - } - return target.apply(thisArg, argumentsList) - } - } - var blockProxy = new Proxy(block, handler) - return Opal.send(this, 'process', null, toBlock(blockProxy)) -} - -/** - * @param {string} name - * @memberof Extensions/Processor - */ -Processor.prototype.named = function (name) { - return this.$named(name) -} - -/** - * Creates a block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string} context - * @param {string|Array<string>} source - * @param {Object|undefined} attrs - A JSON of attributes - * @param {Object|undefined} opts - A JSON of options - * @return {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createBlock = function (parent, context, source, attrs, opts) { - return this.$create_block(parent, context, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates a list block node and links it to the specified parent. - * - * @param parent - The parent Block (Block, Section, or Document) of this new list block. - * @param {string} context - The list context (e.g., ulist, olist, colist, dlist) - * @param {Object} attrs - An object of attributes to set on this list block - * @returns {List} - * @memberof Extensions/Processor - */ -Processor.prototype.createList = function (parent, context, attrs) { - return this.$create_list(parent, context, toHash(attrs)) -} - -/** - * Creates a list item node and links it to the specified parent. - * - * @param {List} parent - The parent {List} of this new list item block. - * @param {string} text - The text of the list item. - * @returns {ListItem} - * @memberof Extensions/Processor - */ -Processor.prototype.createListItem = function (parent, text) { - return this.$create_list_item(parent, text) -} - -/** - * Creates an image block node and links it to the specified parent. - * @param {Block|Section|Document} parent - The parent Block of this new image block. - * @param {Object} attrs - A JSON of attributes - * @param {string} attrs.target - the target attribute to set the source of the image. - * @param {string} attrs.alt - the alt attribute to specify an alternative text for the image. - * @param {Object} opts - A JSON of options - * @returns {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createImageBlock = function (parent, attrs, opts) { - return this.$create_image_block(parent, toHash(attrs), toHash(opts)) -} - -/** - * Creates a paragraph block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - a paragraph {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createParagraph = function (parent, source, attrs, opts) { - return this.$create_paragraph(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates an open block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - an open {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createOpenBlock = function (parent, source, attrs, opts) { - return this.$create_open_block(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates an example block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - an example {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createExampleBlock = function (parent, source, attrs, opts) { - return this.$create_example_block(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates a literal block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - a literal {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createPassBlock = function (parent, source, attrs, opts) { - return this.$create_pass_block(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates a listing block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - a listing {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createListingBlock = function (parent, source, attrs, opts) { - return this.$create_listing_block(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates a literal block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - a literal {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createLiteralBlock = function (parent, source, attrs, opts) { - return this.$create_literal_block(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates an inline anchor and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string} text - The text - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Inline} - an {Inline} anchor - * @memberof Extensions/Processor - */ -Processor.prototype.createAnchor = function (parent, text, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return this.$create_anchor(parent, text, toHash(opts)) -} - -/** - * Creates an inline pass and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string} text - The text - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Inline} - an {Inline} pass - * @memberof Extensions/Processor - */ -Processor.prototype.createInlinePass = function (parent, text, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return this.$create_inline_pass(parent, text, toHash(opts)) -} - -/** - * Creates an inline node and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block of this new inline node. - * @param {string} context - The context name - * @param {string} text - The text - * @param {Object|undefined} opts - A JSON of options - * @returns {Inline} - an {Inline} node - * @memberof Extensions/Processor - */ -Processor.prototype.createInline = function (parent, context, text, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return this.$create_inline(parent, context, text, toHash(opts)) -} - -/** - * Parses blocks in the content and attaches the block to the parent. - * @param {AbstractBlock} parent - the parent block - * @param {string|Array<string>} content - the content - * @param {Object|undefined} attrs - an object of attributes - * @returns {AbstractNode} - The parent node into which the blocks are parsed. - * @memberof Extensions/Processor - */ -Processor.prototype.parseContent = function (parent, content, attrs) { - return this.$parse_content(parent, content, attrs) -} - -/** - * Parses the attrlist String into a JSON of attributes - * @param {AbstractBlock} block - the current AbstractBlock or the parent AbstractBlock if there is no current block (used for applying subs) - * @param {string} attrlist - the list of attributes as a String - * @param {Object|undefined} opts - an optional JSON of options to control processing: - * - positional_attributes: an Array of attribute names to map positional arguments to (optional, default: []) - * - sub_attributes: enables attribute substitution on the attrlist argument (optional, default: false) - * - * @returns - a JSON of parsed attributes - * @memberof Extensions/Processor - */ -Processor.prototype.parseAttributes = function (block, attrlist, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return fromHash(this.$parse_attributes(block, attrlist, toHash(opts))) -} - -/** - * @param {string|Array<string>} value - Name of a positional attribute or an Array of positional attribute names - * @memberof Extensions/Processor - */ -Processor.prototype.positionalAttributes = function (value) { - return this.$positional_attrs(value) -} - -/** - * Specify how to resolve attributes. - * - * @param {string|Array<string>|Object|boolean} [value] - A specification to resolve attributes. - * @memberof Extensions/Processor - */ -Processor.prototype.resolveAttributes = function (value) { - if (typeof value === 'object' && !Array.isArray(value)) { - return this.$resolves_attributes(toHash(value)) - } - if (arguments.length > 1) { - return this.$resolves_attributes(Array.prototype.slice.call(arguments)) - } - if (typeof value === 'undefined') { - // Convert to nil otherwise an exception is thrown at: - // https://github.com/asciidoctor/asciidoctor/blob/0bcb4addc17b307f62975aad203fb556a1bcd8a5/lib/asciidoctor/extensions.rb#L583 - // - // if args.size == 1 && !args[0] - // - // In the above Ruby code, args[0] is undefined and Opal will try to call the function "!" on an undefined object. - return this.$resolves_attributes(Opal.nil) - } - return this.$resolves_attributes(value) -} - -/** - * @deprecated Please use the <code>resolveAttributes</pre> function on the {@link Extensions/Processor}. - * @memberof Extensions/Processor - * @see {Processor#resolveAttributes} - */ -Processor.prototype.resolvesAttributes = Processor.prototype.resolveAttributes - -/** - * Get the configuration JSON for this processor instance. - * @memberof Extensions/Processor - */ -Processor.prototype.getConfig = function () { - return fromHash(this.config) -} - -/** - * @memberof Extensions/Processor - */ -Processor.prototype.option = function (key, value) { - this.$option(key, value) -} - -/** - * @namespace - * @module Extensions/BlockProcessor - */ -var BlockProcessor = Extensions.BlockProcessor - -/** - * @param {Object} value - a JSON of default values for attributes - * @memberof Extensions/BlockProcessor - */ -BlockProcessor.prototype.defaultAttributes = function (value) { - this.$default_attributes(toHash(value)) -} - -/** - * @param {string} context - A context name - * @memberof Extensions/BlockProcessor - */ -BlockProcessor.prototype.onContext = function (context) { - return this.$on_context(context) -} - -/** - * @param {...string} contexts - A list of context names - * @memberof Extensions/BlockProcessor - */ -BlockProcessor.prototype.onContexts = function (contexts) { - return this.$on_contexts(Array.prototype.slice.call(arguments)) -} - -/** - * @returns {string} - * @memberof Extensions/BlockProcessor - */ -BlockProcessor.prototype.getName = function () { - var name = this.name - return name === Opal.nil ? undefined : name -} - -/** - * @param {string} value - * @memberof Extensions/BlockProcessor - */ -BlockProcessor.prototype.parseContentAs = function (value) { - this.$parse_content_as(value) -} - -/** - * @namespace - * @module Extensions/BlockMacroProcessor - */ -var BlockMacroProcessor = Extensions.BlockMacroProcessor - -/** - * @param {Object} value - a JSON of default values for attributes - * @memberof Extensions/BlockMacroProcessor - */ -BlockMacroProcessor.prototype.defaultAttributes = function (value) { - this.$default_attributes(toHash(value)) -} - -/** - * @returns {string} - the block macro name - * @memberof Extensions/BlockMacroProcessor - */ -BlockMacroProcessor.prototype.getName = function () { - var name = this.name - return name === Opal.nil ? undefined : name -} - -/** - * @param {string} value - * @memberof Extensions/BlockMacroProcessor - */ -BlockMacroProcessor.prototype.parseContentAs = function (value) { - this.$parse_content_as(value) -} - -/** - * @namespace - * @module Extensions/InlineMacroProcessor - */ -var InlineMacroProcessor = Extensions.InlineMacroProcessor - -/** - * @param {Object} value - a JSON of default values for attributes - * @memberof Extensions/InlineMacroProcessor - */ -InlineMacroProcessor.prototype.defaultAttributes = function (value) { - this.$default_attributes(toHash(value)) -} - -/** - * @returns {string} - the inline macro name - * @memberof Extensions/InlineMacroProcessor - */ -InlineMacroProcessor.prototype.getName = function () { - var name = this.name - return name === Opal.nil ? undefined : name -} - -/** - * @param {string} value - * @memberof Extensions/InlineMacroProcessor - */ -InlineMacroProcessor.prototype.parseContentAs = function (value) { - this.$parse_content_as(value) -} - -/** - * @param {string} value - * @memberof Extensions/InlineMacroProcessor - */ -InlineMacroProcessor.prototype.matchFormat = function (value) { - this.$match_format(value) -} - -/** - * @param {RegExp} value - * @memberof Extensions/InlineMacroProcessor - */ -InlineMacroProcessor.prototype.match = function (value) { - this.$match(value) -} - -/** - * @namespace - * @module Extensions/IncludeProcessor - */ -var IncludeProcessor = Extensions.IncludeProcessor - -/** - * @memberof Extensions/IncludeProcessor - */ -IncludeProcessor.prototype.handles = function (block) { - return Opal.send(this, 'handles?', null, toBlock(block)) -} - -/** - * @memberof Extensions/IncludeProcessor - */ -IncludeProcessor.prototype.prefer = function () { - this.$prefer() -} - -/** - * @namespace - * @module Extensions/TreeProcessor - */ -var TreeProcessor = Extensions.TreeProcessor - -/** - * @memberof Extensions/TreeProcessor - */ -TreeProcessor.prototype.prefer = function () { - this.$prefer() -} - -/** - * @namespace - * @module Extensions/Postprocessor - */ -var Postprocessor = Extensions.Postprocessor - -/** - * @memberof Extensions/Postprocessor - */ -Postprocessor.prototype.prefer = function () { - this.$prefer() -} - -/** - * @namespace - * @module Extensions/Preprocessor - */ -var Preprocessor = Extensions.Preprocessor - -/** - * @memberof Extensions/Preprocessor - */ -Preprocessor.prototype.prefer = function () { - this.$prefer() -} - -/** - * @namespace - * @module Extensions/DocinfoProcessor - */ -var DocinfoProcessor = Extensions.DocinfoProcessor - -/** - * @memberof Extensions/DocinfoProcessor - */ -DocinfoProcessor.prototype.prefer = function () { - this.$prefer() -} - -/** - * @param {string} value - The docinfo location ("head", "header" or "footer") - * @memberof Extensions/DocinfoProcessor - */ -DocinfoProcessor.prototype.atLocation = function (value) { - this.$at_location(value) -} - -function initializeProcessorClass (superclassName, className, functions) { - var superClass = Opal.const_get_qualified(Extensions, superclassName) - return initializeClass(superClass, className, functions, { - 'handles?': function () { - return true - } - }) -} - -// Postprocessor - -/** - * Create a postprocessor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createPostprocessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('Postprocessor', name, functions) -} - -/** - * Create and instantiate a postprocessor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newPostprocessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createPostprocessor(name, functions).$new() -} - -// Preprocessor - -/** - * Create a preprocessor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createPreprocessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('Preprocessor', name, functions) -} - -/** - * Create and instantiate a preprocessor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newPreprocessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createPreprocessor(name, functions).$new() -} - -// Tree Processor - -/** - * Create a tree processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createTreeProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('TreeProcessor', name, functions) -} - -/** - * Create and instantiate a tree processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newTreeProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createTreeProcessor(name, functions).$new() -} - -// Include Processor - -/** - * Create an include processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createIncludeProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('IncludeProcessor', name, functions) -} - -/** - * Create and instantiate an include processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newIncludeProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createIncludeProcessor(name, functions).$new() -} - -// Docinfo Processor - -/** - * Create a Docinfo processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createDocinfoProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('DocinfoProcessor', name, functions) -} - -/** - * Create and instantiate a Docinfo processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newDocinfoProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createDocinfoProcessor(name, functions).$new() -} - -// Block Processor - -/** - * Create a block processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createBlockProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('BlockProcessor', name, functions) -} - -/** - * Create and instantiate a block processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newBlockProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createBlockProcessor(name, functions).$new() -} - -// Inline Macro Processor - -/** - * Create an inline macro processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createInlineMacroProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('InlineMacroProcessor', name, functions) -} - -/** - * Create and instantiate an inline macro processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newInlineMacroProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createInlineMacroProcessor(name, functions).$new() -} - -// Block Macro Processor - -/** - * Create a block macro processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createBlockMacroProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('BlockMacroProcessor', name, functions) -} - -/** - * Create and instantiate a block macro processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newBlockMacroProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createBlockMacroProcessor(name, functions).$new() -} - -// Converter API - -/** - * @namespace - * @module Converter - */ -var Converter = Opal.const_get_qualified(Opal.Asciidoctor, 'Converter') - -// Alias -Opal.Asciidoctor.Converter = Converter - -/** - * Convert the specified node. - * - * @param {AbstractNode} node - the AbstractNode to convert - * @param {string} transform - an optional String transform that hints at - * which transformation should be applied to this node. - * @param {Object} opts - a JSON of options that provide additional hints about how to convert the node (default: {}) - * @returns the {Object} result of the conversion, typically a {string}. - * @memberof Converter - */ -Converter.prototype.convert = function (node, transform, opts) { - return this.$convert(node, transform, toHash(opts)) -} - -/** - * Create an instance of the converter bound to the specified backend. - * - * @param {string} backend - look for a converter bound to this keyword. - * @param {Object} opts - a JSON of options to pass to the converter (default: {}) - * @returns {Converter} - a converter instance for converting nodes in an Asciidoctor AST. - * @memberof Converter - */ -Converter.create = function (backend, opts) { - return this.$create(backend, toHash(opts)) -} - -// Converter Factory API - -/** - * @namespace - * @module Converter/Factory - */ -var ConverterFactory = Opal.Asciidoctor.Converter.Factory - -var ConverterBase = Opal.Asciidoctor.Converter.Base - -// Alias -Opal.Asciidoctor.ConverterFactory = ConverterFactory - -var ConverterBackendTraits = Opal.Asciidoctor.Converter.BackendTraits - -// Alias -Opal.Asciidoctor.ConverterBackendTraits = ConverterBackendTraits - -/** - * Register a custom converter in the global converter factory to handle conversion to the specified backends. - * If the backend value is an asterisk, the converter is used to handle any backend that does not have an explicit converter. - * - * @param converter - The Converter instance to register - * @param backends {Array} - A {string} {Array} of backend names that this converter should be registered to handle (optional, default: ['*']) - * @return {*} - Returns nothing - * @memberof Converter/Factory - */ -ConverterFactory.register = function (converter, backends) { - var object - var buildBackendTraitsFromObject = function (obj) { - return Object.assign({}, - obj.basebackend ? { basebackend: obj.basebackend } : {}, - obj.outfilesuffix ? { outfilesuffix: obj.outfilesuffix } : {}, - obj.filetype ? { filetype: obj.filetype } : {}, - obj.htmlsyntax ? { htmlsyntax: obj.htmlsyntax } : {}, - obj.supports_templates ? { supports_templates: obj.supports_templates } : {} - ) - } - var assignBackendTraitsToInstance = function (obj, instance) { - if (obj.backend_traits) { - instance.backend_traits = toHash(obj.backend_traits) - } else if (obj.backendTraits) { - instance.backend_traits = toHash(obj.backendTraits) - } else if (obj.basebackend || obj.outfilesuffix || obj.filetype || obj.htmlsyntax || obj.supports_templates) { - instance.backend_traits = toHash(buildBackendTraitsFromObject(obj)) - } - } - var bridgeHandlesMethodToInstance = function (obj, instance) { - bridgeMethodToInstance(obj, instance, '$handles?', 'handles', function () { - return true - }) - } - var bridgeComposedMethodToInstance = function (obj, instance) { - bridgeMethodToInstance(obj, instance, '$composed', 'composed') - } - var bridgeMethodToInstance = function (obj, instance, methodName, functionName, defaultImplementation) { - if (typeof obj[methodName] === 'undefined') { - if (typeof obj[functionName] === 'function') { - instance[methodName] = obj[functionName] - } else if (defaultImplementation) { - instance[methodName] = defaultImplementation - } - } - } - var addRespondToMethod = function (instance) { - if (typeof instance['$respond_to?'] !== 'function') { - instance['$respond_to?'] = function (name) { - return typeof this[name] === 'function' - } - } - } - if (typeof converter === 'function') { - // Class - object = initializeClass(ConverterBase, converter.constructor.name, { - initialize: function (backend, opts) { - var self = this - var result = new converter(backend, opts) // eslint-disable-line - Object.assign(this, result) - assignBackendTraitsToInstance(result, self) - var propertyNames = Object.getOwnPropertyNames(converter.prototype) - for (var i = 0; i < propertyNames.length; i++) { - var propertyName = propertyNames[i] - if (propertyName !== 'constructor') { - self[propertyName] = result[propertyName] - } - } - if (typeof result.$convert === 'undefined' && typeof result.convert === 'function') { - self.$convert = result.convert - } - bridgeHandlesMethodToInstance(result, self) - bridgeComposedMethodToInstance(result, self) - addRespondToMethod(self) - self.super(backend, opts) - } - }) - object.$extend(ConverterBackendTraits) - } else if (typeof converter === 'object') { - // Instance - if (typeof converter.$convert === 'undefined' && typeof converter.convert === 'function') { - converter.$convert = converter.convert - } - assignBackendTraitsToInstance(converter, converter) - if (converter.backend_traits) { - // "extends" ConverterBackendTraits - var converterBackendTraitsFunctionNames = [ - 'basebackend', - 'filetype', - 'htmlsyntax', - 'outfilesuffix', - 'supports_templates', - 'supports_templates?', - 'init_backend_traits', - 'backend_traits' - ] - for (var functionName of converterBackendTraitsFunctionNames) { - converter['$' + functionName] = ConverterBackendTraits.prototype['$' + functionName] - } - converter.$$meta = ConverterBackendTraits - } - bridgeHandlesMethodToInstance(converter, converter) - bridgeComposedMethodToInstance(converter, converter) - addRespondToMethod(converter) - object = converter - } - var args = [object].concat(backends) - return Converter.$register.apply(Converter, args) -} - -/** - * Retrieves the singleton instance of the converter factory. - * - * @param {boolean} initialize - instantiate the singleton if it has not yet - * been instantiated. If this value is false and the singleton has not yet been - * instantiated, this method returns a fresh instance. - * @returns {Converter/Factory} an instance of the converter factory. - * @memberof Converter/Factory - */ -ConverterFactory.getDefault = function (initialize) { - return this.$default(initialize) -} - -/** - * Create an instance of the converter bound to the specified backend. - * - * @param {string} backend - look for a converter bound to this keyword. - * @param {Object} opts - a JSON of options to pass to the converter (default: {}) - * @returns {Converter} - a converter instance for converting nodes in an Asciidoctor AST. - * @memberof Converter/Factory - */ -ConverterFactory.prototype.create = function (backend, opts) { - return this.$create(backend, toHash(opts)) -} - -/** - * Get the converter registry. - * @returns the registry of converter instances or classes keyed by backend name - * @memberof Converter/Factory - */ -ConverterFactory.getRegistry = function () { - return fromHash(Converter.$registry()) -} - -/** - * Lookup the custom converter registered with this factory to handle the specified backend. - * - * @param {string} backend - The {string} backend name. - * @returns the {Converter} class or instance registered to convert the specified backend or undefined if no match is found. - * @memberof Converter/Factory - */ -ConverterFactory.for = function (backend) { - const converter = Converter.$for(backend) - return converter === Opal.nil ? undefined : converter -} - -/* - * Unregister any custom converter classes that are registered with this factory. - * Intended for testing only! - */ -ConverterFactory.unregisterAll = function () { - var internalRegistry = Converter.DefaultFactory.$$cvars['@@registry'] - Converter.DefaultFactory.$$cvars['@@registry'] = toHash({ html5: internalRegistry['$[]']('html5') }) -} - -// Built-in converter - -/** - * @namespace - * @module Converter/Html5Converter - */ -var Html5Converter = Opal.Asciidoctor.Converter.Html5Converter - -// Alias -Opal.Asciidoctor.Html5Converter = Html5Converter - -/** - * Create a new Html5Converter. - * @returns {Html5Converter} - a Html5Converter - * @memberof Converter/Html5Converter - */ -Html5Converter.create = function () { - return this.$new() -} - -/** - * Converts an {AbstractNode} using the given transform. - * This method must be implemented by a concrete converter class. - * - * @param {AbstractNode} node - The concrete instance of AbstractNode to convert. - * @param {string} [transform] - An optional String transform that hints at which transformation should be applied to this node. - * If a transform is not given, the transform is often derived from the value of the {AbstractNode#getNodeName} property. (optional, default: undefined) - * @param {Object} [opts]- An optional JSON of options hints about how to convert the node. (optional, default: undefined) - * - * @returns {string} - the String result. - * @memberof Converter/Html5Converter - */ -Html5Converter.prototype.convert = function (node, transform, opts) { - return this.$convert(node, transform, opts) -} - - -var ASCIIDOCTOR_JS_VERSION = '2.2.4'; - - /** - * Get Asciidoctor.js version number. - * - * @memberof Asciidoctor - * @returns {string} - returns the version number of Asciidoctor.js. - */ - Opal.Asciidoctor.prototype.getVersion = function () { - return ASCIIDOCTOR_JS_VERSION - } - return Opal.Asciidoctor -})) diff --git a/node_modules/@asciidoctor/core/dist/browser/asciidoctor.min.js b/node_modules/@asciidoctor/core/dist/browser/asciidoctor.min.js deleted file mode 100644 index 8ae17bab..00000000 --- a/node_modules/@asciidoctor/core/dist/browser/asciidoctor.min.js +++ /dev/null @@ -1,1469 +0,0 @@ -/* - Asciidoctor.js 2.2.4 | MIT | https://github.com/asciidoctor/asciidoctor.js -*/ -var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(b){var t=0;return function(){return t<b.length?{done:!1,value:b[t++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var t="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return t?t.call(b):$jscomp.arrayIterator(b)};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1; -$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,t,y){b!=Array.prototype&&b!=Object.prototype&&(b[t]=y.value)};$jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global&&null!=global?global:b};$jscomp.global=$jscomp.getGlobal(this); -$jscomp.polyfill=function(b,t,y,D){if(t){y=$jscomp.global;b=b.split(".");for(D=0;D<b.length-1;D++){var x=b[D];x in y||(y[x]={});y=y[x]}b=b[b.length-1];D=y[b];t=t(D);t!=D&&null!=t&&$jscomp.defineProperty(y,b,{configurable:!0,writable:!0,value:t})}};$jscomp.underscoreProtoCanBeSet=function(){var b={a:!0},t={};try{return t.__proto__=b,t.a}catch(y){}return!1}; -$jscomp.setPrototypeOf="function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(b,t){b.__proto__=t;if(b.__proto__!==t)throw new TypeError(b+" is not extensible");return b}:null;$jscomp.polyfill("Object.setPrototypeOf",function(b){return b||$jscomp.setPrototypeOf},"es6","es5");$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)}; -$jscomp.Symbol=function(){var b=0;return function(t){return $jscomp.SYMBOL_PREFIX+(t||"")+b++}}();$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var b=$jscomp.global.Symbol.iterator;b||(b=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[b]&&$jscomp.defineProperty(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}});$jscomp.initSymbolIterator=function(){}}; -$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var b=$jscomp.global.Symbol.asyncIterator;b||(b=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.iteratorPrototype=function(b){$jscomp.initSymbolIterator();b={next:b};b[$jscomp.global.Symbol.iterator]=function(){return this};return b}; -$jscomp.iteratorFromArray=function(b,t){$jscomp.initSymbolIterator();b instanceof String&&(b+="");var y=0,D={next:function(){if(y<b.length){var x=y++;return{value:t(x,b[x]),done:!1}}D.next=function(){return{done:!0,value:void 0}};return D.next()}};D[Symbol.iterator]=function(){return D};return D};$jscomp.polyfill("Array.prototype.keys",function(b){return b?b:function(){return $jscomp.iteratorFromArray(this,function(b){return b})}},"es6","es3"); -$jscomp.owns=function(b,t){return Object.prototype.hasOwnProperty.call(b,t)};$jscomp.assign="function"==typeof Object.assign?Object.assign:function(b,t){for(var y=1;y<arguments.length;y++){var D=arguments[y];if(D)for(var x in D)$jscomp.owns(D,x)&&(b[x]=D[x])}return b};$jscomp.polyfill("Object.assign",function(b){return b||$jscomp.assign},"es6","es3");$jscomp.polyfill("Number.EPSILON",function(b){return Math.pow(2,-52)},"es6","es3"); -$jscomp.checkStringArgs=function(b,t,y){if(null==b)throw new TypeError("The 'this' value for String.prototype."+y+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+y+" must not be a regular expression");return b+""}; -$jscomp.polyfill("String.prototype.endsWith",function(b){return b?b:function(b,y){var t=$jscomp.checkStringArgs(this,b,"endsWith");b+="";void 0===y&&(y=t.length);y=Math.max(0,Math.min(y|0,t.length));for(var x=b.length;0<x&&0<y;)if(t[--y]!=b[--x])return!1;return 0>=x}},"es6","es3");$jscomp.polyfill("Object.is",function(b){return b?b:function(b,y){return b===y?0!==b||1/b===1/y:b!==b&&y!==y}},"es6","es3"); -$jscomp.polyfill("Array.prototype.includes",function(b){return b?b:function(b,y){var t=this;t instanceof String&&(t=String(t));var x=t.length;y=y||0;for(0>y&&(y=Math.max(y+x,0));y<x;y++){var r=t[y];if(r===b||Object.is(r,b))return!0}return!1}},"es7","es3");$jscomp.polyfill("String.prototype.includes",function(b){return b?b:function(b,y){return-1!==$jscomp.checkStringArgs(this,b,"includes").indexOf(b,y||0)}},"es6","es3"); -$jscomp.polyfill("String.prototype.repeat",function(b){return b?b:function(b){var t=$jscomp.checkStringArgs(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var D="";b;)if(b&1&&(D+=t),b>>>=1)t+=t;return D}},"es6","es3"); -$jscomp.polyfill("Array.from",function(b){return b?b:function(b,y,D){y=null!=y?y:function(b){return b};var x=[],r="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof r){b=r.call(b);for(var g=0;!(r=b.next()).done;)x.push(y.call(D,r.value,g++))}else for(r=b.length,g=0;g<r;g++)x.push(y.call(D,b[g],g));return x}},"es6","es3"); -(function(b){function t(a,b,E){"string"===typeof a?a[b]=E:Object.defineProperty(a,b,{value:E,enumerable:!1,configurable:!0,writable:!0})}function y(a,b){if(a)return a.$$const[b]}function D(a,b){var d;if(null!=a){var v=m.ancestors(a);a=0;for(d=v.length;a<d;a++)if(v[a].$$const&&oa.call(v[a].$$const,b))return v[a].$$const[b]}}function x(a,b,E){if(!E)return(a||I).$const_missing(b)}function r(a){return a.hasOwnProperty("$$iclass")&&a.hasOwnProperty("$$root")}function g(a){var b=G(a);a.$$is_module&&a.$$iclasses.push(b); -return b}function G(a){var b={},d=a.$$prototype;d.hasOwnProperty("$$dummy")&&(d=d.$$define_methods_on);var N=Object.getOwnPropertyNames(d),q=N.length,l;for(l=0;l<q;l++){var c=N[l];t(b,c,d[c])}t(b,"$$iclass",!0);t(b,"$$module",a);return b}function h(a){var b=a.length,d=a[0];t(d,"$$root",!0);if(1===b)return{first:d,last:d};for(var N=1;N<b;N++){var q=a[N];C(d,q);d=q}return{first:a[0],last:a[b-1]}}function B(a){if(!a.hasOwnProperty("$$dummy")){if(a.hasOwnProperty("$$iclass"))return a.$$module;if(a.hasOwnProperty("$$class"))return a.$$class}} -function u(a){return"function"===typeof a&&!a.$$stub}var n=this;"undefined"!==typeof global&&(n=global);"undefined"!==typeof window&&(n=window);var P="object"===typeof n.console?n.console:null==n.console?n.console={}:{};"log"in P||(P.log=function(){});"warn"in P||(P.warn=P.log);if("undefined"!==typeof n.Opal)return P.warn("Opal already loaded. Loading twice can cause troubles, please fix your setup."),n.Opal;var O,I,H,m=this.Opal={};m.global=n;n.Opal=m;m.config={missing_require_severity:"error",unsupported_features_severity:"warning", -enable_stack_trace:!0};var oa=Object.hasOwnProperty,R=Function.prototype.bind,C=Object.setPrototypeOf,J=Array.prototype.slice,ha=Array.prototype.splice,Y=4;m.uid=function(){return Y+=2};m.id=function(a){if(a.$$is_number)return 2*a+1;if(null!=a.$$id)return a.$$id;t(a,"$$id",m.uid());return a.$$id};m.gvars={};m.exit=function(a){m.gvars.DEBUG&&P.log("Exited with status "+a)};m.exceptions=[];m.pop_exception=function(){m.gvars["!"]=m.exceptions.pop()||a};m.inspect=function(a){return a===b?"undefined": -null===a?"null":a.$$class?a.$inspect():a.toString()};m.defineProperty=t;m.slice=J;m.truthy=function(b){return b!==a&&null!=b&&(!b.$$is_boolean||1==b)};m.falsy=function(b){return b===a||null==b||b.$$is_boolean&&0==b};m.const_get_local=function(a,b,E){if(null!=a){"::"===a&&(a=I);if(!a.$$is_module&&!a.$$is_class)throw new m.TypeError(a.toString()+" is not a class/module");var d=y(a,b);if(null!=d)return d;d=x(a,b,E);if(null!=d)return d}};m.const_get_qualified=function(a,b,E){var d,v=m.const_cache_version; -if(null!=a){"::"===a&&(a=I);if(!a.$$is_module&&!a.$$is_class)throw new m.TypeError(a.toString()+" is not a class/module");null==(d=a.$$const_cache)&&(t(a,"$$const_cache",Object.create(null)),d=a.$$const_cache);var l=d[b];null==l||l[0]!==v?(null!=(l=y(a,b))||null!=(l=D(a,b)),d[b]=[v,l]):l=l[1];return null!=l?l:x(a,b,E)}};m.const_cache_version=1;m.const_get_relative=function(a,b,E){var d=a[0],v=m.const_cache_version,l;null==(l=a.$$const_cache)&&(t(a,"$$const_cache",Object.create(null)),l=a.$$const_cache); -var c=l[b];if(null==c||c[0]!==v){var A;if(!(A=null!=(c=y(d,b)))){a:{if(0!==a.length)for(c=0,A=a.length;c<A;c++){var p=a[c].$$const[b];if(null!=p){a=p;break a}}a=void 0}A=null!=(c=a)}A||null!=(c=D(d,b))||(a=null==d||d.$$is_module?D(I,b):void 0,null!=(c=a));l[b]=[v,c]}else c=c[1];return null!=c?c:x(d,b,E)};m.const_set=function(b,v,E){if(null==b||"::"===b)b=I;if(E.$$is_a_module){if(null==E.$$name||E.$$name===a)E.$$name=v;null==E.$$base_module&&(E.$$base_module=b)}b.$$const=b.$$const||Object.create(null); -b.$$const[v]=E;b.$$=b.$$const;m.const_cache_version++;b===I&&(m[v]=E);t(b,v,E);return E};m.constants=function(a,b){null==b&&(b=!0);var d=[a],v,q={},l;b&&(d=d.concat(m.ancestors(a)));b&&a.$$is_module&&(d=d.concat([m.Object]).concat(m.ancestors(m.Object)));var c=0;for(v=d.length;c<v;c++){b=d[c];if(a!==I&&b==I)break;for(l in b.$$const)q[l]=!0}return Object.keys(q)};m.const_remove=function(b,v){m.const_cache_version++;if(null!=b.$$const[v]){var d=b.$$const[v];delete b.$$const[v];return d}if(null!=b.$$autoload&& -null!=b.$$autoload[v])return delete b.$$autoload[v],a;throw m.NameError.$new("constant "+b+"::"+b.$name()+" not defined");};m.allocate_class=function(a,b){var d=null!=b&&b.$$bridge?function(){var a=J.call(arguments);a=new (R.apply(b.$$constructor,[null].concat(a)));C(a,v.$$prototype);return a}:function(){};a&&t(d,"displayName","::"+a);var v=d;t(v,"$$name",a);t(v,"$$constructor",d);t(v,"$$prototype",d.prototype);t(v,"$$const",{});t(v,"$$is_class",!0);t(v,"$$is_a_module",!0);t(v,"$$super",b);t(v,"$$cvars", -{});t(v,"$$own_included_modules",[]);t(v,"$$own_prepended_modules",[]);t(v,"$$ancestors",[]);t(v,"$$ancestors_cache_version",null);t(v.$$prototype,"$$class",v);m.Class&&C(v,m.Class.prototype);null!=b&&(C(v.$$prototype,b.$$prototype),b.$$meta&&m.build_class_singleton_class(v));return v};m.klass=function(a,b,E){null==a?a=I:a.$$is_class||a.$$is_module||(a=a.$$class);if(null!=b&&!b.hasOwnProperty("$$is_class")){var d=b;b=I}var v;if(v=y(a,E)){if(!v.$$is_class)throw m.TypeError.$new(E+" is not a class"); -}else v=void 0;if(v){if(b&&v.$$super!==b)throw m.TypeError.$new("superclass mismatch for class "+v.$$name);return v}null==b&&(b=I);v=m.allocate_class(E,b);m.const_set(a,E,v);b.$inherited&&b.$inherited(v);d&&m.bridge(d,v);return v};m.allocate_module=function(a){var b=function(){};a&&t(b,"displayName",a+".$$constructor");a&&t(b,"displayName",a+".constructor");t(b,"$$name",a);t(b,"$$prototype",b.prototype);t(b,"$$const",{});t(b,"$$is_module",!0);t(b,"$$is_a_module",!0);t(b,"$$cvars",{});t(b,"$$iclasses", -[]);t(b,"$$own_included_modules",[]);t(b,"$$own_prepended_modules",[]);t(b,"$$ancestors",[b]);t(b,"$$ancestors_cache_version",null);C(b,m.Module.prototype);return b};m.module=function(a,b){null==a?a=I:a.$$is_class||a.$$is_module||(a=a.$$class);var d=a;var v=y(d,b);null==v&&d===I&&(v=D(I,b));if(v&&!v.$$is_module&&v!==I)throw m.TypeError.$new(b+" is not a module");if(d=v)return d;d=m.allocate_module(b);m.const_set(a,b,d);return d};m.get_singleton_class=function(a){return a.$$meta?a.$$meta:a.hasOwnProperty("$$is_class")? -m.build_class_singleton_class(a):a.hasOwnProperty("$$is_module")?m.build_module_singletin_class(a):m.build_object_singleton_class(a)};m.build_class_singleton_class=function(a){if(a.$$meta)return a.$$meta;var b=a===O?H:m.get_singleton_class(a.$$super);b=m.allocate_class(null,b,function(){});t(b,"$$is_singleton",!0);t(b,"$$singleton_of",a);t(a,"$$meta",b);C(a,b.$$prototype);t(a,"$$class",m.Class);return b};m.build_module_singletin_class=function(a){if(a.$$meta)return a.$$meta;var b=m.allocate_class(null, -m.Module,function(){});t(b,"$$is_singleton",!0);t(b,"$$singleton_of",a);t(a,"$$meta",b);C(a,b.$$prototype);t(a,"$$class",m.Module);return b};m.build_object_singleton_class=function(b){var d=m.allocate_class(a,b.$$class,function(){});t(d,"$$is_singleton",!0);t(d,"$$singleton_of",b);delete d.$$prototype.$$class;t(b,"$$meta",d);C(b,b.$$meta.$$prototype);return d};m.is_method=function(a){return"$"===a[0]&&"$"!==a[1]};m.instance_methods=function(a){var b=[],d=[];a=m.ancestors(a);for(var N=0,q=a.length;N< -q;N++){var l=a[N].$$prototype;l.hasOwnProperty("$$dummy")&&(l=l.$$define_methods_on);for(var c=Object.getOwnPropertyNames(l),A=0,p=c.length;A<p;A++){var g=c[A];if(m.is_method(g)){var M=g.slice(1);g=l[g];g.$$stub&&-1===b.indexOf(M)&&b.push(M);g.$$stub||-1!==d.indexOf(M)||-1!==b.indexOf(M)||d.push(M)}}}return d};m.own_instance_methods=function(a){var b=[];a=a.$$prototype;a.hasOwnProperty("$$dummy")&&(a=a.$$define_methods_on);for(var d=Object.getOwnPropertyNames(a),N=0,q=d.length;N<q;N++){var l=d[N]; -m.is_method(l)&&!a[l].$$stub&&(l=l.slice(1),b.push(l))}return b};m.methods=function(a){return m.instance_methods(m.get_singleton_class(a))};m.own_methods=function(a){return m.own_instance_methods(m.get_singleton_class(a))};m.receiver_methods=function(a){var b=m.get_singleton_class(a);a=m.own_instance_methods(b);b=m.own_instance_methods(b.$$super);return a.concat(b)};m.class_variables=function(a){a=m.ancestors(a);var b,d={};for(b=a.length-1;0<=b;b--){var N=a[b],q;for(q in N.$$cvars)d[q]=N.$$cvars[q]}return d}; -m.class_variable_set=function(a,b,E){var d=m.ancestors(a),v;for(v=d.length-2;0<=v;v--){var l=d[v];if(oa.call(l.$$cvars,b))return l.$$cvars[b]=E}return a.$$cvars[b]=E};m.append_features=function(a,b){var d=m.ancestors(a),v=[];if(-1!==d.indexOf(b))throw m.ArgumentError.$new("cyclic include detected");for(var q=0,l=d.length;q<l;q++){var c=g(d[q]);t(c,"$$included",!0);v.push(c)}d=m.ancestors(b);v=h(v);if(-1===d.indexOf(a))a=b.$$prototype,d=Object.getPrototypeOf(b.$$prototype);else{d=b.$$prototype;for(q= -Object.getPrototypeOf(d);null!=q&&(!r(q)||q.$$module!==a);)d=q,q=Object.getPrototypeOf(q);for(q=Object.getPrototypeOf(q);q.hasOwnProperty("$$iclass")&&!r(q);)q=Object.getPrototypeOf(q);a=d;d=q}C(a,v.first);C(v.last,d);a=[];for(d=Object.getPrototypeOf(b.$$prototype);d&&!d.hasOwnProperty("$$class");)(v=B(d))&&a.push(v),d=Object.getPrototypeOf(d);b.$$own_included_modules=a;m.const_cache_version++};m.prepend_features=function(a,b){var d=m.ancestors(a),v=[];if(-1!==d.indexOf(b))throw m.ArgumentError.$new("cyclic prepend detected"); -for(var q=0,l=d.length;q<l;q++){var c=g(d[q]);t(c,"$$prepended",!0);v.push(c)}d=h(v);q=b.$$prototype;l=Object.getPrototypeOf(q);if(q.hasOwnProperty("$$dummy"))v=q.$$define_methods_on;else{v=G(b);c=b.$$prototype;for(var A=Object.getOwnPropertyNames(c),p=0;p<A.length;p++){var S=A[p];m.is_method(S)&&delete c[S]}t(q,"$$dummy",!0);t(q,"$$define_methods_on",v);C(q,v);C(v,l)}if(-1===m.ancestors(b).indexOf(a))for(a=q,q=Object.getPrototypeOf(q);null!=q&&!q.hasOwnProperty("$$root")&&q!==v&&q.hasOwnProperty("$$iclass");)q= -Object.getPrototypeOf(q);else throw m.RuntimeError.$new("Prepending a module multiple times is not supported");C(a,d.first);C(d.last,q);a=[];v=Object.getPrototypeOf(b.$$prototype);if(b.$$prototype.hasOwnProperty("$$dummy"))for(;v&&v!==b.$$prototype.$$define_methods_on;)(d=B(v))&&a.push(d),v=Object.getPrototypeOf(v);b.$$own_prepended_modules=a;m.const_cache_version++};m.bridge=function(a,b){if(a.hasOwnProperty("$$bridge"))throw m.ArgumentError.$new("already bridged");t(a,"$$bridge",b);C(a.prototype, -(b.$$super||m.Object).$$prototype);t(b,"$$prototype",a.prototype);t(b.$$prototype,"$$class",b);t(b,"$$constructor",a);t(b,"$$bridge",!0)};m.ancestors=function(a){if(!a)return[];if(a.$$ancestors_cache_version===m.const_cache_version)return a.$$ancestors;var b=[],d;var N=0;var q=a.$$own_prepended_modules.concat([a]).concat(a.$$own_included_modules);for(d=q.length;N<d;N++)b.push(q[N]);if(a.$$super)for(N=0,q=m.ancestors(a.$$super),d=q.length;N<d;N++)b.push(q[N]);a.$$ancestors_cache_version=m.const_cache_version; -return a.$$ancestors=b};m.included_modules=function(a){for(var b=[],d=Object.getPrototypeOf(a.$$prototype);d&&Object.getPrototypeOf(d);d=Object.getPrototypeOf(d))(a=B(d))&&a.$$is_module&&d.$$iclass&&d.$$included&&b.push(a);return b};m.add_stubs=function(a){for(var b=m.BasicObject.$$prototype,d=0,N=a.length;d<N;d++){var q=a[d],l=b[q];(null==l||l.$$stub)&&m.add_stub_for(b,q)}};m.add_stub_for=function(a,b){var d=m.stub_for(b);t(a,b,d)};m.stub_for=function(a){function b(){this.$method_missing.$$p=b.$$p; -b.$$p=null;for(var d=Array(arguments.length),v=0,q=d.length;v<q;v++)d[v]=arguments[v];return this.$method_missing.apply(this,[a.slice(1)].concat(d))}b.$$stub=!0;return b};m.ac=function(a,b,E,N){var d="";d=E.$$is_a_module?d+(E.$$name+"."):d+(E.$$class.$$name+"#");throw m.ArgumentError.$new("["+(d+N)+"] wrong number of arguments("+a+" for "+b+")");};m.block_ac=function(a,b,E){throw m.ArgumentError.$new("`block in "+E+"': wrong number of arguments ("+a+" for "+b+")");};m.find_super_dispatcher=function(a, -b,E,N,q){q="$"+b;var d;var c=a.hasOwnProperty("$$meta")?m.ancestors(a.$$meta):m.ancestors(a.$$class);for(E=c.indexOf(E.$$owner)+1;E<c.length;E++){var v=c[E].$$prototype;v.hasOwnProperty("$$dummy")&&(v=v.$$define_methods_on);if(v.hasOwnProperty(q)){q=v[q];q.$$stub||(d=q);break}}if(!N&&null==d&&m.Kernel.$method_missing===a.$method_missing)throw m.NoMethodError.$new("super: no superclass method `"+b+"' for "+a,b);return d};m.find_iter_super_dispatcher=function(a,b,E,N,q){if(!E)throw m.RuntimeError.$new("super called outside of method"); -if(q&&E.$$define_meth)throw m.RuntimeError.$new("implicit argument passing of super from method defined by define_method() is not supported. Specify all arguments explicitly");E.$$def&&(b=E.$$jsid);return m.find_super_dispatcher(a,b,E,N)};m.ret=function(a){m.returner.$v=a;throw m.returner;};m.brk=function(a,b){b.$v=a;throw b;};m.new_brk=function(){return Error("unexpected break")};m.yield1=function(a,b){if("function"!==typeof a)throw m.LocalJumpError.$new("no block given");var d=a.$$has_top_level_mlhs_arg, -v=a.$$has_trailing_comma_in_args;if(1<a.length||(d||v)&&1===a.length)b=m.to_ary(b);return(1<a.length||v&&1===a.length)&&b.$$is_array?a.apply(null,b):a(b)};m.yieldX=function(a,b){if("function"!==typeof a)throw m.LocalJumpError.$new("no block given");if(1<a.length&&1===b.length&&b[0].$$is_array)return a.apply(null,b[0]);if(!b.$$is_array){for(var d=Array(b.length),v=0,q=d.length;v<q;v++)d[v]=b[v];return a.apply(null,d)}return a.apply(null,b)};m.rescue=function(a,b){for(var d=0;d<b.length;d++){var v= -b[d];if(v.$$is_array){if(v=m.rescue(a,v))return v}else if(v===m.JS.Error||v["$==="](a))return v}return null};m.is_a=function(a,b){if(null!=b&&a.$$meta===b||a.$$class===b||a.$$is_number&&b.$$is_number_class)return!0;var d,v=m.ancestors(a.$$is_class?m.get_singleton_class(a):a.$$meta||a.$$class);a=0;for(d=v.length;a<d;a++)if(v[a]===b)return!0;return!1};m.to_hash=function(a){if(a.$$is_hash)return a;if(a["$respond_to?"]("to_hash",!0)){var b=a.$to_hash();if(b.$$is_hash)return b;throw m.TypeError.$new("Can't convert "+ -a.$$class+" to Hash ("+a.$$class+"#to_hash gives "+b.$$class+")");}throw m.TypeError.$new("no implicit conversion of "+a.$$class+" into Hash");};m.to_ary=function(b){if(b.$$is_array)return b;if(b["$respond_to?"]("to_ary",!0)){var d=b.$to_ary();if(d===a)return[b];if(d.$$is_array)return d;throw m.TypeError.$new("Can't convert "+b.$$class+" to Array ("+b.$$class+"#to_ary gives "+d.$$class+")");}return[b]};m.to_a=function(b){if(b.$$is_array)return b.slice();if(b["$respond_to?"]("to_a",!0)){var d=b.$to_a(); -if(d===a)return[b];if(d.$$is_array)return d;throw m.TypeError.$new("Can't convert "+b.$$class+" to Array ("+b.$$class+"#to_a gives "+d.$$class+")");}return[b]};m.extract_kwargs=function(a){var b=a[a.length-1];return null!=b&&b["$respond_to?"]("to_hash",!0)?(ha.call(a,a.length-1,1),b.$to_hash()):m.hash2([],{})};m.kwrestargs=function(a,b){var d=[],v={},q=null;a=a.$$smap;for(q in a)b[q]||(d.push(q),v[q]=a[q]);return m.hash2(d,v)};m.send=function(a,b,E,N){var d="string"===typeof b?a["$"+b]:b;return null!= -d?("function"===typeof N&&(d.$$p=N),d.apply(a,E)):a.$method_missing.apply(a,[b].concat(E))};m.lambda=function(a){a.$$is_lambda=!0;return a};m.def=function(a,b,E){a===m.top?m.defn(m.Object,b,E):!a.$$eval&&a.$$is_a_module?m.defn(a,b,E):m.defs(a,b,E)};m.defn=function(a,b,E){E.displayName=b;E.$$owner=a;var d=a.$$prototype;d.hasOwnProperty("$$dummy")&&(d=d.$$define_methods_on);t(d,b,E);if(a.$$is_module){a.$$module_function&&m.defs(a,b,E);d=0;for(var q=a.$$iclasses,l=q.length;d<l;d++)t(q[d],b,E)}E=a.$$singleton_of; -!a.$method_added||a.$method_added.$$stub||E?E&&E.$singleton_method_added&&!E.$singleton_method_added.$$stub&&E.$singleton_method_added(b.substr(1)):a.$method_added(b.substr(1))};m.defs=function(a,b,E){if(a.$$is_string||a.$$is_number)throw m.TypeError.$new("can't define singleton");m.defn(m.get_singleton_class(a),b,E)};m.rdef=function(a,b){if(!oa.call(a.$$prototype,b))throw m.NameError.$new("method '"+b.substr(1)+"' not defined in "+a.$name());delete a.$$prototype[b];a.$$is_singleton?a.$$prototype.$singleton_method_removed&& -!a.$$prototype.$singleton_method_removed.$$stub&&a.$$prototype.$singleton_method_removed(b.substr(1)):a.$method_removed&&!a.$method_removed.$$stub&&a.$method_removed(b.substr(1))};m.udef=function(a,b){if(!a.$$prototype[b]||a.$$prototype[b].$$stub)throw m.NameError.$new("method '"+b.substr(1)+"' not defined in "+a.$name());m.add_stub_for(a.$$prototype,b);a.$$is_singleton?a.$$prototype.$singleton_method_undefined&&!a.$$prototype.$singleton_method_undefined.$$stub&&a.$$prototype.$singleton_method_undefined(b.substr(1)): -a.$method_undefined&&!a.$method_undefined.$$stub&&a.$method_undefined(b.substr(1))};m.alias=function(a,b,E){var d="$"+b,q="$"+E,l=a.$$prototype["$"+E];if(a.$$eval)return m.alias(m.get_singleton_class(a),b,E);if(!u(l)){for(var c=a.$$super;"function"!==typeof l&&c;)l=c[q],c=c.$$super;!u(l)&&a.$$is_module&&(l=m.Object.$$prototype[q]);if(!u(l))throw m.NameError.$new("undefined method `"+E+"' for class `"+a.$name()+"'");}l.$$alias_of&&(l=l.$$alias_of);var v=function(){var a=v.$$p,b;var c=Array(arguments.length); -var d=0;for(b=arguments.length;d<b;d++)c[d]=arguments[d];null!=a&&(v.$$p=null);return m.send(this,l,c,a)};v.displayName=b;v.length=l.length;v.$$arity=l.$$arity;v.$$parameters=l.$$parameters;v.$$source_location=l.$$source_location;v.$$alias_of=l;v.$$alias_name=b;m.defn(a,d,v);return a};m.alias_native=function(a,b,E){b="$"+b;var d=a.$$prototype[E];if("function"!==typeof d||d.$$stub)throw m.NameError.$new("undefined native method `"+E+"' for class `"+a.$name()+"'");m.defn(a,b,d);return a};m.hash_init= -function(a){a.$$smap=Object.create(null);a.$$map=Object.create(null);a.$$keys=[]};m.hash_clone=function(a,b){b.$$none=a.$$none;b.$$proc=a.$$proc;var d=0,v=a.$$keys;a=a.$$smap;for(var q=v.length,l,c;d<q;d++)l=v[d],l.$$is_string?c=a[l]:(c=l.value,l=l.key),m.hash_put(b,l,c)};m.hash_put=function(a,v,E){if(v.$$is_string)oa.call(a.$$smap,v)||a.$$keys.push(v),a.$$smap[v]=E;else{var d;var q=a.$$by_identity?m.id(v):v.$hash();if(oa.call(a.$$map,q)){for(d=a.$$map[q];d;){if(v===d.key||v["$eql?"](d.key)){var l= -b;d.value=E;break}l=d;d=d.next}l&&(d={key:v,key_hash:q,value:E},a.$$keys.push(d),l.next=d)}else d={key:v,key_hash:q,value:E},a.$$keys.push(d),a.$$map[q]=d}};m.hash_get=function(a,b){if(b.$$is_string){if(oa.call(a.$$smap,b))return a.$$smap[b]}else{var d=a.$$by_identity?m.id(b):b.$hash();if(oa.call(a.$$map,d))for(a=a.$$map[d];a;){if(b===a.key||b["$eql?"](a.key))return a.value;a=a.next}}};m.hash_delete=function(a,b){var d,v=a.$$keys,q=v.length;if(b.$$is_string){if(!oa.call(a.$$smap,b))return;for(d=0;d< -q;d++)if(v[d]===b){v.splice(d,1);break}var l=a.$$smap[b];delete a.$$smap[b];return l}var c=b.$hash();if(oa.call(a.$$map,c))for(var A=a.$$map[c],p;A;){if(b===A.key||b["$eql?"](A.key)){l=A.value;for(d=0;d<q;d++)if(v[d]===A){v.splice(d,1);break}p&&A.next?p.next=A.next:p?delete p.next:A.next?a.$$map[c]=A.next:delete a.$$map[c];return l}p=A;A=A.next}};m.hash_rehash=function(a){for(var d=0,E=a.$$keys.length,m,q,l;d<E;d++)if(!a.$$keys[d].$$is_string&&(m=a.$$keys[d].key.$hash(),m!==a.$$keys[d].key_hash)){q= -a.$$map[a.$$keys[d].key_hash];for(l=b;q;){if(q===a.$$keys[d]){l&&q.next?l.next=q.next:l?delete l.next:q.next?a.$$map[a.$$keys[d].key_hash]=q.next:delete a.$$map[a.$$keys[d].key_hash];break}l=q;q=q.next}a.$$keys[d].key_hash=m;if(oa.call(a.$$map,m)){q=a.$$map[m];for(l=b;q;){if(q===a.$$keys[d]){l=b;break}l=q;q=q.next}l&&(l.next=a.$$keys[d])}else a.$$map[m]=a.$$keys[d]}};m.hash=function(){var a=arguments.length,b;if(1===a&&arguments[0].$$is_hash)return arguments[0];var E=new m.Hash;m.hash_init(E);if(1=== -a&&arguments[0].$$is_array){a=arguments[0];var N=a.length;for(b=0;b<N;b++){if(2!==a[b].length)throw m.ArgumentError.$new("value not of length 2: "+a[b].$inspect());var q=a[b][0];var l=a[b][1];m.hash_put(E,q,l)}return E}if(1===a){a=arguments[0];for(q in a)oa.call(a,q)&&(l=a[q],m.hash_put(E,q,l));return E}if(0!==a%2)throw m.ArgumentError.$new("odd number of arguments for Hash");for(b=0;b<a;b+=2)q=arguments[b],l=arguments[b+1],m.hash_put(E,q,l);return E};m.hash2=function(a,b){var d=new m.Hash;d.$$smap= -b;d.$$map=Object.create(null);d.$$keys=a;return d};m.range=function(a,b,E){var d=new m.Range;d.begin=a;d.end=b;d.excl=E;return d};m.ivar=function(a){return"constructor"===a||"displayName"===a||"__count__"===a||"__noSuchMethod__"===a||"__parent__"===a||"__proto__"===a||"hasOwnProperty"===a||"valueOf"===a?a+"$":a};m.escape_regexp=function(a){return a.replace(/([-[\]\/{}()*+?.^$\\| ])/g,"\\$1").replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r").replace(/[\f]/g,"\\f").replace(/[\t]/g,"\\t")};m.global_regexp= -function(a){if(a.global)return a;null==a.$$g?a.$$g=new RegExp(a.source,(a.multiline?"gm":"g")+(a.ignoreCase?"i":"")):a.$$g.lastIndex=null;return a.$$g};m.global_multiline_regexp=function(a){if(a.multiline){if(a.global)return a;a=null!=a.$$g?a.$$g:a.$$g=new RegExp(a.source,"gm"+(a.ignoreCase?"i":""))}else a=null!=a.$$gm?a.$$gm:a.$$gm=new RegExp(a.source,"gm"+(a.ignoreCase?"i":""));a.lastIndex=null;return a};m.modules={};m.loaded_features=["corelib/runtime"];m.current_dir=".";m.require_table={"corelib/runtime":!0}; -m.normalize=function(a){var b=[];"."!==m.current_dir&&(a=m.current_dir.replace(/\/*$/,"/")+a);a=a.replace(/^\.\//,"");a=a.replace(/\.(rb|opal|js)$/,"");a=a.split("/");for(var d=0,N=a.length;d<N;d++){var q=a[d];""!==q&&(".."===q?b.pop():b.push(q))}return b.join("/")};m.loaded=function(a){var b;var d=0;for(b=a.length;d<b;d++){var N=m.normalize(a[d]);m.require_table[N]||(m.loaded_features.push(N),m.require_table[N]=!0)}};m.load=function(a){a=m.normalize(a);m.loaded([a]);var b=m.modules[a];if(b)b(m); -else{b=m.config.missing_require_severity;a="cannot load such file -- "+a;if("error"===b){if(m.LoadError)throw m.LoadError.$new(a);throw a;}"warning"===b&&P.warn("WARNING: LoadError: "+a)}return!0};m.require=function(a){a=m.normalize(a);return m.require_table[a]?!1:m.load(a)};m.encodings=Object.create(null);m.set_encoding=function(a,b){if("string"===typeof a)throw m.FrozenError.$new("can't modify frozen String");b=m.encodings[b];if(b===a.encoding)return a;a.encoding=b;return a};m.enc=function(a,b){a= -new String(a);m.set_encoding(a,b);a.internal_encoding=a.encoding;return a};m.BasicObject=O=m.allocate_class("BasicObject",null,function(){});m.Object=I=m.allocate_class("Object",m.BasicObject,function(){});m.Module=n=m.allocate_class("Module",m.Object,function(){});m.Class=H=m.allocate_class("Class",m.Module,function(){});C(m.BasicObject,m.Class.$$prototype);C(m.Object,m.Class.$$prototype);C(m.Module,m.Class.$$prototype);C(m.Class,m.Class.$$prototype);O.$$const.BasicObject=O;m.const_set(I,"BasicObject", -O);m.const_set(I,"Object",I);m.const_set(I,"Module",n);m.const_set(I,"Class",H);O.$$class=H;I.$$class=H;n.$$class=H;H.$$class=H;t(I.$$prototype,"toString",function(){var a=this.$to_s();return a.$$is_string&&"object"===typeof a?a.valueOf():a});t(I.$$prototype,"$require",m.require);m.$$=I.$$;m.top=new I;m.top.$to_s=m.top.$inspect=function(){return"main"};m.NilClass=m.allocate_class("NilClass",m.Object,function(){});m.const_set(I,"NilClass",m.NilClass);var a=m.nil=new m.NilClass;a.$$id=4;a.call=a.apply= -function(){throw m.LocalJumpError.$new("no block given");};m.breaker=Error("unexpected break (old)");m.returner=Error("unexpected return");TypeError.$$super=Error}).call(this);Opal.loaded(["corelib/runtime.js"]); -Opal.modules["corelib/helpers"]=function(b){var t=[],y=b.nil,D=b.const_get_relative,x=b.module,r=b.truthy;b.add_stubs("$new $class $=== $respond_to? $raise $type_error $__send__ $coerce_to $nil? $<=> $coerce_to! $!= $[] $upcase".split(" "));return function(g,t){g=x(g,"Opal");var h=[g].concat(t),B,u,n,P,O,I,H,m,G,R,C,J,ha,Y;b.defs(g,"$bridge",B=function(a,d){return b.bridge(a,d)},B.$$arity=2);b.defs(g,"$type_error",u=function(a,b,v,E){var d;null==v&&(v=y);null==E&&(E=y);return r(r(d=v)?E:d)?D(h,"TypeError").$new("can't convert "+ -a.$class()+" into "+b+" ("+a.$class()+"#"+v+" gives "+E.$class()+")"):D(h,"TypeError").$new("no implicit conversion of "+a.$class()+" into "+b)},u.$$arity=-3);b.defs(g,"$coerce_to",n=function(a,b,v){if(r(b["$==="](a)))return a;r(a["$respond_to?"](v))||this.$raise(this.$type_error(a,b));return a.$__send__(v)},n.$$arity=3);b.defs(g,"$coerce_to!",P=function(a,b,v){var d=this.$coerce_to(a,b,v);r(b["$==="](d))||this.$raise(this.$type_error(a,b,v,d));return d},P.$$arity=3);b.defs(g,"$coerce_to?",O=function(a, -b,v){if(!r(a["$respond_to?"](v)))return y;var d=this.$coerce_to(a,b,v);if(r(d["$nil?"]()))return y;r(b["$==="](d))||this.$raise(this.$type_error(a,b,v,d));return d},O.$$arity=3);b.defs(g,"$try_convert",I=function(a,b,v){return r(b["$==="](a))?a:r(a["$respond_to?"](v))?a.$__send__(v):y},I.$$arity=3);b.defs(g,"$compare",H=function(a,b){var d=a["$<=>"](b);r(d===y)&&this.$raise(D(h,"ArgumentError"),"comparison of "+a.$class()+" with "+b.$class()+" failed");return d},H.$$arity=2);b.defs(g,"$destructure", -m=function(a){if(1==a.length)return a[0];if(a.$$is_array)return a;for(var b=Array(a.length),v=0,E=b.length;v<E;v++)b[v]=a[v];return b},m.$$arity=1);b.defs(g,"$respond_to?",G=function(a,b,v){null==v&&(v=!1);return null!=a&&a.$$class?a["$respond_to?"](b,v):!1},G.$$arity=-3);b.defs(g,"$inspect_obj",R=function(a){return b.inspect(a)},R.$$arity=1);b.defs(g,"$instance_variable_name!",C=function(a){a=D(h,"Opal")["$coerce_to!"](a,D(h,"String"),"to_str");r(/^@[a-zA-Z_][a-zA-Z0-9_]*?$/.test(a))||this.$raise(D(h, -"NameError").$new("'"+a+"' is not allowed as an instance variable name",a));return a},C.$$arity=1);b.defs(g,"$class_variable_name!",J=function(a){a=D(h,"Opal")["$coerce_to!"](a,D(h,"String"),"to_str");r(3>a.length||"@@"!==a.slice(0,2))&&this.$raise(D(h,"NameError").$new("`"+a+"' is not allowed as a class variable name",a));return a},J.$$arity=1);b.defs(g,"$const_name!",ha=function(a){a=D(h,"Opal")["$coerce_to!"](a,D(h,"String"),"to_str");r(a["$[]"](0)["$!="](a["$[]"](0).$upcase()))&&this.$raise(D(h, -"NameError"),"wrong constant name "+a);return a},ha.$$arity=1);b.defs(g,"$pristine",Y=function(a,d){var v=b.slice.call(arguments,1,arguments.length);for(var E,m=v.length-1;0<=m;m--)E=v[m],(E=a.$$prototype["$"+E])&&!E.$$stub&&(E.$$pristine=!0);return y},Y.$$arity=-2)}(t[0],t)}; -Opal.modules["corelib/module"]=function(b){function t(b,g){return"number"===typeof b&&"number"===typeof g?b<g:b["$<"](g)}var y=[],D=b.nil,x=b.const_get_qualified,r=b.const_get_relative,g=b.klass,G=b.send,h=b.truthy,B=b.lambda,u=b.range,n=b.hash2;b.add_stubs("$module_eval $to_proc $=== $raise $equal? $< $> $nil? $attr_reader $attr_writer $class_variable_name! $new $const_name! $=~ $inject $split $const_get $== $!~ $start_with? $bind $call $class $append_features $included $name $cover? $size $merge $compile $proc $any? $prepend_features $prepended $to_s $__id__ $constants $include? $copy_class_variables $copy_constants".split(" ")); -return function(P,$super,I){P=g(P,$super,"Module");var H=[P].concat(I),m,y,R,C,J,ha,Y,a,d,v,E,N,q,l,c,A,p,S,M,k,e,f,X,ba,ia,T,U,Z,z,ra,F,ua,ja,va,pa,qa,ea,Ba,Na,Fa,za,fa,sa,V,ma,ca,Ma,la,Oa,aa,na,Ha,Wa,Pa,ab,ka,wa,da;b.defs(P,"$allocate",m=function(){var a=b.allocate_module(D,function(){});this!==b.Module&&Object.setPrototypeOf(a,this.$$prototype);return a},m.$$arity=0);b.def(P,"$initialize",y=function(){var a=y.$$p,b=a||D;a&&(y.$$p=null);a&&(y.$$p=null);return b!==D?G(this,"module_eval",[],b.$to_proc()): -D},y.$$arity=0);b.def(P,"$===",R=function(a){return h(null==a)?!1:b.is_a(a,this)},R.$$arity=1);b.def(P,"$<",C=function(a){h(r(H,"Module")["$==="](a))||this.$raise(r(H,"TypeError"),"compared with non class/module");var c;if(this===a)return!1;var e=0;var f=b.ancestors(this);for(c=f.length;e<c;e++)if(f[e]===a)return!0;e=0;f=b.ancestors(a);for(c=f.length;e<c;e++)if(f[e]===this)return!1;return D},C.$$arity=1);b.def(P,"$<=",J=function(a){var b;return h(b=this["$equal?"](a))?b:t(this,a)},J.$$arity=1);b.def(P, -"$>",ha=function(a){h(r(H,"Module")["$==="](a))||this.$raise(r(H,"TypeError"),"compared with non class/module");return t(a,this)},ha.$$arity=1);b.def(P,"$>=",Y=function(a){var b;return h(b=this["$equal?"](a))?b:"number"===typeof this&&"number"===typeof a?this>a:this["$>"](a)},Y.$$arity=1);b.def(P,"$<=>",a=function(a){if(this===a)return 0;if(!h(r(H,"Module")["$==="](a)))return D;a=t(this,a);return h(a["$nil?"]())?D:h(a)?-1:1},a.$$arity=1);b.def(P,"$alias_method",d=function(a,c){b.alias(this,a,c);return this}, -d.$$arity=2);b.def(P,"$alias_native",v=function(a,c){null==c&&(c=a);b.alias_native(this,a,c);return this},v.$$arity=-2);b.def(P,"$ancestors",E=function(){return b.ancestors(this)},E.$$arity=0);b.def(P,"$append_features",N=function(a){b.append_features(this,a);return this},N.$$arity=1);b.def(P,"$attr_accessor",q=function(a){var c=b.slice.call(arguments,0,arguments.length);G(this,"attr_reader",b.to_a(c));return G(this,"attr_writer",b.to_a(c))},q.$$arity=-1);b.alias(P,"attr","attr_accessor");b.def(P, -"$attr_reader",l=function(a){var c=b.slice.call(arguments,0,arguments.length);for(var e=this.$$prototype,f=c.length-1;0<=f;f--){var d=c[f],k="$"+d;d=b.ivar(d);var p=function(a){return function(){return null==this[a]?D:this[a]}}(d);b.defineProperty(e,d,D);p.$$parameters=[];p.$$arity=0;b.defn(this,k,p)}return D},l.$$arity=-1);b.def(P,"$attr_writer",c=function(a){var c=b.slice.call(arguments,0,arguments.length);for(var e=this.$$prototype,f=c.length-1;0<=f;f--){var d=c[f],k="$"+d+"=";d=b.ivar(d);var p= -function(a){return function(b){return this[a]=b}}(d);p.$$parameters=[["req"]];p.$$arity=1;b.defineProperty(e,d,D);b.defn(this,k,p)}return D},c.$$arity=-1);b.def(P,"$autoload",A=function(a,c){null==this.$$autoload&&(this.$$autoload={});b.const_cache_version++;this.$$autoload[a]=c;return D},A.$$arity=2);b.def(P,"$class_variables",p=function(){return Object.keys(b.class_variables(this))},p.$$arity=0);b.def(P,"$class_variable_get",S=function(a){a=r(H,"Opal")["$class_variable_name!"](a);var c=b.class_variables(this)[a]; -null==c&&this.$raise(r(H,"NameError").$new("uninitialized class variable "+a+" in "+this,a));return c},S.$$arity=1);b.def(P,"$class_variable_set",M=function(a,c){a=r(H,"Opal")["$class_variable_name!"](a);return b.class_variable_set(this,a,c)},M.$$arity=2);b.def(P,"$class_variable_defined?",k=function(a){a=r(H,"Opal")["$class_variable_name!"](a);return b.class_variables(this).hasOwnProperty(a)},k.$$arity=1);b.def(P,"$remove_class_variable",e=function(a){a=r(H,"Opal")["$class_variable_name!"](a);if(b.hasOwnProperty.call(this.$$cvars, -a)){var c=this.$$cvars[a];delete this.$$cvars[a];return c}this.$raise(r(H,"NameError"),"cannot remove "+a+" for "+this)},e.$$arity=1);b.def(P,"$constants",f=function(a){null==a&&(a=!0);return b.constants(this,a)},f.$$arity=-1);b.defs(P,"$constants",X=function(a){if(null==a){a=(this.$$nesting||[]).concat(b.Object);var c,e={},f;var d=0;for(f=a.length;d<f;d++)for(c in a[d].$$const)e[c]=!0;return Object.keys(e)}return b.constants(this,a)},X.$$arity=-1);b.defs(P,"$nesting",ba=function(){return this.$$nesting|| -[]},ba.$$arity=0);b.def(P,"$const_defined?",ia=function(a,c){null==c&&(c=!0);a=r(H,"Opal")["$const_name!"](a);h(a["$=~"](x(r(H,"Opal"),"CONST_NAME_REGEXP")))||this.$raise(r(H,"NameError").$new("wrong constant name "+a,a));var e=[this],f;c&&(e=e.concat(b.ancestors(this)),this.$$is_module&&(e=e.concat([b.Object]).concat(b.ancestors(b.Object))));var d=0;for(f=e.length;d<f;d++)if(c=e[d],null!=c.$$const[a])return!0;return!1},ia.$$arity=-2);b.def(P,"$const_get",T=function(a,c){var e;null==c&&(c=!0);a=r(H, -"Opal")["$const_name!"](a);0===a.indexOf("::")&&"::"!==a&&(a=a.slice(2));if(h(-1!=a.indexOf("::")&&"::"!=a))return G(a.$split("::"),"inject",[this],(e=function(a,b){null==a&&(a=D);null==b&&(b=D);return a.$const_get(b)},e.$$s=this,e.$$arity=2,e));h(a["$=~"](x(r(H,"Opal"),"CONST_NAME_REGEXP")))||this.$raise(r(H,"NameError").$new("wrong constant name "+a,a));return c?r([this],a):b.const_get_local(this,a)},T.$$arity=-2);b.def(P,"$const_missing",U=function(a){var b;if(this.$$autoload&&(b=this.$$autoload[a]))return this.$require(b), -this.$const_get(a);b=this["$=="](r(H,"Object"))?a:""+this+"::"+a;return this.$raise(r(H,"NameError").$new("uninitialized constant "+b,a))},U.$$arity=1);b.def(P,"$const_set",Z=function(a,c){var e;a=r(H,"Opal")["$const_name!"](a);h(h(e=a["$!~"](x(r(H,"Opal"),"CONST_NAME_REGEXP")))?e:a["$start_with?"]("::"))&&this.$raise(r(H,"NameError").$new("wrong constant name "+a,a));b.const_set(this,a,c);return c},Z.$$arity=2);b.def(P,"$public_constant",z=function(a){return D},z.$$arity=1);b.def(P,"$define_method", -ra=function(a,c){var e=ra.$$p,f=e||D,d,k,p=this,l=D;e&&(ra.$$p=null);e&&(ra.$$p=null);h(void 0===c&&f===D)&&p.$raise(r(H,"ArgumentError"),"tried to create a Proc object without a block");f=h(d=f)?d:function(){l=c;return r(H,"Proc")["$==="](l)?c:r(H,"Method")["$==="](l)?c.$to_proc().$$unbound:r(H,"UnboundMethod")["$==="](l)?B((k=function(a){var e=k.$$s||this;var f=b.slice.call(arguments,0,arguments.length);e=c.$bind(e);return G(e,"call",b.to_a(f))},k.$$s=p,k.$$arity=-1,k)):p.$raise(r(H,"TypeError"), -"wrong argument type "+f.$class()+" (expected Proc/Method)")}();f.$$jsid=a;f.$$s=null;f.$$def=f;f.$$define_meth=!0;b.defn(p,"$"+a,f);return a},ra.$$arity=-2);b.def(P,"$remove_method",F=function(a){var c=b.slice.call(arguments,0,arguments.length);for(var e=0,f=c.length;e<f;e++)b.rdef(this,"$"+c[e]);return this},F.$$arity=-1);b.def(P,"$singleton_class?",ua=function(){return!!this.$$is_singleton},ua.$$arity=0);b.def(P,"$include",ja=function(a){var c=b.slice.call(arguments,0,arguments.length);for(var e= -c.length-1;0<=e;e--){var f=c[e];f.$$is_module||this.$raise(r(H,"TypeError"),"wrong argument type "+f.$class()+" (expected Module)");f.$append_features(this);f.$included(this)}return this},ja.$$arity=-1);b.def(P,"$included_modules",va=function(){return b.included_modules(this)},va.$$arity=0);b.def(P,"$include?",pa=function(a){a.$$is_module||this.$raise(r(H,"TypeError"),"wrong argument type "+a.$class()+" (expected Module)");var c,e=b.ancestors(this);var f=0;for(c=e.length;f<c;f++){var d=e[f];if(d=== -a&&d!==this)return!0}return!1},pa.$$arity=1);b.def(P,"$instance_method",qa=function(a){var b=this.$$prototype["$"+a];b&&!b.$$stub||this.$raise(r(H,"NameError").$new("undefined method `"+a+"' for class `"+this.$name()+"'",a));return r(H,"UnboundMethod").$new(this,b.$$owner||this,b,a)},qa.$$arity=1);b.def(P,"$instance_methods",ea=function(a){null==a&&(a=!0);return h(a)?b.instance_methods(this):b.own_instance_methods(this)},ea.$$arity=-1);b.def(P,"$included",Ba=function(a){return D},Ba.$$arity=1);b.def(P, -"$extended",Na=function(a){return D},Na.$$arity=1);b.def(P,"$extend_object",Fa=function(a){return D},Fa.$$arity=1);b.def(P,"$method_added",za=function(a){b.slice.call(arguments,0,arguments.length);return D},za.$$arity=-1);b.def(P,"$method_removed",fa=function(a){b.slice.call(arguments,0,arguments.length);return D},fa.$$arity=-1);b.def(P,"$method_undefined",sa=function(a){b.slice.call(arguments,0,arguments.length);return D},sa.$$arity=-1);b.def(P,"$module_eval",V=function(a){var c=V.$$p,e=c||D,f,d, -k=D,p=D,l=p=p=D;c&&(V.$$p=null);c&&(V.$$p=null);c=b.slice.call(arguments,0,arguments.length);h(h(f=e["$nil?"]())?!!b.compile:f)?(h(u(1,3,!1)["$cover?"](c.$size()))||r(H,"Kernel").$raise(r(H,"ArgumentError"),"wrong number of arguments (0 for 1..3)"),f=[].concat(b.to_a(c)),k=null==f[0]?D:f[0],p=null==f[1]?D:f[1],f,p=n(["file","eval"],{file:h(f=p)?f:"(eval)",eval:!0}),p=b.hash({arity_check:!1}).$merge(p),l=r(H,"Opal").$compile(k,p),e=G(r(H,"Kernel"),"proc",[],(d=function(){return function(a){return eval(l)}(d.$$s|| -this)},d.$$s=this,d.$$arity=0,d))):h(c["$any?"]())&&r(H,"Kernel").$raise(r(H,"ArgumentError"),"wrong number of arguments ("+c.$size()+" for 0)\n\n NOTE:If you want to enable passing a String argument please add \"require 'opal-parser'\" to your script\n");f=e.$$s;e.$$s=null;c=e.apply(this,[this]);e.$$s=f;return c},V.$$arity=-1);b.alias(P,"class_eval","module_eval");b.def(P,"$module_exec",ma=function(a){var c=ma.$$p,e=c||D;c&&(ma.$$p=null);c&&(ma.$$p=null);var f=b.slice.call(arguments,0,arguments.length); -e===D&&this.$raise(r(H,"LocalJumpError"),"no block given");c=e.$$s;e.$$s=null;f=e.apply(this,f);e.$$s=c;return f},ma.$$arity=-1);b.alias(P,"class_exec","module_exec");b.def(P,"$method_defined?",ca=function(a){a=this.$$prototype["$"+a];return!!a&&!a.$$stub},ca.$$arity=1);b.def(P,"$module_function",Ma=function(a){var c=b.slice.call(arguments,0,arguments.length);if(0===c.length)this.$$module_function=!0;else for(var e=0,f=c.length;e<f;e++){var d="$"+c[e];b.defs(this,d,this.$$prototype[d])}return this}, -Ma.$$arity=-1);b.def(P,"$name",la=function(){if(this.$$full_name)return this.$$full_name;for(var a=[],c=this;c;){if(c.$$name===D||null==c.$$name)return D;a.unshift(c.$$name);c=c.$$base_module;if(c===b.Object)break}return 0===a.length?D:this.$$full_name=a.join("::")},la.$$arity=0);b.def(P,"$prepend",Oa=function(a){var c=b.slice.call(arguments,0,arguments.length);0===c.length&&this.$raise(r(H,"ArgumentError"),"wrong number of arguments (given 0, expected 1+)");for(var e=c.length-1;0<=e;e--){var f=c[e]; -f.$$is_module||this.$raise(r(H,"TypeError"),"wrong argument type "+f.$class()+" (expected Module)");f.$prepend_features(this);f.$prepended(this)}return this},Oa.$$arity=-1);b.def(P,"$prepend_features",aa=function(a){this.$$is_module||this.$raise(r(H,"TypeError"),"wrong argument type "+this.$class()+" (expected Module)");b.prepend_features(this,a);return this},aa.$$arity=1);b.def(P,"$prepended",na=function(a){return D},na.$$arity=1);b.def(P,"$remove_const",Ha=function(a){return b.const_remove(this, -a)},Ha.$$arity=1);b.def(P,"$to_s",Wa=function(){var a;return h(a=b.Module.$name.call(this))?a:"#<"+(this.$$is_module?"Module":"Class")+":0x"+this.$__id__().$to_s(16)+">"},Wa.$$arity=0);b.def(P,"$undef_method",Pa=function(a){var c=b.slice.call(arguments,0,arguments.length);for(var e=0,f=c.length;e<f;e++)b.udef(this,"$"+c[e]);return this},Pa.$$arity=-1);b.def(P,"$instance_variables",ab=function(){var a=(b.Module.$$nesting=H,this.$constants());var c=[],e;for(e in this)this.hasOwnProperty(e)&&"$"!==e.charAt(0)&& -"constructor"!==e&&!a["$include?"](e)&&c.push("@"+e);return c},ab.$$arity=0);b.def(P,"$dup",ka=function(){var a=ka.$$p,c;a&&(ka.$$p=null);var e=0;var f=arguments.length;for(c=Array(f);e<f;e++)c[e]=arguments[e];a=G(this,b.find_super_dispatcher(this,"dup",ka,!1),c,a);a.$copy_class_variables(this);a.$copy_constants(this);return a},ka.$$arity=0);b.def(P,"$copy_class_variables",wa=function(a){for(var b in a.$$cvars)this.$$cvars[b]=a.$$cvars[b]},wa.$$arity=1);return(b.def(P,"$copy_constants",da=function(a){var c; -a=a.$$const;for(c in a)b.const_set(this,c,a[c])},da.$$arity=1),D)&&"copy_constants"}(y[0],null,y)}; -Opal.modules["corelib/class"]=function(b){var t=b.top,y=[],D=b.nil,x=b.const_get_relative,r=b.klass,g=b.send;b.add_stubs("$require $class_eval $to_proc $initialize_copy $allocate $name $to_s".split(" "));t.$require("corelib/module");return function(t,$super,B){t=r(t,$super,"Class");var u=[t].concat(B),n,P,O,I,H,m,y;b.defs(t,"$new",n=function(m){var r=n.$$p,B=r||D;r&&(n.$$p=null);r&&(n.$$p=null);null==m&&(m=x(u,"Object"));if(!m.$$is_class)throw b.TypeError.$new("superclass must be a Class");r=b.allocate_class(D, -m);m.$inherited(r);B!==D&&g(r,"class_eval",[],B.$to_proc());return r},n.$$arity=-1);b.def(t,"$allocate",P=function(){var m=new this.$$constructor;m.$$id=b.uid();return m},P.$$arity=0);b.def(t,"$inherited",O=function(b){return D},O.$$arity=1);b.def(t,"$initialize_dup",I=function(b){this.$initialize_copy(b);this.$$full_name=this.$$name=null},I.$$arity=1);b.def(t,"$new",H=function(m){var g=H.$$p,n=g||D;g&&(H.$$p=null);g&&(H.$$p=null);g=b.slice.call(arguments,0,arguments.length);var r=this.$allocate(); -b.send(r,r.$initialize,g,n);return r},H.$$arity=-1);b.def(t,"$superclass",m=function(){return this.$$super||D},m.$$arity=0);return(b.def(t,"$to_s",y=function(){y.$$p&&(y.$$p=null);var m=this.$$singleton_of;return m&&m.$$is_a_module?"#<Class:"+m.$name()+">":m?"#<Class:#<"+m.$$class.$name()+":0x"+b.id(m).$to_s(16)+">>":g(this,b.find_super_dispatcher(this,"to_s",y,!1),[],null)},y.$$arity=0),D)&&"to_s"}(y[0],null,y)}; -Opal.modules["corelib/basic_object"]=function(b){var t=[],y=b.nil,D=b.const_get_qualified,x=b.klass,r=b.truthy,g=b.range,G=b.hash2,h=b.send;b.add_stubs("$== $! $nil? $cover? $size $raise $merge $compile $proc $any? $inspect $new".split(" "));return function(B,$super,n){B=x(B,$super,"BasicObject");[B].concat(n);var t,O,I,H,m,oa,R,C,J,ha,Y,a,d,v;b.def(B,"$initialize",t=function(a){b.slice.call(arguments,0,arguments.length);return y},t.$$arity=-1);b.def(B,"$==",O=function(a){return this===a},O.$$arity= -1);b.def(B,"$eql?",I=function(a){return this["$=="](a)},I.$$arity=1);b.alias(B,"equal?","==");b.def(B,"$__id__",H=function(){if(null!=this.$$id)return this.$$id;b.defineProperty(this,"$$id",b.uid());return this.$$id},H.$$arity=0);b.def(B,"$__send__",m=function(a,d){var q=m.$$p,l=q||y;q&&(m.$$p=null);q&&(m.$$p=null);q=b.slice.call(arguments,1,arguments.length);var c=this["$"+a];if(c)return l!==y&&(c.$$p=l),c.apply(this,q);l!==y&&(this.$method_missing.$$p=l);return this.$method_missing.apply(this,[a].concat(q))}, -m.$$arity=-2);b.def(B,"$!",oa=function(){return!1},oa.$$arity=0);b.def(B,"$!=",R=function(a){return this["$=="](a)["$!"]()},R.$$arity=1);b.def(B,"$instance_eval",C=function(a){var d=C.$$p,q=d||y,l,c,v=y,p=y,m=p=p=y;d&&(C.$$p=null);d&&(C.$$p=null);d=b.slice.call(arguments,0,arguments.length);r(r(l=q["$nil?"]())?!!b.compile:l)?(r(g(1,3,!1)["$cover?"](d.$size()))||D("::","Kernel").$raise(D("::","ArgumentError"),"wrong number of arguments (0 for 1..3)"),l=[].concat(b.to_a(d)),v=null==l[0]?y:l[0],p=null== -l[1]?y:l[1],l,p=G(["file","eval"],{file:r(l=p)?l:"(eval)",eval:!0}),p=b.hash({arity_check:!1}).$merge(p),m=D("::","Opal").$compile(v,p),q=h(D("::","Kernel"),"proc",[],(c=function(){return function(a){return eval(m)}(c.$$s||this)},c.$$s=this,c.$$arity=0,c))):r(d["$any?"]())&&D("::","Kernel").$raise(D("::","ArgumentError"),"wrong number of arguments ("+d.$size()+" for 0)");l=q.$$s;q.$$s=null;if(this.$$is_a_module){this.$$eval=!0;try{var E=q.call(this,this)}finally{this.$$eval=!1}}else E=q.call(this, -this);q.$$s=l;return E},C.$$arity=-1);b.def(B,"$instance_exec",J=function(a){var d=J.$$p,q=d||y;d&&(J.$$p=null);d&&(J.$$p=null);d=b.slice.call(arguments,0,arguments.length);r(q)||D("::","Kernel").$raise(D("::","ArgumentError"),"no block given");var l=q.$$s;q.$$s=null;if(this.$$is_a_module){this.$$eval=!0;try{var c=q.apply(this,d)}finally{this.$$eval=!1}}else c=q.apply(this,d);q.$$s=l;return c},J.$$arity=-1);b.def(B,"$singleton_method_added",ha=function(a){b.slice.call(arguments,0,arguments.length); -return y},ha.$$arity=-1);b.def(B,"$singleton_method_removed",Y=function(a){b.slice.call(arguments,0,arguments.length);return y},Y.$$arity=-1);b.def(B,"$singleton_method_undefined",a=function(a){b.slice.call(arguments,0,arguments.length);return y},a.$$arity=-1);b.def(B,"$class",d=function(){return this.$$class},d.$$arity=0);return(b.def(B,"$method_missing",v=function(a,d){var q=v.$$p;q&&(v.$$p=null);q&&(v.$$p=null);b.slice.call(arguments,1,arguments.length);q=r(this.$inspect&&!this.$inspect.$$stub)? -"undefined method `"+a+"' for "+this.$inspect()+":"+this.$$class:"undefined method `"+a+"' for "+this.$$class;return D("::","Kernel").$raise(D("::","NoMethodError").$new(q,a))},v.$$arity=-2),y)&&"method_missing"}(t[0],null,t)}; -Opal.modules["corelib/kernel"]=function(b){function t(b,g){return"number"===typeof b&&"number"===typeof g?b<=g:b["$<="](g)}var y=[],D=b.nil,x=b.const_get_qualified,r=b.const_get_relative,g=b.module,G=b.truthy,h=b.gvars,B=b.hash2,u=b.send,n=b.klass;b.add_stubs("$raise $new $inspect $! $=~ $== $object_id $class $coerce_to? $<< $allocate $copy_instance_variables $copy_singleton_methods $initialize_clone $initialize_copy $define_method $singleton_class $to_proc $initialize_dup $for $empty? $pop $call $coerce_to $append_features $extend_object $extended $__id__ $to_s $instance_variable_name! $respond_to? $to_int $coerce_to! $Integer $nil? $=== $enum_for $result $any? $print $format $puts $each $<= $length $[] $exception $is_a? $rand $respond_to_missing? $try_convert! $expand_path $join $start_with? $new_seed $srand $sym $arg $open $include".split(" "));(function(n, -O){n=g(n,"Kernel");var I=[n].concat(O),H,m,y,R,C,J,P,Y,a,d,v,E,N,q,l,c,A,p,S,M,k,e,f,X,ba,ia,T,U,Z,z,ra,F,ua,ja,va,pa,qa,ea,Ba,Na,Fa,za,fa,sa,V,ma,ca,Ma,la,Oa,aa,na,Ha,Wa,Pa,ab,ka,wa,da,xa,Ca,ta,Ia,Ga,Ja;b.def(n,"$method_missing",H=function(a,c){var e=H.$$p;e&&(H.$$p=null);e&&(H.$$p=null);e=b.slice.call(arguments,1,arguments.length);return this.$raise(r(I,"NoMethodError").$new("undefined method `"+a+"' for "+this.$inspect(),a,e))},H.$$arity=-2);b.def(n,"$=~",m=function(a){return!1},m.$$arity=1);b.def(n, -"$!~",y=function(a){return this["$=~"](a)["$!"]()},y.$$arity=1);b.def(n,"$===",R=function(a){var b;return G(b=this.$object_id()["$=="](a.$object_id()))?b:this["$=="](a)},R.$$arity=1);b.def(n,"$<=>",C=function(a){this.$$comparable=!0;return(a=this["$=="](a))&&a!==D?0:D},C.$$arity=1);b.def(n,"$method",J=function(a){var b=this["$"+a];b&&!b.$$stub||this.$raise(r(I,"NameError").$new("undefined method `"+a+"' for class `"+this.$class()+"'",a));return r(I,"Method").$new(this,b.$$owner||this.$class(),b,a)}, -J.$$arity=1);b.def(n,"$methods",P=function(a){null==a&&(a=!0);return G(a)?b.methods(this):b.own_methods(this)},P.$$arity=-1);b.def(n,"$public_methods",Y=function(a){null==a&&(a=!0);return G(a)?b.methods(this):b.receiver_methods(this)},Y.$$arity=-1);b.def(n,"$Array",a=function(a){if(a===D)return[];if(a.$$is_array)return a;var b=r(I,"Opal")["$coerce_to?"](a,r(I,"Array"),"to_ary");if(b!==D)return b;b=r(I,"Opal")["$coerce_to?"](a,r(I,"Array"),"to_a");return b!==D?b:[a]},a.$$arity=1);b.def(n,"$at_exit", -d=function(){var a=d.$$p,b=a||D,c;null==h.__at_exit__&&(h.__at_exit__=D);a&&(d.$$p=null);a&&(d.$$p=null);h.__at_exit__=G(c=h.__at_exit__)?c:[];return h.__at_exit__["$<<"](b)},d.$$arity=0);b.def(n,"$caller",v=function(a){b.slice.call(arguments,0,arguments.length);return[]},v.$$arity=-1);b.def(n,"$class",E=function(){return this.$$class},E.$$arity=0);b.def(n,"$copy_instance_variables",N=function(a){var b=Object.keys(a),c;var e=0;for(c=b.length;e<c;e++){var f=b[e];"$"!==f.charAt(0)&&a.hasOwnProperty(f)&& -(this[f]=a[f])}},N.$$arity=1);b.def(n,"$copy_singleton_methods",q=function(a){var c;if(a.hasOwnProperty("$$meta")){var e=b.get_singleton_class(a),f=b.get_singleton_class(this);var d=Object.getOwnPropertyNames(e.$$prototype);var k=0;for(c=d.length;k<c;k++){var p=d[k];b.is_method(p)&&(f.$$prototype[p]=e.$$prototype[p])}f.$$const=Object.assign({},e.$$const);Object.setPrototypeOf(f.$$prototype,Object.getPrototypeOf(e.$$prototype))}k=0;d=Object.getOwnPropertyNames(a);for(c=d.length;k<c;k++)p=d[k],"$"=== -p.charAt(0)&&"$"!==p.charAt(1)&&a.hasOwnProperty(p)&&(this[p]=a[p])},q.$$arity=1);b.def(n,"$clone",l=function(a){if(null==a)B([],{});else if(!a.$$is_hash)throw b.ArgumentError.$new("expected kwargs");a=this.$class().$allocate();a.$copy_instance_variables(this);a.$copy_singleton_methods(this);a.$initialize_clone(this);return a},l.$$arity=-1);b.def(n,"$initialize_clone",c=function(a){return this.$initialize_copy(a)},c.$$arity=1);b.def(n,"$define_singleton_method",A=function(a,b){var c=A.$$p,e=c||D; -c&&(A.$$p=null);c&&(A.$$p=null);return u(this.$singleton_class(),"define_method",[a,b],e.$to_proc())},A.$$arity=-2);b.def(n,"$dup",p=function(){var a=this.$class().$allocate();a.$copy_instance_variables(this);a.$initialize_dup(this);return a},p.$$arity=0);b.def(n,"$initialize_dup",S=function(a){return this.$initialize_copy(a)},S.$$arity=1);b.def(n,"$enum_for",M=function(a,c){var e=M.$$p,f=e||D;e&&(M.$$p=null);e&&(M.$$p=null);e=b.slice.call(arguments,0,arguments.length);if(0<e.length){var d=e[0];e.splice(0, -1)}null==d&&(d="each");return u(r(I,"Enumerator"),"for",[this,d].concat(b.to_a(e)),f.$to_proc())},M.$$arity=-1);b.alias(n,"to_enum","enum_for");b.def(n,"$equal?",k=function(a){return this===a},k.$$arity=1);b.def(n,"$exit",e=function(a){var c;null==h.__at_exit__&&(h.__at_exit__=D);null==a&&(a=!0);for(h.__at_exit__=G(c=h.__at_exit__)?c:[];!G(h.__at_exit__["$empty?"]());)c=h.__at_exit__.$pop(),c.$call();a=a.$$is_boolean?a?0:1:r(I,"Opal").$coerce_to(a,r(I,"Integer"),"to_int");b.exit(a);return D},e.$$arity= --1);b.def(n,"$extend",f=function(a){var c=b.slice.call(arguments,0,arguments.length);for(var e=this.$singleton_class(),f=c.length-1;0<=f;f--){var d=c[f];d.$$is_module||this.$raise(r(I,"TypeError"),"wrong argument type "+d.$class()+" (expected Module)");d.$append_features(e);d.$extend_object(this);d.$extended(this)}return this},f.$$arity=-1);b.def(n,"$hash",X=function(){return this.$__id__()},X.$$arity=0);b.def(n,"$initialize_copy",ba=function(a){return D},ba.$$arity=1);b.def(n,"$inspect",ia=function(){return this.$to_s()}, -ia.$$arity=0);b.def(n,"$instance_of?",T=function(a){a.$$is_class||a.$$is_module||this.$raise(r(I,"TypeError"),"class or module required");return this.$$class===a},T.$$arity=1);b.def(n,"$instance_variable_defined?",U=function(a){a=r(I,"Opal")["$instance_variable_name!"](a);return b.hasOwnProperty.call(this,a.substr(1))},U.$$arity=1);b.def(n,"$instance_variable_get",Z=function(a){a=r(I,"Opal")["$instance_variable_name!"](a);a=this[b.ivar(a.substr(1))];return null==a?D:a},Z.$$arity=1);b.def(n,"$instance_variable_set", -z=function(a,c){a=r(I,"Opal")["$instance_variable_name!"](a);return this[b.ivar(a.substr(1))]=c},z.$$arity=2);b.def(n,"$remove_instance_variable",ra=function(a){a=r(I,"Opal")["$instance_variable_name!"](a);var c=b.ivar(a.substr(1));return this.hasOwnProperty(c)?(a=this[c],delete this[c],a):this.$raise(r(I,"NameError"),"instance variable "+a+" not defined")},ra.$$arity=1);b.def(n,"$instance_variables",F=function(){var a=[],b;for(b in this)if(this.hasOwnProperty(b)&&"$"!==b.charAt(0)){var c="$"===b.substr(-1)? -b.slice(0,b.length-1):b;a.push("@"+c)}return a},F.$$arity=0);b.def(n,"$Integer",ua=function(a,b){var c=this;if(!a.$$is_string){void 0!==b&&c.$raise(r(I,"ArgumentError"),"base specified for non string value");a===D&&c.$raise(r(I,"TypeError"),"can't convert nil into Integer");if(a.$$is_number)return(Infinity===a||-Infinity===a||isNaN(a))&&c.$raise(r(I,"FloatDomainError"),a),Math.floor(a);if(a["$respond_to?"]("to_int")){var e=a.$to_int();if(e!==D)return e}return r(I,"Opal")["$coerce_to!"](a,r(I,"Integer"), -"to_i")}if("0"===a)return 0;void 0===b?b=0:(b=r(I,"Opal").$coerce_to(b,r(I,"Integer"),"to_int"),(1===b||0>b||36<b)&&c.$raise(r(I,"ArgumentError"),"invalid radix "+b));e=a.toLowerCase();e=e.replace(/(\d)_(?=\d)/g,"$1");e=e.replace(/^(\s*[+-]?)(0[bodx]?)/,function(e,f,d){switch(d){case "0b":if(0===b||2===b)return b=2,f;case "0":case "0o":if(0===b||8===b)return b=8,f;case "0d":if(0===b||10===b)return b=10,f;case "0x":if(0===b||16===b)return b=16,f}c.$raise(r(I,"ArgumentError"),'invalid value for Integer(): "'+ -a+'"')});b=0===b?10:b;var f="0-"+(10>=b?b-1:"9a-"+String.fromCharCode(97+(b-11)));(new RegExp("^\\s*[+-]?["+f+"]+\\s*$")).test(e)||c.$raise(r(I,"ArgumentError"),'invalid value for Integer(): "'+a+'"');e=parseInt(e,b);isNaN(e)&&c.$raise(r(I,"ArgumentError"),'invalid value for Integer(): "'+a+'"');return e},ua.$$arity=-2);b.def(n,"$Float",ja=function(a){a===D&&this.$raise(r(I,"TypeError"),"can't convert nil into Float");if(a.$$is_string){var b=a.toString();b=b.replace(/(\d)_(?=\d)/g,"$1");if(/^\s*[-+]?0[xX][0-9a-fA-F]+\s*$/.test(b))return this.$Integer(b); -/^\s*[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?\s*$/.test(b)||this.$raise(r(I,"ArgumentError"),'invalid value for Float(): "'+a+'"');return parseFloat(b)}return r(I,"Opal")["$coerce_to!"](a,r(I,"Float"),"to_f")},ja.$$arity=1);b.def(n,"$Hash",va=function(a){var b;return G(G(b=a["$nil?"]())?b:a["$=="]([]))?B([],{}):G(r(I,"Hash")["$==="](a))?a:r(I,"Opal")["$coerce_to!"](a,r(I,"Hash"),"to_hash")},va.$$arity=1);b.def(n,"$is_a?",pa=function(a){a.$$is_class||a.$$is_module||this.$raise(r(I,"TypeError"),"class or module required"); -return b.is_a(this,a)},pa.$$arity=1);b.def(n,"$itself",qa=function(){return this},qa.$$arity=0);b.alias(n,"kind_of?","is_a?");b.def(n,"$lambda",ea=function(){var a=ea.$$p,c=a||D;a&&(ea.$$p=null);a&&(ea.$$p=null);return b.lambda(c)},ea.$$arity=0);b.def(n,"$load",Ba=function(a){a=r(I,"Opal")["$coerce_to!"](a,r(I,"String"),"to_str");return b.load(a)},Ba.$$arity=1);b.def(n,"$loop",Na=function(){var a,c=Na.$$p,e=c||D,f=D;c&&(Na.$$p=null);if(e===D)return u(this,"enum_for",["loop"],(a=function(){return x(r(I, -"Float"),"INFINITY")},a.$$s=this,a.$$arity=0,a));for(;G(!0);)try{b.yieldX(e,[])}catch(Ka){if(b.rescue(Ka,[r(I,"StopIteration")])){f=Ka;try{return f.$result()}finally{b.pop_exception()}}else throw Ka;}return this},Na.$$arity=0);b.def(n,"$nil?",Fa=function(){return!1},Fa.$$arity=0);b.alias(n,"object_id","__id__");b.def(n,"$printf",za=function(a){var c=b.slice.call(arguments,0,arguments.length);G(c["$any?"]())&&this.$print(u(this,"format",b.to_a(c)));return D},za.$$arity=-1);b.def(n,"$proc",fa=function(){var a= -fa.$$p,b=a||D;a&&(fa.$$p=null);a&&(fa.$$p=null);G(b)||this.$raise(r(I,"ArgumentError"),"tried to create Proc object without a block");b.$$is_lambda=!1;return b},fa.$$arity=0);b.def(n,"$puts",sa=function(a){null==h.stdout&&(h.stdout=D);var c=b.slice.call(arguments,0,arguments.length);return u(h.stdout,"puts",b.to_a(c))},sa.$$arity=-1);b.def(n,"$p",V=function(a){var c;var e=b.slice.call(arguments,0,arguments.length);u(e,"each",[],(c=function(a){null==h.stdout&&(h.stdout=D);null==a&&(a=D);return h.stdout.$puts(a.$inspect())}, -c.$$s=this,c.$$arity=1,c));return G(t(e.$length(),1))?e["$[]"](0):e},V.$$arity=-1);b.def(n,"$print",ma=function(a){null==h.stdout&&(h.stdout=D);var c=b.slice.call(arguments,0,arguments.length);return u(h.stdout,"print",b.to_a(c))},ma.$$arity=-1);b.def(n,"$warn",ca=function(a){var c;null==h.VERBOSE&&(h.VERBOSE=D);null==h.stderr&&(h.stderr=D);var e=b.slice.call(arguments,0,arguments.length);return G(G(c=h.VERBOSE["$nil?"]())?c:e["$empty?"]())?D:u(h.stderr,"puts",b.to_a(e))},ca.$$arity=-1);b.def(n,"$raise", -Ma=function(a,c,e){null==h["!"]&&(h["!"]=D);null==c&&(c=D);if(null==a&&h["!"]!==D)throw h["!"];null==a?a=r(I,"RuntimeError").$new():a.$$is_string?a=r(I,"RuntimeError").$new(a):a.$$is_class&&a["$respond_to?"]("exception")?a=a.$exception(c):a["$is_a?"](r(I,"Exception"))||(a=r(I,"TypeError").$new("exception class/object expected"));h["!"]!==D&&b.exceptions.push(h["!"]);h["!"]=a;throw a;},Ma.$$arity=-1);b.alias(n,"fail","raise");b.def(n,"$rand",la=function(a){if(void 0===a)return x(r(I,"Random"),"DEFAULT").$rand(); -a.$$is_number&&(0>a&&(a=Math.abs(a)),0!==a%1&&(a=a.$to_i()),0===a&&(a=void 0));return x(r(I,"Random"),"DEFAULT").$rand(a)},la.$$arity=-1);b.def(n,"$respond_to?",Oa=function(a,b){null==b&&(b=!1);if(G(this["$respond_to_missing?"](a,b)))return!0;a=this["$"+a];return"function"!==typeof a||a.$$stub?!1:!0},Oa.$$arity=-2);b.def(n,"$respond_to_missing?",aa=function(a,b){return!1},aa.$$arity=-2);b.def(n,"$require",na=function(a){a=r(I,"Opal")["$coerce_to!"](a,r(I,"String"),"to_str");return b.require(a)},na.$$arity= -1);b.def(n,"$require_relative",Ha=function(a){r(I,"Opal")["$try_convert!"](a,r(I,"String"),"to_str");a=r(I,"File").$expand_path(r(I,"File").$join(b.current_file,"..",a));return b.require(a)},Ha.$$arity=1);b.def(n,"$require_tree",Wa=function(a){var c=[];a=r(I,"File").$expand_path(a);a=b.normalize(a);"."===a&&(a="");for(var e in b.modules)e["$start_with?"](a)&&c.push([e,b.require(e)]);return c},Wa.$$arity=1);b.alias(n,"send","__send__");b.alias(n,"public_send","__send__");b.def(n,"$singleton_class", -Pa=function(){return b.get_singleton_class(this)},Pa.$$arity=0);b.def(n,"$sleep",ab=function(a){null==a&&(a=D);a===D&&this.$raise(r(I,"TypeError"),"can't convert NilClass into time interval");a.$$is_number||this.$raise(r(I,"TypeError"),"can't convert "+a.$class()+" into time interval");0>a&&this.$raise(r(I,"ArgumentError"),"time interval must be positive");for(var c=b.global.performance?function(){return performance.now()}:function(){return new Date},e=c();c()-e<=1E3*a;);return a},ab.$$arity=-1); -b.def(n,"$srand",ka=function(a){null==a&&(a=r(I,"Random").$new_seed());return r(I,"Random").$srand(a)},ka.$$arity=-1);b.def(n,"$String",wa=function(a){var b;return G(b=r(I,"Opal")["$coerce_to?"](a,r(I,"String"),"to_str"))?b:r(I,"Opal")["$coerce_to!"](a,r(I,"String"),"to_s")},wa.$$arity=1);b.def(n,"$tap",da=function(){var a=da.$$p,c=a||D;a&&(da.$$p=null);a&&(da.$$p=null);b.yield1(c,this);return this},da.$$arity=0);b.def(n,"$to_proc",xa=function(){return this},xa.$$arity=0);b.def(n,"$to_s",Ca=function(){return"#<"+ -this.$class()+":0x"+this.$__id__().$to_s(16)+">"},Ca.$$arity=0);b.def(n,"$catch",ta=function(a){var c=ta.$$p,e=c||D;c&&(ta.$$p=null);try{return b.yieldX(e,[])}catch(Da){if(b.rescue(Da,[r(I,"UncaughtThrowError")])){c=Da;try{return c.$sym()["$=="](a)?c.$arg():this.$raise()}finally{b.pop_exception()}}else throw Da;}},ta.$$arity=1);b.def(n,"$throw",Ia=function(a){var c=b.slice.call(arguments,0,arguments.length);return this.$raise(r(I,"UncaughtThrowError"),c)},Ia.$$arity=-1);b.def(n,"$open",Ga=function(a){var c= -Ga.$$p,e=c||D;c&&(Ga.$$p=null);c&&(Ga.$$p=null);c=b.slice.call(arguments,0,arguments.length);return u(r(I,"File"),"open",b.to_a(c),e.$to_proc())},Ga.$$arity=-1);b.def(n,"$yield_self",Ja=function(){var a,c=Ja.$$p,e=c||D;c&&(Ja.$$p=null);return e===D?u(this,"enum_for",["yield_self"],(a=function(){return 1},a.$$s=this,a.$$arity=0,a)):b.yield1(e,this)},Ja.$$arity=0)})(y[0],y);return function(b,$super,g){b=n(b,$super,"Object");g=[b].concat(g);return b.$include(r(g,"Kernel"))}(y[0],null,y)}; -Opal.modules["corelib/error"]=function(b){var t=[],y=b.nil,D=b.const_get_relative,x=b.klass,r=b.send,g=b.truthy,G=b.module,h=b.hash2;b.add_stubs("$new $clone $to_s $empty? $class $raise $+ $attr_reader $[] $> $length $inspect".split(" "));(function(h,$super,n){h=x(h,$super,"Exception");var t=[h].concat(n),B,I,H,m,G,R,C,J,ha;h.$$prototype.message=y;b.defs(h,"$new",B=function(a){var d=b.slice.call(arguments,0,arguments.length);var v=0<d.length?d[0]:y,m=new this.$$constructor(v);m.name=this.$$name;m.message= -v;b.send(m,m.$initialize,d);b.config.enable_stack_trace&&Error.captureStackTrace&&Error.captureStackTrace(m,Y);return m},B.$$arity=-1);var Y=h.$new;b.defs(h,"$exception",I=function(a){var d=b.slice.call(arguments,0,arguments.length);return r(this,"new",b.to_a(d))},I.$$arity=-1);b.def(h,"$initialize",H=function(a){var d=b.slice.call(arguments,0,arguments.length);return this.message=0<d.length?d[0]:y},H.$$arity=-1);b.def(h,"$backtrace",m=function(){if(this.backtrace)return this.backtrace;var a=this.stack; -return"string"===typeof a?a.split("\n").slice(0,15):a?a.slice(0,15):[]},m.$$arity=0);b.def(h,"$exception",G=function(a){null==a&&(a=y);if(a===y||this===a)return this;var b=this.$clone();b.message=a;return b},G.$$arity=-1);b.def(h,"$message",R=function(){return this.$to_s()},R.$$arity=0);b.def(h,"$inspect",C=function(){var a=this.$to_s();return g(a["$empty?"]())?this.$class().$to_s():"#<"+this.$class().$to_s()+": "+this.$to_s()+">"},C.$$arity=0);b.def(h,"$set_backtrace",J=function(a){var b=!0,v;if(a=== -y)this.backtrace=y;else if(a.$$is_string)this.backtrace=[a];else{if(a.$$is_array){var m=0;for(v=a.length;m<v;m++)if(!a[m].$$is_string){b=!1;break}}else b=!1;!1===b&&this.$raise(D(t,"TypeError"),"backtrace must be Array of String");this.backtrace=a}return a},J.$$arity=1);return(b.def(h,"$to_s",ha=function(){var a,b;return g(a=g(b=this.message)?this.message.$to_s():b)?a:this.$class().$to_s()},ha.$$arity=0),y)&&"to_s"})(t[0],Error,t);(function(b,$super,g){[x(b,$super,"ScriptError")].concat(g);return y})(t[0], -D(t,"Exception"),t);(function(b,$super,g){[x(b,$super,"SyntaxError")].concat(g);return y})(t[0],D(t,"ScriptError"),t);(function(b,$super,g){[x(b,$super,"LoadError")].concat(g);return y})(t[0],D(t,"ScriptError"),t);(function(b,$super,g){[x(b,$super,"NotImplementedError")].concat(g);return y})(t[0],D(t,"ScriptError"),t);(function(b,$super,g){[x(b,$super,"SystemExit")].concat(g);return y})(t[0],D(t,"Exception"),t);(function(b,$super,g){[x(b,$super,"NoMemoryError")].concat(g);return y})(t[0],D(t,"Exception"), -t);(function(b,$super,g){[x(b,$super,"SignalException")].concat(g);return y})(t[0],D(t,"Exception"),t);(function(b,$super,g){[x(b,$super,"Interrupt")].concat(g);return y})(t[0],D(t,"Exception"),t);(function(b,$super,g){[x(b,$super,"SecurityError")].concat(g);return y})(t[0],D(t,"Exception"),t);(function(b,$super,g){[x(b,$super,"StandardError")].concat(g);return y})(t[0],D(t,"Exception"),t);(function(b,$super,g){[x(b,$super,"EncodingError")].concat(g);return y})(t[0],D(t,"StandardError"),t);(function(b, -$super,g){[x(b,$super,"ZeroDivisionError")].concat(g);return y})(t[0],D(t,"StandardError"),t);(function(b,$super,g){[x(b,$super,"NameError")].concat(g);return y})(t[0],D(t,"StandardError"),t);(function(b,$super,g){[x(b,$super,"NoMethodError")].concat(g);return y})(t[0],D(t,"NameError"),t);(function(b,$super,g){[x(b,$super,"RuntimeError")].concat(g);return y})(t[0],D(t,"StandardError"),t);(function(b,$super,g){[x(b,$super,"FrozenError")].concat(g);return y})(t[0],D(t,"RuntimeError"),t);(function(b, -$super,g){[x(b,$super,"LocalJumpError")].concat(g);return y})(t[0],D(t,"StandardError"),t);(function(b,$super,g){[x(b,$super,"TypeError")].concat(g);return y})(t[0],D(t,"StandardError"),t);(function(b,$super,g){[x(b,$super,"ArgumentError")].concat(g);return y})(t[0],D(t,"StandardError"),t);(function(b,$super,g){[x(b,$super,"IndexError")].concat(g);return y})(t[0],D(t,"StandardError"),t);(function(b,$super,g){[x(b,$super,"StopIteration")].concat(g);return y})(t[0],D(t,"IndexError"),t);(function(b, -$super,g){[x(b,$super,"KeyError")].concat(g);return y})(t[0],D(t,"IndexError"),t);(function(b,$super,g){[x(b,$super,"RangeError")].concat(g);return y})(t[0],D(t,"StandardError"),t);(function(b,$super,g){[x(b,$super,"FloatDomainError")].concat(g);return y})(t[0],D(t,"RangeError"),t);(function(b,$super,g){[x(b,$super,"IOError")].concat(g);return y})(t[0],D(t,"StandardError"),t);(function(b,$super,g){[x(b,$super,"SystemCallError")].concat(g);return y})(t[0],D(t,"StandardError"),t);(function(h,u){h=[G(h, -"Errno")].concat(u);(function(h,$super,u){h=x(h,$super,"EINVAL");[h].concat(u);var n;return(b.defs(h,"$new",n=function(h){n.$$p&&(n.$$p=null);null==h&&(h=y);var m="Invalid argument";g(h)&&(h=" - "+h,m="number"===typeof m&&"number"===typeof h?m+h:m["$+"](h));return r(this,b.find_super_dispatcher(this,"new",n,!1,this.$$class.$$prototype),[m],null)},n.$$arity=-1),y)&&"new"})(h[0],D(h,"SystemCallError"),h)})(t[0],t);(function(h,$super,n){h=x(h,$super,"UncaughtThrowError");[h].concat(n);var t;h.$$prototype.sym= -y;h.$attr_reader("sym","arg");return(b.def(h,"$initialize",t=function(h){t.$$p&&(t.$$p=null);this.sym=h["$[]"](0);var n=h.$length();n="number"===typeof n?1<n:n["$>"](1);g(n)&&(this.arg=h["$[]"](1));return r(this,b.find_super_dispatcher(this,"initialize",t,!1),["uncaught throw "+this.sym.$inspect()],null)},t.$$arity=1),y)&&"initialize"})(t[0],D(t,"ArgumentError"),t);(function(g,$super,h){g=x(g,$super,"NameError");[g].concat(h);var n;g.$attr_reader("name");return(b.def(g,"$initialize",n=function(g, -h){n.$$p&&(n.$$p=null);null==h&&(h=y);r(this,b.find_super_dispatcher(this,"initialize",n,!1),[g],null);return this.name=h},n.$$arity=-2),y)&&"initialize"})(t[0],null,t);(function(g,$super,h){g=x(g,$super,"NoMethodError");[g].concat(h);var n;g.$attr_reader("args");return(b.def(g,"$initialize",n=function(g,h,t){n.$$p&&(n.$$p=null);null==h&&(h=y);null==t&&(t=[]);r(this,b.find_super_dispatcher(this,"initialize",n,!1),[g,h],null);return this.args=t},n.$$arity=-2),y)&&"initialize"})(t[0],null,t);(function(b, -$super,g){b=x(b,$super,"StopIteration");[b].concat(g);return b.$attr_reader("result")})(t[0],null,t);(function(t,$super,n){t=x(t,$super,"KeyError");var B=[t].concat(n),O,I,H;t.$$prototype.receiver=t.$$prototype.key=y;b.def(t,"$initialize",O=function(m,g){O.$$p&&(O.$$p=null);if(null==g)g=h([],{});else if(!g.$$is_hash)throw b.ArgumentError.$new("expected kwargs");var n=g.$$smap.receiver;null==n&&(n=y);g=g.$$smap.key;null==g&&(g=y);r(this,b.find_super_dispatcher(this,"initialize",O,!1),[m],null);this.receiver= -n;return this.key=g},O.$$arity=-2);b.def(t,"$receiver",I=function(){var b;return g(b=this.receiver)?b:this.$raise(D(B,"ArgumentError"),"no receiver is available")},I.$$arity=0);return(b.def(t,"$key",H=function(){var b;return g(b=this.key)?b:this.$raise(D(B,"ArgumentError"),"no key is available")},H.$$arity=0),y)&&"key"})(t[0],null,t);return function(b,g){b=[G(b,"JS")].concat(g);[x(b[0],null,"Error")].concat(b)}(t[0],t)}; -Opal.modules["corelib/constants"]=function(b){var t=[],y=b.const_get_relative;b.const_set(t[0],"RUBY_PLATFORM","opal");b.const_set(t[0],"RUBY_ENGINE","opal");b.const_set(t[0],"RUBY_VERSION","2.5.1");b.const_set(t[0],"RUBY_ENGINE_VERSION","0.11.99.dev");b.const_set(t[0],"RUBY_RELEASE_DATE","2018-12-25");b.const_set(t[0],"RUBY_PATCHLEVEL",0);b.const_set(t[0],"RUBY_REVISION",0);b.const_set(t[0],"RUBY_COPYRIGHT","opal - Copyright (C) 2013-2018 Adam Beynon and the Opal contributors");return b.const_set(t[0], -"RUBY_DESCRIPTION","opal "+y(t,"RUBY_ENGINE_VERSION")+" ("+y(t,"RUBY_RELEASE_DATE")+" revision "+y(t,"RUBY_REVISION")+")")};Opal.modules["opal/base"]=function(b){var t=b.top;b.add_stubs(["$require"]);t.$require("corelib/runtime");t.$require("corelib/helpers");t.$require("corelib/module");t.$require("corelib/class");t.$require("corelib/basic_object");t.$require("corelib/kernel");t.$require("corelib/error");return t.$require("corelib/constants")}; -Opal.modules["corelib/nil"]=function(b){var t=[],y=b.nil,D=b.const_get_relative,x=b.klass,r=b.hash2,g=b.truthy;b.add_stubs("$raise $name $new $> $length $Rational".split(" "));(function(t,$super,B){t=x(t,$super,"NilClass");var u=[t].concat(B),n,G,O,I,H,m,oa,R,C,J,ha,Y,a,d,v,E,N,q;t.$$prototype.$$meta=t;(function(a,c){var d=[a].concat(c),p;b.def(a,"$allocate",p=function(){return this.$raise(D(d,"TypeError"),"allocator undefined for "+this.$name())},p.$$arity=0);b.udef(a,"$new");return y})(b.get_singleton_class(t), -u);b.def(t,"$!",n=function(){return!0},n.$$arity=0);b.def(t,"$&",G=function(a){return!1},G.$$arity=1);b.def(t,"$|",O=function(a){return!1!==a&&a!==y},O.$$arity=1);b.def(t,"$^",I=function(a){return!1!==a&&a!==y},I.$$arity=1);b.def(t,"$==",H=function(a){return a===y},H.$$arity=1);b.def(t,"$dup",m=function(){return y},m.$$arity=0);b.def(t,"$clone",oa=function(a){if(null==a)r([],{});else if(!a.$$is_hash)throw b.ArgumentError.$new("expected kwargs");return y},oa.$$arity=-1);b.def(t,"$inspect",R=function(){return"nil"}, -R.$$arity=0);b.def(t,"$nil?",C=function(){return!0},C.$$arity=0);b.def(t,"$singleton_class",J=function(){return D(u,"NilClass")},J.$$arity=0);b.def(t,"$to_a",ha=function(){return[]},ha.$$arity=0);b.def(t,"$to_h",Y=function(){return b.hash()},Y.$$arity=0);b.def(t,"$to_i",a=function(){return 0},a.$$arity=0);b.alias(t,"to_f","to_i");b.def(t,"$to_s",d=function(){return""},d.$$arity=0);b.def(t,"$to_c",v=function(){return D(u,"Complex").$new(0,0)},v.$$arity=0);b.def(t,"$rationalize",E=function(a){var c= -b.slice.call(arguments,0,arguments.length).$length();c="number"===typeof c?1<c:c["$>"](1);g(c)&&this.$raise(D(u,"ArgumentError"));return this.$Rational(0,1)},E.$$arity=-1);b.def(t,"$to_r",N=function(){return this.$Rational(0,1)},N.$$arity=0);return(b.def(t,"$instance_variables",q=function(){return[]},q.$$arity=0),y)&&"instance_variables"})(t[0],null,t);return b.const_set(t[0],"NIL",y)}; -Opal.modules["corelib/boolean"]=function(b){var t=[],y=b.nil,D=b.const_get_relative,x=b.klass,r=b.hash2;b.add_stubs(["$raise","$name"]);(function(g,$super,h){g=x(g,$super,"Boolean");var t=[g].concat(h),u,n,P,O,I,H,m,oa,R,C;b.defineProperty(g.$$prototype,"$$is_boolean",!0);b.defineProperty(g.$$prototype,"$$meta",g);(function(g,m){var h=[g].concat(m),a;b.def(g,"$allocate",a=function(){return this.$raise(D(h,"TypeError"),"allocator undefined for "+this.$name())},a.$$arity=0);b.udef(g,"$new");return y})(b.get_singleton_class(g), -t);b.def(g,"$__id__",u=function(){return this.valueOf()?2:0},u.$$arity=0);b.alias(g,"object_id","__id__");b.def(g,"$!",n=function(){return 1!=this},n.$$arity=0);b.def(g,"$&",P=function(b){return 1==this?!1!==b&&b!==y:!1},P.$$arity=1);b.def(g,"$|",O=function(b){return 1==this?!0:!1!==b&&b!==y},O.$$arity=1);b.def(g,"$^",I=function(b){return 1==this?!1===b||b===y:!1!==b&&b!==y},I.$$arity=1);b.def(g,"$==",H=function(b){return 1==this===b.valueOf()},H.$$arity=1);b.alias(g,"equal?","==");b.alias(g,"eql?", -"==");b.def(g,"$singleton_class",m=function(){return D(t,"Boolean")},m.$$arity=0);b.def(g,"$to_s",oa=function(){return 1==this?"true":"false"},oa.$$arity=0);b.def(g,"$dup",R=function(){return this},R.$$arity=0);return(b.def(g,"$clone",C=function(g){if(null==g)r([],{});else if(!g.$$is_hash)throw b.ArgumentError.$new("expected kwargs");return this},C.$$arity=-1),y)&&"clone"})(t[0],Boolean,t);b.const_set(t[0],"TrueClass",D(t,"Boolean"));b.const_set(t[0],"FalseClass",D(t,"Boolean"));b.const_set(t[0], -"TRUE",!0);return b.const_set(t[0],"FALSE",!1)}; -Opal.modules["corelib/comparable"]=function(b){function t(b,g){return"number"===typeof b&&"number"===typeof g?b>g:b["$>"](g)}function y(b,g){return"number"===typeof b&&"number"===typeof g?b<g:b["$<"](g)}var D=[],x=b.nil,r=b.const_get_relative,g=b.module,G=b.truthy;b.add_stubs("$=== $> $< $equal? $<=> $normalize $raise $class".split(" "));return function(h,B){h=g(h,"Comparable");var u=[h].concat(B),n,D,O,I,H,m,oa,R;b.defs(h,"$normalize",n=function(b){return G(r(u,"Integer")["$==="](b))?b:G(t(b,0))? -1:G(y(b,0))?-1:0},n.$$arity=1);b.def(h,"$==",D=function(g){var m=x;try{return G(this["$equal?"](g))?!0:this["$<=>"]==b.Kernel["$<=>"]?!1:this.$$comparable?(delete this.$$comparable,!1):G(m=this["$<=>"](g))?0==r(u,"Comparable").$normalize(m):!1}catch(ha){if(b.rescue(ha,[r(u,"StandardError")]))try{return!1}finally{b.pop_exception()}else throw ha;}},D.$$arity=1);b.def(h,"$>",O=function(b){var g;G(g=this["$<=>"](b))||this.$raise(r(u,"ArgumentError"),"comparison of "+this.$class()+" with "+b.$class()+ -" failed");return 0<r(u,"Comparable").$normalize(g)},O.$$arity=1);b.def(h,"$>=",I=function(b){var g;G(g=this["$<=>"](b))||this.$raise(r(u,"ArgumentError"),"comparison of "+this.$class()+" with "+b.$class()+" failed");return 0<=r(u,"Comparable").$normalize(g)},I.$$arity=1);b.def(h,"$<",H=function(b){var g;G(g=this["$<=>"](b))||this.$raise(r(u,"ArgumentError"),"comparison of "+this.$class()+" with "+b.$class()+" failed");return 0>r(u,"Comparable").$normalize(g)},H.$$arity=1);b.def(h,"$<=",m=function(b){var g; -G(g=this["$<=>"](b))||this.$raise(r(u,"ArgumentError"),"comparison of "+this.$class()+" with "+b.$class()+" failed");return 0>=r(u,"Comparable").$normalize(g)},m.$$arity=1);b.def(h,"$between?",oa=function(b,g){return y(this,b)||t(this,g)?!1:!0},oa.$$arity=2);b.def(h,"$clamp",R=function(b,g){var m=b["$<=>"](g);G(m)||this.$raise(r(u,"ArgumentError"),"comparison of "+b.$class()+" with "+g.$class()+" failed");G(t(r(u,"Comparable").$normalize(m),0))&&this.$raise(r(u,"ArgumentError"),"min argument must be smaller than max argument"); -return G(y(r(u,"Comparable").$normalize(this["$<=>"](b)),0))?b:G(t(r(u,"Comparable").$normalize(this["$<=>"](g)),0))?g:this},R.$$arity=2)}(D[0],D)}; -Opal.modules["corelib/regexp"]=function(b){var t=[],y=b.nil,D=b.const_get_relative,x=b.klass,r=b.send,g=b.truthy,G=b.gvars;b.add_stubs("$nil? $[] $raise $escape $options $to_str $new $join $coerce_to! $! $match $coerce_to? $begin $coerce_to $=~ $attr_reader $=== $inspect $to_a".split(" "));(function(b,$super,g){[x(b,$super,"RegexpError")].concat(g);return y})(t[0],D(t,"StandardError"),t);(function(h,$super,t){h=x(h,$super,"Regexp");var n=[h].concat(t),u,O,I,H,m,oa,R,C,J,ha;b.const_set(n[0],"IGNORECASE", -1);b.const_set(n[0],"EXTENDED",2);b.const_set(n[0],"MULTILINE",4);b.defineProperty(h.$$prototype,"$$is_regexp",!0);(function(m,a){var d=[m].concat(a),v,E,h,q,l;b.def(m,"$allocate",v=function(){var a=v.$$p,d;a&&(v.$$p=null);var p=0;var l=arguments.length;for(d=Array(l);p<l;p++)d[p]=arguments[p];a=r(this,b.find_super_dispatcher(this,"allocate",v,!1),d,a);a.uninitialized=!0;return a},v.$$arity=0);b.def(m,"$escape",E=function(a){return b.escape_regexp(a)},E.$$arity=1);b.def(m,"$last_match",h=function(a){null== -G["~"]&&(G["~"]=y);null==a&&(a=y);return g(a["$nil?"]())?G["~"]:G["~"]["$[]"](a)},h.$$arity=-1);b.alias(m,"quote","escape");b.def(m,"$union",q=function(a){var c=b.slice.call(arguments,0,arguments.length);if(0==c.length)return/(?!)/;if(1==c.length&&c[0].$$is_regexp)return c[0];var p=c[0].$$is_array;1<c.length&&p&&this.$raise(D(d,"TypeError"),"no implicit conversion of Array into String");p&&(c=c[0]);var l=void 0;p=[];for(var q=0;q<c.length;q++){var k=c[q];if(k.$$is_string)p.push(this.$escape(k));else if(k.$$is_regexp){var e= -k.$options();void 0!=l&&l!=e&&this.$raise(D(d,"TypeError"),"All expressions must use the same options");l=e;p.push("("+k.source+")")}else p.push(this.$escape(k.$to_str()))}return this.$new(p.$join("|"),l)},q.$$arity=-1);return(b.def(m,"$new",l=function(a,b){if(a.$$is_regexp)return new RegExp(a);a=D(d,"Opal")["$coerce_to!"](a,D(d,"String"),"to_str");"\\"===a.charAt(a.length-1)&&"\\"!==a.charAt(a.length-2)&&this.$raise(D(d,"RegexpError"),"too short escape sequence: /"+a+"/");if(void 0===b||b["$!"]())return new RegExp(a); -if(b.$$is_number){var c="";D(d,"IGNORECASE")&b&&(c+="i");D(d,"MULTILINE")&b&&(c+="m");b=c}else b="i";return new RegExp(a,b)},l.$$arity=-2),y)&&"new"})(b.get_singleton_class(h),n);b.def(h,"$==",u=function(b){return b instanceof RegExp&&this.toString()===b.toString()},u.$$arity=1);b.def(h,"$===",O=function(b){return this.$match(D(n,"Opal")["$coerce_to?"](b,D(n,"String"),"to_str"))!==y},O.$$arity=1);b.def(h,"$=~",I=function(b){var a;null==G["~"]&&(G["~"]=y);return g(a=this.$match(b))?G["~"].$begin(0): -a},I.$$arity=1);b.alias(h,"eql?","==");b.def(h,"$inspect",H=function(){var b=this.toString(),a=/^\/(.*)\/([^\/]*)$/.exec(b);if(a){b=a[2];a=a[1].split("");for(var d=a.length,v=!1,g="",m=0;m<d;m++){var q=a[m];v||"/"!=q||(g=g.concat("\\"));g=g.concat(q);v="\\"==q?v?!1:!0:!1}return"/"+g+"/"+b}return b},H.$$arity=0);b.def(h,"$match",m=function(g,a){var d=m.$$p,v=d||y;null==G["~"]&&(G["~"]=y);d&&(m.$$p=null);d&&(m.$$p=null);this.uninitialized&&this.$raise(D(n,"TypeError"),"uninitialized Regexp");if(void 0=== -a)return g===y?G["~"]=y:(g=this.exec(D(n,"Opal").$coerce_to(g,D(n,"String"),"to_str")))?(G["~"]=D(n,"MatchData").$new(this,g),v===y?G["~"]:b.yield1(v,G["~"])):G["~"]=y;a=D(n,"Opal").$coerce_to(a,D(n,"Integer"),"to_int");if(g===y)return G["~"]=y;g=D(n,"Opal").$coerce_to(g,D(n,"String"),"to_str");if(0>a&&(a+=g.length,0>a))return G["~"]=y;for(var E=b.global_regexp(this);;){d=E.exec(g);if(null===d)return G["~"]=y;if(d.index>=a)return G["~"]=D(n,"MatchData").$new(E,d),v===y?G["~"]:b.yield1(v,G["~"]);E.lastIndex= -d.index+1}},m.$$arity=-2);b.def(h,"$match?",oa=function(g,a){this.uninitialized&&this.$raise(D(n,"TypeError"),"uninitialized Regexp");if(void 0===a)return g===y?!1:this.test(D(n,"Opal").$coerce_to(g,D(n,"String"),"to_str"));a=D(n,"Opal").$coerce_to(a,D(n,"Integer"),"to_int");if(g===y)return!1;g=D(n,"Opal").$coerce_to(g,D(n,"String"),"to_str");if(0>a&&(a+=g.length,0>a))return!1;g=b.global_regexp(this).exec(g);return null===g||g.index<a?!1:!0},oa.$$arity=-2);b.def(h,"$~",R=function(){null==G._&&(G._= -y);return this["$=~"](G._)},R.$$arity=0);b.def(h,"$source",C=function(){return this.source},C.$$arity=0);b.def(h,"$options",J=function(){this.uninitialized&&this.$raise(D(n,"TypeError"),"uninitialized Regexp");var b=0;this.multiline&&(b|=D(n,"MULTILINE"));this.ignoreCase&&(b|=D(n,"IGNORECASE"));return b},J.$$arity=0);b.def(h,"$casefold?",ha=function(){return this.ignoreCase},ha.$$arity=0);return b.alias(h,"to_s","source")})(t[0],RegExp,t);return function(h,$super,t){h=x(h,$super,"MatchData");var n= -[h].concat(t),u,O,I,H,m,oa,R,C,J,ha,Y,a;h.$$prototype.matches=y;h.$attr_reader("post_match","pre_match","regexp","string");b.def(h,"$initialize",u=function(a,b){G["~"]=this;this.regexp=a;this.begin=b.index;this.string=b.input;this.pre_match=b.input.slice(0,b.index);this.post_match=b.input.slice(b.index+b[0].length);this.matches=[];a=0;for(var d=b.length;a<d;a++){var g=b[a];null==g?this.matches.push(y):this.matches.push(g)}},u.$$arity=2);b.def(h,"$[]",O=function(a){var d=b.slice.call(arguments,0,arguments.length); -return r(this.matches,"[]",b.to_a(d))},O.$$arity=-1);b.def(h,"$offset",I=function(a){0!==a&&this.$raise(D(n,"ArgumentError"),"MatchData#offset only supports 0th element");return[this.begin,this.begin+this.matches[a].length]},I.$$arity=1);b.def(h,"$==",H=function(a){var b,d,m,q;return g(D(n,"MatchData")["$==="](a))?g(b=g(d=g(m=g(q=this.string==a.string)?this.regexp.toString()==a.regexp.toString():q)?this.pre_match==a.pre_match:m)?this.post_match==a.post_match:d)?this.begin==a.begin:b:!1},H.$$arity= -1);b.alias(h,"eql?","==");b.def(h,"$begin",m=function(a){0!==a&&this.$raise(D(n,"ArgumentError"),"MatchData#begin only supports 0th element");return this.begin},m.$$arity=1);b.def(h,"$end",oa=function(a){0!==a&&this.$raise(D(n,"ArgumentError"),"MatchData#end only supports 0th element");return this.begin+this.matches[a].length},oa.$$arity=1);b.def(h,"$captures",R=function(){return this.matches.slice(1)},R.$$arity=0);b.def(h,"$inspect",C=function(){for(var a="#<MatchData "+this.matches[0].$inspect(), -b=1,g=this.matches.length;b<g;b++)a+=" "+b+":"+this.matches[b].$inspect();return a+">"},C.$$arity=0);b.def(h,"$length",J=function(){return this.matches.length},J.$$arity=0);b.alias(h,"size","length");b.def(h,"$to_a",ha=function(){return this.matches},ha.$$arity=0);b.def(h,"$to_s",Y=function(){return this.matches[0]},Y.$$arity=0);return(b.def(h,"$values_at",a=function(a){var d=b.slice.call(arguments,0,arguments.length);var g,m=[];for(g=0;g<d.length;g++){if(d[g].$$is_range){var q=d[g].$to_a();q.unshift(g, -1);Array.prototype.splice.apply(d,q)}q=D(n,"Opal")["$coerce_to!"](d[g],D(n,"Integer"),"to_int");if(0>q&&(q+=this.matches.length,0>q)){m.push(y);continue}m.push(this.matches[q])}return m},a.$$arity=-1),y)&&"values_at"}(t[0],null,t)}; -Opal.modules["corelib/string"]=function(b){function t(b,g){return"number"===typeof b&&"number"===typeof g?b/g:b["$/"](g)}function y(b,g){return"number"===typeof b&&"number"===typeof g?b+g:b["$+"](g)}var D=b.top,x=[],r=b.nil,g=b.const_get_relative,G=b.klass,h=b.truthy,B=b.send,u=b.gvars;b.add_stubs("$require $include $coerce_to? $coerce_to $raise $=== $format $to_s $respond_to? $to_str $<=> $== $=~ $new $force_encoding $casecmp $empty? $ljust $ceil $/ $+ $rjust $floor $to_a $each_char $to_proc $coerce_to! $copy_singleton_methods $initialize_clone $initialize_dup $enum_for $size $chomp $[] $to_i $each_line $class $match $match? $captures $proc $succ $escape".split(" ")); -D.$require("corelib/comparable");D.$require("corelib/regexp");(function(n,$super,x){function O(a){function b(a){var b="",c,e=a.length;for(c=0;c<e;c++){var f=a.charAt(c);if("-"===f&&0<c&&c<e-1&&!d){var d=a.charCodeAt(c-1);f=a.charCodeAt(c+1);d>f&&H.$raise(g(m,"ArgumentError"),'invalid range "'+d+"-"+f+'" in string transliteration');for(d+=1;d<f+1;d++)b+=String.fromCharCode(d);d=!0;c++}else d="\\"===f,b+=f}return b}function c(a,b){if(0===a.length)return b;var c="",e,f=a.length;for(e=0;e<f;e++){var d= -a.charAt(e);-1!==b.indexOf(d)&&(c+=d)}return c}var e,f="",d="";var L=0;for(e=a.length;L<e;L++){var k=g(m,"Opal").$coerce_to(a[L],g(m,"String"),"to_str");var w="^"===k.charAt(0)&&1<k.length;k=b(w?k.slice(1):k);w?d=c(d,k):f=c(f,k)}if(0<f.length&&0<d.length){k="";L=0;for(e=f.length;L<e;L++)a=f.charAt(L),-1===d.indexOf(a)&&(k+=a);f=k;d=""}return 0<f.length?"["+g(m,"Regexp").$escape(f)+"]":0<d.length?"[^"+g(m,"Regexp").$escape(d)+"]":null}var H=G(n,$super,"String"),m=[H].concat(x),D,R,C,J,ha,Y,a,d,v,E, -N,q,l,c,A,p,S,M,k,e,f,X,ba,ia,T,U,Z,z,ra,F,ua,ja,va,pa,qa,ea,Ba,Na,Fa,za,fa,sa,V,ma,ca,Ma,la,Oa,aa,na,Ha,Wa,Pa,ab,ka,wa,da,xa,Ca,ta,Ia,Ga,Ja,Xa,Qa,Ra,Da,Ka,Ya,Va,Za,$a,bb,Ua,w,Q;H.$include(g(m,"Comparable"));b.defineProperty(H.$$prototype,"$$is_string",!0);b.defineProperty(H.$$prototype,"$$cast",function(a){var b=this.$$class;return b.$$constructor===String?a:new b.$$constructor(a)});b.def(H,"$__id__",D=function(){return this.toString()},D.$$arity=0);b.alias(H,"object_id","__id__");b.defs(H,"$try_convert", -R=function(a){return g(m,"Opal")["$coerce_to?"](a,g(m,"String"),"to_str")},R.$$arity=1);b.defs(H,"$new",C=function(a){null==a&&(a="");a=g(m,"Opal").$coerce_to(a,g(m,"String"),"to_str");return new this.$$constructor(a)},C.$$arity=-1);b.def(H,"$initialize",J=function(a){return void 0===a?this:this.$raise(g(m,"NotImplementedError"),"Mutable strings are not supported in Opal.")},J.$$arity=-1);b.def(H,"$%",ha=function(a){return h(g(m,"Array")["$==="](a))?B(this,"format",[this].concat(b.to_a(a))):this.$format(this, -a)},ha.$$arity=1);b.def(H,"$*",Y=function(a){a=g(m,"Opal").$coerce_to(a,g(m,"Integer"),"to_int");0>a&&this.$raise(g(m,"ArgumentError"),"negative argument");if(0===a)return this.$$cast("");var b="",c=this.toString();for(268435456<=c.length*a&&this.$raise(g(m,"RangeError"),"multiply count must not overflow maximum string size");;){1===(a&1)&&(b+=c);a>>>=1;if(0===a)break;c+=c}return this.$$cast(b)},Y.$$arity=1);b.def(H,"$+",a=function(a){a=g(m,"Opal").$coerce_to(a,g(m,"String"),"to_str");return this+ -a.$to_s()},a.$$arity=1);b.def(H,"$<=>",d=function(a){if(h(a["$respond_to?"]("to_str")))return a=a.$to_str().$to_s(),this>a?1:this<a?-1:0;a=a["$<=>"](this);return a===r?r:0<a?-1:0>a?1:0},d.$$arity=1);b.def(H,"$==",v=function(a){return a.$$is_string?this.toString()===a.toString():g(m,"Opal")["$respond_to?"](a,"to_str")?a["$=="](this):!1},v.$$arity=1);b.alias(H,"eql?","==");b.alias(H,"===","==");b.def(H,"$=~",E=function(a){a.$$is_string&&this.$raise(g(m,"TypeError"),"type mismatch: String given");return a["$=~"](this)}, -E.$$arity=1);b.def(H,"$[]",N=function(a,b){var c=this.length;if(a.$$is_range){var e=a.excl;b=g(m,"Opal").$coerce_to(a.end,g(m,"Integer"),"to_int");a=g(m,"Opal").$coerce_to(a.begin,g(m,"Integer"),"to_int");if(Math.abs(a)>c)return r;0>a&&(a+=c);0>b&&(b+=c);e||(b+=1);b-=a;0>b&&(b=0);return this.$$cast(this.substr(a,b))}if(a.$$is_string)return null!=b&&this.$raise(g(m,"TypeError")),-1!==this.indexOf(a)?this.$$cast(a):r;if(a.$$is_regexp){c=this.match(a);if(null===c)return u["~"]=r;u["~"]=g(m,"MatchData").$new(a, -c);if(null==b)return this.$$cast(c[0]);b=g(m,"Opal").$coerce_to(b,g(m,"Integer"),"to_int");return 0>b&&-b<c.length?this.$$cast(c[b+c.length]):0<=b&&b<c.length?this.$$cast(c[b]):r}a=g(m,"Opal").$coerce_to(a,g(m,"Integer"),"to_int");0>a&&(a+=c);if(null==b)return a>=c||0>a?r:this.$$cast(this.substr(a,1));b=g(m,"Opal").$coerce_to(b,g(m,"Integer"),"to_int");return 0>b||a>c||0>a?r:this.$$cast(this.substr(a,b))},N.$$arity=-2);b.alias(H,"byteslice","[]");b.def(H,"$b",q=function(){return this.$force_encoding("binary")}, -q.$$arity=0);b.def(H,"$capitalize",l=function(){return this.$$cast(this.charAt(0).toUpperCase()+this.substr(1).toLowerCase())},l.$$arity=0);b.def(H,"$casecmp",c=function(a){var b=this;if(!h(a["$respond_to?"]("to_str")))return r;a=g(m,"Opal").$coerce_to(a,g(m,"String"),"to_str").$to_s();var c=/^[\x00-\x7F]*$/;c.test(b)&&c.test(a)&&(b=b.toLowerCase(),a=a.toLowerCase());return b["$<=>"](a)},c.$$arity=1);b.def(H,"$casecmp?",A=function(a){a=this.$casecmp(a);return a===r?r:0===a},A.$$arity=1);b.def(H,"$center", -p=function(a,b){null==b&&(b=" ");a=g(m,"Opal").$coerce_to(a,g(m,"Integer"),"to_int");b=g(m,"Opal").$coerce_to(b,g(m,"String"),"to_str").$to_s();h(b["$empty?"]())&&this.$raise(g(m,"ArgumentError"),"zero width padding");if(h(a<=this.length))return this;var c=this.$ljust(t(y(a,this.length),2).$ceil(),b);a=this.$rjust(t(y(a,this.length),2).$floor(),b);return this.$$cast(a+c.slice(this.length))},p.$$arity=-2);b.def(H,"$chars",S=function(){var a=S.$$p,b=a||r;a&&(S.$$p=null);a&&(S.$$p=null);return h(b)? -B(this,"each_char",[],b.$to_proc()):this.$each_char().$to_a()},S.$$arity=0);b.def(H,"$chomp",M=function(a){null==u["/"]&&(u["/"]=r);null==a&&(a=u["/"]);if(h(a===r||0===this.length))return this;a=g(m,"Opal")["$coerce_to!"](a,g(m,"String"),"to_str").$to_s();var b;"\n"===a?b=this.replace(/\r?\n?$/,""):""===a?b=this.replace(/(\r?\n)+$/,""):this.length>=a.length&&this.substr(this.length-a.length,a.length)===a&&(b=this.substr(0,this.length-a.length));return null!=b?this.$$cast(b):this},M.$$arity=-1);b.def(H, -"$chop",k=function(){var a=this.length;a=1>=a?"":"\n"===this.charAt(a-1)&&"\r"===this.charAt(a-2)?this.substr(0,a-2):this.substr(0,a-1);return this.$$cast(a)},k.$$arity=0);b.def(H,"$chr",e=function(){return this.charAt(0)},e.$$arity=0);b.def(H,"$clone",f=function(){var a=this.slice();a.$copy_singleton_methods(this);a.$initialize_clone(this);return a},f.$$arity=0);b.def(H,"$dup",X=function(){var a=this.slice();a.$initialize_dup(this);return a},X.$$arity=0);b.def(H,"$count",ba=function(a){var c=b.slice.call(arguments, -0,arguments.length);0===c.length&&this.$raise(g(m,"ArgumentError"),"ArgumentError: wrong number of arguments (0 for 1+)");c=O(c);return null===c?0:this.length-this.replace(new RegExp(c,"g"),"").length},ba.$$arity=-1);b.def(H,"$delete",ia=function(a){var c=b.slice.call(arguments,0,arguments.length);0===c.length&&this.$raise(g(m,"ArgumentError"),"ArgumentError: wrong number of arguments (0 for 1+)");c=O(c);return null===c?this:this.$$cast(this.replace(new RegExp(c,"g"),""))},ia.$$arity=-1);b.def(H, -"$delete_prefix",T=function(a){a.$$is_string||(a=g(m,"Opal").$coerce_to(a,g(m,"String"),"to_str"));return this.slice(0,a.length)===a?this.$$cast(this.slice(a.length)):this},T.$$arity=1);b.def(H,"$delete_suffix",U=function(a){a.$$is_string||(a=g(m,"Opal").$coerce_to(a,g(m,"String"),"to_str"));return this.slice(this.length-a.length)===a?this.$$cast(this.slice(0,this.length-a.length)):this},U.$$arity=1);b.def(H,"$downcase",Z=function(){return this.$$cast(this.toLowerCase())},Z.$$arity=0);b.def(H,"$each_char", -z=function(){var a=z.$$p,c=a||r,e;a&&(z.$$p=null);a&&(z.$$p=null);if(c===r)return B(this,"enum_for",["each_char"],(e=function(){return(e.$$s||this).$size()},e.$$s=this,e.$$arity=0,e));a=0;for(var f=this.length;a<f;a++)b.yield1(c,this.charAt(a));return this},z.$$arity=0);b.def(H,"$each_line",ra=function(a){var c=ra.$$p,e=c||r;null==u["/"]&&(u["/"]=r);c&&(ra.$$p=null);c&&(ra.$$p=null);null==a&&(a=u["/"]);if(e===r)return this.$enum_for("each_line",a);if(a===r)return b.yield1(e,this),this;a=g(m,"Opal").$coerce_to(a, -g(m,"String"),"to_str");var f,d;if(0===a.length){a=this.split(/(\n{2,})/);c=0;for(f=a.length;c<f;c+=2)(a[c]||a[c+1])&&b.yield1(e,this.$$cast((a[c]||"")+(a[c+1]||"")));return this}c=this.$chomp(a);f=this.length!=c.length;var k=c.split(a);c=0;for(d=k.length;c<d;c++)c<d-1||f?b.yield1(e,this.$$cast(k[c]+a)):b.yield1(e,this.$$cast(k[c]));return this},ra.$$arity=-1);b.def(H,"$empty?",F=function(){return 0===this.length},F.$$arity=0);b.def(H,"$end_with?",ua=function(a){var c=b.slice.call(arguments,0,arguments.length); -for(var e=0,f=c.length;e<f;e++){var d=g(m,"Opal").$coerce_to(c[e],g(m,"String"),"to_str").$to_s();if(this.length>=d.length&&this.substr(this.length-d.length,d.length)==d)return!0}return!1},ua.$$arity=-1);b.alias(H,"equal?","===");b.def(H,"$gsub",ja=function(a,c){var e=ja.$$p,f=e||r,d=this;e&&(ja.$$p=null);e&&(ja.$$p=null);if(void 0===c&&f===r)return d.$enum_for("gsub",a);e="";var k=r,w=0;a.$$is_regexp?a=b.global_multiline_regexp(a):(a=g(m,"Opal").$coerce_to(a,g(m,"String"),"to_str"),a=new RegExp(a.replace(/[.*+?^${}()|[\]\\]/g, -"\\$&"),"gm"));for(var p;;){var L=a.exec(d);if(null===L){u["~"]=r;e+=d.slice(w);break}k=g(m,"MatchData").$new(a,L);if(void 0===c){p=a.lastIndex;var l=f(L[0]);a.lastIndex=p}else c.$$is_hash?l=c["$[]"](L[0]).$to_s():(c.$$is_string||(c=g(m,"Opal").$coerce_to(c,g(m,"String"),"to_str")),l=c.replace(/([\\]+)([0-9+&`'])/g,function(a,b,c){if(0===b.length%2)return a;switch(c){case "+":for(a=L.length-1;0<a;a--)if(void 0!==L[a])return b.slice(1)+L[a];return"";case "&":return b.slice(1)+L[0];case "`":return b.slice(1)+ -d.slice(0,L.index);case "'":return b.slice(1)+d.slice(L.index+L[0].length);default:return b.slice(1)+(L[c]||"")}}).replace(/\\\\/g,"\\"));a.lastIndex===L.index?(e+=l+d.slice(w,L.index+1),a.lastIndex+=1):e+=d.slice(w,L.index)+l;w=a.lastIndex}u["~"]=k;return d.$$cast(e)},ja.$$arity=-2);b.def(H,"$hash",va=function(){return this.toString()},va.$$arity=0);b.def(H,"$hex",pa=function(){return this.$to_i(16)},pa.$$arity=0);b.def(H,"$include?",qa=function(a){a.$$is_string||(a=g(m,"Opal").$coerce_to(a,g(m, -"String"),"to_str"));return-1!==this.indexOf(a)},qa.$$arity=1);b.def(H,"$index",ea=function(a,c){var e;if(void 0===c)c=0;else if(c=g(m,"Opal").$coerce_to(c,g(m,"Integer"),"to_int"),0>c&&(c+=this.length,0>c))return r;if(a.$$is_regexp)for(e=b.global_multiline_regexp(a);;){a=e.exec(this);if(null===a){u["~"]=r;c=-1;break}if(a.index>=c){u["~"]=g(m,"MatchData").$new(e,a);c=a.index;break}e.lastIndex=a.index+1}else a=g(m,"Opal").$coerce_to(a,g(m,"String"),"to_str"),c=0===a.length&&c>this.length?-1:this.indexOf(a, -c);return-1===c?r:c},ea.$$arity=-2);b.def(H,"$inspect",Ba=function(){var a={"\u0007":"\\a","\u001b":"\\e","\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\x0B":"\\v",'"':'\\"',"\\":"\\\\"};return'"'+this.replace(/[\\"\x00-\x1f\u007F-\u009F\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,function(b){return a[b]||"\\u"+("0000"+b.charCodeAt(0).toString(16).toUpperCase()).slice(-4)}).replace(/#[\$@\{]/g,"\\$&")+'"'},Ba.$$arity=0);b.def(H,"$intern",Na= -function(){return this.toString()},Na.$$arity=0);b.def(H,"$lines",Fa=function(a){var b=Fa.$$p,c=b||r;null==u["/"]&&(u["/"]=r);b&&(Fa.$$p=null);b&&(Fa.$$p=null);null==a&&(a=u["/"]);a=B(this,"each_line",[a],c.$to_proc());return h(c)?this:a.$to_a()},Fa.$$arity=-1);b.def(H,"$length",za=function(){return this.length},za.$$arity=0);b.def(H,"$ljust",fa=function(a,b){null==b&&(b=" ");a=g(m,"Opal").$coerce_to(a,g(m,"Integer"),"to_int");b=g(m,"Opal").$coerce_to(b,g(m,"String"),"to_str").$to_s();h(b["$empty?"]())&& -this.$raise(g(m,"ArgumentError"),"zero width padding");if(h(a<=this.length))return this;var c=-1,e="";for(a-=this.length;++c<a;)e+=b;return this.$$cast(this+e.slice(0,a))},fa.$$arity=-2);b.def(H,"$lstrip",sa=function(){return this.replace(/^\s*/,"")},sa.$$arity=0);b.def(H,"$ascii_only?",V=function(){return this.match(/[ -~\n]*/)[0]===this},V.$$arity=0);b.def(H,"$match",ma=function(a,b){var c=ma.$$p,e=c||r,f;c&&(ma.$$p=null);c&&(ma.$$p=null);h(h(f=g(m,"String")["$==="](a))?f:a["$respond_to?"]("to_str"))&& -(a=g(m,"Regexp").$new(a.$to_str()));h(g(m,"Regexp")["$==="](a))||this.$raise(g(m,"TypeError"),"wrong argument type "+a.$class()+" (expected Regexp)");return B(a,"match",[this,b],e.$to_proc())},ma.$$arity=-2);b.def(H,"$match?",ca=function(a,b){var c;h(h(c=g(m,"String")["$==="](a))?c:a["$respond_to?"]("to_str"))&&(a=g(m,"Regexp").$new(a.$to_str()));h(g(m,"Regexp")["$==="](a))||this.$raise(g(m,"TypeError"),"wrong argument type "+a.$class()+" (expected Regexp)");return a["$match?"](this,b)},ca.$$arity= --2);b.def(H,"$next",Ma=function(){var a=this.length;if(0===a)return this.$$cast("");for(var b=this,c=this.search(/[a-zA-Z0-9]/),e,f;a--;){f=this.charCodeAt(a);if(48<=f&&57>=f||65<=f&&90>=f||97<=f&&122>=f)switch(f){case 57:e=!0;f=48;break;case 90:e=!0;f=65;break;case 122:e=!0;f=97;break;default:e=!1,f+=1}else-1===c?255===f?(e=!0,f=0):(e=!1,f+=1):e=!0;b=b.slice(0,a)+String.fromCharCode(f)+b.slice(a+1);if(e&&(0===a||a===c)){switch(f){case 65:break;case 97:break;default:f+=1}b=0===a?String.fromCharCode(f)+ -b:b.slice(0,a)+String.fromCharCode(f)+b.slice(a);e=!1}if(!e)break}return this.$$cast(b)},Ma.$$arity=0);b.def(H,"$oct",la=function(){var a=this;var b=8;if(/^\s*_/.test(a))return 0;a=a.replace(/^(\s*[+-]?)(0[bodx]?)(.+)$/i,function(a,c,e,f){switch(f.charAt(0)){case "+":case "-":return a;case "0":if("x"===f.charAt(1)&&"0x"===e)return a}switch(e){case "0b":b=2;break;case "0":case "0o":b=8;break;case "0d":b=10;break;case "0x":b=16}return c+f});a=parseInt(a.replace(/_(?!_)/g,""),b);return isNaN(a)?0:a}, -la.$$arity=0);b.def(H,"$ord",Oa=function(){return this.charCodeAt(0)},Oa.$$arity=0);b.def(H,"$partition",aa=function(a){if(a.$$is_regexp){var b=a.exec(this);null===b?b=-1:(g(m,"MatchData").$new(a,b),a=b[0],b=b.index)}else a=g(m,"Opal").$coerce_to(a,g(m,"String"),"to_str"),b=this.indexOf(a);return-1===b?[this,"",""]:[this.slice(0,b),this.slice(b,b+a.length),this.slice(b+a.length)]},aa.$$arity=1);b.def(H,"$reverse",na=function(){return this.split("").reverse().join("")},na.$$arity=0);b.def(H,"$rindex", -Ha=function(a,c){if(void 0===c)c=this.length;else if(c=g(m,"Opal").$coerce_to(c,g(m,"Integer"),"to_int"),0>c&&(c+=this.length,0>c))return r;if(a.$$is_regexp){var e=null;for(a=b.global_multiline_regexp(a);;){var f=a.exec(this);if(null===f||f.index>c)break;e=f;a.lastIndex=e.index+1}null===e?(u["~"]=r,c=-1):(g(m,"MatchData").$new(a,e),c=e.index)}else a=g(m,"Opal").$coerce_to(a,g(m,"String"),"to_str"),c=this.lastIndexOf(a,c);return-1===c?r:c},Ha.$$arity=-2);b.def(H,"$rjust",Wa=function(a,b){null==b&& -(b=" ");a=g(m,"Opal").$coerce_to(a,g(m,"Integer"),"to_int");b=g(m,"Opal").$coerce_to(b,g(m,"String"),"to_str").$to_s();h(b["$empty?"]())&&this.$raise(g(m,"ArgumentError"),"zero width padding");if(h(a<=this.length))return this;a=Math.floor(a-this.length);var c=Array(Math.floor(a/b.length)+1).join(b);return this.$$cast(c+b.slice(0,a-c.length)+this)},Wa.$$arity=-2);b.def(H,"$rpartition",Pa=function(a){var c;if(a.$$is_regexp){var e=null;for(c=b.global_multiline_regexp(a);;){var f=c.exec(this);if(null=== -f)break;e=f;c.lastIndex=e.index+1}null===e?e=-1:(g(m,"MatchData").$new(c,e),a=e[0],e=e.index)}else a=g(m,"Opal").$coerce_to(a,g(m,"String"),"to_str"),e=this.lastIndexOf(a);return-1===e?["","",this]:[this.slice(0,e),this.slice(e,e+a.length),this.slice(e+a.length)]},Pa.$$arity=1);b.def(H,"$rstrip",ab=function(){return this.replace(/[\s\u0000]*$/,"")},ab.$$arity=0);b.def(H,"$scan",ka=function(a){var c=ka.$$p,e=c||r;c&&(ka.$$p=null);c&&(ka.$$p=null);c=[];var f=r,d;a.$$is_regexp?a=b.global_multiline_regexp(a): -(a=g(m,"Opal").$coerce_to(a,g(m,"String"),"to_str"),a=new RegExp(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gm"));for(;null!=(d=a.exec(this));)f=g(m,"MatchData").$new(a,d),e===r?1==d.length?c.push(d[0]):c.push(f.$captures()):1==d.length?e(d[0]):e.call(this,f.$captures()),a.lastIndex===d.index&&(a.lastIndex+=1);u["~"]=f;return e!==r?this:c},ka.$$arity=1);b.alias(H,"size","length");b.alias(H,"slice","[]");b.def(H,"$split",wa=function(a,c){function e(){for(p=0;p<k.length;p++)k[p]=d.$$cast(k[p])}var f, -d=this;null==u[";"]&&(u[";"]=r);if(0===d.length)return[];if(void 0===c)c=0;else if(c=g(m,"Opal")["$coerce_to!"](c,g(m,"Integer"),"to_int"),1===c)return[d];if(void 0===a||a===r)a=h(f=u[";"])?f:" ";var k=[];f=d.toString();var w=0,p;a.$$is_regexp?a=b.global_multiline_regexp(a):(a=g(m,"Opal").$coerce_to(a,g(m,"String"),"to_str").$to_s()," "===a?(a=/\s+/gm,f=f.replace(/^\s+/,"")):a=new RegExp(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gm"));k=f.split(a);if(1===k.length&&k[0]===f)return[d.$$cast(k[0])];for(;-1!== -(p=k.indexOf(void 0));)k.splice(p,1);if(0===c){for(;""===k[k.length-1];)--k.length;e();return k}var l=a.exec(f);if(0>c){if(null!==l&&""===l[0]&&-1===a.source.indexOf("(?="))for(p=0,a=l.length;p<a;p++)k.push("");e();return k}if(null!==l&&""===l[0])return k.splice(c-1,k.length-1,k.slice(c-1).join("")),e(),k;if(c>=k.length)return e(),k;for(p=0;null!==l;){p++;w=a.lastIndex;if(p+1===c)break;l=a.exec(f)}k.splice(c-1,k.length-1,f.slice(w));e();return k},wa.$$arity=-1);b.def(H,"$squeeze",da=function(a){var c= -b.slice.call(arguments,0,arguments.length);if(0===c.length)return this.$$cast(this.replace(/(.)\1+/g,"$1"));c=O(c);return null===c?this:this.$$cast(this.replace(new RegExp("("+c+")\\1+","g"),"$1"))},da.$$arity=-1);b.def(H,"$start_with?",xa=function(a){var c=b.slice.call(arguments,0,arguments.length);for(var e=0,f=c.length;e<f;e++){var d=g(m,"Opal").$coerce_to(c[e],g(m,"String"),"to_str").$to_s();if(0===this.indexOf(d))return!0}return!1},xa.$$arity=-1);b.def(H,"$strip",Ca=function(){return this.replace(/^\s*/, -"").replace(/[\s\u0000]*$/,"")},Ca.$$arity=0);b.def(H,"$sub",ta=function(a,b){var c=ta.$$p,e=c||r,f=this;c&&(ta.$$p=null);c&&(ta.$$p=null);a.$$is_regexp||(a=g(m,"Opal").$coerce_to(a,g(m,"String"),"to_str"),a=new RegExp(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")));var d=a.exec(f);null===d?(u["~"]=r,a=f.toString()):(g(m,"MatchData").$new(a,d),void 0===b?(e===r&&f.$raise(g(m,"ArgumentError"),"wrong number of arguments (1 for 2)"),a=f.slice(0,d.index)+e(d[0])+f.slice(d.index+d[0].length)):b.$$is_hash?a= -f.slice(0,d.index)+b["$[]"](d[0]).$to_s()+f.slice(d.index+d[0].length):(b=g(m,"Opal").$coerce_to(b,g(m,"String"),"to_str"),b=b.replace(/([\\]+)([0-9+&`'])/g,function(a,b,c){if(0===b.length%2)return a;switch(c){case "+":for(a=d.length-1;0<a;a--)if(void 0!==d[a])return b.slice(1)+d[a];return"";case "&":return b.slice(1)+d[0];case "`":return b.slice(1)+f.slice(0,d.index);case "'":return b.slice(1)+f.slice(d.index+d[0].length);default:return b.slice(1)+(d[c]||"")}}).replace(/\\\\/g,"\\"),a=f.slice(0, -d.index)+b+f.slice(d.index+d[0].length)));return f.$$cast(a)},ta.$$arity=-2);b.alias(H,"succ","next");b.def(H,"$sum",Ia=function(a){null==a&&(a=16);a=g(m,"Opal").$coerce_to(a,g(m,"Integer"),"to_int");for(var b=0,c=this.length,e=0;e<c;e++)b+=this.charCodeAt(e);return 0>=a?b:b&Math.pow(2,a)-1},Ia.$$arity=-1);b.def(H,"$swapcase",Ga=function(){var a=this.replace(/([a-z]+)|([A-Z]+)/g,function(a,b,c){return b?a.toUpperCase():a.toLowerCase()});return this.constructor===String?a:this.$class().$new(a)},Ga.$$arity= -0);b.def(H,"$to_f",Ja=function(){if("_"===this.charAt(0))return 0;var a=parseFloat(this.replace(/_/g,""));return isNaN(a)||Infinity==a||-Infinity==a?0:a},Ja.$$arity=0);b.def(H,"$to_i",Xa=function(a){null==a&&(a=10);var b=this.toLowerCase(),c=g(m,"Opal").$coerce_to(a,g(m,"Integer"),"to_int");(1===c||0>c||36<c)&&this.$raise(g(m,"ArgumentError"),"invalid radix "+c);if(/^\s*_/.test(b))return 0;b=b.replace(/^(\s*[+-]?)(0[bodx]?)(.+)$/,function(a,b,e,f){switch(f.charAt(0)){case "+":case "-":return a;case "0":if("x"=== -f.charAt(1)&&"0x"===e&&(0===c||16===c))return a}switch(e){case "0b":if(0===c||2===c)return c=2,b+f;break;case "0":case "0o":if(0===c||8===c)return c=8,b+f;break;case "0d":if(0===c||10===c)return c=10,b+f;break;case "0x":if(0===c||16===c)return c=16,b+f}return a});a=parseInt(b.replace(/_(?!_)/g,""),c);return isNaN(a)?0:a},Xa.$$arity=-1);b.def(H,"$to_proc",Qa=function(){var a,c=r;Qa.$$p&&(Qa.$$p=null);c=y("$",this.valueOf());return B(this,"proc",[],(a=function(e){var f=a.$$s||this,d=a.$$p,k=d||r;d&& -(a.$$p=null);d=b.slice.call(arguments,0,arguments.length);0===d.length&&f.$raise(g(m,"ArgumentError"),"no receiver given");f=d[0];null==f&&(f=r);var w=f[c];if(!w)return f.$method_missing.apply(f,d);"function"===typeof k&&(w.$$p=k);return 1===d.length?w.call(f):w.apply(f,d.slice(1))},a.$$s=this,a.$$arity=-1,a))},Qa.$$arity=0);b.def(H,"$to_s",Ra=function(){return this.toString()},Ra.$$arity=0);b.alias(H,"to_str","to_s");b.alias(H,"to_sym","intern");b.def(H,"$tr",Da=function(a,b){a=g(m,"Opal").$coerce_to(a, -g(m,"String"),"to_str").$to_s();b=g(m,"Opal").$coerce_to(b,g(m,"String"),"to_str").$to_s();if(0==a.length||a===b)return this;var c={};var e=a.split("");var f=e.length,d=b.split(""),k=d.length;a=!1;var w=null;"^"===e[0]&&1<e.length&&(a=!0,e.shift(),w=d[k-1],--f);var p=[];var l=null;var Q=!1;for(b=0;b<f;b++){var q=e[b];if(null==l)l=q,p.push(q);else if("-"===q)"-"===l?(p.push("-"),p.push("-")):b==f-1?p.push("-"):Q=!0;else if(Q){l=l.charCodeAt(0);Q=q.charCodeAt(0);l>Q&&this.$raise(g(m,"ArgumentError"), -'invalid range "'+String.fromCharCode(l)+"-"+String.fromCharCode(Q)+'" in string transliteration');for(l+=1;l<Q;l++)p.push(String.fromCharCode(l));p.push(q);l=Q=null}else p.push(q)}e=p;f=e.length;if(a)for(b=0;b<f;b++)c[e[b]]=!0;else{if(0<k){p=[];l=null;Q=!1;for(b=0;b<k;b++)if(q=d[b],null==l)l=q,p.push(q);else if("-"===q)"-"===l?(p.push("-"),p.push("-")):b==k-1?p.push("-"):Q=!0;else if(Q){l=l.charCodeAt(0);Q=q.charCodeAt(0);l>Q&&this.$raise(g(m,"ArgumentError"),'invalid range "'+String.fromCharCode(l)+ -"-"+String.fromCharCode(Q)+'" in string transliteration');for(l+=1;l<Q;l++)p.push(String.fromCharCode(l));p.push(q);l=Q=null}else p.push(q);d=p;k=d.length}q=f-k;if(0<q)for(k=0<k?d[k-1]:"",b=0;b<q;b++)d.push(k);for(b=0;b<f;b++)c[e[b]]=d[b]}f="";b=0;for(e=this.length;b<e;b++)q=this.charAt(b),d=c[q],f=a?f+(null==d?w:q):f+(null!=d?d:q);return this.$$cast(f)},Da.$$arity=2);b.def(H,"$tr_s",Ka=function(a,b){a=g(m,"Opal").$coerce_to(a,g(m,"String"),"to_str").$to_s();b=g(m,"Opal").$coerce_to(b,g(m,"String"), -"to_str").$to_s();if(0==a.length)return this;var c={};var e=a.split("");var f=e.length,d=b.split(""),k=d.length;a=!1;var w=null;"^"===e[0]&&1<e.length&&(a=!0,e.shift(),w=d[k-1],--f);var p=[];var l=null;var q=!1;for(b=0;b<f;b++){var Q=e[b];if(null==l)l=Q,p.push(Q);else if("-"===Q)"-"===l?(p.push("-"),p.push("-")):b==f-1?p.push("-"):q=!0;else if(q){l=l.charCodeAt(0);q=Q.charCodeAt(0);l>q&&this.$raise(g(m,"ArgumentError"),'invalid range "'+String.fromCharCode(l)+"-"+String.fromCharCode(q)+'" in string transliteration'); -for(l+=1;l<q;l++)p.push(String.fromCharCode(l));p.push(Q);l=q=null}else p.push(Q)}e=p;f=e.length;if(a)for(b=0;b<f;b++)c[e[b]]=!0;else{if(0<k){p=[];q=!1;for(b=0;b<k;b++)if(Q=d[b],null==l)l=Q,p.push(Q);else if("-"===Q)b==k-1?p.push("-"):q=!0;else if(q){l=l.charCodeAt(0);q=Q.charCodeAt(0);l>q&&this.$raise(g(m,"ArgumentError"),'invalid range "'+String.fromCharCode(l)+"-"+String.fromCharCode(q)+'" in string transliteration');for(l+=1;l<q;l++)p.push(String.fromCharCode(l));p.push(Q);l=q=null}else p.push(Q); -d=p;k=d.length}Q=f-k;if(0<Q)for(k=0<k?d[k-1]:"",b=0;b<Q;b++)d.push(k);for(b=0;b<f;b++)c[e[b]]=d[b]}f="";d=null;b=0;for(e=this.length;b<e;b++)if(Q=this.charAt(b),k=c[Q],a)null==k?null==d&&(f+=w,d=!0):(f+=Q,d=null);else if(null!=k){if(null==d||d!==k)f+=k,d=k}else f+=Q,d=null;return this.$$cast(f)},Ka.$$arity=2);b.def(H,"$upcase",Ya=function(){return this.$$cast(this.toUpperCase())},Ya.$$arity=0);b.def(H,"$upto",Va=function(a,b){var c=Va.$$p,e=c||r;c&&(Va.$$p=null);c&&(Va.$$p=null);null==b&&(b=!1);if(e=== -r)return this.$enum_for("upto",a,b);a=g(m,"Opal").$coerce_to(a,g(m,"String"),"to_str");c=this.toString();if(1===c.length&&1===a.length)for(c=c.charCodeAt(0),a=a.charCodeAt(0);c<=a&&(!b||c!==a);)e(String.fromCharCode(c)),c+=1;else if(parseInt(c,10).toString()===c&&parseInt(a,10).toString()===a)for(c=parseInt(c,10),a=parseInt(a,10);c<=a&&(!b||c!==a);)e(c.toString()),c+=1;else for(;c.length<=a.length&&c<=a&&(!b||c!==a);)e(c),c=c.$succ();return this},Va.$$arity=-2);b.def(H,"$instance_variables",Za=function(){return[]}, -Za.$$arity=0);b.defs(H,"$_load",$a=function(a){var c=b.slice.call(arguments,0,arguments.length);return B(this,"new",b.to_a(c))},$a.$$arity=-1);b.def(H,"$unicode_normalize",bb=function(a){return this.toString()},bb.$$arity=-1);b.def(H,"$unicode_normalized?",Ua=function(a){return!0},Ua.$$arity=-1);b.def(H,"$unpack",w=function(a){return this.$raise("To use String#unpack, you must first require 'corelib/string/unpack'.")},w.$$arity=1);return(b.def(H,"$unpack1",Q=function(a){return this.$raise("To use String#unpack1, you must first require 'corelib/string/unpack'.")}, -Q.$$arity=1),r)&&"unpack1"})(x[0],String,x);return b.const_set(x[0],"Symbol",g(x,"String"))}; -Opal.modules["corelib/enumerable"]=function(b){function t(b,g){return"number"===typeof b&&"number"===typeof g?b>g:b["$>"](g)}function y(b,g){return"number"===typeof b&&"number"===typeof g?b+g:b["$+"](g)}function D(b,g){return"number"===typeof b&&"number"===typeof g?b-g:b["$-"](g)}function x(b,g){return"number"===typeof b&&"number"===typeof g?b<=g:b["$<="](g)}var r=[],g=b.nil,G=b.const_get_qualified,h=b.const_get_relative,B=b.module,u=b.truthy,n=b.send,P=b.falsy,O=b.hash2,I=b.lambda;b.add_stubs("$each $public_send $destructure $to_enum $enumerator_size $new $yield $raise $slice_when $! $enum_for $flatten $map $warn $proc $== $nil? $respond_to? $coerce_to! $> $* $coerce_to $try_convert $< $+ $- $ceil $/ $size $__send__ $length $<= $[] $push $<< $[]= $=== $inspect $<=> $first $reverse $sort $to_proc $compare $call $dup $to_a $sort! $map! $key? $values $zip".split(" ")); -return function(r,m){function H(a){0===a.length&&(a=[g]);1<a.length&&(a=[a]);return a}r=B(r,"Enumerable");var R=[r].concat(m),C,J,ha,Y,a,d,v,E,N,q,l,c,A,p,S,M,k,e,f,X,ba,ia,T,U,Z,z,ra,F,ua,ja,va,pa,qa,ea,Ba,Na,Fa,za,fa,sa,V,ma,ca,Ma,la,Oa,aa,na;b.def(r,"$all?",C=function(a){try{var c=C.$$p,e=c||g,f,d,k;c&&(C.$$p=null);c&&(C.$$p=null);u(void 0!==a)?n(this,"each",[],(f=function(c){var e=b.slice.call(arguments,0,arguments.length);e=H(e);if(u(n(a,"public_send",["==="].concat(b.to_a(e)))))return g;b.ret(!1)}, -f.$$s=this,f.$$arity=-1,f)):e!==g?n(this,"each",[],(d=function(a){var c=b.slice.call(arguments,0,arguments.length);if(u(b.yieldX(e,b.to_a(c))))return g;b.ret(!1)},d.$$s=this,d.$$arity=-1,d)):n(this,"each",[],(k=function(a){var c=b.slice.call(arguments,0,arguments.length);if(u(h(R,"Opal").$destructure(c)))return g;b.ret(!1)},k.$$s=this,k.$$arity=-1,k));return!0}catch(da){if(da===b.returner)return da.$v;throw da;}},C.$$arity=-1);b.def(r,"$any?",J=function(a){try{var c=J.$$p,e=c||g,f,d,k;c&&(J.$$p=null); -c&&(J.$$p=null);u(void 0!==a)?n(this,"each",[],(f=function(c){var e=b.slice.call(arguments,0,arguments.length);e=H(e);if(u(n(a,"public_send",["==="].concat(b.to_a(e)))))b.ret(!0);else return g},f.$$s=this,f.$$arity=-1,f)):e!==g?n(this,"each",[],(d=function(a){var c=b.slice.call(arguments,0,arguments.length);if(u(b.yieldX(e,b.to_a(c))))b.ret(!0);else return g},d.$$s=this,d.$$arity=-1,d)):n(this,"each",[],(k=function(a){var c=b.slice.call(arguments,0,arguments.length);if(u(h(R,"Opal").$destructure(c)))b.ret(!0); -else return g},k.$$s=this,k.$$arity=-1,k));return!1}catch(da){if(da===b.returner)return da.$v;throw da;}},J.$$arity=-1);b.def(r,"$chunk",ha=function(){var a=ha.$$p,c=a||g,e,f;a&&(ha.$$p=null);a&&(ha.$$p=null);return c===g?n(this,"to_enum",["chunk"],(e=function(){return(e.$$s||this).$enumerator_size()},e.$$s=this,e.$$arity=0,e)):n(G("::","Enumerator"),"new",[],(f=function(a){function e(){0<p.length&&a.$yield(k,p)}var d=f.$$s||this;null==a&&(a=g);var k=g,p=[];d.$each.$$p=function(a){var f=b.yield1(c, -a);f===g?(e(),p=[],k=g):(k===g||k===f?p.push(a):(e(),p=[a]),k=f)};d.$each();e()},f.$$s=this,f.$$arity=1,f))},ha.$$arity=0);b.def(r,"$chunk_while",Y=function(){var a=Y.$$p,c=a||g,e;a&&(Y.$$p=null);a&&(Y.$$p=null);c===g&&this.$raise(h(R,"ArgumentError"),"no block given");return n(this,"slice_when",[],(e=function(a,e){null==a&&(a=g);null==e&&(e=g);return b.yieldX(c,[a,e])["$!"]()},e.$$s=this,e.$$arity=2,e))},Y.$$arity=0);b.def(r,"$collect",a=function(){var c=a.$$p,e=c||g,f;c&&(a.$$p=null);c&&(a.$$p= -null);if(e===g)return n(this,"enum_for",["collect"],(f=function(){return(f.$$s||this).$enumerator_size()},f.$$s=this,f.$$arity=0,f));var d=[];this.$each.$$p=function(){var a=b.yieldX(e,arguments);d.push(a)};this.$each();return d},a.$$arity=0);b.def(r,"$collect_concat",d=function(){var a=d.$$p,c=a||g,e,f;a&&(d.$$p=null);a&&(d.$$p=null);return c===g?n(this,"enum_for",["collect_concat"],(e=function(){return(e.$$s||this).$enumerator_size()},e.$$s=this,e.$$arity=0,e)):n(this,"map",[],(f=function(a){null== -a&&(a=g);return b.yield1(c,a)},f.$$s=this,f.$$arity=1,f)).$flatten(1)},d.$$arity=0);b.def(r,"$count",v=function(a){var c=v.$$p,e=c||g,f,d,k,p=g;c&&(v.$$p=null);c&&(v.$$p=null);p=0;null!=a&&e!==g&&this.$warn("warning: given block not used");u(null!=a)?e=n(this,"proc",[],(f=function(c){var e=b.slice.call(arguments,0,arguments.length);return h(R,"Opal").$destructure(e)["$=="](a)},f.$$s=this,f.$$arity=-1,f)):u(e["$nil?"]())&&(e=n(this,"proc",[],(d=function(){return!0},d.$$s=this,d.$$arity=0,d)));n(this, -"each",[],(k=function(a){var c=b.slice.call(arguments,0,arguments.length);return u(b.yieldX(e,c))?p++:g},k.$$s=this,k.$$arity=-1,k));return p},v.$$arity=-1);b.def(r,"$cycle",E=function(a){var c=E.$$p,e=c||g,f;c&&(E.$$p=null);c&&(E.$$p=null);null==a&&(a=g);if(e===g)return n(this,"enum_for",["cycle",a],(f=function(){var b=f.$$s||this;if(u(a["$nil?"]()))return u(b["$respond_to?"]("size"))?G(h(R,"Float"),"INFINITY"):g;a=h(R,"Opal")["$coerce_to!"](a,h(R,"Integer"),"to_int");return u(t(a,0))?(b=b.$enumerator_size(), -"number"===typeof b&&"number"===typeof a?b*a:b["$*"](a)):0},f.$$s=this,f.$$arity=0,f));if(!u(a["$nil?"]())&&(a=h(R,"Opal")["$coerce_to!"](a,h(R,"Integer"),"to_int"),u(0>=a)))return g;var d=[],k;this.$each.$$p=function(){var a=h(R,"Opal").$destructure(arguments);b.yield1(e,a);d.push(a)};this.$each();if(0===d.length)return g;if(a===g)for(;;)for(c=0,k=d.length;c<k;c++)b.yield1(e,d[c]);else for(;1<a;){c=0;for(k=d.length;c<k;c++)b.yield1(e,d[c]);a--}},E.$$arity=-1);b.def(r,"$detect",N=function(a){try{var c= -N.$$p,e=c||g,f;c&&(N.$$p=null);c&&(N.$$p=null);if(e===g)return this.$enum_for("detect",a);n(this,"each",[],(f=function(a){var c=b.slice.call(arguments,0,arguments.length);c=h(R,"Opal").$destructure(c);if(u(b.yield1(e,c)))b.ret(c);else return g},f.$$s=this,f.$$arity=-1,f));return void 0!==a?"function"===typeof a?a():a:g}catch(ka){if(ka===b.returner)return ka.$v;throw ka;}},N.$$arity=-1);b.def(r,"$drop",q=function(a){a=h(R,"Opal").$coerce_to(a,h(R,"Integer"),"to_int");u(0>a)&&this.$raise(h(R,"ArgumentError"), -"attempt to drop negative size");var b=[],c=0;this.$each.$$p=function(){a<=c&&b.push(h(R,"Opal").$destructure(arguments));c++};this.$each();return b},q.$$arity=1);b.def(r,"$drop_while",l=function(){var a=l.$$p,c=a||g;a&&(l.$$p=null);a&&(l.$$p=null);if(c===g)return this.$enum_for("drop_while");var e=[],f=!0;this.$each.$$p=function(){var a=h(R,"Opal").$destructure(arguments);if(f){var d=b.yield1(c,a);P(d)&&(f=!1,e.push(a))}else e.push(a)};this.$each();return e},l.$$arity=0);b.def(r,"$each_cons",c=function(a){var e= -c.$$p,f=e||g,d;e&&(c.$$p=null);e&&(c.$$p=null);u(1!=arguments.length)&&this.$raise(h(R,"ArgumentError"),"wrong number of arguments ("+arguments.length+" for 1)");a=h(R,"Opal").$try_convert(a,h(R,"Integer"),"to_int");u(0>=a)&&this.$raise(h(R,"ArgumentError"),"invalid size");if(f===g)return n(this,"enum_for",["each_cons",a],(d=function(){var b;var c=(d.$$s||this).$enumerator_size();return u(c["$nil?"]())?g:u(u(b=c["$=="](0))?b:"number"===typeof c&&"number"===typeof a?c<a:c["$<"](a))?0:y(D(c,a),1)}, -d.$$s=this,d.$$arity=0,d));var k=[];this.$each.$$p=function(){var c=h(R,"Opal").$destructure(arguments);k.push(c);k.length>a&&k.shift();k.length==a&&b.yield1(f,k.slice(0,a))};this.$each();return g},c.$$arity=1);b.def(r,"$each_entry",A=function(a){var c=A.$$p,e=c||g,f;c&&(A.$$p=null);c&&(A.$$p=null);c=b.slice.call(arguments,0,arguments.length);if(e===g)return n(this,"to_enum",["each_entry"].concat(b.to_a(c)),(f=function(){return(f.$$s||this).$enumerator_size()},f.$$s=this,f.$$arity=0,f));this.$each.$$p= -function(){var a=h(R,"Opal").$destructure(arguments);b.yield1(e,a)};this.$each.apply(this,c);return this},A.$$arity=-1);b.def(r,"$each_slice",p=function(a){var c=p.$$p,e=c||g,f;c&&(p.$$p=null);c&&(p.$$p=null);a=h(R,"Opal").$coerce_to(a,h(R,"Integer"),"to_int");u(0>=a)&&this.$raise(h(R,"ArgumentError"),"invalid slice size");if(e===g)return n(this,"enum_for",["each_slice",a],(f=function(){var b=f.$$s||this;return u(b["$respond_to?"]("size"))?(b=b.$size(),("number"===typeof b&&"number"===typeof a?b/ -a:b["$/"](a)).$ceil()):g},f.$$s=this,f.$$arity=0,f));var d=[];this.$each.$$p=function(){var c=h(R,"Opal").$destructure(arguments);d.push(c);d.length===a&&(b.yield1(e,d),d=[])};this.$each();0<d.length&&b.yield1(e,d);return g},p.$$arity=1);b.def(r,"$each_with_index",S=function(a){var c=S.$$p,e=c||g,f;c&&(S.$$p=null);c&&(S.$$p=null);c=b.slice.call(arguments,0,arguments.length);if(e===g)return n(this,"enum_for",["each_with_index"].concat(b.to_a(c)),(f=function(){return(f.$$s||this).$enumerator_size()}, -f.$$s=this,f.$$arity=0,f));var d=0;this.$each.$$p=function(){var a=h(R,"Opal").$destructure(arguments);e(a,d);d++};this.$each.apply(this,c);return this},S.$$arity=-1);b.def(r,"$each_with_object",M=function(a){var b=M.$$p,c=b||g,e;b&&(M.$$p=null);b&&(M.$$p=null);if(c===g)return n(this,"enum_for",["each_with_object",a],(e=function(){return(e.$$s||this).$enumerator_size()},e.$$s=this,e.$$arity=0,e));this.$each.$$p=function(){var b=h(R,"Opal").$destructure(arguments);c(b,a)};this.$each();return a},M.$$arity= -1);b.def(r,"$entries",k=function(a){var c=b.slice.call(arguments,0,arguments.length);var e=[];this.$each.$$p=function(){e.push(h(R,"Opal").$destructure(arguments))};this.$each.apply(this,c);return e},k.$$arity=-1);b.alias(r,"find","detect");b.def(r,"$find_all",e=function(){var a=e.$$p,c=a||g,f;a&&(e.$$p=null);a&&(e.$$p=null);if(c===g)return n(this,"enum_for",["find_all"],(f=function(){return(f.$$s||this).$enumerator_size()},f.$$s=this,f.$$arity=0,f));var d=[];this.$each.$$p=function(){var a=h(R,"Opal").$destructure(arguments), -e=b.yield1(c,a);u(e)&&d.push(a)};this.$each();return d},e.$$arity=0);b.def(r,"$find_index",f=function(a){try{var c=f.$$p,e=c||g,d,k,p=g;c&&(f.$$p=null);c&&(f.$$p=null);if(u(void 0===a&&e===g))return this.$enum_for("find_index");null!=a&&e!==g&&this.$warn("warning: given block not used");p=0;u(null!=a)?n(this,"each",[],(d=function(c){var e=b.slice.call(arguments,0,arguments.length);h(R,"Opal").$destructure(e)["$=="](a)&&b.ret(p);return p+=1},d.$$s=this,d.$$arity=-1,d)):n(this,"each",[],(k=function(a){var c= -b.slice.call(arguments,0,arguments.length);u(b.yieldX(e,b.to_a(c)))&&b.ret(p);return p+=1},k.$$s=this,k.$$arity=-1,k));return g}catch(da){if(da===b.returner)return da.$v;throw da;}},f.$$arity=-1);b.def(r,"$first",X=function(a){try{var c,e,f=g,d=g;if(u(void 0===a))return n(this,"each",[],(c=function(a){null==a&&(a=g);b.ret(a)},c.$$s=this,c.$$arity=1,c));f=[];a=h(R,"Opal").$coerce_to(a,h(R,"Integer"),"to_int");u(0>a)&&this.$raise(h(R,"ArgumentError"),"attempt to take negative size");if(u(0==a))return[]; -d=0;n(this,"each",[],(e=function(c){var e=b.slice.call(arguments,0,arguments.length);f.push(h(R,"Opal").$destructure(e));if(u(a<=++d))b.ret(f);else return g},e.$$s=this,e.$$arity=-1,e));return f}catch(wa){if(wa===b.returner)return wa.$v;throw wa;}},X.$$arity=-1);b.alias(r,"flat_map","collect_concat");b.def(r,"$grep",ba=function(a){var c=ba.$$p,e=c||g,f,d=g;c&&(ba.$$p=null);c&&(ba.$$p=null);d=[];n(this,"each",[],(f=function(c){var f=b.slice.call(arguments,0,arguments.length);var k=H(f);if(!u(n(a,"__send__", -["==="].concat(b.to_a(k)))))return g;e!==g?(u(t(f.$length(),1))&&(f=[f]),f=b.yieldX(e,b.to_a(f))):u(x(f.$length(),1))&&(f=f["$[]"](0));return d.$push(f)},f.$$s=this,f.$$arity=-1,f));return d},ba.$$arity=1);b.def(r,"$grep_v",ia=function(a){var c=ia.$$p,e=c||g,f,d=g;c&&(ia.$$p=null);c&&(ia.$$p=null);d=[];n(this,"each",[],(f=function(c){var f=b.slice.call(arguments,0,arguments.length);var k=H(f);if(u(n(a,"__send__",["==="].concat(b.to_a(k)))))return g;e!==g?(u(t(f.$length(),1))&&(f=[f]),f=b.yieldX(e, -b.to_a(f))):u(x(f.$length(),1))&&(f=f["$[]"](0));return d.$push(f)},f.$$s=this,f.$$arity=-1,f));return d},ia.$$arity=1);b.def(r,"$group_by",T=function(){var a=T.$$p,c=a||g,e,f,d=g,k=g;a&&(T.$$p=null);a&&(T.$$p=null);if(c===g)return n(this,"enum_for",["group_by"],(e=function(){return(e.$$s||this).$enumerator_size()},e.$$s=this,e.$$arity=0,e));d=O([],{});this.$each.$$p=function(){var a=h(R,"Opal").$destructure(arguments),e=b.yield1(c,a);(u(f=d["$[]"](e))?f:(k=[e,[]],n(d,"[]=",b.to_a(k)),k[D(k.length, -1)]))["$<<"](a)};this.$each();return d},T.$$arity=0);b.def(r,"$include?",U=function(a){try{var c;n(this,"each",[],(c=function(c){var e=b.slice.call(arguments,0,arguments.length);if(h(R,"Opal").$destructure(e)["$=="](a))b.ret(!0);else return g},c.$$s=this,c.$$arity=-1,c));return!1}catch(Pa){if(Pa===b.returner)return Pa.$v;throw Pa;}},U.$$arity=1);b.def(r,"$inject",Z=function(a,c){var e=Z.$$p,f=e||g;e&&(Z.$$p=null);e&&(Z.$$p=null);var d=a;f!==g&&void 0===c?this.$each.$$p=function(){var a=h(R,"Opal").$destructure(arguments); -void 0!==d&&(a=b.yieldX(f,[d,a]));d=a}:(void 0===c&&(h(R,"Symbol")["$==="](a)||this.$raise(h(R,"TypeError"),""+a.$inspect()+" is not a Symbol"),c=a,d=void 0),this.$each.$$p=function(){var a=h(R,"Opal").$destructure(arguments);d=void 0===d?a:d.$__send__(c,a)});this.$each();return void 0==d?g:d},Z.$$arity=-1);b.def(r,"$lazy",z=function(){var a;return n(G(h(R,"Enumerator"),"Lazy"),"new",[this,this.$enumerator_size()],(a=function(a,c){null==a&&(a=g);var e=b.slice.call(arguments,1,arguments.length);return n(a, -"yield",b.to_a(e))},a.$$s=this,a.$$arity=-2,a))},z.$$arity=0);b.def(r,"$enumerator_size",ra=function(){return u(this["$respond_to?"]("size"))?this.$size():g},ra.$$arity=0);b.alias(r,"map","collect");b.def(r,"$max",F=function(a){var c=F.$$p,e=c||g,f=this;c&&(F.$$p=null);c&&(F.$$p=null);if(void 0===a||a===g){var d,k;f.$each.$$p=function(){var a=h(R,"Opal").$destructure(arguments);void 0===d?d=a:(k=e!==g?b.yieldX(e,[a,d]):a["$<=>"](d),k===g&&f.$raise(h(R,"ArgumentError"),"comparison failed"),0<k&&(d= -a))};f.$each();return void 0===d?g:d}a=h(R,"Opal").$coerce_to(a,h(R,"Integer"),"to_int");return n(f,"sort",[],e.$to_proc()).$reverse().$first(a)},F.$$arity=-1);b.def(r,"$max_by",ua=function(){var a=ua.$$p,c=a||g,e;a&&(ua.$$p=null);a&&(ua.$$p=null);if(!u(c))return n(this,"enum_for",["max_by"],(e=function(){return(e.$$s||this).$enumerator_size()},e.$$s=this,e.$$arity=0,e));var f,d;this.$each.$$p=function(){var a=h(R,"Opal").$destructure(arguments),e=b.yield1(c,a);void 0===f?(f=a,d=e):0<e["$<=>"](d)&& -(f=a,d=e)};this.$each();return void 0===f?g:f},ua.$$arity=0);b.alias(r,"member?","include?");b.def(r,"$min",ja=function(){var a=ja.$$p,b=a||g,c=this;a&&(ja.$$p=null);a&&(ja.$$p=null);var e;c.$each.$$p=b!==g?function(){var a=h(R,"Opal").$destructure(arguments);if(void 0===e)e=a;else{var f=b(a,e);f===g&&c.$raise(h(R,"ArgumentError"),"comparison failed");0>f&&(e=a)}}:function(){var a=h(R,"Opal").$destructure(arguments);void 0===e?e=a:0>h(R,"Opal").$compare(a,e)&&(e=a)};c.$each();return void 0===e?g: -e},ja.$$arity=0);b.def(r,"$min_by",va=function(){var a=va.$$p,c=a||g,e;a&&(va.$$p=null);a&&(va.$$p=null);if(!u(c))return n(this,"enum_for",["min_by"],(e=function(){return(e.$$s||this).$enumerator_size()},e.$$s=this,e.$$arity=0,e));var f,d;this.$each.$$p=function(){var a=h(R,"Opal").$destructure(arguments),e=b.yield1(c,a);void 0===f?(f=a,d=e):0>e["$<=>"](d)&&(f=a,d=e)};this.$each();return void 0===f?g:f},va.$$arity=0);b.def(r,"$minmax",pa=function(){var a=pa.$$p,b=a||g,c,e,f=this;a&&(pa.$$p=null); -a&&(pa.$$p=null);b=u(c=b)?c:n(f,"proc",[],(e=function(a,b){null==a&&(a=g);null==b&&(b=g);return a["$<=>"](b)},e.$$s=f,e.$$arity=2,e));var d=g,k=g,p=!0;f.$each.$$p=function(){var a=h(R,"Opal").$destructure(arguments);if(p)d=k=a,p=!1;else{var c=b.$call(d,a);c===g?f.$raise(h(R,"ArgumentError"),"comparison failed"):0<c&&(d=a);c=b.$call(k,a);c===g?f.$raise(h(R,"ArgumentError"),"comparison failed"):0>c&&(k=a)}};f.$each();return[d,k]},pa.$$arity=0);b.def(r,"$minmax_by",qa=function(){var a=qa.$$p;a&&(qa.$$p= -null);a&&(qa.$$p=null);return this.$raise(h(R,"NotImplementedError"))},qa.$$arity=0);b.def(r,"$none?",ea=function(a){try{var c=ea.$$p,e=c||g,f,d,k;c&&(ea.$$p=null);c&&(ea.$$p=null);u(void 0!==a)?n(this,"each",[],(f=function(c){var e=b.slice.call(arguments,0,arguments.length);e=H(e);if(u(n(a,"public_send",["==="].concat(b.to_a(e)))))b.ret(!1);else return g},f.$$s=this,f.$$arity=-1,f)):e!==g?n(this,"each",[],(d=function(a){var c=b.slice.call(arguments,0,arguments.length);if(u(b.yieldX(e,b.to_a(c))))b.ret(!1); -else return g},d.$$s=this,d.$$arity=-1,d)):n(this,"each",[],(k=function(a){var c=b.slice.call(arguments,0,arguments.length);c=h(R,"Opal").$destructure(c);if(u(c))b.ret(!1);else return g},k.$$s=this,k.$$arity=-1,k));return!0}catch(da){if(da===b.returner)return da.$v;throw da;}},ea.$$arity=-1);b.def(r,"$one?",Ba=function(a){try{var c=Ba.$$p,e=c||g,f,d,k,p=g;c&&(Ba.$$p=null);c&&(Ba.$$p=null);p=0;u(void 0!==a)?n(this,"each",[],(f=function(c){var e=b.slice.call(arguments,0,arguments.length);e=H(e);if(u(n(a, -"public_send",["==="].concat(b.to_a(e)))))if(p=y(p,1),u(t(p,1)))b.ret(!1);else return g;else return g},f.$$s=this,f.$$arity=-1,f)):e!==g?n(this,"each",[],(d=function(a){var c=b.slice.call(arguments,0,arguments.length);if(!u(b.yieldX(e,b.to_a(c))))return g;p=y(p,1);if(u(t(p,1)))b.ret(!1);else return g},d.$$s=this,d.$$arity=-1,d)):n(this,"each",[],(k=function(a){var c=b.slice.call(arguments,0,arguments.length);if(!u(h(R,"Opal").$destructure(c)))return g;p=y(p,1);if(u(t(p,1)))b.ret(!1);else return g}, -k.$$s=this,k.$$arity=-1,k));return p["$=="](1)}catch(xa){if(xa===b.returner)return xa.$v;throw xa;}},Ba.$$arity=-1);b.def(r,"$partition",Na=function(){var a=Na.$$p,c=a||g,e;a&&(Na.$$p=null);a&&(Na.$$p=null);if(c===g)return n(this,"enum_for",["partition"],(e=function(){return(e.$$s||this).$enumerator_size()},e.$$s=this,e.$$arity=0,e));var f=[],d=[];this.$each.$$p=function(){var a=h(R,"Opal").$destructure(arguments),e=b.yield1(c,a);u(e)?f.push(a):d.push(a)};this.$each();return[f,d]},Na.$$arity=0);b.alias(r, -"reduce","inject");b.def(r,"$reject",Fa=function(){var a=Fa.$$p,c=a||g,e;a&&(Fa.$$p=null);a&&(Fa.$$p=null);if(c===g)return n(this,"enum_for",["reject"],(e=function(){return(e.$$s||this).$enumerator_size()},e.$$s=this,e.$$arity=0,e));var f=[];this.$each.$$p=function(){var a=h(R,"Opal").$destructure(arguments),e=b.yield1(c,a);P(e)&&f.push(a)};this.$each();return f},Fa.$$arity=0);b.def(r,"$reverse_each",za=function(){var a=za.$$p,c=a||g,e;a&&(za.$$p=null);a&&(za.$$p=null);if(c===g)return n(this,"enum_for", -["reverse_each"],(e=function(){return(e.$$s||this).$enumerator_size()},e.$$s=this,e.$$arity=0,e));var f=[];this.$each.$$p=function(){f.push(arguments)};this.$each();for(a=f.length-1;0<=a;a--)b.yieldX(c,f[a]);return f},za.$$arity=0);b.alias(r,"select","find_all");b.def(r,"$slice_before",fa=function(a){var c=fa.$$p,e=c||g,f;c&&(fa.$$p=null);c&&(fa.$$p=null);u(void 0===a&&e===g)&&this.$raise(h(R,"ArgumentError"),"both pattern and block are given");u(void 0!==a&&e!==g||1<arguments.length)&&this.$raise(h(R, -"ArgumentError"),"wrong number of arguments ("+arguments.length+" expected 1)");return n(h(R,"Enumerator"),"new",[],(f=function(c){var d=f.$$s||this;null==c&&(c=g);var k=[];d.$each.$$p=e!==g?void 0===a?function(){var a=h(R,"Opal").$destructure(arguments),f=b.yield1(e,a);u(f)&&0<k.length&&(c["$<<"](k),k=[]);k.push(a)}:function(){var b=h(R,"Opal").$destructure(arguments),f=e(b,a.$dup());u(f)&&0<k.length&&(c["$<<"](k),k=[]);k.push(b)}:function(){var b=h(R,"Opal").$destructure(arguments),e=a["$==="](b); -u(e)&&0<k.length&&(c["$<<"](k),k=[]);k.push(b)};d.$each();if(0<k.length)c["$<<"](k)},f.$$s=this,f.$$arity=1,f))},fa.$$arity=-1);b.def(r,"$slice_after",sa=function(a){var c=sa.$$p,e=c||g,f,d;c&&(sa.$$p=null);c&&(sa.$$p=null);u(void 0===a&&e===g)&&this.$raise(h(R,"ArgumentError"),"both pattern and block are given");u(void 0!==a&&e!==g||1<arguments.length)&&this.$raise(h(R,"ArgumentError"),"wrong number of arguments ("+arguments.length+" expected 1)");u(void 0!==a)&&(e=n(this,"proc",[],(f=function(b){null== -b&&(b=g);return a["$==="](b)},f.$$s=this,f.$$arity=1,f)));return n(h(R,"Enumerator"),"new",[],(d=function(a){var c=d.$$s||this;null==a&&(a=g);var f;c.$each.$$p=function(){var c=h(R,"Opal").$destructure(arguments),d=b.yield1(e,c);null==f&&(f=[]);u(d)?(f.push(c),a.$yield(f),f=null):f.push(c)};c.$each();null!=f&&a.$yield(f)},d.$$s=this,d.$$arity=1,d))},sa.$$arity=-1);b.def(r,"$slice_when",V=function(){var a=V.$$p,c=a||g,e;a&&(V.$$p=null);a&&(V.$$p=null);c===g&&this.$raise(h(R,"ArgumentError"),"wrong number of arguments (0 for 1)"); -return n(h(R,"Enumerator"),"new",[],(e=function(a){var f=e.$$s||this;null==a&&(a=g);var d=g,k=g;f.$each_cons.$$p=function(){var e=h(R,"Opal").$destructure(arguments),f=e[0];e=e[1];var p=b.yieldX(c,[f,e]);k=e;d===g&&(d=[]);u(p)?(d.push(f),a.$yield(d),d=[]):d.push(f)};f.$each_cons(2);d!==g&&(d.push(k),a.$yield(d))},e.$$s=this,e.$$arity=1,e))},V.$$arity=0);b.def(r,"$sort",ma=function(){var a=ma.$$p,b=a||g,c,e=g;a&&(ma.$$p=null);a&&(ma.$$p=null);e=this.$to_a();b===g&&(b=I((c=function(a,b){null==a&&(a= -g);null==b&&(b=g);return a["$<=>"](b)},c.$$s=this,c.$$arity=2,c)));return n(e,"sort",[],b.$to_proc())},ma.$$arity=0);b.def(r,"$sort_by",ca=function(){var a=ca.$$p,c=a||g,e,f,d,k,p=g;a&&(ca.$$p=null);a&&(ca.$$p=null);if(c===g)return n(this,"enum_for",["sort_by"],(e=function(){return(e.$$s||this).$enumerator_size()},e.$$s=this,e.$$arity=0,e));p=n(this,"map",[],(f=function(){var a=h(R,"Opal").$destructure(arguments);return[b.yield1(c,a),a]},f.$$s=this,f.$$arity=0,f));n(p,"sort!",[],(d=function(a,b){null== -a&&(a=g);null==b&&(b=g);return a[0]["$<=>"](b[0])},d.$$s=this,d.$$arity=2,d));return n(p,"map!",[],(k=function(a){null==a&&(a=g);return a[1]},k.$$s=this,k.$$arity=1,k))},ca.$$arity=0);b.def(r,"$sum",Ma=function(a){var c,e=Ma.$$p,f=e||g,d=g;e&&(Ma.$$p=null);null==a&&(a=0);d=a;n(this,"each",[],(c=function(a){var c=b.slice.call(arguments,0,arguments.length);c=f!==g?b.yieldX(f,b.to_a(c)):h(R,"Opal").$destructure(c);return d=y(d,c)},c.$$s=this,c.$$arity=-1,c));return d},Ma.$$arity=-1);b.def(r,"$take", -la=function(a){return this.$first(a)},la.$$arity=1);b.def(r,"$take_while",Oa=function(){try{var a=Oa.$$p,c=a||g,e,f=g;a&&(Oa.$$p=null);a&&(Oa.$$p=null);if(!u(c))return this.$enum_for("take_while");f=[];return n(this,"each",[],(e=function(a){var e=b.slice.call(arguments,0,arguments.length);e=h(R,"Opal").$destructure(e);u(b.yield1(c,e))||b.ret(f);return f.push(e)},e.$$s=this,e.$$arity=-1,e))}catch(ka){if(ka===b.returner)return ka.$v;throw ka;}},Oa.$$arity=0);b.def(r,"$uniq",aa=function(){var a=aa.$$p, -c=a||g,e,f=g;a&&(aa.$$p=null);a&&(aa.$$p=null);f=O([],{});n(this,"each",[],(e=function(a){var e=b.slice.call(arguments,0,arguments.length);e=h(R,"Opal").$destructure(e);var d=c!==g?b.yield1(c,e):e;if(u(f["$key?"](d)))return g;e=[d,e];n(f,"[]=",b.to_a(e));return e[D(e.length,1)]},e.$$s=this,e.$$arity=-1,e));return f.$values()},aa.$$arity=0);b.alias(r,"to_a","entries");b.def(r,"$zip",na=function(a){var c=na.$$p;c&&(na.$$p=null);c&&(na.$$p=null);c=b.slice.call(arguments,0,arguments.length);return n(this.$to_a(), -"zip",b.to_a(c))},na.$$arity=-1)}(r[0],r)}; -Opal.modules["corelib/enumerator"]=function(b){function t(b,g){return"number"===typeof b&&"number"===typeof g?b+g:b["$+"](g)}function y(b,g){return"number"===typeof b&&"number"===typeof g?b<g:b["$<"](g)}var D=b.top,x=[],r=b.nil,g=b.const_get_relative,G=b.breaker,h=b.slice,B=b.klass,u=b.truthy,n=b.send,P=b.falsy;b.add_stubs("$require $include $allocate $new $to_proc $coerce_to $nil? $empty? $+ $class $__send__ $=== $call $enum_for $size $destructure $inspect $any? $[] $raise $yield $each $enumerator_size $respond_to? $try_convert $< $for".split(" "));D.$require("corelib/enumerable"); -return function(x,$super,D){x=B(x,$super,"Enumerator");var m=[x].concat(D),O,H,C,J,ha,Y;x.$$prototype.size=x.$$prototype.args=x.$$prototype.object=x.$$prototype.method=r;x.$include(g(m,"Enumerable"));x.$$prototype.$$is_enumerator=!0;b.defs(x,"$for",O=function(a,d,g){var v=O.$$p,m=v||r;v&&(O.$$p=null);v&&(O.$$p=null);v=b.slice.call(arguments,1,arguments.length);if(0<v.length){var q=v[0];v.splice(0,1)}null==q&&(q="each");var l=this.$allocate();l.object=a;l.size=m;l.method=q;l.args=v;return l},O.$$arity= --2);b.def(x,"$initialize",H=function(a){var d=H.$$p,v=d||r;d&&(H.$$p=null);d&&(H.$$p=null);b.slice.call(arguments,0,arguments.length);if(u(v))return this.object=n(g(m,"Generator"),"new",[],v.$to_proc()),this.method="each",this.args=[],this.size=arguments[0]||r,u(this.size)?this.size=g(m,"Opal").$coerce_to(this.size,g(m,"Integer"),"to_int"):r;this.object=arguments[0];this.method=arguments[1]||"each";this.args=h.call(arguments,2);return this.size=r},H.$$arity=-1);b.def(x,"$each",C=function(a){var d= -C.$$p,g=d||r,m;d&&(C.$$p=null);d&&(C.$$p=null);d=b.slice.call(arguments,0,arguments.length);if(u(u(m=g["$nil?"]())?d["$empty?"]():m))return this;d=t(this.args,d);return u(g["$nil?"]())?n(this.$class(),"new",[this.object,this.method].concat(b.to_a(d))):n(this.object,"__send__",[this.method].concat(b.to_a(d)),g.$to_proc())},C.$$arity=-1);b.def(x,"$size",J=function(){return u(g(m,"Proc")["$==="](this.size))?n(this.size,"call",b.to_a(this.args)):this.size},J.$$arity=0);b.def(x,"$with_index",ha=function(a){var b= -ha.$$p,v=b||r,h;b&&(ha.$$p=null);b&&(ha.$$p=null);null==a&&(a=0);a=u(a)?g(m,"Opal").$coerce_to(a,g(m,"Integer"),"to_int"):0;if(!u(v))return n(this,"enum_for",["with_index",a],(h=function(){return(h.$$s||this).$size()},h.$$s=this,h.$$arity=0,h));var N=a;this.$each.$$p=function(){var a=g(m,"Opal").$destructure(arguments);a=v(a,N);N++;return a};return this.$each()},ha.$$arity=-1);b.alias(x,"with_object","each_with_object");b.def(x,"$inspect",Y=function(){var a="#<"+this.$class()+": "+this.object.$inspect()+ -":"+this.method;u(this.args["$any?"]())&&(a=t(a,"("+this.args.$inspect()["$[]"](g(m,"Range").$new(1,-2))+")"));return t(a,">")},Y.$$arity=0);(function(a,$super,v){a=B(a,$super,"Generator");var m=[a].concat(v),h,q;a.$$prototype.block=r;a.$include(g(m,"Enumerable"));b.def(a,"$initialize",h=function(){var a=h.$$p,b=a||r;a&&(h.$$p=null);a&&(h.$$p=null);u(b)||this.$raise(g(m,"LocalJumpError"),"no block given");return this.block=b},h.$$arity=0);return(b.def(a,"$each",q=function(a){var c=q.$$p,l=c||r;c&& -(q.$$p=null);c&&(q.$$p=null);c=b.slice.call(arguments,0,arguments.length);l=n(g(m,"Yielder"),"new",[],l.$to_proc());try{c.unshift(l),b.yieldX(this.block,c)}catch(p){if(p===G)return G.$v;throw p;}return this},q.$$arity=-1),r)&&"each"})(m[0],null,m);(function(a,$super,g){a=B(a,$super,"Yielder");[a].concat(g);var v,m,q;a.$$prototype.block=r;b.def(a,"$initialize",v=function(){var a=v.$$p,b=a||r;a&&(v.$$p=null);a&&(v.$$p=null);return this.block=b},v.$$arity=0);b.def(a,"$yield",m=function(a){var c=b.slice.call(arguments, -0,arguments.length);c=b.yieldX(this.block,c);if(c===G)throw G;return c},m.$$arity=-1);return(b.def(a,"$<<",q=function(a){var c=b.slice.call(arguments,0,arguments.length);n(this,"yield",b.to_a(c));return this},q.$$arity=-1),r)&&"<<"})(m[0],null,m);return function(a,$super,v){a=B(a,$super,"Lazy");var m=[a].concat(v),h,q,l,c,A,p,S,M,k,e,f,X,ba;a.$$prototype.enumerator=r;(function(a,$super,b){[B(a,$super,"StopLazyError")].concat(b);return r})(m[0],g(m,"Exception"),m);b.def(a,"$initialize",h=function(a, -c){var e=h.$$p,f=e||r,k;e&&(h.$$p=null);e&&(h.$$p=null);null==c&&(c=r);f===r&&this.$raise(g(m,"ArgumentError"),"tried to call lazy new without a block");this.enumerator=a;return n(this,b.find_super_dispatcher(this,"initialize",h,!1),[c],(k=function(c,e){var p=k.$$s||this,l;null==c&&(c=r);var q=b.slice.call(arguments,1,arguments.length);try{return n(a,"each",b.to_a(q),(l=function(a){var e=b.slice.call(arguments,0,arguments.length);e.unshift(c);b.yieldX(f,e)},l.$$s=p,l.$$arity=-1,l))}catch(pa){if(b.rescue(pa, -[g(m,"Exception")]))try{return r}finally{b.pop_exception()}else throw pa;}},k.$$s=this,k.$$arity=-2,k))},h.$$arity=-2);b.alias(a,"force","to_a");b.def(a,"$lazy",q=function(){return this},q.$$arity=0);b.def(a,"$collect",l=function(){var a=l.$$p,c=a||r,e;a&&(l.$$p=null);a&&(l.$$p=null);u(c)||this.$raise(g(m,"ArgumentError"),"tried to call lazy map without a block");return n(g(m,"Lazy"),"new",[this,this.$enumerator_size()],(e=function(a,e){null==a&&(a=r);var f=b.slice.call(arguments,1,arguments.length); -f=b.yieldX(c,f);a.$yield(f)},e.$$s=this,e.$$arity=-2,e))},l.$$arity=0);b.def(a,"$collect_concat",c=function(){var a=c.$$p,e=a||r,f;a&&(c.$$p=null);a&&(c.$$p=null);u(e)||this.$raise(g(m,"ArgumentError"),"tried to call lazy map without a block");return n(g(m,"Lazy"),"new",[this,r],(f=function(a,c){var k=f.$$s||this,p,l;null==a&&(a=r);var q=b.slice.call(arguments,1,arguments.length);q=b.yieldX(e,q);q["$respond_to?"]("force")&&q["$respond_to?"]("each")?n(q,"each",[],(p=function(b){null==b&&(b=r);return a.$yield(b)}, -p.$$s=k,p.$$arity=1,p)):g(m,"Opal").$try_convert(q,g(m,"Array"),"to_ary")===r?a.$yield(q):n(q,"each",[],(l=function(b){null==b&&(b=r);return a.$yield(b)},l.$$s=k,l.$$arity=1,l))},f.$$s=this,f.$$arity=-2,f))},c.$$arity=0);b.def(a,"$drop",A=function(a){var c,e=r,f=e=r;a=g(m,"Opal").$coerce_to(a,g(m,"Integer"),"to_int");u(y(a,0))&&this.$raise(g(m,"ArgumentError"),"attempt to drop negative size");e=this.$enumerator_size();e=u(g(m,"Integer")["$==="](e))?u(y(a,e))?a:e:e;f=0;return n(g(m,"Lazy"),"new",[this, -e],(c=function(c,e){null==c&&(c=r);var k=b.slice.call(arguments,1,arguments.length);return u(y(f,a))?f=t(f,1):n(c,"yield",b.to_a(k))},c.$$s=this,c.$$arity=-2,c))},A.$$arity=1);b.def(a,"$drop_while",p=function(){var a=p.$$p,c=a||r,e,f=r;a&&(p.$$p=null);a&&(p.$$p=null);u(c)||this.$raise(g(m,"ArgumentError"),"tried to call lazy drop_while without a block");f=!0;return n(g(m,"Lazy"),"new",[this,r],(e=function(a,e){null==a&&(a=r);var k=b.slice.call(arguments,1,arguments.length);if(u(f)){var p=b.yieldX(c, -k);P(p)&&(f=!1,n(a,"yield",b.to_a(k)))}else return n(a,"yield",b.to_a(k))},e.$$s=this,e.$$arity=-2,e))},p.$$arity=0);b.def(a,"$enum_for",S=function(a,c){var e=S.$$p,f=e||r;e&&(S.$$p=null);e&&(S.$$p=null);e=b.slice.call(arguments,0,arguments.length);if(0<e.length){var k=e[0];e.splice(0,1)}null==k&&(k="each");return n(this.$class(),"for",[this,k].concat(b.to_a(e)),f.$to_proc())},S.$$arity=-1);b.def(a,"$find_all",M=function(){var a=M.$$p,c=a||r,e;a&&(M.$$p=null);a&&(M.$$p=null);u(c)||this.$raise(g(m, -"ArgumentError"),"tried to call lazy select without a block");return n(g(m,"Lazy"),"new",[this,r],(e=function(a,e){null==a&&(a=r);var f=b.slice.call(arguments,1,arguments.length);var k=b.yieldX(c,f);u(k)&&n(a,"yield",b.to_a(f))},e.$$s=this,e.$$arity=-2,e))},M.$$arity=0);b.alias(a,"flat_map","collect_concat");b.def(a,"$grep",k=function(a){var c=k.$$p,e=c||r,f,p;c&&(k.$$p=null);c&&(k.$$p=null);return u(e)?n(g(m,"Lazy"),"new",[this,r],(f=function(c,f){null==c&&(c=r);var k=b.slice.call(arguments,1,arguments.length); -k=g(m,"Opal").$destructure(k);var p=a["$==="](k);u(p)&&(b.yield1(e,k),c.$yield(b.yield1(e,k)))},f.$$s=this,f.$$arity=-2,f)):n(g(m,"Lazy"),"new",[this,r],(p=function(c,e){null==c&&(c=r);var f=b.slice.call(arguments,1,arguments.length);f=g(m,"Opal").$destructure(f);var k=a["$==="](f);u(k)&&c.$yield(f)},p.$$s=this,p.$$arity=-2,p))},k.$$arity=1);b.alias(a,"map","collect");b.alias(a,"select","find_all");b.def(a,"$reject",e=function(){var a=e.$$p,c=a||r,f;a&&(e.$$p=null);a&&(e.$$p=null);u(c)||this.$raise(g(m, -"ArgumentError"),"tried to call lazy reject without a block");return n(g(m,"Lazy"),"new",[this,r],(f=function(a,e){null==a&&(a=r);var f=b.slice.call(arguments,1,arguments.length);var k=b.yieldX(c,f);P(k)&&n(a,"yield",b.to_a(f))},f.$$s=this,f.$$arity=-2,f))},e.$$arity=0);b.def(a,"$take",f=function(a){var c,e=r,f=e=r;a=g(m,"Opal").$coerce_to(a,g(m,"Integer"),"to_int");u(y(a,0))&&this.$raise(g(m,"ArgumentError"),"attempt to take negative size");e=this.$enumerator_size();e=u(g(m,"Integer")["$==="](e))? -u(y(a,e))?a:e:e;f=0;return n(g(m,"Lazy"),"new",[this,e],(c=function(e,k){var p=c.$$s||this;null==e&&(e=r);var l=b.slice.call(arguments,1,arguments.length);return u(y(f,a))?(n(e,"yield",b.to_a(l)),f=t(f,1)):p.$raise(g(m,"StopLazyError"))},c.$$s=this,c.$$arity=-2,c))},f.$$arity=1);b.def(a,"$take_while",X=function(){var a=X.$$p,c=a||r,e;a&&(X.$$p=null);a&&(X.$$p=null);u(c)||this.$raise(g(m,"ArgumentError"),"tried to call lazy take_while without a block");return n(g(m,"Lazy"),"new",[this,r],(e=function(a, -f){var k=e.$$s||this;null==a&&(a=r);var p=b.slice.call(arguments,1,arguments.length);var l=b.yieldX(c,p);u(l)?n(a,"yield",b.to_a(p)):k.$raise(g(m,"StopLazyError"))},e.$$s=this,e.$$arity=-2,e))},X.$$arity=0);b.alias(a,"to_enum","enum_for");return(b.def(a,"$inspect",ba=function(){return"#<"+this.$class()+": "+this.enumerator.$inspect()+">"},ba.$$arity=0),r)&&"inspect"}(m[0],x,m)}(x[0],null,x)}; -Opal.modules["corelib/numeric"]=function(b){function t(b,g){return"number"===typeof b&&"number"===typeof g?b-g:b["$-"](g)}function y(b,g){return"number"===typeof b&&"number"===typeof g?b*g:b["$*"](g)}function D(b,g){return"number"===typeof b&&"number"===typeof g?b<g:b["$<"](g)}function x(b,g){return"number"===typeof b&&"number"===typeof g?b/g:b["$/"](g)}var r=b.top,g=[],G=b.nil,h=b.const_get_qualified,B=b.const_get_relative,u=b.klass,n=b.truthy,P=b.hash2;b.add_stubs("$require $include $instance_of? $class $Float $respond_to? $coerce $__send__ $=== $raise $equal? $- $* $div $< $-@ $ceil $to_f $denominator $to_r $== $floor $/ $% $Complex $zero? $numerator $abs $arg $coerce_to! $round $to_i $truncate $>".split(" ")); -r.$require("corelib/comparable");return function(g,$super,r){g=u(g,$super,"Numeric");var m=[g].concat(r),H,O,C,J,ha,Y,a,d,v,E,N,q,l,c,A,p,S,M,k,e,f,X,ba,ia,T,U,Z,z,ra,F,ua,ja,va,pa,qa,ea,Ba;g.$include(B(m,"Comparable"));b.def(g,"$coerce",H=function(a){return n(a["$instance_of?"](this.$class()))?[a,this]:[this.$Float(a),this.$Float(this)]},H.$$arity=1);b.def(g,"$__coerced__",O=function(a,c){if(n(c["$respond_to?"]("coerce"))){c=c.$coerce(this);var e=b.to_ary(c);var f=null==e[0]?G:e[0];e=null==e[1]? -G:e[1];c;return f.$__send__(a,e)}return"+"["$==="](a)||"-"["$==="](a)||"*"["$==="](a)||"/"["$==="](a)||"%"["$==="](a)||"&"["$==="](a)||"|"["$==="](a)||"^"["$==="](a)||"**"["$==="](a)?this.$raise(B(m,"TypeError"),""+c.$class()+" can't be coerced into Numeric"):">"["$==="](a)||">="["$==="](a)||"<"["$==="](a)||"<="["$==="](a)||"<=>"["$==="](a)?this.$raise(B(m,"ArgumentError"),"comparison of "+this.$class()+" with "+c.$class()+" failed"):G},O.$$arity=2);b.def(g,"$<=>",C=function(a){return n(this["$equal?"](a))? -0:G},C.$$arity=1);b.def(g,"$+@",J=function(){return this},J.$$arity=0);b.def(g,"$-@",ha=function(){return t(0,this)},ha.$$arity=0);b.def(g,"$%",Y=function(a){return t(this,y(a,this.$div(a)))},Y.$$arity=1);b.def(g,"$abs",a=function(){return D(this,0)?this["$-@"]():this},a.$$arity=0);b.def(g,"$abs2",d=function(){return y(this,this)},d.$$arity=0);b.def(g,"$angle",v=function(){return D(this,0)?h(B(m,"Math"),"PI"):0},v.$$arity=0);b.alias(g,"arg","angle");b.def(g,"$ceil",E=function(a){null==a&&(a=0);return this.$to_f().$ceil(a)}, -E.$$arity=-1);b.def(g,"$conj",N=function(){return this},N.$$arity=0);b.alias(g,"conjugate","conj");b.def(g,"$denominator",q=function(){return this.$to_r().$denominator()},q.$$arity=0);b.def(g,"$div",l=function(a){a["$=="](0)&&this.$raise(B(m,"ZeroDivisionError"),"divided by o");return x(this,a).$floor()},l.$$arity=1);b.def(g,"$divmod",c=function(a){return[this.$div(a),this["$%"](a)]},c.$$arity=1);b.def(g,"$fdiv",A=function(a){return x(this.$to_f(),a)},A.$$arity=1);b.def(g,"$floor",p=function(a){null== -a&&(a=0);return this.$to_f().$floor(a)},p.$$arity=-1);b.def(g,"$i",S=function(){return this.$Complex(0,this)},S.$$arity=0);b.def(g,"$imag",M=function(){return 0},M.$$arity=0);b.alias(g,"imaginary","imag");b.def(g,"$integer?",k=function(){return!1},k.$$arity=0);b.alias(g,"magnitude","abs");b.alias(g,"modulo","%");b.def(g,"$nonzero?",e=function(){return n(this["$zero?"]())?G:this},e.$$arity=0);b.def(g,"$numerator",f=function(){return this.$to_r().$numerator()},f.$$arity=0);b.alias(g,"phase","arg"); -b.def(g,"$polar",X=function(){return[this.$abs(),this.$arg()]},X.$$arity=0);b.def(g,"$quo",ba=function(a){return x(B(m,"Opal")["$coerce_to!"](this,B(m,"Rational"),"to_r"),a)},ba.$$arity=1);b.def(g,"$real",ia=function(){return this},ia.$$arity=0);b.def(g,"$real?",T=function(){return!0},T.$$arity=0);b.def(g,"$rect",U=function(){return[this,0]},U.$$arity=0);b.alias(g,"rectangular","rect");b.def(g,"$round",Z=function(a){return this.$to_f().$round(a)},Z.$$arity=-1);b.def(g,"$to_c",z=function(){return this.$Complex(this, -0)},z.$$arity=0);b.def(g,"$to_int",ra=function(){return this.$to_i()},ra.$$arity=0);b.def(g,"$truncate",F=function(a){null==a&&(a=0);return this.$to_f().$truncate(a)},F.$$arity=-1);b.def(g,"$zero?",ua=function(){return this["$=="](0)},ua.$$arity=0);b.def(g,"$positive?",ja=function(){return"number"===typeof this?0<this:this["$>"](0)},ja.$$arity=0);b.def(g,"$negative?",va=function(){return D(this,0)},va.$$arity=0);b.def(g,"$dup",pa=function(){return this},pa.$$arity=0);b.def(g,"$clone",qa=function(a){if(null== -a)P([],{});else if(!a.$$is_hash)throw b.ArgumentError.$new("expected kwargs");return this},qa.$$arity=-1);b.def(g,"$finite?",ea=function(){return!0},ea.$$arity=0);return(b.def(g,"$infinite?",Ba=function(){return G},Ba.$$arity=0),G)&&"infinite?"}(g[0],null,g)}; -Opal.modules["corelib/array"]=function(b){function t(b,g){return"number"===typeof b&&"number"===typeof g?b>g:b["$>"](g)}var y=b.top,D=[],x=b.nil,r=b.const_get_qualified,g=b.const_get_relative,G=b.klass,h=b.truthy,B=b.hash2,u=b.send,n=b.gvars;b.add_stubs("$require $include $to_a $warn $raise $replace $respond_to? $to_ary $coerce_to $coerce_to? $=== $join $to_str $class $hash $<=> $== $object_id $inspect $enum_for $bsearch_index $to_proc $nil? $coerce_to! $> $* $enumerator_size $empty? $size $map $equal? $dup $each $[] $dig $eql? $length $begin $end $exclude_end? $flatten $__id__ $to_s $new $max $min $! $>= $** $delete_if $reverse $rotate $rand $at $keep_if $shuffle! $< $sort $sort_by $!= $times $[]= $- $<< $values $is_a? $last $first $upto $reject $pristine $singleton_class".split(" ")); -y.$require("corelib/enumerable");y.$require("corelib/numeric");return function(D,$super,y){function H(a,c){return c.$$name===b.Array?a:c.$allocate().$replace(a.$to_a())}function m(a,c){var e=a.length;var f=c.excl;var d=b.Opal.$coerce_to(c.begin,b.Integer,"to_int");c=b.Opal.$coerce_to(c.end,b.Integer,"to_int");if(0>d&&(d+=e,0>d)||d>e)return x;if(0>c&&(c+=e,0>c))return[];f||(c+=1);e=a.slice(d,c);return H(e,a.$class())}function I(a,c,e){var f=a.length;c=b.Opal.$coerce_to(c,b.Integer,"to_int");if(0>c&& -(c+=f,0>c))return x;if(void 0===e)return c>=f||0>c?x:a[c];e=b.Opal.$coerce_to(e,b.Integer,"to_int");if(0>e||c>f||0>c)return x;c=a.slice(c,c+e);return H(c,a.$class())}function R(a,b){return a===b||0===b?1:0<b&&a>b?R(a-1,b-1)+R(a-1,b):0}var C=G(D,$super,"Array"),J=[C].concat(y),P,Y,a,d,v,E,N,q,l,c,A,p,S,M,k,e,f,X,ba,ia,T,U,Z,z,ra,F,ua,ja,va,pa,qa,ea,Ba,Na,Fa,za,fa,sa,V,ma,ca,Ma,la,Oa,aa,na,Ha,Wa,Pa,ab,ka,wa,da,xa,Ca,ta,Ia,Ga,Ja,Xa,Qa,Ra,Da,Ka,Ya,Va,Za,$a,bb,Ua,w,Q,L,Aa,Ta,K,Ea,W,La,ya,mb,gb,kb,eb,lb, -Sa,db,fb,ob,hb,pb,cb,qb;C.$include(g(J,"Enumerable"));b.defineProperty(C.$$prototype,"$$is_array",!0);b.defs(C,"$[]",P=function(a){var c=b.slice.call(arguments,0,arguments.length);return H(c,this)},P.$$arity=-1);b.def(C,"$initialize",Y=function(a,b){var c=Y.$$p,e=c||x;c&&(Y.$$p=null);c&&(Y.$$p=null);null==a&&(a=x);null==b&&(b=x);b!==x&&e!==x&&this.$warn("warning: block supersedes default value argument");a>r(g(J,"Integer"),"MAX")&&this.$raise(g(J,"ArgumentError"),"array size too big");2<arguments.length&& -this.$raise(g(J,"ArgumentError"),"wrong number of arguments ("+arguments.length+" for 0..2)");if(0===arguments.length)return this.splice(0,this.length),this;if(1===arguments.length){if(a.$$is_array)return this.$replace(a.$to_a()),this;if(a["$respond_to?"]("to_ary"))return this.$replace(a.$to_ary()),this}a=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int");0>a&&this.$raise(g(J,"ArgumentError"),"negative array size");this.splice(0,this.length);if(e===x)for(c=0;c<a;c++)this.push(b);else for(c=0,f;c<a;c++){var f= -e(c);this[c]=f}return this},Y.$$arity=-1);b.defs(C,"$try_convert",a=function(a){return g(J,"Opal")["$coerce_to?"](a,g(J,"Array"),"to_ary")},a.$$arity=1);b.def(C,"$&",d=function(a){a=h(g(J,"Array")["$==="](a))?a.$to_a():g(J,"Opal").$coerce_to(a,g(J,"Array"),"to_ary").$to_a();var c=[],e=B([],{}),f;var d=0;for(f=a.length;d<f;d++)b.hash_put(e,a[d],!0);d=0;for(f=this.length;d<f;d++)a=this[d],void 0!==b.hash_delete(e,a)&&c.push(a);return c},d.$$arity=1);b.def(C,"$|",v=function(a){a=h(g(J,"Array")["$==="](a))? -a.$to_a():g(J,"Opal").$coerce_to(a,g(J,"Array"),"to_ary").$to_a();var c=B([],{}),e;var f=0;for(e=this.length;f<e;f++)b.hash_put(c,this[f],!0);f=0;for(e=a.length;f<e;f++)b.hash_put(c,a[f],!0);return c.$keys()},v.$$arity=1);b.def(C,"$*",E=function(a){if(h(a["$respond_to?"]("to_str")))return this.$join(a.$to_str());a=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int");h(0>a)&&this.$raise(g(J,"ArgumentError"),"negative argument");for(var b=[],c=this.$to_a(),e=0;e<a;e++)b=b.concat(c);return H(b,this.$class())}, -E.$$arity=1);b.def(C,"$+",N=function(a){a=h(g(J,"Array")["$==="](a))?a.$to_a():g(J,"Opal").$coerce_to(a,g(J,"Array"),"to_ary").$to_a();return this.concat(a)},N.$$arity=1);b.def(C,"$-",q=function(a){a=h(g(J,"Array")["$==="](a))?a.$to_a():g(J,"Opal").$coerce_to(a,g(J,"Array"),"to_ary").$to_a();if(h(0===this.length))return[];if(h(0===a.length))return this.slice();var c=[],e=B([],{}),f;var d=0;for(f=a.length;d<f;d++)b.hash_put(e,a[d],!0);d=0;for(f=this.length;d<f;d++)a=this[d],void 0===b.hash_get(e,a)&& -c.push(a);return c},q.$$arity=1);b.def(C,"$<<",l=function(a){this.push(a);return this},l.$$arity=1);b.def(C,"$<=>",c=function(a){if(h(g(J,"Array")["$==="](a)))a=a.$to_a();else if(h(a["$respond_to?"]("to_ary")))a=a.$to_ary().$to_a();else return x;if(this.$hash()===a.$hash())return 0;for(var b=Math.min(this.length,a.length),c=0;c<b;c++){var e=this[c]["$<=>"](a[c]);if(0!==e)return e}return this.length["$<=>"](a.length)},c.$$arity=1);b.def(C,"$==",A=function(a){function b(a,e){var f;if(a===e)return!0; -if(!e.$$is_array)return g(J,"Opal")["$respond_to?"](e,"to_ary")?e["$=="](a):!1;a.$$constructor!==Array&&(a=a.$to_a());e.$$constructor!==Array&&(e=e.$to_a());if(a.length!==e.length)return!1;c[a.$object_id()]=!0;var d=0;for(f=a.length;d<f;d++){var k=a[d];var p=e[d];if(k.$$is_array){if(p.$$is_array&&p.length!==k.length||!c.hasOwnProperty(k.$object_id())&&!b(k,p))return!1}else if(!k["$=="](p))return!1}return!0}var c={};return b(this,a)},A.$$arity=1);b.def(C,"$[]",p=function(a,b){return a.$$is_range?m(this, -a):I(this,a,b)},p.$$arity=-2);b.def(C,"$[]=",S=function(a,b,c){var e=x;var f=this.length;if(h(g(J,"Range")["$==="](a))){e=h(g(J,"Array")["$==="](b))?b.$to_a():h(b["$respond_to?"]("to_ary"))?b.$to_ary().$to_a():[b];var d=a.excl;c=g(J,"Opal").$coerce_to(a.begin,g(J,"Integer"),"to_int");var k=g(J,"Opal").$coerce_to(a.end,g(J,"Integer"),"to_int");0>c&&(c+=f,0>c&&this.$raise(g(J,"RangeError"),""+a.$inspect()+" out of range"));0>k&&(k+=f);d||(k+=1);if(c>f)for(;f<c;f++)this[f]=x;0>k?this.splice.apply(this, -[c,0].concat(e)):this.splice.apply(this,[c,k-c].concat(e))}else{h(void 0===c)?k=1:(k=b,b=c,e=h(g(J,"Array")["$==="](b))?b.$to_a():h(b["$respond_to?"]("to_ary"))?b.$to_ary().$to_a():[b]);a=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int");k=g(J,"Opal").$coerce_to(k,g(J,"Integer"),"to_int");0>a&&(d=a,a+=f,0>a&&this.$raise(g(J,"IndexError"),"index "+d+" too small for array; minimum "+-this.length));0>k&&this.$raise(g(J,"IndexError"),"negative length ("+k+")");if(a>f)for(;f<a;f++)this[f]=x;void 0===c? -this[a]=b:this.splice.apply(this,[a,k].concat(e))}return b},S.$$arity=-3);b.def(C,"$any?",M=function(a){var c=M.$$p,e;c&&(M.$$p=null);var f=0;var d=arguments.length;for(e=Array(d);f<d;f++)e[f]=arguments[f];c&&(M.$$p=null);return 0===this.length?!1:u(this,b.find_super_dispatcher(this,"any?",M,!1),e,c)},M.$$arity=-1);b.def(C,"$assoc",k=function(a){for(var b=0,c=this.length,e;b<c;b++)if(e=this[b],e.length&&e[0]["$=="](a))return e;return x},k.$$arity=1);b.def(C,"$at",e=function(a){a=g(J,"Opal").$coerce_to(a, -g(J,"Integer"),"to_int");0>a&&(a+=this.length);return 0>a||a>=this.length?x:this[a]},e.$$arity=1);b.def(C,"$bsearch_index",f=function(){var a=f.$$p,c=a||x;a&&(f.$$p=null);a&&(f.$$p=null);if(c===x)return this.$enum_for("bsearch_index");a=0;for(var e=this.length,d,k,p=!1,w=x;a<e;){d=a+Math.floor((e-a)/2);k=this[d];k=b.yield1(c,k);if(!0===k)w=d,p=!0;else if(!1===k||k===x)p=!1;else if(k.$$is_number){if(0===k)return d;p=0>k}else this.$raise(g(J,"TypeError"),"wrong argument type "+k.$class()+" (must be numeric, true, false or nil)"); -p?e=d:a=d+1}return w},f.$$arity=0);b.def(C,"$bsearch",X=function(){var a=X.$$p,b=a||x;a&&(X.$$p=null);a&&(X.$$p=null);if(b===x)return this.$enum_for("bsearch");a=u(this,"bsearch_index",[],b.$to_proc());return null!=a&&a.$$is_number?this[a]:a},X.$$arity=0);b.def(C,"$cycle",ba=function(a){var c=ba.$$p,e=c||x,f,d;c&&(ba.$$p=null);c&&(ba.$$p=null);null==a&&(a=x);if(e===x)return u(this,"enum_for",["cycle",a],(f=function(){var b=f.$$s||this;if(h(a["$nil?"]()))return r(g(J,"Float"),"INFINITY");a=g(J,"Opal")["$coerce_to!"](a, -g(J,"Integer"),"to_int");return h(t(a,0))?(b=b.$enumerator_size(),"number"===typeof b&&"number"===typeof a?b*a:b["$*"](a)):0},f.$$s=this,f.$$arity=0,f));if(h(h(d=this["$empty?"]())?d:a["$=="](0)))return x;if(a===x)for(;;)for(c=0,d=this.length;c<d;c++)b.yield1(e,this[c]);else{a=g(J,"Opal")["$coerce_to!"](a,g(J,"Integer"),"to_int");if(0>=a)return this;for(;0<a;){c=0;for(d=this.length;c<d;c++)b.yield1(e,this[c]);a--}}return this},ba.$$arity=-1);b.def(C,"$clear",ia=function(){this.splice(0,this.length); -return this},ia.$$arity=0);b.def(C,"$count",T=function(a){var c=T.$$p,e=c||x,f,d;c&&(T.$$p=null);var k=0;var p=arguments.length;for(d=Array(p);k<p;k++)d[k]=arguments[k];c&&(T.$$p=null);null==a&&(a=x);return h(h(f=a)?f:e)?u(this,b.find_super_dispatcher(this,"count",T,!1),d,c):this.$size()},T.$$arity=-1);b.def(C,"$initialize_copy",U=function(a){return this.$replace(a)},U.$$arity=1);b.def(C,"$collect",Z=function(){var a=Z.$$p,c=a||x,e;a&&(Z.$$p=null);a&&(Z.$$p=null);if(c===x)return u(this,"enum_for", -["collect"],(e=function(){return(e.$$s||this).$size()},e.$$s=this,e.$$arity=0,e));a=[];for(var f=0,d=this.length;f<d;f++){var k=b.yield1(c,this[f]);a.push(k)}return a},Z.$$arity=0);b.def(C,"$collect!",z=function(){var a=z.$$p,c=a||x,e;a&&(z.$$p=null);a&&(z.$$p=null);if(c===x)return u(this,"enum_for",["collect!"],(e=function(){return(e.$$s||this).$size()},e.$$s=this,e.$$arity=0,e));a=0;for(var f=this.length;a<f;a++){var d=b.yield1(c,this[a]);this[a]=d}return this},z.$$arity=0);b.def(C,"$combination", -ra=function(a){var c,e=ra.$$p,f=e||x,d=x;e&&(ra.$$p=null);d=g(J,"Opal")["$coerce_to!"](a,g(J,"Integer"),"to_int");if(f===x)return u(this,"enum_for",["combination",d],(c=function(){return R((c.$$s||this).length,d)},c.$$s=this,c.$$arity=0,c));if(0===d)b.yield1(f,[]);else if(1===d)for(e=0,a=this.length;e<a;e++)b.yield1(f,[this[e]]);else if(d===this.length)b.yield1(f,this.slice());else if(0<=d&&d<this.length){a=[];for(e=0;e<=d+1;e++)a.push(0);e=[];var k=0;var p=!1;for(a[0]=-1;!p;){for(e[k]=this[a[k+1]];k< -d-1;)k++,p=a[k+1]=a[k]+1,e[k]=this[p];b.yield1(f,e.slice());k++;do p=0===k,a[k]++,k--;while(a[k+1]+d===this.length+k+1)}}return this},ra.$$arity=1);b.def(C,"$repeated_combination",F=function(a){function c(a,e,f,k){if(f.length==a)a=f.slice(),b.yield1(d,a);else for(;e<k.length;e++)f.push(k[e]),c(a,e,f,k),f.pop()}var e,f=F.$$p,d=f||x,k=x;f&&(F.$$p=null);k=g(J,"Opal")["$coerce_to!"](a,g(J,"Integer"),"to_int");if(d===x)return u(this,"enum_for",["repeated_combination",k],(e=function(){return R((e.$$s|| -this).length+k-1,k)},e.$$s=this,e.$$arity=0,e));0<=k&&c(k,0,[],this);return this},F.$$arity=1);b.def(C,"$compact",ua=function(){for(var a=[],b=0,c=this.length,e;b<c;b++)(e=this[b])!==x&&a.push(e);return a},ua.$$arity=0);b.def(C,"$compact!",ja=function(){for(var a=this.length,b=0,c=this.length;b<c;b++)this[b]===x&&(this.splice(b,1),c--,b--);return this.length===a?x:this},ja.$$arity=0);b.def(C,"$concat",va=function(a){var c,e;var f=b.slice.call(arguments,0,arguments.length);f=u(f,"map",[],(c=function(a){var b= -c.$$s||this;null==a&&(a=x);a=h(g(J,"Array")["$==="](a))?a.$to_a():g(J,"Opal").$coerce_to(a,g(J,"Array"),"to_ary").$to_a();h(a["$equal?"](b))&&(a=a.$dup());return a},c.$$s=this,c.$$arity=1,c));u(f,"each",[],(e=function(a){var b=e.$$s||this;null==a&&(a=x);for(var c=0,f=a.length;c<f;c++)b.push(a[c])},e.$$s=this,e.$$arity=1,e));return this},va.$$arity=-1);b.def(C,"$delete",pa=function(a){var c=pa.$$p,e=c||x;c&&(pa.$$p=null);c=this.length;for(var f=0,d=c;f<d;f++)this[f]["$=="](a)&&(this.splice(f,1),d--, -f--);return this.length===c?e!==x?b.yieldX(e,[]):x:a},pa.$$arity=1);b.def(C,"$delete_at",qa=function(a){a=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int");0>a&&(a+=this.length);if(0>a||a>=this.length)return x;var b=this[a];this.splice(a,1);return b},qa.$$arity=1);b.def(C,"$delete_if",ea=function(){var a=ea.$$p,b=a||x,c;a&&(ea.$$p=null);a&&(ea.$$p=null);if(b===x)return u(this,"enum_for",["delete_if"],(c=function(){return(c.$$s||this).$size()},c.$$s=this,c.$$arity=0,c));a=0;for(var e=this.length,f;a< -e;a++)f=b(this[a]),!1!==f&&f!==x&&(this.splice(a,1),e--,a--);return this},ea.$$arity=0);b.def(C,"$dig",Ba=function(a,c){var e=b.slice.call(arguments,1,arguments.length);var f=this["$[]"](a);if(f===x||0===e.length)return f;h(f["$respond_to?"]("dig"))||this.$raise(g(J,"TypeError"),""+f.$class()+" does not have #dig method");return u(f,"dig",b.to_a(e))},Ba.$$arity=-2);b.def(C,"$drop",Na=function(a){0>a&&this.$raise(g(J,"ArgumentError"));return this.slice(a)},Na.$$arity=1);b.def(C,"$dup",Fa=function(){var a= -Fa.$$p,c;a&&(Fa.$$p=null);var e=0;var f=arguments.length;for(c=Array(f);e<f;e++)c[e]=arguments[e];return this.$$class===b.Array&&this.$$class.$allocate.$$pristine&&this.$copy_instance_variables.$$pristine&&this.$initialize_dup.$$pristine?this.slice(0):u(this,b.find_super_dispatcher(this,"dup",Fa,!1),c,a)},Fa.$$arity=0);b.def(C,"$each",za=function(){var a=za.$$p,c=a||x,e;a&&(za.$$p=null);a&&(za.$$p=null);if(c===x)return u(this,"enum_for",["each"],(e=function(){return(e.$$s||this).$size()},e.$$s=this, -e.$$arity=0,e));a=0;for(var f=this.length;a<f;a++)b.yield1(c,this[a]);return this},za.$$arity=0);b.def(C,"$each_index",fa=function(){var a=fa.$$p,c=a||x,e;a&&(fa.$$p=null);a&&(fa.$$p=null);if(c===x)return u(this,"enum_for",["each_index"],(e=function(){return(e.$$s||this).$size()},e.$$s=this,e.$$arity=0,e));a=0;for(var f=this.length;a<f;a++)b.yield1(c,a);return this},fa.$$arity=0);b.def(C,"$empty?",sa=function(){return 0===this.length},sa.$$arity=0);b.def(C,"$eql?",V=function(a){function b(a,e){var f; -if(!e.$$is_array)return!1;e=e.$to_a();if(a.length!==e.length)return!1;c[a.$object_id()]=!0;var d=0;for(f=a.length;d<f;d++){var k=a[d];var p=e[d];if(k.$$is_array){if(p.$$is_array&&p.length!==k.length||!c.hasOwnProperty(k.$object_id())&&!b(k,p))return!1}else if(!k["$eql?"](p))return!1}return!0}var c={};return b(this,a)},V.$$arity=1);b.def(C,"$fetch",ma=function(a,b){var c=ma.$$p,e=c||x;c&&(ma.$$p=null);c&&(ma.$$p=null);c=a;a=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int");0>a&&(a+=this.length);if(0<= -a&&a<this.length)return this[a];e!==x&&null!=b&&this.$warn("warning: block supersedes default value argument");if(e!==x)return e(c);if(null!=b)return b;0===this.length?this.$raise(g(J,"IndexError"),"index "+c+" outside of array bounds: 0...0"):this.$raise(g(J,"IndexError"),"index "+c+" outside of array bounds: -"+this.length+"..."+this.length)},ma.$$arity=-2);b.def(C,"$fill",ca=function(a){var c=ca.$$p,e=c||x,f=x;c&&(ca.$$p=null);c&&(ca.$$p=null);c=b.slice.call(arguments,0,arguments.length);if(h(e)){h(2< -c.length)&&this.$raise(g(J,"ArgumentError"),"wrong number of arguments ("+c.$length()+" for 0..2)");var d=c;var k=b.to_ary(d);c=null==k[0]?x:k[0];k=null==k[1]?x:k[1]}else h(0==c.length)?this.$raise(g(J,"ArgumentError"),"wrong number of arguments (0 for 1..3)"):h(3<c.length)&&this.$raise(g(J,"ArgumentError"),"wrong number of arguments ("+c.$length()+" for 1..3)"),d=c,k=b.to_ary(d),f=null==k[0]?x:k[0],c=null==k[1]?x:k[1],k=null==k[2]?x:k[2];d;if(h(g(J,"Range")["$==="](c))){if(h(k)&&this.$raise(g(J, -"TypeError"),"length invalid with range"),d=g(J,"Opal").$coerce_to(c.$begin(),g(J,"Integer"),"to_int"),h(0>d)&&(d+=this.length),h(0>d)&&this.$raise(g(J,"RangeError"),""+c.$inspect()+" out of range"),k=g(J,"Opal").$coerce_to(c.$end(),g(J,"Integer"),"to_int"),h(0>k)&&(k+=this.length),h(c["$exclude_end?"]())||(k+=1),h(k<=d))return this}else if(h(c))if(d=g(J,"Opal").$coerce_to(c,g(J,"Integer"),"to_int"),h(0>d)&&(d+=this.length),h(0>d)&&(d=0),h(k)){k=g(J,"Opal").$coerce_to(k,g(J,"Integer"),"to_int");if(h(0== -k))return this;k+=d}else k=this.length;else d=0,k=this.length;if(h(d>this.length))for(c=this.length;c<k;c++)this[c]=x;h(k>this.length)&&(this.length=k);if(h(e))for(;d<k;d++)f=e(d),this[d]=f;else for(;d<k;d++)this[d]=f;return this},ca.$$arity=-1);b.def(C,"$first",Ma=function(a){if(null==a)return 0===this.length?x:this[0];a=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int");0>a&&this.$raise(g(J,"ArgumentError"),"negative array size");return this.slice(0,a)},Ma.$$arity=-1);b.def(C,"$flatten",la=function(a){function b(a, -e){var f=[],d;a=a.$to_a();var k=0;for(d=a.length;k<d;k++){var p=a[k];if(g(J,"Opal")["$respond_to?"](p,"to_ary",!0)){var w=p.$to_ary();if(w===x)f.push(p);else switch(w.$$is_array||c.$raise(g(J,"TypeError")),w===c&&c.$raise(g(J,"ArgumentError")),e){case void 0:f=f.concat(b(w));break;case 0:f.push(w);break;default:f.push.apply(f,b(w,e-1))}}else f.push(p)}return f}var c=this;void 0!==a&&(a=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int"));return H(b(c,a),c.$class())},la.$$arity=-1);b.def(C,"$flatten!", -Oa=function(a){a=this.$flatten(a);if(this.length==a.length){for(var b=0,c=this.length;b<c&&this[b]===a[b];b++);if(b==c)return x}this.$replace(a);return this},Oa.$$arity=-1);b.def(C,"$hash",aa=function(){var a=void 0===b.hash_ids,c=["A"],e=this.$object_id(),f,d;try{a&&(b.hash_ids=Object.create(null));if(b.hash_ids[e])return"self";for(d in b.hash_ids){var k=b.hash_ids[d];if(this["$eql?"](k))return"self"}b.hash_ids[e]=this;for(f=0;f<this.length;f++)k=this[f],c.push(k.$hash());return c.join(",")}finally{a&& -(b.hash_ids=void 0)}},aa.$$arity=0);b.def(C,"$include?",na=function(a){for(var b=0,c=this.length;b<c;b++)if(this[b]["$=="](a))return!0;return!1},na.$$arity=1);b.def(C,"$index",Ha=function(a){var b=Ha.$$p,c=b||x;b&&(Ha.$$p=null);b&&(Ha.$$p=null);var e;null!=a&&c!==x&&this.$warn("warning: given block not used");if(null!=a)for(b=0,e=this.length;b<e;b++){if(this[b]["$=="](a))return b}else if(c!==x)for(b=0,e=this.length;b<e;b++){if(a=c(this[b]),!1!==a&&a!==x)return b}else return this.$enum_for("index"); -return x},Ha.$$arity=-1);b.def(C,"$insert",Wa=function(a,c){var e=b.slice.call(arguments,1,arguments.length);a=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int");if(0<e.length){0>a&&(a+=this.length+1,0>a&&this.$raise(g(J,"IndexError"),""+a+" is out of bounds"));if(a>this.length)for(var f=this.length;f<a;f++)this.push(x);this.splice.apply(this,[a,0].concat(e))}return this},Wa.$$arity=-2);b.def(C,"$inspect",Pa=function(){for(var a=[],b=this.$__id__(),c=0,e=this.length;c<e;c++){var f=this["$[]"](c);f.$__id__()=== -b?a.push("[...]"):a.push(f.$inspect())}return"["+a.join(", ")+"]"},Pa.$$arity=0);b.def(C,"$join",ab=function(a){null==n[","]&&(n[","]=x);null==a&&(a=x);if(h(0===this.length))return"";h(a===x)&&(a=n[","]);var c=[],e;var f=0;for(e=this.length;f<e;f++){var d=this[f];if(g(J,"Opal")["$respond_to?"](d,"to_str")){var k=d.$to_str();if(k!==x){c.push(k.$to_s());continue}}if(g(J,"Opal")["$respond_to?"](d,"to_ary")&&(k=d.$to_ary(),k===this&&this.$raise(g(J,"ArgumentError")),k!==x)){c.push(k.$join(a));continue}if(g(J, -"Opal")["$respond_to?"](d,"to_s")&&(k=d.$to_s(),k!==x)){c.push(k);continue}this.$raise(g(J,"NoMethodError").$new(""+b.inspect(d)+" doesn't respond to #to_str, #to_ary or #to_s","to_str"))}return a===x?c.join(""):c.join(g(J,"Opal")["$coerce_to!"](a,g(J,"String"),"to_str").$to_s())},ab.$$arity=-1);b.def(C,"$keep_if",ka=function(){var a=ka.$$p,b=a||x,c;a&&(ka.$$p=null);a&&(ka.$$p=null);if(b===x)return u(this,"enum_for",["keep_if"],(c=function(){return(c.$$s||this).$size()},c.$$s=this,c.$$arity=0,c)); -a=0;for(var e=this.length,f;a<e;a++)if(f=b(this[a]),!1===f||f===x)this.splice(a,1),e--,a--;return this},ka.$$arity=0);b.def(C,"$last",wa=function(a){if(null==a)return 0===this.length?x:this[this.length-1];a=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int");0>a&&this.$raise(g(J,"ArgumentError"),"negative array size");a>this.length&&(a=this.length);return this.slice(this.length-a,this.length)},wa.$$arity=-1);b.def(C,"$length",da=function(){return this.length},da.$$arity=0);b.alias(C,"map","collect"); -b.alias(C,"map!","collect!");b.def(C,"$max",xa=function(a){var b=xa.$$p,c=b||x;b&&(xa.$$p=null);b&&(xa.$$p=null);return u(this.$each(),"max",[a],c.$to_proc())},xa.$$arity=-1);b.def(C,"$min",Ca=function(){var a=Ca.$$p,b=a||x;a&&(Ca.$$p=null);a&&(Ca.$$p=null);return u(this.$each(),"min",[],b.$to_proc())},Ca.$$arity=0);b.def(C,"$permutation",ta=function(a){var c=ta.$$p,e=c||x,f,d=this,k=x,p=x;c&&(ta.$$p=null);c&&(ta.$$p=null);if(e===x)return u(d,"enum_for",["permutation",a],(f=function(){var b=f.$$s|| -this,c=b.length;b=void 0===a?b.length:a;for(var e=0<=b?1:0;b;)e*=c,c--,b--;return e},f.$$s=d,f.$$arity=0,f));var w;a=void 0===a?d.length:g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int");if(!(0>a||d.length<a))if(0===a)b.yield1(e,[]);else if(1===a)for(k=0;k<d.length;k++)b.yield1(e,[d[k]]);else{k=g(J,"Array").$new(a);p=g(J,"Array").$new(d.length,!1);var l=function(a,c,e,f,k){d=this;for(var p=0;p<d.length;p++)if(f["$[]"](p)["$!"]())if(c[e]=p,e<a-1)f[p]=!0,l.call(d,a,c,e+1,f,k),f[p]=!1;else{w=[];for(var ya= -0;ya<c.length;ya++)w.push(d[c[ya]]);b.yield1(k,w)}};e!==x?(c=d.slice(),l.call(c,a,k,0,p,e)):l.call(d,a,k,0,p,e)}return d},ta.$$arity=-1);b.def(C,"$repeated_permutation",Ia=function(a){function c(a,e,f){if(e.length==a)a=e.slice(),b.yield1(d,a);else for(var k=0;k<f.length;k++)e.push(f[k]),c(a,e,f),e.pop()}var e,f=Ia.$$p,d=f||x,k=x;f&&(Ia.$$p=null);k=g(J,"Opal")["$coerce_to!"](a,g(J,"Integer"),"to_int");if(d===x)return u(this,"enum_for",["repeated_permutation",k],(e=function(){var a=e.$$s||this;return h("number"=== -typeof k?0<=k:k["$>="](0))?a.$size()["$**"](k):0},e.$$s=this,e.$$arity=0,e));c(k,[],this.slice());return this},Ia.$$arity=1);b.def(C,"$pop",Ga=function(a){if(h(void 0===a))return h(0===this.length)?x:this.pop();a=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int");h(0>a)&&this.$raise(g(J,"ArgumentError"),"negative array size");return h(0===this.length)?[]:h(a>this.length)?this.splice(0,this.length):this.splice(this.length-a,this.length)},Ga.$$arity=-1);b.def(C,"$product",Ja=function(a){var c=Ja.$$p, -e=c||x;c&&(Ja.$$p=null);c&&(Ja.$$p=null);var f=b.slice.call(arguments,0,arguments.length);c=e!==x?null:[];var d=f.length+1,k=Array(d),p=Array(d),w=Array(d),l;var ya=1;w[0]=this;for(l=1;l<d;l++)w[l]=g(J,"Opal").$coerce_to(f[l-1],g(J,"Array"),"to_ary");for(l=0;l<d;l++){f=w[l].length;if(0===f)return c||this;ya*=f;2147483647<ya&&this.$raise(g(J,"RangeError"),"too big to product");p[l]=f;k[l]=0}a:for(;;){ya=[];for(l=0;l<d;l++)ya.push(w[l][k[l]]);c?c.push(ya):b.yield1(e,ya);l=d-1;for(k[l]++;k[l]===p[l];){k[l]= -0;if(0>--l)break a;k[l]++}}return c||this},Ja.$$arity=-1);b.def(C,"$push",Xa=function(a){var c=b.slice.call(arguments,0,arguments.length);for(var e=0,f=c.length;e<f;e++)this.push(c[e]);return this},Xa.$$arity=-1);b.alias(C,"append","push");b.def(C,"$rassoc",Qa=function(a){for(var b=0,c=this.length,e;b<c;b++)if(e=this[b],e.length&&void 0!==e[1]&&e[1]["$=="](a))return e;return x},Qa.$$arity=1);b.def(C,"$reject",Ra=function(){var a=Ra.$$p,b=a||x,c;a&&(Ra.$$p=null);a&&(Ra.$$p=null);if(b===x)return u(this, -"enum_for",["reject"],(c=function(){return(c.$$s||this).$size()},c.$$s=this,c.$$arity=0,c));a=[];for(var e=0,f=this.length,d;e<f;e++)d=b(this[e]),!1!==d&&d!==x||a.push(this[e]);return a},Ra.$$arity=0);b.def(C,"$reject!",Da=function(){var a=Da.$$p,b=a||x,c,e=x;a&&(Da.$$p=null);a&&(Da.$$p=null);if(b===x)return u(this,"enum_for",["reject!"],(c=function(){return(c.$$s||this).$size()},c.$$s=this,c.$$arity=0,c));e=this.$length();u(this,"delete_if",[],b.$to_proc());return this.$length()["$=="](e)?x:this}, -Da.$$arity=0);b.def(C,"$replace",Ka=function(a){a=h(g(J,"Array")["$==="](a))?a.$to_a():g(J,"Opal").$coerce_to(a,g(J,"Array"),"to_ary").$to_a();this.splice(0,this.length);this.push.apply(this,a);return this},Ka.$$arity=1);b.def(C,"$reverse",Ya=function(){return this.slice(0).reverse()},Ya.$$arity=0);b.def(C,"$reverse!",Va=function(){return this.reverse()},Va.$$arity=0);b.def(C,"$reverse_each",Za=function(){var a=Za.$$p,b=a||x,c;a&&(Za.$$p=null);a&&(Za.$$p=null);if(b===x)return u(this,"enum_for",["reverse_each"], -(c=function(){return(c.$$s||this).$size()},c.$$s=this,c.$$arity=0,c));u(this.$reverse(),"each",[],b.$to_proc());return this},Za.$$arity=0);b.def(C,"$rindex",$a=function(a){var b=$a.$$p,c=b||x;b&&($a.$$p=null);b&&($a.$$p=null);null!=a&&c!==x&&this.$warn("warning: given block not used");if(null!=a)for(b=this.length-1;0<=b&&!(b>=this.length);b--){if(this[b]["$=="](a))return b}else if(c!==x)for(b=this.length-1;0<=b&&!(b>=this.length);b--){if(a=c(this[b]),!1!==a&&a!==x)return b}else if(null==a)return this.$enum_for("rindex"); -return x},$a.$$arity=-1);b.def(C,"$rotate",bb=function(a){null==a&&(a=1);a=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int");if(1===this.length)return this.slice();if(0===this.length)return[];var b=this.slice();var c=a%b.length;a=b.slice(c);b=b.slice(0,c);return a.concat(b)},bb.$$arity=-1);b.def(C,"$rotate!",Ua=function(a){null==a&&(a=1);if(0===this.length||1===this.length)return this;a=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int");a=this.$rotate(a);return this.$replace(a)},Ua.$$arity=-1);(function(a, -$super,c){a=G(a,$super,"SampleRandom");var e=[a].concat(c),f,d;a.$$prototype.rng=x;b.def(a,"$initialize",f=function(a){return this.rng=a},f.$$arity=1);return(b.def(a,"$rand",d=function(a){var b=g(e,"Opal").$coerce_to(this.rng.$rand(a),g(e,"Integer"),"to_int");h(0>b)&&this.$raise(g(e,"RangeError"),"random value must be >= 0");h(b<a)||this.$raise(g(e,"RangeError"),"random value must be less than Array size");return b},d.$$arity=1),x)&&"rand"})(J[0],null,J);b.def(C,"$sample",w=function(a,b){var c,e= -x;if(h(void 0===a))return this.$at(g(J,"Kernel").$rand(this.length));h(void 0===b)?h(b=g(J,"Opal")["$coerce_to?"](a,g(J,"Hash"),"to_hash"))?a=x:(b=x,a=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int")):(a=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int"),b=g(J,"Opal").$coerce_to(b,g(J,"Hash"),"to_hash"));h(h(c=a)?0>a:c)&&this.$raise(g(J,"ArgumentError"),"count must be greater than 0");h(b)&&(e=b["$[]"]("random"));e=h(h(c=e)?e["$respond_to?"]("rand"):c)?g(J,"SampleRandom").$new(e):g(J,"Kernel");if(!h(a))return this[e.$rand(this.length)]; -a>this.length&&(a=this.length);switch(a){case 0:return[];case 1:return[this[e.$rand(this.length)]];case 2:var f=e.$rand(this.length);var d=e.$rand(this.length);f===d&&(d=0===f?f+1:f-1);return[this[f],this[d]];default:if(3<this.length/a){b=!1;var k=0;c=g(J,"Array").$new(a);f=1;for(c[0]=e.$rand(this.length);f<a;){var p=e.$rand(this.length);for(d=0;d<f;){for(;p===c[d];){k++;if(100<k){b=!0;break}p=e.$rand(this.length)}if(b)break;d++}if(b)break;c[f]=p;f++}if(!b){for(f=0;f<a;)c[f]=this[c[f]],f++;return c}}c= -this.slice();for(f=0;f<a;f++)b=e.$rand(this.length),k=c[f],c[f]=c[b],c[b]=k;return a===this.length?c:c["$[]"](0,a)}},w.$$arity=-1);b.def(C,"$select",Q=function(){var a=Q.$$p,c=a||x,e;a&&(Q.$$p=null);a&&(Q.$$p=null);if(c===x)return u(this,"enum_for",["select"],(e=function(){return(e.$$s||this).$size()},e.$$s=this,e.$$arity=0,e));a=[];for(var f=0,d=this.length,k,p;f<d;f++)k=this[f],p=b.yield1(c,k),b.truthy(p)&&a.push(k);return a},Q.$$arity=0);b.def(C,"$select!",L=function(){var a=L.$$p,b=a||x,c;a&& -(L.$$p=null);a&&(L.$$p=null);if(b===x)return u(this,"enum_for",["select!"],(c=function(){return(c.$$s||this).$size()},c.$$s=this,c.$$arity=0,c));a=this.length;u(this,"keep_if",[],b.$to_proc());return this.length===a?x:this},L.$$arity=0);b.def(C,"$shift",Aa=function(a){if(h(void 0===a)){if(h(0===this.length))return x;a=this[0];for(var b=1,c=this.length;b<c;b++)this[b-1]=this[b];this.pop();return a}a=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int");h(0>a)&&this.$raise(g(J,"ArgumentError"),"negative array size"); -return h(0===this.length)?[]:this.splice(0,a)},Aa.$$arity=-1);b.alias(C,"size","length");b.def(C,"$shuffle",Ta=function(a){return this.$dup().$to_a()["$shuffle!"](a)},Ta.$$arity=-1);b.def(C,"$shuffle!",K=function(a){var b,c=this.length;void 0!==a&&(a=g(J,"Opal")["$coerce_to?"](a,g(J,"Hash"),"to_hash"),a!==x&&(a=a["$[]"]("random"),a!==x&&a["$respond_to?"]("rand")&&(b=a)));for(;c;){b?(a=b.$rand(c).$to_int(),0>a&&this.$raise(g(J,"RangeError"),"random number too small "+a),a>=c&&this.$raise(g(J,"RangeError"), -"random number too big "+a)):a=this.$rand(c);var e=this[--c];this[c]=this[a];this[a]=e}return this},K.$$arity=-1);b.alias(C,"slice","[]");b.def(C,"$slice!",Ea=function(a,b){if(h(void 0===b))if(h(g(J,"Range")["$==="](a))){var c=this["$[]"](a);b=g(J,"Opal").$coerce_to(a.$begin(),g(J,"Integer"),"to_int");var e=g(J,"Opal").$coerce_to(a.$end(),g(J,"Integer"),"to_int");0>b&&(b+=this.length);0>e?e+=this.length:e>=this.length&&(e=this.length-1,a.excl&&(e+=1));var f=e-b;a.excl?--e:f+=1;b<this.length&&0<=b&& -e<this.length&&0<=e&&0<f&&this.splice(b,f)}else{a=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int");0>a&&(a+=this.length);if(0>a||a>=this.length)return x;c=this[a];0===a?this.shift():this.splice(a,1)}else{a=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int");b=g(J,"Opal").$coerce_to(b,g(J,"Integer"),"to_int");if(0>b)return x;c=this["$[]"](a,b);0>a&&(a+=this.length);a+b>this.length&&(b=this.length-a);a<this.length&&0<=a&&this.splice(a,b)}return c},Ea.$$arity=-2);b.def(C,"$sort",W=function(){var a=W.$$p, -b=a||x,c=this;a&&(W.$$p=null);a&&(W.$$p=null);if(!h(1<c.length))return c;b===x&&(b=function(a,b){return a["$<=>"](b)});return c.slice().sort(function(a,e){var f=b(a,e);f===x&&c.$raise(g(J,"ArgumentError"),"comparison of "+a.$inspect()+" with "+e.$inspect()+" failed");return t(f,0)?1:("number"===typeof f?0>f:f["$<"](0))?-1:0})},W.$$arity=0);b.def(C,"$sort!",La=function(){var a=La.$$p,b=a||x;a&&(La.$$p=null);a&&(La.$$p=null);a=b!==x?u(this.slice(),"sort",[],b.$to_proc()):this.slice().$sort();b=this.length= -0;for(var c=a.length;b<c;b++)this.push(a[b]);return this},La.$$arity=0);b.def(C,"$sort_by!",ya=function(){var a=ya.$$p,b=a||x,c;a&&(ya.$$p=null);a&&(ya.$$p=null);return b===x?u(this,"enum_for",["sort_by!"],(c=function(){return(c.$$s||this).$size()},c.$$s=this,c.$$arity=0,c)):this.$replace(u(this,"sort_by",[],b.$to_proc()))},ya.$$arity=0);b.def(C,"$take",mb=function(a){0>a&&this.$raise(g(J,"ArgumentError"));return this.slice(0,a)},mb.$$arity=1);b.def(C,"$take_while",gb=function(){var a=gb.$$p,b=a|| -x;a&&(gb.$$p=null);a&&(gb.$$p=null);a=[];for(var c=0,e=this.length,f,d;c<e;c++){f=this[c];d=b(f);if(!1===d||d===x)break;a.push(f)}return a},gb.$$arity=0);b.def(C,"$to_a",kb=function(){return this},kb.$$arity=0);b.alias(C,"to_ary","to_a");b.def(C,"$to_h",eb=function(){var a,c=this.length,e=B([],{});for(a=0;a<c;a++){var f=g(J,"Opal")["$coerce_to?"](this[a],g(J,"Array"),"to_ary");f.$$is_array||this.$raise(g(J,"TypeError"),"wrong element type "+f.$class()+" at "+a+" (expected array)");2!==f.length&&this.$raise(g(J, -"ArgumentError"),"wrong array length at "+a+" (expected 2, was "+f.$length()+")");var d=f[0];f=f[1];b.hash_put(e,d,f)}return e},eb.$$arity=0);b.alias(C,"to_s","inspect");b.def(C,"$transpose",lb=function(){var a,c=x,e=x;if(h(this["$empty?"]()))return[];c=[];e=x;u(this,"each",[],(a=function(f){var d=a.$$s||this,k,p;null==f&&(f=x);f=h(g(J,"Array")["$==="](f))?f.$to_a():g(J,"Opal").$coerce_to(f,g(J,"Array"),"to_ary").$to_a();e=h(k=e)?k:f.length;h(f.length["$!="](e))&&d.$raise(g(J,"IndexError"),"element size differs ("+ -f.length+" should be "+e+")");return u(f.length,"times",[],(p=function(a){var e;null==a&&(a=x);if(!h(e=c["$[]"](a))){e=[a,[]];u(c,"[]=",b.to_a(e));var d=e.length;d="number"===typeof d?d-1:d["$-"](1);e=e[d]}return e["$<<"](f.$at(a))},p.$$s=d,p.$$arity=1,p))},a.$$s=this,a.$$arity=1,a));return c},lb.$$arity=0);b.def(C,"$uniq",Sa=function(){var a=Sa.$$p,c=a||x;a&&(Sa.$$p=null);a&&(Sa.$$p=null);a=B([],{});var e;if(c===x){var f=0;for(e=this.length;f<e;f++){var d=this[f];void 0===b.hash_get(a,d)&&b.hash_put(a, -d,d)}}else for(f=0,e=this.length;f<e;f++){d=this[f];var k=b.yield1(c,d);void 0===b.hash_get(a,k)&&b.hash_put(a,k,d)}return H(a.$values(),this.$class())},Sa.$$arity=0);b.def(C,"$uniq!",db=function(){var a=db.$$p,c=a||x;a&&(db.$$p=null);a&&(db.$$p=null);a=this.length;var e=B([],{}),f;var d=0;for(f=a;d<f;d++){var k=this[d];var p=c===x?k:b.yield1(c,k);void 0===b.hash_get(e,p)?b.hash_put(e,p,k):(this.splice(d,1),f--,d--)}return this.length===a?x:this},db.$$arity=0);b.def(C,"$unshift",fb=function(a){var c= -b.slice.call(arguments,0,arguments.length);for(var e=c.length-1;0<=e;e--)this.unshift(c[e]);return this},fb.$$arity=-1);b.alias(C,"prepend","unshift");b.def(C,"$values_at",ob=function(a){var c,e=x;var f=b.slice.call(arguments,0,arguments.length);e=[];u(f,"each",[],(c=function(a){var b=c.$$s||this,f,d=x,k=x;d=x;null==a&&(a=x);if(h(a["$is_a?"](g(J,"Range")))){d=g(J,"Opal").$coerce_to(a.$last(),g(J,"Integer"),"to_int");k=g(J,"Opal").$coerce_to(a.$first(),g(J,"Integer"),"to_int");if(0>k)return k+=b.length, -x;0>d&&(d+=b.length);a["$exclude_end?"]()&&d--;return d<k?x:u(k,"upto",[d],(f=function(a){var b=f.$$s||this;null==a&&(a=x);return e["$<<"](b.$at(a))},f.$$s=b,f.$$arity=1,f))}d=g(J,"Opal").$coerce_to(a,g(J,"Integer"),"to_int");return e["$<<"](b.$at(d))},c.$$s=this,c.$$arity=1,c));return e},ob.$$arity=-1);b.def(C,"$zip",hb=function(a){var c=hb.$$p,e=c||x,f;c&&(hb.$$p=null);c&&(hb.$$p=null);c=b.slice.call(arguments,0,arguments.length);var d=[],k=this.length,p,w;var l=0;for(w=c.length;l<w;l++){var ya= -c[l];ya.$$is_array||(ya.$$is_enumerator?Infinity===ya.$size()?c[l]=ya.$take(k):c[l]=ya.$to_a():c[l]=(h(f=g(J,"Opal")["$coerce_to?"](ya,g(J,"Array"),"to_ary"))?f:g(J,"Opal")["$coerce_to!"](ya,g(J,"Enumerator"),"each")).$to_a())}for(p=0;p<k;p++){f=[this[p]];l=0;for(w=c.length;l<w;l++)ya=c[l][p],null==ya&&(ya=x),f[l+1]=ya;d[p]=f}if(e!==x){for(p=0;p<k;p++)e(d[p]);return x}return d},hb.$$arity=-1);b.defs(C,"$inherited",pb=function(a){a.$$prototype.$to_a=function(){return this.slice(0,this.length)}},pb.$$arity= -1);b.def(C,"$instance_variables",cb=function(){var a,c=cb.$$p,e=x,f=x,d=x;c&&(cb.$$p=null);f=0;d=arguments.length;for(e=Array(d);f<d;f++)e[f]=arguments[f];return u(u(this,b.find_super_dispatcher(this,"instance_variables",cb,!1),e,c),"reject",[],(a=function(a){var b;null==a&&(a=x);return h(b=/^@\d+$/.test(a))?b:a["$=="]("@length")},a.$$s=this,a.$$arity=1,a))},cb.$$arity=0);g(J,"Opal").$pristine(C.$singleton_class(),"allocate");g(J,"Opal").$pristine(C,"copy_instance_variables","initialize_dup");return(b.def(C, -"$pack",qb=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise("To use Array#pack, you must first require 'corelib/array/pack'.")},qb.$$arity=-1),x)&&"pack"}(D[0],Array,D)}; -Opal.modules["corelib/hash"]=function(b){function t(b,g){return"number"===typeof b&&"number"===typeof g?b>=g:b["$>="](g)}var y=b.top,D=[],x=b.nil,r=b.const_get_relative,g=b.klass,G=b.send,h=b.hash2,B=b.truthy;b.add_stubs("$require $include $coerce_to? $[] $merge! $allocate $raise $coerce_to! $each $fetch $>= $> $== $compare_by_identity $lambda? $abs $arity $enum_for $size $respond_to? $class $dig $new $inspect $map $to_proc $flatten $eql? $default $dup $default_proc $default_proc= $- $default= $proc".split(" "));y.$require("corelib/enumerable"); -return function(u,$super,D){u=g(u,$super,"Hash");var y=[u].concat(D),I,H,m,P,R,C,J,ha,Y,a,d,v,E,N,q,l,c,A,p,S,M,k,e,f,X,ba,ia,T,U,Z,z,ra,F,ua,ja,va,pa,qa,ea,Ba,Na,Fa,za,fa,sa,V,ma,ca,Ma,la,Oa,aa,na,Ha,Wa,Pa,ab,ka,wa,da,xa,Ca;u.$include(r(y,"Enumerable"));u.$$prototype.$$is_hash=!0;b.defs(u,"$[]",I=function(a){var c=b.slice.call(arguments,0,arguments.length);var e=c.length,f;if(1===e){var d=r(y,"Opal")["$coerce_to?"](c["$[]"](0),r(y,"Hash"),"to_hash");if(d!==x)return this.$allocate()["$merge!"](d); -c=r(y,"Opal")["$coerce_to?"](c["$[]"](0),r(y,"Array"),"to_ary");c===x&&this.$raise(r(y,"ArgumentError"),"odd number of arguments for Hash");e=c.length;d=this.$allocate();for(f=0;f<e;f++)if(c[f].$$is_array)switch(c[f].length){case 1:d.$store(c[f][0],x);break;case 2:d.$store(c[f][0],c[f][1]);break;default:this.$raise(r(y,"ArgumentError"),"invalid number of elements ("+c[f].length+" for 1..2)")}return d}0!==e%2&&this.$raise(r(y,"ArgumentError"),"odd number of arguments for Hash");d=this.$allocate(); -for(f=0;f<e;f+=2)d.$store(c[f],c[f+1]);return d},I.$$arity=-1);b.defs(u,"$allocate",H=function(){var a=new this.$$constructor;b.hash_init(a);a.$$none=x;a.$$proc=x;return a},H.$$arity=0);b.defs(u,"$try_convert",m=function(a){return r(y,"Opal")["$coerce_to?"](a,r(y,"Hash"),"to_hash")},m.$$arity=1);b.def(u,"$initialize",P=function(a){var b=P.$$p,c=b||x;b&&(P.$$p=null);b&&(P.$$p=null);void 0!==a&&c!==x&&this.$raise(r(y,"ArgumentError"),"wrong number of arguments (1 for 0)");this.$$none=void 0===a?x:a; -this.$$proc=c;return this},P.$$arity=-1);b.def(u,"$==",R=function(a){if(this===a)return!0;if(!a.$$is_hash||this.$$keys.length!==a.$$keys.length)return!1;for(var c=0,e=this.$$keys,f=e.length,d,k;c<f;c++)if(d=e[c],d.$$is_string?(k=this.$$smap[d],d=a.$$smap[d]):(k=d.value,d=b.hash_get(a,d.key)),void 0===d||!k["$eql?"](d))return!1;return!0},R.$$arity=1);b.def(u,"$>=",C=function(a){var b,c=x;a=r(y,"Opal")["$coerce_to!"](a,r(y,"Hash"),"to_hash");if(this.$$keys.length<a.$$keys.length)return!1;c=!0;G(a,"each", -[],(b=function(a,e){var f=b.$$s||this;null==a&&(a=x);null==e&&(e=x);a=f.$fetch(a,null);if(null==a||a!==e)c=!1},b.$$s=this,b.$$arity=2,b));return c},C.$$arity=1);b.def(u,"$>",J=function(a){a=r(y,"Opal")["$coerce_to!"](a,r(y,"Hash"),"to_hash");return this.$$keys.length<=a.$$keys.length?!1:t(this,a)},J.$$arity=1);b.def(u,"$<",ha=function(a){a=r(y,"Opal")["$coerce_to!"](a,r(y,"Hash"),"to_hash");return"number"===typeof a&&"number"===typeof this?a>this:a["$>"](this)},ha.$$arity=1);b.def(u,"$<=",Y=function(a){a= -r(y,"Opal")["$coerce_to!"](a,r(y,"Hash"),"to_hash");return t(a,this)},Y.$$arity=1);b.def(u,"$[]",a=function(a){var c=b.hash_get(this,a);return void 0!==c?c:this.$default(a)},a.$$arity=1);b.def(u,"$[]=",d=function(a,c){b.hash_put(this,a,c);return c},d.$$arity=2);b.def(u,"$assoc",v=function(a){for(var b=0,c=this.$$keys,e=c.length,f;b<e;b++)if(f=c[b],f.$$is_string){if(f["$=="](a))return[f,this.$$smap[f]]}else if(f.key["$=="](a))return[f.key,f.value];return x},v.$$arity=1);b.def(u,"$clear",E=function(){b.hash_init(this); -return this},E.$$arity=0);b.def(u,"$clone",N=function(){var a=new this.$$class;b.hash_init(a);b.hash_clone(this,a);return a},N.$$arity=0);b.def(u,"$compact",q=function(){for(var a=b.hash(),c=0,e=this.$$keys,f=e.length,d,k;c<f;c++)d=e[c],d.$$is_string?k=this.$$smap[d]:(k=d.value,d=d.key),k!==x&&b.hash_put(a,d,k);return a},q.$$arity=0);b.def(u,"$compact!",l=function(){for(var a=!1,c=0,e=this.$$keys,f=e.length,d,k;c<f;c++)d=e[c],d.$$is_string?k=this.$$smap[d]:(k=d.value,d=d.key),k===x&&void 0!==b.hash_delete(this, -d)&&(a=!0,f--,c--);return a?this:x},l.$$arity=0);b.def(u,"$compare_by_identity",c=function(){var a,c=this.$$keys;if(this.$$by_identity)return this;if(0===this.$$keys.length)return this.$$by_identity=!0,this;var e=h([],{}).$compare_by_identity();var f=0;for(a=c.length;f<a;f++){var d=c[f];d.$$is_string||(d=d.key);b.hash_put(e,d,b.hash_get(this,d))}this.$$by_identity=!0;this.$$map=e.$$map;this.$$smap=e.$$smap;return this},c.$$arity=0);b.def(u,"$compare_by_identity?",A=function(){return!0===this.$$by_identity}, -A.$$arity=0);b.def(u,"$default",p=function(a){return void 0!==a&&this.$$proc!==x&&void 0!==this.$$proc?this.$$proc.$call(this,a):void 0===this.$$none?x:this.$$none},p.$$arity=-1);b.def(u,"$default=",S=function(a){this.$$proc=x;return this.$$none=a},S.$$arity=1);b.def(u,"$default_proc",M=function(){return void 0!==this.$$proc?this.$$proc:x},M.$$arity=0);b.def(u,"$default_proc=",k=function(a){var b=a;b!==x&&(b=r(y,"Opal")["$coerce_to!"](b,r(y,"Proc"),"to_proc"),b["$lambda?"]()&&2!==b.$arity().$abs()&& -this.$raise(r(y,"TypeError"),"default_proc takes two arguments"));this.$$none=x;this.$$proc=b;return a},k.$$arity=1);b.def(u,"$delete",e=function(a){var c=e.$$p,f=c||x;c&&(e.$$p=null);c&&(e.$$p=null);c=b.hash_delete(this,a);return void 0!==c?c:f!==x?b.yield1(f,a):x},e.$$arity=1);b.def(u,"$delete_if",f=function(){var a=f.$$p,c=a||x,e;a&&(f.$$p=null);a&&(f.$$p=null);if(!B(c))return G(this,"enum_for",["delete_if"],(e=function(){return(e.$$s||this).$size()},e.$$s=this,e.$$arity=0,e));a=0;for(var d=this.$$keys, -k=d.length,p,l;a<k;a++)p=d[a],p.$$is_string?l=this.$$smap[p]:(l=p.value,p=p.key),l=c(p,l),!1!==l&&l!==x&&void 0!==b.hash_delete(this,p)&&(k--,a--);return this},f.$$arity=0);b.alias(u,"dup","clone");b.def(u,"$dig",X=function(a,c){var e=b.slice.call(arguments,1,arguments.length);var f=this["$[]"](a);if(f===x||0===e.length)return f;B(f["$respond_to?"]("dig"))||this.$raise(r(y,"TypeError"),""+f.$class()+" does not have #dig method");return G(f,"dig",b.to_a(e))},X.$$arity=-2);b.def(u,"$each",ba=function(){var a= -ba.$$p,c=a||x,e;a&&(ba.$$p=null);a&&(ba.$$p=null);if(!B(c))return G(this,"enum_for",["each"],(e=function(){return(e.$$s||this).$size()},e.$$s=this,e.$$arity=0,e));a=0;for(var f=this.$$keys,d=f.length,k,p;a<d;a++)k=f[a],k.$$is_string?p=this.$$smap[k]:(p=k.value,k=k.key),b.yield1(c,[k,p]);return this},ba.$$arity=0);b.def(u,"$each_key",ia=function(){var a=ia.$$p,b=a||x,c;a&&(ia.$$p=null);a&&(ia.$$p=null);if(!B(b))return G(this,"enum_for",["each_key"],(c=function(){return(c.$$s||this).$size()},c.$$s= -this,c.$$arity=0,c));a=0;for(var e=this.$$keys,f=e.length,d;a<f;a++)d=e[a],b(d.$$is_string?d:d.key);return this},ia.$$arity=0);b.alias(u,"each_pair","each");b.def(u,"$each_value",T=function(){var a=T.$$p,b=a||x,c;a&&(T.$$p=null);a&&(T.$$p=null);if(!B(b))return G(this,"enum_for",["each_value"],(c=function(){return(c.$$s||this).$size()},c.$$s=this,c.$$arity=0,c));a=0;for(var e=this.$$keys,f=e.length,d;a<f;a++)d=e[a],b(d.$$is_string?this.$$smap[d]:d.value);return this},T.$$arity=0);b.def(u,"$empty?", -U=function(){return 0===this.$$keys.length},U.$$arity=0);b.alias(u,"eql?","==");b.def(u,"$fetch",Z=function(a,c){var e=Z.$$p,f=e||x;e&&(Z.$$p=null);e&&(Z.$$p=null);e=b.hash_get(this,a);return void 0!==e?e:f!==x?f(a):void 0!==c?c:this.$raise(r(y,"KeyError").$new("key not found: "+a.$inspect(),h(["key","receiver"],{key:a,receiver:this})))},Z.$$arity=-2);b.def(u,"$fetch_values",z=function(a){var c=z.$$p,e=c||x,f;c&&(z.$$p=null);c&&(z.$$p=null);c=b.slice.call(arguments,0,arguments.length);return G(c, -"map",[],(f=function(a){var b=f.$$s||this;null==a&&(a=x);return G(b,"fetch",[a],e.$to_proc())},f.$$s=this,f.$$arity=1,f))},z.$$arity=-1);b.def(u,"$flatten",ra=function(a){null==a&&(a=1);a=r(y,"Opal")["$coerce_to!"](a,r(y,"Integer"),"to_int");for(var b=[],c=0,e=this.$$keys,f=e.length,d,k;c<f;c++)d=e[c],d.$$is_string?k=this.$$smap[d]:(k=d.value,d=d.key),b.push(d),k.$$is_array?1===a?b.push(k):b=b.concat(k.$flatten(a-2)):b.push(k);return b},ra.$$arity=-1);b.def(u,"$has_key?",F=function(a){return void 0!== -b.hash_get(this,a)},F.$$arity=1);b.def(u,"$has_value?",ua=function(a){for(var b=0,c=this.$$keys,e=c.length,f;b<e;b++)if(f=c[b],(f.$$is_string?this.$$smap[f]:f.value)["$=="](a))return!0;return!1},ua.$$arity=1);b.def(u,"$hash",ja=function(){var a=void 0===b.hash_ids,c=this.$object_id(),e=["Hash"];try{a&&(b.hash_ids=Object.create(null));if(b[c])return"self";for(p in b.hash_ids){var f=b.hash_ids[p];if(this["$eql?"](f))return"self"}b.hash_ids[c]=this;c=0;for(var d=this.$$keys,k=d.length;c<k;c++){var p= -d[c];p.$$is_string?e.push([p,this.$$smap[p].$hash()]):e.push([p.key_hash,p.value.$hash()])}return e.sort().join()}finally{a&&(b.hash_ids=void 0)}},ja.$$arity=0);b.alias(u,"include?","has_key?");b.def(u,"$index",va=function(a){for(var b=0,c=this.$$keys,e=c.length,f,d;b<e;b++)if(f=c[b],f.$$is_string?d=this.$$smap[f]:(d=f.value,f=f.key),d["$=="](a))return f;return x},va.$$arity=1);b.def(u,"$indexes",pa=function(a){var c=b.slice.call(arguments,0,arguments.length);for(var e=[],f=0,d=c.length,k;f<d;f++)k= -c[f],k=b.hash_get(this,k),void 0===k?e.push(this.$default()):e.push(k);return e},pa.$$arity=-1);b.alias(u,"indices","indexes");var ta;b.def(u,"$inspect",qa=function(){var a=void 0===ta,b=this.$object_id(),c=[];try{a&&(ta={});if(ta.hasOwnProperty(b))return"{...}";ta[b]=!0;b=0;for(var e=this.$$keys,f=e.length,d,k;b<f;b++)d=e[b],d.$$is_string?k=this.$$smap[d]:(k=d.value,d=d.key),c.push(d.$inspect()+"=>"+k.$inspect());return"{"+c.join(", ")+"}"}finally{a&&(ta=void 0)}},qa.$$arity=0);b.def(u,"$invert", -ea=function(){for(var a=b.hash(),c=0,e=this.$$keys,f=e.length,d,k;c<f;c++)d=e[c],d.$$is_string?k=this.$$smap[d]:(k=d.value,d=d.key),b.hash_put(a,k,d);return a},ea.$$arity=0);b.def(u,"$keep_if",Ba=function(){var a=Ba.$$p,c=a||x,e;a&&(Ba.$$p=null);a&&(Ba.$$p=null);if(!B(c))return G(this,"enum_for",["keep_if"],(e=function(){return(e.$$s||this).$size()},e.$$s=this,e.$$arity=0,e));a=0;for(var f=this.$$keys,d=f.length,k,p;a<d;a++)k=f[a],k.$$is_string?p=this.$$smap[k]:(p=k.value,k=k.key),p=c(k,p),!1!==p&& -p!==x||void 0===b.hash_delete(this,k)||(d--,a--);return this},Ba.$$arity=0);b.alias(u,"key","index");b.alias(u,"key?","has_key?");b.def(u,"$keys",Na=function(){for(var a=[],b=0,c=this.$$keys,e=c.length,f;b<e;b++)f=c[b],f.$$is_string?a.push(f):a.push(f.key);return a},Na.$$arity=0);b.def(u,"$length",Fa=function(){return this.$$keys.length},Fa.$$arity=0);b.alias(u,"member?","has_key?");b.def(u,"$merge",za=function(a){var b=za.$$p,c=b||x;b&&(za.$$p=null);b&&(za.$$p=null);return G(this.$dup(),"merge!", -[a],c.$to_proc())},za.$$arity=1);b.def(u,"$merge!",fa=function(a){var c=fa.$$p,e=c||x;c&&(fa.$$p=null);c&&(fa.$$p=null);a.$$is_hash||(a=r(y,"Opal")["$coerce_to!"](a,r(y,"Hash"),"to_hash"));var f=a.$$keys,d=f.length;if(e===x){for(c=0;c<d;c++){var k=f[c];if(k.$$is_string)var p=a.$$smap[k];else p=k.value,k=k.key;b.hash_put(this,k,p)}return this}for(c=0;c<d;c++){k=f[c];k.$$is_string?p=a.$$smap[k]:(p=k.value,k=k.key);var l=b.hash_get(this,k);void 0===l?b.hash_put(this,k,p):b.hash_put(this,k,e(k,l,p))}return this}, -fa.$$arity=1);b.def(u,"$rassoc",sa=function(a){for(var b=0,c=this.$$keys,e=c.length,f,d;b<e;b++)if(f=c[b],f.$$is_string?d=this.$$smap[f]:(d=f.value,f=f.key),d["$=="](a))return[f,d];return x},sa.$$arity=1);b.def(u,"$rehash",V=function(){b.hash_rehash(this);return this},V.$$arity=0);b.def(u,"$reject",ma=function(){var a=ma.$$p,c=a||x,e;a&&(ma.$$p=null);a&&(ma.$$p=null);if(!B(c))return G(this,"enum_for",["reject"],(e=function(){return(e.$$s||this).$size()},e.$$s=this,e.$$arity=0,e));a=b.hash();for(var f= -0,d=this.$$keys,k=d.length,p,l,q;f<k;f++)p=d[f],p.$$is_string?l=this.$$smap[p]:(l=p.value,p=p.key),q=c(p,l),!1!==q&&q!==x||b.hash_put(a,p,l);return a},ma.$$arity=0);b.def(u,"$reject!",ca=function(){var a=ca.$$p,c=a||x,e;a&&(ca.$$p=null);a&&(ca.$$p=null);if(!B(c))return G(this,"enum_for",["reject!"],(e=function(){return(e.$$s||this).$size()},e.$$s=this,e.$$arity=0,e));a=!1;for(var f=0,d=this.$$keys,k=d.length,p,l;f<k;f++)p=d[f],p.$$is_string?l=this.$$smap[p]:(l=p.value,p=p.key),l=c(p,l),!1!==l&&l!== -x&&void 0!==b.hash_delete(this,p)&&(a=!0,k--,f--);return a?this:x},ca.$$arity=0);b.def(u,"$replace",Ma=function(a){a=r(y,"Opal")["$coerce_to!"](a,r(y,"Hash"),"to_hash");b.hash_init(this);var c=0;for(var e=a.$$keys,f=e.length,d,k;c<f;c++)d=e[c],d.$$is_string?k=a.$$smap[d]:(k=d.value,d=d.key),b.hash_put(this,d,k);B(a.$default_proc())?(c=[a.$default_proc()],G(this,"default_proc=",b.to_a(c))):(c=[a.$default()],G(this,"default=",b.to_a(c)));a=c;c=c.length;c="number"===typeof c?c-1:c["$-"](1);a[c];return this}, -Ma.$$arity=1);b.def(u,"$select",la=function(){var a=la.$$p,c=a||x,e;a&&(la.$$p=null);a&&(la.$$p=null);if(!B(c))return G(this,"enum_for",["select"],(e=function(){return(e.$$s||this).$size()},e.$$s=this,e.$$arity=0,e));a=b.hash();for(var f=0,d=this.$$keys,k=d.length,p,l,q;f<k;f++)p=d[f],p.$$is_string?l=this.$$smap[p]:(l=p.value,p=p.key),q=c(p,l),!1!==q&&q!==x&&b.hash_put(a,p,l);return a},la.$$arity=0);b.def(u,"$select!",Oa=function(){var a=Oa.$$p,c=a||x,e;a&&(Oa.$$p=null);a&&(Oa.$$p=null);if(!B(c))return G(this, -"enum_for",["select!"],(e=function(){return(e.$$s||this).$size()},e.$$s=this,e.$$arity=0,e));a=x;for(var f=0,d=this.$$keys,k=d.length,p,l;f<k;f++)if(p=d[f],p.$$is_string?l=this.$$smap[p]:(l=p.value,p=p.key),l=c(p,l),!1===l||l===x)void 0!==b.hash_delete(this,p)&&(k--,f--),a=this;return a},Oa.$$arity=0);b.def(u,"$shift",aa=function(){var a=this.$$keys;return 0<a.length?(a=a[0],a=a.$$is_string?a:a.key,[a,b.hash_delete(this,a)]):this.$default(x)},aa.$$arity=0);b.alias(u,"size","length");b.def(u,"$slice", -na=function(a){var c=b.slice.call(arguments,0,arguments.length);for(var e=b.hash(),f=0,d=c.length;f<d;f++){var k=c[f],p=b.hash_get(this,k);void 0!==p&&b.hash_put(e,k,p)}return e},na.$$arity=-1);b.alias(u,"store","[]=");b.def(u,"$to_a",Ha=function(){for(var a=[],b=0,c=this.$$keys,e=c.length,f,d;b<e;b++)f=c[b],f.$$is_string?d=this.$$smap[f]:(d=f.value,f=f.key),a.push([f,d]);return a},Ha.$$arity=0);b.def(u,"$to_h",Wa=function(){if(this.$$class===b.Hash)return this;var a=new b.Hash;b.hash_init(a);b.hash_clone(this, -a);return a},Wa.$$arity=0);b.def(u,"$to_hash",Pa=function(){return this},Pa.$$arity=0);b.def(u,"$to_proc",ab=function(){var a;return G(this,"proc",[],(a=function(b){var c=a.$$s||this;null==b&&c.$raise(r(y,"ArgumentError"),"no key given");return c["$[]"](b)},a.$$s=this,a.$$arity=-1,a))},ab.$$arity=0);b.alias(u,"to_s","inspect");b.def(u,"$transform_keys",ka=function(){var a=ka.$$p,c=a||x,e;a&&(ka.$$p=null);a&&(ka.$$p=null);if(!B(c))return G(this,"enum_for",["transform_keys"],(e=function(){return(e.$$s|| -this).$size()},e.$$s=this,e.$$arity=0,e));a=b.hash();for(var f=0,d=this.$$keys,k=d.length,p,l;f<k;f++)p=d[f],p.$$is_string?l=this.$$smap[p]:(l=p.value,p=p.key),p=b.yield1(c,p),b.hash_put(a,p,l);return a},ka.$$arity=0);b.def(u,"$transform_keys!",wa=function(){var a=wa.$$p,c=a||x,e;a&&(wa.$$p=null);a&&(wa.$$p=null);if(!B(c))return G(this,"enum_for",["transform_keys!"],(e=function(){return(e.$$s||this).$size()},e.$$s=this,e.$$arity=0,e));a=b.slice.call(this.$$keys);var f,d=a.length;for(f=0;f<d;f++){var k= -a[f];if(k.$$is_string)var p=this.$$smap[k];else p=k.value,k=k.key;var l=b.yield1(c,k);b.hash_delete(this,k);b.hash_put(this,l,p)}return this},wa.$$arity=0);b.def(u,"$transform_values",da=function(){var a=da.$$p,c=a||x,e;a&&(da.$$p=null);a&&(da.$$p=null);if(!B(c))return G(this,"enum_for",["transform_values"],(e=function(){return(e.$$s||this).$size()},e.$$s=this,e.$$arity=0,e));a=b.hash();for(var f=0,d=this.$$keys,k=d.length,p,l;f<k;f++)p=d[f],p.$$is_string?l=this.$$smap[p]:(l=p.value,p=p.key),l=b.yield1(c, -l),b.hash_put(a,p,l);return a},da.$$arity=0);b.def(u,"$transform_values!",xa=function(){var a=xa.$$p,c=a||x,e;a&&(xa.$$p=null);a&&(xa.$$p=null);if(!B(c))return G(this,"enum_for",["transform_values!"],(e=function(){return(e.$$s||this).$size()},e.$$s=this,e.$$arity=0,e));a=0;for(var f=this.$$keys,d=f.length,k,p;a<d;a++)k=f[a],k.$$is_string?p=this.$$smap[k]:(p=k.value,k=k.key),p=b.yield1(c,p),b.hash_put(this,k,p);return this},xa.$$arity=0);b.alias(u,"update","merge!");b.alias(u,"value?","has_value?"); -b.alias(u,"values_at","indexes");return(b.def(u,"$values",Ca=function(){for(var a=[],b=0,c=this.$$keys,e=c.length,f;b<e;b++)f=c[b],f.$$is_string?a.push(this.$$smap[f]):a.push(f.value);return a},Ca.$$arity=0),x)&&"values"}(D[0],null,D)}; -Opal.modules["corelib/number"]=function(b){function t(b,g){return"number"===typeof b&&"number"===typeof g?b>g:b["$>"](g)}function y(b,g){return"number"===typeof b&&"number"===typeof g?b<g:b["$<"](g)}function D(b,g){return"number"===typeof b&&"number"===typeof g?b+g:b["$+"](g)}function x(b,g){return"number"===typeof b&&"number"===typeof g?b-g:b["$-"](g)}function r(b,g){return"number"===typeof b&&"number"===typeof g?b/g:b["$/"](g)}function g(b,g){return"number"===typeof b&&"number"===typeof g?b*g:b["$*"](g)} -var G=b.top,h=[],B=b.nil,u=b.const_get_qualified,n=b.const_get_relative,P=b.klass,O=b.truthy,I=b.send,H=b.hash2;b.add_stubs("$require $bridge $raise $name $class $Float $respond_to? $coerce_to! $__coerced__ $=== $! $> $** $new $< $to_f $== $nan? $infinite? $enum_for $+ $- $gcd $lcm $% $/ $frexp $to_i $ldexp $rationalize $* $<< $to_r $truncate $-@ $size $<= $>= $<=> $compare $any?".split(" "));G.$require("corelib/numeric");(function(m,$super,h){m=P(m,$super,"Number");var C=[m].concat(h),J,G,R,a,d, -v,E,N,q,l,c,A,p,S,M,k,e,f,X,ba,ia,T,U,Z,z,ra,F,ua,ja,va,pa,qa,ea,Ba,Na,Fa,za,fa,sa,V,ma,ca,Ma,la,Oa,aa,na,Ha,Wa,Pa,ab,ka,wa,da,xa,Ca,ta,Ia,Ga,Ja,Xa,Qa,Ra,Da,Ka,Ya,Va,Za,$a,bb,Ua,w;n(C,"Opal").$bridge(Number,m);b.defineProperty(m.$$prototype,"$$is_number",!0);m.$$is_number_class=!0;(function(a,c){var e=[a].concat(c),f;b.def(a,"$allocate",f=function(){return this.$raise(n(e,"TypeError"),"allocator undefined for "+this.$name())},f.$$arity=0);b.udef(a,"$new");return B})(b.get_singleton_class(m),C);b.def(m, -"$coerce",J=function(a){if(a!==B){if(a.$$is_string)return[this.$Float(a),this];if(a["$respond_to?"]("to_f"))return[n(C,"Opal")["$coerce_to!"](a,n(C,"Float"),"to_f"),this];if(a.$$is_number)return[a,this]}this.$raise(n(C,"TypeError"),"can't convert "+a.$class()+" into Float")},J.$$arity=1);b.def(m,"$__id__",G=function(){return 2*this+1},G.$$arity=0);b.alias(m,"object_id","__id__");b.def(m,"$+",R=function(a){return a.$$is_number?this+a:this.$__coerced__("+",a)},R.$$arity=1);b.def(m,"$-",a=function(a){return a.$$is_number? -this-a:this.$__coerced__("-",a)},a.$$arity=1);b.def(m,"$*",d=function(a){return a.$$is_number?this*a:this.$__coerced__("*",a)},d.$$arity=1);b.def(m,"$/",v=function(a){return a.$$is_number?this/a:this.$__coerced__("/",a)},v.$$arity=1);b.alias(m,"fdiv","/");b.def(m,"$%",E=function(a){if(a.$$is_number){if(-Infinity==a)return a;if(0==a)this.$raise(n(C,"ZeroDivisionError"),"divided by 0");else return 0>a||0>this?(this%a+a)%a:this%a}else return this.$__coerced__("%",a)},E.$$arity=1);b.def(m,"$&",N=function(a){return a.$$is_number? -this&a:this.$__coerced__("&",a)},N.$$arity=1);b.def(m,"$|",q=function(a){return a.$$is_number?this|a:this.$__coerced__("|",a)},q.$$arity=1);b.def(m,"$^",l=function(a){return a.$$is_number?this^a:this.$__coerced__("^",a)},l.$$arity=1);b.def(m,"$<",c=function(a){return a.$$is_number?this<a:this.$__coerced__("<",a)},c.$$arity=1);b.def(m,"$<=",A=function(a){return a.$$is_number?this<=a:this.$__coerced__("<=",a)},A.$$arity=1);b.def(m,"$>",p=function(a){return a.$$is_number?this>a:this.$__coerced__(">", -a)},p.$$arity=1);b.def(m,"$>=",S=function(a){return a.$$is_number?this>=a:this.$__coerced__(">=",a)},S.$$arity=1);b.def(m,"$<=>",M=function(a){try{return a.$$is_number?isNaN(this)||isNaN(a)?B:this>a?1:this<a?-1:0:this.$__coerced__("<=>",a)}catch(L){if(b.rescue(L,[n(C,"ArgumentError")]))try{return B}finally{b.pop_exception()}else throw L;}},M.$$arity=1);b.def(m,"$<<",k=function(a){a=n(C,"Opal")["$coerce_to!"](a,n(C,"Integer"),"to_int");return 0<a?this<<a:this>>-a},k.$$arity=1);b.def(m,"$>>",e=function(a){a= -n(C,"Opal")["$coerce_to!"](a,n(C,"Integer"),"to_int");return 0<a?this>>a:this<<-a},e.$$arity=1);b.def(m,"$[]",f=function(a){a=n(C,"Opal")["$coerce_to!"](a,n(C,"Integer"),"to_int");return 0>a?0:32<=a?0>this?1:0:this>>a&1},f.$$arity=1);b.def(m,"$+@",X=function(){return+this},X.$$arity=0);b.def(m,"$-@",ba=function(){return-this},ba.$$arity=0);b.def(m,"$~",ia=function(){return~this},ia.$$arity=0);b.def(m,"$**",T=function(a){var b,c;return O(n(C,"Integer")["$==="](a))?O(O(b=n(C,"Integer")["$==="](this)["$!"]())? -b:t(a,0))?Math.pow(this,a):n(C,"Rational").$new(this,1)["$**"](a):O(y(this,0)?O(c=n(C,"Float")["$==="](a))?c:n(C,"Rational")["$==="](a):y(this,0))?n(C,"Complex").$new(this,0)["$**"](a.$to_f()):O(null!=a.$$is_number)?Math.pow(this,a):this.$__coerced__("**",a)},T.$$arity=1);b.def(m,"$===",U=function(a){return a.$$is_number?this.valueOf()===a.valueOf():a["$respond_to?"]("==")?a["$=="](this):!1},U.$$arity=1);b.def(m,"$==",Z=function(a){return a.$$is_number?this.valueOf()===a.valueOf():a["$respond_to?"]("==")? -a["$=="](this):!1},Z.$$arity=1);b.def(m,"$abs",z=function(){return Math.abs(this)},z.$$arity=0);b.def(m,"$abs2",ra=function(){return Math.abs(this*this)},ra.$$arity=0);b.def(m,"$allbits?",F=function(a){a=n(C,"Opal")["$coerce_to!"](a,n(C,"Integer"),"to_int");return(this&a)==a},F.$$arity=1);b.def(m,"$anybits?",ua=function(a){a=n(C,"Opal")["$coerce_to!"](a,n(C,"Integer"),"to_int");return 0!==(this&a)},ua.$$arity=1);b.def(m,"$angle",ja=function(){return O(this["$nan?"]())?this:0==this?0<1/this?0:Math.PI: -0>this?Math.PI:0},ja.$$arity=0);b.alias(m,"arg","angle");b.alias(m,"phase","angle");b.def(m,"$bit_length",va=function(){O(n(C,"Integer")["$==="](this))||this.$raise(n(C,"NoMethodError").$new("undefined method `bit_length` for "+this+":Float","bit_length"));if(0===this||-1===this)return 0;for(var a=0,b=0>this?~this:this;0!=b;)a+=1,b>>>=1;return a},va.$$arity=0);b.def(m,"$ceil",pa=function(a){null==a&&(a=0);var b=this.$to_f();if(0===b%1&&0<=a)return b;a=Math.pow(10,a);a=Math.ceil(b*a)/a;0===b%1&&(a= -Math.round(a));return a},pa.$$arity=-1);b.def(m,"$chr",qa=function(a){return String.fromCharCode(this)},qa.$$arity=-1);b.def(m,"$denominator",ea=function(){var a,c=ea.$$p,e;c&&(ea.$$p=null);var f=0;var d=arguments.length;for(e=Array(d);f<d;f++)e[f]=arguments[f];return O(O(a=this["$nan?"]())?a:this["$infinite?"]())?1:I(this,b.find_super_dispatcher(this,"denominator",ea,!1),e,c)},ea.$$arity=0);b.def(m,"$downto",Ba=function(a){var b=Ba.$$p,c=b||B,e;b&&(Ba.$$p=null);b&&(Ba.$$p=null);if(c===B)return I(this, -"enum_for",["downto",a],(e=function(){var b=e.$$s||this;O(n(C,"Numeric")["$==="](a))||b.$raise(n(C,"ArgumentError"),"comparison of "+b.$class()+" with "+a.$class()+" failed");return O(t(a,b))?0:D(x(b,a),1)},e.$$s=this,e.$$arity=0,e));a.$$is_number||this.$raise(n(C,"ArgumentError"),"comparison of "+this.$class()+" with "+a.$class()+" failed");for(b=this;b>=a;b--)c(b);return this},Ba.$$arity=1);b.alias(m,"eql?","==");b.def(m,"$equal?",Na=function(a){var b;return O(b=this["$=="](a))?b:isNaN(this)&&isNaN(a)}, -Na.$$arity=1);b.def(m,"$even?",Fa=function(){return 0===this%2},Fa.$$arity=0);b.def(m,"$floor",za=function(a){null==a&&(a=0);var b=this.$to_f();if(0===b%1&&0<=a)return b;a=Math.pow(10,a);a=Math.floor(b*a)/a;0===b%1&&(a=Math.round(a));return a},za.$$arity=-1);b.def(m,"$gcd",fa=function(a){O(n(C,"Integer")["$==="](a))||this.$raise(n(C,"TypeError"),"not an integer");var b=Math.abs(this);for(a=Math.abs(a);0<b;){var c=b;b=a%b;a=c}return a},fa.$$arity=1);b.def(m,"$gcdlcm",sa=function(a){return[this.$gcd(), -this.$lcm()]},sa.$$arity=1);b.def(m,"$integer?",V=function(){return 0===this%1},V.$$arity=0);b.def(m,"$is_a?",ma=function(a){var c=ma.$$p,e;c&&(ma.$$p=null);var f=0;var d=arguments.length;for(e=Array(d);f<d;f++)e[f]=arguments[f];return O(a["$=="](n(C,"Integer"))?n(C,"Integer")["$==="](this):a["$=="](n(C,"Integer")))||O(a["$=="](n(C,"Integer"))?n(C,"Integer")["$==="](this):a["$=="](n(C,"Integer")))||O(a["$=="](n(C,"Float"))?n(C,"Float")["$==="](this):a["$=="](n(C,"Float")))?!0:I(this,b.find_super_dispatcher(this, -"is_a?",ma,!1),e,c)},ma.$$arity=1);b.alias(m,"kind_of?","is_a?");b.def(m,"$instance_of?",ca=function(a){var c=ca.$$p,e;c&&(ca.$$p=null);var f=0;var d=arguments.length;for(e=Array(d);f<d;f++)e[f]=arguments[f];return O(a["$=="](n(C,"Integer"))?n(C,"Integer")["$==="](this):a["$=="](n(C,"Integer")))||O(a["$=="](n(C,"Integer"))?n(C,"Integer")["$==="](this):a["$=="](n(C,"Integer")))||O(a["$=="](n(C,"Float"))?n(C,"Float")["$==="](this):a["$=="](n(C,"Float")))?!0:I(this,b.find_super_dispatcher(this,"instance_of?", -ca,!1),e,c)},ca.$$arity=1);b.def(m,"$lcm",Ma=function(a){O(n(C,"Integer")["$==="](a))||this.$raise(n(C,"TypeError"),"not an integer");return 0==this||0==a?0:Math.abs(this*a/this.$gcd(a))},Ma.$$arity=1);b.alias(m,"magnitude","abs");b.alias(m,"modulo","%");b.def(m,"$next",la=function(){return this+1},la.$$arity=0);b.def(m,"$nobits?",Oa=function(a){a=n(C,"Opal")["$coerce_to!"](a,n(C,"Integer"),"to_int");return 0==(this&a)},Oa.$$arity=1);b.def(m,"$nonzero?",aa=function(){return 0==this?B:this},aa.$$arity= -0);b.def(m,"$numerator",na=function(){var a,c=na.$$p,e;c&&(na.$$p=null);var f=0;var d=arguments.length;for(e=Array(d);f<d;f++)e[f]=arguments[f];return O(O(a=this["$nan?"]())?a:this["$infinite?"]())?this:I(this,b.find_super_dispatcher(this,"numerator",na,!1),e,c)},na.$$arity=0);b.def(m,"$odd?",Ha=function(){return 0!==this%2},Ha.$$arity=0);b.def(m,"$ord",Wa=function(){return this},Wa.$$arity=0);b.def(m,"$pow",Pa=function(a,b){0==this&&this.$raise(n(C,"ZeroDivisionError"),"divided by 0");if(void 0=== -b)return this["$**"](a);n(C,"Integer")["$==="](a)||this.$raise(n(C,"TypeError"),"Integer#pow() 2nd argument not allowed unless a 1st argument is integer");0>a&&this.$raise(n(C,"TypeError"),"Integer#pow() 1st argument cannot be negative when 2nd argument specified");n(C,"Integer")["$==="](b)||this.$raise(n(C,"TypeError"),"Integer#pow() 2nd argument not allowed unless all arguments are integers");0===b&&this.$raise(n(C,"ZeroDivisionError"),"divided by 0");return this["$**"](a)["$%"](b)},Pa.$$arity= --2);b.def(m,"$pred",ab=function(){return this-1},ab.$$arity=0);b.def(m,"$quo",ka=function(a){var c=ka.$$p,e;c&&(ka.$$p=null);var f=0;var d=arguments.length;for(e=Array(d);f<d;f++)e[f]=arguments[f];return O(n(C,"Integer")["$==="](this))?I(this,b.find_super_dispatcher(this,"quo",ka,!1),e,c):r(this,a)},ka.$$arity=1);b.def(m,"$rationalize",wa=function(a){1<arguments.length&&this.$raise(n(C,"ArgumentError"),"wrong number of arguments ("+arguments.length+" for 0..1)");if(O(n(C,"Integer")["$==="](this)))return n(C, -"Rational").$new(this,1);if(O(this["$infinite?"]()))return this.$raise(n(C,"FloatDomainError"),"Infinity");if(O(this["$nan?"]()))return this.$raise(n(C,"FloatDomainError"),"NaN");if(O(null==a)){var c=n(C,"Math").$frexp(this);var e=b.to_ary(c);var f=null==e[0]?B:e[0];e=null==e[1]?B:e[1];c;f=n(C,"Math").$ldexp(f,u(n(C,"Float"),"MANT_DIG")).$to_i();e=x(e,u(n(C,"Float"),"MANT_DIG"));return n(C,"Rational").$new(g(2,f),1["$<<"](x(1,e))).$rationalize(n(C,"Rational").$new(1,1["$<<"](x(1,e))))}return this.$to_r().$rationalize(a)}, -wa.$$arity=-1);b.def(m,"$remainder",da=function(a){return x(this,g(a,r(this,a).$truncate()))},da.$$arity=1);b.def(m,"$round",xa=function(a){var c;if(O(n(C,"Integer")["$==="](this))){if(O(null==a))return this;O(O(c=n(C,"Float")["$==="](a))?a["$infinite?"]():c)&&this.$raise(n(C,"RangeError"),"Infinity");a=n(C,"Opal")["$coerce_to!"](a,n(C,"Integer"),"to_int");O(y(a,u(n(C,"Integer"),"MIN")))&&this.$raise(n(C,"RangeError"),"out of bounds");if(O(0<=a))return this;a=a["$-@"]();if(.415241*a-.125>this.$size())return 0; -a=Math.pow(10,a);var e=Math.floor((Math.abs(e)+a/2)/a)*a;return 0>this?-e:e}O(O(c=this["$nan?"]())?null==a:c)&&this.$raise(n(C,"FloatDomainError"),"NaN");a=n(C,"Opal")["$coerce_to!"](a||0,n(C,"Integer"),"to_int");if(O("number"===typeof a?0>=a:a["$<="](0)))O(this["$nan?"]())?this.$raise(n(C,"RangeError"),"NaN"):O(this["$infinite?"]())&&this.$raise(n(C,"FloatDomainError"),"Infinity");else{if(a["$=="](0))return Math.round(this);if(O(O(c=this["$nan?"]())?c:this["$infinite?"]()))return this}e=n(C,"Math").$frexp(this); -c=b.to_ary(e);c=null==c[1]?B:c[1];e;e=x(D(u(n(C,"Float"),"DIG"),2),O(t(c,0))?r(c,4):x(r(c,3),1));e="number"===typeof a&&"number"===typeof e?a>=e:a["$>="](e);return O(e)?this:O(y(a,(O(t(c,0))?D(r(c,3),1):r(c,4))["$-@"]()))?0:Math.round(this*Math.pow(10,a))/Math.pow(10,a)},xa.$$arity=-1);b.def(m,"$step",Ca=function(a,c,e){function f(){void 0!==L&&(v=L);void 0===v&&(v=B);m===B&&q.$raise(n(C,"TypeError"),"step must be numeric");0===m&&q.$raise(n(C,"ArgumentError"),"step can't be 0");void 0!==Q&&(m=Q); -if(m===B||null==m)m=1;var a=m["$<=>"](0);a===B&&q.$raise(n(C,"ArgumentError"),"0 can't be coerced into "+m.$class());if(v===B||null==v)v=0<a?u(n(C,"Float"),"INFINITY"):u(n(C,"Float"),"INFINITY")["$-@"]();n(C,"Opal").$compare(q,v)}function d(){if(0<m&&q>v||0>m&&q<v)return 0;if(Infinity===m||-Infinity===m)return 1;var a=Math.abs,b=Math.floor;a=(a(q)+a(v)+a(v-q))/a(m)*u(n(C,"Float"),"EPSILON");if(Infinity===a||-Infinity===a)return 0;.5<a&&(a=.5);return b((v-q)/m+a)+1}function k(){f();if(0===m)return Infinity; -if(0!==m%1)return d();if(0<m&&q>v||0>m&&q<v)return 0;var a=Math.ceil,b=Math.abs,c=b(q-v)+1;b=b(m);return a(c/b)}var p=Ca.$$p,w=p||B,l,g,q=this,z=l=B;p&&(Ca.$$p=null);p&&(Ca.$$p=null);p=b.slice.call(arguments,0,arguments.length);l=b.extract_kwargs(p);if(null==l)l=H([],{});else if(!l.$$is_hash)throw b.ArgumentError.$new("expected kwargs");if(0<p.length){var v=p[0];p.splice(0,1)}if(0<p.length){var m=p[0];p.splice(0,1)}var L=l.$$smap.to;var Q=l.$$smap.by;void 0!==v&&void 0!==L&&q.$raise(n(C,"ArgumentError"), -"to is given twice");void 0!==m&&void 0!==Q&&q.$raise(n(C,"ArgumentError"),"step is given twice");if(w===B)return l=[],z=H([],{}),void 0!==v&&l.push(v),void 0!==m&&l.push(m),void 0!==L&&b.hash_put(z,"to",L),void 0!==Q&&b.hash_put(z,"by",Q),z["$any?"]()&&l.push(z),I(q,"enum_for",["step"].concat(b.to_a(l)),(g=function(){return k()},g.$$s=q,g.$$arity=0,g));f();if(0===m)for(;;)w(q);if(0!==q%1||0!==v%1||0!==m%1){if(g=d(),0<g)if(Infinity===m||-Infinity===m)w(q);else if(p=0,0<m)for(;p<g;)l=p*m+q,v<l&&(l= -v),w(l),p+=1;else for(;p<g;)l=p*m+q,v>l&&(l=v),w(l),p+=1}else if(g=q,0<m)for(;g<=v;)w(g),g+=m;else for(;g>=v;)w(g),g+=m;return q},Ca.$$arity=-1);b.alias(m,"succ","next");b.def(m,"$times",ta=function(){var a=ta.$$p,b=a||B,c;a&&(ta.$$p=null);a&&(ta.$$p=null);if(!O(b))return I(this,"enum_for",["times"],(c=function(){return c.$$s||this},c.$$s=this,c.$$arity=0,c));for(a=0;a<this;a++)b(a);return this},ta.$$arity=0);b.def(m,"$to_f",Ia=function(){return this},Ia.$$arity=0);b.def(m,"$to_i",Ga=function(){return parseInt(this, -10)},Ga.$$arity=0);b.alias(m,"to_int","to_i");b.def(m,"$to_r",Ja=function(){if(O(n(C,"Integer")["$==="](this)))return n(C,"Rational").$new(this,1);var a=n(C,"Math").$frexp(this);var c=b.to_ary(a);var e=null==c[0]?B:c[0];c=null==c[1]?B:c[1];a;e=n(C,"Math").$ldexp(e,u(n(C,"Float"),"MANT_DIG")).$to_i();c=x(c,u(n(C,"Float"),"MANT_DIG"));return g(e,u(n(C,"Float"),"RADIX")["$**"](c)).$to_r()},Ja.$$arity=0);b.def(m,"$to_s",Xa=function(a){var b;null==a&&(a=10);a=n(C,"Opal")["$coerce_to!"](a,n(C,"Integer"), -"to_int");O(O(b=y(a,2))?b:t(a,36))&&this.$raise(n(C,"ArgumentError"),"invalid radix "+a);return this.toString(a)},Xa.$$arity=-1);b.def(m,"$truncate",Qa=function(a){null==a&&(a=0);var b=this.$to_f();if(0===b%1&&0<=a)return b;a=Math.pow(10,a);a=parseInt(b*a,10)/a;0===b%1&&(a=Math.round(a));return a},Qa.$$arity=-1);b.alias(m,"inspect","to_s");b.def(m,"$digits",Ra=function(a){null==a&&(a=10);y(this,0)&&this.$raise(u(n(C,"Math"),"DomainError"),"out of domain");a=n(C,"Opal")["$coerce_to!"](a,n(C,"Integer"), -"to_int");O(y(a,2))&&this.$raise(n(C,"ArgumentError"),"invalid radix "+a);for(var b=this,c=[];0!==b;)c.push(b%a),b=parseInt(b/a,10);return c},Ra.$$arity=-1);b.def(m,"$divmod",Da=function(a){var c,e=Da.$$p,f;e&&(Da.$$p=null);var d=0;var k=arguments.length;for(f=Array(k);d<k;d++)f[d]=arguments[d];return O(O(c=this["$nan?"]())?c:a["$nan?"]())?this.$raise(n(C,"FloatDomainError"),"NaN"):O(this["$infinite?"]())?this.$raise(n(C,"FloatDomainError"),"Infinity"):I(this,b.find_super_dispatcher(this,"divmod", -Da,!1),f,e)},Da.$$arity=1);b.def(m,"$upto",Ka=function(a){var b=Ka.$$p,c=b||B,e;b&&(Ka.$$p=null);b&&(Ka.$$p=null);if(c===B)return I(this,"enum_for",["upto",a],(e=function(){var b=e.$$s||this;O(n(C,"Numeric")["$==="](a))||b.$raise(n(C,"ArgumentError"),"comparison of "+b.$class()+" with "+a.$class()+" failed");return O(y(a,b))?0:D(x(a,b),1)},e.$$s=this,e.$$arity=0,e));a.$$is_number||this.$raise(n(C,"ArgumentError"),"comparison of "+this.$class()+" with "+a.$class()+" failed");for(b=this;b<=a;b++)c(b); -return this},Ka.$$arity=1);b.def(m,"$zero?",Ya=function(){return 0==this},Ya.$$arity=0);b.def(m,"$size",Va=function(){return 4},Va.$$arity=0);b.def(m,"$nan?",Za=function(){return isNaN(this)},Za.$$arity=0);b.def(m,"$finite?",$a=function(){return Infinity!=this&&-Infinity!=this&&!isNaN(this)},$a.$$arity=0);b.def(m,"$infinite?",bb=function(){return Infinity==this?1:-Infinity==this?-1:B},bb.$$arity=0);b.def(m,"$positive?",Ua=function(){return 0!=this&&(Infinity==this||0<1/this)},Ua.$$arity=0);return(b.def(m, -"$negative?",w=function(){return-Infinity==this||0>1/this},w.$$arity=0),B)&&"negative?"})(h[0],n(h,"Numeric"),h);b.const_set(h[0],"Fixnum",n(h,"Number"));(function(g,$super,h){g=P(g,$super,"Integer");h=[g].concat(h);g.$$is_number_class=!0;(function(g,m){var h=[g].concat(m),r,a,d;b.def(g,"$allocate",r=function(){return this.$raise(n(h,"TypeError"),"allocator undefined for "+this.$name())},r.$$arity=0);b.udef(g,"$new");b.def(g,"$===",a=function(a){return a.$$is_number?0===a%1:!1},a.$$arity=1);return(b.def(g, -"$sqrt",d=function(a){a=n(h,"Opal")["$coerce_to!"](a,n(h,"Integer"),"to_int");0>a&&this.$raise(u(n(h,"Math"),"DomainError"),'Numerical argument is out of domain - "isqrt"');return parseInt(Math.sqrt(a),10)},d.$$arity=1),B)&&"sqrt"})(b.get_singleton_class(g),h);b.const_set(h[0],"MAX",Math.pow(2,30)-1);return b.const_set(h[0],"MIN",-Math.pow(2,30))})(h[0],n(h,"Numeric"),h);return function(g,$super,h){g=P(g,$super,"Float");h=[g].concat(h);g.$$is_number_class=!0;(function(g,m){var h=[g].concat(m),r,a; -b.def(g,"$allocate",r=function(){return this.$raise(n(h,"TypeError"),"allocator undefined for "+this.$name())},r.$$arity=0);b.udef(g,"$new");return(b.def(g,"$===",a=function(a){return!!a.$$is_number},a.$$arity=1),B)&&"==="})(b.get_singleton_class(g),h);b.const_set(h[0],"INFINITY",Infinity);b.const_set(h[0],"MAX",Number.MAX_VALUE);b.const_set(h[0],"MIN",Number.MIN_VALUE);b.const_set(h[0],"NAN",NaN);b.const_set(h[0],"DIG",15);b.const_set(h[0],"MANT_DIG",53);b.const_set(h[0],"RADIX",2);return b.const_set(h[0], -"EPSILON",Number.EPSILON||2.220446049250313E-16)}(h[0],n(h,"Numeric"),h)}; -Opal.modules["corelib/range"]=function(b){function t(b,g){return"number"===typeof b&&"number"===typeof g?b<=g:b["$<="](g)}function y(b,g){return"number"===typeof b&&"number"===typeof g?b<g:b["$<"](g)}function D(b,g){return"number"===typeof b&&"number"===typeof g?b>g:b["$>"](g)}function x(b,g){return"number"===typeof b&&"number"===typeof g?b+g:b["$+"](g)}var r=b.top,g=[],G=b.nil,h=b.const_get_qualified,B=b.const_get_relative,u=b.klass,n=b.truthy,P=b.send;b.add_stubs("$require $include $attr_reader $raise $<=> $include? $<= $< $enum_for $upto $to_proc $respond_to? $class $succ $! $== $=== $exclude_end? $eql? $begin $end $last $to_a $> $- $abs $to_i $coerce_to! $ceil $/ $size $loop $+ $* $>= $each_with_index $% $bsearch $inspect $[] $hash".split(" ")); -r.$require("corelib/enumerable");return function(g,$super,r){g=u(g,$super,"Range");var m=[g].concat(r),H,R,C,J,O,Y,a,d,v,E,N,q,l,c,A,p,S,M;g.$$prototype.begin=g.$$prototype.end=g.$$prototype.excl=G;g.$include(B(m,"Enumerable"));g.$$prototype.$$is_range=!0;g.$attr_reader("begin","end");b.def(g,"$initialize",H=function(a,b,c){null==c&&(c=!1);n(this.begin)&&this.$raise(B(m,"NameError"),"'initialize' called twice");n(a["$<=>"](b))||this.$raise(B(m,"ArgumentError"),"bad value for range");this.begin=a; -this.end=b;return this.excl=c},H.$$arity=-3);b.def(g,"$==",R=function(a){return a.$$is_range?this.excl===a.excl&&this.begin==a.begin&&this.end==a.end:!1},R.$$arity=1);b.def(g,"$===",C=function(a){return this["$include?"](a)},C.$$arity=1);b.def(g,"$cover?",J=function(a){var b;var c=this.begin["$<=>"](a);if(!n(n(b=c)?t(c,0):b))return!1;a=a["$<=>"](this.end);return n(this.excl)?n(b=a)?y(a,0):b:n(b=a)?t(a,0):b},J.$$arity=1);b.def(g,"$each",O=function(){var a=O.$$p,c=a||G;a&&(O.$$p=null);a&&(O.$$p=null); -if(c===G)return this.$enum_for("each");if(this.begin.$$is_number&&this.end.$$is_number){0===this.begin%1&&0===this.end%1||this.$raise(B(m,"TypeError"),"can't iterate from Float");var f=this.begin;for(a=this.end+(n(this.excl)?0:1);f<a;f++)c(f);return this}if(this.begin.$$is_string&&this.end.$$is_string)return P(this.begin,"upto",[this.end,this.excl],c.$to_proc()),this;a=this.begin;var d=this.end;for(n(a["$respond_to?"]("succ"))||this.$raise(B(m,"TypeError"),"can't iterate from "+a.$class());n(y(a["$<=>"](d), -0));)b.yield1(c,a),a=a.$succ();n(n(f=this.excl["$!"]())?a["$=="](d):f)&&b.yield1(c,a);return this},O.$$arity=0);b.def(g,"$eql?",Y=function(a){var b,c;return n(B(m,"Range")["$==="](a))?n(b=n(c=this.excl["$==="](a["$exclude_end?"]()))?this.begin["$eql?"](a.$begin()):c)?this.end["$eql?"](a.$end()):b:!1},Y.$$arity=1);b.def(g,"$exclude_end?",a=function(){return this.excl},a.$$arity=0);b.def(g,"$first",d=function(a){var c=d.$$p,f;c&&(d.$$p=null);var k=0;var p=arguments.length;for(f=Array(p);k<p;k++)f[k]= -arguments[k];return n(null==a)?this.begin:P(this,b.find_super_dispatcher(this,"first",d,!1),f,c)},d.$$arity=-1);b.alias(g,"include?","cover?");b.def(g,"$last",v=function(a){return n(null==a)?this.end:this.$to_a().$last(a)},v.$$arity=-1);b.def(g,"$max",E=function(){var a,c=E.$$p,f=c||G,d;c&&(E.$$p=null);var p=0;var l=arguments.length;for(d=Array(l);p<l;p++)d[p]=arguments[p];return f!==G?P(this,b.find_super_dispatcher(this,"max",E,!1),d,c):n(D(this.begin,this.end))?G:n(n(a=this.excl)?this.begin["$=="](this.end): -a)?G:this.excl?this.end-1:this.end},E.$$arity=0);b.alias(g,"member?","cover?");b.def(g,"$min",N=function(){var a,c=N.$$p,f=c||G,d;c&&(N.$$p=null);var p=0;var l=arguments.length;for(d=Array(l);p<l;p++)d[p]=arguments[p];return f!==G?P(this,b.find_super_dispatcher(this,"min",N,!1),d,c):n(D(this.begin,this.end))?G:n(n(a=this.excl)?this.begin["$=="](this.end):a)?G:this.begin},N.$$arity=0);b.def(g,"$size",q=function(){var a;var b=this.begin;var c=this.end;n(this.excl)&&(c="number"===typeof c?c-1:c["$-"](1)); -if(!n(n(a=B(m,"Numeric")["$==="](b))?B(m,"Numeric")["$==="](c):a))return G;if(n(y(c,b)))return 0;a=h(B(m,"Float"),"INFINITY");return n([b.$abs(),c.$abs()]["$include?"](a))?a:(Math.abs(c-b)+1).$to_i()},q.$$arity=0);b.def(g,"$step",l=function(a){function c(){a.$$is_number||(a=B(m,"Opal")["$coerce_to!"](a,B(m,"Integer"),"to_int"));0>a?v.$raise(B(m,"ArgumentError"),"step can't be negative"):0===a&&v.$raise(B(m,"ArgumentError"),"step can't be 0")}function f(){if(!v.begin["$respond_to?"]("succ")||v.begin.$$is_string&& -v.end.$$is_string)return G;if(0===a%1){var b=v.$size();return("number"===typeof b&&"number"===typeof a?b/a:b["$/"](a)).$ceil()}b=v.begin;var c=v.end,e=Math.abs,f=Math.floor;e=(e(b)+e(c)+e(c-b))/e(a)*h(B(m,"Float"),"EPSILON");.5<e&&(e=.5);v.excl?(f=f((c-b)/a-e),f*a+b<c&&f++):f=f((c-b)/a+e)+1;return f}var d,k,p,g=l.$$p,q=g||G,v=this,z=G;g&&(l.$$p=null);null==a&&(a=1);if(q===G)return P(v,"enum_for",["step",a],(d=function(){c();return f()},d.$$s=v,d.$$arity=0,d));c();n(v.begin.$$is_number&&v.end.$$is_number)? -(z=0,function(){var c=b.new_brk();try{return P(v,"loop",[],(k=function(){var e=k.$$s||this;null==e.begin&&(e.begin=G);null==e.excl&&(e.excl=G);null==e.end&&(e.end=G);var f=x(e.begin,"number"===typeof z&&"number"===typeof a?z*a:z["$*"](a));n(e.excl)?(e=e.end,e="number"===typeof f&&"number"===typeof e?f>=e:f["$>="](e),n(e)&&b.brk(G,c)):n(D(f,e.end))&&b.brk(G,c);b.yield1(q,f);return z=x(z,1)},k.$$s=v,k.$$brk=c,k.$$arity=0,k))}catch(F){if(F===c)return F.$v;throw F;}}()):(v.begin.$$is_string&&v.end.$$is_string&& -0!==a%1&&v.$raise(B(m,"TypeError"),"no implicit conversion to float from string"),P(v,"each_with_index",[],(p=function(c,e){null==c&&(c=G);null==e&&(e=G);return e["$%"](a)["$=="](0)?b.yield1(q,c):G},p.$$s=v,p.$$arity=2,p)));return v},l.$$arity=-1);b.def(g,"$bsearch",c=function(){var a=c.$$p,b=a||G;a&&(c.$$p=null);a&&(c.$$p=null);if(b===G)return this.$enum_for("bsearch");n(this.begin.$$is_number&&this.end.$$is_number)||this.$raise(B(m,"TypeError"),"can't do binary search for "+this.begin.$class()); -return P(this.$to_a(),"bsearch",[],b.$to_proc())},c.$$arity=0);b.def(g,"$to_s",A=function(){return""+this.begin+(n(this.excl)?"...":"..")+this.end},A.$$arity=0);b.def(g,"$inspect",p=function(){return""+this.begin.$inspect()+(n(this.excl)?"...":"..")+this.end.$inspect()},p.$$arity=0);b.def(g,"$marshal_load",S=function(a){this.begin=a["$[]"]("begin");this.end=a["$[]"]("end");return this.excl=a["$[]"]("excl")},S.$$arity=1);return(b.def(g,"$hash",M=function(){return[this.begin,this.end,this.excl].$hash()}, -M.$$arity=0),G)&&"hash"}(g[0],null,g)}; -Opal.modules["corelib/proc"]=function(b){var t=[],y=b.nil,D=b.const_get_relative,x=b.slice,r=b.klass,g=b.truthy;b.add_stubs(["$raise","$coerce_to!"]);return function(t,$super,B){t=r(t,$super,"Proc");var u=[t].concat(B),n,G,O,I,H,m,oa,R,C,J;b.defineProperty(t.$$prototype,"$$is_proc",!0);b.defineProperty(t.$$prototype,"$$is_lambda",!1);b.defs(t,"$new",n=function(){var b=n.$$p,m=b||y;b&&(n.$$p=null);b&&(n.$$p=null);g(m)||this.$raise(D(u,"ArgumentError"),"tried to create a Proc object without a block");return m}, -n.$$arity=0);b.def(t,"$call",G=function(g){var m=G.$$p,a=m||y;m&&(G.$$p=null);m&&(G.$$p=null);m=b.slice.call(arguments,0,arguments.length);a!==y&&(this.$$p=a);if(a=this.$$brk)try{var d=this.$$is_lambda?this.apply(null,m):b.yieldX(this,m)}catch(v){if(v===a)return a.$v;throw v;}else d=this.$$is_lambda?this.apply(null,m):b.yieldX(this,m);return d},G.$$arity=-1);b.alias(t,"[]","call");b.alias(t,"===","call");b.alias(t,"yield","call");b.def(t,"$to_proc",O=function(){return this},O.$$arity=0);b.def(t,"$lambda?", -I=function(){return!!this.$$is_lambda},I.$$arity=0);b.def(t,"$arity",H=function(){return this.$$is_curried?-1:this.$$arity},H.$$arity=0);b.def(t,"$source_location",m=function(){return y},m.$$arity=0);b.def(t,"$binding",oa=function(){this.$$is_curried&&this.$raise(D(u,"ArgumentError"),"Can't create Binding");return y},oa.$$arity=0);b.def(t,"$parameters",R=function(){if(this.$$is_curried)return[["rest"]];if(this.$$parameters){if(this.$$is_lambda)return this.$$parameters;var b=[],g;var a=0;for(g=this.$$parameters.length;a< -g;a++){var d=this.$$parameters[a];"req"===d[0]&&(d=["opt",d[1]]);b.push(d)}return b}return[]},R.$$arity=0);b.def(t,"$curry",C=function(b){function g(){var d=x.call(arguments),v=d.length;v>b&&a.$$is_lambda&&!a.$$is_curried&&a.$raise(D(u,"ArgumentError"),"wrong number of arguments ("+v+" for "+b+")");if(v>=b)return a.$call.apply(a,d);v=function(){return g.apply(null,d.concat(x.call(arguments)))};v.$$is_lambda=a.$$is_lambda;v.$$is_curried=!0;return v}var a=this;void 0===b?b=a.length:(b=D(u,"Opal")["$coerce_to!"](b, -D(u,"Integer"),"to_int"),a.$$is_lambda&&b!==a.length&&a.$raise(D(u,"ArgumentError"),"wrong number of arguments ("+b+" for "+a.length+")"));g.$$is_lambda=a.$$is_lambda;g.$$is_curried=!0;return g},C.$$arity=-1);b.def(t,"$dup",J=function(){var b=this.$$original_proc||this,g=function(){return b.apply(this,arguments)},a;for(a in this)this.hasOwnProperty(a)&&(g[a]=this[a]);return g},J.$$arity=0);return b.alias(t,"clone","dup")}(t[0],Function,t)}; -Opal.modules["corelib/method"]=function(b){var t=[],y=b.nil,D=b.const_get_relative,x=b.klass,r=b.truthy;b.add_stubs("$attr_reader $arity $new $class $join $source_location $raise".split(" "));(function(g,$super,h){g=x(g,$super,"Method");var t=[g].concat(h),u,n,P,O,I,H,m,oa,R;g.$$prototype.method=g.$$prototype.receiver=g.$$prototype.owner=g.$$prototype.name=y;g.$attr_reader("owner","receiver","name");b.def(g,"$initialize",u=function(b,g,m,h){this.receiver=b;this.owner=g;this.name=h;return this.method= -m},u.$$arity=4);b.def(g,"$arity",n=function(){return this.method.$arity()},n.$$arity=0);b.def(g,"$parameters",P=function(){return this.method.$$parameters},P.$$arity=0);b.def(g,"$source_location",O=function(){var b;return r(b=this.method.$$source_location)?b:["(eval)",0]},O.$$arity=0);b.def(g,"$comments",I=function(){var b;return r(b=this.method.$$comments)?b:[]},I.$$arity=0);b.def(g,"$call",H=function(g){var m=H.$$p,h=m||y;m&&(H.$$p=null);m&&(H.$$p=null);m=b.slice.call(arguments,0,arguments.length); -this.method.$$p=h;return this.method.apply(this.receiver,m)},H.$$arity=-1);b.alias(g,"[]","call");b.def(g,"$unbind",m=function(){return D(t,"UnboundMethod").$new(this.receiver.$class(),this.owner,this.method,this.name)},m.$$arity=0);b.def(g,"$to_proc",oa=function(){var b=this.$call.bind(this);b.$$unbound=this.method;b.$$is_lambda=!0;b.$$arity=this.method.$$arity;b.$$parameters=this.method.$$parameters;return b},oa.$$arity=0);return(b.def(g,"$inspect",R=function(){return"#<"+this.$class()+": "+this.receiver.$class()+ -"#"+this.name+" (defined in "+this.owner+" in "+this.$source_location().$join(":")+")>"},R.$$arity=0),y)&&"inspect"})(t[0],null,t);return function(g,$super,h){g=x(g,$super,"UnboundMethod");var t=[g].concat(h),u,n,P,O,I,H,m;g.$$prototype.method=g.$$prototype.owner=g.$$prototype.name=g.$$prototype.source=y;g.$attr_reader("source","owner","name");b.def(g,"$initialize",u=function(b,g,m,h){this.source=b;this.owner=g;this.method=m;return this.name=h},u.$$arity=4);b.def(g,"$arity",n=function(){return this.method.$arity()}, -n.$$arity=0);b.def(g,"$parameters",P=function(){return this.method.$$parameters},P.$$arity=0);b.def(g,"$source_location",O=function(){var b;return r(b=this.method.$$source_location)?b:["(eval)",0]},O.$$arity=0);b.def(g,"$comments",I=function(){var b;return r(b=this.method.$$comments)?b:[]},I.$$arity=0);b.def(g,"$bind",H=function(g){if(this.owner.$$is_module||b.is_a(g,this.owner))return D(t,"Method").$new(g,this.owner,this.method,this.name);this.$raise(D(t,"TypeError"),"can't bind singleton method to a different class (expected "+ -g+".kind_of?("+this.owner+" to be true)")},H.$$arity=1);return(b.def(g,"$inspect",m=function(){return"#<"+this.$class()+": "+this.source+"#"+this.name+" (defined in "+this.owner+" in "+this.$source_location().$join(":")+")>"},m.$$arity=0),y)&&"inspect"}(t[0],null,t)}; -Opal.modules["corelib/variables"]=function(b){var t=[],y=b.nil,D=b.const_get_relative,x=b.gvars,r=b.hash2;b.add_stubs(["$new"]);x["&"]=x["~"]=x["`"]=x["'"]=y;x.LOADED_FEATURES=x['"']=b.loaded_features;x.LOAD_PATH=x[":"]=[];x["/"]="\n";x[","]=y;b.const_set(t[0],"ARGV",[]);b.const_set(t[0],"ARGF",D(t,"Object").$new());b.const_set(t[0],"ENV",r([],{}));x.VERBOSE=!1;x.DEBUG=!1;return x.SAFE=0}; -Opal.modules["opal/regexp_anchors"]=function(b){var t=[],y=b.nil,D=b.const_get_relative,x=b.module;b.add_stubs(["$==","$new"]);t=[x(t[0],"Opal")].concat(t);b.const_set(t[0],"REGEXP_START",D(t,"RUBY_ENGINE")["$=="]("opal")?"^":y);b.const_set(t[0],"REGEXP_END",D(t,"RUBY_ENGINE")["$=="]("opal")?"$":y);b.const_set(t[0],"FORBIDDEN_STARTING_IDENTIFIER_CHARS","\\u0001-\\u002F\\u003A-\\u0040\\u005B-\\u005E\\u0060\\u007B-\\u007F");b.const_set(t[0],"FORBIDDEN_ENDING_IDENTIFIER_CHARS","\\u0001-\\u0020\\u0022-\\u002F\\u003A-\\u003E\\u0040\\u005B-\\u005E\\u0060\\u007B-\\u007F"); -b.const_set(t[0],"INLINE_IDENTIFIER_REGEXP",D(t,"Regexp").$new("[^"+D(t,"FORBIDDEN_STARTING_IDENTIFIER_CHARS")+"]*[^"+D(t,"FORBIDDEN_ENDING_IDENTIFIER_CHARS")+"]"));b.const_set(t[0],"FORBIDDEN_CONST_NAME_CHARS","\\u0001-\\u0020\\u0021-\\u002F\\u003B-\\u003F\\u0040\\u005B-\\u005E\\u0060\\u007B-\\u007F");b.const_set(t[0],"CONST_NAME_REGEXP",D(t,"Regexp").$new(""+D(t,"REGEXP_START")+"(::)?[A-Z][^"+D(t,"FORBIDDEN_CONST_NAME_CHARS")+"]*"+D(t,"REGEXP_END")))}; -Opal.modules["opal/mini"]=function(b){var t=b.top;b.add_stubs(["$require"]);t.$require("opal/base");t.$require("corelib/nil");t.$require("corelib/boolean");t.$require("corelib/string");t.$require("corelib/comparable");t.$require("corelib/enumerable");t.$require("corelib/enumerator");t.$require("corelib/array");t.$require("corelib/hash");t.$require("corelib/number");t.$require("corelib/range");t.$require("corelib/proc");t.$require("corelib/method");t.$require("corelib/regexp");t.$require("corelib/variables"); -return t.$require("opal/regexp_anchors")}; -Opal.modules["corelib/string/encoding"]=function(b){function t(b,g){return"number"===typeof b&&"number"===typeof g?b+g:b["$+"](g)}var y,D,x,r,g,G=b.top,h=[],B=b.nil,u=b.const_get_qualified,n=b.const_get_relative,P=b.klass,O=b.hash2,I=b.truthy,H=b.send;b.add_stubs("$require $+ $[] $new $to_proc $each $const_set $sub $== $default_external $upcase $raise $attr_accessor $attr_reader $register $length $bytes $to_a $each_byte $dup $bytesize $enum_for $coerce_to! $find $<".split(" "));G.$require("corelib/string"); -(function(g,$super,h){g=P(g,$super,"Encoding");var m=[g].concat(h),r,u,x,a,d,v,E,N,q;g.$$prototype.ascii=g.$$prototype.dummy=g.$$prototype.name=B;b.defineProperty(g,"$$register",{});b.defs(g,"$register",r=function(a,b){var c=r.$$p,d=c||B,l,g,k=B,e=B,f=B;c&&(r.$$p=null);c&&(r.$$p=null);null==b&&(b=O([],{}));k=t([a],I(l=b["$[]"]("aliases"))?l:[]);e=H(n(m,"Class"),"new",[this],d.$to_proc()).$new(a,k,I(l=b["$[]"]("ascii"))?l:!1,I(l=b["$[]"]("dummy"))?l:!1);f=this.$$register;return H(k,"each",[],(g=function(a){var b= -g.$$s||this;null==a&&(a=B);b.$const_set(a.$sub("-","_"),e);return f["$$"+a]=e},g.$$s=this,g.$$arity=1,g))},r.$$arity=-2);b.defs(g,"$find",u=function(a){var b;if(a["$=="]("default_external"))return this.$default_external();var d=this.$$register;d=I(b=d["$$"+a])?b:d["$$"+a.$upcase()];I(d)||this.$raise(n(m,"ArgumentError"),"unknown encoding name - "+a);return d},u.$$arity=1);(function(a,b){[a].concat(b);return a.$attr_accessor("default_external")})(b.get_singleton_class(g),m);g.$attr_reader("name","names"); -b.def(g,"$initialize",x=function(a,b,d,p){this.name=a;this.names=b;this.ascii=d;return this.dummy=p},x.$$arity=4);b.def(g,"$ascii_compatible?",a=function(){return this.ascii},a.$$arity=0);b.def(g,"$dummy?",d=function(){return this.dummy},d.$$arity=0);b.def(g,"$to_s",v=function(){return this.name},v.$$arity=0);b.def(g,"$inspect",E=function(){return"#<Encoding:"+this.name+(I(this.dummy)?" (dummy)":B)+">"},E.$$arity=0);b.def(g,"$each_byte",N=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(n(m, -"NotImplementedError"))},N.$$arity=-1);b.def(g,"$bytesize",q=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(n(m,"NotImplementedError"))},q.$$arity=-1);(function(a,$super,b){[P(a,$super,"EncodingError")].concat(b);return B})(m[0],n(m,"StandardError"),m);return function(a,$super,b){[P(a,$super,"CompatibilityError")].concat(b);return B}(m[0],n(m,"EncodingError"),m)})(h[0],null,h);H(n(h,"Encoding"),"register",["UTF-8",O(["aliases","ascii"],{aliases:["CP65001"],ascii:!0})],(y= -function(){var g=y.$$s||this,h,n;b.def(g,"$each_byte",h=function(g){var m=h.$$p,n=m||B;m&&(h.$$p=null);m&&(h.$$p=null);m=Infinity;for(var r,a=g.length,d=null,v=0;v<a;++v){r=g.charCodeAt(v);if(55295<r&&57344>r){if(!d){if(56319<r){-1<(m-=3)&&(b.yield1(n,239),b.yield1(n,191),b.yield1(n,189));continue}else if(v+1===a){-1<(m-=3)&&(b.yield1(n,239),b.yield1(n,191),b.yield1(n,189));continue}d=r;continue}if(56320>r){-1<(m-=3)&&(b.yield1(n,239),b.yield1(n,191),b.yield1(n,189));d=r;continue}r=(d-55296<<10|r- -56320)+65536}else d&&-1<(m-=3)&&(b.yield1(n,239),b.yield1(n,191),b.yield1(n,189));d=null;if(128>r){if(0>--m)break;b.yield1(n,r)}else if(2048>r){if(0>(m-=2))break;b.yield1(n,r>>6|192);b.yield1(n,r&63|128)}else if(65536>r){if(0>(m-=3))break;b.yield1(n,r>>12|224);b.yield1(n,r>>6&63|128);b.yield1(n,r&63|128)}else if(1114112>r){if(0>(m-=4))break;b.yield1(n,r>>18|240);b.yield1(n,r>>12&63|128);b.yield1(n,r>>6&63|128);b.yield1(n,r&63|128)}}},h.$$arity=1);return(b.def(g,"$bytesize",n=function(b){return b.$bytes().$length()}, -n.$$arity=1),B)&&"bytesize"},y.$$s=G,y.$$arity=0,y));H(n(h,"Encoding"),"register",["UTF-16LE"],(D=function(){var g=D.$$s||this,h,n;b.def(g,"$each_byte",h=function(g){var m=h.$$p,n=m||B;m&&(h.$$p=null);m&&(h.$$p=null);m=0;for(var r=g.length;m<r;m++){var a=g.charCodeAt(m);b.yield1(n,a&255);b.yield1(n,a>>8)}},h.$$arity=1);return(b.def(g,"$bytesize",n=function(b){return b.$bytes().$length()},n.$$arity=1),B)&&"bytesize"},D.$$s=G,D.$$arity=0,D));H(n(h,"Encoding"),"register",["UTF-16BE"],(x=function(){var g= -x.$$s||this,h,n;b.def(g,"$each_byte",h=function(g){var m=h.$$p,n=m||B;m&&(h.$$p=null);m&&(h.$$p=null);m=0;for(var r=g.length;m<r;m++){var a=g.charCodeAt(m);b.yield1(n,a>>8);b.yield1(n,a&255)}},h.$$arity=1);return(b.def(g,"$bytesize",n=function(b){return b.$bytes().$length()},n.$$arity=1),B)&&"bytesize"},x.$$s=G,x.$$arity=0,x));H(n(h,"Encoding"),"register",["UTF-32LE"],(r=function(){var g=r.$$s||this,h,n;b.def(g,"$each_byte",h=function(g){var m=h.$$p,n=m||B;m&&(h.$$p=null);m&&(h.$$p=null);m=0;for(var r= -g.length;m<r;m++){var a=g.charCodeAt(m);b.yield1(n,a&255);b.yield1(n,a>>8)}},h.$$arity=1);return(b.def(g,"$bytesize",n=function(b){return b.$bytes().$length()},n.$$arity=1),B)&&"bytesize"},r.$$s=G,r.$$arity=0,r));H(n(h,"Encoding"),"register",["ASCII-8BIT",O(["aliases","ascii","dummy"],{aliases:["BINARY","US-ASCII","ASCII"],ascii:!0,dummy:!0})],(g=function(){var m=g.$$s||this,h,n;b.def(m,"$each_byte",h=function(g){var m=h.$$p,n=m||B;m&&(h.$$p=null);m&&(h.$$p=null);m=0;for(var r=g.length;m<r;m++){var a= -g.charCodeAt(m);b.yield1(n,a&255);b.yield1(n,a>>8)}},h.$$arity=1);return(b.def(m,"$bytesize",n=function(b){return b.$bytes().$length()},n.$$arity=1),B)&&"bytesize"},g.$$s=G,g.$$arity=0,g));return function(g,$super,h){g=P(g,$super,"String");var m=[g].concat(h),r,t,x,a,d,v,E;g.$$prototype.bytes=g.$$prototype.internal_encoding=B;g.$attr_reader("encoding");g.$attr_reader("internal_encoding");b.defineProperty(String.prototype,"bytes",B);b.defineProperty(String.prototype,"encoding",u(n(m,"Encoding"),"UTF_8")); -b.defineProperty(String.prototype,"internal_encoding",u(n(m,"Encoding"),"UTF_8"));b.def(g,"$bytes",r=function(){var a;this.bytes=I(a=this.bytes)?a:this.$each_byte().$to_a();return this.bytes.$dup()},r.$$arity=0);b.def(g,"$bytesize",t=function(){return this.internal_encoding.$bytesize(this)},t.$$arity=0);b.def(g,"$each_byte",x=function(){var a=x.$$p,b=a||B;a&&(x.$$p=null);a&&(x.$$p=null);if(b===B)return this.$enum_for("each_byte");H(this.internal_encoding,"each_byte",[this],b.$to_proc());return this}, -x.$$arity=0);b.def(g,"$encode",a=function(a){return b.enc(this,a)},a.$$arity=1);b.def(g,"$force_encoding",d=function(a){if(a===this.encoding)return this;a=n(m,"Opal")["$coerce_to!"](a,n(m,"String"),"to_s");a=n(m,"Encoding").$find(a);if(a===this.encoding)return this;this.encoding=a;return this},d.$$arity=1);b.def(g,"$getbyte",v=function(a){var b=this.$bytes();a=n(m,"Opal")["$coerce_to!"](a,n(m,"Integer"),"to_int");var d=b.$length();d="number"===typeof d&&"number"===typeof a?d<a:d["$<"](a);return I(d)? -B:b["$[]"](a)},v.$$arity=1);return(b.def(g,"$valid_encoding?",E=function(){return!0},E.$$arity=0),B)&&"valid_encoding?"}(h[0],null,h)}; -Opal.modules["corelib/struct"]=function(b){function t(b,g){return"number"===typeof b&&"number"===typeof g?b>g:b["$>"](g)}function y(b,g){return"number"===typeof b&&"number"===typeof g?b-g:b["$-"](g)}function D(b,g){return"number"===typeof b&&"number"===typeof g?b<g:b["$<"](g)}function x(b,g){return"number"===typeof b&&"number"===typeof g?b>=g:b["$>="](g)}function r(b,g){return"number"===typeof b&&"number"===typeof g?b+g:b["$+"](g)}var g=b.top,G=[],h=b.nil,B=b.const_get_relative,u=b.klass,n=b.hash2, -P=b.truthy,O=b.send;b.add_stubs("$require $include $const_name! $unshift $map $coerce_to! $new $each $define_struct_attribute $allocate $initialize $alias_method $module_eval $to_proc $const_set $== $raise $<< $members $define_method $instance_eval $class $last $> $length $- $keys $any? $join $[] $[]= $each_with_index $hash $=== $< $-@ $size $>= $include? $to_sym $instance_of? $__id__ $eql? $enum_for $name $+ $each_pair $inspect $each_with_object $flatten $to_a $respond_to? $dig".split(" "));g.$require("corelib/enumerable"); -return function(g,$super,m){g=u(g,$super,"Struct");var G=[g].concat(m),I,C,J,ha,Y,a,d,v,E,N,q,l,c,A,p,S,M,k,e;g.$include(B(G,"Enumerable"));b.defs(g,"$new",I=function(a,c,e){var f=I.$$p,d=f||h,k,p;var g=h;f&&(I.$$p=null);f&&(I.$$p=null);var l=b.slice.call(arguments,1,arguments.length);g=b.extract_kwargs(l);if(null==g)g=n([],{});else if(!g.$$is_hash)throw b.ArgumentError.$new("expected kwargs");f=g.$$smap.keyword_init;null==f&&(f=!1);if(P(a))try{a=B(G,"Opal")["$const_name!"](a)}catch(F){if(b.rescue(F, -[B(G,"TypeError"),B(G,"NameError")]))try{l.$unshift(a),a=h}finally{b.pop_exception()}else throw F;}O(l,"map",[],(k=function(a){null==a&&(a=h);return B(G,"Opal")["$coerce_to!"](a,B(G,"String"),"to_str")},k.$$s=this,k.$$arity=1,k));g=O(B(G,"Class"),"new",[this],(p=function(){var a=p.$$s||this,c;O(l,"each",[],(c=function(a){var b=c.$$s||this;null==a&&(a=h);return b.$define_struct_attribute(a)},c.$$s=a,c.$$arity=1,c));return function(a,c){[a].concat(c);var e;b.def(a,"$new",e=function(a){var c=b.slice.call(arguments, -0,arguments.length);var e=this.$allocate();e.$$data={};O(e,"initialize",b.to_a(c));return e},e.$$arity=-1);return a.$alias_method("[]","new")}(b.get_singleton_class(a),G)},p.$$s=this,p.$$arity=0,p));P(d)&&O(g,"module_eval",[],d.$to_proc());g.$$keyword_init=f;P(a)&&B(G,"Struct").$const_set(a,g);return g},I.$$arity=-2);b.defs(g,"$define_struct_attribute",C=function(a){var b,c;this["$=="](B(G,"Struct"))&&this.$raise(B(G,"ArgumentError"),"you cannot define attributes to the Struct class");this.$members()["$<<"](a); -O(this,"define_method",[a],(b=function(){return(b.$$s||this).$$data[a]},b.$$s=this,b.$$arity=0,b));return O(this,"define_method",[""+a+"="],(c=function(b){var e=c.$$s||this;null==b&&(b=h);return e.$$data[a]=b},c.$$s=this,c.$$arity=1,c))},C.$$arity=1);b.defs(g,"$members",J=function(){var a;null==this.members&&(this.members=h);this["$=="](B(G,"Struct"))&&this.$raise(B(G,"ArgumentError"),"the Struct class has no members");return this.members=P(a=this.members)?a:[]},J.$$arity=0);b.defs(g,"$inherited", -ha=function(a){var b,c=h;null==this.members&&(this.members=h);c=this.members;return O(a,"instance_eval",[],(b=function(){return(b.$$s||this).members=c},b.$$s=this,b.$$arity=0,b))},ha.$$arity=1);b.def(g,"$initialize",Y=function(a){var c,e,f,d=h,k=h;var p=b.slice.call(arguments,0,arguments.length);if(P(this.$class().$$keyword_init))return d=P(c=p.$last())?c:n([],{}),P(P(c=t(p.$length(),1))?c:1===p.length&&!d.$$is_hash)&&this.$raise(B(G,"ArgumentError"),"wrong number of arguments (given "+p.$length()+ -", expected 0)"),k=y(d.$keys(),this.$class().$members()),P(k["$any?"]())&&this.$raise(B(G,"ArgumentError"),"unknown keywords: "+k.$join(", ")),O(this.$class().$members(),"each",[],(e=function(a){var c=e.$$s||this;null==a&&(a=h);a=[a,d["$[]"](a)];O(c,"[]=",b.to_a(a));return a[y(a.length,1)]},e.$$s=this,e.$$arity=1,e));P(t(p.$length(),this.$class().$members().$length()))&&this.$raise(B(G,"ArgumentError"),"struct size differs");return O(this.$class().$members(),"each_with_index",[],(f=function(a,c){var e= -f.$$s||this;null==a&&(a=h);null==c&&(c=h);a=[a,p["$[]"](c)];O(e,"[]=",b.to_a(a));return a[y(a.length,1)]},f.$$s=this,f.$$arity=2,f))},Y.$$arity=-1);b.def(g,"$members",a=function(){return this.$class().$members()},a.$$arity=0);b.def(g,"$hash",d=function(){return B(G,"Hash").$new(this.$$data).$hash()},d.$$arity=0);b.def(g,"$[]",v=function(a){P(B(G,"Integer")["$==="](a))?(P(D(a,this.$class().$members().$size()["$-@"]()))&&this.$raise(B(G,"IndexError"),"offset "+a+" too small for struct(size:"+this.$class().$members().$size()+ -")"),P(x(a,this.$class().$members().$size()))&&this.$raise(B(G,"IndexError"),"offset "+a+" too large for struct(size:"+this.$class().$members().$size()+")"),a=this.$class().$members()["$[]"](a)):P(B(G,"String")["$==="](a))?this.$$data.hasOwnProperty(a)||this.$raise(B(G,"NameError").$new("no member '"+a+"' in struct",a)):this.$raise(B(G,"TypeError"),"no implicit conversion of "+a.$class()+" into Integer");a=B(G,"Opal")["$coerce_to!"](a,B(G,"String"),"to_str");return this.$$data[a]},v.$$arity=1);b.def(g, -"$[]=",E=function(a,b){P(B(G,"Integer")["$==="](a))?(P(D(a,this.$class().$members().$size()["$-@"]()))&&this.$raise(B(G,"IndexError"),"offset "+a+" too small for struct(size:"+this.$class().$members().$size()+")"),P(x(a,this.$class().$members().$size()))&&this.$raise(B(G,"IndexError"),"offset "+a+" too large for struct(size:"+this.$class().$members().$size()+")"),a=this.$class().$members()["$[]"](a)):P(B(G,"String")["$==="](a))?P(this.$class().$members()["$include?"](a.$to_sym()))||this.$raise(B(G, -"NameError").$new("no member '"+a+"' in struct",a)):this.$raise(B(G,"TypeError"),"no implicit conversion of "+a.$class()+" into Integer");a=B(G,"Opal")["$coerce_to!"](a,B(G,"String"),"to_str");return this.$$data[a]=b},E.$$arity=2);b.def(g,"$==",N=function(a){function b(a,f){var d;c[a.$__id__()]=!0;e[f.$__id__()]=!0;for(d in a.$$data){var k=a.$$data[d];var p=f.$$data[d];if(B(G,"Struct")["$==="](k)){if(!(c.hasOwnProperty(k.$__id__())&&e.hasOwnProperty(p.$__id__())||b(k,p)))return!1}else if(!k["$=="](p))return!1}return!0} -if(!P(a["$instance_of?"](this.$class())))return!1;var c={},e={};return b(this,a)},N.$$arity=1);b.def(g,"$eql?",q=function(a){function b(a,f){var d;c[a.$__id__()]=!0;e[f.$__id__()]=!0;for(d in a.$$data){var k=a.$$data[d];var p=f.$$data[d];if(B(G,"Struct")["$==="](k)){if(!(c.hasOwnProperty(k.$__id__())&&e.hasOwnProperty(p.$__id__())||b(k,p)))return!1}else if(!k["$eql?"](p))return!1}return!0}if(!P(a["$instance_of?"](this.$class())))return!1;var c={},e={};return b(this,a)},q.$$arity=1);b.def(g,"$each", -l=function(){var a,c,e=l.$$p,d=e||h;e&&(l.$$p=null);if(d===h)return O(this,"enum_for",["each"],(a=function(){return(a.$$s||this).$size()},a.$$s=this,a.$$arity=0,a));O(this.$class().$members(),"each",[],(c=function(a){var e=c.$$s||this;null==a&&(a=h);return b.yield1(d,e["$[]"](a))},c.$$s=this,c.$$arity=1,c));return this},l.$$arity=0);b.def(g,"$each_pair",c=function(){var a,e,d=c.$$p,k=d||h;d&&(c.$$p=null);if(k===h)return O(this,"enum_for",["each_pair"],(a=function(){return(a.$$s||this).$size()},a.$$s= -this,a.$$arity=0,a));O(this.$class().$members(),"each",[],(e=function(a){var c=e.$$s||this;null==a&&(a=h);return b.yield1(k,[a,c["$[]"](a)])},e.$$s=this,e.$$arity=1,e));return this},c.$$arity=0);b.def(g,"$length",A=function(){return this.$class().$members().$length()},A.$$arity=0);b.alias(g,"size","length");b.def(g,"$to_a",p=function(){var a;return O(this.$class().$members(),"map",[],(a=function(b){var c=a.$$s||this;null==b&&(b=h);return c["$[]"](b)},a.$$s=this,a.$$arity=1,a))},p.$$arity=0);b.alias(g, -"values","to_a");b.def(g,"$inspect",S=function(){var a,b,c=h;c="#<struct ";P(P(a=B(G,"Struct")["$==="](this))?this.$class().$name():a)&&(c=r(c,""+this.$class()+" "));c=r(c,O(this.$each_pair(),"map",[],(b=function(a,b){null==a&&(a=h);null==b&&(b=h);return""+a+"="+b.$inspect()},b.$$s=this,b.$$arity=2,b)).$join(", "));return c=r(c,">")},S.$$arity=0);b.alias(g,"to_s","inspect");b.def(g,"$to_h",M=function(){var a;return O(this.$class().$members(),"each_with_object",[n([],{})],(a=function(c,e){var f=a.$$s|| -this;null==c&&(c=h);null==e&&(e=h);c=[c,f["$[]"](c)];O(e,"[]=",b.to_a(c));return c[y(c.length,1)]},a.$$s=this,a.$$arity=2,a))},M.$$arity=0);b.def(g,"$values_at",k=function(a){var c;var e=b.slice.call(arguments,0,arguments.length);e=O(e,"map",[],(c=function(a){null==a&&(a=h);return a.$$is_range?a.$to_a():a},c.$$s=this,c.$$arity=1,c)).$flatten();c=[];for(var f=0,d=e.length;f<d;f++)e[f].$$is_number||this.$raise(B(G,"TypeError"),"no implicit conversion of "+e[f].$class()+" into Integer"),c.push(this["$[]"](e[f])); -return c},k.$$arity=-1);return(b.def(g,"$dig",e=function(a,c){var e=b.slice.call(arguments,1,arguments.length);var f=P(a.$$is_string&&this.$$data.hasOwnProperty(a))?this.$$data[a]||h:h;if(f===h||0===e.length)return f;P(f["$respond_to?"]("dig"))||this.$raise(B(G,"TypeError"),""+f.$class()+" does not have #dig method");return O(f,"dig",b.to_a(e))},e.$$arity=-2),h)&&"dig"}(G[0],null,G)}; -Opal.modules["corelib/io"]=function(b){function t(b,g){return"number"===typeof b&&"number"===typeof g?b-g:b["$-"](g)}var y=[],D=b.nil,x=b.const_get_qualified,r=b.const_get_relative,g=b.klass,G=b.module,h=b.send,B=b.gvars,u=b.truthy,n=D;b.add_stubs("$attr_accessor $size $write $join $map $String $empty? $concat $chomp $getbyte $getc $raise $new $write_proc= $- $extend".split(" "));(function(n,$super,t){n=g(n,$super,"IO");t=[n].concat(t);var m,x,y,C;n.$$prototype.tty=n.$$prototype.closed=D;b.const_set(t[0], -"SEEK_SET",0);b.const_set(t[0],"SEEK_CUR",1);b.const_set(t[0],"SEEK_END",2);b.def(n,"$tty?",m=function(){return this.tty},m.$$arity=0);b.def(n,"$closed?",x=function(){return this.closed},x.$$arity=0);n.$attr_accessor("write_proc");b.def(n,"$write",y=function(b){this.write_proc(b);return b.$size()},y.$$arity=1);n.$attr_accessor("sync","tty");b.def(n,"$flush",C=function(){return D},C.$$arity=0);(function(g,m){g=G(g,"Writable");[g].concat(m);var n,a,d;b.def(g,"$<<",n=function(a){this.$write(a);return this}, -n.$$arity=1);b.def(g,"$print",a=function(a){var d;null==B[","]&&(B[","]=D);var g=b.slice.call(arguments,0,arguments.length);this.$write(h(g,"map",[],(d=function(a){var b=d.$$s||this;null==a&&(a=D);return b.$String(a)},d.$$s=this,d.$$arity=1,d)).$join(B[","]));return D},a.$$arity=-1);b.def(g,"$puts",d=function(a){var d,g=D;null==B["/"]&&(B["/"]=D);var q=b.slice.call(arguments,0,arguments.length);g=B["/"];u(q["$empty?"]())?this.$write(B["/"]):this.$write(h(q,"map",[],(d=function(a){var b=d.$$s||this; -null==a&&(a=D);return b.$String(a).$chomp()},d.$$s=this,d.$$arity=1,d)).$concat([D]).$join(g));return D},d.$$arity=-1)})(t[0],t);return function(g,m){g=G(g,"Readable");var h=[g].concat(m),a,d,v,n;b.def(g,"$readbyte",a=function(){return this.$getbyte()},a.$$arity=0);b.def(g,"$readchar",d=function(){return this.$getc()},d.$$arity=0);b.def(g,"$readline",v=function(a){null==B["/"]&&(B["/"]=D);return this.$raise(r(h,"NotImplementedError"))},v.$$arity=-1);b.def(g,"$readpartial",n=function(a,b){return this.$raise(r(h, -"NotImplementedError"))},n.$$arity=-2)}(t[0],t)})(y[0],null,y);b.const_set(y[0],"STDERR",B.stderr=r(y,"IO").$new());b.const_set(y[0],"STDIN",B.stdin=r(y,"IO").$new());b.const_set(y[0],"STDOUT",B.stdout=r(y,"IO").$new());var P=b.global.console;n=["object"===typeof process&&"object"===typeof process.stdout?function(b){process.stdout.write(b)}:function(b){P.log(b)}];h(r(y,"STDOUT"),"write_proc=",b.to_a(n));n[t(n.length,1)];n=["object"===typeof process&&"object"===typeof process.stderr?function(b){process.stderr.write(b)}: -function(b){P.warn(b)}];h(r(y,"STDERR"),"write_proc=",b.to_a(n));n[t(n.length,1)];r(y,"STDOUT").$extend(x(r(y,"IO"),"Writable"));return r(y,"STDERR").$extend(x(r(y,"IO"),"Writable"))};Opal.modules["corelib/main"]=function(b){var t,y,D=b.top,x=[],r=b.nil,g=b.const_get_relative;b.add_stubs(["$include"]);b.defs(D,"$to_s",t=function(){return"main"},t.$$arity=0);return(b.defs(D,"$include",y=function(b){return g(x,"Object").$include(b)},y.$$arity=1),r)&&"include"}; -Opal.modules["corelib/dir"]=function(b){var t=[],y=b.nil,D=b.const_get_relative,x=b.klass,r=b.truthy;b.add_stubs(["$[]"]);return function(g,$super,h){g=x(g,$super,"Dir");h=[g].concat(h);return function(g,h){var n=[g].concat(h),t,x,u;b.def(g,"$chdir",t=function(g){var m=t.$$p,h=m||y,n=y;m&&(t.$$p=null);a:{try{n=b.current_dir;b.current_dir=g;var r=b.yieldX(h,[]);break a}finally{b.current_dir=n}r=void 0}return r},t.$$arity=1);b.def(g,"$pwd",x=function(){return b.current_dir||"."},x.$$arity=0);b.alias(g, -"getwd","pwd");return(b.def(g,"$home",u=function(){var b;return r(b=D(n,"ENV")["$[]"]("HOME"))?b:"."},u.$$arity=0),y)&&"home"}(b.get_singleton_class(g),h)}(t[0],null,t)}; -Opal.modules["corelib/file"]=function(b){function t(b,g){return"number"===typeof b&&"number"===typeof g?b+g:b["$+"](g)}function y(b,g){return"number"===typeof b&&"number"===typeof g?b-g:b["$-"](g)}var D=[],x=b.nil,r=b.const_get_relative,g=b.klass,G=b.truthy,h=b.range,B=b.send;b.add_stubs("$respond_to? $to_path $pwd $split $sub $+ $unshift $join $home $raise $start_with? $absolute_path $coerce_to! $basename $empty? $rindex $[] $nil? $== $- $length $gsub $find $=~ $map $each_with_index $flatten $reject $to_proc $end_with?".split(" "));return function(u, -$super,D){u=g(u,$super,"File");D=[u].concat(D);var O=x;b.const_set(D[0],"Separator",b.const_set(D[0],"SEPARATOR","/"));b.const_set(D[0],"ALT_SEPARATOR",x);b.const_set(D[0],"PATH_SEPARATOR",":");b.const_set(D[0],"FNM_SYSCASE",0);O=/^[a-zA-Z]:(?:\\|\/)/;return function(g,u){function m(a){G(a["$respond_to?"]("to_path"))&&(a=a.$to_path());return a=r(H,"Opal")["$coerce_to!"](a,r(H,"String"),"to_str")}function D(){return r(H,"ALT_SEPARATOR")===x?b.escape_regexp(r(H,"SEPARATOR")):b.escape_regexp(t(r(H,"SEPARATOR"), -r(H,"ALT_SEPARATOR")))}var H=[g].concat(u),C,J,I,P,a,d,v,E,N;b.def(g,"$absolute_path",C=function(a,b){var c;null==b&&(b=x);var d=r(H,"SEPARATOR");var p=D();var g=[];a=G(a["$respond_to?"]("to_path"))?a.$to_path():a;b=G(c=b)?c:r(H,"Dir").$pwd();c=a.substr(0,d.length)===d||O.test(a);var l=b.substr(0,d.length)===d||O.test(b);G(c)?(c=a.$split(new RegExp("["+p+"]")),a=O.test(a)?"":a.$sub(new RegExp("^(["+p+"]+).*$"),"\\1"),b=!0):(c=t(b.$split(new RegExp("["+p+"]")),a.$split(new RegExp("["+p+"]"))),a=O.test(b)? -"":b.$sub(new RegExp("^(["+p+"]+).*$"),"\\1"),b=l);l=0;for(var k=c.length;l<k;l++)p=c[l],p===x||""===p&&(0===g.length||b)||"."===p&&(0===g.length||b)||(".."===p?g.pop():g.push(p));b||"."===c[0]||g.$unshift(".");d=g.$join(d);G(b)&&(d=t(a,d));return d},C.$$arity=-2);b.def(g,"$expand_path",J=function(a,b){null==b&&(b=x);var c=r(H,"SEPARATOR");var d=D();if(G("~"===a[0]||b&&"~"===b[0])){var p=r(H,"Dir").$home();G(p)||this.$raise(r(H,"ArgumentError"),"couldn't find HOME environment -- expanding `~'");d= -O.test(p)?"":p.$sub(new RegExp("^(["+d+"]+).*$"),"\\1");G(p["$start_with?"](d))||this.$raise(r(H,"ArgumentError"),"non-absolute home");p=t(p,c);c=new RegExp("^\\~(?:"+c+"|$)");a=a.$sub(c,p);G(b)&&(b=b.$sub(c,p))}return this.$absolute_path(a,b)},J.$$arity=-2);b.alias(g,"realpath","expand_path");b.def(g,"$dirname",I=function(a){var b=D();a=m(a);var c=a.match(new RegExp("^["+b+"]"));a=a.replace(new RegExp("["+b+"]+$"),"");a=a.replace(new RegExp("[^"+b+"]+$"),"");a=a.replace(new RegExp("["+b+"]+$"),""); -return""===a?c?"/":".":a},I.$$arity=1);b.def(g,"$basename",P=function(a,d){null==d&&(d=x);var c=D();a=m(a);if(0==a.length)return a;d=d!==x?r(H,"Opal")["$coerce_to!"](d,r(H,"String"),"to_str"):null;a=a.replace(new RegExp("(.)["+c+"]*$"),"$1");a=a.replace(new RegExp("^(?:.*["+c+"])?([^"+c+"]+)$"),"$1");".*"===d?a=a.replace(/\.[^\.]+$/,""):null!==d&&(d=b.escape_regexp(d),a=a.replace(new RegExp(""+d+"$"),""));return a},P.$$arity=-2);b.def(g,"$extname",a=function(a){var d;a=m(a);a=this.$basename(a);if(G(a["$empty?"]()))return""; -var c=a["$[]"](h(1,-1,!1)).$rindex(".");return G(G(d=c["$nil?"]())?d:t(c,1)["$=="](y(a.$length(),1)))?"":a["$[]"](b.Range.$new(t(c,1),-1,!1))},a.$$arity=1);b.def(g,"$exist?",d=function(a){return null!=b.modules[a]},d.$$arity=1);b.alias(g,"exists?","exist?");b.def(g,"$directory?",v=function(a){var d,c=x;c=x;c=[];for(var g in b.modules)c.push(g);a=a.$gsub(new RegExp("(^."+r(H,"SEPARATOR")+"+|"+r(H,"SEPARATOR")+"+$)"));return c=B(c,"find",[],(d=function(b){null==b&&(b=x);return b["$=~"](new RegExp("^"+ -a))},d.$$s=this,d.$$arity=1,d))},v.$$arity=1);b.def(g,"$join",E=function(a){var d,c,g=x;var p=b.slice.call(arguments,0,arguments.length);if(G(p["$empty?"]()))return"";g="";p=B(p.$flatten().$each_with_index(),"map",[],(d=function(a,b){null==a&&(a=x);null==b&&(b=x);return G(b["$=="](0)?a["$empty?"]():b["$=="](0))?r(H,"SEPARATOR"):G(p.$length()["$=="](t(b,1))?a["$empty?"]():p.$length()["$=="](t(b,1)))?r(H,"SEPARATOR"):a},d.$$s=this,d.$$arity=2,d));p=B(p,"reject",[],"empty?".$to_proc());B(p,"each_with_index", -[],(c=function(a,b){var c;null==a&&(a=x);null==b&&(b=x);b=p["$[]"](t(b,1));if(G(b["$nil?"]()))return g=""+g+a;G(G(c=a["$end_with?"](r(H,"SEPARATOR")))?b["$start_with?"](r(H,"SEPARATOR")):c)&&(a=a.$sub(new RegExp(""+r(H,"SEPARATOR")+"+$"),""));return g=G(G(c=a["$end_with?"](r(H,"SEPARATOR")))?c:b["$start_with?"](r(H,"SEPARATOR")))?""+g+a:""+g+a+r(H,"SEPARATOR")},c.$$s=this,c.$$arity=2,c));return g},E.$$arity=-1);return(b.def(g,"$split",N=function(a){return a.$split(r(H,"SEPARATOR"))},N.$$arity=1), -x)&&"split"}(b.get_singleton_class(u),D)}(D[0],r(D,"IO"),D)}; -Opal.modules["corelib/process"]=function(b){var t=[],y=b.nil,D=b.const_get_qualified,x=b.const_get_relative,r=b.klass,g=b.truthy;b.add_stubs("$const_set $size $<< $__register_clock__ $to_f $now $new $[] $raise".split(" "));(function(t,$super,B){t=r(t,$super,"Process");var u=[t].concat(B),n,G,O,I;B=y;t.__clocks__=[];b.defs(t,"$__register_clock__",n=function(b,g){null==this.__clocks__&&(this.__clocks__=y);this.$const_set(b,this.__clocks__.$size());return this.__clocks__["$<<"](g)},n.$$arity=2);t.$__register_clock__("CLOCK_REALTIME", -function(){return Date.now()});B=!1;if(b.global.performance)B=function(){return performance.now()};else if(b.global.process&&process.hrtime){var H=process.hrtime();B=function(){var b=process.hrtime(H);return 1E3*b[0]+(b[1]/1E3|0)/1E3}}g(B)&&t.$__register_clock__("CLOCK_MONOTONIC",B);b.defs(t,"$pid",G=function(){return 0},G.$$arity=0);b.defs(t,"$times",O=function(){var b=x(u,"Time").$now().$to_f();return D(x(u,"Benchmark"),"Tms").$new(b,b,b,b,b)},O.$$arity=0);return(b.defs(t,"$clock_gettime",I=function(b, -n){var m,r;null==this.__clocks__&&(this.__clocks__=y);null==n&&(n="float_second");g(m=r=this.__clocks__["$[]"](b))?m:this.$raise(D(x(u,"Errno"),"EINVAL"),"clock_gettime("+b+") "+this.__clocks__["$[]"](b));b=r();switch(n){case "float_second":return b/1E3;case "float_millisecond":return b/1;case "float_microsecond":return 1E3*b;case "second":return b/1E3|0;case "millisecond":return b/1|0;case "microsecond":return 1E3*b|0;case "nanosecond":return 1E6*b|0;default:this.$raise(x(u,"ArgumentError"),"unexpected unit: "+ -n)}},I.$$arity=-2),y)&&"clock_gettime"})(t[0],null,t);(function(g,$super,t){g=r(g,$super,"Signal");[g].concat(t);var x;return(b.defs(g,"$trap",x=function(g){b.slice.call(arguments,0,arguments.length);return y},x.$$arity=-1),y)&&"trap"})(t[0],null,t);return function(g,$super,t){g=r(g,$super,"GC");[g].concat(t);var x;return(b.defs(g,"$start",x=function(){return y},x.$$arity=0),y)&&"start"}(t[0],null,t)}; -Opal.modules["corelib/unsupported"]=function(b){function t(g){switch(b.config.unsupported_features_severity){case "error":G(r,"Kernel").$raise(G(r,"NotImplementedError"),g);break;case "warning":u[g]||(u[g]=!0,x.$warn(g))}}var y,D,x=b.top,r=[],g=b.nil,G=b.const_get_relative,h=b.klass,B=b.module;b.add_stubs(["$raise","$warn","$%"]);var u={};(function(n,$super,r){n=h(n,$super,"String");var t=[n].concat(r),x,m,u,y,C,D,B,O,a,d,v,E,N,q,l,c,A,p,S,M,k,e,f;b.def(n,"$<<",x=function(a){b.slice.call(arguments, -0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("<<"))},x.$$arity=-1);b.def(n,"$capitalize!",m=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("capitalize!"))},m.$$arity=-1);b.def(n,"$chomp!",u=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t, -"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("chomp!"))},u.$$arity=-1);b.def(n,"$chop!",y=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("chop!"))},y.$$arity=-1);b.def(n,"$downcase!",C=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("downcase!"))}, -C.$$arity=-1);b.def(n,"$gsub!",D=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("gsub!"))},D.$$arity=-1);b.def(n,"$lstrip!",B=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("lstrip!"))},B.$$arity=-1);b.def(n,"$next!",O=function(a){b.slice.call(arguments, -0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("next!"))},O.$$arity=-1);b.def(n,"$reverse!",a=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("reverse!"))},a.$$arity=-1);b.def(n,"$slice!",d=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t, -"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("slice!"))},d.$$arity=-1);b.def(n,"$squeeze!",v=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("squeeze!"))},v.$$arity=-1);b.def(n,"$strip!",E=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("strip!"))}, -E.$$arity=-1);b.def(n,"$sub!",N=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("sub!"))},N.$$arity=-1);b.def(n,"$succ!",q=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("succ!"))},q.$$arity=-1);b.def(n,"$swapcase!",l=function(a){b.slice.call(arguments, -0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("swapcase!"))},l.$$arity=-1);b.def(n,"$tr!",c=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("tr!"))},c.$$arity=-1);b.def(n,"$tr_s!",A=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t,"NotImplementedError"), -"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("tr_s!"))},A.$$arity=-1);b.def(n,"$upcase!",p=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("upcase!"))},p.$$arity=-1);b.def(n,"$prepend",S=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("prepend"))}, -S.$$arity=-1);b.def(n,"$[]=",M=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("[]="))},M.$$arity=-1);b.def(n,"$clear",k=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("clear"))},k.$$arity=-1);b.def(n,"$encode!",e=function(a){b.slice.call(arguments, -0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("encode!"))},e.$$arity=-1);return(b.def(n,"$unicode_normalize!",f=function(a){b.slice.call(arguments,0,arguments.length);return this.$raise(G(t,"NotImplementedError"),"String#%s not supported. Mutable String methods are not supported in Opal."["$%"]("unicode_normalize!"))},f.$$arity=-1),g)&&"unicode_normalize!"})(r[0],null,r);(function(g,h){g=B(g,"Kernel"); -[g].concat(h);var n,r;b.def(g,"$freeze",n=function(){t("Object freezing is not supported by Opal");return this},n.$$arity=0);b.def(g,"$frozen?",r=function(){t("Object freezing is not supported by Opal");return!1},r.$$arity=0)})(r[0],r);(function(g,h){g=B(g,"Kernel");[g].concat(h);var n,r,x;b.def(g,"$taint",n=function(){t("Object tainting is not supported by Opal");return this},n.$$arity=0);b.def(g,"$untaint",r=function(){t("Object tainting is not supported by Opal");return this},r.$$arity=0);b.def(g, -"$tainted?",x=function(){t("Object tainting is not supported by Opal");return!1},x.$$arity=0)})(r[0],r);(function(n,$super,r){n=h(n,$super,"Module");[n].concat(r);var t,x,m,u;b.def(n,"$public",t=function(m){0===b.slice.call(arguments,0,arguments.length).length&&(this.$$module_function=!1);return g},t.$$arity=-1);b.alias(n,"private","public");b.alias(n,"protected","public");b.alias(n,"nesting","public");b.def(n,"$private_class_method",x=function(g){b.slice.call(arguments,0,arguments.length);return this}, -x.$$arity=-1);b.alias(n,"public_class_method","private_class_method");b.def(n,"$private_method_defined?",m=function(b){return!1},m.$$arity=1);b.def(n,"$private_constant",u=function(m){b.slice.call(arguments,0,arguments.length);return g},u.$$arity=-1);b.alias(n,"protected_method_defined?","private_method_defined?");b.alias(n,"public_instance_methods","instance_methods");b.alias(n,"public_instance_method","instance_method");return b.alias(n,"public_method_defined?","method_defined?")})(r[0],null,r); -(function(g,h){g=B(g,"Kernel");[g].concat(h);var n;b.def(g,"$private_methods",n=function(g){b.slice.call(arguments,0,arguments.length);return[]},n.$$arity=-1);b.alias(g,"private_instance_methods","private_methods")})(r[0],r);(function(g,h){g=B(g,"Kernel");var n=[g].concat(h),r;b.def(g,"$eval",r=function(g){b.slice.call(arguments,0,arguments.length);return this.$raise(G(n,"NotImplementedError"),"To use Kernel#eval, you must first require 'opal-parser'. "+("See https://github.com/opal/opal/blob/"+G(n, -"RUBY_ENGINE_VERSION")+"/docs/opal_parser.md for details."))},r.$$arity=-1)})(r[0],r);b.defs(x,"$public",y=function(h){b.slice.call(arguments,0,arguments.length);return g},y.$$arity=-1);return(b.defs(x,"$private",D=function(h){b.slice.call(arguments,0,arguments.length);return g},D.$$arity=-1),g)&&"private"}; -(function(b){var t=b.top;b.add_stubs(["$require"]);t.$require("opal/base");t.$require("opal/mini");t.$require("corelib/string/encoding");t.$require("corelib/struct");t.$require("corelib/io");t.$require("corelib/main");t.$require("corelib/dir");t.$require("corelib/file");t.$require("corelib/process");return t.$require("corelib/unsupported")})(Opal); -(function(b,t){"object"===typeof module&&module.exports?module.exports=t:"function"===typeof define&&define.amd?define("asciidoctor",["module"],function(b){return t(b.config())}):b.Asciidoctor=t})(this,function(b){function t(a,b,v,m,h){var d=Opal.klass(Opal.Object,a,b,function(){}),l,c,A,p={},E;for(E in v)Object.prototype.hasOwnProperty.call(v,E)&&function(a){var b=v[a];"postConstruct"===a?l=b:"initialize"===a?c=b:"constructor"===a?A=b:(m&&Object.prototype.hasOwnProperty.call(m,a)&&(p[a]=!0),Opal.def(d, -"$"+a,function(){var c=h&&Object.prototype.hasOwnProperty.call(h,a)?h[a](arguments):arguments;return b.apply(this,c)}))}(E);var n="function"===typeof A?function(){for(var a=Array.from(arguments),b=0;b<a.length;b++)"object"===typeof a[b]&&"$$smap"in a[b]&&(a[b]=g(a[b]));a.unshift(null);a=new (Function.prototype.bind.apply(A,a));Object.assign(this,a);"function"===typeof l&&l.bind(this)()}:"function"===typeof c?function(){for(var a=Array.from(arguments),b=0;b<a.length;b++)"object"===typeof a[b]&&"$$smap"in -a[b]&&(a[b]=g(a[b]));c.apply(this,a);"function"===typeof l&&l.bind(this)()}:function(){Opal.send(this,Opal.find_super_dispatcher(this,"initialize",n));"function"===typeof l&&l.bind(this)()};Opal.def(d,"$initialize",n);Opal.def(d,"super",function(a){if("function"===typeof a)Opal.send(this,Opal.find_super_dispatcher(this,a.name,a));else{for(var b=Array.from(arguments),c=0;c<b.length;c++)"object"===typeof b[c]&&(b[c]=r(b[c]));Opal.send(this,Opal.find_super_dispatcher(this,"initialize",n),b)}});if(m)for(var k in m)Object.prototype.hasOwnProperty.call(m, -k)&&!Object.prototype.hasOwnProperty.call(p,k)&&function(a){var b=m[a];Opal.def(d,"$"+a,function(){return b.apply(this,arguments)})}(k);return d}function y(a,b){var d=Opal.const_get_qualified(Opal.Logger,"Formatter");return t(d,a,b,{},{call:function(a){for(var b=0;b<a.length;b++)"object"===typeof a[b]&&"$$smap"in a[b]&&(a[b]=g(a[b]));return a}})}function D(a,b){var d=Opal.const_get_qualified(Opal.Asciidoctor,"Logger");return t(d,a,b,{},{add:function(a){if(2<=a.length&&"object"===typeof a[2]&&"$$smap"in -a[2]){var b=g(a[2]);b.getText=function(){return this.text};b.getSourceLocation=function(){return this.source_location};b.$inspect=function(){var a=this.getSourceLocation();return a?a.getPath()+": line "+a.getLineNumber()+": "+this.getText():this.getText()};a[2]=b}1<=a.length&&(a[1]=a[1]===Opal.nil?void 0:a[1]);return a}})}function x(a,b,g){a=Opal.const_get_qualified(C,a);return t(a,b,g,{"handles?":function(){return!0}})}Opal.modules["asciidoctor/js/opal_ext/browser/file"]=function(a){var b=[],g=a.nil, -m=a.const_get_relative,h=a.klass;a.add_stubs(["$new"]);return function(b,$super,c){b=h(b,$super,"File");var d=[b].concat(c),p;return(a.defs(b,"$read",p=function(a){var b="",c=-1;try{var e=new XMLHttpRequest;e.open("GET",a,!1);e.addEventListener("load",function(){c=this.status;if(0===c||200===c)b=this.responseText});e.overrideMimeType("text/plain");e.send()}catch(f){throw m(d,"IOError").$new("Error reading file or directory: "+a+"; reason: "+f.message);}if(404===c||0===c&&!b)throw m(d,"IOError").$new("No such file or directory: "+ -a);return b},p.$$arity=1),g)&&"read"}(b[0],null,b)};Opal.modules["asciidoctor/js/opal_ext/browser"]=function(a){var d=a.top,g=[];a.add_stubs(["$require"]);if("object"===typeof b&&"object"===typeof b.runtime){var m=b.runtime;var h=m.platform;var q=m.engine;var l=m.framework;m=m.ioModule}h=h||"browser";q=q||"";l=l||"";a.const_set(g[0],"JAVASCRIPT_IO_MODULE",m||"xmlhttprequest");a.const_set(g[0],"JAVASCRIPT_PLATFORM",h);a.const_set(g[0],"JAVASCRIPT_ENGINE",q);a.const_set(g[0],"JAVASCRIPT_FRAMEWORK", -l);return d.$require("asciidoctor/js/opal_ext/browser/file")};Opal.modules["asciidoctor/js/asciidoctor_ext/browser/abstract_node"]=function(a){var b=[],g=a.nil,m=a.const_get_qualified,h=a.const_get_relative,q=a.module,l=a.klass,c=a.hash2,A=a.truthy;a.add_stubs("$uriish? $[] $web_path $path_resolver $descends_from? $base_dir $start_with? $attr? $join $prepare_source_string $read $fetch $warn $logger $normalize_system_path $read_asset".split(" "));return function(b,d){b=[q(b,"Asciidoctor")].concat(d); -(function(b,$super,e){b=l(b,$super,"AbstractNode");var f=[b].concat(e),d,p;b.$$prototype.document=g;a.def(b,"$read_contents",d=function(b,e){var d,p,l,q=g;null==e&&(e=c([],{}));var v=this.document;if(A(A(d=h(f,"Helpers")["$uriish?"](b))?d:A(p=A(l=q=e["$[]"]("start"))?h(f,"Helpers")["$uriish?"](q):l)?b=v.$path_resolver().$web_path(b,q):p))if(A(A(d=A(p=v.$path_resolver()["$descends_from?"](b,v.$base_dir()))?p:b["$start_with?"]("chrome://"))?d:v["$attr?"]("allow-uri-read")))try{return A(e["$[]"]("normalize"))? -h(f,"Helpers").$prepare_source_string(m("::","File").$read(b)).$join(h(f,"LF")):m("::","File").$read(b)}catch(ua){if(a.rescue(ua,[h(f,"StandardError")]))try{return A(e.$fetch("warn_on_failure",!0))&&this.$logger().$warn("could not retrieve contents of "+(A(d=e["$[]"]("label"))?d:"asset")+" at URI: "+b),g}finally{a.pop_exception()}else throw ua;}else return A(e.$fetch("warn_on_failure",!0))&&this.$logger().$warn("cannot retrieve contents of "+(A(d=e["$[]"]("label"))?d:"asset")+" at URI: "+b+" (allow-uri-read attribute not enabled)"), -g;else return b=this.$normalize_system_path(b,e["$[]"]("start"),g,c(["target_name"],{target_name:A(d=e["$[]"]("label"))?d:"asset"})),this.$read_asset(b,c(["normalize","warn_on_failure","label"],{normalize:e["$[]"]("normalize"),warn_on_failure:e.$fetch("warn_on_failure",!0),label:e["$[]"]("label")}))},d.$$arity=-2);return(a.def(b,"$generate_data_uri_from_uri",p=function(a,b){null==b&&(b=!1);var c="",e="",f=-1;try{var d=new XMLHttpRequest;d.open("GET",a,!1);d.overrideMimeType("text/plain; charset=x-user-defined"); -d.addEventListener("load",function(){f=this.status;if(0===f||200===f){for(var a="",b=this.responseText,d=0,p=b.length;d<p;++d){var g=b.charCodeAt(d)&255;a+=String.fromCharCode(g)}e=btoa(a);c=this.getResponseHeader("content-type")}});d.send(null);if(!c)if(a.endsWith(".jpeg")||a.endsWith(".jpg")||a.endsWith(".jpe"))c="image/jpg";else if(a.endsWith(".png"))c="image/png";else if(a.endsWith(".svg"))c="image/svg+xml";else if(a.endsWith(".bmp"))c="image/bmp";else if(a.endsWith(".tif")||a.endsWith(".tiff"))c= -"image/tiff"}catch(F){f=0}return 404!==f&&(0!==f||e&&c)?"data:"+c+";base64,"+e:(this.$logger().$warn("could not retrieve image data from URI: "+a),a)},p.$$arity=-2),g)&&"generate_data_uri_from_uri"})(b[0],null,b)}(b[0],b)};Opal.modules["asciidoctor/js/asciidoctor_ext/browser/open_uri"]=function(a){var b=[],g=a.nil,m=a.const_get_relative,h=a.module,q=a.send;a.add_stubs(["$new","$path"]);return function(b,c){var d=[h(b,"OpenURI")].concat(c),p;a.defs(m(d,"OpenURI"),"$open_uri",p=function(b,c){var k, -e=(k=p.$$p)||g;k&&(p.$$p=null);k=a.slice.call(arguments,1,arguments.length);k=q(m(d,"File"),"new",[this.$path()].concat(a.to_a(k)));return e!==g?a.yield1(e,k):k},p.$$arity=-2)}(b[0],b)};Opal.modules["asciidoctor/js/asciidoctor_ext/browser/path_resolver"]=function(a){var b=[],g=a.nil,m=a.module,h=a.klass,q=a.truthy;a.add_stubs(["$absolute_path?","$start_with?"]);return function(b,c){b=[m(b,"Asciidoctor")].concat(c);(function(b,$super,c){b=h(b,$super,"PathResolver");[b].concat(c);var d;return(a.def(b, -"$root?",d=function(a){var b;return q(b=this["$absolute_path?"](a))?b:a["$start_with?"]("file://","http://","https://","chrome://")},d.$$arity=1),g)&&"root?"})(b[0],null,b)}(b[0],b)};Opal.modules["asciidoctor/js/asciidoctor_ext/browser/reader"]=function(a){var b=[],g=a.nil,m=a.const_get_relative,h=a.module,q=a.klass,l=a.truthy;a.add_stubs("$posixify $new $base_dir $start_with? $uriish? $descends_from? $key? $attributes $replace_next_line $absolute_path? $== $empty? $! $slice $length".split(" ")); -return function(b,d){b=[h(b,"Asciidoctor")].concat(d);(function(b,$super,c){b=q(b,$super,"PreprocessorReader");var d=[b].concat(c),e;b.$$prototype.path_resolver=b.$$prototype.document=b.$$prototype.include_stack=b.$$prototype.dir=g;return(a.def(b,"$resolve_include_path",e=function(a,b,c){var e,f,k;c=g;var p=(this.path_resolver=l(e=this.path_resolver)?e:m(d,"PathResolver").$new("\\")).$posixify(a);e=["file",this.document.$base_dir()];var q=e[1];e;if(l(p["$start_with?"]("file://")))a=b=p;else if(l(m(d, -"Helpers")["$uriish?"](p))){if(!l(l(e=this.path_resolver["$descends_from?"](p,q))?e:this.document.$attributes()["$key?"]("allow-uri-read")))return this.$replace_next_line("link:"+a+"["+b+"]");a=b=p}else if(l(this.path_resolver["$absolute_path?"](p)))a=b="file://"+(l(p["$start_with?"]("/"))?"":"/")+p;else if((f=l(k=this.include_stack["$empty?"]())?q:this.dir)["$=="]("."))a=b=p;else if(l(l(e=f["$start_with?"]("file://"))?e:m(d,"Helpers")["$uriish?"](f)["$!"]()))a=""+f+"/"+p,b=l(k)?p:l(l(e=q["$=="]("."))? -e:(c=this.path_resolver["$descends_from?"](a,q))["$!"]())?a:a.$slice(c,a.$length());else if(l(k))a=""+f+"/"+(b=p);else if(l(l(e=c=this.path_resolver["$descends_from?"](f,q))?e:this.document.$attributes()["$key?"]("allow-uri-read")))a=""+f+"/"+p,b=l(c)?a.$slice(c,a.$length()):p;else return this.$replace_next_line("link:"+a+"["+b+"]");return[a,"file",b]},e.$$arity=3),g)&&"resolve_include_path"})(b[0],m(b,"Reader"),b)}(b[0],b)};Opal.modules["asciidoctor/js/asciidoctor_ext/browser"]=function(a){var b= -a.top,g=a.nil,m=a.const_get_relative;a.add_stubs(["$==","$require"]);return m([],"JAVASCRIPT_IO_MODULE")["$=="]("xmlhttprequest")?(b.$require("asciidoctor/js/asciidoctor_ext/browser/abstract_node"),b.$require("asciidoctor/js/asciidoctor_ext/browser/open_uri"),b.$require("asciidoctor/js/asciidoctor_ext/browser/path_resolver"),b.$require("asciidoctor/js/asciidoctor_ext/browser/reader")):g};Opal.modules.set=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}function g(a, -b){return"number"===typeof a&&"number"===typeof b?a<b:a["$<"](b)}function m(a,b){return"number"===typeof a&&"number"===typeof b?a<=b:a["$<="](b)}var h=[],q=a.nil,l=a.const_get_relative,c=a.klass,A=a.hash2,p=a.truthy,n=a.send,r=a.module;a.add_stubs("$include $new $nil? $=== $raise $each $add $merge $class $respond_to? $subtract $dup $join $to_a $equal? $instance_of? $== $instance_variable_get $is_a? $size $all? $include? $[]= $- $enum_for $[] $<< $replace $delete $select $each_key $to_proc $empty? $eql? $instance_eval $clear $< $<= $keys".split(" ")); -(function(d,$super,f){d=c(d,$super,"Set");var k=[d].concat(f),v,h,r,U,M,z,E,N,t,S,x,u,qa,ea,y,C,D,za,fa,sa,V,B,ca,G,H,J,aa,na;d.$$prototype.hash=q;d.$include(l(k,"Enumerable"));a.defs(d,"$[]",v=function(b){var c=a.slice.call(arguments,0,arguments.length);return this.$new(c)},v.$$arity=-1);a.def(d,"$initialize",h=function(b){var c=h.$$p,f=c||q,d;c&&(h.$$p=null);c&&(h.$$p=null);null==b&&(b=q);this.hash=A([],{});if(p(b["$nil?"]()))return q;p(l(k,"Enumerable")["$==="](b))||this.$raise(l(k,"ArgumentError"), -"value must be enumerable");return p(f)?n(b,"each",[],(d=function(b){var c=d.$$s||this;null==b&&(b=q);return c.$add(a.yield1(f,b))},d.$$s=this,d.$$arity=1,d)):this.$merge(b)},h.$$arity=-1);a.def(d,"$dup",r=function(){return this.$class().$new().$merge(this)},r.$$arity=0);a.def(d,"$-",U=function(a){p(a["$respond_to?"]("each"))||this.$raise(l(k,"ArgumentError"),"value must be enumerable");return this.$dup().$subtract(a)},U.$$arity=1);a.alias(d,"difference","-");a.def(d,"$inspect",M=function(){return"#<Set: {"+ -this.$to_a().$join(",")+"}>"},M.$$arity=0);a.def(d,"$==",z=function(a){var b,c;return p(this["$equal?"](a))?!0:p(a["$instance_of?"](this.$class()))?this.hash["$=="](a.$instance_variable_get("@hash")):p(p(b=a["$is_a?"](l(k,"Set")))?this.$size()["$=="](a.$size()):b)?n(a,"all?",[],(c=function(a){var b=c.$$s||this;null==b.hash&&(b.hash=q);null==a&&(a=q);return b.hash["$include?"](a)},c.$$s=this,c.$$arity=1,c)):!1},z.$$arity=1);a.def(d,"$add",E=function(c){c=[c,!0];n(this.hash,"[]=",a.to_a(c));c[b(c.length, -1)];return this},E.$$arity=1);a.alias(d,"<<","add");a.def(d,"$classify",N=function(){var c=N.$$p,f=c||q,d,p,g=q;c&&(N.$$p=null);c&&(N.$$p=null);if(f===q)return this.$enum_for("classify");g=n(l(k,"Hash"),"new",[],(d=function(c,f){var k=d.$$s||this;null==c&&(c=q);null==f&&(f=q);f=[f,k.$class().$new()];n(c,"[]=",a.to_a(f));return f[b(f.length,1)]},d.$$s=this,d.$$arity=2,d));n(this,"each",[],(p=function(b){null==b&&(b=q);return g["$[]"](a.yield1(f,b)).$add(b)},p.$$s=this,p.$$arity=1,p));return g},N.$$arity= -0);a.def(d,"$collect!",t=function(){var b=t.$$p,c=b||q,f,d=q;b&&(t.$$p=null);b&&(t.$$p=null);if(c===q)return this.$enum_for("collect!");d=this.$class().$new();n(this,"each",[],(f=function(b){null==b&&(b=q);return d["$<<"](a.yield1(c,b))},f.$$s=this,f.$$arity=1,f));return this.$replace(d)},t.$$arity=0);a.alias(d,"map!","collect!");a.def(d,"$delete",S=function(a){this.hash.$delete(a);return this},S.$$arity=1);a.def(d,"$delete?",x=function(a){return p(this["$include?"](a))?(this.$delete(a),this):q}, -x.$$arity=1);a.def(d,"$delete_if",u=function(){var b,c,f=u.$$p,d=f||q;f&&(u.$$p=null);if(d===q)return this.$enum_for("delete_if");n(n(this,"select",[],(b=function(b){null==b&&(b=q);return a.yield1(d,b)},b.$$s=this,b.$$arity=1,b)),"each",[],(c=function(a){var b=c.$$s||this;null==b.hash&&(b.hash=q);null==a&&(a=q);return b.hash.$delete(a)},c.$$s=this,c.$$arity=1,c));return this},u.$$arity=0);a.def(d,"$add?",qa=function(a){return p(this["$include?"](a))?q:this.$add(a)},qa.$$arity=1);a.def(d,"$each",ea= -function(){var a=ea.$$p,b=a||q;a&&(ea.$$p=null);a&&(ea.$$p=null);if(b===q)return this.$enum_for("each");n(this.hash,"each_key",[],b.$to_proc());return this},ea.$$arity=0);a.def(d,"$empty?",y=function(){return this.hash["$empty?"]()},y.$$arity=0);a.def(d,"$eql?",C=function(a){var b;return this.hash["$eql?"](n(a,"instance_eval",[],(b=function(){var a=b.$$s||this;null==a.hash&&(a.hash=q);return a.hash},b.$$s=this,b.$$arity=0,b)))},C.$$arity=1);a.def(d,"$clear",D=function(){this.hash.$clear();return this}, -D.$$arity=0);a.def(d,"$include?",za=function(a){return this.hash["$include?"](a)},za.$$arity=1);a.alias(d,"member?","include?");a.def(d,"$merge",fa=function(a){var b;n(a,"each",[],(b=function(a){var c=b.$$s||this;null==a&&(a=q);return c.$add(a)},b.$$s=this,b.$$arity=1,b));return this},fa.$$arity=1);a.def(d,"$replace",sa=function(a){this.$clear();this.$merge(a);return this},sa.$$arity=1);a.def(d,"$size",V=function(){return this.hash.$size()},V.$$arity=0);a.alias(d,"length","size");a.def(d,"$subtract", -B=function(a){var b;n(a,"each",[],(b=function(a){var c=b.$$s||this;null==a&&(a=q);return c.$delete(a)},b.$$s=this,b.$$arity=1,b));return this},B.$$arity=1);a.def(d,"$|",ca=function(a){p(a["$respond_to?"]("each"))||this.$raise(l(k,"ArgumentError"),"value must be enumerable");return this.$dup().$merge(a)},ca.$$arity=1);a.def(d,"$superset?",G=function(a){var b,c;p(b=a["$is_a?"](l(k,"Set")))?b:this.$raise(l(k,"ArgumentError"),"value must be a set");return p(g(this.$size(),a.$size()))?!1:n(a,"all?",[], -(c=function(a){var b=c.$$s||this;null==a&&(a=q);return b["$include?"](a)},c.$$s=this,c.$$arity=1,c))},G.$$arity=1);a.alias(d,">=","superset?");a.def(d,"$proper_superset?",H=function(a){var b,c;p(b=a["$is_a?"](l(k,"Set")))?b:this.$raise(l(k,"ArgumentError"),"value must be a set");return p(m(this.$size(),a.$size()))?!1:n(a,"all?",[],(c=function(a){var b=c.$$s||this;null==a&&(a=q);return b["$include?"](a)},c.$$s=this,c.$$arity=1,c))},H.$$arity=1);a.alias(d,">","proper_superset?");a.def(d,"$subset?", -J=function(a){var b,c;p(b=a["$is_a?"](l(k,"Set")))?b:this.$raise(l(k,"ArgumentError"),"value must be a set");return p(g(a.$size(),this.$size()))?!1:n(this,"all?",[],(c=function(b){null==b&&(b=q);return a["$include?"](b)},c.$$s=this,c.$$arity=1,c))},J.$$arity=1);a.alias(d,"<=","subset?");a.def(d,"$proper_subset?",aa=function(a){var b,c;p(b=a["$is_a?"](l(k,"Set")))?b:this.$raise(l(k,"ArgumentError"),"value must be a set");return p(m(a.$size(),this.$size()))?!1:n(this,"all?",[],(c=function(b){null== -b&&(b=q);return a["$include?"](b)},c.$$s=this,c.$$arity=1,c))},aa.$$arity=1);a.alias(d,"<","proper_subset?");a.alias(d,"+","|");a.alias(d,"union","|");return(a.def(d,"$to_a",na=function(){return this.hash.$keys()},na.$$arity=0),q)&&"to_a"})(h[0],null,h);return function(b,c){b=r(b,"Enumerable");var e=[b].concat(c),d;a.def(b,"$to_set",d=function(b,c){var f=d.$$p,k=f||q;f&&(d.$$p=null);f&&(d.$$p=null);f=a.slice.call(arguments,0,arguments.length);if(0<f.length){var p=f[0];f.splice(0,1)}null==p&&(p=l(e, -"Set"));return n(p,"new",[this].concat(a.to_a(f)),k.$to_proc())},d.$$arity=-1)}(h[0],h)};Opal.modules["asciidoctor/js/opal_ext/kernel"]=function(a){var b=[],g=a.nil,m=a.const_get_relative,h=a.module,q=a.send;a.add_stubs(["$new"]);return function(b,c){b=h(b,"Kernel");var d=[b].concat(c),p,l;a.def(b,"$open",p=function(b,c){var e,f=(e=p.$$p)||g;e&&(p.$$p=null);e=a.slice.call(arguments,1,arguments.length);e=q(m(d,"File"),"new",[b].concat(a.to_a(e)));return f!==g?a.yield1(f,e):e},p.$$arity=-2);a.def(b, -"$__dir__",l=function(){return""},l.$$arity=0)}(b[0],b)};Opal.modules["asciidoctor/js/opal_ext/file"]=function(a){var b=[],g=a.nil,m=a.const_get_relative,h=a.klass,q=a.truthy,l=a.gvars;a.add_stubs("$attr_reader $delete $gsub $read $size $to_enum $chomp $each_line $readlines $split".split(" "));(function(b,$super,d){b=h(b,$super,"File");var c=[b].concat(d),p,k,e,f;b.$$prototype.eof=b.$$prototype.path=g;b.$attr_reader("eof");b.$attr_reader("lineno");b.$attr_reader("path");a.def(b,"$initialize",p=function(a, -b){null==b&&(b="r");this.path=a;this.contents=g;this.eof=!1;this.lineno=0;b=b.$delete("b");return this.flags=b=b.$gsub(/:(.*)/,"")},p.$$arity=-2);a.def(b,"$read",k=function(){if(q(this.eof))return"";var a=m(c,"File").$read(this.path);this.eof=!0;this.lineno=a.$size();return a},k.$$arity=0);a.def(b,"$each_line",e=function(b){var f=e.$$p,d=f||g;null==l["/"]&&(l["/"]=g);f&&(e.$$p=null);f&&(e.$$p=null);null==b&&(b=l["/"]);if(q(this.eof))return d!==g?this:[].$to_enum();if(d!==g){f=m(c,"File").$read(this.path); -this.eof=!1;this.lineno=0;var k=f.$chomp();f=f.length!=k.length;k=k.split(b);for(var p=0,h=k.length;p<h;p++)this.lineno+=1,p<h-1||f?a.yield1(d,k[p]+b):a.yield1(d,k[p]);this.eof=!0;return this}return this.$read().$each_line()},e.$$arity=-1);a.def(b,"$readlines",f=function(){return m(c,"File").$readlines(this.path)},f.$$arity=0);return function(b,c){var e=[b].concat(c),f,d,k,p;a.def(b,"$readlines",f=function(a,b){null==l["/"]&&(l["/"]=g);null==b&&(b=l["/"]);return m(e,"File").$read(a).$split(b)},f.$$arity= --2);a.def(b,"$file?",d=function(a){return!0},d.$$arity=1);a.def(b,"$readable?",k=function(a){return!0},k.$$arity=1);return(a.def(b,"$read",p=function(a){return""},p.$$arity=1),g)&&"read"}(a.get_singleton_class(b),c)})(b[0],null,b);return function(b,$super,d){b=h(b,$super,"IO");var c=[b].concat(d),p;return(a.defs(b,"$read",p=function(a){return m(c,"File").$read(a)},p.$$arity=1),g)&&"read"}(b[0],null,b)};Opal.modules["asciidoctor/js/opal_ext/match_data"]=function(a){var b=[],g=a.nil,m=a.klass,h=a.send; -a.add_stubs(["$[]=","$-"]);return function(b,$super,c){b=m(b,$super,"MatchData");[b].concat(c);var d;b.$$prototype.matches=g;return(a.def(b,"$[]=",d=function(b,c){b=[b,c];h(this.matches,"[]=",a.to_a(b));c=b.length;c="number"===typeof c?c-1:c["$-"](1);return b[c]},d.$$arity=2),g)&&"[]="}(b[0],null,b)};Opal.modules["asciidoctor/js/opal_ext/string"]=function(a){var b=[],g=a.nil,m=a.klass,h=a.truthy;a.add_stubs("$method_defined? $< $length $bytes $to_s $byteslice $== $_original_unpack".split(" "));return function(b, -$super,c){b=m(b,$super,"String");[b].concat(c);var d,p;h(b["$method_defined?"]("limit_bytesize"))||a.def(b,"$limit_bytesize",d=function(a){var b=this.$bytes().$length();b="number"===typeof a&&"number"===typeof b?a<b:a["$<"](b);return h(b)?this.$byteslice(0,a).$to_s():this.$to_s()},d.$$arity=1);h(b["$method_defined?"]("limit"))||a.alias(b,"limit","limit_bytesize");a.alias(b,"_original_unpack","unpack");return(a.def(b,"$unpack",p=function(a){if(a["$=="]("C3")){a=[];for(var b=0;3>b;b++)b<this.length? -a.push(this.charCodeAt(b)):a.push(g);return a}return this.$_original_unpack(a)},p.$$arity=1),g)&&"unpack"}(b[0],null,b)};Opal.modules["asciidoctor/js/opal_ext/uri"]=function(a){var b=[],g=a.const_get_relative,m=a.module;a.add_stubs(["$extend"]);return function(b,d){b=m(b,"URI");var l=[b].concat(d),c,q;a.defs(b,"$parse",c=function(a){return a.$extend(g(l,"URI"))},c.$$arity=1);a.def(b,"$path",q=function(){return this},q.$$arity=0)}(b[0],b)};Opal.modules["asciidoctor/js/opal_ext/base64"]=function(a){var b= -[],g=a.module,m=a.hash2,h=a.truthy;a.add_stubs(["$delete"]);return function(b,d){b=g(b,"Base64");[b].concat(d);var c,l,p,q,v,k;var e=a.global.btoa||function(a){return(a instanceof Buffer?a:Buffer.from(a.toString(),"binary")).toString("base64")};var f=a.global.atob||function(a){return Buffer.from(a,"base64").toString("binary")};a.defs(b,"$decode64",c=function(a){return f(a.replace(/\r?\n/g,""))},c.$$arity=1);a.defs(b,"$encode64",l=function(a){return e(a).replace(/(.{60})/g,"$1\n").replace(/([^\n])$/g, -"$1\n")},l.$$arity=1);a.defs(b,"$strict_decode64",p=function(a){return f(a)},p.$$arity=1);a.defs(b,"$strict_encode64",q=function(a){return e(a)},q.$$arity=1);a.defs(b,"$urlsafe_decode64",v=function(a){return f(a.replace(/\-/g,"+").replace(/_/g,"/"))},v.$$arity=1);a.defs(b,"$urlsafe_encode64",k=function(b,c){if(null==c)c=m([],{});else if(!c.$$is_hash)throw a.ArgumentError.$new("expected kwargs");c=c.$$smap.padding;null==c&&(c=!0);b=e(b).replace(/\+/g,"-").replace(/\//g,"_");h(c)||(b=b.$delete("=")); -return b},k.$$arity=-2)}(b[0],b)};Opal.modules["asciidoctor/js/opal_ext/number"]=function(a){var b=[],g=a.nil,m=a.const_get_relative,h=a.klass,q=a.truthy;a.add_stubs(["$coerce_to!","$>"]);return function(b,$super,d){b=h(b,$super,"Number");var p=[b].concat(d),l;return(a.def(b,"$round",l=function(a){a=m(p,"Opal")["$coerce_to!"](a,m(p,"Integer"),"to_int");return q("number"===typeof a?0<a:a["$>"](0))?Number(this.toFixed(a)):Math.round(this)},l.$$arity=-1),g)&&"round"}(b[0],m(b,"Numeric"),b)};Opal.modules["asciidoctor/js/opal_ext"]= -function(a){var b=a.top;a.add_stubs(["$require"]);b.$require("asciidoctor/js/opal_ext/kernel");b.$require("asciidoctor/js/opal_ext/file");b.$require("asciidoctor/js/opal_ext/match_data");b.$require("asciidoctor/js/opal_ext/string");b.$require("asciidoctor/js/opal_ext/uri");b.$require("asciidoctor/js/opal_ext/base64");b.$require("asciidoctor/js/opal_ext/number");a.config.unsupported_features_severity="ignore";b.$require("asciidoctor/js/opal_ext/browser")};Opal.modules["asciidoctor/js/rx"]=function(a){function b(a, -b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}var g=[],m=a.nil,h=a.const_get_relative,q=a.module,l=a.send,c=a.gvars,A=a.truthy;a.add_stubs(["$gsub","$+","$unpack_hex_range"]);return function(d,g){d=q(d,"Asciidoctor");var p=[d].concat(g),k;a.const_set(p[0],"HEX_RANGE_RX",/([A-F0-9]{4})(?:-([A-F0-9]{4}))?/);a.defs(d,"$unpack_hex_range",k=function(a){var b;return l(a,"gsub",[h(p,"HEX_RANGE_RX")],(b=function(){var a,b;return"\\u"+((a=c["~"])===m?m:a["$[]"](1))+(A(a=(b=c["~"])===m?m: -b["$[]"](2))?"-\\u"+((b=c["~"])===m?m:b["$[]"](2)):a)},b.$$s=this,b.$$arity=0,b))},k.$$arity=1);a.const_set(p[0],"P_L",b("A-Za-z",d.$unpack_hex_range("00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D037F03860388-038A038C038E-03A103A3-03F503F7-0481048A-052F0531-055605590561-058705D0-05EA05F0-05F20620-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280840-085808A0-08B20904-0939093D09500958-09610971-09800985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10CF10CF20D05-0D0C0D0E-0D100D12-0D3A0D3D0D4E0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC-0EDF0F000F40-0F470F49-0F6C0F88-0F8C1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510C710CD10D0-10FA10FC-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA16F1-16F81700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191E1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1BBA-1BE51C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11CF51CF61D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209C21022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2CF22CF32D00-2D252D272D2D2D30-2D672D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31BA31F0-31FF3400-4DB54E00-9FCCA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A66EA67F-A69DA6A0-A6E5A717-A71FA722-A788A78B-A78EA790-A7ADA7B0A7B1A7F7-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFA9E0-A9E4A9E6-A9EFA9FA-A9FEAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA7E-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDAAE0-AAEAAAF2-AAF4AB01-AB06AB09-AB0EAB11-AB16AB20-AB26AB28-AB2EAB30-AB5AAB5C-AB5FAB64AB65ABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC"))); -a.const_set(p[0],"P_Nl",d.$unpack_hex_range("16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF"));a.const_set(p[0],"P_Nd",b("0-9",d.$unpack_hex_range("0660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0DE6-0DEF0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19D91A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9A9F0-A9F9AA50-AA59ABF0-ABF9FF10-FF19")));a.const_set(p[0], -"P_Pc",d.$unpack_hex_range("005F203F20402054FE33FE34FE4D-FE4FFF3F"));a.const_set(p[0],"CC_ALPHA",""+h(p,"P_L")+h(p,"P_Nl"));a.const_set(p[0],"CG_ALPHA","["+h(p,"CC_ALPHA")+"]");a.const_set(p[0],"CC_ALNUM",""+h(p,"CC_ALPHA")+h(p,"P_Nd"));a.const_set(p[0],"CG_ALNUM","["+h(p,"CC_ALNUM")+"]");a.const_set(p[0],"CC_WORD",""+h(p,"CC_ALNUM")+h(p,"P_Pc"));a.const_set(p[0],"CG_WORD","["+h(p,"CC_WORD")+"]");a.const_set(p[0],"CG_BLANK","[ \\t]");a.const_set(p[0],"CC_EOL","(?=\\n|$)");a.const_set(p[0],"CG_GRAPH", -"[^\\s\\x00-\\x1F\\x7F]");a.const_set(p[0],"CC_ALL","[\\s\\S]");a.const_set(p[0],"CC_ANY","[^\\n]")}(g[0],g)};Opal.modules.strscan=function(a){var b=[],g=a.nil,m=a.klass,h=a.send;a.add_stubs("$attr_reader $anchor $scan_until $length $size $rest $pos= $- $private".split(" "));return function(b,$super,c){b=m(b,$super,"StringScanner");[b].concat(c);var d,p,q,v,k,e,f,n,r,E,t,U,N,z,x,u,ua,ja,y,C,qa,ea,D,B,G;b.$$prototype.pos=b.$$prototype.string=b.$$prototype.working=b.$$prototype.matched=b.$$prototype.prev_pos= -b.$$prototype.match=g;b.$attr_reader("pos");b.$attr_reader("matched");a.def(b,"$initialize",d=function(a){this.string=a;this.pos=0;this.matched=g;this.working=a;return this.match=[]},d.$$arity=1);b.$attr_reader("string");a.def(b,"$beginning_of_line?",p=function(){return 0===this.pos||"\n"===this.string.charAt(this.pos-1)},p.$$arity=0);a.alias(b,"bol?","beginning_of_line?");a.def(b,"$scan",q=function(a){a=this.$anchor(a);a=a.exec(this.working);return null==a?this.matched=g:"object"===typeof a?(this.prev_pos= -this.pos,this.pos+=a[0].length,this.working=this.working.substring(a[0].length),this.matched=a[0],this.match=a,a[0]):"string"===typeof a?(this.pos+=a.length,this.working=this.working.substring(a.length),a):g},q.$$arity=1);a.def(b,"$scan_until",v=function(a){a=this.$anchor(a);for(var b=this.pos,c=this.working,e;;)if(e=a.exec(c),b+=1,c=c.substr(1),null==e){if(0===c.length)return this.matched=g}else return this.matched=this.string.substr(this.pos,b-this.pos-1+e[0].length),this.prev_pos=b-1,this.pos= -b,this.working=c.substr(e[0].length),this.matched},v.$$arity=1);a.def(b,"$[]",k=function(a){var b=this.match;0>a&&(a+=b.length);return 0>a||a>=b.length||null==b[a]?g:b[a]},k.$$arity=1);a.def(b,"$check",e=function(a){a=this.$anchor(a);a=a.exec(this.working);return null==a?this.matched=g:this.matched=a[0]},e.$$arity=1);a.def(b,"$check_until",f=function(a){var b=this.prev_pos,c=this.pos;a=this.$scan_until(a);a!==g&&(this.matched=a.substr(-1),this.working=this.string.substr(c));this.prev_pos=b;this.pos= -c;return a},f.$$arity=1);a.def(b,"$peek",n=function(a){return this.working.substring(0,a)},n.$$arity=1);a.def(b,"$eos?",r=function(){return 0===this.working.length},r.$$arity=0);a.def(b,"$exist?",E=function(a){a=a.exec(this.working);return null==a?g:0==a.index?0:a.index+1},E.$$arity=1);a.def(b,"$skip",t=function(a){a=this.$anchor(a);a=a.exec(this.working);if(null==a)return this.matched=g;a=a[0];var b=a.length;this.matched=a;this.prev_pos=this.pos;this.pos+=b;this.working=this.working.substring(b); -return b},t.$$arity=1);a.def(b,"$skip_until",U=function(a){a=this.$scan_until(a);if(a===g)return g;this.matched=a.substr(-1);return a.length},U.$$arity=1);a.def(b,"$get_byte",N=function(){var a=g;this.pos<this.string.length?(this.prev_pos=this.pos,this.pos+=1,a=this.matched=this.working.substring(0,1),this.working=this.working.substring(1)):this.matched=g;return a},N.$$arity=0);a.alias(b,"getch","get_byte");a.def(b,"$match?",z=function(a){a=this.$anchor(a);a=a.exec(this.working);if(null==a)return g; -this.prev_pos=this.pos;return a[0].length},z.$$arity=1);a.def(b,"$pos=",x=function(a){0>a&&(a+=this.string.$length());this.pos=a;return this.working=this.string.slice(a)},x.$$arity=1);a.def(b,"$matched_size",u=function(){return this.matched===g?g:this.matched.length},u.$$arity=0);a.def(b,"$post_match",ua=function(){return this.matched===g?g:this.string.substr(this.pos)},ua.$$arity=0);a.def(b,"$pre_match",ja=function(){return this.matched===g?g:this.string.substr(0,this.prev_pos)},ja.$$arity=0);a.def(b, -"$reset",y=function(){this.working=this.string;this.matched=g;return this.pos=0},y.$$arity=0);a.def(b,"$rest",C=function(){return this.working},C.$$arity=0);a.def(b,"$rest?",qa=function(){return 0!==this.working.length},qa.$$arity=0);a.def(b,"$rest_size",ea=function(){return this.$rest().$size()},ea.$$arity=0);a.def(b,"$terminate",D=function(){this.match=g;var b=[this.string.$length()];h(this,"pos=",a.to_a(b));var c=b.length;c="number"===typeof c?c-1:c["$-"](1);return b[c]},D.$$arity=0);a.def(b,"$unscan", -B=function(){this.pos=this.prev_pos;this.match=this.prev_pos=g;return this},B.$$arity=0);b.$private();return(a.def(b,"$anchor",G=function(a){var b=a.toString().match(/\/([^\/]+)$/);b=b?b[1]:void 0;return new RegExp("^(?:"+a.source+")",b)},G.$$arity=1),g)&&"anchor"}(b[0],null,b)};Opal.modules["asciidoctor/js"]=function(a){var b=a.top;a.add_stubs(["$require"]);b.$require("asciidoctor/js/opal_ext");b.$require("asciidoctor/js/rx");return b.$require("strscan")};Opal.modules["asciidoctor/core_ext/nil_or_empty"]= -function(a){var b=[],g=a.nil,m=a.klass,h=a.truthy;a.add_stubs(["$method_defined?"]);(function(b,$super,c){b=m(b,$super,"NilClass");[b].concat(c);return h(b["$method_defined?"]("nil_or_empty?"))?g:a.alias(b,"nil_or_empty?","nil?")})(b[0],null,b);(function(b,$super,c){b=m(b,$super,"String");[b].concat(c);return h(b["$method_defined?"]("nil_or_empty?"))?g:a.alias(b,"nil_or_empty?","empty?")})(b[0],null,b);(function(b,$super,c){b=m(b,$super,"Array");[b].concat(c);return h(b["$method_defined?"]("nil_or_empty?"))? -g:a.alias(b,"nil_or_empty?","empty?")})(b[0],null,b);(function(b,$super,c){b=m(b,$super,"Hash");[b].concat(c);return h(b["$method_defined?"]("nil_or_empty?"))?g:a.alias(b,"nil_or_empty?","empty?")})(b[0],null,b);return function(b,$super,c){b=m(b,$super,"Numeric");[b].concat(c);return h(b["$method_defined?"]("nil_or_empty?"))?g:a.alias(b,"nil_or_empty?","nil?")}(b[0],null,b)};Opal.modules["asciidoctor/core_ext/hash/merge"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b? -a<b:a["$<"](b)}var g,m=a.top,h=[],q=a.nil,l=a.const_get_relative,c=a.send,A=a.truthy,p=a.hash2;a.add_stubs("$== $arity $instance_method $send $new $< $length $> $inject $merge $[]".split(" "));return l(h,"Hash").$instance_method("merge").$arity()["$=="](1)?l(h,"Hash").$send("prepend",c(l(h,"Module"),"new",[],(g=function(){var d;return(a.def(g.$$s||this,"$merge",d=function(g){var k,e=q;d.$$p&&(d.$$p=null);var f=a.slice.call(arguments,0,arguments.length);return A(b(e=f.$length(),1))?c(this,a.find_super_dispatcher(this, -"merge",d,!1),[p([],{})],null):A("number"===typeof e?1<e:e["$>"](1))?c(f,"inject",[this],(k=function(a,b){null==a&&(a=q);null==b&&(b=q);return a.$merge(b)},k.$$s=this,k.$$arity=2,k)):c(this,a.find_super_dispatcher(this,"merge",d,!1),[f["$[]"](0)],null)},d.$$arity=-1),q)&&"merge"},g.$$s=m,g.$$arity=0,g))):q};Opal.modules["asciidoctor/core_ext/match_data/names"]=function(a){var b=[],g=a.nil,m=a.const_get_relative,h=a.truthy,q=a.klass;a.add_stubs(["$method_defined?"]);return h(m(b,"MatchData")["$method_defined?"]("names"))? -g:function(b,$super,d){b=q(b,$super,"MatchData");[b].concat(d);var p;return(a.def(b,"$names",p=function(){return[]},p.$$arity=0),g)&&"names"}(b[0],null,b)};Opal.modules["asciidoctor/core_ext"]=function(a){var b=a.top,g=a.nil,m=a.const_get_relative;a.add_stubs(["$=="]);b.$require("asciidoctor/core_ext.rb/../core_ext/nil_or_empty");b.$require("asciidoctor/core_ext.rb/../core_ext/hash/merge");return m([],"RUBY_ENGINE")["$=="]("opal")?b.$require("asciidoctor/core_ext.rb/../core_ext/match_data/names"): -g};Opal.modules["asciidoctor/helpers"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}function g(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}var m=[],h=a.nil,q=a.const_get_qualified,l=a.const_get_relative,c=a.module,A=a.truthy,p=a.gvars,n=a.send,r=a.hash2;a.add_stubs("$module_function $require $include? $include $== $=== $path $message $raise $warn $logger $chomp $empty? $slice $unpack $[] $byteslice $bytesize $[]= $- $map $rstrip $encode $encoding $nil_or_empty? $!= $tap $each_line $<< $match? $gsub $rindex $index $basename $extname $! $length $directory? $dirname $mkdir_p $mkdir $private_constant $join $divmod $* $+ $to_s $to_i $succ $class_for_name $const_get".split(" ")); -return function(d,e){d=[c(d,"Asciidoctor")].concat(e);(function(e,d){e=c(e,"Helpers");var f=[e].concat(d),k,m,v,t,z,E,M,N,X,x,u,S,ea,y,C,D;e.$module_function();a.def(e,"$require_library",k=function(b,c,e){var d=h,k=h;null==p["!"]&&(p["!"]=h);null==c&&(c=!0);null==e&&(e="abort");try{return this.$require(b)}catch(ca){if(a.rescue(ca,[q("::","LoadError")]))try{return A(this["$include?"](l(f,"Logging")))||this.$include(l(f,"Logging")),A(c)?(c["$=="](!0)&&(c=b),d=e,"abort"["$==="](d)?(k=p["!"].$path()["$=="](c)? -"":" (reason: "+(A(p["!"].$path())?"cannot load '"+p["!"].$path()+"'":p["!"].$message())+")",this.$raise(q("::","LoadError"),"asciidoctor: FAILED: required gem '"+c+"' is not available"+k+". Processing aborted.")):"warn"["$==="](d)&&(k=p["!"].$path()["$=="](c)?"":" (reason: "+(A(p["!"].$path())?"cannot load '"+p["!"].$path()+"'":p["!"].$message())+")",this.$logger().$warn("optional gem '"+c+"' is not available"+k+". Functionality disabled."))):(d=e,"abort"["$==="](d)?this.$raise(q("::","LoadError"), -"asciidoctor: FAILED: "+p["!"].$message().$chomp(".")+". Processing aborted."):"warn"["$==="](d)&&this.$logger().$warn(""+p["!"].$message().$chomp(".")+". Functionality disabled.")),h}finally{a.pop_exception()}else throw ca;}},k.$$arity=-2);a.def(e,"$prepare_source_array",m=function(c,e){var d,k,p,g,m,z,v,U,r=this,t=h,E=h,M=h;t=h;null==e&&(e=!0);if(A(c["$empty?"]()))return[];if((t=(E=(M=c["$[]"](0)).$unpack("C3")).$slice(0,2))["$=="](l(f,"BOM_BYTES_UTF_16LE")))return t=[0,M.$byteslice(2,M.$bytesize())], -n(c,"[]=",a.to_a(t)),t[b(t.length,1)],function(){return A(e)?n(c,"map",[],(d=function(a){null==a&&(a=h);return a.$encode(l(f,"UTF_8"),q(q("::","Encoding"),"UTF_16LE")).$rstrip()},d.$$s=r,d.$$arity=1,d)):n(c,"map",[],(k=function(a){null==a&&(a=h);return a.$encode(l(f,"UTF_8"),q(q("::","Encoding"),"UTF_16LE")).$chomp()},k.$$s=r,k.$$arity=1,k))}();if(t["$=="](l(f,"BOM_BYTES_UTF_16BE")))return t=[0,M.$byteslice(2,M.$bytesize())],n(c,"[]=",a.to_a(t)),t[b(t.length,1)],function(){return A(e)?n(c,"map",[], -(p=function(a){null==a&&(a=h);return a.$encode(l(f,"UTF_8"),q(q("::","Encoding"),"UTF_16BE")).$rstrip()},p.$$s=r,p.$$arity=1,p)):n(c,"map",[],(g=function(a){null==a&&(a=h);return a.$encode(l(f,"UTF_8"),q(q("::","Encoding"),"UTF_16BE")).$chomp()},g.$$s=r,g.$$arity=1,g))}();E["$=="](l(f,"BOM_BYTES_UTF_8"))&&(t=[0,M.$byteslice(3,M.$bytesize())],n(c,"[]=",a.to_a(t)),t[b(t.length,1)]);return M.$encoding()["$=="](l(f,"UTF_8"))?A(e)?n(c,"map",[],(m=function(a){null==a&&(a=h);return a.$rstrip()},m.$$s=r, -m.$$arity=1,m)):n(c,"map",[],(z=function(a){null==a&&(a=h);return a.$chomp()},z.$$s=r,z.$$arity=1,z)):A(e)?n(c,"map",[],(v=function(a){null==a&&(a=h);return a.$encode(l(f,"UTF_8")).$rstrip()},v.$$s=r,v.$$arity=1,v)):n(c,"map",[],(U=function(a){null==a&&(a=h);return a.$encode(l(f,"UTF_8")).$chomp()},U.$$s=r,U.$$arity=1,U))},m.$$arity=-2);a.def(e,"$prepare_source_string",v=function(a,b){var c,e,d=h,k=h;null==b&&(b=!0);if(A(a["$nil_or_empty?"]()))return[];(d=(k=a.$unpack("C3")).$slice(0,2))["$=="](l(f, -"BOM_BYTES_UTF_16LE"))?a=a.$byteslice(2,a.$bytesize()).$encode(l(f,"UTF_8"),q(q("::","Encoding"),"UTF_16LE")):d["$=="](l(f,"BOM_BYTES_UTF_16BE"))?a=a.$byteslice(2,a.$bytesize()).$encode(l(f,"UTF_8"),q(q("::","Encoding"),"UTF_16BE")):k["$=="](l(f,"BOM_BYTES_UTF_8"))?(a=a.$byteslice(3,a.$bytesize()),a.$encoding()["$=="](l(f,"UTF_8"))||(a=a.$encode(l(f,"UTF_8")))):A(a.$encoding()["$!="](l(f,"UTF_8")))&&(a=a.$encode(l(f,"UTF_8")));return A(b)?n([],"tap",[],(c=function(b){var e=c.$$s||this,f;null==b&& -(b=h);return n(a,"each_line",[],(f=function(a){null==a&&(a=h);return b["$<<"](a.$rstrip())},f.$$s=e,f.$$arity=1,f))},c.$$s=this,c.$$arity=1,c)):n([],"tap",[],(e=function(b){var c=e.$$s||this,f;null==b&&(b=h);return n(a,"each_line",[],(f=function(a){null==a&&(a=h);return b["$<<"](a.$chomp())},f.$$s=c,f.$$arity=1,f))},e.$$s=this,e.$$arity=1,e))},v.$$arity=-2);a.def(e,"$uriish?",t=function(a){var b;return A(b=a["$include?"](":"))?l(f,"UriSniffRx")["$match?"](a):b},t.$$arity=1);l(f,"RUBY_ENGINE")["$=="]("opal")? -a.def(e,"$encode_uri_component",z=function(a){return encodeURIComponent(a).replace(/%20|[!'()*]/g,function(a){return"%20"===a?"+":"%"+a.charCodeAt(0).toString(16)})},z.$$arity=1):h;a.def(e,"$encode_spaces_in_uri",E=function(a){return A(a["$include?"](" "))?a.$gsub(" ","%20"):a},E.$$arity=1);a.def(e,"$rootname",M=function(a){var b;return A(b=a.$rindex("."))?A(a.$index("/",b))?a:a.$slice(0,b):a},M.$$arity=1);a.def(e,"$basename",N=function(a,b){null==b&&(b=h);return A(b)?q("::","File").$basename(a,b["$=="](!0)? -this.$extname(a):b):q("::","File").$basename(a)},N.$$arity=-2);a.def(e,"$extname?",X=function(a){var b,c=h;return A(b=c=a.$rindex("."))?a.$index("/",c)["$!"]():b},X.$$arity=1);A(q(q("::","File"),"ALT_SEPARATOR"))?a.def(e,"$extname",x=function(a,b){var c,e;null==b&&(b="");return A(e=a.$rindex("."))?A(A(c=a.$index("/",e))?c:a.$index(q(q("::","File"),"ALT_SEPARATOR"),e))?b:a.$slice(e,a.$length()):b},x.$$arity=-2):a.def(e,"$extname",u=function(a,b){var c;null==b&&(b="");return A(c=a.$rindex("."))?A(a.$index("/", -c))?b:a.$slice(c,a.$length()):b},u.$$arity=-2);a.def(e,"$mkdir_p",S=function(b){var c;if(A(q("::","File")["$directory?"](b)))return h;(c=q("::","File").$dirname(b))["$=="](".")||this.$mkdir_p(c);try{return q("::","Dir").$mkdir(b)}catch(sa){if(a.rescue(sa,[q("::","SystemCallError")]))try{return A(q("::","File")["$directory?"](b))?h:this.$raise()}finally{a.pop_exception()}else throw sa;}},S.$$arity=1);a.const_set(f[0],"ROMAN_NUMERALS",r("M CM D CD C XC L XL X IX V IV I".split(" "),{M:1E3,CM:900,D:500, -CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1}));e.$private_constant("ROMAN_NUMERALS");a.def(e,"$int_to_roman",ea=function(b){var c;return n(l(f,"ROMAN_NUMERALS"),"map",[],(c=function(c,e){null==c&&(c=h);null==e&&(e=h);var f=b.$divmod(e);e=a.to_ary(f);var d=null==e[0]?h:e[0];b=null==e[1]?h:e[1];f;return"number"===typeof c&&"number"===typeof d?c*d:c["$*"](d)},c.$$s=this,c.$$arity=2,c)).$join()},ea.$$arity=1);a.def(e,"$nextval",y=function(a){var b;return A(q("::","Integer")["$==="](a))?g(a,1): -(b=a.$to_i()).$to_s()["$=="](a.$to_s())?g(b,1):a.$succ()},y.$$arity=1);a.def(e,"$resolve_class",C=function(a){return A(q("::","Class")["$==="](a))?a:A(q("::","String")["$==="](a))?this.$class_for_name(a):h},C.$$arity=1);a.def(e,"$class_for_name",D=function(b){var c=h;try{return A(q("::","Class")["$==="](c=q("::","Object").$const_get(b,!1)))||this.$raise(),c}catch(sa){if(a.rescue(sa,[l(f,"StandardError")]))try{return this.$raise(q("::","NameError"),"Could not resolve class for name: "+b)}finally{a.pop_exception()}else throw sa; -}},D.$$arity=1)})(d[0],d)}(m[0],m)};Opal.modules.logger=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a<=b:a["$<="](b)}var g=[],m=a.nil,h=a.const_get_qualified,q=a.const_get_relative,l=a.klass,c=a.module,n=a.send,p=a.truthy;a.add_stubs("$include $to_h $map $constants $const_get $to_s $format $chr $strftime $message_as_string $=== $+ $message $class $join $backtrace $inspect $attr_reader $attr_accessor $new $key $upcase $raise $add $to_proc $<= $< $write $call $[] $now".split(" ")); -return function(d,$super,k){d=l(d,$super,"Logger");var e=[d].concat(k),f,g,v,A,r,U,t,z,E,N,x,u,S,y,qa;d.$$prototype.level=d.$$prototype.progname=d.$$prototype.pipe=d.$$prototype.formatter=m;(function(b,e){b=[c(b,"Severity")].concat(e);a.const_set(b[0],"DEBUG",0);a.const_set(b[0],"INFO",1);a.const_set(b[0],"WARN",2);a.const_set(b[0],"ERROR",3);a.const_set(b[0],"FATAL",4);a.const_set(b[0],"UNKNOWN",5)})(e[0],e);d.$include(q(e,"Severity"));a.const_set(e[0],"SEVERITY_LABELS",n(q(e,"Severity").$constants(), -"map",[],(f=function(a){null==a&&(a=m);return[q(e,"Severity").$const_get(a),a.$to_s()]},f.$$s=d,f.$$arity=1,f)).$to_h());(function(b,$super,c){b=l(b,$super,"Formatter");var e=[b].concat(c),f,d;a.const_set(e[0],"MESSAGE_FORMAT","%s, [%s] %5s -- %s: %s\n");a.const_set(e[0],"DATE_TIME_FORMAT","%Y-%m-%dT%H:%M:%S.%6N");a.def(b,"$call",f=function(a,b,c,f){return this.$format(q(e,"MESSAGE_FORMAT"),a.$chr(),b.$strftime(q(e,"DATE_TIME_FORMAT")),a,c,this.$message_as_string(f))},f.$$arity=4);return(a.def(b, -"$message_as_string",d=function(a){var b,c=m;return function(){c=a;if(h("::","String")["$==="](c))return a;if(h("::","Exception")["$==="](c)){var e=""+a.$message()+" ("+a.$class()+")\n",f=(p(b=a.$backtrace())?b:[]).$join("\n");return"number"===typeof e&&"number"===typeof f?e+f:e["$+"](f)}return a.$inspect()}()},d.$$arity=1),m)&&"message_as_string"})(e[0],null,e);d.$attr_reader("level");d.$attr_accessor("progname");d.$attr_accessor("formatter");a.def(d,"$initialize",g=function(a){this.pipe=a;this.level= -q(e,"DEBUG");return this.formatter=q(e,"Formatter").$new()},g.$$arity=1);a.def(d,"$level=",v=function(a){var b;return p(h("::","Integer")["$==="](a))?this.level=a:p(b=q(e,"SEVERITY_LABELS").$key(a.$to_s().$upcase()))?this.level=b:this.$raise(q(e,"ArgumentError"),"invalid log level: "+a)},v.$$arity=1);a.def(d,"$info",A=function(a){var b=A.$$p,c=b||m;b&&(A.$$p=null);b&&(A.$$p=null);null==a&&(a=m);return n(this,"add",[q(e,"INFO"),m,a],c.$to_proc())},A.$$arity=-1);a.def(d,"$debug",r=function(a){var b= -r.$$p,c=b||m;b&&(r.$$p=null);b&&(r.$$p=null);null==a&&(a=m);return n(this,"add",[q(e,"DEBUG"),m,a],c.$to_proc())},r.$$arity=-1);a.def(d,"$warn",U=function(a){var b=U.$$p,c=b||m;b&&(U.$$p=null);b&&(U.$$p=null);null==a&&(a=m);return n(this,"add",[q(e,"WARN"),m,a],c.$to_proc())},U.$$arity=-1);a.def(d,"$error",t=function(a){var b=t.$$p,c=b||m;b&&(t.$$p=null);b&&(t.$$p=null);null==a&&(a=m);return n(this,"add",[q(e,"ERROR"),m,a],c.$to_proc())},t.$$arity=-1);a.def(d,"$fatal",z=function(a){var b=z.$$p,c= -b||m;b&&(z.$$p=null);b&&(z.$$p=null);null==a&&(a=m);return n(this,"add",[q(e,"FATAL"),m,a],c.$to_proc())},z.$$arity=-1);a.def(d,"$unknown",E=function(a){var b=E.$$p,c=b||m;b&&(E.$$p=null);b&&(E.$$p=null);null==a&&(a=m);return n(this,"add",[q(e,"UNKNOWN"),m,a],c.$to_proc())},E.$$arity=-1);a.def(d,"$info?",N=function(){return b(this.level,q(e,"INFO"))},N.$$arity=0);a.def(d,"$debug?",x=function(){return b(this.level,q(e,"DEBUG"))},x.$$arity=0);a.def(d,"$warn?",u=function(){return b(this.level,q(e,"WARN"))}, -u.$$arity=0);a.def(d,"$error?",S=function(){return b(this.level,q(e,"ERROR"))},S.$$arity=0);a.def(d,"$fatal?",y=function(){return b(this.level,q(e,"FATAL"))},y.$$arity=0);return(a.def(d,"$add",qa=function(b,c,f){var d=qa.$$p,k=d||m,g;d&&(qa.$$p=null);d&&(qa.$$p=null);null==c&&(c=m);null==f&&(f=m);d=b=p(g=b)?g:q(e,"UNKNOWN");var l=this.level;d="number"===typeof d&&"number"===typeof l?d<l:d["$<"](l);if(p(d))return!0;f=p(g=f)?g:this.progname;p(c)||(k!==m?c=a.yieldX(k,[]):(c=f,f=this.progname));this.pipe.$write(this.formatter.$call(p(g= -q(e,"SEVERITY_LABELS")["$[]"](b))?g:"ANY",h("::","Time").$now(),f,c));return!0},qa.$$arity=-2),m)&&"add"}(g[0],null,g)};Opal.modules["asciidoctor/logging"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}function g(a,b){return"number"===typeof a&&"number"===typeof b?a>b:a["$>"](b)}var m=a.top,h=[],q=a.nil,l=a.const_get_qualified,c=a.const_get_relative,n=a.module,p=a.klass,r=a.send,t=a.truthy,k=a.hash2,e=a.gvars;a.add_stubs("$require $attr_reader $progname= $- $new $formatter= $level= $> $[] $=== $inspect $tap $each $constants $const_get $[]= $<< $clear $empty? $max $map $attr_accessor $memoize_logger $private $private_class_method $extend $logger $merge".split(" ")); -m.$require("logger");return function(f,d){f=[n(f,"Asciidoctor")].concat(d);(function(e,$super,f){e=p(e,$super,"Logger");var d=[e].concat(f),m,h;e.$$prototype.max_severity=q;e.$attr_reader("max_severity");a.def(e,"$initialize",m=function(e){var f=m.$$p,k;f&&(m.$$p=null);var g=0;var p=arguments.length;for(k=Array(p);g<p;g++)k[g]=arguments[g];a.slice.call(arguments,0,arguments.length);r(this,a.find_super_dispatcher(this,"initialize",m,!1),k,f);f=["asciidoctor"];r(this,"progname=",a.to_a(f));f[b(f.length, -1)];f=[c(d,"BasicFormatter").$new()];r(this,"formatter=",a.to_a(f));f[b(f.length,1)];f=[c(d,"WARN")];r(this,"level=",a.to_a(f));return f[b(f.length,1)]},m.$$arity=-1);a.def(e,"$add",h=function(b,e,f){var k,p=h.$$p,l;p&&(h.$$p=null);var m=0;var z=arguments.length;for(l=Array(z);m<z;m++)l[m]=arguments[m];null==e&&(e=q);null==f&&(f=q);t(g(b=t(k=b)?k:c(d,"UNKNOWN"),this.max_severity=t(k=this.max_severity)?k:b))&&(this.max_severity=b);return r(this,a.find_super_dispatcher(this,"add",h,!1),l,p)},h.$$arity= --2);(function(b,$super,e){b=p(b,$super,"BasicFormatter");var f=[b].concat(e),d;a.const_set(f[0],"SEVERITY_LABELS",k(["WARN","FATAL"],{WARN:"WARNING",FATAL:"FAILED"}));return(a.def(b,"$call",d=function(a,b,e,d){var k;return""+e+": "+(t(k=c(f,"SEVERITY_LABELS")["$[]"](a))?k:a)+": "+(t(l("::","String")["$==="](d))?d:d.$inspect())+c(f,"LF")},d.$$arity=4),q)&&"call"})(d[0],c(d,"Formatter"),d);return function(b,c){b=n(b,"AutoFormattingMessage");[b].concat(c);var e;a.def(b,"$inspect",e=function(){var a; -return t(a=this["$[]"]("source_location"))?""+a+": "+this["$[]"]("text"):this["$[]"]("text")},e.$$arity=0)}(d[0],d)})(f[0],l("::","Logger"),f);(function(e,$super,f){e=p(e,$super,"MemoryLogger");var d=[e].concat(f),g,l,m,h,v,n;e.$$prototype.messages=q;a.const_set(d[0],"SEVERITY_LABELS",r(k([],{}),"tap",[],(g=function(e){var f=g.$$s||this,k;null==e&&(e=q);return r(c(d,"Severity").$constants(!1),"each",[],(k=function(f){null==f&&(f=q);f=[c(d,"Severity").$const_get(f,!1),f];r(e,"[]=",a.to_a(f));return f[b(f.length, -1)]},k.$$s=f,k.$$arity=1,k))},g.$$s=e,g.$$arity=1,g)));e.$attr_reader("messages");a.def(e,"$initialize",l=function(){var e=[c(d,"WARN")];r(this,"level=",a.to_a(e));e[b(e.length,1)];return this.messages=[]},l.$$arity=0);a.def(e,"$add",m=function(b,e,f){var g=m.$$p,p=g||q;g&&(m.$$p=null);null==e&&(e=q);null==f&&(f=q);t(e)||(e=p!==q?a.yieldX(p,[]):f);this.messages["$<<"](k(["severity","message"],{severity:c(d,"SEVERITY_LABELS")["$[]"](t(b)?b:c(d,"UNKNOWN")),message:e}));return!0},m.$$arity=-2);a.def(e, -"$clear",h=function(){return this.messages.$clear()},h.$$arity=0);a.def(e,"$empty?",v=function(){return this.messages["$empty?"]()},v.$$arity=0);return(a.def(e,"$max_severity",n=function(){var a;return t(this["$empty?"]())?q:r(this.messages,"map",[],(a=function(a){null==a&&(a=q);return c(d,"Severity").$const_get(a["$[]"]("severity"),!1)},a.$$s=this,a.$$arity=1,a)).$max()},n.$$arity=0),q)&&"max_severity"})(f[0],l("::","Logger"),f);(function(e,$super,f){e=p(e,$super,"NullLogger");var d=[e].concat(f), -k,l;e.$$prototype.max_severity=q;e.$attr_reader("max_severity");a.def(e,"$initialize",k=function(){var e=[c(d,"WARN")];r(this,"level=",a.to_a(e));return e[b(e.length,1)]},k.$$arity=0);return(a.def(e,"$add",l=function(a,b,e){var f;t(g(a=t(f=a)?f:c(d,"UNKNOWN"),this.max_severity=t(f=this.max_severity)?f:a))&&(this.max_severity=a);return!0},l.$$arity=-2),q)&&"add"})(f[0],l("::","Logger"),f);(function(b,f){b=n(b,"LoggerManager");f=[b].concat(f);b.logger_class=c(f,"Logger");(function(b,c){var f=[b].concat(c), -d,k,g;b.$attr_accessor("logger_class");a.def(b,"$logger",d=function(a){var b;null==this.logger&&(this.logger=q);null==this.logger_class&&(this.logger_class=q);null==e.stderr&&(e.stderr=q);null==a&&(a=e.stderr);this.$memoize_logger();return this.logger=t(b=this.logger)?b:this.logger_class.$new(a)},d.$$arity=-1);a.def(b,"$logger=",k=function(a){null==this.logger_class&&(this.logger_class=q);null==e.stderr&&(e.stderr=q);return this.logger=t(a)?a:this.logger_class.$new(e.stderr)},k.$$arity=1);b.$private(); -return(a.def(b,"$memoize_logger",g=function(){var b=a.get_singleton_class(this);[b].concat(f);a.alias(b,"logger","logger");return b.$attr_reader("logger")},g.$$arity=0),q)&&"memoize_logger"})(a.get_singleton_class(b),f)})(f[0],f);(function(b,e){b=n(b,"Logging");var f=[b].concat(e),d,g,p,m;b.$private_class_method(t(d=(a.defs(b,"$included",g=function(a){return a.$extend(c(f,"Logging"))},g.$$arity=1),q)&&"included")?d:"included");a.def(b,"$logger",p=function(){return c(f,"LoggerManager").$logger()}, -p.$$arity=0);a.def(b,"$message_with_context",m=function(a,b){null==b&&(b=k([],{}));return k(["text"],{text:a}).$merge(b).$extend(l(c(f,"Logger"),"AutoFormattingMessage"))},m.$$arity=-2)})(f[0],f)}(h[0],h)};Opal.modules["asciidoctor/rx"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}var g=[],m=a.nil,h=a.const_get_qualified,q=a.const_get_relative,l=a.module,c=a.hash2,n=a.send,p=a.truthy,r=a.hash;a.add_stubs("$== $join $to_a $new $empty? $escape $[]= $-".split(" ")); -return function(d,k){d=l(d,"Asciidoctor");var e=[d].concat(k),f,g;(function(a,b){[l(a,"Rx")].concat(b);m})(e[0],e);a.const_set(e[0],"AuthorInfoLineRx",new RegExp("^("+q(e,"CG_WORD")+"["+q(e,"CC_WORD")+"\\-'.]*)(?: +("+q(e,"CG_WORD")+"["+q(e,"CC_WORD")+"\\-'.]*))?(?: +("+q(e,"CG_WORD")+"["+q(e,"CC_WORD")+"\\-'.]*))?(?: +<([^>]+)>)?$"));a.const_set(e[0],"AuthorDelimiterRx",/;(?: |$)/);a.const_set(e[0],"RevisionInfoLineRx",new RegExp("^(?:[^\\d{]*("+q(e,"CC_ANY")+"*?),)? *(?!:)("+q(e,"CC_ANY")+"*?)(?: *(?!^),?: *("+ -q(e,"CC_ANY")+"*))?$"));a.const_set(e[0],"ManpageTitleVolnumRx",new RegExp("^("+q(e,"CC_ANY")+"+?) *\\( *("+q(e,"CC_ANY")+"+?) *\\)$"));a.const_set(e[0],"ManpageNamePurposeRx",new RegExp("^("+q(e,"CC_ANY")+"+?) +- +("+q(e,"CC_ANY")+"+)$"));a.const_set(e[0],"ConditionalDirectiveRx",new RegExp("^(\\\\)?(ifdef|ifndef|ifeval|endif)::(\\S*?(?:([,+])\\S*?)?)\\[("+q(e,"CC_ANY")+"+)?\\]$"));a.const_set(e[0],"EvalExpressionRx",new RegExp("^("+q(e,"CC_ANY")+"+?) *([=!><]=|[><]) *("+q(e,"CC_ANY")+"+)$"));a.const_set(e[0], -"IncludeDirectiveRx",new RegExp("^(\\\\)?include::([^\\[][^\\[]*)\\[("+q(e,"CC_ANY")+"+)?\\]$"));a.const_set(e[0],"TagDirectiveRx",/\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m);a.const_set(e[0],"AttributeEntryRx",new RegExp("^:(!?"+q(e,"CG_WORD")+"[^:]*):(?:[ \\t]+("+q(e,"CC_ANY")+"*))?$"));a.const_set(e[0],"InvalidAttributeNameCharsRx",new RegExp("[^"+q(e,"CC_WORD")+"-]"));q(e,"RUBY_ENGINE")["$=="]("opal")?a.const_set(e[0],"AttributeEntryPassMacroRx",new RegExp("^pass:([a-z]+(?:,[a-z-]+)*)?\\[("+q(e, -"CC_ALL")+"*)\\]$")):m;a.const_set(e[0],"AttributeReferenceRx",new RegExp("(\\\\)?\\{("+q(e,"CG_WORD")+"["+q(e,"CC_WORD")+"-]*|(set|counter2?):"+q(e,"CC_ANY")+"+?)(\\\\)?\\}"));a.const_set(e[0],"BlockAnchorRx",new RegExp("^\\[\\[(?:|(["+q(e,"CC_ALPHA")+"_:]["+q(e,"CC_WORD")+"\\-:.]*)(?:, *("+q(e,"CC_ANY")+"+))?)\\]\\]$"));a.const_set(e[0],"BlockAttributeListRx",new RegExp("^\\[(|["+q(e,"CC_WORD")+".#%{,\"']"+q(e,"CC_ANY")+"*)\\]$"));a.const_set(e[0],"BlockAttributeLineRx",new RegExp("^\\[(?:|["+q(e, -"CC_WORD")+".#%{,\"']"+q(e,"CC_ANY")+"*|\\[(?:|["+q(e,"CC_ALPHA")+"_:]["+q(e,"CC_WORD")+"\\-:.]*(?:, *"+q(e,"CC_ANY")+"+)?)\\])\\]$"));a.const_set(e[0],"BlockTitleRx",new RegExp("^\\.(\\.?[^ \\t.]"+q(e,"CC_ANY")+"*)$"));a.const_set(e[0],"AdmonitionParagraphRx",new RegExp("^("+q(e,"ADMONITION_STYLES").$to_a().$join("|")+"):[ \\t]+"));a.const_set(e[0],"LiteralParagraphRx",new RegExp("^([ \\t]+"+q(e,"CC_ANY")+"*)$"));a.const_set(e[0],"AtxSectionTitleRx",new RegExp("^(=={0,5})[ \\t]+("+q(e,"CC_ANY")+ -"+?)(?:[ \\t]+\\1)?$"));a.const_set(e[0],"ExtAtxSectionTitleRx",new RegExp("^(=={0,5}|#\\#{0,5})[ \\t]+("+q(e,"CC_ANY")+"+?)(?:[ \\t]+\\1)?$"));a.const_set(e[0],"SetextSectionTitleRx",new RegExp("^((?!\\.)"+q(e,"CC_ANY")+"*?"+q(e,"CG_ALNUM")+q(e,"CC_ANY")+"*)$"));a.const_set(e[0],"InlineSectionAnchorRx",new RegExp(" (\\\\)?\\[\\[(["+q(e,"CC_ALPHA")+"_:]["+q(e,"CC_WORD")+"\\-:.]*)(?:, *("+q(e,"CC_ANY")+"+))?\\]\\]$"));a.const_set(e[0],"InvalidSectionIdCharsRx",new RegExp("<[^>]+>|&(?:[a-z][a-z]+\\d{0,2}|#\\d\\d\\d{0,4}|#x[\\da-f][\\da-f][\\da-f]{0,3});|[^ "+ -q(e,"CC_WORD")+"\\-.]+?"));a.const_set(e[0],"SectionLevelStyleRx",/^sect\d$/);a.const_set(e[0],"AnyListRx",new RegExp("^(?:[ \\t]*(?:-|\\*\\**|\\.\\.*|\\u2022|\\d+\\.|[a-zA-Z]\\.|[IVXivx]+\\))[ \\t]|(?!//[^/])[ \\t]*[^ \\t]"+q(e,"CC_ANY")+"*?(?::::{0,2}|;;)(?:$|[ \\t])|<(?:\\d+|\\.)>[ \\t])"));a.const_set(e[0],"UnorderedListRx",new RegExp("^[ \\t]*(-|\\*\\**|\\u2022)[ \\t]+("+q(e,"CC_ANY")+"*)$"));a.const_set(e[0],"OrderedListRx",new RegExp("^[ \\t]*(\\.\\.*|\\d+\\.|[a-zA-Z]\\.|[IVXivx]+\\))[ \\t]+("+ -q(e,"CC_ANY")+"*)$"));a.const_set(e[0],"OrderedListMarkerRxMap",c(["arabic","loweralpha","lowerroman","upperalpha","upperroman"],{arabic:/\d+\./,loweralpha:/[a-z]\./,lowerroman:/[ivx]+\)/,upperalpha:/[A-Z]\./,upperroman:/[IVX]+\)/}));a.const_set(e[0],"DescriptionListRx",new RegExp("^(?!//[^/])[ \\t]*([^ \\t]"+q(e,"CC_ANY")+"*?)(:::{0,2}|;;)(?:$|[ \\t]+("+q(e,"CC_ANY")+"*)$)"));a.const_set(e[0],"DescriptionListSiblingRx",c(["::",":::","::::",";;"],{"::":new RegExp("^(?!//[^/])[ \\t]*([^ \\t]"+q(e, -"CC_ANY")+"*?[^:]|[^ \\t:])(::)(?:$|[ \\t]+("+q(e,"CC_ANY")+"*)$)"),":::":new RegExp("^(?!//[^/])[ \\t]*([^ \\t]"+q(e,"CC_ANY")+"*?[^:]|[^ \\t:])(:::)(?:$|[ \\t]+("+q(e,"CC_ANY")+"*)$)"),"::::":new RegExp("^(?!//[^/])[ \\t]*([^ \\t]"+q(e,"CC_ANY")+"*?[^:]|[^ \\t:])(::::)(?:$|[ \\t]+("+q(e,"CC_ANY")+"*)$)"),";;":new RegExp("^(?!//[^/])[ \\t]*([^ \\t]"+q(e,"CC_ANY")+"*?)(;;)(?:$|[ \\t]+("+q(e,"CC_ANY")+"*)$)")}));a.const_set(e[0],"CalloutListRx",new RegExp("^<(\\d+|\\.)>[ \\t]+("+q(e,"CC_ANY")+"*)$")); -a.const_set(e[0],"CalloutExtractRx",/((?:\/\/|#|--|;;) ?)?(\\)?<!?(|--)(\d+|\.)\3>(?=(?: ?\\?<!?\3(?:\d+|\.)\3>)*$)/);a.const_set(e[0],"CalloutExtractRxt","(\\\\)?<()(\\d+|\\.)>(?=(?: ?\\\\?<(?:\\d+|\\.)>)*$)");a.const_set(e[0],"CalloutExtractRxMap",n(h("::","Hash"),"new",[],(f=function(c,f){null==c&&(c=m);null==f&&(f=m);f=[f,new RegExp("("+(p(f["$empty?"]())?"":""+h("::","Regexp").$escape(f)+" ?")+")?"+q(e,"CalloutExtractRxt"))];n(c,"[]=",a.to_a(f));return f[b(f.length,1)]},f.$$s=d,f.$$arity=2,f))); -a.const_set(e[0],"CalloutScanRx",new RegExp("\\\\?<!?(|--)(\\d+|\\.)\\1>(?=(?: ?\\\\?<!?\\1(?:\\d+|\\.)\\1>)*"+q(e,"CC_EOL")+")"));a.const_set(e[0],"CalloutSourceRx",new RegExp("((?://|#|--|;;) ?)?(\\\\)?<!?(|--)(\\d+|\\.)\\3>(?=(?: ?\\\\?<!?\\3(?:\\d+|\\.)\\3>)*"+q(e,"CC_EOL")+")"));a.const_set(e[0],"CalloutSourceRxt","(\\\\)?<()(\\d+|\\.)>(?=(?: ?\\\\?<(?:\\d+|\\.)>)*"+q(e,"CC_EOL")+")");a.const_set(e[0],"CalloutSourceRxMap",n(h("::","Hash"),"new",[],(g=function(c,f){null== -c&&(c=m);null==f&&(f=m);f=[f,new RegExp("("+(p(f["$empty?"]())?"":""+h("::","Regexp").$escape(f)+" ?")+")?"+q(e,"CalloutSourceRxt"))];n(c,"[]=",a.to_a(f));return f[b(f.length,1)]},g.$$s=d,g.$$arity=2,g)));a.const_set(e[0],"ListRxMap",c(["ulist","olist","dlist","colist"],{ulist:q(e,"UnorderedListRx"),olist:q(e,"OrderedListRx"),dlist:q(e,"DescriptionListRx"),colist:q(e,"CalloutListRx")}));a.const_set(e[0],"ColumnSpecRx",/^(?:(\d+)\*)?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?(\d+%?|~)?([a-z])?$/);a.const_set(e[0], -"CellSpecStartRx",/^[ \t]*(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/);a.const_set(e[0],"CellSpecEndRx",/[ \t]+(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/);a.const_set(e[0],"CustomBlockMacroRx",new RegExp("^("+q(e,"CG_WORD")+"["+q(e,"CC_WORD")+"-]*)::(|\\S|\\S"+q(e,"CC_ANY")+"*?\\S)\\[("+q(e,"CC_ANY")+"+)?\\]$"));a.const_set(e[0],"BlockMediaMacroRx",new RegExp("^(image|video|audio)::(\\S|\\S"+q(e,"CC_ANY")+ -"*?\\S)\\[("+q(e,"CC_ANY")+"+)?\\]$"));a.const_set(e[0],"BlockTocMacroRx",new RegExp("^toc::\\[("+q(e,"CC_ANY")+"+)?\\]$"));a.const_set(e[0],"InlineAnchorRx",new RegExp("(\\\\)?(?:\\[\\[(["+q(e,"CC_ALPHA")+"_:]["+q(e,"CC_WORD")+"\\-:.]*)(?:, *("+q(e,"CC_ANY")+"+?))?\\]\\]|anchor:(["+q(e,"CC_ALPHA")+"_:]["+q(e,"CC_WORD")+"\\-:.]*)\\[(?:\\]|("+q(e,"CC_ANY")+"*?[^\\\\])\\]))"));a.const_set(e[0],"InlineAnchorScanRx",new RegExp("(?:^|[^\\\\\\[])\\[\\[(["+q(e,"CC_ALPHA")+"_:]["+q(e,"CC_WORD")+"\\-:.]*)(?:, *("+ -q(e,"CC_ANY")+"+?))?\\]\\]|(?:^|[^\\\\])anchor:(["+q(e,"CC_ALPHA")+"_:]["+q(e,"CC_WORD")+"\\-:.]*)\\[(?:\\]|("+q(e,"CC_ANY")+"*?[^\\\\])\\])"));a.const_set(e[0],"LeadingInlineAnchorRx",new RegExp("^\\[\\[(["+q(e,"CC_ALPHA")+"_:]["+q(e,"CC_WORD")+"\\-:.]*)(?:, *("+q(e,"CC_ANY")+"+?))?\\]\\]"));a.const_set(e[0],"InlineBiblioAnchorRx",new RegExp("^\\[\\[\\[(["+q(e,"CC_ALPHA")+"_:]["+q(e,"CC_WORD")+"\\-:.]*)(?:, *("+q(e,"CC_ANY")+"+?))?\\]\\]\\]"));a.const_set(e[0],"InlineEmailRx",new RegExp("([\\\\>:/])?"+ -q(e,"CG_WORD")+"(?:&|["+q(e,"CC_WORD")+"\\-.%+])*@"+q(e,"CG_ALNUM")+"["+q(e,"CC_ALNUM")+"_\\-.]*\\.[a-zA-Z]{2,5}\\b"));a.const_set(e[0],"InlineFootnoteMacroRx",new RegExp("\\\\?footnote(?:(ref):|:(["+q(e,"CC_WORD")+"-]+)?)\\[(?:|("+q(e,"CC_ALL")+"*?[^\\\\]))\\](?!</a>)","m"));a.const_set(e[0],"InlineImageMacroRx",new RegExp("\\\\?i(?:mage|con):([^:\\s\\[](?:[^\\n\\[]*[^\\s\\[])?)\\[(|"+q(e,"CC_ALL")+"*?[^\\\\])\\]","m"));a.const_set(e[0],"InlineIndextermMacroRx",new RegExp("\\\\?(?:(indexterm2?):\\[("+ -q(e,"CC_ALL")+"*?[^\\\\])\\]|\\(\\(("+q(e,"CC_ALL")+"+?)\\)\\)(?!\\)))","m"));a.const_set(e[0],"InlineKbdBtnMacroRx",new RegExp("(\\\\)?(kbd|btn):\\[("+q(e,"CC_ALL")+"*?[^\\\\])\\]","m"));a.const_set(e[0],"InlineLinkRx",new RegExp("(^|link:|"+q(e,"CG_BLANK")+"|<|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://[^\\s\\[\\]<]*([^\\s.,\\[\\]<]))(?:\\[(|"+q(e,"CC_ALL")+"*?[^\\\\])\\])?","m"));a.const_set(e[0],"InlineLinkMacroRx",new RegExp("\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|"+q(e, -"CC_ALL")+"*?[^\\\\])\\]","m"));a.const_set(e[0],"MacroNameRx",new RegExp("^"+q(e,"CG_WORD")+"["+q(e,"CC_WORD")+"-]*$"));a.const_set(e[0],"InlineStemMacroRx",new RegExp("\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[("+q(e,"CC_ALL")+"*?[^\\\\])\\]","m"));a.const_set(e[0],"InlineMenuMacroRx",new RegExp("\\\\?menu:("+q(e,"CG_WORD")+"|["+q(e,"CC_WORD")+"&][^\\n\\[]*[^\\s\\[])\\[ *(?:|("+q(e,"CC_ALL")+"*?[^\\\\]))\\]","m"));a.const_set(e[0],"InlineMenuRx",new RegExp('\\\\?"(['+q(e,"CC_WORD")+ -'&][^"]*?[ \\n]+>[ \\n]+[^"]*)"'));a.const_set(e[0],"InlinePassRx",r(!1,["+","`",new RegExp("(^|[^"+q(e,"CC_WORD")+";:])(?:\\[([^\\]]+)\\])?(\\\\?(\\+|`)(\\S|\\S"+q(e,"CC_ALL")+"*?\\S)\\4)(?!"+q(e,"CG_WORD")+")","m")],!0,["`",m,new RegExp("(^|[^`"+q(e,"CC_WORD")+"])(?:\\[([^\\]]+)\\])?(\\\\?(`)([^`\\s]|[^`\\s]"+q(e,"CC_ALL")+"*?\\S)\\4)(?![`"+q(e,"CC_WORD")+"])","m")]));a.const_set(e[0],"SinglePlusInlinePassRx",new RegExp("^(\\\\)?\\+(\\S|\\S"+q(e,"CC_ALL")+"*?\\S)\\+$","m"));a.const_set(e[0], -"InlinePassMacroRx",new RegExp("(?:(?:(\\\\?)\\[([^\\]]+)\\])?(\\\\{0,2})(\\+\\+\\+?|\\$\\$)("+q(e,"CC_ALL")+"*?)\\4|(\\\\?)pass:([a-z]+(?:,[a-z-]+)*)?\\[(|"+q(e,"CC_ALL")+"*?[^\\\\])\\])","m"));a.const_set(e[0],"InlineXrefMacroRx",new RegExp("\\\\?(?:<<(["+q(e,"CC_WORD")+"#/.:{]"+q(e,"CC_ALL")+"*?)>>|xref:(["+q(e,"CC_WORD")+"#/.:{]"+q(e,"CC_ALL")+"*?)\\[(?:\\]|("+q(e,"CC_ALL")+"*?[^\\\\])\\]))","m"));q(e,"RUBY_ENGINE")["$=="]("opal")?a.const_set(e[0],"HardLineBreakRx",new RegExp("^("+ -q(e,"CC_ANY")+"*) \\+$","m")):m;a.const_set(e[0],"MarkdownThematicBreakRx",/^ {0,3}([-*_])( *)\1\2\1$/);a.const_set(e[0],"ExtLayoutBreakRx",/^(?:'{3,}|<{3,}|([-*_])( *)\1\2\1)$/);a.const_set(e[0],"BlankLineRx",/\n{2,}/);a.const_set(e[0],"EscapedSpaceRx",/\\([ \t\n])/);a.const_set(e[0],"ReplaceableTextRx",/[&']|--|\.\.\.|\([CRT]M?\)/);a.const_set(e[0],"SpaceDelimiterRx",/([^\\])[ \t\n]+/);a.const_set(e[0],"SubModifierSniffRx",/[+-]/);a.const_set(e[0],"TrailingDigitsRx",/\d+$/);a.const_set(e[0],"UriSniffRx", -new RegExp("^"+q(e,"CG_ALPHA")+"["+q(e,"CC_ALNUM")+".+-]+:/{0,2}"));a.const_set(e[0],"XmlSanitizeRx",/<[^>]+>/)}(g[0],g)};Opal.modules["asciidoctor/substitutors"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}function g(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}function m(a,b){return"number"===typeof a&&"number"===typeof b?a>b:a["$>"](b)}function h(a,b){return"number"===typeof a&&"number"===typeof b?a<b:a["$<"](b)}function q(a,b){return"number"=== -typeof a&&"number"===typeof b?a*b:a["$*"](b)}var l=[],c=a.nil,n=a.const_get_qualified,p=a.const_get_relative,r=a.slice,t=a.module,k=a.hash2,e=a.hash,f=a.truthy,x=a.send,u=a.gvars;a.add_stubs("$freeze $+ $keys $empty? $! $=== $[] $join $include? $extract_passthroughs $each $sub_specialchars $sub_quotes $sub_attributes $sub_replacements $sub_macros $highlight_source $sub_callouts $sub_post_replacements $warn $logger $restore_passthroughs $clear $split $apply_subs $== $gsub $match? $compat_mode $convert_quoted_text $attributes $shift $store_attribute $!= $attribute_undefined $counter $key? $downcase $attribute_missing $info $squeeze $delete $reject $start_with? $do_replacement $extensions $inline_macros? $inline_macros $regexp $instance $slice $length $names $config $merge $[]= $- $normalize_text $parse_attributes $process_method $expand_subs $text $text= $convert $class $strip $> $index $min $compact $end_with? $map $chop $new $pop $rstrip $register $tr $basename $parse $<< $lstrip $split_simple_csv $partition $extract_attributes_from_text $sub $encode_uri_component $style $extname? $rindex $info? $catalog $fetch $outfilesuffix $natural_xrefs $resolve_id $find $footnotes $id $< $size $attr? $attr $to_s $read_next_id $callouts $syntax_highlighter $highlight? $sub_source $extract_callouts $name $to_sym $to_i $resolve_lines_to_highlight $highlight $nil_or_empty? $restore_callouts $count $to_a $| $sort $* $parse_quoted_text_attributes $resolve_pass_subs $extract_inner_passthrough $basebackend? $error $chr $drop $& $resolve_subs $resolve_block_subs $parse_into $private $=~ $shorthand_property_syntax $concat $each_char".split(" ")); -return function(d,l){d=[t(d,"Asciidoctor")].concat(l);(function(d,l){d=t(d,"Substitutors");var z=[d].concat(l),v,A,U,M,E,T,N,S,X,y,C,D,ia,B,V,G,H,J,la,ba,aa,na,Z,I,O,P,ka,wa,da,xa,Ca;a.const_set(z[0],"SpecialCharsRx",/[<&>]/);a.const_set(z[0],"SpecialCharsTr",k([">","<","&"],{">":">","<":"<","&":"&"}));a.const_set(z[0],"QuotedTextSniffRx",e(!1,/[*_`#^~]/,!0,/[*'_+#^~]/));a.const_set(z[0],"BASIC_SUBS",["specialcharacters"]).$freeze();a.const_set(z[0],"HEADER_SUBS",["specialcharacters","attributes"]).$freeze(); -a.const_set(z[0],"NO_SUBS",[]).$freeze();a.const_set(z[0],"NORMAL_SUBS","specialcharacters quotes attributes replacements macros post_replacements".split(" ")).$freeze();a.const_set(z[0],"REFTEXT_SUBS",["specialcharacters","quotes","replacements"]).$freeze();a.const_set(z[0],"VERBATIM_SUBS",["specialcharacters","callouts"]).$freeze();a.const_set(z[0],"SUB_GROUPS",k(["none","normal","verbatim","specialchars"],{none:p(z,"NO_SUBS"),normal:p(z,"NORMAL_SUBS"),verbatim:p(z,"VERBATIM_SUBS"),specialchars:p(z, -"BASIC_SUBS")}));a.const_set(z[0],"SUB_HINTS",k("amnpqrcv".split(""),{a:"attributes",m:"macros",n:"normal",p:"post_replacements",q:"quotes",r:"replacements",c:"specialcharacters",v:"verbatim"}));a.const_set(z[0],"SUB_OPTIONS",k(["block","inline"],{block:b(b(p(z,"SUB_GROUPS").$keys(),p(z,"NORMAL_SUBS")),["callouts"]),inline:b(p(z,"SUB_GROUPS").$keys(),p(z,"NORMAL_SUBS"))}));a.const_set(z[0],"CAN","\u0018");a.const_set(z[0],"DEL","\u007f");a.const_set(z[0],"PASS_START","\u0096");a.const_set(z[0],"PASS_END", -"\u0097");a.const_set(z[0],"PassSlotRx",new RegExp(""+p(z,"PASS_START")+"(\\d+)"+p(z,"PASS_END")));a.const_set(z[0],"HighlightedPassSlotRx",new RegExp("<span\\b[^>]*>"+p(z,"PASS_START")+"</span>[^\\d]*(\\d+)[^\\d]*<span\\b[^>]*>"+p(z,"PASS_END")+"</span>"));a.const_set(z[0],"RS","\\");a.const_set(z[0],"R_SB","]");a.const_set(z[0],"ESC_R_SB","\\]");a.const_set(z[0],"PLUS","+");a.def(d,"$apply_subs",v=function(a,b){var e,d,k=c,g=c,l=c;null==this.passthroughs&&(this.passthroughs=c);null==this.passthroughs_locked&& -(this.passthroughs_locked=c);null==b&&(b=p(z,"NORMAL_SUBS"));if(f(f(e=a["$empty?"]())?e:b["$!"]()))return a;f(k=n("::","Array")["$==="](a))&&(a=f(a["$[]"](1))?a.$join(p(z,"LF")):a["$[]"](0));f(b["$include?"]("macros"))&&(a=this.$extract_passthroughs(a),f(this.passthroughs["$empty?"]())||(g=this.passthroughs,this.passthroughs_locked=f(e=this.passthroughs_locked)?e:l=!0));x(b,"each",[],(d=function(e){var k=d.$$s||this;null==e&&(e=c);var g=e;return"specialcharacters"["$==="](g)?a=k.$sub_specialchars(a): -"quotes"["$==="](g)?a=k.$sub_quotes(a):"attributes"["$==="](g)?f(a["$include?"](p(z,"ATTR_REF_HEAD")))?a=k.$sub_attributes(a):c:"replacements"["$==="](g)?a=k.$sub_replacements(a):"macros"["$==="](g)?a=k.$sub_macros(a):"highlight"["$==="](g)?a=k.$highlight_source(a,b["$include?"]("callouts")):"callouts"["$==="](g)?f(b["$include?"]("highlight"))?c:a=k.$sub_callouts(a):"post_replacements"["$==="](g)?a=k.$sub_post_replacements(a):k.$logger().$warn("unknown substitution type "+e)},d.$$s=this,d.$$arity= -1,d));f(g)&&(a=this.$restore_passthroughs(a),f(l)&&(g.$clear(),this.passthroughs_locked=c));return f(k)?a.$split(p(z,"LF"),-1):a},v.$$arity=-2);a.def(d,"$apply_normal_subs",A=function(a){return this.$apply_subs(a,p(z,"NORMAL_SUBS"))},A.$$arity=1);a.def(d,"$apply_header_subs",U=function(a){return this.$apply_subs(a,p(z,"HEADER_SUBS"))},U.$$arity=1);a.alias(d,"apply_title_subs","apply_subs");a.def(d,"$apply_reftext_subs",M=function(a){return this.$apply_subs(a,p(z,"REFTEXT_SUBS"))},M.$$arity=1);p(z, -"RUBY_ENGINE")["$=="]("opal")?a.def(d,"$sub_specialchars",E=function(a){var b,c;return f(f(b=f(c=a["$include?"](">"))?c:a["$include?"]("&"))?b:a["$include?"]("<"))?a.$gsub(p(z,"SpecialCharsRx"),p(z,"SpecialCharsTr")):a},E.$$arity=1):c;a.alias(d,"sub_specialcharacters","sub_specialchars");a.def(d,"$sub_quotes",T=function(a){var b,e=c;null==this.document&&(this.document=c);f(p(z,"QuotedTextSniffRx")["$[]"](e=this.document.$compat_mode())["$match?"](a))&&x(p(z,"QUOTE_SUBS")["$[]"](e),"each",[],(b=function(e, -f,d){var k=b.$$s||this,g;null==e&&(e=c);null==f&&(f=c);null==d&&(d=c);return a=x(a,"gsub",[d],(g=function(){var a=g.$$s||this;null==u["~"]&&(u["~"]=c);return a.$convert_quoted_text(u["~"],e,f)},g.$$s=k,g.$$arity=0,g))},b.$$s=this,b.$$arity=3,b));return a},T.$$arity=1);a.def(d,"$sub_attributes",N=function(b,e){var d,g,l,m,h=c,q=c,v=c,n=c,r=c,A=c,U=c,t=c;null==this.document&&(this.document=c);null==e&&(e=k([],{}));h=this.document.$attributes();q=v=n=r=A=U=c;b=x(b,"gsub",[p(z,"AttributeReferenceRx")], -(d=function(){var b=d.$$s||this,k,g,l,m,t=c,K=c,M=c,W=c;null==b.document&&(b.document=c);return f(f(k=((g=u["~"])===c?c:g["$[]"](1))["$=="](p(z,"RS")))?k:((g=u["~"])===c?c:g["$[]"](4))["$=="](p(z,"RS")))?"{"+((k=u["~"])===c?c:k["$[]"](2))+"}":f((k=u["~"])===c?c:k["$[]"](3))?function(){t=(K=((k=u["~"])===c?c:k["$[]"](2)).$split(":",3)).$shift();return"set"["$==="](t)?(g=p(z,"Parser").$store_attribute(K["$[]"](0),f(l=K["$[]"](1))?l:"",b.document),k=a.to_ary(g),M=null==k[1]?c:k[1],g,f(f(k=M)?k:(A=f(g= -A)?g:f(l=h["$[]"]("attribute-undefined"))?l:p(z,"Compliance").$attribute_undefined())["$!="]("drop-line"))?q=r=p(z,"DEL"):q=v=p(z,"CAN")):"counter2"["$==="](t)?(x(b.document,"counter",a.to_a(K)),q=r=p(z,"DEL")):x(b.document,"counter",a.to_a(K))}():f(h["$key?"](W=((k=u["~"])===c?c:k["$[]"](2)).$downcase()))?h["$[]"](W):f(M=p(z,"INTRINSIC_ATTRIBUTES")["$[]"](W))?M:function(){t=U=f(k=U)?k:f(g=f(l=e["$[]"]("attribute_missing"))?l:h["$[]"]("attribute-missing"))?g:p(z,"Compliance").$attribute_missing(); -if("drop"["$==="](t))return q=r=p(z,"DEL");if("drop-line"["$==="](t))return(n=f(k=n)?k:f(g=e["$[]"]("drop_line_severity"))?g:"info")["$=="]("info")&&x(b.$logger(),"info",[],(m=function(){return"dropping line containing reference to missing attribute: "+W},m.$$s=b,m.$$arity=0,m)),q=v=p(z,"CAN");"warn"["$==="](t)&&b.$logger().$warn("skipping reference to missing attribute: "+W);return(k=u["~"])===c?c:k["$[]"](0)}()},d.$$s=this,d.$$arity=0,d));return f(q)?f(r)?(t=b.$squeeze(p(z,"DEL")).$split(p(z,"LF"), --1),f(v)?x(t,"reject",[],(g=function(a){var b,e,d;null==a&&(a=c);return f(b=f(e=f(d=a["$=="](p(z,"DEL")))?d:a["$=="](p(z,"CAN")))?e:a["$start_with?"](p(z,"CAN")))?b:a["$include?"](p(z,"CAN"))},g.$$s=this,g.$$arity=1,g)).$join(p(z,"LF")).$delete(p(z,"DEL")):x(t,"reject",[],(l=function(a){null==a&&(a=c);return a["$=="](p(z,"DEL"))},l.$$s=this,l.$$arity=1,l)).$join(p(z,"LF")).$delete(p(z,"DEL"))):f(b["$include?"](p(z,"LF")))?x(b.$split(p(z,"LF"),-1),"reject",[],(m=function(a){var b,e;null==a&&(a=c); -return f(b=f(e=a["$=="](p(z,"CAN")))?e:a["$start_with?"](p(z,"CAN")))?b:a["$include?"](p(z,"CAN"))},m.$$s=this,m.$$arity=1,m)).$join(p(z,"LF")):"":b},N.$$arity=-2);a.def(d,"$sub_replacements",S=function(a){var b;f(p(z,"ReplaceableTextRx")["$match?"](a))&&x(p(z,"REPLACEMENTS"),"each",[],(b=function(e,f,d){var k=b.$$s||this,g;null==e&&(e=c);null==f&&(f=c);null==d&&(d=c);return a=x(a,"gsub",[e],(g=function(){var a=g.$$s||this;null==u["~"]&&(u["~"]=c);return a.$do_replacement(u["~"],f,d)},g.$$s=k,g.$$arity= -0,g))},b.$$s=this,b.$$arity=3,b));return a},S.$$arity=1);a.def(d,"$sub_macros",X=function(e){var d,l,h,q,v,A,t,U,M,E,T,N,S,X,w,Q=c,L=c,Aa=c,Ta=c,K=c,Ea=c,W=c;null==this.document&&(this.document=c);null==this.context&&(this.context=c);null==this.parent&&(this.parent=c);Q=e["$include?"]("[");L=e["$include?"](":");Aa=f(d=Q)?L:d;Ta=f(d=Aa)?e["$include?"](":["):d;K=(Ea=this.document).$attributes();f(f(d=W=Ea.$extensions())?W["$inline_macros?"]():d)&&x(W.$inline_macros(),"each",[],(l=function(b){var d= -l.$$s||this,w;null==b&&(b=c);return e=x(e,"gsub",[b.$instance().$regexp()],(w=function(){var e=w.$$s||this,d,l,m,ya=c,h,q=c;null==u["~"]&&(u["~"]=c);if(f((m=(d=u["~"])===c?c:d["$[]"](0))["$start_with?"](p(z,"RS"))))return((d=u["~"])===c?c:d["$[]"](0)).$slice(1,((d=u["~"])===c?c:d["$[]"](0)).$length());if(f(u["~"].$names()["$empty?"]()))d=[(l=u["~"])===c?c:l["$[]"](1),(l=u["~"])===c?c:l["$[]"](2)];else{a:{try{var v=u["~"]["$[]"]("target");break a}catch(cb){if(a.rescue(cb,[p(z,"StandardError")]))try{v= -c;break a}finally{a.pop_exception()}else throw cb;}v=void 0}d=v;a:{try{var L=u["~"]["$[]"]("content");break a}catch(cb){if(a.rescue(cb,[p(z,"StandardError")]))try{L=c;break a}finally{a.pop_exception()}else throw cb;}L=void 0}d=[d,L]}L=d[0];v=d[1];d;var n=f(ya=(h=b.$config())["$[]"]("default_attrs"))?ya.$merge():k([],{});f(v)&&(f(v["$empty?"]())?h["$[]"]("content_model")["$=="]("attributes")||(l=["text",v],x(n,"[]=",a.to_a(l)),l[g(l.length,1)]):(v=e.$normalize_text(v,!0,!0),h["$[]"]("content_model")["$=="]("attributes")? -e.$parse_attributes(v,f(d=f(l=h["$[]"]("positional_attrs"))?l:h["$[]"]("pos_attrs"))?d:[],k(["into"],{into:n})):(l=["text",v],x(n,"[]=",a.to_a(l)),l[g(l.length,1)])),L=f(d=L)?d:h["$[]"]("format")["$=="]("short")?v:L);return f(p(z,"Inline")["$==="](ya=b.$process_method()["$[]"](e,L,n)))?(f(f(d=q=ya.$attributes().$delete("subs"))?q=e.$expand_subs(q,"custom inline macro"):d)&&(l=[e.$apply_subs(ya.$text(),q)],x(ya,"text=",a.to_a(l)),l[g(l.length,1)]),ya.$convert()):f(ya)?(e.$logger().$info("expected substitution value for custom inline macro to be of type Inline; got "+ -ya.$class()+": "+m),ya):""},w.$$s=d,w.$$arity=0,w))},l.$$s=this,l.$$arity=1,l));f(K["$key?"]("experimental"))&&(f(f(d=Ta)?f(h=e["$include?"]("kbd:"))?h:e["$include?"]("btn:"):d)&&(e=x(e,"gsub",[p(z,"InlineKbdBtnMacroRx")],(q=function(){var e=q.$$s||this,d,w,l,h=c,v=c,L=c;L=c;return f((d=u["~"])===c?c:d["$[]"](1))?((d=u["~"])===c?c:d["$[]"](0)).$slice(1,((d=u["~"])===c?c:d["$[]"](0)).$length()):((d=u["~"])===c?c:d["$[]"](2))["$=="]("kbd")?(f((h=((d=u["~"])===c?c:d["$[]"](3)).$strip())["$include?"](p(z, -"R_SB")))&&(h=h.$gsub(p(z,"ESC_R_SB"),p(z,"R_SB"))),f(f(d=m(h.$length(),1))?v=f(v=h.$index(",",1))?[v,h.$index("+",1)].$compact().$min():h.$index("+",1):d)?(L=h.$slice(v,1),f(h["$end_with?"](L))?(h=x(h.$chop().$split(L,-1),"map",[],(w=function(a){null==a&&(a=c);return a.$strip()},w.$$s=e,w.$$arity=1,w)),L=[-1,b(h["$[]"](-1),L)],x(h,"[]=",a.to_a(L)),L[g(L.length,1)]):h=x(h.$split(L),"map",[],(l=function(a){null==a&&(a=c);return a.$strip()},l.$$s=e,l.$$arity=1,l))):h=[h],p(z,"Inline").$new(e,"kbd", -c,k(["attributes"],{attributes:k(["keys"],{keys:h})})).$convert()):p(z,"Inline").$new(e,"button",e.$normalize_text((d=u["~"])===c?c:d["$[]"](3),!0,!0)).$convert()},q.$$s=this,q.$$arity=0,q))),f(f(d=Aa)?e["$include?"]("menu:"):d)&&(e=x(e,"gsub",[p(z,"InlineMenuMacroRx")],(v=function(){var a=v.$$s||this,b,e,d=c,g=c,w=c;w=g=c;if(f(((b=u["~"])===c?c:b["$[]"](0))["$start_with?"](p(z,"RS"))))return((b=u["~"])===c?c:b["$[]"](0)).$slice(1,((b=u["~"])===c?c:b["$[]"](0)).$length());d=(b=u["~"])===c?c:b["$[]"](1); -f(g=(b=u["~"])===c?c:b["$[]"](2))?(f(g["$include?"](p(z,"R_SB")))&&(g=g.$gsub(p(z,"ESC_R_SB"),p(z,"R_SB"))),f(w=f(g["$include?"](">"))?">":f(g["$include?"](","))?",":c)?(g=x(g.$split(w),"map",[],(e=function(a){null==a&&(a=c);return a.$strip()},e.$$s=a,e.$$arity=1,e)),w=g.$pop()):(b=[[],g.$rstrip()],g=b[0],w=b[1],b)):(b=[[],c],g=b[0],w=b[1],b);return p(z,"Inline").$new(a,"menu",c,k(["attributes"],{attributes:k(["menu","submenus","menuitem"],{menu:d,submenus:g,menuitem:w})})).$convert()},v.$$s= -this,v.$$arity=0,v))),f(f(d=e["$include?"]('"'))?e["$include?"](">"):d)&&(e=x(e,"gsub",[p(z,"InlineMenuRx")],(A=function(){var b=A.$$s||this,e,d,g,w=c,l=c;var m=c;if(f(((e=u["~"])===c?c:e["$[]"](0))["$start_with?"](p(z,"RS"))))return((e=u["~"])===c?c:e["$[]"](0)).$slice(1,((e=u["~"])===c?c:e["$[]"](0)).$length());m=x(((d=u["~"])===c?c:d["$[]"](1)).$split(">"),"map",[],(g=function(a){null==a&&(a=c);return a.$strip()},g.$$s=b,g.$$arity=1,g));e=a.to_ary(m);w=null==e[0]?c:e[0];l=r.call(e,1);m;m= -l.$pop();return p(z,"Inline").$new(b,"menu",c,k(["attributes"],{attributes:k(["menu","submenus","menuitem"],{menu:w,submenus:l,menuitem:m})})).$convert()},A.$$s=this,A.$$arity=0,A))));f(f(d=Aa)?f(h=e["$include?"]("image:"))?h:e["$include?"]("icon:"):d)&&(e=x(e,"gsub",[p(z,"InlineImageMacroRx")],(t=function(){var b=t.$$s||this,e,d,w,l=c;if(f(((e=u["~"])===c?c:e["$[]"](0))["$start_with?"](p(z,"RS"))))return((e=u["~"])===c?c:e["$[]"](0)).$slice(1,((e=u["~"])===c?c:e["$[]"](0)).$length());f(((e=u["~"])=== -c?c:e["$[]"](0))["$start_with?"]("icon:"))?(e=["icon",["size"]],d=e[0],w=e[1]):(e=["image",["alt","width","height"]],d=e[0],w=e[1]);e;var m=(e=u["~"])===c?c:e["$[]"](1);w=b.$parse_attributes((e=u["~"])===c?c:e["$[]"](2),w,k(["unescape_input"],{unescape_input:!0}));d["$=="]("icon")||(Ea.$register("images",m),l=["imagesdir",K["$[]"]("imagesdir")],x(w,"[]=",a.to_a(l)),l[g(l.length,1)]);f(e=w["$[]"]("alt"))?e:(l=["alt",(l=["default-alt",p(z,"Helpers").$basename(m,!0).$tr("_-"," ")],x(w,"[]=",a.to_a(l)), -l[g(l.length,1)])],x(w,"[]=",a.to_a(l)),l[g(l.length,1)]);return p(z,"Inline").$new(b,"image",c,k(["type","target","attributes"],{type:d,target:m,attributes:w})).$convert()},t.$$s=this,t.$$arity=0,t)));f(f(d=f(h=e["$include?"]("(("))?e["$include?"]("))"):h)?d:f(h=Ta)?e["$include?"]("dexterm"):h)&&(e=x(e,"gsub",[p(z,"InlineIndextermMacroRx")],(U=function(){var b=U.$$s||this,d,w,l,m,h=c,q=c,v=c,L=c,n=c,Q=c,A=c,t=c,W=c,K=c,M=c,E=c,Ta=c,T=c,Aa=c;return function(){h=(d=u["~"])===c?c:d["$[]"](1);if("indexterm"["$==="](h)){if(f(((d= -u["~"])===c?c:d["$[]"](0))["$start_with?"](p(z,"RS"))))return((d=u["~"])===c?c:d["$[]"](0)).$slice(1,((d=u["~"])===c?c:d["$[]"](0)).$length());if(f((q=b.$normalize_text((d=u["~"])===c?c:d["$[]"](2),!0,!0))["$include?"]("=")))if(f(v=(L=p(z,"AttributeList").$new(q,b).$parse())["$[]"](1))){n=["terms",Q=[v]];x(L,"[]=",a.to_a(n));n[g(n.length,1)];if(f(A=L["$[]"](2))&&(Q["$<<"](A),f(t=L["$[]"](3))))Q["$<<"](t);f(W=L["$[]"]("see-also"))&&(n=["see-also",function(){return f(W["$include?"](","))?x(W.$split(","), -"map",[],(w=function(a){null==a&&(a=c);return a.$lstrip()},w.$$s=b,w.$$arity=1,w)):[W]}()],x(L,"[]=",a.to_a(n)),n[g(n.length,1)])}else L=k(["terms"],{terms:Q=q});else L=k(["terms"],{terms:Q=b.$split_simple_csv(q)});return p(z,"Inline").$new(b,"indexterm",c,k(["attributes"],{attributes:L})).$convert()}if("indexterm2"["$==="](h)){if(f(((d=u["~"])===c?c:d["$[]"](0))["$start_with?"](p(z,"RS"))))return((d=u["~"])===c?c:d["$[]"](0)).$slice(1,((d=u["~"])===c?c:d["$[]"](0)).$length());f((K=b.$normalize_text((d= -u["~"])===c?c:d["$[]"](2),!0,!0))["$include?"]("="))&&(K=f(d=f(l=(L=p(z,"AttributeList").$new(K,b).$parse())["$[]"](1))?l:L=c)?d:K,f(f(d=L)?W=L["$[]"]("see-also"):d)&&(n=["see-also",function(){return f(W["$include?"](","))?x(W.$split(","),"map",[],(m=function(a){null==a&&(a=c);return a.$lstrip()},m.$$s=b,m.$$arity=1,m)):[W]}()],x(L,"[]=",a.to_a(n)),n[g(n.length,1)]));return p(z,"Inline").$new(b,"indexterm",K,k(["attributes","type"],{attributes:L,type:"visible"})).$convert()}e=(d=u["~"])===c?c:d["$[]"](3); -if(f(((d=u["~"])===c?c:d["$[]"](0))["$start_with?"](p(z,"RS"))))if(f(f(d=e["$start_with?"]("("))?e["$end_with?"](")"):d))e=e.$slice(1,g(e.$length(),2)),d=[!0,"(",")"],M=d[0],E=d[1],Ta=d[2],d;else return((d=u["~"])===c?c:d["$[]"](0)).$slice(1,((d=u["~"])===c?c:d["$[]"](0)).$length());else M=!0,f(e["$start_with?"]("("))?(f(e["$end_with?"](")"))?(d=[e.$slice(1,g(e.$length(),2)),!1],e=d[0],M=d[1]):(d=[e.$slice(1,e.$length()),"(",""],e=d[0],E=d[1],Ta=d[2]),d):f(e["$end_with?"](")"))&&(d=[e.$chop(),"", -")"],e=d[0],E=d[1],Ta=d[2],d);f(M)?(f((K=b.$normalize_text(e,!0))["$include?"](";&"))&&(f(K["$include?"](" >> "))?(l=K.$partition(" >> "),d=a.to_ary(l),K=null==d[0]?c:d[0],T=null==d[2]?c:d[2],l,L=k(["see"],{see:T})):f(K["$include?"](" &> "))&&(l=K.$split(" &> "),d=a.to_ary(l),K=null==d[0]?c:d[0],W=r.call(d,1),l,L=k(["see-also"],{"see-also":W}))),Aa=p(z,"Inline").$new(b,"indexterm",K,k(["attributes","type"],{attributes:L,type:"visible"})).$convert()):(L=k([],{}),f((Q=b.$normalize_text(e, -!0))["$include?"](";&"))&&(f(Q["$include?"](" >> "))?(l=Q.$partition(" >> "),d=a.to_ary(l),Q=null==d[0]?c:d[0],T=null==d[2]?c:d[2],l,n=["see",T],x(L,"[]=",a.to_a(n)),n[g(n.length,1)]):f(Q["$include?"](" &> "))&&(l=Q.$split(" &> "),d=a.to_ary(l),Q=null==d[0]?c:d[0],W=r.call(d,1),l,n=["see-also",W],x(L,"[]=",a.to_a(n)),n[g(n.length,1)])),n=["terms",Q=b.$split_simple_csv(Q)],x(L,"[]=",a.to_a(n)),n[g(n.length,1)],Aa=p(z,"Inline").$new(b,"indexterm",c,k(["attributes"],{attributes:L})).$convert()); -return f(E)?""+E+Aa+Ta:Aa}()},U.$$s=this,U.$$arity=0,U)));f(f(d=L)?e["$include?"]("://"):d)&&(e=x(e,"gsub",[p(z,"InlineLinkRx")],(M=function(){var d=M.$$s||this,w,l,m,h=c;if(f((m=(w=u["~"])===c?c:w["$[]"](2))["$start_with?"](p(z,"RS"))))return""+((w=u["~"])===c?c:w["$[]"](1))+m.$slice(1,m.$length())+((w=u["~"])===c?c:w["$[]"](4));w=[(l=u["~"])===c?c:l["$[]"](1),""];var q=w[0];var L=w[1];w;if(f((w=u["~"])===c?c:w["$[]"](4)))q["$=="]("link:")&&(q=""),e=(w=u["~"])===c?c:w["$[]"](4);else{var v=q;if("link:"["$==="](v)|| -'"'["$==="](v)||"'"["$==="](v))return(w=u["~"])===c?c:w["$[]"](0);e="";v=(w=u["~"])===c?c:w["$[]"](3);if(")"["$==="](v)||"?"["$==="](v)||"!"["$==="](v)){if(m=m.$chop(),f((w=(L=(l=u["~"])===c?c:l["$[]"](3))["$=="](")"))?m["$end_with?"](".","?","!"):(L=(l=u["~"])===c?c:l["$[]"](3))["$=="](")"))&&(L=b(m["$[]"](-1),L),m=m.$chop()),f(m["$end_with?"]("://")))return(w=u["~"])===c?c:w["$[]"](0)}else if(";"["$==="](v)){if(f(f(w=q["$start_with?"]("<"))?m["$end_with?"](">"):w)?(q=q.$slice(4,q.$length()), -m=m.$slice(0,g(m.$length(),4))):f((m=m.$chop())["$end_with?"](")"))?(m=m.$chop(),L=");"):L=";",f(m["$end_with?"]("://")))return(w=u["~"])===c?c:w["$[]"](0)}else if(":"["$==="](v)&&(f((m=m.$chop())["$end_with?"](")"))?(m=m.$chop(),L="):"):L=":",f(m["$end_with?"]("://"))))return(w=u["~"])===c?c:w["$[]"](0)}w=[c,k(["type"],{type:"link"})];v=w[0];var n=w[1];w;f(e["$empty?"]())||(f(e["$include?"](p(z,"R_SB")))&&(e=e.$gsub(p(z,"ESC_R_SB"),p(z,"R_SB"))),f(f(w=Ea.$compat_mode()["$!"]())?e["$include?"]("="): -w)&&(l=d.$extract_attributes_from_text(e,""),w=a.to_ary(l),e=null==w[0]?c:w[0],v=null==w[1]?c:w[1],l,h=["id",v["$[]"]("id")],x(n,"[]=",a.to_a(h)),h[g(h.length,1)]),f(e["$end_with?"]("^"))&&(e=e.$chop(),f(v)?f(w=v["$[]"]("window"))?w:(h=["window","_blank"],x(v,"[]=",a.to_a(h)),h[g(h.length,1)]):v=k(["window"],{window:"_blank"})));f(e["$empty?"]())&&(e=f(K["$key?"]("hide-uri-scheme"))?m.$sub(p(z,"UriSniffRx"),""):m,f(v)?(h=["role",f(v["$key?"]("role"))?"bare "+v["$[]"]("role"):"bare"],x(v,"[]=",a.to_a(h)), -h[g(h.length,1)]):v=k(["role"],{role:"bare"}));Ea.$register("links",(h=["target",m],x(n,"[]=",a.to_a(h)),h[g(h.length,1)]));f(v)&&(h=["attributes",v],x(n,"[]=",a.to_a(h)),h[g(h.length,1)]);return""+q+p(z,"Inline").$new(d,"anchor",e,n).$convert()+L},M.$$s=this,M.$$arity=0,M)));f(f(d=Aa)?f(h=e["$include?"]("link:"))?h:e["$include?"]("ilto:"):d)&&(e=x(e,"gsub",[p(z,"InlineLinkMacroRx")],(E=function(){var d=E.$$s||this,w,l,m=c;var h=c;if(f(((w=u["~"])===c?c:w["$[]"](0))["$start_with?"](p(z,"RS"))))return((w= -u["~"])===c?c:w["$[]"](0)).$slice(1,((w=u["~"])===c?c:w["$[]"](0)).$length());var q=f(l=(w=u["~"])===c?c:w["$[]"](1))?b("mailto:",m=(w=u["~"])===c?c:w["$[]"](2)):(w=u["~"])===c?c:w["$[]"](2);w=[c,k(["type"],{type:"link"})];var v=w[0];var L=w[1];w;f((e=(w=u["~"])===c?c:w["$[]"](3))["$empty?"]())||(f(e["$include?"](p(z,"R_SB")))&&(e=e.$gsub(p(z,"ESC_R_SB"),p(z,"R_SB"))),f(l)?f(f(w=Ea.$compat_mode()["$!"]())?e["$include?"](","):w)&&(h=d.$extract_attributes_from_text(e,""),w=a.to_ary(h),e=null==w[0]? -c:w[0],v=null==w[1]?c:w[1],h,h=["id",v["$[]"]("id")],x(L,"[]=",a.to_a(h)),h[g(h.length,1)],f(v["$key?"](2))&&(q=f(v["$key?"](3))?""+q+"?subject="+p(z,"Helpers").$encode_uri_component(v["$[]"](2))+"&body="+p(z,"Helpers").$encode_uri_component(v["$[]"](3)):""+q+"?subject="+p(z,"Helpers").$encode_uri_component(v["$[]"](2)))):f(f(w=Ea.$compat_mode()["$!"]())?e["$include?"]("="):w)&&(h=d.$extract_attributes_from_text(e,""),w=a.to_ary(h),e=null==w[0]?c:w[0],v=null==w[1]?c:w[1],h,h=["id",v["$[]"]("id")], -x(L,"[]=",a.to_a(h)),h[g(h.length,1)]),f(e["$end_with?"]("^"))&&(e=e.$chop(),f(v)?f(w=v["$[]"]("window"))?w:(h=["window","_blank"],x(v,"[]=",a.to_a(h)),h[g(h.length,1)]):v=k(["window"],{window:"_blank"})));f(e["$empty?"]())&&(f(l)?e=m:(f(K["$key?"]("hide-uri-scheme"))?f((e=q.$sub(p(z,"UriSniffRx"),""))["$empty?"]())&&(e=q):e=q,f(v)?(h=["role",f(v["$key?"]("role"))?"bare "+v["$[]"]("role"):"bare"],x(v,"[]=",a.to_a(h)),h[g(h.length,1)]):v=k(["role"],{role:"bare"})));Ea.$register("links",(h=["target", -q],x(L,"[]=",a.to_a(h)),h[g(h.length,1)]));f(v)&&(h=["attributes",v],x(L,"[]=",a.to_a(h)),h[g(h.length,1)]);return p(z,"Inline").$new(d,"anchor",e,L).$convert()},E.$$s=this,E.$$arity=0,E)));f(e["$include?"]("@"))&&(e=x(e,"gsub",[p(z,"InlineEmailRx")],(T=function(){var a=T.$$s||this,e,d;if(f((e=u["~"])===c?c:e["$[]"](1)))return((e=u["~"])===c?c:e["$[]"](1))["$=="](p(z,"RS"))?((e=u["~"])===c?c:e["$[]"](0)).$slice(1,((e=u["~"])===c?c:e["$[]"](0)).$length()):(e=u["~"])===c?c:e["$[]"](0);var g=b("mailto:", -d=(e=u["~"])===c?c:e["$[]"](0));Ea.$register("links",g);return p(z,"Inline").$new(a,"anchor",d,k(["type","target"],{type:"link",target:g})).$convert()},T.$$s=this,T.$$arity=0,T)));f(f(d=f(h=Q)?this.context["$=="]("list_item"):h)?this.parent.$style()["$=="]("bibliography"):d)&&(e=x(e,"sub",[p(z,"InlineBiblioAnchorRx")],(N=function(){var a=N.$$s||this,b;return p(z,"Inline").$new(a,"anchor",(b=u["~"])===c?c:b["$[]"](2),k(["type","id"],{type:"bibref",id:(b=u["~"])===c?c:b["$[]"](1)})).$convert()},N.$$s= -this,N.$$arity=0,N)));f(f(d=f(h=Q)?e["$include?"]("[["):h)?d:f(h=Aa)?e["$include?"]("or:"):h)&&(e=x(e,"gsub",[p(z,"InlineAnchorRx")],(S=function(){var a=S.$$s||this,b,e,d,g=c;if(f((b=u["~"])===c?c:b["$[]"](1)))return((b=u["~"])===c?c:b["$[]"](0)).$slice(1,((b=u["~"])===c?c:b["$[]"](0)).$length());f(d=(b=u["~"])===c?c:b["$[]"](2))?g=(b=u["~"])===c?c:b["$[]"](3):(d=(b=u["~"])===c?c:b["$[]"](4),f(f(b=g=(e=u["~"])===c?c:e["$[]"](5))?g["$include?"](p(z,"R_SB")):b)&&(g=g.$gsub(p(z,"ESC_R_SB"),p(z,"R_SB")))); -return p(z,"Inline").$new(a,"anchor",g,k(["type","id"],{type:"ref",id:d})).$convert()},S.$$s=this,S.$$arity=0,S)));f(f(d=f(h=e["$include?"]("&"))?e["$include?"](";&l"):h)?d:f(h=Aa)?e["$include?"]("xref:"):h)&&(e=x(e,"gsub",[p(z,"InlineXrefMacroRx")],(X=function(){var d=X.$$s||this,w,l,h=c,q=c,v,L,n=L=c,Q=c;if(f(((w=u["~"])===c?c:w["$[]"](0))["$start_with?"](p(z,"RS"))))return((w=u["~"])===c?c:w["$[]"](0)).$slice(1,((w=u["~"])===c?c:w["$[]"](0)).$length());var A=k([],{});if(f(l=(w=u["~"])===c?c:w["$[]"](1))){var r= -l.$split(",",2);w=a.to_ary(r);l=null==w[0]?c:w[0];e=null==w[1]?c:w[1];r;f(e)&&(e=e.$lstrip())}else h=!0,l=(w=u["~"])===c?c:w["$[]"](2),f(e=(w=u["~"])===c?c:w["$[]"](3))&&(f(e["$include?"](p(z,"R_SB")))&&(e=e.$gsub(p(z,"ESC_R_SB"),p(z,"R_SB"))),f(f(w=Ea.$compat_mode()["$!"]())?e["$include?"]("="):w)&&(r=d.$extract_attributes_from_text(e),w=a.to_ary(r),e=null==w[0]?c:w[0],A=null==w[1]?c:w[1],r));f(Ea.$compat_mode())?q=l:f(v=l.$index("#"))?f(m(v,0))?(f(m(L=g(g(l.$length(),1),v),0))?(w=[l.$slice(0,v), -l.$slice(b(v,1),L)],L=w[0],q=w[1],w):L=l.$chop(),f(h)?f(L["$end_with?"](".adoc"))?n=L=L.$slice(0,g(L.$length(),5)):f(p(z,"Helpers")["$extname?"](L)["$!"]())&&(n=L):n=f(x(L,"end_with?",a.to_a(p(z,"ASCIIDOC_EXTENSIONS").$keys())))?L=L.$slice(0,L.$rindex(".")):L):(w=[l,l.$slice(1,l.$length())],Q=w[0],q=w[1],w):f(h)?f(l["$end_with?"](".adoc"))?n=L=l.$slice(0,g(l.$length(),5)):f(p(z,"Helpers")["$extname?"](l))?L=l:q=l:q=l;f(Q)?(l=q,f(f(w=d.$logger()["$info?"]())?Ea.$catalog()["$[]"]("refs")["$[]"](l)["$!"](): -w)&&d.$logger().$info("possible invalid reference: "+l)):f(L)?f(f(w=n)?f(r=Ea.$attributes()["$[]"]("docname")["$=="](L))?r:Ea.$catalog()["$[]"]("includes")["$[]"](L):w)?f(q)?(w=[q,c,"#"+q],l=w[0],L=w[1],Q=w[2],w,f(f(w=d.$logger()["$info?"]())?Ea.$catalog()["$[]"]("refs")["$[]"](l)["$!"]():w)&&d.$logger().$info("possible invalid reference: "+l)):(w=[c,c,"#"],l=w[0],L=w[1],Q=w[2],w):(w=[L,""+(f(r=Ea.$attributes()["$[]"]("relfileprefix"))?r:"")+L+(f(n)?Ea.$attributes().$fetch("relfilesuffix",Ea.$outfilesuffix()): -"")],l=w[0],L=w[1],w,f(q)?(w=[""+l+"#"+q,""+L+"#"+q],l=w[0],Q=w[1],w):Q=L):f(f(w=Ea.$compat_mode())?w:p(z,"Compliance").$natural_xrefs()["$!"]())?(w=[q,"#"+q],l=w[0],Q=w[1],w,f(f(w=d.$logger()["$info?"]())?Ea.$catalog()["$[]"]("refs")["$[]"](l)["$!"]():w)&&d.$logger().$info("possible invalid reference: "+l)):f(Ea.$catalog()["$[]"]("refs")["$[]"](q))?(w=[q,"#"+q],l=w[0],Q=w[1],w):f(f(w=f(r=q["$include?"](" "))?r:q.$downcase()["$!="](q))?l=Ea.$resolve_id(q):w)?(w=[l,"#"+l],q=w[0],Q=w[1],w):(w=[q,"#"+ -q],l=w[0],Q=w[1],w,f(d.$logger()["$info?"]())&&d.$logger().$info("possible invalid reference: "+l));w=["path",L];x(A,"[]=",a.to_a(w));w[g(w.length,1)];w=["fragment",q];x(A,"[]=",a.to_a(w));w[g(w.length,1)];w=["refid",l];x(A,"[]=",a.to_a(w));w[g(w.length,1)];return p(z,"Inline").$new(d,"anchor",e,k(["type","target","attributes"],{type:"xref",target:Q,attributes:A})).$convert()},X.$$s=this,X.$$arity=0,X)));f(f(d=Aa)?e["$include?"]("tnote"):d)&&(e=x(e,"gsub",[p(z,"InlineFootnoteMacroRx")],(w=function(){var b= -w.$$s||this,d,g,l,m,h=c,q=g=c,v=g=c;if(f(((d=u["~"])===c?c:d["$[]"](0))["$start_with?"](p(z,"RS"))))return((d=u["~"])===c?c:d["$[]"](0)).$slice(1,((d=u["~"])===c?c:d["$[]"](0)).$length());if(f((d=u["~"])===c?c:d["$[]"](1)))if(f((d=u["~"])===c?c:d["$[]"](3)))g=((l=u["~"])===c?c:l["$[]"](3)).$split(",",2),d=a.to_ary(g),h=null==d[0]?c:d[0],e=null==d[1]?c:d[1],g,f(Ea.$compat_mode())||b.$logger().$warn("found deprecated footnoteref macro: "+((d=u["~"])===c?c:d["$[]"](0))+"; use footnote macro with target instead"); -else return(d=u["~"])===c?c:d["$[]"](0);else h=(d=u["~"])===c?c:d["$[]"](2),e=(d=u["~"])===c?c:d["$[]"](3);if(f(h))f(g=x(Ea.$footnotes(),"find",[],(m=function(a){null==a&&(a=c);return a.$id()["$=="](h)},m.$$s=b,m.$$arity=1,m)))?(d=[g.$index(),g.$text()],q=d[0],e=d[1],d,d=["xref",h,c],g=d[0],v=d[1],h=d[2]):f(e)?(e=b.$restore_passthroughs(b.$normalize_text(e,!0,!0)),q=Ea.$counter("footnote-number"),Ea.$register("footnotes",n(p(z,"Document"),"Footnote").$new(q,h,e)),d=["ref",c],g=d[0],v=d[1]):(b.$logger().$warn("invalid footnote reference: "+ -h),d=["xref",h,h,c],g=d[0],v=d[1],e=d[2],h=d[3]),d;else if(f(e))e=b.$restore_passthroughs(b.$normalize_text(e,!0,!0)),q=Ea.$counter("footnote-number"),Ea.$register("footnotes",n(p(z,"Document"),"Footnote").$new(q,h,e)),g=v=c;else return(d=u["~"])===c?c:d["$[]"](0);return p(z,"Inline").$new(b,"footnote",e,k(["attributes","id","target","type"],{attributes:k(["index"],{index:q}),id:h,target:v,type:g})).$convert()},w.$$s=this,w.$$arity=0,w)));return e},X.$$arity=1);a.def(d,"$sub_post_replacements",y= -function(a){var b,e,d,l=c,m=c;null==this.attributes&&(this.attributes=c);null==this.document&&(this.document=c);if(f(f(b=this.attributes["$[]"]("hardbreaks-option"))?b:this.document.$attributes()["$[]"]("hardbreaks-option"))){l=a.$split(p(z,"LF"),-1);if(f(h(l.$size(),2)))return a;m=l.$pop();return x(l,"map",[],(e=function(a){var b=e.$$s||this;null==a&&(a=c);return p(z,"Inline").$new(b,"break",f(a["$end_with?"](p(z,"HARD_LINE_BREAK")))?a.$slice(0,g(a.$length(),2)):a,k(["type"],{type:"line"})).$convert()}, -e.$$s=this,e.$$arity=1,e))["$<<"](m).$join(p(z,"LF"))}return f(f(b=a["$include?"](p(z,"PLUS")))?a["$include?"](p(z,"HARD_LINE_BREAK")):b)?x(a,"gsub",[p(z,"HardLineBreakRx")],(d=function(){var a=d.$$s||this,b;return p(z,"Inline").$new(a,"break",(b=u["~"])===c?c:b["$[]"](1),k(["type"],{type:"line"})).$convert()},d.$$s=this,d.$$arity=0,d)):a},y.$$arity=1);a.def(d,"$sub_source",C=function(a,b){return f(b)?this.$sub_callouts(this.$sub_specialchars(a)):this.$sub_specialchars(a)},C.$$arity=2);a.def(d,"$sub_callouts", -D=function(a){var e,d=c,g=c;d=f(this["$attr?"]("line-comment"))?p(z,"CalloutSourceRxMap")["$[]"](this.$attr("line-comment")):p(z,"CalloutSourceRx");g=0;return x(a,"gsub",[d],(e=function(){var a=e.$$s||this,d,l;null==a.document&&(a.document=c);return f((d=u["~"])===c?c:d["$[]"](2))?((d=u["~"])===c?c:d["$[]"](0)).$sub(p(z,"RS"),""):p(z,"Inline").$new(a,"callout",((d=u["~"])===c?c:d["$[]"](4))["$=="](".")?(g=b(g,1)).$to_s():(d=u["~"])===c?c:d["$[]"](4),k(["id","attributes"],{id:a.document.$callouts().$read_next_id(), -attributes:k(["guard"],{guard:f(d=(l=u["~"])===c?c:l["$[]"](1))?d:((l=u["~"])===c?c:l["$[]"](3))["$=="]("--")?["\x3c!--","--\x3e"]:c})})).$convert()},e.$$s=this,e.$$arity=0,e))},D.$$arity=1);a.def(d,"$highlight_source",ia=function(b,e){var d,g,l=c,m=c,q,v=c,n=c;null==this.document&&(this.document=c);null==this.passthroughs&&(this.passthroughs=c);if(!f(f(d=l=this.document.$syntax_highlighter())?l["$highlight?"]():d))return this.$sub_source(b,e);f(e)&&(e=this.$extract_callouts(b),d=a.to_ary(e),b=null== -d[0]?c:d[0],m=null==d[1]?c:d[1],e);e=this.document.$attributes();var r=l.$name();f(q=f(this["$attr?"]("linenums"))?(f(d=e["$[]"](""+r+"-linenums-mode"))?d:"table").$to_sym():c)&&f(h(v=this.$attr("start",1).$to_i(),1))&&(v=1);f(this["$attr?"]("highlight"))&&(n=this.$resolve_lines_to_highlight(b,this.$attr("highlight"),v));e=l.$highlight(this,b,this.$attr("language"),k("callouts css_mode highlight_lines number_lines start_line_number style".split(" "),{callouts:m,css_mode:(f(g=e["$[]"](""+r+"-css"))? -g:"class").$to_sym(),highlight_lines:n,number_lines:q,start_line_number:v,style:e["$[]"](""+r+"-style")}));d=a.to_ary(e);b=null==d[0]?c:d[0];d=null==d[1]?c:d[1];e;f(this.passthroughs["$empty?"]())||(b=b.$gsub(p(z,"HighlightedPassSlotRx"),""+p(z,"PASS_START")+"\\1"+p(z,"PASS_END")));return f(m["$nil_or_empty?"]())?b:this.$restore_callouts(b,m,d)},ia.$$arity=2);a.def(d,"$resolve_lines_to_highlight",B=function(e,d,k){var l,m,q=c,v=c;null==k&&(k=c);q=[];f(d["$include?"](" "))&&(d=d.$delete(" "));x(f(d["$include?"](","))? -d.$split(","):d.$split(";"),"map",[],(l=function(d){var k,l=c;var m=c;null==d&&(d=c);f(d["$start_with?"]("!"))&&(d=d.$slice(1,d.$length()),l=!0);if(f(k=f(d["$include?"](".."))?"..":f(d["$include?"]("-"))?"-":c)){k=d.$partition(k);d=a.to_ary(k);m=null==d[0]?c:d[0];var v=null==d[2]?c:d[2];k;f(f(d=v["$empty?"]())?d:h(v=v.$to_i(),0))&&(v=b(e.$count(p(z,"LF")),1));return f(l)?q=g(q,a.Range.$new(m.$to_i(),v,!1).$to_a()):q=q["$|"](a.Range.$new(m.$to_i(),v,!1).$to_a())}return f(l)?q.$delete(d.$to_i()):f(q["$include?"](m= -d.$to_i())["$!"]())?q["$<<"](m):c},l.$$s=this,l.$$arity=1,l));(v=f(k)?g(k,1):0)["$=="](0)||(q=x(q,"map",[],(m=function(a){null==a&&(a=c);return g(a,v)},m.$$s=this,m.$$arity=1,m)));return q.$sort()},B.$$arity=-3);a.def(d,"$extract_passthroughs",V=function(b){var e,d,l,h,v,n=c,r=c,A=c,t=c,U=c;null==this.document&&(this.document=c);null==this.passthroughs&&(this.passthroughs=c);n=this.document.$compat_mode();r=this.passthroughs;f(f(e=f(d=b["$include?"]("++"))?d:b["$include?"]("$$"))?e:b["$include?"]("ss:"))&& -(b=x(b,"gsub",[p(z,"InlinePassMacroRx")],(l=function(){var b=l.$$s||this,e,d,h,w,v=c,L=c,A=c,t=h=c;if(f(d=(e=u["~"])===c?c:e["$[]"](4))){if(f(f(e=n)?d["$=="]("++"):e))return(f((e=u["~"])===c?c:e["$[]"](2))?""+((e=u["~"])===c?c:e["$[]"](1))+"["+((e=u["~"])===c?c:e["$[]"](2))+"]"+((e=u["~"])===c?c:e["$[]"](3)):""+((e=u["~"])===c?c:e["$[]"](1))+((e=u["~"])===c?c:e["$[]"](3)))+"++"+b.$extract_passthroughs((e=u["~"])===c?c:e["$[]"](5))+"++";if(f(h=(e=u["~"])===c?c:e["$[]"](2))){if(f(m(w=((e=u["~"])=== -c?c:e["$[]"](3)).$length(),0)))return""+((e=u["~"])===c?c:e["$[]"](1))+"["+h+"]"+q(p(z,"RS"),g(w,1))+d+((e=u["~"])===c?c:e["$[]"](5))+d;((e=u["~"])===c?c:e["$[]"](1))["$=="](p(z,"RS"))?v="["+h+"]":(f((e=d["$=="]("++"))?h["$end_with?"]("x-"):d["$=="]("++"))&&(L=!0,h=h.$slice(0,g(h.$length(),2))),A=b.$parse_quoted_text_attributes(h))}else if(f(m(w=((e=u["~"])===c?c:e["$[]"](3)).$length(),0)))return""+q(p(z,"RS"),g(w,1))+d+((e=u["~"])===c?c:e["$[]"](5))+d;h=d["$=="]("+++")?[]:p(z,"BASIC_SUBS");b=f(A)? -f(L)?[t=r.$size(),k(["text","subs","type","attributes"],{text:(e=u["~"])===c?c:e["$[]"](5),subs:p(z,"NORMAL_SUBS"),type:"monospaced",attributes:A})]:[t=r.$size(),k(["text","subs","type","attributes"],{text:(e=u["~"])===c?c:e["$[]"](5),subs:h,type:"unquoted",attributes:A})]:[t=r.$size(),k(["text","subs"],{text:(e=u["~"])===c?c:e["$[]"](5),subs:h})]}else{if(((e=u["~"])===c?c:e["$[]"](6))["$=="](p(z,"RS")))return((e=u["~"])===c?c:e["$[]"](0)).$slice(1,((e=u["~"])===c?c:e["$[]"](0)).$length());b=f(h= -(e=u["~"])===c?c:e["$[]"](7))?[t=r.$size(),k(["text","subs"],{text:b.$normalize_text((e=u["~"])===c?c:e["$[]"](8),c,!0),subs:b.$resolve_pass_subs(h)})]:[t=r.$size(),k(["text"],{text:b.$normalize_text((e=u["~"])===c?c:e["$[]"](8),c,!0)})]}x(r,"[]=",a.to_a(b));b[g(b.length,1)];return""+(f(e=v)?e:"")+p(z,"PASS_START")+t+p(z,"PASS_END")},l.$$s=this,l.$$arity=0,l)));d=p(z,"InlinePassRx")["$[]"](n);e=a.to_ary(d);A=null==e[0]?c:e[0];t=null==e[1]?c:e[1];U=null==e[2]?c:e[2];d;f(f(e=b["$include?"](A))?e:f(d= -t)?b["$include?"](t):d)&&(b=x(b,"gsub",[U],(h=function(){var b=h.$$s||this,e,d,l=c,w=c,m=c;var q=(e=u["~"])===c?c:e["$[]"](1);var v=(e=u["~"])===c?c:e["$[]"](2);f((d=(e=u["~"])===c?c:e["$[]"](3))["$start_with?"](p(z,"RS")))&&(l=p(z,"RS"));var A=(e=u["~"])===c?c:e["$[]"](4);var t=(e=u["~"])===c?c:e["$[]"](5);f(n)?w=!0:f(w=f(e=v)?v["$end_with?"]("x-"):e)&&(v=v.$slice(0,g(v.$length(),2)));if(f(v)){if(f(A["$=="]("`")?w["$!"]():A["$=="]("`")))return b.$extract_inner_passthrough(t,""+q+"["+v+"]"+l);if(f(l))return""+ -q+"["+v+"]"+d.$slice(1,d.$length());q["$=="](p(z,"RS"))?q="["+v+"]":m=b.$parse_quoted_text_attributes(v)}else{if(f(A["$=="]("`")?w["$!"]():A["$=="]("`")))return b.$extract_inner_passthrough(t,""+q+l);if(f(l))return""+q+d.$slice(1,d.$length())}f(n)?t=[b=r.$size(),k(["text","subs","attributes","type"],{text:t,subs:p(z,"BASIC_SUBS"),attributes:m,type:"monospaced"})]:f(m)?f(w)?(e=A["$=="]("`")?p(z,"BASIC_SUBS"):p(z,"NORMAL_SUBS"),t=[b=r.$size(),k(["text","subs","attributes","type"],{text:t,subs:e,attributes:m, -type:"monospaced"})]):t=[b=r.$size(),k(["text","subs","attributes","type"],{text:t,subs:p(z,"BASIC_SUBS"),attributes:m,type:"unquoted"})]:t=[b=r.$size(),k(["text","subs"],{text:t,subs:p(z,"BASIC_SUBS")})];x(r,"[]=",a.to_a(t));t[g(t.length,1)];return""+q+p(z,"PASS_START")+b+p(z,"PASS_END")},h.$$s=this,h.$$arity=0,h)));f(f(e=b["$include?"](":"))?f(d=b["$include?"]("stem:"))?d:b["$include?"]("math:"):e)&&(b=x(b,"gsub",[p(z,"InlineStemMacroRx")],(v=function(){var b=v.$$s||this,e,d;null==b.document&&(b.document= -c);if(f(((e=u["~"])===c?c:e["$[]"](0))["$start_with?"](p(z,"RS"))))return((e=u["~"])===c?c:e["$[]"](0)).$slice(1,((e=u["~"])===c?c:e["$[]"](0)).$length());(d=((e=u["~"])===c?c:e["$[]"](1)).$to_sym())["$=="]("stem")&&(d=p(z,"STEM_TYPE_ALIASES")["$[]"](b.document.$attributes()["$[]"]("stem")).$to_sym());var l=(e=u["~"])===c?c:e["$[]"](2);var w=b.$normalize_text((e=u["~"])===c?c:e["$[]"](3),c,!0);f(f(e=d["$=="]("latexmath")?w["$start_with?"]("$"):d["$=="]("latexmath"))?w["$end_with?"]("$"):e)&&(w=w.$slice(1, -g(w.$length(),2)));l=f(l)?b.$resolve_pass_subs(l):f(b.document["$basebackend?"]("html"))?p(z,"BASIC_SUBS"):c;d=[b=r.$size(),k(["text","subs","type"],{text:w,subs:l,type:d})];x(r,"[]=",a.to_a(d));d[g(d.length,1)];return""+p(z,"PASS_START")+b+p(z,"PASS_END")},v.$$s=this,v.$$arity=0,v)));return b},V.$$arity=1);a.def(d,"$restore_passthroughs",G=function(a){var b,e=c;null==this.passthroughs&&(this.passthroughs=c);e=this.passthroughs;return x(a,"gsub",[p(z,"PassSlotRx")],(b=function(){var d=b.$$s||this, -g,l,m,h,q=c;if(f(l=e["$[]"](((g=u["~"])===c?c:g["$[]"](1)).$to_i())))return g=d.$apply_subs(l["$[]"]("text"),l["$[]"]("subs")),f(m=l["$[]"]("type"))&&(f(h=l["$[]"]("attributes"))&&(q=h["$[]"]("id")),g=p(z,"Inline").$new(d,"quoted",g,k(["type","id","attributes"],{type:m,id:q,attributes:h})).$convert()),f(g["$include?"](p(z,"PASS_START")))?d.$restore_passthroughs(g):g;d.$logger().$error("unresolved passthrough detected: "+a);return"??pass??"},b.$$s=this,b.$$arity=0,b))},G.$$arity=1);a.def(d,"$resolve_subs", -H=function(a,e,d,k){var l,h=c,q=c,v=c,n=c;null==e&&(e="block");null==d&&(d=c);null==k&&(k=c);if(f(a["$nil_or_empty?"]()))return c;h=c;f(a["$include?"](" "))&&(a=a.$delete(" "));q=p(z,"SubModifierSniffRx")["$match?"](a);x(a.$split(","),"each",[],(l=function(a){var k,l,m=c;null==a&&(a=c);var v=c;f(q)&&((k=a.$chr())["$=="]("+")?(v="append",a=a.$slice(1,a.$length())):k["$=="]("-")?(v="remove",a=a.$slice(1,a.$length())):f(a["$end_with?"]("+"))&&(v="prepend",a=a.$chop()));a=a.$to_sym();f((k=e["$=="]("inline"))? -f(l=a["$=="]("verbatim"))?l:a["$=="]("v"):e["$=="]("inline"))?a=p(z,"BASIC_SUBS"):f(p(z,"SUB_GROUPS")["$key?"](a))?a=p(z,"SUB_GROUPS")["$[]"](a):f(f(k=e["$=="]("inline")?a.$length()["$=="](1):e["$=="]("inline"))?p(z,"SUB_HINTS")["$key?"](a):k)?(a=p(z,"SUB_HINTS")["$[]"](a),a=f(m=p(z,"SUB_GROUPS")["$[]"](a))?m:[a]):a=[a];if(f(v))return h=f(k=h)?k:f(d)?d.$drop(0):[],"append"["$==="](v)?h=b(h,a):"prepend"["$==="](v)?h=b(a,h):"remove"["$==="](v)?h=g(h,a):c;h=f(k=h)?k:[];return h=b(h,a)},l.$$s=this,l.$$arity= -1,l));if(!f(h))return c;v=h["$&"](p(z,"SUB_OPTIONS")["$[]"](e));f(g(h,v)["$empty?"]())||(n=g(h,v),this.$logger().$warn("invalid substitution type"+(f(m(n.$size(),1))?"s":"")+(f(k)?" for ":"")+k+": "+n.$join(", ")));return v},H.$$arity=-2);a.def(d,"$resolve_block_subs",J=function(a,b,c){return this.$resolve_subs(a,"block",b,c)},J.$$arity=3);a.def(d,"$resolve_pass_subs",la=function(a){return this.$resolve_subs(a,"inline",c,"passthrough macro")},la.$$arity=1);a.def(d,"$expand_subs",ba=function(a,e){var d, -k,g=c;null==e&&(e=c);return f(n("::","Symbol")["$==="](a))?a["$=="]("none")?c:f(d=p(z,"SUB_GROUPS")["$[]"](a))?d:[a]:f(n("::","Array")["$==="](a))?(g=[],x(a,"each",[],(k=function(a){var e;null==a&&(a=c);return a["$=="]("none")?c:f(e=p(z,"SUB_GROUPS")["$[]"](a))?g=b(g,e):g["$<<"](a)},k.$$s=this,k.$$arity=1,k)),f(g["$empty?"]())?c:g):this.$resolve_subs(a,"inline",c,e)},ba.$$arity=-2);a.def(d,"$commit_subs",aa=function(){var b,e,d,k,l=c,h=c,m=c;null==this.default_subs&&(this.default_subs=c);null==this.content_model&& -(this.content_model=c);null==this.context&&(this.context=c);null==this.subs&&(this.subs=c);null==this.attributes&&(this.attributes=c);null==this.style&&(this.style=c);null==this.document&&(this.document=c);if(!f(k=this.default_subs))if(k=this.content_model,"simple"["$==="](k))k=p(z,"NORMAL_SUBS");else if("verbatim"["$==="](k))k=this.context["$=="]("verse")?p(z,"NORMAL_SUBS"):p(z,"VERBATIM_SUBS");else if("raw"["$==="](k))k=this.context["$=="]("stem")?p(z,"BASIC_SUBS"):p(z,"NO_SUBS");else return this.subs; -f(l=this.attributes["$[]"]("subs"))?this.subs=f(b=this.$resolve_block_subs(l,k,this.context))?b:[]:this.subs=k.$drop(0);f(f(b=f(e=f(d=this.context["$=="]("listing")?this.style["$=="]("source"):this.context["$=="]("listing"))?h=this.document.$syntax_highlighter():d)?h["$highlight?"]():e)?m=this.subs.$index("specialcharacters"):b)&&(b=[m,"highlight"],x(this.subs,"[]=",a.to_a(b)),b[g(b.length,1)]);return c},aa.$$arity=0);a.def(d,"$parse_attributes",na=function(a,b,e){var d,g=c,l=c;null==this.document&& -(this.document=c);null==b&&(b=[]);null==e&&(e=k([],{}));if(f(f(a)?a["$empty?"]():!0))return k([],{});f(e["$[]"]("unescape_input"))&&(a=this.$normalize_text(a,!0,!0));f(f(d=e["$[]"]("sub_input"))?a["$include?"](p(z,"ATTR_REF_HEAD")):d)&&(a=this.document.$sub_attributes(a));f(e["$[]"]("sub_result"))&&(g=this);return f(l=e["$[]"]("into"))?p(z,"AttributeList").$new(a,g).$parse_into(l,b):p(z,"AttributeList").$new(a,g).$parse(b)},na.$$arity=-2);d.$private();a.def(d,"$extract_attributes_from_text",Z=function(a, -b){var e=c,d=c;null==b&&(b=c);var k=f(a["$include?"](p(z,"LF")))?a.$tr(p(z,"LF")," "):a;return f(e=(d=p(z,"AttributeList").$new(k,this).$parse())["$[]"](1))?e["$=="](k)?[a,d.$clear()]:[e,d]:[b,d]},Z.$$arity=-2);a.def(d,"$extract_callouts",I=function(e){var d,l=c,h=c,m=c,q=c,v=c;l=k([],{});h=m=0;q=c;v=f(this["$attr?"]("line-comment"))?p(z,"CalloutExtractRxMap")["$[]"](this.$attr("line-comment")):p(z,"CalloutExtractRx");e=x(e.$split(p(z,"LF"),-1),"map",[],(d=function(e){var k=d.$$s||this,n;null==e&& -(e=c);m=b(m,1);return x(e,"gsub",[v],(n=function(){var e,d,k=c;if(f((e=u["~"])===c?c:e["$[]"](2)))return((e=u["~"])===c?c:e["$[]"](0)).$sub(p(z,"RS"),"");(f(e=l["$[]"](m))?e:(k=[m,[]],x(l,"[]=",a.to_a(k)),k[g(k.length,1)]))["$<<"]([f(e=(d=u["~"])===c?c:d["$[]"](1))?e:((d=u["~"])===c?c:d["$[]"](3))["$=="]("--")?["\x3c!--","--\x3e"]:c,((e=u["~"])===c?c:e["$[]"](4))["$=="](".")?(h=b(h,1)).$to_s():(e=u["~"])===c?c:e["$[]"](4)]);q=m;return""},n.$$s=k,n.$$arity=0,n))},d.$$s=this,d.$$arity=1,d)).$join(p(z, -"LF"));f(q)?q["$=="](m)&&(e=""+e+p(z,"LF")):l=c;return[e,l]},I.$$arity=1);a.def(d,"$restore_callouts",O=function(e,d,g){var l,h=c,m=c;null==g&&(g=c);f(g)?(h=e.$slice(0,g),e=e.$slice(g,e.$length())):h="";m=0;return b(h,x(e.$split(p(z,"LF"),-1),"map",[],(l=function(e){var g=l.$$s||this,h,q,v=h=c;var n=c;null==g.document&&(g.document=c);null==e&&(e=c);return f(h=d.$delete(m=b(m,1)))?h.$size()["$=="](1)?(h=h["$[]"](0),n=a.to_ary(h),v=null==n[0]?c:n[0],n=null==n[1]?c:n[1],h,""+e+p(z,"Inline").$new(g,"callout", -n,k(["id","attributes"],{id:g.document.$callouts().$read_next_id(),attributes:k(["guard"],{guard:v})})).$convert()):""+e+x(h,"map",[],(q=function(a,b){var e=q.$$s||this;null==e.document&&(e.document=c);null==a&&(a=c);null==b&&(b=c);return p(z,"Inline").$new(e,"callout",b,k(["id","attributes"],{id:e.document.$callouts().$read_next_id(),attributes:k(["guard"],{guard:a})})).$convert()},q.$$s=g,q.$$arity=2,q)).$join(" "):e},l.$$s=this,l.$$arity=1,l)).$join(p(z,"LF")))},O.$$arity=-3);a.def(d,"$extract_inner_passthrough", -P=function(b,e){var d,l;null==this.passthroughs&&(this.passthroughs=c);if(f(f(d=f(l=b["$end_with?"]("+"))?b["$start_with?"]("+","\\+"):l)?p(z,"SinglePlusInlinePassRx")["$=~"](b):d)){if(f((d=u["~"])===c?c:d["$[]"](1)))return""+e+"`+"+((d=u["~"])===c?c:d["$[]"](2))+"+`";b=[l=this.passthroughs.$size(),k(["text","subs"],{text:(d=u["~"])===c?c:d["$[]"](2),subs:p(z,"BASIC_SUBS")})];x(this.passthroughs,"[]=",a.to_a(b));b[g(b.length,1)];return""+e+"`"+p(z,"PASS_START")+l+p(z,"PASS_END")+"`"}return""+e+"`"+ -b+"`"},P.$$arity=2);a.def(d,"$convert_quoted_text",ka=function(a,b,e){var d=c,g=c,l=c,h=c;if(f(a["$[]"](0)["$start_with?"](p(z,"RS"))))if(f(e["$=="]("constrained")?d=a["$[]"](2):e["$=="]("constrained")))g="["+d+"]";else return a["$[]"](0).$slice(1,a["$[]"](0).$length());if(e["$=="]("constrained")){if(f(g))return""+g+p(z,"Inline").$new(this,"quoted",a["$[]"](3),k(["type"],{type:b})).$convert();f(e=a["$[]"](2))&&(l=(h=this.$parse_quoted_text_attributes(e))["$[]"]("id"),b["$=="]("mark")&&(b="unquoted")); -return""+a["$[]"](1)+p(z,"Inline").$new(this,"quoted",a["$[]"](3),k(["type","id","attributes"],{type:b,id:l,attributes:h})).$convert()}f(e=a["$[]"](1))&&(l=(h=this.$parse_quoted_text_attributes(e))["$[]"]("id"),b["$=="]("mark")&&(b="unquoted"));return p(z,"Inline").$new(this,"quoted",a["$[]"](2),k(["type","id","attributes"],{type:b,id:l,attributes:h})).$convert()},ka.$$arity=3);a.def(d,"$do_replacement",wa=function(a,c,e){var d;return f((d=a["$[]"](0))["$include?"](p(z,"RS")))?d.$sub(p(z,"RS"),""): -"none"["$==="](e)?c:"bounding"["$==="](e)?b(b(a["$[]"](1),c),a["$[]"](2)):b(a["$[]"](1),c)},wa.$$arity=3);p(z,"RUBY_ENGINE")["$=="]("opal")||c;a.def(d,"$parse_quoted_text_attributes",da=function(b){var e,d=c;f(b["$include?"](p(z,"ATTR_REF_HEAD")))&&(b=this.$sub_attributes(b));f(b["$include?"](","))&&(b=b.$slice(0,b.$index(",")));if(f((b=b.$strip())["$empty?"]()))return k([],{});if(f(f(e=b["$start_with?"](".","#"))?p(z,"Compliance").$shorthand_property_syntax():e)){var l=b.$split("#",2);f(m(l.$size(), -1))?(b=l["$[]"](1).$split("."),e=a.to_ary(b),d=null==e[0]?c:e[0],e=r.call(e,1),b):e=[];b=f(l["$[]"](0)["$empty?"]())?[]:l["$[]"](0).$split(".");f(m(b.$size(),1))&&b.$shift();f(m(e.$size(),0))&&b.$concat(e);e=k([],{});f(d)&&(d=["id",d],x(e,"[]=",a.to_a(d)),d[g(d.length,1)]);f(b["$empty?"]())||(d=["role",b.$join(" ")],x(e,"[]=",a.to_a(d)),d[g(d.length,1)]);return e}return k(["role"],{role:b})},da.$$arity=1);a.def(d,"$normalize_text",xa=function(a,b,e){var d;null==b&&(b=c);null==e&&(e=c);f(a["$empty?"]())|| -(f(b)&&(a=a.$strip().$tr(p(z,"LF")," ")),f(f(d=e)?a["$include?"](p(z,"R_SB")):d)&&(a=a.$gsub(p(z,"ESC_R_SB"),p(z,"R_SB"))));return a},xa.$$arity=-2);a.def(d,"$split_simple_csv",Ca=function(a){var e,d,k=c,g=c,p=c;return f(a["$empty?"]())?[]:f(a["$include?"]('"'))?(k=[],g="",p=c,x(a,"each_char",[],(e=function(a){var e=c;null==a&&(a=c);return function(){e=a;if(","["$==="](e)){if(f(p))return g=b(g,a);k["$<<"](g.$strip());return g=""}return'"'["$==="](e)?p=p["$!"]():g=b(g,a)}()},e.$$s=this,e.$$arity=1, -e)),k["$<<"](g.$strip())):x(a.$split(","),"map",[],(d=function(a){null==a&&(a=c);return a.$strip()},d.$$s=this,d.$$arity=1,d))},Ca.$$arity=1)})(d[0],d)}(l[0],l)};Opal.modules["asciidoctor/version"]=function(a){var b=[],g=a.module;b=[g(b[0],"Asciidoctor")].concat(b);a.const_set(b[0],"VERSION","2.0.15")};Opal.modules["asciidoctor/abstract_node"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}function g(a,b){return"number"===typeof a&&"number"===typeof b?a< -b:a["$<"](b)}var h=[],m=a.nil,q=a.const_get_qualified,l=a.const_get_relative,c=a.module,n=a.klass,p=a.hash2,r=a.truthy,t=a.send;a.add_stubs("$include $attr_reader $attr_accessor $== $document $to_s $[] $merge $raise $converter $attributes $key? $[]= $- $delete $tap $new $each_key $end_with? $<< $slice $length $update $split $include? $=== $join $empty? $apply_reftext_subs $attr? $attr $extname? $image_uri $< $safe $uriish? $encode_spaces_in_uri $normalize_web_path $generate_data_uri_from_uri $generate_data_uri $extname $normalize_system_path $readable? $strict_encode64 $binread $warn $logger $require_library $! $open_uri $content_type $read $base_dir $root? $path_resolver $system_path $web_path $!= $prepare_source_string $fetch $read_asset".split(" ")); -return function(d,e){d=[c(d,"Asciidoctor")].concat(e);(function(c,$super,e){c=n(c,$super,"AbstractNode");var d=[c].concat(e),f,k,h,v,A,u,x,E,M,N,y,C,D,S,B,G,H,sa,V,ma,ca,J,la,ba,aa,na,I,O,P,R,ka,wa,da;c.$$prototype.document=c.$$prototype.attributes=c.$$prototype.parent=m;c.$include(l(d,"Substitutors"),l(d,"Logging"));c.$attr_reader("attributes");c.$attr_reader("context");c.$attr_reader("document");c.$attr_accessor("id");c.$attr_reader("node_name");c.$attr_reader("parent");a.def(c,"$initialize",f= -function(a,b,c){var e=m;null==c&&(c=p([],{}));b["$=="]("document")?this.document=this:r(a)&&(this.document=(this.parent=a).$document());this.node_name=(this.context=b).$to_s();this.attributes=r(e=c["$[]"]("attributes"))?e.$merge():p([],{});return this.passthroughs=[]},f.$$arity=-3);a.def(c,"$block?",k=function(){return this.$raise(q("::","NotImplementedError"))},k.$$arity=0);a.def(c,"$inline?",h=function(){return this.$raise(q("::","NotImplementedError"))},h.$$arity=0);a.def(c,"$converter",v=function(){return this.document.$converter()}, -v.$$arity=0);a.def(c,"$parent=",A=function(a){var b;return b=[a,a.$document()],this.parent=b[0],this.document=b[1],b},A.$$arity=1);a.def(c,"$attr",u=function(a,b,c){var e,d,f,k;null==b&&(b=m);null==c&&(c=m);return r(e=this.attributes["$[]"](a.$to_s()))?e:r(d=r(f=r(k=c)?this.parent:k)?this.document.$attributes()["$[]"]((c["$=="](!0)?a:c).$to_s()):f)?d:b},u.$$arity=-2);a.def(c,"$attr?",x=function(a,b,c){var e,d;null==b&&(b=m);null==c&&(c=m);return r(b)?b["$=="](r(e=this.attributes["$[]"](a.$to_s()))? -e:r(r(d=c)?this.parent:d)?this.document.$attributes()["$[]"]((c["$=="](!0)?a:c).$to_s()):m):r(e=this.attributes["$key?"](a.$to_s()))?e:r(r(d=c)?this.parent:d)?this.document.$attributes()["$key?"]((c["$=="](!0)?a:c).$to_s()):!1},x.$$arity=-2);a.def(c,"$set_attr",E=function(c,e,d){null==e&&(e="");null==d&&(d=!0);if(r(d["$=="](!1)?this.attributes["$key?"](c):d["$=="](!1)))return!1;c=[c,e];t(this.attributes,"[]=",a.to_a(c));c[b(c.length,1)];return!0},E.$$arity=-2);a.def(c,"$remove_attr",M=function(a){return this.attributes.$delete(a)}, -M.$$arity=1);a.def(c,"$option?",N=function(a){return r(this.attributes["$[]"](""+a+"-option"))?!0:!1},N.$$arity=1);a.def(c,"$set_option",y=function(c){c=[""+c+"-option",""];t(this.attributes,"[]=",a.to_a(c));c[b(c.length,1)];return m},y.$$arity=1);a.def(c,"$enabled_options",C=function(){var a;return t(q("::","Set").$new(),"tap",[],(a=function(c){var e=a.$$s||this,d;null==e.attributes&&(e.attributes=m);null==c&&(c=m);return t(e.attributes,"each_key",[],(d=function(a){null==a&&(a=m);return r(a.$to_s()["$end_with?"]("-option"))? -c["$<<"](a.$slice(0,b(a.$length(),7))):m},d.$$s=e,d.$$arity=1,d))},a.$$s=this,a.$$arity=1,a))},C.$$arity=0);a.def(c,"$update_attributes",D=function(a){return this.attributes.$update(a)},D.$$arity=1);a.def(c,"$role",S=function(){return this.attributes["$[]"]("role")},S.$$arity=0);a.def(c,"$roles",B=function(){var a;return r(a=this.attributes["$[]"]("role"))?a.$split():[]},B.$$arity=0);a.def(c,"$role?",G=function(a){null==a&&(a=m);return r(a)?a["$=="](this.attributes["$[]"]("role")):this.attributes["$key?"]("role")}, -G.$$arity=-1);a.def(c,"$has_role?",H=function(a){var b;return r(b=this.attributes["$[]"]("role"))?(" "+b+" ")["$include?"](" "+a+" "):!1},H.$$arity=1);a.def(c,"$role=",sa=function(c){c=["role",r(q("::","Array")["$==="](c))?c.$join(" "):c];t(this.attributes,"[]=",a.to_a(c));return c[b(c.length,1)]},sa.$$arity=1);a.def(c,"$add_role",V=function(c){var e;if(r(e=this.attributes["$[]"]("role"))){if(r((" "+e+" ")["$include?"](" "+c+" ")))return!1;c=["role",""+e+" "+c];t(this.attributes,"[]=",a.to_a(c)); -c[b(c.length,1)];return!0}c=["role",c];t(this.attributes,"[]=",a.to_a(c));c[b(c.length,1)];return!0},V.$$arity=1);a.def(c,"$remove_role",ma=function(c){var e,d=m;return r(r(e=d=this.attributes["$[]"]("role"))?(d=d.$split()).$delete(c):e)?(r(d["$empty?"]())?this.attributes.$delete("role"):(c=["role",d.$join(" ")],t(this.attributes,"[]=",a.to_a(c)),c[b(c.length,1)]),!0):!1},ma.$$arity=1);a.def(c,"$reftext",ca=function(){var a;return r(a=this.attributes["$[]"]("reftext"))?this.$apply_reftext_subs(a): -m},ca.$$arity=0);a.def(c,"$reftext?",J=function(){return this.attributes["$key?"]("reftext")},J.$$arity=0);a.def(c,"$icon_uri",la=function(a){r(this["$attr?"]("icon"))?(a=this.$attr("icon"),r(l(d,"Helpers")["$extname?"](a))||(a=""+a+"."+this.document.$attr("icontype","png"))):a=""+a+"."+this.document.$attr("icontype","png");return this.$image_uri(a,"iconsdir")},la.$$arity=1);a.def(c,"$image_uri",ba=function(a,b){var c,e,f,k,p=m,h=m;null==b&&(b="imagesdir");return r(r(c=g((p=this.document).$safe(), -q(l(d,"SafeMode"),"SECURE")))?p["$attr?"]("data-uri"):c)?r(r(c=r(e=l(d,"Helpers")["$uriish?"](a))?a=l(d,"Helpers").$encode_spaces_in_uri(a):e)?c:r(e=r(f=r(k=b)?h=p.$attr(b):k)?l(d,"Helpers")["$uriish?"](h):f)?a=this.$normalize_web_path(a,h,!1):e)?r(p["$attr?"]("allow-uri-read"))?this.$generate_data_uri_from_uri(a,p["$attr?"]("cache-uri")):a:this.$generate_data_uri(a,b):this.$normalize_web_path(a,r(b)?p.$attr(b):m)},ba.$$arity=-2);a.def(c,"$media_uri",aa=function(a,b){null==b&&(b="imagesdir");return this.$normalize_web_path(a, -r(b)?this.document.$attr(b):m)},aa.$$arity=-2);a.def(c,"$generate_data_uri",na=function(a,b){var c=m;null==b&&(b=m);var e=r(c=l(d,"Helpers").$extname(a,m))?c["$=="](".svg")?"image/svg+xml":"image/"+c.$slice(1,c.$length()):"application/octet-stream";a=r(b)?this.$normalize_system_path(a,this.document.$attr(b),m,p(["target_name"],{target_name:"image"})):this.$normalize_system_path(a);if(r(q("::","File")["$readable?"](a)))return"data:"+e+";base64,"+q("::","Base64").$strict_encode64(q("::","File").$binread(a)); -this.$logger().$warn("image to embed not found or not readable: "+a);return"data:"+e+";base64,"},na.$$arity=-2);a.def(c,"$generate_data_uri_from_uri",I=function(b,c){var e,f=m,k=m;null==c&&(c=!1);r(c)?l(d,"Helpers").$require_library("open-uri/cached","open-uri-cached"):r(l(d,"RUBY_ENGINE_OPAL")["$!"]())&&q("::","OpenURI");try{var g=t(q("::","OpenURI"),"open_uri",[b,l(d,"URI_READ_MODE")],(e=function(a){null==a&&(a=m);return[a.$content_type(),a.$read()]},e.$$s=this,e.$$arity=1,e));var p=a.to_ary(g); -f=null==p[0]?m:p[0];k=null==p[1]?m:p[1];g;return"data:"+f+";base64,"+q("::","Base64").$strict_encode64(k)}catch(Qa){if(a.rescue(Qa,[l(d,"StandardError")]))try{return this.$logger().$warn("could not retrieve image data from URI: "+b),b}finally{a.pop_exception()}else throw Qa;}},I.$$arity=-2);a.def(c,"$normalize_asset_path",O=function(a,b,c){null==b&&(b="path");null==c&&(c=!0);return this.$normalize_system_path(a,this.document.$base_dir(),m,p(["target_name","recover"],{target_name:b,recover:c}))},O.$$arity= --2);a.def(c,"$normalize_system_path",P=function(a,b,c,e){var f;null==b&&(b=m);null==c&&(c=m);null==e&&(e=p([],{}));r(g((f=this.document).$safe(),q(l(d,"SafeMode"),"SAFE")))?r(b)?r(f.$path_resolver()["$root?"](b))||(b=q("::","File").$join(f.$base_dir(),b)):b=f.$base_dir():(r(b)||(b=f.$base_dir()),r(c)||(c=f.$base_dir()));return f.$path_resolver().$system_path(a,b,c,e)},P.$$arity=-2);a.def(c,"$normalize_web_path",R=function(a,b,c){var e;null==b&&(b=m);null==c&&(c=!0);return r(r(e=c)?l(d,"Helpers")["$uriish?"](a): -e)?l(d,"Helpers").$encode_spaces_in_uri(a):this.document.$path_resolver().$web_path(a,b)},R.$$arity=-2);a.def(c,"$read_asset",ka=function(a,b){var c;null==b&&(b=p([],{}));r(q("::","Hash")["$==="](b))||(b=p(["warn_on_failure"],{warn_on_failure:b["$!="](!1)}));if(r(q("::","File")["$readable?"](a)))return r(b["$[]"]("normalize"))?l(d,"Helpers").$prepare_source_string(q("::","File").$read(a,p(["mode"],{mode:l(d,"FILE_READ_MODE")}))).$join(l(d,"LF")):q("::","File").$read(a,p(["mode"],{mode:l(d,"FILE_READ_MODE")})); -r(b["$[]"]("warn_on_failure"))&&this.$logger().$warn(""+(r(c=this.$attr("docfile"))?c:"<stdin>")+": "+(r(c=b["$[]"]("label"))?c:"file")+" does not exist or cannot be read: "+a);return m},ka.$$arity=-2);a.def(c,"$read_contents",wa=function(b,c){var e,f,k,g,h,v=m,z=m,n=m;null==c&&(c=p([],{}));v=this.document;if(r(r(e=l(d,"Helpers")["$uriish?"](b))?e:r(f=r(k=z=c["$[]"]("start"))?l(d,"Helpers")["$uriish?"](z):k)?b=v.$path_resolver().$web_path(b,z):f))if(r(v["$attr?"]("allow-uri-read"))){r(v["$attr?"]("cache-uri"))&& -l(d,"Helpers").$require_library("open-uri/cached","open-uri-cached");try{n=r(c["$[]"]("normalize"))?l(d,"Helpers").$prepare_source_string(t(q("::","OpenURI"),"open_uri",[b,l(d,"URI_READ_MODE")],(g=function(a){null==a&&(a=m);return a.$read()},g.$$s=this,g.$$arity=1,g))).$join(l(d,"LF")):t(q("::","OpenURI"),"open_uri",[b,l(d,"URI_READ_MODE")],(h=function(a){null==a&&(a=m);return a.$read()},h.$$s=this,h.$$arity=1,h))}catch(Ka){if(a.rescue(Ka,[l(d,"StandardError")]))try{r(c.$fetch("warn_on_failure",!0))&& -this.$logger().$warn("could not retrieve contents of "+(r(e=c["$[]"]("label"))?e:"asset")+" at URI: "+b)}finally{a.pop_exception()}else throw Ka;}}else r(c.$fetch("warn_on_failure",!0))&&this.$logger().$warn("cannot retrieve contents of "+(r(e=c["$[]"]("label"))?e:"asset")+" at URI: "+b+" (allow-uri-read attribute not enabled)");else b=this.$normalize_system_path(b,c["$[]"]("start"),m,p(["target_name"],{target_name:r(e=c["$[]"]("label"))?e:"asset"})),n=this.$read_asset(b,p(["normalize","warn_on_failure", -"label"],{normalize:c["$[]"]("normalize"),warn_on_failure:c.$fetch("warn_on_failure",!0),label:c["$[]"]("label")}));r(r(e=r(f=n)?c["$[]"]("warn_if_empty"):f)?n["$empty?"]():e)&&this.$logger().$warn("contents of "+(r(e=c["$[]"]("label"))?e:"asset")+" is empty: "+b);return n},wa.$$arity=-2);return(a.def(c,"$is_uri?",da=function(a){return l(d,"Helpers")["$uriish?"](a)},da.$$arity=1),m)&&"is_uri?"})(d[0],null,d)}(h[0],h)};Opal.modules["asciidoctor/abstract_block"]=function(a){function b(a,b){return"number"=== -typeof a&&"number"===typeof b?a-b:a["$-"](b)}function g(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}var m=[],h=a.nil,q=a.const_get_qualified,l=a.const_get_relative,c=a.module,n=a.klass,p=a.hash2,r=a.send,t=a.truthy;a.add_stubs("$attr_reader $attr_writer $attr_accessor $== $=== $level $file $lineno $playback_attributes $convert $converter $join $map $to_s $parent $parent= $- $<< $empty? $> $Integer $find_by_internal $to_proc $context $[] $items $+ $find_index $include? $next_adjacent_block $blocks $select $sub_specialchars $match? $sub_replacements $title $apply_title_subs $delete $reftext $! $nil_or_empty? $sub_placeholder $sub_quotes $compat_mode $attributes $chomp $increment_and_store_counter $index= $numbered $sectname $counter $numeral= $numeral $caption= $int_to_roman $each $assign_numeral $reindex_sections $protected $has_role? $raise $header? $!= $flatten $head $rows $merge $body $foot $style $inner_document".split(" ")); -return function(d,e){d=[c(d,"Asciidoctor")].concat(e);(function(c,$super,e){c=n(c,$super,"AbstractBlock");var d=[c].concat(e),f,k,m,v,A,u,x,E,M,N,y,C,D,B,S,G,H,sa,V,ma,ca,J,la,ba,aa,na,I,O,P,R;c.$$prototype.source_location=c.$$prototype.document=c.$$prototype.attributes=c.$$prototype.blocks=c.$$prototype.next_section_index=c.$$prototype.numeral=c.$$prototype.context=c.$$prototype.parent=c.$$prototype.caption=c.$$prototype.style=c.$$prototype.converted_title=c.$$prototype.title=c.$$prototype.subs= -c.$$prototype.next_section_ordinal=c.$$prototype.id=c.$$prototype.header=h;c.$attr_reader("blocks");c.$attr_writer("caption");c.$attr_accessor("content_model");c.$attr_accessor("level");c.$attr_accessor("numeral");c.$attr_accessor("source_location");c.$attr_accessor("style");c.$attr_reader("subs");a.def(c,"$initialize",f=function(b,c,e){var g,k=f.$$p,m;k&&(f.$$p=null);var q=0;var v=arguments.length;for(m=Array(v);q<v;q++)m[q]=arguments[q];null==e&&(e=p([],{}));r(this,a.find_super_dispatcher(this, -"initialize",f,!1),m,k);this.content_model="compound";this.blocks=[];this.subs=[];this.id=this.title=this.caption=this.numeral=this.style=this.default_subs=this.source_location=h;return t(t(g=c["$=="]("document"))?g:c["$=="]("section"))?(this.level=this.next_section_index=0,this.next_section_ordinal=1):t(l(d,"AbstractBlock")["$==="](b))?this.level=b.$level():this.level=h},f.$$arity=-3);a.def(c,"$block?",k=function(){return!0},k.$$arity=0);a.def(c,"$inline?",m=function(){return!1},m.$$arity=0);a.def(c, -"$file",v=function(){var a;return t(a=this.source_location)?this.source_location.$file():a},v.$$arity=0);a.def(c,"$lineno",A=function(){var a;return t(a=this.source_location)?this.source_location.$lineno():a},A.$$arity=0);a.def(c,"$convert",u=function(){this.document.$playback_attributes(this.attributes);return this.$converter().$convert(this)},u.$$arity=0);a.alias(c,"render","convert");a.def(c,"$content",x=function(){var a;return r(this.blocks,"map",[],(a=function(a){null==a&&(a=h);return a.$convert()}, -a.$$s=this,a.$$arity=1,a)).$join(l(d,"LF"))},x.$$arity=0);a.def(c,"$context=",E=function(a){return this.node_name=(this.context=a).$to_s()},E.$$arity=1);a.def(c,"$<<",M=function(c){if(!c.$parent()["$=="](this)){var e=[this];r(c,"parent=",a.to_a(e));e[b(e.length,1)]}this.blocks["$<<"](c);return this},M.$$arity=1);a.alias(c,"append","<<");a.def(c,"$blocks?",N=function(){return t(this.blocks["$empty?"]())?!1:!0},N.$$arity=0);a.def(c,"$sections?",y=function(){var a=this.next_section_index;return"number"=== -typeof a?0<a:a["$>"](0)},y.$$arity=0);a.def(c,"$number",C=function(){try{return this.$Integer(this.numeral)}catch(ka){if(a.rescue(ka,[l(d,"StandardError")]))try{return this.numeral}finally{a.pop_exception()}else throw ka;}},C.$$arity=0);a.def(c,"$number=",D=function(a){return this.numeral=a.$to_s()},D.$$arity=1);a.def(c,"$find_by",B=function(b){var c=B.$$p,e=c||h,d=h;c&&(B.$$p=null);c&&(B.$$p=null);null==b&&(b=p([],{}));try{return r(this,"find_by_internal",[b,d=[]],e.$to_proc())}catch(Ca){if(a.rescue(Ca, -[q("::","StopIteration")]))try{return d}finally{a.pop_exception()}else throw Ca;}},B.$$arity=-1);a.alias(c,"query","find_by");a.def(c,"$next_adjacent_block",S=function(){var a,b=h,c=h;return this.context["$=="]("document")?h:t((b=this.parent).$context()["$=="]("dlist")?this.context["$=="]("list_item"):(b=this.parent).$context()["$=="]("dlist"))?t(c=b.$items()["$[]"](g(r(b.$items(),"find_index",[],(a=function(b,c){var e=a.$$s||this,d;null==b&&(b=h);null==c&&(c=h);return t(d=b["$include?"](e))?d:c["$=="](e)}, -a.$$s=this,a.$$arity=2,a)),1)))?c:b.$next_adjacent_block():t(c=b.$blocks()["$[]"](g(b.$blocks().$find_index(this),1)))?c:b.$next_adjacent_block()},S.$$arity=0);a.def(c,"$sections",G=function(){var a;return r(this.blocks,"select",[],(a=function(a){null==a&&(a=h);return a.$context()["$=="]("section")},a.$$s=this,a.$$arity=1,a))},G.$$arity=0);a.def(c,"$alt",H=function(){var a;if(t(a=this.attributes["$[]"]("alt"))){if(a["$=="](this.attributes["$[]"]("default-alt")))return this.$sub_specialchars(a);a= -this.$sub_specialchars(a);return t(l(d,"ReplaceableTextRx")["$match?"](a))?this.$sub_replacements(a):a}return""},H.$$arity=0);a.def(c,"$caption",sa=function(){return this.context["$=="]("admonition")?this.attributes["$[]"]("textlabel"):this.caption},sa.$$arity=0);a.def(c,"$captioned_title",V=function(){return""+this.caption+this.$title()},V.$$arity=0);a.def(c,"$list_marker_keyword",ma=function(a){var b;null==a&&(a=h);return l(d,"ORDERED_LIST_KEYWORDS")["$[]"](t(b=a)?b:this.style)},ma.$$arity=-1); -a.def(c,"$title",ca=function(){var a,b;return this.converted_title=t(a=this.converted_title)?a:t(b=this.title)?this.$apply_title_subs(this.title):b},ca.$$arity=0);a.def(c,"$title?",J=function(){return t(this.title)?!0:!1},J.$$arity=0);a.def(c,"$title=",la=function(a){this.converted_title=h;return this.title=a},la.$$arity=1);a.def(c,"$sub?",ba=function(a){return this.subs["$include?"](a)},ba.$$arity=1);a.def(c,"$remove_sub",aa=function(a){this.subs.$delete(a);return h},aa.$$arity=1);a.def(c,"$xreftext", -na=function(a){var b,c,e=h,f=h,g=h;null==a&&(a=h);t(t(b=e=this.$reftext())?e["$empty?"]()["$!"]():b)?b=e:(t(t(b=t(c=a)?this.title:c)?this.caption["$nil_or_empty?"]()["$!"]():b)?"full"["$==="](a)?(a=this.$sub_placeholder(this.$sub_quotes(t(this.document.$compat_mode())?"``%s''":'"`%s`"'),this.$title()),a=t(t(b=t(c=this.numeral)?f=l(d,"CAPTION_ATTRIBUTE_NAMES")["$[]"](this.context):c)?g=this.document.$attributes()["$[]"](f):b)?""+g+" "+this.numeral+", "+a:""+this.caption.$chomp(". ")+", "+a):a="short"["$==="](a)? -t(t(b=t(c=this.numeral)?f=l(d,"CAPTION_ATTRIBUTE_NAMES")["$[]"](this.context):c)?g=this.document.$attributes()["$[]"](f):b)?""+g+" "+this.numeral:this.caption.$chomp(". "):this.$title():a=this.$title(),b=a);return b},na.$$arity=-1);a.def(c,"$assign_caption",I=function(a,b){var c,e,f=h,g=h;null==b&&(b=this.context);!t(t(c=t(e=this.caption)?e:this.title["$!"]())?c:this.caption=t(e=a)?e:this.document.$attributes()["$[]"]("caption"))&&t(t(c=f=l(d,"CAPTION_ATTRIBUTE_NAMES")["$[]"](b))?g=this.document.$attributes()["$[]"](f): -c)&&(this.caption=""+g+" "+(this.numeral=this.document.$increment_and_store_counter(""+b+"-number",this))+". ");return h},I.$$arity=-2);a.def(c,"$assign_numeral",O=function(c){var e,f=h,k,p=h;this.next_section_index=g((f=[this.next_section_index],r(c,"index=",a.to_a(f)),f[b(f.length,1)]),1);t(f=c.$numbered())&&((k=c.$sectname())["$=="]("appendix")?(f=[this.document.$counter("appendix-number","A")],r(c,"numeral=",a.to_a(f)),f[b(f.length,1)],f=[t(p=this.document.$attributes()["$[]"]("appendix-caption"))? -""+p+" "+c.$numeral()+": ":""+c.$numeral()+". "],r(c,"caption=",a.to_a(f)),f[b(f.length,1)]):t(t(e=k["$=="]("chapter"))?e:f["$=="]("chapter"))?(f=[this.document.$counter("chapter-number",1).$to_s()],r(c,"numeral=",a.to_a(f)),f[b(f.length,1)]):(f=[k["$=="]("part")?l(d,"Helpers").$int_to_roman(this.next_section_ordinal):this.next_section_ordinal.$to_s()],r(c,"numeral=",a.to_a(f)),f[b(f.length,1)],this.next_section_ordinal=g(this.next_section_ordinal,1)));return h},O.$$arity=1);a.def(c,"$reindex_sections", -P=function(){var a;this.next_section_index=0;this.next_section_ordinal=1;return r(this.blocks,"each",[],(a=function(b){var c=a.$$s||this;null==b&&(b=h);return b.$context()["$=="]("section")?(c.$assign_numeral(b),b.$reindex_sections()):h},a.$$s=this,a.$$arity=1,a))},P.$$arity=0);c.$protected();return(a.def(c,"$find_by_internal",R=function(b,c){var e=R.$$p,d=e||h,f,k,l,m,v,z,n,A,U,u,x=h,E=h,T=h,M=h,N=h,V=h;V=h;e&&(R.$$p=null);e&&(R.$$p=null);null==b&&(b=p([],{}));null==c&&(c=[]);if(t(t(f=t(k=t(l=t(m= -x=t(E=b["$[]"]("context"))?h:!0)?m:E["$=="](this.context))?t(m=(T=b["$[]"]("style"))["$!"]())?m:T["$=="](this.style):l)?t(l=(M=b["$[]"]("role"))["$!"]())?l:this["$has_role?"](M):k)?t(k=(N=b["$[]"]("id"))["$!"]())?k:N["$=="](this.id):f))if(d!==h)if(t(V=a.yield1(d,this))){if("prune"["$==="](V))return c["$<<"](this),t(N)&&this.$raise(q("::","StopIteration")),c;if("reject"["$==="](V))return t(N)&&this.$raise(q("::","StopIteration")),c;"stop"["$==="](V)?this.$raise(q("::","StopIteration")):(c["$<<"](this), -t(N)&&this.$raise(q("::","StopIteration")))}else t(N)&&this.$raise(q("::","StopIteration"));else c["$<<"](this),t(N)&&this.$raise(q("::","StopIteration"));V=this.context;"document"["$==="](V)?E["$=="]("document")||(t(t(f=this["$header?"]())?t(k=x)?k:E["$=="]("section"):f)&&r(this.header,"find_by_internal",[b,c],d.$to_proc()),r(this.blocks,"each",[],(v=function(a){null==a&&(a=h);return t(E["$=="]("section")?a.$context()["$!="]("section"):E["$=="]("section"))?h:r(a,"find_by_internal",[b,c],d.$to_proc())}, -v.$$s=this,v.$$arity=1,v))):"dlist"["$==="](V)?t(t(f=x)?f:E["$!="]("section"))&&r(this.blocks.$flatten(),"each",[],(z=function(a){null==a&&(a=h);return t(a)?r(a,"find_by_internal",[b,c],d.$to_proc()):h},z.$$s=this,z.$$arity=1,z)):"table"["$==="](V)?t(b["$[]"]("traverse_documents"))?(r(this.$rows().$head(),"each",[],(n=function(a){var e=n.$$s||this,f;null==a&&(a=h);return r(a,"each",[],(f=function(a){null==a&&(a=h);return r(a,"find_by_internal",[b,c],d.$to_proc())},f.$$s=e,f.$$arity=1,f))},n.$$s=this, -n.$$arity=1,n)),E["$=="]("inner_document")&&(b=b.$merge(p(["context"],{context:"document"}))),r(g(this.$rows().$body(),this.$rows().$foot()),"each",[],(A=function(a){var e=A.$$s||this,f;null==a&&(a=h);return r(a,"each",[],(f=function(a){null==a&&(a=h);r(a,"find_by_internal",[b,c],d.$to_proc());return a.$style()["$=="]("asciidoc")?r(a.$inner_document(),"find_by_internal",[b,c],d.$to_proc()):h},f.$$s=e,f.$$arity=1,f))},A.$$s=this,A.$$arity=1,A))):r(g(g(this.$rows().$head(),this.$rows().$body()),this.$rows().$foot()), -"each",[],(U=function(a){var e=U.$$s||this,f;null==a&&(a=h);return r(a,"each",[],(f=function(a){null==a&&(a=h);return r(a,"find_by_internal",[b,c],d.$to_proc())},f.$$s=e,f.$$arity=1,f))},U.$$s=this,U.$$arity=1,U)):r(this.blocks,"each",[],(u=function(a){null==a&&(a=h);return t(E["$=="]("section")?a.$context()["$!="]("section"):E["$=="]("section"))?h:r(a,"find_by_internal",[b,c],d.$to_proc())},u.$$s=this,u.$$arity=1,u));return c},R.$$arity=-1),h)&&"find_by_internal"})(d[0],l(d,"AbstractNode"),d)}(m[0], -m)};Opal.modules["asciidoctor/attribute_list"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}function g(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}var h=[],m=a.nil,q=a.const_get_qualified,l=a.const_get_relative,c=a.module,r=a.klass,p=a.hash,n=a.hash2,t=a.truthy,k=a.send;a.add_stubs("$new $[] $update $parse $parse_attribute $eos? $skip_delimiter $+ $rekey $each_with_index $[]= $- $private $skip_blank $peek $=== $parse_attribute_value $get_byte $start_with? $scan_name $end_with? $rstrip $string $== $unscan $scan_to_delimiter $* $include? $delete $each $split $empty? $apply_subs $scan_to_quote $gsub $skip $scan".split(" ")); -return function(e,d){e=[c(e,"Asciidoctor")].concat(d);(function(c,$super,e){c=r(c,$super,"AttributeList");var d=[c].concat(e),f,h,v,A,u,x,E,M,N,X,y,C;c.$$prototype.attributes=c.$$prototype.scanner=c.$$prototype.delimiter=c.$$prototype.block=c.$$prototype.delimiter_skip_pattern=c.$$prototype.delimiter_boundary_pattern=m;a.const_set(d[0],"APOS","'");a.const_set(d[0],"BACKSLASH","\\");a.const_set(d[0],"QUOT",'"');a.const_set(d[0],"BoundaryRx",p(l(d,"QUOT"),/.*?[^\\](?=")/,l(d,"APOS"),/.*?[^\\](?=')/, -",",/.*?(?=[ \t]*(,|$))/));a.const_set(d[0],"EscapedQuotes",p(l(d,"QUOT"),'\\"',l(d,"APOS"),"\\'"));a.const_set(d[0],"NameRx",new RegExp(""+l(d,"CG_WORD")+"["+l(d,"CC_WORD")+"\\-.]*"));a.const_set(d[0],"BlankRx",/[ \t]+/);a.const_set(d[0],"SkipRx",n([","],{",":/[ \t]*(,|$)/}));a.def(c,"$initialize",f=function(a,b,c){null==b&&(b=m);null==c&&(c=",");this.scanner=q("::","StringScanner").$new(a);this.block=b;this.delimiter=c;this.delimiter_skip_pattern=l(d,"SkipRx")["$[]"](c);this.delimiter_boundary_pattern= -l(d,"BoundaryRx")["$[]"](c);return this.attributes=m},f.$$arity=-2);a.def(c,"$parse_into",h=function(a,b){null==b&&(b=[]);return a.$update(this.$parse(b))},h.$$arity=-2);a.def(c,"$parse",v=function(a){var c;null==a&&(a=[]);if(t(this.attributes))return this.attributes;this.attributes=n([],{});for(c=0;t(this.$parse_attribute(c,a))&&!t(this.scanner["$eos?"]());)this.$skip_delimiter(),c=b(c,1);return this.attributes},v.$$arity=-1);a.def(c,"$rekey",A=function(a){return l(d,"AttributeList").$rekey(this.attributes, -a)},A.$$arity=1);a.defs(c,"$rekey",u=function(c,e){var d;k(e,"each_with_index",[],(d=function(e,d){var f,p=m;null==e&&(e=m);null==d&&(d=m);return t(t(f=e)?p=c["$[]"](b(d,1)):f)?(e=[e,p],k(c,"[]=",a.to_a(e)),e[g(e.length,1)]):m},d.$$s=this,d.$$arity=2,d));return c},u.$$arity=2);c.$private();a.def(c,"$parse_attribute",x=function(c,e){var f,p,h,q=m,v=m,z=m,r=m,n=v=m,A=m;n=n=m;q=!0;this.$skip_blank();v=this.scanner.$peek(1);if(l(d,"QUOT")["$==="](v))z=this.$parse_attribute_value(this.scanner.$get_byte()); -else if(l(d,"APOS")["$==="](v))z=this.$parse_attribute_value(this.scanner.$get_byte()),t(z["$start_with?"](l(d,"APOS")))||(r=!0);else if(v=t(f=t(p=z=this.$scan_name())?this.$skip_blank():p)?f:0,t(this.scanner["$eos?"]())){if(!t(t(f=z)?f:this.scanner.$string().$rstrip()["$end_with?"](this.delimiter)))return m;q=m}else if((n=this.scanner.$get_byte())["$=="](this.delimiter))this.scanner.$unscan();else if(t(z))if(n["$=="]("="))if(this.$skip_blank(),v=n=this.scanner.$get_byte(),l(d,"QUOT")["$==="](v))A= -this.$parse_attribute_value(n);else if(l(d,"APOS")["$==="](v))A=this.$parse_attribute_value(n),t(A["$start_with?"](l(d,"APOS")))||(r=!0);else if(this.delimiter["$==="](v))A="",this.scanner.$unscan();else if(m["$==="](v))A="";else{if(A=""+n+this.$scan_to_delimiter(),A["$=="]("None"))return!0}else z=""+z+" "["$*"](v)+n+this.$scan_to_delimiter();else z=""+n+this.$scan_to_delimiter();t(A)?(v=z,"options"["$==="](v)||"opts"["$==="](v)?t(A["$include?"](","))?(t(A["$include?"](" "))&&(A=A.$delete(" ")),k(A.$split(","), -"each",[],(h=function(b){var c=h.$$s||this;null==c.attributes&&(c.attributes=m);null==b&&(b=m);if(t(b["$empty?"]()))return m;b=[""+b+"-option",""];k(c.attributes,"[]=",a.to_a(b));return b[g(b.length,1)]},h.$$s=this,h.$$arity=1,h))):t(A["$empty?"]())||(n=[""+A+"-option",""],k(this.attributes,"[]=",a.to_a(n)),n[g(n.length,1)]):(t(t(f=r)?this.block:f)?(v=z,n="title"["$==="](v)||"reftext"["$==="](v)?[z,A]:[z,this.block.$apply_subs(A)]):n=[z,A],k(this.attributes,"[]=",a.to_a(n)),n[g(n.length,1)])):(t(t(f= -r)?this.block:f)&&(z=this.block.$apply_subs(z)),t(t(f=n=e["$[]"](c))?z:f)&&(n=[n,z],k(this.attributes,"[]=",a.to_a(n)),n[g(n.length,1)]),n=[b(c,1),z],k(this.attributes,"[]=",a.to_a(n)),n[g(n.length,1)]);return q},x.$$arity=2);a.def(c,"$parse_attribute_value",E=function(a){var b;return this.scanner.$peek(1)["$=="](a)?(this.scanner.$get_byte(),""):t(b=this.$scan_to_quote(a))?(this.scanner.$get_byte(),t(b["$include?"](l(d,"BACKSLASH")))?b.$gsub(l(d,"EscapedQuotes")["$[]"](a),a):b):""+a+this.$scan_to_delimiter()}, -E.$$arity=1);a.def(c,"$skip_blank",M=function(){return this.scanner.$skip(l(d,"BlankRx"))},M.$$arity=0);a.def(c,"$skip_delimiter",N=function(){return this.scanner.$skip(this.delimiter_skip_pattern)},N.$$arity=0);a.def(c,"$scan_name",X=function(){return this.scanner.$scan(l(d,"NameRx"))},X.$$arity=0);a.def(c,"$scan_to_delimiter",y=function(){return this.scanner.$scan(this.delimiter_boundary_pattern)},y.$$arity=0);return(a.def(c,"$scan_to_quote",C=function(a){return this.scanner.$scan(l(d,"BoundaryRx")["$[]"](a))}, -C.$$arity=1),m)&&"scan_to_quote"})(e[0],null,e)}(h[0],h)};Opal.modules["asciidoctor/block"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}var g=[],h=a.nil,m=a.const_get_qualified,q=a.const_get_relative,l=a.module,c=a.klass,n=a.send,p=a.hash2,r=a.truthy;a.add_stubs("$default= $- $attr_accessor $[] $key? $== $=== $drop $delete $[]= $commit_subs $nil_or_empty? $prepare_source_string $apply_subs $join $< $size $empty? $rstrip $shift $pop $warn $logger $to_s $class $object_id $inspect".split(" ")); -return function(d,g){d=[l(d,"Asciidoctor")].concat(g);(function(e,$super,d){e=c(e,$super,"Block");var g=[e].concat(d),k,l,v,t;d=h;e.$$prototype.attributes=e.$$prototype.content_model=e.$$prototype.lines=e.$$prototype.subs=e.$$prototype.blocks=e.$$prototype.context=e.$$prototype.style=h;d=["simple"];n(a.const_set(g[0],"DEFAULT_CONTENT_MODEL",p("audio image listing literal stem open page_break pass thematic_break video".split(" "),{audio:"empty",image:"empty",listing:"verbatim",literal:"verbatim",stem:"raw", -open:"compound",page_break:"empty",pass:"raw",thematic_break:"empty",video:"empty"})),"default=",a.to_a(d));d[b(d.length,1)];a.alias(e,"blockname","context");e.$attr_accessor("lines");a.def(e,"$initialize",k=function(c,e,d){var l,v=k.$$p,z,t;v&&(k.$$p=null);var A=0;var u=arguments.length;for(t=Array(u);A<u;A++)t[A]=arguments[A];null==d&&(d=p([],{}));n(this,a.find_super_dispatcher(this,"initialize",k,!1),t,v);this.content_model=r(l=d["$[]"]("content_model"))?l:q(g,"DEFAULT_CONTENT_MODEL")["$[]"](e); -r(d["$key?"]("subs"))?r(l=d["$[]"]("subs"))?(l["$=="]("default")?this.default_subs=d["$[]"]("default_subs"):r(m("::","Array")["$==="](l))?(this.default_subs=l.$drop(0),this.attributes.$delete("subs")):(this.default_subs=h,l=["subs",""+l],n(this.attributes,"[]=",a.to_a(l)),l[b(l.length,1)]),this.$commit_subs()):(this.default_subs=[],this.attributes.$delete("subs")):this.default_subs=h;return r((z=d["$[]"]("source"))["$nil_or_empty?"]())?this.lines=[]:r(m("::","String")["$==="](z))?this.lines=q(g,"Helpers").$prepare_source_string(z): -this.lines=z.$drop(0)},k.$$arity=-3);a.def(e,"$content",l=function(){var b,c=l.$$p,e=this,d=h,k=h,p=h,m=h,v=h,t=h,A=h;c&&(l.$$p=null);t=0;A=arguments.length;for(v=Array(A);t<A;t++)v[t]=arguments[t];return function(){d=e.content_model;if("compound"["$==="](d))return n(e,a.find_super_dispatcher(e,"content",l,!1),v,c);if("simple"["$==="](d))return e.$apply_subs(e.lines.$join(q(g,"LF")),e.subs);if("verbatim"["$==="](d)||"raw"["$==="](d)){k=e.$apply_subs(e.lines,e.subs);var z=k.$size();z="number"===typeof z? -2>z:z["$<"](2);if(r(z))return k["$[]"](0);for(;r(r(b=p=k["$[]"](0))?p.$rstrip()["$empty?"]():b);)k.$shift();for(;r(r(b=m=k["$[]"](-1))?m.$rstrip()["$empty?"]():b);)k.$pop();return k.$join(q(g,"LF"))}e.content_model["$=="]("empty")||e.$logger().$warn("Unknown content model '"+e.content_model+"' for block: "+e.$to_s());return h}()},l.$$arity=0);a.def(e,"$source",v=function(){return this.lines.$join(q(g,"LF"))},v.$$arity=0);return(a.def(e,"$to_s",t=function(){var a=this.content_model["$=="]("compound")? -"blocks: "+this.blocks.$size():"lines: "+this.lines.$size();return"#<"+this.$class()+"@"+this.$object_id()+" {context: "+this.context.$inspect()+", content_model: "+this.content_model.$inspect()+", style: "+this.style.$inspect()+", "+a+"}>"},t.$$arity=0),h)&&"to_s"})(d[0],q(d,"AbstractBlock"),d)}(g[0],g)};Opal.modules["asciidoctor/callouts"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}function g(a,b){return"number"===typeof a&&"number"===typeof b?a-b: -a["$-"](b)}var h=[],m=a.nil,q=a.module,l=a.klass,c=a.hash2,n=a.truthy,p=a.send;a.add_stubs("$next_list $<< $current_list $to_i $generate_next_callout_id $+ $<= $size $[] $- $chop $join $map $== $< $private $generate_callout_id".split(" "));return function(d,h){d=[q(d,"Asciidoctor")].concat(h);(function(d,$super,f){d=l(d,$super,"Callouts");[d].concat(f);var k,h,q,v,r,t,z,A,u;d.$$prototype.co_index=d.$$prototype.lists=d.$$prototype.list_index=m;a.def(d,"$initialize",k=function(){this.lists=[];this.list_index= -0;return this.$next_list()},k.$$arity=0);a.def(d,"$register",h=function(a){this.$current_list()["$<<"](c(["ordinal","id"],{ordinal:a.$to_i(),id:a=this.$generate_next_callout_id()}));this.co_index=b(this.co_index,1);return a},h.$$arity=1);a.def(d,"$read_next_id",q=function(){var a=m;var c=this.$current_list();var d=this.co_index;var f=c.$size();d="number"===typeof d&&"number"===typeof f?d<=f:d["$<="](f);n(d)&&(a=c["$[]"](g(this.co_index,1))["$[]"]("id"));this.co_index=b(this.co_index,1);return a}, -q.$$arity=0);a.def(d,"$callout_ids",v=function(a){var b;return p(this.$current_list(),"map",[],(b=function(b){null==b&&(b=m);return b["$[]"]("ordinal")["$=="](a)?""+b["$[]"]("id")+" ":""},b.$$s=this,b.$$arity=1,b)).$join().$chop()},v.$$arity=1);a.def(d,"$current_list",r=function(){return this.lists["$[]"](g(this.list_index,1))},r.$$arity=0);a.def(d,"$next_list",t=function(){this.list_index=b(this.list_index,1);var a=this.lists.$size();var c=this.list_index;a="number"===typeof a&&"number"===typeof c? -a<c:a["$<"](c);if(n(a))this.lists["$<<"]([]);this.co_index=1;return m},t.$$arity=0);a.def(d,"$rewind",z=function(){this.co_index=this.list_index=1;return m},z.$$arity=0);d.$private();a.def(d,"$generate_next_callout_id",A=function(){return this.$generate_callout_id(this.list_index,this.co_index)},A.$$arity=0);return(a.def(d,"$generate_callout_id",u=function(a,b){return"CO"+a+"-"+b},u.$$arity=2),m)&&"generate_callout_id"})(d[0],null,d)}(h[0],h)};Opal.modules["asciidoctor/converter"]=function(a){function b(a, -b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}function g(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}var h=[],m=a.nil,q=a.const_get_qualified,l=a.const_get_relative,c=a.module,n=a.hash2,p=a.truthy,r=a.send,t=a.klass,k=a.gvars;a.add_stubs("$autoload $__dir__ $attr_reader $raise $class $[] $sub $slice $length $== $[]= $backend_traits $- $derive_backend_traits $register $map $to_s $new $create $default $each $default= $registry $for $=== $supports_templates? $merge $private $include $delete $clear $private_class_method $send $extend $node_name $+ $receiver $name $warn $logger $respond_to? $content".split(" ")); -return function(e,d){e=[c(e,"Asciidoctor")].concat(d);(function(e,d){e=c(e,"Converter");var f=[e].concat(d),h,v,A,z,u,x;e.$autoload("CompositeConverter",""+e.$__dir__()+"/converter/composite");e.$autoload("TemplateConverter",""+e.$__dir__()+"/converter/template");e.$attr_reader("backend");a.def(e,"$initialize",h=function(a,b){null==b&&n([],{});return this.backend=a},h.$$arity=-2);a.def(e,"$convert",v=function(a,b,c){null==this.backend&&(this.backend=m);return this.$raise(q("::","NotImplementedError"), -""+this.$class()+" (backend: "+this.backend+") must implement the #convert method")},v.$$arity=-2);a.def(e,"$handles?",A=function(a){return!0},A.$$arity=1);a.defs(e,"$derive_backend_traits",z=function(a,b){var c,e,d;null==b&&(b=m);if(!p(a))return n([],{});p(e=l(f,"DEFAULT_EXTENSIONS")["$[]"](b=p(c=b)?c:a.$sub(l(f,"TrailingDigitsRx"),"")))?d=e.$slice(1,e.$length()):e="."+(d=b);return d["$=="]("html")?n(["basebackend","filetype","htmlsyntax","outfilesuffix"],{basebackend:b,filetype:d,htmlsyntax:"html", -outfilesuffix:e}):n(["basebackend","filetype","outfilesuffix"],{basebackend:b,filetype:d,outfilesuffix:e})},z.$$arity=-2);(function(e,d){e=c(e,"BackendTraits");var f=[e].concat(d),g,k,h,q,v,z,t,A,u;a.def(e,"$basebackend",g=function(c){null==c&&(c=m);if(p(c)){var e=["basebackend",c];r(this.$backend_traits(c),"[]=",a.to_a(e));return e[b(e.length,1)]}return this.$backend_traits()["$[]"]("basebackend")},g.$$arity=-1);a.def(e,"$filetype",k=function(c){null==c&&(c=m);return p(c)?(c=["filetype",c],r(this.$backend_traits(), -"[]=",a.to_a(c)),c[b(c.length,1)]):this.$backend_traits()["$[]"]("filetype")},k.$$arity=-1);a.def(e,"$htmlsyntax",h=function(c){null==c&&(c=m);return p(c)?(c=["htmlsyntax",c],r(this.$backend_traits(),"[]=",a.to_a(c)),c[b(c.length,1)]):this.$backend_traits()["$[]"]("htmlsyntax")},h.$$arity=-1);a.def(e,"$outfilesuffix",q=function(c){null==c&&(c=m);return p(c)?(c=["outfilesuffix",c],r(this.$backend_traits(),"[]=",a.to_a(c)),c[b(c.length,1)]):this.$backend_traits()["$[]"]("outfilesuffix")},q.$$arity= --1);a.def(e,"$supports_templates",v=function(c){null==c&&(c=!0);c=["supports_templates",c];r(this.$backend_traits(),"[]=",a.to_a(c));return c[b(c.length,1)]},v.$$arity=-1);a.def(e,"$supports_templates?",z=function(){return this.$backend_traits()["$[]"]("supports_templates")},z.$$arity=0);a.def(e,"$init_backend_traits",t=function(a){var b;null==a&&(a=m);return this.backend_traits=p(b=a)?b:n([],{})},t.$$arity=-1);a.def(e,"$backend_traits",A=function(a){var b;null==this.backend_traits&&(this.backend_traits= -m);null==this.backend&&(this.backend=m);null==a&&(a=m);return this.backend_traits=p(b=this.backend_traits)?b:l(f,"Converter").$derive_backend_traits(this.backend,a)},A.$$arity=-1);a.alias(e,"backend_info","backend_traits");a.defs(e,"$derive_backend_traits",u=function(a,b){null==b&&(b=m);return l(f,"Converter").$derive_backend_traits(a,b)},u.$$arity=-2)})(f[0],f);(function(b,e){b=c(b,"Config");var d=[b].concat(e),f;a.def(b,"$register_for",f=function(b){var c;var e=a.slice.call(arguments,0,arguments.length); -return r(l(d,"Converter"),"register",[this].concat(a.to_a(r(e,"map",[],(c=function(a){null==a&&(a=m);return a.$to_s()},c.$$s=this,c.$$arity=1,c)))))},f.$$arity=-1)})(f[0],f);(function(e,d){e=c(e,"Factory");var f=[e].concat(d),g,k,h,v,z,t,A,u;a.defs(e,"$new",g=function(b,c){var e=a.slice.call(arguments,0,arguments.length);var d=a.extract_kwargs(e);if(null==d)d=n([],{});else if(!d.$$is_hash)throw a.ArgumentError.$new("expected kwargs");if(0<e.length){var g=e[0];e.splice(0,1)}null==g&&(g=m);e=d.$$smap.proxy_default; -null==e&&(e=!0);return p(e)?l(f,"DefaultFactoryProxy").$new(g):l(f,"CustomFactory").$new(g)},g.$$arity=-1);a.defs(e,"$default",k=function(b){a.slice.call(arguments,0,arguments.length);return l(f,"Converter")},k.$$arity=-1);a.defs(e,"$create",h=function(a,b){null==b&&(b=n([],{}));return this.$default().$create(a,b)},h.$$arity=-2);a.def(e,"$register",v=function(c,e){var d;var f=a.slice.call(arguments,1,arguments.length);return r(f,"each",[],(d=function(e){var f=d.$$s||this;null==e&&(e=m);e["$=="]("*")? -(e=[c],r(f.$registry(),"default=",a.to_a(e))):(e=[e,c],r(f.$registry(),"[]=",a.to_a(e)));return e[b(e.length,1)]},d.$$s=this,d.$$arity=1,d))},v.$$arity=-2);a.def(e,"$for",z=function(a){return this.$registry()["$[]"](a)},z.$$arity=1);a.def(e,"$create",t=function(a,b){var c,e,d,g,k=m;null==b&&(b=n([],{}));return p(d=this.$for(a))?(p(q("::","Class")["$==="](d))&&(d=d.$new(a,b)),p(p(c=p(e=g=b["$[]"]("template_dirs"))?l(f,"BackendTraits")["$==="](d):e)?d["$supports_templates?"]():c)?l(f,"CompositeConverter").$new(a, -l(f,"TemplateConverter").$new(a,g,b),d,n(["backend_traits_source"],{backend_traits_source:d})):d):p(g=b["$[]"]("template_dirs"))?p(p(c=k=b["$[]"]("delegate_backend"))?d=this.$for(k):c)?(p(q("::","Class")["$==="](d))&&(d=d.$new(k,b)),l(f,"CompositeConverter").$new(a,l(f,"TemplateConverter").$new(a,g,b),d,n(["backend_traits_source"],{backend_traits_source:d}))):l(f,"TemplateConverter").$new(a,g,b):m},t.$$arity=-2);a.def(e,"$converters",A=function(){return this.$registry().$merge()},A.$$arity=0);e.$private(); -a.def(e,"$registry",u=function(){return this.$raise(q("::","NotImplementedError"),""+l(f,"Factory")+" subclass "+this.$class()+" must implement the #registry method")},u.$$arity=0)})(f[0],f);(function(c,$super,e){c=t(c,$super,"CustomFactory");e=[c].concat(e);var d,f;c.$include(l(e,"Factory"));a.def(c,"$initialize",d=function(c){null==c&&(c=m);if(p(c)){var e=[c.$delete("*")];r(c,"default=",a.to_a(e));e[b(e.length,1)];return this.registry=c}return this.registry=n([],{})},d.$$arity=-1);a.def(c,"$unregister_all", -f=function(){var c=[m];r(this.$registry().$clear(),"default=",a.to_a(c));return c[b(c.length,1)]},f.$$arity=0);c.$private();return c.$attr_reader("registry")})(f[0],null,f);(function(b,e){b=c(b,"DefaultFactory");var d=[b].concat(e),f;b.$include(l(d,"Factory"));b.$private();a.class_variable_set(d[0],"@@registry",n([],{}));a.def(b,"$registry",f=function(){var a;return null==(a=d[0].$$cvars["@@registry"])?m:a},f.$$arity=0);l(d,"RUBY_ENGINE")["$=="]("opal")||m})(f[0],f);(function(a,$super,b){a=t(a,$super, -"DefaultFactoryProxy");b=[a].concat(b);a.$include(l(b,"DefaultFactory"));l(b,"RUBY_ENGINE")["$=="]("opal");return m})(f[0],l(f,"CustomFactory"),f);e.$private_class_method(p(u=(a.defs(e,"$included",x=function(a){a.$send("include",l(f,"BackendTraits"));return a.$extend(l(f,"Config"))},x.$$arity=1),m)&&"included")?u:"included");(function(b,$super,c){b=t(b,$super,"Base");var e=[b].concat(c),d,f,h,v;b.$$prototype.backend=m;b.$include(l(e,"Converter"),l(e,"Logging"));a.def(b,"$convert",d=function(b,c,d){var f, -h,v=m;null==k["!"]&&(k["!"]=m);null==c&&(c=b.$node_name());null==d&&(d=m);try{return p(d)?this.$send(g("convert_",c),b,d):this.$send(g("convert_",c),b)}catch(ca){if(a.rescue(ca,[l(e,"StandardError")]))try{return p(p(f=p(h=q("::","NoMethodError")["$==="](v=k["!"]))?v.$receiver()["$=="](this):h)?v.$name().$to_s()["$=="](c):f)||this.$raise(),this.$logger().$warn("missing convert handler for "+v.$name()+" node in "+this.backend+" backend ("+this.$class()+")"),m}finally{a.pop_exception()}else throw ca; -}},d.$$arity=-2);a.def(b,"$handles?",f=function(a){return this["$respond_to?"]("convert_"+a)},f.$$arity=1);a.def(b,"$content_only",h=function(a){return a.$content()},h.$$arity=1);return(a.def(b,"$skip",v=function(a){return m},v.$$arity=1),m)&&"skip"})(f[0],null,f);e.$extend(l(f,"DefaultFactory"))})(e[0],e)}(h[0],h)};Opal.modules["asciidoctor/document"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}function g(a,b){return"number"===typeof a&&"number"===typeof b? -a>=b:a["$>="](b)}function h(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}function m(a,b){return"number"===typeof a&&"number"===typeof b?a>b:a["$>"](b)}function q(a,b){return"number"===typeof a&&"number"===typeof b?a<b:a["$<"](b)}var l=[],c=a.nil,n=a.const_get_qualified,p=a.const_get_relative,r=a.module,t=a.klass,k=a.send,e=a.truthy,f=a.hash2,u=a.hash,x=a.gvars;a.add_stubs("$new $attr_reader $nil? $<< $[] $[]= $- $include? $strip $squeeze $gsub $empty? $! $rpartition $attr_accessor $delete $base_dir $options $merge $catalog $instance_variable_get $attributes $safe $compat_mode $outfilesuffix $sourcemap $path_resolver $converter $extensions $syntax_highlighter $each $end_with? $start_with? $slice $length $chop $== $downcase $extname $=== $value_for_name $key? $freeze $attribute_undefined $attribute_missing $update $& $keys $name_for_value $expand_path $pwd $>= $+ $abs $to_i $delete_if $update_doctype_attributes $cursor $parse $restore_attributes $update_backend_attributes $fetch $fill_datetime_attributes $activate $groups $create $to_proc $preprocessors? $preprocessors $process_method $tree_processors? $tree_processors $!= $counter $attribute_locked? $nextval $nil_or_empty? $to_s $value $save_to $register $tap $xreftext $source $source_lines $doctitle $sectname= $title= $first_section $title $reftext $> $< $find $context $assign_numeral $clear_playback_attributes $save_attributes $name $negate $rewind $replace $apply_attribute_value_subs $delete? $start $doctype $content_model $warn $logger $content $convert $postprocessors? $postprocessors $record $write $respond_to? $chomp $class $write_alternate_pages $map $split $resolve_docinfo_subs $normalize_system_path $read_asset $apply_subs $docinfo_processors? $join $concat $compact $docinfo_processors $object_id $inspect $size $private $=~ $resolve_pass_subs $apply_header_subs $limit_bytesize $bytesize $valid_encoding? $byteslice $resolve_subs $utc $at $Integer $now $index $strftime $year $utc_offset $partition $create_converter $basebackend $filetype $htmlsyntax $derive_backend_traits $raise".split(" ")); -return function(d,l){d=[r(d,"Asciidoctor")].concat(l);(function(d,$super,l){d=t(d,$super,"Document");var v=[d].concat(l),z,r,A,E,U,T,M,y,C,N,D,X,B,V,G,H,J,S,ia,aa,na,ba,I,O,P,R,wa,da,xa,Ca,ta,Ia,Ga,Ja,Y,Qa,Ra,Da,Ka,Ya,Va,Za,$a,bb,Ua,w,Q,L,Aa,Ta,K,Ea;d.$$prototype.attributes=d.$$prototype.safe=d.$$prototype.sourcemap=d.$$prototype.reader=d.$$prototype.base_dir=d.$$prototype.parsed=d.$$prototype.parent_document=d.$$prototype.extensions=d.$$prototype.options=d.$$prototype.counters=d.$$prototype.catalog= -d.$$prototype.reftexts=d.$$prototype.header=d.$$prototype.blocks=d.$$prototype.header_attributes=d.$$prototype.attributes_modified=d.$$prototype.backend=d.$$prototype.attribute_overrides=d.$$prototype.timings=d.$$prototype.converter=d.$$prototype.outfilesuffix=d.$$prototype.docinfo_processor_extensions=d.$$prototype.document=d.$$prototype.max_attribute_value_size=d.$$prototype.id=d.$$prototype.doctype=c;a.const_set(v[0],"ImageReference",k(n("::","Struct"),"new",["target","imagesdir"],(z=function(){return a.alias(z.$$s|| -this,"to_s","target")},z.$$s=d,z.$$arity=0,z)));a.const_set(v[0],"Footnote",n("::","Struct").$new("index","id","text"));(function(d,$super,f){d=t(d,$super,"AttributeEntry");[d].concat(f);var g,p;d.$attr_reader("name","value","negate");a.def(d,"$initialize",g=function(a,b,d){null==d&&(d=c);this.name=a;this.value=b;return this.negate=e(d["$nil?"]())?b["$nil?"]():d},g.$$arity=-3);return(a.def(d,"$save_to",p=function(d){var f,g=c;(e(f=d["$[]"]("attribute_entries"))?f:(g=["attribute_entries",[]],k(d,"[]=", -a.to_a(g)),g[b(g.length,1)]))["$<<"](this);return this},p.$$arity=1),c)&&"save_to"})(v[0],null,v);(function(b,$super,d){b=t(b,$super,"Title");var g=[b].concat(d),k,l,w,h;b.$$prototype.sanitized=b.$$prototype.subtitle=b.$$prototype.combined=c;b.$attr_reader("main");a.alias(b,"title","main");b.$attr_reader("subtitle");b.$attr_reader("combined");a.def(b,"$initialize",k=function(b,d){var k,l,w=c;null==d&&(d=f([],{}));e(e(k=this.sanitized=d["$[]"]("sanitize"))?b["$include?"]("<"):k)&&(b=b.$gsub(p(g,"XmlSanitizeRx"), -"").$squeeze(" ").$strip());e(e(k=(w=e(l=d["$[]"]("separator"))?l:":")["$empty?"]())?k:b["$include?"](w=""+w+" ")["$!"]())?(this.main=b,this.subtitle=c):(l=b.$rpartition(w),k=a.to_ary(l),this.main=null==k[0]?c:k[0],this.subtitle=null==k[2]?c:k[2],l);return this.combined=b},k.$$arity=-2);a.def(b,"$sanitized?",l=function(){return this.sanitized},l.$$arity=0);a.def(b,"$subtitle?",w=function(){return e(this.subtitle)?!0:!1},w.$$arity=0);return(a.def(b,"$to_s",h=function(){return this.combined},h.$$arity= -0),c)&&"to_s"})(v[0],null,v);a.const_set(v[0],"Author",n("::","Struct").$new("name","firstname","middlename","lastname","initials","email"));d.$attr_reader("safe");d.$attr_reader("compat_mode");d.$attr_reader("backend");d.$attr_reader("doctype");d.$attr_accessor("sourcemap");d.$attr_reader("catalog");a.alias(d,"references","catalog");d.$attr_reader("counters");d.$attr_reader("header");d.$attr_reader("base_dir");d.$attr_reader("options");d.$attr_reader("outfilesuffix");d.$attr_reader("parent_document"); -d.$attr_reader("reader");d.$attr_reader("path_resolver");d.$attr_reader("converter");d.$attr_reader("syntax_highlighter");d.$attr_reader("extensions");a.def(d,"$initialize",r=function(d,l){var w,m,q,z,L,t,Q,A=c,K=c,W=c,x=c,E=c,Ta=c,U=Ta=Ta=c,La=c,Aa=U=c,T=U=U=c;A=A=A=c;r.$$p&&(r.$$p=null);null==d&&(d=c);null==l&&(l=f([],{}));k(this,a.find_super_dispatcher(this,"initialize",r,!1),[this,"document"],null);if(e(A=l.$delete("parent")))this.parent_document=A,e(w=l["$[]"]("base_dir"))?w:(K=["base_dir",A.$base_dir()], -k(l,"[]=",a.to_a(K)),K[b(K.length,1)]),e(A.$options()["$[]"]("catalog_assets"))&&(K=["catalog_assets",!0],k(l,"[]=",a.to_a(K)),K[b(K.length,1)]),this.catalog=A.$catalog().$merge(f(["footnotes"],{footnotes:[]})),this.attribute_overrides=W=A.$instance_variable_get("@attribute_overrides").$merge(A.$attributes()),W.$delete("compat-mode"),x=W.$delete("doctype"),W.$delete("notitle"),W.$delete("showtitle"),W.$delete("toc"),K=["toc-placement",e(w=W.$delete("toc-placement"))?w:"auto"],k(this.attributes,"[]=", -a.to_a(K)),K[b(K.length,1)],W.$delete("toc-position"),this.safe=A.$safe(),e(this.compat_mode=A.$compat_mode())&&(K=["compat-mode",""],k(this.attributes,"[]=",a.to_a(K)),K[b(K.length,1)]),this.outfilesuffix=A.$outfilesuffix(),this.sourcemap=A.$sourcemap(),this.timings=c,this.path_resolver=A.$path_resolver(),this.converter=A.$converter(),E=c,this.extensions=A.$extensions(),this.syntax_highlighter=A.$syntax_highlighter();else{this.parent_document=c;this.catalog=f("ids refs footnotes links images callouts includes".split(" "), -{ids:f([],{}),refs:f([],{}),footnotes:[],links:[],images:[],callouts:p(v,"Callouts").$new(),includes:f([],{})});this.attribute_overrides=W=f([],{});k(e(w=l["$[]"]("attributes"))?w:f([],{}),"each",[],(m=function(d,f){var g;null==d&&(d=c);null==f&&(f=c);e(d["$end_with?"]("@"))?(e(d["$start_with?"]("!"))?(g=[d.$slice(1,b(d.$length(),2)),!1],d=g[0],f=g[1]):e(d["$end_with?"]("!@"))?(g=[d.$slice(0,b(d.$length(),2)),!1],d=g[0],f=g[1]):(g=[d.$chop(),""+f+"@"],d=g[0],f=g[1]),g):e(d["$start_with?"]("!"))?(g= -[d.$slice(1,d.$length()),f["$=="]("@")?!1:c],d=g[0],f=g[1],g):e(d["$end_with?"]("!"))&&(g=[d.$chop(),f["$=="]("@")?!1:c],d=g[0],f=g[1],g);K=[d.$downcase(),f];k(W,"[]=",a.to_a(K));return K[b(K.length,1)]},m.$$s=this,m.$$arity=2,m));e(Ta=l["$[]"]("to_file"))&&(K=["outfilesuffix",p(v,"Helpers").$extname(Ta)],k(W,"[]=",a.to_a(K)),K[b(K.length,1)]);if(e((Ta=l["$[]"]("safe"))["$!"]()))this.safe=n(p(v,"SafeMode"),"SECURE");else if(e(n("::","Integer")["$==="](Ta)))this.safe=Ta;else{a:{try{var M=p(v,"SafeMode").$value_for_name(Ta); -break a}catch(nb){if(a.rescue(nb,[p(v,"StandardError")]))try{M=n(p(v,"SafeMode"),"SECURE");break a}finally{a.pop_exception()}else throw nb;}M=void 0}this.safe=M}Ta=l.$delete("input_mtime");this.compat_mode=W["$key?"]("compat-mode");this.sourcemap=l["$[]"]("sourcemap");this.timings=l.$delete("timings");this.path_resolver=p(v,"PathResolver").$new();E=e(e(w=(q=n("::","Asciidoctor","skip_raise"))&&n(q,"Extensions","skip_raise")?"constant":c)?w:l["$key?"]("extensions"))?n(n("::","Asciidoctor"),"Extensions"): -c;this.extensions=c;e(e(w=l["$key?"]("header_footer"))?l["$key?"]("standalone")["$!"]():w)&&(K=["standalone",l["$[]"]("header_footer")],k(l,"[]=",a.to_a(K)),K[b(K.length,1)])}this.parsed=this.reftexts=this.header=this.header_attributes=c;this.counters=f([],{});this.attributes_modified=n("::","Set").$new();this.docinfo_processor_extensions=f([],{});U=l["$[]"]("standalone");(this.options=l).$freeze();La=this.attributes;e(A)||(K=["attribute-undefined",p(v,"Compliance").$attribute_undefined()],k(La,"[]=", -a.to_a(K)),K[b(K.length,1)],K=["attribute-missing",p(v,"Compliance").$attribute_missing()],k(La,"[]=",a.to_a(K)),K[b(K.length,1)],La.$update(p(v,"DEFAULT_ATTRIBUTES")));e(U)?(K=["embedded",c],k(W,"[]=",a.to_a(K)),K[b(K.length,1)],K=["copycss",""],k(La,"[]=",a.to_a(K)),K[b(K.length,1)],K=["iconfont-remote",""],k(La,"[]=",a.to_a(K)),K[b(K.length,1)],K=["stylesheet",""],k(La,"[]=",a.to_a(K)),K[b(K.length,1)],K=["webfonts",""],k(La,"[]=",a.to_a(K))):(K=["embedded",""],k(W,"[]=",a.to_a(K)),K[b(K.length, -1)],e(e(w=W["$key?"]("showtitle"))?W.$keys()["$&"](["notitle","showtitle"])["$[]"](-1)["$=="]("showtitle"):w)?(K=["notitle",u(c,"",!1,"@","@",!1)["$[]"](W["$[]"]("showtitle"))],k(W,"[]=",a.to_a(K))):e(W["$key?"]("notitle"))?(K=["showtitle",u(c,"",!1,"@","@",!1)["$[]"](W["$[]"]("notitle"))],k(W,"[]=",a.to_a(K))):(K=["notitle",""],k(La,"[]=",a.to_a(K))));K[b(K.length,1)];K=["asciidoctor",""];k(W,"[]=",a.to_a(K));K[b(K.length,1)];K=["asciidoctor-version",n(n("::","Asciidoctor"),"VERSION")];k(W,"[]=", -a.to_a(K));K[b(K.length,1)];K=["safe-mode-name",U=p(v,"SafeMode").$name_for_value(this.safe)];k(W,"[]=",a.to_a(K));K[b(K.length,1)];K=["safe-mode-"+U,""];k(W,"[]=",a.to_a(K));K[b(K.length,1)];K=["safe-mode-level",this.safe];k(W,"[]=",a.to_a(K));K[b(K.length,1)];e(w=W["$[]"]("max-include-depth"))?w:(K=["max-include-depth",64],k(W,"[]=",a.to_a(K)),K[b(K.length,1)]);e(w=W["$[]"]("allow-uri-read"))?w:(K=["allow-uri-read",c],k(W,"[]=",a.to_a(K)),K[b(K.length,1)]);e(W["$key?"]("numbered"))&&(K=["sectnums", -W.$delete("numbered")],k(W,"[]=",a.to_a(K)),K[b(K.length,1)]);e(W["$key?"]("hardbreaks"))&&(K=["hardbreaks-option",W.$delete("hardbreaks")],k(W,"[]=",a.to_a(K)),K[b(K.length,1)]);e(Aa=l["$[]"]("base_dir"))?this.base_dir=(K=["docdir",n("::","File").$expand_path(Aa)],k(W,"[]=",a.to_a(K)),K[b(K.length,1)]):e(W["$[]"]("docdir"))?this.base_dir=W["$[]"]("docdir"):this.base_dir=(K=["docdir",n("::","Dir").$pwd()],k(W,"[]=",a.to_a(K)),K[b(K.length,1)]);e(U=l["$[]"]("backend"))&&(K=["backend",""+U],k(W,"[]=", -a.to_a(K)),K[b(K.length,1)]);e(U=l["$[]"]("doctype"))&&(K=["doctype",""+U],k(W,"[]=",a.to_a(K)),K[b(K.length,1)]);e(g(this.safe,n(p(v,"SafeMode"),"SERVER")))?(e(w=W["$[]"]("copycss"))?w:(K=["copycss",c],k(W,"[]=",a.to_a(K)),K[b(K.length,1)]),e(w=W["$[]"]("source-highlighter"))?w:(K=["source-highlighter",c],k(W,"[]=",a.to_a(K)),K[b(K.length,1)]),e(w=W["$[]"]("backend"))?w:(K=["backend",p(v,"DEFAULT_BACKEND")],k(W,"[]=",a.to_a(K)),K[b(K.length,1)]),e(e(w=A["$!"]())?W["$key?"]("docfile"):w)&&(K=["docfile", -W["$[]"]("docfile")["$[]"](a.Range.$new(h(W["$[]"]("docdir").$length(),1),-1,!1))],k(W,"[]=",a.to_a(K)),K[b(K.length,1)]),K=["docdir",""],k(W,"[]=",a.to_a(K)),K[b(K.length,1)],e(w=W["$[]"]("user-home"))?w:(K=["user-home","."],k(W,"[]=",a.to_a(K)),K[b(K.length,1)]),e(g(this.safe,n(p(v,"SafeMode"),"SECURE")))&&(e(W["$key?"]("max-attribute-value-size"))||(K=["max-attribute-value-size",4096],k(W,"[]=",a.to_a(K)),K[b(K.length,1)]),e(W["$key?"]("linkcss"))||(K=["linkcss",""],k(W,"[]=",a.to_a(K)),K[b(K.length, -1)]),e(w=W["$[]"]("icons"))?w:(K=["icons",c],k(W,"[]=",a.to_a(K)),K[b(K.length,1)]))):e(w=W["$[]"]("user-home"))?w:(K=["user-home",p(v,"USER_HOME")],k(W,"[]=",a.to_a(K)),K[b(K.length,1)]);this.max_attribute_value_size=e(T=e(w=W["$[]"]("max-attribute-value-size"))?w:(K=["max-attribute-value-size",c],k(W,"[]=",a.to_a(K)),K[b(K.length,1)]))?T.$to_i().$abs():c;k(W,"delete_if",[],(z=function(d,f){var g,p=c;null==d&&(d=c);null==f&&(f=c);e(f)?(e(e(g=n("::","String")["$==="](f))?f["$end_with?"]("@"):g)&& -(g=[f.$chop(),!0],f=g[0],p=g[1],g),K=[d,f],k(La,"[]=",a.to_a(K)),K[b(K.length,1)]):(La.$delete(d),p=f["$=="](!1));return p},z.$$s=this,z.$$arity=2,z));if(e(A))return this.backend=La["$[]"]("backend"),(this.doctype=(K=["doctype",x],k(La,"[]=",a.to_a(K)),K[b(K.length,1)]))["$=="](p(v,"DEFAULT_DOCTYPE"))||this.$update_doctype_attributes(p(v,"DEFAULT_DOCTYPE")),this.reader=p(v,"Reader").$new(d,l["$[]"]("cursor")),e(this.sourcemap)&&(this.source_location=this.reader.$cursor()),p(v,"Parser").$parse(this.reader, -this),this.$restore_attributes(),this.parsed=!0;this.backend=c;(A=e(w=La["$[]"]("backend"))?w:p(v,"DEFAULT_BACKEND"))["$=="]("manpage")?this.doctype=(K=["doctype",(K=["doctype","manpage"],k(W,"[]=",a.to_a(K)),K[b(K.length,1)])],k(La,"[]=",a.to_a(K)),K[b(K.length,1)]):this.doctype=e(w=La["$[]"]("doctype"))?w:(K=["doctype",p(v,"DEFAULT_DOCTYPE")],k(La,"[]=",a.to_a(K)),K[b(K.length,1)]);this.$update_backend_attributes(A,!0);e(w=La["$[]"]("stylesdir"))?w:(K=["stylesdir","."],k(La,"[]=",a.to_a(K)),K[b(K.length, -1)]);e(w=La["$[]"]("iconsdir"))?w:(K=["iconsdir",""+La.$fetch("imagesdir","./images")+"/icons"],k(La,"[]=",a.to_a(K)),K[b(K.length,1)]);this.$fill_datetime_attributes(La,Ta);e(E)&&(e(A=l["$[]"]("extension_registry"))?e(e(w=n(p(v,"Extensions"),"Registry")["$==="](A))?w:e(L=(Q=n("::","AsciidoctorJ","skip_raise"))&&(t=n(Q,"Extensions","skip_raise"))&&n(t,"ExtensionRegistry","skip_raise")?"constant":c)?n(n(n("::","AsciidoctorJ"),"Extensions"),"ExtensionRegistry")["$==="](A):L)&&(this.extensions=A.$activate(this)): -e((A=l["$[]"]("extensions"))["$nil?"]())?e(p(v,"Extensions").$groups()["$empty?"]())||(this.extensions=n(p(v,"Extensions"),"Registry").$new().$activate(this)):e(n("::","Proc")["$==="](A))&&(this.extensions=k(p(v,"Extensions"),"create",[],A.$to_proc()).$activate(this)));this.reader=p(v,"PreprocessorReader").$new(this,d,n(p(v,"Reader"),"Cursor").$new(La["$[]"]("docfile"),this.base_dir),f(["normalize"],{normalize:!0}));return e(this.sourcemap)?this.source_location=this.reader.$cursor():c},r.$$arity= --1);a.def(d,"$parse",A=function(a){var b,d,g,l=c,w=c;null==a&&(a=c);if(e(this.parsed))return this;l=this;e(a)&&(this.reader=p(v,"PreprocessorReader").$new(l,a,n(p(v,"Reader"),"Cursor").$new(this.attributes["$[]"]("docfile"),this.base_dir),f(["normalize"],{normalize:!0})),e(this.sourcemap)&&(this.source_location=this.reader.$cursor()));e(e(b=w=e(this.parent_document)?c:this.extensions)?w["$preprocessors?"]():b)&&k(w.$preprocessors(),"each",[],(d=function(a){var b=d.$$s||this,f;null==b.reader&&(b.reader= -c);null==a&&(a=c);return b.reader=e(f=a.$process_method()["$[]"](l,b.reader))?f:b.reader},d.$$s=this,d.$$arity=1,d));p(v,"Parser").$parse(this.reader,l,f(["header_only"],{header_only:this.options["$[]"]("parse_header_only")}));this.$restore_attributes();e(e(b=w)?w["$tree_processors?"]():b)&&k(w.$tree_processors(),"each",[],(g=function(a){var b,d,f=c;null==a&&(a=c);return e(e(b=e(d=f=a.$process_method()["$[]"](l))?p(v,"Document")["$==="](f):d)?f["$!="](l):b)?l=f:c},g.$$s=this,g.$$arity=1,g));this.parsed= -!0;return l},A.$$arity=-1);a.def(d,"$parsed?",E=function(){return this.parsed},E.$$arity=0);a.def(d,"$counter",U=function(d,f){var g,l,w=c,h=c;null==f&&(f=c);if(e(this.parent_document))return this.parent_document.$counter(d,f);f=e(e(g=l=this["$attribute_locked?"](d))?w=this.counters["$[]"](d):g)?(h=[d,p(v,"Helpers").$nextval(w)],k(this.counters,"[]=",a.to_a(h)),h[b(h.length,1)]):e((w=this.attributes["$[]"](d))["$nil_or_empty?"]()["$!"]())?(h=[d,p(v,"Helpers").$nextval(w)],k(this.counters,"[]=",a.to_a(h)), -h[b(h.length,1)]):e(f)?(h=[d,f["$=="](f.$to_i().$to_s())?f.$to_i():f],k(this.counters,"[]=",a.to_a(h)),h[b(h.length,1)]):(h=[d,1],k(this.counters,"[]=",a.to_a(h)),h[b(h.length,1)]);e(l)||(h=[d,f],k(this.attributes,"[]=",a.to_a(h)),h[b(h.length,1)]);return f},U.$$arity=-2);a.def(d,"$increment_and_store_counter",T=function(a,b){return p(v,"AttributeEntry").$new(a,this.$counter(a)).$save_to(b.$attributes()).$value()},T.$$arity=2);a.alias(d,"counter_increment","increment_and_store_counter");a.def(d,"$register", -M=function(d,g){var l,w=this,h=c,m=c,q=c,n=c,z=c;return function(){h=d;return"ids"["$==="](h)?w.$register("refs",[m=g["$[]"](0),p(v,"Inline").$new(w,"anchor",g["$[]"](1),f(["type","id"],{type:"ref",id:m}))]):"refs"["$==="](h)?(q=w.catalog["$[]"]("refs"),e(l=q["$[]"](g["$[]"](0)))?l:(n=[g["$[]"](0),z=g["$[]"](1)],k(q,"[]=",a.to_a(n)),n[b(n.length,1)]),z):"footnotes"["$==="](h)?w.catalog["$[]"](d)["$<<"](g):e(w.options["$[]"]("catalog_assets"))?w.catalog["$[]"](d)["$<<"](d["$=="]("images")?p(v,"ImageReference").$new(g, -w.attributes["$[]"]("imagesdir")):g):c}()},M.$$arity=2);a.def(d,"$resolve_id",y=function(d){var g,p,w=this,l=c;if(e(w.reftexts))return w.reftexts["$[]"](d);if(e(w.parsed))return k(w.reftexts=f([],{}),"tap",[],(g=function(d){var f=g.$$s||this,p;null==f.catalog&&(f.catalog=c);null==d&&(d=c);return k(f.catalog["$[]"]("refs"),"each",[],(p=function(f,g){var p,w=c;null==f&&(f=c);null==g&&(g=c);return e(p=d["$[]"](g.$xreftext()))?p:(w=[g.$xreftext(),f],k(d,"[]=",a.to_a(w)),w[b(w.length,1)])},p.$$s=f,p.$$arity= -2,p))},g.$$s=w,g.$$arity=1,g))["$[]"](d);l=c;(function(){var g=a.new_brk();try{return k(w.reftexts=f([],{}),"tap",[],(p=function(f){var g=p.$$s||this,w;null==g.catalog&&(g.catalog=c);null==f&&(f=c);return function(){var p=a.new_brk();try{return k(g.catalog["$[]"]("refs"),"each",[],(w=function(g,w){var h,m=c;null==g&&(g=c);null==w&&(w=c);if((w=w.$xreftext())["$=="](d))a.brk(l=g,p);else return e(h=f["$[]"](w))?h:(m=[w,g],k(f,"[]=",a.to_a(m)),m[b(m.length,1)])},w.$$s=g,w.$$brk=p,w.$$arity=2,w))}catch(fb){if(fb=== -p)return fb.$v;throw fb;}}()},p.$$s=w,p.$$brk=g,p.$$arity=1,p))}catch(eb){if(eb===g)return eb.$v;throw eb;}})();w.reftexts=c;return l},y.$$arity=1);a.def(d,"$footnotes?",C=function(){return e(this.catalog["$[]"]("footnotes")["$empty?"]())?!1:!0},C.$$arity=0);a.def(d,"$footnotes",N=function(){return this.catalog["$[]"]("footnotes")},N.$$arity=0);a.def(d,"$callouts",D=function(){return this.catalog["$[]"]("callouts")},D.$$arity=0);a.def(d,"$nested?",X=function(){return e(this.parent_document)?!0:!1}, -X.$$arity=0);a.def(d,"$embedded?",B=function(){return this.attributes["$key?"]("embedded")},B.$$arity=0);a.def(d,"$extensions?",V=function(){return e(this.extensions)?!0:!1},V.$$arity=0);a.def(d,"$source",G=function(){return e(this.reader)?this.reader.$source():c},G.$$arity=0);a.def(d,"$source_lines",H=function(){return e(this.reader)?this.reader.$source_lines():c},H.$$arity=0);a.def(d,"$basebackend?",J=function(a){return this.attributes["$[]"]("basebackend")["$=="](a)},J.$$arity=1);a.def(d,"$title", -S=function(){return this.$doctitle()},S.$$arity=0);a.def(d,"$title=",ia=function(c){var d;if(!e(d=this.header)){var f=["header"];k(d=this.header=p(v,"Section").$new(this,0),"sectname=",a.to_a(f));f[b(f.length,1)]}f=[c];k(d,"title=",a.to_a(f));return f[b(f.length,1)]},ia.$$arity=1);a.def(d,"$doctitle",aa=function(a){var b,d,g,k=c;null==a&&(a=f([],{}));if(!e(d=this.attributes["$[]"]("title")))if(e(g=this.$first_section()))d=g.$title();else if(e((e(b=a["$[]"]("use_fallback"))?d=this.attributes["$[]"]("untitled-label"): -b)["$!"]()))return c;return e(k=a["$[]"]("partition"))?p(v,"Title").$new(d,a.$merge(f(["separator"],{separator:k["$=="](!0)?this.attributes["$[]"]("title-separator"):k}))):e(e(b=a["$[]"]("sanitize"))?d["$include?"]("<"):b)?d.$gsub(p(v,"XmlSanitizeRx"),"").$squeeze(" ").$strip():d},aa.$$arity=-1);a.alias(d,"name","doctitle");a.def(d,"$xreftext",na=function(a){var b;a=c;return e(e(b=a=this.$reftext())?a["$empty?"]()["$!"]():b)?a:this.$title()},na.$$arity=-1);a.def(d,"$author",ba=function(){return this.attributes["$[]"]("author")}, -ba.$$arity=0);a.def(d,"$authors",I=function(){var a,b,c;if(e((b=this.attributes)["$key?"]("author"))){var d=[p(v,"Author").$new(b["$[]"]("author"),b["$[]"]("firstname"),b["$[]"]("middlename"),b["$[]"]("lastname"),b["$[]"]("authorinitials"),b["$[]"]("email"))];if(e(m(c=e(a=b["$[]"]("authorcount"))?a:0,1)))for(a=1;e(q(a,c));)a=h(a,1),d["$<<"](p(v,"Author").$new(b["$[]"]("author_"+a),b["$[]"]("firstname_"+a),b["$[]"]("middlename_"+a),b["$[]"]("lastname_"+a),b["$[]"]("authorinitials_"+a),b["$[]"]("email_"+ -a)));return d}return[]},I.$$arity=0);a.def(d,"$revdate",O=function(){return this.attributes["$[]"]("revdate")},O.$$arity=0);a.def(d,"$notitle",P=function(){return this.attributes["$key?"]("notitle")},P.$$arity=0);a.def(d,"$noheader",R=function(){return this.attributes["$key?"]("noheader")},R.$$arity=0);a.def(d,"$nofooter",wa=function(){return this.attributes["$key?"]("nofooter")},wa.$$arity=0);a.def(d,"$first_section",da=function(){var a,b;return e(a=this.header)?a:k(this.blocks,"find",[],(b=function(a){null== -a&&(a=c);return a.$context()["$=="]("section")},b.$$s=this,b.$$arity=1,b))},da.$$arity=0);a.def(d,"$header?",xa=function(){return e(this.header)?!0:!1},xa.$$arity=0);a.alias(d,"has_header?","header?");a.def(d,"$<<",Ca=function(b){var c=Ca.$$p,e;c&&(Ca.$$p=null);var d=0;var f=arguments.length;for(e=Array(f);d<f;d++)e[d]=arguments[d];b.$context()["$=="]("section")&&this.$assign_numeral(b);return k(this,a.find_super_dispatcher(this,"<<",Ca,!1),e,c)},Ca.$$arity=1);a.def(d,"$finalize_header",ta=function(c, -d){null==d&&(d=!0);this.$clear_playback_attributes(c);this.$save_attributes();e(d)||(d=["invalid-header",!0],k(c,"[]=",a.to_a(d)),d[b(d.length,1)]);return c},ta.$$arity=-2);a.def(d,"$playback_attributes",Ia=function(d){var f;return e(d["$key?"]("attribute_entries"))?k(d["$[]"]("attribute_entries"),"each",[],(f=function(d){var g=f.$$s||this;null==g.attributes&&(g.attributes=c);null==d&&(d=c);var p=d.$name();if(e(d.$negate()))return g.attributes.$delete(p),p["$=="]("compat-mode")?g.compat_mode=!1:c; -d=[p,d.$value()];k(g.attributes,"[]=",a.to_a(d));d[b(d.length,1)];return p["$=="]("compat-mode")?g.compat_mode=!0:c},f.$$s=this,f.$$arity=1,f)):c},Ia.$$arity=1);a.def(d,"$restore_attributes",Ga=function(){e(this.parent_document)||this.catalog["$[]"]("callouts").$rewind();return this.attributes.$replace(this.header_attributes)},Ga.$$arity=0);a.def(d,"$set_attribute",Ja=function(d,f){null==f&&(f="");if(e(this["$attribute_locked?"](d)))return c;e(f["$empty?"]())||(f=this.$apply_attribute_value_subs(f)); -if(e(this.header_attributes)){var g=[d,f];k(this.attributes,"[]=",a.to_a(g));g[b(g.length,1)]}else"backend"["$==="](d)?this.$update_backend_attributes(f,e(g=this.attributes_modified["$delete?"]("htmlsyntax"))?f["$=="](this.backend):g):"doctype"["$==="](d)?this.$update_doctype_attributes(f):(g=[d,f],k(this.attributes,"[]=",a.to_a(g)),g[b(g.length,1)]),this.attributes_modified["$<<"](d);return f},Ja.$$arity=-2);a.def(d,"$delete_attribute",Y=function(a){if(e(this["$attribute_locked?"](a)))return!1;this.attributes.$delete(a); -this.attributes_modified["$<<"](a);return!0},Y.$$arity=1);a.def(d,"$attribute_locked?",Qa=function(a){return this.attribute_overrides["$key?"](a)},Qa.$$arity=1);a.def(d,"$set_header_attribute",Ra=function(c,d,f){var g;null==d&&(d="");null==f&&(f=!0);var p=e(g=this.header_attributes)?g:this.attributes;if(e(f["$=="](!1)?p["$key?"](c):f["$=="](!1)))return!1;c=[c,d];k(p,"[]=",a.to_a(c));c[b(c.length,1)];return!0},Ra.$$arity=-2);a.def(d,"$convert",Da=function(d){var w,l,h=c,m=c,q=c,z=c,r=c;null==d&&(d= -f([],{}));e(this.timings)&&this.timings.$start("convert");e(this.parsed)||this.$parse();e(e(w=g(this.safe,n(p(v,"SafeMode"),"SERVER")))?w:d["$empty?"]())||(e((h=["outfile",d["$[]"]("outfile")],k(this.attributes,"[]=",a.to_a(h)),h[b(h.length,1)]))||this.attributes.$delete("outfile"),e((h=["outdir",d["$[]"]("outdir")],k(this.attributes,"[]=",a.to_a(h)),h[b(h.length,1)]))||this.attributes.$delete("outdir"));this.$doctype()["$=="]("inline")?e(m=e(w=this.blocks["$[]"](0))?w:this.header)&&(e(e(w=m.$content_model()["$=="]("compound"))? -w:m.$content_model()["$=="]("empty"))?this.$logger().$warn("no inline candidate; use the inline doctype to convert a single paragragh, verbatim, or raw block"):q=m.$content()):(z=e(d["$key?"]("standalone"))?e(d["$[]"]("standalone"))?"document":"embedded":e(d["$key?"]("header_footer"))?e(d["$[]"]("header_footer"))?"document":"embedded":e(this.options["$[]"]("standalone"))?"document":"embedded",q=this.converter.$convert(this,z));!e(this.parent_document)&&e(e(w=r=this.extensions)?r["$postprocessors?"](): -w)&&k(r.$postprocessors(),"each",[],(l=function(a){var b=l.$$s||this;null==a&&(a=c);return q=a.$process_method()["$[]"](b,q)},l.$$s=this,l.$$arity=1,l));e(this.timings)&&this.timings.$record("convert");return q},Da.$$arity=-1);a.alias(d,"render","convert");a.def(d,"$write",Ka=function(a,b){var d;e(this.timings)&&this.timings.$start("write");e(p(v,"Writer")["$==="](this.converter))?this.converter.$write(a,b):(e(b["$respond_to?"]("write"))?e(a["$nil_or_empty?"]())||(b.$write(a.$chomp()),b.$write(p(v, -"LF"))):n("::","File").$write(b,a,f(["mode"],{mode:p(v,"FILE_WRITE_MODE")})),e(e(d=this.backend["$=="]("manpage")?n("::","String")["$==="](b):this.backend["$=="]("manpage"))?this.converter.$class()["$respond_to?"]("write_alternate_pages"):d)&&this.converter.$class().$write_alternate_pages(this.attributes["$[]"]("mannames"),this.attributes["$[]"]("manvolnum"),b));e(this.timings)&&this.timings.$record("write");return c},Ka.$$arity=2);a.def(d,"$content",Ya=function(){var b=Ya.$$p,c;b&&(Ya.$$p=null); -var e=0;var d=arguments.length;for(c=Array(d);e<d;e++)c[e]=arguments[e];this.attributes.$delete("title");return k(this,a.find_super_dispatcher(this,"content",Ya,!1),c,b)},Ya.$$arity=0);a.def(d,"$docinfo",Va=function(a,b){var d,g,w=c,l=c,h=c,m=c,z=c,r=c,L=c;m=L=c;null==a&&(a="head");null==b&&(b=c);if(e(q(this.$safe(),n(p(v,"SafeMode"),"SECURE")))&&(a["$=="]("head")||(w="-"+a),e(b)||(b=this.outfilesuffix),l=e((l=this.attributes["$[]"]("docinfo"))["$nil_or_empty?"]())?e(this.attributes["$key?"]("docinfo2"))? -["private","shared"]:e(this.attributes["$key?"]("docinfo1"))?["shared"]:e(l)?["private"]:c:k(l.$split(","),"map",[],(d=function(a){null==a&&(a=c);return a.$strip()},d.$$s=this,d.$$arity=1,d)),e(l))){h=[];var K=["docinfo"+w+b,this.attributes["$[]"]("docinfodir"),this.$resolve_docinfo_subs()];m=K[0];z=K[1];r=K[2];K;if(!e(l["$&"](["shared","shared-"+a])["$empty?"]())&&(L=this.$normalize_system_path(m,z),e(L=this.$read_asset(L,f(["normalize"],{normalize:!0})))))h["$<<"](this.$apply_subs(L,r));if(!e(e(K= -this.attributes["$[]"]("docname")["$nil_or_empty?"]())?K:l["$&"](["private","private-"+a])["$empty?"]())&&(L=this.$normalize_system_path(""+this.attributes["$[]"]("docname")+"-"+m,z),e(m=this.$read_asset(L,f(["normalize"],{normalize:!0})))))h["$<<"](this.$apply_subs(m,r))}return e(e(K=this.extensions)?this["$docinfo_processors?"](a):K)?(e(K=h)?K:[]).$concat(k(this.docinfo_processor_extensions["$[]"](a),"map",[],(g=function(a){var b=g.$$s||this;null==a&&(a=c);return a.$process_method()["$[]"](b)}, -g.$$s=this,g.$$arity=1,g)).$compact()).$join(p(v,"LF")):e(h)?h.$join(p(v,"LF")):""},Va.$$arity=-1);a.def(d,"$docinfo_processors?",Za=function(d){var f,g=c;null==d&&(d="head");if(e(this.docinfo_processor_extensions["$key?"](d)))return this.docinfo_processor_extensions["$[]"](d)["$!="](!1);if(e(e(f=this.extensions)?this.document.$extensions()["$docinfo_processors?"](d):f))return(g=[d,this.document.$extensions().$docinfo_processors(d)],k(this.docinfo_processor_extensions,"[]=",a.to_a(g)),g[b(g.length, -1)])["$!"]()["$!"]();g=[d,!1];k(this.docinfo_processor_extensions,"[]=",a.to_a(g));return g[b(g.length,1)]},Za.$$arity=-1);a.def(d,"$to_s",$a=function(){return"#<"+this.$class()+"@"+this.$object_id()+" {doctype: "+this.$doctype().$inspect()+", doctitle: "+(e(this.header["$!="](c))?this.header.$title():c).$inspect()+", blocks: "+this.blocks.$size()+"}>"},$a.$$arity=0);d.$private();a.def(d,"$apply_attribute_value_subs",bb=function(a){var b;e(p(v,"AttributeEntryPassMacroRx")["$=~"](a))?(a=(b=x["~"])=== -c?c:b["$[]"](2),e((b=x["~"])===c?c:b["$[]"](1))&&(a=this.$apply_subs(a,this.$resolve_pass_subs((b=x["~"])===c?c:b["$[]"](1))))):a=this.$apply_header_subs(a);return e(this.max_attribute_value_size)?this.$limit_bytesize(a,this.max_attribute_value_size):a},bb.$$arity=1);a.def(d,"$limit_bytesize",Ua=function(a,c){if(e(m(a.$bytesize(),c)))for(;!e((a=a.$byteslice(0,c))["$valid_encoding?"]());)c=b(c,1);return a},Ua.$$arity=2);a.def(d,"$resolve_docinfo_subs",w=function(){return e(this.attributes["$key?"]("docinfosubs"))? -this.$resolve_subs(this.attributes["$[]"]("docinfosubs"),"block",c,"docinfo"):["attributes"]},w.$$arity=0);a.def(d,"$create_converter",Q=function(d,g){var w,l,h=c,m;var q=f(["document","htmlsyntax"],{document:this,htmlsyntax:this.attributes["$[]"]("htmlsyntax")});e(l=e(w=(h=this.options)["$[]"]("template_dirs"))?w:h["$[]"]("template_dir"))&&(w=["template_dirs",[].concat(a.to_a(l))],k(q,"[]=",a.to_a(w)),w[b(w.length,1)],w=["template_cache",h.$fetch("template_cache",!0)],k(q,"[]=",a.to_a(w)),w[b(w.length, -1)],w=["template_engine",h["$[]"]("template_engine")],k(q,"[]=",a.to_a(w)),w[b(w.length,1)],w=["template_engine_options",h["$[]"]("template_engine_options")],k(q,"[]=",a.to_a(w)),w[b(w.length,1)],w=["eruby",h["$[]"]("eruby")],k(q,"[]=",a.to_a(w)),w[b(w.length,1)],w=["safe",this.safe],k(q,"[]=",a.to_a(w)),w[b(w.length,1)],e(g)&&(w=["delegate_backend",g],k(q,"[]=",a.to_a(w)),w[b(w.length,1)]));return e(m=h["$[]"]("converter"))?n(p(v,"Converter"),"CustomFactory").$new(u(d,m)).$create(d,q):h.$fetch("converter_factory", -p(v,"Converter")).$create(d,q)},Q.$$arity=2);a.def(d,"$clear_playback_attributes",L=function(a){return a.$delete("attribute_entries")},L.$$arity=1);a.def(d,"$save_attributes",Aa=function(){var d,g,w=c,l=c,h=c,m=h=c,q=c,z=c,r=c,L=r=r=m=z=c,K=c,t=c;e(e(d=(w=this.attributes)["$key?"]("doctitle"))?d:(l=this.$doctitle())["$!"]())||(h=["doctitle",l],k(w,"[]=",a.to_a(h)),h[b(h.length,1)]);this.id=e(d=this.id)?d:w["$[]"]("css-signature");e(h=e(w.$delete("toc2"))?"left":w["$[]"]("toc"))&&(m=e(e(d=q=w.$fetch("toc-placement", -"macro"))?q["$!="]("auto"):d)?q:w["$[]"]("toc-position"),e(e(d=h["$empty?"]())?m["$nil_or_empty?"]():d)||(z="left",r="toc2",z=e(m["$nil_or_empty?"]())?e(h["$empty?"]())?z:h:m,h=["toc",""],k(w,"[]=",a.to_a(h)),h[b(h.length,1)],h=["toc-placement","auto"],k(w,"[]=",a.to_a(h)),h[b(h.length,1)],m=z,"left"["$==="](m)||"<"["$==="](m)||"<"["$==="](m)?(h=["toc-position","left"],k(w,"[]=",a.to_a(h)),h[b(h.length,1)]):"right"["$==="](m)||">"["$==="](m)||">"["$==="](m)?(h=["toc-position","right"],k(w,"[]=", -a.to_a(h)),h[b(h.length,1)]):"top"["$==="](m)||"^"["$==="](m)?(h=["toc-position","top"],k(w,"[]=",a.to_a(h)),h[b(h.length,1)]):"bottom"["$==="](m)||"v"["$==="](m)?(h=["toc-position","bottom"],k(w,"[]=",a.to_a(h)),h[b(h.length,1)]):("preamble"["$==="](m)||"macro"["$==="](m)?(h=["toc-position","content"],k(w,"[]=",a.to_a(h)),h[b(h.length,1)],h=["toc-placement",z],k(w,"[]=",a.to_a(h)),h[b(h.length,1)]):w.$delete("toc-position"),r=c),e(r)&&(e(d=w["$[]"]("toc-class"))?d:(h=["toc-class",r],k(w,"[]=",a.to_a(h)), -h[b(h.length,1)]))));e(e(d=r=w["$[]"]("icons"))?w["$key?"]("icontype")["$!"]():d)&&(m=r,""["$==="](m)||"font"["$==="](m)?c:(h=["icons",""],k(w,"[]=",a.to_a(h)),h[b(h.length,1)],r["$=="]("image")||(h=["icontype",r],k(w,"[]=",a.to_a(h)),h[b(h.length,1)])));e(this.compat_mode=w["$key?"]("compat-mode"))&&e(w["$key?"]("language"))&&(h=["source-language",w["$[]"]("language")],k(w,"[]=",a.to_a(h)),h[b(h.length,1)]);e(this.parent_document)||((r=w["$[]"]("basebackend"))["$=="]("html")?e(e(d=L=w["$[]"]("source-highlighter"))? -w["$[]"](""+L+"-unavailable")["$!"]():d)&&(e(K=this.options["$[]"]("syntax_highlighter_factory"))?this.syntax_highlighter=K.$create(L,this.backend,f(["document"],{document:this})):e(t=this.options["$[]"]("syntax_highlighters"))?this.syntax_highlighter=n(p(v,"SyntaxHighlighter"),"DefaultFactoryProxy").$new(t).$create(L,this.backend,f(["document"],{document:this})):this.syntax_highlighter=p(v,"SyntaxHighlighter").$create(L,this.backend,f(["document"],{document:this}))):r["$=="]("docbook")&&(e(e(d=this["$attribute_locked?"]("toc"))? -d:this.attributes_modified["$include?"]("toc"))||(h=["toc",""],k(w,"[]=",a.to_a(h)),h[b(h.length,1)]),e(e(d=this["$attribute_locked?"]("sectnums"))?d:this.attributes_modified["$include?"]("sectnums"))||(h=["sectnums",""],k(w,"[]=",a.to_a(h)),h[b(h.length,1)])),this.outfilesuffix=w["$[]"]("outfilesuffix"),k(p(v,"FLEXIBLE_ATTRIBUTES"),"each",[],(g=function(a){var b=g.$$s||this,d;null==b.attribute_overrides&&(b.attribute_overrides=c);null==a&&(a=c);return e(e(d=b.attribute_overrides["$key?"](a))?b.attribute_overrides["$[]"](a): -d)?b.attribute_overrides.$delete(a):c},g.$$s=this,g.$$arity=1,g)));return this.header_attributes=w.$merge()},Aa.$$arity=0);a.def(d,"$fill_datetime_attributes",Ta=function(d,f){var g,w,p=c,l,h=c;var m=e(n("::","ENV")["$key?"]("SOURCE_DATE_EPOCH"))?p=n("::","Time").$at(this.$Integer(n("::","ENV")["$[]"]("SOURCE_DATE_EPOCH"))).$utc():n("::","Time").$now();e(l=d["$[]"]("localdate"))?e(g=d["$[]"]("localyear"))?g:(h=["localyear",l.$index("-")["$=="](4)?l.$slice(0,4):c],k(d,"[]=",a.to_a(h)),h[b(h.length, -1)]):(l=(h=["localdate",m.$strftime("%F")],k(d,"[]=",a.to_a(h)),h[b(h.length,1)]),e(g=d["$[]"]("localyear"))?g:(h=["localyear",m.$year().$to_s()],k(d,"[]=",a.to_a(h)),h[b(h.length,1)]));var q=e(g=d["$[]"]("localtime"))?g:(h=["localtime",m.$strftime("%T "+(m.$utc_offset()["$=="](0)?"UTC":"%z"))],k(d,"[]=",a.to_a(h)),h[b(h.length,1)]);e(g=d["$[]"]("localdatetime"))?g:(h=["localdatetime",""+l+" "+q],k(d,"[]=",a.to_a(h)),h[b(h.length,1)]);f=e(g=e(w=p)?w:f)?g:m;e(w=d["$[]"]("docdate"))?e(g=d["$[]"]("docyear"))? -g:(h=["docyear",w.$index("-")["$=="](4)?w.$slice(0,4):c],k(d,"[]=",a.to_a(h)),h[b(h.length,1)]):(w=(h=["docdate",f.$strftime("%F")],k(d,"[]=",a.to_a(h)),h[b(h.length,1)]),e(g=d["$[]"]("docyear"))?g:(h=["docyear",f.$year().$to_s()],k(d,"[]=",a.to_a(h)),h[b(h.length,1)]));f=e(g=d["$[]"]("doctime"))?g:(h=["doctime",f.$strftime("%T "+(f.$utc_offset()["$=="](0)?"UTC":"%z"))],k(d,"[]=",a.to_a(h)),h[b(h.length,1)]);e(g=d["$[]"]("docdatetime"))?g:(h=["docdatetime",""+w+" "+f],k(d,"[]=",a.to_a(h)),h[b(h.length, -1)]);return c},Ta.$$arity=2);a.def(d,"$update_backend_attributes",K=function(d,f){var g,w,l=c,h=c,m=c,q=c,z=c,r;null==f&&(f=c);if(e(e(g=f)?g:d["$!="](this.backend))){var L=this.backend;var K=(w=this.attributes)["$[]"]("basebackend");var t=this.doctype;if(e(d["$include?"](":"))){var Q=d.$partition(":");g=a.to_ary(Q);l=null==g[0]?c:g[0];d=null==g[2]?c:g[2];Q}e(d["$start_with?"]("xhtml"))?(h=["htmlsyntax","xml"],k(w,"[]=",a.to_a(h)),h[b(h.length,1)],d=d.$slice(1,d.$length())):e(d["$start_with?"]("html"))&& -(e(g=w["$[]"]("htmlsyntax"))?g:(h=["htmlsyntax","html"],k(w,"[]=",a.to_a(h)),h[b(h.length,1)]));d=e(g=p(v,"BACKEND_ALIASES")["$[]"](d))?g:d;e(l)&&(g=[l,d],d=g[0],m=g[1],g);e(t)?(e(L)&&(w.$delete("backend-"+L),w.$delete("backend-"+L+"-doctype-"+t)),h=["backend-"+d+"-doctype-"+t,""],k(w,"[]=",a.to_a(h)),h[b(h.length,1)],h=["doctype-"+t,""],k(w,"[]=",a.to_a(h)),h[b(h.length,1)]):e(L)&&w.$delete("backend-"+L);h=["backend-"+d,""];k(w,"[]=",a.to_a(h));h[b(h.length,1)];this.backend=(h=["backend",d],k(w, -"[]=",a.to_a(h)),h[b(h.length,1)]);e(n(p(v,"Converter"),"BackendTraits")["$==="](Q=this.$create_converter(d,m)))?(q=Q.$basebackend(),z=Q.$filetype(),e(L=Q.$htmlsyntax())&&(h=["htmlsyntax",L],k(w,"[]=",a.to_a(h)),h[b(h.length,1)]),e(f)?e(g=w["$[]"]("outfilesuffix"))?g:(h=["outfilesuffix",Q.$outfilesuffix()],k(w,"[]=",a.to_a(h)),h[b(h.length,1)]):e(this["$attribute_locked?"]("outfilesuffix"))||(h=["outfilesuffix",Q.$outfilesuffix()],k(w,"[]=",a.to_a(h)),h[b(h.length,1)])):e(Q)?(L=p(v,"Converter").$derive_backend_traits(d), -q=L["$[]"]("basebackend"),z=L["$[]"]("filetype"),e(f)?e(g=w["$[]"]("outfilesuffix"))?g:(h=["outfilesuffix",L["$[]"]("outfilesuffix")],k(w,"[]=",a.to_a(h)),h[b(h.length,1)]):e(this["$attribute_locked?"]("outfilesuffix"))||(h=["outfilesuffix",L["$[]"]("outfilesuffix")],k(w,"[]=",a.to_a(h)),h[b(h.length,1)])):this.$raise(n("::","NotImplementedError"),"asciidoctor: FAILED: missing converter for backend '"+d+"'. Processing aborted.");this.converter=Q;e(r=w["$[]"]("filetype"))&&w.$delete("filetype-"+r); -h=["filetype",z];k(w,"[]=",a.to_a(h));h[b(h.length,1)];h=["filetype-"+z,""];k(w,"[]=",a.to_a(h));h[b(h.length,1)];e(f=p(v,"DEFAULT_PAGE_WIDTHS")["$[]"](q))?(h=["pagewidth",f],k(w,"[]=",a.to_a(h)),h[b(h.length,1)]):w.$delete("pagewidth");e(q["$!="](K))&&(e(t)?(e(K)&&(w.$delete("basebackend-"+K),w.$delete("basebackend-"+K+"-doctype-"+t)),h=["basebackend-"+q+"-doctype-"+t,""],k(w,"[]=",a.to_a(h)),h[b(h.length,1)]):e(K)&&w.$delete("basebackend-"+K),h=["basebackend-"+q,""],k(w,"[]=",a.to_a(h)),h[b(h.length, -1)],h=["basebackend",q],k(w,"[]=",a.to_a(h)),h[b(h.length,1)]);return d}return c},K.$$arity=-2);return(a.def(d,"$update_doctype_attributes",Ea=function(d){var f,g;if(e(e(f=d)?d["$!="](this.doctype):f)){f=[this.backend,(g=this.attributes)["$[]"]("basebackend"),this.doctype];var w=f[0];var p=f[1];var h=f[2];f;e(h)?(g.$delete("doctype-"+h),e(w)&&(g.$delete("backend-"+w+"-doctype-"+h),f=["backend-"+w+"-doctype-"+d,""],k(g,"[]=",a.to_a(f)),f[b(f.length,1)]),e(p)&&(g.$delete("basebackend-"+p+"-doctype-"+ -h),f=["basebackend-"+p+"-doctype-"+d,""],k(g,"[]=",a.to_a(f)),f[b(f.length,1)])):(e(w)&&(f=["backend-"+w+"-doctype-"+d,""],k(g,"[]=",a.to_a(f)),f[b(f.length,1)]),e(p)&&(f=["basebackend-"+p+"-doctype-"+d,""],k(g,"[]=",a.to_a(f)),f[b(f.length,1)]));f=["doctype-"+d,""];k(g,"[]=",a.to_a(f));f[b(f.length,1)];return this.doctype=(f=["doctype",d],k(g,"[]=",a.to_a(f)),f[b(f.length,1)])}return c},Ea.$$arity=1),c)&&"update_doctype_attributes"})(d[0],p(d,"AbstractBlock"),d)}(l[0],l)};Opal.modules["asciidoctor/inline"]= -function(a){var b=[],g=a.nil,h=a.const_get_relative,m=a.module,q=a.klass,l=a.hash2,c=a.send,n=a.truthy;a.add_stubs("$attr_accessor $attr_reader $[] $convert $converter $attr $== $apply_reftext_subs $reftext".split(" "));return function(b,d){b=[m(b,"Asciidoctor")].concat(d);(function(b,$super,e){b=q(b,$super,"Inline");[b].concat(e);var d,p,h,m,v,r,t,z;b.$$prototype.text=b.$$prototype.type=g;b.$attr_accessor("text");b.$attr_reader("type");b.$attr_accessor("target");a.def(b,"$initialize",d=function(b, -e,f,p){d.$$p&&(d.$$p=null);null==f&&(f=g);null==p&&(p=l([],{}));c(this,a.find_super_dispatcher(this,"initialize",d,!1),[b,e,p],null);this.node_name="inline_"+e;this.text=f;this.id=p["$[]"]("id");this.type=p["$[]"]("type");return this.target=p["$[]"]("target")},d.$$arity=-3);a.def(b,"$block?",p=function(){return!1},p.$$arity=0);a.def(b,"$inline?",h=function(){return!0},h.$$arity=0);a.def(b,"$convert",m=function(){return this.$converter().$convert(this)},m.$$arity=0);a.alias(b,"render","convert");a.def(b, -"$alt",v=function(){var a;return n(a=this.$attr("alt"))?a:""},v.$$arity=0);a.def(b,"$reftext?",r=function(){var a,b;return n(a=this.text)?n(b=this.type["$=="]("ref"))?b:this.type["$=="]("bibref"):a},r.$$arity=0);a.def(b,"$reftext",t=function(){var a;return n(a=this.text)?this.$apply_reftext_subs(a):g},t.$$arity=0);return(a.def(b,"$xreftext",z=function(a){return this.$reftext()},z.$$arity=-1),g)&&"xreftext"})(b[0],h(b,"AbstractNode"),b)}(b[0],b)};Opal.modules["asciidoctor/list"]=function(a){var b= -[],g=a.nil,h=a.const_get_relative,m=a.module,q=a.klass,l=a.hash2,c=a.send,n=a.truthy;a.add_stubs("$== $next_list $callouts $class $object_id $inspect $size $items $attr_accessor $level $drop $nil_or_empty? $apply_subs $empty? $=== $[] $outline? $! $simple? $source $shift $context $parent".split(" "));return function(b,d){b=[m(b,"Asciidoctor")].concat(d);(function(b,$super,e){b=q(b,$super,"List");[b].concat(e);var d,p,h,m;b.$$prototype.context=b.$$prototype.document=b.$$prototype.style=g;a.alias(b, -"items","blocks");a.alias(b,"content","blocks");a.alias(b,"items?","blocks?");a.def(b,"$initialize",d=function(b,e,f){var g=d.$$p,p;g&&(d.$$p=null);var h=0;var m=arguments.length;for(p=Array(m);h<m;h++)p[h]=arguments[h];null==f&&(f=l([],{}));return c(this,a.find_super_dispatcher(this,"initialize",d,!1),p,g)},d.$$arity=-3);a.def(b,"$outline?",p=function(){var a;return n(a=this.context["$=="]("ulist"))?a:this.context["$=="]("olist")},p.$$arity=0);a.def(b,"$convert",h=function(){var b=h.$$p,e;b&&(h.$$p= -null);var d=0;var f=arguments.length;for(e=Array(f);d<f;d++)e[d]=arguments[d];return this.context["$=="]("colist")?(b=c(this,a.find_super_dispatcher(this,"convert",h,!1),e,b),this.document.$callouts().$next_list(),b):c(this,a.find_super_dispatcher(this,"convert",h,!1),e,b)},h.$$arity=0);a.alias(b,"render","convert");return(a.def(b,"$to_s",m=function(){return"#<"+this.$class()+"@"+this.$object_id()+" {context: "+this.context.$inspect()+", style: "+this.style.$inspect()+", items: "+this.$items().$size()+ -"}>"},m.$$arity=0),g)&&"to_s"})(b[0],h(b,"AbstractBlock"),b);(function(b,$super,e){b=q(b,$super,"ListItem");var d=[b].concat(e),p,l,m,v,r,t,z,A;b.$$prototype.text=b.$$prototype.subs=b.$$prototype.blocks=g;a.alias(b,"list","parent");b.$attr_accessor("marker");a.def(b,"$initialize",p=function(b,e){p.$$p&&(p.$$p=null);null==e&&(e=g);c(this,a.find_super_dispatcher(this,"initialize",p,!1),[b,"list_item"],null);this.text=e;this.level=b.$level();return this.subs=h(d,"NORMAL_SUBS").$drop(0)},p.$$arity=-2); -a.def(b,"$text?",l=function(){return n(this.text["$nil_or_empty?"]())?!1:!0},l.$$arity=0);a.def(b,"$text",m=function(){var a;return n(a=this.text)?this.$apply_subs(this.text,this.subs):a},m.$$arity=0);a.def(b,"$text=",v=function(a){return this.text=a},v.$$arity=1);a.def(b,"$simple?",r=function(){var a,b,c=g;return n(a=this.blocks["$empty?"]())?a:n(b=this.blocks.$size()["$=="](1)?h(d,"List")["$==="](c=this.blocks["$[]"](0)):this.blocks.$size()["$=="](1))?c["$outline?"]():b},r.$$arity=0);a.def(b,"$compound?", -t=function(){return this["$simple?"]()["$!"]()},t.$$arity=0);a.def(b,"$fold_first",z=function(){this.text=n(this.text["$nil_or_empty?"]())?this.blocks.$shift().$source():""+this.text+h(d,"LF")+this.blocks.$shift().$source();return g},z.$$arity=0);return(a.def(b,"$to_s",A=function(){var a;return"#<"+this.$class()+"@"+this.$object_id()+" {list_context: "+this.$parent().$context().$inspect()+", text: "+this.text.$inspect()+", blocks: "+(n(a=this.blocks)?a:[]).$size()+"}>"},A.$$arity=0),g)&&"to_s"})(b[0], -h(b,"AbstractBlock"),b)}(b[0],b)};Opal.modules["asciidoctor/parser"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}function g(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}function h(a,b){return"number"===typeof a&&"number"===typeof b?a<b:a["$<"](b)}function m(a,b){return"number"===typeof a&&"number"===typeof b?a>b:a["$>"](b)}function q(a,b){return"number"===typeof a&&"number"===typeof b?a*b:a["$*"](b)}var l=[],c=a.nil,n=a.const_get_qualified, -p=a.const_get_relative,r=a.module,t=a.klass,k=a.send,e=a.truthy,f=a.hash2,u=a.gvars;a.add_stubs("$include $new $proc $start_with? $match? $is_delimited_block? $private_class_method $parse_document_header $[] $has_more_lines? $next_section $assign_numeral $<< $blocks $skip_blank_lines $parse_block_metadata_lines $attributes $is_next_line_doctitle? $finalize_header $nil_or_empty? $title= $- $sourcemap $cursor $parse_section_title $id= $include? $sub_specialchars $[]= $sub_attributes $source_location= $header $attribute_locked? $id $clear $delete $instance_variable_get $parse_header_metadata $== $! $register $doctype $parse_manpage_header $=~ $downcase $error $logger $message_with_context $cursor_at_line $backend $save $update $is_next_line_section? $initialize_section $join $map $read_lines_until $lstrip $split $title $restore_save $discard_save $context $empty? $header? $!= $attr? $attr $key? $document $+ $level $special $sectname $to_i $< $> $warn $next_block $blocks? $style $context= $style= $parent= $size $content_model $shift $unwrap_standalone_preamble $source_location $merge $fetch $parse_block_metadata_line $extensions $block_macros? $mark $read_line $terminator $to_s $masq $to_sym $registered_for_block? $debug? $debug $cursor_at_mark $strict_verbatim_paragraphs $unshift_line $markdown_syntax $keys $chr $uniform? $length $end_with? $=== $parse_attributes $attribute_missing $tr $basename $assign_caption $registered_for_block_macro? $config $process_method $replace $parse_callout_list $callouts $parse_list $parse_description_list $underline_style_section_titles $is_section_title? $peek_line $atx_section_title? $generate_id $level= $read_paragraph_lines $adjust_indentation! $map! $slice $pop $build_block $apply_subs $chop $catalog_inline_anchors $rekey $index $strip $parse_table $each $raise $title? $update_attributes $commit_subs $sub? $catalog_callouts $source $remove_sub $block_terminates_paragraph $to_proc $nil? $lines $parse_blocks $parse_list_item $items $scan $gsub $count $advance $dup $match $callout_ids $next_list $catalog_inline_anchor $marker= $catalog_inline_biblio_anchor $set_option $text= $resolve_ordered_list_marker $read_lines_for_list_item $skip_line_comments $unshift_lines $fold_first $text? $is_sibling_list_item? $concat $find $casecmp $sectname= $special= $numbered= $numbered $lineno $peek_lines $setext_section_title? $abs $cursor_at_prev_line $process_attribute_entries $next_line_empty? $process_authors $apply_header_subs $rstrip $each_with_index $compact $squeeze $to_a $parse_style_attribute $process_attribute_entry $skip_comment_lines $store_attribute $sanitize_attribute_name $set_attribute $save_to $delete_attribute $ord $int_to_roman $resolve_list_marker $parse_colspecs $create_columns $has_header_option= $format $starts_with_delimiter? $close_open_cell $parse_cellspec $delimiter $match_delimiter $pre_match $post_match $buffer_has_unclosed_quotes? $skip_past_delimiter $buffer $buffer= $skip_past_escaped_delimiter $keep_cell_open $push_cellspec $close_cell $cell_open? $columns $assign_column_widths $partition_header_footer $upto $partition $shorthand_property_syntax $each_char $yield_buffered_attribute $any? $* $each_byte $%".split(" ")); -return function(d,l){d=[r(d,"Asciidoctor")].concat(l);(function(d,$super,l){d=t(d,$super,"Parser");var v=[d].concat(l),r,A,x,E,M,T,y,C,D,N,B,G,H,X,V,J,S,ia,la,Z,aa,na,ba,I,O,P,R,wa,da,xa,Y,ta,Ia,Ga,Ja,Xa,Qa,Ra,Da,Ka,Ya,Va,Za,$a,bb,Ua;d.$include(p(v,"Logging"));a.const_set(v[0],"BlockMatchData",p(v,"Struct").$new("context","masq","tip","terminator"));a.const_set(v[0],"TAB","\t");a.const_set(v[0],"TabIndentRx",/^\t+/);a.const_set(v[0],"StartOfBlockProc",k(d,"proc",[],(r=function(a){var b=r.$$s||this, -d,f;null==a&&(a=c);return e(d=e(f=a["$start_with?"]("["))?p(v,"BlockAttributeLineRx")["$match?"](a):f)?d:b["$is_delimited_block?"](a)},r.$$s=d,r.$$arity=1,r)));a.const_set(v[0],"StartOfListProc",k(d,"proc",[],(A=function(a){null==a&&(a=c);return p(v,"AnyListRx")["$match?"](a)},A.$$s=d,A.$$arity=1,A)));a.const_set(v[0],"StartOfBlockOrListProc",k(d,"proc",[],(x=function(a){var b=x.$$s||this,d,f,g;null==a&&(a=c);return e(d=e(f=b["$is_delimited_block?"](a))?f:e(g=a["$start_with?"]("["))?p(v,"BlockAttributeLineRx")["$match?"](a): -g)?d:p(v,"AnyListRx")["$match?"](a)},x.$$s=d,x.$$arity=1,x)));a.const_set(v[0],"NoOp",c);a.const_set(v[0],"AuthorKeys","author authorinitials firstname middlename lastname email".split(" "));a.const_set(v[0],"TableCellHorzAlignments",f(["<",">","^"],{"<":"left",">":"right","^":"center"}));a.const_set(v[0],"TableCellVertAlignments",f(["<",">","^"],{"<":"top",">":"bottom","^":"middle"}));a.const_set(v[0],"TableCellStyles",f("dsemhla".split(""),{d:"none",s:"strong",e:"emphasis",m:"monospaced",h:"header", -l:"literal",a:"asciidoc"}));d.$private_class_method("new");a.defs(d,"$parse",E=function(b,d,g){null==g&&(g=f([],{}));var k=this.$parse_document_header(b,d);if(!e(g["$[]"]("header_only")))for(;e(b["$has_more_lines?"]());){g=this.$next_section(b,d,k);k=a.to_ary(g);var w=null==k[0]?c:k[0];k=null==k[1]?c:k[1];g;e(w)&&(d.$assign_numeral(w),d.$blocks()["$<<"](w))}return d},E.$$arity=-3);a.defs(d,"$parse_document_header",M=function(d,g){var w,h,l,m=c,q=c;var n=e(d.$skip_blank_lines())?this.$parse_block_metadata_lines(d, -g):f([],{});var r=g.$attributes();if(e(e(w=h=this["$is_next_line_doctitle?"](d,n,r["$[]"]("leveloffset")))?n["$[]"]("title"):w))return g.$finalize_header(n,!1);if(!e((l=r["$[]"]("doctitle"))["$nil_or_empty?"]())){var t=[m=l];k(g,"title=",a.to_a(t));t[b(t.length,1)]}if(e(h)){e(g.$sourcemap())&&(q=d.$cursor());t=this.$parse_section_title(d,g);w=a.to_ary(t);g["$id="](null==w[0]?c:w[0]);h=null==w[2]?c:w[2];var u=null==w[4]?c:w[4];t;e(m)?h=c:(t=[h],k(g,"title=",a.to_a(t)),t[b(t.length,1)],e((t=["doctitle", -m=g.$sub_specialchars(h)],k(r,"[]=",a.to_a(t)),t[b(t.length,1)])["$include?"](p(v,"ATTR_REF_HEAD")))&&(t=["doctitle",m=g.$sub_attributes(m,f(["attribute_missing"],{attribute_missing:"skip"}))],k(r,"[]=",a.to_a(t)),t[b(t.length,1)]));e(q)&&(t=[q],k(g.$header(),"source_location=",a.to_a(t)),t[b(t.length,1)]);e(e(w=u)?w:g["$attribute_locked?"]("compat-mode"))||(t=["compat-mode",""],k(r,"[]=",a.to_a(t)),t[b(t.length,1)]);e(t=n["$[]"]("separator"))&&!e(g["$attribute_locked?"]("title-separator"))&&(t=["title-separator", -t],k(r,"[]=",a.to_a(t)),t[b(t.length,1)]);e(q=n["$[]"]("id"))?(t=[q],k(g,"id=",a.to_a(t)),t[b(t.length,1)]):q=g.$id();e(t=n["$[]"]("role"))&&(t=["role",t],k(r,"[]=",a.to_a(t)),t[b(t.length,1)]);e(t=n["$[]"]("reftext"))&&(t=["reftext",t],k(r,"[]=",a.to_a(t)),t[b(t.length,1)]);n.$clear();(t=g.$instance_variable_get("@attributes_modified")).$delete("doctitle");this.$parse_header_metadata(d,g);if(e(t["$include?"]("doctitle")))e(e(w=(l=r["$[]"]("doctitle"))["$nil_or_empty?"]())?w:l["$=="](m))?(t=["doctitle", -m],k(r,"[]=",a.to_a(t))):(t=[l],k(g,"title=",a.to_a(t))),t[b(t.length,1)];else if(e(h["$!"]()))t["$<<"]("doctitle");e(q)&&g.$register("refs",[q,g])}g.$doctype()["$=="]("manpage")&&this.$parse_manpage_header(d,g,n);return g.$finalize_header(n)},M.$$arity=2);a.defs(d,"$parse_manpage_header",T=function(d,g,h){var w,l,m,q,n=c,r=c,t=c,L=c,A=c,Q=c,z=Q=c,x=c,E=c,M=c;e(p(v,"ManpageTitleVolnumRx")["$=~"]((n=g.$attributes())["$[]"]("doctitle")))?(r=["manvolnum",t=(w=u["~"])===c?c:w["$[]"](2)],k(n,"[]=",a.to_a(r)), -r[b(r.length,1)],r=["mantitle",(e((L=(w=u["~"])===c?c:w["$[]"](1))["$include?"](p(v,"ATTR_REF_HEAD")))?g.$sub_attributes(L):L).$downcase()]):(this.$logger().$error(this.$message_with_context("non-conforming manpage title",f(["source_location"],{source_location:d.$cursor_at_line(1)}))),r=["mantitle",e(w=e(l=n["$[]"]("doctitle"))?l:n["$[]"]("docname"))?w:"command"],k(n,"[]=",a.to_a(r)),r[b(r.length,1)],r=["manvolnum",t="1"]);k(n,"[]=",a.to_a(r));r[b(r.length,1)];e(e(w=A=n["$[]"]("manname"))?n["$[]"]("manpurpose"): -w)?(e(w=n["$[]"]("manname-title"))?w:(r=["manname-title","Name"],k(n,"[]=",a.to_a(r)),r[b(r.length,1)]),r=["mannames",[A]],k(n,"[]=",a.to_a(r)),r[b(r.length,1)],g.$backend()["$=="]("manpage")&&(r=["docname",A],k(n,"[]=",a.to_a(r)),r[b(r.length,1)],r=["outfilesuffix","."+t],k(n,"[]=",a.to_a(r)),r[b(r.length,1)])):(d.$skip_blank_lines(),d.$save(),h.$update(this.$parse_block_metadata_lines(d,g)),e(Q=this["$is_next_line_section?"](d,f([],{})))?Q["$=="](1)?(Q=this.$initialize_section(d,g,f([],{})),z=k(d.$read_lines_until(f(["break_on_blank_lines", -"skip_line_comments"],{break_on_blank_lines:!0,skip_line_comments:!0})),"map",[],(m=function(a){null==a&&(a=c);return a.$lstrip()},m.$$s=this,m.$$arity=1,m)).$join(" "),e(p(v,"ManpageNamePurposeRx")["$=~"](z))?(e((A=(w=u["~"])===c?c:w["$[]"](1))["$include?"](p(v,"ATTR_REF_HEAD")))&&(A=g.$sub_attributes(A)),e(A["$include?"](","))?A=(x=k(A.$split(","),"map",[],(q=function(a){null==a&&(a=c);return a.$lstrip()},q.$$s=this,q.$$arity=1,q)))["$[]"](0):x=[A],e((E=(w=u["~"])===c?c:w["$[]"](2))["$include?"](p(v, -"ATTR_REF_HEAD")))&&(E=g.$sub_attributes(E)),e(w=n["$[]"]("manname-title"))?w:(r=["manname-title",Q.$title()],k(n,"[]=",a.to_a(r)),r[b(r.length,1)]),e(Q.$id())&&(r=["manname-id",Q.$id()],k(n,"[]=",a.to_a(r)),r[b(r.length,1)]),r=["manname",A],k(n,"[]=",a.to_a(r)),r[b(r.length,1)],r=["mannames",x],k(n,"[]=",a.to_a(r)),r[b(r.length,1)],r=["manpurpose",E],k(n,"[]=",a.to_a(r)),r[b(r.length,1)],g.$backend()["$=="]("manpage")&&(r=["docname",A],k(n,"[]=",a.to_a(r)),r[b(r.length,1)],r=["outfilesuffix","."+ -t],k(n,"[]=",a.to_a(r)),r[b(r.length,1)])):M="non-conforming name section body"):M="name section must be at level 1":M="name section expected",e(M)?(d.$restore_save(),this.$logger().$error(this.$message_with_context(M,f(["source_location"],{source_location:d.$cursor()}))),r=["manname",A=e(w=n["$[]"]("docname"))?w:"command"],k(n,"[]=",a.to_a(r)),r[b(r.length,1)],r=["mannames",[A]],k(n,"[]=",a.to_a(r)),r[b(r.length,1)],g.$backend()["$=="]("manpage")&&(r=["docname",A],k(n,"[]=",a.to_a(r)),r[b(r.length, -1)],r=["outfilesuffix","."+t],k(n,"[]=",a.to_a(r)),r[b(r.length,1)])):d.$discard_save());return c},T.$$arity=3);a.defs(d,"$next_section",y=function(d,l,q){var w,r,n,t,L,u,A=c,z,Q,x=c,E=Q=c,M;null==q&&(q=f([],{}));var T=L=u=!1;if(e(e(w=(r=l.$context()["$=="]("document"))?l.$blocks()["$empty?"]():l.$context()["$=="]("document"))?e(r=e(n=A=l["$header?"]())?n:q.$delete("invalid-header"))?r:this["$is_next_line_section?"](d,q)["$!"]():w)){var y=(z=l).$doctype()["$=="]("book");if(e(e(w=A)?w:e(r=y)?q["$[]"](1)["$!="]("abstract"): -r)){T=L=p(v,"Block").$new(l,"preamble",f(["content_model"],{content_model:"compound"}));if(e(e(w=y)?l["$attr?"]("preface-title"):w)){var C=[l.$attr("preface-title")];k(T,"title=",a.to_a(C));C[b(C.length,1)]}l.$blocks()["$<<"](T)}A=l;Q=0;if(e(l.$attributes()["$key?"]("fragment")))var D=-1;else e(y)?(w=[1,0],D=w[0],x=w[1],w):D=1}else y=(z=l.$document()).$doctype()["$=="]("book"),A=this.$initialize_section(d,l,q),q=e(Q=q["$[]"]("title"))?f(["title"],{title:Q}):f([],{}),D=g(Q=A.$level(),1),Q["$=="](0)? -u=y:e((w=Q["$=="](1))?A.$special():Q["$=="](1))&&!e(e(w=e(r=(E=A.$sectname())["$=="]("appendix"))?r:E["$=="]("preface"))?w:E["$=="]("abstract"))&&(D=c);for(d.$skip_blank_lines();e(d["$has_more_lines?"]());){this.$parse_block_metadata_lines(d,z,q);if(e(M=this["$is_next_line_section?"](d,q)))if(e(z["$attr?"]("leveloffset"))&&(M=g(M,z.$attr("leveloffset").$to_i()),e(h(M,0))&&(M=0)),e(m(M,Q)))e(D)?e(e(r=e(n=M["$=="](D))?n:e(t=x)?M["$=="](x):t)?r:h(D,0))||(r=e(x)?"expected levels "+x+" or "+D:"expected level "+ -D,this.$logger().$warn(this.$message_with_context("section title out of sequence: "+r+", got level "+M,f(["source_location"],{source_location:d.$cursor()})))):this.$logger().$error(this.$message_with_context(""+E+" sections do not support nested sections",f(["source_location"],{source_location:d.$cursor()}))),n=this.$next_section(d,A,q),r=a.to_ary(n),M=null==r[0]?c:r[0],q=null==r[1]?c:r[1],n,A.$assign_numeral(M),A.$blocks()["$<<"](M);else if(e((r=M["$=="](0))?A["$=="](z):M["$=="](0)))e(y)||this.$logger().$error(this.$message_with_context("level 0 sections can only be used when doctype is book", -f(["source_location"],{source_location:d.$cursor()}))),n=this.$next_section(d,A,q),r=a.to_ary(n),M=null==r[0]?c:r[0],q=null==r[1]?c:r[1],n,A.$assign_numeral(M),A.$blocks()["$<<"](M);else break;else if(C=d.$cursor(),e(M=this.$next_block(d,e(r=L)?r:A,q,f(["parse_metadata"],{parse_metadata:!1})))){if(e(u))if(e(A["$blocks?"]()["$!"]()))e(M.$style()["$!="]("partintro"))&&(M.$context()["$=="]("paragraph")?(C=["open"],k(M,"context=",a.to_a(C)),C[b(C.length,1)],C=["partintro"],k(M,"style=",a.to_a(C)),C[b(C.length, -1)]):(C=[L=p(v,"Block").$new(A,"open",f(["content_model"],{content_model:"compound"}))],k(M,"parent=",a.to_a(C)),C[b(C.length,1)],C=["partintro"],k(L,"style=",a.to_a(C)),C[b(C.length,1)],A.$blocks()["$<<"](L)));else if(A.$blocks().$size()["$=="](1)){var N=A.$blocks()["$[]"](0);e(e(r=L["$!"]())?N.$content_model()["$=="]("compound"):r)?this.$logger().$error(this.$message_with_context("illegal block content outside of partintro block",f(["source_location"],{source_location:C}))):e(N.$content_model()["$!="]("compound"))&& -(C=[L=p(v,"Block").$new(A,"open",f(["content_model"],{content_model:"compound"}))],k(M,"parent=",a.to_a(C)),C[b(C.length,1)],C=["partintro"],k(L,"style=",a.to_a(C)),C[b(C.length,1)],A.$blocks().$shift(),N.$style()["$=="]("partintro")&&(C=["paragraph"],k(N,"context=",a.to_a(C)),C[b(C.length,1)],C=[c],k(N,"style=",a.to_a(C)),C[b(C.length,1)]),L["$<<"](N),A.$blocks()["$<<"](L))}(e(r=L)?r:A).$blocks()["$<<"](M);q.$clear()}if(e(r=d.$skip_blank_lines()))r;else break}if(e(u))e(e(w=A["$blocks?"]())?A.$blocks()["$[]"](-1).$context()["$=="]("section"): -w)||this.$logger().$error(this.$message_with_context("invalid part, must have at least one section (e.g., chapter, appendix, etc.)",f(["source_location"],{source_location:d.$cursor()})));else if(e(T))if(e(T["$blocks?"]()))if(e(e(w=e(r=y)?r:z.$blocks()["$[]"](1))?w:p(v,"Compliance").$unwrap_standalone_preamble()["$!"]()))e(z.$sourcemap())&&(C=[T.$blocks()["$[]"](0).$source_location()],k(T,"source_location=",a.to_a(C)),C[b(C.length,1)]);else for(z.$blocks().$shift();e(d=T.$blocks().$shift());)z["$<<"](d); -else z.$blocks().$shift();return[e(A["$!="](l))?A:c,q.$merge()]},y.$$arity=-3);a.defs(d,"$next_block",C=function(d,l,q,r){try{var w,n,t,A,L,z,Q,x=c,E=c,Aa=c,M=c,C=c,T=c,y=c,D=c,N=c,B=c,V=c,qa=c,G=c,H=c,F=c,X=c,J=c,aa=c,na=c,S=c,ra=c,ja=c,ea=c,fa=c,sa=c,za=c,pa=c,ca=c,ia=c,va=c,Ra=c,la=c,Z=c,ua=c,ma=c,ba=c,I=c,Fa=c,O=c,P=c,Da=c,Ma=c,Ha=c,Wa=c,R=c,Ba=c,Na=c,Ka=c,Pa=c;null==u["~"]&&(u["~"]=c);null==q&&(q=f([],{}));null==r&&(r=f([],{}));if(!e(x=d.$skip_blank_lines()))return c;e(e(w=E=r["$[]"]("text_only"))? -m(x,0):w)&&(r.$delete("text_only"),E=c);Aa=l.$document();if(e(r.$fetch("parse_metadata",!0)))for(;e(this.$parse_block_metadata_line(d,Aa,q,r));)d.$shift(),e(n=d.$skip_blank_lines())?n:a.ret(c);e(M=Aa.$extensions())&&(w=[M["$blocks?"](),M["$block_macros?"]()],C=w[0],T=w[1],w);d.$mark();w=[d.$read_line(),Aa.$attributes(),q["$[]"](1)];y=w[0];D=w[1];N=w[2];w;B=V=qa=G=c;e(H=this["$is_delimited_block?"](y,!0))&&(V=qa=H.$context(),G=H.$terminator(),e(N)?N["$=="](V.$to_s())||(e(H.$masq()["$include?"](N))? -V=N.$to_sym():e(e(w=H.$masq()["$include?"]("admonition"))?p(v,"ADMONITION_STYLES")["$include?"](N):w)?V="admonition":e(e(w=C)?M["$registered_for_block?"](N,V):w)?V=N.$to_sym():(e(this.$logger()["$debug?"]())&&this.$logger().$debug(this.$message_with_context("unknown style for "+V+" block: "+N,f(["source_location"],{source_location:d.$cursor_at_mark()}))),N=V.$to_s())):N=(F=["style",V.$to_s()],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]));if(!e(H))for(;e(!0);){if(e(e(n=e(t=N)?p(v,"Compliance").$strict_verbatim_paragraphs(): -t)?p(v,"VERBATIM_STYLES")["$include?"](N):n)){V=N.$to_sym();d.$unshift_line(y);break}if(e(E))X=y["$start_with?"](" ",p(v,"TAB"));else if(J=p(v,"Compliance").$markdown_syntax(),e(y["$start_with?"](" "))){if(n=[!0," "],X=n[0],aa=n[1],n,e(e(n=e(t=J)?k(y.$lstrip(),"start_with?",a.to_a(p(v,"MARKDOWN_THEMATIC_BREAK_CHARS").$keys())):t)?p(v,"MarkdownThematicBreakRx")["$match?"](y):n)){B=p(v,"Block").$new(l,"thematic_break",f(["content_model"],{content_model:"empty"}));break}}else if(e(y["$start_with?"](p(v, -"TAB"))))n=[!0,p(v,"TAB")],X=n[0],aa=n[1],n;else if(n=[!1,y.$chr()],X=n[0],aa=n[1],n,na=e(J)?p(v,"HYBRID_LAYOUT_BREAK_CHARS"):p(v,"LAYOUT_BREAK_CHARS"),e(e(n=na["$key?"](aa))?e(J)?p(v,"ExtLayoutBreakRx")["$match?"](y):e(t=this["$uniform?"](y,aa,S=y.$length()))?m(S,2):t:n)){B=p(v,"Block").$new(l,na["$[]"](aa),f(["content_model"],{content_model:"empty"}));break}else if(e(e(n=y["$end_with?"]("]"))?y["$include?"]("::"):n))if(e(e(n=e(t=aa["$=="]("i"))?t:y["$start_with?"]("video:","audio:"))?p(v,"BlockMediaMacroRx")["$=~"](y): -n)){n=[((t=u["~"])===c?c:t["$[]"](1)).$to_sym(),(t=u["~"])===c?c:t["$[]"](2),(t=u["~"])===c?c:t["$[]"](3)];ra=n[0];ja=n[1];ea=n[2];n;B=p(v,"Block").$new(l,ra,f(["content_model"],{content_model:"empty"}));e(ea)&&(fa=ra,sa="video"["$==="](fa)?["poster","width","height"]:"audio"["$==="](fa)?[]:["alt","width","height"],B.$parse_attributes(ea,sa,f(["sub_input","into"],{sub_input:!0,into:q})));e(q["$key?"]("style"))&&q.$delete("style");if(e(ja["$include?"](p(v,"ATTR_REF_HEAD")))){if(e(e(n=e(t=(za=B.$sub_attributes(ja))["$empty?"]())? -(e(A=D["$[]"]("attribute-missing"))?A:p(v,"Compliance").$attribute_missing())["$=="]("drop-line"):t)?B.$sub_attributes(g(ja," "),f(["attribute_missing","drop_line_severity"],{attribute_missing:"drop-line",drop_line_severity:"ignore"}))["$empty?"]():n))return q.$clear(),c;ja=za}ra["$=="]("image")&&(Aa.$register("images",ja),F=["imagesdir",D["$[]"]("imagesdir")],k(q,"[]=",a.to_a(F)),F[b(F.length,1)],e(n=q["$[]"]("alt"))?n:(F=["alt",e(t=N)?t:(F=["default-alt",p(v,"Helpers").$basename(ja,!0).$tr("_-", -" ")],k(q,"[]=",a.to_a(F)),F[b(F.length,1)])],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]),e((pa=q.$delete("scaledwidth"))["$nil_or_empty?"]())||(F=["scaledwidth",e(p(v,"TrailingDigitsRx")["$match?"](pa))?""+pa+"%":pa],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]),e(q["$[]"]("title"))&&(F=[ca=q.$delete("title")],k(B,"title=",a.to_a(F)),F[b(F.length,1)],B.$assign_caption(q.$delete("caption"),"figure")));F=["target",ja];k(q,"[]=",a.to_a(F));F[b(F.length,1)];break}else if(e(e(n=(t=aa["$=="]("t"))?y["$start_with?"]("toc:"): -aa["$=="]("t"))?p(v,"BlockTocMacroRx")["$=~"](y):n)){B=p(v,"Block").$new(l,"toc",f(["content_model"],{content_model:"empty"}));e((n=u["~"])===c?c:n["$[]"](1))&&B.$parse_attributes((n=u["~"])===c?c:n["$[]"](1),[],f(["into"],{into:q}));break}else if(e(e(T)?e(n=e(t=p(v,"CustomBlockMacroRx")["$=~"](y))?ia=M["$registered_for_block_macro?"]((A=u["~"])===c?c:A["$[]"](1)):t)?n:va=this.$logger()["$debug?"]():e(n=this.$logger()["$debug?"]())?va=p(v,"CustomBlockMacroRx")["$=~"](y):n))if(e(va))this.$logger().$debug(this.$message_with_context("unknown name for block macro: "+ -((n=u["~"])===c?c:n["$[]"](1)),f(["source_location"],{source_location:d.$cursor_at_mark()})));else{Ra=(n=u["~"])===c?c:n["$[]"](3);if(e((ja=(n=u["~"])===c?c:n["$[]"](2))["$include?"](p(v,"ATTR_REF_HEAD")))){if(e(e(n=e(t=(za=l.$sub_attributes(ja))["$empty?"]())?(e(A=D["$[]"]("attribute-missing"))?A:p(v,"Compliance").$attribute_missing())["$=="]("drop-line"):t)?l.$sub_attributes(g(ja," "),f(["attribute_missing","drop_line_severity"],{attribute_missing:"drop-line",drop_line_severity:"ignore"}))["$empty?"](): -n))return q.$clear(),c;ja=za}(la=ia.$config())["$[]"]("content_model")["$=="]("attributes")?e(Ra)&&Aa.$parse_attributes(Ra,e(n=e(t=la["$[]"]("positional_attrs"))?t:la["$[]"]("pos_attrs"))?n:[],f(["sub_input","into"],{sub_input:!0,into:q})):(F=["text",e(n=Ra)?n:""],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]);e(Z=la["$[]"]("default_attrs"))&&k(q,"update",[Z],(L=function(a,b){null==b&&(b=c);return b},L.$$s=this,L.$$arity=2,L));if(e(B=ia.$process_method()["$[]"](l,ja,q))){q.$replace(B.$attributes());break}else return q.$clear(), -c}if(e(e(n=e(t=X["$!"]())?(aa=e(A=aa)?A:y.$chr())["$=="]("<"):t)?p(v,"CalloutListRx")["$=~"](y):n)){d.$unshift_line(y);B=this.$parse_callout_list(d,u["~"],l,Aa.$callouts());F=["style","arabic"];k(q,"[]=",a.to_a(F));F[b(F.length,1)];break}else if(e(p(v,"UnorderedListRx")["$match?"](y))){d.$unshift_line(y);e(e(n=e(t=N["$!"]())?p(v,"Section")["$==="](l):t)?l.$sectname()["$=="]("bibliography"):n)&&(F=["style",N="bibliography"],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]);B=this.$parse_list(d,"ulist",l,N);break}else if(e(p(v, -"OrderedListRx")["$match?"](y))){d.$unshift_line(y);B=this.$parse_list(d,"olist",l,N);e(B.$style())&&(F=["style",B.$style()],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]);break}else if(e(e(n=e(t=y["$include?"]("::"))?t:y["$include?"](";;"))?p(v,"DescriptionListRx")["$=~"](y):n)){d.$unshift_line(y);B=this.$parse_description_list(d,u["~"],l);break}else if(e(e(n=e(t=N["$=="]("float"))?t:N["$=="]("discrete"))?e(p(v,"Compliance").$underline_style_section_titles())?this["$is_section_title?"](y,d.$peek_line()): -e(t=X["$!"]())?this["$atx_section_title?"](y):t:n)){d.$unshift_line(y);t=this.$parse_section_title(d,Aa,q["$[]"]("id"));n=a.to_ary(t);ua=null==n[0]?c:n[0];ma=null==n[1]?c:n[1];ca=null==n[2]?c:n[2];ba=null==n[3]?c:n[3];t;e(ma)&&(F=["reftext",ma],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]);B=p(v,"Block").$new(l,"floating_title",f(["content_model"],{content_model:"empty"}));F=[ca];k(B,"title=",a.to_a(F));F[b(F.length,1)];q.$delete("title");F=[e(n=ua)?n:e(D["$key?"]("sectids"))?p(v,"Section").$generate_id(B.$title(), -Aa):c];k(B,"id=",a.to_a(F));F[b(F.length,1)];F=[ba];k(B,"level=",a.to_a(F));F[b(F.length,1)];break}else if(e(e(n=N)?N["$!="]("normal"):n))if(e(p(v,"PARAGRAPH_STYLES")["$include?"](N))){V=N.$to_sym();qa="paragraph";d.$unshift_line(y);break}else if(e(p(v,"ADMONITION_STYLES")["$include?"](N))){V="admonition";qa="paragraph";d.$unshift_line(y);break}else if(e(e(n=C)?M["$registered_for_block?"](N,"paragraph"):n)){V=N.$to_sym();qa="paragraph";d.$unshift_line(y);break}else e(this.$logger()["$debug?"]())&& -this.$logger().$debug(this.$message_with_context("unknown style for paragraph: "+N,f(["source_location"],{source_location:d.$cursor_at_mark()}))),N=c;d.$unshift_line(y);if(e(e(n=X)?N["$!"]():n))I=this.$read_paragraph_lines(d,Fa=x["$=="](0)?r["$[]"]("list_type"):c,f(["skip_line_comments"],{skip_line_comments:E})),this["$adjust_indentation!"](I),B=e(e(n=E)?n:Fa["$=="]("dlist"))?p(v,"Block").$new(l,"paragraph",f(["content_model","source","attributes"],{content_model:"simple",source:I,attributes:q})): -p(v,"Block").$new(l,"literal",f(["content_model","source","attributes"],{content_model:"verbatim",source:I,attributes:q}));else{I=this.$read_paragraph_lines(d,(n=x["$=="](0))?r["$[]"]("list_type"):x["$=="](0),f(["skip_line_comments"],{skip_line_comments:!0}));if(e(E)){if(e(e(n=X)?N["$=="]("normal"):n))this["$adjust_indentation!"](I);B=p(v,"Block").$new(l,"paragraph",f(["content_model","source","attributes"],{content_model:"simple",source:I,attributes:q}))}else if(e(e(n=e(t=p(v,"ADMONITION_STYLE_HEADS")["$include?"](aa))? -y["$include?"](":"):t)?p(v,"AdmonitionParagraphRx")["$=~"](y):n))F=[0,(n=u["~"])===c?c:n.$post_match()],k(I,"[]=",a.to_a(F)),F[b(F.length,1)],F=["name",O=(F=["style",(n=u["~"])===c?c:n["$[]"](1)],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]).$downcase()],k(q,"[]=",a.to_a(F)),F[b(F.length,1)],F=["textlabel",e(n=q.$delete("caption"))?n:D["$[]"](""+O+"-caption")],k(q,"[]=",a.to_a(F)),F[b(F.length,1)],B=p(v,"Block").$new(l,"admonition",f(["content_model","source","attributes"],{content_model:"simple",source:I, -attributes:q}));else if(e(e(n=e(t=J)?aa["$=="](">"):t)?y["$start_with?"]("> "):n)){k(I,"map!",[],(z=function(a){null==a&&(a=c);return a["$=="](">")?a.$slice(1,a.$length()):e(a["$start_with?"]("> "))?a.$slice(2,a.$length()):a},z.$$s=this,z.$$arity=1,z));if(e(I["$[]"](-1)["$start_with?"]("-- "))&&(P=(P=I.$pop()).$slice(3,P.$length()),!e(I["$empty?"]())))for(;e(I["$[]"](-1)["$empty?"]());)I.$pop();F=["style","quote"];k(q,"[]=",a.to_a(F));F[b(F.length,1)];B=this.$build_block("quote","compound",!1,l,p(v, -"Reader").$new(I),q);e(P)&&(t=B.$apply_subs(P).$split(", ",2),n=a.to_ary(t),Da=null==n[0]?c:n[0],Ma=null==n[1]?c:n[1],t,e(Da)&&(F=["attribution",Da],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]),e(Ma)&&(F=["citetitle",Ma],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]))}else if(e(e(n=e(t=(A=aa["$=="]('"'))?m(I.$size(),1):aa["$=="]('"'))?I["$[]"](-1)["$start_with?"]("-- "):t)?I["$[]"](-2)["$end_with?"]('"'):n)){F=[0,y.$slice(1,y.$length())];k(I,"[]=",a.to_a(F));F[b(F.length,1)];for(P=(P=I.$pop()).$slice(3,P.$length());e(I["$[]"](-1)["$empty?"]());)I.$pop(); -I["$<<"](I.$pop().$chop());F=["style","quote"];k(q,"[]=",a.to_a(F));F[b(F.length,1)];B=p(v,"Block").$new(l,"quote",f(["content_model","source","attributes"],{content_model:"simple",source:I,attributes:q}));t=B.$apply_subs(P).$split(", ",2);n=a.to_ary(t);Da=null==n[0]?c:n[0];Ma=null==n[1]?c:n[1];t;e(Da)&&(F=["attribution",Da],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]);e(Ma)&&(F=["citetitle",Ma],k(q,"[]=",a.to_a(F)),F[b(F.length,1)])}else{if(e(e(n=X)?N["$=="]("normal"):n))this["$adjust_indentation!"](I); -B=p(v,"Block").$new(l,"paragraph",f(["content_model","source","attributes"],{content_model:"simple",source:I,attributes:q}))}this.$catalog_inline_anchors(I.$join(p(v,"LF")),B,Aa,d)}break}if(!e(B))if(fa=V,"listing"["$==="](fa)||"source"["$==="](fa))e(e(w=V["$=="]("source"))?w:e(n=q["$[]"](1)["$!"]())?Ha=e(t=q["$[]"](2))?t:D["$[]"]("source-language"):n)&&(e(Ha)?(F=["style","source"],k(q,"[]=",a.to_a(F)),F[b(F.length,1)],F=["language",Ha],k(q,"[]=",a.to_a(F)),F[b(F.length,1)],p(v,"AttributeList").$rekey(q, -[c,c,"linenums"])):(p(v,"AttributeList").$rekey(q,[c,"language","linenums"]),!e(q["$key?"]("language"))&&e(D["$key?"]("source-language"))&&(F=["language",D["$[]"]("source-language")],k(q,"[]=",a.to_a(F)),F[b(F.length,1)])),!e(q["$key?"]("linenums"))&&e(e(w=q["$[]"]("linenums-option"))?w:D["$[]"]("source-linenums-option"))&&(F=["linenums",""],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]),!e(q["$key?"]("indent"))&&e(D["$key?"]("source-indent"))&&(F=["indent",D["$[]"]("source-indent")],k(q,"[]=",a.to_a(F)), -F[b(F.length,1)])),B=this.$build_block("listing","verbatim",G,l,d,q);else if("fenced_code"["$==="](fa))F=["style","source"],k(q,"[]=",a.to_a(F)),F[b(F.length,1)],e(m(S=y.$length(),3))&&(e(Wa=(Ha=y.$slice(3,S)).$index(","))?e(m(Wa,0))?(Ha=Ha.$slice(0,Wa).$strip(),e(h(Wa,b(S,4)))&&(F=["linenums",""],k(q,"[]=",a.to_a(F)),F[b(F.length,1)])):e(m(S,4))&&(F=["linenums",""],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]):Ha=Ha.$lstrip()),e(Ha["$nil_or_empty?"]())?e(D["$key?"]("source-language"))&&(F=["language",D["$[]"]("source-language")], -k(q,"[]=",a.to_a(F)),F[b(F.length,1)]):(F=["language",Ha],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]),!e(q["$key?"]("linenums"))&&e(e(w=q["$[]"]("linenums-option"))?w:D["$[]"]("source-linenums-option"))&&(F=["linenums",""],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]),!e(q["$key?"]("indent"))&&e(D["$key?"]("source-indent"))&&(F=["indent",D["$[]"]("source-indent")],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]),G=G.$slice(0,3),B=this.$build_block("listing","verbatim",G,l,d,q);else if("table"["$==="](fa))R=d.$cursor(), -Ba=p(v,"Reader").$new(d.$read_lines_until(f(["terminator","skip_line_comments","context","cursor"],{terminator:G,skip_line_comments:!0,context:"table",cursor:"at_mark"})),R),e(G["$start_with?"]("|","!"))||(e(w=q["$[]"]("format"))?w:(F=["format",e(G["$start_with?"](","))?"csv":"dsv"],k(q,"[]=",a.to_a(F)),F[b(F.length,1)])),B=this.$parse_table(Ba,l,q);else if("sidebar"["$==="](fa))B=this.$build_block(V,"compound",G,l,d,q);else if("admonition"["$==="](fa))F=["name",O=N.$downcase()],k(q,"[]=",a.to_a(F)), -F[b(F.length,1)],F=["textlabel",e(w=q.$delete("caption"))?w:D["$[]"](""+O+"-caption")],k(q,"[]=",a.to_a(F)),F[b(F.length,1)],B=this.$build_block(V,"compound",G,l,d,q);else if("open"["$==="](fa)||"abstract"["$==="](fa)||"partintro"["$==="](fa))B=this.$build_block("open","compound",G,l,d,q);else if("literal"["$==="](fa))B=this.$build_block(V,"verbatim",G,l,d,q);else if("example"["$==="](fa))e(q["$[]"]("collapsible-option"))&&(F=["caption",""],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]),B=this.$build_block(V, -"compound",G,l,d,q);else if("quote"["$==="](fa)||"verse"["$==="](fa))p(v,"AttributeList").$rekey(q,[c,"attribution","citetitle"]),B=this.$build_block(V,V["$=="]("verse")?"verbatim":"compound",G,l,d,q);else if("stem"["$==="](fa)||"latexmath"["$==="](fa)||"asciimath"["$==="](fa))V["$=="]("stem")&&(F=["style",p(v,"STEM_TYPE_ALIASES")["$[]"](e(w=q["$[]"](2))?w:D["$[]"]("stem"))],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]),B=this.$build_block("stem","raw",G,l,d,q);else if("pass"["$==="](fa))B=this.$build_block(V, -"raw",G,l,d,q);else{if("comment"["$==="](fa))return this.$build_block(V,"skip",G,l,d,q),q.$clear(),c;if(e(e(w=C)?ia=M["$registered_for_block?"](V,qa):w)){if((Na=(la=ia.$config())["$[]"]("content_model"))["$=="]("skip")||(e((Ka=e(w=la["$[]"]("positional_attrs"))?w:la["$[]"]("pos_attrs"))["$nil_or_empty?"]())||p(v,"AttributeList").$rekey(q,g([c],Ka)),e(Z=la["$[]"]("default_attrs"))&&k(Z,"each",[],(Q=function(d,f){var g;null==d&&(d=c);null==f&&(f=c);return e(g=q["$[]"](d))?g:(F=[d,f],k(q,"[]=",a.to_a(F)), -F[b(F.length,1)])},Q.$$s=this,Q.$$arity=2,Q)),F=["cloaked-context",qa],k(q,"[]=",a.to_a(F)),F[b(F.length,1)]),!e(B=this.$build_block(V,Na,G,l,d,q,f(["extension"],{extension:ia}))))return q.$clear(),c}else this.$raise("Unsupported block type "+V+" at "+d.$cursor())}e(Aa.$sourcemap())&&(F=[d.$cursor_at_mark()],k(B,"source_location=",a.to_a(F)),F[b(F.length,1)]);e(q["$[]"]("title"))&&(F=[ca=q.$delete("title")],k(B,"title=",a.to_a(F)),F[b(F.length,1)],e(p(v,"CAPTION_ATTRIBUTE_NAMES")["$[]"](B.$context()))&& -B.$assign_caption(q.$delete("caption")));F=[q["$[]"]("style")];k(B,"style=",a.to_a(F));F[b(F.length,1)];e(Pa=e(w=B.$id())?w:(F=[q["$[]"]("id")],k(B,"id=",a.to_a(F)),F[b(F.length,1)]))&&(e(e(ca)?ca["$include?"](p(v,"ATTR_REF_HEAD")):B["$title?"]())&&B.$title(),e(Aa.$register("refs",[Pa,B]))||this.$logger().$warn(this.$message_with_context("id assigned to block already in use: "+Pa,f(["source_location"],{source_location:d.$cursor_at_mark()}))));e(q["$empty?"]())||B.$update_attributes(q);B.$commit_subs(); -e(B["$sub?"]("callouts"))&&!e(this.$catalog_callouts(B.$source(),Aa))&&B.$remove_sub("callouts");return B}catch(jb){if(jb===a.returner)return jb.$v;throw jb;}},C.$$arity=-3);a.defs(d,"$read_paragraph_lines",D=function(c,d,g){null==g&&(g=f([],{}));var w=["break_on_blank_lines",!0];k(g,"[]=",a.to_a(w));w[b(w.length,1)];w=["break_on_list_continuation",!0];k(g,"[]=",a.to_a(w));w[b(w.length,1)];w=["preserve_last_line",!0];k(g,"[]=",a.to_a(w));w[b(w.length,1)];d=e(d)?e(p(v,"Compliance").$block_terminates_paragraph())? -p(v,"StartOfBlockOrListProc"):p(v,"StartOfListProc"):e(p(v,"Compliance").$block_terminates_paragraph())?p(v,"StartOfBlockProc"):p(v,"NoOp");return k(c,"read_lines_until",[g],d.$to_proc())},D.$$arity=-3);a.defs(d,"$is_delimited_block?",N=function(d,f){var g,k;null==f&&(f=c);if(!e(e(g=m(k=d.$length(),1))?p(v,"DELIMITED_BLOCK_HEADS")["$[]"](d.$slice(0,2)):g))return c;if(k["$=="](2)){var w=d;var l=2}else if(e(h(k,5))?(w=d,l=k):w=d.$slice(0,l=4),e(e(g=p(v,"Compliance").$markdown_syntax())?w["$start_with?"]("`"): -g))if(l["$=="](4))if(!w["$=="]("````")&&(w=w.$chop())["$=="]("```"))d=w,k=l=3;else return c;else{if(!w["$=="]("```"))return c}else if(l["$=="](3))return c;var q=p(v,"DELIMITED_BLOCKS")["$[]"](w);g=a.to_ary(q);var n=null==g[0]?c:g[0];var r=null==g[1]?c:g[1];q;return e(e(g=n)?e(q=k["$=="](l))?q:this["$uniform?"](d.$slice(1,k),p(v,"DELIMITED_BLOCK_TAILS")["$[]"](w),b(k,1)):g)?e(f)?p(v,"BlockMatchData").$new(n,r,w,d):!0:c},N.$$arity=-2);a.defs(d,"$build_block",B=function(a,b,d,g,k,l,h){var w,q,n;null== -h&&(h=f([],{}));b["$=="]("skip")?(w=[!0,"simple"],q=w[0],n=w[1]):b["$=="]("raw")?(w=[!1,"simple"],q=w[0],n=w[1]):(w=[!1,b],q=w[0],n=w[1]);w;if(e(d["$nil?"]()))n["$=="]("verbatim")?n=k.$read_lines_until(f(["break_on_blank_lines","break_on_list_continuation"],{break_on_blank_lines:!0,break_on_list_continuation:!0})):(b["$=="]("compound")&&(b="simple"),n=this.$read_paragraph_lines(k,!1,f(["skip_line_comments","skip_processing"],{skip_line_comments:!0,skip_processing:q}))),d=c;else if(e(n["$!="]("compound")))n= -k.$read_lines_until(f(["terminator","skip_processing","context","cursor"],{terminator:d,skip_processing:q,context:a,cursor:"at_mark"})),d=c;else if(d["$=="](!1))n=c,d=k;else{n=c;var r=k.$cursor();d=p(v,"Reader").$new(k.$read_lines_until(f(["terminator","skip_processing","context","cursor"],{terminator:d,skip_processing:q,context:a,cursor:"at_mark"})),r)}if(b["$=="]("verbatim"))if(k=(e(w=l["$[]"]("tabsize"))?w:g.$document().$attributes()["$[]"]("tabsize")).$to_i(),e(q=l["$[]"]("indent")))this["$adjust_indentation!"](n, -q.$to_i(),k);else{if(e(m(k,0)))this["$adjust_indentation!"](n,-1,k)}else if(b["$=="]("skip"))return c;if(e(h=h["$[]"]("extension")))if(l.$delete("style"),e(a=h.$process_method()["$[]"](g,e(w=d)?w:p(v,"Reader").$new(n),l.$merge())))l.$replace(a.$attributes()),e(a.$content_model()["$=="]("compound")?(n=a.$lines())["$empty?"]()["$!"]():a.$content_model()["$=="]("compound"))&&(b="compound",d=p(v,"Reader").$new(n));else return c;else a=p(v,"Block").$new(g,a,f(["content_model","source","attributes"],{content_model:b, -source:n,attributes:l}));b["$=="]("compound")&&this.$parse_blocks(d,a);return a},B.$$arity=-7);a.defs(d,"$parse_blocks",G=function(a,b,d){var f,g,k=c;null==d&&(d=c);if(e(d))for(;e(e(f=e(g=k=this.$next_block(a,b,d.$merge()))?b.$blocks()["$<<"](k):g)?f:a["$has_more_lines?"]()););else for(;e(e(f=e(g=k=this.$next_block(a,b))?b.$blocks()["$<<"](k):g)?f:a["$has_more_lines?"]()););return c},G.$$arity=-3);a.defs(d,"$parse_list",H=function(a,b,d,f){var g,k;null==u["~"]&&(u["~"]=c);d=p(v,"List").$new(d,b); -for(b=p(v,"ListRxMap")["$[]"](b);e(e(g=a["$has_more_lines?"]())?b["$=~"](a.$peek_line()):g);){if(e(k=this.$parse_list_item(a,d,u["~"],(g=u["~"])===c?c:g["$[]"](1),f)))d.$items()["$<<"](k);if(e(g=a.$skip_blank_lines()))g;else break}return d},H.$$arity=4);a.defs(d,"$catalog_callouts",X=function(a,b){var d,f=c,w=c;f=!1;w=0;e(a["$include?"]("<"))&&k(a,"scan",[p(v,"CalloutScanRx")],(d=function(){var a;e(((a=u["~"])===c?c:a["$[]"](0))["$start_with?"]("\\"))||b.$callouts().$register(((a=u["~"])===c?c:a["$[]"](2))["$=="](".")? -(w=g(w,1)).$to_s():(a=u["~"])===c?c:a["$[]"](2));return f=!0},d.$$s=this,d.$$arity=0,d));return f},X.$$arity=2);a.defs(d,"$catalog_inline_anchor",V=function(a,b,d,g,k){var w;null==k&&(k=d.$document());e(e(w=b)?b["$include?"](p(v,"ATTR_REF_HEAD")):w)&&(b=k.$sub_attributes(b));e(k.$register("refs",[a,p(v,"Inline").$new(d,"anchor",b,f(["type","id"],{type:"ref",id:a}))]))||(e(p(v,"Reader")["$==="](g))&&(g=g.$cursor()),this.$logger().$warn(this.$message_with_context("id assigned to anchor already in use: "+ -a,f(["source_location"],{source_location:g}))));return c},V.$$arity=-5);a.defs(d,"$catalog_inline_anchors",J=function(a,b,d,l){var w,h;e(e(w=a["$include?"]("[["))?w:a["$include?"]("or:"))&&k(a,"scan",[p(v,"InlineAnchorScanRx")],(h=function(){var a=h.$$s||this,k,w,q,n,r=c,t=c;if(e(n=(k=u["~"])===c?c:k["$[]"](1))){if(e(e(k=e(w=r=(q=u["~"])===c?c:q["$[]"](2))?r["$include?"](p(v,"ATTR_REF_HEAD")):w)?(r=d.$sub_attributes(r))["$empty?"]():k))return c}else if(n=(k=u["~"])===c?c:k["$[]"](3),e(r=(k=u["~"])=== -c?c:k["$[]"](4)))if(e(r["$include?"]("]")))r=r.$gsub("\\]","]"),e(r["$include?"](p(v,"ATTR_REF_HEAD")))&&(r=d.$sub_attributes(r));else if(e(e(k=r["$include?"](p(v,"ATTR_REF_HEAD")))?(r=d.$sub_attributes(r))["$empty?"]():k))return c;if(e(d.$register("refs",[n,p(v,"Inline").$new(b,"anchor",r,f(["type","id"],{type:"ref",id:n}))])))return c;w=l.$cursor_at_mark();e(m(t=g(((k=u["~"])===c?c:k.$pre_match()).$count(p(v,"LF")),e(((k=u["~"])===c?c:k["$[]"](0))["$start_with?"](p(v,"LF")))?1:0),0))&&(w=w.$dup()).$advance(t); -return a.$logger().$warn(a.$message_with_context("id assigned to anchor already in use: "+n,f(["source_location"],{source_location:w})))},h.$$s=this,h.$$arity=0,h));return c},J.$$arity=4);a.defs(d,"$catalog_inline_biblio_anchor",S=function(a,b,d,g){e(d.$document().$register("refs",[a,p(v,"Inline").$new(d,"anchor",e(b)?"["+b+"]":b,f(["type","id"],{type:"bibref",id:a}))]))||this.$logger().$warn(this.$message_with_context("id assigned to bibliography anchor already in use: "+a,f(["source_location"], -{source_location:g.$cursor()})));return c},S.$$arity=4);a.defs(d,"$parse_description_list",ia=function(d,f,g){var w;null==u["~"]&&(u["~"]=c);g=p(v,"List").$new(g,"dlist");var l=p(v,"DescriptionListSiblingRx")["$[]"](f["$[]"](2));for(g.$items()["$<<"](f=this.$parse_list_item(d,g,f,l));e(e(w=d["$has_more_lines?"]())?l["$=~"](d.$peek_line()):w);){var h=this.$parse_list_item(d,g,u["~"],l);if(e(f["$[]"](1)))g.$items()["$<<"](f=h);else f["$[]"](0)["$<<"](h["$[]"](0)["$[]"](0)),h=[1,h["$[]"](1)],k(f,"[]=", -a.to_a(h)),h[b(h.length,1)]}return g},ia.$$arity=3);a.defs(d,"$parse_callout_list",la=function(d,l,h,m){var w,q,n,r;h=p(v,"List").$new(h,"colist");var t=1;for(n=0;e(e(w=l)?w:e(q=l=p(v,"CalloutListRx").$match(d.$peek_line()))?d.$mark():q);)(r=l["$[]"](1))["$=="](".")&&(r=(n=g(n,1)).$to_s()),r["$=="](t.$to_s())||this.$logger().$warn(this.$message_with_context("callout list item index: expected "+t+", got "+r,f(["source_location"],{source_location:d.$cursor_at_mark()}))),e(l=this.$parse_list_item(d, -h,l,"<1>"))&&(h.$items()["$<<"](l),e((r=m.$callout_ids(h.$items().$size()))["$empty?"]())?this.$logger().$warn(this.$message_with_context("no callout found for <"+h.$items().$size()+">",f(["source_location"],{source_location:d.$cursor_at_mark()}))):(r=["coids",r],k(l.$attributes(),"[]=",a.to_a(r)),r[b(r.length,1)])),t=g(t,1),l=c;m.$next_list();return h},la.$$arity=4);a.defs(d,"$parse_list_item",Z=function(d,g,l,h,m){var w,q,n,r=c,t=c,A,z=c,x=c,L,Q=c,E=c;null==m&&(m=c);if((n=g.$context())["$=="]("dlist")){if(r= -!0,t=p(v,"ListItem").$new(g,m=l["$[]"](1)),e(e(w=m["$start_with?"]("[["))?p(v,"LeadingInlineAnchorRx")["$=~"](m):w)&&this.$catalog_inline_anchor((w=u["~"])===c?c:w["$[]"](1),e(w=(q=u["~"])===c?c:q["$[]"](2))?w:((q=u["~"])===c?c:q.$post_match()).$lstrip(),t,d),e(A=l["$[]"](3))&&(z=!0),l=p(v,"ListItem").$new(g,A),e(g.$document().$sourcemap())){var F=[d.$cursor()];k(t,"source_location=",a.to_a(F));F[b(F.length,1)];e(z)?(F=[t.$source_location()],k(l,"source_location=",a.to_a(F)),F[b(F.length,1)]):x=!0}}else if(z= -!0,l=p(v,"ListItem").$new(g,A=l["$[]"](2)),e(g.$document().$sourcemap())&&(F=[d.$cursor()],k(l,"source_location=",a.to_a(F)),F[b(F.length,1)]),n["$=="]("ulist"))F=[h],k(l,"marker=",a.to_a(F)),F[b(F.length,1)],e(A["$start_with?"]("["))&&(e(e(w=m)?m["$=="]("bibliography"):w)?e(p(v,"InlineBiblioAnchorRx")["$=~"](A))&&this.$catalog_inline_biblio_anchor((w=u["~"])===c?c:w["$[]"](1),(w=u["~"])===c?c:w["$[]"](2),l,d):e(A["$start_with?"]("[["))?e(p(v,"LeadingInlineAnchorRx")["$=~"](A))&&this.$catalog_inline_anchor((w= -u["~"])===c?c:w["$[]"](1),(w=u["~"])===c?c:w["$[]"](2),l,d):e(A["$start_with?"]("[ ] ","[x] ","[*] "))&&(g.$set_option("checklist"),F=["checkbox",""],k(l.$attributes(),"[]=",a.to_a(F)),F[b(F.length,1)],e(A["$start_with?"]("[ "))||(F=["checked",""],k(l.$attributes(),"[]=",a.to_a(F)),F[b(F.length,1)]),F=[A.$slice(4,A.$length())],k(l,"text=",a.to_a(F)),F[b(F.length,1)]));else{if(n["$=="]("olist")){q=this.$resolve_ordered_list_marker(h,L=g.$items().$size(),!0,d);w=a.to_ary(q);h=null==w[0]?c:w[0];var y= -null==w[1]?c:w[1];q;F=[h];k(l,"marker=",a.to_a(F));F[b(F.length,1)];e((w=L["$=="](0))?m["$!"]():L["$=="](0))&&(F=[e(w=y)?w:(e(q=p(v,"ORDERED_LIST_STYLES")["$[]"](b(h.$length(),1)))?q:"arabic").$to_s()],k(g,"style=",a.to_a(F)),F[b(F.length,1)])}else F=[h],k(l,"marker=",a.to_a(F)),F[b(F.length,1)];e(e(w=A["$start_with?"]("[["))?p(v,"LeadingInlineAnchorRx")["$=~"](A):w)&&this.$catalog_inline_anchor((w=u["~"])===c?c:w["$[]"](1),(w=u["~"])===c?c:w["$[]"](2),l,d)}d.$shift();g=d.$cursor();d=p(v,"Reader").$new(this.$read_lines_for_list_item(d, -n,h,z),g);if(e(d["$has_more_lines?"]())){e(x)&&(F=[g],k(l,"source_location=",a.to_a(F)),F[b(F.length,1)]);x=d.$skip_line_comments();e(h=d.$peek_line())&&(e(x["$empty?"]())||d.$unshift_lines(x),e(h["$empty?"]())||(Q=!0,e(r)||(z=c)));if(e(z=this.$next_block(d,l,f([],{}),f(["text_only","list_type"],{text_only:e(z)?c:!0,list_type:n}))))l.$blocks()["$<<"](z);for(;e(d["$has_more_lines?"]());)if(e(z=this.$next_block(d,l,f([],{}),f(["list_type"],{list_type:n}))))l.$blocks()["$<<"](z);e(e(w=e(q=Q)?E=l.$blocks()["$[]"](0): -q)?E.$context()["$=="]("paragraph"):w)&&l.$fold_first()}return e(r)?[[t],e(e(w=l["$text?"]())?w:l["$blocks?"]())?l:c]:l},Z.$$arity=-5);a.defs(d,"$read_lines_for_list_item",aa=function(d,g,l,h){var w,m,q,n,r,t,A,z=c,x=c,L=c,Q=c,E=c,F=c,y=c,M=c;x=y=M=c;null==l&&(l=c);null==h&&(h=!0);z=[];x="inactive";L=!1;Q=c;for(E=g["$=="]("dlist");e(d["$has_more_lines?"]());){F=d.$read_line();if(e(this["$is_sibling_list_item?"](F,g,l)))break;y=e(z["$empty?"]())?c:z["$[]"](-1);if(y["$=="](p(v,"LIST_CONTINUATION"))&& -(x["$=="]("inactive")&&(x="active",h=!0,e(L)||(M=[-1,""],k(z,"[]=",a.to_a(M)),M[b(M.length,1)])),F["$=="](p(v,"LIST_CONTINUATION")))){e(x["$!="]("frozen"))&&(x="frozen",z["$<<"](F));F=c;continue}if(e(M=this["$is_delimited_block?"](F,!0)))if(x["$=="]("active"))z["$<<"](F),z.$concat(d.$read_lines_until(f(["terminator","read_last_line","context"],{terminator:M.$terminator(),read_last_line:!0,context:c}))),x="inactive";else break;else if(e(e(w=e(m=E)?x["$!="]("active"):m)?p(v,"BlockAttributeLineRx")["$match?"](F): -w))break;else if(e((w=x["$=="]("active"))?F["$empty?"]()["$!"]():x["$=="]("active")))if(e(p(v,"LiteralParagraphRx")["$match?"](F)))d.$unshift_line(F),e(E)?z.$concat(k(d,"read_lines_until",[f(["preserve_last_line","break_on_blank_lines","break_on_list_continuation"],{preserve_last_line:!0,break_on_blank_lines:!0,break_on_list_continuation:!0})],(q=function(a){var b=q.$$s||this;null==a&&(a=c);return b["$is_sibling_list_item?"](a,g,l)},q.$$s=this,q.$$arity=1,q))):z.$concat(d.$read_lines_until(f(["preserve_last_line", -"break_on_blank_lines","break_on_list_continuation"],{preserve_last_line:!0,break_on_blank_lines:!0,break_on_list_continuation:!0}))),x="inactive";else if(e(e(w=e(m=p(v,"BlockTitleRx")["$match?"](F))?m:p(v,"BlockAttributeLineRx")["$match?"](F))?w:p(v,"AttributeEntryRx")["$match?"](F)))z["$<<"](F);else e(y=k(e(L)?["dlist"]:p(v,"NESTABLE_LIST_CONTEXTS"),"find",[],(n=function(a){null==a&&(a=c);return p(v,"ListRxMap")["$[]"](a)["$match?"](F)},n.$$s=this,n.$$arity=1,n)))&&(L=!0,e((w=y["$=="]("dlist"))? -((m=u["~"])===c?c:m["$[]"](3))["$nil_or_empty?"]():y["$=="]("dlist"))&&(h=!1)),z["$<<"](F),x="inactive";else if(e(e(w=y)?y["$empty?"]():w)){if(e(F["$empty?"]())){if(!e(F=e(w=d.$skip_blank_lines())?d.$read_line():w))break;if(e(this["$is_sibling_list_item?"](F,g,l)))break}if(F["$=="](p(v,"LIST_CONTINUATION")))Q=z.$size(),z["$<<"](F);else if(e(h))if(e(this["$is_sibling_list_item?"](F,g,l)))break;else if(e(y=k(p(v,"NESTABLE_LIST_CONTEXTS"),"find",[],(r=function(a){null==a&&(a=c);return p(v,"ListRxMap")["$[]"](a)["$=~"](F)}, -r.$$s=this,r.$$arity=1,r))))z["$<<"](F),L=!0,e((w=y["$=="]("dlist"))?((m=u["~"])===c?c:m["$[]"](3))["$nil_or_empty?"]():y["$=="]("dlist"))&&(h=!1);else if(e(p(v,"LiteralParagraphRx")["$match?"](F)))d.$unshift_line(F),e(E)?z.$concat(k(d,"read_lines_until",[f(["preserve_last_line","break_on_blank_lines","break_on_list_continuation"],{preserve_last_line:!0,break_on_blank_lines:!0,break_on_list_continuation:!0})],(t=function(a){var b=t.$$s||this;null==a&&(a=c);return b["$is_sibling_list_item?"](a,g,l)}, -t.$$s=this,t.$$arity=1,t))):z.$concat(d.$read_lines_until(f(["preserve_last_line","break_on_blank_lines","break_on_list_continuation"],{preserve_last_line:!0,break_on_blank_lines:!0,break_on_list_continuation:!0})));else break;else e(L)||z.$pop(),z["$<<"](F),h=!0}else e(F["$empty?"]())||(h=!0),e(y=k(e(L)?["dlist"]:p(v,"NESTABLE_LIST_CONTEXTS"),"find",[],(A=function(a){null==a&&(a=c);return p(v,"ListRxMap")["$[]"](a)["$=~"](F)},A.$$s=this,A.$$arity=1,A)))&&(L=!0,e((w=y["$=="]("dlist"))?((m=u["~"])=== -c?c:m["$[]"](3))["$nil_or_empty?"]():y["$=="]("dlist"))&&(h=!1)),z["$<<"](F);F=c}e(F)&&d.$unshift_line(F);e(Q)&&(M=[Q,""],k(z,"[]=",a.to_a(M)),M[b(M.length,1)]);for(;!e(z["$empty?"]());)if(e((x=z["$[]"](-1))["$empty?"]()))z.$pop();else{x["$=="](p(v,"LIST_CONTINUATION"))&&z.$pop();break}return z},aa.$$arity=-3);a.defs(d,"$initialize_section",na=function(d,g,l){var w,h=c,q=c,n=c,r=c,t=c;null==l&&(l=f([],{}));var A=g.$document();var z=(w=A.$doctype())["$=="]("book");e(A.$sourcemap())&&(h=d.$cursor()); -var u=l["$[]"](1);var x=this.$parse_section_title(d,A,l["$[]"]("id"));var L=a.to_ary(x);var Q=null==L[0]?c:L[0];var F=null==L[1]?c:L[1];var E=null==L[2]?c:L[2];var y=null==L[3]?c:L[3];var M=null==L[4]?c:L[4];x;if(e(F))q=["reftext",F],k(l,"[]=",a.to_a(q)),q[b(q.length,1)];else l["$[]"]("reftext");e(u)?e(e(L=z)?u["$=="]("abstract"):L)?(L=["chapter",1],u=L[0],y=L[1],L):e(e(L=u["$start_with?"]("sect"))?p(v,"SectionLevelStyleRx")["$match?"](u):L)?u="section":(L=[u,!0],u=L[0],n=L[1],L,y["$=="](0)&&(y=1), -r=u["$=="]("appendix")):e(z)?u=y["$=="](0)?"part":e(m(y,1))?"section":"chapter":e(w["$=="]("manpage")?E.$casecmp("synopsis")["$=="](0):w["$=="]("manpage"))?(L=["synopsis",!0],u=L[0],n=L[1],L):u="section";w=p(v,"Section").$new(g,y);L=[Q,E,u,h];w["$id="](L[0]);w["$title="](L[1]);w["$sectname="](L[2]);w["$source_location="](L[3]);L;e(n)?(q=[!0],k(w,"special=",a.to_a(q)),q[b(q.length,1)],e(r)?(q=[!0],k(w,"numbered=",a.to_a(q)),q[b(q.length,1)]):A.$attributes()["$[]"]("sectnums")["$=="]("all")&&(q=[e(e(L= -z)?y["$=="](1):L)?"chapter":!0],k(w,"numbered=",a.to_a(q)),q[b(q.length,1)])):e(e(L=A.$attributes()["$[]"]("sectnums"))?m(y,0):L)?(q=[e(w.$special())?e(L=g.$numbered())?!0:L:!0],k(w,"numbered=",a.to_a(q)),q[b(q.length,1)]):e(e(L=e(x=z)?y["$=="](0):x)?A.$attributes()["$[]"]("partnums"):L)&&(q=[!0],k(w,"numbered=",a.to_a(q)),q[b(q.length,1)]);e(g=e(L=w.$id())?L:(q=[e(A.$attributes()["$key?"]("sectids"))?t=p(v,"Section").$generate_id(w.$title(),A):c],k(w,"id=",a.to_a(q)),q[b(q.length,1)]))&&(e(t)||e(E["$include?"](p(v, -"ATTR_REF_HEAD")))&&w.$title(),e(A.$register("refs",[g,w]))||this.$logger().$warn(this.$message_with_context("id assigned to section already in use: "+g,f(["source_location"],{source_location:d.$cursor_at_line(b(d.$lineno(),e(M)?1:2))}))));w.$update_attributes(l);d.$skip_blank_lines();return w},na.$$arity=-3);a.defs(d,"$is_next_line_section?",ba=function(a,b){var d,f,g=c;return e(e(d=g=b["$[]"](1))?e(f=g["$=="]("discrete"))?f:g["$=="]("float"):d)?c:e(p(v,"Compliance").$underline_style_section_titles())? -(a=a.$peek_lines(2,e(d=g)?g["$=="]("comment"):d),this["$is_section_title?"](e(d=a["$[]"](0))?d:"",a["$[]"](1))):this["$atx_section_title?"](e(d=a.$peek_line())?d:"")},ba.$$arity=2);a.defs(d,"$is_next_line_doctitle?",I=function(a,b,d){var f,k=c;return e(d)?e(f=k=this["$is_next_line_section?"](a,b))?g(k,d.$to_i())["$=="](0):f:this["$is_next_line_section?"](a,b)["$=="](0)},I.$$arity=3);a.defs(d,"$is_section_title?",O=function(a,b){var d;null==b&&(b=c);return e(d=this["$atx_section_title?"](a))?d:e(b["$nil_or_empty?"]())? -c:this["$setext_section_title?"](a,b)},O.$$arity=-2);a.defs(d,"$atx_section_title?",P=function(a){var d;return e(e(p(v,"Compliance").$markdown_syntax())?e(d=a["$start_with?"]("=","#"))?p(v,"ExtAtxSectionTitleRx")["$=~"](a):d:e(d=a["$start_with?"]("="))?p(v,"AtxSectionTitleRx")["$=~"](a):d)?b(((d=u["~"])===c?c:d["$[]"](1)).$length(),1):c},P.$$arity=1);a.defs(d,"$setext_section_title?",R=function(a,d){var f,g,k,l,w=c,m=c;return e(e(f=e(g=e(k=l=p(v,"SETEXT_SECTION_LEVELS")["$[]"](w=d.$chr()))?this["$uniform?"](d, -w,m=d.$length()):k)?p(v,"SetextSectionTitleRx")["$match?"](a):g)?h(b(a.$length(),m).$abs(),2):f)?l:c},R.$$arity=2);a.defs(d,"$parse_section_title",wa=function(a,d,f){var k,l,w,m,q,n=c,r=c,t=c,A=c,z=c,x=c;null==f&&(f=c);var L=c;var F=a.$read_line();e(e(p(v,"Compliance").$markdown_syntax())?e(k=F["$start_with?"]("=","#"))?p(v,"ExtAtxSectionTitleRx")["$=~"](F):k:e(k=F["$start_with?"]("="))?p(v,"AtxSectionTitleRx")["$=~"](F):k)?(k=[b(((l=u["~"])===c?c:l["$[]"](1)).$length(),1),(l=u["~"])===c?c:l["$[]"](2), -!0],n=k[0],r=k[1],t=k[2],k,!e(f)&&e(e(k=e(l=r["$end_with?"]("]]"))?p(v,"InlineSectionAnchorRx")["$=~"](r):l)?((l=u["~"])===c?c:l["$[]"](1))["$!"]():k)&&(k=[r.$slice(0,b(r.$length(),((l=u["~"])===c?c:l["$[]"](0)).$length())),(l=u["~"])===c?c:l["$[]"](2),(l=u["~"])===c?c:l["$[]"](3)],r=k[0],f=k[1],L=k[2],k)):e(e(k=e(l=e(w=e(m=e(q=p(v,"Compliance").$underline_style_section_titles())?A=a.$peek_line(!0):q)?n=p(v,"SETEXT_SECTION_LEVELS")["$[]"](z=A.$chr()):m)?this["$uniform?"](A,z,x=A.$length()):w)?r=e(w= -p(v,"SetextSectionTitleRx")["$=~"](F))?(m=u["~"])===c?c:m["$[]"](1):w:l)?h(b(F.$length(),x).$abs(),2):k)?(t=!1,!e(f)&&e(e(k=e(l=r["$end_with?"]("]]"))?p(v,"InlineSectionAnchorRx")["$=~"](r):l)?((l=u["~"])===c?c:l["$[]"](1))["$!"]():k)&&(k=[r.$slice(0,b(r.$length(),((l=u["~"])===c?c:l["$[]"](0)).$length())),(l=u["~"])===c?c:l["$[]"](2),(l=u["~"])===c?c:l["$[]"](3)],r=k[0],f=k[1],L=k[2],k),a.$shift()):this.$raise("Unrecognized section at "+a.$cursor_at_prev_line());e(d["$attr?"]("leveloffset"))&&(n= -g(n,d.$attr("leveloffset").$to_i()),e(h(n,0))&&(n=0));return[f,L,r,n,t]},wa.$$arity=-3);a.defs(d,"$parse_header_metadata",da=function(d,l){var w,h,m,q,r=c,t=c,A=c,z=c,u=c,x=c,F=c,E=c,Q=c,y=c,M=E=c,C=c;Q=F=u=z=t=c;null==l&&(l=c);r=e(w=l)?l.$attributes():w;this.$process_attribute_entries(d,l);w=[t=f([],{}),c,c];A=w[0];z=w[1];u=w[2];w;e(e(w=d["$has_more_lines?"]())?d["$next_line_empty?"]()["$!"]():w)?(e((x=this.$process_authors(d.$read_line()))["$empty?"]())||(e(l)&&(k(x,"each",[],(h=function(d,f){null== -d&&(d=c);null==f&&(f=c);if(e(r["$key?"](d)))return c;d=[d,e(n("::","String")["$==="](f))?l.$apply_header_subs(f):f];k(r,"[]=",a.to_a(d));return d[b(d.length,1)]},h.$$s=this,h.$$arity=2,h)),z=r["$[]"]("author"),u=r["$[]"]("authorinitials"),t=r["$[]"]("authors")),A=x),this.$process_attribute_entries(d,l),F=f([],{}),e(e(w=d["$has_more_lines?"]())?d["$next_line_empty?"]()["$!"]():w)&&(E=d.$read_line(),e(Q=p(v,"RevisionInfoLineRx").$match(E))?(e(Q["$[]"](1))&&(y=["revnumber",Q["$[]"](1).$rstrip()],k(F, -"[]=",a.to_a(y)),y[b(y.length,1)]),e((E=Q["$[]"](2).$strip())["$empty?"]())||(y=e(e(w=Q["$[]"](1)["$!"]())?E["$start_with?"]("v"):w)?["revnumber",E.$slice(1,E.$length())]:["revdate",E],k(F,"[]=",a.to_a(y)),y[b(y.length,1)]),e(Q["$[]"](3))&&(y=["revremark",Q["$[]"](3).$rstrip()],k(F,"[]=",a.to_a(y)),y[b(y.length,1)])):d.$unshift_line(E)),e(F["$empty?"]())||(e(l)&&k(F,"each",[],(m=function(d,f){null==d&&(d=c);null==f&&(f=c);if(e(r["$key?"](d)))return c;y=[d,l.$apply_header_subs(f)];k(r,"[]=",a.to_a(y)); -return y[b(y.length,1)]},m.$$s=this,m.$$arity=2,m)),A.$update(F)),this.$process_attribute_entries(d,l),d.$skip_blank_lines()):x=f([],{});if(e(l)){if(e(e(w=r["$key?"]("author"))?(M=r["$[]"]("author"))["$!="](z):w))x=this.$process_authors(M,!0,!1),e(r["$[]"]("authorinitials")["$!="](u))&&x.$delete("authorinitials");else if(e(e(w=r["$key?"]("authors"))?(M=r["$[]"]("authors"))["$!="](t):w))x=this.$process_authors(M,!0);else{w=[[],1,"author_1",!1,!1];C=w[0];t=w[1];z=w[2];u=w[3];F=w[4];for(w;e(r["$key?"](z));)(Q= -r["$[]"](z))["$=="](x["$[]"](z))?(C["$<<"](c),F=!0):(C["$<<"](Q),u=!0),z="author_"+(t=g(t,1));e(u)?(e(F)&&k(C,"each_with_index",[],(q=function(d,f){var l=q.$$s||this,w,h=c;null==d&&(d=c);null==f&&(f=c);if(e(d))return c;y=[f,k([x["$[]"]("firstname_"+(h=g(f,1))),x["$[]"]("middlename_"+h),x["$[]"]("lastname_"+h)].$compact(),"map",[],(w=function(a){null==a&&(a=c);return a.$tr(" ","_")},w.$$s=l,w.$$arity=1,w)).$join(" ")];k(C,"[]=",a.to_a(y));return y[b(y.length,1)]},q.$$s=this,q.$$arity=2,q)),x=this.$process_authors(C, -!0,!1)):x=f([],{})}e(x["$empty?"]())?e(w=A["$[]"]("authorcount"))?w:(y=["authorcount",(y=["authorcount",0],k(r,"[]=",a.to_a(y)),y[b(y.length,1)])],k(A,"[]=",a.to_a(y)),y[b(y.length,1)]):(r.$update(x),e(e(w=r["$key?"]("email")["$!"]())?r["$key?"]("email_1"):w)&&(y=["email",r["$[]"]("email_1")],k(r,"[]=",a.to_a(y)),y[b(y.length,1)]))}return A},da.$$arity=-2);a.defs(d,"$process_authors",xa=function(d,l,h){var w,m,q=c,n=c,r=c;null==l&&(l=!1);null==h&&(h=!0);q=f([],{});n=0;k(e(e(w=h)?d["$include?"](";"): -w)?d.$split(p(v,"AuthorDelimiterRx")):[].concat(a.to_a(d)),"each",[],(m=function(d){var w=m.$$s||this,h,r,t,A,z=c,u=c,x=c,L=c,F=c,E=c,Q=c,K=c;null==d&&(d=c);if(e(d["$empty?"]()))return c;z=f([],{});(n=g(n,1))["$=="](1)?k(p(v,"AuthorKeys"),"each",[],(h=function(e){null==e&&(e=c);e=[e.$to_sym(),e];k(z,"[]=",a.to_a(e));return e[b(e.length,1)]},h.$$s=w,h.$$arity=1,h)):k(p(v,"AuthorKeys"),"each",[],(r=function(e){null==e&&(e=c);e=[e.$to_sym(),""+e+"_"+n];k(z,"[]=",a.to_a(e));return e[b(e.length,1)]},r.$$s= -w,r.$$arity=1,r));if(e(l)){if(e(d["$include?"]("<"))&&(u=[z["$[]"]("author"),d.$tr("_"," ")],k(q,"[]=",a.to_a(u)),u[b(u.length,1)],d=d.$gsub(p(v,"XmlSanitizeRx"),"")),(x=d.$split(c,3)).$size()["$=="](3))x["$<<"](x.$pop().$squeeze(" "))}else e(L=p(v,"AuthorInfoLineRx").$match(d))&&(x=L.$to_a()).$shift();e(x)?(F=(u=[z["$[]"]("firstname"),E=x["$[]"](0).$tr("_"," ")],k(q,"[]=",a.to_a(u)),u[b(u.length,1)]),u=[z["$[]"]("authorinitials"),E.$chr()],k(q,"[]=",a.to_a(u)),u[b(u.length,1)],e(x["$[]"](1))&&(e(x["$[]"](2))? -(u=[z["$[]"]("middlename"),Q=x["$[]"](1).$tr("_"," ")],k(q,"[]=",a.to_a(u)),u[b(u.length,1)],u=[z["$[]"]("lastname"),K=x["$[]"](2).$tr("_"," ")],k(q,"[]=",a.to_a(u)),u[b(u.length,1)],F=g(g(g(g(E," "),Q)," "),K),u=[z["$[]"]("authorinitials"),""+E.$chr()+Q.$chr()+K.$chr()]):(u=[z["$[]"]("lastname"),K=x["$[]"](1).$tr("_"," ")],k(q,"[]=",a.to_a(u)),u[b(u.length,1)],F=g(g(E," "),K),u=[z["$[]"]("authorinitials"),""+E.$chr()+K.$chr()]),k(q,"[]=",a.to_a(u)),u[b(u.length,1)]),e(t=q["$[]"](z["$[]"]("author")))? -t:(u=[z["$[]"]("author"),F],k(q,"[]=",a.to_a(u)),u[b(u.length,1)]),e(e(t=l)?t:x["$[]"](3)["$!"]())||(u=[z["$[]"]("email"),x["$[]"](3)],k(q,"[]=",a.to_a(u)),u[b(u.length,1)])):(u=[z["$[]"]("author"),(u=[z["$[]"]("firstname"),E=d.$squeeze(" ").$strip()],k(q,"[]=",a.to_a(u)),u[b(u.length,1)])],k(q,"[]=",a.to_a(u)),u[b(u.length,1)],u=[z["$[]"]("authorinitials"),E.$chr()],k(q,"[]=",a.to_a(u)),u[b(u.length,1)]);n["$=="](1)?u=["authors",q["$[]"](z["$[]"]("author"))]:(n["$=="](2)&&k(p(v,"AuthorKeys"),"each", -[],(A=function(d){null==d&&(d=c);return e(q["$key?"](d))?(u=[""+d+"_1",q["$[]"](d)],k(q,"[]=",a.to_a(u)),u[b(u.length,1)]):c},A.$$s=w,A.$$arity=1,A)),u=["authors",""+q["$[]"]("authors")+", "+q["$[]"](z["$[]"]("author"))]);k(q,"[]=",a.to_a(u));return u[b(u.length,1)]},m.$$s=this,m.$$arity=1,m));r=["authorcount",n];k(q,"[]=",a.to_a(r));r[b(r.length,1)];return q},xa.$$arity=-2);a.defs(d,"$parse_block_metadata_lines",Y=function(a,b,c,d){var g;null==c&&(c=f([],{}));for(null==d&&(d=f([],{}));e(this.$parse_block_metadata_line(a, -b,c,d));)if(a.$shift(),e(g=a.$skip_blank_lines()))g;else break;return c},Y.$$arity=-3);a.defs(d,"$parse_block_metadata_line",ta=function(d,g,l,h){var w,m,q=c,n=c,r=c;null==u["~"]&&(u["~"]=c);null==h&&(h=f([],{}));if(e(e(w=q=d.$peek_line())?e(h["$[]"]("text_only"))?q["$start_with?"]("[","/"):n=q["$start_with?"]("[",".","/",":"):w))if(e(q["$start_with?"]("[")))if(e(q["$start_with?"]("[["))){if(e(e(w=q["$end_with?"]("]]"))?p(v,"BlockAnchorRx")["$=~"](q):w))return d=["id",(w=u["~"])===c?c:w["$[]"](1)], -k(l,"[]=",a.to_a(d)),d[b(d.length,1)],e(d=(w=u["~"])===c?c:w["$[]"](2))&&(d=["reftext",e(d["$include?"](p(v,"ATTR_REF_HEAD")))?g.$sub_attributes(d):d],k(l,"[]=",a.to_a(d)),d[b(d.length,1)]),!0}else{if(e(e(w=q["$end_with?"]("]"))?p(v,"BlockAttributeListRx")["$=~"](q):w))return h=l["$[]"](1),e(g.$parse_attributes((w=u["~"])===c?c:w["$[]"](1),[],f(["sub_input","sub_result","into"],{sub_input:!0,sub_result:!0,into:l}))["$[]"](1))&&(d=[1,e(w=this.$parse_style_attribute(l,d))?w:h],k(l,"[]=",a.to_a(d)), -d[b(d.length,1)]),!0}else if(e(e(w=n)?q["$start_with?"]("."):w)){if(e(p(v,"BlockTitleRx")["$=~"](q)))return d=["title",(w=u["~"])===c?c:w["$[]"](1)],k(l,"[]=",a.to_a(d)),d[b(d.length,1)],!0}else if(e(e(w=n["$!"]())?w:q["$start_with?"]("/"))){if(e(q["$start_with?"]("//"))){if(q["$=="]("//"))return!0;if(e(e(w=n)?this["$uniform?"](q,"/",r=q.$length()):w)){if(r["$=="](3))return c;d.$read_lines_until(f(["terminator","skip_first_line","preserve_last_line","skip_processing","context"],{terminator:q,skip_first_line:!0, -preserve_last_line:!0,skip_processing:!0,context:"comment"}));return!0}return e(q["$start_with?"]("///"))?c:!0}}else if(e(e(w=e(m=n)?q["$start_with?"](":"):m)?p(v,"AttributeEntryRx")["$=~"](q):w))return this.$process_attribute_entry(d,g,l,u["~"]),!0;return c},ta.$$arity=-4);a.defs(d,"$process_attribute_entries",Ia=function(a,b,d){null==d&&(d=c);for(a.$skip_comment_lines();e(this.$process_attribute_entry(a,b,d));)a.$shift(),a.$skip_comment_lines()},Ia.$$arity=-3);a.defs(d,"$process_attribute_entry", -Ga=function(a,d,f,g){var k,l,w,h,m=c;null==f&&(f=c);null==g&&(g=c);if(e(e(k=g)?k:g=e(a["$has_more_lines?"]())?p(v,"AttributeEntryRx").$match(a.$peek_line()):c)){if(e((h=g["$[]"](2))["$nil_or_empty?"]()))h="";else if(e(h["$end_with?"](p(v,"LINE_CONTINUATION"),p(v,"LINE_CONTINUATION_LEGACY")))){k=[h.$slice(b(h.$length(),2),2),h.$slice(0,b(h.$length(),2)).$rstrip()];var q=k[0];h=k[1];for(k;e(e(l=a.$advance())?(m=e(w=a.$peek_line())?w:"")["$empty?"]()["$!"]():l)&&(m=m.$lstrip(),e(k=m["$end_with?"](q))&& -(m=m.$slice(0,b(m.$length(),2)).$rstrip()),h=""+h+(e(h["$end_with?"](p(v,"HARD_LINE_BREAK")))?p(v,"LF"):" ")+m,e(k)););}this.$store_attribute(g["$[]"](1),h,d,f);return!0}return c},Ga.$$arity=-3);a.defs(d,"$store_attribute",Ja=function(a,d,f,k){var l;null==f&&(f=c);null==k&&(k=c);e(a["$end_with?"]("!"))?(a=a.$chop(),d=c):e(a["$start_with?"]("!"))&&(a=a.$slice(1,a.$length()),d=c);(a=this.$sanitize_attribute_name(a))["$=="]("numbered")?a="sectnums":a["$=="]("hardbreaks")?a="hardbreaks-option":a["$=="]("showtitle")&& -this.$store_attribute("notitle",e(d)?c:"",f,k);e(f)?e(d)?(a["$=="]("leveloffset")&&(e(d["$start_with?"]("+"))?d=g(f.$attr("leveloffset",0).$to_i(),d.$slice(1,d.$length()).$to_i()).$to_s():e(d["$start_with?"]("-"))&&(d=b(f.$attr("leveloffset",0).$to_i(),d.$slice(1,d.$length()).$to_i()).$to_s())),e(f=f.$set_attribute(a,d))&&(d=f,e(k)&&n(p(v,"Document"),"AttributeEntry").$new(a,d).$save_to(k))):e(e(l=f.$delete_attribute(a))?k:l)&&n(p(v,"Document"),"AttributeEntry").$new(a,d).$save_to(k):e(k)&&n(p(v, -"Document"),"AttributeEntry").$new(a,d).$save_to(k);return[a,d]},Ja.$$arity=-3);a.defs(d,"$resolve_list_marker",Xa=function(a,b,e,d,f){null==e&&(e=0);null==d&&(d=!1);null==f&&(f=c);return a["$=="]("ulist")?b:a["$=="]("olist")?this.$resolve_ordered_list_marker(b,e,d,f)["$[]"](0):"<1>"},Xa.$$arity=-3);a.defs(d,"$resolve_ordered_list_marker",Qa=function(a,b,d,l){var h,w,m=c,q=c,n=c,r=c;null==b&&(b=0);null==d&&(d=!1);null==l&&(l=c);if(e(a["$start_with?"](".")))return[a];m=q=k(p(v,"ORDERED_LIST_STYLES"), -"find",[],(h=function(b){null==b&&(b=c);return p(v,"OrderedListMarkerRxMap")["$[]"](b)["$match?"](a)},h.$$s=this,h.$$arity=1,h));"arabic"["$==="](m)?(e(d)&&(n=g(b,1),r=a.$to_i()),a="1."):"loweralpha"["$==="](m)?(e(d)&&(n=g("a"["$[]"](0).$ord(),b).$chr(),r=a.$chop()),a="a."):"upperalpha"["$==="](m)?(e(d)&&(n=g("A"["$[]"](0).$ord(),b).$chr(),r=a.$chop()),a="A."):"lowerroman"["$==="](m)?(e(d)&&(n=p(v,"Helpers").$int_to_roman(g(b,1)).$downcase(),r=a.$chop()),a="i)"):"upperroman"["$==="](m)&&(e(d)&&(n= -p(v,"Helpers").$int_to_roman(g(b,1)),r=a.$chop()),a="I)");e(e(w=d)?n["$!="](r):w)&&this.$logger().$warn(this.$message_with_context("list item index: expected "+n+", got "+r,f(["source_location"],{source_location:l.$cursor()})));return[a,q]},Qa.$$arity=-2);a.defs(d,"$is_sibling_list_item?",Ra=function(a,b,d){var f,g;return e(n("::","Regexp")["$==="](d))?d["$match?"](a):e(f=p(v,"ListRxMap")["$[]"](b)["$=~"](a))?d["$=="](this.$resolve_list_marker(b,(g=u["~"])===c?c:g["$[]"](1))):f},Ra.$$arity=3);a.defs(d, -"$parse_table",Da=function(d,f,l){var h,w,q,r=c,t=c,u=q=c,A=c,z,x=c,F=c;f=p(v,"Table").$new(f,l);e(e(h=l["$key?"]("cols"))?(r=this.$parse_colspecs(l["$[]"]("cols")))["$empty?"]()["$!"]():h)&&(f.$create_columns(r),t=!0);r=e(h=d.$skip_blank_lines())?h:0;e(l["$[]"]("header-option"))?(q=[!0],k(f,"has_header_option=",a.to_a(q)),q[b(q.length,1)]):e(r["$=="](0)?l["$[]"]("noheader-option")["$!"]():r["$=="](0))&&(q=["implicit"],k(f,"has_header_option=",a.to_a(q)),q[b(q.length,1)],u=!0);r=n(p(v,"Table"),"ParserContext").$new(d, -f,l);h=[r.$format(),-1,c];var E=h[0];var L=h[1];var y=h[2];h;for(h=!1;h||e(A=d.$read_line());){h=!1;if(e(e(w=z=m(L=g(L,1),0))?A["$empty?"]():w))A=c,e(y)&&(y=g(y,1));else if(E["$=="]("psv"))if(e(r["$starts_with_delimiter?"](A)))A=A.$slice(1,A.$length()),r.$close_open_cell(),e(y)&&(y=c);else{var Q=this.$parse_cellspec(A,"start",r.$delimiter());w=a.to_ary(Q);var M=null==w[0]?c:w[0];A=null==w[1]?c:w[1];Q;e(M)?(r.$close_open_cell(M),e(y)&&(y=c)):e(e(w=y)?y["$=="](L):w)&&(q=[u=y=c],k(f,"has_header_option=", -a.to_a(q)),q[b(q.length,1)])}e(z)||(d.$mark(),e(u)&&(e(e(w=d["$has_more_lines?"]())?d.$peek_line()["$empty?"]():w)?y=1:(q=[u=c],k(f,"has_header_option=",a.to_a(q)),q[b(q.length,1)])));for(w=!1;w||e(!0);)if(w=!1,e(e(Q=A)?x=r.$match_delimiter(A):Q)){Q=[x.$pre_match(),x.$post_match()];z=Q[0];A=Q[1];Q;M=E;if("csv"["$==="](M)){if(e(r["$buffer_has_unclosed_quotes?"](z))){r.$skip_past_delimiter(z);if(e(A["$empty?"]()))break;w=!0;continue}q=[""+r.$buffer()+z]}else if("dsv"["$==="](M)){if(e(z["$end_with?"]("\\"))){r.$skip_past_escaped_delimiter(z); -if(e(A["$empty?"]())){q=[""+r.$buffer()+p(v,"LF")];k(r,"buffer=",a.to_a(q));q[b(q.length,1)];r.$keep_cell_open();break}w=!0;continue}q=[""+r.$buffer()+z]}else{if(e(z["$end_with?"]("\\"))){r.$skip_past_escaped_delimiter(z);if(e(A["$empty?"]())){q=[""+r.$buffer()+p(v,"LF")];k(r,"buffer=",a.to_a(q));q[b(q.length,1)];r.$keep_cell_open();break}w=!0;continue}q=this.$parse_cellspec(z);Q=a.to_ary(q);M=null==Q[0]?c:Q[0];z=null==Q[1]?c:Q[1];q;r.$push_cellspec(M);q=[""+r.$buffer()+z]}k(r,"buffer=",a.to_a(q)); -q[b(q.length,1)];e(A["$empty?"]())&&(A=c);r.$close_cell()}else{q=[""+r.$buffer()+A+p(v,"LF")];k(r,"buffer=",a.to_a(q));q[b(q.length,1)];M=E;"csv"["$==="](M)?e(r["$buffer_has_unclosed_quotes?"]())?(e(e(Q=y)?L["$=="](0):Q)&&(q=[u=y=c],k(f,"has_header_option=",a.to_a(q)),q[b(q.length,1)]),r.$keep_cell_open()):r.$close_cell(!0):"dsv"["$==="](M)?r.$close_cell(!0):r.$keep_cell_open();break}if(e(r["$cell_open?"]()))e(d["$has_more_lines?"]())||r.$close_cell(!0);else if(e(w=d.$skip_blank_lines()))w;else break}e(e(h= -(F=f.$attributes(),e(w=F["$[]"]("colcount"))?w:(q=["colcount",f.$columns().$size()],k(F,"[]=",a.to_a(q)),q[b(q.length,1)]))["$=="](0))?h:t)||f.$assign_column_widths();e(u)&&(q=[!0],k(f,"has_header_option=",a.to_a(q)),q[b(q.length,1)]);f.$partition_header_footer(l);return f},Da.$$arity=3);a.defs(d,"$parse_colspecs",Ka=function(d){var g,l,h=c;e(d["$include?"](" "))&&(d=d.$delete(" "));if(d["$=="](d.$to_i().$to_s()))return k(n("::","Array"),"new",[d.$to_i()],(g=function(){return f(["width"],{width:1})}, -g.$$s=this,g.$$arity=0,g));h=[];k(e(d["$include?"](","))?d.$split(",",-1):d.$split(";",-1),"each",[],(l=function(d){var g=l.$$s||this,w,m=c,q=c,n=c,r=c,t=n=c;null==d&&(d=c);if(e(d["$empty?"]()))return h["$<<"](f(["width"],{width:1}));if(e(m=p(v,"ColumnSpecRx").$match(d))){q=f([],{});if(e(m["$[]"](2))){d=m["$[]"](2).$split(".");var A=a.to_ary(d);n=null==A[0]?c:A[0];r=null==A[1]?c:A[1];d;e(e(A=n["$nil_or_empty?"]()["$!"]())?p(v,"TableCellHorzAlignments")["$key?"](n):A)&&(n=["halign",p(v,"TableCellHorzAlignments")["$[]"](n)], -k(q,"[]=",a.to_a(n)),n[b(n.length,1)]);e(e(A=r["$nil_or_empty?"]()["$!"]())?p(v,"TableCellVertAlignments")["$key?"](r):A)&&(n=["valign",p(v,"TableCellVertAlignments")["$[]"](r)],k(q,"[]=",a.to_a(n)),n[b(n.length,1)])}n=e(t=m["$[]"](3))?["width",t["$=="]("~")?-1:t.$to_i()]:["width",1];k(q,"[]=",a.to_a(n));n[b(n.length,1)];e(e(A=m["$[]"](4))?p(v,"TableCellStyles")["$key?"](m["$[]"](4)):A)&&(n=["style",p(v,"TableCellStyles")["$[]"](m["$[]"](4))],k(q,"[]=",a.to_a(n)),n[b(n.length,1)]);return e(m["$[]"](1))? -k(1,"upto",[m["$[]"](1).$to_i()],(w=function(){return h["$<<"](q.$merge())},w.$$s=g,w.$$arity=0,w)):h["$<<"](q)}return c},l.$$s=this,l.$$arity=1,l));return h},Ka.$$arity=1);a.defs(d,"$parse_cellspec",Ya=function(d,g,l){null==g&&(g="end");null==l&&(l=c);var h=[c,""];h;if(g["$=="]("start"))if(e(d["$include?"](l))){l=d.$partition(l);h=a.to_ary(l);var w=null==h[0]?c:h[0];g=null==h[2]?c:h[2];l;if(e(w=p(v,"CellSpecStartRx").$match(w))){if(e(w["$[]"](0)["$empty?"]()))return[f([],{}),g]}else return[c,d]}else return[c, -d];else if(e(w=p(v,"CellSpecEndRx").$match(d))){if(e(w["$[]"](0).$lstrip()["$empty?"]()))return[f([],{}),d.$rstrip()];g=w.$pre_match()}else return[f([],{}),d];d=f([],{});if(e(w["$[]"](1))){l=w["$[]"](1).$split(".");h=a.to_ary(l);var m=null==h[0]?c:h[0];var q=null==h[1]?c:h[1];l;m=e(m["$nil_or_empty?"]())?1:m.$to_i();q=e(q["$nil_or_empty?"]())?1:q.$to_i();w["$[]"](2)["$=="]("+")?(m["$=="](1)||(l=["colspan",m],k(d,"[]=",a.to_a(l)),l[b(l.length,1)]),q["$=="](1)||(l=["rowspan",q],k(d,"[]=",a.to_a(l)), -l[b(l.length,1)])):w["$[]"](2)["$=="]("*")&&!m["$=="](1)&&(l=["repeatcol",m],k(d,"[]=",a.to_a(l)),l[b(l.length,1)])}e(w["$[]"](3))&&(l=w["$[]"](3).$split("."),h=a.to_ary(l),m=null==h[0]?c:h[0],q=null==h[1]?c:h[1],l,e(e(h=m["$nil_or_empty?"]()["$!"]())?p(v,"TableCellHorzAlignments")["$key?"](m):h)&&(l=["halign",p(v,"TableCellHorzAlignments")["$[]"](m)],k(d,"[]=",a.to_a(l)),l[b(l.length,1)]),e(e(h=q["$nil_or_empty?"]()["$!"]())?p(v,"TableCellVertAlignments")["$key?"](q):h)&&(l=["valign",p(v,"TableCellVertAlignments")["$[]"](q)], -k(d,"[]=",a.to_a(l)),l[b(l.length,1)]));e(e(h=w["$[]"](4))?p(v,"TableCellStyles")["$key?"](w["$[]"](4)):h)&&(l=["style",p(v,"TableCellStyles")["$[]"](w["$[]"](4))],k(d,"[]=",a.to_a(l)),l[b(l.length,1)]);return[d,g]},Ya.$$arity=-2);a.defs(d,"$parse_style_attribute",Va=function(d,l){var h,w,m,q,n=c,r=c,t=c,A=c,u=c,z=c,x=c;null==l&&(l=c);if(e(e(h=e(w=n=d["$[]"](1))?n["$include?"](" ")["$!"]():w)?p(v,"Compliance").$shorthand_property_syntax():h)){r=c;t="";A=f([],{});k(n,"each_char",[],(m=function(a){var b= -m.$$s||this,e=c;null==a&&(a=c);return function(){e=a;return"."["$==="](e)?(b.$yield_buffered_attribute(A,r,t,l),t="",r="role"):"#"["$==="](e)?(b.$yield_buffered_attribute(A,r,t,l),t="",r="id"):"%"["$==="](e)?(b.$yield_buffered_attribute(A,r,t,l),t="",r="option"):t=g(t,a)}()},m.$$s=this,m.$$arity=1,m));if(e(r))return this.$yield_buffered_attribute(A,r,t,l),e(u=A["$[]"]("style"))&&(z=["style",u],k(d,"[]=",a.to_a(z)),z[b(z.length,1)]),e(A["$key?"]("id"))&&(z=["id",A["$[]"]("id")],k(d,"[]=",a.to_a(z)), -z[b(z.length,1)]),e(A["$key?"]("role"))&&(z=["role",e((x=d["$[]"]("role"))["$nil_or_empty?"]())?A["$[]"]("role").$join(" "):""+x+" "+A["$[]"]("role").$join(" ")],k(d,"[]=",a.to_a(z)),z[b(z.length,1)]),e(A["$key?"]("option"))&&k(A["$[]"]("option"),"each",[],(q=function(e){null==e&&(e=c);z=[""+e+"-option",""];k(d,"[]=",a.to_a(z));return z[b(z.length,1)]},q.$$s=this,q.$$arity=1,q)),u;z=["style",n];k(d,"[]=",a.to_a(z));return z[b(z.length,1)]}z=["style",n];k(d,"[]=",a.to_a(z));return z[b(z.length,1)]}, -Va.$$arity=-2);a.defs(d,"$yield_buffered_attribute",Za=function(d,g,l,h){var w,p=c;if(e(g))if(e(l["$empty?"]()))e(h)?this.$logger().$warn(this.$message_with_context("invalid empty "+g+" detected in style attribute",f(["source_location"],{source_location:h.$cursor_at_prev_line()}))):this.$logger().$warn("invalid empty "+g+" detected in style attribute");else if(g["$=="]("id"))e(d["$key?"]("id"))&&(e(h)?this.$logger().$warn(this.$message_with_context("multiple ids detected in style attribute",f(["source_location"], -{source_location:h.$cursor_at_prev_line()}))):this.$logger().$warn("multiple ids detected in style attribute")),p=[g,l],k(d,"[]=",a.to_a(p)),p[b(p.length,1)];else(e(w=d["$[]"](g))?w:(p=[g,[]],k(d,"[]=",a.to_a(p)),p[b(p.length,1)]))["$<<"](l);else e(l["$empty?"]())||(p=["style",l],k(d,"[]=",a.to_a(p)),p[b(p.length,1)]);return c},Za.$$arity=4);a.defs(d,"$adjust_indentation!",$a=function(d,f,l){var w,n,r,t,A,u,z,x=this,F=c,E=c,y=c;null==f&&(f=0);null==l&&(l=0);if(e(d["$empty?"]()))return c;e(e(w=m(l, -0))?k(d,"any?",[],(n=function(a){null==a&&(a=c);return a["$include?"](p(v,"TAB"))},n.$$s=x,n.$$arity=1,n)):w)&&(F=q(" ",l),function(){var f=a.new_brk();try{return k(d,"map!",[],(r=function(d){var f=r.$$s||this,h,w,m=c,n=c,t=c,A=c,u=c;null==d&&(d=c);if(e(d["$empty?"]()))return d;if(e(m=d.$index(p(v,"TAB")))){if(m["$=="](0)&&(n=0,function(){var b=a.new_brk();try{return k(d,"each_byte",[],(h=function(e){null==e&&(e=c);e["$=="](9)||a.brk(c,b);return n=g(n,1)},h.$$s=f,h.$$brk=b,h.$$arity=1,h))}catch(ib){if(ib=== -b)return ib.$v;throw ib;}}(),d=""+q(F,n)+d.$slice(n,d.$length()),!e(d["$include?"](p(v,"TAB")))))return d;A=t=0;u="";k(d,"each_char",[],(w=function(a){var e;null==a&&(a=c);a["$=="](p(v,"TAB"))?(a=g(A,t))["$%"](l)["$=="](0)?(t=g(t,b(l,1)),u=g(u,F)):((e=b(l,a["$%"](l)))["$=="](1)||(t=g(t,b(e,1))),u=g(u,q(" ",e))):u=g(u,a);return A=g(A,1)},w.$$s=f,w.$$arity=1,w));return u}return d},r.$$s=x,r.$$brk=f,r.$$arity=1,r))}catch(Sa){if(Sa===f)return Sa.$v;throw Sa;}}());if(e(h(f,0)))return c;E=c;(function(){var f= -a.new_brk();try{return k(d,"each",[],(t=function(d){var g;null==d&&(d=c);if(e(d["$empty?"]()))return c;(d=b(d.$length(),d.$lstrip().$length()))["$=="](0)&&(E=c,a.brk(c,f));return e(e(g=E)?h(E,d):g)?c:E=d},t.$$s=x,t.$$brk=f,t.$$arity=1,t))}catch(Sa){if(Sa===f)return Sa.$v;throw Sa;}})();f["$=="](0)?e(E)&&k(d,"map!",[],(A=function(a){null==a&&(a=c);return e(a["$empty?"]())?a:a.$slice(E,a.$length())},A.$$s=x,A.$$arity=1,A)):(y=q(" ",f),e(E)?k(d,"map!",[],(u=function(a){null==a&&(a=c);return e(a["$empty?"]())? -a:g(y,a.$slice(E,a.$length()))},u.$$s=x,u.$$arity=1,u)):k(d,"map!",[],(z=function(a){null==a&&(a=c);return e(a["$empty?"]())?a:g(y,a)},z.$$s=x,z.$$arity=1,z)));return c},$a.$$arity=-2);a.defs(d,"$uniform?",bb=function(a,b,c){return a.$count(b)["$=="](c)},bb.$$arity=3);return(a.defs(d,"$sanitize_attribute_name",Ua=function(a){return a.$gsub(p(v,"InvalidAttributeNameCharsRx"),"").$downcase()},Ua.$$arity=1),c)&&"sanitize_attribute_name"})(d[0],null,d)}(l[0],l)};Opal.modules["asciidoctor/path_resolver"]= -function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}var g=[],h=a.nil,m=a.const_get_qualified,q=a.const_get_relative,l=a.module,c=a.klass,n=a.truthy,p=a.hash2,r=a.send,t=a.gvars;a.add_stubs("$include $attr_accessor $root? $posixify $expand_path $pwd $start_with? $== $match? $absolute_path? $+ $length $descends_from? $slice $to_s $relative_path_from $new $include? $tr $partition_path $each $pop $<< $join_path $[] $web_root? $unc? $index $split $delete $[]= $- $join $raise $! $fetch $warn $logger $empty? $nil_or_empty? $chomp $!= $> $size $extract_uri_prefix $end_with? $gsub $private $=~".split(" ")); -return function(d,e){d=[l(d,"Asciidoctor")].concat(e);(function(e,$super,d){e=c(e,$super,"PathResolver");var f=[e].concat(d),g,k,l,v,u,A,x,E,y,M,C,D,B,N;e.$$prototype.file_separator=e.$$prototype._partition_path_web=e.$$prototype._partition_path_sys=e.$$prototype.working_dir=h;e.$include(q(f,"Logging"));a.const_set(f[0],"DOT",".");a.const_set(f[0],"DOT_DOT","..");a.const_set(f[0],"DOT_SLASH","./");a.const_set(f[0],"SLASH","/");a.const_set(f[0],"BACKSLASH","\\");a.const_set(f[0],"DOUBLE_SLASH","//"); -a.const_set(f[0],"WindowsRootRx",/^(?:[a-zA-Z]:)?[\\\/]/);e.$attr_accessor("file_separator");e.$attr_accessor("working_dir");a.def(e,"$initialize",g=function(a,b){var c,e;null==a&&(a=h);null==b&&(b=h);this.file_separator=n(c=n(e=a)?e:m(m("::","File"),"ALT_SEPARATOR"))?c:m(m("::","File"),"SEPARATOR");this.working_dir=n(b)?n(this["$root?"](b))?this.$posixify(b):m("::","File").$expand_path(b):m("::","Dir").$pwd();this._partition_path_sys=p([],{});return this._partition_path_web=p([],{})},g.$$arity=-1); -a.def(e,"$absolute_path?",k=function(a){var b;return n(b=a["$start_with?"](q(f,"SLASH")))?b:this.file_separator["$=="](q(f,"BACKSLASH"))?q(f,"WindowsRootRx")["$match?"](a):this.file_separator["$=="](q(f,"BACKSLASH"))},k.$$arity=1);n(q(f,"RUBY_ENGINE")["$=="]("opal")?m("::","JAVASCRIPT_IO_MODULE")["$=="]("xmlhttprequest"):q(f,"RUBY_ENGINE")["$=="]("opal"))?a.def(e,"$root?",l=function(a){var b;return n(b=this["$absolute_path?"](a))?b:a["$start_with?"]("file://","http://","https://")},l.$$arity=1):a.alias(e, -"root?","absolute_path?");a.def(e,"$unc?",v=function(a){return a["$start_with?"](q(f,"DOUBLE_SLASH"))},v.$$arity=1);a.def(e,"$web_root?",u=function(a){return a["$start_with?"](q(f,"SLASH"))},u.$$arity=1);a.def(e,"$descends_from?",A=function(a,c){var e;return c["$=="](a)?0:c["$=="](q(f,"SLASH"))?n(e=a["$start_with?"](q(f,"SLASH")))?1:e:n(e=a["$start_with?"](b(c,q(f,"SLASH"))))?b(c.$length(),1):e},A.$$arity=2);a.def(e,"$relative_path",x=function(b,c){var e;if(n(this["$root?"](b))){if(n(e=this["$descends_from?"](b, -c)))return b.$slice(e,b.$length());try{return q(f,"Pathname").$new(b).$relative_path_from(q(f,"Pathname").$new(c)).$to_s()}catch(sa){if(a.rescue(sa,[q(f,"StandardError")]))try{return b}finally{a.pop_exception()}else throw sa;}}else return b},x.$$arity=2);a.def(e,"$posixify",E=function(a){return n(a)?n(this.file_separator["$=="](q(f,"BACKSLASH"))?a["$include?"](q(f,"BACKSLASH")):this.file_separator["$=="](q(f,"BACKSLASH")))?a.$tr(q(f,"BACKSLASH"),q(f,"SLASH")):a:""},E.$$arity=1);a.alias(e,"posixfy", -"posixify");a.def(e,"$expand_path",y=function(b){var c,e,d=h,g=c=h;var k=this.$partition_path(b);c=a.to_ary(k);d=null==c[0]?h:c[0];c=null==c[1]?h:c[1];k;return n(b["$include?"](q(f,"DOT_DOT")))?(g=[],r(d,"each",[],(e=function(a){null==a&&(a=h);return a["$=="](q(f,"DOT_DOT"))?g.$pop():g["$<<"](a)},e.$$s=this,e.$$arity=1,e)),this.$join_path(g,c)):this.$join_path(d,c)},y.$$arity=1);a.def(e,"$partition_path",M=function(c,e){var d,g,k=h;null==e&&(e=h);if(n(d=(g=n(e)?this._partition_path_web:this._partition_path_sys)["$[]"](c)))return d; -d=this.$posixify(c);n(e)?n(this["$web_root?"](d))?k=q(f,"SLASH"):n(d["$start_with?"](q(f,"DOT_SLASH")))&&(k=q(f,"DOT_SLASH")):n(this["$root?"](d))?k=n(this["$unc?"](d))?q(f,"DOUBLE_SLASH"):n(d["$start_with?"](q(f,"SLASH")))?q(f,"SLASH"):d.$slice(0,b(d.$index(q(f,"SLASH")),1)):n(d["$start_with?"](q(f,"DOT_SLASH")))&&(k=q(f,"DOT_SLASH"));e=(n(k)?d.$slice(k.$length(),d.$length()):d).$split(q(f,"SLASH"));e.$delete(q(f,"DOT"));c=[c,[e,k]];r(g,"[]=",a.to_a(c));g=c.length;g="number"===typeof g?g-1:g["$-"](1); -return c[g]},M.$$arity=-2);a.def(e,"$join_path",C=function(a,b){null==b&&(b=h);return n(b)?""+b+a.$join(q(f,"SLASH")):a.$join(q(f,"SLASH"))},C.$$arity=-2);a.def(e,"$system_path",D=function(c,e,d,g){var k,l,v,t=h,u=h,z=h,A=h,x=t=h,F=h,E=h,U=x=h;null==e&&(e=h);null==d&&(d=h);null==g&&(g=p([],{}));n(d)&&(n(this["$root?"](d))||this.$raise(m("::","SecurityError"),"Jail is not an absolute path: "+d),d=this.$posixify(d));if(n(c)){if(n(this["$root?"](c))){t=this.$expand_path(c);if(n(n(k=d)?this["$descends_from?"](t, -d)["$!"]():k)){if(n(g.$fetch("recover",!0))){this.$logger().$warn(""+(n(k=g["$[]"]("target_name"))?k:"path")+" is outside of jail; recovering automatically");var y=this.$partition_path(t);k=a.to_ary(y);u=null==k[0]?h:k[0];y;y=this.$partition_path(d);k=a.to_ary(y);z=null==k[0]?h:k[0];A=null==k[1]?h:k[1];y;return this.$join_path(b(z,u),A)}this.$raise(m("::","SecurityError"),""+(n(k=g["$[]"]("target_name"))?k:"path")+" "+c+" is outside of jail: "+d+" (disallowed in safe mode)")}return t}y=this.$partition_path(c); -k=a.to_ary(y);u=null==k[0]?h:k[0];y}else u=[];if(n(u["$empty?"]())){if(n(e["$nil_or_empty?"]()))return n(k=d)?k:this.working_dir;if(n(this["$root?"](e)))if(n(d))e=this.$posixify(e);else return this.$expand_path(e);else y=this.$partition_path(e),k=a.to_ary(y),u=null==k[0]?h:k[0],y,e=n(k=d)?k:this.working_dir}else n(e["$nil_or_empty?"]())?e=n(k=d)?k:this.working_dir:n(this["$root?"](e))?n(d)&&(e=this.$posixify(e)):e=""+(n(k=d)?k:this.working_dir).$chomp("/")+"/"+e;n(n(k=n(y=d)?t=this["$descends_from?"](e, -d)["$!"]():y)?this.file_separator["$=="](q(f,"BACKSLASH")):k)?(y=this.$partition_path(e),k=a.to_ary(y),x=null==k[0]?h:k[0],F=null==k[1]?h:k[1],y,y=this.$partition_path(d),k=a.to_ary(y),z=null==k[0]?h:k[0],A=null==k[1]?h:k[1],y,n(F["$!="](A))&&(n(g.$fetch("recover",!0))?(this.$logger().$warn("start path for "+(n(k=g["$[]"]("target_name"))?k:"path")+" is outside of jail root; recovering automatically"),x=z,t=!1):this.$raise(m("::","SecurityError"),"start path for "+(n(k=g["$[]"]("target_name"))?k:"path")+ -" "+e+" refers to location outside jail root: "+d+" (disallowed in safe mode)"))):(y=this.$partition_path(e),k=a.to_ary(y),x=null==k[0]?h:k[0],A=null==k[1]?h:k[1],y);n((E=b(x,u))["$include?"](q(f,"DOT_DOT")))&&(k=[E,[]],x=k[0],E=k[1],k,n(d)?(n(z)||(y=this.$partition_path(d),k=a.to_ary(y),z=null==k[0]?h:k[0],y),U=!1,r(x,"each",[],(l=function(a){var b=l.$$s||this,e;null==a&&(a=h);if(a["$=="](q(f,"DOT_DOT"))){a=E.$size();var k=z.$size();a="number"===typeof a&&"number"===typeof k?a>k:a["$>"](k);if(n(a))return E.$pop(); -if(n(g.$fetch("recover",!0))){if(n(U))return h;b.$logger().$warn(""+(n(e=g["$[]"]("target_name"))?e:"path")+" has illegal reference to ancestor of jail; recovering automatically");return U=!0}return b.$raise(m("::","SecurityError"),""+(n(e=g["$[]"]("target_name"))?e:"path")+" "+c+" refers to location outside jail: "+d+" (disallowed in safe mode)")}return E["$<<"](a)},l.$$s=this,l.$$arity=1,l))):r(x,"each",[],(v=function(a){null==a&&(a=h);return a["$=="](q(f,"DOT_DOT"))?E.$pop():E["$<<"](a)},v.$$s= -this,v.$$arity=1,v)));return n(t)?(t=this.$join_path(E,A),n(this["$descends_from?"](t,d))?t:n(g.$fetch("recover",!0))?(this.$logger().$warn(""+(n(k=g["$[]"]("target_name"))?k:"path")+" is outside of jail; recovering automatically"),n(z)||(y=this.$partition_path(d),k=a.to_ary(y),z=null==k[0]?h:k[0],y),this.$join_path(b(z,u),A)):this.$raise(m("::","SecurityError"),""+(n(k=g["$[]"]("target_name"))?k:"path")+" "+c+" is outside of jail: "+d+" (disallowed in safe mode)")):this.$join_path(E,A)},D.$$arity= --2);a.def(e,"$web_path",B=function(b,c){var e,d,g=h,k=h,l=h,p=h,m=h;null==c&&(c=h);b=this.$posixify(b);c=this.$posixify(c);n(n(e=c["$nil_or_empty?"]())?e:this["$web_root?"](b))||(c=this.$extract_uri_prefix(""+c+(n(c["$end_with?"](q(f,"SLASH")))?"":q(f,"SLASH"))+b),e=a.to_ary(c),b=null==e[0]?h:e[0],g=null==e[1]?h:e[1],c);c=this.$partition_path(b,!0);e=a.to_ary(c);k=null==e[0]?h:e[0];l=null==e[1]?h:e[1];c;p=[];r(k,"each",[],(d=function(a){var b;null==a&&(a=h);return a["$=="](q(f,"DOT_DOT"))?n(p["$empty?"]())? -n(n(b=l)?l["$!="](q(f,"DOT_SLASH")):b)?h:p["$<<"](a):p["$[]"](-1)["$=="](q(f,"DOT_DOT"))?p["$<<"](a):p.$pop():p["$<<"](a)},d.$$s=this,d.$$arity=1,d));n((m=this.$join_path(p,l))["$include?"](" "))&&(m=m.$gsub(" ","%20"));return n(g)?""+g+m:m},B.$$arity=-2);e.$private();return(a.def(e,"$extract_uri_prefix",N=function(a){var b;return n(n(b=a["$include?"](":"))?q(f,"UriSniffRx")["$=~"](a):b)?[a.$slice(((b=t["~"])===h?h:b["$[]"](0)).$length(),a.$length()),(b=t["~"])===h?h:b["$[]"](0)]:a},N.$$arity=1), -h)&&"extract_uri_prefix"})(d[0],null,d)}(g[0],g)};Opal.modules["asciidoctor/reader"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}function g(a,b){return"number"===typeof a&&"number"===typeof b?a>b:a["$>"](b)}function h(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}function m(a,b){return"number"===typeof a&&"number"===typeof b?a>=b:a["$>="](b)}var q=[],l=a.nil,c=a.const_get_qualified,n=a.const_get_relative,p=a.module,r=a.klass,t=a.hash2, -k=a.truthy,e=a.send,f=a.gvars,u=a.hash;a.add_stubs("$include $attr_reader $+ $attr_accessor $! $=== $split $file $dir $dirname $path $basename $lineno $prepare_lines $drop $empty? $nil_or_empty? $peek_line $> $slice $[] $length $process_line $times $shift $read_line $<< $- $unshift_all $has_more_lines? $join $read_lines $unshift $start_with? $== $* $read_lines_until $size $clear $cursor $[]= $!= $fetch $cursor_at_mark $warn $logger $message_with_context $new $tap $each $instance_variables $instance_variable_get $instance_variable_set $class $object_id $inspect $private $prepare_source_array $prepare_source_string $chomp $valid_encoding? $to_s $raise $to_i $attributes $catalog $pop_include $parse $path= $dup $end_with? $keys $rindex $rootname $key? $attr $>= $nil? $extensions? $include_processors? $extensions $include_processors $map $skip_front_matter! $pop $adjust_indentation! $include? $=~ $preprocess_conditional_directive $preprocess_include_directive $downcase $error $none? $any? $all? $strip $send $resolve_expr_val $replace_next_line $rstrip $sub_attributes $attribute_missing $info $parse_attributes $find $handles? $instance $process_method $safe $resolve_include_path $method $split_delimited_value $partition $< $/ $to_a $uniq $sort $call $each_line $infinite? $push_include $delete $create_include_cursor $delete_at $read $uriish? $attr? $require_library $normalize_system_path $file? $relative_path $path_resolver $base_dir $to_f".split(" ")); -return function(d,q){d=[p(d,"Asciidoctor")].concat(q);(function(d,$super,f){d=r(d,$super,"Reader");var p=[d].concat(f),m,q,v,u,A,x,y,E,C,M,D,B,N,T,G,H,X,J,S,I,aa,na,Z,O,P,ba,R,ia,da,xa,Y,ta,Ia,Ga,Ja,Xa,Qa;d.$$prototype.file=d.$$prototype.lines=d.$$prototype.look_ahead=d.$$prototype.unescape_next_line=d.$$prototype.lineno=d.$$prototype.process_lines=d.$$prototype.dir=d.$$prototype.path=d.$$prototype.mark=d.$$prototype.source_lines=d.$$prototype.saved=l;d.$include(n(p,"Logging"));(function(c,$super, -e){c=r(c,$super,"Cursor");[c].concat(e);var d,f,g;c.$$prototype.lineno=c.$$prototype.path=l;c.$attr_reader("file","dir","path","lineno");a.def(c,"$initialize",d=function(a,b,c,e){var d;null==b&&(b=l);null==c&&(c=l);null==e&&(e=1);return d=[a,b,c,e],this.file=d[0],this.dir=d[1],this.path=d[2],this.lineno=d[3],d},d.$$arity=-2);a.def(c,"$advance",f=function(a){return this.lineno=b(this.lineno,a)},f.$$arity=1);a.def(c,"$line_info",g=function(){return""+this.path+": line "+this.lineno},g.$$arity=0);return a.alias(c, -"to_s","line_info")})(p[0],null,p);d.$attr_reader("file");d.$attr_reader("dir");d.$attr_reader("path");d.$attr_reader("lineno");d.$attr_reader("source_lines");d.$attr_accessor("process_lines");d.$attr_accessor("unterminated");a.def(d,"$initialize",m=function(b,e,d){null==b&&(b=l);null==e&&(e=l);null==d&&(d=t([],{}));if(k(e["$!"]()))this.file=l,this.dir=".",this.path="<stdin>",this.lineno=1;else if(k(c("::","String")["$==="](e))){this.file=e;e=c("::","File").$split(this.file);var f=a.to_ary(e);this.dir= -null==f[0]?l:f[0];this.path=null==f[1]?l:f[1];e;this.lineno=1}else k(this.file=e.$file())?(this.dir=k(f=e.$dir())?f:c("::","File").$dirname(this.file),this.path=k(f=e.$path())?f:c("::","File").$basename(this.file)):(this.dir=k(f=e.$dir())?f:".",this.path=k(f=e.$path())?f:"<stdin>"),this.lineno=k(f=e.$lineno())?f:1;this.lines=this.$prepare_lines(b,d);this.source_lines=this.lines.$drop(0);this.mark=l;this.look_ahead=0;this.process_lines=!0;this.unescape_next_line=!1;return this.saved=this.unterminated= -l},m.$$arity=-1);a.def(d,"$has_more_lines?",q=function(){return k(this.lines["$empty?"]())?(this.look_ahead=0,!1):!0},q.$$arity=0);a.def(d,"$empty?",v=function(){return k(this.lines["$empty?"]())?(this.look_ahead=0,!0):!1},v.$$arity=0);a.alias(d,"eof?","empty?");a.def(d,"$next_line_empty?",u=function(){return this.$peek_line()["$nil_or_empty?"]()},u.$$arity=0);a.def(d,"$peek_line",A=function(a){var b,c=l;null==a&&(a=!1);return k(k(b=a)?b:g(this.look_ahead,0))?k(this.unescape_next_line)?(c=this.lines["$[]"](0)).$slice(1, -c.$length()):this.lines["$[]"](0):k(this.lines["$empty?"]())?(this.look_ahead=0,l):k(c=this.$process_line(this.lines["$[]"](0)))?c:this.$peek_line()},A.$$arity=-1);a.def(d,"$peek_lines",x=function(b,c){var d,f,g=this,m=l,q=l;null==b&&(b=l);null==c&&(c=!1);m=g.look_ahead;q=[];(function(){var m=a.new_brk();try{return e(k(d=b)?d:n(p,"MAX_INT"),"times",[],(f=function(){var b=f.$$s||this,e;null==b.lineno&&(b.lineno=l);if(k(e=k(c)?b.$shift():b.$read_line()))return q["$<<"](e);k(c)&&(b.lineno=h(b.lineno, -1));a.brk(l,m)},f.$$s=g,f.$$brk=m,f.$$arity=0,f))}catch(Ua){if(Ua===m)return Ua.$v;throw Ua;}})();k(q["$empty?"]())||(g.$unshift_all(q),k(c)&&(g.look_ahead=m));return q},x.$$arity=-1);a.def(d,"$read_line",y=function(){var a;return k(k(a=g(this.look_ahead,0))?a:this["$has_more_lines?"]())?this.$shift():l},y.$$arity=0);a.def(d,"$read_lines",E=function(){var a;for(a=[];k(this["$has_more_lines?"]());)a["$<<"](this.$shift());return a},E.$$arity=0);a.alias(d,"readlines","read_lines");a.def(d,"$read",C= -function(){return this.$read_lines().$join(n(p,"LF"))},C.$$arity=0);a.def(d,"$advance",M=function(){return k(this.$shift())?!0:!1},M.$$arity=0);a.def(d,"$unshift_line",D=function(a){this.$unshift(a);return l},D.$$arity=1);a.alias(d,"restore_line","unshift_line");a.def(d,"$unshift_lines",B=function(a){this.$unshift_all(a);return l},B.$$arity=1);a.alias(d,"restore_lines","unshift_lines");a.def(d,"$replace_next_line",N=function(a){this.$shift();this.$unshift(a);return!0},N.$$arity=1);a.alias(d,"replace_line", -"replace_next_line");a.def(d,"$skip_blank_lines",T=function(){var a,c;if(k(this["$empty?"]()))return l;for(a=0;k(c=this.$peek_line());)if(k(c["$empty?"]()))this.$shift(),a=b(a,1);else return a},T.$$arity=0);a.def(d,"$skip_comment_lines",G=function(){var a,b=l,c=l;if(k(this["$empty?"]()))return l;for(;k(k(a=b=this.$peek_line())?b["$empty?"]()["$!"]():a);)if(k(b["$start_with?"]("//")))if(k(b["$start_with?"]("///")))if(k(k(a=g(c=b.$length(),3))?b["$=="]("/"["$*"](c)):a))this.$read_lines_until(t(["terminator", -"skip_first_line","read_last_line","skip_processing","context"],{terminator:b,skip_first_line:!0,read_last_line:!0,skip_processing:!0,context:"comment"}));else break;else this.$shift();else break;return l},G.$$arity=0);a.def(d,"$skip_line_comments",H=function(){var a,b,c=l;if(k(this["$empty?"]()))return[];for(b=[];k(k(a=c=this.$peek_line())?c["$empty?"]()["$!"]():a);)if(k(c["$start_with?"]("//")))b["$<<"](this.$shift());else break;return b},H.$$arity=0);a.def(d,"$terminate",X=function(){this.lineno= -b(this.lineno,this.lines.$size());this.lines.$clear();this.look_ahead=0;return l},X.$$arity=0);a.def(d,"$read_lines_until",J=function(b){var c,d,f,g,m=J.$$p,q=m||l,r=l,v=l,w=l,u=l,z=l,A=l,x=l,F=l,y=l,E=l,C=l,M=l,D=l;m&&(J.$$p=null);null==b&&(b=t([],{}));r=[];k(k(c=this.process_lines)?b["$[]"]("skip_processing"):c)&&(this.process_lines=!1,v=!0);k(w=b["$[]"]("terminator"))?(u=k(c=b["$[]"]("cursor"))?c:this.$cursor(),A=z=!1):(z=b["$[]"]("break_on_blank_lines"),A=b["$[]"]("break_on_list_continuation")); -x=b["$[]"]("skip_line_comments");F=y=E=l;for(k(b["$[]"]("skip_first_line"))&&this.$shift();k(k(d=F["$!"]())?C=this.$read_line():d);)F=function(){for(;k(!0);)return k(k(f=w)?C["$=="](w):f)||k(k(f=z)?C["$empty?"]():f)?!0:k(k(f=k(g=A)?y:g)?C["$=="](n(p,"LIST_CONTINUATION")):f)?(M=["preserve_last_line",!0],e(b,"[]=",a.to_a(M)),M[h(M.length,1)],!0):k((f=q!==l)?a.yield1(q,C):q!==l)?!0:!1;return l}(),k(F)?(k(b["$[]"]("read_last_line"))&&(r["$<<"](C),y=!0),k(b["$[]"]("preserve_last_line"))&&(this.$unshift(C), -E=!0)):k(k(d=k(f=x)?C["$start_with?"]("//"):f)?C["$start_with?"]("///")["$!"]():d)||(r["$<<"](C),y=!0);k(v)&&(this.process_lines=!0,k(k(c=E)?w["$!"]():c)&&(this.look_ahead=h(this.look_ahead,1)));k(k(c=k(d=w)?w["$!="](C):d)?D=b.$fetch("context",w):c)&&(u["$=="]("at_mark")&&(u=this.$cursor_at_mark()),this.$logger().$warn(this.$message_with_context("unterminated "+D+" block",t(["source_location"],{source_location:u}))),this.unterminated=!0);return r},J.$$arity=-1);a.def(d,"$shift",S=function(){this.lineno= -b(this.lineno,1);this.look_ahead["$=="](0)||(this.look_ahead=h(this.look_ahead,1));return this.lines.$shift()},S.$$arity=0);a.def(d,"$unshift",I=function(a){this.lineno=h(this.lineno,1);this.look_ahead=b(this.look_ahead,1);return this.lines.$unshift(a)},I.$$arity=1);a.def(d,"$unshift_all",aa=function(c){this.lineno=h(this.lineno,c.$size());this.look_ahead=b(this.look_ahead,c.$size());return e(this.lines,"unshift",a.to_a(c))},aa.$$arity=1);a.def(d,"$cursor",na=function(){return n(p,"Cursor").$new(this.file, -this.dir,this.path,this.lineno)},na.$$arity=0);a.def(d,"$cursor_at_line",Z=function(a){return n(p,"Cursor").$new(this.file,this.dir,this.path,a)},Z.$$arity=1);a.def(d,"$cursor_at_mark",O=function(){return k(this.mark)?e(n(p,"Cursor"),"new",a.to_a(this.mark)):this.$cursor()},O.$$arity=0);a.def(d,"$cursor_before_mark",P=function(){if(k(this.mark)){var b=this.mark;var c=a.to_ary(b);var e=null==c[0]?l:c[0];var d=null==c[1]?l:c[1];var f=null==c[2]?l:c[2];c=null==c[3]?l:c[3];b;return n(p,"Cursor").$new(e, -d,f,h(c,1))}return n(p,"Cursor").$new(this.file,this.dir,this.path,h(this.lineno,1))},P.$$arity=0);a.def(d,"$cursor_at_prev_line",ba=function(){return n(p,"Cursor").$new(this.file,this.dir,this.path,h(this.lineno,1))},ba.$$arity=0);a.def(d,"$mark",R=function(){return this.mark=[this.file,this.dir,this.path,this.lineno]},R.$$arity=0);a.def(d,"$line_info",ia=function(){return""+this.path+": line "+this.lineno},ia.$$arity=0);a.def(d,"$lines",da=function(){return this.lines.$drop(0)},da.$$arity=0);a.def(d, -"$string",xa=function(){return this.lines.$join(n(p,"LF"))},xa.$$arity=0);a.def(d,"$source",Y=function(){return this.source_lines.$join(n(p,"LF"))},Y.$$arity=0);a.def(d,"$save",ta=function(){var b;this.saved=e(t([],{}),"tap",[],(b=function(d){var f=b.$$s||this,g;null==d&&(d=l);return e(f.$instance_variables(),"each",[],(g=function(b){var f=g.$$s||this,p,m=l;null==b&&(b=l);if(k(k(p=b["$=="]("@saved"))?p:b["$=="]("@source_lines")))return l;b=[b,k(c("::","Array")["$==="](m=f.$instance_variable_get(b)))? -m.$drop(0):m];e(d,"[]=",a.to_a(b));return b[h(b.length,1)]},g.$$s=f,g.$$arity=1,g))},b.$$s=this,b.$$arity=1,b));return l},ta.$$arity=0);a.def(d,"$restore_save",Ia=function(){var a;return k(this.saved)?(e(this.saved,"each",[],(a=function(b,c){var e=a.$$s||this;null==b&&(b=l);null==c&&(c=l);return e.$instance_variable_set(b,c)},a.$$s=this,a.$$arity=2,a)),this.saved=l):l},Ia.$$arity=0);a.def(d,"$discard_save",Ga=function(){return this.saved=l},Ga.$$arity=0);a.def(d,"$to_s",Ja=function(){return"#<"+this.$class()+ -"@"+this.$object_id()+" {path: "+this.path.$inspect()+", line: "+this.lineno+"}>"},Ja.$$arity=0);d.$private();a.def(d,"$prepare_lines",Xa=function(b,e){var d=l,f=l;null==e&&(e=t([],{}));try{return k(d=e["$[]"]("normalize"))?(f=d["$=="]("chomp")?!1:!0,k(c("::","Array")["$==="](b))?n(p,"Helpers").$prepare_source_array(b,f):n(p,"Helpers").$prepare_source_string(b,f)):k(c("::","Array")["$==="](b))?b.$drop(0):k(b)?b.$chomp().$split(n(p,"LF"),-1):[]}catch(Va){if(a.rescue(Va,[n(p,"StandardError")]))try{return k((k(c("::", -"Array")["$==="](b))?b.$join():b.$to_s())["$valid_encoding?"]())?this.$raise():this.$raise(c("::","ArgumentError"),"source is either binary or contains invalid Unicode data")}finally{a.pop_exception()}else throw Va;}},Xa.$$arity=-2);return(a.def(d,"$process_line",Qa=function(a){k(this.process_lines)&&(this.look_ahead=b(this.look_ahead,1));return a},Qa.$$arity=1),l)&&"process_line"})(d[0],null,d);(function(d,$super,p){d=r(d,$super,"PreprocessorReader");var q=[d].concat(p),v,A,x,y,E,C,M,D,B,N,G,H,T, -X,J,S,I,Z,la,O;d.$$prototype.include_stack=d.$$prototype.lines=d.$$prototype.file=d.$$prototype.dir=d.$$prototype.path=d.$$prototype.lineno=d.$$prototype.maxdepth=d.$$prototype.process_lines=d.$$prototype.includes=d.$$prototype.document=d.$$prototype.unescape_next_line=d.$$prototype.include_processor_extensions=d.$$prototype.look_ahead=d.$$prototype.skipping=d.$$prototype.conditional_stack=l;d.$attr_reader("include_stack");a.def(d,"$initialize",v=function(b,c,d,f){var h,p;v.$$p&&(v.$$p=null);null== -c&&(c=l);null==d&&(d=l);null==f&&(f=t([],{}));this.document=b;e(this,a.find_super_dispatcher(this,"initialize",v,!1),[c,d,f],null);k(g(p=(k(h=b.$attributes()["$[]"]("max-include-depth"))?h:64).$to_i(),0))?this.maxdepth=t(["abs","curr","rel"],{abs:p,curr:p,rel:p}):this.maxdepth=l;this.include_stack=[];this.includes=b.$catalog()["$[]"]("includes");this.skipping=!1;this.conditional_stack=[];return this.include_processor_extensions=l},v.$$arity=-2);a.def(d,"$has_more_lines?",A=function(){return k(this.$peek_line())? -!0:!1},A.$$arity=0);a.def(d,"$empty?",x=function(){return k(this.$peek_line())?!1:!0},x.$$arity=0);a.alias(d,"eof?","empty?");a.def(d,"$peek_line",y=function(b){var c=y.$$p,d;c&&(y.$$p=null);var f=0;var g=arguments.length;for(d=Array(g);f<g;f++)d[f]=arguments[f];null==b&&(b=!1);if(k(c=e(this,a.find_super_dispatcher(this,"peek_line",y,!1),d,c)))return c;if(k(this.include_stack["$empty?"]()))return l;this.$pop_include();return this.$peek_line(b)},y.$$arity=-1);a.def(d,"$push_include",E=function(d,f, -p,m,r){var v,u=l,z=l;null==f&&(f=l);null==p&&(p=l);null==m&&(m=1);null==r&&(r=t([],{}));this.include_stack["$<<"]([this.lines,this.file,this.dir,this.path,this.lineno,this.maxdepth,this.process_lines]);if(k(this.file=f)){if(k(c("::","String")["$==="](f)))this.dir=c("::","File").$dirname(f);else if(k(n(q,"RUBY_ENGINE_OPAL")))this.dir=c("::","URI").$parse(c("::","File").$dirname(f=f.$to_s()));else{var A=[(u=c("::","File").$dirname(f.$path()))["$=="]("/")?"":u];e(this.dir=f.$dup(),"path=",a.to_a(A)); -A[h(A.length,1)];f=f.$to_s()}this.path=p=k(v=p)?v:c("::","File").$basename(f);k(this.process_lines=e(f,"end_with?",a.to_a(n(q,"ASCIIDOC_EXTENSIONS").$keys())))&&(A=[p.$slice(0,p.$rindex(".")),k(r["$[]"]("partial-option"))?l:!0],e(this.includes,"[]=",a.to_a(A)),A[h(A.length,1)])}else this.dir=".",this.process_lines=!0,k(this.path=p)?(A=[n(q,"Helpers").$rootname(p),k(r["$[]"]("partial-option"))?l:!0],e(this.includes,"[]=",a.to_a(A)),A[h(A.length,1)]):this.path="<stdin>";this.lineno=m;k(k(v=this.maxdepth)? -r["$key?"]("depth"):v)&&(k(g(f=r["$[]"]("depth").$to_i(),0))?(k(g(p=b(this.include_stack.$size(),f),z=this.maxdepth["$[]"]("abs")))&&(p=f=z),this.maxdepth=t(["abs","curr","rel"],{abs:z,curr:p,rel:f})):this.maxdepth=t(["abs","curr","rel"],{abs:this.maxdepth["$[]"]("abs"),curr:this.include_stack.$size(),rel:0}));if(k((this.lines=this.$prepare_lines(d,t(["normalize","condense","indent"],{normalize:k(v=this.process_lines)?v:"chomp",condense:!1,indent:r["$[]"]("indent")})))["$empty?"]()))this.$pop_include(); -else{if(k(r["$key?"]("leveloffset"))){this.lines.$unshift("");this.lines.$unshift(":leveloffset: "+r["$[]"]("leveloffset"));this.lines["$<<"]("");if(k(d=this.document.$attr("leveloffset")))this.lines["$<<"](":leveloffset: "+d);else this.lines["$<<"](":leveloffset!:");this.lineno=h(this.lineno,2)}this.look_ahead=0}return this},E.$$arity=-2);a.def(d,"$include_depth",C=function(){return this.include_stack.$size()},C.$$arity=0);a.def(d,"$exceeds_max_depth?",M=function(){var a,b;return k(a=k(b=this.maxdepth)? -m(this.include_stack.$size(),this.maxdepth["$[]"]("curr")):b)?this.maxdepth["$[]"]("rel"):a},M.$$arity=0);a.alias(d,"exceeded_max_depth?","exceeds_max_depth?");a.def(d,"$shift",D=function(){var b=D.$$p,c=l,d;b&&(D.$$p=null);var f=0;var g=arguments.length;for(d=Array(g);f<g;f++)d[f]=arguments[f];return k(this.unescape_next_line)?(this.unescape_next_line=!1,(c=e(this,a.find_super_dispatcher(this,"shift",D,!1),d,b)).$slice(1,c.$length())):e(this,a.find_super_dispatcher(this,"shift",D,!1),d,b)},D.$$arity= -0);a.def(d,"$include_processors?",B=function(){var a;return k(this.include_processor_extensions["$nil?"]())?k(k(a=this.document["$extensions?"]())?this.document.$extensions()["$include_processors?"]():a)?(this.include_processor_extensions=this.document.$extensions().$include_processors())["$!"]()["$!"]():this.include_processor_extensions=!1:this.include_processor_extensions["$!="](!1)},B.$$arity=0);a.def(d,"$create_include_cursor",N=function(a,b,e){var d=l;k(c("::","String")["$==="](a))?d=c("::", -"File").$dirname(a):k(n(q,"RUBY_ENGINE_OPAL"))?d=c("::","File").$dirname(a=a.$to_s()):(d=(d=c("::","File").$dirname(a.$path()))["$=="]("")?"/":d,a=a.$to_s());return n(q,"Cursor").$new(a,d,b,e)},N.$$arity=3);a.def(d,"$to_s",G=function(){var a;return"#<"+this.$class()+"@"+this.$object_id()+" {path: "+this.path.$inspect()+", line: "+this.lineno+", include depth: "+this.include_stack.$size()+", include stack: ["+e(this.include_stack,"map",[],(a=function(a){null==a&&(a=l);return a.$to_s()},a.$$s=this, -a.$$arity=1,a)).$join(", ")+"]}>"},G.$$arity=0);d.$private();a.def(d,"$prepare_lines",H=function(b,c){var d,f,g=H.$$p,p,m=l,r;g&&(H.$$p=null);var v=0;var u=arguments.length;for(r=Array(u);v<u;v++)r[v]=arguments[v];null==c&&(c=t([],{}));g=e(this,a.find_super_dispatcher(this,"prepare_lines",H,!1),r,g);k(k(d=this.document)?this.document.$attributes()["$[]"]("skip-front-matter"):d)&&k(p=this["$skip_front_matter!"](g))&&(d=["front-matter",p.$join(n(q,"LF"))],e(this.document.$attributes(),"[]=",a.to_a(d)), -d[h(d.length,1)]);if(k(c.$fetch("condense",!0)))for(;k(k(f=m=g["$[]"](-1))?m["$empty?"]():f);)g.$pop();if(k(c["$[]"]("indent")))n(q,"Parser")["$adjust_indentation!"](g,c["$[]"]("indent").$to_i(),this.document.$attr("tabsize").$to_i());return g},H.$$arity=-2);a.def(d,"$process_line",T=function(a){var c,e;if(!k(this.process_lines))return a;if(k(a["$empty?"]()))return this.look_ahead=b(this.look_ahead,1),a;if(k(k(c=k(e=a["$end_with?"]("]"))?a["$start_with?"]("[")["$!"]():e)?a["$include?"]("::"):c)){if(k(k(c= -a["$include?"]("if"))?n(q,"ConditionalDirectiveRx")["$=~"](a):c)){if(((c=f["~"])===l?l:c["$[]"](1))["$=="]("\\"))return this.unescape_next_line=!0,this.look_ahead=b(this.look_ahead,1),a.$slice(1,a.$length());if(k(this.$preprocess_conditional_directive((c=f["~"])===l?l:c["$[]"](2),(c=f["~"])===l?l:c["$[]"](3),(c=f["~"])===l?l:c["$[]"](4),(c=f["~"])===l?l:c["$[]"](5))))return this.$shift(),l;this.look_ahead=b(this.look_ahead,1);return a}if(k(this.skipping))return this.$shift(),l;if(k(k(c=a["$start_with?"]("inc", -"\\inc"))?n(q,"IncludeDirectiveRx")["$=~"](a):c)){if(((c=f["~"])===l?l:c["$[]"](1))["$=="]("\\"))return this.unescape_next_line=!0,this.look_ahead=b(this.look_ahead,1),a.$slice(1,a.$length());if(k(this.$preprocess_include_directive((c=f["~"])===l?l:c["$[]"](2),(c=f["~"])===l?l:c["$[]"](3))))return l;this.look_ahead=b(this.look_ahead,1);return a}this.look_ahead=b(this.look_ahead,1);return a}if(k(this.skipping))return this.$shift(),l;this.look_ahead=b(this.look_ahead,1);return a},T.$$arity=1);a.def(d, -"$preprocess_conditional_directive",X=function(a,b,c,d){var g,p,m,r,v,u=l,z=l,A=l,x=l,F=x=u=l;k(u=b["$empty?"]())||(b=b.$downcase());if(a["$=="]("endif"))return k(d)?this.$logger().$error(this.$message_with_context("malformed preprocessor directive - text not permitted: endif::"+b+"["+d+"]",t(["source_location"],{source_location:this.$cursor()}))):k(this.conditional_stack["$empty?"]())?this.$logger().$error(this.$message_with_context("unmatched preprocessor directive: endif::"+b+"[]",t(["source_location"], -{source_location:this.$cursor()}))):k(k(g=u)?g:b["$=="]((z=this.conditional_stack["$[]"](-1))["$[]"]("target")))?(this.conditional_stack.$pop(),this.skipping=k(this.conditional_stack["$empty?"]())?!1:this.conditional_stack["$[]"](-1)["$[]"]("skipping")):this.$logger().$error(this.$message_with_context("mismatched preprocessor directive: endif::"+b+"[], expected endif::"+z["$[]"]("target")+"[]",t(["source_location"],{source_location:this.$cursor()}))),!0;if(k(this.skipping))A=!1;else if(x=a,"ifdef"["$==="](x)){if(k(u))return this.$logger().$error(this.$message_with_context("malformed preprocessor directive - missing target: ifdef::["+ -d+"]",t(["source_location"],{source_location:this.$cursor()}))),!0;x=c;A=","["$==="](x)?e(b.$split(",",-1),"none?",[],(p=function(a){var b=p.$$s||this;null==b.document&&(b.document=l);null==a&&(a=l);return b.document.$attributes()["$key?"](a)},p.$$s=this,p.$$arity=1,p)):"+"["$==="](x)?e(b.$split("+",-1),"any?",[],(m=function(a){var b=m.$$s||this;null==b.document&&(b.document=l);null==a&&(a=l);return b.document.$attributes()["$key?"](a)["$!"]()},m.$$s=this,m.$$arity=1,m)):this.document.$attributes()["$key?"](b)["$!"]()}else if("ifndef"["$==="](x)){if(k(u))return this.$logger().$error(this.$message_with_context("malformed preprocessor directive - missing target: ifndef::["+ -d+"]",t(["source_location"],{source_location:this.$cursor()}))),!0;x=c;A=","["$==="](x)?e(b.$split(",",-1),"any?",[],(r=function(a){var b=r.$$s||this;null==b.document&&(b.document=l);null==a&&(a=l);return b.document.$attributes()["$key?"](a)},r.$$s=this,r.$$arity=1,r)):"+"["$==="](x)?e(b.$split("+",-1),"all?",[],(v=function(a){var b=v.$$s||this;null==b.document&&(b.document=l);null==a&&(a=l);return b.document.$attributes()["$key?"](a)},v.$$s=this,v.$$arity=1,v)):this.document.$attributes()["$key?"](b)}else if("ifeval"["$==="](x))if(k(u))if(k(k(g= -d)?n(q,"EvalExpressionRx")["$=~"](d.$strip()):g))u=(g=f["~"])===l?l:g["$[]"](1),x=(g=f["~"])===l?l:g["$[]"](2),F=(g=f["~"])===l?l:g["$[]"](3),A=k(this.$resolve_expr_val(u).$send(x,this.$resolve_expr_val(F)))?!1:!0;else return this.$logger().$error(this.$message_with_context("malformed preprocessor directive - "+(k(d)?"invalid expression":"missing expression")+": ifeval::["+d+"]",t(["source_location"],{source_location:this.$cursor()}))),!0;else return this.$logger().$error(this.$message_with_context("malformed preprocessor directive - target not permitted: ifeval::"+ -b+"["+d+"]",t(["source_location"],{source_location:this.$cursor()}))),!0;k(k(g=a["$=="]("ifeval"))?g:d["$!"]())?(k(A)&&(this.skipping=!0),this.conditional_stack["$<<"](t(["target","skip","skipping"],{target:b,skip:A,skipping:this.skipping}))):k(k(g=this.skipping)?g:A)||(this.$replace_next_line(d.$rstrip()),this.$unshift(""),k(d["$start_with?"]("include::"))&&(this.look_ahead=h(this.look_ahead,1)));return!0},X.$$arity=4);a.def(d,"$preprocess_include_directive",J=function(d,p){var r,v,z,A,x,F,y,E,C, -M,D,B=this,N=l,G=l,H=l,qa=l,T=l,X=l,J=l,S=l,V=l,ja=l,ra=l,I=l,w=ra=l,Q=l,L=l,ea=l,pa=l,K=l,va=l,W=l,ca=l,Z=l,la=l,ua=l,sa=l,aa=l;N=B.document;if(k(k(r=(G=d)["$include?"](n(q,"ATTR_REF_HEAD")))?(G=N.$sub_attributes(d,t(["attribute_missing"],{attribute_missing:(H=k(v=N.$attributes()["$[]"]("attribute-missing"))?v:n(q,"Compliance").$attribute_missing())["$=="]("warn")?"drop-line":H})))["$empty?"]():r)){if(k((r=H["$=="]("drop-line"))?N.$sub_attributes(b(d," "),t(["attribute_missing","drop_line_severity"], -{attribute_missing:"drop-line",drop_line_severity:"ignore"}))["$empty?"]():H["$=="]("drop-line")))return e(B.$logger(),"info",[],(z=function(){var a=z.$$s||this;return a.$message_with_context("include dropped due to missing attribute: include::"+d+"["+p+"]",t(["source_location"],{source_location:a.$cursor()}))},z.$$s=B,z.$$arity=0,z)),B.$shift(),!0;if(k(N.$parse_attributes(p,[],t(["sub_input"],{sub_input:!0}))["$[]"]("optional-option")))return e(B.$logger(),"info",[],(A=function(){var a=A.$$s||this; -return a.$message_with_context("optional include dropped "+(k(H["$=="]("warn")?N.$sub_attributes(b(d," "),t(["attribute_missing","drop_line_severity"],{attribute_missing:"drop-line",drop_line_severity:"ignore"}))["$empty?"]():H["$=="]("warn"))?"due to missing attribute":"because resolved target is blank")+": include::"+d+"["+p+"]",t(["source_location"],{source_location:a.$cursor()}))},A.$$s=B,A.$$arity=0,A)),B.$shift(),!0;B.$logger().$warn(B.$message_with_context("include dropped "+(k((r=H["$=="]("warn"))? -N.$sub_attributes(b(d," "),t(["attribute_missing","drop_line_severity"],{attribute_missing:"drop-line",drop_line_severity:"ignore"}))["$empty?"]():H["$=="]("warn"))?"due to missing attribute":"because resolved target is blank")+": include::"+d+"["+p+"]",t(["source_location"],{source_location:B.$cursor()})));return B.$replace_next_line("Unresolved directive in "+B.path+" - include::"+d+"["+p+"]")}if(k(k(r=B["$include_processors?"]())?qa=e(B.include_processor_extensions,"find",[],(x=function(a){null== -a&&(a=l);return a.$instance()["$handles?"](G)},x.$$s=B,x.$$arity=1,x)):r))return B.$shift(),qa.$process_method()["$[]"](N,B,G,N.$parse_attributes(p,[],t(["sub_input"],{sub_input:!0}))),!0;if(k(m(N.$safe(),c(n(q,"SafeMode"),"SECURE"))))return B.$replace_next_line("link:"+G+"[]");if(k(B.maxdepth)){if(k(m(B.include_stack.$size(),B.maxdepth["$[]"]("curr"))))return B.$logger().$error(B.$message_with_context("maximum include depth of "+B.maxdepth["$[]"]("rel")+" exceeded",t(["source_location"],{source_location:B.$cursor()}))), -l;T=N.$parse_attributes(p,[],t(["sub_input"],{sub_input:!0}));v=B.$resolve_include_path(G,p,T);r=a.to_ary(v);X=null==r[0]?l:r[0];J=null==r[1]?l:r[1];S=null==r[2]?l:r[2];v;if(J["$=="]("file"))V=c("::","File").$method("open"),ja=n(q,"FILE_READ_MODE");else if(J["$=="]("uri"))V=c("::","OpenURI").$method("open_uri"),ja=n(q,"URI_READ_MODE");else return X;if(!k(n(q,"RUBY_ENGINE_OPAL"))){if(k(r=ra=T["$[]"]("encoding")))a:{try{var O=c("::","Encoding").$find(ra);break a}catch(Sa){if(a.rescue(Sa,[n(q,"StandardError")]))try{O= -l;break a}finally{a.pop_exception()}else throw Sa;}O=void 0}else O=r;k(O)&&(I=[1,ra],e(ra=ja.$split(":"),"[]=",a.to_a(I)),I[h(I.length,1)],ja=ra.$join(":"))}w=Q=l;k(p)&&(k(T["$key?"]("lines"))?(w=[],e(B.$split_delimited_value(T["$[]"]("lines")),"each",[],(F=function(c){null==c&&(c=l);if(k(c["$include?"](".."))){var e=c.$partition("..");var d=a.to_ary(e);c=null==d[0]?l:d[0];var f=null==d[2]?l:d[2];e;e=w;k(d=f["$empty?"]())||(d=f=f.$to_i(),d="number"===typeof d?0>d:d["$<"](0));c=k(d)?[c.$to_i(),1/0]: -a.Range.$new(c.$to_i(),f,!1).$to_a();return w=b(e,c)}return w["$<<"](c.$to_i())},F.$$s=B,F.$$arity=1,F)),w=k(w["$empty?"]())?l:w.$sort().$uniq()):k(T["$key?"]("tag"))?k(k(r=(L=T["$[]"]("tag"))["$empty?"]())?r:L["$=="]("!"))||(Q=k(L["$start_with?"]("!"))?u(L.$slice(1,L.$length()),!1):u(L,!0)):k(T["$key?"]("tags"))&&(Q=t([],{}),e(B.$split_delimited_value(T["$[]"]("tags")),"each",[],(y=function(b){var c;null==b&&(b=l);if(k(k(c=b["$empty?"]())?c:b["$=="]("!")))return l;I=k(b["$start_with?"]("!"))?[b.$slice(1, -b.$length()),!1]:[b,!0];e(Q,"[]=",a.to_a(I));return I[h(I.length,1)]},y.$$s=B,y.$$arity=1,y)),k(Q["$empty?"]())&&(Q=l)));if(k(w)){r=[[],l,0];ea=r[0];pa=r[1];K=r[2];r;try{(function(){var d=a.new_brk();try{return e(V,"call",[X,ja],(E=function(d){var f=E.$$s||this,g,h=l;null==d&&(d=l);h=l;return function(){var p=a.new_brk();try{return e(d,"each_line",[],(g=function(e){var d,f,g=l;null==e&&(e=l);K=b(K,1);if(k(k(d=h)?d:k(f=c("::","Float")["$==="](g=w["$[]"](0)))?h=g["$infinite?"]():f))return pa=k(d=pa)? -d:K,ea["$<<"](e);g["$=="](K)&&(pa=k(d=pa)?d:K,ea["$<<"](e),w.$shift());if(k(w["$empty?"]()))a.brk(l,p);else return l},g.$$s=f,g.$$brk=p,g.$$arity=1,g))}catch(cb){if(cb===p)return cb.$v;throw cb;}}()},E.$$s=B,E.$$brk=d,E.$$arity=1,E))}catch(db){if(db===d)return db.$v;throw db;}})()}catch(Sa){if(a.rescue(Sa,[n(q,"StandardError")]))try{return B.$logger().$error(B.$message_with_context("include "+J+" not readable: "+X,t(["source_location"],{source_location:B.$cursor()}))),B.$replace_next_line("Unresolved directive in "+ -B.path+" - include::"+G+"["+p+"]")}finally{a.pop_exception()}else throw Sa;}B.$shift();k(pa)&&(I=["partial-option",""],e(T,"[]=",a.to_a(I)),I[h(I.length,1)],B.$push_include(ea,X,S,pa,T))}else if(k(Q)){r=[[],l,0,[],c("::","Set").$new(),l];ea=r[0];pa=r[1];K=r[2];va=r[3];W=r[4];ca=r[5];r;k(Q["$key?"]("**"))?k(Q["$key?"]("*"))?(Z=la=Q.$delete("**"),ua=Q.$delete("*")):Z=la=ua=Q.$delete("**"):Z=k(Q["$key?"]("*"))?la=(ua=Q.$delete("*"))["$!"]():la=!1;try{e(V,"call",[X,ja],(C=function(c){var d=C.$$s||this, -g,h=l,p=l;null==c&&(c=l);var w=["::","[]"];h=w[0];p=w[1];w;return e(c,"each_line",[],(g=function(c){var d=g.$$s||this,w,m,r,v=l,u=l,z=l;null==c&&(c=l);K=b(K,1);return k(k(w=k(m=c["$include?"](h))?c["$include?"](p):m)?n(q,"TagDirectiveRx")["$=~"](c):w)?(v=(w=f["~"])===l?l:w["$[]"](2),k((w=f["~"])===l?l:w["$[]"](1))?v["$=="](ca)?(va.$pop(),m=k(va["$empty?"]())?[l,la]:va["$[]"](-1),w=a.to_ary(m),ca=null==w[0]?l:w[0],Z=null==w[1]?l:w[1],m):k(Q["$key?"](v))?(u=d.$create_include_cursor(X,G,K),k(z=e(va, -"rindex",[],(r=function(a){null==a&&(a=l);return a["$=="](v)},r.$$s=d,r.$$arity=1,r.$$has_trailing_comma_in_args=!0,r)))?(z["$=="](0)?va.$shift():va.$delete_at(z),d.$logger().$warn(d.$message_with_context("mismatched end tag (expected '"+ca+"' but found '"+v+"') at line "+K+" of include "+J+": "+X,t(["source_location","include_location"],{source_location:d.$cursor(),include_location:u})))):d.$logger().$warn(d.$message_with_context("unexpected end tag '"+v+"' at line "+K+" of include "+J+": "+X,t(["source_location", -"include_location"],{source_location:d.$cursor(),include_location:u})))):l:k(Q["$key?"](v))?(W["$<<"](v),va["$<<"]([ca=v,Z=Q["$[]"](v),K])):k(ua["$nil?"]()["$!"]())?(Z=k(k(w=ca)?Z["$!"]():w)?!1:ua,va["$<<"]([ca=v,Z,K])):l):k(Z)?(pa=k(w=pa)?w:K,ea["$<<"](c)):l},g.$$s=d,g.$$arity=1,g))},C.$$s=B,C.$$arity=1,C))}catch(Sa){if(a.rescue(Sa,[n(q,"StandardError")]))try{return B.$logger().$error(B.$message_with_context("include "+J+" not readable: "+X,t(["source_location"],{source_location:B.$cursor()}))), -B.$replace_next_line("Unresolved directive in "+B.path+" - include::"+G+"["+p+"]")}finally{a.pop_exception()}else throw Sa;}k(va["$empty?"]())||e(va,"each",[],(M=function(a,b,c){b=M.$$s||this;null==a&&(a=l);null==c&&(c=l);return b.$logger().$warn(b.$message_with_context("detected unclosed tag '"+a+"' starting at line "+c+" of include "+J+": "+X,t(["source_location","include_location"],{source_location:b.$cursor(),include_location:b.$create_include_cursor(X,G,c)})))},M.$$s=B,M.$$arity=3,M));k((sa= -h(Q.$keys(),W.$to_a()))["$empty?"]())||B.$logger().$warn(B.$message_with_context("tag"+(k(g(sa.$size(),1))?"s":"")+" '"+sa.$join(", ")+"' not found in include "+J+": "+X,t(["source_location"],{source_location:B.$cursor()})));B.$shift();k(pa)&&(k(k(r=k(v=la)?ua:v)?Q["$empty?"]():r)||(I=["partial-option",""],e(T,"[]=",a.to_a(I)),I[h(I.length,1)]),B.$push_include(ea,X,S,pa,T))}else try{aa=e(V,"call",[X,ja],(D=function(a){null==a&&(a=l);return a.$read()},D.$$s=B,D.$$arity=1,D)),B.$shift(),B.$push_include(aa, -X,S,1,T)}catch(Sa){if(a.rescue(Sa,[n(q,"StandardError")]))try{return B.$logger().$error(B.$message_with_context("include "+J+" not readable: "+X,t(["source_location"],{source_location:B.$cursor()}))),B.$replace_next_line("Unresolved directive in "+B.path+" - include::"+G+"["+p+"]")}finally{a.pop_exception()}else throw Sa;}return!0}return l},J.$$arity=2);a.def(d,"$resolve_include_path",S=function(a,b,d){var f,g,h,p=l,m=l;p=l;p=this.document;if(k(k(f=n(q,"Helpers")["$uriish?"](a))?f:k(c("::","String")["$==="](this.dir))? -l:a=""+this.dir+"/"+a)){if(!k(p["$attr?"]("allow-uri-read")))return this.$replace_next_line("link:"+a+"["+b+"]");k(p["$attr?"]("cache-uri"))?k((g=c("::","OpenURI","skip_raise"))&&(f=c(g,"Cache","skip_raise"))?"constant":l)||n(q,"Helpers").$require_library("open-uri/cached","open-uri-cached"):k(n(q,"RUBY_ENGINE_OPAL")["$!"]())&&c("::","OpenURI");return[c("::","URI").$parse(a),"uri",a]}m=p.$normalize_system_path(a,this.dir,l,t(["target_name"],{target_name:"include file"}));if(!k(c("::","File")["$file?"](m))){if(k(d["$[]"]("optional-option")))return e(this.$logger(), -"info",[],(h=function(){var a=h.$$s||this;return a.$message_with_context("optional include dropped because include file not found: "+m,t(["source_location"],{source_location:a.$cursor()}))},h.$$s=this,h.$$arity=0,h)),this.$shift(),!0;this.$logger().$error(this.$message_with_context("include file not found: "+m,t(["source_location"],{source_location:this.$cursor()})));return this.$replace_next_line("Unresolved directive in "+this.path+" - include::"+a+"["+b+"]")}p=p.$path_resolver().$relative_path(m, -p.$base_dir());return[m,"file",p]},S.$$arity=3);a.def(d,"$pop_include",I=function(){if(k(g(this.include_stack.$size(),0))){var b=this.include_stack.$pop();var c=a.to_ary(b);this.lines=null==c[0]?l:c[0];this.file=null==c[1]?l:c[1];this.dir=null==c[2]?l:c[2];this.path=null==c[3]?l:c[3];this.lineno=null==c[4]?l:c[4];this.maxdepth=null==c[5]?l:c[5];this.process_lines=null==c[6]?l:c[6];b;this.look_ahead=0}return l},I.$$arity=0);a.def(d,"$split_delimited_value",Z=function(a){return k(a["$include?"](","))? -a.$split(","):a.$split(";")},Z.$$arity=1);a.def(d,"$skip_front_matter!",la=function(c,d){var f;null==d&&(d=!0);var g=l;if(c["$[]"](0)["$=="]("---")){var h=c.$drop(0);c.$shift();g=[];k(d)&&(this.lineno=b(this.lineno,1));for(;k(k(f=c["$empty?"]()["$!"]())?c["$[]"](0)["$!="]("---"):f);)g["$<<"](c.$shift()),k(d)&&(this.lineno=b(this.lineno,1));k(c["$empty?"]())?(e(c,"unshift",a.to_a(h)),k(d)&&(this.lineno=0),g=l):(c.$shift(),k(d)&&(this.lineno=b(this.lineno,1)))}return g},la.$$arity=-2);return(a.def(d, -"$resolve_expr_val",O=function(a){var b,c;k(k(b=k(c=a["$start_with?"]('"'))?a["$end_with?"]('"'):c)?b:k(c=a["$start_with?"]("'"))?a["$end_with?"]("'"):c)?(b=!0,a=a.$slice(1,h(a.$length(),1))):b=!1;k(a["$include?"](n(q,"ATTR_REF_HEAD")))&&(a=this.document.$sub_attributes(a,t(["attribute_missing"],{attribute_missing:"drop"})));return k(b)?a:k(a["$empty?"]())?l:a["$=="]("true")?!0:a["$=="]("false")?!1:k(a.$rstrip()["$empty?"]())?" ":k(a["$include?"]("."))?a.$to_f():a.$to_i()},O.$$arity=1),l)&&"resolve_expr_val"})(d[0], -n(d,"Reader"),d)}(q[0],q)};Opal.modules["asciidoctor/section"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}var g=[],h=a.nil,m=a.const_get_relative,q=a.module,l=a.klass,c=a.hash2,n=a.send,p=a.truthy;a.add_stubs("$attr_accessor $attr_reader $=== $+ $level $special $generate_id $title $== $> $sectnum $reftext $! $empty? $sub_placeholder $sub_quotes $compat_mode $[] $attributes $context $assign_numeral $class $object_id $inspect $size $length $chr $[]= $- $gsub $downcase $delete $tr_s $end_with? $chop $start_with? $slice $key? $catalog $unique_id_start_index".split(" ")); -return function(d,g){d=[q(d,"Asciidoctor")].concat(g);(function(d,$super,f){d=l(d,$super,"Section");var g=[d].concat(f),k,q,r,v,t,u,A;d.$$prototype.document=d.$$prototype.level=d.$$prototype.parent=d.$$prototype.numeral=d.$$prototype.numbered=d.$$prototype.sectname=d.$$prototype.title=d.$$prototype.blocks=h;d.$attr_accessor("index");d.$attr_accessor("sectname");d.$attr_accessor("special");d.$attr_accessor("numbered");d.$attr_reader("caption");a.def(d,"$initialize",k=function(d,f,l,q){var r,v;k.$$p&& -(k.$$p=null);null==d&&(d=h);null==f&&(f=h);null==l&&(l=!1);null==q&&(q=c([],{}));n(this,a.find_super_dispatcher(this,"initialize",k,!1),[d,"section",q],null);p(m(g,"Section")["$==="](d))?(r=[p(v=f)?v:b(d.$level(),1),d.$special()],this.level=r[0],this.special=r[1]):(r=[p(v=f)?v:1,!1],this.level=r[0],this.special=r[1]);r;this.numbered=l;return this.index=0},k.$$arity=-1);a.alias(d,"name","title");a.def(d,"$generate_id",q=function(){return m(g,"Section").$generate_id(this.$title(),this.document)},q.$$arity= -0);a.def(d,"$sectnum",r=function(a,b){var c;null==a&&(a=".");null==b&&(b=h);b=p(c=b)?c:b["$=="](!1)?"":a;var d=this.level;d="number"===typeof d?1<d:d["$>"](1);return p(p(c=d)?m(g,"Section")["$==="](this.parent):c)?""+this.parent.$sectnum(a,a)+this.numeral+b:""+this.numeral+b},r.$$arity=-1);a.def(d,"$xreftext",v=function(a){var b,c=h,d=h,f=h;null==a&&(a=h);p(p(b=c=this.$reftext())?c["$empty?"]()["$!"]():b)?b=c:p(a)?(p(this.numbered)?"full"["$==="](a)?(a=p(p(b=(d=this.sectname)["$=="]("chapter"))?b: -d["$=="]("appendix"))?this.$sub_placeholder(this.$sub_quotes("_%s_"),this.$title()):this.$sub_placeholder(this.$sub_quotes(p(this.document.$compat_mode())?"``%s''":'"`%s`"'),this.$title()),a=p(f=this.document.$attributes()["$[]"](""+d+"-refsig"))?""+f+" "+this.$sectnum(".",",")+" "+a:""+this.$sectnum(".",",")+" "+a):a="short"["$==="](a)?p(f=this.document.$attributes()["$[]"](""+this.sectname+"-refsig"))?""+f+" "+this.$sectnum(".",""):this.$sectnum(".",""):p(p(b=(d=this.sectname)["$=="]("chapter"))? -b:d["$=="]("appendix"))?this.$sub_placeholder(this.$sub_quotes("_%s_"),this.$title()):this.$title():a=p(p(b=(d=this.sectname)["$=="]("chapter"))?b:d["$=="]("appendix"))?this.$sub_placeholder(this.$sub_quotes("_%s_"),this.$title()):this.$title(),b=a):b=this.$title();return b},v.$$arity=-1);a.def(d,"$<<",t=function(b){var c=t.$$p,d;c&&(t.$$p=null);var f=0;var g=arguments.length;for(d=Array(g);f<g;f++)d[f]=arguments[f];b.$context()["$=="]("section")&&this.$assign_numeral(b);return n(this,a.find_super_dispatcher(this, -"<<",t,!1),d,c)},t.$$arity=1);a.def(d,"$to_s",u=function(){var b=u.$$p,c;b&&(u.$$p=null);var d=0;var f=arguments.length;for(c=Array(f);d<f;d++)c[d]=arguments[d];return p(this.title)?(b=p(this.numbered)?""+this.$sectnum()+" "+this.title:this.title,"#<"+this.$class()+"@"+this.$object_id()+" {level: "+this.level+", title: "+b.$inspect()+", blocks: "+this.blocks.$size()+"}>"):n(this,a.find_super_dispatcher(this,"to_s",u,!1),c,b)},u.$$arity=0);return(a.defs(d,"$generate_id",A=function(c,d){var f,k,l,q= -h,r=k=h;var v=d.$attributes();var t=p(f=v["$[]"]("idprefix"))?f:"_";p(l=v["$[]"]("idseparator"))?(p(f=l.$length()["$=="](1))?v=f:p(k=(q=l["$empty?"]())["$!"]())?(k=["idseparator",l.$chr()],n(v,"[]=",a.to_a(k)),l=k,v=k.length,v="number"===typeof v?v-1:v["$-"](1),v=l=l[v]):v=k,p(v)&&(r=p(p(f=l["$=="]("-"))?f:l["$=="]("."))?" .-":" "+l+".-")):(f=["_"," _.-"],l=f[0],r=f[1],f);c=""+t+c.$downcase().$gsub(m(g,"InvalidSectionIdCharsRx"),"");p(q)?c=c.$delete(" "):(c=c.$tr_s(r,l),p(c["$end_with?"](l))&&(c= -c.$chop()),p(p(f=t["$empty?"]())?c["$start_with?"](l):f)&&(c=c.$slice(1,c.$length())));if(p(d.$catalog()["$[]"]("refs")["$key?"](c))){d=d.$catalog()["$[]"]("refs");for(f=m(g,"Compliance").$unique_id_start_index();p(d["$[]"](t=""+c+l+f));)f=b(f,1);return t}return c},A.$$arity=2),h)&&"generate_id"})(d[0],m(d,"AbstractBlock"),d)}(g[0],g)};Opal.modules["asciidoctor/stylesheets"]=function(a){var b=[],g=a.nil,h=a.const_get_qualified,m=a.const_get_relative,q=a.module,l=a.klass,c=a.truthy,n=a.hash2;a.add_stubs("$join $new $rstrip $read $primary_stylesheet_data $write $primary_stylesheet_name $stylesheet_basename $for $read_stylesheet $coderay_stylesheet_data $coderay_stylesheet_name $pygments_stylesheet_data $pygments_stylesheet_name".split(" ")); -return function(b,d){b=[q(b,"Asciidoctor")].concat(d);(function(b,$super,e){b=l(b,$super,"Stylesheets");var d=[b].concat(e),p,q,r,v,t,u,z,A,x,y,E,B,C;b.$$prototype.primary_stylesheet_data=g;a.const_set(d[0],"DEFAULT_STYLESHEET_NAME","asciidoctor.css");a.const_set(d[0],"STYLESHEETS_DIR",h("::","File").$join(m(d,"DATA_DIR"),"stylesheets"));b.__instance__=b.$new();a.defs(b,"$instance",p=function(){null==this.__instance__&&(this.__instance__=g);return this.__instance__},p.$$arity=0);a.def(b,"$primary_stylesheet_name", -q=function(){return m(d,"DEFAULT_STYLESHEET_NAME")},q.$$arity=0);a.def(b,"$primary_stylesheet_data",r=function(){var a;return this.primary_stylesheet_data=c(a=this.primary_stylesheet_data)?a:h("::","File").$read(h("::","File").$join(m(d,"STYLESHEETS_DIR"),"asciidoctor-default.css"),n(["mode"],{mode:m(d,"FILE_READ_MODE")})).$rstrip()},r.$$arity=0);a.def(b,"$embed_primary_stylesheet",v=function(){return"<style>\n"+this.$primary_stylesheet_data()+"\n</style>"},v.$$arity=0);a.def(b,"$write_primary_stylesheet", -t=function(a){null==a&&(a=".");return h("::","File").$write(h("::","File").$join(a,this.$primary_stylesheet_name()),this.$primary_stylesheet_data(),n(["mode"],{mode:m(d,"FILE_WRITE_MODE")}))},t.$$arity=-1);a.def(b,"$coderay_stylesheet_name",u=function(){return m(d,"SyntaxHighlighter").$for("coderay").$stylesheet_basename()},u.$$arity=0);a.def(b,"$coderay_stylesheet_data",z=function(){return m(d,"SyntaxHighlighter").$for("coderay").$read_stylesheet()},z.$$arity=0);a.def(b,"$embed_coderay_stylesheet", -A=function(){return"<style>\n"+this.$coderay_stylesheet_data()+"\n</style>"},A.$$arity=0);a.def(b,"$write_coderay_stylesheet",x=function(a){null==a&&(a=".");return h("::","File").$write(h("::","File").$join(a,this.$coderay_stylesheet_name()),this.$coderay_stylesheet_data(),n(["mode"],{mode:m(d,"FILE_WRITE_MODE")}))},x.$$arity=-1);a.def(b,"$pygments_stylesheet_name",y=function(a){null==a&&(a=g);return m(d,"SyntaxHighlighter").$for("pygments").$stylesheet_basename(a)},y.$$arity=-1);a.def(b,"$pygments_stylesheet_data", -E=function(a){null==a&&(a=g);return m(d,"SyntaxHighlighter").$for("pygments").$read_stylesheet(a)},E.$$arity=-1);a.def(b,"$embed_pygments_stylesheet",B=function(a){null==a&&(a=g);return"<style>\n"+this.$pygments_stylesheet_data(a)+"\n</style>"},B.$$arity=-1);return(a.def(b,"$write_pygments_stylesheet",C=function(a,b){null==a&&(a=".");null==b&&(b=g);return h("::","File").$write(h("::","File").$join(a,this.$pygments_stylesheet_name(b)),this.$pygments_stylesheet_data(b),n(["mode"],{mode:m(d,"FILE_WRITE_MODE")}))}, -C.$$arity=-1),g)&&"write_pygments_stylesheet"})(b[0],null,b)}(b[0],b)};Opal.modules["asciidoctor/table"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a>b:a["$>"](b)}function g(a,b){return"number"===typeof a&&"number"===typeof b?a<b:a["$<"](b)}function h(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}function m(a,b){return"number"===typeof a&&"number"===typeof b?a*b:a["$*"](b)}function q(a,b){return"number"===typeof a&&"number"===typeof b?a/b:a["$/"](b)} -function l(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}var c=[],n=a.nil,p=a.const_get_qualified,r=a.const_get_relative,t=a.module,k=a.klass,e=a.hash2,f=a.send,u=a.truthy,x=a.gvars;a.add_stubs("$attr_accessor $attr_reader $new $[] $> $to_i $< $== $[]= $- $attributes $truncate $* $/ $to_f $empty? $body $each $<< $size $+ $assign_column_widths $warn $logger $update_attributes $assign_width $round $map $shift $reinitialize $head= $nil? $unshift $pop $foot= $parent $sourcemap $dup $header_row? $table $style $merge $delete $start_with? $rstrip $slice $length $advance $lstrip $strip $split $include? $readlines $catalog_inline_anchor $=~ $apply_subs $convert $text $!= $file $lineno $to_s $include $to_set $mark $key? $nested? $document $error $message_with_context $cursor_at_prev_line $nil_or_empty? $escape $columns $match $chop $end_with? $gsub $! $push_cellspec $cell_open? $close_cell $take_cellspec $squeeze $upto $times $cursor_before_mark $rowspan $activate_rowspan $colspan $end_of_row? $close_row $private $rows $effective_column_visits".split(" ")); -return function(c,d){c=[t(c,"Asciidoctor")].concat(d);(function(c,$super,d){c=k(c,$super,"Table");var p=[c].concat(d),v,t,z,x,A;c.$$prototype.attributes=c.$$prototype.document=c.$$prototype.has_header_option=c.$$prototype.rows=c.$$prototype.columns=n;a.const_set(p[0],"DEFAULT_PRECISION",4);(function(b,$super,c){b=k(b,$super,"Rows");[b].concat(c);var d,f,g;b.$$prototype.head=b.$$prototype.body=b.$$prototype.foot=n;b.$attr_accessor("head","foot","body");a.def(b,"$initialize",d=function(a,b,c){null== -a&&(a=[]);null==b&&(b=[]);null==c&&(c=[]);this.head=a;this.foot=b;return this.body=c},d.$$arity=-1);a.alias(b,"[]","send");a.def(b,"$by_section",f=function(){return[["head",this.head],["body",this.body],["foot",this.foot]]},f.$$arity=0);return(a.def(b,"$to_h",g=function(){return e(["head","body","foot"],{head:this.head,body:this.body,foot:this.foot})},g.$$arity=0),n)&&"to_h"})(p[0],null,p);c.$attr_accessor("columns");c.$attr_accessor("rows");c.$attr_accessor("has_header_option");c.$attr_reader("caption"); -a.def(c,"$initialize",v=function(c,e){var d,k,l=n,t=n,z=n;v.$$p&&(v.$$p=null);f(this,a.find_super_dispatcher(this,"initialize",v,!1),[c,"table"],null);this.rows=r(p,"Rows").$new();this.columns=[];this.has_header_option=!1;u(l=e["$[]"]("width"))?u(u(d=b(t=l.$to_i(),100))?d:g(t,1))&&!u(t["$=="](0)?u(k=l["$=="]("0"))?k:l["$=="]("0%"):t["$=="](0))&&(t=100):t=100;c=["tablepcwidth",t];f(this.attributes,"[]=",a.to_a(c));c[h(c.length,1)];u(this.document.$attributes()["$[]"]("pagewidth"))&&(c=["tableabswidth", -(z=m(q(t,100),this.document.$attributes()["$[]"]("pagewidth").$to_f()).$truncate(r(p,"DEFAULT_PRECISION")))["$=="](z.$to_i())?z.$to_i():z],f(this.attributes,"[]=",a.to_a(c)),c[h(c.length,1)]);return u(e["$[]"]("rotate-option"))?(c=["orientation","landscape"],f(this.attributes,"[]=",a.to_a(c)),c[h(c.length,1)]):n},v.$$arity=2);a.def(c,"$header_row?",t=function(){var a,b;return u(u(a=b=this.has_header_option)?this.rows.$body()["$empty?"]():a)?b:n},t.$$arity=0);a.def(c,"$create_columns",z=function(c){var e, -d,k=n,m=n,q=n,v=n;v=n;k=[];m=n;q=0;f(c,"each",[],(e=function(a){var b=e.$$s||this,c;null==a&&(a=n);var d=a["$[]"]("width");k["$<<"](r(p,"Column").$new(b,k.$size(),a));return u(g(d,0))?(m=u(c=m)?c:[])["$<<"](k["$[]"](-1)):q=l(q,d)},e.$$s=this,e.$$arity=1,e));u(b(v=(this.columns=k).$size(),0))&&(v=["colcount",v],f(this.attributes,"[]=",a.to_a(v)),v[h(v.length,1)],u(u(d=b(q,0))?d:m)||(q=n),this.$assign_column_widths(q,m));return n},z.$$arity=1);a.def(c,"$assign_column_widths",x=function(a,c){var d,g, -k,m=n,v=n,t=n,z=n,x=n;null==a&&(a=n);null==c&&(c=n);m=r(p,"DEFAULT_PRECISION");v=t=0;u(a)?(u(c)&&(u(b(a,100))?(z=0,this.$logger().$warn("total column width must not exceed 100% when using autowidth columns; got "+a+"%")):(z=q(h(100,a),c.$size()).$truncate(m),z.$to_i()["$=="](z)&&(z=z.$to_i()),a=100),x=e(["width","autowidth-option"],{width:z,"autowidth-option":""}),f(c,"each",[],(d=function(a){null==a&&(a=n);return a.$update_attributes(x)},d.$$s=this,d.$$arity=1,d))),f(this.columns,"each",[],(g=function(b){null== -b&&(b=n);return v=l(v,t=b.$assign_width(n,a,m))},g.$$s=this,g.$$arity=1,g))):(t=q(100,this.columns.$size()).$truncate(m),t.$to_i()["$=="](t)&&(t=t.$to_i()),f(this.columns,"each",[],(k=function(a){null==a&&(a=n);return v=l(v,a.$assign_width(t,n,m))},k.$$s=this,k.$$arity=1,k)));v["$=="](100)||this.columns["$[]"](-1).$assign_width(l(h(100,v),t).$round(m),n,m);return n},x.$$arity=-1);return(a.def(c,"$partition_header_footer",A=function(c){var e,d,g,k=n,l=n,p=n;k=(l=["rowcount",(p=this.rows.$body()).$size()], -f(this.attributes,"[]=",a.to_a(l)),l[h(l.length,1)]);u(b(k,0))&&(u(this.has_header_option)?(l=[[f(p.$shift(),"map",[],(e=function(a){null==a&&(a=n);return a.$reinitialize(!0)},e.$$s=this,e.$$arity=1,e))]],f(this.rows,"head=",a.to_a(l)),l[h(l.length,1)],k=h(k,1)):u(this.has_header_option["$nil?"]())&&(this.has_header_option=!1,p.$unshift(f(p.$shift(),"map",[],(d=function(a){null==a&&(a=n);return a.$reinitialize(!1)},d.$$s=this,d.$$arity=1,d)))));u(u(g=b(k,0))?c["$[]"]("footer-option"):g)&&(l=[[p.$pop()]], -f(this.rows,"foot=",a.to_a(l)),l[h(l.length,1)]);return n},A.$$arity=1),n)&&"partition_header_footer"})(c[0],r(c,"AbstractBlock"),c);(function(b,$super,c){b=k(b,$super,"Column");[b].concat(c);var d,g,p,r;b.$$prototype.attributes=n;b.$attr_accessor("style");a.def(b,"$initialize",d=function(b,c,g){var k;d.$$p&&(d.$$p=null);null==g&&(g=e([],{}));f(this,a.find_super_dispatcher(this,"initialize",d,!1),[b,"table_column"],null);this.style=g["$[]"]("style");b=["colnumber",l(c,1)];f(g,"[]=",a.to_a(b));b[h(b.length, -1)];u(k=g["$[]"]("width"))?k:(b=["width",1],f(g,"[]=",a.to_a(b)),b[h(b.length,1)]);u(k=g["$[]"]("halign"))?k:(b=["halign","left"],f(g,"[]=",a.to_a(b)),b[h(b.length,1)]);u(k=g["$[]"]("valign"))?k:(b=["valign","top"],f(g,"[]=",a.to_a(b)),b[h(b.length,1)]);return this.$update_attributes(g)},d.$$arity=-3);a.alias(b,"table","parent");a.def(b,"$assign_width",g=function(b,c,e){var d=n;u(c)&&(b=q(m(this.attributes["$[]"]("width").$to_f(),100),c).$truncate(e),b.$to_i()["$=="](b)&&(b=b.$to_i()));u(this.$parent().$attributes()["$[]"]("tableabswidth"))&& -(c=["colabswidth",(d=m(q(b,100),this.$parent().$attributes()["$[]"]("tableabswidth")).$truncate(e))["$=="](d.$to_i())?d.$to_i():d],f(this.attributes,"[]=",a.to_a(c)),c[h(c.length,1)]);c=["colpcwidth",b];f(this.attributes,"[]=",a.to_a(c));return c[h(c.length,1)]},g.$$arity=3);a.def(b,"$block?",p=function(){return!1},p.$$arity=0);return(a.def(b,"$inline?",r=function(){return!1},r.$$arity=0),n)&&"inline?"})(r(c,"Table"),r(c,"AbstractNode"),c);(function(b,$super,c){b=k(b,$super,"Cell");var d=[b].concat(c), -q,v,t,z,A,y,E,B,C,U,D;b.$$prototype.document=b.$$prototype.reinitialize_args=b.$$prototype.attributes=b.$$prototype.cursor=b.$$prototype.text=b.$$prototype.subs=b.$$prototype.style=b.$$prototype.inner_document=b.$$prototype.source_location=b.$$prototype.colspan=b.$$prototype.rowspan=n;a.const_set(d[0],"DOUBLE_LF",m(r(d,"LF"),2));b.$attr_accessor("colspan");b.$attr_accessor("rowspan");a.alias(b,"column","parent");b.$attr_reader("inner_document");a.def(b,"$initialize",q=function(b,c,k,p){var m,v,t, -z=n,x=n,A=n,y=n,F=n,E=n,B=n;q.$$p&&(q.$$p=null);null==k&&(k=e([],{}));null==p&&(p=e([],{}));f(this,a.find_super_dispatcher(this,"initialize",q,!1),[b,"table_cell"],null);this.cursor=this.reinitialize_args=n;u(this.document.$sourcemap())&&(this.source_location=p["$[]"]("cursor").$dup());u(b)&&(u(z=b.$table()["$header_row?"]())?u((m=z["$=="]("implicit"))?x=u(v=b.$style())?v:u(t=k)?k["$[]"]("style"):t:z["$=="]("implicit"))&&(u(u(m=x["$=="]("asciidoc"))?m:x["$=="]("literal"))&&(this.reinitialize_args= -[b,c,u(m=k)?k.$merge():m,p]),x=n):x=b.$style(),this.$update_attributes(b.$attributes()));if(u(k))if(u(k["$empty?"]())?this.colspan=this.rowspan=n:(m=[k.$delete("colspan"),k.$delete("rowspan")],this.colspan=m[0],this.rowspan=m[1],m,u(z)||(x=u(m=k["$[]"]("style"))?m:x),this.$update_attributes(k)),x["$=="]("asciidoc"))if(A=!0,y=p["$[]"]("cursor"),u((c=c.$rstrip())["$start_with?"](r(d,"LF")))){for(b=1;u((c=c.$slice(1,c.$length()))["$start_with?"](r(d,"LF")));)b=l(b,1);y.$advance(b)}else c=c.$lstrip(); -else if(x["$=="]("literal"))for(F=!0,c=c.$rstrip();u(c["$start_with?"](r(d,"LF")));)c=c.$slice(1,c.$length());else E=!0,c=u(c)?c.$strip():"";else this.colspan=this.rowspan=n,x["$=="]("asciidoc")&&(A=!0,y=p["$[]"]("cursor"));u(A)?(p=this.document.$attributes().$delete("doctitle"),z=c.$split(r(d,"LF"),-1),!u(z["$empty?"]())&&u((B=z["$[]"](0))["$include?"]("::"))&&(A=r(d,"PreprocessorReader").$new(this.document,[B]).$readlines(),u(B["$=="](A["$[]"](0))?g(A.$size(),2):B["$=="](A["$[]"](0)))||(z.$shift(), -u(A["$empty?"]())||f(z,"unshift",a.to_a(A)))),this.inner_document=r(d,"Document").$new(z,e(["standalone","parent","cursor"],{standalone:!1,parent:this.document,cursor:y})),u(p["$nil?"]())||(y=["doctitle",p],f(this.document.$attributes(),"[]=",a.to_a(y)),y[h(y.length,1)]),this.subs=n):u(F)?(this.content_model="verbatim",this.subs=r(d,"BASIC_SUBS")):(u(E)&&(u(z)?this.cursor=p["$[]"]("cursor"):this.$catalog_inline_anchor(c,p["$[]"]("cursor"))),this.content_model="simple",this.subs=r(d,"NORMAL_SUBS")); -this.text=c;return this.style=x},q.$$arity=-3);a.def(b,"$reinitialize",v=function(b){if(u(b))this.reinitialize_args=n;else{if(u(this.reinitialize_args))return f(p(r(d,"Table"),"Cell"),"new",a.to_a(this.reinitialize_args));this.style=this.attributes["$[]"]("style")}u(this.cursor)&&this.$catalog_inline_anchor();return this},v.$$arity=1);a.def(b,"$catalog_inline_anchor",t=function(a,b){null==a&&(a=this.text);null==b&&(b=n);if(!u(b)){var c=[this.cursor,n];b=c[0];this.cursor=c[1];c}return u(u(c=a["$start_with?"]("[["))? -r(d,"LeadingInlineAnchorRx")["$=~"](a):c)?r(d,"Parser").$catalog_inline_anchor((c=x["~"])===n?n:c["$[]"](1),(c=x["~"])===n?n:c["$[]"](2),this,b,this.document):n},t.$$arity=-1);a.def(b,"$text",z=function(){return this.$apply_subs(this.text,this.subs)},z.$$arity=0);a.def(b,"$text=",A=function(a){return this.text=a},A.$$arity=1);a.def(b,"$content",y=function(){var a,b,c=n,g=n;return(c=this.style)["$=="]("asciidoc")?this.inner_document.$convert():u(this.text["$include?"](r(d,"DOUBLE_LF")))?f(this.$text().$split(r(d, -"BlankLineRx")),"map",[],(a=function(b){var f=a.$$s||this,g;null==b&&(b=n);return u(u(g=c)?c["$!="]("header"):g)?r(d,"Inline").$new(f.$parent(),"quoted",b,e(["type"],{type:c})).$convert():b},a.$$s=this,a.$$arity=1,a)):u((g=this.$text())["$empty?"]())?[]:u(u(b=c)?c["$!="]("header"):b)?[r(d,"Inline").$new(this.$parent(),"quoted",g,e(["type"],{type:c})).$convert()]:[g]},y.$$arity=0);a.def(b,"$lines",E=function(){return this.text.$split(r(d,"LF"))},E.$$arity=0);a.def(b,"$source",B=function(){return this.text}, -B.$$arity=0);a.def(b,"$file",C=function(){var a;return u(a=this.source_location)?this.source_location.$file():a},C.$$arity=0);a.def(b,"$lineno",U=function(){var a;return u(a=this.source_location)?this.source_location.$lineno():a},U.$$arity=0);return(a.def(b,"$to_s",D=function(){var b,c=D.$$p,e;c&&(D.$$p=null);var d=0;var g=arguments.length;for(e=Array(g);d<g;d++)e[d]=arguments[d];return""+f(this,a.find_super_dispatcher(this,"to_s",D,!1),e,c).$to_s()+" - [text: "+this.text+", colspan: "+(u(b=this.colspan)? -b:1)+", rowspan: "+(u(b=this.rowspan)?b:1)+", attributes: "+this.attributes+"]"},D.$$arity=0),n)&&"to_s"})(r(c,"Table"),r(c,"AbstractBlock"),c);(function(c,$super,d){c=k(c,$super,"ParserContext");var g=[c].concat(d),m,q,v,t,z,x,A,y,E,B,C,D,U,M,N,G,H,J,T;c.$$prototype.delimiter=c.$$prototype.delimiter_rx=c.$$prototype.buffer=c.$$prototype.cellspecs=c.$$prototype.cell_open=c.$$prototype.format=c.$$prototype.start_cursor_data=c.$$prototype.reader=c.$$prototype.table=c.$$prototype.current_row=c.$$prototype.colcount= -c.$$prototype.column_visits=c.$$prototype.active_rowspans=c.$$prototype.linenum=n;c.$include(r(g,"Logging"));a.const_set(g[0],"FORMATS",["psv","csv","dsv","tsv"].$to_set());a.const_set(g[0],"DELIMITERS",e(["psv","csv","dsv","tsv","!sv"],{psv:["|",/\|/],csv:[",",/,/],dsv:[":",/:/],tsv:["\t",/\t/],"!sv":["!",/!/]}));c.$attr_accessor("table");c.$attr_accessor("format");c.$attr_reader("colcount");c.$attr_accessor("buffer");c.$attr_reader("delimiter");c.$attr_reader("delimiter_re");a.def(c,"$initialize", -m=function(b,c,d){var f;null==d&&(d=e([],{}));this.start_cursor_data=(this.reader=b).$mark();this.table=c;u(d["$key?"]("format"))?u(r(g,"FORMATS")["$include?"](f=d["$[]"]("format")))?f["$=="]("tsv")?this.format="csv":u((this.format=f)["$=="]("psv")?c.$document()["$nested?"]():(this.format=f)["$=="]("psv"))&&(f="!sv"):(this.$logger().$error(this.$message_with_context("illegal table format: "+f,e(["source_location"],{source_location:b.$cursor_at_prev_line()}))),b=["psv",u(c.$document()["$nested?"]())? -"!sv":"psv"],this.format=b[0],f=b[1],b):(b=["psv",u(c.$document()["$nested?"]())?"!sv":"psv"],this.format=b[0],f=b[1],b);u(d["$key?"]("separator"))?u((d=d["$[]"]("separator"))["$nil_or_empty?"]())?(f=r(g,"DELIMITERS")["$[]"](f),b=a.to_ary(f),this.delimiter=null==b[0]?n:b[0],this.delimiter_rx=null==b[1]?n:b[1],f):d["$=="]("\\t")?(f=r(g,"DELIMITERS")["$[]"]("tsv"),b=a.to_ary(f),this.delimiter=null==b[0]?n:b[0],this.delimiter_rx=null==b[1]?n:b[1],f):(b=[d,new RegExp(p("::","Regexp").$escape(d))],this.delimiter= -b[0],this.delimiter_rx=b[1],b):(f=r(g,"DELIMITERS")["$[]"](f),b=a.to_ary(f),this.delimiter=null==b[0]?n:b[0],this.delimiter_rx=null==b[1]?n:b[1],f);this.colcount=u(c.$columns()["$empty?"]())?-1:c.$columns().$size();this.buffer="";this.cellspecs=[];this.cell_open=!1;this.active_rowspans=[0];this.column_visits=0;this.current_row=[];return this.linenum=-1},m.$$arity=-3);a.def(c,"$starts_with_delimiter?",q=function(a){return a["$start_with?"](this.delimiter)},q.$$arity=1);a.def(c,"$match_delimiter",v= -function(a){return this.delimiter_rx.$match(a)},v.$$arity=1);a.def(c,"$skip_past_delimiter",t=function(a){this.buffer=""+this.buffer+a+this.delimiter;return n},t.$$arity=1);a.def(c,"$skip_past_escaped_delimiter",z=function(a){this.buffer=""+this.buffer+a.$chop()+this.delimiter;return n},z.$$arity=1);a.def(c,"$buffer_has_unclosed_quotes?",x=function(a){var b,c,e=n,d=n;null==a&&(a=n);return(e=u(a)?l(this.buffer,a).$strip():this.buffer.$strip())["$=="]('"')?!0:u(e["$start_with?"]('"'))?u(u(b=u(c=d=e["$end_with?"]('"'))? -e["$end_with?"]('""'):c)?b:e["$start_with?"]('""'))?u(b=(e=e.$gsub('""',""))["$start_with?"]('"'))?e["$end_with?"]('"')["$!"]():b:d["$!"]():!1},x.$$arity=-1);a.def(c,"$take_cellspec",A=function(){return this.cellspecs.$shift()},A.$$arity=0);a.def(c,"$push_cellspec",y=function(a){var b;null==a&&(a=e([],{}));this.cellspecs["$<<"](u(b=a)?b:e([],{}));return n},y.$$arity=-1);a.def(c,"$keep_cell_open",E=function(){this.cell_open=!0;return n},E.$$arity=0);a.def(c,"$mark_cell_closed",B=function(){this.cell_open= -!1;return n},B.$$arity=0);a.def(c,"$cell_open?",C=function(){return this.cell_open},C.$$arity=0);a.def(c,"$cell_closed?",D=function(){return this.cell_open["$!"]()},D.$$arity=0);a.def(c,"$close_open_cell",U=function(a){null==a&&(a=e([],{}));this.$push_cellspec(a);u(this["$cell_open?"]())&&this.$close_cell(!0);this.$advance();return n},U.$$arity=-1);a.def(c,"$close_cell",M=function(c){try{var d,k,m=n,q=n,v=n;null==c&&(c=!1);this.format["$=="]("psv")?(m=this.buffer,this.buffer="",u(q=this.$take_cellspec())? -v=u(d=q.$delete("repeatcol"))?d:1:(this.$logger().$error(this.$message_with_context("table missing leading separator; recovering automatically",e(["source_location"],{source_location:f(p(r(g,"Reader"),"Cursor"),"new",a.to_a(this.start_cursor_data))}))),q=e([],{}),v=1)):(m=this.buffer.$strip(),this.buffer="",q=n,v=1,u(u(d=this.format["$=="]("csv")?m["$empty?"]()["$!"]():this.format["$=="]("csv"))?m["$include?"]('"'):d)&&(u(u(d=m["$start_with?"]('"'))?m["$end_with?"]('"'):d)?u(m=m.$slice(1,h(m.$length(), -2)))?m=m.$strip().$squeeze('"'):(this.$logger().$error(this.$message_with_context("unclosed quote in CSV data; setting cell to empty",e(["source_location"],{source_location:this.reader.$cursor_at_prev_line()}))),m=""):m=m.$squeeze('"')));f(1,"upto",[v],(k=function(d){var t=k.$$s||this,z,x,A,y,F=n,E=n,B=n;F=n;null==t.colcount&&(t.colcount=n);null==t.table&&(t.table=n);null==t.current_row&&(t.current_row=n);null==t.reader&&(t.reader=n);null==t.column_visits&&(t.column_visits=n);null==t.linenum&&(t.linenum= -n);null==d&&(d=n);t.colcount["$=="](-1)?(t.table.$columns()["$<<"](F=p(r(g,"Table"),"Column").$new(t.table,h(l(t.table.$columns().$size(),d),1))),u(u(z=u(x=q)?q["$key?"]("colspan"):x)?b(E=h(q["$[]"]("colspan").$to_i(),1),0):z)&&(B=t.table.$columns().$size(),f(E,"times",[],(A=function(a){var b=A.$$s||this;null==b.table&&(b.table=n);null==a&&(a=n);return b.table.$columns()["$<<"](p(r(g,"Table"),"Column").$new(b.table,l(B,a)))},A.$$s=t,A.$$arity=1,A)))):u(F=t.table.$columns()["$[]"](t.current_row.$size()))|| -(t.$logger().$error(t.$message_with_context("dropping cell because it exceeds specified number of columns",e(["source_location"],{source_location:t.reader.$cursor_before_mark()}))),a.ret(n));F=p(r(g,"Table"),"Cell").$new(F,m,q,e(["cursor"],{cursor:t.reader.$cursor_before_mark()}));t.reader.$mark();u(u(z=F.$rowspan()["$!"]())?z:F.$rowspan()["$=="](1))||t.$activate_rowspan(F.$rowspan(),u(z=F.$colspan())?z:1);t.column_visits=l(t.column_visits,u(z=F.$colspan())?z:1);t.current_row["$<<"](F);return u(u(z= -t["$end_of_row?"]())?u(x=u(y=t.colcount["$!="](-1))?y:b(t.linenum,0))?x:u(y=c)?d["$=="](v):y:z)?t.$close_row():n},k.$$s=this,k.$$arity=1,k));this.cell_open=!1;return n}catch(ka){if(ka===a.returner)return ka.$v;throw ka;}},M.$$arity=-1);c.$private();a.def(c,"$close_row",N=function(){var b,c=n;this.table.$rows().$body()["$<<"](this.current_row);this.colcount["$=="](-1)&&(this.colcount=this.column_visits);this.column_visits=0;this.current_row=[];this.active_rowspans.$shift();u(b=this.active_rowspans["$[]"](0))? -b:(c=[0,0],f(this.active_rowspans,"[]=",a.to_a(c)),c[h(c.length,1)]);return n},N.$$arity=0);a.def(c,"$activate_rowspan",G=function(b,c){var d;f(1,"upto",[h(b,1)],(d=function(b){var e=d.$$s||this,g;null==e.active_rowspans&&(e.active_rowspans=n);null==b&&(b=n);b=[b,l(u(g=e.active_rowspans["$[]"](b))?g:0,c)];f(e.active_rowspans,"[]=",a.to_a(b));return b[h(b.length,1)]},d.$$s=this,d.$$arity=1,d));return n},G.$$arity=2);a.def(c,"$end_of_row?",H=function(){var a;return u(a=this.colcount["$=="](-1))?a:this.$effective_column_visits()["$=="](this.colcount)}, -H.$$arity=0);a.def(c,"$effective_column_visits",J=function(){return l(this.column_visits,this.active_rowspans["$[]"](0))},J.$$arity=0);return(a.def(c,"$advance",T=function(){return this.linenum=l(this.linenum,1)},T.$$arity=0),n)&&"advance"})(r(c,"Table"),null,c)}(c[0],c)};Opal.modules["asciidoctor/writer"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}var g=[],h=a.nil,m=a.const_get_qualified,q=a.const_get_relative,l=a.module,c=a.truthy,n=a.hash2;a.add_stubs(["$respond_to?", -"$write","$+","$chomp","$include"]);return function(d,g){d=[l(d,"Asciidoctor")].concat(g);(function(d,g){d=l(d,"Writer");var e=[d].concat(g),f;a.def(d,"$write",f=function(a,d){c(d["$respond_to?"]("write"))?d.$write(b(a.$chomp(),q(e,"LF"))):m("::","File").$write(d,a,n(["mode"],{mode:q(e,"FILE_WRITE_MODE")}));return h},f.$$arity=2)})(d[0],d);(function(b,c){b=l(b,"VoidWriter");c=[b].concat(c);var d;b.$include(q(c,"Writer"));a.def(b,"$write",d=function(a,b){return h},d.$$arity=2)})(d[0],d)}(g[0],g)}; -Opal.modules["asciidoctor/load"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}function g(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}var h=[],m=a.nil,q=a.const_get_qualified,l=a.const_get_relative,c=a.module,n=a.hash2,p=a.truthy,r=a.send;a.add_stubs("$merge $[] $start $key? $!= $logger $new $logger= $- $! $=== $dup $tap $each $partition $[]= $split $gsub $+ $respond_to? $keys $raise $join $ancestors $class $== $at $to_i $mtime $absolute_path $path $dirname $basename $extname $read $rewind $drop $record $parse $exception $message $set_backtrace $backtrace $stack_trace $stack_trace= $open $load".split(" ")); -return function(d,k){d=c(d,"Asciidoctor");k=[d].concat(k);(function(c,d){var e=[c].concat(d),f,k;a.def(c,"$load",f=function(c,d){var f,k,h,v,t,u,x=m,A=m,y=m,E=m,B=m,C=m,D=m,U=m,M=m,N=m;null==d&&(d=n([],{}));try{d=d.$merge();p(x=d["$[]"]("timings"))&&x.$start("read");p(p(f=d["$key?"]("logger"))?(A=d["$[]"]("logger"))["$!="](l(e,"LoggerManager").$logger()):f)&&(y=[p(f=A)?f:l(e,"NullLogger").$new()],r(l(e,"LoggerManager"),"logger=",a.to_a(y)),y[b(y.length,1)]);p((E=d["$[]"]("attributes"))["$!"]())?E= -n([],{}):p(q("::","Hash")["$==="](E))?E=E.$merge():p(p(f=(h=q("::","Java","skip_raise"))&&(k=q(h,"JavaUtil","skip_raise"))&&q(k,"Map","skip_raise")?"constant":m)?q(q(q("::","Java"),"JavaUtil"),"Map")["$==="](E):f)?E=E.$dup():p(q("::","Array")["$==="](E))?E=r(n([],{}),"tap",[],(v=function(c){var d=v.$$s||this,e;null==c&&(c=m);return r(E,"each",[],(e=function(d){null==d&&(d=m);d=d.$partition("=");var e=a.to_ary(d);var f=null==e[0]?m:e[0];e=null==e[2]?m:e[2];d;y=[f,e];r(c,"[]=",a.to_a(y));return y[b(y.length, -1)]},e.$$s=d,e.$$arity=1,e))},v.$$s=this,v.$$arity=1,v)):p(q("::","String")["$==="](E))?E=r(n([],{}),"tap",[],(t=function(c){var d=t.$$s||this,f;null==c&&(c=m);return r(E.$gsub(l(e,"SpaceDelimiterRx"),g("\\1",l(e,"NULL"))).$gsub(l(e,"EscapedSpaceRx"),"\\1").$split(l(e,"NULL")),"each",[],(f=function(d){null==d&&(d=m);d=d.$partition("=");var e=a.to_ary(d);var f=null==e[0]?m:e[0];e=null==e[2]?m:e[2];d;y=[f,e];r(c,"[]=",a.to_a(y));return y[b(y.length,1)]},f.$$s=d,f.$$arity=1,f))},t.$$s=this,t.$$arity= -1,t)):p(p(f=E["$respond_to?"]("keys"))?E["$respond_to?"]("[]"):f)?E=r(n([],{}),"tap",[],(u=function(c){var d=u.$$s||this,e;null==c&&(c=m);return r(E.$keys(),"each",[],(e=function(d){null==d&&(d=m);y=[d,E["$[]"](d)];r(c,"[]=",a.to_a(y));return y[b(y.length,1)]},e.$$s=d,e.$$arity=1,e))},u.$$s=this,u.$$arity=1,u)):this.$raise(q("::","ArgumentError"),"illegal type for attributes option: "+E.$class().$ancestors().$join(" < "));if(p(q("::","File")["$==="](c)))y=["input_mtime",l(e,"RUBY_ENGINE")["$=="]("jruby")? -q("::","Time").$at(c.$mtime().$to_i()):c.$mtime()],r(d,"[]=",a.to_a(y)),y[b(y.length,1)],y=["docfile",B=q("::","File").$absolute_path(c.$path())],r(E,"[]=",a.to_a(y)),y[b(y.length,1)],y=["docdir",q("::","File").$dirname(B)],r(E,"[]=",a.to_a(y)),y[b(y.length,1)],y=["docname",l(e,"Helpers").$basename(B,(y=["docfilesuffix",l(e,"Helpers").$extname(B)],r(E,"[]=",a.to_a(y)),y[b(y.length,1)]))],r(E,"[]=",a.to_a(y)),y[b(y.length,1)],C=c.$read();else if(p(c["$respond_to?"]("read"))){try{c.$rewind()}catch(V){if(a.rescue(V, -[l(e,"StandardError")]))try{m}finally{a.pop_exception()}else throw V;}C=c.$read()}else p(q("::","String")["$==="](c))?C=c:p(q("::","Array")["$==="](c))?C=c.$drop(0):p(c)&&this.$raise(q("::","ArgumentError"),"unsupported input type: "+c.$class());p(x)&&(x.$record("read"),x.$start("parse"));y=["attributes",E];r(d,"[]=",a.to_a(y));y[b(y.length,1)];D=d["$[]"]("parse")["$=="](!1)?l(e,"Document").$new(C,d):l(e,"Document").$new(C,d).$parse();p(x)&&x.$record("parse");return D}catch(V){if(a.rescue(V,[l(e, -"StandardError")])){U=V;try{try{M="asciidoctor: FAILED: "+(p(f=E["$[]"]("docfile"))?f:"<stdin>")+": Failed to load AsciiDoc document",p(U["$respond_to?"]("exception"))?(N=U.$exception(""+M+" - "+U.$message()),N.$set_backtrace(U.$backtrace()),N.stack=U.stack):(N=U.$class().$new(M,U),y=[U.$stack_trace()],r(N,"stack_trace=",a.to_a(y)),y[b(y.length,1)])}catch(ma){if(a.rescue(ma,[l(e,"StandardError")]))try{N=U}finally{a.pop_exception()}else throw ma;}return this.$raise(N)}finally{a.pop_exception()}}else throw V; -}},f.$$arity=-2);return(a.def(c,"$load_file",k=function(a,b){var c;null==b&&(b=n([],{}));return r(q("::","File"),"open",[a,l(e,"FILE_READ_MODE")],(c=function(a){var d=c.$$s||this;null==a&&(a=m);return d.$load(a,b)},c.$$s=this,c.$$arity=1,c))},k.$$arity=-2),m)&&"load_file"})(a.get_singleton_class(d),k)}(h[0],h)};Opal.modules["asciidoctor/convert"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}function g(a,b){return"number"===typeof a&&"number"===typeof b? -a>=b:a["$>="](b)}var h=[],m=a.nil,q=a.const_get_qualified,l=a.const_get_relative,c=a.module,n=a.hash2,p=a.truthy,r=a.send;a.add_stubs("$delete $merge $=== $absolute_path $path $load $respond_to? $[]= $- $key? $fetch $[] $dirname $expand_path $join $attributes $outfilesuffix $== $raise $pwd $>= $safe $normalize_system_path $mkdir_p $directory? $! $convert $write $< $attr? $basebackend? $attr $uriish? $include? $syntax_highlighter $write_stylesheet? $write_primary_stylesheet $instance $to_s $!= $read_asset $file? $write_stylesheet $open".split(" ")); -return function(d,k){d=c(d,"Asciidoctor");k=[d].concat(k);(function(c,d){var e=[c].concat(d),f,k;a.def(c,"$convert",f=function(c,d){var f,k,h,v,t,u,x=m,A=m,y=t=m,E=m,B=m,C=m,D=m,U=m,M=m,G=m,N=m,H=m;null==d&&(d=n([],{}));(d=d.$merge()).$delete("parse");var J=d.$delete("to_dir");var T=d.$delete("mkdirs");var I=u=d.$delete("to_file");if((!0)["$==="](I)||m["$==="](I))p(x=J)||p(q("::","File")["$==="](c))&&(A=q("::","File").$absolute_path(c.$path())),u=m;else if((!1)["$==="](I))u=m;else{if("/dev/null"["$==="](I))return this.$load(c, -d);p(t=u["$respond_to?"]("write"))||(I=["to_file",x=u],r(d,"[]=",a.to_a(I)),I[b(I.length,1)])}p(d["$key?"]("standalone"))||(p(p(f=A)?f:x)?(I=["standalone",d.$fetch("header_footer",!0)],r(d,"[]=",a.to_a(I)),I[b(I.length,1)]):p(d["$key?"]("header_footer"))&&(I=["standalone",d["$[]"]("header_footer")],r(d,"[]=",a.to_a(I)),I[b(I.length,1)]));p(A)?(I=["to_dir",y=q("::","File").$dirname(A)],r(d,"[]=",a.to_a(I)),I[b(I.length,1)]):p(x)&&(p(J)?(I=p(u)?["to_dir",q("::","File").$dirname(q("::","File").$expand_path(u, -J))]:["to_dir",q("::","File").$expand_path(J)],r(d,"[]=",a.to_a(I)),I[b(I.length,1)]):p(u)&&(I=["to_dir",q("::","File").$dirname(q("::","File").$expand_path(u))],r(d,"[]=",a.to_a(I)),I[b(I.length,1)]));I=this.$load(c,d);p(A)?(E=q("::","File").$join(y,""+I.$attributes()["$[]"]("docname")+I.$outfilesuffix()),E["$=="](A)&&this.$raise(q("::","IOError"),"input file and output file cannot be the same: "+E)):p(x)?(d=p(d["$key?"]("base_dir"))?q("::","File").$expand_path(d["$[]"]("base_dir")):q("::","Dir").$pwd(), -x=p(g(I.$safe(),q(l(e,"SafeMode"),"SAFE")))?d:m,p(J)?(y=I.$normalize_system_path(J,d,x,n(["target_name","recover"],{target_name:"to_dir",recover:!1})),p(u)?(E=I.$normalize_system_path(u,y,m,n(["target_name","recover"],{target_name:"to_dir",recover:!1})),y=q("::","File").$dirname(E)):E=q("::","File").$join(y,""+I.$attributes()["$[]"]("docname")+I.$outfilesuffix())):p(u)&&(E=I.$normalize_system_path(u,d,x,n(["target_name","recover"],{target_name:"to_dir",recover:!1})),y=q("::","File").$dirname(E)), -p(p(f=q("::","File")["$==="](c))?E["$=="](q("::","File").$absolute_path(c.$path())):f)&&this.$raise(q("::","IOError"),"input file and output file cannot be the same: "+E),p(T)?l(e,"Helpers").$mkdir_p(y):p(q("::","File")["$directory?"](y))||this.$raise(q("::","IOError"),"target directory does not exist: "+J+" (hint: set :mkdirs option)")):(E=u,y=m);c=p(p(f=E)?t["$!"]():f)?I.$convert(n(["outfile","outdir"],{outfile:E,outdir:y})):I.$convert();return p(E)?(I.$write(c,E),p(t=t["$!"]())&&(t=I.$safe(),E= -q(l(e,"SafeMode"),"SECURE"),t="number"===typeof t&&"number"===typeof E?t<E:t["$<"](E)),p(p(f=p(k=p(h=p(v=t)?I["$attr?"]("linkcss"):v)?I["$attr?"]("copycss"):h)?I["$basebackend?"]("html"):k)?(p(k=B=I.$attr("stylesdir"))?l(e,"Helpers")["$uriish?"](B):k)["$!"]():f)&&(p(C=I.$attr("stylesheet"))&&(p(l(e,"DEFAULT_STYLESHEET_KEYS")["$include?"](C))?D=!0:p(l(e,"Helpers")["$uriish?"](C)["$!"]())&&(U=!0)),h=p(f=M=I.$syntax_highlighter())?M["$write_stylesheet?"](I):f,p(p(f=p(k=D)?k:U)?f:h)&&(k=I.$normalize_system_path(B, -y,p(g(I.$safe(),q(l(e,"SafeMode"),"SAFE")))?y:m),p(T)?l(e,"Helpers").$mkdir_p(k):p(q("::","File")["$directory?"](k))||this.$raise(q("::","IOError"),"target stylesheet directory does not exist: "+k+" (hint: set :mkdirs option)"),p(D)?l(e,"Stylesheets").$instance().$write_primary_stylesheet(k):p(U)&&(G=p(p(f=(G=I.$attr("copycss"))["$=="](""))?f:G["$=="](!0))?I.$normalize_system_path(C):I.$normalize_system_path(G.$to_s()),y=I.$normalize_system_path(C,k,p(g(I.$safe(),q(l(e,"SafeMode"),"SAFE")))?y:m), -p(p(f=G["$!="](y))?N=I.$read_asset(G,n(["warn_on_failure","label"],{warn_on_failure:q("::","File")["$file?"](y)["$!"](),label:"stylesheet"})):f)&&(p(p(f=(H=q("::","File").$dirname(y))["$!="](k))?q("::","File")["$directory?"](H)["$!"]():f)&&(p(T)?l(e,"Helpers").$mkdir_p(H):this.$raise(q("::","IOError"),"target stylesheet directory does not exist: "+H+" (hint: set :mkdirs option)")),q("::","File").$write(y,N,n(["mode"],{mode:l(e,"FILE_WRITE_MODE")})))),p(h)&&M.$write_stylesheet(I,k))),I):c},f.$$arity= --2);a.def(c,"$convert_file",k=function(a,b){var c;null==b&&(b=n([],{}));return r(q("::","File"),"open",[a,l(e,"FILE_READ_MODE")],(c=function(a){var d=c.$$s||this;null==a&&(a=m);return d.$convert(a,b)},c.$$s=this,c.$$arity=1,c))},k.$$arity=-2);a.alias(c,"render","convert");return a.alias(c,"render_file","convert_file")})(a.get_singleton_class(d),k)}(h[0],h)};Opal.modules["asciidoctor/syntax_highlighter/highlightjs"]=function(a){var b=[],g=a.nil,h=a.const_get_qualified,m=a.const_get_relative,q=a.module, -l=a.klass,c=a.send,n=a.hash2,p=a.truthy;a.add_stubs("$register_for $merge $proc $[]= $- $attr $[] $== $attr? $join $map $split $lstrip".split(" "));return function(b,d){b=[q(b,"Asciidoctor")].concat(d);(function(b,$super,d){b=l(b,$super,"HighlightJsAdapter");var f=[b].concat(d),k,h,q,r;b.$register_for("highlightjs","highlight.js");a.def(b,"$initialize",k=function(b){var d=k.$$p,f;d&&(k.$$p=null);var g=0;var h=arguments.length;for(f=Array(h);g<h;g++)f[g]=arguments[g];a.slice.call(arguments,0,arguments.length); -c(this,a.find_super_dispatcher(this,"initialize",k,!1),f,d);return this.name=this.pre_class="highlightjs"},k.$$arity=-1);a.def(b,"$format",h=function(b,d,f){var k;h.$$p&&(h.$$p=null);return c(this,a.find_super_dispatcher(this,"format",h,!1),[b,d,f.$merge(n(["transform"],{transform:c(this,"proc",[],(k=function(b,f){null==f&&(f=g);b=["class","language-"+(p(d)?d:"none")+" hljs"];c(f,"[]=",a.to_a(b));f=b.length;f="number"===typeof f?f-1:f["$-"](1);return b[f]},k.$$s=this,k.$$arity=2,k))}))],null)},h.$$arity= -3);a.def(b,"$docinfo?",q=function(a){return!0},q.$$arity=1);return(a.def(b,"$docinfo",r=function(a,b,d){var k,h=this,l=g;l=b.$attr("highlightjsdir",""+d["$[]"]("cdn_base_url")+"/highlight.js/"+m(f,"HIGHLIGHT_JS_VERSION"));return a["$=="]("head")?'<link rel="stylesheet" href="'+l+"/styles/"+b.$attr("highlightjs-theme","github")+'.min.css"'+d["$[]"]("self_closing_tag_slash")+">":'<script src="'+l+'/highlight.min.js">\x3c/script>\n'+function(){return p(b["$attr?"]("highlightjs-languages"))?c(b.$attr("highlightjs-languages").$split(","), -"map",[],(k=function(a){null==a&&(a=g);return'<script src="'+l+"/languages/"+a.$lstrip()+'.min.js">\x3c/script>\n'},k.$$s=h,k.$$arity=1,k)).$join():""}()+"<script>\nif (!hljs.initHighlighting.called) {\n hljs.initHighlighting.called = true\n ;[].slice.call(document.querySelectorAll('pre.highlight > code')).forEach(function (el) { hljs.highlightBlock(el) })\n}\n\x3c/script>"},r.$$arity=3),g)&&"docinfo"})(m(b,"SyntaxHighlighter"),h(m(b,"SyntaxHighlighter"),"Base"),b)}(b[0],b)};Opal.modules["asciidoctor/syntax_highlighter"]= -function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}var g=a.top,h=[],m=a.nil,q=a.const_get_qualified,l=a.const_get_relative,c=a.module,n=a.hash2,p=a.truthy,r=a.send,t=a.klass;a.add_stubs("$attr_reader $raise $class $private_class_method $extend $register $map $to_s $each $[]= $registry $- $[] $for $=== $new $name $private $include $== $delete $join $content".split(" "));(function(d,e){d=[c(d,"Asciidoctor")].concat(e);(function(d,e){d=c(d,"SyntaxHighlighter"); -var f=[d].concat(e),g,k,h,v,u,x,A,y,E,B;d.$attr_reader("name");a.def(d,"$initialize",g=function(a,b,c){null==c&&n([],{});return this.name=this.pre_class=a},g.$$arity=-2);a.def(d,"$docinfo?",k=function(a){return m},k.$$arity=1);a.def(d,"$docinfo",h=function(a,b,c){return this.$raise(q("::","NotImplementedError"),""+l(f,"SyntaxHighlighter")+" subclass "+this.$class()+" must implement the #docinfo method since #docinfo? returns true")},h.$$arity=3);a.def(d,"$highlight?",v=function(){return m},v.$$arity= -0);a.def(d,"$highlight",u=function(a,b,c,d){return this.$raise(q("::","NotImplementedError"),""+l(f,"SyntaxHighlighter")+" subclass "+this.$class()+" must implement the #highlight method since #highlight? returns true")},u.$$arity=4);a.def(d,"$format",x=function(a,b,c){return this.$raise(q("::","NotImplementedError"),""+l(f,"SyntaxHighlighter")+" subclass "+this.$class()+" must implement the #format method")},x.$$arity=3);a.def(d,"$write_stylesheet?",A=function(a){return m},A.$$arity=1);a.def(d,"$write_stylesheet", -y=function(a,b){return this.$raise(q("::","NotImplementedError"),""+l(f,"SyntaxHighlighter")+" subclass "+this.$class()+" must implement the #write_stylesheet method since #write_stylesheet? returns true")},y.$$arity=2);d.$private_class_method(p(E=(a.defs(d,"$included",B=function(a){return a.$extend(l(f,"Config"))},B.$$arity=1),m)&&"included")?E:"included");(function(b,d){b=c(b,"Config");var e=[b].concat(d),f;a.def(b,"$register_for",f=function(b){var c;var d=a.slice.call(arguments,0,arguments.length); -return r(l(e,"SyntaxHighlighter"),"register",[this].concat(a.to_a(r(d,"map",[],(c=function(a){null==a&&(a=m);return a.$to_s()},c.$$s=this,c.$$arity=1,c)))))},f.$$arity=-1)})(f[0],f);(function(d,e){d=c(d,"Factory");var f=[d].concat(e),g,k,h,v;a.def(d,"$register",g=function(c,d){var e;var f=a.slice.call(arguments,1,arguments.length);return r(f,"each",[],(e=function(d){var f=e.$$s||this;null==d&&(d=m);d=[d,c];r(f.$registry(),"[]=",a.to_a(d));return d[b(d.length,1)]},e.$$s=this,e.$$arity=1,e))},g.$$arity= --2);a.def(d,"$for",k=function(a){return this.$registry()["$[]"](a)},k.$$arity=1);a.def(d,"$create",h=function(a,b,c){var d;null==b&&(b="html5");null==c&&(c=n([],{}));return p(d=this.$for(a))?(p(q("::","Class")["$==="](d))&&(d=d.$new(a,b,c)),p(d.$name())||this.$raise(q("::","NameError"),""+d.$class()+" must specify a value for `name'"),d):m},h.$$arity=-2);d.$private();a.def(d,"$registry",v=function(){return this.$raise(q("::","NotImplementedError"),""+l(f,"Factory")+" subclass "+this.$class()+" must implement the #registry method")}, -v.$$arity=0)})(f[0],f);(function(b,$super,c){b=t(b,$super,"CustomFactory");c=[b].concat(c);var d,e;b.$$prototype.registry=m;b.$include(l(c,"Factory"));a.def(b,"$initialize",d=function(a){var b;null==a&&(a=m);return this.registry=p(b=a)?b:n([],{})},d.$$arity=-1);b.$private();return(a.def(b,"$registry",e=function(){return this.registry},e.$$arity=0),m)&&"registry"})(f[0],null,f);(function(b,d){b=c(b,"DefaultFactory");var e=[b].concat(d),f;b.$include(l(e,"Factory"));b.$private();a.class_variable_set(e[0], -"@@registry",n([],{}));a.def(b,"$registry",f=function(){var a;return null==(a=e[0].$$cvars["@@registry"])?m:a},f.$$arity=0);l(e,"RUBY_ENGINE")["$=="]("opal")||m})(f[0],f);(function(a,$super,b){a=t(a,$super,"DefaultFactoryProxy");b=[a].concat(b);a.$include(l(b,"DefaultFactory"));l(b,"RUBY_ENGINE")["$=="]("opal");return m})(f[0],l(f,"CustomFactory"),f);(function(c,$super,d){c=t(c,$super,"Base");d=[c].concat(d);var e;c.$$prototype.pre_class=m;c.$include(l(d,"SyntaxHighlighter"));return(a.def(c,"$format", -e=function(c,d,e){var f,g,k=m,h=m,l=h=k=m;k=p(e["$[]"]("nowrap"))?""+this.pre_class+" highlight nowrap":""+this.pre_class+" highlight";return p(h=e["$[]"]("transform"))?(h["$[]"](k=n(["class"],{"class":k}),h=p(d)?n(["data-lang"],{"data-lang":d}):n([],{})),p(d=h.$delete("data-lang"))&&(l=["data-lang",d],r(h,"[]=",a.to_a(l)),l[b(l.length,1)]),"<pre"+r(k,"map",[],(f=function(a,b){null==a&&(a=m);null==b&&(b=m);return" "+a+'="'+b+'"'},f.$$s=this,f.$$arity=2,f)).$join()+"><code"+r(h,"map",[],(g=function(a, -b){null==a&&(a=m);null==b&&(b=m);return" "+a+'="'+b+'"'},g.$$s=this,g.$$arity=2,g)).$join()+">"+c.$content()+"</code></pre>"):'<pre class="'+k+'"><code'+(p(d)?' data-lang="'+d+'"':"")+">"+c.$content()+"</code></pre>"},e.$$arity=3),m)&&"format"})(f[0],null,f);d.$extend(l(f,"DefaultFactory"))})(d[0],d)})(h[0],h);g.$require("asciidoctor/syntax_highlighter.rb/../syntax_highlighter/highlightjs");l(h,"RUBY_ENGINE")["$=="]("opal");return m};Opal.modules["asciidoctor/timings"]=function(a){function b(a,b){return"number"=== -typeof a&&"number"===typeof b?a-b:a["$-"](b)}var g=[],h=a.nil,m=a.const_get_qualified,n=a.const_get_relative,l=a.module,c=a.klass,r=a.hash2,p=a.send,t=a.truthy,u=a.gvars;a.add_stubs("$now $[]= $- $delete $reduce $+ $[] $> $time $puts $% $to_f $read_parse $convert $read_parse_convert $private $const_defined? $== $clock_gettime".split(" "));return function(d,e){d=[l(d,"Asciidoctor")].concat(e);(function(d,$super,e){d=c(d,$super,"Timings");var f=[d].concat(e),g,k,l,q,v,x,A,y,E,B,C,D,M,G,H,I,N,J,O;d.$$prototype.timers= -d.$$prototype.log=h;a.def(d,"$initialize",g=function(){this.log=r([],{});return this.timers=r([],{})},g.$$arity=0);a.def(d,"$start",k=function(c){c=[c,this.$now()];p(this.timers,"[]=",a.to_a(c));return c[b(c.length,1)]},k.$$arity=1);a.def(d,"$record",l=function(c){c=[c,b(this.$now(),this.timers.$delete(c))];p(this.log,"[]=",a.to_a(c));return c[b(c.length,1)]},l.$$arity=1);a.def(d,"$time",q=function(b){var c;var d=h;d=a.slice.call(arguments,0,arguments.length);d=p(d,"reduce",[0],(c=function(a,b){var d= -c.$$s||this,e;null==d.log&&(d.log=h);null==a&&(a=h);null==b&&(b=h);b=t(e=d.log["$[]"](b))?e:0;return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)},c.$$s=this,c.$$arity=2,c));return t("number"===typeof d?0<d:d["$>"](0))?d:h},q.$$arity=-1);a.def(d,"$read",v=function(){return this.$time("read")},v.$$arity=0);a.def(d,"$parse",x=function(){return this.$time("parse")},x.$$arity=0);a.def(d,"$read_parse",A=function(){return this.$time("read","parse")},A.$$arity=0);a.def(d,"$convert",y=function(){return this.$time("convert")}, -y.$$arity=0);a.def(d,"$read_parse_convert",E=function(){return this.$time("read","parse","convert")},E.$$arity=0);a.def(d,"$write",B=function(){return this.$time("write")},B.$$arity=0);a.def(d,"$total",C=function(){return this.$time("read","parse","convert","write")},C.$$arity=0);a.def(d,"$print_report",D=function(a,b){null==u.stdout&&(u.stdout=h);null==a&&(a=u.stdout);null==b&&(b=h);t(b)&&a.$puts("Input file: "+b);a.$puts(" Time to read and parse source: "+"%05.5f"["$%"](this.$read_parse().$to_f())); -a.$puts(" Time to convert document: "+"%05.5f"["$%"](this.$convert().$to_f()));return a.$puts(" Total time (read, parse and convert): "+"%05.5f"["$%"](this.$read_parse_convert().$to_f()))},D.$$arity=-1);d.$private();return t(t(M=m("::","Process")["$const_defined?"]("CLOCK_MONOTONIC",!1))?((G=m("::","Process","skip_raise"))&&(H=G,H)&&(I=H)&&((N=I.$clock_gettime)&&!N.$$stub||I["$respond_to_missing?"]("clock_gettime"))?"method":h)["$=="]("method"):M)?(a.const_set(f[0],"CLOCK_ID",m(m("::","Process"), -"CLOCK_MONOTONIC")),(a.def(d,"$now",J=function(){return m("::","Process").$clock_gettime(n(f,"CLOCK_ID"))},J.$$arity=0),h)&&"now"):(a.def(d,"$now",O=function(){return m("::","Time").$now()},O.$$arity=0),h)&&"now"})(d[0],null,d)}(g[0],g)};Opal.modules["asciidoctor/converter/composite"]=function(a){var b=[],g=a.nil,h=a.const_get_qualified,m=a.const_get_relative,n=a.module,l=a.klass,c=a.hash2,r=a.send,p=a.truthy;a.add_stubs("$attr_reader $each $respond_to? $composed $init_backend_traits $backend_traits $new $find_converter $[]= $- $convert $converter_for $node_name $[] $handles? $raise".split(" ")); -return function(b,d){b=[n(b,"Asciidoctor")].concat(d);(function(b,$super,d){b=l(b,$super,"CompositeConverter");[b].concat(d);var f,k,m,n;b.$$prototype.converter_cache=b.$$prototype.converters=g;b.$attr_reader("converters");a.def(b,"$initialize",f=function(b,d,f){var k,l;var m=a.slice.call(arguments,1,arguments.length);var n=a.extract_kwargs(m);if(null==n)n=c([],{});else if(!n.$$is_hash)throw a.ArgumentError.$new("expected kwargs");n=n.$$smap.backend_traits_source;null==n&&(n=g);this.backend=b;r(this.converters= -m,"each",[],(k=function(a){var b=k.$$s||this;null==a&&(a=g);return p(a["$respond_to?"]("composed"))?a.$composed(b):g},k.$$s=this,k.$$arity=1,k));p(n)&&this.$init_backend_traits(n.$backend_traits());return this.converter_cache=r(h("::","Hash"),"new",[],(l=function(b,c){var d=l.$$s||this;null==b&&(b=g);null==c&&(c=g);c=[c,d.$find_converter(c)];r(b,"[]=",a.to_a(c));b=c.length;b="number"===typeof b?b-1:b["$-"](1);return c[b]},l.$$s=this,l.$$arity=2,l))},f.$$arity=-2);a.def(b,"$convert",k=function(a,b, -c){var d;null==b&&(b=g);null==c&&(c=g);return this.$converter_for(b=p(d=b)?d:a.$node_name()).$convert(a,b,c)},k.$$arity=-2);a.def(b,"$converter_for",m=function(a){return this.converter_cache["$[]"](a)},m.$$arity=1);return(a.def(b,"$find_converter",n=function(b){try{var c;r(this.converters,"each",[],(c=function(c){null==c&&(c=g);if(p(c["$handles?"](b)))a.ret(c);else return g},c.$$s=this,c.$$arity=1,c));return this.$raise("Could not find a converter to handle transform: "+b)}catch(z){if(z===a.returner)return z.$v; -throw z;}},n.$$arity=1),g)&&"find_converter"})(m(b,"Converter"),h(m(b,"Converter"),"Base"),b)}(b[0],b)};Opal.modules["asciidoctor/converter/html5"]=function(a){function b(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}function g(a,b){return"number"===typeof a&&"number"===typeof b?a>b:a["$>"](b)}function h(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}function m(a,b){return"number"===typeof a&&"number"===typeof b?a<=b:a["$<="](b)}function n(a,b){return"number"=== -typeof a&&"number"===typeof b?a<b:a["$<"](b)}var l=[],c=a.nil,r=a.const_get_qualified,p=a.const_get_relative,t=a.module,u=a.klass,k=a.send,e=a.hash2,f=a.truthy,x=a.gvars;a.add_stubs("$register_for $default= $- $== $[] $init_backend_traits $node_name $convert_inline_quoted $convert_paragraph $convert_inline_anchor $convert_section $convert_listing $convert_literal $convert_ulist $convert_olist $convert_dlist $convert_admonition $convert_colist $convert_embedded $convert_example $convert_floating_title $convert_image $convert_inline_break $convert_inline_button $convert_inline_callout $convert_inline_footnote $convert_inline_image $convert_inline_indexterm $convert_inline_kbd $convert_inline_menu $convert_open $convert_page_break $convert_preamble $convert_quote $convert_sidebar $convert_stem $convert_table $convert_thematic_break $convert_verse $convert_video $convert_document $convert_toc $convert_pass $convert_audio $empty? $attr $attr? $<< $include? $sub_replacements $gsub $extname $slice $length $doctitle $normalize_web_path $primary_stylesheet_data $instance $read_contents $syntax_highlighter $size $docinfo $id $sections? $doctype $role? $role $join $noheader $convert $converter $generate_manname_section $header? $notitle $title $header $each $authors $> $name $email $sub_macros $+ $downcase $concat $content $footnotes? $! $footnotes $index $text $nofooter $docinfo? $[]= $delete_at $inspect $!= $to_i $attributes $document $sections $level $caption $captioned_title $numbered $<= $< $sectname $sectnum $convert_outline $title? $icon_uri $compact $media_uri $option? $append_boolean_attribute $style $items $blocks? $=== $text? $chomp $safe $read_svg_contents $alt $image_uri $encode_attribute_value $append_link_constraint_attrs $highlight? $to_sym $format $* $count $start_with? $end_with? $list_marker_keyword $parent $warn $logger $context $error $new $columns $to_h $rows $colspan $rowspan $unshift $shift $pop $split $nil_or_empty? $type $catalog $get_root_document $xreftext $target $reftext $map $chop $sub $match $private $upcase $nested? $parent_document $to_s $handles? $send".split(" ")); -return function(d,l){d=[t(d,"Asciidoctor")].concat(l);(function(d,$super,l){d=u(d,$super,"Html5Converter");var q=[d].concat(l),v,t,A,y,E,B,C,D,M,G,H,I,J,N,O,P,T,R,S,X,Z,ba,ia,Y,ha,oa,ka,wa,da,xa,Ca,ta,Ia,Ga,Ja,Xa,Qa,Ra,Da,Ka,Ya,Va,Za,$a,bb,Ua;l=c;d.$$prototype.void_element_slash=d.$$prototype.xml_mode=d.$$prototype.refs=d.$$prototype.resolving_xref=c;d.$register_for("html5");l=[["",""]];k(a.const_set(q[0],"QUOTE_TAGS",e("monospaced emphasis strong double single mark superscript subscript asciimath latexmath".split(" "), -{monospaced:["<code>","</code>",!0],emphasis:["<em>","</em>",!0],strong:["<strong>","</strong>",!0],"double":["“","”"],single:["‘","’"],mark:["<mark>","</mark>",!0],superscript:["<sup>","</sup>",!0],subscript:["<sub>","</sub>",!0],asciimath:["\\$","\\$"],latexmath:["\\(","\\)"]})),"default=",a.to_a(l));l[b(l.length,1)];a.const_set(q[0],"DropAnchorRx",/<(?:a\b[^>]*|\/a)>/);a.const_set(q[0],"StemBreakRx",/ *\\\n(?:\\?\n)*|\n\n+/);p(q,"RUBY_ENGINE")["$=="]("opal")?(a.const_set(q[0], -"SvgPreambleRx",new RegExp("^"+p(q,"CC_ALL")+"*?(?=<svg[\\s>])")),a.const_set(q[0],"SvgStartTagRx",/^<svg(?:\s[^>]*)?>/)):c;a.const_set(q[0],"DimensionAttributeRx",new RegExp("\\s(?:width|height|style)=([\"'])"+p(q,"CC_ANY")+"*?\\1"));a.def(d,"$initialize",v=function(a,b){null==b&&(b=e([],{}));this.backend=a;b["$[]"]("htmlsyntax")["$=="]("xml")?(a="xml",this.xml_mode=!0,this.void_element_slash="/"):(a="html",this.xml_mode=c,this.void_element_slash="");return this.$init_backend_traits(e(["basebackend", -"filetype","htmlsyntax","outfilesuffix","supports_templates"],{basebackend:"html",filetype:"html",htmlsyntax:a,outfilesuffix:".html",supports_templates:!0}))},v.$$arity=-2);a.def(d,"$convert",t=function(b,d,e){var f=t.$$p,g;f&&(t.$$p=null);var h=0;var l=arguments.length;for(g=Array(l);h<l;h++)g[h]=arguments[h];null==d&&(d=b.$node_name());null==e&&(e=c);return d["$=="]("inline_quoted")?this.$convert_inline_quoted(b):d["$=="]("paragraph")?this.$convert_paragraph(b):d["$=="]("inline_anchor")?this.$convert_inline_anchor(b): -d["$=="]("section")?this.$convert_section(b):d["$=="]("listing")?this.$convert_listing(b):d["$=="]("literal")?this.$convert_literal(b):d["$=="]("ulist")?this.$convert_ulist(b):d["$=="]("olist")?this.$convert_olist(b):d["$=="]("dlist")?this.$convert_dlist(b):d["$=="]("admonition")?this.$convert_admonition(b):d["$=="]("colist")?this.$convert_colist(b):d["$=="]("embedded")?this.$convert_embedded(b):d["$=="]("example")?this.$convert_example(b):d["$=="]("floating_title")?this.$convert_floating_title(b): -d["$=="]("image")?this.$convert_image(b):d["$=="]("inline_break")?this.$convert_inline_break(b):d["$=="]("inline_button")?this.$convert_inline_button(b):d["$=="]("inline_callout")?this.$convert_inline_callout(b):d["$=="]("inline_footnote")?this.$convert_inline_footnote(b):d["$=="]("inline_image")?this.$convert_inline_image(b):d["$=="]("inline_indexterm")?this.$convert_inline_indexterm(b):d["$=="]("inline_kbd")?this.$convert_inline_kbd(b):d["$=="]("inline_menu")?this.$convert_inline_menu(b):d["$=="]("open")? -this.$convert_open(b):d["$=="]("page_break")?this.$convert_page_break(b):d["$=="]("preamble")?this.$convert_preamble(b):d["$=="]("quote")?this.$convert_quote(b):d["$=="]("sidebar")?this.$convert_sidebar(b):d["$=="]("stem")?this.$convert_stem(b):d["$=="]("table")?this.$convert_table(b):d["$=="]("thematic_break")?this.$convert_thematic_break(b):d["$=="]("verse")?this.$convert_verse(b):d["$=="]("video")?this.$convert_video(b):d["$=="]("document")?this.$convert_document(b):d["$=="]("toc")?this.$convert_toc(b): -d["$=="]("pass")?this.$convert_pass(b):d["$=="]("audio")?this.$convert_audio(b):k(this,a.find_super_dispatcher(this,"convert",t,!1),g,f)},t.$$arity=-2);a.def(d,"$convert_document",A=function(d){var l,m,n,w,r,v=c,t=c,u=c,x=c,z=c,A=c,y=c,E=c,F=c,B=E=c,C=c,D=E=E=E=c,M=c,G=B=M=c,H=c,I=c;t=t=A=c;v="<br"+(t=this.void_element_slash)+">";f((u=d.$attr("asset-uri-scheme","https"))["$empty?"]())||(u=""+u+":");x=""+u+"//cdnjs.cloudflare.com/ajax/libs";z=d["$attr?"]("linkcss");A=f(d["$attr?"]("max-width"))?' style="max-width: '+ -d.$attr("max-width")+';"':"";y=["<!DOCTYPE html>"];E=f(d["$attr?"]("nolang"))?"":' lang="'+d.$attr("lang","en")+'"';y["$<<"]("<html"+(f(this.xml_mode)?' xmlns="http://www.w3.org/1999/xhtml"':"")+E+">");y["$<<"]('<head>\n<meta charset="'+d.$attr("encoding","UTF-8")+'"'+t+'>\n<meta http-equiv="X-UA-Compatible" content="IE=edge"'+t+'>\n<meta name="viewport" content="width=device-width, initial-scale=1.0"'+t+'>\n<meta name="generator" content="Asciidoctor '+d.$attr("asciidoctor-version")+'"'+t+">");if(f(d["$attr?"]("app-name")))y["$<<"]('<meta name="application-name" content="'+ -d.$attr("app-name")+'"'+t+">");if(f(d["$attr?"]("description")))y["$<<"]('<meta name="description" content="'+d.$attr("description")+'"'+t+">");if(f(d["$attr?"]("keywords")))y["$<<"]('<meta name="keywords" content="'+d.$attr("keywords")+'"'+t+">");if(f(d["$attr?"]("authors")))y["$<<"]('<meta name="author" content="'+(f((F=d.$sub_replacements(d.$attr("authors")))["$include?"]("<"))?F.$gsub(p(q,"XmlSanitizeRx"),""):F)+'"'+t+">");if(f(d["$attr?"]("copyright")))y["$<<"]('<meta name="copyright" content="'+ -d.$attr("copyright")+'"'+t+">");f(d["$attr?"]("favicon"))&&(f((E=d.$attr("favicon"))["$empty?"]())?(E="favicon.ico",B="image/x-icon"):B=f(C=p(q,"Helpers").$extname(E,c))?C["$=="](".ico")?"image/x-icon":"image/"+C.$slice(1,C.$length()):"image/x-icon",y["$<<"]('<link rel="icon" type="'+B+'" href="'+E+'"'+t+">"));y["$<<"]("<title>"+d.$doctitle(e(["sanitize","use_fallback"],{sanitize:!0,use_fallback:!0}))+"");if(f(p(q,"DEFAULT_STYLESHEET_KEYS")["$include?"](d.$attr("stylesheet")))){if(f(E=d.$attr("webfonts")))y["$<<"]('");if(f(z))y["$<<"]('");else y["$<<"]("")}else if(f(d["$attr?"]("stylesheet")))if(f(z))y["$<<"]('");else y["$<<"]("");if(f(d["$attr?"]("icons","font")))if(f(d["$attr?"]("iconfont-remote")))y["$<<"]('");else E=""+ -d.$attr("iconfont-name","font-awesome")+".css",y["$<<"]('");if(f(E=d.$syntax_highlighter()))y["$<<"](D=y.$size());if(!f((M=d.$docinfo())["$empty?"]()))y["$<<"](M);y["$<<"]("");M=f(d.$id())?' id="'+d.$id()+'"':"";G=f(f(l=f(m=f(n=B=d["$sections?"]())?d["$attr?"]("toc-class"):n)?d["$attr?"]("toc"):m)?d["$attr?"]("toc-placement","auto"):l)?[d.$doctype(),d.$attr("toc-class"),"toc-"+d.$attr("toc-position", -"header")]:[d.$doctype()];if(f(d["$role?"]()))G["$<<"](d.$role());y["$<<"]("');if(!f((M=d.$docinfo("header"))["$empty?"]()))y["$<<"](M);if(!f(d.$noheader())){y["$<<"]('")}y["$<<"]('
    \n"+d.$content()+"\n
    ");f(f(l=d["$footnotes?"]())?d["$attr?"]("nofootnotes")["$!"]():l)&&(y["$<<"]('
    \n"),k(d.$footnotes(),"each",[],(r=function(a){null==a&&(a=c);return y["$<<"]('
    \n'+a.$index()+". "+a.$text()+"\n
    ")},r.$$s=this,r.$$arity=1,r)),y["$<<"]("
    "));if(!f(d.$nofooter())){y["$<<"]('")}if(f(E)&&(f(E["$docinfo?"]("head"))?(A=[D,E.$docinfo("head",d,e(["cdn_base_url","linkcss","self_closing_tag_slash"],{cdn_base_url:x,linkcss:z,self_closing_tag_slash:t}))],k(y,"[]=",a.to_a(A)),A[b(A.length,1)]):y.$delete_at(D),f(E["$docinfo?"]("footer"))))y["$<<"](E.$docinfo("footer",d,e(["cdn_base_url","linkcss","self_closing_tag_slash"],{cdn_base_url:x,linkcss:z,self_closing_tag_slash:t})));f(d["$attr?"]("stem"))&&(t=d.$attr("eqnums","none"),f(t["$empty?"]())&&(t="AMS"),t=' equationNumbers: { autoNumber: "'+ -t+'" } ',y["$<<"]('\n" + ((function() {if ($truthy(doc['$attr?']("highlightjs-languages"))) { - return $send(doc.$attr("highlightjs-languages").$split(","), 'map', [], ($$6 = function(lang){var self = $$6.$$s || this; - - - - if (lang == null) { - lang = nil; - }; - return "" + "\n";}, $$6.$$s = self, $$6.$$arity = 1, $$6)).$join() - } else { - return "" - }; return nil; })()) + "" - }; - }, $HighlightJsAdapter_docinfo$5.$$arity = 3), nil) && 'docinfo'; - })($$($nesting, 'SyntaxHighlighter'), $$$($$($nesting, 'SyntaxHighlighter'), 'Base'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send, $klass = Opal.klass; - - Opal.add_stubs(['$attr_reader', '$raise', '$class', '$private_class_method', '$extend', '$register', '$map', '$to_s', '$each', '$[]=', '$registry', '$-', '$[]', '$for', '$===', '$new', '$name', '$private', '$include', '$==', '$delete', '$join', '$content']); - - (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'SyntaxHighlighter'); - - var $nesting = [self].concat($parent_nesting), $SyntaxHighlighter_initialize$1, $SyntaxHighlighter_docinfo$ques$2, $SyntaxHighlighter_docinfo$3, $SyntaxHighlighter_highlight$ques$4, $SyntaxHighlighter_highlight$5, $SyntaxHighlighter_format$6, $SyntaxHighlighter_write_stylesheet$ques$7, $SyntaxHighlighter_write_stylesheet$8, $a, $SyntaxHighlighter_included$9; - - - self.$attr_reader("name"); - - Opal.def(self, '$initialize', $SyntaxHighlighter_initialize$1 = function $$initialize(name, backend, opts) { - var self = this; - - - - if (backend == null) { - backend = "html5"; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - return (self.name = (self.pre_class = name)); - }, $SyntaxHighlighter_initialize$1.$$arity = -2); - - Opal.def(self, '$docinfo?', $SyntaxHighlighter_docinfo$ques$2 = function(location) { - var self = this; - - return nil - }, $SyntaxHighlighter_docinfo$ques$2.$$arity = 1); - - Opal.def(self, '$docinfo', $SyntaxHighlighter_docinfo$3 = function $$docinfo(location, doc, opts) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'SyntaxHighlighter')) + " subclass " + (self.$class()) + " must implement the #" + ("docinfo") + " method since #docinfo? returns true") - }, $SyntaxHighlighter_docinfo$3.$$arity = 3); - - Opal.def(self, '$highlight?', $SyntaxHighlighter_highlight$ques$4 = function() { - var self = this; - - return nil - }, $SyntaxHighlighter_highlight$ques$4.$$arity = 0); - - Opal.def(self, '$highlight', $SyntaxHighlighter_highlight$5 = function $$highlight(node, source, lang, opts) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'SyntaxHighlighter')) + " subclass " + (self.$class()) + " must implement the #" + ("highlight") + " method since #highlight? returns true") - }, $SyntaxHighlighter_highlight$5.$$arity = 4); - - Opal.def(self, '$format', $SyntaxHighlighter_format$6 = function $$format(node, lang, opts) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'SyntaxHighlighter')) + " subclass " + (self.$class()) + " must implement the #" + ("format") + " method") - }, $SyntaxHighlighter_format$6.$$arity = 3); - - Opal.def(self, '$write_stylesheet?', $SyntaxHighlighter_write_stylesheet$ques$7 = function(doc) { - var self = this; - - return nil - }, $SyntaxHighlighter_write_stylesheet$ques$7.$$arity = 1); - - Opal.def(self, '$write_stylesheet', $SyntaxHighlighter_write_stylesheet$8 = function $$write_stylesheet(doc, to_dir) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'SyntaxHighlighter')) + " subclass " + (self.$class()) + " must implement the #" + ("write_stylesheet") + " method since #write_stylesheet? returns true") - }, $SyntaxHighlighter_write_stylesheet$8.$$arity = 2); - self.$private_class_method(($truthy($a = (Opal.defs(self, '$included', $SyntaxHighlighter_included$9 = function $$included(into) { - var self = this; - - return into.$extend($$($nesting, 'Config')) - }, $SyntaxHighlighter_included$9.$$arity = 1), nil) && 'included') ? $a : "included")); - (function($base, $parent_nesting) { - var self = $module($base, 'Config'); - - var $nesting = [self].concat($parent_nesting), $Config_register_for$10; - - - Opal.def(self, '$register_for', $Config_register_for$10 = function $$register_for($a) { - var $post_args, names, $$11, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - names = $post_args;; - return $send($$($nesting, 'SyntaxHighlighter'), 'register', [self].concat(Opal.to_a($send(names, 'map', [], ($$11 = function(name){var self = $$11.$$s || this; - - - - if (name == null) { - name = nil; - }; - return name.$to_s();}, $$11.$$s = self, $$11.$$arity = 1, $$11))))); - }, $Config_register_for$10.$$arity = -1) - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Factory'); - - var $nesting = [self].concat($parent_nesting), $Factory_register$12, $Factory_for$14, $Factory_create$15, $Factory_registry$16; - - - - Opal.def(self, '$register', $Factory_register$12 = function $$register(syntax_highlighter, $a) { - var $post_args, names, $$13, self = this; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - names = $post_args;; - return $send(names, 'each', [], ($$13 = function(name){var self = $$13.$$s || this, $writer = nil; - - - - if (name == null) { - name = nil; - }; - $writer = [name, syntax_highlighter]; - $send(self.$registry(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$13.$$s = self, $$13.$$arity = 1, $$13)); - }, $Factory_register$12.$$arity = -2); - - Opal.def(self, '$for', $Factory_for$14 = function(name) { - var self = this; - - return self.$registry()['$[]'](name) - }, $Factory_for$14.$$arity = 1); - - Opal.def(self, '$create', $Factory_create$15 = function $$create(name, backend, opts) { - var self = this, syntax_hl = nil; - - - - if (backend == null) { - backend = "html5"; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy((syntax_hl = self.$for(name)))) { - - if ($truthy($$$('::', 'Class')['$==='](syntax_hl))) { - syntax_hl = syntax_hl.$new(name, backend, opts)}; - if ($truthy(syntax_hl.$name())) { - } else { - self.$raise($$$('::', 'NameError'), "" + (syntax_hl.$class()) + " must specify a value for `name'") - }; - return syntax_hl; - } else { - return nil - }; - }, $Factory_create$15.$$arity = -2); - self.$private(); - - Opal.def(self, '$registry', $Factory_registry$16 = function $$registry() { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Factory')) + " subclass " + (self.$class()) + " must implement the #" + ("registry") + " method") - }, $Factory_registry$16.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'CustomFactory'); - - var $nesting = [self].concat($parent_nesting), $CustomFactory_initialize$17, $CustomFactory_registry$18; - - self.$$prototype.registry = nil; - - self.$include($$($nesting, 'Factory')); - - Opal.def(self, '$initialize', $CustomFactory_initialize$17 = function $$initialize(seed_registry) { - var $a, self = this; - - - - if (seed_registry == null) { - seed_registry = nil; - }; - return (self.registry = ($truthy($a = seed_registry) ? $a : $hash2([], {}))); - }, $CustomFactory_initialize$17.$$arity = -1); - self.$private(); - return (Opal.def(self, '$registry', $CustomFactory_registry$18 = function $$registry() { - var self = this; - - return self.registry - }, $CustomFactory_registry$18.$$arity = 0), nil) && 'registry'; - })($nesting[0], null, $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'DefaultFactory'); - - var $nesting = [self].concat($parent_nesting), $DefaultFactory_registry$19; - - - self.$include($$($nesting, 'Factory')); - self.$private(); - (Opal.class_variable_set($nesting[0], '@@registry', $hash2([], {}))); - - Opal.def(self, '$registry', $DefaultFactory_registry$19 = function $$registry() { - var $a, self = this; - - return (($a = $nesting[0].$$cvars['@@registry']) == null ? nil : $a) - }, $DefaultFactory_registry$19.$$arity = 0); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'DefaultFactoryProxy'); - - var $nesting = [self].concat($parent_nesting); - - - self.$include($$($nesting, 'DefaultFactory')); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - return nil - } else { - return nil - }; - })($nesting[0], $$($nesting, 'CustomFactory'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Base'); - - var $nesting = [self].concat($parent_nesting), $Base_format$20; - - self.$$prototype.pre_class = nil; - - self.$include($$($nesting, 'SyntaxHighlighter')); - return (Opal.def(self, '$format', $Base_format$20 = function $$format(node, lang, opts) { - var $$21, $$22, self = this, class_attr_val = nil, transform = nil, pre = nil, code = nil, $writer = nil; - - - class_attr_val = (function() {if ($truthy(opts['$[]']("nowrap"))) { - return "" + (self.pre_class) + " highlight nowrap" - } else { - return "" + (self.pre_class) + " highlight" - }; return nil; })(); - if ($truthy((transform = opts['$[]']("transform")))) { - - transform['$[]']((pre = $hash2(["class"], {"class": class_attr_val})), (code = (function() {if ($truthy(lang)) { - return $hash2(["data-lang"], {"data-lang": lang}) - } else { - return $hash2([], {}) - }; return nil; })())); - if ($truthy((lang = code.$delete("data-lang")))) { - - $writer = ["data-lang", lang]; - $send(code, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return "" + "" + (node.$content()) + ""; - } else { - return "" + "
    " + (node.$content()) + "
    " - }; - }, $Base_format$20.$$arity = 3), nil) && 'format'; - })($nesting[0], null, $nesting); - self.$extend($$($nesting, 'DefaultFactory')); - })($nesting[0], $nesting) - })($nesting[0], $nesting); - self.$require("asciidoctor/syntax_highlighter.rb"+ '/../' + "syntax_highlighter/highlightjs"); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - return nil - } else { - return nil - }; -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/timings"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy, $gvars = Opal.gvars; - - Opal.add_stubs(['$now', '$[]=', '$-', '$delete', '$reduce', '$+', '$[]', '$>', '$time', '$puts', '$%', '$to_f', '$read_parse', '$convert', '$read_parse_convert', '$private', '$const_defined?', '$==', '$clock_gettime']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Timings'); - - var $nesting = [self].concat($parent_nesting), $Timings_initialize$1, $Timings_start$2, $Timings_record$3, $Timings_time$4, $Timings_read$6, $Timings_parse$7, $Timings_read_parse$8, $Timings_convert$9, $Timings_read_parse_convert$10, $Timings_write$11, $Timings_total$12, $Timings_print_report$13, $a, $b, $c, $d, $e, $Timings_now$14, $Timings_now$15; - - self.$$prototype.timers = self.$$prototype.log = nil; - - - Opal.def(self, '$initialize', $Timings_initialize$1 = function $$initialize() { - var self = this; - - - self.log = $hash2([], {}); - return (self.timers = $hash2([], {})); - }, $Timings_initialize$1.$$arity = 0); - - Opal.def(self, '$start', $Timings_start$2 = function $$start(key) { - var self = this, $writer = nil; - - - $writer = [key, self.$now()]; - $send(self.timers, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $Timings_start$2.$$arity = 1); - - Opal.def(self, '$record', $Timings_record$3 = function $$record(key) { - var self = this, $writer = nil; - - - $writer = [key, $rb_minus(self.$now(), self.timers.$delete(key))]; - $send(self.log, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $Timings_record$3.$$arity = 1); - - Opal.def(self, '$time', $Timings_time$4 = function $$time($a) { - var $post_args, keys, $$5, self = this, time = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - keys = $post_args;; - time = $send(keys, 'reduce', [0], ($$5 = function(sum, key){var self = $$5.$$s || this, $b; - if (self.log == null) self.log = nil; - - - - if (sum == null) { - sum = nil; - }; - - if (key == null) { - key = nil; - }; - return $rb_plus(sum, ($truthy($b = self.log['$[]'](key)) ? $b : 0));}, $$5.$$s = self, $$5.$$arity = 2, $$5)); - if ($truthy($rb_gt(time, 0))) { - return time - } else { - return nil - }; - }, $Timings_time$4.$$arity = -1); - - Opal.def(self, '$read', $Timings_read$6 = function $$read() { - var self = this; - - return self.$time("read") - }, $Timings_read$6.$$arity = 0); - - Opal.def(self, '$parse', $Timings_parse$7 = function $$parse() { - var self = this; - - return self.$time("parse") - }, $Timings_parse$7.$$arity = 0); - - Opal.def(self, '$read_parse', $Timings_read_parse$8 = function $$read_parse() { - var self = this; - - return self.$time("read", "parse") - }, $Timings_read_parse$8.$$arity = 0); - - Opal.def(self, '$convert', $Timings_convert$9 = function $$convert() { - var self = this; - - return self.$time("convert") - }, $Timings_convert$9.$$arity = 0); - - Opal.def(self, '$read_parse_convert', $Timings_read_parse_convert$10 = function $$read_parse_convert() { - var self = this; - - return self.$time("read", "parse", "convert") - }, $Timings_read_parse_convert$10.$$arity = 0); - - Opal.def(self, '$write', $Timings_write$11 = function $$write() { - var self = this; - - return self.$time("write") - }, $Timings_write$11.$$arity = 0); - - Opal.def(self, '$total', $Timings_total$12 = function $$total() { - var self = this; - - return self.$time("read", "parse", "convert", "write") - }, $Timings_total$12.$$arity = 0); - - Opal.def(self, '$print_report', $Timings_print_report$13 = function $$print_report(to, subject) { - var self = this; - if ($gvars.stdout == null) $gvars.stdout = nil; - - - - if (to == null) { - to = $gvars.stdout; - }; - - if (subject == null) { - subject = nil; - }; - if ($truthy(subject)) { - to.$puts("" + "Input file: " + (subject))}; - to.$puts("" + " Time to read and parse source: " + ("%05.5f"['$%'](self.$read_parse().$to_f()))); - to.$puts("" + " Time to convert document: " + ("%05.5f"['$%'](self.$convert().$to_f()))); - return to.$puts("" + " Total time (read, parse and convert): " + ("%05.5f"['$%'](self.$read_parse_convert().$to_f()))); - }, $Timings_print_report$13.$$arity = -1); - self.$private(); - if ($truthy(($truthy($a = $$$('::', 'Process')['$const_defined?']("CLOCK_MONOTONIC", false)) ? ((($b = $$$('::', 'Process', 'skip_raise')) && ($c = $b, $c) && ($d = $c) && ((($e = $d.$clock_gettime) && !$e.$$stub) || $d['$respond_to_missing?']('clock_gettime'))) ? 'method' : nil)['$==']("method") : $a))) { - - Opal.const_set($nesting[0], 'CLOCK_ID', $$$($$$('::', 'Process'), 'CLOCK_MONOTONIC')); - return (Opal.def(self, '$now', $Timings_now$14 = function $$now() { - var self = this; - - return $$$('::', 'Process').$clock_gettime($$($nesting, 'CLOCK_ID')) - }, $Timings_now$14.$$arity = 0), nil) && 'now'; - } else { - return (Opal.def(self, '$now', $Timings_now$15 = function $$now() { - var self = this; - - return $$$('::', 'Time').$now() - }, $Timings_now$15.$$arity = 0), nil) && 'now' - }; - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/converter/composite"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy; - - Opal.add_stubs(['$attr_reader', '$each', '$respond_to?', '$composed', '$init_backend_traits', '$backend_traits', '$new', '$find_converter', '$[]=', '$-', '$convert', '$converter_for', '$node_name', '$[]', '$handles?', '$raise']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'CompositeConverter'); - - var $nesting = [self].concat($parent_nesting), $CompositeConverter_initialize$1, $CompositeConverter_convert$4, $CompositeConverter_converter_for$5, $CompositeConverter_find_converter$6; - - self.$$prototype.converter_cache = self.$$prototype.converters = nil; - - self.$attr_reader("converters"); - - Opal.def(self, '$initialize', $CompositeConverter_initialize$1 = function $$initialize(backend, $a, $b) { - var $post_args, $kwargs, converters, backend_traits_source, $$2, $$3, self = this; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - $kwargs = Opal.extract_kwargs($post_args); - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - converters = $post_args;; - - backend_traits_source = $kwargs.$$smap["backend_traits_source"]; - if (backend_traits_source == null) { - backend_traits_source = nil - }; - self.backend = backend; - $send((self.converters = converters), 'each', [], ($$2 = function(converter){var self = $$2.$$s || this; - - - - if (converter == null) { - converter = nil; - }; - if ($truthy(converter['$respond_to?']("composed"))) { - return converter.$composed(self) - } else { - return nil - };}, $$2.$$s = self, $$2.$$arity = 1, $$2)); - if ($truthy(backend_traits_source)) { - self.$init_backend_traits(backend_traits_source.$backend_traits())}; - return (self.converter_cache = $send($$$('::', 'Hash'), 'new', [], ($$3 = function(hash, key){var self = $$3.$$s || this, $writer = nil; - - - - if (hash == null) { - hash = nil; - }; - - if (key == null) { - key = nil; - }; - $writer = [key, self.$find_converter(key)]; - $send(hash, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$3.$$s = self, $$3.$$arity = 2, $$3))); - }, $CompositeConverter_initialize$1.$$arity = -2); - - Opal.def(self, '$convert', $CompositeConverter_convert$4 = function $$convert(node, transform, opts) { - var $a, self = this; - - - - if (transform == null) { - transform = nil; - }; - - if (opts == null) { - opts = nil; - }; - return self.$converter_for((transform = ($truthy($a = transform) ? $a : node.$node_name()))).$convert(node, transform, opts); - }, $CompositeConverter_convert$4.$$arity = -2); - - Opal.def(self, '$converter_for', $CompositeConverter_converter_for$5 = function $$converter_for(transform) { - var self = this; - - return self.converter_cache['$[]'](transform) - }, $CompositeConverter_converter_for$5.$$arity = 1); - return (Opal.def(self, '$find_converter', $CompositeConverter_find_converter$6 = function $$find_converter(transform) {try { - - var $$7, self = this; - - - $send(self.converters, 'each', [], ($$7 = function(candidate){var self = $$7.$$s || this; - - - - if (candidate == null) { - candidate = nil; - }; - if ($truthy(candidate['$handles?'](transform))) { - Opal.ret(candidate) - } else { - return nil - };}, $$7.$$s = self, $$7.$$arity = 1, $$7)); - return self.$raise("" + "Could not find a converter to handle transform: " + (transform)); - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $CompositeConverter_find_converter$6.$$arity = 1), nil) && 'find_converter'; - })($$($nesting, 'Converter'), $$$($$($nesting, 'Converter'), 'Base'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/converter/html5"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_le(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy, $gvars = Opal.gvars; - - Opal.add_stubs(['$register_for', '$default=', '$-', '$==', '$[]', '$init_backend_traits', '$node_name', '$convert_inline_quoted', '$convert_paragraph', '$convert_inline_anchor', '$convert_section', '$convert_listing', '$convert_literal', '$convert_ulist', '$convert_olist', '$convert_dlist', '$convert_admonition', '$convert_colist', '$convert_embedded', '$convert_example', '$convert_floating_title', '$convert_image', '$convert_inline_break', '$convert_inline_button', '$convert_inline_callout', '$convert_inline_footnote', '$convert_inline_image', '$convert_inline_indexterm', '$convert_inline_kbd', '$convert_inline_menu', '$convert_open', '$convert_page_break', '$convert_preamble', '$convert_quote', '$convert_sidebar', '$convert_stem', '$convert_table', '$convert_thematic_break', '$convert_verse', '$convert_video', '$convert_document', '$convert_toc', '$convert_pass', '$convert_audio', '$empty?', '$attr', '$attr?', '$<<', '$include?', '$sub_replacements', '$gsub', '$extname', '$slice', '$length', '$doctitle', '$normalize_web_path', '$primary_stylesheet_data', '$instance', '$read_contents', '$syntax_highlighter', '$size', '$docinfo', '$id', '$sections?', '$doctype', '$role?', '$role', '$join', '$noheader', '$convert', '$converter', '$generate_manname_section', '$header?', '$notitle', '$title', '$header', '$each', '$authors', '$>', '$name', '$email', '$sub_macros', '$+', '$downcase', '$concat', '$content', '$footnotes?', '$!', '$footnotes', '$index', '$text', '$nofooter', '$docinfo?', '$[]=', '$delete_at', '$inspect', '$!=', '$to_i', '$attributes', '$document', '$sections', '$level', '$caption', '$captioned_title', '$numbered', '$<=', '$<', '$sectname', '$sectnum', '$convert_outline', '$title?', '$icon_uri', '$compact', '$media_uri', '$option?', '$append_boolean_attribute', '$style', '$items', '$blocks?', '$===', '$text?', '$chomp', '$safe', '$read_svg_contents', '$alt', '$image_uri', '$encode_attribute_value', '$append_link_constraint_attrs', '$highlight?', '$to_sym', '$format', '$*', '$count', '$start_with?', '$end_with?', '$list_marker_keyword', '$parent', '$warn', '$logger', '$context', '$error', '$new', '$columns', '$to_h', '$rows', '$colspan', '$rowspan', '$unshift', '$shift', '$pop', '$split', '$nil_or_empty?', '$type', '$catalog', '$get_root_document', '$xreftext', '$target', '$reftext', '$map', '$chop', '$sub', '$match', '$private', '$upcase', '$nested?', '$parent_document', '$to_s', '$handles?', '$send']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Html5Converter'); - - var $nesting = [self].concat($parent_nesting), $Html5Converter_initialize$1, $Html5Converter_convert$2, $Html5Converter_convert_document$3, $Html5Converter_convert_embedded$6, $Html5Converter_convert_outline$8, $Html5Converter_convert_section$10, $Html5Converter_convert_admonition$11, $Html5Converter_convert_audio$12, $Html5Converter_convert_colist$13, $Html5Converter_convert_dlist$16, $Html5Converter_convert_example$23, $Html5Converter_convert_floating_title$24, $Html5Converter_convert_image$25, $Html5Converter_convert_listing$26, $Html5Converter_convert_literal$27, $Html5Converter_convert_stem$28, $Html5Converter_convert_olist$30, $Html5Converter_convert_open$32, $Html5Converter_convert_page_break$33, $Html5Converter_convert_paragraph$34, $Html5Converter_convert_preamble$35, $Html5Converter_convert_quote$36, $Html5Converter_convert_thematic_break$37, $Html5Converter_convert_sidebar$38, $Html5Converter_convert_table$39, $Html5Converter_convert_toc$44, $Html5Converter_convert_ulist$45, $Html5Converter_convert_verse$47, $Html5Converter_convert_video$48, $Html5Converter_convert_inline_anchor$49, $Html5Converter_convert_inline_break$50, $Html5Converter_convert_inline_button$51, $Html5Converter_convert_inline_callout$52, $Html5Converter_convert_inline_footnote$53, $Html5Converter_convert_inline_image$54, $Html5Converter_convert_inline_indexterm$57, $Html5Converter_convert_inline_kbd$58, $Html5Converter_convert_inline_menu$59, $Html5Converter_convert_inline_quoted$60, $Html5Converter_read_svg_contents$61, $Html5Converter_append_boolean_attribute$63, $Html5Converter_append_link_constraint_attrs$64, $Html5Converter_encode_attribute_value$65, $Html5Converter_generate_manname_section$66, $Html5Converter_get_root_document$67, $Html5Converter_method_missing$68, $writer = nil; - - self.$$prototype.void_element_slash = self.$$prototype.xml_mode = self.$$prototype.refs = self.$$prototype.resolving_xref = nil; - - self.$register_for("html5"); - - $writer = [["", ""]]; - $send(Opal.const_set($nesting[0], 'QUOTE_TAGS', $hash2(["monospaced", "emphasis", "strong", "double", "single", "mark", "superscript", "subscript", "asciimath", "latexmath"], {"monospaced": ["", "", true], "emphasis": ["", "", true], "strong": ["", "", true], "double": ["“", "”"], "single": ["‘", "’"], "mark": ["", "", true], "superscript": ["", "", true], "subscript": ["", "", true], "asciimath": ["\\$", "\\$"], "latexmath": ["\\(", "\\)"]})), 'default=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - Opal.const_set($nesting[0], 'DropAnchorRx', /<(?:a\b[^>]*|\/a)>/); - Opal.const_set($nesting[0], 'StemBreakRx', / *\\\n(?:\\?\n)*|\n\n+/); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - - Opal.const_set($nesting[0], 'SvgPreambleRx', new RegExp("" + "^" + ($$($nesting, 'CC_ALL')) + "*?(?=])")); - Opal.const_set($nesting[0], 'SvgStartTagRx', /^]*)?>/); - } else { - nil - }; - Opal.const_set($nesting[0], 'DimensionAttributeRx', new RegExp("" + "\\s(?:width|height|style)=([\"'])" + ($$($nesting, 'CC_ANY')) + "*?\\1")); - - Opal.def(self, '$initialize', $Html5Converter_initialize$1 = function $$initialize(backend, opts) { - var self = this, syntax = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - self.backend = backend; - if (opts['$[]']("htmlsyntax")['$==']("xml")) { - - syntax = "xml"; - self.xml_mode = true; - self.void_element_slash = "/"; - } else { - - syntax = "html"; - self.xml_mode = nil; - self.void_element_slash = ""; - }; - return self.$init_backend_traits($hash2(["basebackend", "filetype", "htmlsyntax", "outfilesuffix", "supports_templates"], {"basebackend": "html", "filetype": "html", "htmlsyntax": syntax, "outfilesuffix": ".html", "supports_templates": true})); - }, $Html5Converter_initialize$1.$$arity = -2); - - Opal.def(self, '$convert', $Html5Converter_convert$2 = function $$convert(node, transform, opts) { - var $iter = $Html5Converter_convert$2.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Html5Converter_convert$2.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if (transform == null) { - transform = node.$node_name(); - }; - - if (opts == null) { - opts = nil; - }; - if (transform['$==']("inline_quoted")) { - return self.$convert_inline_quoted(node) - } else if (transform['$==']("paragraph")) { - return self.$convert_paragraph(node) - } else if (transform['$==']("inline_anchor")) { - return self.$convert_inline_anchor(node) - } else if (transform['$==']("section")) { - return self.$convert_section(node) - } else if (transform['$==']("listing")) { - return self.$convert_listing(node) - } else if (transform['$==']("literal")) { - return self.$convert_literal(node) - } else if (transform['$==']("ulist")) { - return self.$convert_ulist(node) - } else if (transform['$==']("olist")) { - return self.$convert_olist(node) - } else if (transform['$==']("dlist")) { - return self.$convert_dlist(node) - } else if (transform['$==']("admonition")) { - return self.$convert_admonition(node) - } else if (transform['$==']("colist")) { - return self.$convert_colist(node) - } else if (transform['$==']("embedded")) { - return self.$convert_embedded(node) - } else if (transform['$==']("example")) { - return self.$convert_example(node) - } else if (transform['$==']("floating_title")) { - return self.$convert_floating_title(node) - } else if (transform['$==']("image")) { - return self.$convert_image(node) - } else if (transform['$==']("inline_break")) { - return self.$convert_inline_break(node) - } else if (transform['$==']("inline_button")) { - return self.$convert_inline_button(node) - } else if (transform['$==']("inline_callout")) { - return self.$convert_inline_callout(node) - } else if (transform['$==']("inline_footnote")) { - return self.$convert_inline_footnote(node) - } else if (transform['$==']("inline_image")) { - return self.$convert_inline_image(node) - } else if (transform['$==']("inline_indexterm")) { - return self.$convert_inline_indexterm(node) - } else if (transform['$==']("inline_kbd")) { - return self.$convert_inline_kbd(node) - } else if (transform['$==']("inline_menu")) { - return self.$convert_inline_menu(node) - } else if (transform['$==']("open")) { - return self.$convert_open(node) - } else if (transform['$==']("page_break")) { - return self.$convert_page_break(node) - } else if (transform['$==']("preamble")) { - return self.$convert_preamble(node) - } else if (transform['$==']("quote")) { - return self.$convert_quote(node) - } else if (transform['$==']("sidebar")) { - return self.$convert_sidebar(node) - } else if (transform['$==']("stem")) { - return self.$convert_stem(node) - } else if (transform['$==']("table")) { - return self.$convert_table(node) - } else if (transform['$==']("thematic_break")) { - return self.$convert_thematic_break(node) - } else if (transform['$==']("verse")) { - return self.$convert_verse(node) - } else if (transform['$==']("video")) { - return self.$convert_video(node) - } else if (transform['$==']("document")) { - return self.$convert_document(node) - } else if (transform['$==']("toc")) { - return self.$convert_toc(node) - } else if (transform['$==']("pass")) { - return self.$convert_pass(node) - } else if (transform['$==']("audio")) { - return self.$convert_audio(node) - } else { - return $send(self, Opal.find_super_dispatcher(self, 'convert', $Html5Converter_convert$2, false), $zuper, $iter) - }; - }, $Html5Converter_convert$2.$$arity = -2); - - Opal.def(self, '$convert_document', $Html5Converter_convert_document$3 = function $$convert_document(node) { - var $a, $b, $c, $$4, $$5, self = this, br = nil, slash = nil, asset_uri_scheme = nil, cdn_base_url = nil, linkcss = nil, max_width_attr = nil, result = nil, lang_attribute = nil, authors = nil, icon_href = nil, icon_type = nil, icon_ext = nil, webfonts = nil, iconfont_stylesheet = nil, syntax_hl = nil, syntax_hl_docinfo_head_idx = nil, docinfo_content = nil, id_attr = nil, sectioned = nil, classes = nil, details = nil, idx = nil, $writer = nil, eqnums_val = nil, eqnums_opt = nil; - - - br = "" + ""; - if ($truthy((asset_uri_scheme = node.$attr("asset-uri-scheme", "https"))['$empty?']())) { - } else { - asset_uri_scheme = "" + (asset_uri_scheme) + ":" - }; - cdn_base_url = "" + (asset_uri_scheme) + "//cdnjs.cloudflare.com/ajax/libs"; - linkcss = node['$attr?']("linkcss"); - max_width_attr = (function() {if ($truthy(node['$attr?']("max-width"))) { - return "" + " style=\"max-width: " + (node.$attr("max-width")) + ";\"" - } else { - return "" - }; return nil; })(); - result = [""]; - lang_attribute = (function() {if ($truthy(node['$attr?']("nolang"))) { - return "" - } else { - return "" + " lang=\"" + (node.$attr("lang", "en")) + "\"" - }; return nil; })(); - result['$<<']("" + ""); - result['$<<']("" + "\n" + "\n" + "\n" + "\n" + ""); - if ($truthy(node['$attr?']("app-name"))) { - result['$<<']("" + "")}; - if ($truthy(node['$attr?']("description"))) { - result['$<<']("" + "")}; - if ($truthy(node['$attr?']("keywords"))) { - result['$<<']("" + "")}; - if ($truthy(node['$attr?']("authors"))) { - result['$<<']("" + "")}; - if ($truthy(node['$attr?']("copyright"))) { - result['$<<']("" + "")}; - if ($truthy(node['$attr?']("favicon"))) { - - if ($truthy((icon_href = node.$attr("favicon"))['$empty?']())) { - - icon_href = "favicon.ico"; - icon_type = "image/x-icon"; - } else if ($truthy((icon_ext = $$($nesting, 'Helpers').$extname(icon_href, nil)))) { - icon_type = (function() {if (icon_ext['$=='](".ico")) { - return "image/x-icon" - } else { - return "" + "image/" + (icon_ext.$slice(1, icon_ext.$length())) - }; return nil; })() - } else { - icon_type = "image/x-icon" - }; - result['$<<']("" + "");}; - result['$<<']("" + "" + (node.$doctitle($hash2(["sanitize", "use_fallback"], {"sanitize": true, "use_fallback": true}))) + ""); - if ($truthy($$($nesting, 'DEFAULT_STYLESHEET_KEYS')['$include?'](node.$attr("stylesheet")))) { - - if ($truthy((webfonts = node.$attr("webfonts")))) { - result['$<<']("" + "")}; - if ($truthy(linkcss)) { - result['$<<']("" + "") - } else { - result['$<<']("" + "") - }; - } else if ($truthy(node['$attr?']("stylesheet"))) { - if ($truthy(linkcss)) { - result['$<<']("" + "") - } else { - result['$<<']("" + "") - }}; - if ($truthy(node['$attr?']("icons", "font"))) { - if ($truthy(node['$attr?']("iconfont-remote"))) { - result['$<<']("" + "") - } else { - - iconfont_stylesheet = "" + (node.$attr("iconfont-name", "font-awesome")) + ".css"; - result['$<<']("" + ""); - }}; - if ($truthy((syntax_hl = node.$syntax_highlighter()))) { - result['$<<']((syntax_hl_docinfo_head_idx = result.$size()))}; - if ($truthy((docinfo_content = node.$docinfo())['$empty?']())) { - } else { - result['$<<'](docinfo_content) - }; - result['$<<'](""); - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = (sectioned = node['$sections?']())) ? node['$attr?']("toc-class") : $c)) ? node['$attr?']("toc") : $b)) ? node['$attr?']("toc-placement", "auto") : $a))) { - classes = [node.$doctype(), node.$attr("toc-class"), "" + "toc-" + (node.$attr("toc-position", "header"))] - } else { - classes = [node.$doctype()] - }; - if ($truthy(node['$role?']())) { - classes['$<<'](node.$role())}; - result['$<<']("" + ""); - if ($truthy((docinfo_content = node.$docinfo("header"))['$empty?']())) { - } else { - result['$<<'](docinfo_content) - }; - if ($truthy(node.$noheader())) { - } else { - - result['$<<']("" + "
    "); - if (node.$doctype()['$==']("manpage")) { - - result['$<<']("" + "

    " + (node.$doctitle()) + " Manual Page

    "); - if ($truthy(($truthy($a = ($truthy($b = sectioned) ? node['$attr?']("toc") : $b)) ? node['$attr?']("toc-placement", "auto") : $a))) { - result['$<<']("" + "
    \n" + "
    " + (node.$attr("toc-title")) + "
    \n" + (node.$converter().$convert(node, "outline")) + "\n" + "
    ")}; - if ($truthy(node['$attr?']("manpurpose"))) { - result['$<<'](self.$generate_manname_section(node))}; - } else { - - if ($truthy(node['$header?']())) { - - if ($truthy(node.$notitle())) { - } else { - result['$<<']("" + "

    " + (node.$header().$title()) + "

    ") - }; - details = []; - idx = 1; - $send(node.$authors(), 'each', [], ($$4 = function(author){var self = $$4.$$s || this; - - - - if (author == null) { - author = nil; - }; - details['$<<']("" + "" + (node.$sub_replacements(author.$name())) + "" + (br)); - if ($truthy(author.$email())) { - details['$<<']("" + "" + (node.$sub_macros(author.$email())) + "" + (br))}; - return (idx = $rb_plus(idx, 1));}, $$4.$$s = self, $$4.$$arity = 1, $$4)); - if ($truthy(node['$attr?']("revnumber"))) { - details['$<<']("" + "" + (($truthy($a = node.$attr("version-label")) ? $a : "").$downcase()) + " " + (node.$attr("revnumber")) + ((function() {if ($truthy(node['$attr?']("revdate"))) { - return "," - } else { - return "" - }; return nil; })()) + "")}; - if ($truthy(node['$attr?']("revdate"))) { - details['$<<']("" + "" + (node.$attr("revdate")) + "")}; - if ($truthy(node['$attr?']("revremark"))) { - details['$<<']("" + (br) + "" + (node.$attr("revremark")) + "")}; - if ($truthy(details['$empty?']())) { - } else { - - result['$<<']("
    "); - result.$concat(details); - result['$<<']("
    "); - };}; - if ($truthy(($truthy($a = ($truthy($b = sectioned) ? node['$attr?']("toc") : $b)) ? node['$attr?']("toc-placement", "auto") : $a))) { - result['$<<']("" + "
    \n" + "
    " + (node.$attr("toc-title")) + "
    \n" + (node.$converter().$convert(node, "outline")) + "\n" + "
    ")}; - }; - result['$<<']("
    "); - }; - result['$<<']("" + "
    \n" + (node.$content()) + "\n" + "
    "); - if ($truthy(($truthy($a = node['$footnotes?']()) ? node['$attr?']("nofootnotes")['$!']() : $a))) { - - result['$<<']("" + "
    \n" + ""); - $send(node.$footnotes(), 'each', [], ($$5 = function(footnote){var self = $$5.$$s || this; - - - - if (footnote == null) { - footnote = nil; - }; - return result['$<<']("" + "
    \n" + "" + (footnote.$index()) + ". " + (footnote.$text()) + "\n" + "
    ");}, $$5.$$s = self, $$5.$$arity = 1, $$5)); - result['$<<']("
    ");}; - if ($truthy(node.$nofooter())) { - } else { - - result['$<<']("" + "
    "); - result['$<<']("
    "); - if ($truthy(node['$attr?']("revnumber"))) { - result['$<<']("" + (node.$attr("version-label")) + " " + (node.$attr("revnumber")) + (br))}; - if ($truthy(($truthy($a = node['$attr?']("last-update-label")) ? node['$attr?']("reproducible")['$!']() : $a))) { - result['$<<']("" + (node.$attr("last-update-label")) + " " + (node.$attr("docdatetime")))}; - result['$<<']("
    "); - result['$<<']("
    "); - }; - if ($truthy(syntax_hl)) { - - if ($truthy(syntax_hl['$docinfo?']("head"))) { - - $writer = [syntax_hl_docinfo_head_idx, syntax_hl.$docinfo("head", node, $hash2(["cdn_base_url", "linkcss", "self_closing_tag_slash"], {"cdn_base_url": cdn_base_url, "linkcss": linkcss, "self_closing_tag_slash": slash}))]; - $send(result, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - result.$delete_at(syntax_hl_docinfo_head_idx) - }; - if ($truthy(syntax_hl['$docinfo?']("footer"))) { - result['$<<'](syntax_hl.$docinfo("footer", node, $hash2(["cdn_base_url", "linkcss", "self_closing_tag_slash"], {"cdn_base_url": cdn_base_url, "linkcss": linkcss, "self_closing_tag_slash": slash})))};}; - if ($truthy(node['$attr?']("stem"))) { - - eqnums_val = node.$attr("eqnums", "none"); - if ($truthy(eqnums_val['$empty?']())) { - eqnums_val = "AMS"}; - eqnums_opt = "" + " equationNumbers: { autoNumber: \"" + (eqnums_val) + "\" } "; - result['$<<']("" + "\n" + "");}; - if ($truthy((docinfo_content = node.$docinfo("footer"))['$empty?']())) { - } else { - result['$<<'](docinfo_content) - }; - result['$<<'](""); - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_document$3.$$arity = 1); - - Opal.def(self, '$convert_embedded', $Html5Converter_convert_embedded$6 = function $$convert_embedded(node) { - var $a, $b, $c, $$7, self = this, result = nil, id_attr = nil, toc_p = nil; - - - result = []; - if (node.$doctype()['$==']("manpage")) { - - if ($truthy(node.$notitle())) { - } else { - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - result['$<<']("" + "" + (node.$doctitle()) + " Manual Page"); - }; - if ($truthy(node['$attr?']("manpurpose"))) { - result['$<<'](self.$generate_manname_section(node))}; - } else if ($truthy(($truthy($a = node['$header?']()) ? node.$notitle()['$!']() : $a))) { - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - result['$<<']("" + "" + (node.$header().$title()) + "");}; - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = node['$sections?']()) ? node['$attr?']("toc") : $c)) ? (toc_p = node.$attr("toc-placement"))['$!=']("macro") : $b)) ? toc_p['$!=']("preamble") : $a))) { - result['$<<']("" + "
    \n" + "
    " + (node.$attr("toc-title")) + "
    \n" + (node.$converter().$convert(node, "outline")) + "\n" + "
    ")}; - result['$<<'](node.$content()); - if ($truthy(($truthy($a = node['$footnotes?']()) ? node['$attr?']("nofootnotes")['$!']() : $a))) { - - result['$<<']("" + "
    \n" + ""); - $send(node.$footnotes(), 'each', [], ($$7 = function(footnote){var self = $$7.$$s || this; - - - - if (footnote == null) { - footnote = nil; - }; - return result['$<<']("" + "
    \n" + "" + (footnote.$index()) + ". " + (footnote.$text()) + "\n" + "
    ");}, $$7.$$s = self, $$7.$$arity = 1, $$7)); - result['$<<']("
    ");}; - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_embedded$6.$$arity = 1); - - Opal.def(self, '$convert_outline', $Html5Converter_convert_outline$8 = function $$convert_outline(node, opts) { - var $a, $b, $$9, self = this, sectnumlevels = nil, toclevels = nil, sections = nil, result = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy(node['$sections?']())) { - } else { - return nil - }; - sectnumlevels = ($truthy($a = opts['$[]']("sectnumlevels")) ? $a : ($truthy($b = node.$document().$attributes()['$[]']("sectnumlevels")) ? $b : 3).$to_i()); - toclevels = ($truthy($a = opts['$[]']("toclevels")) ? $a : ($truthy($b = node.$document().$attributes()['$[]']("toclevels")) ? $b : 2).$to_i()); - sections = node.$sections(); - result = ["" + "
      "]; - $send(sections, 'each', [], ($$9 = function(section){var self = $$9.$$s || this, $c, slevel = nil, stitle = nil, signifier = nil, child_toc_level = nil; - - - - if (section == null) { - section = nil; - }; - slevel = section.$level(); - if ($truthy(section.$caption())) { - stitle = section.$captioned_title() - } else if ($truthy(($truthy($c = section.$numbered()) ? $rb_le(slevel, sectnumlevels) : $c))) { - if ($truthy(($truthy($c = $rb_lt(slevel, 2)) ? node.$document().$doctype()['$==']("book") : $c))) { - if (section.$sectname()['$==']("chapter")) { - stitle = "" + ((function() {if ($truthy((signifier = node.$document().$attributes()['$[]']("chapter-signifier")))) { - return "" + (signifier) + " " - } else { - return "" - }; return nil; })()) + (section.$sectnum()) + " " + (section.$title()) - } else if (section.$sectname()['$==']("part")) { - stitle = "" + ((function() {if ($truthy((signifier = node.$document().$attributes()['$[]']("part-signifier")))) { - return "" + (signifier) + " " - } else { - return "" - }; return nil; })()) + (section.$sectnum(nil, ":")) + " " + (section.$title()) - } else { - stitle = "" + (section.$sectnum()) + " " + (section.$title()) - } - } else { - stitle = "" + (section.$sectnum()) + " " + (section.$title()) - } - } else { - stitle = section.$title() - }; - if ($truthy(stitle['$include?']("" + (stitle) + ""); - result['$<<'](child_toc_level); - return result['$<<'](""); - } else { - return result['$<<']("" + "
    • " + (stitle) + "
    • ") - };}, $$9.$$s = self, $$9.$$arity = 1, $$9)); - result['$<<']("
    "); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_outline$8.$$arity = -2); - - Opal.def(self, '$convert_section', $Html5Converter_convert_section$10 = function $$convert_section(node) { - var $a, $b, self = this, doc_attrs = nil, level = nil, title = nil, signifier = nil, id_attr = nil, id = nil, role = nil; - - - doc_attrs = node.$document().$attributes(); - level = node.$level(); - if ($truthy(node.$caption())) { - title = node.$captioned_title() - } else if ($truthy(($truthy($a = node.$numbered()) ? $rb_le(level, ($truthy($b = doc_attrs['$[]']("sectnumlevels")) ? $b : 3).$to_i()) : $a))) { - if ($truthy(($truthy($a = $rb_lt(level, 2)) ? node.$document().$doctype()['$==']("book") : $a))) { - if (node.$sectname()['$==']("chapter")) { - title = "" + ((function() {if ($truthy((signifier = doc_attrs['$[]']("chapter-signifier")))) { - return "" + (signifier) + " " - } else { - return "" - }; return nil; })()) + (node.$sectnum()) + " " + (node.$title()) - } else if (node.$sectname()['$==']("part")) { - title = "" + ((function() {if ($truthy((signifier = doc_attrs['$[]']("part-signifier")))) { - return "" + (signifier) + " " - } else { - return "" - }; return nil; })()) + (node.$sectnum(nil, ":")) + " " + (node.$title()) - } else { - title = "" + (node.$sectnum()) + " " + (node.$title()) - } - } else { - title = "" + (node.$sectnum()) + " " + (node.$title()) - } - } else { - title = node.$title() - }; - if ($truthy(node.$id())) { - - id_attr = "" + " id=\"" + ((id = node.$id())) + "\""; - if ($truthy(doc_attrs['$[]']("sectlinks"))) { - title = "" + "" + (title) + ""}; - if ($truthy(doc_attrs['$[]']("sectanchors"))) { - if (doc_attrs['$[]']("sectanchors")['$==']("after")) { - title = "" + (title) + "" - } else { - title = "" + "" + (title) - }}; - } else { - id_attr = "" - }; - if (level['$=='](0)) { - return "" + "" + (title) + "\n" + (node.$content()) - } else { - return "" + "
    \n" + "" + (title) + "\n" + ((function() {if (level['$=='](1)) { - return "" + "
    \n" + (node.$content()) + "\n" + "
    " - } else { - return node.$content() - }; return nil; })()) + "\n" + "
    " - }; - }, $Html5Converter_convert_section$10.$$arity = 1); - - Opal.def(self, '$convert_admonition', $Html5Converter_convert_admonition$11 = function $$convert_admonition(node) { - var $a, self = this, id_attr = nil, name = nil, title_element = nil, label = nil, role = nil; - - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - name = node.$attr("name"); - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$title()) + "
    \n" - } else { - return "" - }; return nil; })(); - if ($truthy(node.$document()['$attr?']("icons"))) { - if ($truthy(($truthy($a = node.$document()['$attr?']("icons", "font")) ? node['$attr?']("icon")['$!']() : $a))) { - label = "" + "" - } else { - label = "" + "\""" - } - } else { - label = "" + "
    " + (node.$attr("textlabel")) + "
    " - }; - return "" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "
    \n" + (label) + "\n" + "\n" + (title_element) + (node.$content()) + "\n" + "
    \n" + ""; - }, $Html5Converter_convert_admonition$11.$$arity = 1); - - Opal.def(self, '$convert_audio', $Html5Converter_convert_audio$12 = function $$convert_audio(node) { - var $a, self = this, xml = nil, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, start_t = nil, end_t = nil, time_anchor = nil; - - - xml = self.xml_mode; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["audioblock", node.$role()].$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$title()) + "
    \n" - } else { - return "" - }; return nil; })(); - start_t = node.$attr("start"); - end_t = node.$attr("end"); - time_anchor = (function() {if ($truthy(($truthy($a = start_t) ? $a : end_t))) { - return "" + "#t=" + (($truthy($a = start_t) ? $a : "")) + ((function() {if ($truthy(end_t)) { - return "" + "," + (end_t) - } else { - return "" - }; return nil; })()) - } else { - return "" - }; return nil; })(); - return "" + "\n" + (title_element) + "
    \n" + "\n" + "
    \n" + ""; - }, $Html5Converter_convert_audio$12.$$arity = 1); - - Opal.def(self, '$convert_colist', $Html5Converter_convert_colist$13 = function $$convert_colist(node) { - var $a, $$14, $$15, self = this, result = nil, id_attribute = nil, classes = nil, class_attribute = nil, font_icons = nil, num = nil; - - - result = []; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["colist", node.$style(), node.$role()].$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - result['$<<']("" + ""); - if ($truthy(node['$title?']())) { - result['$<<']("" + "
    " + (node.$title()) + "
    ")}; - if ($truthy(node.$document()['$attr?']("icons"))) { - - result['$<<'](""); - $a = [node.$document()['$attr?']("icons", "font"), 0], (font_icons = $a[0]), (num = $a[1]), $a; - $send(node.$items(), 'each', [], ($$14 = function(item){var self = $$14.$$s || this, num_label = nil; - if (self.void_element_slash == null) self.void_element_slash = nil; - - - - if (item == null) { - item = nil; - }; - num = $rb_plus(num, 1); - if ($truthy(font_icons)) { - num_label = "" + "" + (num) + "" - } else { - num_label = "" + "\""" - }; - return result['$<<']("" + "\n" + "\n" + "\n" + "");}, $$14.$$s = self, $$14.$$arity = 1, $$14)); - result['$<<']("
    " + (num_label) + "" + (item.$text()) + ((function() {if ($truthy(item['$blocks?']())) { - return $rb_plus($$($nesting, 'LF'), item.$content()) - } else { - return "" - }; return nil; })()) + "
    "); - } else { - - result['$<<']("
      "); - $send(node.$items(), 'each', [], ($$15 = function(item){var self = $$15.$$s || this; - - - - if (item == null) { - item = nil; - }; - return result['$<<']("" + "
    1. \n" + "

      " + (item.$text()) + "

      " + ((function() {if ($truthy(item['$blocks?']())) { - return $rb_plus($$($nesting, 'LF'), item.$content()) - } else { - return "" - }; return nil; })()) + "\n" + "
    2. ");}, $$15.$$s = self, $$15.$$arity = 1, $$15)); - result['$<<']("
    "); - }; - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_colist$13.$$arity = 1); - - Opal.def(self, '$convert_dlist', $Html5Converter_convert_dlist$16 = function $$convert_dlist(node) { - var $$17, $a, $$19, $$21, self = this, result = nil, id_attribute = nil, classes = nil, $case = nil, class_attribute = nil, slash = nil, col_style_attribute = nil, dt_style_attribute = nil; - - - result = []; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = (function() {$case = node.$style(); - if ("qanda"['$===']($case)) {return ["qlist", "qanda", node.$role()]} - else if ("horizontal"['$===']($case)) {return ["hdlist", node.$role()]} - else {return ["dlist", node.$style(), node.$role()]}})().$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - result['$<<']("" + ""); - if ($truthy(node['$title?']())) { - result['$<<']("" + "
    " + (node.$title()) + "
    ")}; - $case = node.$style(); - if ("qanda"['$===']($case)) { - result['$<<']("
      "); - $send(node.$items(), 'each', [], ($$17 = function(terms, dd){var self = $$17.$$s || this, $$18; - - - - if (terms == null) { - terms = nil; - }; - - if (dd == null) { - dd = nil; - }; - result['$<<']("
    1. "); - $send(terms, 'each', [], ($$18 = function(dt){var self = $$18.$$s || this; - - - - if (dt == null) { - dt = nil; - }; - return result['$<<']("" + "

      " + (dt.$text()) + "

      ");}, $$18.$$s = self, $$18.$$arity = 1, $$18)); - if ($truthy(dd)) { - - if ($truthy(dd['$text?']())) { - result['$<<']("" + "

      " + (dd.$text()) + "

      ")}; - if ($truthy(dd['$blocks?']())) { - result['$<<'](dd.$content())};}; - return result['$<<']("
    2. ");}, $$17.$$s = self, $$17.$$arity = 2, $$17)); - result['$<<']("
    ");} - else if ("horizontal"['$===']($case)) { - slash = self.void_element_slash; - result['$<<'](""); - if ($truthy(($truthy($a = node['$attr?']("labelwidth")) ? $a : node['$attr?']("itemwidth")))) { - - result['$<<'](""); - col_style_attribute = (function() {if ($truthy(node['$attr?']("labelwidth"))) { - return "" + " style=\"width: " + (node.$attr("labelwidth").$chomp("%")) + "%;\"" - } else { - return "" - }; return nil; })(); - result['$<<']("" + ""); - col_style_attribute = (function() {if ($truthy(node['$attr?']("itemwidth"))) { - return "" + " style=\"width: " + (node.$attr("itemwidth").$chomp("%")) + "%;\"" - } else { - return "" - }; return nil; })(); - result['$<<']("" + ""); - result['$<<']("");}; - $send(node.$items(), 'each', [], ($$19 = function(terms, dd){var self = $$19.$$s || this, $$20, first_term = nil; - - - - if (terms == null) { - terms = nil; - }; - - if (dd == null) { - dd = nil; - }; - result['$<<'](""); - result['$<<']("" + ""); - result['$<<'](""); - return result['$<<']("");}, $$19.$$s = self, $$19.$$arity = 2, $$19)); - result['$<<']("
    "); - first_term = true; - $send(terms, 'each', [], ($$20 = function(dt){var self = $$20.$$s || this; - - - - if (dt == null) { - dt = nil; - }; - if ($truthy(first_term)) { - } else { - result['$<<']("" + "") - }; - result['$<<'](dt.$text()); - return (first_term = nil);}, $$20.$$s = self, $$20.$$arity = 1, $$20)); - result['$<<'](""); - if ($truthy(dd)) { - - if ($truthy(dd['$text?']())) { - result['$<<']("" + "

    " + (dd.$text()) + "

    ")}; - if ($truthy(dd['$blocks?']())) { - result['$<<'](dd.$content())};}; - result['$<<']("
    ");} - else { - result['$<<']("
    "); - dt_style_attribute = (function() {if ($truthy(node.$style())) { - return "" - } else { - return " class=\"hdlist1\"" - }; return nil; })(); - $send(node.$items(), 'each', [], ($$21 = function(terms, dd){var self = $$21.$$s || this, $$22; - - - - if (terms == null) { - terms = nil; - }; - - if (dd == null) { - dd = nil; - }; - $send(terms, 'each', [], ($$22 = function(dt){var self = $$22.$$s || this; - - - - if (dt == null) { - dt = nil; - }; - return result['$<<']("" + "" + (dt.$text()) + "");}, $$22.$$s = self, $$22.$$arity = 1, $$22)); - if ($truthy(dd)) { - - result['$<<']("
    "); - if ($truthy(dd['$text?']())) { - result['$<<']("" + "

    " + (dd.$text()) + "

    ")}; - if ($truthy(dd['$blocks?']())) { - result['$<<'](dd.$content())}; - return result['$<<']("
    "); - } else { - return nil - };}, $$21.$$s = self, $$21.$$arity = 2, $$21)); - result['$<<']("
    ");}; - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_dlist$16.$$arity = 1); - - Opal.def(self, '$convert_example', $Html5Converter_convert_example$23 = function $$convert_example(node) { - var self = this, id_attribute = nil, class_attribute = nil, summary_element = nil, title_element = nil, role = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - if ($truthy(node['$option?']("collapsible"))) { - - class_attribute = (function() {if ($truthy(node.$role())) { - return "" + " class=\"" + (node.$role()) + "\"" - } else { - return "" - }; return nil; })(); - summary_element = (function() {if ($truthy(node['$title?']())) { - return "" + "" + (node.$title()) + "" - } else { - return "Details" - }; return nil; })(); - return "" + "\n" + (summary_element) + "\n" + "
    \n" + (node.$content()) + "\n" + "
    \n" + ""; - } else { - - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$captioned_title()) + "
    \n" - } else { - return "" - }; return nil; })(); - return "" + "\n" + (title_element) + "
    \n" + (node.$content()) + "\n" + "
    \n" + ""; - }; - }, $Html5Converter_convert_example$23.$$arity = 1); - - Opal.def(self, '$convert_floating_title', $Html5Converter_convert_floating_title$24 = function $$convert_floating_title(node) { - var self = this, tag_name = nil, id_attribute = nil, classes = nil; - - - tag_name = "" + "h" + ($rb_plus(node.$level(), 1)); - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = [node.$style(), node.$role()].$compact(); - return "" + "<" + (tag_name) + (id_attribute) + " class=\"" + (classes.$join(" ")) + "\">" + (node.$title()) + ""; - }, $Html5Converter_convert_floating_title$24.$$arity = 1); - - Opal.def(self, '$convert_image', $Html5Converter_convert_image$25 = function $$convert_image(node) { - var $a, $b, $c, self = this, target = nil, width_attr = nil, height_attr = nil, svg = nil, obj = nil, img = nil, fallback = nil, id_attr = nil, classes = nil, class_attr = nil, title_el = nil; - - - target = node.$attr("target"); - width_attr = (function() {if ($truthy(node['$attr?']("width"))) { - return "" + " width=\"" + (node.$attr("width")) + "\"" - } else { - return "" - }; return nil; })(); - height_attr = (function() {if ($truthy(node['$attr?']("height"))) { - return "" + " height=\"" + (node.$attr("height")) + "\"" - } else { - return "" - }; return nil; })(); - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = node['$attr?']("format", "svg")) ? $c : target['$include?'](".svg"))) ? $rb_lt(node.$document().$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $b)) ? ($truthy($b = (svg = node['$option?']("inline"))) ? $b : (obj = node['$option?']("interactive"))) : $a))) { - if ($truthy(svg)) { - img = ($truthy($a = self.$read_svg_contents(node, target)) ? $a : "" + "" + (node.$alt()) + "") - } else if ($truthy(obj)) { - - fallback = (function() {if ($truthy(node['$attr?']("fallback"))) { - return "" + "\""" - } else { - return "" + "" + (node.$alt()) + "" - }; return nil; })(); - img = "" + "" + (fallback) + "";}}; - img = ($truthy($a = img) ? $a : "" + "\"""); - if ($truthy(node['$attr?']("link"))) { - img = "" + "" + (img) + ""}; - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["imageblock"]; - if ($truthy(node['$attr?']("float"))) { - classes['$<<'](node.$attr("float"))}; - if ($truthy(node['$attr?']("align"))) { - classes['$<<']("" + "text-" + (node.$attr("align")))}; - if ($truthy(node.$role())) { - classes['$<<'](node.$role())}; - class_attr = "" + " class=\"" + (classes.$join(" ")) + "\""; - title_el = (function() {if ($truthy(node['$title?']())) { - return "" + "\n
    " + (node.$captioned_title()) + "
    " - } else { - return "" - }; return nil; })(); - return "" + "\n" + "
    \n" + (img) + "\n" + "
    " + (title_el) + "\n" + ""; - }, $Html5Converter_convert_image$25.$$arity = 1); - - Opal.def(self, '$convert_listing', $Html5Converter_convert_listing$26 = function $$convert_listing(node) { - var $a, self = this, nowrap = nil, lang = nil, syntax_hl = nil, opts = nil, doc_attrs = nil, $writer = nil, pre_open = nil, pre_close = nil, id_attribute = nil, title_element = nil, role = nil; - - - nowrap = ($truthy($a = node['$option?']("nowrap")) ? $a : node.$document()['$attr?']("prewrap")['$!']()); - if (node.$style()['$==']("source")) { - - lang = node.$attr("language"); - if ($truthy((syntax_hl = node.$document().$syntax_highlighter()))) { - - opts = (function() {if ($truthy(syntax_hl['$highlight?']())) { - return $hash2(["css_mode", "style"], {"css_mode": ($truthy($a = (doc_attrs = node.$document().$attributes())['$[]']("" + (syntax_hl.$name()) + "-css")) ? $a : "class").$to_sym(), "style": doc_attrs['$[]']("" + (syntax_hl.$name()) + "-style")}) - } else { - return $hash2([], {}) - }; return nil; })(); - - $writer = ["nowrap", nowrap]; - $send(opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - - pre_open = "" + "
    ";
    -            pre_close = "
    "; - }; - } else { - - pre_open = "" + ""; - pre_close = ""; - }; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$captioned_title()) + "
    \n" - } else { - return "" - }; return nil; })(); - return "" + "\n" + (title_element) + "
    \n" + ((function() {if ($truthy(syntax_hl)) { - - return syntax_hl.$format(node, lang, opts); - } else { - return $rb_plus($rb_plus(pre_open, ($truthy($a = node.$content()) ? $a : "")), pre_close) - }; return nil; })()) + "\n" + "
    \n" + ""; - }, $Html5Converter_convert_listing$26.$$arity = 1); - - Opal.def(self, '$convert_literal', $Html5Converter_convert_literal$27 = function $$convert_literal(node) { - var $a, self = this, id_attribute = nil, title_element = nil, nowrap = nil, role = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$title()) + "
    \n" - } else { - return "" - }; return nil; })(); - nowrap = ($truthy($a = node.$document()['$attr?']("prewrap")['$!']()) ? $a : node['$option?']("nowrap")); - return "" + "\n" + (title_element) + "
    \n" + "" + (node.$content()) + "\n" + "
    \n" + ""; - }, $Html5Converter_convert_literal$27.$$arity = 1); - - Opal.def(self, '$convert_stem', $Html5Converter_convert_stem$28 = function $$convert_stem(node) { - var $a, $b, $$29, self = this, id_attribute = nil, title_element = nil, style = nil, open = nil, close = nil, equation = nil, br = nil, role = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$title()) + "
    \n" - } else { - return "" - }; return nil; })(); - $b = $$($nesting, 'BLOCK_MATH_DELIMITERS')['$[]']((style = node.$style().$to_sym())), $a = Opal.to_ary($b), (open = ($a[0] == null ? nil : $a[0])), (close = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy((equation = node.$content()))) { - - if ($truthy((($a = style['$==']("asciimath")) ? equation['$include?']($$($nesting, 'LF')) : style['$==']("asciimath")))) { - - br = "" + ($$($nesting, 'LF')) + ""; - equation = $send(equation, 'gsub', [$$($nesting, 'StemBreakRx')], ($$29 = function(){var self = $$29.$$s || this, $c; - - return "" + (close) + ($rb_times(br, $rb_minus((($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$count($$($nesting, 'LF')), 1))) + ($$($nesting, 'LF')) + (open)}, $$29.$$s = self, $$29.$$arity = 0, $$29));}; - if ($truthy(($truthy($a = equation['$start_with?'](open)) ? equation['$end_with?'](close) : $a))) { - } else { - equation = "" + (open) + (equation) + (close) - }; - } else { - equation = "" - }; - return "" + "\n" + (title_element) + "
    \n" + (equation) + "\n" + "
    \n" + ""; - }, $Html5Converter_convert_stem$28.$$arity = 1); - - Opal.def(self, '$convert_olist', $Html5Converter_convert_olist$30 = function $$convert_olist(node) { - var $$31, self = this, result = nil, id_attribute = nil, classes = nil, class_attribute = nil, type_attribute = nil, keyword = nil, start_attribute = nil, reversed_attribute = nil; - - - result = []; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["olist", node.$style(), node.$role()].$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - result['$<<']("" + ""); - if ($truthy(node['$title?']())) { - result['$<<']("" + "
    " + (node.$title()) + "
    ")}; - type_attribute = (function() {if ($truthy((keyword = node.$list_marker_keyword()))) { - return "" + " type=\"" + (keyword) + "\"" - } else { - return "" - }; return nil; })(); - start_attribute = (function() {if ($truthy(node['$attr?']("start"))) { - return "" + " start=\"" + (node.$attr("start")) + "\"" - } else { - return "" - }; return nil; })(); - reversed_attribute = (function() {if ($truthy(node['$option?']("reversed"))) { - - return self.$append_boolean_attribute("reversed", self.xml_mode); - } else { - return "" - }; return nil; })(); - result['$<<']("" + "
      "); - $send(node.$items(), 'each', [], ($$31 = function(item){var self = $$31.$$s || this; - - - - if (item == null) { - item = nil; - }; - if ($truthy(item.$id())) { - result['$<<']("" + "
    1. ") - } else if ($truthy(item.$role())) { - result['$<<']("" + "
    2. ") - } else { - result['$<<']("
    3. ") - }; - result['$<<']("" + "

      " + (item.$text()) + "

      "); - if ($truthy(item['$blocks?']())) { - result['$<<'](item.$content())}; - return result['$<<']("
    4. ");}, $$31.$$s = self, $$31.$$arity = 1, $$31)); - result['$<<']("
    "); - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_olist$30.$$arity = 1); - - Opal.def(self, '$convert_open', $Html5Converter_convert_open$32 = function $$convert_open(node) { - var $a, $b, $c, self = this, style = nil, id_attr = nil, title_el = nil, role = nil; - - if ((style = node.$style())['$==']("abstract")) { - if ($truthy((($a = node.$parent()['$=='](node.$document())) ? node.$document().$doctype()['$==']("book") : node.$parent()['$=='](node.$document())))) { - - self.$logger().$warn("abstract block cannot be used in a document without a title when doctype is book. Excluding block content."); - return ""; - } else { - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_el = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$title()) + "
    \n" - } else { - return "" - }; return nil; })(); - return "" + "\n" + (title_el) + "
    \n" + (node.$content()) + "\n" + "
    \n" + ""; - } - } else if ($truthy((($a = style['$==']("partintro")) ? ($truthy($b = ($truthy($c = $rb_gt(node.$level(), 0)) ? $c : node.$parent().$context()['$!=']("section"))) ? $b : node.$document().$doctype()['$!=']("book")) : style['$==']("partintro")))) { - - self.$logger().$error("partintro block can only be used when doctype is book and must be a child of a book part. Excluding block content."); - return ""; - } else { - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_el = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$title()) + "
    \n" - } else { - return "" - }; return nil; })(); - return "" + "" - }, $Html5Converter_convert_page_break$33.$$arity = 1); - - Opal.def(self, '$convert_paragraph', $Html5Converter_convert_paragraph$34 = function $$convert_paragraph(node) { - var self = this, attributes = nil; - - - if ($truthy(node.$role())) { - attributes = "" + ((function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })()) + " class=\"paragraph " + (node.$role()) + "\"" - } else if ($truthy(node.$id())) { - attributes = "" + " id=\"" + (node.$id()) + "\" class=\"paragraph\"" - } else { - attributes = " class=\"paragraph\"" - }; - if ($truthy(node['$title?']())) { - return "" + "\n" + "
    " + (node.$title()) + "
    \n" + "

    " + (node.$content()) + "

    \n" + "" - } else { - return "" + "\n" + "

    " + (node.$content()) + "

    \n" + "" - }; - }, $Html5Converter_convert_paragraph$34.$$arity = 1); - Opal.alias(self, "convert_pass", "content_only"); - - Opal.def(self, '$convert_preamble', $Html5Converter_convert_preamble$35 = function $$convert_preamble(node) { - var $a, $b, self = this, doc = nil, toc = nil; - - - if ($truthy(($truthy($a = ($truthy($b = (doc = node.$document())['$attr?']("toc-placement", "preamble")) ? doc['$sections?']() : $b)) ? doc['$attr?']("toc") : $a))) { - toc = "" + "\n" + "
    \n" + "
    " + (doc.$attr("toc-title")) + "
    \n" + (doc.$converter().$convert(doc, "outline")) + "\n" + "
    " - } else { - toc = "" - }; - return "" + "
    \n" + "
    \n" + (node.$content()) + "\n" + "
    " + (toc) + "\n" + "
    "; - }, $Html5Converter_convert_preamble$35.$$arity = 1); - - Opal.def(self, '$convert_quote', $Html5Converter_convert_quote$36 = function $$convert_quote(node) { - var $a, self = this, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, attribution = nil, citetitle = nil, cite_element = nil, attribution_text = nil, attribution_element = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["quoteblock", node.$role()].$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "\n
    " + (node.$title()) + "
    " - } else { - return "" - }; return nil; })(); - attribution = (function() {if ($truthy(node['$attr?']("attribution"))) { - - return node.$attr("attribution"); - } else { - return nil - }; return nil; })(); - citetitle = (function() {if ($truthy(node['$attr?']("citetitle"))) { - - return node.$attr("citetitle"); - } else { - return nil - }; return nil; })(); - if ($truthy(($truthy($a = attribution) ? $a : citetitle))) { - - cite_element = (function() {if ($truthy(citetitle)) { - return "" + "" + (citetitle) + "" - } else { - return "" - }; return nil; })(); - attribution_text = (function() {if ($truthy(attribution)) { - return "" + "— " + (attribution) + ((function() {if ($truthy(citetitle)) { - return "" + "\n" - } else { - return "" - }; return nil; })()) - } else { - return "" - }; return nil; })(); - attribution_element = "" + "\n
    \n" + (attribution_text) + (cite_element) + "\n
    "; - } else { - attribution_element = "" - }; - return "" + "" + (title_element) + "\n" + "
    \n" + (node.$content()) + "\n" + "
    " + (attribution_element) + "\n" + ""; - }, $Html5Converter_convert_quote$36.$$arity = 1); - - Opal.def(self, '$convert_thematic_break', $Html5Converter_convert_thematic_break$37 = function $$convert_thematic_break(node) { - var self = this; - - return "" + "" - }, $Html5Converter_convert_thematic_break$37.$$arity = 1); - - Opal.def(self, '$convert_sidebar', $Html5Converter_convert_sidebar$38 = function $$convert_sidebar(node) { - var self = this, id_attribute = nil, title_element = nil, role = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$title()) + "
    \n" - } else { - return "" - }; return nil; })(); - return "" + "\n" + "
    \n" + (title_element) + (node.$content()) + "\n" + "
    \n" + ""; - }, $Html5Converter_convert_sidebar$38.$$arity = 1); - - Opal.def(self, '$convert_table', $Html5Converter_convert_table$39 = function $$convert_table(node) { - var $a, $$40, $$41, self = this, result = nil, id_attribute = nil, frame = nil, classes = nil, stripes = nil, styles = nil, autowidth = nil, tablewidth = nil, role = nil, class_attribute = nil, style_attribute = nil, slash = nil; - - - result = []; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - if ((frame = node.$attr("frame", "all", "table-frame"))['$==']("topbot")) { - frame = "ends"}; - classes = ["tableblock", "" + "frame-" + (frame), "" + "grid-" + (node.$attr("grid", "all", "table-grid"))]; - if ($truthy((stripes = node.$attr("stripes", nil, "table-stripes")))) { - classes['$<<']("" + "stripes-" + (stripes))}; - styles = []; - if ($truthy(($truthy($a = (autowidth = node['$option?']("autowidth"))) ? node['$attr?']("width")['$!']() : $a))) { - classes['$<<']("fit-content") - } else if ((tablewidth = node.$attr("tablepcwidth"))['$=='](100)) { - classes['$<<']("stretch") - } else { - styles['$<<']("" + "width: " + (tablewidth) + "%;") - }; - if ($truthy(node['$attr?']("float"))) { - classes['$<<'](node.$attr("float"))}; - if ($truthy((role = node.$role()))) { - classes['$<<'](role)}; - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - style_attribute = (function() {if ($truthy(styles['$empty?']())) { - return "" - } else { - return "" + " style=\"" + (styles.$join(" ")) + "\"" - }; return nil; })(); - result['$<<']("" + ""); - if ($truthy(node['$title?']())) { - result['$<<']("" + "" + (node.$captioned_title()) + "")}; - if ($truthy($rb_gt(node.$attr("rowcount"), 0))) { - - slash = self.void_element_slash; - result['$<<'](""); - if ($truthy(autowidth)) { - result = $rb_plus(result, $$($nesting, 'Array').$new(node.$columns().$size(), "" + "")) - } else { - $send(node.$columns(), 'each', [], ($$40 = function(col){var self = $$40.$$s || this; - - - - if (col == null) { - col = nil; - }; - return result['$<<']((function() {if ($truthy(col['$option?']("autowidth"))) { - return "" + "" - } else { - return "" + "" - }; return nil; })());}, $$40.$$s = self, $$40.$$arity = 1, $$40)) - }; - result['$<<'](""); - $send(node.$rows().$to_h(), 'each', [], ($$41 = function(tsec, rows){var self = $$41.$$s || this, $$42; - - - - if (tsec == null) { - tsec = nil; - }; - - if (rows == null) { - rows = nil; - }; - if ($truthy(rows['$empty?']())) { - return nil;}; - result['$<<']("" + ""); - $send(rows, 'each', [], ($$42 = function(row){var self = $$42.$$s || this, $$43; - - - - if (row == null) { - row = nil; - }; - result['$<<'](""); - $send(row, 'each', [], ($$43 = function(cell){var self = $$43.$$s || this, $b, cell_content = nil, $case = nil, cell_tag_name = nil, cell_class_attribute = nil, cell_colspan_attribute = nil, cell_rowspan_attribute = nil, cell_style_attribute = nil; - - - - if (cell == null) { - cell = nil; - }; - if (tsec['$==']("head")) { - cell_content = cell.$text() - } else { - $case = cell.$style(); - if ("asciidoc"['$===']($case)) {cell_content = "" + "
    " + (cell.$content()) + "
    "} - else if ("literal"['$===']($case)) {cell_content = "" + "
    " + (cell.$text()) + "
    "} - else {cell_content = (function() {if ($truthy((cell_content = cell.$content())['$empty?']())) { - return "" - } else { - return "" + "

    " + (cell_content.$join("" + "

    \n" + "

    ")) + "

    " - }; return nil; })()} - }; - cell_tag_name = (function() {if ($truthy(($truthy($b = tsec['$==']("head")) ? $b : cell.$style()['$==']("header")))) { - return "th" - } else { - return "td" - }; return nil; })(); - cell_class_attribute = "" + " class=\"tableblock halign-" + (cell.$attr("halign")) + " valign-" + (cell.$attr("valign")) + "\""; - cell_colspan_attribute = (function() {if ($truthy(cell.$colspan())) { - return "" + " colspan=\"" + (cell.$colspan()) + "\"" - } else { - return "" - }; return nil; })(); - cell_rowspan_attribute = (function() {if ($truthy(cell.$rowspan())) { - return "" + " rowspan=\"" + (cell.$rowspan()) + "\"" - } else { - return "" - }; return nil; })(); - cell_style_attribute = (function() {if ($truthy(node.$document()['$attr?']("cellbgcolor"))) { - return "" + " style=\"background-color: " + (node.$document().$attr("cellbgcolor")) + ";\"" - } else { - return "" - }; return nil; })(); - return result['$<<']("" + "<" + (cell_tag_name) + (cell_class_attribute) + (cell_colspan_attribute) + (cell_rowspan_attribute) + (cell_style_attribute) + ">" + (cell_content) + "");}, $$43.$$s = self, $$43.$$arity = 1, $$43)); - return result['$<<']("");}, $$42.$$s = self, $$42.$$arity = 1, $$42)); - return result['$<<']("" + "
    ");}, $$41.$$s = self, $$41.$$arity = 2, $$41));}; - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_table$39.$$arity = 1); - - Opal.def(self, '$convert_toc', $Html5Converter_convert_toc$44 = function $$convert_toc(node) { - var $a, $b, self = this, doc = nil, id_attr = nil, title_id_attr = nil, title = nil, levels = nil, role = nil; - - - if ($truthy(($truthy($a = ($truthy($b = (doc = node.$document())['$attr?']("toc-placement", "macro")) ? doc['$sections?']() : $b)) ? doc['$attr?']("toc") : $a))) { - } else { - return "" - }; - if ($truthy(node.$id())) { - - id_attr = "" + " id=\"" + (node.$id()) + "\""; - title_id_attr = "" + " id=\"" + (node.$id()) + "title\""; - } else { - - id_attr = " id=\"toc\""; - title_id_attr = " id=\"toctitle\""; - }; - title = (function() {if ($truthy(node['$title?']())) { - return node.$title() - } else { - - return doc.$attr("toc-title"); - }; return nil; })(); - levels = (function() {if ($truthy(node['$attr?']("levels"))) { - return node.$attr("levels").$to_i() - } else { - return nil - }; return nil; })(); - role = (function() {if ($truthy(node['$role?']())) { - return node.$role() - } else { - - return doc.$attr("toc-class", "toc"); - }; return nil; })(); - return "" + "\n" + "" + (title) + "\n" + (doc.$converter().$convert(doc, "outline", $hash2(["toclevels"], {"toclevels": levels}))) + "\n" + ""; - }, $Html5Converter_convert_toc$44.$$arity = 1); - - Opal.def(self, '$convert_ulist', $Html5Converter_convert_ulist$45 = function $$convert_ulist(node) { - var $$46, self = this, result = nil, id_attribute = nil, div_classes = nil, marker_checked = nil, marker_unchecked = nil, checklist = nil, ul_class_attribute = nil; - - - result = []; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - div_classes = ["ulist", node.$style(), node.$role()].$compact(); - marker_checked = (marker_unchecked = ""); - if ($truthy((checklist = node['$option?']("checklist")))) { - - div_classes.$unshift(div_classes.$shift(), "checklist"); - ul_class_attribute = " class=\"checklist\""; - if ($truthy(node['$option?']("interactive"))) { - if ($truthy(self.xml_mode)) { - - marker_checked = " "; - marker_unchecked = " "; - } else { - - marker_checked = " "; - marker_unchecked = " "; - } - } else if ($truthy(node.$document()['$attr?']("icons", "font"))) { - - marker_checked = " "; - marker_unchecked = " "; - } else { - - marker_checked = "✓ "; - marker_unchecked = "❏ "; - }; - } else { - ul_class_attribute = (function() {if ($truthy(node.$style())) { - return "" + " class=\"" + (node.$style()) + "\"" - } else { - return "" - }; return nil; })() - }; - result['$<<']("" + ""); - if ($truthy(node['$title?']())) { - result['$<<']("" + "
    " + (node.$title()) + "
    ")}; - result['$<<']("" + ""); - $send(node.$items(), 'each', [], ($$46 = function(item){var self = $$46.$$s || this, $a; - - - - if (item == null) { - item = nil; - }; - if ($truthy(item.$id())) { - result['$<<']("" + "
  • ") - } else if ($truthy(item.$role())) { - result['$<<']("" + "
  • ") - } else { - result['$<<']("
  • ") - }; - if ($truthy(($truthy($a = checklist) ? item['$attr?']("checkbox") : $a))) { - result['$<<']("" + "

    " + ((function() {if ($truthy(item['$attr?']("checked"))) { - return marker_checked - } else { - return marker_unchecked - }; return nil; })()) + (item.$text()) + "

    ") - } else { - result['$<<']("" + "

    " + (item.$text()) + "

    ") - }; - if ($truthy(item['$blocks?']())) { - result['$<<'](item.$content())}; - return result['$<<']("
  • ");}, $$46.$$s = self, $$46.$$arity = 1, $$46)); - result['$<<'](""); - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_ulist$45.$$arity = 1); - - Opal.def(self, '$convert_verse', $Html5Converter_convert_verse$47 = function $$convert_verse(node) { - var $a, self = this, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, attribution = nil, citetitle = nil, cite_element = nil, attribution_text = nil, attribution_element = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["verseblock", node.$role()].$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "\n
    " + (node.$title()) + "
    " - } else { - return "" - }; return nil; })(); - attribution = (function() {if ($truthy(node['$attr?']("attribution"))) { - - return node.$attr("attribution"); - } else { - return nil - }; return nil; })(); - citetitle = (function() {if ($truthy(node['$attr?']("citetitle"))) { - - return node.$attr("citetitle"); - } else { - return nil - }; return nil; })(); - if ($truthy(($truthy($a = attribution) ? $a : citetitle))) { - - cite_element = (function() {if ($truthy(citetitle)) { - return "" + "" + (citetitle) + "" - } else { - return "" - }; return nil; })(); - attribution_text = (function() {if ($truthy(attribution)) { - return "" + "— " + (attribution) + ((function() {if ($truthy(citetitle)) { - return "" + "\n" - } else { - return "" - }; return nil; })()) - } else { - return "" - }; return nil; })(); - attribution_element = "" + "\n
    \n" + (attribution_text) + (cite_element) + "\n
    "; - } else { - attribution_element = "" - }; - return "" + "" + (title_element) + "\n" + "
    " + (node.$content()) + "
    " + (attribution_element) + "\n" + ""; - }, $Html5Converter_convert_verse$47.$$arity = 1); - - Opal.def(self, '$convert_video', $Html5Converter_convert_video$48 = function $$convert_video(node) { - var $a, $b, self = this, xml = nil, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, width_attribute = nil, height_attribute = nil, $case = nil, asset_uri_scheme = nil, start_anchor = nil, delimiter = nil, autoplay_param = nil, loop_param = nil, muted_param = nil, rel_param_val = nil, start_param = nil, end_param = nil, has_loop_param = nil, mute_param = nil, controls_param = nil, fs_param = nil, fs_attribute = nil, modest_param = nil, theme_param = nil, hl_param = nil, target = nil, list = nil, list_param = nil, playlist = nil, poster_attribute = nil, val = nil, preload_attribute = nil, start_t = nil, end_t = nil, time_anchor = nil; - - - xml = self.xml_mode; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["videoblock"]; - if ($truthy(node['$attr?']("float"))) { - classes['$<<'](node.$attr("float"))}; - if ($truthy(node['$attr?']("align"))) { - classes['$<<']("" + "text-" + (node.$attr("align")))}; - if ($truthy(node.$role())) { - classes['$<<'](node.$role())}; - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "\n
    " + (node.$title()) + "
    " - } else { - return "" - }; return nil; })(); - width_attribute = (function() {if ($truthy(node['$attr?']("width"))) { - return "" + " width=\"" + (node.$attr("width")) + "\"" - } else { - return "" - }; return nil; })(); - height_attribute = (function() {if ($truthy(node['$attr?']("height"))) { - return "" + " height=\"" + (node.$attr("height")) + "\"" - } else { - return "" - }; return nil; })(); - return (function() {$case = node.$attr("poster"); - if ("vimeo"['$===']($case)) { - if ($truthy((asset_uri_scheme = node.$document().$attr("asset-uri-scheme", "https"))['$empty?']())) { - } else { - asset_uri_scheme = "" + (asset_uri_scheme) + ":" - }; - start_anchor = (function() {if ($truthy(node['$attr?']("start"))) { - return "" + "#at=" + (node.$attr("start")) - } else { - return "" - }; return nil; })(); - delimiter = ["?"]; - autoplay_param = (function() {if ($truthy(node['$option?']("autoplay"))) { - return "" + (($truthy($a = delimiter.$pop()) ? $a : "&")) + "autoplay=1" - } else { - return "" - }; return nil; })(); - loop_param = (function() {if ($truthy(node['$option?']("loop"))) { - return "" + (($truthy($a = delimiter.$pop()) ? $a : "&")) + "loop=1" - } else { - return "" - }; return nil; })(); - muted_param = (function() {if ($truthy(node['$option?']("muted"))) { - return "" + (($truthy($a = delimiter.$pop()) ? $a : "&")) + "muted=1" - } else { - return "" - }; return nil; })(); - return "" + "" + (title_element) + "\n" + "
    \n" + "\n" + "
    \n" + "";} - else if ("youtube"['$===']($case)) { - if ($truthy((asset_uri_scheme = node.$document().$attr("asset-uri-scheme", "https"))['$empty?']())) { - } else { - asset_uri_scheme = "" + (asset_uri_scheme) + ":" - }; - rel_param_val = (function() {if ($truthy(node['$option?']("related"))) { - return 1 - } else { - return 0 - }; return nil; })(); - start_param = (function() {if ($truthy(node['$attr?']("start"))) { - return "" + "&start=" + (node.$attr("start")) - } else { - return "" - }; return nil; })(); - end_param = (function() {if ($truthy(node['$attr?']("end"))) { - return "" + "&end=" + (node.$attr("end")) - } else { - return "" - }; return nil; })(); - autoplay_param = (function() {if ($truthy(node['$option?']("autoplay"))) { - return "&autoplay=1" - } else { - return "" - }; return nil; })(); - loop_param = (function() {if ($truthy((has_loop_param = node['$option?']("loop")))) { - return "&loop=1" - } else { - return "" - }; return nil; })(); - mute_param = (function() {if ($truthy(node['$option?']("muted"))) { - return "&mute=1" - } else { - return "" - }; return nil; })(); - controls_param = (function() {if ($truthy(node['$option?']("nocontrols"))) { - return "&controls=0" - } else { - return "" - }; return nil; })(); - if ($truthy(node['$option?']("nofullscreen"))) { - - fs_param = "&fs=0"; - fs_attribute = ""; - } else { - - fs_param = ""; - fs_attribute = self.$append_boolean_attribute("allowfullscreen", xml); - }; - modest_param = (function() {if ($truthy(node['$option?']("modest"))) { - return "&modestbranding=1" - } else { - return "" - }; return nil; })(); - theme_param = (function() {if ($truthy(node['$attr?']("theme"))) { - return "" + "&theme=" + (node.$attr("theme")) - } else { - return "" - }; return nil; })(); - hl_param = (function() {if ($truthy(node['$attr?']("lang"))) { - return "" + "&hl=" + (node.$attr("lang")) - } else { - return "" - }; return nil; })(); - $b = node.$attr("target").$split("/", 2), $a = Opal.to_ary($b), (target = ($a[0] == null ? nil : $a[0])), (list = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy((list = ($truthy($a = list) ? $a : node.$attr("list"))))) { - list_param = "" + "&list=" + (list) - } else { - - $b = target.$split(",", 2), $a = Opal.to_ary($b), (target = ($a[0] == null ? nil : $a[0])), (playlist = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy((playlist = ($truthy($a = playlist) ? $a : node.$attr("playlist"))))) { - list_param = "" + "&playlist=" + (playlist) - } else { - list_param = (function() {if ($truthy(has_loop_param)) { - return "" + "&playlist=" + (target) - } else { - return "" - }; return nil; })() - }; - }; - return "" + "" + (title_element) + "\n" + "
    \n" + "\n" + "
    \n" + "";} - else { - poster_attribute = (function() {if ($truthy((val = node.$attr("poster"))['$nil_or_empty?']())) { - return "" - } else { - return "" + " poster=\"" + (node.$media_uri(val)) + "\"" - }; return nil; })(); - preload_attribute = (function() {if ($truthy((val = node.$attr("preload"))['$nil_or_empty?']())) { - return "" - } else { - return "" + " preload=\"" + (val) + "\"" - }; return nil; })(); - start_t = node.$attr("start"); - end_t = node.$attr("end"); - time_anchor = (function() {if ($truthy(($truthy($a = start_t) ? $a : end_t))) { - return "" + "#t=" + (($truthy($a = start_t) ? $a : "")) + ((function() {if ($truthy(end_t)) { - return "" + "," + (end_t) - } else { - return "" - }; return nil; })()) - } else { - return "" - }; return nil; })(); - return "" + "" + (title_element) + "\n" + "
    \n" + "\n" + "
    \n" + "";}})(); - }, $Html5Converter_convert_video$48.$$arity = 1); - - Opal.def(self, '$convert_inline_anchor', $Html5Converter_convert_inline_anchor$49 = function $$convert_inline_anchor(node) { - var $a, $b, self = this, $case = nil, path = nil, attrs = nil, text = nil, ref = nil, refid = nil, top = nil, outer = nil; - - return (function() {$case = node.$type(); - if ("xref"['$===']($case)) { - if ($truthy((path = node.$attributes()['$[]']("path")))) { - - attrs = self.$append_link_constraint_attrs(node, (function() {if ($truthy(node.$role())) { - return ["" + " class=\"" + (node.$role()) + "\""] - } else { - return [] - }; return nil; })()).$join(); - text = ($truthy($a = node.$text()) ? $a : path); - } else { - - attrs = (function() {if ($truthy(node.$role())) { - return "" + " class=\"" + (node.$role()) + "\"" - } else { - return "" - }; return nil; })(); - if ($truthy((text = node.$text()))) { - } else if ($truthy($$($nesting, 'AbstractNode')['$===']((ref = ($truthy($a = (self.refs = ($truthy($b = self.refs) ? $b : node.$document().$catalog()['$[]']("refs")))['$[]']((refid = node.$attributes()['$[]']("refid")))) ? $a : (function() {if ($truthy(refid['$nil_or_empty?']())) { - - return (top = self.$get_root_document(node)); - } else { - return nil - }; return nil; })()))))) { - if ($truthy(($truthy($a = (self.resolving_xref = ($truthy($b = self.resolving_xref) ? $b : (outer = true)))) ? outer : $a))) { - - if ($truthy((text = ref.$xreftext(node.$attr("xrefstyle", nil, true))))) { - if ($truthy(text['$include?']("" + (text) + "";} - else if ("ref"['$===']($case)) {return "" + ""} - else if ("link"['$===']($case)) { - attrs = (function() {if ($truthy(node.$id())) { - return ["" + " id=\"" + (node.$id()) + "\""] - } else { - return [] - }; return nil; })(); - if ($truthy(node.$role())) { - attrs['$<<']("" + " class=\"" + (node.$role()) + "\"")}; - if ($truthy(node['$attr?']("title"))) { - attrs['$<<']("" + " title=\"" + (node.$attr("title")) + "\"")}; - return "" + "" + (node.$text()) + "";} - else if ("bibref"['$===']($case)) {return "" + "[" + (($truthy($a = node.$reftext()) ? $a : node.$id())) + "]"} - else { - self.$logger().$warn("" + "unknown anchor type: " + (node.$type().$inspect())); - return nil;}})() - }, $Html5Converter_convert_inline_anchor$49.$$arity = 1); - - Opal.def(self, '$convert_inline_break', $Html5Converter_convert_inline_break$50 = function $$convert_inline_break(node) { - var self = this; - - return "" + (node.$text()) + "" - }, $Html5Converter_convert_inline_break$50.$$arity = 1); - - Opal.def(self, '$convert_inline_button', $Html5Converter_convert_inline_button$51 = function $$convert_inline_button(node) { - var self = this; - - return "" + "" + (node.$text()) + "" - }, $Html5Converter_convert_inline_button$51.$$arity = 1); - - Opal.def(self, '$convert_inline_callout', $Html5Converter_convert_inline_callout$52 = function $$convert_inline_callout(node) { - var self = this, src = nil, guard = nil; - - if ($truthy(node.$document()['$attr?']("icons", "font"))) { - return "" + "(" + (node.$text()) + ")" - } else if ($truthy(node.$document()['$attr?']("icons"))) { - - src = node.$icon_uri("" + "callouts/" + (node.$text())); - return "" + "\"""; - } else if ($truthy($$$('::', 'Array')['$===']((guard = node.$attributes()['$[]']("guard"))))) { - return "" + "<!--(" + (node.$text()) + ")-->" - } else { - return "" + (guard) + "(" + (node.$text()) + ")" - } - }, $Html5Converter_convert_inline_callout$52.$$arity = 1); - - Opal.def(self, '$convert_inline_footnote', $Html5Converter_convert_inline_footnote$53 = function $$convert_inline_footnote(node) { - var self = this, index = nil, id_attr = nil; - - if ($truthy((index = node.$attr("index")))) { - if (node.$type()['$==']("xref")) { - return "" + "[" + (index) + "]" - } else { - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"_footnote_" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - return "" + "[" + (index) + "]"; - } - } else if (node.$type()['$==']("xref")) { - return "" + "[" + (node.$text()) + "]" - } else { - return nil - } - }, $Html5Converter_convert_inline_footnote$53.$$arity = 1); - - Opal.def(self, '$convert_inline_image', $Html5Converter_convert_inline_image$54 = function $$convert_inline_image(node) { - var $a, $b, $$55, $$56, $c, $d, self = this, type = nil, class_attr_val = nil, title_attr = nil, img = nil, target = nil, attrs = nil, svg = nil, obj = nil, fallback = nil, role = nil; - - - if ($truthy((($a = (type = ($truthy($b = node.$type()) ? $b : "image"))['$==']("icon")) ? node.$document()['$attr?']("icons", "font") : (type = ($truthy($b = node.$type()) ? $b : "image"))['$==']("icon")))) { - - class_attr_val = "" + "fa fa-" + (node.$target()); - $send($hash2(["size", "rotate", "flip"], {"size": "fa-", "rotate": "fa-rotate-", "flip": "fa-flip-"}), 'each', [], ($$55 = function(key, prefix){var self = $$55.$$s || this; - - - - if (key == null) { - key = nil; - }; - - if (prefix == null) { - prefix = nil; - }; - if ($truthy(node['$attr?'](key))) { - return (class_attr_val = "" + (class_attr_val) + " " + (prefix) + (node.$attr(key))) - } else { - return nil - };}, $$55.$$s = self, $$55.$$arity = 2, $$55)); - title_attr = (function() {if ($truthy(node['$attr?']("title"))) { - return "" + " title=\"" + (node.$attr("title")) + "\"" - } else { - return "" - }; return nil; })(); - img = "" + ""; - } else if ($truthy((($a = type['$==']("icon")) ? node.$document()['$attr?']("icons")['$!']() : type['$==']("icon")))) { - img = "" + "[" + (node.$alt()) + "]" - } else { - - target = node.$target(); - attrs = $send(["width", "height", "title"], 'map', [], ($$56 = function(name){var self = $$56.$$s || this; - - - - if (name == null) { - name = nil; - }; - if ($truthy(node['$attr?'](name))) { - return "" + " " + (name) + "=\"" + (node.$attr(name)) + "\"" - } else { - return "" - };}, $$56.$$s = self, $$56.$$arity = 1, $$56)).$join(); - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = type['$!=']("icon")) ? ($truthy($d = node['$attr?']("format", "svg")) ? $d : target['$include?'](".svg")) : $c)) ? $rb_lt(node.$document().$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $b)) ? ($truthy($b = (svg = node['$option?']("inline"))) ? $b : (obj = node['$option?']("interactive"))) : $a))) { - if ($truthy(svg)) { - img = ($truthy($a = self.$read_svg_contents(node, target)) ? $a : "" + "" + (node.$alt()) + "") - } else if ($truthy(obj)) { - - fallback = (function() {if ($truthy(node['$attr?']("fallback"))) { - return "" + "\""" - } else { - return "" + "" + (node.$alt()) + "" - }; return nil; })(); - img = "" + "" + (fallback) + "";}}; - img = ($truthy($a = img) ? $a : "" + "\"""); - }; - if ($truthy(node['$attr?']("link"))) { - img = "" + "" + (img) + ""}; - if ($truthy((role = node.$role()))) { - if ($truthy(node['$attr?']("float"))) { - class_attr_val = "" + (type) + " " + (node.$attr("float")) + " " + (role) - } else { - class_attr_val = "" + (type) + " " + (role) - } - } else if ($truthy(node['$attr?']("float"))) { - class_attr_val = "" + (type) + " " + (node.$attr("float")) - } else { - class_attr_val = type - }; - return "" + "" + (img) + ""; - }, $Html5Converter_convert_inline_image$54.$$arity = 1); - - Opal.def(self, '$convert_inline_indexterm', $Html5Converter_convert_inline_indexterm$57 = function $$convert_inline_indexterm(node) { - var self = this; - - if (node.$type()['$==']("visible")) { - return node.$text() - } else { - return "" - } - }, $Html5Converter_convert_inline_indexterm$57.$$arity = 1); - - Opal.def(self, '$convert_inline_kbd', $Html5Converter_convert_inline_kbd$58 = function $$convert_inline_kbd(node) { - var self = this, keys = nil; - - if ((keys = node.$attr("keys")).$size()['$=='](1)) { - return "" + "" + (keys['$[]'](0)) + "" - } else { - return "" + "" + (keys.$join("+")) + "" - } - }, $Html5Converter_convert_inline_kbd$58.$$arity = 1); - - Opal.def(self, '$convert_inline_menu', $Html5Converter_convert_inline_menu$59 = function $$convert_inline_menu(node) { - var self = this, caret = nil, submenu_joiner = nil, menu = nil, submenus = nil, menuitem = nil; - - - caret = (function() {if ($truthy(node.$document()['$attr?']("icons", "font"))) { - return "  " - } else { - return "  " - }; return nil; })(); - submenu_joiner = "" + "
    " + (caret) + ""; - menu = node.$attr("menu"); - if ($truthy((submenus = node.$attr("submenus"))['$empty?']())) { - if ($truthy((menuitem = node.$attr("menuitem")))) { - return "" + "" + (menu) + "" + (caret) + "" + (menuitem) + "" - } else { - return "" + "" + (menu) + "" - } - } else { - return "" + "" + (menu) + "" + (caret) + "" + (submenus.$join(submenu_joiner)) + "" + (caret) + "" + (node.$attr("menuitem")) + "" - }; - }, $Html5Converter_convert_inline_menu$59.$$arity = 1); - - Opal.def(self, '$convert_inline_quoted', $Html5Converter_convert_inline_quoted$60 = function $$convert_inline_quoted(node) { - var $a, $b, self = this, open = nil, close = nil, tag = nil, class_attr = nil; - - - $b = $$($nesting, 'QUOTE_TAGS')['$[]'](node.$type()), $a = Opal.to_ary($b), (open = ($a[0] == null ? nil : $a[0])), (close = ($a[1] == null ? nil : $a[1])), (tag = ($a[2] == null ? nil : $a[2])), $b; - if ($truthy(node.$id())) { - - class_attr = (function() {if ($truthy(node.$role())) { - return "" + " class=\"" + (node.$role()) + "\"" - } else { - return "" - }; return nil; })(); - if ($truthy(tag)) { - return "" + (open.$chop()) + " id=\"" + (node.$id()) + "\"" + (class_attr) + ">" + (node.$text()) + (close) - } else { - return "" + "" + (open) + (node.$text()) + (close) + "" - }; - } else if ($truthy(node.$role())) { - if ($truthy(tag)) { - return "" + (open.$chop()) + " class=\"" + (node.$role()) + "\">" + (node.$text()) + (close) - } else { - return "" + "" + (open) + (node.$text()) + (close) + "" - } - } else { - return "" + (open) + (node.$text()) + (close) - }; - }, $Html5Converter_convert_inline_quoted$60.$$arity = 1); - - Opal.def(self, '$read_svg_contents', $Html5Converter_read_svg_contents$61 = function $$read_svg_contents(node, target) { - var $$62, self = this, svg = nil, old_start_tag = nil, new_start_tag = nil, start_tag_match = nil; - - - if ($truthy((svg = node.$read_contents(target, $hash2(["start", "normalize", "label", "warn_if_empty"], {"start": node.$document().$attr("imagesdir"), "normalize": true, "label": "SVG", "warn_if_empty": true}))))) { - - if ($truthy(svg['$empty?']())) { - return nil}; - if ($truthy(svg['$start_with?']("");}, $$62.$$s = self, $$62.$$arity = 1, $$62)); - if ($truthy(new_start_tag)) { - svg = "" + (new_start_tag) + (svg['$[]'](Opal.Range.$new(old_start_tag.$length(), -1, false)))};}; - return svg; - }, $Html5Converter_read_svg_contents$61.$$arity = 2); - self.$private(); - - Opal.def(self, '$append_boolean_attribute', $Html5Converter_append_boolean_attribute$63 = function $$append_boolean_attribute(name, xml) { - var self = this; - - if ($truthy(xml)) { - return "" + " " + (name) + "=\"" + (name) + "\"" - } else { - return "" + " " + (name) - } - }, $Html5Converter_append_boolean_attribute$63.$$arity = 2); - - Opal.def(self, '$append_link_constraint_attrs', $Html5Converter_append_link_constraint_attrs$64 = function $$append_link_constraint_attrs(node, attrs) { - var $a, self = this, rel = nil, window = nil; - - - - if (attrs == null) { - attrs = []; - }; - if ($truthy(node['$option?']("nofollow"))) { - rel = "nofollow"}; - if ($truthy((window = node.$attributes()['$[]']("window")))) { - - attrs['$<<']("" + " target=\"" + (window) + "\""); - if ($truthy(($truthy($a = window['$==']("_blank")) ? $a : node['$option?']("noopener")))) { - attrs['$<<']((function() {if ($truthy(rel)) { - return "" + " rel=\"" + (rel) + " noopener\"" - } else { - return " rel=\"noopener\"" - }; return nil; })())}; - } else if ($truthy(rel)) { - attrs['$<<']("" + " rel=\"" + (rel) + "\"")}; - return attrs; - }, $Html5Converter_append_link_constraint_attrs$64.$$arity = -2); - - Opal.def(self, '$encode_attribute_value', $Html5Converter_encode_attribute_value$65 = function $$encode_attribute_value(val) { - var self = this; - - if ($truthy(val['$include?']("\""))) { - - return val.$gsub("\"", """); - } else { - return val - } - }, $Html5Converter_encode_attribute_value$65.$$arity = 1); - - Opal.def(self, '$generate_manname_section', $Html5Converter_generate_manname_section$66 = function $$generate_manname_section(node) { - var $a, self = this, manname_title = nil, next_section = nil, next_section_title = nil, manname_id_attr = nil, manname_id = nil; - - - manname_title = node.$attr("manname-title", "Name"); - if ($truthy(($truthy($a = (next_section = node.$sections()['$[]'](0))) ? (next_section_title = next_section.$title())['$=='](next_section_title.$upcase()) : $a))) { - manname_title = manname_title.$upcase()}; - manname_id_attr = (function() {if ($truthy((manname_id = node.$attr("manname-id")))) { - return "" + " id=\"" + (manname_id) + "\"" - } else { - return "" - }; return nil; })(); - return "" + "" + (manname_title) + "\n" + "
    \n" + "

    " + (node.$attr("mannames").$join(", ")) + " - " + (node.$attr("manpurpose")) + "

    \n" + "
    "; - }, $Html5Converter_generate_manname_section$66.$$arity = 1); - - Opal.def(self, '$get_root_document', $Html5Converter_get_root_document$67 = function $$get_root_document(node) { - var $a, self = this; - - - while ($truthy((node = node.$document())['$nested?']())) { - node = node.$parent_document() - }; - return node; - }, $Html5Converter_get_root_document$67.$$arity = 1); - return (Opal.def(self, '$method_missing', $Html5Converter_method_missing$68 = function $$method_missing(id, $a) { - var $post_args, params, $b, $iter = $Html5Converter_method_missing$68.$$p, $yield = $iter || nil, self = this, name = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Html5Converter_method_missing$68.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - params = $post_args;; - if ($truthy(($truthy($b = (name = id.$to_s())['$start_with?']("convert_")['$!']()) ? self['$handles?'](name) : $b))) { - - return $send(self, 'send', ["" + "convert_" + (name)].concat(Opal.to_a(params))); - } else { - return $send(self, Opal.find_super_dispatcher(self, 'method_missing', $Html5Converter_method_missing$68, false), $zuper, $iter) - }; - }, $Html5Converter_method_missing$68.$$arity = -2), nil) && 'method_missing'; - })($$($nesting, 'Converter'), $$$($$($nesting, 'Converter'), 'Base'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/extensions"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy, $hash2 = Opal.hash2, $send = Opal.send, $hash = Opal.hash; - - Opal.add_stubs(['$==', '$[]=', '$config', '$-', '$const_defined?', '$singleton_class?', '$include', '$const_get', '$extend', '$attr_reader', '$merge', '$class', '$update', '$raise', '$document', '$doctype', '$[]', '$+', '$level', '$delete', '$>', '$casecmp', '$new', '$title=', '$sectname=', '$special=', '$fetch', '$numbered=', '$!', '$key?', '$attr?', '$special', '$numbered', '$generate_id', '$title', '$id=', '$update_attributes', '$tr', '$basename', '$create_block', '$assign_caption', '$===', '$parse_blocks', '$empty?', '$include?', '$sub_attributes', '$parse', '$each', '$define_method', '$unshift', '$shift', '$send', '$size', '$binding', '$receiver', '$define_singleton_method', '$instance_exec', '$to_proc', '$call', '$option', '$flatten', '$respond_to?', '$to_s', '$partition', '$to_i', '$<<', '$compact', '$inspect', '$attr_accessor', '$to_set', '$match?', '$resolve_regexp', '$method', '$register', '$values', '$groups', '$arity', '$activate', '$add_document_processor', '$any?', '$select', '$add_syntax_processor', '$to_sym', '$instance_variable_get', '$kind', '$private', '$join', '$map', '$split', '$capitalize', '$instance_variable_set', '$resolve_args', '$enable_dsl', '$singleton_class', '$process_block_given?', '$source_location', '$freeze', '$resolve_class', '$<', '$update_config', '$as_symbol', '$name', '$name=', '$pop', '$-@', '$next_auto_id', '$generate_name']); - - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'Extensions'); - - var $nesting = [self].concat($parent_nesting); - - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Processor'); - - var $nesting = [self].concat($parent_nesting), $Processor_initialize$4, $Processor_update_config$5, $Processor_process$6, $Processor_create_section$7, $Processor_create_block$8, $Processor_create_list$9, $Processor_create_list_item$10, $Processor_create_image_block$11, $Processor_create_inline$12, $Processor_parse_content$13, $Processor_parse_attributes$14, $Processor$15; - - self.$$prototype.config = nil; - - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $config$1, $option$2, $enable_dsl$3; - - - - Opal.def(self, '$config', $config$1 = function $$config() { - var $a, self = this; - if (self.config == null) self.config = nil; - - return (self.config = ($truthy($a = self.config) ? $a : $hash2([], {}))) - }, $config$1.$$arity = 0); - - Opal.def(self, '$option', $option$2 = function $$option(key, default_value) { - var self = this, $writer = nil; - - - $writer = [key, default_value]; - $send(self.$config(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $option$2.$$arity = 2); - - Opal.def(self, '$enable_dsl', $enable_dsl$3 = function $$enable_dsl() { - var self = this; - - if ($truthy(self['$const_defined?']("DSL"))) { - if ($truthy(self['$singleton_class?']())) { - return self.$include(self.$const_get("DSL")) - } else { - return self.$extend(self.$const_get("DSL")) - } - } else { - return nil - } - }, $enable_dsl$3.$$arity = 0); - return Opal.alias(self, "use_dsl", "enable_dsl"); - })(Opal.get_singleton_class(self), $nesting); - self.$attr_reader("config"); - - Opal.def(self, '$initialize', $Processor_initialize$4 = function $$initialize(config) { - var self = this; - - - - if (config == null) { - config = $hash2([], {}); - }; - return (self.config = self.$class().$config().$merge(config)); - }, $Processor_initialize$4.$$arity = -1); - - Opal.def(self, '$update_config', $Processor_update_config$5 = function $$update_config(config) { - var self = this; - - return self.config.$update(config) - }, $Processor_update_config$5.$$arity = 1); - - Opal.def(self, '$process', $Processor_process$6 = function $$process($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Processor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method"); - }, $Processor_process$6.$$arity = -1); - - Opal.def(self, '$create_section', $Processor_create_section$7 = function $$create_section(parent, title, attrs, opts) { - var $a, self = this, doc = nil, book = nil, doctype = nil, level = nil, style = nil, sectname = nil, special = nil, sect = nil, $writer = nil, id = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - doc = parent.$document(); - book = (doctype = doc.$doctype())['$==']("book"); - level = ($truthy($a = opts['$[]']("level")) ? $a : $rb_plus(parent.$level(), 1)); - if ($truthy((style = attrs.$delete("style")))) { - if ($truthy(($truthy($a = book) ? style['$==']("abstract") : $a))) { - $a = ["chapter", 1], (sectname = $a[0]), (level = $a[1]), $a - } else { - - $a = [style, true], (sectname = $a[0]), (special = $a[1]), $a; - if (level['$=='](0)) { - level = 1}; - } - } else if ($truthy(book)) { - sectname = (function() {if (level['$=='](0)) { - return "part" - } else { - - if ($truthy($rb_gt(level, 1))) { - return "section" - } else { - return "chapter" - }; - }; return nil; })() - } else if ($truthy((($a = doctype['$==']("manpage")) ? title.$casecmp("synopsis")['$=='](0) : doctype['$==']("manpage")))) { - $a = ["synopsis", true], (sectname = $a[0]), (special = $a[1]), $a - } else { - sectname = "section" - }; - sect = $$($nesting, 'Section').$new(parent, level); - $a = [title, sectname], sect['$title=']($a[0]), sect['$sectname=']($a[1]), $a; - if ($truthy(special)) { - - - $writer = [true]; - $send(sect, 'special=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(opts.$fetch("numbered", style['$==']("appendix")))) { - - $writer = [true]; - $send(sect, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else if ($truthy(($truthy($a = opts['$key?']("numbered")['$!']()) ? doc['$attr?']("sectnums", "all") : $a))) { - - $writer = [(function() {if ($truthy(($truthy($a = book) ? level['$=='](1) : $a))) { - return "chapter" - } else { - return true - }; return nil; })()]; - $send(sect, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - } else if ($truthy($rb_gt(level, 0))) { - if ($truthy(opts.$fetch("numbered", doc['$attr?']("sectnums")))) { - - $writer = [(function() {if ($truthy(sect.$special())) { - return ($truthy($a = parent.$numbered()) ? true : $a) - } else { - return true - }; return nil; })()]; - $send(sect, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - } else if ($truthy(opts.$fetch("numbered", ($truthy($a = book) ? doc['$attr?']("partnums") : $a)))) { - - $writer = [true]; - $send(sect, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ((id = attrs['$[]']("id"))['$=='](false)) { - attrs.$delete("id") - } else { - - $writer = [(($writer = ["id", ($truthy($a = id) ? $a : (function() {if ($truthy(doc['$attr?']("sectids"))) { - - return $$($nesting, 'Section').$generate_id(sect.$title(), doc); - } else { - return nil - }; return nil; })())]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]; - $send(sect, 'id=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - sect.$update_attributes(attrs); - return sect; - }, $Processor_create_section$7.$$arity = -4); - - Opal.def(self, '$create_block', $Processor_create_block$8 = function $$create_block(parent, context, source, attrs, opts) { - var self = this; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - return $$($nesting, 'Block').$new(parent, context, $hash2(["source", "attributes"], {"source": source, "attributes": attrs}).$merge(opts)); - }, $Processor_create_block$8.$$arity = -5); - - Opal.def(self, '$create_list', $Processor_create_list$9 = function $$create_list(parent, context, attrs) { - var self = this, list = nil; - - - - if (attrs == null) { - attrs = nil; - }; - list = $$($nesting, 'List').$new(parent, context); - if ($truthy(attrs)) { - list.$update_attributes(attrs)}; - return list; - }, $Processor_create_list$9.$$arity = -3); - - Opal.def(self, '$create_list_item', $Processor_create_list_item$10 = function $$create_list_item(parent, text) { - var self = this; - - - - if (text == null) { - text = nil; - }; - return $$($nesting, 'ListItem').$new(parent, text); - }, $Processor_create_list_item$10.$$arity = -2); - - Opal.def(self, '$create_image_block', $Processor_create_image_block$11 = function $$create_image_block(parent, attrs, opts) { - var $a, self = this, target = nil, $writer = nil, title = nil, block = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy((target = attrs['$[]']("target")))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "Unable to create an image block, target attribute is required") - }; - ($truthy($a = attrs['$[]']("alt")) ? $a : (($writer = ["alt", (($writer = ["default-alt", $$($nesting, 'Helpers').$basename(target, true).$tr("_-", " ")]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - title = (function() {if ($truthy(attrs['$key?']("title"))) { - - return attrs.$delete("title"); - } else { - return nil - }; return nil; })(); - block = self.$create_block(parent, "image", nil, attrs, opts); - if ($truthy(title)) { - - - $writer = [title]; - $send(block, 'title=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - block.$assign_caption(attrs.$delete("caption"), "figure");}; - return block; - }, $Processor_create_image_block$11.$$arity = -3); - - Opal.def(self, '$create_inline', $Processor_create_inline$12 = function $$create_inline(parent, context, text, opts) { - var self = this; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - return $$($nesting, 'Inline').$new(parent, context, text, (function() {if (context['$==']("quoted")) { - - return $hash2(["type"], {"type": "unquoted"}).$merge(opts); - } else { - return opts - }; return nil; })()); - }, $Processor_create_inline$12.$$arity = -4); - - Opal.def(self, '$parse_content', $Processor_parse_content$13 = function $$parse_content(parent, content, attributes) { - var self = this, reader = nil; - - - - if (attributes == null) { - attributes = nil; - }; - reader = (function() {if ($truthy($$($nesting, 'Reader')['$==='](content))) { - return content - } else { - - return $$($nesting, 'Reader').$new(content); - }; return nil; })(); - $$($nesting, 'Parser').$parse_blocks(reader, parent, attributes); - return parent; - }, $Processor_parse_content$13.$$arity = -3); - - Opal.def(self, '$parse_attributes', $Processor_parse_attributes$14 = function $$parse_attributes(block, attrlist, opts) { - var $a, self = this; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy((function() {if ($truthy(attrlist)) { - return attrlist['$empty?']() - } else { - return true - }; return nil; })())) { - return $hash2([], {})}; - if ($truthy(($truthy($a = opts['$[]']("sub_attributes")) ? attrlist['$include?']($$($nesting, 'ATTR_REF_HEAD')) : $a))) { - attrlist = block.$sub_attributes(attrlist)}; - return $$($nesting, 'AttributeList').$new(attrlist).$parse(($truthy($a = opts['$[]']("positional_attributes")) ? $a : [])); - }, $Processor_parse_attributes$14.$$arity = -3); - return $send([["create_paragraph", "create_block", "paragraph"], ["create_open_block", "create_block", "open"], ["create_example_block", "create_block", "example"], ["create_pass_block", "create_block", "pass"], ["create_listing_block", "create_block", "listing"], ["create_literal_block", "create_block", "literal"], ["create_anchor", "create_inline", "anchor"], ["create_inline_pass", "create_inline", "quoted"]], 'each', [], ($Processor$15 = function(method_name, delegate_method_name, context){var self = $Processor$15.$$s || this, $$16; - - - - if (method_name == null) { - method_name = nil; - }; - - if (delegate_method_name == null) { - delegate_method_name = nil; - }; - - if (context == null) { - context = nil; - }; - return $send(self, 'define_method', [method_name], ($$16 = function($a){var self = $$16.$$s || this, $post_args, args; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - args.$unshift(args.$shift(), context); - return $send(self, 'send', [delegate_method_name].concat(Opal.to_a(args)));}, $$16.$$s = self, $$16.$$arity = -1, $$16));}, $Processor$15.$$s = self, $Processor$15.$$arity = 3, $Processor$15)); - })($nesting[0], null, $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'ProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $ProcessorDsl_option$17, $ProcessorDsl_process$18, $ProcessorDsl_process_block_given$ques$20; - - - - Opal.def(self, '$option', $ProcessorDsl_option$17 = function $$option(key, value) { - var self = this, $writer = nil; - - - $writer = [key, value]; - $send(self.$config(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $ProcessorDsl_option$17.$$arity = 2); - - Opal.def(self, '$process', $ProcessorDsl_process$18 = function $$process($a) { - var $iter = $ProcessorDsl_process$18.$$p, block = $iter || nil, $post_args, args, $b, $$19, self = this, context = nil; - if (self.process_block == null) self.process_block = nil; - - if ($iter) $ProcessorDsl_process$18.$$p = null; - - - if ($iter) $ProcessorDsl_process$18.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ((block !== nil)) { - - if ($truthy(args['$empty?']())) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "wrong number of arguments (given " + (args.$size()) + ", expected 0)") - }; - if ($truthy(($truthy($b = block.$binding()) ? self['$=='](block.$binding().$receiver()) : $b))) { - } else { - - context = self; - $send(block, 'define_singleton_method', ["call"], ($$19 = function($c){var self = $$19.$$s || this, $post_args, m_args; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - m_args = $post_args;; - return $send(context, 'instance_exec', Opal.to_a(m_args), block.$to_proc());}, $$19.$$s = self, $$19.$$arity = -1, $$19)); - }; - return (self.process_block = block); - } else if ($truthy((($b = self['process_block'], $b != null && $b !== nil) ? 'instance-variable' : nil))) { - return $send(self.process_block, 'call', Opal.to_a(args)) - } else { - return self.$raise($$$('::', 'NotImplementedError'), "" + (self.$class()) + " #" + ("process") + " method called before being registered") - }; - }, $ProcessorDsl_process$18.$$arity = -1); - - Opal.def(self, '$process_block_given?', $ProcessorDsl_process_block_given$ques$20 = function() { - var $a, self = this; - - return (($a = self['process_block'], $a != null && $a !== nil) ? 'instance-variable' : nil) - }, $ProcessorDsl_process_block_given$ques$20.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'DocumentProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $DocumentProcessorDsl_prefer$21; - - - self.$include($$($nesting, 'ProcessorDsl')); - - Opal.def(self, '$prefer', $DocumentProcessorDsl_prefer$21 = function $$prefer() { - var self = this; - - return self.$option("position", ">>") - }, $DocumentProcessorDsl_prefer$21.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'SyntaxProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $SyntaxProcessorDsl_named$22, $SyntaxProcessorDsl_content_model$23, $SyntaxProcessorDsl_positional_attributes$24, $SyntaxProcessorDsl_default_attributes$25, $SyntaxProcessorDsl_resolve_attributes$26; - - - self.$include($$($nesting, 'ProcessorDsl')); - - Opal.def(self, '$named', $SyntaxProcessorDsl_named$22 = function $$named(value) { - var self = this; - - if ($truthy($$($nesting, 'Processor')['$==='](self))) { - return (self.name = value) - } else { - return self.$option("name", value) - } - }, $SyntaxProcessorDsl_named$22.$$arity = 1); - - Opal.def(self, '$content_model', $SyntaxProcessorDsl_content_model$23 = function $$content_model(value) { - var self = this; - - return self.$option("content_model", value) - }, $SyntaxProcessorDsl_content_model$23.$$arity = 1); - Opal.alias(self, "parse_content_as", "content_model"); - - Opal.def(self, '$positional_attributes', $SyntaxProcessorDsl_positional_attributes$24 = function $$positional_attributes($a) { - var $post_args, value, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - return self.$option("positional_attrs", value.$flatten()); - }, $SyntaxProcessorDsl_positional_attributes$24.$$arity = -1); - Opal.alias(self, "name_positional_attributes", "positional_attributes"); - Opal.alias(self, "positional_attrs", "positional_attributes"); - - Opal.def(self, '$default_attributes', $SyntaxProcessorDsl_default_attributes$25 = function $$default_attributes(value) { - var self = this; - - return self.$option("default_attrs", value) - }, $SyntaxProcessorDsl_default_attributes$25.$$arity = 1); - Opal.alias(self, "default_attrs", "default_attributes"); - - Opal.def(self, '$resolve_attributes', $SyntaxProcessorDsl_resolve_attributes$26 = function $$resolve_attributes($a) { - var $post_args, args, $b, $$27, $$28, self = this, $case = nil, names = nil, defaults = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy($rb_gt(args.$size(), 1))) { - } else if ($truthy((args = args.$fetch(0, true))['$respond_to?']("to_sym"))) { - args = [args]}; - return (function() {$case = args; - if (true['$===']($case)) { - self.$option("positional_attrs", []); - return self.$option("default_attrs", $hash2([], {}));} - else if ($$$('::', 'Array')['$===']($case)) { - $b = [[], $hash2([], {})], (names = $b[0]), (defaults = $b[1]), $b; - $send(args, 'each', [], ($$27 = function(arg){var self = $$27.$$s || this, $c, $d, name = nil, _ = nil, value = nil, idx = nil, $writer = nil; - - - - if (arg == null) { - arg = nil; - }; - if ($truthy((arg = arg.$to_s())['$include?']("="))) { - - $d = arg.$partition("="), $c = Opal.to_ary($d), (name = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (value = ($c[2] == null ? nil : $c[2])), $d; - if ($truthy(name['$include?'](":"))) { - - $d = name.$partition(":"), $c = Opal.to_ary($d), (idx = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (name = ($c[2] == null ? nil : $c[2])), $d; - idx = (function() {if (idx['$==']("@")) { - return names.$size() - } else { - return idx.$to_i() - }; return nil; })(); - - $writer = [idx, name]; - $send(names, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - - $writer = [name, value]; - $send(defaults, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else if ($truthy(arg['$include?'](":"))) { - - $d = arg.$partition(":"), $c = Opal.to_ary($d), (idx = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (name = ($c[2] == null ? nil : $c[2])), $d; - idx = (function() {if (idx['$==']("@")) { - return names.$size() - } else { - return idx.$to_i() - }; return nil; })(); - - $writer = [idx, name]; - $send(names, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - return names['$<<'](arg) - };}, $$27.$$s = self, $$27.$$arity = 1, $$27)); - self.$option("positional_attrs", names.$compact()); - return self.$option("default_attrs", defaults);} - else if ($$$('::', 'Hash')['$===']($case)) { - $b = [[], $hash2([], {})], (names = $b[0]), (defaults = $b[1]), $b; - $send(args, 'each', [], ($$28 = function(key, val){var self = $$28.$$s || this, $c, $d, name = nil, idx = nil, _ = nil, $writer = nil; - - - - if (key == null) { - key = nil; - }; - - if (val == null) { - val = nil; - }; - if ($truthy((name = key.$to_s())['$include?'](":"))) { - - $d = name.$partition(":"), $c = Opal.to_ary($d), (idx = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (name = ($c[2] == null ? nil : $c[2])), $d; - idx = (function() {if (idx['$==']("@")) { - return names.$size() - } else { - return idx.$to_i() - }; return nil; })(); - - $writer = [idx, name]; - $send(names, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - if ($truthy(val)) { - - $writer = [name, val]; - $send(defaults, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - return nil - };}, $$28.$$s = self, $$28.$$arity = 2, $$28)); - self.$option("positional_attrs", names.$compact()); - return self.$option("default_attrs", defaults);} - else {return self.$raise($$$('::', 'ArgumentError'), "" + "unsupported attributes specification for macro: " + (args.$inspect()))}})(); - }, $SyntaxProcessorDsl_resolve_attributes$26.$$arity = -1); - Opal.alias(self, "resolves_attributes", "resolve_attributes"); - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Preprocessor'); - - var $nesting = [self].concat($parent_nesting), $Preprocessor_process$29; - - return (Opal.def(self, '$process', $Preprocessor_process$29 = function $$process(document, reader) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Preprocessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $Preprocessor_process$29.$$arity = 2), nil) && 'process' - })($nesting[0], $$($nesting, 'Processor'), $nesting); - Opal.const_set($$($nesting, 'Preprocessor'), 'DSL', $$($nesting, 'DocumentProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'TreeProcessor'); - - var $nesting = [self].concat($parent_nesting), $TreeProcessor_process$30; - - return (Opal.def(self, '$process', $TreeProcessor_process$30 = function $$process(document) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'TreeProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $TreeProcessor_process$30.$$arity = 1), nil) && 'process' - })($nesting[0], $$($nesting, 'Processor'), $nesting); - Opal.const_set($$($nesting, 'TreeProcessor'), 'DSL', $$($nesting, 'DocumentProcessorDsl')); - Opal.const_set($nesting[0], 'Treeprocessor', $$($nesting, 'TreeProcessor')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Postprocessor'); - - var $nesting = [self].concat($parent_nesting), $Postprocessor_process$31; - - return (Opal.def(self, '$process', $Postprocessor_process$31 = function $$process(document, output) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Postprocessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $Postprocessor_process$31.$$arity = 2), nil) && 'process' - })($nesting[0], $$($nesting, 'Processor'), $nesting); - Opal.const_set($$($nesting, 'Postprocessor'), 'DSL', $$($nesting, 'DocumentProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'IncludeProcessor'); - - var $nesting = [self].concat($parent_nesting), $IncludeProcessor_process$32, $IncludeProcessor_handles$ques$33; - - - - Opal.def(self, '$process', $IncludeProcessor_process$32 = function $$process(document, reader, target, attributes) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'IncludeProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $IncludeProcessor_process$32.$$arity = 4); - return (Opal.def(self, '$handles?', $IncludeProcessor_handles$ques$33 = function(target) { - var self = this; - - return true - }, $IncludeProcessor_handles$ques$33.$$arity = 1), nil) && 'handles?'; - })($nesting[0], $$($nesting, 'Processor'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'IncludeProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $IncludeProcessorDsl_handles$ques$34; - - - self.$include($$($nesting, 'DocumentProcessorDsl')); - - Opal.def(self, '$handles?', $IncludeProcessorDsl_handles$ques$34 = function($a) { - var $iter = $IncludeProcessorDsl_handles$ques$34.$$p, block = $iter || nil, $post_args, args, $b, self = this; - if (self.handles_block == null) self.handles_block = nil; - - if ($iter) $IncludeProcessorDsl_handles$ques$34.$$p = null; - - - if ($iter) $IncludeProcessorDsl_handles$ques$34.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ((block !== nil)) { - - if ($truthy(args['$empty?']())) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "wrong number of arguments (given " + (args.$size()) + ", expected 0)") - }; - return (self.handles_block = block); - } else if ($truthy((($b = self['handles_block'], $b != null && $b !== nil) ? 'instance-variable' : nil))) { - return self.handles_block.$call(args['$[]'](0)) - } else { - return true - }; - }, $IncludeProcessorDsl_handles$ques$34.$$arity = -1); - })($nesting[0], $nesting); - Opal.const_set($$($nesting, 'IncludeProcessor'), 'DSL', $$($nesting, 'IncludeProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'DocinfoProcessor'); - - var $nesting = [self].concat($parent_nesting), $DocinfoProcessor_initialize$35, $DocinfoProcessor_process$36; - - self.$$prototype.config = nil; - - - Opal.def(self, '$initialize', $DocinfoProcessor_initialize$35 = function $$initialize(config) { - var $a, $iter = $DocinfoProcessor_initialize$35.$$p, $yield = $iter || nil, self = this, $writer = nil; - - if ($iter) $DocinfoProcessor_initialize$35.$$p = null; - - - if (config == null) { - config = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $DocinfoProcessor_initialize$35, false), [config], null); - return ($truthy($a = self.config['$[]']("location")) ? $a : (($writer = ["location", "head"]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - }, $DocinfoProcessor_initialize$35.$$arity = -1); - return (Opal.def(self, '$process', $DocinfoProcessor_process$36 = function $$process(document) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'DocinfoProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $DocinfoProcessor_process$36.$$arity = 1), nil) && 'process'; - })($nesting[0], $$($nesting, 'Processor'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'DocinfoProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $DocinfoProcessorDsl_at_location$37; - - - self.$include($$($nesting, 'DocumentProcessorDsl')); - - Opal.def(self, '$at_location', $DocinfoProcessorDsl_at_location$37 = function $$at_location(value) { - var self = this; - - return self.$option("location", value) - }, $DocinfoProcessorDsl_at_location$37.$$arity = 1); - })($nesting[0], $nesting); - Opal.const_set($$($nesting, 'DocinfoProcessor'), 'DSL', $$($nesting, 'DocinfoProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'BlockProcessor'); - - var $nesting = [self].concat($parent_nesting), $BlockProcessor_initialize$38, $BlockProcessor_process$39; - - self.$$prototype.config = nil; - - self.$attr_accessor("name"); - - Opal.def(self, '$initialize', $BlockProcessor_initialize$38 = function $$initialize(name, config) { - var $a, $iter = $BlockProcessor_initialize$38.$$p, $yield = $iter || nil, self = this, $case = nil, $writer = nil; - - if ($iter) $BlockProcessor_initialize$38.$$p = null; - - - if (name == null) { - name = nil; - }; - - if (config == null) { - config = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $BlockProcessor_initialize$38, false), [config], null); - self.name = ($truthy($a = name) ? $a : self.config['$[]']("name")); - $case = self.config['$[]']("contexts"); - if ($$$('::', 'NilClass')['$===']($case)) {($truthy($a = self.config['$[]']("contexts")) ? $a : (($writer = ["contexts", ["open", "paragraph"].$to_set()]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))} - else if ($$$('::', 'Symbol')['$===']($case)) { - $writer = ["contexts", [self.config['$[]']("contexts")].$to_set()]; - $send(self.config, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - else { - $writer = ["contexts", self.config['$[]']("contexts").$to_set()]; - $send(self.config, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return ($truthy($a = self.config['$[]']("content_model")) ? $a : (($writer = ["content_model", "compound"]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - }, $BlockProcessor_initialize$38.$$arity = -1); - return (Opal.def(self, '$process', $BlockProcessor_process$39 = function $$process(parent, reader, attributes) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'BlockProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $BlockProcessor_process$39.$$arity = 3), nil) && 'process'; - })($nesting[0], $$($nesting, 'Processor'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'BlockProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $BlockProcessorDsl_contexts$40; - - - self.$include($$($nesting, 'SyntaxProcessorDsl')); - - Opal.def(self, '$contexts', $BlockProcessorDsl_contexts$40 = function $$contexts($a) { - var $post_args, value, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - return self.$option("contexts", value.$flatten().$to_set()); - }, $BlockProcessorDsl_contexts$40.$$arity = -1); - Opal.alias(self, "on_contexts", "contexts"); - Opal.alias(self, "on_context", "contexts"); - Opal.alias(self, "bind_to", "contexts"); - })($nesting[0], $nesting); - Opal.const_set($$($nesting, 'BlockProcessor'), 'DSL', $$($nesting, 'BlockProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'MacroProcessor'); - - var $nesting = [self].concat($parent_nesting), $MacroProcessor_initialize$41, $MacroProcessor_process$42; - - self.$$prototype.config = nil; - - self.$attr_accessor("name"); - - Opal.def(self, '$initialize', $MacroProcessor_initialize$41 = function $$initialize(name, config) { - var $a, $iter = $MacroProcessor_initialize$41.$$p, $yield = $iter || nil, self = this, $writer = nil; - - if ($iter) $MacroProcessor_initialize$41.$$p = null; - - - if (name == null) { - name = nil; - }; - - if (config == null) { - config = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $MacroProcessor_initialize$41, false), [config], null); - self.name = ($truthy($a = name) ? $a : self.config['$[]']("name")); - return ($truthy($a = self.config['$[]']("content_model")) ? $a : (($writer = ["content_model", "attributes"]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - }, $MacroProcessor_initialize$41.$$arity = -1); - return (Opal.def(self, '$process', $MacroProcessor_process$42 = function $$process(parent, target, attributes) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'MacroProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $MacroProcessor_process$42.$$arity = 3), nil) && 'process'; - })($nesting[0], $$($nesting, 'Processor'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'MacroProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $MacroProcessorDsl_resolve_attributes$43; - - - self.$include($$($nesting, 'SyntaxProcessorDsl')); - - Opal.def(self, '$resolve_attributes', $MacroProcessorDsl_resolve_attributes$43 = function $$resolve_attributes($a) { - var $post_args, args, $b, $iter = $MacroProcessorDsl_resolve_attributes$43.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $MacroProcessorDsl_resolve_attributes$43.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy((($b = args.$size()['$=='](1)) ? args['$[]'](0)['$!']() : args.$size()['$=='](1)))) { - return self.$option("content_model", "text") - } else { - - $send(self, Opal.find_super_dispatcher(self, 'resolve_attributes', $MacroProcessorDsl_resolve_attributes$43, false), $zuper, $iter); - return self.$option("content_model", "attributes"); - }; - }, $MacroProcessorDsl_resolve_attributes$43.$$arity = -1); - Opal.alias(self, "resolves_attributes", "resolve_attributes"); - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'BlockMacroProcessor'); - - var $nesting = [self].concat($parent_nesting), $BlockMacroProcessor_name$44; - - self.$$prototype.name = nil; - return (Opal.def(self, '$name', $BlockMacroProcessor_name$44 = function $$name() { - var self = this; - - - if ($truthy($$($nesting, 'MacroNameRx')['$match?'](self.name.$to_s()))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "invalid name for block macro: " + (self.name)) - }; - return self.name; - }, $BlockMacroProcessor_name$44.$$arity = 0), nil) && 'name' - })($nesting[0], $$($nesting, 'MacroProcessor'), $nesting); - Opal.const_set($$($nesting, 'BlockMacroProcessor'), 'DSL', $$($nesting, 'MacroProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'InlineMacroProcessor'); - - var $nesting = [self].concat($parent_nesting), $InlineMacroProcessor_regexp$45, $InlineMacroProcessor_resolve_regexp$46; - - self.$$prototype.config = self.$$prototype.name = nil; - - (Opal.class_variable_set($nesting[0], '@@rx_cache', $hash2([], {}))); - - Opal.def(self, '$regexp', $InlineMacroProcessor_regexp$45 = function $$regexp() { - var $a, self = this, $writer = nil; - - return ($truthy($a = self.config['$[]']("regexp")) ? $a : (($writer = ["regexp", self.$resolve_regexp(self.name.$to_s(), self.config['$[]']("format"))]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - }, $InlineMacroProcessor_regexp$45.$$arity = 0); - return (Opal.def(self, '$resolve_regexp', $InlineMacroProcessor_resolve_regexp$46 = function $$resolve_regexp(name, format) { - var $a, $b, self = this, $writer = nil; - - - if ($truthy($$($nesting, 'MacroNameRx')['$match?'](name))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "invalid name for inline macro: " + (name)) - }; - return ($truthy($a = (($b = $nesting[0].$$cvars['@@rx_cache']) == null ? nil : $b)['$[]']([name, format])) ? $a : (($writer = [[name, format], new RegExp("" + "\\\\?" + (name) + ":" + ((function() {if (format['$==']("short")) { - return "(){0}" - } else { - return "(\\S+?)" - }; return nil; })()) + "\\[(|" + ($$($nesting, 'CC_ANY')) + "*?[^\\\\])\\]")]), $send((($b = $nesting[0].$$cvars['@@rx_cache']) == null ? nil : $b), '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - }, $InlineMacroProcessor_resolve_regexp$46.$$arity = 2), nil) && 'resolve_regexp'; - })($nesting[0], $$($nesting, 'MacroProcessor'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'InlineMacroProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $InlineMacroProcessorDsl_format$47, $InlineMacroProcessorDsl_match$48; - - - self.$include($$($nesting, 'MacroProcessorDsl')); - - Opal.def(self, '$format', $InlineMacroProcessorDsl_format$47 = function $$format(value) { - var self = this; - - return self.$option("format", value) - }, $InlineMacroProcessorDsl_format$47.$$arity = 1); - Opal.alias(self, "match_format", "format"); - Opal.alias(self, "using_format", "format"); - - Opal.def(self, '$match', $InlineMacroProcessorDsl_match$48 = function $$match(value) { - var self = this; - - return self.$option("regexp", value) - }, $InlineMacroProcessorDsl_match$48.$$arity = 1); - })($nesting[0], $nesting); - Opal.const_set($$($nesting, 'InlineMacroProcessor'), 'DSL', $$($nesting, 'InlineMacroProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Extension'); - - var $nesting = [self].concat($parent_nesting), $Extension_initialize$49; - - - self.$attr_reader("kind"); - self.$attr_reader("config"); - self.$attr_reader("instance"); - return (Opal.def(self, '$initialize', $Extension_initialize$49 = function $$initialize(kind, instance, config) { - var self = this; - - - self.kind = kind; - self.instance = instance; - return (self.config = config); - }, $Extension_initialize$49.$$arity = 3), nil) && 'initialize'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'ProcessorExtension'); - - var $nesting = [self].concat($parent_nesting), $ProcessorExtension_initialize$50; - - - self.$attr_reader("process_method"); - return (Opal.def(self, '$initialize', $ProcessorExtension_initialize$50 = function $$initialize(kind, instance, process_method) { - var $a, $iter = $ProcessorExtension_initialize$50.$$p, $yield = $iter || nil, self = this; - - if ($iter) $ProcessorExtension_initialize$50.$$p = null; - - - if (process_method == null) { - process_method = nil; - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $ProcessorExtension_initialize$50, false), [kind, instance, instance.$config()], null); - return (self.process_method = ($truthy($a = process_method) ? $a : instance.$method("process"))); - }, $ProcessorExtension_initialize$50.$$arity = -3), nil) && 'initialize'; - })($nesting[0], $$($nesting, 'Extension'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Group'); - - var $nesting = [self].concat($parent_nesting), $Group_activate$52; - - - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $register$51; - - return (Opal.def(self, '$register', $register$51 = function $$register(name) { - var self = this; - - - - if (name == null) { - name = nil; - }; - return $$($nesting, 'Extensions').$register(name, self); - }, $register$51.$$arity = -1), nil) && 'register' - })(Opal.get_singleton_class(self), $nesting); - return (Opal.def(self, '$activate', $Group_activate$52 = function $$activate(registry) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError')) - }, $Group_activate$52.$$arity = 1), nil) && 'activate'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Registry'); - - var $nesting = [self].concat($parent_nesting), $Registry_initialize$53, $Registry_activate$54, $Registry_preprocessor$56, $Registry_preprocessors$ques$57, $Registry_preprocessors$58, $Registry_tree_processor$59, $Registry_tree_processors$ques$60, $Registry_tree_processors$61, $Registry_postprocessor$62, $Registry_postprocessors$ques$63, $Registry_postprocessors$64, $Registry_include_processor$65, $Registry_include_processors$ques$66, $Registry_include_processors$67, $Registry_docinfo_processor$68, $Registry_docinfo_processors$ques$69, $Registry_docinfo_processors$71, $Registry_block$73, $Registry_blocks$ques$74, $Registry_registered_for_block$ques$75, $Registry_find_block_extension$76, $Registry_block_macro$77, $Registry_block_macros$ques$78, $Registry_registered_for_block_macro$ques$79, $Registry_find_block_macro_extension$80, $Registry_inline_macro$81, $Registry_inline_macros$ques$82, $Registry_registered_for_inline_macro$ques$83, $Registry_find_inline_macro_extension$84, $Registry_inline_macros$85, $Registry_prefer$86, $Registry_add_document_processor$87, $Registry_add_syntax_processor$89, $Registry_resolve_args$91, $Registry_as_symbol$92; - - self.$$prototype.groups = self.$$prototype.preprocessor_extensions = self.$$prototype.tree_processor_extensions = self.$$prototype.postprocessor_extensions = self.$$prototype.include_processor_extensions = self.$$prototype.docinfo_processor_extensions = self.$$prototype.block_extensions = self.$$prototype.block_macro_extensions = self.$$prototype.inline_macro_extensions = nil; - - self.$attr_reader("document"); - self.$attr_reader("groups"); - - Opal.def(self, '$initialize', $Registry_initialize$53 = function $$initialize(groups) { - var self = this; - - - - if (groups == null) { - groups = $hash2([], {}); - }; - self.groups = groups; - self.preprocessor_extensions = (self.tree_processor_extensions = (self.postprocessor_extensions = (self.include_processor_extensions = (self.docinfo_processor_extensions = (self.block_extensions = (self.block_macro_extensions = (self.inline_macro_extensions = nil))))))); - return (self.document = nil); - }, $Registry_initialize$53.$$arity = -1); - - Opal.def(self, '$activate', $Registry_activate$54 = function $$activate(document) { - var $$55, self = this, ext_groups = nil; - - - self.document = document; - if ($truthy((ext_groups = $rb_plus($$($nesting, 'Extensions').$groups().$values(), self.groups.$values()))['$empty?']())) { - } else { - $send(ext_groups, 'each', [], ($$55 = function(group){var self = $$55.$$s || this, $case = nil; - - - - if (group == null) { - group = nil; - }; - return (function() {$case = group; - if ($$$('::', 'Proc')['$===']($case)) {return (function() {$case = group.$arity(); - if ((0)['$===']($case) || (-1)['$===']($case)) {return $send(self, 'instance_exec', [], group.$to_proc())} - else if ((1)['$===']($case)) {return group.$call(self)} - else { return nil }})()} - else if ($$$('::', 'Class')['$===']($case)) {return group.$new().$activate(self)} - else {return group.$activate(self)}})();}, $$55.$$s = self, $$55.$$arity = 1, $$55)) - }; - return self; - }, $Registry_activate$54.$$arity = 1); - - Opal.def(self, '$preprocessor', $Registry_preprocessor$56 = function $$preprocessor($a) { - var $iter = $Registry_preprocessor$56.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_preprocessor$56.$$p = null; - - - if ($iter) $Registry_preprocessor$56.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_document_processor', ["preprocessor", args], block.$to_proc()); - }, $Registry_preprocessor$56.$$arity = -1); - - Opal.def(self, '$preprocessors?', $Registry_preprocessors$ques$57 = function() { - var self = this; - - return self.preprocessor_extensions['$!']()['$!']() - }, $Registry_preprocessors$ques$57.$$arity = 0); - - Opal.def(self, '$preprocessors', $Registry_preprocessors$58 = function $$preprocessors() { - var self = this; - - return self.preprocessor_extensions - }, $Registry_preprocessors$58.$$arity = 0); - - Opal.def(self, '$tree_processor', $Registry_tree_processor$59 = function $$tree_processor($a) { - var $iter = $Registry_tree_processor$59.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_tree_processor$59.$$p = null; - - - if ($iter) $Registry_tree_processor$59.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_document_processor', ["tree_processor", args], block.$to_proc()); - }, $Registry_tree_processor$59.$$arity = -1); - - Opal.def(self, '$tree_processors?', $Registry_tree_processors$ques$60 = function() { - var self = this; - - return self.tree_processor_extensions['$!']()['$!']() - }, $Registry_tree_processors$ques$60.$$arity = 0); - - Opal.def(self, '$tree_processors', $Registry_tree_processors$61 = function $$tree_processors() { - var self = this; - - return self.tree_processor_extensions - }, $Registry_tree_processors$61.$$arity = 0); - Opal.alias(self, "treeprocessor", "tree_processor"); - Opal.alias(self, "treeprocessors?", "tree_processors?"); - Opal.alias(self, "treeprocessors", "tree_processors"); - - Opal.def(self, '$postprocessor', $Registry_postprocessor$62 = function $$postprocessor($a) { - var $iter = $Registry_postprocessor$62.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_postprocessor$62.$$p = null; - - - if ($iter) $Registry_postprocessor$62.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_document_processor', ["postprocessor", args], block.$to_proc()); - }, $Registry_postprocessor$62.$$arity = -1); - - Opal.def(self, '$postprocessors?', $Registry_postprocessors$ques$63 = function() { - var self = this; - - return self.postprocessor_extensions['$!']()['$!']() - }, $Registry_postprocessors$ques$63.$$arity = 0); - - Opal.def(self, '$postprocessors', $Registry_postprocessors$64 = function $$postprocessors() { - var self = this; - - return self.postprocessor_extensions - }, $Registry_postprocessors$64.$$arity = 0); - - Opal.def(self, '$include_processor', $Registry_include_processor$65 = function $$include_processor($a) { - var $iter = $Registry_include_processor$65.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_include_processor$65.$$p = null; - - - if ($iter) $Registry_include_processor$65.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_document_processor', ["include_processor", args], block.$to_proc()); - }, $Registry_include_processor$65.$$arity = -1); - - Opal.def(self, '$include_processors?', $Registry_include_processors$ques$66 = function() { - var self = this; - - return self.include_processor_extensions['$!']()['$!']() - }, $Registry_include_processors$ques$66.$$arity = 0); - - Opal.def(self, '$include_processors', $Registry_include_processors$67 = function $$include_processors() { - var self = this; - - return self.include_processor_extensions - }, $Registry_include_processors$67.$$arity = 0); - - Opal.def(self, '$docinfo_processor', $Registry_docinfo_processor$68 = function $$docinfo_processor($a) { - var $iter = $Registry_docinfo_processor$68.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_docinfo_processor$68.$$p = null; - - - if ($iter) $Registry_docinfo_processor$68.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_document_processor', ["docinfo_processor", args], block.$to_proc()); - }, $Registry_docinfo_processor$68.$$arity = -1); - - Opal.def(self, '$docinfo_processors?', $Registry_docinfo_processors$ques$69 = function(location) { - var $$70, self = this; - - - - if (location == null) { - location = nil; - }; - if ($truthy(self.docinfo_processor_extensions)) { - if ($truthy(location)) { - return $send(self.docinfo_processor_extensions, 'any?', [], ($$70 = function(ext){var self = $$70.$$s || this; - - - - if (ext == null) { - ext = nil; - }; - return ext.$config()['$[]']("location")['$=='](location);}, $$70.$$s = self, $$70.$$arity = 1, $$70)) - } else { - return true - } - } else { - return false - }; - }, $Registry_docinfo_processors$ques$69.$$arity = -1); - - Opal.def(self, '$docinfo_processors', $Registry_docinfo_processors$71 = function $$docinfo_processors(location) { - var $$72, self = this; - - - - if (location == null) { - location = nil; - }; - if ($truthy(self.docinfo_processor_extensions)) { - if ($truthy(location)) { - return $send(self.docinfo_processor_extensions, 'select', [], ($$72 = function(ext){var self = $$72.$$s || this; - - - - if (ext == null) { - ext = nil; - }; - return ext.$config()['$[]']("location")['$=='](location);}, $$72.$$s = self, $$72.$$arity = 1, $$72)) - } else { - return self.docinfo_processor_extensions - } - } else { - return nil - }; - }, $Registry_docinfo_processors$71.$$arity = -1); - - Opal.def(self, '$block', $Registry_block$73 = function $$block($a) { - var $iter = $Registry_block$73.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_block$73.$$p = null; - - - if ($iter) $Registry_block$73.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_syntax_processor', ["block", args], block.$to_proc()); - }, $Registry_block$73.$$arity = -1); - - Opal.def(self, '$blocks?', $Registry_blocks$ques$74 = function() { - var self = this; - - return self.block_extensions['$!']()['$!']() - }, $Registry_blocks$ques$74.$$arity = 0); - - Opal.def(self, '$registered_for_block?', $Registry_registered_for_block$ques$75 = function(name, context) { - var self = this, ext = nil; - - if ($truthy((ext = self.block_extensions['$[]'](name.$to_sym())))) { - if ($truthy(ext.$config()['$[]']("contexts")['$include?'](context))) { - return ext - } else { - return false - } - } else { - return false - } - }, $Registry_registered_for_block$ques$75.$$arity = 2); - - Opal.def(self, '$find_block_extension', $Registry_find_block_extension$76 = function $$find_block_extension(name) { - var self = this; - - return self.block_extensions['$[]'](name.$to_sym()) - }, $Registry_find_block_extension$76.$$arity = 1); - - Opal.def(self, '$block_macro', $Registry_block_macro$77 = function $$block_macro($a) { - var $iter = $Registry_block_macro$77.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_block_macro$77.$$p = null; - - - if ($iter) $Registry_block_macro$77.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_syntax_processor', ["block_macro", args], block.$to_proc()); - }, $Registry_block_macro$77.$$arity = -1); - - Opal.def(self, '$block_macros?', $Registry_block_macros$ques$78 = function() { - var self = this; - - return self.block_macro_extensions['$!']()['$!']() - }, $Registry_block_macros$ques$78.$$arity = 0); - - Opal.def(self, '$registered_for_block_macro?', $Registry_registered_for_block_macro$ques$79 = function(name) { - var self = this, ext = nil; - - if ($truthy((ext = self.block_macro_extensions['$[]'](name.$to_sym())))) { - return ext - } else { - return false - } - }, $Registry_registered_for_block_macro$ques$79.$$arity = 1); - - Opal.def(self, '$find_block_macro_extension', $Registry_find_block_macro_extension$80 = function $$find_block_macro_extension(name) { - var self = this; - - return self.block_macro_extensions['$[]'](name.$to_sym()) - }, $Registry_find_block_macro_extension$80.$$arity = 1); - - Opal.def(self, '$inline_macro', $Registry_inline_macro$81 = function $$inline_macro($a) { - var $iter = $Registry_inline_macro$81.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_inline_macro$81.$$p = null; - - - if ($iter) $Registry_inline_macro$81.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_syntax_processor', ["inline_macro", args], block.$to_proc()); - }, $Registry_inline_macro$81.$$arity = -1); - - Opal.def(self, '$inline_macros?', $Registry_inline_macros$ques$82 = function() { - var self = this; - - return self.inline_macro_extensions['$!']()['$!']() - }, $Registry_inline_macros$ques$82.$$arity = 0); - - Opal.def(self, '$registered_for_inline_macro?', $Registry_registered_for_inline_macro$ques$83 = function(name) { - var self = this, ext = nil; - - if ($truthy((ext = self.inline_macro_extensions['$[]'](name.$to_sym())))) { - return ext - } else { - return false - } - }, $Registry_registered_for_inline_macro$ques$83.$$arity = 1); - - Opal.def(self, '$find_inline_macro_extension', $Registry_find_inline_macro_extension$84 = function $$find_inline_macro_extension(name) { - var self = this; - - return self.inline_macro_extensions['$[]'](name.$to_sym()) - }, $Registry_find_inline_macro_extension$84.$$arity = 1); - - Opal.def(self, '$inline_macros', $Registry_inline_macros$85 = function $$inline_macros() { - var self = this; - - return self.inline_macro_extensions.$values() - }, $Registry_inline_macros$85.$$arity = 0); - - Opal.def(self, '$prefer', $Registry_prefer$86 = function $$prefer($a) { - var $iter = $Registry_prefer$86.$$p, block = $iter || nil, $post_args, args, self = this, extension = nil, arg0 = nil, extensions_store = nil; - - if ($iter) $Registry_prefer$86.$$p = null; - - - if ($iter) $Registry_prefer$86.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - extension = (function() {if ($truthy($$($nesting, 'ProcessorExtension')['$===']((arg0 = args.$shift())))) { - return arg0 - } else { - - return $send(self, 'send', [arg0].concat(Opal.to_a(args)), block.$to_proc()); - }; return nil; })(); - extensions_store = self.$instance_variable_get(((("" + "@") + (extension.$kind())) + "_extensions").$to_sym()); - extensions_store.$unshift(extensions_store.$delete(extension)); - return extension; - }, $Registry_prefer$86.$$arity = -1); - self.$private(); - - Opal.def(self, '$add_document_processor', $Registry_add_document_processor$87 = function $$add_document_processor(kind, args) { - var $iter = $Registry_add_document_processor$87.$$p, block = $iter || nil, $$88, $a, $b, $c, self = this, kind_name = nil, kind_class_symbol = nil, kind_class = nil, kind_java_class = nil, kind_store = nil, extension = nil, config = nil, processor = nil, processor_class = nil, processor_instance = nil; - - if ($iter) $Registry_add_document_processor$87.$$p = null; - - - if ($iter) $Registry_add_document_processor$87.$$p = null;; - kind_name = kind.$to_s().$tr("_", " "); - kind_class_symbol = $send(kind_name.$split(), 'map', [], ($$88 = function(it){var self = $$88.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$capitalize();}, $$88.$$s = self, $$88.$$arity = 1, $$88)).$join().$to_sym(); - kind_class = $$($nesting, 'Extensions').$const_get(kind_class_symbol, false); - kind_java_class = (function() {if ($truthy((($a = $$$('::', 'AsciidoctorJ', 'skip_raise')) ? 'constant' : nil))) { - - return $$$($$$('::', 'AsciidoctorJ'), 'Extensions').$const_get(kind_class_symbol, false); - } else { - return nil - }; return nil; })(); - kind_store = ($truthy($b = self.$instance_variable_get(((("" + "@") + (kind)) + "_extensions").$to_sym())) ? $b : self.$instance_variable_set(((("" + "@") + (kind)) + "_extensions").$to_sym(), [])); - extension = (function() {if ((block !== nil)) { - - config = self.$resolve_args(args, 1); - (processor = kind_class.$new(config)).$singleton_class().$enable_dsl(); - if (block.$arity()['$=='](0)) { - $send(processor, 'instance_exec', [], block.$to_proc()) - } else { - Opal.yield1(block, processor) - }; - if ($truthy(processor['$process_block_given?']())) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location())) - }; - processor.$freeze(); - return $$($nesting, 'ProcessorExtension').$new(kind, processor); - } else { - - $c = self.$resolve_args(args, 2), $b = Opal.to_ary($c), (processor = ($b[0] == null ? nil : $b[0])), (config = ($b[1] == null ? nil : $b[1])), $c; - if ($truthy((processor_class = $$($nesting, 'Helpers').$resolve_class(processor)))) { - - if ($truthy(($truthy($b = $rb_lt(processor_class, kind_class)) ? $b : ($truthy($c = kind_java_class) ? $rb_lt(processor_class, kind_java_class) : $c)))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "Invalid type for " + (kind_name) + " extension: " + (processor)) - }; - processor_instance = processor_class.$new(config); - processor_instance.$freeze(); - return $$($nesting, 'ProcessorExtension').$new(kind, processor_instance); - } else if ($truthy(($truthy($b = kind_class['$==='](processor)) ? $b : ($truthy($c = kind_java_class) ? kind_java_class['$==='](processor) : $c)))) { - - processor.$update_config(config); - processor.$freeze(); - return $$($nesting, 'ProcessorExtension').$new(kind, processor); - } else { - return self.$raise($$$('::', 'ArgumentError'), "" + "Invalid arguments specified for registering " + (kind_name) + " extension: " + (args)) - }; - }; return nil; })(); - if (extension.$config()['$[]']("position")['$=='](">>")) { - - kind_store.$unshift(extension); - } else { - - kind_store['$<<'](extension); - }; - return extension; - }, $Registry_add_document_processor$87.$$arity = 2); - - Opal.def(self, '$add_syntax_processor', $Registry_add_syntax_processor$89 = function $$add_syntax_processor(kind, args) { - var $iter = $Registry_add_syntax_processor$89.$$p, block = $iter || nil, $$90, $a, $b, $c, self = this, kind_name = nil, kind_class_symbol = nil, kind_class = nil, kind_java_class = nil, kind_store = nil, name = nil, config = nil, processor = nil, $writer = nil, processor_class = nil, processor_instance = nil; - - if ($iter) $Registry_add_syntax_processor$89.$$p = null; - - - if ($iter) $Registry_add_syntax_processor$89.$$p = null;; - kind_name = kind.$to_s().$tr("_", " "); - kind_class_symbol = $send(kind_name.$split(), 'map', [], ($$90 = function(it){var self = $$90.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$capitalize();}, $$90.$$s = self, $$90.$$arity = 1, $$90))['$<<']("Processor").$join().$to_sym(); - kind_class = $$($nesting, 'Extensions').$const_get(kind_class_symbol, false); - kind_java_class = (function() {if ($truthy((($a = $$$('::', 'AsciidoctorJ', 'skip_raise')) ? 'constant' : nil))) { - - return $$$($$$('::', 'AsciidoctorJ'), 'Extensions').$const_get(kind_class_symbol, false); - } else { - return nil - }; return nil; })(); - kind_store = ($truthy($b = self.$instance_variable_get(((("" + "@") + (kind)) + "_extensions").$to_sym())) ? $b : self.$instance_variable_set(((("" + "@") + (kind)) + "_extensions").$to_sym(), $hash2([], {}))); - if ((block !== nil)) { - - $c = self.$resolve_args(args, 2), $b = Opal.to_ary($c), (name = ($b[0] == null ? nil : $b[0])), (config = ($b[1] == null ? nil : $b[1])), $c; - (processor = kind_class.$new(self.$as_symbol(name), config)).$singleton_class().$enable_dsl(); - if (block.$arity()['$=='](0)) { - $send(processor, 'instance_exec', [], block.$to_proc()) - } else { - Opal.yield1(block, processor) - }; - if ($truthy((name = self.$as_symbol(processor.$name())))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension at " + (block.$source_location())) - }; - if ($truthy(processor['$process_block_given?']())) { - } else { - self.$raise($$$('::', 'NoMethodError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location())) - }; - processor.$freeze(); - - $writer = [name, $$($nesting, 'ProcessorExtension').$new(kind, processor)]; - $send(kind_store, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - - $c = self.$resolve_args(args, 3), $b = Opal.to_ary($c), (processor = ($b[0] == null ? nil : $b[0])), (name = ($b[1] == null ? nil : $b[1])), (config = ($b[2] == null ? nil : $b[2])), $c; - if ($truthy((processor_class = $$($nesting, 'Helpers').$resolve_class(processor)))) { - - if ($truthy(($truthy($b = $rb_lt(processor_class, kind_class)) ? $b : ($truthy($c = kind_java_class) ? $rb_lt(processor_class, kind_java_class) : $c)))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "Class specified for " + (kind_name) + " extension does not inherit from " + (kind_class) + ": " + (processor)) - }; - processor_instance = processor_class.$new(self.$as_symbol(name), config); - if ($truthy((name = self.$as_symbol(processor_instance.$name())))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension: " + (processor)) - }; - processor_instance.$freeze(); - - $writer = [name, $$($nesting, 'ProcessorExtension').$new(kind, processor_instance)]; - $send(kind_store, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else if ($truthy(($truthy($b = kind_class['$==='](processor)) ? $b : ($truthy($c = kind_java_class) ? kind_java_class['$==='](processor) : $c)))) { - - processor.$update_config(config); - if ($truthy((name = (function() {if ($truthy(name)) { - - - $writer = [self.$as_symbol(name)]; - $send(processor, 'name=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - - return self.$as_symbol(processor.$name()); - }; return nil; })()))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension: " + (processor)) - }; - processor.$freeze(); - - $writer = [name, $$($nesting, 'ProcessorExtension').$new(kind, processor)]; - $send(kind_store, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - return self.$raise($$$('::', 'ArgumentError'), "" + "Invalid arguments specified for registering " + (kind_name) + " extension: " + (args)) - }; - }; - }, $Registry_add_syntax_processor$89.$$arity = 2); - - Opal.def(self, '$resolve_args', $Registry_resolve_args$91 = function $$resolve_args(args, expect) { - var self = this, opts = nil, missing = nil; - - - opts = (function() {if ($truthy($$$('::', 'Hash')['$==='](args['$[]'](-1)))) { - return args.$pop() - } else { - return $hash2([], {}) - }; return nil; })(); - if (expect['$=='](1)) { - return opts}; - if ($truthy($rb_gt((missing = $rb_minus($rb_minus(expect, 1), args.$size())), 0))) { - args = $rb_plus(args, $$$('::', 'Array').$new(missing)) - } else if ($truthy($rb_lt(missing, 0))) { - args.$pop(missing['$-@']())}; - args['$<<'](opts); - return args; - }, $Registry_resolve_args$91.$$arity = 2); - return (Opal.def(self, '$as_symbol', $Registry_as_symbol$92 = function $$as_symbol(name) { - var self = this; - - if ($truthy(name)) { - return name.$to_sym() - } else { - return nil - } - }, $Registry_as_symbol$92.$$arity = 1), nil) && 'as_symbol'; - })($nesting[0], null, $nesting); - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $generate_name$93, $next_auto_id$94, $groups$95, $create$96, $register$97, $unregister_all$98, $unregister$99; - - - - Opal.def(self, '$generate_name', $generate_name$93 = function $$generate_name() { - var self = this; - - return "" + "extgrp" + (self.$next_auto_id()) - }, $generate_name$93.$$arity = 0); - - Opal.def(self, '$next_auto_id', $next_auto_id$94 = function $$next_auto_id() { - var $a, self = this; - if (self.auto_id == null) self.auto_id = nil; - - - self.auto_id = ($truthy($a = self.auto_id) ? $a : -1); - return (self.auto_id = $rb_plus(self.auto_id, 1)); - }, $next_auto_id$94.$$arity = 0); - - Opal.def(self, '$groups', $groups$95 = function $$groups() { - var $a, self = this; - if (self.groups == null) self.groups = nil; - - return (self.groups = ($truthy($a = self.groups) ? $a : $hash2([], {}))) - }, $groups$95.$$arity = 0); - - Opal.def(self, '$create', $create$96 = function $$create(name) { - var $iter = $create$96.$$p, block = $iter || nil, $a, self = this; - - if ($iter) $create$96.$$p = null; - - - if ($iter) $create$96.$$p = null;; - - if (name == null) { - name = nil; - }; - if ((block !== nil)) { - return $$($nesting, 'Registry').$new($hash(($truthy($a = name) ? $a : self.$generate_name()), block)) - } else { - return $$($nesting, 'Registry').$new() - }; - }, $create$96.$$arity = -1); - - Opal.def(self, '$register', $register$97 = function $$register($a) { - var $iter = $register$97.$$p, block = $iter || nil, $post_args, args, $b, self = this, argc = nil, resolved_group = nil, group = nil, name = nil, $writer = nil; - - if ($iter) $register$97.$$p = null; - - - if ($iter) $register$97.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - argc = args.$size(); - if ((block !== nil)) { - resolved_group = block - } else if ($truthy((group = args.$pop()))) { - resolved_group = ($truthy($b = $$($nesting, 'Helpers').$resolve_class(group)) ? $b : group) - } else { - self.$raise($$$('::', 'ArgumentError'), "Extension group to register not specified") - }; - name = ($truthy($b = args.$pop()) ? $b : self.$generate_name()); - if ($truthy(args['$empty?']())) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "Wrong number of arguments (" + (argc) + " for 1..2)") - }; - - $writer = [name.$to_sym(), resolved_group]; - $send(self.$groups(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - }, $register$97.$$arity = -1); - - Opal.def(self, '$unregister_all', $unregister_all$98 = function $$unregister_all() { - var self = this; - - - self.groups = $hash2([], {}); - return nil; - }, $unregister_all$98.$$arity = 0); - return (Opal.def(self, '$unregister', $unregister$99 = function $$unregister($a) { - var $post_args, names, $$100, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - names = $post_args;; - $send(names, 'each', [], ($$100 = function(group){var self = $$100.$$s || this; - if (self.groups == null) self.groups = nil; - - - - if (group == null) { - group = nil; - }; - return self.groups.$delete(group.$to_sym());}, $$100.$$s = self, $$100.$$arity = 1, $$100)); - return nil; - }, $unregister$99.$$arity = -1), nil) && 'unregister'; - })(Opal.get_singleton_class(self), $nesting); - })($nesting[0], $nesting) - })($nesting[0], $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/stylesheet"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$rstrip', '$read', '$join']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Stylesheets'); - - var $nesting = [self].concat($parent_nesting), $Stylesheets_primary_stylesheet_data$1; - - self.$$prototype.primary_stylesheet_data = nil; - return (Opal.def(self, '$primary_stylesheet_data', $Stylesheets_primary_stylesheet_data$1 = function $$primary_stylesheet_data() { - var $a, self = this; - - return (self.primary_stylesheet_data = ($truthy($a = self.primary_stylesheet_data) ? $a : $$$('::', 'IO').$read($$$('::', 'File').$join("css", "asciidoctor.css")).$rstrip())) - }, $Stylesheets_primary_stylesheet_data$1.$$arity = 0), nil) && 'primary_stylesheet_data' - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/document"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass; - - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Document'); - - var $nesting = [self].concat($parent_nesting), $Document_fill_datetime_attributes$1; - - return (Opal.def(self, '$fill_datetime_attributes', $Document_fill_datetime_attributes$1 = function $$fill_datetime_attributes(attrs, input_mtime) { - var self = this; - - - var $truthy = Opal.truthy - var $falsy = Opal.falsy - var nil = Opal.nil - var utc_offset - var source_date_epoch - - var getYear = function (time, utc_offset) { - return utc_offset === 0 ? time.getUTCFullYear() : time.getFullYear() - } - var getMonth = function (time, utc_offset) { - return utc_offset === 0 ? time.getUTCMonth() : time.getMonth() - } - var getDay = function (time, utc_offset) { - return utc_offset === 0 ? time.getUTCDate() : time.getDate() - } - var getHours = function (time, utc_offset) { - return utc_offset === 0 ? time.getUTCHours() : time.getHours() - } - - var now = new Date() - // See https://reproducible-builds.org/specs/source-date-epoch/ - if (Opal.const_get_qualified('::', 'ENV')['$key?']('SOURCE_DATE_EPOCH')) { - now.setTime(parseInt(Opal.const_get_qualified('::', 'ENV')['$[]']('SOURCE_DATE_EPOCH')) * 1000) - source_date_epoch = now - utc_offset = 0 // utc - } else { - utc_offset = -now.getTimezoneOffset() / 60 // local date - } - // localdate and localyear - if ($truthy((localdate = attrs['$[]']('localdate')))) { - if ($falsy(localyear = attrs['$[]']('localyear'))) { - localyear = localdate.indexOf('-') === 4 ? localdate.substring(0, 4) : nil - attrs['$[]=']('localyear', localyear) - } - } else { - var now_year = getYear(now, utc_offset).toString() - var now_month = ('0' + (getMonth(now, utc_offset) + 1)).slice(-2) - var now_day = ('0' + getDay(now, utc_offset)).slice(-2) - localdate = now_year + '-' + now_month + '-' + now_day - attrs['$[]=']('localdate', localdate) - localyear = now_year - attrs['$[]=']('localyear', now_year) - } - // localtime - if ($falsy((localtime = attrs['$[]']('localtime')))) { - var hours = ('0' + (getHours(now, utc_offset))).slice(-2) - var minutes = ('0' + (now.getMinutes())).slice(-2) - var seconds = ('0' + (now.getSeconds())).slice(-2) - var utc_offset_format - if (utc_offset === 0) { - utc_offset_format = 'UTC' - } else if (utc_offset > 0) { - utc_offset_format = ('+0' + (utc_offset * 100)).slice(-5) - } else { - utc_offset_format = ('-0' + (-utc_offset * 100)).slice(-5) - } - localtime = hours + ':' + minutes + ':' + seconds + ' ' + utc_offset_format - attrs['$[]=']('localtime', localtime) - } - // localdatetime - if ($falsy((localdatetime = attrs['$[]']('localdatetime')))) { - localdatetime = localdate + ' ' + localtime - attrs['$[]=']('localdatetime', localdatetime) - } - - // docdate, doctime and docdatetime should default to localdate, localtime and localdatetime if not otherwise set - if ($truthy(source_date_epoch)) { - input_mtime = source_date_epoch - } else if ($truthy(input_mtime)) { - utc_offset = -input_mtime.getTimezoneOffset() / 60 - } else { - input_mtime = now - } - - // docdate and docyear - if ($truthy(docdate = attrs['$[]']('docdate'))) { - attrs['$[]=']('docyear', docdate.indexOf('-') === 4 ? docdate.substring(0, 4) : nil) - } else { - var mtime_year = getYear(input_mtime, utc_offset).toString() - var mtime_month = ('0' + (getMonth(input_mtime, utc_offset) + 1)).slice(-2) - var mtime_day = ('0' + (getDay(input_mtime, utc_offset))).slice(-2) - docdate = mtime_year + '-' + mtime_month + '-' + mtime_day - attrs['$[]=']('docdate', docdate) - if ($falsy(attrs['$[]']('docyear'))) { - attrs['$[]=']('docyear', mtime_year) - } - } - // doctime - if ($falsy(doctime = attrs['$[]']('doctime'))) { - var mtime_hours = ('0' + (getHours(input_mtime, utc_offset))).slice(-2) - var mtime_minutes = ('0' + (input_mtime.getMinutes())).slice(-2) - var mtime_seconds = ('0' + (input_mtime.getSeconds())).slice(-2) - if (utc_offset === 0) { - utc_offset_format = 'UTC' - } else if (utc_offset > 0) { - utc_offset_format = ('+0' + (utc_offset * 100)).slice(-5) - } else { - utc_offset_format = ('-0' + (-utc_offset * 100)).slice(-5) - } - doctime = mtime_hours + ':' + mtime_minutes + ':' + mtime_seconds + ' ' + utc_offset_format - attrs['$[]=']('doctime', doctime) - } - // docdatetime - if ($falsy(attrs['$[]']('docdatetime'))) { - attrs['$[]=']('docdatetime', docdate + ' ' + doctime) - } - return nil - - }, $Document_fill_datetime_attributes$1.$$arity = 2), nil) && 'fill_datetime_attributes' - })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/substitutors"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module; - - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'Substitutors'); - - var $nesting = [self].concat($parent_nesting), $Substitutors_sub_placeholder$1; - - - Opal.def(self, '$sub_placeholder', $Substitutors_sub_placeholder$1 = function $$sub_placeholder(format_string, replacement) { - var self = this; - - return format_string.replace('%s', replacement); - }, $Substitutors_sub_placeholder$1.$$arity = 2) - })($nesting[0], $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/parser"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy; - - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Parser'); - - var $nesting = [self].concat($parent_nesting), $Parser_uniform$ques$1, $Parser_uniform$ques$2; - - if ($truthy(String.prototype.repeat)) { - return (Opal.defs(self, '$uniform?', $Parser_uniform$ques$1 = function(str, chr, len) { - var self = this; - - return chr.repeat(len) === str; - }, $Parser_uniform$ques$1.$$arity = 3), nil) && 'uniform?' - } else { - return (Opal.defs(self, '$uniform?', $Parser_uniform$ques$2 = function(str, chr, len) { - var self = this; - - return Array.apply(null, { length: len }).map(function () { return chr }).join('') === str; - }, $Parser_uniform$ques$2.$$arity = 3), nil) && 'uniform?' - } - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/syntax_highlighter"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy; - - Opal.add_stubs(['$key?', '$registry', '$[]', '$include?', '$include', '$empty?', '$debug', '$logger', '$join', '$keys']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'SyntaxHighlighter'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'Factory'); - - var $nesting = [self].concat($parent_nesting), $Factory_for$1; - - - Opal.def(self, '$for', $Factory_for$1 = function(name) { - var self = this; - - if ($truthy(self.$registry()['$key?'](name))) { - return self.$registry()['$[]'](name) - } else { - - if ($truthy(self['$include?']($$($nesting, 'Logging')))) { - } else { - self.$include($$($nesting, 'Logging')) - }; - if ($truthy(self.$registry()['$empty?']())) { - self.$logger().$debug("no syntax highlighter available, functionality disabled.") - } else { - self.$logger().$debug("" + "syntax highlighter named '" + (name) + "' is not available, must be one of: '" + (self.$registry().$keys().$join("', '")) + "'.") - }; - return nil; - } - }, $Factory_for$1.$$arity = 1) - })($nesting[0], $nesting) - })($nesting[0], $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - self.$require("asciidoctor/js/asciidoctor_ext/stylesheet"); - self.$require("asciidoctor/js/asciidoctor_ext/document"); - self.$require("asciidoctor/js/asciidoctor_ext/substitutors"); - self.$require("asciidoctor/js/asciidoctor_ext/parser"); - self.$require("asciidoctor/js/asciidoctor_ext/syntax_highlighter"); - -// Load specific runtime - -; -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/logger"] = function(Opal) { - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$chr', '$rjust', '$message_as_string', '$<', '$write', '$call', '$[]']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Logger'); - - var $nesting = [self].concat($parent_nesting), $Logger_add$2; - - self.$$prototype.level = self.$$prototype.progname = self.$$prototype.pipe = self.$$prototype.formatter = nil; - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Formatter'); - - var $nesting = [self].concat($parent_nesting), $Formatter_call$1; - - return (Opal.def(self, '$call', $Formatter_call$1 = function $$call(severity, time, progname, msg) { - var self = this, time_format = nil; - - - time_format = time.getFullYear() + '-' + ('0'+(time.getMonth()+1)).slice(-2) + '-' + ('0'+time.getDate()).slice(-2) + 'T' + ('0'+time.getHours()).slice(-2) + ':' + ('0'+time.getMinutes()).slice(-2) + ':' + ('0'+time.getSeconds()).slice(-2) + '.' + ('00' + new Date().getMilliseconds() * 1000).slice(-6); - return "" + (severity.$chr()) + ", [" + (time_format) + "] " + (severity.$rjust(5)) + " -- " + (progname) + ": " + (self.$message_as_string(msg)); - }, $Formatter_call$1.$$arity = 4), nil) && 'call' - })($nesting[0], null, $nesting); - return (Opal.def(self, '$add', $Logger_add$2 = function $$add(severity, message, progname) { - var $iter = $Logger_add$2.$$p, block = $iter || nil, $a, self = this; - - if ($iter) $Logger_add$2.$$p = null; - - - if ($iter) $Logger_add$2.$$p = null;; - - if (message == null) { - message = nil; - }; - - if (progname == null) { - progname = nil; - }; - if ($truthy($rb_lt((severity = ($truthy($a = severity) ? $a : $$($nesting, 'UNKNOWN'))), self.level))) { - return true}; - progname = ($truthy($a = progname) ? $a : self.progname); - if ($truthy(message)) { - } else if ((block !== nil)) { - message = Opal.yieldX(block, []) - } else { - - message = progname; - progname = self.progname; - }; - self.pipe.$write(self.formatter.$call(($truthy($a = $$($nesting, 'SEVERITY_LABELS')['$[]'](severity)) ? $a : "ANY"), new Date(), progname, message)); - return true; - }, $Logger_add$2.$$arity = -2), nil) && 'add'; - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/postscript"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - self.$require("asciidoctor/converter/composite"); - self.$require("asciidoctor/converter/html5"); - self.$require("asciidoctor/extensions"); - self.$require("asciidoctor/js/asciidoctor_ext"); - return self.$require("asciidoctor/js/opal_ext/logger"); -}; - -/* Generated by Opal 0.11.99.dev */ -(function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy; - - Opal.add_stubs(['$require', '$==', '$tap', '$each', '$constants', '$const_get', '$downcase', '$to_s', '$[]=', '$-', '$upcase', '$[]', '$values', '$new', '$attr_reader', '$instance_variable_set', '$send', '$singleton_class', '$<<', '$define', '$dirname', '$absolute_path', '$__dir__', '$join', '$home', '$pwd', '$to_set', '$chr', '$each_key', '$slice', '$length', '$merge', '$default=', '$drop', '$insert']); - - self.$require("set"); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - self.$require("asciidoctor/js") - } else { - nil - }; - (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting), $a, $b, $Asciidoctor$7, $Asciidoctor$9, $Asciidoctor$11, $Asciidoctor$13, $writer = nil; - - - Opal.const_set($nesting[0], 'RUBY_ENGINE_OPAL', Opal.const_set($nesting[0], 'RUBY_ENGINE', $$$('::', 'RUBY_ENGINE'))['$==']("opal")); - (function($base, $parent_nesting) { - var self = $module($base, 'SafeMode'); - - var $nesting = [self].concat($parent_nesting), $SafeMode$1, $SafeMode_value_for_name$3, $SafeMode_name_for_value$4, $SafeMode_names$5; - - - Opal.const_set($nesting[0], 'UNSAFE', 0); - Opal.const_set($nesting[0], 'SAFE', 1); - Opal.const_set($nesting[0], 'SERVER', 10); - Opal.const_set($nesting[0], 'SECURE', 20); - self.names_by_value = $send($hash2([], {}), 'tap', [], ($SafeMode$1 = function(accum){var self = $SafeMode$1.$$s || this, $$2; - - - - if (accum == null) { - accum = nil; - }; - return $send(self.$constants(false), 'each', [], ($$2 = function(sym){var self = $$2.$$s || this, $writer = nil; - - - - if (sym == null) { - sym = nil; - }; - $writer = [self.$const_get(sym, false), sym.$to_s().$downcase()]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$2.$$s = self, $$2.$$arity = 1, $$2));}, $SafeMode$1.$$s = self, $SafeMode$1.$$arity = 1, $SafeMode$1)); - Opal.defs(self, '$value_for_name', $SafeMode_value_for_name$3 = function $$value_for_name(name) { - var self = this; - - return self.$const_get(name.$upcase(), false) - }, $SafeMode_value_for_name$3.$$arity = 1); - Opal.defs(self, '$name_for_value', $SafeMode_name_for_value$4 = function $$name_for_value(value) { - var self = this; - if (self.names_by_value == null) self.names_by_value = nil; - - return self.names_by_value['$[]'](value) - }, $SafeMode_name_for_value$4.$$arity = 1); - Opal.defs(self, '$names', $SafeMode_names$5 = function $$names() { - var self = this; - if (self.names_by_value == null) self.names_by_value = nil; - - return self.names_by_value.$values() - }, $SafeMode_names$5.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Compliance'); - - var $nesting = [self].concat($parent_nesting); - - - self.keys = $$$('::', 'Set').$new(); - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $define$6; - - - self.$attr_reader("keys"); - return (Opal.def(self, '$define', $define$6 = function $$define(key, value) { - var self = this; - if (self.keys == null) self.keys = nil; - - - self.$instance_variable_set("" + "@" + (key), value); - self.$singleton_class().$send("attr_accessor", key); - self.keys['$<<'](key); - return nil; - }, $define$6.$$arity = 2), nil) && 'define'; - })(Opal.get_singleton_class(self), $nesting); - self.$define("block_terminates_paragraph", true); - self.$define("strict_verbatim_paragraphs", true); - self.$define("underline_style_section_titles", true); - self.$define("unwrap_standalone_preamble", true); - self.$define("attribute_missing", "skip"); - self.$define("attribute_undefined", "drop-line"); - self.$define("shorthand_property_syntax", true); - self.$define("natural_xrefs", true); - self.$define("unique_id_start_index", 2); - self.$define("markdown_syntax", true); - })($nesting[0], $nesting); - if ($truthy((($a = $$($nesting, 'ROOT_DIR', 'skip_raise')) ? 'constant' : nil))) { - } else { - Opal.const_set($nesting[0], 'ROOT_DIR', $$$('::', 'File').$dirname($$$('::', 'File').$absolute_path(self.$__dir__()))) - }; - Opal.const_set($nesting[0], 'LIB_DIR', $$$('::', 'File').$join($$($nesting, 'ROOT_DIR'), "lib")); - Opal.const_set($nesting[0], 'DATA_DIR', $$$('::', 'File').$join($$($nesting, 'ROOT_DIR'), "data")); - Opal.const_set($nesting[0], 'USER_HOME', (function() { try { - return $$$('::', 'Dir').$home() - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - - return ($truthy($b = $$$('::', 'ENV')['$[]']("HOME")) ? $b : $$$('::', 'Dir').$pwd()); - } finally { Opal.pop_exception() } - } else { throw $err; } - }})()); - Opal.const_set($nesting[0], 'LF', "\n"); - Opal.const_set($nesting[0], 'NULL', "\u0000"); - Opal.const_set($nesting[0], 'TAB', "\t"); - Opal.const_set($nesting[0], 'MAX_INT', 9007199254740991); - Opal.const_set($nesting[0], 'UTF_8', $$$($$$('::', 'Encoding'), 'UTF_8')); - Opal.const_set($nesting[0], 'BOM_BYTES_UTF_8', [239, 187, 191]); - Opal.const_set($nesting[0], 'BOM_BYTES_UTF_16LE', [255, 254]); - Opal.const_set($nesting[0], 'BOM_BYTES_UTF_16BE', [254, 255]); - Opal.const_set($nesting[0], 'FILE_READ_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) { - return "r" - } else { - return "rb:utf-8:utf-8" - }; return nil; })()); - Opal.const_set($nesting[0], 'URI_READ_MODE', $$($nesting, 'FILE_READ_MODE')); - Opal.const_set($nesting[0], 'FILE_WRITE_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) { - return "w" - } else { - return "w:utf-8" - }; return nil; })()); - Opal.const_set($nesting[0], 'DEFAULT_DOCTYPE', "article"); - Opal.const_set($nesting[0], 'DEFAULT_BACKEND', "html5"); - Opal.const_set($nesting[0], 'DEFAULT_STYLESHEET_KEYS', ["", "DEFAULT"].$to_set()); - Opal.const_set($nesting[0], 'DEFAULT_STYLESHEET_NAME', "asciidoctor.css"); - Opal.const_set($nesting[0], 'BACKEND_ALIASES', $hash2(["html", "docbook"], {"html": "html5", "docbook": "docbook5"})); - Opal.const_set($nesting[0], 'DEFAULT_PAGE_WIDTHS', $hash2(["docbook"], {"docbook": 425})); - Opal.const_set($nesting[0], 'DEFAULT_EXTENSIONS', $hash2(["html", "docbook", "pdf", "epub", "manpage", "asciidoc"], {"html": ".html", "docbook": ".xml", "pdf": ".pdf", "epub": ".epub", "manpage": ".man", "asciidoc": ".adoc"})); - Opal.const_set($nesting[0], 'ASCIIDOC_EXTENSIONS', $hash2([".adoc", ".asciidoc", ".asc", ".ad", ".txt"], {".adoc": true, ".asciidoc": true, ".asc": true, ".ad": true, ".txt": true})); - Opal.const_set($nesting[0], 'SETEXT_SECTION_LEVELS', $hash2(["=", "-", "~", "^", "+"], {"=": 0, "-": 1, "~": 2, "^": 3, "+": 4})); - Opal.const_set($nesting[0], 'ADMONITION_STYLES', ["NOTE", "TIP", "IMPORTANT", "WARNING", "CAUTION"].$to_set()); - Opal.const_set($nesting[0], 'ADMONITION_STYLE_HEADS', $send($$$('::', 'Set').$new(), 'tap', [], ($Asciidoctor$7 = function(accum){var self = $Asciidoctor$7.$$s || this, $$8; - - - - if (accum == null) { - accum = nil; - }; - return $send($$($nesting, 'ADMONITION_STYLES'), 'each', [], ($$8 = function(s){var self = $$8.$$s || this; - - - - if (s == null) { - s = nil; - }; - return accum['$<<'](s.$chr());}, $$8.$$s = self, $$8.$$arity = 1, $$8));}, $Asciidoctor$7.$$s = self, $Asciidoctor$7.$$arity = 1, $Asciidoctor$7))); - Opal.const_set($nesting[0], 'PARAGRAPH_STYLES', ["comment", "example", "literal", "listing", "normal", "open", "pass", "quote", "sidebar", "source", "verse", "abstract", "partintro"].$to_set()); - Opal.const_set($nesting[0], 'VERBATIM_STYLES', ["literal", "listing", "source", "verse"].$to_set()); - Opal.const_set($nesting[0], 'DELIMITED_BLOCKS', $hash2(["--", "----", "....", "====", "****", "____", "++++", "|===", ",===", ":===", "!===", "////", "```"], {"--": ["open", ["comment", "example", "literal", "listing", "pass", "quote", "sidebar", "source", "verse", "admonition", "abstract", "partintro"].$to_set()], "----": ["listing", ["literal", "source"].$to_set()], "....": ["literal", ["listing", "source"].$to_set()], "====": ["example", ["admonition"].$to_set()], "****": ["sidebar", $$$('::', 'Set').$new()], "____": ["quote", ["verse"].$to_set()], "++++": ["pass", ["stem", "latexmath", "asciimath"].$to_set()], "|===": ["table", $$$('::', 'Set').$new()], ",===": ["table", $$$('::', 'Set').$new()], ":===": ["table", $$$('::', 'Set').$new()], "!===": ["table", $$$('::', 'Set').$new()], "////": ["comment", $$$('::', 'Set').$new()], "```": ["fenced_code", $$$('::', 'Set').$new()]})); - Opal.const_set($nesting[0], 'DELIMITED_BLOCK_HEADS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$9 = function(accum){var self = $Asciidoctor$9.$$s || this, $$10; - - - - if (accum == null) { - accum = nil; - }; - return $send($$($nesting, 'DELIMITED_BLOCKS'), 'each_key', [], ($$10 = function(k){var self = $$10.$$s || this, $writer = nil; - - - - if (k == null) { - k = nil; - }; - $writer = [k.$slice(0, 2), true]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$10.$$s = self, $$10.$$arity = 1, $$10));}, $Asciidoctor$9.$$s = self, $Asciidoctor$9.$$arity = 1, $Asciidoctor$9))); - Opal.const_set($nesting[0], 'DELIMITED_BLOCK_TAILS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$11 = function(accum){var self = $Asciidoctor$11.$$s || this, $$12; - - - - if (accum == null) { - accum = nil; - }; - return $send($$($nesting, 'DELIMITED_BLOCKS'), 'each_key', [], ($$12 = function(k){var self = $$12.$$s || this, $writer = nil; - - - - if (k == null) { - k = nil; - }; - if (k.$length()['$=='](4)) { - - $writer = [k, k['$[]']($rb_minus(k.$length(), 1))]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - return nil - };}, $$12.$$s = self, $$12.$$arity = 1, $$12));}, $Asciidoctor$11.$$s = self, $Asciidoctor$11.$$arity = 1, $Asciidoctor$11))); - Opal.const_set($nesting[0], 'CAPTION_ATTRIBUTE_NAMES', $hash2(["example", "figure", "listing", "table"], {"example": "example-caption", "figure": "figure-caption", "listing": "listing-caption", "table": "table-caption"})); - Opal.const_set($nesting[0], 'LAYOUT_BREAK_CHARS', $hash2(["'", "<"], {"'": "thematic_break", "<": "page_break"})); - Opal.const_set($nesting[0], 'MARKDOWN_THEMATIC_BREAK_CHARS', $hash2(["-", "*", "_"], {"-": "thematic_break", "*": "thematic_break", "_": "thematic_break"})); - Opal.const_set($nesting[0], 'HYBRID_LAYOUT_BREAK_CHARS', $$($nesting, 'LAYOUT_BREAK_CHARS').$merge($$($nesting, 'MARKDOWN_THEMATIC_BREAK_CHARS'))); - Opal.const_set($nesting[0], 'NESTABLE_LIST_CONTEXTS', ["ulist", "olist", "dlist"]); - Opal.const_set($nesting[0], 'ORDERED_LIST_STYLES', ["arabic", "loweralpha", "lowerroman", "upperalpha", "upperroman"]); - Opal.const_set($nesting[0], 'ORDERED_LIST_KEYWORDS', $hash2(["loweralpha", "lowerroman", "upperalpha", "upperroman"], {"loweralpha": "a", "lowerroman": "i", "upperalpha": "A", "upperroman": "I"})); - Opal.const_set($nesting[0], 'ATTR_REF_HEAD', "{"); - Opal.const_set($nesting[0], 'LIST_CONTINUATION', "+"); - Opal.const_set($nesting[0], 'HARD_LINE_BREAK', " +"); - Opal.const_set($nesting[0], 'LINE_CONTINUATION', " \\"); - Opal.const_set($nesting[0], 'LINE_CONTINUATION_LEGACY', " +"); - Opal.const_set($nesting[0], 'BLOCK_MATH_DELIMITERS', $hash2(["asciimath", "latexmath"], {"asciimath": ["\\$", "\\$"], "latexmath": ["\\[", "\\]"]})); - Opal.const_set($nesting[0], 'INLINE_MATH_DELIMITERS', $hash2(["asciimath", "latexmath"], {"asciimath": ["\\$", "\\$"], "latexmath": ["\\(", "\\)"]})); - - $writer = ["asciimath"]; - $send(Opal.const_set($nesting[0], 'STEM_TYPE_ALIASES', $hash2(["latexmath", "latex", "tex"], {"latexmath": "latexmath", "latex": "latexmath", "tex": "latexmath"})), 'default=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - Opal.const_set($nesting[0], 'FONT_AWESOME_VERSION', "4.7.0"); - Opal.const_set($nesting[0], 'HIGHLIGHT_JS_VERSION', "9.18.3"); - Opal.const_set($nesting[0], 'MATHJAX_VERSION', "2.7.9"); - Opal.const_set($nesting[0], 'DEFAULT_ATTRIBUTES', $hash2(["appendix-caption", "appendix-refsig", "caution-caption", "chapter-refsig", "example-caption", "figure-caption", "important-caption", "last-update-label", "note-caption", "part-refsig", "prewrap", "sectids", "section-refsig", "table-caption", "tip-caption", "toc-placement", "toc-title", "untitled-label", "version-label", "warning-caption"], {"appendix-caption": "Appendix", "appendix-refsig": "Appendix", "caution-caption": "Caution", "chapter-refsig": "Chapter", "example-caption": "Example", "figure-caption": "Figure", "important-caption": "Important", "last-update-label": "Last updated", "note-caption": "Note", "part-refsig": "Part", "prewrap": "", "sectids": "", "section-refsig": "Section", "table-caption": "Table", "tip-caption": "Tip", "toc-placement": "auto", "toc-title": "Table of Contents", "untitled-label": "Untitled", "version-label": "Version", "warning-caption": "Warning"})); - Opal.const_set($nesting[0], 'FLEXIBLE_ATTRIBUTES', ["sectnums"]); - Opal.const_set($nesting[0], 'INTRINSIC_ATTRIBUTES', $hash2(["startsb", "endsb", "vbar", "caret", "asterisk", "tilde", "plus", "backslash", "backtick", "blank", "empty", "sp", "two-colons", "two-semicolons", "nbsp", "deg", "zwsp", "quot", "apos", "lsquo", "rsquo", "ldquo", "rdquo", "wj", "brvbar", "pp", "cpp", "amp", "lt", "gt"], {"startsb": "[", "endsb": "]", "vbar": "|", "caret": "^", "asterisk": "*", "tilde": "~", "plus": "+", "backslash": "\\", "backtick": "`", "blank": "", "empty": "", "sp": " ", "two-colons": "::", "two-semicolons": ";;", "nbsp": " ", "deg": "°", "zwsp": "​", "quot": """, "apos": "'", "lsquo": "‘", "rsquo": "’", "ldquo": "“", "rdquo": "”", "wj": "⁠", "brvbar": "¦", "pp": "++", "cpp": "C++", "amp": "&", "lt": "<", "gt": ">"})); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - Opal.const_set($nesting[0], 'QUOTE_SUBS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$13 = function(accum){var self = $Asciidoctor$13.$$s || this, normal = nil, compat = nil; - - - - if (accum == null) { - accum = nil; - }; - - $writer = [false, (normal = [["strong", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?\\*\\*(" + ($$($nesting, 'CC_ALL')) + "+?)\\*\\*", 'm')], ["strong", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?\\*(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\*(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["double", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?\"`(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)`\"(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["single", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:`}])(?:\\[([^\\]]+)\\])?'`(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)`'(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["monospaced", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?``(" + ($$($nesting, 'CC_ALL')) + "+?)``", 'm')], ["monospaced", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:\"'`}])(?:\\[([^\\]]+)\\])?`(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)`(?![" + ($$($nesting, 'CC_WORD')) + "\"'`])", 'm')], ["emphasis", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?__(" + ($$($nesting, 'CC_ALL')) + "+?)__", 'm')], ["emphasis", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?_(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)_(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["mark", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?##(" + ($$($nesting, 'CC_ALL')) + "+?)##", 'm')], ["mark", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + "&;:}])(?:\\[([^\\]]+)\\])?#(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)#(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["superscript", "unconstrained", /\\?(?:\[([^\]]+)\])?\^(\S+?)\^/], ["subscript", "unconstrained", /\\?(?:\[([^\]]+)\])?~(\S+?)~/]])]; - $send(accum, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [true, (compat = normal.$drop(0))]; - $send(accum, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [2, ["double", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?``(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)''(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')]]; - $send(compat, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [3, ["single", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?`(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)'(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')]]; - $send(compat, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [4, ["monospaced", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?\\+\\+(" + ($$($nesting, 'CC_ALL')) + "+?)\\+\\+", 'm')]]; - $send(compat, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [5, ["monospaced", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?\\+(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\+(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')]]; - $send(compat, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return compat.$insert(3, ["emphasis", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?'(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)'(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')]);}, $Asciidoctor$13.$$s = self, $Asciidoctor$13.$$arity = 1, $Asciidoctor$13))); - Opal.const_set($nesting[0], 'REPLACEMENTS', [[/\\?\(C\)/, "©", "none"], [/\\?\(R\)/, "®", "none"], [/\\?\(TM\)/, "™", "none"], [/(?: |\n|^|\\)--(?: |\n|$)/, " — ", "none"], [new RegExp("" + "(" + ($$($nesting, 'CG_WORD')) + ")\\\\?--(?=" + ($$($nesting, 'CG_WORD')) + ")"), "—​", "leading"], [/\\?\.\.\./, "…​", "none"], [/\\?`'/, "’", "none"], [new RegExp("" + "(" + ($$($nesting, 'CG_ALNUM')) + ")\\\\?'(?=" + ($$($nesting, 'CG_ALPHA')) + ")"), "’", "leading"], [/\\?->/, "→", "none"], [/\\?=>/, "⇒", "none"], [/\\?<-/, "←", "none"], [/\\?<=/, "⇐", "none"], [/\\?(&)amp;((?:[a-zA-Z][a-zA-Z]+\d{0,2}|#\d\d\d{0,4}|#x[\da-fA-F][\da-fA-F][\da-fA-F]{0,3});)/, "", "bounding"]]); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - })($nesting[0], $nesting); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/core_ext"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/helpers"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/logging"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/rx"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/substitutors"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/version"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/abstract_node"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/abstract_block"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/attribute_list"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/block"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/callouts"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/converter"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/document"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/inline"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/list"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/parser"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/path_resolver"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/reader"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/section"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/stylesheets"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/table"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/writer"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/load"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/convert"); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/syntax_highlighter"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/timings"); - return self.$require("asciidoctor/js/postscript"); - } else { - return nil - }; -})(Opal); - - -/* global Opal */ - -/** - * Convert a JSON to an (Opal) Hash. - * @private - */ -var toHash = function (object) { - return object && !object.$$is_hash ? Opal.hash2(Object.keys(object), object) : object -} - -/** - * Convert an (Opal) Hash to JSON. - * @private - */ -var fromHash = function (hash) { - var object = {} - if (hash) { - var stringMap = hash.$$smap - for (var stringMapKey in stringMap) { - var stringMapValue = stringMap[stringMapKey] - object[stringMapKey] = stringMapValue === Opal.nil ? undefined : stringMapValue - } - var numericMap = hash.$$map - if (numericMap) { - var positional = [] - for (var numericMapKey in numericMap) { - var entry = numericMap[numericMapKey] - var numericMapValue = entry.value - var index = entry.key - 1 - positional[index] = numericMapValue === Opal.nil ? undefined : numericMapValue - } - if (positional.length > 0) { - object.$positional = positional - } - } - } - return object -} - -var fromHashKeys = function (hash) { - var object = {} - if (hash) { - var data = hash.$$keys - for (var key in data) { - var value = data[key].value - object[key.toString()] = value === Opal.nil ? undefined : value - } - } - return object -} - -/** - * @private - */ -var prepareOptions = function (options) { - options = toHash(options) - if (options) { - var attrs = options['$[]']('attributes') - if (attrs && typeof attrs === 'object' && attrs.constructor.name === 'Object') { - options = options.$dup() - options['$[]=']('attributes', toHash(attrs)) - } - } - return options -} - -function initializeClass (superClass, className, functions, defaultFunctions, argProxyFunctions) { - var scope = Opal.klass(Opal.Object, superClass, className, function () { }) - var postConstructFunction - var initializeFunction - var constructorFunction - var defaultFunctionsOverridden = {} - for (var functionName in functions) { - if (Object.prototype.hasOwnProperty.call(functions, functionName)) { - (function (functionName) { - var userFunction = functions[functionName] - if (functionName === 'postConstruct') { - postConstructFunction = userFunction - } else if (functionName === 'initialize') { - initializeFunction = userFunction - } else if (functionName === 'constructor') { - constructorFunction = userFunction - } else { - if (defaultFunctions && Object.prototype.hasOwnProperty.call(defaultFunctions, functionName)) { - defaultFunctionsOverridden[functionName] = true - } - Opal.def(scope, '$' + functionName, function () { - var args - if (argProxyFunctions && Object.prototype.hasOwnProperty.call(argProxyFunctions, functionName)) { - args = argProxyFunctions[functionName](arguments) - } else { - args = arguments - } - return userFunction.apply(this, args) - }) - } - }(functionName)) - } - } - var initialize - if (typeof constructorFunction === 'function') { - initialize = function () { - var args = Array.from(arguments) - for (var i = 0; i < args.length; i++) { - // convert all (Opal) Hash arguments to JSON. - if (typeof args[i] === 'object' && '$$smap' in args[i]) { - args[i] = fromHash(args[i]) - } - } - args.unshift(null) - var result = new (Function.prototype.bind.apply(constructorFunction, args)) // eslint-disable-line - Object.assign(this, result) - if (typeof postConstructFunction === 'function') { - postConstructFunction.bind(this)() - } - } - } else if (typeof initializeFunction === 'function') { - initialize = function () { - var args = Array.from(arguments) - for (var i = 0; i < args.length; i++) { - // convert all (Opal) Hash arguments to JSON. - if (typeof args[i] === 'object' && '$$smap' in args[i]) { - args[i] = fromHash(args[i]) - } - } - initializeFunction.apply(this, args) - if (typeof postConstructFunction === 'function') { - postConstructFunction.bind(this)() - } - } - } else { - initialize = function () { - Opal.send(this, Opal.find_super_dispatcher(this, 'initialize', initialize)) - if (typeof postConstructFunction === 'function') { - postConstructFunction.bind(this)() - } - } - } - Opal.def(scope, '$initialize', initialize) - Opal.def(scope, 'super', function (func) { - if (typeof func === 'function') { - Opal.send(this, Opal.find_super_dispatcher(this, func.name, func)) - } else { - // Bind the initialize function to super(); - var argumentsList = Array.from(arguments) - for (var i = 0; i < argumentsList.length; i++) { - // convert all (Opal) Hash arguments to JSON. - if (typeof argumentsList[i] === 'object') { - argumentsList[i] = toHash(argumentsList[i]) - } - } - Opal.send(this, Opal.find_super_dispatcher(this, 'initialize', initialize), argumentsList) - } - }) - if (defaultFunctions) { - for (var defaultFunctionName in defaultFunctions) { - if (Object.prototype.hasOwnProperty.call(defaultFunctions, defaultFunctionName) && !Object.prototype.hasOwnProperty.call(defaultFunctionsOverridden, defaultFunctionName)) { - (function (defaultFunctionName) { - var defaultFunction = defaultFunctions[defaultFunctionName] - Opal.def(scope, '$' + defaultFunctionName, function () { - return defaultFunction.apply(this, arguments) - }) - }(defaultFunctionName)) - } - } - } - return scope -} - -// Asciidoctor API - -/** - * @namespace - * @description - * The main application interface (API) for Asciidoctor. - * This API provides methods to parse AsciiDoc content and convert it to various output formats using built-in or third-party converters. - * - * An AsciiDoc document can be as simple as a single line of content, - * though it more commonly starts with a document header that declares the document title and document attribute definitions. - * The document header is then followed by zero or more section titles, optionally nested, to organize the paragraphs, blocks, lists, etc. of the document. - * - * By default, the processor converts the AsciiDoc document to HTML 5 using a built-in converter. - * However, this behavior can be changed by specifying a different backend (e.g., +docbook+). - * A backend is a keyword for an output format (e.g., DocBook). - * That keyword, in turn, is used to select a converter, which carries out the request to convert the document to that format. - * - * @example - * asciidoctor.convertFile('document.adoc', { 'safe': 'safe' }) // Convert an AsciiDoc file - * - * asciidoctor.convert("I'm using *Asciidoctor* version {asciidoctor-version}.", { 'safe': 'safe' }) // Convert an AsciiDoc string - * - * const doc = asciidoctor.loadFile('document.adoc', { 'safe': 'safe' }) // Parse an AsciiDoc file into a document object - * - * const doc = asciidoctor.load("= Document Title\n\nfirst paragraph\n\nsecond paragraph", { 'safe': 'safe' }) // Parse an AsciiDoc string into a document object - */ -var Asciidoctor = Opal.Asciidoctor.$$class - -/** - * Get Asciidoctor core version number. - * - * @returns {string} - the version number of Asciidoctor core. - * @memberof Asciidoctor - */ -Asciidoctor.prototype.getCoreVersion = function () { - return this.$$const.VERSION -} - -/** - * Get Asciidoctor.js runtime environment information. - * - * @returns {Object} - the runtime environment including the ioModule, the platform, the engine and the framework. - * @memberof Asciidoctor - */ -Asciidoctor.prototype.getRuntime = function () { - return { - ioModule: Opal.const_get_qualified('::', 'JAVASCRIPT_IO_MODULE'), - platform: Opal.const_get_qualified('::', 'JAVASCRIPT_PLATFORM'), - engine: Opal.const_get_qualified('::', 'JAVASCRIPT_ENGINE'), - framework: Opal.const_get_qualified('::', 'JAVASCRIPT_FRAMEWORK') - } -} - -/** - * Parse the AsciiDoc source input into an {@link Document} and convert it to the specified backend format. - * - * Accepts input as a Buffer or String. - * - * @param {string|Buffer} input - AsciiDoc input as String or Buffer - * @param {Object} options - a JSON of options to control processing (default: {}) - * @returns {string|Document} - the {@link Document} object if the converted String is written to a file, - * otherwise the converted String - * @example - * var input = '= Hello, AsciiDoc!\n' + - * 'Guillaume Grossetie \n\n' + - * 'An introduction to http://asciidoc.org[AsciiDoc].\n\n' + - * '== First Section\n\n' + - * '* item 1\n' + - * '* item 2\n'; - * - * var html = asciidoctor.convert(input); - * @memberof Asciidoctor - */ -Asciidoctor.prototype.convert = function (input, options) { - if (typeof input === 'object' && input.constructor.name === 'Buffer') { - input = input.toString('utf8') - } - var result = this.$convert(input, prepareOptions(options)) - return result === Opal.nil ? '' : result -} - -/** - * Parse the AsciiDoc source input into an {@link Document} and convert it to the specified backend format. - * - * @param {string} filename - source filename - * @param {Object} options - a JSON of options to control processing (default: {}) - * @returns {string|Document} - the {@link Document} object if the converted String is written to a file, - * otherwise the converted String - * @example - * var html = asciidoctor.convertFile('./document.adoc'); - * @memberof Asciidoctor - */ -Asciidoctor.prototype.convertFile = function (filename, options) { - return this.$convert_file(filename, prepareOptions(options)) -} - -/** - * Parse the AsciiDoc source input into an {@link Document} - * - * Accepts input as a Buffer or String. - * - * @param {string|Buffer} input - AsciiDoc input as String or Buffer - * @param {Object} options - a JSON of options to control processing (default: {}) - * @returns {Document} - the {@link Document} object - * @memberof Asciidoctor - */ -Asciidoctor.prototype.load = function (input, options) { - if (typeof input === 'object' && input.constructor.name === 'Buffer') { - input = input.toString('utf8') - } - return this.$load(input, prepareOptions(options)) -} - -/** - * Parse the contents of the AsciiDoc source file into an {@link Document} - * - * @param {string} filename - source filename - * @param {Object} options - a JSON of options to control processing (default: {}) - * @returns {Document} - the {@link Document} object - * @memberof Asciidoctor - */ -Asciidoctor.prototype.loadFile = function (filename, options) { - return this.$load_file(filename, prepareOptions(options)) -} - -// AbstractBlock API - -/** - * @namespace - * @extends AbstractNode - */ -var AbstractBlock = Opal.Asciidoctor.AbstractBlock - -/** - * Append a block to this block's list of child blocks. - * @param {AbstractBlock} block - the block to append - * @returns {AbstractBlock} - the parent block to which this block was appended. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.append = function (block) { - this.$append(block) - return this -} - -/** - * Get the String title of this Block with title substitions applied - * - * The following substitutions are applied to block and section titles: - * - * specialcharacters, quotes, replacements, macros, attributes and post_replacements - * - * @returns {string} - the converted String title for this Block, or undefined if the title is not set. - * @example - * block.title // "Foo 3^ # {two-colons} Bar(1)" - * block.getTitle(); // "Foo 3^ # :: Bar(1)" - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getTitle = function () { - var title = this.$title() - return title === Opal.nil ? undefined : title -} - -/** - * Set the String block title. - * - * @param {string} title - The block title - * @returns {string} - the new String title assigned to this Block. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.setTitle = function (title) { - title = typeof title === 'undefined' ? Opal.nil : title - return this['$title='](title) -} - -/** - * Generate and assign caption to block if not already assigned. - * - * If the block has a title and a caption prefix is available for this block, - * then build a caption from this information, assign it a number and store it - * to the caption attribute on the block. - * - * If a caption has already been assigned to this block, do nothing. - * - * The parts of a complete caption are: . - * This partial caption represents the part the precedes the title. - * - * @param {string} value - the String caption to assign to this block or nil to use document attribute. - * @param {string} captionContext - the String context to use when resolving caption-related attributes. - * If not provided, the name of the context for this block is used. Only certain contexts allow the caption to be looked up. - * - * @memberof AbstractBlock - */ -AbstractBlock.prototype.assignCaption = function (value, captionContext) { - value = typeof value === 'undefined' ? Opal.nil : value - captionContext = typeof captionContext === 'undefined' ? null : captionContext - this.$assign_caption(value, captionContext) -} - -/** - * Convenience method that returns the interpreted title of the Block - * with the caption prepended. - * Concatenates the value of this Block's caption instance variable and the - * return value of this Block's title method. No space is added between the - * two values. If the Block does not have a caption, the interpreted title is - * returned. - * - * @returns {string} - the converted String title prefixed with the caption, or just the converted String title if no caption is set - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getCaptionedTitle = function () { - return this.$captioned_title() -} - -/** - * Get the style (block type qualifier) for this block. - * - * @returns {string} - the style for this block - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getStyle = function () { - var style = this.style - return style === Opal.nil ? undefined : style -} - -/** - * Set the style for this block. - * - * @param {string} style - Style - * @memberof AbstractBlock - */ -AbstractBlock.prototype.setStyle = function (style) { - this.style = style -} - -/** - * Get the location in the AsciiDoc source where this block begins. - * - * @returns {string} - the style for this block - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getSourceLocation = function () { - var sourceLocation = this.source_location - if (sourceLocation === Opal.nil) { - return undefined - } - sourceLocation.getFile = function () { - var file = this.file - return file === Opal.nil ? undefined : file - } - sourceLocation.getDirectory = function () { - var dir = this.dir - return dir === Opal.nil ? undefined : dir - } - sourceLocation.getPath = function () { - var path = this.path - return path === Opal.nil ? undefined : path - } - sourceLocation.getLineNumber = function () { - var lineno = this.lineno - return lineno === Opal.nil ? undefined : lineno - } - return sourceLocation -} - -/** - * Get the caption for this block. - * - * @returns {string} - the caption for this block - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getCaption = function () { - var caption = this.$caption() - return caption === Opal.nil ? undefined : caption -} - -/** - * Set the caption for this block. - * - * @param {string} caption - Caption - * @memberof AbstractBlock - */ -AbstractBlock.prototype.setCaption = function (caption) { - this.caption = typeof caption === 'undefined' ? Opal.nil : caption -} - -/** - * Get the level of this section or the section level in which this block resides. - * - * @returns {number} - the level (Integer) of this section - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getLevel = function () { - var level = this.level - return level === Opal.nil ? undefined : level -} - -/** - * Get the substitution keywords to be applied to the contents of this block. - * - * @returns {Array<string>} - the list of {string} substitution keywords associated with this block. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getSubstitutions = function () { - return this.subs -} - -/** - * Check whether a given substitution keyword is present in the substitutions for this block. - * - * @returns {boolean} - whether the substitution is present on this block. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.hasSubstitution = function (substitution) { - return this['$sub?'](substitution) -} - -/** - * Remove the specified substitution keyword from the list of substitutions for this block. - * - * @memberof AbstractBlock - */ -AbstractBlock.prototype.removeSubstitution = function (substitution) { - this.$remove_sub(substitution) -} - -/** - * Checks if the {@link AbstractBlock} contains any child blocks. - * - * @returns {boolean} - whether the {@link AbstractBlock} has child blocks. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.hasBlocks = function () { - return this.blocks.length > 0 -} - -/** - * Get the list of {@link AbstractBlock} sub-blocks for this block. - * - * @returns {Array<AbstractBlock>} - a list of {@link AbstractBlock} sub-blocks - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getBlocks = function () { - return this.blocks -} - -/** - * Get the converted result of the child blocks by converting the children appropriate to content model that this block supports. - * - * @returns {string} - the converted result of the child blocks - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getContent = function () { - return this.$content() -} - -/** - * Get the converted content for this block. - * If the block has child blocks, the content method should cause them to be converted - * and returned as content that can be included in the parent block's template. - * - * @returns {string} - the converted String content for this block - * @memberof AbstractBlock - */ -AbstractBlock.prototype.convert = function () { - return this.$convert() -} - -/** - * Query for all descendant block-level nodes in the document tree - * that match the specified selector (context, style, id, and/or role). - * If a function block is given, it's used as an additional filter. - * If no selector or function block is supplied, all block-level nodes in the tree are returned. - * @param {Object} [selector] - * @param {function} [block] - * @example - * doc.findBy({'context': 'section'}); - * // => { level: 0, title: "Hello, AsciiDoc!", blocks: 0 } - * // => { level: 1, title: "First Section", blocks: 1 } - * - * doc.findBy({'context': 'section'}, function (section) { return section.getLevel() === 1; }); - * // => { level: 1, title: "First Section", blocks: 1 } - * - * doc.findBy({'context': 'listing', 'style': 'source'}); - * // => { context: :listing, content_model: :verbatim, style: "source", lines: 1 } - * - * @returns {Array<AbstractBlock>} - a list of block-level nodes that match the filter or an empty list if no matches are found - * @memberof AbstractBlock - */ -AbstractBlock.prototype.findBy = function (selector, block) { - if (typeof block === 'undefined' && typeof selector === 'function') { - return Opal.send(this, 'find_by', null, selector) - } else if (typeof block === 'function') { - return Opal.send(this, 'find_by', [toHash(selector)], block) - } else { - return this.$find_by(toHash(selector)) - } -} - -/** - * Get the source line number where this block started. - * @returns {number} - the source line number where this block started - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getLineNumber = function () { - var lineno = this.$lineno() - return lineno === Opal.nil ? undefined : lineno -} - -/** - * Check whether this block has any child Section objects. - * Only applies to Document and Section instances. - * @returns {boolean} - true if this block has child Section objects, otherwise false - * @memberof AbstractBlock - */ -AbstractBlock.prototype.hasSections = function () { - // REMIND: call directly the underlying method "$sections?" - // once https://github.com/asciidoctor/asciidoctor/pull/3591 is merged and a new version is released. - // return this['$sections?']() - return this.next_section_index !== Opal.nil && this.next_section_index > 0 -} - -/** - * Get the Array of child Section objects. - * Only applies to Document and Section instances. - * @memberof AbstractBlock - * @returns {Array<Section>} - an {Array} of {@link Section} objects - */ -AbstractBlock.prototype.getSections = function () { - return this.$sections() -} - -/** - * Get the numeral of this block (if section, relative to parent, otherwise absolute). - * Only assigned to section if automatic section numbering is enabled. - * Only assigned to formal block (block with title) if corresponding caption attribute is present. - * If the section is an appendix, the numeral is a letter (starting with A). - * @returns {string} - the numeral - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getNumeral = function () { - return this.$numeral() -} - -/** - * Set the numeral of this block. - * @param {string} value - The numeral value - * @memberof AbstractBlock - */ -AbstractBlock.prototype.setNumeral = function (value) { - this['$numeral='](value) -} - -/** - * A convenience method that checks whether the title of this block is defined. - * - * @returns {boolean} - a {boolean} indicating whether this block has a title. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.hasTitle = function () { - return this['$title?']() -} - -/** - * Returns the converted alt text for this block image. - * @returns {string} - the {string} value of the alt attribute with XML special character and replacement substitutions applied. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getAlt = function () { - return this.$alt() -} - -// Section API - -/** - * @description - * Methods for managing sections of AsciiDoc content in a document. - * - * @example - * <pre> - * section = asciidoctor.Section.create() - * section.setTitle('Section 1') - * section.setId('sect1') - * section.getBlocks().length // 0 - * section.getId() // "sect1" - * section.append(newBlock) - * section.getBlocks().length // 1 - * </pre> - * @namespace - * @extends AbstractBlock - */ -var Section = Opal.Asciidoctor.Section - -/** - * Create a {Section} object. - * @param {AbstractBlock} [parent] - The parent AbstractBlock. If set, must be a Document or Section object (default: undefined) - * @param {number} [level] - The Integer level of this section (default: 1 more than parent level or 1 if parent not defined) - * @param {boolean} [numbered] - A Boolean indicating whether numbering is enabled for this Section (default: false) - * @param {Object} [opts] - An optional JSON of options (default: {}) - * @returns {Section} - a new {Section} object - * @memberof Section - */ -Section.create = function (parent, level, numbered, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return this.$new(parent, level, numbered, toHash(opts)) -} - -/** - * Set the level of this section or the section level in which this block resides. - * @param {number} level - Level (Integer) - * @memberof AbstractBlock - */ -Section.prototype.setLevel = function (level) { - this.level = level -} - -/** - * Get the 0-based index order of this section within the parent block. - * @returns {number} - * @memberof Section - */ -Section.prototype.getIndex = function () { - return this.index -} - -/** - * Set the 0-based index order of this section within the parent block. - * @param {string} index - The index order of this section - * @memberof Section - */ -Section.prototype.setIndex = function (index) { - this.index = index -} - -/** - * Get the section name of this section. - * @returns {string|undefined} - * @memberof Section - */ -Section.prototype.getSectionName = function () { - var sectname = this.sectname - return sectname === Opal.nil ? undefined : sectname -} - -/** - * Set the section name of this section. - * @param {string} value - The section name - * @memberof Section - */ -Section.prototype.setSectionName = function (value) { - this.sectname = value -} - -/** - * Get the flag to indicate whether this is a special section or a child of one. - * @returns {boolean} - * @memberof Section - */ -Section.prototype.isSpecial = function () { - return this.special -} - -/** - * Set the flag to indicate whether this is a special section or a child of one. - * @param {boolean} value - A flag to indicated if this is a special section - * @memberof Section - */ -Section.prototype.setSpecial = function (value) { - this.special = value -} - -/** - * Get the state of the numbered attribute at this section (need to preserve for creating TOC). - * @returns {boolean} - * @memberof Section - */ -Section.prototype.isNumbered = function () { - return this.numbered -} - -/** - * Get the caption for this section (only relevant for appendices). - * @returns {string} - * @memberof Section - */ -Section.prototype.getCaption = function () { - var value = this.caption - return value === Opal.nil ? undefined : value -} - -/** - * Get the name of the Section (title) - * @returns {string} - * @see {@link AbstractBlock#getTitle} - * @memberof Section - */ -Section.prototype.getName = function () { - return this.getTitle() -} - -/** - * @description - * Methods for managing AsciiDoc content blocks. - * - * @example - * block = asciidoctor.Block.create(parent, 'paragraph', {source: '_This_ is a <test>'}) - * block.getContent() - * // "<em>This</em> is a <test>" - * - * @namespace - * @extends AbstractBlock - */ -var Block = Opal.Asciidoctor.Block - -/** - * Create a {Block} object. - * @param {AbstractBlock} parent - The parent {AbstractBlock} with a compound content model to which this {Block} will be appended. - * @param {string} context - The context name for the type of content (e.g., "paragraph"). - * @param {Object} [opts] - a JSON of options to customize block initialization: (default: {}) - * @param {string} opts.content_model - indicates whether blocks can be nested in this {Block} ("compound"), - * otherwise how the lines should be processed ("simple", "verbatim", "raw", "empty"). (default: "simple") - * @param {Object} opts.attributes - a JSON of attributes (key/value pairs) to assign to this {Block}. (default: {}) - * @param {string|Array<string>} opts.source - a String or {Array} of raw source for this {Block}. (default: undefined) - * - * IMPORTANT: If you don't specify the `subs` option, you must explicitly call the `commit_subs` method to resolve and assign the substitutions - * to this block (which are resolved from the `subs` attribute, if specified, or the default substitutions based on this block's context). - * If you want to use the default subs for a block, pass the option `subs: "default"`. - * You can override the default subs using the `default_subs` option. - * - * @returns {Block} - a new {Block} object - * @memberof Block - */ -Block.create = function (parent, context, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return this.$new(parent, context, toHash(opts)) -} - -/** - * Get the source of this block. - * @returns {string} - the String source of this block. - * @memberof Block - */ -Block.prototype.getSource = function () { - return this.$source() -} - -/** - * Get the source lines of this block. - * @returns {Array<string>} - the String {Array} of source lines for this block. - * @memberof Block - */ -Block.prototype.getSourceLines = function () { - return this.lines -} - -// AbstractNode API - -/** - * @namespace - * @description - * An abstract base class that provides state and methods for managing a node of AsciiDoc content. - * The state and methods on this class are common to all content segments in an AsciiDoc document. - */ -var AbstractNode = Opal.Asciidoctor.AbstractNode - -/** - * Apply the specified substitutions to the text. - * If no substitutions are specified, the following substitutions are applied: - * <code>specialcharacters</code>, <code>quotes</code>, <code>attributes</code>, <code>replacements</code>, <code>macros</code>, and <code>post_replacements</code>. - * - * @param {string|Array<string>} text - The String or String Array of text to process; must not be undefined. - * @param {Array<string>} [subs] - The substitutions to perform; must be an Array or undefined. - * @returns {string|Array<string>} - a String or String Array to match the type of the text argument with substitutions applied. - * @memberof AbstractNode - */ -AbstractNode.prototype.applySubstitutions = function (text, subs) { - return this.$apply_subs(text, subs) -} - -/** - * Resolve the list of comma-delimited subs against the possible options. - * - * @param {string} subs - The comma-delimited String of substitution names or aliases. - * @param {string} [type] - A String representing the context for which the subs are being resolved (default: 'block'). - * @param {Array<string>} [defaults] - An Array of substitutions to start with when computing incremental substitutions (default: undefined). - * @param {string} [subject] - The String to use in log messages to communicate the subject for which subs are being resolved (default: undefined) - * - * @returns {Array<string>} - An Array of Strings representing the substitution operation or nothing if no subs are found. - * @memberof AbstractNode - */ -AbstractNode.prototype.resolveSubstitutions = function (subs, type, defaults, subject) { - if (typeof type === 'undefined') { - type = 'block' - } - if (typeof defaults === 'undefined') { - defaults = Opal.nil - } - if (typeof subject === 'undefined') { - subject = Opal.nil - } - const value = this.$resolve_subs(subs, type, defaults, subject) - return value === Opal.nil ? undefined : value -} - -/** - * Call {@link AbstractNode#resolveSubstitutions} for the 'block' type. - * - * @see {@link AbstractNode#resolveSubstitutions} - */ -AbstractNode.prototype.resolveBlockSubstitutions = function (subs, defaults, subject) { - return this.resolveSubstitutions(subs, 'block', defaults, subject) -} - -/** - * Call {@link AbstractNode#resolveSubstitutions} for the 'inline' type with the subject set as passthrough macro. - * - * @see {@link AbstractNode#resolveSubstitutions} - */ -AbstractNode.prototype.resolvePassSubstitutions = function (subs) { - return this.resolveSubstitutions(subs, 'inline', undefined, 'passthrough macro') -} - -/** - * @returns {string} - the String name of this node - * @memberof AbstractNode - */ -AbstractNode.prototype.getNodeName = function () { - return this.node_name -} - -/** - * @returns {Object} - the JSON of attributes for this node - * @memberof AbstractNode - */ -AbstractNode.prototype.getAttributes = function () { - return fromHash(this.attributes) -} - -/** - * Get the value of the specified attribute. - * If the attribute is not found on this node, fallback_name is set, and this node is not the Document node, get the value of the specified attribute from the Document node. - * - * Look for the specified attribute in the attributes on this node and return the value of the attribute, if found. - * Otherwise, if fallback_name is set (default: same as name) and this node is not the Document node, look for that attribute on the Document node and return its value, if found. - * Otherwise, return the default value (default: undefined). - * - * @param {string} name - The String of the attribute to resolve. - * @param {*} [defaultValue] - The {Object} value to return if the attribute is not found (default: undefined). - * @param {string} [fallbackName] - The String of the attribute to resolve on the Document if the attribute is not found on this node (default: same as name). - * - * @returns {*} - the {Object} value (typically a String) of the attribute or defaultValue if the attribute is not found. - * @memberof AbstractNode - */ -AbstractNode.prototype.getAttribute = function (name, defaultValue, fallbackName) { - var value = this.$attr(name, defaultValue, fallbackName) - return value === Opal.nil ? undefined : value -} - -/** - * Check whether the specified attribute is present on this node. - * - * @param {string} name - The String of the attribute to resolve. - * @returns {boolean} - true if the attribute is present, otherwise false - * @memberof AbstractNode - */ -AbstractNode.prototype.hasAttribute = function (name) { - return name in this.attributes.$$smap -} - -/** - * Check if the specified attribute is defined using the same logic as {AbstractNode#getAttribute}, optionally performing acomparison with the expected value if specified. - * - * Look for the specified attribute in the attributes on this node. - * If not found, fallback_name is specified (default: same as name), and this node is not the Document node, look for that attribute on the Document node. - * In either case, if the attribute is found, and the comparison value is truthy, return whether the two values match. - * Otherwise, return whether the attribute was found. - * - * @param {string} name - The String name of the attribute to resolve. - * @param {*} [expectedValue] - The expected Object value of the attribute (default: undefined). - * @param {string} fallbackName - The String of the attribute to resolve on the Document if the attribute is not found on this node (default: same as name). - * - * @returns {boolean} - a Boolean indicating whether the attribute exists and, if a truthy comparison value is specified, whether the value of the attribute matches the comparison value. - * @memberof AbstractNode - */ -AbstractNode.prototype.isAttribute = function (name, expectedValue, fallbackName) { - var result = this['$attr?'](name, expectedValue, fallbackName) - return result === Opal.nil ? false : result -} - -/** - * Assign the value to the attribute name for the current node. - * - * @param {string} name - The String attribute name to assign - * @param {*} value - The Object value to assign to the attribute (default: '') - * @param {boolean} overwrite - A Boolean indicating whether to assign the attribute if currently present in the attributes JSON (default: true) - * - * @returns {boolean} - a Boolean indicating whether the assignment was performed - * @memberof AbstractNode - */ -AbstractNode.prototype.setAttribute = function (name, value, overwrite) { - if (typeof overwrite === 'undefined') overwrite = true - return this.$set_attr(name, value, overwrite) -} - -/** - * Remove the attribute from the current node. - * @param {string} name - The String attribute name to remove - * @returns {string} - the previous {string} value, or undefined if the attribute was not present. - * @memberof AbstractNode - */ -AbstractNode.prototype.removeAttribute = function (name) { - var value = this.$remove_attr(name) - return value === Opal.nil ? undefined : value -} - -/** - * Get the {@link Document} to which this node belongs. - * - * @returns {Document} - the {@link Document} object to which this node belongs. - * @memberof AbstractNode - */ -AbstractNode.prototype.getDocument = function () { - return this.document -} - -/** - * Get the {@link AbstractNode} to which this node is attached. - * - * @memberof AbstractNode - * @returns {AbstractNode} - the {@link AbstractNode} object to which this node is attached, - * or undefined if this node has no parent. - */ -AbstractNode.prototype.getParent = function () { - var parent = this.parent - return parent === Opal.nil ? undefined : parent -} - -/** - * @returns {boolean} - true if this {AbstractNode} is an instance of {Inline} - * @memberof AbstractNode - */ -AbstractNode.prototype.isInline = function () { - return this['$inline?']() -} - -/** - * @returns {boolean} - true if this {AbstractNode} is an instance of {Block} - * @memberof AbstractNode - */ -AbstractNode.prototype.isBlock = function () { - return this['$block?']() -} - -/** - * Checks if the role attribute is set on this node and, if an expected value is given, whether the space-separated role matches that value. - * - * @param {string} expectedValue - The expected String value of the role (optional, default: undefined) - * - * @returns {boolean} - a Boolean indicating whether the role attribute is set on this node and, if an expected value is given, whether the space-separated role matches that value. - * @memberof AbstractNode - */ -AbstractNode.prototype.isRole = function (expectedValue) { - return this['$role?'](expectedValue) -} - -/** - * Retrieves the space-separated String role for this node. - * - * @returns {string} - the role as a space-separated String. - * @memberof AbstractNode - */ -AbstractNode.prototype.getRole = function () { - return this.$role() -} - -/** - * Checks if the specified role is present in the list of roles for this node. - * - * @param {string} name - The String name of the role to find. - * - * @returns {boolean} - a Boolean indicating whether this node has the specified role. - * @memberof AbstractNode - */ -AbstractNode.prototype.hasRole = function (name) { - return this['$has_role?'](name) -} - -/** - * Retrieves the String role names for this node as an Array. - * - * @returns {Array<string>} - the role names as a String {Array}, which is empty if the role attribute is absent on this node. - * @memberof AbstractNode - */ -AbstractNode.prototype.getRoles = function () { - return this.$roles() -} - -/** - * Adds the given role directly to this node. - * - * @param {string} name - The name of the role to add - * - * @returns {boolean} - a Boolean indicating whether the role was added. - * @memberof AbstractNode - */ -AbstractNode.prototype.addRole = function (name) { - return this.$add_role(name) -} - -/** - * Public: Removes the given role directly from this node. - * - * @param {string} name - The name of the role to remove - * - * @returns {boolean} - a Boolean indicating whether the role was removed. - * @memberof AbstractNode - */ -AbstractNode.prototype.removeRole = function (name) { - return this.$remove_role(name) -} - -/** - * A convenience method that checks if the reftext attribute is defined. - * @returns {boolean} - A Boolean indicating whether the reftext attribute is defined - * @memberof AbstractNode - */ -AbstractNode.prototype.isReftext = function () { - return this['$reftext?']() -} - -/** - * A convenience method that returns the value of the reftext attribute with substitutions applied. - * @returns {string|undefined} - the value of the reftext attribute with substitutions applied. - * @memberof AbstractNode - */ -AbstractNode.prototype.getReftext = function () { - var reftext = this.$reftext() - return reftext === Opal.nil ? undefined : reftext -} - -/** - * @returns {string} - Get the context name for this node - * @memberof AbstractNode - */ -AbstractNode.prototype.getContext = function () { - var context = this.context - // Automatically convert Opal pseudo-symbol to String - return typeof context === 'string' ? context : context.toString() -} - -/** - * @returns {string} - the String id of this node - * @memberof AbstractNode - */ -AbstractNode.prototype.getId = function () { - var id = this.id - return id === Opal.nil ? undefined : id -} - -/** - * @param {string} id - the String id of this node - * @memberof AbstractNode - */ -AbstractNode.prototype.setId = function (id) { - this.id = id -} - -/** - * A convenience method to check if the specified option attribute is enabled on the current node. - * Check if the option is enabled. This method simply checks to see if the <name>-option attribute is defined on the current node. - * - * @param {string} name - the String name of the option - * - * @return {boolean} - a Boolean indicating whether the option has been specified - * @memberof AbstractNode - */ -AbstractNode.prototype.isOption = function (name) { - return this['$option?'](name) -} - -/** - * Set the specified option on this node. - * This method sets the specified option on this node by setting the <name>-option attribute. - * - * @param {string} name - the String name of the option - * - * @memberof AbstractNode - */ -AbstractNode.prototype.setOption = function (name) { - return this.$set_option(name) -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.getIconUri = function (name) { - return this.$icon_uri(name) -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.getMediaUri = function (target, assetDirKey) { - return this.$media_uri(target, assetDirKey) -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.getImageUri = function (targetImage, assetDirKey) { - return this.$image_uri(targetImage, assetDirKey) -} - -/** - * Get the {Converter} instance being used to convert the current {Document}. - * @returns {Object} - * @memberof AbstractNode - */ -AbstractNode.prototype.getConverter = function () { - return this.$converter() -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.readContents = function (target, options) { - return this.$read_contents(target, toHash(options)) -} - -/** - * Read the contents of the file at the specified path. - * This method assumes that the path is safe to read. - * It checks that the file is readable before attempting to read it. - * - * @param path - the {string} path from which to read the contents - * @param {Object} options - a JSON {Object} of options to control processing (default: {}) - * @param {boolean} options.warn_on_failure - a {boolean} that controls whether a warning is issued if the file cannot be read (default: false) - * @param {boolean} options.normalize - a {boolean} that controls whether the lines are normalized and coerced to UTF-8 (default: false) - * - * @returns {string} - the String content of the file at the specified path, or undefined if the file does not exist. - * @memberof AbstractNode - */ -AbstractNode.prototype.readAsset = function (path, options) { - var result = this.$read_asset(path, toHash(options)) - return result === Opal.nil ? undefined : result -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.normalizeWebPath = function (target, start, preserveTargetUri) { - return this.$normalize_web_path(target, start, preserveTargetUri) -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.normalizeSystemPath = function (target, start, jail, options) { - return this.$normalize_system_path(target, start, jail, toHash(options)) -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.normalizeAssetPath = function (assetRef, assetName, autoCorrect) { - return this.$normalize_asset_path(assetRef, assetName, autoCorrect) -} - -// Document API - -/** - * The {@link Document} class represents a parsed AsciiDoc document. - * - * Document is the root node of a parsed AsciiDoc document.<br/> - * It provides an abstract syntax tree (AST) that represents the structure of the AsciiDoc document - * from which the Document object was parsed. - * - * Although the constructor can be used to create an empty document object, - * more commonly, you'll load the document object from AsciiDoc source - * using the primary API methods on {@link Asciidoctor}. - * When using one of these APIs, you almost always want to set the safe mode to 'safe' (or 'unsafe') - * to enable all of Asciidoctor's features. - * - * <pre> - * var doc = Asciidoctor.load('= Hello, AsciiDoc!', { 'safe': 'safe' }) - * // => Asciidoctor::Document { doctype: "article", doctitle: "Hello, AsciiDoc!", blocks: 0 } - * </pre> - * - * Instances of this class can be used to extract information from the document or alter its structure. - * As such, the Document object is most often used in extensions and by integrations. - * - * The most basic usage of the Document object is to retrieve the document's title. - * - * <pre> - * var source = '= Document Title' - * var doc = asciidoctor.load(source, { 'safe': 'safe' }) - * console.log(doc.getTitle()) // 'Document Title' - * </pre> - * - * You can also use the Document object to access document attributes defined in the header, such as the author and doctype. - * @namespace - * @extends AbstractBlock - */ -var Document = Opal.Asciidoctor.Document - -/** - * Returns a JSON {Object} of references captured by the processor. - * - * @returns {Object} - a JSON {Object} of {AbstractNode} in the document. - * @memberof Document - */ -Document.prototype.getRefs = function () { - return fromHash(this.catalog.$$smap.refs) -} - -/** - * Returns an {Array} of {Document/ImageReference} captured by the processor. - * - * @returns {Array<ImageReference>} - an {Array} of {Document/ImageReference} in the document. - * Will return an empty array if the option "catalog_assets: true" was not defined on the processor. - * @memberof Document - */ -Document.prototype.getImages = function () { - return this.catalog.$$smap.images -} - -/** - * Returns an {Array} of links captured by the processor. - * - * @returns {Array<string>} - an {Array} of links in the document. - * Will return an empty array if: - * - the function was called before the document was converted - * - the option "catalog_assets: true" was not defined on the processor - * @memberof Document - */ -Document.prototype.getLinks = function () { - return this.catalog.$$smap.links -} - -/** - * @returns {boolean} - true if the document has footnotes otherwise false - * @memberof Document - */ -Document.prototype.hasFootnotes = function () { - return this['$footnotes?']() -} - -/** - * Returns an {Array} of {Document/Footnote} captured by the processor. - * - * @returns {Array<Footnote>} - an {Array} of {Document/Footnote} in the document. - * Will return an empty array if the function was called before the document was converted. - * @memberof Document - */ -Document.prototype.getFootnotes = function () { - return this.$footnotes() -} - -/** - * Returns the level-0 {Section} (i.e. the document title). - * Only stores the title, not the header attributes. - * - * @returns {string} - the level-0 {Section}. - * @memberof Document - */ -Document.prototype.getHeader = function () { - return this.header -} - -/** - * @memberof Document - */ -Document.prototype.setAttribute = function (name, value) { - return this.$set_attribute(name, value) -} - -/** - - * @memberof Document - */ -Document.prototype.removeAttribute = function (name) { - this.attributes.$delete(name) - this.attribute_overrides.$delete(name) -} - -/** - * Convert the AsciiDoc document using the templates loaded by the Converter. - * If a "template_dir" is not specified, or a template is missing, the converter will fall back to using the appropriate built-in template. - * - * @param {Object} [options] - a JSON of options to control processing (default: {}) - * - * @returns {string} - * @memberof Document - */ -Document.prototype.convert = function (options) { - var result = this.$convert(toHash(options)) - return result === Opal.nil ? '' : result -} - -/** - * Write the output to the specified file. - * - * If the converter responds to "write", delegate the work of writing the file to that method. - * Otherwise, write the output the specified file. - * - * @param {string} output - * @param {string} target - * - * @memberof Document - */ -Document.prototype.write = function (output, target) { - return this.$write(output, target) -} - -/** - * @returns {string} - the full name of the author as a String - * @memberof Document - */ -Document.prototype.getAuthor = function () { - return this.$author() -} - -/** - * @returns {string} - * @memberof Document - */ -Document.prototype.getSource = function () { - return this.$source() -} - -/** - * @returns {Array<string>} - * @memberof Document - */ -Document.prototype.getSourceLines = function () { - return this.$source_lines() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.isNested = function () { - return this['$nested?']() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.isEmbedded = function () { - return this['$embedded?']() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.hasExtensions = function () { - return this['$extensions?']() -} - -/** - * Get the value of the doctype attribute for this document. - * @returns {string} - * @memberof Document - */ -Document.prototype.getDoctype = function () { - return this.doctype -} - -/** - * Get the value of the backend attribute for this document. - * @returns {string} - * @memberof Document - */ -Document.prototype.getBackend = function () { - return this.backend -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.isBasebackend = function (base) { - return this['$basebackend?'](base) -} - -/** - * Get the title explicitly defined in the document attributes. - * @returns {string} - * @see {@link AbstractNode#getAttributes} - * @memberof Document - */ -Document.prototype.getTitle = function () { - var title = this.$title() - return title === Opal.nil ? undefined : title -} - -/** - * Set the title on the document header - * - * Set the title of the document header to the specified value. - * If the header does not exist, it is first created. - * - * @param {string} title - the String title to assign as the title of the document header - * - * @returns {string} - the new String title assigned to the document header - * @memberof Document - */ -Document.prototype.setTitle = function (title) { - return this['$title='](title) -} - -/** - * @returns {Document/Title} - a {@link Document/Title} - * @memberof Document - */ -Document.prototype.getDocumentTitle = function (options) { - var doctitle = this.$doctitle(toHash(options)) - return doctitle === Opal.nil ? undefined : doctitle -} - -/** - * @see {@link Document#getDocumentTitle} - * @memberof Document - */ -Document.prototype.getDoctitle = Document.prototype.getDocumentTitle - -/** - * Get the document catalog JSON object. - * @returns {Object} - * @memberof Document - */ -Document.prototype.getCatalog = function () { - return fromHash(this.catalog) -} - -/** - * - * @returns {Object} - * @see Document#getCatalog - * @memberof Document - */ -Document.prototype.getReferences = Document.prototype.getCatalog - -/** - * Get the document revision date from document header (document attribute <code>revdate</code>). - * @returns {string} - * @memberof Document - */ -Document.prototype.getRevisionDate = function () { - return this.getAttribute('revdate') -} - -/** - * @see Document#getRevisionDate - * @returns {string} - * @memberof Document - */ -Document.prototype.getRevdate = function () { - return this.getRevisionDate() -} - -/** - * Get the document revision number from document header (document attribute <code>revnumber</code>). - * @returns {string} - * @memberof Document - */ -Document.prototype.getRevisionNumber = function () { - return this.getAttribute('revnumber') -} - -/** - * Get the document revision remark from document header (document attribute <code>revremark</code>). - * @returns {string} - * @memberof Document - */ -Document.prototype.getRevisionRemark = function () { - return this.getAttribute('revremark') -} - -/** - * Assign a value to the specified attribute in the document header. - * - * The assignment will be visible when the header attributes are restored, - * typically between processor phases (e.g., between parse and convert). - * - * @param {string} name - The {string} attribute name to assign - * @param {Object} value - The {Object} value to assign to the attribute (default: '') - * @param {boolean} overwrite - A {boolean} indicating whether to assign the attribute - * if already present in the attributes Hash (default: true) - * - * @returns {boolean} - true if the assignment was performed otherwise false - * @memberof Document - */ -Document.prototype.setHeaderAttribute = function (name, value, overwrite) { - if (typeof overwrite === 'undefined') overwrite = true - if (typeof value === 'undefined') value = '' - return this.$set_header_attribute(name, value, overwrite) -} - -/** - * Convenience method to retrieve the authors of this document as an {Array} of {Document/Author} objects. - * - * This method is backed by the author-related attributes on the document. - * - * @returns {Array<Author>} - an {Array} of {Document/Author} objects. - * @memberof Document - */ -Document.prototype.getAuthors = function () { - return this.$authors() -} - -// Document.Footnote API - -/** - * @namespace - * @module Document/Footnote - */ -var Footnote = Document.Footnote - -/** - * @returns {number} - the footnote's index - * @memberof Document/Footnote - */ -Footnote.prototype.getIndex = function () { - var index = this.$$data.index - return index === Opal.nil ? undefined : index -} - -/** - * @returns {number} - the footnote's id - * @memberof Document/Footnote - */ -Footnote.prototype.getId = function () { - var id = this.$$data.id - return id === Opal.nil ? undefined : id -} - -/** - * @returns {string} - the footnote's text - * @memberof Document/Footnote - */ -Footnote.prototype.getText = function () { - var text = this.$$data.text - return text === Opal.nil ? undefined : text -} - -// Document.ImageReference API - -/** - * @class - * @module Document/ImageReference - */ -var ImageReference = Document.ImageReference - -/** - * @returns {string} - the image's target - * @memberof Document/ImageReference - */ -ImageReference.prototype.getTarget = function () { - return this.$$data.target -} - -/** - * @returns {string} - the image's directory (imagesdir attribute) - * @memberof Document/ImageReference - */ -ImageReference.prototype.getImagesDirectory = function () { - var value = this.$$data.imagesdir - return value === Opal.nil ? undefined : value -} - -// Document.Author API - -/** - * The Author class represents information about an author extracted from document attributes. - * @namespace - * @module Document/Author - */ -var Author = Document.Author - -/** - * @returns {string} - the author's full name - * @memberof Document/Author - */ -Author.prototype.getName = function () { - var name = this.$$data.name - return name === Opal.nil ? undefined : name -} - -/** - * @returns {string} - the author's first name - * @memberof Document/Author - */ -Author.prototype.getFirstName = function () { - var firstName = this.$$data.firstname - return firstName === Opal.nil ? undefined : firstName -} - -/** - * @returns {string} - the author's middle name (or undefined if the author has no middle name) - * @memberof Document/Author - */ -Author.prototype.getMiddleName = function () { - var middleName = this.$$data.middlename - return middleName === Opal.nil ? undefined : middleName -} - -/** - * @returns {string} - the author's last name - * @memberof Document/Author - */ -Author.prototype.getLastName = function () { - var lastName = this.$$data.lastname - return lastName === Opal.nil ? undefined : lastName -} - -/** - * @returns {string} - the author's initials (by default based on the author's name) - * @memberof Document/Author - */ -Author.prototype.getInitials = function () { - var initials = this.$$data.initials - return initials === Opal.nil ? undefined : initials -} - -/** - * @returns {string} - the author's email - * @memberof Document/Author - */ -Author.prototype.getEmail = function () { - var email = this.$$data.email - return email === Opal.nil ? undefined : email -} - -// private constructor -Document.RevisionInfo = function (date, number, remark) { - this.date = date - this.number = number - this.remark = remark -} - -/** - * @class - * @namespace - * @module Document/RevisionInfo - */ -var RevisionInfo = Document.RevisionInfo - -/** - * Get the document revision date from document header (document attribute <code>revdate</code>). - * @returns {string} - * @memberof Document/RevisionInfo - */ -RevisionInfo.prototype.getDate = function () { - return this.date -} - -/** - * Get the document revision number from document header (document attribute <code>revnumber</code>). - * @returns {string} - * @memberof Document/RevisionInfo - */ -RevisionInfo.prototype.getNumber = function () { - return this.number -} - -/** - * Get the document revision remark from document header (document attribute <code>revremark</code>). - * A short summary of changes in this document revision. - * @returns {string} - * @memberof Document/RevisionInfo - */ -RevisionInfo.prototype.getRemark = function () { - return this.remark -} - -/** - * @returns {boolean} - true if the revision info is empty (ie. not defined), otherwise false - * @memberof Document/RevisionInfo - */ -RevisionInfo.prototype.isEmpty = function () { - return this.date === undefined && this.number === undefined && this.remark === undefined -} - -// SafeMode API - -/** - * @namespace - */ -var SafeMode = Opal.Asciidoctor.SafeMode - -/** - * @param {string} name - the name of the security level - * @returns {number} - the integer value of the corresponding security level - */ -SafeMode.getValueForName = function (name) { - return this.$value_for_name(name) -} - -/** - * @param {number} value - the integer value of the security level - * @returns {string} - the name of the corresponding security level - */ -SafeMode.getNameForValue = function (value) { - var name = this.$name_for_value(value) - return name === Opal.nil ? undefined : name -} - -/** - * @returns {Array<string>} - the String {Array} of security levels - */ -SafeMode.getNames = function () { - return this.$names() -} - -// Callouts API - -/** - * Maintains a catalog of callouts and their associations. - * @namespace - */ -var Callouts = Opal.Asciidoctor.Callouts - -/** - * Create a new Callouts. - * @returns {Callouts} - a new Callouts - * @memberof Callouts - */ -Callouts.create = function () { - return this.$new() -} - -/** - * Register a new callout for the given list item ordinal. - * Generates a unique id for this callout based on the index of the next callout list in the document and the index of this callout since the end of the last callout list. - * - * @param {number} ordinal - the Integer ordinal (1-based) of the list item to which this callout is to be associated - * @returns {string} - The unique String id of this callout - * @example - * callouts = asciidoctor.Callouts.create() - * callouts.register(1) - * // => "CO1-1" - * callouts.nextList() - * callouts.register(2) - * // => "CO2-1" - * @memberof Callouts - */ - -Callouts.prototype.register = function (ordinal) { - return this.$register(ordinal) -} -/** - * Get the next callout index in the document. - * - * Reads the next callout index in the document and advances the pointer. - * This method is used during conversion to retrieve the unique id of the callout that was generated during parsing. - * - * @returns {string} - The unique String id of the next callout in the document - * @memberof Callouts - */ -Callouts.prototype.readNextId = function () { - return this.$read_next_id() -} - -/** - * et a space-separated list of callout ids for the specified list item. - * @param {number} ordinal - the Integer ordinal (1-based) of the list item for which to retrieve the callouts - * @returns {string} - a space-separated String of callout ids associated with the specified list item - * @memberof Callouts - */ -Callouts.prototype.getCalloutIds = function (ordinal) { - return this.$callout_ids(ordinal) -} - -/** - * @memberof Callouts - */ -Callouts.prototype.getLists = function () { - var lists = this.lists - if (lists && lists.length > 0) { - for (var i = 0; i < lists.length; i++) { - var list = lists[i] - if (list && list.length > 0) { - for (var j = 0; j < list.length; j++) { - if (typeof list[j] === 'object' && '$$smap' in list[j]) { - list[j] = fromHash(list[j]) - } - } - } - } - } - return lists -} - -/** - * @memberof Callouts - */ -Callouts.prototype.getListIndex = function () { - return this.list_index -} - -/** - * The current list for which callouts are being collected. - * @returns {Array} - The Array of callouts at the position of the list index pointer - * @memberof Callouts - */ -Callouts.prototype.getCurrentList = function () { - var currentList = this.$current_list() - if (currentList && currentList.length > 0) { - for (var i = 0; i < currentList.length; i++) { - if (typeof currentList[i] === 'object' && '$$smap' in currentList[i]) { - currentList[i] = fromHash(currentList[i]) - } - } - } - return currentList -} - -/** - * Advance to the next callout list in the document. - * @memberof Callouts - */ -Callouts.prototype.nextList = function () { - return this.$nextList() -} - -/** - * Rewind the list index pointer, intended to be used when switching from the parsing to conversion phase. - * @memberof Callouts - */ -Callouts.prototype.rewind = function () { - return this.$rewind() -} - -/** - * @returns {Document/RevisionInfo} - a {@link Document/RevisionInfo} - * @memberof Document - */ -Document.prototype.getRevisionInfo = function () { - return new Document.RevisionInfo(this.getRevisionDate(), this.getRevisionNumber(), this.getRevisionRemark()) -} - -/** - * @returns {boolean} - true if the document contains revision info, otherwise false - * @memberof Document - */ -Document.prototype.hasRevisionInfo = function () { - var revisionInfo = this.getRevisionInfo() - return !revisionInfo.isEmpty() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.getNotitle = function () { - return this.$notitle() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.getNoheader = function () { - return this.$noheader() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.getNofooter = function () { - return this.$nofooter() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.hasHeader = function () { - return this['$header?']() -} - -/** - * Replay attribute assignments at the block level. - * - * <i>This method belongs to an internal API that deals with how attributes are managed by the processor.</i> - * If you understand why this group of methods are necessary, and what they do, feel free to use them. - * <strong>However, keep in mind they are subject to change at any time.</strong> - * - * @param {Object} blockAttributes - A JSON of attributes - * @memberof Document - */ -Document.prototype.playbackAttributes = function (blockAttributes) { - blockAttributes = toHash(blockAttributes) - if (blockAttributes) { - var attrEntries = blockAttributes['$[]']('attribute_entries') - if (attrEntries && Array.isArray(attrEntries)) { - var result = [] - for (var i = 0; i < attrEntries.length; i++) { - var attrEntryObject = attrEntries[i] - if (attrEntryObject && typeof attrEntryObject === 'object' && attrEntryObject.constructor.name === 'Object') { - attrEntryObject.$name = function () { - return this.name - } - attrEntryObject.$value = function () { - return this.value - } - attrEntryObject.$negate = function () { - return this.negate - } - } - result.push(attrEntryObject) - } - blockAttributes['$[]=']('attribute_entries', result) - } - } - this.$playback_attributes(blockAttributes) -} - -/** - * Delete the specified attribute from the document if the name is not locked. - * If the attribute is locked, false is returned. - * Otherwise, the attribute is deleted. - * - * @param {string} name - the String attribute name - * - * @returns {boolean} - true if the attribute was deleted, false if it was not because it's locked - * @memberof Document - */ -Document.prototype.deleteAttribute = function (name) { - return this.$delete_attribute(name) -} - -/** - * Determine if the attribute has been locked by being assigned in document options. - * - * @param {string} key - The attribute key to check - * - * @returns {boolean} - true if the attribute is locked, false otherwise - * @memberof Document - */ -Document.prototype.isAttributeLocked = function (key) { - return this['$attribute_locked?'](key) -} - -/** - * Restore the attributes to the previously saved state (attributes in header). - * - * @memberof Document - */ -Document.prototype.restoreAttributes = function () { - return this.$restore_attributes() -} - -/** - * Parse the AsciiDoc source stored in the {Reader} into an abstract syntax tree. - * - * If the data parameter is not nil, create a new {PreprocessorReader} and assigned it to the reader property of this object. - * Otherwise, continue with the reader that was created when the {Document} was instantiated. - * Pass the reader to {Parser.parse} to parse the source data into an abstract syntax tree. - * - * If parsing has already been performed, this method returns without performing any processing. - * - * @param {string|Array<string>} [data] - The optional replacement AsciiDoc source data as a String or String Array. (default: undefined) - * - * @returns {Document} - this {Document} - * @memberof Document - */ -Document.prototype.parse = function (data) { - return this.$parse(data) -} - -/** - * @memberof Document - */ -Document.prototype.getDocinfo = function (docinfoLocation, suffix) { - return this.$docinfo(docinfoLocation, suffix) -} - -/** - * @param {string} [docinfoLocation] - A {string} for checking docinfo extensions at a given location (head or footer) (default: head) - * @returns {boolean} - * @memberof Document - */ -Document.prototype.hasDocinfoProcessors = function (docinfoLocation) { - return this['$docinfo_processors?'](docinfoLocation) -} - -/** - * Increment the specified counter and store it in the block's attributes. - * - * @param {string} counterName - the String name of the counter attribute - * @param {Block} block - the {Block} on which to save the counter - * - * @returns {number} - the next number in the sequence for the specified counter - * @memberof Document - */ -Document.prototype.incrementAndStoreCounter = function (counterName, block) { - return this.$increment_and_store_counter(counterName, block) -} - -/** - * @deprecated Please use {Document#incrementAndStoreCounter} method. - * @memberof Document - */ -Document.prototype.counterIncrement = Document.prototype.incrementAndStoreCounter - -/** - * Get the named counter and take the next number in the sequence. - * - * @param {string} name - the String name of the counter - * @param {string|number} seed - the initial value as a String or Integer - * - * @returns {number} the next number in the sequence for the specified counter - * @memberof Document - */ -Document.prototype.counter = function (name, seed) { - return this.$counter(name, seed) -} - -/** - * A read-only integer value indicating the level of security that should be enforced while processing this document. - * The value must be set in the Document constructor using the "safe" option. - * - * A value of 0 (UNSAFE) disables any of the security features enforced by Asciidoctor. - * - * A value of 1 (SAFE) closely parallels safe mode in AsciiDoc. - * In particular, it prevents access to files which reside outside of the parent directory of the source file and disables any macro other than the include directive. - * - * A value of 10 (SERVER) disallows the document from setting attributes that would affect the conversion of the document, - * in addition to all the security features of SafeMode.SAFE. - * For instance, this level forbids changing the backend or source-highlighter using an attribute defined in the source document header. - * This is the most fundamental level of security for server deployments (hence the name). - * - * A value of 20 (SECURE) disallows the document from attempting to read files from the file system and including the contents of them into the document, - * in addition to all the security features of SafeMode.SECURE. - * In particular, it disallows use of the include::[] directive and the embedding of binary content (data uri), stylesheets and JavaScripts referenced by the document. - * (Asciidoctor and trusted extensions may still be allowed to embed trusted content into the document). - * - * Since Asciidoctor is aiming for wide adoption, 20 (SECURE) is the default value and is recommended for server deployments. - * - * A value of 100 (PARANOID) is planned to disallow the use of passthrough macros and prevents the document from setting any known attributes, - * in addition to all the security features of SafeMode.SECURE. - * Please note that this level is not currently implemented (and therefore not enforced)! - * - * @returns {number} - An integer value indicating the level of security - * @memberof Document - */ -Document.prototype.getSafe = function () { - return this.safe -} - -/** - * Get the Boolean AsciiDoc compatibility mode. - * Enabling this attribute activates the following syntax changes: - * - * * single quotes as constrained emphasis formatting marks - * * single backticks parsed as inline literal, formatted as monospace - * * single plus parsed as constrained, monospaced inline formatting - * * double plus parsed as constrained, monospaced inline formatting - * - * @returns {boolean} - * @memberof Document - */ -Document.prototype.getCompatMode = function () { - return this.compat_mode -} - -/** - * Get the Boolean flag that indicates whether source map information should be tracked by the parser. - * @returns {boolean} - * @memberof Document - */ -Document.prototype.getSourcemap = function () { - var sourcemap = this.sourcemap - return sourcemap === Opal.nil ? false : sourcemap -} - -/** - * Set the Boolean flag that indicates whether source map information should be tracked by the parser. - * @param {boolean} value - * @memberof Document - */ -Document.prototype.setSourcemap = function (value) { - this.sourcemap = value -} - -/** - * Get the JSON of document counters. - * @returns {Object} - * @memberof Document - */ -Document.prototype.getCounters = function () { - return fromHash(this.counters) -} - -/** - * @returns {Object} - * @memberof Document - */ -Document.prototype.getCallouts = function () { - return this.$callouts() -} - -/** - * Get the String base directory for converting this document. - * - * Defaults to directory of the source file. - * If the source is a string, defaults to the current directory. - * @returns {string} - * @memberof Document - */ -Document.prototype.getBaseDir = function () { - return this.base_dir -} - -/** - * Get the JSON of resolved options used to initialize this {Document}. - * @returns {Object} - * @memberof Document - */ -Document.prototype.getOptions = function () { - return fromHash(this.options) -} - -/** - * Get the outfilesuffix defined at the end of the header. - * @returns {string} - * @memberof Document - */ -Document.prototype.getOutfilesuffix = function () { - return this.outfilesuffix -} - -/** - * Get a reference to the parent Document of this nested document. - * @returns {Document|undefined} - * @memberof Document - */ -Document.prototype.getParentDocument = function () { - var parentDocument = this.parent_document - return parentDocument === Opal.nil ? undefined : parentDocument -} - -/** - * Get the {Reader} associated with this document. - * @returns {Object} - * @memberof Document - */ -Document.prototype.getReader = function () { - return this.reader -} - -/** - * Get the {Converter} instance being used to convert the current {Document}. - * @returns {Object} - * @memberof Document - */ -Document.prototype.getConverter = function () { - return this.converter -} - -/** - * Get the activated {Extensions.Registry} associated with this document. - * @returns {Extensions/Registry} - * @memberof Document - */ -Document.prototype.getExtensions = function () { - var extensions = this.extensions - return extensions === Opal.nil ? undefined : extensions -} - -// Document.Title API - -/** - * A partitioned title (i.e., title & subtitle). - * @namespace - * @module Document/Title - */ -var Title = Document.Title - -/** - * @returns {string} - * @memberof Document/Title - */ -Title.prototype.getMain = function () { - return this.main -} - -/** - * @returns {string} - * @memberof Document/Title - */ -Title.prototype.getCombined = function () { - return this.combined -} - -/** - * @returns {string} - * @memberof Document/Title - */ -Title.prototype.getSubtitle = function () { - var subtitle = this.subtitle - return subtitle === Opal.nil ? undefined : subtitle -} - -/** - * @returns {boolean} - * @memberof Document/Title - */ -Title.prototype.isSanitized = function () { - var sanitized = this['$sanitized?']() - return sanitized === Opal.nil ? false : sanitized -} - -/** - * @returns {boolean} - * @memberof Document/Title - */ -Title.prototype.hasSubtitle = function () { - return this['$subtitle?']() -} - -// Inline API - -/** - * Methods for managing inline elements in AsciiDoc block. - * @namespace - * @extends AbstractNode - */ -var Inline = Opal.Asciidoctor.Inline - -/** - * Create a new Inline element. - * @param {AbstractBlock} parent - * @param {string} context - * @param {string|undefined} text - * @param {Object|undefined} opts - * @returns {Inline} - a new Inline element - * @memberof Inline - */ -Inline.create = function (parent, context, text, opts) { - return this.$new(parent, context, text, prepareOptions(opts)) -} - -/** - * Get the converted content for this inline node. - * - * @returns {string} - the converted String content for this inline node - * @memberof Inline - */ -Inline.prototype.convert = function () { - return this.$convert() -} - -/** - * Get the converted String text of this Inline node, if applicable. - * - * @returns {string|undefined} - the converted String text for this Inline node, or undefined if not applicable for this node. - * @memberof Inline - */ -Inline.prototype.getText = function () { - var text = this.$text() - return text === Opal.nil ? undefined : text -} - -/** - * Get the String sub-type (aka qualifier) of this Inline node. - * - * This value is used to distinguish different variations of the same node - * category, such as different types of anchors. - * - * @returns {string} - the string sub-type of this Inline node. - * @memberof Inline - */ -Inline.prototype.getType = function () { - return this.$type() -} - -/** - * Get the primary String target of this Inline node. - * - * @returns {string|undefined} - the string target of this Inline node. - * @memberof Inline - */ -Inline.prototype.getTarget = function () { - var target = this.$target() - return target === Opal.nil ? undefined : target -} - -/** - * Returns the converted alt text for this inline image. - * - * @returns {string} - the String value of the alt attribute. - * @memberof Inline - */ -Inline.prototype.getAlt = function () { - return this.$alt() -} - -// List API - -/** - * Methods for managing AsciiDoc lists (ordered, unordered and description lists). - * @namespace - * @extends AbstractBlock - */ -var List = Opal.Asciidoctor.List - -/** - * Checks if the {@link List} contains any child {@link ListItem}. - * - * @memberof List - * @returns {boolean} - whether the {@link List} has child {@link ListItem}. - */ -List.prototype.hasItems = function () { - return this['$items?']() -} - -/** - * Get the Array of {@link ListItem} nodes for this {@link List}. - * - * @returns {Array<ListItem>} - an Array of {@link ListItem} nodes. - * @memberof List - */ -List.prototype.getItems = function () { - return this.blocks -} - -// ListItem API - -/** - * Methods for managing items for AsciiDoc olists, ulist, and dlists. - * - * In a description list (dlist), each item is a tuple that consists of a 2-item Array of ListItem terms and a ListItem description (i.e., [[term, term, ...], desc]. - * If a description is not set, then the second entry in the tuple is nil. - * @namespace - * @extends AbstractBlock - */ -var ListItem = Opal.Asciidoctor.ListItem - -/** - * Get the converted String text of this {@link ListItem} node. - * - * @returns {string} - the converted String text for this {@link ListItem} node. - * @memberof ListItem - */ -ListItem.prototype.getText = function () { - return this.$text() -} - -/** - * Set the String source text of this {@link ListItem} node. - * - * @returns {string} - the new String text assigned to this {@link ListItem} - * @memberof ListItem - */ -ListItem.prototype.setText = function (text) { - return this['$text='](text) -} - -/** - * A convenience method that checks whether the text of this {@link ListItem} is not blank (i.e. not undefined or empty string). - * - * @returns {boolean} - whether the text is not blank - * @memberof ListItem - */ -ListItem.prototype.hasText = function () { - return this['$text?']() -} - -/** - * Get the {string} used to mark this {@link ListItem}. - * - * @returns {string} - * @memberof ListItem - */ -ListItem.prototype.getMarker = function () { - return this.marker -} - -/** - * Set the {string} used to mark this {@link ListItem}. - * - * @param {string} marker - the {string} used to mark this {@link ListItem} - * @memberof ListItem - */ -ListItem.prototype.setMarker = function (marker) { - this.marker = marker -} - -/** - * Get the {@link List} to which this {@link ListItem} is attached. - * - * @returns {List} - the {@link List} object to which this {@link ListItem} is attached, - * or undefined if this node has no parent. - * @memberof ListItem - */ -ListItem.prototype.getList = function () { - return this.$list() -} - -/** - * @see {@link ListItem#getList} - * @memberof ListItem - */ -ListItem.prototype.getParent = ListItem.prototype.getList - -// Reader API - -/** @namespace */ -var Reader = Opal.Asciidoctor.Reader - -/** - * Push source onto the front of the reader and switch the context based on the file, document-relative path and line information given. - * - * This method is typically used in an IncludeProcessor to add source read from the target specified. - * - * @param {string} data - * @param {string|undefined} file - * @param {string|undefined} path - * @param {number} lineno - The line number - * @param {Object} attributes - a JSON of attributes - * @returns {Reader} - this {Reader} object. - * @memberof Reader - */ -Reader.prototype.pushInclude = function (data, file, path, lineno, attributes) { - return this.$push_include(data, file, path, lineno, toHash(attributes)) -} - -/** - * Get the current location of the reader's cursor, which encapsulates the file, dir, path, and lineno of the file being read. - * - * @returns {Cursor} - * @memberof Reader - */ -Reader.prototype.getCursor = function () { - return this.$cursor() -} - -/** - * Get the remaining unprocessed lines, without consuming them, as an {Array} of {string}. - * - * Lines will not be consumed from the Reader (ie. you will be able to read these lines again). - * - * @returns {Array<string>} - the remaining unprocessed lines as an {Array} of {string}. - * @memberof Reader - */ -Reader.prototype.getLines = function () { - return this.$lines() -} - -/** - * Get the remaining unprocessed lines, without consuming them, as a {string}. - * - * Lines will not be consumed from the Reader (ie. you will be able to read these lines again). - * - * @returns {string} - the remaining unprocessed lines as a {string} (joined by linefeed characters). - * @memberof Reader - */ -Reader.prototype.getString = function () { - return this.$string() -} - -/** - * Check whether there are any lines left to read. - * If a previous call to this method resulted in a value of false, immediately returned the cached value. - * Otherwise, delegate to peekLine to determine if there is a next line available. - * - * @returns {boolean} - true if there are more lines, false if there are not. - * @memberof Reader - */ -Reader.prototype.hasMoreLines = function () { - return this['$has_more_lines?']() -} - -/** - * Check whether this reader is empty (contains no lines). - * - * @returns {boolean} - true if there are no more lines to peek, otherwise false. - * @memberof Reader - */ -Reader.prototype.isEmpty = function () { - return this['$empty?']() -} - -/** - * Peek at the next line. - * Processes the line if not already marked as processed, but does not consume it (ie. you will be able to read this line again). - * - * This method will probe the reader for more lines. - * If there is a next line that has not previously been visited, the line is passed to the Reader#processLine method to be initialized. - * This call gives sub-classes the opportunity to do preprocessing. - * If the return value of the Reader#processLine is undefined, the data is assumed to be changed and Reader#peekLine is invoked again to perform further processing. - * - * If hasMoreLines is called immediately before peekLine, the direct flag is implicitly true (since the line is flagged as visited). - * - * @param {boolean} direct - A {boolean} flag to bypasses the check for more lines and immediately returns the first element of the internal lines {Array}. (default: false) - * @returns {string} - the next line as a {string} if there are lines remaining. - * @memberof Reader - */ -Reader.prototype.peekLine = function (direct) { - direct = direct || false - var line = this.$peek_line(direct) - return line === Opal.nil ? undefined : line -} - -/** - * Consume, preprocess, and return the next line. - * - * Line will be consumed from the Reader (ie. you won't be able to read this line again). - * - * @returns {string} - the next line as a {string} if data is present. - * @memberof Reader - */ -Reader.prototype.readLine = function () { - var line = this.$read_line() - return line === Opal.nil ? undefined : line -} - -/** - * Consume, preprocess, and return the remaining lines. - * - * This method calls Reader#readLine repeatedly until all lines are consumed and returns the lines as an {Array} of {string}. - * This method differs from Reader#getLines in that it processes each line in turn, hence triggering any preprocessors implemented in sub-classes. - * - * Lines will be consumed from the Reader (ie. you won't be able to read these lines again). - * - * @returns {Array<string>} - the lines read as an {Array} of {string}. - * @memberof Reader - */ -Reader.prototype.readLines = function () { - return this.$read_lines() -} - -/** - * Consume, preprocess, and return the remaining lines joined as a {string}. - * - * Delegates to Reader#readLines, then joins the result. - * - * Lines will be consumed from the Reader (ie. you won't be able to read these lines again). - * - * @returns {string} - the lines read joined as a {string} - * @memberof Reader - */ -Reader.prototype.read = function () { - return this.$read() -} - -/** - * Advance to the next line by discarding the line at the front of the stack. - * - * @returns {boolean} - a Boolean indicating whether there was a line to discard. - * @memberof Reader - */ -Reader.prototype.advance = function () { - return this.$advance() -} - -// Cursor API - -/** @namespace */ -var Cursor = Opal.Asciidoctor.Reader.Cursor - -/** - * Get the file associated to the cursor. - * @returns {string|undefined} - * @memberof Cursor - */ -Cursor.prototype.getFile = function () { - var file = this.file - return file === Opal.nil ? undefined : file -} - -/** - * Get the directory associated to the cursor. - * @returns {string|undefined} - the directory associated to the cursor - * @memberof Cursor - */ -Cursor.prototype.getDirectory = function () { - var dir = this.dir - return dir === Opal.nil ? undefined : dir -} - -/** - * Get the path associated to the cursor. - * @returns {string|undefined} - the path associated to the cursor (or '<stdin>') - * @memberof Cursor - */ -Cursor.prototype.getPath = function () { - var path = this.path - return path === Opal.nil ? undefined : path -} - -/** - * Get the line number of the cursor. - * @returns {number|undefined} - the line number of the cursor - * @memberof Cursor - */ -Cursor.prototype.getLineNumber = function () { - return this.lineno -} - -// Logger API (available in Asciidoctor 1.5.7+) - -function initializeLoggerFormatterClass (className, functions) { - var superclass = Opal.const_get_qualified(Opal.Logger, 'Formatter') - return initializeClass(superclass, className, functions, {}, { - call: function (args) { - for (var i = 0; i < args.length; i++) { - // convert all (Opal) Hash arguments to JSON. - if (typeof args[i] === 'object' && '$$smap' in args[i]) { - args[i] = fromHash(args[i]) - } - } - return args - } - }) -} - -function initializeLoggerClass (className, functions) { - var superClass = Opal.const_get_qualified(Opal.Asciidoctor, 'Logger') - return initializeClass(superClass, className, functions, {}, { - add: function (args) { - if (args.length >= 2 && typeof args[2] === 'object' && '$$smap' in args[2]) { - var message = args[2] - var messageObject = fromHash(message) - messageObject.getText = function () { - return this.text - } - messageObject.getSourceLocation = function () { - return this.source_location - } - messageObject.$inspect = function () { - var sourceLocation = this.getSourceLocation() - if (sourceLocation) { - return sourceLocation.getPath() + ': line ' + sourceLocation.getLineNumber() + ': ' + this.getText() - } else { - return this.getText() - } - } - args[2] = messageObject - } - if (args.length >= 1) { - args[1] = args[1] === Opal.nil ? undefined : args[1] - } - return args - } - }) -} - -/** - * @namespace - */ -var LoggerManager = Opal.const_get_qualified(Opal.Asciidoctor, 'LoggerManager', true) - -// Alias -Opal.Asciidoctor.LoggerManager = LoggerManager - -/** - * @memberof LoggerManager - */ -LoggerManager.getLogger = function () { - return this.$logger() -} - -/** - * @memberof LoggerManager - */ -LoggerManager.setLogger = function (logger) { - this.logger = logger -} - -/** - * @memberof LoggerManager - */ -LoggerManager.newLogger = function (name, functions) { - return initializeLoggerClass(name, functions).$new() -} - -/** - * @memberof LoggerManager - */ -LoggerManager.newFormatter = function (name, functions) { - return initializeLoggerFormatterClass(name, functions).$new() -} - -/** - * @namespace - */ -var LoggerSeverity = Opal.const_get_qualified(Opal.Logger, 'Severity', true) - -// Alias -Opal.Asciidoctor.LoggerSeverity = LoggerSeverity - -/** - * @memberof LoggerSeverity - */ -LoggerSeverity.get = function (severity) { - return LoggerSeverity.$constants()[severity] -} - -/** - * @namespace - */ -var LoggerFormatter = Opal.const_get_qualified(Opal.Logger, 'Formatter', true) - -// Alias -Opal.Asciidoctor.LoggerFormatter = LoggerFormatter - -/** - * @memberof LoggerFormatter - */ -LoggerFormatter.prototype.call = function (severity, time, programName, message) { - return this.$call(LoggerSeverity.get(severity), time, programName, message) -} - -/** - * @namespace - */ -var MemoryLogger = Opal.const_get_qualified(Opal.Asciidoctor, 'MemoryLogger', true) - -// Alias -Opal.Asciidoctor.MemoryLogger = MemoryLogger - -/** - * Create a new MemoryLogger. - * @returns {MemoryLogger} - a MemoryLogger - * @memberof MemoryLogger - */ -MemoryLogger.create = function () { - return this.$new() -} - -/** - * @returns {Array<Object>} - a list of messages - * @memberof MemoryLogger - */ -MemoryLogger.prototype.getMessages = function () { - var messages = this.messages - var result = [] - for (var i = 0; i < messages.length; i++) { - var message = messages[i] - var messageObject = fromHash(message) - if (typeof messageObject.message === 'string') { - messageObject.getText = function () { - return this.message - } - } else { - // also convert the message attribute - messageObject.message = fromHash(messageObject.message) - messageObject.getText = function () { - return this.message.text - } - } - messageObject.getSeverity = function () { - return this.severity.toString() - } - messageObject.getSourceLocation = function () { - return this.message.source_location - } - result.push(messageObject) - } - return result -} - -var Logging = Opal.const_get_qualified(Opal.Asciidoctor, 'Logging', true) - -Opal.Asciidoctor.Logging = Logging - -Logging.getLogger = function () { - return LoggerManager.$logger() -} - -Logging.createLogMessage = function (text, context) { - return Logging.prototype.$message_with_context(text, toHash(context)) -} - -// alias - -/** - * @memberof Reader - */ -Reader.prototype.getLogger = Logging.getLogger -/** - * @memberof Reader - */ -Reader.prototype.createLogMessage = Logging.createLogMessage - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.getLogger = Logging.getLogger -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.createLogMessage = Logging.createLogMessage - -/** - * @namespace - */ -var Logger = Opal.const_get_qualified(Opal.Asciidoctor, 'Logger', true) - -// Alias -Opal.Asciidoctor.Logger = Logger - -/** - * @returns {number|undefined} - the maximum severity - * @memberof Logger - */ -Logger.prototype.getMaxSeverity = function () { - var result = this.max_severity - return result === Opal.nil ? undefined : result -} -/** - * @returns {LoggerFormatter} - the formatter - * @memberof Logger - */ -Logger.prototype.getFormatter = function () { - return this.formatter -} -/** - * @param {LoggerFormatter} formatter - the formatter - * @memberof Logger - */ -Logger.prototype.setFormatter = function (formatter) { - this.formatter = formatter -} -/** - * @returns {number} - the logging severity threshold - * @memberof Logger - */ -Logger.prototype.getLevel = function () { - return this.level -} -/** - * @param {number} level - the logging severity threshold - * @memberof Logger - */ -Logger.prototype.setLevel = function (level) { - this.level = level -} -/** - * @returns {string} - the program name - * @memberof Logger - */ -Logger.prototype.getProgramName = function () { - return this.progname -} -/** - * @param {string} programName - the program name - * @memberof Logger - */ -Logger.prototype.setProgramName = function (programName) { - this.progname = programName -} - -var RubyLogger = Opal.const_get_qualified('::', 'Logger') - -var log = function (logger, level, message) { - logger['$' + level](message) -} -RubyLogger.prototype.add = function (severity, message, programName) { - var severityValue = typeof severity === 'string' ? LoggerSeverity[severity.toUpperCase()] : severity - this.$add(severityValue, message, programName) -} -RubyLogger.prototype.log = RubyLogger.prototype.add -RubyLogger.prototype.debug = function (message) { - log(this, 'debug', message) -} -RubyLogger.prototype.info = function (message) { - log(this, 'info', message) -} -RubyLogger.prototype.warn = function (message) { - log(this, 'warn', message) -} -RubyLogger.prototype.error = function (message) { - log(this, 'error', message) -} -RubyLogger.prototype.fatal = function (message) { - log(this, 'fatal', message) -} -RubyLogger.prototype.isDebugEnabled = function () { - return this['$debug?']() -} -RubyLogger.prototype.isInfoEnabled = function () { - return this['$info?']() -} -RubyLogger.prototype.isWarnEnabled = function () { - return this['$warn?']() -} -RubyLogger.prototype.isErrorEnabled = function () { - return this['$error?']() -} -RubyLogger.prototype.isFatalEnabled = function () { - return this['$fatal?']() -} - -/** - * @namespace - */ -var NullLogger = Opal.const_get_qualified(Opal.Asciidoctor, 'NullLogger', true) - -// Alias -Opal.Asciidoctor.NullLogger = NullLogger - -/** - * Create a new NullLogger. - * @returns {NullLogger} - a NullLogger - * @memberof NullLogger - */ -NullLogger.create = function () { - return this.$new() -} - -/** - * @returns {number|undefined} - the maximum severity - * @memberof NullLogger - */ -NullLogger.prototype.getMaxSeverity = function () { - return this.max_severity -} - -// Alias -Opal.Asciidoctor.StopIteration = Opal.StopIteration - -/** - * @namespace - */ -var Timings = Opal.const_get_qualified(Opal.Asciidoctor, 'Timings', true) - -// Alias -Opal.Asciidoctor.Timings = Timings - -/** - * Create a new Timings. - * @returns {Timings} - a Timings - * @memberof Timings - */ -Timings.create = function () { - return this.$new() -} - -/** - * Print a report to the specified output. - * The report will include: - * - the time to read and parse source - * - the time to convert document - * - the total time (read, parse and convert) - * @param {RubyLogger|console|Object} [to] - an optional output (by default stdout) - * @param {string} [subject] - an optional subject (usually the file name) - * @memberof Timings - */ -Timings.prototype.printReport = function (to, subject) { - var outputFunction - if (to) { - if (typeof to.$add === 'function') { - outputFunction = function (message) { - to.$add(1, message) - } - } else if (typeof to.log === 'function') { - outputFunction = to.log - } else if (typeof to.write === 'function') { - outputFunction = function (message) { - to.write(message, 'utf-8') - } - } else { - throw new Error('The output should be a Stream (with a write function), an object with a log function or a Ruby Logger (with a add function)') - } - } else { - outputFunction = function (message) { - Opal.gvars.stdout.$write(message) - } - } - if (subject) { - outputFunction('Input file: ' + subject) - } - outputFunction(' Time to read and parse source: ' + this.$read_parse().toFixed(2)) - outputFunction(' Time to convert document: ' + this.$convert().toFixed(2)) - outputFunction(' Total time (read, parse and convert): ' + this.$read_parse_convert().toFixed(2)) -} - -/** - * @namespace - * @description - * This API is experimental and subject to change. - * - * A pluggable adapter for integrating a syntax (aka code) highlighter into AsciiDoc processing. - * - * There are two types of syntax highlighter adapters. The first performs syntax highlighting during the convert phase. - * This adapter type must define a "handlesHighlighting" method that returns true. - * The companion "highlight" method will then be called to handle the "specialcharacters" substitution for source blocks. - * - * The second assumes syntax highlighting is performed on the client (e.g., when the HTML document is loaded). - * This adapter type must define a "hasDocinfo" method that returns true. - * The companion "docinfo" method will then be called to insert markup into the output document. - * The docinfo functionality is available to both adapter types. - * - * Asciidoctor.js provides several a built-in adapter for highlight.js. - * Additional adapters can be registered using SyntaxHighlighter.register. - */ -var SyntaxHighlighter = Opal.const_get_qualified(Opal.Asciidoctor, 'SyntaxHighlighter', true) - -// Alias -Opal.Asciidoctor.SyntaxHighlighter = SyntaxHighlighter - -/** - * Associates the syntax highlighter class or object with the specified names. - * - * @description This API is experimental and subject to change. - * - * @param {string|Array} names - A {string} name or an {Array} of {string} names - * @param functions - A list of functions representing a {SyntaxHighlighter} or a {SyntaxHighlighter} class to instantiate - * @memberof SyntaxHighlighter - */ -SyntaxHighlighter.register = function (names, functions) { - var name = typeof names === 'string' ? names : names[0] - if (typeof functions === 'function') { - var classObject = functions - var prototype = classObject.prototype - var properties = Object.getOwnPropertyNames(prototype) - functions = {} - for (var propertyIdx in properties) { - var propertyName = properties[propertyIdx] - functions[propertyName] = prototype[propertyName] - } - } - var scope = initializeClass(SyntaxHighlighterBase, name, functions, {}, { - format: function (args) { - if (args.length >= 2 && typeof args[2] === 'object' && '$$smap' in args[2]) { - args[2] = fromHash(args[2]) - } - if (args.length >= 1) { - args[1] = args[1] === Opal.nil ? undefined : args[1] - } - return args - }, - highlight: function (args) { - if (args.length >= 3 && typeof args[3] === 'object' && '$$smap' in args[3]) { - var opts = args[3] - opts = fromHash(opts) - for (var key in opts) { - var value = opts[key] - if (key === 'callouts') { - var callouts = fromHashKeys(value) - for (var idx in callouts) { - var callout = callouts[idx] - for (var i = 0; i < callout.length; i++) { - var items = callout[i] - for (var j = 0; j < items.length; j++) { - items[j] = items[j] === Opal.nil ? undefined : items[j] - } - } - } - opts[key] = callouts - } else { - opts[key] = value === Opal.nil ? undefined : value - } - } - args[3] = opts - } - if (args.length >= 2) { - args[2] = args[2] === Opal.nil ? undefined : args[2] - } - return args - } - }) - for (var functionName in functions) { - if (Object.prototype.hasOwnProperty.call(functions, functionName)) { - (function (functionName) { - var userFunction = functions[functionName] - if (functionName === 'handlesHighlighting') { - Opal.def(scope, '$highlight?', function () { - return userFunction.call() - }) - } else if (functionName === 'hasDocinfo') { - Opal.def(scope, '$docinfo?', function (location) { - return userFunction.apply(this, [location]) - }) - } - }(functionName)) - } - } - Opal.def(scope, '$name', function () { - return name - }) - SyntaxHighlighter.$register(scope, names) - return scope -} - -/** - * Retrieves the syntax highlighter class or object registered for the specified name. - * - * @description This API is experimental and subject to change. - * - * @param {string} name - The {string} name of the syntax highlighter to retrieve. - * @returns {SyntaxHighlighter} - the {SyntaxHighlighter} registered for this name. - * @memberof SyntaxHighlighter - */ -SyntaxHighlighter.get = function (name) { - var result = SyntaxHighlighter.$for(name) - return result === Opal.nil ? undefined : result -} - -/** - * @deprecated Please use {SyntaxHighlighter#get} method as "for" is a reserved keyword. - */ -SyntaxHighlighter.for = SyntaxHighlighter.get - -/** - * @namespace - */ -var SyntaxHighlighterBase = Opal.const_get_qualified(SyntaxHighlighter, 'Base', true) - -// Alias -Opal.Asciidoctor.SyntaxHighlighterBase = SyntaxHighlighterBase - -/** - * Statically register the current class in the registry for the specified names. - * - * @description This API is experimental and subject to change. - * - * @param {string|Array<string>} names - A {string} name or an {Array} of {string} names - * @memberof SyntaxHighlighterBase - */ -SyntaxHighlighterBase.prototype.registerFor = function (names) { - SyntaxHighlighter.$register(this, names) -} - -// Table API - -/** - * Methods for managing AsciiDoc tables. - * @namespace - * @extends AbstractBlock - */ -var Table = Opal.Asciidoctor.Table - -/** - * Create a new Table element. - * @param {AbstractBlock} parent - * @param {Object|undefined} attributes - * @returns {Table} - a new {Table} object - */ -Table.create = function (parent, attributes) { - return this.$new(parent, toHash(attributes)) -} - -/** - * Get the caption of the table. - * @returns {string} - * @memberof Table - */ -Table.prototype.getCaption = function () { - return this.caption -} - -/** - * Get the rows of this table. - * @returns {Table.Rows} - an {Table.Rows} object with the members "head", "body" and "foot" - * @memberof Table - */ -Table.prototype.getRows = function () { - return this.rows -} - -/** - * Get the columns of this table. - * @returns {Array<Column>} - * @memberof Table - */ -Table.prototype.getColumns = function () { - return this.columns -} - -/** - * Get the head rows of this table. - * @returns {Array<Array<Cell>>} - an Array of Array of Cell - * @memberof Table - */ -Table.prototype.getHeadRows = function () { - return this.rows.head -} - -/** - * Check if the table has a head rows. - * @returns {boolean} - * @memberof Table - */ -Table.prototype.hasHeadRows = function () { - return this.rows !== Opal.nil && this.rows.head.length > 0 -} - -/** - * Get the body rows of this table. - * @returns {Array<Array<Cell>>} - an Array of Array of Cell - * @memberof Table - */ -Table.prototype.getBodyRows = function () { - return this.rows.body -} - -/** - * Check if the table has a body rows. - * @returns {boolean} - */ -Table.prototype.hasBodyRows = function () { - return this.rows !== Opal.nil && this.rows.body.length > 0 -} - -/** - * Get the foot rows of this table. - * @returns {Array<Array<Cell>>} - an Array of Array of Cell - * @memberof Table - */ -Table.prototype.getFootRows = function () { - return this.rows.foot -} - -/** - * Check if the table has a foot rows. - * @returns {boolean} - */ -Table.prototype.hasFootRows = function () { - return this.rows !== Opal.nil && this.rows.foot.length > 0 -} - -/** - * Check if the table has a header option set. - * @returns {boolean} - * @memberof Table - */ -Table.prototype.hasHeaderOption = function () { - return this.has_header_option -} - -/** - * Check if the table has the footer option set. - * @returns {boolean} - * @memberof Table - */ -Table.prototype.hasFooterOption = function () { - var footerOption = this.getAttributes()['footer-option'] - return footerOption === '' -} - -/** - * Check if the table has the autowidth option set. - * @returns {boolean} - * @memberof Table - */ -Table.prototype.hasAutowidthOption = function () { - var autowidthOption = this.getAttributes()['autowidth-option'] - return autowidthOption === '' -} - -/** - * Get the number of rows in the table. - * Please note that the header and footer rows are also counted. - * @returns {number|undefined} - * @memberof Table - */ -Table.prototype.getRowCount = function () { - return this.getAttribute('rowcount') -} - -/** - * Set the number of rows in the table. - * Please note that the header and footer rows are also counted. - * @param {number} value - the value - * @memberof Table - */ -Table.prototype.setRowCount = function (value) { - this.setAttribute('rowcount', value) -} - -/** - * Get the number of columns in the table. - * @returns {number|undefined} - * @memberof Table - */ -Table.prototype.getColumnCount = function () { - return this.getAttribute('colcount') -} - -/** - * Set the number of columns in the table. - * @param {number} value - the value - * @memberof Table - */ -Table.prototype.setColumnCount = function (value) { - this.setAttribute('colcount', value) -} - -// Rows - -/** - * @namespace - */ -var Rows = Opal.Asciidoctor.Table.Rows - -/** - * Create a new Rows element. - * @param {array<array<Cell>>} head - * @param {array<array<Cell>>} foot - * @param {array<array<Cell>>} body - * @returns Rows - */ -Rows.create = function (head, foot, body) { - return this.$new(head, foot, body) -} - -/** - * Get head rows. - * @returns {array<array<Cell>>} - */ -Rows.prototype.getHead = function () { - return this.head -} - -/** - * Get foot rows. - * @returns {array<array<Cell>>} - */ -Rows.prototype.getFoot = function () { - return this.foot -} - -/** - * Get body rows. - * @returns {array<array<Cell>>} - */ -Rows.prototype.getBody = function () { - return this.body -} - -/** - * Retrieve the rows grouped by section as a nested Array. - * - * Creates a 2-dimensional array of two element entries. - * The first element is the section name as a string. - * The second element is the Array of rows in that section. - * The entries are in document order (head, foot, body). - * @returns {[[string, array<array<Cell>>], [string, array<array<Cell>>], [string, array<array<Cell>>]]} - */ -Rows.prototype.bySection = function () { - return [['head', this.head], ['body', this.body], ['foot', this.foot]] -} - -// Table Column - -/** - * Methods to manage the columns of an AsciiDoc table. - * In particular, it keeps track of the column specs. - * @namespace - * @extends AbstractNode - */ -var Column = Opal.Asciidoctor.Table.Column - -/** - * Create a new Column element. - * @param {Table} table - * @param {number} index - * @param {Object|undefined} attributes - * @returns Column - */ -Column.create = function (table, index, attributes) { - return this.$new(table, index, toHash(attributes)) -} - -/** - * Get the column number of this cell. - * @returns {number|undefined} - * @memberof Column - */ -Column.prototype.getColumnNumber = function () { - return this.getAttribute('colnumber') -} - -/** - * Get the width of this cell. - * @returns {string|undefined} - * @memberof Column - */ -Column.prototype.getWidth = function () { - return this.getAttribute('width') -} - -/** - * Get the horizontal align of this cell. - * @returns {string|undefined} - * @memberof Column - */ -Column.prototype.getHorizontalAlign = function () { - return this.getAttribute('halign') -} - -/** - * Get the vertical align of this cell. - * @returns {string|undefined} - * @memberof Column - */ -Column.prototype.getVerticalAlign = function () { - return this.getAttribute('valign') -} - -/** - * Get the style of this cell. - * @returns {string} - * @memberof Column - */ -Column.prototype.getStyle = function () { - var style = this.style - return style === Opal.nil ? undefined : style -} - -// Table Cell - -/** - * Methods for managing the cells in an AsciiDoc table. - * @namespace - * @extends AbstractBlock - */ -var Cell = Opal.Asciidoctor.Table.Cell - -/** - * Create a new Cell element - * @param {Column} column - * @param {string} cellText - * @param {Object|undefined} attributes - * @param {Object|undefined} opts - * @returns {Cell} - */ -Cell.create = function (column, cellText, attributes, opts) { - return this.$new(column, cellText, toHash(attributes), toHash(opts)) -} - -/** - * Get the column span of this {@link Cell} node. - * @returns {number} - An Integer of the number of columns this cell will span (default: undefined) - * @memberof Cell - */ -Cell.prototype.getColumnSpan = function () { - var colspan = this.colspan - return colspan === Opal.nil ? undefined : colspan -} - -/** - * Set the column span of this {@link Cell} node. - * @param {number} value - * @returns {number} - The new colspan value - * @memberof Cell - */ -Cell.prototype.setColumnSpan = function (value) { - return this['$colspan='](value) -} - -/** - * Get the row span of this {@link Cell} node - * @returns {number|undefined} - An Integer of the number of rows this cell will span (default: undefined) - * @memberof Cell - */ -Cell.prototype.getRowSpan = function () { - var rowspan = this.rowspan - return rowspan === Opal.nil ? undefined : rowspan -} - -/** - * Set the row span of this {@link Cell} node - * @param {number} value - * @returns {number} - The new rowspan value - * @memberof Cell - */ -Cell.prototype.setRowSpan = function (value) { - return this['$rowspan='](value) -} - -/** - * Get the content of the cell. - * This method should not be used for cells in the head row or that have the literal style. - * @returns {string} - * @memberof Cell - */ -Cell.prototype.getContent = function () { - return this.$content() -} - -/** - * Get the text of the cell. - * @returns {string} - * @memberof Cell - */ -Cell.prototype.getText = function () { - return this.$text() -} - -/** - * Get the source of the cell. - * @returns {string} - * @memberof Cell - */ -Cell.prototype.getSource = function () { - return this.$source() -} - -/** - * Get the lines of the cell. - * @returns {Array<string>} - * @memberof Cell - */ -Cell.prototype.getLines = function () { - return this.$lines() -} - -/** - * Get the line number of the cell. - * @returns {number|undefined} - * @memberof Cell - */ -Cell.prototype.getLineNumber = function () { - var lineno = this.$lineno() - return lineno === Opal.nil ? undefined : lineno -} - -/** - * Get the source file of the cell. - * @returns {string|undefined} - * @memberof Cell - */ -Cell.prototype.getFile = function () { - var file = this.$file() - return file === Opal.nil ? undefined : file -} - -/** - * Get the style of the cell. - * @returns {string|undefined} - * @memberof Cell - */ -Cell.prototype.getStyle = function () { - var style = this.$style() - return style === Opal.nil ? undefined : style -} - -/** - * Get the column of this cell. - * @returns {Column|undefined} - * @memberof Cell - */ -Cell.prototype.getColumn = function () { - var column = this.$column() - return column === Opal.nil ? undefined : column -} - -/** - * Get the width of this cell. - * @returns {string|undefined} - * @memberof Cell - */ -Cell.prototype.getWidth = function () { - return this.getAttribute('width') -} - -/** - * Get the column width in percentage of this cell. - * @returns {string|undefined} - * @memberof Cell - */ -Cell.prototype.getColumnPercentageWidth = function () { - return this.getAttribute('colpcwidth') -} - -/** - * Get the nested {Document} of this cell when style is 'asciidoc'. - * @returns {Document|undefined} - the nested {Document} - * @memberof Cell - */ -Cell.prototype.getInnerDocument = function () { - var innerDocument = this.inner_document - return innerDocument === Opal.nil ? undefined : innerDocument -} - -// Templates - -/** - * @description - * This API is experimental and subject to change. - * - * Please note that this API is currently only available in a Node environment. - * We recommend to use a custom converter if you are running in the browser. - * - * @namespace - * @module Converter/TemplateConverter - */ -var TemplateConverter = Opal.Asciidoctor.Converter.TemplateConverter - -if (TemplateConverter) { - // Alias - Opal.Asciidoctor.TemplateConverter = TemplateConverter - - /** - * Create a new TemplateConverter. - * @param {string} backend - the backend name - * @param templateDirectories - a list of template directories - * @param {Object} opts - a JSON of options - * @param {string} opts.template_engine - the name of the template engine - * @param {Object} [opts.template_cache] - an optional template cache - * @param {Object} [opts.template_cache.scans] - a JSON of template objects keyed by template name keyed by path patterns - * @param {Object} [opts.template_cache.templates] - a JSON of template objects keyed by file paths - * @returns {TemplateConverter} - * @memberof Converter/TemplateConverter - */ - TemplateConverter.create = function (backend, templateDirectories, opts) { - if (opts && opts.template_cache) { - opts.template_cache = toHash(opts.template_cache) - } - this.$new(backend, templateDirectories, toHash(opts)) - } - - /** - * @returns {Object} - The global cache - * @memberof Converter/TemplateConverter - */ - TemplateConverter.getCache = function () { - var caches = fromHash(this.caches) - if (caches) { - if (caches.scans) { - caches.scans = fromHash(caches.scans) - for (var key in caches.scans) { - caches.scans[key] = fromHash(caches.scans[key]) - } - } - if (caches.templates) { - caches.templates = fromHash(caches.templates) - } - } - return caches - } - - /** - * Clear the global cache. - * @memberof Converter/TemplateConverter - */ - TemplateConverter.clearCache = function () { - this.$clear_caches() - } - - /** - * Convert an {AbstractNode} to the backend format using the named template. - * - * Looks for a template that matches the value of the template name or, - * if the template name is not specified, the value of the {@see AbstractNode.getNodeName} function. - * - * @param {AbstractNode} node - the AbstractNode to convert - * @param {string} templateName - the {string} name of the template to use, or the node name of the node if a template name is not specified. (optional, default: undefined) - * @param {Object} opts - an optional JSON that is passed as local variables to the template. (optional, default: undefined) - * @returns {string} - The {string} result from rendering the template - * @memberof Converter/TemplateConverter - */ - TemplateConverter.prototype.convert = function (node, templateName, opts) { - return this.$convert(node, templateName, toHash(opts)) - } - - /** - * Checks whether there is a template registered with the specified name. - * - * @param {string} name - the {string} template name - * @returns {boolean} - a {boolean} that indicates whether a template is registered for the specified template name. - * @memberof Converter/TemplateConverter - */ - TemplateConverter.prototype.handles = function (name) { - return this['$handles?'](name) - } - - /** - * Retrieves the templates that this converter manages. - * - * @returns {Object} - a JSON of template objects keyed by template name - * @memberof Converter/TemplateConverter - */ - TemplateConverter.prototype.getTemplates = function () { - return fromHash(this.$templates()) - } - - /** - * Registers a template with this converter. - * - * @param {string} name - the {string} template name - * @param {Object} template - the template object to register - * @returns {Object} - the template object - * @memberof Converter/TemplateConverter - */ - TemplateConverter.prototype.register = function (name, template) { - return this.$register(name, template) - } - - /** - * @namespace - * @description - * This API is experimental and subject to change. - * - * Please note that this API is currently only available in a Node environment. - * We recommend to use a custom converter if you are running in the browser. - * - * A pluggable adapter for integrating a template engine into the built-in template converter. - */ - var TemplateEngine = {} - TemplateEngine.registry = {} - - // Alias - Opal.Asciidoctor.TemplateEngine = TemplateEngine - - /** - * Register a template engine adapter for the given names. - * @param {string|Array} names - a {string} name or an {Array} of {string} names - * @param {Object} templateEngineAdapter - a template engine adapter instance - * @example - * const fs = require('fs') - * class DotTemplateEngineAdapter { - * constructor () { - * this.doT = require('dot') - * } - * compile (file, _) { - * const templateFn = this.doT.template(fs.readFileSync(file, 'utf8')) - * return { - * render: templateFn - * } - * } - * } - * asciidoctor.TemplateEngine.register('dot, new DotTemplateEngineAdapter()) - * @memberof TemplateEngine - */ - TemplateEngine.register = function (names, templateEngineAdapter) { - if (typeof names === 'string') { - this.registry[names] = templateEngineAdapter - } else { - // array - for (var i = 0; i < names.length; i++) { - var name = names[i] - this.registry[name] = templateEngineAdapter - } - } - } -} - -/* global Opal, fromHash, toHash, initializeClass */ -// Extensions API - -/** - * @private - */ -var toBlock = function (block) { - // arity is a mandatory field - block.$$arity = block.length - return block -} - -var registerExtension = function (registry, type, processor, name) { - if (typeof processor === 'object' || processor.$$is_class) { - // processor is an instance or a class - return registry['$' + type](processor, name) - } else { - // processor is a function/lambda - return Opal.send(registry, type, name && [name], toBlock(processor)) - } -} - -/** - * @namespace - * @description - * Extensions provide a way to participate in the parsing and converting - * phases of the AsciiDoc processor or extend the AsciiDoc syntax. - * - * The various extensions participate in AsciiDoc processing as follows: - * - * 1. After the source lines are normalized, {{@link Extensions/Preprocessor}}s modify or replace - * the source lines before parsing begins. {{@link Extensions/IncludeProcessor}}s are used to - * process include directives for targets which they claim to handle. - * 2. The Parser parses the block-level content into an abstract syntax tree. - * Custom blocks and block macros are processed by associated {{@link Extensions/BlockProcessor}}s - * and {{@link Extensions/BlockMacroProcessor}}s, respectively. - * 3. {{@link Extensions/TreeProcessor}}s are run on the abstract syntax tree. - * 4. Conversion of the document begins, at which point inline markup is processed - * and converted. Custom inline macros are processed by associated {InlineMacroProcessor}s. - * 5. {{@link Extensions/Postprocessor}}s modify or replace the converted document. - * 6. The output is written to the output stream. - * - * Extensions may be registered globally using the {Extensions.register} method - * or added to a custom {Registry} instance and passed as an option to a single - * Asciidoctor processor. - * - * @example - * asciidoctor.Extensions.register(function () { - * this.block(function () { - * var self = this; - * self.named('shout'); - * self.onContext('paragraph'); - * self.process(function (parent, reader) { - * var lines = reader.getLines().map(function (l) { return l.toUpperCase(); }); - * return self.createBlock(parent, 'paragraph', lines); - * }); - * }); - * }); - */ -var Extensions = Opal.const_get_qualified(Opal.Asciidoctor, 'Extensions') - -// Alias -Opal.Asciidoctor.Extensions = Extensions - -/** - * Create a new {@link Extensions/Registry}. - * @param {string} name - * @param {function} block - * @memberof Extensions - * @returns {Extensions/Registry} - returns a {@link Extensions/Registry} - */ -Extensions.create = function (name, block) { - if (typeof name === 'function' && typeof block === 'undefined') { - return Opal.send(this, 'create', null, toBlock(name)) - } else if (typeof block === 'function') { - return Opal.send(this, 'create', [name], toBlock(block)) - } else { - return this.$create() - } -} - -/** - * @memberof Extensions - */ -Extensions.register = function (name, block) { - if (typeof name === 'function' && typeof block === 'undefined') { - return Opal.send(this, 'register', null, toBlock(name)) - } else { - return Opal.send(this, 'register', [name], toBlock(block)) - } -} - -/** - * Get statically-registered extension groups. - * @memberof Extensions - */ -Extensions.getGroups = function () { - return fromHash(this.$groups()) -} - -/** - * Unregister all statically-registered extension groups. - * @memberof Extensions - */ -Extensions.unregisterAll = function () { - this.$unregister_all() -} - -/** - * Unregister the specified statically-registered extension groups. - * - * NOTE Opal cannot delete an entry from a Hash that is indexed by symbol, so - * we have to resort to using low-level operations in this method. - * - * @memberof Extensions - */ -Extensions.unregister = function () { - var names = Array.prototype.concat.apply([], arguments) - var groups = this.$groups() - var groupNameIdx = {} - for (var i = 0, groupSymbolNames = groups.$$keys; i < groupSymbolNames.length; i++) { - var groupSymbolName = groupSymbolNames[i] - groupNameIdx[groupSymbolName.toString()] = groupSymbolName - } - for (var j = 0; j < names.length; j++) { - var groupStringName = names[j] - if (groupStringName in groupNameIdx) Opal.hash_delete(groups, groupNameIdx[groupStringName]) - } -} - -/** - * @namespace - * @module Extensions/Registry - */ -var Registry = Extensions.Registry - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.getGroups = Extensions.getGroups - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.unregisterAll = function () { - this.groups = Opal.hash() -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.unregister = Extensions.unregister - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.prefer = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - if (typeof processor === 'object' || processor.$$is_class) { - // processor is an instance or a class - return this.$prefer(name, processor) - } else { - // processor is a function/lambda - return Opal.send(this, 'prefer', name && [name], toBlock(processor)) - } -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.block = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'block', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.inlineMacro = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'inline_macro', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.includeProcessor = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'include_processor', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.blockMacro = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'block_macro', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.treeProcessor = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'tree_processor', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.postprocessor = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'postprocessor', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.preprocessor = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'preprocessor', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.docinfoProcessor = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'docinfo_processor', processor, name) -} - -/** - * Checks whether any {{@link Extensions/Preprocessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/Preprocessor}} extensions are registered. - */ -Registry.prototype.hasPreprocessors = function () { - return this['$preprocessors?']() -} - -/** - * Checks whether any {{@link Extensions/TreeProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/TreeProcessor}} extensions are registered. - */ -Registry.prototype.hasTreeProcessors = function () { - return this['$tree_processors?']() -} - -/** - * Checks whether any {{@link Extensions/IncludeProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/IncludeProcessor}} extensions are registered. - */ -Registry.prototype.hasIncludeProcessors = function () { - return this['$include_processors?']() -} - -/** - * Checks whether any {{@link Extensions/Postprocessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/Postprocessor}} extensions are registered. - */ -Registry.prototype.hasPostprocessors = function () { - return this['$postprocessors?']() -} - -/** - * Checks whether any {{@link Extensions/DocinfoProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @param location - A {string} for selecting docinfo extensions at a given location (head or footer) (default: undefined) - * @returns a {boolean} indicating whether any {{@link Extensions/DocinfoProcessor}} extensions are registered. - */ -Registry.prototype.hasDocinfoProcessors = function (location) { - return this['$docinfo_processors?'](location) -} - -/** - * Checks whether any {{@link Extensions/BlockProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/BlockProcessor}} extensions are registered. - */ -Registry.prototype.hasBlocks = function () { - return this['$blocks?']() -} - -/** - * Checks whether any {{@link Extensions/BlockMacroProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/BlockMacroProcessor}} extensions are registered. - */ -Registry.prototype.hasBlockMacros = function () { - return this['$block_macros?']() -} - -/** - * Checks whether any {{@link Extensions/InlineMacroProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/InlineMacroProcessor}} extensions are registered. - */ -Registry.prototype.hasInlineMacros = function () { - return this['$inline_macros?']() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/Preprocessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getPreprocessors = function () { - return this.$preprocessors() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/TreeProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getTreeProcessors = function () { - return this.$tree_processors() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/IncludeProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getIncludeProcessors = function () { - return this.$include_processors() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/Postprocessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getPostprocessors = function () { - return this.$postprocessors() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/DocinfoProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @param location - A {string} for selecting docinfo extensions at a given location (head or footer) (default: undefined) - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getDocinfoProcessors = function (location) { - return this.$docinfo_processors(location) -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/BlockProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getBlocks = function () { - return this.block_extensions.$values() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/BlockMacroProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getBlockMacros = function () { - return this.block_macro_extensions.$values() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/InlineMacroProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getInlineMacros = function () { - return this.$inline_macros() -} - -/** - * Get any {{@link Extensions/InlineMacroProcessor}} extensions are registered to handle the specified inline macro name. - * - * @param name - the {string} inline macro name - * @memberof Extensions/Registry - * @returns the Extension proxy object for the {{@link Extensions/InlineMacroProcessor}} that matches the inline macro name or undefined if no match is found. - */ -Registry.prototype.getInlineMacroFor = function (name) { - var result = this['$registered_for_inline_macro?'](name) - return result === false ? undefined : result -} - -/** - * Get any {{@link Extensions/BlockProcessor}} extensions are registered to handle the specified block name appearing on the specified context. - * @param name - the {string} block name - * @param context - the context of the block: paragraph, open... (optional) - * @memberof Extensions/Registry - * @returns the Extension proxy object for the {{@link Extensions/BlockProcessor}} that matches the block name and context or undefined if no match is found. - */ -Registry.prototype.getBlockFor = function (name, context) { - if (typeof context === 'undefined') { - var ext = this.$find_block_extension(name) - return ext === Opal.nil ? undefined : ext - } - var result = this['$registered_for_block?'](name, context) - return result === false ? undefined : result -} - -/** - * Get any {{@link Extensions/BlockMacroProcessor}} extensions are registered to handle the specified macro name. - * - * @param name - the {string} macro name - * @memberof Extensions/Registry - * @returns the Extension proxy object for the {{@link Extensions/BlockMacroProcessor}} that matches the macro name or undefined if no match is found. - */ -Registry.prototype.getBlockMacroFor = function (name) { - var result = this['$registered_for_block_macro?'](name) - return result === false ? undefined : result -} - -/** - * @namespace - * @module Extensions/Processor - */ -var Processor = Extensions.Processor - -/** - * The extension will be added to the beginning of the list for that extension type. (default is append). - * @memberof Extensions/Processor - * @deprecated Please use the <code>prefer</pre> function on the {@link Extensions/Registry}, - * the {@link Extensions/IncludeProcessor}, - * the {@link Extensions/TreeProcessor}, - * the {@link Extensions/Postprocessor}, - * the {@link Extensions/Preprocessor} - * or the {@link Extensions/DocinfoProcessor} - */ -Processor.prototype.prepend = function () { - this.$option('position', '>>') -} - -/** - * @memberof Extensions/Processor - */ -Processor.prototype.process = function (block) { - var handler = { - apply: function (target, thisArg, argumentsList) { - for (var i = 0; i < argumentsList.length; i++) { - // convert all (Opal) Hash arguments to JSON. - if (typeof argumentsList[i] === 'object' && '$$smap' in argumentsList[i]) { - argumentsList[i] = fromHash(argumentsList[i]) - } - } - return target.apply(thisArg, argumentsList) - } - } - var blockProxy = new Proxy(block, handler) - return Opal.send(this, 'process', null, toBlock(blockProxy)) -} - -/** - * @param {string} name - * @memberof Extensions/Processor - */ -Processor.prototype.named = function (name) { - return this.$named(name) -} - -/** - * Creates a block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string} context - * @param {string|Array<string>} source - * @param {Object|undefined} attrs - A JSON of attributes - * @param {Object|undefined} opts - A JSON of options - * @return {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createBlock = function (parent, context, source, attrs, opts) { - return this.$create_block(parent, context, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates a list block node and links it to the specified parent. - * - * @param parent - The parent Block (Block, Section, or Document) of this new list block. - * @param {string} context - The list context (e.g., ulist, olist, colist, dlist) - * @param {Object} attrs - An object of attributes to set on this list block - * @returns {List} - * @memberof Extensions/Processor - */ -Processor.prototype.createList = function (parent, context, attrs) { - return this.$create_list(parent, context, toHash(attrs)) -} - -/** - * Creates a list item node and links it to the specified parent. - * - * @param {List} parent - The parent {List} of this new list item block. - * @param {string} text - The text of the list item. - * @returns {ListItem} - * @memberof Extensions/Processor - */ -Processor.prototype.createListItem = function (parent, text) { - return this.$create_list_item(parent, text) -} - -/** - * Creates an image block node and links it to the specified parent. - * @param {Block|Section|Document} parent - The parent Block of this new image block. - * @param {Object} attrs - A JSON of attributes - * @param {string} attrs.target - the target attribute to set the source of the image. - * @param {string} attrs.alt - the alt attribute to specify an alternative text for the image. - * @param {Object} opts - A JSON of options - * @returns {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createImageBlock = function (parent, attrs, opts) { - return this.$create_image_block(parent, toHash(attrs), toHash(opts)) -} - -/** - * Creates a paragraph block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - a paragraph {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createParagraph = function (parent, source, attrs, opts) { - return this.$create_paragraph(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates an open block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - an open {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createOpenBlock = function (parent, source, attrs, opts) { - return this.$create_open_block(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates an example block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - an example {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createExampleBlock = function (parent, source, attrs, opts) { - return this.$create_example_block(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates a literal block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - a literal {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createPassBlock = function (parent, source, attrs, opts) { - return this.$create_pass_block(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates a listing block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - a listing {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createListingBlock = function (parent, source, attrs, opts) { - return this.$create_listing_block(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates a literal block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - a literal {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createLiteralBlock = function (parent, source, attrs, opts) { - return this.$create_literal_block(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates an inline anchor and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string} text - The text - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Inline} - an {Inline} anchor - * @memberof Extensions/Processor - */ -Processor.prototype.createAnchor = function (parent, text, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return this.$create_anchor(parent, text, toHash(opts)) -} - -/** - * Creates an inline pass and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string} text - The text - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Inline} - an {Inline} pass - * @memberof Extensions/Processor - */ -Processor.prototype.createInlinePass = function (parent, text, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return this.$create_inline_pass(parent, text, toHash(opts)) -} - -/** - * Creates an inline node and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block of this new inline node. - * @param {string} context - The context name - * @param {string} text - The text - * @param {Object|undefined} opts - A JSON of options - * @returns {Inline} - an {Inline} node - * @memberof Extensions/Processor - */ -Processor.prototype.createInline = function (parent, context, text, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return this.$create_inline(parent, context, text, toHash(opts)) -} - -/** - * Parses blocks in the content and attaches the block to the parent. - * @param {AbstractBlock} parent - the parent block - * @param {string|Array<string>} content - the content - * @param {Object|undefined} attrs - an object of attributes - * @returns {AbstractNode} - The parent node into which the blocks are parsed. - * @memberof Extensions/Processor - */ -Processor.prototype.parseContent = function (parent, content, attrs) { - return this.$parse_content(parent, content, attrs) -} - -/** - * Parses the attrlist String into a JSON of attributes - * @param {AbstractBlock} block - the current AbstractBlock or the parent AbstractBlock if there is no current block (used for applying subs) - * @param {string} attrlist - the list of attributes as a String - * @param {Object|undefined} opts - an optional JSON of options to control processing: - * - positional_attributes: an Array of attribute names to map positional arguments to (optional, default: []) - * - sub_attributes: enables attribute substitution on the attrlist argument (optional, default: false) - * - * @returns - a JSON of parsed attributes - * @memberof Extensions/Processor - */ -Processor.prototype.parseAttributes = function (block, attrlist, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return fromHash(this.$parse_attributes(block, attrlist, toHash(opts))) -} - -/** - * @param {string|Array<string>} value - Name of a positional attribute or an Array of positional attribute names - * @memberof Extensions/Processor - */ -Processor.prototype.positionalAttributes = function (value) { - return this.$positional_attrs(value) -} - -/** - * Specify how to resolve attributes. - * - * @param {string|Array<string>|Object|boolean} [value] - A specification to resolve attributes. - * @memberof Extensions/Processor - */ -Processor.prototype.resolveAttributes = function (value) { - if (typeof value === 'object' && !Array.isArray(value)) { - return this.$resolves_attributes(toHash(value)) - } - if (arguments.length > 1) { - return this.$resolves_attributes(Array.prototype.slice.call(arguments)) - } - if (typeof value === 'undefined') { - // Convert to nil otherwise an exception is thrown at: - // https://github.com/asciidoctor/asciidoctor/blob/0bcb4addc17b307f62975aad203fb556a1bcd8a5/lib/asciidoctor/extensions.rb#L583 - // - // if args.size == 1 && !args[0] - // - // In the above Ruby code, args[0] is undefined and Opal will try to call the function "!" on an undefined object. - return this.$resolves_attributes(Opal.nil) - } - return this.$resolves_attributes(value) -} - -/** - * @deprecated Please use the <code>resolveAttributes</pre> function on the {@link Extensions/Processor}. - * @memberof Extensions/Processor - * @see {Processor#resolveAttributes} - */ -Processor.prototype.resolvesAttributes = Processor.prototype.resolveAttributes - -/** - * Get the configuration JSON for this processor instance. - * @memberof Extensions/Processor - */ -Processor.prototype.getConfig = function () { - return fromHash(this.config) -} - -/** - * @memberof Extensions/Processor - */ -Processor.prototype.option = function (key, value) { - this.$option(key, value) -} - -/** - * @namespace - * @module Extensions/BlockProcessor - */ -var BlockProcessor = Extensions.BlockProcessor - -/** - * @param {Object} value - a JSON of default values for attributes - * @memberof Extensions/BlockProcessor - */ -BlockProcessor.prototype.defaultAttributes = function (value) { - this.$default_attributes(toHash(value)) -} - -/** - * @param {string} context - A context name - * @memberof Extensions/BlockProcessor - */ -BlockProcessor.prototype.onContext = function (context) { - return this.$on_context(context) -} - -/** - * @param {...string} contexts - A list of context names - * @memberof Extensions/BlockProcessor - */ -BlockProcessor.prototype.onContexts = function (contexts) { - return this.$on_contexts(Array.prototype.slice.call(arguments)) -} - -/** - * @returns {string} - * @memberof Extensions/BlockProcessor - */ -BlockProcessor.prototype.getName = function () { - var name = this.name - return name === Opal.nil ? undefined : name -} - -/** - * @param {string} value - * @memberof Extensions/BlockProcessor - */ -BlockProcessor.prototype.parseContentAs = function (value) { - this.$parse_content_as(value) -} - -/** - * @namespace - * @module Extensions/BlockMacroProcessor - */ -var BlockMacroProcessor = Extensions.BlockMacroProcessor - -/** - * @param {Object} value - a JSON of default values for attributes - * @memberof Extensions/BlockMacroProcessor - */ -BlockMacroProcessor.prototype.defaultAttributes = function (value) { - this.$default_attributes(toHash(value)) -} - -/** - * @returns {string} - the block macro name - * @memberof Extensions/BlockMacroProcessor - */ -BlockMacroProcessor.prototype.getName = function () { - var name = this.name - return name === Opal.nil ? undefined : name -} - -/** - * @param {string} value - * @memberof Extensions/BlockMacroProcessor - */ -BlockMacroProcessor.prototype.parseContentAs = function (value) { - this.$parse_content_as(value) -} - -/** - * @namespace - * @module Extensions/InlineMacroProcessor - */ -var InlineMacroProcessor = Extensions.InlineMacroProcessor - -/** - * @param {Object} value - a JSON of default values for attributes - * @memberof Extensions/InlineMacroProcessor - */ -InlineMacroProcessor.prototype.defaultAttributes = function (value) { - this.$default_attributes(toHash(value)) -} - -/** - * @returns {string} - the inline macro name - * @memberof Extensions/InlineMacroProcessor - */ -InlineMacroProcessor.prototype.getName = function () { - var name = this.name - return name === Opal.nil ? undefined : name -} - -/** - * @param {string} value - * @memberof Extensions/InlineMacroProcessor - */ -InlineMacroProcessor.prototype.parseContentAs = function (value) { - this.$parse_content_as(value) -} - -/** - * @param {string} value - * @memberof Extensions/InlineMacroProcessor - */ -InlineMacroProcessor.prototype.matchFormat = function (value) { - this.$match_format(value) -} - -/** - * @param {RegExp} value - * @memberof Extensions/InlineMacroProcessor - */ -InlineMacroProcessor.prototype.match = function (value) { - this.$match(value) -} - -/** - * @namespace - * @module Extensions/IncludeProcessor - */ -var IncludeProcessor = Extensions.IncludeProcessor - -/** - * @memberof Extensions/IncludeProcessor - */ -IncludeProcessor.prototype.handles = function (block) { - return Opal.send(this, 'handles?', null, toBlock(block)) -} - -/** - * @memberof Extensions/IncludeProcessor - */ -IncludeProcessor.prototype.prefer = function () { - this.$prefer() -} - -/** - * @namespace - * @module Extensions/TreeProcessor - */ -var TreeProcessor = Extensions.TreeProcessor - -/** - * @memberof Extensions/TreeProcessor - */ -TreeProcessor.prototype.prefer = function () { - this.$prefer() -} - -/** - * @namespace - * @module Extensions/Postprocessor - */ -var Postprocessor = Extensions.Postprocessor - -/** - * @memberof Extensions/Postprocessor - */ -Postprocessor.prototype.prefer = function () { - this.$prefer() -} - -/** - * @namespace - * @module Extensions/Preprocessor - */ -var Preprocessor = Extensions.Preprocessor - -/** - * @memberof Extensions/Preprocessor - */ -Preprocessor.prototype.prefer = function () { - this.$prefer() -} - -/** - * @namespace - * @module Extensions/DocinfoProcessor - */ -var DocinfoProcessor = Extensions.DocinfoProcessor - -/** - * @memberof Extensions/DocinfoProcessor - */ -DocinfoProcessor.prototype.prefer = function () { - this.$prefer() -} - -/** - * @param {string} value - The docinfo location ("head", "header" or "footer") - * @memberof Extensions/DocinfoProcessor - */ -DocinfoProcessor.prototype.atLocation = function (value) { - this.$at_location(value) -} - -function initializeProcessorClass (superclassName, className, functions) { - var superClass = Opal.const_get_qualified(Extensions, superclassName) - return initializeClass(superClass, className, functions, { - 'handles?': function () { - return true - } - }) -} - -// Postprocessor - -/** - * Create a postprocessor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createPostprocessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('Postprocessor', name, functions) -} - -/** - * Create and instantiate a postprocessor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newPostprocessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createPostprocessor(name, functions).$new() -} - -// Preprocessor - -/** - * Create a preprocessor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createPreprocessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('Preprocessor', name, functions) -} - -/** - * Create and instantiate a preprocessor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newPreprocessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createPreprocessor(name, functions).$new() -} - -// Tree Processor - -/** - * Create a tree processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createTreeProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('TreeProcessor', name, functions) -} - -/** - * Create and instantiate a tree processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newTreeProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createTreeProcessor(name, functions).$new() -} - -// Include Processor - -/** - * Create an include processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createIncludeProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('IncludeProcessor', name, functions) -} - -/** - * Create and instantiate an include processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newIncludeProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createIncludeProcessor(name, functions).$new() -} - -// Docinfo Processor - -/** - * Create a Docinfo processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createDocinfoProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('DocinfoProcessor', name, functions) -} - -/** - * Create and instantiate a Docinfo processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newDocinfoProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createDocinfoProcessor(name, functions).$new() -} - -// Block Processor - -/** - * Create a block processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createBlockProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('BlockProcessor', name, functions) -} - -/** - * Create and instantiate a block processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newBlockProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createBlockProcessor(name, functions).$new() -} - -// Inline Macro Processor - -/** - * Create an inline macro processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createInlineMacroProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('InlineMacroProcessor', name, functions) -} - -/** - * Create and instantiate an inline macro processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newInlineMacroProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createInlineMacroProcessor(name, functions).$new() -} - -// Block Macro Processor - -/** - * Create a block macro processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createBlockMacroProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('BlockMacroProcessor', name, functions) -} - -/** - * Create and instantiate a block macro processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newBlockMacroProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createBlockMacroProcessor(name, functions).$new() -} - -// Converter API - -/** - * @namespace - * @module Converter - */ -var Converter = Opal.const_get_qualified(Opal.Asciidoctor, 'Converter') - -// Alias -Opal.Asciidoctor.Converter = Converter - -/** - * Convert the specified node. - * - * @param {AbstractNode} node - the AbstractNode to convert - * @param {string} transform - an optional String transform that hints at - * which transformation should be applied to this node. - * @param {Object} opts - a JSON of options that provide additional hints about how to convert the node (default: {}) - * @returns the {Object} result of the conversion, typically a {string}. - * @memberof Converter - */ -Converter.prototype.convert = function (node, transform, opts) { - return this.$convert(node, transform, toHash(opts)) -} - -/** - * Create an instance of the converter bound to the specified backend. - * - * @param {string} backend - look for a converter bound to this keyword. - * @param {Object} opts - a JSON of options to pass to the converter (default: {}) - * @returns {Converter} - a converter instance for converting nodes in an Asciidoctor AST. - * @memberof Converter - */ -Converter.create = function (backend, opts) { - return this.$create(backend, toHash(opts)) -} - -// Converter Factory API - -/** - * @namespace - * @module Converter/Factory - */ -var ConverterFactory = Opal.Asciidoctor.Converter.Factory - -var ConverterBase = Opal.Asciidoctor.Converter.Base - -// Alias -Opal.Asciidoctor.ConverterFactory = ConverterFactory - -var ConverterBackendTraits = Opal.Asciidoctor.Converter.BackendTraits - -// Alias -Opal.Asciidoctor.ConverterBackendTraits = ConverterBackendTraits - -/** - * Register a custom converter in the global converter factory to handle conversion to the specified backends. - * If the backend value is an asterisk, the converter is used to handle any backend that does not have an explicit converter. - * - * @param converter - The Converter instance to register - * @param backends {Array} - A {string} {Array} of backend names that this converter should be registered to handle (optional, default: ['*']) - * @return {*} - Returns nothing - * @memberof Converter/Factory - */ -ConverterFactory.register = function (converter, backends) { - var object - var buildBackendTraitsFromObject = function (obj) { - return Object.assign({}, - obj.basebackend ? { basebackend: obj.basebackend } : {}, - obj.outfilesuffix ? { outfilesuffix: obj.outfilesuffix } : {}, - obj.filetype ? { filetype: obj.filetype } : {}, - obj.htmlsyntax ? { htmlsyntax: obj.htmlsyntax } : {}, - obj.supports_templates ? { supports_templates: obj.supports_templates } : {} - ) - } - var assignBackendTraitsToInstance = function (obj, instance) { - if (obj.backend_traits) { - instance.backend_traits = toHash(obj.backend_traits) - } else if (obj.backendTraits) { - instance.backend_traits = toHash(obj.backendTraits) - } else if (obj.basebackend || obj.outfilesuffix || obj.filetype || obj.htmlsyntax || obj.supports_templates) { - instance.backend_traits = toHash(buildBackendTraitsFromObject(obj)) - } - } - var bridgeHandlesMethodToInstance = function (obj, instance) { - bridgeMethodToInstance(obj, instance, '$handles?', 'handles', function () { - return true - }) - } - var bridgeComposedMethodToInstance = function (obj, instance) { - bridgeMethodToInstance(obj, instance, '$composed', 'composed') - } - var bridgeMethodToInstance = function (obj, instance, methodName, functionName, defaultImplementation) { - if (typeof obj[methodName] === 'undefined') { - if (typeof obj[functionName] === 'function') { - instance[methodName] = obj[functionName] - } else if (defaultImplementation) { - instance[methodName] = defaultImplementation - } - } - } - var addRespondToMethod = function (instance) { - if (typeof instance['$respond_to?'] !== 'function') { - instance['$respond_to?'] = function (name) { - return typeof this[name] === 'function' - } - } - } - if (typeof converter === 'function') { - // Class - object = initializeClass(ConverterBase, converter.constructor.name, { - initialize: function (backend, opts) { - var self = this - var result = new converter(backend, opts) // eslint-disable-line - Object.assign(this, result) - assignBackendTraitsToInstance(result, self) - var propertyNames = Object.getOwnPropertyNames(converter.prototype) - for (var i = 0; i < propertyNames.length; i++) { - var propertyName = propertyNames[i] - if (propertyName !== 'constructor') { - self[propertyName] = result[propertyName] - } - } - if (typeof result.$convert === 'undefined' && typeof result.convert === 'function') { - self.$convert = result.convert - } - bridgeHandlesMethodToInstance(result, self) - bridgeComposedMethodToInstance(result, self) - addRespondToMethod(self) - self.super(backend, opts) - } - }) - object.$extend(ConverterBackendTraits) - } else if (typeof converter === 'object') { - // Instance - if (typeof converter.$convert === 'undefined' && typeof converter.convert === 'function') { - converter.$convert = converter.convert - } - assignBackendTraitsToInstance(converter, converter) - if (converter.backend_traits) { - // "extends" ConverterBackendTraits - var converterBackendTraitsFunctionNames = [ - 'basebackend', - 'filetype', - 'htmlsyntax', - 'outfilesuffix', - 'supports_templates', - 'supports_templates?', - 'init_backend_traits', - 'backend_traits' - ] - for (var functionName of converterBackendTraitsFunctionNames) { - converter['$' + functionName] = ConverterBackendTraits.prototype['$' + functionName] - } - converter.$$meta = ConverterBackendTraits - } - bridgeHandlesMethodToInstance(converter, converter) - bridgeComposedMethodToInstance(converter, converter) - addRespondToMethod(converter) - object = converter - } - var args = [object].concat(backends) - return Converter.$register.apply(Converter, args) -} - -/** - * Retrieves the singleton instance of the converter factory. - * - * @param {boolean} initialize - instantiate the singleton if it has not yet - * been instantiated. If this value is false and the singleton has not yet been - * instantiated, this method returns a fresh instance. - * @returns {Converter/Factory} an instance of the converter factory. - * @memberof Converter/Factory - */ -ConverterFactory.getDefault = function (initialize) { - return this.$default(initialize) -} - -/** - * Create an instance of the converter bound to the specified backend. - * - * @param {string} backend - look for a converter bound to this keyword. - * @param {Object} opts - a JSON of options to pass to the converter (default: {}) - * @returns {Converter} - a converter instance for converting nodes in an Asciidoctor AST. - * @memberof Converter/Factory - */ -ConverterFactory.prototype.create = function (backend, opts) { - return this.$create(backend, toHash(opts)) -} - -/** - * Get the converter registry. - * @returns the registry of converter instances or classes keyed by backend name - * @memberof Converter/Factory - */ -ConverterFactory.getRegistry = function () { - return fromHash(Converter.$registry()) -} - -/** - * Lookup the custom converter registered with this factory to handle the specified backend. - * - * @param {string} backend - The {string} backend name. - * @returns the {Converter} class or instance registered to convert the specified backend or undefined if no match is found. - * @memberof Converter/Factory - */ -ConverterFactory.for = function (backend) { - const converter = Converter.$for(backend) - return converter === Opal.nil ? undefined : converter -} - -/* - * Unregister any custom converter classes that are registered with this factory. - * Intended for testing only! - */ -ConverterFactory.unregisterAll = function () { - var internalRegistry = Converter.DefaultFactory.$$cvars['@@registry'] - Converter.DefaultFactory.$$cvars['@@registry'] = toHash({ html5: internalRegistry['$[]']('html5') }) -} - -// Built-in converter - -/** - * @namespace - * @module Converter/Html5Converter - */ -var Html5Converter = Opal.Asciidoctor.Converter.Html5Converter - -// Alias -Opal.Asciidoctor.Html5Converter = Html5Converter - -/** - * Create a new Html5Converter. - * @returns {Html5Converter} - a Html5Converter - * @memberof Converter/Html5Converter - */ -Html5Converter.create = function () { - return this.$new() -} - -/** - * Converts an {AbstractNode} using the given transform. - * This method must be implemented by a concrete converter class. - * - * @param {AbstractNode} node - The concrete instance of AbstractNode to convert. - * @param {string} [transform] - An optional String transform that hints at which transformation should be applied to this node. - * If a transform is not given, the transform is often derived from the value of the {AbstractNode#getNodeName} property. (optional, default: undefined) - * @param {Object} [opts]- An optional JSON of options hints about how to convert the node. (optional, default: undefined) - * - * @returns {string} - the String result. - * @memberof Converter/Html5Converter - */ -Html5Converter.prototype.convert = function (node, transform, opts) { - return this.$convert(node, transform, opts) -} - - -var ASCIIDOCTOR_JS_VERSION = '2.2.4'; - - /** - * Get Asciidoctor.js version number. - * - * @memberof Asciidoctor - * @returns {string} - returns the version number of Asciidoctor.js. - */ - Opal.Asciidoctor.prototype.getVersion = function () { - return ASCIIDOCTOR_JS_VERSION - } - return Opal.Asciidoctor -})) diff --git a/node_modules/@asciidoctor/core/dist/node/asciidoctor.js b/node_modules/@asciidoctor/core/dist/node/asciidoctor.js deleted file mode 100644 index a6e19586..00000000 --- a/node_modules/@asciidoctor/core/dist/node/asciidoctor.js +++ /dev/null @@ -1,27019 +0,0 @@ -/* global Opal, Asciidoctor, ASCIIDOCTOR_JS_VERSION */ -const Opal = require('asciidoctor-opal-runtime').Opal - -// Node module -;(function (root, factory) { - module.exports = factory - // default export for ES6 module interop - module.exports.default = factory -}(this, function (moduleConfig) { -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/electron/io"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $send = Opal.send, $gvars = Opal.gvars, $writer = nil; - if ($gvars.stdout == null) $gvars.stdout = nil; - if ($gvars.stderr == null) $gvars.stderr = nil; - - Opal.add_stubs(['$write_proc=', '$-']); - - - $writer = [function(s){console.log(s)}]; - $send($gvars.stdout, 'write_proc=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [function(s){console.error(s)}]; - $send($gvars.stderr, 'write_proc=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/node"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$==', '$require']); - - - var isElectron = typeof navigator === 'object' && typeof navigator.userAgent === 'string' && typeof navigator.userAgent.indexOf('Electron') !== -1, - platform, - engine, - framework, - ioModule; - - if (typeof moduleConfig === 'object' && typeof moduleConfig.runtime === 'object') { - var runtime = moduleConfig.runtime; - platform = runtime.platform; - engine = runtime.engine; - framework = runtime.framework; - ioModule = runtime.ioModule; - } - - ioModule = ioModule || 'node'; - platform = platform || 'node'; - engine = engine || 'v8'; - if (isElectron) { - framework = framework || 'electron'; - } else { - framework = framework || ''; - } -; - Opal.const_set($nesting[0], 'JAVASCRIPT_IO_MODULE', ioModule); - Opal.const_set($nesting[0], 'JAVASCRIPT_PLATFORM', platform); - Opal.const_set($nesting[0], 'JAVASCRIPT_ENGINE', engine); - Opal.const_set($nesting[0], 'JAVASCRIPT_FRAMEWORK', framework); - if ($$($nesting, 'JAVASCRIPT_FRAMEWORK')['$==']("electron")) { - self.$require("asciidoctor/js/opal_ext/electron/io")}; - -// Load Opal modules -Opal.load("pathname"); -Opal.load("nodejs"); -; -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/node/abstract_node"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass; - - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'AbstractNode'); - - var $nesting = [self].concat($parent_nesting), $AbstractNode_generate_data_uri_from_uri$1; - if (self.__xmlhttprequest__ == null) self.__xmlhttprequest__ = nil; - - - self.__xmlhttprequest__ = require('unxhr'); - var __XMLHttpRequest__ = self.__xmlhttprequest__.XMLHttpRequest; - return (Opal.def(self, '$generate_data_uri_from_uri', $AbstractNode_generate_data_uri_from_uri$1 = function $$generate_data_uri_from_uri(image_uri, cache_uri) { - var self = this; - - - - if (cache_uri == null) { - cache_uri = false; - }; - - var contentType = '' - var b64encoded = '' - var status = -1 - - try { - var xhr = new __XMLHttpRequest__(); - xhr.open('GET', image_uri, false); - xhr.responseType = 'arraybuffer'; - xhr.addEventListener('load', function() { - status = this.status - if (status === 200) { - var arrayBuffer = this.response; - b64encoded = Buffer.from(arrayBuffer).toString('base64'); - contentType = this.getResponseHeader('content-type') - } - }) - xhr.send(null) - } - catch (e) { - // something bad happened! - status = 0 - } - if (status === 404 || (status === 0 && !b64encoded)) { - self.$logger().$warn('could not retrieve image data from URI: ' + image_uri) - return image_uri - } - return 'data:' + contentType + ';base64,' + b64encoded - ; - }, $AbstractNode_generate_data_uri_from_uri$1.$$arity = -2), nil) && 'generate_data_uri_from_uri'; - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/node/open_uri"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module; - - Opal.add_stubs(['$require', '$new', '$<<', '$rewind']); - - self.$require("stringio"); - return (function($base, $parent_nesting) { - var self = $module($base, 'OpenURI'); - - var $nesting = [self].concat($parent_nesting), $OpenURI_open_uri$1; - if (self.__xmlhttprequest__ == null) self.__xmlhttprequest__ = nil; - - - self.__xmlhttprequest__ = require('unxhr'); - var __XMLHttpRequest__ = self.__xmlhttprequest__.XMLHttpRequest; - Opal.defs($$($nesting, 'OpenURI'), '$open_uri', $OpenURI_open_uri$1 = function $$open_uri(uri, $a) { - var $post_args, rest, $iter = $OpenURI_open_uri$1.$$p, $yield = $iter || nil, self = this, io = nil, data = nil; - - if ($iter) $OpenURI_open_uri$1.$$p = null; - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - rest = $post_args;; - io = $$$('::', 'StringIO').$new(); - data = ""; - - var contentType = '' - var status = -1 - - try { - var xhr = new __XMLHttpRequest__() - xhr.open('GET', uri, false) - xhr.responseType = 'text' - xhr.addEventListener('load', function() { - status = this.status - if (status === 200) { - data = this.responseText - contentType = this.getResponseHeader('content-type') - } - }) - xhr.send(null) - } - catch (e) { - // something bad happened! - status = 0 - } - if (status === 404 || (status === 0 && !data)) { - throw $$($nesting, 'IOError').$new('No such file or directory: ' + uri) - } - ; - io['$<<'](data); - io.$rewind(); - if (($yield !== nil)) { - return Opal.yield1($yield, io); - } else { - return io - }; - }, $OpenURI_open_uri$1.$$arity = -2); - })($nesting[0], $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/node/stylesheet"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$rstrip', '$read', '$join']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Stylesheets'); - - var $nesting = [self].concat($parent_nesting), $Stylesheets_primary_stylesheet_data$1; - - self.$$prototype.primary_stylesheet_data = nil; - return (Opal.def(self, '$primary_stylesheet_data', $Stylesheets_primary_stylesheet_data$1 = function $$primary_stylesheet_data() { - var $a, self = this, __path__ = nil, stylesheets_dir = nil; - - - __path__ = require('path'); - if ($truthy(__path__.basename(__dirname) === 'node' && __path__.basename(__path__.dirname(__dirname)) === 'dist')) { - stylesheets_dir = __path__.join(__path__.dirname(__dirname), 'css') - } else { - stylesheets_dir = __path__.join(__dirname, 'css') - }; - return (self.primary_stylesheet_data = ($truthy($a = self.primary_stylesheet_data) ? $a : $$$('::', 'IO').$read($$$('::', 'File').$join(stylesheets_dir, "asciidoctor.css")).$rstrip())); - }, $Stylesheets_primary_stylesheet_data$1.$$arity = 0), nil) && 'primary_stylesheet_data' - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/node/template"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$[]', '$clear', '$===', '$caches', '$class', '$scan', '$node_name', '$raise', '$==', '$strip', '$rstrip', '$key?', '$merge', '$file', '$[]=', '$-', '$private', '$new', '$each', '$directory?', '$system_path', '$scan_dir', '$update', '$select', '$glob', '$file?', '$basename', '$<', '$size', '$split', '$start_with?', '$slice', '$length', '$to_sym', '$node_require']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'TemplateConverter'); - - var $nesting = [self].concat($parent_nesting), $TemplateConverter_caches$1, $TemplateConverter_clear_caches$2, $TemplateConverter_initialize$3, $TemplateConverter_convert$4, $TemplateConverter_handles$ques$5, $TemplateConverter_templates$6, $TemplateConverter_register$7, $TemplateConverter_scan$8, $TemplateConverter_node_require$11, $TemplateConverter_scan_dir$12; - - self.$$prototype.templates = self.$$prototype.caches = self.$$prototype.backend = self.$$prototype.engine = self.$$prototype.template_dirs = nil; - - self.caches = $hash2(["scans", "templates"], {"scans": $hash2([], {}), "templates": $hash2([], {})}); - Opal.defs(self, '$caches', $TemplateConverter_caches$1 = function $$caches() { - var self = this; - if (self.caches == null) self.caches = nil; - - return self.caches - }, $TemplateConverter_caches$1.$$arity = 0); - Opal.defs(self, '$clear_caches', $TemplateConverter_clear_caches$2 = function $$clear_caches() { - var self = this; - if (self.caches == null) self.caches = nil; - - - if ($truthy(self.caches['$[]']("scans"))) { - self.caches['$[]']("scans").$clear()}; - if ($truthy(self.caches['$[]']("templates"))) { - return self.caches['$[]']("templates").$clear() - } else { - return nil - }; - }, $TemplateConverter_clear_caches$2.$$arity = 0); - - Opal.def(self, '$initialize', $TemplateConverter_initialize$3 = function $$initialize(backend, template_dirs, opts) { - var $a, self = this, $case = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - self.backend = backend; - self.templates = $hash2([], {}); - self.template_dirs = template_dirs; - self.engine = opts['$[]']("template_engine"); - self.engine_options = ($truthy($a = opts['$[]']("template_engine_options")) ? $a : $hash2([], {})); - $case = opts['$[]']("template_cache"); - if (true['$===']($case)) {self.caches = self.$class().$caches()} - else if ($$$('::', 'Hash')['$===']($case)) {self.caches = opts['$[]']("template_cache")} - else {self.caches = $hash2([], {})}; - return self.$scan(); - }, $TemplateConverter_initialize$3.$$arity = -3); - - Opal.def(self, '$convert', $TemplateConverter_convert$4 = function $$convert(node, template_name, opts) { - var $a, self = this, template = nil; - - - - if (template_name == null) { - template_name = nil; - }; - - if (opts == null) { - opts = nil; - }; - if ($truthy((template = self.templates['$[]']((template_name = ($truthy($a = template_name) ? $a : node.$node_name())))))) { - } else { - self.$raise("" + "Could not find a custom template to handle transform: " + (template_name)) - }; - if (template_name['$==']("document")) { - return (template.render({node: node, opts: fromHash(opts), helpers: self.helpers})).$strip() - } else { - return (template.render({node: node, opts: fromHash(opts), helpers: self.helpers})).$rstrip() - }; - }, $TemplateConverter_convert$4.$$arity = -2); - - Opal.def(self, '$handles?', $TemplateConverter_handles$ques$5 = function(name) { - var self = this; - - return self.templates['$key?'](name) - }, $TemplateConverter_handles$ques$5.$$arity = 1); - - Opal.def(self, '$templates', $TemplateConverter_templates$6 = function $$templates() { - var self = this; - - return self.templates.$merge() - }, $TemplateConverter_templates$6.$$arity = 0); - - Opal.def(self, '$register', $TemplateConverter_register$7 = function $$register(name, template) { - var $a, self = this, $writer = nil, template_cache = nil; - - - $writer = [name, (function() {if ($truthy((template_cache = ($truthy($a = self.caches['$[]']("templates")) ? template.$file : $a)))) { - - $writer = [template.$file(), template]; - $send(template_cache, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - return template - }; return nil; })()]; - $send(self.templates, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $TemplateConverter_register$7.$$arity = 2); - self.$private(); - - Opal.def(self, '$scan', $TemplateConverter_scan$8 = function $$scan() { - var $$9, self = this, path_resolver = nil, backend = nil, engine = nil; - - - path_resolver = $$($nesting, 'PathResolver').$new(); - backend = self.backend; - engine = self.engine; - return $send(self.template_dirs, 'each', [], ($$9 = function(template_dir){var self = $$9.$$s || this, $$10, file_pattern = nil, engine_dir = nil, backend_dir = nil, pattern = nil, scan_cache = nil, template_cache = nil, templates = nil, $writer = nil; - if (self.caches == null) self.caches = nil; - if (self.templates == null) self.templates = nil; - - - - if (template_dir == null) { - template_dir = nil; - }; - if ($truthy($$$('::', 'File')['$directory?']((template_dir = path_resolver.$system_path(template_dir))))) { - } else { - return nil; - }; - if ($truthy(engine)) { - - file_pattern = "" + "*." + (engine); - if ($truthy($$$('::', 'File')['$directory?']((engine_dir = "" + (template_dir) + "/" + (engine))))) { - template_dir = engine_dir}; - } else { - file_pattern = "*" - }; - if ($truthy($$$('::', 'File')['$directory?']((backend_dir = "" + (template_dir) + "/" + (backend))))) { - template_dir = backend_dir}; - pattern = "" + (template_dir) + "/" + (file_pattern); - if ($truthy((scan_cache = self.caches['$[]']("scans")))) { - - template_cache = self.caches['$[]']("templates"); - if ($truthy((templates = scan_cache['$[]'](pattern)))) { - } else { - templates = (($writer = [pattern, self.$scan_dir(template_dir, pattern, template_cache)]), $send(scan_cache, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]) - }; - $send(templates, 'each', [], ($$10 = function(name, template){var self = $$10.$$s || this; - if (self.templates == null) self.templates = nil; - - - - if (name == null) { - name = nil; - }; - - if (template == null) { - template = nil; - }; - $writer = [name, (($writer = [template.$file(), template]), $send(template_cache, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]; - $send(self.templates, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$10.$$s = self, $$10.$$arity = 2, $$10)); - } else { - self.templates.$update(self.$scan_dir(template_dir, pattern, self.caches['$[]']("templates"))) - }; - return nil;}, $$9.$$s = self, $$9.$$arity = 1, $$9)); - }, $TemplateConverter_scan$8.$$arity = 0); - - Opal.def(self, '$node_require', $TemplateConverter_node_require$11 = function $$node_require(module_name) { - var self = this; - - - try { - return require(module_name) - } - catch (e) { - throw $$($nesting, 'IOError').$new("" + "Unable to require the module '" + (module_name) + "', please make sure that the module is installed.") - } - - }, $TemplateConverter_node_require$11.$$arity = 1); - return (Opal.def(self, '$scan_dir', $TemplateConverter_scan_dir$12 = function $$scan_dir(template_dir, pattern, template_cache) { - var $a, $$13, $$14, self = this, result = nil, helpers = nil; - - - - if (template_cache == null) { - template_cache = nil; - }; - $a = [$hash2([], {}), nil], (result = $a[0]), (helpers = $a[1]), $a; - var enginesContext = {}; - $send($send($$$('::', 'Dir').$glob(pattern), 'select', [], ($$13 = function(match){var self = $$13.$$s || this; - - - - if (match == null) { - match = nil; - }; - return $$$('::', 'File')['$file?'](match);}, $$13.$$s = self, $$13.$$arity = 1, $$13)), 'each', [], ($$14 = function(file){var self = $$14.$$s || this, $b, basename = nil, path_segments = nil, name = nil, template = nil, extsym = nil, $case = nil, nunjucks = nil, handlebars = nil, ejs = nil, pug = nil, $writer = nil; - - - - if (file == null) { - file = nil; - }; - if ((basename = $$$('::', 'File').$basename(file))['$==']("helpers.js")) { - - helpers = file; - return nil;; - } else if ($truthy($rb_lt((path_segments = basename.$split(".")).$size(), 2))) { - return nil;}; - if ((name = path_segments['$[]'](0))['$==']("block_ruler")) { - name = "thematic_break" - } else if ($truthy(name['$start_with?']("block_"))) { - name = name.$slice(6, name.$length())}; - if ($truthy(($truthy($b = template_cache) ? (template = template_cache['$[]'](file)) : $b))) { - } else { - - extsym = path_segments['$[]'](-1).$to_sym(); - $case = extsym; - if ("nunjucks"['$===']($case) || "njk"['$===']($case)) { - nunjucks = self.$node_require("nunjucks"); - - var fs = require('fs') - var env - if (enginesContext.nunjucks && enginesContext.nunjucks.environment) { - env = enginesContext.nunjucks.environment - } else { - var opts = self.engine_options['nunjucks'] || {} - delete opts.web // unsupported option - env = nunjucks.configure(template_dir, opts) - enginesContext.nunjucks = { environment: env } - } - template = Object.assign(nunjucks.compile(fs.readFileSync(file, 'utf8'), env), { '$file': function() { return file } }) - ;} - else if ("handlebars"['$===']($case) || "hbs"['$===']($case)) { - handlebars = self.$node_require("handlebars"); - - var fs = require('fs') - var env - var opts = self.engine_options['handlebars'] || {} - if (enginesContext.handlebars && enginesContext.handlebars.environment) { - env = enginesContext.handlebars.environment - } else { - env = handlebars.create() - enginesContext.handlebars = { environment: env } - } - template = { render: env.compile(fs.readFileSync(file, 'utf8'), opts), '$file': function() { return file } } - ;} - else if ("ejs"['$===']($case)) { - ejs = self.$node_require("ejs"); - - var fs = require('fs') - var opts = self.engine_options['ejs'] || {} - opts.filename = file - // unsupported options - delete opts.async - delete opts.client - template = { render: ejs.compile(fs.readFileSync(file, 'utf8'), opts), '$file': function() { return file } } - ;} - else if ("pug"['$===']($case)) { - pug = self.$node_require("pug"); - - var opts = self.engine_options['pug'] || {} - opts.filename = file - template = { render: pug.compileFile(file, opts), '$file': function() { return file } } - ;} - else if ("js"['$===']($case)) {template = { render: require(file), '$file': function() { return file } }} - else { - var registry = Opal.Asciidoctor.TemplateEngine.registry - var templateEngine = registry[extsym] - if (templateEngine && typeof templateEngine.compile === 'function') { - template = Object.assign(templateEngine.compile(file, name), { '$file': function() { return file } }) - } else { - template = undefined - } - }; - }; - if ($truthy(template)) { - - $writer = [name, template]; - $send(result, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - return nil - };}, $$14.$$s = self, $$14.$$arity = 1, $$14)); - if ($truthy(($truthy($a = helpers) ? $a : $$$('::', 'File')['$file?']((helpers = "" + (template_dir) + "/helpers.js"))))) { - - - var helpers = require(helpers) - if (typeof helpers.configure === 'function') { - helpers.configure(enginesContext) - } - ; - self.helpers = helpers;}; - return result; - }, $TemplateConverter_scan_dir$12.$$arity = -3), nil) && 'scan_dir'; - })($$($nesting, 'Converter'), $$$($$($nesting, 'Converter'), 'Base'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/node"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - self.$require("asciidoctor/js/asciidoctor_ext/node/abstract_node"); - self.$require("asciidoctor/js/asciidoctor_ext/node/open_uri"); - self.$require("asciidoctor/js/asciidoctor_ext/node/stylesheet"); - return self.$require("asciidoctor/js/asciidoctor_ext/node/template"); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["set"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_le(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send, $module = Opal.module; - - Opal.add_stubs(['$include', '$new', '$nil?', '$===', '$raise', '$each', '$add', '$merge', '$class', '$respond_to?', '$subtract', '$dup', '$join', '$to_a', '$equal?', '$instance_of?', '$==', '$instance_variable_get', '$is_a?', '$size', '$all?', '$include?', '$[]=', '$-', '$enum_for', '$[]', '$<<', '$replace', '$delete', '$select', '$each_key', '$to_proc', '$empty?', '$eql?', '$instance_eval', '$clear', '$<', '$<=', '$keys']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Set'); - - var $nesting = [self].concat($parent_nesting), $Set_$$$1, $Set_initialize$2, $Set_dup$4, $Set_$minus$5, $Set_inspect$6, $Set_$eq_eq$7, $Set_add$9, $Set_classify$10, $Set_collect$excl$13, $Set_delete$15, $Set_delete$ques$16, $Set_delete_if$17, $Set_add$ques$20, $Set_each$21, $Set_empty$ques$22, $Set_eql$ques$23, $Set_clear$25, $Set_include$ques$26, $Set_merge$27, $Set_replace$29, $Set_size$30, $Set_subtract$31, $Set_$$33, $Set_superset$ques$34, $Set_proper_superset$ques$36, $Set_subset$ques$38, $Set_proper_subset$ques$40, $Set_to_a$42; - - self.$$prototype.hash = nil; - - self.$include($$($nesting, 'Enumerable')); - Opal.defs(self, '$[]', $Set_$$$1 = function($a) { - var $post_args, ary, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - ary = $post_args;; - return self.$new(ary); - }, $Set_$$$1.$$arity = -1); - - Opal.def(self, '$initialize', $Set_initialize$2 = function $$initialize(enum$) { - var $iter = $Set_initialize$2.$$p, block = $iter || nil, $$3, self = this; - - if ($iter) $Set_initialize$2.$$p = null; - - - if ($iter) $Set_initialize$2.$$p = null;; - - if (enum$ == null) { - enum$ = nil; - }; - self.hash = $hash2([], {}); - if ($truthy(enum$['$nil?']())) { - return nil}; - if ($truthy($$($nesting, 'Enumerable')['$==='](enum$))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "value must be enumerable") - }; - if ($truthy(block)) { - return $send(enum$, 'each', [], ($$3 = function(item){var self = $$3.$$s || this; - - - - if (item == null) { - item = nil; - }; - return self.$add(Opal.yield1(block, item));}, $$3.$$s = self, $$3.$$arity = 1, $$3)) - } else { - return self.$merge(enum$) - }; - }, $Set_initialize$2.$$arity = -1); - - Opal.def(self, '$dup', $Set_dup$4 = function $$dup() { - var self = this, result = nil; - - - result = self.$class().$new(); - return result.$merge(self); - }, $Set_dup$4.$$arity = 0); - - Opal.def(self, '$-', $Set_$minus$5 = function(enum$) { - var self = this; - - - if ($truthy(enum$['$respond_to?']("each"))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "value must be enumerable") - }; - return self.$dup().$subtract(enum$); - }, $Set_$minus$5.$$arity = 1); - Opal.alias(self, "difference", "-"); - - Opal.def(self, '$inspect', $Set_inspect$6 = function $$inspect() { - var self = this; - - return "" + "#<Set: {" + (self.$to_a().$join(",")) + "}>" - }, $Set_inspect$6.$$arity = 0); - - Opal.def(self, '$==', $Set_$eq_eq$7 = function(other) { - var $a, $$8, self = this; - - if ($truthy(self['$equal?'](other))) { - return true - } else if ($truthy(other['$instance_of?'](self.$class()))) { - return self.hash['$=='](other.$instance_variable_get("@hash")) - } else if ($truthy(($truthy($a = other['$is_a?']($$($nesting, 'Set'))) ? self.$size()['$=='](other.$size()) : $a))) { - return $send(other, 'all?', [], ($$8 = function(o){var self = $$8.$$s || this; - if (self.hash == null) self.hash = nil; - - - - if (o == null) { - o = nil; - }; - return self.hash['$include?'](o);}, $$8.$$s = self, $$8.$$arity = 1, $$8)) - } else { - return false - } - }, $Set_$eq_eq$7.$$arity = 1); - - Opal.def(self, '$add', $Set_add$9 = function $$add(o) { - var self = this, $writer = nil; - - - - $writer = [o, true]; - $send(self.hash, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return self; - }, $Set_add$9.$$arity = 1); - Opal.alias(self, "<<", "add"); - - Opal.def(self, '$classify', $Set_classify$10 = function $$classify() { - var $iter = $Set_classify$10.$$p, block = $iter || nil, $$11, $$12, self = this, result = nil; - - if ($iter) $Set_classify$10.$$p = null; - - - if ($iter) $Set_classify$10.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("classify") - }; - result = $send($$($nesting, 'Hash'), 'new', [], ($$11 = function(h, k){var self = $$11.$$s || this, $writer = nil; - - - - if (h == null) { - h = nil; - }; - - if (k == null) { - k = nil; - }; - $writer = [k, self.$class().$new()]; - $send(h, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$11.$$s = self, $$11.$$arity = 2, $$11)); - $send(self, 'each', [], ($$12 = function(item){var self = $$12.$$s || this; - - - - if (item == null) { - item = nil; - }; - return result['$[]'](Opal.yield1(block, item)).$add(item);}, $$12.$$s = self, $$12.$$arity = 1, $$12)); - return result; - }, $Set_classify$10.$$arity = 0); - - Opal.def(self, '$collect!', $Set_collect$excl$13 = function() { - var $iter = $Set_collect$excl$13.$$p, block = $iter || nil, $$14, self = this, result = nil; - - if ($iter) $Set_collect$excl$13.$$p = null; - - - if ($iter) $Set_collect$excl$13.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("collect!") - }; - result = self.$class().$new(); - $send(self, 'each', [], ($$14 = function(item){var self = $$14.$$s || this; - - - - if (item == null) { - item = nil; - }; - return result['$<<'](Opal.yield1(block, item));}, $$14.$$s = self, $$14.$$arity = 1, $$14)); - return self.$replace(result); - }, $Set_collect$excl$13.$$arity = 0); - Opal.alias(self, "map!", "collect!"); - - Opal.def(self, '$delete', $Set_delete$15 = function(o) { - var self = this; - - - self.hash.$delete(o); - return self; - }, $Set_delete$15.$$arity = 1); - - Opal.def(self, '$delete?', $Set_delete$ques$16 = function(o) { - var self = this; - - if ($truthy(self['$include?'](o))) { - - self.$delete(o); - return self; - } else { - return nil - } - }, $Set_delete$ques$16.$$arity = 1); - - Opal.def(self, '$delete_if', $Set_delete_if$17 = function $$delete_if() { - var $$18, $$19, $iter = $Set_delete_if$17.$$p, $yield = $iter || nil, self = this; - - if ($iter) $Set_delete_if$17.$$p = null; - - if (($yield !== nil)) { - } else { - return self.$enum_for("delete_if") - }; - $send($send(self, 'select', [], ($$18 = function(o){var self = $$18.$$s || this; - - - - if (o == null) { - o = nil; - }; - return Opal.yield1($yield, o);;}, $$18.$$s = self, $$18.$$arity = 1, $$18)), 'each', [], ($$19 = function(o){var self = $$19.$$s || this; - if (self.hash == null) self.hash = nil; - - - - if (o == null) { - o = nil; - }; - return self.hash.$delete(o);}, $$19.$$s = self, $$19.$$arity = 1, $$19)); - return self; - }, $Set_delete_if$17.$$arity = 0); - - Opal.def(self, '$add?', $Set_add$ques$20 = function(o) { - var self = this; - - if ($truthy(self['$include?'](o))) { - return nil - } else { - return self.$add(o) - } - }, $Set_add$ques$20.$$arity = 1); - - Opal.def(self, '$each', $Set_each$21 = function $$each() { - var $iter = $Set_each$21.$$p, block = $iter || nil, self = this; - - if ($iter) $Set_each$21.$$p = null; - - - if ($iter) $Set_each$21.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("each") - }; - $send(self.hash, 'each_key', [], block.$to_proc()); - return self; - }, $Set_each$21.$$arity = 0); - - Opal.def(self, '$empty?', $Set_empty$ques$22 = function() { - var self = this; - - return self.hash['$empty?']() - }, $Set_empty$ques$22.$$arity = 0); - - Opal.def(self, '$eql?', $Set_eql$ques$23 = function(other) { - var $$24, self = this; - - return self.hash['$eql?']($send(other, 'instance_eval', [], ($$24 = function(){var self = $$24.$$s || this; - if (self.hash == null) self.hash = nil; - - return self.hash}, $$24.$$s = self, $$24.$$arity = 0, $$24))) - }, $Set_eql$ques$23.$$arity = 1); - - Opal.def(self, '$clear', $Set_clear$25 = function $$clear() { - var self = this; - - - self.hash.$clear(); - return self; - }, $Set_clear$25.$$arity = 0); - - Opal.def(self, '$include?', $Set_include$ques$26 = function(o) { - var self = this; - - return self.hash['$include?'](o) - }, $Set_include$ques$26.$$arity = 1); - Opal.alias(self, "member?", "include?"); - - Opal.def(self, '$merge', $Set_merge$27 = function $$merge(enum$) { - var $$28, self = this; - - - $send(enum$, 'each', [], ($$28 = function(item){var self = $$28.$$s || this; - - - - if (item == null) { - item = nil; - }; - return self.$add(item);}, $$28.$$s = self, $$28.$$arity = 1, $$28)); - return self; - }, $Set_merge$27.$$arity = 1); - - Opal.def(self, '$replace', $Set_replace$29 = function $$replace(enum$) { - var self = this; - - - self.$clear(); - self.$merge(enum$); - return self; - }, $Set_replace$29.$$arity = 1); - - Opal.def(self, '$size', $Set_size$30 = function $$size() { - var self = this; - - return self.hash.$size() - }, $Set_size$30.$$arity = 0); - Opal.alias(self, "length", "size"); - - Opal.def(self, '$subtract', $Set_subtract$31 = function $$subtract(enum$) { - var $$32, self = this; - - - $send(enum$, 'each', [], ($$32 = function(item){var self = $$32.$$s || this; - - - - if (item == null) { - item = nil; - }; - return self.$delete(item);}, $$32.$$s = self, $$32.$$arity = 1, $$32)); - return self; - }, $Set_subtract$31.$$arity = 1); - - Opal.def(self, '$|', $Set_$$33 = function(enum$) { - var self = this; - - - if ($truthy(enum$['$respond_to?']("each"))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "value must be enumerable") - }; - return self.$dup().$merge(enum$); - }, $Set_$$33.$$arity = 1); - - Opal.def(self, '$superset?', $Set_superset$ques$34 = function(set) { - var $a, $$35, self = this; - - - ($truthy($a = set['$is_a?']($$($nesting, 'Set'))) ? $a : self.$raise($$($nesting, 'ArgumentError'), "value must be a set")); - if ($truthy($rb_lt(self.$size(), set.$size()))) { - return false}; - return $send(set, 'all?', [], ($$35 = function(o){var self = $$35.$$s || this; - - - - if (o == null) { - o = nil; - }; - return self['$include?'](o);}, $$35.$$s = self, $$35.$$arity = 1, $$35)); - }, $Set_superset$ques$34.$$arity = 1); - Opal.alias(self, ">=", "superset?"); - - Opal.def(self, '$proper_superset?', $Set_proper_superset$ques$36 = function(set) { - var $a, $$37, self = this; - - - ($truthy($a = set['$is_a?']($$($nesting, 'Set'))) ? $a : self.$raise($$($nesting, 'ArgumentError'), "value must be a set")); - if ($truthy($rb_le(self.$size(), set.$size()))) { - return false}; - return $send(set, 'all?', [], ($$37 = function(o){var self = $$37.$$s || this; - - - - if (o == null) { - o = nil; - }; - return self['$include?'](o);}, $$37.$$s = self, $$37.$$arity = 1, $$37)); - }, $Set_proper_superset$ques$36.$$arity = 1); - Opal.alias(self, ">", "proper_superset?"); - - Opal.def(self, '$subset?', $Set_subset$ques$38 = function(set) { - var $a, $$39, self = this; - - - ($truthy($a = set['$is_a?']($$($nesting, 'Set'))) ? $a : self.$raise($$($nesting, 'ArgumentError'), "value must be a set")); - if ($truthy($rb_lt(set.$size(), self.$size()))) { - return false}; - return $send(self, 'all?', [], ($$39 = function(o){var self = $$39.$$s || this; - - - - if (o == null) { - o = nil; - }; - return set['$include?'](o);}, $$39.$$s = self, $$39.$$arity = 1, $$39)); - }, $Set_subset$ques$38.$$arity = 1); - Opal.alias(self, "<=", "subset?"); - - Opal.def(self, '$proper_subset?', $Set_proper_subset$ques$40 = function(set) { - var $a, $$41, self = this; - - - ($truthy($a = set['$is_a?']($$($nesting, 'Set'))) ? $a : self.$raise($$($nesting, 'ArgumentError'), "value must be a set")); - if ($truthy($rb_le(set.$size(), self.$size()))) { - return false}; - return $send(self, 'all?', [], ($$41 = function(o){var self = $$41.$$s || this; - - - - if (o == null) { - o = nil; - }; - return set['$include?'](o);}, $$41.$$s = self, $$41.$$arity = 1, $$41)); - }, $Set_proper_subset$ques$40.$$arity = 1); - Opal.alias(self, "<", "proper_subset?"); - Opal.alias(self, "+", "|"); - Opal.alias(self, "union", "|"); - return (Opal.def(self, '$to_a', $Set_to_a$42 = function $$to_a() { - var self = this; - - return self.hash.$keys() - }, $Set_to_a$42.$$arity = 0), nil) && 'to_a'; - })($nesting[0], null, $nesting); - return (function($base, $parent_nesting) { - var self = $module($base, 'Enumerable'); - - var $nesting = [self].concat($parent_nesting), $Enumerable_to_set$43; - - - Opal.def(self, '$to_set', $Enumerable_to_set$43 = function $$to_set($a, $b) { - var $iter = $Enumerable_to_set$43.$$p, block = $iter || nil, $post_args, klass, args, self = this; - - if ($iter) $Enumerable_to_set$43.$$p = null; - - - if ($iter) $Enumerable_to_set$43.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - if ($post_args.length > 0) { - klass = $post_args[0]; - $post_args.splice(0, 1); - } - if (klass == null) { - klass = $$($nesting, 'Set'); - }; - - args = $post_args;; - return $send(klass, 'new', [self].concat(Opal.to_a(args)), block.$to_proc()); - }, $Enumerable_to_set$43.$$arity = -1) - })($nesting[0], $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/kernel"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $send = Opal.send; - - Opal.add_stubs(['$new']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Kernel'); - - var $nesting = [self].concat($parent_nesting), $Kernel_open$1, $Kernel___dir__$2; - - - - Opal.def(self, '$open', $Kernel_open$1 = function $$open(path, $a) { - var $post_args, rest, $iter = $Kernel_open$1.$$p, $yield = $iter || nil, self = this, file = nil; - - if ($iter) $Kernel_open$1.$$p = null; - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - rest = $post_args;; - file = $send($$($nesting, 'File'), 'new', [path].concat(Opal.to_a(rest))); - if (($yield !== nil)) { - return Opal.yield1($yield, file); - } else { - return file - }; - }, $Kernel_open$1.$$arity = -2); - - Opal.def(self, '$__dir__', $Kernel___dir__$2 = function $$__dir__() { - var self = this; - - return "" - }, $Kernel___dir__$2.$$arity = 0); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/file"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $gvars = Opal.gvars; - - Opal.add_stubs(['$attr_reader', '$delete', '$gsub', '$read', '$size', '$to_enum', '$chomp', '$each_line', '$readlines', '$split']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'File'); - - var $nesting = [self].concat($parent_nesting), $File_initialize$1, $File_read$2, $File_each_line$3, $File_readlines$4; - - self.$$prototype.eof = self.$$prototype.path = nil; - - self.$attr_reader("eof"); - self.$attr_reader("lineno"); - self.$attr_reader("path"); - - Opal.def(self, '$initialize', $File_initialize$1 = function $$initialize(path, flags) { - var self = this, encoding_flag_regexp = nil; - - - - if (flags == null) { - flags = "r"; - }; - self.path = path; - self.contents = nil; - self.eof = false; - self.lineno = 0; - flags = flags.$delete("b"); - encoding_flag_regexp = /:(.*)/; - flags = flags.$gsub(encoding_flag_regexp, ""); - return (self.flags = flags); - }, $File_initialize$1.$$arity = -2); - - Opal.def(self, '$read', $File_read$2 = function $$read() { - var self = this, res = nil; - - if ($truthy(self.eof)) { - return "" - } else { - - res = $$($nesting, 'File').$read(self.path); - self.eof = true; - self.lineno = res.$size(); - return res; - } - }, $File_read$2.$$arity = 0); - - Opal.def(self, '$each_line', $File_each_line$3 = function $$each_line(separator) { - var $iter = $File_each_line$3.$$p, block = $iter || nil, self = this, lines = nil; - if ($gvars["/"] == null) $gvars["/"] = nil; - - if ($iter) $File_each_line$3.$$p = null; - - - if ($iter) $File_each_line$3.$$p = null;; - - if (separator == null) { - separator = $gvars["/"]; - }; - if ($truthy(self.eof)) { - return (function() {if ((block !== nil)) { - return self - } else { - return [].$to_enum() - }; return nil; })()}; - if ((block !== nil)) { - - lines = $$($nesting, 'File').$read(self.path); - - self.eof = false; - self.lineno = 0; - var chomped = lines.$chomp(), - trailing = lines.length != chomped.length, - splitted = chomped.split(separator); - for (var i = 0, length = splitted.length; i < length; i++) { - self.lineno += 1; - if (i < length - 1 || trailing) { - Opal.yield1(block, splitted[i] + separator); - } - else { - Opal.yield1(block, splitted[i]); - } - } - self.eof = true; - ; - return self; - } else { - return self.$read().$each_line() - }; - }, $File_each_line$3.$$arity = -1); - - Opal.def(self, '$readlines', $File_readlines$4 = function $$readlines() { - var self = this; - - return $$($nesting, 'File').$readlines(self.path) - }, $File_readlines$4.$$arity = 0); - return (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $readlines$5, $file$ques$6, $readable$ques$7, $read$8; - - - - Opal.def(self, '$readlines', $readlines$5 = function $$readlines(path, separator) { - var self = this, content = nil; - if ($gvars["/"] == null) $gvars["/"] = nil; - - - - if (separator == null) { - separator = $gvars["/"]; - }; - content = $$($nesting, 'File').$read(path); - return content.$split(separator); - }, $readlines$5.$$arity = -2); - - Opal.def(self, '$file?', $file$ques$6 = function(path) { - var self = this; - - return true - }, $file$ques$6.$$arity = 1); - - Opal.def(self, '$readable?', $readable$ques$7 = function(path) { - var self = this; - - return true - }, $readable$ques$7.$$arity = 1); - return (Opal.def(self, '$read', $read$8 = function $$read(path) { - var self = this; - - return "" - }, $read$8.$$arity = 1), nil) && 'read'; - })(Opal.get_singleton_class(self), $nesting); - })($nesting[0], null, $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'IO'); - - var $nesting = [self].concat($parent_nesting), $IO_read$9; - - return (Opal.defs(self, '$read', $IO_read$9 = function $$read(path) { - var self = this; - - return $$($nesting, 'File').$read(path) - }, $IO_read$9.$$arity = 1), nil) && 'read' - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/match_data"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $send = Opal.send; - - Opal.add_stubs(['$[]=', '$-']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'MatchData'); - - var $nesting = [self].concat($parent_nesting), $MatchData_$$$eq$1; - - self.$$prototype.matches = nil; - return (Opal.def(self, '$[]=', $MatchData_$$$eq$1 = function(idx, val) { - var self = this, $writer = nil; - - - $writer = [idx, val]; - $send(self.matches, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $MatchData_$$$eq$1.$$arity = 2), nil) && '[]=' - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/string"] = function(Opal) { - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$method_defined?', '$<', '$length', '$bytes', '$to_s', '$byteslice', '$==', '$_original_unpack']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'String'); - - var $nesting = [self].concat($parent_nesting), $String_limit_bytesize$1, $String_unpack$2; - - - if ($truthy(self['$method_defined?']("limit_bytesize"))) { - } else { - - Opal.def(self, '$limit_bytesize', $String_limit_bytesize$1 = function $$limit_bytesize(size) { - var self = this, result = nil; - - - if ($truthy($rb_lt(size, self.$bytes().$length()))) { - } else { - return self.$to_s() - }; - result = self.$byteslice(0, size); - return result.$to_s(); - }, $String_limit_bytesize$1.$$arity = 1) - }; - if ($truthy(self['$method_defined?']("limit"))) { - } else { - Opal.alias(self, "limit", "limit_bytesize") - }; - Opal.alias(self, "_original_unpack", "unpack"); - return (Opal.def(self, '$unpack', $String_unpack$2 = function $$unpack(format) { - var self = this; - - if (format['$==']("C3")) { - - var bytes = [] - for (var i=0; i < 3; i++) { - if (i < self.length) { - bytes.push(self.charCodeAt(i)) - } else { - bytes.push(nil) - } - } - return bytes - - } else { - return self.$_original_unpack(format) - } - }, $String_unpack$2.$$arity = 1), nil) && 'unpack'; - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/uri"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module; - - Opal.add_stubs(['$extend']); - return (function($base, $parent_nesting) { - var self = $module($base, 'URI'); - - var $nesting = [self].concat($parent_nesting), $URI_parse$1, $URI_path$2; - - - Opal.defs(self, '$parse', $URI_parse$1 = function $$parse(str) { - var self = this; - - return str.$extend($$($nesting, 'URI')) - }, $URI_parse$1.$$arity = 1); - - Opal.def(self, '$path', $URI_path$2 = function $$path() { - var self = this; - - return self - }, $URI_path$2.$$arity = 0); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/base64"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $truthy = Opal.truthy; - - Opal.add_stubs(['$delete']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Base64'); - - var $nesting = [self].concat($parent_nesting), $Base64_decode64$1, $Base64_encode64$2, $Base64_strict_decode64$3, $Base64_strict_encode64$4, $Base64_urlsafe_decode64$5, $Base64_urlsafe_encode64$6; - - - - var encode, decode; - encode = Opal.global.btoa || function (input) { - var buffer; - if (input instanceof Buffer) { - buffer = input; - } else { - buffer = Buffer.from(input.toString(), 'binary'); - } - return buffer.toString('base64'); - }; - decode = Opal.global.atob || function (input) { - return Buffer.from(input, 'base64').toString('binary'); - }; - ; - Opal.defs(self, '$decode64', $Base64_decode64$1 = function $$decode64(string) { - var self = this; - - return decode(string.replace(/\r?\n/g, '')); - }, $Base64_decode64$1.$$arity = 1); - Opal.defs(self, '$encode64', $Base64_encode64$2 = function $$encode64(string) { - var self = this; - - return encode(string).replace(/(.{60})/g, "$1\n").replace(/([^\n])$/g, "$1\n"); - }, $Base64_encode64$2.$$arity = 1); - Opal.defs(self, '$strict_decode64', $Base64_strict_decode64$3 = function $$strict_decode64(string) { - var self = this; - - return decode(string); - }, $Base64_strict_decode64$3.$$arity = 1); - Opal.defs(self, '$strict_encode64', $Base64_strict_encode64$4 = function $$strict_encode64(string) { - var self = this; - - return encode(string); - }, $Base64_strict_encode64$4.$$arity = 1); - Opal.defs(self, '$urlsafe_decode64', $Base64_urlsafe_decode64$5 = function $$urlsafe_decode64(string) { - var self = this; - - return decode(string.replace(/\-/g, '+').replace(/_/g, '/')); - }, $Base64_urlsafe_decode64$5.$$arity = 1); - Opal.defs(self, '$urlsafe_encode64', $Base64_urlsafe_encode64$6 = function $$urlsafe_encode64(string, $kwargs) { - var padding, self = this, str = nil; - - - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - padding = $kwargs.$$smap["padding"]; - if (padding == null) { - padding = true - }; - str = encode(string).replace(/\+/g, '-').replace(/\//g, '_'); - if ($truthy(padding)) { - } else { - str = str.$delete("=") - }; - return str; - }, $Base64_urlsafe_encode64$6.$$arity = -2); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/number"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$coerce_to!', '$>']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Number'); - - var $nesting = [self].concat($parent_nesting), $Number_round$1; - - return (Opal.def(self, '$round', $Number_round$1 = function $$round(ndigits) { - var self = this; - - - ; - ndigits = $$($nesting, 'Opal')['$coerce_to!'](ndigits, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_gt(ndigits, 0))) { - return Number(self.toFixed(ndigits)); - } else { - return Math.round(self); - }; - }, $Number_round$1.$$arity = -1), nil) && 'round' - })($nesting[0], $$($nesting, 'Numeric'), $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - self.$require("asciidoctor/js/opal_ext/kernel"); - self.$require("asciidoctor/js/opal_ext/file"); - self.$require("asciidoctor/js/opal_ext/match_data"); - self.$require("asciidoctor/js/opal_ext/string"); - self.$require("asciidoctor/js/opal_ext/uri"); - self.$require("asciidoctor/js/opal_ext/base64"); - self.$require("asciidoctor/js/opal_ext/number"); - -// suppress "not supported" warning messages from Opal -Opal.config.unsupported_features_severity = 'ignore' - -// Load specific runtime -self.$require("asciidoctor/js/opal_ext/node"); -; -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/rx"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $send = Opal.send, $gvars = Opal.gvars, $truthy = Opal.truthy; - - Opal.add_stubs(['$gsub', '$+', '$unpack_hex_range']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting), $Asciidoctor_unpack_hex_range$1; - - - Opal.const_set($nesting[0], 'HEX_RANGE_RX', /([A-F0-9]{4})(?:-([A-F0-9]{4}))?/); - Opal.defs(self, '$unpack_hex_range', $Asciidoctor_unpack_hex_range$1 = function $$unpack_hex_range(str) { - var $$2, self = this; - - return $send(str, 'gsub', [$$($nesting, 'HEX_RANGE_RX')], ($$2 = function(){var self = $$2.$$s || this, $a, $b; - - return "" + "\\u" + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](1))) + (($truthy($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](2))) ? "" + "-\\u" + ((($b = $gvars['~']) === nil ? nil : $b['$[]'](2))) : $a))}, $$2.$$s = self, $$2.$$arity = 0, $$2)) - }, $Asciidoctor_unpack_hex_range$1.$$arity = 1); - Opal.const_set($nesting[0], 'P_L', $rb_plus("A-Za-z", self.$unpack_hex_range("00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D037F03860388-038A038C038E-03A103A3-03F503F7-0481048A-052F0531-055605590561-058705D0-05EA05F0-05F20620-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280840-085808A0-08B20904-0939093D09500958-09610971-09800985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10CF10CF20D05-0D0C0D0E-0D100D12-0D3A0D3D0D4E0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC-0EDF0F000F40-0F470F49-0F6C0F88-0F8C1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510C710CD10D0-10FA10FC-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA16F1-16F81700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191E1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1BBA-1BE51C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11CF51CF61D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209C21022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2CF22CF32D00-2D252D272D2D2D30-2D672D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31BA31F0-31FF3400-4DB54E00-9FCCA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A66EA67F-A69DA6A0-A6E5A717-A71FA722-A788A78B-A78EA790-A7ADA7B0A7B1A7F7-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFA9E0-A9E4A9E6-A9EFA9FA-A9FEAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA7E-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDAAE0-AAEAAAF2-AAF4AB01-AB06AB09-AB0EAB11-AB16AB20-AB26AB28-AB2EAB30-AB5AAB5C-AB5FAB64AB65ABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC"))); - Opal.const_set($nesting[0], 'P_Nl', self.$unpack_hex_range("16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF")); - Opal.const_set($nesting[0], 'P_Nd', $rb_plus("0-9", self.$unpack_hex_range("0660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0DE6-0DEF0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19D91A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9A9F0-A9F9AA50-AA59ABF0-ABF9FF10-FF19"))); - Opal.const_set($nesting[0], 'P_Pc', self.$unpack_hex_range("005F203F20402054FE33FE34FE4D-FE4FFF3F")); - Opal.const_set($nesting[0], 'CC_ALPHA', "" + ($$($nesting, 'P_L')) + ($$($nesting, 'P_Nl'))); - Opal.const_set($nesting[0], 'CG_ALPHA', "" + "[" + ($$($nesting, 'CC_ALPHA')) + "]"); - Opal.const_set($nesting[0], 'CC_ALNUM', "" + ($$($nesting, 'CC_ALPHA')) + ($$($nesting, 'P_Nd'))); - Opal.const_set($nesting[0], 'CG_ALNUM', "" + "[" + ($$($nesting, 'CC_ALNUM')) + "]"); - Opal.const_set($nesting[0], 'CC_WORD', "" + ($$($nesting, 'CC_ALNUM')) + ($$($nesting, 'P_Pc'))); - Opal.const_set($nesting[0], 'CG_WORD', "" + "[" + ($$($nesting, 'CC_WORD')) + "]"); - Opal.const_set($nesting[0], 'CG_BLANK', "[ \\t]"); - Opal.const_set($nesting[0], 'CC_EOL', "(?=\\n|$)"); - Opal.const_set($nesting[0], 'CG_GRAPH', "[^\\s\\x00-\\x1F\\x7F]"); - Opal.const_set($nesting[0], 'CC_ALL', "[\\s\\S]"); - Opal.const_set($nesting[0], 'CC_ANY', "[^\\n]"); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["strscan"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $send = Opal.send; - - Opal.add_stubs(['$attr_reader', '$anchor', '$scan_until', '$length', '$size', '$rest', '$pos=', '$-', '$private']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'StringScanner'); - - var $nesting = [self].concat($parent_nesting), $StringScanner_initialize$1, $StringScanner_beginning_of_line$ques$2, $StringScanner_scan$3, $StringScanner_scan_until$4, $StringScanner_$$$5, $StringScanner_check$6, $StringScanner_check_until$7, $StringScanner_peek$8, $StringScanner_eos$ques$9, $StringScanner_exist$ques$10, $StringScanner_skip$11, $StringScanner_skip_until$12, $StringScanner_get_byte$13, $StringScanner_match$ques$14, $StringScanner_pos$eq$15, $StringScanner_matched_size$16, $StringScanner_post_match$17, $StringScanner_pre_match$18, $StringScanner_reset$19, $StringScanner_rest$20, $StringScanner_rest$ques$21, $StringScanner_rest_size$22, $StringScanner_terminate$23, $StringScanner_unscan$24, $StringScanner_anchor$25; - - self.$$prototype.pos = self.$$prototype.string = self.$$prototype.working = self.$$prototype.matched = self.$$prototype.prev_pos = self.$$prototype.match = nil; - - self.$attr_reader("pos"); - self.$attr_reader("matched"); - - Opal.def(self, '$initialize', $StringScanner_initialize$1 = function $$initialize(string) { - var self = this; - - - self.string = string; - self.pos = 0; - self.matched = nil; - self.working = string; - return (self.match = []); - }, $StringScanner_initialize$1.$$arity = 1); - self.$attr_reader("string"); - - Opal.def(self, '$beginning_of_line?', $StringScanner_beginning_of_line$ques$2 = function() { - var self = this; - - return self.pos === 0 || self.string.charAt(self.pos - 1) === "\n" - }, $StringScanner_beginning_of_line$ques$2.$$arity = 0); - Opal.alias(self, "bol?", "beginning_of_line?"); - - Opal.def(self, '$scan', $StringScanner_scan$3 = function $$scan(pattern) { - var self = this; - - - pattern = self.$anchor(pattern); - - var result = pattern.exec(self.working); - - if (result == null) { - return self.matched = nil; - } - else if (typeof(result) === 'object') { - self.prev_pos = self.pos; - self.pos += result[0].length; - self.working = self.working.substring(result[0].length); - self.matched = result[0]; - self.match = result; - - return result[0]; - } - else if (typeof(result) === 'string') { - self.pos += result.length; - self.working = self.working.substring(result.length); - - return result; - } - else { - return nil; - } - ; - }, $StringScanner_scan$3.$$arity = 1); - - Opal.def(self, '$scan_until', $StringScanner_scan_until$4 = function $$scan_until(pattern) { - var self = this; - - - pattern = self.$anchor(pattern); - - var pos = self.pos, - working = self.working, - result; - - while (true) { - result = pattern.exec(working); - pos += 1; - working = working.substr(1); - - if (result == null) { - if (working.length === 0) { - return self.matched = nil; - } - - continue; - } - - self.matched = self.string.substr(self.pos, pos - self.pos - 1 + result[0].length); - self.prev_pos = pos - 1; - self.pos = pos; - self.working = working.substr(result[0].length); - - return self.matched; - } - ; - }, $StringScanner_scan_until$4.$$arity = 1); - - Opal.def(self, '$[]', $StringScanner_$$$5 = function(idx) { - var self = this; - - - var match = self.match; - - if (idx < 0) { - idx += match.length; - } - - if (idx < 0 || idx >= match.length) { - return nil; - } - - if (match[idx] == null) { - return nil; - } - - return match[idx]; - - }, $StringScanner_$$$5.$$arity = 1); - - Opal.def(self, '$check', $StringScanner_check$6 = function $$check(pattern) { - var self = this; - - - pattern = self.$anchor(pattern); - - var result = pattern.exec(self.working); - - if (result == null) { - return self.matched = nil; - } - - return self.matched = result[0]; - ; - }, $StringScanner_check$6.$$arity = 1); - - Opal.def(self, '$check_until', $StringScanner_check_until$7 = function $$check_until(pattern) { - var self = this; - - - var prev_pos = self.prev_pos, - pos = self.pos; - - var result = self.$scan_until(pattern); - - if (result !== nil) { - self.matched = result.substr(-1); - self.working = self.string.substr(pos); - } - - self.prev_pos = prev_pos; - self.pos = pos; - - return result; - - }, $StringScanner_check_until$7.$$arity = 1); - - Opal.def(self, '$peek', $StringScanner_peek$8 = function $$peek(length) { - var self = this; - - return self.working.substring(0, length) - }, $StringScanner_peek$8.$$arity = 1); - - Opal.def(self, '$eos?', $StringScanner_eos$ques$9 = function() { - var self = this; - - return self.working.length === 0 - }, $StringScanner_eos$ques$9.$$arity = 0); - - Opal.def(self, '$exist?', $StringScanner_exist$ques$10 = function(pattern) { - var self = this; - - - var result = pattern.exec(self.working); - - if (result == null) { - return nil; - } - else if (result.index == 0) { - return 0; - } - else { - return result.index + 1; - } - - }, $StringScanner_exist$ques$10.$$arity = 1); - - Opal.def(self, '$skip', $StringScanner_skip$11 = function $$skip(pattern) { - var self = this; - - - pattern = self.$anchor(pattern); - - var result = pattern.exec(self.working); - - if (result == null) { - return self.matched = nil; - } - else { - var match_str = result[0]; - var match_len = match_str.length; - - self.matched = match_str; - self.prev_pos = self.pos; - self.pos += match_len; - self.working = self.working.substring(match_len); - - return match_len; - } - ; - }, $StringScanner_skip$11.$$arity = 1); - - Opal.def(self, '$skip_until', $StringScanner_skip_until$12 = function $$skip_until(pattern) { - var self = this; - - - var result = self.$scan_until(pattern); - - if (result === nil) { - return nil; - } - else { - self.matched = result.substr(-1); - - return result.length; - } - - }, $StringScanner_skip_until$12.$$arity = 1); - - Opal.def(self, '$get_byte', $StringScanner_get_byte$13 = function $$get_byte() { - var self = this; - - - var result = nil; - - if (self.pos < self.string.length) { - self.prev_pos = self.pos; - self.pos += 1; - result = self.matched = self.working.substring(0, 1); - self.working = self.working.substring(1); - } - else { - self.matched = nil; - } - - return result; - - }, $StringScanner_get_byte$13.$$arity = 0); - Opal.alias(self, "getch", "get_byte"); - - Opal.def(self, '$match?', $StringScanner_match$ques$14 = function(pattern) { - var self = this; - - - pattern = self.$anchor(pattern); - - var result = pattern.exec(self.working); - - if (result == null) { - return nil; - } - else { - self.prev_pos = self.pos; - - return result[0].length; - } - ; - }, $StringScanner_match$ques$14.$$arity = 1); - - Opal.def(self, '$pos=', $StringScanner_pos$eq$15 = function(pos) { - var self = this; - - - - if (pos < 0) { - pos += self.string.$length(); - } - ; - self.pos = pos; - return (self.working = self.string.slice(pos)); - }, $StringScanner_pos$eq$15.$$arity = 1); - - Opal.def(self, '$matched_size', $StringScanner_matched_size$16 = function $$matched_size() { - var self = this; - - - if (self.matched === nil) { - return nil; - } - - return self.matched.length - - }, $StringScanner_matched_size$16.$$arity = 0); - - Opal.def(self, '$post_match', $StringScanner_post_match$17 = function $$post_match() { - var self = this; - - - if (self.matched === nil) { - return nil; - } - - return self.string.substr(self.pos); - - }, $StringScanner_post_match$17.$$arity = 0); - - Opal.def(self, '$pre_match', $StringScanner_pre_match$18 = function $$pre_match() { - var self = this; - - - if (self.matched === nil) { - return nil; - } - - return self.string.substr(0, self.prev_pos); - - }, $StringScanner_pre_match$18.$$arity = 0); - - Opal.def(self, '$reset', $StringScanner_reset$19 = function $$reset() { - var self = this; - - - self.working = self.string; - self.matched = nil; - return (self.pos = 0); - }, $StringScanner_reset$19.$$arity = 0); - - Opal.def(self, '$rest', $StringScanner_rest$20 = function $$rest() { - var self = this; - - return self.working - }, $StringScanner_rest$20.$$arity = 0); - - Opal.def(self, '$rest?', $StringScanner_rest$ques$21 = function() { - var self = this; - - return self.working.length !== 0 - }, $StringScanner_rest$ques$21.$$arity = 0); - - Opal.def(self, '$rest_size', $StringScanner_rest_size$22 = function $$rest_size() { - var self = this; - - return self.$rest().$size() - }, $StringScanner_rest_size$22.$$arity = 0); - - Opal.def(self, '$terminate', $StringScanner_terminate$23 = function $$terminate() { - var self = this, $writer = nil; - - - self.match = nil; - - $writer = [self.string.$length()]; - $send(self, 'pos=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - }, $StringScanner_terminate$23.$$arity = 0); - - Opal.def(self, '$unscan', $StringScanner_unscan$24 = function $$unscan() { - var self = this; - - - self.pos = self.prev_pos; - self.prev_pos = nil; - self.match = nil; - return self; - }, $StringScanner_unscan$24.$$arity = 0); - self.$private(); - return (Opal.def(self, '$anchor', $StringScanner_anchor$25 = function $$anchor(pattern) { - var self = this; - - - var flags = pattern.toString().match(/\/([^\/]+)$/); - flags = flags ? flags[1] : undefined; - return new RegExp('^(?:' + pattern.source + ')', flags); - - }, $StringScanner_anchor$25.$$arity = 1), nil) && 'anchor'; - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - self.$require("asciidoctor/js/opal_ext"); - self.$require("asciidoctor/js/rx"); - return self.$require("strscan"); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/core_ext/nil_or_empty"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$method_defined?']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NilClass'); - - var $nesting = [self].concat($parent_nesting); - - if ($truthy(self['$method_defined?']("nil_or_empty?"))) { - return nil - } else { - return Opal.alias(self, "nil_or_empty?", "nil?") - } - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'String'); - - var $nesting = [self].concat($parent_nesting); - - if ($truthy(self['$method_defined?']("nil_or_empty?"))) { - return nil - } else { - return Opal.alias(self, "nil_or_empty?", "empty?") - } - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Array'); - - var $nesting = [self].concat($parent_nesting); - - if ($truthy(self['$method_defined?']("nil_or_empty?"))) { - return nil - } else { - return Opal.alias(self, "nil_or_empty?", "empty?") - } - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Hash'); - - var $nesting = [self].concat($parent_nesting); - - if ($truthy(self['$method_defined?']("nil_or_empty?"))) { - return nil - } else { - return Opal.alias(self, "nil_or_empty?", "empty?") - } - })($nesting[0], null, $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Numeric'); - - var $nesting = [self].concat($parent_nesting); - - if ($truthy(self['$method_defined?']("nil_or_empty?"))) { - return nil - } else { - return Opal.alias(self, "nil_or_empty?", "nil?") - } - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/core_ext/hash/merge"] = function(Opal) { - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var $$1, self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $send = Opal.send, $truthy = Opal.truthy, $hash2 = Opal.hash2; - - Opal.add_stubs(['$==', '$arity', '$instance_method', '$send', '$new', '$<', '$length', '$>', '$inject', '$merge', '$[]']); - if ($$($nesting, 'Hash').$instance_method("merge").$arity()['$=='](1)) { - return $$($nesting, 'Hash').$send("prepend", $send($$($nesting, 'Module'), 'new', [], ($$1 = function(){var self = $$1.$$s || this, $merge$2; - - return (Opal.def(self, '$merge', $merge$2 = function $$merge($a) { - var $post_args, args, $$3, $iter = $merge$2.$$p, $yield = $iter || nil, self = this, len = nil; - - if ($iter) $merge$2.$$p = null; - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy($rb_lt((len = args.$length()), 1))) { - return $send(self, Opal.find_super_dispatcher(self, 'merge', $merge$2, false), [$hash2([], {})], null) - } else { - - if ($truthy($rb_gt(len, 1))) { - return $send(args, 'inject', [self], ($$3 = function(acc, arg){var self = $$3.$$s || this; - - - - if (acc == null) { - acc = nil; - }; - - if (arg == null) { - arg = nil; - }; - return acc.$merge(arg);}, $$3.$$s = self, $$3.$$arity = 2, $$3)) - } else { - - return $send(self, Opal.find_super_dispatcher(self, 'merge', $merge$2, false), [args['$[]'](0)], null); - }; - }; - }, $merge$2.$$arity = -1), nil) && 'merge'}, $$1.$$s = self, $$1.$$arity = 0, $$1))) - } else { - return nil - } -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/core_ext/match_data/names"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $truthy = Opal.truthy, $klass = Opal.klass; - - Opal.add_stubs(['$method_defined?']); - if ($truthy($$($nesting, 'MatchData')['$method_defined?']("names"))) { - return nil - } else { - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'MatchData'); - - var $nesting = [self].concat($parent_nesting), $MatchData_names$1; - - return (Opal.def(self, '$names', $MatchData_names$1 = function $$names() { - var self = this; - - return [] - }, $MatchData_names$1.$$arity = 0), nil) && 'names' - })($nesting[0], null, $nesting) - } -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/core_ext"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$==']); - - self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/nil_or_empty"); - self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/hash/merge"); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - return self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/match_data/names") - } else { - return nil - }; -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/helpers"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy, $gvars = Opal.gvars, $send = Opal.send, $hash2 = Opal.hash2; - - Opal.add_stubs(['$module_function', '$require', '$include?', '$include', '$==', '$===', '$path', '$message', '$raise', '$warn', '$logger', '$chomp', '$empty?', '$slice', '$unpack', '$[]', '$byteslice', '$bytesize', '$[]=', '$-', '$map', '$rstrip', '$encode', '$encoding', '$nil_or_empty?', '$!=', '$tap', '$each_line', '$<<', '$match?', '$gsub', '$rindex', '$index', '$basename', '$extname', '$!', '$length', '$directory?', '$dirname', '$mkdir_p', '$mkdir', '$private_constant', '$join', '$divmod', '$*', '$+', '$to_s', '$to_i', '$succ', '$class_for_name', '$const_get']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'Helpers'); - - var $nesting = [self].concat($parent_nesting), $Helpers_require_library$1, $Helpers_prepare_source_array$2, $Helpers_prepare_source_string$11, $Helpers_uriish$ques$16, $Helpers_encode_uri_component$17, $Helpers_encode_spaces_in_uri$18, $Helpers_rootname$19, $Helpers_basename$20, $Helpers_extname$ques$21, $Helpers_extname$22, $Helpers_extname$23, $Helpers_mkdir_p$24, $Helpers_int_to_roman$25, $Helpers_nextval$27, $Helpers_resolve_class$28, $Helpers_class_for_name$29; - - - self.$module_function(); - - Opal.def(self, '$require_library', $Helpers_require_library$1 = function $$require_library(name, gem_name, on_failure) { - var self = this, $case = nil, details = nil; - if ($gvars["!"] == null) $gvars["!"] = nil; - - - - if (gem_name == null) { - gem_name = true; - }; - - if (on_failure == null) { - on_failure = "abort"; - }; - try { - return self.$require(name) - } catch ($err) { - if (Opal.rescue($err, [$$$('::', 'LoadError')])) { - try { - - if ($truthy(self['$include?']($$($nesting, 'Logging')))) { - } else { - self.$include($$($nesting, 'Logging')) - }; - if ($truthy(gem_name)) { - - if (gem_name['$=='](true)) { - gem_name = name}; - $case = on_failure; - if ("abort"['$===']($case)) { - details = (function() {if ($gvars["!"].$path()['$=='](gem_name)) { - return "" - } else { - return "" + " (reason: " + ((function() {if ($truthy($gvars["!"].$path())) { - return "" + "cannot load '" + ($gvars["!"].$path()) + "'" - } else { - return $gvars["!"].$message() - }; return nil; })()) + ")" - }; return nil; })(); - self.$raise($$$('::', 'LoadError'), "" + "asciidoctor: FAILED: required gem '" + (gem_name) + "' is not available" + (details) + ". Processing aborted.");} - else if ("warn"['$===']($case)) { - details = (function() {if ($gvars["!"].$path()['$=='](gem_name)) { - return "" - } else { - return "" + " (reason: " + ((function() {if ($truthy($gvars["!"].$path())) { - return "" + "cannot load '" + ($gvars["!"].$path()) + "'" - } else { - return $gvars["!"].$message() - }; return nil; })()) + ")" - }; return nil; })(); - self.$logger().$warn("" + "optional gem '" + (gem_name) + "' is not available" + (details) + ". Functionality disabled.");}; - } else { - $case = on_failure; - if ("abort"['$===']($case)) {self.$raise($$$('::', 'LoadError'), "" + "asciidoctor: FAILED: " + ($gvars["!"].$message().$chomp(".")) + ". Processing aborted.")} - else if ("warn"['$===']($case)) {self.$logger().$warn("" + ($gvars["!"].$message().$chomp(".")) + ". Functionality disabled.")} - }; - return nil; - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - }, $Helpers_require_library$1.$$arity = -2); - - Opal.def(self, '$prepare_source_array', $Helpers_prepare_source_array$2 = function $$prepare_source_array(data, trim_end) { - var $$3, $$4, $$5, $$6, $$7, $$8, $$9, $$10, self = this, leading_2_bytes = nil, leading_bytes = nil, first = nil, $writer = nil; - - - - if (trim_end == null) { - trim_end = true; - }; - if ($truthy(data['$empty?']())) { - return []}; - if ((leading_2_bytes = (leading_bytes = (first = data['$[]'](0)).$unpack("C3")).$slice(0, 2))['$==']($$($nesting, 'BOM_BYTES_UTF_16LE'))) { - - - $writer = [0, first.$byteslice(2, first.$bytesize())]; - $send(data, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return (function() {if ($truthy(trim_end)) { - return $send(data, 'map', [], ($$3 = function(line){var self = $$3.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line.$encode($$($nesting, 'UTF_8'), $$$($$$('::', 'Encoding'), 'UTF_16LE')).$rstrip();}, $$3.$$s = self, $$3.$$arity = 1, $$3)) - } else { - return $send(data, 'map', [], ($$4 = function(line){var self = $$4.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line.$encode($$($nesting, 'UTF_8'), $$$($$$('::', 'Encoding'), 'UTF_16LE')).$chomp();}, $$4.$$s = self, $$4.$$arity = 1, $$4)) - }; return nil; })(); - } else if (leading_2_bytes['$==']($$($nesting, 'BOM_BYTES_UTF_16BE'))) { - - - $writer = [0, first.$byteslice(2, first.$bytesize())]; - $send(data, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return (function() {if ($truthy(trim_end)) { - return $send(data, 'map', [], ($$5 = function(line){var self = $$5.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line.$encode($$($nesting, 'UTF_8'), $$$($$$('::', 'Encoding'), 'UTF_16BE')).$rstrip();}, $$5.$$s = self, $$5.$$arity = 1, $$5)) - } else { - return $send(data, 'map', [], ($$6 = function(line){var self = $$6.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line.$encode($$($nesting, 'UTF_8'), $$$($$$('::', 'Encoding'), 'UTF_16BE')).$chomp();}, $$6.$$s = self, $$6.$$arity = 1, $$6)) - }; return nil; })(); - } else if (leading_bytes['$==']($$($nesting, 'BOM_BYTES_UTF_8'))) { - - $writer = [0, first.$byteslice(3, first.$bytesize())]; - $send(data, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if (first.$encoding()['$==']($$($nesting, 'UTF_8'))) { - if ($truthy(trim_end)) { - return $send(data, 'map', [], ($$7 = function(line){var self = $$7.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line.$rstrip();}, $$7.$$s = self, $$7.$$arity = 1, $$7)) - } else { - return $send(data, 'map', [], ($$8 = function(line){var self = $$8.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line.$chomp();}, $$8.$$s = self, $$8.$$arity = 1, $$8)) - } - } else if ($truthy(trim_end)) { - return $send(data, 'map', [], ($$9 = function(line){var self = $$9.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line.$encode($$($nesting, 'UTF_8')).$rstrip();}, $$9.$$s = self, $$9.$$arity = 1, $$9)) - } else { - return $send(data, 'map', [], ($$10 = function(line){var self = $$10.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line.$encode($$($nesting, 'UTF_8')).$chomp();}, $$10.$$s = self, $$10.$$arity = 1, $$10)) - }; - }, $Helpers_prepare_source_array$2.$$arity = -2); - - Opal.def(self, '$prepare_source_string', $Helpers_prepare_source_string$11 = function $$prepare_source_string(data, trim_end) { - var $$12, $$14, self = this, leading_2_bytes = nil, leading_bytes = nil; - - - - if (trim_end == null) { - trim_end = true; - }; - if ($truthy(data['$nil_or_empty?']())) { - return []}; - if ((leading_2_bytes = (leading_bytes = data.$unpack("C3")).$slice(0, 2))['$==']($$($nesting, 'BOM_BYTES_UTF_16LE'))) { - data = data.$byteslice(2, data.$bytesize()).$encode($$($nesting, 'UTF_8'), $$$($$$('::', 'Encoding'), 'UTF_16LE')) - } else if (leading_2_bytes['$==']($$($nesting, 'BOM_BYTES_UTF_16BE'))) { - data = data.$byteslice(2, data.$bytesize()).$encode($$($nesting, 'UTF_8'), $$$($$$('::', 'Encoding'), 'UTF_16BE')) - } else if (leading_bytes['$==']($$($nesting, 'BOM_BYTES_UTF_8'))) { - - data = data.$byteslice(3, data.$bytesize()); - if (data.$encoding()['$==']($$($nesting, 'UTF_8'))) { - } else { - data = data.$encode($$($nesting, 'UTF_8')) - }; - } else if ($truthy(data.$encoding()['$!=']($$($nesting, 'UTF_8')))) { - data = data.$encode($$($nesting, 'UTF_8'))}; - if ($truthy(trim_end)) { - return $send([], 'tap', [], ($$12 = function(lines){var self = $$12.$$s || this, $$13; - - - - if (lines == null) { - lines = nil; - }; - return $send(data, 'each_line', [], ($$13 = function(line){var self = $$13.$$s || this; - - - - if (line == null) { - line = nil; - }; - return lines['$<<'](line.$rstrip());}, $$13.$$s = self, $$13.$$arity = 1, $$13));}, $$12.$$s = self, $$12.$$arity = 1, $$12)) - } else { - return $send([], 'tap', [], ($$14 = function(lines){var self = $$14.$$s || this, $$15; - - - - if (lines == null) { - lines = nil; - }; - return $send(data, 'each_line', [], ($$15 = function(line){var self = $$15.$$s || this; - - - - if (line == null) { - line = nil; - }; - return lines['$<<'](line.$chomp());}, $$15.$$s = self, $$15.$$arity = 1, $$15));}, $$14.$$s = self, $$14.$$arity = 1, $$14)) - }; - }, $Helpers_prepare_source_string$11.$$arity = -2); - - Opal.def(self, '$uriish?', $Helpers_uriish$ques$16 = function(str) { - var $a, self = this; - - return ($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$match?'](str) : $a) - }, $Helpers_uriish$ques$16.$$arity = 1); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - - Opal.def(self, '$encode_uri_component', $Helpers_encode_uri_component$17 = function $$encode_uri_component(str) { - var self = this; - - - return encodeURIComponent(str).replace(/%20|[!'()*]/g, function (m) { - return m === '%20' ? '+' : '%' + m.charCodeAt(0).toString(16) - }) - - }, $Helpers_encode_uri_component$17.$$arity = 1) - } else { - nil - }; - - Opal.def(self, '$encode_spaces_in_uri', $Helpers_encode_spaces_in_uri$18 = function $$encode_spaces_in_uri(str) { - var self = this; - - if ($truthy(str['$include?'](" "))) { - - return str.$gsub(" ", "%20"); - } else { - return str - } - }, $Helpers_encode_spaces_in_uri$18.$$arity = 1); - - Opal.def(self, '$rootname', $Helpers_rootname$19 = function $$rootname(filename) { - var self = this, last_dot_idx = nil; - - if ($truthy((last_dot_idx = filename.$rindex(".")))) { - if ($truthy(filename.$index("/", last_dot_idx))) { - return filename - } else { - - return filename.$slice(0, last_dot_idx); - } - } else { - return filename - } - }, $Helpers_rootname$19.$$arity = 1); - - Opal.def(self, '$basename', $Helpers_basename$20 = function $$basename(filename, drop_ext) { - var self = this; - - - - if (drop_ext == null) { - drop_ext = nil; - }; - if ($truthy(drop_ext)) { - return $$$('::', 'File').$basename(filename, (function() {if (drop_ext['$=='](true)) { - - return self.$extname(filename); - } else { - return drop_ext - }; return nil; })()) - } else { - return $$$('::', 'File').$basename(filename) - }; - }, $Helpers_basename$20.$$arity = -2); - - Opal.def(self, '$extname?', $Helpers_extname$ques$21 = function(path) { - var $a, self = this, last_dot_idx = nil; - - return ($truthy($a = (last_dot_idx = path.$rindex("."))) ? path.$index("/", last_dot_idx)['$!']() : $a) - }, $Helpers_extname$ques$21.$$arity = 1); - if ($truthy($$$($$$('::', 'File'), 'ALT_SEPARATOR'))) { - - Opal.def(self, '$extname', $Helpers_extname$22 = function $$extname(path, fallback) { - var $a, self = this, last_dot_idx = nil; - - - - if (fallback == null) { - fallback = ""; - }; - if ($truthy((last_dot_idx = path.$rindex(".")))) { - if ($truthy(($truthy($a = path.$index("/", last_dot_idx)) ? $a : path.$index($$$($$$('::', 'File'), 'ALT_SEPARATOR'), last_dot_idx)))) { - return fallback - } else { - - return path.$slice(last_dot_idx, path.$length()); - } - } else { - return fallback - }; - }, $Helpers_extname$22.$$arity = -2) - } else { - - Opal.def(self, '$extname', $Helpers_extname$23 = function $$extname(path, fallback) { - var self = this, last_dot_idx = nil; - - - - if (fallback == null) { - fallback = ""; - }; - if ($truthy((last_dot_idx = path.$rindex(".")))) { - if ($truthy(path.$index("/", last_dot_idx))) { - return fallback - } else { - - return path.$slice(last_dot_idx, path.$length()); - } - } else { - return fallback - }; - }, $Helpers_extname$23.$$arity = -2) - }; - - Opal.def(self, '$mkdir_p', $Helpers_mkdir_p$24 = function $$mkdir_p(dir) { - var self = this, parent_dir = nil; - - if ($truthy($$$('::', 'File')['$directory?'](dir))) { - return nil - } else { - - if ((parent_dir = $$$('::', 'File').$dirname(dir))['$=='](".")) { - } else { - self.$mkdir_p(parent_dir) - }; - - try { - return $$$('::', 'Dir').$mkdir(dir) - } catch ($err) { - if (Opal.rescue($err, [$$$('::', 'SystemCallError')])) { - try { - if ($truthy($$$('::', 'File')['$directory?'](dir))) { - return nil - } else { - return self.$raise() - } - } finally { Opal.pop_exception() } - } else { throw $err; } - };; - } - }, $Helpers_mkdir_p$24.$$arity = 1); - Opal.const_set($nesting[0], 'ROMAN_NUMERALS', $hash2(["M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"], {"M": 1000, "CM": 900, "D": 500, "CD": 400, "C": 100, "XC": 90, "L": 50, "XL": 40, "X": 10, "IX": 9, "V": 5, "IV": 4, "I": 1})); - self.$private_constant("ROMAN_NUMERALS"); - - Opal.def(self, '$int_to_roman', $Helpers_int_to_roman$25 = function $$int_to_roman(val) { - var $$26, self = this; - - return $send($$($nesting, 'ROMAN_NUMERALS'), 'map', [], ($$26 = function(l, i){var self = $$26.$$s || this, $a, $b, repeat = nil; - - - - if (l == null) { - l = nil; - }; - - if (i == null) { - i = nil; - }; - $b = val.$divmod(i), $a = Opal.to_ary($b), (repeat = ($a[0] == null ? nil : $a[0])), (val = ($a[1] == null ? nil : $a[1])), $b; - return $rb_times(l, repeat);}, $$26.$$s = self, $$26.$$arity = 2, $$26)).$join() - }, $Helpers_int_to_roman$25.$$arity = 1); - - Opal.def(self, '$nextval', $Helpers_nextval$27 = function $$nextval(current) { - var self = this, intval = nil; - - if ($truthy($$$('::', 'Integer')['$==='](current))) { - return $rb_plus(current, 1) - } else if ((intval = current.$to_i()).$to_s()['$=='](current.$to_s())) { - return $rb_plus(intval, 1) - } else { - return current.$succ() - } - }, $Helpers_nextval$27.$$arity = 1); - - Opal.def(self, '$resolve_class', $Helpers_resolve_class$28 = function $$resolve_class(object) { - var self = this; - - if ($truthy($$$('::', 'Class')['$==='](object))) { - return object - } else { - - if ($truthy($$$('::', 'String')['$==='](object))) { - - return self.$class_for_name(object); - } else { - return nil - }; - } - }, $Helpers_resolve_class$28.$$arity = 1); - - Opal.def(self, '$class_for_name', $Helpers_class_for_name$29 = function $$class_for_name(qualified_name) { - var self = this, resolved = nil; - - try { - - if ($truthy($$$('::', 'Class')['$===']((resolved = $$$('::', 'Object').$const_get(qualified_name, false))))) { - } else { - self.$raise() - }; - return resolved; - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return self.$raise($$$('::', 'NameError'), "" + "Could not resolve class for name: " + (qualified_name)) - } finally { Opal.pop_exception() } - } else { throw $err; } - } - }, $Helpers_class_for_name$29.$$arity = 1); - })($nesting[0], $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["logger"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_le(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $module = Opal.module, $send = Opal.send, $truthy = Opal.truthy; - - Opal.add_stubs(['$include', '$to_h', '$map', '$constants', '$const_get', '$to_s', '$format', '$chr', '$strftime', '$message_as_string', '$===', '$+', '$message', '$class', '$join', '$backtrace', '$inspect', '$attr_reader', '$attr_accessor', '$new', '$key', '$upcase', '$raise', '$add', '$to_proc', '$<=', '$<', '$write', '$call', '$[]', '$now']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Logger'); - - var $nesting = [self].concat($parent_nesting), $Logger$1, $Logger_initialize$4, $Logger_level$eq$5, $Logger_info$6, $Logger_debug$7, $Logger_warn$8, $Logger_error$9, $Logger_fatal$10, $Logger_unknown$11, $Logger_info$ques$12, $Logger_debug$ques$13, $Logger_warn$ques$14, $Logger_error$ques$15, $Logger_fatal$ques$16, $Logger_add$17; - - self.$$prototype.level = self.$$prototype.progname = self.$$prototype.pipe = self.$$prototype.formatter = nil; - - (function($base, $parent_nesting) { - var self = $module($base, 'Severity'); - - var $nesting = [self].concat($parent_nesting); - - - Opal.const_set($nesting[0], 'DEBUG', 0); - Opal.const_set($nesting[0], 'INFO', 1); - Opal.const_set($nesting[0], 'WARN', 2); - Opal.const_set($nesting[0], 'ERROR', 3); - Opal.const_set($nesting[0], 'FATAL', 4); - Opal.const_set($nesting[0], 'UNKNOWN', 5); - })($nesting[0], $nesting); - self.$include($$($nesting, 'Severity')); - Opal.const_set($nesting[0], 'SEVERITY_LABELS', $send($$($nesting, 'Severity').$constants(), 'map', [], ($Logger$1 = function(s){var self = $Logger$1.$$s || this; - - - - if (s == null) { - s = nil; - }; - return [$$($nesting, 'Severity').$const_get(s), s.$to_s()];}, $Logger$1.$$s = self, $Logger$1.$$arity = 1, $Logger$1)).$to_h()); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Formatter'); - - var $nesting = [self].concat($parent_nesting), $Formatter_call$2, $Formatter_message_as_string$3; - - - Opal.const_set($nesting[0], 'MESSAGE_FORMAT', "%s, [%s] %5s -- %s: %s\n"); - Opal.const_set($nesting[0], 'DATE_TIME_FORMAT', "%Y-%m-%dT%H:%M:%S.%6N"); - - Opal.def(self, '$call', $Formatter_call$2 = function $$call(severity, time, progname, msg) { - var self = this; - - return self.$format($$($nesting, 'MESSAGE_FORMAT'), severity.$chr(), time.$strftime($$($nesting, 'DATE_TIME_FORMAT')), severity, progname, self.$message_as_string(msg)) - }, $Formatter_call$2.$$arity = 4); - return (Opal.def(self, '$message_as_string', $Formatter_message_as_string$3 = function $$message_as_string(msg) { - var $a, self = this, $case = nil; - - return (function() {$case = msg; - if ($$$('::', 'String')['$===']($case)) {return msg} - else if ($$$('::', 'Exception')['$===']($case)) {return $rb_plus("" + (msg.$message()) + " (" + (msg.$class()) + ")\n", ($truthy($a = msg.$backtrace()) ? $a : []).$join("\n"))} - else {return msg.$inspect()}})() - }, $Formatter_message_as_string$3.$$arity = 1), nil) && 'message_as_string'; - })($nesting[0], null, $nesting); - self.$attr_reader("level"); - self.$attr_accessor("progname"); - self.$attr_accessor("formatter"); - - Opal.def(self, '$initialize', $Logger_initialize$4 = function $$initialize(pipe) { - var self = this; - - - self.pipe = pipe; - self.level = $$($nesting, 'DEBUG'); - return (self.formatter = $$($nesting, 'Formatter').$new()); - }, $Logger_initialize$4.$$arity = 1); - - Opal.def(self, '$level=', $Logger_level$eq$5 = function(severity) { - var self = this, level = nil; - - if ($truthy($$$('::', 'Integer')['$==='](severity))) { - return (self.level = severity) - } else if ($truthy((level = $$($nesting, 'SEVERITY_LABELS').$key(severity.$to_s().$upcase())))) { - return (self.level = level) - } else { - return self.$raise($$($nesting, 'ArgumentError'), "" + "invalid log level: " + (severity)) - } - }, $Logger_level$eq$5.$$arity = 1); - - Opal.def(self, '$info', $Logger_info$6 = function $$info(progname) { - var $iter = $Logger_info$6.$$p, block = $iter || nil, self = this; - - if ($iter) $Logger_info$6.$$p = null; - - - if ($iter) $Logger_info$6.$$p = null;; - - if (progname == null) { - progname = nil; - }; - return $send(self, 'add', [$$($nesting, 'INFO'), nil, progname], block.$to_proc()); - }, $Logger_info$6.$$arity = -1); - - Opal.def(self, '$debug', $Logger_debug$7 = function $$debug(progname) { - var $iter = $Logger_debug$7.$$p, block = $iter || nil, self = this; - - if ($iter) $Logger_debug$7.$$p = null; - - - if ($iter) $Logger_debug$7.$$p = null;; - - if (progname == null) { - progname = nil; - }; - return $send(self, 'add', [$$($nesting, 'DEBUG'), nil, progname], block.$to_proc()); - }, $Logger_debug$7.$$arity = -1); - - Opal.def(self, '$warn', $Logger_warn$8 = function $$warn(progname) { - var $iter = $Logger_warn$8.$$p, block = $iter || nil, self = this; - - if ($iter) $Logger_warn$8.$$p = null; - - - if ($iter) $Logger_warn$8.$$p = null;; - - if (progname == null) { - progname = nil; - }; - return $send(self, 'add', [$$($nesting, 'WARN'), nil, progname], block.$to_proc()); - }, $Logger_warn$8.$$arity = -1); - - Opal.def(self, '$error', $Logger_error$9 = function $$error(progname) { - var $iter = $Logger_error$9.$$p, block = $iter || nil, self = this; - - if ($iter) $Logger_error$9.$$p = null; - - - if ($iter) $Logger_error$9.$$p = null;; - - if (progname == null) { - progname = nil; - }; - return $send(self, 'add', [$$($nesting, 'ERROR'), nil, progname], block.$to_proc()); - }, $Logger_error$9.$$arity = -1); - - Opal.def(self, '$fatal', $Logger_fatal$10 = function $$fatal(progname) { - var $iter = $Logger_fatal$10.$$p, block = $iter || nil, self = this; - - if ($iter) $Logger_fatal$10.$$p = null; - - - if ($iter) $Logger_fatal$10.$$p = null;; - - if (progname == null) { - progname = nil; - }; - return $send(self, 'add', [$$($nesting, 'FATAL'), nil, progname], block.$to_proc()); - }, $Logger_fatal$10.$$arity = -1); - - Opal.def(self, '$unknown', $Logger_unknown$11 = function $$unknown(progname) { - var $iter = $Logger_unknown$11.$$p, block = $iter || nil, self = this; - - if ($iter) $Logger_unknown$11.$$p = null; - - - if ($iter) $Logger_unknown$11.$$p = null;; - - if (progname == null) { - progname = nil; - }; - return $send(self, 'add', [$$($nesting, 'UNKNOWN'), nil, progname], block.$to_proc()); - }, $Logger_unknown$11.$$arity = -1); - - Opal.def(self, '$info?', $Logger_info$ques$12 = function() { - var self = this; - - return $rb_le(self.level, $$($nesting, 'INFO')) - }, $Logger_info$ques$12.$$arity = 0); - - Opal.def(self, '$debug?', $Logger_debug$ques$13 = function() { - var self = this; - - return $rb_le(self.level, $$($nesting, 'DEBUG')) - }, $Logger_debug$ques$13.$$arity = 0); - - Opal.def(self, '$warn?', $Logger_warn$ques$14 = function() { - var self = this; - - return $rb_le(self.level, $$($nesting, 'WARN')) - }, $Logger_warn$ques$14.$$arity = 0); - - Opal.def(self, '$error?', $Logger_error$ques$15 = function() { - var self = this; - - return $rb_le(self.level, $$($nesting, 'ERROR')) - }, $Logger_error$ques$15.$$arity = 0); - - Opal.def(self, '$fatal?', $Logger_fatal$ques$16 = function() { - var self = this; - - return $rb_le(self.level, $$($nesting, 'FATAL')) - }, $Logger_fatal$ques$16.$$arity = 0); - return (Opal.def(self, '$add', $Logger_add$17 = function $$add(severity, message, progname) { - var $iter = $Logger_add$17.$$p, block = $iter || nil, $a, self = this; - - if ($iter) $Logger_add$17.$$p = null; - - - if ($iter) $Logger_add$17.$$p = null;; - - if (message == null) { - message = nil; - }; - - if (progname == null) { - progname = nil; - }; - if ($truthy($rb_lt((severity = ($truthy($a = severity) ? $a : $$($nesting, 'UNKNOWN'))), self.level))) { - return true}; - progname = ($truthy($a = progname) ? $a : self.progname); - if ($truthy(message)) { - } else if ((block !== nil)) { - message = Opal.yieldX(block, []) - } else { - - message = progname; - progname = self.progname; - }; - self.pipe.$write(self.formatter.$call(($truthy($a = $$($nesting, 'SEVERITY_LABELS')['$[]'](severity)) ? $a : "ANY"), $$$('::', 'Time').$now(), progname, message)); - return true; - }, $Logger_add$17.$$arity = -2), nil) && 'add'; - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/logging"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $hash2 = Opal.hash2, $gvars = Opal.gvars; - - Opal.add_stubs(['$require', '$attr_reader', '$progname=', '$-', '$new', '$formatter=', '$level=', '$>', '$[]', '$===', '$inspect', '$tap', '$each', '$constants', '$const_get', '$[]=', '$<<', '$clear', '$empty?', '$max', '$map', '$attr_accessor', '$memoize_logger', '$private', '$private_class_method', '$extend', '$logger', '$merge']); - - self.$require("logger"); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Logger'); - - var $nesting = [self].concat($parent_nesting), $Logger_initialize$1, $Logger_add$2; - - self.$$prototype.max_severity = nil; - - self.$attr_reader("max_severity"); - - Opal.def(self, '$initialize', $Logger_initialize$1 = function $$initialize($a) { - var $post_args, args, $iter = $Logger_initialize$1.$$p, $yield = $iter || nil, self = this, $writer = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Logger_initialize$1.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $Logger_initialize$1, false), $zuper, $iter); - - $writer = ["asciidoctor"]; - $send(self, 'progname=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [$$($nesting, 'BasicFormatter').$new()]; - $send(self, 'formatter=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [$$($nesting, 'WARN')]; - $send(self, 'level=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - }, $Logger_initialize$1.$$arity = -1); - - Opal.def(self, '$add', $Logger_add$2 = function $$add(severity, message, progname) { - var $a, $iter = $Logger_add$2.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Logger_add$2.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if (message == null) { - message = nil; - }; - - if (progname == null) { - progname = nil; - }; - if ($truthy($rb_gt((severity = ($truthy($a = severity) ? $a : $$($nesting, 'UNKNOWN'))), (self.max_severity = ($truthy($a = self.max_severity) ? $a : severity))))) { - self.max_severity = severity}; - return $send(self, Opal.find_super_dispatcher(self, 'add', $Logger_add$2, false), $zuper, $iter); - }, $Logger_add$2.$$arity = -2); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'BasicFormatter'); - - var $nesting = [self].concat($parent_nesting), $BasicFormatter_call$3; - - - Opal.const_set($nesting[0], 'SEVERITY_LABELS', $hash2(["WARN", "FATAL"], {"WARN": "WARNING", "FATAL": "FAILED"})); - return (Opal.def(self, '$call', $BasicFormatter_call$3 = function $$call(severity, _, progname, msg) { - var $a, self = this; - - return "" + (progname) + ": " + (($truthy($a = $$($nesting, 'SEVERITY_LABELS')['$[]'](severity)) ? $a : severity)) + ": " + ((function() {if ($truthy($$$('::', 'String')['$==='](msg))) { - return msg - } else { - return msg.$inspect() - }; return nil; })()) + ($$($nesting, 'LF')) - }, $BasicFormatter_call$3.$$arity = 4), nil) && 'call'; - })($nesting[0], $$($nesting, 'Formatter'), $nesting); - return (function($base, $parent_nesting) { - var self = $module($base, 'AutoFormattingMessage'); - - var $nesting = [self].concat($parent_nesting), $AutoFormattingMessage_inspect$4; - - - Opal.def(self, '$inspect', $AutoFormattingMessage_inspect$4 = function $$inspect() { - var self = this, sloc = nil; - - if ($truthy((sloc = self['$[]']("source_location")))) { - return "" + (sloc) + ": " + (self['$[]']("text")) - } else { - return self['$[]']("text") - } - }, $AutoFormattingMessage_inspect$4.$$arity = 0) - })($nesting[0], $nesting); - })($nesting[0], $$$('::', 'Logger'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'MemoryLogger'); - - var $nesting = [self].concat($parent_nesting), $MemoryLogger$5, $MemoryLogger_initialize$7, $MemoryLogger_add$8, $MemoryLogger_clear$9, $MemoryLogger_empty$ques$10, $MemoryLogger_max_severity$11; - - self.$$prototype.messages = nil; - - Opal.const_set($nesting[0], 'SEVERITY_LABELS', $send($hash2([], {}), 'tap', [], ($MemoryLogger$5 = function(accum){var self = $MemoryLogger$5.$$s || this, $$6; - - - - if (accum == null) { - accum = nil; - }; - return $send($$($nesting, 'Severity').$constants(false), 'each', [], ($$6 = function(c){var self = $$6.$$s || this, $writer = nil; - - - - if (c == null) { - c = nil; - }; - $writer = [$$($nesting, 'Severity').$const_get(c, false), c]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$6.$$s = self, $$6.$$arity = 1, $$6));}, $MemoryLogger$5.$$s = self, $MemoryLogger$5.$$arity = 1, $MemoryLogger$5))); - self.$attr_reader("messages"); - - Opal.def(self, '$initialize', $MemoryLogger_initialize$7 = function $$initialize() { - var self = this, $writer = nil; - - - - $writer = [$$($nesting, 'WARN')]; - $send(self, 'level=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return (self.messages = []); - }, $MemoryLogger_initialize$7.$$arity = 0); - - Opal.def(self, '$add', $MemoryLogger_add$8 = function $$add(severity, message, progname) { - var $a, $iter = $MemoryLogger_add$8.$$p, $yield = $iter || nil, self = this; - - if ($iter) $MemoryLogger_add$8.$$p = null; - - - if (message == null) { - message = nil; - }; - - if (progname == null) { - progname = nil; - }; - if ($truthy(message)) { - } else { - message = (function() {if (($yield !== nil)) { - return Opal.yieldX($yield, []); - } else { - return progname - }; return nil; })() - }; - self.messages['$<<']($hash2(["severity", "message"], {"severity": $$($nesting, 'SEVERITY_LABELS')['$[]'](($truthy($a = severity) ? $a : $$($nesting, 'UNKNOWN'))), "message": message})); - return true; - }, $MemoryLogger_add$8.$$arity = -2); - - Opal.def(self, '$clear', $MemoryLogger_clear$9 = function $$clear() { - var self = this; - - return self.messages.$clear() - }, $MemoryLogger_clear$9.$$arity = 0); - - Opal.def(self, '$empty?', $MemoryLogger_empty$ques$10 = function() { - var self = this; - - return self.messages['$empty?']() - }, $MemoryLogger_empty$ques$10.$$arity = 0); - return (Opal.def(self, '$max_severity', $MemoryLogger_max_severity$11 = function $$max_severity() { - var $$12, self = this; - - if ($truthy(self['$empty?']())) { - return nil - } else { - return $send(self.messages, 'map', [], ($$12 = function(m){var self = $$12.$$s || this; - - - - if (m == null) { - m = nil; - }; - return $$($nesting, 'Severity').$const_get(m['$[]']("severity"), false);}, $$12.$$s = self, $$12.$$arity = 1, $$12)).$max() - } - }, $MemoryLogger_max_severity$11.$$arity = 0), nil) && 'max_severity'; - })($nesting[0], $$$('::', 'Logger'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NullLogger'); - - var $nesting = [self].concat($parent_nesting), $NullLogger_initialize$13, $NullLogger_add$14; - - self.$$prototype.max_severity = nil; - - self.$attr_reader("max_severity"); - - Opal.def(self, '$initialize', $NullLogger_initialize$13 = function $$initialize() { - var self = this, $writer = nil; - - - $writer = [$$($nesting, 'WARN')]; - $send(self, 'level=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $NullLogger_initialize$13.$$arity = 0); - return (Opal.def(self, '$add', $NullLogger_add$14 = function $$add(severity, message, progname) { - var $a, self = this; - - - - if (message == null) { - message = nil; - }; - - if (progname == null) { - progname = nil; - }; - if ($truthy($rb_gt((severity = ($truthy($a = severity) ? $a : $$($nesting, 'UNKNOWN'))), (self.max_severity = ($truthy($a = self.max_severity) ? $a : severity))))) { - self.max_severity = severity}; - return true; - }, $NullLogger_add$14.$$arity = -2), nil) && 'add'; - })($nesting[0], $$$('::', 'Logger'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'LoggerManager'); - - var $nesting = [self].concat($parent_nesting); - - - self.logger_class = $$($nesting, 'Logger'); - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $logger$15, $logger$eq$16, $memoize_logger$17; - - - self.$attr_accessor("logger_class"); - - Opal.def(self, '$logger', $logger$15 = function $$logger(pipe) { - var $a, self = this; - if (self.logger == null) self.logger = nil; - if (self.logger_class == null) self.logger_class = nil; - if ($gvars.stderr == null) $gvars.stderr = nil; - - - - if (pipe == null) { - pipe = $gvars.stderr; - }; - self.$memoize_logger(); - return (self.logger = ($truthy($a = self.logger) ? $a : self.logger_class.$new(pipe))); - }, $logger$15.$$arity = -1); - - Opal.def(self, '$logger=', $logger$eq$16 = function(new_logger) { - var $a, self = this; - if (self.logger_class == null) self.logger_class = nil; - if ($gvars.stderr == null) $gvars.stderr = nil; - - return (self.logger = ($truthy($a = new_logger) ? $a : self.logger_class.$new($gvars.stderr))) - }, $logger$eq$16.$$arity = 1); - self.$private(); - return (Opal.def(self, '$memoize_logger', $memoize_logger$17 = function $$memoize_logger() { - var self = this; - - return (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting); - - - Opal.alias(self, "logger", "logger"); - return self.$attr_reader("logger"); - })(Opal.get_singleton_class(self), $nesting) - }, $memoize_logger$17.$$arity = 0), nil) && 'memoize_logger'; - })(Opal.get_singleton_class(self), $nesting); - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Logging'); - - var $nesting = [self].concat($parent_nesting), $a, $Logging_included$18, $Logging_logger$19, $Logging_message_with_context$20; - - - self.$private_class_method(($truthy($a = (Opal.defs(self, '$included', $Logging_included$18 = function $$included(into) { - var self = this; - - return into.$extend($$($nesting, 'Logging')) - }, $Logging_included$18.$$arity = 1), nil) && 'included') ? $a : "included")); - - Opal.def(self, '$logger', $Logging_logger$19 = function $$logger() { - var self = this; - - return $$($nesting, 'LoggerManager').$logger() - }, $Logging_logger$19.$$arity = 0); - - Opal.def(self, '$message_with_context', $Logging_message_with_context$20 = function $$message_with_context(text, context) { - var self = this; - - - - if (context == null) { - context = $hash2([], {}); - }; - return $hash2(["text"], {"text": text}).$merge(context).$extend($$$($$($nesting, 'Logger'), 'AutoFormattingMessage')); - }, $Logging_message_with_context$20.$$arity = -2); - })($nesting[0], $nesting); - })($nesting[0], $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/rx"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy, $hash = Opal.hash; - - Opal.add_stubs(['$==', '$join', '$to_a', '$new', '$empty?', '$escape', '$[]=', '$-']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting), $Asciidoctor$1, $Asciidoctor$2; - - - (function($base, $parent_nesting) { - var self = $module($base, 'Rx'); - - var $nesting = [self].concat($parent_nesting); - - nil - })($nesting[0], $nesting); - Opal.const_set($nesting[0], 'AuthorInfoLineRx', new RegExp("" + "^(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "\\-'.]*)(?: +(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "\\-'.]*))?(?: +(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "\\-'.]*))?(?: +<([^>]+)>)?$")); - Opal.const_set($nesting[0], 'AuthorDelimiterRx', /;(?: |$)/); - Opal.const_set($nesting[0], 'RevisionInfoLineRx', new RegExp("" + "^(?:[^\\d{]*(" + ($$($nesting, 'CC_ANY')) + "*?),)? *(?!:)(" + ($$($nesting, 'CC_ANY')) + "*?)(?: *(?!^),?: *(" + ($$($nesting, 'CC_ANY')) + "*))?$")); - Opal.const_set($nesting[0], 'ManpageTitleVolnumRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) *\\( *(" + ($$($nesting, 'CC_ANY')) + "+?) *\\)$")); - Opal.const_set($nesting[0], 'ManpageNamePurposeRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) +- +(" + ($$($nesting, 'CC_ANY')) + "+)$")); - Opal.const_set($nesting[0], 'ConditionalDirectiveRx', new RegExp("" + "^(\\\\)?(ifdef|ifndef|ifeval|endif)::(\\S*?(?:([,+])\\S*?)?)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$")); - Opal.const_set($nesting[0], 'EvalExpressionRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) *([=!><]=|[><]) *(" + ($$($nesting, 'CC_ANY')) + "+)$")); - Opal.const_set($nesting[0], 'IncludeDirectiveRx', new RegExp("" + "^(\\\\)?include::([^\\[][^\\[]*)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$")); - Opal.const_set($nesting[0], 'TagDirectiveRx', /\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m); - Opal.const_set($nesting[0], 'AttributeEntryRx', new RegExp("" + "^:(!?" + ($$($nesting, 'CG_WORD')) + "[^:]*):(?:[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*))?$")); - Opal.const_set($nesting[0], 'InvalidAttributeNameCharsRx', new RegExp("" + "[^" + ($$($nesting, 'CC_WORD')) + "-]")); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - Opal.const_set($nesting[0], 'AttributeEntryPassMacroRx', new RegExp("" + "^pass:([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*)\\]$")) - } else { - nil - }; - Opal.const_set($nesting[0], 'AttributeReferenceRx', new RegExp("" + "(\\\\)?\\{(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*|(set|counter2?):" + ($$($nesting, 'CC_ANY')) + "+?)(\\\\)?\\}")); - Opal.const_set($nesting[0], 'BlockAnchorRx', new RegExp("" + "^\\[\\[(?:|([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+))?)\\]\\]$")); - Opal.const_set($nesting[0], 'BlockAttributeListRx', new RegExp("" + "^\\[(|[" + ($$($nesting, 'CC_WORD')) + ".#%{,\"']" + ($$($nesting, 'CC_ANY')) + "*)\\]$")); - Opal.const_set($nesting[0], 'BlockAttributeLineRx', new RegExp("" + "^\\[(?:|[" + ($$($nesting, 'CC_WORD')) + ".#%{,\"']" + ($$($nesting, 'CC_ANY')) + "*|\\[(?:|[" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*(?:, *" + ($$($nesting, 'CC_ANY')) + "+)?)\\])\\]$")); - Opal.const_set($nesting[0], 'BlockTitleRx', new RegExp("" + "^\\.(\\.?[^ \\t.]" + ($$($nesting, 'CC_ANY')) + "*)$")); - Opal.const_set($nesting[0], 'AdmonitionParagraphRx', new RegExp("" + "^(" + ($$($nesting, 'ADMONITION_STYLES').$to_a().$join("|")) + "):[ \\t]+")); - Opal.const_set($nesting[0], 'LiteralParagraphRx', new RegExp("" + "^([ \\t]+" + ($$($nesting, 'CC_ANY')) + "*)$")); - Opal.const_set($nesting[0], 'AtxSectionTitleRx', new RegExp("" + "^(=={0,5})[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "+?)(?:[ \\t]+\\1)?$")); - Opal.const_set($nesting[0], 'ExtAtxSectionTitleRx', new RegExp("" + "^(=={0,5}|#\\\#{0,5})[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "+?)(?:[ \\t]+\\1)?$")); - Opal.const_set($nesting[0], 'SetextSectionTitleRx', new RegExp("" + "^((?!\\.)" + ($$($nesting, 'CC_ANY')) + "*?" + ($$($nesting, 'CG_ALNUM')) + ($$($nesting, 'CC_ANY')) + "*)$")); - Opal.const_set($nesting[0], 'InlineSectionAnchorRx', new RegExp("" + " (\\\\)?\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+))?\\]\\]$")); - Opal.const_set($nesting[0], 'InvalidSectionIdCharsRx', new RegExp("" + "<[^>]+>|&(?:[a-z][a-z]+\\d{0,2}|#\\d\\d\\d{0,4}|#x[\\da-f][\\da-f][\\da-f]{0,3});|[^ " + ($$($nesting, 'CC_WORD')) + "\\-.]+?")); - Opal.const_set($nesting[0], 'SectionLevelStyleRx', /^sect\d$/); - Opal.const_set($nesting[0], 'AnyListRx', new RegExp("" + "^(?:[ \\t]*(?:-|\\*\\**|\\.\\.*|\\u2022|\\d+\\.|[a-zA-Z]\\.|[IVXivx]+\\))[ \\t]|(?!//[^/])[ \\t]*[^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?(?::::{0,2}|;;)(?:$|[ \\t])|<(?:\\d+|\\.)>[ \\t])")); - Opal.const_set($nesting[0], 'UnorderedListRx', new RegExp("" + "^[ \\t]*(-|\\*\\**|\\u2022)[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$")); - Opal.const_set($nesting[0], 'OrderedListRx', new RegExp("" + "^[ \\t]*(\\.\\.*|\\d+\\.|[a-zA-Z]\\.|[IVXivx]+\\))[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$")); - Opal.const_set($nesting[0], 'OrderedListMarkerRxMap', $hash2(["arabic", "loweralpha", "lowerroman", "upperalpha", "upperroman"], {"arabic": /\d+\./, "loweralpha": /[a-z]\./, "lowerroman": /[ivx]+\)/, "upperalpha": /[A-Z]\./, "upperroman": /[IVX]+\)/})); - Opal.const_set($nesting[0], 'DescriptionListRx', new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?)(:::{0,2}|;;)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)")); - Opal.const_set($nesting[0], 'DescriptionListSiblingRx', $hash2(["::", ":::", "::::", ";;"], {"::": new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?[^:]|[^ \\t:])(::)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)"), ":::": new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?[^:]|[^ \\t:])(:::)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)"), "::::": new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?[^:]|[^ \\t:])(::::)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)"), ";;": new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?)(;;)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)")})); - Opal.const_set($nesting[0], 'CalloutListRx', new RegExp("" + "^<(\\d+|\\.)>[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$")); - Opal.const_set($nesting[0], 'CalloutExtractRx', /((?:\/\/|#|--|;;) ?)?(\\)?<!?(|--)(\d+|\.)\3>(?=(?: ?\\?<!?\3(?:\d+|\.)\3>)*$)/); - Opal.const_set($nesting[0], 'CalloutExtractRxt', "(\\\\)?<()(\\d+|\\.)>(?=(?: ?\\\\?<(?:\\d+|\\.)>)*$)"); - Opal.const_set($nesting[0], 'CalloutExtractRxMap', $send($$$('::', 'Hash'), 'new', [], ($Asciidoctor$1 = function(h, k){var self = $Asciidoctor$1.$$s || this, $writer = nil; - - - - if (h == null) { - h = nil; - }; - - if (k == null) { - k = nil; - }; - $writer = [k, new RegExp("" + "(" + ((function() {if ($truthy(k['$empty?']())) { - return "" - } else { - return "" + ($$$('::', 'Regexp').$escape(k)) + " ?" - }; return nil; })()) + ")?" + ($$($nesting, 'CalloutExtractRxt')))]; - $send(h, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $Asciidoctor$1.$$s = self, $Asciidoctor$1.$$arity = 2, $Asciidoctor$1))); - Opal.const_set($nesting[0], 'CalloutScanRx', new RegExp("" + "\\\\?<!?(|--)(\\d+|\\.)\\1>(?=(?: ?\\\\?<!?\\1(?:\\d+|\\.)\\1>)*" + ($$($nesting, 'CC_EOL')) + ")")); - Opal.const_set($nesting[0], 'CalloutSourceRx', new RegExp("" + "((?://|#|--|;;) ?)?(\\\\)?<!?(|--)(\\d+|\\.)\\3>(?=(?: ?\\\\?<!?\\3(?:\\d+|\\.)\\3>)*" + ($$($nesting, 'CC_EOL')) + ")")); - Opal.const_set($nesting[0], 'CalloutSourceRxt', "" + "(\\\\)?<()(\\d+|\\.)>(?=(?: ?\\\\?<(?:\\d+|\\.)>)*" + ($$($nesting, 'CC_EOL')) + ")"); - Opal.const_set($nesting[0], 'CalloutSourceRxMap', $send($$$('::', 'Hash'), 'new', [], ($Asciidoctor$2 = function(h, k){var self = $Asciidoctor$2.$$s || this, $writer = nil; - - - - if (h == null) { - h = nil; - }; - - if (k == null) { - k = nil; - }; - $writer = [k, new RegExp("" + "(" + ((function() {if ($truthy(k['$empty?']())) { - return "" - } else { - return "" + ($$$('::', 'Regexp').$escape(k)) + " ?" - }; return nil; })()) + ")?" + ($$($nesting, 'CalloutSourceRxt')))]; - $send(h, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $Asciidoctor$2.$$s = self, $Asciidoctor$2.$$arity = 2, $Asciidoctor$2))); - Opal.const_set($nesting[0], 'ListRxMap', $hash2(["ulist", "olist", "dlist", "colist"], {"ulist": $$($nesting, 'UnorderedListRx'), "olist": $$($nesting, 'OrderedListRx'), "dlist": $$($nesting, 'DescriptionListRx'), "colist": $$($nesting, 'CalloutListRx')})); - Opal.const_set($nesting[0], 'ColumnSpecRx', /^(?:(\d+)\*)?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?(\d+%?|~)?([a-z])?$/); - Opal.const_set($nesting[0], 'CellSpecStartRx', /^[ \t]*(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/); - Opal.const_set($nesting[0], 'CellSpecEndRx', /[ \t]+(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/); - Opal.const_set($nesting[0], 'CustomBlockMacroRx', new RegExp("" + "^(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*)::(|\\S|\\S" + ($$($nesting, 'CC_ANY')) + "*?\\S)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$")); - Opal.const_set($nesting[0], 'BlockMediaMacroRx', new RegExp("" + "^(image|video|audio)::(\\S|\\S" + ($$($nesting, 'CC_ANY')) + "*?\\S)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$")); - Opal.const_set($nesting[0], 'BlockTocMacroRx', new RegExp("" + "^toc::\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$")); - Opal.const_set($nesting[0], 'InlineAnchorRx', new RegExp("" + "(\\\\)?(?:\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]|anchor:([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)\\[(?:\\]|(" + ($$($nesting, 'CC_ANY')) + "*?[^\\\\])\\]))")); - Opal.const_set($nesting[0], 'InlineAnchorScanRx', new RegExp("" + "(?:^|[^\\\\\\[])\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]|(?:^|[^\\\\])anchor:([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)\\[(?:\\]|(" + ($$($nesting, 'CC_ANY')) + "*?[^\\\\])\\])")); - Opal.const_set($nesting[0], 'LeadingInlineAnchorRx', new RegExp("" + "^\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]")); - Opal.const_set($nesting[0], 'InlineBiblioAnchorRx', new RegExp("" + "^\\[\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]\\]")); - Opal.const_set($nesting[0], 'InlineEmailRx', new RegExp("" + "([\\\\>:/])?" + ($$($nesting, 'CG_WORD')) + "(?:&|[" + ($$($nesting, 'CC_WORD')) + "\\-.%+])*@" + ($$($nesting, 'CG_ALNUM')) + "[" + ($$($nesting, 'CC_ALNUM')) + "_\\-.]*\\.[a-zA-Z]{2,5}\\b")); - Opal.const_set($nesting[0], 'InlineFootnoteMacroRx', new RegExp("" + "\\\\?footnote(?:(ref):|:([" + ($$($nesting, 'CC_WORD')) + "-]+)?)\\[(?:|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\]))\\](?!</a>)", 'm')); - Opal.const_set($nesting[0], 'InlineImageMacroRx', new RegExp("" + "\\\\?i(?:mage|con):([^:\\s\\[](?:[^\\n\\[]*[^\\s\\[])?)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm')); - Opal.const_set($nesting[0], 'InlineIndextermMacroRx', new RegExp("" + "\\\\?(?:(indexterm2?):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]|\\(\\((" + ($$($nesting, 'CC_ALL')) + "+?)\\)\\)(?!\\)))", 'm')); - Opal.const_set($nesting[0], 'InlineKbdBtnMacroRx', new RegExp("" + "(\\\\)?(kbd|btn):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm')); - Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|<|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://[^\\s\\[\\]<]*([^\\s.,\\[\\]<]))(?:\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])?", 'm')); - Opal.const_set($nesting[0], 'InlineLinkMacroRx', new RegExp("" + "\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm')); - Opal.const_set($nesting[0], 'MacroNameRx', new RegExp("" + "^" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*$")); - Opal.const_set($nesting[0], 'InlineStemMacroRx', new RegExp("" + "\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm')); - Opal.const_set($nesting[0], 'InlineMenuMacroRx', new RegExp("" + "\\\\?menu:(" + ($$($nesting, 'CG_WORD')) + "|[" + ($$($nesting, 'CC_WORD')) + "&][^\\n\\[]*[^\\s\\[])\\[ *(?:|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\]))\\]", 'm')); - Opal.const_set($nesting[0], 'InlineMenuRx', new RegExp("" + "\\\\?\"([" + ($$($nesting, 'CC_WORD')) + "&][^\"]*?[ \\n]+>[ \\n]+[^\"]*)\"")); - Opal.const_set($nesting[0], 'InlinePassRx', $hash(false, ["+", "`", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:])(?:\\[([^\\]]+)\\])?(\\\\?(\\+|`)(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\4)(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], true, ["`", nil, new RegExp("" + "(^|[^`" + ($$($nesting, 'CC_WORD')) + "])(?:\\[([^\\]]+)\\])?(\\\\?(`)([^`\\s]|[^`\\s]" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\4)(?![`" + ($$($nesting, 'CC_WORD')) + "])", 'm')])); - Opal.const_set($nesting[0], 'SinglePlusInlinePassRx', new RegExp("" + "^(\\\\)?\\+(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\+$", 'm')); - Opal.const_set($nesting[0], 'InlinePassMacroRx', new RegExp("" + "(?:(?:(\\\\?)\\[([^\\]]+)\\])?(\\\\{0,2})(\\+\\+\\+?|\\$\\$)(" + ($$($nesting, 'CC_ALL')) + "*?)\\4|(\\\\?)pass:([a-z]+(?:,[a-z-]+)*)?\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])", 'm')); - Opal.const_set($nesting[0], 'InlineXrefMacroRx', new RegExp("" + "\\\\?(?:<<([" + ($$($nesting, 'CC_WORD')) + "#/.:{]" + ($$($nesting, 'CC_ALL')) + "*?)>>|xref:([" + ($$($nesting, 'CC_WORD')) + "#/.:{]" + ($$($nesting, 'CC_ALL')) + "*?)\\[(?:\\]|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]))", 'm')); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - Opal.const_set($nesting[0], 'HardLineBreakRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "*) \\+$", 'm')) - } else { - nil - }; - Opal.const_set($nesting[0], 'MarkdownThematicBreakRx', /^ {0,3}([-*_])( *)\1\2\1$/); - Opal.const_set($nesting[0], 'ExtLayoutBreakRx', /^(?:'{3,}|<{3,}|([-*_])( *)\1\2\1)$/); - Opal.const_set($nesting[0], 'BlankLineRx', /\n{2,}/); - Opal.const_set($nesting[0], 'EscapedSpaceRx', /\\([ \t\n])/); - Opal.const_set($nesting[0], 'ReplaceableTextRx', /[&']|--|\.\.\.|\([CRT]M?\)/); - Opal.const_set($nesting[0], 'SpaceDelimiterRx', /([^\\])[ \t\n]+/); - Opal.const_set($nesting[0], 'SubModifierSniffRx', /[+-]/); - Opal.const_set($nesting[0], 'TrailingDigitsRx', /\d+$/); - Opal.const_set($nesting[0], 'UriSniffRx', new RegExp("" + "^" + ($$($nesting, 'CG_ALPHA')) + "[" + ($$($nesting, 'CC_ALNUM')) + ".+-]+:/{0,2}")); - Opal.const_set($nesting[0], 'XmlSanitizeRx', /<[^>]+>/); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/substitutors"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $hash = Opal.hash, $truthy = Opal.truthy, $send = Opal.send, $gvars = Opal.gvars; - - Opal.add_stubs(['$freeze', '$+', '$keys', '$empty?', '$!', '$===', '$[]', '$join', '$include?', '$extract_passthroughs', '$each', '$sub_specialchars', '$sub_quotes', '$sub_attributes', '$sub_replacements', '$sub_macros', '$highlight_source', '$sub_callouts', '$sub_post_replacements', '$warn', '$logger', '$restore_passthroughs', '$clear', '$split', '$apply_subs', '$==', '$gsub', '$match?', '$compat_mode', '$convert_quoted_text', '$attributes', '$shift', '$store_attribute', '$!=', '$attribute_undefined', '$counter', '$key?', '$downcase', '$attribute_missing', '$info', '$squeeze', '$delete', '$reject', '$start_with?', '$do_replacement', '$extensions', '$inline_macros?', '$inline_macros', '$regexp', '$instance', '$slice', '$length', '$names', '$config', '$merge', '$[]=', '$-', '$normalize_text', '$parse_attributes', '$process_method', '$expand_subs', '$text', '$text=', '$convert', '$class', '$strip', '$>', '$index', '$min', '$compact', '$end_with?', '$map', '$chop', '$new', '$pop', '$rstrip', '$register', '$tr', '$basename', '$parse', '$<<', '$lstrip', '$split_simple_csv', '$partition', '$extract_attributes_from_text', '$sub', '$encode_uri_component', '$style', '$extname?', '$rindex', '$info?', '$catalog', '$fetch', '$outfilesuffix', '$natural_xrefs', '$resolve_id', '$find', '$footnotes', '$id', '$<', '$size', '$attr?', '$attr', '$to_s', '$read_next_id', '$callouts', '$syntax_highlighter', '$highlight?', '$sub_source', '$extract_callouts', '$name', '$to_sym', '$to_i', '$resolve_lines_to_highlight', '$highlight', '$nil_or_empty?', '$restore_callouts', '$count', '$to_a', '$|', '$sort', '$*', '$parse_quoted_text_attributes', '$resolve_pass_subs', '$extract_inner_passthrough', '$basebackend?', '$error', '$chr', '$drop', '$&', '$resolve_subs', '$resolve_block_subs', '$parse_into', '$private', '$=~', '$shorthand_property_syntax', '$concat', '$each_char']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'Substitutors'); - - var $nesting = [self].concat($parent_nesting), $Substitutors_apply_subs$1, $Substitutors_apply_normal_subs$3, $Substitutors_apply_header_subs$4, $Substitutors_apply_reftext_subs$5, $Substitutors_sub_specialchars$6, $Substitutors_sub_quotes$7, $Substitutors_sub_attributes$10, $Substitutors_sub_replacements$16, $Substitutors_sub_macros$19, $Substitutors_sub_post_replacements$41, $Substitutors_sub_source$44, $Substitutors_sub_callouts$45, $Substitutors_highlight_source$47, $Substitutors_resolve_lines_to_highlight$48, $Substitutors_extract_passthroughs$51, $Substitutors_restore_passthroughs$55, $Substitutors_resolve_subs$57, $Substitutors_resolve_block_subs$59, $Substitutors_resolve_pass_subs$60, $Substitutors_expand_subs$61, $Substitutors_commit_subs$63, $Substitutors_parse_attributes$64, $Substitutors_extract_attributes_from_text$65, $Substitutors_extract_callouts$66, $Substitutors_restore_callouts$69, $Substitutors_extract_inner_passthrough$72, $Substitutors_convert_quoted_text$73, $Substitutors_do_replacement$74, $Substitutors_parse_quoted_text_attributes$75, $Substitutors_normalize_text$76, $Substitutors_split_simple_csv$77; - - - Opal.const_set($nesting[0], 'SpecialCharsRx', /[<&>]/); - Opal.const_set($nesting[0], 'SpecialCharsTr', $hash2([">", "<", "&"], {">": ">", "<": "<", "&": "&"})); - Opal.const_set($nesting[0], 'QuotedTextSniffRx', $hash(false, /[*_`#^~]/, true, /[*'_+#^~]/)); - Opal.const_set($nesting[0], 'BASIC_SUBS', ["specialcharacters"]).$freeze(); - Opal.const_set($nesting[0], 'HEADER_SUBS', ["specialcharacters", "attributes"]).$freeze(); - Opal.const_set($nesting[0], 'NO_SUBS', []).$freeze(); - Opal.const_set($nesting[0], 'NORMAL_SUBS', ["specialcharacters", "quotes", "attributes", "replacements", "macros", "post_replacements"]).$freeze(); - Opal.const_set($nesting[0], 'REFTEXT_SUBS', ["specialcharacters", "quotes", "replacements"]).$freeze(); - Opal.const_set($nesting[0], 'VERBATIM_SUBS', ["specialcharacters", "callouts"]).$freeze(); - Opal.const_set($nesting[0], 'SUB_GROUPS', $hash2(["none", "normal", "verbatim", "specialchars"], {"none": $$($nesting, 'NO_SUBS'), "normal": $$($nesting, 'NORMAL_SUBS'), "verbatim": $$($nesting, 'VERBATIM_SUBS'), "specialchars": $$($nesting, 'BASIC_SUBS')})); - Opal.const_set($nesting[0], 'SUB_HINTS', $hash2(["a", "m", "n", "p", "q", "r", "c", "v"], {"a": "attributes", "m": "macros", "n": "normal", "p": "post_replacements", "q": "quotes", "r": "replacements", "c": "specialcharacters", "v": "verbatim"})); - Opal.const_set($nesting[0], 'SUB_OPTIONS', $hash2(["block", "inline"], {"block": $rb_plus($rb_plus($$($nesting, 'SUB_GROUPS').$keys(), $$($nesting, 'NORMAL_SUBS')), ["callouts"]), "inline": $rb_plus($$($nesting, 'SUB_GROUPS').$keys(), $$($nesting, 'NORMAL_SUBS'))})); - Opal.const_set($nesting[0], 'CAN', "\u0018"); - Opal.const_set($nesting[0], 'DEL', "\u007F"); - Opal.const_set($nesting[0], 'PASS_START', "\u0096"); - Opal.const_set($nesting[0], 'PASS_END', "\u0097"); - Opal.const_set($nesting[0], 'PassSlotRx', new RegExp("" + ($$($nesting, 'PASS_START')) + "(\\d+)" + ($$($nesting, 'PASS_END')))); - Opal.const_set($nesting[0], 'HighlightedPassSlotRx', new RegExp("" + "<span\\b[^>]*>" + ($$($nesting, 'PASS_START')) + "</span>[^\\d]*(\\d+)[^\\d]*<span\\b[^>]*>" + ($$($nesting, 'PASS_END')) + "</span>")); - Opal.const_set($nesting[0], 'RS', "\\"); - Opal.const_set($nesting[0], 'R_SB', "]"); - Opal.const_set($nesting[0], 'ESC_R_SB', "\\]"); - Opal.const_set($nesting[0], 'PLUS', "+"); - - Opal.def(self, '$apply_subs', $Substitutors_apply_subs$1 = function $$apply_subs(text, subs) { - var $a, $$2, self = this, is_multiline = nil, passthrus = nil, clear_passthrus = nil; - if (self.passthroughs == null) self.passthroughs = nil; - if (self.passthroughs_locked == null) self.passthroughs_locked = nil; - - - - if (subs == null) { - subs = $$($nesting, 'NORMAL_SUBS'); - }; - if ($truthy(($truthy($a = text['$empty?']()) ? $a : subs['$!']()))) { - return text}; - if ($truthy((is_multiline = $$$('::', 'Array')['$==='](text)))) { - text = (function() {if ($truthy(text['$[]'](1))) { - - return text.$join($$($nesting, 'LF')); - } else { - return text['$[]'](0) - }; return nil; })()}; - if ($truthy(subs['$include?']("macros"))) { - - text = self.$extract_passthroughs(text); - if ($truthy(self.passthroughs['$empty?']())) { - } else { - - passthrus = self.passthroughs; - self.passthroughs_locked = ($truthy($a = self.passthroughs_locked) ? $a : (clear_passthrus = true)); - };}; - $send(subs, 'each', [], ($$2 = function(type){var self = $$2.$$s || this, $case = nil; - - - - if (type == null) { - type = nil; - }; - return (function() {$case = type; - if ("specialcharacters"['$===']($case)) {return (text = self.$sub_specialchars(text))} - else if ("quotes"['$===']($case)) {return (text = self.$sub_quotes(text))} - else if ("attributes"['$===']($case)) {if ($truthy(text['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - return (text = self.$sub_attributes(text)) - } else { - return nil - }} - else if ("replacements"['$===']($case)) {return (text = self.$sub_replacements(text))} - else if ("macros"['$===']($case)) {return (text = self.$sub_macros(text))} - else if ("highlight"['$===']($case)) {return (text = self.$highlight_source(text, subs['$include?']("callouts")))} - else if ("callouts"['$===']($case)) {if ($truthy(subs['$include?']("highlight"))) { - return nil - } else { - return (text = self.$sub_callouts(text)) - }} - else if ("post_replacements"['$===']($case)) {return (text = self.$sub_post_replacements(text))} - else {return self.$logger().$warn("" + "unknown substitution type " + (type))}})();}, $$2.$$s = self, $$2.$$arity = 1, $$2)); - if ($truthy(passthrus)) { - - text = self.$restore_passthroughs(text); - if ($truthy(clear_passthrus)) { - - passthrus.$clear(); - self.passthroughs_locked = nil;};}; - if ($truthy(is_multiline)) { - - return text.$split($$($nesting, 'LF'), -1); - } else { - return text - }; - }, $Substitutors_apply_subs$1.$$arity = -2); - - Opal.def(self, '$apply_normal_subs', $Substitutors_apply_normal_subs$3 = function $$apply_normal_subs(text) { - var self = this; - - return self.$apply_subs(text, $$($nesting, 'NORMAL_SUBS')) - }, $Substitutors_apply_normal_subs$3.$$arity = 1); - - Opal.def(self, '$apply_header_subs', $Substitutors_apply_header_subs$4 = function $$apply_header_subs(text) { - var self = this; - - return self.$apply_subs(text, $$($nesting, 'HEADER_SUBS')) - }, $Substitutors_apply_header_subs$4.$$arity = 1); - Opal.alias(self, "apply_title_subs", "apply_subs"); - - Opal.def(self, '$apply_reftext_subs', $Substitutors_apply_reftext_subs$5 = function $$apply_reftext_subs(text) { - var self = this; - - return self.$apply_subs(text, $$($nesting, 'REFTEXT_SUBS')) - }, $Substitutors_apply_reftext_subs$5.$$arity = 1); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - - Opal.def(self, '$sub_specialchars', $Substitutors_sub_specialchars$6 = function $$sub_specialchars(text) { - var $a, $b, self = this; - - if ($truthy(($truthy($a = ($truthy($b = text['$include?'](">")) ? $b : text['$include?']("&"))) ? $a : text['$include?']("<")))) { - - return text.$gsub($$($nesting, 'SpecialCharsRx'), $$($nesting, 'SpecialCharsTr')); - } else { - return text - } - }, $Substitutors_sub_specialchars$6.$$arity = 1) - } else { - nil - }; - Opal.alias(self, "sub_specialcharacters", "sub_specialchars"); - - Opal.def(self, '$sub_quotes', $Substitutors_sub_quotes$7 = function $$sub_quotes(text) { - var $$8, self = this, compat = nil; - if (self.document == null) self.document = nil; - - - if ($truthy($$($nesting, 'QuotedTextSniffRx')['$[]']((compat = self.document.$compat_mode()))['$match?'](text))) { - $send($$($nesting, 'QUOTE_SUBS')['$[]'](compat), 'each', [], ($$8 = function(type, scope, pattern){var self = $$8.$$s || this, $$9; - - - - if (type == null) { - type = nil; - }; - - if (scope == null) { - scope = nil; - }; - - if (pattern == null) { - pattern = nil; - }; - return (text = $send(text, 'gsub', [pattern], ($$9 = function(){var self = $$9.$$s || this; - if ($gvars["~"] == null) $gvars["~"] = nil; - - return self.$convert_quoted_text($gvars["~"], type, scope)}, $$9.$$s = self, $$9.$$arity = 0, $$9)));}, $$8.$$s = self, $$8.$$arity = 3, $$8))}; - return text; - }, $Substitutors_sub_quotes$7.$$arity = 1); - - Opal.def(self, '$sub_attributes', $Substitutors_sub_attributes$10 = function $$sub_attributes(text, opts) { - var $$11, $$13, $$14, $$15, self = this, doc_attrs = nil, drop = nil, drop_line = nil, drop_line_severity = nil, drop_empty_line = nil, attribute_undefined = nil, attribute_missing = nil, lines = nil; - if (self.document == null) self.document = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - doc_attrs = self.document.$attributes(); - drop = (drop_line = (drop_line_severity = (drop_empty_line = (attribute_undefined = (attribute_missing = nil))))); - text = $send(text, 'gsub', [$$($nesting, 'AttributeReferenceRx')], ($$11 = function(){var self = $$11.$$s || this, $a, $b, $c, $$12, $case = nil, args = nil, _ = nil, value = nil, key = nil; - if (self.document == null) self.document = nil; - - if ($truthy(($truthy($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))['$==']($$($nesting, 'RS'))) ? $a : (($b = $gvars['~']) === nil ? nil : $b['$[]'](4))['$==']($$($nesting, 'RS'))))) { - return "" + "{" + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](2))) + "}" - } else if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](3)))) { - return (function() {$case = (args = (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)).$split(":", 3)).$shift(); - if ("set"['$===']($case)) { - $b = $$($nesting, 'Parser').$store_attribute(args['$[]'](0), ($truthy($c = args['$[]'](1)) ? $c : ""), self.document), $a = Opal.to_ary($b), (_ = ($a[0] == null ? nil : $a[0])), (value = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy(($truthy($a = value) ? $a : (attribute_undefined = ($truthy($b = attribute_undefined) ? $b : ($truthy($c = doc_attrs['$[]']("attribute-undefined")) ? $c : $$($nesting, 'Compliance').$attribute_undefined())))['$!=']("drop-line")))) { - return (drop = (drop_empty_line = $$($nesting, 'DEL'))) - } else { - return (drop = (drop_line = $$($nesting, 'CAN'))) - };} - else if ("counter2"['$===']($case)) { - $send(self.document, 'counter', Opal.to_a(args)); - return (drop = (drop_empty_line = $$($nesting, 'DEL')));} - else {return $send(self.document, 'counter', Opal.to_a(args))}})() - } else if ($truthy(doc_attrs['$key?']((key = (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)).$downcase())))) { - return doc_attrs['$[]'](key) - } else if ($truthy((value = $$($nesting, 'INTRINSIC_ATTRIBUTES')['$[]'](key)))) { - return value - } else { - return (function() {$case = (attribute_missing = ($truthy($a = attribute_missing) ? $a : ($truthy($b = ($truthy($c = opts['$[]']("attribute_missing")) ? $c : doc_attrs['$[]']("attribute-missing"))) ? $b : $$($nesting, 'Compliance').$attribute_missing()))); - if ("drop"['$===']($case)) {return (drop = (drop_empty_line = $$($nesting, 'DEL')))} - else if ("drop-line"['$===']($case)) { - if ((drop_line_severity = ($truthy($a = drop_line_severity) ? $a : ($truthy($b = opts['$[]']("drop_line_severity")) ? $b : "info")))['$==']("info")) { - $send(self.$logger(), 'info', [], ($$12 = function(){var self = $$12.$$s || this; - - return "" + "dropping line containing reference to missing attribute: " + (key)}, $$12.$$s = self, $$12.$$arity = 0, $$12))}; - return (drop = (drop_line = $$($nesting, 'CAN')));} - else if ("warn"['$===']($case)) { - self.$logger().$warn("" + "skipping reference to missing attribute: " + (key)); - return (($a = $gvars['~']) === nil ? nil : $a['$[]'](0));} - else {return (($a = $gvars['~']) === nil ? nil : $a['$[]'](0))}})() - }}, $$11.$$s = self, $$11.$$arity = 0, $$11)); - if ($truthy(drop)) { - if ($truthy(drop_empty_line)) { - - lines = text.$squeeze($$($nesting, 'DEL')).$split($$($nesting, 'LF'), -1); - if ($truthy(drop_line)) { - return $send(lines, 'reject', [], ($$13 = function(line){var self = $$13.$$s || this, $a, $b, $c; - - - - if (line == null) { - line = nil; - }; - return ($truthy($a = ($truthy($b = ($truthy($c = line['$==']($$($nesting, 'DEL'))) ? $c : line['$==']($$($nesting, 'CAN')))) ? $b : line['$start_with?']($$($nesting, 'CAN')))) ? $a : line['$include?']($$($nesting, 'CAN')));}, $$13.$$s = self, $$13.$$arity = 1, $$13)).$join($$($nesting, 'LF')).$delete($$($nesting, 'DEL')) - } else { - return $send(lines, 'reject', [], ($$14 = function(line){var self = $$14.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line['$==']($$($nesting, 'DEL'));}, $$14.$$s = self, $$14.$$arity = 1, $$14)).$join($$($nesting, 'LF')).$delete($$($nesting, 'DEL')) - }; - } else if ($truthy(text['$include?']($$($nesting, 'LF')))) { - return $send(text.$split($$($nesting, 'LF'), -1), 'reject', [], ($$15 = function(line){var self = $$15.$$s || this, $a, $b; - - - - if (line == null) { - line = nil; - }; - return ($truthy($a = ($truthy($b = line['$==']($$($nesting, 'CAN'))) ? $b : line['$start_with?']($$($nesting, 'CAN')))) ? $a : line['$include?']($$($nesting, 'CAN')));}, $$15.$$s = self, $$15.$$arity = 1, $$15)).$join($$($nesting, 'LF')) - } else { - return "" - } - } else { - return text - }; - }, $Substitutors_sub_attributes$10.$$arity = -2); - - Opal.def(self, '$sub_replacements', $Substitutors_sub_replacements$16 = function $$sub_replacements(text) { - var $$17, self = this; - - - if ($truthy($$($nesting, 'ReplaceableTextRx')['$match?'](text))) { - $send($$($nesting, 'REPLACEMENTS'), 'each', [], ($$17 = function(pattern, replacement, restore){var self = $$17.$$s || this, $$18; - - - - if (pattern == null) { - pattern = nil; - }; - - if (replacement == null) { - replacement = nil; - }; - - if (restore == null) { - restore = nil; - }; - return (text = $send(text, 'gsub', [pattern], ($$18 = function(){var self = $$18.$$s || this; - if ($gvars["~"] == null) $gvars["~"] = nil; - - return self.$do_replacement($gvars["~"], replacement, restore)}, $$18.$$s = self, $$18.$$arity = 0, $$18)));}, $$17.$$s = self, $$17.$$arity = 3, $$17))}; - return text; - }, $Substitutors_sub_replacements$16.$$arity = 1); - - Opal.def(self, '$sub_macros', $Substitutors_sub_macros$19 = function $$sub_macros(text) { - var $a, $$20, $b, $$22, $$25, $$27, $$29, $$30, $$33, $$34, $$35, $$36, $$37, $$38, $$39, self = this, found_square_bracket = nil, found_colon = nil, found_macroish = nil, found_macroish_short = nil, doc_attrs = nil, doc = nil, extensions = nil; - if (self.document == null) self.document = nil; - if (self.context == null) self.context = nil; - if (self.parent == null) self.parent = nil; - - - found_square_bracket = text['$include?']("["); - found_colon = text['$include?'](":"); - found_macroish = ($truthy($a = found_square_bracket) ? found_colon : $a); - found_macroish_short = ($truthy($a = found_macroish) ? text['$include?'](":[") : $a); - doc_attrs = (doc = self.document).$attributes(); - if ($truthy(($truthy($a = (extensions = doc.$extensions())) ? extensions['$inline_macros?']() : $a))) { - $send(extensions.$inline_macros(), 'each', [], ($$20 = function(extension){var self = $$20.$$s || this, $$21; - - - - if (extension == null) { - extension = nil; - }; - return (text = $send(text, 'gsub', [extension.$instance().$regexp()], ($$21 = function(){var self = $$21.$$s || this, $b, $c, match = nil, target = nil, content = nil, attributes = nil, default_attrs = nil, ext_config = nil, $writer = nil, replacement = nil, inline_subs = nil; - if ($gvars["~"] == null) $gvars["~"] = nil; - - - if ($truthy((match = (($b = $gvars['~']) === nil ? nil : $b['$[]'](0)))['$start_with?']($$($nesting, 'RS')))) { - return (($b = $gvars['~']) === nil ? nil : $b['$[]'](0)).$slice(1, (($b = $gvars['~']) === nil ? nil : $b['$[]'](0)).$length());}; - if ($truthy($gvars["~"].$names()['$empty?']())) { - $b = [(($c = $gvars['~']) === nil ? nil : $c['$[]'](1)), (($c = $gvars['~']) === nil ? nil : $c['$[]'](2))], (target = $b[0]), (content = $b[1]), $b - } else { - $b = [(function() { try { - return $gvars["~"]['$[]']("target") - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return nil - } finally { Opal.pop_exception() } - } else { throw $err; } - }})(), (function() { try { - return $gvars["~"]['$[]']("content") - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return nil - } finally { Opal.pop_exception() } - } else { throw $err; } - }})()], (target = $b[0]), (content = $b[1]), $b - }; - attributes = (function() {if ($truthy((default_attrs = (ext_config = extension.$config())['$[]']("default_attrs")))) { - return default_attrs.$merge() - } else { - return $hash2([], {}) - }; return nil; })(); - if ($truthy(content)) { - - if ($truthy(content['$empty?']())) { - if (ext_config['$[]']("content_model")['$==']("attributes")) { - } else { - - $writer = ["text", content]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } - } else { - - content = self.$normalize_text(content, true, true); - if (ext_config['$[]']("content_model")['$==']("attributes")) { - self.$parse_attributes(content, ($truthy($b = ($truthy($c = ext_config['$[]']("positional_attrs")) ? $c : ext_config['$[]']("pos_attrs"))) ? $b : []), $hash2(["into"], {"into": attributes})) - } else { - - $writer = ["text", content]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - }; - target = ($truthy($b = target) ? $b : (function() {if (ext_config['$[]']("format")['$==']("short")) { - return content - } else { - return target - }; return nil; })());}; - if ($truthy($$($nesting, 'Inline')['$===']((replacement = extension.$process_method()['$[]'](self, target, attributes))))) { - - if ($truthy(($truthy($b = (inline_subs = replacement.$attributes().$delete("subs"))) ? (inline_subs = self.$expand_subs(inline_subs, "custom inline macro")) : $b))) { - - $writer = [self.$apply_subs(replacement.$text(), inline_subs)]; - $send(replacement, 'text=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return replacement.$convert(); - } else if ($truthy(replacement)) { - - self.$logger().$info("" + "expected substitution value for custom inline macro to be of type Inline; got " + (replacement.$class()) + ": " + (match)); - return replacement; - } else { - return "" - };}, $$21.$$s = self, $$21.$$arity = 0, $$21)));}, $$20.$$s = self, $$20.$$arity = 1, $$20))}; - if ($truthy(doc_attrs['$key?']("experimental"))) { - - if ($truthy(($truthy($a = found_macroish_short) ? ($truthy($b = text['$include?']("kbd:")) ? $b : text['$include?']("btn:")) : $a))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineKbdBtnMacroRx')], ($$22 = function(){var self = $$22.$$s || this, $c, $$23, $$24, keys = nil, delim_idx = nil, delim = nil, $writer = nil; - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](1)))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length()) - } else if ((($c = $gvars['~']) === nil ? nil : $c['$[]'](2))['$==']("kbd")) { - - if ($truthy((keys = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)).$strip())['$include?']($$($nesting, 'R_SB')))) { - keys = keys.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))}; - if ($truthy(($truthy($c = $rb_gt(keys.$length(), 1)) ? (delim_idx = (function() {if ($truthy((delim_idx = keys.$index(",", 1)))) { - return [delim_idx, keys.$index("+", 1)].$compact().$min() - } else { - - return keys.$index("+", 1); - }; return nil; })()) : $c))) { - - delim = keys.$slice(delim_idx, 1); - if ($truthy(keys['$end_with?'](delim))) { - - keys = $send(keys.$chop().$split(delim, -1), 'map', [], ($$23 = function(key){var self = $$23.$$s || this; - - - - if (key == null) { - key = nil; - }; - return key.$strip();}, $$23.$$s = self, $$23.$$arity = 1, $$23)); - - $writer = [-1, $rb_plus(keys['$[]'](-1), delim)]; - $send(keys, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - keys = $send(keys.$split(delim), 'map', [], ($$24 = function(key){var self = $$24.$$s || this; - - - - if (key == null) { - key = nil; - }; - return key.$strip();}, $$24.$$s = self, $$24.$$arity = 1, $$24)) - }; - } else { - keys = [keys] - }; - return $$($nesting, 'Inline').$new(self, "kbd", nil, $hash2(["attributes"], {"attributes": $hash2(["keys"], {"keys": keys})})).$convert(); - } else { - return $$($nesting, 'Inline').$new(self, "button", self.$normalize_text((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)), true, true)).$convert() - }}, $$22.$$s = self, $$22.$$arity = 0, $$22))}; - if ($truthy(($truthy($a = found_macroish) ? text['$include?']("menu:") : $a))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineMenuMacroRx')], ($$25 = function(){var self = $$25.$$s || this, $c, $$26, menu = nil, items = nil, delim = nil, submenus = nil, menuitem = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - menu = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1)); - if ($truthy((items = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2))))) { - - if ($truthy(items['$include?']($$($nesting, 'R_SB')))) { - items = items.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))}; - if ($truthy((delim = (function() {if ($truthy(items['$include?'](">"))) { - return ">" - } else { - - if ($truthy(items['$include?'](","))) { - return "," - } else { - return nil - }; - }; return nil; })()))) { - - submenus = $send(items.$split(delim), 'map', [], ($$26 = function(it){var self = $$26.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$strip();}, $$26.$$s = self, $$26.$$arity = 1, $$26)); - menuitem = submenus.$pop(); - } else { - $c = [[], items.$rstrip()], (submenus = $c[0]), (menuitem = $c[1]), $c - }; - } else { - $c = [[], nil], (submenus = $c[0]), (menuitem = $c[1]), $c - }; - return $$($nesting, 'Inline').$new(self, "menu", nil, $hash2(["attributes"], {"attributes": $hash2(["menu", "submenus", "menuitem"], {"menu": menu, "submenus": submenus, "menuitem": menuitem})})).$convert();}, $$25.$$s = self, $$25.$$arity = 0, $$25))}; - if ($truthy(($truthy($a = text['$include?']("\"")) ? text['$include?'](">") : $a))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineMenuRx')], ($$27 = function(){var self = $$27.$$s || this, $c, $d, $e, $$28, menu = nil, submenus = nil, menuitem = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - $d = $send((($e = $gvars['~']) === nil ? nil : $e['$[]'](1)).$split(">"), 'map', [], ($$28 = function(it){var self = $$28.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$strip();}, $$28.$$s = self, $$28.$$arity = 1, $$28)), $c = Opal.to_ary($d), (menu = ($c[0] == null ? nil : $c[0])), (submenus = $slice.call($c, 1)), $d; - menuitem = submenus.$pop(); - return $$($nesting, 'Inline').$new(self, "menu", nil, $hash2(["attributes"], {"attributes": $hash2(["menu", "submenus", "menuitem"], {"menu": menu, "submenus": submenus, "menuitem": menuitem})})).$convert();}, $$27.$$s = self, $$27.$$arity = 0, $$27))};}; - if ($truthy(($truthy($a = found_macroish) ? ($truthy($b = text['$include?']("image:")) ? $b : text['$include?']("icon:")) : $a))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineImageMacroRx')], ($$29 = function(){var self = $$29.$$s || this, $c, type = nil, posattrs = nil, target = nil, attrs = nil, $writer = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length()); - } else if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']("icon:"))) { - $c = ["icon", ["size"]], (type = $c[0]), (posattrs = $c[1]), $c - } else { - $c = ["image", ["alt", "width", "height"]], (type = $c[0]), (posattrs = $c[1]), $c - }; - target = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1)); - attrs = self.$parse_attributes((($c = $gvars['~']) === nil ? nil : $c['$[]'](2)), posattrs, $hash2(["unescape_input"], {"unescape_input": true})); - if (type['$==']("icon")) { - } else { - - doc.$register("images", target); - - $writer = ["imagesdir", doc_attrs['$[]']("imagesdir")]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }; - ($truthy($c = attrs['$[]']("alt")) ? $c : (($writer = ["alt", (($writer = ["default-alt", $$($nesting, 'Helpers').$basename(target, true).$tr("_-", " ")]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - return $$($nesting, 'Inline').$new(self, "image", nil, $hash2(["type", "target", "attributes"], {"type": type, "target": target, "attributes": attrs})).$convert();}, $$29.$$s = self, $$29.$$arity = 0, $$29))}; - if ($truthy(($truthy($a = ($truthy($b = text['$include?']("((")) ? text['$include?']("))") : $b)) ? $a : ($truthy($b = found_macroish_short) ? text['$include?']("dexterm") : $b)))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineIndextermMacroRx')], ($$30 = function(){var self = $$30.$$s || this, $c, $$31, $d, $$32, $case = nil, attrlist = nil, primary = nil, attrs = nil, $writer = nil, terms = nil, secondary = nil, tertiary = nil, see_also = nil, term = nil, visible = nil, before = nil, after = nil, _ = nil, see = nil, subbed_term = nil; - - return (function() {$case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1)); - if ("indexterm"['$===']($case)) { - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - if ($truthy((attrlist = self.$normalize_text((($c = $gvars['~']) === nil ? nil : $c['$[]'](2)), true, true))['$include?']("="))) { - if ($truthy((primary = (attrs = $$($nesting, 'AttributeList').$new(attrlist, self).$parse())['$[]'](1)))) { - - - $writer = ["terms", (terms = [primary])]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy((secondary = attrs['$[]'](2)))) { - - terms['$<<'](secondary); - if ($truthy((tertiary = attrs['$[]'](3)))) { - terms['$<<'](tertiary)};}; - if ($truthy((see_also = attrs['$[]']("see-also")))) { - - $writer = ["see-also", (function() {if ($truthy(see_also['$include?'](","))) { - return $send(see_also.$split(","), 'map', [], ($$31 = function(it){var self = $$31.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$lstrip();}, $$31.$$s = self, $$31.$$arity = 1, $$31)) - } else { - return [see_also] - }; return nil; })()]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - } else { - attrs = $hash2(["terms"], {"terms": (terms = attrlist)}) - } - } else { - attrs = $hash2(["terms"], {"terms": (terms = self.$split_simple_csv(attrlist))}) - }; - return $$($nesting, 'Inline').$new(self, "indexterm", nil, $hash2(["attributes"], {"attributes": attrs})).$convert();} - else if ("indexterm2"['$===']($case)) { - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - if ($truthy((term = self.$normalize_text((($c = $gvars['~']) === nil ? nil : $c['$[]'](2)), true, true))['$include?']("="))) { - - term = ($truthy($c = ($truthy($d = (attrs = $$($nesting, 'AttributeList').$new(term, self).$parse())['$[]'](1)) ? $d : (attrs = nil))) ? $c : term); - if ($truthy(($truthy($c = attrs) ? (see_also = attrs['$[]']("see-also")) : $c))) { - - $writer = ["see-also", (function() {if ($truthy(see_also['$include?'](","))) { - return $send(see_also.$split(","), 'map', [], ($$32 = function(it){var self = $$32.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$lstrip();}, $$32.$$s = self, $$32.$$arity = 1, $$32)) - } else { - return [see_also] - }; return nil; })()]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];};}; - return $$($nesting, 'Inline').$new(self, "indexterm", term, $hash2(["attributes", "type"], {"attributes": attrs, "type": "visible"})).$convert();} - else { - text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)); - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - if ($truthy(($truthy($c = text['$start_with?']("(")) ? text['$end_with?'](")") : $c))) { - - text = text.$slice(1, $rb_minus(text.$length(), 2)); - $c = [true, "(", ")"], (visible = $c[0]), (before = $c[1]), (after = $c[2]), $c; - } else { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length()); - } - } else { - - visible = true; - if ($truthy(text['$start_with?']("("))) { - if ($truthy(text['$end_with?'](")"))) { - $c = [text.$slice(1, $rb_minus(text.$length(), 2)), false], (text = $c[0]), (visible = $c[1]), $c - } else { - $c = [text.$slice(1, text.$length()), "(", ""], (text = $c[0]), (before = $c[1]), (after = $c[2]), $c - } - } else if ($truthy(text['$end_with?'](")"))) { - $c = [text.$chop(), "", ")"], (text = $c[0]), (before = $c[1]), (after = $c[2]), $c}; - }; - if ($truthy(visible)) { - - if ($truthy((term = self.$normalize_text(text, true))['$include?'](";&"))) { - if ($truthy(term['$include?'](" >> "))) { - - $d = term.$partition(" >> "), $c = Opal.to_ary($d), (term = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (see = ($c[2] == null ? nil : $c[2])), $d; - attrs = $hash2(["see"], {"see": see}); - } else if ($truthy(term['$include?'](" &> "))) { - - $d = term.$split(" &> "), $c = Opal.to_ary($d), (term = ($c[0] == null ? nil : $c[0])), (see_also = $slice.call($c, 1)), $d; - attrs = $hash2(["see-also"], {"see-also": see_also});}}; - subbed_term = $$($nesting, 'Inline').$new(self, "indexterm", term, $hash2(["attributes", "type"], {"attributes": attrs, "type": "visible"})).$convert(); - } else { - - attrs = $hash2([], {}); - if ($truthy((terms = self.$normalize_text(text, true))['$include?'](";&"))) { - if ($truthy(terms['$include?'](" >> "))) { - - $d = terms.$partition(" >> "), $c = Opal.to_ary($d), (terms = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (see = ($c[2] == null ? nil : $c[2])), $d; - - $writer = ["see", see]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else if ($truthy(terms['$include?'](" &> "))) { - - $d = terms.$split(" &> "), $c = Opal.to_ary($d), (terms = ($c[0] == null ? nil : $c[0])), (see_also = $slice.call($c, 1)), $d; - - $writer = ["see-also", see_also]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}}; - - $writer = ["terms", (terms = self.$split_simple_csv(terms))]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - subbed_term = $$($nesting, 'Inline').$new(self, "indexterm", nil, $hash2(["attributes"], {"attributes": attrs})).$convert(); - }; - if ($truthy(before)) { - return "" + (before) + (subbed_term) + (after) - } else { - return subbed_term - };}})()}, $$30.$$s = self, $$30.$$arity = 0, $$30))}; - if ($truthy(($truthy($a = found_colon) ? text['$include?']("://") : $a))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineLinkRx')], ($$33 = function(){var self = $$33.$$s || this, $c, $d, target = nil, prefix = nil, suffix = nil, $case = nil, attrs = nil, link_opts = nil, $writer = nil; - - - if ($truthy((target = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)))['$start_with?']($$($nesting, 'RS')))) { - return "" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))) + (target.$slice(1, target.$length())) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](4)));}; - $c = [(($d = $gvars['~']) === nil ? nil : $d['$[]'](1)), ""], (prefix = $c[0]), (suffix = $c[1]), $c; - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](4)))) { - - if (prefix['$==']("link:")) { - prefix = ""}; - text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4)); - } else { - - $case = prefix; - if ("link:"['$===']($case) || "\""['$===']($case) || "'"['$===']($case)) {return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));}; - text = ""; - $case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)); - if (")"['$===']($case) || "?"['$===']($case) || "!"['$===']($case)) { - target = target.$chop(); - if ($truthy((($c = (suffix = (($d = $gvars['~']) === nil ? nil : $d['$[]'](3)))['$=='](")")) ? target['$end_with?'](".", "?", "!") : (suffix = (($d = $gvars['~']) === nil ? nil : $d['$[]'](3)))['$=='](")")))) { - - suffix = $rb_plus(target['$[]'](-1), suffix); - target = target.$chop();}; - if ($truthy(target['$end_with?']("://"))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};} - else if (";"['$===']($case)) { - if ($truthy(($truthy($c = prefix['$start_with?']("<")) ? target['$end_with?'](">") : $c))) { - - prefix = prefix.$slice(4, prefix.$length()); - target = target.$slice(0, $rb_minus(target.$length(), 4)); - } else if ($truthy((target = target.$chop())['$end_with?'](")"))) { - - target = target.$chop(); - suffix = ");"; - } else { - suffix = ";" - }; - if ($truthy(target['$end_with?']("://"))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};} - else if (":"['$===']($case)) { - if ($truthy((target = target.$chop())['$end_with?'](")"))) { - - target = target.$chop(); - suffix = "):"; - } else { - suffix = ":" - }; - if ($truthy(target['$end_with?']("://"))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};}; - }; - $c = [nil, $hash2(["type"], {"type": "link"})], (attrs = $c[0]), (link_opts = $c[1]), $c; - if ($truthy(text['$empty?']())) { - } else { - - if ($truthy(text['$include?']($$($nesting, 'R_SB')))) { - text = text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))}; - if ($truthy(($truthy($c = doc.$compat_mode()['$!']()) ? text['$include?']("=") : $c))) { - - $d = self.$extract_attributes_from_text(text, ""), $c = Opal.to_ary($d), (text = ($c[0] == null ? nil : $c[0])), (attrs = ($c[1] == null ? nil : $c[1])), $d; - - $writer = ["id", attrs['$[]']("id")]; - $send(link_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - if ($truthy(text['$end_with?']("^"))) { - - text = text.$chop(); - if ($truthy(attrs)) { - ($truthy($c = attrs['$[]']("window")) ? $c : (($writer = ["window", "_blank"]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - } else { - attrs = $hash2(["window"], {"window": "_blank"}) - };}; - }; - if ($truthy(text['$empty?']())) { - - text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) { - - return target.$sub($$($nesting, 'UriSniffRx'), ""); - } else { - return target - }; return nil; })(); - if ($truthy(attrs)) { - - $writer = ["role", (function() {if ($truthy(attrs['$key?']("role"))) { - return "" + "bare " + (attrs['$[]']("role")) - } else { - return "bare" - }; return nil; })()]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - attrs = $hash2(["role"], {"role": "bare"}) - };}; - doc.$register("links", (($writer = ["target", target]), $send(link_opts, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy(attrs)) { - - $writer = ["attributes", attrs]; - $send(link_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return "" + (prefix) + ($$($nesting, 'Inline').$new(self, "anchor", text, link_opts).$convert()) + (suffix);}, $$33.$$s = self, $$33.$$arity = 0, $$33))}; - if ($truthy(($truthy($a = found_macroish) ? ($truthy($b = text['$include?']("link:")) ? $b : text['$include?']("ilto:")) : $a))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineLinkMacroRx')], ($$34 = function(){var self = $$34.$$s || this, $c, $d, mailto = nil, target = nil, mailto_text = nil, attrs = nil, link_opts = nil, $writer = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length()); - } else if ($truthy((mailto = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1))))) { - target = $rb_plus("mailto:", (mailto_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)))) - } else { - target = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)) - }; - $c = [nil, $hash2(["type"], {"type": "link"})], (attrs = $c[0]), (link_opts = $c[1]), $c; - if ($truthy((text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))['$empty?']())) { - } else { - - if ($truthy(text['$include?']($$($nesting, 'R_SB')))) { - text = text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))}; - if ($truthy(mailto)) { - if ($truthy(($truthy($c = doc.$compat_mode()['$!']()) ? text['$include?'](",") : $c))) { - - $d = self.$extract_attributes_from_text(text, ""), $c = Opal.to_ary($d), (text = ($c[0] == null ? nil : $c[0])), (attrs = ($c[1] == null ? nil : $c[1])), $d; - - $writer = ["id", attrs['$[]']("id")]; - $send(link_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(attrs['$key?'](2))) { - if ($truthy(attrs['$key?'](3))) { - target = "" + (target) + "?subject=" + ($$($nesting, 'Helpers').$encode_uri_component(attrs['$[]'](2))) + "&body=" + ($$($nesting, 'Helpers').$encode_uri_component(attrs['$[]'](3))) - } else { - target = "" + (target) + "?subject=" + ($$($nesting, 'Helpers').$encode_uri_component(attrs['$[]'](2))) - }};} - } else if ($truthy(($truthy($c = doc.$compat_mode()['$!']()) ? text['$include?']("=") : $c))) { - - $d = self.$extract_attributes_from_text(text, ""), $c = Opal.to_ary($d), (text = ($c[0] == null ? nil : $c[0])), (attrs = ($c[1] == null ? nil : $c[1])), $d; - - $writer = ["id", attrs['$[]']("id")]; - $send(link_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - if ($truthy(text['$end_with?']("^"))) { - - text = text.$chop(); - if ($truthy(attrs)) { - ($truthy($c = attrs['$[]']("window")) ? $c : (($writer = ["window", "_blank"]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - } else { - attrs = $hash2(["window"], {"window": "_blank"}) - };}; - }; - if ($truthy(text['$empty?']())) { - if ($truthy(mailto)) { - text = mailto_text - } else { - - if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) { - if ($truthy((text = target.$sub($$($nesting, 'UriSniffRx'), ""))['$empty?']())) { - text = target} - } else { - text = target - }; - if ($truthy(attrs)) { - - $writer = ["role", (function() {if ($truthy(attrs['$key?']("role"))) { - return "" + "bare " + (attrs['$[]']("role")) - } else { - return "bare" - }; return nil; })()]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - attrs = $hash2(["role"], {"role": "bare"}) - }; - }}; - doc.$register("links", (($writer = ["target", target]), $send(link_opts, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy(attrs)) { - - $writer = ["attributes", attrs]; - $send(link_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return $$($nesting, 'Inline').$new(self, "anchor", text, link_opts).$convert();}, $$34.$$s = self, $$34.$$arity = 0, $$34))}; - if ($truthy(text['$include?']("@"))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineEmailRx')], ($$35 = function(){var self = $$35.$$s || this, $c, target = nil, address = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](1)))) { - return (function() {if ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))['$==']($$($nesting, 'RS'))) { - - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length()); - } else { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)) - }; return nil; })();}; - target = $rb_plus("mailto:", (address = (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)))); - doc.$register("links", target); - return $$($nesting, 'Inline').$new(self, "anchor", address, $hash2(["type", "target"], {"type": "link", "target": target})).$convert();}, $$35.$$s = self, $$35.$$arity = 0, $$35))}; - if ($truthy(($truthy($a = ($truthy($b = found_square_bracket) ? self.context['$==']("list_item") : $b)) ? self.parent.$style()['$==']("bibliography") : $a))) { - text = $send(text, 'sub', [$$($nesting, 'InlineBiblioAnchorRx')], ($$36 = function(){var self = $$36.$$s || this, $c; - - return $$($nesting, 'Inline').$new(self, "anchor", (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)), $hash2(["type", "id"], {"type": "bibref", "id": (($c = $gvars['~']) === nil ? nil : $c['$[]'](1))})).$convert()}, $$36.$$s = self, $$36.$$arity = 0, $$36))}; - if ($truthy(($truthy($a = ($truthy($b = found_square_bracket) ? text['$include?']("[[") : $b)) ? $a : ($truthy($b = found_macroish) ? text['$include?']("or:") : $b)))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineAnchorRx')], ($$37 = function(){var self = $$37.$$s || this, $c, $d, id = nil, reftext = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](1)))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - if ($truthy((id = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2))))) { - reftext = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)) - } else { - - id = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4)); - if ($truthy(($truthy($c = (reftext = (($d = $gvars['~']) === nil ? nil : $d['$[]'](5)))) ? reftext['$include?']($$($nesting, 'R_SB')) : $c))) { - reftext = reftext.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))}; - }; - return $$($nesting, 'Inline').$new(self, "anchor", reftext, $hash2(["type", "id"], {"type": "ref", "id": id})).$convert();}, $$37.$$s = self, $$37.$$arity = 0, $$37))}; - if ($truthy(($truthy($a = ($truthy($b = text['$include?']("&")) ? text['$include?'](";&l") : $b)) ? $a : ($truthy($b = found_macroish) ? text['$include?']("xref:") : $b)))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineXrefMacroRx')], ($$38 = function(){var self = $$38.$$s || this, $c, $d, attrs = nil, refid = nil, macro = nil, fragment = nil, hash_idx = nil, fragment_len = nil, path = nil, src2src = nil, target = nil, $writer = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - attrs = $hash2([], {}); - if ($truthy((refid = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1))))) { - - $d = refid.$split(",", 2), $c = Opal.to_ary($d), (refid = ($c[0] == null ? nil : $c[0])), (text = ($c[1] == null ? nil : $c[1])), $d; - if ($truthy(text)) { - text = text.$lstrip()}; - } else { - - macro = true; - refid = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)); - if ($truthy((text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3))))) { - - if ($truthy(text['$include?']($$($nesting, 'R_SB')))) { - text = text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))}; - if ($truthy(($truthy($c = doc.$compat_mode()['$!']()) ? text['$include?']("=") : $c))) { - $d = self.$extract_attributes_from_text(text), $c = Opal.to_ary($d), (text = ($c[0] == null ? nil : $c[0])), (attrs = ($c[1] == null ? nil : $c[1])), $d};}; - }; - if ($truthy(doc.$compat_mode())) { - fragment = refid - } else if ($truthy((hash_idx = refid.$index("#")))) { - if ($truthy($rb_gt(hash_idx, 0))) { - - if ($truthy($rb_gt((fragment_len = $rb_minus($rb_minus(refid.$length(), 1), hash_idx)), 0))) { - $c = [refid.$slice(0, hash_idx), refid.$slice($rb_plus(hash_idx, 1), fragment_len)], (path = $c[0]), (fragment = $c[1]), $c - } else { - path = refid.$chop() - }; - if ($truthy(macro)) { - if ($truthy(path['$end_with?'](".adoc"))) { - src2src = (path = path.$slice(0, $rb_minus(path.$length(), 5))) - } else if ($truthy($$($nesting, 'Helpers')['$extname?'](path)['$!']())) { - src2src = path} - } else if ($truthy($send(path, 'end_with?', Opal.to_a($$($nesting, 'ASCIIDOC_EXTENSIONS').$keys())))) { - src2src = (path = path.$slice(0, path.$rindex("."))) - } else { - src2src = path - }; - } else { - $c = [refid, refid.$slice(1, refid.$length())], (target = $c[0]), (fragment = $c[1]), $c - } - } else if ($truthy(macro)) { - if ($truthy(refid['$end_with?'](".adoc"))) { - src2src = (path = refid.$slice(0, $rb_minus(refid.$length(), 5))) - } else if ($truthy($$($nesting, 'Helpers')['$extname?'](refid))) { - path = refid - } else { - fragment = refid - } - } else { - fragment = refid - }; - if ($truthy(target)) { - - refid = fragment; - if ($truthy(($truthy($c = self.$logger()['$info?']()) ? doc.$catalog()['$[]']("refs")['$[]'](refid)['$!']() : $c))) { - self.$logger().$info("" + "possible invalid reference: " + (refid))}; - } else if ($truthy(path)) { - if ($truthy(($truthy($c = src2src) ? ($truthy($d = doc.$attributes()['$[]']("docname")['$=='](path)) ? $d : doc.$catalog()['$[]']("includes")['$[]'](path)) : $c))) { - if ($truthy(fragment)) { - - $c = [fragment, nil, "" + "#" + (fragment)], (refid = $c[0]), (path = $c[1]), (target = $c[2]), $c; - if ($truthy(($truthy($c = self.$logger()['$info?']()) ? doc.$catalog()['$[]']("refs")['$[]'](refid)['$!']() : $c))) { - self.$logger().$info("" + "possible invalid reference: " + (refid))}; - } else { - $c = [nil, nil, "#"], (refid = $c[0]), (path = $c[1]), (target = $c[2]), $c - } - } else { - - $c = [path, "" + (($truthy($d = doc.$attributes()['$[]']("relfileprefix")) ? $d : "")) + (path) + ((function() {if ($truthy(src2src)) { - - return doc.$attributes().$fetch("relfilesuffix", doc.$outfilesuffix()); - } else { - return "" - }; return nil; })())], (refid = $c[0]), (path = $c[1]), $c; - if ($truthy(fragment)) { - $c = ["" + (refid) + "#" + (fragment), "" + (path) + "#" + (fragment)], (refid = $c[0]), (target = $c[1]), $c - } else { - target = path - }; - } - } else if ($truthy(($truthy($c = doc.$compat_mode()) ? $c : $$($nesting, 'Compliance').$natural_xrefs()['$!']()))) { - - $c = [fragment, "" + "#" + (fragment)], (refid = $c[0]), (target = $c[1]), $c; - if ($truthy(($truthy($c = self.$logger()['$info?']()) ? doc.$catalog()['$[]']("refs")['$[]'](refid)['$!']() : $c))) { - self.$logger().$info("" + "possible invalid reference: " + (refid))}; - } else if ($truthy(doc.$catalog()['$[]']("refs")['$[]'](fragment))) { - $c = [fragment, "" + "#" + (fragment)], (refid = $c[0]), (target = $c[1]), $c - } else if ($truthy(($truthy($c = ($truthy($d = fragment['$include?'](" ")) ? $d : fragment.$downcase()['$!='](fragment))) ? (refid = doc.$resolve_id(fragment)) : $c))) { - $c = [refid, "" + "#" + (refid)], (fragment = $c[0]), (target = $c[1]), $c - } else { - - $c = [fragment, "" + "#" + (fragment)], (refid = $c[0]), (target = $c[1]), $c; - if ($truthy(self.$logger()['$info?']())) { - self.$logger().$info("" + "possible invalid reference: " + (refid))}; - }; - - $writer = ["path", path]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["fragment", fragment]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["refid", refid]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return $$($nesting, 'Inline').$new(self, "anchor", text, $hash2(["type", "target", "attributes"], {"type": "xref", "target": target, "attributes": attrs})).$convert();}, $$38.$$s = self, $$38.$$arity = 0, $$38))}; - if ($truthy(($truthy($a = found_macroish) ? text['$include?']("tnote") : $a))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineFootnoteMacroRx')], ($$39 = function(){var self = $$39.$$s || this, $c, $d, $e, $$40, id = nil, footnote = nil, index = nil, type = nil, target = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](1)))) { - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))) { - - $d = (($e = $gvars['~']) === nil ? nil : $e['$[]'](3)).$split(",", 2), $c = Opal.to_ary($d), (id = ($c[0] == null ? nil : $c[0])), (text = ($c[1] == null ? nil : $c[1])), $d; - if ($truthy(doc.$compat_mode())) { - } else { - self.$logger().$warn("" + "found deprecated footnoteref macro: " + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))) + "; use footnote macro with target instead") - }; - } else { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)); - } - } else { - - id = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)); - text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)); - }; - if ($truthy(id)) { - if ($truthy((footnote = $send(doc.$footnotes(), 'find', [], ($$40 = function(candidate){var self = $$40.$$s || this; - - - - if (candidate == null) { - candidate = nil; - }; - return candidate.$id()['$=='](id);}, $$40.$$s = self, $$40.$$arity = 1, $$40))))) { - - $c = [footnote.$index(), footnote.$text()], (index = $c[0]), (text = $c[1]), $c; - $c = ["xref", id, nil], (type = $c[0]), (target = $c[1]), (id = $c[2]), $c; - } else if ($truthy(text)) { - - text = self.$restore_passthroughs(self.$normalize_text(text, true, true)); - index = doc.$counter("footnote-number"); - doc.$register("footnotes", $$$($$($nesting, 'Document'), 'Footnote').$new(index, id, text)); - $c = ["ref", nil], (type = $c[0]), (target = $c[1]), $c; - } else { - - self.$logger().$warn("" + "invalid footnote reference: " + (id)); - $c = ["xref", id, id, nil], (type = $c[0]), (target = $c[1]), (text = $c[2]), (id = $c[3]), $c; - } - } else if ($truthy(text)) { - - text = self.$restore_passthroughs(self.$normalize_text(text, true, true)); - index = doc.$counter("footnote-number"); - doc.$register("footnotes", $$$($$($nesting, 'Document'), 'Footnote').$new(index, id, text)); - type = (target = nil); - } else { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)); - }; - return $$($nesting, 'Inline').$new(self, "footnote", text, $hash2(["attributes", "id", "target", "type"], {"attributes": $hash2(["index"], {"index": index}), "id": id, "target": target, "type": type})).$convert();}, $$39.$$s = self, $$39.$$arity = 0, $$39))}; - return text; - }, $Substitutors_sub_macros$19.$$arity = 1); - - Opal.def(self, '$sub_post_replacements', $Substitutors_sub_post_replacements$41 = function $$sub_post_replacements(text) { - var $a, $$42, $$43, self = this, lines = nil, last = nil; - if (self.attributes == null) self.attributes = nil; - if (self.document == null) self.document = nil; - - if ($truthy(($truthy($a = self.attributes['$[]']("hardbreaks-option")) ? $a : self.document.$attributes()['$[]']("hardbreaks-option")))) { - - lines = text.$split($$($nesting, 'LF'), -1); - if ($truthy($rb_lt(lines.$size(), 2))) { - return text}; - last = lines.$pop(); - return $send(lines, 'map', [], ($$42 = function(line){var self = $$42.$$s || this; - - - - if (line == null) { - line = nil; - }; - return $$($nesting, 'Inline').$new(self, "break", (function() {if ($truthy(line['$end_with?']($$($nesting, 'HARD_LINE_BREAK')))) { - - return line.$slice(0, $rb_minus(line.$length(), 2)); - } else { - return line - }; return nil; })(), $hash2(["type"], {"type": "line"})).$convert();}, $$42.$$s = self, $$42.$$arity = 1, $$42))['$<<'](last).$join($$($nesting, 'LF')); - } else if ($truthy(($truthy($a = text['$include?']($$($nesting, 'PLUS'))) ? text['$include?']($$($nesting, 'HARD_LINE_BREAK')) : $a))) { - return $send(text, 'gsub', [$$($nesting, 'HardLineBreakRx')], ($$43 = function(){var self = $$43.$$s || this, $b; - - return $$($nesting, 'Inline').$new(self, "break", (($b = $gvars['~']) === nil ? nil : $b['$[]'](1)), $hash2(["type"], {"type": "line"})).$convert()}, $$43.$$s = self, $$43.$$arity = 0, $$43)) - } else { - return text - } - }, $Substitutors_sub_post_replacements$41.$$arity = 1); - - Opal.def(self, '$sub_source', $Substitutors_sub_source$44 = function $$sub_source(source, process_callouts) { - var self = this; - - if ($truthy(process_callouts)) { - return self.$sub_callouts(self.$sub_specialchars(source)) - } else { - - return self.$sub_specialchars(source); - } - }, $Substitutors_sub_source$44.$$arity = 2); - - Opal.def(self, '$sub_callouts', $Substitutors_sub_callouts$45 = function $$sub_callouts(text) { - var $$46, self = this, callout_rx = nil, autonum = nil; - - - callout_rx = (function() {if ($truthy(self['$attr?']("line-comment"))) { - return $$($nesting, 'CalloutSourceRxMap')['$[]'](self.$attr("line-comment")) - } else { - return $$($nesting, 'CalloutSourceRx') - }; return nil; })(); - autonum = 0; - return $send(text, 'gsub', [callout_rx], ($$46 = function(){var self = $$46.$$s || this, $a, $b; - if (self.document == null) self.document = nil; - - if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](2)))) { - return (($a = $gvars['~']) === nil ? nil : $a['$[]'](0)).$sub($$($nesting, 'RS'), "") - } else { - return $$($nesting, 'Inline').$new(self, "callout", (function() {if ((($a = $gvars['~']) === nil ? nil : $a['$[]'](4))['$=='](".")) { - return (autonum = $rb_plus(autonum, 1)).$to_s() - } else { - return (($a = $gvars['~']) === nil ? nil : $a['$[]'](4)) - }; return nil; })(), $hash2(["id", "attributes"], {"id": self.document.$callouts().$read_next_id(), "attributes": $hash2(["guard"], {"guard": ($truthy($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))) ? $a : (function() {if ((($b = $gvars['~']) === nil ? nil : $b['$[]'](3))['$==']("--")) { - return ["<!--", "-->"] - } else { - return nil - }; return nil; })())})})).$convert() - }}, $$46.$$s = self, $$46.$$arity = 0, $$46)); - }, $Substitutors_sub_callouts$45.$$arity = 1); - - Opal.def(self, '$highlight_source', $Substitutors_highlight_source$47 = function $$highlight_source(source, process_callouts) { - var $a, $b, $c, self = this, syntax_hl = nil, callout_marks = nil, doc_attrs = nil, syntax_hl_name = nil, linenums_mode = nil, start_line_number = nil, highlight_lines = nil, highlighted = nil, source_offset = nil; - if (self.document == null) self.document = nil; - if (self.passthroughs == null) self.passthroughs = nil; - - - if ($truthy(($truthy($a = (syntax_hl = self.document.$syntax_highlighter())) ? syntax_hl['$highlight?']() : $a))) { - } else { - return self.$sub_source(source, process_callouts) - }; - if ($truthy(process_callouts)) { - $b = self.$extract_callouts(source), $a = Opal.to_ary($b), (source = ($a[0] == null ? nil : $a[0])), (callout_marks = ($a[1] == null ? nil : $a[1])), $b}; - doc_attrs = self.document.$attributes(); - syntax_hl_name = syntax_hl.$name(); - if ($truthy((linenums_mode = (function() {if ($truthy(self['$attr?']("linenums"))) { - return ($truthy($a = doc_attrs['$[]']("" + (syntax_hl_name) + "-linenums-mode")) ? $a : "table").$to_sym() - } else { - return nil - }; return nil; })()))) { - if ($truthy($rb_lt((start_line_number = self.$attr("start", 1).$to_i()), 1))) { - start_line_number = 1}}; - if ($truthy(self['$attr?']("highlight"))) { - highlight_lines = self.$resolve_lines_to_highlight(source, self.$attr("highlight"), start_line_number)}; - $b = syntax_hl.$highlight(self, source, self.$attr("language"), $hash2(["callouts", "css_mode", "highlight_lines", "number_lines", "start_line_number", "style"], {"callouts": callout_marks, "css_mode": ($truthy($c = doc_attrs['$[]']("" + (syntax_hl_name) + "-css")) ? $c : "class").$to_sym(), "highlight_lines": highlight_lines, "number_lines": linenums_mode, "start_line_number": start_line_number, "style": doc_attrs['$[]']("" + (syntax_hl_name) + "-style")})), $a = Opal.to_ary($b), (highlighted = ($a[0] == null ? nil : $a[0])), (source_offset = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy(self.passthroughs['$empty?']())) { - } else { - highlighted = highlighted.$gsub($$($nesting, 'HighlightedPassSlotRx'), "" + ($$($nesting, 'PASS_START')) + "\\1" + ($$($nesting, 'PASS_END'))) - }; - if ($truthy(callout_marks['$nil_or_empty?']())) { - return highlighted - } else { - - return self.$restore_callouts(highlighted, callout_marks, source_offset); - }; - }, $Substitutors_highlight_source$47.$$arity = 2); - - Opal.def(self, '$resolve_lines_to_highlight', $Substitutors_resolve_lines_to_highlight$48 = function $$resolve_lines_to_highlight(source, spec, start) { - var $$49, $$50, self = this, lines = nil, shift = nil; - - - - if (start == null) { - start = nil; - }; - lines = []; - if ($truthy(spec['$include?'](" "))) { - spec = spec.$delete(" ")}; - $send((function() {if ($truthy(spec['$include?'](","))) { - - return spec.$split(","); - } else { - - return spec.$split(";"); - }; return nil; })(), 'map', [], ($$49 = function(entry){var self = $$49.$$s || this, $a, $b, negate = nil, delim = nil, from = nil, to = nil, line = nil; - - - - if (entry == null) { - entry = nil; - }; - if ($truthy(entry['$start_with?']("!"))) { - - entry = entry.$slice(1, entry.$length()); - negate = true;}; - if ($truthy((delim = (function() {if ($truthy(entry['$include?'](".."))) { - return ".." - } else { - - if ($truthy(entry['$include?']("-"))) { - return "-" - } else { - return nil - }; - }; return nil; })()))) { - - $b = entry.$partition(delim), $a = Opal.to_ary($b), (from = ($a[0] == null ? nil : $a[0])), (delim = ($a[1] == null ? nil : $a[1])), (to = ($a[2] == null ? nil : $a[2])), $b; - if ($truthy(($truthy($a = to['$empty?']()) ? $a : $rb_lt((to = to.$to_i()), 0)))) { - to = $rb_plus(source.$count($$($nesting, 'LF')), 1)}; - if ($truthy(negate)) { - return (lines = $rb_minus(lines, Opal.Range.$new(from.$to_i(), to, false).$to_a())) - } else { - return (lines = lines['$|'](Opal.Range.$new(from.$to_i(), to, false).$to_a())) - }; - } else if ($truthy(negate)) { - return lines.$delete(entry.$to_i()) - } else if ($truthy(lines['$include?']((line = entry.$to_i()))['$!']())) { - return lines['$<<'](line) - } else { - return nil - };}, $$49.$$s = self, $$49.$$arity = 1, $$49)); - if ((shift = (function() {if ($truthy(start)) { - return $rb_minus(start, 1) - } else { - return 0 - }; return nil; })())['$=='](0)) { - } else { - lines = $send(lines, 'map', [], ($$50 = function(it){var self = $$50.$$s || this; - - - - if (it == null) { - it = nil; - }; - return $rb_minus(it, shift);}, $$50.$$s = self, $$50.$$arity = 1, $$50)) - }; - return lines.$sort(); - }, $Substitutors_resolve_lines_to_highlight$48.$$arity = -3); - - Opal.def(self, '$extract_passthroughs', $Substitutors_extract_passthroughs$51 = function $$extract_passthroughs(text) { - var $a, $b, $$52, $$53, $$54, self = this, compat_mode = nil, passthrus = nil, pass_inline_char1 = nil, pass_inline_char2 = nil, pass_inline_rx = nil; - if (self.document == null) self.document = nil; - if (self.passthroughs == null) self.passthroughs = nil; - - - compat_mode = self.document.$compat_mode(); - passthrus = self.passthroughs; - if ($truthy(($truthy($a = ($truthy($b = text['$include?']("++")) ? $b : text['$include?']("$$"))) ? $a : text['$include?']("ss:")))) { - text = $send(text, 'gsub', [$$($nesting, 'InlinePassMacroRx')], ($$52 = function(){var self = $$52.$$s || this, $c, boundary = nil, attrlist = nil, escape_count = nil, preceding = nil, old_behavior = nil, attributes = nil, subs = nil, $writer = nil, passthru_key = nil; - - - if ($truthy((boundary = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4))))) { - - if ($truthy(($truthy($c = compat_mode) ? boundary['$==']("++") : $c))) { - return "" + ((function() {if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](2)))) { - return "" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))) + "[" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](2))) + "]" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](3))) - } else { - return "" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](3))) - }; return nil; })()) + "++" + (self.$extract_passthroughs((($c = $gvars['~']) === nil ? nil : $c['$[]'](5)))) + "++";}; - if ($truthy((attrlist = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2))))) { - if ($truthy($rb_gt((escape_count = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)).$length()), 0))) { - return "" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))) + "[" + (attrlist) + "]" + ($rb_times($$($nesting, 'RS'), $rb_minus(escape_count, 1))) + (boundary) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](5))) + (boundary); - } else if ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))['$==']($$($nesting, 'RS'))) { - preceding = "" + "[" + (attrlist) + "]" - } else { - - if ($truthy((($c = boundary['$==']("++")) ? attrlist['$end_with?']("x-") : boundary['$==']("++")))) { - - old_behavior = true; - attrlist = attrlist.$slice(0, $rb_minus(attrlist.$length(), 2));}; - attributes = self.$parse_quoted_text_attributes(attrlist); - } - } else if ($truthy($rb_gt((escape_count = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)).$length()), 0))) { - return "" + ($rb_times($$($nesting, 'RS'), $rb_minus(escape_count, 1))) + (boundary) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](5))) + (boundary);}; - subs = (function() {if (boundary['$==']("+++")) { - return [] - } else { - return $$($nesting, 'BASIC_SUBS') - }; return nil; })(); - if ($truthy(attributes)) { - if ($truthy(old_behavior)) { - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "type", "attributes"], {"text": (($c = $gvars['~']) === nil ? nil : $c['$[]'](5)), "subs": $$($nesting, 'NORMAL_SUBS'), "type": "monospaced", "attributes": attributes})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "type", "attributes"], {"text": (($c = $gvars['~']) === nil ? nil : $c['$[]'](5)), "subs": subs, "type": "unquoted", "attributes": attributes})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } - } else { - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs"], {"text": (($c = $gvars['~']) === nil ? nil : $c['$[]'](5)), "subs": subs})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - } else { - - if ((($c = $gvars['~']) === nil ? nil : $c['$[]'](6))['$==']($$($nesting, 'RS'))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - if ($truthy((subs = (($c = $gvars['~']) === nil ? nil : $c['$[]'](7))))) { - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs"], {"text": self.$normalize_text((($c = $gvars['~']) === nil ? nil : $c['$[]'](8)), nil, true), "subs": self.$resolve_pass_subs(subs)})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text"], {"text": self.$normalize_text((($c = $gvars['~']) === nil ? nil : $c['$[]'](8)), nil, true)})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - }; - return "" + (($truthy($c = preceding) ? $c : "")) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$52.$$s = self, $$52.$$arity = 0, $$52))}; - $b = $$($nesting, 'InlinePassRx')['$[]'](compat_mode), $a = Opal.to_ary($b), (pass_inline_char1 = ($a[0] == null ? nil : $a[0])), (pass_inline_char2 = ($a[1] == null ? nil : $a[1])), (pass_inline_rx = ($a[2] == null ? nil : $a[2])), $b; - if ($truthy(($truthy($a = text['$include?'](pass_inline_char1)) ? $a : ($truthy($b = pass_inline_char2) ? text['$include?'](pass_inline_char2) : $b)))) { - text = $send(text, 'gsub', [pass_inline_rx], ($$53 = function(){var self = $$53.$$s || this, $c, preceding = nil, attrlist = nil, quoted_text = nil, escape_mark = nil, format_mark = nil, content = nil, old_behavior = nil, attributes = nil, $writer = nil, passthru_key = nil, subs = nil; - - - preceding = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1)); - attrlist = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)); - if ($truthy((quoted_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))['$start_with?']($$($nesting, 'RS')))) { - escape_mark = $$($nesting, 'RS')}; - format_mark = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4)); - content = (($c = $gvars['~']) === nil ? nil : $c['$[]'](5)); - if ($truthy(compat_mode)) { - old_behavior = true - } else if ($truthy((old_behavior = ($truthy($c = attrlist) ? attrlist['$end_with?']("x-") : $c)))) { - attrlist = attrlist.$slice(0, $rb_minus(attrlist.$length(), 2))}; - if ($truthy(attrlist)) { - if ($truthy((($c = format_mark['$==']("`")) ? old_behavior['$!']() : format_mark['$==']("`")))) { - return self.$extract_inner_passthrough(content, "" + (preceding) + "[" + (attrlist) + "]" + (escape_mark)); - } else if ($truthy(escape_mark)) { - return "" + (preceding) + "[" + (attrlist) + "]" + (quoted_text.$slice(1, quoted_text.$length())); - } else if (preceding['$==']($$($nesting, 'RS'))) { - preceding = "" + "[" + (attrlist) + "]" - } else { - attributes = self.$parse_quoted_text_attributes(attrlist) - } - } else if ($truthy((($c = format_mark['$==']("`")) ? old_behavior['$!']() : format_mark['$==']("`")))) { - return self.$extract_inner_passthrough(content, "" + (preceding) + (escape_mark)); - } else if ($truthy(escape_mark)) { - return "" + (preceding) + (quoted_text.$slice(1, quoted_text.$length()));}; - if ($truthy(compat_mode)) { - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "attributes", "type"], {"text": content, "subs": $$($nesting, 'BASIC_SUBS'), "attributes": attributes, "type": "monospaced"})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else if ($truthy(attributes)) { - if ($truthy(old_behavior)) { - - subs = (function() {if (format_mark['$==']("`")) { - return $$($nesting, 'BASIC_SUBS') - } else { - return $$($nesting, 'NORMAL_SUBS') - }; return nil; })(); - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "attributes", "type"], {"text": content, "subs": subs, "attributes": attributes, "type": "monospaced"})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "attributes", "type"], {"text": content, "subs": $$($nesting, 'BASIC_SUBS'), "attributes": attributes, "type": "unquoted"})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } - } else { - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs"], {"text": content, "subs": $$($nesting, 'BASIC_SUBS')})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - return "" + (preceding) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$53.$$s = self, $$53.$$arity = 0, $$53))}; - if ($truthy(($truthy($a = text['$include?'](":")) ? ($truthy($b = text['$include?']("stem:")) ? $b : text['$include?']("math:")) : $a))) { - text = $send(text, 'gsub', [$$($nesting, 'InlineStemMacroRx')], ($$54 = function(){var self = $$54.$$s || this, $c, $d, type = nil, subs = nil, content = nil, $writer = nil, passthru_key = nil; - if (self.document == null) self.document = nil; - - - if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) { - return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());}; - if ((type = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1)).$to_sym())['$==']("stem")) { - type = $$($nesting, 'STEM_TYPE_ALIASES')['$[]'](self.document.$attributes()['$[]']("stem")).$to_sym()}; - subs = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)); - content = self.$normalize_text((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)), nil, true); - if ($truthy(($truthy($c = (($d = type['$==']("latexmath")) ? content['$start_with?']("$") : type['$==']("latexmath"))) ? content['$end_with?']("$") : $c))) { - content = content.$slice(1, $rb_minus(content.$length(), 2))}; - subs = (function() {if ($truthy(subs)) { - - return self.$resolve_pass_subs(subs); - } else { - - if ($truthy(self.document['$basebackend?']("html"))) { - return $$($nesting, 'BASIC_SUBS') - } else { - return nil - }; - }; return nil; })(); - - $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "type"], {"text": content, "subs": subs, "type": type})]; - $send(passthrus, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return "" + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$54.$$s = self, $$54.$$arity = 0, $$54))}; - return text; - }, $Substitutors_extract_passthroughs$51.$$arity = 1); - - Opal.def(self, '$restore_passthroughs', $Substitutors_restore_passthroughs$55 = function $$restore_passthroughs(text) { - var $$56, self = this, passthrus = nil; - if (self.passthroughs == null) self.passthroughs = nil; - - - passthrus = self.passthroughs; - return $send(text, 'gsub', [$$($nesting, 'PassSlotRx')], ($$56 = function(){var self = $$56.$$s || this, $a, pass = nil, subbed_text = nil, type = nil, attributes = nil, id = nil; - - if ($truthy((pass = passthrus['$[]']((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)).$to_i())))) { - - subbed_text = self.$apply_subs(pass['$[]']("text"), pass['$[]']("subs")); - if ($truthy((type = pass['$[]']("type")))) { - - if ($truthy((attributes = pass['$[]']("attributes")))) { - id = attributes['$[]']("id")}; - subbed_text = $$($nesting, 'Inline').$new(self, "quoted", subbed_text, $hash2(["type", "id", "attributes"], {"type": type, "id": id, "attributes": attributes})).$convert();}; - if ($truthy(subbed_text['$include?']($$($nesting, 'PASS_START')))) { - return self.$restore_passthroughs(subbed_text) - } else { - return subbed_text - }; - } else { - - self.$logger().$error("" + "unresolved passthrough detected: " + (text)); - return "??pass??"; - }}, $$56.$$s = self, $$56.$$arity = 0, $$56)); - }, $Substitutors_restore_passthroughs$55.$$arity = 1); - - Opal.def(self, '$resolve_subs', $Substitutors_resolve_subs$57 = function $$resolve_subs(subs, type, defaults, subject) { - var $$58, self = this, candidates = nil, modifiers_present = nil, resolved = nil, invalid = nil; - - - - if (type == null) { - type = "block"; - }; - - if (defaults == null) { - defaults = nil; - }; - - if (subject == null) { - subject = nil; - }; - if ($truthy(subs['$nil_or_empty?']())) { - return nil}; - candidates = nil; - if ($truthy(subs['$include?'](" "))) { - subs = subs.$delete(" ")}; - modifiers_present = $$($nesting, 'SubModifierSniffRx')['$match?'](subs); - $send(subs.$split(","), 'each', [], ($$58 = function(key){var self = $$58.$$s || this, $a, $b, modifier_operation = nil, first = nil, resolved_keys = nil, resolved_key = nil, candidate = nil, $case = nil; - - - - if (key == null) { - key = nil; - }; - modifier_operation = nil; - if ($truthy(modifiers_present)) { - if ((first = key.$chr())['$==']("+")) { - - modifier_operation = "append"; - key = key.$slice(1, key.$length()); - } else if (first['$==']("-")) { - - modifier_operation = "remove"; - key = key.$slice(1, key.$length()); - } else if ($truthy(key['$end_with?']("+"))) { - - modifier_operation = "prepend"; - key = key.$chop();}}; - key = key.$to_sym(); - if ($truthy((($a = type['$==']("inline")) ? ($truthy($b = key['$==']("verbatim")) ? $b : key['$==']("v")) : type['$==']("inline")))) { - resolved_keys = $$($nesting, 'BASIC_SUBS') - } else if ($truthy($$($nesting, 'SUB_GROUPS')['$key?'](key))) { - resolved_keys = $$($nesting, 'SUB_GROUPS')['$[]'](key) - } else if ($truthy(($truthy($a = (($b = type['$==']("inline")) ? key.$length()['$=='](1) : type['$==']("inline"))) ? $$($nesting, 'SUB_HINTS')['$key?'](key) : $a))) { - - resolved_key = $$($nesting, 'SUB_HINTS')['$[]'](key); - if ($truthy((candidate = $$($nesting, 'SUB_GROUPS')['$[]'](resolved_key)))) { - resolved_keys = candidate - } else { - resolved_keys = [resolved_key] - }; - } else { - resolved_keys = [key] - }; - if ($truthy(modifier_operation)) { - - candidates = ($truthy($a = candidates) ? $a : (function() {if ($truthy(defaults)) { - - return defaults.$drop(0); - } else { - return [] - }; return nil; })()); - return (function() {$case = modifier_operation; - if ("append"['$===']($case)) {return (candidates = $rb_plus(candidates, resolved_keys))} - else if ("prepend"['$===']($case)) {return (candidates = $rb_plus(resolved_keys, candidates))} - else if ("remove"['$===']($case)) {return (candidates = $rb_minus(candidates, resolved_keys))} - else { return nil }})(); - } else { - - candidates = ($truthy($a = candidates) ? $a : []); - return (candidates = $rb_plus(candidates, resolved_keys)); - };}, $$58.$$s = self, $$58.$$arity = 1, $$58)); - if ($truthy(candidates)) { - } else { - return nil - }; - resolved = candidates['$&']($$($nesting, 'SUB_OPTIONS')['$[]'](type)); - if ($truthy($rb_minus(candidates, resolved)['$empty?']())) { - } else { - - invalid = $rb_minus(candidates, resolved); - self.$logger().$warn("" + "invalid substitution type" + ((function() {if ($truthy($rb_gt(invalid.$size(), 1))) { - return "s" - } else { - return "" - }; return nil; })()) + ((function() {if ($truthy(subject)) { - return " for " - } else { - return "" - }; return nil; })()) + (subject) + ": " + (invalid.$join(", "))); - }; - return resolved; - }, $Substitutors_resolve_subs$57.$$arity = -2); - - Opal.def(self, '$resolve_block_subs', $Substitutors_resolve_block_subs$59 = function $$resolve_block_subs(subs, defaults, subject) { - var self = this; - - return self.$resolve_subs(subs, "block", defaults, subject) - }, $Substitutors_resolve_block_subs$59.$$arity = 3); - - Opal.def(self, '$resolve_pass_subs', $Substitutors_resolve_pass_subs$60 = function $$resolve_pass_subs(subs) { - var self = this; - - return self.$resolve_subs(subs, "inline", nil, "passthrough macro") - }, $Substitutors_resolve_pass_subs$60.$$arity = 1); - - Opal.def(self, '$expand_subs', $Substitutors_expand_subs$61 = function $$expand_subs(subs, subject) { - var $a, $$62, self = this, expanded_subs = nil; - - - - if (subject == null) { - subject = nil; - }; - if ($truthy($$$('::', 'Symbol')['$==='](subs))) { - if (subs['$==']("none")) { - return nil - } else { - return ($truthy($a = $$($nesting, 'SUB_GROUPS')['$[]'](subs)) ? $a : [subs]) - } - } else if ($truthy($$$('::', 'Array')['$==='](subs))) { - - expanded_subs = []; - $send(subs, 'each', [], ($$62 = function(key){var self = $$62.$$s || this, sub_group = nil; - - - - if (key == null) { - key = nil; - }; - if (key['$==']("none")) { - return nil - } else if ($truthy((sub_group = $$($nesting, 'SUB_GROUPS')['$[]'](key)))) { - return (expanded_subs = $rb_plus(expanded_subs, sub_group)) - } else { - return expanded_subs['$<<'](key) - };}, $$62.$$s = self, $$62.$$arity = 1, $$62)); - if ($truthy(expanded_subs['$empty?']())) { - return nil - } else { - return expanded_subs - }; - } else { - return self.$resolve_subs(subs, "inline", nil, subject) - }; - }, $Substitutors_expand_subs$61.$$arity = -2); - - Opal.def(self, '$commit_subs', $Substitutors_commit_subs$63 = function $$commit_subs() { - var $a, $b, $c, $d, self = this, default_subs = nil, $case = nil, custom_subs = nil, syntax_hl = nil, idx = nil, $writer = nil; - if (self.default_subs == null) self.default_subs = nil; - if (self.content_model == null) self.content_model = nil; - if (self.context == null) self.context = nil; - if (self.subs == null) self.subs = nil; - if (self.attributes == null) self.attributes = nil; - if (self.style == null) self.style = nil; - if (self.document == null) self.document = nil; - - - if ($truthy((default_subs = self.default_subs))) { - } else { - $case = self.content_model; - if ("simple"['$===']($case)) {default_subs = $$($nesting, 'NORMAL_SUBS')} - else if ("verbatim"['$===']($case)) {default_subs = (function() {if (self.context['$==']("verse")) { - return $$($nesting, 'NORMAL_SUBS') - } else { - return $$($nesting, 'VERBATIM_SUBS') - }; return nil; })()} - else if ("raw"['$===']($case)) {default_subs = (function() {if (self.context['$==']("stem")) { - return $$($nesting, 'BASIC_SUBS') - } else { - return $$($nesting, 'NO_SUBS') - }; return nil; })()} - else {return self.subs} - }; - if ($truthy((custom_subs = self.attributes['$[]']("subs")))) { - self.subs = ($truthy($a = self.$resolve_block_subs(custom_subs, default_subs, self.context)) ? $a : []) - } else { - self.subs = default_subs.$drop(0) - }; - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = (($d = self.context['$==']("listing")) ? self.style['$==']("source") : self.context['$==']("listing"))) ? (syntax_hl = self.document.$syntax_highlighter()) : $c)) ? syntax_hl['$highlight?']() : $b)) ? (idx = self.subs.$index("specialcharacters")) : $a))) { - - $writer = [idx, "highlight"]; - $send(self.subs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return nil; - }, $Substitutors_commit_subs$63.$$arity = 0); - - Opal.def(self, '$parse_attributes', $Substitutors_parse_attributes$64 = function $$parse_attributes(attrlist, posattrs, opts) { - var $a, self = this, block = nil, into = nil; - if (self.document == null) self.document = nil; - - - - if (posattrs == null) { - posattrs = []; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy((function() {if ($truthy(attrlist)) { - return attrlist['$empty?']() - } else { - return true - }; return nil; })())) { - return $hash2([], {})}; - if ($truthy(opts['$[]']("unescape_input"))) { - attrlist = self.$normalize_text(attrlist, true, true)}; - if ($truthy(($truthy($a = opts['$[]']("sub_input")) ? attrlist['$include?']($$($nesting, 'ATTR_REF_HEAD')) : $a))) { - attrlist = self.document.$sub_attributes(attrlist)}; - if ($truthy(opts['$[]']("sub_result"))) { - block = self}; - if ($truthy((into = opts['$[]']("into")))) { - return $$($nesting, 'AttributeList').$new(attrlist, block).$parse_into(into, posattrs) - } else { - return $$($nesting, 'AttributeList').$new(attrlist, block).$parse(posattrs) - }; - }, $Substitutors_parse_attributes$64.$$arity = -2); - self.$private(); - - Opal.def(self, '$extract_attributes_from_text', $Substitutors_extract_attributes_from_text$65 = function $$extract_attributes_from_text(text, default_text) { - var self = this, attrlist = nil, resolved_text = nil, attrs = nil; - - - - if (default_text == null) { - default_text = nil; - }; - attrlist = (function() {if ($truthy(text['$include?']($$($nesting, 'LF')))) { - - return text.$tr($$($nesting, 'LF'), " "); - } else { - return text - }; return nil; })(); - if ($truthy((resolved_text = (attrs = $$($nesting, 'AttributeList').$new(attrlist, self).$parse())['$[]'](1)))) { - if (resolved_text['$=='](attrlist)) { - return [text, attrs.$clear()] - } else { - return [resolved_text, attrs] - } - } else { - return [default_text, attrs] - }; - }, $Substitutors_extract_attributes_from_text$65.$$arity = -2); - - Opal.def(self, '$extract_callouts', $Substitutors_extract_callouts$66 = function $$extract_callouts(source) { - var $$67, self = this, callout_marks = nil, autonum = nil, lineno = nil, last_lineno = nil, callout_rx = nil; - - - callout_marks = $hash2([], {}); - autonum = (lineno = 0); - last_lineno = nil; - callout_rx = (function() {if ($truthy(self['$attr?']("line-comment"))) { - return $$($nesting, 'CalloutExtractRxMap')['$[]'](self.$attr("line-comment")) - } else { - return $$($nesting, 'CalloutExtractRx') - }; return nil; })(); - source = $send(source.$split($$($nesting, 'LF'), -1), 'map', [], ($$67 = function(line){var self = $$67.$$s || this, $$68; - - - - if (line == null) { - line = nil; - }; - lineno = $rb_plus(lineno, 1); - return $send(line, 'gsub', [callout_rx], ($$68 = function(){var self = $$68.$$s || this, $a, $b, $writer = nil; - - if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](2)))) { - return (($a = $gvars['~']) === nil ? nil : $a['$[]'](0)).$sub($$($nesting, 'RS'), "") - } else { - - ($truthy($a = callout_marks['$[]'](lineno)) ? $a : (($writer = [lineno, []]), $send(callout_marks, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))['$<<']([($truthy($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))) ? $a : (function() {if ((($b = $gvars['~']) === nil ? nil : $b['$[]'](3))['$==']("--")) { - return ["<!--", "-->"] - } else { - return nil - }; return nil; })()), (function() {if ((($a = $gvars['~']) === nil ? nil : $a['$[]'](4))['$=='](".")) { - return (autonum = $rb_plus(autonum, 1)).$to_s() - } else { - return (($a = $gvars['~']) === nil ? nil : $a['$[]'](4)) - }; return nil; })()]); - last_lineno = lineno; - return ""; - }}, $$68.$$s = self, $$68.$$arity = 0, $$68));}, $$67.$$s = self, $$67.$$arity = 1, $$67)).$join($$($nesting, 'LF')); - if ($truthy(last_lineno)) { - if (last_lineno['$=='](lineno)) { - source = "" + (source) + ($$($nesting, 'LF'))} - } else { - callout_marks = nil - }; - return [source, callout_marks]; - }, $Substitutors_extract_callouts$66.$$arity = 1); - - Opal.def(self, '$restore_callouts', $Substitutors_restore_callouts$69 = function $$restore_callouts(source, callout_marks, source_offset) { - var $$70, self = this, preamble = nil, lineno = nil; - - - - if (source_offset == null) { - source_offset = nil; - }; - if ($truthy(source_offset)) { - - preamble = source.$slice(0, source_offset); - source = source.$slice(source_offset, source.$length()); - } else { - preamble = "" - }; - lineno = 0; - return $rb_plus(preamble, $send(source.$split($$($nesting, 'LF'), -1), 'map', [], ($$70 = function(line){var self = $$70.$$s || this, $a, $b, $$71, conums = nil, guard = nil, numeral = nil; - if (self.document == null) self.document = nil; - - - - if (line == null) { - line = nil; - }; - if ($truthy((conums = callout_marks.$delete((lineno = $rb_plus(lineno, 1)))))) { - if (conums.$size()['$=='](1)) { - - $b = conums['$[]'](0), $a = Opal.to_ary($b), (guard = ($a[0] == null ? nil : $a[0])), (numeral = ($a[1] == null ? nil : $a[1])), $b; - return "" + (line) + ($$($nesting, 'Inline').$new(self, "callout", numeral, $hash2(["id", "attributes"], {"id": self.document.$callouts().$read_next_id(), "attributes": $hash2(["guard"], {"guard": guard})})).$convert()); - } else { - return "" + (line) + ($send(conums, 'map', [], ($$71 = function(guard_it, numeral_it){var self = $$71.$$s || this; - if (self.document == null) self.document = nil; - - - - if (guard_it == null) { - guard_it = nil; - }; - - if (numeral_it == null) { - numeral_it = nil; - }; - return $$($nesting, 'Inline').$new(self, "callout", numeral_it, $hash2(["id", "attributes"], {"id": self.document.$callouts().$read_next_id(), "attributes": $hash2(["guard"], {"guard": guard_it})})).$convert();}, $$71.$$s = self, $$71.$$arity = 2, $$71)).$join(" ")) - } - } else { - return line - };}, $$70.$$s = self, $$70.$$arity = 1, $$70)).$join($$($nesting, 'LF'))); - }, $Substitutors_restore_callouts$69.$$arity = -3); - - Opal.def(self, '$extract_inner_passthrough', $Substitutors_extract_inner_passthrough$72 = function $$extract_inner_passthrough(text, pre) { - var $a, $b, self = this, $writer = nil, passthru_key = nil; - if (self.passthroughs == null) self.passthroughs = nil; - - if ($truthy(($truthy($a = ($truthy($b = text['$end_with?']("+")) ? text['$start_with?']("+", "\\+") : $b)) ? $$($nesting, 'SinglePlusInlinePassRx')['$=~'](text) : $a))) { - if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)))) { - return "" + (pre) + "`+" + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](2))) + "+`" - } else { - - - $writer = [(passthru_key = self.passthroughs.$size()), $hash2(["text", "subs"], {"text": (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), "subs": $$($nesting, 'BASIC_SUBS')})]; - $send(self.passthroughs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return "" + (pre) + "`" + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END')) + "`"; - } - } else { - return "" + (pre) + "`" + (text) + "`" - } - }, $Substitutors_extract_inner_passthrough$72.$$arity = 2); - - Opal.def(self, '$convert_quoted_text', $Substitutors_convert_quoted_text$73 = function $$convert_quoted_text(match, type, scope) { - var $a, self = this, attrs = nil, unescaped_attrs = nil, attrlist = nil, id = nil, attributes = nil; - - - if ($truthy(match['$[]'](0)['$start_with?']($$($nesting, 'RS')))) { - if ($truthy((($a = scope['$==']("constrained")) ? (attrs = match['$[]'](2)) : scope['$==']("constrained")))) { - unescaped_attrs = "" + "[" + (attrs) + "]" - } else { - return match['$[]'](0).$slice(1, match['$[]'](0).$length()) - }}; - if (scope['$==']("constrained")) { - if ($truthy(unescaped_attrs)) { - return "" + (unescaped_attrs) + ($$($nesting, 'Inline').$new(self, "quoted", match['$[]'](3), $hash2(["type"], {"type": type})).$convert()) - } else { - - if ($truthy((attrlist = match['$[]'](2)))) { - - id = (attributes = self.$parse_quoted_text_attributes(attrlist))['$[]']("id"); - if (type['$==']("mark")) { - type = "unquoted"};}; - return "" + (match['$[]'](1)) + ($$($nesting, 'Inline').$new(self, "quoted", match['$[]'](3), $hash2(["type", "id", "attributes"], {"type": type, "id": id, "attributes": attributes})).$convert()); - } - } else { - - if ($truthy((attrlist = match['$[]'](1)))) { - - id = (attributes = self.$parse_quoted_text_attributes(attrlist))['$[]']("id"); - if (type['$==']("mark")) { - type = "unquoted"};}; - return $$($nesting, 'Inline').$new(self, "quoted", match['$[]'](2), $hash2(["type", "id", "attributes"], {"type": type, "id": id, "attributes": attributes})).$convert(); - }; - }, $Substitutors_convert_quoted_text$73.$$arity = 3); - - Opal.def(self, '$do_replacement', $Substitutors_do_replacement$74 = function $$do_replacement(m, replacement, restore) { - var self = this, captured = nil, $case = nil; - - if ($truthy((captured = m['$[]'](0))['$include?']($$($nesting, 'RS')))) { - return captured.$sub($$($nesting, 'RS'), "") - } else { - return (function() {$case = restore; - if ("none"['$===']($case)) {return replacement} - else if ("bounding"['$===']($case)) {return $rb_plus($rb_plus(m['$[]'](1), replacement), m['$[]'](2))} - else {return $rb_plus(m['$[]'](1), replacement)}})() - } - }, $Substitutors_do_replacement$74.$$arity = 3); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - - Opal.def(self, '$parse_quoted_text_attributes', $Substitutors_parse_quoted_text_attributes$75 = function $$parse_quoted_text_attributes(str) { - var $a, $b, self = this, segments = nil, id = nil, more_roles = nil, roles = nil, attrs = nil, $writer = nil; - - - if ($truthy(str['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - str = self.$sub_attributes(str)}; - if ($truthy(str['$include?'](","))) { - str = str.$slice(0, str.$index(","))}; - if ($truthy((str = str.$strip())['$empty?']())) { - return $hash2([], {}) - } else if ($truthy(($truthy($a = str['$start_with?'](".", "#")) ? $$($nesting, 'Compliance').$shorthand_property_syntax() : $a))) { - - segments = str.$split("#", 2); - if ($truthy($rb_gt(segments.$size(), 1))) { - $b = segments['$[]'](1).$split("."), $a = Opal.to_ary($b), (id = ($a[0] == null ? nil : $a[0])), (more_roles = $slice.call($a, 1)), $b - } else { - more_roles = [] - }; - roles = (function() {if ($truthy(segments['$[]'](0)['$empty?']())) { - return [] - } else { - return segments['$[]'](0).$split(".") - }; return nil; })(); - if ($truthy($rb_gt(roles.$size(), 1))) { - roles.$shift()}; - if ($truthy($rb_gt(more_roles.$size(), 0))) { - roles.$concat(more_roles)}; - attrs = $hash2([], {}); - if ($truthy(id)) { - - $writer = ["id", id]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(roles['$empty?']())) { - } else { - - $writer = ["role", roles.$join(" ")]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - return attrs; - } else { - return $hash2(["role"], {"role": str}) - }; - }, $Substitutors_parse_quoted_text_attributes$75.$$arity = 1); - - Opal.def(self, '$normalize_text', $Substitutors_normalize_text$76 = function $$normalize_text(text, normalize_whitespace, unescape_closing_square_brackets) { - var $a, self = this; - - - - if (normalize_whitespace == null) { - normalize_whitespace = nil; - }; - - if (unescape_closing_square_brackets == null) { - unescape_closing_square_brackets = nil; - }; - if ($truthy(text['$empty?']())) { - } else { - - if ($truthy(normalize_whitespace)) { - text = text.$strip().$tr($$($nesting, 'LF'), " ")}; - if ($truthy(($truthy($a = unescape_closing_square_brackets) ? text['$include?']($$($nesting, 'R_SB')) : $a))) { - text = text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))}; - }; - return text; - }, $Substitutors_normalize_text$76.$$arity = -2); - - Opal.def(self, '$split_simple_csv', $Substitutors_split_simple_csv$77 = function $$split_simple_csv(str) { - var $$78, $$79, self = this, values = nil, accum = nil, quote_open = nil; - - if ($truthy(str['$empty?']())) { - return [] - } else if ($truthy(str['$include?']("\""))) { - - values = []; - accum = ""; - quote_open = nil; - $send(str, 'each_char', [], ($$78 = function(c){var self = $$78.$$s || this, $case = nil; - - - - if (c == null) { - c = nil; - }; - return (function() {$case = c; - if (","['$===']($case)) {if ($truthy(quote_open)) { - return (accum = $rb_plus(accum, c)) - } else { - - values['$<<'](accum.$strip()); - return (accum = ""); - }} - else if ("\""['$===']($case)) {return (quote_open = quote_open['$!']())} - else {return (accum = $rb_plus(accum, c))}})();}, $$78.$$s = self, $$78.$$arity = 1, $$78)); - return values['$<<'](accum.$strip()); - } else { - return $send(str.$split(","), 'map', [], ($$79 = function(it){var self = $$79.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$strip();}, $$79.$$s = self, $$79.$$arity = 1, $$79)) - } - }, $Substitutors_split_simple_csv$77.$$arity = 1); - })($nesting[0], $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/version"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module; - - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - Opal.const_set($nesting[0], 'VERSION', "2.0.15") - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/abstract_node"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$include', '$attr_reader', '$attr_accessor', '$==', '$document', '$to_s', '$[]', '$merge', '$raise', '$converter', '$attributes', '$key?', '$[]=', '$-', '$delete', '$tap', '$new', '$each_key', '$end_with?', '$<<', '$slice', '$length', '$update', '$split', '$include?', '$===', '$join', '$empty?', '$apply_reftext_subs', '$attr?', '$attr', '$extname?', '$image_uri', '$<', '$safe', '$uriish?', '$encode_spaces_in_uri', '$normalize_web_path', '$generate_data_uri_from_uri', '$generate_data_uri', '$extname', '$normalize_system_path', '$readable?', '$strict_encode64', '$binread', '$warn', '$logger', '$require_library', '$!', '$open_uri', '$content_type', '$read', '$base_dir', '$root?', '$path_resolver', '$system_path', '$web_path', '$!=', '$prepare_source_string', '$fetch', '$read_asset']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'AbstractNode'); - - var $nesting = [self].concat($parent_nesting), $AbstractNode_initialize$1, $AbstractNode_block$ques$2, $AbstractNode_inline$ques$3, $AbstractNode_converter$4, $AbstractNode_parent$eq$5, $AbstractNode_attr$6, $AbstractNode_attr$ques$7, $AbstractNode_set_attr$8, $AbstractNode_remove_attr$9, $AbstractNode_option$ques$10, $AbstractNode_set_option$11, $AbstractNode_enabled_options$12, $AbstractNode_update_attributes$15, $AbstractNode_role$16, $AbstractNode_roles$17, $AbstractNode_role$ques$18, $AbstractNode_has_role$ques$19, $AbstractNode_role$eq$20, $AbstractNode_add_role$21, $AbstractNode_remove_role$22, $AbstractNode_reftext$23, $AbstractNode_reftext$ques$24, $AbstractNode_icon_uri$25, $AbstractNode_image_uri$26, $AbstractNode_media_uri$27, $AbstractNode_generate_data_uri$28, $AbstractNode_generate_data_uri_from_uri$29, $AbstractNode_normalize_asset_path$31, $AbstractNode_normalize_system_path$32, $AbstractNode_normalize_web_path$33, $AbstractNode_read_asset$34, $AbstractNode_read_contents$35, $AbstractNode_is_uri$ques$38; - - self.$$prototype.document = self.$$prototype.attributes = self.$$prototype.parent = nil; - - self.$include($$($nesting, 'Substitutors'), $$($nesting, 'Logging')); - self.$attr_reader("attributes"); - self.$attr_reader("context"); - self.$attr_reader("document"); - self.$attr_accessor("id"); - self.$attr_reader("node_name"); - self.$attr_reader("parent"); - - Opal.def(self, '$initialize', $AbstractNode_initialize$1 = function $$initialize(parent, context, opts) { - var self = this, attrs = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if (context['$==']("document")) { - self.document = self - } else if ($truthy(parent)) { - self.document = (self.parent = parent).$document()}; - self.node_name = (self.context = context).$to_s(); - self.attributes = (function() {if ($truthy((attrs = opts['$[]']("attributes")))) { - return attrs.$merge() - } else { - return $hash2([], {}) - }; return nil; })(); - return (self.passthroughs = []); - }, $AbstractNode_initialize$1.$$arity = -3); - - Opal.def(self, '$block?', $AbstractNode_block$ques$2 = function() { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError')) - }, $AbstractNode_block$ques$2.$$arity = 0); - - Opal.def(self, '$inline?', $AbstractNode_inline$ques$3 = function() { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError')) - }, $AbstractNode_inline$ques$3.$$arity = 0); - - Opal.def(self, '$converter', $AbstractNode_converter$4 = function $$converter() { - var self = this; - - return self.document.$converter() - }, $AbstractNode_converter$4.$$arity = 0); - - Opal.def(self, '$parent=', $AbstractNode_parent$eq$5 = function(parent) { - var $a, self = this; - - return $a = [parent, parent.$document()], (self.parent = $a[0]), (self.document = $a[1]), $a - }, $AbstractNode_parent$eq$5.$$arity = 1); - - Opal.def(self, '$attr', $AbstractNode_attr$6 = function $$attr(name, default_value, fallback_name) { - var $a, $b, $c, $d, self = this; - - - - if (default_value == null) { - default_value = nil; - }; - - if (fallback_name == null) { - fallback_name = nil; - }; - return ($truthy($a = self.attributes['$[]'](name.$to_s())) ? $a : ($truthy($b = ($truthy($c = ($truthy($d = fallback_name) ? self.parent : $d)) ? self.document.$attributes()['$[]']((function() {if (fallback_name['$=='](true)) { - return name - } else { - return fallback_name - }; return nil; })().$to_s()) : $c)) ? $b : default_value)); - }, $AbstractNode_attr$6.$$arity = -2); - - Opal.def(self, '$attr?', $AbstractNode_attr$ques$7 = function(name, expected_value, fallback_name) { - var $a, $b, self = this; - - - - if (expected_value == null) { - expected_value = nil; - }; - - if (fallback_name == null) { - fallback_name = nil; - }; - if ($truthy(expected_value)) { - return expected_value['$=='](($truthy($a = self.attributes['$[]'](name.$to_s())) ? $a : (function() {if ($truthy(($truthy($b = fallback_name) ? self.parent : $b))) { - return self.document.$attributes()['$[]']((function() {if (fallback_name['$=='](true)) { - return name - } else { - return fallback_name - }; return nil; })().$to_s()) - } else { - return nil - }; return nil; })())) - } else { - return ($truthy($a = self.attributes['$key?'](name.$to_s())) ? $a : (function() {if ($truthy(($truthy($b = fallback_name) ? self.parent : $b))) { - - return self.document.$attributes()['$key?']((function() {if (fallback_name['$=='](true)) { - return name - } else { - return fallback_name - }; return nil; })().$to_s()); - } else { - return false - }; return nil; })()) - }; - }, $AbstractNode_attr$ques$7.$$arity = -2); - - Opal.def(self, '$set_attr', $AbstractNode_set_attr$8 = function $$set_attr(name, value, overwrite) { - var $a, self = this, $writer = nil; - - - - if (value == null) { - value = ""; - }; - - if (overwrite == null) { - overwrite = true; - }; - if ($truthy((($a = overwrite['$=='](false)) ? self.attributes['$key?'](name) : overwrite['$=='](false)))) { - return false - } else { - - - $writer = [name, value]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return true; - }; - }, $AbstractNode_set_attr$8.$$arity = -2); - - Opal.def(self, '$remove_attr', $AbstractNode_remove_attr$9 = function $$remove_attr(name) { - var self = this; - - return self.attributes.$delete(name) - }, $AbstractNode_remove_attr$9.$$arity = 1); - - Opal.def(self, '$option?', $AbstractNode_option$ques$10 = function(name) { - var self = this; - - if ($truthy(self.attributes['$[]']("" + (name) + "-option"))) { - return true - } else { - return false - } - }, $AbstractNode_option$ques$10.$$arity = 1); - - Opal.def(self, '$set_option', $AbstractNode_set_option$11 = function $$set_option(name) { - var self = this, $writer = nil; - - - - $writer = ["" + (name) + "-option", ""]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return nil; - }, $AbstractNode_set_option$11.$$arity = 1); - - Opal.def(self, '$enabled_options', $AbstractNode_enabled_options$12 = function $$enabled_options() { - var $$13, self = this; - - return $send($$$('::', 'Set').$new(), 'tap', [], ($$13 = function(accum){var self = $$13.$$s || this, $$14; - if (self.attributes == null) self.attributes = nil; - - - - if (accum == null) { - accum = nil; - }; - return $send(self.attributes, 'each_key', [], ($$14 = function(k){var self = $$14.$$s || this; - - - - if (k == null) { - k = nil; - }; - if ($truthy(k.$to_s()['$end_with?']("-option"))) { - return accum['$<<'](k.$slice(0, $rb_minus(k.$length(), 7))) - } else { - return nil - };}, $$14.$$s = self, $$14.$$arity = 1, $$14));}, $$13.$$s = self, $$13.$$arity = 1, $$13)) - }, $AbstractNode_enabled_options$12.$$arity = 0); - - Opal.def(self, '$update_attributes', $AbstractNode_update_attributes$15 = function $$update_attributes(new_attributes) { - var self = this; - - return self.attributes.$update(new_attributes) - }, $AbstractNode_update_attributes$15.$$arity = 1); - - Opal.def(self, '$role', $AbstractNode_role$16 = function $$role() { - var self = this; - - return self.attributes['$[]']("role") - }, $AbstractNode_role$16.$$arity = 0); - - Opal.def(self, '$roles', $AbstractNode_roles$17 = function $$roles() { - var self = this, val = nil; - - if ($truthy((val = self.attributes['$[]']("role")))) { - return val.$split() - } else { - return [] - } - }, $AbstractNode_roles$17.$$arity = 0); - - Opal.def(self, '$role?', $AbstractNode_role$ques$18 = function(expected_value) { - var self = this; - - - - if (expected_value == null) { - expected_value = nil; - }; - if ($truthy(expected_value)) { - return expected_value['$=='](self.attributes['$[]']("role")) - } else { - - return self.attributes['$key?']("role"); - }; - }, $AbstractNode_role$ques$18.$$arity = -1); - - Opal.def(self, '$has_role?', $AbstractNode_has_role$ques$19 = function(name) { - var self = this, val = nil; - - if ($truthy((val = self.attributes['$[]']("role")))) { - - return ((("" + " ") + (val)) + " ")['$include?']("" + " " + (name) + " "); - } else { - return false - } - }, $AbstractNode_has_role$ques$19.$$arity = 1); - - Opal.def(self, '$role=', $AbstractNode_role$eq$20 = function(names) { - var self = this, $writer = nil; - - - $writer = ["role", (function() {if ($truthy($$$('::', 'Array')['$==='](names))) { - - return names.$join(" "); - } else { - return names - }; return nil; })()]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $AbstractNode_role$eq$20.$$arity = 1); - - Opal.def(self, '$add_role', $AbstractNode_add_role$21 = function $$add_role(name) { - var self = this, val = nil, $writer = nil; - - if ($truthy((val = self.attributes['$[]']("role")))) { - if ($truthy(((("" + " ") + (val)) + " ")['$include?']("" + " " + (name) + " "))) { - return false - } else { - - - $writer = ["role", "" + (val) + " " + (name)]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return true; - } - } else { - - - $writer = ["role", name]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return true; - } - }, $AbstractNode_add_role$21.$$arity = 1); - - Opal.def(self, '$remove_role', $AbstractNode_remove_role$22 = function $$remove_role(name) { - var $a, self = this, val = nil, $writer = nil; - - if ($truthy(($truthy($a = (val = self.attributes['$[]']("role"))) ? (val = val.$split()).$delete(name) : $a))) { - - if ($truthy(val['$empty?']())) { - self.attributes.$delete("role") - } else { - - $writer = ["role", val.$join(" ")]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - return true; - } else { - return false - } - }, $AbstractNode_remove_role$22.$$arity = 1); - - Opal.def(self, '$reftext', $AbstractNode_reftext$23 = function $$reftext() { - var self = this, val = nil; - - if ($truthy((val = self.attributes['$[]']("reftext")))) { - - return self.$apply_reftext_subs(val); - } else { - return nil - } - }, $AbstractNode_reftext$23.$$arity = 0); - - Opal.def(self, '$reftext?', $AbstractNode_reftext$ques$24 = function() { - var self = this; - - return self.attributes['$key?']("reftext") - }, $AbstractNode_reftext$ques$24.$$arity = 0); - - Opal.def(self, '$icon_uri', $AbstractNode_icon_uri$25 = function $$icon_uri(name) { - var self = this, icon = nil; - - - if ($truthy(self['$attr?']("icon"))) { - - icon = self.$attr("icon"); - if ($truthy($$($nesting, 'Helpers')['$extname?'](icon))) { - } else { - icon = "" + (icon) + "." + (self.document.$attr("icontype", "png")) - }; - } else { - icon = "" + (name) + "." + (self.document.$attr("icontype", "png")) - }; - return self.$image_uri(icon, "iconsdir"); - }, $AbstractNode_icon_uri$25.$$arity = 1); - - Opal.def(self, '$image_uri', $AbstractNode_image_uri$26 = function $$image_uri(target_image, asset_dir_key) { - var $a, $b, $c, $d, self = this, doc = nil, images_base = nil; - - - - if (asset_dir_key == null) { - asset_dir_key = "imagesdir"; - }; - if ($truthy(($truthy($a = $rb_lt((doc = self.document).$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE'))) ? doc['$attr?']("data-uri") : $a))) { - if ($truthy(($truthy($a = ($truthy($b = $$($nesting, 'Helpers')['$uriish?'](target_image)) ? (target_image = $$($nesting, 'Helpers').$encode_spaces_in_uri(target_image)) : $b)) ? $a : ($truthy($b = ($truthy($c = ($truthy($d = asset_dir_key) ? (images_base = doc.$attr(asset_dir_key)) : $d)) ? $$($nesting, 'Helpers')['$uriish?'](images_base) : $c)) ? (target_image = self.$normalize_web_path(target_image, images_base, false)) : $b)))) { - if ($truthy(doc['$attr?']("allow-uri-read"))) { - - return self.$generate_data_uri_from_uri(target_image, doc['$attr?']("cache-uri")); - } else { - return target_image - } - } else { - return self.$generate_data_uri(target_image, asset_dir_key) - } - } else { - return self.$normalize_web_path(target_image, (function() {if ($truthy(asset_dir_key)) { - - return doc.$attr(asset_dir_key); - } else { - return nil - }; return nil; })()) - }; - }, $AbstractNode_image_uri$26.$$arity = -2); - - Opal.def(self, '$media_uri', $AbstractNode_media_uri$27 = function $$media_uri(target, asset_dir_key) { - var self = this; - - - - if (asset_dir_key == null) { - asset_dir_key = "imagesdir"; - }; - return self.$normalize_web_path(target, (function() {if ($truthy(asset_dir_key)) { - return self.document.$attr(asset_dir_key) - } else { - return nil - }; return nil; })()); - }, $AbstractNode_media_uri$27.$$arity = -2); - - Opal.def(self, '$generate_data_uri', $AbstractNode_generate_data_uri$28 = function $$generate_data_uri(target_image, asset_dir_key) { - var self = this, ext = nil, mimetype = nil, image_path = nil; - - - - if (asset_dir_key == null) { - asset_dir_key = nil; - }; - if ($truthy((ext = $$($nesting, 'Helpers').$extname(target_image, nil)))) { - mimetype = (function() {if (ext['$=='](".svg")) { - return "image/svg+xml" - } else { - return "" + "image/" + (ext.$slice(1, ext.$length())) - }; return nil; })() - } else { - mimetype = "application/octet-stream" - }; - if ($truthy(asset_dir_key)) { - image_path = self.$normalize_system_path(target_image, self.document.$attr(asset_dir_key), nil, $hash2(["target_name"], {"target_name": "image"})) - } else { - image_path = self.$normalize_system_path(target_image) - }; - if ($truthy($$$('::', 'File')['$readable?'](image_path))) { - return "" + "data:" + (mimetype) + ";base64," + ($$$('::', 'Base64').$strict_encode64($$$('::', 'File').$binread(image_path))) - } else { - - self.$logger().$warn("" + "image to embed not found or not readable: " + (image_path)); - return "" + "data:" + (mimetype) + ";base64,"; - }; - }, $AbstractNode_generate_data_uri$28.$$arity = -2); - - Opal.def(self, '$generate_data_uri_from_uri', $AbstractNode_generate_data_uri_from_uri$29 = function $$generate_data_uri_from_uri(image_uri, cache_uri) { - var $a, $b, $$30, self = this, mimetype = nil, bindata = nil; - - - - if (cache_uri == null) { - cache_uri = false; - }; - if ($truthy(cache_uri)) { - $$($nesting, 'Helpers').$require_library("open-uri/cached", "open-uri-cached") - } else if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL')['$!']())) { - $$$('::', 'OpenURI')}; - - try { - - $b = $send($$$('::', 'OpenURI'), 'open_uri', [image_uri, $$($nesting, 'URI_READ_MODE')], ($$30 = function(f){var self = $$30.$$s || this; - - - - if (f == null) { - f = nil; - }; - return [f.$content_type(), f.$read()];}, $$30.$$s = self, $$30.$$arity = 1, $$30)), $a = Opal.to_ary($b), (mimetype = ($a[0] == null ? nil : $a[0])), (bindata = ($a[1] == null ? nil : $a[1])), $b; - return "" + "data:" + (mimetype) + ";base64," + ($$$('::', 'Base64').$strict_encode64(bindata)); - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - - self.$logger().$warn("" + "could not retrieve image data from URI: " + (image_uri)); - return image_uri; - } finally { Opal.pop_exception() } - } else { throw $err; } - };; - }, $AbstractNode_generate_data_uri_from_uri$29.$$arity = -2); - - Opal.def(self, '$normalize_asset_path', $AbstractNode_normalize_asset_path$31 = function $$normalize_asset_path(asset_ref, asset_name, autocorrect) { - var self = this; - - - - if (asset_name == null) { - asset_name = "path"; - }; - - if (autocorrect == null) { - autocorrect = true; - }; - return self.$normalize_system_path(asset_ref, self.document.$base_dir(), nil, $hash2(["target_name", "recover"], {"target_name": asset_name, "recover": autocorrect})); - }, $AbstractNode_normalize_asset_path$31.$$arity = -2); - - Opal.def(self, '$normalize_system_path', $AbstractNode_normalize_system_path$32 = function $$normalize_system_path(target, start, jail, opts) { - var self = this, doc = nil; - - - - if (start == null) { - start = nil; - }; - - if (jail == null) { - jail = nil; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy($rb_lt((doc = self.document).$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) { - if ($truthy(start)) { - if ($truthy(doc.$path_resolver()['$root?'](start))) { - } else { - start = $$$('::', 'File').$join(doc.$base_dir(), start) - } - } else { - start = doc.$base_dir() - } - } else { - - if ($truthy(start)) { - } else { - start = doc.$base_dir() - }; - if ($truthy(jail)) { - } else { - jail = doc.$base_dir() - }; - }; - return doc.$path_resolver().$system_path(target, start, jail, opts); - }, $AbstractNode_normalize_system_path$32.$$arity = -2); - - Opal.def(self, '$normalize_web_path', $AbstractNode_normalize_web_path$33 = function $$normalize_web_path(target, start, preserve_uri_target) { - var $a, self = this; - - - - if (start == null) { - start = nil; - }; - - if (preserve_uri_target == null) { - preserve_uri_target = true; - }; - if ($truthy(($truthy($a = preserve_uri_target) ? $$($nesting, 'Helpers')['$uriish?'](target) : $a))) { - return $$($nesting, 'Helpers').$encode_spaces_in_uri(target) - } else { - return self.document.$path_resolver().$web_path(target, start) - }; - }, $AbstractNode_normalize_web_path$33.$$arity = -2); - - Opal.def(self, '$read_asset', $AbstractNode_read_asset$34 = function $$read_asset(path, opts) { - var $a, self = this; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy($$$('::', 'Hash')['$==='](opts))) { - } else { - opts = $hash2(["warn_on_failure"], {"warn_on_failure": opts['$!='](false)}) - }; - if ($truthy($$$('::', 'File')['$readable?'](path))) { - if ($truthy(opts['$[]']("normalize"))) { - - return $$($nesting, 'Helpers').$prepare_source_string($$$('::', 'File').$read(path, $hash2(["mode"], {"mode": $$($nesting, 'FILE_READ_MODE')}))).$join($$($nesting, 'LF')); - } else { - - return $$$('::', 'File').$read(path, $hash2(["mode"], {"mode": $$($nesting, 'FILE_READ_MODE')})); - } - } else if ($truthy(opts['$[]']("warn_on_failure"))) { - - self.$logger().$warn("" + (($truthy($a = self.$attr("docfile")) ? $a : "<stdin>")) + ": " + (($truthy($a = opts['$[]']("label")) ? $a : "file")) + " does not exist or cannot be read: " + (path)); - return nil; - } else { - return nil - }; - }, $AbstractNode_read_asset$34.$$arity = -2); - - Opal.def(self, '$read_contents', $AbstractNode_read_contents$35 = function $$read_contents(target, opts) { - var $a, $b, $c, $$36, $$37, self = this, doc = nil, start = nil, contents = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - doc = self.document; - if ($truthy(($truthy($a = $$($nesting, 'Helpers')['$uriish?'](target)) ? $a : ($truthy($b = ($truthy($c = (start = opts['$[]']("start"))) ? $$($nesting, 'Helpers')['$uriish?'](start) : $c)) ? (target = doc.$path_resolver().$web_path(target, start)) : $b)))) { - if ($truthy(doc['$attr?']("allow-uri-read"))) { - - if ($truthy(doc['$attr?']("cache-uri"))) { - $$($nesting, 'Helpers').$require_library("open-uri/cached", "open-uri-cached")}; - - try { - if ($truthy(opts['$[]']("normalize"))) { - contents = $$($nesting, 'Helpers').$prepare_source_string($send($$$('::', 'OpenURI'), 'open_uri', [target, $$($nesting, 'URI_READ_MODE')], ($$36 = function(f){var self = $$36.$$s || this; - - - - if (f == null) { - f = nil; - }; - return f.$read();}, $$36.$$s = self, $$36.$$arity = 1, $$36))).$join($$($nesting, 'LF')) - } else { - contents = $send($$$('::', 'OpenURI'), 'open_uri', [target, $$($nesting, 'URI_READ_MODE')], ($$37 = function(f){var self = $$37.$$s || this; - - - - if (f == null) { - f = nil; - }; - return f.$read();}, $$37.$$s = self, $$37.$$arity = 1, $$37)) - } - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - if ($truthy(opts.$fetch("warn_on_failure", true))) { - self.$logger().$warn("" + "could not retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target))} - } finally { Opal.pop_exception() } - } else { throw $err; } - };; - } else if ($truthy(opts.$fetch("warn_on_failure", true))) { - self.$logger().$warn("" + "cannot retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target) + " (allow-uri-read attribute not enabled)")} - } else { - - target = self.$normalize_system_path(target, opts['$[]']("start"), nil, $hash2(["target_name"], {"target_name": ($truthy($a = opts['$[]']("label")) ? $a : "asset")})); - contents = self.$read_asset(target, $hash2(["normalize", "warn_on_failure", "label"], {"normalize": opts['$[]']("normalize"), "warn_on_failure": opts.$fetch("warn_on_failure", true), "label": opts['$[]']("label")})); - }; - if ($truthy(($truthy($a = ($truthy($b = contents) ? opts['$[]']("warn_if_empty") : $b)) ? contents['$empty?']() : $a))) { - self.$logger().$warn("" + "contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " is empty: " + (target))}; - return contents; - }, $AbstractNode_read_contents$35.$$arity = -2); - return (Opal.def(self, '$is_uri?', $AbstractNode_is_uri$ques$38 = function(str) { - var self = this; - - return $$($nesting, 'Helpers')['$uriish?'](str) - }, $AbstractNode_is_uri$ques$38.$$arity = 1), nil) && 'is_uri?'; - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/abstract_block"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy; - - Opal.add_stubs(['$attr_reader', '$attr_writer', '$attr_accessor', '$==', '$===', '$level', '$file', '$lineno', '$playback_attributes', '$convert', '$converter', '$join', '$map', '$to_s', '$parent', '$parent=', '$-', '$<<', '$empty?', '$>', '$Integer', '$find_by_internal', '$to_proc', '$context', '$[]', '$items', '$+', '$find_index', '$include?', '$next_adjacent_block', '$blocks', '$select', '$sub_specialchars', '$match?', '$sub_replacements', '$title', '$apply_title_subs', '$delete', '$reftext', '$!', '$nil_or_empty?', '$sub_placeholder', '$sub_quotes', '$compat_mode', '$attributes', '$chomp', '$increment_and_store_counter', '$index=', '$numbered', '$sectname', '$counter', '$numeral=', '$numeral', '$caption=', '$int_to_roman', '$each', '$assign_numeral', '$reindex_sections', '$protected', '$has_role?', '$raise', '$header?', '$!=', '$flatten', '$head', '$rows', '$merge', '$body', '$foot', '$style', '$inner_document']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'AbstractBlock'); - - var $nesting = [self].concat($parent_nesting), $AbstractBlock_initialize$1, $AbstractBlock_block$ques$2, $AbstractBlock_inline$ques$3, $AbstractBlock_file$4, $AbstractBlock_lineno$5, $AbstractBlock_convert$6, $AbstractBlock_content$7, $AbstractBlock_context$eq$9, $AbstractBlock_$lt$lt$10, $AbstractBlock_blocks$ques$11, $AbstractBlock_sections$ques$12, $AbstractBlock_number$13, $AbstractBlock_number$eq$14, $AbstractBlock_find_by$15, $AbstractBlock_next_adjacent_block$16, $AbstractBlock_sections$18, $AbstractBlock_alt$20, $AbstractBlock_caption$21, $AbstractBlock_captioned_title$22, $AbstractBlock_list_marker_keyword$23, $AbstractBlock_title$24, $AbstractBlock_title$ques$25, $AbstractBlock_title$eq$26, $AbstractBlock_sub$ques$27, $AbstractBlock_remove_sub$28, $AbstractBlock_xreftext$29, $AbstractBlock_assign_caption$30, $AbstractBlock_assign_numeral$31, $AbstractBlock_reindex_sections$32, $AbstractBlock_find_by_internal$34; - - self.$$prototype.source_location = self.$$prototype.document = self.$$prototype.attributes = self.$$prototype.blocks = self.$$prototype.next_section_index = self.$$prototype.numeral = self.$$prototype.context = self.$$prototype.parent = self.$$prototype.caption = self.$$prototype.style = self.$$prototype.converted_title = self.$$prototype.title = self.$$prototype.subs = self.$$prototype.next_section_ordinal = self.$$prototype.id = self.$$prototype.header = nil; - - self.$attr_reader("blocks"); - self.$attr_writer("caption"); - self.$attr_accessor("content_model"); - self.$attr_accessor("level"); - self.$attr_accessor("numeral"); - self.$attr_accessor("source_location"); - self.$attr_accessor("style"); - self.$attr_reader("subs"); - - Opal.def(self, '$initialize', $AbstractBlock_initialize$1 = function $$initialize(parent, context, opts) { - var $a, $iter = $AbstractBlock_initialize$1.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $AbstractBlock_initialize$1.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if (opts == null) { - opts = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $AbstractBlock_initialize$1, false), $zuper, $iter); - self.content_model = "compound"; - self.blocks = []; - self.subs = []; - self.id = (self.title = (self.caption = (self.numeral = (self.style = (self.default_subs = (self.source_location = nil)))))); - if ($truthy(($truthy($a = context['$==']("document")) ? $a : context['$==']("section")))) { - - self.level = (self.next_section_index = 0); - return (self.next_section_ordinal = 1); - } else if ($truthy($$($nesting, 'AbstractBlock')['$==='](parent))) { - return (self.level = parent.$level()) - } else { - return (self.level = nil) - }; - }, $AbstractBlock_initialize$1.$$arity = -3); - - Opal.def(self, '$block?', $AbstractBlock_block$ques$2 = function() { - var self = this; - - return true - }, $AbstractBlock_block$ques$2.$$arity = 0); - - Opal.def(self, '$inline?', $AbstractBlock_inline$ques$3 = function() { - var self = this; - - return false - }, $AbstractBlock_inline$ques$3.$$arity = 0); - - Opal.def(self, '$file', $AbstractBlock_file$4 = function $$file() { - var $a, self = this; - - return ($truthy($a = self.source_location) ? self.source_location.$file() : $a) - }, $AbstractBlock_file$4.$$arity = 0); - - Opal.def(self, '$lineno', $AbstractBlock_lineno$5 = function $$lineno() { - var $a, self = this; - - return ($truthy($a = self.source_location) ? self.source_location.$lineno() : $a) - }, $AbstractBlock_lineno$5.$$arity = 0); - - Opal.def(self, '$convert', $AbstractBlock_convert$6 = function $$convert() { - var self = this; - - - self.document.$playback_attributes(self.attributes); - return self.$converter().$convert(self); - }, $AbstractBlock_convert$6.$$arity = 0); - Opal.alias(self, "render", "convert"); - - Opal.def(self, '$content', $AbstractBlock_content$7 = function $$content() { - var $$8, self = this; - - return $send(self.blocks, 'map', [], ($$8 = function(b){var self = $$8.$$s || this; - - - - if (b == null) { - b = nil; - }; - return b.$convert();}, $$8.$$s = self, $$8.$$arity = 1, $$8)).$join($$($nesting, 'LF')) - }, $AbstractBlock_content$7.$$arity = 0); - - Opal.def(self, '$context=', $AbstractBlock_context$eq$9 = function(context) { - var self = this; - - return (self.node_name = (self.context = context).$to_s()) - }, $AbstractBlock_context$eq$9.$$arity = 1); - - Opal.def(self, '$<<', $AbstractBlock_$lt$lt$10 = function(block) { - var self = this, $writer = nil; - - - if (block.$parent()['$=='](self)) { - } else { - - $writer = [self]; - $send(block, 'parent=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - self.blocks['$<<'](block); - return self; - }, $AbstractBlock_$lt$lt$10.$$arity = 1); - Opal.alias(self, "append", "<<"); - - Opal.def(self, '$blocks?', $AbstractBlock_blocks$ques$11 = function() { - var self = this; - - if ($truthy(self.blocks['$empty?']())) { - return false - } else { - return true - } - }, $AbstractBlock_blocks$ques$11.$$arity = 0); - - Opal.def(self, '$sections?', $AbstractBlock_sections$ques$12 = function() { - var self = this; - - return $rb_gt(self.next_section_index, 0) - }, $AbstractBlock_sections$ques$12.$$arity = 0); - - Opal.def(self, '$number', $AbstractBlock_number$13 = function $$number() { - var self = this; - - try { - - return self.$Integer(self.numeral); - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return self.numeral - } finally { Opal.pop_exception() } - } else { throw $err; } - } - }, $AbstractBlock_number$13.$$arity = 0); - - Opal.def(self, '$number=', $AbstractBlock_number$eq$14 = function(val) { - var self = this; - - return (self.numeral = val.$to_s()) - }, $AbstractBlock_number$eq$14.$$arity = 1); - - Opal.def(self, '$find_by', $AbstractBlock_find_by$15 = function $$find_by(selector) { - var $iter = $AbstractBlock_find_by$15.$$p, block = $iter || nil, self = this, result = nil; - - if ($iter) $AbstractBlock_find_by$15.$$p = null; - - - if ($iter) $AbstractBlock_find_by$15.$$p = null;; - - if (selector == null) { - selector = $hash2([], {}); - }; - try { - return $send(self, 'find_by_internal', [selector, (result = [])], block.$to_proc()) - } catch ($err) { - if (Opal.rescue($err, [$$$('::', 'StopIteration')])) { - try { - return result - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - }, $AbstractBlock_find_by$15.$$arity = -1); - Opal.alias(self, "query", "find_by"); - - Opal.def(self, '$next_adjacent_block', $AbstractBlock_next_adjacent_block$16 = function $$next_adjacent_block() { - var $a, $$17, self = this, p = nil, sib = nil; - - if (self.context['$==']("document")) { - return nil - } else if ($truthy((($a = (p = self.parent).$context()['$==']("dlist")) ? self.context['$==']("list_item") : (p = self.parent).$context()['$==']("dlist")))) { - if ($truthy((sib = p.$items()['$[]']($rb_plus($send(p.$items(), 'find_index', [], ($$17 = function(terms, desc){var self = $$17.$$s || this, $b; - - - - if (terms == null) { - terms = nil; - }; - - if (desc == null) { - desc = nil; - }; - return ($truthy($b = terms['$include?'](self)) ? $b : desc['$=='](self));}, $$17.$$s = self, $$17.$$arity = 2, $$17)), 1))))) { - return sib - } else { - return p.$next_adjacent_block() - } - } else if ($truthy((sib = p.$blocks()['$[]']($rb_plus(p.$blocks().$find_index(self), 1))))) { - return sib - } else { - return p.$next_adjacent_block() - } - }, $AbstractBlock_next_adjacent_block$16.$$arity = 0); - - Opal.def(self, '$sections', $AbstractBlock_sections$18 = function $$sections() { - var $$19, self = this; - - return $send(self.blocks, 'select', [], ($$19 = function(block){var self = $$19.$$s || this; - - - - if (block == null) { - block = nil; - }; - return block.$context()['$==']("section");}, $$19.$$s = self, $$19.$$arity = 1, $$19)) - }, $AbstractBlock_sections$18.$$arity = 0); - - Opal.def(self, '$alt', $AbstractBlock_alt$20 = function $$alt() { - var self = this, text = nil; - - if ($truthy((text = self.attributes['$[]']("alt")))) { - if (text['$=='](self.attributes['$[]']("default-alt"))) { - return self.$sub_specialchars(text) - } else { - - text = self.$sub_specialchars(text); - if ($truthy($$($nesting, 'ReplaceableTextRx')['$match?'](text))) { - - return self.$sub_replacements(text); - } else { - return text - }; - } - } else { - return "" - } - }, $AbstractBlock_alt$20.$$arity = 0); - - Opal.def(self, '$caption', $AbstractBlock_caption$21 = function $$caption() { - var self = this; - - if (self.context['$==']("admonition")) { - return self.attributes['$[]']("textlabel") - } else { - return self.caption - } - }, $AbstractBlock_caption$21.$$arity = 0); - - Opal.def(self, '$captioned_title', $AbstractBlock_captioned_title$22 = function $$captioned_title() { - var self = this; - - return "" + (self.caption) + (self.$title()) - }, $AbstractBlock_captioned_title$22.$$arity = 0); - - Opal.def(self, '$list_marker_keyword', $AbstractBlock_list_marker_keyword$23 = function $$list_marker_keyword(list_type) { - var $a, self = this; - - - - if (list_type == null) { - list_type = nil; - }; - return $$($nesting, 'ORDERED_LIST_KEYWORDS')['$[]'](($truthy($a = list_type) ? $a : self.style)); - }, $AbstractBlock_list_marker_keyword$23.$$arity = -1); - - Opal.def(self, '$title', $AbstractBlock_title$24 = function $$title() { - var $a, $b, self = this; - - return (self.converted_title = ($truthy($a = self.converted_title) ? $a : ($truthy($b = self.title) ? self.$apply_title_subs(self.title) : $b))) - }, $AbstractBlock_title$24.$$arity = 0); - - Opal.def(self, '$title?', $AbstractBlock_title$ques$25 = function() { - var self = this; - - if ($truthy(self.title)) { - return true - } else { - return false - } - }, $AbstractBlock_title$ques$25.$$arity = 0); - - Opal.def(self, '$title=', $AbstractBlock_title$eq$26 = function(val) { - var self = this; - - - self.converted_title = nil; - return (self.title = val); - }, $AbstractBlock_title$eq$26.$$arity = 1); - - Opal.def(self, '$sub?', $AbstractBlock_sub$ques$27 = function(name) { - var self = this; - - return self.subs['$include?'](name) - }, $AbstractBlock_sub$ques$27.$$arity = 1); - - Opal.def(self, '$remove_sub', $AbstractBlock_remove_sub$28 = function $$remove_sub(sub) { - var self = this; - - - self.subs.$delete(sub); - return nil; - }, $AbstractBlock_remove_sub$28.$$arity = 1); - - Opal.def(self, '$xreftext', $AbstractBlock_xreftext$29 = function $$xreftext(xrefstyle) { - var $a, $b, self = this, val = nil, $case = nil, quoted_title = nil, caption_attr_name = nil, prefix = nil; - - - - if (xrefstyle == null) { - xrefstyle = nil; - }; - if ($truthy(($truthy($a = (val = self.$reftext())) ? val['$empty?']()['$!']() : $a))) { - return val - } else if ($truthy(($truthy($a = ($truthy($b = xrefstyle) ? self.title : $b)) ? self.caption['$nil_or_empty?']()['$!']() : $a))) { - return (function() {$case = xrefstyle; - if ("full"['$===']($case)) { - quoted_title = self.$sub_placeholder(self.$sub_quotes((function() {if ($truthy(self.document.$compat_mode())) { - return "``%s''" - } else { - return "\"`%s`\"" - }; return nil; })()), self.$title()); - if ($truthy(($truthy($a = ($truthy($b = self.numeral) ? (caption_attr_name = $$($nesting, 'CAPTION_ATTRIBUTE_NAMES')['$[]'](self.context)) : $b)) ? (prefix = self.document.$attributes()['$[]'](caption_attr_name)) : $a))) { - return "" + (prefix) + " " + (self.numeral) + ", " + (quoted_title) - } else { - return "" + (self.caption.$chomp(". ")) + ", " + (quoted_title) - };} - else if ("short"['$===']($case)) {if ($truthy(($truthy($a = ($truthy($b = self.numeral) ? (caption_attr_name = $$($nesting, 'CAPTION_ATTRIBUTE_NAMES')['$[]'](self.context)) : $b)) ? (prefix = self.document.$attributes()['$[]'](caption_attr_name)) : $a))) { - return "" + (prefix) + " " + (self.numeral) - } else { - return self.caption.$chomp(". ") - }} - else {return self.$title()}})() - } else { - return self.$title() - }; - }, $AbstractBlock_xreftext$29.$$arity = -1); - - Opal.def(self, '$assign_caption', $AbstractBlock_assign_caption$30 = function $$assign_caption(value, caption_context) { - var $a, $b, self = this, attr_name = nil, prefix = nil; - - - - if (caption_context == null) { - caption_context = self.context; - }; - if ($truthy(($truthy($a = ($truthy($b = self.caption) ? $b : self.title['$!']())) ? $a : (self.caption = ($truthy($b = value) ? $b : self.document.$attributes()['$[]']("caption")))))) { - return nil - } else if ($truthy(($truthy($a = (attr_name = $$($nesting, 'CAPTION_ATTRIBUTE_NAMES')['$[]'](caption_context))) ? (prefix = self.document.$attributes()['$[]'](attr_name)) : $a))) { - - self.caption = "" + (prefix) + " " + ((self.numeral = self.document.$increment_and_store_counter("" + (caption_context) + "-number", self))) + ". "; - return nil; - } else { - return nil - }; - }, $AbstractBlock_assign_caption$30.$$arity = -2); - - Opal.def(self, '$assign_numeral', $AbstractBlock_assign_numeral$31 = function $$assign_numeral(section) { - var $a, self = this, $writer = nil, like = nil, sectname = nil, caption = nil; - - - self.next_section_index = $rb_plus((($writer = [self.next_section_index]), $send(section, 'index=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]), 1); - if ($truthy((like = section.$numbered()))) { - if ((sectname = section.$sectname())['$==']("appendix")) { - - - $writer = [self.document.$counter("appendix-number", "A")]; - $send(section, 'numeral=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [(function() {if ($truthy((caption = self.document.$attributes()['$[]']("appendix-caption")))) { - return "" + (caption) + " " + (section.$numeral()) + ": " - } else { - return "" + (section.$numeral()) + ". " - }; return nil; })()]; - $send(section, 'caption=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else if ($truthy(($truthy($a = sectname['$==']("chapter")) ? $a : like['$==']("chapter")))) { - - $writer = [self.document.$counter("chapter-number", 1).$to_s()]; - $send(section, 'numeral=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - - $writer = [(function() {if (sectname['$==']("part")) { - - return $$($nesting, 'Helpers').$int_to_roman(self.next_section_ordinal); - } else { - return self.next_section_ordinal.$to_s() - }; return nil; })()]; - $send(section, 'numeral=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - self.next_section_ordinal = $rb_plus(self.next_section_ordinal, 1); - }}; - return nil; - }, $AbstractBlock_assign_numeral$31.$$arity = 1); - - Opal.def(self, '$reindex_sections', $AbstractBlock_reindex_sections$32 = function $$reindex_sections() { - var $$33, self = this; - - - self.next_section_index = 0; - self.next_section_ordinal = 1; - return $send(self.blocks, 'each', [], ($$33 = function(block){var self = $$33.$$s || this; - - - - if (block == null) { - block = nil; - }; - if (block.$context()['$==']("section")) { - - self.$assign_numeral(block); - return block.$reindex_sections(); - } else { - return nil - };}, $$33.$$s = self, $$33.$$arity = 1, $$33)); - }, $AbstractBlock_reindex_sections$32.$$arity = 0); - self.$protected(); - return (Opal.def(self, '$find_by_internal', $AbstractBlock_find_by_internal$34 = function $$find_by_internal(selector, result) { - var $iter = $AbstractBlock_find_by_internal$34.$$p, block = $iter || nil, $a, $b, $c, $d, $$35, $$36, $$37, $$39, $$41, $$43, self = this, any_context = nil, context_selector = nil, style_selector = nil, role_selector = nil, id_selector = nil, verdict = nil, $case = nil; - - if ($iter) $AbstractBlock_find_by_internal$34.$$p = null; - - - if ($iter) $AbstractBlock_find_by_internal$34.$$p = null;; - - if (selector == null) { - selector = $hash2([], {}); - }; - - if (result == null) { - result = []; - }; - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = ($truthy($d = (any_context = (function() {if ($truthy((context_selector = selector['$[]']("context")))) { - return nil - } else { - return true - }; return nil; })())) ? $d : context_selector['$=='](self.context))) ? ($truthy($d = (style_selector = selector['$[]']("style"))['$!']()) ? $d : style_selector['$=='](self.style)) : $c)) ? ($truthy($c = (role_selector = selector['$[]']("role"))['$!']()) ? $c : self['$has_role?'](role_selector)) : $b)) ? ($truthy($b = (id_selector = selector['$[]']("id"))['$!']()) ? $b : id_selector['$=='](self.id)) : $a))) { - if ((block !== nil)) { - if ($truthy((verdict = Opal.yield1(block, self)))) { - $case = verdict; - if ("prune"['$===']($case)) { - result['$<<'](self); - if ($truthy(id_selector)) { - self.$raise($$$('::', 'StopIteration'))}; - return result;} - else if ("reject"['$===']($case)) { - if ($truthy(id_selector)) { - self.$raise($$$('::', 'StopIteration'))}; - return result;} - else if ("stop"['$===']($case)) {self.$raise($$$('::', 'StopIteration'))} - else { - result['$<<'](self); - if ($truthy(id_selector)) { - self.$raise($$$('::', 'StopIteration'))};} - } else if ($truthy(id_selector)) { - self.$raise($$$('::', 'StopIteration'))} - } else { - - result['$<<'](self); - if ($truthy(id_selector)) { - self.$raise($$$('::', 'StopIteration'))}; - }}; - $case = self.context; - if ("document"['$===']($case)) {if (context_selector['$==']("document")) { - } else { - - if ($truthy(($truthy($a = self['$header?']()) ? ($truthy($b = any_context) ? $b : context_selector['$==']("section")) : $a))) { - $send(self.header, 'find_by_internal', [selector, result], block.$to_proc())}; - $send(self.blocks, 'each', [], ($$35 = function(b){var self = $$35.$$s || this, $e; - - - - if (b == null) { - b = nil; - }; - if ($truthy((($e = context_selector['$==']("section")) ? b.$context()['$!=']("section") : context_selector['$==']("section")))) { - return nil;}; - return $send(b, 'find_by_internal', [selector, result], block.$to_proc());}, $$35.$$s = self, $$35.$$arity = 1, $$35)); - }} - else if ("dlist"['$===']($case)) {if ($truthy(($truthy($a = any_context) ? $a : context_selector['$!=']("section")))) { - $send(self.blocks.$flatten(), 'each', [], ($$36 = function(b){var self = $$36.$$s || this; - - - - if (b == null) { - b = nil; - }; - if ($truthy(b)) { - return $send(b, 'find_by_internal', [selector, result], block.$to_proc()) - } else { - return nil - };}, $$36.$$s = self, $$36.$$arity = 1, $$36))}} - else if ("table"['$===']($case)) {if ($truthy(selector['$[]']("traverse_documents"))) { - - $send(self.$rows().$head(), 'each', [], ($$37 = function(r){var self = $$37.$$s || this, $$38; - - - - if (r == null) { - r = nil; - }; - return $send(r, 'each', [], ($$38 = function(c){var self = $$38.$$s || this; - - - - if (c == null) { - c = nil; - }; - return $send(c, 'find_by_internal', [selector, result], block.$to_proc());}, $$38.$$s = self, $$38.$$arity = 1, $$38));}, $$37.$$s = self, $$37.$$arity = 1, $$37)); - if (context_selector['$==']("inner_document")) { - selector = selector.$merge($hash2(["context"], {"context": "document"}))}; - $send($rb_plus(self.$rows().$body(), self.$rows().$foot()), 'each', [], ($$39 = function(r){var self = $$39.$$s || this, $$40; - - - - if (r == null) { - r = nil; - }; - return $send(r, 'each', [], ($$40 = function(c){var self = $$40.$$s || this; - - - - if (c == null) { - c = nil; - }; - $send(c, 'find_by_internal', [selector, result], block.$to_proc()); - if (c.$style()['$==']("asciidoc")) { - return $send(c.$inner_document(), 'find_by_internal', [selector, result], block.$to_proc()) - } else { - return nil - };}, $$40.$$s = self, $$40.$$arity = 1, $$40));}, $$39.$$s = self, $$39.$$arity = 1, $$39)); - } else { - $send($rb_plus($rb_plus(self.$rows().$head(), self.$rows().$body()), self.$rows().$foot()), 'each', [], ($$41 = function(r){var self = $$41.$$s || this, $$42; - - - - if (r == null) { - r = nil; - }; - return $send(r, 'each', [], ($$42 = function(c){var self = $$42.$$s || this; - - - - if (c == null) { - c = nil; - }; - return $send(c, 'find_by_internal', [selector, result], block.$to_proc());}, $$42.$$s = self, $$42.$$arity = 1, $$42));}, $$41.$$s = self, $$41.$$arity = 1, $$41)) - }} - else {$send(self.blocks, 'each', [], ($$43 = function(b){var self = $$43.$$s || this, $e; - - - - if (b == null) { - b = nil; - }; - if ($truthy((($e = context_selector['$==']("section")) ? b.$context()['$!=']("section") : context_selector['$==']("section")))) { - return nil;}; - return $send(b, 'find_by_internal', [selector, result], block.$to_proc());}, $$43.$$s = self, $$43.$$arity = 1, $$43))}; - return result; - }, $AbstractBlock_find_by_internal$34.$$arity = -1), nil) && 'find_by_internal'; - })($nesting[0], $$($nesting, 'AbstractNode'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/attribute_list"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash = Opal.hash, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$new', '$[]', '$update', '$parse', '$parse_attribute', '$eos?', '$skip_delimiter', '$+', '$rekey', '$each_with_index', '$[]=', '$-', '$private', '$skip_blank', '$peek', '$===', '$parse_attribute_value', '$get_byte', '$start_with?', '$scan_name', '$end_with?', '$rstrip', '$string', '$==', '$unscan', '$scan_to_delimiter', '$*', '$include?', '$delete', '$each', '$split', '$empty?', '$apply_subs', '$scan_to_quote', '$gsub', '$skip', '$scan']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'AttributeList'); - - var $nesting = [self].concat($parent_nesting), $AttributeList_initialize$1, $AttributeList_parse_into$2, $AttributeList_parse$3, $AttributeList_rekey$4, $AttributeList_rekey$5, $AttributeList_parse_attribute$7, $AttributeList_parse_attribute_value$9, $AttributeList_skip_blank$10, $AttributeList_skip_delimiter$11, $AttributeList_scan_name$12, $AttributeList_scan_to_delimiter$13, $AttributeList_scan_to_quote$14; - - self.$$prototype.attributes = self.$$prototype.scanner = self.$$prototype.delimiter = self.$$prototype.block = self.$$prototype.delimiter_skip_pattern = self.$$prototype.delimiter_boundary_pattern = nil; - - Opal.const_set($nesting[0], 'APOS', "'"); - Opal.const_set($nesting[0], 'BACKSLASH', "\\"); - Opal.const_set($nesting[0], 'QUOT', "\""); - Opal.const_set($nesting[0], 'BoundaryRx', $hash($$($nesting, 'QUOT'), /.*?[^\\](?=")/, $$($nesting, 'APOS'), /.*?[^\\](?=')/, ",", /.*?(?=[ \t]*(,|$))/)); - Opal.const_set($nesting[0], 'EscapedQuotes', $hash($$($nesting, 'QUOT'), "\\\"", $$($nesting, 'APOS'), "\\'")); - Opal.const_set($nesting[0], 'NameRx', new RegExp("" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "\\-.]*")); - Opal.const_set($nesting[0], 'BlankRx', /[ \t]+/); - Opal.const_set($nesting[0], 'SkipRx', $hash2([","], {",": /[ \t]*(,|$)/})); - - Opal.def(self, '$initialize', $AttributeList_initialize$1 = function $$initialize(source, block, delimiter) { - var self = this; - - - - if (block == null) { - block = nil; - }; - - if (delimiter == null) { - delimiter = ","; - }; - self.scanner = $$$('::', 'StringScanner').$new(source); - self.block = block; - self.delimiter = delimiter; - self.delimiter_skip_pattern = $$($nesting, 'SkipRx')['$[]'](delimiter); - self.delimiter_boundary_pattern = $$($nesting, 'BoundaryRx')['$[]'](delimiter); - return (self.attributes = nil); - }, $AttributeList_initialize$1.$$arity = -2); - - Opal.def(self, '$parse_into', $AttributeList_parse_into$2 = function $$parse_into(attributes, positional_attrs) { - var self = this; - - - - if (positional_attrs == null) { - positional_attrs = []; - }; - return attributes.$update(self.$parse(positional_attrs)); - }, $AttributeList_parse_into$2.$$arity = -2); - - Opal.def(self, '$parse', $AttributeList_parse$3 = function $$parse(positional_attrs) { - var $a, self = this, index = nil; - - - - if (positional_attrs == null) { - positional_attrs = []; - }; - if ($truthy(self.attributes)) { - return self.attributes}; - self.attributes = $hash2([], {}); - index = 0; - while ($truthy(self.$parse_attribute(index, positional_attrs))) { - - if ($truthy(self.scanner['$eos?']())) { - break;}; - self.$skip_delimiter(); - index = $rb_plus(index, 1); - }; - return self.attributes; - }, $AttributeList_parse$3.$$arity = -1); - - Opal.def(self, '$rekey', $AttributeList_rekey$4 = function $$rekey(positional_attrs) { - var self = this; - - return $$($nesting, 'AttributeList').$rekey(self.attributes, positional_attrs) - }, $AttributeList_rekey$4.$$arity = 1); - Opal.defs(self, '$rekey', $AttributeList_rekey$5 = function $$rekey(attributes, positional_attrs) { - var $$6, self = this; - - - $send(positional_attrs, 'each_with_index', [], ($$6 = function(key, index){var self = $$6.$$s || this, $a, val = nil, $writer = nil; - - - - if (key == null) { - key = nil; - }; - - if (index == null) { - index = nil; - }; - if ($truthy(($truthy($a = key) ? (val = attributes['$[]']($rb_plus(index, 1))) : $a))) { - - $writer = [key, val]; - $send(attributes, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - return nil - };}, $$6.$$s = self, $$6.$$arity = 2, $$6)); - return attributes; - }, $AttributeList_rekey$5.$$arity = 2); - self.$private(); - - Opal.def(self, '$parse_attribute', $AttributeList_parse_attribute$7 = function $$parse_attribute(index, positional_attrs) { - var $a, $b, $$8, self = this, continue$ = nil, $case = nil, name = nil, single_quoted = nil, skipped = nil, c = nil, value = nil, $writer = nil, positional_attr_name = nil; - - - continue$ = true; - self.$skip_blank(); - $case = self.scanner.$peek(1); - if ($$($nesting, 'QUOT')['$===']($case)) {name = self.$parse_attribute_value(self.scanner.$get_byte())} - else if ($$($nesting, 'APOS')['$===']($case)) { - name = self.$parse_attribute_value(self.scanner.$get_byte()); - if ($truthy(name['$start_with?']($$($nesting, 'APOS')))) { - } else { - single_quoted = true - };} - else { - skipped = ($truthy($a = ($truthy($b = (name = self.$scan_name())) ? self.$skip_blank() : $b)) ? $a : 0); - if ($truthy(self.scanner['$eos?']())) { - - if ($truthy(($truthy($a = name) ? $a : self.scanner.$string().$rstrip()['$end_with?'](self.delimiter)))) { - } else { - return nil - }; - continue$ = nil; - } else if ((c = self.scanner.$get_byte())['$=='](self.delimiter)) { - self.scanner.$unscan() - } else if ($truthy(name)) { - if (c['$==']("=")) { - - self.$skip_blank(); - $case = (c = self.scanner.$get_byte()); - if ($$($nesting, 'QUOT')['$===']($case)) {value = self.$parse_attribute_value(c)} - else if ($$($nesting, 'APOS')['$===']($case)) { - value = self.$parse_attribute_value(c); - if ($truthy(value['$start_with?']($$($nesting, 'APOS')))) { - } else { - single_quoted = true - };} - else if (self.delimiter['$===']($case)) { - value = ""; - self.scanner.$unscan();} - else if (nil['$===']($case)) {value = ""} - else { - value = "" + (c) + (self.$scan_to_delimiter()); - if (value['$==']("None")) { - return true};}; - } else { - name = "" + (name) + ($rb_times(" ", skipped)) + (c) + (self.$scan_to_delimiter()) - } - } else { - name = "" + (c) + (self.$scan_to_delimiter()) - };}; - if ($truthy(value)) { - $case = name; - if ("options"['$===']($case) || "opts"['$===']($case)) {if ($truthy(value['$include?'](","))) { - - if ($truthy(value['$include?'](" "))) { - value = value.$delete(" ")}; - $send(value.$split(","), 'each', [], ($$8 = function(opt){var self = $$8.$$s || this, $writer = nil; - if (self.attributes == null) self.attributes = nil; - - - - if (opt == null) { - opt = nil; - }; - if ($truthy(opt['$empty?']())) { - return nil - } else { - - $writer = ["" + (opt) + "-option", ""]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - };}, $$8.$$s = self, $$8.$$arity = 1, $$8)); - } else if ($truthy(value['$empty?']())) { - } else { - - $writer = ["" + (value) + "-option", ""]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }} - else {if ($truthy(($truthy($a = single_quoted) ? self.block : $a))) { - $case = name; - if ("title"['$===']($case) || "reftext"['$===']($case)) { - $writer = [name, value]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - else { - $writer = [name, self.block.$apply_subs(value)]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - } else { - - $writer = [name, value]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }} - } else { - - if ($truthy(($truthy($a = single_quoted) ? self.block : $a))) { - name = self.block.$apply_subs(name)}; - if ($truthy(($truthy($a = (positional_attr_name = positional_attrs['$[]'](index))) ? name : $a))) { - - $writer = [positional_attr_name, name]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - - $writer = [$rb_plus(index, 1), name]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }; - return continue$; - }, $AttributeList_parse_attribute$7.$$arity = 2); - - Opal.def(self, '$parse_attribute_value', $AttributeList_parse_attribute_value$9 = function $$parse_attribute_value(quote) { - var self = this, value = nil; - - if (self.scanner.$peek(1)['$=='](quote)) { - - self.scanner.$get_byte(); - return ""; - } else if ($truthy((value = self.$scan_to_quote(quote)))) { - - self.scanner.$get_byte(); - if ($truthy(value['$include?']($$($nesting, 'BACKSLASH')))) { - - return value.$gsub($$($nesting, 'EscapedQuotes')['$[]'](quote), quote); - } else { - return value - }; - } else { - return "" + (quote) + (self.$scan_to_delimiter()) - } - }, $AttributeList_parse_attribute_value$9.$$arity = 1); - - Opal.def(self, '$skip_blank', $AttributeList_skip_blank$10 = function $$skip_blank() { - var self = this; - - return self.scanner.$skip($$($nesting, 'BlankRx')) - }, $AttributeList_skip_blank$10.$$arity = 0); - - Opal.def(self, '$skip_delimiter', $AttributeList_skip_delimiter$11 = function $$skip_delimiter() { - var self = this; - - return self.scanner.$skip(self.delimiter_skip_pattern) - }, $AttributeList_skip_delimiter$11.$$arity = 0); - - Opal.def(self, '$scan_name', $AttributeList_scan_name$12 = function $$scan_name() { - var self = this; - - return self.scanner.$scan($$($nesting, 'NameRx')) - }, $AttributeList_scan_name$12.$$arity = 0); - - Opal.def(self, '$scan_to_delimiter', $AttributeList_scan_to_delimiter$13 = function $$scan_to_delimiter() { - var self = this; - - return self.scanner.$scan(self.delimiter_boundary_pattern) - }, $AttributeList_scan_to_delimiter$13.$$arity = 0); - return (Opal.def(self, '$scan_to_quote', $AttributeList_scan_to_quote$14 = function $$scan_to_quote(quote) { - var self = this; - - return self.scanner.$scan($$($nesting, 'BoundaryRx')['$[]'](quote)) - }, $AttributeList_scan_to_quote$14.$$arity = 1), nil) && 'scan_to_quote'; - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/block"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy; - - Opal.add_stubs(['$default=', '$-', '$attr_accessor', '$[]', '$key?', '$==', '$===', '$drop', '$delete', '$[]=', '$commit_subs', '$nil_or_empty?', '$prepare_source_string', '$apply_subs', '$join', '$<', '$size', '$empty?', '$rstrip', '$shift', '$pop', '$warn', '$logger', '$to_s', '$class', '$object_id', '$inspect']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Block'); - - var $nesting = [self].concat($parent_nesting), $Block_initialize$1, $Block_content$2, $Block_source$3, $Block_to_s$4, $writer = nil; - - self.$$prototype.attributes = self.$$prototype.content_model = self.$$prototype.lines = self.$$prototype.subs = self.$$prototype.blocks = self.$$prototype.context = self.$$prototype.style = nil; - - - $writer = ["simple"]; - $send(Opal.const_set($nesting[0], 'DEFAULT_CONTENT_MODEL', $hash2(["audio", "image", "listing", "literal", "stem", "open", "page_break", "pass", "thematic_break", "video"], {"audio": "empty", "image": "empty", "listing": "verbatim", "literal": "verbatim", "stem": "raw", "open": "compound", "page_break": "empty", "pass": "raw", "thematic_break": "empty", "video": "empty"})), 'default=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - Opal.alias(self, "blockname", "context"); - self.$attr_accessor("lines"); - - Opal.def(self, '$initialize', $Block_initialize$1 = function $$initialize(parent, context, opts) { - var $a, $iter = $Block_initialize$1.$$p, $yield = $iter || nil, self = this, subs = nil, $writer = nil, raw_source = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Block_initialize$1.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if (opts == null) { - opts = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $Block_initialize$1, false), $zuper, $iter); - self.content_model = ($truthy($a = opts['$[]']("content_model")) ? $a : $$($nesting, 'DEFAULT_CONTENT_MODEL')['$[]'](context)); - if ($truthy(opts['$key?']("subs"))) { - if ($truthy((subs = opts['$[]']("subs")))) { - - if (subs['$==']("default")) { - self.default_subs = opts['$[]']("default_subs") - } else if ($truthy($$$('::', 'Array')['$==='](subs))) { - - self.default_subs = subs.$drop(0); - self.attributes.$delete("subs"); - } else { - - self.default_subs = nil; - - $writer = ["subs", "" + (subs)]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }; - self.$commit_subs(); - } else { - - self.default_subs = []; - self.attributes.$delete("subs"); - } - } else { - self.default_subs = nil - }; - if ($truthy((raw_source = opts['$[]']("source"))['$nil_or_empty?']())) { - return (self.lines = []) - } else if ($truthy($$$('::', 'String')['$==='](raw_source))) { - return (self.lines = $$($nesting, 'Helpers').$prepare_source_string(raw_source)) - } else { - return (self.lines = raw_source.$drop(0)) - }; - }, $Block_initialize$1.$$arity = -3); - - Opal.def(self, '$content', $Block_content$2 = function $$content() { - var $a, $b, $iter = $Block_content$2.$$p, $yield = $iter || nil, self = this, $case = nil, result = nil, first = nil, last = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Block_content$2.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - return (function() {$case = self.content_model; - if ("compound"['$===']($case)) {return $send(self, Opal.find_super_dispatcher(self, 'content', $Block_content$2, false), $zuper, $iter)} - else if ("simple"['$===']($case)) {return self.$apply_subs(self.lines.$join($$($nesting, 'LF')), self.subs)} - else if ("verbatim"['$===']($case) || "raw"['$===']($case)) { - result = self.$apply_subs(self.lines, self.subs); - if ($truthy($rb_lt(result.$size(), 2))) { - return result['$[]'](0) - } else { - - while ($truthy(($truthy($b = (first = result['$[]'](0))) ? first.$rstrip()['$empty?']() : $b))) { - result.$shift() - }; - while ($truthy(($truthy($b = (last = result['$[]'](-1))) ? last.$rstrip()['$empty?']() : $b))) { - result.$pop() - }; - return result.$join($$($nesting, 'LF')); - };} - else { - if (self.content_model['$==']("empty")) { - } else { - self.$logger().$warn("" + "Unknown content model '" + (self.content_model) + "' for block: " + (self.$to_s())) - }; - return nil;}})() - }, $Block_content$2.$$arity = 0); - - Opal.def(self, '$source', $Block_source$3 = function $$source() { - var self = this; - - return self.lines.$join($$($nesting, 'LF')) - }, $Block_source$3.$$arity = 0); - return (Opal.def(self, '$to_s', $Block_to_s$4 = function $$to_s() { - var self = this, content_summary = nil; - - - content_summary = (function() {if (self.content_model['$==']("compound")) { - return "" + "blocks: " + (self.blocks.$size()) - } else { - return "" + "lines: " + (self.lines.$size()) - }; return nil; })(); - return "" + "#<" + (self.$class()) + "@" + (self.$object_id()) + " {context: " + (self.context.$inspect()) + ", content_model: " + (self.content_model.$inspect()) + ", style: " + (self.style.$inspect()) + ", " + (content_summary) + "}>"; - }, $Block_to_s$4.$$arity = 0), nil) && 'to_s'; - })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/callouts"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_le(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$next_list', '$<<', '$current_list', '$to_i', '$generate_next_callout_id', '$+', '$<=', '$size', '$[]', '$-', '$chop', '$join', '$map', '$==', '$<', '$private', '$generate_callout_id']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Callouts'); - - var $nesting = [self].concat($parent_nesting), $Callouts_initialize$1, $Callouts_register$2, $Callouts_read_next_id$3, $Callouts_callout_ids$4, $Callouts_current_list$6, $Callouts_next_list$7, $Callouts_rewind$8, $Callouts_generate_next_callout_id$9, $Callouts_generate_callout_id$10; - - self.$$prototype.co_index = self.$$prototype.lists = self.$$prototype.list_index = nil; - - - Opal.def(self, '$initialize', $Callouts_initialize$1 = function $$initialize() { - var self = this; - - - self.lists = []; - self.list_index = 0; - return self.$next_list(); - }, $Callouts_initialize$1.$$arity = 0); - - Opal.def(self, '$register', $Callouts_register$2 = function $$register(li_ordinal) { - var self = this, id = nil; - - - self.$current_list()['$<<']($hash2(["ordinal", "id"], {"ordinal": li_ordinal.$to_i(), "id": (id = self.$generate_next_callout_id())})); - self.co_index = $rb_plus(self.co_index, 1); - return id; - }, $Callouts_register$2.$$arity = 1); - - Opal.def(self, '$read_next_id', $Callouts_read_next_id$3 = function $$read_next_id() { - var self = this, id = nil, list = nil; - - - id = nil; - list = self.$current_list(); - if ($truthy($rb_le(self.co_index, list.$size()))) { - id = list['$[]']($rb_minus(self.co_index, 1))['$[]']("id")}; - self.co_index = $rb_plus(self.co_index, 1); - return id; - }, $Callouts_read_next_id$3.$$arity = 0); - - Opal.def(self, '$callout_ids', $Callouts_callout_ids$4 = function $$callout_ids(li_ordinal) { - var $$5, self = this; - - return $send(self.$current_list(), 'map', [], ($$5 = function(it){var self = $$5.$$s || this; - - - - if (it == null) { - it = nil; - }; - if (it['$[]']("ordinal")['$=='](li_ordinal)) { - return "" + (it['$[]']("id")) + " " - } else { - return "" - };}, $$5.$$s = self, $$5.$$arity = 1, $$5)).$join().$chop() - }, $Callouts_callout_ids$4.$$arity = 1); - - Opal.def(self, '$current_list', $Callouts_current_list$6 = function $$current_list() { - var self = this; - - return self.lists['$[]']($rb_minus(self.list_index, 1)) - }, $Callouts_current_list$6.$$arity = 0); - - Opal.def(self, '$next_list', $Callouts_next_list$7 = function $$next_list() { - var self = this; - - - self.list_index = $rb_plus(self.list_index, 1); - if ($truthy($rb_lt(self.lists.$size(), self.list_index))) { - self.lists['$<<']([])}; - self.co_index = 1; - return nil; - }, $Callouts_next_list$7.$$arity = 0); - - Opal.def(self, '$rewind', $Callouts_rewind$8 = function $$rewind() { - var self = this; - - - self.list_index = 1; - self.co_index = 1; - return nil; - }, $Callouts_rewind$8.$$arity = 0); - self.$private(); - - Opal.def(self, '$generate_next_callout_id', $Callouts_generate_next_callout_id$9 = function $$generate_next_callout_id() { - var self = this; - - return self.$generate_callout_id(self.list_index, self.co_index) - }, $Callouts_generate_next_callout_id$9.$$arity = 0); - return (Opal.def(self, '$generate_callout_id', $Callouts_generate_callout_id$10 = function $$generate_callout_id(list_index, co_index) { - var self = this; - - return "" + "CO" + (list_index) + "-" + (co_index) - }, $Callouts_generate_callout_id$10.$$arity = 2), nil) && 'generate_callout_id'; - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/converter"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send, $klass = Opal.klass, $gvars = Opal.gvars; - - Opal.add_stubs(['$autoload', '$__dir__', '$attr_reader', '$raise', '$class', '$[]', '$sub', '$slice', '$length', '$==', '$[]=', '$backend_traits', '$-', '$derive_backend_traits', '$register', '$map', '$to_s', '$new', '$create', '$default', '$each', '$default=', '$registry', '$for', '$===', '$supports_templates?', '$merge', '$private', '$include', '$delete', '$clear', '$private_class_method', '$send', '$extend', '$node_name', '$+', '$receiver', '$name', '$warn', '$logger', '$respond_to?', '$content']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'Converter'); - - var $nesting = [self].concat($parent_nesting), $Converter_initialize$1, $Converter_convert$2, $Converter_handles$ques$3, $Converter_derive_backend_traits$4, $a, $Converter_included$28; - - - self.$autoload("CompositeConverter", "" + (self.$__dir__()) + "/converter/composite"); - self.$autoload("TemplateConverter", "" + (self.$__dir__()) + "/converter/template"); - self.$attr_reader("backend"); - - Opal.def(self, '$initialize', $Converter_initialize$1 = function $$initialize(backend, opts) { - var self = this; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - return (self.backend = backend); - }, $Converter_initialize$1.$$arity = -2); - - Opal.def(self, '$convert', $Converter_convert$2 = function $$convert(node, transform, opts) { - var self = this; - if (self.backend == null) self.backend = nil; - - - - if (transform == null) { - transform = nil; - }; - - if (opts == null) { - opts = nil; - }; - return self.$raise($$$('::', 'NotImplementedError'), "" + (self.$class()) + " (backend: " + (self.backend) + ") must implement the #" + ("convert") + " method"); - }, $Converter_convert$2.$$arity = -2); - - Opal.def(self, '$handles?', $Converter_handles$ques$3 = function(transform) { - var self = this; - - return true - }, $Converter_handles$ques$3.$$arity = 1); - Opal.defs(self, '$derive_backend_traits', $Converter_derive_backend_traits$4 = function $$derive_backend_traits(backend, basebackend) { - var $a, self = this, outfilesuffix = nil, filetype = nil; - - - - if (basebackend == null) { - basebackend = nil; - }; - if ($truthy(backend)) { - } else { - return $hash2([], {}) - }; - if ($truthy((outfilesuffix = $$($nesting, 'DEFAULT_EXTENSIONS')['$[]']((basebackend = ($truthy($a = basebackend) ? $a : backend.$sub($$($nesting, 'TrailingDigitsRx'), ""))))))) { - filetype = outfilesuffix.$slice(1, outfilesuffix.$length()) - } else { - outfilesuffix = "" + "." + ((filetype = basebackend)) - }; - if (filetype['$==']("html")) { - return $hash2(["basebackend", "filetype", "htmlsyntax", "outfilesuffix"], {"basebackend": basebackend, "filetype": filetype, "htmlsyntax": "html", "outfilesuffix": outfilesuffix}) - } else { - return $hash2(["basebackend", "filetype", "outfilesuffix"], {"basebackend": basebackend, "filetype": filetype, "outfilesuffix": outfilesuffix}) - }; - }, $Converter_derive_backend_traits$4.$$arity = -2); - (function($base, $parent_nesting) { - var self = $module($base, 'BackendTraits'); - - var $nesting = [self].concat($parent_nesting), $BackendTraits_basebackend$5, $BackendTraits_filetype$6, $BackendTraits_htmlsyntax$7, $BackendTraits_outfilesuffix$8, $BackendTraits_supports_templates$9, $BackendTraits_supports_templates$ques$10, $BackendTraits_init_backend_traits$11, $BackendTraits_backend_traits$12, $BackendTraits_derive_backend_traits$13; - - - - Opal.def(self, '$basebackend', $BackendTraits_basebackend$5 = function $$basebackend(value) { - var self = this, $writer = nil; - - - - if (value == null) { - value = nil; - }; - if ($truthy(value)) { - - - $writer = ["basebackend", value]; - $send(self.$backend_traits(value), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - return self.$backend_traits()['$[]']("basebackend") - }; - }, $BackendTraits_basebackend$5.$$arity = -1); - - Opal.def(self, '$filetype', $BackendTraits_filetype$6 = function $$filetype(value) { - var self = this, $writer = nil; - - - - if (value == null) { - value = nil; - }; - if ($truthy(value)) { - - - $writer = ["filetype", value]; - $send(self.$backend_traits(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - return self.$backend_traits()['$[]']("filetype") - }; - }, $BackendTraits_filetype$6.$$arity = -1); - - Opal.def(self, '$htmlsyntax', $BackendTraits_htmlsyntax$7 = function $$htmlsyntax(value) { - var self = this, $writer = nil; - - - - if (value == null) { - value = nil; - }; - if ($truthy(value)) { - - - $writer = ["htmlsyntax", value]; - $send(self.$backend_traits(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - return self.$backend_traits()['$[]']("htmlsyntax") - }; - }, $BackendTraits_htmlsyntax$7.$$arity = -1); - - Opal.def(self, '$outfilesuffix', $BackendTraits_outfilesuffix$8 = function $$outfilesuffix(value) { - var self = this, $writer = nil; - - - - if (value == null) { - value = nil; - }; - if ($truthy(value)) { - - - $writer = ["outfilesuffix", value]; - $send(self.$backend_traits(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - return self.$backend_traits()['$[]']("outfilesuffix") - }; - }, $BackendTraits_outfilesuffix$8.$$arity = -1); - - Opal.def(self, '$supports_templates', $BackendTraits_supports_templates$9 = function $$supports_templates(value) { - var self = this, $writer = nil; - - - - if (value == null) { - value = true; - }; - $writer = ["supports_templates", value]; - $send(self.$backend_traits(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $BackendTraits_supports_templates$9.$$arity = -1); - - Opal.def(self, '$supports_templates?', $BackendTraits_supports_templates$ques$10 = function() { - var self = this; - - return self.$backend_traits()['$[]']("supports_templates") - }, $BackendTraits_supports_templates$ques$10.$$arity = 0); - - Opal.def(self, '$init_backend_traits', $BackendTraits_init_backend_traits$11 = function $$init_backend_traits(value) { - var $a, self = this; - - - - if (value == null) { - value = nil; - }; - return (self.backend_traits = ($truthy($a = value) ? $a : $hash2([], {}))); - }, $BackendTraits_init_backend_traits$11.$$arity = -1); - - Opal.def(self, '$backend_traits', $BackendTraits_backend_traits$12 = function $$backend_traits(basebackend) { - var $a, self = this; - if (self.backend_traits == null) self.backend_traits = nil; - if (self.backend == null) self.backend = nil; - - - - if (basebackend == null) { - basebackend = nil; - }; - return (self.backend_traits = ($truthy($a = self.backend_traits) ? $a : $$($nesting, 'Converter').$derive_backend_traits(self.backend, basebackend))); - }, $BackendTraits_backend_traits$12.$$arity = -1); - Opal.alias(self, "backend_info", "backend_traits"); - Opal.defs(self, '$derive_backend_traits', $BackendTraits_derive_backend_traits$13 = function $$derive_backend_traits(backend, basebackend) { - var self = this; - - - - if (basebackend == null) { - basebackend = nil; - }; - return $$($nesting, 'Converter').$derive_backend_traits(backend, basebackend); - }, $BackendTraits_derive_backend_traits$13.$$arity = -2); - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Config'); - - var $nesting = [self].concat($parent_nesting), $Config_register_for$14; - - - Opal.def(self, '$register_for', $Config_register_for$14 = function $$register_for($a) { - var $post_args, backends, $$15, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - backends = $post_args;; - return $send($$($nesting, 'Converter'), 'register', [self].concat(Opal.to_a($send(backends, 'map', [], ($$15 = function(backend){var self = $$15.$$s || this; - - - - if (backend == null) { - backend = nil; - }; - return backend.$to_s();}, $$15.$$s = self, $$15.$$arity = 1, $$15))))); - }, $Config_register_for$14.$$arity = -1) - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Factory'); - - var $nesting = [self].concat($parent_nesting), $Factory_new$16, $Factory_default$17, $Factory_create$18, $Factory_register$19, $Factory_for$21, $Factory_create$22, $Factory_converters$23, $Factory_registry$24; - - - Opal.defs(self, '$new', $Factory_new$16 = function($a, $b) { - var $post_args, $kwargs, converters, proxy_default, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - $kwargs = Opal.extract_kwargs($post_args); - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - if ($post_args.length > 0) { - converters = $post_args[0]; - $post_args.splice(0, 1); - } - if (converters == null) { - converters = nil; - }; - - proxy_default = $kwargs.$$smap["proxy_default"]; - if (proxy_default == null) { - proxy_default = true - }; - if ($truthy(proxy_default)) { - - return $$($nesting, 'DefaultFactoryProxy').$new(converters); - } else { - - return $$($nesting, 'CustomFactory').$new(converters); - }; - }, $Factory_new$16.$$arity = -1); - Opal.defs(self, '$default', $Factory_default$17 = function($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $$($nesting, 'Converter'); - }, $Factory_default$17.$$arity = -1); - Opal.defs(self, '$create', $Factory_create$18 = function $$create(backend, opts) { - var self = this; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - return self.$default().$create(backend, opts); - }, $Factory_create$18.$$arity = -2); - - Opal.def(self, '$register', $Factory_register$19 = function $$register(converter, $a) { - var $post_args, backends, $$20, self = this; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - backends = $post_args;; - return $send(backends, 'each', [], ($$20 = function(backend){var self = $$20.$$s || this, $writer = nil; - - - - if (backend == null) { - backend = nil; - }; - if (backend['$==']("*")) { - - - $writer = [converter]; - $send(self.$registry(), 'default=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - - - $writer = [backend, converter]; - $send(self.$registry(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - };}, $$20.$$s = self, $$20.$$arity = 1, $$20)); - }, $Factory_register$19.$$arity = -2); - - Opal.def(self, '$for', $Factory_for$21 = function(backend) { - var self = this; - - return self.$registry()['$[]'](backend) - }, $Factory_for$21.$$arity = 1); - - Opal.def(self, '$create', $Factory_create$22 = function $$create(backend, opts) { - var $a, $b, self = this, converter = nil, template_dirs = nil, delegate_backend = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy((converter = self.$for(backend)))) { - - if ($truthy($$$('::', 'Class')['$==='](converter))) { - converter = converter.$new(backend, opts)}; - if ($truthy(($truthy($a = ($truthy($b = (template_dirs = opts['$[]']("template_dirs"))) ? $$($nesting, 'BackendTraits')['$==='](converter) : $b)) ? converter['$supports_templates?']() : $a))) { - return $$($nesting, 'CompositeConverter').$new(backend, $$($nesting, 'TemplateConverter').$new(backend, template_dirs, opts), converter, $hash2(["backend_traits_source"], {"backend_traits_source": converter})) - } else { - return converter - }; - } else if ($truthy((template_dirs = opts['$[]']("template_dirs")))) { - if ($truthy(($truthy($a = (delegate_backend = opts['$[]']("delegate_backend"))) ? (converter = self.$for(delegate_backend)) : $a))) { - - if ($truthy($$$('::', 'Class')['$==='](converter))) { - converter = converter.$new(delegate_backend, opts)}; - return $$($nesting, 'CompositeConverter').$new(backend, $$($nesting, 'TemplateConverter').$new(backend, template_dirs, opts), converter, $hash2(["backend_traits_source"], {"backend_traits_source": converter})); - } else { - return $$($nesting, 'TemplateConverter').$new(backend, template_dirs, opts) - } - } else { - return nil - }; - }, $Factory_create$22.$$arity = -2); - - Opal.def(self, '$converters', $Factory_converters$23 = function $$converters() { - var self = this; - - return self.$registry().$merge() - }, $Factory_converters$23.$$arity = 0); - self.$private(); - - Opal.def(self, '$registry', $Factory_registry$24 = function $$registry() { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Factory')) + " subclass " + (self.$class()) + " must implement the #" + ("registry") + " method") - }, $Factory_registry$24.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'CustomFactory'); - - var $nesting = [self].concat($parent_nesting), $CustomFactory_initialize$25, $CustomFactory_unregister_all$26; - - - self.$include($$($nesting, 'Factory')); - - Opal.def(self, '$initialize', $CustomFactory_initialize$25 = function $$initialize(seed_registry) { - var self = this, $writer = nil; - - - - if (seed_registry == null) { - seed_registry = nil; - }; - if ($truthy(seed_registry)) { - - - $writer = [seed_registry.$delete("*")]; - $send(seed_registry, 'default=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return (self.registry = seed_registry); - } else { - return (self.registry = $hash2([], {})) - }; - }, $CustomFactory_initialize$25.$$arity = -1); - - Opal.def(self, '$unregister_all', $CustomFactory_unregister_all$26 = function $$unregister_all() { - var self = this, $writer = nil; - - - $writer = [nil]; - $send(self.$registry().$clear(), 'default=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $CustomFactory_unregister_all$26.$$arity = 0); - self.$private(); - return self.$attr_reader("registry"); - })($nesting[0], null, $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'DefaultFactory'); - - var $nesting = [self].concat($parent_nesting), $DefaultFactory_registry$27; - - - self.$include($$($nesting, 'Factory')); - self.$private(); - (Opal.class_variable_set($nesting[0], '@@registry', $hash2([], {}))); - - Opal.def(self, '$registry', $DefaultFactory_registry$27 = function $$registry() { - var $a, self = this; - - return (($a = $nesting[0].$$cvars['@@registry']) == null ? nil : $a) - }, $DefaultFactory_registry$27.$$arity = 0); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'DefaultFactoryProxy'); - - var $nesting = [self].concat($parent_nesting); - - - self.$include($$($nesting, 'DefaultFactory')); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - return nil - } else { - return nil - }; - })($nesting[0], $$($nesting, 'CustomFactory'), $nesting); - self.$private_class_method(($truthy($a = (Opal.defs(self, '$included', $Converter_included$28 = function $$included(into) { - var self = this; - - - into.$send("include", $$($nesting, 'BackendTraits')); - return into.$extend($$($nesting, 'Config')); - }, $Converter_included$28.$$arity = 1), nil) && 'included') ? $a : "included")); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Base'); - - var $nesting = [self].concat($parent_nesting), $Base_convert$29, $Base_handles$ques$30, $Base_content_only$31, $Base_skip$32; - - self.$$prototype.backend = nil; - - self.$include($$($nesting, 'Converter'), $$($nesting, 'Logging')); - - Opal.def(self, '$convert', $Base_convert$29 = function $$convert(node, transform, opts) { - var $a, $b, self = this, ex = nil; - if ($gvars["!"] == null) $gvars["!"] = nil; - - - - if (transform == null) { - transform = node.$node_name(); - }; - - if (opts == null) { - opts = nil; - }; - try { - if ($truthy(opts)) { - - return self.$send($rb_plus("convert_", transform), node, opts); - } else { - - return self.$send($rb_plus("convert_", transform), node); - } - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - - if ($truthy(($truthy($a = ($truthy($b = $$$('::', 'NoMethodError')['$===']((ex = $gvars["!"]))) ? ex.$receiver()['$=='](self) : $b)) ? ex.$name().$to_s()['$=='](transform) : $a))) { - } else { - self.$raise() - }; - self.$logger().$warn("" + "missing convert handler for " + (ex.$name()) + " node in " + (self.backend) + " backend (" + (self.$class()) + ")"); - return nil; - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - }, $Base_convert$29.$$arity = -2); - - Opal.def(self, '$handles?', $Base_handles$ques$30 = function(transform) { - var self = this; - - return self['$respond_to?']("" + "convert_" + (transform)) - }, $Base_handles$ques$30.$$arity = 1); - - Opal.def(self, '$content_only', $Base_content_only$31 = function $$content_only(node) { - var self = this; - - return node.$content() - }, $Base_content_only$31.$$arity = 1); - return (Opal.def(self, '$skip', $Base_skip$32 = function $$skip(node) { - var self = this; - - return nil - }, $Base_skip$32.$$arity = 1), nil) && 'skip'; - })($nesting[0], null, $nesting); - self.$extend($$($nesting, 'DefaultFactory')); - })($nesting[0], $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/document"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_ge(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $hash2 = Opal.hash2, $hash = Opal.hash, $gvars = Opal.gvars; - - Opal.add_stubs(['$new', '$attr_reader', '$nil?', '$<<', '$[]', '$[]=', '$-', '$include?', '$strip', '$squeeze', '$gsub', '$empty?', '$!', '$rpartition', '$attr_accessor', '$delete', '$base_dir', '$options', '$merge', '$catalog', '$instance_variable_get', '$attributes', '$safe', '$compat_mode', '$outfilesuffix', '$sourcemap', '$path_resolver', '$converter', '$extensions', '$syntax_highlighter', '$each', '$end_with?', '$start_with?', '$slice', '$length', '$chop', '$==', '$downcase', '$extname', '$===', '$value_for_name', '$key?', '$freeze', '$attribute_undefined', '$attribute_missing', '$update', '$&', '$keys', '$name_for_value', '$expand_path', '$pwd', '$>=', '$+', '$abs', '$to_i', '$delete_if', '$update_doctype_attributes', '$cursor', '$parse', '$restore_attributes', '$update_backend_attributes', '$fetch', '$fill_datetime_attributes', '$activate', '$groups', '$create', '$to_proc', '$preprocessors?', '$preprocessors', '$process_method', '$tree_processors?', '$tree_processors', '$!=', '$counter', '$attribute_locked?', '$nextval', '$nil_or_empty?', '$to_s', '$value', '$save_to', '$register', '$tap', '$xreftext', '$source', '$source_lines', '$doctitle', '$sectname=', '$title=', '$first_section', '$title', '$reftext', '$>', '$<', '$find', '$context', '$assign_numeral', '$clear_playback_attributes', '$save_attributes', '$name', '$negate', '$rewind', '$replace', '$apply_attribute_value_subs', '$delete?', '$start', '$doctype', '$content_model', '$warn', '$logger', '$content', '$convert', '$postprocessors?', '$postprocessors', '$record', '$write', '$respond_to?', '$chomp', '$class', '$write_alternate_pages', '$map', '$split', '$resolve_docinfo_subs', '$normalize_system_path', '$read_asset', '$apply_subs', '$docinfo_processors?', '$join', '$concat', '$compact', '$docinfo_processors', '$object_id', '$inspect', '$size', '$private', '$=~', '$resolve_pass_subs', '$apply_header_subs', '$limit_bytesize', '$bytesize', '$valid_encoding?', '$byteslice', '$resolve_subs', '$utc', '$at', '$Integer', '$now', '$index', '$strftime', '$year', '$utc_offset', '$partition', '$create_converter', '$basebackend', '$filetype', '$htmlsyntax', '$derive_backend_traits', '$raise']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Document'); - - var $nesting = [self].concat($parent_nesting), $Document$1, $Document_initialize$8, $Document_parse$11, $Document_parsed$ques$14, $Document_counter$15, $Document_increment_and_store_counter$16, $Document_register$17, $Document_resolve_id$18, $Document_footnotes$ques$23, $Document_footnotes$24, $Document_callouts$25, $Document_nested$ques$26, $Document_embedded$ques$27, $Document_extensions$ques$28, $Document_source$29, $Document_source_lines$30, $Document_basebackend$ques$31, $Document_title$32, $Document_title$eq$33, $Document_doctitle$34, $Document_xreftext$35, $Document_author$36, $Document_authors$37, $Document_revdate$38, $Document_notitle$39, $Document_noheader$40, $Document_nofooter$41, $Document_first_section$42, $Document_header$ques$44, $Document_$lt$lt$45, $Document_finalize_header$46, $Document_playback_attributes$47, $Document_restore_attributes$49, $Document_set_attribute$50, $Document_delete_attribute$51, $Document_attribute_locked$ques$52, $Document_set_header_attribute$53, $Document_convert$54, $Document_write$56, $Document_content$57, $Document_docinfo$58, $Document_docinfo_processors$ques$61, $Document_to_s$62, $Document_apply_attribute_value_subs$63, $Document_limit_bytesize$64, $Document_resolve_docinfo_subs$65, $Document_create_converter$66, $Document_clear_playback_attributes$67, $Document_save_attributes$68, $Document_fill_datetime_attributes$70, $Document_update_backend_attributes$71, $Document_update_doctype_attributes$72; - - self.$$prototype.attributes = self.$$prototype.safe = self.$$prototype.sourcemap = self.$$prototype.reader = self.$$prototype.base_dir = self.$$prototype.parsed = self.$$prototype.parent_document = self.$$prototype.extensions = self.$$prototype.options = self.$$prototype.counters = self.$$prototype.catalog = self.$$prototype.reftexts = self.$$prototype.header = self.$$prototype.blocks = self.$$prototype.header_attributes = self.$$prototype.attributes_modified = self.$$prototype.backend = self.$$prototype.attribute_overrides = self.$$prototype.timings = self.$$prototype.converter = self.$$prototype.outfilesuffix = self.$$prototype.docinfo_processor_extensions = self.$$prototype.document = self.$$prototype.max_attribute_value_size = self.$$prototype.id = self.$$prototype.doctype = nil; - - Opal.const_set($nesting[0], 'ImageReference', $send($$$('::', 'Struct'), 'new', ["target", "imagesdir"], ($Document$1 = function(){var self = $Document$1.$$s || this; - - return Opal.alias(self, "to_s", "target")}, $Document$1.$$s = self, $Document$1.$$arity = 0, $Document$1))); - Opal.const_set($nesting[0], 'Footnote', $$$('::', 'Struct').$new("index", "id", "text")); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'AttributeEntry'); - - var $nesting = [self].concat($parent_nesting), $AttributeEntry_initialize$2, $AttributeEntry_save_to$3; - - - self.$attr_reader("name", "value", "negate"); - - Opal.def(self, '$initialize', $AttributeEntry_initialize$2 = function $$initialize(name, value, negate) { - var self = this; - - - - if (negate == null) { - negate = nil; - }; - self.name = name; - self.value = value; - return (self.negate = (function() {if ($truthy(negate['$nil?']())) { - return value['$nil?']() - } else { - return negate - }; return nil; })()); - }, $AttributeEntry_initialize$2.$$arity = -3); - return (Opal.def(self, '$save_to', $AttributeEntry_save_to$3 = function $$save_to(block_attributes) { - var $a, self = this, $writer = nil; - - - ($truthy($a = block_attributes['$[]']("attribute_entries")) ? $a : (($writer = ["attribute_entries", []]), $send(block_attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))['$<<'](self); - return self; - }, $AttributeEntry_save_to$3.$$arity = 1), nil) && 'save_to'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Title'); - - var $nesting = [self].concat($parent_nesting), $Title_initialize$4, $Title_sanitized$ques$5, $Title_subtitle$ques$6, $Title_to_s$7; - - self.$$prototype.sanitized = self.$$prototype.subtitle = self.$$prototype.combined = nil; - - self.$attr_reader("main"); - Opal.alias(self, "title", "main"); - self.$attr_reader("subtitle"); - self.$attr_reader("combined"); - - Opal.def(self, '$initialize', $Title_initialize$4 = function $$initialize(val, opts) { - var $a, $b, self = this, sep = nil, _ = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy(($truthy($a = (self.sanitized = opts['$[]']("sanitize"))) ? val['$include?']("<") : $a))) { - val = val.$gsub($$($nesting, 'XmlSanitizeRx'), "").$squeeze(" ").$strip()}; - if ($truthy(($truthy($a = (sep = ($truthy($b = opts['$[]']("separator")) ? $b : ":"))['$empty?']()) ? $a : val['$include?']((sep = "" + (sep) + " "))['$!']()))) { - - self.main = val; - self.subtitle = nil; - } else { - $b = val.$rpartition(sep), $a = Opal.to_ary($b), (self.main = ($a[0] == null ? nil : $a[0])), (_ = ($a[1] == null ? nil : $a[1])), (self.subtitle = ($a[2] == null ? nil : $a[2])), $b - }; - return (self.combined = val); - }, $Title_initialize$4.$$arity = -2); - - Opal.def(self, '$sanitized?', $Title_sanitized$ques$5 = function() { - var self = this; - - return self.sanitized - }, $Title_sanitized$ques$5.$$arity = 0); - - Opal.def(self, '$subtitle?', $Title_subtitle$ques$6 = function() { - var self = this; - - if ($truthy(self.subtitle)) { - return true - } else { - return false - } - }, $Title_subtitle$ques$6.$$arity = 0); - return (Opal.def(self, '$to_s', $Title_to_s$7 = function $$to_s() { - var self = this; - - return self.combined - }, $Title_to_s$7.$$arity = 0), nil) && 'to_s'; - })($nesting[0], null, $nesting); - Opal.const_set($nesting[0], 'Author', $$$('::', 'Struct').$new("name", "firstname", "middlename", "lastname", "initials", "email")); - self.$attr_reader("safe"); - self.$attr_reader("compat_mode"); - self.$attr_reader("backend"); - self.$attr_reader("doctype"); - self.$attr_accessor("sourcemap"); - self.$attr_reader("catalog"); - Opal.alias(self, "references", "catalog"); - self.$attr_reader("counters"); - self.$attr_reader("header"); - self.$attr_reader("base_dir"); - self.$attr_reader("options"); - self.$attr_reader("outfilesuffix"); - self.$attr_reader("parent_document"); - self.$attr_reader("reader"); - self.$attr_reader("path_resolver"); - self.$attr_reader("converter"); - self.$attr_reader("syntax_highlighter"); - self.$attr_reader("extensions"); - - Opal.def(self, '$initialize', $Document_initialize$8 = function $$initialize(data, options) { - var $a, $$9, $b, $c, $$10, $d, $e, $f, $g, $iter = $Document_initialize$8.$$p, $yield = $iter || nil, self = this, parent_doc = nil, $writer = nil, attr_overrides = nil, parent_doctype = nil, initialize_extensions = nil, to_file = nil, safe_mode = nil, input_mtime = nil, standalone = nil, attrs = nil, safe_mode_name = nil, base_dir_val = nil, backend_val = nil, doctype_val = nil, size = nil, initial_backend = nil, ext_registry = nil, ext_block = nil; - - if ($iter) $Document_initialize$8.$$p = null; - - - if (data == null) { - data = nil; - }; - - if (options == null) { - options = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $Document_initialize$8, false), [self, "document"], null); - if ($truthy((parent_doc = options.$delete("parent")))) { - - self.parent_document = parent_doc; - ($truthy($a = options['$[]']("base_dir")) ? $a : (($writer = ["base_dir", parent_doc.$base_dir()]), $send(options, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy(parent_doc.$options()['$[]']("catalog_assets"))) { - - $writer = ["catalog_assets", true]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - self.catalog = parent_doc.$catalog().$merge($hash2(["footnotes"], {"footnotes": []})); - self.attribute_overrides = (attr_overrides = parent_doc.$instance_variable_get("@attribute_overrides").$merge(parent_doc.$attributes())); - attr_overrides.$delete("compat-mode"); - parent_doctype = attr_overrides.$delete("doctype"); - attr_overrides.$delete("notitle"); - attr_overrides.$delete("showtitle"); - attr_overrides.$delete("toc"); - - $writer = ["toc-placement", ($truthy($a = attr_overrides.$delete("toc-placement")) ? $a : "auto")]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - attr_overrides.$delete("toc-position"); - self.safe = parent_doc.$safe(); - if ($truthy((self.compat_mode = parent_doc.$compat_mode()))) { - - $writer = ["compat-mode", ""]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - self.outfilesuffix = parent_doc.$outfilesuffix(); - self.sourcemap = parent_doc.$sourcemap(); - self.timings = nil; - self.path_resolver = parent_doc.$path_resolver(); - self.converter = parent_doc.$converter(); - initialize_extensions = nil; - self.extensions = parent_doc.$extensions(); - self.syntax_highlighter = parent_doc.$syntax_highlighter(); - } else { - - self.parent_document = nil; - self.catalog = $hash2(["ids", "refs", "footnotes", "links", "images", "callouts", "includes"], {"ids": $hash2([], {}), "refs": $hash2([], {}), "footnotes": [], "links": [], "images": [], "callouts": $$($nesting, 'Callouts').$new(), "includes": $hash2([], {})}); - self.attribute_overrides = (attr_overrides = $hash2([], {})); - $send(($truthy($a = options['$[]']("attributes")) ? $a : $hash2([], {})), 'each', [], ($$9 = function(key, val){var self = $$9.$$s || this, $b; - - - - if (key == null) { - key = nil; - }; - - if (val == null) { - val = nil; - }; - if ($truthy(key['$end_with?']("@"))) { - if ($truthy(key['$start_with?']("!"))) { - $b = [key.$slice(1, $rb_minus(key.$length(), 2)), false], (key = $b[0]), (val = $b[1]), $b - } else if ($truthy(key['$end_with?']("!@"))) { - $b = [key.$slice(0, $rb_minus(key.$length(), 2)), false], (key = $b[0]), (val = $b[1]), $b - } else { - $b = [key.$chop(), "" + (val) + "@"], (key = $b[0]), (val = $b[1]), $b - } - } else if ($truthy(key['$start_with?']("!"))) { - $b = [key.$slice(1, key.$length()), (function() {if (val['$==']("@")) { - return false - } else { - return nil - }; return nil; })()], (key = $b[0]), (val = $b[1]), $b - } else if ($truthy(key['$end_with?']("!"))) { - $b = [key.$chop(), (function() {if (val['$==']("@")) { - return false - } else { - return nil - }; return nil; })()], (key = $b[0]), (val = $b[1]), $b}; - - $writer = [key.$downcase(), val]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];;}, $$9.$$s = self, $$9.$$arity = 2, $$9)); - if ($truthy((to_file = options['$[]']("to_file")))) { - - $writer = ["outfilesuffix", $$($nesting, 'Helpers').$extname(to_file)]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy((safe_mode = options['$[]']("safe"))['$!']())) { - self.safe = $$$($$($nesting, 'SafeMode'), 'SECURE') - } else if ($truthy($$$('::', 'Integer')['$==='](safe_mode))) { - self.safe = safe_mode - } else { - self.safe = (function() { try { - - return $$($nesting, 'SafeMode').$value_for_name(safe_mode); - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return $$$($$($nesting, 'SafeMode'), 'SECURE') - } finally { Opal.pop_exception() } - } else { throw $err; } - }})() - }; - input_mtime = options.$delete("input_mtime"); - self.compat_mode = attr_overrides['$key?']("compat-mode"); - self.sourcemap = options['$[]']("sourcemap"); - self.timings = options.$delete("timings"); - self.path_resolver = $$($nesting, 'PathResolver').$new(); - initialize_extensions = (function() {if ($truthy(($truthy($a = (($c = $$$('::', 'Asciidoctor', 'skip_raise')) && ($b = $$$($c, 'Extensions', 'skip_raise')) ? 'constant' : nil)) ? $a : options['$key?']("extensions")))) { - return $$$($$$('::', 'Asciidoctor'), 'Extensions') - } else { - return nil - }; return nil; })(); - self.extensions = nil; - if ($truthy(($truthy($a = options['$key?']("header_footer")) ? options['$key?']("standalone")['$!']() : $a))) { - - $writer = ["standalone", options['$[]']("header_footer")]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - }; - self.parsed = (self.reftexts = (self.header = (self.header_attributes = nil))); - self.counters = $hash2([], {}); - self.attributes_modified = $$$('::', 'Set').$new(); - self.docinfo_processor_extensions = $hash2([], {}); - standalone = options['$[]']("standalone"); - (self.options = options).$freeze(); - attrs = self.attributes; - if ($truthy(parent_doc)) { - } else { - - - $writer = ["attribute-undefined", $$($nesting, 'Compliance').$attribute_undefined()]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["attribute-missing", $$($nesting, 'Compliance').$attribute_missing()]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - attrs.$update($$($nesting, 'DEFAULT_ATTRIBUTES')); - }; - if ($truthy(standalone)) { - - - $writer = ["embedded", nil]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["copycss", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["iconfont-remote", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["stylesheet", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["webfonts", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - - - $writer = ["embedded", ""]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(($truthy($a = attr_overrides['$key?']("showtitle")) ? attr_overrides.$keys()['$&'](["notitle", "showtitle"])['$[]'](-1)['$==']("showtitle") : $a))) { - - $writer = ["notitle", $hash(nil, "", false, "@", "@", false)['$[]'](attr_overrides['$[]']("showtitle"))]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else if ($truthy(attr_overrides['$key?']("notitle"))) { - - $writer = ["showtitle", $hash(nil, "", false, "@", "@", false)['$[]'](attr_overrides['$[]']("notitle"))]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = ["notitle", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - }; - - $writer = ["asciidoctor", ""]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["asciidoctor-version", $$$($$$('::', 'Asciidoctor'), 'VERSION')]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["safe-mode-name", (safe_mode_name = $$($nesting, 'SafeMode').$name_for_value(self.safe))]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["" + "safe-mode-" + (safe_mode_name), ""]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["safe-mode-level", self.safe]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - ($truthy($a = attr_overrides['$[]']("max-include-depth")) ? $a : (($writer = ["max-include-depth", 64]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - ($truthy($a = attr_overrides['$[]']("allow-uri-read")) ? $a : (($writer = ["allow-uri-read", nil]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy(attr_overrides['$key?']("numbered"))) { - - $writer = ["sectnums", attr_overrides.$delete("numbered")]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(attr_overrides['$key?']("hardbreaks"))) { - - $writer = ["hardbreaks-option", attr_overrides.$delete("hardbreaks")]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy((base_dir_val = options['$[]']("base_dir")))) { - self.base_dir = (($writer = ["docdir", $$$('::', 'File').$expand_path(base_dir_val)]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]) - } else if ($truthy(attr_overrides['$[]']("docdir"))) { - self.base_dir = attr_overrides['$[]']("docdir") - } else { - self.base_dir = (($writer = ["docdir", $$$('::', 'Dir').$pwd()]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]) - }; - if ($truthy((backend_val = options['$[]']("backend")))) { - - $writer = ["backend", "" + (backend_val)]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy((doctype_val = options['$[]']("doctype")))) { - - $writer = ["doctype", "" + (doctype_val)]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy($rb_ge(self.safe, $$$($$($nesting, 'SafeMode'), 'SERVER')))) { - - ($truthy($a = attr_overrides['$[]']("copycss")) ? $a : (($writer = ["copycss", nil]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - ($truthy($a = attr_overrides['$[]']("source-highlighter")) ? $a : (($writer = ["source-highlighter", nil]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - ($truthy($a = attr_overrides['$[]']("backend")) ? $a : (($writer = ["backend", $$($nesting, 'DEFAULT_BACKEND')]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy(($truthy($a = parent_doc['$!']()) ? attr_overrides['$key?']("docfile") : $a))) { - - $writer = ["docfile", attr_overrides['$[]']("docfile")['$[]'](Opal.Range.$new($rb_plus(attr_overrides['$[]']("docdir").$length(), 1), -1, false))]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - - $writer = ["docdir", ""]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - ($truthy($a = attr_overrides['$[]']("user-home")) ? $a : (($writer = ["user-home", "."]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy($rb_ge(self.safe, $$$($$($nesting, 'SafeMode'), 'SECURE')))) { - - if ($truthy(attr_overrides['$key?']("max-attribute-value-size"))) { - } else { - - $writer = ["max-attribute-value-size", 4096]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy(attr_overrides['$key?']("linkcss"))) { - } else { - - $writer = ["linkcss", ""]; - $send(attr_overrides, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - ($truthy($a = attr_overrides['$[]']("icons")) ? $a : (($writer = ["icons", nil]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));}; - } else { - ($truthy($a = attr_overrides['$[]']("user-home")) ? $a : (($writer = ["user-home", $$($nesting, 'USER_HOME')]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - }; - self.max_attribute_value_size = (function() {if ($truthy((size = ($truthy($a = attr_overrides['$[]']("max-attribute-value-size")) ? $a : (($writer = ["max-attribute-value-size", nil]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))))) { - return size.$to_i().$abs() - } else { - return nil - }; return nil; })(); - $send(attr_overrides, 'delete_if', [], ($$10 = function(key, val){var self = $$10.$$s || this, $d, verdict = nil; - - - - if (key == null) { - key = nil; - }; - - if (val == null) { - val = nil; - }; - if ($truthy(val)) { - - if ($truthy(($truthy($d = $$$('::', 'String')['$==='](val)) ? val['$end_with?']("@") : $d))) { - $d = [val.$chop(), true], (val = $d[0]), (verdict = $d[1]), $d}; - - $writer = [key, val]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - - attrs.$delete(key); - verdict = val['$=='](false); - }; - return verdict;}, $$10.$$s = self, $$10.$$arity = 2, $$10)); - if ($truthy(parent_doc)) { - - self.backend = attrs['$[]']("backend"); - if ((self.doctype = (($writer = ["doctype", parent_doctype]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))['$==']($$($nesting, 'DEFAULT_DOCTYPE'))) { - } else { - self.$update_doctype_attributes($$($nesting, 'DEFAULT_DOCTYPE')) - }; - self.reader = $$($nesting, 'Reader').$new(data, options['$[]']("cursor")); - if ($truthy(self.sourcemap)) { - self.source_location = self.reader.$cursor()}; - $$($nesting, 'Parser').$parse(self.reader, self); - self.$restore_attributes(); - return (self.parsed = true); - } else { - - self.backend = nil; - if ((initial_backend = ($truthy($a = attrs['$[]']("backend")) ? $a : $$($nesting, 'DEFAULT_BACKEND')))['$==']("manpage")) { - self.doctype = (($writer = ["doctype", (($writer = ["doctype", "manpage"]), $send(attr_overrides, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]) - } else { - self.doctype = ($truthy($a = attrs['$[]']("doctype")) ? $a : (($writer = ["doctype", $$($nesting, 'DEFAULT_DOCTYPE')]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - }; - self.$update_backend_attributes(initial_backend, true); - ($truthy($a = attrs['$[]']("stylesdir")) ? $a : (($writer = ["stylesdir", "."]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - ($truthy($a = attrs['$[]']("iconsdir")) ? $a : (($writer = ["iconsdir", "" + (attrs.$fetch("imagesdir", "./images")) + "/icons"]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - self.$fill_datetime_attributes(attrs, input_mtime); - if ($truthy(initialize_extensions)) { - if ($truthy((ext_registry = options['$[]']("extension_registry")))) { - if ($truthy(($truthy($a = $$$($$($nesting, 'Extensions'), 'Registry')['$==='](ext_registry)) ? $a : ($truthy($d = (($g = $$$('::', 'AsciidoctorJ', 'skip_raise')) && ($f = $$$($g, 'Extensions', 'skip_raise')) && ($e = $$$($f, 'ExtensionRegistry', 'skip_raise')) ? 'constant' : nil)) ? $$$($$$($$$('::', 'AsciidoctorJ'), 'Extensions'), 'ExtensionRegistry')['$==='](ext_registry) : $d)))) { - self.extensions = ext_registry.$activate(self)} - } else if ($truthy((ext_block = options['$[]']("extensions"))['$nil?']())) { - if ($truthy($$($nesting, 'Extensions').$groups()['$empty?']())) { - } else { - self.extensions = $$$($$($nesting, 'Extensions'), 'Registry').$new().$activate(self) - } - } else if ($truthy($$$('::', 'Proc')['$==='](ext_block))) { - self.extensions = $send($$($nesting, 'Extensions'), 'create', [], ext_block.$to_proc()).$activate(self)}}; - self.reader = $$($nesting, 'PreprocessorReader').$new(self, data, $$$($$($nesting, 'Reader'), 'Cursor').$new(attrs['$[]']("docfile"), self.base_dir), $hash2(["normalize"], {"normalize": true})); - if ($truthy(self.sourcemap)) { - return (self.source_location = self.reader.$cursor()) - } else { - return nil - }; - }; - }, $Document_initialize$8.$$arity = -1); - - Opal.def(self, '$parse', $Document_parse$11 = function $$parse(data) { - var $a, $$12, $$13, self = this, doc = nil, exts = nil; - - - - if (data == null) { - data = nil; - }; - if ($truthy(self.parsed)) { - return self - } else { - - doc = self; - if ($truthy(data)) { - - self.reader = $$($nesting, 'PreprocessorReader').$new(doc, data, $$$($$($nesting, 'Reader'), 'Cursor').$new(self.attributes['$[]']("docfile"), self.base_dir), $hash2(["normalize"], {"normalize": true})); - if ($truthy(self.sourcemap)) { - self.source_location = self.reader.$cursor()};}; - if ($truthy(($truthy($a = (exts = (function() {if ($truthy(self.parent_document)) { - return nil - } else { - return self.extensions - }; return nil; })())) ? exts['$preprocessors?']() : $a))) { - $send(exts.$preprocessors(), 'each', [], ($$12 = function(ext){var self = $$12.$$s || this, $b; - if (self.reader == null) self.reader = nil; - - - - if (ext == null) { - ext = nil; - }; - return (self.reader = ($truthy($b = ext.$process_method()['$[]'](doc, self.reader)) ? $b : self.reader));}, $$12.$$s = self, $$12.$$arity = 1, $$12))}; - $$($nesting, 'Parser').$parse(self.reader, doc, $hash2(["header_only"], {"header_only": self.options['$[]']("parse_header_only")})); - self.$restore_attributes(); - if ($truthy(($truthy($a = exts) ? exts['$tree_processors?']() : $a))) { - $send(exts.$tree_processors(), 'each', [], ($$13 = function(ext){var self = $$13.$$s || this, $b, $c, result = nil; - - - - if (ext == null) { - ext = nil; - }; - if ($truthy(($truthy($b = ($truthy($c = (result = ext.$process_method()['$[]'](doc))) ? $$($nesting, 'Document')['$==='](result) : $c)) ? result['$!='](doc) : $b))) { - return (doc = result) - } else { - return nil - };}, $$13.$$s = self, $$13.$$arity = 1, $$13))}; - self.parsed = true; - return doc; - }; - }, $Document_parse$11.$$arity = -1); - - Opal.def(self, '$parsed?', $Document_parsed$ques$14 = function() { - var self = this; - - return self.parsed - }, $Document_parsed$ques$14.$$arity = 0); - - Opal.def(self, '$counter', $Document_counter$15 = function $$counter(name, seed) { - var $a, self = this, locked = nil, curr_val = nil, next_val = nil, $writer = nil; - - - - if (seed == null) { - seed = nil; - }; - if ($truthy(self.parent_document)) { - return self.parent_document.$counter(name, seed)}; - if ($truthy(($truthy($a = (locked = self['$attribute_locked?'](name))) ? (curr_val = self.counters['$[]'](name)) : $a))) { - next_val = (($writer = [name, $$($nesting, 'Helpers').$nextval(curr_val)]), $send(self.counters, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]) - } else if ($truthy((curr_val = self.attributes['$[]'](name))['$nil_or_empty?']()['$!']())) { - next_val = (($writer = [name, $$($nesting, 'Helpers').$nextval(curr_val)]), $send(self.counters, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]) - } else if ($truthy(seed)) { - next_val = (($writer = [name, (function() {if (seed['$=='](seed.$to_i().$to_s())) { - return seed.$to_i() - } else { - return seed - }; return nil; })()]), $send(self.counters, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]) - } else { - next_val = (($writer = [name, 1]), $send(self.counters, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]) - }; - if ($truthy(locked)) { - } else { - - $writer = [name, next_val]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - return next_val; - }, $Document_counter$15.$$arity = -2); - - Opal.def(self, '$increment_and_store_counter', $Document_increment_and_store_counter$16 = function $$increment_and_store_counter(counter_name, block) { - var self = this; - - return $$($nesting, 'AttributeEntry').$new(counter_name, self.$counter(counter_name)).$save_to(block.$attributes()).$value() - }, $Document_increment_and_store_counter$16.$$arity = 2); - Opal.alias(self, "counter_increment", "increment_and_store_counter"); - - Opal.def(self, '$register', $Document_register$17 = function $$register(type, value) { - var $a, self = this, $case = nil, id = nil, $logical_op_recvr_tmp_1 = nil, $writer = nil, ref = nil; - - return (function() {$case = type; - if ("ids"['$===']($case)) {return self.$register("refs", [(id = value['$[]'](0)), $$($nesting, 'Inline').$new(self, "anchor", value['$[]'](1), $hash2(["type", "id"], {"type": "ref", "id": id}))])} - else if ("refs"['$===']($case)) { - - $logical_op_recvr_tmp_1 = self.catalog['$[]']("refs"); - ($truthy($a = $logical_op_recvr_tmp_1['$[]'](value['$[]'](0))) ? $a : (($writer = [value['$[]'](0), (ref = value['$[]'](1))]), $send($logical_op_recvr_tmp_1, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));; - return ref;} - else if ("footnotes"['$===']($case)) {return self.catalog['$[]'](type)['$<<'](value)} - else {if ($truthy(self.options['$[]']("catalog_assets"))) { - return self.catalog['$[]'](type)['$<<']((function() {if (type['$==']("images")) { - - return $$($nesting, 'ImageReference').$new(value, self.attributes['$[]']("imagesdir")); - } else { - return value - }; return nil; })()) - } else { - return nil - }}})() - }, $Document_register$17.$$arity = 2); - - Opal.def(self, '$resolve_id', $Document_resolve_id$18 = function $$resolve_id(text) { - var $$19, $$21, self = this, resolved_id = nil; - - if ($truthy(self.reftexts)) { - return self.reftexts['$[]'](text) - } else if ($truthy(self.parsed)) { - return $send((self.reftexts = $hash2([], {})), 'tap', [], ($$19 = function(accum){var self = $$19.$$s || this, $$20; - if (self.catalog == null) self.catalog = nil; - - - - if (accum == null) { - accum = nil; - }; - return $send(self.catalog['$[]']("refs"), 'each', [], ($$20 = function(id, ref){var self = $$20.$$s || this, $a, $writer = nil; - - - - if (id == null) { - id = nil; - }; - - if (ref == null) { - ref = nil; - }; - return ($truthy($a = accum['$[]'](ref.$xreftext())) ? $a : (($writer = [ref.$xreftext(), id]), $send(accum, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));}, $$20.$$s = self, $$20.$$arity = 2, $$20));}, $$19.$$s = self, $$19.$$arity = 1, $$19))['$[]'](text) - } else { - - resolved_id = nil; - (function(){var $brk = Opal.new_brk(); try {return $send((self.reftexts = $hash2([], {})), 'tap', [], ($$21 = function(accum){var self = $$21.$$s || this, $$22; - if (self.catalog == null) self.catalog = nil; - - - - if (accum == null) { - accum = nil; - }; - return (function(){var $brk = Opal.new_brk(); try {return $send(self.catalog['$[]']("refs"), 'each', [], ($$22 = function(id, ref){var self = $$22.$$s || this, $a, xreftext = nil, $writer = nil; - - - - if (id == null) { - id = nil; - }; - - if (ref == null) { - ref = nil; - }; - if ((xreftext = ref.$xreftext())['$=='](text)) { - - - Opal.brk((resolved_id = id), $brk); - } else { - - return ($truthy($a = accum['$[]'](xreftext)) ? $a : (($writer = [xreftext, id]), $send(accum, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - };}, $$22.$$s = self, $$22.$$brk = $brk, $$22.$$arity = 2, $$22)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})();}, $$21.$$s = self, $$21.$$brk = $brk, $$21.$$arity = 1, $$21)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})(); - self.reftexts = nil; - return resolved_id; - } - }, $Document_resolve_id$18.$$arity = 1); - - Opal.def(self, '$footnotes?', $Document_footnotes$ques$23 = function() { - var self = this; - - if ($truthy(self.catalog['$[]']("footnotes")['$empty?']())) { - return false - } else { - return true - } - }, $Document_footnotes$ques$23.$$arity = 0); - - Opal.def(self, '$footnotes', $Document_footnotes$24 = function $$footnotes() { - var self = this; - - return self.catalog['$[]']("footnotes") - }, $Document_footnotes$24.$$arity = 0); - - Opal.def(self, '$callouts', $Document_callouts$25 = function $$callouts() { - var self = this; - - return self.catalog['$[]']("callouts") - }, $Document_callouts$25.$$arity = 0); - - Opal.def(self, '$nested?', $Document_nested$ques$26 = function() { - var self = this; - - if ($truthy(self.parent_document)) { - return true - } else { - return false - } - }, $Document_nested$ques$26.$$arity = 0); - - Opal.def(self, '$embedded?', $Document_embedded$ques$27 = function() { - var self = this; - - return self.attributes['$key?']("embedded") - }, $Document_embedded$ques$27.$$arity = 0); - - Opal.def(self, '$extensions?', $Document_extensions$ques$28 = function() { - var self = this; - - if ($truthy(self.extensions)) { - return true - } else { - return false - } - }, $Document_extensions$ques$28.$$arity = 0); - - Opal.def(self, '$source', $Document_source$29 = function $$source() { - var self = this; - - if ($truthy(self.reader)) { - return self.reader.$source() - } else { - return nil - } - }, $Document_source$29.$$arity = 0); - - Opal.def(self, '$source_lines', $Document_source_lines$30 = function $$source_lines() { - var self = this; - - if ($truthy(self.reader)) { - return self.reader.$source_lines() - } else { - return nil - } - }, $Document_source_lines$30.$$arity = 0); - - Opal.def(self, '$basebackend?', $Document_basebackend$ques$31 = function(base) { - var self = this; - - return self.attributes['$[]']("basebackend")['$=='](base) - }, $Document_basebackend$ques$31.$$arity = 1); - - Opal.def(self, '$title', $Document_title$32 = function $$title() { - var self = this; - - return self.$doctitle() - }, $Document_title$32.$$arity = 0); - - Opal.def(self, '$title=', $Document_title$eq$33 = function(title) { - var self = this, sect = nil, $writer = nil; - - - if ($truthy((sect = self.header))) { - } else { - - $writer = ["header"]; - $send((sect = (self.header = $$($nesting, 'Section').$new(self, 0))), 'sectname=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - - $writer = [title]; - $send(sect, 'title=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - }, $Document_title$eq$33.$$arity = 1); - - Opal.def(self, '$doctitle', $Document_doctitle$34 = function $$doctitle(opts) { - var $a, self = this, val = nil, sect = nil, separator = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy((val = self.attributes['$[]']("title")))) { - } else if ($truthy((sect = self.$first_section()))) { - val = sect.$title() - } else if ($truthy(($truthy($a = opts['$[]']("use_fallback")) ? (val = self.attributes['$[]']("untitled-label")) : $a)['$!']())) { - return nil}; - if ($truthy((separator = opts['$[]']("partition")))) { - return $$($nesting, 'Title').$new(val, opts.$merge($hash2(["separator"], {"separator": (function() {if (separator['$=='](true)) { - return self.attributes['$[]']("title-separator") - } else { - return separator - }; return nil; })()}))) - } else if ($truthy(($truthy($a = opts['$[]']("sanitize")) ? val['$include?']("<") : $a))) { - return val.$gsub($$($nesting, 'XmlSanitizeRx'), "").$squeeze(" ").$strip() - } else { - return val - }; - }, $Document_doctitle$34.$$arity = -1); - Opal.alias(self, "name", "doctitle"); - - Opal.def(self, '$xreftext', $Document_xreftext$35 = function $$xreftext(xrefstyle) { - var $a, self = this, val = nil; - - - - if (xrefstyle == null) { - xrefstyle = nil; - }; - if ($truthy(($truthy($a = (val = self.$reftext())) ? val['$empty?']()['$!']() : $a))) { - return val - } else { - return self.$title() - }; - }, $Document_xreftext$35.$$arity = -1); - - Opal.def(self, '$author', $Document_author$36 = function $$author() { - var self = this; - - return self.attributes['$[]']("author") - }, $Document_author$36.$$arity = 0); - - Opal.def(self, '$authors', $Document_authors$37 = function $$authors() { - var $a, self = this, attrs = nil, authors = nil, num_authors = nil, idx = nil; - - if ($truthy((attrs = self.attributes)['$key?']("author"))) { - - authors = [$$($nesting, 'Author').$new(attrs['$[]']("author"), attrs['$[]']("firstname"), attrs['$[]']("middlename"), attrs['$[]']("lastname"), attrs['$[]']("authorinitials"), attrs['$[]']("email"))]; - if ($truthy($rb_gt((num_authors = ($truthy($a = attrs['$[]']("authorcount")) ? $a : 0)), 1))) { - - idx = 1; - while ($truthy($rb_lt(idx, num_authors))) { - - idx = $rb_plus(idx, 1); - authors['$<<']($$($nesting, 'Author').$new(attrs['$[]']("" + "author_" + (idx)), attrs['$[]']("" + "firstname_" + (idx)), attrs['$[]']("" + "middlename_" + (idx)), attrs['$[]']("" + "lastname_" + (idx)), attrs['$[]']("" + "authorinitials_" + (idx)), attrs['$[]']("" + "email_" + (idx)))); - };}; - return authors; - } else { - return [] - } - }, $Document_authors$37.$$arity = 0); - - Opal.def(self, '$revdate', $Document_revdate$38 = function $$revdate() { - var self = this; - - return self.attributes['$[]']("revdate") - }, $Document_revdate$38.$$arity = 0); - - Opal.def(self, '$notitle', $Document_notitle$39 = function $$notitle() { - var self = this; - - return self.attributes['$key?']("notitle") - }, $Document_notitle$39.$$arity = 0); - - Opal.def(self, '$noheader', $Document_noheader$40 = function $$noheader() { - var self = this; - - return self.attributes['$key?']("noheader") - }, $Document_noheader$40.$$arity = 0); - - Opal.def(self, '$nofooter', $Document_nofooter$41 = function $$nofooter() { - var self = this; - - return self.attributes['$key?']("nofooter") - }, $Document_nofooter$41.$$arity = 0); - - Opal.def(self, '$first_section', $Document_first_section$42 = function $$first_section() { - var $a, $$43, self = this; - - return ($truthy($a = self.header) ? $a : $send(self.blocks, 'find', [], ($$43 = function(e){var self = $$43.$$s || this; - - - - if (e == null) { - e = nil; - }; - return e.$context()['$==']("section");}, $$43.$$s = self, $$43.$$arity = 1, $$43))) - }, $Document_first_section$42.$$arity = 0); - - Opal.def(self, '$header?', $Document_header$ques$44 = function() { - var self = this; - - if ($truthy(self.header)) { - return true - } else { - return false - } - }, $Document_header$ques$44.$$arity = 0); - Opal.alias(self, "has_header?", "header?"); - - Opal.def(self, '$<<', $Document_$lt$lt$45 = function(block) { - var $iter = $Document_$lt$lt$45.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Document_$lt$lt$45.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - if (block.$context()['$==']("section")) { - self.$assign_numeral(block)}; - return $send(self, Opal.find_super_dispatcher(self, '<<', $Document_$lt$lt$45, false), $zuper, $iter); - }, $Document_$lt$lt$45.$$arity = 1); - - Opal.def(self, '$finalize_header', $Document_finalize_header$46 = function $$finalize_header(unrooted_attributes, header_valid) { - var self = this, $writer = nil; - - - - if (header_valid == null) { - header_valid = true; - }; - self.$clear_playback_attributes(unrooted_attributes); - self.$save_attributes(); - if ($truthy(header_valid)) { - } else { - - $writer = ["invalid-header", true]; - $send(unrooted_attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - return unrooted_attributes; - }, $Document_finalize_header$46.$$arity = -2); - - Opal.def(self, '$playback_attributes', $Document_playback_attributes$47 = function $$playback_attributes(block_attributes) { - var $$48, self = this; - - if ($truthy(block_attributes['$key?']("attribute_entries"))) { - return $send(block_attributes['$[]']("attribute_entries"), 'each', [], ($$48 = function(entry){var self = $$48.$$s || this, name = nil, $writer = nil; - if (self.attributes == null) self.attributes = nil; - - - - if (entry == null) { - entry = nil; - }; - name = entry.$name(); - if ($truthy(entry.$negate())) { - - self.attributes.$delete(name); - if (name['$==']("compat-mode")) { - return (self.compat_mode = false) - } else { - return nil - }; - } else { - - - $writer = [name, entry.$value()]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if (name['$==']("compat-mode")) { - return (self.compat_mode = true) - } else { - return nil - }; - };}, $$48.$$s = self, $$48.$$arity = 1, $$48)) - } else { - return nil - } - }, $Document_playback_attributes$47.$$arity = 1); - - Opal.def(self, '$restore_attributes', $Document_restore_attributes$49 = function $$restore_attributes() { - var self = this; - - - if ($truthy(self.parent_document)) { - } else { - self.catalog['$[]']("callouts").$rewind() - }; - return self.attributes.$replace(self.header_attributes); - }, $Document_restore_attributes$49.$$arity = 0); - - Opal.def(self, '$set_attribute', $Document_set_attribute$50 = function $$set_attribute(name, value) { - var $a, self = this, $writer = nil, $case = nil; - - - - if (value == null) { - value = ""; - }; - if ($truthy(self['$attribute_locked?'](name))) { - return nil - } else { - - if ($truthy(value['$empty?']())) { - } else { - value = self.$apply_attribute_value_subs(value) - }; - if ($truthy(self.header_attributes)) { - - $writer = [name, value]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $case = name; - if ("backend"['$===']($case)) {self.$update_backend_attributes(value, ($truthy($a = self.attributes_modified['$delete?']("htmlsyntax")) ? value['$=='](self.backend) : $a))} - else if ("doctype"['$===']($case)) {self.$update_doctype_attributes(value)} - else { - $writer = [name, value]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - self.attributes_modified['$<<'](name); - }; - return value; - }; - }, $Document_set_attribute$50.$$arity = -2); - - Opal.def(self, '$delete_attribute', $Document_delete_attribute$51 = function $$delete_attribute(name) { - var self = this; - - if ($truthy(self['$attribute_locked?'](name))) { - return false - } else { - - self.attributes.$delete(name); - self.attributes_modified['$<<'](name); - return true; - } - }, $Document_delete_attribute$51.$$arity = 1); - - Opal.def(self, '$attribute_locked?', $Document_attribute_locked$ques$52 = function(name) { - var self = this; - - return self.attribute_overrides['$key?'](name) - }, $Document_attribute_locked$ques$52.$$arity = 1); - - Opal.def(self, '$set_header_attribute', $Document_set_header_attribute$53 = function $$set_header_attribute(name, value, overwrite) { - var $a, self = this, attrs = nil, $writer = nil; - - - - if (value == null) { - value = ""; - }; - - if (overwrite == null) { - overwrite = true; - }; - attrs = ($truthy($a = self.header_attributes) ? $a : self.attributes); - if ($truthy((($a = overwrite['$=='](false)) ? attrs['$key?'](name) : overwrite['$=='](false)))) { - return false - } else { - - - $writer = [name, value]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return true; - }; - }, $Document_set_header_attribute$53.$$arity = -2); - - Opal.def(self, '$convert', $Document_convert$54 = function $$convert(opts) { - var $a, $$55, self = this, $writer = nil, block = nil, output = nil, transform = nil, exts = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy(self.timings)) { - self.timings.$start("convert")}; - if ($truthy(self.parsed)) { - } else { - self.$parse() - }; - if ($truthy(($truthy($a = $rb_ge(self.safe, $$$($$($nesting, 'SafeMode'), 'SERVER'))) ? $a : opts['$empty?']()))) { - } else { - - if ($truthy((($writer = ["outfile", opts['$[]']("outfile")]), $send(self.attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))) { - } else { - self.attributes.$delete("outfile") - }; - if ($truthy((($writer = ["outdir", opts['$[]']("outdir")]), $send(self.attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))) { - } else { - self.attributes.$delete("outdir") - }; - }; - if (self.$doctype()['$==']("inline")) { - if ($truthy((block = ($truthy($a = self.blocks['$[]'](0)) ? $a : self.header)))) { - if ($truthy(($truthy($a = block.$content_model()['$==']("compound")) ? $a : block.$content_model()['$==']("empty")))) { - self.$logger().$warn("no inline candidate; use the inline doctype to convert a single paragragh, verbatim, or raw block") - } else { - output = block.$content() - }} - } else { - - if ($truthy(opts['$key?']("standalone"))) { - transform = (function() {if ($truthy(opts['$[]']("standalone"))) { - return "document" - } else { - return "embedded" - }; return nil; })() - } else if ($truthy(opts['$key?']("header_footer"))) { - transform = (function() {if ($truthy(opts['$[]']("header_footer"))) { - return "document" - } else { - return "embedded" - }; return nil; })() - } else { - transform = (function() {if ($truthy(self.options['$[]']("standalone"))) { - return "document" - } else { - return "embedded" - }; return nil; })() - }; - output = self.converter.$convert(self, transform); - }; - if ($truthy(self.parent_document)) { - } else if ($truthy(($truthy($a = (exts = self.extensions)) ? exts['$postprocessors?']() : $a))) { - $send(exts.$postprocessors(), 'each', [], ($$55 = function(ext){var self = $$55.$$s || this; - - - - if (ext == null) { - ext = nil; - }; - return (output = ext.$process_method()['$[]'](self, output));}, $$55.$$s = self, $$55.$$arity = 1, $$55))}; - if ($truthy(self.timings)) { - self.timings.$record("convert")}; - return output; - }, $Document_convert$54.$$arity = -1); - Opal.alias(self, "render", "convert"); - - Opal.def(self, '$write', $Document_write$56 = function $$write(output, target) { - var $a, $b, self = this; - - - if ($truthy(self.timings)) { - self.timings.$start("write")}; - if ($truthy($$($nesting, 'Writer')['$==='](self.converter))) { - self.converter.$write(output, target) - } else { - - if ($truthy(target['$respond_to?']("write"))) { - if ($truthy(output['$nil_or_empty?']())) { - } else { - - target.$write(output.$chomp()); - target.$write($$($nesting, 'LF')); - } - } else { - $$$('::', 'File').$write(target, output, $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')})) - }; - if ($truthy(($truthy($a = (($b = self.backend['$==']("manpage")) ? $$$('::', 'String')['$==='](target) : self.backend['$==']("manpage"))) ? self.converter.$class()['$respond_to?']("write_alternate_pages") : $a))) { - self.converter.$class().$write_alternate_pages(self.attributes['$[]']("mannames"), self.attributes['$[]']("manvolnum"), target)}; - }; - if ($truthy(self.timings)) { - self.timings.$record("write")}; - return nil; - }, $Document_write$56.$$arity = 2); - - Opal.def(self, '$content', $Document_content$57 = function $$content() { - var $iter = $Document_content$57.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Document_content$57.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - self.attributes.$delete("title"); - return $send(self, Opal.find_super_dispatcher(self, 'content', $Document_content$57, false), $zuper, $iter); - }, $Document_content$57.$$arity = 0); - - Opal.def(self, '$docinfo', $Document_docinfo$58 = function $$docinfo(location, suffix) { - var $$59, $a, $$60, self = this, qualifier = nil, docinfo = nil, content = nil, docinfo_file = nil, docinfo_dir = nil, docinfo_subs = nil, docinfo_path = nil, shared_docinfo = nil, private_docinfo = nil; - - - - if (location == null) { - location = "head"; - }; - - if (suffix == null) { - suffix = nil; - }; - if ($truthy($rb_lt(self.$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')))) { - - if (location['$==']("head")) { - } else { - qualifier = "" + "-" + (location) - }; - if ($truthy(suffix)) { - } else { - suffix = self.outfilesuffix - }; - if ($truthy((docinfo = self.attributes['$[]']("docinfo"))['$nil_or_empty?']())) { - if ($truthy(self.attributes['$key?']("docinfo2"))) { - docinfo = ["private", "shared"] - } else if ($truthy(self.attributes['$key?']("docinfo1"))) { - docinfo = ["shared"] - } else { - docinfo = (function() {if ($truthy(docinfo)) { - return ["private"] - } else { - return nil - }; return nil; })() - } - } else { - docinfo = $send(docinfo.$split(","), 'map', [], ($$59 = function(it){var self = $$59.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$strip();}, $$59.$$s = self, $$59.$$arity = 1, $$59)) - }; - if ($truthy(docinfo)) { - - content = []; - $a = ["" + "docinfo" + (qualifier) + (suffix), self.attributes['$[]']("docinfodir"), self.$resolve_docinfo_subs()], (docinfo_file = $a[0]), (docinfo_dir = $a[1]), (docinfo_subs = $a[2]), $a; - if ($truthy(docinfo['$&'](["shared", "" + "shared-" + (location)])['$empty?']())) { - } else { - - docinfo_path = self.$normalize_system_path(docinfo_file, docinfo_dir); - if ($truthy((shared_docinfo = self.$read_asset(docinfo_path, $hash2(["normalize"], {"normalize": true}))))) { - content['$<<'](self.$apply_subs(shared_docinfo, docinfo_subs))}; - }; - if ($truthy(($truthy($a = self.attributes['$[]']("docname")['$nil_or_empty?']()) ? $a : docinfo['$&'](["private", "" + "private-" + (location)])['$empty?']()))) { - } else { - - docinfo_path = self.$normalize_system_path("" + (self.attributes['$[]']("docname")) + "-" + (docinfo_file), docinfo_dir); - if ($truthy((private_docinfo = self.$read_asset(docinfo_path, $hash2(["normalize"], {"normalize": true}))))) { - content['$<<'](self.$apply_subs(private_docinfo, docinfo_subs))}; - };};}; - if ($truthy(($truthy($a = self.extensions) ? self['$docinfo_processors?'](location) : $a))) { - return ($truthy($a = content) ? $a : []).$concat($send(self.docinfo_processor_extensions['$[]'](location), 'map', [], ($$60 = function(ext){var self = $$60.$$s || this; - - - - if (ext == null) { - ext = nil; - }; - return ext.$process_method()['$[]'](self);}, $$60.$$s = self, $$60.$$arity = 1, $$60)).$compact()).$join($$($nesting, 'LF')) - } else if ($truthy(content)) { - return content.$join($$($nesting, 'LF')) - } else { - return "" - }; - }, $Document_docinfo$58.$$arity = -1); - - Opal.def(self, '$docinfo_processors?', $Document_docinfo_processors$ques$61 = function(location) { - var $a, self = this, $writer = nil; - - - - if (location == null) { - location = "head"; - }; - if ($truthy(self.docinfo_processor_extensions['$key?'](location))) { - return self.docinfo_processor_extensions['$[]'](location)['$!='](false) - } else if ($truthy(($truthy($a = self.extensions) ? self.document.$extensions()['$docinfo_processors?'](location) : $a))) { - return (($writer = [location, self.document.$extensions().$docinfo_processors(location)]), $send(self.docinfo_processor_extensions, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])['$!']()['$!']() - } else { - - $writer = [location, false]; - $send(self.docinfo_processor_extensions, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }; - }, $Document_docinfo_processors$ques$61.$$arity = -1); - - Opal.def(self, '$to_s', $Document_to_s$62 = function $$to_s() { - var self = this; - - return "" + "#<" + (self.$class()) + "@" + (self.$object_id()) + " {doctype: " + (self.$doctype().$inspect()) + ", doctitle: " + ((function() {if ($truthy(self.header['$!='](nil))) { - return self.header.$title() - } else { - return nil - }; return nil; })().$inspect()) + ", blocks: " + (self.blocks.$size()) + "}>" - }, $Document_to_s$62.$$arity = 0); - self.$private(); - - Opal.def(self, '$apply_attribute_value_subs', $Document_apply_attribute_value_subs$63 = function $$apply_attribute_value_subs(value) { - var $a, self = this; - - - if ($truthy($$($nesting, 'AttributeEntryPassMacroRx')['$=~'](value))) { - - value = (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)); - if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)))) { - value = self.$apply_subs(value, self.$resolve_pass_subs((($a = $gvars['~']) === nil ? nil : $a['$[]'](1))))}; - } else { - value = self.$apply_header_subs(value) - }; - if ($truthy(self.max_attribute_value_size)) { - - return self.$limit_bytesize(value, self.max_attribute_value_size); - } else { - return value - }; - }, $Document_apply_attribute_value_subs$63.$$arity = 1); - - Opal.def(self, '$limit_bytesize', $Document_limit_bytesize$64 = function $$limit_bytesize(str, max) { - var $a, self = this; - - - if ($truthy($rb_gt(str.$bytesize(), max))) { - while (!($truthy((str = str.$byteslice(0, max))['$valid_encoding?']()))) { - max = $rb_minus(max, 1) - }}; - return str; - }, $Document_limit_bytesize$64.$$arity = 2); - - Opal.def(self, '$resolve_docinfo_subs', $Document_resolve_docinfo_subs$65 = function $$resolve_docinfo_subs() { - var self = this; - - if ($truthy(self.attributes['$key?']("docinfosubs"))) { - - return self.$resolve_subs(self.attributes['$[]']("docinfosubs"), "block", nil, "docinfo"); - } else { - return ["attributes"] - } - }, $Document_resolve_docinfo_subs$65.$$arity = 0); - - Opal.def(self, '$create_converter', $Document_create_converter$66 = function $$create_converter(backend, delegate_backend) { - var $a, self = this, converter_opts = nil, template_dirs = nil, opts = nil, $writer = nil, converter = nil; - - - converter_opts = $hash2(["document", "htmlsyntax"], {"document": self, "htmlsyntax": self.attributes['$[]']("htmlsyntax")}); - if ($truthy((template_dirs = ($truthy($a = (opts = self.options)['$[]']("template_dirs")) ? $a : opts['$[]']("template_dir"))))) { - - - $writer = ["template_dirs", [].concat(Opal.to_a(template_dirs))]; - $send(converter_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["template_cache", opts.$fetch("template_cache", true)]; - $send(converter_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["template_engine", opts['$[]']("template_engine")]; - $send(converter_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["template_engine_options", opts['$[]']("template_engine_options")]; - $send(converter_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["eruby", opts['$[]']("eruby")]; - $send(converter_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["safe", self.safe]; - $send(converter_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(delegate_backend)) { - - $writer = ["delegate_backend", delegate_backend]; - $send(converter_opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];};}; - if ($truthy((converter = opts['$[]']("converter")))) { - return $$$($$($nesting, 'Converter'), 'CustomFactory').$new($hash(backend, converter)).$create(backend, converter_opts) - } else { - return opts.$fetch("converter_factory", $$($nesting, 'Converter')).$create(backend, converter_opts) - }; - }, $Document_create_converter$66.$$arity = 2); - - Opal.def(self, '$clear_playback_attributes', $Document_clear_playback_attributes$67 = function $$clear_playback_attributes(attributes) { - var self = this; - - return attributes.$delete("attribute_entries") - }, $Document_clear_playback_attributes$67.$$arity = 1); - - Opal.def(self, '$save_attributes', $Document_save_attributes$68 = function $$save_attributes() { - var $a, $$69, self = this, attrs = nil, doctitle_val = nil, $writer = nil, toc_val = nil, toc_position_val = nil, toc_placement_val = nil, default_toc_position = nil, default_toc_class = nil, position = nil, $case = nil, icons_val = nil, basebackend = nil, syntax_hl_name = nil, syntax_hl_factory = nil, syntax_hls = nil; - - - if ($truthy(($truthy($a = (attrs = self.attributes)['$key?']("doctitle")) ? $a : (doctitle_val = self.$doctitle())['$!']()))) { - } else { - - $writer = ["doctitle", doctitle_val]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - self.id = ($truthy($a = self.id) ? $a : attrs['$[]']("css-signature")); - if ($truthy((toc_val = (function() {if ($truthy(attrs.$delete("toc2"))) { - return "left" - } else { - return attrs['$[]']("toc") - }; return nil; })()))) { - - toc_position_val = (function() {if ($truthy(($truthy($a = (toc_placement_val = attrs.$fetch("toc-placement", "macro"))) ? toc_placement_val['$!=']("auto") : $a))) { - return toc_placement_val - } else { - return attrs['$[]']("toc-position") - }; return nil; })(); - if ($truthy(($truthy($a = toc_val['$empty?']()) ? toc_position_val['$nil_or_empty?']() : $a))) { - } else { - - default_toc_position = "left"; - default_toc_class = "toc2"; - position = (function() {if ($truthy(toc_position_val['$nil_or_empty?']())) { - - if ($truthy(toc_val['$empty?']())) { - return default_toc_position - } else { - return toc_val - }; - } else { - return toc_position_val - }; return nil; })(); - - $writer = ["toc", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["toc-placement", "auto"]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - $case = position; - if ("left"['$===']($case) || "<"['$===']($case) || "<"['$===']($case)) { - $writer = ["toc-position", "left"]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - else if ("right"['$===']($case) || ">"['$===']($case) || ">"['$===']($case)) { - $writer = ["toc-position", "right"]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - else if ("top"['$===']($case) || "^"['$===']($case)) { - $writer = ["toc-position", "top"]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - else if ("bottom"['$===']($case) || "v"['$===']($case)) { - $writer = ["toc-position", "bottom"]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - else if ("preamble"['$===']($case) || "macro"['$===']($case)) { - - $writer = ["toc-position", "content"]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["toc-placement", position]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - default_toc_class = nil;} - else { - attrs.$delete("toc-position"); - default_toc_class = nil;}; - if ($truthy(default_toc_class)) { - ($truthy($a = attrs['$[]']("toc-class")) ? $a : (($writer = ["toc-class", default_toc_class]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))}; - };}; - if ($truthy(($truthy($a = (icons_val = attrs['$[]']("icons"))) ? attrs['$key?']("icontype")['$!']() : $a))) { - $case = icons_val; - if (""['$===']($case) || "font"['$===']($case)) {nil} - else { - - $writer = ["icons", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if (icons_val['$==']("image")) { - } else { - - $writer = ["icontype", icons_val]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - };}}; - if ($truthy((self.compat_mode = attrs['$key?']("compat-mode")))) { - if ($truthy(attrs['$key?']("language"))) { - - $writer = ["source-language", attrs['$[]']("language")]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}}; - if ($truthy(self.parent_document)) { - } else { - - if ((basebackend = attrs['$[]']("basebackend"))['$==']("html")) { - if ($truthy(($truthy($a = (syntax_hl_name = attrs['$[]']("source-highlighter"))) ? attrs['$[]']("" + (syntax_hl_name) + "-unavailable")['$!']() : $a))) { - if ($truthy((syntax_hl_factory = self.options['$[]']("syntax_highlighter_factory")))) { - self.syntax_highlighter = syntax_hl_factory.$create(syntax_hl_name, self.backend, $hash2(["document"], {"document": self})) - } else if ($truthy((syntax_hls = self.options['$[]']("syntax_highlighters")))) { - self.syntax_highlighter = $$$($$($nesting, 'SyntaxHighlighter'), 'DefaultFactoryProxy').$new(syntax_hls).$create(syntax_hl_name, self.backend, $hash2(["document"], {"document": self})) - } else { - self.syntax_highlighter = $$($nesting, 'SyntaxHighlighter').$create(syntax_hl_name, self.backend, $hash2(["document"], {"document": self})) - }} - } else if (basebackend['$==']("docbook")) { - - if ($truthy(($truthy($a = self['$attribute_locked?']("toc")) ? $a : self.attributes_modified['$include?']("toc")))) { - } else { - - $writer = ["toc", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy(($truthy($a = self['$attribute_locked?']("sectnums")) ? $a : self.attributes_modified['$include?']("sectnums")))) { - } else { - - $writer = ["sectnums", ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - };}; - self.outfilesuffix = attrs['$[]']("outfilesuffix"); - $send($$($nesting, 'FLEXIBLE_ATTRIBUTES'), 'each', [], ($$69 = function(name){var self = $$69.$$s || this, $b; - if (self.attribute_overrides == null) self.attribute_overrides = nil; - - - - if (name == null) { - name = nil; - }; - if ($truthy(($truthy($b = self.attribute_overrides['$key?'](name)) ? self.attribute_overrides['$[]'](name) : $b))) { - return self.attribute_overrides.$delete(name) - } else { - return nil - };}, $$69.$$s = self, $$69.$$arity = 1, $$69)); - }; - return (self.header_attributes = attrs.$merge()); - }, $Document_save_attributes$68.$$arity = 0); - - Opal.def(self, '$fill_datetime_attributes', $Document_fill_datetime_attributes$70 = function $$fill_datetime_attributes(attrs, input_mtime) { - var $a, $b, self = this, now = nil, source_date_epoch = nil, localdate = nil, $writer = nil, localtime = nil, docdate = nil, doctime = nil; - - - now = (function() {if ($truthy($$$('::', 'ENV')['$key?']("SOURCE_DATE_EPOCH"))) { - - return (source_date_epoch = $$$('::', 'Time').$at(self.$Integer($$$('::', 'ENV')['$[]']("SOURCE_DATE_EPOCH"))).$utc()); - } else { - return $$$('::', 'Time').$now() - }; return nil; })(); - if ($truthy((localdate = attrs['$[]']("localdate")))) { - ($truthy($a = attrs['$[]']("localyear")) ? $a : (($writer = ["localyear", (function() {if (localdate.$index("-")['$=='](4)) { - - return localdate.$slice(0, 4); - } else { - return nil - }; return nil; })()]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - } else { - - localdate = (($writer = ["localdate", now.$strftime("%F")]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]); - ($truthy($a = attrs['$[]']("localyear")) ? $a : (($writer = ["localyear", now.$year().$to_s()]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - }; - localtime = ($truthy($a = attrs['$[]']("localtime")) ? $a : (($writer = ["localtime", now.$strftime("" + "%T " + ((function() {if (now.$utc_offset()['$=='](0)) { - return "UTC" - } else { - return "%z" - }; return nil; })()))]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - ($truthy($a = attrs['$[]']("localdatetime")) ? $a : (($writer = ["localdatetime", "" + (localdate) + " " + (localtime)]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - input_mtime = ($truthy($a = ($truthy($b = source_date_epoch) ? $b : input_mtime)) ? $a : now); - if ($truthy((docdate = attrs['$[]']("docdate")))) { - ($truthy($a = attrs['$[]']("docyear")) ? $a : (($writer = ["docyear", (function() {if (docdate.$index("-")['$=='](4)) { - - return docdate.$slice(0, 4); - } else { - return nil - }; return nil; })()]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - } else { - - docdate = (($writer = ["docdate", input_mtime.$strftime("%F")]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]); - ($truthy($a = attrs['$[]']("docyear")) ? $a : (($writer = ["docyear", input_mtime.$year().$to_s()]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - }; - doctime = ($truthy($a = attrs['$[]']("doctime")) ? $a : (($writer = ["doctime", input_mtime.$strftime("" + "%T " + ((function() {if (input_mtime.$utc_offset()['$=='](0)) { - return "UTC" - } else { - return "%z" - }; return nil; })()))]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - ($truthy($a = attrs['$[]']("docdatetime")) ? $a : (($writer = ["docdatetime", "" + (docdate) + " " + (doctime)]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - return nil; - }, $Document_fill_datetime_attributes$70.$$arity = 2); - - Opal.def(self, '$update_backend_attributes', $Document_update_backend_attributes$71 = function $$update_backend_attributes(new_backend, init) { - var $a, $b, self = this, current_backend = nil, current_basebackend = nil, attrs = nil, current_doctype = nil, actual_backend = nil, _ = nil, $writer = nil, delegate_backend = nil, converter = nil, new_basebackend = nil, new_filetype = nil, htmlsyntax = nil, backend_traits = nil, current_filetype = nil, page_width = nil; - - - - if (init == null) { - init = nil; - }; - if ($truthy(($truthy($a = init) ? $a : new_backend['$!='](self.backend)))) { - - current_backend = self.backend; - current_basebackend = (attrs = self.attributes)['$[]']("basebackend"); - current_doctype = self.doctype; - if ($truthy(new_backend['$include?'](":"))) { - $b = new_backend.$partition(":"), $a = Opal.to_ary($b), (actual_backend = ($a[0] == null ? nil : $a[0])), (_ = ($a[1] == null ? nil : $a[1])), (new_backend = ($a[2] == null ? nil : $a[2])), $b}; - if ($truthy(new_backend['$start_with?']("xhtml"))) { - - - $writer = ["htmlsyntax", "xml"]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - new_backend = new_backend.$slice(1, new_backend.$length()); - } else if ($truthy(new_backend['$start_with?']("html"))) { - ($truthy($a = attrs['$[]']("htmlsyntax")) ? $a : (($writer = ["htmlsyntax", "html"]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))}; - new_backend = ($truthy($a = $$($nesting, 'BACKEND_ALIASES')['$[]'](new_backend)) ? $a : new_backend); - if ($truthy(actual_backend)) { - $a = [actual_backend, new_backend], (new_backend = $a[0]), (delegate_backend = $a[1]), $a}; - if ($truthy(current_doctype)) { - - if ($truthy(current_backend)) { - - attrs.$delete("" + "backend-" + (current_backend)); - attrs.$delete("" + "backend-" + (current_backend) + "-doctype-" + (current_doctype));}; - - $writer = ["" + "backend-" + (new_backend) + "-doctype-" + (current_doctype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["" + "doctype-" + (current_doctype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else if ($truthy(current_backend)) { - attrs.$delete("" + "backend-" + (current_backend))}; - - $writer = ["" + "backend-" + (new_backend), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - self.backend = (($writer = ["backend", new_backend]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]); - if ($truthy($$$($$($nesting, 'Converter'), 'BackendTraits')['$===']((converter = self.$create_converter(new_backend, delegate_backend))))) { - - new_basebackend = converter.$basebackend(); - new_filetype = converter.$filetype(); - if ($truthy((htmlsyntax = converter.$htmlsyntax()))) { - - $writer = ["htmlsyntax", htmlsyntax]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(init)) { - ($truthy($a = attrs['$[]']("outfilesuffix")) ? $a : (($writer = ["outfilesuffix", converter.$outfilesuffix()]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - } else if ($truthy(self['$attribute_locked?']("outfilesuffix"))) { - } else { - - $writer = ["outfilesuffix", converter.$outfilesuffix()]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - } else if ($truthy(converter)) { - - backend_traits = $$($nesting, 'Converter').$derive_backend_traits(new_backend); - new_basebackend = backend_traits['$[]']("basebackend"); - new_filetype = backend_traits['$[]']("filetype"); - if ($truthy(init)) { - ($truthy($a = attrs['$[]']("outfilesuffix")) ? $a : (($writer = ["outfilesuffix", backend_traits['$[]']("outfilesuffix")]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - } else if ($truthy(self['$attribute_locked?']("outfilesuffix"))) { - } else { - - $writer = ["outfilesuffix", backend_traits['$[]']("outfilesuffix")]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - } else { - self.$raise($$$('::', 'NotImplementedError'), "" + "asciidoctor: FAILED: missing converter for backend '" + (new_backend) + "'. Processing aborted.") - }; - self.converter = converter; - if ($truthy((current_filetype = attrs['$[]']("filetype")))) { - attrs.$delete("" + "filetype-" + (current_filetype))}; - - $writer = ["filetype", new_filetype]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["" + "filetype-" + (new_filetype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy((page_width = $$($nesting, 'DEFAULT_PAGE_WIDTHS')['$[]'](new_basebackend)))) { - - $writer = ["pagewidth", page_width]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - attrs.$delete("pagewidth") - }; - if ($truthy(new_basebackend['$!='](current_basebackend))) { - - if ($truthy(current_doctype)) { - - if ($truthy(current_basebackend)) { - - attrs.$delete("" + "basebackend-" + (current_basebackend)); - attrs.$delete("" + "basebackend-" + (current_basebackend) + "-doctype-" + (current_doctype));}; - - $writer = ["" + "basebackend-" + (new_basebackend) + "-doctype-" + (current_doctype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else if ($truthy(current_basebackend)) { - attrs.$delete("" + "basebackend-" + (current_basebackend))}; - - $writer = ["" + "basebackend-" + (new_basebackend), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["basebackend", new_basebackend]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - return new_backend; - } else { - return nil - }; - }, $Document_update_backend_attributes$71.$$arity = -2); - return (Opal.def(self, '$update_doctype_attributes', $Document_update_doctype_attributes$72 = function $$update_doctype_attributes(new_doctype) { - var $a, self = this, attrs = nil, current_backend = nil, current_basebackend = nil, current_doctype = nil, $writer = nil; - - if ($truthy(($truthy($a = new_doctype) ? new_doctype['$!='](self.doctype) : $a))) { - - $a = [self.backend, (attrs = self.attributes)['$[]']("basebackend"), self.doctype], (current_backend = $a[0]), (current_basebackend = $a[1]), (current_doctype = $a[2]), $a; - if ($truthy(current_doctype)) { - - attrs.$delete("" + "doctype-" + (current_doctype)); - if ($truthy(current_backend)) { - - attrs.$delete("" + "backend-" + (current_backend) + "-doctype-" + (current_doctype)); - - $writer = ["" + "backend-" + (current_backend) + "-doctype-" + (new_doctype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - if ($truthy(current_basebackend)) { - - attrs.$delete("" + "basebackend-" + (current_basebackend) + "-doctype-" + (current_doctype)); - - $writer = ["" + "basebackend-" + (current_basebackend) + "-doctype-" + (new_doctype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - } else { - - if ($truthy(current_backend)) { - - $writer = ["" + "backend-" + (current_backend) + "-doctype-" + (new_doctype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(current_basebackend)) { - - $writer = ["" + "basebackend-" + (current_basebackend) + "-doctype-" + (new_doctype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - }; - - $writer = ["" + "doctype-" + (new_doctype), ""]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return (self.doctype = (($writer = ["doctype", new_doctype]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - } else { - return nil - } - }, $Document_update_doctype_attributes$72.$$arity = 1), nil) && 'update_doctype_attributes'; - })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/inline"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy; - - Opal.add_stubs(['$attr_accessor', '$attr_reader', '$[]', '$convert', '$converter', '$attr', '$==', '$apply_reftext_subs', '$reftext']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Inline'); - - var $nesting = [self].concat($parent_nesting), $Inline_initialize$1, $Inline_block$ques$2, $Inline_inline$ques$3, $Inline_convert$4, $Inline_alt$5, $Inline_reftext$ques$6, $Inline_reftext$7, $Inline_xreftext$8; - - self.$$prototype.text = self.$$prototype.type = nil; - - self.$attr_accessor("text"); - self.$attr_reader("type"); - self.$attr_accessor("target"); - - Opal.def(self, '$initialize', $Inline_initialize$1 = function $$initialize(parent, context, text, opts) { - var $iter = $Inline_initialize$1.$$p, $yield = $iter || nil, self = this; - - if ($iter) $Inline_initialize$1.$$p = null; - - - if (text == null) { - text = nil; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $Inline_initialize$1, false), [parent, context, opts], null); - self.node_name = "" + "inline_" + (context); - self.text = text; - self.id = opts['$[]']("id"); - self.type = opts['$[]']("type"); - return (self.target = opts['$[]']("target")); - }, $Inline_initialize$1.$$arity = -3); - - Opal.def(self, '$block?', $Inline_block$ques$2 = function() { - var self = this; - - return false - }, $Inline_block$ques$2.$$arity = 0); - - Opal.def(self, '$inline?', $Inline_inline$ques$3 = function() { - var self = this; - - return true - }, $Inline_inline$ques$3.$$arity = 0); - - Opal.def(self, '$convert', $Inline_convert$4 = function $$convert() { - var self = this; - - return self.$converter().$convert(self) - }, $Inline_convert$4.$$arity = 0); - Opal.alias(self, "render", "convert"); - - Opal.def(self, '$alt', $Inline_alt$5 = function $$alt() { - var $a, self = this; - - return ($truthy($a = self.$attr("alt")) ? $a : "") - }, $Inline_alt$5.$$arity = 0); - - Opal.def(self, '$reftext?', $Inline_reftext$ques$6 = function() { - var $a, $b, self = this; - - return ($truthy($a = self.text) ? ($truthy($b = self.type['$==']("ref")) ? $b : self.type['$==']("bibref")) : $a) - }, $Inline_reftext$ques$6.$$arity = 0); - - Opal.def(self, '$reftext', $Inline_reftext$7 = function $$reftext() { - var self = this, val = nil; - - if ($truthy((val = self.text))) { - - return self.$apply_reftext_subs(val); - } else { - return nil - } - }, $Inline_reftext$7.$$arity = 0); - return (Opal.def(self, '$xreftext', $Inline_xreftext$8 = function $$xreftext(xrefstyle) { - var self = this; - - - - if (xrefstyle == null) { - xrefstyle = nil; - }; - return self.$reftext(); - }, $Inline_xreftext$8.$$arity = -1), nil) && 'xreftext'; - })($nesting[0], $$($nesting, 'AbstractNode'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/list"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy; - - Opal.add_stubs(['$==', '$next_list', '$callouts', '$class', '$object_id', '$inspect', '$size', '$items', '$attr_accessor', '$level', '$drop', '$nil_or_empty?', '$apply_subs', '$empty?', '$===', '$[]', '$outline?', '$!', '$simple?', '$source', '$shift', '$context', '$parent']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'List'); - - var $nesting = [self].concat($parent_nesting), $List_initialize$1, $List_outline$ques$2, $List_convert$3, $List_to_s$4; - - self.$$prototype.context = self.$$prototype.document = self.$$prototype.style = nil; - - Opal.alias(self, "items", "blocks"); - Opal.alias(self, "content", "blocks"); - Opal.alias(self, "items?", "blocks?"); - - Opal.def(self, '$initialize', $List_initialize$1 = function $$initialize(parent, context, opts) { - var $iter = $List_initialize$1.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $List_initialize$1.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if (opts == null) { - opts = $hash2([], {}); - }; - return $send(self, Opal.find_super_dispatcher(self, 'initialize', $List_initialize$1, false), $zuper, $iter); - }, $List_initialize$1.$$arity = -3); - - Opal.def(self, '$outline?', $List_outline$ques$2 = function() { - var $a, self = this; - - return ($truthy($a = self.context['$==']("ulist")) ? $a : self.context['$==']("olist")) - }, $List_outline$ques$2.$$arity = 0); - - Opal.def(self, '$convert', $List_convert$3 = function $$convert() { - var $iter = $List_convert$3.$$p, $yield = $iter || nil, self = this, result = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $List_convert$3.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if (self.context['$==']("colist")) { - - result = $send(self, Opal.find_super_dispatcher(self, 'convert', $List_convert$3, false), $zuper, $iter); - self.document.$callouts().$next_list(); - return result; - } else { - return $send(self, Opal.find_super_dispatcher(self, 'convert', $List_convert$3, false), $zuper, $iter) - } - }, $List_convert$3.$$arity = 0); - Opal.alias(self, "render", "convert"); - return (Opal.def(self, '$to_s', $List_to_s$4 = function $$to_s() { - var self = this; - - return "" + "#<" + (self.$class()) + "@" + (self.$object_id()) + " {context: " + (self.context.$inspect()) + ", style: " + (self.style.$inspect()) + ", items: " + (self.$items().$size()) + "}>" - }, $List_to_s$4.$$arity = 0), nil) && 'to_s'; - })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'ListItem'); - - var $nesting = [self].concat($parent_nesting), $ListItem_initialize$5, $ListItem_text$ques$6, $ListItem_text$7, $ListItem_text$eq$8, $ListItem_simple$ques$9, $ListItem_compound$ques$10, $ListItem_fold_first$11, $ListItem_to_s$12; - - self.$$prototype.text = self.$$prototype.subs = self.$$prototype.blocks = nil; - - Opal.alias(self, "list", "parent"); - self.$attr_accessor("marker"); - - Opal.def(self, '$initialize', $ListItem_initialize$5 = function $$initialize(parent, text) { - var $iter = $ListItem_initialize$5.$$p, $yield = $iter || nil, self = this; - - if ($iter) $ListItem_initialize$5.$$p = null; - - - if (text == null) { - text = nil; - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $ListItem_initialize$5, false), [parent, "list_item"], null); - self.text = text; - self.level = parent.$level(); - return (self.subs = $$($nesting, 'NORMAL_SUBS').$drop(0)); - }, $ListItem_initialize$5.$$arity = -2); - - Opal.def(self, '$text?', $ListItem_text$ques$6 = function() { - var self = this; - - if ($truthy(self.text['$nil_or_empty?']())) { - return false - } else { - return true - } - }, $ListItem_text$ques$6.$$arity = 0); - - Opal.def(self, '$text', $ListItem_text$7 = function $$text() { - var $a, self = this; - - return ($truthy($a = self.text) ? self.$apply_subs(self.text, self.subs) : $a) - }, $ListItem_text$7.$$arity = 0); - - Opal.def(self, '$text=', $ListItem_text$eq$8 = function(val) { - var self = this; - - return (self.text = val) - }, $ListItem_text$eq$8.$$arity = 1); - - Opal.def(self, '$simple?', $ListItem_simple$ques$9 = function() { - var $a, $b, $c, self = this, blk = nil; - - return ($truthy($a = self.blocks['$empty?']()) ? $a : ($truthy($b = (($c = self.blocks.$size()['$=='](1)) ? $$($nesting, 'List')['$===']((blk = self.blocks['$[]'](0))) : self.blocks.$size()['$=='](1))) ? blk['$outline?']() : $b)) - }, $ListItem_simple$ques$9.$$arity = 0); - - Opal.def(self, '$compound?', $ListItem_compound$ques$10 = function() { - var self = this; - - return self['$simple?']()['$!']() - }, $ListItem_compound$ques$10.$$arity = 0); - - Opal.def(self, '$fold_first', $ListItem_fold_first$11 = function $$fold_first() { - var self = this; - - - self.text = (function() {if ($truthy(self.text['$nil_or_empty?']())) { - return self.blocks.$shift().$source() - } else { - return "" + (self.text) + ($$($nesting, 'LF')) + (self.blocks.$shift().$source()) - }; return nil; })(); - return nil; - }, $ListItem_fold_first$11.$$arity = 0); - return (Opal.def(self, '$to_s', $ListItem_to_s$12 = function $$to_s() { - var $a, self = this; - - return "" + "#<" + (self.$class()) + "@" + (self.$object_id()) + " {list_context: " + (self.$parent().$context().$inspect()) + ", text: " + (self.text.$inspect()) + ", blocks: " + (($truthy($a = self.blocks) ? $a : []).$size()) + "}>" - }, $ListItem_to_s$12.$$arity = 0), nil) && 'to_s'; - })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/parser"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $hash2 = Opal.hash2, $gvars = Opal.gvars; - - Opal.add_stubs(['$include', '$new', '$proc', '$start_with?', '$match?', '$is_delimited_block?', '$private_class_method', '$parse_document_header', '$[]', '$has_more_lines?', '$next_section', '$assign_numeral', '$<<', '$blocks', '$skip_blank_lines', '$parse_block_metadata_lines', '$attributes', '$is_next_line_doctitle?', '$finalize_header', '$nil_or_empty?', '$title=', '$-', '$sourcemap', '$cursor', '$parse_section_title', '$id=', '$include?', '$sub_specialchars', '$[]=', '$sub_attributes', '$source_location=', '$header', '$attribute_locked?', '$id', '$clear', '$delete', '$instance_variable_get', '$parse_header_metadata', '$==', '$!', '$register', '$doctype', '$parse_manpage_header', '$=~', '$downcase', '$error', '$logger', '$message_with_context', '$cursor_at_line', '$backend', '$save', '$update', '$is_next_line_section?', '$initialize_section', '$join', '$map', '$read_lines_until', '$lstrip', '$split', '$title', '$restore_save', '$discard_save', '$context', '$empty?', '$header?', '$!=', '$attr?', '$attr', '$key?', '$document', '$+', '$level', '$special', '$sectname', '$to_i', '$<', '$>', '$warn', '$next_block', '$blocks?', '$style', '$context=', '$style=', '$parent=', '$size', '$content_model', '$shift', '$unwrap_standalone_preamble', '$source_location', '$merge', '$fetch', '$parse_block_metadata_line', '$extensions', '$block_macros?', '$mark', '$read_line', '$terminator', '$to_s', '$masq', '$to_sym', '$registered_for_block?', '$debug?', '$debug', '$cursor_at_mark', '$strict_verbatim_paragraphs', '$unshift_line', '$markdown_syntax', '$keys', '$chr', '$uniform?', '$length', '$end_with?', '$===', '$parse_attributes', '$attribute_missing', '$tr', '$basename', '$assign_caption', '$registered_for_block_macro?', '$config', '$process_method', '$replace', '$parse_callout_list', '$callouts', '$parse_list', '$parse_description_list', '$underline_style_section_titles', '$is_section_title?', '$peek_line', '$atx_section_title?', '$generate_id', '$level=', '$read_paragraph_lines', '$adjust_indentation!', '$map!', '$slice', '$pop', '$build_block', '$apply_subs', '$chop', '$catalog_inline_anchors', '$rekey', '$index', '$strip', '$parse_table', '$each', '$raise', '$title?', '$update_attributes', '$commit_subs', '$sub?', '$catalog_callouts', '$source', '$remove_sub', '$block_terminates_paragraph', '$to_proc', '$nil?', '$lines', '$parse_blocks', '$parse_list_item', '$items', '$scan', '$gsub', '$count', '$advance', '$dup', '$match', '$callout_ids', '$next_list', '$catalog_inline_anchor', '$marker=', '$catalog_inline_biblio_anchor', '$set_option', '$text=', '$resolve_ordered_list_marker', '$read_lines_for_list_item', '$skip_line_comments', '$unshift_lines', '$fold_first', '$text?', '$is_sibling_list_item?', '$concat', '$find', '$casecmp', '$sectname=', '$special=', '$numbered=', '$numbered', '$lineno', '$peek_lines', '$setext_section_title?', '$abs', '$cursor_at_prev_line', '$process_attribute_entries', '$next_line_empty?', '$process_authors', '$apply_header_subs', '$rstrip', '$each_with_index', '$compact', '$squeeze', '$to_a', '$parse_style_attribute', '$process_attribute_entry', '$skip_comment_lines', '$store_attribute', '$sanitize_attribute_name', '$set_attribute', '$save_to', '$delete_attribute', '$ord', '$int_to_roman', '$resolve_list_marker', '$parse_colspecs', '$create_columns', '$has_header_option=', '$format', '$starts_with_delimiter?', '$close_open_cell', '$parse_cellspec', '$delimiter', '$match_delimiter', '$pre_match', '$post_match', '$buffer_has_unclosed_quotes?', '$skip_past_delimiter', '$buffer', '$buffer=', '$skip_past_escaped_delimiter', '$keep_cell_open', '$push_cellspec', '$close_cell', '$cell_open?', '$columns', '$assign_column_widths', '$partition_header_footer', '$upto', '$partition', '$shorthand_property_syntax', '$each_char', '$yield_buffered_attribute', '$any?', '$*', '$each_byte', '$%']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Parser'); - - var $nesting = [self].concat($parent_nesting), $Parser$1, $Parser$2, $Parser$3, $Parser_parse$4, $Parser_parse_document_header$5, $Parser_parse_manpage_header$6, $Parser_next_section$9, $Parser_next_block$10, $Parser_read_paragraph_lines$14, $Parser_is_delimited_block$ques$15, $Parser_build_block$16, $Parser_parse_blocks$17, $Parser_parse_list$18, $Parser_catalog_callouts$19, $Parser_catalog_inline_anchor$21, $Parser_catalog_inline_anchors$22, $Parser_catalog_inline_biblio_anchor$24, $Parser_parse_description_list$25, $Parser_parse_callout_list$26, $Parser_parse_list_item$27, $Parser_read_lines_for_list_item$28, $Parser_initialize_section$34, $Parser_is_next_line_section$ques$35, $Parser_is_next_line_doctitle$ques$36, $Parser_is_section_title$ques$37, $Parser_atx_section_title$ques$38, $Parser_setext_section_title$ques$39, $Parser_parse_section_title$40, $Parser_parse_header_metadata$41, $Parser_process_authors$46, $Parser_parse_block_metadata_lines$51, $Parser_parse_block_metadata_line$52, $Parser_process_attribute_entries$53, $Parser_process_attribute_entry$54, $Parser_store_attribute$55, $Parser_resolve_list_marker$56, $Parser_resolve_ordered_list_marker$57, $Parser_is_sibling_list_item$ques$59, $Parser_parse_table$60, $Parser_parse_colspecs$61, $Parser_parse_cellspec$65, $Parser_parse_style_attribute$66, $Parser_yield_buffered_attribute$69, $Parser_adjust_indentation$excl$70, $Parser_uniform$ques$79, $Parser_sanitize_attribute_name$80; - - - self.$include($$($nesting, 'Logging')); - Opal.const_set($nesting[0], 'BlockMatchData', $$($nesting, 'Struct').$new("context", "masq", "tip", "terminator")); - Opal.const_set($nesting[0], 'TAB', "\t"); - Opal.const_set($nesting[0], 'TabIndentRx', /^\t+/); - Opal.const_set($nesting[0], 'StartOfBlockProc', $send(self, 'proc', [], ($Parser$1 = function(l){var self = $Parser$1.$$s || this, $a, $b; - - - - if (l == null) { - l = nil; - }; - return ($truthy($a = ($truthy($b = l['$start_with?']("[")) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](l) : $b)) ? $a : self['$is_delimited_block?'](l));}, $Parser$1.$$s = self, $Parser$1.$$arity = 1, $Parser$1))); - Opal.const_set($nesting[0], 'StartOfListProc', $send(self, 'proc', [], ($Parser$2 = function(l){var self = $Parser$2.$$s || this; - - - - if (l == null) { - l = nil; - }; - return $$($nesting, 'AnyListRx')['$match?'](l);}, $Parser$2.$$s = self, $Parser$2.$$arity = 1, $Parser$2))); - Opal.const_set($nesting[0], 'StartOfBlockOrListProc', $send(self, 'proc', [], ($Parser$3 = function(l){var self = $Parser$3.$$s || this, $a, $b, $c; - - - - if (l == null) { - l = nil; - }; - return ($truthy($a = ($truthy($b = self['$is_delimited_block?'](l)) ? $b : ($truthy($c = l['$start_with?']("[")) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](l) : $c))) ? $a : $$($nesting, 'AnyListRx')['$match?'](l));}, $Parser$3.$$s = self, $Parser$3.$$arity = 1, $Parser$3))); - Opal.const_set($nesting[0], 'NoOp', nil); - Opal.const_set($nesting[0], 'AuthorKeys', ["author", "authorinitials", "firstname", "middlename", "lastname", "email"]); - Opal.const_set($nesting[0], 'TableCellHorzAlignments', $hash2(["<", ">", "^"], {"<": "left", ">": "right", "^": "center"})); - Opal.const_set($nesting[0], 'TableCellVertAlignments', $hash2(["<", ">", "^"], {"<": "top", ">": "bottom", "^": "middle"})); - Opal.const_set($nesting[0], 'TableCellStyles', $hash2(["d", "s", "e", "m", "h", "l", "a"], {"d": "none", "s": "strong", "e": "emphasis", "m": "monospaced", "h": "header", "l": "literal", "a": "asciidoc"})); - self.$private_class_method("new"); - Opal.defs(self, '$parse', $Parser_parse$4 = function $$parse(reader, document, options) { - var $a, $b, $c, self = this, block_attributes = nil, new_section = nil; - - - - if (options == null) { - options = $hash2([], {}); - }; - block_attributes = self.$parse_document_header(reader, document); - if ($truthy(options['$[]']("header_only"))) { - } else { - while ($truthy(reader['$has_more_lines?']())) { - - $c = self.$next_section(reader, document, block_attributes), $b = Opal.to_ary($c), (new_section = ($b[0] == null ? nil : $b[0])), (block_attributes = ($b[1] == null ? nil : $b[1])), $c; - if ($truthy(new_section)) { - - document.$assign_numeral(new_section); - document.$blocks()['$<<'](new_section);}; - } - }; - return document; - }, $Parser_parse$4.$$arity = -3); - Opal.defs(self, '$parse_document_header', $Parser_parse_document_header$5 = function $$parse_document_header(reader, document) { - var $a, $b, self = this, block_attrs = nil, doc_attrs = nil, implicit_doctitle = nil, val = nil, $writer = nil, doctitle_attr_val = nil, source_location = nil, _ = nil, l0_section_title = nil, atx = nil, separator = nil, doc_id = nil, role = nil, reftext = nil, modified_attrs = nil; - - - block_attrs = (function() {if ($truthy(reader.$skip_blank_lines())) { - - return self.$parse_block_metadata_lines(reader, document); - } else { - return $hash2([], {}) - }; return nil; })(); - doc_attrs = document.$attributes(); - if ($truthy(($truthy($a = (implicit_doctitle = self['$is_next_line_doctitle?'](reader, block_attrs, doc_attrs['$[]']("leveloffset")))) ? block_attrs['$[]']("title") : $a))) { - return document.$finalize_header(block_attrs, false)}; - if ($truthy((val = doc_attrs['$[]']("doctitle"))['$nil_or_empty?']())) { - } else { - - $writer = [(doctitle_attr_val = val)]; - $send(document, 'title=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy(implicit_doctitle)) { - - if ($truthy(document.$sourcemap())) { - source_location = reader.$cursor()}; - $b = self.$parse_section_title(reader, document), $a = Opal.to_ary($b), document['$id='](($a[0] == null ? nil : $a[0])), (_ = ($a[1] == null ? nil : $a[1])), (l0_section_title = ($a[2] == null ? nil : $a[2])), (_ = ($a[3] == null ? nil : $a[3])), (atx = ($a[4] == null ? nil : $a[4])), $b; - if ($truthy(doctitle_attr_val)) { - l0_section_title = nil - } else { - - - $writer = [l0_section_title]; - $send(document, 'title=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy((($writer = ["doctitle", (doctitle_attr_val = document.$sub_specialchars(l0_section_title))]), $send(doc_attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - - $writer = ["doctitle", (doctitle_attr_val = document.$sub_attributes(doctitle_attr_val, $hash2(["attribute_missing"], {"attribute_missing": "skip"})))]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - }; - if ($truthy(source_location)) { - - $writer = [source_location]; - $send(document.$header(), 'source_location=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(($truthy($a = atx) ? $a : document['$attribute_locked?']("compat-mode")))) { - } else { - - $writer = ["compat-mode", ""]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy((separator = block_attrs['$[]']("separator")))) { - if ($truthy(document['$attribute_locked?']("title-separator"))) { - } else { - - $writer = ["title-separator", separator]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }}; - if ($truthy((doc_id = block_attrs['$[]']("id")))) { - - $writer = [doc_id]; - $send(document, 'id=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - doc_id = document.$id() - }; - if ($truthy((role = block_attrs['$[]']("role")))) { - - $writer = ["role", role]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy((reftext = block_attrs['$[]']("reftext")))) { - - $writer = ["reftext", reftext]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - block_attrs.$clear(); - (modified_attrs = document.$instance_variable_get("@attributes_modified")).$delete("doctitle"); - self.$parse_header_metadata(reader, document); - if ($truthy(modified_attrs['$include?']("doctitle"))) { - if ($truthy(($truthy($a = (val = doc_attrs['$[]']("doctitle"))['$nil_or_empty?']()) ? $a : val['$=='](doctitle_attr_val)))) { - - $writer = ["doctitle", doctitle_attr_val]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = [val]; - $send(document, 'title=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } - } else if ($truthy(l0_section_title['$!']())) { - modified_attrs['$<<']("doctitle")}; - if ($truthy(doc_id)) { - document.$register("refs", [doc_id, document])};}; - if (document.$doctype()['$==']("manpage")) { - self.$parse_manpage_header(reader, document, block_attrs)}; - return document.$finalize_header(block_attrs); - }, $Parser_parse_document_header$5.$$arity = 2); - Opal.defs(self, '$parse_manpage_header', $Parser_parse_manpage_header$6 = function $$parse_manpage_header(reader, document, block_attributes) { - var $a, $b, $$7, $$8, self = this, doc_attrs = nil, $writer = nil, manvolnum = nil, mantitle = nil, manname = nil, name_section_level = nil, name_section = nil, name_section_buffer = nil, mannames = nil, manpurpose = nil, error_msg = nil; - - - if ($truthy($$($nesting, 'ManpageTitleVolnumRx')['$=~']((doc_attrs = document.$attributes())['$[]']("doctitle")))) { - - - $writer = ["manvolnum", (manvolnum = (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)))]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["mantitle", (function() {if ($truthy((mantitle = (($a = $gvars['~']) === nil ? nil : $a['$[]'](1)))['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - - return document.$sub_attributes(mantitle); - } else { - return mantitle - }; return nil; })().$downcase()]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - - self.$logger().$error(self.$message_with_context("non-conforming manpage title", $hash2(["source_location"], {"source_location": reader.$cursor_at_line(1)}))); - - $writer = ["mantitle", ($truthy($a = ($truthy($b = doc_attrs['$[]']("doctitle")) ? $b : doc_attrs['$[]']("docname"))) ? $a : "command")]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["manvolnum", (manvolnum = "1")]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }; - if ($truthy(($truthy($a = (manname = doc_attrs['$[]']("manname"))) ? doc_attrs['$[]']("manpurpose") : $a))) { - - ($truthy($a = doc_attrs['$[]']("manname-title")) ? $a : (($writer = ["manname-title", "Name"]), $send(doc_attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - - $writer = ["mannames", [manname]]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if (document.$backend()['$==']("manpage")) { - - - $writer = ["docname", manname]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["outfilesuffix", "" + "." + (manvolnum)]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - } else { - - reader.$skip_blank_lines(); - reader.$save(); - block_attributes.$update(self.$parse_block_metadata_lines(reader, document)); - if ($truthy((name_section_level = self['$is_next_line_section?'](reader, $hash2([], {}))))) { - if (name_section_level['$=='](1)) { - - name_section = self.$initialize_section(reader, document, $hash2([], {})); - name_section_buffer = $send(reader.$read_lines_until($hash2(["break_on_blank_lines", "skip_line_comments"], {"break_on_blank_lines": true, "skip_line_comments": true})), 'map', [], ($$7 = function(l){var self = $$7.$$s || this; - - - - if (l == null) { - l = nil; - }; - return l.$lstrip();}, $$7.$$s = self, $$7.$$arity = 1, $$7)).$join(" "); - if ($truthy($$($nesting, 'ManpageNamePurposeRx')['$=~'](name_section_buffer))) { - - if ($truthy((manname = (($a = $gvars['~']) === nil ? nil : $a['$[]'](1)))['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - manname = document.$sub_attributes(manname)}; - if ($truthy(manname['$include?'](","))) { - manname = (mannames = $send(manname.$split(","), 'map', [], ($$8 = function(n){var self = $$8.$$s || this; - - - - if (n == null) { - n = nil; - }; - return n.$lstrip();}, $$8.$$s = self, $$8.$$arity = 1, $$8)))['$[]'](0) - } else { - mannames = [manname] - }; - if ($truthy((manpurpose = (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)))['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - manpurpose = document.$sub_attributes(manpurpose)}; - ($truthy($a = doc_attrs['$[]']("manname-title")) ? $a : (($writer = ["manname-title", name_section.$title()]), $send(doc_attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy(name_section.$id())) { - - $writer = ["manname-id", name_section.$id()]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - - $writer = ["manname", manname]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["mannames", mannames]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["manpurpose", manpurpose]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if (document.$backend()['$==']("manpage")) { - - - $writer = ["docname", manname]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["outfilesuffix", "" + "." + (manvolnum)]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - } else { - error_msg = "non-conforming name section body" - }; - } else { - error_msg = "name section must be at level 1" - } - } else { - error_msg = "name section expected" - }; - if ($truthy(error_msg)) { - - reader.$restore_save(); - self.$logger().$error(self.$message_with_context(error_msg, $hash2(["source_location"], {"source_location": reader.$cursor()}))); - - $writer = ["manname", (manname = ($truthy($a = doc_attrs['$[]']("docname")) ? $a : "command"))]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["mannames", [manname]]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if (document.$backend()['$==']("manpage")) { - - - $writer = ["docname", manname]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["outfilesuffix", "" + "." + (manvolnum)]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - } else { - reader.$discard_save() - }; - }; - return nil; - }, $Parser_parse_manpage_header$6.$$arity = 3); - Opal.defs(self, '$next_section', $Parser_next_section$9 = function $$next_section(reader, parent, attributes) { - var $a, $b, $c, $d, self = this, preamble = nil, intro = nil, part = nil, has_header = nil, book = nil, document = nil, $writer = nil, section = nil, current_level = nil, expected_next_level = nil, expected_next_level_alt = nil, title = nil, sectname = nil, next_level = nil, expected_condition = nil, new_section = nil, block_cursor = nil, new_block = nil, first_block = nil, child_block = nil; - - - - if (attributes == null) { - attributes = $hash2([], {}); - }; - preamble = (intro = (part = false)); - if ($truthy(($truthy($a = (($b = parent.$context()['$==']("document")) ? parent.$blocks()['$empty?']() : parent.$context()['$==']("document"))) ? ($truthy($b = ($truthy($c = (has_header = parent['$header?']())) ? $c : attributes.$delete("invalid-header"))) ? $b : self['$is_next_line_section?'](reader, attributes)['$!']()) : $a))) { - - book = (document = parent).$doctype()['$==']("book"); - if ($truthy(($truthy($a = has_header) ? $a : ($truthy($b = book) ? attributes['$[]'](1)['$!=']("abstract") : $b)))) { - - preamble = (intro = $$($nesting, 'Block').$new(parent, "preamble", $hash2(["content_model"], {"content_model": "compound"}))); - if ($truthy(($truthy($a = book) ? parent['$attr?']("preface-title") : $a))) { - - $writer = [parent.$attr("preface-title")]; - $send(preamble, 'title=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - parent.$blocks()['$<<'](preamble);}; - section = parent; - current_level = 0; - if ($truthy(parent.$attributes()['$key?']("fragment"))) { - expected_next_level = -1 - } else if ($truthy(book)) { - $a = [1, 0], (expected_next_level = $a[0]), (expected_next_level_alt = $a[1]), $a - } else { - expected_next_level = 1 - }; - } else { - - book = (document = parent.$document()).$doctype()['$==']("book"); - section = self.$initialize_section(reader, parent, attributes); - attributes = (function() {if ($truthy((title = attributes['$[]']("title")))) { - return $hash2(["title"], {"title": title}) - } else { - return $hash2([], {}) - }; return nil; })(); - expected_next_level = $rb_plus((current_level = section.$level()), 1); - if (current_level['$=='](0)) { - part = book - } else if ($truthy((($a = current_level['$=='](1)) ? section.$special() : current_level['$=='](1)))) { - if ($truthy(($truthy($a = ($truthy($b = (sectname = section.$sectname())['$==']("appendix")) ? $b : sectname['$==']("preface"))) ? $a : sectname['$==']("abstract")))) { - } else { - expected_next_level = nil - }}; - }; - reader.$skip_blank_lines(); - while ($truthy(reader['$has_more_lines?']())) { - - self.$parse_block_metadata_lines(reader, document, attributes); - if ($truthy((next_level = self['$is_next_line_section?'](reader, attributes)))) { - - if ($truthy(document['$attr?']("leveloffset"))) { - - next_level = $rb_plus(next_level, document.$attr("leveloffset").$to_i()); - if ($truthy($rb_lt(next_level, 0))) { - next_level = 0};}; - if ($truthy($rb_gt(next_level, current_level))) { - - if ($truthy(expected_next_level)) { - if ($truthy(($truthy($b = ($truthy($c = next_level['$=='](expected_next_level)) ? $c : ($truthy($d = expected_next_level_alt) ? next_level['$=='](expected_next_level_alt) : $d))) ? $b : $rb_lt(expected_next_level, 0)))) { - } else { - - expected_condition = (function() {if ($truthy(expected_next_level_alt)) { - return "" + "expected levels " + (expected_next_level_alt) + " or " + (expected_next_level) - } else { - return "" + "expected level " + (expected_next_level) - }; return nil; })(); - self.$logger().$warn(self.$message_with_context("" + "section title out of sequence: " + (expected_condition) + ", got level " + (next_level), $hash2(["source_location"], {"source_location": reader.$cursor()}))); - } - } else { - self.$logger().$error(self.$message_with_context("" + (sectname) + " sections do not support nested sections", $hash2(["source_location"], {"source_location": reader.$cursor()}))) - }; - $c = self.$next_section(reader, section, attributes), $b = Opal.to_ary($c), (new_section = ($b[0] == null ? nil : $b[0])), (attributes = ($b[1] == null ? nil : $b[1])), $c; - section.$assign_numeral(new_section); - section.$blocks()['$<<'](new_section); - } else if ($truthy((($b = next_level['$=='](0)) ? section['$=='](document) : next_level['$=='](0)))) { - - if ($truthy(book)) { - } else { - self.$logger().$error(self.$message_with_context("level 0 sections can only be used when doctype is book", $hash2(["source_location"], {"source_location": reader.$cursor()}))) - }; - $c = self.$next_section(reader, section, attributes), $b = Opal.to_ary($c), (new_section = ($b[0] == null ? nil : $b[0])), (attributes = ($b[1] == null ? nil : $b[1])), $c; - section.$assign_numeral(new_section); - section.$blocks()['$<<'](new_section); - } else { - break; - }; - } else { - - block_cursor = reader.$cursor(); - if ($truthy((new_block = self.$next_block(reader, ($truthy($b = intro) ? $b : section), attributes, $hash2(["parse_metadata"], {"parse_metadata": false}))))) { - - if ($truthy(part)) { - if ($truthy(section['$blocks?']()['$!']())) { - if ($truthy(new_block.$style()['$!=']("partintro"))) { - if (new_block.$context()['$==']("paragraph")) { - - - $writer = ["open"]; - $send(new_block, 'context=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["partintro"]; - $send(new_block, 'style=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - - - $writer = [(intro = $$($nesting, 'Block').$new(section, "open", $hash2(["content_model"], {"content_model": "compound"})))]; - $send(new_block, 'parent=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["partintro"]; - $send(intro, 'style=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - section.$blocks()['$<<'](intro); - }} - } else if (section.$blocks().$size()['$=='](1)) { - - first_block = section.$blocks()['$[]'](0); - if ($truthy(($truthy($b = intro['$!']()) ? first_block.$content_model()['$==']("compound") : $b))) { - self.$logger().$error(self.$message_with_context("illegal block content outside of partintro block", $hash2(["source_location"], {"source_location": block_cursor}))) - } else if ($truthy(first_block.$content_model()['$!=']("compound"))) { - - - $writer = [(intro = $$($nesting, 'Block').$new(section, "open", $hash2(["content_model"], {"content_model": "compound"})))]; - $send(new_block, 'parent=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["partintro"]; - $send(intro, 'style=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - section.$blocks().$shift(); - if (first_block.$style()['$==']("partintro")) { - - - $writer = ["paragraph"]; - $send(first_block, 'context=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [nil]; - $send(first_block, 'style=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - intro['$<<'](first_block); - section.$blocks()['$<<'](intro);};}}; - ($truthy($b = intro) ? $b : section).$blocks()['$<<'](new_block); - attributes.$clear();}; - }; - if ($truthy($b = reader.$skip_blank_lines())) { - $b - } else { - break; - }; - }; - if ($truthy(part)) { - if ($truthy(($truthy($a = section['$blocks?']()) ? section.$blocks()['$[]'](-1).$context()['$==']("section") : $a))) { - } else { - self.$logger().$error(self.$message_with_context("invalid part, must have at least one section (e.g., chapter, appendix, etc.)", $hash2(["source_location"], {"source_location": reader.$cursor()}))) - } - } else if ($truthy(preamble)) { - if ($truthy(preamble['$blocks?']())) { - if ($truthy(($truthy($a = ($truthy($b = book) ? $b : document.$blocks()['$[]'](1))) ? $a : $$($nesting, 'Compliance').$unwrap_standalone_preamble()['$!']()))) { - if ($truthy(document.$sourcemap())) { - - $writer = [preamble.$blocks()['$[]'](0).$source_location()]; - $send(preamble, 'source_location=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - } else { - - document.$blocks().$shift(); - while ($truthy((child_block = preamble.$blocks().$shift()))) { - document['$<<'](child_block) - }; - } - } else { - document.$blocks().$shift() - }}; - return [(function() {if ($truthy(section['$!='](parent))) { - return section - } else { - return nil - }; return nil; })(), attributes.$merge()]; - }, $Parser_next_section$9.$$arity = -3); - Opal.defs(self, '$next_block', $Parser_next_block$10 = function $$next_block(reader, parent, attributes, options) {try { - - var $a, $b, $c, $d, $$11, $$12, $$13, self = this, skipped = nil, text_only = nil, document = nil, extensions = nil, block_extensions = nil, block_macro_extensions = nil, this_line = nil, doc_attrs = nil, style = nil, block = nil, block_context = nil, cloaked_context = nil, terminator = nil, delimited_block = nil, $writer = nil, indented = nil, md_syntax = nil, ch0 = nil, layout_break_chars = nil, ll = nil, blk_ctx = nil, target = nil, blk_attrs = nil, $case = nil, posattrs = nil, expanded_target = nil, scaledwidth = nil, block_title = nil, extension = nil, report_unknown_block_macro = nil, content = nil, ext_config = nil, default_attrs = nil, float_id = nil, float_reftext = nil, float_level = nil, lines = nil, content_adjacent = nil, admonition_name = nil, credit_line = nil, attribution = nil, citetitle = nil, language = nil, comma_idx = nil, block_cursor = nil, block_reader = nil, content_model = nil, positional_attrs = nil, block_id = nil; - if ($gvars["~"] == null) $gvars["~"] = nil; - - - - if (attributes == null) { - attributes = $hash2([], {}); - }; - - if (options == null) { - options = $hash2([], {}); - }; - if ($truthy((skipped = reader.$skip_blank_lines()))) { - } else { - return nil - }; - if ($truthy(($truthy($a = (text_only = options['$[]']("text_only"))) ? $rb_gt(skipped, 0) : $a))) { - - options.$delete("text_only"); - text_only = nil;}; - document = parent.$document(); - if ($truthy(options.$fetch("parse_metadata", true))) { - while ($truthy(self.$parse_block_metadata_line(reader, document, attributes, options))) { - - reader.$shift(); - ($truthy($b = reader.$skip_blank_lines()) ? $b : Opal.ret(nil)); - }}; - if ($truthy((extensions = document.$extensions()))) { - $a = [extensions['$blocks?'](), extensions['$block_macros?']()], (block_extensions = $a[0]), (block_macro_extensions = $a[1]), $a}; - reader.$mark(); - $a = [reader.$read_line(), document.$attributes(), attributes['$[]'](1)], (this_line = $a[0]), (doc_attrs = $a[1]), (style = $a[2]), $a; - block = (block_context = (cloaked_context = (terminator = nil))); - if ($truthy((delimited_block = self['$is_delimited_block?'](this_line, true)))) { - - block_context = (cloaked_context = delimited_block.$context()); - terminator = delimited_block.$terminator(); - if ($truthy(style)) { - if (style['$=='](block_context.$to_s())) { - } else if ($truthy(delimited_block.$masq()['$include?'](style))) { - block_context = style.$to_sym() - } else if ($truthy(($truthy($a = delimited_block.$masq()['$include?']("admonition")) ? $$($nesting, 'ADMONITION_STYLES')['$include?'](style) : $a))) { - block_context = "admonition" - } else if ($truthy(($truthy($a = block_extensions) ? extensions['$registered_for_block?'](style, block_context) : $a))) { - block_context = style.$to_sym() - } else { - - if ($truthy(self.$logger()['$debug?']())) { - self.$logger().$debug(self.$message_with_context("" + "unknown style for " + (block_context) + " block: " + (style), $hash2(["source_location"], {"source_location": reader.$cursor_at_mark()})))}; - style = block_context.$to_s(); - } - } else { - style = (($writer = ["style", block_context.$to_s()]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]) - };}; - if ($truthy(delimited_block)) { - } else { - while ($truthy(true)) { - - if ($truthy(($truthy($b = ($truthy($c = style) ? $$($nesting, 'Compliance').$strict_verbatim_paragraphs() : $c)) ? $$($nesting, 'VERBATIM_STYLES')['$include?'](style) : $b))) { - - block_context = style.$to_sym(); - reader.$unshift_line(this_line); - break;;}; - if ($truthy(text_only)) { - indented = this_line['$start_with?'](" ", $$($nesting, 'TAB')) - } else { - - md_syntax = $$($nesting, 'Compliance').$markdown_syntax(); - if ($truthy(this_line['$start_with?'](" "))) { - - $b = [true, " "], (indented = $b[0]), (ch0 = $b[1]), $b; - if ($truthy(($truthy($b = ($truthy($c = md_syntax) ? $send(this_line.$lstrip(), 'start_with?', Opal.to_a($$($nesting, 'MARKDOWN_THEMATIC_BREAK_CHARS').$keys())) : $c)) ? $$($nesting, 'MarkdownThematicBreakRx')['$match?'](this_line) : $b))) { - - block = $$($nesting, 'Block').$new(parent, "thematic_break", $hash2(["content_model"], {"content_model": "empty"})); - break;;}; - } else if ($truthy(this_line['$start_with?']($$($nesting, 'TAB')))) { - $b = [true, $$($nesting, 'TAB')], (indented = $b[0]), (ch0 = $b[1]), $b - } else { - - $b = [false, this_line.$chr()], (indented = $b[0]), (ch0 = $b[1]), $b; - layout_break_chars = (function() {if ($truthy(md_syntax)) { - return $$($nesting, 'HYBRID_LAYOUT_BREAK_CHARS') - } else { - return $$($nesting, 'LAYOUT_BREAK_CHARS') - }; return nil; })(); - if ($truthy(($truthy($b = layout_break_chars['$key?'](ch0)) ? (function() {if ($truthy(md_syntax)) { - - return $$($nesting, 'ExtLayoutBreakRx')['$match?'](this_line); - } else { - return ($truthy($c = self['$uniform?'](this_line, ch0, (ll = this_line.$length()))) ? $rb_gt(ll, 2) : $c) - }; return nil; })() : $b))) { - - block = $$($nesting, 'Block').$new(parent, layout_break_chars['$[]'](ch0), $hash2(["content_model"], {"content_model": "empty"})); - break;; - } else if ($truthy(($truthy($b = this_line['$end_with?']("]")) ? this_line['$include?']("::") : $b))) { - if ($truthy(($truthy($b = ($truthy($c = ch0['$==']("i")) ? $c : this_line['$start_with?']("video:", "audio:"))) ? $$($nesting, 'BlockMediaMacroRx')['$=~'](this_line) : $b))) { - - $b = [(($c = $gvars['~']) === nil ? nil : $c['$[]'](1)).$to_sym(), (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)), (($c = $gvars['~']) === nil ? nil : $c['$[]'](3))], (blk_ctx = $b[0]), (target = $b[1]), (blk_attrs = $b[2]), $b; - block = $$($nesting, 'Block').$new(parent, blk_ctx, $hash2(["content_model"], {"content_model": "empty"})); - if ($truthy(blk_attrs)) { - - $case = blk_ctx; - if ("video"['$===']($case)) {posattrs = ["poster", "width", "height"]} - else if ("audio"['$===']($case)) {posattrs = []} - else {posattrs = ["alt", "width", "height"]}; - block.$parse_attributes(blk_attrs, posattrs, $hash2(["sub_input", "into"], {"sub_input": true, "into": attributes}));}; - if ($truthy(attributes['$key?']("style"))) { - attributes.$delete("style")}; - if ($truthy(target['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - if ($truthy(($truthy($b = ($truthy($c = (expanded_target = block.$sub_attributes(target))['$empty?']()) ? ($truthy($d = doc_attrs['$[]']("attribute-missing")) ? $d : $$($nesting, 'Compliance').$attribute_missing())['$==']("drop-line") : $c)) ? block.$sub_attributes($rb_plus(target, " "), $hash2(["attribute_missing", "drop_line_severity"], {"attribute_missing": "drop-line", "drop_line_severity": "ignore"}))['$empty?']() : $b))) { - - attributes.$clear(); - return nil; - } else { - target = expanded_target - }}; - if (blk_ctx['$==']("image")) { - - document.$register("images", target); - - $writer = ["imagesdir", doc_attrs['$[]']("imagesdir")]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - ($truthy($b = attributes['$[]']("alt")) ? $b : (($writer = ["alt", ($truthy($c = style) ? $c : (($writer = ["default-alt", $$($nesting, 'Helpers').$basename(target, true).$tr("_-", " ")]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy((scaledwidth = attributes.$delete("scaledwidth"))['$nil_or_empty?']())) { - } else { - - $writer = ["scaledwidth", (function() {if ($truthy($$($nesting, 'TrailingDigitsRx')['$match?'](scaledwidth))) { - return "" + (scaledwidth) + "%" - } else { - return scaledwidth - }; return nil; })()]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy(attributes['$[]']("title"))) { - - - $writer = [(block_title = attributes.$delete("title"))]; - $send(block, 'title=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - block.$assign_caption(attributes.$delete("caption"), "figure");};}; - - $writer = ["target", target]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - break;; - } else if ($truthy(($truthy($b = (($c = ch0['$==']("t")) ? this_line['$start_with?']("toc:") : ch0['$==']("t"))) ? $$($nesting, 'BlockTocMacroRx')['$=~'](this_line) : $b))) { - - block = $$($nesting, 'Block').$new(parent, "toc", $hash2(["content_model"], {"content_model": "empty"})); - if ($truthy((($b = $gvars['~']) === nil ? nil : $b['$[]'](1)))) { - block.$parse_attributes((($b = $gvars['~']) === nil ? nil : $b['$[]'](1)), [], $hash2(["into"], {"into": attributes}))}; - break;; - } else if ($truthy((function() {if ($truthy(block_macro_extensions)) { - - return ($truthy($b = ($truthy($c = $$($nesting, 'CustomBlockMacroRx')['$=~'](this_line)) ? (extension = extensions['$registered_for_block_macro?']((($d = $gvars['~']) === nil ? nil : $d['$[]'](1)))) : $c)) ? $b : (report_unknown_block_macro = self.$logger()['$debug?']())); - } else { - - return ($truthy($b = self.$logger()['$debug?']()) ? (report_unknown_block_macro = $$($nesting, 'CustomBlockMacroRx')['$=~'](this_line)) : $b); - }; return nil; })())) { - if ($truthy(report_unknown_block_macro)) { - self.$logger().$debug(self.$message_with_context("" + "unknown name for block macro: " + ((($b = $gvars['~']) === nil ? nil : $b['$[]'](1))), $hash2(["source_location"], {"source_location": reader.$cursor_at_mark()}))) - } else { - - content = (($b = $gvars['~']) === nil ? nil : $b['$[]'](3)); - if ($truthy((target = (($b = $gvars['~']) === nil ? nil : $b['$[]'](2)))['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - if ($truthy(($truthy($b = ($truthy($c = (expanded_target = parent.$sub_attributes(target))['$empty?']()) ? ($truthy($d = doc_attrs['$[]']("attribute-missing")) ? $d : $$($nesting, 'Compliance').$attribute_missing())['$==']("drop-line") : $c)) ? parent.$sub_attributes($rb_plus(target, " "), $hash2(["attribute_missing", "drop_line_severity"], {"attribute_missing": "drop-line", "drop_line_severity": "ignore"}))['$empty?']() : $b))) { - - attributes.$clear(); - return nil; - } else { - target = expanded_target - }}; - if ((ext_config = extension.$config())['$[]']("content_model")['$==']("attributes")) { - if ($truthy(content)) { - document.$parse_attributes(content, ($truthy($b = ($truthy($c = ext_config['$[]']("positional_attrs")) ? $c : ext_config['$[]']("pos_attrs"))) ? $b : []), $hash2(["sub_input", "into"], {"sub_input": true, "into": attributes}))} - } else { - - $writer = ["text", ($truthy($b = content) ? $b : "")]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy((default_attrs = ext_config['$[]']("default_attrs")))) { - $send(attributes, 'update', [default_attrs], ($$11 = function(_, old_v){var self = $$11.$$s || this; - - - - if (_ == null) { - _ = nil; - }; - - if (old_v == null) { - old_v = nil; - }; - return old_v;}, $$11.$$s = self, $$11.$$arity = 2, $$11))}; - if ($truthy((block = extension.$process_method()['$[]'](parent, target, attributes)))) { - - attributes.$replace(block.$attributes()); - break;; - } else { - - attributes.$clear(); - return nil; - }; - }}}; - }; - }; - if ($truthy(($truthy($b = ($truthy($c = indented['$!']()) ? (ch0 = ($truthy($d = ch0) ? $d : this_line.$chr()))['$==']("<") : $c)) ? $$($nesting, 'CalloutListRx')['$=~'](this_line) : $b))) { - - reader.$unshift_line(this_line); - block = self.$parse_callout_list(reader, $gvars["~"], parent, document.$callouts()); - - $writer = ["style", "arabic"]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - break;; - } else if ($truthy($$($nesting, 'UnorderedListRx')['$match?'](this_line))) { - - reader.$unshift_line(this_line); - if ($truthy(($truthy($b = ($truthy($c = style['$!']()) ? $$($nesting, 'Section')['$==='](parent) : $c)) ? parent.$sectname()['$==']("bibliography") : $b))) { - - $writer = ["style", (style = "bibliography")]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - block = self.$parse_list(reader, "ulist", parent, style); - break;; - } else if ($truthy($$($nesting, 'OrderedListRx')['$match?'](this_line))) { - - reader.$unshift_line(this_line); - block = self.$parse_list(reader, "olist", parent, style); - if ($truthy(block.$style())) { - - $writer = ["style", block.$style()]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - break;; - } else if ($truthy(($truthy($b = ($truthy($c = this_line['$include?']("::")) ? $c : this_line['$include?'](";;"))) ? $$($nesting, 'DescriptionListRx')['$=~'](this_line) : $b))) { - - reader.$unshift_line(this_line); - block = self.$parse_description_list(reader, $gvars["~"], parent); - break;; - } else if ($truthy(($truthy($b = ($truthy($c = style['$==']("float")) ? $c : style['$==']("discrete"))) ? (function() {if ($truthy($$($nesting, 'Compliance').$underline_style_section_titles())) { - - return self['$is_section_title?'](this_line, reader.$peek_line()); - } else { - return ($truthy($c = indented['$!']()) ? self['$atx_section_title?'](this_line) : $c) - }; return nil; })() : $b))) { - - reader.$unshift_line(this_line); - $c = self.$parse_section_title(reader, document, attributes['$[]']("id")), $b = Opal.to_ary($c), (float_id = ($b[0] == null ? nil : $b[0])), (float_reftext = ($b[1] == null ? nil : $b[1])), (block_title = ($b[2] == null ? nil : $b[2])), (float_level = ($b[3] == null ? nil : $b[3])), $c; - if ($truthy(float_reftext)) { - - $writer = ["reftext", float_reftext]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - block = $$($nesting, 'Block').$new(parent, "floating_title", $hash2(["content_model"], {"content_model": "empty"})); - - $writer = [block_title]; - $send(block, 'title=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - attributes.$delete("title"); - - $writer = [($truthy($b = float_id) ? $b : (function() {if ($truthy(doc_attrs['$key?']("sectids"))) { - - return $$($nesting, 'Section').$generate_id(block.$title(), document); - } else { - return nil - }; return nil; })())]; - $send(block, 'id=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [float_level]; - $send(block, 'level=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - break;; - } else if ($truthy(($truthy($b = style) ? style['$!=']("normal") : $b))) { - if ($truthy($$($nesting, 'PARAGRAPH_STYLES')['$include?'](style))) { - - block_context = style.$to_sym(); - cloaked_context = "paragraph"; - reader.$unshift_line(this_line); - break;; - } else if ($truthy($$($nesting, 'ADMONITION_STYLES')['$include?'](style))) { - - block_context = "admonition"; - cloaked_context = "paragraph"; - reader.$unshift_line(this_line); - break;; - } else if ($truthy(($truthy($b = block_extensions) ? extensions['$registered_for_block?'](style, "paragraph") : $b))) { - - block_context = style.$to_sym(); - cloaked_context = "paragraph"; - reader.$unshift_line(this_line); - break;; - } else { - - if ($truthy(self.$logger()['$debug?']())) { - self.$logger().$debug(self.$message_with_context("" + "unknown style for paragraph: " + (style), $hash2(["source_location"], {"source_location": reader.$cursor_at_mark()})))}; - style = nil; - }}; - reader.$unshift_line(this_line); - if ($truthy(($truthy($b = indented) ? style['$!']() : $b))) { - - lines = self.$read_paragraph_lines(reader, (content_adjacent = (function() {if (skipped['$=='](0)) { - return options['$[]']("list_type") - } else { - return nil - }; return nil; })()), $hash2(["skip_line_comments"], {"skip_line_comments": text_only})); - self['$adjust_indentation!'](lines); - if ($truthy(($truthy($b = text_only) ? $b : content_adjacent['$==']("dlist")))) { - block = $$($nesting, 'Block').$new(parent, "paragraph", $hash2(["content_model", "source", "attributes"], {"content_model": "simple", "source": lines, "attributes": attributes})) - } else { - block = $$($nesting, 'Block').$new(parent, "literal", $hash2(["content_model", "source", "attributes"], {"content_model": "verbatim", "source": lines, "attributes": attributes})) - }; - } else { - - lines = self.$read_paragraph_lines(reader, (($b = skipped['$=='](0)) ? options['$[]']("list_type") : skipped['$=='](0)), $hash2(["skip_line_comments"], {"skip_line_comments": true})); - if ($truthy(text_only)) { - - if ($truthy(($truthy($b = indented) ? style['$==']("normal") : $b))) { - self['$adjust_indentation!'](lines)}; - block = $$($nesting, 'Block').$new(parent, "paragraph", $hash2(["content_model", "source", "attributes"], {"content_model": "simple", "source": lines, "attributes": attributes})); - } else if ($truthy(($truthy($b = ($truthy($c = $$($nesting, 'ADMONITION_STYLE_HEADS')['$include?'](ch0)) ? this_line['$include?'](":") : $c)) ? $$($nesting, 'AdmonitionParagraphRx')['$=~'](this_line) : $b))) { - - - $writer = [0, (($b = $gvars['~']) === nil ? nil : $b.$post_match())]; - $send(lines, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["name", (admonition_name = (($writer = ["style", (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]).$downcase())]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["textlabel", ($truthy($b = attributes.$delete("caption")) ? $b : doc_attrs['$[]']("" + (admonition_name) + "-caption"))]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - block = $$($nesting, 'Block').$new(parent, "admonition", $hash2(["content_model", "source", "attributes"], {"content_model": "simple", "source": lines, "attributes": attributes})); - } else if ($truthy(($truthy($b = ($truthy($c = md_syntax) ? ch0['$=='](">") : $c)) ? this_line['$start_with?']("> ") : $b))) { - - $send(lines, 'map!', [], ($$12 = function(line){var self = $$12.$$s || this; - - - - if (line == null) { - line = nil; - }; - if (line['$=='](">")) { - - return line.$slice(1, line.$length()); - } else { - - if ($truthy(line['$start_with?']("> "))) { - - return line.$slice(2, line.$length()); - } else { - return line - }; - };}, $$12.$$s = self, $$12.$$arity = 1, $$12)); - if ($truthy(lines['$[]'](-1)['$start_with?']("-- "))) { - - credit_line = (credit_line = lines.$pop()).$slice(3, credit_line.$length()); - if ($truthy(lines['$empty?']())) { - } else { - while ($truthy(lines['$[]'](-1)['$empty?']())) { - lines.$pop() - } - };}; - - $writer = ["style", "quote"]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - block = self.$build_block("quote", "compound", false, parent, $$($nesting, 'Reader').$new(lines), attributes); - if ($truthy(credit_line)) { - - $c = block.$apply_subs(credit_line).$split(", ", 2), $b = Opal.to_ary($c), (attribution = ($b[0] == null ? nil : $b[0])), (citetitle = ($b[1] == null ? nil : $b[1])), $c; - if ($truthy(attribution)) { - - $writer = ["attribution", attribution]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(citetitle)) { - - $writer = ["citetitle", citetitle]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];};}; - } else if ($truthy(($truthy($b = ($truthy($c = (($d = ch0['$==']("\"")) ? $rb_gt(lines.$size(), 1) : ch0['$==']("\""))) ? lines['$[]'](-1)['$start_with?']("-- ") : $c)) ? lines['$[]'](-2)['$end_with?']("\"") : $b))) { - - - $writer = [0, this_line.$slice(1, this_line.$length())]; - $send(lines, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - credit_line = (credit_line = lines.$pop()).$slice(3, credit_line.$length()); - while ($truthy(lines['$[]'](-1)['$empty?']())) { - lines.$pop() - }; - lines['$<<'](lines.$pop().$chop()); - - $writer = ["style", "quote"]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - block = $$($nesting, 'Block').$new(parent, "quote", $hash2(["content_model", "source", "attributes"], {"content_model": "simple", "source": lines, "attributes": attributes})); - $c = block.$apply_subs(credit_line).$split(", ", 2), $b = Opal.to_ary($c), (attribution = ($b[0] == null ? nil : $b[0])), (citetitle = ($b[1] == null ? nil : $b[1])), $c; - if ($truthy(attribution)) { - - $writer = ["attribution", attribution]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(citetitle)) { - - $writer = ["citetitle", citetitle]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - } else { - - if ($truthy(($truthy($b = indented) ? style['$==']("normal") : $b))) { - self['$adjust_indentation!'](lines)}; - block = $$($nesting, 'Block').$new(parent, "paragraph", $hash2(["content_model", "source", "attributes"], {"content_model": "simple", "source": lines, "attributes": attributes})); - }; - self.$catalog_inline_anchors(lines.$join($$($nesting, 'LF')), block, document, reader); - }; - break;; - } - }; - if ($truthy(block)) { - } else { - $case = block_context; - if ("listing"['$===']($case) || "source"['$===']($case)) { - if ($truthy(($truthy($a = block_context['$==']("source")) ? $a : ($truthy($b = attributes['$[]'](1)['$!']()) ? (language = ($truthy($c = attributes['$[]'](2)) ? $c : doc_attrs['$[]']("source-language"))) : $b)))) { - - if ($truthy(language)) { - - - $writer = ["style", "source"]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["language", language]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - $$($nesting, 'AttributeList').$rekey(attributes, [nil, nil, "linenums"]); - } else { - - $$($nesting, 'AttributeList').$rekey(attributes, [nil, "language", "linenums"]); - if ($truthy(attributes['$key?']("language"))) { - } else if ($truthy(doc_attrs['$key?']("source-language"))) { - - $writer = ["language", doc_attrs['$[]']("source-language")]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - }; - if ($truthy(attributes['$key?']("linenums"))) { - } else if ($truthy(($truthy($a = attributes['$[]']("linenums-option")) ? $a : doc_attrs['$[]']("source-linenums-option")))) { - - $writer = ["linenums", ""]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(attributes['$key?']("indent"))) { - } else if ($truthy(doc_attrs['$key?']("source-indent"))) { - - $writer = ["indent", doc_attrs['$[]']("source-indent")]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];};}; - block = self.$build_block("listing", "verbatim", terminator, parent, reader, attributes);} - else if ("fenced_code"['$===']($case)) { - - $writer = ["style", "source"]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy($rb_gt((ll = this_line.$length()), 3))) { - if ($truthy((comma_idx = (language = this_line.$slice(3, ll)).$index(",")))) { - if ($truthy($rb_gt(comma_idx, 0))) { - - language = language.$slice(0, comma_idx).$strip(); - if ($truthy($rb_lt(comma_idx, $rb_minus(ll, 4)))) { - - $writer = ["linenums", ""]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - } else if ($truthy($rb_gt(ll, 4))) { - - $writer = ["linenums", ""]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - } else { - language = language.$lstrip() - }}; - if ($truthy(language['$nil_or_empty?']())) { - if ($truthy(doc_attrs['$key?']("source-language"))) { - - $writer = ["language", doc_attrs['$[]']("source-language")]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - } else { - - $writer = ["language", language]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy(attributes['$key?']("linenums"))) { - } else if ($truthy(($truthy($a = attributes['$[]']("linenums-option")) ? $a : doc_attrs['$[]']("source-linenums-option")))) { - - $writer = ["linenums", ""]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(attributes['$key?']("indent"))) { - } else if ($truthy(doc_attrs['$key?']("source-indent"))) { - - $writer = ["indent", doc_attrs['$[]']("source-indent")]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - terminator = terminator.$slice(0, 3); - block = self.$build_block("listing", "verbatim", terminator, parent, reader, attributes);} - else if ("table"['$===']($case)) { - block_cursor = reader.$cursor(); - block_reader = $$($nesting, 'Reader').$new(reader.$read_lines_until($hash2(["terminator", "skip_line_comments", "context", "cursor"], {"terminator": terminator, "skip_line_comments": true, "context": "table", "cursor": "at_mark"})), block_cursor); - if ($truthy(terminator['$start_with?']("|", "!"))) { - } else { - ($truthy($a = attributes['$[]']("format")) ? $a : (($writer = ["format", (function() {if ($truthy(terminator['$start_with?'](","))) { - return "csv" - } else { - return "dsv" - }; return nil; })()]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - }; - block = self.$parse_table(block_reader, parent, attributes);} - else if ("sidebar"['$===']($case)) {block = self.$build_block(block_context, "compound", terminator, parent, reader, attributes)} - else if ("admonition"['$===']($case)) { - - $writer = ["name", (admonition_name = style.$downcase())]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["textlabel", ($truthy($a = attributes.$delete("caption")) ? $a : doc_attrs['$[]']("" + (admonition_name) + "-caption"))]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - block = self.$build_block(block_context, "compound", terminator, parent, reader, attributes);} - else if ("open"['$===']($case) || "abstract"['$===']($case) || "partintro"['$===']($case)) {block = self.$build_block("open", "compound", terminator, parent, reader, attributes)} - else if ("literal"['$===']($case)) {block = self.$build_block(block_context, "verbatim", terminator, parent, reader, attributes)} - else if ("example"['$===']($case)) { - if ($truthy(attributes['$[]']("collapsible-option"))) { - - $writer = ["caption", ""]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - block = self.$build_block(block_context, "compound", terminator, parent, reader, attributes);} - else if ("quote"['$===']($case) || "verse"['$===']($case)) { - $$($nesting, 'AttributeList').$rekey(attributes, [nil, "attribution", "citetitle"]); - block = self.$build_block(block_context, (function() {if (block_context['$==']("verse")) { - return "verbatim" - } else { - return "compound" - }; return nil; })(), terminator, parent, reader, attributes);} - else if ("stem"['$===']($case) || "latexmath"['$===']($case) || "asciimath"['$===']($case)) { - if (block_context['$==']("stem")) { - - $writer = ["style", $$($nesting, 'STEM_TYPE_ALIASES')['$[]'](($truthy($a = attributes['$[]'](2)) ? $a : doc_attrs['$[]']("stem")))]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - block = self.$build_block("stem", "raw", terminator, parent, reader, attributes);} - else if ("pass"['$===']($case)) {block = self.$build_block(block_context, "raw", terminator, parent, reader, attributes)} - else if ("comment"['$===']($case)) { - self.$build_block(block_context, "skip", terminator, parent, reader, attributes); - attributes.$clear(); - return nil;} - else {if ($truthy(($truthy($a = block_extensions) ? (extension = extensions['$registered_for_block?'](block_context, cloaked_context)) : $a))) { - - if ((content_model = (ext_config = extension.$config())['$[]']("content_model"))['$==']("skip")) { - } else { - - if ($truthy((positional_attrs = ($truthy($a = ext_config['$[]']("positional_attrs")) ? $a : ext_config['$[]']("pos_attrs")))['$nil_or_empty?']())) { - } else { - $$($nesting, 'AttributeList').$rekey(attributes, $rb_plus([nil], positional_attrs)) - }; - if ($truthy((default_attrs = ext_config['$[]']("default_attrs")))) { - $send(default_attrs, 'each', [], ($$13 = function(k, v){var self = $$13.$$s || this, $e; - - - - if (k == null) { - k = nil; - }; - - if (v == null) { - v = nil; - }; - return ($truthy($e = attributes['$[]'](k)) ? $e : (($writer = [k, v]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));}, $$13.$$s = self, $$13.$$arity = 2, $$13))}; - - $writer = ["cloaked-context", cloaked_context]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }; - if ($truthy((block = self.$build_block(block_context, content_model, terminator, parent, reader, attributes, $hash2(["extension"], {"extension": extension}))))) { - } else { - - attributes.$clear(); - return nil; - }; - } else { - self.$raise("" + "Unsupported block type " + (block_context) + " at " + (reader.$cursor())) - }} - }; - if ($truthy(document.$sourcemap())) { - - $writer = [reader.$cursor_at_mark()]; - $send(block, 'source_location=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(attributes['$[]']("title"))) { - - - $writer = [(block_title = attributes.$delete("title"))]; - $send(block, 'title=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy($$($nesting, 'CAPTION_ATTRIBUTE_NAMES')['$[]'](block.$context()))) { - block.$assign_caption(attributes.$delete("caption"))};}; - - $writer = [attributes['$[]']("style")]; - $send(block, 'style=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy((block_id = ($truthy($a = block.$id()) ? $a : (($writer = [attributes['$[]']("id")]), $send(block, 'id=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))))) { - - if ($truthy((function() {if ($truthy(block_title)) { - - return block_title['$include?']($$($nesting, 'ATTR_REF_HEAD')); - } else { - return block['$title?']() - }; return nil; })())) { - block.$title()}; - if ($truthy(document.$register("refs", [block_id, block]))) { - } else { - self.$logger().$warn(self.$message_with_context("" + "id assigned to block already in use: " + (block_id), $hash2(["source_location"], {"source_location": reader.$cursor_at_mark()}))) - };}; - if ($truthy(attributes['$empty?']())) { - } else { - block.$update_attributes(attributes) - }; - block.$commit_subs(); - if ($truthy(block['$sub?']("callouts"))) { - if ($truthy(self.$catalog_callouts(block.$source(), document))) { - } else { - block.$remove_sub("callouts") - }}; - return block; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Parser_next_block$10.$$arity = -3); - Opal.defs(self, '$read_paragraph_lines', $Parser_read_paragraph_lines$14 = function $$read_paragraph_lines(reader, break_at_list, opts) { - var self = this, $writer = nil, break_condition = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - - $writer = ["break_on_blank_lines", true]; - $send(opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["break_on_list_continuation", true]; - $send(opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["preserve_last_line", true]; - $send(opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - break_condition = (function() {if ($truthy(break_at_list)) { - - if ($truthy($$($nesting, 'Compliance').$block_terminates_paragraph())) { - return $$($nesting, 'StartOfBlockOrListProc') - } else { - return $$($nesting, 'StartOfListProc') - }; - } else { - - if ($truthy($$($nesting, 'Compliance').$block_terminates_paragraph())) { - return $$($nesting, 'StartOfBlockProc') - } else { - return $$($nesting, 'NoOp') - }; - }; return nil; })(); - return $send(reader, 'read_lines_until', [opts], break_condition.$to_proc()); - }, $Parser_read_paragraph_lines$14.$$arity = -3); - Opal.defs(self, '$is_delimited_block?', $Parser_is_delimited_block$ques$15 = function(line, return_match_data) { - var $a, $b, self = this, line_len = nil, tip = nil, tip_len = nil, context = nil, masq = nil; - - - - if (return_match_data == null) { - return_match_data = nil; - }; - if ($truthy(($truthy($a = $rb_gt((line_len = line.$length()), 1)) ? $$($nesting, 'DELIMITED_BLOCK_HEADS')['$[]'](line.$slice(0, 2)) : $a))) { - } else { - return nil - }; - if (line_len['$=='](2)) { - - tip = line; - tip_len = 2; - } else { - - if ($truthy($rb_lt(line_len, 5))) { - - tip = line; - tip_len = line_len; - } else { - tip = line.$slice(0, (tip_len = 4)) - }; - if ($truthy(($truthy($a = $$($nesting, 'Compliance').$markdown_syntax()) ? tip['$start_with?']("`") : $a))) { - if (tip_len['$=='](4)) { - if (tip['$==']("````")) { - return nil - } else if ((tip = tip.$chop())['$==']("```")) { - - line = tip; - line_len = (tip_len = 3); - } else { - return nil - } - } else if (tip['$==']("```")) { - } else { - return nil - } - } else if (tip_len['$=='](3)) { - return nil}; - }; - $b = $$($nesting, 'DELIMITED_BLOCKS')['$[]'](tip), $a = Opal.to_ary($b), (context = ($a[0] == null ? nil : $a[0])), (masq = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy(($truthy($a = context) ? ($truthy($b = line_len['$=='](tip_len)) ? $b : self['$uniform?'](line.$slice(1, line_len), $$($nesting, 'DELIMITED_BLOCK_TAILS')['$[]'](tip), $rb_minus(line_len, 1))) : $a))) { - if ($truthy(return_match_data)) { - - return $$($nesting, 'BlockMatchData').$new(context, masq, tip, line); - } else { - return true - } - } else { - return nil - }; - }, $Parser_is_delimited_block$ques$15.$$arity = -2); - Opal.defs(self, '$build_block', $Parser_build_block$16 = function $$build_block(block_context, content_model, terminator, parent, reader, attributes, options) { - var $a, self = this, skip_processing = nil, parse_as_content_model = nil, lines = nil, block_reader = nil, block_cursor = nil, tab_size = nil, indent = nil, extension = nil, block = nil; - - - - if (options == null) { - options = $hash2([], {}); - }; - if (content_model['$==']("skip")) { - $a = [true, "simple"], (skip_processing = $a[0]), (parse_as_content_model = $a[1]), $a - } else if (content_model['$==']("raw")) { - $a = [false, "simple"], (skip_processing = $a[0]), (parse_as_content_model = $a[1]), $a - } else { - $a = [false, content_model], (skip_processing = $a[0]), (parse_as_content_model = $a[1]), $a - }; - if ($truthy(terminator['$nil?']())) { - - if (parse_as_content_model['$==']("verbatim")) { - lines = reader.$read_lines_until($hash2(["break_on_blank_lines", "break_on_list_continuation"], {"break_on_blank_lines": true, "break_on_list_continuation": true})) - } else { - - if (content_model['$==']("compound")) { - content_model = "simple"}; - lines = self.$read_paragraph_lines(reader, false, $hash2(["skip_line_comments", "skip_processing"], {"skip_line_comments": true, "skip_processing": skip_processing})); - }; - block_reader = nil; - } else if ($truthy(parse_as_content_model['$!=']("compound"))) { - - lines = reader.$read_lines_until($hash2(["terminator", "skip_processing", "context", "cursor"], {"terminator": terminator, "skip_processing": skip_processing, "context": block_context, "cursor": "at_mark"})); - block_reader = nil; - } else if (terminator['$=='](false)) { - - lines = nil; - block_reader = reader; - } else { - - lines = nil; - block_cursor = reader.$cursor(); - block_reader = $$($nesting, 'Reader').$new(reader.$read_lines_until($hash2(["terminator", "skip_processing", "context", "cursor"], {"terminator": terminator, "skip_processing": skip_processing, "context": block_context, "cursor": "at_mark"})), block_cursor); - }; - if (content_model['$==']("verbatim")) { - - tab_size = ($truthy($a = attributes['$[]']("tabsize")) ? $a : parent.$document().$attributes()['$[]']("tabsize")).$to_i(); - if ($truthy((indent = attributes['$[]']("indent")))) { - self['$adjust_indentation!'](lines, indent.$to_i(), tab_size) - } else if ($truthy($rb_gt(tab_size, 0))) { - self['$adjust_indentation!'](lines, -1, tab_size)}; - } else if (content_model['$==']("skip")) { - return nil}; - if ($truthy((extension = options['$[]']("extension")))) { - - attributes.$delete("style"); - if ($truthy((block = extension.$process_method()['$[]'](parent, ($truthy($a = block_reader) ? $a : $$($nesting, 'Reader').$new(lines)), attributes.$merge())))) { - - attributes.$replace(block.$attributes()); - if ($truthy((($a = block.$content_model()['$==']("compound")) ? (lines = block.$lines())['$empty?']()['$!']() : block.$content_model()['$==']("compound")))) { - - content_model = "compound"; - block_reader = $$($nesting, 'Reader').$new(lines);}; - } else { - return nil - }; - } else { - block = $$($nesting, 'Block').$new(parent, block_context, $hash2(["content_model", "source", "attributes"], {"content_model": content_model, "source": lines, "attributes": attributes})) - }; - if (content_model['$==']("compound")) { - self.$parse_blocks(block_reader, block)}; - return block; - }, $Parser_build_block$16.$$arity = -7); - Opal.defs(self, '$parse_blocks', $Parser_parse_blocks$17 = function $$parse_blocks(reader, parent, attributes) { - var $a, $b, $c, self = this, block = nil; - - - - if (attributes == null) { - attributes = nil; - }; - if ($truthy(attributes)) { - while ($truthy(($truthy($b = ($truthy($c = (block = self.$next_block(reader, parent, attributes.$merge()))) ? parent.$blocks()['$<<'](block) : $c)) ? $b : reader['$has_more_lines?']()))) { - - } - } else { - while ($truthy(($truthy($b = ($truthy($c = (block = self.$next_block(reader, parent))) ? parent.$blocks()['$<<'](block) : $c)) ? $b : reader['$has_more_lines?']()))) { - - } - }; - return nil; - }, $Parser_parse_blocks$17.$$arity = -3); - Opal.defs(self, '$parse_list', $Parser_parse_list$18 = function $$parse_list(reader, list_type, parent, style) { - var $a, $b, self = this, list_block = nil, list_rx = nil, list_item = nil; - if ($gvars["~"] == null) $gvars["~"] = nil; - - - list_block = $$($nesting, 'List').$new(parent, list_type); - list_rx = $$($nesting, 'ListRxMap')['$[]'](list_type); - while ($truthy(($truthy($b = reader['$has_more_lines?']()) ? list_rx['$=~'](reader.$peek_line()) : $b))) { - - if ($truthy((list_item = self.$parse_list_item(reader, list_block, $gvars["~"], (($b = $gvars['~']) === nil ? nil : $b['$[]'](1)), style)))) { - list_block.$items()['$<<'](list_item)}; - if ($truthy($b = reader.$skip_blank_lines())) { - $b - } else { - break; - }; - }; - return list_block; - }, $Parser_parse_list$18.$$arity = 4); - Opal.defs(self, '$catalog_callouts', $Parser_catalog_callouts$19 = function $$catalog_callouts(text, document) { - var $$20, self = this, found = nil, autonum = nil; - - - found = false; - autonum = 0; - if ($truthy(text['$include?']("<"))) { - $send(text, 'scan', [$$($nesting, 'CalloutScanRx')], ($$20 = function(){var self = $$20.$$s || this, $a; - - - if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](0))['$start_with?']("\\"))) { - } else { - document.$callouts().$register((function() {if ((($a = $gvars['~']) === nil ? nil : $a['$[]'](2))['$=='](".")) { - return (autonum = $rb_plus(autonum, 1)).$to_s() - } else { - return (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)) - }; return nil; })()) - }; - return (found = true);}, $$20.$$s = self, $$20.$$arity = 0, $$20))}; - return found; - }, $Parser_catalog_callouts$19.$$arity = 2); - Opal.defs(self, '$catalog_inline_anchor', $Parser_catalog_inline_anchor$21 = function $$catalog_inline_anchor(id, reftext, node, location, doc) { - var $a, self = this; - - - - if (doc == null) { - doc = node.$document(); - }; - if ($truthy(($truthy($a = reftext) ? reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')) : $a))) { - reftext = doc.$sub_attributes(reftext)}; - if ($truthy(doc.$register("refs", [id, $$($nesting, 'Inline').$new(node, "anchor", reftext, $hash2(["type", "id"], {"type": "ref", "id": id}))]))) { - } else { - - if ($truthy($$($nesting, 'Reader')['$==='](location))) { - location = location.$cursor()}; - self.$logger().$warn(self.$message_with_context("" + "id assigned to anchor already in use: " + (id), $hash2(["source_location"], {"source_location": location}))); - }; - return nil; - }, $Parser_catalog_inline_anchor$21.$$arity = -5); - Opal.defs(self, '$catalog_inline_anchors', $Parser_catalog_inline_anchors$22 = function $$catalog_inline_anchors(text, block, document, reader) { - var $a, $$23, self = this; - - - if ($truthy(($truthy($a = text['$include?']("[[")) ? $a : text['$include?']("or:")))) { - $send(text, 'scan', [$$($nesting, 'InlineAnchorScanRx')], ($$23 = function(){var self = $$23.$$s || this, $b, $c, $d, id = nil, reftext = nil, location = nil, offset = nil; - - - if ($truthy((id = (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))))) { - if ($truthy(($truthy($b = ($truthy($c = (reftext = (($d = $gvars['~']) === nil ? nil : $d['$[]'](2)))) ? reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')) : $c)) ? (reftext = document.$sub_attributes(reftext))['$empty?']() : $b))) { - return nil;} - } else { - - id = (($b = $gvars['~']) === nil ? nil : $b['$[]'](3)); - if ($truthy((reftext = (($b = $gvars['~']) === nil ? nil : $b['$[]'](4))))) { - if ($truthy(reftext['$include?']("]"))) { - - reftext = reftext.$gsub("\\]", "]"); - if ($truthy(reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - reftext = document.$sub_attributes(reftext)}; - } else if ($truthy(($truthy($b = reftext['$include?']($$($nesting, 'ATTR_REF_HEAD'))) ? (reftext = document.$sub_attributes(reftext))['$empty?']() : $b))) { - return nil;}}; - }; - if ($truthy(document.$register("refs", [id, $$($nesting, 'Inline').$new(block, "anchor", reftext, $hash2(["type", "id"], {"type": "ref", "id": id}))]))) { - return nil - } else { - - location = reader.$cursor_at_mark(); - if ($truthy($rb_gt((offset = $rb_plus((($b = $gvars['~']) === nil ? nil : $b.$pre_match()).$count($$($nesting, 'LF')), (function() {if ($truthy((($b = $gvars['~']) === nil ? nil : $b['$[]'](0))['$start_with?']($$($nesting, 'LF')))) { - return 1 - } else { - return 0 - }; return nil; })())), 0))) { - (location = location.$dup()).$advance(offset)}; - return self.$logger().$warn(self.$message_with_context("" + "id assigned to anchor already in use: " + (id), $hash2(["source_location"], {"source_location": location}))); - };}, $$23.$$s = self, $$23.$$arity = 0, $$23))}; - return nil; - }, $Parser_catalog_inline_anchors$22.$$arity = 4); - Opal.defs(self, '$catalog_inline_biblio_anchor', $Parser_catalog_inline_biblio_anchor$24 = function $$catalog_inline_biblio_anchor(id, reftext, node, reader) { - var $a, self = this; - - - if ($truthy(node.$document().$register("refs", [id, $$($nesting, 'Inline').$new(node, "anchor", ($truthy($a = reftext) ? "" + "[" + (reftext) + "]" : $a), $hash2(["type", "id"], {"type": "bibref", "id": id}))]))) { - } else { - self.$logger().$warn(self.$message_with_context("" + "id assigned to bibliography anchor already in use: " + (id), $hash2(["source_location"], {"source_location": reader.$cursor()}))) - }; - return nil; - }, $Parser_catalog_inline_biblio_anchor$24.$$arity = 4); - Opal.defs(self, '$parse_description_list', $Parser_parse_description_list$25 = function $$parse_description_list(reader, match, parent) { - var $a, $b, self = this, list_block = nil, sibling_pattern = nil, current_pair = nil, next_pair = nil, $writer = nil; - if ($gvars["~"] == null) $gvars["~"] = nil; - - - list_block = $$($nesting, 'List').$new(parent, "dlist"); - sibling_pattern = $$($nesting, 'DescriptionListSiblingRx')['$[]'](match['$[]'](2)); - list_block.$items()['$<<']((current_pair = self.$parse_list_item(reader, list_block, match, sibling_pattern))); - while ($truthy(($truthy($b = reader['$has_more_lines?']()) ? sibling_pattern['$=~'](reader.$peek_line()) : $b))) { - - next_pair = self.$parse_list_item(reader, list_block, $gvars["~"], sibling_pattern); - if ($truthy(current_pair['$[]'](1))) { - list_block.$items()['$<<']((current_pair = next_pair)) - } else { - - current_pair['$[]'](0)['$<<'](next_pair['$[]'](0)['$[]'](0)); - - $writer = [1, next_pair['$[]'](1)]; - $send(current_pair, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }; - }; - return list_block; - }, $Parser_parse_description_list$25.$$arity = 3); - Opal.defs(self, '$parse_callout_list', $Parser_parse_callout_list$26 = function $$parse_callout_list(reader, match, parent, callouts) { - var $a, $b, $c, self = this, list_block = nil, next_index = nil, autonum = nil, num = nil, list_item = nil, coids = nil, $writer = nil; - - - list_block = $$($nesting, 'List').$new(parent, "colist"); - next_index = 1; - autonum = 0; - while ($truthy(($truthy($b = match) ? $b : ($truthy($c = (match = $$($nesting, 'CalloutListRx').$match(reader.$peek_line()))) ? reader.$mark() : $c)))) { - - if ((num = match['$[]'](1))['$=='](".")) { - num = (autonum = $rb_plus(autonum, 1)).$to_s()}; - if (num['$=='](next_index.$to_s())) { - } else { - self.$logger().$warn(self.$message_with_context("" + "callout list item index: expected " + (next_index) + ", got " + (num), $hash2(["source_location"], {"source_location": reader.$cursor_at_mark()}))) - }; - if ($truthy((list_item = self.$parse_list_item(reader, list_block, match, "<1>")))) { - - list_block.$items()['$<<'](list_item); - if ($truthy((coids = callouts.$callout_ids(list_block.$items().$size()))['$empty?']())) { - self.$logger().$warn(self.$message_with_context("" + "no callout found for <" + (list_block.$items().$size()) + ">", $hash2(["source_location"], {"source_location": reader.$cursor_at_mark()}))) - } else { - - $writer = ["coids", coids]; - $send(list_item.$attributes(), '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - };}; - next_index = $rb_plus(next_index, 1); - match = nil; - }; - callouts.$next_list(); - return list_block; - }, $Parser_parse_callout_list$26.$$arity = 4); - Opal.defs(self, '$parse_list_item', $Parser_parse_list_item$27 = function $$parse_list_item(reader, list_block, match, sibling_trait, style) { - var $a, $b, self = this, list_type = nil, dlist = nil, list_term = nil, term_text = nil, item_text = nil, has_text = nil, list_item = nil, $writer = nil, sourcemap_assignment_deferred = nil, ordinal = nil, implicit_style = nil, block_cursor = nil, list_item_reader = nil, comment_lines = nil, subsequent_line = nil, content_adjacent = nil, block = nil, first_block = nil; - - - - if (style == null) { - style = nil; - }; - if ((list_type = list_block.$context())['$==']("dlist")) { - - dlist = true; - list_term = $$($nesting, 'ListItem').$new(list_block, (term_text = match['$[]'](1))); - if ($truthy(($truthy($a = term_text['$start_with?']("[[")) ? $$($nesting, 'LeadingInlineAnchorRx')['$=~'](term_text) : $a))) { - self.$catalog_inline_anchor((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), ($truthy($a = (($b = $gvars['~']) === nil ? nil : $b['$[]'](2))) ? $a : (($b = $gvars['~']) === nil ? nil : $b.$post_match()).$lstrip()), list_term, reader)}; - if ($truthy((item_text = match['$[]'](3)))) { - has_text = true}; - list_item = $$($nesting, 'ListItem').$new(list_block, item_text); - if ($truthy(list_block.$document().$sourcemap())) { - - - $writer = [reader.$cursor()]; - $send(list_term, 'source_location=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(has_text)) { - - $writer = [list_term.$source_location()]; - $send(list_item, 'source_location=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - sourcemap_assignment_deferred = true - };}; - } else { - - has_text = true; - list_item = $$($nesting, 'ListItem').$new(list_block, (item_text = match['$[]'](2))); - if ($truthy(list_block.$document().$sourcemap())) { - - $writer = [reader.$cursor()]; - $send(list_item, 'source_location=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if (list_type['$==']("ulist")) { - - - $writer = [sibling_trait]; - $send(list_item, 'marker=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(item_text['$start_with?']("["))) { - if ($truthy(($truthy($a = style) ? style['$==']("bibliography") : $a))) { - if ($truthy($$($nesting, 'InlineBiblioAnchorRx')['$=~'](item_text))) { - self.$catalog_inline_biblio_anchor((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), list_item, reader)} - } else if ($truthy(item_text['$start_with?']("[["))) { - if ($truthy($$($nesting, 'LeadingInlineAnchorRx')['$=~'](item_text))) { - self.$catalog_inline_anchor((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), list_item, reader)} - } else if ($truthy(item_text['$start_with?']("[ ] ", "[x] ", "[*] "))) { - - list_block.$set_option("checklist"); - - $writer = ["checkbox", ""]; - $send(list_item.$attributes(), '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(item_text['$start_with?']("[ "))) { - } else { - - $writer = ["checked", ""]; - $send(list_item.$attributes(), '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - - $writer = [item_text.$slice(4, item_text.$length())]; - $send(list_item, 'text=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}}; - } else if (list_type['$==']("olist")) { - - $b = self.$resolve_ordered_list_marker(sibling_trait, (ordinal = list_block.$items().$size()), true, reader), $a = Opal.to_ary($b), (sibling_trait = ($a[0] == null ? nil : $a[0])), (implicit_style = ($a[1] == null ? nil : $a[1])), $b; - - $writer = [sibling_trait]; - $send(list_item, 'marker=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy((($a = ordinal['$=='](0)) ? style['$!']() : ordinal['$=='](0)))) { - - $writer = [($truthy($a = implicit_style) ? $a : ($truthy($b = $$($nesting, 'ORDERED_LIST_STYLES')['$[]']($rb_minus(sibling_trait.$length(), 1))) ? $b : "arabic").$to_s())]; - $send(list_block, 'style=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(($truthy($a = item_text['$start_with?']("[[")) ? $$($nesting, 'LeadingInlineAnchorRx')['$=~'](item_text) : $a))) { - self.$catalog_inline_anchor((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), list_item, reader)}; - } else { - - - $writer = [sibling_trait]; - $send(list_item, 'marker=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(($truthy($a = item_text['$start_with?']("[[")) ? $$($nesting, 'LeadingInlineAnchorRx')['$=~'](item_text) : $a))) { - self.$catalog_inline_anchor((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), list_item, reader)}; - }; - }; - reader.$shift(); - block_cursor = reader.$cursor(); - list_item_reader = $$($nesting, 'Reader').$new(self.$read_lines_for_list_item(reader, list_type, sibling_trait, has_text), block_cursor); - if ($truthy(list_item_reader['$has_more_lines?']())) { - - if ($truthy(sourcemap_assignment_deferred)) { - - $writer = [block_cursor]; - $send(list_item, 'source_location=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - comment_lines = list_item_reader.$skip_line_comments(); - if ($truthy((subsequent_line = list_item_reader.$peek_line()))) { - - if ($truthy(comment_lines['$empty?']())) { - } else { - list_item_reader.$unshift_lines(comment_lines) - }; - if ($truthy(subsequent_line['$empty?']())) { - } else { - - content_adjacent = true; - if ($truthy(dlist)) { - } else { - has_text = nil - }; - };}; - if ($truthy((block = self.$next_block(list_item_reader, list_item, $hash2([], {}), $hash2(["text_only", "list_type"], {"text_only": (function() {if ($truthy(has_text)) { - return nil - } else { - return true - }; return nil; })(), "list_type": list_type}))))) { - list_item.$blocks()['$<<'](block)}; - while ($truthy(list_item_reader['$has_more_lines?']())) { - if ($truthy((block = self.$next_block(list_item_reader, list_item, $hash2([], {}), $hash2(["list_type"], {"list_type": list_type}))))) { - list_item.$blocks()['$<<'](block)} - }; - if ($truthy(($truthy($a = ($truthy($b = content_adjacent) ? (first_block = list_item.$blocks()['$[]'](0)) : $b)) ? first_block.$context()['$==']("paragraph") : $a))) { - list_item.$fold_first()};}; - if ($truthy(dlist)) { - return [[list_term], (function() {if ($truthy(($truthy($a = list_item['$text?']()) ? $a : list_item['$blocks?']()))) { - return list_item - } else { - return nil - }; return nil; })()] - } else { - return list_item - }; - }, $Parser_parse_list_item$27.$$arity = -5); - Opal.defs(self, '$read_lines_for_list_item', $Parser_read_lines_for_list_item$28 = function $$read_lines_for_list_item(reader, list_type, sibling_trait, has_text) { - var $a, $b, $c, $$29, $$30, $$31, $$32, $$33, self = this, buffer = nil, continuation = nil, within_nested_list = nil, detached_continuation = nil, dlist = nil, this_line = nil, prev_line = nil, $writer = nil, match = nil, nested_list_type = nil, last_line = nil; - - - - if (sibling_trait == null) { - sibling_trait = nil; - }; - - if (has_text == null) { - has_text = true; - }; - buffer = []; - continuation = "inactive"; - within_nested_list = false; - detached_continuation = nil; - dlist = list_type['$==']("dlist"); - while ($truthy(reader['$has_more_lines?']())) { - - this_line = reader.$read_line(); - if ($truthy(self['$is_sibling_list_item?'](this_line, list_type, sibling_trait))) { - break;}; - prev_line = (function() {if ($truthy(buffer['$empty?']())) { - return nil - } else { - return buffer['$[]'](-1) - }; return nil; })(); - if (prev_line['$==']($$($nesting, 'LIST_CONTINUATION'))) { - - if (continuation['$==']("inactive")) { - - continuation = "active"; - has_text = true; - if ($truthy(within_nested_list)) { - } else { - - $writer = [-1, ""]; - $send(buffer, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - };}; - if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) { - - if ($truthy(continuation['$!=']("frozen"))) { - - continuation = "frozen"; - buffer['$<<'](this_line);}; - this_line = nil; - continue;;};}; - if ($truthy((match = self['$is_delimited_block?'](this_line, true)))) { - if (continuation['$==']("active")) { - - buffer['$<<'](this_line); - buffer.$concat(reader.$read_lines_until($hash2(["terminator", "read_last_line", "context"], {"terminator": match.$terminator(), "read_last_line": true, "context": nil}))); - continuation = "inactive"; - } else { - break; - } - } else if ($truthy(($truthy($b = ($truthy($c = dlist) ? continuation['$!=']("active") : $c)) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](this_line) : $b))) { - break; - } else if ($truthy((($b = continuation['$==']("active")) ? this_line['$empty?']()['$!']() : continuation['$==']("active")))) { - if ($truthy($$($nesting, 'LiteralParagraphRx')['$match?'](this_line))) { - - reader.$unshift_line(this_line); - if ($truthy(dlist)) { - buffer.$concat($send(reader, 'read_lines_until', [$hash2(["preserve_last_line", "break_on_blank_lines", "break_on_list_continuation"], {"preserve_last_line": true, "break_on_blank_lines": true, "break_on_list_continuation": true})], ($$29 = function(line){var self = $$29.$$s || this; - - - - if (line == null) { - line = nil; - }; - return self['$is_sibling_list_item?'](line, list_type, sibling_trait);}, $$29.$$s = self, $$29.$$arity = 1, $$29))) - } else { - buffer.$concat(reader.$read_lines_until($hash2(["preserve_last_line", "break_on_blank_lines", "break_on_list_continuation"], {"preserve_last_line": true, "break_on_blank_lines": true, "break_on_list_continuation": true}))) - }; - continuation = "inactive"; - } else if ($truthy(($truthy($b = ($truthy($c = $$($nesting, 'BlockTitleRx')['$match?'](this_line)) ? $c : $$($nesting, 'BlockAttributeLineRx')['$match?'](this_line))) ? $b : $$($nesting, 'AttributeEntryRx')['$match?'](this_line)))) { - buffer['$<<'](this_line) - } else { - - if ($truthy((nested_list_type = $send((function() {if ($truthy(within_nested_list)) { - return ["dlist"] - } else { - return $$($nesting, 'NESTABLE_LIST_CONTEXTS') - }; return nil; })(), 'find', [], ($$30 = function(ctx){var self = $$30.$$s || this; - - - - if (ctx == null) { - ctx = nil; - }; - return $$($nesting, 'ListRxMap')['$[]'](ctx)['$match?'](this_line);}, $$30.$$s = self, $$30.$$arity = 1, $$30))))) { - - within_nested_list = true; - if ($truthy((($b = nested_list_type['$==']("dlist")) ? (($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$nil_or_empty?']() : nested_list_type['$==']("dlist")))) { - has_text = false};}; - buffer['$<<'](this_line); - continuation = "inactive"; - } - } else if ($truthy(($truthy($b = prev_line) ? prev_line['$empty?']() : $b))) { - - if ($truthy(this_line['$empty?']())) { - - if ($truthy((this_line = ($truthy($b = reader.$skip_blank_lines()) ? reader.$read_line() : $b)))) { - } else { - break; - }; - if ($truthy(self['$is_sibling_list_item?'](this_line, list_type, sibling_trait))) { - break;};}; - if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) { - - detached_continuation = buffer.$size(); - buffer['$<<'](this_line); - } else if ($truthy(has_text)) { - if ($truthy(self['$is_sibling_list_item?'](this_line, list_type, sibling_trait))) { - break; - } else if ($truthy((nested_list_type = $send($$($nesting, 'NESTABLE_LIST_CONTEXTS'), 'find', [], ($$31 = function(ctx){var self = $$31.$$s || this; - - - - if (ctx == null) { - ctx = nil; - }; - return $$($nesting, 'ListRxMap')['$[]'](ctx)['$=~'](this_line);}, $$31.$$s = self, $$31.$$arity = 1, $$31))))) { - - buffer['$<<'](this_line); - within_nested_list = true; - if ($truthy((($b = nested_list_type['$==']("dlist")) ? (($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$nil_or_empty?']() : nested_list_type['$==']("dlist")))) { - has_text = false}; - } else if ($truthy($$($nesting, 'LiteralParagraphRx')['$match?'](this_line))) { - - reader.$unshift_line(this_line); - if ($truthy(dlist)) { - buffer.$concat($send(reader, 'read_lines_until', [$hash2(["preserve_last_line", "break_on_blank_lines", "break_on_list_continuation"], {"preserve_last_line": true, "break_on_blank_lines": true, "break_on_list_continuation": true})], ($$32 = function(line){var self = $$32.$$s || this; - - - - if (line == null) { - line = nil; - }; - return self['$is_sibling_list_item?'](line, list_type, sibling_trait);}, $$32.$$s = self, $$32.$$arity = 1, $$32))) - } else { - buffer.$concat(reader.$read_lines_until($hash2(["preserve_last_line", "break_on_blank_lines", "break_on_list_continuation"], {"preserve_last_line": true, "break_on_blank_lines": true, "break_on_list_continuation": true}))) - }; - } else { - break; - } - } else { - - if ($truthy(within_nested_list)) { - } else { - buffer.$pop() - }; - buffer['$<<'](this_line); - has_text = true; - }; - } else { - - if ($truthy(this_line['$empty?']())) { - } else { - has_text = true - }; - if ($truthy((nested_list_type = $send((function() {if ($truthy(within_nested_list)) { - return ["dlist"] - } else { - return $$($nesting, 'NESTABLE_LIST_CONTEXTS') - }; return nil; })(), 'find', [], ($$33 = function(ctx){var self = $$33.$$s || this; - - - - if (ctx == null) { - ctx = nil; - }; - return $$($nesting, 'ListRxMap')['$[]'](ctx)['$=~'](this_line);}, $$33.$$s = self, $$33.$$arity = 1, $$33))))) { - - within_nested_list = true; - if ($truthy((($b = nested_list_type['$==']("dlist")) ? (($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$nil_or_empty?']() : nested_list_type['$==']("dlist")))) { - has_text = false};}; - buffer['$<<'](this_line); - }; - this_line = nil; - }; - if ($truthy(this_line)) { - reader.$unshift_line(this_line)}; - if ($truthy(detached_continuation)) { - - $writer = [detached_continuation, ""]; - $send(buffer, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - while (!($truthy(buffer['$empty?']()))) { - if ($truthy((last_line = buffer['$[]'](-1))['$empty?']())) { - buffer.$pop() - } else { - - if (last_line['$==']($$($nesting, 'LIST_CONTINUATION'))) { - buffer.$pop()}; - break;; - } - }; - return buffer; - }, $Parser_read_lines_for_list_item$28.$$arity = -3); - Opal.defs(self, '$initialize_section', $Parser_initialize_section$34 = function $$initialize_section(reader, parent, attributes) { - var $a, $b, self = this, document = nil, book = nil, doctype = nil, source_location = nil, sect_style = nil, sect_id = nil, sect_reftext = nil, sect_title = nil, sect_level = nil, sect_atx = nil, $writer = nil, sect_name = nil, sect_special = nil, sect_numbered = nil, section = nil, id = nil, generated_id = nil; - - - - if (attributes == null) { - attributes = $hash2([], {}); - }; - document = parent.$document(); - book = (doctype = document.$doctype())['$==']("book"); - if ($truthy(document.$sourcemap())) { - source_location = reader.$cursor()}; - sect_style = attributes['$[]'](1); - $b = self.$parse_section_title(reader, document, attributes['$[]']("id")), $a = Opal.to_ary($b), (sect_id = ($a[0] == null ? nil : $a[0])), (sect_reftext = ($a[1] == null ? nil : $a[1])), (sect_title = ($a[2] == null ? nil : $a[2])), (sect_level = ($a[3] == null ? nil : $a[3])), (sect_atx = ($a[4] == null ? nil : $a[4])), $b; - if ($truthy(sect_reftext)) { - - $writer = ["reftext", sect_reftext]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - sect_reftext = attributes['$[]']("reftext") - }; - if ($truthy(sect_style)) { - if ($truthy(($truthy($a = book) ? sect_style['$==']("abstract") : $a))) { - $a = ["chapter", 1], (sect_name = $a[0]), (sect_level = $a[1]), $a - } else if ($truthy(($truthy($a = sect_style['$start_with?']("sect")) ? $$($nesting, 'SectionLevelStyleRx')['$match?'](sect_style) : $a))) { - sect_name = "section" - } else { - - $a = [sect_style, true], (sect_name = $a[0]), (sect_special = $a[1]), $a; - if (sect_level['$=='](0)) { - sect_level = 1}; - sect_numbered = sect_name['$==']("appendix"); - } - } else if ($truthy(book)) { - sect_name = (function() {if (sect_level['$=='](0)) { - return "part" - } else { - - if ($truthy($rb_gt(sect_level, 1))) { - return "section" - } else { - return "chapter" - }; - }; return nil; })() - } else if ($truthy((($a = doctype['$==']("manpage")) ? sect_title.$casecmp("synopsis")['$=='](0) : doctype['$==']("manpage")))) { - $a = ["synopsis", true], (sect_name = $a[0]), (sect_special = $a[1]), $a - } else { - sect_name = "section" - }; - section = $$($nesting, 'Section').$new(parent, sect_level); - $a = [sect_id, sect_title, sect_name, source_location], section['$id=']($a[0]), section['$title=']($a[1]), section['$sectname=']($a[2]), section['$source_location=']($a[3]), $a; - if ($truthy(sect_special)) { - - - $writer = [true]; - $send(section, 'special=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(sect_numbered)) { - - $writer = [true]; - $send(section, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else if (document.$attributes()['$[]']("sectnums")['$==']("all")) { - - $writer = [(function() {if ($truthy(($truthy($a = book) ? sect_level['$=='](1) : $a))) { - return "chapter" - } else { - return true - }; return nil; })()]; - $send(section, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - } else if ($truthy(($truthy($a = document.$attributes()['$[]']("sectnums")) ? $rb_gt(sect_level, 0) : $a))) { - - $writer = [(function() {if ($truthy(section.$special())) { - return ($truthy($a = parent.$numbered()) ? true : $a) - } else { - return true - }; return nil; })()]; - $send(section, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else if ($truthy(($truthy($a = ($truthy($b = book) ? sect_level['$=='](0) : $b)) ? document.$attributes()['$[]']("partnums") : $a))) { - - $writer = [true]; - $send(section, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy((id = ($truthy($a = section.$id()) ? $a : (($writer = [(function() {if ($truthy(document.$attributes()['$key?']("sectids"))) { - - return (generated_id = $$($nesting, 'Section').$generate_id(section.$title(), document)); - } else { - return nil - }; return nil; })()]), $send(section, 'id=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))))) { - - if ($truthy(generated_id)) { - } else if ($truthy(sect_title['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - section.$title()}; - if ($truthy(document.$register("refs", [id, section]))) { - } else { - self.$logger().$warn(self.$message_with_context("" + "id assigned to section already in use: " + (id), $hash2(["source_location"], {"source_location": reader.$cursor_at_line($rb_minus(reader.$lineno(), (function() {if ($truthy(sect_atx)) { - return 1 - } else { - return 2 - }; return nil; })()))}))) - };}; - section.$update_attributes(attributes); - reader.$skip_blank_lines(); - return section; - }, $Parser_initialize_section$34.$$arity = -3); - Opal.defs(self, '$is_next_line_section?', $Parser_is_next_line_section$ques$35 = function(reader, attributes) { - var $a, $b, self = this, style = nil, next_lines = nil; - - if ($truthy(($truthy($a = (style = attributes['$[]'](1))) ? ($truthy($b = style['$==']("discrete")) ? $b : style['$==']("float")) : $a))) { - return nil - } else if ($truthy($$($nesting, 'Compliance').$underline_style_section_titles())) { - - next_lines = reader.$peek_lines(2, ($truthy($a = style) ? style['$==']("comment") : $a)); - return self['$is_section_title?'](($truthy($a = next_lines['$[]'](0)) ? $a : ""), next_lines['$[]'](1)); - } else { - return self['$atx_section_title?'](($truthy($a = reader.$peek_line()) ? $a : "")) - } - }, $Parser_is_next_line_section$ques$35.$$arity = 2); - Opal.defs(self, '$is_next_line_doctitle?', $Parser_is_next_line_doctitle$ques$36 = function(reader, attributes, leveloffset) { - var $a, self = this, sect_level = nil; - - if ($truthy(leveloffset)) { - return ($truthy($a = (sect_level = self['$is_next_line_section?'](reader, attributes))) ? $rb_plus(sect_level, leveloffset.$to_i())['$=='](0) : $a) - } else { - return self['$is_next_line_section?'](reader, attributes)['$=='](0) - } - }, $Parser_is_next_line_doctitle$ques$36.$$arity = 3); - Opal.defs(self, '$is_section_title?', $Parser_is_section_title$ques$37 = function(line1, line2) { - var $a, self = this; - - - - if (line2 == null) { - line2 = nil; - }; - return ($truthy($a = self['$atx_section_title?'](line1)) ? $a : (function() {if ($truthy(line2['$nil_or_empty?']())) { - return nil - } else { - return self['$setext_section_title?'](line1, line2) - }; return nil; })()); - }, $Parser_is_section_title$ques$37.$$arity = -2); - Opal.defs(self, '$atx_section_title?', $Parser_atx_section_title$ques$38 = function(line) { - var $a, self = this; - - if ($truthy((function() {if ($truthy($$($nesting, 'Compliance').$markdown_syntax())) { - - return ($truthy($a = line['$start_with?']("=", "#")) ? $$($nesting, 'ExtAtxSectionTitleRx')['$=~'](line) : $a); - } else { - - return ($truthy($a = line['$start_with?']("=")) ? $$($nesting, 'AtxSectionTitleRx')['$=~'](line) : $a); - }; return nil; })())) { - return $rb_minus((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)).$length(), 1) - } else { - return nil - } - }, $Parser_atx_section_title$ques$38.$$arity = 1); - Opal.defs(self, '$setext_section_title?', $Parser_setext_section_title$ques$39 = function(line1, line2) { - var $a, $b, $c, self = this, level = nil, line2_ch0 = nil, line2_len = nil; - - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = (level = $$($nesting, 'SETEXT_SECTION_LEVELS')['$[]']((line2_ch0 = line2.$chr())))) ? self['$uniform?'](line2, line2_ch0, (line2_len = line2.$length())) : $c)) ? $$($nesting, 'SetextSectionTitleRx')['$match?'](line1) : $b)) ? $rb_lt($rb_minus(line1.$length(), line2_len).$abs(), 2) : $a))) { - return level - } else { - return nil - } - }, $Parser_setext_section_title$ques$39.$$arity = 2); - Opal.defs(self, '$parse_section_title', $Parser_parse_section_title$40 = function $$parse_section_title(reader, document, sect_id) { - var $a, $b, $c, $d, $e, self = this, sect_reftext = nil, line1 = nil, sect_level = nil, sect_title = nil, atx = nil, line2 = nil, line2_ch0 = nil, line2_len = nil; - - - - if (sect_id == null) { - sect_id = nil; - }; - sect_reftext = nil; - line1 = reader.$read_line(); - if ($truthy((function() {if ($truthy($$($nesting, 'Compliance').$markdown_syntax())) { - - return ($truthy($a = line1['$start_with?']("=", "#")) ? $$($nesting, 'ExtAtxSectionTitleRx')['$=~'](line1) : $a); - } else { - - return ($truthy($a = line1['$start_with?']("=")) ? $$($nesting, 'AtxSectionTitleRx')['$=~'](line1) : $a); - }; return nil; })())) { - - $a = [$rb_minus((($b = $gvars['~']) === nil ? nil : $b['$[]'](1)).$length(), 1), (($b = $gvars['~']) === nil ? nil : $b['$[]'](2)), true], (sect_level = $a[0]), (sect_title = $a[1]), (atx = $a[2]), $a; - if ($truthy(sect_id)) { - } else if ($truthy(($truthy($a = ($truthy($b = sect_title['$end_with?']("]]")) ? $$($nesting, 'InlineSectionAnchorRx')['$=~'](sect_title) : $b)) ? (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))['$!']() : $a))) { - $a = [sect_title.$slice(0, $rb_minus(sect_title.$length(), (($b = $gvars['~']) === nil ? nil : $b['$[]'](0)).$length())), (($b = $gvars['~']) === nil ? nil : $b['$[]'](2)), (($b = $gvars['~']) === nil ? nil : $b['$[]'](3))], (sect_title = $a[0]), (sect_id = $a[1]), (sect_reftext = $a[2]), $a}; - } else if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = ($truthy($d = ($truthy($e = $$($nesting, 'Compliance').$underline_style_section_titles()) ? (line2 = reader.$peek_line(true)) : $e)) ? (sect_level = $$($nesting, 'SETEXT_SECTION_LEVELS')['$[]']((line2_ch0 = line2.$chr()))) : $d)) ? self['$uniform?'](line2, line2_ch0, (line2_len = line2.$length())) : $c)) ? (sect_title = ($truthy($c = $$($nesting, 'SetextSectionTitleRx')['$=~'](line1)) ? (($d = $gvars['~']) === nil ? nil : $d['$[]'](1)) : $c)) : $b)) ? $rb_lt($rb_minus(line1.$length(), line2_len).$abs(), 2) : $a))) { - - atx = false; - if ($truthy(sect_id)) { - } else if ($truthy(($truthy($a = ($truthy($b = sect_title['$end_with?']("]]")) ? $$($nesting, 'InlineSectionAnchorRx')['$=~'](sect_title) : $b)) ? (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))['$!']() : $a))) { - $a = [sect_title.$slice(0, $rb_minus(sect_title.$length(), (($b = $gvars['~']) === nil ? nil : $b['$[]'](0)).$length())), (($b = $gvars['~']) === nil ? nil : $b['$[]'](2)), (($b = $gvars['~']) === nil ? nil : $b['$[]'](3))], (sect_title = $a[0]), (sect_id = $a[1]), (sect_reftext = $a[2]), $a}; - reader.$shift(); - } else { - self.$raise("" + "Unrecognized section at " + (reader.$cursor_at_prev_line())) - }; - if ($truthy(document['$attr?']("leveloffset"))) { - - sect_level = $rb_plus(sect_level, document.$attr("leveloffset").$to_i()); - if ($truthy($rb_lt(sect_level, 0))) { - sect_level = 0};}; - return [sect_id, sect_reftext, sect_title, sect_level, atx]; - }, $Parser_parse_section_title$40.$$arity = -3); - Opal.defs(self, '$parse_header_metadata', $Parser_parse_header_metadata$41 = function $$parse_header_metadata(reader, document) { - var $a, $$42, $$43, $$44, self = this, doc_attrs = nil, implicit_authors = nil, metadata = nil, implicit_author = nil, implicit_authorinitials = nil, author_metadata = nil, rev_metadata = nil, rev_line = nil, match = nil, $writer = nil, component = nil, author_line = nil, authors = nil, author_idx = nil, author_key = nil, explicit = nil, sparse = nil, author_override = nil; - - - - if (document == null) { - document = nil; - }; - doc_attrs = ($truthy($a = document) ? document.$attributes() : $a); - self.$process_attribute_entries(reader, document); - $a = [(implicit_authors = $hash2([], {})), nil, nil], (metadata = $a[0]), (implicit_author = $a[1]), (implicit_authorinitials = $a[2]), $a; - if ($truthy(($truthy($a = reader['$has_more_lines?']()) ? reader['$next_line_empty?']()['$!']() : $a))) { - - if ($truthy((author_metadata = self.$process_authors(reader.$read_line()))['$empty?']())) { - } else { - - if ($truthy(document)) { - - $send(author_metadata, 'each', [], ($$42 = function(key, val){var self = $$42.$$s || this, $writer = nil; - - - - if (key == null) { - key = nil; - }; - - if (val == null) { - val = nil; - }; - if ($truthy(doc_attrs['$key?'](key))) { - return nil - } else { - - $writer = [key, (function() {if ($truthy($$$('::', 'String')['$==='](val))) { - - return document.$apply_header_subs(val); - } else { - return val - }; return nil; })()]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - };}, $$42.$$s = self, $$42.$$arity = 2, $$42)); - implicit_author = doc_attrs['$[]']("author"); - implicit_authorinitials = doc_attrs['$[]']("authorinitials"); - implicit_authors = doc_attrs['$[]']("authors");}; - metadata = author_metadata; - }; - self.$process_attribute_entries(reader, document); - rev_metadata = $hash2([], {}); - if ($truthy(($truthy($a = reader['$has_more_lines?']()) ? reader['$next_line_empty?']()['$!']() : $a))) { - - rev_line = reader.$read_line(); - if ($truthy((match = $$($nesting, 'RevisionInfoLineRx').$match(rev_line)))) { - - if ($truthy(match['$[]'](1))) { - - $writer = ["revnumber", match['$[]'](1).$rstrip()]; - $send(rev_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy((component = match['$[]'](2).$strip())['$empty?']())) { - } else if ($truthy(($truthy($a = match['$[]'](1)['$!']()) ? component['$start_with?']("v") : $a))) { - - $writer = ["revnumber", component.$slice(1, component.$length())]; - $send(rev_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = ["revdate", component]; - $send(rev_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy(match['$[]'](3))) { - - $writer = ["revremark", match['$[]'](3).$rstrip()]; - $send(rev_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - } else { - reader.$unshift_line(rev_line) - };}; - if ($truthy(rev_metadata['$empty?']())) { - } else { - - if ($truthy(document)) { - $send(rev_metadata, 'each', [], ($$43 = function(key, val){var self = $$43.$$s || this; - - - - if (key == null) { - key = nil; - }; - - if (val == null) { - val = nil; - }; - if ($truthy(doc_attrs['$key?'](key))) { - return nil - } else { - - $writer = [key, document.$apply_header_subs(val)]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - };}, $$43.$$s = self, $$43.$$arity = 2, $$43))}; - metadata.$update(rev_metadata); - }; - self.$process_attribute_entries(reader, document); - reader.$skip_blank_lines(); - } else { - author_metadata = $hash2([], {}) - }; - if ($truthy(document)) { - - if ($truthy(($truthy($a = doc_attrs['$key?']("author")) ? (author_line = doc_attrs['$[]']("author"))['$!='](implicit_author) : $a))) { - - author_metadata = self.$process_authors(author_line, true, false); - if ($truthy(doc_attrs['$[]']("authorinitials")['$!='](implicit_authorinitials))) { - author_metadata.$delete("authorinitials")}; - } else if ($truthy(($truthy($a = doc_attrs['$key?']("authors")) ? (author_line = doc_attrs['$[]']("authors"))['$!='](implicit_authors) : $a))) { - author_metadata = self.$process_authors(author_line, true) - } else { - - $a = [[], 1, "author_1", false, false], (authors = $a[0]), (author_idx = $a[1]), (author_key = $a[2]), (explicit = $a[3]), (sparse = $a[4]), $a; - while ($truthy(doc_attrs['$key?'](author_key))) { - - if ((author_override = doc_attrs['$[]'](author_key))['$=='](author_metadata['$[]'](author_key))) { - - authors['$<<'](nil); - sparse = true; - } else { - - authors['$<<'](author_override); - explicit = true; - }; - author_key = "" + "author_" + ((author_idx = $rb_plus(author_idx, 1))); - }; - if ($truthy(explicit)) { - - if ($truthy(sparse)) { - $send(authors, 'each_with_index', [], ($$44 = function(author, idx){var self = $$44.$$s || this, $$45, name_idx = nil; - - - - if (author == null) { - author = nil; - }; - - if (idx == null) { - idx = nil; - }; - if ($truthy(author)) { - return nil - } else { - - $writer = [idx, $send([author_metadata['$[]']("" + "firstname_" + ((name_idx = $rb_plus(idx, 1)))), author_metadata['$[]']("" + "middlename_" + (name_idx)), author_metadata['$[]']("" + "lastname_" + (name_idx))].$compact(), 'map', [], ($$45 = function(it){var self = $$45.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$tr(" ", "_");}, $$45.$$s = self, $$45.$$arity = 1, $$45)).$join(" ")]; - $send(authors, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - };}, $$44.$$s = self, $$44.$$arity = 2, $$44))}; - author_metadata = self.$process_authors(authors, true, false); - } else { - author_metadata = $hash2([], {}) - }; - }; - if ($truthy(author_metadata['$empty?']())) { - ($truthy($a = metadata['$[]']("authorcount")) ? $a : (($writer = ["authorcount", (($writer = ["authorcount", 0]), $send(doc_attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]), $send(metadata, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - } else { - - doc_attrs.$update(author_metadata); - if ($truthy(($truthy($a = doc_attrs['$key?']("email")['$!']()) ? doc_attrs['$key?']("email_1") : $a))) { - - $writer = ["email", doc_attrs['$[]']("email_1")]; - $send(doc_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - };}; - return metadata; - }, $Parser_parse_header_metadata$41.$$arity = -2); - Opal.defs(self, '$process_authors', $Parser_process_authors$46 = function $$process_authors(author_line, names_only, multiple) { - var $a, $$47, self = this, author_metadata = nil, author_idx = nil, $writer = nil; - - - - if (names_only == null) { - names_only = false; - }; - - if (multiple == null) { - multiple = true; - }; - author_metadata = $hash2([], {}); - author_idx = 0; - $send((function() {if ($truthy(($truthy($a = multiple) ? author_line['$include?'](";") : $a))) { - - return author_line.$split($$($nesting, 'AuthorDelimiterRx')); - } else { - return [].concat(Opal.to_a(author_line)) - }; return nil; })(), 'each', [], ($$47 = function(author_entry){var self = $$47.$$s || this, $$48, $$49, $b, $$50, key_map = nil, $writer = nil, segments = nil, match = nil, author = nil, fname = nil, mname = nil, lname = nil; - - - - if (author_entry == null) { - author_entry = nil; - }; - if ($truthy(author_entry['$empty?']())) { - return nil;}; - key_map = $hash2([], {}); - if ((author_idx = $rb_plus(author_idx, 1))['$=='](1)) { - $send($$($nesting, 'AuthorKeys'), 'each', [], ($$48 = function(key){var self = $$48.$$s || this, $writer = nil; - - - - if (key == null) { - key = nil; - }; - $writer = [key.$to_sym(), key]; - $send(key_map, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$48.$$s = self, $$48.$$arity = 1, $$48)) - } else { - $send($$($nesting, 'AuthorKeys'), 'each', [], ($$49 = function(key){var self = $$49.$$s || this, $writer = nil; - - - - if (key == null) { - key = nil; - }; - $writer = [key.$to_sym(), "" + (key) + "_" + (author_idx)]; - $send(key_map, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$49.$$s = self, $$49.$$arity = 1, $$49)) - }; - if ($truthy(names_only)) { - - if ($truthy(author_entry['$include?']("<"))) { - - - $writer = [key_map['$[]']("author"), author_entry.$tr("_", " ")]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - author_entry = author_entry.$gsub($$($nesting, 'XmlSanitizeRx'), "");}; - if ((segments = author_entry.$split(nil, 3)).$size()['$=='](3)) { - segments['$<<'](segments.$pop().$squeeze(" "))}; - } else if ($truthy((match = $$($nesting, 'AuthorInfoLineRx').$match(author_entry)))) { - (segments = match.$to_a()).$shift()}; - if ($truthy(segments)) { - - author = (($writer = [key_map['$[]']("firstname"), (fname = segments['$[]'](0).$tr("_", " "))]), $send(author_metadata, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]); - - $writer = [key_map['$[]']("authorinitials"), fname.$chr()]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(segments['$[]'](1))) { - if ($truthy(segments['$[]'](2))) { - - - $writer = [key_map['$[]']("middlename"), (mname = segments['$[]'](1).$tr("_", " "))]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [key_map['$[]']("lastname"), (lname = segments['$[]'](2).$tr("_", " "))]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - author = $rb_plus($rb_plus($rb_plus($rb_plus(fname, " "), mname), " "), lname); - - $writer = [key_map['$[]']("authorinitials"), "" + (fname.$chr()) + (mname.$chr()) + (lname.$chr())]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - - - $writer = [key_map['$[]']("lastname"), (lname = segments['$[]'](1).$tr("_", " "))]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - author = $rb_plus($rb_plus(fname, " "), lname); - - $writer = [key_map['$[]']("authorinitials"), "" + (fname.$chr()) + (lname.$chr())]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }}; - ($truthy($b = author_metadata['$[]'](key_map['$[]']("author"))) ? $b : (($writer = [key_map['$[]']("author"), author]), $send(author_metadata, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - if ($truthy(($truthy($b = names_only) ? $b : segments['$[]'](3)['$!']()))) { - } else { - - $writer = [key_map['$[]']("email"), segments['$[]'](3)]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - } else { - - - $writer = [key_map['$[]']("author"), (($writer = [key_map['$[]']("firstname"), (fname = author_entry.$squeeze(" ").$strip())]), $send(author_metadata, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [key_map['$[]']("authorinitials"), fname.$chr()]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }; - if (author_idx['$=='](1)) { - - $writer = ["authors", author_metadata['$[]'](key_map['$[]']("author"))]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - - if (author_idx['$=='](2)) { - $send($$($nesting, 'AuthorKeys'), 'each', [], ($$50 = function(key){var self = $$50.$$s || this; - - - - if (key == null) { - key = nil; - }; - if ($truthy(author_metadata['$key?'](key))) { - - $writer = ["" + (key) + "_1", author_metadata['$[]'](key)]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - return nil - };}, $$50.$$s = self, $$50.$$arity = 1, $$50))}; - - $writer = ["authors", "" + (author_metadata['$[]']("authors")) + ", " + (author_metadata['$[]'](key_map['$[]']("author")))]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - };}, $$47.$$s = self, $$47.$$arity = 1, $$47)); - - $writer = ["authorcount", author_idx]; - $send(author_metadata, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return author_metadata; - }, $Parser_process_authors$46.$$arity = -2); - Opal.defs(self, '$parse_block_metadata_lines', $Parser_parse_block_metadata_lines$51 = function $$parse_block_metadata_lines(reader, document, attributes, options) { - var $a, $b, self = this; - - - - if (attributes == null) { - attributes = $hash2([], {}); - }; - - if (options == null) { - options = $hash2([], {}); - }; - while ($truthy(self.$parse_block_metadata_line(reader, document, attributes, options))) { - - reader.$shift(); - if ($truthy($b = reader.$skip_blank_lines())) { - $b - } else { - break; - }; - }; - return attributes; - }, $Parser_parse_block_metadata_lines$51.$$arity = -3); - Opal.defs(self, '$parse_block_metadata_line', $Parser_parse_block_metadata_line$52 = function $$parse_block_metadata_line(reader, document, attributes, options) { - var $a, $b, self = this, next_line = nil, normal = nil, $writer = nil, reftext = nil, current_style = nil, ll = nil; - if ($gvars["~"] == null) $gvars["~"] = nil; - - - - if (options == null) { - options = $hash2([], {}); - }; - if ($truthy(($truthy($a = (next_line = reader.$peek_line())) ? (function() {if ($truthy(options['$[]']("text_only"))) { - - return next_line['$start_with?']("[", "/"); - } else { - - return (normal = next_line['$start_with?']("[", ".", "/", ":")); - }; return nil; })() : $a))) { - if ($truthy(next_line['$start_with?']("["))) { - if ($truthy(next_line['$start_with?']("[["))) { - if ($truthy(($truthy($a = next_line['$end_with?']("]]")) ? $$($nesting, 'BlockAnchorRx')['$=~'](next_line) : $a))) { - - - $writer = ["id", (($a = $gvars['~']) === nil ? nil : $a['$[]'](1))]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy((reftext = (($a = $gvars['~']) === nil ? nil : $a['$[]'](2))))) { - - $writer = ["reftext", (function() {if ($truthy(reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - - return document.$sub_attributes(reftext); - } else { - return reftext - }; return nil; })()]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return true; - } else { - return nil - } - } else if ($truthy(($truthy($a = next_line['$end_with?']("]")) ? $$($nesting, 'BlockAttributeListRx')['$=~'](next_line) : $a))) { - - current_style = attributes['$[]'](1); - if ($truthy(document.$parse_attributes((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), [], $hash2(["sub_input", "sub_result", "into"], {"sub_input": true, "sub_result": true, "into": attributes}))['$[]'](1))) { - - $writer = [1, ($truthy($a = self.$parse_style_attribute(attributes, reader)) ? $a : current_style)]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return true; - } else { - return nil - } - } else if ($truthy(($truthy($a = normal) ? next_line['$start_with?'](".") : $a))) { - if ($truthy($$($nesting, 'BlockTitleRx')['$=~'](next_line))) { - - - $writer = ["title", (($a = $gvars['~']) === nil ? nil : $a['$[]'](1))]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return true; - } else { - return nil - } - } else if ($truthy(($truthy($a = normal['$!']()) ? $a : next_line['$start_with?']("/")))) { - if ($truthy(next_line['$start_with?']("//"))) { - if (next_line['$==']("//")) { - return true - } else if ($truthy(($truthy($a = normal) ? self['$uniform?'](next_line, "/", (ll = next_line.$length())) : $a))) { - if (ll['$=='](3)) { - return nil - } else { - - reader.$read_lines_until($hash2(["terminator", "skip_first_line", "preserve_last_line", "skip_processing", "context"], {"terminator": next_line, "skip_first_line": true, "preserve_last_line": true, "skip_processing": true, "context": "comment"})); - return true; - } - } else if ($truthy(next_line['$start_with?']("///"))) { - return nil - } else { - return true - } - } else { - return nil - } - } else if ($truthy(($truthy($a = ($truthy($b = normal) ? next_line['$start_with?'](":") : $b)) ? $$($nesting, 'AttributeEntryRx')['$=~'](next_line) : $a))) { - - self.$process_attribute_entry(reader, document, attributes, $gvars["~"]); - return true; - } else { - return nil - } - } else { - return nil - }; - }, $Parser_parse_block_metadata_line$52.$$arity = -4); - Opal.defs(self, '$process_attribute_entries', $Parser_process_attribute_entries$53 = function $$process_attribute_entries(reader, document, attributes) { - var $a, self = this; - - - - if (attributes == null) { - attributes = nil; - }; - reader.$skip_comment_lines(); - while ($truthy(self.$process_attribute_entry(reader, document, attributes))) { - - reader.$shift(); - reader.$skip_comment_lines(); - }; - }, $Parser_process_attribute_entries$53.$$arity = -3); - Opal.defs(self, '$process_attribute_entry', $Parser_process_attribute_entry$54 = function $$process_attribute_entry(reader, document, attributes, match) { - var $a, $b, $c, self = this, value = nil, con = nil, next_line = nil, keep_open = nil; - - - - if (attributes == null) { - attributes = nil; - }; - - if (match == null) { - match = nil; - }; - if ($truthy(($truthy($a = match) ? $a : (match = (function() {if ($truthy(reader['$has_more_lines?']())) { - - return $$($nesting, 'AttributeEntryRx').$match(reader.$peek_line()); - } else { - return nil - }; return nil; })())))) { - - if ($truthy((value = match['$[]'](2))['$nil_or_empty?']())) { - value = "" - } else if ($truthy(value['$end_with?']($$($nesting, 'LINE_CONTINUATION'), $$($nesting, 'LINE_CONTINUATION_LEGACY')))) { - - $a = [value.$slice($rb_minus(value.$length(), 2), 2), value.$slice(0, $rb_minus(value.$length(), 2)).$rstrip()], (con = $a[0]), (value = $a[1]), $a; - while ($truthy(($truthy($b = reader.$advance()) ? (next_line = ($truthy($c = reader.$peek_line()) ? $c : ""))['$empty?']()['$!']() : $b))) { - - next_line = next_line.$lstrip(); - if ($truthy((keep_open = next_line['$end_with?'](con)))) { - next_line = next_line.$slice(0, $rb_minus(next_line.$length(), 2)).$rstrip()}; - value = "" + (value) + ((function() {if ($truthy(value['$end_with?']($$($nesting, 'HARD_LINE_BREAK')))) { - return $$($nesting, 'LF') - } else { - return " " - }; return nil; })()) + (next_line); - if ($truthy(keep_open)) { - } else { - break; - }; - };}; - self.$store_attribute(match['$[]'](1), value, document, attributes); - return true; - } else { - return nil - }; - }, $Parser_process_attribute_entry$54.$$arity = -3); - Opal.defs(self, '$store_attribute', $Parser_store_attribute$55 = function $$store_attribute(name, value, doc, attrs) { - var $a, self = this, resolved_value = nil; - - - - if (doc == null) { - doc = nil; - }; - - if (attrs == null) { - attrs = nil; - }; - if ($truthy(name['$end_with?']("!"))) { - - name = name.$chop(); - value = nil; - } else if ($truthy(name['$start_with?']("!"))) { - - name = name.$slice(1, name.$length()); - value = nil;}; - if ((name = self.$sanitize_attribute_name(name))['$==']("numbered")) { - name = "sectnums" - } else if (name['$==']("hardbreaks")) { - name = "hardbreaks-option" - } else if (name['$==']("showtitle")) { - self.$store_attribute("notitle", (function() {if ($truthy(value)) { - return nil - } else { - return "" - }; return nil; })(), doc, attrs)}; - if ($truthy(doc)) { - if ($truthy(value)) { - - if (name['$==']("leveloffset")) { - if ($truthy(value['$start_with?']("+"))) { - value = $rb_plus(doc.$attr("leveloffset", 0).$to_i(), value.$slice(1, value.$length()).$to_i()).$to_s() - } else if ($truthy(value['$start_with?']("-"))) { - value = $rb_minus(doc.$attr("leveloffset", 0).$to_i(), value.$slice(1, value.$length()).$to_i()).$to_s()}}; - if ($truthy((resolved_value = doc.$set_attribute(name, value)))) { - - value = resolved_value; - if ($truthy(attrs)) { - $$$($$($nesting, 'Document'), 'AttributeEntry').$new(name, value).$save_to(attrs)};}; - } else if ($truthy(($truthy($a = doc.$delete_attribute(name)) ? attrs : $a))) { - $$$($$($nesting, 'Document'), 'AttributeEntry').$new(name, value).$save_to(attrs)} - } else if ($truthy(attrs)) { - $$$($$($nesting, 'Document'), 'AttributeEntry').$new(name, value).$save_to(attrs)}; - return [name, value]; - }, $Parser_store_attribute$55.$$arity = -3); - Opal.defs(self, '$resolve_list_marker', $Parser_resolve_list_marker$56 = function $$resolve_list_marker(list_type, marker, ordinal, validate, reader) { - var self = this; - - - - if (ordinal == null) { - ordinal = 0; - }; - - if (validate == null) { - validate = false; - }; - - if (reader == null) { - reader = nil; - }; - if (list_type['$==']("ulist")) { - return marker - } else if (list_type['$==']("olist")) { - return self.$resolve_ordered_list_marker(marker, ordinal, validate, reader)['$[]'](0) - } else { - return "<1>" - }; - }, $Parser_resolve_list_marker$56.$$arity = -3); - Opal.defs(self, '$resolve_ordered_list_marker', $Parser_resolve_ordered_list_marker$57 = function $$resolve_ordered_list_marker(marker, ordinal, validate, reader) { - var $$58, $a, self = this, $case = nil, style = nil, expected = nil, actual = nil; - - - - if (ordinal == null) { - ordinal = 0; - }; - - if (validate == null) { - validate = false; - }; - - if (reader == null) { - reader = nil; - }; - if ($truthy(marker['$start_with?']("."))) { - return [marker]}; - $case = (style = $send($$($nesting, 'ORDERED_LIST_STYLES'), 'find', [], ($$58 = function(s){var self = $$58.$$s || this; - - - - if (s == null) { - s = nil; - }; - return $$($nesting, 'OrderedListMarkerRxMap')['$[]'](s)['$match?'](marker);}, $$58.$$s = self, $$58.$$arity = 1, $$58))); - if ("arabic"['$===']($case)) { - if ($truthy(validate)) { - - expected = $rb_plus(ordinal, 1); - actual = marker.$to_i();}; - marker = "1.";} - else if ("loweralpha"['$===']($case)) { - if ($truthy(validate)) { - - expected = $rb_plus("a"['$[]'](0).$ord(), ordinal).$chr(); - actual = marker.$chop();}; - marker = "a.";} - else if ("upperalpha"['$===']($case)) { - if ($truthy(validate)) { - - expected = $rb_plus("A"['$[]'](0).$ord(), ordinal).$chr(); - actual = marker.$chop();}; - marker = "A.";} - else if ("lowerroman"['$===']($case)) { - if ($truthy(validate)) { - - expected = $$($nesting, 'Helpers').$int_to_roman($rb_plus(ordinal, 1)).$downcase(); - actual = marker.$chop();}; - marker = "i)";} - else if ("upperroman"['$===']($case)) { - if ($truthy(validate)) { - - expected = $$($nesting, 'Helpers').$int_to_roman($rb_plus(ordinal, 1)); - actual = marker.$chop();}; - marker = "I)";}; - if ($truthy(($truthy($a = validate) ? expected['$!='](actual) : $a))) { - self.$logger().$warn(self.$message_with_context("" + "list item index: expected " + (expected) + ", got " + (actual), $hash2(["source_location"], {"source_location": reader.$cursor()})))}; - return [marker, style]; - }, $Parser_resolve_ordered_list_marker$57.$$arity = -2); - Opal.defs(self, '$is_sibling_list_item?', $Parser_is_sibling_list_item$ques$59 = function(line, list_type, sibling_trait) { - var $a, $b, self = this; - - if ($truthy($$$('::', 'Regexp')['$==='](sibling_trait))) { - return sibling_trait['$match?'](line) - } else { - return ($truthy($a = $$($nesting, 'ListRxMap')['$[]'](list_type)['$=~'](line)) ? sibling_trait['$=='](self.$resolve_list_marker(list_type, (($b = $gvars['~']) === nil ? nil : $b['$[]'](1)))) : $a) - } - }, $Parser_is_sibling_list_item$ques$59.$$arity = 3); - Opal.defs(self, '$parse_table', $Parser_parse_table$60 = function $$parse_table(table_reader, parent, attributes) { - var $a, $b, $c, $d, self = this, table = nil, colspecs = nil, explicit_colspecs = nil, skipped = nil, $writer = nil, implicit_header = nil, parser_ctx = nil, format = nil, loop_idx = nil, implicit_header_boundary = nil, line = nil, beyond_first = nil, next_cellspec = nil, m = nil, pre_match = nil, post_match = nil, $case = nil, cell_text = nil, $logical_op_recvr_tmp_2 = nil; - - - table = $$($nesting, 'Table').$new(parent, attributes); - if ($truthy(($truthy($a = attributes['$key?']("cols")) ? (colspecs = self.$parse_colspecs(attributes['$[]']("cols")))['$empty?']()['$!']() : $a))) { - - table.$create_columns(colspecs); - explicit_colspecs = true;}; - skipped = ($truthy($a = table_reader.$skip_blank_lines()) ? $a : 0); - if ($truthy(attributes['$[]']("header-option"))) { - - $writer = [true]; - $send(table, 'has_header_option=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else if ($truthy((($a = skipped['$=='](0)) ? attributes['$[]']("noheader-option")['$!']() : skipped['$=='](0)))) { - - - $writer = ["implicit"]; - $send(table, 'has_header_option=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - implicit_header = true;}; - parser_ctx = $$$($$($nesting, 'Table'), 'ParserContext').$new(table_reader, table, attributes); - $a = [parser_ctx.$format(), -1, nil], (format = $a[0]), (loop_idx = $a[1]), (implicit_header_boundary = $a[2]), $a; - $a = false; while ($a || $truthy((line = table_reader.$read_line()))) {$a = false; - - if ($truthy(($truthy($b = (beyond_first = $rb_gt((loop_idx = $rb_plus(loop_idx, 1)), 0))) ? line['$empty?']() : $b))) { - - line = nil; - if ($truthy(implicit_header_boundary)) { - implicit_header_boundary = $rb_plus(implicit_header_boundary, 1)}; - } else if (format['$==']("psv")) { - if ($truthy(parser_ctx['$starts_with_delimiter?'](line))) { - - line = line.$slice(1, line.$length()); - parser_ctx.$close_open_cell(); - if ($truthy(implicit_header_boundary)) { - implicit_header_boundary = nil}; - } else { - - $c = self.$parse_cellspec(line, "start", parser_ctx.$delimiter()), $b = Opal.to_ary($c), (next_cellspec = ($b[0] == null ? nil : $b[0])), (line = ($b[1] == null ? nil : $b[1])), $c; - if ($truthy(next_cellspec)) { - - parser_ctx.$close_open_cell(next_cellspec); - if ($truthy(implicit_header_boundary)) { - implicit_header_boundary = nil}; - } else if ($truthy(($truthy($b = implicit_header_boundary) ? implicit_header_boundary['$=='](loop_idx) : $b))) { - - $writer = [(implicit_header = (implicit_header_boundary = nil))]; - $send(table, 'has_header_option=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - }}; - if ($truthy(beyond_first)) { - } else { - - table_reader.$mark(); - if ($truthy(implicit_header)) { - if ($truthy(($truthy($b = table_reader['$has_more_lines?']()) ? table_reader.$peek_line()['$empty?']() : $b))) { - implicit_header_boundary = 1 - } else { - - $writer = [(implicit_header = nil)]; - $send(table, 'has_header_option=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }}; - }; - $b = false; while ($b || $truthy(true)) {$b = false; - if ($truthy(($truthy($c = line) ? (m = parser_ctx.$match_delimiter(line)) : $c))) { - - $c = [m.$pre_match(), m.$post_match()], (pre_match = $c[0]), (post_match = $c[1]), $c; - $case = format; - if ("csv"['$===']($case)) { - if ($truthy(parser_ctx['$buffer_has_unclosed_quotes?'](pre_match))) { - - parser_ctx.$skip_past_delimiter(pre_match); - if ($truthy((line = post_match)['$empty?']())) { - break;}; - $b = true; continue;;}; - - $writer = ["" + (parser_ctx.$buffer()) + (pre_match)]; - $send(parser_ctx, 'buffer=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;} - else if ("dsv"['$===']($case)) { - if ($truthy(pre_match['$end_with?']("\\"))) { - - parser_ctx.$skip_past_escaped_delimiter(pre_match); - if ($truthy((line = post_match)['$empty?']())) { - - - $writer = ["" + (parser_ctx.$buffer()) + ($$($nesting, 'LF'))]; - $send(parser_ctx, 'buffer=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - parser_ctx.$keep_cell_open(); - break;;}; - $b = true; continue;;}; - - $writer = ["" + (parser_ctx.$buffer()) + (pre_match)]; - $send(parser_ctx, 'buffer=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;} - else { - if ($truthy(pre_match['$end_with?']("\\"))) { - - parser_ctx.$skip_past_escaped_delimiter(pre_match); - if ($truthy((line = post_match)['$empty?']())) { - - - $writer = ["" + (parser_ctx.$buffer()) + ($$($nesting, 'LF'))]; - $send(parser_ctx, 'buffer=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - parser_ctx.$keep_cell_open(); - break;;}; - $b = true; continue;;}; - $d = self.$parse_cellspec(pre_match), $c = Opal.to_ary($d), (next_cellspec = ($c[0] == null ? nil : $c[0])), (cell_text = ($c[1] == null ? nil : $c[1])), $d; - parser_ctx.$push_cellspec(next_cellspec); - - $writer = ["" + (parser_ctx.$buffer()) + (cell_text)]; - $send(parser_ctx, 'buffer=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - if ($truthy((line = post_match)['$empty?']())) { - line = nil}; - parser_ctx.$close_cell(); - } else { - - - $writer = ["" + (parser_ctx.$buffer()) + (line) + ($$($nesting, 'LF'))]; - $send(parser_ctx, 'buffer=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - $case = format; - if ("csv"['$===']($case)) {if ($truthy(parser_ctx['$buffer_has_unclosed_quotes?']())) { - - if ($truthy(($truthy($c = implicit_header_boundary) ? loop_idx['$=='](0) : $c))) { - - $writer = [(implicit_header = (implicit_header_boundary = nil))]; - $send(table, 'has_header_option=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - parser_ctx.$keep_cell_open(); - } else { - parser_ctx.$close_cell(true) - }} - else if ("dsv"['$===']($case)) {parser_ctx.$close_cell(true)} - else {parser_ctx.$keep_cell_open()}; - break;; - } - }; - if ($truthy(parser_ctx['$cell_open?']())) { - if ($truthy(table_reader['$has_more_lines?']())) { - } else { - parser_ctx.$close_cell(true) - } - } else { - if ($truthy($b = table_reader.$skip_blank_lines())) { - $b - } else { - break; - } - }; - }; - if ($truthy(($truthy($a = (($logical_op_recvr_tmp_2 = table.$attributes()), ($truthy($b = $logical_op_recvr_tmp_2['$[]']("colcount")) ? $b : (($writer = ["colcount", table.$columns().$size()]), $send($logical_op_recvr_tmp_2, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])))['$=='](0)) ? $a : explicit_colspecs))) { - } else { - table.$assign_column_widths() - }; - if ($truthy(implicit_header)) { - - $writer = [true]; - $send(table, 'has_header_option=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - table.$partition_header_footer(attributes); - return table; - }, $Parser_parse_table$60.$$arity = 3); - Opal.defs(self, '$parse_colspecs', $Parser_parse_colspecs$61 = function $$parse_colspecs(records) { - var $$62, $$63, self = this, specs = nil; - - - if ($truthy(records['$include?'](" "))) { - records = records.$delete(" ")}; - if (records['$=='](records.$to_i().$to_s())) { - return $send($$$('::', 'Array'), 'new', [records.$to_i()], ($$62 = function(){var self = $$62.$$s || this; - - return $hash2(["width"], {"width": 1})}, $$62.$$s = self, $$62.$$arity = 0, $$62))}; - specs = []; - $send((function() {if ($truthy(records['$include?'](","))) { - - return records.$split(",", -1); - } else { - - return records.$split(";", -1); - }; return nil; })(), 'each', [], ($$63 = function(record){var self = $$63.$$s || this, $a, $b, $$64, m = nil, spec = nil, colspec = nil, rowspec = nil, $writer = nil, width = nil; - - - - if (record == null) { - record = nil; - }; - if ($truthy(record['$empty?']())) { - return specs['$<<']($hash2(["width"], {"width": 1})) - } else if ($truthy((m = $$($nesting, 'ColumnSpecRx').$match(record)))) { - - spec = $hash2([], {}); - if ($truthy(m['$[]'](2))) { - - $b = m['$[]'](2).$split("."), $a = Opal.to_ary($b), (colspec = ($a[0] == null ? nil : $a[0])), (rowspec = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy(($truthy($a = colspec['$nil_or_empty?']()['$!']()) ? $$($nesting, 'TableCellHorzAlignments')['$key?'](colspec) : $a))) { - - $writer = ["halign", $$($nesting, 'TableCellHorzAlignments')['$[]'](colspec)]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(($truthy($a = rowspec['$nil_or_empty?']()['$!']()) ? $$($nesting, 'TableCellVertAlignments')['$key?'](rowspec) : $a))) { - - $writer = ["valign", $$($nesting, 'TableCellVertAlignments')['$[]'](rowspec)]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];};}; - if ($truthy((width = m['$[]'](3)))) { - - $writer = ["width", (function() {if (width['$==']("~")) { - return -1 - } else { - return width.$to_i() - }; return nil; })()]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = ["width", 1]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if ($truthy(($truthy($a = m['$[]'](4)) ? $$($nesting, 'TableCellStyles')['$key?'](m['$[]'](4)) : $a))) { - - $writer = ["style", $$($nesting, 'TableCellStyles')['$[]'](m['$[]'](4))]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(m['$[]'](1))) { - return $send((1), 'upto', [m['$[]'](1).$to_i()], ($$64 = function(){var self = $$64.$$s || this; - - return specs['$<<'](spec.$merge())}, $$64.$$s = self, $$64.$$arity = 0, $$64)) - } else { - return specs['$<<'](spec) - }; - } else { - return nil - };}, $$63.$$s = self, $$63.$$arity = 1, $$63)); - return specs; - }, $Parser_parse_colspecs$61.$$arity = 1); - Opal.defs(self, '$parse_cellspec', $Parser_parse_cellspec$65 = function $$parse_cellspec(line, pos, delimiter) { - var $a, $b, self = this, m = nil, rest = nil, spec_part = nil, spec = nil, colspec = nil, rowspec = nil, $writer = nil; - - - - if (pos == null) { - pos = "end"; - }; - - if (delimiter == null) { - delimiter = nil; - }; - $a = [nil, ""], (m = $a[0]), (rest = $a[1]), $a; - if (pos['$==']("start")) { - if ($truthy(line['$include?'](delimiter))) { - - $b = line.$partition(delimiter), $a = Opal.to_ary($b), (spec_part = ($a[0] == null ? nil : $a[0])), (delimiter = ($a[1] == null ? nil : $a[1])), (rest = ($a[2] == null ? nil : $a[2])), $b; - if ($truthy((m = $$($nesting, 'CellSpecStartRx').$match(spec_part)))) { - if ($truthy(m['$[]'](0)['$empty?']())) { - return [$hash2([], {}), rest]} - } else { - return [nil, line] - }; - } else { - return [nil, line] - } - } else if ($truthy((m = $$($nesting, 'CellSpecEndRx').$match(line)))) { - - if ($truthy(m['$[]'](0).$lstrip()['$empty?']())) { - return [$hash2([], {}), line.$rstrip()]}; - rest = m.$pre_match(); - } else { - return [$hash2([], {}), line] - }; - spec = $hash2([], {}); - if ($truthy(m['$[]'](1))) { - - $b = m['$[]'](1).$split("."), $a = Opal.to_ary($b), (colspec = ($a[0] == null ? nil : $a[0])), (rowspec = ($a[1] == null ? nil : $a[1])), $b; - colspec = (function() {if ($truthy(colspec['$nil_or_empty?']())) { - return 1 - } else { - return colspec.$to_i() - }; return nil; })(); - rowspec = (function() {if ($truthy(rowspec['$nil_or_empty?']())) { - return 1 - } else { - return rowspec.$to_i() - }; return nil; })(); - if (m['$[]'](2)['$==']("+")) { - - if (colspec['$=='](1)) { - } else { - - $writer = ["colspan", colspec]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - if (rowspec['$=='](1)) { - } else { - - $writer = ["rowspan", rowspec]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - } else if (m['$[]'](2)['$==']("*")) { - if (colspec['$=='](1)) { - } else { - - $writer = ["repeatcol", colspec]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }};}; - if ($truthy(m['$[]'](3))) { - - $b = m['$[]'](3).$split("."), $a = Opal.to_ary($b), (colspec = ($a[0] == null ? nil : $a[0])), (rowspec = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy(($truthy($a = colspec['$nil_or_empty?']()['$!']()) ? $$($nesting, 'TableCellHorzAlignments')['$key?'](colspec) : $a))) { - - $writer = ["halign", $$($nesting, 'TableCellHorzAlignments')['$[]'](colspec)]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(($truthy($a = rowspec['$nil_or_empty?']()['$!']()) ? $$($nesting, 'TableCellVertAlignments')['$key?'](rowspec) : $a))) { - - $writer = ["valign", $$($nesting, 'TableCellVertAlignments')['$[]'](rowspec)]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];};}; - if ($truthy(($truthy($a = m['$[]'](4)) ? $$($nesting, 'TableCellStyles')['$key?'](m['$[]'](4)) : $a))) { - - $writer = ["style", $$($nesting, 'TableCellStyles')['$[]'](m['$[]'](4))]; - $send(spec, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return [spec, rest]; - }, $Parser_parse_cellspec$65.$$arity = -2); - Opal.defs(self, '$parse_style_attribute', $Parser_parse_style_attribute$66 = function $$parse_style_attribute(attributes, reader) { - var $a, $b, $$67, $$68, self = this, raw_style = nil, name = nil, accum = nil, parsed_attrs = nil, parsed_style = nil, $writer = nil, existing_role = nil; - - - - if (reader == null) { - reader = nil; - }; - if ($truthy(($truthy($a = ($truthy($b = (raw_style = attributes['$[]'](1))) ? raw_style['$include?'](" ")['$!']() : $b)) ? $$($nesting, 'Compliance').$shorthand_property_syntax() : $a))) { - - name = nil; - accum = ""; - parsed_attrs = $hash2([], {}); - $send(raw_style, 'each_char', [], ($$67 = function(c){var self = $$67.$$s || this, $case = nil; - - - - if (c == null) { - c = nil; - }; - return (function() {$case = c; - if ("."['$===']($case)) { - self.$yield_buffered_attribute(parsed_attrs, name, accum, reader); - accum = ""; - return (name = "role");} - else if ("#"['$===']($case)) { - self.$yield_buffered_attribute(parsed_attrs, name, accum, reader); - accum = ""; - return (name = "id");} - else if ("%"['$===']($case)) { - self.$yield_buffered_attribute(parsed_attrs, name, accum, reader); - accum = ""; - return (name = "option");} - else {return (accum = $rb_plus(accum, c))}})();}, $$67.$$s = self, $$67.$$arity = 1, $$67)); - if ($truthy(name)) { - - self.$yield_buffered_attribute(parsed_attrs, name, accum, reader); - if ($truthy((parsed_style = parsed_attrs['$[]']("style")))) { - - $writer = ["style", parsed_style]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(parsed_attrs['$key?']("id"))) { - - $writer = ["id", parsed_attrs['$[]']("id")]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(parsed_attrs['$key?']("role"))) { - - $writer = ["role", (function() {if ($truthy((existing_role = attributes['$[]']("role"))['$nil_or_empty?']())) { - - return parsed_attrs['$[]']("role").$join(" "); - } else { - return "" + (existing_role) + " " + (parsed_attrs['$[]']("role").$join(" ")) - }; return nil; })()]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(parsed_attrs['$key?']("option"))) { - $send(parsed_attrs['$[]']("option"), 'each', [], ($$68 = function(opt){var self = $$68.$$s || this; - - - - if (opt == null) { - opt = nil; - }; - $writer = ["" + (opt) + "-option", ""]; - $send(attributes, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$68.$$s = self, $$68.$$arity = 1, $$68))}; - return parsed_style; - } else { - - $writer = ["style", raw_style]; - $send(attributes, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }; - } else { - - $writer = ["style", raw_style]; - $send(attributes, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }; - }, $Parser_parse_style_attribute$66.$$arity = -2); - Opal.defs(self, '$yield_buffered_attribute', $Parser_yield_buffered_attribute$69 = function $$yield_buffered_attribute(attrs, name, value, reader) { - var $a, self = this, $writer = nil; - - - if ($truthy(name)) { - if ($truthy(value['$empty?']())) { - if ($truthy(reader)) { - self.$logger().$warn(self.$message_with_context("" + "invalid empty " + (name) + " detected in style attribute", $hash2(["source_location"], {"source_location": reader.$cursor_at_prev_line()}))) - } else { - self.$logger().$warn("" + "invalid empty " + (name) + " detected in style attribute") - } - } else if (name['$==']("id")) { - - if ($truthy(attrs['$key?']("id"))) { - if ($truthy(reader)) { - self.$logger().$warn(self.$message_with_context("multiple ids detected in style attribute", $hash2(["source_location"], {"source_location": reader.$cursor_at_prev_line()}))) - } else { - self.$logger().$warn("multiple ids detected in style attribute") - }}; - - $writer = [name, value]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - ($truthy($a = attrs['$[]'](name)) ? $a : (($writer = [name, []]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))['$<<'](value) - } - } else if ($truthy(value['$empty?']())) { - } else { - - $writer = ["style", value]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - return nil; - }, $Parser_yield_buffered_attribute$69.$$arity = 4); - Opal.defs(self, '$adjust_indentation!', $Parser_adjust_indentation$excl$70 = function(lines, indent_size, tab_size) { - var $a, $$71, $$72, $$75, $$76, $$77, $$78, self = this, full_tab_space = nil, block_indent = nil, new_block_indent = nil; - - - - if (indent_size == null) { - indent_size = 0; - }; - - if (tab_size == null) { - tab_size = 0; - }; - if ($truthy(lines['$empty?']())) { - return nil}; - if ($truthy(($truthy($a = $rb_gt(tab_size, 0)) ? $send(lines, 'any?', [], ($$71 = function(line){var self = $$71.$$s || this; - - - - if (line == null) { - line = nil; - }; - return line['$include?']($$($nesting, 'TAB'));}, $$71.$$s = self, $$71.$$arity = 1, $$71)) : $a))) { - - full_tab_space = $rb_times(" ", tab_size); - (function(){var $brk = Opal.new_brk(); try {return $send(lines, 'map!', [], ($$72 = function(line){var self = $$72.$$s || this, $$73, $$74, tab_idx = nil, leading_tabs = nil, spaces_added = nil, idx = nil, result = nil; - - - - if (line == null) { - line = nil; - }; - if ($truthy(line['$empty?']())) { - return line - } else if ($truthy((tab_idx = line.$index($$($nesting, 'TAB'))))) { - - if (tab_idx['$=='](0)) { - - leading_tabs = 0; - (function(){var $brk = Opal.new_brk(); try {return $send(line, 'each_byte', [], ($$73 = function(b){var self = $$73.$$s || this; - - - - if (b == null) { - b = nil; - }; - if (b['$=='](9)) { - } else { - - Opal.brk(nil, $brk) - }; - return (leading_tabs = $rb_plus(leading_tabs, 1));}, $$73.$$s = self, $$73.$$brk = $brk, $$73.$$arity = 1, $$73)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})(); - line = "" + ($rb_times(full_tab_space, leading_tabs)) + (line.$slice(leading_tabs, line.$length())); - if ($truthy(line['$include?']($$($nesting, 'TAB')))) { - } else { - return line; - };}; - spaces_added = 0; - idx = 0; - result = ""; - $send(line, 'each_char', [], ($$74 = function(c){var self = $$74.$$s || this, offset = nil, spaces = nil; - - - - if (c == null) { - c = nil; - }; - if (c['$==']($$($nesting, 'TAB'))) { - if ((offset = $rb_plus(idx, spaces_added))['$%'](tab_size)['$=='](0)) { - - spaces_added = $rb_plus(spaces_added, $rb_minus(tab_size, 1)); - result = $rb_plus(result, full_tab_space); - } else { - - if ((spaces = $rb_minus(tab_size, offset['$%'](tab_size)))['$=='](1)) { - } else { - spaces_added = $rb_plus(spaces_added, $rb_minus(spaces, 1)) - }; - result = $rb_plus(result, $rb_times(" ", spaces)); - } - } else { - result = $rb_plus(result, c) - }; - return (idx = $rb_plus(idx, 1));}, $$74.$$s = self, $$74.$$arity = 1, $$74)); - return result; - } else { - return line - };}, $$72.$$s = self, $$72.$$brk = $brk, $$72.$$arity = 1, $$72)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})();}; - if ($truthy($rb_lt(indent_size, 0))) { - return nil}; - block_indent = nil; - (function(){var $brk = Opal.new_brk(); try {return $send(lines, 'each', [], ($$75 = function(line){var self = $$75.$$s || this, $b, line_indent = nil; - - - - if (line == null) { - line = nil; - }; - if ($truthy(line['$empty?']())) { - return nil;}; - if ((line_indent = $rb_minus(line.$length(), line.$lstrip().$length()))['$=='](0)) { - - block_indent = nil; - - Opal.brk(nil, $brk);}; - if ($truthy(($truthy($b = block_indent) ? $rb_lt(block_indent, line_indent) : $b))) { - return nil - } else { - return (block_indent = line_indent) - };}, $$75.$$s = self, $$75.$$brk = $brk, $$75.$$arity = 1, $$75)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})(); - if (indent_size['$=='](0)) { - if ($truthy(block_indent)) { - $send(lines, 'map!', [], ($$76 = function(line){var self = $$76.$$s || this; - - - - if (line == null) { - line = nil; - }; - if ($truthy(line['$empty?']())) { - return line - } else { - - return line.$slice(block_indent, line.$length()); - };}, $$76.$$s = self, $$76.$$arity = 1, $$76))} - } else { - - new_block_indent = $rb_times(" ", indent_size); - if ($truthy(block_indent)) { - $send(lines, 'map!', [], ($$77 = function(line){var self = $$77.$$s || this; - - - - if (line == null) { - line = nil; - }; - if ($truthy(line['$empty?']())) { - return line - } else { - return $rb_plus(new_block_indent, line.$slice(block_indent, line.$length())) - };}, $$77.$$s = self, $$77.$$arity = 1, $$77)) - } else { - $send(lines, 'map!', [], ($$78 = function(line){var self = $$78.$$s || this; - - - - if (line == null) { - line = nil; - }; - if ($truthy(line['$empty?']())) { - return line - } else { - return $rb_plus(new_block_indent, line) - };}, $$78.$$s = self, $$78.$$arity = 1, $$78)) - }; - }; - return nil; - }, $Parser_adjust_indentation$excl$70.$$arity = -2); - Opal.defs(self, '$uniform?', $Parser_uniform$ques$79 = function(str, chr, len) { - var self = this; - - return str.$count(chr)['$=='](len) - }, $Parser_uniform$ques$79.$$arity = 3); - return (Opal.defs(self, '$sanitize_attribute_name', $Parser_sanitize_attribute_name$80 = function $$sanitize_attribute_name(name) { - var self = this; - - return name.$gsub($$($nesting, 'InvalidAttributeNameCharsRx'), "").$downcase() - }, $Parser_sanitize_attribute_name$80.$$arity = 1), nil) && 'sanitize_attribute_name'; - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/path_resolver"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy, $hash2 = Opal.hash2, $send = Opal.send, $gvars = Opal.gvars; - - Opal.add_stubs(['$include', '$attr_accessor', '$root?', '$posixify', '$expand_path', '$pwd', '$start_with?', '$==', '$match?', '$absolute_path?', '$+', '$length', '$descends_from?', '$slice', '$to_s', '$relative_path_from', '$new', '$include?', '$tr', '$partition_path', '$each', '$pop', '$<<', '$join_path', '$[]', '$web_root?', '$unc?', '$index', '$split', '$delete', '$[]=', '$-', '$join', '$raise', '$!', '$fetch', '$warn', '$logger', '$empty?', '$nil_or_empty?', '$chomp', '$!=', '$>', '$size', '$extract_uri_prefix', '$end_with?', '$gsub', '$private', '$=~']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'PathResolver'); - - var $nesting = [self].concat($parent_nesting), $PathResolver_initialize$1, $PathResolver_absolute_path$ques$2, $a, $PathResolver_root$ques$3, $PathResolver_unc$ques$4, $PathResolver_web_root$ques$5, $PathResolver_descends_from$ques$6, $PathResolver_relative_path$7, $PathResolver_posixify$8, $PathResolver_expand_path$9, $PathResolver_partition_path$11, $PathResolver_join_path$12, $PathResolver_system_path$13, $PathResolver_web_path$16, $PathResolver_extract_uri_prefix$18; - - self.$$prototype.file_separator = self.$$prototype._partition_path_web = self.$$prototype._partition_path_sys = self.$$prototype.working_dir = nil; - - self.$include($$($nesting, 'Logging')); - Opal.const_set($nesting[0], 'DOT', "."); - Opal.const_set($nesting[0], 'DOT_DOT', ".."); - Opal.const_set($nesting[0], 'DOT_SLASH', "./"); - Opal.const_set($nesting[0], 'SLASH', "/"); - Opal.const_set($nesting[0], 'BACKSLASH', "\\"); - Opal.const_set($nesting[0], 'DOUBLE_SLASH', "//"); - Opal.const_set($nesting[0], 'WindowsRootRx', /^(?:[a-zA-Z]:)?[\\\/]/); - self.$attr_accessor("file_separator"); - self.$attr_accessor("working_dir"); - - Opal.def(self, '$initialize', $PathResolver_initialize$1 = function $$initialize(file_separator, working_dir) { - var $a, $b, self = this; - - - - if (file_separator == null) { - file_separator = nil; - }; - - if (working_dir == null) { - working_dir = nil; - }; - self.file_separator = ($truthy($a = ($truthy($b = file_separator) ? $b : $$$($$$('::', 'File'), 'ALT_SEPARATOR'))) ? $a : $$$($$$('::', 'File'), 'SEPARATOR')); - self.working_dir = (function() {if ($truthy(working_dir)) { - - if ($truthy(self['$root?'](working_dir))) { - - return self.$posixify(working_dir); - } else { - - return $$$('::', 'File').$expand_path(working_dir); - }; - } else { - return $$$('::', 'Dir').$pwd() - }; return nil; })(); - self._partition_path_sys = $hash2([], {}); - return (self._partition_path_web = $hash2([], {})); - }, $PathResolver_initialize$1.$$arity = -1); - - Opal.def(self, '$absolute_path?', $PathResolver_absolute_path$ques$2 = function(path) { - var $a, $b, self = this; - - return ($truthy($a = path['$start_with?']($$($nesting, 'SLASH'))) ? $a : (($b = self.file_separator['$==']($$($nesting, 'BACKSLASH'))) ? $$($nesting, 'WindowsRootRx')['$match?'](path) : self.file_separator['$==']($$($nesting, 'BACKSLASH')))) - }, $PathResolver_absolute_path$ques$2.$$arity = 1); - if ($truthy((($a = $$($nesting, 'RUBY_ENGINE')['$==']("opal")) ? $$$('::', 'JAVASCRIPT_IO_MODULE')['$==']("xmlhttprequest") : $$($nesting, 'RUBY_ENGINE')['$==']("opal")))) { - - Opal.def(self, '$root?', $PathResolver_root$ques$3 = function(path) { - var $a, self = this; - - return ($truthy($a = self['$absolute_path?'](path)) ? $a : path['$start_with?']("file://", "http://", "https://")) - }, $PathResolver_root$ques$3.$$arity = 1) - } else { - Opal.alias(self, "root?", "absolute_path?") - }; - - Opal.def(self, '$unc?', $PathResolver_unc$ques$4 = function(path) { - var self = this; - - return path['$start_with?']($$($nesting, 'DOUBLE_SLASH')) - }, $PathResolver_unc$ques$4.$$arity = 1); - - Opal.def(self, '$web_root?', $PathResolver_web_root$ques$5 = function(path) { - var self = this; - - return path['$start_with?']($$($nesting, 'SLASH')) - }, $PathResolver_web_root$ques$5.$$arity = 1); - - Opal.def(self, '$descends_from?', $PathResolver_descends_from$ques$6 = function(path, base) { - var $a, self = this; - - if (base['$=='](path)) { - return 0 - } else if (base['$==']($$($nesting, 'SLASH'))) { - return ($truthy($a = path['$start_with?']($$($nesting, 'SLASH'))) ? 1 : $a) - } else { - return ($truthy($a = path['$start_with?']($rb_plus(base, $$($nesting, 'SLASH')))) ? $rb_plus(base.$length(), 1) : $a) - } - }, $PathResolver_descends_from$ques$6.$$arity = 2); - - Opal.def(self, '$relative_path', $PathResolver_relative_path$7 = function $$relative_path(path, base) { - var self = this, offset = nil; - - if ($truthy(self['$root?'](path))) { - if ($truthy((offset = self['$descends_from?'](path, base)))) { - return path.$slice(offset, path.$length()) - } else { - - try { - return $$($nesting, 'Pathname').$new(path).$relative_path_from($$($nesting, 'Pathname').$new(base)).$to_s() - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return path - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - } - } else { - return path - } - }, $PathResolver_relative_path$7.$$arity = 2); - - Opal.def(self, '$posixify', $PathResolver_posixify$8 = function $$posixify(path) { - var $a, self = this; - - if ($truthy(path)) { - if ($truthy((($a = self.file_separator['$==']($$($nesting, 'BACKSLASH'))) ? path['$include?']($$($nesting, 'BACKSLASH')) : self.file_separator['$==']($$($nesting, 'BACKSLASH'))))) { - - return path.$tr($$($nesting, 'BACKSLASH'), $$($nesting, 'SLASH')); - } else { - return path - } - } else { - return "" - } - }, $PathResolver_posixify$8.$$arity = 1); - Opal.alias(self, "posixfy", "posixify"); - - Opal.def(self, '$expand_path', $PathResolver_expand_path$9 = function $$expand_path(path) { - var $a, $b, $$10, self = this, path_segments = nil, path_root = nil, resolved_segments = nil; - - - $b = self.$partition_path(path), $a = Opal.to_ary($b), (path_segments = ($a[0] == null ? nil : $a[0])), (path_root = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy(path['$include?']($$($nesting, 'DOT_DOT')))) { - - resolved_segments = []; - $send(path_segments, 'each', [], ($$10 = function(segment){var self = $$10.$$s || this; - - - - if (segment == null) { - segment = nil; - }; - if (segment['$==']($$($nesting, 'DOT_DOT'))) { - return resolved_segments.$pop() - } else { - return resolved_segments['$<<'](segment) - };}, $$10.$$s = self, $$10.$$arity = 1, $$10)); - return self.$join_path(resolved_segments, path_root); - } else { - return self.$join_path(path_segments, path_root) - }; - }, $PathResolver_expand_path$9.$$arity = 1); - - Opal.def(self, '$partition_path', $PathResolver_partition_path$11 = function $$partition_path(path, web) { - var self = this, result = nil, cache = nil, posix_path = nil, root = nil, path_segments = nil, $writer = nil; - - - - if (web == null) { - web = nil; - }; - if ($truthy((result = (cache = (function() {if ($truthy(web)) { - return self._partition_path_web - } else { - return self._partition_path_sys - }; return nil; })())['$[]'](path)))) { - return result}; - posix_path = self.$posixify(path); - if ($truthy(web)) { - if ($truthy(self['$web_root?'](posix_path))) { - root = $$($nesting, 'SLASH') - } else if ($truthy(posix_path['$start_with?']($$($nesting, 'DOT_SLASH')))) { - root = $$($nesting, 'DOT_SLASH')} - } else if ($truthy(self['$root?'](posix_path))) { - if ($truthy(self['$unc?'](posix_path))) { - root = $$($nesting, 'DOUBLE_SLASH') - } else if ($truthy(posix_path['$start_with?']($$($nesting, 'SLASH')))) { - root = $$($nesting, 'SLASH') - } else { - root = posix_path.$slice(0, $rb_plus(posix_path.$index($$($nesting, 'SLASH')), 1)) - } - } else if ($truthy(posix_path['$start_with?']($$($nesting, 'DOT_SLASH')))) { - root = $$($nesting, 'DOT_SLASH')}; - path_segments = (function() {if ($truthy(root)) { - - return posix_path.$slice(root.$length(), posix_path.$length()); - } else { - return posix_path - }; return nil; })().$split($$($nesting, 'SLASH')); - path_segments.$delete($$($nesting, 'DOT')); - - $writer = [path, [path_segments, root]]; - $send(cache, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - }, $PathResolver_partition_path$11.$$arity = -2); - - Opal.def(self, '$join_path', $PathResolver_join_path$12 = function $$join_path(segments, root) { - var self = this; - - - - if (root == null) { - root = nil; - }; - if ($truthy(root)) { - return "" + (root) + (segments.$join($$($nesting, 'SLASH'))) - } else { - - return segments.$join($$($nesting, 'SLASH')); - }; - }, $PathResolver_join_path$12.$$arity = -2); - - Opal.def(self, '$system_path', $PathResolver_system_path$13 = function $$system_path(target, start, jail, opts) { - var $a, $b, $$14, $$15, self = this, target_path = nil, target_segments = nil, jail_segments = nil, jail_root = nil, recheck = nil, start_segments = nil, start_root = nil, resolved_segments = nil, unresolved_segments = nil, warned = nil; - - - - if (start == null) { - start = nil; - }; - - if (jail == null) { - jail = nil; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy(jail)) { - - if ($truthy(self['$root?'](jail))) { - } else { - self.$raise($$$('::', 'SecurityError'), "" + "Jail is not an absolute path: " + (jail)) - }; - jail = self.$posixify(jail);}; - if ($truthy(target)) { - if ($truthy(self['$root?'](target))) { - - target_path = self.$expand_path(target); - if ($truthy(($truthy($a = jail) ? self['$descends_from?'](target_path, jail)['$!']() : $a))) { - if ($truthy(opts.$fetch("recover", true))) { - - self.$logger().$warn("" + (($truthy($a = opts['$[]']("target_name")) ? $a : "path")) + " is outside of jail; recovering automatically"); - $b = self.$partition_path(target_path), $a = Opal.to_ary($b), (target_segments = ($a[0] == null ? nil : $a[0])), $b; - $b = self.$partition_path(jail), $a = Opal.to_ary($b), (jail_segments = ($a[0] == null ? nil : $a[0])), (jail_root = ($a[1] == null ? nil : $a[1])), $b; - return self.$join_path($rb_plus(jail_segments, target_segments), jail_root); - } else { - self.$raise($$$('::', 'SecurityError'), "" + (($truthy($a = opts['$[]']("target_name")) ? $a : "path")) + " " + (target) + " is outside of jail: " + (jail) + " (disallowed in safe mode)") - }}; - return target_path; - } else { - $b = self.$partition_path(target), $a = Opal.to_ary($b), (target_segments = ($a[0] == null ? nil : $a[0])), $b - } - } else { - target_segments = [] - }; - if ($truthy(target_segments['$empty?']())) { - if ($truthy(start['$nil_or_empty?']())) { - return ($truthy($a = jail) ? $a : self.working_dir) - } else if ($truthy(self['$root?'](start))) { - if ($truthy(jail)) { - start = self.$posixify(start) - } else { - return self.$expand_path(start) - } - } else { - - $b = self.$partition_path(start), $a = Opal.to_ary($b), (target_segments = ($a[0] == null ? nil : $a[0])), $b; - start = ($truthy($a = jail) ? $a : self.working_dir); - } - } else if ($truthy(start['$nil_or_empty?']())) { - start = ($truthy($a = jail) ? $a : self.working_dir) - } else if ($truthy(self['$root?'](start))) { - if ($truthy(jail)) { - start = self.$posixify(start)} - } else { - start = "" + (($truthy($a = jail) ? $a : self.working_dir).$chomp("/")) + "/" + (start) - }; - if ($truthy(($truthy($a = ($truthy($b = jail) ? (recheck = self['$descends_from?'](start, jail)['$!']()) : $b)) ? self.file_separator['$==']($$($nesting, 'BACKSLASH')) : $a))) { - - $b = self.$partition_path(start), $a = Opal.to_ary($b), (start_segments = ($a[0] == null ? nil : $a[0])), (start_root = ($a[1] == null ? nil : $a[1])), $b; - $b = self.$partition_path(jail), $a = Opal.to_ary($b), (jail_segments = ($a[0] == null ? nil : $a[0])), (jail_root = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy(start_root['$!='](jail_root))) { - if ($truthy(opts.$fetch("recover", true))) { - - self.$logger().$warn("" + "start path for " + (($truthy($a = opts['$[]']("target_name")) ? $a : "path")) + " is outside of jail root; recovering automatically"); - start_segments = jail_segments; - recheck = false; - } else { - self.$raise($$$('::', 'SecurityError'), "" + "start path for " + (($truthy($a = opts['$[]']("target_name")) ? $a : "path")) + " " + (start) + " refers to location outside jail root: " + (jail) + " (disallowed in safe mode)") - }}; - } else { - $b = self.$partition_path(start), $a = Opal.to_ary($b), (start_segments = ($a[0] == null ? nil : $a[0])), (jail_root = ($a[1] == null ? nil : $a[1])), $b - }; - if ($truthy((resolved_segments = $rb_plus(start_segments, target_segments))['$include?']($$($nesting, 'DOT_DOT')))) { - - $a = [resolved_segments, []], (unresolved_segments = $a[0]), (resolved_segments = $a[1]), $a; - if ($truthy(jail)) { - - if ($truthy(jail_segments)) { - } else { - $b = self.$partition_path(jail), $a = Opal.to_ary($b), (jail_segments = ($a[0] == null ? nil : $a[0])), $b - }; - warned = false; - $send(unresolved_segments, 'each', [], ($$14 = function(segment){var self = $$14.$$s || this, $c; - - - - if (segment == null) { - segment = nil; - }; - if (segment['$==']($$($nesting, 'DOT_DOT'))) { - if ($truthy($rb_gt(resolved_segments.$size(), jail_segments.$size()))) { - return resolved_segments.$pop() - } else if ($truthy(opts.$fetch("recover", true))) { - if ($truthy(warned)) { - return nil - } else { - - self.$logger().$warn("" + (($truthy($c = opts['$[]']("target_name")) ? $c : "path")) + " has illegal reference to ancestor of jail; recovering automatically"); - return (warned = true); - } - } else { - return self.$raise($$$('::', 'SecurityError'), "" + (($truthy($c = opts['$[]']("target_name")) ? $c : "path")) + " " + (target) + " refers to location outside jail: " + (jail) + " (disallowed in safe mode)") - } - } else { - return resolved_segments['$<<'](segment) - };}, $$14.$$s = self, $$14.$$arity = 1, $$14)); - } else { - $send(unresolved_segments, 'each', [], ($$15 = function(segment){var self = $$15.$$s || this; - - - - if (segment == null) { - segment = nil; - }; - if (segment['$==']($$($nesting, 'DOT_DOT'))) { - return resolved_segments.$pop() - } else { - return resolved_segments['$<<'](segment) - };}, $$15.$$s = self, $$15.$$arity = 1, $$15)) - };}; - if ($truthy(recheck)) { - - target_path = self.$join_path(resolved_segments, jail_root); - if ($truthy(self['$descends_from?'](target_path, jail))) { - return target_path - } else if ($truthy(opts.$fetch("recover", true))) { - - self.$logger().$warn("" + (($truthy($a = opts['$[]']("target_name")) ? $a : "path")) + " is outside of jail; recovering automatically"); - if ($truthy(jail_segments)) { - } else { - $b = self.$partition_path(jail), $a = Opal.to_ary($b), (jail_segments = ($a[0] == null ? nil : $a[0])), $b - }; - return self.$join_path($rb_plus(jail_segments, target_segments), jail_root); - } else { - return self.$raise($$$('::', 'SecurityError'), "" + (($truthy($a = opts['$[]']("target_name")) ? $a : "path")) + " " + (target) + " is outside of jail: " + (jail) + " (disallowed in safe mode)") - }; - } else { - return self.$join_path(resolved_segments, jail_root) - }; - }, $PathResolver_system_path$13.$$arity = -2); - - Opal.def(self, '$web_path', $PathResolver_web_path$16 = function $$web_path(target, start) { - var $a, $b, $$17, self = this, uri_prefix = nil, target_segments = nil, target_root = nil, resolved_segments = nil, resolved_path = nil; - - - - if (start == null) { - start = nil; - }; - target = self.$posixify(target); - start = self.$posixify(start); - if ($truthy(($truthy($a = start['$nil_or_empty?']()) ? $a : self['$web_root?'](target)))) { - } else { - $b = self.$extract_uri_prefix("" + (start) + ((function() {if ($truthy(start['$end_with?']($$($nesting, 'SLASH')))) { - return "" - } else { - return $$($nesting, 'SLASH') - }; return nil; })()) + (target)), $a = Opal.to_ary($b), (target = ($a[0] == null ? nil : $a[0])), (uri_prefix = ($a[1] == null ? nil : $a[1])), $b - }; - $b = self.$partition_path(target, true), $a = Opal.to_ary($b), (target_segments = ($a[0] == null ? nil : $a[0])), (target_root = ($a[1] == null ? nil : $a[1])), $b; - resolved_segments = []; - $send(target_segments, 'each', [], ($$17 = function(segment){var self = $$17.$$s || this, $c; - - - - if (segment == null) { - segment = nil; - }; - if (segment['$==']($$($nesting, 'DOT_DOT'))) { - if ($truthy(resolved_segments['$empty?']())) { - if ($truthy(($truthy($c = target_root) ? target_root['$!=']($$($nesting, 'DOT_SLASH')) : $c))) { - return nil - } else { - return resolved_segments['$<<'](segment) - } - } else if (resolved_segments['$[]'](-1)['$==']($$($nesting, 'DOT_DOT'))) { - return resolved_segments['$<<'](segment) - } else { - return resolved_segments.$pop() - } - } else { - return resolved_segments['$<<'](segment) - };}, $$17.$$s = self, $$17.$$arity = 1, $$17)); - if ($truthy((resolved_path = self.$join_path(resolved_segments, target_root))['$include?'](" "))) { - resolved_path = resolved_path.$gsub(" ", "%20")}; - if ($truthy(uri_prefix)) { - return "" + (uri_prefix) + (resolved_path) - } else { - return resolved_path - }; - }, $PathResolver_web_path$16.$$arity = -2); - self.$private(); - return (Opal.def(self, '$extract_uri_prefix', $PathResolver_extract_uri_prefix$18 = function $$extract_uri_prefix(str) { - var $a, self = this; - - if ($truthy(($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$=~'](str) : $a))) { - return [str.$slice((($a = $gvars['~']) === nil ? nil : $a['$[]'](0)).$length(), str.$length()), (($a = $gvars['~']) === nil ? nil : $a['$[]'](0))] - } else { - return str - } - }, $PathResolver_extract_uri_prefix$18.$$arity = 1), nil) && 'extract_uri_prefix'; - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/reader"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - function $rb_ge(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_divide(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs / rhs : lhs['$/'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send, $gvars = Opal.gvars, $hash = Opal.hash; - - Opal.add_stubs(['$include', '$attr_reader', '$+', '$attr_accessor', '$!', '$===', '$split', '$file', '$dir', '$dirname', '$path', '$basename', '$lineno', '$prepare_lines', '$drop', '$empty?', '$nil_or_empty?', '$peek_line', '$>', '$slice', '$[]', '$length', '$process_line', '$times', '$shift', '$read_line', '$<<', '$-', '$unshift_all', '$has_more_lines?', '$join', '$read_lines', '$unshift', '$start_with?', '$==', '$*', '$read_lines_until', '$size', '$clear', '$cursor', '$[]=', '$!=', '$fetch', '$cursor_at_mark', '$warn', '$logger', '$message_with_context', '$new', '$tap', '$each', '$instance_variables', '$instance_variable_get', '$instance_variable_set', '$class', '$object_id', '$inspect', '$private', '$prepare_source_array', '$prepare_source_string', '$chomp', '$valid_encoding?', '$to_s', '$raise', '$to_i', '$attributes', '$catalog', '$pop_include', '$parse', '$path=', '$dup', '$end_with?', '$keys', '$rindex', '$rootname', '$key?', '$attr', '$>=', '$nil?', '$extensions?', '$include_processors?', '$extensions', '$include_processors', '$map', '$skip_front_matter!', '$pop', '$adjust_indentation!', '$include?', '$=~', '$preprocess_conditional_directive', '$preprocess_include_directive', '$downcase', '$error', '$none?', '$any?', '$all?', '$strip', '$send', '$resolve_expr_val', '$replace_next_line', '$rstrip', '$sub_attributes', '$attribute_missing', '$info', '$parse_attributes', '$find', '$handles?', '$instance', '$process_method', '$safe', '$resolve_include_path', '$method', '$split_delimited_value', '$partition', '$<', '$/', '$to_a', '$uniq', '$sort', '$call', '$each_line', '$infinite?', '$push_include', '$delete', '$create_include_cursor', '$delete_at', '$read', '$uriish?', '$attr?', '$require_library', '$normalize_system_path', '$file?', '$relative_path', '$path_resolver', '$base_dir', '$to_f']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Reader'); - - var $nesting = [self].concat($parent_nesting), $Reader_initialize$4, $Reader_has_more_lines$ques$5, $Reader_empty$ques$6, $Reader_next_line_empty$ques$7, $Reader_peek_line$8, $Reader_peek_lines$9, $Reader_read_line$11, $Reader_read_lines$12, $Reader_read$13, $Reader_advance$14, $Reader_unshift_line$15, $Reader_unshift_lines$16, $Reader_replace_next_line$17, $Reader_skip_blank_lines$18, $Reader_skip_comment_lines$19, $Reader_skip_line_comments$20, $Reader_terminate$21, $Reader_read_lines_until$22, $Reader_shift$23, $Reader_unshift$24, $Reader_unshift_all$25, $Reader_cursor$26, $Reader_cursor_at_line$27, $Reader_cursor_at_mark$28, $Reader_cursor_before_mark$29, $Reader_cursor_at_prev_line$30, $Reader_mark$31, $Reader_line_info$32, $Reader_lines$33, $Reader_string$34, $Reader_source$35, $Reader_save$36, $Reader_restore_save$39, $Reader_discard_save$41, $Reader_to_s$42, $Reader_prepare_lines$43, $Reader_process_line$44; - - self.$$prototype.file = self.$$prototype.lines = self.$$prototype.look_ahead = self.$$prototype.unescape_next_line = self.$$prototype.lineno = self.$$prototype.process_lines = self.$$prototype.dir = self.$$prototype.path = self.$$prototype.mark = self.$$prototype.source_lines = self.$$prototype.saved = nil; - - self.$include($$($nesting, 'Logging')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Cursor'); - - var $nesting = [self].concat($parent_nesting), $Cursor_initialize$1, $Cursor_advance$2, $Cursor_line_info$3; - - self.$$prototype.lineno = self.$$prototype.path = nil; - - self.$attr_reader("file", "dir", "path", "lineno"); - - Opal.def(self, '$initialize', $Cursor_initialize$1 = function $$initialize(file, dir, path, lineno) { - var $a, self = this; - - - - if (dir == null) { - dir = nil; - }; - - if (path == null) { - path = nil; - }; - - if (lineno == null) { - lineno = 1; - }; - return $a = [file, dir, path, lineno], (self.file = $a[0]), (self.dir = $a[1]), (self.path = $a[2]), (self.lineno = $a[3]), $a; - }, $Cursor_initialize$1.$$arity = -2); - - Opal.def(self, '$advance', $Cursor_advance$2 = function $$advance(num) { - var self = this; - - return (self.lineno = $rb_plus(self.lineno, num)) - }, $Cursor_advance$2.$$arity = 1); - - Opal.def(self, '$line_info', $Cursor_line_info$3 = function $$line_info() { - var self = this; - - return "" + (self.path) + ": line " + (self.lineno) - }, $Cursor_line_info$3.$$arity = 0); - return Opal.alias(self, "to_s", "line_info"); - })($nesting[0], null, $nesting); - self.$attr_reader("file"); - self.$attr_reader("dir"); - self.$attr_reader("path"); - self.$attr_reader("lineno"); - self.$attr_reader("source_lines"); - self.$attr_accessor("process_lines"); - self.$attr_accessor("unterminated"); - - Opal.def(self, '$initialize', $Reader_initialize$4 = function $$initialize(data, cursor, opts) { - var $a, $b, self = this; - - - - if (data == null) { - data = nil; - }; - - if (cursor == null) { - cursor = nil; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy(cursor['$!']())) { - - self.file = nil; - self.dir = "."; - self.path = "<stdin>"; - self.lineno = 1; - } else if ($truthy($$$('::', 'String')['$==='](cursor))) { - - self.file = cursor; - $b = $$$('::', 'File').$split(self.file), $a = Opal.to_ary($b), (self.dir = ($a[0] == null ? nil : $a[0])), (self.path = ($a[1] == null ? nil : $a[1])), $b; - self.lineno = 1; - } else { - - if ($truthy((self.file = cursor.$file()))) { - - self.dir = ($truthy($a = cursor.$dir()) ? $a : $$$('::', 'File').$dirname(self.file)); - self.path = ($truthy($a = cursor.$path()) ? $a : $$$('::', 'File').$basename(self.file)); - } else { - - self.dir = ($truthy($a = cursor.$dir()) ? $a : "."); - self.path = ($truthy($a = cursor.$path()) ? $a : "<stdin>"); - }; - self.lineno = ($truthy($a = cursor.$lineno()) ? $a : 1); - }; - self.lines = self.$prepare_lines(data, opts); - self.source_lines = self.lines.$drop(0); - self.mark = nil; - self.look_ahead = 0; - self.process_lines = true; - self.unescape_next_line = false; - self.unterminated = nil; - return (self.saved = nil); - }, $Reader_initialize$4.$$arity = -1); - - Opal.def(self, '$has_more_lines?', $Reader_has_more_lines$ques$5 = function() { - var self = this; - - if ($truthy(self.lines['$empty?']())) { - - self.look_ahead = 0; - return false; - } else { - return true - } - }, $Reader_has_more_lines$ques$5.$$arity = 0); - - Opal.def(self, '$empty?', $Reader_empty$ques$6 = function() { - var self = this; - - if ($truthy(self.lines['$empty?']())) { - - self.look_ahead = 0; - return true; - } else { - return false - } - }, $Reader_empty$ques$6.$$arity = 0); - Opal.alias(self, "eof?", "empty?"); - - Opal.def(self, '$next_line_empty?', $Reader_next_line_empty$ques$7 = function() { - var self = this; - - return self.$peek_line()['$nil_or_empty?']() - }, $Reader_next_line_empty$ques$7.$$arity = 0); - - Opal.def(self, '$peek_line', $Reader_peek_line$8 = function $$peek_line(direct) { - var $a, self = this, line = nil; - - - - if (direct == null) { - direct = false; - }; - if ($truthy(($truthy($a = direct) ? $a : $rb_gt(self.look_ahead, 0)))) { - if ($truthy(self.unescape_next_line)) { - - return (line = self.lines['$[]'](0)).$slice(1, line.$length()); - } else { - return self.lines['$[]'](0) - } - } else if ($truthy(self.lines['$empty?']())) { - - self.look_ahead = 0; - return nil; - } else if ($truthy((line = self.$process_line(self.lines['$[]'](0))))) { - return line - } else { - return self.$peek_line() - }; - }, $Reader_peek_line$8.$$arity = -1); - - Opal.def(self, '$peek_lines', $Reader_peek_lines$9 = function $$peek_lines(num, direct) { - var $a, $$10, self = this, old_look_ahead = nil, result = nil; - - - - if (num == null) { - num = nil; - }; - - if (direct == null) { - direct = false; - }; - old_look_ahead = self.look_ahead; - result = []; - (function(){var $brk = Opal.new_brk(); try {return $send(($truthy($a = num) ? $a : $$($nesting, 'MAX_INT')), 'times', [], ($$10 = function(){var self = $$10.$$s || this, line = nil; - if (self.lineno == null) self.lineno = nil; - - if ($truthy((line = (function() {if ($truthy(direct)) { - return self.$shift() - } else { - return self.$read_line() - }; return nil; })()))) { - return result['$<<'](line) - } else { - - if ($truthy(direct)) { - self.lineno = $rb_minus(self.lineno, 1)}; - - Opal.brk(nil, $brk); - }}, $$10.$$s = self, $$10.$$brk = $brk, $$10.$$arity = 0, $$10)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})(); - if ($truthy(result['$empty?']())) { - } else { - - self.$unshift_all(result); - if ($truthy(direct)) { - self.look_ahead = old_look_ahead}; - }; - return result; - }, $Reader_peek_lines$9.$$arity = -1); - - Opal.def(self, '$read_line', $Reader_read_line$11 = function $$read_line() { - var $a, self = this; - - if ($truthy(($truthy($a = $rb_gt(self.look_ahead, 0)) ? $a : self['$has_more_lines?']()))) { - return self.$shift() - } else { - return nil - } - }, $Reader_read_line$11.$$arity = 0); - - Opal.def(self, '$read_lines', $Reader_read_lines$12 = function $$read_lines() { - var $a, self = this, lines = nil; - - - lines = []; - while ($truthy(self['$has_more_lines?']())) { - lines['$<<'](self.$shift()) - }; - return lines; - }, $Reader_read_lines$12.$$arity = 0); - Opal.alias(self, "readlines", "read_lines"); - - Opal.def(self, '$read', $Reader_read$13 = function $$read() { - var self = this; - - return self.$read_lines().$join($$($nesting, 'LF')) - }, $Reader_read$13.$$arity = 0); - - Opal.def(self, '$advance', $Reader_advance$14 = function $$advance() { - var self = this; - - if ($truthy(self.$shift())) { - return true - } else { - return false - } - }, $Reader_advance$14.$$arity = 0); - - Opal.def(self, '$unshift_line', $Reader_unshift_line$15 = function $$unshift_line(line_to_restore) { - var self = this; - - - self.$unshift(line_to_restore); - return nil; - }, $Reader_unshift_line$15.$$arity = 1); - Opal.alias(self, "restore_line", "unshift_line"); - - Opal.def(self, '$unshift_lines', $Reader_unshift_lines$16 = function $$unshift_lines(lines_to_restore) { - var self = this; - - - self.$unshift_all(lines_to_restore); - return nil; - }, $Reader_unshift_lines$16.$$arity = 1); - Opal.alias(self, "restore_lines", "unshift_lines"); - - Opal.def(self, '$replace_next_line', $Reader_replace_next_line$17 = function $$replace_next_line(replacement) { - var self = this; - - - self.$shift(); - self.$unshift(replacement); - return true; - }, $Reader_replace_next_line$17.$$arity = 1); - Opal.alias(self, "replace_line", "replace_next_line"); - - Opal.def(self, '$skip_blank_lines', $Reader_skip_blank_lines$18 = function $$skip_blank_lines() { - var $a, self = this, num_skipped = nil, next_line = nil; - - - if ($truthy(self['$empty?']())) { - return nil}; - num_skipped = 0; - while ($truthy((next_line = self.$peek_line()))) { - if ($truthy(next_line['$empty?']())) { - - self.$shift(); - num_skipped = $rb_plus(num_skipped, 1); - } else { - return num_skipped - } - }; - }, $Reader_skip_blank_lines$18.$$arity = 0); - - Opal.def(self, '$skip_comment_lines', $Reader_skip_comment_lines$19 = function $$skip_comment_lines() { - var $a, $b, self = this, next_line = nil, ll = nil; - - - if ($truthy(self['$empty?']())) { - return nil}; - while ($truthy(($truthy($b = (next_line = self.$peek_line())) ? next_line['$empty?']()['$!']() : $b))) { - if ($truthy(next_line['$start_with?']("//"))) { - if ($truthy(next_line['$start_with?']("///"))) { - if ($truthy(($truthy($b = $rb_gt((ll = next_line.$length()), 3)) ? next_line['$==']($rb_times("/", ll)) : $b))) { - self.$read_lines_until($hash2(["terminator", "skip_first_line", "read_last_line", "skip_processing", "context"], {"terminator": next_line, "skip_first_line": true, "read_last_line": true, "skip_processing": true, "context": "comment"})) - } else { - break; - } - } else { - self.$shift() - } - } else { - break; - } - }; - return nil; - }, $Reader_skip_comment_lines$19.$$arity = 0); - - Opal.def(self, '$skip_line_comments', $Reader_skip_line_comments$20 = function $$skip_line_comments() { - var $a, $b, self = this, comment_lines = nil, next_line = nil; - - - if ($truthy(self['$empty?']())) { - return []}; - comment_lines = []; - while ($truthy(($truthy($b = (next_line = self.$peek_line())) ? next_line['$empty?']()['$!']() : $b))) { - if ($truthy(next_line['$start_with?']("//"))) { - comment_lines['$<<'](self.$shift()) - } else { - break; - } - }; - return comment_lines; - }, $Reader_skip_line_comments$20.$$arity = 0); - - Opal.def(self, '$terminate', $Reader_terminate$21 = function $$terminate() { - var self = this; - - - self.lineno = $rb_plus(self.lineno, self.lines.$size()); - self.lines.$clear(); - self.look_ahead = 0; - return nil; - }, $Reader_terminate$21.$$arity = 0); - - Opal.def(self, '$read_lines_until', $Reader_read_lines_until$22 = function $$read_lines_until(options) { - var $a, $b, $c, $d, $iter = $Reader_read_lines_until$22.$$p, $yield = $iter || nil, self = this, result = nil, restore_process_lines = nil, terminator = nil, start_cursor = nil, break_on_blank_lines = nil, break_on_list_continuation = nil, skip_comments = nil, complete = nil, line_read = nil, line_restored = nil, line = nil, $writer = nil, context = nil; - - if ($iter) $Reader_read_lines_until$22.$$p = null; - - - if (options == null) { - options = $hash2([], {}); - }; - result = []; - if ($truthy(($truthy($a = self.process_lines) ? options['$[]']("skip_processing") : $a))) { - - self.process_lines = false; - restore_process_lines = true;}; - if ($truthy((terminator = options['$[]']("terminator")))) { - - start_cursor = ($truthy($a = options['$[]']("cursor")) ? $a : self.$cursor()); - break_on_blank_lines = false; - break_on_list_continuation = false; - } else { - - break_on_blank_lines = options['$[]']("break_on_blank_lines"); - break_on_list_continuation = options['$[]']("break_on_list_continuation"); - }; - skip_comments = options['$[]']("skip_line_comments"); - complete = (line_read = (line_restored = nil)); - if ($truthy(options['$[]']("skip_first_line"))) { - self.$shift()}; - while ($truthy(($truthy($b = complete['$!']()) ? (line = self.$read_line()) : $b))) { - - complete = (function() {while ($truthy(true)) { - - if ($truthy(($truthy($c = terminator) ? line['$=='](terminator) : $c))) { - return true}; - if ($truthy(($truthy($c = break_on_blank_lines) ? line['$empty?']() : $c))) { - return true}; - if ($truthy(($truthy($c = ($truthy($d = break_on_list_continuation) ? line_read : $d)) ? line['$==']($$($nesting, 'LIST_CONTINUATION')) : $c))) { - - - $writer = ["preserve_last_line", true]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return true;}; - if ($truthy((($c = ($yield !== nil)) ? Opal.yield1($yield, line) : ($yield !== nil)))) { - return true}; - return false; - }; return nil; })(); - if ($truthy(complete)) { - - if ($truthy(options['$[]']("read_last_line"))) { - - result['$<<'](line); - line_read = true;}; - if ($truthy(options['$[]']("preserve_last_line"))) { - - self.$unshift(line); - line_restored = true;}; - } else if ($truthy(($truthy($b = ($truthy($c = skip_comments) ? line['$start_with?']("//") : $c)) ? line['$start_with?']("///")['$!']() : $b))) { - } else { - - result['$<<'](line); - line_read = true; - }; - }; - if ($truthy(restore_process_lines)) { - - self.process_lines = true; - if ($truthy(($truthy($a = line_restored) ? terminator['$!']() : $a))) { - self.look_ahead = $rb_minus(self.look_ahead, 1)};}; - if ($truthy(($truthy($a = ($truthy($b = terminator) ? terminator['$!='](line) : $b)) ? (context = options.$fetch("context", terminator)) : $a))) { - - if (start_cursor['$==']("at_mark")) { - start_cursor = self.$cursor_at_mark()}; - self.$logger().$warn(self.$message_with_context("" + "unterminated " + (context) + " block", $hash2(["source_location"], {"source_location": start_cursor}))); - self.unterminated = true;}; - return result; - }, $Reader_read_lines_until$22.$$arity = -1); - - Opal.def(self, '$shift', $Reader_shift$23 = function $$shift() { - var self = this; - - - self.lineno = $rb_plus(self.lineno, 1); - if (self.look_ahead['$=='](0)) { - } else { - self.look_ahead = $rb_minus(self.look_ahead, 1) - }; - return self.lines.$shift(); - }, $Reader_shift$23.$$arity = 0); - - Opal.def(self, '$unshift', $Reader_unshift$24 = function $$unshift(line) { - var self = this; - - - self.lineno = $rb_minus(self.lineno, 1); - self.look_ahead = $rb_plus(self.look_ahead, 1); - return self.lines.$unshift(line); - }, $Reader_unshift$24.$$arity = 1); - - Opal.def(self, '$unshift_all', $Reader_unshift_all$25 = function $$unshift_all(lines) { - var self = this; - - - self.lineno = $rb_minus(self.lineno, lines.$size()); - self.look_ahead = $rb_plus(self.look_ahead, lines.$size()); - return $send(self.lines, 'unshift', Opal.to_a(lines)); - }, $Reader_unshift_all$25.$$arity = 1); - - Opal.def(self, '$cursor', $Reader_cursor$26 = function $$cursor() { - var self = this; - - return $$($nesting, 'Cursor').$new(self.file, self.dir, self.path, self.lineno) - }, $Reader_cursor$26.$$arity = 0); - - Opal.def(self, '$cursor_at_line', $Reader_cursor_at_line$27 = function $$cursor_at_line(lineno) { - var self = this; - - return $$($nesting, 'Cursor').$new(self.file, self.dir, self.path, lineno) - }, $Reader_cursor_at_line$27.$$arity = 1); - - Opal.def(self, '$cursor_at_mark', $Reader_cursor_at_mark$28 = function $$cursor_at_mark() { - var self = this; - - if ($truthy(self.mark)) { - return $send($$($nesting, 'Cursor'), 'new', Opal.to_a(self.mark)) - } else { - return self.$cursor() - } - }, $Reader_cursor_at_mark$28.$$arity = 0); - - Opal.def(self, '$cursor_before_mark', $Reader_cursor_before_mark$29 = function $$cursor_before_mark() { - var $a, $b, self = this, m_file = nil, m_dir = nil, m_path = nil, m_lineno = nil; - - if ($truthy(self.mark)) { - - $b = self.mark, $a = Opal.to_ary($b), (m_file = ($a[0] == null ? nil : $a[0])), (m_dir = ($a[1] == null ? nil : $a[1])), (m_path = ($a[2] == null ? nil : $a[2])), (m_lineno = ($a[3] == null ? nil : $a[3])), $b; - return $$($nesting, 'Cursor').$new(m_file, m_dir, m_path, $rb_minus(m_lineno, 1)); - } else { - return $$($nesting, 'Cursor').$new(self.file, self.dir, self.path, $rb_minus(self.lineno, 1)) - } - }, $Reader_cursor_before_mark$29.$$arity = 0); - - Opal.def(self, '$cursor_at_prev_line', $Reader_cursor_at_prev_line$30 = function $$cursor_at_prev_line() { - var self = this; - - return $$($nesting, 'Cursor').$new(self.file, self.dir, self.path, $rb_minus(self.lineno, 1)) - }, $Reader_cursor_at_prev_line$30.$$arity = 0); - - Opal.def(self, '$mark', $Reader_mark$31 = function $$mark() { - var self = this; - - return (self.mark = [self.file, self.dir, self.path, self.lineno]) - }, $Reader_mark$31.$$arity = 0); - - Opal.def(self, '$line_info', $Reader_line_info$32 = function $$line_info() { - var self = this; - - return "" + (self.path) + ": line " + (self.lineno) - }, $Reader_line_info$32.$$arity = 0); - - Opal.def(self, '$lines', $Reader_lines$33 = function $$lines() { - var self = this; - - return self.lines.$drop(0) - }, $Reader_lines$33.$$arity = 0); - - Opal.def(self, '$string', $Reader_string$34 = function $$string() { - var self = this; - - return self.lines.$join($$($nesting, 'LF')) - }, $Reader_string$34.$$arity = 0); - - Opal.def(self, '$source', $Reader_source$35 = function $$source() { - var self = this; - - return self.source_lines.$join($$($nesting, 'LF')) - }, $Reader_source$35.$$arity = 0); - - Opal.def(self, '$save', $Reader_save$36 = function $$save() { - var $$37, self = this; - - - self.saved = $send($hash2([], {}), 'tap', [], ($$37 = function(accum){var self = $$37.$$s || this, $$38; - - - - if (accum == null) { - accum = nil; - }; - return $send(self.$instance_variables(), 'each', [], ($$38 = function(name){var self = $$38.$$s || this, $a, $writer = nil, val = nil; - - - - if (name == null) { - name = nil; - }; - if ($truthy(($truthy($a = name['$==']("@saved")) ? $a : name['$==']("@source_lines")))) { - return nil - } else { - - $writer = [name, (function() {if ($truthy($$$('::', 'Array')['$===']((val = self.$instance_variable_get(name))))) { - - return val.$drop(0); - } else { - return val - }; return nil; })()]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - };}, $$38.$$s = self, $$38.$$arity = 1, $$38));}, $$37.$$s = self, $$37.$$arity = 1, $$37)); - return nil; - }, $Reader_save$36.$$arity = 0); - - Opal.def(self, '$restore_save', $Reader_restore_save$39 = function $$restore_save() { - var $$40, self = this; - - if ($truthy(self.saved)) { - - $send(self.saved, 'each', [], ($$40 = function(name, val){var self = $$40.$$s || this; - - - - if (name == null) { - name = nil; - }; - - if (val == null) { - val = nil; - }; - return self.$instance_variable_set(name, val);}, $$40.$$s = self, $$40.$$arity = 2, $$40)); - return (self.saved = nil); - } else { - return nil - } - }, $Reader_restore_save$39.$$arity = 0); - - Opal.def(self, '$discard_save', $Reader_discard_save$41 = function $$discard_save() { - var self = this; - - return (self.saved = nil) - }, $Reader_discard_save$41.$$arity = 0); - - Opal.def(self, '$to_s', $Reader_to_s$42 = function $$to_s() { - var self = this; - - return "" + "#<" + (self.$class()) + "@" + (self.$object_id()) + " {path: " + (self.path.$inspect()) + ", line: " + (self.lineno) + "}>" - }, $Reader_to_s$42.$$arity = 0); - self.$private(); - - Opal.def(self, '$prepare_lines', $Reader_prepare_lines$43 = function $$prepare_lines(data, opts) { - var self = this, normalize = nil, trim_end = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - try { - if ($truthy((normalize = opts['$[]']("normalize")))) { - - trim_end = (function() {if (normalize['$==']("chomp")) { - return false - } else { - return true - }; return nil; })(); - if ($truthy($$$('::', 'Array')['$==='](data))) { - - return $$($nesting, 'Helpers').$prepare_source_array(data, trim_end); - } else { - - return $$($nesting, 'Helpers').$prepare_source_string(data, trim_end); - }; - } else if ($truthy($$$('::', 'Array')['$==='](data))) { - return data.$drop(0) - } else if ($truthy(data)) { - return data.$chomp().$split($$($nesting, 'LF'), -1) - } else { - return [] - } - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - if ($truthy((function() {if ($truthy($$$('::', 'Array')['$==='](data))) { - return data.$join() - } else { - return data.$to_s() - }; return nil; })()['$valid_encoding?']())) { - return self.$raise() - } else { - return self.$raise($$$('::', 'ArgumentError'), "source is either binary or contains invalid Unicode data") - } - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - }, $Reader_prepare_lines$43.$$arity = -2); - return (Opal.def(self, '$process_line', $Reader_process_line$44 = function $$process_line(line) { - var self = this; - - - if ($truthy(self.process_lines)) { - self.look_ahead = $rb_plus(self.look_ahead, 1)}; - return line; - }, $Reader_process_line$44.$$arity = 1), nil) && 'process_line'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'PreprocessorReader'); - - var $nesting = [self].concat($parent_nesting), $PreprocessorReader_initialize$45, $PreprocessorReader_has_more_lines$ques$46, $PreprocessorReader_empty$ques$47, $PreprocessorReader_peek_line$48, $PreprocessorReader_push_include$49, $PreprocessorReader_include_depth$50, $PreprocessorReader_exceeds_max_depth$ques$51, $PreprocessorReader_shift$52, $PreprocessorReader_include_processors$ques$53, $PreprocessorReader_create_include_cursor$54, $PreprocessorReader_to_s$55, $PreprocessorReader_prepare_lines$57, $PreprocessorReader_process_line$58, $PreprocessorReader_preprocess_conditional_directive$59, $PreprocessorReader_preprocess_include_directive$64, $PreprocessorReader_resolve_include_path$77, $PreprocessorReader_pop_include$79, $PreprocessorReader_split_delimited_value$80, $PreprocessorReader_skip_front_matter$excl$81, $PreprocessorReader_resolve_expr_val$82; - - self.$$prototype.include_stack = self.$$prototype.lines = self.$$prototype.file = self.$$prototype.dir = self.$$prototype.path = self.$$prototype.lineno = self.$$prototype.maxdepth = self.$$prototype.process_lines = self.$$prototype.includes = self.$$prototype.document = self.$$prototype.unescape_next_line = self.$$prototype.include_processor_extensions = self.$$prototype.look_ahead = self.$$prototype.skipping = self.$$prototype.conditional_stack = nil; - - self.$attr_reader("include_stack"); - - Opal.def(self, '$initialize', $PreprocessorReader_initialize$45 = function $$initialize(document, data, cursor, opts) { - var $a, $iter = $PreprocessorReader_initialize$45.$$p, $yield = $iter || nil, self = this, default_include_depth = nil; - - if ($iter) $PreprocessorReader_initialize$45.$$p = null; - - - if (data == null) { - data = nil; - }; - - if (cursor == null) { - cursor = nil; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - self.document = document; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $PreprocessorReader_initialize$45, false), [data, cursor, opts], null); - if ($truthy($rb_gt((default_include_depth = ($truthy($a = document.$attributes()['$[]']("max-include-depth")) ? $a : 64).$to_i()), 0))) { - self.maxdepth = $hash2(["abs", "curr", "rel"], {"abs": default_include_depth, "curr": default_include_depth, "rel": default_include_depth}) - } else { - self.maxdepth = nil - }; - self.include_stack = []; - self.includes = document.$catalog()['$[]']("includes"); - self.skipping = false; - self.conditional_stack = []; - return (self.include_processor_extensions = nil); - }, $PreprocessorReader_initialize$45.$$arity = -2); - - Opal.def(self, '$has_more_lines?', $PreprocessorReader_has_more_lines$ques$46 = function() { - var self = this; - - if ($truthy(self.$peek_line())) { - return true - } else { - return false - } - }, $PreprocessorReader_has_more_lines$ques$46.$$arity = 0); - - Opal.def(self, '$empty?', $PreprocessorReader_empty$ques$47 = function() { - var self = this; - - if ($truthy(self.$peek_line())) { - return false - } else { - return true - } - }, $PreprocessorReader_empty$ques$47.$$arity = 0); - Opal.alias(self, "eof?", "empty?"); - - Opal.def(self, '$peek_line', $PreprocessorReader_peek_line$48 = function $$peek_line(direct) { - var $iter = $PreprocessorReader_peek_line$48.$$p, $yield = $iter || nil, self = this, line = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $PreprocessorReader_peek_line$48.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if (direct == null) { - direct = false; - }; - if ($truthy((line = $send(self, Opal.find_super_dispatcher(self, 'peek_line', $PreprocessorReader_peek_line$48, false), $zuper, $iter)))) { - return line - } else if ($truthy(self.include_stack['$empty?']())) { - return nil - } else { - - self.$pop_include(); - return self.$peek_line(direct); - }; - }, $PreprocessorReader_peek_line$48.$$arity = -1); - - Opal.def(self, '$push_include', $PreprocessorReader_push_include$49 = function $$push_include(data, file, path, lineno, attributes) { - var $a, self = this, $writer = nil, dir = nil, rel_maxdepth = nil, curr_maxdepth = nil, abs_maxdepth = nil, old_leveloffset = nil; - - - - if (file == null) { - file = nil; - }; - - if (path == null) { - path = nil; - }; - - if (lineno == null) { - lineno = 1; - }; - - if (attributes == null) { - attributes = $hash2([], {}); - }; - self.include_stack['$<<']([self.lines, self.file, self.dir, self.path, self.lineno, self.maxdepth, self.process_lines]); - if ($truthy((self.file = file))) { - - if ($truthy($$$('::', 'String')['$==='](file))) { - self.dir = $$$('::', 'File').$dirname(file) - } else if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) { - self.dir = $$$('::', 'URI').$parse($$$('::', 'File').$dirname((file = file.$to_s()))) - } else { - - - $writer = [(function() {if ((dir = $$$('::', 'File').$dirname(file.$path()))['$==']("/")) { - return "" - } else { - return dir - }; return nil; })()]; - $send((self.dir = file.$dup()), 'path=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - file = file.$to_s(); - }; - self.path = (path = ($truthy($a = path) ? $a : $$$('::', 'File').$basename(file))); - if ($truthy((self.process_lines = $send(file, 'end_with?', Opal.to_a($$($nesting, 'ASCIIDOC_EXTENSIONS').$keys()))))) { - - $writer = [path.$slice(0, path.$rindex(".")), (function() {if ($truthy(attributes['$[]']("partial-option"))) { - return nil - } else { - return true - }; return nil; })()]; - $send(self.includes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - } else { - - self.dir = "."; - self.process_lines = true; - if ($truthy((self.path = path))) { - - $writer = [$$($nesting, 'Helpers').$rootname(path), (function() {if ($truthy(attributes['$[]']("partial-option"))) { - return nil - } else { - return true - }; return nil; })()]; - $send(self.includes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - self.path = "<stdin>" - }; - }; - self.lineno = lineno; - if ($truthy(($truthy($a = self.maxdepth) ? attributes['$key?']("depth") : $a))) { - if ($truthy($rb_gt((rel_maxdepth = attributes['$[]']("depth").$to_i()), 0))) { - - if ($truthy($rb_gt((curr_maxdepth = $rb_plus(self.include_stack.$size(), rel_maxdepth)), (abs_maxdepth = self.maxdepth['$[]']("abs"))))) { - curr_maxdepth = (rel_maxdepth = abs_maxdepth)}; - self.maxdepth = $hash2(["abs", "curr", "rel"], {"abs": abs_maxdepth, "curr": curr_maxdepth, "rel": rel_maxdepth}); - } else { - self.maxdepth = $hash2(["abs", "curr", "rel"], {"abs": self.maxdepth['$[]']("abs"), "curr": self.include_stack.$size(), "rel": 0}) - }}; - if ($truthy((self.lines = self.$prepare_lines(data, $hash2(["normalize", "condense", "indent"], {"normalize": ($truthy($a = self.process_lines) ? $a : "chomp"), "condense": false, "indent": attributes['$[]']("indent")})))['$empty?']())) { - self.$pop_include() - } else { - - if ($truthy(attributes['$key?']("leveloffset"))) { - - self.lines.$unshift(""); - self.lines.$unshift("" + ":leveloffset: " + (attributes['$[]']("leveloffset"))); - self.lines['$<<'](""); - if ($truthy((old_leveloffset = self.document.$attr("leveloffset")))) { - self.lines['$<<']("" + ":leveloffset: " + (old_leveloffset)) - } else { - self.lines['$<<'](":leveloffset!:") - }; - self.lineno = $rb_minus(self.lineno, 2);}; - self.look_ahead = 0; - }; - return self; - }, $PreprocessorReader_push_include$49.$$arity = -2); - - Opal.def(self, '$include_depth', $PreprocessorReader_include_depth$50 = function $$include_depth() { - var self = this; - - return self.include_stack.$size() - }, $PreprocessorReader_include_depth$50.$$arity = 0); - - Opal.def(self, '$exceeds_max_depth?', $PreprocessorReader_exceeds_max_depth$ques$51 = function() { - var $a, $b, self = this; - - return ($truthy($a = ($truthy($b = self.maxdepth) ? $rb_ge(self.include_stack.$size(), self.maxdepth['$[]']("curr")) : $b)) ? self.maxdepth['$[]']("rel") : $a) - }, $PreprocessorReader_exceeds_max_depth$ques$51.$$arity = 0); - Opal.alias(self, "exceeded_max_depth?", "exceeds_max_depth?"); - - Opal.def(self, '$shift', $PreprocessorReader_shift$52 = function $$shift() { - var $iter = $PreprocessorReader_shift$52.$$p, $yield = $iter || nil, self = this, line = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $PreprocessorReader_shift$52.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if ($truthy(self.unescape_next_line)) { - - self.unescape_next_line = false; - return (line = $send(self, Opal.find_super_dispatcher(self, 'shift', $PreprocessorReader_shift$52, false), $zuper, $iter)).$slice(1, line.$length()); - } else { - return $send(self, Opal.find_super_dispatcher(self, 'shift', $PreprocessorReader_shift$52, false), $zuper, $iter) - } - }, $PreprocessorReader_shift$52.$$arity = 0); - - Opal.def(self, '$include_processors?', $PreprocessorReader_include_processors$ques$53 = function() { - var $a, self = this; - - if ($truthy(self.include_processor_extensions['$nil?']())) { - if ($truthy(($truthy($a = self.document['$extensions?']()) ? self.document.$extensions()['$include_processors?']() : $a))) { - return (self.include_processor_extensions = self.document.$extensions().$include_processors())['$!']()['$!']() - } else { - return (self.include_processor_extensions = false) - } - } else { - return self.include_processor_extensions['$!='](false) - } - }, $PreprocessorReader_include_processors$ques$53.$$arity = 0); - - Opal.def(self, '$create_include_cursor', $PreprocessorReader_create_include_cursor$54 = function $$create_include_cursor(file, path, lineno) { - var self = this, dir = nil; - - - if ($truthy($$$('::', 'String')['$==='](file))) { - dir = $$$('::', 'File').$dirname(file) - } else if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) { - dir = $$$('::', 'File').$dirname((file = file.$to_s())) - } else { - - dir = (function() {if ((dir = $$$('::', 'File').$dirname(file.$path()))['$==']("")) { - return "/" - } else { - return dir - }; return nil; })(); - file = file.$to_s(); - }; - return $$($nesting, 'Cursor').$new(file, dir, path, lineno); - }, $PreprocessorReader_create_include_cursor$54.$$arity = 3); - - Opal.def(self, '$to_s', $PreprocessorReader_to_s$55 = function $$to_s() { - var $$56, self = this; - - return "" + "#<" + (self.$class()) + "@" + (self.$object_id()) + " {path: " + (self.path.$inspect()) + ", line: " + (self.lineno) + ", include depth: " + (self.include_stack.$size()) + ", include stack: [" + ($send(self.include_stack, 'map', [], ($$56 = function(inc){var self = $$56.$$s || this; - - - - if (inc == null) { - inc = nil; - }; - return inc.$to_s();}, $$56.$$s = self, $$56.$$arity = 1, $$56)).$join(", ")) + "]}>" - }, $PreprocessorReader_to_s$55.$$arity = 0); - self.$private(); - - Opal.def(self, '$prepare_lines', $PreprocessorReader_prepare_lines$57 = function $$prepare_lines(data, opts) { - var $a, $b, $iter = $PreprocessorReader_prepare_lines$57.$$p, $yield = $iter || nil, self = this, result = nil, front_matter = nil, $writer = nil, last = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $PreprocessorReader_prepare_lines$57.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if (opts == null) { - opts = $hash2([], {}); - }; - result = $send(self, Opal.find_super_dispatcher(self, 'prepare_lines', $PreprocessorReader_prepare_lines$57, false), $zuper, $iter); - if ($truthy(($truthy($a = self.document) ? self.document.$attributes()['$[]']("skip-front-matter") : $a))) { - if ($truthy((front_matter = self['$skip_front_matter!'](result)))) { - - $writer = ["front-matter", front_matter.$join($$($nesting, 'LF'))]; - $send(self.document.$attributes(), '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}}; - if ($truthy(opts.$fetch("condense", true))) { - while ($truthy(($truthy($b = (last = result['$[]'](-1))) ? last['$empty?']() : $b))) { - result.$pop() - }}; - if ($truthy(opts['$[]']("indent"))) { - $$($nesting, 'Parser')['$adjust_indentation!'](result, opts['$[]']("indent").$to_i(), self.document.$attr("tabsize").$to_i())}; - return result; - }, $PreprocessorReader_prepare_lines$57.$$arity = -2); - - Opal.def(self, '$process_line', $PreprocessorReader_process_line$58 = function $$process_line(line) { - var $a, $b, self = this; - - - if ($truthy(self.process_lines)) { - } else { - return line - }; - if ($truthy(line['$empty?']())) { - - self.look_ahead = $rb_plus(self.look_ahead, 1); - return line;}; - if ($truthy(($truthy($a = ($truthy($b = line['$end_with?']("]")) ? line['$start_with?']("[")['$!']() : $b)) ? line['$include?']("::") : $a))) { - if ($truthy(($truthy($a = line['$include?']("if")) ? $$($nesting, 'ConditionalDirectiveRx')['$=~'](line) : $a))) { - if ((($a = $gvars['~']) === nil ? nil : $a['$[]'](1))['$==']("\\")) { - - self.unescape_next_line = true; - self.look_ahead = $rb_plus(self.look_ahead, 1); - return line.$slice(1, line.$length()); - } else if ($truthy(self.$preprocess_conditional_directive((($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](3)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](4)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](5))))) { - - self.$shift(); - return nil; - } else { - - self.look_ahead = $rb_plus(self.look_ahead, 1); - return line; - } - } else if ($truthy(self.skipping)) { - - self.$shift(); - return nil; - } else if ($truthy(($truthy($a = line['$start_with?']("inc", "\\inc")) ? $$($nesting, 'IncludeDirectiveRx')['$=~'](line) : $a))) { - if ((($a = $gvars['~']) === nil ? nil : $a['$[]'](1))['$==']("\\")) { - - self.unescape_next_line = true; - self.look_ahead = $rb_plus(self.look_ahead, 1); - return line.$slice(1, line.$length()); - } else if ($truthy(self.$preprocess_include_directive((($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](3))))) { - return nil - } else { - - self.look_ahead = $rb_plus(self.look_ahead, 1); - return line; - } - } else { - - self.look_ahead = $rb_plus(self.look_ahead, 1); - return line; - } - } else if ($truthy(self.skipping)) { - - self.$shift(); - return nil; - } else { - - self.look_ahead = $rb_plus(self.look_ahead, 1); - return line; - }; - }, $PreprocessorReader_process_line$58.$$arity = 1); - - Opal.def(self, '$preprocess_conditional_directive', $PreprocessorReader_preprocess_conditional_directive$59 = function $$preprocess_conditional_directive(keyword, target, delimiter, text) { - var $a, $$60, $$61, $$62, $$63, self = this, no_target = nil, pair = nil, skip = nil, $case = nil, lhs = nil, op = nil, rhs = nil; - - - if ($truthy((no_target = target['$empty?']()))) { - } else { - target = target.$downcase() - }; - if (keyword['$==']("endif")) { - - if ($truthy(text)) { - self.$logger().$error(self.$message_with_context("" + "malformed preprocessor directive - text not permitted: endif::" + (target) + "[" + (text) + "]", $hash2(["source_location"], {"source_location": self.$cursor()}))) - } else if ($truthy(self.conditional_stack['$empty?']())) { - self.$logger().$error(self.$message_with_context("" + "unmatched preprocessor directive: endif::" + (target) + "[]", $hash2(["source_location"], {"source_location": self.$cursor()}))) - } else if ($truthy(($truthy($a = no_target) ? $a : target['$==']((pair = self.conditional_stack['$[]'](-1))['$[]']("target"))))) { - - self.conditional_stack.$pop(); - self.skipping = (function() {if ($truthy(self.conditional_stack['$empty?']())) { - return false - } else { - return self.conditional_stack['$[]'](-1)['$[]']("skipping") - }; return nil; })(); - } else { - self.$logger().$error(self.$message_with_context("" + "mismatched preprocessor directive: endif::" + (target) + "[], expected endif::" + (pair['$[]']("target")) + "[]", $hash2(["source_location"], {"source_location": self.$cursor()}))) - }; - return true; - } else if ($truthy(self.skipping)) { - skip = false - } else { - $case = keyword; - if ("ifdef"['$===']($case)) { - if ($truthy(no_target)) { - - self.$logger().$error(self.$message_with_context("" + "malformed preprocessor directive - missing target: ifdef::[" + (text) + "]", $hash2(["source_location"], {"source_location": self.$cursor()}))); - return true;}; - $case = delimiter; - if (","['$===']($case)) {skip = $send(target.$split(",", -1), 'none?', [], ($$60 = function(name){var self = $$60.$$s || this; - if (self.document == null) self.document = nil; - - - - if (name == null) { - name = nil; - }; - return self.document.$attributes()['$key?'](name);}, $$60.$$s = self, $$60.$$arity = 1, $$60))} - else if ("+"['$===']($case)) {skip = $send(target.$split("+", -1), 'any?', [], ($$61 = function(name){var self = $$61.$$s || this; - if (self.document == null) self.document = nil; - - - - if (name == null) { - name = nil; - }; - return self.document.$attributes()['$key?'](name)['$!']();}, $$61.$$s = self, $$61.$$arity = 1, $$61))} - else {skip = self.document.$attributes()['$key?'](target)['$!']()};} - else if ("ifndef"['$===']($case)) { - if ($truthy(no_target)) { - - self.$logger().$error(self.$message_with_context("" + "malformed preprocessor directive - missing target: ifndef::[" + (text) + "]", $hash2(["source_location"], {"source_location": self.$cursor()}))); - return true;}; - $case = delimiter; - if (","['$===']($case)) {skip = $send(target.$split(",", -1), 'any?', [], ($$62 = function(name){var self = $$62.$$s || this; - if (self.document == null) self.document = nil; - - - - if (name == null) { - name = nil; - }; - return self.document.$attributes()['$key?'](name);}, $$62.$$s = self, $$62.$$arity = 1, $$62))} - else if ("+"['$===']($case)) {skip = $send(target.$split("+", -1), 'all?', [], ($$63 = function(name){var self = $$63.$$s || this; - if (self.document == null) self.document = nil; - - - - if (name == null) { - name = nil; - }; - return self.document.$attributes()['$key?'](name);}, $$63.$$s = self, $$63.$$arity = 1, $$63))} - else {skip = self.document.$attributes()['$key?'](target)};} - else if ("ifeval"['$===']($case)) {if ($truthy(no_target)) { - if ($truthy(($truthy($a = text) ? $$($nesting, 'EvalExpressionRx')['$=~'](text.$strip()) : $a))) { - - lhs = (($a = $gvars['~']) === nil ? nil : $a['$[]'](1)); - op = (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)); - rhs = (($a = $gvars['~']) === nil ? nil : $a['$[]'](3)); - skip = (function() {if ($truthy(self.$resolve_expr_val(lhs).$send(op, self.$resolve_expr_val(rhs)))) { - return false - } else { - return true - }; return nil; })(); - } else { - - self.$logger().$error(self.$message_with_context("" + "malformed preprocessor directive - " + ((function() {if ($truthy(text)) { - return "invalid expression" - } else { - return "missing expression" - }; return nil; })()) + ": ifeval::[" + (text) + "]", $hash2(["source_location"], {"source_location": self.$cursor()}))); - return true; - } - } else { - - self.$logger().$error(self.$message_with_context("" + "malformed preprocessor directive - target not permitted: ifeval::" + (target) + "[" + (text) + "]", $hash2(["source_location"], {"source_location": self.$cursor()}))); - return true; - }} - }; - if ($truthy(($truthy($a = keyword['$==']("ifeval")) ? $a : text['$!']()))) { - - if ($truthy(skip)) { - self.skipping = true}; - self.conditional_stack['$<<']($hash2(["target", "skip", "skipping"], {"target": target, "skip": skip, "skipping": self.skipping})); - } else if ($truthy(($truthy($a = self.skipping) ? $a : skip))) { - } else { - - self.$replace_next_line(text.$rstrip()); - self.$unshift(""); - if ($truthy(text['$start_with?']("include::"))) { - self.look_ahead = $rb_minus(self.look_ahead, 1)}; - }; - return true; - }, $PreprocessorReader_preprocess_conditional_directive$59.$$arity = 4); - - Opal.def(self, '$preprocess_include_directive', $PreprocessorReader_preprocess_include_directive$64 = function $$preprocess_include_directive(target, attrlist) { - var $a, $b, $$65, $$66, $$67, $$68, $$69, $$70, $$72, $$75, $$76, self = this, doc = nil, expanded_target = nil, attr_missing = nil, ext = nil, parsed_attrs = nil, inc_path = nil, target_type = nil, relpath = nil, reader = nil, read_mode = nil, enc = nil, $writer = nil, read_mode_params = nil, inc_linenos = nil, inc_tags = nil, tag = nil, inc_lines = nil, inc_offset = nil, inc_lineno = nil, tag_stack = nil, tags_used = nil, active_tag = nil, select = nil, base_select = nil, wildcard = nil, missing_tags = nil, inc_content = nil; - - - doc = self.document; - if ($truthy(($truthy($a = (expanded_target = target)['$include?']($$($nesting, 'ATTR_REF_HEAD'))) ? (expanded_target = doc.$sub_attributes(target, $hash2(["attribute_missing"], {"attribute_missing": (function() {if ((attr_missing = ($truthy($b = doc.$attributes()['$[]']("attribute-missing")) ? $b : $$($nesting, 'Compliance').$attribute_missing()))['$==']("warn")) { - return "drop-line" - } else { - return attr_missing - }; return nil; })()})))['$empty?']() : $a))) { - if ($truthy((($a = attr_missing['$==']("drop-line")) ? doc.$sub_attributes($rb_plus(target, " "), $hash2(["attribute_missing", "drop_line_severity"], {"attribute_missing": "drop-line", "drop_line_severity": "ignore"}))['$empty?']() : attr_missing['$==']("drop-line")))) { - - $send(self.$logger(), 'info', [], ($$65 = function(){var self = $$65.$$s || this; - - return self.$message_with_context("" + "include dropped due to missing attribute: include::" + (target) + "[" + (attrlist) + "]", $hash2(["source_location"], {"source_location": self.$cursor()}))}, $$65.$$s = self, $$65.$$arity = 0, $$65)); - self.$shift(); - return true; - } else if ($truthy(doc.$parse_attributes(attrlist, [], $hash2(["sub_input"], {"sub_input": true}))['$[]']("optional-option"))) { - - $send(self.$logger(), 'info', [], ($$66 = function(){var self = $$66.$$s || this, $c; - - return self.$message_with_context("" + "optional include dropped " + ((function() {if ($truthy((($c = attr_missing['$==']("warn")) ? doc.$sub_attributes($rb_plus(target, " "), $hash2(["attribute_missing", "drop_line_severity"], {"attribute_missing": "drop-line", "drop_line_severity": "ignore"}))['$empty?']() : attr_missing['$==']("warn")))) { - return "due to missing attribute" - } else { - return "because resolved target is blank" - }; return nil; })()) + ": include::" + (target) + "[" + (attrlist) + "]", $hash2(["source_location"], {"source_location": self.$cursor()}))}, $$66.$$s = self, $$66.$$arity = 0, $$66)); - self.$shift(); - return true; - } else { - - self.$logger().$warn(self.$message_with_context("" + "include dropped " + ((function() {if ($truthy((($a = attr_missing['$==']("warn")) ? doc.$sub_attributes($rb_plus(target, " "), $hash2(["attribute_missing", "drop_line_severity"], {"attribute_missing": "drop-line", "drop_line_severity": "ignore"}))['$empty?']() : attr_missing['$==']("warn")))) { - return "due to missing attribute" - } else { - return "because resolved target is blank" - }; return nil; })()) + ": include::" + (target) + "[" + (attrlist) + "]", $hash2(["source_location"], {"source_location": self.$cursor()}))); - return self.$replace_next_line("" + "Unresolved directive in " + (self.path) + " - include::" + (target) + "[" + (attrlist) + "]"); - } - } else if ($truthy(($truthy($a = self['$include_processors?']()) ? (ext = $send(self.include_processor_extensions, 'find', [], ($$67 = function(candidate){var self = $$67.$$s || this; - - - - if (candidate == null) { - candidate = nil; - }; - return candidate.$instance()['$handles?'](expanded_target);}, $$67.$$s = self, $$67.$$arity = 1, $$67))) : $a))) { - - self.$shift(); - ext.$process_method()['$[]'](doc, self, expanded_target, doc.$parse_attributes(attrlist, [], $hash2(["sub_input"], {"sub_input": true}))); - return true; - } else if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')))) { - return self.$replace_next_line("" + "link:" + (expanded_target) + "[]") - } else if ($truthy(self.maxdepth)) { - - if ($truthy($rb_ge(self.include_stack.$size(), self.maxdepth['$[]']("curr")))) { - - self.$logger().$error(self.$message_with_context("" + "maximum include depth of " + (self.maxdepth['$[]']("rel")) + " exceeded", $hash2(["source_location"], {"source_location": self.$cursor()}))); - return nil;}; - parsed_attrs = doc.$parse_attributes(attrlist, [], $hash2(["sub_input"], {"sub_input": true})); - $b = self.$resolve_include_path(expanded_target, attrlist, parsed_attrs), $a = Opal.to_ary($b), (inc_path = ($a[0] == null ? nil : $a[0])), (target_type = ($a[1] == null ? nil : $a[1])), (relpath = ($a[2] == null ? nil : $a[2])), $b; - if (target_type['$==']("file")) { - - reader = $$$('::', 'File').$method("open"); - read_mode = $$($nesting, 'FILE_READ_MODE'); - } else if (target_type['$==']("uri")) { - - reader = $$$('::', 'OpenURI').$method("open_uri"); - read_mode = $$($nesting, 'URI_READ_MODE'); - } else { - return inc_path - }; - if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) { - } else if ($truthy(($truthy($a = (enc = parsed_attrs['$[]']("encoding"))) ? (function() { try { - return $$$('::', 'Encoding').$find(enc) - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return nil - } finally { Opal.pop_exception() } - } else { throw $err; } - }})() : $a))) { - - - $writer = [1, enc]; - $send((read_mode_params = read_mode.$split(":")), '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - read_mode = read_mode_params.$join(":");}; - inc_linenos = (inc_tags = nil); - if ($truthy(attrlist)) { - if ($truthy(parsed_attrs['$key?']("lines"))) { - - inc_linenos = []; - $send(self.$split_delimited_value(parsed_attrs['$[]']("lines")), 'each', [], ($$68 = function(linedef){var self = $$68.$$s || this, $c, $d, from = nil, _ = nil, to = nil; - - - - if (linedef == null) { - linedef = nil; - }; - if ($truthy(linedef['$include?'](".."))) { - - $d = linedef.$partition(".."), $c = Opal.to_ary($d), (from = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (to = ($c[2] == null ? nil : $c[2])), $d; - return (inc_linenos = $rb_plus(inc_linenos, (function() {if ($truthy(($truthy($c = to['$empty?']()) ? $c : $rb_lt((to = to.$to_i()), 0)))) { - return [from.$to_i(), $rb_divide(1, 0)] - } else { - return Opal.Range.$new(from.$to_i(), to, false).$to_a() - }; return nil; })())); - } else { - return inc_linenos['$<<'](linedef.$to_i()) - };}, $$68.$$s = self, $$68.$$arity = 1, $$68)); - inc_linenos = (function() {if ($truthy(inc_linenos['$empty?']())) { - return nil - } else { - return inc_linenos.$sort().$uniq() - }; return nil; })(); - } else if ($truthy(parsed_attrs['$key?']("tag"))) { - if ($truthy(($truthy($a = (tag = parsed_attrs['$[]']("tag"))['$empty?']()) ? $a : tag['$==']("!")))) { - } else { - inc_tags = (function() {if ($truthy(tag['$start_with?']("!"))) { - return $hash(tag.$slice(1, tag.$length()), false) - } else { - return $hash(tag, true) - }; return nil; })() - } - } else if ($truthy(parsed_attrs['$key?']("tags"))) { - - inc_tags = $hash2([], {}); - $send(self.$split_delimited_value(parsed_attrs['$[]']("tags")), 'each', [], ($$69 = function(tagdef){var self = $$69.$$s || this, $c; - - - - if (tagdef == null) { - tagdef = nil; - }; - if ($truthy(($truthy($c = tagdef['$empty?']()) ? $c : tagdef['$==']("!")))) { - return nil - } else if ($truthy(tagdef['$start_with?']("!"))) { - - $writer = [tagdef.$slice(1, tagdef.$length()), false]; - $send(inc_tags, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = [tagdef, true]; - $send(inc_tags, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - };}, $$69.$$s = self, $$69.$$arity = 1, $$69)); - if ($truthy(inc_tags['$empty?']())) { - inc_tags = nil};}}; - if ($truthy(inc_linenos)) { - - $a = [[], nil, 0], (inc_lines = $a[0]), (inc_offset = $a[1]), (inc_lineno = $a[2]), $a; - - try { - (function(){var $brk = Opal.new_brk(); try {return $send(reader, 'call', [inc_path, read_mode], ($$70 = function(f){var self = $$70.$$s || this, $$71, select_remaining = nil; - - - - if (f == null) { - f = nil; - }; - select_remaining = nil; - return (function(){var $brk = Opal.new_brk(); try {return $send(f, 'each_line', [], ($$71 = function(l){var self = $$71.$$s || this, $c, $d, select = nil; - - - - if (l == null) { - l = nil; - }; - inc_lineno = $rb_plus(inc_lineno, 1); - if ($truthy(($truthy($c = select_remaining) ? $c : ($truthy($d = $$$('::', 'Float')['$===']((select = inc_linenos['$[]'](0)))) ? (select_remaining = select['$infinite?']()) : $d)))) { - - inc_offset = ($truthy($c = inc_offset) ? $c : inc_lineno); - return inc_lines['$<<'](l); - } else { - - if (select['$=='](inc_lineno)) { - - inc_offset = ($truthy($c = inc_offset) ? $c : inc_lineno); - inc_lines['$<<'](l); - inc_linenos.$shift();}; - if ($truthy(inc_linenos['$empty?']())) { - - Opal.brk(nil, $brk) - } else { - return nil - }; - };}, $$71.$$s = self, $$71.$$brk = $brk, $$71.$$arity = 1, $$71)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})();}, $$70.$$s = self, $$70.$$brk = $brk, $$70.$$arity = 1, $$70)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})() - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - - self.$logger().$error(self.$message_with_context("" + "include " + (target_type) + " not readable: " + (inc_path), $hash2(["source_location"], {"source_location": self.$cursor()}))); - return self.$replace_next_line("" + "Unresolved directive in " + (self.path) + " - include::" + (expanded_target) + "[" + (attrlist) + "]"); - } finally { Opal.pop_exception() } - } else { throw $err; } - };; - self.$shift(); - if ($truthy(inc_offset)) { - - - $writer = ["partial-option", ""]; - $send(parsed_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - self.$push_include(inc_lines, inc_path, relpath, inc_offset, parsed_attrs);}; - } else if ($truthy(inc_tags)) { - - $a = [[], nil, 0, [], $$$('::', 'Set').$new(), nil], (inc_lines = $a[0]), (inc_offset = $a[1]), (inc_lineno = $a[2]), (tag_stack = $a[3]), (tags_used = $a[4]), (active_tag = $a[5]), $a; - if ($truthy(inc_tags['$key?']("**"))) { - if ($truthy(inc_tags['$key?']("*"))) { - - select = (base_select = inc_tags.$delete("**")); - wildcard = inc_tags.$delete("*"); - } else { - select = (base_select = (wildcard = inc_tags.$delete("**"))) - } - } else if ($truthy(inc_tags['$key?']("*"))) { - select = (base_select = (wildcard = inc_tags.$delete("*"))['$!']()) - } else { - select = (base_select = false) - }; - - try { - $send(reader, 'call', [inc_path, read_mode], ($$72 = function(f){var self = $$72.$$s || this, $c, $$73, dbl_co = nil, dbl_sb = nil; - - - - if (f == null) { - f = nil; - }; - $c = ["::", "[]"], (dbl_co = $c[0]), (dbl_sb = $c[1]), $c; - return $send(f, 'each_line', [], ($$73 = function(l){var self = $$73.$$s || this, $d, $e, $$74, this_tag = nil, include_cursor = nil, idx = nil; - - - - if (l == null) { - l = nil; - }; - inc_lineno = $rb_plus(inc_lineno, 1); - if ($truthy(($truthy($d = ($truthy($e = l['$include?'](dbl_co)) ? l['$include?'](dbl_sb) : $e)) ? $$($nesting, 'TagDirectiveRx')['$=~'](l) : $d))) { - - this_tag = (($d = $gvars['~']) === nil ? nil : $d['$[]'](2)); - if ($truthy((($d = $gvars['~']) === nil ? nil : $d['$[]'](1)))) { - if (this_tag['$=='](active_tag)) { - - tag_stack.$pop(); - return $e = (function() {if ($truthy(tag_stack['$empty?']())) { - return [nil, base_select] - } else { - return tag_stack['$[]'](-1) - }; return nil; })(), $d = Opal.to_ary($e), (active_tag = ($d[0] == null ? nil : $d[0])), (select = ($d[1] == null ? nil : $d[1])), $e; - } else if ($truthy(inc_tags['$key?'](this_tag))) { - - include_cursor = self.$create_include_cursor(inc_path, expanded_target, inc_lineno); - if ($truthy((idx = $send(tag_stack, 'rindex', [], ($$74 = function(key){var self = $$74.$$s || this; - - - - if (key == null) { - key = nil; - }; - return key['$=='](this_tag);}, $$74.$$s = self, $$74.$$arity = 1, $$74.$$has_trailing_comma_in_args = true, $$74))))) { - - if (idx['$=='](0)) { - tag_stack.$shift() - } else { - - tag_stack.$delete_at(idx); - }; - return self.$logger().$warn(self.$message_with_context("" + "mismatched end tag (expected '" + (active_tag) + "' but found '" + (this_tag) + "') at line " + (inc_lineno) + " of include " + (target_type) + ": " + (inc_path), $hash2(["source_location", "include_location"], {"source_location": self.$cursor(), "include_location": include_cursor}))); - } else { - return self.$logger().$warn(self.$message_with_context("" + "unexpected end tag '" + (this_tag) + "' at line " + (inc_lineno) + " of include " + (target_type) + ": " + (inc_path), $hash2(["source_location", "include_location"], {"source_location": self.$cursor(), "include_location": include_cursor}))) - }; - } else { - return nil - } - } else if ($truthy(inc_tags['$key?'](this_tag))) { - - tags_used['$<<'](this_tag); - return tag_stack['$<<']([(active_tag = this_tag), (select = inc_tags['$[]'](this_tag)), inc_lineno]); - } else if ($truthy(wildcard['$nil?']()['$!']())) { - - select = (function() {if ($truthy(($truthy($d = active_tag) ? select['$!']() : $d))) { - return false - } else { - return wildcard - }; return nil; })(); - return tag_stack['$<<']([(active_tag = this_tag), select, inc_lineno]); - } else { - return nil - }; - } else if ($truthy(select)) { - - inc_offset = ($truthy($d = inc_offset) ? $d : inc_lineno); - return inc_lines['$<<'](l); - } else { - return nil - };}, $$73.$$s = self, $$73.$$arity = 1, $$73));}, $$72.$$s = self, $$72.$$arity = 1, $$72)) - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - - self.$logger().$error(self.$message_with_context("" + "include " + (target_type) + " not readable: " + (inc_path), $hash2(["source_location"], {"source_location": self.$cursor()}))); - return self.$replace_next_line("" + "Unresolved directive in " + (self.path) + " - include::" + (expanded_target) + "[" + (attrlist) + "]"); - } finally { Opal.pop_exception() } - } else { throw $err; } - };; - if ($truthy(tag_stack['$empty?']())) { - } else { - $send(tag_stack, 'each', [], ($$75 = function(tag_name, _, tag_lineno){var self = $$75.$$s || this; - - - - if (tag_name == null) { - tag_name = nil; - }; - - if (_ == null) { - _ = nil; - }; - - if (tag_lineno == null) { - tag_lineno = nil; - }; - return self.$logger().$warn(self.$message_with_context("" + "detected unclosed tag '" + (tag_name) + "' starting at line " + (tag_lineno) + " of include " + (target_type) + ": " + (inc_path), $hash2(["source_location", "include_location"], {"source_location": self.$cursor(), "include_location": self.$create_include_cursor(inc_path, expanded_target, tag_lineno)})));}, $$75.$$s = self, $$75.$$arity = 3, $$75)) - }; - if ($truthy((missing_tags = $rb_minus(inc_tags.$keys(), tags_used.$to_a()))['$empty?']())) { - } else { - self.$logger().$warn(self.$message_with_context("" + "tag" + ((function() {if ($truthy($rb_gt(missing_tags.$size(), 1))) { - return "s" - } else { - return "" - }; return nil; })()) + " '" + (missing_tags.$join(", ")) + "' not found in include " + (target_type) + ": " + (inc_path), $hash2(["source_location"], {"source_location": self.$cursor()}))) - }; - self.$shift(); - if ($truthy(inc_offset)) { - - if ($truthy(($truthy($a = ($truthy($b = base_select) ? wildcard : $b)) ? inc_tags['$empty?']() : $a))) { - } else { - - $writer = ["partial-option", ""]; - $send(parsed_attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - self.$push_include(inc_lines, inc_path, relpath, inc_offset, parsed_attrs);}; - } else { - - try { - - inc_content = $send(reader, 'call', [inc_path, read_mode], ($$76 = function(f){var self = $$76.$$s || this; - - - - if (f == null) { - f = nil; - }; - return f.$read();}, $$76.$$s = self, $$76.$$arity = 1, $$76)); - self.$shift(); - self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs); - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - - self.$logger().$error(self.$message_with_context("" + "include " + (target_type) + " not readable: " + (inc_path), $hash2(["source_location"], {"source_location": self.$cursor()}))); - return self.$replace_next_line("" + "Unresolved directive in " + (self.path) + " - include::" + (expanded_target) + "[" + (attrlist) + "]"); - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - }; - return true; - } else { - return nil - }; - }, $PreprocessorReader_preprocess_include_directive$64.$$arity = 2); - - Opal.def(self, '$resolve_include_path', $PreprocessorReader_resolve_include_path$77 = function $$resolve_include_path(target, attrlist, attributes) { - var $a, $b, $$78, self = this, doc = nil, inc_path = nil, relpath = nil; - - - doc = self.document; - if ($truthy(($truthy($a = $$($nesting, 'Helpers')['$uriish?'](target)) ? $a : (function() {if ($truthy($$$('::', 'String')['$==='](self.dir))) { - return nil - } else { - - return (target = "" + (self.dir) + "/" + (target)); - }; return nil; })()))) { - - if ($truthy(doc['$attr?']("allow-uri-read"))) { - } else { - return self.$replace_next_line("" + "link:" + (target) + "[" + (attrlist) + "]") - }; - if ($truthy(doc['$attr?']("cache-uri"))) { - if ($truthy((($b = $$$('::', 'OpenURI', 'skip_raise')) && ($a = $$$($b, 'Cache', 'skip_raise')) ? 'constant' : nil))) { - } else { - $$($nesting, 'Helpers').$require_library("open-uri/cached", "open-uri-cached") - } - } else if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL')['$!']())) { - $$$('::', 'OpenURI')}; - return [$$$('::', 'URI').$parse(target), "uri", target]; - } else { - - inc_path = doc.$normalize_system_path(target, self.dir, nil, $hash2(["target_name"], {"target_name": "include file"})); - if ($truthy($$$('::', 'File')['$file?'](inc_path))) { - } else if ($truthy(attributes['$[]']("optional-option"))) { - - $send(self.$logger(), 'info', [], ($$78 = function(){var self = $$78.$$s || this; - - return self.$message_with_context("" + "optional include dropped because include file not found: " + (inc_path), $hash2(["source_location"], {"source_location": self.$cursor()}))}, $$78.$$s = self, $$78.$$arity = 0, $$78)); - self.$shift(); - return true; - } else { - - self.$logger().$error(self.$message_with_context("" + "include file not found: " + (inc_path), $hash2(["source_location"], {"source_location": self.$cursor()}))); - return self.$replace_next_line("" + "Unresolved directive in " + (self.path) + " - include::" + (target) + "[" + (attrlist) + "]"); - }; - relpath = doc.$path_resolver().$relative_path(inc_path, doc.$base_dir()); - return [inc_path, "file", relpath]; - }; - }, $PreprocessorReader_resolve_include_path$77.$$arity = 3); - - Opal.def(self, '$pop_include', $PreprocessorReader_pop_include$79 = function $$pop_include() { - var $a, $b, self = this; - - if ($truthy($rb_gt(self.include_stack.$size(), 0))) { - - $b = self.include_stack.$pop(), $a = Opal.to_ary($b), (self.lines = ($a[0] == null ? nil : $a[0])), (self.file = ($a[1] == null ? nil : $a[1])), (self.dir = ($a[2] == null ? nil : $a[2])), (self.path = ($a[3] == null ? nil : $a[3])), (self.lineno = ($a[4] == null ? nil : $a[4])), (self.maxdepth = ($a[5] == null ? nil : $a[5])), (self.process_lines = ($a[6] == null ? nil : $a[6])), $b; - self.look_ahead = 0; - return nil; - } else { - return nil - } - }, $PreprocessorReader_pop_include$79.$$arity = 0); - - Opal.def(self, '$split_delimited_value', $PreprocessorReader_split_delimited_value$80 = function $$split_delimited_value(val) { - var self = this; - - if ($truthy(val['$include?'](","))) { - - return val.$split(","); - } else { - - return val.$split(";"); - } - }, $PreprocessorReader_split_delimited_value$80.$$arity = 1); - - Opal.def(self, '$skip_front_matter!', $PreprocessorReader_skip_front_matter$excl$81 = function(data, increment_linenos) { - var $a, $b, self = this, front_matter = nil, original_data = nil; - - - - if (increment_linenos == null) { - increment_linenos = true; - }; - front_matter = nil; - if (data['$[]'](0)['$==']("---")) { - - original_data = data.$drop(0); - data.$shift(); - front_matter = []; - if ($truthy(increment_linenos)) { - self.lineno = $rb_plus(self.lineno, 1)}; - while ($truthy(($truthy($b = data['$empty?']()['$!']()) ? data['$[]'](0)['$!=']("---") : $b))) { - - front_matter['$<<'](data.$shift()); - if ($truthy(increment_linenos)) { - self.lineno = $rb_plus(self.lineno, 1)}; - }; - if ($truthy(data['$empty?']())) { - - $send(data, 'unshift', Opal.to_a(original_data)); - if ($truthy(increment_linenos)) { - self.lineno = 0}; - front_matter = nil; - } else { - - data.$shift(); - if ($truthy(increment_linenos)) { - self.lineno = $rb_plus(self.lineno, 1)}; - };}; - return front_matter; - }, $PreprocessorReader_skip_front_matter$excl$81.$$arity = -2); - return (Opal.def(self, '$resolve_expr_val', $PreprocessorReader_resolve_expr_val$82 = function $$resolve_expr_val(val) { - var $a, $b, self = this, quoted = nil; - - - if ($truthy(($truthy($a = ($truthy($b = val['$start_with?']("\"")) ? val['$end_with?']("\"") : $b)) ? $a : ($truthy($b = val['$start_with?']("'")) ? val['$end_with?']("'") : $b)))) { - - quoted = true; - val = val.$slice(1, $rb_minus(val.$length(), 1)); - } else { - quoted = false - }; - if ($truthy(val['$include?']($$($nesting, 'ATTR_REF_HEAD')))) { - val = self.document.$sub_attributes(val, $hash2(["attribute_missing"], {"attribute_missing": "drop"}))}; - if ($truthy(quoted)) { - return val - } else if ($truthy(val['$empty?']())) { - return nil - } else if (val['$==']("true")) { - return true - } else if (val['$==']("false")) { - return false - } else if ($truthy(val.$rstrip()['$empty?']())) { - return " " - } else if ($truthy(val['$include?']("."))) { - return val.$to_f() - } else { - return val.$to_i() - }; - }, $PreprocessorReader_resolve_expr_val$82.$$arity = 1), nil) && 'resolve_expr_val'; - })($nesting[0], $$($nesting, 'Reader'), $nesting); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/section"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy; - - Opal.add_stubs(['$attr_accessor', '$attr_reader', '$===', '$+', '$level', '$special', '$generate_id', '$title', '$==', '$>', '$sectnum', '$reftext', '$!', '$empty?', '$sub_placeholder', '$sub_quotes', '$compat_mode', '$[]', '$attributes', '$context', '$assign_numeral', '$class', '$object_id', '$inspect', '$size', '$length', '$chr', '$[]=', '$-', '$gsub', '$downcase', '$delete', '$tr_s', '$end_with?', '$chop', '$start_with?', '$slice', '$key?', '$catalog', '$unique_id_start_index']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Section'); - - var $nesting = [self].concat($parent_nesting), $Section_initialize$1, $Section_generate_id$2, $Section_sectnum$3, $Section_xreftext$4, $Section_$lt$lt$5, $Section_to_s$6, $Section_generate_id$7; - - self.$$prototype.document = self.$$prototype.level = self.$$prototype.parent = self.$$prototype.numeral = self.$$prototype.numbered = self.$$prototype.sectname = self.$$prototype.title = self.$$prototype.blocks = nil; - - self.$attr_accessor("index"); - self.$attr_accessor("sectname"); - self.$attr_accessor("special"); - self.$attr_accessor("numbered"); - self.$attr_reader("caption"); - - Opal.def(self, '$initialize', $Section_initialize$1 = function $$initialize(parent, level, numbered, opts) { - var $a, $b, $iter = $Section_initialize$1.$$p, $yield = $iter || nil, self = this; - - if ($iter) $Section_initialize$1.$$p = null; - - - if (parent == null) { - parent = nil; - }; - - if (level == null) { - level = nil; - }; - - if (numbered == null) { - numbered = false; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $Section_initialize$1, false), [parent, "section", opts], null); - if ($truthy($$($nesting, 'Section')['$==='](parent))) { - $a = [($truthy($b = level) ? $b : $rb_plus(parent.$level(), 1)), parent.$special()], (self.level = $a[0]), (self.special = $a[1]), $a - } else { - $a = [($truthy($b = level) ? $b : 1), false], (self.level = $a[0]), (self.special = $a[1]), $a - }; - self.numbered = numbered; - return (self.index = 0); - }, $Section_initialize$1.$$arity = -1); - Opal.alias(self, "name", "title"); - - Opal.def(self, '$generate_id', $Section_generate_id$2 = function $$generate_id() { - var self = this; - - return $$($nesting, 'Section').$generate_id(self.$title(), self.document) - }, $Section_generate_id$2.$$arity = 0); - - Opal.def(self, '$sectnum', $Section_sectnum$3 = function $$sectnum(delimiter, append) { - var $a, self = this; - - - - if (delimiter == null) { - delimiter = "."; - }; - - if (append == null) { - append = nil; - }; - append = ($truthy($a = append) ? $a : (function() {if (append['$=='](false)) { - return "" - } else { - return delimiter - }; return nil; })()); - if ($truthy(($truthy($a = $rb_gt(self.level, 1)) ? $$($nesting, 'Section')['$==='](self.parent) : $a))) { - return "" + (self.parent.$sectnum(delimiter, delimiter)) + (self.numeral) + (append) - } else { - return "" + (self.numeral) + (append) - }; - }, $Section_sectnum$3.$$arity = -1); - - Opal.def(self, '$xreftext', $Section_xreftext$4 = function $$xreftext(xrefstyle) { - var $a, self = this, val = nil, $case = nil, type = nil, quoted_title = nil, signifier = nil; - - - - if (xrefstyle == null) { - xrefstyle = nil; - }; - if ($truthy(($truthy($a = (val = self.$reftext())) ? val['$empty?']()['$!']() : $a))) { - return val - } else if ($truthy(xrefstyle)) { - if ($truthy(self.numbered)) { - return (function() {$case = xrefstyle; - if ("full"['$===']($case)) { - if ($truthy(($truthy($a = (type = self.sectname)['$==']("chapter")) ? $a : type['$==']("appendix")))) { - quoted_title = self.$sub_placeholder(self.$sub_quotes("_%s_"), self.$title()) - } else { - quoted_title = self.$sub_placeholder(self.$sub_quotes((function() {if ($truthy(self.document.$compat_mode())) { - return "``%s''" - } else { - return "\"`%s`\"" - }; return nil; })()), self.$title()) - }; - if ($truthy((signifier = self.document.$attributes()['$[]']("" + (type) + "-refsig")))) { - return "" + (signifier) + " " + (self.$sectnum(".", ",")) + " " + (quoted_title) - } else { - return "" + (self.$sectnum(".", ",")) + " " + (quoted_title) - };} - else if ("short"['$===']($case)) {if ($truthy((signifier = self.document.$attributes()['$[]']("" + (self.sectname) + "-refsig")))) { - return "" + (signifier) + " " + (self.$sectnum(".", "")) - } else { - return self.$sectnum(".", "") - }} - else {if ($truthy(($truthy($a = (type = self.sectname)['$==']("chapter")) ? $a : type['$==']("appendix")))) { - - return self.$sub_placeholder(self.$sub_quotes("_%s_"), self.$title()); - } else { - return self.$title() - }}})() - } else if ($truthy(($truthy($a = (type = self.sectname)['$==']("chapter")) ? $a : type['$==']("appendix")))) { - - return self.$sub_placeholder(self.$sub_quotes("_%s_"), self.$title()); - } else { - return self.$title() - } - } else { - return self.$title() - }; - }, $Section_xreftext$4.$$arity = -1); - - Opal.def(self, '$<<', $Section_$lt$lt$5 = function(block) { - var $iter = $Section_$lt$lt$5.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Section_$lt$lt$5.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - if (block.$context()['$==']("section")) { - self.$assign_numeral(block)}; - return $send(self, Opal.find_super_dispatcher(self, '<<', $Section_$lt$lt$5, false), $zuper, $iter); - }, $Section_$lt$lt$5.$$arity = 1); - - Opal.def(self, '$to_s', $Section_to_s$6 = function $$to_s() { - var $iter = $Section_to_s$6.$$p, $yield = $iter || nil, self = this, formal_title = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Section_to_s$6.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if ($truthy(self.title)) { - - formal_title = (function() {if ($truthy(self.numbered)) { - return "" + (self.$sectnum()) + " " + (self.title) - } else { - return self.title - }; return nil; })(); - return "" + "#<" + (self.$class()) + "@" + (self.$object_id()) + " {level: " + (self.level) + ", title: " + (formal_title.$inspect()) + ", blocks: " + (self.blocks.$size()) + "}>"; - } else { - return $send(self, Opal.find_super_dispatcher(self, 'to_s', $Section_to_s$6, false), $zuper, $iter) - } - }, $Section_to_s$6.$$arity = 0); - return (Opal.defs(self, '$generate_id', $Section_generate_id$7 = function $$generate_id(title, document) { - var $a, $b, self = this, attrs = nil, pre = nil, sep = nil, no_sep = nil, $writer = nil, sep_sub = nil, gen_id = nil, ids = nil, cnt = nil, candidate_id = nil; - - - attrs = document.$attributes(); - pre = ($truthy($a = attrs['$[]']("idprefix")) ? $a : "_"); - if ($truthy((sep = attrs['$[]']("idseparator")))) { - if ($truthy(($truthy($a = sep.$length()['$=='](1)) ? $a : ($truthy($b = (no_sep = sep['$empty?']())['$!']()) ? (sep = (($writer = ["idseparator", sep.$chr()]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) : $b)))) { - sep_sub = (function() {if ($truthy(($truthy($a = sep['$==']("-")) ? $a : sep['$=='](".")))) { - return " .-" - } else { - return "" + " " + (sep) + ".-" - }; return nil; })()} - } else { - $a = ["_", " _.-"], (sep = $a[0]), (sep_sub = $a[1]), $a - }; - gen_id = "" + (pre) + (title.$downcase().$gsub($$($nesting, 'InvalidSectionIdCharsRx'), "")); - if ($truthy(no_sep)) { - gen_id = gen_id.$delete(" ") - } else { - - gen_id = gen_id.$tr_s(sep_sub, sep); - if ($truthy(gen_id['$end_with?'](sep))) { - gen_id = gen_id.$chop()}; - if ($truthy(($truthy($a = pre['$empty?']()) ? gen_id['$start_with?'](sep) : $a))) { - gen_id = gen_id.$slice(1, gen_id.$length())}; - }; - if ($truthy(document.$catalog()['$[]']("refs")['$key?'](gen_id))) { - - ids = document.$catalog()['$[]']("refs"); - cnt = $$($nesting, 'Compliance').$unique_id_start_index(); - while ($truthy(ids['$[]']((candidate_id = "" + (gen_id) + (sep) + (cnt))))) { - cnt = $rb_plus(cnt, 1) - }; - return candidate_id; - } else { - return gen_id - }; - }, $Section_generate_id$7.$$arity = 2), nil) && 'generate_id'; - })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/stylesheets"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy, $hash2 = Opal.hash2; - - Opal.add_stubs(['$join', '$new', '$rstrip', '$read', '$primary_stylesheet_data', '$write', '$primary_stylesheet_name', '$stylesheet_basename', '$for', '$read_stylesheet', '$coderay_stylesheet_data', '$coderay_stylesheet_name', '$pygments_stylesheet_data', '$pygments_stylesheet_name']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Stylesheets'); - - var $nesting = [self].concat($parent_nesting), $Stylesheets_instance$1, $Stylesheets_primary_stylesheet_name$2, $Stylesheets_primary_stylesheet_data$3, $Stylesheets_embed_primary_stylesheet$4, $Stylesheets_write_primary_stylesheet$5, $Stylesheets_coderay_stylesheet_name$6, $Stylesheets_coderay_stylesheet_data$7, $Stylesheets_embed_coderay_stylesheet$8, $Stylesheets_write_coderay_stylesheet$9, $Stylesheets_pygments_stylesheet_name$10, $Stylesheets_pygments_stylesheet_data$11, $Stylesheets_embed_pygments_stylesheet$12, $Stylesheets_write_pygments_stylesheet$13; - - self.$$prototype.primary_stylesheet_data = nil; - - Opal.const_set($nesting[0], 'DEFAULT_STYLESHEET_NAME', "asciidoctor.css"); - Opal.const_set($nesting[0], 'STYLESHEETS_DIR', $$$('::', 'File').$join($$($nesting, 'DATA_DIR'), "stylesheets")); - self.__instance__ = self.$new(); - Opal.defs(self, '$instance', $Stylesheets_instance$1 = function $$instance() { - var self = this; - if (self.__instance__ == null) self.__instance__ = nil; - - return self.__instance__ - }, $Stylesheets_instance$1.$$arity = 0); - - Opal.def(self, '$primary_stylesheet_name', $Stylesheets_primary_stylesheet_name$2 = function $$primary_stylesheet_name() { - var self = this; - - return $$($nesting, 'DEFAULT_STYLESHEET_NAME') - }, $Stylesheets_primary_stylesheet_name$2.$$arity = 0); - - Opal.def(self, '$primary_stylesheet_data', $Stylesheets_primary_stylesheet_data$3 = function $$primary_stylesheet_data() { - var $a, self = this; - - return (self.primary_stylesheet_data = ($truthy($a = self.primary_stylesheet_data) ? $a : $$$('::', 'File').$read($$$('::', 'File').$join($$($nesting, 'STYLESHEETS_DIR'), "asciidoctor-default.css"), $hash2(["mode"], {"mode": $$($nesting, 'FILE_READ_MODE')})).$rstrip())) - }, $Stylesheets_primary_stylesheet_data$3.$$arity = 0); - - Opal.def(self, '$embed_primary_stylesheet', $Stylesheets_embed_primary_stylesheet$4 = function $$embed_primary_stylesheet() { - var self = this; - - return "" + "<style>\n" + (self.$primary_stylesheet_data()) + "\n" + "</style>" - }, $Stylesheets_embed_primary_stylesheet$4.$$arity = 0); - - Opal.def(self, '$write_primary_stylesheet', $Stylesheets_write_primary_stylesheet$5 = function $$write_primary_stylesheet(target_dir) { - var self = this; - - - - if (target_dir == null) { - target_dir = "."; - }; - return $$$('::', 'File').$write($$$('::', 'File').$join(target_dir, self.$primary_stylesheet_name()), self.$primary_stylesheet_data(), $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')})); - }, $Stylesheets_write_primary_stylesheet$5.$$arity = -1); - - Opal.def(self, '$coderay_stylesheet_name', $Stylesheets_coderay_stylesheet_name$6 = function $$coderay_stylesheet_name() { - var self = this; - - return $$($nesting, 'SyntaxHighlighter').$for("coderay").$stylesheet_basename() - }, $Stylesheets_coderay_stylesheet_name$6.$$arity = 0); - - Opal.def(self, '$coderay_stylesheet_data', $Stylesheets_coderay_stylesheet_data$7 = function $$coderay_stylesheet_data() { - var self = this; - - return $$($nesting, 'SyntaxHighlighter').$for("coderay").$read_stylesheet() - }, $Stylesheets_coderay_stylesheet_data$7.$$arity = 0); - - Opal.def(self, '$embed_coderay_stylesheet', $Stylesheets_embed_coderay_stylesheet$8 = function $$embed_coderay_stylesheet() { - var self = this; - - return "" + "<style>\n" + (self.$coderay_stylesheet_data()) + "\n" + "</style>" - }, $Stylesheets_embed_coderay_stylesheet$8.$$arity = 0); - - Opal.def(self, '$write_coderay_stylesheet', $Stylesheets_write_coderay_stylesheet$9 = function $$write_coderay_stylesheet(target_dir) { - var self = this; - - - - if (target_dir == null) { - target_dir = "."; - }; - return $$$('::', 'File').$write($$$('::', 'File').$join(target_dir, self.$coderay_stylesheet_name()), self.$coderay_stylesheet_data(), $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')})); - }, $Stylesheets_write_coderay_stylesheet$9.$$arity = -1); - - Opal.def(self, '$pygments_stylesheet_name', $Stylesheets_pygments_stylesheet_name$10 = function $$pygments_stylesheet_name(style) { - var self = this; - - - - if (style == null) { - style = nil; - }; - return $$($nesting, 'SyntaxHighlighter').$for("pygments").$stylesheet_basename(style); - }, $Stylesheets_pygments_stylesheet_name$10.$$arity = -1); - - Opal.def(self, '$pygments_stylesheet_data', $Stylesheets_pygments_stylesheet_data$11 = function $$pygments_stylesheet_data(style) { - var self = this; - - - - if (style == null) { - style = nil; - }; - return $$($nesting, 'SyntaxHighlighter').$for("pygments").$read_stylesheet(style); - }, $Stylesheets_pygments_stylesheet_data$11.$$arity = -1); - - Opal.def(self, '$embed_pygments_stylesheet', $Stylesheets_embed_pygments_stylesheet$12 = function $$embed_pygments_stylesheet(style) { - var self = this; - - - - if (style == null) { - style = nil; - }; - return "" + "<style>\n" + (self.$pygments_stylesheet_data(style)) + "\n" + "</style>"; - }, $Stylesheets_embed_pygments_stylesheet$12.$$arity = -1); - return (Opal.def(self, '$write_pygments_stylesheet', $Stylesheets_write_pygments_stylesheet$13 = function $$write_pygments_stylesheet(target_dir, style) { - var self = this; - - - - if (target_dir == null) { - target_dir = "."; - }; - - if (style == null) { - style = nil; - }; - return $$$('::', 'File').$write($$$('::', 'File').$join(target_dir, self.$pygments_stylesheet_name(style)), self.$pygments_stylesheet_data(style), $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')})); - }, $Stylesheets_write_pygments_stylesheet$13.$$arity = -1), nil) && 'write_pygments_stylesheet'; - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/table"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - function $rb_divide(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs / rhs : lhs['$/'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy, $gvars = Opal.gvars; - - Opal.add_stubs(['$attr_accessor', '$attr_reader', '$new', '$[]', '$>', '$to_i', '$<', '$==', '$[]=', '$-', '$attributes', '$truncate', '$*', '$/', '$to_f', '$empty?', '$body', '$each', '$<<', '$size', '$+', '$assign_column_widths', '$warn', '$logger', '$update_attributes', '$assign_width', '$round', '$map', '$shift', '$reinitialize', '$head=', '$nil?', '$unshift', '$pop', '$foot=', '$parent', '$sourcemap', '$dup', '$header_row?', '$table', '$style', '$merge', '$delete', '$start_with?', '$rstrip', '$slice', '$length', '$advance', '$lstrip', '$strip', '$split', '$include?', '$readlines', '$catalog_inline_anchor', '$=~', '$apply_subs', '$convert', '$text', '$!=', '$file', '$lineno', '$to_s', '$include', '$to_set', '$mark', '$key?', '$nested?', '$document', '$error', '$message_with_context', '$cursor_at_prev_line', '$nil_or_empty?', '$escape', '$columns', '$match', '$chop', '$end_with?', '$gsub', '$!', '$push_cellspec', '$cell_open?', '$close_cell', '$take_cellspec', '$squeeze', '$upto', '$times', '$cursor_before_mark', '$rowspan', '$activate_rowspan', '$colspan', '$end_of_row?', '$close_row', '$private', '$rows', '$effective_column_visits']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Table'); - - var $nesting = [self].concat($parent_nesting), $Table_initialize$4, $Table_header_row$ques$5, $Table_create_columns$6, $Table_assign_column_widths$8, $Table_partition_header_footer$12; - - self.$$prototype.attributes = self.$$prototype.document = self.$$prototype.has_header_option = self.$$prototype.rows = self.$$prototype.columns = nil; - - Opal.const_set($nesting[0], 'DEFAULT_PRECISION', 4); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Rows'); - - var $nesting = [self].concat($parent_nesting), $Rows_initialize$1, $Rows_by_section$2, $Rows_to_h$3; - - self.$$prototype.head = self.$$prototype.body = self.$$prototype.foot = nil; - - self.$attr_accessor("head", "foot", "body"); - - Opal.def(self, '$initialize', $Rows_initialize$1 = function $$initialize(head, foot, body) { - var self = this; - - - - if (head == null) { - head = []; - }; - - if (foot == null) { - foot = []; - }; - - if (body == null) { - body = []; - }; - self.head = head; - self.foot = foot; - return (self.body = body); - }, $Rows_initialize$1.$$arity = -1); - Opal.alias(self, "[]", "send"); - - Opal.def(self, '$by_section', $Rows_by_section$2 = function $$by_section() { - var self = this; - - return [["head", self.head], ["body", self.body], ["foot", self.foot]] - }, $Rows_by_section$2.$$arity = 0); - return (Opal.def(self, '$to_h', $Rows_to_h$3 = function $$to_h() { - var self = this; - - return $hash2(["head", "body", "foot"], {"head": self.head, "body": self.body, "foot": self.foot}) - }, $Rows_to_h$3.$$arity = 0), nil) && 'to_h'; - })($nesting[0], null, $nesting); - self.$attr_accessor("columns"); - self.$attr_accessor("rows"); - self.$attr_accessor("has_header_option"); - self.$attr_reader("caption"); - - Opal.def(self, '$initialize', $Table_initialize$4 = function $$initialize(parent, attributes) { - var $a, $b, $iter = $Table_initialize$4.$$p, $yield = $iter || nil, self = this, pcwidth = nil, pcwidth_intval = nil, $writer = nil, abswidth_val = nil; - - if ($iter) $Table_initialize$4.$$p = null; - - $send(self, Opal.find_super_dispatcher(self, 'initialize', $Table_initialize$4, false), [parent, "table"], null); - self.rows = $$($nesting, 'Rows').$new(); - self.columns = []; - self.has_header_option = false; - if ($truthy((pcwidth = attributes['$[]']("width")))) { - if ($truthy(($truthy($a = $rb_gt((pcwidth_intval = pcwidth.$to_i()), 100)) ? $a : $rb_lt(pcwidth_intval, 1)))) { - if ($truthy((($a = pcwidth_intval['$=='](0)) ? ($truthy($b = pcwidth['$==']("0")) ? $b : pcwidth['$==']("0%")) : pcwidth_intval['$=='](0)))) { - } else { - pcwidth_intval = 100 - }} - } else { - pcwidth_intval = 100 - }; - - $writer = ["tablepcwidth", pcwidth_intval]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(self.document.$attributes()['$[]']("pagewidth"))) { - - $writer = ["tableabswidth", (function() {if ((abswidth_val = $rb_times($rb_divide(pcwidth_intval, 100), self.document.$attributes()['$[]']("pagewidth").$to_f()).$truncate($$($nesting, 'DEFAULT_PRECISION')))['$=='](abswidth_val.$to_i())) { - return abswidth_val.$to_i() - } else { - return abswidth_val - }; return nil; })()]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(attributes['$[]']("rotate-option"))) { - - $writer = ["orientation", "landscape"]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - return nil - }; - }, $Table_initialize$4.$$arity = 2); - - Opal.def(self, '$header_row?', $Table_header_row$ques$5 = function() { - var $a, self = this, val = nil; - - if ($truthy(($truthy($a = (val = self.has_header_option)) ? self.rows.$body()['$empty?']() : $a))) { - return val - } else { - return nil - } - }, $Table_header_row$ques$5.$$arity = 0); - - Opal.def(self, '$create_columns', $Table_create_columns$6 = function $$create_columns(colspecs) { - var $$7, $a, self = this, cols = nil, autowidth_cols = nil, width_base = nil, num_cols = nil, $writer = nil; - - - cols = []; - autowidth_cols = nil; - width_base = 0; - $send(colspecs, 'each', [], ($$7 = function(colspec){var self = $$7.$$s || this, $a, colwidth = nil; - - - - if (colspec == null) { - colspec = nil; - }; - colwidth = colspec['$[]']("width"); - cols['$<<']($$($nesting, 'Column').$new(self, cols.$size(), colspec)); - if ($truthy($rb_lt(colwidth, 0))) { - return (autowidth_cols = ($truthy($a = autowidth_cols) ? $a : []))['$<<'](cols['$[]'](-1)) - } else { - return (width_base = $rb_plus(width_base, colwidth)) - };}, $$7.$$s = self, $$7.$$arity = 1, $$7)); - if ($truthy($rb_gt((num_cols = (self.columns = cols).$size()), 0))) { - - - $writer = ["colcount", num_cols]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(($truthy($a = $rb_gt(width_base, 0)) ? $a : autowidth_cols))) { - } else { - width_base = nil - }; - self.$assign_column_widths(width_base, autowidth_cols);}; - return nil; - }, $Table_create_columns$6.$$arity = 1); - - Opal.def(self, '$assign_column_widths', $Table_assign_column_widths$8 = function $$assign_column_widths(width_base, autowidth_cols) { - var $$9, $$10, $$11, self = this, precision = nil, total_width = nil, col_pcwidth = nil, autowidth = nil, autowidth_attrs = nil; - - - - if (width_base == null) { - width_base = nil; - }; - - if (autowidth_cols == null) { - autowidth_cols = nil; - }; - precision = $$($nesting, 'DEFAULT_PRECISION'); - total_width = (col_pcwidth = 0); - if ($truthy(width_base)) { - - if ($truthy(autowidth_cols)) { - - if ($truthy($rb_gt(width_base, 100))) { - - autowidth = 0; - self.$logger().$warn("" + "total column width must not exceed 100% when using autowidth columns; got " + (width_base) + "%"); - } else { - - autowidth = $rb_divide($rb_minus(100, width_base), autowidth_cols.$size()).$truncate(precision); - if (autowidth.$to_i()['$=='](autowidth)) { - autowidth = autowidth.$to_i()}; - width_base = 100; - }; - autowidth_attrs = $hash2(["width", "autowidth-option"], {"width": autowidth, "autowidth-option": ""}); - $send(autowidth_cols, 'each', [], ($$9 = function(col){var self = $$9.$$s || this; - - - - if (col == null) { - col = nil; - }; - return col.$update_attributes(autowidth_attrs);}, $$9.$$s = self, $$9.$$arity = 1, $$9));}; - $send(self.columns, 'each', [], ($$10 = function(col){var self = $$10.$$s || this; - - - - if (col == null) { - col = nil; - }; - return (total_width = $rb_plus(total_width, (col_pcwidth = col.$assign_width(nil, width_base, precision))));}, $$10.$$s = self, $$10.$$arity = 1, $$10)); - } else { - - col_pcwidth = $rb_divide(100, self.columns.$size()).$truncate(precision); - if (col_pcwidth.$to_i()['$=='](col_pcwidth)) { - col_pcwidth = col_pcwidth.$to_i()}; - $send(self.columns, 'each', [], ($$11 = function(col){var self = $$11.$$s || this; - - - - if (col == null) { - col = nil; - }; - return (total_width = $rb_plus(total_width, col.$assign_width(col_pcwidth, nil, precision)));}, $$11.$$s = self, $$11.$$arity = 1, $$11)); - }; - if (total_width['$=='](100)) { - } else { - self.columns['$[]'](-1).$assign_width($rb_plus($rb_minus(100, total_width), col_pcwidth).$round(precision), nil, precision) - }; - return nil; - }, $Table_assign_column_widths$8.$$arity = -1); - return (Opal.def(self, '$partition_header_footer', $Table_partition_header_footer$12 = function $$partition_header_footer(attrs) { - var $$13, $$14, $a, self = this, num_body_rows = nil, $writer = nil, body = nil; - - - num_body_rows = (($writer = ["rowcount", (body = self.rows.$body()).$size()]), $send(self.attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]); - if ($truthy($rb_gt(num_body_rows, 0))) { - if ($truthy(self.has_header_option)) { - - - $writer = [[$send(body.$shift(), 'map', [], ($$13 = function(cell){var self = $$13.$$s || this; - - - - if (cell == null) { - cell = nil; - }; - return cell.$reinitialize(true);}, $$13.$$s = self, $$13.$$arity = 1, $$13))]]; - $send(self.rows, 'head=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - num_body_rows = $rb_minus(num_body_rows, 1); - } else if ($truthy(self.has_header_option['$nil?']())) { - - self.has_header_option = false; - body.$unshift($send(body.$shift(), 'map', [], ($$14 = function(cell){var self = $$14.$$s || this; - - - - if (cell == null) { - cell = nil; - }; - return cell.$reinitialize(false);}, $$14.$$s = self, $$14.$$arity = 1, $$14)));}}; - if ($truthy(($truthy($a = $rb_gt(num_body_rows, 0)) ? attrs['$[]']("footer-option") : $a))) { - - $writer = [[body.$pop()]]; - $send(self.rows, 'foot=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return nil; - }, $Table_partition_header_footer$12.$$arity = 1), nil) && 'partition_header_footer'; - })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Column'); - - var $nesting = [self].concat($parent_nesting), $Column_initialize$15, $Column_assign_width$16, $Column_block$ques$17, $Column_inline$ques$18; - - self.$$prototype.attributes = nil; - - self.$attr_accessor("style"); - - Opal.def(self, '$initialize', $Column_initialize$15 = function $$initialize(table, index, attributes) { - var $a, $iter = $Column_initialize$15.$$p, $yield = $iter || nil, self = this, $writer = nil; - - if ($iter) $Column_initialize$15.$$p = null; - - - if (attributes == null) { - attributes = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $Column_initialize$15, false), [table, "table_column"], null); - self.style = attributes['$[]']("style"); - - $writer = ["colnumber", $rb_plus(index, 1)]; - $send(attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - ($truthy($a = attributes['$[]']("width")) ? $a : (($writer = ["width", 1]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - ($truthy($a = attributes['$[]']("halign")) ? $a : (($writer = ["halign", "left"]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - ($truthy($a = attributes['$[]']("valign")) ? $a : (($writer = ["valign", "top"]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - return self.$update_attributes(attributes); - }, $Column_initialize$15.$$arity = -3); - Opal.alias(self, "table", "parent"); - - Opal.def(self, '$assign_width', $Column_assign_width$16 = function $$assign_width(col_pcwidth, width_base, precision) { - var self = this, $writer = nil, col_abswidth = nil; - - - if ($truthy(width_base)) { - - col_pcwidth = $rb_divide($rb_times(self.attributes['$[]']("width").$to_f(), 100), width_base).$truncate(precision); - if (col_pcwidth.$to_i()['$=='](col_pcwidth)) { - col_pcwidth = col_pcwidth.$to_i()};}; - if ($truthy(self.$parent().$attributes()['$[]']("tableabswidth"))) { - - $writer = ["colabswidth", (function() {if ((col_abswidth = $rb_times($rb_divide(col_pcwidth, 100), self.$parent().$attributes()['$[]']("tableabswidth")).$truncate(precision))['$=='](col_abswidth.$to_i())) { - return col_abswidth.$to_i() - } else { - return col_abswidth - }; return nil; })()]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - - $writer = ["colpcwidth", col_pcwidth]; - $send(self.attributes, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - }, $Column_assign_width$16.$$arity = 3); - - Opal.def(self, '$block?', $Column_block$ques$17 = function() { - var self = this; - - return false - }, $Column_block$ques$17.$$arity = 0); - return (Opal.def(self, '$inline?', $Column_inline$ques$18 = function() { - var self = this; - - return false - }, $Column_inline$ques$18.$$arity = 0), nil) && 'inline?'; - })($$($nesting, 'Table'), $$($nesting, 'AbstractNode'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Cell'); - - var $nesting = [self].concat($parent_nesting), $Cell_initialize$19, $Cell_reinitialize$20, $Cell_catalog_inline_anchor$21, $Cell_text$22, $Cell_text$eq$23, $Cell_content$24, $Cell_lines$26, $Cell_source$27, $Cell_file$28, $Cell_lineno$29, $Cell_to_s$30; - - self.$$prototype.document = self.$$prototype.reinitialize_args = self.$$prototype.attributes = self.$$prototype.cursor = self.$$prototype.text = self.$$prototype.subs = self.$$prototype.style = self.$$prototype.inner_document = self.$$prototype.source_location = self.$$prototype.colspan = self.$$prototype.rowspan = nil; - - Opal.const_set($nesting[0], 'DOUBLE_LF', $rb_times($$($nesting, 'LF'), 2)); - self.$attr_accessor("colspan"); - self.$attr_accessor("rowspan"); - Opal.alias(self, "column", "parent"); - self.$attr_reader("inner_document"); - - Opal.def(self, '$initialize', $Cell_initialize$19 = function $$initialize(column, cell_text, attributes, opts) { - var $a, $b, $c, $iter = $Cell_initialize$19.$$p, $yield = $iter || nil, self = this, in_header_row = nil, cell_style = nil, asciidoc = nil, inner_document_cursor = nil, lines_advanced = nil, literal = nil, normal_psv = nil, parent_doctitle = nil, inner_document_lines = nil, unprocessed_line1 = nil, preprocessed_lines = nil, $writer = nil; - - if ($iter) $Cell_initialize$19.$$p = null; - - - if (attributes == null) { - attributes = $hash2([], {}); - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $Cell_initialize$19, false), [column, "table_cell"], null); - self.cursor = (self.reinitialize_args = nil); - if ($truthy(self.document.$sourcemap())) { - self.source_location = opts['$[]']("cursor").$dup()}; - if ($truthy(column)) { - - if ($truthy((in_header_row = column.$table()['$header_row?']()))) { - if ($truthy((($a = in_header_row['$==']("implicit")) ? (cell_style = ($truthy($b = column.$style()) ? $b : ($truthy($c = attributes) ? attributes['$[]']("style") : $c))) : in_header_row['$==']("implicit")))) { - - if ($truthy(($truthy($a = cell_style['$==']("asciidoc")) ? $a : cell_style['$==']("literal")))) { - self.reinitialize_args = [column, cell_text, ($truthy($a = attributes) ? attributes.$merge() : $a), opts]}; - cell_style = nil;} - } else { - cell_style = column.$style() - }; - self.$update_attributes(column.$attributes());}; - if ($truthy(attributes)) { - - if ($truthy(attributes['$empty?']())) { - self.colspan = (self.rowspan = nil) - } else { - - $a = [attributes.$delete("colspan"), attributes.$delete("rowspan")], (self.colspan = $a[0]), (self.rowspan = $a[1]), $a; - if ($truthy(in_header_row)) { - } else { - cell_style = ($truthy($a = attributes['$[]']("style")) ? $a : cell_style) - }; - self.$update_attributes(attributes); - }; - if (cell_style['$==']("asciidoc")) { - - asciidoc = true; - inner_document_cursor = opts['$[]']("cursor"); - if ($truthy((cell_text = cell_text.$rstrip())['$start_with?']($$($nesting, 'LF')))) { - - lines_advanced = 1; - while ($truthy((cell_text = cell_text.$slice(1, cell_text.$length()))['$start_with?']($$($nesting, 'LF')))) { - lines_advanced = $rb_plus(lines_advanced, 1) - }; - inner_document_cursor.$advance(lines_advanced); - } else { - cell_text = cell_text.$lstrip() - }; - } else if (cell_style['$==']("literal")) { - - literal = true; - cell_text = cell_text.$rstrip(); - while ($truthy(cell_text['$start_with?']($$($nesting, 'LF')))) { - cell_text = cell_text.$slice(1, cell_text.$length()) - }; - } else { - - normal_psv = true; - cell_text = (function() {if ($truthy(cell_text)) { - return cell_text.$strip() - } else { - return "" - }; return nil; })(); - }; - } else { - - self.colspan = (self.rowspan = nil); - if (cell_style['$==']("asciidoc")) { - - asciidoc = true; - inner_document_cursor = opts['$[]']("cursor");}; - }; - if ($truthy(asciidoc)) { - - parent_doctitle = self.document.$attributes().$delete("doctitle"); - inner_document_lines = cell_text.$split($$($nesting, 'LF'), -1); - if ($truthy(inner_document_lines['$empty?']())) { - } else if ($truthy((unprocessed_line1 = inner_document_lines['$[]'](0))['$include?']("::"))) { - - preprocessed_lines = $$($nesting, 'PreprocessorReader').$new(self.document, [unprocessed_line1]).$readlines(); - if ($truthy((($a = unprocessed_line1['$=='](preprocessed_lines['$[]'](0))) ? $rb_lt(preprocessed_lines.$size(), 2) : unprocessed_line1['$=='](preprocessed_lines['$[]'](0))))) { - } else { - - inner_document_lines.$shift(); - if ($truthy(preprocessed_lines['$empty?']())) { - } else { - $send(inner_document_lines, 'unshift', Opal.to_a(preprocessed_lines)) - }; - };}; - self.inner_document = $$($nesting, 'Document').$new(inner_document_lines, $hash2(["standalone", "parent", "cursor"], {"standalone": false, "parent": self.document, "cursor": inner_document_cursor})); - if ($truthy(parent_doctitle['$nil?']())) { - } else { - - $writer = ["doctitle", parent_doctitle]; - $send(self.document.$attributes(), '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - self.subs = nil; - } else if ($truthy(literal)) { - - self.content_model = "verbatim"; - self.subs = $$($nesting, 'BASIC_SUBS'); - } else { - - if ($truthy(normal_psv)) { - if ($truthy(in_header_row)) { - self.cursor = opts['$[]']("cursor") - } else { - self.$catalog_inline_anchor(cell_text, opts['$[]']("cursor")) - }}; - self.content_model = "simple"; - self.subs = $$($nesting, 'NORMAL_SUBS'); - }; - self.text = cell_text; - return (self.style = cell_style); - }, $Cell_initialize$19.$$arity = -3); - - Opal.def(self, '$reinitialize', $Cell_reinitialize$20 = function $$reinitialize(has_header) { - var self = this; - - - if ($truthy(has_header)) { - self.reinitialize_args = nil - } else if ($truthy(self.reinitialize_args)) { - return $send($$$($$($nesting, 'Table'), 'Cell'), 'new', Opal.to_a(self.reinitialize_args)) - } else { - self.style = self.attributes['$[]']("style") - }; - if ($truthy(self.cursor)) { - self.$catalog_inline_anchor()}; - return self; - }, $Cell_reinitialize$20.$$arity = 1); - - Opal.def(self, '$catalog_inline_anchor', $Cell_catalog_inline_anchor$21 = function $$catalog_inline_anchor(cell_text, cursor) { - var $a, self = this; - - - - if (cell_text == null) { - cell_text = self.text; - }; - - if (cursor == null) { - cursor = nil; - }; - if ($truthy(cursor)) { - } else { - $a = [self.cursor, nil], (cursor = $a[0]), (self.cursor = $a[1]), $a - }; - if ($truthy(($truthy($a = cell_text['$start_with?']("[[")) ? $$($nesting, 'LeadingInlineAnchorRx')['$=~'](cell_text) : $a))) { - return $$($nesting, 'Parser').$catalog_inline_anchor((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), self, cursor, self.document) - } else { - return nil - }; - }, $Cell_catalog_inline_anchor$21.$$arity = -1); - - Opal.def(self, '$text', $Cell_text$22 = function $$text() { - var self = this; - - return self.$apply_subs(self.text, self.subs) - }, $Cell_text$22.$$arity = 0); - - Opal.def(self, '$text=', $Cell_text$eq$23 = function(val) { - var self = this; - - return (self.text = val) - }, $Cell_text$eq$23.$$arity = 1); - - Opal.def(self, '$content', $Cell_content$24 = function $$content() { - var $$25, $a, self = this, cell_style = nil, subbed_text = nil; - - if ((cell_style = self.style)['$==']("asciidoc")) { - return self.inner_document.$convert() - } else if ($truthy(self.text['$include?']($$($nesting, 'DOUBLE_LF')))) { - return $send(self.$text().$split($$($nesting, 'BlankLineRx')), 'map', [], ($$25 = function(para){var self = $$25.$$s || this, $a; - - - - if (para == null) { - para = nil; - }; - if ($truthy(($truthy($a = cell_style) ? cell_style['$!=']("header") : $a))) { - return $$($nesting, 'Inline').$new(self.$parent(), "quoted", para, $hash2(["type"], {"type": cell_style})).$convert() - } else { - return para - };}, $$25.$$s = self, $$25.$$arity = 1, $$25)) - } else if ($truthy((subbed_text = self.$text())['$empty?']())) { - return [] - } else if ($truthy(($truthy($a = cell_style) ? cell_style['$!=']("header") : $a))) { - return [$$($nesting, 'Inline').$new(self.$parent(), "quoted", subbed_text, $hash2(["type"], {"type": cell_style})).$convert()] - } else { - return [subbed_text] - } - }, $Cell_content$24.$$arity = 0); - - Opal.def(self, '$lines', $Cell_lines$26 = function $$lines() { - var self = this; - - return self.text.$split($$($nesting, 'LF')) - }, $Cell_lines$26.$$arity = 0); - - Opal.def(self, '$source', $Cell_source$27 = function $$source() { - var self = this; - - return self.text - }, $Cell_source$27.$$arity = 0); - - Opal.def(self, '$file', $Cell_file$28 = function $$file() { - var $a, self = this; - - return ($truthy($a = self.source_location) ? self.source_location.$file() : $a) - }, $Cell_file$28.$$arity = 0); - - Opal.def(self, '$lineno', $Cell_lineno$29 = function $$lineno() { - var $a, self = this; - - return ($truthy($a = self.source_location) ? self.source_location.$lineno() : $a) - }, $Cell_lineno$29.$$arity = 0); - return (Opal.def(self, '$to_s', $Cell_to_s$30 = function $$to_s() { - var $a, $iter = $Cell_to_s$30.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Cell_to_s$30.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - return "" + ($send(self, Opal.find_super_dispatcher(self, 'to_s', $Cell_to_s$30, false), $zuper, $iter).$to_s()) + " - [text: " + (self.text) + ", colspan: " + (($truthy($a = self.colspan) ? $a : 1)) + ", rowspan: " + (($truthy($a = self.rowspan) ? $a : 1)) + ", attributes: " + (self.attributes) + "]" - }, $Cell_to_s$30.$$arity = 0), nil) && 'to_s'; - })($$($nesting, 'Table'), $$($nesting, 'AbstractBlock'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'ParserContext'); - - var $nesting = [self].concat($parent_nesting), $ParserContext_initialize$31, $ParserContext_starts_with_delimiter$ques$32, $ParserContext_match_delimiter$33, $ParserContext_skip_past_delimiter$34, $ParserContext_skip_past_escaped_delimiter$35, $ParserContext_buffer_has_unclosed_quotes$ques$36, $ParserContext_take_cellspec$37, $ParserContext_push_cellspec$38, $ParserContext_keep_cell_open$39, $ParserContext_mark_cell_closed$40, $ParserContext_cell_open$ques$41, $ParserContext_cell_closed$ques$42, $ParserContext_close_open_cell$43, $ParserContext_close_cell$44, $ParserContext_close_row$47, $ParserContext_activate_rowspan$48, $ParserContext_end_of_row$ques$50, $ParserContext_effective_column_visits$51, $ParserContext_advance$52; - - self.$$prototype.delimiter = self.$$prototype.delimiter_rx = self.$$prototype.buffer = self.$$prototype.cellspecs = self.$$prototype.cell_open = self.$$prototype.format = self.$$prototype.start_cursor_data = self.$$prototype.reader = self.$$prototype.table = self.$$prototype.current_row = self.$$prototype.colcount = self.$$prototype.column_visits = self.$$prototype.active_rowspans = self.$$prototype.linenum = nil; - - self.$include($$($nesting, 'Logging')); - Opal.const_set($nesting[0], 'FORMATS', ["psv", "csv", "dsv", "tsv"].$to_set()); - Opal.const_set($nesting[0], 'DELIMITERS', $hash2(["psv", "csv", "dsv", "tsv", "!sv"], {"psv": ["|", /\|/], "csv": [",", /,/], "dsv": [":", /:/], "tsv": ["\t", /\t/], "!sv": ["!", /!/]})); - self.$attr_accessor("table"); - self.$attr_accessor("format"); - self.$attr_reader("colcount"); - self.$attr_accessor("buffer"); - self.$attr_reader("delimiter"); - self.$attr_reader("delimiter_re"); - - Opal.def(self, '$initialize', $ParserContext_initialize$31 = function $$initialize(reader, table, attributes) { - var $a, $b, self = this, xsv = nil, sep = nil; - - - - if (attributes == null) { - attributes = $hash2([], {}); - }; - self.start_cursor_data = (self.reader = reader).$mark(); - self.table = table; - if ($truthy(attributes['$key?']("format"))) { - if ($truthy($$($nesting, 'FORMATS')['$include?']((xsv = attributes['$[]']("format"))))) { - if (xsv['$==']("tsv")) { - self.format = "csv" - } else if ($truthy((($a = (self.format = xsv)['$==']("psv")) ? table.$document()['$nested?']() : (self.format = xsv)['$==']("psv")))) { - xsv = "!sv"} - } else { - - self.$logger().$error(self.$message_with_context("" + "illegal table format: " + (xsv), $hash2(["source_location"], {"source_location": reader.$cursor_at_prev_line()}))); - $a = ["psv", (function() {if ($truthy(table.$document()['$nested?']())) { - return "!sv" - } else { - return "psv" - }; return nil; })()], (self.format = $a[0]), (xsv = $a[1]), $a; - } - } else { - $a = ["psv", (function() {if ($truthy(table.$document()['$nested?']())) { - return "!sv" - } else { - return "psv" - }; return nil; })()], (self.format = $a[0]), (xsv = $a[1]), $a - }; - if ($truthy(attributes['$key?']("separator"))) { - if ($truthy((sep = attributes['$[]']("separator"))['$nil_or_empty?']())) { - $b = $$($nesting, 'DELIMITERS')['$[]'](xsv), $a = Opal.to_ary($b), (self.delimiter = ($a[0] == null ? nil : $a[0])), (self.delimiter_rx = ($a[1] == null ? nil : $a[1])), $b - } else if (sep['$==']("\\t")) { - $b = $$($nesting, 'DELIMITERS')['$[]']("tsv"), $a = Opal.to_ary($b), (self.delimiter = ($a[0] == null ? nil : $a[0])), (self.delimiter_rx = ($a[1] == null ? nil : $a[1])), $b - } else { - $a = [sep, new RegExp($$$('::', 'Regexp').$escape(sep))], (self.delimiter = $a[0]), (self.delimiter_rx = $a[1]), $a - } - } else { - $b = $$($nesting, 'DELIMITERS')['$[]'](xsv), $a = Opal.to_ary($b), (self.delimiter = ($a[0] == null ? nil : $a[0])), (self.delimiter_rx = ($a[1] == null ? nil : $a[1])), $b - }; - self.colcount = (function() {if ($truthy(table.$columns()['$empty?']())) { - return -1 - } else { - return table.$columns().$size() - }; return nil; })(); - self.buffer = ""; - self.cellspecs = []; - self.cell_open = false; - self.active_rowspans = [0]; - self.column_visits = 0; - self.current_row = []; - return (self.linenum = -1); - }, $ParserContext_initialize$31.$$arity = -3); - - Opal.def(self, '$starts_with_delimiter?', $ParserContext_starts_with_delimiter$ques$32 = function(line) { - var self = this; - - return line['$start_with?'](self.delimiter) - }, $ParserContext_starts_with_delimiter$ques$32.$$arity = 1); - - Opal.def(self, '$match_delimiter', $ParserContext_match_delimiter$33 = function $$match_delimiter(line) { - var self = this; - - return self.delimiter_rx.$match(line) - }, $ParserContext_match_delimiter$33.$$arity = 1); - - Opal.def(self, '$skip_past_delimiter', $ParserContext_skip_past_delimiter$34 = function $$skip_past_delimiter(pre) { - var self = this; - - - self.buffer = "" + (self.buffer) + (pre) + (self.delimiter); - return nil; - }, $ParserContext_skip_past_delimiter$34.$$arity = 1); - - Opal.def(self, '$skip_past_escaped_delimiter', $ParserContext_skip_past_escaped_delimiter$35 = function $$skip_past_escaped_delimiter(pre) { - var self = this; - - - self.buffer = "" + (self.buffer) + (pre.$chop()) + (self.delimiter); - return nil; - }, $ParserContext_skip_past_escaped_delimiter$35.$$arity = 1); - - Opal.def(self, '$buffer_has_unclosed_quotes?', $ParserContext_buffer_has_unclosed_quotes$ques$36 = function(append) { - var $a, $b, self = this, record = nil, trailing_quote = nil; - - - - if (append == null) { - append = nil; - }; - if ((record = (function() {if ($truthy(append)) { - return $rb_plus(self.buffer, append).$strip() - } else { - return self.buffer.$strip() - }; return nil; })())['$==']("\"")) { - return true - } else if ($truthy(record['$start_with?']("\""))) { - if ($truthy(($truthy($a = ($truthy($b = (trailing_quote = record['$end_with?']("\""))) ? record['$end_with?']("\"\"") : $b)) ? $a : record['$start_with?']("\"\"")))) { - return ($truthy($a = (record = record.$gsub("\"\"", ""))['$start_with?']("\"")) ? record['$end_with?']("\"")['$!']() : $a) - } else { - return trailing_quote['$!']() - } - } else { - return false - }; - }, $ParserContext_buffer_has_unclosed_quotes$ques$36.$$arity = -1); - - Opal.def(self, '$take_cellspec', $ParserContext_take_cellspec$37 = function $$take_cellspec() { - var self = this; - - return self.cellspecs.$shift() - }, $ParserContext_take_cellspec$37.$$arity = 0); - - Opal.def(self, '$push_cellspec', $ParserContext_push_cellspec$38 = function $$push_cellspec(cellspec) { - var $a, self = this; - - - - if (cellspec == null) { - cellspec = $hash2([], {}); - }; - self.cellspecs['$<<'](($truthy($a = cellspec) ? $a : $hash2([], {}))); - return nil; - }, $ParserContext_push_cellspec$38.$$arity = -1); - - Opal.def(self, '$keep_cell_open', $ParserContext_keep_cell_open$39 = function $$keep_cell_open() { - var self = this; - - - self.cell_open = true; - return nil; - }, $ParserContext_keep_cell_open$39.$$arity = 0); - - Opal.def(self, '$mark_cell_closed', $ParserContext_mark_cell_closed$40 = function $$mark_cell_closed() { - var self = this; - - - self.cell_open = false; - return nil; - }, $ParserContext_mark_cell_closed$40.$$arity = 0); - - Opal.def(self, '$cell_open?', $ParserContext_cell_open$ques$41 = function() { - var self = this; - - return self.cell_open - }, $ParserContext_cell_open$ques$41.$$arity = 0); - - Opal.def(self, '$cell_closed?', $ParserContext_cell_closed$ques$42 = function() { - var self = this; - - return self.cell_open['$!']() - }, $ParserContext_cell_closed$ques$42.$$arity = 0); - - Opal.def(self, '$close_open_cell', $ParserContext_close_open_cell$43 = function $$close_open_cell(next_cellspec) { - var self = this; - - - - if (next_cellspec == null) { - next_cellspec = $hash2([], {}); - }; - self.$push_cellspec(next_cellspec); - if ($truthy(self['$cell_open?']())) { - self.$close_cell(true)}; - self.$advance(); - return nil; - }, $ParserContext_close_open_cell$43.$$arity = -1); - - Opal.def(self, '$close_cell', $ParserContext_close_cell$44 = function $$close_cell(eol) {try { - - var $a, $b, $$45, self = this, cell_text = nil, cellspec = nil, repeat = nil; - - - - if (eol == null) { - eol = false; - }; - if (self.format['$==']("psv")) { - - cell_text = self.buffer; - self.buffer = ""; - if ($truthy((cellspec = self.$take_cellspec()))) { - repeat = ($truthy($a = cellspec.$delete("repeatcol")) ? $a : 1) - } else { - - self.$logger().$error(self.$message_with_context("table missing leading separator; recovering automatically", $hash2(["source_location"], {"source_location": $send($$$($$($nesting, 'Reader'), 'Cursor'), 'new', Opal.to_a(self.start_cursor_data))}))); - cellspec = $hash2([], {}); - repeat = 1; - }; - } else { - - cell_text = self.buffer.$strip(); - self.buffer = ""; - cellspec = nil; - repeat = 1; - if ($truthy(($truthy($a = (($b = self.format['$==']("csv")) ? cell_text['$empty?']()['$!']() : self.format['$==']("csv"))) ? cell_text['$include?']("\"") : $a))) { - if ($truthy(($truthy($a = cell_text['$start_with?']("\"")) ? cell_text['$end_with?']("\"") : $a))) { - if ($truthy((cell_text = cell_text.$slice(1, $rb_minus(cell_text.$length(), 2))))) { - cell_text = cell_text.$strip().$squeeze("\"") - } else { - - self.$logger().$error(self.$message_with_context("unclosed quote in CSV data; setting cell to empty", $hash2(["source_location"], {"source_location": self.reader.$cursor_at_prev_line()}))); - cell_text = ""; - } - } else { - cell_text = cell_text.$squeeze("\"") - }}; - }; - $send((1), 'upto', [repeat], ($$45 = function(i){var self = $$45.$$s || this, $c, $d, $$46, $e, column = nil, extra_cols = nil, offset = nil, cell = nil; - if (self.colcount == null) self.colcount = nil; - if (self.table == null) self.table = nil; - if (self.current_row == null) self.current_row = nil; - if (self.reader == null) self.reader = nil; - if (self.column_visits == null) self.column_visits = nil; - if (self.linenum == null) self.linenum = nil; - - - - if (i == null) { - i = nil; - }; - if (self.colcount['$=='](-1)) { - - self.table.$columns()['$<<']((column = $$$($$($nesting, 'Table'), 'Column').$new(self.table, $rb_minus($rb_plus(self.table.$columns().$size(), i), 1)))); - if ($truthy(($truthy($c = ($truthy($d = cellspec) ? cellspec['$key?']("colspan") : $d)) ? $rb_gt((extra_cols = $rb_minus(cellspec['$[]']("colspan").$to_i(), 1)), 0) : $c))) { - - offset = self.table.$columns().$size(); - $send(extra_cols, 'times', [], ($$46 = function(j){var self = $$46.$$s || this; - if (self.table == null) self.table = nil; - - - - if (j == null) { - j = nil; - }; - return self.table.$columns()['$<<']($$$($$($nesting, 'Table'), 'Column').$new(self.table, $rb_plus(offset, j)));}, $$46.$$s = self, $$46.$$arity = 1, $$46));}; - } else if ($truthy((column = self.table.$columns()['$[]'](self.current_row.$size())))) { - } else { - - self.$logger().$error(self.$message_with_context("dropping cell because it exceeds specified number of columns", $hash2(["source_location"], {"source_location": self.reader.$cursor_before_mark()}))); - Opal.ret(nil); - }; - cell = $$$($$($nesting, 'Table'), 'Cell').$new(column, cell_text, cellspec, $hash2(["cursor"], {"cursor": self.reader.$cursor_before_mark()})); - self.reader.$mark(); - if ($truthy(($truthy($c = cell.$rowspan()['$!']()) ? $c : cell.$rowspan()['$=='](1)))) { - } else { - self.$activate_rowspan(cell.$rowspan(), ($truthy($c = cell.$colspan()) ? $c : 1)) - }; - self.column_visits = $rb_plus(self.column_visits, ($truthy($c = cell.$colspan()) ? $c : 1)); - self.current_row['$<<'](cell); - if ($truthy(($truthy($c = self['$end_of_row?']()) ? ($truthy($d = ($truthy($e = self.colcount['$!='](-1)) ? $e : $rb_gt(self.linenum, 0))) ? $d : ($truthy($e = eol) ? i['$=='](repeat) : $e)) : $c))) { - return self.$close_row() - } else { - return nil - };}, $$45.$$s = self, $$45.$$arity = 1, $$45)); - self.cell_open = false; - return nil; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $ParserContext_close_cell$44.$$arity = -1); - self.$private(); - - Opal.def(self, '$close_row', $ParserContext_close_row$47 = function $$close_row() { - var $a, self = this, $writer = nil; - - - self.table.$rows().$body()['$<<'](self.current_row); - if (self.colcount['$=='](-1)) { - self.colcount = self.column_visits}; - self.column_visits = 0; - self.current_row = []; - self.active_rowspans.$shift(); - ($truthy($a = self.active_rowspans['$[]'](0)) ? $a : (($writer = [0, 0]), $send(self.active_rowspans, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - return nil; - }, $ParserContext_close_row$47.$$arity = 0); - - Opal.def(self, '$activate_rowspan', $ParserContext_activate_rowspan$48 = function $$activate_rowspan(rowspan, colspan) { - var $$49, self = this; - - - $send((1), 'upto', [$rb_minus(rowspan, 1)], ($$49 = function(i){var self = $$49.$$s || this, $a, $writer = nil; - if (self.active_rowspans == null) self.active_rowspans = nil; - - - - if (i == null) { - i = nil; - }; - $writer = [i, $rb_plus(($truthy($a = self.active_rowspans['$[]'](i)) ? $a : 0), colspan)]; - $send(self.active_rowspans, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$49.$$s = self, $$49.$$arity = 1, $$49)); - return nil; - }, $ParserContext_activate_rowspan$48.$$arity = 2); - - Opal.def(self, '$end_of_row?', $ParserContext_end_of_row$ques$50 = function() { - var $a, self = this; - - return ($truthy($a = self.colcount['$=='](-1)) ? $a : self.$effective_column_visits()['$=='](self.colcount)) - }, $ParserContext_end_of_row$ques$50.$$arity = 0); - - Opal.def(self, '$effective_column_visits', $ParserContext_effective_column_visits$51 = function $$effective_column_visits() { - var self = this; - - return $rb_plus(self.column_visits, self.active_rowspans['$[]'](0)) - }, $ParserContext_effective_column_visits$51.$$arity = 0); - return (Opal.def(self, '$advance', $ParserContext_advance$52 = function $$advance() { - var self = this; - - return (self.linenum = $rb_plus(self.linenum, 1)) - }, $ParserContext_advance$52.$$arity = 0), nil) && 'advance'; - })($$($nesting, 'Table'), null, $nesting); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/writer"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy, $hash2 = Opal.hash2; - - Opal.add_stubs(['$respond_to?', '$write', '$+', '$chomp', '$include']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - - (function($base, $parent_nesting) { - var self = $module($base, 'Writer'); - - var $nesting = [self].concat($parent_nesting), $Writer_write$1; - - - Opal.def(self, '$write', $Writer_write$1 = function $$write(output, target) { - var self = this; - - - if ($truthy(target['$respond_to?']("write"))) { - target.$write($rb_plus(output.$chomp(), $$($nesting, 'LF'))) - } else { - $$$('::', 'File').$write(target, output, $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')})) - }; - return nil; - }, $Writer_write$1.$$arity = 2) - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'VoidWriter'); - - var $nesting = [self].concat($parent_nesting), $VoidWriter_write$2; - - - self.$include($$($nesting, 'Writer')); - - Opal.def(self, '$write', $VoidWriter_write$2 = function $$write(output, target) { - var self = this; - - return nil - }, $VoidWriter_write$2.$$arity = 2); - })($nesting[0], $nesting); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/load"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$merge', '$[]', '$start', '$key?', '$!=', '$logger', '$new', '$logger=', '$-', '$!', '$===', '$dup', '$tap', '$each', '$partition', '$[]=', '$split', '$gsub', '$+', '$respond_to?', '$keys', '$raise', '$join', '$ancestors', '$class', '$==', '$at', '$to_i', '$mtime', '$absolute_path', '$path', '$dirname', '$basename', '$extname', '$read', '$rewind', '$drop', '$record', '$parse', '$exception', '$message', '$set_backtrace', '$backtrace', '$stack_trace', '$stack_trace=', '$open', '$load']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $load$1, $load_file$8; - - - - Opal.def(self, '$load', $load$1 = function $$load(input, options) { - var $a, $b, $c, $d, $$2, $$4, $$6, self = this, timings = nil, logger = nil, $writer = nil, attrs = nil, input_path = nil, source = nil, doc = nil, ex = nil, context = nil, wrapped_ex = nil; - - - - if (options == null) { - options = $hash2([], {}); - }; - try { - - options = options.$merge(); - if ($truthy((timings = options['$[]']("timings")))) { - timings.$start("read")}; - if ($truthy(($truthy($a = options['$key?']("logger")) ? (logger = options['$[]']("logger"))['$!=']($$($nesting, 'LoggerManager').$logger()) : $a))) { - - $writer = [($truthy($a = logger) ? $a : $$($nesting, 'NullLogger').$new())]; - $send($$($nesting, 'LoggerManager'), 'logger=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy((attrs = options['$[]']("attributes"))['$!']())) { - attrs = $hash2([], {}) - } else if ($truthy($$$('::', 'Hash')['$==='](attrs))) { - attrs = attrs.$merge() - } else if ($truthy(($truthy($a = (($d = $$$('::', 'Java', 'skip_raise')) && ($c = $$$($d, 'JavaUtil', 'skip_raise')) && ($b = $$$($c, 'Map', 'skip_raise')) ? 'constant' : nil)) ? $$$($$$($$$('::', 'Java'), 'JavaUtil'), 'Map')['$==='](attrs) : $a))) { - attrs = attrs.$dup() - } else if ($truthy($$$('::', 'Array')['$==='](attrs))) { - attrs = $send($hash2([], {}), 'tap', [], ($$2 = function(accum){var self = $$2.$$s || this, $$3; - - - - if (accum == null) { - accum = nil; - }; - return $send(attrs, 'each', [], ($$3 = function(entry){var self = $$3.$$s || this, $e, $f, k = nil, _ = nil, v = nil; - - - - if (entry == null) { - entry = nil; - }; - $f = entry.$partition("="), $e = Opal.to_ary($f), (k = ($e[0] == null ? nil : $e[0])), (_ = ($e[1] == null ? nil : $e[1])), (v = ($e[2] == null ? nil : $e[2])), $f; - - $writer = [k, v]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];;}, $$3.$$s = self, $$3.$$arity = 1, $$3));}, $$2.$$s = self, $$2.$$arity = 1, $$2)) - } else if ($truthy($$$('::', 'String')['$==='](attrs))) { - attrs = $send($hash2([], {}), 'tap', [], ($$4 = function(accum){var self = $$4.$$s || this, $$5; - - - - if (accum == null) { - accum = nil; - }; - return $send(attrs.$gsub($$($nesting, 'SpaceDelimiterRx'), $rb_plus("\\1", $$($nesting, 'NULL'))).$gsub($$($nesting, 'EscapedSpaceRx'), "\\1").$split($$($nesting, 'NULL')), 'each', [], ($$5 = function(entry){var self = $$5.$$s || this, $e, $f, k = nil, _ = nil, v = nil; - - - - if (entry == null) { - entry = nil; - }; - $f = entry.$partition("="), $e = Opal.to_ary($f), (k = ($e[0] == null ? nil : $e[0])), (_ = ($e[1] == null ? nil : $e[1])), (v = ($e[2] == null ? nil : $e[2])), $f; - - $writer = [k, v]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];;}, $$5.$$s = self, $$5.$$arity = 1, $$5));}, $$4.$$s = self, $$4.$$arity = 1, $$4)) - } else if ($truthy(($truthy($a = attrs['$respond_to?']("keys")) ? attrs['$respond_to?']("[]") : $a))) { - attrs = $send($hash2([], {}), 'tap', [], ($$6 = function(accum){var self = $$6.$$s || this, $$7; - - - - if (accum == null) { - accum = nil; - }; - return $send(attrs.$keys(), 'each', [], ($$7 = function(k){var self = $$7.$$s || this; - - - - if (k == null) { - k = nil; - }; - $writer = [k, attrs['$[]'](k)]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$7.$$s = self, $$7.$$arity = 1, $$7));}, $$6.$$s = self, $$6.$$arity = 1, $$6)) - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "illegal type for attributes option: " + (attrs.$class().$ancestors().$join(" < "))) - }; - if ($truthy($$$('::', 'File')['$==='](input))) { - - - $writer = ["input_mtime", (function() {if ($$($nesting, 'RUBY_ENGINE')['$==']("jruby")) { - - return $$$('::', 'Time').$at(input.$mtime().$to_i()); - } else { - return input.$mtime() - }; return nil; })()]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["docfile", (input_path = $$$('::', 'File').$absolute_path(input.$path()))]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["docdir", $$$('::', 'File').$dirname(input_path)]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = ["docname", $$($nesting, 'Helpers').$basename(input_path, (($writer = ["docfilesuffix", $$($nesting, 'Helpers').$extname(input_path)]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))]; - $send(attrs, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - source = input.$read(); - } else if ($truthy(input['$respond_to?']("read"))) { - - try { - input.$rewind() - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - nil - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - source = input.$read(); - } else if ($truthy($$$('::', 'String')['$==='](input))) { - source = input - } else if ($truthy($$$('::', 'Array')['$==='](input))) { - source = input.$drop(0) - } else if ($truthy(input)) { - self.$raise($$$('::', 'ArgumentError'), "" + "unsupported input type: " + (input.$class()))}; - if ($truthy(timings)) { - - timings.$record("read"); - timings.$start("parse");}; - - $writer = ["attributes", attrs]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - doc = (function() {if (options['$[]']("parse")['$=='](false)) { - - return $$($nesting, 'Document').$new(source, options); - } else { - return $$($nesting, 'Document').$new(source, options).$parse() - }; return nil; })(); - if ($truthy(timings)) { - timings.$record("parse")}; - return doc; - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {ex = $err; - try { - - - try { - - context = "" + "asciidoctor: FAILED: " + (($truthy($a = attrs['$[]']("docfile")) ? $a : "<stdin>")) + ": Failed to load AsciiDoc document"; - if ($truthy(ex['$respond_to?']("exception"))) { - - wrapped_ex = ex.$exception("" + (context) + " - " + (ex.$message())); - wrapped_ex.$set_backtrace(ex.$backtrace()); - wrapped_ex.stack = ex.stack; - } else { - - wrapped_ex = ex.$class().$new(context, ex); - - $writer = [ex.$stack_trace()]; - $send(wrapped_ex, 'stack_trace=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - }; - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - wrapped_ex = ex - } finally { Opal.pop_exception() } - } else { throw $err; } - };; - return self.$raise(wrapped_ex); - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - }, $load$1.$$arity = -2); - return (Opal.def(self, '$load_file', $load_file$8 = function $$load_file(filename, options) { - var $$9, self = this; - - - - if (options == null) { - options = $hash2([], {}); - }; - return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$9 = function(file){var self = $$9.$$s || this; - - - - if (file == null) { - file = nil; - }; - return self.$load(file, options);}, $$9.$$s = self, $$9.$$arity = 1, $$9)); - }, $load_file$8.$$arity = -2), nil) && 'load_file'; - })(Opal.get_singleton_class(self), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/convert"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_ge(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$delete', '$merge', '$===', '$absolute_path', '$path', '$load', '$respond_to?', '$[]=', '$-', '$key?', '$fetch', '$[]', '$dirname', '$expand_path', '$join', '$attributes', '$outfilesuffix', '$==', '$raise', '$pwd', '$>=', '$safe', '$normalize_system_path', '$mkdir_p', '$directory?', '$!', '$convert', '$write', '$<', '$attr?', '$basebackend?', '$attr', '$uriish?', '$include?', '$syntax_highlighter', '$write_stylesheet?', '$write_primary_stylesheet', '$instance', '$to_s', '$!=', '$read_asset', '$file?', '$write_stylesheet', '$open']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $convert$1, $convert_file$2; - - - - Opal.def(self, '$convert', $convert$1 = function $$convert(input, options) { - var $a, $b, $c, $d, $e, self = this, to_dir = nil, mkdirs = nil, $case = nil, to_file = nil, write_to_target = nil, sibling_path = nil, stream_output = nil, $writer = nil, outdir = nil, doc = nil, outfile = nil, working_dir = nil, jail = nil, output = nil, stylesdir = nil, stylesheet = nil, copy_asciidoctor_stylesheet = nil, copy_user_stylesheet = nil, copy_syntax_hl_stylesheet = nil, syntax_hl = nil, stylesoutdir = nil, stylesheet_src = nil, stylesheet_dest = nil, stylesheet_data = nil, stylesheet_outdir = nil; - - - - if (options == null) { - options = $hash2([], {}); - }; - (options = options.$merge()).$delete("parse"); - to_dir = options.$delete("to_dir"); - mkdirs = options.$delete("mkdirs"); - $case = (to_file = options.$delete("to_file")); - if (true['$===']($case) || nil['$===']($case)) { - if ($truthy((write_to_target = to_dir))) { - } else if ($truthy($$$('::', 'File')['$==='](input))) { - sibling_path = $$$('::', 'File').$absolute_path(input.$path())}; - to_file = nil;} - else if (false['$===']($case)) {to_file = nil} - else if ("/dev/null"['$===']($case)) {return self.$load(input, options)} - else {if ($truthy((stream_output = to_file['$respond_to?']("write")))) { - } else { - - $writer = ["to_file", (write_to_target = to_file)]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }}; - if ($truthy(options['$key?']("standalone"))) { - } else if ($truthy(($truthy($a = sibling_path) ? $a : write_to_target))) { - - $writer = ["standalone", options.$fetch("header_footer", true)]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else if ($truthy(options['$key?']("header_footer"))) { - - $writer = ["standalone", options['$[]']("header_footer")]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ($truthy(sibling_path)) { - - $writer = ["to_dir", (outdir = $$$('::', 'File').$dirname(sibling_path))]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else if ($truthy(write_to_target)) { - if ($truthy(to_dir)) { - if ($truthy(to_file)) { - - $writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path(to_file, to_dir))]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = ["to_dir", $$$('::', 'File').$expand_path(to_dir)]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } - } else if ($truthy(to_file)) { - - $writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path(to_file))]; - $send(options, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}}; - doc = self.$load(input, options); - if ($truthy(sibling_path)) { - - outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix())); - if (outfile['$=='](sibling_path)) { - self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))}; - } else if ($truthy(write_to_target)) { - - working_dir = (function() {if ($truthy(options['$key?']("base_dir"))) { - - return $$$('::', 'File').$expand_path(options['$[]']("base_dir")); - } else { - return $$$('::', 'Dir').$pwd() - }; return nil; })(); - jail = (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) { - return working_dir - } else { - return nil - }; return nil; })(); - if ($truthy(to_dir)) { - - outdir = doc.$normalize_system_path(to_dir, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false})); - if ($truthy(to_file)) { - - outfile = doc.$normalize_system_path(to_file, outdir, nil, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false})); - outdir = $$$('::', 'File').$dirname(outfile); - } else { - outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix())) - }; - } else if ($truthy(to_file)) { - - outfile = doc.$normalize_system_path(to_file, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false})); - outdir = $$$('::', 'File').$dirname(outfile);}; - if ($truthy(($truthy($a = $$$('::', 'File')['$==='](input)) ? outfile['$==']($$$('::', 'File').$absolute_path(input.$path())) : $a))) { - self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))}; - if ($truthy(mkdirs)) { - $$($nesting, 'Helpers').$mkdir_p(outdir) - } else if ($truthy($$$('::', 'File')['$directory?'](outdir))) { - } else { - self.$raise($$$('::', 'IOError'), "" + "target directory does not exist: " + (to_dir) + " (hint: set :mkdirs option)") - }; - } else { - - outfile = to_file; - outdir = nil; - }; - if ($truthy(($truthy($a = outfile) ? stream_output['$!']() : $a))) { - output = doc.$convert($hash2(["outfile", "outdir"], {"outfile": outfile, "outdir": outdir})) - } else { - output = doc.$convert() - }; - if ($truthy(outfile)) { - - doc.$write(output, outfile); - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = ($truthy($d = ($truthy($e = stream_output['$!']()) ? $rb_lt(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $e)) ? doc['$attr?']("linkcss") : $d)) ? doc['$attr?']("copycss") : $c)) ? doc['$basebackend?']("html") : $b)) ? ($truthy($b = (stylesdir = doc.$attr("stylesdir"))) ? $$($nesting, 'Helpers')['$uriish?'](stylesdir) : $b)['$!']() : $a))) { - - if ($truthy((stylesheet = doc.$attr("stylesheet")))) { - if ($truthy($$($nesting, 'DEFAULT_STYLESHEET_KEYS')['$include?'](stylesheet))) { - copy_asciidoctor_stylesheet = true - } else if ($truthy($$($nesting, 'Helpers')['$uriish?'](stylesheet)['$!']())) { - copy_user_stylesheet = true}}; - copy_syntax_hl_stylesheet = ($truthy($a = (syntax_hl = doc.$syntax_highlighter())) ? syntax_hl['$write_stylesheet?'](doc) : $a); - if ($truthy(($truthy($a = ($truthy($b = copy_asciidoctor_stylesheet) ? $b : copy_user_stylesheet)) ? $a : copy_syntax_hl_stylesheet))) { - - stylesoutdir = doc.$normalize_system_path(stylesdir, outdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) { - return outdir - } else { - return nil - }; return nil; })()); - if ($truthy(mkdirs)) { - $$($nesting, 'Helpers').$mkdir_p(stylesoutdir) - } else if ($truthy($$$('::', 'File')['$directory?'](stylesoutdir))) { - } else { - self.$raise($$$('::', 'IOError'), "" + "target stylesheet directory does not exist: " + (stylesoutdir) + " (hint: set :mkdirs option)") - }; - if ($truthy(copy_asciidoctor_stylesheet)) { - $$($nesting, 'Stylesheets').$instance().$write_primary_stylesheet(stylesoutdir) - } else if ($truthy(copy_user_stylesheet)) { - - if ($truthy(($truthy($a = (stylesheet_src = doc.$attr("copycss"))['$==']("")) ? $a : stylesheet_src['$=='](true)))) { - stylesheet_src = doc.$normalize_system_path(stylesheet) - } else { - stylesheet_src = doc.$normalize_system_path(stylesheet_src.$to_s()) - }; - stylesheet_dest = doc.$normalize_system_path(stylesheet, stylesoutdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) { - return outdir - } else { - return nil - }; return nil; })()); - if ($truthy(($truthy($a = stylesheet_src['$!='](stylesheet_dest)) ? (stylesheet_data = doc.$read_asset(stylesheet_src, $hash2(["warn_on_failure", "label"], {"warn_on_failure": $$$('::', 'File')['$file?'](stylesheet_dest)['$!'](), "label": "stylesheet"}))) : $a))) { - - if ($truthy(($truthy($a = (stylesheet_outdir = $$$('::', 'File').$dirname(stylesheet_dest))['$!='](stylesoutdir)) ? $$$('::', 'File')['$directory?'](stylesheet_outdir)['$!']() : $a))) { - if ($truthy(mkdirs)) { - $$($nesting, 'Helpers').$mkdir_p(stylesheet_outdir) - } else { - self.$raise($$$('::', 'IOError'), "" + "target stylesheet directory does not exist: " + (stylesheet_outdir) + " (hint: set :mkdirs option)") - }}; - $$$('::', 'File').$write(stylesheet_dest, stylesheet_data, $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')}));};}; - if ($truthy(copy_syntax_hl_stylesheet)) { - syntax_hl.$write_stylesheet(doc, stylesoutdir)};};}; - return doc; - } else { - return output - }; - }, $convert$1.$$arity = -2); - - Opal.def(self, '$convert_file', $convert_file$2 = function $$convert_file(filename, options) { - var $$3, self = this; - - - - if (options == null) { - options = $hash2([], {}); - }; - return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$3 = function(file){var self = $$3.$$s || this; - - - - if (file == null) { - file = nil; - }; - return self.$convert(file, options);}, $$3.$$s = self, $$3.$$arity = 1, $$3)); - }, $convert_file$2.$$arity = -2); - Opal.alias(self, "render", "convert"); - return Opal.alias(self, "render_file", "convert_file"); - })(Opal.get_singleton_class(self), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/syntax_highlighter/highlightjs"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy; - - Opal.add_stubs(['$register_for', '$merge', '$proc', '$[]=', '$-', '$attr', '$[]', '$==', '$attr?', '$join', '$map', '$split', '$lstrip']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'HighlightJsAdapter'); - - var $nesting = [self].concat($parent_nesting), $HighlightJsAdapter_initialize$1, $HighlightJsAdapter_format$2, $HighlightJsAdapter_docinfo$ques$4, $HighlightJsAdapter_docinfo$5; - - - self.$register_for("highlightjs", "highlight.js"); - - Opal.def(self, '$initialize', $HighlightJsAdapter_initialize$1 = function $$initialize($a) { - var $post_args, args, $iter = $HighlightJsAdapter_initialize$1.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $HighlightJsAdapter_initialize$1.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $HighlightJsAdapter_initialize$1, false), $zuper, $iter); - return (self.name = (self.pre_class = "highlightjs")); - }, $HighlightJsAdapter_initialize$1.$$arity = -1); - - Opal.def(self, '$format', $HighlightJsAdapter_format$2 = function $$format(node, lang, opts) { - var $$3, $iter = $HighlightJsAdapter_format$2.$$p, $yield = $iter || nil, self = this; - - if ($iter) $HighlightJsAdapter_format$2.$$p = null; - return $send(self, Opal.find_super_dispatcher(self, 'format', $HighlightJsAdapter_format$2, false), [node, lang, opts.$merge($hash2(["transform"], {"transform": $send(self, 'proc', [], ($$3 = function(_, code){var self = $$3.$$s || this, $a, $writer = nil; - - - - if (_ == null) { - _ = nil; - }; - - if (code == null) { - code = nil; - }; - $writer = ["class", "" + "language-" + (($truthy($a = lang) ? $a : "none")) + " hljs"]; - $send(code, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$3.$$s = self, $$3.$$arity = 2, $$3))}))], null) - }, $HighlightJsAdapter_format$2.$$arity = 3); - - Opal.def(self, '$docinfo?', $HighlightJsAdapter_docinfo$ques$4 = function(location) { - var self = this; - - return true - }, $HighlightJsAdapter_docinfo$ques$4.$$arity = 1); - return (Opal.def(self, '$docinfo', $HighlightJsAdapter_docinfo$5 = function $$docinfo(location, doc, opts) { - var $$6, self = this, base_url = nil; - - - base_url = doc.$attr("highlightjsdir", "" + (opts['$[]']("cdn_base_url")) + "/highlight.js/" + ($$($nesting, 'HIGHLIGHT_JS_VERSION'))); - if (location['$==']("head")) { - return "" + "<link rel=\"stylesheet\" href=\"" + (base_url) + "/styles/" + (doc.$attr("highlightjs-theme", "github")) + ".min.css\"" + (opts['$[]']("self_closing_tag_slash")) + ">" - } else { - return "" + "<script src=\"" + (base_url) + "/highlight.min.js\"></script>\n" + ((function() {if ($truthy(doc['$attr?']("highlightjs-languages"))) { - return $send(doc.$attr("highlightjs-languages").$split(","), 'map', [], ($$6 = function(lang){var self = $$6.$$s || this; - - - - if (lang == null) { - lang = nil; - }; - return "" + "<script src=\"" + (base_url) + "/languages/" + (lang.$lstrip()) + ".min.js\"></script>\n";}, $$6.$$s = self, $$6.$$arity = 1, $$6)).$join() - } else { - return "" - }; return nil; })()) + "<script>\n" + "if (!hljs.initHighlighting.called) {\n" + " hljs.initHighlighting.called = true\n" + " ;[].slice.call(document.querySelectorAll('pre.highlight > code')).forEach(function (el) { hljs.highlightBlock(el) })\n" + "}\n" + "</script>" - }; - }, $HighlightJsAdapter_docinfo$5.$$arity = 3), nil) && 'docinfo'; - })($$($nesting, 'SyntaxHighlighter'), $$$($$($nesting, 'SyntaxHighlighter'), 'Base'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send, $klass = Opal.klass; - - Opal.add_stubs(['$attr_reader', '$raise', '$class', '$private_class_method', '$extend', '$register', '$map', '$to_s', '$each', '$[]=', '$registry', '$-', '$[]', '$for', '$===', '$new', '$name', '$private', '$include', '$==', '$delete', '$join', '$content']); - - (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'SyntaxHighlighter'); - - var $nesting = [self].concat($parent_nesting), $SyntaxHighlighter_initialize$1, $SyntaxHighlighter_docinfo$ques$2, $SyntaxHighlighter_docinfo$3, $SyntaxHighlighter_highlight$ques$4, $SyntaxHighlighter_highlight$5, $SyntaxHighlighter_format$6, $SyntaxHighlighter_write_stylesheet$ques$7, $SyntaxHighlighter_write_stylesheet$8, $a, $SyntaxHighlighter_included$9; - - - self.$attr_reader("name"); - - Opal.def(self, '$initialize', $SyntaxHighlighter_initialize$1 = function $$initialize(name, backend, opts) { - var self = this; - - - - if (backend == null) { - backend = "html5"; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - return (self.name = (self.pre_class = name)); - }, $SyntaxHighlighter_initialize$1.$$arity = -2); - - Opal.def(self, '$docinfo?', $SyntaxHighlighter_docinfo$ques$2 = function(location) { - var self = this; - - return nil - }, $SyntaxHighlighter_docinfo$ques$2.$$arity = 1); - - Opal.def(self, '$docinfo', $SyntaxHighlighter_docinfo$3 = function $$docinfo(location, doc, opts) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'SyntaxHighlighter')) + " subclass " + (self.$class()) + " must implement the #" + ("docinfo") + " method since #docinfo? returns true") - }, $SyntaxHighlighter_docinfo$3.$$arity = 3); - - Opal.def(self, '$highlight?', $SyntaxHighlighter_highlight$ques$4 = function() { - var self = this; - - return nil - }, $SyntaxHighlighter_highlight$ques$4.$$arity = 0); - - Opal.def(self, '$highlight', $SyntaxHighlighter_highlight$5 = function $$highlight(node, source, lang, opts) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'SyntaxHighlighter')) + " subclass " + (self.$class()) + " must implement the #" + ("highlight") + " method since #highlight? returns true") - }, $SyntaxHighlighter_highlight$5.$$arity = 4); - - Opal.def(self, '$format', $SyntaxHighlighter_format$6 = function $$format(node, lang, opts) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'SyntaxHighlighter')) + " subclass " + (self.$class()) + " must implement the #" + ("format") + " method") - }, $SyntaxHighlighter_format$6.$$arity = 3); - - Opal.def(self, '$write_stylesheet?', $SyntaxHighlighter_write_stylesheet$ques$7 = function(doc) { - var self = this; - - return nil - }, $SyntaxHighlighter_write_stylesheet$ques$7.$$arity = 1); - - Opal.def(self, '$write_stylesheet', $SyntaxHighlighter_write_stylesheet$8 = function $$write_stylesheet(doc, to_dir) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'SyntaxHighlighter')) + " subclass " + (self.$class()) + " must implement the #" + ("write_stylesheet") + " method since #write_stylesheet? returns true") - }, $SyntaxHighlighter_write_stylesheet$8.$$arity = 2); - self.$private_class_method(($truthy($a = (Opal.defs(self, '$included', $SyntaxHighlighter_included$9 = function $$included(into) { - var self = this; - - return into.$extend($$($nesting, 'Config')) - }, $SyntaxHighlighter_included$9.$$arity = 1), nil) && 'included') ? $a : "included")); - (function($base, $parent_nesting) { - var self = $module($base, 'Config'); - - var $nesting = [self].concat($parent_nesting), $Config_register_for$10; - - - Opal.def(self, '$register_for', $Config_register_for$10 = function $$register_for($a) { - var $post_args, names, $$11, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - names = $post_args;; - return $send($$($nesting, 'SyntaxHighlighter'), 'register', [self].concat(Opal.to_a($send(names, 'map', [], ($$11 = function(name){var self = $$11.$$s || this; - - - - if (name == null) { - name = nil; - }; - return name.$to_s();}, $$11.$$s = self, $$11.$$arity = 1, $$11))))); - }, $Config_register_for$10.$$arity = -1) - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Factory'); - - var $nesting = [self].concat($parent_nesting), $Factory_register$12, $Factory_for$14, $Factory_create$15, $Factory_registry$16; - - - - Opal.def(self, '$register', $Factory_register$12 = function $$register(syntax_highlighter, $a) { - var $post_args, names, $$13, self = this; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - names = $post_args;; - return $send(names, 'each', [], ($$13 = function(name){var self = $$13.$$s || this, $writer = nil; - - - - if (name == null) { - name = nil; - }; - $writer = [name, syntax_highlighter]; - $send(self.$registry(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$13.$$s = self, $$13.$$arity = 1, $$13)); - }, $Factory_register$12.$$arity = -2); - - Opal.def(self, '$for', $Factory_for$14 = function(name) { - var self = this; - - return self.$registry()['$[]'](name) - }, $Factory_for$14.$$arity = 1); - - Opal.def(self, '$create', $Factory_create$15 = function $$create(name, backend, opts) { - var self = this, syntax_hl = nil; - - - - if (backend == null) { - backend = "html5"; - }; - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy((syntax_hl = self.$for(name)))) { - - if ($truthy($$$('::', 'Class')['$==='](syntax_hl))) { - syntax_hl = syntax_hl.$new(name, backend, opts)}; - if ($truthy(syntax_hl.$name())) { - } else { - self.$raise($$$('::', 'NameError'), "" + (syntax_hl.$class()) + " must specify a value for `name'") - }; - return syntax_hl; - } else { - return nil - }; - }, $Factory_create$15.$$arity = -2); - self.$private(); - - Opal.def(self, '$registry', $Factory_registry$16 = function $$registry() { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Factory')) + " subclass " + (self.$class()) + " must implement the #" + ("registry") + " method") - }, $Factory_registry$16.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'CustomFactory'); - - var $nesting = [self].concat($parent_nesting), $CustomFactory_initialize$17, $CustomFactory_registry$18; - - self.$$prototype.registry = nil; - - self.$include($$($nesting, 'Factory')); - - Opal.def(self, '$initialize', $CustomFactory_initialize$17 = function $$initialize(seed_registry) { - var $a, self = this; - - - - if (seed_registry == null) { - seed_registry = nil; - }; - return (self.registry = ($truthy($a = seed_registry) ? $a : $hash2([], {}))); - }, $CustomFactory_initialize$17.$$arity = -1); - self.$private(); - return (Opal.def(self, '$registry', $CustomFactory_registry$18 = function $$registry() { - var self = this; - - return self.registry - }, $CustomFactory_registry$18.$$arity = 0), nil) && 'registry'; - })($nesting[0], null, $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'DefaultFactory'); - - var $nesting = [self].concat($parent_nesting), $DefaultFactory_registry$19; - - - self.$include($$($nesting, 'Factory')); - self.$private(); - (Opal.class_variable_set($nesting[0], '@@registry', $hash2([], {}))); - - Opal.def(self, '$registry', $DefaultFactory_registry$19 = function $$registry() { - var $a, self = this; - - return (($a = $nesting[0].$$cvars['@@registry']) == null ? nil : $a) - }, $DefaultFactory_registry$19.$$arity = 0); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'DefaultFactoryProxy'); - - var $nesting = [self].concat($parent_nesting); - - - self.$include($$($nesting, 'DefaultFactory')); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - return nil - } else { - return nil - }; - })($nesting[0], $$($nesting, 'CustomFactory'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Base'); - - var $nesting = [self].concat($parent_nesting), $Base_format$20; - - self.$$prototype.pre_class = nil; - - self.$include($$($nesting, 'SyntaxHighlighter')); - return (Opal.def(self, '$format', $Base_format$20 = function $$format(node, lang, opts) { - var $$21, $$22, self = this, class_attr_val = nil, transform = nil, pre = nil, code = nil, $writer = nil; - - - class_attr_val = (function() {if ($truthy(opts['$[]']("nowrap"))) { - return "" + (self.pre_class) + " highlight nowrap" - } else { - return "" + (self.pre_class) + " highlight" - }; return nil; })(); - if ($truthy((transform = opts['$[]']("transform")))) { - - transform['$[]']((pre = $hash2(["class"], {"class": class_attr_val})), (code = (function() {if ($truthy(lang)) { - return $hash2(["data-lang"], {"data-lang": lang}) - } else { - return $hash2([], {}) - }; return nil; })())); - if ($truthy((lang = code.$delete("data-lang")))) { - - $writer = ["data-lang", lang]; - $send(code, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return "" + "<pre" + ($send(pre, 'map', [], ($$21 = function(k, v){var self = $$21.$$s || this; - - - - if (k == null) { - k = nil; - }; - - if (v == null) { - v = nil; - }; - return "" + " " + (k) + "=\"" + (v) + "\"";}, $$21.$$s = self, $$21.$$arity = 2, $$21)).$join()) + "><code" + ($send(code, 'map', [], ($$22 = function(k, v){var self = $$22.$$s || this; - - - - if (k == null) { - k = nil; - }; - - if (v == null) { - v = nil; - }; - return "" + " " + (k) + "=\"" + (v) + "\"";}, $$22.$$s = self, $$22.$$arity = 2, $$22)).$join()) + ">" + (node.$content()) + "</code></pre>"; - } else { - return "" + "<pre class=\"" + (class_attr_val) + "\"><code" + ((function() {if ($truthy(lang)) { - return "" + " data-lang=\"" + (lang) + "\"" - } else { - return "" - }; return nil; })()) + ">" + (node.$content()) + "</code></pre>" - }; - }, $Base_format$20.$$arity = 3), nil) && 'format'; - })($nesting[0], null, $nesting); - self.$extend($$($nesting, 'DefaultFactory')); - })($nesting[0], $nesting) - })($nesting[0], $nesting); - self.$require("asciidoctor/syntax_highlighter.rb"+ '/../' + "syntax_highlighter/highlightjs"); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - return nil - } else { - return nil - }; -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/timings"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy, $gvars = Opal.gvars; - - Opal.add_stubs(['$now', '$[]=', '$-', '$delete', '$reduce', '$+', '$[]', '$>', '$time', '$puts', '$%', '$to_f', '$read_parse', '$convert', '$read_parse_convert', '$private', '$const_defined?', '$==', '$clock_gettime']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Timings'); - - var $nesting = [self].concat($parent_nesting), $Timings_initialize$1, $Timings_start$2, $Timings_record$3, $Timings_time$4, $Timings_read$6, $Timings_parse$7, $Timings_read_parse$8, $Timings_convert$9, $Timings_read_parse_convert$10, $Timings_write$11, $Timings_total$12, $Timings_print_report$13, $a, $b, $c, $d, $e, $Timings_now$14, $Timings_now$15; - - self.$$prototype.timers = self.$$prototype.log = nil; - - - Opal.def(self, '$initialize', $Timings_initialize$1 = function $$initialize() { - var self = this; - - - self.log = $hash2([], {}); - return (self.timers = $hash2([], {})); - }, $Timings_initialize$1.$$arity = 0); - - Opal.def(self, '$start', $Timings_start$2 = function $$start(key) { - var self = this, $writer = nil; - - - $writer = [key, self.$now()]; - $send(self.timers, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $Timings_start$2.$$arity = 1); - - Opal.def(self, '$record', $Timings_record$3 = function $$record(key) { - var self = this, $writer = nil; - - - $writer = [key, $rb_minus(self.$now(), self.timers.$delete(key))]; - $send(self.log, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $Timings_record$3.$$arity = 1); - - Opal.def(self, '$time', $Timings_time$4 = function $$time($a) { - var $post_args, keys, $$5, self = this, time = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - keys = $post_args;; - time = $send(keys, 'reduce', [0], ($$5 = function(sum, key){var self = $$5.$$s || this, $b; - if (self.log == null) self.log = nil; - - - - if (sum == null) { - sum = nil; - }; - - if (key == null) { - key = nil; - }; - return $rb_plus(sum, ($truthy($b = self.log['$[]'](key)) ? $b : 0));}, $$5.$$s = self, $$5.$$arity = 2, $$5)); - if ($truthy($rb_gt(time, 0))) { - return time - } else { - return nil - }; - }, $Timings_time$4.$$arity = -1); - - Opal.def(self, '$read', $Timings_read$6 = function $$read() { - var self = this; - - return self.$time("read") - }, $Timings_read$6.$$arity = 0); - - Opal.def(self, '$parse', $Timings_parse$7 = function $$parse() { - var self = this; - - return self.$time("parse") - }, $Timings_parse$7.$$arity = 0); - - Opal.def(self, '$read_parse', $Timings_read_parse$8 = function $$read_parse() { - var self = this; - - return self.$time("read", "parse") - }, $Timings_read_parse$8.$$arity = 0); - - Opal.def(self, '$convert', $Timings_convert$9 = function $$convert() { - var self = this; - - return self.$time("convert") - }, $Timings_convert$9.$$arity = 0); - - Opal.def(self, '$read_parse_convert', $Timings_read_parse_convert$10 = function $$read_parse_convert() { - var self = this; - - return self.$time("read", "parse", "convert") - }, $Timings_read_parse_convert$10.$$arity = 0); - - Opal.def(self, '$write', $Timings_write$11 = function $$write() { - var self = this; - - return self.$time("write") - }, $Timings_write$11.$$arity = 0); - - Opal.def(self, '$total', $Timings_total$12 = function $$total() { - var self = this; - - return self.$time("read", "parse", "convert", "write") - }, $Timings_total$12.$$arity = 0); - - Opal.def(self, '$print_report', $Timings_print_report$13 = function $$print_report(to, subject) { - var self = this; - if ($gvars.stdout == null) $gvars.stdout = nil; - - - - if (to == null) { - to = $gvars.stdout; - }; - - if (subject == null) { - subject = nil; - }; - if ($truthy(subject)) { - to.$puts("" + "Input file: " + (subject))}; - to.$puts("" + " Time to read and parse source: " + ("%05.5f"['$%'](self.$read_parse().$to_f()))); - to.$puts("" + " Time to convert document: " + ("%05.5f"['$%'](self.$convert().$to_f()))); - return to.$puts("" + " Total time (read, parse and convert): " + ("%05.5f"['$%'](self.$read_parse_convert().$to_f()))); - }, $Timings_print_report$13.$$arity = -1); - self.$private(); - if ($truthy(($truthy($a = $$$('::', 'Process')['$const_defined?']("CLOCK_MONOTONIC", false)) ? ((($b = $$$('::', 'Process', 'skip_raise')) && ($c = $b, $c) && ($d = $c) && ((($e = $d.$clock_gettime) && !$e.$$stub) || $d['$respond_to_missing?']('clock_gettime'))) ? 'method' : nil)['$==']("method") : $a))) { - - Opal.const_set($nesting[0], 'CLOCK_ID', $$$($$$('::', 'Process'), 'CLOCK_MONOTONIC')); - return (Opal.def(self, '$now', $Timings_now$14 = function $$now() { - var self = this; - - return $$$('::', 'Process').$clock_gettime($$($nesting, 'CLOCK_ID')) - }, $Timings_now$14.$$arity = 0), nil) && 'now'; - } else { - return (Opal.def(self, '$now', $Timings_now$15 = function $$now() { - var self = this; - - return $$$('::', 'Time').$now() - }, $Timings_now$15.$$arity = 0), nil) && 'now' - }; - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/converter/composite"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy; - - Opal.add_stubs(['$attr_reader', '$each', '$respond_to?', '$composed', '$init_backend_traits', '$backend_traits', '$new', '$find_converter', '$[]=', '$-', '$convert', '$converter_for', '$node_name', '$[]', '$handles?', '$raise']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'CompositeConverter'); - - var $nesting = [self].concat($parent_nesting), $CompositeConverter_initialize$1, $CompositeConverter_convert$4, $CompositeConverter_converter_for$5, $CompositeConverter_find_converter$6; - - self.$$prototype.converter_cache = self.$$prototype.converters = nil; - - self.$attr_reader("converters"); - - Opal.def(self, '$initialize', $CompositeConverter_initialize$1 = function $$initialize(backend, $a, $b) { - var $post_args, $kwargs, converters, backend_traits_source, $$2, $$3, self = this; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - $kwargs = Opal.extract_kwargs($post_args); - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - converters = $post_args;; - - backend_traits_source = $kwargs.$$smap["backend_traits_source"]; - if (backend_traits_source == null) { - backend_traits_source = nil - }; - self.backend = backend; - $send((self.converters = converters), 'each', [], ($$2 = function(converter){var self = $$2.$$s || this; - - - - if (converter == null) { - converter = nil; - }; - if ($truthy(converter['$respond_to?']("composed"))) { - return converter.$composed(self) - } else { - return nil - };}, $$2.$$s = self, $$2.$$arity = 1, $$2)); - if ($truthy(backend_traits_source)) { - self.$init_backend_traits(backend_traits_source.$backend_traits())}; - return (self.converter_cache = $send($$$('::', 'Hash'), 'new', [], ($$3 = function(hash, key){var self = $$3.$$s || this, $writer = nil; - - - - if (hash == null) { - hash = nil; - }; - - if (key == null) { - key = nil; - }; - $writer = [key, self.$find_converter(key)]; - $send(hash, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$3.$$s = self, $$3.$$arity = 2, $$3))); - }, $CompositeConverter_initialize$1.$$arity = -2); - - Opal.def(self, '$convert', $CompositeConverter_convert$4 = function $$convert(node, transform, opts) { - var $a, self = this; - - - - if (transform == null) { - transform = nil; - }; - - if (opts == null) { - opts = nil; - }; - return self.$converter_for((transform = ($truthy($a = transform) ? $a : node.$node_name()))).$convert(node, transform, opts); - }, $CompositeConverter_convert$4.$$arity = -2); - - Opal.def(self, '$converter_for', $CompositeConverter_converter_for$5 = function $$converter_for(transform) { - var self = this; - - return self.converter_cache['$[]'](transform) - }, $CompositeConverter_converter_for$5.$$arity = 1); - return (Opal.def(self, '$find_converter', $CompositeConverter_find_converter$6 = function $$find_converter(transform) {try { - - var $$7, self = this; - - - $send(self.converters, 'each', [], ($$7 = function(candidate){var self = $$7.$$s || this; - - - - if (candidate == null) { - candidate = nil; - }; - if ($truthy(candidate['$handles?'](transform))) { - Opal.ret(candidate) - } else { - return nil - };}, $$7.$$s = self, $$7.$$arity = 1, $$7)); - return self.$raise("" + "Could not find a converter to handle transform: " + (transform)); - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $CompositeConverter_find_converter$6.$$arity = 1), nil) && 'find_converter'; - })($$($nesting, 'Converter'), $$$($$($nesting, 'Converter'), 'Base'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/converter/html5"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_le(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy, $gvars = Opal.gvars; - - Opal.add_stubs(['$register_for', '$default=', '$-', '$==', '$[]', '$init_backend_traits', '$node_name', '$convert_inline_quoted', '$convert_paragraph', '$convert_inline_anchor', '$convert_section', '$convert_listing', '$convert_literal', '$convert_ulist', '$convert_olist', '$convert_dlist', '$convert_admonition', '$convert_colist', '$convert_embedded', '$convert_example', '$convert_floating_title', '$convert_image', '$convert_inline_break', '$convert_inline_button', '$convert_inline_callout', '$convert_inline_footnote', '$convert_inline_image', '$convert_inline_indexterm', '$convert_inline_kbd', '$convert_inline_menu', '$convert_open', '$convert_page_break', '$convert_preamble', '$convert_quote', '$convert_sidebar', '$convert_stem', '$convert_table', '$convert_thematic_break', '$convert_verse', '$convert_video', '$convert_document', '$convert_toc', '$convert_pass', '$convert_audio', '$empty?', '$attr', '$attr?', '$<<', '$include?', '$sub_replacements', '$gsub', '$extname', '$slice', '$length', '$doctitle', '$normalize_web_path', '$primary_stylesheet_data', '$instance', '$read_contents', '$syntax_highlighter', '$size', '$docinfo', '$id', '$sections?', '$doctype', '$role?', '$role', '$join', '$noheader', '$convert', '$converter', '$generate_manname_section', '$header?', '$notitle', '$title', '$header', '$each', '$authors', '$>', '$name', '$email', '$sub_macros', '$+', '$downcase', '$concat', '$content', '$footnotes?', '$!', '$footnotes', '$index', '$text', '$nofooter', '$docinfo?', '$[]=', '$delete_at', '$inspect', '$!=', '$to_i', '$attributes', '$document', '$sections', '$level', '$caption', '$captioned_title', '$numbered', '$<=', '$<', '$sectname', '$sectnum', '$convert_outline', '$title?', '$icon_uri', '$compact', '$media_uri', '$option?', '$append_boolean_attribute', '$style', '$items', '$blocks?', '$===', '$text?', '$chomp', '$safe', '$read_svg_contents', '$alt', '$image_uri', '$encode_attribute_value', '$append_link_constraint_attrs', '$highlight?', '$to_sym', '$format', '$*', '$count', '$start_with?', '$end_with?', '$list_marker_keyword', '$parent', '$warn', '$logger', '$context', '$error', '$new', '$columns', '$to_h', '$rows', '$colspan', '$rowspan', '$unshift', '$shift', '$pop', '$split', '$nil_or_empty?', '$type', '$catalog', '$get_root_document', '$xreftext', '$target', '$reftext', '$map', '$chop', '$sub', '$match', '$private', '$upcase', '$nested?', '$parent_document', '$to_s', '$handles?', '$send']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Html5Converter'); - - var $nesting = [self].concat($parent_nesting), $Html5Converter_initialize$1, $Html5Converter_convert$2, $Html5Converter_convert_document$3, $Html5Converter_convert_embedded$6, $Html5Converter_convert_outline$8, $Html5Converter_convert_section$10, $Html5Converter_convert_admonition$11, $Html5Converter_convert_audio$12, $Html5Converter_convert_colist$13, $Html5Converter_convert_dlist$16, $Html5Converter_convert_example$23, $Html5Converter_convert_floating_title$24, $Html5Converter_convert_image$25, $Html5Converter_convert_listing$26, $Html5Converter_convert_literal$27, $Html5Converter_convert_stem$28, $Html5Converter_convert_olist$30, $Html5Converter_convert_open$32, $Html5Converter_convert_page_break$33, $Html5Converter_convert_paragraph$34, $Html5Converter_convert_preamble$35, $Html5Converter_convert_quote$36, $Html5Converter_convert_thematic_break$37, $Html5Converter_convert_sidebar$38, $Html5Converter_convert_table$39, $Html5Converter_convert_toc$44, $Html5Converter_convert_ulist$45, $Html5Converter_convert_verse$47, $Html5Converter_convert_video$48, $Html5Converter_convert_inline_anchor$49, $Html5Converter_convert_inline_break$50, $Html5Converter_convert_inline_button$51, $Html5Converter_convert_inline_callout$52, $Html5Converter_convert_inline_footnote$53, $Html5Converter_convert_inline_image$54, $Html5Converter_convert_inline_indexterm$57, $Html5Converter_convert_inline_kbd$58, $Html5Converter_convert_inline_menu$59, $Html5Converter_convert_inline_quoted$60, $Html5Converter_read_svg_contents$61, $Html5Converter_append_boolean_attribute$63, $Html5Converter_append_link_constraint_attrs$64, $Html5Converter_encode_attribute_value$65, $Html5Converter_generate_manname_section$66, $Html5Converter_get_root_document$67, $Html5Converter_method_missing$68, $writer = nil; - - self.$$prototype.void_element_slash = self.$$prototype.xml_mode = self.$$prototype.refs = self.$$prototype.resolving_xref = nil; - - self.$register_for("html5"); - - $writer = [["", ""]]; - $send(Opal.const_set($nesting[0], 'QUOTE_TAGS', $hash2(["monospaced", "emphasis", "strong", "double", "single", "mark", "superscript", "subscript", "asciimath", "latexmath"], {"monospaced": ["<code>", "</code>", true], "emphasis": ["<em>", "</em>", true], "strong": ["<strong>", "</strong>", true], "double": ["“", "”"], "single": ["‘", "’"], "mark": ["<mark>", "</mark>", true], "superscript": ["<sup>", "</sup>", true], "subscript": ["<sub>", "</sub>", true], "asciimath": ["\\$", "\\$"], "latexmath": ["\\(", "\\)"]})), 'default=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - Opal.const_set($nesting[0], 'DropAnchorRx', /<(?:a\b[^>]*|\/a)>/); - Opal.const_set($nesting[0], 'StemBreakRx', / *\\\n(?:\\?\n)*|\n\n+/); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - - Opal.const_set($nesting[0], 'SvgPreambleRx', new RegExp("" + "^" + ($$($nesting, 'CC_ALL')) + "*?(?=<svg[\\s>])")); - Opal.const_set($nesting[0], 'SvgStartTagRx', /^<svg(?:\s[^>]*)?>/); - } else { - nil - }; - Opal.const_set($nesting[0], 'DimensionAttributeRx', new RegExp("" + "\\s(?:width|height|style)=([\"'])" + ($$($nesting, 'CC_ANY')) + "*?\\1")); - - Opal.def(self, '$initialize', $Html5Converter_initialize$1 = function $$initialize(backend, opts) { - var self = this, syntax = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - self.backend = backend; - if (opts['$[]']("htmlsyntax")['$==']("xml")) { - - syntax = "xml"; - self.xml_mode = true; - self.void_element_slash = "/"; - } else { - - syntax = "html"; - self.xml_mode = nil; - self.void_element_slash = ""; - }; - return self.$init_backend_traits($hash2(["basebackend", "filetype", "htmlsyntax", "outfilesuffix", "supports_templates"], {"basebackend": "html", "filetype": "html", "htmlsyntax": syntax, "outfilesuffix": ".html", "supports_templates": true})); - }, $Html5Converter_initialize$1.$$arity = -2); - - Opal.def(self, '$convert', $Html5Converter_convert$2 = function $$convert(node, transform, opts) { - var $iter = $Html5Converter_convert$2.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Html5Converter_convert$2.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if (transform == null) { - transform = node.$node_name(); - }; - - if (opts == null) { - opts = nil; - }; - if (transform['$==']("inline_quoted")) { - return self.$convert_inline_quoted(node) - } else if (transform['$==']("paragraph")) { - return self.$convert_paragraph(node) - } else if (transform['$==']("inline_anchor")) { - return self.$convert_inline_anchor(node) - } else if (transform['$==']("section")) { - return self.$convert_section(node) - } else if (transform['$==']("listing")) { - return self.$convert_listing(node) - } else if (transform['$==']("literal")) { - return self.$convert_literal(node) - } else if (transform['$==']("ulist")) { - return self.$convert_ulist(node) - } else if (transform['$==']("olist")) { - return self.$convert_olist(node) - } else if (transform['$==']("dlist")) { - return self.$convert_dlist(node) - } else if (transform['$==']("admonition")) { - return self.$convert_admonition(node) - } else if (transform['$==']("colist")) { - return self.$convert_colist(node) - } else if (transform['$==']("embedded")) { - return self.$convert_embedded(node) - } else if (transform['$==']("example")) { - return self.$convert_example(node) - } else if (transform['$==']("floating_title")) { - return self.$convert_floating_title(node) - } else if (transform['$==']("image")) { - return self.$convert_image(node) - } else if (transform['$==']("inline_break")) { - return self.$convert_inline_break(node) - } else if (transform['$==']("inline_button")) { - return self.$convert_inline_button(node) - } else if (transform['$==']("inline_callout")) { - return self.$convert_inline_callout(node) - } else if (transform['$==']("inline_footnote")) { - return self.$convert_inline_footnote(node) - } else if (transform['$==']("inline_image")) { - return self.$convert_inline_image(node) - } else if (transform['$==']("inline_indexterm")) { - return self.$convert_inline_indexterm(node) - } else if (transform['$==']("inline_kbd")) { - return self.$convert_inline_kbd(node) - } else if (transform['$==']("inline_menu")) { - return self.$convert_inline_menu(node) - } else if (transform['$==']("open")) { - return self.$convert_open(node) - } else if (transform['$==']("page_break")) { - return self.$convert_page_break(node) - } else if (transform['$==']("preamble")) { - return self.$convert_preamble(node) - } else if (transform['$==']("quote")) { - return self.$convert_quote(node) - } else if (transform['$==']("sidebar")) { - return self.$convert_sidebar(node) - } else if (transform['$==']("stem")) { - return self.$convert_stem(node) - } else if (transform['$==']("table")) { - return self.$convert_table(node) - } else if (transform['$==']("thematic_break")) { - return self.$convert_thematic_break(node) - } else if (transform['$==']("verse")) { - return self.$convert_verse(node) - } else if (transform['$==']("video")) { - return self.$convert_video(node) - } else if (transform['$==']("document")) { - return self.$convert_document(node) - } else if (transform['$==']("toc")) { - return self.$convert_toc(node) - } else if (transform['$==']("pass")) { - return self.$convert_pass(node) - } else if (transform['$==']("audio")) { - return self.$convert_audio(node) - } else { - return $send(self, Opal.find_super_dispatcher(self, 'convert', $Html5Converter_convert$2, false), $zuper, $iter) - }; - }, $Html5Converter_convert$2.$$arity = -2); - - Opal.def(self, '$convert_document', $Html5Converter_convert_document$3 = function $$convert_document(node) { - var $a, $b, $c, $$4, $$5, self = this, br = nil, slash = nil, asset_uri_scheme = nil, cdn_base_url = nil, linkcss = nil, max_width_attr = nil, result = nil, lang_attribute = nil, authors = nil, icon_href = nil, icon_type = nil, icon_ext = nil, webfonts = nil, iconfont_stylesheet = nil, syntax_hl = nil, syntax_hl_docinfo_head_idx = nil, docinfo_content = nil, id_attr = nil, sectioned = nil, classes = nil, details = nil, idx = nil, $writer = nil, eqnums_val = nil, eqnums_opt = nil; - - - br = "" + "<br" + ((slash = self.void_element_slash)) + ">"; - if ($truthy((asset_uri_scheme = node.$attr("asset-uri-scheme", "https"))['$empty?']())) { - } else { - asset_uri_scheme = "" + (asset_uri_scheme) + ":" - }; - cdn_base_url = "" + (asset_uri_scheme) + "//cdnjs.cloudflare.com/ajax/libs"; - linkcss = node['$attr?']("linkcss"); - max_width_attr = (function() {if ($truthy(node['$attr?']("max-width"))) { - return "" + " style=\"max-width: " + (node.$attr("max-width")) + ";\"" - } else { - return "" - }; return nil; })(); - result = ["<!DOCTYPE html>"]; - lang_attribute = (function() {if ($truthy(node['$attr?']("nolang"))) { - return "" - } else { - return "" + " lang=\"" + (node.$attr("lang", "en")) + "\"" - }; return nil; })(); - result['$<<']("" + "<html" + ((function() {if ($truthy(self.xml_mode)) { - return " xmlns=\"http://www.w3.org/1999/xhtml\"" - } else { - return "" - }; return nil; })()) + (lang_attribute) + ">"); - result['$<<']("" + "<head>\n" + "<meta charset=\"" + (node.$attr("encoding", "UTF-8")) + "\"" + (slash) + ">\n" + "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"" + (slash) + ">\n" + "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"" + (slash) + ">\n" + "<meta name=\"generator\" content=\"Asciidoctor " + (node.$attr("asciidoctor-version")) + "\"" + (slash) + ">"); - if ($truthy(node['$attr?']("app-name"))) { - result['$<<']("" + "<meta name=\"application-name\" content=\"" + (node.$attr("app-name")) + "\"" + (slash) + ">")}; - if ($truthy(node['$attr?']("description"))) { - result['$<<']("" + "<meta name=\"description\" content=\"" + (node.$attr("description")) + "\"" + (slash) + ">")}; - if ($truthy(node['$attr?']("keywords"))) { - result['$<<']("" + "<meta name=\"keywords\" content=\"" + (node.$attr("keywords")) + "\"" + (slash) + ">")}; - if ($truthy(node['$attr?']("authors"))) { - result['$<<']("" + "<meta name=\"author\" content=\"" + ((function() {if ($truthy((authors = node.$sub_replacements(node.$attr("authors")))['$include?']("<"))) { - - return authors.$gsub($$($nesting, 'XmlSanitizeRx'), ""); - } else { - return authors - }; return nil; })()) + "\"" + (slash) + ">")}; - if ($truthy(node['$attr?']("copyright"))) { - result['$<<']("" + "<meta name=\"copyright\" content=\"" + (node.$attr("copyright")) + "\"" + (slash) + ">")}; - if ($truthy(node['$attr?']("favicon"))) { - - if ($truthy((icon_href = node.$attr("favicon"))['$empty?']())) { - - icon_href = "favicon.ico"; - icon_type = "image/x-icon"; - } else if ($truthy((icon_ext = $$($nesting, 'Helpers').$extname(icon_href, nil)))) { - icon_type = (function() {if (icon_ext['$=='](".ico")) { - return "image/x-icon" - } else { - return "" + "image/" + (icon_ext.$slice(1, icon_ext.$length())) - }; return nil; })() - } else { - icon_type = "image/x-icon" - }; - result['$<<']("" + "<link rel=\"icon\" type=\"" + (icon_type) + "\" href=\"" + (icon_href) + "\"" + (slash) + ">");}; - result['$<<']("" + "<title>" + (node.$doctitle($hash2(["sanitize", "use_fallback"], {"sanitize": true, "use_fallback": true}))) + ""); - if ($truthy($$($nesting, 'DEFAULT_STYLESHEET_KEYS')['$include?'](node.$attr("stylesheet")))) { - - if ($truthy((webfonts = node.$attr("webfonts")))) { - result['$<<']("" + "")}; - if ($truthy(linkcss)) { - result['$<<']("" + "") - } else { - result['$<<']("" + "") - }; - } else if ($truthy(node['$attr?']("stylesheet"))) { - if ($truthy(linkcss)) { - result['$<<']("" + "") - } else { - result['$<<']("" + "") - }}; - if ($truthy(node['$attr?']("icons", "font"))) { - if ($truthy(node['$attr?']("iconfont-remote"))) { - result['$<<']("" + "") - } else { - - iconfont_stylesheet = "" + (node.$attr("iconfont-name", "font-awesome")) + ".css"; - result['$<<']("" + ""); - }}; - if ($truthy((syntax_hl = node.$syntax_highlighter()))) { - result['$<<']((syntax_hl_docinfo_head_idx = result.$size()))}; - if ($truthy((docinfo_content = node.$docinfo())['$empty?']())) { - } else { - result['$<<'](docinfo_content) - }; - result['$<<'](""); - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = (sectioned = node['$sections?']())) ? node['$attr?']("toc-class") : $c)) ? node['$attr?']("toc") : $b)) ? node['$attr?']("toc-placement", "auto") : $a))) { - classes = [node.$doctype(), node.$attr("toc-class"), "" + "toc-" + (node.$attr("toc-position", "header"))] - } else { - classes = [node.$doctype()] - }; - if ($truthy(node['$role?']())) { - classes['$<<'](node.$role())}; - result['$<<']("" + ""); - if ($truthy((docinfo_content = node.$docinfo("header"))['$empty?']())) { - } else { - result['$<<'](docinfo_content) - }; - if ($truthy(node.$noheader())) { - } else { - - result['$<<']("" + "
    "); - if (node.$doctype()['$==']("manpage")) { - - result['$<<']("" + "

    " + (node.$doctitle()) + " Manual Page

    "); - if ($truthy(($truthy($a = ($truthy($b = sectioned) ? node['$attr?']("toc") : $b)) ? node['$attr?']("toc-placement", "auto") : $a))) { - result['$<<']("" + "
    \n" + "
    " + (node.$attr("toc-title")) + "
    \n" + (node.$converter().$convert(node, "outline")) + "\n" + "
    ")}; - if ($truthy(node['$attr?']("manpurpose"))) { - result['$<<'](self.$generate_manname_section(node))}; - } else { - - if ($truthy(node['$header?']())) { - - if ($truthy(node.$notitle())) { - } else { - result['$<<']("" + "

    " + (node.$header().$title()) + "

    ") - }; - details = []; - idx = 1; - $send(node.$authors(), 'each', [], ($$4 = function(author){var self = $$4.$$s || this; - - - - if (author == null) { - author = nil; - }; - details['$<<']("" + "" + (node.$sub_replacements(author.$name())) + "" + (br)); - if ($truthy(author.$email())) { - details['$<<']("" + "" + (node.$sub_macros(author.$email())) + "" + (br))}; - return (idx = $rb_plus(idx, 1));}, $$4.$$s = self, $$4.$$arity = 1, $$4)); - if ($truthy(node['$attr?']("revnumber"))) { - details['$<<']("" + "" + (($truthy($a = node.$attr("version-label")) ? $a : "").$downcase()) + " " + (node.$attr("revnumber")) + ((function() {if ($truthy(node['$attr?']("revdate"))) { - return "," - } else { - return "" - }; return nil; })()) + "")}; - if ($truthy(node['$attr?']("revdate"))) { - details['$<<']("" + "" + (node.$attr("revdate")) + "")}; - if ($truthy(node['$attr?']("revremark"))) { - details['$<<']("" + (br) + "" + (node.$attr("revremark")) + "")}; - if ($truthy(details['$empty?']())) { - } else { - - result['$<<']("
    "); - result.$concat(details); - result['$<<']("
    "); - };}; - if ($truthy(($truthy($a = ($truthy($b = sectioned) ? node['$attr?']("toc") : $b)) ? node['$attr?']("toc-placement", "auto") : $a))) { - result['$<<']("" + "
    \n" + "
    " + (node.$attr("toc-title")) + "
    \n" + (node.$converter().$convert(node, "outline")) + "\n" + "
    ")}; - }; - result['$<<']("
    "); - }; - result['$<<']("" + "
    \n" + (node.$content()) + "\n" + "
    "); - if ($truthy(($truthy($a = node['$footnotes?']()) ? node['$attr?']("nofootnotes")['$!']() : $a))) { - - result['$<<']("" + "
    \n" + ""); - $send(node.$footnotes(), 'each', [], ($$5 = function(footnote){var self = $$5.$$s || this; - - - - if (footnote == null) { - footnote = nil; - }; - return result['$<<']("" + "
    \n" + "" + (footnote.$index()) + ". " + (footnote.$text()) + "\n" + "
    ");}, $$5.$$s = self, $$5.$$arity = 1, $$5)); - result['$<<']("
    ");}; - if ($truthy(node.$nofooter())) { - } else { - - result['$<<']("" + "
    "); - result['$<<']("
    "); - if ($truthy(node['$attr?']("revnumber"))) { - result['$<<']("" + (node.$attr("version-label")) + " " + (node.$attr("revnumber")) + (br))}; - if ($truthy(($truthy($a = node['$attr?']("last-update-label")) ? node['$attr?']("reproducible")['$!']() : $a))) { - result['$<<']("" + (node.$attr("last-update-label")) + " " + (node.$attr("docdatetime")))}; - result['$<<']("
    "); - result['$<<']("
    "); - }; - if ($truthy(syntax_hl)) { - - if ($truthy(syntax_hl['$docinfo?']("head"))) { - - $writer = [syntax_hl_docinfo_head_idx, syntax_hl.$docinfo("head", node, $hash2(["cdn_base_url", "linkcss", "self_closing_tag_slash"], {"cdn_base_url": cdn_base_url, "linkcss": linkcss, "self_closing_tag_slash": slash}))]; - $send(result, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - result.$delete_at(syntax_hl_docinfo_head_idx) - }; - if ($truthy(syntax_hl['$docinfo?']("footer"))) { - result['$<<'](syntax_hl.$docinfo("footer", node, $hash2(["cdn_base_url", "linkcss", "self_closing_tag_slash"], {"cdn_base_url": cdn_base_url, "linkcss": linkcss, "self_closing_tag_slash": slash})))};}; - if ($truthy(node['$attr?']("stem"))) { - - eqnums_val = node.$attr("eqnums", "none"); - if ($truthy(eqnums_val['$empty?']())) { - eqnums_val = "AMS"}; - eqnums_opt = "" + " equationNumbers: { autoNumber: \"" + (eqnums_val) + "\" } "; - result['$<<']("" + "\n" + "");}; - if ($truthy((docinfo_content = node.$docinfo("footer"))['$empty?']())) { - } else { - result['$<<'](docinfo_content) - }; - result['$<<'](""); - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_document$3.$$arity = 1); - - Opal.def(self, '$convert_embedded', $Html5Converter_convert_embedded$6 = function $$convert_embedded(node) { - var $a, $b, $c, $$7, self = this, result = nil, id_attr = nil, toc_p = nil; - - - result = []; - if (node.$doctype()['$==']("manpage")) { - - if ($truthy(node.$notitle())) { - } else { - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - result['$<<']("" + "" + (node.$doctitle()) + " Manual Page"); - }; - if ($truthy(node['$attr?']("manpurpose"))) { - result['$<<'](self.$generate_manname_section(node))}; - } else if ($truthy(($truthy($a = node['$header?']()) ? node.$notitle()['$!']() : $a))) { - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - result['$<<']("" + "" + (node.$header().$title()) + "");}; - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = node['$sections?']()) ? node['$attr?']("toc") : $c)) ? (toc_p = node.$attr("toc-placement"))['$!=']("macro") : $b)) ? toc_p['$!=']("preamble") : $a))) { - result['$<<']("" + "
    \n" + "
    " + (node.$attr("toc-title")) + "
    \n" + (node.$converter().$convert(node, "outline")) + "\n" + "
    ")}; - result['$<<'](node.$content()); - if ($truthy(($truthy($a = node['$footnotes?']()) ? node['$attr?']("nofootnotes")['$!']() : $a))) { - - result['$<<']("" + "
    \n" + ""); - $send(node.$footnotes(), 'each', [], ($$7 = function(footnote){var self = $$7.$$s || this; - - - - if (footnote == null) { - footnote = nil; - }; - return result['$<<']("" + "
    \n" + "" + (footnote.$index()) + ". " + (footnote.$text()) + "\n" + "
    ");}, $$7.$$s = self, $$7.$$arity = 1, $$7)); - result['$<<']("
    ");}; - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_embedded$6.$$arity = 1); - - Opal.def(self, '$convert_outline', $Html5Converter_convert_outline$8 = function $$convert_outline(node, opts) { - var $a, $b, $$9, self = this, sectnumlevels = nil, toclevels = nil, sections = nil, result = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy(node['$sections?']())) { - } else { - return nil - }; - sectnumlevels = ($truthy($a = opts['$[]']("sectnumlevels")) ? $a : ($truthy($b = node.$document().$attributes()['$[]']("sectnumlevels")) ? $b : 3).$to_i()); - toclevels = ($truthy($a = opts['$[]']("toclevels")) ? $a : ($truthy($b = node.$document().$attributes()['$[]']("toclevels")) ? $b : 2).$to_i()); - sections = node.$sections(); - result = ["" + "
      "]; - $send(sections, 'each', [], ($$9 = function(section){var self = $$9.$$s || this, $c, slevel = nil, stitle = nil, signifier = nil, child_toc_level = nil; - - - - if (section == null) { - section = nil; - }; - slevel = section.$level(); - if ($truthy(section.$caption())) { - stitle = section.$captioned_title() - } else if ($truthy(($truthy($c = section.$numbered()) ? $rb_le(slevel, sectnumlevels) : $c))) { - if ($truthy(($truthy($c = $rb_lt(slevel, 2)) ? node.$document().$doctype()['$==']("book") : $c))) { - if (section.$sectname()['$==']("chapter")) { - stitle = "" + ((function() {if ($truthy((signifier = node.$document().$attributes()['$[]']("chapter-signifier")))) { - return "" + (signifier) + " " - } else { - return "" - }; return nil; })()) + (section.$sectnum()) + " " + (section.$title()) - } else if (section.$sectname()['$==']("part")) { - stitle = "" + ((function() {if ($truthy((signifier = node.$document().$attributes()['$[]']("part-signifier")))) { - return "" + (signifier) + " " - } else { - return "" - }; return nil; })()) + (section.$sectnum(nil, ":")) + " " + (section.$title()) - } else { - stitle = "" + (section.$sectnum()) + " " + (section.$title()) - } - } else { - stitle = "" + (section.$sectnum()) + " " + (section.$title()) - } - } else { - stitle = section.$title() - }; - if ($truthy(stitle['$include?']("" + (stitle) + ""); - result['$<<'](child_toc_level); - return result['$<<'](""); - } else { - return result['$<<']("" + "
    • " + (stitle) + "
    • ") - };}, $$9.$$s = self, $$9.$$arity = 1, $$9)); - result['$<<']("
    "); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_outline$8.$$arity = -2); - - Opal.def(self, '$convert_section', $Html5Converter_convert_section$10 = function $$convert_section(node) { - var $a, $b, self = this, doc_attrs = nil, level = nil, title = nil, signifier = nil, id_attr = nil, id = nil, role = nil; - - - doc_attrs = node.$document().$attributes(); - level = node.$level(); - if ($truthy(node.$caption())) { - title = node.$captioned_title() - } else if ($truthy(($truthy($a = node.$numbered()) ? $rb_le(level, ($truthy($b = doc_attrs['$[]']("sectnumlevels")) ? $b : 3).$to_i()) : $a))) { - if ($truthy(($truthy($a = $rb_lt(level, 2)) ? node.$document().$doctype()['$==']("book") : $a))) { - if (node.$sectname()['$==']("chapter")) { - title = "" + ((function() {if ($truthy((signifier = doc_attrs['$[]']("chapter-signifier")))) { - return "" + (signifier) + " " - } else { - return "" - }; return nil; })()) + (node.$sectnum()) + " " + (node.$title()) - } else if (node.$sectname()['$==']("part")) { - title = "" + ((function() {if ($truthy((signifier = doc_attrs['$[]']("part-signifier")))) { - return "" + (signifier) + " " - } else { - return "" - }; return nil; })()) + (node.$sectnum(nil, ":")) + " " + (node.$title()) - } else { - title = "" + (node.$sectnum()) + " " + (node.$title()) - } - } else { - title = "" + (node.$sectnum()) + " " + (node.$title()) - } - } else { - title = node.$title() - }; - if ($truthy(node.$id())) { - - id_attr = "" + " id=\"" + ((id = node.$id())) + "\""; - if ($truthy(doc_attrs['$[]']("sectlinks"))) { - title = "" + "" + (title) + ""}; - if ($truthy(doc_attrs['$[]']("sectanchors"))) { - if (doc_attrs['$[]']("sectanchors")['$==']("after")) { - title = "" + (title) + "" - } else { - title = "" + "" + (title) - }}; - } else { - id_attr = "" - }; - if (level['$=='](0)) { - return "" + "" + (title) + "\n" + (node.$content()) - } else { - return "" + "
    \n" + "" + (title) + "\n" + ((function() {if (level['$=='](1)) { - return "" + "
    \n" + (node.$content()) + "\n" + "
    " - } else { - return node.$content() - }; return nil; })()) + "\n" + "
    " - }; - }, $Html5Converter_convert_section$10.$$arity = 1); - - Opal.def(self, '$convert_admonition', $Html5Converter_convert_admonition$11 = function $$convert_admonition(node) { - var $a, self = this, id_attr = nil, name = nil, title_element = nil, label = nil, role = nil; - - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - name = node.$attr("name"); - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$title()) + "
    \n" - } else { - return "" - }; return nil; })(); - if ($truthy(node.$document()['$attr?']("icons"))) { - if ($truthy(($truthy($a = node.$document()['$attr?']("icons", "font")) ? node['$attr?']("icon")['$!']() : $a))) { - label = "" + "" - } else { - label = "" + "\""" - } - } else { - label = "" + "
    " + (node.$attr("textlabel")) + "
    " - }; - return "" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "
    \n" + (label) + "\n" + "\n" + (title_element) + (node.$content()) + "\n" + "
    \n" + ""; - }, $Html5Converter_convert_admonition$11.$$arity = 1); - - Opal.def(self, '$convert_audio', $Html5Converter_convert_audio$12 = function $$convert_audio(node) { - var $a, self = this, xml = nil, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, start_t = nil, end_t = nil, time_anchor = nil; - - - xml = self.xml_mode; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["audioblock", node.$role()].$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$title()) + "
    \n" - } else { - return "" - }; return nil; })(); - start_t = node.$attr("start"); - end_t = node.$attr("end"); - time_anchor = (function() {if ($truthy(($truthy($a = start_t) ? $a : end_t))) { - return "" + "#t=" + (($truthy($a = start_t) ? $a : "")) + ((function() {if ($truthy(end_t)) { - return "" + "," + (end_t) - } else { - return "" - }; return nil; })()) - } else { - return "" - }; return nil; })(); - return "" + "\n" + (title_element) + "
    \n" + "\n" + "
    \n" + ""; - }, $Html5Converter_convert_audio$12.$$arity = 1); - - Opal.def(self, '$convert_colist', $Html5Converter_convert_colist$13 = function $$convert_colist(node) { - var $a, $$14, $$15, self = this, result = nil, id_attribute = nil, classes = nil, class_attribute = nil, font_icons = nil, num = nil; - - - result = []; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["colist", node.$style(), node.$role()].$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - result['$<<']("" + ""); - if ($truthy(node['$title?']())) { - result['$<<']("" + "
    " + (node.$title()) + "
    ")}; - if ($truthy(node.$document()['$attr?']("icons"))) { - - result['$<<'](""); - $a = [node.$document()['$attr?']("icons", "font"), 0], (font_icons = $a[0]), (num = $a[1]), $a; - $send(node.$items(), 'each', [], ($$14 = function(item){var self = $$14.$$s || this, num_label = nil; - if (self.void_element_slash == null) self.void_element_slash = nil; - - - - if (item == null) { - item = nil; - }; - num = $rb_plus(num, 1); - if ($truthy(font_icons)) { - num_label = "" + "" + (num) + "" - } else { - num_label = "" + "\""" - }; - return result['$<<']("" + "\n" + "\n" + "\n" + "");}, $$14.$$s = self, $$14.$$arity = 1, $$14)); - result['$<<']("
    " + (num_label) + "" + (item.$text()) + ((function() {if ($truthy(item['$blocks?']())) { - return $rb_plus($$($nesting, 'LF'), item.$content()) - } else { - return "" - }; return nil; })()) + "
    "); - } else { - - result['$<<']("
      "); - $send(node.$items(), 'each', [], ($$15 = function(item){var self = $$15.$$s || this; - - - - if (item == null) { - item = nil; - }; - return result['$<<']("" + "
    1. \n" + "

      " + (item.$text()) + "

      " + ((function() {if ($truthy(item['$blocks?']())) { - return $rb_plus($$($nesting, 'LF'), item.$content()) - } else { - return "" - }; return nil; })()) + "\n" + "
    2. ");}, $$15.$$s = self, $$15.$$arity = 1, $$15)); - result['$<<']("
    "); - }; - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_colist$13.$$arity = 1); - - Opal.def(self, '$convert_dlist', $Html5Converter_convert_dlist$16 = function $$convert_dlist(node) { - var $$17, $a, $$19, $$21, self = this, result = nil, id_attribute = nil, classes = nil, $case = nil, class_attribute = nil, slash = nil, col_style_attribute = nil, dt_style_attribute = nil; - - - result = []; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = (function() {$case = node.$style(); - if ("qanda"['$===']($case)) {return ["qlist", "qanda", node.$role()]} - else if ("horizontal"['$===']($case)) {return ["hdlist", node.$role()]} - else {return ["dlist", node.$style(), node.$role()]}})().$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - result['$<<']("" + ""); - if ($truthy(node['$title?']())) { - result['$<<']("" + "
    " + (node.$title()) + "
    ")}; - $case = node.$style(); - if ("qanda"['$===']($case)) { - result['$<<']("
      "); - $send(node.$items(), 'each', [], ($$17 = function(terms, dd){var self = $$17.$$s || this, $$18; - - - - if (terms == null) { - terms = nil; - }; - - if (dd == null) { - dd = nil; - }; - result['$<<']("
    1. "); - $send(terms, 'each', [], ($$18 = function(dt){var self = $$18.$$s || this; - - - - if (dt == null) { - dt = nil; - }; - return result['$<<']("" + "

      " + (dt.$text()) + "

      ");}, $$18.$$s = self, $$18.$$arity = 1, $$18)); - if ($truthy(dd)) { - - if ($truthy(dd['$text?']())) { - result['$<<']("" + "

      " + (dd.$text()) + "

      ")}; - if ($truthy(dd['$blocks?']())) { - result['$<<'](dd.$content())};}; - return result['$<<']("
    2. ");}, $$17.$$s = self, $$17.$$arity = 2, $$17)); - result['$<<']("
    ");} - else if ("horizontal"['$===']($case)) { - slash = self.void_element_slash; - result['$<<'](""); - if ($truthy(($truthy($a = node['$attr?']("labelwidth")) ? $a : node['$attr?']("itemwidth")))) { - - result['$<<'](""); - col_style_attribute = (function() {if ($truthy(node['$attr?']("labelwidth"))) { - return "" + " style=\"width: " + (node.$attr("labelwidth").$chomp("%")) + "%;\"" - } else { - return "" - }; return nil; })(); - result['$<<']("" + ""); - col_style_attribute = (function() {if ($truthy(node['$attr?']("itemwidth"))) { - return "" + " style=\"width: " + (node.$attr("itemwidth").$chomp("%")) + "%;\"" - } else { - return "" - }; return nil; })(); - result['$<<']("" + ""); - result['$<<']("");}; - $send(node.$items(), 'each', [], ($$19 = function(terms, dd){var self = $$19.$$s || this, $$20, first_term = nil; - - - - if (terms == null) { - terms = nil; - }; - - if (dd == null) { - dd = nil; - }; - result['$<<'](""); - result['$<<']("" + ""); - result['$<<'](""); - return result['$<<']("");}, $$19.$$s = self, $$19.$$arity = 2, $$19)); - result['$<<']("
    "); - first_term = true; - $send(terms, 'each', [], ($$20 = function(dt){var self = $$20.$$s || this; - - - - if (dt == null) { - dt = nil; - }; - if ($truthy(first_term)) { - } else { - result['$<<']("" + "") - }; - result['$<<'](dt.$text()); - return (first_term = nil);}, $$20.$$s = self, $$20.$$arity = 1, $$20)); - result['$<<'](""); - if ($truthy(dd)) { - - if ($truthy(dd['$text?']())) { - result['$<<']("" + "

    " + (dd.$text()) + "

    ")}; - if ($truthy(dd['$blocks?']())) { - result['$<<'](dd.$content())};}; - result['$<<']("
    ");} - else { - result['$<<']("
    "); - dt_style_attribute = (function() {if ($truthy(node.$style())) { - return "" - } else { - return " class=\"hdlist1\"" - }; return nil; })(); - $send(node.$items(), 'each', [], ($$21 = function(terms, dd){var self = $$21.$$s || this, $$22; - - - - if (terms == null) { - terms = nil; - }; - - if (dd == null) { - dd = nil; - }; - $send(terms, 'each', [], ($$22 = function(dt){var self = $$22.$$s || this; - - - - if (dt == null) { - dt = nil; - }; - return result['$<<']("" + "" + (dt.$text()) + "");}, $$22.$$s = self, $$22.$$arity = 1, $$22)); - if ($truthy(dd)) { - - result['$<<']("
    "); - if ($truthy(dd['$text?']())) { - result['$<<']("" + "

    " + (dd.$text()) + "

    ")}; - if ($truthy(dd['$blocks?']())) { - result['$<<'](dd.$content())}; - return result['$<<']("
    "); - } else { - return nil - };}, $$21.$$s = self, $$21.$$arity = 2, $$21)); - result['$<<']("
    ");}; - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_dlist$16.$$arity = 1); - - Opal.def(self, '$convert_example', $Html5Converter_convert_example$23 = function $$convert_example(node) { - var self = this, id_attribute = nil, class_attribute = nil, summary_element = nil, title_element = nil, role = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - if ($truthy(node['$option?']("collapsible"))) { - - class_attribute = (function() {if ($truthy(node.$role())) { - return "" + " class=\"" + (node.$role()) + "\"" - } else { - return "" - }; return nil; })(); - summary_element = (function() {if ($truthy(node['$title?']())) { - return "" + "" + (node.$title()) + "" - } else { - return "Details" - }; return nil; })(); - return "" + "\n" + (summary_element) + "\n" + "
    \n" + (node.$content()) + "\n" + "
    \n" + ""; - } else { - - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$captioned_title()) + "
    \n" - } else { - return "" - }; return nil; })(); - return "" + "\n" + (title_element) + "
    \n" + (node.$content()) + "\n" + "
    \n" + ""; - }; - }, $Html5Converter_convert_example$23.$$arity = 1); - - Opal.def(self, '$convert_floating_title', $Html5Converter_convert_floating_title$24 = function $$convert_floating_title(node) { - var self = this, tag_name = nil, id_attribute = nil, classes = nil; - - - tag_name = "" + "h" + ($rb_plus(node.$level(), 1)); - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = [node.$style(), node.$role()].$compact(); - return "" + "<" + (tag_name) + (id_attribute) + " class=\"" + (classes.$join(" ")) + "\">" + (node.$title()) + ""; - }, $Html5Converter_convert_floating_title$24.$$arity = 1); - - Opal.def(self, '$convert_image', $Html5Converter_convert_image$25 = function $$convert_image(node) { - var $a, $b, $c, self = this, target = nil, width_attr = nil, height_attr = nil, svg = nil, obj = nil, img = nil, fallback = nil, id_attr = nil, classes = nil, class_attr = nil, title_el = nil; - - - target = node.$attr("target"); - width_attr = (function() {if ($truthy(node['$attr?']("width"))) { - return "" + " width=\"" + (node.$attr("width")) + "\"" - } else { - return "" - }; return nil; })(); - height_attr = (function() {if ($truthy(node['$attr?']("height"))) { - return "" + " height=\"" + (node.$attr("height")) + "\"" - } else { - return "" - }; return nil; })(); - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = node['$attr?']("format", "svg")) ? $c : target['$include?'](".svg"))) ? $rb_lt(node.$document().$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $b)) ? ($truthy($b = (svg = node['$option?']("inline"))) ? $b : (obj = node['$option?']("interactive"))) : $a))) { - if ($truthy(svg)) { - img = ($truthy($a = self.$read_svg_contents(node, target)) ? $a : "" + "" + (node.$alt()) + "") - } else if ($truthy(obj)) { - - fallback = (function() {if ($truthy(node['$attr?']("fallback"))) { - return "" + "\""" - } else { - return "" + "" + (node.$alt()) + "" - }; return nil; })(); - img = "" + "" + (fallback) + "";}}; - img = ($truthy($a = img) ? $a : "" + "\"""); - if ($truthy(node['$attr?']("link"))) { - img = "" + "" + (img) + ""}; - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["imageblock"]; - if ($truthy(node['$attr?']("float"))) { - classes['$<<'](node.$attr("float"))}; - if ($truthy(node['$attr?']("align"))) { - classes['$<<']("" + "text-" + (node.$attr("align")))}; - if ($truthy(node.$role())) { - classes['$<<'](node.$role())}; - class_attr = "" + " class=\"" + (classes.$join(" ")) + "\""; - title_el = (function() {if ($truthy(node['$title?']())) { - return "" + "\n
    " + (node.$captioned_title()) + "
    " - } else { - return "" - }; return nil; })(); - return "" + "\n" + "
    \n" + (img) + "\n" + "
    " + (title_el) + "\n" + ""; - }, $Html5Converter_convert_image$25.$$arity = 1); - - Opal.def(self, '$convert_listing', $Html5Converter_convert_listing$26 = function $$convert_listing(node) { - var $a, self = this, nowrap = nil, lang = nil, syntax_hl = nil, opts = nil, doc_attrs = nil, $writer = nil, pre_open = nil, pre_close = nil, id_attribute = nil, title_element = nil, role = nil; - - - nowrap = ($truthy($a = node['$option?']("nowrap")) ? $a : node.$document()['$attr?']("prewrap")['$!']()); - if (node.$style()['$==']("source")) { - - lang = node.$attr("language"); - if ($truthy((syntax_hl = node.$document().$syntax_highlighter()))) { - - opts = (function() {if ($truthy(syntax_hl['$highlight?']())) { - return $hash2(["css_mode", "style"], {"css_mode": ($truthy($a = (doc_attrs = node.$document().$attributes())['$[]']("" + (syntax_hl.$name()) + "-css")) ? $a : "class").$to_sym(), "style": doc_attrs['$[]']("" + (syntax_hl.$name()) + "-style")}) - } else { - return $hash2([], {}) - }; return nil; })(); - - $writer = ["nowrap", nowrap]; - $send(opts, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - } else { - - pre_open = "" + "
    ";
    -            pre_close = "
    "; - }; - } else { - - pre_open = "" + ""; - pre_close = ""; - }; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$captioned_title()) + "
    \n" - } else { - return "" - }; return nil; })(); - return "" + "\n" + (title_element) + "
    \n" + ((function() {if ($truthy(syntax_hl)) { - - return syntax_hl.$format(node, lang, opts); - } else { - return $rb_plus($rb_plus(pre_open, ($truthy($a = node.$content()) ? $a : "")), pre_close) - }; return nil; })()) + "\n" + "
    \n" + ""; - }, $Html5Converter_convert_listing$26.$$arity = 1); - - Opal.def(self, '$convert_literal', $Html5Converter_convert_literal$27 = function $$convert_literal(node) { - var $a, self = this, id_attribute = nil, title_element = nil, nowrap = nil, role = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$title()) + "
    \n" - } else { - return "" - }; return nil; })(); - nowrap = ($truthy($a = node.$document()['$attr?']("prewrap")['$!']()) ? $a : node['$option?']("nowrap")); - return "" + "\n" + (title_element) + "
    \n" + "" + (node.$content()) + "\n" + "
    \n" + ""; - }, $Html5Converter_convert_literal$27.$$arity = 1); - - Opal.def(self, '$convert_stem', $Html5Converter_convert_stem$28 = function $$convert_stem(node) { - var $a, $b, $$29, self = this, id_attribute = nil, title_element = nil, style = nil, open = nil, close = nil, equation = nil, br = nil, role = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$title()) + "
    \n" - } else { - return "" - }; return nil; })(); - $b = $$($nesting, 'BLOCK_MATH_DELIMITERS')['$[]']((style = node.$style().$to_sym())), $a = Opal.to_ary($b), (open = ($a[0] == null ? nil : $a[0])), (close = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy((equation = node.$content()))) { - - if ($truthy((($a = style['$==']("asciimath")) ? equation['$include?']($$($nesting, 'LF')) : style['$==']("asciimath")))) { - - br = "" + ($$($nesting, 'LF')) + ""; - equation = $send(equation, 'gsub', [$$($nesting, 'StemBreakRx')], ($$29 = function(){var self = $$29.$$s || this, $c; - - return "" + (close) + ($rb_times(br, $rb_minus((($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$count($$($nesting, 'LF')), 1))) + ($$($nesting, 'LF')) + (open)}, $$29.$$s = self, $$29.$$arity = 0, $$29));}; - if ($truthy(($truthy($a = equation['$start_with?'](open)) ? equation['$end_with?'](close) : $a))) { - } else { - equation = "" + (open) + (equation) + (close) - }; - } else { - equation = "" - }; - return "" + "\n" + (title_element) + "
    \n" + (equation) + "\n" + "
    \n" + ""; - }, $Html5Converter_convert_stem$28.$$arity = 1); - - Opal.def(self, '$convert_olist', $Html5Converter_convert_olist$30 = function $$convert_olist(node) { - var $$31, self = this, result = nil, id_attribute = nil, classes = nil, class_attribute = nil, type_attribute = nil, keyword = nil, start_attribute = nil, reversed_attribute = nil; - - - result = []; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["olist", node.$style(), node.$role()].$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - result['$<<']("" + ""); - if ($truthy(node['$title?']())) { - result['$<<']("" + "
    " + (node.$title()) + "
    ")}; - type_attribute = (function() {if ($truthy((keyword = node.$list_marker_keyword()))) { - return "" + " type=\"" + (keyword) + "\"" - } else { - return "" - }; return nil; })(); - start_attribute = (function() {if ($truthy(node['$attr?']("start"))) { - return "" + " start=\"" + (node.$attr("start")) + "\"" - } else { - return "" - }; return nil; })(); - reversed_attribute = (function() {if ($truthy(node['$option?']("reversed"))) { - - return self.$append_boolean_attribute("reversed", self.xml_mode); - } else { - return "" - }; return nil; })(); - result['$<<']("" + "
      "); - $send(node.$items(), 'each', [], ($$31 = function(item){var self = $$31.$$s || this; - - - - if (item == null) { - item = nil; - }; - if ($truthy(item.$id())) { - result['$<<']("" + "
    1. ") - } else if ($truthy(item.$role())) { - result['$<<']("" + "
    2. ") - } else { - result['$<<']("
    3. ") - }; - result['$<<']("" + "

      " + (item.$text()) + "

      "); - if ($truthy(item['$blocks?']())) { - result['$<<'](item.$content())}; - return result['$<<']("
    4. ");}, $$31.$$s = self, $$31.$$arity = 1, $$31)); - result['$<<']("
    "); - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_olist$30.$$arity = 1); - - Opal.def(self, '$convert_open', $Html5Converter_convert_open$32 = function $$convert_open(node) { - var $a, $b, $c, self = this, style = nil, id_attr = nil, title_el = nil, role = nil; - - if ((style = node.$style())['$==']("abstract")) { - if ($truthy((($a = node.$parent()['$=='](node.$document())) ? node.$document().$doctype()['$==']("book") : node.$parent()['$=='](node.$document())))) { - - self.$logger().$warn("abstract block cannot be used in a document without a title when doctype is book. Excluding block content."); - return ""; - } else { - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_el = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$title()) + "
    \n" - } else { - return "" - }; return nil; })(); - return "" + "\n" + (title_el) + "
    \n" + (node.$content()) + "\n" + "
    \n" + ""; - } - } else if ($truthy((($a = style['$==']("partintro")) ? ($truthy($b = ($truthy($c = $rb_gt(node.$level(), 0)) ? $c : node.$parent().$context()['$!=']("section"))) ? $b : node.$document().$doctype()['$!=']("book")) : style['$==']("partintro")))) { - - self.$logger().$error("partintro block can only be used when doctype is book and must be a child of a book part. Excluding block content."); - return ""; - } else { - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_el = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$title()) + "
    \n" - } else { - return "" - }; return nil; })(); - return "" + "" - }, $Html5Converter_convert_page_break$33.$$arity = 1); - - Opal.def(self, '$convert_paragraph', $Html5Converter_convert_paragraph$34 = function $$convert_paragraph(node) { - var self = this, attributes = nil; - - - if ($truthy(node.$role())) { - attributes = "" + ((function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })()) + " class=\"paragraph " + (node.$role()) + "\"" - } else if ($truthy(node.$id())) { - attributes = "" + " id=\"" + (node.$id()) + "\" class=\"paragraph\"" - } else { - attributes = " class=\"paragraph\"" - }; - if ($truthy(node['$title?']())) { - return "" + "\n" + "
    " + (node.$title()) + "
    \n" + "

    " + (node.$content()) + "

    \n" + "" - } else { - return "" + "\n" + "

    " + (node.$content()) + "

    \n" + "" - }; - }, $Html5Converter_convert_paragraph$34.$$arity = 1); - Opal.alias(self, "convert_pass", "content_only"); - - Opal.def(self, '$convert_preamble', $Html5Converter_convert_preamble$35 = function $$convert_preamble(node) { - var $a, $b, self = this, doc = nil, toc = nil; - - - if ($truthy(($truthy($a = ($truthy($b = (doc = node.$document())['$attr?']("toc-placement", "preamble")) ? doc['$sections?']() : $b)) ? doc['$attr?']("toc") : $a))) { - toc = "" + "\n" + "
    \n" + "
    " + (doc.$attr("toc-title")) + "
    \n" + (doc.$converter().$convert(doc, "outline")) + "\n" + "
    " - } else { - toc = "" - }; - return "" + "
    \n" + "
    \n" + (node.$content()) + "\n" + "
    " + (toc) + "\n" + "
    "; - }, $Html5Converter_convert_preamble$35.$$arity = 1); - - Opal.def(self, '$convert_quote', $Html5Converter_convert_quote$36 = function $$convert_quote(node) { - var $a, self = this, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, attribution = nil, citetitle = nil, cite_element = nil, attribution_text = nil, attribution_element = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["quoteblock", node.$role()].$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "\n
    " + (node.$title()) + "
    " - } else { - return "" - }; return nil; })(); - attribution = (function() {if ($truthy(node['$attr?']("attribution"))) { - - return node.$attr("attribution"); - } else { - return nil - }; return nil; })(); - citetitle = (function() {if ($truthy(node['$attr?']("citetitle"))) { - - return node.$attr("citetitle"); - } else { - return nil - }; return nil; })(); - if ($truthy(($truthy($a = attribution) ? $a : citetitle))) { - - cite_element = (function() {if ($truthy(citetitle)) { - return "" + "" + (citetitle) + "" - } else { - return "" - }; return nil; })(); - attribution_text = (function() {if ($truthy(attribution)) { - return "" + "— " + (attribution) + ((function() {if ($truthy(citetitle)) { - return "" + "\n" - } else { - return "" - }; return nil; })()) - } else { - return "" - }; return nil; })(); - attribution_element = "" + "\n
    \n" + (attribution_text) + (cite_element) + "\n
    "; - } else { - attribution_element = "" - }; - return "" + "" + (title_element) + "\n" + "
    \n" + (node.$content()) + "\n" + "
    " + (attribution_element) + "\n" + ""; - }, $Html5Converter_convert_quote$36.$$arity = 1); - - Opal.def(self, '$convert_thematic_break', $Html5Converter_convert_thematic_break$37 = function $$convert_thematic_break(node) { - var self = this; - - return "" + "" - }, $Html5Converter_convert_thematic_break$37.$$arity = 1); - - Opal.def(self, '$convert_sidebar', $Html5Converter_convert_sidebar$38 = function $$convert_sidebar(node) { - var self = this, id_attribute = nil, title_element = nil, role = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "
    " + (node.$title()) + "
    \n" - } else { - return "" - }; return nil; })(); - return "" + "\n" + "
    \n" + (title_element) + (node.$content()) + "\n" + "
    \n" + ""; - }, $Html5Converter_convert_sidebar$38.$$arity = 1); - - Opal.def(self, '$convert_table', $Html5Converter_convert_table$39 = function $$convert_table(node) { - var $a, $$40, $$41, self = this, result = nil, id_attribute = nil, frame = nil, classes = nil, stripes = nil, styles = nil, autowidth = nil, tablewidth = nil, role = nil, class_attribute = nil, style_attribute = nil, slash = nil; - - - result = []; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - if ((frame = node.$attr("frame", "all", "table-frame"))['$==']("topbot")) { - frame = "ends"}; - classes = ["tableblock", "" + "frame-" + (frame), "" + "grid-" + (node.$attr("grid", "all", "table-grid"))]; - if ($truthy((stripes = node.$attr("stripes", nil, "table-stripes")))) { - classes['$<<']("" + "stripes-" + (stripes))}; - styles = []; - if ($truthy(($truthy($a = (autowidth = node['$option?']("autowidth"))) ? node['$attr?']("width")['$!']() : $a))) { - classes['$<<']("fit-content") - } else if ((tablewidth = node.$attr("tablepcwidth"))['$=='](100)) { - classes['$<<']("stretch") - } else { - styles['$<<']("" + "width: " + (tablewidth) + "%;") - }; - if ($truthy(node['$attr?']("float"))) { - classes['$<<'](node.$attr("float"))}; - if ($truthy((role = node.$role()))) { - classes['$<<'](role)}; - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - style_attribute = (function() {if ($truthy(styles['$empty?']())) { - return "" - } else { - return "" + " style=\"" + (styles.$join(" ")) + "\"" - }; return nil; })(); - result['$<<']("" + ""); - if ($truthy(node['$title?']())) { - result['$<<']("" + "" + (node.$captioned_title()) + "")}; - if ($truthy($rb_gt(node.$attr("rowcount"), 0))) { - - slash = self.void_element_slash; - result['$<<'](""); - if ($truthy(autowidth)) { - result = $rb_plus(result, $$($nesting, 'Array').$new(node.$columns().$size(), "" + "")) - } else { - $send(node.$columns(), 'each', [], ($$40 = function(col){var self = $$40.$$s || this; - - - - if (col == null) { - col = nil; - }; - return result['$<<']((function() {if ($truthy(col['$option?']("autowidth"))) { - return "" + "" - } else { - return "" + "" - }; return nil; })());}, $$40.$$s = self, $$40.$$arity = 1, $$40)) - }; - result['$<<'](""); - $send(node.$rows().$to_h(), 'each', [], ($$41 = function(tsec, rows){var self = $$41.$$s || this, $$42; - - - - if (tsec == null) { - tsec = nil; - }; - - if (rows == null) { - rows = nil; - }; - if ($truthy(rows['$empty?']())) { - return nil;}; - result['$<<']("" + ""); - $send(rows, 'each', [], ($$42 = function(row){var self = $$42.$$s || this, $$43; - - - - if (row == null) { - row = nil; - }; - result['$<<'](""); - $send(row, 'each', [], ($$43 = function(cell){var self = $$43.$$s || this, $b, cell_content = nil, $case = nil, cell_tag_name = nil, cell_class_attribute = nil, cell_colspan_attribute = nil, cell_rowspan_attribute = nil, cell_style_attribute = nil; - - - - if (cell == null) { - cell = nil; - }; - if (tsec['$==']("head")) { - cell_content = cell.$text() - } else { - $case = cell.$style(); - if ("asciidoc"['$===']($case)) {cell_content = "" + "
    " + (cell.$content()) + "
    "} - else if ("literal"['$===']($case)) {cell_content = "" + "
    " + (cell.$text()) + "
    "} - else {cell_content = (function() {if ($truthy((cell_content = cell.$content())['$empty?']())) { - return "" - } else { - return "" + "

    " + (cell_content.$join("" + "

    \n" + "

    ")) + "

    " - }; return nil; })()} - }; - cell_tag_name = (function() {if ($truthy(($truthy($b = tsec['$==']("head")) ? $b : cell.$style()['$==']("header")))) { - return "th" - } else { - return "td" - }; return nil; })(); - cell_class_attribute = "" + " class=\"tableblock halign-" + (cell.$attr("halign")) + " valign-" + (cell.$attr("valign")) + "\""; - cell_colspan_attribute = (function() {if ($truthy(cell.$colspan())) { - return "" + " colspan=\"" + (cell.$colspan()) + "\"" - } else { - return "" - }; return nil; })(); - cell_rowspan_attribute = (function() {if ($truthy(cell.$rowspan())) { - return "" + " rowspan=\"" + (cell.$rowspan()) + "\"" - } else { - return "" - }; return nil; })(); - cell_style_attribute = (function() {if ($truthy(node.$document()['$attr?']("cellbgcolor"))) { - return "" + " style=\"background-color: " + (node.$document().$attr("cellbgcolor")) + ";\"" - } else { - return "" - }; return nil; })(); - return result['$<<']("" + "<" + (cell_tag_name) + (cell_class_attribute) + (cell_colspan_attribute) + (cell_rowspan_attribute) + (cell_style_attribute) + ">" + (cell_content) + "");}, $$43.$$s = self, $$43.$$arity = 1, $$43)); - return result['$<<']("");}, $$42.$$s = self, $$42.$$arity = 1, $$42)); - return result['$<<']("" + "
    ");}, $$41.$$s = self, $$41.$$arity = 2, $$41));}; - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_table$39.$$arity = 1); - - Opal.def(self, '$convert_toc', $Html5Converter_convert_toc$44 = function $$convert_toc(node) { - var $a, $b, self = this, doc = nil, id_attr = nil, title_id_attr = nil, title = nil, levels = nil, role = nil; - - - if ($truthy(($truthy($a = ($truthy($b = (doc = node.$document())['$attr?']("toc-placement", "macro")) ? doc['$sections?']() : $b)) ? doc['$attr?']("toc") : $a))) { - } else { - return "" - }; - if ($truthy(node.$id())) { - - id_attr = "" + " id=\"" + (node.$id()) + "\""; - title_id_attr = "" + " id=\"" + (node.$id()) + "title\""; - } else { - - id_attr = " id=\"toc\""; - title_id_attr = " id=\"toctitle\""; - }; - title = (function() {if ($truthy(node['$title?']())) { - return node.$title() - } else { - - return doc.$attr("toc-title"); - }; return nil; })(); - levels = (function() {if ($truthy(node['$attr?']("levels"))) { - return node.$attr("levels").$to_i() - } else { - return nil - }; return nil; })(); - role = (function() {if ($truthy(node['$role?']())) { - return node.$role() - } else { - - return doc.$attr("toc-class", "toc"); - }; return nil; })(); - return "" + "\n" + "" + (title) + "\n" + (doc.$converter().$convert(doc, "outline", $hash2(["toclevels"], {"toclevels": levels}))) + "\n" + ""; - }, $Html5Converter_convert_toc$44.$$arity = 1); - - Opal.def(self, '$convert_ulist', $Html5Converter_convert_ulist$45 = function $$convert_ulist(node) { - var $$46, self = this, result = nil, id_attribute = nil, div_classes = nil, marker_checked = nil, marker_unchecked = nil, checklist = nil, ul_class_attribute = nil; - - - result = []; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - div_classes = ["ulist", node.$style(), node.$role()].$compact(); - marker_checked = (marker_unchecked = ""); - if ($truthy((checklist = node['$option?']("checklist")))) { - - div_classes.$unshift(div_classes.$shift(), "checklist"); - ul_class_attribute = " class=\"checklist\""; - if ($truthy(node['$option?']("interactive"))) { - if ($truthy(self.xml_mode)) { - - marker_checked = " "; - marker_unchecked = " "; - } else { - - marker_checked = " "; - marker_unchecked = " "; - } - } else if ($truthy(node.$document()['$attr?']("icons", "font"))) { - - marker_checked = " "; - marker_unchecked = " "; - } else { - - marker_checked = "✓ "; - marker_unchecked = "❏ "; - }; - } else { - ul_class_attribute = (function() {if ($truthy(node.$style())) { - return "" + " class=\"" + (node.$style()) + "\"" - } else { - return "" - }; return nil; })() - }; - result['$<<']("" + ""); - if ($truthy(node['$title?']())) { - result['$<<']("" + "
    " + (node.$title()) + "
    ")}; - result['$<<']("" + ""); - $send(node.$items(), 'each', [], ($$46 = function(item){var self = $$46.$$s || this, $a; - - - - if (item == null) { - item = nil; - }; - if ($truthy(item.$id())) { - result['$<<']("" + "
  • ") - } else if ($truthy(item.$role())) { - result['$<<']("" + "
  • ") - } else { - result['$<<']("
  • ") - }; - if ($truthy(($truthy($a = checklist) ? item['$attr?']("checkbox") : $a))) { - result['$<<']("" + "

    " + ((function() {if ($truthy(item['$attr?']("checked"))) { - return marker_checked - } else { - return marker_unchecked - }; return nil; })()) + (item.$text()) + "

    ") - } else { - result['$<<']("" + "

    " + (item.$text()) + "

    ") - }; - if ($truthy(item['$blocks?']())) { - result['$<<'](item.$content())}; - return result['$<<']("
  • ");}, $$46.$$s = self, $$46.$$arity = 1, $$46)); - result['$<<'](""); - result['$<<'](""); - return result.$join($$($nesting, 'LF')); - }, $Html5Converter_convert_ulist$45.$$arity = 1); - - Opal.def(self, '$convert_verse', $Html5Converter_convert_verse$47 = function $$convert_verse(node) { - var $a, self = this, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, attribution = nil, citetitle = nil, cite_element = nil, attribution_text = nil, attribution_element = nil; - - - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["verseblock", node.$role()].$compact(); - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "\n
    " + (node.$title()) + "
    " - } else { - return "" - }; return nil; })(); - attribution = (function() {if ($truthy(node['$attr?']("attribution"))) { - - return node.$attr("attribution"); - } else { - return nil - }; return nil; })(); - citetitle = (function() {if ($truthy(node['$attr?']("citetitle"))) { - - return node.$attr("citetitle"); - } else { - return nil - }; return nil; })(); - if ($truthy(($truthy($a = attribution) ? $a : citetitle))) { - - cite_element = (function() {if ($truthy(citetitle)) { - return "" + "" + (citetitle) + "" - } else { - return "" - }; return nil; })(); - attribution_text = (function() {if ($truthy(attribution)) { - return "" + "— " + (attribution) + ((function() {if ($truthy(citetitle)) { - return "" + "\n" - } else { - return "" - }; return nil; })()) - } else { - return "" - }; return nil; })(); - attribution_element = "" + "\n
    \n" + (attribution_text) + (cite_element) + "\n
    "; - } else { - attribution_element = "" - }; - return "" + "" + (title_element) + "\n" + "
    " + (node.$content()) + "
    " + (attribution_element) + "\n" + ""; - }, $Html5Converter_convert_verse$47.$$arity = 1); - - Opal.def(self, '$convert_video', $Html5Converter_convert_video$48 = function $$convert_video(node) { - var $a, $b, self = this, xml = nil, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, width_attribute = nil, height_attribute = nil, $case = nil, asset_uri_scheme = nil, start_anchor = nil, delimiter = nil, autoplay_param = nil, loop_param = nil, muted_param = nil, rel_param_val = nil, start_param = nil, end_param = nil, has_loop_param = nil, mute_param = nil, controls_param = nil, fs_param = nil, fs_attribute = nil, modest_param = nil, theme_param = nil, hl_param = nil, target = nil, list = nil, list_param = nil, playlist = nil, poster_attribute = nil, val = nil, preload_attribute = nil, start_t = nil, end_t = nil, time_anchor = nil; - - - xml = self.xml_mode; - id_attribute = (function() {if ($truthy(node.$id())) { - return "" + " id=\"" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - classes = ["videoblock"]; - if ($truthy(node['$attr?']("float"))) { - classes['$<<'](node.$attr("float"))}; - if ($truthy(node['$attr?']("align"))) { - classes['$<<']("" + "text-" + (node.$attr("align")))}; - if ($truthy(node.$role())) { - classes['$<<'](node.$role())}; - class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; - title_element = (function() {if ($truthy(node['$title?']())) { - return "" + "\n
    " + (node.$title()) + "
    " - } else { - return "" - }; return nil; })(); - width_attribute = (function() {if ($truthy(node['$attr?']("width"))) { - return "" + " width=\"" + (node.$attr("width")) + "\"" - } else { - return "" - }; return nil; })(); - height_attribute = (function() {if ($truthy(node['$attr?']("height"))) { - return "" + " height=\"" + (node.$attr("height")) + "\"" - } else { - return "" - }; return nil; })(); - return (function() {$case = node.$attr("poster"); - if ("vimeo"['$===']($case)) { - if ($truthy((asset_uri_scheme = node.$document().$attr("asset-uri-scheme", "https"))['$empty?']())) { - } else { - asset_uri_scheme = "" + (asset_uri_scheme) + ":" - }; - start_anchor = (function() {if ($truthy(node['$attr?']("start"))) { - return "" + "#at=" + (node.$attr("start")) - } else { - return "" - }; return nil; })(); - delimiter = ["?"]; - autoplay_param = (function() {if ($truthy(node['$option?']("autoplay"))) { - return "" + (($truthy($a = delimiter.$pop()) ? $a : "&")) + "autoplay=1" - } else { - return "" - }; return nil; })(); - loop_param = (function() {if ($truthy(node['$option?']("loop"))) { - return "" + (($truthy($a = delimiter.$pop()) ? $a : "&")) + "loop=1" - } else { - return "" - }; return nil; })(); - muted_param = (function() {if ($truthy(node['$option?']("muted"))) { - return "" + (($truthy($a = delimiter.$pop()) ? $a : "&")) + "muted=1" - } else { - return "" - }; return nil; })(); - return "" + "" + (title_element) + "\n" + "
    \n" + "\n" + "
    \n" + "";} - else if ("youtube"['$===']($case)) { - if ($truthy((asset_uri_scheme = node.$document().$attr("asset-uri-scheme", "https"))['$empty?']())) { - } else { - asset_uri_scheme = "" + (asset_uri_scheme) + ":" - }; - rel_param_val = (function() {if ($truthy(node['$option?']("related"))) { - return 1 - } else { - return 0 - }; return nil; })(); - start_param = (function() {if ($truthy(node['$attr?']("start"))) { - return "" + "&start=" + (node.$attr("start")) - } else { - return "" - }; return nil; })(); - end_param = (function() {if ($truthy(node['$attr?']("end"))) { - return "" + "&end=" + (node.$attr("end")) - } else { - return "" - }; return nil; })(); - autoplay_param = (function() {if ($truthy(node['$option?']("autoplay"))) { - return "&autoplay=1" - } else { - return "" - }; return nil; })(); - loop_param = (function() {if ($truthy((has_loop_param = node['$option?']("loop")))) { - return "&loop=1" - } else { - return "" - }; return nil; })(); - mute_param = (function() {if ($truthy(node['$option?']("muted"))) { - return "&mute=1" - } else { - return "" - }; return nil; })(); - controls_param = (function() {if ($truthy(node['$option?']("nocontrols"))) { - return "&controls=0" - } else { - return "" - }; return nil; })(); - if ($truthy(node['$option?']("nofullscreen"))) { - - fs_param = "&fs=0"; - fs_attribute = ""; - } else { - - fs_param = ""; - fs_attribute = self.$append_boolean_attribute("allowfullscreen", xml); - }; - modest_param = (function() {if ($truthy(node['$option?']("modest"))) { - return "&modestbranding=1" - } else { - return "" - }; return nil; })(); - theme_param = (function() {if ($truthy(node['$attr?']("theme"))) { - return "" + "&theme=" + (node.$attr("theme")) - } else { - return "" - }; return nil; })(); - hl_param = (function() {if ($truthy(node['$attr?']("lang"))) { - return "" + "&hl=" + (node.$attr("lang")) - } else { - return "" - }; return nil; })(); - $b = node.$attr("target").$split("/", 2), $a = Opal.to_ary($b), (target = ($a[0] == null ? nil : $a[0])), (list = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy((list = ($truthy($a = list) ? $a : node.$attr("list"))))) { - list_param = "" + "&list=" + (list) - } else { - - $b = target.$split(",", 2), $a = Opal.to_ary($b), (target = ($a[0] == null ? nil : $a[0])), (playlist = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy((playlist = ($truthy($a = playlist) ? $a : node.$attr("playlist"))))) { - list_param = "" + "&playlist=" + (playlist) - } else { - list_param = (function() {if ($truthy(has_loop_param)) { - return "" + "&playlist=" + (target) - } else { - return "" - }; return nil; })() - }; - }; - return "" + "" + (title_element) + "\n" + "
    \n" + "\n" + "
    \n" + "";} - else { - poster_attribute = (function() {if ($truthy((val = node.$attr("poster"))['$nil_or_empty?']())) { - return "" - } else { - return "" + " poster=\"" + (node.$media_uri(val)) + "\"" - }; return nil; })(); - preload_attribute = (function() {if ($truthy((val = node.$attr("preload"))['$nil_or_empty?']())) { - return "" - } else { - return "" + " preload=\"" + (val) + "\"" - }; return nil; })(); - start_t = node.$attr("start"); - end_t = node.$attr("end"); - time_anchor = (function() {if ($truthy(($truthy($a = start_t) ? $a : end_t))) { - return "" + "#t=" + (($truthy($a = start_t) ? $a : "")) + ((function() {if ($truthy(end_t)) { - return "" + "," + (end_t) - } else { - return "" - }; return nil; })()) - } else { - return "" - }; return nil; })(); - return "" + "" + (title_element) + "\n" + "
    \n" + "\n" + "
    \n" + "";}})(); - }, $Html5Converter_convert_video$48.$$arity = 1); - - Opal.def(self, '$convert_inline_anchor', $Html5Converter_convert_inline_anchor$49 = function $$convert_inline_anchor(node) { - var $a, $b, self = this, $case = nil, path = nil, attrs = nil, text = nil, ref = nil, refid = nil, top = nil, outer = nil; - - return (function() {$case = node.$type(); - if ("xref"['$===']($case)) { - if ($truthy((path = node.$attributes()['$[]']("path")))) { - - attrs = self.$append_link_constraint_attrs(node, (function() {if ($truthy(node.$role())) { - return ["" + " class=\"" + (node.$role()) + "\""] - } else { - return [] - }; return nil; })()).$join(); - text = ($truthy($a = node.$text()) ? $a : path); - } else { - - attrs = (function() {if ($truthy(node.$role())) { - return "" + " class=\"" + (node.$role()) + "\"" - } else { - return "" - }; return nil; })(); - if ($truthy((text = node.$text()))) { - } else if ($truthy($$($nesting, 'AbstractNode')['$===']((ref = ($truthy($a = (self.refs = ($truthy($b = self.refs) ? $b : node.$document().$catalog()['$[]']("refs")))['$[]']((refid = node.$attributes()['$[]']("refid")))) ? $a : (function() {if ($truthy(refid['$nil_or_empty?']())) { - - return (top = self.$get_root_document(node)); - } else { - return nil - }; return nil; })()))))) { - if ($truthy(($truthy($a = (self.resolving_xref = ($truthy($b = self.resolving_xref) ? $b : (outer = true)))) ? outer : $a))) { - - if ($truthy((text = ref.$xreftext(node.$attr("xrefstyle", nil, true))))) { - if ($truthy(text['$include?']("" + (text) + "";} - else if ("ref"['$===']($case)) {return "" + ""} - else if ("link"['$===']($case)) { - attrs = (function() {if ($truthy(node.$id())) { - return ["" + " id=\"" + (node.$id()) + "\""] - } else { - return [] - }; return nil; })(); - if ($truthy(node.$role())) { - attrs['$<<']("" + " class=\"" + (node.$role()) + "\"")}; - if ($truthy(node['$attr?']("title"))) { - attrs['$<<']("" + " title=\"" + (node.$attr("title")) + "\"")}; - return "" + "" + (node.$text()) + "";} - else if ("bibref"['$===']($case)) {return "" + "[" + (($truthy($a = node.$reftext()) ? $a : node.$id())) + "]"} - else { - self.$logger().$warn("" + "unknown anchor type: " + (node.$type().$inspect())); - return nil;}})() - }, $Html5Converter_convert_inline_anchor$49.$$arity = 1); - - Opal.def(self, '$convert_inline_break', $Html5Converter_convert_inline_break$50 = function $$convert_inline_break(node) { - var self = this; - - return "" + (node.$text()) + "" - }, $Html5Converter_convert_inline_break$50.$$arity = 1); - - Opal.def(self, '$convert_inline_button', $Html5Converter_convert_inline_button$51 = function $$convert_inline_button(node) { - var self = this; - - return "" + "" + (node.$text()) + "" - }, $Html5Converter_convert_inline_button$51.$$arity = 1); - - Opal.def(self, '$convert_inline_callout', $Html5Converter_convert_inline_callout$52 = function $$convert_inline_callout(node) { - var self = this, src = nil, guard = nil; - - if ($truthy(node.$document()['$attr?']("icons", "font"))) { - return "" + "(" + (node.$text()) + ")" - } else if ($truthy(node.$document()['$attr?']("icons"))) { - - src = node.$icon_uri("" + "callouts/" + (node.$text())); - return "" + "\"""; - } else if ($truthy($$$('::', 'Array')['$===']((guard = node.$attributes()['$[]']("guard"))))) { - return "" + "<!--(" + (node.$text()) + ")-->" - } else { - return "" + (guard) + "(" + (node.$text()) + ")" - } - }, $Html5Converter_convert_inline_callout$52.$$arity = 1); - - Opal.def(self, '$convert_inline_footnote', $Html5Converter_convert_inline_footnote$53 = function $$convert_inline_footnote(node) { - var self = this, index = nil, id_attr = nil; - - if ($truthy((index = node.$attr("index")))) { - if (node.$type()['$==']("xref")) { - return "" + "[" + (index) + "]" - } else { - - id_attr = (function() {if ($truthy(node.$id())) { - return "" + " id=\"_footnote_" + (node.$id()) + "\"" - } else { - return "" - }; return nil; })(); - return "" + "[" + (index) + "]"; - } - } else if (node.$type()['$==']("xref")) { - return "" + "[" + (node.$text()) + "]" - } else { - return nil - } - }, $Html5Converter_convert_inline_footnote$53.$$arity = 1); - - Opal.def(self, '$convert_inline_image', $Html5Converter_convert_inline_image$54 = function $$convert_inline_image(node) { - var $a, $b, $$55, $$56, $c, $d, self = this, type = nil, class_attr_val = nil, title_attr = nil, img = nil, target = nil, attrs = nil, svg = nil, obj = nil, fallback = nil, role = nil; - - - if ($truthy((($a = (type = ($truthy($b = node.$type()) ? $b : "image"))['$==']("icon")) ? node.$document()['$attr?']("icons", "font") : (type = ($truthy($b = node.$type()) ? $b : "image"))['$==']("icon")))) { - - class_attr_val = "" + "fa fa-" + (node.$target()); - $send($hash2(["size", "rotate", "flip"], {"size": "fa-", "rotate": "fa-rotate-", "flip": "fa-flip-"}), 'each', [], ($$55 = function(key, prefix){var self = $$55.$$s || this; - - - - if (key == null) { - key = nil; - }; - - if (prefix == null) { - prefix = nil; - }; - if ($truthy(node['$attr?'](key))) { - return (class_attr_val = "" + (class_attr_val) + " " + (prefix) + (node.$attr(key))) - } else { - return nil - };}, $$55.$$s = self, $$55.$$arity = 2, $$55)); - title_attr = (function() {if ($truthy(node['$attr?']("title"))) { - return "" + " title=\"" + (node.$attr("title")) + "\"" - } else { - return "" - }; return nil; })(); - img = "" + ""; - } else if ($truthy((($a = type['$==']("icon")) ? node.$document()['$attr?']("icons")['$!']() : type['$==']("icon")))) { - img = "" + "[" + (node.$alt()) + "]" - } else { - - target = node.$target(); - attrs = $send(["width", "height", "title"], 'map', [], ($$56 = function(name){var self = $$56.$$s || this; - - - - if (name == null) { - name = nil; - }; - if ($truthy(node['$attr?'](name))) { - return "" + " " + (name) + "=\"" + (node.$attr(name)) + "\"" - } else { - return "" - };}, $$56.$$s = self, $$56.$$arity = 1, $$56)).$join(); - if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = type['$!=']("icon")) ? ($truthy($d = node['$attr?']("format", "svg")) ? $d : target['$include?'](".svg")) : $c)) ? $rb_lt(node.$document().$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $b)) ? ($truthy($b = (svg = node['$option?']("inline"))) ? $b : (obj = node['$option?']("interactive"))) : $a))) { - if ($truthy(svg)) { - img = ($truthy($a = self.$read_svg_contents(node, target)) ? $a : "" + "" + (node.$alt()) + "") - } else if ($truthy(obj)) { - - fallback = (function() {if ($truthy(node['$attr?']("fallback"))) { - return "" + "\""" - } else { - return "" + "" + (node.$alt()) + "" - }; return nil; })(); - img = "" + "" + (fallback) + "";}}; - img = ($truthy($a = img) ? $a : "" + "\"""); - }; - if ($truthy(node['$attr?']("link"))) { - img = "" + "" + (img) + ""}; - if ($truthy((role = node.$role()))) { - if ($truthy(node['$attr?']("float"))) { - class_attr_val = "" + (type) + " " + (node.$attr("float")) + " " + (role) - } else { - class_attr_val = "" + (type) + " " + (role) - } - } else if ($truthy(node['$attr?']("float"))) { - class_attr_val = "" + (type) + " " + (node.$attr("float")) - } else { - class_attr_val = type - }; - return "" + "" + (img) + ""; - }, $Html5Converter_convert_inline_image$54.$$arity = 1); - - Opal.def(self, '$convert_inline_indexterm', $Html5Converter_convert_inline_indexterm$57 = function $$convert_inline_indexterm(node) { - var self = this; - - if (node.$type()['$==']("visible")) { - return node.$text() - } else { - return "" - } - }, $Html5Converter_convert_inline_indexterm$57.$$arity = 1); - - Opal.def(self, '$convert_inline_kbd', $Html5Converter_convert_inline_kbd$58 = function $$convert_inline_kbd(node) { - var self = this, keys = nil; - - if ((keys = node.$attr("keys")).$size()['$=='](1)) { - return "" + "" + (keys['$[]'](0)) + "" - } else { - return "" + "" + (keys.$join("+")) + "" - } - }, $Html5Converter_convert_inline_kbd$58.$$arity = 1); - - Opal.def(self, '$convert_inline_menu', $Html5Converter_convert_inline_menu$59 = function $$convert_inline_menu(node) { - var self = this, caret = nil, submenu_joiner = nil, menu = nil, submenus = nil, menuitem = nil; - - - caret = (function() {if ($truthy(node.$document()['$attr?']("icons", "font"))) { - return "  " - } else { - return "  " - }; return nil; })(); - submenu_joiner = "" + "
    " + (caret) + ""; - menu = node.$attr("menu"); - if ($truthy((submenus = node.$attr("submenus"))['$empty?']())) { - if ($truthy((menuitem = node.$attr("menuitem")))) { - return "" + "" + (menu) + "" + (caret) + "" + (menuitem) + "" - } else { - return "" + "" + (menu) + "" - } - } else { - return "" + "" + (menu) + "" + (caret) + "" + (submenus.$join(submenu_joiner)) + "" + (caret) + "" + (node.$attr("menuitem")) + "" - }; - }, $Html5Converter_convert_inline_menu$59.$$arity = 1); - - Opal.def(self, '$convert_inline_quoted', $Html5Converter_convert_inline_quoted$60 = function $$convert_inline_quoted(node) { - var $a, $b, self = this, open = nil, close = nil, tag = nil, class_attr = nil; - - - $b = $$($nesting, 'QUOTE_TAGS')['$[]'](node.$type()), $a = Opal.to_ary($b), (open = ($a[0] == null ? nil : $a[0])), (close = ($a[1] == null ? nil : $a[1])), (tag = ($a[2] == null ? nil : $a[2])), $b; - if ($truthy(node.$id())) { - - class_attr = (function() {if ($truthy(node.$role())) { - return "" + " class=\"" + (node.$role()) + "\"" - } else { - return "" - }; return nil; })(); - if ($truthy(tag)) { - return "" + (open.$chop()) + " id=\"" + (node.$id()) + "\"" + (class_attr) + ">" + (node.$text()) + (close) - } else { - return "" + "" + (open) + (node.$text()) + (close) + "" - }; - } else if ($truthy(node.$role())) { - if ($truthy(tag)) { - return "" + (open.$chop()) + " class=\"" + (node.$role()) + "\">" + (node.$text()) + (close) - } else { - return "" + "" + (open) + (node.$text()) + (close) + "" - } - } else { - return "" + (open) + (node.$text()) + (close) - }; - }, $Html5Converter_convert_inline_quoted$60.$$arity = 1); - - Opal.def(self, '$read_svg_contents', $Html5Converter_read_svg_contents$61 = function $$read_svg_contents(node, target) { - var $$62, self = this, svg = nil, old_start_tag = nil, new_start_tag = nil, start_tag_match = nil; - - - if ($truthy((svg = node.$read_contents(target, $hash2(["start", "normalize", "label", "warn_if_empty"], {"start": node.$document().$attr("imagesdir"), "normalize": true, "label": "SVG", "warn_if_empty": true}))))) { - - if ($truthy(svg['$empty?']())) { - return nil}; - if ($truthy(svg['$start_with?']("");}, $$62.$$s = self, $$62.$$arity = 1, $$62)); - if ($truthy(new_start_tag)) { - svg = "" + (new_start_tag) + (svg['$[]'](Opal.Range.$new(old_start_tag.$length(), -1, false)))};}; - return svg; - }, $Html5Converter_read_svg_contents$61.$$arity = 2); - self.$private(); - - Opal.def(self, '$append_boolean_attribute', $Html5Converter_append_boolean_attribute$63 = function $$append_boolean_attribute(name, xml) { - var self = this; - - if ($truthy(xml)) { - return "" + " " + (name) + "=\"" + (name) + "\"" - } else { - return "" + " " + (name) - } - }, $Html5Converter_append_boolean_attribute$63.$$arity = 2); - - Opal.def(self, '$append_link_constraint_attrs', $Html5Converter_append_link_constraint_attrs$64 = function $$append_link_constraint_attrs(node, attrs) { - var $a, self = this, rel = nil, window = nil; - - - - if (attrs == null) { - attrs = []; - }; - if ($truthy(node['$option?']("nofollow"))) { - rel = "nofollow"}; - if ($truthy((window = node.$attributes()['$[]']("window")))) { - - attrs['$<<']("" + " target=\"" + (window) + "\""); - if ($truthy(($truthy($a = window['$==']("_blank")) ? $a : node['$option?']("noopener")))) { - attrs['$<<']((function() {if ($truthy(rel)) { - return "" + " rel=\"" + (rel) + " noopener\"" - } else { - return " rel=\"noopener\"" - }; return nil; })())}; - } else if ($truthy(rel)) { - attrs['$<<']("" + " rel=\"" + (rel) + "\"")}; - return attrs; - }, $Html5Converter_append_link_constraint_attrs$64.$$arity = -2); - - Opal.def(self, '$encode_attribute_value', $Html5Converter_encode_attribute_value$65 = function $$encode_attribute_value(val) { - var self = this; - - if ($truthy(val['$include?']("\""))) { - - return val.$gsub("\"", """); - } else { - return val - } - }, $Html5Converter_encode_attribute_value$65.$$arity = 1); - - Opal.def(self, '$generate_manname_section', $Html5Converter_generate_manname_section$66 = function $$generate_manname_section(node) { - var $a, self = this, manname_title = nil, next_section = nil, next_section_title = nil, manname_id_attr = nil, manname_id = nil; - - - manname_title = node.$attr("manname-title", "Name"); - if ($truthy(($truthy($a = (next_section = node.$sections()['$[]'](0))) ? (next_section_title = next_section.$title())['$=='](next_section_title.$upcase()) : $a))) { - manname_title = manname_title.$upcase()}; - manname_id_attr = (function() {if ($truthy((manname_id = node.$attr("manname-id")))) { - return "" + " id=\"" + (manname_id) + "\"" - } else { - return "" - }; return nil; })(); - return "" + "" + (manname_title) + "\n" + "
    \n" + "

    " + (node.$attr("mannames").$join(", ")) + " - " + (node.$attr("manpurpose")) + "

    \n" + "
    "; - }, $Html5Converter_generate_manname_section$66.$$arity = 1); - - Opal.def(self, '$get_root_document', $Html5Converter_get_root_document$67 = function $$get_root_document(node) { - var $a, self = this; - - - while ($truthy((node = node.$document())['$nested?']())) { - node = node.$parent_document() - }; - return node; - }, $Html5Converter_get_root_document$67.$$arity = 1); - return (Opal.def(self, '$method_missing', $Html5Converter_method_missing$68 = function $$method_missing(id, $a) { - var $post_args, params, $b, $iter = $Html5Converter_method_missing$68.$$p, $yield = $iter || nil, self = this, name = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Html5Converter_method_missing$68.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - params = $post_args;; - if ($truthy(($truthy($b = (name = id.$to_s())['$start_with?']("convert_")['$!']()) ? self['$handles?'](name) : $b))) { - - return $send(self, 'send', ["" + "convert_" + (name)].concat(Opal.to_a(params))); - } else { - return $send(self, Opal.find_super_dispatcher(self, 'method_missing', $Html5Converter_method_missing$68, false), $zuper, $iter) - }; - }, $Html5Converter_method_missing$68.$$arity = -2), nil) && 'method_missing'; - })($$($nesting, 'Converter'), $$$($$($nesting, 'Converter'), 'Base'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/extensions"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy, $hash2 = Opal.hash2, $send = Opal.send, $hash = Opal.hash; - - Opal.add_stubs(['$==', '$[]=', '$config', '$-', '$const_defined?', '$singleton_class?', '$include', '$const_get', '$extend', '$attr_reader', '$merge', '$class', '$update', '$raise', '$document', '$doctype', '$[]', '$+', '$level', '$delete', '$>', '$casecmp', '$new', '$title=', '$sectname=', '$special=', '$fetch', '$numbered=', '$!', '$key?', '$attr?', '$special', '$numbered', '$generate_id', '$title', '$id=', '$update_attributes', '$tr', '$basename', '$create_block', '$assign_caption', '$===', '$parse_blocks', '$empty?', '$include?', '$sub_attributes', '$parse', '$each', '$define_method', '$unshift', '$shift', '$send', '$size', '$binding', '$receiver', '$define_singleton_method', '$instance_exec', '$to_proc', '$call', '$option', '$flatten', '$respond_to?', '$to_s', '$partition', '$to_i', '$<<', '$compact', '$inspect', '$attr_accessor', '$to_set', '$match?', '$resolve_regexp', '$method', '$register', '$values', '$groups', '$arity', '$activate', '$add_document_processor', '$any?', '$select', '$add_syntax_processor', '$to_sym', '$instance_variable_get', '$kind', '$private', '$join', '$map', '$split', '$capitalize', '$instance_variable_set', '$resolve_args', '$enable_dsl', '$singleton_class', '$process_block_given?', '$source_location', '$freeze', '$resolve_class', '$<', '$update_config', '$as_symbol', '$name', '$name=', '$pop', '$-@', '$next_auto_id', '$generate_name']); - - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'Extensions'); - - var $nesting = [self].concat($parent_nesting); - - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Processor'); - - var $nesting = [self].concat($parent_nesting), $Processor_initialize$4, $Processor_update_config$5, $Processor_process$6, $Processor_create_section$7, $Processor_create_block$8, $Processor_create_list$9, $Processor_create_list_item$10, $Processor_create_image_block$11, $Processor_create_inline$12, $Processor_parse_content$13, $Processor_parse_attributes$14, $Processor$15; - - self.$$prototype.config = nil; - - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $config$1, $option$2, $enable_dsl$3; - - - - Opal.def(self, '$config', $config$1 = function $$config() { - var $a, self = this; - if (self.config == null) self.config = nil; - - return (self.config = ($truthy($a = self.config) ? $a : $hash2([], {}))) - }, $config$1.$$arity = 0); - - Opal.def(self, '$option', $option$2 = function $$option(key, default_value) { - var self = this, $writer = nil; - - - $writer = [key, default_value]; - $send(self.$config(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $option$2.$$arity = 2); - - Opal.def(self, '$enable_dsl', $enable_dsl$3 = function $$enable_dsl() { - var self = this; - - if ($truthy(self['$const_defined?']("DSL"))) { - if ($truthy(self['$singleton_class?']())) { - return self.$include(self.$const_get("DSL")) - } else { - return self.$extend(self.$const_get("DSL")) - } - } else { - return nil - } - }, $enable_dsl$3.$$arity = 0); - return Opal.alias(self, "use_dsl", "enable_dsl"); - })(Opal.get_singleton_class(self), $nesting); - self.$attr_reader("config"); - - Opal.def(self, '$initialize', $Processor_initialize$4 = function $$initialize(config) { - var self = this; - - - - if (config == null) { - config = $hash2([], {}); - }; - return (self.config = self.$class().$config().$merge(config)); - }, $Processor_initialize$4.$$arity = -1); - - Opal.def(self, '$update_config', $Processor_update_config$5 = function $$update_config(config) { - var self = this; - - return self.config.$update(config) - }, $Processor_update_config$5.$$arity = 1); - - Opal.def(self, '$process', $Processor_process$6 = function $$process($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Processor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method"); - }, $Processor_process$6.$$arity = -1); - - Opal.def(self, '$create_section', $Processor_create_section$7 = function $$create_section(parent, title, attrs, opts) { - var $a, self = this, doc = nil, book = nil, doctype = nil, level = nil, style = nil, sectname = nil, special = nil, sect = nil, $writer = nil, id = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - doc = parent.$document(); - book = (doctype = doc.$doctype())['$==']("book"); - level = ($truthy($a = opts['$[]']("level")) ? $a : $rb_plus(parent.$level(), 1)); - if ($truthy((style = attrs.$delete("style")))) { - if ($truthy(($truthy($a = book) ? style['$==']("abstract") : $a))) { - $a = ["chapter", 1], (sectname = $a[0]), (level = $a[1]), $a - } else { - - $a = [style, true], (sectname = $a[0]), (special = $a[1]), $a; - if (level['$=='](0)) { - level = 1}; - } - } else if ($truthy(book)) { - sectname = (function() {if (level['$=='](0)) { - return "part" - } else { - - if ($truthy($rb_gt(level, 1))) { - return "section" - } else { - return "chapter" - }; - }; return nil; })() - } else if ($truthy((($a = doctype['$==']("manpage")) ? title.$casecmp("synopsis")['$=='](0) : doctype['$==']("manpage")))) { - $a = ["synopsis", true], (sectname = $a[0]), (special = $a[1]), $a - } else { - sectname = "section" - }; - sect = $$($nesting, 'Section').$new(parent, level); - $a = [title, sectname], sect['$title=']($a[0]), sect['$sectname=']($a[1]), $a; - if ($truthy(special)) { - - - $writer = [true]; - $send(sect, 'special=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - if ($truthy(opts.$fetch("numbered", style['$==']("appendix")))) { - - $writer = [true]; - $send(sect, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else if ($truthy(($truthy($a = opts['$key?']("numbered")['$!']()) ? doc['$attr?']("sectnums", "all") : $a))) { - - $writer = [(function() {if ($truthy(($truthy($a = book) ? level['$=='](1) : $a))) { - return "chapter" - } else { - return true - }; return nil; })()]; - $send(sect, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - } else if ($truthy($rb_gt(level, 0))) { - if ($truthy(opts.$fetch("numbered", doc['$attr?']("sectnums")))) { - - $writer = [(function() {if ($truthy(sect.$special())) { - return ($truthy($a = parent.$numbered()) ? true : $a) - } else { - return true - }; return nil; })()]; - $send(sect, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - } else if ($truthy(opts.$fetch("numbered", ($truthy($a = book) ? doc['$attr?']("partnums") : $a)))) { - - $writer = [true]; - $send(sect, 'numbered=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - if ((id = attrs['$[]']("id"))['$=='](false)) { - attrs.$delete("id") - } else { - - $writer = [(($writer = ["id", ($truthy($a = id) ? $a : (function() {if ($truthy(doc['$attr?']("sectids"))) { - - return $$($nesting, 'Section').$generate_id(sect.$title(), doc); - } else { - return nil - }; return nil; })())]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]; - $send(sect, 'id=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - sect.$update_attributes(attrs); - return sect; - }, $Processor_create_section$7.$$arity = -4); - - Opal.def(self, '$create_block', $Processor_create_block$8 = function $$create_block(parent, context, source, attrs, opts) { - var self = this; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - return $$($nesting, 'Block').$new(parent, context, $hash2(["source", "attributes"], {"source": source, "attributes": attrs}).$merge(opts)); - }, $Processor_create_block$8.$$arity = -5); - - Opal.def(self, '$create_list', $Processor_create_list$9 = function $$create_list(parent, context, attrs) { - var self = this, list = nil; - - - - if (attrs == null) { - attrs = nil; - }; - list = $$($nesting, 'List').$new(parent, context); - if ($truthy(attrs)) { - list.$update_attributes(attrs)}; - return list; - }, $Processor_create_list$9.$$arity = -3); - - Opal.def(self, '$create_list_item', $Processor_create_list_item$10 = function $$create_list_item(parent, text) { - var self = this; - - - - if (text == null) { - text = nil; - }; - return $$($nesting, 'ListItem').$new(parent, text); - }, $Processor_create_list_item$10.$$arity = -2); - - Opal.def(self, '$create_image_block', $Processor_create_image_block$11 = function $$create_image_block(parent, attrs, opts) { - var $a, self = this, target = nil, $writer = nil, title = nil, block = nil; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy((target = attrs['$[]']("target")))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "Unable to create an image block, target attribute is required") - }; - ($truthy($a = attrs['$[]']("alt")) ? $a : (($writer = ["alt", (($writer = ["default-alt", $$($nesting, 'Helpers').$basename(target, true).$tr("_-", " ")]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - title = (function() {if ($truthy(attrs['$key?']("title"))) { - - return attrs.$delete("title"); - } else { - return nil - }; return nil; })(); - block = self.$create_block(parent, "image", nil, attrs, opts); - if ($truthy(title)) { - - - $writer = [title]; - $send(block, 'title=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - block.$assign_caption(attrs.$delete("caption"), "figure");}; - return block; - }, $Processor_create_image_block$11.$$arity = -3); - - Opal.def(self, '$create_inline', $Processor_create_inline$12 = function $$create_inline(parent, context, text, opts) { - var self = this; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - return $$($nesting, 'Inline').$new(parent, context, text, (function() {if (context['$==']("quoted")) { - - return $hash2(["type"], {"type": "unquoted"}).$merge(opts); - } else { - return opts - }; return nil; })()); - }, $Processor_create_inline$12.$$arity = -4); - - Opal.def(self, '$parse_content', $Processor_parse_content$13 = function $$parse_content(parent, content, attributes) { - var self = this, reader = nil; - - - - if (attributes == null) { - attributes = nil; - }; - reader = (function() {if ($truthy($$($nesting, 'Reader')['$==='](content))) { - return content - } else { - - return $$($nesting, 'Reader').$new(content); - }; return nil; })(); - $$($nesting, 'Parser').$parse_blocks(reader, parent, attributes); - return parent; - }, $Processor_parse_content$13.$$arity = -3); - - Opal.def(self, '$parse_attributes', $Processor_parse_attributes$14 = function $$parse_attributes(block, attrlist, opts) { - var $a, self = this; - - - - if (opts == null) { - opts = $hash2([], {}); - }; - if ($truthy((function() {if ($truthy(attrlist)) { - return attrlist['$empty?']() - } else { - return true - }; return nil; })())) { - return $hash2([], {})}; - if ($truthy(($truthy($a = opts['$[]']("sub_attributes")) ? attrlist['$include?']($$($nesting, 'ATTR_REF_HEAD')) : $a))) { - attrlist = block.$sub_attributes(attrlist)}; - return $$($nesting, 'AttributeList').$new(attrlist).$parse(($truthy($a = opts['$[]']("positional_attributes")) ? $a : [])); - }, $Processor_parse_attributes$14.$$arity = -3); - return $send([["create_paragraph", "create_block", "paragraph"], ["create_open_block", "create_block", "open"], ["create_example_block", "create_block", "example"], ["create_pass_block", "create_block", "pass"], ["create_listing_block", "create_block", "listing"], ["create_literal_block", "create_block", "literal"], ["create_anchor", "create_inline", "anchor"], ["create_inline_pass", "create_inline", "quoted"]], 'each', [], ($Processor$15 = function(method_name, delegate_method_name, context){var self = $Processor$15.$$s || this, $$16; - - - - if (method_name == null) { - method_name = nil; - }; - - if (delegate_method_name == null) { - delegate_method_name = nil; - }; - - if (context == null) { - context = nil; - }; - return $send(self, 'define_method', [method_name], ($$16 = function($a){var self = $$16.$$s || this, $post_args, args; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - args.$unshift(args.$shift(), context); - return $send(self, 'send', [delegate_method_name].concat(Opal.to_a(args)));}, $$16.$$s = self, $$16.$$arity = -1, $$16));}, $Processor$15.$$s = self, $Processor$15.$$arity = 3, $Processor$15)); - })($nesting[0], null, $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'ProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $ProcessorDsl_option$17, $ProcessorDsl_process$18, $ProcessorDsl_process_block_given$ques$20; - - - - Opal.def(self, '$option', $ProcessorDsl_option$17 = function $$option(key, value) { - var self = this, $writer = nil; - - - $writer = [key, value]; - $send(self.$config(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - }, $ProcessorDsl_option$17.$$arity = 2); - - Opal.def(self, '$process', $ProcessorDsl_process$18 = function $$process($a) { - var $iter = $ProcessorDsl_process$18.$$p, block = $iter || nil, $post_args, args, $b, $$19, self = this, context = nil; - if (self.process_block == null) self.process_block = nil; - - if ($iter) $ProcessorDsl_process$18.$$p = null; - - - if ($iter) $ProcessorDsl_process$18.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ((block !== nil)) { - - if ($truthy(args['$empty?']())) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "wrong number of arguments (given " + (args.$size()) + ", expected 0)") - }; - if ($truthy(($truthy($b = block.$binding()) ? self['$=='](block.$binding().$receiver()) : $b))) { - } else { - - context = self; - $send(block, 'define_singleton_method', ["call"], ($$19 = function($c){var self = $$19.$$s || this, $post_args, m_args; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - m_args = $post_args;; - return $send(context, 'instance_exec', Opal.to_a(m_args), block.$to_proc());}, $$19.$$s = self, $$19.$$arity = -1, $$19)); - }; - return (self.process_block = block); - } else if ($truthy((($b = self['process_block'], $b != null && $b !== nil) ? 'instance-variable' : nil))) { - return $send(self.process_block, 'call', Opal.to_a(args)) - } else { - return self.$raise($$$('::', 'NotImplementedError'), "" + (self.$class()) + " #" + ("process") + " method called before being registered") - }; - }, $ProcessorDsl_process$18.$$arity = -1); - - Opal.def(self, '$process_block_given?', $ProcessorDsl_process_block_given$ques$20 = function() { - var $a, self = this; - - return (($a = self['process_block'], $a != null && $a !== nil) ? 'instance-variable' : nil) - }, $ProcessorDsl_process_block_given$ques$20.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'DocumentProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $DocumentProcessorDsl_prefer$21; - - - self.$include($$($nesting, 'ProcessorDsl')); - - Opal.def(self, '$prefer', $DocumentProcessorDsl_prefer$21 = function $$prefer() { - var self = this; - - return self.$option("position", ">>") - }, $DocumentProcessorDsl_prefer$21.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'SyntaxProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $SyntaxProcessorDsl_named$22, $SyntaxProcessorDsl_content_model$23, $SyntaxProcessorDsl_positional_attributes$24, $SyntaxProcessorDsl_default_attributes$25, $SyntaxProcessorDsl_resolve_attributes$26; - - - self.$include($$($nesting, 'ProcessorDsl')); - - Opal.def(self, '$named', $SyntaxProcessorDsl_named$22 = function $$named(value) { - var self = this; - - if ($truthy($$($nesting, 'Processor')['$==='](self))) { - return (self.name = value) - } else { - return self.$option("name", value) - } - }, $SyntaxProcessorDsl_named$22.$$arity = 1); - - Opal.def(self, '$content_model', $SyntaxProcessorDsl_content_model$23 = function $$content_model(value) { - var self = this; - - return self.$option("content_model", value) - }, $SyntaxProcessorDsl_content_model$23.$$arity = 1); - Opal.alias(self, "parse_content_as", "content_model"); - - Opal.def(self, '$positional_attributes', $SyntaxProcessorDsl_positional_attributes$24 = function $$positional_attributes($a) { - var $post_args, value, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - return self.$option("positional_attrs", value.$flatten()); - }, $SyntaxProcessorDsl_positional_attributes$24.$$arity = -1); - Opal.alias(self, "name_positional_attributes", "positional_attributes"); - Opal.alias(self, "positional_attrs", "positional_attributes"); - - Opal.def(self, '$default_attributes', $SyntaxProcessorDsl_default_attributes$25 = function $$default_attributes(value) { - var self = this; - - return self.$option("default_attrs", value) - }, $SyntaxProcessorDsl_default_attributes$25.$$arity = 1); - Opal.alias(self, "default_attrs", "default_attributes"); - - Opal.def(self, '$resolve_attributes', $SyntaxProcessorDsl_resolve_attributes$26 = function $$resolve_attributes($a) { - var $post_args, args, $b, $$27, $$28, self = this, $case = nil, names = nil, defaults = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy($rb_gt(args.$size(), 1))) { - } else if ($truthy((args = args.$fetch(0, true))['$respond_to?']("to_sym"))) { - args = [args]}; - return (function() {$case = args; - if (true['$===']($case)) { - self.$option("positional_attrs", []); - return self.$option("default_attrs", $hash2([], {}));} - else if ($$$('::', 'Array')['$===']($case)) { - $b = [[], $hash2([], {})], (names = $b[0]), (defaults = $b[1]), $b; - $send(args, 'each', [], ($$27 = function(arg){var self = $$27.$$s || this, $c, $d, name = nil, _ = nil, value = nil, idx = nil, $writer = nil; - - - - if (arg == null) { - arg = nil; - }; - if ($truthy((arg = arg.$to_s())['$include?']("="))) { - - $d = arg.$partition("="), $c = Opal.to_ary($d), (name = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (value = ($c[2] == null ? nil : $c[2])), $d; - if ($truthy(name['$include?'](":"))) { - - $d = name.$partition(":"), $c = Opal.to_ary($d), (idx = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (name = ($c[2] == null ? nil : $c[2])), $d; - idx = (function() {if (idx['$==']("@")) { - return names.$size() - } else { - return idx.$to_i() - }; return nil; })(); - - $writer = [idx, name]; - $send(names, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - - $writer = [name, value]; - $send(defaults, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else if ($truthy(arg['$include?'](":"))) { - - $d = arg.$partition(":"), $c = Opal.to_ary($d), (idx = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (name = ($c[2] == null ? nil : $c[2])), $d; - idx = (function() {if (idx['$==']("@")) { - return names.$size() - } else { - return idx.$to_i() - }; return nil; })(); - - $writer = [idx, name]; - $send(names, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - return names['$<<'](arg) - };}, $$27.$$s = self, $$27.$$arity = 1, $$27)); - self.$option("positional_attrs", names.$compact()); - return self.$option("default_attrs", defaults);} - else if ($$$('::', 'Hash')['$===']($case)) { - $b = [[], $hash2([], {})], (names = $b[0]), (defaults = $b[1]), $b; - $send(args, 'each', [], ($$28 = function(key, val){var self = $$28.$$s || this, $c, $d, name = nil, idx = nil, _ = nil, $writer = nil; - - - - if (key == null) { - key = nil; - }; - - if (val == null) { - val = nil; - }; - if ($truthy((name = key.$to_s())['$include?'](":"))) { - - $d = name.$partition(":"), $c = Opal.to_ary($d), (idx = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (name = ($c[2] == null ? nil : $c[2])), $d; - idx = (function() {if (idx['$==']("@")) { - return names.$size() - } else { - return idx.$to_i() - }; return nil; })(); - - $writer = [idx, name]; - $send(names, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];;}; - if ($truthy(val)) { - - $writer = [name, val]; - $send(defaults, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - return nil - };}, $$28.$$s = self, $$28.$$arity = 2, $$28)); - self.$option("positional_attrs", names.$compact()); - return self.$option("default_attrs", defaults);} - else {return self.$raise($$$('::', 'ArgumentError'), "" + "unsupported attributes specification for macro: " + (args.$inspect()))}})(); - }, $SyntaxProcessorDsl_resolve_attributes$26.$$arity = -1); - Opal.alias(self, "resolves_attributes", "resolve_attributes"); - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Preprocessor'); - - var $nesting = [self].concat($parent_nesting), $Preprocessor_process$29; - - return (Opal.def(self, '$process', $Preprocessor_process$29 = function $$process(document, reader) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Preprocessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $Preprocessor_process$29.$$arity = 2), nil) && 'process' - })($nesting[0], $$($nesting, 'Processor'), $nesting); - Opal.const_set($$($nesting, 'Preprocessor'), 'DSL', $$($nesting, 'DocumentProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'TreeProcessor'); - - var $nesting = [self].concat($parent_nesting), $TreeProcessor_process$30; - - return (Opal.def(self, '$process', $TreeProcessor_process$30 = function $$process(document) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'TreeProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $TreeProcessor_process$30.$$arity = 1), nil) && 'process' - })($nesting[0], $$($nesting, 'Processor'), $nesting); - Opal.const_set($$($nesting, 'TreeProcessor'), 'DSL', $$($nesting, 'DocumentProcessorDsl')); - Opal.const_set($nesting[0], 'Treeprocessor', $$($nesting, 'TreeProcessor')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Postprocessor'); - - var $nesting = [self].concat($parent_nesting), $Postprocessor_process$31; - - return (Opal.def(self, '$process', $Postprocessor_process$31 = function $$process(document, output) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Postprocessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $Postprocessor_process$31.$$arity = 2), nil) && 'process' - })($nesting[0], $$($nesting, 'Processor'), $nesting); - Opal.const_set($$($nesting, 'Postprocessor'), 'DSL', $$($nesting, 'DocumentProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'IncludeProcessor'); - - var $nesting = [self].concat($parent_nesting), $IncludeProcessor_process$32, $IncludeProcessor_handles$ques$33; - - - - Opal.def(self, '$process', $IncludeProcessor_process$32 = function $$process(document, reader, target, attributes) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'IncludeProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $IncludeProcessor_process$32.$$arity = 4); - return (Opal.def(self, '$handles?', $IncludeProcessor_handles$ques$33 = function(target) { - var self = this; - - return true - }, $IncludeProcessor_handles$ques$33.$$arity = 1), nil) && 'handles?'; - })($nesting[0], $$($nesting, 'Processor'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'IncludeProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $IncludeProcessorDsl_handles$ques$34; - - - self.$include($$($nesting, 'DocumentProcessorDsl')); - - Opal.def(self, '$handles?', $IncludeProcessorDsl_handles$ques$34 = function($a) { - var $iter = $IncludeProcessorDsl_handles$ques$34.$$p, block = $iter || nil, $post_args, args, $b, self = this; - if (self.handles_block == null) self.handles_block = nil; - - if ($iter) $IncludeProcessorDsl_handles$ques$34.$$p = null; - - - if ($iter) $IncludeProcessorDsl_handles$ques$34.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ((block !== nil)) { - - if ($truthy(args['$empty?']())) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "wrong number of arguments (given " + (args.$size()) + ", expected 0)") - }; - return (self.handles_block = block); - } else if ($truthy((($b = self['handles_block'], $b != null && $b !== nil) ? 'instance-variable' : nil))) { - return self.handles_block.$call(args['$[]'](0)) - } else { - return true - }; - }, $IncludeProcessorDsl_handles$ques$34.$$arity = -1); - })($nesting[0], $nesting); - Opal.const_set($$($nesting, 'IncludeProcessor'), 'DSL', $$($nesting, 'IncludeProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'DocinfoProcessor'); - - var $nesting = [self].concat($parent_nesting), $DocinfoProcessor_initialize$35, $DocinfoProcessor_process$36; - - self.$$prototype.config = nil; - - - Opal.def(self, '$initialize', $DocinfoProcessor_initialize$35 = function $$initialize(config) { - var $a, $iter = $DocinfoProcessor_initialize$35.$$p, $yield = $iter || nil, self = this, $writer = nil; - - if ($iter) $DocinfoProcessor_initialize$35.$$p = null; - - - if (config == null) { - config = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $DocinfoProcessor_initialize$35, false), [config], null); - return ($truthy($a = self.config['$[]']("location")) ? $a : (($writer = ["location", "head"]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - }, $DocinfoProcessor_initialize$35.$$arity = -1); - return (Opal.def(self, '$process', $DocinfoProcessor_process$36 = function $$process(document) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'DocinfoProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $DocinfoProcessor_process$36.$$arity = 1), nil) && 'process'; - })($nesting[0], $$($nesting, 'Processor'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'DocinfoProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $DocinfoProcessorDsl_at_location$37; - - - self.$include($$($nesting, 'DocumentProcessorDsl')); - - Opal.def(self, '$at_location', $DocinfoProcessorDsl_at_location$37 = function $$at_location(value) { - var self = this; - - return self.$option("location", value) - }, $DocinfoProcessorDsl_at_location$37.$$arity = 1); - })($nesting[0], $nesting); - Opal.const_set($$($nesting, 'DocinfoProcessor'), 'DSL', $$($nesting, 'DocinfoProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'BlockProcessor'); - - var $nesting = [self].concat($parent_nesting), $BlockProcessor_initialize$38, $BlockProcessor_process$39; - - self.$$prototype.config = nil; - - self.$attr_accessor("name"); - - Opal.def(self, '$initialize', $BlockProcessor_initialize$38 = function $$initialize(name, config) { - var $a, $iter = $BlockProcessor_initialize$38.$$p, $yield = $iter || nil, self = this, $case = nil, $writer = nil; - - if ($iter) $BlockProcessor_initialize$38.$$p = null; - - - if (name == null) { - name = nil; - }; - - if (config == null) { - config = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $BlockProcessor_initialize$38, false), [config], null); - self.name = ($truthy($a = name) ? $a : self.config['$[]']("name")); - $case = self.config['$[]']("contexts"); - if ($$$('::', 'NilClass')['$===']($case)) {($truthy($a = self.config['$[]']("contexts")) ? $a : (($writer = ["contexts", ["open", "paragraph"].$to_set()]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))} - else if ($$$('::', 'Symbol')['$===']($case)) { - $writer = ["contexts", [self.config['$[]']("contexts")].$to_set()]; - $send(self.config, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];} - else { - $writer = ["contexts", self.config['$[]']("contexts").$to_set()]; - $send(self.config, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];}; - return ($truthy($a = self.config['$[]']("content_model")) ? $a : (($writer = ["content_model", "compound"]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - }, $BlockProcessor_initialize$38.$$arity = -1); - return (Opal.def(self, '$process', $BlockProcessor_process$39 = function $$process(parent, reader, attributes) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'BlockProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $BlockProcessor_process$39.$$arity = 3), nil) && 'process'; - })($nesting[0], $$($nesting, 'Processor'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'BlockProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $BlockProcessorDsl_contexts$40; - - - self.$include($$($nesting, 'SyntaxProcessorDsl')); - - Opal.def(self, '$contexts', $BlockProcessorDsl_contexts$40 = function $$contexts($a) { - var $post_args, value, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - return self.$option("contexts", value.$flatten().$to_set()); - }, $BlockProcessorDsl_contexts$40.$$arity = -1); - Opal.alias(self, "on_contexts", "contexts"); - Opal.alias(self, "on_context", "contexts"); - Opal.alias(self, "bind_to", "contexts"); - })($nesting[0], $nesting); - Opal.const_set($$($nesting, 'BlockProcessor'), 'DSL', $$($nesting, 'BlockProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'MacroProcessor'); - - var $nesting = [self].concat($parent_nesting), $MacroProcessor_initialize$41, $MacroProcessor_process$42; - - self.$$prototype.config = nil; - - self.$attr_accessor("name"); - - Opal.def(self, '$initialize', $MacroProcessor_initialize$41 = function $$initialize(name, config) { - var $a, $iter = $MacroProcessor_initialize$41.$$p, $yield = $iter || nil, self = this, $writer = nil; - - if ($iter) $MacroProcessor_initialize$41.$$p = null; - - - if (name == null) { - name = nil; - }; - - if (config == null) { - config = $hash2([], {}); - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $MacroProcessor_initialize$41, false), [config], null); - self.name = ($truthy($a = name) ? $a : self.config['$[]']("name")); - return ($truthy($a = self.config['$[]']("content_model")) ? $a : (($writer = ["content_model", "attributes"]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - }, $MacroProcessor_initialize$41.$$arity = -1); - return (Opal.def(self, '$process', $MacroProcessor_process$42 = function $$process(parent, target, attributes) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'MacroProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") - }, $MacroProcessor_process$42.$$arity = 3), nil) && 'process'; - })($nesting[0], $$($nesting, 'Processor'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'MacroProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $MacroProcessorDsl_resolve_attributes$43; - - - self.$include($$($nesting, 'SyntaxProcessorDsl')); - - Opal.def(self, '$resolve_attributes', $MacroProcessorDsl_resolve_attributes$43 = function $$resolve_attributes($a) { - var $post_args, args, $b, $iter = $MacroProcessorDsl_resolve_attributes$43.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $MacroProcessorDsl_resolve_attributes$43.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy((($b = args.$size()['$=='](1)) ? args['$[]'](0)['$!']() : args.$size()['$=='](1)))) { - return self.$option("content_model", "text") - } else { - - $send(self, Opal.find_super_dispatcher(self, 'resolve_attributes', $MacroProcessorDsl_resolve_attributes$43, false), $zuper, $iter); - return self.$option("content_model", "attributes"); - }; - }, $MacroProcessorDsl_resolve_attributes$43.$$arity = -1); - Opal.alias(self, "resolves_attributes", "resolve_attributes"); - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'BlockMacroProcessor'); - - var $nesting = [self].concat($parent_nesting), $BlockMacroProcessor_name$44; - - self.$$prototype.name = nil; - return (Opal.def(self, '$name', $BlockMacroProcessor_name$44 = function $$name() { - var self = this; - - - if ($truthy($$($nesting, 'MacroNameRx')['$match?'](self.name.$to_s()))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "invalid name for block macro: " + (self.name)) - }; - return self.name; - }, $BlockMacroProcessor_name$44.$$arity = 0), nil) && 'name' - })($nesting[0], $$($nesting, 'MacroProcessor'), $nesting); - Opal.const_set($$($nesting, 'BlockMacroProcessor'), 'DSL', $$($nesting, 'MacroProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'InlineMacroProcessor'); - - var $nesting = [self].concat($parent_nesting), $InlineMacroProcessor_regexp$45, $InlineMacroProcessor_resolve_regexp$46; - - self.$$prototype.config = self.$$prototype.name = nil; - - (Opal.class_variable_set($nesting[0], '@@rx_cache', $hash2([], {}))); - - Opal.def(self, '$regexp', $InlineMacroProcessor_regexp$45 = function $$regexp() { - var $a, self = this, $writer = nil; - - return ($truthy($a = self.config['$[]']("regexp")) ? $a : (($writer = ["regexp", self.$resolve_regexp(self.name.$to_s(), self.config['$[]']("format"))]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) - }, $InlineMacroProcessor_regexp$45.$$arity = 0); - return (Opal.def(self, '$resolve_regexp', $InlineMacroProcessor_resolve_regexp$46 = function $$resolve_regexp(name, format) { - var $a, $b, self = this, $writer = nil; - - - if ($truthy($$($nesting, 'MacroNameRx')['$match?'](name))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "invalid name for inline macro: " + (name)) - }; - return ($truthy($a = (($b = $nesting[0].$$cvars['@@rx_cache']) == null ? nil : $b)['$[]']([name, format])) ? $a : (($writer = [[name, format], new RegExp("" + "\\\\?" + (name) + ":" + ((function() {if (format['$==']("short")) { - return "(){0}" - } else { - return "(\\S+?)" - }; return nil; })()) + "\\[(|" + ($$($nesting, 'CC_ANY')) + "*?[^\\\\])\\]")]), $send((($b = $nesting[0].$$cvars['@@rx_cache']) == null ? nil : $b), '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - }, $InlineMacroProcessor_resolve_regexp$46.$$arity = 2), nil) && 'resolve_regexp'; - })($nesting[0], $$($nesting, 'MacroProcessor'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'InlineMacroProcessorDsl'); - - var $nesting = [self].concat($parent_nesting), $InlineMacroProcessorDsl_format$47, $InlineMacroProcessorDsl_match$48; - - - self.$include($$($nesting, 'MacroProcessorDsl')); - - Opal.def(self, '$format', $InlineMacroProcessorDsl_format$47 = function $$format(value) { - var self = this; - - return self.$option("format", value) - }, $InlineMacroProcessorDsl_format$47.$$arity = 1); - Opal.alias(self, "match_format", "format"); - Opal.alias(self, "using_format", "format"); - - Opal.def(self, '$match', $InlineMacroProcessorDsl_match$48 = function $$match(value) { - var self = this; - - return self.$option("regexp", value) - }, $InlineMacroProcessorDsl_match$48.$$arity = 1); - })($nesting[0], $nesting); - Opal.const_set($$($nesting, 'InlineMacroProcessor'), 'DSL', $$($nesting, 'InlineMacroProcessorDsl')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Extension'); - - var $nesting = [self].concat($parent_nesting), $Extension_initialize$49; - - - self.$attr_reader("kind"); - self.$attr_reader("config"); - self.$attr_reader("instance"); - return (Opal.def(self, '$initialize', $Extension_initialize$49 = function $$initialize(kind, instance, config) { - var self = this; - - - self.kind = kind; - self.instance = instance; - return (self.config = config); - }, $Extension_initialize$49.$$arity = 3), nil) && 'initialize'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'ProcessorExtension'); - - var $nesting = [self].concat($parent_nesting), $ProcessorExtension_initialize$50; - - - self.$attr_reader("process_method"); - return (Opal.def(self, '$initialize', $ProcessorExtension_initialize$50 = function $$initialize(kind, instance, process_method) { - var $a, $iter = $ProcessorExtension_initialize$50.$$p, $yield = $iter || nil, self = this; - - if ($iter) $ProcessorExtension_initialize$50.$$p = null; - - - if (process_method == null) { - process_method = nil; - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $ProcessorExtension_initialize$50, false), [kind, instance, instance.$config()], null); - return (self.process_method = ($truthy($a = process_method) ? $a : instance.$method("process"))); - }, $ProcessorExtension_initialize$50.$$arity = -3), nil) && 'initialize'; - })($nesting[0], $$($nesting, 'Extension'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Group'); - - var $nesting = [self].concat($parent_nesting), $Group_activate$52; - - - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $register$51; - - return (Opal.def(self, '$register', $register$51 = function $$register(name) { - var self = this; - - - - if (name == null) { - name = nil; - }; - return $$($nesting, 'Extensions').$register(name, self); - }, $register$51.$$arity = -1), nil) && 'register' - })(Opal.get_singleton_class(self), $nesting); - return (Opal.def(self, '$activate', $Group_activate$52 = function $$activate(registry) { - var self = this; - - return self.$raise($$$('::', 'NotImplementedError')) - }, $Group_activate$52.$$arity = 1), nil) && 'activate'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Registry'); - - var $nesting = [self].concat($parent_nesting), $Registry_initialize$53, $Registry_activate$54, $Registry_preprocessor$56, $Registry_preprocessors$ques$57, $Registry_preprocessors$58, $Registry_tree_processor$59, $Registry_tree_processors$ques$60, $Registry_tree_processors$61, $Registry_postprocessor$62, $Registry_postprocessors$ques$63, $Registry_postprocessors$64, $Registry_include_processor$65, $Registry_include_processors$ques$66, $Registry_include_processors$67, $Registry_docinfo_processor$68, $Registry_docinfo_processors$ques$69, $Registry_docinfo_processors$71, $Registry_block$73, $Registry_blocks$ques$74, $Registry_registered_for_block$ques$75, $Registry_find_block_extension$76, $Registry_block_macro$77, $Registry_block_macros$ques$78, $Registry_registered_for_block_macro$ques$79, $Registry_find_block_macro_extension$80, $Registry_inline_macro$81, $Registry_inline_macros$ques$82, $Registry_registered_for_inline_macro$ques$83, $Registry_find_inline_macro_extension$84, $Registry_inline_macros$85, $Registry_prefer$86, $Registry_add_document_processor$87, $Registry_add_syntax_processor$89, $Registry_resolve_args$91, $Registry_as_symbol$92; - - self.$$prototype.groups = self.$$prototype.preprocessor_extensions = self.$$prototype.tree_processor_extensions = self.$$prototype.postprocessor_extensions = self.$$prototype.include_processor_extensions = self.$$prototype.docinfo_processor_extensions = self.$$prototype.block_extensions = self.$$prototype.block_macro_extensions = self.$$prototype.inline_macro_extensions = nil; - - self.$attr_reader("document"); - self.$attr_reader("groups"); - - Opal.def(self, '$initialize', $Registry_initialize$53 = function $$initialize(groups) { - var self = this; - - - - if (groups == null) { - groups = $hash2([], {}); - }; - self.groups = groups; - self.preprocessor_extensions = (self.tree_processor_extensions = (self.postprocessor_extensions = (self.include_processor_extensions = (self.docinfo_processor_extensions = (self.block_extensions = (self.block_macro_extensions = (self.inline_macro_extensions = nil))))))); - return (self.document = nil); - }, $Registry_initialize$53.$$arity = -1); - - Opal.def(self, '$activate', $Registry_activate$54 = function $$activate(document) { - var $$55, self = this, ext_groups = nil; - - - self.document = document; - if ($truthy((ext_groups = $rb_plus($$($nesting, 'Extensions').$groups().$values(), self.groups.$values()))['$empty?']())) { - } else { - $send(ext_groups, 'each', [], ($$55 = function(group){var self = $$55.$$s || this, $case = nil; - - - - if (group == null) { - group = nil; - }; - return (function() {$case = group; - if ($$$('::', 'Proc')['$===']($case)) {return (function() {$case = group.$arity(); - if ((0)['$===']($case) || (-1)['$===']($case)) {return $send(self, 'instance_exec', [], group.$to_proc())} - else if ((1)['$===']($case)) {return group.$call(self)} - else { return nil }})()} - else if ($$$('::', 'Class')['$===']($case)) {return group.$new().$activate(self)} - else {return group.$activate(self)}})();}, $$55.$$s = self, $$55.$$arity = 1, $$55)) - }; - return self; - }, $Registry_activate$54.$$arity = 1); - - Opal.def(self, '$preprocessor', $Registry_preprocessor$56 = function $$preprocessor($a) { - var $iter = $Registry_preprocessor$56.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_preprocessor$56.$$p = null; - - - if ($iter) $Registry_preprocessor$56.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_document_processor', ["preprocessor", args], block.$to_proc()); - }, $Registry_preprocessor$56.$$arity = -1); - - Opal.def(self, '$preprocessors?', $Registry_preprocessors$ques$57 = function() { - var self = this; - - return self.preprocessor_extensions['$!']()['$!']() - }, $Registry_preprocessors$ques$57.$$arity = 0); - - Opal.def(self, '$preprocessors', $Registry_preprocessors$58 = function $$preprocessors() { - var self = this; - - return self.preprocessor_extensions - }, $Registry_preprocessors$58.$$arity = 0); - - Opal.def(self, '$tree_processor', $Registry_tree_processor$59 = function $$tree_processor($a) { - var $iter = $Registry_tree_processor$59.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_tree_processor$59.$$p = null; - - - if ($iter) $Registry_tree_processor$59.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_document_processor', ["tree_processor", args], block.$to_proc()); - }, $Registry_tree_processor$59.$$arity = -1); - - Opal.def(self, '$tree_processors?', $Registry_tree_processors$ques$60 = function() { - var self = this; - - return self.tree_processor_extensions['$!']()['$!']() - }, $Registry_tree_processors$ques$60.$$arity = 0); - - Opal.def(self, '$tree_processors', $Registry_tree_processors$61 = function $$tree_processors() { - var self = this; - - return self.tree_processor_extensions - }, $Registry_tree_processors$61.$$arity = 0); - Opal.alias(self, "treeprocessor", "tree_processor"); - Opal.alias(self, "treeprocessors?", "tree_processors?"); - Opal.alias(self, "treeprocessors", "tree_processors"); - - Opal.def(self, '$postprocessor', $Registry_postprocessor$62 = function $$postprocessor($a) { - var $iter = $Registry_postprocessor$62.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_postprocessor$62.$$p = null; - - - if ($iter) $Registry_postprocessor$62.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_document_processor', ["postprocessor", args], block.$to_proc()); - }, $Registry_postprocessor$62.$$arity = -1); - - Opal.def(self, '$postprocessors?', $Registry_postprocessors$ques$63 = function() { - var self = this; - - return self.postprocessor_extensions['$!']()['$!']() - }, $Registry_postprocessors$ques$63.$$arity = 0); - - Opal.def(self, '$postprocessors', $Registry_postprocessors$64 = function $$postprocessors() { - var self = this; - - return self.postprocessor_extensions - }, $Registry_postprocessors$64.$$arity = 0); - - Opal.def(self, '$include_processor', $Registry_include_processor$65 = function $$include_processor($a) { - var $iter = $Registry_include_processor$65.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_include_processor$65.$$p = null; - - - if ($iter) $Registry_include_processor$65.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_document_processor', ["include_processor", args], block.$to_proc()); - }, $Registry_include_processor$65.$$arity = -1); - - Opal.def(self, '$include_processors?', $Registry_include_processors$ques$66 = function() { - var self = this; - - return self.include_processor_extensions['$!']()['$!']() - }, $Registry_include_processors$ques$66.$$arity = 0); - - Opal.def(self, '$include_processors', $Registry_include_processors$67 = function $$include_processors() { - var self = this; - - return self.include_processor_extensions - }, $Registry_include_processors$67.$$arity = 0); - - Opal.def(self, '$docinfo_processor', $Registry_docinfo_processor$68 = function $$docinfo_processor($a) { - var $iter = $Registry_docinfo_processor$68.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_docinfo_processor$68.$$p = null; - - - if ($iter) $Registry_docinfo_processor$68.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_document_processor', ["docinfo_processor", args], block.$to_proc()); - }, $Registry_docinfo_processor$68.$$arity = -1); - - Opal.def(self, '$docinfo_processors?', $Registry_docinfo_processors$ques$69 = function(location) { - var $$70, self = this; - - - - if (location == null) { - location = nil; - }; - if ($truthy(self.docinfo_processor_extensions)) { - if ($truthy(location)) { - return $send(self.docinfo_processor_extensions, 'any?', [], ($$70 = function(ext){var self = $$70.$$s || this; - - - - if (ext == null) { - ext = nil; - }; - return ext.$config()['$[]']("location")['$=='](location);}, $$70.$$s = self, $$70.$$arity = 1, $$70)) - } else { - return true - } - } else { - return false - }; - }, $Registry_docinfo_processors$ques$69.$$arity = -1); - - Opal.def(self, '$docinfo_processors', $Registry_docinfo_processors$71 = function $$docinfo_processors(location) { - var $$72, self = this; - - - - if (location == null) { - location = nil; - }; - if ($truthy(self.docinfo_processor_extensions)) { - if ($truthy(location)) { - return $send(self.docinfo_processor_extensions, 'select', [], ($$72 = function(ext){var self = $$72.$$s || this; - - - - if (ext == null) { - ext = nil; - }; - return ext.$config()['$[]']("location")['$=='](location);}, $$72.$$s = self, $$72.$$arity = 1, $$72)) - } else { - return self.docinfo_processor_extensions - } - } else { - return nil - }; - }, $Registry_docinfo_processors$71.$$arity = -1); - - Opal.def(self, '$block', $Registry_block$73 = function $$block($a) { - var $iter = $Registry_block$73.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_block$73.$$p = null; - - - if ($iter) $Registry_block$73.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_syntax_processor', ["block", args], block.$to_proc()); - }, $Registry_block$73.$$arity = -1); - - Opal.def(self, '$blocks?', $Registry_blocks$ques$74 = function() { - var self = this; - - return self.block_extensions['$!']()['$!']() - }, $Registry_blocks$ques$74.$$arity = 0); - - Opal.def(self, '$registered_for_block?', $Registry_registered_for_block$ques$75 = function(name, context) { - var self = this, ext = nil; - - if ($truthy((ext = self.block_extensions['$[]'](name.$to_sym())))) { - if ($truthy(ext.$config()['$[]']("contexts")['$include?'](context))) { - return ext - } else { - return false - } - } else { - return false - } - }, $Registry_registered_for_block$ques$75.$$arity = 2); - - Opal.def(self, '$find_block_extension', $Registry_find_block_extension$76 = function $$find_block_extension(name) { - var self = this; - - return self.block_extensions['$[]'](name.$to_sym()) - }, $Registry_find_block_extension$76.$$arity = 1); - - Opal.def(self, '$block_macro', $Registry_block_macro$77 = function $$block_macro($a) { - var $iter = $Registry_block_macro$77.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_block_macro$77.$$p = null; - - - if ($iter) $Registry_block_macro$77.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_syntax_processor', ["block_macro", args], block.$to_proc()); - }, $Registry_block_macro$77.$$arity = -1); - - Opal.def(self, '$block_macros?', $Registry_block_macros$ques$78 = function() { - var self = this; - - return self.block_macro_extensions['$!']()['$!']() - }, $Registry_block_macros$ques$78.$$arity = 0); - - Opal.def(self, '$registered_for_block_macro?', $Registry_registered_for_block_macro$ques$79 = function(name) { - var self = this, ext = nil; - - if ($truthy((ext = self.block_macro_extensions['$[]'](name.$to_sym())))) { - return ext - } else { - return false - } - }, $Registry_registered_for_block_macro$ques$79.$$arity = 1); - - Opal.def(self, '$find_block_macro_extension', $Registry_find_block_macro_extension$80 = function $$find_block_macro_extension(name) { - var self = this; - - return self.block_macro_extensions['$[]'](name.$to_sym()) - }, $Registry_find_block_macro_extension$80.$$arity = 1); - - Opal.def(self, '$inline_macro', $Registry_inline_macro$81 = function $$inline_macro($a) { - var $iter = $Registry_inline_macro$81.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Registry_inline_macro$81.$$p = null; - - - if ($iter) $Registry_inline_macro$81.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'add_syntax_processor', ["inline_macro", args], block.$to_proc()); - }, $Registry_inline_macro$81.$$arity = -1); - - Opal.def(self, '$inline_macros?', $Registry_inline_macros$ques$82 = function() { - var self = this; - - return self.inline_macro_extensions['$!']()['$!']() - }, $Registry_inline_macros$ques$82.$$arity = 0); - - Opal.def(self, '$registered_for_inline_macro?', $Registry_registered_for_inline_macro$ques$83 = function(name) { - var self = this, ext = nil; - - if ($truthy((ext = self.inline_macro_extensions['$[]'](name.$to_sym())))) { - return ext - } else { - return false - } - }, $Registry_registered_for_inline_macro$ques$83.$$arity = 1); - - Opal.def(self, '$find_inline_macro_extension', $Registry_find_inline_macro_extension$84 = function $$find_inline_macro_extension(name) { - var self = this; - - return self.inline_macro_extensions['$[]'](name.$to_sym()) - }, $Registry_find_inline_macro_extension$84.$$arity = 1); - - Opal.def(self, '$inline_macros', $Registry_inline_macros$85 = function $$inline_macros() { - var self = this; - - return self.inline_macro_extensions.$values() - }, $Registry_inline_macros$85.$$arity = 0); - - Opal.def(self, '$prefer', $Registry_prefer$86 = function $$prefer($a) { - var $iter = $Registry_prefer$86.$$p, block = $iter || nil, $post_args, args, self = this, extension = nil, arg0 = nil, extensions_store = nil; - - if ($iter) $Registry_prefer$86.$$p = null; - - - if ($iter) $Registry_prefer$86.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - extension = (function() {if ($truthy($$($nesting, 'ProcessorExtension')['$===']((arg0 = args.$shift())))) { - return arg0 - } else { - - return $send(self, 'send', [arg0].concat(Opal.to_a(args)), block.$to_proc()); - }; return nil; })(); - extensions_store = self.$instance_variable_get(((("" + "@") + (extension.$kind())) + "_extensions").$to_sym()); - extensions_store.$unshift(extensions_store.$delete(extension)); - return extension; - }, $Registry_prefer$86.$$arity = -1); - self.$private(); - - Opal.def(self, '$add_document_processor', $Registry_add_document_processor$87 = function $$add_document_processor(kind, args) { - var $iter = $Registry_add_document_processor$87.$$p, block = $iter || nil, $$88, $a, $b, $c, self = this, kind_name = nil, kind_class_symbol = nil, kind_class = nil, kind_java_class = nil, kind_store = nil, extension = nil, config = nil, processor = nil, processor_class = nil, processor_instance = nil; - - if ($iter) $Registry_add_document_processor$87.$$p = null; - - - if ($iter) $Registry_add_document_processor$87.$$p = null;; - kind_name = kind.$to_s().$tr("_", " "); - kind_class_symbol = $send(kind_name.$split(), 'map', [], ($$88 = function(it){var self = $$88.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$capitalize();}, $$88.$$s = self, $$88.$$arity = 1, $$88)).$join().$to_sym(); - kind_class = $$($nesting, 'Extensions').$const_get(kind_class_symbol, false); - kind_java_class = (function() {if ($truthy((($a = $$$('::', 'AsciidoctorJ', 'skip_raise')) ? 'constant' : nil))) { - - return $$$($$$('::', 'AsciidoctorJ'), 'Extensions').$const_get(kind_class_symbol, false); - } else { - return nil - }; return nil; })(); - kind_store = ($truthy($b = self.$instance_variable_get(((("" + "@") + (kind)) + "_extensions").$to_sym())) ? $b : self.$instance_variable_set(((("" + "@") + (kind)) + "_extensions").$to_sym(), [])); - extension = (function() {if ((block !== nil)) { - - config = self.$resolve_args(args, 1); - (processor = kind_class.$new(config)).$singleton_class().$enable_dsl(); - if (block.$arity()['$=='](0)) { - $send(processor, 'instance_exec', [], block.$to_proc()) - } else { - Opal.yield1(block, processor) - }; - if ($truthy(processor['$process_block_given?']())) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location())) - }; - processor.$freeze(); - return $$($nesting, 'ProcessorExtension').$new(kind, processor); - } else { - - $c = self.$resolve_args(args, 2), $b = Opal.to_ary($c), (processor = ($b[0] == null ? nil : $b[0])), (config = ($b[1] == null ? nil : $b[1])), $c; - if ($truthy((processor_class = $$($nesting, 'Helpers').$resolve_class(processor)))) { - - if ($truthy(($truthy($b = $rb_lt(processor_class, kind_class)) ? $b : ($truthy($c = kind_java_class) ? $rb_lt(processor_class, kind_java_class) : $c)))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "Invalid type for " + (kind_name) + " extension: " + (processor)) - }; - processor_instance = processor_class.$new(config); - processor_instance.$freeze(); - return $$($nesting, 'ProcessorExtension').$new(kind, processor_instance); - } else if ($truthy(($truthy($b = kind_class['$==='](processor)) ? $b : ($truthy($c = kind_java_class) ? kind_java_class['$==='](processor) : $c)))) { - - processor.$update_config(config); - processor.$freeze(); - return $$($nesting, 'ProcessorExtension').$new(kind, processor); - } else { - return self.$raise($$$('::', 'ArgumentError'), "" + "Invalid arguments specified for registering " + (kind_name) + " extension: " + (args)) - }; - }; return nil; })(); - if (extension.$config()['$[]']("position")['$=='](">>")) { - - kind_store.$unshift(extension); - } else { - - kind_store['$<<'](extension); - }; - return extension; - }, $Registry_add_document_processor$87.$$arity = 2); - - Opal.def(self, '$add_syntax_processor', $Registry_add_syntax_processor$89 = function $$add_syntax_processor(kind, args) { - var $iter = $Registry_add_syntax_processor$89.$$p, block = $iter || nil, $$90, $a, $b, $c, self = this, kind_name = nil, kind_class_symbol = nil, kind_class = nil, kind_java_class = nil, kind_store = nil, name = nil, config = nil, processor = nil, $writer = nil, processor_class = nil, processor_instance = nil; - - if ($iter) $Registry_add_syntax_processor$89.$$p = null; - - - if ($iter) $Registry_add_syntax_processor$89.$$p = null;; - kind_name = kind.$to_s().$tr("_", " "); - kind_class_symbol = $send(kind_name.$split(), 'map', [], ($$90 = function(it){var self = $$90.$$s || this; - - - - if (it == null) { - it = nil; - }; - return it.$capitalize();}, $$90.$$s = self, $$90.$$arity = 1, $$90))['$<<']("Processor").$join().$to_sym(); - kind_class = $$($nesting, 'Extensions').$const_get(kind_class_symbol, false); - kind_java_class = (function() {if ($truthy((($a = $$$('::', 'AsciidoctorJ', 'skip_raise')) ? 'constant' : nil))) { - - return $$$($$$('::', 'AsciidoctorJ'), 'Extensions').$const_get(kind_class_symbol, false); - } else { - return nil - }; return nil; })(); - kind_store = ($truthy($b = self.$instance_variable_get(((("" + "@") + (kind)) + "_extensions").$to_sym())) ? $b : self.$instance_variable_set(((("" + "@") + (kind)) + "_extensions").$to_sym(), $hash2([], {}))); - if ((block !== nil)) { - - $c = self.$resolve_args(args, 2), $b = Opal.to_ary($c), (name = ($b[0] == null ? nil : $b[0])), (config = ($b[1] == null ? nil : $b[1])), $c; - (processor = kind_class.$new(self.$as_symbol(name), config)).$singleton_class().$enable_dsl(); - if (block.$arity()['$=='](0)) { - $send(processor, 'instance_exec', [], block.$to_proc()) - } else { - Opal.yield1(block, processor) - }; - if ($truthy((name = self.$as_symbol(processor.$name())))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension at " + (block.$source_location())) - }; - if ($truthy(processor['$process_block_given?']())) { - } else { - self.$raise($$$('::', 'NoMethodError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location())) - }; - processor.$freeze(); - - $writer = [name, $$($nesting, 'ProcessorExtension').$new(kind, processor)]; - $send(kind_store, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - - $c = self.$resolve_args(args, 3), $b = Opal.to_ary($c), (processor = ($b[0] == null ? nil : $b[0])), (name = ($b[1] == null ? nil : $b[1])), (config = ($b[2] == null ? nil : $b[2])), $c; - if ($truthy((processor_class = $$($nesting, 'Helpers').$resolve_class(processor)))) { - - if ($truthy(($truthy($b = $rb_lt(processor_class, kind_class)) ? $b : ($truthy($c = kind_java_class) ? $rb_lt(processor_class, kind_java_class) : $c)))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "Class specified for " + (kind_name) + " extension does not inherit from " + (kind_class) + ": " + (processor)) - }; - processor_instance = processor_class.$new(self.$as_symbol(name), config); - if ($truthy((name = self.$as_symbol(processor_instance.$name())))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension: " + (processor)) - }; - processor_instance.$freeze(); - - $writer = [name, $$($nesting, 'ProcessorExtension').$new(kind, processor_instance)]; - $send(kind_store, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else if ($truthy(($truthy($b = kind_class['$==='](processor)) ? $b : ($truthy($c = kind_java_class) ? kind_java_class['$==='](processor) : $c)))) { - - processor.$update_config(config); - if ($truthy((name = (function() {if ($truthy(name)) { - - - $writer = [self.$as_symbol(name)]; - $send(processor, 'name=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - - return self.$as_symbol(processor.$name()); - }; return nil; })()))) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension: " + (processor)) - }; - processor.$freeze(); - - $writer = [name, $$($nesting, 'ProcessorExtension').$new(kind, processor)]; - $send(kind_store, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - } else { - return self.$raise($$$('::', 'ArgumentError'), "" + "Invalid arguments specified for registering " + (kind_name) + " extension: " + (args)) - }; - }; - }, $Registry_add_syntax_processor$89.$$arity = 2); - - Opal.def(self, '$resolve_args', $Registry_resolve_args$91 = function $$resolve_args(args, expect) { - var self = this, opts = nil, missing = nil; - - - opts = (function() {if ($truthy($$$('::', 'Hash')['$==='](args['$[]'](-1)))) { - return args.$pop() - } else { - return $hash2([], {}) - }; return nil; })(); - if (expect['$=='](1)) { - return opts}; - if ($truthy($rb_gt((missing = $rb_minus($rb_minus(expect, 1), args.$size())), 0))) { - args = $rb_plus(args, $$$('::', 'Array').$new(missing)) - } else if ($truthy($rb_lt(missing, 0))) { - args.$pop(missing['$-@']())}; - args['$<<'](opts); - return args; - }, $Registry_resolve_args$91.$$arity = 2); - return (Opal.def(self, '$as_symbol', $Registry_as_symbol$92 = function $$as_symbol(name) { - var self = this; - - if ($truthy(name)) { - return name.$to_sym() - } else { - return nil - } - }, $Registry_as_symbol$92.$$arity = 1), nil) && 'as_symbol'; - })($nesting[0], null, $nesting); - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $generate_name$93, $next_auto_id$94, $groups$95, $create$96, $register$97, $unregister_all$98, $unregister$99; - - - - Opal.def(self, '$generate_name', $generate_name$93 = function $$generate_name() { - var self = this; - - return "" + "extgrp" + (self.$next_auto_id()) - }, $generate_name$93.$$arity = 0); - - Opal.def(self, '$next_auto_id', $next_auto_id$94 = function $$next_auto_id() { - var $a, self = this; - if (self.auto_id == null) self.auto_id = nil; - - - self.auto_id = ($truthy($a = self.auto_id) ? $a : -1); - return (self.auto_id = $rb_plus(self.auto_id, 1)); - }, $next_auto_id$94.$$arity = 0); - - Opal.def(self, '$groups', $groups$95 = function $$groups() { - var $a, self = this; - if (self.groups == null) self.groups = nil; - - return (self.groups = ($truthy($a = self.groups) ? $a : $hash2([], {}))) - }, $groups$95.$$arity = 0); - - Opal.def(self, '$create', $create$96 = function $$create(name) { - var $iter = $create$96.$$p, block = $iter || nil, $a, self = this; - - if ($iter) $create$96.$$p = null; - - - if ($iter) $create$96.$$p = null;; - - if (name == null) { - name = nil; - }; - if ((block !== nil)) { - return $$($nesting, 'Registry').$new($hash(($truthy($a = name) ? $a : self.$generate_name()), block)) - } else { - return $$($nesting, 'Registry').$new() - }; - }, $create$96.$$arity = -1); - - Opal.def(self, '$register', $register$97 = function $$register($a) { - var $iter = $register$97.$$p, block = $iter || nil, $post_args, args, $b, self = this, argc = nil, resolved_group = nil, group = nil, name = nil, $writer = nil; - - if ($iter) $register$97.$$p = null; - - - if ($iter) $register$97.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - argc = args.$size(); - if ((block !== nil)) { - resolved_group = block - } else if ($truthy((group = args.$pop()))) { - resolved_group = ($truthy($b = $$($nesting, 'Helpers').$resolve_class(group)) ? $b : group) - } else { - self.$raise($$$('::', 'ArgumentError'), "Extension group to register not specified") - }; - name = ($truthy($b = args.$pop()) ? $b : self.$generate_name()); - if ($truthy(args['$empty?']())) { - } else { - self.$raise($$$('::', 'ArgumentError'), "" + "Wrong number of arguments (" + (argc) + " for 1..2)") - }; - - $writer = [name.$to_sym(), resolved_group]; - $send(self.$groups(), '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; - }, $register$97.$$arity = -1); - - Opal.def(self, '$unregister_all', $unregister_all$98 = function $$unregister_all() { - var self = this; - - - self.groups = $hash2([], {}); - return nil; - }, $unregister_all$98.$$arity = 0); - return (Opal.def(self, '$unregister', $unregister$99 = function $$unregister($a) { - var $post_args, names, $$100, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - names = $post_args;; - $send(names, 'each', [], ($$100 = function(group){var self = $$100.$$s || this; - if (self.groups == null) self.groups = nil; - - - - if (group == null) { - group = nil; - }; - return self.groups.$delete(group.$to_sym());}, $$100.$$s = self, $$100.$$arity = 1, $$100)); - return nil; - }, $unregister$99.$$arity = -1), nil) && 'unregister'; - })(Opal.get_singleton_class(self), $nesting); - })($nesting[0], $nesting) - })($nesting[0], $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/stylesheet"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$rstrip', '$read', '$join']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Stylesheets'); - - var $nesting = [self].concat($parent_nesting), $Stylesheets_primary_stylesheet_data$1; - - self.$$prototype.primary_stylesheet_data = nil; - return (Opal.def(self, '$primary_stylesheet_data', $Stylesheets_primary_stylesheet_data$1 = function $$primary_stylesheet_data() { - var $a, self = this; - - return (self.primary_stylesheet_data = ($truthy($a = self.primary_stylesheet_data) ? $a : $$$('::', 'IO').$read($$$('::', 'File').$join("css", "asciidoctor.css")).$rstrip())) - }, $Stylesheets_primary_stylesheet_data$1.$$arity = 0), nil) && 'primary_stylesheet_data' - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/document"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass; - - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Document'); - - var $nesting = [self].concat($parent_nesting), $Document_fill_datetime_attributes$1; - - return (Opal.def(self, '$fill_datetime_attributes', $Document_fill_datetime_attributes$1 = function $$fill_datetime_attributes(attrs, input_mtime) { - var self = this; - - - var $truthy = Opal.truthy - var $falsy = Opal.falsy - var nil = Opal.nil - var utc_offset - var source_date_epoch - - var getYear = function (time, utc_offset) { - return utc_offset === 0 ? time.getUTCFullYear() : time.getFullYear() - } - var getMonth = function (time, utc_offset) { - return utc_offset === 0 ? time.getUTCMonth() : time.getMonth() - } - var getDay = function (time, utc_offset) { - return utc_offset === 0 ? time.getUTCDate() : time.getDate() - } - var getHours = function (time, utc_offset) { - return utc_offset === 0 ? time.getUTCHours() : time.getHours() - } - - var now = new Date() - // See https://reproducible-builds.org/specs/source-date-epoch/ - if (Opal.const_get_qualified('::', 'ENV')['$key?']('SOURCE_DATE_EPOCH')) { - now.setTime(parseInt(Opal.const_get_qualified('::', 'ENV')['$[]']('SOURCE_DATE_EPOCH')) * 1000) - source_date_epoch = now - utc_offset = 0 // utc - } else { - utc_offset = -now.getTimezoneOffset() / 60 // local date - } - // localdate and localyear - if ($truthy((localdate = attrs['$[]']('localdate')))) { - if ($falsy(localyear = attrs['$[]']('localyear'))) { - localyear = localdate.indexOf('-') === 4 ? localdate.substring(0, 4) : nil - attrs['$[]=']('localyear', localyear) - } - } else { - var now_year = getYear(now, utc_offset).toString() - var now_month = ('0' + (getMonth(now, utc_offset) + 1)).slice(-2) - var now_day = ('0' + getDay(now, utc_offset)).slice(-2) - localdate = now_year + '-' + now_month + '-' + now_day - attrs['$[]=']('localdate', localdate) - localyear = now_year - attrs['$[]=']('localyear', now_year) - } - // localtime - if ($falsy((localtime = attrs['$[]']('localtime')))) { - var hours = ('0' + (getHours(now, utc_offset))).slice(-2) - var minutes = ('0' + (now.getMinutes())).slice(-2) - var seconds = ('0' + (now.getSeconds())).slice(-2) - var utc_offset_format - if (utc_offset === 0) { - utc_offset_format = 'UTC' - } else if (utc_offset > 0) { - utc_offset_format = ('+0' + (utc_offset * 100)).slice(-5) - } else { - utc_offset_format = ('-0' + (-utc_offset * 100)).slice(-5) - } - localtime = hours + ':' + minutes + ':' + seconds + ' ' + utc_offset_format - attrs['$[]=']('localtime', localtime) - } - // localdatetime - if ($falsy((localdatetime = attrs['$[]']('localdatetime')))) { - localdatetime = localdate + ' ' + localtime - attrs['$[]=']('localdatetime', localdatetime) - } - - // docdate, doctime and docdatetime should default to localdate, localtime and localdatetime if not otherwise set - if ($truthy(source_date_epoch)) { - input_mtime = source_date_epoch - } else if ($truthy(input_mtime)) { - utc_offset = -input_mtime.getTimezoneOffset() / 60 - } else { - input_mtime = now - } - - // docdate and docyear - if ($truthy(docdate = attrs['$[]']('docdate'))) { - attrs['$[]=']('docyear', docdate.indexOf('-') === 4 ? docdate.substring(0, 4) : nil) - } else { - var mtime_year = getYear(input_mtime, utc_offset).toString() - var mtime_month = ('0' + (getMonth(input_mtime, utc_offset) + 1)).slice(-2) - var mtime_day = ('0' + (getDay(input_mtime, utc_offset))).slice(-2) - docdate = mtime_year + '-' + mtime_month + '-' + mtime_day - attrs['$[]=']('docdate', docdate) - if ($falsy(attrs['$[]']('docyear'))) { - attrs['$[]=']('docyear', mtime_year) - } - } - // doctime - if ($falsy(doctime = attrs['$[]']('doctime'))) { - var mtime_hours = ('0' + (getHours(input_mtime, utc_offset))).slice(-2) - var mtime_minutes = ('0' + (input_mtime.getMinutes())).slice(-2) - var mtime_seconds = ('0' + (input_mtime.getSeconds())).slice(-2) - if (utc_offset === 0) { - utc_offset_format = 'UTC' - } else if (utc_offset > 0) { - utc_offset_format = ('+0' + (utc_offset * 100)).slice(-5) - } else { - utc_offset_format = ('-0' + (-utc_offset * 100)).slice(-5) - } - doctime = mtime_hours + ':' + mtime_minutes + ':' + mtime_seconds + ' ' + utc_offset_format - attrs['$[]=']('doctime', doctime) - } - // docdatetime - if ($falsy(attrs['$[]']('docdatetime'))) { - attrs['$[]=']('docdatetime', docdate + ' ' + doctime) - } - return nil - - }, $Document_fill_datetime_attributes$1.$$arity = 2), nil) && 'fill_datetime_attributes' - })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/substitutors"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module; - - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'Substitutors'); - - var $nesting = [self].concat($parent_nesting), $Substitutors_sub_placeholder$1; - - - Opal.def(self, '$sub_placeholder', $Substitutors_sub_placeholder$1 = function $$sub_placeholder(format_string, replacement) { - var self = this; - - return format_string.replace('%s', replacement); - }, $Substitutors_sub_placeholder$1.$$arity = 2) - })($nesting[0], $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/parser"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy; - - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Parser'); - - var $nesting = [self].concat($parent_nesting), $Parser_uniform$ques$1, $Parser_uniform$ques$2; - - if ($truthy(String.prototype.repeat)) { - return (Opal.defs(self, '$uniform?', $Parser_uniform$ques$1 = function(str, chr, len) { - var self = this; - - return chr.repeat(len) === str; - }, $Parser_uniform$ques$1.$$arity = 3), nil) && 'uniform?' - } else { - return (Opal.defs(self, '$uniform?', $Parser_uniform$ques$2 = function(str, chr, len) { - var self = this; - - return Array.apply(null, { length: len }).map(function () { return chr }).join('') === str; - }, $Parser_uniform$ques$2.$$arity = 3), nil) && 'uniform?' - } - })($nesting[0], null, $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext/syntax_highlighter"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy; - - Opal.add_stubs(['$key?', '$registry', '$[]', '$include?', '$include', '$empty?', '$debug', '$logger', '$join', '$keys']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'SyntaxHighlighter'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $parent_nesting) { - var self = $module($base, 'Factory'); - - var $nesting = [self].concat($parent_nesting), $Factory_for$1; - - - Opal.def(self, '$for', $Factory_for$1 = function(name) { - var self = this; - - if ($truthy(self.$registry()['$key?'](name))) { - return self.$registry()['$[]'](name) - } else { - - if ($truthy(self['$include?']($$($nesting, 'Logging')))) { - } else { - self.$include($$($nesting, 'Logging')) - }; - if ($truthy(self.$registry()['$empty?']())) { - self.$logger().$debug("no syntax highlighter available, functionality disabled.") - } else { - self.$logger().$debug("" + "syntax highlighter named '" + (name) + "' is not available, must be one of: '" + (self.$registry().$keys().$join("', '")) + "'.") - }; - return nil; - } - }, $Factory_for$1.$$arity = 1) - })($nesting[0], $nesting) - })($nesting[0], $nesting) - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/asciidoctor_ext"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - self.$require("asciidoctor/js/asciidoctor_ext/stylesheet"); - self.$require("asciidoctor/js/asciidoctor_ext/document"); - self.$require("asciidoctor/js/asciidoctor_ext/substitutors"); - self.$require("asciidoctor/js/asciidoctor_ext/parser"); - self.$require("asciidoctor/js/asciidoctor_ext/syntax_highlighter"); - -// Load specific runtime -self.$require("asciidoctor/js/asciidoctor_ext/node"); -; -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/opal_ext/logger"] = function(Opal) { - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$chr', '$rjust', '$message_as_string', '$<', '$write', '$call', '$[]']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Logger'); - - var $nesting = [self].concat($parent_nesting), $Logger_add$2; - - self.$$prototype.level = self.$$prototype.progname = self.$$prototype.pipe = self.$$prototype.formatter = nil; - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Formatter'); - - var $nesting = [self].concat($parent_nesting), $Formatter_call$1; - - return (Opal.def(self, '$call', $Formatter_call$1 = function $$call(severity, time, progname, msg) { - var self = this, time_format = nil; - - - time_format = time.getFullYear() + '-' + ('0'+(time.getMonth()+1)).slice(-2) + '-' + ('0'+time.getDate()).slice(-2) + 'T' + ('0'+time.getHours()).slice(-2) + ':' + ('0'+time.getMinutes()).slice(-2) + ':' + ('0'+time.getSeconds()).slice(-2) + '.' + ('00' + new Date().getMilliseconds() * 1000).slice(-6); - return "" + (severity.$chr()) + ", [" + (time_format) + "] " + (severity.$rjust(5)) + " -- " + (progname) + ": " + (self.$message_as_string(msg)); - }, $Formatter_call$1.$$arity = 4), nil) && 'call' - })($nesting[0], null, $nesting); - return (Opal.def(self, '$add', $Logger_add$2 = function $$add(severity, message, progname) { - var $iter = $Logger_add$2.$$p, block = $iter || nil, $a, self = this; - - if ($iter) $Logger_add$2.$$p = null; - - - if ($iter) $Logger_add$2.$$p = null;; - - if (message == null) { - message = nil; - }; - - if (progname == null) { - progname = nil; - }; - if ($truthy($rb_lt((severity = ($truthy($a = severity) ? $a : $$($nesting, 'UNKNOWN'))), self.level))) { - return true}; - progname = ($truthy($a = progname) ? $a : self.progname); - if ($truthy(message)) { - } else if ((block !== nil)) { - message = Opal.yieldX(block, []) - } else { - - message = progname; - progname = self.progname; - }; - self.pipe.$write(self.formatter.$call(($truthy($a = $$($nesting, 'SEVERITY_LABELS')['$[]'](severity)) ? $a : "ANY"), new Date(), progname, message)); - return true; - }, $Logger_add$2.$$arity = -2), nil) && 'add'; - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["asciidoctor/js/postscript"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - self.$require("asciidoctor/converter/composite"); - self.$require("asciidoctor/converter/html5"); - self.$require("asciidoctor/extensions"); - self.$require("asciidoctor/js/asciidoctor_ext"); - return self.$require("asciidoctor/js/opal_ext/logger"); -}; - -/* Generated by Opal 0.11.99.dev */ -(function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy; - - Opal.add_stubs(['$require', '$==', '$tap', '$each', '$constants', '$const_get', '$downcase', '$to_s', '$[]=', '$-', '$upcase', '$[]', '$values', '$new', '$attr_reader', '$instance_variable_set', '$send', '$singleton_class', '$<<', '$define', '$dirname', '$absolute_path', '$__dir__', '$join', '$home', '$pwd', '$to_set', '$chr', '$each_key', '$slice', '$length', '$merge', '$default=', '$drop', '$insert']); - - self.$require("set"); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - self.$require("asciidoctor/js") - } else { - nil - }; - (function($base, $parent_nesting) { - var self = $module($base, 'Asciidoctor'); - - var $nesting = [self].concat($parent_nesting), $a, $b, $Asciidoctor$7, $Asciidoctor$9, $Asciidoctor$11, $Asciidoctor$13, $writer = nil; - - - Opal.const_set($nesting[0], 'RUBY_ENGINE_OPAL', Opal.const_set($nesting[0], 'RUBY_ENGINE', $$$('::', 'RUBY_ENGINE'))['$==']("opal")); - (function($base, $parent_nesting) { - var self = $module($base, 'SafeMode'); - - var $nesting = [self].concat($parent_nesting), $SafeMode$1, $SafeMode_value_for_name$3, $SafeMode_name_for_value$4, $SafeMode_names$5; - - - Opal.const_set($nesting[0], 'UNSAFE', 0); - Opal.const_set($nesting[0], 'SAFE', 1); - Opal.const_set($nesting[0], 'SERVER', 10); - Opal.const_set($nesting[0], 'SECURE', 20); - self.names_by_value = $send($hash2([], {}), 'tap', [], ($SafeMode$1 = function(accum){var self = $SafeMode$1.$$s || this, $$2; - - - - if (accum == null) { - accum = nil; - }; - return $send(self.$constants(false), 'each', [], ($$2 = function(sym){var self = $$2.$$s || this, $writer = nil; - - - - if (sym == null) { - sym = nil; - }; - $writer = [self.$const_get(sym, false), sym.$to_s().$downcase()]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$2.$$s = self, $$2.$$arity = 1, $$2));}, $SafeMode$1.$$s = self, $SafeMode$1.$$arity = 1, $SafeMode$1)); - Opal.defs(self, '$value_for_name', $SafeMode_value_for_name$3 = function $$value_for_name(name) { - var self = this; - - return self.$const_get(name.$upcase(), false) - }, $SafeMode_value_for_name$3.$$arity = 1); - Opal.defs(self, '$name_for_value', $SafeMode_name_for_value$4 = function $$name_for_value(value) { - var self = this; - if (self.names_by_value == null) self.names_by_value = nil; - - return self.names_by_value['$[]'](value) - }, $SafeMode_name_for_value$4.$$arity = 1); - Opal.defs(self, '$names', $SafeMode_names$5 = function $$names() { - var self = this; - if (self.names_by_value == null) self.names_by_value = nil; - - return self.names_by_value.$values() - }, $SafeMode_names$5.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Compliance'); - - var $nesting = [self].concat($parent_nesting); - - - self.keys = $$$('::', 'Set').$new(); - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $define$6; - - - self.$attr_reader("keys"); - return (Opal.def(self, '$define', $define$6 = function $$define(key, value) { - var self = this; - if (self.keys == null) self.keys = nil; - - - self.$instance_variable_set("" + "@" + (key), value); - self.$singleton_class().$send("attr_accessor", key); - self.keys['$<<'](key); - return nil; - }, $define$6.$$arity = 2), nil) && 'define'; - })(Opal.get_singleton_class(self), $nesting); - self.$define("block_terminates_paragraph", true); - self.$define("strict_verbatim_paragraphs", true); - self.$define("underline_style_section_titles", true); - self.$define("unwrap_standalone_preamble", true); - self.$define("attribute_missing", "skip"); - self.$define("attribute_undefined", "drop-line"); - self.$define("shorthand_property_syntax", true); - self.$define("natural_xrefs", true); - self.$define("unique_id_start_index", 2); - self.$define("markdown_syntax", true); - })($nesting[0], $nesting); - if ($truthy((($a = $$($nesting, 'ROOT_DIR', 'skip_raise')) ? 'constant' : nil))) { - } else { - Opal.const_set($nesting[0], 'ROOT_DIR', $$$('::', 'File').$dirname($$$('::', 'File').$absolute_path(self.$__dir__()))) - }; - Opal.const_set($nesting[0], 'LIB_DIR', $$$('::', 'File').$join($$($nesting, 'ROOT_DIR'), "lib")); - Opal.const_set($nesting[0], 'DATA_DIR', $$$('::', 'File').$join($$($nesting, 'ROOT_DIR'), "data")); - Opal.const_set($nesting[0], 'USER_HOME', (function() { try { - return $$$('::', 'Dir').$home() - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - - return ($truthy($b = $$$('::', 'ENV')['$[]']("HOME")) ? $b : $$$('::', 'Dir').$pwd()); - } finally { Opal.pop_exception() } - } else { throw $err; } - }})()); - Opal.const_set($nesting[0], 'LF', "\n"); - Opal.const_set($nesting[0], 'NULL', "\u0000"); - Opal.const_set($nesting[0], 'TAB', "\t"); - Opal.const_set($nesting[0], 'MAX_INT', 9007199254740991); - Opal.const_set($nesting[0], 'UTF_8', $$$($$$('::', 'Encoding'), 'UTF_8')); - Opal.const_set($nesting[0], 'BOM_BYTES_UTF_8', [239, 187, 191]); - Opal.const_set($nesting[0], 'BOM_BYTES_UTF_16LE', [255, 254]); - Opal.const_set($nesting[0], 'BOM_BYTES_UTF_16BE', [254, 255]); - Opal.const_set($nesting[0], 'FILE_READ_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) { - return "r" - } else { - return "rb:utf-8:utf-8" - }; return nil; })()); - Opal.const_set($nesting[0], 'URI_READ_MODE', $$($nesting, 'FILE_READ_MODE')); - Opal.const_set($nesting[0], 'FILE_WRITE_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) { - return "w" - } else { - return "w:utf-8" - }; return nil; })()); - Opal.const_set($nesting[0], 'DEFAULT_DOCTYPE', "article"); - Opal.const_set($nesting[0], 'DEFAULT_BACKEND', "html5"); - Opal.const_set($nesting[0], 'DEFAULT_STYLESHEET_KEYS', ["", "DEFAULT"].$to_set()); - Opal.const_set($nesting[0], 'DEFAULT_STYLESHEET_NAME', "asciidoctor.css"); - Opal.const_set($nesting[0], 'BACKEND_ALIASES', $hash2(["html", "docbook"], {"html": "html5", "docbook": "docbook5"})); - Opal.const_set($nesting[0], 'DEFAULT_PAGE_WIDTHS', $hash2(["docbook"], {"docbook": 425})); - Opal.const_set($nesting[0], 'DEFAULT_EXTENSIONS', $hash2(["html", "docbook", "pdf", "epub", "manpage", "asciidoc"], {"html": ".html", "docbook": ".xml", "pdf": ".pdf", "epub": ".epub", "manpage": ".man", "asciidoc": ".adoc"})); - Opal.const_set($nesting[0], 'ASCIIDOC_EXTENSIONS', $hash2([".adoc", ".asciidoc", ".asc", ".ad", ".txt"], {".adoc": true, ".asciidoc": true, ".asc": true, ".ad": true, ".txt": true})); - Opal.const_set($nesting[0], 'SETEXT_SECTION_LEVELS', $hash2(["=", "-", "~", "^", "+"], {"=": 0, "-": 1, "~": 2, "^": 3, "+": 4})); - Opal.const_set($nesting[0], 'ADMONITION_STYLES', ["NOTE", "TIP", "IMPORTANT", "WARNING", "CAUTION"].$to_set()); - Opal.const_set($nesting[0], 'ADMONITION_STYLE_HEADS', $send($$$('::', 'Set').$new(), 'tap', [], ($Asciidoctor$7 = function(accum){var self = $Asciidoctor$7.$$s || this, $$8; - - - - if (accum == null) { - accum = nil; - }; - return $send($$($nesting, 'ADMONITION_STYLES'), 'each', [], ($$8 = function(s){var self = $$8.$$s || this; - - - - if (s == null) { - s = nil; - }; - return accum['$<<'](s.$chr());}, $$8.$$s = self, $$8.$$arity = 1, $$8));}, $Asciidoctor$7.$$s = self, $Asciidoctor$7.$$arity = 1, $Asciidoctor$7))); - Opal.const_set($nesting[0], 'PARAGRAPH_STYLES', ["comment", "example", "literal", "listing", "normal", "open", "pass", "quote", "sidebar", "source", "verse", "abstract", "partintro"].$to_set()); - Opal.const_set($nesting[0], 'VERBATIM_STYLES', ["literal", "listing", "source", "verse"].$to_set()); - Opal.const_set($nesting[0], 'DELIMITED_BLOCKS', $hash2(["--", "----", "....", "====", "****", "____", "++++", "|===", ",===", ":===", "!===", "////", "```"], {"--": ["open", ["comment", "example", "literal", "listing", "pass", "quote", "sidebar", "source", "verse", "admonition", "abstract", "partintro"].$to_set()], "----": ["listing", ["literal", "source"].$to_set()], "....": ["literal", ["listing", "source"].$to_set()], "====": ["example", ["admonition"].$to_set()], "****": ["sidebar", $$$('::', 'Set').$new()], "____": ["quote", ["verse"].$to_set()], "++++": ["pass", ["stem", "latexmath", "asciimath"].$to_set()], "|===": ["table", $$$('::', 'Set').$new()], ",===": ["table", $$$('::', 'Set').$new()], ":===": ["table", $$$('::', 'Set').$new()], "!===": ["table", $$$('::', 'Set').$new()], "////": ["comment", $$$('::', 'Set').$new()], "```": ["fenced_code", $$$('::', 'Set').$new()]})); - Opal.const_set($nesting[0], 'DELIMITED_BLOCK_HEADS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$9 = function(accum){var self = $Asciidoctor$9.$$s || this, $$10; - - - - if (accum == null) { - accum = nil; - }; - return $send($$($nesting, 'DELIMITED_BLOCKS'), 'each_key', [], ($$10 = function(k){var self = $$10.$$s || this, $writer = nil; - - - - if (k == null) { - k = nil; - }; - $writer = [k.$slice(0, 2), true]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$10.$$s = self, $$10.$$arity = 1, $$10));}, $Asciidoctor$9.$$s = self, $Asciidoctor$9.$$arity = 1, $Asciidoctor$9))); - Opal.const_set($nesting[0], 'DELIMITED_BLOCK_TAILS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$11 = function(accum){var self = $Asciidoctor$11.$$s || this, $$12; - - - - if (accum == null) { - accum = nil; - }; - return $send($$($nesting, 'DELIMITED_BLOCKS'), 'each_key', [], ($$12 = function(k){var self = $$12.$$s || this, $writer = nil; - - - - if (k == null) { - k = nil; - }; - if (k.$length()['$=='](4)) { - - $writer = [k, k['$[]']($rb_minus(k.$length(), 1))]; - $send(accum, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - } else { - return nil - };}, $$12.$$s = self, $$12.$$arity = 1, $$12));}, $Asciidoctor$11.$$s = self, $Asciidoctor$11.$$arity = 1, $Asciidoctor$11))); - Opal.const_set($nesting[0], 'CAPTION_ATTRIBUTE_NAMES', $hash2(["example", "figure", "listing", "table"], {"example": "example-caption", "figure": "figure-caption", "listing": "listing-caption", "table": "table-caption"})); - Opal.const_set($nesting[0], 'LAYOUT_BREAK_CHARS', $hash2(["'", "<"], {"'": "thematic_break", "<": "page_break"})); - Opal.const_set($nesting[0], 'MARKDOWN_THEMATIC_BREAK_CHARS', $hash2(["-", "*", "_"], {"-": "thematic_break", "*": "thematic_break", "_": "thematic_break"})); - Opal.const_set($nesting[0], 'HYBRID_LAYOUT_BREAK_CHARS', $$($nesting, 'LAYOUT_BREAK_CHARS').$merge($$($nesting, 'MARKDOWN_THEMATIC_BREAK_CHARS'))); - Opal.const_set($nesting[0], 'NESTABLE_LIST_CONTEXTS', ["ulist", "olist", "dlist"]); - Opal.const_set($nesting[0], 'ORDERED_LIST_STYLES', ["arabic", "loweralpha", "lowerroman", "upperalpha", "upperroman"]); - Opal.const_set($nesting[0], 'ORDERED_LIST_KEYWORDS', $hash2(["loweralpha", "lowerroman", "upperalpha", "upperroman"], {"loweralpha": "a", "lowerroman": "i", "upperalpha": "A", "upperroman": "I"})); - Opal.const_set($nesting[0], 'ATTR_REF_HEAD', "{"); - Opal.const_set($nesting[0], 'LIST_CONTINUATION', "+"); - Opal.const_set($nesting[0], 'HARD_LINE_BREAK', " +"); - Opal.const_set($nesting[0], 'LINE_CONTINUATION', " \\"); - Opal.const_set($nesting[0], 'LINE_CONTINUATION_LEGACY', " +"); - Opal.const_set($nesting[0], 'BLOCK_MATH_DELIMITERS', $hash2(["asciimath", "latexmath"], {"asciimath": ["\\$", "\\$"], "latexmath": ["\\[", "\\]"]})); - Opal.const_set($nesting[0], 'INLINE_MATH_DELIMITERS', $hash2(["asciimath", "latexmath"], {"asciimath": ["\\$", "\\$"], "latexmath": ["\\(", "\\)"]})); - - $writer = ["asciimath"]; - $send(Opal.const_set($nesting[0], 'STEM_TYPE_ALIASES', $hash2(["latexmath", "latex", "tex"], {"latexmath": "latexmath", "latex": "latexmath", "tex": "latexmath"})), 'default=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - Opal.const_set($nesting[0], 'FONT_AWESOME_VERSION', "4.7.0"); - Opal.const_set($nesting[0], 'HIGHLIGHT_JS_VERSION', "9.18.3"); - Opal.const_set($nesting[0], 'MATHJAX_VERSION', "2.7.9"); - Opal.const_set($nesting[0], 'DEFAULT_ATTRIBUTES', $hash2(["appendix-caption", "appendix-refsig", "caution-caption", "chapter-refsig", "example-caption", "figure-caption", "important-caption", "last-update-label", "note-caption", "part-refsig", "prewrap", "sectids", "section-refsig", "table-caption", "tip-caption", "toc-placement", "toc-title", "untitled-label", "version-label", "warning-caption"], {"appendix-caption": "Appendix", "appendix-refsig": "Appendix", "caution-caption": "Caution", "chapter-refsig": "Chapter", "example-caption": "Example", "figure-caption": "Figure", "important-caption": "Important", "last-update-label": "Last updated", "note-caption": "Note", "part-refsig": "Part", "prewrap": "", "sectids": "", "section-refsig": "Section", "table-caption": "Table", "tip-caption": "Tip", "toc-placement": "auto", "toc-title": "Table of Contents", "untitled-label": "Untitled", "version-label": "Version", "warning-caption": "Warning"})); - Opal.const_set($nesting[0], 'FLEXIBLE_ATTRIBUTES', ["sectnums"]); - Opal.const_set($nesting[0], 'INTRINSIC_ATTRIBUTES', $hash2(["startsb", "endsb", "vbar", "caret", "asterisk", "tilde", "plus", "backslash", "backtick", "blank", "empty", "sp", "two-colons", "two-semicolons", "nbsp", "deg", "zwsp", "quot", "apos", "lsquo", "rsquo", "ldquo", "rdquo", "wj", "brvbar", "pp", "cpp", "amp", "lt", "gt"], {"startsb": "[", "endsb": "]", "vbar": "|", "caret": "^", "asterisk": "*", "tilde": "~", "plus": "+", "backslash": "\\", "backtick": "`", "blank": "", "empty": "", "sp": " ", "two-colons": "::", "two-semicolons": ";;", "nbsp": " ", "deg": "°", "zwsp": "​", "quot": """, "apos": "'", "lsquo": "‘", "rsquo": "’", "ldquo": "“", "rdquo": "”", "wj": "⁠", "brvbar": "¦", "pp": "++", "cpp": "C++", "amp": "&", "lt": "<", "gt": ">"})); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - Opal.const_set($nesting[0], 'QUOTE_SUBS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$13 = function(accum){var self = $Asciidoctor$13.$$s || this, normal = nil, compat = nil; - - - - if (accum == null) { - accum = nil; - }; - - $writer = [false, (normal = [["strong", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?\\*\\*(" + ($$($nesting, 'CC_ALL')) + "+?)\\*\\*", 'm')], ["strong", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?\\*(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\*(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["double", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?\"`(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)`\"(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["single", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:`}])(?:\\[([^\\]]+)\\])?'`(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)`'(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["monospaced", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?``(" + ($$($nesting, 'CC_ALL')) + "+?)``", 'm')], ["monospaced", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:\"'`}])(?:\\[([^\\]]+)\\])?`(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)`(?![" + ($$($nesting, 'CC_WORD')) + "\"'`])", 'm')], ["emphasis", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?__(" + ($$($nesting, 'CC_ALL')) + "+?)__", 'm')], ["emphasis", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?_(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)_(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["mark", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?##(" + ($$($nesting, 'CC_ALL')) + "+?)##", 'm')], ["mark", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + "&;:}])(?:\\[([^\\]]+)\\])?#(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)#(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["superscript", "unconstrained", /\\?(?:\[([^\]]+)\])?\^(\S+?)\^/], ["subscript", "unconstrained", /\\?(?:\[([^\]]+)\])?~(\S+?)~/]])]; - $send(accum, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [true, (compat = normal.$drop(0))]; - $send(accum, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [2, ["double", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?``(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)''(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')]]; - $send(compat, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [3, ["single", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?`(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)'(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')]]; - $send(compat, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [4, ["monospaced", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?\\+\\+(" + ($$($nesting, 'CC_ALL')) + "+?)\\+\\+", 'm')]]; - $send(compat, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [5, ["monospaced", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?\\+(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\+(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')]]; - $send(compat, '[]=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - return compat.$insert(3, ["emphasis", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?'(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)'(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')]);}, $Asciidoctor$13.$$s = self, $Asciidoctor$13.$$arity = 1, $Asciidoctor$13))); - Opal.const_set($nesting[0], 'REPLACEMENTS', [[/\\?\(C\)/, "©", "none"], [/\\?\(R\)/, "®", "none"], [/\\?\(TM\)/, "™", "none"], [/(?: |\n|^|\\)--(?: |\n|$)/, " — ", "none"], [new RegExp("" + "(" + ($$($nesting, 'CG_WORD')) + ")\\\\?--(?=" + ($$($nesting, 'CG_WORD')) + ")"), "—​", "leading"], [/\\?\.\.\./, "…​", "none"], [/\\?`'/, "’", "none"], [new RegExp("" + "(" + ($$($nesting, 'CG_ALNUM')) + ")\\\\?'(?=" + ($$($nesting, 'CG_ALPHA')) + ")"), "’", "leading"], [/\\?->/, "→", "none"], [/\\?=>/, "⇒", "none"], [/\\?<-/, "←", "none"], [/\\?<=/, "⇐", "none"], [/\\?(&)amp;((?:[a-zA-Z][a-zA-Z]+\d{0,2}|#\d\d\d{0,4}|#x[\da-fA-F][\da-fA-F][\da-fA-F]{0,3});)/, "", "bounding"]]); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - } else { - nil - }; - })($nesting[0], $nesting); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/core_ext"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/helpers"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/logging"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/rx"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/substitutors"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/version"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/abstract_node"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/abstract_block"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/attribute_list"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/block"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/callouts"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/converter"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/document"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/inline"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/list"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/parser"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/path_resolver"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/reader"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/section"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/stylesheets"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/table"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/writer"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/load"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/convert"); - if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/syntax_highlighter"); - self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/timings"); - return self.$require("asciidoctor/js/postscript"); - } else { - return nil - }; -})(Opal); - - -/* global Opal */ - -/** - * Convert a JSON to an (Opal) Hash. - * @private - */ -var toHash = function (object) { - return object && !object.$$is_hash ? Opal.hash2(Object.keys(object), object) : object -} - -/** - * Convert an (Opal) Hash to JSON. - * @private - */ -var fromHash = function (hash) { - var object = {} - if (hash) { - var stringMap = hash.$$smap - for (var stringMapKey in stringMap) { - var stringMapValue = stringMap[stringMapKey] - object[stringMapKey] = stringMapValue === Opal.nil ? undefined : stringMapValue - } - var numericMap = hash.$$map - if (numericMap) { - var positional = [] - for (var numericMapKey in numericMap) { - var entry = numericMap[numericMapKey] - var numericMapValue = entry.value - var index = entry.key - 1 - positional[index] = numericMapValue === Opal.nil ? undefined : numericMapValue - } - if (positional.length > 0) { - object.$positional = positional - } - } - } - return object -} - -var fromHashKeys = function (hash) { - var object = {} - if (hash) { - var data = hash.$$keys - for (var key in data) { - var value = data[key].value - object[key.toString()] = value === Opal.nil ? undefined : value - } - } - return object -} - -/** - * @private - */ -var prepareOptions = function (options) { - options = toHash(options) - if (options) { - var attrs = options['$[]']('attributes') - if (attrs && typeof attrs === 'object' && attrs.constructor.name === 'Object') { - options = options.$dup() - options['$[]=']('attributes', toHash(attrs)) - } - } - return options -} - -function initializeClass (superClass, className, functions, defaultFunctions, argProxyFunctions) { - var scope = Opal.klass(Opal.Object, superClass, className, function () { }) - var postConstructFunction - var initializeFunction - var constructorFunction - var defaultFunctionsOverridden = {} - for (var functionName in functions) { - if (Object.prototype.hasOwnProperty.call(functions, functionName)) { - (function (functionName) { - var userFunction = functions[functionName] - if (functionName === 'postConstruct') { - postConstructFunction = userFunction - } else if (functionName === 'initialize') { - initializeFunction = userFunction - } else if (functionName === 'constructor') { - constructorFunction = userFunction - } else { - if (defaultFunctions && Object.prototype.hasOwnProperty.call(defaultFunctions, functionName)) { - defaultFunctionsOverridden[functionName] = true - } - Opal.def(scope, '$' + functionName, function () { - var args - if (argProxyFunctions && Object.prototype.hasOwnProperty.call(argProxyFunctions, functionName)) { - args = argProxyFunctions[functionName](arguments) - } else { - args = arguments - } - return userFunction.apply(this, args) - }) - } - }(functionName)) - } - } - var initialize - if (typeof constructorFunction === 'function') { - initialize = function () { - var args = Array.from(arguments) - for (var i = 0; i < args.length; i++) { - // convert all (Opal) Hash arguments to JSON. - if (typeof args[i] === 'object' && '$$smap' in args[i]) { - args[i] = fromHash(args[i]) - } - } - args.unshift(null) - var result = new (Function.prototype.bind.apply(constructorFunction, args)) // eslint-disable-line - Object.assign(this, result) - if (typeof postConstructFunction === 'function') { - postConstructFunction.bind(this)() - } - } - } else if (typeof initializeFunction === 'function') { - initialize = function () { - var args = Array.from(arguments) - for (var i = 0; i < args.length; i++) { - // convert all (Opal) Hash arguments to JSON. - if (typeof args[i] === 'object' && '$$smap' in args[i]) { - args[i] = fromHash(args[i]) - } - } - initializeFunction.apply(this, args) - if (typeof postConstructFunction === 'function') { - postConstructFunction.bind(this)() - } - } - } else { - initialize = function () { - Opal.send(this, Opal.find_super_dispatcher(this, 'initialize', initialize)) - if (typeof postConstructFunction === 'function') { - postConstructFunction.bind(this)() - } - } - } - Opal.def(scope, '$initialize', initialize) - Opal.def(scope, 'super', function (func) { - if (typeof func === 'function') { - Opal.send(this, Opal.find_super_dispatcher(this, func.name, func)) - } else { - // Bind the initialize function to super(); - var argumentsList = Array.from(arguments) - for (var i = 0; i < argumentsList.length; i++) { - // convert all (Opal) Hash arguments to JSON. - if (typeof argumentsList[i] === 'object') { - argumentsList[i] = toHash(argumentsList[i]) - } - } - Opal.send(this, Opal.find_super_dispatcher(this, 'initialize', initialize), argumentsList) - } - }) - if (defaultFunctions) { - for (var defaultFunctionName in defaultFunctions) { - if (Object.prototype.hasOwnProperty.call(defaultFunctions, defaultFunctionName) && !Object.prototype.hasOwnProperty.call(defaultFunctionsOverridden, defaultFunctionName)) { - (function (defaultFunctionName) { - var defaultFunction = defaultFunctions[defaultFunctionName] - Opal.def(scope, '$' + defaultFunctionName, function () { - return defaultFunction.apply(this, arguments) - }) - }(defaultFunctionName)) - } - } - } - return scope -} - -// Asciidoctor API - -/** - * @namespace - * @description - * The main application interface (API) for Asciidoctor. - * This API provides methods to parse AsciiDoc content and convert it to various output formats using built-in or third-party converters. - * - * An AsciiDoc document can be as simple as a single line of content, - * though it more commonly starts with a document header that declares the document title and document attribute definitions. - * The document header is then followed by zero or more section titles, optionally nested, to organize the paragraphs, blocks, lists, etc. of the document. - * - * By default, the processor converts the AsciiDoc document to HTML 5 using a built-in converter. - * However, this behavior can be changed by specifying a different backend (e.g., +docbook+). - * A backend is a keyword for an output format (e.g., DocBook). - * That keyword, in turn, is used to select a converter, which carries out the request to convert the document to that format. - * - * @example - * asciidoctor.convertFile('document.adoc', { 'safe': 'safe' }) // Convert an AsciiDoc file - * - * asciidoctor.convert("I'm using *Asciidoctor* version {asciidoctor-version}.", { 'safe': 'safe' }) // Convert an AsciiDoc string - * - * const doc = asciidoctor.loadFile('document.adoc', { 'safe': 'safe' }) // Parse an AsciiDoc file into a document object - * - * const doc = asciidoctor.load("= Document Title\n\nfirst paragraph\n\nsecond paragraph", { 'safe': 'safe' }) // Parse an AsciiDoc string into a document object - */ -var Asciidoctor = Opal.Asciidoctor.$$class - -/** - * Get Asciidoctor core version number. - * - * @returns {string} - the version number of Asciidoctor core. - * @memberof Asciidoctor - */ -Asciidoctor.prototype.getCoreVersion = function () { - return this.$$const.VERSION -} - -/** - * Get Asciidoctor.js runtime environment information. - * - * @returns {Object} - the runtime environment including the ioModule, the platform, the engine and the framework. - * @memberof Asciidoctor - */ -Asciidoctor.prototype.getRuntime = function () { - return { - ioModule: Opal.const_get_qualified('::', 'JAVASCRIPT_IO_MODULE'), - platform: Opal.const_get_qualified('::', 'JAVASCRIPT_PLATFORM'), - engine: Opal.const_get_qualified('::', 'JAVASCRIPT_ENGINE'), - framework: Opal.const_get_qualified('::', 'JAVASCRIPT_FRAMEWORK') - } -} - -/** - * Parse the AsciiDoc source input into an {@link Document} and convert it to the specified backend format. - * - * Accepts input as a Buffer or String. - * - * @param {string|Buffer} input - AsciiDoc input as String or Buffer - * @param {Object} options - a JSON of options to control processing (default: {}) - * @returns {string|Document} - the {@link Document} object if the converted String is written to a file, - * otherwise the converted String - * @example - * var input = '= Hello, AsciiDoc!\n' + - * 'Guillaume Grossetie \n\n' + - * 'An introduction to http://asciidoc.org[AsciiDoc].\n\n' + - * '== First Section\n\n' + - * '* item 1\n' + - * '* item 2\n'; - * - * var html = asciidoctor.convert(input); - * @memberof Asciidoctor - */ -Asciidoctor.prototype.convert = function (input, options) { - if (typeof input === 'object' && input.constructor.name === 'Buffer') { - input = input.toString('utf8') - } - var result = this.$convert(input, prepareOptions(options)) - return result === Opal.nil ? '' : result -} - -/** - * Parse the AsciiDoc source input into an {@link Document} and convert it to the specified backend format. - * - * @param {string} filename - source filename - * @param {Object} options - a JSON of options to control processing (default: {}) - * @returns {string|Document} - the {@link Document} object if the converted String is written to a file, - * otherwise the converted String - * @example - * var html = asciidoctor.convertFile('./document.adoc'); - * @memberof Asciidoctor - */ -Asciidoctor.prototype.convertFile = function (filename, options) { - return this.$convert_file(filename, prepareOptions(options)) -} - -/** - * Parse the AsciiDoc source input into an {@link Document} - * - * Accepts input as a Buffer or String. - * - * @param {string|Buffer} input - AsciiDoc input as String or Buffer - * @param {Object} options - a JSON of options to control processing (default: {}) - * @returns {Document} - the {@link Document} object - * @memberof Asciidoctor - */ -Asciidoctor.prototype.load = function (input, options) { - if (typeof input === 'object' && input.constructor.name === 'Buffer') { - input = input.toString('utf8') - } - return this.$load(input, prepareOptions(options)) -} - -/** - * Parse the contents of the AsciiDoc source file into an {@link Document} - * - * @param {string} filename - source filename - * @param {Object} options - a JSON of options to control processing (default: {}) - * @returns {Document} - the {@link Document} object - * @memberof Asciidoctor - */ -Asciidoctor.prototype.loadFile = function (filename, options) { - return this.$load_file(filename, prepareOptions(options)) -} - -// AbstractBlock API - -/** - * @namespace - * @extends AbstractNode - */ -var AbstractBlock = Opal.Asciidoctor.AbstractBlock - -/** - * Append a block to this block's list of child blocks. - * @param {AbstractBlock} block - the block to append - * @returns {AbstractBlock} - the parent block to which this block was appended. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.append = function (block) { - this.$append(block) - return this -} - -/** - * Get the String title of this Block with title substitions applied - * - * The following substitutions are applied to block and section titles: - * - * specialcharacters, quotes, replacements, macros, attributes and post_replacements - * - * @returns {string} - the converted String title for this Block, or undefined if the title is not set. - * @example - * block.title // "Foo 3^ # {two-colons} Bar(1)" - * block.getTitle(); // "Foo 3^ # :: Bar(1)" - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getTitle = function () { - var title = this.$title() - return title === Opal.nil ? undefined : title -} - -/** - * Set the String block title. - * - * @param {string} title - The block title - * @returns {string} - the new String title assigned to this Block. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.setTitle = function (title) { - title = typeof title === 'undefined' ? Opal.nil : title - return this['$title='](title) -} - -/** - * Generate and assign caption to block if not already assigned. - * - * If the block has a title and a caption prefix is available for this block, - * then build a caption from this information, assign it a number and store it - * to the caption attribute on the block. - * - * If a caption has already been assigned to this block, do nothing. - * - * The parts of a complete caption are: . - * This partial caption represents the part the precedes the title. - * - * @param {string} value - the String caption to assign to this block or nil to use document attribute. - * @param {string} captionContext - the String context to use when resolving caption-related attributes. - * If not provided, the name of the context for this block is used. Only certain contexts allow the caption to be looked up. - * - * @memberof AbstractBlock - */ -AbstractBlock.prototype.assignCaption = function (value, captionContext) { - value = typeof value === 'undefined' ? Opal.nil : value - captionContext = typeof captionContext === 'undefined' ? null : captionContext - this.$assign_caption(value, captionContext) -} - -/** - * Convenience method that returns the interpreted title of the Block - * with the caption prepended. - * Concatenates the value of this Block's caption instance variable and the - * return value of this Block's title method. No space is added between the - * two values. If the Block does not have a caption, the interpreted title is - * returned. - * - * @returns {string} - the converted String title prefixed with the caption, or just the converted String title if no caption is set - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getCaptionedTitle = function () { - return this.$captioned_title() -} - -/** - * Get the style (block type qualifier) for this block. - * - * @returns {string} - the style for this block - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getStyle = function () { - var style = this.style - return style === Opal.nil ? undefined : style -} - -/** - * Set the style for this block. - * - * @param {string} style - Style - * @memberof AbstractBlock - */ -AbstractBlock.prototype.setStyle = function (style) { - this.style = style -} - -/** - * Get the location in the AsciiDoc source where this block begins. - * - * @returns {string} - the style for this block - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getSourceLocation = function () { - var sourceLocation = this.source_location - if (sourceLocation === Opal.nil) { - return undefined - } - sourceLocation.getFile = function () { - var file = this.file - return file === Opal.nil ? undefined : file - } - sourceLocation.getDirectory = function () { - var dir = this.dir - return dir === Opal.nil ? undefined : dir - } - sourceLocation.getPath = function () { - var path = this.path - return path === Opal.nil ? undefined : path - } - sourceLocation.getLineNumber = function () { - var lineno = this.lineno - return lineno === Opal.nil ? undefined : lineno - } - return sourceLocation -} - -/** - * Get the caption for this block. - * - * @returns {string} - the caption for this block - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getCaption = function () { - var caption = this.$caption() - return caption === Opal.nil ? undefined : caption -} - -/** - * Set the caption for this block. - * - * @param {string} caption - Caption - * @memberof AbstractBlock - */ -AbstractBlock.prototype.setCaption = function (caption) { - this.caption = typeof caption === 'undefined' ? Opal.nil : caption -} - -/** - * Get the level of this section or the section level in which this block resides. - * - * @returns {number} - the level (Integer) of this section - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getLevel = function () { - var level = this.level - return level === Opal.nil ? undefined : level -} - -/** - * Get the substitution keywords to be applied to the contents of this block. - * - * @returns {Array<string>} - the list of {string} substitution keywords associated with this block. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getSubstitutions = function () { - return this.subs -} - -/** - * Check whether a given substitution keyword is present in the substitutions for this block. - * - * @returns {boolean} - whether the substitution is present on this block. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.hasSubstitution = function (substitution) { - return this['$sub?'](substitution) -} - -/** - * Remove the specified substitution keyword from the list of substitutions for this block. - * - * @memberof AbstractBlock - */ -AbstractBlock.prototype.removeSubstitution = function (substitution) { - this.$remove_sub(substitution) -} - -/** - * Checks if the {@link AbstractBlock} contains any child blocks. - * - * @returns {boolean} - whether the {@link AbstractBlock} has child blocks. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.hasBlocks = function () { - return this.blocks.length > 0 -} - -/** - * Get the list of {@link AbstractBlock} sub-blocks for this block. - * - * @returns {Array<AbstractBlock>} - a list of {@link AbstractBlock} sub-blocks - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getBlocks = function () { - return this.blocks -} - -/** - * Get the converted result of the child blocks by converting the children appropriate to content model that this block supports. - * - * @returns {string} - the converted result of the child blocks - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getContent = function () { - return this.$content() -} - -/** - * Get the converted content for this block. - * If the block has child blocks, the content method should cause them to be converted - * and returned as content that can be included in the parent block's template. - * - * @returns {string} - the converted String content for this block - * @memberof AbstractBlock - */ -AbstractBlock.prototype.convert = function () { - return this.$convert() -} - -/** - * Query for all descendant block-level nodes in the document tree - * that match the specified selector (context, style, id, and/or role). - * If a function block is given, it's used as an additional filter. - * If no selector or function block is supplied, all block-level nodes in the tree are returned. - * @param {Object} [selector] - * @param {function} [block] - * @example - * doc.findBy({'context': 'section'}); - * // => { level: 0, title: "Hello, AsciiDoc!", blocks: 0 } - * // => { level: 1, title: "First Section", blocks: 1 } - * - * doc.findBy({'context': 'section'}, function (section) { return section.getLevel() === 1; }); - * // => { level: 1, title: "First Section", blocks: 1 } - * - * doc.findBy({'context': 'listing', 'style': 'source'}); - * // => { context: :listing, content_model: :verbatim, style: "source", lines: 1 } - * - * @returns {Array<AbstractBlock>} - a list of block-level nodes that match the filter or an empty list if no matches are found - * @memberof AbstractBlock - */ -AbstractBlock.prototype.findBy = function (selector, block) { - if (typeof block === 'undefined' && typeof selector === 'function') { - return Opal.send(this, 'find_by', null, selector) - } else if (typeof block === 'function') { - return Opal.send(this, 'find_by', [toHash(selector)], block) - } else { - return this.$find_by(toHash(selector)) - } -} - -/** - * Get the source line number where this block started. - * @returns {number} - the source line number where this block started - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getLineNumber = function () { - var lineno = this.$lineno() - return lineno === Opal.nil ? undefined : lineno -} - -/** - * Check whether this block has any child Section objects. - * Only applies to Document and Section instances. - * @returns {boolean} - true if this block has child Section objects, otherwise false - * @memberof AbstractBlock - */ -AbstractBlock.prototype.hasSections = function () { - // REMIND: call directly the underlying method "$sections?" - // once https://github.com/asciidoctor/asciidoctor/pull/3591 is merged and a new version is released. - // return this['$sections?']() - return this.next_section_index !== Opal.nil && this.next_section_index > 0 -} - -/** - * Get the Array of child Section objects. - * Only applies to Document and Section instances. - * @memberof AbstractBlock - * @returns {Array<Section>} - an {Array} of {@link Section} objects - */ -AbstractBlock.prototype.getSections = function () { - return this.$sections() -} - -/** - * Get the numeral of this block (if section, relative to parent, otherwise absolute). - * Only assigned to section if automatic section numbering is enabled. - * Only assigned to formal block (block with title) if corresponding caption attribute is present. - * If the section is an appendix, the numeral is a letter (starting with A). - * @returns {string} - the numeral - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getNumeral = function () { - return this.$numeral() -} - -/** - * Set the numeral of this block. - * @param {string} value - The numeral value - * @memberof AbstractBlock - */ -AbstractBlock.prototype.setNumeral = function (value) { - this['$numeral='](value) -} - -/** - * A convenience method that checks whether the title of this block is defined. - * - * @returns {boolean} - a {boolean} indicating whether this block has a title. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.hasTitle = function () { - return this['$title?']() -} - -/** - * Returns the converted alt text for this block image. - * @returns {string} - the {string} value of the alt attribute with XML special character and replacement substitutions applied. - * @memberof AbstractBlock - */ -AbstractBlock.prototype.getAlt = function () { - return this.$alt() -} - -// Section API - -/** - * @description - * Methods for managing sections of AsciiDoc content in a document. - * - * @example - * <pre> - * section = asciidoctor.Section.create() - * section.setTitle('Section 1') - * section.setId('sect1') - * section.getBlocks().length // 0 - * section.getId() // "sect1" - * section.append(newBlock) - * section.getBlocks().length // 1 - * </pre> - * @namespace - * @extends AbstractBlock - */ -var Section = Opal.Asciidoctor.Section - -/** - * Create a {Section} object. - * @param {AbstractBlock} [parent] - The parent AbstractBlock. If set, must be a Document or Section object (default: undefined) - * @param {number} [level] - The Integer level of this section (default: 1 more than parent level or 1 if parent not defined) - * @param {boolean} [numbered] - A Boolean indicating whether numbering is enabled for this Section (default: false) - * @param {Object} [opts] - An optional JSON of options (default: {}) - * @returns {Section} - a new {Section} object - * @memberof Section - */ -Section.create = function (parent, level, numbered, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return this.$new(parent, level, numbered, toHash(opts)) -} - -/** - * Set the level of this section or the section level in which this block resides. - * @param {number} level - Level (Integer) - * @memberof AbstractBlock - */ -Section.prototype.setLevel = function (level) { - this.level = level -} - -/** - * Get the 0-based index order of this section within the parent block. - * @returns {number} - * @memberof Section - */ -Section.prototype.getIndex = function () { - return this.index -} - -/** - * Set the 0-based index order of this section within the parent block. - * @param {string} index - The index order of this section - * @memberof Section - */ -Section.prototype.setIndex = function (index) { - this.index = index -} - -/** - * Get the section name of this section. - * @returns {string|undefined} - * @memberof Section - */ -Section.prototype.getSectionName = function () { - var sectname = this.sectname - return sectname === Opal.nil ? undefined : sectname -} - -/** - * Set the section name of this section. - * @param {string} value - The section name - * @memberof Section - */ -Section.prototype.setSectionName = function (value) { - this.sectname = value -} - -/** - * Get the flag to indicate whether this is a special section or a child of one. - * @returns {boolean} - * @memberof Section - */ -Section.prototype.isSpecial = function () { - return this.special -} - -/** - * Set the flag to indicate whether this is a special section or a child of one. - * @param {boolean} value - A flag to indicated if this is a special section - * @memberof Section - */ -Section.prototype.setSpecial = function (value) { - this.special = value -} - -/** - * Get the state of the numbered attribute at this section (need to preserve for creating TOC). - * @returns {boolean} - * @memberof Section - */ -Section.prototype.isNumbered = function () { - return this.numbered -} - -/** - * Get the caption for this section (only relevant for appendices). - * @returns {string} - * @memberof Section - */ -Section.prototype.getCaption = function () { - var value = this.caption - return value === Opal.nil ? undefined : value -} - -/** - * Get the name of the Section (title) - * @returns {string} - * @see {@link AbstractBlock#getTitle} - * @memberof Section - */ -Section.prototype.getName = function () { - return this.getTitle() -} - -/** - * @description - * Methods for managing AsciiDoc content blocks. - * - * @example - * block = asciidoctor.Block.create(parent, 'paragraph', {source: '_This_ is a <test>'}) - * block.getContent() - * // "<em>This</em> is a <test>" - * - * @namespace - * @extends AbstractBlock - */ -var Block = Opal.Asciidoctor.Block - -/** - * Create a {Block} object. - * @param {AbstractBlock} parent - The parent {AbstractBlock} with a compound content model to which this {Block} will be appended. - * @param {string} context - The context name for the type of content (e.g., "paragraph"). - * @param {Object} [opts] - a JSON of options to customize block initialization: (default: {}) - * @param {string} opts.content_model - indicates whether blocks can be nested in this {Block} ("compound"), - * otherwise how the lines should be processed ("simple", "verbatim", "raw", "empty"). (default: "simple") - * @param {Object} opts.attributes - a JSON of attributes (key/value pairs) to assign to this {Block}. (default: {}) - * @param {string|Array<string>} opts.source - a String or {Array} of raw source for this {Block}. (default: undefined) - * - * IMPORTANT: If you don't specify the `subs` option, you must explicitly call the `commit_subs` method to resolve and assign the substitutions - * to this block (which are resolved from the `subs` attribute, if specified, or the default substitutions based on this block's context). - * If you want to use the default subs for a block, pass the option `subs: "default"`. - * You can override the default subs using the `default_subs` option. - * - * @returns {Block} - a new {Block} object - * @memberof Block - */ -Block.create = function (parent, context, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return this.$new(parent, context, toHash(opts)) -} - -/** - * Get the source of this block. - * @returns {string} - the String source of this block. - * @memberof Block - */ -Block.prototype.getSource = function () { - return this.$source() -} - -/** - * Get the source lines of this block. - * @returns {Array<string>} - the String {Array} of source lines for this block. - * @memberof Block - */ -Block.prototype.getSourceLines = function () { - return this.lines -} - -// AbstractNode API - -/** - * @namespace - * @description - * An abstract base class that provides state and methods for managing a node of AsciiDoc content. - * The state and methods on this class are common to all content segments in an AsciiDoc document. - */ -var AbstractNode = Opal.Asciidoctor.AbstractNode - -/** - * Apply the specified substitutions to the text. - * If no substitutions are specified, the following substitutions are applied: - * <code>specialcharacters</code>, <code>quotes</code>, <code>attributes</code>, <code>replacements</code>, <code>macros</code>, and <code>post_replacements</code>. - * - * @param {string|Array<string>} text - The String or String Array of text to process; must not be undefined. - * @param {Array<string>} [subs] - The substitutions to perform; must be an Array or undefined. - * @returns {string|Array<string>} - a String or String Array to match the type of the text argument with substitutions applied. - * @memberof AbstractNode - */ -AbstractNode.prototype.applySubstitutions = function (text, subs) { - return this.$apply_subs(text, subs) -} - -/** - * Resolve the list of comma-delimited subs against the possible options. - * - * @param {string} subs - The comma-delimited String of substitution names or aliases. - * @param {string} [type] - A String representing the context for which the subs are being resolved (default: 'block'). - * @param {Array<string>} [defaults] - An Array of substitutions to start with when computing incremental substitutions (default: undefined). - * @param {string} [subject] - The String to use in log messages to communicate the subject for which subs are being resolved (default: undefined) - * - * @returns {Array<string>} - An Array of Strings representing the substitution operation or nothing if no subs are found. - * @memberof AbstractNode - */ -AbstractNode.prototype.resolveSubstitutions = function (subs, type, defaults, subject) { - if (typeof type === 'undefined') { - type = 'block' - } - if (typeof defaults === 'undefined') { - defaults = Opal.nil - } - if (typeof subject === 'undefined') { - subject = Opal.nil - } - const value = this.$resolve_subs(subs, type, defaults, subject) - return value === Opal.nil ? undefined : value -} - -/** - * Call {@link AbstractNode#resolveSubstitutions} for the 'block' type. - * - * @see {@link AbstractNode#resolveSubstitutions} - */ -AbstractNode.prototype.resolveBlockSubstitutions = function (subs, defaults, subject) { - return this.resolveSubstitutions(subs, 'block', defaults, subject) -} - -/** - * Call {@link AbstractNode#resolveSubstitutions} for the 'inline' type with the subject set as passthrough macro. - * - * @see {@link AbstractNode#resolveSubstitutions} - */ -AbstractNode.prototype.resolvePassSubstitutions = function (subs) { - return this.resolveSubstitutions(subs, 'inline', undefined, 'passthrough macro') -} - -/** - * @returns {string} - the String name of this node - * @memberof AbstractNode - */ -AbstractNode.prototype.getNodeName = function () { - return this.node_name -} - -/** - * @returns {Object} - the JSON of attributes for this node - * @memberof AbstractNode - */ -AbstractNode.prototype.getAttributes = function () { - return fromHash(this.attributes) -} - -/** - * Get the value of the specified attribute. - * If the attribute is not found on this node, fallback_name is set, and this node is not the Document node, get the value of the specified attribute from the Document node. - * - * Look for the specified attribute in the attributes on this node and return the value of the attribute, if found. - * Otherwise, if fallback_name is set (default: same as name) and this node is not the Document node, look for that attribute on the Document node and return its value, if found. - * Otherwise, return the default value (default: undefined). - * - * @param {string} name - The String of the attribute to resolve. - * @param {*} [defaultValue] - The {Object} value to return if the attribute is not found (default: undefined). - * @param {string} [fallbackName] - The String of the attribute to resolve on the Document if the attribute is not found on this node (default: same as name). - * - * @returns {*} - the {Object} value (typically a String) of the attribute or defaultValue if the attribute is not found. - * @memberof AbstractNode - */ -AbstractNode.prototype.getAttribute = function (name, defaultValue, fallbackName) { - var value = this.$attr(name, defaultValue, fallbackName) - return value === Opal.nil ? undefined : value -} - -/** - * Check whether the specified attribute is present on this node. - * - * @param {string} name - The String of the attribute to resolve. - * @returns {boolean} - true if the attribute is present, otherwise false - * @memberof AbstractNode - */ -AbstractNode.prototype.hasAttribute = function (name) { - return name in this.attributes.$$smap -} - -/** - * Check if the specified attribute is defined using the same logic as {AbstractNode#getAttribute}, optionally performing acomparison with the expected value if specified. - * - * Look for the specified attribute in the attributes on this node. - * If not found, fallback_name is specified (default: same as name), and this node is not the Document node, look for that attribute on the Document node. - * In either case, if the attribute is found, and the comparison value is truthy, return whether the two values match. - * Otherwise, return whether the attribute was found. - * - * @param {string} name - The String name of the attribute to resolve. - * @param {*} [expectedValue] - The expected Object value of the attribute (default: undefined). - * @param {string} fallbackName - The String of the attribute to resolve on the Document if the attribute is not found on this node (default: same as name). - * - * @returns {boolean} - a Boolean indicating whether the attribute exists and, if a truthy comparison value is specified, whether the value of the attribute matches the comparison value. - * @memberof AbstractNode - */ -AbstractNode.prototype.isAttribute = function (name, expectedValue, fallbackName) { - var result = this['$attr?'](name, expectedValue, fallbackName) - return result === Opal.nil ? false : result -} - -/** - * Assign the value to the attribute name for the current node. - * - * @param {string} name - The String attribute name to assign - * @param {*} value - The Object value to assign to the attribute (default: '') - * @param {boolean} overwrite - A Boolean indicating whether to assign the attribute if currently present in the attributes JSON (default: true) - * - * @returns {boolean} - a Boolean indicating whether the assignment was performed - * @memberof AbstractNode - */ -AbstractNode.prototype.setAttribute = function (name, value, overwrite) { - if (typeof overwrite === 'undefined') overwrite = true - return this.$set_attr(name, value, overwrite) -} - -/** - * Remove the attribute from the current node. - * @param {string} name - The String attribute name to remove - * @returns {string} - the previous {string} value, or undefined if the attribute was not present. - * @memberof AbstractNode - */ -AbstractNode.prototype.removeAttribute = function (name) { - var value = this.$remove_attr(name) - return value === Opal.nil ? undefined : value -} - -/** - * Get the {@link Document} to which this node belongs. - * - * @returns {Document} - the {@link Document} object to which this node belongs. - * @memberof AbstractNode - */ -AbstractNode.prototype.getDocument = function () { - return this.document -} - -/** - * Get the {@link AbstractNode} to which this node is attached. - * - * @memberof AbstractNode - * @returns {AbstractNode} - the {@link AbstractNode} object to which this node is attached, - * or undefined if this node has no parent. - */ -AbstractNode.prototype.getParent = function () { - var parent = this.parent - return parent === Opal.nil ? undefined : parent -} - -/** - * @returns {boolean} - true if this {AbstractNode} is an instance of {Inline} - * @memberof AbstractNode - */ -AbstractNode.prototype.isInline = function () { - return this['$inline?']() -} - -/** - * @returns {boolean} - true if this {AbstractNode} is an instance of {Block} - * @memberof AbstractNode - */ -AbstractNode.prototype.isBlock = function () { - return this['$block?']() -} - -/** - * Checks if the role attribute is set on this node and, if an expected value is given, whether the space-separated role matches that value. - * - * @param {string} expectedValue - The expected String value of the role (optional, default: undefined) - * - * @returns {boolean} - a Boolean indicating whether the role attribute is set on this node and, if an expected value is given, whether the space-separated role matches that value. - * @memberof AbstractNode - */ -AbstractNode.prototype.isRole = function (expectedValue) { - return this['$role?'](expectedValue) -} - -/** - * Retrieves the space-separated String role for this node. - * - * @returns {string} - the role as a space-separated String. - * @memberof AbstractNode - */ -AbstractNode.prototype.getRole = function () { - return this.$role() -} - -/** - * Checks if the specified role is present in the list of roles for this node. - * - * @param {string} name - The String name of the role to find. - * - * @returns {boolean} - a Boolean indicating whether this node has the specified role. - * @memberof AbstractNode - */ -AbstractNode.prototype.hasRole = function (name) { - return this['$has_role?'](name) -} - -/** - * Retrieves the String role names for this node as an Array. - * - * @returns {Array<string>} - the role names as a String {Array}, which is empty if the role attribute is absent on this node. - * @memberof AbstractNode - */ -AbstractNode.prototype.getRoles = function () { - return this.$roles() -} - -/** - * Adds the given role directly to this node. - * - * @param {string} name - The name of the role to add - * - * @returns {boolean} - a Boolean indicating whether the role was added. - * @memberof AbstractNode - */ -AbstractNode.prototype.addRole = function (name) { - return this.$add_role(name) -} - -/** - * Public: Removes the given role directly from this node. - * - * @param {string} name - The name of the role to remove - * - * @returns {boolean} - a Boolean indicating whether the role was removed. - * @memberof AbstractNode - */ -AbstractNode.prototype.removeRole = function (name) { - return this.$remove_role(name) -} - -/** - * A convenience method that checks if the reftext attribute is defined. - * @returns {boolean} - A Boolean indicating whether the reftext attribute is defined - * @memberof AbstractNode - */ -AbstractNode.prototype.isReftext = function () { - return this['$reftext?']() -} - -/** - * A convenience method that returns the value of the reftext attribute with substitutions applied. - * @returns {string|undefined} - the value of the reftext attribute with substitutions applied. - * @memberof AbstractNode - */ -AbstractNode.prototype.getReftext = function () { - var reftext = this.$reftext() - return reftext === Opal.nil ? undefined : reftext -} - -/** - * @returns {string} - Get the context name for this node - * @memberof AbstractNode - */ -AbstractNode.prototype.getContext = function () { - var context = this.context - // Automatically convert Opal pseudo-symbol to String - return typeof context === 'string' ? context : context.toString() -} - -/** - * @returns {string} - the String id of this node - * @memberof AbstractNode - */ -AbstractNode.prototype.getId = function () { - var id = this.id - return id === Opal.nil ? undefined : id -} - -/** - * @param {string} id - the String id of this node - * @memberof AbstractNode - */ -AbstractNode.prototype.setId = function (id) { - this.id = id -} - -/** - * A convenience method to check if the specified option attribute is enabled on the current node. - * Check if the option is enabled. This method simply checks to see if the <name>-option attribute is defined on the current node. - * - * @param {string} name - the String name of the option - * - * @return {boolean} - a Boolean indicating whether the option has been specified - * @memberof AbstractNode - */ -AbstractNode.prototype.isOption = function (name) { - return this['$option?'](name) -} - -/** - * Set the specified option on this node. - * This method sets the specified option on this node by setting the <name>-option attribute. - * - * @param {string} name - the String name of the option - * - * @memberof AbstractNode - */ -AbstractNode.prototype.setOption = function (name) { - return this.$set_option(name) -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.getIconUri = function (name) { - return this.$icon_uri(name) -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.getMediaUri = function (target, assetDirKey) { - return this.$media_uri(target, assetDirKey) -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.getImageUri = function (targetImage, assetDirKey) { - return this.$image_uri(targetImage, assetDirKey) -} - -/** - * Get the {Converter} instance being used to convert the current {Document}. - * @returns {Object} - * @memberof AbstractNode - */ -AbstractNode.prototype.getConverter = function () { - return this.$converter() -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.readContents = function (target, options) { - return this.$read_contents(target, toHash(options)) -} - -/** - * Read the contents of the file at the specified path. - * This method assumes that the path is safe to read. - * It checks that the file is readable before attempting to read it. - * - * @param path - the {string} path from which to read the contents - * @param {Object} options - a JSON {Object} of options to control processing (default: {}) - * @param {boolean} options.warn_on_failure - a {boolean} that controls whether a warning is issued if the file cannot be read (default: false) - * @param {boolean} options.normalize - a {boolean} that controls whether the lines are normalized and coerced to UTF-8 (default: false) - * - * @returns {string} - the String content of the file at the specified path, or undefined if the file does not exist. - * @memberof AbstractNode - */ -AbstractNode.prototype.readAsset = function (path, options) { - var result = this.$read_asset(path, toHash(options)) - return result === Opal.nil ? undefined : result -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.normalizeWebPath = function (target, start, preserveTargetUri) { - return this.$normalize_web_path(target, start, preserveTargetUri) -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.normalizeSystemPath = function (target, start, jail, options) { - return this.$normalize_system_path(target, start, jail, toHash(options)) -} - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.normalizeAssetPath = function (assetRef, assetName, autoCorrect) { - return this.$normalize_asset_path(assetRef, assetName, autoCorrect) -} - -// Document API - -/** - * The {@link Document} class represents a parsed AsciiDoc document. - * - * Document is the root node of a parsed AsciiDoc document.<br/> - * It provides an abstract syntax tree (AST) that represents the structure of the AsciiDoc document - * from which the Document object was parsed. - * - * Although the constructor can be used to create an empty document object, - * more commonly, you'll load the document object from AsciiDoc source - * using the primary API methods on {@link Asciidoctor}. - * When using one of these APIs, you almost always want to set the safe mode to 'safe' (or 'unsafe') - * to enable all of Asciidoctor's features. - * - * <pre> - * var doc = Asciidoctor.load('= Hello, AsciiDoc!', { 'safe': 'safe' }) - * // => Asciidoctor::Document { doctype: "article", doctitle: "Hello, AsciiDoc!", blocks: 0 } - * </pre> - * - * Instances of this class can be used to extract information from the document or alter its structure. - * As such, the Document object is most often used in extensions and by integrations. - * - * The most basic usage of the Document object is to retrieve the document's title. - * - * <pre> - * var source = '= Document Title' - * var doc = asciidoctor.load(source, { 'safe': 'safe' }) - * console.log(doc.getTitle()) // 'Document Title' - * </pre> - * - * You can also use the Document object to access document attributes defined in the header, such as the author and doctype. - * @namespace - * @extends AbstractBlock - */ -var Document = Opal.Asciidoctor.Document - -/** - * Returns a JSON {Object} of references captured by the processor. - * - * @returns {Object} - a JSON {Object} of {AbstractNode} in the document. - * @memberof Document - */ -Document.prototype.getRefs = function () { - return fromHash(this.catalog.$$smap.refs) -} - -/** - * Returns an {Array} of {Document/ImageReference} captured by the processor. - * - * @returns {Array<ImageReference>} - an {Array} of {Document/ImageReference} in the document. - * Will return an empty array if the option "catalog_assets: true" was not defined on the processor. - * @memberof Document - */ -Document.prototype.getImages = function () { - return this.catalog.$$smap.images -} - -/** - * Returns an {Array} of links captured by the processor. - * - * @returns {Array<string>} - an {Array} of links in the document. - * Will return an empty array if: - * - the function was called before the document was converted - * - the option "catalog_assets: true" was not defined on the processor - * @memberof Document - */ -Document.prototype.getLinks = function () { - return this.catalog.$$smap.links -} - -/** - * @returns {boolean} - true if the document has footnotes otherwise false - * @memberof Document - */ -Document.prototype.hasFootnotes = function () { - return this['$footnotes?']() -} - -/** - * Returns an {Array} of {Document/Footnote} captured by the processor. - * - * @returns {Array<Footnote>} - an {Array} of {Document/Footnote} in the document. - * Will return an empty array if the function was called before the document was converted. - * @memberof Document - */ -Document.prototype.getFootnotes = function () { - return this.$footnotes() -} - -/** - * Returns the level-0 {Section} (i.e. the document title). - * Only stores the title, not the header attributes. - * - * @returns {string} - the level-0 {Section}. - * @memberof Document - */ -Document.prototype.getHeader = function () { - return this.header -} - -/** - * @memberof Document - */ -Document.prototype.setAttribute = function (name, value) { - return this.$set_attribute(name, value) -} - -/** - - * @memberof Document - */ -Document.prototype.removeAttribute = function (name) { - this.attributes.$delete(name) - this.attribute_overrides.$delete(name) -} - -/** - * Convert the AsciiDoc document using the templates loaded by the Converter. - * If a "template_dir" is not specified, or a template is missing, the converter will fall back to using the appropriate built-in template. - * - * @param {Object} [options] - a JSON of options to control processing (default: {}) - * - * @returns {string} - * @memberof Document - */ -Document.prototype.convert = function (options) { - var result = this.$convert(toHash(options)) - return result === Opal.nil ? '' : result -} - -/** - * Write the output to the specified file. - * - * If the converter responds to "write", delegate the work of writing the file to that method. - * Otherwise, write the output the specified file. - * - * @param {string} output - * @param {string} target - * - * @memberof Document - */ -Document.prototype.write = function (output, target) { - return this.$write(output, target) -} - -/** - * @returns {string} - the full name of the author as a String - * @memberof Document - */ -Document.prototype.getAuthor = function () { - return this.$author() -} - -/** - * @returns {string} - * @memberof Document - */ -Document.prototype.getSource = function () { - return this.$source() -} - -/** - * @returns {Array<string>} - * @memberof Document - */ -Document.prototype.getSourceLines = function () { - return this.$source_lines() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.isNested = function () { - return this['$nested?']() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.isEmbedded = function () { - return this['$embedded?']() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.hasExtensions = function () { - return this['$extensions?']() -} - -/** - * Get the value of the doctype attribute for this document. - * @returns {string} - * @memberof Document - */ -Document.prototype.getDoctype = function () { - return this.doctype -} - -/** - * Get the value of the backend attribute for this document. - * @returns {string} - * @memberof Document - */ -Document.prototype.getBackend = function () { - return this.backend -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.isBasebackend = function (base) { - return this['$basebackend?'](base) -} - -/** - * Get the title explicitly defined in the document attributes. - * @returns {string} - * @see {@link AbstractNode#getAttributes} - * @memberof Document - */ -Document.prototype.getTitle = function () { - var title = this.$title() - return title === Opal.nil ? undefined : title -} - -/** - * Set the title on the document header - * - * Set the title of the document header to the specified value. - * If the header does not exist, it is first created. - * - * @param {string} title - the String title to assign as the title of the document header - * - * @returns {string} - the new String title assigned to the document header - * @memberof Document - */ -Document.prototype.setTitle = function (title) { - return this['$title='](title) -} - -/** - * @returns {Document/Title} - a {@link Document/Title} - * @memberof Document - */ -Document.prototype.getDocumentTitle = function (options) { - var doctitle = this.$doctitle(toHash(options)) - return doctitle === Opal.nil ? undefined : doctitle -} - -/** - * @see {@link Document#getDocumentTitle} - * @memberof Document - */ -Document.prototype.getDoctitle = Document.prototype.getDocumentTitle - -/** - * Get the document catalog JSON object. - * @returns {Object} - * @memberof Document - */ -Document.prototype.getCatalog = function () { - return fromHash(this.catalog) -} - -/** - * - * @returns {Object} - * @see Document#getCatalog - * @memberof Document - */ -Document.prototype.getReferences = Document.prototype.getCatalog - -/** - * Get the document revision date from document header (document attribute <code>revdate</code>). - * @returns {string} - * @memberof Document - */ -Document.prototype.getRevisionDate = function () { - return this.getAttribute('revdate') -} - -/** - * @see Document#getRevisionDate - * @returns {string} - * @memberof Document - */ -Document.prototype.getRevdate = function () { - return this.getRevisionDate() -} - -/** - * Get the document revision number from document header (document attribute <code>revnumber</code>). - * @returns {string} - * @memberof Document - */ -Document.prototype.getRevisionNumber = function () { - return this.getAttribute('revnumber') -} - -/** - * Get the document revision remark from document header (document attribute <code>revremark</code>). - * @returns {string} - * @memberof Document - */ -Document.prototype.getRevisionRemark = function () { - return this.getAttribute('revremark') -} - -/** - * Assign a value to the specified attribute in the document header. - * - * The assignment will be visible when the header attributes are restored, - * typically between processor phases (e.g., between parse and convert). - * - * @param {string} name - The {string} attribute name to assign - * @param {Object} value - The {Object} value to assign to the attribute (default: '') - * @param {boolean} overwrite - A {boolean} indicating whether to assign the attribute - * if already present in the attributes Hash (default: true) - * - * @returns {boolean} - true if the assignment was performed otherwise false - * @memberof Document - */ -Document.prototype.setHeaderAttribute = function (name, value, overwrite) { - if (typeof overwrite === 'undefined') overwrite = true - if (typeof value === 'undefined') value = '' - return this.$set_header_attribute(name, value, overwrite) -} - -/** - * Convenience method to retrieve the authors of this document as an {Array} of {Document/Author} objects. - * - * This method is backed by the author-related attributes on the document. - * - * @returns {Array<Author>} - an {Array} of {Document/Author} objects. - * @memberof Document - */ -Document.prototype.getAuthors = function () { - return this.$authors() -} - -// Document.Footnote API - -/** - * @namespace - * @module Document/Footnote - */ -var Footnote = Document.Footnote - -/** - * @returns {number} - the footnote's index - * @memberof Document/Footnote - */ -Footnote.prototype.getIndex = function () { - var index = this.$$data.index - return index === Opal.nil ? undefined : index -} - -/** - * @returns {number} - the footnote's id - * @memberof Document/Footnote - */ -Footnote.prototype.getId = function () { - var id = this.$$data.id - return id === Opal.nil ? undefined : id -} - -/** - * @returns {string} - the footnote's text - * @memberof Document/Footnote - */ -Footnote.prototype.getText = function () { - var text = this.$$data.text - return text === Opal.nil ? undefined : text -} - -// Document.ImageReference API - -/** - * @class - * @module Document/ImageReference - */ -var ImageReference = Document.ImageReference - -/** - * @returns {string} - the image's target - * @memberof Document/ImageReference - */ -ImageReference.prototype.getTarget = function () { - return this.$$data.target -} - -/** - * @returns {string} - the image's directory (imagesdir attribute) - * @memberof Document/ImageReference - */ -ImageReference.prototype.getImagesDirectory = function () { - var value = this.$$data.imagesdir - return value === Opal.nil ? undefined : value -} - -// Document.Author API - -/** - * The Author class represents information about an author extracted from document attributes. - * @namespace - * @module Document/Author - */ -var Author = Document.Author - -/** - * @returns {string} - the author's full name - * @memberof Document/Author - */ -Author.prototype.getName = function () { - var name = this.$$data.name - return name === Opal.nil ? undefined : name -} - -/** - * @returns {string} - the author's first name - * @memberof Document/Author - */ -Author.prototype.getFirstName = function () { - var firstName = this.$$data.firstname - return firstName === Opal.nil ? undefined : firstName -} - -/** - * @returns {string} - the author's middle name (or undefined if the author has no middle name) - * @memberof Document/Author - */ -Author.prototype.getMiddleName = function () { - var middleName = this.$$data.middlename - return middleName === Opal.nil ? undefined : middleName -} - -/** - * @returns {string} - the author's last name - * @memberof Document/Author - */ -Author.prototype.getLastName = function () { - var lastName = this.$$data.lastname - return lastName === Opal.nil ? undefined : lastName -} - -/** - * @returns {string} - the author's initials (by default based on the author's name) - * @memberof Document/Author - */ -Author.prototype.getInitials = function () { - var initials = this.$$data.initials - return initials === Opal.nil ? undefined : initials -} - -/** - * @returns {string} - the author's email - * @memberof Document/Author - */ -Author.prototype.getEmail = function () { - var email = this.$$data.email - return email === Opal.nil ? undefined : email -} - -// private constructor -Document.RevisionInfo = function (date, number, remark) { - this.date = date - this.number = number - this.remark = remark -} - -/** - * @class - * @namespace - * @module Document/RevisionInfo - */ -var RevisionInfo = Document.RevisionInfo - -/** - * Get the document revision date from document header (document attribute <code>revdate</code>). - * @returns {string} - * @memberof Document/RevisionInfo - */ -RevisionInfo.prototype.getDate = function () { - return this.date -} - -/** - * Get the document revision number from document header (document attribute <code>revnumber</code>). - * @returns {string} - * @memberof Document/RevisionInfo - */ -RevisionInfo.prototype.getNumber = function () { - return this.number -} - -/** - * Get the document revision remark from document header (document attribute <code>revremark</code>). - * A short summary of changes in this document revision. - * @returns {string} - * @memberof Document/RevisionInfo - */ -RevisionInfo.prototype.getRemark = function () { - return this.remark -} - -/** - * @returns {boolean} - true if the revision info is empty (ie. not defined), otherwise false - * @memberof Document/RevisionInfo - */ -RevisionInfo.prototype.isEmpty = function () { - return this.date === undefined && this.number === undefined && this.remark === undefined -} - -// SafeMode API - -/** - * @namespace - */ -var SafeMode = Opal.Asciidoctor.SafeMode - -/** - * @param {string} name - the name of the security level - * @returns {number} - the integer value of the corresponding security level - */ -SafeMode.getValueForName = function (name) { - return this.$value_for_name(name) -} - -/** - * @param {number} value - the integer value of the security level - * @returns {string} - the name of the corresponding security level - */ -SafeMode.getNameForValue = function (value) { - var name = this.$name_for_value(value) - return name === Opal.nil ? undefined : name -} - -/** - * @returns {Array<string>} - the String {Array} of security levels - */ -SafeMode.getNames = function () { - return this.$names() -} - -// Callouts API - -/** - * Maintains a catalog of callouts and their associations. - * @namespace - */ -var Callouts = Opal.Asciidoctor.Callouts - -/** - * Create a new Callouts. - * @returns {Callouts} - a new Callouts - * @memberof Callouts - */ -Callouts.create = function () { - return this.$new() -} - -/** - * Register a new callout for the given list item ordinal. - * Generates a unique id for this callout based on the index of the next callout list in the document and the index of this callout since the end of the last callout list. - * - * @param {number} ordinal - the Integer ordinal (1-based) of the list item to which this callout is to be associated - * @returns {string} - The unique String id of this callout - * @example - * callouts = asciidoctor.Callouts.create() - * callouts.register(1) - * // => "CO1-1" - * callouts.nextList() - * callouts.register(2) - * // => "CO2-1" - * @memberof Callouts - */ - -Callouts.prototype.register = function (ordinal) { - return this.$register(ordinal) -} -/** - * Get the next callout index in the document. - * - * Reads the next callout index in the document and advances the pointer. - * This method is used during conversion to retrieve the unique id of the callout that was generated during parsing. - * - * @returns {string} - The unique String id of the next callout in the document - * @memberof Callouts - */ -Callouts.prototype.readNextId = function () { - return this.$read_next_id() -} - -/** - * et a space-separated list of callout ids for the specified list item. - * @param {number} ordinal - the Integer ordinal (1-based) of the list item for which to retrieve the callouts - * @returns {string} - a space-separated String of callout ids associated with the specified list item - * @memberof Callouts - */ -Callouts.prototype.getCalloutIds = function (ordinal) { - return this.$callout_ids(ordinal) -} - -/** - * @memberof Callouts - */ -Callouts.prototype.getLists = function () { - var lists = this.lists - if (lists && lists.length > 0) { - for (var i = 0; i < lists.length; i++) { - var list = lists[i] - if (list && list.length > 0) { - for (var j = 0; j < list.length; j++) { - if (typeof list[j] === 'object' && '$$smap' in list[j]) { - list[j] = fromHash(list[j]) - } - } - } - } - } - return lists -} - -/** - * @memberof Callouts - */ -Callouts.prototype.getListIndex = function () { - return this.list_index -} - -/** - * The current list for which callouts are being collected. - * @returns {Array} - The Array of callouts at the position of the list index pointer - * @memberof Callouts - */ -Callouts.prototype.getCurrentList = function () { - var currentList = this.$current_list() - if (currentList && currentList.length > 0) { - for (var i = 0; i < currentList.length; i++) { - if (typeof currentList[i] === 'object' && '$$smap' in currentList[i]) { - currentList[i] = fromHash(currentList[i]) - } - } - } - return currentList -} - -/** - * Advance to the next callout list in the document. - * @memberof Callouts - */ -Callouts.prototype.nextList = function () { - return this.$nextList() -} - -/** - * Rewind the list index pointer, intended to be used when switching from the parsing to conversion phase. - * @memberof Callouts - */ -Callouts.prototype.rewind = function () { - return this.$rewind() -} - -/** - * @returns {Document/RevisionInfo} - a {@link Document/RevisionInfo} - * @memberof Document - */ -Document.prototype.getRevisionInfo = function () { - return new Document.RevisionInfo(this.getRevisionDate(), this.getRevisionNumber(), this.getRevisionRemark()) -} - -/** - * @returns {boolean} - true if the document contains revision info, otherwise false - * @memberof Document - */ -Document.prototype.hasRevisionInfo = function () { - var revisionInfo = this.getRevisionInfo() - return !revisionInfo.isEmpty() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.getNotitle = function () { - return this.$notitle() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.getNoheader = function () { - return this.$noheader() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.getNofooter = function () { - return this.$nofooter() -} - -/** - * @returns {boolean} - * @memberof Document - */ -Document.prototype.hasHeader = function () { - return this['$header?']() -} - -/** - * Replay attribute assignments at the block level. - * - * <i>This method belongs to an internal API that deals with how attributes are managed by the processor.</i> - * If you understand why this group of methods are necessary, and what they do, feel free to use them. - * <strong>However, keep in mind they are subject to change at any time.</strong> - * - * @param {Object} blockAttributes - A JSON of attributes - * @memberof Document - */ -Document.prototype.playbackAttributes = function (blockAttributes) { - blockAttributes = toHash(blockAttributes) - if (blockAttributes) { - var attrEntries = blockAttributes['$[]']('attribute_entries') - if (attrEntries && Array.isArray(attrEntries)) { - var result = [] - for (var i = 0; i < attrEntries.length; i++) { - var attrEntryObject = attrEntries[i] - if (attrEntryObject && typeof attrEntryObject === 'object' && attrEntryObject.constructor.name === 'Object') { - attrEntryObject.$name = function () { - return this.name - } - attrEntryObject.$value = function () { - return this.value - } - attrEntryObject.$negate = function () { - return this.negate - } - } - result.push(attrEntryObject) - } - blockAttributes['$[]=']('attribute_entries', result) - } - } - this.$playback_attributes(blockAttributes) -} - -/** - * Delete the specified attribute from the document if the name is not locked. - * If the attribute is locked, false is returned. - * Otherwise, the attribute is deleted. - * - * @param {string} name - the String attribute name - * - * @returns {boolean} - true if the attribute was deleted, false if it was not because it's locked - * @memberof Document - */ -Document.prototype.deleteAttribute = function (name) { - return this.$delete_attribute(name) -} - -/** - * Determine if the attribute has been locked by being assigned in document options. - * - * @param {string} key - The attribute key to check - * - * @returns {boolean} - true if the attribute is locked, false otherwise - * @memberof Document - */ -Document.prototype.isAttributeLocked = function (key) { - return this['$attribute_locked?'](key) -} - -/** - * Restore the attributes to the previously saved state (attributes in header). - * - * @memberof Document - */ -Document.prototype.restoreAttributes = function () { - return this.$restore_attributes() -} - -/** - * Parse the AsciiDoc source stored in the {Reader} into an abstract syntax tree. - * - * If the data parameter is not nil, create a new {PreprocessorReader} and assigned it to the reader property of this object. - * Otherwise, continue with the reader that was created when the {Document} was instantiated. - * Pass the reader to {Parser.parse} to parse the source data into an abstract syntax tree. - * - * If parsing has already been performed, this method returns without performing any processing. - * - * @param {string|Array<string>} [data] - The optional replacement AsciiDoc source data as a String or String Array. (default: undefined) - * - * @returns {Document} - this {Document} - * @memberof Document - */ -Document.prototype.parse = function (data) { - return this.$parse(data) -} - -/** - * @memberof Document - */ -Document.prototype.getDocinfo = function (docinfoLocation, suffix) { - return this.$docinfo(docinfoLocation, suffix) -} - -/** - * @param {string} [docinfoLocation] - A {string} for checking docinfo extensions at a given location (head or footer) (default: head) - * @returns {boolean} - * @memberof Document - */ -Document.prototype.hasDocinfoProcessors = function (docinfoLocation) { - return this['$docinfo_processors?'](docinfoLocation) -} - -/** - * Increment the specified counter and store it in the block's attributes. - * - * @param {string} counterName - the String name of the counter attribute - * @param {Block} block - the {Block} on which to save the counter - * - * @returns {number} - the next number in the sequence for the specified counter - * @memberof Document - */ -Document.prototype.incrementAndStoreCounter = function (counterName, block) { - return this.$increment_and_store_counter(counterName, block) -} - -/** - * @deprecated Please use {Document#incrementAndStoreCounter} method. - * @memberof Document - */ -Document.prototype.counterIncrement = Document.prototype.incrementAndStoreCounter - -/** - * Get the named counter and take the next number in the sequence. - * - * @param {string} name - the String name of the counter - * @param {string|number} seed - the initial value as a String or Integer - * - * @returns {number} the next number in the sequence for the specified counter - * @memberof Document - */ -Document.prototype.counter = function (name, seed) { - return this.$counter(name, seed) -} - -/** - * A read-only integer value indicating the level of security that should be enforced while processing this document. - * The value must be set in the Document constructor using the "safe" option. - * - * A value of 0 (UNSAFE) disables any of the security features enforced by Asciidoctor. - * - * A value of 1 (SAFE) closely parallels safe mode in AsciiDoc. - * In particular, it prevents access to files which reside outside of the parent directory of the source file and disables any macro other than the include directive. - * - * A value of 10 (SERVER) disallows the document from setting attributes that would affect the conversion of the document, - * in addition to all the security features of SafeMode.SAFE. - * For instance, this level forbids changing the backend or source-highlighter using an attribute defined in the source document header. - * This is the most fundamental level of security for server deployments (hence the name). - * - * A value of 20 (SECURE) disallows the document from attempting to read files from the file system and including the contents of them into the document, - * in addition to all the security features of SafeMode.SECURE. - * In particular, it disallows use of the include::[] directive and the embedding of binary content (data uri), stylesheets and JavaScripts referenced by the document. - * (Asciidoctor and trusted extensions may still be allowed to embed trusted content into the document). - * - * Since Asciidoctor is aiming for wide adoption, 20 (SECURE) is the default value and is recommended for server deployments. - * - * A value of 100 (PARANOID) is planned to disallow the use of passthrough macros and prevents the document from setting any known attributes, - * in addition to all the security features of SafeMode.SECURE. - * Please note that this level is not currently implemented (and therefore not enforced)! - * - * @returns {number} - An integer value indicating the level of security - * @memberof Document - */ -Document.prototype.getSafe = function () { - return this.safe -} - -/** - * Get the Boolean AsciiDoc compatibility mode. - * Enabling this attribute activates the following syntax changes: - * - * * single quotes as constrained emphasis formatting marks - * * single backticks parsed as inline literal, formatted as monospace - * * single plus parsed as constrained, monospaced inline formatting - * * double plus parsed as constrained, monospaced inline formatting - * - * @returns {boolean} - * @memberof Document - */ -Document.prototype.getCompatMode = function () { - return this.compat_mode -} - -/** - * Get the Boolean flag that indicates whether source map information should be tracked by the parser. - * @returns {boolean} - * @memberof Document - */ -Document.prototype.getSourcemap = function () { - var sourcemap = this.sourcemap - return sourcemap === Opal.nil ? false : sourcemap -} - -/** - * Set the Boolean flag that indicates whether source map information should be tracked by the parser. - * @param {boolean} value - * @memberof Document - */ -Document.prototype.setSourcemap = function (value) { - this.sourcemap = value -} - -/** - * Get the JSON of document counters. - * @returns {Object} - * @memberof Document - */ -Document.prototype.getCounters = function () { - return fromHash(this.counters) -} - -/** - * @returns {Object} - * @memberof Document - */ -Document.prototype.getCallouts = function () { - return this.$callouts() -} - -/** - * Get the String base directory for converting this document. - * - * Defaults to directory of the source file. - * If the source is a string, defaults to the current directory. - * @returns {string} - * @memberof Document - */ -Document.prototype.getBaseDir = function () { - return this.base_dir -} - -/** - * Get the JSON of resolved options used to initialize this {Document}. - * @returns {Object} - * @memberof Document - */ -Document.prototype.getOptions = function () { - return fromHash(this.options) -} - -/** - * Get the outfilesuffix defined at the end of the header. - * @returns {string} - * @memberof Document - */ -Document.prototype.getOutfilesuffix = function () { - return this.outfilesuffix -} - -/** - * Get a reference to the parent Document of this nested document. - * @returns {Document|undefined} - * @memberof Document - */ -Document.prototype.getParentDocument = function () { - var parentDocument = this.parent_document - return parentDocument === Opal.nil ? undefined : parentDocument -} - -/** - * Get the {Reader} associated with this document. - * @returns {Object} - * @memberof Document - */ -Document.prototype.getReader = function () { - return this.reader -} - -/** - * Get the {Converter} instance being used to convert the current {Document}. - * @returns {Object} - * @memberof Document - */ -Document.prototype.getConverter = function () { - return this.converter -} - -/** - * Get the activated {Extensions.Registry} associated with this document. - * @returns {Extensions/Registry} - * @memberof Document - */ -Document.prototype.getExtensions = function () { - var extensions = this.extensions - return extensions === Opal.nil ? undefined : extensions -} - -// Document.Title API - -/** - * A partitioned title (i.e., title & subtitle). - * @namespace - * @module Document/Title - */ -var Title = Document.Title - -/** - * @returns {string} - * @memberof Document/Title - */ -Title.prototype.getMain = function () { - return this.main -} - -/** - * @returns {string} - * @memberof Document/Title - */ -Title.prototype.getCombined = function () { - return this.combined -} - -/** - * @returns {string} - * @memberof Document/Title - */ -Title.prototype.getSubtitle = function () { - var subtitle = this.subtitle - return subtitle === Opal.nil ? undefined : subtitle -} - -/** - * @returns {boolean} - * @memberof Document/Title - */ -Title.prototype.isSanitized = function () { - var sanitized = this['$sanitized?']() - return sanitized === Opal.nil ? false : sanitized -} - -/** - * @returns {boolean} - * @memberof Document/Title - */ -Title.prototype.hasSubtitle = function () { - return this['$subtitle?']() -} - -// Inline API - -/** - * Methods for managing inline elements in AsciiDoc block. - * @namespace - * @extends AbstractNode - */ -var Inline = Opal.Asciidoctor.Inline - -/** - * Create a new Inline element. - * @param {AbstractBlock} parent - * @param {string} context - * @param {string|undefined} text - * @param {Object|undefined} opts - * @returns {Inline} - a new Inline element - * @memberof Inline - */ -Inline.create = function (parent, context, text, opts) { - return this.$new(parent, context, text, prepareOptions(opts)) -} - -/** - * Get the converted content for this inline node. - * - * @returns {string} - the converted String content for this inline node - * @memberof Inline - */ -Inline.prototype.convert = function () { - return this.$convert() -} - -/** - * Get the converted String text of this Inline node, if applicable. - * - * @returns {string|undefined} - the converted String text for this Inline node, or undefined if not applicable for this node. - * @memberof Inline - */ -Inline.prototype.getText = function () { - var text = this.$text() - return text === Opal.nil ? undefined : text -} - -/** - * Get the String sub-type (aka qualifier) of this Inline node. - * - * This value is used to distinguish different variations of the same node - * category, such as different types of anchors. - * - * @returns {string} - the string sub-type of this Inline node. - * @memberof Inline - */ -Inline.prototype.getType = function () { - return this.$type() -} - -/** - * Get the primary String target of this Inline node. - * - * @returns {string|undefined} - the string target of this Inline node. - * @memberof Inline - */ -Inline.prototype.getTarget = function () { - var target = this.$target() - return target === Opal.nil ? undefined : target -} - -/** - * Returns the converted alt text for this inline image. - * - * @returns {string} - the String value of the alt attribute. - * @memberof Inline - */ -Inline.prototype.getAlt = function () { - return this.$alt() -} - -// List API - -/** - * Methods for managing AsciiDoc lists (ordered, unordered and description lists). - * @namespace - * @extends AbstractBlock - */ -var List = Opal.Asciidoctor.List - -/** - * Checks if the {@link List} contains any child {@link ListItem}. - * - * @memberof List - * @returns {boolean} - whether the {@link List} has child {@link ListItem}. - */ -List.prototype.hasItems = function () { - return this['$items?']() -} - -/** - * Get the Array of {@link ListItem} nodes for this {@link List}. - * - * @returns {Array<ListItem>} - an Array of {@link ListItem} nodes. - * @memberof List - */ -List.prototype.getItems = function () { - return this.blocks -} - -// ListItem API - -/** - * Methods for managing items for AsciiDoc olists, ulist, and dlists. - * - * In a description list (dlist), each item is a tuple that consists of a 2-item Array of ListItem terms and a ListItem description (i.e., [[term, term, ...], desc]. - * If a description is not set, then the second entry in the tuple is nil. - * @namespace - * @extends AbstractBlock - */ -var ListItem = Opal.Asciidoctor.ListItem - -/** - * Get the converted String text of this {@link ListItem} node. - * - * @returns {string} - the converted String text for this {@link ListItem} node. - * @memberof ListItem - */ -ListItem.prototype.getText = function () { - return this.$text() -} - -/** - * Set the String source text of this {@link ListItem} node. - * - * @returns {string} - the new String text assigned to this {@link ListItem} - * @memberof ListItem - */ -ListItem.prototype.setText = function (text) { - return this['$text='](text) -} - -/** - * A convenience method that checks whether the text of this {@link ListItem} is not blank (i.e. not undefined or empty string). - * - * @returns {boolean} - whether the text is not blank - * @memberof ListItem - */ -ListItem.prototype.hasText = function () { - return this['$text?']() -} - -/** - * Get the {string} used to mark this {@link ListItem}. - * - * @returns {string} - * @memberof ListItem - */ -ListItem.prototype.getMarker = function () { - return this.marker -} - -/** - * Set the {string} used to mark this {@link ListItem}. - * - * @param {string} marker - the {string} used to mark this {@link ListItem} - * @memberof ListItem - */ -ListItem.prototype.setMarker = function (marker) { - this.marker = marker -} - -/** - * Get the {@link List} to which this {@link ListItem} is attached. - * - * @returns {List} - the {@link List} object to which this {@link ListItem} is attached, - * or undefined if this node has no parent. - * @memberof ListItem - */ -ListItem.prototype.getList = function () { - return this.$list() -} - -/** - * @see {@link ListItem#getList} - * @memberof ListItem - */ -ListItem.prototype.getParent = ListItem.prototype.getList - -// Reader API - -/** @namespace */ -var Reader = Opal.Asciidoctor.Reader - -/** - * Push source onto the front of the reader and switch the context based on the file, document-relative path and line information given. - * - * This method is typically used in an IncludeProcessor to add source read from the target specified. - * - * @param {string} data - * @param {string|undefined} file - * @param {string|undefined} path - * @param {number} lineno - The line number - * @param {Object} attributes - a JSON of attributes - * @returns {Reader} - this {Reader} object. - * @memberof Reader - */ -Reader.prototype.pushInclude = function (data, file, path, lineno, attributes) { - return this.$push_include(data, file, path, lineno, toHash(attributes)) -} - -/** - * Get the current location of the reader's cursor, which encapsulates the file, dir, path, and lineno of the file being read. - * - * @returns {Cursor} - * @memberof Reader - */ -Reader.prototype.getCursor = function () { - return this.$cursor() -} - -/** - * Get the remaining unprocessed lines, without consuming them, as an {Array} of {string}. - * - * Lines will not be consumed from the Reader (ie. you will be able to read these lines again). - * - * @returns {Array<string>} - the remaining unprocessed lines as an {Array} of {string}. - * @memberof Reader - */ -Reader.prototype.getLines = function () { - return this.$lines() -} - -/** - * Get the remaining unprocessed lines, without consuming them, as a {string}. - * - * Lines will not be consumed from the Reader (ie. you will be able to read these lines again). - * - * @returns {string} - the remaining unprocessed lines as a {string} (joined by linefeed characters). - * @memberof Reader - */ -Reader.prototype.getString = function () { - return this.$string() -} - -/** - * Check whether there are any lines left to read. - * If a previous call to this method resulted in a value of false, immediately returned the cached value. - * Otherwise, delegate to peekLine to determine if there is a next line available. - * - * @returns {boolean} - true if there are more lines, false if there are not. - * @memberof Reader - */ -Reader.prototype.hasMoreLines = function () { - return this['$has_more_lines?']() -} - -/** - * Check whether this reader is empty (contains no lines). - * - * @returns {boolean} - true if there are no more lines to peek, otherwise false. - * @memberof Reader - */ -Reader.prototype.isEmpty = function () { - return this['$empty?']() -} - -/** - * Peek at the next line. - * Processes the line if not already marked as processed, but does not consume it (ie. you will be able to read this line again). - * - * This method will probe the reader for more lines. - * If there is a next line that has not previously been visited, the line is passed to the Reader#processLine method to be initialized. - * This call gives sub-classes the opportunity to do preprocessing. - * If the return value of the Reader#processLine is undefined, the data is assumed to be changed and Reader#peekLine is invoked again to perform further processing. - * - * If hasMoreLines is called immediately before peekLine, the direct flag is implicitly true (since the line is flagged as visited). - * - * @param {boolean} direct - A {boolean} flag to bypasses the check for more lines and immediately returns the first element of the internal lines {Array}. (default: false) - * @returns {string} - the next line as a {string} if there are lines remaining. - * @memberof Reader - */ -Reader.prototype.peekLine = function (direct) { - direct = direct || false - var line = this.$peek_line(direct) - return line === Opal.nil ? undefined : line -} - -/** - * Consume, preprocess, and return the next line. - * - * Line will be consumed from the Reader (ie. you won't be able to read this line again). - * - * @returns {string} - the next line as a {string} if data is present. - * @memberof Reader - */ -Reader.prototype.readLine = function () { - var line = this.$read_line() - return line === Opal.nil ? undefined : line -} - -/** - * Consume, preprocess, and return the remaining lines. - * - * This method calls Reader#readLine repeatedly until all lines are consumed and returns the lines as an {Array} of {string}. - * This method differs from Reader#getLines in that it processes each line in turn, hence triggering any preprocessors implemented in sub-classes. - * - * Lines will be consumed from the Reader (ie. you won't be able to read these lines again). - * - * @returns {Array<string>} - the lines read as an {Array} of {string}. - * @memberof Reader - */ -Reader.prototype.readLines = function () { - return this.$read_lines() -} - -/** - * Consume, preprocess, and return the remaining lines joined as a {string}. - * - * Delegates to Reader#readLines, then joins the result. - * - * Lines will be consumed from the Reader (ie. you won't be able to read these lines again). - * - * @returns {string} - the lines read joined as a {string} - * @memberof Reader - */ -Reader.prototype.read = function () { - return this.$read() -} - -/** - * Advance to the next line by discarding the line at the front of the stack. - * - * @returns {boolean} - a Boolean indicating whether there was a line to discard. - * @memberof Reader - */ -Reader.prototype.advance = function () { - return this.$advance() -} - -// Cursor API - -/** @namespace */ -var Cursor = Opal.Asciidoctor.Reader.Cursor - -/** - * Get the file associated to the cursor. - * @returns {string|undefined} - * @memberof Cursor - */ -Cursor.prototype.getFile = function () { - var file = this.file - return file === Opal.nil ? undefined : file -} - -/** - * Get the directory associated to the cursor. - * @returns {string|undefined} - the directory associated to the cursor - * @memberof Cursor - */ -Cursor.prototype.getDirectory = function () { - var dir = this.dir - return dir === Opal.nil ? undefined : dir -} - -/** - * Get the path associated to the cursor. - * @returns {string|undefined} - the path associated to the cursor (or '<stdin>') - * @memberof Cursor - */ -Cursor.prototype.getPath = function () { - var path = this.path - return path === Opal.nil ? undefined : path -} - -/** - * Get the line number of the cursor. - * @returns {number|undefined} - the line number of the cursor - * @memberof Cursor - */ -Cursor.prototype.getLineNumber = function () { - return this.lineno -} - -// Logger API (available in Asciidoctor 1.5.7+) - -function initializeLoggerFormatterClass (className, functions) { - var superclass = Opal.const_get_qualified(Opal.Logger, 'Formatter') - return initializeClass(superclass, className, functions, {}, { - call: function (args) { - for (var i = 0; i < args.length; i++) { - // convert all (Opal) Hash arguments to JSON. - if (typeof args[i] === 'object' && '$$smap' in args[i]) { - args[i] = fromHash(args[i]) - } - } - return args - } - }) -} - -function initializeLoggerClass (className, functions) { - var superClass = Opal.const_get_qualified(Opal.Asciidoctor, 'Logger') - return initializeClass(superClass, className, functions, {}, { - add: function (args) { - if (args.length >= 2 && typeof args[2] === 'object' && '$$smap' in args[2]) { - var message = args[2] - var messageObject = fromHash(message) - messageObject.getText = function () { - return this.text - } - messageObject.getSourceLocation = function () { - return this.source_location - } - messageObject.$inspect = function () { - var sourceLocation = this.getSourceLocation() - if (sourceLocation) { - return sourceLocation.getPath() + ': line ' + sourceLocation.getLineNumber() + ': ' + this.getText() - } else { - return this.getText() - } - } - args[2] = messageObject - } - if (args.length >= 1) { - args[1] = args[1] === Opal.nil ? undefined : args[1] - } - return args - } - }) -} - -/** - * @namespace - */ -var LoggerManager = Opal.const_get_qualified(Opal.Asciidoctor, 'LoggerManager', true) - -// Alias -Opal.Asciidoctor.LoggerManager = LoggerManager - -/** - * @memberof LoggerManager - */ -LoggerManager.getLogger = function () { - return this.$logger() -} - -/** - * @memberof LoggerManager - */ -LoggerManager.setLogger = function (logger) { - this.logger = logger -} - -/** - * @memberof LoggerManager - */ -LoggerManager.newLogger = function (name, functions) { - return initializeLoggerClass(name, functions).$new() -} - -/** - * @memberof LoggerManager - */ -LoggerManager.newFormatter = function (name, functions) { - return initializeLoggerFormatterClass(name, functions).$new() -} - -/** - * @namespace - */ -var LoggerSeverity = Opal.const_get_qualified(Opal.Logger, 'Severity', true) - -// Alias -Opal.Asciidoctor.LoggerSeverity = LoggerSeverity - -/** - * @memberof LoggerSeverity - */ -LoggerSeverity.get = function (severity) { - return LoggerSeverity.$constants()[severity] -} - -/** - * @namespace - */ -var LoggerFormatter = Opal.const_get_qualified(Opal.Logger, 'Formatter', true) - -// Alias -Opal.Asciidoctor.LoggerFormatter = LoggerFormatter - -/** - * @memberof LoggerFormatter - */ -LoggerFormatter.prototype.call = function (severity, time, programName, message) { - return this.$call(LoggerSeverity.get(severity), time, programName, message) -} - -/** - * @namespace - */ -var MemoryLogger = Opal.const_get_qualified(Opal.Asciidoctor, 'MemoryLogger', true) - -// Alias -Opal.Asciidoctor.MemoryLogger = MemoryLogger - -/** - * Create a new MemoryLogger. - * @returns {MemoryLogger} - a MemoryLogger - * @memberof MemoryLogger - */ -MemoryLogger.create = function () { - return this.$new() -} - -/** - * @returns {Array<Object>} - a list of messages - * @memberof MemoryLogger - */ -MemoryLogger.prototype.getMessages = function () { - var messages = this.messages - var result = [] - for (var i = 0; i < messages.length; i++) { - var message = messages[i] - var messageObject = fromHash(message) - if (typeof messageObject.message === 'string') { - messageObject.getText = function () { - return this.message - } - } else { - // also convert the message attribute - messageObject.message = fromHash(messageObject.message) - messageObject.getText = function () { - return this.message.text - } - } - messageObject.getSeverity = function () { - return this.severity.toString() - } - messageObject.getSourceLocation = function () { - return this.message.source_location - } - result.push(messageObject) - } - return result -} - -var Logging = Opal.const_get_qualified(Opal.Asciidoctor, 'Logging', true) - -Opal.Asciidoctor.Logging = Logging - -Logging.getLogger = function () { - return LoggerManager.$logger() -} - -Logging.createLogMessage = function (text, context) { - return Logging.prototype.$message_with_context(text, toHash(context)) -} - -// alias - -/** - * @memberof Reader - */ -Reader.prototype.getLogger = Logging.getLogger -/** - * @memberof Reader - */ -Reader.prototype.createLogMessage = Logging.createLogMessage - -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.getLogger = Logging.getLogger -/** - * @memberof AbstractNode - */ -AbstractNode.prototype.createLogMessage = Logging.createLogMessage - -/** - * @namespace - */ -var Logger = Opal.const_get_qualified(Opal.Asciidoctor, 'Logger', true) - -// Alias -Opal.Asciidoctor.Logger = Logger - -/** - * @returns {number|undefined} - the maximum severity - * @memberof Logger - */ -Logger.prototype.getMaxSeverity = function () { - var result = this.max_severity - return result === Opal.nil ? undefined : result -} -/** - * @returns {LoggerFormatter} - the formatter - * @memberof Logger - */ -Logger.prototype.getFormatter = function () { - return this.formatter -} -/** - * @param {LoggerFormatter} formatter - the formatter - * @memberof Logger - */ -Logger.prototype.setFormatter = function (formatter) { - this.formatter = formatter -} -/** - * @returns {number} - the logging severity threshold - * @memberof Logger - */ -Logger.prototype.getLevel = function () { - return this.level -} -/** - * @param {number} level - the logging severity threshold - * @memberof Logger - */ -Logger.prototype.setLevel = function (level) { - this.level = level -} -/** - * @returns {string} - the program name - * @memberof Logger - */ -Logger.prototype.getProgramName = function () { - return this.progname -} -/** - * @param {string} programName - the program name - * @memberof Logger - */ -Logger.prototype.setProgramName = function (programName) { - this.progname = programName -} - -var RubyLogger = Opal.const_get_qualified('::', 'Logger') - -var log = function (logger, level, message) { - logger['$' + level](message) -} -RubyLogger.prototype.add = function (severity, message, programName) { - var severityValue = typeof severity === 'string' ? LoggerSeverity[severity.toUpperCase()] : severity - this.$add(severityValue, message, programName) -} -RubyLogger.prototype.log = RubyLogger.prototype.add -RubyLogger.prototype.debug = function (message) { - log(this, 'debug', message) -} -RubyLogger.prototype.info = function (message) { - log(this, 'info', message) -} -RubyLogger.prototype.warn = function (message) { - log(this, 'warn', message) -} -RubyLogger.prototype.error = function (message) { - log(this, 'error', message) -} -RubyLogger.prototype.fatal = function (message) { - log(this, 'fatal', message) -} -RubyLogger.prototype.isDebugEnabled = function () { - return this['$debug?']() -} -RubyLogger.prototype.isInfoEnabled = function () { - return this['$info?']() -} -RubyLogger.prototype.isWarnEnabled = function () { - return this['$warn?']() -} -RubyLogger.prototype.isErrorEnabled = function () { - return this['$error?']() -} -RubyLogger.prototype.isFatalEnabled = function () { - return this['$fatal?']() -} - -/** - * @namespace - */ -var NullLogger = Opal.const_get_qualified(Opal.Asciidoctor, 'NullLogger', true) - -// Alias -Opal.Asciidoctor.NullLogger = NullLogger - -/** - * Create a new NullLogger. - * @returns {NullLogger} - a NullLogger - * @memberof NullLogger - */ -NullLogger.create = function () { - return this.$new() -} - -/** - * @returns {number|undefined} - the maximum severity - * @memberof NullLogger - */ -NullLogger.prototype.getMaxSeverity = function () { - return this.max_severity -} - -// Alias -Opal.Asciidoctor.StopIteration = Opal.StopIteration - -/** - * @namespace - */ -var Timings = Opal.const_get_qualified(Opal.Asciidoctor, 'Timings', true) - -// Alias -Opal.Asciidoctor.Timings = Timings - -/** - * Create a new Timings. - * @returns {Timings} - a Timings - * @memberof Timings - */ -Timings.create = function () { - return this.$new() -} - -/** - * Print a report to the specified output. - * The report will include: - * - the time to read and parse source - * - the time to convert document - * - the total time (read, parse and convert) - * @param {RubyLogger|console|Object} [to] - an optional output (by default stdout) - * @param {string} [subject] - an optional subject (usually the file name) - * @memberof Timings - */ -Timings.prototype.printReport = function (to, subject) { - var outputFunction - if (to) { - if (typeof to.$add === 'function') { - outputFunction = function (message) { - to.$add(1, message) - } - } else if (typeof to.log === 'function') { - outputFunction = to.log - } else if (typeof to.write === 'function') { - outputFunction = function (message) { - to.write(message, 'utf-8') - } - } else { - throw new Error('The output should be a Stream (with a write function), an object with a log function or a Ruby Logger (with a add function)') - } - } else { - outputFunction = function (message) { - Opal.gvars.stdout.$write(message) - } - } - if (subject) { - outputFunction('Input file: ' + subject) - } - outputFunction(' Time to read and parse source: ' + this.$read_parse().toFixed(2)) - outputFunction(' Time to convert document: ' + this.$convert().toFixed(2)) - outputFunction(' Total time (read, parse and convert): ' + this.$read_parse_convert().toFixed(2)) -} - -/** - * @namespace - * @description - * This API is experimental and subject to change. - * - * A pluggable adapter for integrating a syntax (aka code) highlighter into AsciiDoc processing. - * - * There are two types of syntax highlighter adapters. The first performs syntax highlighting during the convert phase. - * This adapter type must define a "handlesHighlighting" method that returns true. - * The companion "highlight" method will then be called to handle the "specialcharacters" substitution for source blocks. - * - * The second assumes syntax highlighting is performed on the client (e.g., when the HTML document is loaded). - * This adapter type must define a "hasDocinfo" method that returns true. - * The companion "docinfo" method will then be called to insert markup into the output document. - * The docinfo functionality is available to both adapter types. - * - * Asciidoctor.js provides several a built-in adapter for highlight.js. - * Additional adapters can be registered using SyntaxHighlighter.register. - */ -var SyntaxHighlighter = Opal.const_get_qualified(Opal.Asciidoctor, 'SyntaxHighlighter', true) - -// Alias -Opal.Asciidoctor.SyntaxHighlighter = SyntaxHighlighter - -/** - * Associates the syntax highlighter class or object with the specified names. - * - * @description This API is experimental and subject to change. - * - * @param {string|Array} names - A {string} name or an {Array} of {string} names - * @param functions - A list of functions representing a {SyntaxHighlighter} or a {SyntaxHighlighter} class to instantiate - * @memberof SyntaxHighlighter - */ -SyntaxHighlighter.register = function (names, functions) { - var name = typeof names === 'string' ? names : names[0] - if (typeof functions === 'function') { - var classObject = functions - var prototype = classObject.prototype - var properties = Object.getOwnPropertyNames(prototype) - functions = {} - for (var propertyIdx in properties) { - var propertyName = properties[propertyIdx] - functions[propertyName] = prototype[propertyName] - } - } - var scope = initializeClass(SyntaxHighlighterBase, name, functions, {}, { - format: function (args) { - if (args.length >= 2 && typeof args[2] === 'object' && '$$smap' in args[2]) { - args[2] = fromHash(args[2]) - } - if (args.length >= 1) { - args[1] = args[1] === Opal.nil ? undefined : args[1] - } - return args - }, - highlight: function (args) { - if (args.length >= 3 && typeof args[3] === 'object' && '$$smap' in args[3]) { - var opts = args[3] - opts = fromHash(opts) - for (var key in opts) { - var value = opts[key] - if (key === 'callouts') { - var callouts = fromHashKeys(value) - for (var idx in callouts) { - var callout = callouts[idx] - for (var i = 0; i < callout.length; i++) { - var items = callout[i] - for (var j = 0; j < items.length; j++) { - items[j] = items[j] === Opal.nil ? undefined : items[j] - } - } - } - opts[key] = callouts - } else { - opts[key] = value === Opal.nil ? undefined : value - } - } - args[3] = opts - } - if (args.length >= 2) { - args[2] = args[2] === Opal.nil ? undefined : args[2] - } - return args - } - }) - for (var functionName in functions) { - if (Object.prototype.hasOwnProperty.call(functions, functionName)) { - (function (functionName) { - var userFunction = functions[functionName] - if (functionName === 'handlesHighlighting') { - Opal.def(scope, '$highlight?', function () { - return userFunction.call() - }) - } else if (functionName === 'hasDocinfo') { - Opal.def(scope, '$docinfo?', function (location) { - return userFunction.apply(this, [location]) - }) - } - }(functionName)) - } - } - Opal.def(scope, '$name', function () { - return name - }) - SyntaxHighlighter.$register(scope, names) - return scope -} - -/** - * Retrieves the syntax highlighter class or object registered for the specified name. - * - * @description This API is experimental and subject to change. - * - * @param {string} name - The {string} name of the syntax highlighter to retrieve. - * @returns {SyntaxHighlighter} - the {SyntaxHighlighter} registered for this name. - * @memberof SyntaxHighlighter - */ -SyntaxHighlighter.get = function (name) { - var result = SyntaxHighlighter.$for(name) - return result === Opal.nil ? undefined : result -} - -/** - * @deprecated Please use {SyntaxHighlighter#get} method as "for" is a reserved keyword. - */ -SyntaxHighlighter.for = SyntaxHighlighter.get - -/** - * @namespace - */ -var SyntaxHighlighterBase = Opal.const_get_qualified(SyntaxHighlighter, 'Base', true) - -// Alias -Opal.Asciidoctor.SyntaxHighlighterBase = SyntaxHighlighterBase - -/** - * Statically register the current class in the registry for the specified names. - * - * @description This API is experimental and subject to change. - * - * @param {string|Array<string>} names - A {string} name or an {Array} of {string} names - * @memberof SyntaxHighlighterBase - */ -SyntaxHighlighterBase.prototype.registerFor = function (names) { - SyntaxHighlighter.$register(this, names) -} - -// Table API - -/** - * Methods for managing AsciiDoc tables. - * @namespace - * @extends AbstractBlock - */ -var Table = Opal.Asciidoctor.Table - -/** - * Create a new Table element. - * @param {AbstractBlock} parent - * @param {Object|undefined} attributes - * @returns {Table} - a new {Table} object - */ -Table.create = function (parent, attributes) { - return this.$new(parent, toHash(attributes)) -} - -/** - * Get the caption of the table. - * @returns {string} - * @memberof Table - */ -Table.prototype.getCaption = function () { - return this.caption -} - -/** - * Get the rows of this table. - * @returns {Table.Rows} - an {Table.Rows} object with the members "head", "body" and "foot" - * @memberof Table - */ -Table.prototype.getRows = function () { - return this.rows -} - -/** - * Get the columns of this table. - * @returns {Array<Column>} - * @memberof Table - */ -Table.prototype.getColumns = function () { - return this.columns -} - -/** - * Get the head rows of this table. - * @returns {Array<Array<Cell>>} - an Array of Array of Cell - * @memberof Table - */ -Table.prototype.getHeadRows = function () { - return this.rows.head -} - -/** - * Check if the table has a head rows. - * @returns {boolean} - * @memberof Table - */ -Table.prototype.hasHeadRows = function () { - return this.rows !== Opal.nil && this.rows.head.length > 0 -} - -/** - * Get the body rows of this table. - * @returns {Array<Array<Cell>>} - an Array of Array of Cell - * @memberof Table - */ -Table.prototype.getBodyRows = function () { - return this.rows.body -} - -/** - * Check if the table has a body rows. - * @returns {boolean} - */ -Table.prototype.hasBodyRows = function () { - return this.rows !== Opal.nil && this.rows.body.length > 0 -} - -/** - * Get the foot rows of this table. - * @returns {Array<Array<Cell>>} - an Array of Array of Cell - * @memberof Table - */ -Table.prototype.getFootRows = function () { - return this.rows.foot -} - -/** - * Check if the table has a foot rows. - * @returns {boolean} - */ -Table.prototype.hasFootRows = function () { - return this.rows !== Opal.nil && this.rows.foot.length > 0 -} - -/** - * Check if the table has a header option set. - * @returns {boolean} - * @memberof Table - */ -Table.prototype.hasHeaderOption = function () { - return this.has_header_option -} - -/** - * Check if the table has the footer option set. - * @returns {boolean} - * @memberof Table - */ -Table.prototype.hasFooterOption = function () { - var footerOption = this.getAttributes()['footer-option'] - return footerOption === '' -} - -/** - * Check if the table has the autowidth option set. - * @returns {boolean} - * @memberof Table - */ -Table.prototype.hasAutowidthOption = function () { - var autowidthOption = this.getAttributes()['autowidth-option'] - return autowidthOption === '' -} - -/** - * Get the number of rows in the table. - * Please note that the header and footer rows are also counted. - * @returns {number|undefined} - * @memberof Table - */ -Table.prototype.getRowCount = function () { - return this.getAttribute('rowcount') -} - -/** - * Set the number of rows in the table. - * Please note that the header and footer rows are also counted. - * @param {number} value - the value - * @memberof Table - */ -Table.prototype.setRowCount = function (value) { - this.setAttribute('rowcount', value) -} - -/** - * Get the number of columns in the table. - * @returns {number|undefined} - * @memberof Table - */ -Table.prototype.getColumnCount = function () { - return this.getAttribute('colcount') -} - -/** - * Set the number of columns in the table. - * @param {number} value - the value - * @memberof Table - */ -Table.prototype.setColumnCount = function (value) { - this.setAttribute('colcount', value) -} - -// Rows - -/** - * @namespace - */ -var Rows = Opal.Asciidoctor.Table.Rows - -/** - * Create a new Rows element. - * @param {array<array<Cell>>} head - * @param {array<array<Cell>>} foot - * @param {array<array<Cell>>} body - * @returns Rows - */ -Rows.create = function (head, foot, body) { - return this.$new(head, foot, body) -} - -/** - * Get head rows. - * @returns {array<array<Cell>>} - */ -Rows.prototype.getHead = function () { - return this.head -} - -/** - * Get foot rows. - * @returns {array<array<Cell>>} - */ -Rows.prototype.getFoot = function () { - return this.foot -} - -/** - * Get body rows. - * @returns {array<array<Cell>>} - */ -Rows.prototype.getBody = function () { - return this.body -} - -/** - * Retrieve the rows grouped by section as a nested Array. - * - * Creates a 2-dimensional array of two element entries. - * The first element is the section name as a string. - * The second element is the Array of rows in that section. - * The entries are in document order (head, foot, body). - * @returns {[[string, array<array<Cell>>], [string, array<array<Cell>>], [string, array<array<Cell>>]]} - */ -Rows.prototype.bySection = function () { - return [['head', this.head], ['body', this.body], ['foot', this.foot]] -} - -// Table Column - -/** - * Methods to manage the columns of an AsciiDoc table. - * In particular, it keeps track of the column specs. - * @namespace - * @extends AbstractNode - */ -var Column = Opal.Asciidoctor.Table.Column - -/** - * Create a new Column element. - * @param {Table} table - * @param {number} index - * @param {Object|undefined} attributes - * @returns Column - */ -Column.create = function (table, index, attributes) { - return this.$new(table, index, toHash(attributes)) -} - -/** - * Get the column number of this cell. - * @returns {number|undefined} - * @memberof Column - */ -Column.prototype.getColumnNumber = function () { - return this.getAttribute('colnumber') -} - -/** - * Get the width of this cell. - * @returns {string|undefined} - * @memberof Column - */ -Column.prototype.getWidth = function () { - return this.getAttribute('width') -} - -/** - * Get the horizontal align of this cell. - * @returns {string|undefined} - * @memberof Column - */ -Column.prototype.getHorizontalAlign = function () { - return this.getAttribute('halign') -} - -/** - * Get the vertical align of this cell. - * @returns {string|undefined} - * @memberof Column - */ -Column.prototype.getVerticalAlign = function () { - return this.getAttribute('valign') -} - -/** - * Get the style of this cell. - * @returns {string} - * @memberof Column - */ -Column.prototype.getStyle = function () { - var style = this.style - return style === Opal.nil ? undefined : style -} - -// Table Cell - -/** - * Methods for managing the cells in an AsciiDoc table. - * @namespace - * @extends AbstractBlock - */ -var Cell = Opal.Asciidoctor.Table.Cell - -/** - * Create a new Cell element - * @param {Column} column - * @param {string} cellText - * @param {Object|undefined} attributes - * @param {Object|undefined} opts - * @returns {Cell} - */ -Cell.create = function (column, cellText, attributes, opts) { - return this.$new(column, cellText, toHash(attributes), toHash(opts)) -} - -/** - * Get the column span of this {@link Cell} node. - * @returns {number} - An Integer of the number of columns this cell will span (default: undefined) - * @memberof Cell - */ -Cell.prototype.getColumnSpan = function () { - var colspan = this.colspan - return colspan === Opal.nil ? undefined : colspan -} - -/** - * Set the column span of this {@link Cell} node. - * @param {number} value - * @returns {number} - The new colspan value - * @memberof Cell - */ -Cell.prototype.setColumnSpan = function (value) { - return this['$colspan='](value) -} - -/** - * Get the row span of this {@link Cell} node - * @returns {number|undefined} - An Integer of the number of rows this cell will span (default: undefined) - * @memberof Cell - */ -Cell.prototype.getRowSpan = function () { - var rowspan = this.rowspan - return rowspan === Opal.nil ? undefined : rowspan -} - -/** - * Set the row span of this {@link Cell} node - * @param {number} value - * @returns {number} - The new rowspan value - * @memberof Cell - */ -Cell.prototype.setRowSpan = function (value) { - return this['$rowspan='](value) -} - -/** - * Get the content of the cell. - * This method should not be used for cells in the head row or that have the literal style. - * @returns {string} - * @memberof Cell - */ -Cell.prototype.getContent = function () { - return this.$content() -} - -/** - * Get the text of the cell. - * @returns {string} - * @memberof Cell - */ -Cell.prototype.getText = function () { - return this.$text() -} - -/** - * Get the source of the cell. - * @returns {string} - * @memberof Cell - */ -Cell.prototype.getSource = function () { - return this.$source() -} - -/** - * Get the lines of the cell. - * @returns {Array<string>} - * @memberof Cell - */ -Cell.prototype.getLines = function () { - return this.$lines() -} - -/** - * Get the line number of the cell. - * @returns {number|undefined} - * @memberof Cell - */ -Cell.prototype.getLineNumber = function () { - var lineno = this.$lineno() - return lineno === Opal.nil ? undefined : lineno -} - -/** - * Get the source file of the cell. - * @returns {string|undefined} - * @memberof Cell - */ -Cell.prototype.getFile = function () { - var file = this.$file() - return file === Opal.nil ? undefined : file -} - -/** - * Get the style of the cell. - * @returns {string|undefined} - * @memberof Cell - */ -Cell.prototype.getStyle = function () { - var style = this.$style() - return style === Opal.nil ? undefined : style -} - -/** - * Get the column of this cell. - * @returns {Column|undefined} - * @memberof Cell - */ -Cell.prototype.getColumn = function () { - var column = this.$column() - return column === Opal.nil ? undefined : column -} - -/** - * Get the width of this cell. - * @returns {string|undefined} - * @memberof Cell - */ -Cell.prototype.getWidth = function () { - return this.getAttribute('width') -} - -/** - * Get the column width in percentage of this cell. - * @returns {string|undefined} - * @memberof Cell - */ -Cell.prototype.getColumnPercentageWidth = function () { - return this.getAttribute('colpcwidth') -} - -/** - * Get the nested {Document} of this cell when style is 'asciidoc'. - * @returns {Document|undefined} - the nested {Document} - * @memberof Cell - */ -Cell.prototype.getInnerDocument = function () { - var innerDocument = this.inner_document - return innerDocument === Opal.nil ? undefined : innerDocument -} - -// Templates - -/** - * @description - * This API is experimental and subject to change. - * - * Please note that this API is currently only available in a Node environment. - * We recommend to use a custom converter if you are running in the browser. - * - * @namespace - * @module Converter/TemplateConverter - */ -var TemplateConverter = Opal.Asciidoctor.Converter.TemplateConverter - -if (TemplateConverter) { - // Alias - Opal.Asciidoctor.TemplateConverter = TemplateConverter - - /** - * Create a new TemplateConverter. - * @param {string} backend - the backend name - * @param templateDirectories - a list of template directories - * @param {Object} opts - a JSON of options - * @param {string} opts.template_engine - the name of the template engine - * @param {Object} [opts.template_cache] - an optional template cache - * @param {Object} [opts.template_cache.scans] - a JSON of template objects keyed by template name keyed by path patterns - * @param {Object} [opts.template_cache.templates] - a JSON of template objects keyed by file paths - * @returns {TemplateConverter} - * @memberof Converter/TemplateConverter - */ - TemplateConverter.create = function (backend, templateDirectories, opts) { - if (opts && opts.template_cache) { - opts.template_cache = toHash(opts.template_cache) - } - this.$new(backend, templateDirectories, toHash(opts)) - } - - /** - * @returns {Object} - The global cache - * @memberof Converter/TemplateConverter - */ - TemplateConverter.getCache = function () { - var caches = fromHash(this.caches) - if (caches) { - if (caches.scans) { - caches.scans = fromHash(caches.scans) - for (var key in caches.scans) { - caches.scans[key] = fromHash(caches.scans[key]) - } - } - if (caches.templates) { - caches.templates = fromHash(caches.templates) - } - } - return caches - } - - /** - * Clear the global cache. - * @memberof Converter/TemplateConverter - */ - TemplateConverter.clearCache = function () { - this.$clear_caches() - } - - /** - * Convert an {AbstractNode} to the backend format using the named template. - * - * Looks for a template that matches the value of the template name or, - * if the template name is not specified, the value of the {@see AbstractNode.getNodeName} function. - * - * @param {AbstractNode} node - the AbstractNode to convert - * @param {string} templateName - the {string} name of the template to use, or the node name of the node if a template name is not specified. (optional, default: undefined) - * @param {Object} opts - an optional JSON that is passed as local variables to the template. (optional, default: undefined) - * @returns {string} - The {string} result from rendering the template - * @memberof Converter/TemplateConverter - */ - TemplateConverter.prototype.convert = function (node, templateName, opts) { - return this.$convert(node, templateName, toHash(opts)) - } - - /** - * Checks whether there is a template registered with the specified name. - * - * @param {string} name - the {string} template name - * @returns {boolean} - a {boolean} that indicates whether a template is registered for the specified template name. - * @memberof Converter/TemplateConverter - */ - TemplateConverter.prototype.handles = function (name) { - return this['$handles?'](name) - } - - /** - * Retrieves the templates that this converter manages. - * - * @returns {Object} - a JSON of template objects keyed by template name - * @memberof Converter/TemplateConverter - */ - TemplateConverter.prototype.getTemplates = function () { - return fromHash(this.$templates()) - } - - /** - * Registers a template with this converter. - * - * @param {string} name - the {string} template name - * @param {Object} template - the template object to register - * @returns {Object} - the template object - * @memberof Converter/TemplateConverter - */ - TemplateConverter.prototype.register = function (name, template) { - return this.$register(name, template) - } - - /** - * @namespace - * @description - * This API is experimental and subject to change. - * - * Please note that this API is currently only available in a Node environment. - * We recommend to use a custom converter if you are running in the browser. - * - * A pluggable adapter for integrating a template engine into the built-in template converter. - */ - var TemplateEngine = {} - TemplateEngine.registry = {} - - // Alias - Opal.Asciidoctor.TemplateEngine = TemplateEngine - - /** - * Register a template engine adapter for the given names. - * @param {string|Array} names - a {string} name or an {Array} of {string} names - * @param {Object} templateEngineAdapter - a template engine adapter instance - * @example - * const fs = require('fs') - * class DotTemplateEngineAdapter { - * constructor () { - * this.doT = require('dot') - * } - * compile (file, _) { - * const templateFn = this.doT.template(fs.readFileSync(file, 'utf8')) - * return { - * render: templateFn - * } - * } - * } - * asciidoctor.TemplateEngine.register('dot, new DotTemplateEngineAdapter()) - * @memberof TemplateEngine - */ - TemplateEngine.register = function (names, templateEngineAdapter) { - if (typeof names === 'string') { - this.registry[names] = templateEngineAdapter - } else { - // array - for (var i = 0; i < names.length; i++) { - var name = names[i] - this.registry[name] = templateEngineAdapter - } - } - } -} - -/* global Opal, fromHash, toHash, initializeClass */ -// Extensions API - -/** - * @private - */ -var toBlock = function (block) { - // arity is a mandatory field - block.$$arity = block.length - return block -} - -var registerExtension = function (registry, type, processor, name) { - if (typeof processor === 'object' || processor.$$is_class) { - // processor is an instance or a class - return registry['$' + type](processor, name) - } else { - // processor is a function/lambda - return Opal.send(registry, type, name && [name], toBlock(processor)) - } -} - -/** - * @namespace - * @description - * Extensions provide a way to participate in the parsing and converting - * phases of the AsciiDoc processor or extend the AsciiDoc syntax. - * - * The various extensions participate in AsciiDoc processing as follows: - * - * 1. After the source lines are normalized, {{@link Extensions/Preprocessor}}s modify or replace - * the source lines before parsing begins. {{@link Extensions/IncludeProcessor}}s are used to - * process include directives for targets which they claim to handle. - * 2. The Parser parses the block-level content into an abstract syntax tree. - * Custom blocks and block macros are processed by associated {{@link Extensions/BlockProcessor}}s - * and {{@link Extensions/BlockMacroProcessor}}s, respectively. - * 3. {{@link Extensions/TreeProcessor}}s are run on the abstract syntax tree. - * 4. Conversion of the document begins, at which point inline markup is processed - * and converted. Custom inline macros are processed by associated {InlineMacroProcessor}s. - * 5. {{@link Extensions/Postprocessor}}s modify or replace the converted document. - * 6. The output is written to the output stream. - * - * Extensions may be registered globally using the {Extensions.register} method - * or added to a custom {Registry} instance and passed as an option to a single - * Asciidoctor processor. - * - * @example - * asciidoctor.Extensions.register(function () { - * this.block(function () { - * var self = this; - * self.named('shout'); - * self.onContext('paragraph'); - * self.process(function (parent, reader) { - * var lines = reader.getLines().map(function (l) { return l.toUpperCase(); }); - * return self.createBlock(parent, 'paragraph', lines); - * }); - * }); - * }); - */ -var Extensions = Opal.const_get_qualified(Opal.Asciidoctor, 'Extensions') - -// Alias -Opal.Asciidoctor.Extensions = Extensions - -/** - * Create a new {@link Extensions/Registry}. - * @param {string} name - * @param {function} block - * @memberof Extensions - * @returns {Extensions/Registry} - returns a {@link Extensions/Registry} - */ -Extensions.create = function (name, block) { - if (typeof name === 'function' && typeof block === 'undefined') { - return Opal.send(this, 'create', null, toBlock(name)) - } else if (typeof block === 'function') { - return Opal.send(this, 'create', [name], toBlock(block)) - } else { - return this.$create() - } -} - -/** - * @memberof Extensions - */ -Extensions.register = function (name, block) { - if (typeof name === 'function' && typeof block === 'undefined') { - return Opal.send(this, 'register', null, toBlock(name)) - } else { - return Opal.send(this, 'register', [name], toBlock(block)) - } -} - -/** - * Get statically-registered extension groups. - * @memberof Extensions - */ -Extensions.getGroups = function () { - return fromHash(this.$groups()) -} - -/** - * Unregister all statically-registered extension groups. - * @memberof Extensions - */ -Extensions.unregisterAll = function () { - this.$unregister_all() -} - -/** - * Unregister the specified statically-registered extension groups. - * - * NOTE Opal cannot delete an entry from a Hash that is indexed by symbol, so - * we have to resort to using low-level operations in this method. - * - * @memberof Extensions - */ -Extensions.unregister = function () { - var names = Array.prototype.concat.apply([], arguments) - var groups = this.$groups() - var groupNameIdx = {} - for (var i = 0, groupSymbolNames = groups.$$keys; i < groupSymbolNames.length; i++) { - var groupSymbolName = groupSymbolNames[i] - groupNameIdx[groupSymbolName.toString()] = groupSymbolName - } - for (var j = 0; j < names.length; j++) { - var groupStringName = names[j] - if (groupStringName in groupNameIdx) Opal.hash_delete(groups, groupNameIdx[groupStringName]) - } -} - -/** - * @namespace - * @module Extensions/Registry - */ -var Registry = Extensions.Registry - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.getGroups = Extensions.getGroups - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.unregisterAll = function () { - this.groups = Opal.hash() -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.unregister = Extensions.unregister - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.prefer = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - if (typeof processor === 'object' || processor.$$is_class) { - // processor is an instance or a class - return this.$prefer(name, processor) - } else { - // processor is a function/lambda - return Opal.send(this, 'prefer', name && [name], toBlock(processor)) - } -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.block = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'block', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.inlineMacro = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'inline_macro', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.includeProcessor = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'include_processor', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.blockMacro = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'block_macro', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.treeProcessor = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'tree_processor', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.postprocessor = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'postprocessor', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.preprocessor = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'preprocessor', processor, name) -} - -/** - * @memberof Extensions/Registry - */ -Registry.prototype.docinfoProcessor = function (name, processor) { - if (arguments.length === 1) { - processor = name - name = null - } - return registerExtension(this, 'docinfo_processor', processor, name) -} - -/** - * Checks whether any {{@link Extensions/Preprocessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/Preprocessor}} extensions are registered. - */ -Registry.prototype.hasPreprocessors = function () { - return this['$preprocessors?']() -} - -/** - * Checks whether any {{@link Extensions/TreeProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/TreeProcessor}} extensions are registered. - */ -Registry.prototype.hasTreeProcessors = function () { - return this['$tree_processors?']() -} - -/** - * Checks whether any {{@link Extensions/IncludeProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/IncludeProcessor}} extensions are registered. - */ -Registry.prototype.hasIncludeProcessors = function () { - return this['$include_processors?']() -} - -/** - * Checks whether any {{@link Extensions/Postprocessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/Postprocessor}} extensions are registered. - */ -Registry.prototype.hasPostprocessors = function () { - return this['$postprocessors?']() -} - -/** - * Checks whether any {{@link Extensions/DocinfoProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @param location - A {string} for selecting docinfo extensions at a given location (head or footer) (default: undefined) - * @returns a {boolean} indicating whether any {{@link Extensions/DocinfoProcessor}} extensions are registered. - */ -Registry.prototype.hasDocinfoProcessors = function (location) { - return this['$docinfo_processors?'](location) -} - -/** - * Checks whether any {{@link Extensions/BlockProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/BlockProcessor}} extensions are registered. - */ -Registry.prototype.hasBlocks = function () { - return this['$blocks?']() -} - -/** - * Checks whether any {{@link Extensions/BlockMacroProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/BlockMacroProcessor}} extensions are registered. - */ -Registry.prototype.hasBlockMacros = function () { - return this['$block_macros?']() -} - -/** - * Checks whether any {{@link Extensions/InlineMacroProcessor}} extensions have been registered. - * - * @memberof Extensions/Registry - * @returns a {boolean} indicating whether any {{@link Extensions/InlineMacroProcessor}} extensions are registered. - */ -Registry.prototype.hasInlineMacros = function () { - return this['$inline_macros?']() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/Preprocessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getPreprocessors = function () { - return this.$preprocessors() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/TreeProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getTreeProcessors = function () { - return this.$tree_processors() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/IncludeProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getIncludeProcessors = function () { - return this.$include_processors() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/Postprocessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getPostprocessors = function () { - return this.$postprocessors() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/DocinfoProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @param location - A {string} for selecting docinfo extensions at a given location (head or footer) (default: undefined) - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getDocinfoProcessors = function (location) { - return this.$docinfo_processors(location) -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/BlockProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getBlocks = function () { - return this.block_extensions.$values() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/BlockMacroProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getBlockMacros = function () { - return this.block_macro_extensions.$values() -} - -/** - * Retrieves the Extension proxy objects for all the {{@link Extensions/InlineMacroProcessor}} instances stored in this registry. - * - * @memberof Extensions/Registry - * @returns an {array} of Extension proxy objects. - */ -Registry.prototype.getInlineMacros = function () { - return this.$inline_macros() -} - -/** - * Get any {{@link Extensions/InlineMacroProcessor}} extensions are registered to handle the specified inline macro name. - * - * @param name - the {string} inline macro name - * @memberof Extensions/Registry - * @returns the Extension proxy object for the {{@link Extensions/InlineMacroProcessor}} that matches the inline macro name or undefined if no match is found. - */ -Registry.prototype.getInlineMacroFor = function (name) { - var result = this['$registered_for_inline_macro?'](name) - return result === false ? undefined : result -} - -/** - * Get any {{@link Extensions/BlockProcessor}} extensions are registered to handle the specified block name appearing on the specified context. - * @param name - the {string} block name - * @param context - the context of the block: paragraph, open... (optional) - * @memberof Extensions/Registry - * @returns the Extension proxy object for the {{@link Extensions/BlockProcessor}} that matches the block name and context or undefined if no match is found. - */ -Registry.prototype.getBlockFor = function (name, context) { - if (typeof context === 'undefined') { - var ext = this.$find_block_extension(name) - return ext === Opal.nil ? undefined : ext - } - var result = this['$registered_for_block?'](name, context) - return result === false ? undefined : result -} - -/** - * Get any {{@link Extensions/BlockMacroProcessor}} extensions are registered to handle the specified macro name. - * - * @param name - the {string} macro name - * @memberof Extensions/Registry - * @returns the Extension proxy object for the {{@link Extensions/BlockMacroProcessor}} that matches the macro name or undefined if no match is found. - */ -Registry.prototype.getBlockMacroFor = function (name) { - var result = this['$registered_for_block_macro?'](name) - return result === false ? undefined : result -} - -/** - * @namespace - * @module Extensions/Processor - */ -var Processor = Extensions.Processor - -/** - * The extension will be added to the beginning of the list for that extension type. (default is append). - * @memberof Extensions/Processor - * @deprecated Please use the <code>prefer</pre> function on the {@link Extensions/Registry}, - * the {@link Extensions/IncludeProcessor}, - * the {@link Extensions/TreeProcessor}, - * the {@link Extensions/Postprocessor}, - * the {@link Extensions/Preprocessor} - * or the {@link Extensions/DocinfoProcessor} - */ -Processor.prototype.prepend = function () { - this.$option('position', '>>') -} - -/** - * @memberof Extensions/Processor - */ -Processor.prototype.process = function (block) { - var handler = { - apply: function (target, thisArg, argumentsList) { - for (var i = 0; i < argumentsList.length; i++) { - // convert all (Opal) Hash arguments to JSON. - if (typeof argumentsList[i] === 'object' && '$$smap' in argumentsList[i]) { - argumentsList[i] = fromHash(argumentsList[i]) - } - } - return target.apply(thisArg, argumentsList) - } - } - var blockProxy = new Proxy(block, handler) - return Opal.send(this, 'process', null, toBlock(blockProxy)) -} - -/** - * @param {string} name - * @memberof Extensions/Processor - */ -Processor.prototype.named = function (name) { - return this.$named(name) -} - -/** - * Creates a block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string} context - * @param {string|Array<string>} source - * @param {Object|undefined} attrs - A JSON of attributes - * @param {Object|undefined} opts - A JSON of options - * @return {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createBlock = function (parent, context, source, attrs, opts) { - return this.$create_block(parent, context, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates a list block node and links it to the specified parent. - * - * @param parent - The parent Block (Block, Section, or Document) of this new list block. - * @param {string} context - The list context (e.g., ulist, olist, colist, dlist) - * @param {Object} attrs - An object of attributes to set on this list block - * @returns {List} - * @memberof Extensions/Processor - */ -Processor.prototype.createList = function (parent, context, attrs) { - return this.$create_list(parent, context, toHash(attrs)) -} - -/** - * Creates a list item node and links it to the specified parent. - * - * @param {List} parent - The parent {List} of this new list item block. - * @param {string} text - The text of the list item. - * @returns {ListItem} - * @memberof Extensions/Processor - */ -Processor.prototype.createListItem = function (parent, text) { - return this.$create_list_item(parent, text) -} - -/** - * Creates an image block node and links it to the specified parent. - * @param {Block|Section|Document} parent - The parent Block of this new image block. - * @param {Object} attrs - A JSON of attributes - * @param {string} attrs.target - the target attribute to set the source of the image. - * @param {string} attrs.alt - the alt attribute to specify an alternative text for the image. - * @param {Object} opts - A JSON of options - * @returns {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createImageBlock = function (parent, attrs, opts) { - return this.$create_image_block(parent, toHash(attrs), toHash(opts)) -} - -/** - * Creates a paragraph block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - a paragraph {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createParagraph = function (parent, source, attrs, opts) { - return this.$create_paragraph(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates an open block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - an open {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createOpenBlock = function (parent, source, attrs, opts) { - return this.$create_open_block(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates an example block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - an example {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createExampleBlock = function (parent, source, attrs, opts) { - return this.$create_example_block(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates a literal block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - a literal {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createPassBlock = function (parent, source, attrs, opts) { - return this.$create_pass_block(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates a listing block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - a listing {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createListingBlock = function (parent, source, attrs, opts) { - return this.$create_listing_block(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates a literal block and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string|Array<string>} source - The source - * @param {Object|undefined} attrs - An object of attributes to set on this block - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Block} - a literal {Block} - * @memberof Extensions/Processor - */ -Processor.prototype.createLiteralBlock = function (parent, source, attrs, opts) { - return this.$create_literal_block(parent, source, toHash(attrs), toHash(opts)) -} - -/** - * Creates an inline anchor and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string} text - The text - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Inline} - an {Inline} anchor - * @memberof Extensions/Processor - */ -Processor.prototype.createAnchor = function (parent, text, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return this.$create_anchor(parent, text, toHash(opts)) -} - -/** - * Creates an inline pass and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. - * @param {string} text - The text - * @param {Object|undefined} opts - An object of options to set on this block - * @returns {Inline} - an {Inline} pass - * @memberof Extensions/Processor - */ -Processor.prototype.createInlinePass = function (parent, text, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return this.$create_inline_pass(parent, text, toHash(opts)) -} - -/** - * Creates an inline node and links it to the specified parent. - * - * @param {Block|Section|Document} parent - The parent Block of this new inline node. - * @param {string} context - The context name - * @param {string} text - The text - * @param {Object|undefined} opts - A JSON of options - * @returns {Inline} - an {Inline} node - * @memberof Extensions/Processor - */ -Processor.prototype.createInline = function (parent, context, text, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return this.$create_inline(parent, context, text, toHash(opts)) -} - -/** - * Parses blocks in the content and attaches the block to the parent. - * @param {AbstractBlock} parent - the parent block - * @param {string|Array<string>} content - the content - * @param {Object|undefined} attrs - an object of attributes - * @returns {AbstractNode} - The parent node into which the blocks are parsed. - * @memberof Extensions/Processor - */ -Processor.prototype.parseContent = function (parent, content, attrs) { - return this.$parse_content(parent, content, attrs) -} - -/** - * Parses the attrlist String into a JSON of attributes - * @param {AbstractBlock} block - the current AbstractBlock or the parent AbstractBlock if there is no current block (used for applying subs) - * @param {string} attrlist - the list of attributes as a String - * @param {Object|undefined} opts - an optional JSON of options to control processing: - * - positional_attributes: an Array of attribute names to map positional arguments to (optional, default: []) - * - sub_attributes: enables attribute substitution on the attrlist argument (optional, default: false) - * - * @returns - a JSON of parsed attributes - * @memberof Extensions/Processor - */ -Processor.prototype.parseAttributes = function (block, attrlist, opts) { - if (opts && opts.attributes) { - opts.attributes = toHash(opts.attributes) - } - return fromHash(this.$parse_attributes(block, attrlist, toHash(opts))) -} - -/** - * @param {string|Array<string>} value - Name of a positional attribute or an Array of positional attribute names - * @memberof Extensions/Processor - */ -Processor.prototype.positionalAttributes = function (value) { - return this.$positional_attrs(value) -} - -/** - * Specify how to resolve attributes. - * - * @param {string|Array<string>|Object|boolean} [value] - A specification to resolve attributes. - * @memberof Extensions/Processor - */ -Processor.prototype.resolveAttributes = function (value) { - if (typeof value === 'object' && !Array.isArray(value)) { - return this.$resolves_attributes(toHash(value)) - } - if (arguments.length > 1) { - return this.$resolves_attributes(Array.prototype.slice.call(arguments)) - } - if (typeof value === 'undefined') { - // Convert to nil otherwise an exception is thrown at: - // https://github.com/asciidoctor/asciidoctor/blob/0bcb4addc17b307f62975aad203fb556a1bcd8a5/lib/asciidoctor/extensions.rb#L583 - // - // if args.size == 1 && !args[0] - // - // In the above Ruby code, args[0] is undefined and Opal will try to call the function "!" on an undefined object. - return this.$resolves_attributes(Opal.nil) - } - return this.$resolves_attributes(value) -} - -/** - * @deprecated Please use the <code>resolveAttributes</pre> function on the {@link Extensions/Processor}. - * @memberof Extensions/Processor - * @see {Processor#resolveAttributes} - */ -Processor.prototype.resolvesAttributes = Processor.prototype.resolveAttributes - -/** - * Get the configuration JSON for this processor instance. - * @memberof Extensions/Processor - */ -Processor.prototype.getConfig = function () { - return fromHash(this.config) -} - -/** - * @memberof Extensions/Processor - */ -Processor.prototype.option = function (key, value) { - this.$option(key, value) -} - -/** - * @namespace - * @module Extensions/BlockProcessor - */ -var BlockProcessor = Extensions.BlockProcessor - -/** - * @param {Object} value - a JSON of default values for attributes - * @memberof Extensions/BlockProcessor - */ -BlockProcessor.prototype.defaultAttributes = function (value) { - this.$default_attributes(toHash(value)) -} - -/** - * @param {string} context - A context name - * @memberof Extensions/BlockProcessor - */ -BlockProcessor.prototype.onContext = function (context) { - return this.$on_context(context) -} - -/** - * @param {...string} contexts - A list of context names - * @memberof Extensions/BlockProcessor - */ -BlockProcessor.prototype.onContexts = function (contexts) { - return this.$on_contexts(Array.prototype.slice.call(arguments)) -} - -/** - * @returns {string} - * @memberof Extensions/BlockProcessor - */ -BlockProcessor.prototype.getName = function () { - var name = this.name - return name === Opal.nil ? undefined : name -} - -/** - * @param {string} value - * @memberof Extensions/BlockProcessor - */ -BlockProcessor.prototype.parseContentAs = function (value) { - this.$parse_content_as(value) -} - -/** - * @namespace - * @module Extensions/BlockMacroProcessor - */ -var BlockMacroProcessor = Extensions.BlockMacroProcessor - -/** - * @param {Object} value - a JSON of default values for attributes - * @memberof Extensions/BlockMacroProcessor - */ -BlockMacroProcessor.prototype.defaultAttributes = function (value) { - this.$default_attributes(toHash(value)) -} - -/** - * @returns {string} - the block macro name - * @memberof Extensions/BlockMacroProcessor - */ -BlockMacroProcessor.prototype.getName = function () { - var name = this.name - return name === Opal.nil ? undefined : name -} - -/** - * @param {string} value - * @memberof Extensions/BlockMacroProcessor - */ -BlockMacroProcessor.prototype.parseContentAs = function (value) { - this.$parse_content_as(value) -} - -/** - * @namespace - * @module Extensions/InlineMacroProcessor - */ -var InlineMacroProcessor = Extensions.InlineMacroProcessor - -/** - * @param {Object} value - a JSON of default values for attributes - * @memberof Extensions/InlineMacroProcessor - */ -InlineMacroProcessor.prototype.defaultAttributes = function (value) { - this.$default_attributes(toHash(value)) -} - -/** - * @returns {string} - the inline macro name - * @memberof Extensions/InlineMacroProcessor - */ -InlineMacroProcessor.prototype.getName = function () { - var name = this.name - return name === Opal.nil ? undefined : name -} - -/** - * @param {string} value - * @memberof Extensions/InlineMacroProcessor - */ -InlineMacroProcessor.prototype.parseContentAs = function (value) { - this.$parse_content_as(value) -} - -/** - * @param {string} value - * @memberof Extensions/InlineMacroProcessor - */ -InlineMacroProcessor.prototype.matchFormat = function (value) { - this.$match_format(value) -} - -/** - * @param {RegExp} value - * @memberof Extensions/InlineMacroProcessor - */ -InlineMacroProcessor.prototype.match = function (value) { - this.$match(value) -} - -/** - * @namespace - * @module Extensions/IncludeProcessor - */ -var IncludeProcessor = Extensions.IncludeProcessor - -/** - * @memberof Extensions/IncludeProcessor - */ -IncludeProcessor.prototype.handles = function (block) { - return Opal.send(this, 'handles?', null, toBlock(block)) -} - -/** - * @memberof Extensions/IncludeProcessor - */ -IncludeProcessor.prototype.prefer = function () { - this.$prefer() -} - -/** - * @namespace - * @module Extensions/TreeProcessor - */ -var TreeProcessor = Extensions.TreeProcessor - -/** - * @memberof Extensions/TreeProcessor - */ -TreeProcessor.prototype.prefer = function () { - this.$prefer() -} - -/** - * @namespace - * @module Extensions/Postprocessor - */ -var Postprocessor = Extensions.Postprocessor - -/** - * @memberof Extensions/Postprocessor - */ -Postprocessor.prototype.prefer = function () { - this.$prefer() -} - -/** - * @namespace - * @module Extensions/Preprocessor - */ -var Preprocessor = Extensions.Preprocessor - -/** - * @memberof Extensions/Preprocessor - */ -Preprocessor.prototype.prefer = function () { - this.$prefer() -} - -/** - * @namespace - * @module Extensions/DocinfoProcessor - */ -var DocinfoProcessor = Extensions.DocinfoProcessor - -/** - * @memberof Extensions/DocinfoProcessor - */ -DocinfoProcessor.prototype.prefer = function () { - this.$prefer() -} - -/** - * @param {string} value - The docinfo location ("head", "header" or "footer") - * @memberof Extensions/DocinfoProcessor - */ -DocinfoProcessor.prototype.atLocation = function (value) { - this.$at_location(value) -} - -function initializeProcessorClass (superclassName, className, functions) { - var superClass = Opal.const_get_qualified(Extensions, superclassName) - return initializeClass(superClass, className, functions, { - 'handles?': function () { - return true - } - }) -} - -// Postprocessor - -/** - * Create a postprocessor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createPostprocessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('Postprocessor', name, functions) -} - -/** - * Create and instantiate a postprocessor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newPostprocessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createPostprocessor(name, functions).$new() -} - -// Preprocessor - -/** - * Create a preprocessor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createPreprocessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('Preprocessor', name, functions) -} - -/** - * Create and instantiate a preprocessor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newPreprocessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createPreprocessor(name, functions).$new() -} - -// Tree Processor - -/** - * Create a tree processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createTreeProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('TreeProcessor', name, functions) -} - -/** - * Create and instantiate a tree processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newTreeProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createTreeProcessor(name, functions).$new() -} - -// Include Processor - -/** - * Create an include processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createIncludeProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('IncludeProcessor', name, functions) -} - -/** - * Create and instantiate an include processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newIncludeProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createIncludeProcessor(name, functions).$new() -} - -// Docinfo Processor - -/** - * Create a Docinfo processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createDocinfoProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('DocinfoProcessor', name, functions) -} - -/** - * Create and instantiate a Docinfo processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newDocinfoProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createDocinfoProcessor(name, functions).$new() -} - -// Block Processor - -/** - * Create a block processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createBlockProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('BlockProcessor', name, functions) -} - -/** - * Create and instantiate a block processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newBlockProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createBlockProcessor(name, functions).$new() -} - -// Inline Macro Processor - -/** - * Create an inline macro processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createInlineMacroProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('InlineMacroProcessor', name, functions) -} - -/** - * Create and instantiate an inline macro processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newInlineMacroProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createInlineMacroProcessor(name, functions).$new() -} - -// Block Macro Processor - -/** - * Create a block macro processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.createBlockMacroProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return initializeProcessorClass('BlockMacroProcessor', name, functions) -} - -/** - * Create and instantiate a block macro processor - * @description this API is experimental and subject to change - * @memberof Extensions - */ -Extensions.newBlockMacroProcessor = function (name, functions) { - if (arguments.length === 1) { - functions = name - name = null - } - return this.createBlockMacroProcessor(name, functions).$new() -} - -// Converter API - -/** - * @namespace - * @module Converter - */ -var Converter = Opal.const_get_qualified(Opal.Asciidoctor, 'Converter') - -// Alias -Opal.Asciidoctor.Converter = Converter - -/** - * Convert the specified node. - * - * @param {AbstractNode} node - the AbstractNode to convert - * @param {string} transform - an optional String transform that hints at - * which transformation should be applied to this node. - * @param {Object} opts - a JSON of options that provide additional hints about how to convert the node (default: {}) - * @returns the {Object} result of the conversion, typically a {string}. - * @memberof Converter - */ -Converter.prototype.convert = function (node, transform, opts) { - return this.$convert(node, transform, toHash(opts)) -} - -/** - * Create an instance of the converter bound to the specified backend. - * - * @param {string} backend - look for a converter bound to this keyword. - * @param {Object} opts - a JSON of options to pass to the converter (default: {}) - * @returns {Converter} - a converter instance for converting nodes in an Asciidoctor AST. - * @memberof Converter - */ -Converter.create = function (backend, opts) { - return this.$create(backend, toHash(opts)) -} - -// Converter Factory API - -/** - * @namespace - * @module Converter/Factory - */ -var ConverterFactory = Opal.Asciidoctor.Converter.Factory - -var ConverterBase = Opal.Asciidoctor.Converter.Base - -// Alias -Opal.Asciidoctor.ConverterFactory = ConverterFactory - -var ConverterBackendTraits = Opal.Asciidoctor.Converter.BackendTraits - -// Alias -Opal.Asciidoctor.ConverterBackendTraits = ConverterBackendTraits - -/** - * Register a custom converter in the global converter factory to handle conversion to the specified backends. - * If the backend value is an asterisk, the converter is used to handle any backend that does not have an explicit converter. - * - * @param converter - The Converter instance to register - * @param backends {Array} - A {string} {Array} of backend names that this converter should be registered to handle (optional, default: ['*']) - * @return {*} - Returns nothing - * @memberof Converter/Factory - */ -ConverterFactory.register = function (converter, backends) { - var object - var buildBackendTraitsFromObject = function (obj) { - return Object.assign({}, - obj.basebackend ? { basebackend: obj.basebackend } : {}, - obj.outfilesuffix ? { outfilesuffix: obj.outfilesuffix } : {}, - obj.filetype ? { filetype: obj.filetype } : {}, - obj.htmlsyntax ? { htmlsyntax: obj.htmlsyntax } : {}, - obj.supports_templates ? { supports_templates: obj.supports_templates } : {} - ) - } - var assignBackendTraitsToInstance = function (obj, instance) { - if (obj.backend_traits) { - instance.backend_traits = toHash(obj.backend_traits) - } else if (obj.backendTraits) { - instance.backend_traits = toHash(obj.backendTraits) - } else if (obj.basebackend || obj.outfilesuffix || obj.filetype || obj.htmlsyntax || obj.supports_templates) { - instance.backend_traits = toHash(buildBackendTraitsFromObject(obj)) - } - } - var bridgeHandlesMethodToInstance = function (obj, instance) { - bridgeMethodToInstance(obj, instance, '$handles?', 'handles', function () { - return true - }) - } - var bridgeComposedMethodToInstance = function (obj, instance) { - bridgeMethodToInstance(obj, instance, '$composed', 'composed') - } - var bridgeMethodToInstance = function (obj, instance, methodName, functionName, defaultImplementation) { - if (typeof obj[methodName] === 'undefined') { - if (typeof obj[functionName] === 'function') { - instance[methodName] = obj[functionName] - } else if (defaultImplementation) { - instance[methodName] = defaultImplementation - } - } - } - var addRespondToMethod = function (instance) { - if (typeof instance['$respond_to?'] !== 'function') { - instance['$respond_to?'] = function (name) { - return typeof this[name] === 'function' - } - } - } - if (typeof converter === 'function') { - // Class - object = initializeClass(ConverterBase, converter.constructor.name, { - initialize: function (backend, opts) { - var self = this - var result = new converter(backend, opts) // eslint-disable-line - Object.assign(this, result) - assignBackendTraitsToInstance(result, self) - var propertyNames = Object.getOwnPropertyNames(converter.prototype) - for (var i = 0; i < propertyNames.length; i++) { - var propertyName = propertyNames[i] - if (propertyName !== 'constructor') { - self[propertyName] = result[propertyName] - } - } - if (typeof result.$convert === 'undefined' && typeof result.convert === 'function') { - self.$convert = result.convert - } - bridgeHandlesMethodToInstance(result, self) - bridgeComposedMethodToInstance(result, self) - addRespondToMethod(self) - self.super(backend, opts) - } - }) - object.$extend(ConverterBackendTraits) - } else if (typeof converter === 'object') { - // Instance - if (typeof converter.$convert === 'undefined' && typeof converter.convert === 'function') { - converter.$convert = converter.convert - } - assignBackendTraitsToInstance(converter, converter) - if (converter.backend_traits) { - // "extends" ConverterBackendTraits - var converterBackendTraitsFunctionNames = [ - 'basebackend', - 'filetype', - 'htmlsyntax', - 'outfilesuffix', - 'supports_templates', - 'supports_templates?', - 'init_backend_traits', - 'backend_traits' - ] - for (var functionName of converterBackendTraitsFunctionNames) { - converter['$' + functionName] = ConverterBackendTraits.prototype['$' + functionName] - } - converter.$$meta = ConverterBackendTraits - } - bridgeHandlesMethodToInstance(converter, converter) - bridgeComposedMethodToInstance(converter, converter) - addRespondToMethod(converter) - object = converter - } - var args = [object].concat(backends) - return Converter.$register.apply(Converter, args) -} - -/** - * Retrieves the singleton instance of the converter factory. - * - * @param {boolean} initialize - instantiate the singleton if it has not yet - * been instantiated. If this value is false and the singleton has not yet been - * instantiated, this method returns a fresh instance. - * @returns {Converter/Factory} an instance of the converter factory. - * @memberof Converter/Factory - */ -ConverterFactory.getDefault = function (initialize) { - return this.$default(initialize) -} - -/** - * Create an instance of the converter bound to the specified backend. - * - * @param {string} backend - look for a converter bound to this keyword. - * @param {Object} opts - a JSON of options to pass to the converter (default: {}) - * @returns {Converter} - a converter instance for converting nodes in an Asciidoctor AST. - * @memberof Converter/Factory - */ -ConverterFactory.prototype.create = function (backend, opts) { - return this.$create(backend, toHash(opts)) -} - -/** - * Get the converter registry. - * @returns the registry of converter instances or classes keyed by backend name - * @memberof Converter/Factory - */ -ConverterFactory.getRegistry = function () { - return fromHash(Converter.$registry()) -} - -/** - * Lookup the custom converter registered with this factory to handle the specified backend. - * - * @param {string} backend - The {string} backend name. - * @returns the {Converter} class or instance registered to convert the specified backend or undefined if no match is found. - * @memberof Converter/Factory - */ -ConverterFactory.for = function (backend) { - const converter = Converter.$for(backend) - return converter === Opal.nil ? undefined : converter -} - -/* - * Unregister any custom converter classes that are registered with this factory. - * Intended for testing only! - */ -ConverterFactory.unregisterAll = function () { - var internalRegistry = Converter.DefaultFactory.$$cvars['@@registry'] - Converter.DefaultFactory.$$cvars['@@registry'] = toHash({ html5: internalRegistry['$[]']('html5') }) -} - -// Built-in converter - -/** - * @namespace - * @module Converter/Html5Converter - */ -var Html5Converter = Opal.Asciidoctor.Converter.Html5Converter - -// Alias -Opal.Asciidoctor.Html5Converter = Html5Converter - -/** - * Create a new Html5Converter. - * @returns {Html5Converter} - a Html5Converter - * @memberof Converter/Html5Converter - */ -Html5Converter.create = function () { - return this.$new() -} - -/** - * Converts an {AbstractNode} using the given transform. - * This method must be implemented by a concrete converter class. - * - * @param {AbstractNode} node - The concrete instance of AbstractNode to convert. - * @param {string} [transform] - An optional String transform that hints at which transformation should be applied to this node. - * If a transform is not given, the transform is often derived from the value of the {AbstractNode#getNodeName} property. (optional, default: undefined) - * @param {Object} [opts]- An optional JSON of options hints about how to convert the node. (optional, default: undefined) - * - * @returns {string} - the String result. - * @memberof Converter/Html5Converter - */ -Html5Converter.prototype.convert = function (node, transform, opts) { - return this.$convert(node, transform, opts) -} - - -var ASCIIDOCTOR_JS_VERSION = '2.2.4'; - - /** - * Get Asciidoctor.js version number. - * - * @memberof Asciidoctor - * @returns {string} - returns the version number of Asciidoctor.js. - */ - Asciidoctor.prototype.getVersion = function () { - return ASCIIDOCTOR_JS_VERSION - } - return Opal.Asciidoctor -})) diff --git a/node_modules/@asciidoctor/core/package.json b/node_modules/@asciidoctor/core/package.json deleted file mode 100644 index 36ea57bc..00000000 --- a/node_modules/@asciidoctor/core/package.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "_from": "@asciidoctor/core@~2.2", - "_id": "@asciidoctor/core@2.2.4", - "_inBundle": false, - "_integrity": "sha512-rk7YSD6QAY6kInW5JVYi2ICjC3r90kXGlARwpfKQ99e/qy/2Vq31coL6nFFiWRuQxbh4EBqzUbC5uUUUjiu+Vw==", - "_location": "/@asciidoctor/core", - "_moduleAliases": { - "@asciidoctor/core": "build/asciidoctor-node.js" - }, - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@asciidoctor/core@~2.2", - "name": "@asciidoctor/core", - "escapedName": "@asciidoctor%2fcore", - "scope": "@asciidoctor", - "rawSpec": "~2.2", - "saveSpec": null, - "fetchSpec": "~2.2" - }, - "_requiredBy": [ - "/@antora/asciidoc-loader" - ], - "_resolved": "https://registry.npmjs.org/@asciidoctor/core/-/core-2.2.4.tgz", - "_shasum": "b1caa0abb63eca7bae6cea2394fa47c1917b2d9f", - "_spec": "@asciidoctor/core@~2.2", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/asciidoc-loader", - "authors": [ - "Dan Allen (https://github.com/mojavelinux)", - "Guillaume Grossetie (https://github.com/mogztter)", - "Anthonny Quérouil (https://github.com/anthonny)" - ], - "browser": "dist/browser/asciidoctor.js", - "bugs": { - "url": "https://github.com/asciidoctor/asciidoctor.js/issues" - }, - "bundleDependencies": false, - "dependencies": { - "asciidoctor-opal-runtime": "0.3.3", - "unxhr": "1.0.1" - }, - "deprecated": false, - "description": "Asciidoctor - the core library", - "devDependencies": { - "@types/node": "^13.9.2", - "@types/nunjucks": "^3.1.3", - "bestikk-download": "1.0.0", - "bestikk-fs": "1.0.0", - "bestikk-log": "0.1.0", - "bestikk-uglify": "3.0.0", - "chai": "4.2.0", - "cross-env": "6.0.3", - "dirty-chai": "2.0.1", - "documentation": "12.3.0", - "dot": "^1.1.3", - "dtslint": "latest", - "ejs": "^3.0.1", - "eslint": "6.8.0", - "handlebars": "^4.7.6", - "http-server": "0.12.3", - "mocha": "7.1.2", - "module-alias": "2.2.2", - "nunjucks": "^3.2.1", - "opal-compiler": "1.0.13", - "pug": "^2.0.4", - "puppeteer": "3.1.0", - "sinon": "8.1.1", - "standard": "14.3.4", - "typescript": "^4.1.2" - }, - "engines": { - "node": ">=8.11", - "npm": ">=5.0.0", - "yarn": ">=1.1.0" - }, - "files": [ - "dist", - "types/index.d.ts", - "LICENSE", - "README.adoc" - ], - "homepage": "https://github.com/asciidoctor/asciidoctor.js", - "keywords": [ - "asciidoc", - "asciidoctor", - "opal", - "javascript", - "library" - ], - "license": "MIT", - "main": "dist/node/asciidoctor.js", - "name": "@asciidoctor/core", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/asciidoctor/asciidoctor.js.git" - }, - "scripts": { - "benchmark": "node tasks/benchmark.js", - "build": "node tasks/build.js && npm run test && npm run lint", - "build:quick": "node tasks/build.js && npm run test:node && npm run code:lint", - "clean": "npm run clean:all", - "clean:all": "node tasks/clean.js", - "clean:core": "node tasks/clean.js core", - "clean:js": "node tasks/clean.js js", - "clean:patch": "node tasks/clean.js patch", - "code:lint": "standard src/**/*.js spec/**/*.js tasks/**/*.js benchmark/**/*.js", - "dist": "cross-env MINIFY=1 node tasks/dist.js", - "docs": "npm run docs:lint && npm run docs:build", - "docs:build": "documentation build src/** -f html -o build/docs -g", - "docs:lint": "documentation lint src/**", - "docs:serve": "documentation serve src/** -g -w", - "examples": "node tasks/examples.js", - "lint": "npm run code:lint && npm run docs:lint", - "package": "cross-env MINIFY=1 COPY_DIST=1 node tasks/build.js && cross-env MINIFY=1 npm run test", - "server": "node tasks/server.js", - "test": "node tasks/test/unsupported-features.js && npm run test:node && npm run test:browser && npm run test:types", - "test:browser": "node spec/browser/run.js", - "test:graalvm": "node tasks/graalvm.js", - "test:node": "mocha spec/*/*.spec.js", - "test:types": "rm -f types/tests.js && dtslint types && tsc --build types/tsconfig.json && node types/tests.js", - "travis": "npm run lint && npm run package && npm run docs && npm run examples && npm run test:graalvm" - }, - "standard": { - "ignore": [ - "src/template-*.js" - ] - }, - "types": "types", - "version": "2.2.4" -} diff --git a/node_modules/@asciidoctor/core/types/index.d.ts b/node_modules/@asciidoctor/core/types/index.d.ts deleted file mode 100644 index e9e2b4c1..00000000 --- a/node_modules/@asciidoctor/core/types/index.d.ts +++ /dev/null @@ -1,3603 +0,0 @@ -/// <reference types="node" /> -// TypeScript Version: 2.9 -export namespace Asciidoctor { - import Author = Document.Author; - import Title = Document.Title; - import Registry = Extensions.Registry; - import Cursor = Reader.Cursor; - - class OpalKlass<T> { - $new(...params: any[]): T; - } - - interface Runtime { - ioModule: string | 'node'; - platform: string | 'node'; - engine: string | 'v8'; - framework: string; - } - - class Reader implements Logging { - /** - * Push source onto the front of the reader and switch the context based on the file, document-relative path and line information given. - * - * This method is typically used in an IncludeProcessor to add source read from the target specified. - * - * @param data - data - * @param file - file - * @param path - path - * @param lineno - line number - * @param attributes - a JSON of attributes - * @returns this {Reader} object. - */ - pushInclude(data: string | string[], file?: string, path?: string, lineno?: number, attributes?: object): Reader; - - /** - * Get the current location of the reader's cursor, which encapsulates the file, dir, path, and lineno of the file being read. - */ - getCursor(): Cursor; - - /** - * Get the remaining unprocessed lines, without consuming them, as an {Array} of {string}. - * - * Lines will not be consumed from the Reader (ie. you will be able to read these lines again). - * - * @returns the remaining unprocessed lines as an Array of String. - */ - getLines(): string[]; - - /** - * Get the remaining unprocessed lines, without consuming them, as a String. - * - * Lines will not be consumed from the Reader (ie. you will be able to read these lines again). - * - * @returns the remaining unprocessed lines as a String (joined by linefeed characters). - */ - getString(): string; - - /** - * Check whether there are any lines left to read. - * If a previous call to this method resulted in a value of false, immediately returned the cached value. - * Otherwise, delegate to peekLine to determine if there is a next line available. - * - * @returns true if there are more lines, false if there are not. - */ - hasMoreLines(): boolean; - - /** - * Check whether this reader is empty (contains no lines). - * - * @returns true if there are no more lines to peek, otherwise false. - */ - isEmpty(): boolean; - - /** - * Peek at the next line. - * Processes the line if not already marked as processed, but does not consume it (ie. you will be able to read this line again). - * - * This method will probe the reader for more lines. - * If there is a next line that has not previously been visited, the line is passed to the Reader#processLine method to be initialized. - * This call gives sub-classes the opportunity to do preprocessing. - * If the return value of the Reader#processLine is undefined, the data is assumed to be changed and Reader#peekLine is invoked again to perform further processing. - * - * If hasMoreLines is called immediately before peekLine, the direct flag is implicitly true (since the line is flagged as visited). - * - * @param direct - A {boolean} flag to bypasses the check for more lines and immediately returns the first element of the internal lines {Array}. (default: false) - * @returns the next line as a {string} if there are lines remaining. - */ - peekLine(direct: boolean): string; - - /** - * Consume, preprocess, and return the next line. - * - * Line will be consumed from the Reader (ie. you won't be able to read this line again). - * - * @returns the next line as a {string} if data is present. - */ - readLine(): string; - - /** - * Consume, preprocess, and return the remaining lines. - * - * This method calls Reader#readLine repeatedly until all lines are consumed and returns the lines as an {Array} of {string}. - * This method differs from Reader#getLines in that it processes each line in turn, hence triggering any preprocessors implemented in sub-classes. - * - * Lines will be consumed from the Reader (ie. you won't be able to read these lines again). - * - * @returns the lines read as an {Array} of {string}. - */ - readLines(): string[]; - - /** - * Consume, preprocess, and return the remaining lines joined as a {string}. - * - * Delegates to Reader#readLines, then joins the result. - * - * Lines will be consumed from the Reader (ie. you won't be able to read these lines again). - * - * @returns the lines read joined as a {string} - */ - read(): string; - - /** - * Advance to the next line by discarding the line at the front of the stack. - * @returns a Boolean indicating whether there was a line to discard. - */ - advance(): boolean; - - getLogger(): Logger; - - createLogMessage(text: string, context: any): LoggerMessage; - } - - namespace Reader { - /** - * - */ - class Cursor { - /** - * @returns the file associated to the cursor - */ - getFile(): string | undefined; - - /** - * @returns the directory associated to the cursor - */ - getDirectory(): string | undefined; - - /** - * @returns the path associated to the cursor (or '<stdin>') - */ - getPath(): string | undefined; - - /** - * Get the line number of the cursor. - * @returns the line number of the cursor - */ - getLineNumber(): number | undefined; - } - } - - namespace SafeMode { - /** - * A safe mode level that disables any of the security features enforced by Asciidoctor. - */ - const UNSAFE: number; - - /** - * A safe mode level that closely parallels safe mode in AsciiDoc. - * This value prevents access to files which reside outside of the parent directory of the source file and disables any macro other than the include::[] directive. - */ - const SAFE: number; - - /** - * A safe mode level that disallows the document from setting attributes that would affect the conversion of the document, - * in addition to all the security features of {SafeMode.SAFE}. - * For instance, this level forbids changing the backend or source-highlighter using an attribute defined in the source document header. - * This is the most fundamental level of security for server deployments (hence the name). - */ - const SERVER: number; - - /** - * A safe mode level that disallows the document from attempting to read files from the file system and including the contents of them into the document, - * in additional to all the security features of SafeMode.SERVER}. - * For instance, this level disallows use of the include::[] directive and the embedding of binary content (data uri), stylesheets and JavaScripts referenced by the document. - * (Asciidoctor and trusted extensions may still be allowed to embed trusted content into the document). - * Since Asciidoctor is aiming for wide adoption, this level is the default and is recommended for server deployments. - */ - const SECURE: number; - - /** - * @param name - the name of the security level - * @returns the integer value of the corresponding security level. - */ - function getValueForName(name: string): number; - - /** - * @param value - the integer value of the security level - * @returns the name of the corresponding security level. - */ - function getNameForValue(value: number): string | undefined; - - /** - * @returns the String {Array} of security levels. - */ - function getNames(): string[]; - } - - interface Callout { - [key: string]: any; - - id?: string; - ordinal?: number; - } - - /** - * Maintains a catalog of callouts and their associations. - */ - class Callouts { - /** - * Create a new Callouts. - * @returns a new Callouts - */ - static create(): Callouts; - - /** - * Register a new callout for the given list item ordinal. - * Generates a unique id for this callout based on the index of the next callout list in the document and the index of this callout since the end of the last callout list. - * - * @param ordinal - the Integer ordinal (1-based) of the list item to which this callout is to be associated - * @returns The unique String id of this callout - * @example - * callouts = asciidoctor.Callouts.create() - * callouts.register(1) - * // => "CO1-1" - * callouts.nextList() - * callouts.register(2) - * // => "CO2-1" - */ - register(ordinal: number): string; - - /** - * Get the next callout index in the document. - * - * Reads the next callout index in the document and advances the pointer. - * This method is used during conversion to retrieve the unique id of the callout that was generated during parsing. - * - * @returns The unique String id of the next callout in the document - */ - readNextId(): string; - - /** - * - */ - getLists(): Callout[][]; - - /** - * - */ - getListIndex(): number; - - /** - * et a space-separated list of callout ids for the specified list item. - * @param ordinal - the Integer ordinal (1-based) of the list item for which to retrieve the callouts - * @returns a space-separated String of callout ids associated with the specified list item - */ - getCalloutIds(ordinal: number): string; - - /** - * The current list for which callouts are being collected. - * @returns The Array of callouts at the position of the list index pointer - */ - getCurrentList(): any[]; - - /** - * Advance to the next callout list in the document. - */ - nextList(): void; - - /** - * Rewind the list index pointer, intended to be used when switching from the parsing to conversion phase. - */ - rewind(): void; - } - - /** - * Logger - */ - interface LoggerFormatterFunction { - postConstruct?: (this: LoggerFormatter) => any; - call?: (this: LoggerFormatter, severity: string, time: Date, programName: string, message: string | RubyLoggerMessage) => string; - } - - interface LoggerFunction { - postConstruct?: (this: Logger) => any; - add?: (this: Logger, severity: string, message: string | RubyLoggerMessage | undefined, programName: string) => void; - } - - namespace LoggerManager { - function getLogger(): Logger; - - function setLogger(logger: Logger): void; - - function newLogger(name: string, functions: LoggerFunction): Logger; - - function newFormatter(name: string, functions: LoggerFormatterFunction): LoggerFormatter; - } - - interface Writer { - write(message: string | LoggerMessage): void; - } - - interface BasicLogger { - log(message: string | LoggerMessage): void; - } - - class RubyLogger { - $add(severity: string | number, message: string | LoggerMessage, programName?: string): any; - - add(severity: string | number, message: string | LoggerMessage, programName?: string): any; - - log(severity: string | number, message: string | LoggerMessage, programName?: string): any; - - debug(message: string): any; - - info(message: string): any; - - warn(message: string): any; - - error(message: string): any; - - fatal(message: string): any; - - isDebugEnabled(): boolean; - - isInfoEnabled(): boolean; - - isWarnEnabled(): boolean; - - isErrorEnabled(): boolean; - - isFatalEnabled(): boolean; - } - - class Logger extends RubyLogger { - [key: string]: any; - - formatter: LoggerFormatter; - - getMaxSeverity(): undefined | number; - - getFormatter(): LoggerFormatter; - - setFormatter(formatter: LoggerFormatter): any; - - getLevel(): number; - - setLevel(level: number): any; - - getProgramName(): string; - - setProgramName(programName: string): any; - } - - class MemoryLogger extends Logger { - /** - * Create a new MemoryLogger. - * @returns a new MemoryLogger - */ - static create(): MemoryLogger; - - getMessages(): LoggerMessage[]; - } - - class NullLogger extends Logger { - /** - * Create a new NullLogger. - * @returns a new NullLogger - */ - static create(): NullLogger; - - getMaxSeverity(): undefined | number; - } - - class LoggerFormatter { - call(severity: string, time: Date, programName: string, message: string): string; - } - - interface Logging { - getLogger(): Logger; - - createLogMessage(text: string, context: any): LoggerMessage; - } - - namespace LoggerSeverity { - function get(severity: string): number; - } - - interface RubyLoggerMessage { - message: string; - source_location: SourceLocation; - text: string; - } - - class LoggerMessage implements RubyLoggerMessage { - message: string; - source_location: SourceLocation; - text: string; - - getText(): string; - - getSeverity(): string; - - getSourceLocation(): SourceLocation; - } - - interface SourceLocation { - getLineNumber(): number; - - getFile(): undefined | string; - - getDirectory(): string; - - getPath(): string; - } - - class Timings { - /** - * Create a new Timings. - * @returns a Timings - */ - static create(): Timings; - - /** - * Print a report to the specified output. - * The report will include: - * - the time to read and parse source - * - the time to convert document - * - the total time (read, parse and convert) - * @param to - an optional output (by default stdout) - * @param subject - an optional subject (usually the file name) - */ - printReport(to: undefined | Writer | BasicLogger | RubyLogger, subject: string): void; - } - - namespace Document { - /** - * The Author class represents information about an author extracted from document attributes. - */ - class Author { - /** - * @returns the author's full name - */ - getName(): string | undefined; - - /** - * @returns the author's first name - */ - getFirstName(): string | undefined; - - /** - * @returns the author's middle name (or undefined if the author has no middle name) - */ - getMiddleName(): string | undefined; - - /** - * @returns the author's last name - */ - getLastName(): string | undefined; - - /** - * @returns the author's initials (by default based on the author's name) - */ - getInitials(): string | undefined; - - /** - * @returns the author's email - */ - getEmail(): string | undefined; - } - - namespace Title { - interface Options { - partition?: boolean; - sanitize?: boolean; - use_fallback?: boolean; - } - } - - /** - * - */ - class Footnote { - /** - * @returns the footnote's index - */ - getIndex(): number | undefined; - - /** - * @returns the footnote's id - */ - getId(): number | undefined; - - /** - * @returns the footnote's text - */ - getText(): string | undefined; - } - - interface AttributeEntry { - name: string; - value: string; - negate: boolean; - } - - /** - * - */ - class ImageReference { - /** - * @returns the image's target - */ - getTarget(): string; - - /** - * @returns the image's directory (imagesdir attribute) - */ - getImagesDirectory(): string | undefined; - } - - /** - * The Title class represents a partitioned title (i.e., title & subtitle). - */ - class Title { - getMain(): string; - - getCombined(): string; - - getSubtitle(): string; - - isSanitized(): boolean; - - hasSubtitle(): boolean; - } - - class RevisionInfo { - /** - * Get the document revision date from document header (document attribute <code>revdate</code>). - */ - getDate(): string; - - /** - * Get the document revision number from document header (document attribute <code>revnumber</code>). - */ - getNumber(): string; - - /** - * Get the document revision remark from document header (document attribute <code>revremark</code>). - * A short summary of changes in this document revision. - */ - getRemark(): string; - - /** - * @returns true if the revision info is empty (ie. not defined), otherwise false - */ - isEmpty(): boolean; - } - } - - namespace Image { - interface Attributes { - [key: string]: any; - - target: string; - alt?: string; - title?: string; - caption?: string; - } - } - - interface Attributes { - [key: string]: any; - } - - namespace Inline { - interface Options { - [key: string]: any; - - id?: string; - type?: string; - target?: string; - attributes?: Attributes; - } - } - - namespace Block { - interface Options { - [key: string]: any; - - content_model?: string; - subs?: string | string[]; - } - - interface Attributes { - attribute_entries?: Document.AttributeEntry[]; - } - } - - interface Selector { - [key: string]: any; - } - - interface ParseAttributesOptions { - [key: string]: any; - - positional_attributes?: string | string[]; - sub_attributes?: boolean; - } - - interface Options { - [key: string]: any; - } - - interface ProcessorOptions { - [key: string]: any; - - /** - * Sets additional document attributes, which override equivalently-named attributes defined in the document unless the value ends with @. - * Any number of built-in or user-defined attributes in one of the following formats: - * - JSON: {'name': 'value'} - * - Array:['name=value'] - * - String: 'name=value' - */ - attributes?: Attributes | string[] | string; - /** - * Selects the converter to use (as registered with this keyword). - */ - backend?: string; - /** - * Sets the base (aka working) directory containing the document and resources. - */ - base_dir?: string; - /** - * If true, tells the parser to capture images and links in the reference table. - * (Normally only IDs, footnotes and indexterms are included). - * The reference table is available via the references property on the document AST object. - * (Experimental). - */ - catalog_assets?: boolean; - /** - * Sets the document type. - */ - doctype?: string; - /** - * Overrides the extensions registry instance. - * Instead of providing a JavaScript function containing extensions to register, - * this option lets you replace the extension registry itself, - * giving you complete control over how extensions are registered for this processor. - */ - extension_registry?: Registry; - /** - * @deprecated Please use {@link ProcessorOptions#standalone} - */ - header_footer?: boolean; - /** - * If true, add the document header and footer (i.e., framing) around the body content in the output. - */ - standalone?: boolean; - /** - * If true, the processor will create the necessary output directories if they don’t yet exist. - */ - mkdirs?: boolean; - /** - * If true, the source is parsed eagerly (i.e., as soon as the source is passed to the load or loadFile API). - * If false, parsing is deferred until the parse method is explicitly invoked. - */ - parse?: boolean; - /** - * Sets the safe mode. - */ - safe?: string | number; - /** - * Keeps track of the file and line number for each parsed block. - * (Useful for tooling applications where the association between the converted output and the source file is important). - */ - sourcemap?: boolean; - /** - * An array of directories containing templates to be used instead of the default built-in templates. - */ - template_dirs?: string[]; - /** - * Capture time taken to read, parse, and convert document. Internal use only. - */ - timings?: Timings; - /** - * Destination directory for output file(s), relative to base_dir. - */ - to_dir?: string; - /** - * The name of the output file to write, or true to use the default output file (docname + outfilesuffix). - */ - to_file?: boolean | string; - } - - /** - * @description - * Extensions provide a way to participate in the parsing and converting - * phases of the AsciiDoc processor or extend the AsciiDoc syntax. - * - * The various extensions participate in AsciiDoc processing as follows: - * - * 1. After the source lines are normalized, {{@link Extensions/Preprocessor}}s modify or replace - * the source lines before parsing begins. {{@link Extensions/IncludeProcessor}}s are used to - * process include directives for targets which they claim to handle. - * 2. The Parser parses the block-level content into an abstract syntax tree. - * Custom blocks and block macros are processed by associated {{@link Extensions/BlockProcessor}}s - * and {{@link Extensions/BlockMacroProcessor}}s, respectively. - * 3. {{@link Extensions/TreeProcessor}}s are run on the abstract syntax tree. - * 4. Conversion of the document begins, at which point inline markup is processed - * and converted. Custom inline macros are processed by associated {InlineMacroProcessor}s. - * 5. {{@link Extensions/Postprocessor}}s modify or replace the converted document. - * 6. The output is written to the output stream. - * - * Extensions may be registered globally using the {Extensions.register} method - * or added to a custom {Registry} instance and passed as an option to a single - * Asciidoctor processor. - * - * @example - * asciidoctor.Extensions.register(function () { - * this.block(function () { - * var self = this; - * self.named('shout'); - * self.onContext('paragraph'); - * self.process(function (parent, reader) { - * var lines = reader.getLines().map(function (l) { return l.toUpperCase(); }); - * return this.createBlock(parent, 'paragraph', lines); - * }); - * }); - * }); - */ - namespace Extensions { - /** - * Tree processor functions - */ - interface TreeProcessorFunctions { - postConstruct?: (this: TreeProcessorInstance) => any; - initialize?: (this: TreeProcessorInstance, name: string, config: any) => void; - process: (this: TreeProcessorInstance, parent: Document) => any; - } - - interface TreeProcessorInstance extends TreeProcessor { - [key: string]: any; - - super: (...params: any[]) => void; - } - - /** - * Include processor functions - */ - interface IncludeProcessorFunctions { - postConstruct?: (this: IncludeProcessorInstance) => any; - initialize?: (this: IncludeProcessorInstance, name: string, config: any) => void; - process: (this: IncludeProcessorInstance, document: Document, reader: Reader, target: string, attributes: any) => void; - } - - interface IncludeProcessorInstance extends IncludeProcessor { - [key: string]: any; - - super: (...params: any[]) => void; - } - - /** - * Postprocessor functions - */ - interface PostprocessorFunctions { - postConstruct?: (this: PostprocessorInstance) => any; - initialize?: (this: PostprocessorInstance, name: string, config: any) => void; - process: (this: PostprocessorInstance, document: Document, output: string) => any; - } - - interface PostprocessorInstance extends Postprocessor { - [key: string]: any; - - super: (...params: any[]) => void; - } - - /** - * Preprocessor functions - */ - interface PreprocessorFunctions { - postConstruct?: (this: PreprocessorInstance) => any; - initialize?: (this: PreprocessorInstance, name: string, config: any) => void; - process: (this: PreprocessorInstance, document: Document, reader: Reader) => any; - } - - interface PreprocessorInstance extends Preprocessor { - [key: string]: any; - - super: (...params: any[]) => void; - } - - /** - * Docinfo processor functions - */ - interface DocinfoProcessorFunctions { - postConstruct?: (this: DocinfoProcessorInstance) => any; - initialize?: (this: DocinfoProcessorInstance, name: string, config: any) => void; - process: (this: DocinfoProcessorInstance, parent: Document, reader: Reader) => any; - } - - interface DocinfoProcessorInstance extends DocinfoProcessor { - [key: string]: any; - - super: (...params: any[]) => void; - } - - /** - * Block processor functions - */ - interface BlockProcessorFunctions { - postConstruct?: (this: BlockProcessorInstance) => any; - initialize?: (this: BlockProcessorInstance, name: string, config: any) => void; - process: (this: BlockProcessorInstance, parent: Document, reader: Reader, attributes?: any) => any; - } - - interface BlockProcessorInstance extends BlockProcessor { - [key: string]: any; - - super: (...params: any[]) => void; - } - - /** - * Block macro functions - */ - interface BlockMacroFunctions { - postConstruct?: (this: BlockMacroProcessorInstance) => any; - initialize?: (this: BlockMacroProcessorInstance, name: string, config: any) => void; - process: (this: BlockMacroProcessorInstance, parent: Document, target: string, attributes?: any) => any; - } - - interface BlockMacroProcessorInstance extends BlockMacroProcessor { - [key: string]: any; - - super: (...params: any[]) => void; - } - - /** - * Inline macro functions - */ - interface InlineMacroFunctions { - postConstruct?: (this: InlineMacroProcessorInstance) => any; - initialize?: (this: InlineMacroProcessorInstance, name: string, config: any) => void; - process: (this: InlineMacroProcessorInstance, parent: Document, target: string, attributes?: any) => any; - } - - interface InlineMacroProcessorInstance extends InlineMacroProcessor { - [key: string]: any; - - super: (...params: any[]) => void; - } - - /** - * Create a new {@link Registry}. - * @param [name] - An optional name - * @param [block] - An optional block - * @returns a {@link Registry} - */ - function create(name?: string, block?: (this: Registry) => any): Registry; - - /** - */ - function register(block?: (this: Registry) => any): void; - - /** - * Get statically-registered extension groups. - */ - function getGroups(): object; - - /** - * Unregister all statically-registered extension groups. - */ - function unregisterAll(): void; - - /** - * Unregister the specified statically-registered extension groups. - * - * NOTE Opal cannot delete an entry from a Hash that is indexed by symbol, so - * we have to resort to using low-level operations in this method. - */ - function unregister(...names: string[]): void; - - /** - * Create a postprocessor - * @description this API is experimental and subject to change - */ - function createPostprocessor(arg: string | PostprocessorFunctions): PostprocessorKlass; - - /** - * Create a postprocessor - * @description this API is experimental and subject to change - */ - function createPostprocessor(name: string, functions: PostprocessorFunctions): PostprocessorKlass; - - /** - * Create and instantiate a postprocessor - * @description this API is experimental and subject to change - */ - function newPostprocessor(arg: string | PostprocessorFunctions): Postprocessor; - /** - * Create and instantiate a postprocessor - * @description this API is experimental and subject to change - */ - function newPostprocessor(name: string, functions: PostprocessorFunctions): Postprocessor; - - /** - * Create a preprocessor - * @description this API is experimental and subject to change - */ - function createPreprocessor(arg: string | PreprocessorFunctions): PreprocessorKlass; - - /** - * Create a preprocessor - * @description this API is experimental and subject to change - */ - function createPreprocessor(name: string, functions: PreprocessorFunctions): PreprocessorKlass; - - /** - * Create and instantiate a preprocessor - * @description this API is experimental and subject to change - */ - function newPreprocessor(arg: string | PreprocessorFunctions): Preprocessor; - - /** - * Create and instantiate a preprocessor - * @description this API is experimental and subject to change - */ - function newPreprocessor(name: string, functions: PreprocessorFunctions): Preprocessor; - - /** - * Create a tree processor - * @description this API is experimental and subject to change - */ - function createTreeProcessor(arg: string | TreeProcessorFunctions): TreeProcessorKlass; - - /** - * Create a tree processor - * @description this API is experimental and subject to change - */ - function createTreeProcessor(name: string, functions: TreeProcessorFunctions): TreeProcessorKlass; - - /** - * Create and instantiate a tree processor - * @description this API is experimental and subject to change - */ - function newTreeProcessor(arg: string | TreeProcessorFunctions): TreeProcessor; - - /** - * Create and instantiate a tree processor - * @description this API is experimental and subject to change - */ - function newTreeProcessor(name: string, functions: TreeProcessorFunctions): TreeProcessor; - - /** - * Create an include processor - * @description this API is experimental and subject to change - */ - function createIncludeProcessor(arg: string | IncludeProcessorFunctions): IncludeProcessorKlass; - - /** - * Create an include processor - * @description this API is experimental and subject to change - */ - function createIncludeProcessor(name: string, functions: IncludeProcessorFunctions): IncludeProcessorKlass; - - /** - * Create and instantiate an include processor - * @description this API is experimental and subject to change - */ - function newIncludeProcessor(arg: string | IncludeProcessorFunctions): IncludeProcessor; - - /** - * Create and instantiate an include processor - * @description this API is experimental and subject to change - */ - function newIncludeProcessor(name: string, functions: IncludeProcessorFunctions): IncludeProcessor; - - /** - * Create a Docinfo processor - * @description this API is experimental and subject to change - */ - function createDocinfoProcessor(arg: string | DocinfoProcessorFunctions): DocinfoProcessorKlass; - - /** - * Create a Docinfo processor - * @description this API is experimental and subject to change - */ - function createDocinfoProcessor(name: string, functions: DocinfoProcessorFunctions): DocinfoProcessorKlass; - - /** - * Create and instantiate a Docinfo processor - * @description this API is experimental and subject to change - */ - function newDocinfoProcessor(arg: string | DocinfoProcessorFunctions): DocinfoProcessor; - - /** - * Create and instantiate a Docinfo processor - * @description this API is experimental and subject to change - */ - function newDocinfoProcessor(name: string, functions: DocinfoProcessorFunctions): DocinfoProcessor; - - /** - * Create a block processor - * @description this API is experimental and subject to change - */ - function createBlockProcessor(arg: string | BlockProcessorFunctions): BlockProcessorKlass; - - /** - * Create a block processor - * @description this API is experimental and subject to change - */ - function createBlockProcessor(name: string, functions: BlockProcessorFunctions): BlockProcessorKlass; - - /** - * Create and instantiate a block processor - * @description this API is experimental and subject to change - */ - function newBlockProcessor(arg: string | BlockProcessorFunctions): BlockProcessor; - - /** - * Create and instantiate a block processor - * @description this API is experimental and subject to change - */ - function newBlockProcessor(name: string, functions: BlockProcessorFunctions): BlockProcessor; - - /** - * Create an inline macro processor - * @description this API is experimental and subject to change - */ - function createInlineMacroProcessor(arg: string | InlineMacroFunctions): InlineMacroProcessorKlass; - - /** - * Create an inline macro processor - * @description this API is experimental and subject to change - */ - function createInlineMacroProcessor(name: string, functions: InlineMacroFunctions): InlineMacroProcessorKlass; - - /** - * Create and instantiate an inline macro processor - * @description this API is experimental and subject to change - */ - function newInlineMacroProcessor(arg: string | InlineMacroFunctions): InlineMacroProcessor; - - /** - * Create and instantiate an inline macro processor - * @description this API is experimental and subject to change - */ - function newInlineMacroProcessor(name: string, functions: InlineMacroFunctions): InlineMacroProcessor; - - /** - * Create a block macro processor - * @description this API is experimental and subject to change - */ - function createBlockMacroProcessor(arg: string | BlockMacroFunctions): BlockMacroProcessorKlass; - - /** - * Create a block macro processor - * @description this API is experimental and subject to change - */ - function createBlockMacroProcessor(name: string, functions: BlockMacroFunctions): BlockMacroProcessorKlass; - - /** - * Create and instantiate a block macro processor - * @description this API is experimental and subject to change - */ - function newBlockMacroProcessor(arg: string | BlockMacroFunctions): BlockMacroProcessor; - - /** - * Create and instantiate a block macro processor - * @description this API is experimental and subject to change - */ - function newBlockMacroProcessor(name: string, functions: BlockMacroFunctions): BlockMacroProcessor; - - class Registry { - /** - * Get extension groups. - */ - getGroups(): any; - - unregisterAll(): void; - - unregister(...names: string[]): void; - - prefer(name: string, processor: any): void; - - block(name: string, processor: ((this: BlockProcessorDsl) => void | typeof BlockProcessorKlass | BlockProcessor)): void; - block(processor: ((this: BlockProcessorDsl) => void) | typeof BlockProcessorKlass | BlockProcessor): void; - - inlineMacro(name: string, processor: ((this: InlineMacroProcessorDsl) => void) | typeof InlineMacroProcessorKlass | InlineMacroProcessor): void; - inlineMacro(processor: ((this: InlineMacroProcessorDsl) => void) | typeof InlineMacroProcessorKlass | InlineMacroProcessor): void; - - blockMacro(name: string, processor: ((this: BlockMacroProcessorDsl) => void) | typeof BlockMacroProcessorKlass | BlockMacroProcessor): void; - blockMacro(processor: ((this: BlockMacroProcessorDsl) => void) | typeof BlockMacroProcessorKlass | BlockMacroProcessor): void; - - includeProcessor(processor: ((this: IncludeProcessorDsl) => void) | typeof IncludeProcessorKlass | IncludeProcessor): void; - - treeProcessor(processor: ((this: TreeProcessorDsl) => void) | typeof TreeProcessorKlass | TreeProcessor): void; - - postprocessor(processor: ((this: PostprocessorDsl) => void) | typeof PostprocessorKlass | Postprocessor): void; - - preprocessor(processor: ((this: PreprocessorDsl) => void) | typeof PreprocessorKlass | Preprocessor): void; - - docinfoProcessor(processor: ((this: DocinfoProcessorDsl) => void) | typeof DocinfoProcessorKlass | DocinfoProcessor): void; - - /** - * Checks whether any {{@link Extensions/Preprocessor}} extensions have been registered. - * - * @returns a {boolean} indicating whether any {{@link Extensions/Preprocessor}} extensions are registered. - */ - hasPreprocessors(): boolean; - - /** - * Checks whether any {{@link Extensions/TreeProcessor}} extensions have been registered. - * - * @returns a {boolean} indicating whether any {{@link Extensions/TreeProcessor}} extensions are registered. - */ - hasTreeProcessors(): boolean; - - /** - * Checks whether any {{@link Extensions/IncludeProcessor}} extensions have been registered. - * - * @returns a {boolean} indicating whether any {{@link Extensions/IncludeProcessor}} extensions are registered. - */ - hasIncludeProcessors(): boolean; - - /** - * Checks whether any {{@link Extensions/Postprocessor}} extensions have been registered. - * - * @returns a {boolean} indicating whether any {{@link Extensions/Postprocessor}} extensions are registered. - */ - hasPostprocessors(): boolean; - - /** - * Checks whether any {{@link Extensions/DocinfoProcessor}} extensions have been registered. - * - * @param location - A for selecting docinfo extensions at a given location (head or footer) (default: undefined) - * @returns a {boolean} indicating whether any {{@link Extensions/DocinfoProcessor}} extensions are registered. - */ - hasDocinfoProcessors(location?: string): boolean; - - /** - * Checks whether any {{@link Extensions/BlockProcessor}} extensions have been registered. - * - * @returns a {boolean} indicating whether any {{@link Extensions/BlockProcessor}} extensions are registered. - */ - hasBlocks(): boolean; - - /** - * Checks whether any {{@link Extensions/BlockMacroProcessor}} extensions have been registered. - * - * @returns a {boolean} indicating whether any {{@link Extensions/BlockMacroProcessor}} extensions are registered. - */ - hasBlockMacros(): boolean; - - /** - * Checks whether any {{@link Extensions/InlineMacroProcessor}} extensions have been registered. - * - * @returns a {boolean} indicating whether any {{@link Extensions/InlineMacroProcessor}} extensions are registered. - */ - hasInlineMacros(): boolean; - - /** - * Retrieves the Extension proxy objects for all the {{@link Extensions/Preprocessor}} instances stored in this registry. - * - * @returns an {array} of Extension proxy objects. - */ - getPreprocessors(): Preprocessor[]; - - /** - * Retrieves the Extension proxy objects for all the {{@link Extensions/TreeProcessor}} instances stored in this registry. - * - * @returns an {array} of Extension proxy objects. - */ - getTreeProcessors(): TreeProcessor[]; - - /** - * Retrieves the Extension proxy objects for all the {{@link Extensions/IncludeProcessor}} instances stored in this registry. - * - * @returns an {array} of Extension proxy objects. - */ - getIncludeProcessors(): IncludeProcessor[]; - - /** - * Retrieves the Extension proxy objects for all the {{@link Extensions/Postprocessor}} instances stored in this registry. - * - * @returns an {array} of Extension proxy objects. - */ - getPostprocessors(): Postprocessor[]; - - /** - * Retrieves the Extension proxy objects for all the {{@link Extensions/DocinfoProcessor}} instances stored in this registry. - * - * @param location - A {string} for selecting docinfo extensions at a given location (head or footer) (default: undefined) - * @returns an {array} of Extension proxy objects. - */ - getDocinfoProcessors(location?: string): DocinfoProcessor[]; - - /** - * Retrieves the Extension proxy objects for all the {{@link Extensions/BlockProcessor}} instances stored in this registry. - * - * @returns an {array} of Extension proxy objects. - */ - getBlocks(): BlockProcessor[]; - - /** - * Retrieves the Extension proxy objects for all the {{@link Extensions/BlockMacroProcessor}} instances stored in this registry. - * - * @returns an {array} of Extension proxy objects. - */ - getBlockMacros(): BlockMacroProcessor[]; - - /** - * Retrieves the Extension proxy objects for all the {{@link Extensions/InlineMacroProcessor}} instances stored in this registry. - * - * @returns an {array} of Extension proxy objects. - */ - getInlineMacros(): InlineMacroProcessor[]; - - /** - * Get any {{@link Extensions/InlineMacroProcessor}} extensions are registered to handle the specified inline macro name. - * - * @param name - the {string} inline macro name - * @returns the Extension proxy object for the {{@link Extensions/InlineMacroProcessor}} that matches the inline macro name or undefined if no match is found. - */ - getInlineMacroFor(name: string): InlineMacroProcessor | undefined; - - /** - * Get any {{@link Extensions/BlockProcessor}} extensions are registered to handle the specified block name appearing on the specified context. - * @param name - the {string} block name - * @param context - the context of the block: paragraph, open... (optional) - * @returns the Extension proxy object for the {{@link Extensions/BlockProcessor}} that matches the block name and context or undefined if no match is found. - */ - getBlockFor(name: string, context?: string): BlockProcessor | undefined; - - /** - * Get any {{@link Extensions/BlockMacroProcessor}} extensions are registered to handle the specified macro name. - * - * @param name - the {string} macro name - * @returns the Extension proxy object for the {{@link Extensions/BlockMacroProcessor}} that matches the macro name or undefined if no match is found. - */ - getBlockMacroFor(name: string): BlockMacroProcessor | undefined; - } - - class Processor { - constructor(config?: any); - - /** - * Creates a list block node and links it to the specified parent. - * @param parent - The parent Block (Block, Section, or Document) of this new list block. - * @param context - The list context (e.g., ulist, olist, colist, dlist) - * @param attrs - An object of attributes to set on this list block - * @returns a {List} - */ - createList(parent: AbstractBlock, context: string, attrs?: any): List; - - /** - * Creates a list item node and links it to the specified parent. - * @param parent - The parent {List} of this new list item block. - * @param text - The text of the list item. - * @returns a {ListItem} - */ - createListItem(parent: List, text?: string): ListItem; - - /** - * Creates an image block node and links it to the specified parent. - * @param parent - The parent Block of this new image block. - * @param attrs - A JSON of attributes - * @param attrs.target - the target attribute to set the source of the image. - * @param attrs.alt - the alt attribute to specify an alternative text for the image. - * @param opts - A JSON of options - * @returns an image {Block} - */ - createImageBlock(parent: AbstractBlock, attrs: Image.Attributes, opts?: Block.Options): Block; - - /** - * Creates a paragraph block and links it to the specified parent. - * @param parent - The parent Block (Block, Section, or Document) of this new block. - * @param source - The source - * @param attrs - An object of attributes to set on this block - * @param opts - An object of options to set on this block - */ - createParagraph(parent: AbstractBlock, source: string | string[], attrs?: any, opts?: Block.Options): Block; - - /** - * Creates an open block and links it to the specified parent. - * @param parent - The parent Block (Block, Section, or Document) of this new block. - * @param source - The source - * @param attrs - An object of attributes to set on this block - * @param opts - An object of options to set on this block - */ - createOpenBlock(parent: AbstractBlock, source?: string | string[], attrs?: any, opts?: Block.Options): Block; - - /** - * Creates an example block and links it to the specified parent. - * @param parent - The parent Block (Block, Section, or Document) of this new block. - * @param source - The source - * @param attrs - An object of attributes to set on this block - * @param opts - An object of options to set on this block - */ - createExampleBlock(parent: AbstractBlock, source: string | string[], attrs?: any, opts?: Block.Options): Block; - - /** - * Creates a pass block and links it to the specified parent. - * @param parent - The parent Block (Block, Section, or Document) of this new block. - * @param source - The source - * @param attrs - An object of attributes to set on this block - * @param opts - An object of options to set on this block - */ - createPassBlock(parent: AbstractBlock, source: string | string[], attrs?: any, opts?: Block.Options): Block; - - /** - * Creates a listing block and links it to the specified parent. - * @param parent - The parent Block (Block, Section, or Document) of this new block. - * @param source - The source - * @param attrs - An object of attributes to set on this block - * @param opts - An object of options to set on this block - */ - createListingBlock(parent: AbstractBlock, source: string | string[], attrs?: any, opts?: Block.Options): Block; - - /** - * Creates a literal block and links it to the specified parent. - * @param parent - The parent Block (Block, Section, or Document) of this new block. - * @param source - The source - * @param attrs - An object of attributes to set on this block - * @param opts - An object of options to set on this block - */ - createLiteralBlock(parent: AbstractBlock, source: string | string[], attrs?: any, opts?: Block.Options): Block; - - /** - * Creates a block and links it to the specified parent. - * @param parent - The parent Block (Block, Section, or Document) of this new block. - * @param context - The context name - * @param source - The source - * @param attrs - An object of attributes to set on this block - * @param opts - An object of options to set on this block - */ - createBlock(parent: AbstractBlock, context: string, source: string | string[], attrs?: any, opts?: Block.Options): Block; - - /** - * Creates an inline anchor and links it to the specified parent. - * @param parent - The parent Block (Block, Section, or Document) of this new block. - * @param text - The text - * @param opts - An object of options to set on this block - * @returns an {Inline} anchor - */ - createAnchor(parent: AbstractBlock, text: string, opts?: Inline.Options): Inline; - - /** - * Creates an inline pass and links it to the specified parent. - * @param parent - The parent Block (Block, Section, or Document) of this new block. - * @param text - The text - * @param opts - An object of options to set on this block - * @returns an {Inline} pass - */ - createInlinePass(parent: AbstractBlock, text: string, opts?: Inline.Options): Inline; - - /** - * Creates an inline node and links it to the specified parent. - * @param parent - The parent Block of this new inline node. - * @param context - The context name - * @param text - The text - * @param opts - A JSON of options - * @returns an {Inline} node - */ - createInline(parent: AbstractBlock, context: string, text: string, opts?: Inline.Options): Inline; - - /** - * Parses blocks in the content and attaches the block to the parent. - * @param parent - the parent block - * @param content - the content - * @param attrs - an object of attributes - * @returns The parent node into which the blocks are parsed. - */ - parseContent(parent: AbstractBlock, content: string | string[], attrs?: any): AbstractNode; - - /** - * Parses the attrlist String into a JSON of attributes - * @param block - the current AbstractBlock or the parent AbstractBlock if there is no current block (used for applying subs) - * @param attrlist - the list of attributes as a String - * @param opts - an optional JSON of options to control processing: - * - positional_attributes: an Array of attribute names to map positional arguments to (optional, default: []) - * - sub_attributes: enables attribute substitution on the attrlist argument (optional, default: false) - * @returns a JSON of parsed attributes - */ - parseAttributes(block: AbstractBlock, attrlist: string, opts?: ParseAttributesOptions): Attributes; - - /** - * Get the configuration JSON for this processor instance. - */ - getConfig(): Options; - } - - class ProcessorDsl { - option(key: string, value: any): void; - } - - class MacroProcessor extends Processor { - constructor(name?: string, config?: any); - - getName(): string; - - process(parent: Document, target: string, attributes?: any): any; - } - - class BlockProcessor extends Processor { - constructor(name?: string, config?: any); - - getName(): string; - - process(parent: Document, reader: Reader, attributes?: any): any; - } - - class BlockMacroProcessor extends MacroProcessor { - } - - class InlineMacroProcessor extends MacroProcessor { - } - - class InlineMacroProcessorDsl extends MacroProcessorDsl { - parseContentAs(value: string): void; - - matchFormat(value: string): void; - - match(value: RegExp): void; - - process(block: (this: InlineMacroProcessor, parent: Document, target: string, attributes: any) => void): void; - } - - class IncludeProcessor { - process(this: IncludeProcessor, document: Document, reader: Reader, target: string, attributes: any): void; - } - - class TreeProcessor extends Processor { - process(this: TreeProcessor, document: Document): any; - } - - class Postprocessor extends Processor { - process(this: Postprocessor, document: Document, output: string): any; - } - - class Preprocessor extends Processor { - process(this: Preprocessor, document: Document, reader: Reader): any; - } - - class DocinfoProcessor extends Processor { - process(this: DocinfoProcessor, document: Document): any; - } - - // OpalKlass - class BlockProcessorKlass extends OpalKlass<BlockProcessor> { - } - - class BlockMacroProcessorKlass extends OpalKlass<BlockMacroProcessor> { - } - - class InlineMacroProcessorKlass extends OpalKlass<InlineMacroProcessor> { - } - - class TreeProcessorKlass extends OpalKlass<TreeProcessor> { - } - - class IncludeProcessorKlass extends OpalKlass<IncludeProcessor> { - } - - class PostprocessorKlass extends OpalKlass<Postprocessor> { - } - - class PreprocessorKlass extends OpalKlass<Preprocessor> { - } - - class DocinfoProcessorKlass extends OpalKlass<DocinfoProcessor> { - } - - // DSL - abstract class SyntaxProcessorDsl extends ProcessorDsl { - named(name: string): void; - - defaultAttributes(value: any): void; - - positionalAttributes(value: string[]): void; - - positionalAttributes(...value: string[]): void; - - /** - * Specify how to resolve attributes. - * @param [value] - A specification to resolve attributes. - */ - resolveAttributes(value?: string | string[] | object | boolean): void; - } - - class MacroProcessorDsl extends SyntaxProcessorDsl { - /** - * Specify how to resolve attributes. - * @param [value] - A specification to resolve attributes. - */ - resolveAttributes(value?: string | string[] | object | boolean): void; - } - - class BlockProcessorDsl extends SyntaxProcessorDsl { - onContext(context: string | string[]): void; - - onContexts(...contexts: string[]): void; - - parseContentAs(value: string): void; - - process(block: (this: BlockProcessor, parent: Document, reader: Reader, attributes: any) => void): void; - } - - class BlockMacroProcessorDsl extends MacroProcessorDsl { - parseContentAs(value: string): void; - - process(block: (this: BlockMacroProcessor, parent: Document, target: string, attributes: any) => void): void; - } - - class IncludeProcessorDsl { - process(block: (this: IncludeProcessor, document: Document, reader: Reader, target: string, attributes: any) => void): void; - - handles(block: (target: string) => boolean): void; - - prefer(): void; - } - - class DocumentProcessorDsl { - prefer(): void; - } - - class TreeProcessorDsl extends DocumentProcessorDsl { - process(block: (this: TreeProcessor, document: Document) => void): void; - } - - class PostprocessorDsl extends DocumentProcessorDsl { - process(block: (this: Postprocessor, document: Document, output: string) => void): void; - } - - class PreprocessorDsl extends DocumentProcessorDsl { - process(block: (this: Preprocessor, document: Document, reader: Reader) => void): void; - } - - class DocinfoProcessorDsl extends DocumentProcessorDsl { - atLocation(location: string): void; - - process(block: (this: DocinfoProcessor, document: Document) => void): void; - } - } - - /** - * The {@link Document} class represents a parsed AsciiDoc document. - * - * Document is the root node of a parsed AsciiDoc document.<br/> - * It provides an abstract syntax tree (AST) that represents the structure of the AsciiDoc document - * from which the Document object was parsed. - * - * Although the constructor can be used to create an empty document object, - * more commonly, you'll load the document object from AsciiDoc source - * using the primary API methods on {@link Asciidoctor}. - * When using one of these APIs, you almost always want to set the safe mode to 'safe' (or 'unsafe') - * to enable all of Asciidoctor's features. - * - * <pre> - * var doc = Asciidoctor.load('= Hello, AsciiDoc!', { 'safe': 'safe' }) - * // => Asciidoctor::Document { doctype: "article", doctitle: "Hello, AsciiDoc!", blocks: 0 } - * </pre> - * - * Instances of this class can be used to extract information from the document or alter its structure. - * As such, the Document object is most often used in extensions and by integrations. - * - * The most basic usage of the Document object is to retrieve the document's title. - * - * <pre> - * var source = '= Document Title' - * var doc = asciidoctor.load(source, { 'safe': 'safe' }) - * console.log(doc.getTitle()) // 'Document Title' - * </pre> - * - * You can also use the Document object to access document attributes defined in the header, such as the author and doctype. - */ - class Document extends AbstractBlock { - /** - * Returns a JSON {Object} of references captured by the processor. - * - * @returns a JSON object of {Asciidoctor/AbstractNode} in the document. - */ - getRefs(): any; - - /** - * Returns an {Array} of {Document/ImageReference} captured by the processor. - * - * @returns an {Array} of {Document/ImageReference} in the document. - * Will return an empty array if the option "catalog_assets: true" was not defined on the processor. - */ - getImages(): Document.ImageReference[]; - - /** - * Returns an {Array} of links captured by the processor. - * - * @returns an {Array} of links in the document. - * Will return an empty array if: - * - the function was called before the document was converted - * - the option "catalog_assets: true" was not defined on the processor - */ - getLinks(): any[]; - - /** - * @returns true if the document has footnotes otherwise false - */ - hasFootnotes(): boolean; - - /** - * Returns an {Array} of {Document/Footnote} captured by the processor. - * - * @returns an {Array} of {Document/Footnote} in the document. - * Will return an empty array if the function was called before the document was converted. - */ - getFootnotes(): Document.Footnote[]; - - /** - * Returns the level-0 {Section} (i.e. the document title). - * Only stores the title, not the header attributes. - * - * @returns the level-0 {Section}. - */ - getHeader(): string; - - /** - * @param [options] - a JSON of options to control processing (default: {}) - */ - convert(options?: object): string; - - /** - * Write the output to the specified file. - * - * If the converter responds to "write", delegate the work of writing the file to that method. - * Otherwise, write the output the specified file. - */ - write(output: string, target: string): void; - - /** - * @returns the full name of the author as a String - */ - getAuthor(): string; - - getSource(): string; - - getSourceLines(): string[]; - - isNested(): boolean; - - isEmbedded(): boolean; - - hasExtensions(): boolean; - - getDoctype(): string; - - getBackend(): string; - - isBasebackend(): boolean; - - /** - * Return the document title as a {string} - * - * @returns the resolved document title as a {string} or undefined if a document title cannot be resolved - */ - getTitle(): string | undefined; - - /** - * Set the title on the document header - * - * Set the title of the document header to the specified value. - * If the header does not exist, it is first created. - * - * @param title - the String title to assign as the title of the document header - * - * @returns the new String title assigned to the document header - */ - setTitle(title: string): string; - - /** - * Resolves the primary title for the document - * - * Searches the locations to find the first non-empty value: - * - * - document-level attribute named title - * - header title (known as the document title) - * - title of the first section - * - document-level attribute named untitled-label (if use_fallback option is set) - * - * If no value can be resolved, undefined is returned. - * - * If the partition attribute is specified, the value is parsed into an {@link Asciidoctor/Document/Title} object. - * If the sanitize attribute is specified, XML elements are removed from the value. - * - * - * @returns the resolved title as a {@link Asciidoctor/Document/Title} if the partition option is passed - * or a {string} if not or undefined if no value can be resolved. - */ - getDocumentTitle(options?: Title.Options): string | Title | undefined; - - /** - * @see {@link Asciidoctor/Document#getDocumentTitle} - */ - getDoctitle(options: Title.Options): string | Title; - - /** - * Get the document catalog JSON object. - */ - getCatalog(): object; - - /** - * @see Document#getCatalog - */ - getReferences(): object; - - /** - * Get the document revision date from document header (document attribute <code>revdate</code>). - */ - getRevisionDate(): string | undefined; - - /** - * @see Document#getRevisionDate - */ - getRevdate(): string | undefined; - - /** - * Get the document revision number from document header (document attribute <code>revnumber</code>). - */ - getRevisionNumber(): string | undefined; - - /** - * Get the document revision remark from document header (document attribute <code>revremark</code>). - */ - getRevisionRemark(): string | undefined; - - /** - * Assign a value to the specified attribute in the document header. - * - * The assignment will be visible when the header attributes are restored, - * typically between processor phases (e.g., between parse and convert). - * - * @param name - The attribute name to assign - * @param value - The value to assign to the attribute (default: '') - * @param overwrite - A {boolean} indicating whether to assign the attribute - * if already present in the attributes Hash (default: true) - * - * @returns true if the assignment was performed otherwise false - */ - setHeaderAttribute(name: string, value: any, overwrite: boolean): boolean; - - /** - * Convenience method to retrieve the authors of this document as an {Array} of {Document/Author} objects. - * - * This method is backed by the author-related attributes on the document. - * - * @returns an {Array} of {Document/Author} objects. - */ - getAuthors(): Author[]; - - /** - * @returns a {@link Document/RevisionInfo} - */ - getRevisionInfo(): Document.RevisionInfo; - - /** - * @returns true if the document contains revision info, otherwise false - */ - hasRevisionInfo(): boolean; - - /** - */ - getNotitle(): boolean; - - /** - */ - getNoheader(): boolean; - - /** - */ - getNofooter(): boolean; - - /** - */ - hasHeader(): boolean; - - /** - * Replay attribute assignments at the block level - * - * <i>This method belongs to an internal API that deals with how attributes are managed by the processor.</i> - * If you understand why this group of methods are necessary, and what they do, feel free to use them. - * <strong>However, keep in mind they are subject to change at any time.</strong> - * - * @param blockAttributes - a JSON of attributes - */ - playbackAttributes(blockAttributes: Block.Attributes): void; - - /** - * Delete the specified attribute from the document if the name is not locked. - * If the attribute is locked, false is returned. - * Otherwise, the attribute is deleted. - * - * @param name - the String attribute name - * - * @returns true if the attribute was deleted, false if it was not because it's locked - */ - deleteAttribute(name: string): boolean; - - /** - * Restore the attributes to the previously saved state (attributes in header). - */ - restoreAttributes(): void; - - /** - * Determine if the attribute has been locked by being assigned in document options. - * - * @param key - The attribute key to check - * - * @returns true if the attribute is locked, false otherwise - */ - isAttributeLocked(key: string): boolean; - - /** - * Parse the AsciiDoc source stored in the {Reader} into an abstract syntax tree. - * - * If the data parameter is not nil, create a new {PreprocessorReader} and assigned it to the reader property of this object. - * Otherwise, continue with the reader that was created when the {Document} was instantiated. - * Pass the reader to {Parser.parse} to parse the source data into an abstract syntax tree. - * - * If parsing has already been performed, this method returns without performing any processing. - * - * @param [data] - The optional replacement AsciiDoc source data as a String or String Array. (default: undefined) - * - * @returns this {Document} - */ - parse(data?: string | string[]): Document; - - /** - */ - getDocinfo(): void; - - /** - * @param [docinfoLocation] - A {string} for checking docinfo extensions at a given location (head or footer) (default: head) - */ - hasDocinfoProcessors(docinfoLocation?: string): boolean; - - /** - * Increment the specified counter and store it in the block's attributes. - * - * @param counterName - the String name of the counter attribute - * @param block - the {Block} on which to save the counter - * - * @returns the next number in the sequence for the specified counter - */ - incrementAndStoreCounter(counterName: string, block: Block): number; - - /** - * Get the named counter and take the next number in the sequence. - * - * @param name - the String name of the counter - * @param seed - the initial value as a String or Integer - * - * @returns the next number in the sequence for the specified counter - */ - counter(name: string, seed: string | number): number; - - /** - * A read-only integer value indicating the level of security that should be enforced while processing this document. - * The value must be set in the Document constructor using the "safe" option. - * - * A value of 0 (UNSAFE) disables any of the security features enforced by Asciidoctor. - * - * A value of 1 (SAFE) closely parallels safe mode in AsciiDoc. - * In particular, it prevents access to files which reside outside of the parent directory of the source file and disables any macro other than the include directive. - * - * A value of 10 (SERVER) disallows the document from setting attributes that would affect the conversion of the document, - * in addition to all the security features of SafeMode.SAFE. - * For instance, this level forbids changing the backend or source-highlighter using an attribute defined in the source document header. - * This is the most fundamental level of security for server deployments (hence the name). - * - * A value of 20 (SECURE) disallows the document from attempting to read files from the file system and including the contents of them into the document, - * in addition to all the security features of SafeMode.SECURE. - * In particular, it disallows use of the include::[] directive and the embedding of binary content (data uri), stylesheets and JavaScripts referenced by the document. - * (Asciidoctor and trusted extensions may still be allowed to embed trusted content into the document). - * - * Since Asciidoctor is aiming for wide adoption, 20 (SECURE) is the default value and is recommended for server deployments. - * - * A value of 100 (PARANOID) is planned to disallow the use of passthrough macros and prevents the document from setting any known attributes, - * in addition to all the security features of SafeMode.SECURE. - * Please note that this level is not currently implemented (and therefore not enforced)! - * - * @returns An integer value indicating the level of security - */ - getSafe(): number; - - /** - * Get the Boolean AsciiDoc compatibility mode. - * Enabling this attribute activates the following syntax changes: - * - * * single quotes as constrained emphasis formatting marks - * * single backticks parsed as inline literal, formatted as monospace - * * single plus parsed as constrained, monospaced inline formatting - * * double plus parsed as constrained, monospaced inline formatting - */ - getCompatMode(): boolean; - - /** - * Get the Boolean flag that indicates whether source map information should be tracked by the parser. - */ - getSourcemap(): boolean; - - /** - * Set the Boolean flag that indicates whether source map information should be tracked by the parser. - */ - setSourcemap(value: boolean): void; - - /** - * Get the JSON of document counters. - */ - getCounters(): object; - - /** - */ - getCallouts(): Callouts; - - /** - * Get the String base directory for converting this document. - * - * Defaults to directory of the source file. - * If the source is a string, defaults to the current directory. - */ - getBaseDir(): string; - - /** - * Get the JSON of resolved options used to initialize this {Document}. - */ - getOptions(): any; - - /** - * Get the outfilesuffix defined at the end of the header. - */ - getOutfilesuffix(): string; - - /** - * Get a reference to the parent {Document} of this nested document. - */ - getParentDocument(): Document | undefined; - - /** - * Get the {Reader} associated with this document. - */ - getReader(): Reader; - - /** - * Get the {Converter} instance being used to convert the current {Document}. - */ - getConverter(): object; - - /** - * Get the activated {Extensions.Registry} associated with this document. - */ - getExtensions(): Registry; - } - - /** - */ - class AbstractBlock extends AbstractNode { - /** - * Append a block to this block's list of child blocks. - * @param block - the block to append - * @returns the parent block to which this block was appended. - */ - append(block: AbstractBlock): AbstractBlock; - - /** - * Get the String title of this Block with title substitions applied - * - * The following substitutions are applied to block and section titles: - * - * <code>specialcharacters</code>, <code>quotes</code>, <code>replacements</code>, <code>macros</code>, <code>attributes</code> and <code>post_replacements</code> - * - * @returns the converted String title for this Block, or undefined if the title is not set. - * @example - * block.title // "Foo 3^ # {two-colons} Bar(1)" - * block.getTitle(); // "Foo 3^ # :: Bar(1)" - */ - getTitle(): string|undefined; - - /** - * Set the String block title. - * @param title - The document title - * @returns returns the new String title assigned to this Block. - */ - setTitle(title: string|undefined): string; - - /** - * Generate and assign caption to block if not already assigned. - * - * If the block has a title and a caption prefix is available for this block, - * then build a caption from this information, assign it a number and store it - * to the caption attribute on the block. - * - * If a caption has already been assigned to this block, do nothing. - * - * The parts of a complete caption are: <prefix> <number>. <title> - * This partial caption represents the part the precedes the title. - * - * @param value - the String caption to assign to this block or nil to use document attribute. - * @param captionContext - the String context to use when resolving caption-related attributes. - * If not provided, the name of the context for this block is used. Only certain contexts allow the caption to be looked up. - */ - assignCaption(value?: string, captionContext?: string): void; - - /** - * Convenience method that returns the interpreted title of the Block - * with the caption prepended. - * Concatenates the value of this Block's caption instance variable and the - * return value of this Block's title method. No space is added between the - * two values. If the Block does not have a caption, the interpreted title is - * returned. - * - * @returns the converted String title prefixed with the caption, or just the - * converted String title if no caption is set - */ - getCaptionedTitle(): string; - - /** - * Get the style (block type qualifier) for this block. - * @returns the style for this block - */ - getStyle(): string; - - /** - * Set the style for this block. - * @param style - Style - */ - setStyle(style: string): void; - - /** - * Get the location in the AsciiDoc source where this block begins. - * @returns the style for this block - */ - getSourceLocation(): Cursor; - - /** - * Get the caption for this block. - * @returns the caption for this block - */ - getCaption(): string | undefined; - - /** - * Set the caption for this block. - * @param caption - Caption - */ - setCaption(caption: string): void; - - /** - * Get the level of this section or the section level in which this block resides. - * @returns he level (Integer) of this section - */ - getLevel(): number; - - /** - * Get the substitution keywords to be applied to the contents of this block. - * - * @returns the list of {string} substitution keywords associated with this block. - */ - getSubstitutions(): string[]; - - /** - * Check whether a given substitution keyword is present in the substitutions for this block. - * - * @returns whether the substitution is present on this block. - */ - hasSubstitution(): boolean; - - /** - * Remove the specified substitution keyword from the list of substitutions for this block. - * - * @returns undefined - */ - removeSubstitution(): any; - - /** - * Checks if the {@link AbstractBlock} contains any child blocks. - * @returns whether the {@link AbstractBlock} has child blocks. - */ - hasBlocks(): boolean; - - /** - * Get the list of {@link AbstractBlock} sub-blocks for this block. - * @returns a list of {@link AbstractBlock} sub-blocks - */ - getBlocks(): any[]; - - /** - * Get the converted result of the child blocks by converting the children appropriate to content model that this block supports. - * @returns the converted result of the child blocks - */ - getContent(): string; - - /** - * Get the converted content for this block. - * If the block has child blocks, the content method should cause them to be converted - * and returned as content that can be included in the parent block's template. - * @returns the converted String content for this block - */ - convert(): string; - - /** - * Query for all descendant block-level nodes in the document tree - * that match the specified selector (context, style, id, and/or role). - * If a function block is given, it's used as an additional filter. - * If no selector or function block is supplied, all block-level nodes in the tree are returned. - * @example - * doc.findBy({'context': 'section'}); - * // => { level: 0, title: "Hello, AsciiDoc!", blocks: 0 } - * // => { level: 1, title: "First Section", blocks: 1 } - * - * doc.findBy({'context': 'section'}, function (section) { return section.getLevel() === 1; }); - * // => { level: 1, title: "First Section", blocks: 1 } - * - * doc.findBy({'context': 'listing', 'style': 'source'}); - * // => { context: :listing, content_model: :verbatim, style: "source", lines: 1 } - * - * @returns a list of block-level nodes that match the filter or an empty list if no matches are found - */ - findBy(selector: Selector | ((block: AbstractBlock) => boolean | string)): AbstractBlock[]; - - /** - * Get the source line number where this block started. - * @returns the source line number where this block started - */ - getLineNumber(): number; - - /** - * Check whether this block has any child Section objects. - * Only applies to Document and Section instances. - * @returns true if this block has child Section objects, otherwise false - */ - hasSections(): boolean; - - /** - * Get the Array of child Section objects. - * Only applies to Document and Section instances. - * @returns an {Array} of {@link Section} objects - */ - getSections(): Section[]; - - /** - * Get the numeral of this block (if section, relative to parent, otherwise absolute). - * Only assigned to section if automatic section numbering is enabled. - * Only assigned to formal block (block with title) if corresponding caption attribute is present. - * If the section is an appendix, the numeral is a letter (starting with A). - * @returns the numeral - */ - getNumeral(): string; - - /** - * Set the numeral of this block. - * @param value - The numeral value - */ - setNumeral(value: string): void; - - /** - * A convenience method that checks whether the title of this block is defined. - * - * @returns a {boolean} indicating whether this block has a title. - */ - hasTitle(): boolean; - - /** - * Returns the converted alt text for this block image. - * - * @returns the {string} value of the alt attribute with XML special character and replacement substitutions applied. - */ - getAlt(): string; - } - - /** - * @description - * Methods for managing sections of AsciiDoc content in a document. - * - * @example - * <pre> - * section = asciidoctor.Section.create() - * section.setTitle('Section 1') - * section.setId('sect1') - * section.getBlocks().length // 0 - * section.getId() // "sect1" - * section.append(newBlock) - * section.getBlocks().length // 1 - * </pre> - */ - class Section extends AbstractBlock { - /** - * Create a {Section} object. - * @param [parent] - The parent AbstractBlock. If set, must be a Document or Section object (default: undefined) - * @param [level] - The Integer level of this section (default: 1 more than parent level or 1 if parent not defined) - * @param [numbered] - A Boolean indicating whether numbering is enabled for this Section (default: false) - * @param [opts] - An optional JSON of options (default: {}) - * - * @returns a new {Section} object - */ - static create(parent?: AbstractBlock, level?: number, numbered?: boolean, opts?: object): Section; - - /** - * Set the level of this section or the section level in which this block resides. - * @param level - Level (Integer) - */ - setLevel(level: number): void; - - /** - * Get the 0-based index order of this section within the parent block. - */ - getIndex(): number; - - /** - * Set the 0-based index order of this section within the parent block. - * @param index - The index order of this section - */ - setIndex(index: number): void; - - /** - * Get the section name of this section. - */ - getSectionName(): string; - - /** - * Set the section name of this section. - * @param value - The section name - */ - setSectionName(value: string): void; - - /** - * Get the flag to indicate whether this is a special section or a child of one. - */ - isSpecial(): boolean; - - /** - * Set the flag to indicate whether this is a special section or a child of one. - * @param value - A flag to indicated if this is a special section - */ - setSpecial(value: boolean): void; - - /** - * Get the state of the numbered attribute at this section (need to preserve for creating TOC). - */ - isNumbered(): boolean; - - /** - * Get the caption for this section (only relevant for appendices). - */ - getCaption(): string | undefined; - - /** - * Get the name of the Section (title) - * @see {@link AbstractBlock#getTitle} - */ - getName(): string; - } - - /** - * Methods for managing inline elements in AsciiDoc block. - */ - class Inline extends AbstractNode { - /** - * Create a new Inline element. - * @returns a new Inline element - */ - static create(parent: AbstractBlock, context: string, text?: string, opts?: any): Inline; - - /** - * Get the converted content for this inline node. - * @returns the converted String content for this inline node - */ - convert(): string; - - /** - * Get the converted String text of this Inline node, if applicable. - * @returns the converted String text for this Inline node, or undefined if not applicable for this node. - */ - getText(): string; - - /** - * Get the String sub-type (aka qualifier) of this Inline node. - * - * This value is used to distinguish different variations of the same node - * category, such as different types of anchors. - * - * @returns the string sub-type of this Inline node. - */ - getType(): string; - - /** - * Get the primary String target of this Inline node. - * - * @returns the string target of this Inline node. - */ - getTarget(): string | undefined; - - /** - * Returns the converted alt text for this inline image. - * - * @returns the {string} value of the alt attribute. - */ - getAlt(): string; - } - - /** - * Methods for managing AsciiDoc content blocks. - * - * @example - * block = Asciidoctor::Block.new(parent, :paragraph, source: '_This_ is a <test>') - * block.content - * => "<em>This</em> is a <test>" - */ - class Block extends AbstractBlock { - /** - * Create a {Block} object. - * @param parent - The parent {AbstractBlock} with a compound content model to which this {Block} will be appended. - * @param context - The context name for the type of content (e.g., "paragraph"). - * @param [opts] - a JSON of options to customize block initialization: (default: {}) - * @param opts.content_model - indicates whether blocks can be nested in this {Block} ("compound"), - * otherwise how the lines should be processed ("simple", "verbatim", "raw", "empty"). (default: "simple") - * @param opts.attributes - a JSON of attributes (key/value pairs) to assign to this {Block}. (default: {}) - * @param opts.source - a String or {Array} of raw source for this {Block}. (default: undefined) - * - * IMPORTANT: If you don't specify the `subs` option, you must explicitly call the `commit_subs` method to resolve and assign the substitutions - * to this block (which are resolved from the `subs` attribute, if specified, or the default substitutions based on this block's context). - * If you want to use the default subs for a block, pass the option `subs: "default"`. - * You can override the default subs using the `default_subs` option. - * - * @returns a new {Block} object - */ - static create(parent: AbstractBlock, context: string, opts?: object): Block; - - /** - * Get the source of this block. - * @returns the String source of this block. - */ - getSource(): string; - - /** - * Get the source lines of this block. - * @returns the String {Array} of source lines for this block. - */ - getSourceLines(): string[]; - } - - /** Methods for managing AsciiDoc tables. */ - class Table extends AbstractBlock { - /** - * Create a new Table element. - * @param parent - The parent {AbstractBlock}. - * @param attributes - a JSON of attributes - * @returns a new {Table} object - */ - static create(parent: AbstractBlock, attributes: Attributes): Table; - - /** - * Get the caption of the table. - * @returns the String caption - */ - getCaption(): string; - - /** - * Get the rows of this table. - * @returns an {Table.Rows} object with the members "head", "body" and "foot" - */ - getRows(): Table.Rows; - - /** - * Get the columns of this table. - * @returns an {Array} of {Table.Column} - */ - getColumns(): Table.Column[]; - - /** - * Get the head rows of this table. - * @returns an {Array} of {Array} of {Table.Cell}. - */ - getHeadRows(): Table.Cell[][]; - - /** - * Check if the table has a head rows. - * @returns true if the table has head rows, false otherwise. - */ - hasHeadRows(): boolean; - - /** - * Get the body rows of this table. - * @returns an {Array} of {Array} of {Table.Cell}. - */ - getBodyRows(): Table.Cell[][]; - - /** - * Check if the table has a body rows. - * @returns true if the table has body rows, false otherwise. - */ - hasBodyRows(): boolean; - - /** - * Get the foot rows of this table. - * @returns an {Array} of {Array} of {Table.Cell}. - */ - getFootRows(): Table.Cell[][]; - - /** - * Check if the table has a foot rows. - * @returns true if the table has foot rows, false otherwise. - */ - hasFootRows(): boolean; - - /** - * Check if the table has a header option set. - * @returns true if the header option is set, false otherwise. - */ - hasHeaderOption(): boolean; - - /** - * Check if the table has the footer option set. - * @returns true if the footer option is set, false otherwise. - */ - hasFooterOption(): boolean; - - /** - * Check if the table has the autowidth option set. - * @returns true if the autowidth option is set, false otherwise. - */ - hasAutowidthOption(): boolean; - - /** - * Get the number of rows in the table. - * Please note that the header and footer rows are also counted. - * @returns the number of rows in the table. - */ - getRowCount(): number; - - /** - * Set the number of rows in the table. - * Please note that the header and footer rows are also counted. - * @param value - the value - */ - setRowCount(value: number): void; - - /** - * Get the number of columns in the table. - * @returns the number of columns in the table. - */ - getColumnCount(): number; - - /** - * Set the number of columns in the table. - * @param value - the value - */ - setColumnCount(value: number): void; - } - - /** - * Methods for managing AsciiDoc tables. - */ - namespace Table { - class Rows { - /** - * head rows. - */ - head: Cell[][]; - /** - * body rows. - */ - body: Cell[][]; - /** - * foot rows. - */ - foot: Cell[][]; - - /** - * Create a new {Rows} object. - * @param head - head rows - * @param foot - foot rows - * @param body - body rows - * @returns a new {Rows} object. - */ - static create(head: Cell[][], foot: Cell[][], body: Cell[][]): Rows; - - /** - * Get head rows. - * @returns head rows. - */ - getHead(): Cell[][]; - - /** - * Get body rows. - * @returns body rows. - */ - getBody(): Cell[][]; - - /** - * Get foot rows. - * @returns foot rows. - */ - getFoot(): Cell[][]; - - /** - * Retrieve the rows grouped by section as a nested {Array}. - * Creates a 2-dimensional array of two element entries. - * The first element is the section name as a String. - * The second element is the Array of rows in that section. - * The entries are in document order (head, foot, body). - * @returns a 2-dimensional {Array} two element entries - */ - bySection(): Array<[string, Cell[][]]>; - } - - /** - * Methods to manage the columns of an AsciiDoc table. - * In particular, it keeps track of the column specs. - */ - class Column { - static create(table: Table, index: number, attributes: Attributes): Column; - - /** - * Get the column number of this cell. - * @returns the column number. - */ - getColumnNumber(): number; - - /** - * Get the width of this cell. - * @returns the width of this cell. - */ - getWidth(): string | undefined; - - /** - * Get the horizontal align of this cell. - * @returns the horizontal align of this cell. - */ - getHorizontalAlign(): string | undefined; - - /** - * Get the vertical align of this cell. - * @returns the vertical align of this cell. - */ - getVerticalAlign(): string | undefined; - - /** - * Get the style of this cell. - * @returns the style of this cell. - */ - getStyle(): string | undefined; - } - - /** - * Methods for managing the cells in an AsciiDoc table. - */ - class Cell { - /** - * Get the column span of this {@link Cell} node. - * @returns a {number} of the number of columns this cell will span (default: undefined). - */ - getColumnSpan(): number | undefined; - - /** - * Set the column span of this {@link Cell} node. - * @param value - the value - * @returns the new colspan value. - */ - setColumnSpan(value: number): number; - - /** - * Get the row span of this {@link Cell} node - * @returns a {number} of the number of rows this cell will span (default: undefined). - */ - getRowSpan(): number | undefined; - - /** - * Set the row span of this {@link Cell} node - * @param value - the value - * @returns the new rowspan value. - */ - setRowSpan(value: number): number; - - /** - * Get the content of the cell. - * This method should not be used for cells in the head row or that have the literal style. - * @returns the String content of the cell. - */ - getContent(): string; - - /** - * Get the text of the cell. - * @returns the text of the cell. - */ - getText(): string; - - /** - * Get the source of the cell. - * @returns the source of the cell. - */ - getSource(): string; - - /** - * Get the lines of the cell. - * @returns the lines of the cell. - */ - getLines(): string[]; - - /** - * Get the line number of the cell. - * @returns the line number of the cell. - */ - getLineNumber(): number | undefined; - - /** - * Get the source file of the cell. - * @returns the file of the cell. - */ - getFile(): string | undefined; - - /** - * Get the style of the cell. - * @returns the style of the cell. - */ - getStyle(): string | undefined; - - /** - * Get the column of this cell. - * @returns the column of this cell. - */ - getColumn(): Column | undefined; - - /** - * Get the width of this cell. - * @returns the width of this cell. - */ - getWidth(): string | undefined; - - /** - * Get the column width in percentage of this cell. - * @returns the column width in percentage of this cell. - */ - getColumnPercentageWidth(): string | undefined; - - /** - * Get the nested {Document} of this cell when style is 'asciidoc'. - * @returns the nested {Document} - */ - getInnerDocument(): Document | undefined; - } - } - - /** - * @description - * An abstract base class that provides state and methods for managing a node of AsciiDoc content. - * The state and methods on this class are common to all content segments in an AsciiDoc document. - */ - class AbstractNode implements Logging { - /** - * Resolve the list of comma-delimited subs against the possible options. - * - * @param subs - The comma-delimited String of substitution names or aliases. - * @param [type] - A String representing the context for which the subs are being resolved (default: 'block'). - * @param [defaults] - An Array of substitutions to start with when computing incremental substitutions (default: undefined). - * @param [subject] - The String to use in log messages to communicate the subject for which subs are being resolved (default: undefined) - * - * @returns An Array of Strings representing the substitution operation or nothing if no subs are found. - */ - resolveSubstitutions(subs: string, type?: string, defaults?: string[], subject?: string): string[] | void; - - /** - * Call {@link AbstractNode#resolveSubstitutions} for the 'block' type. - * - * @see {@link AbstractNode#resolveSubstitutions} - */ - resolveBlockSubstitutions(subs: string, defaults?: string[], subject?: string): string[] | void; - - /** - * Call {@link AbstractNode#resolveSubstitutions} for the 'inline' type with the subject set as passthrough macro. - * - * @see {@link AbstractNode#resolveSubstitutions} - */ - resolvePassSubstitutions(subs: string): string[] | void; - - /** - * Apply the specified substitutions to the text. - * - * @param text - The String or String Array of text to process; must not be undefined. - * @param [subs] - The substitutions to perform; must be a String, an Array or undefined (default: NORMAL_SUBS). - * - * @returns a String or String Array to match the type of the text argument with substitutions applied. - */ - applySubstitutions(text: string, subs?: string | string[]): string | string[]; - - /** - * @returns the String name of this node - */ - getNodeName(): string; - - /** - * @returns the JSON of attributes for this node - */ - getAttributes(): any; - - /** - * Get the value of the specified attribute. - * If the attribute is not found on this node, fallback_name is set, and this node is not the Document node, get the value of the specified attribute from the Document node. - * - * Look for the specified attribute in the attributes on this node and return the value of the attribute, if found. - * Otherwise, if fallback_name is set (default: same as name) and this node is not the Document node, look for that attribute on the Document node and return its value, if found. - * Otherwise, return the default value (default: undefined). - * - * @param name - The String of the attribute to resolve. - * @param [defaultValue] - The {Object} value to return if the attribute is not found (default: undefined). - * @param [fallbackName] - The String of the attribute to resolve on the Document if the attribute is not found on this node (default: same as name). - * - * @returns the {Object} value (typically a String) of the attribute or defaultValue if the attribute is not found. - */ - getAttribute(name: string, defaultValue?: any, fallbackName?: string): any; - - /** - * Check whether the specified attribute is present on this node. - * - * @param name - The String of the attribute to resolve. - * @returns true if the attribute is present, otherwise false - */ - hasAttribute(name: string): boolean; - - /** - * Check if the specified attribute is defined using the same logic as {AbstractNode#getAttribute}, optionally performing acomparison with the expected value if specified. - * - * Look for the specified attribute in the attributes on this node. - * If not found, fallback_name is specified (default: same as name), and this node is not the Document node, look for that attribute on the Document node. - * In either case, if the attribute is found, and the comparison value is truthy, return whether the two values match. - * Otherwise, return whether the attribute was found. - * - * @param name - The String name of the attribute to resolve. - * @param [expectedValue] - The expected Object value of the attribute (default: undefined). - * @param fallbackName - The String of the attribute to resolve on the Document if the attribute is not found on this node (default: same as name). - * - * @returns a Boolean indicating whether the attribute exists and, if a truthy comparison value is specified, whether the value of the attribute matches the comparison value. - */ - isAttribute(name: string, expectedValue?: any, fallbackName?: string): void; - - /** - * Assign the value to the attribute name for the current node. - * - * @param name - The String attribute name to assign - * @param value - The Object value to assign to the attribute (default: '') - * @param overwrite - A Boolean indicating whether to assign the attribute if currently present in the attributes JSON (default: true) - * - * @returns a Boolean indicating whether the assignment was performed - */ - setAttribute(name: string, value: any, overwrite?: boolean): boolean; - - /** - * Remove the attribute from the current node. - * @param name - The String attribute name to remove - * @returns the previous {string} value, or undefined if the attribute was not present. - */ - removeAttribute(name: string): string | undefined; - - /** - * Get the {@link Document} to which this node belongs. - * - * @returns the {@link Document} object to which this node belongs. - */ - getDocument(): Document; - - /** - * Get the {@link AbstractNode} to which this node is attached. - * - * @returns the {@link AbstractNode} object to which this node is attached, - * or undefined if this node has no parent. - */ - getParent(): AbstractNode | undefined; - - /** - * @returns true if this {AbstractNode} is an instance of {Inline} - */ - isInline(): boolean; - - /** - * @returns true if this {AbstractNode} is an instance of {Block} - */ - isBlock(): boolean; - - /** - * Checks if the role attribute is set on this node and, if an expected value is given, whether the space-separated role matches that value. - * - * @param expectedValue - The expected String value of the role (optional, default: undefined) - * - * @returns a Boolean indicating whether the role attribute is set on this node and, if an expected value is given, whether the space-separated role matches that value. - */ - isRole(expectedValue?: string): boolean; - - /** - * Retrieves the space-separated String role for this node. - * - * @returns the role as a space-separated String. - */ - getRole(): string; - - /** - * Checks if the specified role is present in the list of roles for this node. - * - * @param name - The String name of the role to find. - * - * @returns a Boolean indicating whether this node has the specified role. - */ - hasRole(name: string): boolean; - - /** - * Retrieves the String role names for this node as an Array. - * - * @returns the role names as a String {Array}, which is empty if the role attribute is absent on this node. - */ - getRoles(): string[]; - - /** - * Adds the given role directly to this node. - * - * @param name - The name of the role to add - * - * @returns a Boolean indicating whether the role was added. - */ - addRole(name: string): boolean; - - /** - * Public: Removes the given role directly from this node. - * - * @param name - The name of the role to remove - * - * @returns a Boolean indicating whether the role was removed. - */ - removeRole(name: string): boolean; - - /** - * A convenience method that checks if the reftext attribute is defined. - * @returns A Boolean indicating whether the reftext attribute is defined - */ - isReftext(): boolean; - - /** - * A convenience method that returns the value of the reftext attribute with substitutions applied. - * @returns the value of the reftext attribute with substitutions applied. - */ - getReftext(): string | undefined; - - /** - * @returns the context name for this node - */ - getContext(): string; - - /** - * @returns the String id of this node - */ - getId(): string; - - /** - * @param id - the String id of this node - */ - setId(id: string): void; - - /** - * A convenience method to check if the specified option attribute is enabled on the current node. - * Check if the option is enabled. This method simply checks to see if the <name>-option attribute is defined on the current node. - * - * @param name - the String name of the option - * - * @return a Boolean indicating whether the option has been specified - */ - isOption(name: string): boolean; - - /** - * Set the specified option on this node. - * This method sets the specified option on this node by setting the <name>-option attribute. - * - * @param name - the String name of the option - */ - setOption(name: string): void; - - /** - * Construct a reference or data URI to an icon image for the specified icon name. - * - * If the 'icon' attribute is set on this block, the name is ignored and the value of this attribute is used as the target image path. - * Otherwise, construct a target image path by concatenating the value of the 'iconsdir' attribute, - * the icon name, and the value of the 'icontype' attribute (defaulting to 'png'). - * - * The target image path is then passed through the {@link AbstractNode#getImageUri} method. - * If the 'data-uri' attribute is set on the document, the image will be safely converted to a data URI. - * - * The return value of this method can be safely used in an image tag. - * - * @param name - the String name of the icon - * - * @returns A String reference or data URI for an icon image - */ - getIconUri(name: string): string; - - /** - * Construct a URI reference to the target media. - * - * If the target media is a URI reference, then leave it untouched. - * - * The target media is resolved relative to the directory retrieved from the specified attribute key, if provided. - * - * The return value can be safely used in a media tag (img, audio, video). - * - * @param target - A String reference to the target media - * @param assetDirKey - The String attribute key used to lookup the directory where the media is located (default: 'imagesdir') - * - * @returns A String reference for the target media - */ - getMediaUri(target: string, assetDirKey?: string): string; - - /** - * Construct a URI reference or data URI to the target image. - * - * If the target image is a URI reference, then leave it untouched. - * - * The target image is resolved relative to the directory retrieved from the specified attribute key, if provided. - * - * If the 'data-uri' attribute is set on the document, and the safe mode level is less than SafeMode.SECURE, - * the image will be safely converted to a data URI by reading it from the same directory. - * If neither of these conditions are satisfied, a relative path (i.e., URL) will be returned. - * - * The return value of this method can be safely used in an image tag. - * - * @param targetImage - A String path to the target image - * @param assetDirKey - The String attribute key used to lookup the directory where the image is located (default: 'imagesdir') - * - * @returns A String reference or data URI for the target image - */ - getImageUri(targetImage: string, assetDirKey?: string): string; - - /** - * Get the {Converter} instance being used to convert the current {Document}. - */ - getConverter(): object; - - /** - */ - readContents(): void; - - /** - * Read the contents of the file at the specified path. - * This method assumes that the path is safe to read. - * It checks that the file is readable before attempting to read it - * @param path - the {string} path from which to read the contents - * @param options - a JSON of options to control processing (default: {}) - * - warn_on_failure a {boolean} that controls whether a warning is issued if the file cannot be read (default: false) - * - normalize a {boolean} that controls whether the lines are normalized and coerced to UTF-8 (default: false) - * @returns the {string} content of the file at the specified path, or undefined if the file does not exist. - */ - readAsset(path: string, options: any): string; - - /** - */ - normalizeWebPath(): void; - - /** - */ - normalizeSystemPath(): void; - - /** - */ - normalizeAssetPath(): void; - - // alias - getLogger(): Logger; - - createLogMessage(text: string, context: any): LoggerMessage; - } - - /** - * Methods for managing AsciiDoc lists (ordered, unordered and description lists). - */ - class List extends AbstractBlock { - /** - * Checks if the {@link List} contains any child {@link ListItem}. - * @returns whether the {@link List} has child {@link ListItem}. - */ - hasItems(): boolean; - - /** - * Get the Array of {@link ListItem} nodes for this {@link List}. - * @returns an Array of {@link ListItem} nodes. - */ - getItems(): ListItem[]; - } - - /** - * Methods for managing items for AsciiDoc olists, ulist, and dlists. - * - * In a description list (dlist), each item is a tuple that consists of a 2-item Array of ListItem terms and a ListItem description (i.e., [[term, term, ...], desc]. - * If a description is not set, then the second entry in the tuple is nil. - */ - class ListItem extends AbstractBlock { - /** - * Get the converted String text of this {@link ListItem} node. - * @returns the converted String text for this {@link ListItem} node. - */ - getText(): string; - - /** - * Set the String source text of this {@link ListItem} node. - * @returns the new String text assigned to this {@link ListItem} - */ - setText(text: string): string; - - /** - * A convenience method that checks whether the text of this {@link ListItem} is not blank (i.e. not undefined or empty string). - * @returns whether the text is not blank - */ - hasText(): boolean; - - /** - * Get the {string} used to mark this {@link ListItem}. - */ - getMarker(): string; - - /** - * Set the {string} used to mark this {@link ListItem}. - * - * @param marker - the {string} used to mark this {@link ListItem} - */ - setMarker(marker: string): void; - - /** - * Get the {@link List} to which this {@link ListItem} is attached. - * - * @returns the {@link List} object to which this {@link ListItem} is attached, - * or undefined if this node has no parent. - */ - getList(): List; - - /** - * @see {@link ListItem#getList} - */ - getParent(): List; - } - - namespace Html5Converter { - /** - * Create a new {@link Html5Converter}. - * @returns a {@link Html5Converter} - */ - function create(): Html5Converter; - } - - class Converter { - /** - * Converts an {AbstractNode} using the given transform. - * This method must be implemented by a concrete converter class. - * - * @param node - The concrete instance of AbstractNode to convert. - * @param [transform] - An optional String transform that hints at which transformation should be applied to this node. - * If a transform is not given, the transform is often derived from the value of the {AbstractNode#getNodeName} property. (optional, default: undefined) - * @param [opts]- An optional JSON of options hints about how to convert the node. (optional, default: undefined) - * - * @returns the {String} result. - */ - convert(node: AbstractNode, transform?: string, opts?: any): string; - } - - /** - * A built-in {Converter} implementation that generates HTML 5 output. - */ - class Html5Converter extends Converter { - } - - namespace ConverterFactory { - /** - * Create an instance of the converter bound to the specified backend. - * - * @param backend - look for a converter bound to this keyword. - * @param opts - a JSON of options to pass to the converter (default: {}) - * @returns a {Converter} instance for converting nodes in an Asciidoctor AST. - */ - function create(backend: string, opts?: any): Converter; - } - - /** - * A registry of {Converter} instances or classes keyed by backend name. - */ - interface ConverterRegistry { - [key: string]: typeof Converter|Converter; - } - - class ConverterFactory { - /** - * Register a custom converter in the global converter factory to handle conversion to the specified backends. - * If the backend value is an asterisk, the converter is used to handle any backend that does not have an explicit converter. - * - * @param converter - The {Converter} instance to register - * @param backends- A {string} {Array} of backend names that this converter should be registered to handle (optional, default: ['*']) - */ - register(converter: any, backends?: string[]): void; - - /** - * Retrieves the singleton instance of the converter factory. - * - * @param initialize - instantiate the singleton if it has not yet been instantiated. - * If this value is false and the singleton has not yet been instantiated, this method returns a fresh instance. - * @returns an instance of the {ConverterFactory}. - */ - getDefault(initialize: boolean): ConverterFactory; - - /** - * Get the converter registry. - * @returns the registry - */ - getRegistry(): ConverterRegistry; - - /** - * Lookup the custom converter registered with this factory to handle the specified backend. - * @param backend - The {string} backend name. - * @returns the {Converter} class or instance registered to convert the specified backend or undefined if no match is found. - */ - for(backend: string): typeof Converter|Converter|undefined; - } - - interface SyntaxHighlighterHighlightOptions { - [key: string]: any; - - /** - * An Object of callouts extracted from the source, indexed by line number (1-based) (optional). - */ - callouts?: any; - /** - * The String CSS mode ("class" or "inline"). - */ - css_mode?: string; - /** - * A 1-based Array of Integer line numbers to highlight (aka emphasize) (optional). - */ - highlight_lines?: number[]; - /** - * A String indicating whether lines should be numbered ("table" or "inline") (optional). - */ - number_lines?: string; - /** - * The starting Integer (1-based) line number (optional, default: 1). - */ - start_line_number?: number; - /** - * The String style (aka theme) to use for colorizing the code (optional). - */ - style?: string; - } - - interface SyntaxHighlighterDocinfoOptions { - [key: string]: any; - - /** - * A Boolean indicating whether the stylesheet should be linked instead of embedded (optional). - */ - linkcss?: boolean; - /** - * The String base URL for assets loaded from the CDN. - */ - cdn_base_url?: string; - /** - * The String '/' if the converter calling this method emits self-closing tags. - */ - self_closing_tag_slash?: string; - } - - interface SyntaxHighlighterFormatOptions { - [key: string]: any; - - /** - * A Boolean that indicates whether wrapping should be disabled (optional). - */ - nowrap?: boolean; - } - - /** - * Syntax highlighter functions - */ - interface SyntaxHighlighterFunctions { - postConstruct?: (this: SyntaxHighlighter) => any; - initialize?: (this: SyntaxHighlighter, name: string, backend: string, opts: any) => void; - format?: (this: SyntaxHighlighter, parent: Document, target: string, attributes?: any) => string; - highlight?: (this: SyntaxHighlighter, node: Block, source: string, lang: string, opts: SyntaxHighlighterHighlightOptions) => any; - handlesHighlighting?: (this: SyntaxHighlighter) => boolean; - hasDocinfo?: (this: SyntaxHighlighter, location: string) => boolean; - docinfo?: (this: SyntaxHighlighter, location: string, doc: Document, opts: SyntaxHighlighterDocinfoOptions) => string; - } - - /** - * @description - * This API is experimental and subject to change. - * - * A pluggable adapter for integrating a syntax (aka code) highlighter into AsciiDoc processing. - * - * There are two types of syntax highlighter adapters. The first performs syntax highlighting during the convert phase. - * This adapter type must define a "handlesHighlighting" method that returns true. - * The companion "highlight" method will then be called to handle the "specialcharacters" substitution for source blocks. - * - * The second assumes syntax highlighting is performed on the client (e.g., when the HTML document is loaded). - * This adapter type must define a "hasDocinfo" method that returns true. - * The companion "docinfo" method will then be called to insert markup into the output document. - * The docinfo functionality is available to both adapter types. - * - * Asciidoctor.js provides several a built-in adapter for highlight.js. - * Additional adapters can be registered using SyntaxHighlighter.register. - */ - namespace SyntaxHighlighter { - /** - * Associates the syntax highlighter class or object with the specified names. - * - * @description This API is experimental and subject to change. - * - * @param names - A {string} name or an {Array} of {string} names - * @param functions - A list of functions representing a {SyntaxHighlighter} or a {SyntaxHighlighter} class to instantiate - */ - function register(names: string | string[], functions: SyntaxHighlighterFunctions | object): void; - - // SyntaxHighlighter.for can be defined because "for" is a reserved keyword :| - - /** - * Retrieves the syntax highlighter class or object registered for the specified name. - * - * @description This API is experimental and subject to change. - * - * @param name - The {string} name of the syntax highlighter to retrieve. - * @returns the {SyntaxHighlighter} registered for this name. - */ - function get(name: string): SyntaxHighlighter | undefined; - } - - class SyntaxHighlighter { - $$name: string; - - [key: string]: any; - - super: (...params: any[]) => void; - - /** - * Format the highlighted source for inclusion in an HTML document. - * - * @param node - The source Block being processed. - * @param lang - The source language String for this Block (e.g., ruby). - * @param opts - An object of options that control syntax highlighting. - * - * @returns the highlighted source String wrapped in preformatted tags (e.g., pre and code) - */ - format(node: Block, lang: string, opts?: SyntaxHighlighterFormatOptions): string; - - /** - * Highlights the specified source when this source block is being converted. - * - * If the source contains callout marks, the caller assumes the source remains on the same lines and no closing tags are added to the end of each line. - * If the source gets shifted by one or more lines, this method must return a tuple containing the highlighted source and the number of lines by which the source was shifted. - * - * @param node - The source Block to syntax highlight. - * @param source - The raw source text String of this source block (after preprocessing). - * @param lang - The source language String specified on this block (e.g., ruby). - * @param opts - An object of options that configure the syntax highlighting. - * - * @returns the highlighted source String or a tuple of the highlighted source String and an Integer line offset. - */ - highlight(node: Block, source: string, lang: string, opts: SyntaxHighlighterHighlightOptions): any; - - /** - * Indicates whether highlighting is handled by this syntax highlighter or by the client. - * - * @returns a Boolean indicating whether the highlight method should be used to handle the "specialchars" substitution. - */ - handlesHighlighting(): boolean; - - /** - * Indicates whether this syntax highlighter has docinfo (i.e., markup) to insert into the output document at the specified location. - * Should be called by converter after main content has been converted. - * - * @param location - The String representing the location slot ("head" or "footer"). - * - * @returns a Boolean indicating whether the docinfo method should be called for this location. - */ - hasDocinfo(location: string): boolean; - - /** - * Generates docinfo markup for this syntax highlighter to insert at the specified location in the output document. - * Should be called by converter after main content has been converted. - * - * @param location - The String representing the location slot ("head" or "footer"). - * @param doc - The Document in which this syntax highlighter is being used. - * @param opts - A Object of options that configure the syntax highlighting - * @returns the String markup to insert. - */ - docinfo(location: string, doc: Document, opts: SyntaxHighlighterDocinfoOptions): string; - } - - /** - * @description - * This API is experimental and subject to change. - * - * Please note that this API is currently only available in a Node environment. - * We recommend to use a custom converter if you are running in the browser. - */ - namespace TemplateConverter { - interface CreateOptions { - [key: string]: any; - - template_engine?: string; - template_cache?: TemplateCache; - } - - interface TemplateCache { - [key: string]: any; - - /** - * a JSON of template objects keyed by template name keyed by path patterns - */ - scans?: TemplatesIndexed; - /** - * a JSON of template objects keyed by file paths - */ - templates?: TemplateIndexed; - } - - interface TemplatesIndexed { - [key: string]: TemplateIndexed; - } - - interface TemplateIndexed { - [key: string]: Template; - } - - /** - * Create a new {@link TemplateConverter}. - * @param backend - the backend name - * @param templateDirectories - a list of template directories - * @param [opts] - a JSON of options - * @param [opts.template_engine] - the name of the template engine - * @param [opts.template_cache] - a template cache - * @param [opts.template_cache.scans] - a JSON of template objects keyed by template name keyed by path patterns - * @param [opts.template_cache.templates] - a JSON of template objects keyed by file paths - * @returns a {@link TemplateConverter} - */ - function create(backend: string, templateDirectories: string[], opts?: CreateOptions): TemplateConverter; - } - - /** - * A built-in {Converter} implementation that uses templates composed in template languages - * to convert {AbstractNode} objects from a parsed AsciiDoc document tree to the backend format. - */ - class TemplateConverter extends Converter { - /** - * @returns the global cache - */ - static getCache(): TemplateConverter.TemplateCache; - - /** - * Clear the global cache. - */ - static clearCache(): void; - - /** - * Convert an {AbstractNode} to the backend format using the named template. - * - * Looks for a template that matches the value of the template name or, - * if the template name is not specified, the value of the {@see AbstractNode.getNodeName} function. - * - * @param node - the AbstractNode to convert - * @param [templateName] - the {string} name of the template to use, or the node name of the node if a template name is not specified. (optional, default: undefined) - * @param [opts] - an optional JSON that is passed as local variables to the template. (optional, default: undefined) - * @returns The {string} result from rendering the template - */ - convert(node: AbstractNode, templateName?: string, opts?: any): string; - - /** - * Checks whether there is a template registered with the specified name. - * - * @param name - the {string} template name - * @returns a {boolean} that indicates whether a template is registered for the specified template name. - */ - handles(name: string): boolean; - - /** - * Retrieves the templates that this converter manages. - * - * @returns a JSON of template objects keyed by template name - */ - getTemplates(): TemplateConverter.TemplateIndexed; - - /** - * Registers a template with this converter. - * - * @param name - the {string} template name - * @param template - the template object to register - * @returns the template object - */ - register(name: string, template: Template): TemplateConverter.TemplateIndexed; - } - - namespace Template { - interface Context { - node: AbstractNode; - opts?: Options; - helpers?: any; - } - } - - /** - * Handles template rendering. - */ - interface Template { - [key: string]: any; - - /** - * Render the template with a given context. - * @param context - A context that contains the {AbstractNode} - * @returns The resulting {string} - */ - render: (context: Template.Context) => string; - } - - namespace TemplateEngine { - interface Registry { - [key: string]: Adapter; - } - /** - * Handles template compilation. - */ - interface Adapter { - /** - * Compile a file to a {Template}. - * @param file - The file path - * @param nodeName - The node name - */ - compile: (file: string, nodeName: string) => Template; - } - } - - /** - * @description - * This API is experimental and subject to change. - * - * A global registry for integrating a template engine into the built-in template converter. - */ - class TemplateEngine { - /** - * The template engine registry. - */ - registry: TemplateEngine.Registry; - - /** - * Register a template engine adapter for the given names. - * @param names - a {string} name or an {Array} of {string} names - * @param templateEngineAdapter - a template engine adapter instance - * @example - * import fs from 'fs'; - * class DotTemplateEngineAdapter implements Asciidoctor.TemplateEngine.Adapter { - * private readonly doT: any; - * constructor() { - * this.doT = require('dot'); - * } - * compile file: string) { - * const templateFn = this.doT.template(fs.readFileSync(file, 'utf8')); - * return { - * render: templateFn - * }; - * } - * } - * processor.TemplateEngine.register('dot', new DotTemplateEngineAdapter()); - */ - static register(names: string | string[], templateEngineAdapter: TemplateEngine.Adapter): void; - } -} - -/** - * @description - * The main application interface (API) for Asciidoctor. - * This API provides methods to parse AsciiDoc content and convert it to various output formats using built-in or third-party converters. - * - * An AsciiDoc document can be as simple as a single line of content, - * though it more commonly starts with a document header that declares the document title and document attribute definitions. - * The document header is then followed by zero or more section titles, optionally nested, to organize the paragraphs, blocks, lists, etc. of the document. - * - * By default, the processor converts the AsciiDoc document to HTML 5 using a built-in converter. - * However, this behavior can be changed by specifying a different backend (e.g., +docbook+). - * A backend is a keyword for an output format (e.g., DocBook). - * That keyword, in turn, is used to select a converter, which carries out the request to convert the document to that format. - * - * @example - * asciidoctor.convertFile('document.adoc', { 'safe': 'safe' }) // Convert an AsciiDoc file - * - * asciidoctor.convert("I'm using *Asciidoctor* version {asciidoctor-version}.", { 'safe': 'safe' }) // Convert an AsciiDoc string - * - * const doc = asciidoctor.loadFile('document.adoc', { 'safe': 'safe' }) // Parse an AsciiDoc file into a document object - * - * const doc = asciidoctor.load("= Document Title\n\nfirst paragraph\n\nsecond paragraph", { 'safe': 'safe' }) // Parse an AsciiDoc string into a document object - */ -export class Asciidoctor { - /** - * Get Asciidoctor core version number. - * - * @returns the version number of Asciidoctor core. - */ - getCoreVersion(): string; - - /** - * Get Asciidoctor.js runtime environment information. - * - * @returns the runtime environment including the ioModule, the platform, the engine and the framework. - */ - getRuntime(): Asciidoctor.Runtime; - - /** - * Parse the AsciiDoc source input into an {@link Asciidoctor/Document} and convert it to the specified backend format. - * - * Accepts input as a Buffer or String. - * - * @param input - AsciiDoc input as String or Buffer - * @param options - a JSON of options to control processing (default: {}) - * @returns the {@link Asciidoctor/Document} object if the converted String is written to a file, - * otherwise the converted String - * @example - * var input = '= Hello, AsciiDoc!\n' + - * 'Guillaume Grossetie <ggrossetie@example.com>\n\n' + - * 'An introduction to http://asciidoc.org[AsciiDoc].\n\n' + - * '== First Section\n\n' + - * '* item 1\n' + - * '* item 2\n'; - * - * var html = asciidoctor.convert(input); - */ - convert(input: string | Buffer, options?: Asciidoctor.ProcessorOptions): string | Asciidoctor.Document; - - /** - * Parse the AsciiDoc source input into an {@link Asciidoctor/Document} and convert it to the specified backend format. - * - * @param filename - source filename - * @param options - a JSON of options to control processing (default: {}) - * @returns the {@link Asciidoctor/Document} object if the converted String is written to a file, - * otherwise the converted String - * @example - * var html = asciidoctor.convertFile('./document.adoc'); - */ - convertFile(filename: string, options?: Asciidoctor.ProcessorOptions): string | Asciidoctor.Document; - - /** - * Parse the AsciiDoc source input into an {@link Asciidoctor/Document} - * - * Accepts input as a Buffer or String. - * - * @param input - AsciiDoc input as String or Buffer - * @param options - a JSON of options to control processing (default: {}) - * @returns the {@link Asciidoctor/Document} object - */ - load(input: string | Buffer, options?: Asciidoctor.ProcessorOptions): Asciidoctor.Document; - - /** - * Parse the contents of the AsciiDoc source file into an {@link Asciidoctor/Document} - * - * @param filename - source filename - * @param options - a JSON of options to control processing (default: {}) - * @returns the {@link Asciidoctor/Document} object - */ - loadFile(filename: string, options?: Asciidoctor.ProcessorOptions): Asciidoctor.Document; - - /** - * Get Asciidoctor.js version number. - * - * @returns the version number of Asciidoctor.js. - */ - getVersion(): string; - - Block: typeof Asciidoctor.Block; - - Section: typeof Asciidoctor.Section; - - SafeMode: typeof Asciidoctor.SafeMode; - - Extensions: typeof Asciidoctor.Extensions; - - Html5Converter: typeof Asciidoctor.Html5Converter; - - TemplateConverter: typeof Asciidoctor.TemplateConverter; - - ConverterFactory: Asciidoctor.ConverterFactory; - - MemoryLogger: typeof Asciidoctor.MemoryLogger; - - NullLogger: typeof Asciidoctor.MemoryLogger; - - Timings: typeof Asciidoctor.Timings; - - LoggerManager: typeof Asciidoctor.LoggerManager; - - SyntaxHighlighter: typeof Asciidoctor.SyntaxHighlighter; - - TemplateEngine: typeof Asciidoctor.TemplateEngine; -} - -export default function asciidoctor(): Asciidoctor; diff --git a/node_modules/@djencks/asciidoctor-tabset-block/README.adoc b/node_modules/@djencks/asciidoctor-tabset-block/README.adoc deleted file mode 100644 index bf124d36..00000000 --- a/node_modules/@djencks/asciidoctor-tabset-block/README.adoc +++ /dev/null @@ -1,128 +0,0 @@ -= Asciidoctor {extension} Extension -:extension: tabset-block -:extension-version: 0.0.3 -:latest-antora: 3.0.0-alpha.1 -:source-repository: https://gitlab.com/djencks/asciidoctor-{extension} -:description: This asciidoctor block extension renders a description list as a tabset. - -== Description - -{description} -The original code is by Dan Allen for Couchbase, from https://github.com/couchbase/docs-site/blob/master/lib/tabs-block.js[]. - -Instead of the direct html output of the original, this extension generates open blocks. -In addition, this extension supports nested tabsets. -Most of the nested tabset support is in the related UI extension. - -Nested open blocks are needed for nested tabsets. -Therefore, for convenience, the openblock extension from https://gitlab.com/djencks/asciidoctor-openblock[] is included in this extension. - -The code is located at link:{source-repository}[] - -== Installation for Asciidoctor.js - -To use in your Asciidoctor documentation project, the simplest way is to have a package.json like this: - -[source,json,subs="+attributes"] ----- -{ - "description": "---", - "devDependencies": { - "@djencks/asciidoctor-{extension}": "^(extension-version}", - "@asciidoctor/core": "^2.2.0", - "@asciidoctor/cli": "^2.2.0" - } -} ----- - -Other than the code in the tests, I don't know how to use this in standalone asciidoctor.js. - -== Installation for Antora - -To use in your Antora documentation project, the simplest way is to have a package.json like this: - -[source,json,subs="+attributes"] ----- -{ - "description": "---", - "scripts": { - "clean-build": "npm run clean-install;npm run build", - "clean-install": "rm -rf node_modules/ .cache/ package-lock.json ;npm i --cache=.cache/npm", - "build": "node_modules/.bin/antora antora-playbook.yml --stacktrace --fetch" - }, - "devDependencies": { - "@antora/cli": "^{latest-antora}", - "@antora/site-generator-default": "^{latest-antora}", - "@djencks/asciidoctor-{extension}": "^{extension-version}" - } -} ----- - -(This will set up an isolated Antora installation and environment) - -and to include this in your `antora-playbook.yml` playbook: - -[source,yml,subs="+attributes"] ----- -asciidoc: - extensions: - - "@djencks/asciidoctor-{extension}" ----- - -== Usage - -This renders a description list inside an example block marked `[tabset]` as a tabset. - -[source,adoc] ----- -[tabset] -==== - -Tab A:: -+ --- -[discrete] -== A section - -With an explanation! --- - -Tab B:: -+ --- -[discrete] -== A section - -With no explanation? --- - -Tab C:: -+ --- -* A multilevel list -** level 2 -*** level 3 -** level 2 -* level 1 --- - -Tab D:: -+ --- -A multilevel description list:: -It's all about descriptions! -2nd Level::: -With lots of details! -3rd Level:::: -And nit-picky micro-details! --- -==== ----- - -Note the use of the `+` continuation to mark the open block as the description of the 'term'. -Note also that sections must be marked `[discrete]` as they are not part of the normal document flow. - - -== Sample code - -There is a simple example demonstrating nested tabsets and links to tabs from the same page and a different page, including links to nested tabs, at https://gitlab.com/djencks/simple-examples[] under extensions/tabset-block-extension. diff --git a/node_modules/@djencks/asciidoctor-tabset-block/README.md b/node_modules/@djencks/asciidoctor-tabset-block/README.md deleted file mode 100644 index f4b5439e..00000000 --- a/node_modules/@djencks/asciidoctor-tabset-block/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Asciidoctor tabset-block Extension -:version: 0.0.3 - -`@djencks/asciidoctor-tabset-block` provides an Asciidoctor.js extension. - -NOTE: for more complete, better formatted README, see https://gitlab.com/djencks/asciidoctor-tabset-block/-/blob/master/README.adoc. - -## Installation - -Available soon through npm as @djencks/asciidoctor-tabset-block. - -Currently available through a line like this in `package.json`: - - - "@djencks/asciidoctor-tabset-block": "https://experimental-repo.s3-us-west-1.amazonaws.com/djencks-asciidoctor-tabset-block-v0.0.1.tgz", - - -The project git repository is https://gitlab.com/djencks/asciidoctor-tabset-block - -## Usage in asciidoctor.js - -see https://gitlab.com/djencks/asciidoctor-tabset-block/-/blob/master/README.adoc - -## Usage in Antora - -see https://gitlab.com/djencks/asciidoctor-tabset-block/-/blob/master/README.adoc - -## Antora Example project - -An example project showing some uses of this extension is under extensions/tabset-block-extension in `https://gitlab.com/djencks/simple-examples`. diff --git a/node_modules/@djencks/asciidoctor-tabset-block/lib/tabset-block.js b/node_modules/@djencks/asciidoctor-tabset-block/lib/tabset-block.js deleted file mode 100644 index 49a404fb..00000000 --- a/node_modules/@djencks/asciidoctor-tabset-block/lib/tabset-block.js +++ /dev/null @@ -1,138 +0,0 @@ -'use strict' -/* Copyright (c) 2018 OpenDevise, Inc. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -/** - * Extends the AsciiDoc syntax to support a tabset. The tabset is created from - * a dlist enclosed in an example block that is marked with the tabset style. - * - * Usage: - * - * [tabset] - * ==== - * Tab A:: - * + - * -- - * Contents of tab A. - * -- - * Tab B:: - * + - * -- - * Contents of tab B. - * -- - * ==== - * - * @author Dan Allen <dan@opendevise.com> - */ - -const Opal = global.Opal -const IdSeparatorCh = '-' -const ExtraIdSeparatorsRx = /^-+|-+$|-(-)+/g -const InvalidIdCharsRx = /[^a-zA-Z0-9_]/g - -const generateId = (str, idx) => - `tabset${idx}_${str.toLowerCase().replace(InvalidIdCharsRx, IdSeparatorCh).replace(ExtraIdSeparatorsRx, '$1')}` - -var toHash = function (object) { - return object && !object.$$is_hash ? Opal.hash2(Object.keys(object), object) : object -} - -function tabsetBlock () { - this.named('tabset') - this.onContext('example') - this.process((parent, reader, attrs) => { - const tabsetIdx = parent.getDocument().counter('idx-tabset') - //find the dlist outside the current document, in an open block we'll discard. - const container = this.parseContent(this.createBlock(parent, 'open'), reader) - const sourceTabs = container.getBlocks()[0] - if (!(sourceTabs && sourceTabs.getContext() === 'dlist' && sourceTabs.getItems().length)) return - const outer = this.$create_open_block(parent, [], toHash(attrs)) - outer.addRole('tabset') - outer.addRole('is-loading') - outer['$id='](`tabset${tabsetIdx}`) - const tabs = this.createList(parent, 'ulist')//List.$new(parent, 'ulist') - tabs.addRole('tabs') - const panes = {} - sourceTabs.getItems().forEach(([[title], details]) => { - const tab = this.createListItem(parent)//ListItem.$new(tabs) - tab.addRole('tab') //Does not work unltil asciidoctor 2. - tabs.blocks.push(tab) - const id = generateId(title.getText(), tabsetIdx) - tab.text = `[[${id}]]${title.text}` - let blocks = details.getBlocks() - const numBlocks = blocks.length - if (numBlocks) { - if (blocks[0].context === 'open' && numBlocks === 1) blocks = blocks[0].getBlocks() - panes[id] = blocks.map((block) => (block.parent = parent) && block) - } - }) - outer.blocks.push(tabs) - const panesBlock = this.$create_open_block(parent, [], toHash(attrs)) - panesBlock.addRole('tabset-panes') - Object.entries(panes).forEach(([id, blocks]) => { - const paneBlock = this.$create_open_block(parent, [], toHash(attrs)) - paneBlock['$id='](`${id}_pane`) - paneBlock.addRole('tab-pane') - paneBlock.blocks.push(...blocks) - panesBlock.blocks.push(paneBlock) - }) - outer.blocks.push(panesBlock) - parent.blocks.push(outer) - }) -} - -function openblockBlock () { - const self = this - self.named('openblock') - self.onContext(['listing', 'paragraph']) - self.positionalAttributes(['role']) - self.process(function (parent, reader, attributes) { - const result = self.$create_open_block(parent, [], toHash(attributes)) - delete attributes.role - self.parseContent(result, reader, toHash(attributes)) - return result - }) -} - -//not applicable to Antora but we'll want it soon -// function tabsetDocinfoProcessor () { -// const self = this -// self.atLocation('footer')//or 'header'? -// self.process(function () { -// //return String for header/footer content (?) -// }) -// } - -// function register (registry) { -// registry.block('tabset', tabsetBlock) -// } - -module.exports.register = function (registry, config = {}) { - function doRegister (registry) { - // if (typeof registry.docinfoProcessor === 'function') { - // registry.docinfoProcessor(tabsetDocinfoProcessor) - // } else { - // console.warn('no \'docinfoProcessor\' method on alleged registry') - // } - if (typeof registry.block === 'function') { - registry.block(tabsetBlock) - registry.block(openblockBlock) - } else { - console.warn('no \'block\' method on alleged registry') - } - } - - if (typeof registry.register === 'function') { - registry.register(function () { - //Capture the global registry so processors can register more extensions. - registry = this - doRegister(registry) - }) - } else { - doRegister(registry) - } - return registry -} diff --git a/node_modules/@djencks/asciidoctor-tabset-block/package.json b/node_modules/@djencks/asciidoctor-tabset-block/package.json deleted file mode 100644 index 6757fd93..00000000 --- a/node_modules/@djencks/asciidoctor-tabset-block/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "https://experimental-repo.s3-us-west-1.amazonaws.com/djencks-asciidoctor-tabset-block-v0.0.3.tgz", - "_id": "@djencks/asciidoctor-tabset-block@0.0.3", - "_inBundle": false, - "_integrity": "sha512-u7miFmQyfiUeaaTVYIEZ14pecAmY7uQHzVzWxz/VrAyDLZrvG1eM6WGvXfRF0Nac3ou2Ll6aGSSvQt2k3XOARQ==", - "_location": "/@djencks/asciidoctor-tabset-block", - "_phantomChildren": {}, - "_requested": { - "type": "remote", - "raw": "@djencks/asciidoctor-tabset-block@https://experimental-repo.s3-us-west-1.amazonaws.com/djencks-asciidoctor-tabset-block-v0.0.3.tgz", - "name": "@djencks/asciidoctor-tabset-block", - "escapedName": "@djencks%2fasciidoctor-tabset-block", - "scope": "@djencks", - "rawSpec": "https://experimental-repo.s3-us-west-1.amazonaws.com/djencks-asciidoctor-tabset-block-v0.0.3.tgz", - "saveSpec": "https://experimental-repo.s3-us-west-1.amazonaws.com/djencks-asciidoctor-tabset-block-v0.0.3.tgz", - "fetchSpec": "https://experimental-repo.s3-us-west-1.amazonaws.com/djencks-asciidoctor-tabset-block-v0.0.3.tgz" - }, - "_requiredBy": [ - "#DEV:/" - ], - "_resolved": "https://experimental-repo.s3-us-west-1.amazonaws.com/djencks-asciidoctor-tabset-block-v0.0.3.tgz", - "_shasum": "798d7cc9c36e8feb604a6df7636394805241069e", - "_spec": "@djencks/asciidoctor-tabset-block@https://experimental-repo.s3-us-west-1.amazonaws.com/djencks-asciidoctor-tabset-block-v0.0.3.tgz", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com", - "author": { - "name": "Dan Allen", - "email": "dan@opendevise.com" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "David Jencks", - "email": "djencks@apache.org" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "asciidoctor tabset-block extension", - "devDependencies": { - "@antora/content-classifier": "^3.0.0-alpha.1", - "@asciidoctor/core": "^2.2.0", - "asciidoctor-opal-runtime": "0.3.0", - "chai": "~4.2", - "chai-cheerio": "~1.0", - "chai-fs": "~2.0", - "chai-spies": "~1.0", - "cheerio": "1.0.0-rc.3", - "dirty-chai": "~2.0", - "eslint": "~6.7", - "eslint-config-standard": "~14.1", - "eslint-plugin-import": "~2.19", - "eslint-plugin-node": "~10.0", - "eslint-plugin-promise": "~4.2", - "eslint-plugin-standard": "~4.0", - "mocha": "~6.2", - "prettier-eslint-cli": "~5.0" - }, - "files": [ - "lib/*.js" - ], - "license": "MPL-2.0", - "main": "lib/tabset-block.js", - "name": "@djencks/asciidoctor-tabset-block", - "scripts": { - "lint": "eslint lib/**/**.js test/**/**.js", - "lint-fix": "eslint lib/**/**.js test/**/**.js --fix", - "test": "mocha" - }, - "version": "0.0.3" -} diff --git a/node_modules/@hapi/bourne/LICENSE.md b/node_modules/@hapi/bourne/LICENSE.md deleted file mode 100755 index e5212973..00000000 --- a/node_modules/@hapi/bourne/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -Copyright (c) 2019-2020, Sideway Inc, and project contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -* The names of any contributors may not be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS OFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@hapi/bourne/README.md b/node_modules/@hapi/bourne/README.md deleted file mode 100755 index 6fa6a335..00000000 --- a/node_modules/@hapi/bourne/README.md +++ /dev/null @@ -1,17 +0,0 @@ -<a href="https://hapi.dev"><img src="https://raw.githubusercontent.com/hapijs/assets/master/images/family.png" width="180px" align="right" /></a> - -# @hapi/bourne - -#### JSON.parse() drop-in replacement with prototype poisoning protection. - -**bourne** is part of the **hapi** ecosystem and was designed to work seamlessly with the [hapi web framework](https://hapi.dev) and its other components (but works great on its own or with other frameworks). If you are using a different web framework and find this module useful, check out [hapi](https://hapi.dev) – they work even better together. - -### Visit the [hapi.dev](https://hapi.dev) Developer Portal for tutorials, documentation, and support - -## Useful resources - -- [Documentation and API](https://hapi.dev/family/bourne/) -- [Version status](https://hapi.dev/resources/status/#bourne) (builds, dependencies, node versions, licenses, eol) -- [Changelog](https://hapi.dev/family/bourne/changelog/) -- [Project policies](https://hapi.dev/policies/) -- [Free and commercial support options](https://hapi.dev/support/) diff --git a/node_modules/@hapi/bourne/lib/index.js b/node_modules/@hapi/bourne/lib/index.js deleted file mode 100755 index b5da747d..00000000 --- a/node_modules/@hapi/bourne/lib/index.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict'; - - -const internals = { - suspectRx: /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*\:/ -}; - - -exports.parse = function (text, ...args) { - - // Normalize arguments - - const firstOptions = typeof args[0] === 'object' && args[0]; - const reviver = args.length > 1 || !firstOptions ? args[0] : undefined; - const options = (args.length > 1 && args[1]) || firstOptions || {}; - - // Parse normally, allowing exceptions - - const obj = JSON.parse(text, reviver); - - // options.protoAction: 'error' (default) / 'remove' / 'ignore' - - if (options.protoAction === 'ignore') { - return obj; - } - - // Ignore null and non-objects - - if (!obj || - typeof obj !== 'object') { - - return obj; - } - - // Check original string for potential exploit - - if (!text.match(internals.suspectRx)) { - return obj; - } - - // Scan result for proto keys - - exports.scan(obj, options); - - return obj; -}; - - -exports.scan = function (obj, options = {}) { - - let next = [obj]; - - while (next.length) { - const nodes = next; - next = []; - - for (const node of nodes) { - if (Object.prototype.hasOwnProperty.call(node, '__proto__')) { // Avoid calling node.hasOwnProperty directly - if (options.protoAction !== 'remove') { - throw new SyntaxError('Object contains forbidden prototype property'); - } - - delete node.__proto__; - } - - for (const key in node) { - const value = node[key]; - if (value && - typeof value === 'object') { - - next.push(node[key]); - } - } - } - } -}; - - -exports.safeParse = function (text, reviver) { - - try { - return exports.parse(text, reviver); - } - catch (ignoreError) { - return null; - } -}; diff --git a/node_modules/@hapi/bourne/package.json b/node_modules/@hapi/bourne/package.json deleted file mode 100644 index cfaf7288..00000000 --- a/node_modules/@hapi/bourne/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "_from": "@hapi/bourne@^2.0.0", - "_id": "@hapi/bourne@2.0.0", - "_inBundle": false, - "_integrity": "sha512-WEezM1FWztfbzqIUbsDzFRVMxSoLy3HugVcux6KDDtTqzPsLE8NDRHfXvev66aH1i2oOKKar3/XDjbvh/OUBdg==", - "_location": "/@hapi/bourne", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@hapi/bourne@^2.0.0", - "name": "@hapi/bourne", - "escapedName": "@hapi%2fbourne", - "scope": "@hapi", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/pino-pretty" - ], - "_resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-2.0.0.tgz", - "_shasum": "5bb2193eb685c0007540ca61d166d4e1edaf918d", - "_spec": "@hapi/bourne@^2.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pino-pretty", - "bugs": { - "url": "https://github.com/hapijs/bourne/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "JSON parse with prototype poisoning protection", - "devDependencies": { - "@hapi/code": "8.x.x", - "@hapi/lab": "22.x.x", - "benchmark": "2.x.x" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/hapijs/bourne#readme", - "keywords": [ - "JSON", - "parse", - "safe", - "prototype" - ], - "license": "BSD-3-Clause", - "main": "lib/index.js", - "name": "@hapi/bourne", - "repository": { - "type": "git", - "url": "git://github.com/hapijs/bourne.git" - }, - "scripts": { - "test": "lab -a @hapi/code -t 100 -L", - "test-cov-html": "lab -a @hapi/code -r html -o coverage.html" - }, - "version": "2.0.0" -} diff --git a/node_modules/@iarna/toml/CHANGELOG.md b/node_modules/@iarna/toml/CHANGELOG.md deleted file mode 100755 index 21964f91..00000000 --- a/node_modules/@iarna/toml/CHANGELOG.md +++ /dev/null @@ -1,278 +0,0 @@ -# 2.2.5 - -* Docs: Updated benchmark results. Add fast-toml to result list. Improved benchmark layout. -* Update @sgarciac/bombadil and @ltd/j-toml in benchmarks and compliance tests. -* Dev: Some dev dep updates that shouldn't have any impact. - -# 2.2.4 - -* Bug fix: Plain date literals (not datetime) immediately followed by another statement (no whitespace or blank line) would crash. Fixes [#19](https://github.com/iarna/iarna-toml/issues/19) and [#23](https://github.com/iarna/iarna-toml/issues/23), thank you [@arnau](https://github.com/arnau) and [@jschaf](https://github.com/jschaf) for reporting this! -* Bug fix: Hex literals with lowercase Es would throw errors. (Thank you [@DaeCatt](https://github.com/DaeCatt) for this fix!) Fixed [#20](https://github.com/iarna/iarna-toml/issues/20) -* Some minor doc tweaks -* Added Node 12 and 13 to Travis. (Node 6 is failing there now, mysteriously. It works on my machine™, shipping anyway. 🙃) - -# 2.2.3 - -This release just updates the spec compliance tests and benchmark data to -better represent @ltd/j-toml. - -# 2.2.2 - -## Fixes - -* Support parsing and stringifying objects with `__proto__` properties. ([@LongTengDao](https://github.com/LongTengDao)) - -## Misc - -* Updates for spec compliance and benchmarking: - * @sgarciac/bombadil -> 2.1.0 - * toml -> 3.0.0 -* Added spec compliance and benchmarking for: - * @ltd/j-toml - -# 2.2.1 - -## Fixes - -* Fix bug where keys with names matching javascript Object methods would - error. Thanks [@LongTengDao](https://github.com/LongTengDao) for finding this! -* Fix bug where a bundled version would fail if `util.inspect` wasn't - provided. This was supposed to be guarded against, but there was a bug in - the guard. Thanks [@agriffis](https://github.com/agriffis) for finding and fixing this! - -## Misc - -* Update the version of bombadil for spec compliance and benchmarking purposes to 2.0.0 - -## Did you know? - -Node 6 and 8 are measurably slower than Node 6, 10 and 11, at least when it comes to parsing TOML! - -![](https://pbs.twimg.com/media/DtDeVjmU4AE5apz.jpg) - -# 2.2.0 - -## Features - -* Typescript: Lots of improvements to our type definitions, many many to - [@jorgegonzalez](https://github.com/jorgegonzalez) and [@momocow](https://github.com/momocow) for working through these. - -## Fixes - -* Very large integers (>52bit) are stored as BigInts on runtimes that - support them. BigInts are 128bits, but the TOML spec limits its integers - to 64bits. We now limit our integers to 64bits - as well. -* Fix a bug in stringify where control characters were being emitted as unicode chars and not escape sequences. - -## Misc - -* Moved our spec tests out to an external repo -* Improved the styling of the spec compliance comparison - -# 2.1.1 - -## Fixes - -* Oops, type defs didn't end up in the tarball, ty [@jorgegonzalez](https://github.com/jorgegonzalez)‼ - -# 2.1.0 - -## Features - -* Types for typescript support, thank you [@momocow](https://github.com/momocow)! - -## Fixes - -* stringify: always strip invalid dates. This fixes a bug where an - invalid date in an inline array would not be removed and would instead - result in an error. -* stringify: if an invalid type is found make sure it's thrown as an - error object. Previously the type name was, unhelpfully, being thrown. -* stringify: Multiline strings ending in a quote would generate invalid TOML. -* parse: Error if a signed integer has a leading zero, eg, `-01` or `+01`. -* parse: Error if \_ appears at the end of the integer part of a float, eg `1_.0`. \_ is only valid between _digits_. - -## Fun - -* BurntSushi's comprehensive TOML 0.4.0 test suite is now used in addition to our existing test suite. -* You can see exactly how the other JS TOML libraries stack up in testing - against both BurntSushi's tests and my own in the new - [TOML-SPEC-SUPPORT](TOML-SPEC-SUPPORT.md) doc. - -# 2.0.0 - -With 2.0.0, @iarna/toml supports the TOML v0.5.0 specification. TOML 0.5.0 -brings some changes: - -* Delete characters (U+007F) are not allowed in plain strings. You can include them with - escaped unicode characters, eg `\u007f`. -* Integers are specified as being 64bit unsigned values. These are - supported using `BigInt`s if you are using Node 10 or later. -* Keys may be literal strings, that is, you can use single quoted strings to - quote key names, so the following is now valid: - 'a"b"c' = 123 -* The floating point values `nan`, `inf` and `-inf` are supported. The stringifier will no - longer strip NaN, Infinity and -Infinity, instead serializing them as these new values.. -* Datetimes can separate the date and time with a space instead of a T, so - `2017-12-01T00:00:00Z` can be written as `2017-12-01 00:00:00Z`. -* Datetimes can be floating, that is, they can be represented without a timezone. - These are represented in javascript as Date objects whose `isFloating` property is true and - whose `toISOString` method will return a representation without a timezone. -* Dates without times are now supported. Dates do not have timezones. Dates - are represented in javascript as a Date object whose `isDate` property is true and - whose `toISOString` method returns just the date. -* Times without dates are now supported. Times do not have timezones. Times - are represented in javascript as a Date object whose `isTime` property is true and - whose `toISOString` method returns just the time. -* Keys can now include dots to directly address deeper structures, so `a.b = 23` is - the equivalent of `a = {b = 23}` or ```[a] -b = 23```. These can be used both as keys to regular tables and inline tables. -* Integers can now be specified in binary, octal and hexadecimal by prefixing the - number with `0b`, `0o` and `0x` respectively. It is now illegal to left - pad a decimal value with zeros. - -Some parser details were also fixed: - -* Negative zero (`-0.0`) and positive zero (`0.0`) are distinct floating point values. -* Negative integer zero (`-0`) is not distinguished from positive zero (`0`). - -# 1.7.1 - -Another 18% speed boost on our overall benchmarks! This time it came from -switching from string comparisons to integer by converting each character to -its respective code point. This also necessitated rewriting the boolean -parser to actually parse character-by-character as it should. End-of-stream -is now marked with a numeric value outside of the Unicode range, rather than -a Symbol, meaning that the parser's char property is now monomorphic. - -Bug fix, previously, `'abc''def'''` was accepted (as the value: `abcdef`). -Now it will correctly raise an error. - -Spec tests now run against bombadil as well (it fails some, which is unsurprising -given its incomplete state). - -# 1.7.0 - -This release features an overall 15% speed boost on our benchmarks. This -came from a few things: - -* Date parsing was rewritten to not use regexps, resulting in a huge speed increase. -* Strings of all kinds and bare keywords now use tight loops to collect characters when this will help. -* Regexps in general were mostly removed. This didn't result in a speed - change, but it did allow refactoring the parser to be a lot easier to - follow. -* The internal state tracking now uses a class and is constructed with a - fixed set of properties, allowing v8's optimizer to be more effective. - -In the land of new features: - -* Errors in the syntax of your TOML will now have the `fromTOML` property - set to true. This is in addition to the `line`, `col` and `pos` - properties they already have. - - The main use of this is to make it possible to distinguish between errors - in the TOML and errors in the parser code itself. This is of particular utility - when testing parse errors. - -# 1.6.0 - -**FIXES** - -* TOML.stringify: Allow toJSON properties that aren't functions, to align with JSON.stringify's behavior. -* TOML.stringify: Don't use ever render keys as literal strings. -* TOML.stringify: Don't try to escape control characters in literal strings. - -**FEATURES** - -* New Export: TOML.stringify.value, for encoding a stand alone inline value as TOML would. This produces - a TOML fragment, not a complete valid document. - -# 1.5.6 - -* String literals are NOT supported as key names. -* Accessing a shallower table after accessing it more deeply is ok and no longer crashes, eg: - ```toml - [a.b] - [a] - ``` -* Unicode characters in the reserved range now crash. -* Empty bare keys, eg `[.abc]` or `[]` now crash. -* Multiline backslash trimming supports CRs. -* Multiline post quote trimming supports CRs. -* Strings may not contain bare control chars (0x00-0x1f), except for \n, \r and \t. - -# 1.5.5 - -* Yet MORE README fixes. 🙃 - -# 1.5.4 - -* README fix - -# 1.5.3 - -* Benchmarks! -* More tests! -* More complete LICENSE information (some dev files are from other, MIT - licensed, projects, this is now more explicitly documented.) - -# 1.5.2 - -* parse: Arrays with mixed types now throw errors, per the spec. -* parse: Fix a parser bug that would result in errors when trying to parse arrays of numbers or dates - that were not separated by a space from the closing ]. -* parse: Fix a bug in the error pretty printer that resulted in errors on - the first line not getting the pretty print treatment. -* stringify: Fix long standing bug where an array of Numbers, some of which required - decimals, would be emitted in a way that parsers would treat as mixed - Integer and Float values. Now if any Numbers in an array must be - represented with a decimal then all will be emitted such that parsers will - understand them to be Float. - -# 1.5.1 - -* README fix - -# 1.5.0 - -* A brand new TOML parser, from scratch, that performs like `toml-j0.4` - without the crashes and with vastly better error messages. -* 100% test coverage for both the new parser and the existing stringifier. Some subtle bugs squashed! - -# v1.4.2 - -* Revert fallback due to its having issues with the same files. (New plan - will be to write my own.) - -# v1.4.1 - -* Depend on both `toml` and `toml-j0.4` with fallback from the latter to the - former when the latter crashes. - -# v1.4.0 - -* Ducktype dates to make them compatible with `moment` and other `Date` replacements. - -# v1.3.1 - -* Update docs with new toml module. - -# v1.3.0 - -* Switch from `toml` to `toml-j0.4`, which is between 20x and 200x faster. - (The larger the input, the faster it is compared to `toml`). - -# v1.2.0 - -* Return null when passed in null as the top level object. -* Detect and skip invalid dates and numbers - -# v1.1.0 - -* toJSON transformations are now honored (for everything except Date objects, as JSON represents them as strings). -* Undefined/null values no longer result in exceptions, they now just result in the associated key being elided. - -# v1.0.1 - -* Initial release diff --git a/node_modules/@iarna/toml/LICENSE b/node_modules/@iarna/toml/LICENSE deleted file mode 100755 index 51bcf57e..00000000 --- a/node_modules/@iarna/toml/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2016, Rebecca Turner <me@re-becca.org> - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/@iarna/toml/README.md b/node_modules/@iarna/toml/README.md deleted file mode 100755 index 1958324c..00000000 --- a/node_modules/@iarna/toml/README.md +++ /dev/null @@ -1,301 +0,0 @@ -# @iarna/toml - -Better TOML parsing and stringifying all in that familiar JSON interface. - -[![Coverage Status](https://coveralls.io/repos/github/iarna/iarna-toml/badge.svg)](https://coveralls.io/github/iarna/iarna-toml) - -# ** TOML 0.5.0 ** - -### TOML Spec Support - -The most recent version as of 2018-07-26: [v0.5.0](https://github.com/mojombo/toml/blob/master/versions/en/toml-v0.5.0.md) - -### Example - -```js -const TOML = require('@iarna/toml') -const obj = TOML.parse(`[abc] -foo = 123 -bar = [1,2,3]`) -/* obj = -{abc: {foo: 123, bar: [1,2,3]}} -*/ -const str = TOML.stringify(obj) -/* str = -[abc] -foo = 123 -bar = [ 1, 2, 3 ] -*/ -``` - -Visit the project github [for more examples](https://github.com/iarna/iarna-toml/tree/latest/examples)! - - -## Why @iarna/toml - -* See [TOML-SPEC-SUPPORT](https://shared.by.re-becca.org/misc/TOML-SPEC-SUPPORT.html) - for a comparison of which TOML features are supported by the various - Node.js TOML parsers. -* BigInt support on Node 10! -* 100% test coverage. -* Fast parsing. It's as much as 100 times - faster than `toml` and 3 times faster than `toml-j0.4`. However a recent - newcomer [`@ltd/j-toml`](https://www.npmjs.com/package/@ltd/j-toml) has - appeared with 0.5 support and astoundingly fast parsing speeds for large - text blocks. All I can say is you'll have to test your specific work loads - if you want to know which of @iarna/toml and @ltd/j-toml is faster for - you, as we currently excell in different areas. -* Careful adherence to spec. Tests go beyond simple coverage. -* Smallest parser bundle (if you use `@iarna/toml/parse-string`). -* No deps. -* Detailed and easy to read error messages‼ - -```console -> TOML.parse(src) -Error: Unexpected character, expecting string, number, datetime, boolean, inline array or inline table at row 6, col 5, pos 87: -5: "abc\"" = { abc=123,def="abc" } -6> foo=sdkfj - ^ -7: -``` - -## TOML.parse(str) → Object [(example)](https://github.com/iarna/iarna-toml/blob/latest/examples/parse.js) - -Also available with: `require('@iarna/toml/parse-string')` - -Synchronously parse a TOML string and return an object. - - -## TOML.stringify(obj) → String [(example)](https://github.com/iarna/iarna-toml/blob/latest/examples/stringify.js) - -Also available with: `require('@iarna/toml/stringify)` - -Serialize an object as TOML. - -## [your-object].toJSON - -If an object `TOML.stringify` is serializing has a `toJSON` method then it -will call it to transform the object before serializing it. This matches -the behavior of `JSON.stringify`. - -The one exception to this is that `toJSON` is not called for `Date` objects -because `JSON` represents dates as strings and TOML can represent them natively. - -[`moment`](https://www.npmjs.com/package/moment) objects are treated the -same as native `Date` objects, in this respect. - -## TOML.stringify.value(obj) -> String - -Also available with: `require('@iarna/toml/stringify').value` - -Serialize a value as TOML would. This is a fragment and not a complete -valid TOML document. - -## Promises and Streaming - -The parser provides alternative async and streaming interfaces, for times -that you're working with really absurdly big TOML files and don't want to -tie-up the event loop while it parses. - -### TOML.parse.async(str[, opts]) → Promise(Object) [(example)](https://github.com/iarna/iarna-toml/blob/latest/examples/parse-async.js) - -Also available with: `require('@iarna/toml/parse-async')` - -`opts.blocksize` is the amount text to parser per pass through the event loop. Defaults to 40kb. - -Asynchronously parse a TOML string and return a promise of the resulting object. - -### TOML.parse.stream(readable) → Promise(Object) [(example)](https://github.com/iarna/iarna-toml/blob/latest/examples/parse-stream-readable.js) - -Also available with: `require('@iarna/toml/parse-stream')` - -Given a readable stream, parse it as it feeds us data. Return a promise of the resulting object. - -### readable.pipe(TOML.parse.stream()) → Transform [(example)](https://github.com/iarna/iarna-toml/blob/latest/examples/parse-stream-through.js) - -Also available with: `require('@iarna/toml/parse-stream')` - -Returns a transform stream in object mode. When it completes, emit the -resulting object. Only one object will ever be emitted. - -## Lowlevel Interface [(example)](https://github.com/iarna/iarna-toml/blob/latest/examples/parse-lowlevel.js) [(example w/ parser debugging)](https://github.com/iarna/iarna-toml/blob/latest/examples/parse-lowlevel-debug.js) - -You construct a parser object, per TOML file you want to process: - -```js -const TOMLParser = require('@iarna/toml/lib/toml-parser.js') -const parser = new TOMLParser() -``` - -Then you call the `parse` method for each chunk as you read them, or in a -single call: - -```js -parser.parse(`hello = 'world'`) -``` - -And finally, you call the `finish` method to complete parsing and retrieve -the resulting object. - -```js -const data = parser.finish() -``` - -Both the `parse` method and `finish` method will throw if they find a -problem with the string they were given. Error objects thrown from the -parser have `pos`, `line` and `col` attributes. `TOML.parse` adds a visual -summary of where in the source string there were issues using -`parse-pretty-error` and you can too: - -```js -const prettyError = require('./parse-pretty-error.js') -const newErr = prettyError(err, sourceString) -``` - -## What's Different - -Version 2 of this module supports TOML 0.5.0. Other modules currently -published to the npm registry support 0.4.0. 0.5.0 is mostly backwards -compatible with 0.4.0, but if you have need, you can install @iarna/toml@1 -to get a version of this module that supports 0.4.0. Please see the -[CHANGELOG](CHANGELOG.md#2.0.0) for details on exactly whats changed. - -## TOML we can't do - -* `-nan` is a valid TOML value and is converted into `NaN`. There is no way to - produce `-nan` when stringifying. Stringification will produce positive `nan`. -* Detecting and erroring on invalid utf8 documents: This is because Node's - UTF8 processing converts invalid sequences into the placeholder character - and does not have facilities for reporting these as errors instead. We - _can_ detect the placeholder character, but it's valid to intentionally - include them in documents, so erroring on them is not great. -* On versions of Node < 10, very large Integer values will lose precision. - On Node >=10, bigints are used. -* Floating/local dates and times are still represented by JavaScript Date - objects, which don't actually support these concepts. The objects - returned have been modified so that you can determine what kind of thing - they are (with `isFloating`, `isDate`, `isTime` properties) and that - their ISO representation (via `toISOString`) is representative of their - TOML value. They will correctly round trip if you pass them to - `TOML.stringify`. -* Binary, hexadecimal and octal values are converted to ordinary integers and - will be decimal if you stringify them. - -## Changes - -I write a by hand, honest-to-god, -[CHANGELOG](https://github.com/iarna/iarna-toml/blob/latest/CHANGELOG.md) -for this project. It's a description of what went into a release that you -the consumer of the module could care about, not a list of git commits, so -please check it out! - -## Benchmarks - -You can run them yourself with: - -```console -$ npm run benchmark -``` - -The results below are from my desktop using Node 13.13.0. The library -versions tested were `@iarna/toml@2.2.4`, `toml-j0.4@1.1.1`, `toml@3.0.0`, -`@sgarciac/bombadil@2.3.0`, `@ltd/j-toml@0.5.107`, and `fast-toml@0.5.4`. The speed value is -megabytes-per-second that the parser can process of that document type. -Bigger is better. The percentage after average results is the margin of error. - -New here is fast-toml. fast-toml is very fast, for some datatypes, but it -also is missing most error checking demanded by the spec. For 0.4, it is -complete except for detail of multiline strings caught by the compliance -tests. Its support for 0.5 is incomplete. Check out the -[spec compliance](https://shared.by.re-becca.org/misc/TOML-SPEC-SUPPORT.html) doc -for details. - -As this table is getting a little wide, with how npm and github display it, -you can also view it seperately in the -[BENCHMARK](https://shared.by.re-becca.org/misc/BENCHMARK.html) document. - -| | @iarna/<wbr>toml | toml-j0.4 | toml | @sgarciac/<wbr>bombadil | @ltd/<wbr>j-toml | fast-toml | -| - | :---------: | :-------: | :--: | :----------------: | :---------: | :-------: | -| **Overall** | 28MB/sec<br><small>0.35%</small> | 6.5MB/sec<br><small>0.25%</small> | 0.2MB/sec<br><small>0.70%</small> | - | 35MB/sec<br><small>0.23%</small> | - | -| **Spec Example: v0.4.0** | 26MB/sec<br><small>0.37%</small> | 10MB/sec<br><small>0.27%</small> | 1MB/sec<br><small>0.42%</small> | 1.2MB/sec<br><small>0.95%</small> | 28MB/sec<br><small>0.31%</small> | - | -| **Spec Example: Hard Unicode** | 64MB/sec<br><small>0.59%</small> | 18MB/sec<br><small>0.12%</small> | 2MB/sec<br><small>0.20%</small> | 0.6MB/sec<br><small>0.53%</small> | 68MB/sec<br><small>0.31%</small> | 78MB/sec<br><small>0.28%</small> | -| **Types: Array, Inline** | 7.3MB/sec<br><small>0.60%</small> | 4MB/sec<br><small>0.16%</small> | 0.1MB/sec<br><small>0.91%</small> | 1.3MB/sec<br><small>0.81%</small> | 10MB/sec<br><small>0.35%</small> | 9MB/sec<br><small>0.16%</small> | -| **Types: Array** | 6.8MB/sec<br><small>0.19%</small> | 6.7MB/sec<br><small>0.15%</small> | 0.2MB/sec<br><small>0.79%</small> | 1.2MB/sec<br><small>0.93%</small> | 8.8MB/sec<br><small>0.47%</small> | 27MB/sec<br><small>0.21%</small> | -| **Types: Boolean,** | 21MB/sec<br><small>0.20%</small> | 9.4MB/sec<br><small>0.17%</small> | 0.2MB/sec<br><small>0.96%</small> | 1.8MB/sec<br><small>0.70%</small> | 16MB/sec<br><small>0.20%</small> | 8.4MB/sec<br><small>0.22%</small> | -| **Types: Datetime** | 18MB/sec<br><small>0.14%</small> | 11MB/sec<br><small>0.15%</small> | 0.3MB/sec<br><small>0.85%</small> | 1.6MB/sec<br><small>0.45%</small> | 9.8MB/sec<br><small>0.48%</small> | 6.5MB/sec<br><small>0.23%</small> | -| **Types: Float** | 8.8MB/sec<br><small>0.09%</small> | 5.9MB/sec<br><small>0.14%</small> | 0.2MB/sec<br><small>0.51%</small> | 2.1MB/sec<br><small>0.82%</small> | 14MB/sec<br><small>0.15%</small> | 7.9MB/sec<br><small>0.14%</small> | -| **Types: Int** | 5.9MB/sec<br><small>0.11%</small> | 4.5MB/sec<br><small>0.28%</small> | 0.1MB/sec<br><small>0.78%</small> | 1.5MB/sec<br><small>0.64%</small> | 10MB/sec<br><small>0.14%</small> | 8MB/sec<br><small>0.17%</small> | -| **Types: Literal String, 7 char** | 26MB/sec<br><small>0.29%</small> | 8.5MB/sec<br><small>0.32%</small> | 0.3MB/sec<br><small>0.84%</small> | 2.3MB/sec<br><small>1.02%</small> | 23MB/sec<br><small>0.15%</small> | 13MB/sec<br><small>0.15%</small> | -| **Types: Literal String, 92 char** | 46MB/sec<br><small>0.19%</small> | 11MB/sec<br><small>0.20%</small> | 0.3MB/sec<br><small>0.56%</small> | 12MB/sec<br><small>0.92%</small> | 101MB/sec<br><small>0.17%</small> | 75MB/sec<br><small>0.29%</small> | -| **Types: Literal String, Multiline, 1079 char** | 22MB/sec<br><small>0.42%</small> | 6.7MB/sec<br><small>0.55%</small> | 0.9MB/sec<br><small>0.78%</small> | 44MB/sec<br><small>1.00%</small> | 350MB/sec<br><small>0.16%</small> | 636MB/sec<br><small>0.16%</small> | -| **Types: Basic String, 7 char** | 25MB/sec<br><small>0.15%</small> | 7.3MB/sec<br><small>0.18%</small> | 0.2MB/sec<br><small>0.96%</small> | 2.2MB/sec<br><small>1.09%</small> | 14MB/sec<br><small>0.16%</small> | 12MB/sec<br><small>0.22%</small> | -| **Types: Basic String, 92 char** | 43MB/sec<br><small>0.30%</small> | 7.2MB/sec<br><small>0.16%</small> | 0.1MB/sec<br><small>4.04%</small> | 12MB/sec<br><small>1.33%</small> | 71MB/sec<br><small>0.19%</small> | 70MB/sec<br><small>0.23%</small> | -| **Types: Basic String, 1079 char** | 24MB/sec<br><small>0.45%</small> | 5.8MB/sec<br><small>0.17%</small> | 0.1MB/sec<br><small>3.64%</small> | 44MB/sec<br><small>1.05%</small> | 93MB/sec<br><small>0.29%</small> | 635MB/sec<br><small>0.28%</small> | -| **Types: Table, Inline** | 9.7MB/sec<br><small>0.10%</small> | 5.5MB/sec<br><small>0.22%</small> | 0.1MB/sec<br><small>0.87%</small> | 1.4MB/sec<br><small>1.18%</small> | 8.7MB/sec<br><small>0.60%</small> | 8.7MB/sec<br><small>0.22%</small> | -| **Types: Table** | 7.1MB/sec<br><small>0.14%</small> | 5.6MB/sec<br><small>0.42%</small> | 0.1MB/sec<br><small>0.65%</small> | 1.4MB/sec<br><small>1.11%</small> | 7.4MB/sec<br><small>0.70%</small> | 18MB/sec<br><small>0.20%</small> | -| **Scaling: Array, Inline, 1000 elements** | 40MB/sec<br><small>0.21%</small> | 2.4MB/sec<br><small>0.19%</small> | 0.1MB/sec<br><small>0.35%</small> | 1.6MB/sec<br><small>1.02%</small> | 17MB/sec<br><small>0.15%</small> | 32MB/sec<br><small>0.16%</small> | -| **Scaling: Array, Nested, 1000 deep** | 2MB/sec<br><small>0.15%</small> | 1.7MB/sec<br><small>0.26%</small> | 0.3MB/sec<br><small>0.58%</small> | - | 1.8MB/sec<br><small>0.74%</small> | 13MB/sec<br><small>0.20%</small> | -| **Scaling: Literal String, 40kb** | 61MB/sec<br><small>0.18%</small> | 10MB/sec<br><small>0.15%</small> | 3MB/sec<br><small>0.84%</small> | 12MB/sec<br><small>0.51%</small> | 551MB/sec<br><small>0.44%</small> | 19kMB/sec<br><small>0.19%</small> | -| **Scaling: Literal String, Multiline, 40kb** | 62MB/sec<br><small>0.16%</small> | 5MB/sec<br><small>0.45%</small> | 0.2MB/sec<br><small>1.70%</small> | 11MB/sec<br><small>0.74%</small> | 291MB/sec<br><small>0.24%</small> | 21kMB/sec<br><small>0.22%</small> | -| **Scaling: Basic String, Multiline, 40kb** | 62MB/sec<br><small>0.18%</small> | 5.8MB/sec<br><small>0.38%</small> | 2.9MB/sec<br><small>0.86%</small> | 11MB/sec<br><small>0.41%</small> | 949MB/sec<br><small>0.44%</small> | 26kMB/sec<br><small>0.16%</small> | -| **Scaling: Basic String, 40kb** | 59MB/sec<br><small>0.20%</small> | 6.3MB/sec<br><small>0.17%</small> | 0.2MB/sec<br><small>1.95%</small> | 12MB/sec<br><small>0.44%</small> | 508MB/sec<br><small>0.35%</small> | 18kMB/sec<br><small>0.15%</small> | -| **Scaling: Table, Inline, 1000 elements** | 28MB/sec<br><small>0.12%</small> | 8.2MB/sec<br><small>0.19%</small> | 0.3MB/sec<br><small>0.89%</small> | 2.3MB/sec<br><small>1.14%</small> | 5.3MB/sec<br><small>0.24%</small> | 13MB/sec<br><small>0.20%</small> | -| **Scaling: Table, Inline, Nested, 1000 deep** | 7.8MB/sec<br><small>0.28%</small> | 5MB/sec<br><small>0.20%</small> | 0.1MB/sec<br><small>0.84%</small> | - | 3.2MB/sec<br><small>0.52%</small> | 10MB/sec<br><small>0.23%</small> | - -## Tests - -The test suite is maintained at 100% coverage: [![Coverage Status](https://coveralls.io/repos/github/iarna/iarna-toml/badge.svg)](https://coveralls.io/github/iarna/iarna-toml) - -The spec was carefully hand converted into a series of test framework -independent (and mostly language independent) assertions, as pairs of TOML -and YAML files. You can find those files here: -[spec-test](https://github.com/iarna/iarna-toml/blob/latest/test/spec-test/). -A number of examples of invalid Unicode were also written, but are difficult -to make use of in Node.js where Unicode errors are silently hidden. You can -find those here: [spec-test-disabled](https://github.com/iarna/iarna-toml/blob/latest/test/spec-test-disabled/). - -Further tests were written to increase coverage to 100%, these may be more -implementation specific, but they can be found in [coverage](https://github.com/iarna/iarna-toml/blob/latest/test/coverage.js) and -[coverage-error](https://github.com/iarna/iarna-toml/blob/latest/test/coverage-error.js). - -I've also written some quality assurance style tests, which don't contribute -to coverage but do cover scenarios that could easily be problematic for some -implementations can be found in: -[test/qa.js](https://github.com/iarna/iarna-toml/blob/latest/test/qa.js) and -[test/qa-error.js](https://github.com/iarna/iarna-toml/blob/latest/test/qa-error.js). - -All of the official example files from the TOML spec are run through this -parser and compared to the official YAML files when available. These files are from the TOML spec as of: -[357a4ba6](https://github.com/toml-lang/toml/tree/357a4ba6782e48ff26e646780bab11c90ed0a7bc) -and specifically are: - -* [github.com/toml-lang/toml/tree/357a4ba6/examples](https://github.com/toml-lang/toml/tree/357a4ba6782e48ff26e646780bab11c90ed0a7bc/examples) -* [github.com/toml-lang/toml/tree/357a4ba6/tests](https://github.com/toml-lang/toml/tree/357a4ba6782e48ff26e646780bab11c90ed0a7bc/tests) - -The stringifier is tested by round-tripping these same files, asserting that -`TOML.parse(sourcefile)` deepEqual -`TOML.parse(TOML.stringify(TOML.parse(sourcefile))`. This is done in -[test/roundtrip-examples.js](https://github.com/iarna/iarna-toml/blob/latest/test/round-tripping.js) -There are also some tests written to complete coverage from stringification in: -[test/stringify.js](https://github.com/iarna/iarna-toml/blob/latest/test/stringify.js) - -Tests for the async and streaming interfaces are in [test/async.js](https://github.com/iarna/iarna-toml/blob/latest/test/async.js) and [test/stream.js](https://github.com/iarna/iarna-toml/blob/latest/test/stream.js) respectively. - -Tests for the parsers debugging mode live in [test/devel.js](https://github.com/iarna/iarna-toml/blob/latest/test/devel.js). - -And finally, many more stringification tests were borrowed from [@othiym23](https://github.com/othiym23)'s -[toml-stream](https://npmjs.com/package/toml-stream) module. They were fetched as of -[b6f1e26b572d49742d49fa6a6d11524d003441fa](https://github.com/othiym23/toml-stream/tree/b6f1e26b572d49742d49fa6a6d11524d003441fa/test) and live in -[test/toml-stream](https://github.com/iarna/iarna-toml/blob/latest/test/toml-stream/). - -## Improvements to make - -* In stringify: - * Any way to produce comments. As a JSON stand-in I'm not too worried - about this. That said, a document orientated fork is something I'd like - to look at eventually… - * Stringification could use some work on its error reporting. It reports - _what's_ wrong, but not where in your data structure it was. -* Further optimize the parser: - * There are some debugging assertions left in the main parser, these should be moved to a subclass. - * Make the whole debugging parser thing work as a mixin instead of as a superclass. diff --git a/node_modules/@iarna/toml/index.d.ts b/node_modules/@iarna/toml/index.d.ts deleted file mode 100755 index d37e2b65..00000000 --- a/node_modules/@iarna/toml/index.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Transform } from "stream"; - -type JsonArray = boolean[] | number[] | string[] | JsonMap[] | Date[] -type AnyJson = boolean | number | string | JsonMap | Date | JsonArray | JsonArray[] - -interface JsonMap { - [key: string]: AnyJson; -} - -interface ParseOptions { - /** - * The amount text to parser per pass through the event loop. Defaults to 40kb (`40000`). - */ - blocksize: number -} - -interface FuncParse { - /** - * Synchronously parse a TOML string and return an object. - */ - (toml: string): JsonMap - - /** - * Asynchronously parse a TOML string and return a promise of the resulting object. - */ - async (toml: string, options?: ParseOptions): Promise<JsonMap> - - /** - * Given a readable stream, parse it as it feeds us data. Return a promise of the resulting object. - */ - stream (readable: NodeJS.ReadableStream): Promise<JsonMap> - stream (): Transform -} - -interface FuncStringify { - /** - * Serialize an object as TOML. - * - * If an object `TOML.stringify` is serializing has a `toJSON` method - * then it will call it to transform the object before serializing it. - * This matches the behavior of JSON.stringify. - * - * The one exception to this is that `toJSON` is not called for `Date` objects - * because JSON represents dates as strings and TOML can represent them natively. - * - * `moment` objects are treated the same as native `Date` objects, in this respect. - */ - (obj: JsonMap): string - - /** - * Serialize a value as TOML would. This is a fragment and not a complete valid TOML document. - */ - value (any: AnyJson): string -} - -export const parse: FuncParse -export const stringify: FuncStringify diff --git a/node_modules/@iarna/toml/lib/create-date.js b/node_modules/@iarna/toml/lib/create-date.js deleted file mode 100755 index 469fc656..00000000 --- a/node_modules/@iarna/toml/lib/create-date.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict' -const f = require('./format-num.js') -const DateTime = global.Date - -class Date extends DateTime { - constructor (value) { - super(value) - this.isDate = true - } - toISOString () { - return `${this.getUTCFullYear()}-${f(2, this.getUTCMonth() + 1)}-${f(2, this.getUTCDate())}` - } -} - -module.exports = value => { - const date = new Date(value) - /* istanbul ignore if */ - if (isNaN(date)) { - throw new TypeError('Invalid Datetime') - } else { - return date - } -} diff --git a/node_modules/@iarna/toml/lib/create-datetime-float.js b/node_modules/@iarna/toml/lib/create-datetime-float.js deleted file mode 100755 index 6fb30ac7..00000000 --- a/node_modules/@iarna/toml/lib/create-datetime-float.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict' -const f = require('./format-num.js') - -class FloatingDateTime extends Date { - constructor (value) { - super(value + 'Z') - this.isFloating = true - } - toISOString () { - const date = `${this.getUTCFullYear()}-${f(2, this.getUTCMonth() + 1)}-${f(2, this.getUTCDate())}` - const time = `${f(2, this.getUTCHours())}:${f(2, this.getUTCMinutes())}:${f(2, this.getUTCSeconds())}.${f(3, this.getUTCMilliseconds())}` - return `${date}T${time}` - } -} - -module.exports = value => { - const date = new FloatingDateTime(value) - /* istanbul ignore if */ - if (isNaN(date)) { - throw new TypeError('Invalid Datetime') - } else { - return date - } -} diff --git a/node_modules/@iarna/toml/lib/create-datetime.js b/node_modules/@iarna/toml/lib/create-datetime.js deleted file mode 100755 index 47deded0..00000000 --- a/node_modules/@iarna/toml/lib/create-datetime.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict' -module.exports = value => { - const date = new Date(value) - /* istanbul ignore if */ - if (isNaN(date)) { - throw new TypeError('Invalid Datetime') - } else { - return date - } -} diff --git a/node_modules/@iarna/toml/lib/create-time.js b/node_modules/@iarna/toml/lib/create-time.js deleted file mode 100755 index 190c767e..00000000 --- a/node_modules/@iarna/toml/lib/create-time.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict' -const f = require('./format-num.js') - -class Time extends Date { - constructor (value) { - super(`0000-01-01T${value}Z`) - this.isTime = true - } - toISOString () { - return `${f(2, this.getUTCHours())}:${f(2, this.getUTCMinutes())}:${f(2, this.getUTCSeconds())}.${f(3, this.getUTCMilliseconds())}` - } -} - -module.exports = value => { - const date = new Time(value) - /* istanbul ignore if */ - if (isNaN(date)) { - throw new TypeError('Invalid Datetime') - } else { - return date - } -} diff --git a/node_modules/@iarna/toml/lib/format-num.js b/node_modules/@iarna/toml/lib/format-num.js deleted file mode 100755 index 6addf086..00000000 --- a/node_modules/@iarna/toml/lib/format-num.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict' -module.exports = (d, num) => { - num = String(num) - while (num.length < d) num = '0' + num - return num -} diff --git a/node_modules/@iarna/toml/lib/parser-debug.js b/node_modules/@iarna/toml/lib/parser-debug.js deleted file mode 100755 index e222f276..00000000 --- a/node_modules/@iarna/toml/lib/parser-debug.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict' -const Parser = require('./parser.js') -const util = require('util') - -const dump = _ => util.inspect(_, {colors: true, depth: 10, breakLength: Infinity}) -class DebugParser extends Parser { - stateName (state) { - // istanbul ignore next - return (state.parser && state.parser.name) || state.name || ('anonymous') - } - runOne () { - const callStack = this.stack.concat(this.state).map(_ => this.stateName(_)).join(' <- ') - console.log('RUN', callStack, dump({line: this.line, col: this.col, char: this.char, ret: this.state.returned})) - return super.runOne() - } - finish () { - const obj = super.finish() - // istanbul ignore if - if (this.stack.length !== 0) { - throw new Parser.Error('All states did not return by end of stream') - } - return obj - } - callStack () { - const callStack = this.stack.map(_ => this.stateName(_)).join(' ').replace(/\S/g, ' ') - return callStack ? callStack + ' ' : '' - } - next (fn) { - console.log(' ', this.callStack(), 'NEXT', this.stateName(fn)) - return super.next(fn) - } - goto (fn) { - console.log(' ', this.callStack(), 'GOTO', this.stateName(fn)) - super.next(fn) - return false - } - call (fn, returnWith) { - console.log(' ', this.callStack(), 'CALL', fn.name, returnWith ? '-> ' + returnWith.name : '') - if (returnWith) super.next(returnWith) - this.stack.push(this.state) - this.state = {parser: fn, buf: '', returned: null} - } - callNow (fn, returnWith) { - console.log(' ', this.callStack(), 'CALLNOW', fn.name, returnWith ? '-> ' + returnWith.name : '') - if (returnWith) super.next(returnWith) - this.stack.push(this.state) - this.state = {parser: fn, buf: '', returned: null} - return false - } - return (value) { - console.log(' ', this.callStack(), 'RETURN') - return super.return(value) - } - returnNow (value) { - console.log(' ', this.callStack(), 'RETURNNOW') - super.return(value) - return false - } -} -module.exports = DebugParser diff --git a/node_modules/@iarna/toml/lib/parser.js b/node_modules/@iarna/toml/lib/parser.js deleted file mode 100755 index 398856bb..00000000 --- a/node_modules/@iarna/toml/lib/parser.js +++ /dev/null @@ -1,127 +0,0 @@ -'use strict' -const ParserEND = 0x110000 -class ParserError extends Error { - /* istanbul ignore next */ - constructor (msg, filename, linenumber) { - super('[ParserError] ' + msg, filename, linenumber) - this.name = 'ParserError' - this.code = 'ParserError' - if (Error.captureStackTrace) Error.captureStackTrace(this, ParserError) - } -} -class State { - constructor (parser) { - this.parser = parser - this.buf = '' - this.returned = null - this.result = null - this.resultTable = null - this.resultArr = null - } -} -class Parser { - constructor () { - this.pos = 0 - this.col = 0 - this.line = 0 - this.obj = {} - this.ctx = this.obj - this.stack = [] - this._buf = '' - this.char = null - this.ii = 0 - this.state = new State(this.parseStart) - } - - parse (str) { - /* istanbul ignore next */ - if (str.length === 0 || str.length == null) return - - this._buf = String(str) - this.ii = -1 - this.char = -1 - let getNext - while (getNext === false || this.nextChar()) { - getNext = this.runOne() - } - this._buf = null - } - nextChar () { - if (this.char === 0x0A) { - ++this.line - this.col = -1 - } - ++this.ii - this.char = this._buf.codePointAt(this.ii) - ++this.pos - ++this.col - return this.haveBuffer() - } - haveBuffer () { - return this.ii < this._buf.length - } - runOne () { - return this.state.parser.call(this, this.state.returned) - } - finish () { - this.char = ParserEND - let last - do { - last = this.state.parser - this.runOne() - } while (this.state.parser !== last) - - this.ctx = null - this.state = null - this._buf = null - - return this.obj - } - next (fn) { - /* istanbul ignore next */ - if (typeof fn !== 'function') throw new ParserError('Tried to set state to non-existent state: ' + JSON.stringify(fn)) - this.state.parser = fn - } - goto (fn) { - this.next(fn) - return this.runOne() - } - call (fn, returnWith) { - if (returnWith) this.next(returnWith) - this.stack.push(this.state) - this.state = new State(fn) - } - callNow (fn, returnWith) { - this.call(fn, returnWith) - return this.runOne() - } - return (value) { - /* istanbul ignore next */ - if (this.stack.length === 0) throw this.error(new ParserError('Stack underflow')) - if (value === undefined) value = this.state.buf - this.state = this.stack.pop() - this.state.returned = value - } - returnNow (value) { - this.return(value) - return this.runOne() - } - consume () { - /* istanbul ignore next */ - if (this.char === ParserEND) throw this.error(new ParserError('Unexpected end-of-buffer')) - this.state.buf += this._buf[this.ii] - } - error (err) { - err.line = this.line - err.col = this.col - err.pos = this.pos - return err - } - /* istanbul ignore next */ - parseStart () { - throw new ParserError('Must declare a parseStart method') - } -} -Parser.END = ParserEND -Parser.Error = ParserError -module.exports = Parser diff --git a/node_modules/@iarna/toml/lib/toml-parser.js b/node_modules/@iarna/toml/lib/toml-parser.js deleted file mode 100755 index ebcaec8c..00000000 --- a/node_modules/@iarna/toml/lib/toml-parser.js +++ /dev/null @@ -1,1379 +0,0 @@ -'use strict' -/* eslint-disable no-new-wrappers, no-eval, camelcase, operator-linebreak */ -module.exports = makeParserClass(require('./parser.js')) -module.exports.makeParserClass = makeParserClass - -class TomlError extends Error { - constructor (msg) { - super(msg) - this.name = 'TomlError' - /* istanbul ignore next */ - if (Error.captureStackTrace) Error.captureStackTrace(this, TomlError) - this.fromTOML = true - this.wrapped = null - } -} -TomlError.wrap = err => { - const terr = new TomlError(err.message) - terr.code = err.code - terr.wrapped = err - return terr -} -module.exports.TomlError = TomlError - -const createDateTime = require('./create-datetime.js') -const createDateTimeFloat = require('./create-datetime-float.js') -const createDate = require('./create-date.js') -const createTime = require('./create-time.js') - -const CTRL_I = 0x09 -const CTRL_J = 0x0A -const CTRL_M = 0x0D -const CTRL_CHAR_BOUNDARY = 0x1F // the last non-character in the latin1 region of unicode, except DEL -const CHAR_SP = 0x20 -const CHAR_QUOT = 0x22 -const CHAR_NUM = 0x23 -const CHAR_APOS = 0x27 -const CHAR_PLUS = 0x2B -const CHAR_COMMA = 0x2C -const CHAR_HYPHEN = 0x2D -const CHAR_PERIOD = 0x2E -const CHAR_0 = 0x30 -const CHAR_1 = 0x31 -const CHAR_7 = 0x37 -const CHAR_9 = 0x39 -const CHAR_COLON = 0x3A -const CHAR_EQUALS = 0x3D -const CHAR_A = 0x41 -const CHAR_E = 0x45 -const CHAR_F = 0x46 -const CHAR_T = 0x54 -const CHAR_U = 0x55 -const CHAR_Z = 0x5A -const CHAR_LOWBAR = 0x5F -const CHAR_a = 0x61 -const CHAR_b = 0x62 -const CHAR_e = 0x65 -const CHAR_f = 0x66 -const CHAR_i = 0x69 -const CHAR_l = 0x6C -const CHAR_n = 0x6E -const CHAR_o = 0x6F -const CHAR_r = 0x72 -const CHAR_s = 0x73 -const CHAR_t = 0x74 -const CHAR_u = 0x75 -const CHAR_x = 0x78 -const CHAR_z = 0x7A -const CHAR_LCUB = 0x7B -const CHAR_RCUB = 0x7D -const CHAR_LSQB = 0x5B -const CHAR_BSOL = 0x5C -const CHAR_RSQB = 0x5D -const CHAR_DEL = 0x7F -const SURROGATE_FIRST = 0xD800 -const SURROGATE_LAST = 0xDFFF - -const escapes = { - [CHAR_b]: '\u0008', - [CHAR_t]: '\u0009', - [CHAR_n]: '\u000A', - [CHAR_f]: '\u000C', - [CHAR_r]: '\u000D', - [CHAR_QUOT]: '\u0022', - [CHAR_BSOL]: '\u005C' -} - -function isDigit (cp) { - return cp >= CHAR_0 && cp <= CHAR_9 -} -function isHexit (cp) { - return (cp >= CHAR_A && cp <= CHAR_F) || (cp >= CHAR_a && cp <= CHAR_f) || (cp >= CHAR_0 && cp <= CHAR_9) -} -function isBit (cp) { - return cp === CHAR_1 || cp === CHAR_0 -} -function isOctit (cp) { - return (cp >= CHAR_0 && cp <= CHAR_7) -} -function isAlphaNumQuoteHyphen (cp) { - return (cp >= CHAR_A && cp <= CHAR_Z) - || (cp >= CHAR_a && cp <= CHAR_z) - || (cp >= CHAR_0 && cp <= CHAR_9) - || cp === CHAR_APOS - || cp === CHAR_QUOT - || cp === CHAR_LOWBAR - || cp === CHAR_HYPHEN -} -function isAlphaNumHyphen (cp) { - return (cp >= CHAR_A && cp <= CHAR_Z) - || (cp >= CHAR_a && cp <= CHAR_z) - || (cp >= CHAR_0 && cp <= CHAR_9) - || cp === CHAR_LOWBAR - || cp === CHAR_HYPHEN -} -const _type = Symbol('type') -const _declared = Symbol('declared') - -const hasOwnProperty = Object.prototype.hasOwnProperty -const defineProperty = Object.defineProperty -const descriptor = {configurable: true, enumerable: true, writable: true, value: undefined} - -function hasKey (obj, key) { - if (hasOwnProperty.call(obj, key)) return true - if (key === '__proto__') defineProperty(obj, '__proto__', descriptor) - return false -} - -const INLINE_TABLE = Symbol('inline-table') -function InlineTable () { - return Object.defineProperties({}, { - [_type]: {value: INLINE_TABLE} - }) -} -function isInlineTable (obj) { - if (obj === null || typeof (obj) !== 'object') return false - return obj[_type] === INLINE_TABLE -} - -const TABLE = Symbol('table') -function Table () { - return Object.defineProperties({}, { - [_type]: {value: TABLE}, - [_declared]: {value: false, writable: true} - }) -} -function isTable (obj) { - if (obj === null || typeof (obj) !== 'object') return false - return obj[_type] === TABLE -} - -const _contentType = Symbol('content-type') -const INLINE_LIST = Symbol('inline-list') -function InlineList (type) { - return Object.defineProperties([], { - [_type]: {value: INLINE_LIST}, - [_contentType]: {value: type} - }) -} -function isInlineList (obj) { - if (obj === null || typeof (obj) !== 'object') return false - return obj[_type] === INLINE_LIST -} - -const LIST = Symbol('list') -function List () { - return Object.defineProperties([], { - [_type]: {value: LIST} - }) -} -function isList (obj) { - if (obj === null || typeof (obj) !== 'object') return false - return obj[_type] === LIST -} - -// in an eval, to let bundlers not slurp in a util proxy -let _custom -try { - const utilInspect = eval("require('util').inspect") - _custom = utilInspect.custom -} catch (_) { - /* eval require not available in transpiled bundle */ -} -/* istanbul ignore next */ -const _inspect = _custom || 'inspect' - -class BoxedBigInt { - constructor (value) { - try { - this.value = global.BigInt.asIntN(64, value) - } catch (_) { - /* istanbul ignore next */ - this.value = null - } - Object.defineProperty(this, _type, {value: INTEGER}) - } - isNaN () { - return this.value === null - } - /* istanbul ignore next */ - toString () { - return String(this.value) - } - /* istanbul ignore next */ - [_inspect] () { - return `[BigInt: ${this.toString()}]}` - } - valueOf () { - return this.value - } -} - -const INTEGER = Symbol('integer') -function Integer (value) { - let num = Number(value) - // -0 is a float thing, not an int thing - if (Object.is(num, -0)) num = 0 - /* istanbul ignore else */ - if (global.BigInt && !Number.isSafeInteger(num)) { - return new BoxedBigInt(value) - } else { - /* istanbul ignore next */ - return Object.defineProperties(new Number(num), { - isNaN: {value: function () { return isNaN(this) }}, - [_type]: {value: INTEGER}, - [_inspect]: {value: () => `[Integer: ${value}]`} - }) - } -} -function isInteger (obj) { - if (obj === null || typeof (obj) !== 'object') return false - return obj[_type] === INTEGER -} - -const FLOAT = Symbol('float') -function Float (value) { - /* istanbul ignore next */ - return Object.defineProperties(new Number(value), { - [_type]: {value: FLOAT}, - [_inspect]: {value: () => `[Float: ${value}]`} - }) -} -function isFloat (obj) { - if (obj === null || typeof (obj) !== 'object') return false - return obj[_type] === FLOAT -} - -function tomlType (value) { - const type = typeof value - if (type === 'object') { - /* istanbul ignore if */ - if (value === null) return 'null' - if (value instanceof Date) return 'datetime' - /* istanbul ignore else */ - if (_type in value) { - switch (value[_type]) { - case INLINE_TABLE: return 'inline-table' - case INLINE_LIST: return 'inline-list' - /* istanbul ignore next */ - case TABLE: return 'table' - /* istanbul ignore next */ - case LIST: return 'list' - case FLOAT: return 'float' - case INTEGER: return 'integer' - } - } - } - return type -} - -function makeParserClass (Parser) { - class TOMLParser extends Parser { - constructor () { - super() - this.ctx = this.obj = Table() - } - - /* MATCH HELPER */ - atEndOfWord () { - return this.char === CHAR_NUM || this.char === CTRL_I || this.char === CHAR_SP || this.atEndOfLine() - } - atEndOfLine () { - return this.char === Parser.END || this.char === CTRL_J || this.char === CTRL_M - } - - parseStart () { - if (this.char === Parser.END) { - return null - } else if (this.char === CHAR_LSQB) { - return this.call(this.parseTableOrList) - } else if (this.char === CHAR_NUM) { - return this.call(this.parseComment) - } else if (this.char === CTRL_J || this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { - return null - } else if (isAlphaNumQuoteHyphen(this.char)) { - return this.callNow(this.parseAssignStatement) - } else { - throw this.error(new TomlError(`Unknown character "${this.char}"`)) - } - } - - // HELPER, this strips any whitespace and comments to the end of the line - // then RETURNS. Last state in a production. - parseWhitespaceToEOL () { - if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { - return null - } else if (this.char === CHAR_NUM) { - return this.goto(this.parseComment) - } else if (this.char === Parser.END || this.char === CTRL_J) { - return this.return() - } else { - throw this.error(new TomlError('Unexpected character, expected only whitespace or comments till end of line')) - } - } - - /* ASSIGNMENT: key = value */ - parseAssignStatement () { - return this.callNow(this.parseAssign, this.recordAssignStatement) - } - recordAssignStatement (kv) { - let target = this.ctx - let finalKey = kv.key.pop() - for (let kw of kv.key) { - if (hasKey(target, kw) && (!isTable(target[kw]) || target[kw][_declared])) { - throw this.error(new TomlError("Can't redefine existing key")) - } - target = target[kw] = target[kw] || Table() - } - if (hasKey(target, finalKey)) { - throw this.error(new TomlError("Can't redefine existing key")) - } - // unbox our numbers - if (isInteger(kv.value) || isFloat(kv.value)) { - target[finalKey] = kv.value.valueOf() - } else { - target[finalKey] = kv.value - } - return this.goto(this.parseWhitespaceToEOL) - } - - /* ASSSIGNMENT expression, key = value possibly inside an inline table */ - parseAssign () { - return this.callNow(this.parseKeyword, this.recordAssignKeyword) - } - recordAssignKeyword (key) { - if (this.state.resultTable) { - this.state.resultTable.push(key) - } else { - this.state.resultTable = [key] - } - return this.goto(this.parseAssignKeywordPreDot) - } - parseAssignKeywordPreDot () { - if (this.char === CHAR_PERIOD) { - return this.next(this.parseAssignKeywordPostDot) - } else if (this.char !== CHAR_SP && this.char !== CTRL_I) { - return this.goto(this.parseAssignEqual) - } - } - parseAssignKeywordPostDot () { - if (this.char !== CHAR_SP && this.char !== CTRL_I) { - return this.callNow(this.parseKeyword, this.recordAssignKeyword) - } - } - - parseAssignEqual () { - if (this.char === CHAR_EQUALS) { - return this.next(this.parseAssignPreValue) - } else { - throw this.error(new TomlError('Invalid character, expected "="')) - } - } - parseAssignPreValue () { - if (this.char === CHAR_SP || this.char === CTRL_I) { - return null - } else { - return this.callNow(this.parseValue, this.recordAssignValue) - } - } - recordAssignValue (value) { - return this.returnNow({key: this.state.resultTable, value: value}) - } - - /* COMMENTS: #...eol */ - parseComment () { - do { - if (this.char === Parser.END || this.char === CTRL_J) { - return this.return() - } - } while (this.nextChar()) - } - - /* TABLES AND LISTS, [foo] and [[foo]] */ - parseTableOrList () { - if (this.char === CHAR_LSQB) { - this.next(this.parseList) - } else { - return this.goto(this.parseTable) - } - } - - /* TABLE [foo.bar.baz] */ - parseTable () { - this.ctx = this.obj - return this.goto(this.parseTableNext) - } - parseTableNext () { - if (this.char === CHAR_SP || this.char === CTRL_I) { - return null - } else { - return this.callNow(this.parseKeyword, this.parseTableMore) - } - } - parseTableMore (keyword) { - if (this.char === CHAR_SP || this.char === CTRL_I) { - return null - } else if (this.char === CHAR_RSQB) { - if (hasKey(this.ctx, keyword) && (!isTable(this.ctx[keyword]) || this.ctx[keyword][_declared])) { - throw this.error(new TomlError("Can't redefine existing key")) - } else { - this.ctx = this.ctx[keyword] = this.ctx[keyword] || Table() - this.ctx[_declared] = true - } - return this.next(this.parseWhitespaceToEOL) - } else if (this.char === CHAR_PERIOD) { - if (!hasKey(this.ctx, keyword)) { - this.ctx = this.ctx[keyword] = Table() - } else if (isTable(this.ctx[keyword])) { - this.ctx = this.ctx[keyword] - } else if (isList(this.ctx[keyword])) { - this.ctx = this.ctx[keyword][this.ctx[keyword].length - 1] - } else { - throw this.error(new TomlError("Can't redefine existing key")) - } - return this.next(this.parseTableNext) - } else { - throw this.error(new TomlError('Unexpected character, expected whitespace, . or ]')) - } - } - - /* LIST [[a.b.c]] */ - parseList () { - this.ctx = this.obj - return this.goto(this.parseListNext) - } - parseListNext () { - if (this.char === CHAR_SP || this.char === CTRL_I) { - return null - } else { - return this.callNow(this.parseKeyword, this.parseListMore) - } - } - parseListMore (keyword) { - if (this.char === CHAR_SP || this.char === CTRL_I) { - return null - } else if (this.char === CHAR_RSQB) { - if (!hasKey(this.ctx, keyword)) { - this.ctx[keyword] = List() - } - if (isInlineList(this.ctx[keyword])) { - throw this.error(new TomlError("Can't extend an inline array")) - } else if (isList(this.ctx[keyword])) { - const next = Table() - this.ctx[keyword].push(next) - this.ctx = next - } else { - throw this.error(new TomlError("Can't redefine an existing key")) - } - return this.next(this.parseListEnd) - } else if (this.char === CHAR_PERIOD) { - if (!hasKey(this.ctx, keyword)) { - this.ctx = this.ctx[keyword] = Table() - } else if (isInlineList(this.ctx[keyword])) { - throw this.error(new TomlError("Can't extend an inline array")) - } else if (isInlineTable(this.ctx[keyword])) { - throw this.error(new TomlError("Can't extend an inline table")) - } else if (isList(this.ctx[keyword])) { - this.ctx = this.ctx[keyword][this.ctx[keyword].length - 1] - } else if (isTable(this.ctx[keyword])) { - this.ctx = this.ctx[keyword] - } else { - throw this.error(new TomlError("Can't redefine an existing key")) - } - return this.next(this.parseListNext) - } else { - throw this.error(new TomlError('Unexpected character, expected whitespace, . or ]')) - } - } - parseListEnd (keyword) { - if (this.char === CHAR_RSQB) { - return this.next(this.parseWhitespaceToEOL) - } else { - throw this.error(new TomlError('Unexpected character, expected whitespace, . or ]')) - } - } - - /* VALUE string, number, boolean, inline list, inline object */ - parseValue () { - if (this.char === Parser.END) { - throw this.error(new TomlError('Key without value')) - } else if (this.char === CHAR_QUOT) { - return this.next(this.parseDoubleString) - } if (this.char === CHAR_APOS) { - return this.next(this.parseSingleString) - } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { - return this.goto(this.parseNumberSign) - } else if (this.char === CHAR_i) { - return this.next(this.parseInf) - } else if (this.char === CHAR_n) { - return this.next(this.parseNan) - } else if (isDigit(this.char)) { - return this.goto(this.parseNumberOrDateTime) - } else if (this.char === CHAR_t || this.char === CHAR_f) { - return this.goto(this.parseBoolean) - } else if (this.char === CHAR_LSQB) { - return this.call(this.parseInlineList, this.recordValue) - } else if (this.char === CHAR_LCUB) { - return this.call(this.parseInlineTable, this.recordValue) - } else { - throw this.error(new TomlError('Unexpected character, expecting string, number, datetime, boolean, inline array or inline table')) - } - } - recordValue (value) { - return this.returnNow(value) - } - - parseInf () { - if (this.char === CHAR_n) { - return this.next(this.parseInf2) - } else { - throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"')) - } - } - parseInf2 () { - if (this.char === CHAR_f) { - if (this.state.buf === '-') { - return this.return(-Infinity) - } else { - return this.return(Infinity) - } - } else { - throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"')) - } - } - - parseNan () { - if (this.char === CHAR_a) { - return this.next(this.parseNan2) - } else { - throw this.error(new TomlError('Unexpected character, expected "nan"')) - } - } - parseNan2 () { - if (this.char === CHAR_n) { - return this.return(NaN) - } else { - throw this.error(new TomlError('Unexpected character, expected "nan"')) - } - } - - /* KEYS, barewords or basic, literal, or dotted */ - parseKeyword () { - if (this.char === CHAR_QUOT) { - return this.next(this.parseBasicString) - } else if (this.char === CHAR_APOS) { - return this.next(this.parseLiteralString) - } else { - return this.goto(this.parseBareKey) - } - } - - /* KEYS: barewords */ - parseBareKey () { - do { - if (this.char === Parser.END) { - throw this.error(new TomlError('Key ended without value')) - } else if (isAlphaNumHyphen(this.char)) { - this.consume() - } else if (this.state.buf.length === 0) { - throw this.error(new TomlError('Empty bare keys are not allowed')) - } else { - return this.returnNow() - } - } while (this.nextChar()) - } - - /* STRINGS, single quoted (literal) */ - parseSingleString () { - if (this.char === CHAR_APOS) { - return this.next(this.parseLiteralMultiStringMaybe) - } else { - return this.goto(this.parseLiteralString) - } - } - parseLiteralString () { - do { - if (this.char === CHAR_APOS) { - return this.return() - } else if (this.atEndOfLine()) { - throw this.error(new TomlError('Unterminated string')) - } else if (this.char === CHAR_DEL || (this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I)) { - throw this.errorControlCharInString() - } else { - this.consume() - } - } while (this.nextChar()) - } - parseLiteralMultiStringMaybe () { - if (this.char === CHAR_APOS) { - return this.next(this.parseLiteralMultiString) - } else { - return this.returnNow() - } - } - parseLiteralMultiString () { - if (this.char === CTRL_M) { - return null - } else if (this.char === CTRL_J) { - return this.next(this.parseLiteralMultiStringContent) - } else { - return this.goto(this.parseLiteralMultiStringContent) - } - } - parseLiteralMultiStringContent () { - do { - if (this.char === CHAR_APOS) { - return this.next(this.parseLiteralMultiEnd) - } else if (this.char === Parser.END) { - throw this.error(new TomlError('Unterminated multi-line string')) - } else if (this.char === CHAR_DEL || (this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I && this.char !== CTRL_J && this.char !== CTRL_M)) { - throw this.errorControlCharInString() - } else { - this.consume() - } - } while (this.nextChar()) - } - parseLiteralMultiEnd () { - if (this.char === CHAR_APOS) { - return this.next(this.parseLiteralMultiEnd2) - } else { - this.state.buf += "'" - return this.goto(this.parseLiteralMultiStringContent) - } - } - parseLiteralMultiEnd2 () { - if (this.char === CHAR_APOS) { - return this.return() - } else { - this.state.buf += "''" - return this.goto(this.parseLiteralMultiStringContent) - } - } - - /* STRINGS double quoted */ - parseDoubleString () { - if (this.char === CHAR_QUOT) { - return this.next(this.parseMultiStringMaybe) - } else { - return this.goto(this.parseBasicString) - } - } - parseBasicString () { - do { - if (this.char === CHAR_BSOL) { - return this.call(this.parseEscape, this.recordEscapeReplacement) - } else if (this.char === CHAR_QUOT) { - return this.return() - } else if (this.atEndOfLine()) { - throw this.error(new TomlError('Unterminated string')) - } else if (this.char === CHAR_DEL || (this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I)) { - throw this.errorControlCharInString() - } else { - this.consume() - } - } while (this.nextChar()) - } - recordEscapeReplacement (replacement) { - this.state.buf += replacement - return this.goto(this.parseBasicString) - } - parseMultiStringMaybe () { - if (this.char === CHAR_QUOT) { - return this.next(this.parseMultiString) - } else { - return this.returnNow() - } - } - parseMultiString () { - if (this.char === CTRL_M) { - return null - } else if (this.char === CTRL_J) { - return this.next(this.parseMultiStringContent) - } else { - return this.goto(this.parseMultiStringContent) - } - } - parseMultiStringContent () { - do { - if (this.char === CHAR_BSOL) { - return this.call(this.parseMultiEscape, this.recordMultiEscapeReplacement) - } else if (this.char === CHAR_QUOT) { - return this.next(this.parseMultiEnd) - } else if (this.char === Parser.END) { - throw this.error(new TomlError('Unterminated multi-line string')) - } else if (this.char === CHAR_DEL || (this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I && this.char !== CTRL_J && this.char !== CTRL_M)) { - throw this.errorControlCharInString() - } else { - this.consume() - } - } while (this.nextChar()) - } - errorControlCharInString () { - let displayCode = '\\u00' - if (this.char < 16) { - displayCode += '0' - } - displayCode += this.char.toString(16) - - return this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${displayCode} instead`)) - } - recordMultiEscapeReplacement (replacement) { - this.state.buf += replacement - return this.goto(this.parseMultiStringContent) - } - parseMultiEnd () { - if (this.char === CHAR_QUOT) { - return this.next(this.parseMultiEnd2) - } else { - this.state.buf += '"' - return this.goto(this.parseMultiStringContent) - } - } - parseMultiEnd2 () { - if (this.char === CHAR_QUOT) { - return this.return() - } else { - this.state.buf += '""' - return this.goto(this.parseMultiStringContent) - } - } - parseMultiEscape () { - if (this.char === CTRL_M || this.char === CTRL_J) { - return this.next(this.parseMultiTrim) - } else if (this.char === CHAR_SP || this.char === CTRL_I) { - return this.next(this.parsePreMultiTrim) - } else { - return this.goto(this.parseEscape) - } - } - parsePreMultiTrim () { - if (this.char === CHAR_SP || this.char === CTRL_I) { - return null - } else if (this.char === CTRL_M || this.char === CTRL_J) { - return this.next(this.parseMultiTrim) - } else { - throw this.error(new TomlError("Can't escape whitespace")) - } - } - parseMultiTrim () { - // explicitly whitespace here, END should follow the same path as chars - if (this.char === CTRL_J || this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { - return null - } else { - return this.returnNow() - } - } - parseEscape () { - if (this.char in escapes) { - return this.return(escapes[this.char]) - } else if (this.char === CHAR_u) { - return this.call(this.parseSmallUnicode, this.parseUnicodeReturn) - } else if (this.char === CHAR_U) { - return this.call(this.parseLargeUnicode, this.parseUnicodeReturn) - } else { - throw this.error(new TomlError('Unknown escape character: ' + this.char)) - } - } - parseUnicodeReturn (char) { - try { - const codePoint = parseInt(char, 16) - if (codePoint >= SURROGATE_FIRST && codePoint <= SURROGATE_LAST) { - throw this.error(new TomlError('Invalid unicode, character in range 0xD800 - 0xDFFF is reserved')) - } - return this.returnNow(String.fromCodePoint(codePoint)) - } catch (err) { - throw this.error(TomlError.wrap(err)) - } - } - parseSmallUnicode () { - if (!isHexit(this.char)) { - throw this.error(new TomlError('Invalid character in unicode sequence, expected hex')) - } else { - this.consume() - if (this.state.buf.length >= 4) return this.return() - } - } - parseLargeUnicode () { - if (!isHexit(this.char)) { - throw this.error(new TomlError('Invalid character in unicode sequence, expected hex')) - } else { - this.consume() - if (this.state.buf.length >= 8) return this.return() - } - } - - /* NUMBERS */ - parseNumberSign () { - this.consume() - return this.next(this.parseMaybeSignedInfOrNan) - } - parseMaybeSignedInfOrNan () { - if (this.char === CHAR_i) { - return this.next(this.parseInf) - } else if (this.char === CHAR_n) { - return this.next(this.parseNan) - } else { - return this.callNow(this.parseNoUnder, this.parseNumberIntegerStart) - } - } - parseNumberIntegerStart () { - if (this.char === CHAR_0) { - this.consume() - return this.next(this.parseNumberIntegerExponentOrDecimal) - } else { - return this.goto(this.parseNumberInteger) - } - } - parseNumberIntegerExponentOrDecimal () { - if (this.char === CHAR_PERIOD) { - this.consume() - return this.call(this.parseNoUnder, this.parseNumberFloat) - } else if (this.char === CHAR_E || this.char === CHAR_e) { - this.consume() - return this.next(this.parseNumberExponentSign) - } else { - return this.returnNow(Integer(this.state.buf)) - } - } - parseNumberInteger () { - if (isDigit(this.char)) { - this.consume() - } else if (this.char === CHAR_LOWBAR) { - return this.call(this.parseNoUnder) - } else if (this.char === CHAR_E || this.char === CHAR_e) { - this.consume() - return this.next(this.parseNumberExponentSign) - } else if (this.char === CHAR_PERIOD) { - this.consume() - return this.call(this.parseNoUnder, this.parseNumberFloat) - } else { - const result = Integer(this.state.buf) - /* istanbul ignore if */ - if (result.isNaN()) { - throw this.error(new TomlError('Invalid number')) - } else { - return this.returnNow(result) - } - } - } - parseNoUnder () { - if (this.char === CHAR_LOWBAR || this.char === CHAR_PERIOD || this.char === CHAR_E || this.char === CHAR_e) { - throw this.error(new TomlError('Unexpected character, expected digit')) - } else if (this.atEndOfWord()) { - throw this.error(new TomlError('Incomplete number')) - } - return this.returnNow() - } - parseNoUnderHexOctBinLiteral () { - if (this.char === CHAR_LOWBAR || this.char === CHAR_PERIOD) { - throw this.error(new TomlError('Unexpected character, expected digit')) - } else if (this.atEndOfWord()) { - throw this.error(new TomlError('Incomplete number')) - } - return this.returnNow() - } - parseNumberFloat () { - if (this.char === CHAR_LOWBAR) { - return this.call(this.parseNoUnder, this.parseNumberFloat) - } else if (isDigit(this.char)) { - this.consume() - } else if (this.char === CHAR_E || this.char === CHAR_e) { - this.consume() - return this.next(this.parseNumberExponentSign) - } else { - return this.returnNow(Float(this.state.buf)) - } - } - parseNumberExponentSign () { - if (isDigit(this.char)) { - return this.goto(this.parseNumberExponent) - } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { - this.consume() - this.call(this.parseNoUnder, this.parseNumberExponent) - } else { - throw this.error(new TomlError('Unexpected character, expected -, + or digit')) - } - } - parseNumberExponent () { - if (isDigit(this.char)) { - this.consume() - } else if (this.char === CHAR_LOWBAR) { - return this.call(this.parseNoUnder) - } else { - return this.returnNow(Float(this.state.buf)) - } - } - - /* NUMBERS or DATETIMES */ - parseNumberOrDateTime () { - if (this.char === CHAR_0) { - this.consume() - return this.next(this.parseNumberBaseOrDateTime) - } else { - return this.goto(this.parseNumberOrDateTimeOnly) - } - } - parseNumberOrDateTimeOnly () { - // note, if two zeros are in a row then it MUST be a date - if (this.char === CHAR_LOWBAR) { - return this.call(this.parseNoUnder, this.parseNumberInteger) - } else if (isDigit(this.char)) { - this.consume() - if (this.state.buf.length > 4) this.next(this.parseNumberInteger) - } else if (this.char === CHAR_E || this.char === CHAR_e) { - this.consume() - return this.next(this.parseNumberExponentSign) - } else if (this.char === CHAR_PERIOD) { - this.consume() - return this.call(this.parseNoUnder, this.parseNumberFloat) - } else if (this.char === CHAR_HYPHEN) { - return this.goto(this.parseDateTime) - } else if (this.char === CHAR_COLON) { - return this.goto(this.parseOnlyTimeHour) - } else { - return this.returnNow(Integer(this.state.buf)) - } - } - parseDateTimeOnly () { - if (this.state.buf.length < 4) { - if (isDigit(this.char)) { - return this.consume() - } else if (this.char === CHAR_COLON) { - return this.goto(this.parseOnlyTimeHour) - } else { - throw this.error(new TomlError('Expected digit while parsing year part of a date')) - } - } else { - if (this.char === CHAR_HYPHEN) { - return this.goto(this.parseDateTime) - } else { - throw this.error(new TomlError('Expected hyphen (-) while parsing year part of date')) - } - } - } - parseNumberBaseOrDateTime () { - if (this.char === CHAR_b) { - this.consume() - return this.call(this.parseNoUnderHexOctBinLiteral, this.parseIntegerBin) - } else if (this.char === CHAR_o) { - this.consume() - return this.call(this.parseNoUnderHexOctBinLiteral, this.parseIntegerOct) - } else if (this.char === CHAR_x) { - this.consume() - return this.call(this.parseNoUnderHexOctBinLiteral, this.parseIntegerHex) - } else if (this.char === CHAR_PERIOD) { - return this.goto(this.parseNumberInteger) - } else if (isDigit(this.char)) { - return this.goto(this.parseDateTimeOnly) - } else { - return this.returnNow(Integer(this.state.buf)) - } - } - parseIntegerHex () { - if (isHexit(this.char)) { - this.consume() - } else if (this.char === CHAR_LOWBAR) { - return this.call(this.parseNoUnderHexOctBinLiteral) - } else { - const result = Integer(this.state.buf) - /* istanbul ignore if */ - if (result.isNaN()) { - throw this.error(new TomlError('Invalid number')) - } else { - return this.returnNow(result) - } - } - } - parseIntegerOct () { - if (isOctit(this.char)) { - this.consume() - } else if (this.char === CHAR_LOWBAR) { - return this.call(this.parseNoUnderHexOctBinLiteral) - } else { - const result = Integer(this.state.buf) - /* istanbul ignore if */ - if (result.isNaN()) { - throw this.error(new TomlError('Invalid number')) - } else { - return this.returnNow(result) - } - } - } - parseIntegerBin () { - if (isBit(this.char)) { - this.consume() - } else if (this.char === CHAR_LOWBAR) { - return this.call(this.parseNoUnderHexOctBinLiteral) - } else { - const result = Integer(this.state.buf) - /* istanbul ignore if */ - if (result.isNaN()) { - throw this.error(new TomlError('Invalid number')) - } else { - return this.returnNow(result) - } - } - } - - /* DATETIME */ - parseDateTime () { - // we enter here having just consumed the year and about to consume the hyphen - if (this.state.buf.length < 4) { - throw this.error(new TomlError('Years less than 1000 must be zero padded to four characters')) - } - this.state.result = this.state.buf - this.state.buf = '' - return this.next(this.parseDateMonth) - } - parseDateMonth () { - if (this.char === CHAR_HYPHEN) { - if (this.state.buf.length < 2) { - throw this.error(new TomlError('Months less than 10 must be zero padded to two characters')) - } - this.state.result += '-' + this.state.buf - this.state.buf = '' - return this.next(this.parseDateDay) - } else if (isDigit(this.char)) { - this.consume() - } else { - throw this.error(new TomlError('Incomplete datetime')) - } - } - parseDateDay () { - if (this.char === CHAR_T || this.char === CHAR_SP) { - if (this.state.buf.length < 2) { - throw this.error(new TomlError('Days less than 10 must be zero padded to two characters')) - } - this.state.result += '-' + this.state.buf - this.state.buf = '' - return this.next(this.parseStartTimeHour) - } else if (this.atEndOfWord()) { - return this.returnNow(createDate(this.state.result + '-' + this.state.buf)) - } else if (isDigit(this.char)) { - this.consume() - } else { - throw this.error(new TomlError('Incomplete datetime')) - } - } - parseStartTimeHour () { - if (this.atEndOfWord()) { - return this.returnNow(createDate(this.state.result)) - } else { - return this.goto(this.parseTimeHour) - } - } - parseTimeHour () { - if (this.char === CHAR_COLON) { - if (this.state.buf.length < 2) { - throw this.error(new TomlError('Hours less than 10 must be zero padded to two characters')) - } - this.state.result += 'T' + this.state.buf - this.state.buf = '' - return this.next(this.parseTimeMin) - } else if (isDigit(this.char)) { - this.consume() - } else { - throw this.error(new TomlError('Incomplete datetime')) - } - } - parseTimeMin () { - if (this.state.buf.length < 2 && isDigit(this.char)) { - this.consume() - } else if (this.state.buf.length === 2 && this.char === CHAR_COLON) { - this.state.result += ':' + this.state.buf - this.state.buf = '' - return this.next(this.parseTimeSec) - } else { - throw this.error(new TomlError('Incomplete datetime')) - } - } - parseTimeSec () { - if (isDigit(this.char)) { - this.consume() - if (this.state.buf.length === 2) { - this.state.result += ':' + this.state.buf - this.state.buf = '' - return this.next(this.parseTimeZoneOrFraction) - } - } else { - throw this.error(new TomlError('Incomplete datetime')) - } - } - - parseOnlyTimeHour () { - /* istanbul ignore else */ - if (this.char === CHAR_COLON) { - if (this.state.buf.length < 2) { - throw this.error(new TomlError('Hours less than 10 must be zero padded to two characters')) - } - this.state.result = this.state.buf - this.state.buf = '' - return this.next(this.parseOnlyTimeMin) - } else { - throw this.error(new TomlError('Incomplete time')) - } - } - parseOnlyTimeMin () { - if (this.state.buf.length < 2 && isDigit(this.char)) { - this.consume() - } else if (this.state.buf.length === 2 && this.char === CHAR_COLON) { - this.state.result += ':' + this.state.buf - this.state.buf = '' - return this.next(this.parseOnlyTimeSec) - } else { - throw this.error(new TomlError('Incomplete time')) - } - } - parseOnlyTimeSec () { - if (isDigit(this.char)) { - this.consume() - if (this.state.buf.length === 2) { - return this.next(this.parseOnlyTimeFractionMaybe) - } - } else { - throw this.error(new TomlError('Incomplete time')) - } - } - parseOnlyTimeFractionMaybe () { - this.state.result += ':' + this.state.buf - if (this.char === CHAR_PERIOD) { - this.state.buf = '' - this.next(this.parseOnlyTimeFraction) - } else { - return this.return(createTime(this.state.result)) - } - } - parseOnlyTimeFraction () { - if (isDigit(this.char)) { - this.consume() - } else if (this.atEndOfWord()) { - if (this.state.buf.length === 0) throw this.error(new TomlError('Expected digit in milliseconds')) - return this.returnNow(createTime(this.state.result + '.' + this.state.buf)) - } else { - throw this.error(new TomlError('Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z')) - } - } - - parseTimeZoneOrFraction () { - if (this.char === CHAR_PERIOD) { - this.consume() - this.next(this.parseDateTimeFraction) - } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { - this.consume() - this.next(this.parseTimeZoneHour) - } else if (this.char === CHAR_Z) { - this.consume() - return this.return(createDateTime(this.state.result + this.state.buf)) - } else if (this.atEndOfWord()) { - return this.returnNow(createDateTimeFloat(this.state.result + this.state.buf)) - } else { - throw this.error(new TomlError('Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z')) - } - } - parseDateTimeFraction () { - if (isDigit(this.char)) { - this.consume() - } else if (this.state.buf.length === 1) { - throw this.error(new TomlError('Expected digit in milliseconds')) - } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { - this.consume() - this.next(this.parseTimeZoneHour) - } else if (this.char === CHAR_Z) { - this.consume() - return this.return(createDateTime(this.state.result + this.state.buf)) - } else if (this.atEndOfWord()) { - return this.returnNow(createDateTimeFloat(this.state.result + this.state.buf)) - } else { - throw this.error(new TomlError('Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z')) - } - } - parseTimeZoneHour () { - if (isDigit(this.char)) { - this.consume() - // FIXME: No more regexps - if (/\d\d$/.test(this.state.buf)) return this.next(this.parseTimeZoneSep) - } else { - throw this.error(new TomlError('Unexpected character in datetime, expected digit')) - } - } - parseTimeZoneSep () { - if (this.char === CHAR_COLON) { - this.consume() - this.next(this.parseTimeZoneMin) - } else { - throw this.error(new TomlError('Unexpected character in datetime, expected colon')) - } - } - parseTimeZoneMin () { - if (isDigit(this.char)) { - this.consume() - if (/\d\d$/.test(this.state.buf)) return this.return(createDateTime(this.state.result + this.state.buf)) - } else { - throw this.error(new TomlError('Unexpected character in datetime, expected digit')) - } - } - - /* BOOLEAN */ - parseBoolean () { - /* istanbul ignore else */ - if (this.char === CHAR_t) { - this.consume() - return this.next(this.parseTrue_r) - } else if (this.char === CHAR_f) { - this.consume() - return this.next(this.parseFalse_a) - } - } - parseTrue_r () { - if (this.char === CHAR_r) { - this.consume() - return this.next(this.parseTrue_u) - } else { - throw this.error(new TomlError('Invalid boolean, expected true or false')) - } - } - parseTrue_u () { - if (this.char === CHAR_u) { - this.consume() - return this.next(this.parseTrue_e) - } else { - throw this.error(new TomlError('Invalid boolean, expected true or false')) - } - } - parseTrue_e () { - if (this.char === CHAR_e) { - return this.return(true) - } else { - throw this.error(new TomlError('Invalid boolean, expected true or false')) - } - } - - parseFalse_a () { - if (this.char === CHAR_a) { - this.consume() - return this.next(this.parseFalse_l) - } else { - throw this.error(new TomlError('Invalid boolean, expected true or false')) - } - } - - parseFalse_l () { - if (this.char === CHAR_l) { - this.consume() - return this.next(this.parseFalse_s) - } else { - throw this.error(new TomlError('Invalid boolean, expected true or false')) - } - } - - parseFalse_s () { - if (this.char === CHAR_s) { - this.consume() - return this.next(this.parseFalse_e) - } else { - throw this.error(new TomlError('Invalid boolean, expected true or false')) - } - } - - parseFalse_e () { - if (this.char === CHAR_e) { - return this.return(false) - } else { - throw this.error(new TomlError('Invalid boolean, expected true or false')) - } - } - - /* INLINE LISTS */ - parseInlineList () { - if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M || this.char === CTRL_J) { - return null - } else if (this.char === Parser.END) { - throw this.error(new TomlError('Unterminated inline array')) - } else if (this.char === CHAR_NUM) { - return this.call(this.parseComment) - } else if (this.char === CHAR_RSQB) { - return this.return(this.state.resultArr || InlineList()) - } else { - return this.callNow(this.parseValue, this.recordInlineListValue) - } - } - recordInlineListValue (value) { - if (this.state.resultArr) { - const listType = this.state.resultArr[_contentType] - const valueType = tomlType(value) - if (listType !== valueType) { - throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${listType} and ${valueType}`)) - } - } else { - this.state.resultArr = InlineList(tomlType(value)) - } - if (isFloat(value) || isInteger(value)) { - // unbox now that we've verified they're ok - this.state.resultArr.push(value.valueOf()) - } else { - this.state.resultArr.push(value) - } - return this.goto(this.parseInlineListNext) - } - parseInlineListNext () { - if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M || this.char === CTRL_J) { - return null - } else if (this.char === CHAR_NUM) { - return this.call(this.parseComment) - } else if (this.char === CHAR_COMMA) { - return this.next(this.parseInlineList) - } else if (this.char === CHAR_RSQB) { - return this.goto(this.parseInlineList) - } else { - throw this.error(new TomlError('Invalid character, expected whitespace, comma (,) or close bracket (])')) - } - } - - /* INLINE TABLE */ - parseInlineTable () { - if (this.char === CHAR_SP || this.char === CTRL_I) { - return null - } else if (this.char === Parser.END || this.char === CHAR_NUM || this.char === CTRL_J || this.char === CTRL_M) { - throw this.error(new TomlError('Unterminated inline array')) - } else if (this.char === CHAR_RCUB) { - return this.return(this.state.resultTable || InlineTable()) - } else { - if (!this.state.resultTable) this.state.resultTable = InlineTable() - return this.callNow(this.parseAssign, this.recordInlineTableValue) - } - } - recordInlineTableValue (kv) { - let target = this.state.resultTable - let finalKey = kv.key.pop() - for (let kw of kv.key) { - if (hasKey(target, kw) && (!isTable(target[kw]) || target[kw][_declared])) { - throw this.error(new TomlError("Can't redefine existing key")) - } - target = target[kw] = target[kw] || Table() - } - if (hasKey(target, finalKey)) { - throw this.error(new TomlError("Can't redefine existing key")) - } - if (isInteger(kv.value) || isFloat(kv.value)) { - target[finalKey] = kv.value.valueOf() - } else { - target[finalKey] = kv.value - } - return this.goto(this.parseInlineTableNext) - } - parseInlineTableNext () { - if (this.char === CHAR_SP || this.char === CTRL_I) { - return null - } else if (this.char === Parser.END || this.char === CHAR_NUM || this.char === CTRL_J || this.char === CTRL_M) { - throw this.error(new TomlError('Unterminated inline array')) - } else if (this.char === CHAR_COMMA) { - return this.next(this.parseInlineTable) - } else if (this.char === CHAR_RCUB) { - return this.goto(this.parseInlineTable) - } else { - throw this.error(new TomlError('Invalid character, expected whitespace, comma (,) or close bracket (])')) - } - } - } - return TOMLParser -} diff --git a/node_modules/@iarna/toml/package.json b/node_modules/@iarna/toml/package.json deleted file mode 100755 index 91f0d7c5..00000000 --- a/node_modules/@iarna/toml/package.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "_from": "@iarna/toml@~2.2", - "_id": "@iarna/toml@2.2.5", - "_inBundle": false, - "_integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==", - "_location": "/@iarna/toml", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@iarna/toml@~2.2", - "name": "@iarna/toml", - "escapedName": "@iarna%2ftoml", - "scope": "@iarna", - "rawSpec": "~2.2", - "saveSpec": null, - "fetchSpec": "~2.2" - }, - "_requiredBy": [ - "/@antora/playbook-builder" - ], - "_resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz", - "_shasum": "b32366c89b43c6f8cefbdefac778b9c828e3ba8c", - "_spec": "@iarna/toml@~2.2", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/playbook-builder", - "author": { - "name": "Rebecca Turner", - "email": "me@re-becca.org", - "url": "http://re-becca.org/" - }, - "bugs": { - "url": "https://github.com/iarna/iarna-toml/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Better TOML parsing and stringifying all in that familiar JSON interface.", - "devDependencies": { - "@iarna/standard": "^2.0.2", - "@ltd/j-toml": "^0.5.107", - "@perl/qx": "^1.1.0", - "@sgarciac/bombadil": "^2.3.0", - "ansi": "^0.3.1", - "approximate-number": "^2.0.0", - "benchmark": "^2.1.4", - "fast-toml": "^0.5.4", - "funstream": "^4.2.0", - "glob": "^7.1.6", - "js-yaml": "^3.13.1", - "rimraf": "^3.0.2", - "tap": "^12.0.1", - "toml": "^3.0.0", - "toml-j0.4": "^1.1.1", - "weallbehave": "*", - "weallcontribute": "*" - }, - "directories": { - "test": "test" - }, - "files": [ - "toml.js", - "stringify.js", - "parse.js", - "parse-string.js", - "parse-stream.js", - "parse-async.js", - "parse-pretty-error.js", - "lib/parser.js", - "lib/parser-debug.js", - "lib/toml-parser.js", - "lib/create-datetime.js", - "lib/create-date.js", - "lib/create-datetime-float.js", - "lib/create-time.js", - "lib/format-num.js", - "index.d.ts" - ], - "homepage": "https://github.com/iarna/iarna-toml#readme", - "keywords": [ - "toml", - "toml-parser", - "toml-stringifier", - "parser", - "stringifer", - "emitter", - "ini", - "tomlify", - "encoder", - "decoder" - ], - "license": "ISC", - "main": "toml.js", - "name": "@iarna/toml", - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/iarna-toml.git" - }, - "scripts": { - "benchmark": "node benchmark.js && node benchmark-per-file.js && node results2table.js", - "postpublish": "git push --follow-tags", - "prepack": "rm -f *~", - "prepare": "npm run setup-burntsushi-toml-suite && npm run setup-iarna-toml-suite", - "prerelease": "npm t", - "pretest": "iarna-standard", - "setup-burntsushi-toml-suite": "[ -d test/burntsushi-toml-test ] || (git clone https://github.com/BurntSushi/toml-test test/burntsushi-toml-test; rimraf test/burntsushi-toml-test/.git/hooks/*); cd test/burntsushi-toml-test; git pull", - "setup-iarna-toml-suite": "[ -d test/spec-test ] || (git clone https://github.com/iarna/toml-spec-tests -b 0.5.0 test/spec-test; rimraf test/spec-test/.git/hooks/*); cd test/spec-test; git pull", - "test": "tap -J --100 test/*.js test/toml-stream/*.js", - "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", - "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" - }, - "version": "2.2.5" -} diff --git a/node_modules/@iarna/toml/parse-async.js b/node_modules/@iarna/toml/parse-async.js deleted file mode 100755 index e5ff090e..00000000 --- a/node_modules/@iarna/toml/parse-async.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict' -module.exports = parseAsync - -const TOMLParser = require('./lib/toml-parser.js') -const prettyError = require('./parse-pretty-error.js') - -function parseAsync (str, opts) { - if (!opts) opts = {} - const index = 0 - const blocksize = opts.blocksize || 40960 - const parser = new TOMLParser() - return new Promise((resolve, reject) => { - setImmediate(parseAsyncNext, index, blocksize, resolve, reject) - }) - function parseAsyncNext (index, blocksize, resolve, reject) { - if (index >= str.length) { - try { - return resolve(parser.finish()) - } catch (err) { - return reject(prettyError(err, str)) - } - } - try { - parser.parse(str.slice(index, index + blocksize)) - setImmediate(parseAsyncNext, index + blocksize, blocksize, resolve, reject) - } catch (err) { - reject(prettyError(err, str)) - } - } -} diff --git a/node_modules/@iarna/toml/parse-pretty-error.js b/node_modules/@iarna/toml/parse-pretty-error.js deleted file mode 100755 index fc0d31f2..00000000 --- a/node_modules/@iarna/toml/parse-pretty-error.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict' -module.exports = prettyError - -function prettyError (err, buf) { - /* istanbul ignore if */ - if (err.pos == null || err.line == null) return err - let msg = err.message - msg += ` at row ${err.line + 1}, col ${err.col + 1}, pos ${err.pos}:\n` - - /* istanbul ignore else */ - if (buf && buf.split) { - const lines = buf.split(/\n/) - const lineNumWidth = String(Math.min(lines.length, err.line + 3)).length - let linePadding = ' ' - while (linePadding.length < lineNumWidth) linePadding += ' ' - for (let ii = Math.max(0, err.line - 1); ii < Math.min(lines.length, err.line + 2); ++ii) { - let lineNum = String(ii + 1) - if (lineNum.length < lineNumWidth) lineNum = ' ' + lineNum - if (err.line === ii) { - msg += lineNum + '> ' + lines[ii] + '\n' - msg += linePadding + ' ' - for (let hh = 0; hh < err.col; ++hh) { - msg += ' ' - } - msg += '^\n' - } else { - msg += lineNum + ': ' + lines[ii] + '\n' - } - } - } - err.message = msg + '\n' - return err -} diff --git a/node_modules/@iarna/toml/parse-stream.js b/node_modules/@iarna/toml/parse-stream.js deleted file mode 100755 index fb9a6442..00000000 --- a/node_modules/@iarna/toml/parse-stream.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict' -module.exports = parseStream - -const stream = require('stream') -const TOMLParser = require('./lib/toml-parser.js') - -function parseStream (stm) { - if (stm) { - return parseReadable(stm) - } else { - return parseTransform(stm) - } -} - -function parseReadable (stm) { - const parser = new TOMLParser() - stm.setEncoding('utf8') - return new Promise((resolve, reject) => { - let readable - let ended = false - let errored = false - function finish () { - ended = true - if (readable) return - try { - resolve(parser.finish()) - } catch (err) { - reject(err) - } - } - function error (err) { - errored = true - reject(err) - } - stm.once('end', finish) - stm.once('error', error) - readNext() - - function readNext () { - readable = true - let data - while ((data = stm.read()) !== null) { - try { - parser.parse(data) - } catch (err) { - return error(err) - } - } - readable = false - /* istanbul ignore if */ - if (ended) return finish() - /* istanbul ignore if */ - if (errored) return - stm.once('readable', readNext) - } - }) -} - -function parseTransform () { - const parser = new TOMLParser() - return new stream.Transform({ - objectMode: true, - transform (chunk, encoding, cb) { - try { - parser.parse(chunk.toString(encoding)) - } catch (err) { - this.emit('error', err) - } - cb() - }, - flush (cb) { - try { - this.push(parser.finish()) - } catch (err) { - this.emit('error', err) - } - cb() - } - }) -} diff --git a/node_modules/@iarna/toml/parse-string.js b/node_modules/@iarna/toml/parse-string.js deleted file mode 100755 index 84ff7d4c..00000000 --- a/node_modules/@iarna/toml/parse-string.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict' -module.exports = parseString - -const TOMLParser = require('./lib/toml-parser.js') -const prettyError = require('./parse-pretty-error.js') - -function parseString (str) { - if (global.Buffer && global.Buffer.isBuffer(str)) { - str = str.toString('utf8') - } - const parser = new TOMLParser() - try { - parser.parse(str) - return parser.finish() - } catch (err) { - throw prettyError(err, str) - } -} diff --git a/node_modules/@iarna/toml/parse.js b/node_modules/@iarna/toml/parse.js deleted file mode 100755 index 923b9d34..00000000 --- a/node_modules/@iarna/toml/parse.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' -module.exports = require('./parse-string.js') -module.exports.async = require('./parse-async.js') -module.exports.stream = require('./parse-stream.js') -module.exports.prettyError = require('./parse-pretty-error.js') diff --git a/node_modules/@iarna/toml/stringify.js b/node_modules/@iarna/toml/stringify.js deleted file mode 100755 index 958caae8..00000000 --- a/node_modules/@iarna/toml/stringify.js +++ /dev/null @@ -1,296 +0,0 @@ -'use strict' -module.exports = stringify -module.exports.value = stringifyInline - -function stringify (obj) { - if (obj === null) throw typeError('null') - if (obj === void (0)) throw typeError('undefined') - if (typeof obj !== 'object') throw typeError(typeof obj) - - if (typeof obj.toJSON === 'function') obj = obj.toJSON() - if (obj == null) return null - const type = tomlType(obj) - if (type !== 'table') throw typeError(type) - return stringifyObject('', '', obj) -} - -function typeError (type) { - return new Error('Can only stringify objects, not ' + type) -} - -function arrayOneTypeError () { - return new Error("Array values can't have mixed types") -} - -function getInlineKeys (obj) { - return Object.keys(obj).filter(key => isInline(obj[key])) -} -function getComplexKeys (obj) { - return Object.keys(obj).filter(key => !isInline(obj[key])) -} - -function toJSON (obj) { - let nobj = Array.isArray(obj) ? [] : Object.prototype.hasOwnProperty.call(obj, '__proto__') ? {['__proto__']: undefined} : {} - for (let prop of Object.keys(obj)) { - if (obj[prop] && typeof obj[prop].toJSON === 'function' && !('toISOString' in obj[prop])) { - nobj[prop] = obj[prop].toJSON() - } else { - nobj[prop] = obj[prop] - } - } - return nobj -} - -function stringifyObject (prefix, indent, obj) { - obj = toJSON(obj) - var inlineKeys - var complexKeys - inlineKeys = getInlineKeys(obj) - complexKeys = getComplexKeys(obj) - var result = [] - var inlineIndent = indent || '' - inlineKeys.forEach(key => { - var type = tomlType(obj[key]) - if (type !== 'undefined' && type !== 'null') { - result.push(inlineIndent + stringifyKey(key) + ' = ' + stringifyAnyInline(obj[key], true)) - } - }) - if (result.length > 0) result.push('') - var complexIndent = prefix && inlineKeys.length > 0 ? indent + ' ' : '' - complexKeys.forEach(key => { - result.push(stringifyComplex(prefix, complexIndent, key, obj[key])) - }) - return result.join('\n') -} - -function isInline (value) { - switch (tomlType(value)) { - case 'undefined': - case 'null': - case 'integer': - case 'nan': - case 'float': - case 'boolean': - case 'string': - case 'datetime': - return true - case 'array': - return value.length === 0 || tomlType(value[0]) !== 'table' - case 'table': - return Object.keys(value).length === 0 - /* istanbul ignore next */ - default: - return false - } -} - -function tomlType (value) { - if (value === undefined) { - return 'undefined' - } else if (value === null) { - return 'null' - /* eslint-disable valid-typeof */ - } else if (typeof value === 'bigint' || (Number.isInteger(value) && !Object.is(value, -0))) { - return 'integer' - } else if (typeof value === 'number') { - return 'float' - } else if (typeof value === 'boolean') { - return 'boolean' - } else if (typeof value === 'string') { - return 'string' - } else if ('toISOString' in value) { - return isNaN(value) ? 'undefined' : 'datetime' - } else if (Array.isArray(value)) { - return 'array' - } else { - return 'table' - } -} - -function stringifyKey (key) { - var keyStr = String(key) - if (/^[-A-Za-z0-9_]+$/.test(keyStr)) { - return keyStr - } else { - return stringifyBasicString(keyStr) - } -} - -function stringifyBasicString (str) { - return '"' + escapeString(str).replace(/"/g, '\\"') + '"' -} - -function stringifyLiteralString (str) { - return "'" + str + "'" -} - -function numpad (num, str) { - while (str.length < num) str = '0' + str - return str -} - -function escapeString (str) { - return str.replace(/\\/g, '\\\\') - .replace(/[\b]/g, '\\b') - .replace(/\t/g, '\\t') - .replace(/\n/g, '\\n') - .replace(/\f/g, '\\f') - .replace(/\r/g, '\\r') - /* eslint-disable no-control-regex */ - .replace(/([\u0000-\u001f\u007f])/, c => '\\u' + numpad(4, c.codePointAt(0).toString(16))) - /* eslint-enable no-control-regex */ -} - -function stringifyMultilineString (str) { - let escaped = str.split(/\n/).map(str => { - return escapeString(str).replace(/"(?="")/g, '\\"') - }).join('\n') - if (escaped.slice(-1) === '"') escaped += '\\\n' - return '"""\n' + escaped + '"""' -} - -function stringifyAnyInline (value, multilineOk) { - let type = tomlType(value) - if (type === 'string') { - if (multilineOk && /\n/.test(value)) { - type = 'string-multiline' - } else if (!/[\b\t\n\f\r']/.test(value) && /"/.test(value)) { - type = 'string-literal' - } - } - return stringifyInline(value, type) -} - -function stringifyInline (value, type) { - /* istanbul ignore if */ - if (!type) type = tomlType(value) - switch (type) { - case 'string-multiline': - return stringifyMultilineString(value) - case 'string': - return stringifyBasicString(value) - case 'string-literal': - return stringifyLiteralString(value) - case 'integer': - return stringifyInteger(value) - case 'float': - return stringifyFloat(value) - case 'boolean': - return stringifyBoolean(value) - case 'datetime': - return stringifyDatetime(value) - case 'array': - return stringifyInlineArray(value.filter(_ => tomlType(_) !== 'null' && tomlType(_) !== 'undefined' && tomlType(_) !== 'nan')) - case 'table': - return stringifyInlineTable(value) - /* istanbul ignore next */ - default: - throw typeError(type) - } -} - -function stringifyInteger (value) { - /* eslint-disable security/detect-unsafe-regex */ - return String(value).replace(/\B(?=(\d{3})+(?!\d))/g, '_') -} - -function stringifyFloat (value) { - if (value === Infinity) { - return 'inf' - } else if (value === -Infinity) { - return '-inf' - } else if (Object.is(value, NaN)) { - return 'nan' - } else if (Object.is(value, -0)) { - return '-0.0' - } - var chunks = String(value).split('.') - var int = chunks[0] - var dec = chunks[1] || 0 - return stringifyInteger(int) + '.' + dec -} - -function stringifyBoolean (value) { - return String(value) -} - -function stringifyDatetime (value) { - return value.toISOString() -} - -function isNumber (type) { - return type === 'float' || type === 'integer' -} -function arrayType (values) { - var contentType = tomlType(values[0]) - if (values.every(_ => tomlType(_) === contentType)) return contentType - // mixed integer/float, emit as floats - if (values.every(_ => isNumber(tomlType(_)))) return 'float' - return 'mixed' -} -function validateArray (values) { - const type = arrayType(values) - if (type === 'mixed') { - throw arrayOneTypeError() - } - return type -} - -function stringifyInlineArray (values) { - values = toJSON(values) - const type = validateArray(values) - var result = '[' - var stringified = values.map(_ => stringifyInline(_, type)) - if (stringified.join(', ').length > 60 || /\n/.test(stringified)) { - result += '\n ' + stringified.join(',\n ') + '\n' - } else { - result += ' ' + stringified.join(', ') + (stringified.length > 0 ? ' ' : '') - } - return result + ']' -} - -function stringifyInlineTable (value) { - value = toJSON(value) - var result = [] - Object.keys(value).forEach(key => { - result.push(stringifyKey(key) + ' = ' + stringifyAnyInline(value[key], false)) - }) - return '{ ' + result.join(', ') + (result.length > 0 ? ' ' : '') + '}' -} - -function stringifyComplex (prefix, indent, key, value) { - var valueType = tomlType(value) - /* istanbul ignore else */ - if (valueType === 'array') { - return stringifyArrayOfTables(prefix, indent, key, value) - } else if (valueType === 'table') { - return stringifyComplexTable(prefix, indent, key, value) - } else { - throw typeError(valueType) - } -} - -function stringifyArrayOfTables (prefix, indent, key, values) { - values = toJSON(values) - validateArray(values) - var firstValueType = tomlType(values[0]) - /* istanbul ignore if */ - if (firstValueType !== 'table') throw typeError(firstValueType) - var fullKey = prefix + stringifyKey(key) - var result = '' - values.forEach(table => { - if (result.length > 0) result += '\n' - result += indent + '[[' + fullKey + ']]\n' - result += stringifyObject(fullKey + '.', indent, table) - }) - return result -} - -function stringifyComplexTable (prefix, indent, key, value) { - var fullKey = prefix + stringifyKey(key) - var result = '' - if (getInlineKeys(value).length > 0) { - result += indent + '[' + fullKey + ']\n' - } - return result + stringifyObject(fullKey + '.', indent, value) -} diff --git a/node_modules/@iarna/toml/toml.js b/node_modules/@iarna/toml/toml.js deleted file mode 100755 index edca17cc..00000000 --- a/node_modules/@iarna/toml/toml.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict' -exports.parse = require('./parse.js') -exports.stringify = require('./stringify.js') diff --git a/node_modules/ansi-styles/index.js b/node_modules/ansi-styles/index.js deleted file mode 100644 index 90a871c4..00000000 --- a/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,165 +0,0 @@ -'use strict'; -const colorConvert = require('color-convert'); - -const wrapAnsi16 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => function () { - const rgb = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - 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], - - // Bright color - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Fix humans - styles.color.grey = styles.color.gray; - - for (const groupName of Object.keys(styles)) { - const group = styles[groupName]; - - for (const styleName of Object.keys(group)) { - const style = group[styleName]; - - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - } - - const ansi2ansi = n => n; - const rgb2rgb = (r, g, b) => [r, g, b]; - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - styles.color.ansi = { - ansi: wrapAnsi16(ansi2ansi, 0) - }; - styles.color.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 0) - }; - styles.color.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 0) - }; - - styles.bgColor.ansi = { - ansi: wrapAnsi16(ansi2ansi, 10) - }; - styles.bgColor.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 10) - }; - styles.bgColor.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 10) - }; - - for (let key of Object.keys(colorConvert)) { - if (typeof colorConvert[key] !== 'object') { - continue; - } - - const suite = colorConvert[key]; - - if (key === 'ansi16') { - key = 'ansi'; - } - - if ('ansi16' in suite) { - styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); - styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); - } - - if ('ansi256' in suite) { - styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); - styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); - } - - if ('rgb' in suite) { - styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); - styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); - } - } - - return styles; -} - -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); diff --git a/node_modules/ansi-styles/license b/node_modules/ansi-styles/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/ansi-styles/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/ansi-styles/package.json b/node_modules/ansi-styles/package.json deleted file mode 100644 index 871007d6..00000000 --- a/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "_from": "ansi-styles@^3.2.1", - "_id": "ansi-styles@3.2.1", - "_inBundle": false, - "_integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "_location": "/ansi-styles", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "ansi-styles@^3.2.1", - "name": "ansi-styles", - "escapedName": "ansi-styles", - "rawSpec": "^3.2.1", - "saveSpec": null, - "fetchSpec": "^3.2.1" - }, - "_requiredBy": [ - "/args/chalk" - ], - "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "_shasum": "41fbb20243e50b12be0f04b8dedbf07520ce841d", - "_spec": "ansi-styles@^3.2.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/args/node_modules/chalk", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "ava": { - "require": "babel-polyfill" - }, - "bugs": { - "url": "https://github.com/chalk/ansi-styles/issues" - }, - "bundleDependencies": false, - "dependencies": { - "color-convert": "^1.9.0" - }, - "deprecated": false, - "description": "ANSI escape codes for styling strings in the terminal", - "devDependencies": { - "ava": "*", - "babel-polyfill": "^6.23.0", - "svg-term-cli": "^2.1.1", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/chalk/ansi-styles#readme", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "ansi-styles", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/ansi-styles.git" - }, - "scripts": { - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor", - "test": "xo && ava" - }, - "version": "3.2.1" -} diff --git a/node_modules/ansi-styles/readme.md b/node_modules/ansi-styles/readme.md deleted file mode 100644 index 3158e2df..00000000 --- a/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,147 +0,0 @@ -# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) - -> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal - -You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. - -<img src="https://cdn.rawgit.com/chalk/ansi-styles/8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900"> - - -## Install - -``` -$ npm install ansi-styles -``` - - -## Usage - -```js -const style = require('ansi-styles'); - -console.log(`${style.green.open}Hello world!${style.green.close}`); - - -// Color conversion between 16/256/truecolor -// NOTE: If conversion goes to 16 colors or 256 colors, the original color -// may be degraded to fit that color palette. This means terminals -// that do not support 16 million colors will best-match the -// original color. -console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); -console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); -console.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close); -``` - -## API - -Each style has an `open` and `close` property. - - -## Styles - -### Modifiers - -- `reset` -- `bold` -- `dim` -- `italic` *(Not widely supported)* -- `underline` -- `inverse` -- `hidden` -- `strikethrough` *(Not widely supported)* - -### Colors - -- `black` -- `red` -- `green` -- `yellow` -- `blue` -- `magenta` -- `cyan` -- `white` -- `gray` ("bright black") -- `redBright` -- `greenBright` -- `yellowBright` -- `blueBright` -- `magentaBright` -- `cyanBright` -- `whiteBright` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` -- `bgBlackBright` -- `bgRedBright` -- `bgGreenBright` -- `bgYellowBright` -- `bgBlueBright` -- `bgMagentaBright` -- `bgCyanBright` -- `bgWhiteBright` - - -## Advanced usage - -By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. - -- `style.modifier` -- `style.color` -- `style.bgColor` - -###### Example - -```js -console.log(style.color.green.open); -``` - -Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. - -###### Example - -```js -console.log(style.codes.get(36)); -//=> 39 -``` - - -## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) - -`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. - -To use these, call the associated conversion function with the intended output, for example: - -```js -style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code -style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code - -style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code -style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code - -style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code -style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code -``` - - -## Related - -- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/append-buffer/LICENSE b/node_modules/append-buffer/LICENSE deleted file mode 100644 index ffb7ec59..00000000 --- a/node_modules/append-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017, Brian Woodward. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/node_modules/append-buffer/README.md b/node_modules/append-buffer/README.md deleted file mode 100644 index 681a3c36..00000000 --- a/node_modules/append-buffer/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# append-buffer [![NPM version](https://img.shields.io/npm/v/append-buffer.svg?style=flat)](https://www.npmjs.com/package/append-buffer) [![NPM monthly downloads](https://img.shields.io/npm/dm/append-buffer.svg?style=flat)](https://npmjs.org/package/append-buffer) [![NPM total downloads](https://img.shields.io/npm/dt/append-buffer.svg?style=flat)](https://npmjs.org/package/append-buffer) [![Linux Build Status](https://img.shields.io/travis/doowb/append-buffer.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/append-buffer) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/append-buffer.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/append-buffer) - -> Append a buffer to another buffer ensuring to preserve line ending characters. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save append-buffer -``` - -Install with [yarn](https://yarnpkg.com): - -```sh -$ yarn add append-buffer -``` - -## Usage - -```js -var appendBuffer = require('append-buffer'); -``` - -## API - -### [appendBuffer](index.js#L28) - -Append a buffer to another buffer ensuring to preserve line ending characters. - -**Params** - -* `buf` **{Buffer}**: Buffer that will be used to check for an existing line ending. The suffix is appended to this. -* `suffix` **{Buffer}**: Buffer that will be appended to the buf. -* `returns` **{Buffer}**: Final Buffer - -**Example** - -```js -console.log([appendBuffer(new Buffer('abc\r\n'), new Buffer('def')).toString()]); -//=> [ 'abc\r\ndef\r\n' ] - -console.log([appendBuffer(new Buffer('abc\n'), new Buffer('def')).toString()]); -//=> [ 'abc\ndef\n' ] - -// uses os.EOL when a line ending is not found -console.log([appendBuffer(new Buffer('abc'), new Buffer('def')).toString()]); -//=> [ 'abc\ndef' ] -``` - -## Attribution - -The code in this module was originally added in a [PR](https://github.com/jonschlinkert/file-normalize/pull/3) to [file-normalize](https://github.com/jonschlinkert/file-normalize). It has been split out to allow for standalone use cases. - -## About - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Brian Woodward** - -* [github/doowb](https://github.com/doowb) -* [twitter/doowb](https://twitter.com/doowb) - -### License - -Copyright © 2017, [Brian Woodward](https://doowb.com). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on August 01, 2017._ \ No newline at end of file diff --git a/node_modules/append-buffer/index.js b/node_modules/append-buffer/index.js deleted file mode 100644 index a385570b..00000000 --- a/node_modules/append-buffer/index.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -var os = require('os'); -var equals = require('buffer-equal'); -var cr = new Buffer('\r\n'); -var nl = new Buffer('\n'); - -/** - * Append a buffer to another buffer ensuring to preserve line ending characters. - * - * ```js - * console.log([appendBuffer(new Buffer('abc\r\n'), new Buffer('def')).toString()]); - * //=> [ 'abc\r\ndef\r\n' ] - * - * console.log([appendBuffer(new Buffer('abc\n'), new Buffer('def')).toString()]); - * //=> [ 'abc\ndef\n' ] - * - * // uses os.EOL when a line ending is not found - * console.log([appendBuffer(new Buffer('abc'), new Buffer('def')).toString()]); - * //=> [ 'abc\ndef' ] - * * ``` - * @param {Buffer} `buf` Buffer that will be used to check for an existing line ending. The suffix is appended to this. - * @param {Buffer} `suffix` Buffer that will be appended to the buf. - * @return {Buffer} Final Buffer - * @api public - */ - -module.exports = function appendBuffer(buf, suffix) { - if (!suffix || !suffix.length) { - return buf; - } - var eol; - if (equals(buf.slice(-2), cr)) { - eol = cr; - } else if (equals(buf.slice(-1), nl)) { - eol = nl; - } else { - return Buffer.concat([buf, new Buffer(os.EOL), new Buffer(suffix)]); - } - return Buffer.concat([buf, new Buffer(suffix), eol]); -}; diff --git a/node_modules/append-buffer/package.json b/node_modules/append-buffer/package.json deleted file mode 100644 index 4b81453b..00000000 --- a/node_modules/append-buffer/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "_from": "append-buffer@^1.0.2", - "_id": "append-buffer@1.0.2", - "_inBundle": false, - "_integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", - "_location": "/append-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "append-buffer@^1.0.2", - "name": "append-buffer", - "escapedName": "append-buffer", - "rawSpec": "^1.0.2", - "saveSpec": null, - "fetchSpec": "^1.0.2" - }, - "_requiredBy": [ - "/vinyl-sourcemap" - ], - "_resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", - "_shasum": "d8220cf466081525efea50614f3de6514dfa58f1", - "_spec": "append-buffer@^1.0.2", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-sourcemap", - "author": { - "name": "Brian Woodward", - "url": "https://doowb.com" - }, - "bugs": { - "url": "https://github.com/doowb/append-buffer/issues" - }, - "bundleDependencies": false, - "dependencies": { - "buffer-equal": "^1.0.0" - }, - "deprecated": false, - "description": "Append a buffer to another buffer ensuring to preserve line ending characters.", - "devDependencies": { - "gulp-format-md": "^1.0.0", - "mocha": "^3.5.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/doowb/append-buffer", - "keywords": [ - "append", - "append-buffer", - "concat", - "concat-buffer", - "eol", - "join", - "join-buffer", - "normalize", - "buffer" - ], - "license": "MIT", - "main": "index.js", - "name": "append-buffer", - "repository": { - "type": "git", - "url": "git+https://github.com/doowb/append-buffer.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - } - }, - "version": "1.0.2" -} diff --git a/node_modules/argparse/CHANGELOG.md b/node_modules/argparse/CHANGELOG.md deleted file mode 100644 index dc39ed69..00000000 --- a/node_modules/argparse/CHANGELOG.md +++ /dev/null @@ -1,216 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - - -## [2.0.1] - 2020-08-29 -### Fixed -- Fix issue with `process.argv` when used with interpreters (`coffee`, `ts-node`, etc.), #150. - - -## [2.0.0] - 2020-08-14 -### Changed -- Full rewrite. Now port from python 3.9.0 & more precise following. - See [doc](./doc) for difference and migration info. -- node.js 10+ required -- Removed most of local docs in favour of original ones. - - -## [1.0.10] - 2018-02-15 -### Fixed -- Use .concat instead of + for arrays, #122. - - -## [1.0.9] - 2016-09-29 -### Changed -- Rerelease after 1.0.8 - deps cleanup. - - -## [1.0.8] - 2016-09-29 -### Changed -- Maintenance (deps bump, fix node 6.5+ tests, coverage report). - - -## [1.0.7] - 2016-03-17 -### Changed -- Teach `addArgument` to accept string arg names. #97, @tomxtobin. - - -## [1.0.6] - 2016-02-06 -### Changed -- Maintenance: moved to eslint & updated CS. - - -## [1.0.5] - 2016-02-05 -### Changed -- Removed lodash dependency to significantly reduce install size. - Thanks to @mourner. - - -## [1.0.4] - 2016-01-17 -### Changed -- Maintenance: lodash update to 4.0.0. - - -## [1.0.3] - 2015-10-27 -### Fixed -- Fix parse `=` in args: `--examplepath="C:\myfolder\env=x64"`. #84, @CatWithApple. - - -## [1.0.2] - 2015-03-22 -### Changed -- Relaxed lodash version dependency. - - -## [1.0.1] - 2015-02-20 -### Changed -- Changed dependencies to be compatible with ancient nodejs. - - -## [1.0.0] - 2015-02-19 -### Changed -- Maintenance release. -- Replaced `underscore` with `lodash`. -- Bumped version to 1.0.0 to better reflect semver meaning. -- HISTORY.md -> CHANGELOG.md - - -## [0.1.16] - 2013-12-01 -### Changed -- Maintenance release. Updated dependencies and docs. - - -## [0.1.15] - 2013-05-13 -### Fixed -- Fixed #55, @trebor89 - - -## [0.1.14] - 2013-05-12 -### Fixed -- Fixed #62, @maxtaco - - -## [0.1.13] - 2013-04-08 -### Changed -- Added `.npmignore` to reduce package size - - -## [0.1.12] - 2013-02-10 -### Fixed -- Fixed conflictHandler (#46), @hpaulj - - -## [0.1.11] - 2013-02-07 -### Added -- Added 70+ tests (ported from python), @hpaulj -- Added conflictHandler, @applepicke -- Added fromfilePrefixChar, @hpaulj - -### Fixed -- Multiple bugfixes, @hpaulj - - -## [0.1.10] - 2012-12-30 -### Added -- Added [mutual exclusion](http://docs.python.org/dev/library/argparse.html#mutual-exclusion) - support, thanks to @hpaulj - -### Fixed -- Fixed options check for `storeConst` & `appendConst` actions, thanks to @hpaulj - - -## [0.1.9] - 2012-12-27 -### Fixed -- Fixed option dest interferens with other options (issue #23), thanks to @hpaulj -- Fixed default value behavior with `*` positionals, thanks to @hpaulj -- Improve `getDefault()` behavior, thanks to @hpaulj -- Improve negative argument parsing, thanks to @hpaulj - - -## [0.1.8] - 2012-12-01 -### Fixed -- Fixed parser parents (issue #19), thanks to @hpaulj -- Fixed negative argument parse (issue #20), thanks to @hpaulj - - -## [0.1.7] - 2012-10-14 -### Fixed -- Fixed 'choices' argument parse (issue #16) -- Fixed stderr output (issue #15) - - -## [0.1.6] - 2012-09-09 -### Fixed -- Fixed check for conflict of options (thanks to @tomxtobin) - - -## [0.1.5] - 2012-09-03 -### Fixed -- Fix parser #setDefaults method (thanks to @tomxtobin) - - -## [0.1.4] - 2012-07-30 -### Fixed -- Fixed pseudo-argument support (thanks to @CGamesPlay) -- Fixed addHelp default (should be true), if not set (thanks to @benblank) - - -## [0.1.3] - 2012-06-27 -### Fixed -- Fixed formatter api name: Formatter -> HelpFormatter - - -## [0.1.2] - 2012-05-29 -### Fixed -- Removed excess whitespace in help -- Fixed error reporting, when parcer with subcommands - called with empty arguments - -### Added -- Added basic tests - - -## [0.1.1] - 2012-05-23 -### Fixed -- Fixed line wrapping in help formatter -- Added better error reporting on invalid arguments - - -## [0.1.0] - 2012-05-16 -### Added -- First release. - - -[2.0.1]: https://github.com/nodeca/argparse/compare/2.0.0...2.0.1 -[2.0.0]: https://github.com/nodeca/argparse/compare/1.0.10...2.0.0 -[1.0.10]: https://github.com/nodeca/argparse/compare/1.0.9...1.0.10 -[1.0.9]: https://github.com/nodeca/argparse/compare/1.0.8...1.0.9 -[1.0.8]: https://github.com/nodeca/argparse/compare/1.0.7...1.0.8 -[1.0.7]: https://github.com/nodeca/argparse/compare/1.0.6...1.0.7 -[1.0.6]: https://github.com/nodeca/argparse/compare/1.0.5...1.0.6 -[1.0.5]: https://github.com/nodeca/argparse/compare/1.0.4...1.0.5 -[1.0.4]: https://github.com/nodeca/argparse/compare/1.0.3...1.0.4 -[1.0.3]: https://github.com/nodeca/argparse/compare/1.0.2...1.0.3 -[1.0.2]: https://github.com/nodeca/argparse/compare/1.0.1...1.0.2 -[1.0.1]: https://github.com/nodeca/argparse/compare/1.0.0...1.0.1 -[1.0.0]: https://github.com/nodeca/argparse/compare/0.1.16...1.0.0 -[0.1.16]: https://github.com/nodeca/argparse/compare/0.1.15...0.1.16 -[0.1.15]: https://github.com/nodeca/argparse/compare/0.1.14...0.1.15 -[0.1.14]: https://github.com/nodeca/argparse/compare/0.1.13...0.1.14 -[0.1.13]: https://github.com/nodeca/argparse/compare/0.1.12...0.1.13 -[0.1.12]: https://github.com/nodeca/argparse/compare/0.1.11...0.1.12 -[0.1.11]: https://github.com/nodeca/argparse/compare/0.1.10...0.1.11 -[0.1.10]: https://github.com/nodeca/argparse/compare/0.1.9...0.1.10 -[0.1.9]: https://github.com/nodeca/argparse/compare/0.1.8...0.1.9 -[0.1.8]: https://github.com/nodeca/argparse/compare/0.1.7...0.1.8 -[0.1.7]: https://github.com/nodeca/argparse/compare/0.1.6...0.1.7 -[0.1.6]: https://github.com/nodeca/argparse/compare/0.1.5...0.1.6 -[0.1.5]: https://github.com/nodeca/argparse/compare/0.1.4...0.1.5 -[0.1.4]: https://github.com/nodeca/argparse/compare/0.1.3...0.1.4 -[0.1.3]: https://github.com/nodeca/argparse/compare/0.1.2...0.1.3 -[0.1.2]: https://github.com/nodeca/argparse/compare/0.1.1...0.1.2 -[0.1.1]: https://github.com/nodeca/argparse/compare/0.1.0...0.1.1 -[0.1.0]: https://github.com/nodeca/argparse/releases/tag/0.1.0 diff --git a/node_modules/argparse/LICENSE b/node_modules/argparse/LICENSE deleted file mode 100644 index 66a3ac80..00000000 --- a/node_modules/argparse/LICENSE +++ /dev/null @@ -1,254 +0,0 @@ -A. HISTORY OF THE SOFTWARE -========================== - -Python was created in the early 1990s by Guido van Rossum at Stichting -Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands -as a successor of a language called ABC. Guido remains Python's -principal author, although it includes many contributions from others. - -In 1995, Guido continued his work on Python at the Corporation for -National Research Initiatives (CNRI, see http://www.cnri.reston.va.us) -in Reston, Virginia where he released several versions of the -software. - -In May 2000, Guido and the Python core development team moved to -BeOpen.com to form the BeOpen PythonLabs team. In October of the same -year, the PythonLabs team moved to Digital Creations, which became -Zope Corporation. In 2001, the Python Software Foundation (PSF, see -https://www.python.org/psf/) was formed, a non-profit organization -created specifically to own Python-related Intellectual Property. -Zope Corporation was a sponsoring member of the PSF. - -All Python releases are Open Source (see http://www.opensource.org for -the Open Source Definition). Historically, most, but not all, Python -releases have also been GPL-compatible; the table below summarizes -the various releases. - - Release Derived Year Owner GPL- - from compatible? (1) - - 0.9.0 thru 1.2 1991-1995 CWI yes - 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes - 1.6 1.5.2 2000 CNRI no - 2.0 1.6 2000 BeOpen.com no - 1.6.1 1.6 2001 CNRI yes (2) - 2.1 2.0+1.6.1 2001 PSF no - 2.0.1 2.0+1.6.1 2001 PSF yes - 2.1.1 2.1+2.0.1 2001 PSF yes - 2.1.2 2.1.1 2002 PSF yes - 2.1.3 2.1.2 2002 PSF yes - 2.2 and above 2.1.1 2001-now PSF yes - -Footnotes: - -(1) GPL-compatible doesn't mean that we're distributing Python under - the GPL. All Python licenses, unlike the GPL, let you distribute - a modified version without making your changes open source. The - GPL-compatible licenses make it possible to combine Python with - other software that is released under the GPL; the others don't. - -(2) According to Richard Stallman, 1.6.1 is not GPL-compatible, - because its license has a choice of law clause. According to - CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1 - is "not incompatible" with the GPL. - -Thanks to the many outside volunteers who have worked under Guido's -direction to make these releases possible. - - -B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON -=============================================================== - -PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 --------------------------------------------- - -1. This LICENSE AGREEMENT is between the Python Software Foundation -("PSF"), and the Individual or Organization ("Licensee") accessing and -otherwise using this software ("Python") in source or binary form and -its associated documentation. - -2. Subject to the terms and conditions of this License Agreement, PSF hereby -grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, -analyze, test, perform and/or display publicly, prepare derivative works, -distribute, and otherwise use Python alone or in any derivative version, -provided, however, that PSF's License Agreement and PSF's notice of copyright, -i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation; -All Rights Reserved" are retained in Python alone or in any derivative version -prepared by Licensee. - -3. In the event Licensee prepares a derivative work that is based on -or incorporates Python or any part thereof, and wants to make -the derivative work available to others as provided herein, then -Licensee hereby agrees to include in any such work a brief summary of -the changes made to Python. - -4. PSF is making Python available to Licensee on an "AS IS" -basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND -DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT -INFRINGE ANY THIRD PARTY RIGHTS. - -5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON -FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS -A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, -OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. - -6. This License Agreement will automatically terminate upon a material -breach of its terms and conditions. - -7. Nothing in this License Agreement shall be deemed to create any -relationship of agency, partnership, or joint venture between PSF and -Licensee. This License Agreement does not grant permission to use PSF -trademarks or trade name in a trademark sense to endorse or promote -products or services of Licensee, or any third party. - -8. By copying, installing or otherwise using Python, Licensee -agrees to be bound by the terms and conditions of this License -Agreement. - - -BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 -------------------------------------------- - -BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 - -1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an -office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the -Individual or Organization ("Licensee") accessing and otherwise using -this software in source or binary form and its associated -documentation ("the Software"). - -2. Subject to the terms and conditions of this BeOpen Python License -Agreement, BeOpen hereby grants Licensee a non-exclusive, -royalty-free, world-wide license to reproduce, analyze, test, perform -and/or display publicly, prepare derivative works, distribute, and -otherwise use the Software alone or in any derivative version, -provided, however, that the BeOpen Python License is retained in the -Software, alone or in any derivative version prepared by Licensee. - -3. BeOpen is making the Software available to Licensee on an "AS IS" -basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND -DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT -INFRINGE ANY THIRD PARTY RIGHTS. - -4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE -SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS -AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY -DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. - -5. This License Agreement will automatically terminate upon a material -breach of its terms and conditions. - -6. This License Agreement shall be governed by and interpreted in all -respects by the law of the State of California, excluding conflict of -law provisions. Nothing in this License Agreement shall be deemed to -create any relationship of agency, partnership, or joint venture -between BeOpen and Licensee. This License Agreement does not grant -permission to use BeOpen trademarks or trade names in a trademark -sense to endorse or promote products or services of Licensee, or any -third party. As an exception, the "BeOpen Python" logos available at -http://www.pythonlabs.com/logos.html may be used according to the -permissions granted on that web page. - -7. By copying, installing or otherwise using the software, Licensee -agrees to be bound by the terms and conditions of this License -Agreement. - - -CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 ---------------------------------------- - -1. This LICENSE AGREEMENT is between the Corporation for National -Research Initiatives, having an office at 1895 Preston White Drive, -Reston, VA 20191 ("CNRI"), and the Individual or Organization -("Licensee") accessing and otherwise using Python 1.6.1 software in -source or binary form and its associated documentation. - -2. Subject to the terms and conditions of this License Agreement, CNRI -hereby grants Licensee a nonexclusive, royalty-free, world-wide -license to reproduce, analyze, test, perform and/or display publicly, -prepare derivative works, distribute, and otherwise use Python 1.6.1 -alone or in any derivative version, provided, however, that CNRI's -License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) -1995-2001 Corporation for National Research Initiatives; All Rights -Reserved" are retained in Python 1.6.1 alone or in any derivative -version prepared by Licensee. Alternately, in lieu of CNRI's License -Agreement, Licensee may substitute the following text (omitting the -quotes): "Python 1.6.1 is made available subject to the terms and -conditions in CNRI's License Agreement. This Agreement together with -Python 1.6.1 may be located on the Internet using the following -unique, persistent identifier (known as a handle): 1895.22/1013. This -Agreement may also be obtained from a proxy server on the Internet -using the following URL: http://hdl.handle.net/1895.22/1013". - -3. In the event Licensee prepares a derivative work that is based on -or incorporates Python 1.6.1 or any part thereof, and wants to make -the derivative work available to others as provided herein, then -Licensee hereby agrees to include in any such work a brief summary of -the changes made to Python 1.6.1. - -4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" -basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND -DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT -INFRINGE ANY THIRD PARTY RIGHTS. - -5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON -1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS -A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, -OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. - -6. This License Agreement will automatically terminate upon a material -breach of its terms and conditions. - -7. This License Agreement shall be governed by the federal -intellectual property law of the United States, including without -limitation the federal copyright law, and, to the extent such -U.S. federal law does not apply, by the law of the Commonwealth of -Virginia, excluding Virginia's conflict of law provisions. -Notwithstanding the foregoing, with regard to derivative works based -on Python 1.6.1 that incorporate non-separable material that was -previously distributed under the GNU General Public License (GPL), the -law of the Commonwealth of Virginia shall govern this License -Agreement only as to issues arising under or with respect to -Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this -License Agreement shall be deemed to create any relationship of -agency, partnership, or joint venture between CNRI and Licensee. This -License Agreement does not grant permission to use CNRI trademarks or -trade name in a trademark sense to endorse or promote products or -services of Licensee, or any third party. - -8. By clicking on the "ACCEPT" button where indicated, or by copying, -installing or otherwise using Python 1.6.1, Licensee agrees to be -bound by the terms and conditions of this License Agreement. - - ACCEPT - - -CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 --------------------------------------------------- - -Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, -The Netherlands. All rights reserved. - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Stichting Mathematisch -Centrum or CWI not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - -STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO -THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE -FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/argparse/README.md b/node_modules/argparse/README.md deleted file mode 100644 index 550b5c9b..00000000 --- a/node_modules/argparse/README.md +++ /dev/null @@ -1,84 +0,0 @@ -argparse -======== - -[![Build Status](https://secure.travis-ci.org/nodeca/argparse.svg?branch=master)](http://travis-ci.org/nodeca/argparse) -[![NPM version](https://img.shields.io/npm/v/argparse.svg)](https://www.npmjs.org/package/argparse) - -CLI arguments parser for node.js, with [sub-commands](https://docs.python.org/3.9/library/argparse.html#sub-commands) support. Port of python's [argparse](http://docs.python.org/dev/library/argparse.html) (version [3.9.0](https://github.com/python/cpython/blob/v3.9.0rc1/Lib/argparse.py)). - -**Difference with original.** - -- JS has no keyword arguments support. - - Pass options instead: `new ArgumentParser({ description: 'example', add_help: true })`. -- JS has no python's types `int`, `float`, ... - - Use string-typed names: `.add_argument('-b', { type: 'int', help: 'help' })`. -- `%r` format specifier uses `require('util').inspect()`. - -More details in [doc](./doc). - - -Example -------- - -`test.js` file: - -```javascript -#!/usr/bin/env node -'use strict'; - -const { ArgumentParser } = require('argparse'); -const { version } = require('./package.json'); - -const parser = new ArgumentParser({ - description: 'Argparse example' -}); - -parser.add_argument('-v', '--version', { action: 'version', version }); -parser.add_argument('-f', '--foo', { help: 'foo bar' }); -parser.add_argument('-b', '--bar', { help: 'bar foo' }); -parser.add_argument('--baz', { help: 'baz bar' }); - -console.dir(parser.parse_args()); -``` - -Display help: - -``` -$ ./test.js -h -usage: test.js [-h] [-v] [-f FOO] [-b BAR] [--baz BAZ] - -Argparse example - -optional arguments: - -h, --help show this help message and exit - -v, --version show program's version number and exit - -f FOO, --foo FOO foo bar - -b BAR, --bar BAR bar foo - --baz BAZ baz bar -``` - -Parse arguments: - -``` -$ ./test.js -f=3 --bar=4 --baz 5 -{ foo: '3', bar: '4', baz: '5' } -``` - - -API docs --------- - -Since this is a port with minimal divergence, there's no separate documentation. -Use original one instead, with notes about difference. - -1. [Original doc](https://docs.python.org/3.9/library/argparse.html). -2. [Original tutorial](https://docs.python.org/3.9/howto/argparse.html). -3. [Difference with python](./doc). - - -argparse for enterprise ------------------------ - -Available as part of the Tidelift Subscription - -The maintainers of argparse and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-argparse?utm_source=npm-argparse&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/argparse/argparse.js b/node_modules/argparse/argparse.js deleted file mode 100644 index 2b8c8c63..00000000 --- a/node_modules/argparse/argparse.js +++ /dev/null @@ -1,3707 +0,0 @@ -// Port of python's argparse module, version 3.9.0: -// https://github.com/python/cpython/blob/v3.9.0rc1/Lib/argparse.py - -'use strict' - -// Copyright (C) 2010-2020 Python Software Foundation. -// Copyright (C) 2020 argparse.js authors - -/* - * Command-line parsing library - * - * This module is an optparse-inspired command-line parsing library that: - * - * - handles both optional and positional arguments - * - produces highly informative usage messages - * - supports parsers that dispatch to sub-parsers - * - * The following is a simple usage example that sums integers from the - * command-line and writes the result to a file:: - * - * parser = argparse.ArgumentParser( - * description='sum the integers at the command line') - * parser.add_argument( - * 'integers', metavar='int', nargs='+', type=int, - * help='an integer to be summed') - * parser.add_argument( - * '--log', default=sys.stdout, type=argparse.FileType('w'), - * help='the file where the sum should be written') - * args = parser.parse_args() - * args.log.write('%s' % sum(args.integers)) - * args.log.close() - * - * The module contains the following public classes: - * - * - ArgumentParser -- The main entry point for command-line parsing. As the - * example above shows, the add_argument() method is used to populate - * the parser with actions for optional and positional arguments. Then - * the parse_args() method is invoked to convert the args at the - * command-line into an object with attributes. - * - * - ArgumentError -- The exception raised by ArgumentParser objects when - * there are errors with the parser's actions. Errors raised while - * parsing the command-line are caught by ArgumentParser and emitted - * as command-line messages. - * - * - FileType -- A factory for defining types of files to be created. As the - * example above shows, instances of FileType are typically passed as - * the type= argument of add_argument() calls. - * - * - Action -- The base class for parser actions. Typically actions are - * selected by passing strings like 'store_true' or 'append_const' to - * the action= argument of add_argument(). However, for greater - * customization of ArgumentParser actions, subclasses of Action may - * be defined and passed as the action= argument. - * - * - HelpFormatter, RawDescriptionHelpFormatter, RawTextHelpFormatter, - * ArgumentDefaultsHelpFormatter -- Formatter classes which - * may be passed as the formatter_class= argument to the - * ArgumentParser constructor. HelpFormatter is the default, - * RawDescriptionHelpFormatter and RawTextHelpFormatter tell the parser - * not to change the formatting for help text, and - * ArgumentDefaultsHelpFormatter adds information about argument defaults - * to the help. - * - * All other classes in this module are considered implementation details. - * (Also note that HelpFormatter and RawDescriptionHelpFormatter are only - * considered public as object names -- the API of the formatter objects is - * still considered an implementation detail.) - */ - -const SUPPRESS = '==SUPPRESS==' - -const OPTIONAL = '?' -const ZERO_OR_MORE = '*' -const ONE_OR_MORE = '+' -const PARSER = 'A...' -const REMAINDER = '...' -const _UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args' - - -// ================================== -// Utility functions used for porting -// ================================== -const assert = require('assert') -const util = require('util') -const fs = require('fs') -const sub = require('./lib/sub') -const path = require('path') -const repr = util.inspect - -function get_argv() { - // omit first argument (which is assumed to be interpreter - `node`, `coffee`, `ts-node`, etc.) - return process.argv.slice(1) -} - -function get_terminal_size() { - return { - columns: +process.env.COLUMNS || process.stdout.columns || 80 - } -} - -function hasattr(object, name) { - return Object.prototype.hasOwnProperty.call(object, name) -} - -function getattr(object, name, value) { - return hasattr(object, name) ? object[name] : value -} - -function setattr(object, name, value) { - object[name] = value -} - -function setdefault(object, name, value) { - if (!hasattr(object, name)) object[name] = value - return object[name] -} - -function delattr(object, name) { - delete object[name] -} - -function range(from, to, step=1) { - // range(10) is equivalent to range(0, 10) - if (arguments.length === 1) [ to, from ] = [ from, 0 ] - if (typeof from !== 'number' || typeof to !== 'number' || typeof step !== 'number') { - throw new TypeError('argument cannot be interpreted as an integer') - } - if (step === 0) throw new TypeError('range() arg 3 must not be zero') - - let result = [] - if (step > 0) { - for (let i = from; i < to; i += step) result.push(i) - } else { - for (let i = from; i > to; i += step) result.push(i) - } - return result -} - -function splitlines(str, keepends = false) { - let result - if (!keepends) { - result = str.split(/\r\n|[\n\r\v\f\x1c\x1d\x1e\x85\u2028\u2029]/) - } else { - result = [] - let parts = str.split(/(\r\n|[\n\r\v\f\x1c\x1d\x1e\x85\u2028\u2029])/) - for (let i = 0; i < parts.length; i += 2) { - result.push(parts[i] + (i + 1 < parts.length ? parts[i + 1] : '')) - } - } - if (!result[result.length - 1]) result.pop() - return result -} - -function _string_lstrip(string, prefix_chars) { - let idx = 0 - while (idx < string.length && prefix_chars.includes(string[idx])) idx++ - return idx ? string.slice(idx) : string -} - -function _string_split(string, sep, maxsplit) { - let result = string.split(sep) - if (result.length > maxsplit) { - result = result.slice(0, maxsplit).concat([ result.slice(maxsplit).join(sep) ]) - } - return result -} - -function _array_equal(array1, array2) { - if (array1.length !== array2.length) return false - for (let i = 0; i < array1.length; i++) { - if (array1[i] !== array2[i]) return false - } - return true -} - -function _array_remove(array, item) { - let idx = array.indexOf(item) - if (idx === -1) throw new TypeError(sub('%r not in list', item)) - array.splice(idx, 1) -} - -// normalize choices to array; -// this isn't required in python because `in` and `map` operators work with anything, -// but in js dealing with multiple types here is too clunky -function _choices_to_array(choices) { - if (choices === undefined) { - return [] - } else if (Array.isArray(choices)) { - return choices - } else if (choices !== null && typeof choices[Symbol.iterator] === 'function') { - return Array.from(choices) - } else if (typeof choices === 'object' && choices !== null) { - return Object.keys(choices) - } else { - throw new Error(sub('invalid choices value: %r', choices)) - } -} - -// decorator that allows a class to be called without new -function _callable(cls) { - let result = { // object is needed for inferred class name - [cls.name]: function (...args) { - let this_class = new.target === result || !new.target - return Reflect.construct(cls, args, this_class ? cls : new.target) - } - } - result[cls.name].prototype = cls.prototype - // fix default tag for toString, e.g. [object Action] instead of [object Object] - cls.prototype[Symbol.toStringTag] = cls.name - return result[cls.name] -} - -function _alias(object, from, to) { - try { - let name = object.constructor.name - Object.defineProperty(object, from, { - value: util.deprecate(object[to], sub('%s.%s() is renamed to %s.%s()', - name, from, name, to)), - enumerable: false - }) - } catch {} -} - -// decorator that allows snake_case class methods to be called with camelCase and vice versa -function _camelcase_alias(_class) { - for (let name of Object.getOwnPropertyNames(_class.prototype)) { - let camelcase = name.replace(/\w_[a-z]/g, s => s[0] + s[2].toUpperCase()) - if (camelcase !== name) _alias(_class.prototype, camelcase, name) - } - return _class -} - -function _to_legacy_name(key) { - key = key.replace(/\w_[a-z]/g, s => s[0] + s[2].toUpperCase()) - if (key === 'default') key = 'defaultValue' - if (key === 'const') key = 'constant' - return key -} - -function _to_new_name(key) { - if (key === 'defaultValue') key = 'default' - if (key === 'constant') key = 'const' - key = key.replace(/[A-Z]/g, c => '_' + c.toLowerCase()) - return key -} - -// parse options -let no_default = Symbol('no_default_value') -function _parse_opts(args, descriptor) { - function get_name() { - let stack = new Error().stack.split('\n') - .map(x => x.match(/^ at (.*) \(.*\)$/)) - .filter(Boolean) - .map(m => m[1]) - .map(fn => fn.match(/[^ .]*$/)[0]) - - if (stack.length && stack[0] === get_name.name) stack.shift() - if (stack.length && stack[0] === _parse_opts.name) stack.shift() - return stack.length ? stack[0] : '' - } - - args = Array.from(args) - let kwargs = {} - let result = [] - let last_opt = args.length && args[args.length - 1] - - if (typeof last_opt === 'object' && last_opt !== null && !Array.isArray(last_opt) && - (!last_opt.constructor || last_opt.constructor.name === 'Object')) { - kwargs = Object.assign({}, args.pop()) - } - - // LEGACY (v1 compatibility): camelcase - let renames = [] - for (let key of Object.keys(descriptor)) { - let old_name = _to_legacy_name(key) - if (old_name !== key && (old_name in kwargs)) { - if (key in kwargs) { - // default and defaultValue specified at the same time, happens often in old tests - //throw new TypeError(sub('%s() got multiple values for argument %r', get_name(), key)) - } else { - kwargs[key] = kwargs[old_name] - } - renames.push([ old_name, key ]) - delete kwargs[old_name] - } - } - if (renames.length) { - let name = get_name() - deprecate('camelcase_' + name, sub('%s(): following options are renamed: %s', - name, renames.map(([ a, b ]) => sub('%r -> %r', a, b)))) - } - // end - - let missing_positionals = [] - let positional_count = args.length - - for (let [ key, def ] of Object.entries(descriptor)) { - if (key[0] === '*') { - if (key.length > 0 && key[1] === '*') { - // LEGACY (v1 compatibility): camelcase - let renames = [] - for (let key of Object.keys(kwargs)) { - let new_name = _to_new_name(key) - if (new_name !== key && (key in kwargs)) { - if (new_name in kwargs) { - // default and defaultValue specified at the same time, happens often in old tests - //throw new TypeError(sub('%s() got multiple values for argument %r', get_name(), new_name)) - } else { - kwargs[new_name] = kwargs[key] - } - renames.push([ key, new_name ]) - delete kwargs[key] - } - } - if (renames.length) { - let name = get_name() - deprecate('camelcase_' + name, sub('%s(): following options are renamed: %s', - name, renames.map(([ a, b ]) => sub('%r -> %r', a, b)))) - } - // end - result.push(kwargs) - kwargs = {} - } else { - result.push(args) - args = [] - } - } else if (key in kwargs && args.length > 0) { - throw new TypeError(sub('%s() got multiple values for argument %r', get_name(), key)) - } else if (key in kwargs) { - result.push(kwargs[key]) - delete kwargs[key] - } else if (args.length > 0) { - result.push(args.shift()) - } else if (def !== no_default) { - result.push(def) - } else { - missing_positionals.push(key) - } - } - - if (Object.keys(kwargs).length) { - throw new TypeError(sub('%s() got an unexpected keyword argument %r', - get_name(), Object.keys(kwargs)[0])) - } - - if (args.length) { - let from = Object.entries(descriptor).filter(([ k, v ]) => k[0] !== '*' && v !== no_default).length - let to = Object.entries(descriptor).filter(([ k ]) => k[0] !== '*').length - throw new TypeError(sub('%s() takes %s positional argument%s but %s %s given', - get_name(), - from === to ? sub('from %s to %s', from, to) : to, - from === to && to === 1 ? '' : 's', - positional_count, - positional_count === 1 ? 'was' : 'were')) - } - - if (missing_positionals.length) { - let strs = missing_positionals.map(repr) - if (strs.length > 1) strs[strs.length - 1] = 'and ' + strs[strs.length - 1] - let str_joined = strs.join(strs.length === 2 ? '' : ', ') - throw new TypeError(sub('%s() missing %i required positional argument%s: %s', - get_name(), strs.length, strs.length === 1 ? '' : 's', str_joined)) - } - - return result -} - -let _deprecations = {} -function deprecate(id, string) { - _deprecations[id] = _deprecations[id] || util.deprecate(() => {}, string) - _deprecations[id]() -} - - -// ============================= -// Utility functions and classes -// ============================= -function _AttributeHolder(cls = Object) { - /* - * Abstract base class that provides __repr__. - * - * The __repr__ method returns a string in the format:: - * ClassName(attr=name, attr=name, ...) - * The attributes are determined either by a class-level attribute, - * '_kwarg_names', or by inspecting the instance __dict__. - */ - - return class _AttributeHolder extends cls { - [util.inspect.custom]() { - let type_name = this.constructor.name - let arg_strings = [] - let star_args = {} - for (let arg of this._get_args()) { - arg_strings.push(repr(arg)) - } - for (let [ name, value ] of this._get_kwargs()) { - if (/^[a-z_][a-z0-9_$]*$/i.test(name)) { - arg_strings.push(sub('%s=%r', name, value)) - } else { - star_args[name] = value - } - } - if (Object.keys(star_args).length) { - arg_strings.push(sub('**%s', repr(star_args))) - } - return sub('%s(%s)', type_name, arg_strings.join(', ')) - } - - toString() { - return this[util.inspect.custom]() - } - - _get_kwargs() { - return Object.entries(this) - } - - _get_args() { - return [] - } - } -} - - -function _copy_items(items) { - if (items === undefined) { - return [] - } - return items.slice(0) -} - - -// =============== -// Formatting Help -// =============== -const HelpFormatter = _camelcase_alias(_callable(class HelpFormatter { - /* - * Formatter for generating usage messages and argument help strings. - * - * Only the name of this class is considered a public API. All the methods - * provided by the class are considered an implementation detail. - */ - - constructor() { - let [ - prog, - indent_increment, - max_help_position, - width - ] = _parse_opts(arguments, { - prog: no_default, - indent_increment: 2, - max_help_position: 24, - width: undefined - }) - - // default setting for width - if (width === undefined) { - width = get_terminal_size().columns - width -= 2 - } - - this._prog = prog - this._indent_increment = indent_increment - this._max_help_position = Math.min(max_help_position, - Math.max(width - 20, indent_increment * 2)) - this._width = width - - this._current_indent = 0 - this._level = 0 - this._action_max_length = 0 - - this._root_section = this._Section(this, undefined) - this._current_section = this._root_section - - this._whitespace_matcher = /[ \t\n\r\f\v]+/g // equivalent to python /\s+/ with ASCII flag - this._long_break_matcher = /\n\n\n+/g - } - - // =============================== - // Section and indentation methods - // =============================== - _indent() { - this._current_indent += this._indent_increment - this._level += 1 - } - - _dedent() { - this._current_indent -= this._indent_increment - assert(this._current_indent >= 0, 'Indent decreased below 0.') - this._level -= 1 - } - - _add_item(func, args) { - this._current_section.items.push([ func, args ]) - } - - // ======================== - // Message building methods - // ======================== - start_section(heading) { - this._indent() - let section = this._Section(this, this._current_section, heading) - this._add_item(section.format_help.bind(section), []) - this._current_section = section - } - - end_section() { - this._current_section = this._current_section.parent - this._dedent() - } - - add_text(text) { - if (text !== SUPPRESS && text !== undefined) { - this._add_item(this._format_text.bind(this), [text]) - } - } - - add_usage(usage, actions, groups, prefix = undefined) { - if (usage !== SUPPRESS) { - let args = [ usage, actions, groups, prefix ] - this._add_item(this._format_usage.bind(this), args) - } - } - - add_argument(action) { - if (action.help !== SUPPRESS) { - - // find all invocations - let invocations = [this._format_action_invocation(action)] - for (let subaction of this._iter_indented_subactions(action)) { - invocations.push(this._format_action_invocation(subaction)) - } - - // update the maximum item length - let invocation_length = Math.max(...invocations.map(invocation => invocation.length)) - let action_length = invocation_length + this._current_indent - this._action_max_length = Math.max(this._action_max_length, - action_length) - - // add the item to the list - this._add_item(this._format_action.bind(this), [action]) - } - } - - add_arguments(actions) { - for (let action of actions) { - this.add_argument(action) - } - } - - // ======================= - // Help-formatting methods - // ======================= - format_help() { - let help = this._root_section.format_help() - if (help) { - help = help.replace(this._long_break_matcher, '\n\n') - help = help.replace(/^\n+|\n+$/g, '') + '\n' - } - return help - } - - _join_parts(part_strings) { - return part_strings.filter(part => part && part !== SUPPRESS).join('') - } - - _format_usage(usage, actions, groups, prefix) { - if (prefix === undefined) { - prefix = 'usage: ' - } - - // if usage is specified, use that - if (usage !== undefined) { - usage = sub(usage, { prog: this._prog }) - - // if no optionals or positionals are available, usage is just prog - } else if (usage === undefined && !actions.length) { - usage = sub('%(prog)s', { prog: this._prog }) - - // if optionals and positionals are available, calculate usage - } else if (usage === undefined) { - let prog = sub('%(prog)s', { prog: this._prog }) - - // split optionals from positionals - let optionals = [] - let positionals = [] - for (let action of actions) { - if (action.option_strings.length) { - optionals.push(action) - } else { - positionals.push(action) - } - } - - // build full usage string - let action_usage = this._format_actions_usage([].concat(optionals).concat(positionals), groups) - usage = [ prog, action_usage ].map(String).join(' ') - - // wrap the usage parts if it's too long - let text_width = this._width - this._current_indent - if (prefix.length + usage.length > text_width) { - - // break usage into wrappable parts - let part_regexp = /\(.*?\)+(?=\s|$)|\[.*?\]+(?=\s|$)|\S+/g - let opt_usage = this._format_actions_usage(optionals, groups) - let pos_usage = this._format_actions_usage(positionals, groups) - let opt_parts = opt_usage.match(part_regexp) || [] - let pos_parts = pos_usage.match(part_regexp) || [] - assert(opt_parts.join(' ') === opt_usage) - assert(pos_parts.join(' ') === pos_usage) - - // helper for wrapping lines - let get_lines = (parts, indent, prefix = undefined) => { - let lines = [] - let line = [] - let line_len - if (prefix !== undefined) { - line_len = prefix.length - 1 - } else { - line_len = indent.length - 1 - } - for (let part of parts) { - if (line_len + 1 + part.length > text_width && line) { - lines.push(indent + line.join(' ')) - line = [] - line_len = indent.length - 1 - } - line.push(part) - line_len += part.length + 1 - } - if (line.length) { - lines.push(indent + line.join(' ')) - } - if (prefix !== undefined) { - lines[0] = lines[0].slice(indent.length) - } - return lines - } - - let lines - - // if prog is short, follow it with optionals or positionals - if (prefix.length + prog.length <= 0.75 * text_width) { - let indent = ' '.repeat(prefix.length + prog.length + 1) - if (opt_parts.length) { - lines = get_lines([prog].concat(opt_parts), indent, prefix) - lines = lines.concat(get_lines(pos_parts, indent)) - } else if (pos_parts.length) { - lines = get_lines([prog].concat(pos_parts), indent, prefix) - } else { - lines = [prog] - } - - // if prog is long, put it on its own line - } else { - let indent = ' '.repeat(prefix.length) - let parts = [].concat(opt_parts).concat(pos_parts) - lines = get_lines(parts, indent) - if (lines.length > 1) { - lines = [] - lines = lines.concat(get_lines(opt_parts, indent)) - lines = lines.concat(get_lines(pos_parts, indent)) - } - lines = [prog].concat(lines) - } - - // join lines into usage - usage = lines.join('\n') - } - } - - // prefix with 'usage:' - return sub('%s%s\n\n', prefix, usage) - } - - _format_actions_usage(actions, groups) { - // find group indices and identify actions in groups - let group_actions = new Set() - let inserts = {} - for (let group of groups) { - let start = actions.indexOf(group._group_actions[0]) - if (start === -1) { - continue - } else { - let end = start + group._group_actions.length - if (_array_equal(actions.slice(start, end), group._group_actions)) { - for (let action of group._group_actions) { - group_actions.add(action) - } - if (!group.required) { - if (start in inserts) { - inserts[start] += ' [' - } else { - inserts[start] = '[' - } - if (end in inserts) { - inserts[end] += ']' - } else { - inserts[end] = ']' - } - } else { - if (start in inserts) { - inserts[start] += ' (' - } else { - inserts[start] = '(' - } - if (end in inserts) { - inserts[end] += ')' - } else { - inserts[end] = ')' - } - } - for (let i of range(start + 1, end)) { - inserts[i] = '|' - } - } - } - } - - // collect all actions format strings - let parts = [] - for (let [ i, action ] of Object.entries(actions)) { - - // suppressed arguments are marked with None - // remove | separators for suppressed arguments - if (action.help === SUPPRESS) { - parts.push(undefined) - if (inserts[+i] === '|') { - delete inserts[+i] - } else if (inserts[+i + 1] === '|') { - delete inserts[+i + 1] - } - - // produce all arg strings - } else if (!action.option_strings.length) { - let default_value = this._get_default_metavar_for_positional(action) - let part = this._format_args(action, default_value) - - // if it's in a group, strip the outer [] - if (group_actions.has(action)) { - if (part[0] === '[' && part[part.length - 1] === ']') { - part = part.slice(1, -1) - } - } - - // add the action string to the list - parts.push(part) - - // produce the first way to invoke the option in brackets - } else { - let option_string = action.option_strings[0] - let part - - // if the Optional doesn't take a value, format is: - // -s or --long - if (action.nargs === 0) { - part = action.format_usage() - - // if the Optional takes a value, format is: - // -s ARGS or --long ARGS - } else { - let default_value = this._get_default_metavar_for_optional(action) - let args_string = this._format_args(action, default_value) - part = sub('%s %s', option_string, args_string) - } - - // make it look optional if it's not required or in a group - if (!action.required && !group_actions.has(action)) { - part = sub('[%s]', part) - } - - // add the action string to the list - parts.push(part) - } - } - - // insert things at the necessary indices - for (let i of Object.keys(inserts).map(Number).sort((a, b) => b - a)) { - parts.splice(+i, 0, inserts[+i]) - } - - // join all the action items with spaces - let text = parts.filter(Boolean).join(' ') - - // clean up separators for mutually exclusive groups - text = text.replace(/([\[(]) /g, '$1') - text = text.replace(/ ([\])])/g, '$1') - text = text.replace(/[\[(] *[\])]/g, '') - text = text.replace(/\(([^|]*)\)/g, '$1', text) - text = text.trim() - - // return the text - return text - } - - _format_text(text) { - if (text.includes('%(prog)')) { - text = sub(text, { prog: this._prog }) - } - let text_width = Math.max(this._width - this._current_indent, 11) - let indent = ' '.repeat(this._current_indent) - return this._fill_text(text, text_width, indent) + '\n\n' - } - - _format_action(action) { - // determine the required width and the entry label - let help_position = Math.min(this._action_max_length + 2, - this._max_help_position) - let help_width = Math.max(this._width - help_position, 11) - let action_width = help_position - this._current_indent - 2 - let action_header = this._format_action_invocation(action) - let indent_first - - // no help; start on same line and add a final newline - if (!action.help) { - let tup = [ this._current_indent, '', action_header ] - action_header = sub('%*s%s\n', ...tup) - - // short action name; start on the same line and pad two spaces - } else if (action_header.length <= action_width) { - let tup = [ this._current_indent, '', action_width, action_header ] - action_header = sub('%*s%-*s ', ...tup) - indent_first = 0 - - // long action name; start on the next line - } else { - let tup = [ this._current_indent, '', action_header ] - action_header = sub('%*s%s\n', ...tup) - indent_first = help_position - } - - // collect the pieces of the action help - let parts = [action_header] - - // if there was help for the action, add lines of help text - if (action.help) { - let help_text = this._expand_help(action) - let help_lines = this._split_lines(help_text, help_width) - parts.push(sub('%*s%s\n', indent_first, '', help_lines[0])) - for (let line of help_lines.slice(1)) { - parts.push(sub('%*s%s\n', help_position, '', line)) - } - - // or add a newline if the description doesn't end with one - } else if (!action_header.endsWith('\n')) { - parts.push('\n') - } - - // if there are any sub-actions, add their help as well - for (let subaction of this._iter_indented_subactions(action)) { - parts.push(this._format_action(subaction)) - } - - // return a single string - return this._join_parts(parts) - } - - _format_action_invocation(action) { - if (!action.option_strings.length) { - let default_value = this._get_default_metavar_for_positional(action) - let metavar = this._metavar_formatter(action, default_value)(1)[0] - return metavar - - } else { - let parts = [] - - // if the Optional doesn't take a value, format is: - // -s, --long - if (action.nargs === 0) { - parts = parts.concat(action.option_strings) - - // if the Optional takes a value, format is: - // -s ARGS, --long ARGS - } else { - let default_value = this._get_default_metavar_for_optional(action) - let args_string = this._format_args(action, default_value) - for (let option_string of action.option_strings) { - parts.push(sub('%s %s', option_string, args_string)) - } - } - - return parts.join(', ') - } - } - - _metavar_formatter(action, default_metavar) { - let result - if (action.metavar !== undefined) { - result = action.metavar - } else if (action.choices !== undefined) { - let choice_strs = _choices_to_array(action.choices).map(String) - result = sub('{%s}', choice_strs.join(',')) - } else { - result = default_metavar - } - - function format(tuple_size) { - if (Array.isArray(result)) { - return result - } else { - return Array(tuple_size).fill(result) - } - } - return format - } - - _format_args(action, default_metavar) { - let get_metavar = this._metavar_formatter(action, default_metavar) - let result - if (action.nargs === undefined) { - result = sub('%s', ...get_metavar(1)) - } else if (action.nargs === OPTIONAL) { - result = sub('[%s]', ...get_metavar(1)) - } else if (action.nargs === ZERO_OR_MORE) { - let metavar = get_metavar(1) - if (metavar.length === 2) { - result = sub('[%s [%s ...]]', ...metavar) - } else { - result = sub('[%s ...]', ...metavar) - } - } else if (action.nargs === ONE_OR_MORE) { - result = sub('%s [%s ...]', ...get_metavar(2)) - } else if (action.nargs === REMAINDER) { - result = '...' - } else if (action.nargs === PARSER) { - result = sub('%s ...', ...get_metavar(1)) - } else if (action.nargs === SUPPRESS) { - result = '' - } else { - let formats - try { - formats = range(action.nargs).map(() => '%s') - } catch (err) { - throw new TypeError('invalid nargs value') - } - result = sub(formats.join(' '), ...get_metavar(action.nargs)) - } - return result - } - - _expand_help(action) { - let params = Object.assign({ prog: this._prog }, action) - for (let name of Object.keys(params)) { - if (params[name] === SUPPRESS) { - delete params[name] - } - } - for (let name of Object.keys(params)) { - if (params[name] && params[name].name) { - params[name] = params[name].name - } - } - if (params.choices !== undefined) { - let choices_str = _choices_to_array(params.choices).map(String).join(', ') - params.choices = choices_str - } - // LEGACY (v1 compatibility): camelcase - for (let key of Object.keys(params)) { - let old_name = _to_legacy_name(key) - if (old_name !== key) { - params[old_name] = params[key] - } - } - // end - return sub(this._get_help_string(action), params) - } - - * _iter_indented_subactions(action) { - if (typeof action._get_subactions === 'function') { - this._indent() - yield* action._get_subactions() - this._dedent() - } - } - - _split_lines(text, width) { - text = text.replace(this._whitespace_matcher, ' ').trim() - // The textwrap module is used only for formatting help. - // Delay its import for speeding up the common usage of argparse. - let textwrap = require('./lib/textwrap') - return textwrap.wrap(text, { width }) - } - - _fill_text(text, width, indent) { - text = text.replace(this._whitespace_matcher, ' ').trim() - let textwrap = require('./lib/textwrap') - return textwrap.fill(text, { width, - initial_indent: indent, - subsequent_indent: indent }) - } - - _get_help_string(action) { - return action.help - } - - _get_default_metavar_for_optional(action) { - return action.dest.toUpperCase() - } - - _get_default_metavar_for_positional(action) { - return action.dest - } -})) - -HelpFormatter.prototype._Section = _callable(class _Section { - - constructor(formatter, parent, heading = undefined) { - this.formatter = formatter - this.parent = parent - this.heading = heading - this.items = [] - } - - format_help() { - // format the indented section - if (this.parent !== undefined) { - this.formatter._indent() - } - let item_help = this.formatter._join_parts(this.items.map(([ func, args ]) => func.apply(null, args))) - if (this.parent !== undefined) { - this.formatter._dedent() - } - - // return nothing if the section was empty - if (!item_help) { - return '' - } - - // add the heading if the section was non-empty - let heading - if (this.heading !== SUPPRESS && this.heading !== undefined) { - let current_indent = this.formatter._current_indent - heading = sub('%*s%s:\n', current_indent, '', this.heading) - } else { - heading = '' - } - - // join the section-initial newline, the heading and the help - return this.formatter._join_parts(['\n', heading, item_help, '\n']) - } -}) - - -const RawDescriptionHelpFormatter = _camelcase_alias(_callable(class RawDescriptionHelpFormatter extends HelpFormatter { - /* - * Help message formatter which retains any formatting in descriptions. - * - * Only the name of this class is considered a public API. All the methods - * provided by the class are considered an implementation detail. - */ - - _fill_text(text, width, indent) { - return splitlines(text, true).map(line => indent + line).join('') - } -})) - - -const RawTextHelpFormatter = _camelcase_alias(_callable(class RawTextHelpFormatter extends RawDescriptionHelpFormatter { - /* - * Help message formatter which retains formatting of all help text. - * - * Only the name of this class is considered a public API. All the methods - * provided by the class are considered an implementation detail. - */ - - _split_lines(text/*, width*/) { - return splitlines(text) - } -})) - - -const ArgumentDefaultsHelpFormatter = _camelcase_alias(_callable(class ArgumentDefaultsHelpFormatter extends HelpFormatter { - /* - * Help message formatter which adds default values to argument help. - * - * Only the name of this class is considered a public API. All the methods - * provided by the class are considered an implementation detail. - */ - - _get_help_string(action) { - let help = action.help - // LEGACY (v1 compatibility): additional check for defaultValue needed - if (!action.help.includes('%(default)') && !action.help.includes('%(defaultValue)')) { - if (action.default !== SUPPRESS) { - let defaulting_nargs = [OPTIONAL, ZERO_OR_MORE] - if (action.option_strings.length || defaulting_nargs.includes(action.nargs)) { - help += ' (default: %(default)s)' - } - } - } - return help - } -})) - - -const MetavarTypeHelpFormatter = _camelcase_alias(_callable(class MetavarTypeHelpFormatter extends HelpFormatter { - /* - * Help message formatter which uses the argument 'type' as the default - * metavar value (instead of the argument 'dest') - * - * Only the name of this class is considered a public API. All the methods - * provided by the class are considered an implementation detail. - */ - - _get_default_metavar_for_optional(action) { - return typeof action.type === 'function' ? action.type.name : action.type - } - - _get_default_metavar_for_positional(action) { - return typeof action.type === 'function' ? action.type.name : action.type - } -})) - - -// ===================== -// Options and Arguments -// ===================== -function _get_action_name(argument) { - if (argument === undefined) { - return undefined - } else if (argument.option_strings.length) { - return argument.option_strings.join('/') - } else if (![ undefined, SUPPRESS ].includes(argument.metavar)) { - return argument.metavar - } else if (![ undefined, SUPPRESS ].includes(argument.dest)) { - return argument.dest - } else { - return undefined - } -} - - -const ArgumentError = _callable(class ArgumentError extends Error { - /* - * An error from creating or using an argument (optional or positional). - * - * The string value of this exception is the message, augmented with - * information about the argument that caused it. - */ - - constructor(argument, message) { - super() - this.name = 'ArgumentError' - this._argument_name = _get_action_name(argument) - this._message = message - this.message = this.str() - } - - str() { - let format - if (this._argument_name === undefined) { - format = '%(message)s' - } else { - format = 'argument %(argument_name)s: %(message)s' - } - return sub(format, { message: this._message, - argument_name: this._argument_name }) - } -}) - - -const ArgumentTypeError = _callable(class ArgumentTypeError extends Error { - /* - * An error from trying to convert a command line string to a type. - */ - - constructor(message) { - super(message) - this.name = 'ArgumentTypeError' - } -}) - - -// ============== -// Action classes -// ============== -const Action = _camelcase_alias(_callable(class Action extends _AttributeHolder(Function) { - /* - * Information about how to convert command line strings to Python objects. - * - * Action objects are used by an ArgumentParser to represent the information - * needed to parse a single argument from one or more strings from the - * command line. The keyword arguments to the Action constructor are also - * all attributes of Action instances. - * - * Keyword Arguments: - * - * - option_strings -- A list of command-line option strings which - * should be associated with this action. - * - * - dest -- The name of the attribute to hold the created object(s) - * - * - nargs -- The number of command-line arguments that should be - * consumed. By default, one argument will be consumed and a single - * value will be produced. Other values include: - * - N (an integer) consumes N arguments (and produces a list) - * - '?' consumes zero or one arguments - * - '*' consumes zero or more arguments (and produces a list) - * - '+' consumes one or more arguments (and produces a list) - * Note that the difference between the default and nargs=1 is that - * with the default, a single value will be produced, while with - * nargs=1, a list containing a single value will be produced. - * - * - const -- The value to be produced if the option is specified and the - * option uses an action that takes no values. - * - * - default -- The value to be produced if the option is not specified. - * - * - type -- A callable that accepts a single string argument, and - * returns the converted value. The standard Python types str, int, - * float, and complex are useful examples of such callables. If None, - * str is used. - * - * - choices -- A container of values that should be allowed. If not None, - * after a command-line argument has been converted to the appropriate - * type, an exception will be raised if it is not a member of this - * collection. - * - * - required -- True if the action must always be specified at the - * command line. This is only meaningful for optional command-line - * arguments. - * - * - help -- The help string describing the argument. - * - * - metavar -- The name to be used for the option's argument with the - * help string. If None, the 'dest' value will be used as the name. - */ - - constructor() { - let [ - option_strings, - dest, - nargs, - const_value, - default_value, - type, - choices, - required, - help, - metavar - ] = _parse_opts(arguments, { - option_strings: no_default, - dest: no_default, - nargs: undefined, - const: undefined, - default: undefined, - type: undefined, - choices: undefined, - required: false, - help: undefined, - metavar: undefined - }) - - // when this class is called as a function, redirect it to .call() method of itself - super('return arguments.callee.call.apply(arguments.callee, arguments)') - - this.option_strings = option_strings - this.dest = dest - this.nargs = nargs - this.const = const_value - this.default = default_value - this.type = type - this.choices = choices - this.required = required - this.help = help - this.metavar = metavar - } - - _get_kwargs() { - let names = [ - 'option_strings', - 'dest', - 'nargs', - 'const', - 'default', - 'type', - 'choices', - 'help', - 'metavar' - ] - return names.map(name => [ name, getattr(this, name) ]) - } - - format_usage() { - return this.option_strings[0] - } - - call(/*parser, namespace, values, option_string = undefined*/) { - throw new Error('.call() not defined') - } -})) - - -const BooleanOptionalAction = _camelcase_alias(_callable(class BooleanOptionalAction extends Action { - - constructor() { - let [ - option_strings, - dest, - default_value, - type, - choices, - required, - help, - metavar - ] = _parse_opts(arguments, { - option_strings: no_default, - dest: no_default, - default: undefined, - type: undefined, - choices: undefined, - required: false, - help: undefined, - metavar: undefined - }) - - let _option_strings = [] - for (let option_string of option_strings) { - _option_strings.push(option_string) - - if (option_string.startsWith('--')) { - option_string = '--no-' + option_string.slice(2) - _option_strings.push(option_string) - } - } - - if (help !== undefined && default_value !== undefined) { - help += ` (default: ${default_value})` - } - - super({ - option_strings: _option_strings, - dest, - nargs: 0, - default: default_value, - type, - choices, - required, - help, - metavar - }) - } - - call(parser, namespace, values, option_string = undefined) { - if (this.option_strings.includes(option_string)) { - setattr(namespace, this.dest, !option_string.startsWith('--no-')) - } - } - - format_usage() { - return this.option_strings.join(' | ') - } -})) - - -const _StoreAction = _callable(class _StoreAction extends Action { - - constructor() { - let [ - option_strings, - dest, - nargs, - const_value, - default_value, - type, - choices, - required, - help, - metavar - ] = _parse_opts(arguments, { - option_strings: no_default, - dest: no_default, - nargs: undefined, - const: undefined, - default: undefined, - type: undefined, - choices: undefined, - required: false, - help: undefined, - metavar: undefined - }) - - if (nargs === 0) { - throw new TypeError('nargs for store actions must be != 0; if you ' + - 'have nothing to store, actions such as store ' + - 'true or store const may be more appropriate') - } - if (const_value !== undefined && nargs !== OPTIONAL) { - throw new TypeError(sub('nargs must be %r to supply const', OPTIONAL)) - } - super({ - option_strings, - dest, - nargs, - const: const_value, - default: default_value, - type, - choices, - required, - help, - metavar - }) - } - - call(parser, namespace, values/*, option_string = undefined*/) { - setattr(namespace, this.dest, values) - } -}) - - -const _StoreConstAction = _callable(class _StoreConstAction extends Action { - - constructor() { - let [ - option_strings, - dest, - const_value, - default_value, - required, - help - //, metavar - ] = _parse_opts(arguments, { - option_strings: no_default, - dest: no_default, - const: no_default, - default: undefined, - required: false, - help: undefined, - metavar: undefined - }) - - super({ - option_strings, - dest, - nargs: 0, - const: const_value, - default: default_value, - required, - help - }) - } - - call(parser, namespace/*, values, option_string = undefined*/) { - setattr(namespace, this.dest, this.const) - } -}) - - -const _StoreTrueAction = _callable(class _StoreTrueAction extends _StoreConstAction { - - constructor() { - let [ - option_strings, - dest, - default_value, - required, - help - ] = _parse_opts(arguments, { - option_strings: no_default, - dest: no_default, - default: false, - required: false, - help: undefined - }) - - super({ - option_strings, - dest, - const: true, - default: default_value, - required, - help - }) - } -}) - - -const _StoreFalseAction = _callable(class _StoreFalseAction extends _StoreConstAction { - - constructor() { - let [ - option_strings, - dest, - default_value, - required, - help - ] = _parse_opts(arguments, { - option_strings: no_default, - dest: no_default, - default: true, - required: false, - help: undefined - }) - - super({ - option_strings, - dest, - const: false, - default: default_value, - required, - help - }) - } -}) - - -const _AppendAction = _callable(class _AppendAction extends Action { - - constructor() { - let [ - option_strings, - dest, - nargs, - const_value, - default_value, - type, - choices, - required, - help, - metavar - ] = _parse_opts(arguments, { - option_strings: no_default, - dest: no_default, - nargs: undefined, - const: undefined, - default: undefined, - type: undefined, - choices: undefined, - required: false, - help: undefined, - metavar: undefined - }) - - if (nargs === 0) { - throw new TypeError('nargs for append actions must be != 0; if arg ' + - 'strings are not supplying the value to append, ' + - 'the append const action may be more appropriate') - } - if (const_value !== undefined && nargs !== OPTIONAL) { - throw new TypeError(sub('nargs must be %r to supply const', OPTIONAL)) - } - super({ - option_strings, - dest, - nargs, - const: const_value, - default: default_value, - type, - choices, - required, - help, - metavar - }) - } - - call(parser, namespace, values/*, option_string = undefined*/) { - let items = getattr(namespace, this.dest, undefined) - items = _copy_items(items) - items.push(values) - setattr(namespace, this.dest, items) - } -}) - - -const _AppendConstAction = _callable(class _AppendConstAction extends Action { - - constructor() { - let [ - option_strings, - dest, - const_value, - default_value, - required, - help, - metavar - ] = _parse_opts(arguments, { - option_strings: no_default, - dest: no_default, - const: no_default, - default: undefined, - required: false, - help: undefined, - metavar: undefined - }) - - super({ - option_strings, - dest, - nargs: 0, - const: const_value, - default: default_value, - required, - help, - metavar - }) - } - - call(parser, namespace/*, values, option_string = undefined*/) { - let items = getattr(namespace, this.dest, undefined) - items = _copy_items(items) - items.push(this.const) - setattr(namespace, this.dest, items) - } -}) - - -const _CountAction = _callable(class _CountAction extends Action { - - constructor() { - let [ - option_strings, - dest, - default_value, - required, - help - ] = _parse_opts(arguments, { - option_strings: no_default, - dest: no_default, - default: undefined, - required: false, - help: undefined - }) - - super({ - option_strings, - dest, - nargs: 0, - default: default_value, - required, - help - }) - } - - call(parser, namespace/*, values, option_string = undefined*/) { - let count = getattr(namespace, this.dest, undefined) - if (count === undefined) { - count = 0 - } - setattr(namespace, this.dest, count + 1) - } -}) - - -const _HelpAction = _callable(class _HelpAction extends Action { - - constructor() { - let [ - option_strings, - dest, - default_value, - help - ] = _parse_opts(arguments, { - option_strings: no_default, - dest: SUPPRESS, - default: SUPPRESS, - help: undefined - }) - - super({ - option_strings, - dest, - default: default_value, - nargs: 0, - help - }) - } - - call(parser/*, namespace, values, option_string = undefined*/) { - parser.print_help() - parser.exit() - } -}) - - -const _VersionAction = _callable(class _VersionAction extends Action { - - constructor() { - let [ - option_strings, - version, - dest, - default_value, - help - ] = _parse_opts(arguments, { - option_strings: no_default, - version: undefined, - dest: SUPPRESS, - default: SUPPRESS, - help: "show program's version number and exit" - }) - - super({ - option_strings, - dest, - default: default_value, - nargs: 0, - help - }) - this.version = version - } - - call(parser/*, namespace, values, option_string = undefined*/) { - let version = this.version - if (version === undefined) { - version = parser.version - } - let formatter = parser._get_formatter() - formatter.add_text(version) - parser._print_message(formatter.format_help(), process.stdout) - parser.exit() - } -}) - - -const _SubParsersAction = _camelcase_alias(_callable(class _SubParsersAction extends Action { - - constructor() { - let [ - option_strings, - prog, - parser_class, - dest, - required, - help, - metavar - ] = _parse_opts(arguments, { - option_strings: no_default, - prog: no_default, - parser_class: no_default, - dest: SUPPRESS, - required: false, - help: undefined, - metavar: undefined - }) - - let name_parser_map = {} - - super({ - option_strings, - dest, - nargs: PARSER, - choices: name_parser_map, - required, - help, - metavar - }) - - this._prog_prefix = prog - this._parser_class = parser_class - this._name_parser_map = name_parser_map - this._choices_actions = [] - } - - add_parser() { - let [ - name, - kwargs - ] = _parse_opts(arguments, { - name: no_default, - '**kwargs': no_default - }) - - // set prog from the existing prefix - if (kwargs.prog === undefined) { - kwargs.prog = sub('%s %s', this._prog_prefix, name) - } - - let aliases = getattr(kwargs, 'aliases', []) - delete kwargs.aliases - - // create a pseudo-action to hold the choice help - if ('help' in kwargs) { - let help = kwargs.help - delete kwargs.help - let choice_action = this._ChoicesPseudoAction(name, aliases, help) - this._choices_actions.push(choice_action) - } - - // create the parser and add it to the map - let parser = new this._parser_class(kwargs) - this._name_parser_map[name] = parser - - // make parser available under aliases also - for (let alias of aliases) { - this._name_parser_map[alias] = parser - } - - return parser - } - - _get_subactions() { - return this._choices_actions - } - - call(parser, namespace, values/*, option_string = undefined*/) { - let parser_name = values[0] - let arg_strings = values.slice(1) - - // set the parser name if requested - if (this.dest !== SUPPRESS) { - setattr(namespace, this.dest, parser_name) - } - - // select the parser - if (hasattr(this._name_parser_map, parser_name)) { - parser = this._name_parser_map[parser_name] - } else { - let args = {parser_name, - choices: this._name_parser_map.join(', ')} - let msg = sub('unknown parser %(parser_name)r (choices: %(choices)s)', args) - throw new ArgumentError(this, msg) - } - - // parse all the remaining options into the namespace - // store any unrecognized options on the object, so that the top - // level parser can decide what to do with them - - // In case this subparser defines new defaults, we parse them - // in a new namespace object and then update the original - // namespace for the relevant parts. - let subnamespace - [ subnamespace, arg_strings ] = parser.parse_known_args(arg_strings, undefined) - for (let [ key, value ] of Object.entries(subnamespace)) { - setattr(namespace, key, value) - } - - if (arg_strings.length) { - setdefault(namespace, _UNRECOGNIZED_ARGS_ATTR, []) - getattr(namespace, _UNRECOGNIZED_ARGS_ATTR).push(...arg_strings) - } - } -})) - - -_SubParsersAction.prototype._ChoicesPseudoAction = _callable(class _ChoicesPseudoAction extends Action { - constructor(name, aliases, help) { - let metavar = name, dest = name - if (aliases.length) { - metavar += sub(' (%s)', aliases.join(', ')) - } - super({ option_strings: [], dest, help, metavar }) - } -}) - - -const _ExtendAction = _callable(class _ExtendAction extends _AppendAction { - call(parser, namespace, values/*, option_string = undefined*/) { - let items = getattr(namespace, this.dest, undefined) - items = _copy_items(items) - items = items.concat(values) - setattr(namespace, this.dest, items) - } -}) - - -// ============== -// Type classes -// ============== -const FileType = _callable(class FileType extends Function { - /* - * Factory for creating file object types - * - * Instances of FileType are typically passed as type= arguments to the - * ArgumentParser add_argument() method. - * - * Keyword Arguments: - * - mode -- A string indicating how the file is to be opened. Accepts the - * same values as the builtin open() function. - * - bufsize -- The file's desired buffer size. Accepts the same values as - * the builtin open() function. - * - encoding -- The file's encoding. Accepts the same values as the - * builtin open() function. - * - errors -- A string indicating how encoding and decoding errors are to - * be handled. Accepts the same value as the builtin open() function. - */ - - constructor() { - let [ - flags, - encoding, - mode, - autoClose, - emitClose, - start, - end, - highWaterMark, - fs - ] = _parse_opts(arguments, { - flags: 'r', - encoding: undefined, - mode: undefined, // 0o666 - autoClose: undefined, // true - emitClose: undefined, // false - start: undefined, // 0 - end: undefined, // Infinity - highWaterMark: undefined, // 64 * 1024 - fs: undefined - }) - - // when this class is called as a function, redirect it to .call() method of itself - super('return arguments.callee.call.apply(arguments.callee, arguments)') - - Object.defineProperty(this, 'name', { - get() { - return sub('FileType(%r)', flags) - } - }) - this._flags = flags - this._options = {} - if (encoding !== undefined) this._options.encoding = encoding - if (mode !== undefined) this._options.mode = mode - if (autoClose !== undefined) this._options.autoClose = autoClose - if (emitClose !== undefined) this._options.emitClose = emitClose - if (start !== undefined) this._options.start = start - if (end !== undefined) this._options.end = end - if (highWaterMark !== undefined) this._options.highWaterMark = highWaterMark - if (fs !== undefined) this._options.fs = fs - } - - call(string) { - // the special argument "-" means sys.std{in,out} - if (string === '-') { - if (this._flags.includes('r')) { - return process.stdin - } else if (this._flags.includes('w')) { - return process.stdout - } else { - let msg = sub('argument "-" with mode %r', this._flags) - throw new TypeError(msg) - } - } - - // all other arguments are used as file names - let fd - try { - fd = fs.openSync(string, this._flags, this._options.mode) - } catch (e) { - let args = { filename: string, error: e.message } - let message = "can't open '%(filename)s': %(error)s" - throw new ArgumentTypeError(sub(message, args)) - } - - let options = Object.assign({ fd, flags: this._flags }, this._options) - if (this._flags.includes('r')) { - return fs.createReadStream(undefined, options) - } else if (this._flags.includes('w')) { - return fs.createWriteStream(undefined, options) - } else { - let msg = sub('argument "%s" with mode %r', string, this._flags) - throw new TypeError(msg) - } - } - - [util.inspect.custom]() { - let args = [ this._flags ] - let kwargs = Object.entries(this._options).map(([ k, v ]) => { - if (k === 'mode') v = { value: v, [util.inspect.custom]() { return '0o' + this.value.toString(8) } } - return [ k, v ] - }) - let args_str = [] - .concat(args.filter(arg => arg !== -1).map(repr)) - .concat(kwargs.filter(([/*kw*/, arg]) => arg !== undefined) - .map(([kw, arg]) => sub('%s=%r', kw, arg))) - .join(', ') - return sub('%s(%s)', this.constructor.name, args_str) - } - - toString() { - return this[util.inspect.custom]() - } -}) - -// =========================== -// Optional and Positional Parsing -// =========================== -const Namespace = _callable(class Namespace extends _AttributeHolder() { - /* - * Simple object for storing attributes. - * - * Implements equality by attribute names and values, and provides a simple - * string representation. - */ - - constructor(options = {}) { - super() - Object.assign(this, options) - } -}) - -// unset string tag to mimic plain object -Namespace.prototype[Symbol.toStringTag] = undefined - - -const _ActionsContainer = _camelcase_alias(_callable(class _ActionsContainer { - - constructor() { - let [ - description, - prefix_chars, - argument_default, - conflict_handler - ] = _parse_opts(arguments, { - description: no_default, - prefix_chars: no_default, - argument_default: no_default, - conflict_handler: no_default - }) - - this.description = description - this.argument_default = argument_default - this.prefix_chars = prefix_chars - this.conflict_handler = conflict_handler - - // set up registries - this._registries = {} - - // register actions - this.register('action', undefined, _StoreAction) - this.register('action', 'store', _StoreAction) - this.register('action', 'store_const', _StoreConstAction) - this.register('action', 'store_true', _StoreTrueAction) - this.register('action', 'store_false', _StoreFalseAction) - this.register('action', 'append', _AppendAction) - this.register('action', 'append_const', _AppendConstAction) - this.register('action', 'count', _CountAction) - this.register('action', 'help', _HelpAction) - this.register('action', 'version', _VersionAction) - this.register('action', 'parsers', _SubParsersAction) - this.register('action', 'extend', _ExtendAction) - // LEGACY (v1 compatibility): camelcase variants - ;[ 'storeConst', 'storeTrue', 'storeFalse', 'appendConst' ].forEach(old_name => { - let new_name = _to_new_name(old_name) - this.register('action', old_name, util.deprecate(this._registry_get('action', new_name), - sub('{action: "%s"} is renamed to {action: "%s"}', old_name, new_name))) - }) - // end - - // raise an exception if the conflict handler is invalid - this._get_handler() - - // action storage - this._actions = [] - this._option_string_actions = {} - - // groups - this._action_groups = [] - this._mutually_exclusive_groups = [] - - // defaults storage - this._defaults = {} - - // determines whether an "option" looks like a negative number - this._negative_number_matcher = /^-\d+$|^-\d*\.\d+$/ - - // whether or not there are any optionals that look like negative - // numbers -- uses a list so it can be shared and edited - this._has_negative_number_optionals = [] - } - - // ==================== - // Registration methods - // ==================== - register(registry_name, value, object) { - let registry = setdefault(this._registries, registry_name, {}) - registry[value] = object - } - - _registry_get(registry_name, value, default_value = undefined) { - return getattr(this._registries[registry_name], value, default_value) - } - - // ================================== - // Namespace default accessor methods - // ================================== - set_defaults(kwargs) { - Object.assign(this._defaults, kwargs) - - // if these defaults match any existing arguments, replace - // the previous default on the object with the new one - for (let action of this._actions) { - if (action.dest in kwargs) { - action.default = kwargs[action.dest] - } - } - } - - get_default(dest) { - for (let action of this._actions) { - if (action.dest === dest && action.default !== undefined) { - return action.default - } - } - return this._defaults[dest] - } - - - // ======================= - // Adding argument actions - // ======================= - add_argument() { - /* - * add_argument(dest, ..., name=value, ...) - * add_argument(option_string, option_string, ..., name=value, ...) - */ - let [ - args, - kwargs - ] = _parse_opts(arguments, { - '*args': no_default, - '**kwargs': no_default - }) - // LEGACY (v1 compatibility), old-style add_argument([ args ], { options }) - if (args.length === 1 && Array.isArray(args[0])) { - args = args[0] - deprecate('argument-array', - sub('use add_argument(%(args)s, {...}) instead of add_argument([ %(args)s ], { ... })', { - args: args.map(repr).join(', ') - })) - } - // end - - // if no positional args are supplied or only one is supplied and - // it doesn't look like an option string, parse a positional - // argument - let chars = this.prefix_chars - if (!args.length || args.length === 1 && !chars.includes(args[0][0])) { - if (args.length && 'dest' in kwargs) { - throw new TypeError('dest supplied twice for positional argument') - } - kwargs = this._get_positional_kwargs(...args, kwargs) - - // otherwise, we're adding an optional argument - } else { - kwargs = this._get_optional_kwargs(...args, kwargs) - } - - // if no default was supplied, use the parser-level default - if (!('default' in kwargs)) { - let dest = kwargs.dest - if (dest in this._defaults) { - kwargs.default = this._defaults[dest] - } else if (this.argument_default !== undefined) { - kwargs.default = this.argument_default - } - } - - // create the action object, and add it to the parser - let action_class = this._pop_action_class(kwargs) - if (typeof action_class !== 'function') { - throw new TypeError(sub('unknown action "%s"', action_class)) - } - // eslint-disable-next-line new-cap - let action = new action_class(kwargs) - - // raise an error if the action type is not callable - let type_func = this._registry_get('type', action.type, action.type) - if (typeof type_func !== 'function') { - throw new TypeError(sub('%r is not callable', type_func)) - } - - if (type_func === FileType) { - throw new TypeError(sub('%r is a FileType class object, instance of it' + - ' must be passed', type_func)) - } - - // raise an error if the metavar does not match the type - if ('_get_formatter' in this) { - try { - this._get_formatter()._format_args(action, undefined) - } catch (err) { - // check for 'invalid nargs value' is an artifact of TypeError and ValueError in js being the same - if (err instanceof TypeError && err.message !== 'invalid nargs value') { - throw new TypeError('length of metavar tuple does not match nargs') - } else { - throw err - } - } - } - - return this._add_action(action) - } - - add_argument_group() { - let group = _ArgumentGroup(this, ...arguments) - this._action_groups.push(group) - return group - } - - add_mutually_exclusive_group() { - // eslint-disable-next-line no-use-before-define - let group = _MutuallyExclusiveGroup(this, ...arguments) - this._mutually_exclusive_groups.push(group) - return group - } - - _add_action(action) { - // resolve any conflicts - this._check_conflict(action) - - // add to actions list - this._actions.push(action) - action.container = this - - // index the action by any option strings it has - for (let option_string of action.option_strings) { - this._option_string_actions[option_string] = action - } - - // set the flag if any option strings look like negative numbers - for (let option_string of action.option_strings) { - if (this._negative_number_matcher.test(option_string)) { - if (!this._has_negative_number_optionals.length) { - this._has_negative_number_optionals.push(true) - } - } - } - - // return the created action - return action - } - - _remove_action(action) { - _array_remove(this._actions, action) - } - - _add_container_actions(container) { - // collect groups by titles - let title_group_map = {} - for (let group of this._action_groups) { - if (group.title in title_group_map) { - let msg = 'cannot merge actions - two groups are named %r' - throw new TypeError(sub(msg, group.title)) - } - title_group_map[group.title] = group - } - - // map each action to its group - let group_map = new Map() - for (let group of container._action_groups) { - - // if a group with the title exists, use that, otherwise - // create a new group matching the container's group - if (!(group.title in title_group_map)) { - title_group_map[group.title] = this.add_argument_group({ - title: group.title, - description: group.description, - conflict_handler: group.conflict_handler - }) - } - - // map the actions to their new group - for (let action of group._group_actions) { - group_map.set(action, title_group_map[group.title]) - } - } - - // add container's mutually exclusive groups - // NOTE: if add_mutually_exclusive_group ever gains title= and - // description= then this code will need to be expanded as above - for (let group of container._mutually_exclusive_groups) { - let mutex_group = this.add_mutually_exclusive_group({ - required: group.required - }) - - // map the actions to their new mutex group - for (let action of group._group_actions) { - group_map.set(action, mutex_group) - } - } - - // add all actions to this container or their group - for (let action of container._actions) { - group_map.get(action)._add_action(action) - } - } - - _get_positional_kwargs() { - let [ - dest, - kwargs - ] = _parse_opts(arguments, { - dest: no_default, - '**kwargs': no_default - }) - - // make sure required is not specified - if ('required' in kwargs) { - let msg = "'required' is an invalid argument for positionals" - throw new TypeError(msg) - } - - // mark positional arguments as required if at least one is - // always required - if (![OPTIONAL, ZERO_OR_MORE].includes(kwargs.nargs)) { - kwargs.required = true - } - if (kwargs.nargs === ZERO_OR_MORE && !('default' in kwargs)) { - kwargs.required = true - } - - // return the keyword arguments with no option strings - return Object.assign(kwargs, { dest, option_strings: [] }) - } - - _get_optional_kwargs() { - let [ - args, - kwargs - ] = _parse_opts(arguments, { - '*args': no_default, - '**kwargs': no_default - }) - - // determine short and long option strings - let option_strings = [] - let long_option_strings = [] - let option_string - for (option_string of args) { - // error on strings that don't start with an appropriate prefix - if (!this.prefix_chars.includes(option_string[0])) { - let args = {option: option_string, - prefix_chars: this.prefix_chars} - let msg = 'invalid option string %(option)r: ' + - 'must start with a character %(prefix_chars)r' - throw new TypeError(sub(msg, args)) - } - - // strings starting with two prefix characters are long options - option_strings.push(option_string) - if (option_string.length > 1 && this.prefix_chars.includes(option_string[1])) { - long_option_strings.push(option_string) - } - } - - // infer destination, '--foo-bar' -> 'foo_bar' and '-x' -> 'x' - let dest = kwargs.dest - delete kwargs.dest - if (dest === undefined) { - let dest_option_string - if (long_option_strings.length) { - dest_option_string = long_option_strings[0] - } else { - dest_option_string = option_strings[0] - } - dest = _string_lstrip(dest_option_string, this.prefix_chars) - if (!dest) { - let msg = 'dest= is required for options like %r' - throw new TypeError(sub(msg, option_string)) - } - dest = dest.replace(/-/g, '_') - } - - // return the updated keyword arguments - return Object.assign(kwargs, { dest, option_strings }) - } - - _pop_action_class(kwargs, default_value = undefined) { - let action = getattr(kwargs, 'action', default_value) - delete kwargs.action - return this._registry_get('action', action, action) - } - - _get_handler() { - // determine function from conflict handler string - let handler_func_name = sub('_handle_conflict_%s', this.conflict_handler) - if (typeof this[handler_func_name] === 'function') { - return this[handler_func_name] - } else { - let msg = 'invalid conflict_resolution value: %r' - throw new TypeError(sub(msg, this.conflict_handler)) - } - } - - _check_conflict(action) { - - // find all options that conflict with this option - let confl_optionals = [] - for (let option_string of action.option_strings) { - if (hasattr(this._option_string_actions, option_string)) { - let confl_optional = this._option_string_actions[option_string] - confl_optionals.push([ option_string, confl_optional ]) - } - } - - // resolve any conflicts - if (confl_optionals.length) { - let conflict_handler = this._get_handler() - conflict_handler.call(this, action, confl_optionals) - } - } - - _handle_conflict_error(action, conflicting_actions) { - let message = conflicting_actions.length === 1 ? - 'conflicting option string: %s' : - 'conflicting option strings: %s' - let conflict_string = conflicting_actions.map(([ option_string/*, action*/ ]) => option_string).join(', ') - throw new ArgumentError(action, sub(message, conflict_string)) - } - - _handle_conflict_resolve(action, conflicting_actions) { - - // remove all conflicting options - for (let [ option_string, action ] of conflicting_actions) { - - // remove the conflicting option - _array_remove(action.option_strings, option_string) - delete this._option_string_actions[option_string] - - // if the option now has no option string, remove it from the - // container holding it - if (!action.option_strings.length) { - action.container._remove_action(action) - } - } - } -})) - - -const _ArgumentGroup = _callable(class _ArgumentGroup extends _ActionsContainer { - - constructor() { - let [ - container, - title, - description, - kwargs - ] = _parse_opts(arguments, { - container: no_default, - title: undefined, - description: undefined, - '**kwargs': no_default - }) - - // add any missing keyword arguments by checking the container - setdefault(kwargs, 'conflict_handler', container.conflict_handler) - setdefault(kwargs, 'prefix_chars', container.prefix_chars) - setdefault(kwargs, 'argument_default', container.argument_default) - super(Object.assign({ description }, kwargs)) - - // group attributes - this.title = title - this._group_actions = [] - - // share most attributes with the container - this._registries = container._registries - this._actions = container._actions - this._option_string_actions = container._option_string_actions - this._defaults = container._defaults - this._has_negative_number_optionals = - container._has_negative_number_optionals - this._mutually_exclusive_groups = container._mutually_exclusive_groups - } - - _add_action(action) { - action = super._add_action(action) - this._group_actions.push(action) - return action - } - - _remove_action(action) { - super._remove_action(action) - _array_remove(this._group_actions, action) - } -}) - - -const _MutuallyExclusiveGroup = _callable(class _MutuallyExclusiveGroup extends _ArgumentGroup { - - constructor() { - let [ - container, - required - ] = _parse_opts(arguments, { - container: no_default, - required: false - }) - - super(container) - this.required = required - this._container = container - } - - _add_action(action) { - if (action.required) { - let msg = 'mutually exclusive arguments must be optional' - throw new TypeError(msg) - } - action = this._container._add_action(action) - this._group_actions.push(action) - return action - } - - _remove_action(action) { - this._container._remove_action(action) - _array_remove(this._group_actions, action) - } -}) - - -const ArgumentParser = _camelcase_alias(_callable(class ArgumentParser extends _AttributeHolder(_ActionsContainer) { - /* - * Object for parsing command line strings into Python objects. - * - * Keyword Arguments: - * - prog -- The name of the program (default: sys.argv[0]) - * - usage -- A usage message (default: auto-generated from arguments) - * - description -- A description of what the program does - * - epilog -- Text following the argument descriptions - * - parents -- Parsers whose arguments should be copied into this one - * - formatter_class -- HelpFormatter class for printing help messages - * - prefix_chars -- Characters that prefix optional arguments - * - fromfile_prefix_chars -- Characters that prefix files containing - * additional arguments - * - argument_default -- The default value for all arguments - * - conflict_handler -- String indicating how to handle conflicts - * - add_help -- Add a -h/-help option - * - allow_abbrev -- Allow long options to be abbreviated unambiguously - * - exit_on_error -- Determines whether or not ArgumentParser exits with - * error info when an error occurs - */ - - constructor() { - let [ - prog, - usage, - description, - epilog, - parents, - formatter_class, - prefix_chars, - fromfile_prefix_chars, - argument_default, - conflict_handler, - add_help, - allow_abbrev, - exit_on_error, - debug, // LEGACY (v1 compatibility), debug mode - version // LEGACY (v1 compatibility), version - ] = _parse_opts(arguments, { - prog: undefined, - usage: undefined, - description: undefined, - epilog: undefined, - parents: [], - formatter_class: HelpFormatter, - prefix_chars: '-', - fromfile_prefix_chars: undefined, - argument_default: undefined, - conflict_handler: 'error', - add_help: true, - allow_abbrev: true, - exit_on_error: true, - debug: undefined, // LEGACY (v1 compatibility), debug mode - version: undefined // LEGACY (v1 compatibility), version - }) - - // LEGACY (v1 compatibility) - if (debug !== undefined) { - deprecate('debug', - 'The "debug" argument to ArgumentParser is deprecated. Please ' + - 'override ArgumentParser.exit function instead.' - ) - } - - if (version !== undefined) { - deprecate('version', - 'The "version" argument to ArgumentParser is deprecated. Please use ' + - "add_argument(..., { action: 'version', version: 'N', ... }) instead." - ) - } - // end - - super({ - description, - prefix_chars, - argument_default, - conflict_handler - }) - - // default setting for prog - if (prog === undefined) { - prog = path.basename(get_argv()[0] || '') - } - - this.prog = prog - this.usage = usage - this.epilog = epilog - this.formatter_class = formatter_class - this.fromfile_prefix_chars = fromfile_prefix_chars - this.add_help = add_help - this.allow_abbrev = allow_abbrev - this.exit_on_error = exit_on_error - // LEGACY (v1 compatibility), debug mode - this.debug = debug - // end - - this._positionals = this.add_argument_group('positional arguments') - this._optionals = this.add_argument_group('optional arguments') - this._subparsers = undefined - - // register types - function identity(string) { - return string - } - this.register('type', undefined, identity) - this.register('type', null, identity) - this.register('type', 'auto', identity) - this.register('type', 'int', function (x) { - let result = Number(x) - if (!Number.isInteger(result)) { - throw new TypeError(sub('could not convert string to int: %r', x)) - } - return result - }) - this.register('type', 'float', function (x) { - let result = Number(x) - if (isNaN(result)) { - throw new TypeError(sub('could not convert string to float: %r', x)) - } - return result - }) - this.register('type', 'str', String) - // LEGACY (v1 compatibility): custom types - this.register('type', 'string', - util.deprecate(String, 'use {type:"str"} or {type:String} instead of {type:"string"}')) - // end - - // add help argument if necessary - // (using explicit default to override global argument_default) - let default_prefix = prefix_chars.includes('-') ? '-' : prefix_chars[0] - if (this.add_help) { - this.add_argument( - default_prefix + 'h', - default_prefix.repeat(2) + 'help', - { - action: 'help', - default: SUPPRESS, - help: 'show this help message and exit' - } - ) - } - // LEGACY (v1 compatibility), version - if (version) { - this.add_argument( - default_prefix + 'v', - default_prefix.repeat(2) + 'version', - { - action: 'version', - default: SUPPRESS, - version: this.version, - help: "show program's version number and exit" - } - ) - } - // end - - // add parent arguments and defaults - for (let parent of parents) { - this._add_container_actions(parent) - Object.assign(this._defaults, parent._defaults) - } - } - - // ======================= - // Pretty __repr__ methods - // ======================= - _get_kwargs() { - let names = [ - 'prog', - 'usage', - 'description', - 'formatter_class', - 'conflict_handler', - 'add_help' - ] - return names.map(name => [ name, getattr(this, name) ]) - } - - // ================================== - // Optional/Positional adding methods - // ================================== - add_subparsers() { - let [ - kwargs - ] = _parse_opts(arguments, { - '**kwargs': no_default - }) - - if (this._subparsers !== undefined) { - this.error('cannot have multiple subparser arguments') - } - - // add the parser class to the arguments if it's not present - setdefault(kwargs, 'parser_class', this.constructor) - - if ('title' in kwargs || 'description' in kwargs) { - let title = getattr(kwargs, 'title', 'subcommands') - let description = getattr(kwargs, 'description', undefined) - delete kwargs.title - delete kwargs.description - this._subparsers = this.add_argument_group(title, description) - } else { - this._subparsers = this._positionals - } - - // prog defaults to the usage message of this parser, skipping - // optional arguments and with no "usage:" prefix - if (kwargs.prog === undefined) { - let formatter = this._get_formatter() - let positionals = this._get_positional_actions() - let groups = this._mutually_exclusive_groups - formatter.add_usage(this.usage, positionals, groups, '') - kwargs.prog = formatter.format_help().trim() - } - - // create the parsers action and add it to the positionals list - let parsers_class = this._pop_action_class(kwargs, 'parsers') - // eslint-disable-next-line new-cap - let action = new parsers_class(Object.assign({ option_strings: [] }, kwargs)) - this._subparsers._add_action(action) - - // return the created parsers action - return action - } - - _add_action(action) { - if (action.option_strings.length) { - this._optionals._add_action(action) - } else { - this._positionals._add_action(action) - } - return action - } - - _get_optional_actions() { - return this._actions.filter(action => action.option_strings.length) - } - - _get_positional_actions() { - return this._actions.filter(action => !action.option_strings.length) - } - - // ===================================== - // Command line argument parsing methods - // ===================================== - parse_args(args = undefined, namespace = undefined) { - let argv - [ args, argv ] = this.parse_known_args(args, namespace) - if (argv && argv.length > 0) { - let msg = 'unrecognized arguments: %s' - this.error(sub(msg, argv.join(' '))) - } - return args - } - - parse_known_args(args = undefined, namespace = undefined) { - if (args === undefined) { - args = get_argv().slice(1) - } - - // default Namespace built from parser defaults - if (namespace === undefined) { - namespace = new Namespace() - } - - // add any action defaults that aren't present - for (let action of this._actions) { - if (action.dest !== SUPPRESS) { - if (!hasattr(namespace, action.dest)) { - if (action.default !== SUPPRESS) { - setattr(namespace, action.dest, action.default) - } - } - } - } - - // add any parser defaults that aren't present - for (let dest of Object.keys(this._defaults)) { - if (!hasattr(namespace, dest)) { - setattr(namespace, dest, this._defaults[dest]) - } - } - - // parse the arguments and exit if there are any errors - if (this.exit_on_error) { - try { - [ namespace, args ] = this._parse_known_args(args, namespace) - } catch (err) { - if (err instanceof ArgumentError) { - this.error(err.message) - } else { - throw err - } - } - } else { - [ namespace, args ] = this._parse_known_args(args, namespace) - } - - if (hasattr(namespace, _UNRECOGNIZED_ARGS_ATTR)) { - args = args.concat(getattr(namespace, _UNRECOGNIZED_ARGS_ATTR)) - delattr(namespace, _UNRECOGNIZED_ARGS_ATTR) - } - - return [ namespace, args ] - } - - _parse_known_args(arg_strings, namespace) { - // replace arg strings that are file references - if (this.fromfile_prefix_chars !== undefined) { - arg_strings = this._read_args_from_files(arg_strings) - } - - // map all mutually exclusive arguments to the other arguments - // they can't occur with - let action_conflicts = new Map() - for (let mutex_group of this._mutually_exclusive_groups) { - let group_actions = mutex_group._group_actions - for (let [ i, mutex_action ] of Object.entries(mutex_group._group_actions)) { - let conflicts = action_conflicts.get(mutex_action) || [] - conflicts = conflicts.concat(group_actions.slice(0, +i)) - conflicts = conflicts.concat(group_actions.slice(+i + 1)) - action_conflicts.set(mutex_action, conflicts) - } - } - - // find all option indices, and determine the arg_string_pattern - // which has an 'O' if there is an option at an index, - // an 'A' if there is an argument, or a '-' if there is a '--' - let option_string_indices = {} - let arg_string_pattern_parts = [] - let arg_strings_iter = Object.entries(arg_strings)[Symbol.iterator]() - for (let [ i, arg_string ] of arg_strings_iter) { - - // all args after -- are non-options - if (arg_string === '--') { - arg_string_pattern_parts.push('-') - for ([ i, arg_string ] of arg_strings_iter) { - arg_string_pattern_parts.push('A') - } - - // otherwise, add the arg to the arg strings - // and note the index if it was an option - } else { - let option_tuple = this._parse_optional(arg_string) - let pattern - if (option_tuple === undefined) { - pattern = 'A' - } else { - option_string_indices[i] = option_tuple - pattern = 'O' - } - arg_string_pattern_parts.push(pattern) - } - } - - // join the pieces together to form the pattern - let arg_strings_pattern = arg_string_pattern_parts.join('') - - // converts arg strings to the appropriate and then takes the action - let seen_actions = new Set() - let seen_non_default_actions = new Set() - let extras - - let take_action = (action, argument_strings, option_string = undefined) => { - seen_actions.add(action) - let argument_values = this._get_values(action, argument_strings) - - // error if this argument is not allowed with other previously - // seen arguments, assuming that actions that use the default - // value don't really count as "present" - if (argument_values !== action.default) { - seen_non_default_actions.add(action) - for (let conflict_action of action_conflicts.get(action) || []) { - if (seen_non_default_actions.has(conflict_action)) { - let msg = 'not allowed with argument %s' - let action_name = _get_action_name(conflict_action) - throw new ArgumentError(action, sub(msg, action_name)) - } - } - } - - // take the action if we didn't receive a SUPPRESS value - // (e.g. from a default) - if (argument_values !== SUPPRESS) { - action(this, namespace, argument_values, option_string) - } - } - - // function to convert arg_strings into an optional action - let consume_optional = start_index => { - - // get the optional identified at this index - let option_tuple = option_string_indices[start_index] - let [ action, option_string, explicit_arg ] = option_tuple - - // identify additional optionals in the same arg string - // (e.g. -xyz is the same as -x -y -z if no args are required) - let action_tuples = [] - let stop - for (;;) { - - // if we found no optional action, skip it - if (action === undefined) { - extras.push(arg_strings[start_index]) - return start_index + 1 - } - - // if there is an explicit argument, try to match the - // optional's string arguments to only this - if (explicit_arg !== undefined) { - let arg_count = this._match_argument(action, 'A') - - // if the action is a single-dash option and takes no - // arguments, try to parse more single-dash options out - // of the tail of the option string - let chars = this.prefix_chars - if (arg_count === 0 && !chars.includes(option_string[1])) { - action_tuples.push([ action, [], option_string ]) - let char = option_string[0] - option_string = char + explicit_arg[0] - let new_explicit_arg = explicit_arg.slice(1) || undefined - let optionals_map = this._option_string_actions - if (hasattr(optionals_map, option_string)) { - action = optionals_map[option_string] - explicit_arg = new_explicit_arg - } else { - let msg = 'ignored explicit argument %r' - throw new ArgumentError(action, sub(msg, explicit_arg)) - } - - // if the action expect exactly one argument, we've - // successfully matched the option; exit the loop - } else if (arg_count === 1) { - stop = start_index + 1 - let args = [ explicit_arg ] - action_tuples.push([ action, args, option_string ]) - break - - // error if a double-dash option did not use the - // explicit argument - } else { - let msg = 'ignored explicit argument %r' - throw new ArgumentError(action, sub(msg, explicit_arg)) - } - - // if there is no explicit argument, try to match the - // optional's string arguments with the following strings - // if successful, exit the loop - } else { - let start = start_index + 1 - let selected_patterns = arg_strings_pattern.slice(start) - let arg_count = this._match_argument(action, selected_patterns) - stop = start + arg_count - let args = arg_strings.slice(start, stop) - action_tuples.push([ action, args, option_string ]) - break - } - } - - // add the Optional to the list and return the index at which - // the Optional's string args stopped - assert(action_tuples.length) - for (let [ action, args, option_string ] of action_tuples) { - take_action(action, args, option_string) - } - return stop - } - - // the list of Positionals left to be parsed; this is modified - // by consume_positionals() - let positionals = this._get_positional_actions() - - // function to convert arg_strings into positional actions - let consume_positionals = start_index => { - // match as many Positionals as possible - let selected_pattern = arg_strings_pattern.slice(start_index) - let arg_counts = this._match_arguments_partial(positionals, selected_pattern) - - // slice off the appropriate arg strings for each Positional - // and add the Positional and its args to the list - for (let i = 0; i < positionals.length && i < arg_counts.length; i++) { - let action = positionals[i] - let arg_count = arg_counts[i] - let args = arg_strings.slice(start_index, start_index + arg_count) - start_index += arg_count - take_action(action, args) - } - - // slice off the Positionals that we just parsed and return the - // index at which the Positionals' string args stopped - positionals = positionals.slice(arg_counts.length) - return start_index - } - - // consume Positionals and Optionals alternately, until we have - // passed the last option string - extras = [] - let start_index = 0 - let max_option_string_index = Math.max(-1, ...Object.keys(option_string_indices).map(Number)) - while (start_index <= max_option_string_index) { - - // consume any Positionals preceding the next option - let next_option_string_index = Math.min( - // eslint-disable-next-line no-loop-func - ...Object.keys(option_string_indices).map(Number).filter(index => index >= start_index) - ) - if (start_index !== next_option_string_index) { - let positionals_end_index = consume_positionals(start_index) - - // only try to parse the next optional if we didn't consume - // the option string during the positionals parsing - if (positionals_end_index > start_index) { - start_index = positionals_end_index - continue - } else { - start_index = positionals_end_index - } - } - - // if we consumed all the positionals we could and we're not - // at the index of an option string, there were extra arguments - if (!(start_index in option_string_indices)) { - let strings = arg_strings.slice(start_index, next_option_string_index) - extras = extras.concat(strings) - start_index = next_option_string_index - } - - // consume the next optional and any arguments for it - start_index = consume_optional(start_index) - } - - // consume any positionals following the last Optional - let stop_index = consume_positionals(start_index) - - // if we didn't consume all the argument strings, there were extras - extras = extras.concat(arg_strings.slice(stop_index)) - - // make sure all required actions were present and also convert - // action defaults which were not given as arguments - let required_actions = [] - for (let action of this._actions) { - if (!seen_actions.has(action)) { - if (action.required) { - required_actions.push(_get_action_name(action)) - } else { - // Convert action default now instead of doing it before - // parsing arguments to avoid calling convert functions - // twice (which may fail) if the argument was given, but - // only if it was defined already in the namespace - if (action.default !== undefined && - typeof action.default === 'string' && - hasattr(namespace, action.dest) && - action.default === getattr(namespace, action.dest)) { - setattr(namespace, action.dest, - this._get_value(action, action.default)) - } - } - } - } - - if (required_actions.length) { - this.error(sub('the following arguments are required: %s', - required_actions.join(', '))) - } - - // make sure all required groups had one option present - for (let group of this._mutually_exclusive_groups) { - if (group.required) { - let no_actions_used = true - for (let action of group._group_actions) { - if (seen_non_default_actions.has(action)) { - no_actions_used = false - break - } - } - - // if no actions were used, report the error - if (no_actions_used) { - let names = group._group_actions - .filter(action => action.help !== SUPPRESS) - .map(action => _get_action_name(action)) - let msg = 'one of the arguments %s is required' - this.error(sub(msg, names.join(' '))) - } - } - } - - // return the updated namespace and the extra arguments - return [ namespace, extras ] - } - - _read_args_from_files(arg_strings) { - // expand arguments referencing files - let new_arg_strings = [] - for (let arg_string of arg_strings) { - - // for regular arguments, just add them back into the list - if (!arg_string || !this.fromfile_prefix_chars.includes(arg_string[0])) { - new_arg_strings.push(arg_string) - - // replace arguments referencing files with the file content - } else { - try { - let args_file = fs.readFileSync(arg_string.slice(1), 'utf8') - let arg_strings = [] - for (let arg_line of splitlines(args_file)) { - for (let arg of this.convert_arg_line_to_args(arg_line)) { - arg_strings.push(arg) - } - } - arg_strings = this._read_args_from_files(arg_strings) - new_arg_strings = new_arg_strings.concat(arg_strings) - } catch (err) { - this.error(err.message) - } - } - } - - // return the modified argument list - return new_arg_strings - } - - convert_arg_line_to_args(arg_line) { - return [arg_line] - } - - _match_argument(action, arg_strings_pattern) { - // match the pattern for this action to the arg strings - let nargs_pattern = this._get_nargs_pattern(action) - let match = arg_strings_pattern.match(new RegExp('^' + nargs_pattern)) - - // raise an exception if we weren't able to find a match - if (match === null) { - let nargs_errors = { - undefined: 'expected one argument', - [OPTIONAL]: 'expected at most one argument', - [ONE_OR_MORE]: 'expected at least one argument' - } - let msg = nargs_errors[action.nargs] - if (msg === undefined) { - msg = sub(action.nargs === 1 ? 'expected %s argument' : 'expected %s arguments', action.nargs) - } - throw new ArgumentError(action, msg) - } - - // return the number of arguments matched - return match[1].length - } - - _match_arguments_partial(actions, arg_strings_pattern) { - // progressively shorten the actions list by slicing off the - // final actions until we find a match - let result = [] - for (let i of range(actions.length, 0, -1)) { - let actions_slice = actions.slice(0, i) - let pattern = actions_slice.map(action => this._get_nargs_pattern(action)).join('') - let match = arg_strings_pattern.match(new RegExp('^' + pattern)) - if (match !== null) { - result = result.concat(match.slice(1).map(string => string.length)) - break - } - } - - // return the list of arg string counts - return result - } - - _parse_optional(arg_string) { - // if it's an empty string, it was meant to be a positional - if (!arg_string) { - return undefined - } - - // if it doesn't start with a prefix, it was meant to be positional - if (!this.prefix_chars.includes(arg_string[0])) { - return undefined - } - - // if the option string is present in the parser, return the action - if (arg_string in this._option_string_actions) { - let action = this._option_string_actions[arg_string] - return [ action, arg_string, undefined ] - } - - // if it's just a single character, it was meant to be positional - if (arg_string.length === 1) { - return undefined - } - - // if the option string before the "=" is present, return the action - if (arg_string.includes('=')) { - let [ option_string, explicit_arg ] = _string_split(arg_string, '=', 1) - if (option_string in this._option_string_actions) { - let action = this._option_string_actions[option_string] - return [ action, option_string, explicit_arg ] - } - } - - // search through all possible prefixes of the option string - // and all actions in the parser for possible interpretations - let option_tuples = this._get_option_tuples(arg_string) - - // if multiple actions match, the option string was ambiguous - if (option_tuples.length > 1) { - let options = option_tuples.map(([ /*action*/, option_string/*, explicit_arg*/ ]) => option_string).join(', ') - let args = {option: arg_string, matches: options} - let msg = 'ambiguous option: %(option)s could match %(matches)s' - this.error(sub(msg, args)) - - // if exactly one action matched, this segmentation is good, - // so return the parsed action - } else if (option_tuples.length === 1) { - let [ option_tuple ] = option_tuples - return option_tuple - } - - // if it was not found as an option, but it looks like a negative - // number, it was meant to be positional - // unless there are negative-number-like options - if (this._negative_number_matcher.test(arg_string)) { - if (!this._has_negative_number_optionals.length) { - return undefined - } - } - - // if it contains a space, it was meant to be a positional - if (arg_string.includes(' ')) { - return undefined - } - - // it was meant to be an optional but there is no such option - // in this parser (though it might be a valid option in a subparser) - return [ undefined, arg_string, undefined ] - } - - _get_option_tuples(option_string) { - let result = [] - - // option strings starting with two prefix characters are only - // split at the '=' - let chars = this.prefix_chars - if (chars.includes(option_string[0]) && chars.includes(option_string[1])) { - if (this.allow_abbrev) { - let option_prefix, explicit_arg - if (option_string.includes('=')) { - [ option_prefix, explicit_arg ] = _string_split(option_string, '=', 1) - } else { - option_prefix = option_string - explicit_arg = undefined - } - for (let option_string of Object.keys(this._option_string_actions)) { - if (option_string.startsWith(option_prefix)) { - let action = this._option_string_actions[option_string] - let tup = [ action, option_string, explicit_arg ] - result.push(tup) - } - } - } - - // single character options can be concatenated with their arguments - // but multiple character options always have to have their argument - // separate - } else if (chars.includes(option_string[0]) && !chars.includes(option_string[1])) { - let option_prefix = option_string - let explicit_arg = undefined - let short_option_prefix = option_string.slice(0, 2) - let short_explicit_arg = option_string.slice(2) - - for (let option_string of Object.keys(this._option_string_actions)) { - if (option_string === short_option_prefix) { - let action = this._option_string_actions[option_string] - let tup = [ action, option_string, short_explicit_arg ] - result.push(tup) - } else if (option_string.startsWith(option_prefix)) { - let action = this._option_string_actions[option_string] - let tup = [ action, option_string, explicit_arg ] - result.push(tup) - } - } - - // shouldn't ever get here - } else { - this.error(sub('unexpected option string: %s', option_string)) - } - - // return the collected option tuples - return result - } - - _get_nargs_pattern(action) { - // in all examples below, we have to allow for '--' args - // which are represented as '-' in the pattern - let nargs = action.nargs - let nargs_pattern - - // the default (None) is assumed to be a single argument - if (nargs === undefined) { - nargs_pattern = '(-*A-*)' - - // allow zero or one arguments - } else if (nargs === OPTIONAL) { - nargs_pattern = '(-*A?-*)' - - // allow zero or more arguments - } else if (nargs === ZERO_OR_MORE) { - nargs_pattern = '(-*[A-]*)' - - // allow one or more arguments - } else if (nargs === ONE_OR_MORE) { - nargs_pattern = '(-*A[A-]*)' - - // allow any number of options or arguments - } else if (nargs === REMAINDER) { - nargs_pattern = '([-AO]*)' - - // allow one argument followed by any number of options or arguments - } else if (nargs === PARSER) { - nargs_pattern = '(-*A[-AO]*)' - - // suppress action, like nargs=0 - } else if (nargs === SUPPRESS) { - nargs_pattern = '(-*-*)' - - // all others should be integers - } else { - nargs_pattern = sub('(-*%s-*)', 'A'.repeat(nargs).split('').join('-*')) - } - - // if this is an optional action, -- is not allowed - if (action.option_strings.length) { - nargs_pattern = nargs_pattern.replace(/-\*/g, '') - nargs_pattern = nargs_pattern.replace(/-/g, '') - } - - // return the pattern - return nargs_pattern - } - - // ======================== - // Alt command line argument parsing, allowing free intermix - // ======================== - - parse_intermixed_args(args = undefined, namespace = undefined) { - let argv - [ args, argv ] = this.parse_known_intermixed_args(args, namespace) - if (argv.length) { - let msg = 'unrecognized arguments: %s' - this.error(sub(msg, argv.join(' '))) - } - return args - } - - parse_known_intermixed_args(args = undefined, namespace = undefined) { - // returns a namespace and list of extras - // - // positional can be freely intermixed with optionals. optionals are - // first parsed with all positional arguments deactivated. The 'extras' - // are then parsed. If the parser definition is incompatible with the - // intermixed assumptions (e.g. use of REMAINDER, subparsers) a - // TypeError is raised. - // - // positionals are 'deactivated' by setting nargs and default to - // SUPPRESS. This blocks the addition of that positional to the - // namespace - - let extras - let positionals = this._get_positional_actions() - let a = positionals.filter(action => [ PARSER, REMAINDER ].includes(action.nargs)) - if (a.length) { - throw new TypeError(sub('parse_intermixed_args: positional arg' + - ' with nargs=%s', a[0].nargs)) - } - - for (let group of this._mutually_exclusive_groups) { - for (let action of group._group_actions) { - if (positionals.includes(action)) { - throw new TypeError('parse_intermixed_args: positional in' + - ' mutuallyExclusiveGroup') - } - } - } - - let save_usage - try { - save_usage = this.usage - let remaining_args - try { - if (this.usage === undefined) { - // capture the full usage for use in error messages - this.usage = this.format_usage().slice(7) - } - for (let action of positionals) { - // deactivate positionals - action.save_nargs = action.nargs - // action.nargs = 0 - action.nargs = SUPPRESS - action.save_default = action.default - action.default = SUPPRESS - } - [ namespace, remaining_args ] = this.parse_known_args(args, - namespace) - for (let action of positionals) { - // remove the empty positional values from namespace - let attr = getattr(namespace, action.dest) - if (Array.isArray(attr) && attr.length === 0) { - // eslint-disable-next-line no-console - console.warn(sub('Do not expect %s in %s', action.dest, namespace)) - delattr(namespace, action.dest) - } - } - } finally { - // restore nargs and usage before exiting - for (let action of positionals) { - action.nargs = action.save_nargs - action.default = action.save_default - } - } - let optionals = this._get_optional_actions() - try { - // parse positionals. optionals aren't normally required, but - // they could be, so make sure they aren't. - for (let action of optionals) { - action.save_required = action.required - action.required = false - } - for (let group of this._mutually_exclusive_groups) { - group.save_required = group.required - group.required = false - } - [ namespace, extras ] = this.parse_known_args(remaining_args, - namespace) - } finally { - // restore parser values before exiting - for (let action of optionals) { - action.required = action.save_required - } - for (let group of this._mutually_exclusive_groups) { - group.required = group.save_required - } - } - } finally { - this.usage = save_usage - } - return [ namespace, extras ] - } - - // ======================== - // Value conversion methods - // ======================== - _get_values(action, arg_strings) { - // for everything but PARSER, REMAINDER args, strip out first '--' - if (![PARSER, REMAINDER].includes(action.nargs)) { - try { - _array_remove(arg_strings, '--') - } catch (err) {} - } - - let value - // optional argument produces a default when not present - if (!arg_strings.length && action.nargs === OPTIONAL) { - if (action.option_strings.length) { - value = action.const - } else { - value = action.default - } - if (typeof value === 'string') { - value = this._get_value(action, value) - this._check_value(action, value) - } - - // when nargs='*' on a positional, if there were no command-line - // args, use the default if it is anything other than None - } else if (!arg_strings.length && action.nargs === ZERO_OR_MORE && - !action.option_strings.length) { - if (action.default !== undefined) { - value = action.default - } else { - value = arg_strings - } - this._check_value(action, value) - - // single argument or optional argument produces a single value - } else if (arg_strings.length === 1 && [undefined, OPTIONAL].includes(action.nargs)) { - let arg_string = arg_strings[0] - value = this._get_value(action, arg_string) - this._check_value(action, value) - - // REMAINDER arguments convert all values, checking none - } else if (action.nargs === REMAINDER) { - value = arg_strings.map(v => this._get_value(action, v)) - - // PARSER arguments convert all values, but check only the first - } else if (action.nargs === PARSER) { - value = arg_strings.map(v => this._get_value(action, v)) - this._check_value(action, value[0]) - - // SUPPRESS argument does not put anything in the namespace - } else if (action.nargs === SUPPRESS) { - value = SUPPRESS - - // all other types of nargs produce a list - } else { - value = arg_strings.map(v => this._get_value(action, v)) - for (let v of value) { - this._check_value(action, v) - } - } - - // return the converted value - return value - } - - _get_value(action, arg_string) { - let type_func = this._registry_get('type', action.type, action.type) - if (typeof type_func !== 'function') { - let msg = '%r is not callable' - throw new ArgumentError(action, sub(msg, type_func)) - } - - // convert the value to the appropriate type - let result - try { - try { - result = type_func(arg_string) - } catch (err) { - // Dear TC39, why would you ever consider making es6 classes not callable? - // We had one universal interface, [[Call]], which worked for anything - // (with familiar this-instanceof guard for classes). Now we have two. - if (err instanceof TypeError && - /Class constructor .* cannot be invoked without 'new'/.test(err.message)) { - // eslint-disable-next-line new-cap - result = new type_func(arg_string) - } else { - throw err - } - } - - } catch (err) { - // ArgumentTypeErrors indicate errors - if (err instanceof ArgumentTypeError) { - //let name = getattr(action.type, 'name', repr(action.type)) - let msg = err.message - throw new ArgumentError(action, msg) - - // TypeErrors or ValueErrors also indicate errors - } else if (err instanceof TypeError) { - let name = getattr(action.type, 'name', repr(action.type)) - let args = {type: name, value: arg_string} - let msg = 'invalid %(type)s value: %(value)r' - throw new ArgumentError(action, sub(msg, args)) - } else { - throw err - } - } - - // return the converted value - return result - } - - _check_value(action, value) { - // converted value must be one of the choices (if specified) - if (action.choices !== undefined && !_choices_to_array(action.choices).includes(value)) { - let args = {value, - choices: _choices_to_array(action.choices).map(repr).join(', ')} - let msg = 'invalid choice: %(value)r (choose from %(choices)s)' - throw new ArgumentError(action, sub(msg, args)) - } - } - - // ======================= - // Help-formatting methods - // ======================= - format_usage() { - let formatter = this._get_formatter() - formatter.add_usage(this.usage, this._actions, - this._mutually_exclusive_groups) - return formatter.format_help() - } - - format_help() { - let formatter = this._get_formatter() - - // usage - formatter.add_usage(this.usage, this._actions, - this._mutually_exclusive_groups) - - // description - formatter.add_text(this.description) - - // positionals, optionals and user-defined groups - for (let action_group of this._action_groups) { - formatter.start_section(action_group.title) - formatter.add_text(action_group.description) - formatter.add_arguments(action_group._group_actions) - formatter.end_section() - } - - // epilog - formatter.add_text(this.epilog) - - // determine help from format above - return formatter.format_help() - } - - _get_formatter() { - // eslint-disable-next-line new-cap - return new this.formatter_class({ prog: this.prog }) - } - - // ===================== - // Help-printing methods - // ===================== - print_usage(file = undefined) { - if (file === undefined) file = process.stdout - this._print_message(this.format_usage(), file) - } - - print_help(file = undefined) { - if (file === undefined) file = process.stdout - this._print_message(this.format_help(), file) - } - - _print_message(message, file = undefined) { - if (message) { - if (file === undefined) file = process.stderr - file.write(message) - } - } - - // =============== - // Exiting methods - // =============== - exit(status = 0, message = undefined) { - if (message) { - this._print_message(message, process.stderr) - } - process.exit(status) - } - - error(message) { - /* - * error(message: string) - * - * Prints a usage message incorporating the message to stderr and - * exits. - * - * If you override this in a subclass, it should not return -- it - * should either exit or raise an exception. - */ - - // LEGACY (v1 compatibility), debug mode - if (this.debug === true) throw new Error(message) - // end - this.print_usage(process.stderr) - let args = {prog: this.prog, message: message} - this.exit(2, sub('%(prog)s: error: %(message)s\n', args)) - } -})) - - -module.exports = { - ArgumentParser, - ArgumentError, - ArgumentTypeError, - BooleanOptionalAction, - FileType, - HelpFormatter, - ArgumentDefaultsHelpFormatter, - RawDescriptionHelpFormatter, - RawTextHelpFormatter, - MetavarTypeHelpFormatter, - Namespace, - Action, - ONE_OR_MORE, - OPTIONAL, - PARSER, - REMAINDER, - SUPPRESS, - ZERO_OR_MORE -} - -// LEGACY (v1 compatibility), Const alias -Object.defineProperty(module.exports, 'Const', { - get() { - let result = {} - Object.entries({ ONE_OR_MORE, OPTIONAL, PARSER, REMAINDER, SUPPRESS, ZERO_OR_MORE }).forEach(([ n, v ]) => { - Object.defineProperty(result, n, { - get() { - deprecate(n, sub('use argparse.%s instead of argparse.Const.%s', n, n)) - return v - } - }) - }) - Object.entries({ _UNRECOGNIZED_ARGS_ATTR }).forEach(([ n, v ]) => { - Object.defineProperty(result, n, { - get() { - deprecate(n, sub('argparse.Const.%s is an internal symbol and will no longer be available', n)) - return v - } - }) - }) - return result - }, - enumerable: false -}) -// end diff --git a/node_modules/argparse/lib/sub.js b/node_modules/argparse/lib/sub.js deleted file mode 100644 index e3eb3215..00000000 --- a/node_modules/argparse/lib/sub.js +++ /dev/null @@ -1,67 +0,0 @@ -// Limited implementation of python % string operator, supports only %s and %r for now -// (other formats are not used here, but may appear in custom templates) - -'use strict' - -const { inspect } = require('util') - - -module.exports = function sub(pattern, ...values) { - let regex = /%(?:(%)|(-)?(\*)?(?:\((\w+)\))?([A-Za-z]))/g - - let result = pattern.replace(regex, function (_, is_literal, is_left_align, is_padded, name, format) { - if (is_literal) return '%' - - let padded_count = 0 - if (is_padded) { - if (values.length === 0) throw new TypeError('not enough arguments for format string') - padded_count = values.shift() - if (!Number.isInteger(padded_count)) throw new TypeError('* wants int') - } - - let str - if (name !== undefined) { - let dict = values[0] - if (typeof dict !== 'object' || dict === null) throw new TypeError('format requires a mapping') - if (!(name in dict)) throw new TypeError(`no such key: '${name}'`) - str = dict[name] - } else { - if (values.length === 0) throw new TypeError('not enough arguments for format string') - str = values.shift() - } - - switch (format) { - case 's': - str = String(str) - break - case 'r': - str = inspect(str) - break - case 'd': - case 'i': - if (typeof str !== 'number') { - throw new TypeError(`%${format} format: a number is required, not ${typeof str}`) - } - str = String(str.toFixed(0)) - break - default: - throw new TypeError(`unsupported format character '${format}'`) - } - - if (padded_count > 0) { - return is_left_align ? str.padEnd(padded_count) : str.padStart(padded_count) - } else { - return str - } - }) - - if (values.length) { - if (values.length === 1 && typeof values[0] === 'object' && values[0] !== null) { - // mapping - } else { - throw new TypeError('not all arguments converted during string formatting') - } - } - - return result -} diff --git a/node_modules/argparse/lib/textwrap.js b/node_modules/argparse/lib/textwrap.js deleted file mode 100644 index 23d51cdb..00000000 --- a/node_modules/argparse/lib/textwrap.js +++ /dev/null @@ -1,440 +0,0 @@ -// Partial port of python's argparse module, version 3.9.0 (only wrap and fill functions): -// https://github.com/python/cpython/blob/v3.9.0b4/Lib/textwrap.py - -'use strict' - -/* - * Text wrapping and filling. - */ - -// Copyright (C) 1999-2001 Gregory P. Ward. -// Copyright (C) 2002, 2003 Python Software Foundation. -// Copyright (C) 2020 argparse.js authors -// Originally written by Greg Ward <gward@python.net> - -// Hardcode the recognized whitespace characters to the US-ASCII -// whitespace characters. The main reason for doing this is that -// some Unicode spaces (like \u00a0) are non-breaking whitespaces. -// -// This less funky little regex just split on recognized spaces. E.g. -// "Hello there -- you goof-ball, use the -b option!" -// splits into -// Hello/ /there/ /--/ /you/ /goof-ball,/ /use/ /the/ /-b/ /option!/ -const wordsep_simple_re = /([\t\n\x0b\x0c\r ]+)/ - -class TextWrapper { - /* - * Object for wrapping/filling text. The public interface consists of - * the wrap() and fill() methods; the other methods are just there for - * subclasses to override in order to tweak the default behaviour. - * If you want to completely replace the main wrapping algorithm, - * you'll probably have to override _wrap_chunks(). - * - * Several instance attributes control various aspects of wrapping: - * width (default: 70) - * the maximum width of wrapped lines (unless break_long_words - * is false) - * initial_indent (default: "") - * string that will be prepended to the first line of wrapped - * output. Counts towards the line's width. - * subsequent_indent (default: "") - * string that will be prepended to all lines save the first - * of wrapped output; also counts towards each line's width. - * expand_tabs (default: true) - * Expand tabs in input text to spaces before further processing. - * Each tab will become 0 .. 'tabsize' spaces, depending on its position - * in its line. If false, each tab is treated as a single character. - * tabsize (default: 8) - * Expand tabs in input text to 0 .. 'tabsize' spaces, unless - * 'expand_tabs' is false. - * replace_whitespace (default: true) - * Replace all whitespace characters in the input text by spaces - * after tab expansion. Note that if expand_tabs is false and - * replace_whitespace is true, every tab will be converted to a - * single space! - * fix_sentence_endings (default: false) - * Ensure that sentence-ending punctuation is always followed - * by two spaces. Off by default because the algorithm is - * (unavoidably) imperfect. - * break_long_words (default: true) - * Break words longer than 'width'. If false, those words will not - * be broken, and some lines might be longer than 'width'. - * break_on_hyphens (default: true) - * Allow breaking hyphenated words. If true, wrapping will occur - * preferably on whitespaces and right after hyphens part of - * compound words. - * drop_whitespace (default: true) - * Drop leading and trailing whitespace from lines. - * max_lines (default: None) - * Truncate wrapped lines. - * placeholder (default: ' [...]') - * Append to the last line of truncated text. - */ - - constructor(options = {}) { - let { - width = 70, - initial_indent = '', - subsequent_indent = '', - expand_tabs = true, - replace_whitespace = true, - fix_sentence_endings = false, - break_long_words = true, - drop_whitespace = true, - break_on_hyphens = true, - tabsize = 8, - max_lines = undefined, - placeholder=' [...]' - } = options - - this.width = width - this.initial_indent = initial_indent - this.subsequent_indent = subsequent_indent - this.expand_tabs = expand_tabs - this.replace_whitespace = replace_whitespace - this.fix_sentence_endings = fix_sentence_endings - this.break_long_words = break_long_words - this.drop_whitespace = drop_whitespace - this.break_on_hyphens = break_on_hyphens - this.tabsize = tabsize - this.max_lines = max_lines - this.placeholder = placeholder - } - - - // -- Private methods ----------------------------------------------- - // (possibly useful for subclasses to override) - - _munge_whitespace(text) { - /* - * _munge_whitespace(text : string) -> string - * - * Munge whitespace in text: expand tabs and convert all other - * whitespace characters to spaces. Eg. " foo\\tbar\\n\\nbaz" - * becomes " foo bar baz". - */ - if (this.expand_tabs) { - text = text.replace(/\t/g, ' '.repeat(this.tabsize)) // not strictly correct in js - } - if (this.replace_whitespace) { - text = text.replace(/[\t\n\x0b\x0c\r]/g, ' ') - } - return text - } - - _split(text) { - /* - * _split(text : string) -> [string] - * - * Split the text to wrap into indivisible chunks. Chunks are - * not quite the same as words; see _wrap_chunks() for full - * details. As an example, the text - * Look, goof-ball -- use the -b option! - * breaks into the following chunks: - * 'Look,', ' ', 'goof-', 'ball', ' ', '--', ' ', - * 'use', ' ', 'the', ' ', '-b', ' ', 'option!' - * if break_on_hyphens is True, or in: - * 'Look,', ' ', 'goof-ball', ' ', '--', ' ', - * 'use', ' ', 'the', ' ', '-b', ' ', option!' - * otherwise. - */ - let chunks = text.split(wordsep_simple_re) - chunks = chunks.filter(Boolean) - return chunks - } - - _handle_long_word(reversed_chunks, cur_line, cur_len, width) { - /* - * _handle_long_word(chunks : [string], - * cur_line : [string], - * cur_len : int, width : int) - * - * Handle a chunk of text (most likely a word, not whitespace) that - * is too long to fit in any line. - */ - // Figure out when indent is larger than the specified width, and make - // sure at least one character is stripped off on every pass - let space_left - if (width < 1) { - space_left = 1 - } else { - space_left = width - cur_len - } - - // If we're allowed to break long words, then do so: put as much - // of the next chunk onto the current line as will fit. - if (this.break_long_words) { - cur_line.push(reversed_chunks[reversed_chunks.length - 1].slice(0, space_left)) - reversed_chunks[reversed_chunks.length - 1] = reversed_chunks[reversed_chunks.length - 1].slice(space_left) - - // Otherwise, we have to preserve the long word intact. Only add - // it to the current line if there's nothing already there -- - // that minimizes how much we violate the width constraint. - } else if (!cur_line) { - cur_line.push(...reversed_chunks.pop()) - } - - // If we're not allowed to break long words, and there's already - // text on the current line, do nothing. Next time through the - // main loop of _wrap_chunks(), we'll wind up here again, but - // cur_len will be zero, so the next line will be entirely - // devoted to the long word that we can't handle right now. - } - - _wrap_chunks(chunks) { - /* - * _wrap_chunks(chunks : [string]) -> [string] - * - * Wrap a sequence of text chunks and return a list of lines of - * length 'self.width' or less. (If 'break_long_words' is false, - * some lines may be longer than this.) Chunks correspond roughly - * to words and the whitespace between them: each chunk is - * indivisible (modulo 'break_long_words'), but a line break can - * come between any two chunks. Chunks should not have internal - * whitespace; ie. a chunk is either all whitespace or a "word". - * Whitespace chunks will be removed from the beginning and end of - * lines, but apart from that whitespace is preserved. - */ - let lines = [] - let indent - if (this.width <= 0) { - throw Error(`invalid width ${this.width} (must be > 0)`) - } - if (this.max_lines !== undefined) { - if (this.max_lines > 1) { - indent = this.subsequent_indent - } else { - indent = this.initial_indent - } - if (indent.length + this.placeholder.trimStart().length > this.width) { - throw Error('placeholder too large for max width') - } - } - - // Arrange in reverse order so items can be efficiently popped - // from a stack of chucks. - chunks = chunks.reverse() - - while (chunks.length > 0) { - - // Start the list of chunks that will make up the current line. - // cur_len is just the length of all the chunks in cur_line. - let cur_line = [] - let cur_len = 0 - - // Figure out which static string will prefix this line. - let indent - if (lines) { - indent = this.subsequent_indent - } else { - indent = this.initial_indent - } - - // Maximum width for this line. - let width = this.width - indent.length - - // First chunk on line is whitespace -- drop it, unless this - // is the very beginning of the text (ie. no lines started yet). - if (this.drop_whitespace && chunks[chunks.length - 1].trim() === '' && lines.length > 0) { - chunks.pop() - } - - while (chunks.length > 0) { - let l = chunks[chunks.length - 1].length - - // Can at least squeeze this chunk onto the current line. - if (cur_len + l <= width) { - cur_line.push(chunks.pop()) - cur_len += l - - // Nope, this line is full. - } else { - break - } - } - - // The current line is full, and the next chunk is too big to - // fit on *any* line (not just this one). - if (chunks.length && chunks[chunks.length - 1].length > width) { - this._handle_long_word(chunks, cur_line, cur_len, width) - cur_len = cur_line.map(l => l.length).reduce((a, b) => a + b, 0) - } - - // If the last chunk on this line is all whitespace, drop it. - if (this.drop_whitespace && cur_line.length > 0 && cur_line[cur_line.length - 1].trim() === '') { - cur_len -= cur_line[cur_line.length - 1].length - cur_line.pop() - } - - if (cur_line) { - if (this.max_lines === undefined || - lines.length + 1 < this.max_lines || - (chunks.length === 0 || - this.drop_whitespace && - chunks.length === 1 && - !chunks[0].trim()) && cur_len <= width) { - // Convert current line back to a string and store it in - // list of all lines (return value). - lines.push(indent + cur_line.join('')) - } else { - let had_break = false - while (cur_line) { - if (cur_line[cur_line.length - 1].trim() && - cur_len + this.placeholder.length <= width) { - cur_line.push(this.placeholder) - lines.push(indent + cur_line.join('')) - had_break = true - break - } - cur_len -= cur_line[-1].length - cur_line.pop() - } - if (!had_break) { - if (lines) { - let prev_line = lines[lines.length - 1].trimEnd() - if (prev_line.length + this.placeholder.length <= - this.width) { - lines[lines.length - 1] = prev_line + this.placeholder - break - } - } - lines.push(indent + this.placeholder.lstrip()) - } - break - } - } - } - - return lines - } - - _split_chunks(text) { - text = this._munge_whitespace(text) - return this._split(text) - } - - // -- Public interface ---------------------------------------------- - - wrap(text) { - /* - * wrap(text : string) -> [string] - * - * Reformat the single paragraph in 'text' so it fits in lines of - * no more than 'self.width' columns, and return a list of wrapped - * lines. Tabs in 'text' are expanded with string.expandtabs(), - * and all other whitespace characters (including newline) are - * converted to space. - */ - let chunks = this._split_chunks(text) - // not implemented in js - //if (this.fix_sentence_endings) { - // this._fix_sentence_endings(chunks) - //} - return this._wrap_chunks(chunks) - } - - fill(text) { - /* - * fill(text : string) -> string - * - * Reformat the single paragraph in 'text' to fit in lines of no - * more than 'self.width' columns, and return a new string - * containing the entire wrapped paragraph. - */ - return this.wrap(text).join('\n') - } -} - - -// -- Convenience interface --------------------------------------------- - -function wrap(text, options = {}) { - /* - * Wrap a single paragraph of text, returning a list of wrapped lines. - * - * Reformat the single paragraph in 'text' so it fits in lines of no - * more than 'width' columns, and return a list of wrapped lines. By - * default, tabs in 'text' are expanded with string.expandtabs(), and - * all other whitespace characters (including newline) are converted to - * space. See TextWrapper class for available keyword args to customize - * wrapping behaviour. - */ - let { width = 70, ...kwargs } = options - let w = new TextWrapper(Object.assign({ width }, kwargs)) - return w.wrap(text) -} - -function fill(text, options = {}) { - /* - * Fill a single paragraph of text, returning a new string. - * - * Reformat the single paragraph in 'text' to fit in lines of no more - * than 'width' columns, and return a new string containing the entire - * wrapped paragraph. As with wrap(), tabs are expanded and other - * whitespace characters converted to space. See TextWrapper class for - * available keyword args to customize wrapping behaviour. - */ - let { width = 70, ...kwargs } = options - let w = new TextWrapper(Object.assign({ width }, kwargs)) - return w.fill(text) -} - -// -- Loosely related functionality ------------------------------------- - -let _whitespace_only_re = /^[ \t]+$/mg -let _leading_whitespace_re = /(^[ \t]*)(?:[^ \t\n])/mg - -function dedent(text) { - /* - * Remove any common leading whitespace from every line in `text`. - * - * This can be used to make triple-quoted strings line up with the left - * edge of the display, while still presenting them in the source code - * in indented form. - * - * Note that tabs and spaces are both treated as whitespace, but they - * are not equal: the lines " hello" and "\\thello" are - * considered to have no common leading whitespace. - * - * Entirely blank lines are normalized to a newline character. - */ - // Look for the longest leading string of spaces and tabs common to - // all lines. - let margin = undefined - text = text.replace(_whitespace_only_re, '') - let indents = text.match(_leading_whitespace_re) || [] - for (let indent of indents) { - indent = indent.slice(0, -1) - - if (margin === undefined) { - margin = indent - - // Current line more deeply indented than previous winner: - // no change (previous winner is still on top). - } else if (indent.startsWith(margin)) { - // pass - - // Current line consistent with and no deeper than previous winner: - // it's the new winner. - } else if (margin.startsWith(indent)) { - margin = indent - - // Find the largest common whitespace between current line and previous - // winner. - } else { - for (let i = 0; i < margin.length && i < indent.length; i++) { - if (margin[i] !== indent[i]) { - margin = margin.slice(0, i) - break - } - } - } - } - - if (margin) { - text = text.replace(new RegExp('^' + margin, 'mg'), '') - } - return text -} - -module.exports = { wrap, fill, dedent } diff --git a/node_modules/argparse/package.json b/node_modules/argparse/package.json deleted file mode 100644 index c92261db..00000000 --- a/node_modules/argparse/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "argparse@^2.0.1", - "_id": "argparse@2.0.1", - "_inBundle": false, - "_integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "_location": "/argparse", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "argparse@^2.0.1", - "name": "argparse", - "escapedName": "argparse", - "rawSpec": "^2.0.1", - "saveSpec": null, - "fetchSpec": "^2.0.1" - }, - "_requiredBy": [ - "/js-yaml" - ], - "_resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "_shasum": "246f50f3ca78a3240f6c997e8a9bd1eac49e4b38", - "_spec": "argparse@^2.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/js-yaml", - "bugs": { - "url": "https://github.com/nodeca/argparse/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "CLI arguments parser. Native port of python's argparse.", - "devDependencies": { - "@babel/eslint-parser": "^7.11.0", - "@babel/plugin-syntax-class-properties": "^7.10.4", - "eslint": "^7.5.0", - "mocha": "^8.0.1", - "nyc": "^15.1.0" - }, - "files": [ - "argparse.js", - "lib/" - ], - "homepage": "https://github.com/nodeca/argparse#readme", - "keywords": [ - "cli", - "parser", - "argparse", - "option", - "args" - ], - "license": "Python-2.0", - "main": "argparse.js", - "name": "argparse", - "repository": { - "type": "git", - "url": "git+https://github.com/nodeca/argparse.git" - }, - "scripts": { - "coverage": "npm run test && nyc report --reporter html", - "lint": "eslint .", - "test": "npm run lint && nyc mocha" - }, - "version": "2.0.1" -} diff --git a/node_modules/args/lib/command.js b/node_modules/args/lib/command.js deleted file mode 100644 index 9593123d..00000000 --- a/node_modules/args/lib/command.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict' - -module.exports = function(usage, description, init, aliases) { - if (Array.isArray(init)) { - aliases = init - init = undefined - } - - if (aliases && Array.isArray(aliases)) { - usage = [].concat([usage], aliases) - } - - // Register command to global scope - this.details.commands.push({ - usage, - description, - init: typeof init === 'function' ? init : false - }) - - // Allow chaining of .command() - return this -} diff --git a/node_modules/args/lib/example.js b/node_modules/args/lib/example.js deleted file mode 100644 index 09bed2d6..00000000 --- a/node_modules/args/lib/example.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict' - -module.exports = function(usage, description) { - if (typeof usage !== 'string' || typeof description !== 'string') { - throw new TypeError( - 'Usage for adding an Example: args.example("usage", "description")' - ) - } - - this.details.examples.push({ usage, description }) - - return this -} diff --git a/node_modules/args/lib/examples.js b/node_modules/args/lib/examples.js deleted file mode 100644 index 702d16af..00000000 --- a/node_modules/args/lib/examples.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict' - -module.exports = function(list) { - if (list.constructor !== Array) { - throw new Error('Item passed to .examples is not an array') - } - - for (const item of list) { - const usage = item.usage || false - const description = item.description || false - this.example(usage, description) - } - - return this -} diff --git a/node_modules/args/lib/help.js b/node_modules/args/lib/help.js deleted file mode 100644 index 1b0985ad..00000000 --- a/node_modules/args/lib/help.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict' - -module.exports = function() { - const name = this.config.name || this.binary.replace('-', ' ') - const firstBig = word => word.charAt(0).toUpperCase() + word.substr(1) - - const parts = [] - - const groups = { - commands: true, - options: true, - examples: true - } - - for (const group in groups) { - if (this.details[group].length > 0) { - continue - } - - groups[group] = false - } - - const optionHandle = groups.options ? '[options] ' : '' - const cmdHandle = groups.commands ? '[command]' : '' - const value = - typeof this.config.value === 'string' ? ' ' + this.config.value : '' - - parts.push([ - ` Usage: ${this.printMainColor(name)} ${this.printSubColor( - optionHandle + cmdHandle + value - )}`, - '' - ]) - - for (const group in groups) { - if (!groups[group]) { - continue - } - - parts.push(['', firstBig(group) + ':', '']) - - if (group === 'examples') { - parts.push(this.generateExamples()) - } else { - parts.push(this.generateDetails(group)) - } - - parts.push(['', '']) - } - - let output = '' - - // And finally, merge and output them - for (const part of parts) { - output += part.join('\n ') - } - - if (!groups.commands && !groups.options) { - output = 'No sub commands or options available' - } - - const { usageFilter } = this.config - - // If filter is available, pass usage information through - if (typeof usageFilter === 'function') { - output = usageFilter(output) || output - } - - console.log(output) - - if (this.config.exit && this.config.exit.help) { - // eslint-disable-next-line unicorn/no-process-exit - process.exit() - } -} diff --git a/node_modules/args/lib/index.js b/node_modules/args/lib/index.js deleted file mode 100644 index 4f171555..00000000 --- a/node_modules/args/lib/index.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict' - -const chalk = require('chalk') -const utils = require('./utils') - -const publicMethods = { - option: require('./option'), - options: require('./options'), - command: require('./command'), - parse: require('./parse'), - example: require('./example'), - examples: require('./examples'), - showHelp: require('./help'), - showVersion: require('./version') -} - -function Args() { - this.details = { - options: [], - commands: [], - examples: [] - } - - // Configuration defaults - this.config = { - exit: { help: true, version: true }, - help: true, - version: true, - usageFilter: null, - value: null, - name: null, - mainColor: 'yellow', - subColor: 'dim' - } - - this.printMainColor = chalk - this.printSubColor = chalk -} - -// Assign internal helpers -for (const util in utils) { - if (!{}.hasOwnProperty.call(utils, util)) { - continue - } - - Args.prototype[util] = utils[util] -} - -// Assign public methods -for (const method in publicMethods) { - if (!{}.hasOwnProperty.call(publicMethods, method)) { - continue - } - - Args.prototype[method] = publicMethods[method] -} - -module.exports = new Args() -module.exports.Args = Args; diff --git a/node_modules/args/lib/option.js b/node_modules/args/lib/option.js deleted file mode 100644 index 13deab71..00000000 --- a/node_modules/args/lib/option.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict' - -module.exports = function(name, description, defaultValue, init) { - let usage = [] - - const assignShort = (name, options, short) => { - if (options.find(flagName => flagName.usage[0] === short)) { - short = name.charAt(0).toUpperCase() - } - - return [short, name] - } - - // If name is an array, pick the values - // Otherwise just use the whole thing - switch (name.constructor) { - case String: - usage = assignShort(name, this.details.options, name.charAt(0)) - break - case Array: - usage = usage.concat(name) - break - default: - throw new Error('Invalid name for option') - } - - // Throw error if short option is too long - if (usage.length > 0 && usage[0].length > 1) { - throw new Error('Short version of option is longer than 1 char') - } - - const optionDetails = { - defaultValue, - usage, - description - } - - let defaultIsWrong - - switch (defaultValue) { - case false: - defaultIsWrong = true - break - case null: - defaultIsWrong = true - break - case undefined: - defaultIsWrong = true - break - default: - defaultIsWrong = false - } - - if (typeof init === 'function') { - optionDetails.init = init - } else if (!defaultIsWrong) { - // Set initializer depending on type of default value - optionDetails.init = this.handleType(defaultValue)[1] - } - - // Register option to global scope - this.details.options.push(optionDetails) - - // Allow chaining of .option() - return this -} diff --git a/node_modules/args/lib/options.js b/node_modules/args/lib/options.js deleted file mode 100644 index fb5d221c..00000000 --- a/node_modules/args/lib/options.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict' - -module.exports = function(list) { - if (list.constructor !== Array) { - throw new Error('Item passed to .options is not an array') - } - - for (const item of list) { - const preset = item.defaultValue - const init = item.init || false - - this.option(item.name, item.description, preset, init) - } - - return this -} diff --git a/node_modules/args/lib/parse.js b/node_modules/args/lib/parse.js deleted file mode 100644 index f770cbdb..00000000 --- a/node_modules/args/lib/parse.js +++ /dev/null @@ -1,69 +0,0 @@ -'use strict' - -const path = require('path') -const parser = require('mri') - -module.exports = function(argv, options) { - // Override default option values - Object.assign(this.config, options) - - if (Array.isArray(this.config.mainColor)) { - for (const item in this.config.mainColor) { - if (!{}.hasOwnProperty.call(this.config.mainColor, item)) { - continue - } - - // Chain all colors to our print method - this.printMainColor = this.printMainColor[this.config.mainColor[item]] - } - } else { - this.printMainColor = this.printMainColor[this.config.mainColor] - } - - if (Array.isArray(this.config.subColor)) { - for (const item in this.config.subColor) { - if (!{}.hasOwnProperty.call(this.config.subColor, item)) { - continue - } - - // Chain all colors to our print method - this.printSubColor = this.printSubColor[this.config.subColor[item]] - } - } else { - this.printSubColor = this.printSubColor[this.config.subColor] - } - - // Parse arguments using mri - this.raw = parser(argv.slice(1), this.config.mri || this.config.minimist) - this.binary = path.basename(this.raw._[0]) - - // If default version is allowed, check for it - if (this.config.version) { - this.checkVersion() - } - - // If default help is allowed, check for it - if (this.config.help) { - this.checkHelp() - } - - const subCommand = this.raw._[1] - const args = {} - const defined = this.isDefined(subCommand, 'commands') - const optionList = this.getOptions(defined) - - Object.assign(args, this.raw) - args._.shift() - - // Export sub arguments of command - this.sub = args._ - - // If sub command is defined, run it - if (defined) { - this.runCommand(defined, optionList) - return {} - } - - // Hand back list of options - return optionList -} diff --git a/node_modules/args/lib/utils.js b/node_modules/args/lib/utils.js deleted file mode 100644 index bf2be3d1..00000000 --- a/node_modules/args/lib/utils.js +++ /dev/null @@ -1,422 +0,0 @@ -'use strict' - -const { spawn } = require('child_process') -const path = require('path') -const camelcase = require('camelcase') -const leven = require('leven') - -function similarityBestMatch(mainString, targetStrings) { - let bestMatch - const ratings = targetStrings.map(targetString => { - const score = leven(mainString, targetString) - - const res = { - target: targetString, - rating: leven(mainString, targetString) - } - - if (!bestMatch || score < bestMatch.rating) bestMatch = res - - return res - }) - - return { - ratings, - bestMatch - } -} - -module.exports = { - handleType(value) { - let type = value - if (typeof value !== 'function') { - type = value.constructor - } - - // Depending on the type of the default value, - // select a default initializer function - switch (type) { - case String: - return ['[value]'] - case Array: - return ['<list>'] - case Number: - case parseInt: - return ['<n>', parseInt] - default: - return [''] - } - }, - - readOption(option) { - let value = option.defaultValue - const contents = {} - - // If option has been used, get its value - for (const name of option.usage) { - const fromArgs = this.raw[name] - if (typeof fromArgs !== 'undefined') { - value = fromArgs - } - } - - // Process the option's value - for (let name of option.usage) { - let propVal = value - - // Convert the value to an array when the option is called just once - if ( - Array.isArray(option.defaultValue) && - typeof propVal !== typeof option.defaultValue - ) { - propVal = [propVal] - } - - if ( - typeof option.defaultValue !== 'undefined' && - typeof propVal !== typeof option.defaultValue - ) { - propVal = option.defaultValue - } - - let condition = true - - if (option.init) { - // Only use the toString initializer if value is a number - if (option.init === toString) { - condition = propVal.constructor === Number - } - - if (condition) { - // Pass it through the initializer - propVal = option.init(propVal) - } - } - - // Camelcase option name (skip short flag) - if (name.length > 1) { - name = camelcase(name) - } - - // Add option to list - contents[name] = propVal - } - - return contents - }, - - getOptions(definedSubcommand) { - const options = {} - const args = {} - - // Copy over the arguments - Object.assign(args, this.raw) - delete args._ - - // Set option defaults - for (const option of this.details.options) { - if (typeof option.defaultValue === 'undefined') { - continue - } - - Object.assign(options, this.readOption(option)) - } - - // Override defaults if used in command line - for (const option in args) { - if (!{}.hasOwnProperty.call(args, option)) { - continue - } - - const related = this.isDefined(option, 'options') - - if (related) { - const details = this.readOption(related) - Object.assign(options, details) - } - - if (!related && !definedSubcommand) { - // Unknown Option - const availableOptions = [] - this.details.options.forEach(opt => { - availableOptions.push(...opt.usage) - }) - - const suggestOption = similarityBestMatch(option, availableOptions) - - process.stdout.write(`The option "${option}" is unknown.`) - - if (suggestOption.bestMatch.rating >= 0.5) { - process.stdout.write(' Did you mean the following one?\n') - - const suggestion = this.details.options.filter(item => { - for (const flag of item.usage) { - if (flag === suggestOption.bestMatch.target) { - return true - } - } - - return false - }) - - process.stdout.write( - this.generateDetails(suggestion)[0].trim() + '\n' - ) - - // eslint-disable-next-line unicorn/no-process-exit - process.exit() - } else { - process.stdout.write(` Here's a list of all available options: \n`) - this.showHelp() - } - } - } - - return options - }, - - generateExamples() { - const { examples } = this.details - const parts = [] - - for (const item in examples) { - if (!{}.hasOwnProperty.call(examples, item)) { - continue - } - - const usage = this.printSubColor('$ ' + examples[item].usage) - const description = this.printMainColor('- ' + examples[item].description) - parts.push(` ${description}\n ${usage}\n`) - } - - return parts - }, - - generateDetails(kind) { - // Get all properties of kind from global scope - const items = [] - - // Clone passed objects so changing them here doesn't affect real data. - const passed = [].concat( - typeof kind === 'string' ? this.details[kind] : kind - ) - for (let i = 0, l = passed.length; i < l; i++) { - items.push(Object.assign({}, passed[i])) - } - - const parts = [] - const isCmd = kind === 'commands' - - // Sort items alphabetically - items.sort((a, b) => { - const first = isCmd ? a.usage : a.usage[1] - const second = isCmd ? b.usage : b.usage[1] - - switch (true) { - case first < second: - return -1 - case first > second: - return 1 - default: - return 0 - } - }) - - for (const item in items) { - if (!{}.hasOwnProperty.call(items, item)) { - continue - } - - let { usage } = items[item] - let initial = items[item].defaultValue - - // If usage is an array, show its contents - if (usage.constructor === Array) { - if (isCmd) { - usage = usage.join(', ') - } else { - const isVersion = usage.indexOf('v') - usage = `-${usage[0]}, --${usage[1]}` - - if (!initial) { - initial = items[item].init - } - - usage += - initial && isVersion === -1 ? ' ' + this.handleType(initial)[0] : '' - } - } - - // Overwrite usage with readable syntax - items[item].usage = usage - } - - // Find length of longest option or command - // Before doing that, make a copy of the original array - const longest = items.slice().sort((a, b) => { - return b.usage.length - a.usage.length - })[0].usage.length - - for (const item of items) { - let { usage, description, defaultValue } = item - const difference = longest - usage.length - - // Compensate the difference to longest property with spaces - usage += ' '.repeat(difference) - - // Add some space around it as well - if (typeof defaultValue !== 'undefined') { - if (typeof defaultValue === 'boolean') { - description += ` (${ - defaultValue ? 'enabled' : 'disabled' - } by default)` - } else { - description += ` (defaults to ${JSON.stringify(defaultValue)})` - } - } - - parts.push( - ' ' + - this.printMainColor(usage) + - ' ' + - this.printSubColor(description) - ) - } - - return parts - }, - - runCommand(details, options) { - // If help is disabled, remove initializer - if (details.usage === 'help' && !this.config.help) { - details.init = false - } - - // If version is disabled, remove initializer - if (details.usage === 'version' && !this.config.version) { - details.init = false - } - - // If command has initializer, call it - if (details.init) { - const sub = [].concat(this.sub) - sub.shift() - - return details.init.bind(this)(details.usage, sub, options) - } - - // Generate full name of binary - const subCommand = Array.isArray(details.usage) - ? details.usage[0] - : details.usage - let full = this.binary + '-' + subCommand - - // Remove node and original command. - const args = process.argv.slice(2) - - // Remove the first occurance of subCommand from the args. - for (let i = 0, l = args.length; i < l; i++) { - if (args[i] === subCommand) { - args.splice(i, 1) - break - } - } - - if (process.platform === 'win32') { - const binaryExt = path.extname(this.binary) - const mainModule = process.env.APPVEYOR - ? '_fixture' - : process.mainModule.filename - - full = `${mainModule}-${subCommand}` - - if (path.extname(this.binary)) { - full = `${mainModule.replace(binaryExt, '')}-${subCommand}${binaryExt}` - } - - // Run binary of sub command on windows - args.unshift(full) - this.child = spawn(process.execPath, args, { - stdio: 'inherit' - }) - } else { - // Run binary of sub command - this.child = spawn(full, args, { - stdio: 'inherit' - }) - } - - // Throw an error if something fails within that binary - this.child.on('error', err => { - throw err - }) - - this.child.on('exit', (code, signal) => { - process.on('exit', () => { - this.child = null - if (signal) { - process.kill(process.pid, signal) - } else { - process.exit(code) - } - }) - }) - - // Proxy SIGINT to child process - process.on('SIGINT', () => { - if (this.child) { - this.child.kill('SIGINT') - this.child.kill('SIGTERM') // If that didn't work, we're probably in an infinite loop, so make it die - } - }) - }, - - checkHelp() { - // Register default option and command. - this.option('help', 'Output usage information') - this.command('help', 'Display help', this.showHelp) - - // Immediately output if option was provided. - if (this.optionWasProvided('help')) { - this.showHelp() - } - }, - - checkVersion() { - // Register default option and command. - this.option('version', 'Output the version number') - this.command('version', 'Display version', this.showVersion) - - // Immediately output if option was provided. - if (this.optionWasProvided('version')) { - this.showVersion() - } - }, - - isDefined(name, list) { - // Get all items of kind - const children = this.details[list] - - // Check if a child matches the requested name - for (const child of children) { - const { usage } = child - const type = usage.constructor - - if (type === Array && usage.indexOf(name) > -1) { - return child - } - - if (type === String && usage === name) { - return child - } - } - - // If nothing matches, item is not defined - return false - }, - - optionWasProvided(name) { - const option = this.isDefined(name, 'options') - return option && (this.raw[option.usage[0]] || this.raw[option.usage[1]]) - } -} diff --git a/node_modules/args/lib/version.js b/node_modules/args/lib/version.js deleted file mode 100644 index 75c7fe15..00000000 --- a/node_modules/args/lib/version.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict' - -const fs = require('fs') -const path = require('path') - -/** - * Retrieves the main module package.json information. - * - * @param {string} directory - * The directory to start looking in. - * - * @return {Object|null} - * An object containing the package.json contents or NULL if it could not be found. - */ -function findPackage(directory) { - const file = path.resolve(directory, 'package.json') - if (fs.existsSync(file) && fs.statSync(file).isFile()) { - return require(file) - } - - const parent = path.resolve(directory, '..') - return parent === directory ? null : findPackage(parent) -} - -module.exports = function() { - const pkg = findPackage(path.dirname(process.mainModule.filename)) - const version = (pkg && pkg.version) || '-/-' - - console.log(version) - - if (this.config.exit && this.config.exit.version) { - // eslint-disable-next-line unicorn/no-process-exit - process.exit() - } -} diff --git a/node_modules/args/license.md b/node_modules/args/license.md deleted file mode 100644 index 0d264542..00000000 --- a/node_modules/args/license.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Leonard Lamprecht - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/args/node_modules/chalk/index.js b/node_modules/args/node_modules/chalk/index.js deleted file mode 100644 index 1cc5fa89..00000000 --- a/node_modules/args/node_modules/chalk/index.js +++ /dev/null @@ -1,228 +0,0 @@ -'use strict'; -const escapeStringRegexp = require('escape-string-regexp'); -const ansiStyles = require('ansi-styles'); -const stdoutColor = require('supports-color').stdout; - -const template = require('./templates.js'); - -const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); - -// `supportsColor.level` → `ansiStyles.color[name]` mapping -const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; - -// `color-convert` models to exclude from the Chalk API due to conflicts and such -const skipModels = new Set(['gray']); - -const styles = Object.create(null); - -function applyOptions(obj, options) { - options = options || {}; - - // Detect level if not set manually - const scLevel = stdoutColor ? stdoutColor.level : 0; - obj.level = options.level === undefined ? scLevel : options.level; - obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; -} - -function Chalk(options) { - // We check for this.template here since calling `chalk.constructor()` - // by itself will have a `this` of a previously constructed chalk object - if (!this || !(this instanceof Chalk) || this.template) { - const chalk = {}; - applyOptions(chalk, options); - - chalk.template = function () { - const args = [].slice.call(arguments); - return chalkTag.apply(null, [chalk.template].concat(args)); - }; - - Object.setPrototypeOf(chalk, Chalk.prototype); - Object.setPrototypeOf(chalk.template, chalk); - - chalk.template.constructor = Chalk; - - return chalk.template; - } - - applyOptions(this, options); -} - -// Use bright blue on Windows as the normal blue color is illegible -if (isSimpleWindowsTerm) { - ansiStyles.blue.open = '\u001B[94m'; -} - -for (const key of Object.keys(ansiStyles)) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - - styles[key] = { - get() { - const codes = ansiStyles[key]; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); - } - }; -} - -styles.visible = { - get() { - return build.call(this, this._styles || [], true, 'visible'); - } -}; - -ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); -for (const model of Object.keys(ansiStyles.color.ansi)) { - if (skipModels.has(model)) { - continue; - } - - styles[model] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.color.close, - closeRe: ansiStyles.color.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} - -ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); -for (const model of Object.keys(ansiStyles.bgColor.ansi)) { - if (skipModels.has(model)) { - continue; - } - - const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.bgColor.close, - closeRe: ansiStyles.bgColor.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} - -const proto = Object.defineProperties(() => {}, styles); - -function build(_styles, _empty, key) { - const builder = function () { - return applyStyle.apply(builder, arguments); - }; - - builder._styles = _styles; - builder._empty = _empty; - - const self = this; - - Object.defineProperty(builder, 'level', { - enumerable: true, - get() { - return self.level; - }, - set(level) { - self.level = level; - } - }); - - Object.defineProperty(builder, 'enabled', { - enumerable: true, - get() { - return self.enabled; - }, - set(enabled) { - self.enabled = enabled; - } - }); - - // See below for fix regarding invisible grey/dim combination on Windows - builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; - - // `__proto__` is used because we must return a function, but there is - // no way to create a function with a different prototype - builder.__proto__ = proto; // eslint-disable-line no-proto - - return builder; -} - -function applyStyle() { - // Support varags, but simply cast to string in case there's only one arg - const args = arguments; - const argsLen = args.length; - let str = String(arguments[0]); - - if (argsLen === 0) { - return ''; - } - - if (argsLen > 1) { - // Don't slice `arguments`, it prevents V8 optimizations - for (let a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } - - if (!this.enabled || this.level <= 0 || !str) { - return this._empty ? '' : str; - } - - // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, - // see https://github.com/chalk/chalk/issues/58 - // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. - const originalDim = ansiStyles.dim.open; - if (isSimpleWindowsTerm && this.hasGrey) { - ansiStyles.dim.open = ''; - } - - for (const code of this._styles.slice().reverse()) { - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - str = code.open + str.replace(code.closeRe, code.open) + code.close; - - // Close the styling before a linebreak and reopen - // after next line to fix a bleed issue on macOS - // https://github.com/chalk/chalk/pull/92 - str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); - } - - // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue - ansiStyles.dim.open = originalDim; - - return str; -} - -function chalkTag(chalk, strings) { - if (!Array.isArray(strings)) { - // If chalk() was called by itself or with a string, - // return the string itself as a string. - return [].slice.call(arguments, 1).join(' '); - } - - const args = [].slice.call(arguments, 2); - const parts = [strings.raw[0]]; - - for (let i = 1; i < strings.length; i++) { - parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); - parts.push(String(strings.raw[i])); - } - - return template(chalk, parts.join('')); -} - -Object.defineProperties(Chalk.prototype, styles); - -module.exports = Chalk(); // eslint-disable-line new-cap -module.exports.supportsColor = stdoutColor; -module.exports.default = module.exports; // For TypeScript diff --git a/node_modules/args/node_modules/chalk/index.js.flow b/node_modules/args/node_modules/chalk/index.js.flow deleted file mode 100644 index 622caaa2..00000000 --- a/node_modules/args/node_modules/chalk/index.js.flow +++ /dev/null @@ -1,93 +0,0 @@ -// @flow strict - -type TemplateStringsArray = $ReadOnlyArray<string>; - -export type Level = $Values<{ - None: 0, - Basic: 1, - Ansi256: 2, - TrueColor: 3 -}>; - -export type ChalkOptions = {| - enabled?: boolean, - level?: Level -|}; - -export type ColorSupport = {| - level: Level, - hasBasic: boolean, - has256: boolean, - has16m: boolean -|}; - -export interface Chalk { - (...text: string[]): string, - (text: TemplateStringsArray, ...placeholders: string[]): string, - constructor(options?: ChalkOptions): Chalk, - enabled: boolean, - level: Level, - rgb(r: number, g: number, b: number): Chalk, - hsl(h: number, s: number, l: number): Chalk, - hsv(h: number, s: number, v: number): Chalk, - hwb(h: number, w: number, b: number): Chalk, - bgHex(color: string): Chalk, - bgKeyword(color: string): Chalk, - bgRgb(r: number, g: number, b: number): Chalk, - bgHsl(h: number, s: number, l: number): Chalk, - bgHsv(h: number, s: number, v: number): Chalk, - bgHwb(h: number, w: number, b: number): Chalk, - hex(color: string): Chalk, - keyword(color: string): Chalk, - - +reset: Chalk, - +bold: Chalk, - +dim: Chalk, - +italic: Chalk, - +underline: Chalk, - +inverse: Chalk, - +hidden: Chalk, - +strikethrough: Chalk, - - +visible: Chalk, - - +black: Chalk, - +red: Chalk, - +green: Chalk, - +yellow: Chalk, - +blue: Chalk, - +magenta: Chalk, - +cyan: Chalk, - +white: Chalk, - +gray: Chalk, - +grey: Chalk, - +blackBright: Chalk, - +redBright: Chalk, - +greenBright: Chalk, - +yellowBright: Chalk, - +blueBright: Chalk, - +magentaBright: Chalk, - +cyanBright: Chalk, - +whiteBright: Chalk, - - +bgBlack: Chalk, - +bgRed: Chalk, - +bgGreen: Chalk, - +bgYellow: Chalk, - +bgBlue: Chalk, - +bgMagenta: Chalk, - +bgCyan: Chalk, - +bgWhite: Chalk, - +bgBlackBright: Chalk, - +bgRedBright: Chalk, - +bgGreenBright: Chalk, - +bgYellowBright: Chalk, - +bgBlueBright: Chalk, - +bgMagentaBright: Chalk, - +bgCyanBright: Chalk, - +bgWhiteBrigh: Chalk, - - supportsColor: ColorSupport -}; - -declare module.exports: Chalk; diff --git a/node_modules/args/node_modules/chalk/license b/node_modules/args/node_modules/chalk/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/args/node_modules/chalk/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/args/node_modules/chalk/package.json b/node_modules/args/node_modules/chalk/package.json deleted file mode 100644 index a3fa3bdf..00000000 --- a/node_modules/args/node_modules/chalk/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "_from": "chalk@2.4.2", - "_id": "chalk@2.4.2", - "_inBundle": false, - "_integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "_location": "/args/chalk", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "chalk@2.4.2", - "name": "chalk", - "escapedName": "chalk", - "rawSpec": "2.4.2", - "saveSpec": null, - "fetchSpec": "2.4.2" - }, - "_requiredBy": [ - "/args" - ], - "_resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "_shasum": "cd42541677a54333cf541a49108c1432b44c9424", - "_spec": "chalk@2.4.2", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/args", - "bugs": { - "url": "https://github.com/chalk/chalk/issues" - }, - "bundleDependencies": false, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "deprecated": false, - "description": "Terminal string styling done right", - "devDependencies": { - "ava": "*", - "coveralls": "^3.0.0", - "execa": "^0.9.0", - "flow-bin": "^0.68.0", - "import-fresh": "^2.0.0", - "matcha": "^0.7.0", - "nyc": "^11.0.2", - "resolve-from": "^4.0.0", - "typescript": "^2.5.3", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js", - "templates.js", - "types/index.d.ts", - "index.js.flow" - ], - "homepage": "https://github.com/chalk/chalk#readme", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "str", - "ansi", - "style", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "chalk", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/chalk.git" - }, - "scripts": { - "bench": "matcha benchmark.js", - "coveralls": "nyc report --reporter=text-lcov | coveralls", - "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava" - }, - "types": "types/index.d.ts", - "version": "2.4.2", - "xo": { - "envs": [ - "node", - "mocha" - ], - "ignores": [ - "test/_flow.js" - ] - } -} diff --git a/node_modules/args/node_modules/chalk/readme.md b/node_modules/args/node_modules/chalk/readme.md deleted file mode 100644 index d298e2c4..00000000 --- a/node_modules/args/node_modules/chalk/readme.md +++ /dev/null @@ -1,314 +0,0 @@ -<h1 align="center"> - <br> - <br> - <img width="320" src="media/logo.svg" alt="Chalk"> - <br> - <br> - <br> -</h1> - -> Terminal string styling done right - -[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) [![Mentioned in Awesome Node.js](https://awesome.re/mentioned-badge.svg)](https://github.com/sindresorhus/awesome-nodejs) - -### [See what's new in Chalk 2](https://github.com/chalk/chalk/releases/tag/v2.0.0) - -<img src="https://cdn.rawgit.com/chalk/ansi-styles/8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" alt="" width="900"> - - -## Highlights - -- Expressive API -- Highly performant -- Ability to nest styles -- [256/Truecolor color support](#256-and-truecolor-color-support) -- Auto-detects color support -- Doesn't extend `String.prototype` -- Clean and focused -- Actively maintained -- [Used by ~23,000 packages](https://www.npmjs.com/browse/depended/chalk) as of December 31, 2017 - - -## Install - -```console -$ npm install chalk -``` - -<a href="https://www.patreon.com/sindresorhus"> - <img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160"> -</a> - - -## Usage - -```js -const chalk = require('chalk'); - -console.log(chalk.blue('Hello world!')); -``` - -Chalk comes with an easy to use composable API where you just chain and nest the styles you want. - -```js -const chalk = require('chalk'); -const log = console.log; - -// Combine styled and normal strings -log(chalk.blue('Hello') + ' World' + chalk.red('!')); - -// Compose multiple styles using the chainable API -log(chalk.blue.bgRed.bold('Hello world!')); - -// Pass in multiple arguments -log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz')); - -// Nest styles -log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!')); - -// Nest styles of the same type even (color, underline, background) -log(chalk.green( - 'I am a green line ' + - chalk.blue.underline.bold('with a blue substring') + - ' that becomes green again!' -)); - -// ES2015 template literal -log(` -CPU: ${chalk.red('90%')} -RAM: ${chalk.green('40%')} -DISK: ${chalk.yellow('70%')} -`); - -// ES2015 tagged template literal -log(chalk` -CPU: {red ${cpu.totalPercent}%} -RAM: {green ${ram.used / ram.total * 100}%} -DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%} -`); - -// Use RGB colors in terminal emulators that support it. -log(chalk.keyword('orange')('Yay for orange colored text!')); -log(chalk.rgb(123, 45, 67).underline('Underlined reddish color')); -log(chalk.hex('#DEADED').bold('Bold gray!')); -``` - -Easily define your own themes: - -```js -const chalk = require('chalk'); - -const error = chalk.bold.red; -const warning = chalk.keyword('orange'); - -console.log(error('Error!')); -console.log(warning('Warning!')); -``` - -Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args): - -```js -const name = 'Sindre'; -console.log(chalk.green('Hello %s'), name); -//=> 'Hello Sindre' -``` - - -## API - -### chalk.`<style>[.<style>...](string, [string...])` - -Example: `chalk.red.bold.underline('Hello', 'world');` - -Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`. - -Multiple arguments will be separated by space. - -### chalk.enabled - -Color support is automatically detected, as is the level (see `chalk.level`). However, if you'd like to simply enable/disable Chalk, you can do so via the `.enabled` property. - -Chalk is enabled by default unless explicitly disabled via the constructor or `chalk.level` is `0`. - -If you need to change this in a reusable module, create a new instance: - -```js -const ctx = new chalk.constructor({enabled: false}); -``` - -### chalk.level - -Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers. - -If you need to change this in a reusable module, create a new instance: - -```js -const ctx = new chalk.constructor({level: 0}); -``` - -Levels are as follows: - -0. All colors disabled -1. Basic color support (16 colors) -2. 256 color support -3. Truecolor support (16 million colors) - -### chalk.supportsColor - -Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience. - -Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. - -Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. - - -## Styles - -### Modifiers - -- `reset` -- `bold` -- `dim` -- `italic` *(Not widely supported)* -- `underline` -- `inverse` -- `hidden` -- `strikethrough` *(Not widely supported)* -- `visible` (Text is emitted only if enabled) - -### Colors - -- `black` -- `red` -- `green` -- `yellow` -- `blue` *(On Windows the bright version is used since normal blue is illegible)* -- `magenta` -- `cyan` -- `white` -- `gray` ("bright black") -- `redBright` -- `greenBright` -- `yellowBright` -- `blueBright` -- `magentaBright` -- `cyanBright` -- `whiteBright` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` -- `bgBlackBright` -- `bgRedBright` -- `bgGreenBright` -- `bgYellowBright` -- `bgBlueBright` -- `bgMagentaBright` -- `bgCyanBright` -- `bgWhiteBright` - - -## Tagged template literal - -Chalk can be used as a [tagged template literal](http://exploringjs.com/es6/ch_template-literals.html#_tagged-template-literals). - -```js -const chalk = require('chalk'); - -const miles = 18; -const calculateFeet = miles => miles * 5280; - -console.log(chalk` - There are {bold 5280 feet} in a mile. - In {bold ${miles} miles}, there are {green.bold ${calculateFeet(miles)} feet}. -`); -``` - -Blocks are delimited by an opening curly brace (`{`), a style, some content, and a closing curly brace (`}`). - -Template styles are chained exactly like normal Chalk styles. The following two statements are equivalent: - -```js -console.log(chalk.bold.rgb(10, 100, 200)('Hello!')); -console.log(chalk`{bold.rgb(10,100,200) Hello!}`); -``` - -Note that function styles (`rgb()`, `hsl()`, `keyword()`, etc.) may not contain spaces between parameters. - -All interpolated values (`` chalk`${foo}` ``) are converted to strings via the `.toString()` method. All curly braces (`{` and `}`) in interpolated value strings are escaped. - - -## 256 and Truecolor color support - -Chalk supports 256 colors and [Truecolor](https://gist.github.com/XVilka/8346728) (16 million colors) on supported terminal apps. - -Colors are downsampled from 16 million RGB values to an ANSI color format that is supported by the terminal emulator (or by specifying `{level: n}` as a Chalk option). For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red). - -Examples: - -- `chalk.hex('#DEADED').underline('Hello, world!')` -- `chalk.keyword('orange')('Some orange text')` -- `chalk.rgb(15, 100, 204).inverse('Hello!')` - -Background versions of these models are prefixed with `bg` and the first level of the module capitalized (e.g. `keyword` for foreground colors and `bgKeyword` for background colors). - -- `chalk.bgHex('#DEADED').underline('Hello, world!')` -- `chalk.bgKeyword('orange')('Some orange text')` -- `chalk.bgRgb(15, 100, 204).inverse('Hello!')` - -The following color models can be used: - -- [`rgb`](https://en.wikipedia.org/wiki/RGB_color_model) - Example: `chalk.rgb(255, 136, 0).bold('Orange!')` -- [`hex`](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) - Example: `chalk.hex('#FF8800').bold('Orange!')` -- [`keyword`](https://www.w3.org/wiki/CSS/Properties/color/keywords) (CSS keywords) - Example: `chalk.keyword('orange').bold('Orange!')` -- [`hsl`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 100, 50).bold('Orange!')` -- [`hsv`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsv(32, 100, 100).bold('Orange!')` -- [`hwb`](https://en.wikipedia.org/wiki/HWB_color_model) - Example: `chalk.hwb(32, 0, 50).bold('Orange!')` -- `ansi16` -- `ansi256` - - -## Windows - -If you're on Windows, do yourself a favor and use [`cmder`](http://cmder.net/) instead of `cmd.exe`. - - -## Origin story - -[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative. - - -## Related - -- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module -- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal -- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color -- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes -- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Strip ANSI escape codes from a stream -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes -- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes -- [color-convert](https://github.com/qix-/color-convert) - Converts colors between different models -- [chalk-animation](https://github.com/bokub/chalk-animation) - Animate strings in the terminal -- [gradient-string](https://github.com/bokub/gradient-string) - Apply color gradients to strings -- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings -- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/args/node_modules/chalk/templates.js b/node_modules/args/node_modules/chalk/templates.js deleted file mode 100644 index dbdf9b22..00000000 --- a/node_modules/args/node_modules/chalk/templates.js +++ /dev/null @@ -1,128 +0,0 @@ -'use strict'; -const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; -const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; -const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; -const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; - -const ESCAPES = new Map([ - ['n', '\n'], - ['r', '\r'], - ['t', '\t'], - ['b', '\b'], - ['f', '\f'], - ['v', '\v'], - ['0', '\0'], - ['\\', '\\'], - ['e', '\u001B'], - ['a', '\u0007'] -]); - -function unescape(c) { - if ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) { - return String.fromCharCode(parseInt(c.slice(1), 16)); - } - - return ESCAPES.get(c) || c; -} - -function parseArguments(name, args) { - const results = []; - const chunks = args.trim().split(/\s*,\s*/g); - let matches; - - for (const chunk of chunks) { - if (!isNaN(chunk)) { - results.push(Number(chunk)); - } else if ((matches = chunk.match(STRING_REGEX))) { - results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr)); - } else { - throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); - } - } - - return results; -} - -function parseStyle(style) { - STYLE_REGEX.lastIndex = 0; - - const results = []; - let matches; - - while ((matches = STYLE_REGEX.exec(style)) !== null) { - const name = matches[1]; - - if (matches[2]) { - const args = parseArguments(name, matches[2]); - results.push([name].concat(args)); - } else { - results.push([name]); - } - } - - return results; -} - -function buildStyle(chalk, styles) { - const enabled = {}; - - for (const layer of styles) { - for (const style of layer.styles) { - enabled[style[0]] = layer.inverse ? null : style.slice(1); - } - } - - let current = chalk; - for (const styleName of Object.keys(enabled)) { - if (Array.isArray(enabled[styleName])) { - if (!(styleName in current)) { - throw new Error(`Unknown Chalk style: ${styleName}`); - } - - if (enabled[styleName].length > 0) { - current = current[styleName].apply(current, enabled[styleName]); - } else { - current = current[styleName]; - } - } - } - - return current; -} - -module.exports = (chalk, tmp) => { - const styles = []; - const chunks = []; - let chunk = []; - - // eslint-disable-next-line max-params - tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => { - if (escapeChar) { - chunk.push(unescape(escapeChar)); - } else if (style) { - const str = chunk.join(''); - chunk = []; - chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); - styles.push({inverse, styles: parseStyle(style)}); - } else if (close) { - if (styles.length === 0) { - throw new Error('Found extraneous } in Chalk template literal'); - } - - chunks.push(buildStyle(chalk, styles)(chunk.join(''))); - chunk = []; - styles.pop(); - } else { - chunk.push(chr); - } - }); - - chunks.push(chunk.join('')); - - if (styles.length > 0) { - const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; - throw new Error(errMsg); - } - - return chunks.join(''); -}; diff --git a/node_modules/args/node_modules/chalk/types/index.d.ts b/node_modules/args/node_modules/chalk/types/index.d.ts deleted file mode 100644 index b4e4dc57..00000000 --- a/node_modules/args/node_modules/chalk/types/index.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -// Type definitions for Chalk -// Definitions by: Thomas Sauer <https://github.com/t-sauer> - -export const enum Level { - None = 0, - Basic = 1, - Ansi256 = 2, - TrueColor = 3 -} - -export interface ChalkOptions { - enabled?: boolean; - level?: Level; -} - -export interface ChalkConstructor { - new (options?: ChalkOptions): Chalk; - (options?: ChalkOptions): Chalk; -} - -export interface ColorSupport { - level: Level; - hasBasic: boolean; - has256: boolean; - has16m: boolean; -} - -export interface Chalk { - (...text: string[]): string; - (text: TemplateStringsArray, ...placeholders: string[]): string; - constructor: ChalkConstructor; - enabled: boolean; - level: Level; - rgb(r: number, g: number, b: number): this; - hsl(h: number, s: number, l: number): this; - hsv(h: number, s: number, v: number): this; - hwb(h: number, w: number, b: number): this; - bgHex(color: string): this; - bgKeyword(color: string): this; - bgRgb(r: number, g: number, b: number): this; - bgHsl(h: number, s: number, l: number): this; - bgHsv(h: number, s: number, v: number): this; - bgHwb(h: number, w: number, b: number): this; - hex(color: string): this; - keyword(color: string): this; - - readonly reset: this; - readonly bold: this; - readonly dim: this; - readonly italic: this; - readonly underline: this; - readonly inverse: this; - readonly hidden: this; - readonly strikethrough: this; - - readonly visible: this; - - readonly black: this; - readonly red: this; - readonly green: this; - readonly yellow: this; - readonly blue: this; - readonly magenta: this; - readonly cyan: this; - readonly white: this; - readonly gray: this; - readonly grey: this; - readonly blackBright: this; - readonly redBright: this; - readonly greenBright: this; - readonly yellowBright: this; - readonly blueBright: this; - readonly magentaBright: this; - readonly cyanBright: this; - readonly whiteBright: this; - - readonly bgBlack: this; - readonly bgRed: this; - readonly bgGreen: this; - readonly bgYellow: this; - readonly bgBlue: this; - readonly bgMagenta: this; - readonly bgCyan: this; - readonly bgWhite: this; - readonly bgBlackBright: this; - readonly bgRedBright: this; - readonly bgGreenBright: this; - readonly bgYellowBright: this; - readonly bgBlueBright: this; - readonly bgMagentaBright: this; - readonly bgCyanBright: this; - readonly bgWhiteBright: this; -} - -declare const chalk: Chalk & { supportsColor: ColorSupport }; - -export default chalk diff --git a/node_modules/args/package.json b/node_modules/args/package.json deleted file mode 100644 index 557587c3..00000000 --- a/node_modules/args/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "_from": "args@^5.0.1", - "_id": "args@5.0.1", - "_inBundle": false, - "_integrity": "sha512-1kqmFCFsPffavQFGt8OxJdIcETti99kySRUPMpOhaGjL6mRJn8HFU1OxKY5bMqfZKUwTQc1mZkAjmGYaVOHFtQ==", - "_location": "/args", - "_phantomChildren": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.5.0" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "args@^5.0.1", - "name": "args", - "escapedName": "args", - "rawSpec": "^5.0.1", - "saveSpec": null, - "fetchSpec": "^5.0.1" - }, - "_requiredBy": [ - "/pino-pretty" - ], - "_resolved": "https://registry.npmjs.org/args/-/args-5.0.1.tgz", - "_shasum": "4bf298df90a4799a09521362c579278cc2fdd761", - "_spec": "args@^5.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pino-pretty", - "author": { - "name": "leo" - }, - "bugs": { - "url": "https://github.com/leo/args/issues" - }, - "bundleDependencies": false, - "dependencies": { - "camelcase": "5.0.0", - "chalk": "2.4.2", - "leven": "2.1.0", - "mri": "1.1.4" - }, - "deprecated": false, - "description": "Minimal toolkit for building CLIs", - "devDependencies": { - "ava": "1.2.1", - "eslint-config-prettier": "4.1.0", - "execa": "1.0.0", - "husky": "1.3.1", - "lint-staged": "8.1.5", - "prettier": "1.16.4", - "xo": "0.24.0" - }, - "engines": { - "node": ">= 6.0.0" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/leo/args#readme", - "keywords": [ - "cli", - "command", - "arguments", - "util", - "bin", - "commander", - "nanomist" - ], - "license": "MIT", - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write --no-semi", - "git add" - ] - }, - "main": "lib/index.js", - "name": "args", - "repository": { - "type": "git", - "url": "git+https://github.com/leo/args.git" - }, - "scripts": { - "lint": "xo", - "precommit": "lint-staged", - "test": "npm run lint && ava" - }, - "version": "5.0.1", - "xo": { - "extends": "prettier" - } -} diff --git a/node_modules/args/readme.md b/node_modules/args/readme.md deleted file mode 100644 index 59ca4e44..00000000 --- a/node_modules/args/readme.md +++ /dev/null @@ -1,207 +0,0 @@ -# args - -[![Build Status](https://travis-ci.org/leo/args.svg?branch=master)](https://travis-ci.org/leo/args) -[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo) - -This package makes creating command line interfaces a breeze. - -## Features - -- Git-style sub commands (e.g. `pizza cheese` executes the "pizza-cheese" binary) -- Auto-generated usage information -- Determines type of option by checking type of default value (e.g. `['hi']` => `<list>`) -- Clean [syntax](#usage) for defining options and commands -- Easily [retrieve](#usage) values of options -- Automatically suggests a similar option, if the user entered an unknown one - -## Usage - -Install the package (you'll need at least version 6.0.0 of [Node](https://nodejs.org/en/)): - -```bash -npm install --save args -``` - -Once you're done, you can start using it within your binaries: - -```js -#!/usr/bin/env node - -import args from 'args' - -args - .option('port', 'The port on which the app will be running', 3000) - .option('reload', 'Enable/disable livereloading') - .command('serve', 'Serve your static site', ['s']) - -const flags = args.parse(process.argv) -``` - -The upper code defines two options called "port" and "reload" for the current binary, as well as a new sub command named "serve". So if you want to check for the value of the "port" option, just do this: - -```js -// This also works with "flags.p", because the short name of the "port" option is "p" - -if (flags.port) { - console.log(`I'll be running on port ${flags.port}`) -} -``` - -In turn, this is how the auto-generated usage information will look like: - -``` - - Usage: haha [options] [command] - - - Commands: - - serve, s Serve your static site - help Display help - - Options: - - -v, --version Output the version number - -r, --reload Enable/disable livereloading - -h, --help Output usage information - -p, --port The port on which the app will be running - -``` - -## API - -### .option(name, description, default, init) - -Register a new option for the binary in which it's being called. - -- **name:** Takes a string which defines the name of the option. In this case, the first letter will be used as the short version (`port` => `-p, --port`). However, it can also be an array in which the first value defines the short version (`p` => `-p`) and the second one the long version (`packages` => `--packages`). -- **description:** A short explanation of what the option shall be used for. Will be outputted along with help. -- **default:** If it's defined, args will not only use it as a default value for the property, but it will also determine the type and append it to the usage info when the help gets outputted. For example: If the default param of an option named "package" contains an array, the usage information will look like this: `-p, --package <list>`. -- **init:** A function through which the option's value will be passed when used. The first paramater within said function will contain the option's value. If the parameter "default" is defined, args will provide a default initializer depending on the type of its value. For example: If "default" contains an integer, "init" will be `parseInt`. - -### .options(list) - -Takes in an array of objects that are each defining an option that shall be registered. This is basically a minimalistic way to register a huge list of options at once. Here's what each option object needs to look like: - -```js -{ - name: 'port', - description: 'The port on which the app runs', - init: content => content, - defaultValue: 3000 -} -``` - -However, the keys `init` and `defaultValue` are not strictly required. - -### .command(name, description, init, aliases) - -Register a new sub command. Args requires all binaries to be defined in the style of git's. That means each sub command should be a separate binary called "<parent-command>-<sub-command>". - -For example: If your main binary is called "muffin", the binary of the subcommand "muffin list" should be called "muffin-list". And all of them should be defined as such in your [package.json](https://docs.npmjs.com/files/package.json#bin). - -- **name:** Takes a string which defines the name of the command. This value will be used when outputting the help. -- **description:** A short explanation of what the command shall be used for. Will be outputted along with help. -- **init:** If a function was passed through at this parameter, args will call it instead of running the binary related to that command. The function receives three arguments: - - ```js - function aCommand (name, sub, options) { - name // The name of the command - sub // The output of .sub - options // An object containing the options that have been used - } - ``` - - Using an initializer is currently only recommended if your command doesn't need special/different options than the binary in which you're defining it. The reason for this is that the "options" argument of the upper function will contain the options registered within the current binary. - -- **aliases:** Takes in an array of aliases which can be used to run the command. - -### .example(usage, description) - -Register an example which will be shown when calling `help` - -- **usage:** Takes a string which defines your usage example command -- **description:** A short explanation of what the example shall be used for. Will be outputted along with help. - -### .examples(list) -Takes in an array of objects that are each defining an example that shall be registered. This is basically a minimalistic way to register a huge list of examples at once. Here's what each option object needs to look like: - -```js -{ - usage: 'args command -d', - description: 'Run the args command with the option -d' -} -``` - -### .parse(argv, options) - -This method takes the process' command line arguments (command and options) and uses the internal methods to get their values and assign them to the current instance of args. It needs to be run after all of the `.option` and `.command` calls. If you run it before them, the method calls after it won't take effect. - -The methods also returns all options that have been used and their respective values. - -- **argv:** Should be the process' argv: `process.argv`, for example. -- **options:** This parameter accepts an object containing several [configuration options](#configuration). - -### .sub - -This property exposes all sub arguments that have been parsed by [mri](https://npmjs.com/mri). This is useful when trying to get the value after the command, for example: - -```bash -pizza ./directory -``` - -The upper path can now be loaded by doing: - -```js -// Contains "./directory" -const path = args.sub[0] -``` - -This also works completely fine with sub commands: After you've registered a new command using `.command()`, you can easily check the following sub argument within its binary like mentioned above: - -```bash -pizza eat ./directory -``` - -### .showHelp() - -Outputs the usage information based on the options and comments you've registered so far and exits, if configured to do so. - -### .showVersion() - -Outputs the version and exits, if configured to do so. - -## Configuration - -By default, the module already registers some default options and commands (e.g. "version" and "help"). These things have been implemented to make creating CLIs easier for beginners. However, they can also be disabled by taking advantage of the following properties: - -| Property | Description | Default value | Type | -| -------- | ----------- | ------------------ | ---- | -| exit | Automatically exits when help or version is rendered | `{ help: true, version: true }` | Object | -| help | Automatically render the usage information when running `help`, `-h` or `--help` | true | Boolean | -| name | The name of your program to display in help | Name of script file | String | -| version | Outputs the version tag of your package.json | true | Boolean | -| usageFilter | Allows you to specify a filter through which the usage information will be passed before it gets outputted | null | Function | -| value | Suffix for the "Usage" section of the usage information ([example](https://github.com/leo/args/issues/13)) | null | String | -| mri | Additional parsing options to pass to mri, see [mri docs](https://github.com/lukeed/mri) for details | undefined | Object | -| mainColor | Specify the main color for the output when running the `help` command. See [chalk docs](https://github.com/chalk/chalk) for available colors / modifiers. You can specify multiple colors / modifiers with an array. For example: `{mainColor: ['red', 'bold', 'underline']}` | yellow | String[Array] | -| subColor | Specify the sub color for the output when running the `help` command. See [chalk docs](https://github.com/chalk/chalk) for available colors / modifiers. You can specify multiple colors / modifiers with an array. For example: `{subColor: ['dim', 'blue']}` | dim | String[Array] | - -You can pass the configuration object as the second paramater of [.parse()](#parseargv-options). - -## Contribute - -1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device -2. Link the package to the global module directory: `npm link` -3. Within the module you want to test your local development instance of args, just link it to the dependencies: `npm link args`. Instead of the default one from npm, node will now use your clone of args! - -As always, you can run the [AVA](https://github.com/sindresorhus/ava) and [ESLint](http://eslint.org) tests using: `npm test` - -## Special thanks - -... to [Dmitry Smolin](https://github.com/dimsmol) who donated the package name. If you're looking for the old content (before I've added my stuff) of the package, you can find it [here](https://github.com/dimsmol/args). - -## Authors - -- Leo Lamprecht ([@notquiteleo](https://twitter.com/notquiteleo)) -- Marvin Mieth ([@ntwcklng](https://twitter.com/ntwcklng)) diff --git a/node_modules/asciidoctor-opal-runtime/LICENSE b/node_modules/asciidoctor-opal-runtime/LICENSE deleted file mode 100644 index 5ea541e6..00000000 --- a/node_modules/asciidoctor-opal-runtime/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2019 Guillaume Grossetie - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/asciidoctor-opal-runtime/README.md b/node_modules/asciidoctor-opal-runtime/README.md deleted file mode 100644 index 19a45cae..00000000 --- a/node_modules/asciidoctor-opal-runtime/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Opal Runtime for Asciidoctor.js -:caution-caption: :fire: - - - -[caption=Status] -CAUTION: This library is an _highly optimized_ version of the Opal runtime that contains the *bare minimum to run Asciidoctor*. If you are looking for a general purpose Opal runtime, please use https://www.npmjs.com/package/opal-runtime. - -## Usage - -```javascript -var Opal = require('opal-runtime').Opal; -// Now let's have fun with Opal! -``` diff --git a/node_modules/asciidoctor-opal-runtime/package.json b/node_modules/asciidoctor-opal-runtime/package.json deleted file mode 100644 index 70b6eff0..00000000 --- a/node_modules/asciidoctor-opal-runtime/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "asciidoctor-opal-runtime@0.3.3", - "_id": "asciidoctor-opal-runtime@0.3.3", - "_inBundle": false, - "_integrity": "sha512-/CEVNiOia8E5BMO9FLooo+Kv18K4+4JBFRJp8vUy/N5dMRAg+fRNV4HA+o6aoSC79jVU/aT5XvUpxSxSsTS8FQ==", - "_location": "/asciidoctor-opal-runtime", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "asciidoctor-opal-runtime@0.3.3", - "name": "asciidoctor-opal-runtime", - "escapedName": "asciidoctor-opal-runtime", - "rawSpec": "0.3.3", - "saveSpec": null, - "fetchSpec": "0.3.3" - }, - "_requiredBy": [ - "/@asciidoctor/core" - ], - "_resolved": "https://registry.npmjs.org/asciidoctor-opal-runtime/-/asciidoctor-opal-runtime-0.3.3.tgz", - "_shasum": "2667635f858d3eb3fdfcf6795cf68138e2040174", - "_spec": "asciidoctor-opal-runtime@0.3.3", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@asciidoctor/core", - "author": { - "name": "Guillaume Grossetie" - }, - "bugs": { - "url": "https://github.com/mogztter/asciidoctor-opal-node-runtime/issues" - }, - "bundleDependencies": false, - "dependencies": { - "glob": "7.1.3", - "unxhr": "1.0.1" - }, - "deprecated": false, - "description": "Opal Runtime for Asciidoctor.js", - "devDependencies": { - "chai": "4.2.0", - "mocha": "^8.2.0", - "standard": "12.0.1" - }, - "directories": { - "lib": "src" - }, - "engines": { - "node": ">=8.11" - }, - "files": [ - "src" - ], - "homepage": "http://github.com/mogztter/asciidoctor-opal-node-runtime", - "keywords": [ - "javascript", - "opal", - "asciidoctor", - "runtime", - "ruby" - ], - "license": "MIT", - "main": "src/index.js", - "name": "asciidoctor-opal-runtime", - "repository": { - "type": "git", - "url": "git://github.com/mogztter/asciidoctor-opal-node-runtime.git" - }, - "scripts": { - "lint": "standard src/index.js spec npm", - "postpublish": "node npm/postpublish.js", - "prepublishOnly": "node npm/prepublish.js", - "test": "mocha spec/*.spec.js && mocha spec/load/load-compat.spec.js && mocha spec/load/load-error.spec.js" - }, - "version": "0.3.3" -} diff --git a/node_modules/asciidoctor-opal-runtime/src/index.js b/node_modules/asciidoctor-opal-runtime/src/index.js deleted file mode 100644 index 60a12b5e..00000000 --- a/node_modules/asciidoctor-opal-runtime/src/index.js +++ /dev/null @@ -1,29 +0,0 @@ -/* global globalThis, self */ -var globalObject -if (typeof globalThis !== 'undefined') { - globalObject = globalThis -} else if (typeof self !== 'undefined') { - globalObject = self -} else if (typeof window !== 'undefined') { - globalObject = window -} else if (typeof global !== 'undefined') { - globalObject = global -} else { - throw new Error('Unable to locate global object. Unsupported runtime.') -} -if (globalObject && globalObject.Opal) { - // Opal is already loaded! - var rubyEngineVersion = globalObject.Opal.$$['RUBY_ENGINE_VERSION'] - if (!rubyEngineVersion.startsWith('0.11')) { - // incompatible version! - throw new Error('Opal is already loaded and version ' + rubyEngineVersion + ' is not compatible with 0.11. Please upgrade Asciidoctor.js to the latest version.') - } -} else { - // load Opal - require('./opal.js') - require('./nodejs.js') - require('./pathname.js') - require('./stringio.js') -} - -module.exports.Opal = globalObject.Opal diff --git a/node_modules/asciidoctor-opal-runtime/src/nodejs.js b/node_modules/asciidoctor-opal-runtime/src/nodejs.js deleted file mode 100644 index 62a837f9..00000000 --- a/node_modules/asciidoctor-opal-runtime/src/nodejs.js +++ /dev/null @@ -1,1383 +0,0 @@ -/* Generated by Opal 0.11.99.dev */ -Opal.modules["nodejs/kernel"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module; - - Opal.add_stubs(['$warn', '$to_str']); - - Opal.exit = process.exit; - (function($base, $parent_nesting) { - var self = $module($base, 'Kernel'); - - var $nesting = [self].concat($parent_nesting), $Kernel_caller$1, $Kernel_node_require$2; - - - Opal.const_set($nesting[0], 'NODE_REQUIRE', require); - - Opal.def(self, '$caller', $Kernel_caller$1 = function $$caller($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - var stack; - try { - var err = Error("my error"); - throw err; - } catch(e) { - stack = e.stack; - } - return stack.$split("\n").slice(3); - ; - }, $Kernel_caller$1.$$arity = -1); - - Opal.def(self, '$node_require', $Kernel_node_require$2 = function $$node_require(path) { - var self = this; - - - self.$warn("[DEPRECATION] node_require is deprecated. Please use `require('module')` instead."); - return $$($nesting, 'NODE_REQUIRE')(path.$to_str()); - }, $Kernel_node_require$2.$$arity = 1); - })($nesting[0], $nesting); - return Opal.const_set($nesting[0], 'ARGV', process.argv.slice(2)); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["nodejs/file"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $gvars = Opal.gvars; - - Opal.add_stubs(['$raise', '$warn', '$const_get', '$new', '$const_defined?', '$const_set', '$include', '$size', '$respond_to?', '$path', '$join', '$call', '$exist?', '$realpath', '$!=', '$close', '$to_path', '$pwd', '$to_str', '$include?', '$delete', '$match?', '$sub', '$attr_reader', '$to_a', '$each_line', '$to_enum', '$read', '$chomp']); - - - var warnings = {}, errno_code, errno_codes = [ - 'EACCES', - 'EISDIR', - 'EMFILE', - 'ENOENT', - 'EPERM' - ]; - - function handle_unsupported_feature(message) { - switch (Opal.config.unsupported_features_severity) { - case 'error': - $$($nesting, 'Kernel').$raise($$($nesting, 'NotImplementedError'), message) - break; - case 'warning': - warn(message) - break; - default: // ignore - // noop - } - } - function warn(string) { - if (warnings[string]) { - return; - } - warnings[string] = true; - self.$warn(string); - } - function is_utf8(bytes) { - var i = 0; - while (i < bytes.length) { - if ((// ASCII - bytes[i] === 0x09 || - bytes[i] === 0x0A || - bytes[i] === 0x0D || - (0x20 <= bytes[i] && bytes[i] <= 0x7E) - ) - ) { - i += 1; - continue; - } - - if ((// non-overlong 2-byte - (0xC2 <= bytes[i] && bytes[i] <= 0xDF) && - (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) - ) - ) { - i += 2; - continue; - } - - if ((// excluding overlongs - bytes[i] === 0xE0 && - (0xA0 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) && - (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) - ) || - (// straight 3-byte - ((0xE1 <= bytes[i] && bytes[i] <= 0xEC) || - bytes[i] === 0xEE || - bytes[i] === 0xEF) && - (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) && - (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) - ) || - (// excluding surrogates - bytes[i] === 0xED && - (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0x9F) && - (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) - ) - ) { - i += 3; - continue; - } - - if ((// planes 1-3 - bytes[i] === 0xF0 && - (0x90 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) && - (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) && - (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF) - ) || - (// planes 4-15 - (0xF1 <= bytes[i] && bytes[i] <= 0xF3) && - (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) && - (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) && - (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF) - ) || - (// plane 16 - bytes[i] === 0xF4 && - (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0x8F) && - (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) && - (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF) - ) - ) { - i += 4; - continue; - } - - return false; - } - - return true; - } - function executeIOAction(action) { - try { - return action(); - } catch (error) { - if (errno_codes.indexOf(error.code) >= 0) { - var error_class = $$($nesting, 'Errno').$const_get(error.code) - throw (error_class).$new(error.message); - } - throw error; - } - } - - for(var i = 0, ii = errno_codes.length; i < ii; i++) { - errno_code = errno_codes[i]; - if (!$$($nesting, 'Errno')['$const_defined?'](errno_code)) { - $$($nesting, 'Errno').$const_set(errno_code, $$($nesting, 'Class').$new($$($nesting, 'SystemCallError'))) - } - } -; - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'File'); - - var $nesting = [self].concat($parent_nesting), $File_read$1, $File_write$2, $File_exist$ques$3, $File_realpath$4, $File_join$5, $File_directory$ques$6, $File_file$ques$7, $File_readable$ques$8, $File_size$9, $File_open$10, $File_stat$11, $File_mtime$12, $File_symlink$ques$13, $File_absolute_path$14, $File_initialize$15, $File_read$16, $File_readlines$17, $File_each_line$18, $File_write$19, $File_flush$20, $File_close$21, $File_mtime$22; - if (self.__fs__ == null) self.__fs__ = nil; - if (self.__path__ == null) self.__path__ = nil; - if (self.__util__ == null) self.__util__ = nil; - - self.$$prototype.eof = self.$$prototype.binary_flag = self.$$prototype.path = self.$$prototype.fd = nil; - - self.$include($$$($$$('::', 'IO'), 'Writable')); - self.$include($$$($$$('::', 'IO'), 'Readable')); - self.__fs__ = require('fs'); - self.__path__ = require('path'); - self.__util__ = require('util'); - var __fs__ = self.__fs__; - var __path__ = self.__path__; - var __util__ = self.__util__; - var __TextEncoder__ = typeof TextEncoder !== 'undefined' ? TextEncoder : __util__.TextEncoder; - var __TextDecoder__ = typeof TextDecoder !== 'undefined' ? TextDecoder : __util__.TextDecoder; - var __utf8TextDecoder__ = new __TextDecoder__('utf8'); - var __textEncoder__ = new __TextEncoder__(); - if ($truthy(__path__.sep !== $$($nesting, 'Separator'))) { - Opal.const_set($nesting[0], 'ALT_SEPARATOR', __path__.sep)}; - Opal.defs(self, '$read', $File_read$1 = function $$read(path) { - var self = this; - - return executeIOAction(function(){return __fs__.readFileSync(path).toString()}) - }, $File_read$1.$$arity = 1); - Opal.defs(self, '$write', $File_write$2 = function $$write(path, data) { - var self = this; - - - executeIOAction(function(){return __fs__.writeFileSync(path, data)}); - return data.$size(); - }, $File_write$2.$$arity = 2); - Opal.defs(self, '$exist?', $File_exist$ques$3 = function(path) { - var self = this; - - - if ($truthy(path['$respond_to?']("path"))) { - path = path.$path()}; - return executeIOAction(function(){return __fs__.existsSync(path)}); - }, $File_exist$ques$3.$$arity = 1); - Opal.defs(self, '$realpath', $File_realpath$4 = function $$realpath(pathname, dir_string, cache) { - var $iter = $File_realpath$4.$$p, block = $iter || nil, self = this; - - if ($iter) $File_realpath$4.$$p = null; - - - if ($iter) $File_realpath$4.$$p = null;; - - if (dir_string == null) { - dir_string = nil; - }; - - if (cache == null) { - cache = nil; - }; - if ($truthy(dir_string)) { - pathname = self.$join(dir_string, pathname)}; - if ((block !== nil)) { - - __fs__.realpath(pathname, cache, function(error, realpath){ - if (error) Opal.IOError.$new(error.message) - else block.$call(realpath) - }) - - } else { - return executeIOAction(function(){return __fs__.realpathSync(pathname, cache)}) - }; - }, $File_realpath$4.$$arity = -2); - Opal.defs(self, '$join', $File_join$5 = function $$join($a) { - var $post_args, paths, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - paths = $post_args;; - return __path__.posix.join.apply(__path__, paths); - }, $File_join$5.$$arity = -1); - Opal.defs(self, '$directory?', $File_directory$ques$6 = function(path) { - var self = this, result = nil, realpath = nil; - - - if ($truthy(self['$exist?'](path))) { - } else { - return false - }; - result = executeIOAction(function(){return !!__fs__.lstatSync(path).isDirectory()}); - if ($truthy(result)) { - } else { - - realpath = self.$realpath(path); - if ($truthy(realpath['$!='](path))) { - result = executeIOAction(function(){return !!__fs__.lstatSync(realpath).isDirectory()})}; - }; - return result; - }, $File_directory$ques$6.$$arity = 1); - Opal.defs(self, '$file?', $File_file$ques$7 = function(path) { - var self = this, result = nil, realpath = nil; - - - if ($truthy(self['$exist?'](path))) { - } else { - return false - }; - result = executeIOAction(function(){return !!__fs__.lstatSync(path).isFile()}); - if ($truthy(result)) { - } else { - - realpath = self.$realpath(path); - if ($truthy(realpath['$!='](path))) { - result = executeIOAction(function(){return !!__fs__.lstatSync(realpath).isFile()})}; - }; - return result; - }, $File_file$ques$7.$$arity = 1); - Opal.defs(self, '$readable?', $File_readable$ques$8 = function(path) { - var self = this; - - - if ($truthy(self['$exist?'](path))) { - } else { - return false - }; - return "" + "\n" + " try {\n" + " __fs__.accessSync(path, __fs__.R_OK);\n" + " return true;\n" + " } catch (error) {\n" + " return false;\n" + " }\n" + " "; - }, $File_readable$ques$8.$$arity = 1); - Opal.defs(self, '$size', $File_size$9 = function $$size(path) { - var self = this; - - return executeIOAction(function(){return __fs__.lstatSync(path).size}); - }, $File_size$9.$$arity = 1); - Opal.defs(self, '$open', $File_open$10 = function $$open(path, mode) { - var $iter = $File_open$10.$$p, $yield = $iter || nil, self = this, file = nil; - - if ($iter) $File_open$10.$$p = null; - - - if (mode == null) { - mode = "r"; - }; - file = self.$new(path, mode); - if (($yield !== nil)) { - - return (function() { try { - return Opal.yield1($yield, file); - } finally { - file.$close() - }; })(); - } else { - return file - }; - }, $File_open$10.$$arity = -2); - Opal.defs(self, '$stat', $File_stat$11 = function $$stat(path) { - var self = this; - - - if ($truthy(path['$respond_to?']("path"))) { - path = path.$path()}; - return $$$($$($nesting, 'File'), 'Stat').$new(path); - }, $File_stat$11.$$arity = 1); - Opal.defs(self, '$mtime', $File_mtime$12 = function $$mtime(path) { - var self = this; - - return executeIOAction(function(){return __fs__.statSync(path).mtime}) - }, $File_mtime$12.$$arity = 1); - Opal.defs(self, '$symlink?', $File_symlink$ques$13 = function(path) { - var self = this; - - return executeIOAction(function(){return __fs__.lstatSync(path).isSymbolicLink()}) - }, $File_symlink$ques$13.$$arity = 1); - Opal.defs(self, '$absolute_path', $File_absolute_path$14 = function $$absolute_path(path, basedir) { - var $a, self = this; - - - - if (basedir == null) { - basedir = nil; - }; - path = (function() {if ($truthy(path['$respond_to?']("to_path"))) { - return path.$to_path() - } else { - return path - }; return nil; })(); - basedir = ($truthy($a = basedir) ? $a : $$($nesting, 'Dir').$pwd()); - return __path__.normalize(__path__.resolve(basedir.$to_str(), path.$to_str())).split(__path__.sep).join(__path__.posix.sep); - }, $File_absolute_path$14.$$arity = -2); - - Opal.def(self, '$initialize', $File_initialize$15 = function $$initialize(path, flags) { - var self = this, encoding_option_rx = nil; - - - - if (flags == null) { - flags = "r"; - }; - self.binary_flag = flags['$include?']("b"); - flags = flags.$delete("b"); - encoding_option_rx = /:(.*)/; - if ($truthy(encoding_option_rx['$match?'](flags))) { - - handle_unsupported_feature("Encoding option (:encoding) is unsupported by Node.js openSync method and will be removed."); - flags = flags.$sub(encoding_option_rx, "");}; - self.path = path; - self.flags = flags; - return (self.fd = executeIOAction(function(){return __fs__.openSync(path, flags)})); - }, $File_initialize$15.$$arity = -2); - self.$attr_reader("path"); - - Opal.def(self, '$read', $File_read$16 = function $$read() { - var self = this, res = nil; - - if ($truthy(self.eof)) { - return "" - } else { - - if ($truthy(self.binary_flag)) { - - - var buf = executeIOAction(function(){return __fs__.readFileSync(self.path)}) - var content - if (is_utf8(buf)) { - content = buf.toString('utf8') - } else { - // coerce to utf8 - content = __utf8TextDecoder__.decode(__textEncoder__.encode(buf.toString('binary'))) - } - ; - res = content; - } else { - res = executeIOAction(function(){return __fs__.readFileSync(self.path).toString('utf8')}) - }; - self.eof = true; - self.lineno = res.$size(); - return res; - } - }, $File_read$16.$$arity = 0); - - Opal.def(self, '$readlines', $File_readlines$17 = function $$readlines(separator) { - var self = this; - if ($gvars["/"] == null) $gvars["/"] = nil; - - - - if (separator == null) { - separator = $gvars["/"]; - }; - return self.$each_line(separator).$to_a(); - }, $File_readlines$17.$$arity = -1); - - Opal.def(self, '$each_line', $File_each_line$18 = function $$each_line(separator) { - var $iter = $File_each_line$18.$$p, block = $iter || nil, self = this, lines = nil; - if ($gvars["/"] == null) $gvars["/"] = nil; - - if ($iter) $File_each_line$18.$$p = null; - - - if ($iter) $File_each_line$18.$$p = null;; - - if (separator == null) { - separator = $gvars["/"]; - }; - if ($truthy(self.eof)) { - return (function() {if ((block !== nil)) { - return self - } else { - return [].$to_enum() - }; return nil; })()}; - if ((block !== nil)) { - - lines = $$($nesting, 'File').$read(self.path); - - self.eof = false; - self.lineno = 0; - var chomped = lines.$chomp(), - trailing = lines.length != chomped.length, - splitted = chomped.split(separator); - for (var i = 0, length = splitted.length; i < length; i++) { - self.lineno += 1; - if (i < length - 1 || trailing) { - Opal.yield1(block, splitted[i] + separator); - } - else { - Opal.yield1(block, splitted[i]); - } - } - self.eof = true; - ; - return self; - } else { - return self.$read().$each_line(separator) - }; - }, $File_each_line$18.$$arity = -1); - - Opal.def(self, '$write', $File_write$19 = function $$write(string) { - var self = this; - - return executeIOAction(function(){return __fs__.writeSync(self.fd, string)}) - }, $File_write$19.$$arity = 1); - - Opal.def(self, '$flush', $File_flush$20 = function $$flush() { - var self = this; - - return executeIOAction(function(){return __fs__.fsyncSync(self.fd)}) - }, $File_flush$20.$$arity = 0); - - Opal.def(self, '$close', $File_close$21 = function $$close() { - var self = this; - - return executeIOAction(function(){return __fs__.closeSync(self.fd)}) - }, $File_close$21.$$arity = 0); - return (Opal.def(self, '$mtime', $File_mtime$22 = function $$mtime() { - var self = this; - - return executeIOAction(function(){return __fs__.statSync(self.path).mtime}) - }, $File_mtime$22.$$arity = 0), nil) && 'mtime'; - })($nesting[0], $$($nesting, 'IO'), $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Stat'); - - var $nesting = [self].concat($parent_nesting), $Stat_initialize$23, $Stat_file$ques$24, $Stat_mtime$25; - if (self.__fs__ == null) self.__fs__ = nil; - - self.$$prototype.path = nil; - - self.__fs__ = require('fs'); - var __fs__ = self.__fs__; - - Opal.def(self, '$initialize', $Stat_initialize$23 = function $$initialize(path) { - var self = this; - - return (self.path = path) - }, $Stat_initialize$23.$$arity = 1); - - Opal.def(self, '$file?', $Stat_file$ques$24 = function() { - var self = this; - - return executeIOAction(function(){return __fs__.statSync(self.path).isFile()}) - }, $Stat_file$ques$24.$$arity = 0); - return (Opal.def(self, '$mtime', $Stat_mtime$25 = function $$mtime() { - var self = this; - - return executeIOAction(function(){return __fs__.statSync(self.path).mtime}) - }, $Stat_mtime$25.$$arity = 0), nil) && 'mtime'; - })($$($nesting, 'File'), null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["nodejs/dir"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$respond_to?', '$flat_map', '$to_path', '$coerce_to!']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Dir'); - - var $nesting = [self].concat($parent_nesting); - if (self.__glob__ == null) self.__glob__ = nil; - if (self.__fs__ == null) self.__fs__ = nil; - if (self.__path__ == null) self.__path__ = nil; - if (self.__os__ == null) self.__os__ = nil; - - - self.__glob__ = require('glob'); - self.__fs__ = require('fs'); - self.__path__ = require('path'); - self.__os__ = require('os'); - var __glob__ = self.__glob__; - var __fs__ = self.__fs__; - var __path__ = self.__path__; - var __os__ = self.__os__; - return (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $$$1, $pwd$2, $home$3, $chdir$4, $mkdir$5, $entries$6, $glob$7; - - - - Opal.def(self, '$[]', $$$1 = function(glob) { - var self = this; - - return __glob__.sync(glob) - }, $$$1.$$arity = 1); - - Opal.def(self, '$pwd', $pwd$2 = function $$pwd() { - var self = this; - - return process.cwd().split(__path__.sep).join(__path__.posix.sep); - }, $pwd$2.$$arity = 0); - - Opal.def(self, '$home', $home$3 = function $$home() { - var self = this; - - return __os__.homedir(); - }, $home$3.$$arity = 0); - - Opal.def(self, '$chdir', $chdir$4 = function $$chdir(path) { - var self = this; - - return process.chdir(path) - }, $chdir$4.$$arity = 1); - - Opal.def(self, '$mkdir', $mkdir$5 = function $$mkdir(path) { - var self = this; - - return __fs__.mkdirSync(path) - }, $mkdir$5.$$arity = 1); - - Opal.def(self, '$entries', $entries$6 = function $$entries(dirname) { - var self = this; - - - var result = []; - var entries = __fs__.readdirSync(dirname); - for (var i = 0, ii = entries.length; i < ii; i++) { - result.push(entries[i]); - } - return result; - - }, $entries$6.$$arity = 1); - - Opal.def(self, '$glob', $glob$7 = function $$glob(pattern) { - var $$8, self = this; - - - if ($truthy(pattern['$respond_to?']("each"))) { - } else { - pattern = [pattern] - }; - return $send(pattern, 'flat_map', [], ($$8 = function(subpattern){var self = $$8.$$s || this; - - - - if (subpattern == null) { - subpattern = nil; - }; - if ($truthy(subpattern['$respond_to?']("to_path"))) { - subpattern = subpattern.$to_path()}; - subpattern = $$($nesting, 'Opal')['$coerce_to!'](subpattern, $$($nesting, 'String'), "to_str"); - return __glob__.sync(subpattern);;}, $$8.$$s = self, $$8.$$arity = 1, $$8)); - }, $glob$7.$$arity = 1); - return Opal.alias(self, "getwd", "pwd"); - })(Opal.get_singleton_class(self), $nesting); - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["nodejs/io"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var $$5, $$6, self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $lambda = Opal.lambda, $send = Opal.send, $writer = nil; - - Opal.add_stubs(['$attr_reader', '$write', '$read', '$write_proc=', '$-', '$tty=']); - - - function executeIOAction(action) { - try { - return action(); - } catch (error) { - if (error.code === 'EACCES' || - error.code === 'EISDIR' || - error.code === 'EMFILE' || - error.code === 'ENOENT' || - error.code === 'EPERM') { - throw Opal.IOError.$new(error.message) - } - throw error; - } - } -; - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'IO'); - - var $nesting = [self].concat($parent_nesting), $IO_initialize$1, $IO_write$2, $IO_read$3, $IO_binread$4; - if (self.__fs__ == null) self.__fs__ = nil; - - - self.__fs__ = require('fs'); - var __fs__ = self.__fs__; - self.$attr_reader("eof"); - self.$attr_reader("lineno"); - - Opal.def(self, '$initialize', $IO_initialize$1 = function $$initialize() { - var self = this; - - - self.eof = false; - return (self.lineno = 0); - }, $IO_initialize$1.$$arity = 0); - Opal.defs(self, '$write', $IO_write$2 = function $$write(path, data) { - var self = this; - - return $$($nesting, 'File').$write(path, data) - }, $IO_write$2.$$arity = 2); - Opal.defs(self, '$read', $IO_read$3 = function $$read(path) { - var self = this; - - return $$($nesting, 'File').$read(path) - }, $IO_read$3.$$arity = 1); - return (Opal.defs(self, '$binread', $IO_binread$4 = function $$binread(path) { - var self = this; - - return executeIOAction(function(){return __fs__.readFileSync(path).toString('binary')}) - }, $IO_binread$4.$$arity = 1), nil) && 'binread'; - })($nesting[0], null, $nesting); - - $writer = [$lambda(($$5 = function(string){var self = $$5.$$s || this; - - - - if (string == null) { - string = nil; - }; - return process.stdout.write(string);;}, $$5.$$s = self, $$5.$$arity = 1, $$5))]; - $send($$($nesting, 'STDOUT'), 'write_proc=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [$lambda(($$6 = function(string){var self = $$6.$$s || this; - - - - if (string == null) { - string = nil; - }; - return process.stderr.write(string);;}, $$6.$$s = self, $$6.$$arity = 1, $$6))]; - $send($$($nesting, 'STDERR'), 'write_proc=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [true]; - $send($$($nesting, 'STDOUT'), 'tty=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [true]; - $send($$($nesting, 'STDERR'), 'tty=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];; -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["nodejs/open-uri"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module; - - return (function($base, $parent_nesting) { - var self = $module($base, 'OpenURI'); - - var $nesting = [self].concat($parent_nesting), $OpenURI_request$1, $OpenURI_data$2; - if (self.__xmlhttprequest__ == null) self.__xmlhttprequest__ = nil; - - - self.__xmlhttprequest__ = require('unxhr'); - var __XMLHttpRequest__ = self.__xmlhttprequest__.XMLHttpRequest; - Opal.defs(self, '$request', $OpenURI_request$1 = function $$request(uri) { - var self = this; - - - var xhr = new __XMLHttpRequest__(); - xhr.open('GET', uri, false); - xhr.responseType = 'arraybuffer'; - xhr.send(); - return xhr; - - }, $OpenURI_request$1.$$arity = 1); - Opal.defs(self, '$data', $OpenURI_data$2 = function $$data(req) { - var self = this; - - - var arrayBuffer = req.response; - var byteArray = new Uint8Array(arrayBuffer); - var result = [] - for (var i = 0; i < byteArray.byteLength; i++) { - result.push(byteArray[i]); - } - return result; - - }, $OpenURI_data$2.$$arity = 1); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/comparable"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy; - - Opal.add_stubs(['$===', '$>', '$<', '$equal?', '$<=>', '$normalize', '$raise', '$class']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Comparable'); - - var $nesting = [self].concat($parent_nesting), $Comparable_normalize$1, $Comparable_$eq_eq$2, $Comparable_$gt$3, $Comparable_$gt_eq$4, $Comparable_$lt$5, $Comparable_$lt_eq$6, $Comparable_between$ques$7, $Comparable_clamp$8; - - - Opal.defs(self, '$normalize', $Comparable_normalize$1 = function $$normalize(what) { - var self = this; - - - if ($truthy($$($nesting, 'Integer')['$==='](what))) { - return what}; - if ($truthy($rb_gt(what, 0))) { - return 1}; - if ($truthy($rb_lt(what, 0))) { - return -1}; - return 0; - }, $Comparable_normalize$1.$$arity = 1); - - Opal.def(self, '$==', $Comparable_$eq_eq$2 = function(other) { - var self = this, cmp = nil; - - try { - - if ($truthy(self['$equal?'](other))) { - return true}; - - if (self["$<=>"] == Opal.Kernel["$<=>"]) { - return false; - } - - // check for infinite recursion - if (self.$$comparable) { - delete self.$$comparable; - return false; - } - ; - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - return false - }; - return $$($nesting, 'Comparable').$normalize(cmp) == 0; - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return false - } finally { Opal.pop_exception() } - } else { throw $err; } - } - }, $Comparable_$eq_eq$2.$$arity = 1); - - Opal.def(self, '$>', $Comparable_$gt$3 = function(other) { - var self = this, cmp = nil; - - - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed") - }; - return $$($nesting, 'Comparable').$normalize(cmp) > 0; - }, $Comparable_$gt$3.$$arity = 1); - - Opal.def(self, '$>=', $Comparable_$gt_eq$4 = function(other) { - var self = this, cmp = nil; - - - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed") - }; - return $$($nesting, 'Comparable').$normalize(cmp) >= 0; - }, $Comparable_$gt_eq$4.$$arity = 1); - - Opal.def(self, '$<', $Comparable_$lt$5 = function(other) { - var self = this, cmp = nil; - - - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed") - }; - return $$($nesting, 'Comparable').$normalize(cmp) < 0; - }, $Comparable_$lt$5.$$arity = 1); - - Opal.def(self, '$<=', $Comparable_$lt_eq$6 = function(other) { - var self = this, cmp = nil; - - - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed") - }; - return $$($nesting, 'Comparable').$normalize(cmp) <= 0; - }, $Comparable_$lt_eq$6.$$arity = 1); - - Opal.def(self, '$between?', $Comparable_between$ques$7 = function(min, max) { - var self = this; - - - if ($rb_lt(self, min)) { - return false}; - if ($rb_gt(self, max)) { - return false}; - return true; - }, $Comparable_between$ques$7.$$arity = 2); - - Opal.def(self, '$clamp', $Comparable_clamp$8 = function $$clamp(min, max) { - var self = this, cmp = nil; - - - cmp = min['$<=>'](max); - if ($truthy(cmp)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (min.$class()) + " with " + (max.$class()) + " failed") - }; - if ($truthy($rb_gt($$($nesting, 'Comparable').$normalize(cmp), 0))) { - self.$raise($$($nesting, 'ArgumentError'), "min argument must be smaller than max argument")}; - if ($truthy($rb_lt($$($nesting, 'Comparable').$normalize(self['$<=>'](min)), 0))) { - return min}; - if ($truthy($rb_gt($$($nesting, 'Comparable').$normalize(self['$<=>'](max)), 0))) { - return max}; - return self; - }, $Comparable_clamp$8.$$arity = 2); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["pathname"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send, $module = Opal.module; - - Opal.add_stubs(['$require', '$include', '$quote', '$===', '$to_s', '$path', '$respond_to?', '$to_path', '$is_a?', '$nil?', '$raise', '$class', '$==', '$attr_reader', '$!', '$relative?', '$chop_basename', '$basename', '$=~', '$new', '$source', '$[]', '$rindex', '$sub', '$absolute?', '$expand_path', '$plus', '$unshift', '$length', '$!=', '$empty?', '$first', '$shift', '$+', '$join', '$dirname', '$pop', '$reverse_each', '$directory?', '$extname', '$<=>', '$nonzero?', '$proc', '$casecmp', '$cleanpath', '$inspect', '$include?', '$fill', '$map', '$entries']); - - self.$require("corelib/comparable"); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Pathname'); - - var $nesting = [self].concat($parent_nesting), $Pathname_initialize$1, $Pathname_$eq_eq$2, $Pathname_absolute$ques$3, $Pathname_relative$ques$4, $Pathname_chop_basename$5, $Pathname_root$ques$6, $Pathname_parent$7, $Pathname_sub$8, $Pathname_cleanpath$9, $Pathname_to_path$10, $Pathname_hash$11, $Pathname_expand_path$12, $Pathname_$plus$13, $Pathname_plus$14, $Pathname_join$15, $Pathname_split$17, $Pathname_dirname$18, $Pathname_basename$19, $Pathname_directory$ques$20, $Pathname_extname$21, $Pathname_$lt_eq_gt$22, $Pathname$23, $Pathname$24, $Pathname_relative_path_from$25, $Pathname_entries$26; - - self.$$prototype.path = nil; - - self.$include($$($nesting, 'Comparable')); - Opal.const_set($nesting[0], 'SEPARATOR_PAT', new RegExp($$($nesting, 'Regexp').$quote($$$($$($nesting, 'File'), 'SEPARATOR')))); - - Opal.def(self, '$initialize', $Pathname_initialize$1 = function $$initialize(path) { - var self = this; - - - if ($truthy($$($nesting, 'Pathname')['$==='](path))) { - self.path = path.$path().$to_s() - } else if ($truthy(path['$respond_to?']("to_path"))) { - self.path = path.$to_path() - } else if ($truthy(path['$is_a?']($$($nesting, 'String')))) { - self.path = path - } else if ($truthy(path['$nil?']())) { - self.$raise($$($nesting, 'TypeError'), "no implicit conversion of nil into String") - } else { - self.$raise($$($nesting, 'TypeError'), "" + "no implicit conversion of " + (path.$class()) + " into String") - }; - if (self.path['$==']("\u0000")) { - return self.$raise($$($nesting, 'ArgumentError')) - } else { - return nil - }; - }, $Pathname_initialize$1.$$arity = 1); - self.$attr_reader("path"); - - Opal.def(self, '$==', $Pathname_$eq_eq$2 = function(other) { - var self = this; - - return other.$path()['$=='](self.path) - }, $Pathname_$eq_eq$2.$$arity = 1); - - Opal.def(self, '$absolute?', $Pathname_absolute$ques$3 = function() { - var self = this; - - return self['$relative?']()['$!']() - }, $Pathname_absolute$ques$3.$$arity = 0); - - Opal.def(self, '$relative?', $Pathname_relative$ques$4 = function() { - var $a, $b, $c, self = this, path = nil, r = nil; - - - path = self.path; - while ($truthy((r = self.$chop_basename(path)))) { - $c = r, $b = Opal.to_ary($c), (path = ($b[0] == null ? nil : $b[0])), $c - }; - return path['$=='](""); - }, $Pathname_relative$ques$4.$$arity = 0); - - Opal.def(self, '$chop_basename', $Pathname_chop_basename$5 = function $$chop_basename(path) { - var self = this, base = nil; - - - base = $$($nesting, 'File').$basename(path); - if ($truthy($$($nesting, 'Regexp').$new("" + "^" + ($$$($$($nesting, 'Pathname'), 'SEPARATOR_PAT').$source()) + "?$")['$=~'](base))) { - return nil - } else { - return [path['$[]'](0, path.$rindex(base)), base] - }; - }, $Pathname_chop_basename$5.$$arity = 1); - - Opal.def(self, '$root?', $Pathname_root$ques$6 = function() { - var self = this; - - return self.path['$==']("/") - }, $Pathname_root$ques$6.$$arity = 0); - - Opal.def(self, '$parent', $Pathname_parent$7 = function $$parent() { - var self = this, new_path = nil; - - - new_path = self.path.$sub(/\/([^\/]+\/?$)/, ""); - if (new_path['$==']("")) { - new_path = (function() {if ($truthy(self['$absolute?']())) { - return "/" - } else { - return "." - }; return nil; })()}; - return $$($nesting, 'Pathname').$new(new_path); - }, $Pathname_parent$7.$$arity = 0); - - Opal.def(self, '$sub', $Pathname_sub$8 = function $$sub($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $$($nesting, 'Pathname').$new($send(self.path, 'sub', Opal.to_a(args))); - }, $Pathname_sub$8.$$arity = -1); - - Opal.def(self, '$cleanpath', $Pathname_cleanpath$9 = function $$cleanpath() { - var self = this; - - return Opal.normalize(self.path) - }, $Pathname_cleanpath$9.$$arity = 0); - - Opal.def(self, '$to_path', $Pathname_to_path$10 = function $$to_path() { - var self = this; - - return self.path - }, $Pathname_to_path$10.$$arity = 0); - - Opal.def(self, '$hash', $Pathname_hash$11 = function $$hash() { - var self = this; - - return self.path - }, $Pathname_hash$11.$$arity = 0); - - Opal.def(self, '$expand_path', $Pathname_expand_path$12 = function $$expand_path() { - var self = this; - - return $$($nesting, 'Pathname').$new($$($nesting, 'File').$expand_path(self.path)) - }, $Pathname_expand_path$12.$$arity = 0); - - Opal.def(self, '$+', $Pathname_$plus$13 = function(other) { - var self = this; - - - if ($truthy($$($nesting, 'Pathname')['$==='](other))) { - } else { - other = $$($nesting, 'Pathname').$new(other) - }; - return $$($nesting, 'Pathname').$new(self.$plus(self.path, other.$to_s())); - }, $Pathname_$plus$13.$$arity = 1); - - Opal.def(self, '$plus', $Pathname_plus$14 = function $$plus(path1, path2) { - var $a, $b, $c, self = this, prefix2 = nil, index_list2 = nil, basename_list2 = nil, r2 = nil, basename2 = nil, prefix1 = nil, r1 = nil, basename1 = nil, suffix2 = nil; - - - prefix2 = path2; - index_list2 = []; - basename_list2 = []; - while ($truthy((r2 = self.$chop_basename(prefix2)))) { - - $c = r2, $b = Opal.to_ary($c), (prefix2 = ($b[0] == null ? nil : $b[0])), (basename2 = ($b[1] == null ? nil : $b[1])), $c; - index_list2.$unshift(prefix2.$length()); - basename_list2.$unshift(basename2); - }; - if ($truthy(prefix2['$!='](""))) { - return path2}; - prefix1 = path1; - while ($truthy(true)) { - - while ($truthy(($truthy($c = basename_list2['$empty?']()['$!']()) ? basename_list2.$first()['$=='](".") : $c))) { - - index_list2.$shift(); - basename_list2.$shift(); - }; - if ($truthy((r1 = self.$chop_basename(prefix1)))) { - } else { - break; - }; - $c = r1, $b = Opal.to_ary($c), (prefix1 = ($b[0] == null ? nil : $b[0])), (basename1 = ($b[1] == null ? nil : $b[1])), $c; - if (basename1['$=='](".")) { - continue;}; - if ($truthy(($truthy($b = ($truthy($c = basename1['$==']("..")) ? $c : basename_list2['$empty?']())) ? $b : basename_list2.$first()['$!=']("..")))) { - - prefix1 = $rb_plus(prefix1, basename1); - break;;}; - index_list2.$shift(); - basename_list2.$shift(); - }; - r1 = self.$chop_basename(prefix1); - if ($truthy(($truthy($a = r1['$!']()) ? new RegExp($$($nesting, 'SEPARATOR_PAT'))['$=~']($$($nesting, 'File').$basename(prefix1)) : $a))) { - while ($truthy(($truthy($b = basename_list2['$empty?']()['$!']()) ? basename_list2.$first()['$==']("..") : $b))) { - - index_list2.$shift(); - basename_list2.$shift(); - }}; - if ($truthy(basename_list2['$empty?']()['$!']())) { - - suffix2 = path2['$[]'](Opal.Range.$new(index_list2.$first(), -1, false)); - if ($truthy(r1)) { - return $$($nesting, 'File').$join(prefix1, suffix2) - } else { - return $rb_plus(prefix1, suffix2) - }; - } else if ($truthy(r1)) { - return prefix1 - } else { - return $$($nesting, 'File').$dirname(prefix1) - }; - }, $Pathname_plus$14.$$arity = 2); - - Opal.def(self, '$join', $Pathname_join$15 = function $$join($a) {try { - - var $post_args, args, $$16, self = this, result = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy(args['$empty?']())) { - return self}; - result = args.$pop(); - if ($truthy($$($nesting, 'Pathname')['$==='](result))) { - } else { - result = $$($nesting, 'Pathname').$new(result) - }; - if ($truthy(result['$absolute?']())) { - return result}; - $send(args, 'reverse_each', [], ($$16 = function(arg){var self = $$16.$$s || this; - - - - if (arg == null) { - arg = nil; - }; - if ($truthy($$($nesting, 'Pathname')['$==='](arg))) { - } else { - arg = $$($nesting, 'Pathname').$new(arg) - }; - result = $rb_plus(arg, result); - if ($truthy(result['$absolute?']())) { - Opal.ret(result) - } else { - return nil - };}, $$16.$$s = self, $$16.$$arity = 1, $$16)); - return $rb_plus(self, result); - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Pathname_join$15.$$arity = -1); - - Opal.def(self, '$split', $Pathname_split$17 = function $$split() { - var self = this; - - return [self.$dirname(), self.$basename()] - }, $Pathname_split$17.$$arity = 0); - - Opal.def(self, '$dirname', $Pathname_dirname$18 = function $$dirname() { - var self = this; - - return $$($nesting, 'Pathname').$new($$($nesting, 'File').$dirname(self.path)) - }, $Pathname_dirname$18.$$arity = 0); - - Opal.def(self, '$basename', $Pathname_basename$19 = function $$basename() { - var self = this; - - return $$($nesting, 'Pathname').$new($$($nesting, 'File').$basename(self.path)) - }, $Pathname_basename$19.$$arity = 0); - - Opal.def(self, '$directory?', $Pathname_directory$ques$20 = function() { - var self = this; - - return $$($nesting, 'File')['$directory?'](self.path) - }, $Pathname_directory$ques$20.$$arity = 0); - - Opal.def(self, '$extname', $Pathname_extname$21 = function $$extname() { - var self = this; - - return $$($nesting, 'File').$extname(self.path) - }, $Pathname_extname$21.$$arity = 0); - - Opal.def(self, '$<=>', $Pathname_$lt_eq_gt$22 = function(other) { - var self = this; - - return self.$path()['$<=>'](other.$path()) - }, $Pathname_$lt_eq_gt$22.$$arity = 1); - Opal.alias(self, "eql?", "=="); - Opal.alias(self, "===", "=="); - Opal.alias(self, "to_str", "to_path"); - Opal.alias(self, "to_s", "to_path"); - Opal.const_set($nesting[0], 'SAME_PATHS', (function() {if ($truthy($$$($$($nesting, 'File'), 'FNM_SYSCASE')['$nonzero?']())) { - return $send(self, 'proc', [], ($Pathname$23 = function(a, b){var self = $Pathname$23.$$s || this; - - - - if (a == null) { - a = nil; - }; - - if (b == null) { - b = nil; - }; - return a.$casecmp(b)['$=='](0);}, $Pathname$23.$$s = self, $Pathname$23.$$arity = 2, $Pathname$23)) - } else { - return $send(self, 'proc', [], ($Pathname$24 = function(a, b){var self = $Pathname$24.$$s || this; - - - - if (a == null) { - a = nil; - }; - - if (b == null) { - b = nil; - }; - return a['$=='](b);}, $Pathname$24.$$s = self, $Pathname$24.$$arity = 2, $Pathname$24)) - }; return nil; })()); - - Opal.def(self, '$relative_path_from', $Pathname_relative_path_from$25 = function $$relative_path_from(base_directory) { - var $a, $b, $c, self = this, dest_directory = nil, dest_prefix = nil, dest_names = nil, r = nil, basename = nil, base_prefix = nil, base_names = nil, relpath_names = nil; - - - dest_directory = self.$cleanpath().$to_s(); - base_directory = base_directory.$cleanpath().$to_s(); - dest_prefix = dest_directory; - dest_names = []; - while ($truthy((r = self.$chop_basename(dest_prefix)))) { - - $c = r, $b = Opal.to_ary($c), (dest_prefix = ($b[0] == null ? nil : $b[0])), (basename = ($b[1] == null ? nil : $b[1])), $c; - if ($truthy(basename['$!=']("."))) { - dest_names.$unshift(basename)}; - }; - base_prefix = base_directory; - base_names = []; - while ($truthy((r = self.$chop_basename(base_prefix)))) { - - $c = r, $b = Opal.to_ary($c), (base_prefix = ($b[0] == null ? nil : $b[0])), (basename = ($b[1] == null ? nil : $b[1])), $c; - if ($truthy(basename['$!=']("."))) { - base_names.$unshift(basename)}; - }; - if ($truthy($$($nesting, 'SAME_PATHS')['$[]'](dest_prefix, base_prefix))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "different prefix: " + (dest_prefix.$inspect()) + " and " + (base_directory.$inspect())) - }; - while ($truthy(($truthy($b = ($truthy($c = dest_names['$empty?']()['$!']()) ? base_names['$empty?']()['$!']() : $c)) ? $$($nesting, 'SAME_PATHS')['$[]'](dest_names.$first(), base_names.$first()) : $b))) { - - dest_names.$shift(); - base_names.$shift(); - }; - if ($truthy(base_names['$include?'](".."))) { - self.$raise($$($nesting, 'ArgumentError'), "" + "base_directory has ..: " + (base_directory.$inspect()))}; - base_names.$fill(".."); - relpath_names = $rb_plus(base_names, dest_names); - if ($truthy(relpath_names['$empty?']())) { - return $$($nesting, 'Pathname').$new(".") - } else { - return $$($nesting, 'Pathname').$new($send($$($nesting, 'File'), 'join', Opal.to_a(relpath_names))) - }; - }, $Pathname_relative_path_from$25.$$arity = 1); - return (Opal.def(self, '$entries', $Pathname_entries$26 = function $$entries() { - var $$27, self = this; - - return $send($$($nesting, 'Dir').$entries(self.path), 'map', [], ($$27 = function(f){var self = $$27.$$s || this; - - - - if (f == null) { - f = nil; - }; - return self.$class().$new(f);}, $$27.$$s = self, $$27.$$arity = 1, $$27)) - }, $Pathname_entries$26.$$arity = 0), nil) && 'entries'; - })($nesting[0], null, $nesting); - return (function($base, $parent_nesting) { - var self = $module($base, 'Kernel'); - - var $nesting = [self].concat($parent_nesting), $Kernel_Pathname$28; - - - Opal.def(self, '$Pathname', $Kernel_Pathname$28 = function $$Pathname(path) { - var self = this; - - return $$($nesting, 'Pathname').$new(path) - }, $Kernel_Pathname$28.$$arity = 1) - })($nesting[0], $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["nodejs/pathname"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass; - - Opal.add_stubs(['$require', '$include', '$to_str', '$!', '$absolute?']); - - self.$require("pathname"); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Pathname'); - - var $nesting = [self].concat($parent_nesting), $Pathname_absolute$ques$1, $Pathname_relative$ques$2, $Pathname_to_path$3; - if (self.__path__ == null) self.__path__ = nil; - - self.$$prototype.path = nil; - - self.$include($$($nesting, 'Comparable')); - self.__path__ = require('path'); - var __path__ = self.__path__; - - Opal.def(self, '$absolute?', $Pathname_absolute$ques$1 = function() { - var self = this; - - return __path__.isAbsolute(self.path.$to_str()) - }, $Pathname_absolute$ques$1.$$arity = 0); - - Opal.def(self, '$relative?', $Pathname_relative$ques$2 = function() { - var self = this; - - return self['$absolute?']()['$!']() - }, $Pathname_relative$ques$2.$$arity = 0); - return (Opal.def(self, '$to_path', $Pathname_to_path$3 = function $$to_path() { - var self = this; - - return self.path - }, $Pathname_to_path$3.$$arity = 0), nil) && 'to_path'; - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["nodejs/env"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$new', '$to_s']); - - Opal.const_set($nesting[0], 'ENV', $$($nesting, 'Object').$new()); - return (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $$$1, $$$eq$2, $key$ques$3, $empty$ques$4, $keys$5, $delete$6, $to_s$7; - - - - Opal.def(self, '$[]', $$$1 = function(name) { - var self = this; - - return process.env[name] || nil - }, $$$1.$$arity = 1); - - Opal.def(self, '$[]=', $$$eq$2 = function(name, value) { - var self = this; - - return process.env[name.$to_s()] = value.$to_s() - }, $$$eq$2.$$arity = 2); - - Opal.def(self, '$key?', $key$ques$3 = function(name) { - var self = this; - - return process.env.hasOwnProperty(name) - }, $key$ques$3.$$arity = 1); - Opal.alias(self, "has_key?", "key?"); - Opal.alias(self, "include?", "key?"); - Opal.alias(self, "member?", "key?"); - - Opal.def(self, '$empty?', $empty$ques$4 = function() { - var self = this; - - return Object.keys(process.env).length === 0; - }, $empty$ques$4.$$arity = 0); - - Opal.def(self, '$keys', $keys$5 = function $$keys() { - var self = this; - - return Object.keys(process.env); - }, $keys$5.$$arity = 0); - - Opal.def(self, '$delete', $delete$6 = function(name) { - var self = this; - - - var value = process.env[name] || nil; - delete process.env[name]; - return value; - - }, $delete$6.$$arity = 1); - return (Opal.def(self, '$to_s', $to_s$7 = function $$to_s() { - var self = this; - - return "ENV" - }, $to_s$7.$$arity = 0), nil) && 'to_s'; - })(Opal.get_singleton_class($$($nesting, 'ENV')), $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["nodejs"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module; - - Opal.add_stubs(['$require']); - - (function($base, $parent_nesting) { - var self = $module($base, 'NodeJS'); - - var $nesting = [self].concat($parent_nesting); - - nil - })($nesting[0], $nesting); - self.$require("nodejs/kernel"); - self.$require("nodejs/file"); - self.$require("nodejs/dir"); - self.$require("nodejs/io"); - self.$require("nodejs/open-uri"); - self.$require("nodejs/pathname"); - return self.$require("nodejs/env"); -}; diff --git a/node_modules/asciidoctor-opal-runtime/src/opal.js b/node_modules/asciidoctor-opal-runtime/src/opal.js deleted file mode 100644 index 35f2a2ed..00000000 --- a/node_modules/asciidoctor-opal-runtime/src/opal.js +++ /dev/null @@ -1,20076 +0,0 @@ -(function(undefined) { - // @note - // A few conventions for the documentation of this file: - // 1. Always use "//" (in contrast with "/**/") - // 2. The syntax used is Yardoc (yardoc.org), which is intended for Ruby (se below) - // 3. `@param` and `@return` types should be preceded by `JS.` when referring to - // JavaScript constructors (e.g. `JS.Function`) otherwise Ruby is assumed. - // 4. `nil` and `null` being unambiguous refer to the respective - // objects/values in Ruby and JavaScript - // 5. This is still WIP :) so please give feedback and suggestions on how - // to improve or for alternative solutions - // - // The way the code is digested before going through Yardoc is a secret kept - // in the docs repo (https://github.com/opal/docs/tree/master). - - var global_object = this, console; - - // Detect the global object - if (typeof(global) !== 'undefined') { global_object = global; } - if (typeof(window) !== 'undefined') { global_object = window; } - - // Setup a dummy console object if missing - if (typeof(global_object.console) === 'object') { - console = global_object.console; - } else if (global_object.console == null) { - console = global_object.console = {}; - } else { - console = {}; - } - - if (!('log' in console)) { console.log = function () {}; } - if (!('warn' in console)) { console.warn = console.log; } - - if (typeof(global_object.Opal) !== 'undefined') { - console.warn('Opal already loaded. Loading twice can cause troubles, please fix your setup.'); - return global_object.Opal; - } - - var nil; - - // The actual class for BasicObject - var BasicObject; - - // The actual Object class. - // The leading underscore is to avoid confusion with window.Object() - var _Object; - - // The actual Module class - var Module; - - // The actual Class class - var Class; - - // The Opal object that is exposed globally - var Opal = this.Opal = {}; - - // This is a useful reference to global object inside ruby files - Opal.global = global_object; - global_object.Opal = Opal; - - // Configure runtime behavior with regards to require and unsupported fearures - Opal.config = { - missing_require_severity: 'error', // error, warning, ignore - unsupported_features_severity: 'warning', // error, warning, ignore - enable_stack_trace: true // true, false - } - - // Minify common function calls - var $hasOwn = Object.hasOwnProperty; - var $bind = Function.prototype.bind; - var $setPrototype = Object.setPrototypeOf; - var $slice = Array.prototype.slice; - var $splice = Array.prototype.splice; - - // Nil object id is always 4 - var nil_id = 4; - - // Generates even sequential numbers greater than 4 - // (nil_id) to serve as unique ids for ruby objects - var unique_id = nil_id; - - // Return next unique id - Opal.uid = function() { - unique_id += 2; - return unique_id; - }; - - // Retrieve or assign the id of an object - Opal.id = function(obj) { - if (obj.$$is_number) return (obj * 2)+1; - if (obj.$$id != null) { - return obj.$$id; - }; - $defineProperty(obj, '$$id', Opal.uid()); - return obj.$$id; - }; - - // Globals table - Opal.gvars = {}; - - // Exit function, this should be replaced by platform specific implementation - // (See nodejs and chrome for examples) - Opal.exit = function(status) { if (Opal.gvars.DEBUG) console.log('Exited with status '+status); }; - - // keeps track of exceptions for $! - Opal.exceptions = []; - - // @private - // Pops an exception from the stack and updates `$!`. - Opal.pop_exception = function() { - Opal.gvars["!"] = Opal.exceptions.pop() || nil; - } - - // Inspect any kind of object, including non Ruby ones - Opal.inspect = function(obj) { - if (obj === undefined) { - return "undefined"; - } - else if (obj === null) { - return "null"; - } - else if (!obj.$$class) { - return obj.toString(); - } - else { - return obj.$inspect(); - } - } - - function $defineProperty(object, name, initialValue) { - if (typeof(object) === "string") { - // Special case for: - // s = "string" - // def s.m; end - // String class is the only class that: - // + compiles to JS primitive - // + allows method definition directly on instances - // numbers, true, false and nil do not support it. - object[name] = initialValue; - } else { - Object.defineProperty(object, name, { - value: initialValue, - enumerable: false, - configurable: true, - writable: true - }); - } - } - - Opal.defineProperty = $defineProperty; - - Opal.slice = $slice; - - - // Truth - // ----- - - Opal.truthy = function(val) { - return (val !== nil && val != null && (!val.$$is_boolean || val == true)); - }; - - Opal.falsy = function(val) { - return (val === nil || val == null || (val.$$is_boolean && val == false)) - }; - - - // Constants - // --------- - // - // For future reference: - // - The Rails autoloading guide (http://guides.rubyonrails.org/v5.0/autoloading_and_reloading_constants.html) - // - @ConradIrwin's 2012 post on “Everything you ever wanted to know about constant lookup in Ruby” (http://cirw.in/blog/constant-lookup.html) - // - // Legend of MRI concepts/names: - // - constant reference (cref): the module/class that acts as a namespace - // - nesting: the namespaces wrapping the current scope, e.g. nesting inside - // `module A; module B::C; end; end` is `[B::C, A]` - - // Get the constant in the scope of the current cref - function const_get_name(cref, name) { - if (cref) return cref.$$const[name]; - } - - // Walk up the nesting array looking for the constant - function const_lookup_nesting(nesting, name) { - var i, ii, result, constant; - - if (nesting.length === 0) return; - - // If the nesting is not empty the constant is looked up in its elements - // and in order. The ancestors of those elements are ignored. - for (i = 0, ii = nesting.length; i < ii; i++) { - constant = nesting[i].$$const[name]; - if (constant != null) return constant; - } - } - - // Walk up the ancestors chain looking for the constant - function const_lookup_ancestors(cref, name) { - var i, ii, result, ancestors; - - if (cref == null) return; - - ancestors = Opal.ancestors(cref); - - for (i = 0, ii = ancestors.length; i < ii; i++) { - if (ancestors[i].$$const && $hasOwn.call(ancestors[i].$$const, name)) { - return ancestors[i].$$const[name]; - } - } - } - - // Walk up Object's ancestors chain looking for the constant, - // but only if cref is missing or a module. - function const_lookup_Object(cref, name) { - if (cref == null || cref.$$is_module) { - return const_lookup_ancestors(_Object, name); - } - } - - // Call const_missing if nothing else worked - function const_missing(cref, name, skip_missing) { - if (!skip_missing) { - return (cref || _Object).$const_missing(name); - } - } - - // Look for the constant just in the current cref or call `#const_missing` - Opal.const_get_local = function(cref, name, skip_missing) { - var result; - - if (cref == null) return; - - if (cref === '::') cref = _Object; - - if (!cref.$$is_module && !cref.$$is_class) { - throw new Opal.TypeError(cref.toString() + " is not a class/module"); - } - - result = const_get_name(cref, name); if (result != null) return result; - result = const_missing(cref, name, skip_missing); if (result != null) return result; - } - - // Look for the constant relative to a cref or call `#const_missing` (when the - // constant is prefixed by `::`). - Opal.const_get_qualified = function(cref, name, skip_missing) { - var result, cache, cached, current_version = Opal.const_cache_version; - - if (cref == null) return; - - if (cref === '::') cref = _Object; - - if (!cref.$$is_module && !cref.$$is_class) { - throw new Opal.TypeError(cref.toString() + " is not a class/module"); - } - - if ((cache = cref.$$const_cache) == null) { - $defineProperty(cref, '$$const_cache', Object.create(null)); - cache = cref.$$const_cache; - } - cached = cache[name]; - - if (cached == null || cached[0] !== current_version) { - ((result = const_get_name(cref, name)) != null) || - ((result = const_lookup_ancestors(cref, name)) != null); - cache[name] = [current_version, result]; - } else { - result = cached[1]; - } - - return result != null ? result : const_missing(cref, name, skip_missing); - }; - - // Initialize the top level constant cache generation counter - Opal.const_cache_version = 1; - - // Look for the constant in the open using the current nesting and the nearest - // cref ancestors or call `#const_missing` (when the constant has no :: prefix). - Opal.const_get_relative = function(nesting, name, skip_missing) { - var cref = nesting[0], result, current_version = Opal.const_cache_version, cache, cached; - - if ((cache = nesting.$$const_cache) == null) { - $defineProperty(nesting, '$$const_cache', Object.create(null)); - cache = nesting.$$const_cache; - } - cached = cache[name]; - - if (cached == null || cached[0] !== current_version) { - ((result = const_get_name(cref, name)) != null) || - ((result = const_lookup_nesting(nesting, name)) != null) || - ((result = const_lookup_ancestors(cref, name)) != null) || - ((result = const_lookup_Object(cref, name)) != null); - - cache[name] = [current_version, result]; - } else { - result = cached[1]; - } - - return result != null ? result : const_missing(cref, name, skip_missing); - }; - - // Register the constant on a cref and opportunistically set the name of - // unnamed classes/modules. - Opal.const_set = function(cref, name, value) { - if (cref == null || cref === '::') cref = _Object; - - if (value.$$is_a_module) { - if (value.$$name == null || value.$$name === nil) value.$$name = name; - if (value.$$base_module == null) value.$$base_module = cref; - } - - cref.$$const = (cref.$$const || Object.create(null)); - cref.$$const[name] = value; - - // Add a short helper to navigate constants manually. - // @example - // Opal.$$.Regexp.$$.IGNORECASE - cref.$$ = cref.$$const; - - Opal.const_cache_version++; - - // Expose top level constants onto the Opal object - if (cref === _Object) Opal[name] = value; - - // Name new class directly onto current scope (Opal.Foo.Baz = klass) - $defineProperty(cref, name, value); - - return value; - }; - - // Get all the constants reachable from a given cref, by default will include - // inherited constants. - Opal.constants = function(cref, inherit) { - if (inherit == null) inherit = true; - - var module, modules = [cref], module_constants, i, ii, constants = {}, constant; - - if (inherit) modules = modules.concat(Opal.ancestors(cref)); - if (inherit && cref.$$is_module) modules = modules.concat([Opal.Object]).concat(Opal.ancestors(Opal.Object)); - - for (i = 0, ii = modules.length; i < ii; i++) { - module = modules[i]; - - // Don not show Objects constants unless we're querying Object itself - if (cref !== _Object && module == _Object) break; - - for (constant in module.$$const) { - constants[constant] = true; - } - } - - return Object.keys(constants); - }; - - // Remove a constant from a cref. - Opal.const_remove = function(cref, name) { - Opal.const_cache_version++; - - if (cref.$$const[name] != null) { - var old = cref.$$const[name]; - delete cref.$$const[name]; - return old; - } - - if (cref.$$autoload != null && cref.$$autoload[name] != null) { - delete cref.$$autoload[name]; - return nil; - } - - throw Opal.NameError.$new("constant "+cref+"::"+cref.$name()+" not defined"); - }; - - - // Modules & Classes - // ----------------- - - // A `class Foo; end` expression in ruby is compiled to call this runtime - // method which either returns an existing class of the given name, or creates - // a new class in the given `base` scope. - // - // If a constant with the given name exists, then we check to make sure that - // it is a class and also that the superclasses match. If either of these - // fail, then we raise a `TypeError`. Note, `superclass` may be null if one - // was not specified in the ruby code. - // - // We pass a constructor to this method of the form `function ClassName() {}` - // simply so that classes show up with nicely formatted names inside debuggers - // in the web browser (or node/sprockets). - // - // The `scope` is the current `self` value where the class is being created - // from. We use this to get the scope for where the class should be created. - // If `scope` is an object (not a class/module), we simple get its class and - // use that as the scope instead. - // - // @param scope [Object] where the class is being created - // @param superclass [Class,null] superclass of the new class (may be null) - // @param id [String] the name of the class to be created - // @param constructor [JS.Function] function to use as constructor - // - // @return new [Class] or existing ruby class - // - Opal.allocate_class = function(name, superclass) { - var klass, constructor; - - if (superclass != null && superclass.$$bridge) { - // Inheritance from bridged classes requires - // calling original JS constructors - constructor = function() { - var args = $slice.call(arguments), - self = new ($bind.apply(superclass.$$constructor, [null].concat(args)))(); - - // and replacing a __proto__ manually - $setPrototype(self, klass.$$prototype); - return self; - } - } else { - constructor = function(){}; - } - - if (name) { - $defineProperty(constructor, 'displayName', '::'+name); - } - - klass = constructor; - - $defineProperty(klass, '$$name', name); - $defineProperty(klass, '$$constructor', constructor); - $defineProperty(klass, '$$prototype', constructor.prototype); - $defineProperty(klass, '$$const', {}); - $defineProperty(klass, '$$is_class', true); - $defineProperty(klass, '$$is_a_module', true); - $defineProperty(klass, '$$super', superclass); - $defineProperty(klass, '$$cvars', {}); - $defineProperty(klass, '$$own_included_modules', []); - $defineProperty(klass, '$$own_prepended_modules', []); - $defineProperty(klass, '$$ancestors', []); - $defineProperty(klass, '$$ancestors_cache_version', null); - - $defineProperty(klass.$$prototype, '$$class', klass); - - // By default if there are no singleton class methods - // __proto__ is Class.prototype - // Later singleton methods generate a singleton_class - // and inject it into ancestors chain - if (Opal.Class) { - $setPrototype(klass, Opal.Class.prototype); - } - - if (superclass != null) { - $setPrototype(klass.$$prototype, superclass.$$prototype); - - if (superclass.$$meta) { - // If superclass has metaclass then we have explicitely inherit it. - Opal.build_class_singleton_class(klass); - } - }; - - return klass; - } - - - function find_existing_class(scope, name) { - // Try to find the class in the current scope - var klass = const_get_name(scope, name); - - // If the class exists in the scope, then we must use that - if (klass) { - // Make sure the existing constant is a class, or raise error - if (!klass.$$is_class) { - throw Opal.TypeError.$new(name + " is not a class"); - } - - return klass; - } - } - - function ensureSuperclassMatch(klass, superclass) { - if (klass.$$super !== superclass) { - throw Opal.TypeError.$new("superclass mismatch for class " + klass.$$name); - } - } - - Opal.klass = function(scope, superclass, name) { - var bridged; - - if (scope == null) { - // Global scope - scope = _Object; - } else if (!scope.$$is_class && !scope.$$is_module) { - // Scope is an object, use its class - scope = scope.$$class; - } - - // If the superclass is not an Opal-generated class then we're bridging a native JS class - if (superclass != null && !superclass.hasOwnProperty('$$is_class')) { - bridged = superclass; - superclass = _Object; - } - - var klass = find_existing_class(scope, name); - - if (klass) { - if (superclass) { - // Make sure existing class has same superclass - ensureSuperclassMatch(klass, superclass); - } - return klass; - } - - // Class doesn't exist, create a new one with given superclass... - - // Not specifying a superclass means we can assume it to be Object - if (superclass == null) { - superclass = _Object; - } - - // Create the class object (instance of Class) - klass = Opal.allocate_class(name, superclass); - Opal.const_set(scope, name, klass); - - // Call .inherited() hook with new class on the superclass - if (superclass.$inherited) { - superclass.$inherited(klass); - } - - if (bridged) { - Opal.bridge(bridged, klass); - } - - return klass; - } - - // Define new module (or return existing module). The given `scope` is basically - // the current `self` value the `module` statement was defined in. If this is - // a ruby module or class, then it is used, otherwise if the scope is a ruby - // object then that objects real ruby class is used (e.g. if the scope is the - // main object, then the top level `Object` class is used as the scope). - // - // If a module of the given name is already defined in the scope, then that - // instance is just returned. - // - // If there is a class of the given name in the scope, then an error is - // generated instead (cannot have a class and module of same name in same scope). - // - // Otherwise, a new module is created in the scope with the given name, and that - // new instance is returned back (to be referenced at runtime). - // - // @param scope [Module, Class] class or module this definition is inside - // @param id [String] the name of the new (or existing) module - // - // @return [Module] - Opal.allocate_module = function(name) { - var constructor = function(){}; - if (name) { - $defineProperty(constructor, 'displayName', name+'.$$constructor'); - } - - var module = constructor; - - if (name) - $defineProperty(constructor, 'displayName', name+'.constructor'); - - $defineProperty(module, '$$name', name); - $defineProperty(module, '$$prototype', constructor.prototype); - $defineProperty(module, '$$const', {}); - $defineProperty(module, '$$is_module', true); - $defineProperty(module, '$$is_a_module', true); - $defineProperty(module, '$$cvars', {}); - $defineProperty(module, '$$iclasses', []); - $defineProperty(module, '$$own_included_modules', []); - $defineProperty(module, '$$own_prepended_modules', []); - $defineProperty(module, '$$ancestors', [module]); - $defineProperty(module, '$$ancestors_cache_version', null); - - $setPrototype(module, Opal.Module.prototype); - - return module; - } - - function find_existing_module(scope, name) { - var module = const_get_name(scope, name); - if (module == null && scope === _Object) module = const_lookup_ancestors(_Object, name); - - if (module) { - if (!module.$$is_module && module !== _Object) { - throw Opal.TypeError.$new(name + " is not a module"); - } - } - - return module; - } - - Opal.module = function(scope, name) { - var module; - - if (scope == null) { - // Global scope - scope = _Object; - } else if (!scope.$$is_class && !scope.$$is_module) { - // Scope is an object, use its class - scope = scope.$$class; - } - - module = find_existing_module(scope, name); - - if (module) { - return module; - } - - // Module doesnt exist, create a new one... - module = Opal.allocate_module(name); - Opal.const_set(scope, name, module); - - return module; - } - - // Return the singleton class for the passed object. - // - // If the given object alredy has a singleton class, then it will be stored on - // the object as the `$$meta` property. If this exists, then it is simply - // returned back. - // - // Otherwise, a new singleton object for the class or object is created, set on - // the object at `$$meta` for future use, and then returned. - // - // @param object [Object] the ruby object - // @return [Class] the singleton class for object - Opal.get_singleton_class = function(object) { - if (object.$$meta) { - return object.$$meta; - } - - if (object.hasOwnProperty('$$is_class')) { - return Opal.build_class_singleton_class(object); - } else if (object.hasOwnProperty('$$is_module')) { - return Opal.build_module_singletin_class(object); - } else { - return Opal.build_object_singleton_class(object); - } - }; - - // Build the singleton class for an existing class. Class object are built - // with their singleton class already in the prototype chain and inheriting - // from their superclass object (up to `Class` itself). - // - // NOTE: Actually in MRI a class' singleton class inherits from its - // superclass' singleton class which in turn inherits from Class. - // - // @param klass [Class] - // @return [Class] - Opal.build_class_singleton_class = function(klass) { - var superclass, meta; - - if (klass.$$meta) { - return klass.$$meta; - } - - // The singleton_class superclass is the singleton_class of its superclass; - // but BasicObject has no superclass (its `$$super` is null), thus we - // fallback on `Class`. - superclass = klass === BasicObject ? Class : Opal.get_singleton_class(klass.$$super); - - meta = Opal.allocate_class(null, superclass, function(){}); - - $defineProperty(meta, '$$is_singleton', true); - $defineProperty(meta, '$$singleton_of', klass); - $defineProperty(klass, '$$meta', meta); - $setPrototype(klass, meta.$$prototype); - // Restoring ClassName.class - $defineProperty(klass, '$$class', Opal.Class); - - return meta; - }; - - Opal.build_module_singletin_class = function(mod) { - if (mod.$$meta) { - return mod.$$meta; - } - - var meta = Opal.allocate_class(null, Opal.Module, function(){}); - - $defineProperty(meta, '$$is_singleton', true); - $defineProperty(meta, '$$singleton_of', mod); - $defineProperty(mod, '$$meta', meta); - $setPrototype(mod, meta.$$prototype); - // Restoring ModuleName.class - $defineProperty(mod, '$$class', Opal.Module); - - return meta; - } - - // Build the singleton class for a Ruby (non class) Object. - // - // @param object [Object] - // @return [Class] - Opal.build_object_singleton_class = function(object) { - var superclass = object.$$class, - klass = Opal.allocate_class(nil, superclass, function(){}); - - $defineProperty(klass, '$$is_singleton', true); - $defineProperty(klass, '$$singleton_of', object); - - delete klass.$$prototype.$$class; - - $defineProperty(object, '$$meta', klass); - - $setPrototype(object, object.$$meta.$$prototype); - - return klass; - }; - - Opal.is_method = function(prop) { - return (prop[0] === '$' && prop[1] !== '$'); - } - - Opal.instance_methods = function(mod) { - var exclude = [], results = [], ancestors = Opal.ancestors(mod); - - for (var i = 0, l = ancestors.length; i < l; i++) { - var ancestor = ancestors[i], - proto = ancestor.$$prototype; - - if (proto.hasOwnProperty('$$dummy')) { - proto = proto.$$define_methods_on; - } - - var props = Object.getOwnPropertyNames(proto); - - for (var j = 0, ll = props.length; j < ll; j++) { - var prop = props[j]; - - if (Opal.is_method(prop)) { - var method_name = prop.slice(1), - method = proto[prop]; - - if (method.$$stub && exclude.indexOf(method_name) === -1) { - exclude.push(method_name); - } - - if (!method.$$stub && results.indexOf(method_name) === -1 && exclude.indexOf(method_name) === -1) { - results.push(method_name); - } - } - } - } - - return results; - } - - Opal.own_instance_methods = function(mod) { - var results = [], - proto = mod.$$prototype; - - if (proto.hasOwnProperty('$$dummy')) { - proto = proto.$$define_methods_on; - } - - var props = Object.getOwnPropertyNames(proto); - - for (var i = 0, length = props.length; i < length; i++) { - var prop = props[i]; - - if (Opal.is_method(prop)) { - var method = proto[prop]; - - if (!method.$$stub) { - var method_name = prop.slice(1); - results.push(method_name); - } - } - } - - return results; - } - - Opal.methods = function(obj) { - return Opal.instance_methods(Opal.get_singleton_class(obj)); - } - - Opal.own_methods = function(obj) { - return Opal.own_instance_methods(Opal.get_singleton_class(obj)); - } - - Opal.receiver_methods = function(obj) { - var mod = Opal.get_singleton_class(obj); - var singleton_methods = Opal.own_instance_methods(mod); - var instance_methods = Opal.own_instance_methods(mod.$$super); - return singleton_methods.concat(instance_methods); - } - - // Returns an object containing all pairs of names/values - // for all class variables defined in provided +module+ - // and its ancestors. - // - // @param module [Module] - // @return [Object] - Opal.class_variables = function(module) { - var ancestors = Opal.ancestors(module), - i, length = ancestors.length, - result = {}; - - for (i = length - 1; i >= 0; i--) { - var ancestor = ancestors[i]; - - for (var cvar in ancestor.$$cvars) { - result[cvar] = ancestor.$$cvars[cvar]; - } - } - - return result; - } - - // Sets class variable with specified +name+ to +value+ - // in provided +module+ - // - // @param module [Module] - // @param name [String] - // @param value [Object] - Opal.class_variable_set = function(module, name, value) { - var ancestors = Opal.ancestors(module), - i, length = ancestors.length; - - for (i = length - 2; i >= 0; i--) { - var ancestor = ancestors[i]; - - if ($hasOwn.call(ancestor.$$cvars, name)) { - ancestor.$$cvars[name] = value; - return value; - } - } - - module.$$cvars[name] = value; - - return value; - } - - function isRoot(proto) { - return proto.hasOwnProperty('$$iclass') && proto.hasOwnProperty('$$root'); - } - - function own_included_modules(module) { - var result = [], mod, proto = Object.getPrototypeOf(module.$$prototype); - - while (proto) { - if (proto.hasOwnProperty('$$class')) { - // superclass - break; - } - mod = protoToModule(proto); - if (mod) { - result.push(mod); - } - proto = Object.getPrototypeOf(proto); - } - - return result; - } - - function own_prepended_modules(module) { - var result = [], mod, proto = Object.getPrototypeOf(module.$$prototype); - - if (module.$$prototype.hasOwnProperty('$$dummy')) { - while (proto) { - if (proto === module.$$prototype.$$define_methods_on) { - break; - } - - mod = protoToModule(proto); - if (mod) { - result.push(mod); - } - - proto = Object.getPrototypeOf(proto); - } - } - - return result; - } - - - // The actual inclusion of a module into a class. - // - // ## Class `$$parent` and `iclass` - // - // To handle `super` calls, every class has a `$$parent`. This parent is - // used to resolve the next class for a super call. A normal class would - // have this point to its superclass. However, if a class includes a module - // then this would need to take into account the module. The module would - // also have to then point its `$$parent` to the actual superclass. We - // cannot modify modules like this, because it might be included in more - // then one class. To fix this, we actually insert an `iclass` as the class' - // `$$parent` which can then point to the superclass. The `iclass` acts as - // a proxy to the actual module, so the `super` chain can then search it for - // the required method. - // - // @param module [Module] the module to include - // @param includer [Module] the target class to include module into - // @return [null] - Opal.append_features = function(module, includer) { - var module_ancestors = Opal.ancestors(module); - var iclasses = []; - - if (module_ancestors.indexOf(includer) !== -1) { - throw Opal.ArgumentError.$new('cyclic include detected'); - } - - for (var i = 0, length = module_ancestors.length; i < length; i++) { - var ancestor = module_ancestors[i], iclass = create_iclass(ancestor); - $defineProperty(iclass, '$$included', true); - iclasses.push(iclass); - } - var includer_ancestors = Opal.ancestors(includer), - chain = chain_iclasses(iclasses), - start_chain_after, - end_chain_on; - - if (includer_ancestors.indexOf(module) === -1) { - // first time include - - // includer -> chain.first -> ...chain... -> chain.last -> includer.parent - start_chain_after = includer.$$prototype; - end_chain_on = Object.getPrototypeOf(includer.$$prototype); - } else { - // The module has been already included, - // we don't need to put it into the ancestors chain again, - // but this module may have new included modules. - // If it's true we need to copy them. - // - // The simplest way is to replace ancestors chain from - // parent - // | - // `module` iclass (has a $$root flag) - // | - // ...previos chain of module.included_modules ... - // | - // "next ancestor" (has a $$root flag or is a real class) - // - // to - // parent - // | - // `module` iclass (has a $$root flag) - // | - // ...regenerated chain of module.included_modules - // | - // "next ancestor" (has a $$root flag or is a real class) - // - // because there are no intermediate classes between `parent` and `next ancestor`. - // It doesn't break any prototypes of other objects as we don't change class references. - - var proto = includer.$$prototype, parent = proto, module_iclass = Object.getPrototypeOf(parent); - - while (module_iclass != null) { - if (isRoot(module_iclass) && module_iclass.$$module === module) { - break; - } - - parent = module_iclass; - module_iclass = Object.getPrototypeOf(module_iclass); - } - - var next_ancestor = Object.getPrototypeOf(module_iclass); - - // skip non-root iclasses (that were recursively included) - while (next_ancestor.hasOwnProperty('$$iclass') && !isRoot(next_ancestor)) { - next_ancestor = Object.getPrototypeOf(next_ancestor); - } - - start_chain_after = parent; - end_chain_on = next_ancestor; - } - - $setPrototype(start_chain_after, chain.first); - $setPrototype(chain.last, end_chain_on); - - // recalculate own_included_modules cache - includer.$$own_included_modules = own_included_modules(includer); - - Opal.const_cache_version++; - } - - Opal.prepend_features = function(module, prepender) { - // Here we change the ancestors chain from - // - // prepender - // | - // parent - // - // to: - // - // dummy(prepender) - // | - // iclass(module) - // | - // iclass(prepender) - // | - // parent - var module_ancestors = Opal.ancestors(module); - var iclasses = []; - - if (module_ancestors.indexOf(prepender) !== -1) { - throw Opal.ArgumentError.$new('cyclic prepend detected'); - } - - for (var i = 0, length = module_ancestors.length; i < length; i++) { - var ancestor = module_ancestors[i], iclass = create_iclass(ancestor); - $defineProperty(iclass, '$$prepended', true); - iclasses.push(iclass); - } - - var chain = chain_iclasses(iclasses), - dummy_prepender = prepender.$$prototype, - previous_parent = Object.getPrototypeOf(dummy_prepender), - prepender_iclass, - start_chain_after, - end_chain_on; - - if (dummy_prepender.hasOwnProperty('$$dummy')) { - // The module already has some prepended modules - // which means that we don't need to make it "dummy" - prepender_iclass = dummy_prepender.$$define_methods_on; - } else { - // Making the module "dummy" - prepender_iclass = create_dummy_iclass(prepender); - flush_methods_in(prepender); - $defineProperty(dummy_prepender, '$$dummy', true); - $defineProperty(dummy_prepender, '$$define_methods_on', prepender_iclass); - - // Converting - // dummy(prepender) -> previous_parent - // to - // dummy(prepender) -> iclass(prepender) -> previous_parent - $setPrototype(dummy_prepender, prepender_iclass); - $setPrototype(prepender_iclass, previous_parent); - } - - var prepender_ancestors = Opal.ancestors(prepender); - - if (prepender_ancestors.indexOf(module) === -1) { - // first time prepend - - start_chain_after = dummy_prepender; - - // next $$root or prepender_iclass or non-$$iclass - end_chain_on = Object.getPrototypeOf(dummy_prepender); - while (end_chain_on != null) { - if ( - end_chain_on.hasOwnProperty('$$root') || - end_chain_on === prepender_iclass || - !end_chain_on.hasOwnProperty('$$iclass') - ) { - break; - } - - end_chain_on = Object.getPrototypeOf(end_chain_on); - } - } else { - throw Opal.RuntimeError.$new("Prepending a module multiple times is not supported"); - } - - $setPrototype(start_chain_after, chain.first); - $setPrototype(chain.last, end_chain_on); - - // recalculate own_prepended_modules cache - prepender.$$own_prepended_modules = own_prepended_modules(prepender); - - Opal.const_cache_version++; - } - - function flush_methods_in(module) { - var proto = module.$$prototype, - props = Object.getOwnPropertyNames(proto); - - for (var i = 0; i < props.length; i++) { - var prop = props[i]; - if (Opal.is_method(prop)) { - delete proto[prop]; - } - } - } - - function create_iclass(module) { - var iclass = create_dummy_iclass(module); - - if (module.$$is_module) { - module.$$iclasses.push(iclass); - } - - return iclass; - } - - // Dummy iclass doesn't receive updates when the module gets a new method. - function create_dummy_iclass(module) { - var iclass = {}, - proto = module.$$prototype; - - if (proto.hasOwnProperty('$$dummy')) { - proto = proto.$$define_methods_on; - } - - var props = Object.getOwnPropertyNames(proto), - length = props.length, i; - - for (i = 0; i < length; i++) { - var prop = props[i]; - $defineProperty(iclass, prop, proto[prop]); - } - - $defineProperty(iclass, '$$iclass', true); - $defineProperty(iclass, '$$module', module); - - return iclass; - } - - function chain_iclasses(iclasses) { - var length = iclasses.length, first = iclasses[0]; - - $defineProperty(first, '$$root', true); - - if (length === 1) { - return { first: first, last: first }; - } - - var previous = first; - - for (var i = 1; i < length; i++) { - var current = iclasses[i]; - $setPrototype(previous, current); - previous = current; - } - - - return { first: iclasses[0], last: iclasses[length - 1] }; - } - - // For performance, some core Ruby classes are toll-free bridged to their - // native JavaScript counterparts (e.g. a Ruby Array is a JavaScript Array). - // - // This method is used to setup a native constructor (e.g. Array), to have - // its prototype act like a normal Ruby class. Firstly, a new Ruby class is - // created using the native constructor so that its prototype is set as the - // target for the new class. Note: all bridged classes are set to inherit - // from Object. - // - // Example: - // - // Opal.bridge(self, Function); - // - // @param klass [Class] the Ruby class to bridge - // @param constructor [JS.Function] native JavaScript constructor to use - // @return [Class] returns the passed Ruby class - // - Opal.bridge = function(native_klass, klass) { - if (native_klass.hasOwnProperty('$$bridge')) { - throw Opal.ArgumentError.$new("already bridged"); - } - - var klass_to_inject, klass_reference; - - klass_to_inject = klass.$$super || Opal.Object; - klass_reference = klass; - var original_prototype = klass.$$prototype; - - // constructor is a JS function with a prototype chain like: - // - constructor - // - super - // - // What we need to do is to inject our class (with its prototype chain) - // between constructor and super. For example, after injecting ::Object - // into JS String we get: - // - // - constructor (window.String) - // - Opal.Object - // - Opal.Kernel - // - Opal.BasicObject - // - super (window.Object) - // - null - // - $defineProperty(native_klass, '$$bridge', klass); - $setPrototype(native_klass.prototype, (klass.$$super || Opal.Object).$$prototype); - $defineProperty(klass, '$$prototype', native_klass.prototype); - - $defineProperty(klass.$$prototype, '$$class', klass); - $defineProperty(klass, '$$constructor', native_klass); - $defineProperty(klass, '$$bridge', true); - }; - - function protoToModule(proto) { - if (proto.hasOwnProperty('$$dummy')) { - return; - } else if (proto.hasOwnProperty('$$iclass')) { - return proto.$$module; - } else if (proto.hasOwnProperty('$$class')) { - return proto.$$class; - } - } - - function own_ancestors(module) { - return module.$$own_prepended_modules.concat([module]).concat(module.$$own_included_modules); - } - - // The Array of ancestors for a given module/class - Opal.ancestors = function(module) { - if (!module) { return []; } - - if (module.$$ancestors_cache_version === Opal.const_cache_version) { - return module.$$ancestors; - } - - var result = [], i, mods, length; - - for (i = 0, mods = own_ancestors(module), length = mods.length; i < length; i++) { - result.push(mods[i]); - } - - if (module.$$super) { - for (i = 0, mods = Opal.ancestors(module.$$super), length = mods.length; i < length; i++) { - result.push(mods[i]); - } - } - - module.$$ancestors_cache_version = Opal.const_cache_version; - module.$$ancestors = result; - - return result; - } - - Opal.included_modules = function(module) { - var result = [], mod = null, proto = Object.getPrototypeOf(module.$$prototype); - - for (; proto && Object.getPrototypeOf(proto); proto = Object.getPrototypeOf(proto)) { - mod = protoToModule(proto); - if (mod && mod.$$is_module && proto.$$iclass && proto.$$included) { - result.push(mod); - } - } - - return result; - } - - - // Method Missing - // -------------- - - // Methods stubs are used to facilitate method_missing in opal. A stub is a - // placeholder function which just calls `method_missing` on the receiver. - // If no method with the given name is actually defined on an object, then it - // is obvious to say that the stub will be called instead, and then in turn - // method_missing will be called. - // - // When a file in ruby gets compiled to javascript, it includes a call to - // this function which adds stubs for every method name in the compiled file. - // It should then be safe to assume that method_missing will work for any - // method call detected. - // - // Method stubs are added to the BasicObject prototype, which every other - // ruby object inherits, so all objects should handle method missing. A stub - // is only added if the given property name (method name) is not already - // defined. - // - // Note: all ruby methods have a `$` prefix in javascript, so all stubs will - // have this prefix as well (to make this method more performant). - // - // Opal.add_stubs(["$foo", "$bar", "$baz="]); - // - // All stub functions will have a private `$$stub` property set to true so - // that other internal methods can detect if a method is just a stub or not. - // `Kernel#respond_to?` uses this property to detect a methods presence. - // - // @param stubs [Array] an array of method stubs to add - // @return [undefined] - Opal.add_stubs = function(stubs) { - var proto = Opal.BasicObject.$$prototype; - - for (var i = 0, length = stubs.length; i < length; i++) { - var stub = stubs[i], existing_method = proto[stub]; - - if (existing_method == null || existing_method.$$stub) { - Opal.add_stub_for(proto, stub); - } - } - }; - - // Add a method_missing stub function to the given prototype for the - // given name. - // - // @param prototype [Prototype] the target prototype - // @param stub [String] stub name to add (e.g. "$foo") - // @return [undefined] - Opal.add_stub_for = function(prototype, stub) { - var method_missing_stub = Opal.stub_for(stub); - $defineProperty(prototype, stub, method_missing_stub); - }; - - // Generate the method_missing stub for a given method name. - // - // @param method_name [String] The js-name of the method to stub (e.g. "$foo") - // @return [undefined] - Opal.stub_for = function(method_name) { - function method_missing_stub() { - // Copy any given block onto the method_missing dispatcher - this.$method_missing.$$p = method_missing_stub.$$p; - - // Set block property to null ready for the next call (stop false-positives) - method_missing_stub.$$p = null; - - // call method missing with correct args (remove '$' prefix on method name) - var args_ary = new Array(arguments.length); - for(var i = 0, l = args_ary.length; i < l; i++) { args_ary[i] = arguments[i]; } - - return this.$method_missing.apply(this, [method_name.slice(1)].concat(args_ary)); - } - - method_missing_stub.$$stub = true; - - return method_missing_stub; - }; - - - // Methods - // ------- - - // Arity count error dispatcher for methods - // - // @param actual [Fixnum] number of arguments given to method - // @param expected [Fixnum] expected number of arguments - // @param object [Object] owner of the method +meth+ - // @param meth [String] method name that got wrong number of arguments - // @raise [ArgumentError] - Opal.ac = function(actual, expected, object, meth) { - var inspect = ''; - if (object.$$is_a_module) { - inspect += object.$$name + '.'; - } - else { - inspect += object.$$class.$$name + '#'; - } - inspect += meth; - - throw Opal.ArgumentError.$new('[' + inspect + '] wrong number of arguments(' + actual + ' for ' + expected + ')'); - }; - - // Arity count error dispatcher for blocks - // - // @param actual [Fixnum] number of arguments given to block - // @param expected [Fixnum] expected number of arguments - // @param context [Object] context of the block definition - // @raise [ArgumentError] - Opal.block_ac = function(actual, expected, context) { - var inspect = "`block in " + context + "'"; - - throw Opal.ArgumentError.$new(inspect + ': wrong number of arguments (' + actual + ' for ' + expected + ')'); - }; - - // Super dispatcher - Opal.find_super_dispatcher = function(obj, mid, current_func, defcheck, defs) { - var jsid = '$' + mid, ancestors, super_method; - - if (obj.hasOwnProperty('$$meta')) { - ancestors = Opal.ancestors(obj.$$meta); - } else { - ancestors = Opal.ancestors(obj.$$class); - } - - var current_index = ancestors.indexOf(current_func.$$owner); - - for (var i = current_index + 1; i < ancestors.length; i++) { - var ancestor = ancestors[i], - proto = ancestor.$$prototype; - - if (proto.hasOwnProperty('$$dummy')) { - proto = proto.$$define_methods_on; - } - - if (proto.hasOwnProperty(jsid)) { - var method = proto[jsid]; - - if (!method.$$stub) { - super_method = method; - } - break; - } - } - - if (!defcheck && super_method == null && Opal.Kernel.$method_missing === obj.$method_missing) { - // method_missing hasn't been explicitly defined - throw Opal.NoMethodError.$new('super: no superclass method `'+mid+"' for "+obj, mid); - } - - return super_method; - }; - - // Iter dispatcher for super in a block - Opal.find_iter_super_dispatcher = function(obj, jsid, current_func, defcheck, implicit) { - var call_jsid = jsid; - - if (!current_func) { - throw Opal.RuntimeError.$new("super called outside of method"); - } - - if (implicit && current_func.$$define_meth) { - throw Opal.RuntimeError.$new("implicit argument passing of super from method defined by define_method() is not supported. Specify all arguments explicitly"); - } - - if (current_func.$$def) { - call_jsid = current_func.$$jsid; - } - - return Opal.find_super_dispatcher(obj, call_jsid, current_func, defcheck); - }; - - // Used to return as an expression. Sometimes, we can't simply return from - // a javascript function as if we were a method, as the return is used as - // an expression, or even inside a block which must "return" to the outer - // method. This helper simply throws an error which is then caught by the - // method. This approach is expensive, so it is only used when absolutely - // needed. - // - Opal.ret = function(val) { - Opal.returner.$v = val; - throw Opal.returner; - }; - - // Used to break out of a block. - Opal.brk = function(val, breaker) { - breaker.$v = val; - throw breaker; - }; - - // Builds a new unique breaker, this is to avoid multiple nested breaks to get - // in the way of each other. - Opal.new_brk = function() { - return new Error('unexpected break'); - }; - - // handles yield calls for 1 yielded arg - Opal.yield1 = function(block, arg) { - if (typeof(block) !== "function") { - throw Opal.LocalJumpError.$new("no block given"); - } - - var has_mlhs = block.$$has_top_level_mlhs_arg, - has_trailing_comma = block.$$has_trailing_comma_in_args; - - if (block.length > 1 || ((has_mlhs || has_trailing_comma) && block.length === 1)) { - arg = Opal.to_ary(arg); - } - - if ((block.length > 1 || (has_trailing_comma && block.length === 1)) && arg.$$is_array) { - return block.apply(null, arg); - } - else { - return block(arg); - } - }; - - // handles yield for > 1 yielded arg - Opal.yieldX = function(block, args) { - if (typeof(block) !== "function") { - throw Opal.LocalJumpError.$new("no block given"); - } - - if (block.length > 1 && args.length === 1) { - if (args[0].$$is_array) { - return block.apply(null, args[0]); - } - } - - if (!args.$$is_array) { - var args_ary = new Array(args.length); - for(var i = 0, l = args_ary.length; i < l; i++) { args_ary[i] = args[i]; } - - return block.apply(null, args_ary); - } - - return block.apply(null, args); - }; - - // Finds the corresponding exception match in candidates. Each candidate can - // be a value, or an array of values. Returns null if not found. - Opal.rescue = function(exception, candidates) { - for (var i = 0; i < candidates.length; i++) { - var candidate = candidates[i]; - - if (candidate.$$is_array) { - var result = Opal.rescue(exception, candidate); - - if (result) { - return result; - } - } - else if (candidate === Opal.JS.Error) { - return candidate; - } - else if (candidate['$==='](exception)) { - return candidate; - } - } - - return null; - }; - - Opal.is_a = function(object, klass) { - if (klass != null && object.$$meta === klass || object.$$class === klass) { - return true; - } - - if (object.$$is_number && klass.$$is_number_class) { - return true; - } - - var i, length, ancestors = Opal.ancestors(object.$$is_class ? Opal.get_singleton_class(object) : (object.$$meta || object.$$class)); - - for (i = 0, length = ancestors.length; i < length; i++) { - if (ancestors[i] === klass) { - return true; - } - } - - return false; - }; - - // Helpers for extracting kwsplats - // Used for: { **h } - Opal.to_hash = function(value) { - if (value.$$is_hash) { - return value; - } - else if (value['$respond_to?']('to_hash', true)) { - var hash = value.$to_hash(); - if (hash.$$is_hash) { - return hash; - } - else { - throw Opal.TypeError.$new("Can't convert " + value.$$class + - " to Hash (" + value.$$class + "#to_hash gives " + hash.$$class + ")"); - } - } - else { - throw Opal.TypeError.$new("no implicit conversion of " + value.$$class + " into Hash"); - } - }; - - // Helpers for implementing multiple assignment - // Our code for extracting the values and assigning them only works if the - // return value is a JS array. - // So if we get an Array subclass, extract the wrapped JS array from it - - // Used for: a, b = something (no splat) - Opal.to_ary = function(value) { - if (value.$$is_array) { - return value; - } - else if (value['$respond_to?']('to_ary', true)) { - var ary = value.$to_ary(); - if (ary === nil) { - return [value]; - } - else if (ary.$$is_array) { - return ary; - } - else { - throw Opal.TypeError.$new("Can't convert " + value.$$class + - " to Array (" + value.$$class + "#to_ary gives " + ary.$$class + ")"); - } - } - else { - return [value]; - } - }; - - // Used for: a, b = *something (with splat) - Opal.to_a = function(value) { - if (value.$$is_array) { - // A splatted array must be copied - return value.slice(); - } - else if (value['$respond_to?']('to_a', true)) { - var ary = value.$to_a(); - if (ary === nil) { - return [value]; - } - else if (ary.$$is_array) { - return ary; - } - else { - throw Opal.TypeError.$new("Can't convert " + value.$$class + - " to Array (" + value.$$class + "#to_a gives " + ary.$$class + ")"); - } - } - else { - return [value]; - } - }; - - // Used for extracting keyword arguments from arguments passed to - // JS function. If provided +arguments+ list doesn't have a Hash - // as a last item, returns a blank Hash. - // - // @param parameters [Array] - // @return [Hash] - // - Opal.extract_kwargs = function(parameters) { - var kwargs = parameters[parameters.length - 1]; - if (kwargs != null && kwargs['$respond_to?']('to_hash', true)) { - $splice.call(parameters, parameters.length - 1, 1); - return kwargs.$to_hash(); - } - else { - return Opal.hash2([], {}); - } - } - - // Used to get a list of rest keyword arguments. Method takes the given - // keyword args, i.e. the hash literal passed to the method containing all - // keyword arguemnts passed to method, as well as the used args which are - // the names of required and optional arguments defined. This method then - // just returns all key/value pairs which have not been used, in a new - // hash literal. - // - // @param given_args [Hash] all kwargs given to method - // @param used_args [Object<String: true>] all keys used as named kwargs - // @return [Hash] - // - Opal.kwrestargs = function(given_args, used_args) { - var keys = [], - map = {}, - key = null, - given_map = given_args.$$smap; - - for (key in given_map) { - if (!used_args[key]) { - keys.push(key); - map[key] = given_map[key]; - } - } - - return Opal.hash2(keys, map); - }; - - // Calls passed method on a ruby object with arguments and block: - // - // Can take a method or a method name. - // - // 1. When method name gets passed it invokes it by its name - // and calls 'method_missing' when object doesn't have this method. - // Used internally by Opal to invoke method that takes a block or a splat. - // 2. When method (i.e. method body) gets passed, it doesn't trigger 'method_missing' - // because it doesn't know the name of the actual method. - // Used internally by Opal to invoke 'super'. - // - // @example - // var my_array = [1, 2, 3, 4] - // Opal.send(my_array, 'length') # => 4 - // Opal.send(my_array, my_array.$length) # => 4 - // - // Opal.send(my_array, 'reverse!') # => [4, 3, 2, 1] - // Opal.send(my_array, my_array['$reverse!']') # => [4, 3, 2, 1] - // - // @param recv [Object] ruby object - // @param method [Function, String] method body or name of the method - // @param args [Array] arguments that will be passed to the method call - // @param block [Function] ruby block - // @return [Object] returning value of the method call - Opal.send = function(recv, method, args, block) { - var body = (typeof(method) === 'string') ? recv['$'+method] : method; - - if (body != null) { - if (typeof block === 'function') { - body.$$p = block; - } - return body.apply(recv, args); - } - - return recv.$method_missing.apply(recv, [method].concat(args)); - } - - Opal.lambda = function(block) { - block.$$is_lambda = true; - return block; - } - - // Used to define methods on an object. This is a helper method, used by the - // compiled source to define methods on special case objects when the compiler - // can not determine the destination object, or the object is a Module - // instance. This can get called by `Module#define_method` as well. - // - // ## Modules - // - // Any method defined on a module will come through this runtime helper. - // The method is added to the module body, and the owner of the method is - // set to be the module itself. This is used later when choosing which - // method should show on a class if more than 1 included modules define - // the same method. Finally, if the module is in `module_function` mode, - // then the method is also defined onto the module itself. - // - // ## Classes - // - // This helper will only be called for classes when a method is being - // defined indirectly; either through `Module#define_method`, or by a - // literal `def` method inside an `instance_eval` or `class_eval` body. In - // either case, the method is simply added to the class' prototype. A special - // exception exists for `BasicObject` and `Object`. These two classes are - // special because they are used in toll-free bridged classes. In each of - // these two cases, extra work is required to define the methods on toll-free - // bridged class' prototypes as well. - // - // ## Objects - // - // If a simple ruby object is the object, then the method is simply just - // defined on the object as a singleton method. This would be the case when - // a method is defined inside an `instance_eval` block. - // - // @param obj [Object, Class] the actual obj to define method for - // @param jsid [String] the JavaScript friendly method name (e.g. '$foo') - // @param body [JS.Function] the literal JavaScript function used as method - // @return [null] - // - Opal.def = function(obj, jsid, body) { - // Special case for a method definition in the - // top-level namespace - if (obj === Opal.top) { - Opal.defn(Opal.Object, jsid, body) - } - // if instance_eval is invoked on a module/class, it sets inst_eval_mod - else if (!obj.$$eval && obj.$$is_a_module) { - Opal.defn(obj, jsid, body); - } - else { - Opal.defs(obj, jsid, body); - } - }; - - // Define method on a module or class (see Opal.def). - Opal.defn = function(module, jsid, body) { - body.displayName = jsid; - body.$$owner = module; - - var proto = module.$$prototype; - if (proto.hasOwnProperty('$$dummy')) { - proto = proto.$$define_methods_on; - } - $defineProperty(proto, jsid, body); - - if (module.$$is_module) { - if (module.$$module_function) { - Opal.defs(module, jsid, body) - } - - for (var i = 0, iclasses = module.$$iclasses, length = iclasses.length; i < length; i++) { - var iclass = iclasses[i]; - $defineProperty(iclass, jsid, body); - } - } - - var singleton_of = module.$$singleton_of; - if (module.$method_added && !module.$method_added.$$stub && !singleton_of) { - module.$method_added(jsid.substr(1)); - } - else if (singleton_of && singleton_of.$singleton_method_added && !singleton_of.$singleton_method_added.$$stub) { - singleton_of.$singleton_method_added(jsid.substr(1)); - } - } - - // Define a singleton method on the given object (see Opal.def). - Opal.defs = function(obj, jsid, body) { - if (obj.$$is_string || obj.$$is_number) { - throw Opal.TypeError.$new("can't define singleton"); - } - Opal.defn(Opal.get_singleton_class(obj), jsid, body) - }; - - // Called from #remove_method. - Opal.rdef = function(obj, jsid) { - if (!$hasOwn.call(obj.$$prototype, jsid)) { - throw Opal.NameError.$new("method '" + jsid.substr(1) + "' not defined in " + obj.$name()); - } - - delete obj.$$prototype[jsid]; - - if (obj.$$is_singleton) { - if (obj.$$prototype.$singleton_method_removed && !obj.$$prototype.$singleton_method_removed.$$stub) { - obj.$$prototype.$singleton_method_removed(jsid.substr(1)); - } - } - else { - if (obj.$method_removed && !obj.$method_removed.$$stub) { - obj.$method_removed(jsid.substr(1)); - } - } - }; - - // Called from #undef_method. - Opal.udef = function(obj, jsid) { - if (!obj.$$prototype[jsid] || obj.$$prototype[jsid].$$stub) { - throw Opal.NameError.$new("method '" + jsid.substr(1) + "' not defined in " + obj.$name()); - } - - Opal.add_stub_for(obj.$$prototype, jsid); - - if (obj.$$is_singleton) { - if (obj.$$prototype.$singleton_method_undefined && !obj.$$prototype.$singleton_method_undefined.$$stub) { - obj.$$prototype.$singleton_method_undefined(jsid.substr(1)); - } - } - else { - if (obj.$method_undefined && !obj.$method_undefined.$$stub) { - obj.$method_undefined(jsid.substr(1)); - } - } - }; - - function is_method_body(body) { - return (typeof(body) === "function" && !body.$$stub); - } - - Opal.alias = function(obj, name, old) { - var id = '$' + name, - old_id = '$' + old, - body = obj.$$prototype['$' + old], - alias; - - // When running inside #instance_eval the alias refers to class methods. - if (obj.$$eval) { - return Opal.alias(Opal.get_singleton_class(obj), name, old); - } - - if (!is_method_body(body)) { - var ancestor = obj.$$super; - - while (typeof(body) !== "function" && ancestor) { - body = ancestor[old_id]; - ancestor = ancestor.$$super; - } - - if (!is_method_body(body) && obj.$$is_module) { - // try to look into Object - body = Opal.Object.$$prototype[old_id] - } - - if (!is_method_body(body)) { - throw Opal.NameError.$new("undefined method `" + old + "' for class `" + obj.$name() + "'") - } - } - - // If the body is itself an alias use the original body - // to keep the max depth at 1. - if (body.$$alias_of) body = body.$$alias_of; - - // We need a wrapper because otherwise properties - // would be ovrewritten on the original body. - alias = function() { - var block = alias.$$p, args, i, ii; - - args = new Array(arguments.length); - for(i = 0, ii = arguments.length; i < ii; i++) { - args[i] = arguments[i]; - } - - if (block != null) { alias.$$p = null } - - return Opal.send(this, body, args, block); - }; - - // Try to make the browser pick the right name - alias.displayName = name; - alias.length = body.length; - alias.$$arity = body.$$arity; - alias.$$parameters = body.$$parameters; - alias.$$source_location = body.$$source_location; - alias.$$alias_of = body; - alias.$$alias_name = name; - - Opal.defn(obj, id, alias); - - return obj; - }; - - Opal.alias_native = function(obj, name, native_name) { - var id = '$' + name, - body = obj.$$prototype[native_name]; - - if (typeof(body) !== "function" || body.$$stub) { - throw Opal.NameError.$new("undefined native method `" + native_name + "' for class `" + obj.$name() + "'") - } - - Opal.defn(obj, id, body); - - return obj; - }; - - - // Hashes - // ------ - - Opal.hash_init = function(hash) { - hash.$$smap = Object.create(null); - hash.$$map = Object.create(null); - hash.$$keys = []; - }; - - Opal.hash_clone = function(from_hash, to_hash) { - to_hash.$$none = from_hash.$$none; - to_hash.$$proc = from_hash.$$proc; - - for (var i = 0, keys = from_hash.$$keys, smap = from_hash.$$smap, len = keys.length, key, value; i < len; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = smap[key]; - } else { - value = key.value; - key = key.key; - } - - Opal.hash_put(to_hash, key, value); - } - }; - - Opal.hash_put = function(hash, key, value) { - if (key.$$is_string) { - if (!$hasOwn.call(hash.$$smap, key)) { - hash.$$keys.push(key); - } - hash.$$smap[key] = value; - return; - } - - var key_hash, bucket, last_bucket; - key_hash = hash.$$by_identity ? Opal.id(key) : key.$hash(); - - if (!$hasOwn.call(hash.$$map, key_hash)) { - bucket = {key: key, key_hash: key_hash, value: value}; - hash.$$keys.push(bucket); - hash.$$map[key_hash] = bucket; - return; - } - - bucket = hash.$$map[key_hash]; - - while (bucket) { - if (key === bucket.key || key['$eql?'](bucket.key)) { - last_bucket = undefined; - bucket.value = value; - break; - } - last_bucket = bucket; - bucket = bucket.next; - } - - if (last_bucket) { - bucket = {key: key, key_hash: key_hash, value: value}; - hash.$$keys.push(bucket); - last_bucket.next = bucket; - } - }; - - Opal.hash_get = function(hash, key) { - if (key.$$is_string) { - if ($hasOwn.call(hash.$$smap, key)) { - return hash.$$smap[key]; - } - return; - } - - var key_hash, bucket; - key_hash = hash.$$by_identity ? Opal.id(key) : key.$hash(); - - if ($hasOwn.call(hash.$$map, key_hash)) { - bucket = hash.$$map[key_hash]; - - while (bucket) { - if (key === bucket.key || key['$eql?'](bucket.key)) { - return bucket.value; - } - bucket = bucket.next; - } - } - }; - - Opal.hash_delete = function(hash, key) { - var i, keys = hash.$$keys, length = keys.length, value; - - if (key.$$is_string) { - if (!$hasOwn.call(hash.$$smap, key)) { - return; - } - - for (i = 0; i < length; i++) { - if (keys[i] === key) { - keys.splice(i, 1); - break; - } - } - - value = hash.$$smap[key]; - delete hash.$$smap[key]; - return value; - } - - var key_hash = key.$hash(); - - if (!$hasOwn.call(hash.$$map, key_hash)) { - return; - } - - var bucket = hash.$$map[key_hash], last_bucket; - - while (bucket) { - if (key === bucket.key || key['$eql?'](bucket.key)) { - value = bucket.value; - - for (i = 0; i < length; i++) { - if (keys[i] === bucket) { - keys.splice(i, 1); - break; - } - } - - if (last_bucket && bucket.next) { - last_bucket.next = bucket.next; - } - else if (last_bucket) { - delete last_bucket.next; - } - else if (bucket.next) { - hash.$$map[key_hash] = bucket.next; - } - else { - delete hash.$$map[key_hash]; - } - - return value; - } - last_bucket = bucket; - bucket = bucket.next; - } - }; - - Opal.hash_rehash = function(hash) { - for (var i = 0, length = hash.$$keys.length, key_hash, bucket, last_bucket; i < length; i++) { - - if (hash.$$keys[i].$$is_string) { - continue; - } - - key_hash = hash.$$keys[i].key.$hash(); - - if (key_hash === hash.$$keys[i].key_hash) { - continue; - } - - bucket = hash.$$map[hash.$$keys[i].key_hash]; - last_bucket = undefined; - - while (bucket) { - if (bucket === hash.$$keys[i]) { - if (last_bucket && bucket.next) { - last_bucket.next = bucket.next; - } - else if (last_bucket) { - delete last_bucket.next; - } - else if (bucket.next) { - hash.$$map[hash.$$keys[i].key_hash] = bucket.next; - } - else { - delete hash.$$map[hash.$$keys[i].key_hash]; - } - break; - } - last_bucket = bucket; - bucket = bucket.next; - } - - hash.$$keys[i].key_hash = key_hash; - - if (!$hasOwn.call(hash.$$map, key_hash)) { - hash.$$map[key_hash] = hash.$$keys[i]; - continue; - } - - bucket = hash.$$map[key_hash]; - last_bucket = undefined; - - while (bucket) { - if (bucket === hash.$$keys[i]) { - last_bucket = undefined; - break; - } - last_bucket = bucket; - bucket = bucket.next; - } - - if (last_bucket) { - last_bucket.next = hash.$$keys[i]; - } - } - }; - - Opal.hash = function() { - var arguments_length = arguments.length, args, hash, i, length, key, value; - - if (arguments_length === 1 && arguments[0].$$is_hash) { - return arguments[0]; - } - - hash = new Opal.Hash(); - Opal.hash_init(hash); - - if (arguments_length === 1 && arguments[0].$$is_array) { - args = arguments[0]; - length = args.length; - - for (i = 0; i < length; i++) { - if (args[i].length !== 2) { - throw Opal.ArgumentError.$new("value not of length 2: " + args[i].$inspect()); - } - - key = args[i][0]; - value = args[i][1]; - - Opal.hash_put(hash, key, value); - } - - return hash; - } - - if (arguments_length === 1) { - args = arguments[0]; - for (key in args) { - if ($hasOwn.call(args, key)) { - value = args[key]; - - Opal.hash_put(hash, key, value); - } - } - - return hash; - } - - if (arguments_length % 2 !== 0) { - throw Opal.ArgumentError.$new("odd number of arguments for Hash"); - } - - for (i = 0; i < arguments_length; i += 2) { - key = arguments[i]; - value = arguments[i + 1]; - - Opal.hash_put(hash, key, value); - } - - return hash; - }; - - // A faster Hash creator for hashes that just use symbols and - // strings as keys. The map and keys array can be constructed at - // compile time, so they are just added here by the constructor - // function. - // - Opal.hash2 = function(keys, smap) { - var hash = new Opal.Hash(); - - hash.$$smap = smap; - hash.$$map = Object.create(null); - hash.$$keys = keys; - - return hash; - }; - - // Create a new range instance with first and last values, and whether the - // range excludes the last value. - // - Opal.range = function(first, last, exc) { - var range = new Opal.Range(); - range.begin = first; - range.end = last; - range.excl = exc; - - return range; - }; - - // Get the ivar name for a given name. - // Mostly adds a trailing $ to reserved names. - // - Opal.ivar = function(name) { - if ( - // properties - name === "constructor" || - name === "displayName" || - name === "__count__" || - name === "__noSuchMethod__" || - name === "__parent__" || - name === "__proto__" || - - // methods - name === "hasOwnProperty" || - name === "valueOf" - ) - { - return name + "$"; - } - - return name; - }; - - - // Regexps - // ------- - - // Escape Regexp special chars letting the resulting string be used to build - // a new Regexp. - // - Opal.escape_regexp = function(str) { - return str.replace(/([-[\]\/{}()*+?.^$\\| ])/g, '\\$1') - .replace(/[\n]/g, '\\n') - .replace(/[\r]/g, '\\r') - .replace(/[\f]/g, '\\f') - .replace(/[\t]/g, '\\t'); - }; - - // Create a global Regexp from a RegExp object and cache the result - // on the object itself ($$g attribute). - // - Opal.global_regexp = function(pattern) { - if (pattern.global) { - return pattern; // RegExp already has the global flag - } - if (pattern.$$g == null) { - pattern.$$g = new RegExp(pattern.source, (pattern.multiline ? 'gm' : 'g') + (pattern.ignoreCase ? 'i' : '')); - } else { - pattern.$$g.lastIndex = null; // reset lastIndex property - } - return pattern.$$g; - }; - - // Create a global multiline Regexp from a RegExp object and cache the result - // on the object itself ($$gm or $$g attribute). - // - Opal.global_multiline_regexp = function(pattern) { - var result; - if (pattern.multiline) { - if (pattern.global) { - return pattern; // RegExp already has the global and multiline flag - } - // we are using the $$g attribute because the Regexp is already multiline - if (pattern.$$g != null) { - result = pattern.$$g; - } else { - result = pattern.$$g = new RegExp(pattern.source, 'gm' + (pattern.ignoreCase ? 'i' : '')); - } - } else if (pattern.$$gm != null) { - result = pattern.$$gm; - } else { - result = pattern.$$gm = new RegExp(pattern.source, 'gm' + (pattern.ignoreCase ? 'i' : '')); - } - result.lastIndex = null; // reset lastIndex property - return result; - }; - - // Require system - // -------------- - - Opal.modules = {}; - Opal.loaded_features = ['corelib/runtime']; - Opal.current_dir = '.'; - Opal.require_table = {'corelib/runtime': true}; - - Opal.normalize = function(path) { - var parts, part, new_parts = [], SEPARATOR = '/'; - - if (Opal.current_dir !== '.') { - path = Opal.current_dir.replace(/\/*$/, '/') + path; - } - - path = path.replace(/^\.\//, ''); - path = path.replace(/\.(rb|opal|js)$/, ''); - parts = path.split(SEPARATOR); - - for (var i = 0, ii = parts.length; i < ii; i++) { - part = parts[i]; - if (part === '') continue; - (part === '..') ? new_parts.pop() : new_parts.push(part) - } - - return new_parts.join(SEPARATOR); - }; - - Opal.loaded = function(paths) { - var i, l, path; - - for (i = 0, l = paths.length; i < l; i++) { - path = Opal.normalize(paths[i]); - - if (Opal.require_table[path]) { - continue; - } - - Opal.loaded_features.push(path); - Opal.require_table[path] = true; - } - }; - - Opal.load = function(path) { - path = Opal.normalize(path); - - Opal.loaded([path]); - - var module = Opal.modules[path]; - - if (module) { - module(Opal); - } - else { - var severity = Opal.config.missing_require_severity; - var message = 'cannot load such file -- ' + path; - - if (severity === "error") { - if (Opal.LoadError) { - throw Opal.LoadError.$new(message) - } else { - throw message - } - } - else if (severity === "warning") { - console.warn('WARNING: LoadError: ' + message); - } - } - - return true; - }; - - Opal.require = function(path) { - path = Opal.normalize(path); - - if (Opal.require_table[path]) { - return false; - } - - return Opal.load(path); - }; - - - // Strings - // ------- - - Opal.encodings = Object.create(null); - - // Sets the encoding on a string, will treat string literals as frozen strings - // raising a FrozenError. - // @param str [String] the string on which the encoding should be set. - // @param name [String] the canonical name of the encoding - Opal.set_encoding = function(str, name) { - if (typeof str === 'string') - throw Opal.FrozenError.$new("can't modify frozen String"); - - var encoding = Opal.encodings[name]; - - if (encoding === str.encoding) { return str; } - - str.encoding = encoding; - - return str; - }; - - // @returns a String object with the encoding set from a string literal - Opal.enc = function(str, name) { - var dup = new String(str); - Opal.set_encoding(dup, name); - dup.internal_encoding = dup.encoding; - return dup - } - - - // Initialization - // -------------- - function $BasicObject() {}; - function $Object() {}; - function $Module() {}; - function $Class() {}; - - Opal.BasicObject = BasicObject = Opal.allocate_class('BasicObject', null, $BasicObject); - Opal.Object = _Object = Opal.allocate_class('Object', Opal.BasicObject, $Object); - Opal.Module = Module = Opal.allocate_class('Module', Opal.Object, $Module); - Opal.Class = Class = Opal.allocate_class('Class', Opal.Module, $Class); - - $setPrototype(Opal.BasicObject, Opal.Class.$$prototype); - $setPrototype(Opal.Object, Opal.Class.$$prototype); - $setPrototype(Opal.Module, Opal.Class.$$prototype); - $setPrototype(Opal.Class, Opal.Class.$$prototype); - - // BasicObject can reach itself, avoid const_set to skip the $$base_module logic - BasicObject.$$const["BasicObject"] = BasicObject; - - // Assign basic constants - Opal.const_set(_Object, "BasicObject", BasicObject); - Opal.const_set(_Object, "Object", _Object); - Opal.const_set(_Object, "Module", Module); - Opal.const_set(_Object, "Class", Class); - - // Fix booted classes to have correct .class value - BasicObject.$$class = Class; - _Object.$$class = Class; - Module.$$class = Class; - Class.$$class = Class; - - // Forward .toString() to #to_s - $defineProperty(_Object.$$prototype, 'toString', function() { - var to_s = this.$to_s(); - if (to_s.$$is_string && typeof(to_s) === 'object') { - // a string created using new String('string') - return to_s.valueOf(); - } else { - return to_s; - } - }); - - // Make Kernel#require immediately available as it's needed to require all the - // other corelib files. - $defineProperty(_Object.$$prototype, '$require', Opal.require); - - // Add a short helper to navigate constants manually. - // @example - // Opal.$$.Regexp.$$.IGNORECASE - Opal.$$ = _Object.$$; - - // Instantiate the main object - Opal.top = new _Object(); - Opal.top.$to_s = Opal.top.$inspect = function() { return 'main' }; - - - // Nil - function $NilClass() {}; - Opal.NilClass = Opal.allocate_class('NilClass', Opal.Object, $NilClass); - Opal.const_set(_Object, 'NilClass', Opal.NilClass); - nil = Opal.nil = new Opal.NilClass(); - nil.$$id = nil_id; - nil.call = nil.apply = function() { throw Opal.LocalJumpError.$new('no block given'); }; - - // Errors - Opal.breaker = new Error('unexpected break (old)'); - Opal.returner = new Error('unexpected return'); - TypeError.$$super = Error; -}).call(this); -Opal.loaded(["corelib/runtime.js"]); -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/helpers"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy; - - Opal.add_stubs(['$new', '$class', '$===', '$respond_to?', '$raise', '$type_error', '$__send__', '$coerce_to', '$nil?', '$<=>', '$coerce_to!', '$!=', '$[]', '$upcase']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Opal'); - - var $nesting = [self].concat($parent_nesting), $Opal_bridge$1, $Opal_type_error$2, $Opal_coerce_to$3, $Opal_coerce_to$excl$4, $Opal_coerce_to$ques$5, $Opal_try_convert$6, $Opal_compare$7, $Opal_destructure$8, $Opal_respond_to$ques$9, $Opal_inspect_obj$10, $Opal_instance_variable_name$excl$11, $Opal_class_variable_name$excl$12, $Opal_const_name$excl$13, $Opal_pristine$14; - - - Opal.defs(self, '$bridge', $Opal_bridge$1 = function $$bridge(constructor, klass) { - var self = this; - - return Opal.bridge(constructor, klass); - }, $Opal_bridge$1.$$arity = 2); - Opal.defs(self, '$type_error', $Opal_type_error$2 = function $$type_error(object, type, method, coerced) { - var $a, self = this; - - - - if (method == null) { - method = nil; - }; - - if (coerced == null) { - coerced = nil; - }; - if ($truthy(($truthy($a = method) ? coerced : $a))) { - return $$($nesting, 'TypeError').$new("" + "can't convert " + (object.$class()) + " into " + (type) + " (" + (object.$class()) + "#" + (method) + " gives " + (coerced.$class()) + ")") - } else { - return $$($nesting, 'TypeError').$new("" + "no implicit conversion of " + (object.$class()) + " into " + (type)) - }; - }, $Opal_type_error$2.$$arity = -3); - Opal.defs(self, '$coerce_to', $Opal_coerce_to$3 = function $$coerce_to(object, type, method) { - var self = this; - - - if ($truthy(type['$==='](object))) { - return object}; - if ($truthy(object['$respond_to?'](method))) { - } else { - self.$raise(self.$type_error(object, type)) - }; - return object.$__send__(method); - }, $Opal_coerce_to$3.$$arity = 3); - Opal.defs(self, '$coerce_to!', $Opal_coerce_to$excl$4 = function(object, type, method) { - var self = this, coerced = nil; - - - coerced = self.$coerce_to(object, type, method); - if ($truthy(type['$==='](coerced))) { - } else { - self.$raise(self.$type_error(object, type, method, coerced)) - }; - return coerced; - }, $Opal_coerce_to$excl$4.$$arity = 3); - Opal.defs(self, '$coerce_to?', $Opal_coerce_to$ques$5 = function(object, type, method) { - var self = this, coerced = nil; - - - if ($truthy(object['$respond_to?'](method))) { - } else { - return nil - }; - coerced = self.$coerce_to(object, type, method); - if ($truthy(coerced['$nil?']())) { - return nil}; - if ($truthy(type['$==='](coerced))) { - } else { - self.$raise(self.$type_error(object, type, method, coerced)) - }; - return coerced; - }, $Opal_coerce_to$ques$5.$$arity = 3); - Opal.defs(self, '$try_convert', $Opal_try_convert$6 = function $$try_convert(object, type, method) { - var self = this; - - - if ($truthy(type['$==='](object))) { - return object}; - if ($truthy(object['$respond_to?'](method))) { - return object.$__send__(method) - } else { - return nil - }; - }, $Opal_try_convert$6.$$arity = 3); - Opal.defs(self, '$compare', $Opal_compare$7 = function $$compare(a, b) { - var self = this, compare = nil; - - - compare = a['$<=>'](b); - if ($truthy(compare === nil)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (a.$class()) + " with " + (b.$class()) + " failed")}; - return compare; - }, $Opal_compare$7.$$arity = 2); - Opal.defs(self, '$destructure', $Opal_destructure$8 = function $$destructure(args) { - var self = this; - - - if (args.length == 1) { - return args[0]; - } - else if (args.$$is_array) { - return args; - } - else { - var args_ary = new Array(args.length); - for(var i = 0, l = args_ary.length; i < l; i++) { args_ary[i] = args[i]; } - - return args_ary; - } - - }, $Opal_destructure$8.$$arity = 1); - Opal.defs(self, '$respond_to?', $Opal_respond_to$ques$9 = function(obj, method, include_all) { - var self = this; - - - - if (include_all == null) { - include_all = false; - }; - - if (obj == null || !obj.$$class) { - return false; - } - ; - return obj['$respond_to?'](method, include_all); - }, $Opal_respond_to$ques$9.$$arity = -3); - Opal.defs(self, '$inspect_obj', $Opal_inspect_obj$10 = function $$inspect_obj(obj) { - var self = this; - - return Opal.inspect(obj); - }, $Opal_inspect_obj$10.$$arity = 1); - Opal.defs(self, '$instance_variable_name!', $Opal_instance_variable_name$excl$11 = function(name) { - var self = this; - - - name = $$($nesting, 'Opal')['$coerce_to!'](name, $$($nesting, 'String'), "to_str"); - if ($truthy(/^@[a-zA-Z_][a-zA-Z0-9_]*?$/.test(name))) { - } else { - self.$raise($$($nesting, 'NameError').$new("" + "'" + (name) + "' is not allowed as an instance variable name", name)) - }; - return name; - }, $Opal_instance_variable_name$excl$11.$$arity = 1); - Opal.defs(self, '$class_variable_name!', $Opal_class_variable_name$excl$12 = function(name) { - var self = this; - - - name = $$($nesting, 'Opal')['$coerce_to!'](name, $$($nesting, 'String'), "to_str"); - if ($truthy(name.length < 3 || name.slice(0,2) !== '@@')) { - self.$raise($$($nesting, 'NameError').$new("" + "`" + (name) + "' is not allowed as a class variable name", name))}; - return name; - }, $Opal_class_variable_name$excl$12.$$arity = 1); - Opal.defs(self, '$const_name!', $Opal_const_name$excl$13 = function(const_name) { - var self = this; - - - const_name = $$($nesting, 'Opal')['$coerce_to!'](const_name, $$($nesting, 'String'), "to_str"); - if ($truthy(const_name['$[]'](0)['$!='](const_name['$[]'](0).$upcase()))) { - self.$raise($$($nesting, 'NameError'), "" + "wrong constant name " + (const_name))}; - return const_name; - }, $Opal_const_name$excl$13.$$arity = 1); - Opal.defs(self, '$pristine', $Opal_pristine$14 = function $$pristine(owner_class, $a) { - var $post_args, method_names, self = this; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - method_names = $post_args;; - - var method_name, method; - for (var i = method_names.length - 1; i >= 0; i--) { - method_name = method_names[i]; - method = owner_class.$$prototype['$'+method_name]; - - if (method && !method.$$stub) { - method.$$pristine = true; - } - } - ; - return nil; - }, $Opal_pristine$14.$$arity = -2); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/module"] = function(Opal) { - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $lambda = Opal.lambda, $range = Opal.range, $hash2 = Opal.hash2; - - Opal.add_stubs(['$module_eval', '$to_proc', '$===', '$raise', '$equal?', '$<', '$>', '$nil?', '$attr_reader', '$attr_writer', '$class_variable_name!', '$new', '$const_name!', '$=~', '$inject', '$split', '$const_get', '$==', '$!~', '$start_with?', '$bind', '$call', '$class', '$append_features', '$included', '$name', '$cover?', '$size', '$merge', '$compile', '$proc', '$any?', '$prepend_features', '$prepended', '$to_s', '$__id__', '$constants', '$include?', '$copy_class_variables', '$copy_constants']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Module'); - - var $nesting = [self].concat($parent_nesting), $Module_allocate$1, $Module_initialize$2, $Module_$eq_eq_eq$3, $Module_$lt$4, $Module_$lt_eq$5, $Module_$gt$6, $Module_$gt_eq$7, $Module_$lt_eq_gt$8, $Module_alias_method$9, $Module_alias_native$10, $Module_ancestors$11, $Module_append_features$12, $Module_attr_accessor$13, $Module_attr_reader$14, $Module_attr_writer$15, $Module_autoload$16, $Module_class_variables$17, $Module_class_variable_get$18, $Module_class_variable_set$19, $Module_class_variable_defined$ques$20, $Module_remove_class_variable$21, $Module_constants$22, $Module_constants$23, $Module_nesting$24, $Module_const_defined$ques$25, $Module_const_get$26, $Module_const_missing$28, $Module_const_set$29, $Module_public_constant$30, $Module_define_method$31, $Module_remove_method$33, $Module_singleton_class$ques$34, $Module_include$35, $Module_included_modules$36, $Module_include$ques$37, $Module_instance_method$38, $Module_instance_methods$39, $Module_included$40, $Module_extended$41, $Module_extend_object$42, $Module_method_added$43, $Module_method_removed$44, $Module_method_undefined$45, $Module_module_eval$46, $Module_module_exec$48, $Module_method_defined$ques$49, $Module_module_function$50, $Module_name$51, $Module_prepend$52, $Module_prepend_features$53, $Module_prepended$54, $Module_remove_const$55, $Module_to_s$56, $Module_undef_method$57, $Module_instance_variables$58, $Module_dup$59, $Module_copy_class_variables$60, $Module_copy_constants$61; - - - Opal.defs(self, '$allocate', $Module_allocate$1 = function $$allocate() { - var self = this; - - - var module = Opal.allocate_module(nil, function(){}); - // Link the prototype of Module subclasses - if (self !== Opal.Module) Object.setPrototypeOf(module, self.$$prototype); - return module; - - }, $Module_allocate$1.$$arity = 0); - - Opal.def(self, '$initialize', $Module_initialize$2 = function $$initialize() { - var $iter = $Module_initialize$2.$$p, block = $iter || nil, self = this; - - if ($iter) $Module_initialize$2.$$p = null; - - - if ($iter) $Module_initialize$2.$$p = null;; - if ((block !== nil)) { - return $send(self, 'module_eval', [], block.$to_proc()) - } else { - return nil - }; - }, $Module_initialize$2.$$arity = 0); - - Opal.def(self, '$===', $Module_$eq_eq_eq$3 = function(object) { - var self = this; - - - if ($truthy(object == null)) { - return false}; - return Opal.is_a(object, self);; - }, $Module_$eq_eq_eq$3.$$arity = 1); - - Opal.def(self, '$<', $Module_$lt$4 = function(other) { - var self = this; - - - if ($truthy($$($nesting, 'Module')['$==='](other))) { - } else { - self.$raise($$($nesting, 'TypeError'), "compared with non class/module") - }; - - var working = self, - ancestors, - i, length; - - if (working === other) { - return false; - } - - for (i = 0, ancestors = Opal.ancestors(self), length = ancestors.length; i < length; i++) { - if (ancestors[i] === other) { - return true; - } - } - - for (i = 0, ancestors = Opal.ancestors(other), length = ancestors.length; i < length; i++) { - if (ancestors[i] === self) { - return false; - } - } - - return nil; - ; - }, $Module_$lt$4.$$arity = 1); - - Opal.def(self, '$<=', $Module_$lt_eq$5 = function(other) { - var $a, self = this; - - return ($truthy($a = self['$equal?'](other)) ? $a : $rb_lt(self, other)) - }, $Module_$lt_eq$5.$$arity = 1); - - Opal.def(self, '$>', $Module_$gt$6 = function(other) { - var self = this; - - - if ($truthy($$($nesting, 'Module')['$==='](other))) { - } else { - self.$raise($$($nesting, 'TypeError'), "compared with non class/module") - }; - return $rb_lt(other, self); - }, $Module_$gt$6.$$arity = 1); - - Opal.def(self, '$>=', $Module_$gt_eq$7 = function(other) { - var $a, self = this; - - return ($truthy($a = self['$equal?'](other)) ? $a : $rb_gt(self, other)) - }, $Module_$gt_eq$7.$$arity = 1); - - Opal.def(self, '$<=>', $Module_$lt_eq_gt$8 = function(other) { - var self = this, lt = nil; - - - - if (self === other) { - return 0; - } - ; - if ($truthy($$($nesting, 'Module')['$==='](other))) { - } else { - return nil - }; - lt = $rb_lt(self, other); - if ($truthy(lt['$nil?']())) { - return nil}; - if ($truthy(lt)) { - return -1 - } else { - return 1 - }; - }, $Module_$lt_eq_gt$8.$$arity = 1); - - Opal.def(self, '$alias_method', $Module_alias_method$9 = function $$alias_method(newname, oldname) { - var self = this; - - - Opal.alias(self, newname, oldname); - return self; - }, $Module_alias_method$9.$$arity = 2); - - Opal.def(self, '$alias_native', $Module_alias_native$10 = function $$alias_native(mid, jsid) { - var self = this; - - - - if (jsid == null) { - jsid = mid; - }; - Opal.alias_native(self, mid, jsid); - return self; - }, $Module_alias_native$10.$$arity = -2); - - Opal.def(self, '$ancestors', $Module_ancestors$11 = function $$ancestors() { - var self = this; - - return Opal.ancestors(self); - }, $Module_ancestors$11.$$arity = 0); - - Opal.def(self, '$append_features', $Module_append_features$12 = function $$append_features(includer) { - var self = this; - - - Opal.append_features(self, includer); - return self; - }, $Module_append_features$12.$$arity = 1); - - Opal.def(self, '$attr_accessor', $Module_attr_accessor$13 = function $$attr_accessor($a) { - var $post_args, names, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - names = $post_args;; - $send(self, 'attr_reader', Opal.to_a(names)); - return $send(self, 'attr_writer', Opal.to_a(names)); - }, $Module_attr_accessor$13.$$arity = -1); - Opal.alias(self, "attr", "attr_accessor"); - - Opal.def(self, '$attr_reader', $Module_attr_reader$14 = function $$attr_reader($a) { - var $post_args, names, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - names = $post_args;; - - var proto = self.$$prototype; - - for (var i = names.length - 1; i >= 0; i--) { - var name = names[i], - id = '$' + name, - ivar = Opal.ivar(name); - - // the closure here is needed because name will change at the next - // cycle, I wish we could use let. - var body = (function(ivar) { - return function() { - if (this[ivar] == null) { - return nil; - } - else { - return this[ivar]; - } - }; - })(ivar); - - // initialize the instance variable as nil - Opal.defineProperty(proto, ivar, nil); - - body.$$parameters = []; - body.$$arity = 0; - - Opal.defn(self, id, body); - } - ; - return nil; - }, $Module_attr_reader$14.$$arity = -1); - - Opal.def(self, '$attr_writer', $Module_attr_writer$15 = function $$attr_writer($a) { - var $post_args, names, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - names = $post_args;; - - var proto = self.$$prototype; - - for (var i = names.length - 1; i >= 0; i--) { - var name = names[i], - id = '$' + name + '=', - ivar = Opal.ivar(name); - - // the closure here is needed because name will change at the next - // cycle, I wish we could use let. - var body = (function(ivar){ - return function(value) { - return this[ivar] = value; - } - })(ivar); - - body.$$parameters = [['req']]; - body.$$arity = 1; - - // initialize the instance variable as nil - Opal.defineProperty(proto, ivar, nil); - - Opal.defn(self, id, body); - } - ; - return nil; - }, $Module_attr_writer$15.$$arity = -1); - - Opal.def(self, '$autoload', $Module_autoload$16 = function $$autoload(const$, path) { - var self = this; - - - if (self.$$autoload == null) self.$$autoload = {}; - Opal.const_cache_version++; - self.$$autoload[const$] = path; - return nil; - - }, $Module_autoload$16.$$arity = 2); - - Opal.def(self, '$class_variables', $Module_class_variables$17 = function $$class_variables() { - var self = this; - - return Object.keys(Opal.class_variables(self)); - }, $Module_class_variables$17.$$arity = 0); - - Opal.def(self, '$class_variable_get', $Module_class_variable_get$18 = function $$class_variable_get(name) { - var self = this; - - - name = $$($nesting, 'Opal')['$class_variable_name!'](name); - - var value = Opal.class_variables(self)[name]; - if (value == null) { - self.$raise($$($nesting, 'NameError').$new("" + "uninitialized class variable " + (name) + " in " + (self), name)) - } - return value; - ; - }, $Module_class_variable_get$18.$$arity = 1); - - Opal.def(self, '$class_variable_set', $Module_class_variable_set$19 = function $$class_variable_set(name, value) { - var self = this; - - - name = $$($nesting, 'Opal')['$class_variable_name!'](name); - return Opal.class_variable_set(self, name, value);; - }, $Module_class_variable_set$19.$$arity = 2); - - Opal.def(self, '$class_variable_defined?', $Module_class_variable_defined$ques$20 = function(name) { - var self = this; - - - name = $$($nesting, 'Opal')['$class_variable_name!'](name); - return Opal.class_variables(self).hasOwnProperty(name);; - }, $Module_class_variable_defined$ques$20.$$arity = 1); - - Opal.def(self, '$remove_class_variable', $Module_remove_class_variable$21 = function $$remove_class_variable(name) { - var self = this; - - - name = $$($nesting, 'Opal')['$class_variable_name!'](name); - - if (Opal.hasOwnProperty.call(self.$$cvars, name)) { - var value = self.$$cvars[name]; - delete self.$$cvars[name]; - return value; - } else { - self.$raise($$($nesting, 'NameError'), "" + "cannot remove " + (name) + " for " + (self)) - } - ; - }, $Module_remove_class_variable$21.$$arity = 1); - - Opal.def(self, '$constants', $Module_constants$22 = function $$constants(inherit) { - var self = this; - - - - if (inherit == null) { - inherit = true; - }; - return Opal.constants(self, inherit);; - }, $Module_constants$22.$$arity = -1); - Opal.defs(self, '$constants', $Module_constants$23 = function $$constants(inherit) { - var self = this; - - - ; - - if (inherit == null) { - var nesting = (self.$$nesting || []).concat(Opal.Object), - constant, constants = {}, - i, ii; - - for(i = 0, ii = nesting.length; i < ii; i++) { - for (constant in nesting[i].$$const) { - constants[constant] = true; - } - } - return Object.keys(constants); - } else { - return Opal.constants(self, inherit) - } - ; - }, $Module_constants$23.$$arity = -1); - Opal.defs(self, '$nesting', $Module_nesting$24 = function $$nesting() { - var self = this; - - return self.$$nesting || []; - }, $Module_nesting$24.$$arity = 0); - - Opal.def(self, '$const_defined?', $Module_const_defined$ques$25 = function(name, inherit) { - var self = this; - - - - if (inherit == null) { - inherit = true; - }; - name = $$($nesting, 'Opal')['$const_name!'](name); - if ($truthy(name['$=~']($$$($$($nesting, 'Opal'), 'CONST_NAME_REGEXP')))) { - } else { - self.$raise($$($nesting, 'NameError').$new("" + "wrong constant name " + (name), name)) - }; - - var module, modules = [self], module_constants, i, ii; - - // Add up ancestors if inherit is true - if (inherit) { - modules = modules.concat(Opal.ancestors(self)); - - // Add Object's ancestors if it's a module – modules have no ancestors otherwise - if (self.$$is_module) { - modules = modules.concat([Opal.Object]).concat(Opal.ancestors(Opal.Object)); - } - } - - for (i = 0, ii = modules.length; i < ii; i++) { - module = modules[i]; - if (module.$$const[name] != null) { - return true; - } - } - - return false; - ; - }, $Module_const_defined$ques$25.$$arity = -2); - - Opal.def(self, '$const_get', $Module_const_get$26 = function $$const_get(name, inherit) { - var $$27, self = this; - - - - if (inherit == null) { - inherit = true; - }; - name = $$($nesting, 'Opal')['$const_name!'](name); - - if (name.indexOf('::') === 0 && name !== '::'){ - name = name.slice(2); - } - ; - if ($truthy(name.indexOf('::') != -1 && name != '::')) { - return $send(name.$split("::"), 'inject', [self], ($$27 = function(o, c){var self = $$27.$$s || this; - - - - if (o == null) { - o = nil; - }; - - if (c == null) { - c = nil; - }; - return o.$const_get(c);}, $$27.$$s = self, $$27.$$arity = 2, $$27))}; - if ($truthy(name['$=~']($$$($$($nesting, 'Opal'), 'CONST_NAME_REGEXP')))) { - } else { - self.$raise($$($nesting, 'NameError').$new("" + "wrong constant name " + (name), name)) - }; - - if (inherit) { - return $$([self], name); - } else { - return Opal.const_get_local(self, name); - } - ; - }, $Module_const_get$26.$$arity = -2); - - Opal.def(self, '$const_missing', $Module_const_missing$28 = function $$const_missing(name) { - var self = this, full_const_name = nil; - - - - if (self.$$autoload) { - var file = self.$$autoload[name]; - - if (file) { - self.$require(file); - - return self.$const_get(name); - } - } - ; - full_const_name = (function() {if (self['$==']($$($nesting, 'Object'))) { - return name - } else { - return "" + (self) + "::" + (name) - }; return nil; })(); - return self.$raise($$($nesting, 'NameError').$new("" + "uninitialized constant " + (full_const_name), name)); - }, $Module_const_missing$28.$$arity = 1); - - Opal.def(self, '$const_set', $Module_const_set$29 = function $$const_set(name, value) { - var $a, self = this; - - - name = $$($nesting, 'Opal')['$const_name!'](name); - if ($truthy(($truthy($a = name['$!~']($$$($$($nesting, 'Opal'), 'CONST_NAME_REGEXP'))) ? $a : name['$start_with?']("::")))) { - self.$raise($$($nesting, 'NameError').$new("" + "wrong constant name " + (name), name))}; - Opal.const_set(self, name, value); - return value; - }, $Module_const_set$29.$$arity = 2); - - Opal.def(self, '$public_constant', $Module_public_constant$30 = function $$public_constant(const_name) { - var self = this; - - return nil - }, $Module_public_constant$30.$$arity = 1); - - Opal.def(self, '$define_method', $Module_define_method$31 = function $$define_method(name, method) { - var $iter = $Module_define_method$31.$$p, block = $iter || nil, $a, $$32, self = this, $case = nil; - - if ($iter) $Module_define_method$31.$$p = null; - - - if ($iter) $Module_define_method$31.$$p = null;; - ; - if ($truthy(method === undefined && block === nil)) { - self.$raise($$($nesting, 'ArgumentError'), "tried to create a Proc object without a block")}; - block = ($truthy($a = block) ? $a : (function() {$case = method; - if ($$($nesting, 'Proc')['$===']($case)) {return method} - else if ($$($nesting, 'Method')['$===']($case)) {return method.$to_proc().$$unbound} - else if ($$($nesting, 'UnboundMethod')['$===']($case)) {return $lambda(($$32 = function($b){var self = $$32.$$s || this, $post_args, args, bound = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - bound = method.$bind(self); - return $send(bound, 'call', Opal.to_a(args));}, $$32.$$s = self, $$32.$$arity = -1, $$32))} - else {return self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + (block.$class()) + " (expected Proc/Method)")}})()); - - var id = '$' + name; - - block.$$jsid = name; - block.$$s = null; - block.$$def = block; - block.$$define_meth = true; - - Opal.defn(self, id, block); - - return name; - ; - }, $Module_define_method$31.$$arity = -2); - - Opal.def(self, '$remove_method', $Module_remove_method$33 = function $$remove_method($a) { - var $post_args, names, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - names = $post_args;; - - for (var i = 0, length = names.length; i < length; i++) { - Opal.rdef(self, "$" + names[i]); - } - ; - return self; - }, $Module_remove_method$33.$$arity = -1); - - Opal.def(self, '$singleton_class?', $Module_singleton_class$ques$34 = function() { - var self = this; - - return !!self.$$is_singleton; - }, $Module_singleton_class$ques$34.$$arity = 0); - - Opal.def(self, '$include', $Module_include$35 = function $$include($a) { - var $post_args, mods, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - mods = $post_args;; - - for (var i = mods.length - 1; i >= 0; i--) { - var mod = mods[i]; - - if (!mod.$$is_module) { - self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + ((mod).$class()) + " (expected Module)"); - } - - (mod).$append_features(self); - (mod).$included(self); - } - ; - return self; - }, $Module_include$35.$$arity = -1); - - Opal.def(self, '$included_modules', $Module_included_modules$36 = function $$included_modules() { - var self = this; - - return Opal.included_modules(self); - }, $Module_included_modules$36.$$arity = 0); - - Opal.def(self, '$include?', $Module_include$ques$37 = function(mod) { - var self = this; - - - if (!mod.$$is_module) { - self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + ((mod).$class()) + " (expected Module)"); - } - - var i, ii, mod2, ancestors = Opal.ancestors(self); - - for (i = 0, ii = ancestors.length; i < ii; i++) { - mod2 = ancestors[i]; - if (mod2 === mod && mod2 !== self) { - return true; - } - } - - return false; - - }, $Module_include$ques$37.$$arity = 1); - - Opal.def(self, '$instance_method', $Module_instance_method$38 = function $$instance_method(name) { - var self = this; - - - var meth = self.$$prototype['$' + name]; - - if (!meth || meth.$$stub) { - self.$raise($$($nesting, 'NameError').$new("" + "undefined method `" + (name) + "' for class `" + (self.$name()) + "'", name)); - } - - return $$($nesting, 'UnboundMethod').$new(self, meth.$$owner || self, meth, name); - - }, $Module_instance_method$38.$$arity = 1); - - Opal.def(self, '$instance_methods', $Module_instance_methods$39 = function $$instance_methods(include_super) { - var self = this; - - - - if (include_super == null) { - include_super = true; - }; - - if ($truthy(include_super)) { - return Opal.instance_methods(self); - } else { - return Opal.own_instance_methods(self); - } - ; - }, $Module_instance_methods$39.$$arity = -1); - - Opal.def(self, '$included', $Module_included$40 = function $$included(mod) { - var self = this; - - return nil - }, $Module_included$40.$$arity = 1); - - Opal.def(self, '$extended', $Module_extended$41 = function $$extended(mod) { - var self = this; - - return nil - }, $Module_extended$41.$$arity = 1); - - Opal.def(self, '$extend_object', $Module_extend_object$42 = function $$extend_object(object) { - var self = this; - - return nil - }, $Module_extend_object$42.$$arity = 1); - - Opal.def(self, '$method_added', $Module_method_added$43 = function $$method_added($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $Module_method_added$43.$$arity = -1); - - Opal.def(self, '$method_removed', $Module_method_removed$44 = function $$method_removed($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $Module_method_removed$44.$$arity = -1); - - Opal.def(self, '$method_undefined', $Module_method_undefined$45 = function $$method_undefined($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $Module_method_undefined$45.$$arity = -1); - - Opal.def(self, '$module_eval', $Module_module_eval$46 = function $$module_eval($a) { - var $iter = $Module_module_eval$46.$$p, block = $iter || nil, $post_args, args, $b, $$47, self = this, string = nil, file = nil, _lineno = nil, default_eval_options = nil, compiling_options = nil, compiled = nil; - - if ($iter) $Module_module_eval$46.$$p = null; - - - if ($iter) $Module_module_eval$46.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy(($truthy($b = block['$nil?']()) ? !!Opal.compile : $b))) { - - if ($truthy($range(1, 3, false)['$cover?'](args.$size()))) { - } else { - $$($nesting, 'Kernel').$raise($$($nesting, 'ArgumentError'), "wrong number of arguments (0 for 1..3)") - }; - $b = [].concat(Opal.to_a(args)), (string = ($b[0] == null ? nil : $b[0])), (file = ($b[1] == null ? nil : $b[1])), (_lineno = ($b[2] == null ? nil : $b[2])), $b; - default_eval_options = $hash2(["file", "eval"], {"file": ($truthy($b = file) ? $b : "(eval)"), "eval": true}); - compiling_options = Opal.hash({ arity_check: false }).$merge(default_eval_options); - compiled = $$($nesting, 'Opal').$compile(string, compiling_options); - block = $send($$($nesting, 'Kernel'), 'proc', [], ($$47 = function(){var self = $$47.$$s || this; - - - return (function(self) { - return eval(compiled); - })(self) - }, $$47.$$s = self, $$47.$$arity = 0, $$47)); - } else if ($truthy(args['$any?']())) { - $$($nesting, 'Kernel').$raise($$($nesting, 'ArgumentError'), "" + ("" + "wrong number of arguments (" + (args.$size()) + " for 0)") + "\n\n NOTE:If you want to enable passing a String argument please add \"require 'opal-parser'\" to your script\n")}; - - var old = block.$$s, - result; - - block.$$s = null; - result = block.apply(self, [self]); - block.$$s = old; - - return result; - ; - }, $Module_module_eval$46.$$arity = -1); - Opal.alias(self, "class_eval", "module_eval"); - - Opal.def(self, '$module_exec', $Module_module_exec$48 = function $$module_exec($a) { - var $iter = $Module_module_exec$48.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Module_module_exec$48.$$p = null; - - - if ($iter) $Module_module_exec$48.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - if (block === nil) { - self.$raise($$($nesting, 'LocalJumpError'), "no block given") - } - - var block_self = block.$$s, result; - - block.$$s = null; - result = block.apply(self, args); - block.$$s = block_self; - - return result; - ; - }, $Module_module_exec$48.$$arity = -1); - Opal.alias(self, "class_exec", "module_exec"); - - Opal.def(self, '$method_defined?', $Module_method_defined$ques$49 = function(method) { - var self = this; - - - var body = self.$$prototype['$' + method]; - return (!!body) && !body.$$stub; - - }, $Module_method_defined$ques$49.$$arity = 1); - - Opal.def(self, '$module_function', $Module_module_function$50 = function $$module_function($a) { - var $post_args, methods, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - methods = $post_args;; - - if (methods.length === 0) { - self.$$module_function = true; - } - else { - for (var i = 0, length = methods.length; i < length; i++) { - var meth = methods[i], - id = '$' + meth, - func = self.$$prototype[id]; - - Opal.defs(self, id, func); - } - } - - return self; - ; - }, $Module_module_function$50.$$arity = -1); - - Opal.def(self, '$name', $Module_name$51 = function $$name() { - var self = this; - - - if (self.$$full_name) { - return self.$$full_name; - } - - var result = [], base = self; - - while (base) { - // Give up if any of the ancestors is unnamed - if (base.$$name === nil || base.$$name == null) return nil; - - result.unshift(base.$$name); - - base = base.$$base_module; - - if (base === Opal.Object) { - break; - } - } - - if (result.length === 0) { - return nil; - } - - return self.$$full_name = result.join('::'); - - }, $Module_name$51.$$arity = 0); - - Opal.def(self, '$prepend', $Module_prepend$52 = function $$prepend($a) { - var $post_args, mods, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - mods = $post_args;; - - if (mods.length === 0) { - self.$raise($$($nesting, 'ArgumentError'), "wrong number of arguments (given 0, expected 1+)") - } - - for (var i = mods.length - 1; i >= 0; i--) { - var mod = mods[i]; - - if (!mod.$$is_module) { - self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + ((mod).$class()) + " (expected Module)"); - } - - (mod).$prepend_features(self); - (mod).$prepended(self); - } - ; - return self; - }, $Module_prepend$52.$$arity = -1); - - Opal.def(self, '$prepend_features', $Module_prepend_features$53 = function $$prepend_features(prepender) { - var self = this; - - - - if (!self.$$is_module) { - self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + (self.$class()) + " (expected Module)"); - } - - Opal.prepend_features(self, prepender) - ; - return self; - }, $Module_prepend_features$53.$$arity = 1); - - Opal.def(self, '$prepended', $Module_prepended$54 = function $$prepended(mod) { - var self = this; - - return nil - }, $Module_prepended$54.$$arity = 1); - - Opal.def(self, '$remove_const', $Module_remove_const$55 = function $$remove_const(name) { - var self = this; - - return Opal.const_remove(self, name); - }, $Module_remove_const$55.$$arity = 1); - - Opal.def(self, '$to_s', $Module_to_s$56 = function $$to_s() { - var $a, self = this; - - return ($truthy($a = Opal.Module.$name.call(self)) ? $a : "" + "#<" + (self.$$is_module ? 'Module' : 'Class') + ":0x" + (self.$__id__().$to_s(16)) + ">") - }, $Module_to_s$56.$$arity = 0); - - Opal.def(self, '$undef_method', $Module_undef_method$57 = function $$undef_method($a) { - var $post_args, names, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - names = $post_args;; - - for (var i = 0, length = names.length; i < length; i++) { - Opal.udef(self, "$" + names[i]); - } - ; - return self; - }, $Module_undef_method$57.$$arity = -1); - - Opal.def(self, '$instance_variables', $Module_instance_variables$58 = function $$instance_variables() { - var self = this, consts = nil; - - - consts = (Opal.Module.$$nesting = $nesting, self.$constants()); - - var result = []; - - for (var name in self) { - if (self.hasOwnProperty(name) && name.charAt(0) !== '$' && name !== 'constructor' && !consts['$include?'](name)) { - result.push('@' + name); - } - } - - return result; - ; - }, $Module_instance_variables$58.$$arity = 0); - - Opal.def(self, '$dup', $Module_dup$59 = function $$dup() { - var $iter = $Module_dup$59.$$p, $yield = $iter || nil, self = this, copy = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Module_dup$59.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - copy = $send(self, Opal.find_super_dispatcher(self, 'dup', $Module_dup$59, false), $zuper, $iter); - copy.$copy_class_variables(self); - copy.$copy_constants(self); - return copy; - }, $Module_dup$59.$$arity = 0); - - Opal.def(self, '$copy_class_variables', $Module_copy_class_variables$60 = function $$copy_class_variables(other) { - var self = this; - - - for (var name in other.$$cvars) { - self.$$cvars[name] = other.$$cvars[name]; - } - - }, $Module_copy_class_variables$60.$$arity = 1); - return (Opal.def(self, '$copy_constants', $Module_copy_constants$61 = function $$copy_constants(other) { - var self = this; - - - var name, other_constants = other.$$const; - - for (name in other_constants) { - Opal.const_set(self, name, other_constants[name]); - } - - }, $Module_copy_constants$61.$$arity = 1), nil) && 'copy_constants'; - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/class"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $send = Opal.send; - - Opal.add_stubs(['$require', '$class_eval', '$to_proc', '$initialize_copy', '$allocate', '$name', '$to_s']); - - self.$require("corelib/module"); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Class'); - - var $nesting = [self].concat($parent_nesting), $Class_new$1, $Class_allocate$2, $Class_inherited$3, $Class_initialize_dup$4, $Class_new$5, $Class_superclass$6, $Class_to_s$7; - - - Opal.defs(self, '$new', $Class_new$1 = function(superclass) { - var $iter = $Class_new$1.$$p, block = $iter || nil, self = this; - - if ($iter) $Class_new$1.$$p = null; - - - if ($iter) $Class_new$1.$$p = null;; - - if (superclass == null) { - superclass = $$($nesting, 'Object'); - }; - - if (!superclass.$$is_class) { - throw Opal.TypeError.$new("superclass must be a Class"); - } - - var klass = Opal.allocate_class(nil, superclass); - superclass.$inherited(klass); - (function() {if ((block !== nil)) { - return $send((klass), 'class_eval', [], block.$to_proc()) - } else { - return nil - }; return nil; })() - return klass; - ; - }, $Class_new$1.$$arity = -1); - - Opal.def(self, '$allocate', $Class_allocate$2 = function $$allocate() { - var self = this; - - - var obj = new self.$$constructor(); - obj.$$id = Opal.uid(); - return obj; - - }, $Class_allocate$2.$$arity = 0); - - Opal.def(self, '$inherited', $Class_inherited$3 = function $$inherited(cls) { - var self = this; - - return nil - }, $Class_inherited$3.$$arity = 1); - - Opal.def(self, '$initialize_dup', $Class_initialize_dup$4 = function $$initialize_dup(original) { - var self = this; - - - self.$initialize_copy(original); - - self.$$name = null; - self.$$full_name = null; - ; - }, $Class_initialize_dup$4.$$arity = 1); - - Opal.def(self, '$new', $Class_new$5 = function($a) { - var $iter = $Class_new$5.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Class_new$5.$$p = null; - - - if ($iter) $Class_new$5.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - var object = self.$allocate(); - Opal.send(object, object.$initialize, args, block); - return object; - ; - }, $Class_new$5.$$arity = -1); - - Opal.def(self, '$superclass', $Class_superclass$6 = function $$superclass() { - var self = this; - - return self.$$super || nil; - }, $Class_superclass$6.$$arity = 0); - return (Opal.def(self, '$to_s', $Class_to_s$7 = function $$to_s() { - var $iter = $Class_to_s$7.$$p, $yield = $iter || nil, self = this; - - if ($iter) $Class_to_s$7.$$p = null; - - var singleton_of = self.$$singleton_of; - - if (singleton_of && (singleton_of.$$is_a_module)) { - return "" + "#<Class:" + ((singleton_of).$name()) + ">"; - } - else if (singleton_of) { - // a singleton class created from an object - return "" + "#<Class:#<" + ((singleton_of.$$class).$name()) + ":0x" + ((Opal.id(singleton_of)).$to_s(16)) + ">>"; - } - return $send(self, Opal.find_super_dispatcher(self, 'to_s', $Class_to_s$7, false), [], null); - - }, $Class_to_s$7.$$arity = 0), nil) && 'to_s'; - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/basic_object"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $range = Opal.range, $hash2 = Opal.hash2, $send = Opal.send; - - Opal.add_stubs(['$==', '$!', '$nil?', '$cover?', '$size', '$raise', '$merge', '$compile', '$proc', '$any?', '$inspect', '$new']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'BasicObject'); - - var $nesting = [self].concat($parent_nesting), $BasicObject_initialize$1, $BasicObject_$eq_eq$2, $BasicObject_eql$ques$3, $BasicObject___id__$4, $BasicObject___send__$5, $BasicObject_$excl$6, $BasicObject_$not_eq$7, $BasicObject_instance_eval$8, $BasicObject_instance_exec$10, $BasicObject_singleton_method_added$11, $BasicObject_singleton_method_removed$12, $BasicObject_singleton_method_undefined$13, $BasicObject_class$14, $BasicObject_method_missing$15; - - - - Opal.def(self, '$initialize', $BasicObject_initialize$1 = function $$initialize($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $BasicObject_initialize$1.$$arity = -1); - - Opal.def(self, '$==', $BasicObject_$eq_eq$2 = function(other) { - var self = this; - - return self === other; - }, $BasicObject_$eq_eq$2.$$arity = 1); - - Opal.def(self, '$eql?', $BasicObject_eql$ques$3 = function(other) { - var self = this; - - return self['$=='](other) - }, $BasicObject_eql$ques$3.$$arity = 1); - Opal.alias(self, "equal?", "=="); - - Opal.def(self, '$__id__', $BasicObject___id__$4 = function $$__id__() { - var self = this; - - - if (self.$$id != null) { - return self.$$id; - } - Opal.defineProperty(self, '$$id', Opal.uid()); - return self.$$id; - - }, $BasicObject___id__$4.$$arity = 0); - - Opal.def(self, '$__send__', $BasicObject___send__$5 = function $$__send__(symbol, $a) { - var $iter = $BasicObject___send__$5.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $BasicObject___send__$5.$$p = null; - - - if ($iter) $BasicObject___send__$5.$$p = null;; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - - var func = self['$' + symbol] - - if (func) { - if (block !== nil) { - func.$$p = block; - } - - return func.apply(self, args); - } - - if (block !== nil) { - self.$method_missing.$$p = block; - } - - return self.$method_missing.apply(self, [symbol].concat(args)); - ; - }, $BasicObject___send__$5.$$arity = -2); - - Opal.def(self, '$!', $BasicObject_$excl$6 = function() { - var self = this; - - return false - }, $BasicObject_$excl$6.$$arity = 0); - - Opal.def(self, '$!=', $BasicObject_$not_eq$7 = function(other) { - var self = this; - - return self['$=='](other)['$!']() - }, $BasicObject_$not_eq$7.$$arity = 1); - - Opal.def(self, '$instance_eval', $BasicObject_instance_eval$8 = function $$instance_eval($a) { - var $iter = $BasicObject_instance_eval$8.$$p, block = $iter || nil, $post_args, args, $b, $$9, self = this, string = nil, file = nil, _lineno = nil, default_eval_options = nil, compiling_options = nil, compiled = nil; - - if ($iter) $BasicObject_instance_eval$8.$$p = null; - - - if ($iter) $BasicObject_instance_eval$8.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy(($truthy($b = block['$nil?']()) ? !!Opal.compile : $b))) { - - if ($truthy($range(1, 3, false)['$cover?'](args.$size()))) { - } else { - $$$('::', 'Kernel').$raise($$$('::', 'ArgumentError'), "wrong number of arguments (0 for 1..3)") - }; - $b = [].concat(Opal.to_a(args)), (string = ($b[0] == null ? nil : $b[0])), (file = ($b[1] == null ? nil : $b[1])), (_lineno = ($b[2] == null ? nil : $b[2])), $b; - default_eval_options = $hash2(["file", "eval"], {"file": ($truthy($b = file) ? $b : "(eval)"), "eval": true}); - compiling_options = Opal.hash({ arity_check: false }).$merge(default_eval_options); - compiled = $$$('::', 'Opal').$compile(string, compiling_options); - block = $send($$$('::', 'Kernel'), 'proc', [], ($$9 = function(){var self = $$9.$$s || this; - - - return (function(self) { - return eval(compiled); - })(self) - }, $$9.$$s = self, $$9.$$arity = 0, $$9)); - } else if ($truthy(args['$any?']())) { - $$$('::', 'Kernel').$raise($$$('::', 'ArgumentError'), "" + "wrong number of arguments (" + (args.$size()) + " for 0)")}; - - var old = block.$$s, - result; - - block.$$s = null; - - // Need to pass $$eval so that method definitions know if this is - // being done on a class/module. Cannot be compiler driven since - // send(:instance_eval) needs to work. - if (self.$$is_a_module) { - self.$$eval = true; - try { - result = block.call(self, self); - } - finally { - self.$$eval = false; - } - } - else { - result = block.call(self, self); - } - - block.$$s = old; - - return result; - ; - }, $BasicObject_instance_eval$8.$$arity = -1); - - Opal.def(self, '$instance_exec', $BasicObject_instance_exec$10 = function $$instance_exec($a) { - var $iter = $BasicObject_instance_exec$10.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $BasicObject_instance_exec$10.$$p = null; - - - if ($iter) $BasicObject_instance_exec$10.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy(block)) { - } else { - $$$('::', 'Kernel').$raise($$$('::', 'ArgumentError'), "no block given") - }; - - var block_self = block.$$s, - result; - - block.$$s = null; - - if (self.$$is_a_module) { - self.$$eval = true; - try { - result = block.apply(self, args); - } - finally { - self.$$eval = false; - } - } - else { - result = block.apply(self, args); - } - - block.$$s = block_self; - - return result; - ; - }, $BasicObject_instance_exec$10.$$arity = -1); - - Opal.def(self, '$singleton_method_added', $BasicObject_singleton_method_added$11 = function $$singleton_method_added($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $BasicObject_singleton_method_added$11.$$arity = -1); - - Opal.def(self, '$singleton_method_removed', $BasicObject_singleton_method_removed$12 = function $$singleton_method_removed($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $BasicObject_singleton_method_removed$12.$$arity = -1); - - Opal.def(self, '$singleton_method_undefined', $BasicObject_singleton_method_undefined$13 = function $$singleton_method_undefined($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $BasicObject_singleton_method_undefined$13.$$arity = -1); - - Opal.def(self, '$class', $BasicObject_class$14 = function() { - var self = this; - - return self.$$class; - }, $BasicObject_class$14.$$arity = 0); - return (Opal.def(self, '$method_missing', $BasicObject_method_missing$15 = function $$method_missing(symbol, $a) { - var $iter = $BasicObject_method_missing$15.$$p, block = $iter || nil, $post_args, args, self = this, message = nil; - - if ($iter) $BasicObject_method_missing$15.$$p = null; - - - if ($iter) $BasicObject_method_missing$15.$$p = null;; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - message = (function() {if ($truthy(self.$inspect && !self.$inspect.$$stub)) { - return "" + "undefined method `" + (symbol) + "' for " + (self.$inspect()) + ":" + (self.$$class) - } else { - return "" + "undefined method `" + (symbol) + "' for " + (self.$$class) - }; return nil; })(); - return $$$('::', 'Kernel').$raise($$$('::', 'NoMethodError').$new(message, symbol)); - }, $BasicObject_method_missing$15.$$arity = -2), nil) && 'method_missing'; - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/kernel"] = function(Opal) { - function $rb_le(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy, $gvars = Opal.gvars, $hash2 = Opal.hash2, $send = Opal.send, $klass = Opal.klass; - - Opal.add_stubs(['$raise', '$new', '$inspect', '$!', '$=~', '$==', '$object_id', '$class', '$coerce_to?', '$<<', '$allocate', '$copy_instance_variables', '$copy_singleton_methods', '$initialize_clone', '$initialize_copy', '$define_method', '$singleton_class', '$to_proc', '$initialize_dup', '$for', '$empty?', '$pop', '$call', '$coerce_to', '$append_features', '$extend_object', '$extended', '$__id__', '$to_s', '$instance_variable_name!', '$respond_to?', '$to_int', '$coerce_to!', '$Integer', '$nil?', '$===', '$enum_for', '$result', '$any?', '$print', '$format', '$puts', '$each', '$<=', '$length', '$[]', '$exception', '$is_a?', '$rand', '$respond_to_missing?', '$try_convert!', '$expand_path', '$join', '$start_with?', '$new_seed', '$srand', '$sym', '$arg', '$open', '$include']); - - (function($base, $parent_nesting) { - var self = $module($base, 'Kernel'); - - var $nesting = [self].concat($parent_nesting), $Kernel_method_missing$1, $Kernel_$eq_tilde$2, $Kernel_$excl_tilde$3, $Kernel_$eq_eq_eq$4, $Kernel_$lt_eq_gt$5, $Kernel_method$6, $Kernel_methods$7, $Kernel_public_methods$8, $Kernel_Array$9, $Kernel_at_exit$10, $Kernel_caller$11, $Kernel_class$12, $Kernel_copy_instance_variables$13, $Kernel_copy_singleton_methods$14, $Kernel_clone$15, $Kernel_initialize_clone$16, $Kernel_define_singleton_method$17, $Kernel_dup$18, $Kernel_initialize_dup$19, $Kernel_enum_for$20, $Kernel_equal$ques$21, $Kernel_exit$22, $Kernel_extend$23, $Kernel_hash$24, $Kernel_initialize_copy$25, $Kernel_inspect$26, $Kernel_instance_of$ques$27, $Kernel_instance_variable_defined$ques$28, $Kernel_instance_variable_get$29, $Kernel_instance_variable_set$30, $Kernel_remove_instance_variable$31, $Kernel_instance_variables$32, $Kernel_Integer$33, $Kernel_Float$34, $Kernel_Hash$35, $Kernel_is_a$ques$36, $Kernel_itself$37, $Kernel_lambda$38, $Kernel_load$39, $Kernel_loop$40, $Kernel_nil$ques$42, $Kernel_printf$43, $Kernel_proc$44, $Kernel_puts$45, $Kernel_p$46, $Kernel_print$48, $Kernel_warn$49, $Kernel_raise$50, $Kernel_rand$51, $Kernel_respond_to$ques$52, $Kernel_respond_to_missing$ques$53, $Kernel_require$54, $Kernel_require_relative$55, $Kernel_require_tree$56, $Kernel_singleton_class$57, $Kernel_sleep$58, $Kernel_srand$59, $Kernel_String$60, $Kernel_tap$61, $Kernel_to_proc$62, $Kernel_to_s$63, $Kernel_catch$64, $Kernel_throw$65, $Kernel_open$66, $Kernel_yield_self$67; - - - - Opal.def(self, '$method_missing', $Kernel_method_missing$1 = function $$method_missing(symbol, $a) { - var $iter = $Kernel_method_missing$1.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Kernel_method_missing$1.$$p = null; - - - if ($iter) $Kernel_method_missing$1.$$p = null;; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - return self.$raise($$($nesting, 'NoMethodError').$new("" + "undefined method `" + (symbol) + "' for " + (self.$inspect()), symbol, args)); - }, $Kernel_method_missing$1.$$arity = -2); - - Opal.def(self, '$=~', $Kernel_$eq_tilde$2 = function(obj) { - var self = this; - - return false - }, $Kernel_$eq_tilde$2.$$arity = 1); - - Opal.def(self, '$!~', $Kernel_$excl_tilde$3 = function(obj) { - var self = this; - - return self['$=~'](obj)['$!']() - }, $Kernel_$excl_tilde$3.$$arity = 1); - - Opal.def(self, '$===', $Kernel_$eq_eq_eq$4 = function(other) { - var $a, self = this; - - return ($truthy($a = self.$object_id()['$=='](other.$object_id())) ? $a : self['$=='](other)) - }, $Kernel_$eq_eq_eq$4.$$arity = 1); - - Opal.def(self, '$<=>', $Kernel_$lt_eq_gt$5 = function(other) { - var self = this; - - - // set guard for infinite recursion - self.$$comparable = true; - - var x = self['$=='](other); - - if (x && x !== nil) { - return 0; - } - - return nil; - - }, $Kernel_$lt_eq_gt$5.$$arity = 1); - - Opal.def(self, '$method', $Kernel_method$6 = function $$method(name) { - var self = this; - - - var meth = self['$' + name]; - - if (!meth || meth.$$stub) { - self.$raise($$($nesting, 'NameError').$new("" + "undefined method `" + (name) + "' for class `" + (self.$class()) + "'", name)); - } - - return $$($nesting, 'Method').$new(self, meth.$$owner || self.$class(), meth, name); - - }, $Kernel_method$6.$$arity = 1); - - Opal.def(self, '$methods', $Kernel_methods$7 = function $$methods(all) { - var self = this; - - - - if (all == null) { - all = true; - }; - - if ($truthy(all)) { - return Opal.methods(self); - } else { - return Opal.own_methods(self); - } - ; - }, $Kernel_methods$7.$$arity = -1); - - Opal.def(self, '$public_methods', $Kernel_public_methods$8 = function $$public_methods(all) { - var self = this; - - - - if (all == null) { - all = true; - }; - - if ($truthy(all)) { - return Opal.methods(self); - } else { - return Opal.receiver_methods(self); - } - ; - }, $Kernel_public_methods$8.$$arity = -1); - - Opal.def(self, '$Array', $Kernel_Array$9 = function $$Array(object) { - var self = this; - - - var coerced; - - if (object === nil) { - return []; - } - - if (object.$$is_array) { - return object; - } - - coerced = $$($nesting, 'Opal')['$coerce_to?'](object, $$($nesting, 'Array'), "to_ary"); - if (coerced !== nil) { return coerced; } - - coerced = $$($nesting, 'Opal')['$coerce_to?'](object, $$($nesting, 'Array'), "to_a"); - if (coerced !== nil) { return coerced; } - - return [object]; - - }, $Kernel_Array$9.$$arity = 1); - - Opal.def(self, '$at_exit', $Kernel_at_exit$10 = function $$at_exit() { - var $iter = $Kernel_at_exit$10.$$p, block = $iter || nil, $a, self = this; - if ($gvars.__at_exit__ == null) $gvars.__at_exit__ = nil; - - if ($iter) $Kernel_at_exit$10.$$p = null; - - - if ($iter) $Kernel_at_exit$10.$$p = null;; - $gvars.__at_exit__ = ($truthy($a = $gvars.__at_exit__) ? $a : []); - return $gvars.__at_exit__['$<<'](block); - }, $Kernel_at_exit$10.$$arity = 0); - - Opal.def(self, '$caller', $Kernel_caller$11 = function $$caller($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return []; - }, $Kernel_caller$11.$$arity = -1); - - Opal.def(self, '$class', $Kernel_class$12 = function() { - var self = this; - - return self.$$class; - }, $Kernel_class$12.$$arity = 0); - - Opal.def(self, '$copy_instance_variables', $Kernel_copy_instance_variables$13 = function $$copy_instance_variables(other) { - var self = this; - - - var keys = Object.keys(other), i, ii, name; - for (i = 0, ii = keys.length; i < ii; i++) { - name = keys[i]; - if (name.charAt(0) !== '$' && other.hasOwnProperty(name)) { - self[name] = other[name]; - } - } - - }, $Kernel_copy_instance_variables$13.$$arity = 1); - - Opal.def(self, '$copy_singleton_methods', $Kernel_copy_singleton_methods$14 = function $$copy_singleton_methods(other) { - var self = this; - - - var i, name, names, length; - - if (other.hasOwnProperty('$$meta')) { - var other_singleton_class = Opal.get_singleton_class(other); - var self_singleton_class = Opal.get_singleton_class(self); - names = Object.getOwnPropertyNames(other_singleton_class.$$prototype); - - for (i = 0, length = names.length; i < length; i++) { - name = names[i]; - if (Opal.is_method(name)) { - self_singleton_class.$$prototype[name] = other_singleton_class.$$prototype[name]; - } - } - - self_singleton_class.$$const = Object.assign({}, other_singleton_class.$$const); - Object.setPrototypeOf( - self_singleton_class.$$prototype, - Object.getPrototypeOf(other_singleton_class.$$prototype) - ); - } - - for (i = 0, names = Object.getOwnPropertyNames(other), length = names.length; i < length; i++) { - name = names[i]; - if (name.charAt(0) === '$' && name.charAt(1) !== '$' && other.hasOwnProperty(name)) { - self[name] = other[name]; - } - } - - }, $Kernel_copy_singleton_methods$14.$$arity = 1); - - Opal.def(self, '$clone', $Kernel_clone$15 = function $$clone($kwargs) { - var freeze, self = this, copy = nil; - - - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - freeze = $kwargs.$$smap["freeze"]; - if (freeze == null) { - freeze = true - }; - copy = self.$class().$allocate(); - copy.$copy_instance_variables(self); - copy.$copy_singleton_methods(self); - copy.$initialize_clone(self); - return copy; - }, $Kernel_clone$15.$$arity = -1); - - Opal.def(self, '$initialize_clone', $Kernel_initialize_clone$16 = function $$initialize_clone(other) { - var self = this; - - return self.$initialize_copy(other) - }, $Kernel_initialize_clone$16.$$arity = 1); - - Opal.def(self, '$define_singleton_method', $Kernel_define_singleton_method$17 = function $$define_singleton_method(name, method) { - var $iter = $Kernel_define_singleton_method$17.$$p, block = $iter || nil, self = this; - - if ($iter) $Kernel_define_singleton_method$17.$$p = null; - - - if ($iter) $Kernel_define_singleton_method$17.$$p = null;; - ; - return $send(self.$singleton_class(), 'define_method', [name, method], block.$to_proc()); - }, $Kernel_define_singleton_method$17.$$arity = -2); - - Opal.def(self, '$dup', $Kernel_dup$18 = function $$dup() { - var self = this, copy = nil; - - - copy = self.$class().$allocate(); - copy.$copy_instance_variables(self); - copy.$initialize_dup(self); - return copy; - }, $Kernel_dup$18.$$arity = 0); - - Opal.def(self, '$initialize_dup', $Kernel_initialize_dup$19 = function $$initialize_dup(other) { - var self = this; - - return self.$initialize_copy(other) - }, $Kernel_initialize_dup$19.$$arity = 1); - - Opal.def(self, '$enum_for', $Kernel_enum_for$20 = function $$enum_for($a, $b) { - var $iter = $Kernel_enum_for$20.$$p, block = $iter || nil, $post_args, method, args, self = this; - - if ($iter) $Kernel_enum_for$20.$$p = null; - - - if ($iter) $Kernel_enum_for$20.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - if ($post_args.length > 0) { - method = $post_args[0]; - $post_args.splice(0, 1); - } - if (method == null) { - method = "each"; - }; - - args = $post_args;; - return $send($$($nesting, 'Enumerator'), 'for', [self, method].concat(Opal.to_a(args)), block.$to_proc()); - }, $Kernel_enum_for$20.$$arity = -1); - Opal.alias(self, "to_enum", "enum_for"); - - Opal.def(self, '$equal?', $Kernel_equal$ques$21 = function(other) { - var self = this; - - return self === other; - }, $Kernel_equal$ques$21.$$arity = 1); - - Opal.def(self, '$exit', $Kernel_exit$22 = function $$exit(status) { - var $a, self = this, block = nil; - if ($gvars.__at_exit__ == null) $gvars.__at_exit__ = nil; - - - - if (status == null) { - status = true; - }; - $gvars.__at_exit__ = ($truthy($a = $gvars.__at_exit__) ? $a : []); - while (!($truthy($gvars.__at_exit__['$empty?']()))) { - - block = $gvars.__at_exit__.$pop(); - block.$call(); - }; - - if (status.$$is_boolean) { - status = status ? 0 : 1; - } else { - status = $$($nesting, 'Opal').$coerce_to(status, $$($nesting, 'Integer'), "to_int") - } - - Opal.exit(status); - ; - return nil; - }, $Kernel_exit$22.$$arity = -1); - - Opal.def(self, '$extend', $Kernel_extend$23 = function $$extend($a) { - var $post_args, mods, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - mods = $post_args;; - - var singleton = self.$singleton_class(); - - for (var i = mods.length - 1; i >= 0; i--) { - var mod = mods[i]; - - if (!mod.$$is_module) { - self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + ((mod).$class()) + " (expected Module)"); - } - - (mod).$append_features(singleton); - (mod).$extend_object(self); - (mod).$extended(self); - } - ; - return self; - }, $Kernel_extend$23.$$arity = -1); - - Opal.def(self, '$hash', $Kernel_hash$24 = function $$hash() { - var self = this; - - return self.$__id__() - }, $Kernel_hash$24.$$arity = 0); - - Opal.def(self, '$initialize_copy', $Kernel_initialize_copy$25 = function $$initialize_copy(other) { - var self = this; - - return nil - }, $Kernel_initialize_copy$25.$$arity = 1); - - Opal.def(self, '$inspect', $Kernel_inspect$26 = function $$inspect() { - var self = this; - - return self.$to_s() - }, $Kernel_inspect$26.$$arity = 0); - - Opal.def(self, '$instance_of?', $Kernel_instance_of$ques$27 = function(klass) { - var self = this; - - - if (!klass.$$is_class && !klass.$$is_module) { - self.$raise($$($nesting, 'TypeError'), "class or module required"); - } - - return self.$$class === klass; - - }, $Kernel_instance_of$ques$27.$$arity = 1); - - Opal.def(self, '$instance_variable_defined?', $Kernel_instance_variable_defined$ques$28 = function(name) { - var self = this; - - - name = $$($nesting, 'Opal')['$instance_variable_name!'](name); - return Opal.hasOwnProperty.call(self, name.substr(1));; - }, $Kernel_instance_variable_defined$ques$28.$$arity = 1); - - Opal.def(self, '$instance_variable_get', $Kernel_instance_variable_get$29 = function $$instance_variable_get(name) { - var self = this; - - - name = $$($nesting, 'Opal')['$instance_variable_name!'](name); - - var ivar = self[Opal.ivar(name.substr(1))]; - - return ivar == null ? nil : ivar; - ; - }, $Kernel_instance_variable_get$29.$$arity = 1); - - Opal.def(self, '$instance_variable_set', $Kernel_instance_variable_set$30 = function $$instance_variable_set(name, value) { - var self = this; - - - name = $$($nesting, 'Opal')['$instance_variable_name!'](name); - return self[Opal.ivar(name.substr(1))] = value;; - }, $Kernel_instance_variable_set$30.$$arity = 2); - - Opal.def(self, '$remove_instance_variable', $Kernel_remove_instance_variable$31 = function $$remove_instance_variable(name) { - var self = this; - - - name = $$($nesting, 'Opal')['$instance_variable_name!'](name); - - var key = Opal.ivar(name.substr(1)), - val; - if (self.hasOwnProperty(key)) { - val = self[key]; - delete self[key]; - return val; - } - ; - return self.$raise($$($nesting, 'NameError'), "" + "instance variable " + (name) + " not defined"); - }, $Kernel_remove_instance_variable$31.$$arity = 1); - - Opal.def(self, '$instance_variables', $Kernel_instance_variables$32 = function $$instance_variables() { - var self = this; - - - var result = [], ivar; - - for (var name in self) { - if (self.hasOwnProperty(name) && name.charAt(0) !== '$') { - if (name.substr(-1) === '$') { - ivar = name.slice(0, name.length - 1); - } else { - ivar = name; - } - result.push('@' + ivar); - } - } - - return result; - - }, $Kernel_instance_variables$32.$$arity = 0); - - Opal.def(self, '$Integer', $Kernel_Integer$33 = function $$Integer(value, base) { - var self = this; - - - ; - - var i, str, base_digits; - - if (!value.$$is_string) { - if (base !== undefined) { - self.$raise($$($nesting, 'ArgumentError'), "base specified for non string value") - } - if (value === nil) { - self.$raise($$($nesting, 'TypeError'), "can't convert nil into Integer") - } - if (value.$$is_number) { - if (value === Infinity || value === -Infinity || isNaN(value)) { - self.$raise($$($nesting, 'FloatDomainError'), value) - } - return Math.floor(value); - } - if (value['$respond_to?']("to_int")) { - i = value.$to_int(); - if (i !== nil) { - return i; - } - } - return $$($nesting, 'Opal')['$coerce_to!'](value, $$($nesting, 'Integer'), "to_i"); - } - - if (value === "0") { - return 0; - } - - if (base === undefined) { - base = 0; - } else { - base = $$($nesting, 'Opal').$coerce_to(base, $$($nesting, 'Integer'), "to_int"); - if (base === 1 || base < 0 || base > 36) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid radix " + (base)) - } - } - - str = value.toLowerCase(); - - str = str.replace(/(\d)_(?=\d)/g, '$1'); - - str = str.replace(/^(\s*[+-]?)(0[bodx]?)/, function (_, head, flag) { - switch (flag) { - case '0b': - if (base === 0 || base === 2) { - base = 2; - return head; - } - case '0': - case '0o': - if (base === 0 || base === 8) { - base = 8; - return head; - } - case '0d': - if (base === 0 || base === 10) { - base = 10; - return head; - } - case '0x': - if (base === 0 || base === 16) { - base = 16; - return head; - } - } - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid value for Integer(): \"" + (value) + "\"") - }); - - base = (base === 0 ? 10 : base); - - base_digits = '0-' + (base <= 10 ? base - 1 : '9a-' + String.fromCharCode(97 + (base - 11))); - - if (!(new RegExp('^\\s*[+-]?[' + base_digits + ']+\\s*$')).test(str)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid value for Integer(): \"" + (value) + "\"") - } - - i = parseInt(str, base); - - if (isNaN(i)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid value for Integer(): \"" + (value) + "\"") - } - - return i; - ; - }, $Kernel_Integer$33.$$arity = -2); - - Opal.def(self, '$Float', $Kernel_Float$34 = function $$Float(value) { - var self = this; - - - var str; - - if (value === nil) { - self.$raise($$($nesting, 'TypeError'), "can't convert nil into Float") - } - - if (value.$$is_string) { - str = value.toString(); - - str = str.replace(/(\d)_(?=\d)/g, '$1'); - - //Special case for hex strings only: - if (/^\s*[-+]?0[xX][0-9a-fA-F]+\s*$/.test(str)) { - return self.$Integer(str); - } - - if (!/^\s*[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?\s*$/.test(str)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid value for Float(): \"" + (value) + "\"") - } - - return parseFloat(str); - } - - return $$($nesting, 'Opal')['$coerce_to!'](value, $$($nesting, 'Float'), "to_f"); - - }, $Kernel_Float$34.$$arity = 1); - - Opal.def(self, '$Hash', $Kernel_Hash$35 = function $$Hash(arg) { - var $a, self = this; - - - if ($truthy(($truthy($a = arg['$nil?']()) ? $a : arg['$==']([])))) { - return $hash2([], {})}; - if ($truthy($$($nesting, 'Hash')['$==='](arg))) { - return arg}; - return $$($nesting, 'Opal')['$coerce_to!'](arg, $$($nesting, 'Hash'), "to_hash"); - }, $Kernel_Hash$35.$$arity = 1); - - Opal.def(self, '$is_a?', $Kernel_is_a$ques$36 = function(klass) { - var self = this; - - - if (!klass.$$is_class && !klass.$$is_module) { - self.$raise($$($nesting, 'TypeError'), "class or module required"); - } - - return Opal.is_a(self, klass); - - }, $Kernel_is_a$ques$36.$$arity = 1); - - Opal.def(self, '$itself', $Kernel_itself$37 = function $$itself() { - var self = this; - - return self - }, $Kernel_itself$37.$$arity = 0); - Opal.alias(self, "kind_of?", "is_a?"); - - Opal.def(self, '$lambda', $Kernel_lambda$38 = function $$lambda() { - var $iter = $Kernel_lambda$38.$$p, block = $iter || nil, self = this; - - if ($iter) $Kernel_lambda$38.$$p = null; - - - if ($iter) $Kernel_lambda$38.$$p = null;; - return Opal.lambda(block);; - }, $Kernel_lambda$38.$$arity = 0); - - Opal.def(self, '$load', $Kernel_load$39 = function $$load(file) { - var self = this; - - - file = $$($nesting, 'Opal')['$coerce_to!'](file, $$($nesting, 'String'), "to_str"); - return Opal.load(file); - }, $Kernel_load$39.$$arity = 1); - - Opal.def(self, '$loop', $Kernel_loop$40 = function $$loop() { - var $$41, $a, $iter = $Kernel_loop$40.$$p, $yield = $iter || nil, self = this, e = nil; - - if ($iter) $Kernel_loop$40.$$p = null; - - if (($yield !== nil)) { - } else { - return $send(self, 'enum_for', ["loop"], ($$41 = function(){var self = $$41.$$s || this; - - return $$$($$($nesting, 'Float'), 'INFINITY')}, $$41.$$s = self, $$41.$$arity = 0, $$41)) - }; - while ($truthy(true)) { - - try { - Opal.yieldX($yield, []) - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StopIteration')])) {e = $err; - try { - return e.$result() - } finally { Opal.pop_exception() } - } else { throw $err; } - }; - }; - return self; - }, $Kernel_loop$40.$$arity = 0); - - Opal.def(self, '$nil?', $Kernel_nil$ques$42 = function() { - var self = this; - - return false - }, $Kernel_nil$ques$42.$$arity = 0); - Opal.alias(self, "object_id", "__id__"); - - Opal.def(self, '$printf', $Kernel_printf$43 = function $$printf($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy(args['$any?']())) { - self.$print($send(self, 'format', Opal.to_a(args)))}; - return nil; - }, $Kernel_printf$43.$$arity = -1); - - Opal.def(self, '$proc', $Kernel_proc$44 = function $$proc() { - var $iter = $Kernel_proc$44.$$p, block = $iter || nil, self = this; - - if ($iter) $Kernel_proc$44.$$p = null; - - - if ($iter) $Kernel_proc$44.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to create Proc object without a block") - }; - block.$$is_lambda = false; - return block; - }, $Kernel_proc$44.$$arity = 0); - - Opal.def(self, '$puts', $Kernel_puts$45 = function $$puts($a) { - var $post_args, strs, self = this; - if ($gvars.stdout == null) $gvars.stdout = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - strs = $post_args;; - return $send($gvars.stdout, 'puts', Opal.to_a(strs)); - }, $Kernel_puts$45.$$arity = -1); - - Opal.def(self, '$p', $Kernel_p$46 = function $$p($a) { - var $post_args, args, $$47, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - $send(args, 'each', [], ($$47 = function(obj){var self = $$47.$$s || this; - if ($gvars.stdout == null) $gvars.stdout = nil; - - - - if (obj == null) { - obj = nil; - }; - return $gvars.stdout.$puts(obj.$inspect());}, $$47.$$s = self, $$47.$$arity = 1, $$47)); - if ($truthy($rb_le(args.$length(), 1))) { - return args['$[]'](0) - } else { - return args - }; - }, $Kernel_p$46.$$arity = -1); - - Opal.def(self, '$print', $Kernel_print$48 = function $$print($a) { - var $post_args, strs, self = this; - if ($gvars.stdout == null) $gvars.stdout = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - strs = $post_args;; - return $send($gvars.stdout, 'print', Opal.to_a(strs)); - }, $Kernel_print$48.$$arity = -1); - - Opal.def(self, '$warn', $Kernel_warn$49 = function $$warn($a) { - var $post_args, strs, $b, self = this; - if ($gvars.VERBOSE == null) $gvars.VERBOSE = nil; - if ($gvars.stderr == null) $gvars.stderr = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - strs = $post_args;; - if ($truthy(($truthy($b = $gvars.VERBOSE['$nil?']()) ? $b : strs['$empty?']()))) { - return nil - } else { - return $send($gvars.stderr, 'puts', Opal.to_a(strs)) - }; - }, $Kernel_warn$49.$$arity = -1); - - Opal.def(self, '$raise', $Kernel_raise$50 = function $$raise(exception, string, _backtrace) { - var self = this; - if ($gvars["!"] == null) $gvars["!"] = nil; - - - ; - - if (string == null) { - string = nil; - }; - - if (_backtrace == null) { - _backtrace = nil; - }; - - if (exception == null && $gvars["!"] !== nil) { - throw $gvars["!"]; - } - if (exception == null) { - exception = $$($nesting, 'RuntimeError').$new(); - } - else if (exception.$$is_string) { - exception = $$($nesting, 'RuntimeError').$new(exception); - } - // using respond_to? and not an undefined check to avoid method_missing matching as true - else if (exception.$$is_class && exception['$respond_to?']("exception")) { - exception = exception.$exception(string); - } - else if (exception['$is_a?']($$($nesting, 'Exception'))) { - // exception is fine - } - else { - exception = $$($nesting, 'TypeError').$new("exception class/object expected"); - } - - if ($gvars["!"] !== nil) { - Opal.exceptions.push($gvars["!"]); - } - - $gvars["!"] = exception; - - throw exception; - ; - }, $Kernel_raise$50.$$arity = -1); - Opal.alias(self, "fail", "raise"); - - Opal.def(self, '$rand', $Kernel_rand$51 = function $$rand(max) { - var self = this; - - - ; - - if (max === undefined) { - return $$$($$($nesting, 'Random'), 'DEFAULT').$rand(); - } - - if (max.$$is_number) { - if (max < 0) { - max = Math.abs(max); - } - - if (max % 1 !== 0) { - max = max.$to_i(); - } - - if (max === 0) { - max = undefined; - } - } - ; - return $$$($$($nesting, 'Random'), 'DEFAULT').$rand(max); - }, $Kernel_rand$51.$$arity = -1); - - Opal.def(self, '$respond_to?', $Kernel_respond_to$ques$52 = function(name, include_all) { - var self = this; - - - - if (include_all == null) { - include_all = false; - }; - if ($truthy(self['$respond_to_missing?'](name, include_all))) { - return true}; - - var body = self['$' + name]; - - if (typeof(body) === "function" && !body.$$stub) { - return true; - } - ; - return false; - }, $Kernel_respond_to$ques$52.$$arity = -2); - - Opal.def(self, '$respond_to_missing?', $Kernel_respond_to_missing$ques$53 = function(method_name, include_all) { - var self = this; - - - - if (include_all == null) { - include_all = false; - }; - return false; - }, $Kernel_respond_to_missing$ques$53.$$arity = -2); - - Opal.def(self, '$require', $Kernel_require$54 = function $$require(file) { - var self = this; - - - file = $$($nesting, 'Opal')['$coerce_to!'](file, $$($nesting, 'String'), "to_str"); - return Opal.require(file); - }, $Kernel_require$54.$$arity = 1); - - Opal.def(self, '$require_relative', $Kernel_require_relative$55 = function $$require_relative(file) { - var self = this; - - - $$($nesting, 'Opal')['$try_convert!'](file, $$($nesting, 'String'), "to_str"); - file = $$($nesting, 'File').$expand_path($$($nesting, 'File').$join(Opal.current_file, "..", file)); - return Opal.require(file); - }, $Kernel_require_relative$55.$$arity = 1); - - Opal.def(self, '$require_tree', $Kernel_require_tree$56 = function $$require_tree(path) { - var self = this; - - - var result = []; - - path = $$($nesting, 'File').$expand_path(path) - path = Opal.normalize(path); - if (path === '.') path = ''; - for (var name in Opal.modules) { - if ((name)['$start_with?'](path)) { - result.push([name, Opal.require(name)]); - } - } - - return result; - - }, $Kernel_require_tree$56.$$arity = 1); - Opal.alias(self, "send", "__send__"); - Opal.alias(self, "public_send", "__send__"); - - Opal.def(self, '$singleton_class', $Kernel_singleton_class$57 = function $$singleton_class() { - var self = this; - - return Opal.get_singleton_class(self); - }, $Kernel_singleton_class$57.$$arity = 0); - - Opal.def(self, '$sleep', $Kernel_sleep$58 = function $$sleep(seconds) { - var self = this; - - - - if (seconds == null) { - seconds = nil; - }; - - if (seconds === nil) { - self.$raise($$($nesting, 'TypeError'), "can't convert NilClass into time interval") - } - if (!seconds.$$is_number) { - self.$raise($$($nesting, 'TypeError'), "" + "can't convert " + (seconds.$class()) + " into time interval") - } - if (seconds < 0) { - self.$raise($$($nesting, 'ArgumentError'), "time interval must be positive") - } - var get_time = Opal.global.performance ? - function() {return performance.now()} : - function() {return new Date()} - - var t = get_time(); - while (get_time() - t <= seconds * 1000); - return seconds; - ; - }, $Kernel_sleep$58.$$arity = -1); - - Opal.def(self, '$srand', $Kernel_srand$59 = function $$srand(seed) { - var self = this; - - - - if (seed == null) { - seed = $$($nesting, 'Random').$new_seed(); - }; - return $$($nesting, 'Random').$srand(seed); - }, $Kernel_srand$59.$$arity = -1); - - Opal.def(self, '$String', $Kernel_String$60 = function $$String(str) { - var $a, self = this; - - return ($truthy($a = $$($nesting, 'Opal')['$coerce_to?'](str, $$($nesting, 'String'), "to_str")) ? $a : $$($nesting, 'Opal')['$coerce_to!'](str, $$($nesting, 'String'), "to_s")) - }, $Kernel_String$60.$$arity = 1); - - Opal.def(self, '$tap', $Kernel_tap$61 = function $$tap() { - var $iter = $Kernel_tap$61.$$p, block = $iter || nil, self = this; - - if ($iter) $Kernel_tap$61.$$p = null; - - - if ($iter) $Kernel_tap$61.$$p = null;; - Opal.yield1(block, self); - return self; - }, $Kernel_tap$61.$$arity = 0); - - Opal.def(self, '$to_proc', $Kernel_to_proc$62 = function $$to_proc() { - var self = this; - - return self - }, $Kernel_to_proc$62.$$arity = 0); - - Opal.def(self, '$to_s', $Kernel_to_s$63 = function $$to_s() { - var self = this; - - return "" + "#<" + (self.$class()) + ":0x" + (self.$__id__().$to_s(16)) + ">" - }, $Kernel_to_s$63.$$arity = 0); - - Opal.def(self, '$catch', $Kernel_catch$64 = function(sym) { - var $iter = $Kernel_catch$64.$$p, $yield = $iter || nil, self = this, e = nil; - - if ($iter) $Kernel_catch$64.$$p = null; - try { - return Opal.yieldX($yield, []); - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'UncaughtThrowError')])) {e = $err; - try { - - if (e.$sym()['$=='](sym)) { - return e.$arg()}; - return self.$raise(); - } finally { Opal.pop_exception() } - } else { throw $err; } - } - }, $Kernel_catch$64.$$arity = 1); - - Opal.def(self, '$throw', $Kernel_throw$65 = function($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return self.$raise($$($nesting, 'UncaughtThrowError'), args); - }, $Kernel_throw$65.$$arity = -1); - - Opal.def(self, '$open', $Kernel_open$66 = function $$open($a) { - var $iter = $Kernel_open$66.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Kernel_open$66.$$p = null; - - - if ($iter) $Kernel_open$66.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send($$($nesting, 'File'), 'open', Opal.to_a(args), block.$to_proc()); - }, $Kernel_open$66.$$arity = -1); - - Opal.def(self, '$yield_self', $Kernel_yield_self$67 = function $$yield_self() { - var $$68, $iter = $Kernel_yield_self$67.$$p, $yield = $iter || nil, self = this; - - if ($iter) $Kernel_yield_self$67.$$p = null; - - if (($yield !== nil)) { - } else { - return $send(self, 'enum_for', ["yield_self"], ($$68 = function(){var self = $$68.$$s || this; - - return 1}, $$68.$$s = self, $$68.$$arity = 0, $$68)) - }; - return Opal.yield1($yield, self);; - }, $Kernel_yield_self$67.$$arity = 0); - })($nesting[0], $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Object'); - - var $nesting = [self].concat($parent_nesting); - - return self.$include($$($nesting, 'Kernel')) - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/error"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $module = Opal.module, $hash2 = Opal.hash2; - - Opal.add_stubs(['$new', '$clone', '$to_s', '$empty?', '$class', '$raise', '$+', '$attr_reader', '$[]', '$>', '$length', '$inspect']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Exception'); - - var $nesting = [self].concat($parent_nesting), $Exception_new$1, $Exception_exception$2, $Exception_initialize$3, $Exception_backtrace$4, $Exception_exception$5, $Exception_message$6, $Exception_inspect$7, $Exception_set_backtrace$8, $Exception_to_s$9; - - self.$$prototype.message = nil; - - var stack_trace_limit; - Opal.defs(self, '$new', $Exception_new$1 = function($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - var message = (args.length > 0) ? args[0] : nil; - var error = new self.$$constructor(message); - error.name = self.$$name; - error.message = message; - Opal.send(error, error.$initialize, args); - - // Error.captureStackTrace() will use .name and .toString to build the - // first line of the stack trace so it must be called after the error - // has been initialized. - // https://nodejs.org/dist/latest-v6.x/docs/api/errors.html - if (Opal.config.enable_stack_trace && Error.captureStackTrace) { - // Passing Kernel.raise will cut the stack trace from that point above - Error.captureStackTrace(error, stack_trace_limit); - } - - return error; - ; - }, $Exception_new$1.$$arity = -1); - stack_trace_limit = self.$new; - Opal.defs(self, '$exception', $Exception_exception$2 = function $$exception($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'new', Opal.to_a(args)); - }, $Exception_exception$2.$$arity = -1); - - Opal.def(self, '$initialize', $Exception_initialize$3 = function $$initialize($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return self.message = (args.length > 0) ? args[0] : nil;; - }, $Exception_initialize$3.$$arity = -1); - - Opal.def(self, '$backtrace', $Exception_backtrace$4 = function $$backtrace() { - var self = this; - - - if (self.backtrace) { - // nil is a valid backtrace - return self.backtrace; - } - - var backtrace = self.stack; - - if (typeof(backtrace) === 'string') { - return backtrace.split("\n").slice(0, 15); - } - else if (backtrace) { - return backtrace.slice(0, 15); - } - - return []; - - }, $Exception_backtrace$4.$$arity = 0); - - Opal.def(self, '$exception', $Exception_exception$5 = function $$exception(str) { - var self = this; - - - - if (str == null) { - str = nil; - }; - - if (str === nil || self === str) { - return self; - } - - var cloned = self.$clone(); - cloned.message = str; - return cloned; - ; - }, $Exception_exception$5.$$arity = -1); - - Opal.def(self, '$message', $Exception_message$6 = function $$message() { - var self = this; - - return self.$to_s() - }, $Exception_message$6.$$arity = 0); - - Opal.def(self, '$inspect', $Exception_inspect$7 = function $$inspect() { - var self = this, as_str = nil; - - - as_str = self.$to_s(); - if ($truthy(as_str['$empty?']())) { - return self.$class().$to_s() - } else { - return "" + "#<" + (self.$class().$to_s()) + ": " + (self.$to_s()) + ">" - }; - }, $Exception_inspect$7.$$arity = 0); - - Opal.def(self, '$set_backtrace', $Exception_set_backtrace$8 = function $$set_backtrace(backtrace) { - var self = this; - - - var valid = true, i, ii; - - if (backtrace === nil) { - self.backtrace = nil; - } else if (backtrace.$$is_string) { - self.backtrace = [backtrace]; - } else { - if (backtrace.$$is_array) { - for (i = 0, ii = backtrace.length; i < ii; i++) { - if (!backtrace[i].$$is_string) { - valid = false; - break; - } - } - } else { - valid = false; - } - - if (valid === false) { - self.$raise($$($nesting, 'TypeError'), "backtrace must be Array of String") - } - - self.backtrace = backtrace; - } - - return backtrace; - - }, $Exception_set_backtrace$8.$$arity = 1); - return (Opal.def(self, '$to_s', $Exception_to_s$9 = function $$to_s() { - var $a, $b, self = this; - - return ($truthy($a = ($truthy($b = self.message) ? self.message.$to_s() : $b)) ? $a : self.$class().$to_s()) - }, $Exception_to_s$9.$$arity = 0), nil) && 'to_s'; - })($nesting[0], Error, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'ScriptError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'Exception'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'SyntaxError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'ScriptError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'LoadError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'ScriptError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NotImplementedError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'ScriptError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'SystemExit'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'Exception'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NoMemoryError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'Exception'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'SignalException'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'Exception'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Interrupt'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'Exception'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'SecurityError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'Exception'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'StandardError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'Exception'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'EncodingError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'ZeroDivisionError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NameError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NoMethodError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'NameError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'RuntimeError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'FrozenError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'RuntimeError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'LocalJumpError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'TypeError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'ArgumentError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'IndexError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'StopIteration'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'IndexError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'KeyError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'IndexError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'RangeError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'FloatDomainError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'RangeError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'IOError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'SystemCallError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Errno'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'EINVAL'); - - var $nesting = [self].concat($parent_nesting), $EINVAL_new$10; - - return (Opal.defs(self, '$new', $EINVAL_new$10 = function(name) { - var $iter = $EINVAL_new$10.$$p, $yield = $iter || nil, self = this, message = nil; - - if ($iter) $EINVAL_new$10.$$p = null; - - - if (name == null) { - name = nil; - }; - message = "Invalid argument"; - if ($truthy(name)) { - message = $rb_plus(message, "" + " - " + (name))}; - return $send(self, Opal.find_super_dispatcher(self, 'new', $EINVAL_new$10, false, self.$$class.$$prototype), [message], null); - }, $EINVAL_new$10.$$arity = -1), nil) && 'new' - })($nesting[0], $$($nesting, 'SystemCallError'), $nesting) - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'UncaughtThrowError'); - - var $nesting = [self].concat($parent_nesting), $UncaughtThrowError_initialize$11; - - self.$$prototype.sym = nil; - - self.$attr_reader("sym", "arg"); - return (Opal.def(self, '$initialize', $UncaughtThrowError_initialize$11 = function $$initialize(args) { - var $iter = $UncaughtThrowError_initialize$11.$$p, $yield = $iter || nil, self = this; - - if ($iter) $UncaughtThrowError_initialize$11.$$p = null; - - self.sym = args['$[]'](0); - if ($truthy($rb_gt(args.$length(), 1))) { - self.arg = args['$[]'](1)}; - return $send(self, Opal.find_super_dispatcher(self, 'initialize', $UncaughtThrowError_initialize$11, false), ["" + "uncaught throw " + (self.sym.$inspect())], null); - }, $UncaughtThrowError_initialize$11.$$arity = 1), nil) && 'initialize'; - })($nesting[0], $$($nesting, 'ArgumentError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NameError'); - - var $nesting = [self].concat($parent_nesting), $NameError_initialize$12; - - - self.$attr_reader("name"); - return (Opal.def(self, '$initialize', $NameError_initialize$12 = function $$initialize(message, name) { - var $iter = $NameError_initialize$12.$$p, $yield = $iter || nil, self = this; - - if ($iter) $NameError_initialize$12.$$p = null; - - - if (name == null) { - name = nil; - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $NameError_initialize$12, false), [message], null); - return (self.name = name); - }, $NameError_initialize$12.$$arity = -2), nil) && 'initialize'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NoMethodError'); - - var $nesting = [self].concat($parent_nesting), $NoMethodError_initialize$13; - - - self.$attr_reader("args"); - return (Opal.def(self, '$initialize', $NoMethodError_initialize$13 = function $$initialize(message, name, args) { - var $iter = $NoMethodError_initialize$13.$$p, $yield = $iter || nil, self = this; - - if ($iter) $NoMethodError_initialize$13.$$p = null; - - - if (name == null) { - name = nil; - }; - - if (args == null) { - args = []; - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $NoMethodError_initialize$13, false), [message, name], null); - return (self.args = args); - }, $NoMethodError_initialize$13.$$arity = -2), nil) && 'initialize'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'StopIteration'); - - var $nesting = [self].concat($parent_nesting); - - return self.$attr_reader("result") - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'KeyError'); - - var $nesting = [self].concat($parent_nesting), $KeyError_initialize$14, $KeyError_receiver$15, $KeyError_key$16; - - self.$$prototype.receiver = self.$$prototype.key = nil; - - - Opal.def(self, '$initialize', $KeyError_initialize$14 = function $$initialize(message, $kwargs) { - var receiver, key, $iter = $KeyError_initialize$14.$$p, $yield = $iter || nil, self = this; - - if ($iter) $KeyError_initialize$14.$$p = null; - - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - receiver = $kwargs.$$smap["receiver"]; - if (receiver == null) { - receiver = nil - }; - - key = $kwargs.$$smap["key"]; - if (key == null) { - key = nil - }; - $send(self, Opal.find_super_dispatcher(self, 'initialize', $KeyError_initialize$14, false), [message], null); - self.receiver = receiver; - return (self.key = key); - }, $KeyError_initialize$14.$$arity = -2); - - Opal.def(self, '$receiver', $KeyError_receiver$15 = function $$receiver() { - var $a, self = this; - - return ($truthy($a = self.receiver) ? $a : self.$raise($$($nesting, 'ArgumentError'), "no receiver is available")) - }, $KeyError_receiver$15.$$arity = 0); - return (Opal.def(self, '$key', $KeyError_key$16 = function $$key() { - var $a, self = this; - - return ($truthy($a = self.key) ? $a : self.$raise($$($nesting, 'ArgumentError'), "no key is available")) - }, $KeyError_key$16.$$arity = 0), nil) && 'key'; - })($nesting[0], null, $nesting); - return (function($base, $parent_nesting) { - var self = $module($base, 'JS'); - - var $nesting = [self].concat($parent_nesting); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Error'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], null, $nesting) - })($nesting[0], $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/constants"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - - Opal.const_set($nesting[0], 'RUBY_PLATFORM', "opal"); - Opal.const_set($nesting[0], 'RUBY_ENGINE', "opal"); - Opal.const_set($nesting[0], 'RUBY_VERSION', "2.5.1"); - Opal.const_set($nesting[0], 'RUBY_ENGINE_VERSION', "0.11.99.dev"); - Opal.const_set($nesting[0], 'RUBY_RELEASE_DATE', "2018-12-25"); - Opal.const_set($nesting[0], 'RUBY_PATCHLEVEL', 0); - Opal.const_set($nesting[0], 'RUBY_REVISION', 0); - Opal.const_set($nesting[0], 'RUBY_COPYRIGHT', "opal - Copyright (C) 2013-2018 Adam Beynon and the Opal contributors"); - return Opal.const_set($nesting[0], 'RUBY_DESCRIPTION', "" + "opal " + ($$($nesting, 'RUBY_ENGINE_VERSION')) + " (" + ($$($nesting, 'RUBY_RELEASE_DATE')) + " revision " + ($$($nesting, 'RUBY_REVISION')) + ")"); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["opal/base"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - self.$require("corelib/runtime"); - self.$require("corelib/helpers"); - self.$require("corelib/module"); - self.$require("corelib/class"); - self.$require("corelib/basic_object"); - self.$require("corelib/kernel"); - self.$require("corelib/error"); - return self.$require("corelib/constants"); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/nil"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy; - - Opal.add_stubs(['$raise', '$name', '$new', '$>', '$length', '$Rational']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'NilClass'); - - var $nesting = [self].concat($parent_nesting), $NilClass_$excl$2, $NilClass_$$3, $NilClass_$$4, $NilClass_$$5, $NilClass_$eq_eq$6, $NilClass_dup$7, $NilClass_clone$8, $NilClass_inspect$9, $NilClass_nil$ques$10, $NilClass_singleton_class$11, $NilClass_to_a$12, $NilClass_to_h$13, $NilClass_to_i$14, $NilClass_to_s$15, $NilClass_to_c$16, $NilClass_rationalize$17, $NilClass_to_r$18, $NilClass_instance_variables$19; - - - self.$$prototype.$$meta = self; - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $allocate$1; - - - - Opal.def(self, '$allocate', $allocate$1 = function $$allocate() { - var self = this; - - return self.$raise($$($nesting, 'TypeError'), "" + "allocator undefined for " + (self.$name())) - }, $allocate$1.$$arity = 0); - - - Opal.udef(self, '$' + "new");; - return nil;; - })(Opal.get_singleton_class(self), $nesting); - - Opal.def(self, '$!', $NilClass_$excl$2 = function() { - var self = this; - - return true - }, $NilClass_$excl$2.$$arity = 0); - - Opal.def(self, '$&', $NilClass_$$3 = function(other) { - var self = this; - - return false - }, $NilClass_$$3.$$arity = 1); - - Opal.def(self, '$|', $NilClass_$$4 = function(other) { - var self = this; - - return other !== false && other !== nil; - }, $NilClass_$$4.$$arity = 1); - - Opal.def(self, '$^', $NilClass_$$5 = function(other) { - var self = this; - - return other !== false && other !== nil; - }, $NilClass_$$5.$$arity = 1); - - Opal.def(self, '$==', $NilClass_$eq_eq$6 = function(other) { - var self = this; - - return other === nil; - }, $NilClass_$eq_eq$6.$$arity = 1); - - Opal.def(self, '$dup', $NilClass_dup$7 = function $$dup() { - var self = this; - - return nil - }, $NilClass_dup$7.$$arity = 0); - - Opal.def(self, '$clone', $NilClass_clone$8 = function $$clone($kwargs) { - var freeze, self = this; - - - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - freeze = $kwargs.$$smap["freeze"]; - if (freeze == null) { - freeze = true - }; - return nil; - }, $NilClass_clone$8.$$arity = -1); - - Opal.def(self, '$inspect', $NilClass_inspect$9 = function $$inspect() { - var self = this; - - return "nil" - }, $NilClass_inspect$9.$$arity = 0); - - Opal.def(self, '$nil?', $NilClass_nil$ques$10 = function() { - var self = this; - - return true - }, $NilClass_nil$ques$10.$$arity = 0); - - Opal.def(self, '$singleton_class', $NilClass_singleton_class$11 = function $$singleton_class() { - var self = this; - - return $$($nesting, 'NilClass') - }, $NilClass_singleton_class$11.$$arity = 0); - - Opal.def(self, '$to_a', $NilClass_to_a$12 = function $$to_a() { - var self = this; - - return [] - }, $NilClass_to_a$12.$$arity = 0); - - Opal.def(self, '$to_h', $NilClass_to_h$13 = function $$to_h() { - var self = this; - - return Opal.hash(); - }, $NilClass_to_h$13.$$arity = 0); - - Opal.def(self, '$to_i', $NilClass_to_i$14 = function $$to_i() { - var self = this; - - return 0 - }, $NilClass_to_i$14.$$arity = 0); - Opal.alias(self, "to_f", "to_i"); - - Opal.def(self, '$to_s', $NilClass_to_s$15 = function $$to_s() { - var self = this; - - return "" - }, $NilClass_to_s$15.$$arity = 0); - - Opal.def(self, '$to_c', $NilClass_to_c$16 = function $$to_c() { - var self = this; - - return $$($nesting, 'Complex').$new(0, 0) - }, $NilClass_to_c$16.$$arity = 0); - - Opal.def(self, '$rationalize', $NilClass_rationalize$17 = function $$rationalize($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy($rb_gt(args.$length(), 1))) { - self.$raise($$($nesting, 'ArgumentError'))}; - return self.$Rational(0, 1); - }, $NilClass_rationalize$17.$$arity = -1); - - Opal.def(self, '$to_r', $NilClass_to_r$18 = function $$to_r() { - var self = this; - - return self.$Rational(0, 1) - }, $NilClass_to_r$18.$$arity = 0); - return (Opal.def(self, '$instance_variables', $NilClass_instance_variables$19 = function $$instance_variables() { - var self = this; - - return [] - }, $NilClass_instance_variables$19.$$arity = 0), nil) && 'instance_variables'; - })($nesting[0], null, $nesting); - return Opal.const_set($nesting[0], 'NIL', nil); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/boolean"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2; - - Opal.add_stubs(['$raise', '$name']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Boolean'); - - var $nesting = [self].concat($parent_nesting), $Boolean___id__$2, $Boolean_$excl$3, $Boolean_$$4, $Boolean_$$5, $Boolean_$$6, $Boolean_$eq_eq$7, $Boolean_singleton_class$8, $Boolean_to_s$9, $Boolean_dup$10, $Boolean_clone$11; - - - Opal.defineProperty(self.$$prototype, '$$is_boolean', true); - Opal.defineProperty(self.$$prototype, '$$meta', self); - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $allocate$1; - - - - Opal.def(self, '$allocate', $allocate$1 = function $$allocate() { - var self = this; - - return self.$raise($$($nesting, 'TypeError'), "" + "allocator undefined for " + (self.$name())) - }, $allocate$1.$$arity = 0); - - - Opal.udef(self, '$' + "new");; - return nil;; - })(Opal.get_singleton_class(self), $nesting); - - Opal.def(self, '$__id__', $Boolean___id__$2 = function $$__id__() { - var self = this; - - return self.valueOf() ? 2 : 0; - }, $Boolean___id__$2.$$arity = 0); - Opal.alias(self, "object_id", "__id__"); - - Opal.def(self, '$!', $Boolean_$excl$3 = function() { - var self = this; - - return self != true; - }, $Boolean_$excl$3.$$arity = 0); - - Opal.def(self, '$&', $Boolean_$$4 = function(other) { - var self = this; - - return (self == true) ? (other !== false && other !== nil) : false; - }, $Boolean_$$4.$$arity = 1); - - Opal.def(self, '$|', $Boolean_$$5 = function(other) { - var self = this; - - return (self == true) ? true : (other !== false && other !== nil); - }, $Boolean_$$5.$$arity = 1); - - Opal.def(self, '$^', $Boolean_$$6 = function(other) { - var self = this; - - return (self == true) ? (other === false || other === nil) : (other !== false && other !== nil); - }, $Boolean_$$6.$$arity = 1); - - Opal.def(self, '$==', $Boolean_$eq_eq$7 = function(other) { - var self = this; - - return (self == true) === other.valueOf(); - }, $Boolean_$eq_eq$7.$$arity = 1); - Opal.alias(self, "equal?", "=="); - Opal.alias(self, "eql?", "=="); - - Opal.def(self, '$singleton_class', $Boolean_singleton_class$8 = function $$singleton_class() { - var self = this; - - return $$($nesting, 'Boolean') - }, $Boolean_singleton_class$8.$$arity = 0); - - Opal.def(self, '$to_s', $Boolean_to_s$9 = function $$to_s() { - var self = this; - - return (self == true) ? 'true' : 'false'; - }, $Boolean_to_s$9.$$arity = 0); - - Opal.def(self, '$dup', $Boolean_dup$10 = function $$dup() { - var self = this; - - return self - }, $Boolean_dup$10.$$arity = 0); - return (Opal.def(self, '$clone', $Boolean_clone$11 = function $$clone($kwargs) { - var freeze, self = this; - - - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - freeze = $kwargs.$$smap["freeze"]; - if (freeze == null) { - freeze = true - }; - return self; - }, $Boolean_clone$11.$$arity = -1), nil) && 'clone'; - })($nesting[0], Boolean, $nesting); - Opal.const_set($nesting[0], 'TrueClass', $$($nesting, 'Boolean')); - Opal.const_set($nesting[0], 'FalseClass', $$($nesting, 'Boolean')); - Opal.const_set($nesting[0], 'TRUE', true); - return Opal.const_set($nesting[0], 'FALSE', false); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/comparable"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy; - - Opal.add_stubs(['$===', '$>', '$<', '$equal?', '$<=>', '$normalize', '$raise', '$class']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Comparable'); - - var $nesting = [self].concat($parent_nesting), $Comparable_normalize$1, $Comparable_$eq_eq$2, $Comparable_$gt$3, $Comparable_$gt_eq$4, $Comparable_$lt$5, $Comparable_$lt_eq$6, $Comparable_between$ques$7, $Comparable_clamp$8; - - - Opal.defs(self, '$normalize', $Comparable_normalize$1 = function $$normalize(what) { - var self = this; - - - if ($truthy($$($nesting, 'Integer')['$==='](what))) { - return what}; - if ($truthy($rb_gt(what, 0))) { - return 1}; - if ($truthy($rb_lt(what, 0))) { - return -1}; - return 0; - }, $Comparable_normalize$1.$$arity = 1); - - Opal.def(self, '$==', $Comparable_$eq_eq$2 = function(other) { - var self = this, cmp = nil; - - try { - - if ($truthy(self['$equal?'](other))) { - return true}; - - if (self["$<=>"] == Opal.Kernel["$<=>"]) { - return false; - } - - // check for infinite recursion - if (self.$$comparable) { - delete self.$$comparable; - return false; - } - ; - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - return false - }; - return $$($nesting, 'Comparable').$normalize(cmp) == 0; - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return false - } finally { Opal.pop_exception() } - } else { throw $err; } - } - }, $Comparable_$eq_eq$2.$$arity = 1); - - Opal.def(self, '$>', $Comparable_$gt$3 = function(other) { - var self = this, cmp = nil; - - - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed") - }; - return $$($nesting, 'Comparable').$normalize(cmp) > 0; - }, $Comparable_$gt$3.$$arity = 1); - - Opal.def(self, '$>=', $Comparable_$gt_eq$4 = function(other) { - var self = this, cmp = nil; - - - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed") - }; - return $$($nesting, 'Comparable').$normalize(cmp) >= 0; - }, $Comparable_$gt_eq$4.$$arity = 1); - - Opal.def(self, '$<', $Comparable_$lt$5 = function(other) { - var self = this, cmp = nil; - - - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed") - }; - return $$($nesting, 'Comparable').$normalize(cmp) < 0; - }, $Comparable_$lt$5.$$arity = 1); - - Opal.def(self, '$<=', $Comparable_$lt_eq$6 = function(other) { - var self = this, cmp = nil; - - - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed") - }; - return $$($nesting, 'Comparable').$normalize(cmp) <= 0; - }, $Comparable_$lt_eq$6.$$arity = 1); - - Opal.def(self, '$between?', $Comparable_between$ques$7 = function(min, max) { - var self = this; - - - if ($rb_lt(self, min)) { - return false}; - if ($rb_gt(self, max)) { - return false}; - return true; - }, $Comparable_between$ques$7.$$arity = 2); - - Opal.def(self, '$clamp', $Comparable_clamp$8 = function $$clamp(min, max) { - var self = this, cmp = nil; - - - cmp = min['$<=>'](max); - if ($truthy(cmp)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (min.$class()) + " with " + (max.$class()) + " failed") - }; - if ($truthy($rb_gt($$($nesting, 'Comparable').$normalize(cmp), 0))) { - self.$raise($$($nesting, 'ArgumentError'), "min argument must be smaller than max argument")}; - if ($truthy($rb_lt($$($nesting, 'Comparable').$normalize(self['$<=>'](min)), 0))) { - return min}; - if ($truthy($rb_gt($$($nesting, 'Comparable').$normalize(self['$<=>'](max)), 0))) { - return max}; - return self; - }, $Comparable_clamp$8.$$arity = 2); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/regexp"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $gvars = Opal.gvars; - - Opal.add_stubs(['$nil?', '$[]', '$raise', '$escape', '$options', '$to_str', '$new', '$join', '$coerce_to!', '$!', '$match', '$coerce_to?', '$begin', '$coerce_to', '$=~', '$attr_reader', '$===', '$inspect', '$to_a']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'RegexpError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Regexp'); - - var $nesting = [self].concat($parent_nesting), $Regexp_$eq_eq$6, $Regexp_$eq_eq_eq$7, $Regexp_$eq_tilde$8, $Regexp_inspect$9, $Regexp_match$10, $Regexp_match$ques$11, $Regexp_$$12, $Regexp_source$13, $Regexp_options$14, $Regexp_casefold$ques$15; - - - Opal.const_set($nesting[0], 'IGNORECASE', 1); - Opal.const_set($nesting[0], 'EXTENDED', 2); - Opal.const_set($nesting[0], 'MULTILINE', 4); - Opal.defineProperty(self.$$prototype, '$$is_regexp', true); - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $allocate$1, $escape$2, $last_match$3, $union$4, $new$5; - - - - Opal.def(self, '$allocate', $allocate$1 = function $$allocate() { - var $iter = $allocate$1.$$p, $yield = $iter || nil, self = this, allocated = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $allocate$1.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - allocated = $send(self, Opal.find_super_dispatcher(self, 'allocate', $allocate$1, false), $zuper, $iter); - allocated.uninitialized = true; - return allocated; - }, $allocate$1.$$arity = 0); - - Opal.def(self, '$escape', $escape$2 = function $$escape(string) { - var self = this; - - return Opal.escape_regexp(string); - }, $escape$2.$$arity = 1); - - Opal.def(self, '$last_match', $last_match$3 = function $$last_match(n) { - var self = this; - if ($gvars["~"] == null) $gvars["~"] = nil; - - - - if (n == null) { - n = nil; - }; - if ($truthy(n['$nil?']())) { - return $gvars["~"] - } else { - return $gvars["~"]['$[]'](n) - }; - }, $last_match$3.$$arity = -1); - Opal.alias(self, "quote", "escape"); - - Opal.def(self, '$union', $union$4 = function $$union($a) { - var $post_args, parts, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - parts = $post_args;; - - var is_first_part_array, quoted_validated, part, options, each_part_options; - if (parts.length == 0) { - return /(?!)/; - } - // return fast if there's only one element - if (parts.length == 1 && parts[0].$$is_regexp) { - return parts[0]; - } - // cover the 2 arrays passed as arguments case - is_first_part_array = parts[0].$$is_array; - if (parts.length > 1 && is_first_part_array) { - self.$raise($$($nesting, 'TypeError'), "no implicit conversion of Array into String") - } - // deal with splat issues (related to https://github.com/opal/opal/issues/858) - if (is_first_part_array) { - parts = parts[0]; - } - options = undefined; - quoted_validated = []; - for (var i=0; i < parts.length; i++) { - part = parts[i]; - if (part.$$is_string) { - quoted_validated.push(self.$escape(part)); - } - else if (part.$$is_regexp) { - each_part_options = (part).$options(); - if (options != undefined && options != each_part_options) { - self.$raise($$($nesting, 'TypeError'), "All expressions must use the same options") - } - options = each_part_options; - quoted_validated.push('('+part.source+')'); - } - else { - quoted_validated.push(self.$escape((part).$to_str())); - } - } - ; - return self.$new((quoted_validated).$join("|"), options); - }, $union$4.$$arity = -1); - return (Opal.def(self, '$new', $new$5 = function(regexp, options) { - var self = this; - - - ; - - if (regexp.$$is_regexp) { - return new RegExp(regexp); - } - - regexp = $$($nesting, 'Opal')['$coerce_to!'](regexp, $$($nesting, 'String'), "to_str"); - - if (regexp.charAt(regexp.length - 1) === '\\' && regexp.charAt(regexp.length - 2) !== '\\') { - self.$raise($$($nesting, 'RegexpError'), "" + "too short escape sequence: /" + (regexp) + "/") - } - - if (options === undefined || options['$!']()) { - return new RegExp(regexp); - } - - if (options.$$is_number) { - var temp = ''; - if ($$($nesting, 'IGNORECASE') & options) { temp += 'i'; } - if ($$($nesting, 'MULTILINE') & options) { temp += 'm'; } - options = temp; - } - else { - options = 'i'; - } - - return new RegExp(regexp, options); - ; - }, $new$5.$$arity = -2), nil) && 'new'; - })(Opal.get_singleton_class(self), $nesting); - - Opal.def(self, '$==', $Regexp_$eq_eq$6 = function(other) { - var self = this; - - return other instanceof RegExp && self.toString() === other.toString(); - }, $Regexp_$eq_eq$6.$$arity = 1); - - Opal.def(self, '$===', $Regexp_$eq_eq_eq$7 = function(string) { - var self = this; - - return self.$match($$($nesting, 'Opal')['$coerce_to?'](string, $$($nesting, 'String'), "to_str")) !== nil - }, $Regexp_$eq_eq_eq$7.$$arity = 1); - - Opal.def(self, '$=~', $Regexp_$eq_tilde$8 = function(string) { - var $a, self = this; - if ($gvars["~"] == null) $gvars["~"] = nil; - - return ($truthy($a = self.$match(string)) ? $gvars["~"].$begin(0) : $a) - }, $Regexp_$eq_tilde$8.$$arity = 1); - Opal.alias(self, "eql?", "=="); - - Opal.def(self, '$inspect', $Regexp_inspect$9 = function $$inspect() { - var self = this; - - - var regexp_format = /^\/(.*)\/([^\/]*)$/; - var value = self.toString(); - var matches = regexp_format.exec(value); - if (matches) { - var regexp_pattern = matches[1]; - var regexp_flags = matches[2]; - var chars = regexp_pattern.split(''); - var chars_length = chars.length; - var char_escaped = false; - var regexp_pattern_escaped = ''; - for (var i = 0; i < chars_length; i++) { - var current_char = chars[i]; - if (!char_escaped && current_char == '/') { - regexp_pattern_escaped = regexp_pattern_escaped.concat('\\'); - } - regexp_pattern_escaped = regexp_pattern_escaped.concat(current_char); - if (current_char == '\\') { - if (char_escaped) { - // does not over escape - char_escaped = false; - } else { - char_escaped = true; - } - } else { - char_escaped = false; - } - } - return '/' + regexp_pattern_escaped + '/' + regexp_flags; - } else { - return value; - } - - }, $Regexp_inspect$9.$$arity = 0); - - Opal.def(self, '$match', $Regexp_match$10 = function $$match(string, pos) { - var $iter = $Regexp_match$10.$$p, block = $iter || nil, self = this; - if ($gvars["~"] == null) $gvars["~"] = nil; - - if ($iter) $Regexp_match$10.$$p = null; - - - if ($iter) $Regexp_match$10.$$p = null;; - ; - - if (self.uninitialized) { - self.$raise($$($nesting, 'TypeError'), "uninitialized Regexp") - } - - if (pos === undefined) { - if (string === nil) return ($gvars["~"] = nil); - var m = self.exec($$($nesting, 'Opal').$coerce_to(string, $$($nesting, 'String'), "to_str")); - if (m) { - ($gvars["~"] = $$($nesting, 'MatchData').$new(self, m)); - return block === nil ? $gvars["~"] : Opal.yield1(block, $gvars["~"]); - } else { - return ($gvars["~"] = nil); - } - } - - pos = $$($nesting, 'Opal').$coerce_to(pos, $$($nesting, 'Integer'), "to_int"); - - if (string === nil) { - return ($gvars["~"] = nil); - } - - string = $$($nesting, 'Opal').$coerce_to(string, $$($nesting, 'String'), "to_str"); - - if (pos < 0) { - pos += string.length; - if (pos < 0) { - return ($gvars["~"] = nil); - } - } - - // global RegExp maintains state, so not using self/this - var md, re = Opal.global_regexp(self); - - while (true) { - md = re.exec(string); - if (md === null) { - return ($gvars["~"] = nil); - } - if (md.index >= pos) { - ($gvars["~"] = $$($nesting, 'MatchData').$new(re, md)); - return block === nil ? $gvars["~"] : Opal.yield1(block, $gvars["~"]); - } - re.lastIndex = md.index + 1; - } - ; - }, $Regexp_match$10.$$arity = -2); - - Opal.def(self, '$match?', $Regexp_match$ques$11 = function(string, pos) { - var self = this; - - - ; - - if (self.uninitialized) { - self.$raise($$($nesting, 'TypeError'), "uninitialized Regexp") - } - - if (pos === undefined) { - return string === nil ? false : self.test($$($nesting, 'Opal').$coerce_to(string, $$($nesting, 'String'), "to_str")); - } - - pos = $$($nesting, 'Opal').$coerce_to(pos, $$($nesting, 'Integer'), "to_int"); - - if (string === nil) { - return false; - } - - string = $$($nesting, 'Opal').$coerce_to(string, $$($nesting, 'String'), "to_str"); - - if (pos < 0) { - pos += string.length; - if (pos < 0) { - return false; - } - } - - // global RegExp maintains state, so not using self/this - var md, re = Opal.global_regexp(self); - - md = re.exec(string); - if (md === null || md.index < pos) { - return false; - } else { - return true; - } - ; - }, $Regexp_match$ques$11.$$arity = -2); - - Opal.def(self, '$~', $Regexp_$$12 = function() { - var self = this; - if ($gvars._ == null) $gvars._ = nil; - - return self['$=~']($gvars._) - }, $Regexp_$$12.$$arity = 0); - - Opal.def(self, '$source', $Regexp_source$13 = function $$source() { - var self = this; - - return self.source; - }, $Regexp_source$13.$$arity = 0); - - Opal.def(self, '$options', $Regexp_options$14 = function $$options() { - var self = this; - - - if (self.uninitialized) { - self.$raise($$($nesting, 'TypeError'), "uninitialized Regexp") - } - var result = 0; - // should be supported in IE6 according to https://msdn.microsoft.com/en-us/library/7f5z26w4(v=vs.94).aspx - if (self.multiline) { - result |= $$($nesting, 'MULTILINE'); - } - if (self.ignoreCase) { - result |= $$($nesting, 'IGNORECASE'); - } - return result; - - }, $Regexp_options$14.$$arity = 0); - - Opal.def(self, '$casefold?', $Regexp_casefold$ques$15 = function() { - var self = this; - - return self.ignoreCase; - }, $Regexp_casefold$ques$15.$$arity = 0); - return Opal.alias(self, "to_s", "source"); - })($nesting[0], RegExp, $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'MatchData'); - - var $nesting = [self].concat($parent_nesting), $MatchData_initialize$16, $MatchData_$$$17, $MatchData_offset$18, $MatchData_$eq_eq$19, $MatchData_begin$20, $MatchData_end$21, $MatchData_captures$22, $MatchData_inspect$23, $MatchData_length$24, $MatchData_to_a$25, $MatchData_to_s$26, $MatchData_values_at$27; - - self.$$prototype.matches = nil; - - self.$attr_reader("post_match", "pre_match", "regexp", "string"); - - Opal.def(self, '$initialize', $MatchData_initialize$16 = function $$initialize(regexp, match_groups) { - var self = this; - - - $gvars["~"] = self; - self.regexp = regexp; - self.begin = match_groups.index; - self.string = match_groups.input; - self.pre_match = match_groups.input.slice(0, match_groups.index); - self.post_match = match_groups.input.slice(match_groups.index + match_groups[0].length); - self.matches = []; - - for (var i = 0, length = match_groups.length; i < length; i++) { - var group = match_groups[i]; - - if (group == null) { - self.matches.push(nil); - } - else { - self.matches.push(group); - } - } - ; - }, $MatchData_initialize$16.$$arity = 2); - - Opal.def(self, '$[]', $MatchData_$$$17 = function($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self.matches, '[]', Opal.to_a(args)); - }, $MatchData_$$$17.$$arity = -1); - - Opal.def(self, '$offset', $MatchData_offset$18 = function $$offset(n) { - var self = this; - - - if (n !== 0) { - self.$raise($$($nesting, 'ArgumentError'), "MatchData#offset only supports 0th element") - } - return [self.begin, self.begin + self.matches[n].length]; - - }, $MatchData_offset$18.$$arity = 1); - - Opal.def(self, '$==', $MatchData_$eq_eq$19 = function(other) { - var $a, $b, $c, $d, self = this; - - - if ($truthy($$($nesting, 'MatchData')['$==='](other))) { - } else { - return false - }; - return ($truthy($a = ($truthy($b = ($truthy($c = ($truthy($d = self.string == other.string) ? self.regexp.toString() == other.regexp.toString() : $d)) ? self.pre_match == other.pre_match : $c)) ? self.post_match == other.post_match : $b)) ? self.begin == other.begin : $a); - }, $MatchData_$eq_eq$19.$$arity = 1); - Opal.alias(self, "eql?", "=="); - - Opal.def(self, '$begin', $MatchData_begin$20 = function $$begin(n) { - var self = this; - - - if (n !== 0) { - self.$raise($$($nesting, 'ArgumentError'), "MatchData#begin only supports 0th element") - } - return self.begin; - - }, $MatchData_begin$20.$$arity = 1); - - Opal.def(self, '$end', $MatchData_end$21 = function $$end(n) { - var self = this; - - - if (n !== 0) { - self.$raise($$($nesting, 'ArgumentError'), "MatchData#end only supports 0th element") - } - return self.begin + self.matches[n].length; - - }, $MatchData_end$21.$$arity = 1); - - Opal.def(self, '$captures', $MatchData_captures$22 = function $$captures() { - var self = this; - - return self.matches.slice(1) - }, $MatchData_captures$22.$$arity = 0); - - Opal.def(self, '$inspect', $MatchData_inspect$23 = function $$inspect() { - var self = this; - - - var str = "#<MatchData " + (self.matches[0]).$inspect(); - - for (var i = 1, length = self.matches.length; i < length; i++) { - str += " " + i + ":" + (self.matches[i]).$inspect(); - } - - return str + ">"; - - }, $MatchData_inspect$23.$$arity = 0); - - Opal.def(self, '$length', $MatchData_length$24 = function $$length() { - var self = this; - - return self.matches.length - }, $MatchData_length$24.$$arity = 0); - Opal.alias(self, "size", "length"); - - Opal.def(self, '$to_a', $MatchData_to_a$25 = function $$to_a() { - var self = this; - - return self.matches - }, $MatchData_to_a$25.$$arity = 0); - - Opal.def(self, '$to_s', $MatchData_to_s$26 = function $$to_s() { - var self = this; - - return self.matches[0] - }, $MatchData_to_s$26.$$arity = 0); - return (Opal.def(self, '$values_at', $MatchData_values_at$27 = function $$values_at($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - var i, a, index, values = []; - - for (i = 0; i < args.length; i++) { - - if (args[i].$$is_range) { - a = (args[i]).$to_a(); - a.unshift(i, 1); - Array.prototype.splice.apply(args, a); - } - - index = $$($nesting, 'Opal')['$coerce_to!'](args[i], $$($nesting, 'Integer'), "to_int"); - - if (index < 0) { - index += self.matches.length; - if (index < 0) { - values.push(nil); - continue; - } - } - - values.push(self.matches[index]); - } - - return values; - ; - }, $MatchData_values_at$27.$$arity = -1), nil) && 'values_at'; - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/string"] = function(Opal) { - function $rb_divide(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs / rhs : lhs['$/'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send, $gvars = Opal.gvars; - - Opal.add_stubs(['$require', '$include', '$coerce_to?', '$coerce_to', '$raise', '$===', '$format', '$to_s', '$respond_to?', '$to_str', '$<=>', '$==', '$=~', '$new', '$force_encoding', '$casecmp', '$empty?', '$ljust', '$ceil', '$/', '$+', '$rjust', '$floor', '$to_a', '$each_char', '$to_proc', '$coerce_to!', '$copy_singleton_methods', '$initialize_clone', '$initialize_dup', '$enum_for', '$size', '$chomp', '$[]', '$to_i', '$each_line', '$class', '$match', '$match?', '$captures', '$proc', '$succ', '$escape']); - - self.$require("corelib/comparable"); - self.$require("corelib/regexp"); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'String'); - - var $nesting = [self].concat($parent_nesting), $String___id__$1, $String_try_convert$2, $String_new$3, $String_initialize$4, $String_$percent$5, $String_$$6, $String_$plus$7, $String_$lt_eq_gt$8, $String_$eq_eq$9, $String_$eq_tilde$10, $String_$$$11, $String_b$12, $String_capitalize$13, $String_casecmp$14, $String_casecmp$ques$15, $String_center$16, $String_chars$17, $String_chomp$18, $String_chop$19, $String_chr$20, $String_clone$21, $String_dup$22, $String_count$23, $String_delete$24, $String_delete_prefix$25, $String_delete_suffix$26, $String_downcase$27, $String_each_char$28, $String_each_line$30, $String_empty$ques$31, $String_end_with$ques$32, $String_gsub$33, $String_hash$34, $String_hex$35, $String_include$ques$36, $String_index$37, $String_inspect$38, $String_intern$39, $String_lines$40, $String_length$41, $String_ljust$42, $String_lstrip$43, $String_ascii_only$ques$44, $String_match$45, $String_match$ques$46, $String_next$47, $String_oct$48, $String_ord$49, $String_partition$50, $String_reverse$51, $String_rindex$52, $String_rjust$53, $String_rpartition$54, $String_rstrip$55, $String_scan$56, $String_split$57, $String_squeeze$58, $String_start_with$ques$59, $String_strip$60, $String_sub$61, $String_sum$62, $String_swapcase$63, $String_to_f$64, $String_to_i$65, $String_to_proc$66, $String_to_s$68, $String_tr$69, $String_tr_s$70, $String_upcase$71, $String_upto$72, $String_instance_variables$73, $String__load$74, $String_unicode_normalize$75, $String_unicode_normalized$ques$76, $String_unpack$77, $String_unpack1$78; - - - self.$include($$($nesting, 'Comparable')); - - Opal.defineProperty(self.$$prototype, '$$is_string', true); - - Opal.defineProperty(self.$$prototype, '$$cast', function(string) { - var klass = this.$$class; - if (klass.$$constructor === String) { - return string; - } else { - return new klass.$$constructor(string); - } - }); - ; - - Opal.def(self, '$__id__', $String___id__$1 = function $$__id__() { - var self = this; - - return self.toString(); - }, $String___id__$1.$$arity = 0); - Opal.alias(self, "object_id", "__id__"); - Opal.defs(self, '$try_convert', $String_try_convert$2 = function $$try_convert(what) { - var self = this; - - return $$($nesting, 'Opal')['$coerce_to?'](what, $$($nesting, 'String'), "to_str") - }, $String_try_convert$2.$$arity = 1); - Opal.defs(self, '$new', $String_new$3 = function(str) { - var self = this; - - - - if (str == null) { - str = ""; - }; - str = $$($nesting, 'Opal').$coerce_to(str, $$($nesting, 'String'), "to_str"); - return new self.$$constructor(str);; - }, $String_new$3.$$arity = -1); - - Opal.def(self, '$initialize', $String_initialize$4 = function $$initialize(str) { - var self = this; - - - ; - - if (str === undefined) { - return self; - } - ; - return self.$raise($$($nesting, 'NotImplementedError'), "Mutable strings are not supported in Opal."); - }, $String_initialize$4.$$arity = -1); - - Opal.def(self, '$%', $String_$percent$5 = function(data) { - var self = this; - - if ($truthy($$($nesting, 'Array')['$==='](data))) { - return $send(self, 'format', [self].concat(Opal.to_a(data))) - } else { - return self.$format(self, data) - } - }, $String_$percent$5.$$arity = 1); - - Opal.def(self, '$*', $String_$$6 = function(count) { - var self = this; - - - count = $$($nesting, 'Opal').$coerce_to(count, $$($nesting, 'Integer'), "to_int"); - - if (count < 0) { - self.$raise($$($nesting, 'ArgumentError'), "negative argument") - } - - if (count === 0) { - return self.$$cast(''); - } - - var result = '', - string = self.toString(); - - // All credit for the bit-twiddling magic code below goes to Mozilla - // polyfill implementation of String.prototype.repeat() posted here: - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat - - if (string.length * count >= 1 << 28) { - self.$raise($$($nesting, 'RangeError'), "multiply count must not overflow maximum string size") - } - - for (;;) { - if ((count & 1) === 1) { - result += string; - } - count >>>= 1; - if (count === 0) { - break; - } - string += string; - } - - return self.$$cast(result); - - }, $String_$$6.$$arity = 1); - - Opal.def(self, '$+', $String_$plus$7 = function(other) { - var self = this; - - - other = $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'String'), "to_str"); - return self + other.$to_s(); - }, $String_$plus$7.$$arity = 1); - - Opal.def(self, '$<=>', $String_$lt_eq_gt$8 = function(other) { - var self = this; - - if ($truthy(other['$respond_to?']("to_str"))) { - - other = other.$to_str().$to_s(); - return self > other ? 1 : (self < other ? -1 : 0);; - } else { - - var cmp = other['$<=>'](self); - - if (cmp === nil) { - return nil; - } - else { - return cmp > 0 ? -1 : (cmp < 0 ? 1 : 0); - } - - } - }, $String_$lt_eq_gt$8.$$arity = 1); - - Opal.def(self, '$==', $String_$eq_eq$9 = function(other) { - var self = this; - - - if (other.$$is_string) { - return self.toString() === other.toString(); - } - if ($$($nesting, 'Opal')['$respond_to?'](other, "to_str")) { - return other['$=='](self); - } - return false; - - }, $String_$eq_eq$9.$$arity = 1); - Opal.alias(self, "eql?", "=="); - Opal.alias(self, "===", "=="); - - Opal.def(self, '$=~', $String_$eq_tilde$10 = function(other) { - var self = this; - - - if (other.$$is_string) { - self.$raise($$($nesting, 'TypeError'), "type mismatch: String given"); - } - - return other['$=~'](self); - - }, $String_$eq_tilde$10.$$arity = 1); - - Opal.def(self, '$[]', $String_$$$11 = function(index, length) { - var self = this; - - - ; - - var size = self.length, exclude; - - if (index.$$is_range) { - exclude = index.excl; - length = $$($nesting, 'Opal').$coerce_to(index.end, $$($nesting, 'Integer'), "to_int"); - index = $$($nesting, 'Opal').$coerce_to(index.begin, $$($nesting, 'Integer'), "to_int"); - - if (Math.abs(index) > size) { - return nil; - } - - if (index < 0) { - index += size; - } - - if (length < 0) { - length += size; - } - - if (!exclude) { - length += 1; - } - - length = length - index; - - if (length < 0) { - length = 0; - } - - return self.$$cast(self.substr(index, length)); - } - - - if (index.$$is_string) { - if (length != null) { - self.$raise($$($nesting, 'TypeError')) - } - return self.indexOf(index) !== -1 ? self.$$cast(index) : nil; - } - - - if (index.$$is_regexp) { - var match = self.match(index); - - if (match === null) { - ($gvars["~"] = nil) - return nil; - } - - ($gvars["~"] = $$($nesting, 'MatchData').$new(index, match)) - - if (length == null) { - return self.$$cast(match[0]); - } - - length = $$($nesting, 'Opal').$coerce_to(length, $$($nesting, 'Integer'), "to_int"); - - if (length < 0 && -length < match.length) { - return self.$$cast(match[length += match.length]); - } - - if (length >= 0 && length < match.length) { - return self.$$cast(match[length]); - } - - return nil; - } - - - index = $$($nesting, 'Opal').$coerce_to(index, $$($nesting, 'Integer'), "to_int"); - - if (index < 0) { - index += size; - } - - if (length == null) { - if (index >= size || index < 0) { - return nil; - } - return self.$$cast(self.substr(index, 1)); - } - - length = $$($nesting, 'Opal').$coerce_to(length, $$($nesting, 'Integer'), "to_int"); - - if (length < 0) { - return nil; - } - - if (index > size || index < 0) { - return nil; - } - - return self.$$cast(self.substr(index, length)); - ; - }, $String_$$$11.$$arity = -2); - Opal.alias(self, "byteslice", "[]"); - - Opal.def(self, '$b', $String_b$12 = function $$b() { - var self = this; - - return self.$force_encoding("binary") - }, $String_b$12.$$arity = 0); - - Opal.def(self, '$capitalize', $String_capitalize$13 = function $$capitalize() { - var self = this; - - return self.$$cast(self.charAt(0).toUpperCase() + self.substr(1).toLowerCase()); - }, $String_capitalize$13.$$arity = 0); - - Opal.def(self, '$casecmp', $String_casecmp$14 = function $$casecmp(other) { - var self = this; - - - if ($truthy(other['$respond_to?']("to_str"))) { - } else { - return nil - }; - other = $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'String'), "to_str").$to_s(); - - var ascii_only = /^[\x00-\x7F]*$/; - if (ascii_only.test(self) && ascii_only.test(other)) { - self = self.toLowerCase(); - other = other.toLowerCase(); - } - ; - return self['$<=>'](other); - }, $String_casecmp$14.$$arity = 1); - - Opal.def(self, '$casecmp?', $String_casecmp$ques$15 = function(other) { - var self = this; - - - var cmp = self.$casecmp(other); - if (cmp === nil) { - return nil; - } else { - return cmp === 0; - } - - }, $String_casecmp$ques$15.$$arity = 1); - - Opal.def(self, '$center', $String_center$16 = function $$center(width, padstr) { - var self = this; - - - - if (padstr == null) { - padstr = " "; - }; - width = $$($nesting, 'Opal').$coerce_to(width, $$($nesting, 'Integer'), "to_int"); - padstr = $$($nesting, 'Opal').$coerce_to(padstr, $$($nesting, 'String'), "to_str").$to_s(); - if ($truthy(padstr['$empty?']())) { - self.$raise($$($nesting, 'ArgumentError'), "zero width padding")}; - if ($truthy(width <= self.length)) { - return self}; - - var ljustified = self.$ljust($rb_divide($rb_plus(width, self.length), 2).$ceil(), padstr), - rjustified = self.$rjust($rb_divide($rb_plus(width, self.length), 2).$floor(), padstr); - - return self.$$cast(rjustified + ljustified.slice(self.length)); - ; - }, $String_center$16.$$arity = -2); - - Opal.def(self, '$chars', $String_chars$17 = function $$chars() { - var $iter = $String_chars$17.$$p, block = $iter || nil, self = this; - - if ($iter) $String_chars$17.$$p = null; - - - if ($iter) $String_chars$17.$$p = null;; - if ($truthy(block)) { - } else { - return self.$each_char().$to_a() - }; - return $send(self, 'each_char', [], block.$to_proc()); - }, $String_chars$17.$$arity = 0); - - Opal.def(self, '$chomp', $String_chomp$18 = function $$chomp(separator) { - var self = this; - if ($gvars["/"] == null) $gvars["/"] = nil; - - - - if (separator == null) { - separator = $gvars["/"]; - }; - if ($truthy(separator === nil || self.length === 0)) { - return self}; - separator = $$($nesting, 'Opal')['$coerce_to!'](separator, $$($nesting, 'String'), "to_str").$to_s(); - - var result; - - if (separator === "\n") { - result = self.replace(/\r?\n?$/, ''); - } - else if (separator === "") { - result = self.replace(/(\r?\n)+$/, ''); - } - else if (self.length >= separator.length) { - var tail = self.substr(self.length - separator.length, separator.length); - - if (tail === separator) { - result = self.substr(0, self.length - separator.length); - } - } - - if (result != null) { - return self.$$cast(result); - } - ; - return self; - }, $String_chomp$18.$$arity = -1); - - Opal.def(self, '$chop', $String_chop$19 = function $$chop() { - var self = this; - - - var length = self.length, result; - - if (length <= 1) { - result = ""; - } else if (self.charAt(length - 1) === "\n" && self.charAt(length - 2) === "\r") { - result = self.substr(0, length - 2); - } else { - result = self.substr(0, length - 1); - } - - return self.$$cast(result); - - }, $String_chop$19.$$arity = 0); - - Opal.def(self, '$chr', $String_chr$20 = function $$chr() { - var self = this; - - return self.charAt(0); - }, $String_chr$20.$$arity = 0); - - Opal.def(self, '$clone', $String_clone$21 = function $$clone() { - var self = this, copy = nil; - - - copy = self.slice(); - copy.$copy_singleton_methods(self); - copy.$initialize_clone(self); - return copy; - }, $String_clone$21.$$arity = 0); - - Opal.def(self, '$dup', $String_dup$22 = function $$dup() { - var self = this, copy = nil; - - - copy = self.slice(); - copy.$initialize_dup(self); - return copy; - }, $String_dup$22.$$arity = 0); - - Opal.def(self, '$count', $String_count$23 = function $$count($a) { - var $post_args, sets, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - sets = $post_args;; - - if (sets.length === 0) { - self.$raise($$($nesting, 'ArgumentError'), "ArgumentError: wrong number of arguments (0 for 1+)") - } - var char_class = char_class_from_char_sets(sets); - if (char_class === null) { - return 0; - } - return self.length - self.replace(new RegExp(char_class, 'g'), '').length; - ; - }, $String_count$23.$$arity = -1); - - Opal.def(self, '$delete', $String_delete$24 = function($a) { - var $post_args, sets, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - sets = $post_args;; - - if (sets.length === 0) { - self.$raise($$($nesting, 'ArgumentError'), "ArgumentError: wrong number of arguments (0 for 1+)") - } - var char_class = char_class_from_char_sets(sets); - if (char_class === null) { - return self; - } - return self.$$cast(self.replace(new RegExp(char_class, 'g'), '')); - ; - }, $String_delete$24.$$arity = -1); - - Opal.def(self, '$delete_prefix', $String_delete_prefix$25 = function $$delete_prefix(prefix) { - var self = this; - - - if (!prefix.$$is_string) { - (prefix = $$($nesting, 'Opal').$coerce_to(prefix, $$($nesting, 'String'), "to_str")) - } - - if (self.slice(0, prefix.length) === prefix) { - return self.$$cast(self.slice(prefix.length)); - } else { - return self; - } - - }, $String_delete_prefix$25.$$arity = 1); - - Opal.def(self, '$delete_suffix', $String_delete_suffix$26 = function $$delete_suffix(suffix) { - var self = this; - - - if (!suffix.$$is_string) { - (suffix = $$($nesting, 'Opal').$coerce_to(suffix, $$($nesting, 'String'), "to_str")) - } - - if (self.slice(self.length - suffix.length) === suffix) { - return self.$$cast(self.slice(0, self.length - suffix.length)); - } else { - return self; - } - - }, $String_delete_suffix$26.$$arity = 1); - - Opal.def(self, '$downcase', $String_downcase$27 = function $$downcase() { - var self = this; - - return self.$$cast(self.toLowerCase()); - }, $String_downcase$27.$$arity = 0); - - Opal.def(self, '$each_char', $String_each_char$28 = function $$each_char() { - var $iter = $String_each_char$28.$$p, block = $iter || nil, $$29, self = this; - - if ($iter) $String_each_char$28.$$p = null; - - - if ($iter) $String_each_char$28.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["each_char"], ($$29 = function(){var self = $$29.$$s || this; - - return self.$size()}, $$29.$$s = self, $$29.$$arity = 0, $$29)) - }; - - for (var i = 0, length = self.length; i < length; i++) { - Opal.yield1(block, self.charAt(i)); - } - ; - return self; - }, $String_each_char$28.$$arity = 0); - - Opal.def(self, '$each_line', $String_each_line$30 = function $$each_line(separator) { - var $iter = $String_each_line$30.$$p, block = $iter || nil, self = this; - if ($gvars["/"] == null) $gvars["/"] = nil; - - if ($iter) $String_each_line$30.$$p = null; - - - if ($iter) $String_each_line$30.$$p = null;; - - if (separator == null) { - separator = $gvars["/"]; - }; - if ((block !== nil)) { - } else { - return self.$enum_for("each_line", separator) - }; - - if (separator === nil) { - Opal.yield1(block, self); - - return self; - } - - separator = $$($nesting, 'Opal').$coerce_to(separator, $$($nesting, 'String'), "to_str") - - var a, i, n, length, chomped, trailing, splitted; - - if (separator.length === 0) { - for (a = self.split(/(\n{2,})/), i = 0, n = a.length; i < n; i += 2) { - if (a[i] || a[i + 1]) { - var value = (a[i] || "") + (a[i + 1] || ""); - Opal.yield1(block, self.$$cast(value)); - } - } - - return self; - } - - chomped = self.$chomp(separator); - trailing = self.length != chomped.length; - splitted = chomped.split(separator); - - for (i = 0, length = splitted.length; i < length; i++) { - if (i < length - 1 || trailing) { - Opal.yield1(block, self.$$cast(splitted[i] + separator)); - } - else { - Opal.yield1(block, self.$$cast(splitted[i])); - } - } - ; - return self; - }, $String_each_line$30.$$arity = -1); - - Opal.def(self, '$empty?', $String_empty$ques$31 = function() { - var self = this; - - return self.length === 0; - }, $String_empty$ques$31.$$arity = 0); - - Opal.def(self, '$end_with?', $String_end_with$ques$32 = function($a) { - var $post_args, suffixes, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - suffixes = $post_args;; - - for (var i = 0, length = suffixes.length; i < length; i++) { - var suffix = $$($nesting, 'Opal').$coerce_to(suffixes[i], $$($nesting, 'String'), "to_str").$to_s(); - - if (self.length >= suffix.length && - self.substr(self.length - suffix.length, suffix.length) == suffix) { - return true; - } - } - ; - return false; - }, $String_end_with$ques$32.$$arity = -1); - Opal.alias(self, "equal?", "==="); - - Opal.def(self, '$gsub', $String_gsub$33 = function $$gsub(pattern, replacement) { - var $iter = $String_gsub$33.$$p, block = $iter || nil, self = this; - - if ($iter) $String_gsub$33.$$p = null; - - - if ($iter) $String_gsub$33.$$p = null;; - ; - - if (replacement === undefined && block === nil) { - return self.$enum_for("gsub", pattern); - } - - var result = '', match_data = nil, index = 0, match, _replacement; - - if (pattern.$$is_regexp) { - pattern = Opal.global_multiline_regexp(pattern); - } else { - pattern = $$($nesting, 'Opal').$coerce_to(pattern, $$($nesting, 'String'), "to_str"); - pattern = new RegExp(pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'gm'); - } - - var lastIndex; - while (true) { - match = pattern.exec(self); - - if (match === null) { - ($gvars["~"] = nil) - result += self.slice(index); - break; - } - - match_data = $$($nesting, 'MatchData').$new(pattern, match); - - if (replacement === undefined) { - lastIndex = pattern.lastIndex; - _replacement = block(match[0]); - pattern.lastIndex = lastIndex; // save and restore lastIndex - } - else if (replacement.$$is_hash) { - _replacement = (replacement)['$[]'](match[0]).$to_s(); - } - else { - if (!replacement.$$is_string) { - replacement = $$($nesting, 'Opal').$coerce_to(replacement, $$($nesting, 'String'), "to_str"); - } - _replacement = replacement.replace(/([\\]+)([0-9+&`'])/g, function (original, slashes, command) { - if (slashes.length % 2 === 0) { - return original; - } - switch (command) { - case "+": - for (var i = match.length - 1; i > 0; i--) { - if (match[i] !== undefined) { - return slashes.slice(1) + match[i]; - } - } - return ''; - case "&": return slashes.slice(1) + match[0]; - case "`": return slashes.slice(1) + self.slice(0, match.index); - case "'": return slashes.slice(1) + self.slice(match.index + match[0].length); - default: return slashes.slice(1) + (match[command] || ''); - } - }).replace(/\\\\/g, '\\'); - } - - if (pattern.lastIndex === match.index) { - result += (_replacement + self.slice(index, match.index + 1)) - pattern.lastIndex += 1; - } - else { - result += (self.slice(index, match.index) + _replacement) - } - index = pattern.lastIndex; - } - - ($gvars["~"] = match_data) - return self.$$cast(result); - ; - }, $String_gsub$33.$$arity = -2); - - Opal.def(self, '$hash', $String_hash$34 = function $$hash() { - var self = this; - - return self.toString(); - }, $String_hash$34.$$arity = 0); - - Opal.def(self, '$hex', $String_hex$35 = function $$hex() { - var self = this; - - return self.$to_i(16) - }, $String_hex$35.$$arity = 0); - - Opal.def(self, '$include?', $String_include$ques$36 = function(other) { - var self = this; - - - if (!other.$$is_string) { - (other = $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'String'), "to_str")) - } - return self.indexOf(other) !== -1; - - }, $String_include$ques$36.$$arity = 1); - - Opal.def(self, '$index', $String_index$37 = function $$index(search, offset) { - var self = this; - - - ; - - var index, - match, - regex; - - if (offset === undefined) { - offset = 0; - } else { - offset = $$($nesting, 'Opal').$coerce_to(offset, $$($nesting, 'Integer'), "to_int"); - if (offset < 0) { - offset += self.length; - if (offset < 0) { - return nil; - } - } - } - - if (search.$$is_regexp) { - regex = Opal.global_multiline_regexp(search); - while (true) { - match = regex.exec(self); - if (match === null) { - ($gvars["~"] = nil); - index = -1; - break; - } - if (match.index >= offset) { - ($gvars["~"] = $$($nesting, 'MatchData').$new(regex, match)) - index = match.index; - break; - } - regex.lastIndex = match.index + 1; - } - } else { - search = $$($nesting, 'Opal').$coerce_to(search, $$($nesting, 'String'), "to_str"); - if (search.length === 0 && offset > self.length) { - index = -1; - } else { - index = self.indexOf(search, offset); - } - } - - return index === -1 ? nil : index; - ; - }, $String_index$37.$$arity = -2); - - Opal.def(self, '$inspect', $String_inspect$38 = function $$inspect() { - var self = this; - - - var escapable = /[\\\"\x00-\x1f\u007F-\u009F\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - meta = { - '\u0007': '\\a', - '\u001b': '\\e', - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '\v': '\\v', - '"' : '\\"', - '\\': '\\\\' - }, - escaped = self.replace(escapable, function (chr) { - return meta[chr] || '\\u' + ('0000' + chr.charCodeAt(0).toString(16).toUpperCase()).slice(-4); - }); - return '"' + escaped.replace(/\#[\$\@\{]/g, '\\$&') + '"'; - - }, $String_inspect$38.$$arity = 0); - - Opal.def(self, '$intern', $String_intern$39 = function $$intern() { - var self = this; - - return self.toString(); - }, $String_intern$39.$$arity = 0); - - Opal.def(self, '$lines', $String_lines$40 = function $$lines(separator) { - var $iter = $String_lines$40.$$p, block = $iter || nil, self = this, e = nil; - if ($gvars["/"] == null) $gvars["/"] = nil; - - if ($iter) $String_lines$40.$$p = null; - - - if ($iter) $String_lines$40.$$p = null;; - - if (separator == null) { - separator = $gvars["/"]; - }; - e = $send(self, 'each_line', [separator], block.$to_proc()); - if ($truthy(block)) { - return self - } else { - return e.$to_a() - }; - }, $String_lines$40.$$arity = -1); - - Opal.def(self, '$length', $String_length$41 = function $$length() { - var self = this; - - return self.length; - }, $String_length$41.$$arity = 0); - - Opal.def(self, '$ljust', $String_ljust$42 = function $$ljust(width, padstr) { - var self = this; - - - - if (padstr == null) { - padstr = " "; - }; - width = $$($nesting, 'Opal').$coerce_to(width, $$($nesting, 'Integer'), "to_int"); - padstr = $$($nesting, 'Opal').$coerce_to(padstr, $$($nesting, 'String'), "to_str").$to_s(); - if ($truthy(padstr['$empty?']())) { - self.$raise($$($nesting, 'ArgumentError'), "zero width padding")}; - if ($truthy(width <= self.length)) { - return self}; - - var index = -1, - result = ""; - - width -= self.length; - - while (++index < width) { - result += padstr; - } - - return self.$$cast(self + result.slice(0, width)); - ; - }, $String_ljust$42.$$arity = -2); - - Opal.def(self, '$lstrip', $String_lstrip$43 = function $$lstrip() { - var self = this; - - return self.replace(/^\s*/, ''); - }, $String_lstrip$43.$$arity = 0); - - Opal.def(self, '$ascii_only?', $String_ascii_only$ques$44 = function() { - var self = this; - - return self.match(/[ -~\n]*/)[0] === self; - }, $String_ascii_only$ques$44.$$arity = 0); - - Opal.def(self, '$match', $String_match$45 = function $$match(pattern, pos) { - var $iter = $String_match$45.$$p, block = $iter || nil, $a, self = this; - - if ($iter) $String_match$45.$$p = null; - - - if ($iter) $String_match$45.$$p = null;; - ; - if ($truthy(($truthy($a = $$($nesting, 'String')['$==='](pattern)) ? $a : pattern['$respond_to?']("to_str")))) { - pattern = $$($nesting, 'Regexp').$new(pattern.$to_str())}; - if ($truthy($$($nesting, 'Regexp')['$==='](pattern))) { - } else { - self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + (pattern.$class()) + " (expected Regexp)") - }; - return $send(pattern, 'match', [self, pos], block.$to_proc()); - }, $String_match$45.$$arity = -2); - - Opal.def(self, '$match?', $String_match$ques$46 = function(pattern, pos) { - var $a, self = this; - - - ; - if ($truthy(($truthy($a = $$($nesting, 'String')['$==='](pattern)) ? $a : pattern['$respond_to?']("to_str")))) { - pattern = $$($nesting, 'Regexp').$new(pattern.$to_str())}; - if ($truthy($$($nesting, 'Regexp')['$==='](pattern))) { - } else { - self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + (pattern.$class()) + " (expected Regexp)") - }; - return pattern['$match?'](self, pos); - }, $String_match$ques$46.$$arity = -2); - - Opal.def(self, '$next', $String_next$47 = function $$next() { - var self = this; - - - var i = self.length; - if (i === 0) { - return self.$$cast(''); - } - var result = self; - var first_alphanum_char_index = self.search(/[a-zA-Z0-9]/); - var carry = false; - var code; - while (i--) { - code = self.charCodeAt(i); - if ((code >= 48 && code <= 57) || - (code >= 65 && code <= 90) || - (code >= 97 && code <= 122)) { - switch (code) { - case 57: - carry = true; - code = 48; - break; - case 90: - carry = true; - code = 65; - break; - case 122: - carry = true; - code = 97; - break; - default: - carry = false; - code += 1; - } - } else { - if (first_alphanum_char_index === -1) { - if (code === 255) { - carry = true; - code = 0; - } else { - carry = false; - code += 1; - } - } else { - carry = true; - } - } - result = result.slice(0, i) + String.fromCharCode(code) + result.slice(i + 1); - if (carry && (i === 0 || i === first_alphanum_char_index)) { - switch (code) { - case 65: - break; - case 97: - break; - default: - code += 1; - } - if (i === 0) { - result = String.fromCharCode(code) + result; - } else { - result = result.slice(0, i) + String.fromCharCode(code) + result.slice(i); - } - carry = false; - } - if (!carry) { - break; - } - } - return self.$$cast(result); - - }, $String_next$47.$$arity = 0); - - Opal.def(self, '$oct', $String_oct$48 = function $$oct() { - var self = this; - - - var result, - string = self, - radix = 8; - - if (/^\s*_/.test(string)) { - return 0; - } - - string = string.replace(/^(\s*[+-]?)(0[bodx]?)(.+)$/i, function (original, head, flag, tail) { - switch (tail.charAt(0)) { - case '+': - case '-': - return original; - case '0': - if (tail.charAt(1) === 'x' && flag === '0x') { - return original; - } - } - switch (flag) { - case '0b': - radix = 2; - break; - case '0': - case '0o': - radix = 8; - break; - case '0d': - radix = 10; - break; - case '0x': - radix = 16; - break; - } - return head + tail; - }); - - result = parseInt(string.replace(/_(?!_)/g, ''), radix); - return isNaN(result) ? 0 : result; - - }, $String_oct$48.$$arity = 0); - - Opal.def(self, '$ord', $String_ord$49 = function $$ord() { - var self = this; - - return self.charCodeAt(0); - }, $String_ord$49.$$arity = 0); - - Opal.def(self, '$partition', $String_partition$50 = function $$partition(sep) { - var self = this; - - - var i, m; - - if (sep.$$is_regexp) { - m = sep.exec(self); - if (m === null) { - i = -1; - } else { - $$($nesting, 'MatchData').$new(sep, m); - sep = m[0]; - i = m.index; - } - } else { - sep = $$($nesting, 'Opal').$coerce_to(sep, $$($nesting, 'String'), "to_str"); - i = self.indexOf(sep); - } - - if (i === -1) { - return [self, '', '']; - } - - return [ - self.slice(0, i), - self.slice(i, i + sep.length), - self.slice(i + sep.length) - ]; - - }, $String_partition$50.$$arity = 1); - - Opal.def(self, '$reverse', $String_reverse$51 = function $$reverse() { - var self = this; - - return self.split('').reverse().join(''); - }, $String_reverse$51.$$arity = 0); - - Opal.def(self, '$rindex', $String_rindex$52 = function $$rindex(search, offset) { - var self = this; - - - ; - - var i, m, r, _m; - - if (offset === undefined) { - offset = self.length; - } else { - offset = $$($nesting, 'Opal').$coerce_to(offset, $$($nesting, 'Integer'), "to_int"); - if (offset < 0) { - offset += self.length; - if (offset < 0) { - return nil; - } - } - } - - if (search.$$is_regexp) { - m = null; - r = Opal.global_multiline_regexp(search); - while (true) { - _m = r.exec(self); - if (_m === null || _m.index > offset) { - break; - } - m = _m; - r.lastIndex = m.index + 1; - } - if (m === null) { - ($gvars["~"] = nil) - i = -1; - } else { - $$($nesting, 'MatchData').$new(r, m); - i = m.index; - } - } else { - search = $$($nesting, 'Opal').$coerce_to(search, $$($nesting, 'String'), "to_str"); - i = self.lastIndexOf(search, offset); - } - - return i === -1 ? nil : i; - ; - }, $String_rindex$52.$$arity = -2); - - Opal.def(self, '$rjust', $String_rjust$53 = function $$rjust(width, padstr) { - var self = this; - - - - if (padstr == null) { - padstr = " "; - }; - width = $$($nesting, 'Opal').$coerce_to(width, $$($nesting, 'Integer'), "to_int"); - padstr = $$($nesting, 'Opal').$coerce_to(padstr, $$($nesting, 'String'), "to_str").$to_s(); - if ($truthy(padstr['$empty?']())) { - self.$raise($$($nesting, 'ArgumentError'), "zero width padding")}; - if ($truthy(width <= self.length)) { - return self}; - - var chars = Math.floor(width - self.length), - patterns = Math.floor(chars / padstr.length), - result = Array(patterns + 1).join(padstr), - remaining = chars - result.length; - - return self.$$cast(result + padstr.slice(0, remaining) + self); - ; - }, $String_rjust$53.$$arity = -2); - - Opal.def(self, '$rpartition', $String_rpartition$54 = function $$rpartition(sep) { - var self = this; - - - var i, m, r, _m; - - if (sep.$$is_regexp) { - m = null; - r = Opal.global_multiline_regexp(sep); - - while (true) { - _m = r.exec(self); - if (_m === null) { - break; - } - m = _m; - r.lastIndex = m.index + 1; - } - - if (m === null) { - i = -1; - } else { - $$($nesting, 'MatchData').$new(r, m); - sep = m[0]; - i = m.index; - } - - } else { - sep = $$($nesting, 'Opal').$coerce_to(sep, $$($nesting, 'String'), "to_str"); - i = self.lastIndexOf(sep); - } - - if (i === -1) { - return ['', '', self]; - } - - return [ - self.slice(0, i), - self.slice(i, i + sep.length), - self.slice(i + sep.length) - ]; - - }, $String_rpartition$54.$$arity = 1); - - Opal.def(self, '$rstrip', $String_rstrip$55 = function $$rstrip() { - var self = this; - - return self.replace(/[\s\u0000]*$/, ''); - }, $String_rstrip$55.$$arity = 0); - - Opal.def(self, '$scan', $String_scan$56 = function $$scan(pattern) { - var $iter = $String_scan$56.$$p, block = $iter || nil, self = this; - - if ($iter) $String_scan$56.$$p = null; - - - if ($iter) $String_scan$56.$$p = null;; - - var result = [], - match_data = nil, - match; - - if (pattern.$$is_regexp) { - pattern = Opal.global_multiline_regexp(pattern); - } else { - pattern = $$($nesting, 'Opal').$coerce_to(pattern, $$($nesting, 'String'), "to_str"); - pattern = new RegExp(pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'gm'); - } - - while ((match = pattern.exec(self)) != null) { - match_data = $$($nesting, 'MatchData').$new(pattern, match); - if (block === nil) { - match.length == 1 ? result.push(match[0]) : result.push((match_data).$captures()); - } else { - match.length == 1 ? block(match[0]) : block.call(self, (match_data).$captures()); - } - if (pattern.lastIndex === match.index) { - pattern.lastIndex += 1; - } - } - - ($gvars["~"] = match_data) - - return (block !== nil ? self : result); - ; - }, $String_scan$56.$$arity = 1); - Opal.alias(self, "size", "length"); - Opal.alias(self, "slice", "[]"); - - Opal.def(self, '$split', $String_split$57 = function $$split(pattern, limit) { - var $a, self = this; - if ($gvars[";"] == null) $gvars[";"] = nil; - - - ; - ; - - if (self.length === 0) { - return []; - } - - if (limit === undefined) { - limit = 0; - } else { - limit = $$($nesting, 'Opal')['$coerce_to!'](limit, $$($nesting, 'Integer'), "to_int"); - if (limit === 1) { - return [self]; - } - } - - if (pattern === undefined || pattern === nil) { - pattern = ($truthy($a = $gvars[";"]) ? $a : " "); - } - - var result = [], - string = self.toString(), - index = 0, - match, - i, ii; - - if (pattern.$$is_regexp) { - pattern = Opal.global_multiline_regexp(pattern); - } else { - pattern = $$($nesting, 'Opal').$coerce_to(pattern, $$($nesting, 'String'), "to_str").$to_s(); - if (pattern === ' ') { - pattern = /\s+/gm; - string = string.replace(/^\s+/, ''); - } else { - pattern = new RegExp(pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'gm'); - } - } - - result = string.split(pattern); - - if (result.length === 1 && result[0] === string) { - return [self.$$cast(result[0])]; - } - - while ((i = result.indexOf(undefined)) !== -1) { - result.splice(i, 1); - } - - function castResult() { - for (i = 0; i < result.length; i++) { - result[i] = self.$$cast(result[i]); - } - } - - if (limit === 0) { - while (result[result.length - 1] === '') { - result.length -= 1; - } - castResult(); - return result; - } - - match = pattern.exec(string); - - if (limit < 0) { - if (match !== null && match[0] === '' && pattern.source.indexOf('(?=') === -1) { - for (i = 0, ii = match.length; i < ii; i++) { - result.push(''); - } - } - castResult(); - return result; - } - - if (match !== null && match[0] === '') { - result.splice(limit - 1, result.length - 1, result.slice(limit - 1).join('')); - castResult(); - return result; - } - - if (limit >= result.length) { - castResult(); - return result; - } - - i = 0; - while (match !== null) { - i++; - index = pattern.lastIndex; - if (i + 1 === limit) { - break; - } - match = pattern.exec(string); - } - result.splice(limit - 1, result.length - 1, string.slice(index)); - castResult(); - return result; - ; - }, $String_split$57.$$arity = -1); - - Opal.def(self, '$squeeze', $String_squeeze$58 = function $$squeeze($a) { - var $post_args, sets, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - sets = $post_args;; - - if (sets.length === 0) { - return self.$$cast(self.replace(/(.)\1+/g, '$1')); - } - var char_class = char_class_from_char_sets(sets); - if (char_class === null) { - return self; - } - return self.$$cast(self.replace(new RegExp('(' + char_class + ')\\1+', 'g'), '$1')); - ; - }, $String_squeeze$58.$$arity = -1); - - Opal.def(self, '$start_with?', $String_start_with$ques$59 = function($a) { - var $post_args, prefixes, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - prefixes = $post_args;; - - for (var i = 0, length = prefixes.length; i < length; i++) { - var prefix = $$($nesting, 'Opal').$coerce_to(prefixes[i], $$($nesting, 'String'), "to_str").$to_s(); - - if (self.indexOf(prefix) === 0) { - return true; - } - } - - return false; - ; - }, $String_start_with$ques$59.$$arity = -1); - - Opal.def(self, '$strip', $String_strip$60 = function $$strip() { - var self = this; - - return self.replace(/^\s*/, '').replace(/[\s\u0000]*$/, ''); - }, $String_strip$60.$$arity = 0); - - Opal.def(self, '$sub', $String_sub$61 = function $$sub(pattern, replacement) { - var $iter = $String_sub$61.$$p, block = $iter || nil, self = this; - - if ($iter) $String_sub$61.$$p = null; - - - if ($iter) $String_sub$61.$$p = null;; - ; - - if (!pattern.$$is_regexp) { - pattern = $$($nesting, 'Opal').$coerce_to(pattern, $$($nesting, 'String'), "to_str"); - pattern = new RegExp(pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')); - } - - var result, match = pattern.exec(self); - - if (match === null) { - ($gvars["~"] = nil) - result = self.toString(); - } else { - $$($nesting, 'MatchData').$new(pattern, match) - - if (replacement === undefined) { - - if (block === nil) { - self.$raise($$($nesting, 'ArgumentError'), "wrong number of arguments (1 for 2)") - } - result = self.slice(0, match.index) + block(match[0]) + self.slice(match.index + match[0].length); - - } else if (replacement.$$is_hash) { - - result = self.slice(0, match.index) + (replacement)['$[]'](match[0]).$to_s() + self.slice(match.index + match[0].length); - - } else { - - replacement = $$($nesting, 'Opal').$coerce_to(replacement, $$($nesting, 'String'), "to_str"); - - replacement = replacement.replace(/([\\]+)([0-9+&`'])/g, function (original, slashes, command) { - if (slashes.length % 2 === 0) { - return original; - } - switch (command) { - case "+": - for (var i = match.length - 1; i > 0; i--) { - if (match[i] !== undefined) { - return slashes.slice(1) + match[i]; - } - } - return ''; - case "&": return slashes.slice(1) + match[0]; - case "`": return slashes.slice(1) + self.slice(0, match.index); - case "'": return slashes.slice(1) + self.slice(match.index + match[0].length); - default: return slashes.slice(1) + (match[command] || ''); - } - }).replace(/\\\\/g, '\\'); - - result = self.slice(0, match.index) + replacement + self.slice(match.index + match[0].length); - } - } - - return self.$$cast(result); - ; - }, $String_sub$61.$$arity = -2); - Opal.alias(self, "succ", "next"); - - Opal.def(self, '$sum', $String_sum$62 = function $$sum(n) { - var self = this; - - - - if (n == null) { - n = 16; - }; - - n = $$($nesting, 'Opal').$coerce_to(n, $$($nesting, 'Integer'), "to_int"); - - var result = 0, - length = self.length, - i = 0; - - for (; i < length; i++) { - result += self.charCodeAt(i); - } - - if (n <= 0) { - return result; - } - - return result & (Math.pow(2, n) - 1); - ; - }, $String_sum$62.$$arity = -1); - - Opal.def(self, '$swapcase', $String_swapcase$63 = function $$swapcase() { - var self = this; - - - var str = self.replace(/([a-z]+)|([A-Z]+)/g, function($0,$1,$2) { - return $1 ? $0.toUpperCase() : $0.toLowerCase(); - }); - - if (self.constructor === String) { - return str; - } - - return self.$class().$new(str); - - }, $String_swapcase$63.$$arity = 0); - - Opal.def(self, '$to_f', $String_to_f$64 = function $$to_f() { - var self = this; - - - if (self.charAt(0) === '_') { - return 0; - } - - var result = parseFloat(self.replace(/_/g, '')); - - if (isNaN(result) || result == Infinity || result == -Infinity) { - return 0; - } - else { - return result; - } - - }, $String_to_f$64.$$arity = 0); - - Opal.def(self, '$to_i', $String_to_i$65 = function $$to_i(base) { - var self = this; - - - - if (base == null) { - base = 10; - }; - - var result, - string = self.toLowerCase(), - radix = $$($nesting, 'Opal').$coerce_to(base, $$($nesting, 'Integer'), "to_int"); - - if (radix === 1 || radix < 0 || radix > 36) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid radix " + (radix)) - } - - if (/^\s*_/.test(string)) { - return 0; - } - - string = string.replace(/^(\s*[+-]?)(0[bodx]?)(.+)$/, function (original, head, flag, tail) { - switch (tail.charAt(0)) { - case '+': - case '-': - return original; - case '0': - if (tail.charAt(1) === 'x' && flag === '0x' && (radix === 0 || radix === 16)) { - return original; - } - } - switch (flag) { - case '0b': - if (radix === 0 || radix === 2) { - radix = 2; - return head + tail; - } - break; - case '0': - case '0o': - if (radix === 0 || radix === 8) { - radix = 8; - return head + tail; - } - break; - case '0d': - if (radix === 0 || radix === 10) { - radix = 10; - return head + tail; - } - break; - case '0x': - if (radix === 0 || radix === 16) { - radix = 16; - return head + tail; - } - break; - } - return original - }); - - result = parseInt(string.replace(/_(?!_)/g, ''), radix); - return isNaN(result) ? 0 : result; - ; - }, $String_to_i$65.$$arity = -1); - - Opal.def(self, '$to_proc', $String_to_proc$66 = function $$to_proc() { - var $$67, $iter = $String_to_proc$66.$$p, $yield = $iter || nil, self = this, method_name = nil; - - if ($iter) $String_to_proc$66.$$p = null; - - method_name = $rb_plus("$", self.valueOf()); - return $send(self, 'proc', [], ($$67 = function($a){var self = $$67.$$s || this, $iter = $$67.$$p, block = $iter || nil, $post_args, args; - - - - if ($iter) $$67.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - if (args.length === 0) { - self.$raise($$($nesting, 'ArgumentError'), "no receiver given") - } - - var recv = args[0]; - - if (recv == null) recv = nil; - - var body = recv[method_name]; - - if (!body) { - return recv.$method_missing.apply(recv, args); - } - - if (typeof block === 'function') { - body.$$p = block; - } - - if (args.length === 1) { - return body.call(recv); - } else { - return body.apply(recv, args.slice(1)); - } - ;}, $$67.$$s = self, $$67.$$arity = -1, $$67)); - }, $String_to_proc$66.$$arity = 0); - - Opal.def(self, '$to_s', $String_to_s$68 = function $$to_s() { - var self = this; - - return self.toString(); - }, $String_to_s$68.$$arity = 0); - Opal.alias(self, "to_str", "to_s"); - Opal.alias(self, "to_sym", "intern"); - - Opal.def(self, '$tr', $String_tr$69 = function $$tr(from, to) { - var self = this; - - - from = $$($nesting, 'Opal').$coerce_to(from, $$($nesting, 'String'), "to_str").$to_s(); - to = $$($nesting, 'Opal').$coerce_to(to, $$($nesting, 'String'), "to_str").$to_s(); - - if (from.length == 0 || from === to) { - return self; - } - - var i, in_range, c, ch, start, end, length; - var subs = {}; - var from_chars = from.split(''); - var from_length = from_chars.length; - var to_chars = to.split(''); - var to_length = to_chars.length; - - var inverse = false; - var global_sub = null; - if (from_chars[0] === '^' && from_chars.length > 1) { - inverse = true; - from_chars.shift(); - global_sub = to_chars[to_length - 1] - from_length -= 1; - } - - var from_chars_expanded = []; - var last_from = null; - in_range = false; - for (i = 0; i < from_length; i++) { - ch = from_chars[i]; - if (last_from == null) { - last_from = ch; - from_chars_expanded.push(ch); - } - else if (ch === '-') { - if (last_from === '-') { - from_chars_expanded.push('-'); - from_chars_expanded.push('-'); - } - else if (i == from_length - 1) { - from_chars_expanded.push('-'); - } - else { - in_range = true; - } - } - else if (in_range) { - start = last_from.charCodeAt(0); - end = ch.charCodeAt(0); - if (start > end) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid range \"" + (String.fromCharCode(start)) + "-" + (String.fromCharCode(end)) + "\" in string transliteration") - } - for (c = start + 1; c < end; c++) { - from_chars_expanded.push(String.fromCharCode(c)); - } - from_chars_expanded.push(ch); - in_range = null; - last_from = null; - } - else { - from_chars_expanded.push(ch); - } - } - - from_chars = from_chars_expanded; - from_length = from_chars.length; - - if (inverse) { - for (i = 0; i < from_length; i++) { - subs[from_chars[i]] = true; - } - } - else { - if (to_length > 0) { - var to_chars_expanded = []; - var last_to = null; - in_range = false; - for (i = 0; i < to_length; i++) { - ch = to_chars[i]; - if (last_to == null) { - last_to = ch; - to_chars_expanded.push(ch); - } - else if (ch === '-') { - if (last_to === '-') { - to_chars_expanded.push('-'); - to_chars_expanded.push('-'); - } - else if (i == to_length - 1) { - to_chars_expanded.push('-'); - } - else { - in_range = true; - } - } - else if (in_range) { - start = last_to.charCodeAt(0); - end = ch.charCodeAt(0); - if (start > end) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid range \"" + (String.fromCharCode(start)) + "-" + (String.fromCharCode(end)) + "\" in string transliteration") - } - for (c = start + 1; c < end; c++) { - to_chars_expanded.push(String.fromCharCode(c)); - } - to_chars_expanded.push(ch); - in_range = null; - last_to = null; - } - else { - to_chars_expanded.push(ch); - } - } - - to_chars = to_chars_expanded; - to_length = to_chars.length; - } - - var length_diff = from_length - to_length; - if (length_diff > 0) { - var pad_char = (to_length > 0 ? to_chars[to_length - 1] : ''); - for (i = 0; i < length_diff; i++) { - to_chars.push(pad_char); - } - } - - for (i = 0; i < from_length; i++) { - subs[from_chars[i]] = to_chars[i]; - } - } - - var new_str = '' - for (i = 0, length = self.length; i < length; i++) { - ch = self.charAt(i); - var sub = subs[ch]; - if (inverse) { - new_str += (sub == null ? global_sub : ch); - } - else { - new_str += (sub != null ? sub : ch); - } - } - return self.$$cast(new_str); - ; - }, $String_tr$69.$$arity = 2); - - Opal.def(self, '$tr_s', $String_tr_s$70 = function $$tr_s(from, to) { - var self = this; - - - from = $$($nesting, 'Opal').$coerce_to(from, $$($nesting, 'String'), "to_str").$to_s(); - to = $$($nesting, 'Opal').$coerce_to(to, $$($nesting, 'String'), "to_str").$to_s(); - - if (from.length == 0) { - return self; - } - - var i, in_range, c, ch, start, end, length; - var subs = {}; - var from_chars = from.split(''); - var from_length = from_chars.length; - var to_chars = to.split(''); - var to_length = to_chars.length; - - var inverse = false; - var global_sub = null; - if (from_chars[0] === '^' && from_chars.length > 1) { - inverse = true; - from_chars.shift(); - global_sub = to_chars[to_length - 1] - from_length -= 1; - } - - var from_chars_expanded = []; - var last_from = null; - in_range = false; - for (i = 0; i < from_length; i++) { - ch = from_chars[i]; - if (last_from == null) { - last_from = ch; - from_chars_expanded.push(ch); - } - else if (ch === '-') { - if (last_from === '-') { - from_chars_expanded.push('-'); - from_chars_expanded.push('-'); - } - else if (i == from_length - 1) { - from_chars_expanded.push('-'); - } - else { - in_range = true; - } - } - else if (in_range) { - start = last_from.charCodeAt(0); - end = ch.charCodeAt(0); - if (start > end) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid range \"" + (String.fromCharCode(start)) + "-" + (String.fromCharCode(end)) + "\" in string transliteration") - } - for (c = start + 1; c < end; c++) { - from_chars_expanded.push(String.fromCharCode(c)); - } - from_chars_expanded.push(ch); - in_range = null; - last_from = null; - } - else { - from_chars_expanded.push(ch); - } - } - - from_chars = from_chars_expanded; - from_length = from_chars.length; - - if (inverse) { - for (i = 0; i < from_length; i++) { - subs[from_chars[i]] = true; - } - } - else { - if (to_length > 0) { - var to_chars_expanded = []; - var last_to = null; - in_range = false; - for (i = 0; i < to_length; i++) { - ch = to_chars[i]; - if (last_from == null) { - last_from = ch; - to_chars_expanded.push(ch); - } - else if (ch === '-') { - if (last_to === '-') { - to_chars_expanded.push('-'); - to_chars_expanded.push('-'); - } - else if (i == to_length - 1) { - to_chars_expanded.push('-'); - } - else { - in_range = true; - } - } - else if (in_range) { - start = last_from.charCodeAt(0); - end = ch.charCodeAt(0); - if (start > end) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid range \"" + (String.fromCharCode(start)) + "-" + (String.fromCharCode(end)) + "\" in string transliteration") - } - for (c = start + 1; c < end; c++) { - to_chars_expanded.push(String.fromCharCode(c)); - } - to_chars_expanded.push(ch); - in_range = null; - last_from = null; - } - else { - to_chars_expanded.push(ch); - } - } - - to_chars = to_chars_expanded; - to_length = to_chars.length; - } - - var length_diff = from_length - to_length; - if (length_diff > 0) { - var pad_char = (to_length > 0 ? to_chars[to_length - 1] : ''); - for (i = 0; i < length_diff; i++) { - to_chars.push(pad_char); - } - } - - for (i = 0; i < from_length; i++) { - subs[from_chars[i]] = to_chars[i]; - } - } - var new_str = '' - var last_substitute = null - for (i = 0, length = self.length; i < length; i++) { - ch = self.charAt(i); - var sub = subs[ch] - if (inverse) { - if (sub == null) { - if (last_substitute == null) { - new_str += global_sub; - last_substitute = true; - } - } - else { - new_str += ch; - last_substitute = null; - } - } - else { - if (sub != null) { - if (last_substitute == null || last_substitute !== sub) { - new_str += sub; - last_substitute = sub; - } - } - else { - new_str += ch; - last_substitute = null; - } - } - } - return self.$$cast(new_str); - ; - }, $String_tr_s$70.$$arity = 2); - - Opal.def(self, '$upcase', $String_upcase$71 = function $$upcase() { - var self = this; - - return self.$$cast(self.toUpperCase()); - }, $String_upcase$71.$$arity = 0); - - Opal.def(self, '$upto', $String_upto$72 = function $$upto(stop, excl) { - var $iter = $String_upto$72.$$p, block = $iter || nil, self = this; - - if ($iter) $String_upto$72.$$p = null; - - - if ($iter) $String_upto$72.$$p = null;; - - if (excl == null) { - excl = false; - }; - if ((block !== nil)) { - } else { - return self.$enum_for("upto", stop, excl) - }; - stop = $$($nesting, 'Opal').$coerce_to(stop, $$($nesting, 'String'), "to_str"); - - var a, b, s = self.toString(); - - if (s.length === 1 && stop.length === 1) { - - a = s.charCodeAt(0); - b = stop.charCodeAt(0); - - while (a <= b) { - if (excl && a === b) { - break; - } - - block(String.fromCharCode(a)); - - a += 1; - } - - } else if (parseInt(s, 10).toString() === s && parseInt(stop, 10).toString() === stop) { - - a = parseInt(s, 10); - b = parseInt(stop, 10); - - while (a <= b) { - if (excl && a === b) { - break; - } - - block(a.toString()); - - a += 1; - } - - } else { - - while (s.length <= stop.length && s <= stop) { - if (excl && s === stop) { - break; - } - - block(s); - - s = (s).$succ(); - } - - } - return self; - ; - }, $String_upto$72.$$arity = -2); - - function char_class_from_char_sets(sets) { - function explode_sequences_in_character_set(set) { - var result = '', - i, len = set.length, - curr_char, - skip_next_dash, - char_code_from, - char_code_upto, - char_code; - for (i = 0; i < len; i++) { - curr_char = set.charAt(i); - if (curr_char === '-' && i > 0 && i < (len - 1) && !skip_next_dash) { - char_code_from = set.charCodeAt(i - 1); - char_code_upto = set.charCodeAt(i + 1); - if (char_code_from > char_code_upto) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid range \"" + (char_code_from) + "-" + (char_code_upto) + "\" in string transliteration") - } - for (char_code = char_code_from + 1; char_code < char_code_upto + 1; char_code++) { - result += String.fromCharCode(char_code); - } - skip_next_dash = true; - i++; - } else { - skip_next_dash = (curr_char === '\\'); - result += curr_char; - } - } - return result; - } - - function intersection(setA, setB) { - if (setA.length === 0) { - return setB; - } - var result = '', - i, len = setA.length, - chr; - for (i = 0; i < len; i++) { - chr = setA.charAt(i); - if (setB.indexOf(chr) !== -1) { - result += chr; - } - } - return result; - } - - var i, len, set, neg, chr, tmp, - pos_intersection = '', - neg_intersection = ''; - - for (i = 0, len = sets.length; i < len; i++) { - set = $$($nesting, 'Opal').$coerce_to(sets[i], $$($nesting, 'String'), "to_str"); - neg = (set.charAt(0) === '^' && set.length > 1); - set = explode_sequences_in_character_set(neg ? set.slice(1) : set); - if (neg) { - neg_intersection = intersection(neg_intersection, set); - } else { - pos_intersection = intersection(pos_intersection, set); - } - } - - if (pos_intersection.length > 0 && neg_intersection.length > 0) { - tmp = ''; - for (i = 0, len = pos_intersection.length; i < len; i++) { - chr = pos_intersection.charAt(i); - if (neg_intersection.indexOf(chr) === -1) { - tmp += chr; - } - } - pos_intersection = tmp; - neg_intersection = ''; - } - - if (pos_intersection.length > 0) { - return '[' + $$($nesting, 'Regexp').$escape(pos_intersection) + ']'; - } - - if (neg_intersection.length > 0) { - return '[^' + $$($nesting, 'Regexp').$escape(neg_intersection) + ']'; - } - - return null; - } - ; - - Opal.def(self, '$instance_variables', $String_instance_variables$73 = function $$instance_variables() { - var self = this; - - return [] - }, $String_instance_variables$73.$$arity = 0); - Opal.defs(self, '$_load', $String__load$74 = function $$_load($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $send(self, 'new', Opal.to_a(args)); - }, $String__load$74.$$arity = -1); - - Opal.def(self, '$unicode_normalize', $String_unicode_normalize$75 = function $$unicode_normalize(form) { - var self = this; - - - ; - return self.toString();; - }, $String_unicode_normalize$75.$$arity = -1); - - Opal.def(self, '$unicode_normalized?', $String_unicode_normalized$ques$76 = function(form) { - var self = this; - - - ; - return true; - }, $String_unicode_normalized$ques$76.$$arity = -1); - - Opal.def(self, '$unpack', $String_unpack$77 = function $$unpack(format) { - var self = this; - - return self.$raise("To use String#unpack, you must first require 'corelib/string/unpack'.") - }, $String_unpack$77.$$arity = 1); - return (Opal.def(self, '$unpack1', $String_unpack1$78 = function $$unpack1(format) { - var self = this; - - return self.$raise("To use String#unpack1, you must first require 'corelib/string/unpack'.") - }, $String_unpack1$78.$$arity = 1), nil) && 'unpack1'; - })($nesting[0], String, $nesting); - return Opal.const_set($nesting[0], 'Symbol', $$($nesting, 'String')); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/enumerable"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_divide(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs / rhs : lhs['$/'](rhs); - } - function $rb_le(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy, $send = Opal.send, $falsy = Opal.falsy, $hash2 = Opal.hash2, $lambda = Opal.lambda; - - Opal.add_stubs(['$each', '$public_send', '$destructure', '$to_enum', '$enumerator_size', '$new', '$yield', '$raise', '$slice_when', '$!', '$enum_for', '$flatten', '$map', '$warn', '$proc', '$==', '$nil?', '$respond_to?', '$coerce_to!', '$>', '$*', '$coerce_to', '$try_convert', '$<', '$+', '$-', '$ceil', '$/', '$size', '$__send__', '$length', '$<=', '$[]', '$push', '$<<', '$[]=', '$===', '$inspect', '$<=>', '$first', '$reverse', '$sort', '$to_proc', '$compare', '$call', '$dup', '$to_a', '$sort!', '$map!', '$key?', '$values', '$zip']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Enumerable'); - - var $nesting = [self].concat($parent_nesting), $Enumerable_all$ques$1, $Enumerable_any$ques$5, $Enumerable_chunk$9, $Enumerable_chunk_while$12, $Enumerable_collect$14, $Enumerable_collect_concat$16, $Enumerable_count$19, $Enumerable_cycle$23, $Enumerable_detect$25, $Enumerable_drop$27, $Enumerable_drop_while$28, $Enumerable_each_cons$29, $Enumerable_each_entry$31, $Enumerable_each_slice$33, $Enumerable_each_with_index$35, $Enumerable_each_with_object$37, $Enumerable_entries$39, $Enumerable_find_all$40, $Enumerable_find_index$42, $Enumerable_first$45, $Enumerable_grep$48, $Enumerable_grep_v$50, $Enumerable_group_by$52, $Enumerable_include$ques$54, $Enumerable_inject$56, $Enumerable_lazy$57, $Enumerable_enumerator_size$59, $Enumerable_max$60, $Enumerable_max_by$61, $Enumerable_min$63, $Enumerable_min_by$64, $Enumerable_minmax$66, $Enumerable_minmax_by$68, $Enumerable_none$ques$69, $Enumerable_one$ques$73, $Enumerable_partition$77, $Enumerable_reject$79, $Enumerable_reverse_each$81, $Enumerable_slice_before$83, $Enumerable_slice_after$85, $Enumerable_slice_when$88, $Enumerable_sort$90, $Enumerable_sort_by$92, $Enumerable_sum$97, $Enumerable_take$99, $Enumerable_take_while$100, $Enumerable_uniq$102, $Enumerable_zip$104; - - - - function comparableForPattern(value) { - if (value.length === 0) { - value = [nil]; - } - - if (value.length > 1) { - value = [value]; - } - - return value; - } - ; - - Opal.def(self, '$all?', $Enumerable_all$ques$1 = function(pattern) {try { - - var $iter = $Enumerable_all$ques$1.$$p, block = $iter || nil, $$2, $$3, $$4, self = this; - - if ($iter) $Enumerable_all$ques$1.$$p = null; - - - if ($iter) $Enumerable_all$ques$1.$$p = null;; - ; - if ($truthy(pattern !== undefined)) { - $send(self, 'each', [], ($$2 = function($a){var self = $$2.$$s || this, $post_args, value, comparable = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - comparable = comparableForPattern(value); - if ($truthy($send(pattern, 'public_send', ["==="].concat(Opal.to_a(comparable))))) { - return nil - } else { - Opal.ret(false) - };}, $$2.$$s = self, $$2.$$arity = -1, $$2)) - } else if ((block !== nil)) { - $send(self, 'each', [], ($$3 = function($a){var self = $$3.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($truthy(Opal.yieldX(block, Opal.to_a(value)))) { - return nil - } else { - Opal.ret(false) - };}, $$3.$$s = self, $$3.$$arity = -1, $$3)) - } else { - $send(self, 'each', [], ($$4 = function($a){var self = $$4.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($truthy($$($nesting, 'Opal').$destructure(value))) { - return nil - } else { - Opal.ret(false) - };}, $$4.$$s = self, $$4.$$arity = -1, $$4)) - }; - return true; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_all$ques$1.$$arity = -1); - - Opal.def(self, '$any?', $Enumerable_any$ques$5 = function(pattern) {try { - - var $iter = $Enumerable_any$ques$5.$$p, block = $iter || nil, $$6, $$7, $$8, self = this; - - if ($iter) $Enumerable_any$ques$5.$$p = null; - - - if ($iter) $Enumerable_any$ques$5.$$p = null;; - ; - if ($truthy(pattern !== undefined)) { - $send(self, 'each', [], ($$6 = function($a){var self = $$6.$$s || this, $post_args, value, comparable = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - comparable = comparableForPattern(value); - if ($truthy($send(pattern, 'public_send', ["==="].concat(Opal.to_a(comparable))))) { - Opal.ret(true) - } else { - return nil - };}, $$6.$$s = self, $$6.$$arity = -1, $$6)) - } else if ((block !== nil)) { - $send(self, 'each', [], ($$7 = function($a){var self = $$7.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($truthy(Opal.yieldX(block, Opal.to_a(value)))) { - Opal.ret(true) - } else { - return nil - };}, $$7.$$s = self, $$7.$$arity = -1, $$7)) - } else { - $send(self, 'each', [], ($$8 = function($a){var self = $$8.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($truthy($$($nesting, 'Opal').$destructure(value))) { - Opal.ret(true) - } else { - return nil - };}, $$8.$$s = self, $$8.$$arity = -1, $$8)) - }; - return false; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_any$ques$5.$$arity = -1); - - Opal.def(self, '$chunk', $Enumerable_chunk$9 = function $$chunk() { - var $iter = $Enumerable_chunk$9.$$p, block = $iter || nil, $$10, $$11, self = this; - - if ($iter) $Enumerable_chunk$9.$$p = null; - - - if ($iter) $Enumerable_chunk$9.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'to_enum', ["chunk"], ($$10 = function(){var self = $$10.$$s || this; - - return self.$enumerator_size()}, $$10.$$s = self, $$10.$$arity = 0, $$10)) - }; - return $send($$$('::', 'Enumerator'), 'new', [], ($$11 = function(yielder){var self = $$11.$$s || this; - - - - if (yielder == null) { - yielder = nil; - }; - - var previous = nil, accumulate = []; - - function releaseAccumulate() { - if (accumulate.length > 0) { - yielder.$yield(previous, accumulate) - } - } - - self.$each.$$p = function(value) { - var key = Opal.yield1(block, value); - - if (key === nil) { - releaseAccumulate(); - accumulate = []; - previous = nil; - } else { - if (previous === nil || previous === key) { - accumulate.push(value); - } else { - releaseAccumulate(); - accumulate = [value]; - } - - previous = key; - } - } - - self.$each(); - - releaseAccumulate(); - ;}, $$11.$$s = self, $$11.$$arity = 1, $$11)); - }, $Enumerable_chunk$9.$$arity = 0); - - Opal.def(self, '$chunk_while', $Enumerable_chunk_while$12 = function $$chunk_while() { - var $iter = $Enumerable_chunk_while$12.$$p, block = $iter || nil, $$13, self = this; - - if ($iter) $Enumerable_chunk_while$12.$$p = null; - - - if ($iter) $Enumerable_chunk_while$12.$$p = null;; - if ((block !== nil)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "no block given") - }; - return $send(self, 'slice_when', [], ($$13 = function(before, after){var self = $$13.$$s || this; - - - - if (before == null) { - before = nil; - }; - - if (after == null) { - after = nil; - }; - return Opal.yieldX(block, [before, after])['$!']();}, $$13.$$s = self, $$13.$$arity = 2, $$13)); - }, $Enumerable_chunk_while$12.$$arity = 0); - - Opal.def(self, '$collect', $Enumerable_collect$14 = function $$collect() { - var $iter = $Enumerable_collect$14.$$p, block = $iter || nil, $$15, self = this; - - if ($iter) $Enumerable_collect$14.$$p = null; - - - if ($iter) $Enumerable_collect$14.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["collect"], ($$15 = function(){var self = $$15.$$s || this; - - return self.$enumerator_size()}, $$15.$$s = self, $$15.$$arity = 0, $$15)) - }; - - var result = []; - - self.$each.$$p = function() { - var value = Opal.yieldX(block, arguments); - - result.push(value); - }; - - self.$each(); - - return result; - ; - }, $Enumerable_collect$14.$$arity = 0); - - Opal.def(self, '$collect_concat', $Enumerable_collect_concat$16 = function $$collect_concat() { - var $iter = $Enumerable_collect_concat$16.$$p, block = $iter || nil, $$17, $$18, self = this; - - if ($iter) $Enumerable_collect_concat$16.$$p = null; - - - if ($iter) $Enumerable_collect_concat$16.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["collect_concat"], ($$17 = function(){var self = $$17.$$s || this; - - return self.$enumerator_size()}, $$17.$$s = self, $$17.$$arity = 0, $$17)) - }; - return $send(self, 'map', [], ($$18 = function(item){var self = $$18.$$s || this; - - - - if (item == null) { - item = nil; - }; - return Opal.yield1(block, item);;}, $$18.$$s = self, $$18.$$arity = 1, $$18)).$flatten(1); - }, $Enumerable_collect_concat$16.$$arity = 0); - - Opal.def(self, '$count', $Enumerable_count$19 = function $$count(object) { - var $iter = $Enumerable_count$19.$$p, block = $iter || nil, $$20, $$21, $$22, self = this, result = nil; - - if ($iter) $Enumerable_count$19.$$p = null; - - - if ($iter) $Enumerable_count$19.$$p = null;; - ; - result = 0; - - if (object != null && block !== nil) { - self.$warn("warning: given block not used") - } - ; - if ($truthy(object != null)) { - block = $send(self, 'proc', [], ($$20 = function($a){var self = $$20.$$s || this, $post_args, args; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $$($nesting, 'Opal').$destructure(args)['$=='](object);}, $$20.$$s = self, $$20.$$arity = -1, $$20)) - } else if ($truthy(block['$nil?']())) { - block = $send(self, 'proc', [], ($$21 = function(){var self = $$21.$$s || this; - - return true}, $$21.$$s = self, $$21.$$arity = 0, $$21))}; - $send(self, 'each', [], ($$22 = function($a){var self = $$22.$$s || this, $post_args, args; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy(Opal.yieldX(block, args))) { - return result++; - } else { - return nil - };}, $$22.$$s = self, $$22.$$arity = -1, $$22)); - return result; - }, $Enumerable_count$19.$$arity = -1); - - Opal.def(self, '$cycle', $Enumerable_cycle$23 = function $$cycle(n) { - var $iter = $Enumerable_cycle$23.$$p, block = $iter || nil, $$24, self = this; - - if ($iter) $Enumerable_cycle$23.$$p = null; - - - if ($iter) $Enumerable_cycle$23.$$p = null;; - - if (n == null) { - n = nil; - }; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["cycle", n], ($$24 = function(){var self = $$24.$$s || this; - - if ($truthy(n['$nil?']())) { - if ($truthy(self['$respond_to?']("size"))) { - return $$$($$($nesting, 'Float'), 'INFINITY') - } else { - return nil - } - } else { - - n = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_gt(n, 0))) { - return $rb_times(self.$enumerator_size(), n) - } else { - return 0 - }; - }}, $$24.$$s = self, $$24.$$arity = 0, $$24)) - }; - if ($truthy(n['$nil?']())) { - } else { - - n = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int"); - if ($truthy(n <= 0)) { - return nil}; - }; - - var result, - all = [], i, length, value; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = Opal.yield1(block, param); - - all.push(param); - } - - self.$each(); - - if (result !== undefined) { - return result; - } - - if (all.length === 0) { - return nil; - } - - if (n === nil) { - while (true) { - for (i = 0, length = all.length; i < length; i++) { - value = Opal.yield1(block, all[i]); - } - } - } - else { - while (n > 1) { - for (i = 0, length = all.length; i < length; i++) { - value = Opal.yield1(block, all[i]); - } - - n--; - } - } - ; - }, $Enumerable_cycle$23.$$arity = -1); - - Opal.def(self, '$detect', $Enumerable_detect$25 = function $$detect(ifnone) {try { - - var $iter = $Enumerable_detect$25.$$p, block = $iter || nil, $$26, self = this; - - if ($iter) $Enumerable_detect$25.$$p = null; - - - if ($iter) $Enumerable_detect$25.$$p = null;; - ; - if ((block !== nil)) { - } else { - return self.$enum_for("detect", ifnone) - }; - $send(self, 'each', [], ($$26 = function($a){var self = $$26.$$s || this, $post_args, args, value = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - value = $$($nesting, 'Opal').$destructure(args); - if ($truthy(Opal.yield1(block, value))) { - Opal.ret(value) - } else { - return nil - };}, $$26.$$s = self, $$26.$$arity = -1, $$26)); - - if (ifnone !== undefined) { - if (typeof(ifnone) === 'function') { - return ifnone(); - } else { - return ifnone; - } - } - ; - return nil; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_detect$25.$$arity = -1); - - Opal.def(self, '$drop', $Enumerable_drop$27 = function $$drop(number) { - var self = this; - - - number = $$($nesting, 'Opal').$coerce_to(number, $$($nesting, 'Integer'), "to_int"); - if ($truthy(number < 0)) { - self.$raise($$($nesting, 'ArgumentError'), "attempt to drop negative size")}; - - var result = [], - current = 0; - - self.$each.$$p = function() { - if (number <= current) { - result.push($$($nesting, 'Opal').$destructure(arguments)); - } - - current++; - }; - - self.$each() - - return result; - ; - }, $Enumerable_drop$27.$$arity = 1); - - Opal.def(self, '$drop_while', $Enumerable_drop_while$28 = function $$drop_while() { - var $iter = $Enumerable_drop_while$28.$$p, block = $iter || nil, self = this; - - if ($iter) $Enumerable_drop_while$28.$$p = null; - - - if ($iter) $Enumerable_drop_while$28.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("drop_while") - }; - - var result = [], - dropping = true; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments); - - if (dropping) { - var value = Opal.yield1(block, param); - - if ($falsy(value)) { - dropping = false; - result.push(param); - } - } - else { - result.push(param); - } - }; - - self.$each(); - - return result; - ; - }, $Enumerable_drop_while$28.$$arity = 0); - - Opal.def(self, '$each_cons', $Enumerable_each_cons$29 = function $$each_cons(n) { - var $iter = $Enumerable_each_cons$29.$$p, block = $iter || nil, $$30, self = this; - - if ($iter) $Enumerable_each_cons$29.$$p = null; - - - if ($iter) $Enumerable_each_cons$29.$$p = null;; - if ($truthy(arguments.length != 1)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (arguments.length) + " for 1)")}; - n = $$($nesting, 'Opal').$try_convert(n, $$($nesting, 'Integer'), "to_int"); - if ($truthy(n <= 0)) { - self.$raise($$($nesting, 'ArgumentError'), "invalid size")}; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["each_cons", n], ($$30 = function(){var self = $$30.$$s || this, $a, enum_size = nil; - - - enum_size = self.$enumerator_size(); - if ($truthy(enum_size['$nil?']())) { - return nil - } else if ($truthy(($truthy($a = enum_size['$=='](0)) ? $a : $rb_lt(enum_size, n)))) { - return 0 - } else { - return $rb_plus($rb_minus(enum_size, n), 1) - };}, $$30.$$s = self, $$30.$$arity = 0, $$30)) - }; - - var buffer = [], result = nil; - - self.$each.$$p = function() { - var element = $$($nesting, 'Opal').$destructure(arguments); - buffer.push(element); - if (buffer.length > n) { - buffer.shift(); - } - if (buffer.length == n) { - Opal.yield1(block, buffer.slice(0, n)); - } - } - - self.$each(); - - return result; - ; - }, $Enumerable_each_cons$29.$$arity = 1); - - Opal.def(self, '$each_entry', $Enumerable_each_entry$31 = function $$each_entry($a) { - var $iter = $Enumerable_each_entry$31.$$p, block = $iter || nil, $post_args, data, $$32, self = this; - - if ($iter) $Enumerable_each_entry$31.$$p = null; - - - if ($iter) $Enumerable_each_entry$31.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - data = $post_args;; - if ((block !== nil)) { - } else { - return $send(self, 'to_enum', ["each_entry"].concat(Opal.to_a(data)), ($$32 = function(){var self = $$32.$$s || this; - - return self.$enumerator_size()}, $$32.$$s = self, $$32.$$arity = 0, $$32)) - }; - - self.$each.$$p = function() { - var item = $$($nesting, 'Opal').$destructure(arguments); - - Opal.yield1(block, item); - } - - self.$each.apply(self, data); - - return self; - ; - }, $Enumerable_each_entry$31.$$arity = -1); - - Opal.def(self, '$each_slice', $Enumerable_each_slice$33 = function $$each_slice(n) { - var $iter = $Enumerable_each_slice$33.$$p, block = $iter || nil, $$34, self = this; - - if ($iter) $Enumerable_each_slice$33.$$p = null; - - - if ($iter) $Enumerable_each_slice$33.$$p = null;; - n = $$($nesting, 'Opal').$coerce_to(n, $$($nesting, 'Integer'), "to_int"); - if ($truthy(n <= 0)) { - self.$raise($$($nesting, 'ArgumentError'), "invalid slice size")}; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["each_slice", n], ($$34 = function(){var self = $$34.$$s || this; - - if ($truthy(self['$respond_to?']("size"))) { - return $rb_divide(self.$size(), n).$ceil() - } else { - return nil - }}, $$34.$$s = self, $$34.$$arity = 0, $$34)) - }; - - var result, - slice = [] - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments); - - slice.push(param); - - if (slice.length === n) { - Opal.yield1(block, slice); - slice = []; - } - }; - - self.$each(); - - if (result !== undefined) { - return result; - } - - // our "last" group, if smaller than n then won't have been yielded - if (slice.length > 0) { - Opal.yield1(block, slice); - } - ; - return nil; - }, $Enumerable_each_slice$33.$$arity = 1); - - Opal.def(self, '$each_with_index', $Enumerable_each_with_index$35 = function $$each_with_index($a) { - var $iter = $Enumerable_each_with_index$35.$$p, block = $iter || nil, $post_args, args, $$36, self = this; - - if ($iter) $Enumerable_each_with_index$35.$$p = null; - - - if ($iter) $Enumerable_each_with_index$35.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["each_with_index"].concat(Opal.to_a(args)), ($$36 = function(){var self = $$36.$$s || this; - - return self.$enumerator_size()}, $$36.$$s = self, $$36.$$arity = 0, $$36)) - }; - - var result, - index = 0; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments); - - block(param, index); - - index++; - }; - - self.$each.apply(self, args); - - if (result !== undefined) { - return result; - } - ; - return self; - }, $Enumerable_each_with_index$35.$$arity = -1); - - Opal.def(self, '$each_with_object', $Enumerable_each_with_object$37 = function $$each_with_object(object) { - var $iter = $Enumerable_each_with_object$37.$$p, block = $iter || nil, $$38, self = this; - - if ($iter) $Enumerable_each_with_object$37.$$p = null; - - - if ($iter) $Enumerable_each_with_object$37.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["each_with_object", object], ($$38 = function(){var self = $$38.$$s || this; - - return self.$enumerator_size()}, $$38.$$s = self, $$38.$$arity = 0, $$38)) - }; - - var result; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments); - - block(param, object); - }; - - self.$each(); - - if (result !== undefined) { - return result; - } - ; - return object; - }, $Enumerable_each_with_object$37.$$arity = 1); - - Opal.def(self, '$entries', $Enumerable_entries$39 = function $$entries($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - var result = []; - - self.$each.$$p = function() { - result.push($$($nesting, 'Opal').$destructure(arguments)); - }; - - self.$each.apply(self, args); - - return result; - ; - }, $Enumerable_entries$39.$$arity = -1); - Opal.alias(self, "find", "detect"); - - Opal.def(self, '$find_all', $Enumerable_find_all$40 = function $$find_all() { - var $iter = $Enumerable_find_all$40.$$p, block = $iter || nil, $$41, self = this; - - if ($iter) $Enumerable_find_all$40.$$p = null; - - - if ($iter) $Enumerable_find_all$40.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["find_all"], ($$41 = function(){var self = $$41.$$s || this; - - return self.$enumerator_size()}, $$41.$$s = self, $$41.$$arity = 0, $$41)) - }; - - var result = []; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = Opal.yield1(block, param); - - if ($truthy(value)) { - result.push(param); - } - }; - - self.$each(); - - return result; - ; - }, $Enumerable_find_all$40.$$arity = 0); - - Opal.def(self, '$find_index', $Enumerable_find_index$42 = function $$find_index(object) {try { - - var $iter = $Enumerable_find_index$42.$$p, block = $iter || nil, $$43, $$44, self = this, index = nil; - - if ($iter) $Enumerable_find_index$42.$$p = null; - - - if ($iter) $Enumerable_find_index$42.$$p = null;; - ; - if ($truthy(object === undefined && block === nil)) { - return self.$enum_for("find_index")}; - - if (object != null && block !== nil) { - self.$warn("warning: given block not used") - } - ; - index = 0; - if ($truthy(object != null)) { - $send(self, 'each', [], ($$43 = function($a){var self = $$43.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($$($nesting, 'Opal').$destructure(value)['$=='](object)) { - Opal.ret(index)}; - return index += 1;;}, $$43.$$s = self, $$43.$$arity = -1, $$43)) - } else { - $send(self, 'each', [], ($$44 = function($a){var self = $$44.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($truthy(Opal.yieldX(block, Opal.to_a(value)))) { - Opal.ret(index)}; - return index += 1;;}, $$44.$$s = self, $$44.$$arity = -1, $$44)) - }; - return nil; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_find_index$42.$$arity = -1); - - Opal.def(self, '$first', $Enumerable_first$45 = function $$first(number) {try { - - var $$46, $$47, self = this, result = nil, current = nil; - - - ; - if ($truthy(number === undefined)) { - return $send(self, 'each', [], ($$46 = function(value){var self = $$46.$$s || this; - - - - if (value == null) { - value = nil; - }; - Opal.ret(value);}, $$46.$$s = self, $$46.$$arity = 1, $$46)) - } else { - - result = []; - number = $$($nesting, 'Opal').$coerce_to(number, $$($nesting, 'Integer'), "to_int"); - if ($truthy(number < 0)) { - self.$raise($$($nesting, 'ArgumentError'), "attempt to take negative size")}; - if ($truthy(number == 0)) { - return []}; - current = 0; - $send(self, 'each', [], ($$47 = function($a){var self = $$47.$$s || this, $post_args, args; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - result.push($$($nesting, 'Opal').$destructure(args)); - if ($truthy(number <= ++current)) { - Opal.ret(result) - } else { - return nil - };}, $$47.$$s = self, $$47.$$arity = -1, $$47)); - return result; - }; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_first$45.$$arity = -1); - Opal.alias(self, "flat_map", "collect_concat"); - - Opal.def(self, '$grep', $Enumerable_grep$48 = function $$grep(pattern) { - var $iter = $Enumerable_grep$48.$$p, block = $iter || nil, $$49, self = this, result = nil; - - if ($iter) $Enumerable_grep$48.$$p = null; - - - if ($iter) $Enumerable_grep$48.$$p = null;; - result = []; - $send(self, 'each', [], ($$49 = function($a){var self = $$49.$$s || this, $post_args, value, cmp = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - cmp = comparableForPattern(value); - if ($truthy($send(pattern, '__send__', ["==="].concat(Opal.to_a(cmp))))) { - } else { - return nil; - }; - if ((block !== nil)) { - - if ($truthy($rb_gt(value.$length(), 1))) { - value = [value]}; - value = Opal.yieldX(block, Opal.to_a(value)); - } else if ($truthy($rb_le(value.$length(), 1))) { - value = value['$[]'](0)}; - return result.$push(value);}, $$49.$$s = self, $$49.$$arity = -1, $$49)); - return result; - }, $Enumerable_grep$48.$$arity = 1); - - Opal.def(self, '$grep_v', $Enumerable_grep_v$50 = function $$grep_v(pattern) { - var $iter = $Enumerable_grep_v$50.$$p, block = $iter || nil, $$51, self = this, result = nil; - - if ($iter) $Enumerable_grep_v$50.$$p = null; - - - if ($iter) $Enumerable_grep_v$50.$$p = null;; - result = []; - $send(self, 'each', [], ($$51 = function($a){var self = $$51.$$s || this, $post_args, value, cmp = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - cmp = comparableForPattern(value); - if ($truthy($send(pattern, '__send__', ["==="].concat(Opal.to_a(cmp))))) { - return nil;}; - if ((block !== nil)) { - - if ($truthy($rb_gt(value.$length(), 1))) { - value = [value]}; - value = Opal.yieldX(block, Opal.to_a(value)); - } else if ($truthy($rb_le(value.$length(), 1))) { - value = value['$[]'](0)}; - return result.$push(value);}, $$51.$$s = self, $$51.$$arity = -1, $$51)); - return result; - }, $Enumerable_grep_v$50.$$arity = 1); - - Opal.def(self, '$group_by', $Enumerable_group_by$52 = function $$group_by() { - var $iter = $Enumerable_group_by$52.$$p, block = $iter || nil, $$53, $a, self = this, hash = nil, $writer = nil; - - if ($iter) $Enumerable_group_by$52.$$p = null; - - - if ($iter) $Enumerable_group_by$52.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["group_by"], ($$53 = function(){var self = $$53.$$s || this; - - return self.$enumerator_size()}, $$53.$$s = self, $$53.$$arity = 0, $$53)) - }; - hash = $hash2([], {}); - - var result; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = Opal.yield1(block, param); - - ($truthy($a = hash['$[]'](value)) ? $a : (($writer = [value, []]), $send(hash, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))['$<<'](param); - } - - self.$each(); - - if (result !== undefined) { - return result; - } - ; - return hash; - }, $Enumerable_group_by$52.$$arity = 0); - - Opal.def(self, '$include?', $Enumerable_include$ques$54 = function(obj) {try { - - var $$55, self = this; - - - $send(self, 'each', [], ($$55 = function($a){var self = $$55.$$s || this, $post_args, args; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($$($nesting, 'Opal').$destructure(args)['$=='](obj)) { - Opal.ret(true) - } else { - return nil - };}, $$55.$$s = self, $$55.$$arity = -1, $$55)); - return false; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_include$ques$54.$$arity = 1); - - Opal.def(self, '$inject', $Enumerable_inject$56 = function $$inject(object, sym) { - var $iter = $Enumerable_inject$56.$$p, block = $iter || nil, self = this; - - if ($iter) $Enumerable_inject$56.$$p = null; - - - if ($iter) $Enumerable_inject$56.$$p = null;; - ; - ; - - var result = object; - - if (block !== nil && sym === undefined) { - self.$each.$$p = function() { - var value = $$($nesting, 'Opal').$destructure(arguments); - - if (result === undefined) { - result = value; - return; - } - - value = Opal.yieldX(block, [result, value]); - - result = value; - }; - } - else { - if (sym === undefined) { - if (!$$($nesting, 'Symbol')['$==='](object)) { - self.$raise($$($nesting, 'TypeError'), "" + (object.$inspect()) + " is not a Symbol"); - } - - sym = object; - result = undefined; - } - - self.$each.$$p = function() { - var value = $$($nesting, 'Opal').$destructure(arguments); - - if (result === undefined) { - result = value; - return; - } - - result = (result).$__send__(sym, value); - }; - } - - self.$each(); - - return result == undefined ? nil : result; - ; - }, $Enumerable_inject$56.$$arity = -1); - - Opal.def(self, '$lazy', $Enumerable_lazy$57 = function $$lazy() { - var $$58, self = this; - - return $send($$$($$($nesting, 'Enumerator'), 'Lazy'), 'new', [self, self.$enumerator_size()], ($$58 = function(enum$, $a){var self = $$58.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - return $send(enum$, 'yield', Opal.to_a(args));}, $$58.$$s = self, $$58.$$arity = -2, $$58)) - }, $Enumerable_lazy$57.$$arity = 0); - - Opal.def(self, '$enumerator_size', $Enumerable_enumerator_size$59 = function $$enumerator_size() { - var self = this; - - if ($truthy(self['$respond_to?']("size"))) { - return self.$size() - } else { - return nil - } - }, $Enumerable_enumerator_size$59.$$arity = 0); - Opal.alias(self, "map", "collect"); - - Opal.def(self, '$max', $Enumerable_max$60 = function $$max(n) { - var $iter = $Enumerable_max$60.$$p, block = $iter || nil, self = this; - - if ($iter) $Enumerable_max$60.$$p = null; - - - if ($iter) $Enumerable_max$60.$$p = null;; - ; - - if (n === undefined || n === nil) { - var result, value; - - self.$each.$$p = function() { - var item = $$($nesting, 'Opal').$destructure(arguments); - - if (result === undefined) { - result = item; - return; - } - - if (block !== nil) { - value = Opal.yieldX(block, [item, result]); - } else { - value = (item)['$<=>'](result); - } - - if (value === nil) { - self.$raise($$($nesting, 'ArgumentError'), "comparison failed"); - } - - if (value > 0) { - result = item; - } - } - - self.$each(); - - if (result === undefined) { - return nil; - } else { - return result; - } - } - ; - n = $$($nesting, 'Opal').$coerce_to(n, $$($nesting, 'Integer'), "to_int"); - return $send(self, 'sort', [], block.$to_proc()).$reverse().$first(n); - }, $Enumerable_max$60.$$arity = -1); - - Opal.def(self, '$max_by', $Enumerable_max_by$61 = function $$max_by() { - var $iter = $Enumerable_max_by$61.$$p, block = $iter || nil, $$62, self = this; - - if ($iter) $Enumerable_max_by$61.$$p = null; - - - if ($iter) $Enumerable_max_by$61.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["max_by"], ($$62 = function(){var self = $$62.$$s || this; - - return self.$enumerator_size()}, $$62.$$s = self, $$62.$$arity = 0, $$62)) - }; - - var result, - by; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = Opal.yield1(block, param); - - if (result === undefined) { - result = param; - by = value; - return; - } - - if ((value)['$<=>'](by) > 0) { - result = param - by = value; - } - }; - - self.$each(); - - return result === undefined ? nil : result; - ; - }, $Enumerable_max_by$61.$$arity = 0); - Opal.alias(self, "member?", "include?"); - - Opal.def(self, '$min', $Enumerable_min$63 = function $$min() { - var $iter = $Enumerable_min$63.$$p, block = $iter || nil, self = this; - - if ($iter) $Enumerable_min$63.$$p = null; - - - if ($iter) $Enumerable_min$63.$$p = null;; - - var result; - - if (block !== nil) { - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments); - - if (result === undefined) { - result = param; - return; - } - - var value = block(param, result); - - if (value === nil) { - self.$raise($$($nesting, 'ArgumentError'), "comparison failed"); - } - - if (value < 0) { - result = param; - } - }; - } - else { - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments); - - if (result === undefined) { - result = param; - return; - } - - if ($$($nesting, 'Opal').$compare(param, result) < 0) { - result = param; - } - }; - } - - self.$each(); - - return result === undefined ? nil : result; - ; - }, $Enumerable_min$63.$$arity = 0); - - Opal.def(self, '$min_by', $Enumerable_min_by$64 = function $$min_by() { - var $iter = $Enumerable_min_by$64.$$p, block = $iter || nil, $$65, self = this; - - if ($iter) $Enumerable_min_by$64.$$p = null; - - - if ($iter) $Enumerable_min_by$64.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["min_by"], ($$65 = function(){var self = $$65.$$s || this; - - return self.$enumerator_size()}, $$65.$$s = self, $$65.$$arity = 0, $$65)) - }; - - var result, - by; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = Opal.yield1(block, param); - - if (result === undefined) { - result = param; - by = value; - return; - } - - if ((value)['$<=>'](by) < 0) { - result = param - by = value; - } - }; - - self.$each(); - - return result === undefined ? nil : result; - ; - }, $Enumerable_min_by$64.$$arity = 0); - - Opal.def(self, '$minmax', $Enumerable_minmax$66 = function $$minmax() { - var $iter = $Enumerable_minmax$66.$$p, block = $iter || nil, $a, $$67, self = this; - - if ($iter) $Enumerable_minmax$66.$$p = null; - - - if ($iter) $Enumerable_minmax$66.$$p = null;; - block = ($truthy($a = block) ? $a : $send(self, 'proc', [], ($$67 = function(a, b){var self = $$67.$$s || this; - - - - if (a == null) { - a = nil; - }; - - if (b == null) { - b = nil; - }; - return a['$<=>'](b);}, $$67.$$s = self, $$67.$$arity = 2, $$67))); - - var min = nil, max = nil, first_time = true; - - self.$each.$$p = function() { - var element = $$($nesting, 'Opal').$destructure(arguments); - if (first_time) { - min = max = element; - first_time = false; - } else { - var min_cmp = block.$call(min, element); - - if (min_cmp === nil) { - self.$raise($$($nesting, 'ArgumentError'), "comparison failed") - } else if (min_cmp > 0) { - min = element; - } - - var max_cmp = block.$call(max, element); - - if (max_cmp === nil) { - self.$raise($$($nesting, 'ArgumentError'), "comparison failed") - } else if (max_cmp < 0) { - max = element; - } - } - } - - self.$each(); - - return [min, max]; - ; - }, $Enumerable_minmax$66.$$arity = 0); - - Opal.def(self, '$minmax_by', $Enumerable_minmax_by$68 = function $$minmax_by() { - var $iter = $Enumerable_minmax_by$68.$$p, block = $iter || nil, self = this; - - if ($iter) $Enumerable_minmax_by$68.$$p = null; - - - if ($iter) $Enumerable_minmax_by$68.$$p = null;; - return self.$raise($$($nesting, 'NotImplementedError')); - }, $Enumerable_minmax_by$68.$$arity = 0); - - Opal.def(self, '$none?', $Enumerable_none$ques$69 = function(pattern) {try { - - var $iter = $Enumerable_none$ques$69.$$p, block = $iter || nil, $$70, $$71, $$72, self = this; - - if ($iter) $Enumerable_none$ques$69.$$p = null; - - - if ($iter) $Enumerable_none$ques$69.$$p = null;; - ; - if ($truthy(pattern !== undefined)) { - $send(self, 'each', [], ($$70 = function($a){var self = $$70.$$s || this, $post_args, value, comparable = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - comparable = comparableForPattern(value); - if ($truthy($send(pattern, 'public_send', ["==="].concat(Opal.to_a(comparable))))) { - Opal.ret(false) - } else { - return nil - };}, $$70.$$s = self, $$70.$$arity = -1, $$70)) - } else if ((block !== nil)) { - $send(self, 'each', [], ($$71 = function($a){var self = $$71.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($truthy(Opal.yieldX(block, Opal.to_a(value)))) { - Opal.ret(false) - } else { - return nil - };}, $$71.$$s = self, $$71.$$arity = -1, $$71)) - } else { - $send(self, 'each', [], ($$72 = function($a){var self = $$72.$$s || this, $post_args, value, item = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - item = $$($nesting, 'Opal').$destructure(value); - if ($truthy(item)) { - Opal.ret(false) - } else { - return nil - };}, $$72.$$s = self, $$72.$$arity = -1, $$72)) - }; - return true; - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_none$ques$69.$$arity = -1); - - Opal.def(self, '$one?', $Enumerable_one$ques$73 = function(pattern) {try { - - var $iter = $Enumerable_one$ques$73.$$p, block = $iter || nil, $$74, $$75, $$76, self = this, count = nil; - - if ($iter) $Enumerable_one$ques$73.$$p = null; - - - if ($iter) $Enumerable_one$ques$73.$$p = null;; - ; - count = 0; - if ($truthy(pattern !== undefined)) { - $send(self, 'each', [], ($$74 = function($a){var self = $$74.$$s || this, $post_args, value, comparable = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - comparable = comparableForPattern(value); - if ($truthy($send(pattern, 'public_send', ["==="].concat(Opal.to_a(comparable))))) { - - count = $rb_plus(count, 1); - if ($truthy($rb_gt(count, 1))) { - Opal.ret(false) - } else { - return nil - }; - } else { - return nil - };}, $$74.$$s = self, $$74.$$arity = -1, $$74)) - } else if ((block !== nil)) { - $send(self, 'each', [], ($$75 = function($a){var self = $$75.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($truthy(Opal.yieldX(block, Opal.to_a(value)))) { - } else { - return nil; - }; - count = $rb_plus(count, 1); - if ($truthy($rb_gt(count, 1))) { - Opal.ret(false) - } else { - return nil - };}, $$75.$$s = self, $$75.$$arity = -1, $$75)) - } else { - $send(self, 'each', [], ($$76 = function($a){var self = $$76.$$s || this, $post_args, value; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - value = $post_args;; - if ($truthy($$($nesting, 'Opal').$destructure(value))) { - } else { - return nil; - }; - count = $rb_plus(count, 1); - if ($truthy($rb_gt(count, 1))) { - Opal.ret(false) - } else { - return nil - };}, $$76.$$s = self, $$76.$$arity = -1, $$76)) - }; - return count['$=='](1); - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_one$ques$73.$$arity = -1); - - Opal.def(self, '$partition', $Enumerable_partition$77 = function $$partition() { - var $iter = $Enumerable_partition$77.$$p, block = $iter || nil, $$78, self = this; - - if ($iter) $Enumerable_partition$77.$$p = null; - - - if ($iter) $Enumerable_partition$77.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["partition"], ($$78 = function(){var self = $$78.$$s || this; - - return self.$enumerator_size()}, $$78.$$s = self, $$78.$$arity = 0, $$78)) - }; - - var truthy = [], falsy = [], result; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = Opal.yield1(block, param); - - if ($truthy(value)) { - truthy.push(param); - } - else { - falsy.push(param); - } - }; - - self.$each(); - - return [truthy, falsy]; - ; - }, $Enumerable_partition$77.$$arity = 0); - Opal.alias(self, "reduce", "inject"); - - Opal.def(self, '$reject', $Enumerable_reject$79 = function $$reject() { - var $iter = $Enumerable_reject$79.$$p, block = $iter || nil, $$80, self = this; - - if ($iter) $Enumerable_reject$79.$$p = null; - - - if ($iter) $Enumerable_reject$79.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["reject"], ($$80 = function(){var self = $$80.$$s || this; - - return self.$enumerator_size()}, $$80.$$s = self, $$80.$$arity = 0, $$80)) - }; - - var result = []; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = Opal.yield1(block, param); - - if ($falsy(value)) { - result.push(param); - } - }; - - self.$each(); - - return result; - ; - }, $Enumerable_reject$79.$$arity = 0); - - Opal.def(self, '$reverse_each', $Enumerable_reverse_each$81 = function $$reverse_each() { - var $iter = $Enumerable_reverse_each$81.$$p, block = $iter || nil, $$82, self = this; - - if ($iter) $Enumerable_reverse_each$81.$$p = null; - - - if ($iter) $Enumerable_reverse_each$81.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["reverse_each"], ($$82 = function(){var self = $$82.$$s || this; - - return self.$enumerator_size()}, $$82.$$s = self, $$82.$$arity = 0, $$82)) - }; - - var result = []; - - self.$each.$$p = function() { - result.push(arguments); - }; - - self.$each(); - - for (var i = result.length - 1; i >= 0; i--) { - Opal.yieldX(block, result[i]); - } - - return result; - ; - }, $Enumerable_reverse_each$81.$$arity = 0); - Opal.alias(self, "select", "find_all"); - - Opal.def(self, '$slice_before', $Enumerable_slice_before$83 = function $$slice_before(pattern) { - var $iter = $Enumerable_slice_before$83.$$p, block = $iter || nil, $$84, self = this; - - if ($iter) $Enumerable_slice_before$83.$$p = null; - - - if ($iter) $Enumerable_slice_before$83.$$p = null;; - ; - if ($truthy(pattern === undefined && block === nil)) { - self.$raise($$($nesting, 'ArgumentError'), "both pattern and block are given")}; - if ($truthy(pattern !== undefined && block !== nil || arguments.length > 1)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (arguments.length) + " expected 1)")}; - return $send($$($nesting, 'Enumerator'), 'new', [], ($$84 = function(e){var self = $$84.$$s || this; - - - - if (e == null) { - e = nil; - }; - - var slice = []; - - if (block !== nil) { - if (pattern === undefined) { - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = Opal.yield1(block, param); - - if ($truthy(value) && slice.length > 0) { - e['$<<'](slice); - slice = []; - } - - slice.push(param); - }; - } - else { - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = block(param, pattern.$dup()); - - if ($truthy(value) && slice.length > 0) { - e['$<<'](slice); - slice = []; - } - - slice.push(param); - }; - } - } - else { - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = pattern['$==='](param); - - if ($truthy(value) && slice.length > 0) { - e['$<<'](slice); - slice = []; - } - - slice.push(param); - }; - } - - self.$each(); - - if (slice.length > 0) { - e['$<<'](slice); - } - ;}, $$84.$$s = self, $$84.$$arity = 1, $$84)); - }, $Enumerable_slice_before$83.$$arity = -1); - - Opal.def(self, '$slice_after', $Enumerable_slice_after$85 = function $$slice_after(pattern) { - var $iter = $Enumerable_slice_after$85.$$p, block = $iter || nil, $$86, $$87, self = this; - - if ($iter) $Enumerable_slice_after$85.$$p = null; - - - if ($iter) $Enumerable_slice_after$85.$$p = null;; - ; - if ($truthy(pattern === undefined && block === nil)) { - self.$raise($$($nesting, 'ArgumentError'), "both pattern and block are given")}; - if ($truthy(pattern !== undefined && block !== nil || arguments.length > 1)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (arguments.length) + " expected 1)")}; - if ($truthy(pattern !== undefined)) { - block = $send(self, 'proc', [], ($$86 = function(e){var self = $$86.$$s || this; - - - - if (e == null) { - e = nil; - }; - return pattern['$==='](e);}, $$86.$$s = self, $$86.$$arity = 1, $$86))}; - return $send($$($nesting, 'Enumerator'), 'new', [], ($$87 = function(yielder){var self = $$87.$$s || this; - - - - if (yielder == null) { - yielder = nil; - }; - - var accumulate; - - self.$each.$$p = function() { - var element = $$($nesting, 'Opal').$destructure(arguments), - end_chunk = Opal.yield1(block, element); - - if (accumulate == null) { - accumulate = []; - } - - if ($truthy(end_chunk)) { - accumulate.push(element); - yielder.$yield(accumulate); - accumulate = null; - } else { - accumulate.push(element) - } - } - - self.$each(); - - if (accumulate != null) { - yielder.$yield(accumulate); - } - ;}, $$87.$$s = self, $$87.$$arity = 1, $$87)); - }, $Enumerable_slice_after$85.$$arity = -1); - - Opal.def(self, '$slice_when', $Enumerable_slice_when$88 = function $$slice_when() { - var $iter = $Enumerable_slice_when$88.$$p, block = $iter || nil, $$89, self = this; - - if ($iter) $Enumerable_slice_when$88.$$p = null; - - - if ($iter) $Enumerable_slice_when$88.$$p = null;; - if ((block !== nil)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "wrong number of arguments (0 for 1)") - }; - return $send($$($nesting, 'Enumerator'), 'new', [], ($$89 = function(yielder){var self = $$89.$$s || this; - - - - if (yielder == null) { - yielder = nil; - }; - - var slice = nil, last_after = nil; - - self.$each_cons.$$p = function() { - var params = $$($nesting, 'Opal').$destructure(arguments), - before = params[0], - after = params[1], - match = Opal.yieldX(block, [before, after]); - - last_after = after; - - if (slice === nil) { - slice = []; - } - - if ($truthy(match)) { - slice.push(before); - yielder.$yield(slice); - slice = []; - } else { - slice.push(before); - } - } - - self.$each_cons(2); - - if (slice !== nil) { - slice.push(last_after); - yielder.$yield(slice); - } - ;}, $$89.$$s = self, $$89.$$arity = 1, $$89)); - }, $Enumerable_slice_when$88.$$arity = 0); - - Opal.def(self, '$sort', $Enumerable_sort$90 = function $$sort() { - var $iter = $Enumerable_sort$90.$$p, block = $iter || nil, $$91, self = this, ary = nil; - - if ($iter) $Enumerable_sort$90.$$p = null; - - - if ($iter) $Enumerable_sort$90.$$p = null;; - ary = self.$to_a(); - if ((block !== nil)) { - } else { - block = $lambda(($$91 = function(a, b){var self = $$91.$$s || this; - - - - if (a == null) { - a = nil; - }; - - if (b == null) { - b = nil; - }; - return a['$<=>'](b);}, $$91.$$s = self, $$91.$$arity = 2, $$91)) - }; - return $send(ary, 'sort', [], block.$to_proc()); - }, $Enumerable_sort$90.$$arity = 0); - - Opal.def(self, '$sort_by', $Enumerable_sort_by$92 = function $$sort_by() { - var $iter = $Enumerable_sort_by$92.$$p, block = $iter || nil, $$93, $$94, $$95, $$96, self = this, dup = nil; - - if ($iter) $Enumerable_sort_by$92.$$p = null; - - - if ($iter) $Enumerable_sort_by$92.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["sort_by"], ($$93 = function(){var self = $$93.$$s || this; - - return self.$enumerator_size()}, $$93.$$s = self, $$93.$$arity = 0, $$93)) - }; - dup = $send(self, 'map', [], ($$94 = function(){var self = $$94.$$s || this, arg = nil; - - - arg = $$($nesting, 'Opal').$destructure(arguments); - return [Opal.yield1(block, arg), arg];}, $$94.$$s = self, $$94.$$arity = 0, $$94)); - $send(dup, 'sort!', [], ($$95 = function(a, b){var self = $$95.$$s || this; - - - - if (a == null) { - a = nil; - }; - - if (b == null) { - b = nil; - }; - return (a[0])['$<=>'](b[0]);}, $$95.$$s = self, $$95.$$arity = 2, $$95)); - return $send(dup, 'map!', [], ($$96 = function(i){var self = $$96.$$s || this; - - - - if (i == null) { - i = nil; - }; - return i[1];;}, $$96.$$s = self, $$96.$$arity = 1, $$96)); - }, $Enumerable_sort_by$92.$$arity = 0); - - Opal.def(self, '$sum', $Enumerable_sum$97 = function $$sum(initial) { - var $$98, $iter = $Enumerable_sum$97.$$p, $yield = $iter || nil, self = this, result = nil; - - if ($iter) $Enumerable_sum$97.$$p = null; - - - if (initial == null) { - initial = 0; - }; - result = initial; - $send(self, 'each', [], ($$98 = function($a){var self = $$98.$$s || this, $post_args, args, item = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - item = (function() {if (($yield !== nil)) { - return Opal.yieldX($yield, Opal.to_a(args)); - } else { - return $$($nesting, 'Opal').$destructure(args) - }; return nil; })(); - return (result = $rb_plus(result, item));}, $$98.$$s = self, $$98.$$arity = -1, $$98)); - return result; - }, $Enumerable_sum$97.$$arity = -1); - - Opal.def(self, '$take', $Enumerable_take$99 = function $$take(num) { - var self = this; - - return self.$first(num) - }, $Enumerable_take$99.$$arity = 1); - - Opal.def(self, '$take_while', $Enumerable_take_while$100 = function $$take_while() {try { - - var $iter = $Enumerable_take_while$100.$$p, block = $iter || nil, $$101, self = this, result = nil; - - if ($iter) $Enumerable_take_while$100.$$p = null; - - - if ($iter) $Enumerable_take_while$100.$$p = null;; - if ($truthy(block)) { - } else { - return self.$enum_for("take_while") - }; - result = []; - return $send(self, 'each', [], ($$101 = function($a){var self = $$101.$$s || this, $post_args, args, value = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - value = $$($nesting, 'Opal').$destructure(args); - if ($truthy(Opal.yield1(block, value))) { - } else { - Opal.ret(result) - }; - return result.push(value);;}, $$101.$$s = self, $$101.$$arity = -1, $$101)); - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Enumerable_take_while$100.$$arity = 0); - - Opal.def(self, '$uniq', $Enumerable_uniq$102 = function $$uniq() { - var $iter = $Enumerable_uniq$102.$$p, block = $iter || nil, $$103, self = this, hash = nil; - - if ($iter) $Enumerable_uniq$102.$$p = null; - - - if ($iter) $Enumerable_uniq$102.$$p = null;; - hash = $hash2([], {}); - $send(self, 'each', [], ($$103 = function($a){var self = $$103.$$s || this, $post_args, args, value = nil, produced = nil, $writer = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - value = $$($nesting, 'Opal').$destructure(args); - produced = (function() {if ((block !== nil)) { - return Opal.yield1(block, value); - } else { - return value - }; return nil; })(); - if ($truthy(hash['$key?'](produced))) { - return nil - } else { - - $writer = [produced, value]; - $send(hash, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)]; - };}, $$103.$$s = self, $$103.$$arity = -1, $$103)); - return hash.$values(); - }, $Enumerable_uniq$102.$$arity = 0); - Opal.alias(self, "to_a", "entries"); - - Opal.def(self, '$zip', $Enumerable_zip$104 = function $$zip($a) { - var $iter = $Enumerable_zip$104.$$p, block = $iter || nil, $post_args, others, self = this; - - if ($iter) $Enumerable_zip$104.$$p = null; - - - if ($iter) $Enumerable_zip$104.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - others = $post_args;; - return $send(self.$to_a(), 'zip', Opal.to_a(others)); - }, $Enumerable_zip$104.$$arity = -1); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/enumerator"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send, $falsy = Opal.falsy; - - Opal.add_stubs(['$require', '$include', '$allocate', '$new', '$to_proc', '$coerce_to', '$nil?', '$empty?', '$+', '$class', '$__send__', '$===', '$call', '$enum_for', '$size', '$destructure', '$inspect', '$any?', '$[]', '$raise', '$yield', '$each', '$enumerator_size', '$respond_to?', '$try_convert', '$<', '$for']); - - self.$require("corelib/enumerable"); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Enumerator'); - - var $nesting = [self].concat($parent_nesting), $Enumerator_for$1, $Enumerator_initialize$2, $Enumerator_each$3, $Enumerator_size$4, $Enumerator_with_index$5, $Enumerator_inspect$7; - - self.$$prototype.size = self.$$prototype.args = self.$$prototype.object = self.$$prototype.method = nil; - - self.$include($$($nesting, 'Enumerable')); - self.$$prototype.$$is_enumerator = true; - Opal.defs(self, '$for', $Enumerator_for$1 = function(object, $a, $b) { - var $iter = $Enumerator_for$1.$$p, block = $iter || nil, $post_args, method, args, self = this; - - if ($iter) $Enumerator_for$1.$$p = null; - - - if ($iter) $Enumerator_for$1.$$p = null;; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - if ($post_args.length > 0) { - method = $post_args[0]; - $post_args.splice(0, 1); - } - if (method == null) { - method = "each"; - }; - - args = $post_args;; - - var obj = self.$allocate(); - - obj.object = object; - obj.size = block; - obj.method = method; - obj.args = args; - - return obj; - ; - }, $Enumerator_for$1.$$arity = -2); - - Opal.def(self, '$initialize', $Enumerator_initialize$2 = function $$initialize($a) { - var $iter = $Enumerator_initialize$2.$$p, block = $iter || nil, $post_args, self = this; - - if ($iter) $Enumerator_initialize$2.$$p = null; - - - if ($iter) $Enumerator_initialize$2.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - if ($truthy(block)) { - - self.object = $send($$($nesting, 'Generator'), 'new', [], block.$to_proc()); - self.method = "each"; - self.args = []; - self.size = arguments[0] || nil; - if ($truthy(self.size)) { - return (self.size = $$($nesting, 'Opal').$coerce_to(self.size, $$($nesting, 'Integer'), "to_int")) - } else { - return nil - }; - } else { - - self.object = arguments[0]; - self.method = arguments[1] || "each"; - self.args = $slice.call(arguments, 2); - return (self.size = nil); - }; - }, $Enumerator_initialize$2.$$arity = -1); - - Opal.def(self, '$each', $Enumerator_each$3 = function $$each($a) { - var $iter = $Enumerator_each$3.$$p, block = $iter || nil, $post_args, args, $b, self = this; - - if ($iter) $Enumerator_each$3.$$p = null; - - - if ($iter) $Enumerator_each$3.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy(($truthy($b = block['$nil?']()) ? args['$empty?']() : $b))) { - return self}; - args = $rb_plus(self.args, args); - if ($truthy(block['$nil?']())) { - return $send(self.$class(), 'new', [self.object, self.method].concat(Opal.to_a(args)))}; - return $send(self.object, '__send__', [self.method].concat(Opal.to_a(args)), block.$to_proc()); - }, $Enumerator_each$3.$$arity = -1); - - Opal.def(self, '$size', $Enumerator_size$4 = function $$size() { - var self = this; - - if ($truthy($$($nesting, 'Proc')['$==='](self.size))) { - return $send(self.size, 'call', Opal.to_a(self.args)) - } else { - return self.size - } - }, $Enumerator_size$4.$$arity = 0); - - Opal.def(self, '$with_index', $Enumerator_with_index$5 = function $$with_index(offset) { - var $iter = $Enumerator_with_index$5.$$p, block = $iter || nil, $$6, self = this; - - if ($iter) $Enumerator_with_index$5.$$p = null; - - - if ($iter) $Enumerator_with_index$5.$$p = null;; - - if (offset == null) { - offset = 0; - }; - offset = (function() {if ($truthy(offset)) { - return $$($nesting, 'Opal').$coerce_to(offset, $$($nesting, 'Integer'), "to_int") - } else { - return 0 - }; return nil; })(); - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["with_index", offset], ($$6 = function(){var self = $$6.$$s || this; - - return self.$size()}, $$6.$$s = self, $$6.$$arity = 0, $$6)) - }; - - var result, index = offset; - - self.$each.$$p = function() { - var param = $$($nesting, 'Opal').$destructure(arguments), - value = block(param, index); - - index++; - - return value; - } - - return self.$each(); - ; - }, $Enumerator_with_index$5.$$arity = -1); - Opal.alias(self, "with_object", "each_with_object"); - - Opal.def(self, '$inspect', $Enumerator_inspect$7 = function $$inspect() { - var self = this, result = nil; - - - result = "" + "#<" + (self.$class()) + ": " + (self.object.$inspect()) + ":" + (self.method); - if ($truthy(self.args['$any?']())) { - result = $rb_plus(result, "" + "(" + (self.args.$inspect()['$[]']($$($nesting, 'Range').$new(1, -2))) + ")")}; - return $rb_plus(result, ">"); - }, $Enumerator_inspect$7.$$arity = 0); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Generator'); - - var $nesting = [self].concat($parent_nesting), $Generator_initialize$8, $Generator_each$9; - - self.$$prototype.block = nil; - - self.$include($$($nesting, 'Enumerable')); - - Opal.def(self, '$initialize', $Generator_initialize$8 = function $$initialize() { - var $iter = $Generator_initialize$8.$$p, block = $iter || nil, self = this; - - if ($iter) $Generator_initialize$8.$$p = null; - - - if ($iter) $Generator_initialize$8.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'LocalJumpError'), "no block given") - }; - return (self.block = block); - }, $Generator_initialize$8.$$arity = 0); - return (Opal.def(self, '$each', $Generator_each$9 = function $$each($a) { - var $iter = $Generator_each$9.$$p, block = $iter || nil, $post_args, args, self = this, yielder = nil; - - if ($iter) $Generator_each$9.$$p = null; - - - if ($iter) $Generator_each$9.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - yielder = $send($$($nesting, 'Yielder'), 'new', [], block.$to_proc()); - - try { - args.unshift(yielder); - - Opal.yieldX(self.block, args); - } - catch (e) { - if (e === $breaker) { - return $breaker.$v; - } - else { - throw e; - } - } - ; - return self; - }, $Generator_each$9.$$arity = -1), nil) && 'each'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Yielder'); - - var $nesting = [self].concat($parent_nesting), $Yielder_initialize$10, $Yielder_yield$11, $Yielder_$lt$lt$12; - - self.$$prototype.block = nil; - - - Opal.def(self, '$initialize', $Yielder_initialize$10 = function $$initialize() { - var $iter = $Yielder_initialize$10.$$p, block = $iter || nil, self = this; - - if ($iter) $Yielder_initialize$10.$$p = null; - - - if ($iter) $Yielder_initialize$10.$$p = null;; - return (self.block = block); - }, $Yielder_initialize$10.$$arity = 0); - - Opal.def(self, '$yield', $Yielder_yield$11 = function($a) { - var $post_args, values, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - values = $post_args;; - - var value = Opal.yieldX(self.block, values); - - if (value === $breaker) { - throw $breaker; - } - - return value; - ; - }, $Yielder_yield$11.$$arity = -1); - return (Opal.def(self, '$<<', $Yielder_$lt$lt$12 = function($a) { - var $post_args, values, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - values = $post_args;; - $send(self, 'yield', Opal.to_a(values)); - return self; - }, $Yielder_$lt$lt$12.$$arity = -1), nil) && '<<'; - })($nesting[0], null, $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Lazy'); - - var $nesting = [self].concat($parent_nesting), $Lazy_initialize$13, $Lazy_lazy$16, $Lazy_collect$17, $Lazy_collect_concat$19, $Lazy_drop$23, $Lazy_drop_while$25, $Lazy_enum_for$27, $Lazy_find_all$28, $Lazy_grep$30, $Lazy_reject$33, $Lazy_take$35, $Lazy_take_while$37, $Lazy_inspect$39; - - self.$$prototype.enumerator = nil; - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'StopLazyError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'Exception'), $nesting); - - Opal.def(self, '$initialize', $Lazy_initialize$13 = function $$initialize(object, size) { - var $iter = $Lazy_initialize$13.$$p, block = $iter || nil, $$14, self = this; - - if ($iter) $Lazy_initialize$13.$$p = null; - - - if ($iter) $Lazy_initialize$13.$$p = null;; - - if (size == null) { - size = nil; - }; - if ((block !== nil)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to call lazy new without a block") - }; - self.enumerator = object; - return $send(self, Opal.find_super_dispatcher(self, 'initialize', $Lazy_initialize$13, false), [size], ($$14 = function(yielder, $a){var self = $$14.$$s || this, $post_args, each_args, $$15; - - - - if (yielder == null) { - yielder = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - each_args = $post_args;; - try { - return $send(object, 'each', Opal.to_a(each_args), ($$15 = function($b){var self = $$15.$$s || this, $post_args, args; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - args.unshift(yielder); - - Opal.yieldX(block, args); - ;}, $$15.$$s = self, $$15.$$arity = -1, $$15)) - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'Exception')])) { - try { - return nil - } finally { Opal.pop_exception() } - } else { throw $err; } - };}, $$14.$$s = self, $$14.$$arity = -2, $$14)); - }, $Lazy_initialize$13.$$arity = -2); - Opal.alias(self, "force", "to_a"); - - Opal.def(self, '$lazy', $Lazy_lazy$16 = function $$lazy() { - var self = this; - - return self - }, $Lazy_lazy$16.$$arity = 0); - - Opal.def(self, '$collect', $Lazy_collect$17 = function $$collect() { - var $iter = $Lazy_collect$17.$$p, block = $iter || nil, $$18, self = this; - - if ($iter) $Lazy_collect$17.$$p = null; - - - if ($iter) $Lazy_collect$17.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to call lazy map without a block") - }; - return $send($$($nesting, 'Lazy'), 'new', [self, self.$enumerator_size()], ($$18 = function(enum$, $a){var self = $$18.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - - var value = Opal.yieldX(block, args); - - enum$.$yield(value); - ;}, $$18.$$s = self, $$18.$$arity = -2, $$18)); - }, $Lazy_collect$17.$$arity = 0); - - Opal.def(self, '$collect_concat', $Lazy_collect_concat$19 = function $$collect_concat() { - var $iter = $Lazy_collect_concat$19.$$p, block = $iter || nil, $$20, self = this; - - if ($iter) $Lazy_collect_concat$19.$$p = null; - - - if ($iter) $Lazy_collect_concat$19.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to call lazy map without a block") - }; - return $send($$($nesting, 'Lazy'), 'new', [self, nil], ($$20 = function(enum$, $a){var self = $$20.$$s || this, $post_args, args, $$21, $$22; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - - var value = Opal.yieldX(block, args); - - if ((value)['$respond_to?']("force") && (value)['$respond_to?']("each")) { - $send((value), 'each', [], ($$21 = function(v){var self = $$21.$$s || this; - - - - if (v == null) { - v = nil; - }; - return enum$.$yield(v);}, $$21.$$s = self, $$21.$$arity = 1, $$21)) - } - else { - var array = $$($nesting, 'Opal').$try_convert(value, $$($nesting, 'Array'), "to_ary"); - - if (array === nil) { - enum$.$yield(value); - } - else { - $send((value), 'each', [], ($$22 = function(v){var self = $$22.$$s || this; - - - - if (v == null) { - v = nil; - }; - return enum$.$yield(v);}, $$22.$$s = self, $$22.$$arity = 1, $$22)); - } - } - ;}, $$20.$$s = self, $$20.$$arity = -2, $$20)); - }, $Lazy_collect_concat$19.$$arity = 0); - - Opal.def(self, '$drop', $Lazy_drop$23 = function $$drop(n) { - var $$24, self = this, current_size = nil, set_size = nil, dropped = nil; - - - n = $$($nesting, 'Opal').$coerce_to(n, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_lt(n, 0))) { - self.$raise($$($nesting, 'ArgumentError'), "attempt to drop negative size")}; - current_size = self.$enumerator_size(); - set_size = (function() {if ($truthy($$($nesting, 'Integer')['$==='](current_size))) { - if ($truthy($rb_lt(n, current_size))) { - return n - } else { - return current_size - } - } else { - return current_size - }; return nil; })(); - dropped = 0; - return $send($$($nesting, 'Lazy'), 'new', [self, set_size], ($$24 = function(enum$, $a){var self = $$24.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - if ($truthy($rb_lt(dropped, n))) { - return (dropped = $rb_plus(dropped, 1)) - } else { - return $send(enum$, 'yield', Opal.to_a(args)) - };}, $$24.$$s = self, $$24.$$arity = -2, $$24)); - }, $Lazy_drop$23.$$arity = 1); - - Opal.def(self, '$drop_while', $Lazy_drop_while$25 = function $$drop_while() { - var $iter = $Lazy_drop_while$25.$$p, block = $iter || nil, $$26, self = this, succeeding = nil; - - if ($iter) $Lazy_drop_while$25.$$p = null; - - - if ($iter) $Lazy_drop_while$25.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to call lazy drop_while without a block") - }; - succeeding = true; - return $send($$($nesting, 'Lazy'), 'new', [self, nil], ($$26 = function(enum$, $a){var self = $$26.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - if ($truthy(succeeding)) { - - var value = Opal.yieldX(block, args); - - if ($falsy(value)) { - succeeding = false; - - $send(enum$, 'yield', Opal.to_a(args)); - } - - } else { - return $send(enum$, 'yield', Opal.to_a(args)) - };}, $$26.$$s = self, $$26.$$arity = -2, $$26)); - }, $Lazy_drop_while$25.$$arity = 0); - - Opal.def(self, '$enum_for', $Lazy_enum_for$27 = function $$enum_for($a, $b) { - var $iter = $Lazy_enum_for$27.$$p, block = $iter || nil, $post_args, method, args, self = this; - - if ($iter) $Lazy_enum_for$27.$$p = null; - - - if ($iter) $Lazy_enum_for$27.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - if ($post_args.length > 0) { - method = $post_args[0]; - $post_args.splice(0, 1); - } - if (method == null) { - method = "each"; - }; - - args = $post_args;; - return $send(self.$class(), 'for', [self, method].concat(Opal.to_a(args)), block.$to_proc()); - }, $Lazy_enum_for$27.$$arity = -1); - - Opal.def(self, '$find_all', $Lazy_find_all$28 = function $$find_all() { - var $iter = $Lazy_find_all$28.$$p, block = $iter || nil, $$29, self = this; - - if ($iter) $Lazy_find_all$28.$$p = null; - - - if ($iter) $Lazy_find_all$28.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to call lazy select without a block") - }; - return $send($$($nesting, 'Lazy'), 'new', [self, nil], ($$29 = function(enum$, $a){var self = $$29.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - - var value = Opal.yieldX(block, args); - - if ($truthy(value)) { - $send(enum$, 'yield', Opal.to_a(args)); - } - ;}, $$29.$$s = self, $$29.$$arity = -2, $$29)); - }, $Lazy_find_all$28.$$arity = 0); - Opal.alias(self, "flat_map", "collect_concat"); - - Opal.def(self, '$grep', $Lazy_grep$30 = function $$grep(pattern) { - var $iter = $Lazy_grep$30.$$p, block = $iter || nil, $$31, $$32, self = this; - - if ($iter) $Lazy_grep$30.$$p = null; - - - if ($iter) $Lazy_grep$30.$$p = null;; - if ($truthy(block)) { - return $send($$($nesting, 'Lazy'), 'new', [self, nil], ($$31 = function(enum$, $a){var self = $$31.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - - var param = $$($nesting, 'Opal').$destructure(args), - value = pattern['$==='](param); - - if ($truthy(value)) { - value = Opal.yield1(block, param); - - enum$.$yield(Opal.yield1(block, param)); - } - ;}, $$31.$$s = self, $$31.$$arity = -2, $$31)) - } else { - return $send($$($nesting, 'Lazy'), 'new', [self, nil], ($$32 = function(enum$, $a){var self = $$32.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - - var param = $$($nesting, 'Opal').$destructure(args), - value = pattern['$==='](param); - - if ($truthy(value)) { - enum$.$yield(param); - } - ;}, $$32.$$s = self, $$32.$$arity = -2, $$32)) - }; - }, $Lazy_grep$30.$$arity = 1); - Opal.alias(self, "map", "collect"); - Opal.alias(self, "select", "find_all"); - - Opal.def(self, '$reject', $Lazy_reject$33 = function $$reject() { - var $iter = $Lazy_reject$33.$$p, block = $iter || nil, $$34, self = this; - - if ($iter) $Lazy_reject$33.$$p = null; - - - if ($iter) $Lazy_reject$33.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to call lazy reject without a block") - }; - return $send($$($nesting, 'Lazy'), 'new', [self, nil], ($$34 = function(enum$, $a){var self = $$34.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - - var value = Opal.yieldX(block, args); - - if ($falsy(value)) { - $send(enum$, 'yield', Opal.to_a(args)); - } - ;}, $$34.$$s = self, $$34.$$arity = -2, $$34)); - }, $Lazy_reject$33.$$arity = 0); - - Opal.def(self, '$take', $Lazy_take$35 = function $$take(n) { - var $$36, self = this, current_size = nil, set_size = nil, taken = nil; - - - n = $$($nesting, 'Opal').$coerce_to(n, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_lt(n, 0))) { - self.$raise($$($nesting, 'ArgumentError'), "attempt to take negative size")}; - current_size = self.$enumerator_size(); - set_size = (function() {if ($truthy($$($nesting, 'Integer')['$==='](current_size))) { - if ($truthy($rb_lt(n, current_size))) { - return n - } else { - return current_size - } - } else { - return current_size - }; return nil; })(); - taken = 0; - return $send($$($nesting, 'Lazy'), 'new', [self, set_size], ($$36 = function(enum$, $a){var self = $$36.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - if ($truthy($rb_lt(taken, n))) { - - $send(enum$, 'yield', Opal.to_a(args)); - return (taken = $rb_plus(taken, 1)); - } else { - return self.$raise($$($nesting, 'StopLazyError')) - };}, $$36.$$s = self, $$36.$$arity = -2, $$36)); - }, $Lazy_take$35.$$arity = 1); - - Opal.def(self, '$take_while', $Lazy_take_while$37 = function $$take_while() { - var $iter = $Lazy_take_while$37.$$p, block = $iter || nil, $$38, self = this; - - if ($iter) $Lazy_take_while$37.$$p = null; - - - if ($iter) $Lazy_take_while$37.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to call lazy take_while without a block") - }; - return $send($$($nesting, 'Lazy'), 'new', [self, nil], ($$38 = function(enum$, $a){var self = $$38.$$s || this, $post_args, args; - - - - if (enum$ == null) { - enum$ = nil; - }; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - args = $post_args;; - - var value = Opal.yieldX(block, args); - - if ($truthy(value)) { - $send(enum$, 'yield', Opal.to_a(args)); - } - else { - self.$raise($$($nesting, 'StopLazyError')); - } - ;}, $$38.$$s = self, $$38.$$arity = -2, $$38)); - }, $Lazy_take_while$37.$$arity = 0); - Opal.alias(self, "to_enum", "enum_for"); - return (Opal.def(self, '$inspect', $Lazy_inspect$39 = function $$inspect() { - var self = this; - - return "" + "#<" + (self.$class()) + ": " + (self.enumerator.$inspect()) + ">" - }, $Lazy_inspect$39.$$arity = 0), nil) && 'inspect'; - })($nesting[0], self, $nesting); - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/numeric"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_divide(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs / rhs : lhs['$/'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $hash2 = Opal.hash2; - - Opal.add_stubs(['$require', '$include', '$instance_of?', '$class', '$Float', '$respond_to?', '$coerce', '$__send__', '$===', '$raise', '$equal?', '$-', '$*', '$div', '$<', '$-@', '$ceil', '$to_f', '$denominator', '$to_r', '$==', '$floor', '$/', '$%', '$Complex', '$zero?', '$numerator', '$abs', '$arg', '$coerce_to!', '$round', '$to_i', '$truncate', '$>']); - - self.$require("corelib/comparable"); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Numeric'); - - var $nesting = [self].concat($parent_nesting), $Numeric_coerce$1, $Numeric___coerced__$2, $Numeric_$lt_eq_gt$3, $Numeric_$plus$$4, $Numeric_$minus$$5, $Numeric_$percent$6, $Numeric_abs$7, $Numeric_abs2$8, $Numeric_angle$9, $Numeric_ceil$10, $Numeric_conj$11, $Numeric_denominator$12, $Numeric_div$13, $Numeric_divmod$14, $Numeric_fdiv$15, $Numeric_floor$16, $Numeric_i$17, $Numeric_imag$18, $Numeric_integer$ques$19, $Numeric_nonzero$ques$20, $Numeric_numerator$21, $Numeric_polar$22, $Numeric_quo$23, $Numeric_real$24, $Numeric_real$ques$25, $Numeric_rect$26, $Numeric_round$27, $Numeric_to_c$28, $Numeric_to_int$29, $Numeric_truncate$30, $Numeric_zero$ques$31, $Numeric_positive$ques$32, $Numeric_negative$ques$33, $Numeric_dup$34, $Numeric_clone$35, $Numeric_finite$ques$36, $Numeric_infinite$ques$37; - - - self.$include($$($nesting, 'Comparable')); - - Opal.def(self, '$coerce', $Numeric_coerce$1 = function $$coerce(other) { - var self = this; - - - if ($truthy(other['$instance_of?'](self.$class()))) { - return [other, self]}; - return [self.$Float(other), self.$Float(self)]; - }, $Numeric_coerce$1.$$arity = 1); - - Opal.def(self, '$__coerced__', $Numeric___coerced__$2 = function $$__coerced__(method, other) { - var $a, $b, self = this, a = nil, b = nil, $case = nil; - - if ($truthy(other['$respond_to?']("coerce"))) { - - $b = other.$coerce(self), $a = Opal.to_ary($b), (a = ($a[0] == null ? nil : $a[0])), (b = ($a[1] == null ? nil : $a[1])), $b; - return a.$__send__(method, b); - } else { - return (function() {$case = method; - if ("+"['$===']($case) || "-"['$===']($case) || "*"['$===']($case) || "/"['$===']($case) || "%"['$===']($case) || "&"['$===']($case) || "|"['$===']($case) || "^"['$===']($case) || "**"['$===']($case)) {return self.$raise($$($nesting, 'TypeError'), "" + (other.$class()) + " can't be coerced into Numeric")} - else if (">"['$===']($case) || ">="['$===']($case) || "<"['$===']($case) || "<="['$===']($case) || "<=>"['$===']($case)) {return self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed")} - else { return nil }})() - } - }, $Numeric___coerced__$2.$$arity = 2); - - Opal.def(self, '$<=>', $Numeric_$lt_eq_gt$3 = function(other) { - var self = this; - - - if ($truthy(self['$equal?'](other))) { - return 0}; - return nil; - }, $Numeric_$lt_eq_gt$3.$$arity = 1); - - Opal.def(self, '$+@', $Numeric_$plus$$4 = function() { - var self = this; - - return self - }, $Numeric_$plus$$4.$$arity = 0); - - Opal.def(self, '$-@', $Numeric_$minus$$5 = function() { - var self = this; - - return $rb_minus(0, self) - }, $Numeric_$minus$$5.$$arity = 0); - - Opal.def(self, '$%', $Numeric_$percent$6 = function(other) { - var self = this; - - return $rb_minus(self, $rb_times(other, self.$div(other))) - }, $Numeric_$percent$6.$$arity = 1); - - Opal.def(self, '$abs', $Numeric_abs$7 = function $$abs() { - var self = this; - - if ($rb_lt(self, 0)) { - return self['$-@']() - } else { - return self - } - }, $Numeric_abs$7.$$arity = 0); - - Opal.def(self, '$abs2', $Numeric_abs2$8 = function $$abs2() { - var self = this; - - return $rb_times(self, self) - }, $Numeric_abs2$8.$$arity = 0); - - Opal.def(self, '$angle', $Numeric_angle$9 = function $$angle() { - var self = this; - - if ($rb_lt(self, 0)) { - return $$$($$($nesting, 'Math'), 'PI') - } else { - return 0 - } - }, $Numeric_angle$9.$$arity = 0); - Opal.alias(self, "arg", "angle"); - - Opal.def(self, '$ceil', $Numeric_ceil$10 = function $$ceil(ndigits) { - var self = this; - - - - if (ndigits == null) { - ndigits = 0; - }; - return self.$to_f().$ceil(ndigits); - }, $Numeric_ceil$10.$$arity = -1); - - Opal.def(self, '$conj', $Numeric_conj$11 = function $$conj() { - var self = this; - - return self - }, $Numeric_conj$11.$$arity = 0); - Opal.alias(self, "conjugate", "conj"); - - Opal.def(self, '$denominator', $Numeric_denominator$12 = function $$denominator() { - var self = this; - - return self.$to_r().$denominator() - }, $Numeric_denominator$12.$$arity = 0); - - Opal.def(self, '$div', $Numeric_div$13 = function $$div(other) { - var self = this; - - - if (other['$=='](0)) { - self.$raise($$($nesting, 'ZeroDivisionError'), "divided by o")}; - return $rb_divide(self, other).$floor(); - }, $Numeric_div$13.$$arity = 1); - - Opal.def(self, '$divmod', $Numeric_divmod$14 = function $$divmod(other) { - var self = this; - - return [self.$div(other), self['$%'](other)] - }, $Numeric_divmod$14.$$arity = 1); - - Opal.def(self, '$fdiv', $Numeric_fdiv$15 = function $$fdiv(other) { - var self = this; - - return $rb_divide(self.$to_f(), other) - }, $Numeric_fdiv$15.$$arity = 1); - - Opal.def(self, '$floor', $Numeric_floor$16 = function $$floor(ndigits) { - var self = this; - - - - if (ndigits == null) { - ndigits = 0; - }; - return self.$to_f().$floor(ndigits); - }, $Numeric_floor$16.$$arity = -1); - - Opal.def(self, '$i', $Numeric_i$17 = function $$i() { - var self = this; - - return self.$Complex(0, self) - }, $Numeric_i$17.$$arity = 0); - - Opal.def(self, '$imag', $Numeric_imag$18 = function $$imag() { - var self = this; - - return 0 - }, $Numeric_imag$18.$$arity = 0); - Opal.alias(self, "imaginary", "imag"); - - Opal.def(self, '$integer?', $Numeric_integer$ques$19 = function() { - var self = this; - - return false - }, $Numeric_integer$ques$19.$$arity = 0); - Opal.alias(self, "magnitude", "abs"); - Opal.alias(self, "modulo", "%"); - - Opal.def(self, '$nonzero?', $Numeric_nonzero$ques$20 = function() { - var self = this; - - if ($truthy(self['$zero?']())) { - return nil - } else { - return self - } - }, $Numeric_nonzero$ques$20.$$arity = 0); - - Opal.def(self, '$numerator', $Numeric_numerator$21 = function $$numerator() { - var self = this; - - return self.$to_r().$numerator() - }, $Numeric_numerator$21.$$arity = 0); - Opal.alias(self, "phase", "arg"); - - Opal.def(self, '$polar', $Numeric_polar$22 = function $$polar() { - var self = this; - - return [self.$abs(), self.$arg()] - }, $Numeric_polar$22.$$arity = 0); - - Opal.def(self, '$quo', $Numeric_quo$23 = function $$quo(other) { - var self = this; - - return $rb_divide($$($nesting, 'Opal')['$coerce_to!'](self, $$($nesting, 'Rational'), "to_r"), other) - }, $Numeric_quo$23.$$arity = 1); - - Opal.def(self, '$real', $Numeric_real$24 = function $$real() { - var self = this; - - return self - }, $Numeric_real$24.$$arity = 0); - - Opal.def(self, '$real?', $Numeric_real$ques$25 = function() { - var self = this; - - return true - }, $Numeric_real$ques$25.$$arity = 0); - - Opal.def(self, '$rect', $Numeric_rect$26 = function $$rect() { - var self = this; - - return [self, 0] - }, $Numeric_rect$26.$$arity = 0); - Opal.alias(self, "rectangular", "rect"); - - Opal.def(self, '$round', $Numeric_round$27 = function $$round(digits) { - var self = this; - - - ; - return self.$to_f().$round(digits); - }, $Numeric_round$27.$$arity = -1); - - Opal.def(self, '$to_c', $Numeric_to_c$28 = function $$to_c() { - var self = this; - - return self.$Complex(self, 0) - }, $Numeric_to_c$28.$$arity = 0); - - Opal.def(self, '$to_int', $Numeric_to_int$29 = function $$to_int() { - var self = this; - - return self.$to_i() - }, $Numeric_to_int$29.$$arity = 0); - - Opal.def(self, '$truncate', $Numeric_truncate$30 = function $$truncate(ndigits) { - var self = this; - - - - if (ndigits == null) { - ndigits = 0; - }; - return self.$to_f().$truncate(ndigits); - }, $Numeric_truncate$30.$$arity = -1); - - Opal.def(self, '$zero?', $Numeric_zero$ques$31 = function() { - var self = this; - - return self['$=='](0) - }, $Numeric_zero$ques$31.$$arity = 0); - - Opal.def(self, '$positive?', $Numeric_positive$ques$32 = function() { - var self = this; - - return $rb_gt(self, 0) - }, $Numeric_positive$ques$32.$$arity = 0); - - Opal.def(self, '$negative?', $Numeric_negative$ques$33 = function() { - var self = this; - - return $rb_lt(self, 0) - }, $Numeric_negative$ques$33.$$arity = 0); - - Opal.def(self, '$dup', $Numeric_dup$34 = function $$dup() { - var self = this; - - return self - }, $Numeric_dup$34.$$arity = 0); - - Opal.def(self, '$clone', $Numeric_clone$35 = function $$clone($kwargs) { - var freeze, self = this; - - - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - freeze = $kwargs.$$smap["freeze"]; - if (freeze == null) { - freeze = true - }; - return self; - }, $Numeric_clone$35.$$arity = -1); - - Opal.def(self, '$finite?', $Numeric_finite$ques$36 = function() { - var self = this; - - return true - }, $Numeric_finite$ques$36.$$arity = 0); - return (Opal.def(self, '$infinite?', $Numeric_infinite$ques$37 = function() { - var self = this; - - return nil - }, $Numeric_infinite$ques$37.$$arity = 0), nil) && 'infinite?'; - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/array"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - function $rb_ge(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $hash2 = Opal.hash2, $send = Opal.send, $gvars = Opal.gvars; - - Opal.add_stubs(['$require', '$include', '$to_a', '$warn', '$raise', '$replace', '$respond_to?', '$to_ary', '$coerce_to', '$coerce_to?', '$===', '$join', '$to_str', '$class', '$hash', '$<=>', '$==', '$object_id', '$inspect', '$enum_for', '$bsearch_index', '$to_proc', '$nil?', '$coerce_to!', '$>', '$*', '$enumerator_size', '$empty?', '$size', '$map', '$equal?', '$dup', '$each', '$[]', '$dig', '$eql?', '$length', '$begin', '$end', '$exclude_end?', '$flatten', '$__id__', '$to_s', '$new', '$max', '$min', '$!', '$>=', '$**', '$delete_if', '$reverse', '$rotate', '$rand', '$at', '$keep_if', '$shuffle!', '$<', '$sort', '$sort_by', '$!=', '$times', '$[]=', '$-', '$<<', '$values', '$is_a?', '$last', '$first', '$upto', '$reject', '$pristine', '$singleton_class']); - - self.$require("corelib/enumerable"); - self.$require("corelib/numeric"); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Array'); - - var $nesting = [self].concat($parent_nesting), $Array_$$$1, $Array_initialize$2, $Array_try_convert$3, $Array_$$4, $Array_$$5, $Array_$$6, $Array_$plus$7, $Array_$minus$8, $Array_$lt$lt$9, $Array_$lt_eq_gt$10, $Array_$eq_eq$11, $Array_$$$12, $Array_$$$eq$13, $Array_any$ques$14, $Array_assoc$15, $Array_at$16, $Array_bsearch_index$17, $Array_bsearch$18, $Array_cycle$19, $Array_clear$21, $Array_count$22, $Array_initialize_copy$23, $Array_collect$24, $Array_collect$excl$26, $Array_combination$28, $Array_repeated_combination$30, $Array_compact$32, $Array_compact$excl$33, $Array_concat$34, $Array_delete$37, $Array_delete_at$38, $Array_delete_if$39, $Array_dig$41, $Array_drop$42, $Array_dup$43, $Array_each$44, $Array_each_index$46, $Array_empty$ques$48, $Array_eql$ques$49, $Array_fetch$50, $Array_fill$51, $Array_first$52, $Array_flatten$53, $Array_flatten$excl$54, $Array_hash$55, $Array_include$ques$56, $Array_index$57, $Array_insert$58, $Array_inspect$59, $Array_join$60, $Array_keep_if$61, $Array_last$63, $Array_length$64, $Array_max$65, $Array_min$66, $Array_permutation$67, $Array_repeated_permutation$69, $Array_pop$71, $Array_product$72, $Array_push$73, $Array_rassoc$74, $Array_reject$75, $Array_reject$excl$77, $Array_replace$79, $Array_reverse$80, $Array_reverse$excl$81, $Array_reverse_each$82, $Array_rindex$84, $Array_rotate$85, $Array_rotate$excl$86, $Array_sample$89, $Array_select$90, $Array_select$excl$92, $Array_shift$94, $Array_shuffle$95, $Array_shuffle$excl$96, $Array_slice$excl$97, $Array_sort$98, $Array_sort$excl$99, $Array_sort_by$excl$100, $Array_take$102, $Array_take_while$103, $Array_to_a$104, $Array_to_h$105, $Array_transpose$106, $Array_uniq$109, $Array_uniq$excl$110, $Array_unshift$111, $Array_values_at$112, $Array_zip$115, $Array_inherited$116, $Array_instance_variables$117, $Array_pack$119; - - - self.$include($$($nesting, 'Enumerable')); - Opal.defineProperty(self.$$prototype, '$$is_array', true); - - // Recent versions of V8 (> 7.1) only use an optimized implementation when Array.prototype is unmodified. - // For instance, "array-splice.tq" has a "fast path" (ExtractFastJSArray, defined in "src/codegen/code-stub-assembler.cc") - // but it's only enabled when "IsPrototypeInitialArrayPrototype()" is true. - // - // Older versions of V8 were using relatively fast JS-with-extensions code even when Array.prototype is modified: - // https://github.com/v8/v8/blob/7.0.1/src/js/array.js#L599-L642 - // - // In short, Array operations are slow in recent versions of V8 when the Array.prototype has been tampered. - // So, when possible, we are using faster open-coded version to boost the performance. - - // As of V8 8.4, depending on the size of the array, this is up to ~25x times faster than Array#shift() - // Implementation is heavily inspired by: https://github.com/nodejs/node/blob/ba684805b6c0eded76e5cd89ee00328ac7a59365/lib/internal/util.js#L341-L347 - function shiftNoArg(list) { - var r = list[0]; - var index = 1; - var length = list.length; - for (; index < length; index++) { - list[index - 1] = list[index]; - } - list.pop(); - return r; - } - - function toArraySubclass(obj, klass) { - if (klass.$$name === Opal.Array) { - return obj; - } else { - return klass.$allocate().$replace((obj).$to_a()); - } - } - ; - Opal.defs(self, '$[]', $Array_$$$1 = function($a) { - var $post_args, objects, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - objects = $post_args;; - return toArraySubclass(objects, self);; - }, $Array_$$$1.$$arity = -1); - - Opal.def(self, '$initialize', $Array_initialize$2 = function $$initialize(size, obj) { - var $iter = $Array_initialize$2.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_initialize$2.$$p = null; - - - if ($iter) $Array_initialize$2.$$p = null;; - - if (size == null) { - size = nil; - }; - - if (obj == null) { - obj = nil; - }; - - if (obj !== nil && block !== nil) { - self.$warn("warning: block supersedes default value argument") - } - - if (size > $$$($$($nesting, 'Integer'), 'MAX')) { - self.$raise($$($nesting, 'ArgumentError'), "array size too big") - } - - if (arguments.length > 2) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (arguments.length) + " for 0..2)") - } - - if (arguments.length === 0) { - self.splice(0, self.length); - return self; - } - - if (arguments.length === 1) { - if (size.$$is_array) { - self.$replace(size.$to_a()) - return self; - } else if (size['$respond_to?']("to_ary")) { - self.$replace(size.$to_ary()) - return self; - } - } - - size = $$($nesting, 'Opal').$coerce_to(size, $$($nesting, 'Integer'), "to_int") - - if (size < 0) { - self.$raise($$($nesting, 'ArgumentError'), "negative array size") - } - - self.splice(0, self.length); - var i, value; - - if (block === nil) { - for (i = 0; i < size; i++) { - self.push(obj); - } - } - else { - for (i = 0, value; i < size; i++) { - value = block(i); - self[i] = value; - } - } - - return self; - ; - }, $Array_initialize$2.$$arity = -1); - Opal.defs(self, '$try_convert', $Array_try_convert$3 = function $$try_convert(obj) { - var self = this; - - return $$($nesting, 'Opal')['$coerce_to?'](obj, $$($nesting, 'Array'), "to_ary") - }, $Array_try_convert$3.$$arity = 1); - - Opal.def(self, '$&', $Array_$$4 = function(other) { - var self = this; - - - other = (function() {if ($truthy($$($nesting, 'Array')['$==='](other))) { - return other.$to_a() - } else { - return $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'Array'), "to_ary").$to_a() - }; return nil; })(); - - var result = [], hash = $hash2([], {}), i, length, item; - - for (i = 0, length = other.length; i < length; i++) { - Opal.hash_put(hash, other[i], true); - } - - for (i = 0, length = self.length; i < length; i++) { - item = self[i]; - if (Opal.hash_delete(hash, item) !== undefined) { - result.push(item); - } - } - - return result; - ; - }, $Array_$$4.$$arity = 1); - - Opal.def(self, '$|', $Array_$$5 = function(other) { - var self = this; - - - other = (function() {if ($truthy($$($nesting, 'Array')['$==='](other))) { - return other.$to_a() - } else { - return $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'Array'), "to_ary").$to_a() - }; return nil; })(); - - var hash = $hash2([], {}), i, length, item; - - for (i = 0, length = self.length; i < length; i++) { - Opal.hash_put(hash, self[i], true); - } - - for (i = 0, length = other.length; i < length; i++) { - Opal.hash_put(hash, other[i], true); - } - - return hash.$keys(); - ; - }, $Array_$$5.$$arity = 1); - - Opal.def(self, '$*', $Array_$$6 = function(other) { - var self = this; - - - if ($truthy(other['$respond_to?']("to_str"))) { - return self.$join(other.$to_str())}; - other = $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'Integer'), "to_int"); - if ($truthy(other < 0)) { - self.$raise($$($nesting, 'ArgumentError'), "negative argument")}; - - var result = [], - converted = self.$to_a(); - - for (var i = 0; i < other; i++) { - result = result.concat(converted); - } - - return toArraySubclass(result, self.$class()); - ; - }, $Array_$$6.$$arity = 1); - - Opal.def(self, '$+', $Array_$plus$7 = function(other) { - var self = this; - - - other = (function() {if ($truthy($$($nesting, 'Array')['$==='](other))) { - return other.$to_a() - } else { - return $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'Array'), "to_ary").$to_a() - }; return nil; })(); - return self.concat(other);; - }, $Array_$plus$7.$$arity = 1); - - Opal.def(self, '$-', $Array_$minus$8 = function(other) { - var self = this; - - - other = (function() {if ($truthy($$($nesting, 'Array')['$==='](other))) { - return other.$to_a() - } else { - return $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'Array'), "to_ary").$to_a() - }; return nil; })(); - if ($truthy(self.length === 0)) { - return []}; - if ($truthy(other.length === 0)) { - return self.slice()}; - - var result = [], hash = $hash2([], {}), i, length, item; - - for (i = 0, length = other.length; i < length; i++) { - Opal.hash_put(hash, other[i], true); - } - - for (i = 0, length = self.length; i < length; i++) { - item = self[i]; - if (Opal.hash_get(hash, item) === undefined) { - result.push(item); - } - } - - return result; - ; - }, $Array_$minus$8.$$arity = 1); - - Opal.def(self, '$<<', $Array_$lt$lt$9 = function(object) { - var self = this; - - - self.push(object); - return self; - }, $Array_$lt$lt$9.$$arity = 1); - - Opal.def(self, '$<=>', $Array_$lt_eq_gt$10 = function(other) { - var self = this; - - - if ($truthy($$($nesting, 'Array')['$==='](other))) { - other = other.$to_a() - } else if ($truthy(other['$respond_to?']("to_ary"))) { - other = other.$to_ary().$to_a() - } else { - return nil - }; - - if (self.$hash() === other.$hash()) { - return 0; - } - - var count = Math.min(self.length, other.length); - - for (var i = 0; i < count; i++) { - var tmp = (self[i])['$<=>'](other[i]); - - if (tmp !== 0) { - return tmp; - } - } - - return (self.length)['$<=>'](other.length); - ; - }, $Array_$lt_eq_gt$10.$$arity = 1); - - Opal.def(self, '$==', $Array_$eq_eq$11 = function(other) { - var self = this; - - - var recursed = {}; - - function _eqeq(array, other) { - var i, length, a, b; - - if (array === other) - return true; - - if (!other.$$is_array) { - if ($$($nesting, 'Opal')['$respond_to?'](other, "to_ary")) { - return (other)['$=='](array); - } else { - return false; - } - } - - if (array.$$constructor !== Array) - array = (array).$to_a(); - if (other.$$constructor !== Array) - other = (other).$to_a(); - - if (array.length !== other.length) { - return false; - } - - recursed[(array).$object_id()] = true; - - for (i = 0, length = array.length; i < length; i++) { - a = array[i]; - b = other[i]; - if (a.$$is_array) { - if (b.$$is_array && b.length !== a.length) { - return false; - } - if (!recursed.hasOwnProperty((a).$object_id())) { - if (!_eqeq(a, b)) { - return false; - } - } - } else { - if (!(a)['$=='](b)) { - return false; - } - } - } - - return true; - } - - return _eqeq(self, other); - - }, $Array_$eq_eq$11.$$arity = 1); - - function $array_slice_range(self, index) { - var size = self.length, - exclude, from, to, result; - - exclude = index.excl; - from = Opal.Opal.$coerce_to(index.begin, Opal.Integer, 'to_int'); - to = Opal.Opal.$coerce_to(index.end, Opal.Integer, 'to_int'); - - if (from < 0) { - from += size; - - if (from < 0) { - return nil; - } - } - - if (from > size) { - return nil; - } - - if (to < 0) { - to += size; - - if (to < 0) { - return []; - } - } - - if (!exclude) { - to += 1; - } - - result = self.slice(from, to); - return toArraySubclass(result, self.$class()); - } - - function $array_slice_index_length(self, index, length) { - var size = self.length, - exclude, from, to, result; - - index = Opal.Opal.$coerce_to(index, Opal.Integer, 'to_int'); - - if (index < 0) { - index += size; - - if (index < 0) { - return nil; - } - } - - if (length === undefined) { - if (index >= size || index < 0) { - return nil; - } - - return self[index]; - } - else { - length = Opal.Opal.$coerce_to(length, Opal.Integer, 'to_int'); - - if (length < 0 || index > size || index < 0) { - return nil; - } - - result = self.slice(index, index + length); - } - return toArraySubclass(result, self.$class()); - } - ; - - Opal.def(self, '$[]', $Array_$$$12 = function(index, length) { - var self = this; - - - ; - - if (index.$$is_range) { - return $array_slice_range(self, index); - } - else { - return $array_slice_index_length(self, index, length); - } - ; - }, $Array_$$$12.$$arity = -2); - - Opal.def(self, '$[]=', $Array_$$$eq$13 = function(index, value, extra) { - var self = this, data = nil, length = nil; - - - ; - var i, size = self.length;; - if ($truthy($$($nesting, 'Range')['$==='](index))) { - - data = (function() {if ($truthy($$($nesting, 'Array')['$==='](value))) { - return value.$to_a() - } else if ($truthy(value['$respond_to?']("to_ary"))) { - return value.$to_ary().$to_a() - } else { - return [value] - }; return nil; })(); - - var exclude = index.excl, - from = $$($nesting, 'Opal').$coerce_to(index.begin, $$($nesting, 'Integer'), "to_int"), - to = $$($nesting, 'Opal').$coerce_to(index.end, $$($nesting, 'Integer'), "to_int"); - - if (from < 0) { - from += size; - - if (from < 0) { - self.$raise($$($nesting, 'RangeError'), "" + (index.$inspect()) + " out of range"); - } - } - - if (to < 0) { - to += size; - } - - if (!exclude) { - to += 1; - } - - if (from > size) { - for (i = size; i < from; i++) { - self[i] = nil; - } - } - - if (to < 0) { - self.splice.apply(self, [from, 0].concat(data)); - } - else { - self.splice.apply(self, [from, to - from].concat(data)); - } - - return value; - ; - } else { - - if ($truthy(extra === undefined)) { - length = 1 - } else { - - length = value; - value = extra; - data = (function() {if ($truthy($$($nesting, 'Array')['$==='](value))) { - return value.$to_a() - } else if ($truthy(value['$respond_to?']("to_ary"))) { - return value.$to_ary().$to_a() - } else { - return [value] - }; return nil; })(); - }; - - var old; - - index = $$($nesting, 'Opal').$coerce_to(index, $$($nesting, 'Integer'), "to_int"); - length = $$($nesting, 'Opal').$coerce_to(length, $$($nesting, 'Integer'), "to_int"); - - if (index < 0) { - old = index; - index += size; - - if (index < 0) { - self.$raise($$($nesting, 'IndexError'), "" + "index " + (old) + " too small for array; minimum " + (-self.length)); - } - } - - if (length < 0) { - self.$raise($$($nesting, 'IndexError'), "" + "negative length (" + (length) + ")") - } - - if (index > size) { - for (i = size; i < index; i++) { - self[i] = nil; - } - } - - if (extra === undefined) { - self[index] = value; - } - else { - self.splice.apply(self, [index, length].concat(data)); - } - - return value; - ; - }; - }, $Array_$$$eq$13.$$arity = -3); - - Opal.def(self, '$any?', $Array_any$ques$14 = function(pattern) { - var $iter = $Array_any$ques$14.$$p, block = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Array_any$ques$14.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if ($iter) $Array_any$ques$14.$$p = null;; - ; - if (self.length === 0) return false; - return $send(self, Opal.find_super_dispatcher(self, 'any?', $Array_any$ques$14, false), $zuper, $iter); - }, $Array_any$ques$14.$$arity = -1); - - Opal.def(self, '$assoc', $Array_assoc$15 = function $$assoc(object) { - var self = this; - - - for (var i = 0, length = self.length, item; i < length; i++) { - if (item = self[i], item.length && (item[0])['$=='](object)) { - return item; - } - } - - return nil; - - }, $Array_assoc$15.$$arity = 1); - - Opal.def(self, '$at', $Array_at$16 = function $$at(index) { - var self = this; - - - index = $$($nesting, 'Opal').$coerce_to(index, $$($nesting, 'Integer'), "to_int"); - - if (index < 0) { - index += self.length; - } - - if (index < 0 || index >= self.length) { - return nil; - } - - return self[index]; - ; - }, $Array_at$16.$$arity = 1); - - Opal.def(self, '$bsearch_index', $Array_bsearch_index$17 = function $$bsearch_index() { - var $iter = $Array_bsearch_index$17.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_bsearch_index$17.$$p = null; - - - if ($iter) $Array_bsearch_index$17.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("bsearch_index") - }; - - var min = 0, - max = self.length, - mid, - val, - ret, - smaller = false, - satisfied = nil; - - while (min < max) { - mid = min + Math.floor((max - min) / 2); - val = self[mid]; - ret = Opal.yield1(block, val); - - if (ret === true) { - satisfied = mid; - smaller = true; - } - else if (ret === false || ret === nil) { - smaller = false; - } - else if (ret.$$is_number) { - if (ret === 0) { return mid; } - smaller = (ret < 0); - } - else { - self.$raise($$($nesting, 'TypeError'), "" + "wrong argument type " + ((ret).$class()) + " (must be numeric, true, false or nil)") - } - - if (smaller) { max = mid; } else { min = mid + 1; } - } - - return satisfied; - ; - }, $Array_bsearch_index$17.$$arity = 0); - - Opal.def(self, '$bsearch', $Array_bsearch$18 = function $$bsearch() { - var $iter = $Array_bsearch$18.$$p, block = $iter || nil, self = this, index = nil; - - if ($iter) $Array_bsearch$18.$$p = null; - - - if ($iter) $Array_bsearch$18.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("bsearch") - }; - index = $send(self, 'bsearch_index', [], block.$to_proc()); - - if (index != null && index.$$is_number) { - return self[index]; - } else { - return index; - } - ; - }, $Array_bsearch$18.$$arity = 0); - - Opal.def(self, '$cycle', $Array_cycle$19 = function $$cycle(n) { - var $iter = $Array_cycle$19.$$p, block = $iter || nil, $$20, $a, self = this; - - if ($iter) $Array_cycle$19.$$p = null; - - - if ($iter) $Array_cycle$19.$$p = null;; - - if (n == null) { - n = nil; - }; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["cycle", n], ($$20 = function(){var self = $$20.$$s || this; - - if ($truthy(n['$nil?']())) { - return $$$($$($nesting, 'Float'), 'INFINITY') - } else { - - n = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_gt(n, 0))) { - return $rb_times(self.$enumerator_size(), n) - } else { - return 0 - }; - }}, $$20.$$s = self, $$20.$$arity = 0, $$20)) - }; - if ($truthy(($truthy($a = self['$empty?']()) ? $a : n['$=='](0)))) { - return nil}; - - var i, length, value; - - if (n === nil) { - while (true) { - for (i = 0, length = self.length; i < length; i++) { - value = Opal.yield1(block, self[i]); - } - } - } - else { - n = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int"); - if (n <= 0) { - return self; - } - - while (n > 0) { - for (i = 0, length = self.length; i < length; i++) { - value = Opal.yield1(block, self[i]); - } - - n--; - } - } - ; - return self; - }, $Array_cycle$19.$$arity = -1); - - Opal.def(self, '$clear', $Array_clear$21 = function $$clear() { - var self = this; - - - self.splice(0, self.length); - return self; - }, $Array_clear$21.$$arity = 0); - - Opal.def(self, '$count', $Array_count$22 = function $$count(object) { - var $iter = $Array_count$22.$$p, block = $iter || nil, $a, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Array_count$22.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if ($iter) $Array_count$22.$$p = null;; - - if (object == null) { - object = nil; - }; - if ($truthy(($truthy($a = object) ? $a : block))) { - return $send(self, Opal.find_super_dispatcher(self, 'count', $Array_count$22, false), $zuper, $iter) - } else { - return self.$size() - }; - }, $Array_count$22.$$arity = -1); - - Opal.def(self, '$initialize_copy', $Array_initialize_copy$23 = function $$initialize_copy(other) { - var self = this; - - return self.$replace(other) - }, $Array_initialize_copy$23.$$arity = 1); - - Opal.def(self, '$collect', $Array_collect$24 = function $$collect() { - var $iter = $Array_collect$24.$$p, block = $iter || nil, $$25, self = this; - - if ($iter) $Array_collect$24.$$p = null; - - - if ($iter) $Array_collect$24.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["collect"], ($$25 = function(){var self = $$25.$$s || this; - - return self.$size()}, $$25.$$s = self, $$25.$$arity = 0, $$25)) - }; - - var result = []; - - for (var i = 0, length = self.length; i < length; i++) { - var value = Opal.yield1(block, self[i]); - result.push(value); - } - - return result; - ; - }, $Array_collect$24.$$arity = 0); - - Opal.def(self, '$collect!', $Array_collect$excl$26 = function() { - var $iter = $Array_collect$excl$26.$$p, block = $iter || nil, $$27, self = this; - - if ($iter) $Array_collect$excl$26.$$p = null; - - - if ($iter) $Array_collect$excl$26.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["collect!"], ($$27 = function(){var self = $$27.$$s || this; - - return self.$size()}, $$27.$$s = self, $$27.$$arity = 0, $$27)) - }; - - for (var i = 0, length = self.length; i < length; i++) { - var value = Opal.yield1(block, self[i]); - self[i] = value; - } - ; - return self; - }, $Array_collect$excl$26.$$arity = 0); - - function binomial_coefficient(n, k) { - if (n === k || k === 0) { - return 1; - } - - if (k > 0 && n > k) { - return binomial_coefficient(n - 1, k - 1) + binomial_coefficient(n - 1, k); - } - - return 0; - } - ; - - Opal.def(self, '$combination', $Array_combination$28 = function $$combination(n) { - var $$29, $iter = $Array_combination$28.$$p, $yield = $iter || nil, self = this, num = nil; - - if ($iter) $Array_combination$28.$$p = null; - - num = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int"); - if (($yield !== nil)) { - } else { - return $send(self, 'enum_for', ["combination", num], ($$29 = function(){var self = $$29.$$s || this; - - return binomial_coefficient(self.length, num)}, $$29.$$s = self, $$29.$$arity = 0, $$29)) - }; - - var i, length, stack, chosen, lev, done, next; - - if (num === 0) { - Opal.yield1($yield, []) - } else if (num === 1) { - for (i = 0, length = self.length; i < length; i++) { - Opal.yield1($yield, [self[i]]) - } - } - else if (num === self.length) { - Opal.yield1($yield, self.slice()) - } - else if (num >= 0 && num < self.length) { - stack = []; - for (i = 0; i <= num + 1; i++) { - stack.push(0); - } - - chosen = []; - lev = 0; - done = false; - stack[0] = -1; - - while (!done) { - chosen[lev] = self[stack[lev+1]]; - while (lev < num - 1) { - lev++; - next = stack[lev+1] = stack[lev] + 1; - chosen[lev] = self[next]; - } - Opal.yield1($yield, chosen.slice()) - lev++; - do { - done = (lev === 0); - stack[lev]++; - lev--; - } while ( stack[lev+1] + num === self.length + lev + 1 ); - } - } - ; - return self; - }, $Array_combination$28.$$arity = 1); - - Opal.def(self, '$repeated_combination', $Array_repeated_combination$30 = function $$repeated_combination(n) { - var $$31, $iter = $Array_repeated_combination$30.$$p, $yield = $iter || nil, self = this, num = nil; - - if ($iter) $Array_repeated_combination$30.$$p = null; - - num = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int"); - if (($yield !== nil)) { - } else { - return $send(self, 'enum_for', ["repeated_combination", num], ($$31 = function(){var self = $$31.$$s || this; - - return binomial_coefficient(self.length + num - 1, num);}, $$31.$$s = self, $$31.$$arity = 0, $$31)) - }; - - function iterate(max, from, buffer, self) { - if (buffer.length == max) { - var copy = buffer.slice(); - Opal.yield1($yield, copy) - return; - } - for (var i = from; i < self.length; i++) { - buffer.push(self[i]); - iterate(max, i, buffer, self); - buffer.pop(); - } - } - - if (num >= 0) { - iterate(num, 0, [], self); - } - ; - return self; - }, $Array_repeated_combination$30.$$arity = 1); - - Opal.def(self, '$compact', $Array_compact$32 = function $$compact() { - var self = this; - - - var result = []; - - for (var i = 0, length = self.length, item; i < length; i++) { - if ((item = self[i]) !== nil) { - result.push(item); - } - } - - return result; - - }, $Array_compact$32.$$arity = 0); - - Opal.def(self, '$compact!', $Array_compact$excl$33 = function() { - var self = this; - - - var original = self.length; - - for (var i = 0, length = self.length; i < length; i++) { - if (self[i] === nil) { - self.splice(i, 1); - - length--; - i--; - } - } - - return self.length === original ? nil : self; - - }, $Array_compact$excl$33.$$arity = 0); - - Opal.def(self, '$concat', $Array_concat$34 = function $$concat($a) { - var $post_args, others, $$35, $$36, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - others = $post_args;; - others = $send(others, 'map', [], ($$35 = function(other){var self = $$35.$$s || this; - - - - if (other == null) { - other = nil; - }; - other = (function() {if ($truthy($$($nesting, 'Array')['$==='](other))) { - return other.$to_a() - } else { - return $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'Array'), "to_ary").$to_a() - }; return nil; })(); - if ($truthy(other['$equal?'](self))) { - other = other.$dup()}; - return other;}, $$35.$$s = self, $$35.$$arity = 1, $$35)); - $send(others, 'each', [], ($$36 = function(other){var self = $$36.$$s || this; - - - - if (other == null) { - other = nil; - }; - - for (var i = 0, length = other.length; i < length; i++) { - self.push(other[i]); - } - ;}, $$36.$$s = self, $$36.$$arity = 1, $$36)); - return self; - }, $Array_concat$34.$$arity = -1); - - Opal.def(self, '$delete', $Array_delete$37 = function(object) { - var $iter = $Array_delete$37.$$p, $yield = $iter || nil, self = this; - - if ($iter) $Array_delete$37.$$p = null; - - var original = self.length; - - for (var i = 0, length = original; i < length; i++) { - if ((self[i])['$=='](object)) { - self.splice(i, 1); - - length--; - i--; - } - } - - if (self.length === original) { - if (($yield !== nil)) { - return Opal.yieldX($yield, []); - } - return nil; - } - return object; - - }, $Array_delete$37.$$arity = 1); - - Opal.def(self, '$delete_at', $Array_delete_at$38 = function $$delete_at(index) { - var self = this; - - - index = $$($nesting, 'Opal').$coerce_to(index, $$($nesting, 'Integer'), "to_int"); - - if (index < 0) { - index += self.length; - } - - if (index < 0 || index >= self.length) { - return nil; - } - - var result = self[index]; - - self.splice(index, 1); - - return result; - - }, $Array_delete_at$38.$$arity = 1); - - Opal.def(self, '$delete_if', $Array_delete_if$39 = function $$delete_if() { - var $iter = $Array_delete_if$39.$$p, block = $iter || nil, $$40, self = this; - - if ($iter) $Array_delete_if$39.$$p = null; - - - if ($iter) $Array_delete_if$39.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["delete_if"], ($$40 = function(){var self = $$40.$$s || this; - - return self.$size()}, $$40.$$s = self, $$40.$$arity = 0, $$40)) - }; - - for (var i = 0, length = self.length, value; i < length; i++) { - value = block(self[i]); - - if (value !== false && value !== nil) { - self.splice(i, 1); - - length--; - i--; - } - } - ; - return self; - }, $Array_delete_if$39.$$arity = 0); - - Opal.def(self, '$dig', $Array_dig$41 = function $$dig(idx, $a) { - var $post_args, idxs, self = this, item = nil; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - idxs = $post_args;; - item = self['$[]'](idx); - - if (item === nil || idxs.length === 0) { - return item; - } - ; - if ($truthy(item['$respond_to?']("dig"))) { - } else { - self.$raise($$($nesting, 'TypeError'), "" + (item.$class()) + " does not have #dig method") - }; - return $send(item, 'dig', Opal.to_a(idxs)); - }, $Array_dig$41.$$arity = -2); - - Opal.def(self, '$drop', $Array_drop$42 = function $$drop(number) { - var self = this; - - - if (number < 0) { - self.$raise($$($nesting, 'ArgumentError')) - } - - return self.slice(number); - - }, $Array_drop$42.$$arity = 1); - - Opal.def(self, '$dup', $Array_dup$43 = function $$dup() { - var $iter = $Array_dup$43.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Array_dup$43.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - - if (self.$$class === Opal.Array && - self.$$class.$allocate.$$pristine && - self.$copy_instance_variables.$$pristine && - self.$initialize_dup.$$pristine) { - return self.slice(0); - } - ; - return $send(self, Opal.find_super_dispatcher(self, 'dup', $Array_dup$43, false), $zuper, $iter); - }, $Array_dup$43.$$arity = 0); - - Opal.def(self, '$each', $Array_each$44 = function $$each() { - var $iter = $Array_each$44.$$p, block = $iter || nil, $$45, self = this; - - if ($iter) $Array_each$44.$$p = null; - - - if ($iter) $Array_each$44.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["each"], ($$45 = function(){var self = $$45.$$s || this; - - return self.$size()}, $$45.$$s = self, $$45.$$arity = 0, $$45)) - }; - - for (var i = 0, length = self.length; i < length; i++) { - var value = Opal.yield1(block, self[i]); - } - ; - return self; - }, $Array_each$44.$$arity = 0); - - Opal.def(self, '$each_index', $Array_each_index$46 = function $$each_index() { - var $iter = $Array_each_index$46.$$p, block = $iter || nil, $$47, self = this; - - if ($iter) $Array_each_index$46.$$p = null; - - - if ($iter) $Array_each_index$46.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["each_index"], ($$47 = function(){var self = $$47.$$s || this; - - return self.$size()}, $$47.$$s = self, $$47.$$arity = 0, $$47)) - }; - - for (var i = 0, length = self.length; i < length; i++) { - var value = Opal.yield1(block, i); - } - ; - return self; - }, $Array_each_index$46.$$arity = 0); - - Opal.def(self, '$empty?', $Array_empty$ques$48 = function() { - var self = this; - - return self.length === 0; - }, $Array_empty$ques$48.$$arity = 0); - - Opal.def(self, '$eql?', $Array_eql$ques$49 = function(other) { - var self = this; - - - var recursed = {}; - - function _eql(array, other) { - var i, length, a, b; - - if (!other.$$is_array) { - return false; - } - - other = other.$to_a(); - - if (array.length !== other.length) { - return false; - } - - recursed[(array).$object_id()] = true; - - for (i = 0, length = array.length; i < length; i++) { - a = array[i]; - b = other[i]; - if (a.$$is_array) { - if (b.$$is_array && b.length !== a.length) { - return false; - } - if (!recursed.hasOwnProperty((a).$object_id())) { - if (!_eql(a, b)) { - return false; - } - } - } else { - if (!(a)['$eql?'](b)) { - return false; - } - } - } - - return true; - } - - return _eql(self, other); - - }, $Array_eql$ques$49.$$arity = 1); - - Opal.def(self, '$fetch', $Array_fetch$50 = function $$fetch(index, defaults) { - var $iter = $Array_fetch$50.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_fetch$50.$$p = null; - - - if ($iter) $Array_fetch$50.$$p = null;; - ; - - var original = index; - - index = $$($nesting, 'Opal').$coerce_to(index, $$($nesting, 'Integer'), "to_int"); - - if (index < 0) { - index += self.length; - } - - if (index >= 0 && index < self.length) { - return self[index]; - } - - if (block !== nil && defaults != null) { - self.$warn("warning: block supersedes default value argument") - } - - if (block !== nil) { - return block(original); - } - - if (defaults != null) { - return defaults; - } - - if (self.length === 0) { - self.$raise($$($nesting, 'IndexError'), "" + "index " + (original) + " outside of array bounds: 0...0") - } - else { - self.$raise($$($nesting, 'IndexError'), "" + "index " + (original) + " outside of array bounds: -" + (self.length) + "..." + (self.length)); - } - ; - }, $Array_fetch$50.$$arity = -2); - - Opal.def(self, '$fill', $Array_fill$51 = function $$fill($a) { - var $iter = $Array_fill$51.$$p, block = $iter || nil, $post_args, args, $b, $c, self = this, one = nil, two = nil, obj = nil, left = nil, right = nil; - - if ($iter) $Array_fill$51.$$p = null; - - - if ($iter) $Array_fill$51.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - var i, length, value;; - if ($truthy(block)) { - - if ($truthy(args.length > 2)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (args.$length()) + " for 0..2)")}; - $c = args, $b = Opal.to_ary($c), (one = ($b[0] == null ? nil : $b[0])), (two = ($b[1] == null ? nil : $b[1])), $c; - } else { - - if ($truthy(args.length == 0)) { - self.$raise($$($nesting, 'ArgumentError'), "wrong number of arguments (0 for 1..3)") - } else if ($truthy(args.length > 3)) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (args.$length()) + " for 1..3)")}; - $c = args, $b = Opal.to_ary($c), (obj = ($b[0] == null ? nil : $b[0])), (one = ($b[1] == null ? nil : $b[1])), (two = ($b[2] == null ? nil : $b[2])), $c; - }; - if ($truthy($$($nesting, 'Range')['$==='](one))) { - - if ($truthy(two)) { - self.$raise($$($nesting, 'TypeError'), "length invalid with range")}; - left = $$($nesting, 'Opal').$coerce_to(one.$begin(), $$($nesting, 'Integer'), "to_int"); - if ($truthy(left < 0)) { - left += this.length}; - if ($truthy(left < 0)) { - self.$raise($$($nesting, 'RangeError'), "" + (one.$inspect()) + " out of range")}; - right = $$($nesting, 'Opal').$coerce_to(one.$end(), $$($nesting, 'Integer'), "to_int"); - if ($truthy(right < 0)) { - right += this.length}; - if ($truthy(one['$exclude_end?']())) { - } else { - right += 1 - }; - if ($truthy(right <= left)) { - return self}; - } else if ($truthy(one)) { - - left = $$($nesting, 'Opal').$coerce_to(one, $$($nesting, 'Integer'), "to_int"); - if ($truthy(left < 0)) { - left += this.length}; - if ($truthy(left < 0)) { - left = 0}; - if ($truthy(two)) { - - right = $$($nesting, 'Opal').$coerce_to(two, $$($nesting, 'Integer'), "to_int"); - if ($truthy(right == 0)) { - return self}; - right += left; - } else { - right = this.length - }; - } else { - - left = 0; - right = this.length; - }; - if ($truthy(left > this.length)) { - - for (i = this.length; i < right; i++) { - self[i] = nil; - } - }; - if ($truthy(right > this.length)) { - this.length = right}; - if ($truthy(block)) { - - for (length = this.length; left < right; left++) { - value = block(left); - self[left] = value; - } - - } else { - - for (length = this.length; left < right; left++) { - self[left] = obj; - } - - }; - return self; - }, $Array_fill$51.$$arity = -1); - - Opal.def(self, '$first', $Array_first$52 = function $$first(count) { - var self = this; - - - ; - - if (count == null) { - return self.length === 0 ? nil : self[0]; - } - - count = $$($nesting, 'Opal').$coerce_to(count, $$($nesting, 'Integer'), "to_int"); - - if (count < 0) { - self.$raise($$($nesting, 'ArgumentError'), "negative array size"); - } - - return self.slice(0, count); - ; - }, $Array_first$52.$$arity = -1); - - Opal.def(self, '$flatten', $Array_flatten$53 = function $$flatten(level) { - var self = this; - - - ; - - function _flatten(array, level) { - var result = [], - i, length, - item, ary; - - array = (array).$to_a(); - - for (i = 0, length = array.length; i < length; i++) { - item = array[i]; - - if (!$$($nesting, 'Opal')['$respond_to?'](item, "to_ary", true)) { - result.push(item); - continue; - } - - ary = (item).$to_ary(); - - if (ary === nil) { - result.push(item); - continue; - } - - if (!ary.$$is_array) { - self.$raise($$($nesting, 'TypeError')); - } - - if (ary === self) { - self.$raise($$($nesting, 'ArgumentError')); - } - - switch (level) { - case undefined: - result = result.concat(_flatten(ary)); - break; - case 0: - result.push(ary); - break; - default: - result.push.apply(result, _flatten(ary, level - 1)); - } - } - return result; - } - - if (level !== undefined) { - level = $$($nesting, 'Opal').$coerce_to(level, $$($nesting, 'Integer'), "to_int"); - } - - return toArraySubclass(_flatten(self, level), self.$class()); - ; - }, $Array_flatten$53.$$arity = -1); - - Opal.def(self, '$flatten!', $Array_flatten$excl$54 = function(level) { - var self = this; - - - ; - - var flattened = self.$flatten(level); - - if (self.length == flattened.length) { - for (var i = 0, length = self.length; i < length; i++) { - if (self[i] !== flattened[i]) { - break; - } - } - - if (i == length) { - return nil; - } - } - - self.$replace(flattened); - ; - return self; - }, $Array_flatten$excl$54.$$arity = -1); - - Opal.def(self, '$hash', $Array_hash$55 = function $$hash() { - var self = this; - - - var top = (Opal.hash_ids === undefined), - result = ['A'], - hash_id = self.$object_id(), - item, i, key; - - try { - if (top) { - Opal.hash_ids = Object.create(null); - } - - // return early for recursive structures - if (Opal.hash_ids[hash_id]) { - return 'self'; - } - - for (key in Opal.hash_ids) { - item = Opal.hash_ids[key]; - if (self['$eql?'](item)) { - return 'self'; - } - } - - Opal.hash_ids[hash_id] = self; - - for (i = 0; i < self.length; i++) { - item = self[i]; - result.push(item.$hash()); - } - - return result.join(','); - } finally { - if (top) { - Opal.hash_ids = undefined; - } - } - - }, $Array_hash$55.$$arity = 0); - - Opal.def(self, '$include?', $Array_include$ques$56 = function(member) { - var self = this; - - - for (var i = 0, length = self.length; i < length; i++) { - if ((self[i])['$=='](member)) { - return true; - } - } - - return false; - - }, $Array_include$ques$56.$$arity = 1); - - Opal.def(self, '$index', $Array_index$57 = function $$index(object) { - var $iter = $Array_index$57.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_index$57.$$p = null; - - - if ($iter) $Array_index$57.$$p = null;; - ; - - var i, length, value; - - if (object != null && block !== nil) { - self.$warn("warning: given block not used") - } - - if (object != null) { - for (i = 0, length = self.length; i < length; i++) { - if ((self[i])['$=='](object)) { - return i; - } - } - } - else if (block !== nil) { - for (i = 0, length = self.length; i < length; i++) { - value = block(self[i]); - - if (value !== false && value !== nil) { - return i; - } - } - } - else { - return self.$enum_for("index"); - } - - return nil; - ; - }, $Array_index$57.$$arity = -1); - - Opal.def(self, '$insert', $Array_insert$58 = function $$insert(index, $a) { - var $post_args, objects, self = this; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - objects = $post_args;; - - index = $$($nesting, 'Opal').$coerce_to(index, $$($nesting, 'Integer'), "to_int"); - - if (objects.length > 0) { - if (index < 0) { - index += self.length + 1; - - if (index < 0) { - self.$raise($$($nesting, 'IndexError'), "" + (index) + " is out of bounds"); - } - } - if (index > self.length) { - for (var i = self.length; i < index; i++) { - self.push(nil); - } - } - - self.splice.apply(self, [index, 0].concat(objects)); - } - ; - return self; - }, $Array_insert$58.$$arity = -2); - - Opal.def(self, '$inspect', $Array_inspect$59 = function $$inspect() { - var self = this; - - - var result = [], - id = self.$__id__(); - - for (var i = 0, length = self.length; i < length; i++) { - var item = self['$[]'](i); - - if ((item).$__id__() === id) { - result.push('[...]'); - } - else { - result.push((item).$inspect()); - } - } - - return '[' + result.join(', ') + ']'; - - }, $Array_inspect$59.$$arity = 0); - - Opal.def(self, '$join', $Array_join$60 = function $$join(sep) { - var self = this; - if ($gvars[","] == null) $gvars[","] = nil; - - - - if (sep == null) { - sep = nil; - }; - if ($truthy(self.length === 0)) { - return ""}; - if ($truthy(sep === nil)) { - sep = $gvars[","]}; - - var result = []; - var i, length, item, tmp; - - for (i = 0, length = self.length; i < length; i++) { - item = self[i]; - - if ($$($nesting, 'Opal')['$respond_to?'](item, "to_str")) { - tmp = (item).$to_str(); - - if (tmp !== nil) { - result.push((tmp).$to_s()); - - continue; - } - } - - if ($$($nesting, 'Opal')['$respond_to?'](item, "to_ary")) { - tmp = (item).$to_ary(); - - if (tmp === self) { - self.$raise($$($nesting, 'ArgumentError')); - } - - if (tmp !== nil) { - result.push((tmp).$join(sep)); - - continue; - } - } - - if ($$($nesting, 'Opal')['$respond_to?'](item, "to_s")) { - tmp = (item).$to_s(); - - if (tmp !== nil) { - result.push(tmp); - - continue; - } - } - - self.$raise($$($nesting, 'NoMethodError').$new("" + (Opal.inspect(item)) + " doesn't respond to #to_str, #to_ary or #to_s", "to_str")); - } - - if (sep === nil) { - return result.join(''); - } - else { - return result.join($$($nesting, 'Opal')['$coerce_to!'](sep, $$($nesting, 'String'), "to_str").$to_s()); - } - ; - }, $Array_join$60.$$arity = -1); - - Opal.def(self, '$keep_if', $Array_keep_if$61 = function $$keep_if() { - var $iter = $Array_keep_if$61.$$p, block = $iter || nil, $$62, self = this; - - if ($iter) $Array_keep_if$61.$$p = null; - - - if ($iter) $Array_keep_if$61.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["keep_if"], ($$62 = function(){var self = $$62.$$s || this; - - return self.$size()}, $$62.$$s = self, $$62.$$arity = 0, $$62)) - }; - - for (var i = 0, length = self.length, value; i < length; i++) { - value = block(self[i]); - - if (value === false || value === nil) { - self.splice(i, 1); - - length--; - i--; - } - } - ; - return self; - }, $Array_keep_if$61.$$arity = 0); - - Opal.def(self, '$last', $Array_last$63 = function $$last(count) { - var self = this; - - - ; - - if (count == null) { - return self.length === 0 ? nil : self[self.length - 1]; - } - - count = $$($nesting, 'Opal').$coerce_to(count, $$($nesting, 'Integer'), "to_int"); - - if (count < 0) { - self.$raise($$($nesting, 'ArgumentError'), "negative array size"); - } - - if (count > self.length) { - count = self.length; - } - - return self.slice(self.length - count, self.length); - ; - }, $Array_last$63.$$arity = -1); - - Opal.def(self, '$length', $Array_length$64 = function $$length() { - var self = this; - - return self.length; - }, $Array_length$64.$$arity = 0); - Opal.alias(self, "map", "collect"); - Opal.alias(self, "map!", "collect!"); - - Opal.def(self, '$max', $Array_max$65 = function $$max(n) { - var $iter = $Array_max$65.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_max$65.$$p = null; - - - if ($iter) $Array_max$65.$$p = null;; - ; - return $send(self.$each(), 'max', [n], block.$to_proc()); - }, $Array_max$65.$$arity = -1); - - Opal.def(self, '$min', $Array_min$66 = function $$min() { - var $iter = $Array_min$66.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_min$66.$$p = null; - - - if ($iter) $Array_min$66.$$p = null;; - return $send(self.$each(), 'min', [], block.$to_proc()); - }, $Array_min$66.$$arity = 0); - - // Returns the product of from, from-1, ..., from - how_many + 1. - function descending_factorial(from, how_many) { - var count = how_many >= 0 ? 1 : 0; - while (how_many) { - count *= from; - from--; - how_many--; - } - return count; - } - ; - - Opal.def(self, '$permutation', $Array_permutation$67 = function $$permutation(num) { - var $iter = $Array_permutation$67.$$p, block = $iter || nil, $$68, self = this, perm = nil, used = nil; - - if ($iter) $Array_permutation$67.$$p = null; - - - if ($iter) $Array_permutation$67.$$p = null;; - ; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["permutation", num], ($$68 = function(){var self = $$68.$$s || this; - - return descending_factorial(self.length, num === undefined ? self.length : num);}, $$68.$$s = self, $$68.$$arity = 0, $$68)) - }; - - var permute, offensive, output; - - if (num === undefined) { - num = self.length; - } - else { - num = $$($nesting, 'Opal').$coerce_to(num, $$($nesting, 'Integer'), "to_int") - } - - if (num < 0 || self.length < num) { - // no permutations, yield nothing - } - else if (num === 0) { - // exactly one permutation: the zero-length array - Opal.yield1(block, []) - } - else if (num === 1) { - // this is a special, easy case - for (var i = 0; i < self.length; i++) { - Opal.yield1(block, [self[i]]) - } - } - else { - // this is the general case - (perm = $$($nesting, 'Array').$new(num)); - (used = $$($nesting, 'Array').$new(self.length, false)); - - permute = function(num, perm, index, used, blk) { - self = this; - for(var i = 0; i < self.length; i++){ - if(used['$[]'](i)['$!']()) { - perm[index] = i; - if(index < num - 1) { - used[i] = true; - permute.call(self, num, perm, index + 1, used, blk); - used[i] = false; - } - else { - output = []; - for (var j = 0; j < perm.length; j++) { - output.push(self[perm[j]]); - } - Opal.yield1(blk, output); - } - } - } - } - - if ((block !== nil)) { - // offensive (both definitions) copy. - offensive = self.slice(); - permute.call(offensive, num, perm, 0, used, block); - } - else { - permute.call(self, num, perm, 0, used, block); - } - } - ; - return self; - }, $Array_permutation$67.$$arity = -1); - - Opal.def(self, '$repeated_permutation', $Array_repeated_permutation$69 = function $$repeated_permutation(n) { - var $$70, $iter = $Array_repeated_permutation$69.$$p, $yield = $iter || nil, self = this, num = nil; - - if ($iter) $Array_repeated_permutation$69.$$p = null; - - num = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int"); - if (($yield !== nil)) { - } else { - return $send(self, 'enum_for', ["repeated_permutation", num], ($$70 = function(){var self = $$70.$$s || this; - - if ($truthy($rb_ge(num, 0))) { - return self.$size()['$**'](num) - } else { - return 0 - }}, $$70.$$s = self, $$70.$$arity = 0, $$70)) - }; - - function iterate(max, buffer, self) { - if (buffer.length == max) { - var copy = buffer.slice(); - Opal.yield1($yield, copy) - return; - } - for (var i = 0; i < self.length; i++) { - buffer.push(self[i]); - iterate(max, buffer, self); - buffer.pop(); - } - } - - iterate(num, [], self.slice()); - ; - return self; - }, $Array_repeated_permutation$69.$$arity = 1); - - Opal.def(self, '$pop', $Array_pop$71 = function $$pop(count) { - var self = this; - - - ; - if ($truthy(count === undefined)) { - - if ($truthy(self.length === 0)) { - return nil}; - return self.pop();}; - count = $$($nesting, 'Opal').$coerce_to(count, $$($nesting, 'Integer'), "to_int"); - if ($truthy(count < 0)) { - self.$raise($$($nesting, 'ArgumentError'), "negative array size")}; - if ($truthy(self.length === 0)) { - return []}; - if ($truthy(count > self.length)) { - return self.splice(0, self.length); - } else { - return self.splice(self.length - count, self.length); - }; - }, $Array_pop$71.$$arity = -1); - - Opal.def(self, '$product', $Array_product$72 = function $$product($a) { - var $iter = $Array_product$72.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Array_product$72.$$p = null; - - - if ($iter) $Array_product$72.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - var result = (block !== nil) ? null : [], - n = args.length + 1, - counters = new Array(n), - lengths = new Array(n), - arrays = new Array(n), - i, m, subarray, len, resultlen = 1; - - arrays[0] = self; - for (i = 1; i < n; i++) { - arrays[i] = $$($nesting, 'Opal').$coerce_to(args[i - 1], $$($nesting, 'Array'), "to_ary"); - } - - for (i = 0; i < n; i++) { - len = arrays[i].length; - if (len === 0) { - return result || self; - } - resultlen *= len; - if (resultlen > 2147483647) { - self.$raise($$($nesting, 'RangeError'), "too big to product") - } - lengths[i] = len; - counters[i] = 0; - } - - outer_loop: for (;;) { - subarray = []; - for (i = 0; i < n; i++) { - subarray.push(arrays[i][counters[i]]); - } - if (result) { - result.push(subarray); - } else { - Opal.yield1(block, subarray) - } - m = n - 1; - counters[m]++; - while (counters[m] === lengths[m]) { - counters[m] = 0; - if (--m < 0) break outer_loop; - counters[m]++; - } - } - - return result || self; - ; - }, $Array_product$72.$$arity = -1); - - Opal.def(self, '$push', $Array_push$73 = function $$push($a) { - var $post_args, objects, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - objects = $post_args;; - - for (var i = 0, length = objects.length; i < length; i++) { - self.push(objects[i]); - } - ; - return self; - }, $Array_push$73.$$arity = -1); - Opal.alias(self, "append", "push"); - - Opal.def(self, '$rassoc', $Array_rassoc$74 = function $$rassoc(object) { - var self = this; - - - for (var i = 0, length = self.length, item; i < length; i++) { - item = self[i]; - - if (item.length && item[1] !== undefined) { - if ((item[1])['$=='](object)) { - return item; - } - } - } - - return nil; - - }, $Array_rassoc$74.$$arity = 1); - - Opal.def(self, '$reject', $Array_reject$75 = function $$reject() { - var $iter = $Array_reject$75.$$p, block = $iter || nil, $$76, self = this; - - if ($iter) $Array_reject$75.$$p = null; - - - if ($iter) $Array_reject$75.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["reject"], ($$76 = function(){var self = $$76.$$s || this; - - return self.$size()}, $$76.$$s = self, $$76.$$arity = 0, $$76)) - }; - - var result = []; - - for (var i = 0, length = self.length, value; i < length; i++) { - value = block(self[i]); - - if (value === false || value === nil) { - result.push(self[i]); - } - } - return result; - ; - }, $Array_reject$75.$$arity = 0); - - Opal.def(self, '$reject!', $Array_reject$excl$77 = function() { - var $iter = $Array_reject$excl$77.$$p, block = $iter || nil, $$78, self = this, original = nil; - - if ($iter) $Array_reject$excl$77.$$p = null; - - - if ($iter) $Array_reject$excl$77.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["reject!"], ($$78 = function(){var self = $$78.$$s || this; - - return self.$size()}, $$78.$$s = self, $$78.$$arity = 0, $$78)) - }; - original = self.$length(); - $send(self, 'delete_if', [], block.$to_proc()); - if (self.$length()['$=='](original)) { - return nil - } else { - return self - }; - }, $Array_reject$excl$77.$$arity = 0); - - Opal.def(self, '$replace', $Array_replace$79 = function $$replace(other) { - var self = this; - - - other = (function() {if ($truthy($$($nesting, 'Array')['$==='](other))) { - return other.$to_a() - } else { - return $$($nesting, 'Opal').$coerce_to(other, $$($nesting, 'Array'), "to_ary").$to_a() - }; return nil; })(); - - self.splice(0, self.length); - self.push.apply(self, other); - ; - return self; - }, $Array_replace$79.$$arity = 1); - - Opal.def(self, '$reverse', $Array_reverse$80 = function $$reverse() { - var self = this; - - return self.slice(0).reverse(); - }, $Array_reverse$80.$$arity = 0); - - Opal.def(self, '$reverse!', $Array_reverse$excl$81 = function() { - var self = this; - - return self.reverse(); - }, $Array_reverse$excl$81.$$arity = 0); - - Opal.def(self, '$reverse_each', $Array_reverse_each$82 = function $$reverse_each() { - var $iter = $Array_reverse_each$82.$$p, block = $iter || nil, $$83, self = this; - - if ($iter) $Array_reverse_each$82.$$p = null; - - - if ($iter) $Array_reverse_each$82.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["reverse_each"], ($$83 = function(){var self = $$83.$$s || this; - - return self.$size()}, $$83.$$s = self, $$83.$$arity = 0, $$83)) - }; - $send(self.$reverse(), 'each', [], block.$to_proc()); - return self; - }, $Array_reverse_each$82.$$arity = 0); - - Opal.def(self, '$rindex', $Array_rindex$84 = function $$rindex(object) { - var $iter = $Array_rindex$84.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_rindex$84.$$p = null; - - - if ($iter) $Array_rindex$84.$$p = null;; - ; - - var i, value; - - if (object != null && block !== nil) { - self.$warn("warning: given block not used") - } - - if (object != null) { - for (i = self.length - 1; i >= 0; i--) { - if (i >= self.length) { - break; - } - if ((self[i])['$=='](object)) { - return i; - } - } - } - else if (block !== nil) { - for (i = self.length - 1; i >= 0; i--) { - if (i >= self.length) { - break; - } - - value = block(self[i]); - - if (value !== false && value !== nil) { - return i; - } - } - } - else if (object == null) { - return self.$enum_for("rindex"); - } - - return nil; - ; - }, $Array_rindex$84.$$arity = -1); - - Opal.def(self, '$rotate', $Array_rotate$85 = function $$rotate(n) { - var self = this; - - - - if (n == null) { - n = 1; - }; - n = $$($nesting, 'Opal').$coerce_to(n, $$($nesting, 'Integer'), "to_int"); - - var ary, idx, firstPart, lastPart; - - if (self.length === 1) { - return self.slice(); - } - if (self.length === 0) { - return []; - } - - ary = self.slice(); - idx = n % ary.length; - - firstPart = ary.slice(idx); - lastPart = ary.slice(0, idx); - return firstPart.concat(lastPart); - ; - }, $Array_rotate$85.$$arity = -1); - - Opal.def(self, '$rotate!', $Array_rotate$excl$86 = function(cnt) { - var self = this, ary = nil; - - - - if (cnt == null) { - cnt = 1; - }; - - if (self.length === 0 || self.length === 1) { - return self; - } - ; - cnt = $$($nesting, 'Opal').$coerce_to(cnt, $$($nesting, 'Integer'), "to_int"); - ary = self.$rotate(cnt); - return self.$replace(ary); - }, $Array_rotate$excl$86.$$arity = -1); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'SampleRandom'); - - var $nesting = [self].concat($parent_nesting), $SampleRandom_initialize$87, $SampleRandom_rand$88; - - self.$$prototype.rng = nil; - - - Opal.def(self, '$initialize', $SampleRandom_initialize$87 = function $$initialize(rng) { - var self = this; - - return (self.rng = rng) - }, $SampleRandom_initialize$87.$$arity = 1); - return (Opal.def(self, '$rand', $SampleRandom_rand$88 = function $$rand(size) { - var self = this, random = nil; - - - random = $$($nesting, 'Opal').$coerce_to(self.rng.$rand(size), $$($nesting, 'Integer'), "to_int"); - if ($truthy(random < 0)) { - self.$raise($$($nesting, 'RangeError'), "random value must be >= 0")}; - if ($truthy(random < size)) { - } else { - self.$raise($$($nesting, 'RangeError'), "random value must be less than Array size") - }; - return random; - }, $SampleRandom_rand$88.$$arity = 1), nil) && 'rand'; - })($nesting[0], null, $nesting); - - Opal.def(self, '$sample', $Array_sample$89 = function $$sample(count, options) { - var $a, self = this, o = nil, rng = nil; - - - ; - ; - if ($truthy(count === undefined)) { - return self.$at($$($nesting, 'Kernel').$rand(self.length))}; - if ($truthy(options === undefined)) { - if ($truthy((o = $$($nesting, 'Opal')['$coerce_to?'](count, $$($nesting, 'Hash'), "to_hash")))) { - - options = o; - count = nil; - } else { - - options = nil; - count = $$($nesting, 'Opal').$coerce_to(count, $$($nesting, 'Integer'), "to_int"); - } - } else { - - count = $$($nesting, 'Opal').$coerce_to(count, $$($nesting, 'Integer'), "to_int"); - options = $$($nesting, 'Opal').$coerce_to(options, $$($nesting, 'Hash'), "to_hash"); - }; - if ($truthy(($truthy($a = count) ? count < 0 : $a))) { - self.$raise($$($nesting, 'ArgumentError'), "count must be greater than 0")}; - if ($truthy(options)) { - rng = options['$[]']("random")}; - rng = (function() {if ($truthy(($truthy($a = rng) ? rng['$respond_to?']("rand") : $a))) { - return $$($nesting, 'SampleRandom').$new(rng) - } else { - return $$($nesting, 'Kernel') - }; return nil; })(); - if ($truthy(count)) { - } else { - return self[rng.$rand(self.length)] - }; - - - var abandon, spin, result, i, j, k, targetIndex, oldValue; - - if (count > self.length) { - count = self.length; - } - - switch (count) { - case 0: - return []; - break; - case 1: - return [self[rng.$rand(self.length)]]; - break; - case 2: - i = rng.$rand(self.length); - j = rng.$rand(self.length); - if (i === j) { - j = i === 0 ? i + 1 : i - 1; - } - return [self[i], self[j]]; - break; - default: - if (self.length / count > 3) { - abandon = false; - spin = 0; - - result = $$($nesting, 'Array').$new(count); - i = 1; - - result[0] = rng.$rand(self.length); - while (i < count) { - k = rng.$rand(self.length); - j = 0; - - while (j < i) { - while (k === result[j]) { - spin++; - if (spin > 100) { - abandon = true; - break; - } - k = rng.$rand(self.length); - } - if (abandon) { break; } - - j++; - } - - if (abandon) { break; } - - result[i] = k; - - i++; - } - - if (!abandon) { - i = 0; - while (i < count) { - result[i] = self[result[i]]; - i++; - } - - return result; - } - } - - result = self.slice(); - - for (var c = 0; c < count; c++) { - targetIndex = rng.$rand(self.length); - oldValue = result[c]; - result[c] = result[targetIndex]; - result[targetIndex] = oldValue; - } - - return count === self.length ? result : (result)['$[]'](0, count); - } - ; - }, $Array_sample$89.$$arity = -1); - - Opal.def(self, '$select', $Array_select$90 = function $$select() { - var $iter = $Array_select$90.$$p, block = $iter || nil, $$91, self = this; - - if ($iter) $Array_select$90.$$p = null; - - - if ($iter) $Array_select$90.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["select"], ($$91 = function(){var self = $$91.$$s || this; - - return self.$size()}, $$91.$$s = self, $$91.$$arity = 0, $$91)) - }; - - var result = []; - - for (var i = 0, length = self.length, item, value; i < length; i++) { - item = self[i]; - - value = Opal.yield1(block, item); - - if (Opal.truthy(value)) { - result.push(item); - } - } - - return result; - ; - }, $Array_select$90.$$arity = 0); - - Opal.def(self, '$select!', $Array_select$excl$92 = function() { - var $iter = $Array_select$excl$92.$$p, block = $iter || nil, $$93, self = this; - - if ($iter) $Array_select$excl$92.$$p = null; - - - if ($iter) $Array_select$excl$92.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["select!"], ($$93 = function(){var self = $$93.$$s || this; - - return self.$size()}, $$93.$$s = self, $$93.$$arity = 0, $$93)) - }; - - var original = self.length; - $send(self, 'keep_if', [], block.$to_proc()); - return self.length === original ? nil : self; - ; - }, $Array_select$excl$92.$$arity = 0); - - Opal.def(self, '$shift', $Array_shift$94 = function $$shift(count) { - var self = this; - - - ; - if ($truthy(count === undefined)) { - - if ($truthy(self.length === 0)) { - return nil}; - return shiftNoArg(self);}; - count = $$($nesting, 'Opal').$coerce_to(count, $$($nesting, 'Integer'), "to_int"); - if ($truthy(count < 0)) { - self.$raise($$($nesting, 'ArgumentError'), "negative array size")}; - if ($truthy(self.length === 0)) { - return []}; - return self.splice(0, count);; - }, $Array_shift$94.$$arity = -1); - Opal.alias(self, "size", "length"); - - Opal.def(self, '$shuffle', $Array_shuffle$95 = function $$shuffle(rng) { - var self = this; - - - ; - return self.$dup().$to_a()['$shuffle!'](rng); - }, $Array_shuffle$95.$$arity = -1); - - Opal.def(self, '$shuffle!', $Array_shuffle$excl$96 = function(rng) { - var self = this; - - - ; - - var randgen, i = self.length, j, tmp; - - if (rng !== undefined) { - rng = $$($nesting, 'Opal')['$coerce_to?'](rng, $$($nesting, 'Hash'), "to_hash"); - - if (rng !== nil) { - rng = rng['$[]']("random"); - - if (rng !== nil && rng['$respond_to?']("rand")) { - randgen = rng; - } - } - } - - while (i) { - if (randgen) { - j = randgen.$rand(i).$to_int(); - - if (j < 0) { - self.$raise($$($nesting, 'RangeError'), "" + "random number too small " + (j)) - } - - if (j >= i) { - self.$raise($$($nesting, 'RangeError'), "" + "random number too big " + (j)) - } - } - else { - j = self.$rand(i); - } - - tmp = self[--i]; - self[i] = self[j]; - self[j] = tmp; - } - - return self; - ; - }, $Array_shuffle$excl$96.$$arity = -1); - Opal.alias(self, "slice", "[]"); - - Opal.def(self, '$slice!', $Array_slice$excl$97 = function(index, length) { - var self = this, result = nil, range = nil, range_start = nil, range_end = nil, start = nil; - - - ; - result = nil; - if ($truthy(length === undefined)) { - if ($truthy($$($nesting, 'Range')['$==='](index))) { - - range = index; - result = self['$[]'](range); - range_start = $$($nesting, 'Opal').$coerce_to(range.$begin(), $$($nesting, 'Integer'), "to_int"); - range_end = $$($nesting, 'Opal').$coerce_to(range.$end(), $$($nesting, 'Integer'), "to_int"); - - if (range_start < 0) { - range_start += self.length; - } - - if (range_end < 0) { - range_end += self.length; - } else if (range_end >= self.length) { - range_end = self.length - 1; - if (range.excl) { - range_end += 1; - } - } - - var range_length = range_end - range_start; - if (range.excl) { - range_end -= 1; - } else { - range_length += 1; - } - - if (range_start < self.length && range_start >= 0 && range_end < self.length && range_end >= 0 && range_length > 0) { - self.splice(range_start, range_length); - } - ; - } else { - - start = $$($nesting, 'Opal').$coerce_to(index, $$($nesting, 'Integer'), "to_int"); - - if (start < 0) { - start += self.length; - } - - if (start < 0 || start >= self.length) { - return nil; - } - - result = self[start]; - - if (start === 0) { - self.shift(); - } else { - self.splice(start, 1); - } - ; - } - } else { - - start = $$($nesting, 'Opal').$coerce_to(index, $$($nesting, 'Integer'), "to_int"); - length = $$($nesting, 'Opal').$coerce_to(length, $$($nesting, 'Integer'), "to_int"); - - if (length < 0) { - return nil; - } - - var end = start + length; - - result = self['$[]'](start, length); - - if (start < 0) { - start += self.length; - } - - if (start + length > self.length) { - length = self.length - start; - } - - if (start < self.length && start >= 0) { - self.splice(start, length); - } - ; - }; - return result; - }, $Array_slice$excl$97.$$arity = -2); - - Opal.def(self, '$sort', $Array_sort$98 = function $$sort() { - var $iter = $Array_sort$98.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_sort$98.$$p = null; - - - if ($iter) $Array_sort$98.$$p = null;; - if ($truthy(self.length > 1)) { - } else { - return self - }; - - if (block === nil) { - block = function(a, b) { - return (a)['$<=>'](b); - }; - } - - return self.slice().sort(function(x, y) { - var ret = block(x, y); - - if (ret === nil) { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + ((x).$inspect()) + " with " + ((y).$inspect()) + " failed"); - } - - return $rb_gt(ret, 0) ? 1 : ($rb_lt(ret, 0) ? -1 : 0); - }); - ; - }, $Array_sort$98.$$arity = 0); - - Opal.def(self, '$sort!', $Array_sort$excl$99 = function() { - var $iter = $Array_sort$excl$99.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_sort$excl$99.$$p = null; - - - if ($iter) $Array_sort$excl$99.$$p = null;; - - var result; - - if ((block !== nil)) { - result = $send((self.slice()), 'sort', [], block.$to_proc()); - } - else { - result = (self.slice()).$sort(); - } - - self.length = 0; - for(var i = 0, length = result.length; i < length; i++) { - self.push(result[i]); - } - - return self; - ; - }, $Array_sort$excl$99.$$arity = 0); - - Opal.def(self, '$sort_by!', $Array_sort_by$excl$100 = function() { - var $iter = $Array_sort_by$excl$100.$$p, block = $iter || nil, $$101, self = this; - - if ($iter) $Array_sort_by$excl$100.$$p = null; - - - if ($iter) $Array_sort_by$excl$100.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["sort_by!"], ($$101 = function(){var self = $$101.$$s || this; - - return self.$size()}, $$101.$$s = self, $$101.$$arity = 0, $$101)) - }; - return self.$replace($send(self, 'sort_by', [], block.$to_proc())); - }, $Array_sort_by$excl$100.$$arity = 0); - - Opal.def(self, '$take', $Array_take$102 = function $$take(count) { - var self = this; - - - if (count < 0) { - self.$raise($$($nesting, 'ArgumentError')); - } - - return self.slice(0, count); - - }, $Array_take$102.$$arity = 1); - - Opal.def(self, '$take_while', $Array_take_while$103 = function $$take_while() { - var $iter = $Array_take_while$103.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_take_while$103.$$p = null; - - - if ($iter) $Array_take_while$103.$$p = null;; - - var result = []; - - for (var i = 0, length = self.length, item, value; i < length; i++) { - item = self[i]; - - value = block(item); - - if (value === false || value === nil) { - return result; - } - - result.push(item); - } - - return result; - ; - }, $Array_take_while$103.$$arity = 0); - - Opal.def(self, '$to_a', $Array_to_a$104 = function $$to_a() { - var self = this; - - return self - }, $Array_to_a$104.$$arity = 0); - Opal.alias(self, "to_ary", "to_a"); - - Opal.def(self, '$to_h', $Array_to_h$105 = function $$to_h() { - var self = this; - - - var i, len = self.length, ary, key, val, hash = $hash2([], {}); - - for (i = 0; i < len; i++) { - ary = $$($nesting, 'Opal')['$coerce_to?'](self[i], $$($nesting, 'Array'), "to_ary"); - if (!ary.$$is_array) { - self.$raise($$($nesting, 'TypeError'), "" + "wrong element type " + ((ary).$class()) + " at " + (i) + " (expected array)") - } - if (ary.length !== 2) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong array length at " + (i) + " (expected 2, was " + ((ary).$length()) + ")") - } - key = ary[0]; - val = ary[1]; - Opal.hash_put(hash, key, val); - } - - return hash; - - }, $Array_to_h$105.$$arity = 0); - Opal.alias(self, "to_s", "inspect"); - - Opal.def(self, '$transpose', $Array_transpose$106 = function $$transpose() { - var $$107, self = this, result = nil, max = nil; - - - if ($truthy(self['$empty?']())) { - return []}; - result = []; - max = nil; - $send(self, 'each', [], ($$107 = function(row){var self = $$107.$$s || this, $a, $$108; - - - - if (row == null) { - row = nil; - }; - row = (function() {if ($truthy($$($nesting, 'Array')['$==='](row))) { - return row.$to_a() - } else { - return $$($nesting, 'Opal').$coerce_to(row, $$($nesting, 'Array'), "to_ary").$to_a() - }; return nil; })(); - max = ($truthy($a = max) ? $a : row.length); - if ($truthy((row.length)['$!='](max))) { - self.$raise($$($nesting, 'IndexError'), "" + "element size differs (" + (row.length) + " should be " + (max) + ")")}; - return $send((row.length), 'times', [], ($$108 = function(i){var self = $$108.$$s || this, $b, entry = nil, $writer = nil; - - - - if (i == null) { - i = nil; - }; - entry = ($truthy($b = result['$[]'](i)) ? $b : (($writer = [i, []]), $send(result, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); - return entry['$<<'](row.$at(i));}, $$108.$$s = self, $$108.$$arity = 1, $$108));}, $$107.$$s = self, $$107.$$arity = 1, $$107)); - return result; - }, $Array_transpose$106.$$arity = 0); - - Opal.def(self, '$uniq', $Array_uniq$109 = function $$uniq() { - var $iter = $Array_uniq$109.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_uniq$109.$$p = null; - - - if ($iter) $Array_uniq$109.$$p = null;; - - var hash = $hash2([], {}), i, length, item, key; - - if (block === nil) { - for (i = 0, length = self.length; i < length; i++) { - item = self[i]; - if (Opal.hash_get(hash, item) === undefined) { - Opal.hash_put(hash, item, item); - } - } - } - else { - for (i = 0, length = self.length; i < length; i++) { - item = self[i]; - key = Opal.yield1(block, item); - if (Opal.hash_get(hash, key) === undefined) { - Opal.hash_put(hash, key, item); - } - } - } - - return toArraySubclass((hash).$values(), self.$class()); - ; - }, $Array_uniq$109.$$arity = 0); - - Opal.def(self, '$uniq!', $Array_uniq$excl$110 = function() { - var $iter = $Array_uniq$excl$110.$$p, block = $iter || nil, self = this; - - if ($iter) $Array_uniq$excl$110.$$p = null; - - - if ($iter) $Array_uniq$excl$110.$$p = null;; - - var original_length = self.length, hash = $hash2([], {}), i, length, item, key; - - for (i = 0, length = original_length; i < length; i++) { - item = self[i]; - key = (block === nil ? item : Opal.yield1(block, item)); - - if (Opal.hash_get(hash, key) === undefined) { - Opal.hash_put(hash, key, item); - continue; - } - - self.splice(i, 1); - length--; - i--; - } - - return self.length === original_length ? nil : self; - ; - }, $Array_uniq$excl$110.$$arity = 0); - - Opal.def(self, '$unshift', $Array_unshift$111 = function $$unshift($a) { - var $post_args, objects, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - objects = $post_args;; - - for (var i = objects.length - 1; i >= 0; i--) { - self.unshift(objects[i]); - } - ; - return self; - }, $Array_unshift$111.$$arity = -1); - Opal.alias(self, "prepend", "unshift"); - - Opal.def(self, '$values_at', $Array_values_at$112 = function $$values_at($a) { - var $post_args, args, $$113, self = this, out = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - out = []; - $send(args, 'each', [], ($$113 = function(elem){var self = $$113.$$s || this, $$114, finish = nil, start = nil, i = nil; - - - - if (elem == null) { - elem = nil; - }; - if ($truthy(elem['$is_a?']($$($nesting, 'Range')))) { - - finish = $$($nesting, 'Opal').$coerce_to(elem.$last(), $$($nesting, 'Integer'), "to_int"); - start = $$($nesting, 'Opal').$coerce_to(elem.$first(), $$($nesting, 'Integer'), "to_int"); - - if (start < 0) { - start = start + self.length; - return nil;; - } - ; - - if (finish < 0) { - finish = finish + self.length; - } - if (elem['$exclude_end?']()) { - finish--; - } - if (finish < start) { - return nil;; - } - ; - return $send(start, 'upto', [finish], ($$114 = function(i){var self = $$114.$$s || this; - - - - if (i == null) { - i = nil; - }; - return out['$<<'](self.$at(i));}, $$114.$$s = self, $$114.$$arity = 1, $$114)); - } else { - - i = $$($nesting, 'Opal').$coerce_to(elem, $$($nesting, 'Integer'), "to_int"); - return out['$<<'](self.$at(i)); - };}, $$113.$$s = self, $$113.$$arity = 1, $$113)); - return out; - }, $Array_values_at$112.$$arity = -1); - - Opal.def(self, '$zip', $Array_zip$115 = function $$zip($a) { - var $iter = $Array_zip$115.$$p, block = $iter || nil, $post_args, others, $b, self = this; - - if ($iter) $Array_zip$115.$$p = null; - - - if ($iter) $Array_zip$115.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - others = $post_args;; - - var result = [], size = self.length, part, o, i, j, jj; - - for (j = 0, jj = others.length; j < jj; j++) { - o = others[j]; - if (o.$$is_array) { - continue; - } - if (o.$$is_enumerator) { - if (o.$size() === Infinity) { - others[j] = o.$take(size); - } else { - others[j] = o.$to_a(); - } - continue; - } - others[j] = ($truthy($b = $$($nesting, 'Opal')['$coerce_to?'](o, $$($nesting, 'Array'), "to_ary")) ? $b : $$($nesting, 'Opal')['$coerce_to!'](o, $$($nesting, 'Enumerator'), "each")).$to_a(); - } - - for (i = 0; i < size; i++) { - part = [self[i]]; - - for (j = 0, jj = others.length; j < jj; j++) { - o = others[j][i]; - - if (o == null) { - o = nil; - } - - part[j + 1] = o; - } - - result[i] = part; - } - - if (block !== nil) { - for (i = 0; i < size; i++) { - block(result[i]); - } - - return nil; - } - - return result; - ; - }, $Array_zip$115.$$arity = -1); - Opal.defs(self, '$inherited', $Array_inherited$116 = function $$inherited(klass) { - var self = this; - - - klass.$$prototype.$to_a = function() { - return this.slice(0, this.length); - } - - }, $Array_inherited$116.$$arity = 1); - - Opal.def(self, '$instance_variables', $Array_instance_variables$117 = function $$instance_variables() { - var $$118, $iter = $Array_instance_variables$117.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Array_instance_variables$117.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - return $send($send(self, Opal.find_super_dispatcher(self, 'instance_variables', $Array_instance_variables$117, false), $zuper, $iter), 'reject', [], ($$118 = function(ivar){var self = $$118.$$s || this, $a; - - - - if (ivar == null) { - ivar = nil; - }; - return ($truthy($a = /^@\d+$/.test(ivar)) ? $a : ivar['$==']("@length"));}, $$118.$$s = self, $$118.$$arity = 1, $$118)) - }, $Array_instance_variables$117.$$arity = 0); - $$($nesting, 'Opal').$pristine(self.$singleton_class(), "allocate"); - $$($nesting, 'Opal').$pristine(self, "copy_instance_variables", "initialize_dup"); - return (Opal.def(self, '$pack', $Array_pack$119 = function $$pack($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return self.$raise("To use Array#pack, you must first require 'corelib/array/pack'."); - }, $Array_pack$119.$$arity = -1), nil) && 'pack'; - })($nesting[0], Array, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/hash"] = function(Opal) { - function $rb_ge(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy; - - Opal.add_stubs(['$require', '$include', '$coerce_to?', '$[]', '$merge!', '$allocate', '$raise', '$coerce_to!', '$each', '$fetch', '$>=', '$>', '$==', '$compare_by_identity', '$lambda?', '$abs', '$arity', '$enum_for', '$size', '$respond_to?', '$class', '$dig', '$new', '$inspect', '$map', '$to_proc', '$flatten', '$eql?', '$default', '$dup', '$default_proc', '$default_proc=', '$-', '$default=', '$proc']); - - self.$require("corelib/enumerable"); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Hash'); - - var $nesting = [self].concat($parent_nesting), $Hash_$$$1, $Hash_allocate$2, $Hash_try_convert$3, $Hash_initialize$4, $Hash_$eq_eq$5, $Hash_$gt_eq$6, $Hash_$gt$8, $Hash_$lt$9, $Hash_$lt_eq$10, $Hash_$$$11, $Hash_$$$eq$12, $Hash_assoc$13, $Hash_clear$14, $Hash_clone$15, $Hash_compact$16, $Hash_compact$excl$17, $Hash_compare_by_identity$18, $Hash_compare_by_identity$ques$19, $Hash_default$20, $Hash_default$eq$21, $Hash_default_proc$22, $Hash_default_proc$eq$23, $Hash_delete$24, $Hash_delete_if$25, $Hash_dig$27, $Hash_each$28, $Hash_each_key$30, $Hash_each_value$32, $Hash_empty$ques$34, $Hash_fetch$35, $Hash_fetch_values$36, $Hash_flatten$38, $Hash_has_key$ques$39, $Hash_has_value$ques$40, $Hash_hash$41, $Hash_index$42, $Hash_indexes$43, $Hash_inspect$44, $Hash_invert$45, $Hash_keep_if$46, $Hash_keys$48, $Hash_length$49, $Hash_merge$50, $Hash_merge$excl$51, $Hash_rassoc$52, $Hash_rehash$53, $Hash_reject$54, $Hash_reject$excl$56, $Hash_replace$58, $Hash_select$59, $Hash_select$excl$61, $Hash_shift$63, $Hash_slice$64, $Hash_to_a$65, $Hash_to_h$66, $Hash_to_hash$67, $Hash_to_proc$68, $Hash_transform_keys$70, $Hash_transform_keys$excl$72, $Hash_transform_values$74, $Hash_transform_values$excl$76, $Hash_values$78; - - - self.$include($$($nesting, 'Enumerable')); - self.$$prototype.$$is_hash = true; - Opal.defs(self, '$[]', $Hash_$$$1 = function($a) { - var $post_args, argv, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - argv = $post_args;; - - var hash, argc = argv.length, i; - - if (argc === 1) { - hash = $$($nesting, 'Opal')['$coerce_to?'](argv['$[]'](0), $$($nesting, 'Hash'), "to_hash"); - if (hash !== nil) { - return self.$allocate()['$merge!'](hash); - } - - argv = $$($nesting, 'Opal')['$coerce_to?'](argv['$[]'](0), $$($nesting, 'Array'), "to_ary"); - if (argv === nil) { - self.$raise($$($nesting, 'ArgumentError'), "odd number of arguments for Hash") - } - - argc = argv.length; - hash = self.$allocate(); - - for (i = 0; i < argc; i++) { - if (!argv[i].$$is_array) continue; - switch(argv[i].length) { - case 1: - hash.$store(argv[i][0], nil); - break; - case 2: - hash.$store(argv[i][0], argv[i][1]); - break; - default: - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid number of elements (" + (argv[i].length) + " for 1..2)") - } - } - - return hash; - } - - if (argc % 2 !== 0) { - self.$raise($$($nesting, 'ArgumentError'), "odd number of arguments for Hash") - } - - hash = self.$allocate(); - - for (i = 0; i < argc; i += 2) { - hash.$store(argv[i], argv[i + 1]); - } - - return hash; - ; - }, $Hash_$$$1.$$arity = -1); - Opal.defs(self, '$allocate', $Hash_allocate$2 = function $$allocate() { - var self = this; - - - var hash = new self.$$constructor(); - - Opal.hash_init(hash); - - hash.$$none = nil; - hash.$$proc = nil; - - return hash; - - }, $Hash_allocate$2.$$arity = 0); - Opal.defs(self, '$try_convert', $Hash_try_convert$3 = function $$try_convert(obj) { - var self = this; - - return $$($nesting, 'Opal')['$coerce_to?'](obj, $$($nesting, 'Hash'), "to_hash") - }, $Hash_try_convert$3.$$arity = 1); - - Opal.def(self, '$initialize', $Hash_initialize$4 = function $$initialize(defaults) { - var $iter = $Hash_initialize$4.$$p, block = $iter || nil, self = this; - - if ($iter) $Hash_initialize$4.$$p = null; - - - if ($iter) $Hash_initialize$4.$$p = null;; - ; - - if (defaults !== undefined && block !== nil) { - self.$raise($$($nesting, 'ArgumentError'), "wrong number of arguments (1 for 0)") - } - self.$$none = (defaults === undefined ? nil : defaults); - self.$$proc = block; - - return self; - ; - }, $Hash_initialize$4.$$arity = -1); - - Opal.def(self, '$==', $Hash_$eq_eq$5 = function(other) { - var self = this; - - - if (self === other) { - return true; - } - - if (!other.$$is_hash) { - return false; - } - - if (self.$$keys.length !== other.$$keys.length) { - return false; - } - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, other_value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - other_value = other.$$smap[key]; - } else { - value = key.value; - other_value = Opal.hash_get(other, key.key); - } - - if (other_value === undefined || !value['$eql?'](other_value)) { - return false; - } - } - - return true; - - }, $Hash_$eq_eq$5.$$arity = 1); - - Opal.def(self, '$>=', $Hash_$gt_eq$6 = function(other) { - var $$7, self = this, result = nil; - - - other = $$($nesting, 'Opal')['$coerce_to!'](other, $$($nesting, 'Hash'), "to_hash"); - - if (self.$$keys.length < other.$$keys.length) { - return false - } - ; - result = true; - $send(other, 'each', [], ($$7 = function(other_key, other_val){var self = $$7.$$s || this, val = nil; - - - - if (other_key == null) { - other_key = nil; - }; - - if (other_val == null) { - other_val = nil; - }; - val = self.$fetch(other_key, null); - - if (val == null || val !== other_val) { - result = false; - return; - } - ;}, $$7.$$s = self, $$7.$$arity = 2, $$7)); - return result; - }, $Hash_$gt_eq$6.$$arity = 1); - - Opal.def(self, '$>', $Hash_$gt$8 = function(other) { - var self = this; - - - other = $$($nesting, 'Opal')['$coerce_to!'](other, $$($nesting, 'Hash'), "to_hash"); - - if (self.$$keys.length <= other.$$keys.length) { - return false - } - ; - return $rb_ge(self, other); - }, $Hash_$gt$8.$$arity = 1); - - Opal.def(self, '$<', $Hash_$lt$9 = function(other) { - var self = this; - - - other = $$($nesting, 'Opal')['$coerce_to!'](other, $$($nesting, 'Hash'), "to_hash"); - return $rb_gt(other, self); - }, $Hash_$lt$9.$$arity = 1); - - Opal.def(self, '$<=', $Hash_$lt_eq$10 = function(other) { - var self = this; - - - other = $$($nesting, 'Opal')['$coerce_to!'](other, $$($nesting, 'Hash'), "to_hash"); - return $rb_ge(other, self); - }, $Hash_$lt_eq$10.$$arity = 1); - - Opal.def(self, '$[]', $Hash_$$$11 = function(key) { - var self = this; - - - var value = Opal.hash_get(self, key); - - if (value !== undefined) { - return value; - } - - return self.$default(key); - - }, $Hash_$$$11.$$arity = 1); - - Opal.def(self, '$[]=', $Hash_$$$eq$12 = function(key, value) { - var self = this; - - - Opal.hash_put(self, key, value); - return value; - - }, $Hash_$$$eq$12.$$arity = 2); - - Opal.def(self, '$assoc', $Hash_assoc$13 = function $$assoc(object) { - var self = this; - - - for (var i = 0, keys = self.$$keys, length = keys.length, key; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - if ((key)['$=='](object)) { - return [key, self.$$smap[key]]; - } - } else { - if ((key.key)['$=='](object)) { - return [key.key, key.value]; - } - } - } - - return nil; - - }, $Hash_assoc$13.$$arity = 1); - - Opal.def(self, '$clear', $Hash_clear$14 = function $$clear() { - var self = this; - - - Opal.hash_init(self); - return self; - - }, $Hash_clear$14.$$arity = 0); - - Opal.def(self, '$clone', $Hash_clone$15 = function $$clone() { - var self = this; - - - var hash = new self.$$class(); - - Opal.hash_init(hash); - Opal.hash_clone(self, hash); - - return hash; - - }, $Hash_clone$15.$$arity = 0); - - Opal.def(self, '$compact', $Hash_compact$16 = function $$compact() { - var self = this; - - - var hash = Opal.hash(); - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, obj; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - if (value !== nil) { - Opal.hash_put(hash, key, value); - } - } - - return hash; - - }, $Hash_compact$16.$$arity = 0); - - Opal.def(self, '$compact!', $Hash_compact$excl$17 = function() { - var self = this; - - - var changes_were_made = false; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, obj; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - if (value === nil) { - if (Opal.hash_delete(self, key) !== undefined) { - changes_were_made = true; - length--; - i--; - } - } - } - - return changes_were_made ? self : nil; - - }, $Hash_compact$excl$17.$$arity = 0); - - Opal.def(self, '$compare_by_identity', $Hash_compare_by_identity$18 = function $$compare_by_identity() { - var self = this; - - - var i, ii, key, keys = self.$$keys, identity_hash; - - if (self.$$by_identity) return self; - if (self.$$keys.length === 0) { - self.$$by_identity = true - return self; - } - - identity_hash = $hash2([], {}).$compare_by_identity(); - for(i = 0, ii = keys.length; i < ii; i++) { - key = keys[i]; - if (!key.$$is_string) key = key.key; - Opal.hash_put(identity_hash, key, Opal.hash_get(self, key)); - } - - self.$$by_identity = true; - self.$$map = identity_hash.$$map; - self.$$smap = identity_hash.$$smap; - return self; - - }, $Hash_compare_by_identity$18.$$arity = 0); - - Opal.def(self, '$compare_by_identity?', $Hash_compare_by_identity$ques$19 = function() { - var self = this; - - return self.$$by_identity === true; - }, $Hash_compare_by_identity$ques$19.$$arity = 0); - - Opal.def(self, '$default', $Hash_default$20 = function(key) { - var self = this; - - - ; - - if (key !== undefined && self.$$proc !== nil && self.$$proc !== undefined) { - return self.$$proc.$call(self, key); - } - if (self.$$none === undefined) { - return nil; - } - return self.$$none; - ; - }, $Hash_default$20.$$arity = -1); - - Opal.def(self, '$default=', $Hash_default$eq$21 = function(object) { - var self = this; - - - self.$$proc = nil; - self.$$none = object; - - return object; - - }, $Hash_default$eq$21.$$arity = 1); - - Opal.def(self, '$default_proc', $Hash_default_proc$22 = function $$default_proc() { - var self = this; - - - if (self.$$proc !== undefined) { - return self.$$proc; - } - return nil; - - }, $Hash_default_proc$22.$$arity = 0); - - Opal.def(self, '$default_proc=', $Hash_default_proc$eq$23 = function(default_proc) { - var self = this; - - - var proc = default_proc; - - if (proc !== nil) { - proc = $$($nesting, 'Opal')['$coerce_to!'](proc, $$($nesting, 'Proc'), "to_proc"); - - if ((proc)['$lambda?']() && (proc).$arity().$abs() !== 2) { - self.$raise($$($nesting, 'TypeError'), "default_proc takes two arguments"); - } - } - - self.$$none = nil; - self.$$proc = proc; - - return default_proc; - - }, $Hash_default_proc$eq$23.$$arity = 1); - - Opal.def(self, '$delete', $Hash_delete$24 = function(key) { - var $iter = $Hash_delete$24.$$p, block = $iter || nil, self = this; - - if ($iter) $Hash_delete$24.$$p = null; - - - if ($iter) $Hash_delete$24.$$p = null;; - - var value = Opal.hash_delete(self, key); - - if (value !== undefined) { - return value; - } - - if (block !== nil) { - return Opal.yield1(block, key); - } - - return nil; - ; - }, $Hash_delete$24.$$arity = 1); - - Opal.def(self, '$delete_if', $Hash_delete_if$25 = function $$delete_if() { - var $iter = $Hash_delete_if$25.$$p, block = $iter || nil, $$26, self = this; - - if ($iter) $Hash_delete_if$25.$$p = null; - - - if ($iter) $Hash_delete_if$25.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["delete_if"], ($$26 = function(){var self = $$26.$$s || this; - - return self.$size()}, $$26.$$s = self, $$26.$$arity = 0, $$26)) - }; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, obj; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - obj = block(key, value); - - if (obj !== false && obj !== nil) { - if (Opal.hash_delete(self, key) !== undefined) { - length--; - i--; - } - } - } - - return self; - ; - }, $Hash_delete_if$25.$$arity = 0); - Opal.alias(self, "dup", "clone"); - - Opal.def(self, '$dig', $Hash_dig$27 = function $$dig(key, $a) { - var $post_args, keys, self = this, item = nil; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - keys = $post_args;; - item = self['$[]'](key); - - if (item === nil || keys.length === 0) { - return item; - } - ; - if ($truthy(item['$respond_to?']("dig"))) { - } else { - self.$raise($$($nesting, 'TypeError'), "" + (item.$class()) + " does not have #dig method") - }; - return $send(item, 'dig', Opal.to_a(keys)); - }, $Hash_dig$27.$$arity = -2); - - Opal.def(self, '$each', $Hash_each$28 = function $$each() { - var $iter = $Hash_each$28.$$p, block = $iter || nil, $$29, self = this; - - if ($iter) $Hash_each$28.$$p = null; - - - if ($iter) $Hash_each$28.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["each"], ($$29 = function(){var self = $$29.$$s || this; - - return self.$size()}, $$29.$$s = self, $$29.$$arity = 0, $$29)) - }; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - Opal.yield1(block, [key, value]); - } - - return self; - ; - }, $Hash_each$28.$$arity = 0); - - Opal.def(self, '$each_key', $Hash_each_key$30 = function $$each_key() { - var $iter = $Hash_each_key$30.$$p, block = $iter || nil, $$31, self = this; - - if ($iter) $Hash_each_key$30.$$p = null; - - - if ($iter) $Hash_each_key$30.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["each_key"], ($$31 = function(){var self = $$31.$$s || this; - - return self.$size()}, $$31.$$s = self, $$31.$$arity = 0, $$31)) - }; - - for (var i = 0, keys = self.$$keys, length = keys.length, key; i < length; i++) { - key = keys[i]; - - block(key.$$is_string ? key : key.key); - } - - return self; - ; - }, $Hash_each_key$30.$$arity = 0); - Opal.alias(self, "each_pair", "each"); - - Opal.def(self, '$each_value', $Hash_each_value$32 = function $$each_value() { - var $iter = $Hash_each_value$32.$$p, block = $iter || nil, $$33, self = this; - - if ($iter) $Hash_each_value$32.$$p = null; - - - if ($iter) $Hash_each_value$32.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["each_value"], ($$33 = function(){var self = $$33.$$s || this; - - return self.$size()}, $$33.$$s = self, $$33.$$arity = 0, $$33)) - }; - - for (var i = 0, keys = self.$$keys, length = keys.length, key; i < length; i++) { - key = keys[i]; - - block(key.$$is_string ? self.$$smap[key] : key.value); - } - - return self; - ; - }, $Hash_each_value$32.$$arity = 0); - - Opal.def(self, '$empty?', $Hash_empty$ques$34 = function() { - var self = this; - - return self.$$keys.length === 0; - }, $Hash_empty$ques$34.$$arity = 0); - Opal.alias(self, "eql?", "=="); - - Opal.def(self, '$fetch', $Hash_fetch$35 = function $$fetch(key, defaults) { - var $iter = $Hash_fetch$35.$$p, block = $iter || nil, self = this; - - if ($iter) $Hash_fetch$35.$$p = null; - - - if ($iter) $Hash_fetch$35.$$p = null;; - ; - - var value = Opal.hash_get(self, key); - - if (value !== undefined) { - return value; - } - - if (block !== nil) { - return block(key); - } - - if (defaults !== undefined) { - return defaults; - } - ; - return self.$raise($$($nesting, 'KeyError').$new("" + "key not found: " + (key.$inspect()), $hash2(["key", "receiver"], {"key": key, "receiver": self}))); - }, $Hash_fetch$35.$$arity = -2); - - Opal.def(self, '$fetch_values', $Hash_fetch_values$36 = function $$fetch_values($a) { - var $iter = $Hash_fetch_values$36.$$p, block = $iter || nil, $post_args, keys, $$37, self = this; - - if ($iter) $Hash_fetch_values$36.$$p = null; - - - if ($iter) $Hash_fetch_values$36.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - keys = $post_args;; - return $send(keys, 'map', [], ($$37 = function(key){var self = $$37.$$s || this; - - - - if (key == null) { - key = nil; - }; - return $send(self, 'fetch', [key], block.$to_proc());}, $$37.$$s = self, $$37.$$arity = 1, $$37)); - }, $Hash_fetch_values$36.$$arity = -1); - - Opal.def(self, '$flatten', $Hash_flatten$38 = function $$flatten(level) { - var self = this; - - - - if (level == null) { - level = 1; - }; - level = $$($nesting, 'Opal')['$coerce_to!'](level, $$($nesting, 'Integer'), "to_int"); - - var result = []; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - result.push(key); - - if (value.$$is_array) { - if (level === 1) { - result.push(value); - continue; - } - - result = result.concat((value).$flatten(level - 2)); - continue; - } - - result.push(value); - } - - return result; - ; - }, $Hash_flatten$38.$$arity = -1); - - Opal.def(self, '$has_key?', $Hash_has_key$ques$39 = function(key) { - var self = this; - - return Opal.hash_get(self, key) !== undefined; - }, $Hash_has_key$ques$39.$$arity = 1); - - Opal.def(self, '$has_value?', $Hash_has_value$ques$40 = function(value) { - var self = this; - - - for (var i = 0, keys = self.$$keys, length = keys.length, key; i < length; i++) { - key = keys[i]; - - if (((key.$$is_string ? self.$$smap[key] : key.value))['$=='](value)) { - return true; - } - } - - return false; - - }, $Hash_has_value$ques$40.$$arity = 1); - - Opal.def(self, '$hash', $Hash_hash$41 = function $$hash() { - var self = this; - - - var top = (Opal.hash_ids === undefined), - hash_id = self.$object_id(), - result = ['Hash'], - key, item; - - try { - if (top) { - Opal.hash_ids = Object.create(null); - } - - if (Opal[hash_id]) { - return 'self'; - } - - for (key in Opal.hash_ids) { - item = Opal.hash_ids[key]; - if (self['$eql?'](item)) { - return 'self'; - } - } - - Opal.hash_ids[hash_id] = self; - - for (var i = 0, keys = self.$$keys, length = keys.length; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - result.push([key, self.$$smap[key].$hash()]); - } else { - result.push([key.key_hash, key.value.$hash()]); - } - } - - return result.sort().join(); - - } finally { - if (top) { - Opal.hash_ids = undefined; - } - } - - }, $Hash_hash$41.$$arity = 0); - Opal.alias(self, "include?", "has_key?"); - - Opal.def(self, '$index', $Hash_index$42 = function $$index(object) { - var self = this; - - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - if ((value)['$=='](object)) { - return key; - } - } - - return nil; - - }, $Hash_index$42.$$arity = 1); - - Opal.def(self, '$indexes', $Hash_indexes$43 = function $$indexes($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - var result = []; - - for (var i = 0, length = args.length, key, value; i < length; i++) { - key = args[i]; - value = Opal.hash_get(self, key); - - if (value === undefined) { - result.push(self.$default()); - continue; - } - - result.push(value); - } - - return result; - ; - }, $Hash_indexes$43.$$arity = -1); - Opal.alias(self, "indices", "indexes"); - var inspect_ids; - - Opal.def(self, '$inspect', $Hash_inspect$44 = function $$inspect() { - var self = this; - - - var top = (inspect_ids === undefined), - hash_id = self.$object_id(), - result = []; - - try { - if (top) { - inspect_ids = {}; - } - - if (inspect_ids.hasOwnProperty(hash_id)) { - return '{...}'; - } - - inspect_ids[hash_id] = true; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - result.push(key.$inspect() + '=>' + value.$inspect()); - } - - return '{' + result.join(', ') + '}'; - - } finally { - if (top) { - inspect_ids = undefined; - } - } - - }, $Hash_inspect$44.$$arity = 0); - - Opal.def(self, '$invert', $Hash_invert$45 = function $$invert() { - var self = this; - - - var hash = Opal.hash(); - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - Opal.hash_put(hash, value, key); - } - - return hash; - - }, $Hash_invert$45.$$arity = 0); - - Opal.def(self, '$keep_if', $Hash_keep_if$46 = function $$keep_if() { - var $iter = $Hash_keep_if$46.$$p, block = $iter || nil, $$47, self = this; - - if ($iter) $Hash_keep_if$46.$$p = null; - - - if ($iter) $Hash_keep_if$46.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["keep_if"], ($$47 = function(){var self = $$47.$$s || this; - - return self.$size()}, $$47.$$s = self, $$47.$$arity = 0, $$47)) - }; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, obj; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - obj = block(key, value); - - if (obj === false || obj === nil) { - if (Opal.hash_delete(self, key) !== undefined) { - length--; - i--; - } - } - } - - return self; - ; - }, $Hash_keep_if$46.$$arity = 0); - Opal.alias(self, "key", "index"); - Opal.alias(self, "key?", "has_key?"); - - Opal.def(self, '$keys', $Hash_keys$48 = function $$keys() { - var self = this; - - - var result = []; - - for (var i = 0, keys = self.$$keys, length = keys.length, key; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - result.push(key); - } else { - result.push(key.key); - } - } - - return result; - - }, $Hash_keys$48.$$arity = 0); - - Opal.def(self, '$length', $Hash_length$49 = function $$length() { - var self = this; - - return self.$$keys.length; - }, $Hash_length$49.$$arity = 0); - Opal.alias(self, "member?", "has_key?"); - - Opal.def(self, '$merge', $Hash_merge$50 = function $$merge(other) { - var $iter = $Hash_merge$50.$$p, block = $iter || nil, self = this; - - if ($iter) $Hash_merge$50.$$p = null; - - - if ($iter) $Hash_merge$50.$$p = null;; - return $send(self.$dup(), 'merge!', [other], block.$to_proc()); - }, $Hash_merge$50.$$arity = 1); - - Opal.def(self, '$merge!', $Hash_merge$excl$51 = function(other) { - var $iter = $Hash_merge$excl$51.$$p, block = $iter || nil, self = this; - - if ($iter) $Hash_merge$excl$51.$$p = null; - - - if ($iter) $Hash_merge$excl$51.$$p = null;; - - if (!other.$$is_hash) { - other = $$($nesting, 'Opal')['$coerce_to!'](other, $$($nesting, 'Hash'), "to_hash"); - } - - var i, other_keys = other.$$keys, length = other_keys.length, key, value, other_value; - - if (block === nil) { - for (i = 0; i < length; i++) { - key = other_keys[i]; - - if (key.$$is_string) { - other_value = other.$$smap[key]; - } else { - other_value = key.value; - key = key.key; - } - - Opal.hash_put(self, key, other_value); - } - - return self; - } - - for (i = 0; i < length; i++) { - key = other_keys[i]; - - if (key.$$is_string) { - other_value = other.$$smap[key]; - } else { - other_value = key.value; - key = key.key; - } - - value = Opal.hash_get(self, key); - - if (value === undefined) { - Opal.hash_put(self, key, other_value); - continue; - } - - Opal.hash_put(self, key, block(key, value, other_value)); - } - - return self; - ; - }, $Hash_merge$excl$51.$$arity = 1); - - Opal.def(self, '$rassoc', $Hash_rassoc$52 = function $$rassoc(object) { - var self = this; - - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - if ((value)['$=='](object)) { - return [key, value]; - } - } - - return nil; - - }, $Hash_rassoc$52.$$arity = 1); - - Opal.def(self, '$rehash', $Hash_rehash$53 = function $$rehash() { - var self = this; - - - Opal.hash_rehash(self); - return self; - - }, $Hash_rehash$53.$$arity = 0); - - Opal.def(self, '$reject', $Hash_reject$54 = function $$reject() { - var $iter = $Hash_reject$54.$$p, block = $iter || nil, $$55, self = this; - - if ($iter) $Hash_reject$54.$$p = null; - - - if ($iter) $Hash_reject$54.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["reject"], ($$55 = function(){var self = $$55.$$s || this; - - return self.$size()}, $$55.$$s = self, $$55.$$arity = 0, $$55)) - }; - - var hash = Opal.hash(); - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, obj; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - obj = block(key, value); - - if (obj === false || obj === nil) { - Opal.hash_put(hash, key, value); - } - } - - return hash; - ; - }, $Hash_reject$54.$$arity = 0); - - Opal.def(self, '$reject!', $Hash_reject$excl$56 = function() { - var $iter = $Hash_reject$excl$56.$$p, block = $iter || nil, $$57, self = this; - - if ($iter) $Hash_reject$excl$56.$$p = null; - - - if ($iter) $Hash_reject$excl$56.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["reject!"], ($$57 = function(){var self = $$57.$$s || this; - - return self.$size()}, $$57.$$s = self, $$57.$$arity = 0, $$57)) - }; - - var changes_were_made = false; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, obj; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - obj = block(key, value); - - if (obj !== false && obj !== nil) { - if (Opal.hash_delete(self, key) !== undefined) { - changes_were_made = true; - length--; - i--; - } - } - } - - return changes_were_made ? self : nil; - ; - }, $Hash_reject$excl$56.$$arity = 0); - - Opal.def(self, '$replace', $Hash_replace$58 = function $$replace(other) { - var self = this, $writer = nil; - - - other = $$($nesting, 'Opal')['$coerce_to!'](other, $$($nesting, 'Hash'), "to_hash"); - - Opal.hash_init(self); - - for (var i = 0, other_keys = other.$$keys, length = other_keys.length, key, value, other_value; i < length; i++) { - key = other_keys[i]; - - if (key.$$is_string) { - other_value = other.$$smap[key]; - } else { - other_value = key.value; - key = key.key; - } - - Opal.hash_put(self, key, other_value); - } - ; - if ($truthy(other.$default_proc())) { - - $writer = [other.$default_proc()]; - $send(self, 'default_proc=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - } else { - - $writer = [other.$default()]; - $send(self, 'default=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)]; - }; - return self; - }, $Hash_replace$58.$$arity = 1); - - Opal.def(self, '$select', $Hash_select$59 = function $$select() { - var $iter = $Hash_select$59.$$p, block = $iter || nil, $$60, self = this; - - if ($iter) $Hash_select$59.$$p = null; - - - if ($iter) $Hash_select$59.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["select"], ($$60 = function(){var self = $$60.$$s || this; - - return self.$size()}, $$60.$$s = self, $$60.$$arity = 0, $$60)) - }; - - var hash = Opal.hash(); - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, obj; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - obj = block(key, value); - - if (obj !== false && obj !== nil) { - Opal.hash_put(hash, key, value); - } - } - - return hash; - ; - }, $Hash_select$59.$$arity = 0); - - Opal.def(self, '$select!', $Hash_select$excl$61 = function() { - var $iter = $Hash_select$excl$61.$$p, block = $iter || nil, $$62, self = this; - - if ($iter) $Hash_select$excl$61.$$p = null; - - - if ($iter) $Hash_select$excl$61.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["select!"], ($$62 = function(){var self = $$62.$$s || this; - - return self.$size()}, $$62.$$s = self, $$62.$$arity = 0, $$62)) - }; - - var result = nil; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value, obj; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - obj = block(key, value); - - if (obj === false || obj === nil) { - if (Opal.hash_delete(self, key) !== undefined) { - length--; - i--; - } - result = self; - } - } - - return result; - ; - }, $Hash_select$excl$61.$$arity = 0); - - Opal.def(self, '$shift', $Hash_shift$63 = function $$shift() { - var self = this; - - - var keys = self.$$keys, - key; - - if (keys.length > 0) { - key = keys[0]; - - key = key.$$is_string ? key : key.key; - - return [key, Opal.hash_delete(self, key)]; - } - - return self.$default(nil); - - }, $Hash_shift$63.$$arity = 0); - Opal.alias(self, "size", "length"); - - Opal.def(self, '$slice', $Hash_slice$64 = function $$slice($a) { - var $post_args, keys, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - keys = $post_args;; - - var result = Opal.hash(); - - for (var i = 0, length = keys.length; i < length; i++) { - var key = keys[i], value = Opal.hash_get(self, key); - - if (value !== undefined) { - Opal.hash_put(result, key, value); - } - } - - return result; - ; - }, $Hash_slice$64.$$arity = -1); - Opal.alias(self, "store", "[]="); - - Opal.def(self, '$to_a', $Hash_to_a$65 = function $$to_a() { - var self = this; - - - var result = []; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - result.push([key, value]); - } - - return result; - - }, $Hash_to_a$65.$$arity = 0); - - Opal.def(self, '$to_h', $Hash_to_h$66 = function $$to_h() { - var self = this; - - - if (self.$$class === Opal.Hash) { - return self; - } - - var hash = new Opal.Hash(); - - Opal.hash_init(hash); - Opal.hash_clone(self, hash); - - return hash; - - }, $Hash_to_h$66.$$arity = 0); - - Opal.def(self, '$to_hash', $Hash_to_hash$67 = function $$to_hash() { - var self = this; - - return self - }, $Hash_to_hash$67.$$arity = 0); - - Opal.def(self, '$to_proc', $Hash_to_proc$68 = function $$to_proc() { - var $$69, self = this; - - return $send(self, 'proc', [], ($$69 = function(key){var self = $$69.$$s || this; - - - ; - - if (key == null) { - self.$raise($$($nesting, 'ArgumentError'), "no key given") - } - ; - return self['$[]'](key);}, $$69.$$s = self, $$69.$$arity = -1, $$69)) - }, $Hash_to_proc$68.$$arity = 0); - Opal.alias(self, "to_s", "inspect"); - - Opal.def(self, '$transform_keys', $Hash_transform_keys$70 = function $$transform_keys() { - var $iter = $Hash_transform_keys$70.$$p, block = $iter || nil, $$71, self = this; - - if ($iter) $Hash_transform_keys$70.$$p = null; - - - if ($iter) $Hash_transform_keys$70.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["transform_keys"], ($$71 = function(){var self = $$71.$$s || this; - - return self.$size()}, $$71.$$s = self, $$71.$$arity = 0, $$71)) - }; - - var result = Opal.hash(); - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - key = Opal.yield1(block, key); - - Opal.hash_put(result, key, value); - } - - return result; - ; - }, $Hash_transform_keys$70.$$arity = 0); - - Opal.def(self, '$transform_keys!', $Hash_transform_keys$excl$72 = function() { - var $iter = $Hash_transform_keys$excl$72.$$p, block = $iter || nil, $$73, self = this; - - if ($iter) $Hash_transform_keys$excl$72.$$p = null; - - - if ($iter) $Hash_transform_keys$excl$72.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["transform_keys!"], ($$73 = function(){var self = $$73.$$s || this; - - return self.$size()}, $$73.$$s = self, $$73.$$arity = 0, $$73)) - }; - - var keys = Opal.slice.call(self.$$keys), - i, length = keys.length, key, value, new_key; - - for (i = 0; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - new_key = Opal.yield1(block, key); - - Opal.hash_delete(self, key); - Opal.hash_put(self, new_key, value); - } - - return self; - ; - }, $Hash_transform_keys$excl$72.$$arity = 0); - - Opal.def(self, '$transform_values', $Hash_transform_values$74 = function $$transform_values() { - var $iter = $Hash_transform_values$74.$$p, block = $iter || nil, $$75, self = this; - - if ($iter) $Hash_transform_values$74.$$p = null; - - - if ($iter) $Hash_transform_values$74.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["transform_values"], ($$75 = function(){var self = $$75.$$s || this; - - return self.$size()}, $$75.$$s = self, $$75.$$arity = 0, $$75)) - }; - - var result = Opal.hash(); - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - value = Opal.yield1(block, value); - - Opal.hash_put(result, key, value); - } - - return result; - ; - }, $Hash_transform_values$74.$$arity = 0); - - Opal.def(self, '$transform_values!', $Hash_transform_values$excl$76 = function() { - var $iter = $Hash_transform_values$excl$76.$$p, block = $iter || nil, $$77, self = this; - - if ($iter) $Hash_transform_values$excl$76.$$p = null; - - - if ($iter) $Hash_transform_values$excl$76.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["transform_values!"], ($$77 = function(){var self = $$77.$$s || this; - - return self.$size()}, $$77.$$s = self, $$77.$$arity = 0, $$77)) - }; - - for (var i = 0, keys = self.$$keys, length = keys.length, key, value; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - value = self.$$smap[key]; - } else { - value = key.value; - key = key.key; - } - - value = Opal.yield1(block, value); - - Opal.hash_put(self, key, value); - } - - return self; - ; - }, $Hash_transform_values$excl$76.$$arity = 0); - Opal.alias(self, "update", "merge!"); - Opal.alias(self, "value?", "has_value?"); - Opal.alias(self, "values_at", "indexes"); - return (Opal.def(self, '$values', $Hash_values$78 = function $$values() { - var self = this; - - - var result = []; - - for (var i = 0, keys = self.$$keys, length = keys.length, key; i < length; i++) { - key = keys[i]; - - if (key.$$is_string) { - result.push(self.$$smap[key]); - } else { - result.push(key.value); - } - } - - return result; - - }, $Hash_values$78.$$arity = 0), nil) && 'values'; - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/number"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_divide(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs / rhs : lhs['$/'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - function $rb_le(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); - } - function $rb_ge(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send, $hash2 = Opal.hash2; - - Opal.add_stubs(['$require', '$bridge', '$raise', '$name', '$class', '$Float', '$respond_to?', '$coerce_to!', '$__coerced__', '$===', '$!', '$>', '$**', '$new', '$<', '$to_f', '$==', '$nan?', '$infinite?', '$enum_for', '$+', '$-', '$gcd', '$lcm', '$%', '$/', '$frexp', '$to_i', '$ldexp', '$rationalize', '$*', '$<<', '$to_r', '$truncate', '$-@', '$size', '$<=', '$>=', '$<=>', '$compare', '$any?']); - - self.$require("corelib/numeric"); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Number'); - - var $nesting = [self].concat($parent_nesting), $Number_coerce$2, $Number___id__$3, $Number_$plus$4, $Number_$minus$5, $Number_$$6, $Number_$slash$7, $Number_$percent$8, $Number_$$9, $Number_$$10, $Number_$$11, $Number_$lt$12, $Number_$lt_eq$13, $Number_$gt$14, $Number_$gt_eq$15, $Number_$lt_eq_gt$16, $Number_$lt$lt$17, $Number_$gt$gt$18, $Number_$$$19, $Number_$plus$$20, $Number_$minus$$21, $Number_$$22, $Number_$$$23, $Number_$eq_eq_eq$24, $Number_$eq_eq$25, $Number_abs$26, $Number_abs2$27, $Number_allbits$ques$28, $Number_anybits$ques$29, $Number_angle$30, $Number_bit_length$31, $Number_ceil$32, $Number_chr$33, $Number_denominator$34, $Number_downto$35, $Number_equal$ques$37, $Number_even$ques$38, $Number_floor$39, $Number_gcd$40, $Number_gcdlcm$41, $Number_integer$ques$42, $Number_is_a$ques$43, $Number_instance_of$ques$44, $Number_lcm$45, $Number_next$46, $Number_nobits$ques$47, $Number_nonzero$ques$48, $Number_numerator$49, $Number_odd$ques$50, $Number_ord$51, $Number_pow$52, $Number_pred$53, $Number_quo$54, $Number_rationalize$55, $Number_remainder$56, $Number_round$57, $Number_step$58, $Number_times$60, $Number_to_f$62, $Number_to_i$63, $Number_to_r$64, $Number_to_s$65, $Number_truncate$66, $Number_digits$67, $Number_divmod$68, $Number_upto$69, $Number_zero$ques$71, $Number_size$72, $Number_nan$ques$73, $Number_finite$ques$74, $Number_infinite$ques$75, $Number_positive$ques$76, $Number_negative$ques$77; - - - $$($nesting, 'Opal').$bridge(Number, self); - Opal.defineProperty(self.$$prototype, '$$is_number', true); - self.$$is_number_class = true; - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $allocate$1; - - - - Opal.def(self, '$allocate', $allocate$1 = function $$allocate() { - var self = this; - - return self.$raise($$($nesting, 'TypeError'), "" + "allocator undefined for " + (self.$name())) - }, $allocate$1.$$arity = 0); - - - Opal.udef(self, '$' + "new");; - return nil;; - })(Opal.get_singleton_class(self), $nesting); - - Opal.def(self, '$coerce', $Number_coerce$2 = function $$coerce(other) { - var self = this; - - - if (other === nil) { - self.$raise($$($nesting, 'TypeError'), "" + "can't convert " + (other.$class()) + " into Float"); - } - else if (other.$$is_string) { - return [self.$Float(other), self]; - } - else if (other['$respond_to?']("to_f")) { - return [$$($nesting, 'Opal')['$coerce_to!'](other, $$($nesting, 'Float'), "to_f"), self]; - } - else if (other.$$is_number) { - return [other, self]; - } - else { - self.$raise($$($nesting, 'TypeError'), "" + "can't convert " + (other.$class()) + " into Float"); - } - - }, $Number_coerce$2.$$arity = 1); - - Opal.def(self, '$__id__', $Number___id__$3 = function $$__id__() { - var self = this; - - return (self * 2) + 1; - }, $Number___id__$3.$$arity = 0); - Opal.alias(self, "object_id", "__id__"); - - Opal.def(self, '$+', $Number_$plus$4 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self + other; - } - else { - return self.$__coerced__("+", other); - } - - }, $Number_$plus$4.$$arity = 1); - - Opal.def(self, '$-', $Number_$minus$5 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self - other; - } - else { - return self.$__coerced__("-", other); - } - - }, $Number_$minus$5.$$arity = 1); - - Opal.def(self, '$*', $Number_$$6 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self * other; - } - else { - return self.$__coerced__("*", other); - } - - }, $Number_$$6.$$arity = 1); - - Opal.def(self, '$/', $Number_$slash$7 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self / other; - } - else { - return self.$__coerced__("/", other); - } - - }, $Number_$slash$7.$$arity = 1); - Opal.alias(self, "fdiv", "/"); - - Opal.def(self, '$%', $Number_$percent$8 = function(other) { - var self = this; - - - if (other.$$is_number) { - if (other == -Infinity) { - return other; - } - else if (other == 0) { - self.$raise($$($nesting, 'ZeroDivisionError'), "divided by 0"); - } - else if (other < 0 || self < 0) { - return (self % other + other) % other; - } - else { - return self % other; - } - } - else { - return self.$__coerced__("%", other); - } - - }, $Number_$percent$8.$$arity = 1); - - Opal.def(self, '$&', $Number_$$9 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self & other; - } - else { - return self.$__coerced__("&", other); - } - - }, $Number_$$9.$$arity = 1); - - Opal.def(self, '$|', $Number_$$10 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self | other; - } - else { - return self.$__coerced__("|", other); - } - - }, $Number_$$10.$$arity = 1); - - Opal.def(self, '$^', $Number_$$11 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self ^ other; - } - else { - return self.$__coerced__("^", other); - } - - }, $Number_$$11.$$arity = 1); - - Opal.def(self, '$<', $Number_$lt$12 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self < other; - } - else { - return self.$__coerced__("<", other); - } - - }, $Number_$lt$12.$$arity = 1); - - Opal.def(self, '$<=', $Number_$lt_eq$13 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self <= other; - } - else { - return self.$__coerced__("<=", other); - } - - }, $Number_$lt_eq$13.$$arity = 1); - - Opal.def(self, '$>', $Number_$gt$14 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self > other; - } - else { - return self.$__coerced__(">", other); - } - - }, $Number_$gt$14.$$arity = 1); - - Opal.def(self, '$>=', $Number_$gt_eq$15 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self >= other; - } - else { - return self.$__coerced__(">=", other); - } - - }, $Number_$gt_eq$15.$$arity = 1); - - var spaceship_operator = function(self, other) { - if (other.$$is_number) { - if (isNaN(self) || isNaN(other)) { - return nil; - } - - if (self > other) { - return 1; - } else if (self < other) { - return -1; - } else { - return 0; - } - } - else { - return self.$__coerced__("<=>", other); - } - } - ; - - Opal.def(self, '$<=>', $Number_$lt_eq_gt$16 = function(other) { - var self = this; - - try { - return spaceship_operator(self, other); - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'ArgumentError')])) { - try { - return nil - } finally { Opal.pop_exception() } - } else { throw $err; } - } - }, $Number_$lt_eq_gt$16.$$arity = 1); - - Opal.def(self, '$<<', $Number_$lt$lt$17 = function(count) { - var self = this; - - - count = $$($nesting, 'Opal')['$coerce_to!'](count, $$($nesting, 'Integer'), "to_int"); - return count > 0 ? self << count : self >> -count; - }, $Number_$lt$lt$17.$$arity = 1); - - Opal.def(self, '$>>', $Number_$gt$gt$18 = function(count) { - var self = this; - - - count = $$($nesting, 'Opal')['$coerce_to!'](count, $$($nesting, 'Integer'), "to_int"); - return count > 0 ? self >> count : self << -count; - }, $Number_$gt$gt$18.$$arity = 1); - - Opal.def(self, '$[]', $Number_$$$19 = function(bit) { - var self = this; - - - bit = $$($nesting, 'Opal')['$coerce_to!'](bit, $$($nesting, 'Integer'), "to_int"); - - if (bit < 0) { - return 0; - } - if (bit >= 32) { - return self < 0 ? 1 : 0; - } - return (self >> bit) & 1; - ; - }, $Number_$$$19.$$arity = 1); - - Opal.def(self, '$+@', $Number_$plus$$20 = function() { - var self = this; - - return +self; - }, $Number_$plus$$20.$$arity = 0); - - Opal.def(self, '$-@', $Number_$minus$$21 = function() { - var self = this; - - return -self; - }, $Number_$minus$$21.$$arity = 0); - - Opal.def(self, '$~', $Number_$$22 = function() { - var self = this; - - return ~self; - }, $Number_$$22.$$arity = 0); - - Opal.def(self, '$**', $Number_$$$23 = function(other) { - var $a, $b, self = this; - - if ($truthy($$($nesting, 'Integer')['$==='](other))) { - if ($truthy(($truthy($a = $$($nesting, 'Integer')['$==='](self)['$!']()) ? $a : $rb_gt(other, 0)))) { - return Math.pow(self, other); - } else { - return $$($nesting, 'Rational').$new(self, 1)['$**'](other) - } - } else if ($truthy((($a = $rb_lt(self, 0)) ? ($truthy($b = $$($nesting, 'Float')['$==='](other)) ? $b : $$($nesting, 'Rational')['$==='](other)) : $rb_lt(self, 0)))) { - return $$($nesting, 'Complex').$new(self, 0)['$**'](other.$to_f()) - } else if ($truthy(other.$$is_number != null)) { - return Math.pow(self, other); - } else { - return self.$__coerced__("**", other) - } - }, $Number_$$$23.$$arity = 1); - - Opal.def(self, '$===', $Number_$eq_eq_eq$24 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self.valueOf() === other.valueOf(); - } - else if (other['$respond_to?']("==")) { - return other['$=='](self); - } - else { - return false; - } - - }, $Number_$eq_eq_eq$24.$$arity = 1); - - Opal.def(self, '$==', $Number_$eq_eq$25 = function(other) { - var self = this; - - - if (other.$$is_number) { - return self.valueOf() === other.valueOf(); - } - else if (other['$respond_to?']("==")) { - return other['$=='](self); - } - else { - return false; - } - - }, $Number_$eq_eq$25.$$arity = 1); - - Opal.def(self, '$abs', $Number_abs$26 = function $$abs() { - var self = this; - - return Math.abs(self); - }, $Number_abs$26.$$arity = 0); - - Opal.def(self, '$abs2', $Number_abs2$27 = function $$abs2() { - var self = this; - - return Math.abs(self * self); - }, $Number_abs2$27.$$arity = 0); - - Opal.def(self, '$allbits?', $Number_allbits$ques$28 = function(mask) { - var self = this; - - - mask = $$($nesting, 'Opal')['$coerce_to!'](mask, $$($nesting, 'Integer'), "to_int"); - return (self & mask) == mask;; - }, $Number_allbits$ques$28.$$arity = 1); - - Opal.def(self, '$anybits?', $Number_anybits$ques$29 = function(mask) { - var self = this; - - - mask = $$($nesting, 'Opal')['$coerce_to!'](mask, $$($nesting, 'Integer'), "to_int"); - return (self & mask) !== 0;; - }, $Number_anybits$ques$29.$$arity = 1); - - Opal.def(self, '$angle', $Number_angle$30 = function $$angle() { - var self = this; - - - if ($truthy(self['$nan?']())) { - return self}; - - if (self == 0) { - if (1 / self > 0) { - return 0; - } - else { - return Math.PI; - } - } - else if (self < 0) { - return Math.PI; - } - else { - return 0; - } - ; - }, $Number_angle$30.$$arity = 0); - Opal.alias(self, "arg", "angle"); - Opal.alias(self, "phase", "angle"); - - Opal.def(self, '$bit_length', $Number_bit_length$31 = function $$bit_length() { - var self = this; - - - if ($truthy($$($nesting, 'Integer')['$==='](self))) { - } else { - self.$raise($$($nesting, 'NoMethodError').$new("" + "undefined method `bit_length` for " + (self) + ":Float", "bit_length")) - }; - - if (self === 0 || self === -1) { - return 0; - } - - var result = 0, - value = self < 0 ? ~self : self; - - while (value != 0) { - result += 1; - value >>>= 1; - } - - return result; - ; - }, $Number_bit_length$31.$$arity = 0); - - Opal.def(self, '$ceil', $Number_ceil$32 = function $$ceil(ndigits) { - var self = this; - - - - if (ndigits == null) { - ndigits = 0; - }; - - var f = self.$to_f(); - - if (f % 1 === 0 && ndigits >= 0) { - return f; - } - - var factor = Math.pow(10, ndigits), - result = Math.ceil(f * factor) / factor; - - if (f % 1 === 0) { - result = Math.round(result); - } - - return result; - ; - }, $Number_ceil$32.$$arity = -1); - - Opal.def(self, '$chr', $Number_chr$33 = function $$chr(encoding) { - var self = this; - - - ; - return String.fromCharCode(self);; - }, $Number_chr$33.$$arity = -1); - - Opal.def(self, '$denominator', $Number_denominator$34 = function $$denominator() { - var $a, $iter = $Number_denominator$34.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Number_denominator$34.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if ($truthy(($truthy($a = self['$nan?']()) ? $a : self['$infinite?']()))) { - return 1 - } else { - return $send(self, Opal.find_super_dispatcher(self, 'denominator', $Number_denominator$34, false), $zuper, $iter) - } - }, $Number_denominator$34.$$arity = 0); - - Opal.def(self, '$downto', $Number_downto$35 = function $$downto(stop) { - var $iter = $Number_downto$35.$$p, block = $iter || nil, $$36, self = this; - - if ($iter) $Number_downto$35.$$p = null; - - - if ($iter) $Number_downto$35.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["downto", stop], ($$36 = function(){var self = $$36.$$s || this; - - - if ($truthy($$($nesting, 'Numeric')['$==='](stop))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (stop.$class()) + " failed") - }; - if ($truthy($rb_gt(stop, self))) { - return 0 - } else { - return $rb_plus($rb_minus(self, stop), 1) - };}, $$36.$$s = self, $$36.$$arity = 0, $$36)) - }; - - if (!stop.$$is_number) { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (stop.$class()) + " failed") - } - for (var i = self; i >= stop; i--) { - block(i); - } - ; - return self; - }, $Number_downto$35.$$arity = 1); - Opal.alias(self, "eql?", "=="); - - Opal.def(self, '$equal?', $Number_equal$ques$37 = function(other) { - var $a, self = this; - - return ($truthy($a = self['$=='](other)) ? $a : isNaN(self) && isNaN(other)) - }, $Number_equal$ques$37.$$arity = 1); - - Opal.def(self, '$even?', $Number_even$ques$38 = function() { - var self = this; - - return self % 2 === 0; - }, $Number_even$ques$38.$$arity = 0); - - Opal.def(self, '$floor', $Number_floor$39 = function $$floor(ndigits) { - var self = this; - - - - if (ndigits == null) { - ndigits = 0; - }; - - var f = self.$to_f(); - - if (f % 1 === 0 && ndigits >= 0) { - return f; - } - - var factor = Math.pow(10, ndigits), - result = Math.floor(f * factor) / factor; - - if (f % 1 === 0) { - result = Math.round(result); - } - - return result; - ; - }, $Number_floor$39.$$arity = -1); - - Opal.def(self, '$gcd', $Number_gcd$40 = function $$gcd(other) { - var self = this; - - - if ($truthy($$($nesting, 'Integer')['$==='](other))) { - } else { - self.$raise($$($nesting, 'TypeError'), "not an integer") - }; - - var min = Math.abs(self), - max = Math.abs(other); - - while (min > 0) { - var tmp = min; - - min = max % min; - max = tmp; - } - - return max; - ; - }, $Number_gcd$40.$$arity = 1); - - Opal.def(self, '$gcdlcm', $Number_gcdlcm$41 = function $$gcdlcm(other) { - var self = this; - - return [self.$gcd(), self.$lcm()] - }, $Number_gcdlcm$41.$$arity = 1); - - Opal.def(self, '$integer?', $Number_integer$ques$42 = function() { - var self = this; - - return self % 1 === 0; - }, $Number_integer$ques$42.$$arity = 0); - - Opal.def(self, '$is_a?', $Number_is_a$ques$43 = function(klass) { - var $a, $iter = $Number_is_a$ques$43.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Number_is_a$ques$43.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - if ($truthy((($a = klass['$==']($$($nesting, 'Integer'))) ? $$($nesting, 'Integer')['$==='](self) : klass['$==']($$($nesting, 'Integer'))))) { - return true}; - if ($truthy((($a = klass['$==']($$($nesting, 'Integer'))) ? $$($nesting, 'Integer')['$==='](self) : klass['$==']($$($nesting, 'Integer'))))) { - return true}; - if ($truthy((($a = klass['$==']($$($nesting, 'Float'))) ? $$($nesting, 'Float')['$==='](self) : klass['$==']($$($nesting, 'Float'))))) { - return true}; - return $send(self, Opal.find_super_dispatcher(self, 'is_a?', $Number_is_a$ques$43, false), $zuper, $iter); - }, $Number_is_a$ques$43.$$arity = 1); - Opal.alias(self, "kind_of?", "is_a?"); - - Opal.def(self, '$instance_of?', $Number_instance_of$ques$44 = function(klass) { - var $a, $iter = $Number_instance_of$ques$44.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Number_instance_of$ques$44.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - if ($truthy((($a = klass['$==']($$($nesting, 'Integer'))) ? $$($nesting, 'Integer')['$==='](self) : klass['$==']($$($nesting, 'Integer'))))) { - return true}; - if ($truthy((($a = klass['$==']($$($nesting, 'Integer'))) ? $$($nesting, 'Integer')['$==='](self) : klass['$==']($$($nesting, 'Integer'))))) { - return true}; - if ($truthy((($a = klass['$==']($$($nesting, 'Float'))) ? $$($nesting, 'Float')['$==='](self) : klass['$==']($$($nesting, 'Float'))))) { - return true}; - return $send(self, Opal.find_super_dispatcher(self, 'instance_of?', $Number_instance_of$ques$44, false), $zuper, $iter); - }, $Number_instance_of$ques$44.$$arity = 1); - - Opal.def(self, '$lcm', $Number_lcm$45 = function $$lcm(other) { - var self = this; - - - if ($truthy($$($nesting, 'Integer')['$==='](other))) { - } else { - self.$raise($$($nesting, 'TypeError'), "not an integer") - }; - - if (self == 0 || other == 0) { - return 0; - } - else { - return Math.abs(self * other / self.$gcd(other)); - } - ; - }, $Number_lcm$45.$$arity = 1); - Opal.alias(self, "magnitude", "abs"); - Opal.alias(self, "modulo", "%"); - - Opal.def(self, '$next', $Number_next$46 = function $$next() { - var self = this; - - return self + 1; - }, $Number_next$46.$$arity = 0); - - Opal.def(self, '$nobits?', $Number_nobits$ques$47 = function(mask) { - var self = this; - - - mask = $$($nesting, 'Opal')['$coerce_to!'](mask, $$($nesting, 'Integer'), "to_int"); - return (self & mask) == 0;; - }, $Number_nobits$ques$47.$$arity = 1); - - Opal.def(self, '$nonzero?', $Number_nonzero$ques$48 = function() { - var self = this; - - return self == 0 ? nil : self; - }, $Number_nonzero$ques$48.$$arity = 0); - - Opal.def(self, '$numerator', $Number_numerator$49 = function $$numerator() { - var $a, $iter = $Number_numerator$49.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Number_numerator$49.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if ($truthy(($truthy($a = self['$nan?']()) ? $a : self['$infinite?']()))) { - return self - } else { - return $send(self, Opal.find_super_dispatcher(self, 'numerator', $Number_numerator$49, false), $zuper, $iter) - } - }, $Number_numerator$49.$$arity = 0); - - Opal.def(self, '$odd?', $Number_odd$ques$50 = function() { - var self = this; - - return self % 2 !== 0; - }, $Number_odd$ques$50.$$arity = 0); - - Opal.def(self, '$ord', $Number_ord$51 = function $$ord() { - var self = this; - - return self - }, $Number_ord$51.$$arity = 0); - - Opal.def(self, '$pow', $Number_pow$52 = function $$pow(b, m) { - var self = this; - - - ; - - if (self == 0) { - self.$raise($$($nesting, 'ZeroDivisionError'), "divided by 0") - } - - if (m === undefined) { - return self['$**'](b); - } else { - if (!($$($nesting, 'Integer')['$==='](b))) { - self.$raise($$($nesting, 'TypeError'), "Integer#pow() 2nd argument not allowed unless a 1st argument is integer") - } - - if (b < 0) { - self.$raise($$($nesting, 'TypeError'), "Integer#pow() 1st argument cannot be negative when 2nd argument specified") - } - - if (!($$($nesting, 'Integer')['$==='](m))) { - self.$raise($$($nesting, 'TypeError'), "Integer#pow() 2nd argument not allowed unless all arguments are integers") - } - - if (m === 0) { - self.$raise($$($nesting, 'ZeroDivisionError'), "divided by 0") - } - - return self['$**'](b)['$%'](m) - } - ; - }, $Number_pow$52.$$arity = -2); - - Opal.def(self, '$pred', $Number_pred$53 = function $$pred() { - var self = this; - - return self - 1; - }, $Number_pred$53.$$arity = 0); - - Opal.def(self, '$quo', $Number_quo$54 = function $$quo(other) { - var $iter = $Number_quo$54.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Number_quo$54.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if ($truthy($$($nesting, 'Integer')['$==='](self))) { - return $send(self, Opal.find_super_dispatcher(self, 'quo', $Number_quo$54, false), $zuper, $iter) - } else { - return $rb_divide(self, other) - } - }, $Number_quo$54.$$arity = 1); - - Opal.def(self, '$rationalize', $Number_rationalize$55 = function $$rationalize(eps) { - var $a, $b, self = this, f = nil, n = nil; - - - ; - - if (arguments.length > 1) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (arguments.length) + " for 0..1)"); - } - ; - if ($truthy($$($nesting, 'Integer')['$==='](self))) { - return $$($nesting, 'Rational').$new(self, 1) - } else if ($truthy(self['$infinite?']())) { - return self.$raise($$($nesting, 'FloatDomainError'), "Infinity") - } else if ($truthy(self['$nan?']())) { - return self.$raise($$($nesting, 'FloatDomainError'), "NaN") - } else if ($truthy(eps == null)) { - - $b = $$($nesting, 'Math').$frexp(self), $a = Opal.to_ary($b), (f = ($a[0] == null ? nil : $a[0])), (n = ($a[1] == null ? nil : $a[1])), $b; - f = $$($nesting, 'Math').$ldexp(f, $$$($$($nesting, 'Float'), 'MANT_DIG')).$to_i(); - n = $rb_minus(n, $$$($$($nesting, 'Float'), 'MANT_DIG')); - return $$($nesting, 'Rational').$new($rb_times(2, f), (1)['$<<']($rb_minus(1, n))).$rationalize($$($nesting, 'Rational').$new(1, (1)['$<<']($rb_minus(1, n)))); - } else { - return self.$to_r().$rationalize(eps) - }; - }, $Number_rationalize$55.$$arity = -1); - - Opal.def(self, '$remainder', $Number_remainder$56 = function $$remainder(y) { - var self = this; - - return $rb_minus(self, $rb_times(y, $rb_divide(self, y).$truncate())) - }, $Number_remainder$56.$$arity = 1); - - Opal.def(self, '$round', $Number_round$57 = function $$round(ndigits) { - var $a, $b, self = this, _ = nil, exp = nil; - - - ; - if ($truthy($$($nesting, 'Integer')['$==='](self))) { - - if ($truthy(ndigits == null)) { - return self}; - if ($truthy(($truthy($a = $$($nesting, 'Float')['$==='](ndigits)) ? ndigits['$infinite?']() : $a))) { - self.$raise($$($nesting, 'RangeError'), "Infinity")}; - ndigits = $$($nesting, 'Opal')['$coerce_to!'](ndigits, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_lt(ndigits, $$$($$($nesting, 'Integer'), 'MIN')))) { - self.$raise($$($nesting, 'RangeError'), "out of bounds")}; - if ($truthy(ndigits >= 0)) { - return self}; - ndigits = ndigits['$-@'](); - - if (0.415241 * ndigits - 0.125 > self.$size()) { - return 0; - } - - var f = Math.pow(10, ndigits), - x = Math.floor((Math.abs(x) + f / 2) / f) * f; - - return self < 0 ? -x : x; - ; - } else { - - if ($truthy(($truthy($a = self['$nan?']()) ? ndigits == null : $a))) { - self.$raise($$($nesting, 'FloatDomainError'), "NaN")}; - ndigits = $$($nesting, 'Opal')['$coerce_to!'](ndigits || 0, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_le(ndigits, 0))) { - if ($truthy(self['$nan?']())) { - self.$raise($$($nesting, 'RangeError'), "NaN") - } else if ($truthy(self['$infinite?']())) { - self.$raise($$($nesting, 'FloatDomainError'), "Infinity")} - } else if (ndigits['$=='](0)) { - return Math.round(self) - } else if ($truthy(($truthy($a = self['$nan?']()) ? $a : self['$infinite?']()))) { - return self}; - $b = $$($nesting, 'Math').$frexp(self), $a = Opal.to_ary($b), (_ = ($a[0] == null ? nil : $a[0])), (exp = ($a[1] == null ? nil : $a[1])), $b; - if ($truthy($rb_ge(ndigits, $rb_minus($rb_plus($$$($$($nesting, 'Float'), 'DIG'), 2), (function() {if ($truthy($rb_gt(exp, 0))) { - return $rb_divide(exp, 4) - } else { - return $rb_minus($rb_divide(exp, 3), 1) - }; return nil; })())))) { - return self}; - if ($truthy($rb_lt(ndigits, (function() {if ($truthy($rb_gt(exp, 0))) { - return $rb_plus($rb_divide(exp, 3), 1) - } else { - return $rb_divide(exp, 4) - }; return nil; })()['$-@']()))) { - return 0}; - return Math.round(self * Math.pow(10, ndigits)) / Math.pow(10, ndigits);; - }; - }, $Number_round$57.$$arity = -1); - - Opal.def(self, '$step', $Number_step$58 = function $$step($a, $b, $c) { - var $iter = $Number_step$58.$$p, block = $iter || nil, $post_args, $kwargs, limit, step, to, by, $$59, self = this, positional_args = nil, keyword_args = nil; - - if ($iter) $Number_step$58.$$p = null; - - - if ($iter) $Number_step$58.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - $kwargs = Opal.extract_kwargs($post_args); - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - if ($post_args.length > 0) { - limit = $post_args[0]; - $post_args.splice(0, 1); - }; - - if ($post_args.length > 0) { - step = $post_args[0]; - $post_args.splice(0, 1); - }; - - to = $kwargs.$$smap["to"];; - - by = $kwargs.$$smap["by"];; - - if (limit !== undefined && to !== undefined) { - self.$raise($$($nesting, 'ArgumentError'), "to is given twice") - } - - if (step !== undefined && by !== undefined) { - self.$raise($$($nesting, 'ArgumentError'), "step is given twice") - } - - function validateParameters() { - if (to !== undefined) { - limit = to; - } - - if (limit === undefined) { - limit = nil; - } - - if (step === nil) { - self.$raise($$($nesting, 'TypeError'), "step must be numeric") - } - - if (step === 0) { - self.$raise($$($nesting, 'ArgumentError'), "step can't be 0") - } - - if (by !== undefined) { - step = by; - } - - if (step === nil || step == null) { - step = 1; - } - - var sign = step['$<=>'](0); - - if (sign === nil) { - self.$raise($$($nesting, 'ArgumentError'), "" + "0 can't be coerced into " + (step.$class())) - } - - if (limit === nil || limit == null) { - limit = sign > 0 ? $$$($$($nesting, 'Float'), 'INFINITY') : $$$($$($nesting, 'Float'), 'INFINITY')['$-@'](); - } - - $$($nesting, 'Opal').$compare(self, limit) - } - - function stepFloatSize() { - if ((step > 0 && self > limit) || (step < 0 && self < limit)) { - return 0; - } else if (step === Infinity || step === -Infinity) { - return 1; - } else { - var abs = Math.abs, floor = Math.floor, - err = (abs(self) + abs(limit) + abs(limit - self)) / abs(step) * $$$($$($nesting, 'Float'), 'EPSILON'); - - if (err === Infinity || err === -Infinity) { - return 0; - } else { - if (err > 0.5) { - err = 0.5; - } - - return floor((limit - self) / step + err) + 1 - } - } - } - - function stepSize() { - validateParameters(); - - if (step === 0) { - return Infinity; - } - - if (step % 1 !== 0) { - return stepFloatSize(); - } else if ((step > 0 && self > limit) || (step < 0 && self < limit)) { - return 0; - } else { - var ceil = Math.ceil, abs = Math.abs, - lhs = abs(self - limit) + 1, - rhs = abs(step); - - return ceil(lhs / rhs); - } - } - ; - if ((block !== nil)) { - } else { - - positional_args = []; - keyword_args = $hash2([], {}); - - if (limit !== undefined) { - positional_args.push(limit); - } - - if (step !== undefined) { - positional_args.push(step); - } - - if (to !== undefined) { - Opal.hash_put(keyword_args, "to", to); - } - - if (by !== undefined) { - Opal.hash_put(keyword_args, "by", by); - } - - if (keyword_args['$any?']()) { - positional_args.push(keyword_args); - } - ; - return $send(self, 'enum_for', ["step"].concat(Opal.to_a(positional_args)), ($$59 = function(){var self = $$59.$$s || this; - - return stepSize();}, $$59.$$s = self, $$59.$$arity = 0, $$59)); - }; - - validateParameters(); - - if (step === 0) { - while (true) { - block(self); - } - } - - if (self % 1 !== 0 || limit % 1 !== 0 || step % 1 !== 0) { - var n = stepFloatSize(); - - if (n > 0) { - if (step === Infinity || step === -Infinity) { - block(self); - } else { - var i = 0, d; - - if (step > 0) { - while (i < n) { - d = i * step + self; - if (limit < d) { - d = limit; - } - block(d); - i += 1; - } - } else { - while (i < n) { - d = i * step + self; - if (limit > d) { - d = limit; - } - block(d); - i += 1 - } - } - } - } - } else { - var value = self; - - if (step > 0) { - while (value <= limit) { - block(value); - value += step; - } - } else { - while (value >= limit) { - block(value); - value += step - } - } - } - - return self; - ; - }, $Number_step$58.$$arity = -1); - Opal.alias(self, "succ", "next"); - - Opal.def(self, '$times', $Number_times$60 = function $$times() { - var $iter = $Number_times$60.$$p, block = $iter || nil, $$61, self = this; - - if ($iter) $Number_times$60.$$p = null; - - - if ($iter) $Number_times$60.$$p = null;; - if ($truthy(block)) { - } else { - return $send(self, 'enum_for', ["times"], ($$61 = function(){var self = $$61.$$s || this; - - return self}, $$61.$$s = self, $$61.$$arity = 0, $$61)) - }; - - for (var i = 0; i < self; i++) { - block(i); - } - ; - return self; - }, $Number_times$60.$$arity = 0); - - Opal.def(self, '$to_f', $Number_to_f$62 = function $$to_f() { - var self = this; - - return self - }, $Number_to_f$62.$$arity = 0); - - Opal.def(self, '$to_i', $Number_to_i$63 = function $$to_i() { - var self = this; - - return parseInt(self, 10); - }, $Number_to_i$63.$$arity = 0); - Opal.alias(self, "to_int", "to_i"); - - Opal.def(self, '$to_r', $Number_to_r$64 = function $$to_r() { - var $a, $b, self = this, f = nil, e = nil; - - if ($truthy($$($nesting, 'Integer')['$==='](self))) { - return $$($nesting, 'Rational').$new(self, 1) - } else { - - $b = $$($nesting, 'Math').$frexp(self), $a = Opal.to_ary($b), (f = ($a[0] == null ? nil : $a[0])), (e = ($a[1] == null ? nil : $a[1])), $b; - f = $$($nesting, 'Math').$ldexp(f, $$$($$($nesting, 'Float'), 'MANT_DIG')).$to_i(); - e = $rb_minus(e, $$$($$($nesting, 'Float'), 'MANT_DIG')); - return $rb_times(f, $$$($$($nesting, 'Float'), 'RADIX')['$**'](e)).$to_r(); - } - }, $Number_to_r$64.$$arity = 0); - - Opal.def(self, '$to_s', $Number_to_s$65 = function $$to_s(base) { - var $a, self = this; - - - - if (base == null) { - base = 10; - }; - base = $$($nesting, 'Opal')['$coerce_to!'](base, $$($nesting, 'Integer'), "to_int"); - if ($truthy(($truthy($a = $rb_lt(base, 2)) ? $a : $rb_gt(base, 36)))) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid radix " + (base))}; - return self.toString(base);; - }, $Number_to_s$65.$$arity = -1); - - Opal.def(self, '$truncate', $Number_truncate$66 = function $$truncate(ndigits) { - var self = this; - - - - if (ndigits == null) { - ndigits = 0; - }; - - var f = self.$to_f(); - - if (f % 1 === 0 && ndigits >= 0) { - return f; - } - - var factor = Math.pow(10, ndigits), - result = parseInt(f * factor, 10) / factor; - - if (f % 1 === 0) { - result = Math.round(result); - } - - return result; - ; - }, $Number_truncate$66.$$arity = -1); - Opal.alias(self, "inspect", "to_s"); - - Opal.def(self, '$digits', $Number_digits$67 = function $$digits(base) { - var self = this; - - - - if (base == null) { - base = 10; - }; - if ($rb_lt(self, 0)) { - self.$raise($$$($$($nesting, 'Math'), 'DomainError'), "out of domain")}; - base = $$($nesting, 'Opal')['$coerce_to!'](base, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_lt(base, 2))) { - self.$raise($$($nesting, 'ArgumentError'), "" + "invalid radix " + (base))}; - - var value = self, result = []; - - while (value !== 0) { - result.push(value % base); - value = parseInt(value / base, 10); - } - - return result; - ; - }, $Number_digits$67.$$arity = -1); - - Opal.def(self, '$divmod', $Number_divmod$68 = function $$divmod(other) { - var $a, $iter = $Number_divmod$68.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Number_divmod$68.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if ($truthy(($truthy($a = self['$nan?']()) ? $a : other['$nan?']()))) { - return self.$raise($$($nesting, 'FloatDomainError'), "NaN") - } else if ($truthy(self['$infinite?']())) { - return self.$raise($$($nesting, 'FloatDomainError'), "Infinity") - } else { - return $send(self, Opal.find_super_dispatcher(self, 'divmod', $Number_divmod$68, false), $zuper, $iter) - } - }, $Number_divmod$68.$$arity = 1); - - Opal.def(self, '$upto', $Number_upto$69 = function $$upto(stop) { - var $iter = $Number_upto$69.$$p, block = $iter || nil, $$70, self = this; - - if ($iter) $Number_upto$69.$$p = null; - - - if ($iter) $Number_upto$69.$$p = null;; - if ((block !== nil)) { - } else { - return $send(self, 'enum_for', ["upto", stop], ($$70 = function(){var self = $$70.$$s || this; - - - if ($truthy($$($nesting, 'Numeric')['$==='](stop))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (stop.$class()) + " failed") - }; - if ($truthy($rb_lt(stop, self))) { - return 0 - } else { - return $rb_plus($rb_minus(stop, self), 1) - };}, $$70.$$s = self, $$70.$$arity = 0, $$70)) - }; - - if (!stop.$$is_number) { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (stop.$class()) + " failed") - } - for (var i = self; i <= stop; i++) { - block(i); - } - ; - return self; - }, $Number_upto$69.$$arity = 1); - - Opal.def(self, '$zero?', $Number_zero$ques$71 = function() { - var self = this; - - return self == 0; - }, $Number_zero$ques$71.$$arity = 0); - - Opal.def(self, '$size', $Number_size$72 = function $$size() { - var self = this; - - return 4 - }, $Number_size$72.$$arity = 0); - - Opal.def(self, '$nan?', $Number_nan$ques$73 = function() { - var self = this; - - return isNaN(self); - }, $Number_nan$ques$73.$$arity = 0); - - Opal.def(self, '$finite?', $Number_finite$ques$74 = function() { - var self = this; - - return self != Infinity && self != -Infinity && !isNaN(self); - }, $Number_finite$ques$74.$$arity = 0); - - Opal.def(self, '$infinite?', $Number_infinite$ques$75 = function() { - var self = this; - - - if (self == Infinity) { - return +1; - } - else if (self == -Infinity) { - return -1; - } - else { - return nil; - } - - }, $Number_infinite$ques$75.$$arity = 0); - - Opal.def(self, '$positive?', $Number_positive$ques$76 = function() { - var self = this; - - return self != 0 && (self == Infinity || 1 / self > 0); - }, $Number_positive$ques$76.$$arity = 0); - return (Opal.def(self, '$negative?', $Number_negative$ques$77 = function() { - var self = this; - - return self == -Infinity || 1 / self < 0; - }, $Number_negative$ques$77.$$arity = 0), nil) && 'negative?'; - })($nesting[0], $$($nesting, 'Numeric'), $nesting); - Opal.const_set($nesting[0], 'Fixnum', $$($nesting, 'Number')); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Integer'); - - var $nesting = [self].concat($parent_nesting); - - - self.$$is_number_class = true; - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $allocate$78, $eq_eq_eq$79, $sqrt$80; - - - - Opal.def(self, '$allocate', $allocate$78 = function $$allocate() { - var self = this; - - return self.$raise($$($nesting, 'TypeError'), "" + "allocator undefined for " + (self.$name())) - }, $allocate$78.$$arity = 0); - - Opal.udef(self, '$' + "new");; - - Opal.def(self, '$===', $eq_eq_eq$79 = function(other) { - var self = this; - - - if (!other.$$is_number) { - return false; - } - - return (other % 1) === 0; - - }, $eq_eq_eq$79.$$arity = 1); - return (Opal.def(self, '$sqrt', $sqrt$80 = function $$sqrt(n) { - var self = this; - - - n = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int"); - - if (n < 0) { - self.$raise($$$($$($nesting, 'Math'), 'DomainError'), "Numerical argument is out of domain - \"isqrt\"") - } - - return parseInt(Math.sqrt(n), 10); - ; - }, $sqrt$80.$$arity = 1), nil) && 'sqrt'; - })(Opal.get_singleton_class(self), $nesting); - Opal.const_set($nesting[0], 'MAX', Math.pow(2, 30) - 1); - return Opal.const_set($nesting[0], 'MIN', -Math.pow(2, 30)); - })($nesting[0], $$($nesting, 'Numeric'), $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Float'); - - var $nesting = [self].concat($parent_nesting); - - - self.$$is_number_class = true; - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $allocate$81, $eq_eq_eq$82; - - - - Opal.def(self, '$allocate', $allocate$81 = function $$allocate() { - var self = this; - - return self.$raise($$($nesting, 'TypeError'), "" + "allocator undefined for " + (self.$name())) - }, $allocate$81.$$arity = 0); - - Opal.udef(self, '$' + "new");; - return (Opal.def(self, '$===', $eq_eq_eq$82 = function(other) { - var self = this; - - return !!other.$$is_number; - }, $eq_eq_eq$82.$$arity = 1), nil) && '==='; - })(Opal.get_singleton_class(self), $nesting); - Opal.const_set($nesting[0], 'INFINITY', Infinity); - Opal.const_set($nesting[0], 'MAX', Number.MAX_VALUE); - Opal.const_set($nesting[0], 'MIN', Number.MIN_VALUE); - Opal.const_set($nesting[0], 'NAN', NaN); - Opal.const_set($nesting[0], 'DIG', 15); - Opal.const_set($nesting[0], 'MANT_DIG', 53); - Opal.const_set($nesting[0], 'RADIX', 2); - return Opal.const_set($nesting[0], 'EPSILON', Number.EPSILON || 2.2204460492503130808472633361816E-16); - })($nesting[0], $$($nesting, 'Numeric'), $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/range"] = function(Opal) { - function $rb_le(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_divide(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs / rhs : lhs['$/'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_times(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); - } - function $rb_ge(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$require', '$include', '$attr_reader', '$raise', '$<=>', '$include?', '$<=', '$<', '$enum_for', '$upto', '$to_proc', '$respond_to?', '$class', '$succ', '$!', '$==', '$===', '$exclude_end?', '$eql?', '$begin', '$end', '$last', '$to_a', '$>', '$-', '$abs', '$to_i', '$coerce_to!', '$ceil', '$/', '$size', '$loop', '$+', '$*', '$>=', '$each_with_index', '$%', '$bsearch', '$inspect', '$[]', '$hash']); - - self.$require("corelib/enumerable"); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Range'); - - var $nesting = [self].concat($parent_nesting), $Range_initialize$1, $Range_$eq_eq$2, $Range_$eq_eq_eq$3, $Range_cover$ques$4, $Range_each$5, $Range_eql$ques$6, $Range_exclude_end$ques$7, $Range_first$8, $Range_last$9, $Range_max$10, $Range_min$11, $Range_size$12, $Range_step$13, $Range_bsearch$17, $Range_to_s$18, $Range_inspect$19, $Range_marshal_load$20, $Range_hash$21; - - self.$$prototype.begin = self.$$prototype.end = self.$$prototype.excl = nil; - - self.$include($$($nesting, 'Enumerable')); - self.$$prototype.$$is_range = true; - self.$attr_reader("begin", "end"); - - Opal.def(self, '$initialize', $Range_initialize$1 = function $$initialize(first, last, exclude) { - var self = this; - - - - if (exclude == null) { - exclude = false; - }; - if ($truthy(self.begin)) { - self.$raise($$($nesting, 'NameError'), "'initialize' called twice")}; - if ($truthy(first['$<=>'](last))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "bad value for range") - }; - self.begin = first; - self.end = last; - return (self.excl = exclude); - }, $Range_initialize$1.$$arity = -3); - - Opal.def(self, '$==', $Range_$eq_eq$2 = function(other) { - var self = this; - - - if (!other.$$is_range) { - return false; - } - - return self.excl === other.excl && - self.begin == other.begin && - self.end == other.end; - - }, $Range_$eq_eq$2.$$arity = 1); - - Opal.def(self, '$===', $Range_$eq_eq_eq$3 = function(value) { - var self = this; - - return self['$include?'](value) - }, $Range_$eq_eq_eq$3.$$arity = 1); - - Opal.def(self, '$cover?', $Range_cover$ques$4 = function(value) { - var $a, self = this, beg_cmp = nil, end_cmp = nil; - - - beg_cmp = self.begin['$<=>'](value); - if ($truthy(($truthy($a = beg_cmp) ? $rb_le(beg_cmp, 0) : $a))) { - } else { - return false - }; - end_cmp = value['$<=>'](self.end); - if ($truthy(self.excl)) { - return ($truthy($a = end_cmp) ? $rb_lt(end_cmp, 0) : $a) - } else { - return ($truthy($a = end_cmp) ? $rb_le(end_cmp, 0) : $a) - }; - }, $Range_cover$ques$4.$$arity = 1); - - Opal.def(self, '$each', $Range_each$5 = function $$each() { - var $iter = $Range_each$5.$$p, block = $iter || nil, $a, self = this, current = nil, last = nil; - - if ($iter) $Range_each$5.$$p = null; - - - if ($iter) $Range_each$5.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("each") - }; - - var i, limit; - - if (self.begin.$$is_number && self.end.$$is_number) { - if (self.begin % 1 !== 0 || self.end % 1 !== 0) { - self.$raise($$($nesting, 'TypeError'), "can't iterate from Float") - } - - for (i = self.begin, limit = self.end + (function() {if ($truthy(self.excl)) { - return 0 - } else { - return 1 - }; return nil; })(); i < limit; i++) { - block(i); - } - - return self; - } - - if (self.begin.$$is_string && self.end.$$is_string) { - $send(self.begin, 'upto', [self.end, self.excl], block.$to_proc()) - return self; - } - ; - current = self.begin; - last = self.end; - if ($truthy(current['$respond_to?']("succ"))) { - } else { - self.$raise($$($nesting, 'TypeError'), "" + "can't iterate from " + (current.$class())) - }; - while ($truthy($rb_lt(current['$<=>'](last), 0))) { - - Opal.yield1(block, current); - current = current.$succ(); - }; - if ($truthy(($truthy($a = self.excl['$!']()) ? current['$=='](last) : $a))) { - Opal.yield1(block, current)}; - return self; - }, $Range_each$5.$$arity = 0); - - Opal.def(self, '$eql?', $Range_eql$ques$6 = function(other) { - var $a, $b, self = this; - - - if ($truthy($$($nesting, 'Range')['$==='](other))) { - } else { - return false - }; - return ($truthy($a = ($truthy($b = self.excl['$==='](other['$exclude_end?']())) ? self.begin['$eql?'](other.$begin()) : $b)) ? self.end['$eql?'](other.$end()) : $a); - }, $Range_eql$ques$6.$$arity = 1); - - Opal.def(self, '$exclude_end?', $Range_exclude_end$ques$7 = function() { - var self = this; - - return self.excl - }, $Range_exclude_end$ques$7.$$arity = 0); - - Opal.def(self, '$first', $Range_first$8 = function $$first(n) { - var $iter = $Range_first$8.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Range_first$8.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - - ; - if ($truthy(n == null)) { - return self.begin}; - return $send(self, Opal.find_super_dispatcher(self, 'first', $Range_first$8, false), $zuper, $iter); - }, $Range_first$8.$$arity = -1); - Opal.alias(self, "include?", "cover?"); - - Opal.def(self, '$last', $Range_last$9 = function $$last(n) { - var self = this; - - - ; - if ($truthy(n == null)) { - return self.end}; - return self.$to_a().$last(n); - }, $Range_last$9.$$arity = -1); - - Opal.def(self, '$max', $Range_max$10 = function $$max() { - var $a, $iter = $Range_max$10.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Range_max$10.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if (($yield !== nil)) { - return $send(self, Opal.find_super_dispatcher(self, 'max', $Range_max$10, false), $zuper, $iter) - } else if ($truthy($rb_gt(self.begin, self.end))) { - return nil - } else if ($truthy(($truthy($a = self.excl) ? self.begin['$=='](self.end) : $a))) { - return nil - } else { - return self.excl ? self.end - 1 : self.end - } - }, $Range_max$10.$$arity = 0); - Opal.alias(self, "member?", "cover?"); - - Opal.def(self, '$min', $Range_min$11 = function $$min() { - var $a, $iter = $Range_min$11.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; - - if ($iter) $Range_min$11.$$p = null; - // Prepare super implicit arguments - for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { - $zuper[$zuper_i] = arguments[$zuper_i]; - } - if (($yield !== nil)) { - return $send(self, Opal.find_super_dispatcher(self, 'min', $Range_min$11, false), $zuper, $iter) - } else if ($truthy($rb_gt(self.begin, self.end))) { - return nil - } else if ($truthy(($truthy($a = self.excl) ? self.begin['$=='](self.end) : $a))) { - return nil - } else { - return self.begin - } - }, $Range_min$11.$$arity = 0); - - Opal.def(self, '$size', $Range_size$12 = function $$size() { - var $a, self = this, range_begin = nil, range_end = nil, infinity = nil; - - - range_begin = self.begin; - range_end = self.end; - if ($truthy(self.excl)) { - range_end = $rb_minus(range_end, 1)}; - if ($truthy(($truthy($a = $$($nesting, 'Numeric')['$==='](range_begin)) ? $$($nesting, 'Numeric')['$==='](range_end) : $a))) { - } else { - return nil - }; - if ($truthy($rb_lt(range_end, range_begin))) { - return 0}; - infinity = $$$($$($nesting, 'Float'), 'INFINITY'); - if ($truthy([range_begin.$abs(), range_end.$abs()]['$include?'](infinity))) { - return infinity}; - return (Math.abs(range_end - range_begin) + 1).$to_i(); - }, $Range_size$12.$$arity = 0); - - Opal.def(self, '$step', $Range_step$13 = function $$step(n) { - var $$14, $$15, $$16, $iter = $Range_step$13.$$p, $yield = $iter || nil, self = this, i = nil; - - if ($iter) $Range_step$13.$$p = null; - - - if (n == null) { - n = 1; - }; - - function coerceStepSize() { - if (!n.$$is_number) { - n = $$($nesting, 'Opal')['$coerce_to!'](n, $$($nesting, 'Integer'), "to_int") - } - - if (n < 0) { - self.$raise($$($nesting, 'ArgumentError'), "step can't be negative") - } else if (n === 0) { - self.$raise($$($nesting, 'ArgumentError'), "step can't be 0") - } - } - - function enumeratorSize() { - if (!self.begin['$respond_to?']("succ")) { - return nil; - } - - if (self.begin.$$is_string && self.end.$$is_string) { - return nil; - } - - if (n % 1 === 0) { - return $rb_divide(self.$size(), n).$ceil(); - } else { - // n is a float - var begin = self.begin, end = self.end, - abs = Math.abs, floor = Math.floor, - err = (abs(begin) + abs(end) + abs(end - begin)) / abs(n) * $$$($$($nesting, 'Float'), 'EPSILON'), - size; - - if (err > 0.5) { - err = 0.5; - } - - if (self.excl) { - size = floor((end - begin) / n - err); - if (size * n + begin < end) { - size++; - } - } else { - size = floor((end - begin) / n + err) + 1 - } - - return size; - } - } - ; - if (($yield !== nil)) { - } else { - return $send(self, 'enum_for', ["step", n], ($$14 = function(){var self = $$14.$$s || this; - - - coerceStepSize(); - return enumeratorSize(); - }, $$14.$$s = self, $$14.$$arity = 0, $$14)) - }; - coerceStepSize(); - if ($truthy(self.begin.$$is_number && self.end.$$is_number)) { - - i = 0; - (function(){var $brk = Opal.new_brk(); try {return $send(self, 'loop', [], ($$15 = function(){var self = $$15.$$s || this, current = nil; - if (self.begin == null) self.begin = nil; - if (self.excl == null) self.excl = nil; - if (self.end == null) self.end = nil; - - - current = $rb_plus(self.begin, $rb_times(i, n)); - if ($truthy(self.excl)) { - if ($truthy($rb_ge(current, self.end))) { - - Opal.brk(nil, $brk)} - } else if ($truthy($rb_gt(current, self.end))) { - - Opal.brk(nil, $brk)}; - Opal.yield1($yield, current); - return (i = $rb_plus(i, 1));}, $$15.$$s = self, $$15.$$brk = $brk, $$15.$$arity = 0, $$15)) - } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})(); - } else { - - - if (self.begin.$$is_string && self.end.$$is_string && n % 1 !== 0) { - self.$raise($$($nesting, 'TypeError'), "no implicit conversion to float from string") - } - ; - $send(self, 'each_with_index', [], ($$16 = function(value, idx){var self = $$16.$$s || this; - - - - if (value == null) { - value = nil; - }; - - if (idx == null) { - idx = nil; - }; - if (idx['$%'](n)['$=='](0)) { - return Opal.yield1($yield, value); - } else { - return nil - };}, $$16.$$s = self, $$16.$$arity = 2, $$16)); - }; - return self; - }, $Range_step$13.$$arity = -1); - - Opal.def(self, '$bsearch', $Range_bsearch$17 = function $$bsearch() { - var $iter = $Range_bsearch$17.$$p, block = $iter || nil, self = this; - - if ($iter) $Range_bsearch$17.$$p = null; - - - if ($iter) $Range_bsearch$17.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("bsearch") - }; - if ($truthy(self.begin.$$is_number && self.end.$$is_number)) { - } else { - self.$raise($$($nesting, 'TypeError'), "" + "can't do binary search for " + (self.begin.$class())) - }; - return $send(self.$to_a(), 'bsearch', [], block.$to_proc()); - }, $Range_bsearch$17.$$arity = 0); - - Opal.def(self, '$to_s', $Range_to_s$18 = function $$to_s() { - var self = this; - - return "" + (self.begin) + ((function() {if ($truthy(self.excl)) { - return "..." - } else { - return ".." - }; return nil; })()) + (self.end) - }, $Range_to_s$18.$$arity = 0); - - Opal.def(self, '$inspect', $Range_inspect$19 = function $$inspect() { - var self = this; - - return "" + (self.begin.$inspect()) + ((function() {if ($truthy(self.excl)) { - return "..." - } else { - return ".." - }; return nil; })()) + (self.end.$inspect()) - }, $Range_inspect$19.$$arity = 0); - - Opal.def(self, '$marshal_load', $Range_marshal_load$20 = function $$marshal_load(args) { - var self = this; - - - self.begin = args['$[]']("begin"); - self.end = args['$[]']("end"); - return (self.excl = args['$[]']("excl")); - }, $Range_marshal_load$20.$$arity = 1); - return (Opal.def(self, '$hash', $Range_hash$21 = function $$hash() { - var self = this; - - return [self.begin, self.end, self.excl].$hash() - }, $Range_hash$21.$$arity = 0), nil) && 'hash'; - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/proc"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$raise', '$coerce_to!']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Proc'); - - var $nesting = [self].concat($parent_nesting), $Proc_new$1, $Proc_call$2, $Proc_to_proc$3, $Proc_lambda$ques$4, $Proc_arity$5, $Proc_source_location$6, $Proc_binding$7, $Proc_parameters$8, $Proc_curry$9, $Proc_dup$10; - - - Opal.defineProperty(self.$$prototype, '$$is_proc', true); - Opal.defineProperty(self.$$prototype, '$$is_lambda', false); - Opal.defs(self, '$new', $Proc_new$1 = function() { - var $iter = $Proc_new$1.$$p, block = $iter || nil, self = this; - - if ($iter) $Proc_new$1.$$p = null; - - - if ($iter) $Proc_new$1.$$p = null;; - if ($truthy(block)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "tried to create a Proc object without a block") - }; - return block; - }, $Proc_new$1.$$arity = 0); - - Opal.def(self, '$call', $Proc_call$2 = function $$call($a) { - var $iter = $Proc_call$2.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Proc_call$2.$$p = null; - - - if ($iter) $Proc_call$2.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - if (block !== nil) { - self.$$p = block; - } - - var result, $brk = self.$$brk; - - if ($brk) { - try { - if (self.$$is_lambda) { - result = self.apply(null, args); - } - else { - result = Opal.yieldX(self, args); - } - } catch (err) { - if (err === $brk) { - return $brk.$v - } - else { - throw err - } - } - } - else { - if (self.$$is_lambda) { - result = self.apply(null, args); - } - else { - result = Opal.yieldX(self, args); - } - } - - return result; - ; - }, $Proc_call$2.$$arity = -1); - Opal.alias(self, "[]", "call"); - Opal.alias(self, "===", "call"); - Opal.alias(self, "yield", "call"); - - Opal.def(self, '$to_proc', $Proc_to_proc$3 = function $$to_proc() { - var self = this; - - return self - }, $Proc_to_proc$3.$$arity = 0); - - Opal.def(self, '$lambda?', $Proc_lambda$ques$4 = function() { - var self = this; - - return !!self.$$is_lambda; - }, $Proc_lambda$ques$4.$$arity = 0); - - Opal.def(self, '$arity', $Proc_arity$5 = function $$arity() { - var self = this; - - - if (self.$$is_curried) { - return -1; - } else { - return self.$$arity; - } - - }, $Proc_arity$5.$$arity = 0); - - Opal.def(self, '$source_location', $Proc_source_location$6 = function $$source_location() { - var self = this; - - - if (self.$$is_curried) { return nil; }; - return nil; - }, $Proc_source_location$6.$$arity = 0); - - Opal.def(self, '$binding', $Proc_binding$7 = function $$binding() { - var self = this; - - - if (self.$$is_curried) { self.$raise($$($nesting, 'ArgumentError'), "Can't create Binding") }; - return nil; - }, $Proc_binding$7.$$arity = 0); - - Opal.def(self, '$parameters', $Proc_parameters$8 = function $$parameters() { - var self = this; - - - if (self.$$is_curried) { - return [["rest"]]; - } else if (self.$$parameters) { - if (self.$$is_lambda) { - return self.$$parameters; - } else { - var result = [], i, length; - - for (i = 0, length = self.$$parameters.length; i < length; i++) { - var parameter = self.$$parameters[i]; - - if (parameter[0] === 'req') { - // required arguments always have name - parameter = ['opt', parameter[1]]; - } - - result.push(parameter); - } - - return result; - } - } else { - return []; - } - - }, $Proc_parameters$8.$$arity = 0); - - Opal.def(self, '$curry', $Proc_curry$9 = function $$curry(arity) { - var self = this; - - - ; - - if (arity === undefined) { - arity = self.length; - } - else { - arity = $$($nesting, 'Opal')['$coerce_to!'](arity, $$($nesting, 'Integer'), "to_int"); - if (self.$$is_lambda && arity !== self.length) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (arity) + " for " + (self.length) + ")") - } - } - - function curried () { - var args = $slice.call(arguments), - length = args.length, - result; - - if (length > arity && self.$$is_lambda && !self.$$is_curried) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (" + (length) + " for " + (arity) + ")") - } - - if (length >= arity) { - return self.$call.apply(self, args); - } - - result = function () { - return curried.apply(null, - args.concat($slice.call(arguments))); - } - result.$$is_lambda = self.$$is_lambda; - result.$$is_curried = true; - - return result; - }; - - curried.$$is_lambda = self.$$is_lambda; - curried.$$is_curried = true; - return curried; - ; - }, $Proc_curry$9.$$arity = -1); - - Opal.def(self, '$dup', $Proc_dup$10 = function $$dup() { - var self = this; - - - var original_proc = self.$$original_proc || self, - proc = function () { - return original_proc.apply(this, arguments); - }; - - for (var prop in self) { - if (self.hasOwnProperty(prop)) { - proc[prop] = self[prop]; - } - } - - return proc; - - }, $Proc_dup$10.$$arity = 0); - return Opal.alias(self, "clone", "dup"); - })($nesting[0], Function, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/method"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$attr_reader', '$arity', '$new', '$class', '$join', '$source_location', '$raise']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Method'); - - var $nesting = [self].concat($parent_nesting), $Method_initialize$1, $Method_arity$2, $Method_parameters$3, $Method_source_location$4, $Method_comments$5, $Method_call$6, $Method_unbind$7, $Method_to_proc$8, $Method_inspect$9; - - self.$$prototype.method = self.$$prototype.receiver = self.$$prototype.owner = self.$$prototype.name = nil; - - self.$attr_reader("owner", "receiver", "name"); - - Opal.def(self, '$initialize', $Method_initialize$1 = function $$initialize(receiver, owner, method, name) { - var self = this; - - - self.receiver = receiver; - self.owner = owner; - self.name = name; - return (self.method = method); - }, $Method_initialize$1.$$arity = 4); - - Opal.def(self, '$arity', $Method_arity$2 = function $$arity() { - var self = this; - - return self.method.$arity() - }, $Method_arity$2.$$arity = 0); - - Opal.def(self, '$parameters', $Method_parameters$3 = function $$parameters() { - var self = this; - - return self.method.$$parameters - }, $Method_parameters$3.$$arity = 0); - - Opal.def(self, '$source_location', $Method_source_location$4 = function $$source_location() { - var $a, self = this; - - return ($truthy($a = self.method.$$source_location) ? $a : ["(eval)", 0]) - }, $Method_source_location$4.$$arity = 0); - - Opal.def(self, '$comments', $Method_comments$5 = function $$comments() { - var $a, self = this; - - return ($truthy($a = self.method.$$comments) ? $a : []) - }, $Method_comments$5.$$arity = 0); - - Opal.def(self, '$call', $Method_call$6 = function $$call($a) { - var $iter = $Method_call$6.$$p, block = $iter || nil, $post_args, args, self = this; - - if ($iter) $Method_call$6.$$p = null; - - - if ($iter) $Method_call$6.$$p = null;; - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - - self.method.$$p = block; - - return self.method.apply(self.receiver, args); - ; - }, $Method_call$6.$$arity = -1); - Opal.alias(self, "[]", "call"); - - Opal.def(self, '$unbind', $Method_unbind$7 = function $$unbind() { - var self = this; - - return $$($nesting, 'UnboundMethod').$new(self.receiver.$class(), self.owner, self.method, self.name) - }, $Method_unbind$7.$$arity = 0); - - Opal.def(self, '$to_proc', $Method_to_proc$8 = function $$to_proc() { - var self = this; - - - var proc = self.$call.bind(self); - proc.$$unbound = self.method; - proc.$$is_lambda = true; - proc.$$arity = self.method.$$arity; - proc.$$parameters = self.method.$$parameters; - return proc; - - }, $Method_to_proc$8.$$arity = 0); - return (Opal.def(self, '$inspect', $Method_inspect$9 = function $$inspect() { - var self = this; - - return "" + "#<" + (self.$class()) + ": " + (self.receiver.$class()) + "#" + (self.name) + " (defined in " + (self.owner) + " in " + (self.$source_location().$join(":")) + ")>" - }, $Method_inspect$9.$$arity = 0), nil) && 'inspect'; - })($nesting[0], null, $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'UnboundMethod'); - - var $nesting = [self].concat($parent_nesting), $UnboundMethod_initialize$10, $UnboundMethod_arity$11, $UnboundMethod_parameters$12, $UnboundMethod_source_location$13, $UnboundMethod_comments$14, $UnboundMethod_bind$15, $UnboundMethod_inspect$16; - - self.$$prototype.method = self.$$prototype.owner = self.$$prototype.name = self.$$prototype.source = nil; - - self.$attr_reader("source", "owner", "name"); - - Opal.def(self, '$initialize', $UnboundMethod_initialize$10 = function $$initialize(source, owner, method, name) { - var self = this; - - - self.source = source; - self.owner = owner; - self.method = method; - return (self.name = name); - }, $UnboundMethod_initialize$10.$$arity = 4); - - Opal.def(self, '$arity', $UnboundMethod_arity$11 = function $$arity() { - var self = this; - - return self.method.$arity() - }, $UnboundMethod_arity$11.$$arity = 0); - - Opal.def(self, '$parameters', $UnboundMethod_parameters$12 = function $$parameters() { - var self = this; - - return self.method.$$parameters - }, $UnboundMethod_parameters$12.$$arity = 0); - - Opal.def(self, '$source_location', $UnboundMethod_source_location$13 = function $$source_location() { - var $a, self = this; - - return ($truthy($a = self.method.$$source_location) ? $a : ["(eval)", 0]) - }, $UnboundMethod_source_location$13.$$arity = 0); - - Opal.def(self, '$comments', $UnboundMethod_comments$14 = function $$comments() { - var $a, self = this; - - return ($truthy($a = self.method.$$comments) ? $a : []) - }, $UnboundMethod_comments$14.$$arity = 0); - - Opal.def(self, '$bind', $UnboundMethod_bind$15 = function $$bind(object) { - var self = this; - - - if (self.owner.$$is_module || Opal.is_a(object, self.owner)) { - return $$($nesting, 'Method').$new(object, self.owner, self.method, self.name); - } - else { - self.$raise($$($nesting, 'TypeError'), "" + "can't bind singleton method to a different class (expected " + (object) + ".kind_of?(" + (self.owner) + " to be true)"); - } - - }, $UnboundMethod_bind$15.$$arity = 1); - return (Opal.def(self, '$inspect', $UnboundMethod_inspect$16 = function $$inspect() { - var self = this; - - return "" + "#<" + (self.$class()) + ": " + (self.source) + "#" + (self.name) + " (defined in " + (self.owner) + " in " + (self.$source_location().$join(":")) + ")>" - }, $UnboundMethod_inspect$16.$$arity = 0), nil) && 'inspect'; - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/variables"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $gvars = Opal.gvars, $hash2 = Opal.hash2; - - Opal.add_stubs(['$new']); - - $gvars['&'] = $gvars['~'] = $gvars['`'] = $gvars["'"] = nil; - $gvars.LOADED_FEATURES = ($gvars["\""] = Opal.loaded_features); - $gvars.LOAD_PATH = ($gvars[":"] = []); - $gvars["/"] = "\n"; - $gvars[","] = nil; - Opal.const_set($nesting[0], 'ARGV', []); - Opal.const_set($nesting[0], 'ARGF', $$($nesting, 'Object').$new()); - Opal.const_set($nesting[0], 'ENV', $hash2([], {})); - $gvars.VERBOSE = false; - $gvars.DEBUG = false; - return ($gvars.SAFE = 0); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["opal/regexp_anchors"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module; - - Opal.add_stubs(['$==', '$new']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Opal'); - - var $nesting = [self].concat($parent_nesting); - - - Opal.const_set($nesting[0], 'REGEXP_START', (function() {if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - return "^" - } else { - return nil - }; return nil; })()); - Opal.const_set($nesting[0], 'REGEXP_END', (function() {if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { - return "$" - } else { - return nil - }; return nil; })()); - Opal.const_set($nesting[0], 'FORBIDDEN_STARTING_IDENTIFIER_CHARS', "\\u0001-\\u002F\\u003A-\\u0040\\u005B-\\u005E\\u0060\\u007B-\\u007F"); - Opal.const_set($nesting[0], 'FORBIDDEN_ENDING_IDENTIFIER_CHARS', "\\u0001-\\u0020\\u0022-\\u002F\\u003A-\\u003E\\u0040\\u005B-\\u005E\\u0060\\u007B-\\u007F"); - Opal.const_set($nesting[0], 'INLINE_IDENTIFIER_REGEXP', $$($nesting, 'Regexp').$new("" + "[^" + ($$($nesting, 'FORBIDDEN_STARTING_IDENTIFIER_CHARS')) + "]*[^" + ($$($nesting, 'FORBIDDEN_ENDING_IDENTIFIER_CHARS')) + "]")); - Opal.const_set($nesting[0], 'FORBIDDEN_CONST_NAME_CHARS', "\\u0001-\\u0020\\u0021-\\u002F\\u003B-\\u003F\\u0040\\u005B-\\u005E\\u0060\\u007B-\\u007F"); - Opal.const_set($nesting[0], 'CONST_NAME_REGEXP', $$($nesting, 'Regexp').$new("" + ($$($nesting, 'REGEXP_START')) + "(::)?[A-Z][^" + ($$($nesting, 'FORBIDDEN_CONST_NAME_CHARS')) + "]*" + ($$($nesting, 'REGEXP_END')))); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["opal/mini"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - self.$require("opal/base"); - self.$require("corelib/nil"); - self.$require("corelib/boolean"); - self.$require("corelib/string"); - self.$require("corelib/comparable"); - self.$require("corelib/enumerable"); - self.$require("corelib/enumerator"); - self.$require("corelib/array"); - self.$require("corelib/hash"); - self.$require("corelib/number"); - self.$require("corelib/range"); - self.$require("corelib/proc"); - self.$require("corelib/method"); - self.$require("corelib/regexp"); - self.$require("corelib/variables"); - return self.$require("opal/regexp_anchors"); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/string/encoding"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var $$11, $$14, $$17, $$20, $$23, self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$require', '$+', '$[]', '$new', '$to_proc', '$each', '$const_set', '$sub', '$==', '$default_external', '$upcase', '$raise', '$attr_accessor', '$attr_reader', '$register', '$length', '$bytes', '$to_a', '$each_byte', '$dup', '$bytesize', '$enum_for', '$coerce_to!', '$find', '$<']); - - self.$require("corelib/string"); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Encoding'); - - var $nesting = [self].concat($parent_nesting), $Encoding_register$1, $Encoding_find$3, $Encoding_initialize$4, $Encoding_ascii_compatible$ques$5, $Encoding_dummy$ques$6, $Encoding_to_s$7, $Encoding_inspect$8, $Encoding_each_byte$9, $Encoding_bytesize$10; - - self.$$prototype.ascii = self.$$prototype.dummy = self.$$prototype.name = nil; - - Opal.defineProperty(self, '$$register', {}); - Opal.defs(self, '$register', $Encoding_register$1 = function $$register(name, options) { - var $iter = $Encoding_register$1.$$p, block = $iter || nil, $a, $$2, self = this, names = nil, encoding = nil, register = nil; - - if ($iter) $Encoding_register$1.$$p = null; - - - if ($iter) $Encoding_register$1.$$p = null;; - - if (options == null) { - options = $hash2([], {}); - }; - names = $rb_plus([name], ($truthy($a = options['$[]']("aliases")) ? $a : [])); - encoding = $send($$($nesting, 'Class'), 'new', [self], block.$to_proc()).$new(name, names, ($truthy($a = options['$[]']("ascii")) ? $a : false), ($truthy($a = options['$[]']("dummy")) ? $a : false)); - register = self["$$register"]; - return $send(names, 'each', [], ($$2 = function(encoding_name){var self = $$2.$$s || this; - - - - if (encoding_name == null) { - encoding_name = nil; - }; - self.$const_set(encoding_name.$sub("-", "_"), encoding); - return register["" + "$$" + (encoding_name)] = encoding;}, $$2.$$s = self, $$2.$$arity = 1, $$2)); - }, $Encoding_register$1.$$arity = -2); - Opal.defs(self, '$find', $Encoding_find$3 = function $$find(name) { - var $a, self = this, register = nil, encoding = nil; - - - if (name['$==']("default_external")) { - return self.$default_external()}; - register = self["$$register"]; - encoding = ($truthy($a = register["" + "$$" + (name)]) ? $a : register["" + "$$" + (name.$upcase())]); - if ($truthy(encoding)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "unknown encoding name - " + (name)) - }; - return encoding; - }, $Encoding_find$3.$$arity = 1); - (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting); - - return self.$attr_accessor("default_external") - })(Opal.get_singleton_class(self), $nesting); - self.$attr_reader("name", "names"); - - Opal.def(self, '$initialize', $Encoding_initialize$4 = function $$initialize(name, names, ascii, dummy) { - var self = this; - - - self.name = name; - self.names = names; - self.ascii = ascii; - return (self.dummy = dummy); - }, $Encoding_initialize$4.$$arity = 4); - - Opal.def(self, '$ascii_compatible?', $Encoding_ascii_compatible$ques$5 = function() { - var self = this; - - return self.ascii - }, $Encoding_ascii_compatible$ques$5.$$arity = 0); - - Opal.def(self, '$dummy?', $Encoding_dummy$ques$6 = function() { - var self = this; - - return self.dummy - }, $Encoding_dummy$ques$6.$$arity = 0); - - Opal.def(self, '$to_s', $Encoding_to_s$7 = function $$to_s() { - var self = this; - - return self.name - }, $Encoding_to_s$7.$$arity = 0); - - Opal.def(self, '$inspect', $Encoding_inspect$8 = function $$inspect() { - var self = this; - - return "" + "#<Encoding:" + (self.name) + ((function() {if ($truthy(self.dummy)) { - return " (dummy)" - } else { - return nil - }; return nil; })()) + ">" - }, $Encoding_inspect$8.$$arity = 0); - - Opal.def(self, '$each_byte', $Encoding_each_byte$9 = function $$each_byte($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError')); - }, $Encoding_each_byte$9.$$arity = -1); - - Opal.def(self, '$bytesize', $Encoding_bytesize$10 = function $$bytesize($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError')); - }, $Encoding_bytesize$10.$$arity = -1); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'EncodingError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'StandardError'), $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'CompatibilityError'); - - var $nesting = [self].concat($parent_nesting); - - return nil - })($nesting[0], $$($nesting, 'EncodingError'), $nesting); - })($nesting[0], null, $nesting); - $send($$($nesting, 'Encoding'), 'register', ["UTF-8", $hash2(["aliases", "ascii"], {"aliases": ["CP65001"], "ascii": true})], ($$11 = function(){var self = $$11.$$s || this, $each_byte$12, $bytesize$13; - - - - Opal.def(self, '$each_byte', $each_byte$12 = function $$each_byte(string) { - var $iter = $each_byte$12.$$p, block = $iter || nil, self = this; - - if ($iter) $each_byte$12.$$p = null; - - - if ($iter) $each_byte$12.$$p = null;; - - var units = Infinity - var codePoint - var length = string.length - var leadSurrogate = null - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) { - Opal.yield1(block, 0xEF); - Opal.yield1(block, 0xBF); - Opal.yield1(block, 0xBD); - } - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) { - Opal.yield1(block, 0xEF); - Opal.yield1(block, 0xBF); - Opal.yield1(block, 0xBD); - } - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) { - Opal.yield1(block, 0xEF); - Opal.yield1(block, 0xBF); - Opal.yield1(block, 0xBD); - } - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) { - Opal.yield1(block, 0xEF); - Opal.yield1(block, 0xBF); - Opal.yield1(block, 0xBD); - } - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - Opal.yield1(block, codePoint); - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - Opal.yield1(block, codePoint >> 0x6 | 0xC0); - Opal.yield1(block, codePoint & 0x3F | 0x80); - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - Opal.yield1(block, codePoint >> 0xC | 0xE0); - Opal.yield1(block, codePoint >> 0x6 & 0x3F | 0x80); - Opal.yield1(block, codePoint & 0x3F | 0x80); - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - Opal.yield1(block, codePoint >> 0x12 | 0xF0); - Opal.yield1(block, codePoint >> 0xC & 0x3F | 0x80); - Opal.yield1(block, codePoint >> 0x6 & 0x3F | 0x80); - Opal.yield1(block, codePoint & 0x3F | 0x80); - } else { - // Invalid code point - } - } - ; - }, $each_byte$12.$$arity = 1); - return (Opal.def(self, '$bytesize', $bytesize$13 = function $$bytesize(string) { - var self = this; - - return string.$bytes().$length() - }, $bytesize$13.$$arity = 1), nil) && 'bytesize';}, $$11.$$s = self, $$11.$$arity = 0, $$11)); - $send($$($nesting, 'Encoding'), 'register', ["UTF-16LE"], ($$14 = function(){var self = $$14.$$s || this, $each_byte$15, $bytesize$16; - - - - Opal.def(self, '$each_byte', $each_byte$15 = function $$each_byte(string) { - var $iter = $each_byte$15.$$p, block = $iter || nil, self = this; - - if ($iter) $each_byte$15.$$p = null; - - - if ($iter) $each_byte$15.$$p = null;; - - for (var i = 0, length = string.length; i < length; i++) { - var code = string.charCodeAt(i); - - Opal.yield1(block, code & 0xff); - Opal.yield1(block, code >> 8); - } - ; - }, $each_byte$15.$$arity = 1); - return (Opal.def(self, '$bytesize', $bytesize$16 = function $$bytesize(string) { - var self = this; - - return string.$bytes().$length() - }, $bytesize$16.$$arity = 1), nil) && 'bytesize';}, $$14.$$s = self, $$14.$$arity = 0, $$14)); - $send($$($nesting, 'Encoding'), 'register', ["UTF-16BE"], ($$17 = function(){var self = $$17.$$s || this, $each_byte$18, $bytesize$19; - - - - Opal.def(self, '$each_byte', $each_byte$18 = function $$each_byte(string) { - var $iter = $each_byte$18.$$p, block = $iter || nil, self = this; - - if ($iter) $each_byte$18.$$p = null; - - - if ($iter) $each_byte$18.$$p = null;; - - for (var i = 0, length = string.length; i < length; i++) { - var code = string.charCodeAt(i); - - Opal.yield1(block, code >> 8); - Opal.yield1(block, code & 0xff); - } - ; - }, $each_byte$18.$$arity = 1); - return (Opal.def(self, '$bytesize', $bytesize$19 = function $$bytesize(string) { - var self = this; - - return string.$bytes().$length() - }, $bytesize$19.$$arity = 1), nil) && 'bytesize';}, $$17.$$s = self, $$17.$$arity = 0, $$17)); - $send($$($nesting, 'Encoding'), 'register', ["UTF-32LE"], ($$20 = function(){var self = $$20.$$s || this, $each_byte$21, $bytesize$22; - - - - Opal.def(self, '$each_byte', $each_byte$21 = function $$each_byte(string) { - var $iter = $each_byte$21.$$p, block = $iter || nil, self = this; - - if ($iter) $each_byte$21.$$p = null; - - - if ($iter) $each_byte$21.$$p = null;; - - for (var i = 0, length = string.length; i < length; i++) { - var code = string.charCodeAt(i); - - Opal.yield1(block, code & 0xff); - Opal.yield1(block, code >> 8); - } - ; - }, $each_byte$21.$$arity = 1); - return (Opal.def(self, '$bytesize', $bytesize$22 = function $$bytesize(string) { - var self = this; - - return string.$bytes().$length() - }, $bytesize$22.$$arity = 1), nil) && 'bytesize';}, $$20.$$s = self, $$20.$$arity = 0, $$20)); - $send($$($nesting, 'Encoding'), 'register', ["ASCII-8BIT", $hash2(["aliases", "ascii", "dummy"], {"aliases": ["BINARY", "US-ASCII", "ASCII"], "ascii": true, "dummy": true})], ($$23 = function(){var self = $$23.$$s || this, $each_byte$24, $bytesize$25; - - - - Opal.def(self, '$each_byte', $each_byte$24 = function $$each_byte(string) { - var $iter = $each_byte$24.$$p, block = $iter || nil, self = this; - - if ($iter) $each_byte$24.$$p = null; - - - if ($iter) $each_byte$24.$$p = null;; - - for (var i = 0, length = string.length; i < length; i++) { - var code = string.charCodeAt(i); - Opal.yield1(block, code & 0xff); - Opal.yield1(block, code >> 8); - } - ; - }, $each_byte$24.$$arity = 1); - return (Opal.def(self, '$bytesize', $bytesize$25 = function $$bytesize(string) { - var self = this; - - return string.$bytes().$length() - }, $bytesize$25.$$arity = 1), nil) && 'bytesize';}, $$23.$$s = self, $$23.$$arity = 0, $$23)); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'String'); - - var $nesting = [self].concat($parent_nesting), $String_bytes$26, $String_bytesize$27, $String_each_byte$28, $String_encode$29, $String_force_encoding$30, $String_getbyte$31, $String_valid_encoding$ques$32; - - self.$$prototype.bytes = self.$$prototype.internal_encoding = nil; - - self.$attr_reader("encoding"); - self.$attr_reader("internal_encoding"); - Opal.defineProperty(String.prototype, 'bytes', nil); - Opal.defineProperty(String.prototype, 'encoding', $$$($$($nesting, 'Encoding'), 'UTF_8')); - Opal.defineProperty(String.prototype, 'internal_encoding', $$$($$($nesting, 'Encoding'), 'UTF_8')); - - Opal.def(self, '$bytes', $String_bytes$26 = function $$bytes() { - var $a, self = this; - - - self.bytes = ($truthy($a = self.bytes) ? $a : self.$each_byte().$to_a()); - return self.bytes.$dup(); - }, $String_bytes$26.$$arity = 0); - - Opal.def(self, '$bytesize', $String_bytesize$27 = function $$bytesize() { - var self = this; - - return self.internal_encoding.$bytesize(self) - }, $String_bytesize$27.$$arity = 0); - - Opal.def(self, '$each_byte', $String_each_byte$28 = function $$each_byte() { - var $iter = $String_each_byte$28.$$p, block = $iter || nil, self = this; - - if ($iter) $String_each_byte$28.$$p = null; - - - if ($iter) $String_each_byte$28.$$p = null;; - if ((block !== nil)) { - } else { - return self.$enum_for("each_byte") - }; - $send(self.internal_encoding, 'each_byte', [self], block.$to_proc()); - return self; - }, $String_each_byte$28.$$arity = 0); - - Opal.def(self, '$encode', $String_encode$29 = function $$encode(encoding) { - var self = this; - - return Opal.enc(self, encoding); - }, $String_encode$29.$$arity = 1); - - Opal.def(self, '$force_encoding', $String_force_encoding$30 = function $$force_encoding(encoding) { - var self = this; - - - if (encoding === self.encoding) { return self; } - - encoding = $$($nesting, 'Opal')['$coerce_to!'](encoding, $$($nesting, 'String'), "to_s"); - encoding = $$($nesting, 'Encoding').$find(encoding); - - if (encoding === self.encoding) { return self; } - - self.encoding = encoding; - return self; - - }, $String_force_encoding$30.$$arity = 1); - - Opal.def(self, '$getbyte', $String_getbyte$31 = function $$getbyte(idx) { - var self = this, string_bytes = nil; - - - string_bytes = self.$bytes(); - idx = $$($nesting, 'Opal')['$coerce_to!'](idx, $$($nesting, 'Integer'), "to_int"); - if ($truthy($rb_lt(string_bytes.$length(), idx))) { - return nil}; - return string_bytes['$[]'](idx); - }, $String_getbyte$31.$$arity = 1); - return (Opal.def(self, '$valid_encoding?', $String_valid_encoding$ques$32 = function() { - var self = this; - - return true - }, $String_valid_encoding$ques$32.$$arity = 0), nil) && 'valid_encoding?'; - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/struct"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - function $rb_ge(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send; - - Opal.add_stubs(['$require', '$include', '$const_name!', '$unshift', '$map', '$coerce_to!', '$new', '$each', '$define_struct_attribute', '$allocate', '$initialize', '$alias_method', '$module_eval', '$to_proc', '$const_set', '$==', '$raise', '$<<', '$members', '$define_method', '$instance_eval', '$class', '$last', '$>', '$length', '$-', '$keys', '$any?', '$join', '$[]', '$[]=', '$each_with_index', '$hash', '$===', '$<', '$-@', '$size', '$>=', '$include?', '$to_sym', '$instance_of?', '$__id__', '$eql?', '$enum_for', '$name', '$+', '$each_pair', '$inspect', '$each_with_object', '$flatten', '$to_a', '$respond_to?', '$dig']); - - self.$require("corelib/enumerable"); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Struct'); - - var $nesting = [self].concat($parent_nesting), $Struct_new$1, $Struct_define_struct_attribute$6, $Struct_members$9, $Struct_inherited$10, $Struct_initialize$12, $Struct_members$15, $Struct_hash$16, $Struct_$$$17, $Struct_$$$eq$18, $Struct_$eq_eq$19, $Struct_eql$ques$20, $Struct_each$21, $Struct_each_pair$24, $Struct_length$27, $Struct_to_a$28, $Struct_inspect$30, $Struct_to_h$32, $Struct_values_at$34, $Struct_dig$36; - - - self.$include($$($nesting, 'Enumerable')); - Opal.defs(self, '$new', $Struct_new$1 = function(const_name, $a, $b) { - var $iter = $Struct_new$1.$$p, block = $iter || nil, $post_args, $kwargs, args, keyword_init, $$2, $$3, self = this, klass = nil; - - if ($iter) $Struct_new$1.$$p = null; - - - if ($iter) $Struct_new$1.$$p = null;; - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - $kwargs = Opal.extract_kwargs($post_args); - - if ($kwargs == null) { - $kwargs = $hash2([], {}); - } else if (!$kwargs.$$is_hash) { - throw Opal.ArgumentError.$new('expected kwargs'); - }; - - args = $post_args;; - - keyword_init = $kwargs.$$smap["keyword_init"]; - if (keyword_init == null) { - keyword_init = false - }; - if ($truthy(const_name)) { - - try { - const_name = $$($nesting, 'Opal')['$const_name!'](const_name) - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'TypeError'), $$($nesting, 'NameError')])) { - try { - - args.$unshift(const_name); - const_name = nil; - } finally { Opal.pop_exception() } - } else { throw $err; } - };}; - $send(args, 'map', [], ($$2 = function(arg){var self = $$2.$$s || this; - - - - if (arg == null) { - arg = nil; - }; - return $$($nesting, 'Opal')['$coerce_to!'](arg, $$($nesting, 'String'), "to_str");}, $$2.$$s = self, $$2.$$arity = 1, $$2)); - klass = $send($$($nesting, 'Class'), 'new', [self], ($$3 = function(){var self = $$3.$$s || this, $$4; - - - $send(args, 'each', [], ($$4 = function(arg){var self = $$4.$$s || this; - - - - if (arg == null) { - arg = nil; - }; - return self.$define_struct_attribute(arg);}, $$4.$$s = self, $$4.$$arity = 1, $$4)); - return (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $new$5; - - - - Opal.def(self, '$new', $new$5 = function($a) { - var $post_args, args, self = this, instance = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - instance = self.$allocate(); - instance.$$data = {}; - $send(instance, 'initialize', Opal.to_a(args)); - return instance; - }, $new$5.$$arity = -1); - return self.$alias_method("[]", "new"); - })(Opal.get_singleton_class(self), $nesting);}, $$3.$$s = self, $$3.$$arity = 0, $$3)); - if ($truthy(block)) { - $send(klass, 'module_eval', [], block.$to_proc())}; - klass.$$keyword_init = keyword_init; - if ($truthy(const_name)) { - $$($nesting, 'Struct').$const_set(const_name, klass)}; - return klass; - }, $Struct_new$1.$$arity = -2); - Opal.defs(self, '$define_struct_attribute', $Struct_define_struct_attribute$6 = function $$define_struct_attribute(name) { - var $$7, $$8, self = this; - - - if (self['$==']($$($nesting, 'Struct'))) { - self.$raise($$($nesting, 'ArgumentError'), "you cannot define attributes to the Struct class")}; - self.$members()['$<<'](name); - $send(self, 'define_method', [name], ($$7 = function(){var self = $$7.$$s || this; - - return self.$$data[name];}, $$7.$$s = self, $$7.$$arity = 0, $$7)); - return $send(self, 'define_method', ["" + (name) + "="], ($$8 = function(value){var self = $$8.$$s || this; - - - - if (value == null) { - value = nil; - }; - return self.$$data[name] = value;;}, $$8.$$s = self, $$8.$$arity = 1, $$8)); - }, $Struct_define_struct_attribute$6.$$arity = 1); - Opal.defs(self, '$members', $Struct_members$9 = function $$members() { - var $a, self = this; - if (self.members == null) self.members = nil; - - - if (self['$==']($$($nesting, 'Struct'))) { - self.$raise($$($nesting, 'ArgumentError'), "the Struct class has no members")}; - return (self.members = ($truthy($a = self.members) ? $a : [])); - }, $Struct_members$9.$$arity = 0); - Opal.defs(self, '$inherited', $Struct_inherited$10 = function $$inherited(klass) { - var $$11, self = this, members = nil; - if (self.members == null) self.members = nil; - - - members = self.members; - return $send(klass, 'instance_eval', [], ($$11 = function(){var self = $$11.$$s || this; - - return (self.members = members)}, $$11.$$s = self, $$11.$$arity = 0, $$11)); - }, $Struct_inherited$10.$$arity = 1); - - Opal.def(self, '$initialize', $Struct_initialize$12 = function $$initialize($a) { - var $post_args, args, $b, $$13, $$14, self = this, kwargs = nil, extra = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy(self.$class().$$keyword_init)) { - - kwargs = ($truthy($b = args.$last()) ? $b : $hash2([], {})); - if ($truthy(($truthy($b = $rb_gt(args.$length(), 1)) ? $b : (args.length === 1 && !kwargs.$$is_hash)))) { - self.$raise($$($nesting, 'ArgumentError'), "" + "wrong number of arguments (given " + (args.$length()) + ", expected 0)")}; - extra = $rb_minus(kwargs.$keys(), self.$class().$members()); - if ($truthy(extra['$any?']())) { - self.$raise($$($nesting, 'ArgumentError'), "" + "unknown keywords: " + (extra.$join(", ")))}; - return $send(self.$class().$members(), 'each', [], ($$13 = function(name){var self = $$13.$$s || this, $writer = nil; - - - - if (name == null) { - name = nil; - }; - $writer = [name, kwargs['$[]'](name)]; - $send(self, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$13.$$s = self, $$13.$$arity = 1, $$13)); - } else { - - if ($truthy($rb_gt(args.$length(), self.$class().$members().$length()))) { - self.$raise($$($nesting, 'ArgumentError'), "struct size differs")}; - return $send(self.$class().$members(), 'each_with_index', [], ($$14 = function(name, index){var self = $$14.$$s || this, $writer = nil; - - - - if (name == null) { - name = nil; - }; - - if (index == null) { - index = nil; - }; - $writer = [name, args['$[]'](index)]; - $send(self, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$14.$$s = self, $$14.$$arity = 2, $$14)); - }; - }, $Struct_initialize$12.$$arity = -1); - - Opal.def(self, '$members', $Struct_members$15 = function $$members() { - var self = this; - - return self.$class().$members() - }, $Struct_members$15.$$arity = 0); - - Opal.def(self, '$hash', $Struct_hash$16 = function $$hash() { - var self = this; - - return $$($nesting, 'Hash').$new(self.$$data).$hash() - }, $Struct_hash$16.$$arity = 0); - - Opal.def(self, '$[]', $Struct_$$$17 = function(name) { - var self = this; - - - if ($truthy($$($nesting, 'Integer')['$==='](name))) { - - if ($truthy($rb_lt(name, self.$class().$members().$size()['$-@']()))) { - self.$raise($$($nesting, 'IndexError'), "" + "offset " + (name) + " too small for struct(size:" + (self.$class().$members().$size()) + ")")}; - if ($truthy($rb_ge(name, self.$class().$members().$size()))) { - self.$raise($$($nesting, 'IndexError'), "" + "offset " + (name) + " too large for struct(size:" + (self.$class().$members().$size()) + ")")}; - name = self.$class().$members()['$[]'](name); - } else if ($truthy($$($nesting, 'String')['$==='](name))) { - - if(!self.$$data.hasOwnProperty(name)) { - self.$raise($$($nesting, 'NameError').$new("" + "no member '" + (name) + "' in struct", name)) - } - - } else { - self.$raise($$($nesting, 'TypeError'), "" + "no implicit conversion of " + (name.$class()) + " into Integer") - }; - name = $$($nesting, 'Opal')['$coerce_to!'](name, $$($nesting, 'String'), "to_str"); - return self.$$data[name];; - }, $Struct_$$$17.$$arity = 1); - - Opal.def(self, '$[]=', $Struct_$$$eq$18 = function(name, value) { - var self = this; - - - if ($truthy($$($nesting, 'Integer')['$==='](name))) { - - if ($truthy($rb_lt(name, self.$class().$members().$size()['$-@']()))) { - self.$raise($$($nesting, 'IndexError'), "" + "offset " + (name) + " too small for struct(size:" + (self.$class().$members().$size()) + ")")}; - if ($truthy($rb_ge(name, self.$class().$members().$size()))) { - self.$raise($$($nesting, 'IndexError'), "" + "offset " + (name) + " too large for struct(size:" + (self.$class().$members().$size()) + ")")}; - name = self.$class().$members()['$[]'](name); - } else if ($truthy($$($nesting, 'String')['$==='](name))) { - if ($truthy(self.$class().$members()['$include?'](name.$to_sym()))) { - } else { - self.$raise($$($nesting, 'NameError').$new("" + "no member '" + (name) + "' in struct", name)) - } - } else { - self.$raise($$($nesting, 'TypeError'), "" + "no implicit conversion of " + (name.$class()) + " into Integer") - }; - name = $$($nesting, 'Opal')['$coerce_to!'](name, $$($nesting, 'String'), "to_str"); - return self.$$data[name] = value;; - }, $Struct_$$$eq$18.$$arity = 2); - - Opal.def(self, '$==', $Struct_$eq_eq$19 = function(other) { - var self = this; - - - if ($truthy(other['$instance_of?'](self.$class()))) { - } else { - return false - }; - - var recursed1 = {}, recursed2 = {}; - - function _eqeq(struct, other) { - var key, a, b; - - recursed1[(struct).$__id__()] = true; - recursed2[(other).$__id__()] = true; - - for (key in struct.$$data) { - a = struct.$$data[key]; - b = other.$$data[key]; - - if ($$($nesting, 'Struct')['$==='](a)) { - if (!recursed1.hasOwnProperty((a).$__id__()) || !recursed2.hasOwnProperty((b).$__id__())) { - if (!_eqeq(a, b)) { - return false; - } - } - } else { - if (!(a)['$=='](b)) { - return false; - } - } - } - - return true; - } - - return _eqeq(self, other); - ; - }, $Struct_$eq_eq$19.$$arity = 1); - - Opal.def(self, '$eql?', $Struct_eql$ques$20 = function(other) { - var self = this; - - - if ($truthy(other['$instance_of?'](self.$class()))) { - } else { - return false - }; - - var recursed1 = {}, recursed2 = {}; - - function _eqeq(struct, other) { - var key, a, b; - - recursed1[(struct).$__id__()] = true; - recursed2[(other).$__id__()] = true; - - for (key in struct.$$data) { - a = struct.$$data[key]; - b = other.$$data[key]; - - if ($$($nesting, 'Struct')['$==='](a)) { - if (!recursed1.hasOwnProperty((a).$__id__()) || !recursed2.hasOwnProperty((b).$__id__())) { - if (!_eqeq(a, b)) { - return false; - } - } - } else { - if (!(a)['$eql?'](b)) { - return false; - } - } - } - - return true; - } - - return _eqeq(self, other); - ; - }, $Struct_eql$ques$20.$$arity = 1); - - Opal.def(self, '$each', $Struct_each$21 = function $$each() { - var $$22, $$23, $iter = $Struct_each$21.$$p, $yield = $iter || nil, self = this; - - if ($iter) $Struct_each$21.$$p = null; - - if (($yield !== nil)) { - } else { - return $send(self, 'enum_for', ["each"], ($$22 = function(){var self = $$22.$$s || this; - - return self.$size()}, $$22.$$s = self, $$22.$$arity = 0, $$22)) - }; - $send(self.$class().$members(), 'each', [], ($$23 = function(name){var self = $$23.$$s || this; - - - - if (name == null) { - name = nil; - }; - return Opal.yield1($yield, self['$[]'](name));;}, $$23.$$s = self, $$23.$$arity = 1, $$23)); - return self; - }, $Struct_each$21.$$arity = 0); - - Opal.def(self, '$each_pair', $Struct_each_pair$24 = function $$each_pair() { - var $$25, $$26, $iter = $Struct_each_pair$24.$$p, $yield = $iter || nil, self = this; - - if ($iter) $Struct_each_pair$24.$$p = null; - - if (($yield !== nil)) { - } else { - return $send(self, 'enum_for', ["each_pair"], ($$25 = function(){var self = $$25.$$s || this; - - return self.$size()}, $$25.$$s = self, $$25.$$arity = 0, $$25)) - }; - $send(self.$class().$members(), 'each', [], ($$26 = function(name){var self = $$26.$$s || this; - - - - if (name == null) { - name = nil; - }; - return Opal.yield1($yield, [name, self['$[]'](name)]);;}, $$26.$$s = self, $$26.$$arity = 1, $$26)); - return self; - }, $Struct_each_pair$24.$$arity = 0); - - Opal.def(self, '$length', $Struct_length$27 = function $$length() { - var self = this; - - return self.$class().$members().$length() - }, $Struct_length$27.$$arity = 0); - Opal.alias(self, "size", "length"); - - Opal.def(self, '$to_a', $Struct_to_a$28 = function $$to_a() { - var $$29, self = this; - - return $send(self.$class().$members(), 'map', [], ($$29 = function(name){var self = $$29.$$s || this; - - - - if (name == null) { - name = nil; - }; - return self['$[]'](name);}, $$29.$$s = self, $$29.$$arity = 1, $$29)) - }, $Struct_to_a$28.$$arity = 0); - Opal.alias(self, "values", "to_a"); - - Opal.def(self, '$inspect', $Struct_inspect$30 = function $$inspect() { - var $a, $$31, self = this, result = nil; - - - result = "#<struct "; - if ($truthy(($truthy($a = $$($nesting, 'Struct')['$==='](self)) ? self.$class().$name() : $a))) { - result = $rb_plus(result, "" + (self.$class()) + " ")}; - result = $rb_plus(result, $send(self.$each_pair(), 'map', [], ($$31 = function(name, value){var self = $$31.$$s || this; - - - - if (name == null) { - name = nil; - }; - - if (value == null) { - value = nil; - }; - return "" + (name) + "=" + (value.$inspect());}, $$31.$$s = self, $$31.$$arity = 2, $$31)).$join(", ")); - result = $rb_plus(result, ">"); - return result; - }, $Struct_inspect$30.$$arity = 0); - Opal.alias(self, "to_s", "inspect"); - - Opal.def(self, '$to_h', $Struct_to_h$32 = function $$to_h() { - var $$33, self = this; - - return $send(self.$class().$members(), 'each_with_object', [$hash2([], {})], ($$33 = function(name, h){var self = $$33.$$s || this, $writer = nil; - - - - if (name == null) { - name = nil; - }; - - if (h == null) { - h = nil; - }; - $writer = [name, self['$[]'](name)]; - $send(h, '[]=', Opal.to_a($writer)); - return $writer[$rb_minus($writer["length"], 1)];}, $$33.$$s = self, $$33.$$arity = 2, $$33)) - }, $Struct_to_h$32.$$arity = 0); - - Opal.def(self, '$values_at', $Struct_values_at$34 = function $$values_at($a) { - var $post_args, args, $$35, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - args = $send(args, 'map', [], ($$35 = function(arg){var self = $$35.$$s || this; - - - - if (arg == null) { - arg = nil; - }; - return arg.$$is_range ? arg.$to_a() : arg;}, $$35.$$s = self, $$35.$$arity = 1, $$35)).$flatten(); - - var result = []; - for (var i = 0, len = args.length; i < len; i++) { - if (!args[i].$$is_number) { - self.$raise($$($nesting, 'TypeError'), "" + "no implicit conversion of " + ((args[i]).$class()) + " into Integer") - } - result.push(self['$[]'](args[i])); - } - return result; - ; - }, $Struct_values_at$34.$$arity = -1); - return (Opal.def(self, '$dig', $Struct_dig$36 = function $$dig(key, $a) { - var $post_args, keys, self = this, item = nil; - - - - $post_args = Opal.slice.call(arguments, 1, arguments.length); - - keys = $post_args;; - item = (function() {if ($truthy(key.$$is_string && self.$$data.hasOwnProperty(key))) { - return self.$$data[key] || nil; - } else { - return nil - }; return nil; })(); - - if (item === nil || keys.length === 0) { - return item; - } - ; - if ($truthy(item['$respond_to?']("dig"))) { - } else { - self.$raise($$($nesting, 'TypeError'), "" + (item.$class()) + " does not have #dig method") - }; - return $send(item, 'dig', Opal.to_a(keys)); - }, $Struct_dig$36.$$arity = -2), nil) && 'dig'; - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/io"] = function(Opal) { - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $module = Opal.module, $send = Opal.send, $gvars = Opal.gvars, $truthy = Opal.truthy, $writer = nil; - - Opal.add_stubs(['$attr_accessor', '$size', '$write', '$join', '$map', '$String', '$empty?', '$concat', '$chomp', '$getbyte', '$getc', '$raise', '$new', '$write_proc=', '$-', '$extend']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'IO'); - - var $nesting = [self].concat($parent_nesting), $IO_tty$ques$1, $IO_closed$ques$2, $IO_write$3, $IO_flush$4; - - self.$$prototype.tty = self.$$prototype.closed = nil; - - Opal.const_set($nesting[0], 'SEEK_SET', 0); - Opal.const_set($nesting[0], 'SEEK_CUR', 1); - Opal.const_set($nesting[0], 'SEEK_END', 2); - - Opal.def(self, '$tty?', $IO_tty$ques$1 = function() { - var self = this; - - return self.tty - }, $IO_tty$ques$1.$$arity = 0); - - Opal.def(self, '$closed?', $IO_closed$ques$2 = function() { - var self = this; - - return self.closed - }, $IO_closed$ques$2.$$arity = 0); - self.$attr_accessor("write_proc"); - - Opal.def(self, '$write', $IO_write$3 = function $$write(string) { - var self = this; - - - self.write_proc(string); - return string.$size(); - }, $IO_write$3.$$arity = 1); - self.$attr_accessor("sync", "tty"); - - Opal.def(self, '$flush', $IO_flush$4 = function $$flush() { - var self = this; - - return nil - }, $IO_flush$4.$$arity = 0); - (function($base, $parent_nesting) { - var self = $module($base, 'Writable'); - - var $nesting = [self].concat($parent_nesting), $Writable_$lt$lt$5, $Writable_print$6, $Writable_puts$8; - - - - Opal.def(self, '$<<', $Writable_$lt$lt$5 = function(string) { - var self = this; - - - self.$write(string); - return self; - }, $Writable_$lt$lt$5.$$arity = 1); - - Opal.def(self, '$print', $Writable_print$6 = function $$print($a) { - var $post_args, args, $$7, self = this; - if ($gvars[","] == null) $gvars[","] = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - self.$write($send(args, 'map', [], ($$7 = function(arg){var self = $$7.$$s || this; - - - - if (arg == null) { - arg = nil; - }; - return self.$String(arg);}, $$7.$$s = self, $$7.$$arity = 1, $$7)).$join($gvars[","])); - return nil; - }, $Writable_print$6.$$arity = -1); - - Opal.def(self, '$puts', $Writable_puts$8 = function $$puts($a) { - var $post_args, args, $$9, self = this, newline = nil; - if ($gvars["/"] == null) $gvars["/"] = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - newline = $gvars["/"]; - if ($truthy(args['$empty?']())) { - self.$write($gvars["/"]) - } else { - self.$write($send(args, 'map', [], ($$9 = function(arg){var self = $$9.$$s || this; - - - - if (arg == null) { - arg = nil; - }; - return self.$String(arg).$chomp();}, $$9.$$s = self, $$9.$$arity = 1, $$9)).$concat([nil]).$join(newline)) - }; - return nil; - }, $Writable_puts$8.$$arity = -1); - })($nesting[0], $nesting); - return (function($base, $parent_nesting) { - var self = $module($base, 'Readable'); - - var $nesting = [self].concat($parent_nesting), $Readable_readbyte$10, $Readable_readchar$11, $Readable_readline$12, $Readable_readpartial$13; - - - - Opal.def(self, '$readbyte', $Readable_readbyte$10 = function $$readbyte() { - var self = this; - - return self.$getbyte() - }, $Readable_readbyte$10.$$arity = 0); - - Opal.def(self, '$readchar', $Readable_readchar$11 = function $$readchar() { - var self = this; - - return self.$getc() - }, $Readable_readchar$11.$$arity = 0); - - Opal.def(self, '$readline', $Readable_readline$12 = function $$readline(sep) { - var self = this; - if ($gvars["/"] == null) $gvars["/"] = nil; - - - - if (sep == null) { - sep = $gvars["/"]; - }; - return self.$raise($$($nesting, 'NotImplementedError')); - }, $Readable_readline$12.$$arity = -1); - - Opal.def(self, '$readpartial', $Readable_readpartial$13 = function $$readpartial(integer, outbuf) { - var self = this; - - - - if (outbuf == null) { - outbuf = nil; - }; - return self.$raise($$($nesting, 'NotImplementedError')); - }, $Readable_readpartial$13.$$arity = -2); - })($nesting[0], $nesting); - })($nesting[0], null, $nesting); - Opal.const_set($nesting[0], 'STDERR', ($gvars.stderr = $$($nesting, 'IO').$new())); - Opal.const_set($nesting[0], 'STDIN', ($gvars.stdin = $$($nesting, 'IO').$new())); - Opal.const_set($nesting[0], 'STDOUT', ($gvars.stdout = $$($nesting, 'IO').$new())); - var console = Opal.global.console; - - $writer = [typeof(process) === 'object' && typeof(process.stdout) === 'object' ? function(s){process.stdout.write(s)} : function(s){console.log(s)}]; - $send($$($nesting, 'STDOUT'), 'write_proc=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - - $writer = [typeof(process) === 'object' && typeof(process.stderr) === 'object' ? function(s){process.stderr.write(s)} : function(s){console.warn(s)}]; - $send($$($nesting, 'STDERR'), 'write_proc=', Opal.to_a($writer)); - $writer[$rb_minus($writer["length"], 1)];; - $$($nesting, 'STDOUT').$extend($$$($$($nesting, 'IO'), 'Writable')); - return $$($nesting, 'STDERR').$extend($$$($$($nesting, 'IO'), 'Writable')); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/main"] = function(Opal) { - var $to_s$1, $include$2, self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$include']); - - Opal.defs(self, '$to_s', $to_s$1 = function $$to_s() { - var self = this; - - return "main" - }, $to_s$1.$$arity = 0); - return (Opal.defs(self, '$include', $include$2 = function $$include(mod) { - var self = this; - - return $$($nesting, 'Object').$include(mod) - }, $include$2.$$arity = 1), nil) && 'include'; -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/dir"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$[]']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Dir'); - - var $nesting = [self].concat($parent_nesting); - - return (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $chdir$1, $pwd$2, $home$3; - - - - Opal.def(self, '$chdir', $chdir$1 = function $$chdir(dir) { - var $iter = $chdir$1.$$p, $yield = $iter || nil, self = this, prev_cwd = nil; - - if ($iter) $chdir$1.$$p = null; - return (function() { try { - - prev_cwd = Opal.current_dir; - Opal.current_dir = dir; - return Opal.yieldX($yield, []);; - } finally { - Opal.current_dir = prev_cwd - }; })() - }, $chdir$1.$$arity = 1); - - Opal.def(self, '$pwd', $pwd$2 = function $$pwd() { - var self = this; - - return Opal.current_dir || '.'; - }, $pwd$2.$$arity = 0); - Opal.alias(self, "getwd", "pwd"); - return (Opal.def(self, '$home', $home$3 = function $$home() { - var $a, self = this; - - return ($truthy($a = $$($nesting, 'ENV')['$[]']("HOME")) ? $a : ".") - }, $home$3.$$arity = 0), nil) && 'home'; - })(Opal.get_singleton_class(self), $nesting) - })($nesting[0], null, $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/file"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $range = Opal.range, $send = Opal.send; - - Opal.add_stubs(['$respond_to?', '$to_path', '$pwd', '$split', '$sub', '$+', '$unshift', '$join', '$home', '$raise', '$start_with?', '$absolute_path', '$coerce_to!', '$basename', '$empty?', '$rindex', '$[]', '$nil?', '$==', '$-', '$length', '$gsub', '$find', '$=~', '$map', '$each_with_index', '$flatten', '$reject', '$to_proc', '$end_with?']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'File'); - - var $nesting = [self].concat($parent_nesting), windows_root_rx = nil; - - - Opal.const_set($nesting[0], 'Separator', Opal.const_set($nesting[0], 'SEPARATOR', "/")); - Opal.const_set($nesting[0], 'ALT_SEPARATOR', nil); - Opal.const_set($nesting[0], 'PATH_SEPARATOR', ":"); - Opal.const_set($nesting[0], 'FNM_SYSCASE', 0); - windows_root_rx = /^[a-zA-Z]:(?:\\|\/)/; - return (function(self, $parent_nesting) { - var $nesting = [self].concat($parent_nesting), $absolute_path$1, $expand_path$2, $dirname$3, $basename$4, $extname$5, $exist$ques$6, $directory$ques$7, $join$9, $split$12; - - - - Opal.def(self, '$absolute_path', $absolute_path$1 = function $$absolute_path(path, basedir) { - var $a, self = this, sep = nil, sep_chars = nil, new_parts = nil, path_abs = nil, basedir_abs = nil, parts = nil, leading_sep = nil, abs = nil, new_path = nil; - - - - if (basedir == null) { - basedir = nil; - }; - sep = $$($nesting, 'SEPARATOR'); - sep_chars = $sep_chars(); - new_parts = []; - path = (function() {if ($truthy(path['$respond_to?']("to_path"))) { - return path.$to_path() - } else { - return path - }; return nil; })(); - basedir = ($truthy($a = basedir) ? $a : $$($nesting, 'Dir').$pwd()); - path_abs = path.substr(0, sep.length) === sep || windows_root_rx.test(path); - basedir_abs = basedir.substr(0, sep.length) === sep || windows_root_rx.test(basedir); - if ($truthy(path_abs)) { - - parts = path.$split(new RegExp("" + "[" + (sep_chars) + "]")); - leading_sep = windows_root_rx.test(path) ? '' : path.$sub(new RegExp("" + "^([" + (sep_chars) + "]+).*$"), "\\1"); - abs = true; - } else { - - parts = $rb_plus(basedir.$split(new RegExp("" + "[" + (sep_chars) + "]")), path.$split(new RegExp("" + "[" + (sep_chars) + "]"))); - leading_sep = windows_root_rx.test(basedir) ? '' : basedir.$sub(new RegExp("" + "^([" + (sep_chars) + "]+).*$"), "\\1"); - abs = basedir_abs; - }; - - var part; - for (var i = 0, ii = parts.length; i < ii; i++) { - part = parts[i]; - - if ( - (part === nil) || - (part === '' && ((new_parts.length === 0) || abs)) || - (part === '.' && ((new_parts.length === 0) || abs)) - ) { - continue; - } - if (part === '..') { - new_parts.pop(); - } else { - new_parts.push(part); - } - } - - if (!abs && parts[0] !== '.') { - new_parts.$unshift(".") - } - ; - new_path = new_parts.$join(sep); - if ($truthy(abs)) { - new_path = $rb_plus(leading_sep, new_path)}; - return new_path; - }, $absolute_path$1.$$arity = -2); - - Opal.def(self, '$expand_path', $expand_path$2 = function $$expand_path(path, basedir) { - var self = this, sep = nil, sep_chars = nil, home = nil, leading_sep = nil, home_path_regexp = nil; - - - - if (basedir == null) { - basedir = nil; - }; - sep = $$($nesting, 'SEPARATOR'); - sep_chars = $sep_chars(); - if ($truthy(path[0] === '~' || (basedir && basedir[0] === '~'))) { - - home = $$($nesting, 'Dir').$home(); - if ($truthy(home)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "couldn't find HOME environment -- expanding `~'") - }; - leading_sep = windows_root_rx.test(home) ? '' : home.$sub(new RegExp("" + "^([" + (sep_chars) + "]+).*$"), "\\1"); - if ($truthy(home['$start_with?'](leading_sep))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "non-absolute home") - }; - home = $rb_plus(home, sep); - home_path_regexp = new RegExp("" + "^\\~(?:" + (sep) + "|$)"); - path = path.$sub(home_path_regexp, home); - if ($truthy(basedir)) { - basedir = basedir.$sub(home_path_regexp, home)};}; - return self.$absolute_path(path, basedir); - }, $expand_path$2.$$arity = -2); - Opal.alias(self, "realpath", "expand_path"); - - // Coerce a given path to a path string using #to_path and #to_str - function $coerce_to_path(path) { - if ($truthy((path)['$respond_to?']("to_path"))) { - path = path.$to_path(); - } - - path = $$($nesting, 'Opal')['$coerce_to!'](path, $$($nesting, 'String'), "to_str"); - - return path; - } - - // Return a RegExp compatible char class - function $sep_chars() { - if ($$($nesting, 'ALT_SEPARATOR') === nil) { - return Opal.escape_regexp($$($nesting, 'SEPARATOR')); - } else { - return Opal.escape_regexp($rb_plus($$($nesting, 'SEPARATOR'), $$($nesting, 'ALT_SEPARATOR'))); - } - } - ; - - Opal.def(self, '$dirname', $dirname$3 = function $$dirname(path) { - var self = this, sep_chars = nil; - - - sep_chars = $sep_chars(); - path = $coerce_to_path(path); - - var absolute = path.match(new RegExp("" + "^[" + (sep_chars) + "]")); - - path = path.replace(new RegExp("" + "[" + (sep_chars) + "]+$"), ''); // remove trailing separators - path = path.replace(new RegExp("" + "[^" + (sep_chars) + "]+$"), ''); // remove trailing basename - path = path.replace(new RegExp("" + "[" + (sep_chars) + "]+$"), ''); // remove final trailing separators - - if (path === '') { - return absolute ? '/' : '.'; - } - - return path; - ; - }, $dirname$3.$$arity = 1); - - Opal.def(self, '$basename', $basename$4 = function $$basename(name, suffix) { - var self = this, sep_chars = nil; - - - - if (suffix == null) { - suffix = nil; - }; - sep_chars = $sep_chars(); - name = $coerce_to_path(name); - - if (name.length == 0) { - return name; - } - - if (suffix !== nil) { - suffix = $$($nesting, 'Opal')['$coerce_to!'](suffix, $$($nesting, 'String'), "to_str") - } else { - suffix = null; - } - - name = name.replace(new RegExp("" + "(.)[" + (sep_chars) + "]*$"), '$1'); - name = name.replace(new RegExp("" + "^(?:.*[" + (sep_chars) + "])?([^" + (sep_chars) + "]+)$"), '$1'); - - if (suffix === ".*") { - name = name.replace(/\.[^\.]+$/, ''); - } else if(suffix !== null) { - suffix = Opal.escape_regexp(suffix); - name = name.replace(new RegExp("" + (suffix) + "$"), ''); - } - - return name; - ; - }, $basename$4.$$arity = -2); - - Opal.def(self, '$extname', $extname$5 = function $$extname(path) { - var $a, self = this, filename = nil, last_dot_idx = nil; - - - path = $coerce_to_path(path); - filename = self.$basename(path); - if ($truthy(filename['$empty?']())) { - return ""}; - last_dot_idx = filename['$[]']($range(1, -1, false)).$rindex("."); - if ($truthy(($truthy($a = last_dot_idx['$nil?']()) ? $a : $rb_plus(last_dot_idx, 1)['$==']($rb_minus(filename.$length(), 1))))) { - return "" - } else { - return filename['$[]'](Opal.Range.$new($rb_plus(last_dot_idx, 1), -1, false)) - }; - }, $extname$5.$$arity = 1); - - Opal.def(self, '$exist?', $exist$ques$6 = function(path) { - var self = this; - - return Opal.modules[path] != null - }, $exist$ques$6.$$arity = 1); - Opal.alias(self, "exists?", "exist?"); - - Opal.def(self, '$directory?', $directory$ques$7 = function(path) { - var $$8, self = this, files = nil, file = nil; - - - files = []; - - for (var key in Opal.modules) { - files.push(key) - } - ; - path = path.$gsub(new RegExp("" + "(^." + ($$($nesting, 'SEPARATOR')) + "+|" + ($$($nesting, 'SEPARATOR')) + "+$)")); - file = $send(files, 'find', [], ($$8 = function(f){var self = $$8.$$s || this; - - - - if (f == null) { - f = nil; - }; - return f['$=~'](new RegExp("" + "^" + (path)));}, $$8.$$s = self, $$8.$$arity = 1, $$8)); - return file; - }, $directory$ques$7.$$arity = 1); - - Opal.def(self, '$join', $join$9 = function $$join($a) { - var $post_args, paths, $$10, $$11, self = this, result = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - paths = $post_args;; - if ($truthy(paths['$empty?']())) { - return ""}; - result = ""; - paths = $send(paths.$flatten().$each_with_index(), 'map', [], ($$10 = function(item, index){var self = $$10.$$s || this, $b; - - - - if (item == null) { - item = nil; - }; - - if (index == null) { - index = nil; - }; - if ($truthy((($b = index['$=='](0)) ? item['$empty?']() : index['$=='](0)))) { - return $$($nesting, 'SEPARATOR') - } else if ($truthy((($b = paths.$length()['$==']($rb_plus(index, 1))) ? item['$empty?']() : paths.$length()['$==']($rb_plus(index, 1))))) { - return $$($nesting, 'SEPARATOR') - } else { - return item - };}, $$10.$$s = self, $$10.$$arity = 2, $$10)); - paths = $send(paths, 'reject', [], "empty?".$to_proc()); - $send(paths, 'each_with_index', [], ($$11 = function(item, index){var self = $$11.$$s || this, $b, next_item = nil; - - - - if (item == null) { - item = nil; - }; - - if (index == null) { - index = nil; - }; - next_item = paths['$[]']($rb_plus(index, 1)); - if ($truthy(next_item['$nil?']())) { - return (result = "" + (result) + (item)) - } else { - - if ($truthy(($truthy($b = item['$end_with?']($$($nesting, 'SEPARATOR'))) ? next_item['$start_with?']($$($nesting, 'SEPARATOR')) : $b))) { - item = item.$sub(new RegExp("" + ($$($nesting, 'SEPARATOR')) + "+$"), "")}; - return (result = (function() {if ($truthy(($truthy($b = item['$end_with?']($$($nesting, 'SEPARATOR'))) ? $b : next_item['$start_with?']($$($nesting, 'SEPARATOR'))))) { - return "" + (result) + (item) - } else { - return "" + (result) + (item) + ($$($nesting, 'SEPARATOR')) - }; return nil; })()); - };}, $$11.$$s = self, $$11.$$arity = 2, $$11)); - return result; - }, $join$9.$$arity = -1); - return (Opal.def(self, '$split', $split$12 = function $$split(path) { - var self = this; - - return path.$split($$($nesting, 'SEPARATOR')) - }, $split$12.$$arity = 1), nil) && 'split'; - })(Opal.get_singleton_class(self), $nesting); - })($nesting[0], $$($nesting, 'IO'), $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/process"] = function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; - - Opal.add_stubs(['$const_set', '$size', '$<<', '$__register_clock__', '$to_f', '$now', '$new', '$[]', '$raise']); - - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Process'); - - var $nesting = [self].concat($parent_nesting), $Process___register_clock__$1, $Process_pid$2, $Process_times$3, $Process_clock_gettime$4, monotonic = nil; - - - self.__clocks__ = []; - Opal.defs(self, '$__register_clock__', $Process___register_clock__$1 = function $$__register_clock__(name, func) { - var self = this; - if (self.__clocks__ == null) self.__clocks__ = nil; - - - self.$const_set(name, self.__clocks__.$size()); - return self.__clocks__['$<<'](func); - }, $Process___register_clock__$1.$$arity = 2); - self.$__register_clock__("CLOCK_REALTIME", function() { return Date.now() }); - monotonic = false; - - if (Opal.global.performance) { - monotonic = function() { - return performance.now() - }; - } - else if (Opal.global.process && process.hrtime) { - // let now be the base to get smaller numbers - var hrtime_base = process.hrtime(); - - monotonic = function() { - var hrtime = process.hrtime(hrtime_base); - var us = (hrtime[1] / 1000) | 0; // cut below microsecs; - return ((hrtime[0] * 1000) + (us / 1000)); - }; - } - ; - if ($truthy(monotonic)) { - self.$__register_clock__("CLOCK_MONOTONIC", monotonic)}; - Opal.defs(self, '$pid', $Process_pid$2 = function $$pid() { - var self = this; - - return 0 - }, $Process_pid$2.$$arity = 0); - Opal.defs(self, '$times', $Process_times$3 = function $$times() { - var self = this, t = nil; - - - t = $$($nesting, 'Time').$now().$to_f(); - return $$$($$($nesting, 'Benchmark'), 'Tms').$new(t, t, t, t, t); - }, $Process_times$3.$$arity = 0); - return (Opal.defs(self, '$clock_gettime', $Process_clock_gettime$4 = function $$clock_gettime(clock_id, unit) { - var $a, self = this, clock = nil; - if (self.__clocks__ == null) self.__clocks__ = nil; - - - - if (unit == null) { - unit = "float_second"; - }; - ($truthy($a = (clock = self.__clocks__['$[]'](clock_id))) ? $a : self.$raise($$$($$($nesting, 'Errno'), 'EINVAL'), "" + "clock_gettime(" + (clock_id) + ") " + (self.__clocks__['$[]'](clock_id)))); - - var ms = clock(); - switch (unit) { - case 'float_second': return (ms / 1000); // number of seconds as a float (default) - case 'float_millisecond': return (ms / 1); // number of milliseconds as a float - case 'float_microsecond': return (ms * 1000); // number of microseconds as a float - case 'second': return ((ms / 1000) | 0); // number of seconds as an integer - case 'millisecond': return ((ms / 1) | 0); // number of milliseconds as an integer - case 'microsecond': return ((ms * 1000) | 0); // number of microseconds as an integer - case 'nanosecond': return ((ms * 1000000) | 0); // number of nanoseconds as an integer - default: self.$raise($$($nesting, 'ArgumentError'), "" + "unexpected unit: " + (unit)) - } - ; - }, $Process_clock_gettime$4.$$arity = -2), nil) && 'clock_gettime'; - })($nesting[0], null, $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Signal'); - - var $nesting = [self].concat($parent_nesting), $Signal_trap$5; - - return (Opal.defs(self, '$trap', $Signal_trap$5 = function $$trap($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $Signal_trap$5.$$arity = -1), nil) && 'trap' - })($nesting[0], null, $nesting); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'GC'); - - var $nesting = [self].concat($parent_nesting), $GC_start$6; - - return (Opal.defs(self, '$start', $GC_start$6 = function $$start() { - var self = this; - - return nil - }, $GC_start$6.$$arity = 0), nil) && 'start' - })($nesting[0], null, $nesting); -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/unsupported"] = function(Opal) { - var $public$35, $private$36, self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $module = Opal.module; - - Opal.add_stubs(['$raise', '$warn', '$%']); - - - var warnings = {}; - - function handle_unsupported_feature(message) { - switch (Opal.config.unsupported_features_severity) { - case 'error': - $$($nesting, 'Kernel').$raise($$($nesting, 'NotImplementedError'), message) - break; - case 'warning': - warn(message) - break; - default: // ignore - // noop - } - } - - function warn(string) { - if (warnings[string]) { - return; - } - - warnings[string] = true; - self.$warn(string); - } -; - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'String'); - - var $nesting = [self].concat($parent_nesting), $String_$lt$lt$1, $String_capitalize$excl$2, $String_chomp$excl$3, $String_chop$excl$4, $String_downcase$excl$5, $String_gsub$excl$6, $String_lstrip$excl$7, $String_next$excl$8, $String_reverse$excl$9, $String_slice$excl$10, $String_squeeze$excl$11, $String_strip$excl$12, $String_sub$excl$13, $String_succ$excl$14, $String_swapcase$excl$15, $String_tr$excl$16, $String_tr_s$excl$17, $String_upcase$excl$18, $String_prepend$19, $String_$$$eq$20, $String_clear$21, $String_encode$excl$22, $String_unicode_normalize$excl$23; - - - var ERROR = "String#%s not supported. Mutable String methods are not supported in Opal."; - - Opal.def(self, '$<<', $String_$lt$lt$1 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("<<")); - }, $String_$lt$lt$1.$$arity = -1); - - Opal.def(self, '$capitalize!', $String_capitalize$excl$2 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("capitalize!")); - }, $String_capitalize$excl$2.$$arity = -1); - - Opal.def(self, '$chomp!', $String_chomp$excl$3 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("chomp!")); - }, $String_chomp$excl$3.$$arity = -1); - - Opal.def(self, '$chop!', $String_chop$excl$4 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("chop!")); - }, $String_chop$excl$4.$$arity = -1); - - Opal.def(self, '$downcase!', $String_downcase$excl$5 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("downcase!")); - }, $String_downcase$excl$5.$$arity = -1); - - Opal.def(self, '$gsub!', $String_gsub$excl$6 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("gsub!")); - }, $String_gsub$excl$6.$$arity = -1); - - Opal.def(self, '$lstrip!', $String_lstrip$excl$7 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("lstrip!")); - }, $String_lstrip$excl$7.$$arity = -1); - - Opal.def(self, '$next!', $String_next$excl$8 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("next!")); - }, $String_next$excl$8.$$arity = -1); - - Opal.def(self, '$reverse!', $String_reverse$excl$9 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("reverse!")); - }, $String_reverse$excl$9.$$arity = -1); - - Opal.def(self, '$slice!', $String_slice$excl$10 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("slice!")); - }, $String_slice$excl$10.$$arity = -1); - - Opal.def(self, '$squeeze!', $String_squeeze$excl$11 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("squeeze!")); - }, $String_squeeze$excl$11.$$arity = -1); - - Opal.def(self, '$strip!', $String_strip$excl$12 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("strip!")); - }, $String_strip$excl$12.$$arity = -1); - - Opal.def(self, '$sub!', $String_sub$excl$13 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("sub!")); - }, $String_sub$excl$13.$$arity = -1); - - Opal.def(self, '$succ!', $String_succ$excl$14 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("succ!")); - }, $String_succ$excl$14.$$arity = -1); - - Opal.def(self, '$swapcase!', $String_swapcase$excl$15 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("swapcase!")); - }, $String_swapcase$excl$15.$$arity = -1); - - Opal.def(self, '$tr!', $String_tr$excl$16 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("tr!")); - }, $String_tr$excl$16.$$arity = -1); - - Opal.def(self, '$tr_s!', $String_tr_s$excl$17 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("tr_s!")); - }, $String_tr_s$excl$17.$$arity = -1); - - Opal.def(self, '$upcase!', $String_upcase$excl$18 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("upcase!")); - }, $String_upcase$excl$18.$$arity = -1); - - Opal.def(self, '$prepend', $String_prepend$19 = function $$prepend($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("prepend")); - }, $String_prepend$19.$$arity = -1); - - Opal.def(self, '$[]=', $String_$$$eq$20 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("[]=")); - }, $String_$$$eq$20.$$arity = -1); - - Opal.def(self, '$clear', $String_clear$21 = function $$clear($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("clear")); - }, $String_clear$21.$$arity = -1); - - Opal.def(self, '$encode!', $String_encode$excl$22 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("encode!")); - }, $String_encode$excl$22.$$arity = -1); - return (Opal.def(self, '$unicode_normalize!', $String_unicode_normalize$excl$23 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), (ERROR)['$%']("unicode_normalize!")); - }, $String_unicode_normalize$excl$23.$$arity = -1), nil) && 'unicode_normalize!'; - })($nesting[0], null, $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Kernel'); - - var $nesting = [self].concat($parent_nesting), $Kernel_freeze$24, $Kernel_frozen$ques$25; - - - var ERROR = "Object freezing is not supported by Opal"; - - Opal.def(self, '$freeze', $Kernel_freeze$24 = function $$freeze() { - var self = this; - - - handle_unsupported_feature(ERROR); - return self; - }, $Kernel_freeze$24.$$arity = 0); - - Opal.def(self, '$frozen?', $Kernel_frozen$ques$25 = function() { - var self = this; - - - handle_unsupported_feature(ERROR); - return false; - }, $Kernel_frozen$ques$25.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Kernel'); - - var $nesting = [self].concat($parent_nesting), $Kernel_taint$26, $Kernel_untaint$27, $Kernel_tainted$ques$28; - - - var ERROR = "Object tainting is not supported by Opal"; - - Opal.def(self, '$taint', $Kernel_taint$26 = function $$taint() { - var self = this; - - - handle_unsupported_feature(ERROR); - return self; - }, $Kernel_taint$26.$$arity = 0); - - Opal.def(self, '$untaint', $Kernel_untaint$27 = function $$untaint() { - var self = this; - - - handle_unsupported_feature(ERROR); - return self; - }, $Kernel_untaint$27.$$arity = 0); - - Opal.def(self, '$tainted?', $Kernel_tainted$ques$28 = function() { - var self = this; - - - handle_unsupported_feature(ERROR); - return false; - }, $Kernel_tainted$ques$28.$$arity = 0); - })($nesting[0], $nesting); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Module'); - - var $nesting = [self].concat($parent_nesting), $Module_public$29, $Module_private_class_method$30, $Module_private_method_defined$ques$31, $Module_private_constant$32; - - - - Opal.def(self, '$public', $Module_public$29 = function($a) { - var $post_args, methods, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - methods = $post_args;; - - if (methods.length === 0) { - self.$$module_function = false; - } - - return nil; - ; - }, $Module_public$29.$$arity = -1); - Opal.alias(self, "private", "public"); - Opal.alias(self, "protected", "public"); - Opal.alias(self, "nesting", "public"); - - Opal.def(self, '$private_class_method', $Module_private_class_method$30 = function $$private_class_method($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self; - }, $Module_private_class_method$30.$$arity = -1); - Opal.alias(self, "public_class_method", "private_class_method"); - - Opal.def(self, '$private_method_defined?', $Module_private_method_defined$ques$31 = function(obj) { - var self = this; - - return false - }, $Module_private_method_defined$ques$31.$$arity = 1); - - Opal.def(self, '$private_constant', $Module_private_constant$32 = function $$private_constant($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $Module_private_constant$32.$$arity = -1); - Opal.alias(self, "protected_method_defined?", "private_method_defined?"); - Opal.alias(self, "public_instance_methods", "instance_methods"); - Opal.alias(self, "public_instance_method", "instance_method"); - return Opal.alias(self, "public_method_defined?", "method_defined?"); - })($nesting[0], null, $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Kernel'); - - var $nesting = [self].concat($parent_nesting), $Kernel_private_methods$33; - - - - Opal.def(self, '$private_methods', $Kernel_private_methods$33 = function $$private_methods($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return []; - }, $Kernel_private_methods$33.$$arity = -1); - Opal.alias(self, "private_instance_methods", "private_methods"); - })($nesting[0], $nesting); - (function($base, $parent_nesting) { - var self = $module($base, 'Kernel'); - - var $nesting = [self].concat($parent_nesting), $Kernel_eval$34; - - - Opal.def(self, '$eval', $Kernel_eval$34 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return self.$raise($$($nesting, 'NotImplementedError'), "" + "To use Kernel#eval, you must first require 'opal-parser'. " + ("" + "See https://github.com/opal/opal/blob/" + ($$($nesting, 'RUBY_ENGINE_VERSION')) + "/docs/opal_parser.md for details.")); - }, $Kernel_eval$34.$$arity = -1) - })($nesting[0], $nesting); - Opal.defs(self, '$public', $public$35 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $public$35.$$arity = -1); - return (Opal.defs(self, '$private', $private$36 = function($a) { - var $post_args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - ; - return nil; - }, $private$36.$$arity = -1), nil) && 'private'; -}; - -/* Generated by Opal 0.11.99.dev */ -(function(Opal) { - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; - - Opal.add_stubs(['$require']); - - self.$require("opal/base"); - self.$require("opal/mini"); - self.$require("corelib/string/encoding"); - self.$require("corelib/struct"); - self.$require("corelib/io"); - self.$require("corelib/main"); - self.$require("corelib/dir"); - self.$require("corelib/file"); - self.$require("corelib/process"); - return self.$require("corelib/unsupported"); -})(Opal); diff --git a/node_modules/asciidoctor-opal-runtime/src/pathname.js b/node_modules/asciidoctor-opal-runtime/src/pathname.js deleted file mode 100644 index 76fec751..00000000 --- a/node_modules/asciidoctor-opal-runtime/src/pathname.js +++ /dev/null @@ -1,513 +0,0 @@ -/* Generated by Opal 0.11.99.dev */ -Opal.modules["corelib/comparable"] = function(Opal) { - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_lt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy; - - Opal.add_stubs(['$===', '$>', '$<', '$equal?', '$<=>', '$normalize', '$raise', '$class']); - return (function($base, $parent_nesting) { - var self = $module($base, 'Comparable'); - - var $nesting = [self].concat($parent_nesting), $Comparable_normalize$1, $Comparable_$eq_eq$2, $Comparable_$gt$3, $Comparable_$gt_eq$4, $Comparable_$lt$5, $Comparable_$lt_eq$6, $Comparable_between$ques$7, $Comparable_clamp$8; - - - Opal.defs(self, '$normalize', $Comparable_normalize$1 = function $$normalize(what) { - var self = this; - - - if ($truthy($$($nesting, 'Integer')['$==='](what))) { - return what}; - if ($truthy($rb_gt(what, 0))) { - return 1}; - if ($truthy($rb_lt(what, 0))) { - return -1}; - return 0; - }, $Comparable_normalize$1.$$arity = 1); - - Opal.def(self, '$==', $Comparable_$eq_eq$2 = function(other) { - var self = this, cmp = nil; - - try { - - if ($truthy(self['$equal?'](other))) { - return true}; - - if (self["$<=>"] == Opal.Kernel["$<=>"]) { - return false; - } - - // check for infinite recursion - if (self.$$comparable) { - delete self.$$comparable; - return false; - } - ; - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - return false - }; - return $$($nesting, 'Comparable').$normalize(cmp) == 0; - } catch ($err) { - if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { - try { - return false - } finally { Opal.pop_exception() } - } else { throw $err; } - } - }, $Comparable_$eq_eq$2.$$arity = 1); - - Opal.def(self, '$>', $Comparable_$gt$3 = function(other) { - var self = this, cmp = nil; - - - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed") - }; - return $$($nesting, 'Comparable').$normalize(cmp) > 0; - }, $Comparable_$gt$3.$$arity = 1); - - Opal.def(self, '$>=', $Comparable_$gt_eq$4 = function(other) { - var self = this, cmp = nil; - - - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed") - }; - return $$($nesting, 'Comparable').$normalize(cmp) >= 0; - }, $Comparable_$gt_eq$4.$$arity = 1); - - Opal.def(self, '$<', $Comparable_$lt$5 = function(other) { - var self = this, cmp = nil; - - - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed") - }; - return $$($nesting, 'Comparable').$normalize(cmp) < 0; - }, $Comparable_$lt$5.$$arity = 1); - - Opal.def(self, '$<=', $Comparable_$lt_eq$6 = function(other) { - var self = this, cmp = nil; - - - if ($truthy((cmp = self['$<=>'](other)))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (self.$class()) + " with " + (other.$class()) + " failed") - }; - return $$($nesting, 'Comparable').$normalize(cmp) <= 0; - }, $Comparable_$lt_eq$6.$$arity = 1); - - Opal.def(self, '$between?', $Comparable_between$ques$7 = function(min, max) { - var self = this; - - - if ($rb_lt(self, min)) { - return false}; - if ($rb_gt(self, max)) { - return false}; - return true; - }, $Comparable_between$ques$7.$$arity = 2); - - Opal.def(self, '$clamp', $Comparable_clamp$8 = function $$clamp(min, max) { - var self = this, cmp = nil; - - - cmp = min['$<=>'](max); - if ($truthy(cmp)) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "comparison of " + (min.$class()) + " with " + (max.$class()) + " failed") - }; - if ($truthy($rb_gt($$($nesting, 'Comparable').$normalize(cmp), 0))) { - self.$raise($$($nesting, 'ArgumentError'), "min argument must be smaller than max argument")}; - if ($truthy($rb_lt($$($nesting, 'Comparable').$normalize(self['$<=>'](min)), 0))) { - return min}; - if ($truthy($rb_gt($$($nesting, 'Comparable').$normalize(self['$<=>'](max)), 0))) { - return max}; - return self; - }, $Comparable_clamp$8.$$arity = 2); - })($nesting[0], $nesting) -}; - -/* Generated by Opal 0.11.99.dev */ -Opal.modules["pathname"] = function(Opal) { - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send, $module = Opal.module; - - Opal.add_stubs(['$require', '$include', '$quote', '$===', '$to_s', '$path', '$respond_to?', '$to_path', '$is_a?', '$nil?', '$raise', '$class', '$==', '$attr_reader', '$!', '$relative?', '$chop_basename', '$basename', '$=~', '$new', '$source', '$[]', '$rindex', '$sub', '$absolute?', '$expand_path', '$plus', '$unshift', '$length', '$!=', '$empty?', '$first', '$shift', '$+', '$join', '$dirname', '$pop', '$reverse_each', '$directory?', '$extname', '$<=>', '$nonzero?', '$proc', '$casecmp', '$cleanpath', '$inspect', '$include?', '$fill', '$map', '$entries']); - - self.$require("corelib/comparable"); - (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'Pathname'); - - var $nesting = [self].concat($parent_nesting), $Pathname_initialize$1, $Pathname_$eq_eq$2, $Pathname_absolute$ques$3, $Pathname_relative$ques$4, $Pathname_chop_basename$5, $Pathname_root$ques$6, $Pathname_parent$7, $Pathname_sub$8, $Pathname_cleanpath$9, $Pathname_to_path$10, $Pathname_hash$11, $Pathname_expand_path$12, $Pathname_$plus$13, $Pathname_plus$14, $Pathname_join$15, $Pathname_split$17, $Pathname_dirname$18, $Pathname_basename$19, $Pathname_directory$ques$20, $Pathname_extname$21, $Pathname_$lt_eq_gt$22, $Pathname$23, $Pathname$24, $Pathname_relative_path_from$25, $Pathname_entries$26; - - self.$$prototype.path = nil; - - self.$include($$($nesting, 'Comparable')); - Opal.const_set($nesting[0], 'SEPARATOR_PAT', new RegExp($$($nesting, 'Regexp').$quote($$$($$($nesting, 'File'), 'SEPARATOR')))); - - Opal.def(self, '$initialize', $Pathname_initialize$1 = function $$initialize(path) { - var self = this; - - - if ($truthy($$($nesting, 'Pathname')['$==='](path))) { - self.path = path.$path().$to_s() - } else if ($truthy(path['$respond_to?']("to_path"))) { - self.path = path.$to_path() - } else if ($truthy(path['$is_a?']($$($nesting, 'String')))) { - self.path = path - } else if ($truthy(path['$nil?']())) { - self.$raise($$($nesting, 'TypeError'), "no implicit conversion of nil into String") - } else { - self.$raise($$($nesting, 'TypeError'), "" + "no implicit conversion of " + (path.$class()) + " into String") - }; - if (self.path['$==']("\u0000")) { - return self.$raise($$($nesting, 'ArgumentError')) - } else { - return nil - }; - }, $Pathname_initialize$1.$$arity = 1); - self.$attr_reader("path"); - - Opal.def(self, '$==', $Pathname_$eq_eq$2 = function(other) { - var self = this; - - return other.$path()['$=='](self.path) - }, $Pathname_$eq_eq$2.$$arity = 1); - - Opal.def(self, '$absolute?', $Pathname_absolute$ques$3 = function() { - var self = this; - - return self['$relative?']()['$!']() - }, $Pathname_absolute$ques$3.$$arity = 0); - - Opal.def(self, '$relative?', $Pathname_relative$ques$4 = function() { - var $a, $b, $c, self = this, path = nil, r = nil; - - - path = self.path; - while ($truthy((r = self.$chop_basename(path)))) { - $c = r, $b = Opal.to_ary($c), (path = ($b[0] == null ? nil : $b[0])), $c - }; - return path['$=='](""); - }, $Pathname_relative$ques$4.$$arity = 0); - - Opal.def(self, '$chop_basename', $Pathname_chop_basename$5 = function $$chop_basename(path) { - var self = this, base = nil; - - - base = $$($nesting, 'File').$basename(path); - if ($truthy($$($nesting, 'Regexp').$new("" + "^" + ($$$($$($nesting, 'Pathname'), 'SEPARATOR_PAT').$source()) + "?$")['$=~'](base))) { - return nil - } else { - return [path['$[]'](0, path.$rindex(base)), base] - }; - }, $Pathname_chop_basename$5.$$arity = 1); - - Opal.def(self, '$root?', $Pathname_root$ques$6 = function() { - var self = this; - - return self.path['$==']("/") - }, $Pathname_root$ques$6.$$arity = 0); - - Opal.def(self, '$parent', $Pathname_parent$7 = function $$parent() { - var self = this, new_path = nil; - - - new_path = self.path.$sub(/\/([^\/]+\/?$)/, ""); - if (new_path['$==']("")) { - new_path = (function() {if ($truthy(self['$absolute?']())) { - return "/" - } else { - return "." - }; return nil; })()}; - return $$($nesting, 'Pathname').$new(new_path); - }, $Pathname_parent$7.$$arity = 0); - - Opal.def(self, '$sub', $Pathname_sub$8 = function $$sub($a) { - var $post_args, args, self = this; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - return $$($nesting, 'Pathname').$new($send(self.path, 'sub', Opal.to_a(args))); - }, $Pathname_sub$8.$$arity = -1); - - Opal.def(self, '$cleanpath', $Pathname_cleanpath$9 = function $$cleanpath() { - var self = this; - - return Opal.normalize(self.path) - }, $Pathname_cleanpath$9.$$arity = 0); - - Opal.def(self, '$to_path', $Pathname_to_path$10 = function $$to_path() { - var self = this; - - return self.path - }, $Pathname_to_path$10.$$arity = 0); - - Opal.def(self, '$hash', $Pathname_hash$11 = function $$hash() { - var self = this; - - return self.path - }, $Pathname_hash$11.$$arity = 0); - - Opal.def(self, '$expand_path', $Pathname_expand_path$12 = function $$expand_path() { - var self = this; - - return $$($nesting, 'Pathname').$new($$($nesting, 'File').$expand_path(self.path)) - }, $Pathname_expand_path$12.$$arity = 0); - - Opal.def(self, '$+', $Pathname_$plus$13 = function(other) { - var self = this; - - - if ($truthy($$($nesting, 'Pathname')['$==='](other))) { - } else { - other = $$($nesting, 'Pathname').$new(other) - }; - return $$($nesting, 'Pathname').$new(self.$plus(self.path, other.$to_s())); - }, $Pathname_$plus$13.$$arity = 1); - - Opal.def(self, '$plus', $Pathname_plus$14 = function $$plus(path1, path2) { - var $a, $b, $c, self = this, prefix2 = nil, index_list2 = nil, basename_list2 = nil, r2 = nil, basename2 = nil, prefix1 = nil, r1 = nil, basename1 = nil, suffix2 = nil; - - - prefix2 = path2; - index_list2 = []; - basename_list2 = []; - while ($truthy((r2 = self.$chop_basename(prefix2)))) { - - $c = r2, $b = Opal.to_ary($c), (prefix2 = ($b[0] == null ? nil : $b[0])), (basename2 = ($b[1] == null ? nil : $b[1])), $c; - index_list2.$unshift(prefix2.$length()); - basename_list2.$unshift(basename2); - }; - if ($truthy(prefix2['$!='](""))) { - return path2}; - prefix1 = path1; - while ($truthy(true)) { - - while ($truthy(($truthy($c = basename_list2['$empty?']()['$!']()) ? basename_list2.$first()['$=='](".") : $c))) { - - index_list2.$shift(); - basename_list2.$shift(); - }; - if ($truthy((r1 = self.$chop_basename(prefix1)))) { - } else { - break; - }; - $c = r1, $b = Opal.to_ary($c), (prefix1 = ($b[0] == null ? nil : $b[0])), (basename1 = ($b[1] == null ? nil : $b[1])), $c; - if (basename1['$=='](".")) { - continue;}; - if ($truthy(($truthy($b = ($truthy($c = basename1['$==']("..")) ? $c : basename_list2['$empty?']())) ? $b : basename_list2.$first()['$!=']("..")))) { - - prefix1 = $rb_plus(prefix1, basename1); - break;;}; - index_list2.$shift(); - basename_list2.$shift(); - }; - r1 = self.$chop_basename(prefix1); - if ($truthy(($truthy($a = r1['$!']()) ? new RegExp($$($nesting, 'SEPARATOR_PAT'))['$=~']($$($nesting, 'File').$basename(prefix1)) : $a))) { - while ($truthy(($truthy($b = basename_list2['$empty?']()['$!']()) ? basename_list2.$first()['$==']("..") : $b))) { - - index_list2.$shift(); - basename_list2.$shift(); - }}; - if ($truthy(basename_list2['$empty?']()['$!']())) { - - suffix2 = path2['$[]'](Opal.Range.$new(index_list2.$first(), -1, false)); - if ($truthy(r1)) { - return $$($nesting, 'File').$join(prefix1, suffix2) - } else { - return $rb_plus(prefix1, suffix2) - }; - } else if ($truthy(r1)) { - return prefix1 - } else { - return $$($nesting, 'File').$dirname(prefix1) - }; - }, $Pathname_plus$14.$$arity = 2); - - Opal.def(self, '$join', $Pathname_join$15 = function $$join($a) {try { - - var $post_args, args, $$16, self = this, result = nil; - - - - $post_args = Opal.slice.call(arguments, 0, arguments.length); - - args = $post_args;; - if ($truthy(args['$empty?']())) { - return self}; - result = args.$pop(); - if ($truthy($$($nesting, 'Pathname')['$==='](result))) { - } else { - result = $$($nesting, 'Pathname').$new(result) - }; - if ($truthy(result['$absolute?']())) { - return result}; - $send(args, 'reverse_each', [], ($$16 = function(arg){var self = $$16.$$s || this; - - - - if (arg == null) { - arg = nil; - }; - if ($truthy($$($nesting, 'Pathname')['$==='](arg))) { - } else { - arg = $$($nesting, 'Pathname').$new(arg) - }; - result = $rb_plus(arg, result); - if ($truthy(result['$absolute?']())) { - Opal.ret(result) - } else { - return nil - };}, $$16.$$s = self, $$16.$$arity = 1, $$16)); - return $rb_plus(self, result); - } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } - }, $Pathname_join$15.$$arity = -1); - - Opal.def(self, '$split', $Pathname_split$17 = function $$split() { - var self = this; - - return [self.$dirname(), self.$basename()] - }, $Pathname_split$17.$$arity = 0); - - Opal.def(self, '$dirname', $Pathname_dirname$18 = function $$dirname() { - var self = this; - - return $$($nesting, 'Pathname').$new($$($nesting, 'File').$dirname(self.path)) - }, $Pathname_dirname$18.$$arity = 0); - - Opal.def(self, '$basename', $Pathname_basename$19 = function $$basename() { - var self = this; - - return $$($nesting, 'Pathname').$new($$($nesting, 'File').$basename(self.path)) - }, $Pathname_basename$19.$$arity = 0); - - Opal.def(self, '$directory?', $Pathname_directory$ques$20 = function() { - var self = this; - - return $$($nesting, 'File')['$directory?'](self.path) - }, $Pathname_directory$ques$20.$$arity = 0); - - Opal.def(self, '$extname', $Pathname_extname$21 = function $$extname() { - var self = this; - - return $$($nesting, 'File').$extname(self.path) - }, $Pathname_extname$21.$$arity = 0); - - Opal.def(self, '$<=>', $Pathname_$lt_eq_gt$22 = function(other) { - var self = this; - - return self.$path()['$<=>'](other.$path()) - }, $Pathname_$lt_eq_gt$22.$$arity = 1); - Opal.alias(self, "eql?", "=="); - Opal.alias(self, "===", "=="); - Opal.alias(self, "to_str", "to_path"); - Opal.alias(self, "to_s", "to_path"); - Opal.const_set($nesting[0], 'SAME_PATHS', (function() {if ($truthy($$$($$($nesting, 'File'), 'FNM_SYSCASE')['$nonzero?']())) { - return $send(self, 'proc', [], ($Pathname$23 = function(a, b){var self = $Pathname$23.$$s || this; - - - - if (a == null) { - a = nil; - }; - - if (b == null) { - b = nil; - }; - return a.$casecmp(b)['$=='](0);}, $Pathname$23.$$s = self, $Pathname$23.$$arity = 2, $Pathname$23)) - } else { - return $send(self, 'proc', [], ($Pathname$24 = function(a, b){var self = $Pathname$24.$$s || this; - - - - if (a == null) { - a = nil; - }; - - if (b == null) { - b = nil; - }; - return a['$=='](b);}, $Pathname$24.$$s = self, $Pathname$24.$$arity = 2, $Pathname$24)) - }; return nil; })()); - - Opal.def(self, '$relative_path_from', $Pathname_relative_path_from$25 = function $$relative_path_from(base_directory) { - var $a, $b, $c, self = this, dest_directory = nil, dest_prefix = nil, dest_names = nil, r = nil, basename = nil, base_prefix = nil, base_names = nil, relpath_names = nil; - - - dest_directory = self.$cleanpath().$to_s(); - base_directory = base_directory.$cleanpath().$to_s(); - dest_prefix = dest_directory; - dest_names = []; - while ($truthy((r = self.$chop_basename(dest_prefix)))) { - - $c = r, $b = Opal.to_ary($c), (dest_prefix = ($b[0] == null ? nil : $b[0])), (basename = ($b[1] == null ? nil : $b[1])), $c; - if ($truthy(basename['$!=']("."))) { - dest_names.$unshift(basename)}; - }; - base_prefix = base_directory; - base_names = []; - while ($truthy((r = self.$chop_basename(base_prefix)))) { - - $c = r, $b = Opal.to_ary($c), (base_prefix = ($b[0] == null ? nil : $b[0])), (basename = ($b[1] == null ? nil : $b[1])), $c; - if ($truthy(basename['$!=']("."))) { - base_names.$unshift(basename)}; - }; - if ($truthy($$($nesting, 'SAME_PATHS')['$[]'](dest_prefix, base_prefix))) { - } else { - self.$raise($$($nesting, 'ArgumentError'), "" + "different prefix: " + (dest_prefix.$inspect()) + " and " + (base_directory.$inspect())) - }; - while ($truthy(($truthy($b = ($truthy($c = dest_names['$empty?']()['$!']()) ? base_names['$empty?']()['$!']() : $c)) ? $$($nesting, 'SAME_PATHS')['$[]'](dest_names.$first(), base_names.$first()) : $b))) { - - dest_names.$shift(); - base_names.$shift(); - }; - if ($truthy(base_names['$include?'](".."))) { - self.$raise($$($nesting, 'ArgumentError'), "" + "base_directory has ..: " + (base_directory.$inspect()))}; - base_names.$fill(".."); - relpath_names = $rb_plus(base_names, dest_names); - if ($truthy(relpath_names['$empty?']())) { - return $$($nesting, 'Pathname').$new(".") - } else { - return $$($nesting, 'Pathname').$new($send($$($nesting, 'File'), 'join', Opal.to_a(relpath_names))) - }; - }, $Pathname_relative_path_from$25.$$arity = 1); - return (Opal.def(self, '$entries', $Pathname_entries$26 = function $$entries() { - var $$27, self = this; - - return $send($$($nesting, 'Dir').$entries(self.path), 'map', [], ($$27 = function(f){var self = $$27.$$s || this; - - - - if (f == null) { - f = nil; - }; - return self.$class().$new(f);}, $$27.$$s = self, $$27.$$arity = 1, $$27)) - }, $Pathname_entries$26.$$arity = 0), nil) && 'entries'; - })($nesting[0], null, $nesting); - return (function($base, $parent_nesting) { - var self = $module($base, 'Kernel'); - - var $nesting = [self].concat($parent_nesting), $Kernel_Pathname$28; - - - Opal.def(self, '$Pathname', $Kernel_Pathname$28 = function $$Pathname(path) { - var self = this; - - return $$($nesting, 'Pathname').$new(path) - }, $Kernel_Pathname$28.$$arity = 1) - })($nesting[0], $nesting); -}; diff --git a/node_modules/asciidoctor-opal-runtime/src/stringio.js b/node_modules/asciidoctor-opal-runtime/src/stringio.js deleted file mode 100644 index 4ada066e..00000000 --- a/node_modules/asciidoctor-opal-runtime/src/stringio.js +++ /dev/null @@ -1,328 +0,0 @@ -/* Generated by Opal 0.11.99.dev */ -Opal.modules["stringio"] = function(Opal) { - function $rb_ge(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs); - } - function $rb_gt(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); - } - function $rb_plus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); - } - function $rb_minus(lhs, rhs) { - return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); - } - var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $gvars = Opal.gvars; - - Opal.add_stubs(['$include', '$new', '$call', '$close', '$attr_accessor', '$length', '$include?', '$!', '$check_readable', '$==', '$===', '$>=', '$raise', '$>', '$+', '$-', '$seek', '$enum_for', '$eof?', '$ord', '$[]', '$to_str', '$chomp', '$check_writable', '$String', '$write', '$closed_write?', '$closed_read?']); - return (function($base, $super, $parent_nesting) { - var self = $klass($base, $super, 'StringIO'); - - var $nesting = [self].concat($parent_nesting), $StringIO_open$1, $StringIO_initialize$2, $StringIO_eof$ques$3, $StringIO_seek$4, $StringIO_tell$5, $StringIO_rewind$6, $StringIO_each_byte$7, $StringIO_each_char$8, $StringIO_each$9, $StringIO_write$10, $StringIO_read$11, $StringIO_close$12, $StringIO_close_read$13, $StringIO_close_write$14, $StringIO_closed$ques$15, $StringIO_closed_read$ques$16, $StringIO_closed_write$ques$17, $StringIO_check_writable$18, $StringIO_check_readable$19; - - self.$$prototype.position = self.$$prototype.string = self.$$prototype.closed = nil; - - self.$include($$$($$($nesting, 'IO'), 'Readable')); - self.$include($$$($$($nesting, 'IO'), 'Writable')); - Opal.defs(self, '$open', $StringIO_open$1 = function $$open(string, mode) { - var $iter = $StringIO_open$1.$$p, block = $iter || nil, self = this, io = nil, res = nil; - - if ($iter) $StringIO_open$1.$$p = null; - - - if ($iter) $StringIO_open$1.$$p = null;; - - if (string == null) { - string = ""; - }; - - if (mode == null) { - mode = nil; - }; - io = self.$new(string, mode); - res = block.$call(io); - io.$close(); - return res; - }, $StringIO_open$1.$$arity = -1); - self.$attr_accessor("string"); - - Opal.def(self, '$initialize', $StringIO_initialize$2 = function $$initialize(string, mode) { - var $a, self = this; - - - - if (string == null) { - string = ""; - }; - - if (mode == null) { - mode = "rw"; - }; - self.string = string; - self.position = string.$length(); - if ($truthy(($truthy($a = mode['$include?']("r")) ? mode['$include?']("w")['$!']() : $a))) { - return (self.closed = "write") - } else if ($truthy(($truthy($a = mode['$include?']("w")) ? mode['$include?']("r")['$!']() : $a))) { - return (self.closed = "read") - } else { - return nil - }; - }, $StringIO_initialize$2.$$arity = -1); - - Opal.def(self, '$eof?', $StringIO_eof$ques$3 = function() { - var self = this; - - - self.$check_readable(); - return self.position['$=='](self.string.$length()); - }, $StringIO_eof$ques$3.$$arity = 0); - Opal.alias(self, "eof", "eof?"); - - Opal.def(self, '$seek', $StringIO_seek$4 = function $$seek(pos, whence) { - var self = this, $case = nil; - - - - if (whence == null) { - whence = $$$($$($nesting, 'IO'), 'SEEK_SET'); - }; - $case = whence; - if ($$$($$($nesting, 'IO'), 'SEEK_SET')['$===']($case)) { - if ($truthy($rb_ge(pos, 0))) { - } else { - self.$raise($$$($$($nesting, 'Errno'), 'EINVAL')) - }; - self.position = pos;} - else if ($$$($$($nesting, 'IO'), 'SEEK_CUR')['$===']($case)) {if ($truthy($rb_gt($rb_plus(self.position, pos), self.string.$length()))) { - self.position = self.string.$length() - } else { - self.position = $rb_plus(self.position, pos) - }} - else if ($$$($$($nesting, 'IO'), 'SEEK_END')['$===']($case)) {if ($truthy($rb_gt(pos, self.string.$length()))) { - self.position = 0 - } else { - self.position = $rb_minus(self.position, pos) - }}; - return 0; - }, $StringIO_seek$4.$$arity = -2); - - Opal.def(self, '$tell', $StringIO_tell$5 = function $$tell() { - var self = this; - - return self.position - }, $StringIO_tell$5.$$arity = 0); - Opal.alias(self, "pos", "tell"); - Opal.alias(self, "pos=", "seek"); - - Opal.def(self, '$rewind', $StringIO_rewind$6 = function $$rewind() { - var self = this; - - return self.$seek(0) - }, $StringIO_rewind$6.$$arity = 0); - - Opal.def(self, '$each_byte', $StringIO_each_byte$7 = function $$each_byte() { - var $iter = $StringIO_each_byte$7.$$p, block = $iter || nil, $a, self = this, i = nil; - - if ($iter) $StringIO_each_byte$7.$$p = null; - - - if ($iter) $StringIO_each_byte$7.$$p = null;; - if ($truthy(block)) { - } else { - return self.$enum_for("each_byte") - }; - self.$check_readable(); - i = self.position; - while (!($truthy(self['$eof?']()))) { - - block.$call(self.string['$[]'](i).$ord()); - i = $rb_plus(i, 1); - }; - return self; - }, $StringIO_each_byte$7.$$arity = 0); - - Opal.def(self, '$each_char', $StringIO_each_char$8 = function $$each_char() { - var $iter = $StringIO_each_char$8.$$p, block = $iter || nil, $a, self = this, i = nil; - - if ($iter) $StringIO_each_char$8.$$p = null; - - - if ($iter) $StringIO_each_char$8.$$p = null;; - if ($truthy(block)) { - } else { - return self.$enum_for("each_char") - }; - self.$check_readable(); - i = self.position; - while (!($truthy(self['$eof?']()))) { - - block.$call(self.string['$[]'](i)); - i = $rb_plus(i, 1); - }; - return self; - }, $StringIO_each_char$8.$$arity = 0); - - Opal.def(self, '$each', $StringIO_each$9 = function $$each(separator) { - var $iter = $StringIO_each$9.$$p, $yield = $iter || nil, self = this, chomp_lines = nil; - if ($gvars["/"] == null) $gvars["/"] = nil; - - if ($iter) $StringIO_each$9.$$p = null; - - - if (separator == null) { - separator = $gvars["/"]; - }; - if (($yield !== nil)) { - } else { - return self.$enum_for("each_line") - }; - self.$check_readable(); - chomp_lines = false; - if ($truthy($$$('::', 'Hash')['$==='](separator))) { - separator = (function() {if ($truthy((chomp_lines = separator['$[]']("chomp")))) { - return /\r?\n/ - } else { - return $gvars["/"] - }; return nil; })() - } else if ($truthy(separator)) { - separator = separator.$to_str() - } else { - separator = undefined - }; - - var str = self.string, stringLength = str.length; - if (self.position < stringLength) str = str.substr(self.position); - if (separator) { - var chomped = (str).$chomp(), trailing = str.length !== chomped.length, splitted = chomped.split(separator); - for (var i = 0, len = splitted.length; i < len; i++) { - var line = chomp_lines ? splitted[i] : (i < len - 1 || trailing ? splitted[i] + separator : splitted[i]); - Opal.yield1($yield, line); - } - } else if (separator === undefined) { - Opal.yield1($yield, str); - } else { - var m, re = /(.+(?:\n\n|$))\n*/g; - while ((m = re.exec(str))) Opal.yield1($yield, m[1]); - } - self.position = stringLength; - ; - return self; - }, $StringIO_each$9.$$arity = -1); - Opal.alias(self, "each_line", "each"); - - Opal.def(self, '$write', $StringIO_write$10 = function $$write(string) { - var self = this, before = nil, after = nil; - - - self.$check_writable(); - string = self.$String(string); - if (self.string.$length()['$=='](self.position)) { - - self.string = $rb_plus(self.string, string); - return (self.position = $rb_plus(self.position, string.$length())); - } else { - - before = self.string['$[]'](Opal.Range.$new(0, $rb_minus(self.position, 1), false)); - after = self.string['$[]'](Opal.Range.$new($rb_plus(self.position, string.$length()), -1, false)); - self.string = $rb_plus($rb_plus(before, string), after); - return (self.position = $rb_plus(self.position, string.$length())); - }; - }, $StringIO_write$10.$$arity = 1); - - Opal.def(self, '$read', $StringIO_read$11 = function $$read(length, outbuf) { - var self = this, string = nil, str = nil; - - - - if (length == null) { - length = nil; - }; - - if (outbuf == null) { - outbuf = nil; - }; - self.$check_readable(); - if ($truthy(self['$eof?']())) { - return nil}; - string = (function() {if ($truthy(length)) { - - str = self.string['$[]'](self.position, length); - self.position = $rb_plus(self.position, length); - return str; - } else { - - str = self.string['$[]'](Opal.Range.$new(self.position, -1, false)); - self.position = self.string.$length(); - return str; - }; return nil; })(); - if ($truthy(outbuf)) { - return outbuf.$write(string) - } else { - return string - }; - }, $StringIO_read$11.$$arity = -1); - - Opal.def(self, '$close', $StringIO_close$12 = function $$close() { - var self = this; - - return (self.closed = "both") - }, $StringIO_close$12.$$arity = 0); - - Opal.def(self, '$close_read', $StringIO_close_read$13 = function $$close_read() { - var self = this; - - if (self.closed['$==']("write")) { - return (self.closed = "both") - } else { - return (self.closed = "read") - } - }, $StringIO_close_read$13.$$arity = 0); - - Opal.def(self, '$close_write', $StringIO_close_write$14 = function $$close_write() { - var self = this; - - if (self.closed['$==']("read")) { - return (self.closed = "both") - } else { - return (self.closed = "write") - } - }, $StringIO_close_write$14.$$arity = 0); - - Opal.def(self, '$closed?', $StringIO_closed$ques$15 = function() { - var self = this; - - return self.closed['$==']("both") - }, $StringIO_closed$ques$15.$$arity = 0); - - Opal.def(self, '$closed_read?', $StringIO_closed_read$ques$16 = function() { - var $a, self = this; - - return ($truthy($a = self.closed['$==']("read")) ? $a : self.closed['$==']("both")) - }, $StringIO_closed_read$ques$16.$$arity = 0); - - Opal.def(self, '$closed_write?', $StringIO_closed_write$ques$17 = function() { - var $a, self = this; - - return ($truthy($a = self.closed['$==']("write")) ? $a : self.closed['$==']("both")) - }, $StringIO_closed_write$ques$17.$$arity = 0); - - Opal.def(self, '$check_writable', $StringIO_check_writable$18 = function $$check_writable() { - var self = this; - - if ($truthy(self['$closed_write?']())) { - return self.$raise($$($nesting, 'IOError'), "not opened for writing") - } else { - return nil - } - }, $StringIO_check_writable$18.$$arity = 0); - return (Opal.def(self, '$check_readable', $StringIO_check_readable$19 = function $$check_readable() { - var self = this; - - if ($truthy(self['$closed_read?']())) { - return self.$raise($$($nesting, 'IOError'), "not opened for reading") - } else { - return nil - } - }, $StringIO_check_readable$19.$$arity = 0), nil) && 'check_readable'; - })($nesting[0], $$($nesting, 'IO'), $nesting) -}; diff --git a/node_modules/async-lock/AUTHORS b/node_modules/async-lock/AUTHORS deleted file mode 100644 index 991b98f7..00000000 --- a/node_modules/async-lock/AUTHORS +++ /dev/null @@ -1,14 +0,0 @@ -# Authors ordered by first contribution. - -rain1017 (https://github.com/rain1017) -JonathanPicques (https://github.com/JonathanPicques) -Rogier Schouten (https://github.com/rogierschouten) -erikvold (https://github.com/erikvold) -Christian Passet (https://github.com/thePunIssuer) -Tanguy Krotoff (https://github.com/tkrotoff) -jtyers (https://github.com/jtyers) -Paul Roub (https://github.com/paulroub) -Geoff Whatley (https://github.com/meatwallace) -Patryk L. (https://github.com/LosTigeros) -Julian Saunderson (https://github.com/bitrivers) -Philipp Keck (https://github.com/Philipp91) diff --git a/node_modules/async-lock/History.md b/node_modules/async-lock/History.md deleted file mode 100644 index 185f718f..00000000 --- a/node_modules/async-lock/History.md +++ /dev/null @@ -1,119 +0,0 @@ -1.3.0 -================== -* Add maxOccupationTime option (Thank you @abozaralizadeh) - -1.2.8 -================== -* Fix #37 process not set when acquiring lock (Thank you @Philipp91) - -1.2.7 -================== -DO NOT USE, erroneous publish - -1.2.6 -================== -* Fix `maxPending = Infinity` no longer allowed (thank you @coderaiser) - -1.2.5 -================== -* Allow `maxPending = 0` (thank you @bmrpatel) -* Upgrade dependencies - -1.2.4 -================== -* Be robust to lock names that are also Object keys - simpler solution, extra tests. - -1.2.3 -================== -* Be robust to lock names that are also Object keys. -* Upgrade dependencies - -1.2.2 -================== -* Fix grunt-env accidentally having become a dependency (#25) - -1.2.1 -================== -* Remove empty postinstall script (#24) -* Fixed some vulnerable dev dependencies - -1.2.0 -================== -* ES5 compatibility (#21) - -1.1.4 -================== -* Fix for #17, update dependencies - -1.1.3 -================== -* Fix for #14 - -1.1.1 -================== -* Fix result Promise not resolving when locking empty key array - -1.1.0 / 2017-10-17 -================== -* Add option to add waiters to the front of the queue - -1.1.0 / 2017-10-17 -================== -* Add option to add waiters to the front of the queue - -1.0.0 / 2017-06-29 -================== -* Remove dependency on Q by using the global Promise variable by default. Thank you @erikvold (https://github.com/erikvold) for the PR - -0.3.10 / 2017-06-27 -================== -* Remove dependencies on Q-specific nodify(), try(), and defer() methods so that you can inject e.g. standard ES6 promises using `new AsyncLock({ Promise: Promise })` - -0.3.9 / 2016-11-30 -================== -* Referred to MIT license in package.json -* Update NPM module dependencies, remove no-longer-maintained blanket code coverage -* Change author to rogierschouten -* Fix invalid JSDoc comments (thanks @JonathanPicques) -* Bugfix: TypeError when locking multiple keys at once - -0.3.7-0.3.8 -================== -Unknown, previous author did not commit this to Github. - -0.3.6 / 2015-09-07 -================== -* Performance improvement - -0.3.5 / 2015-06-15 -================== -* Performance improvement - -0.3.4 / 2015-06-09 -================== -* Bug fix - -0.3.3 / 2015-05-19 -================== -* Bug fix - -0.3.2 / 2015-05-08 -================== -* Set default timeout to never - -0.3.1 / 2015-04-15 -================== -* Use your own promise - -0.3.0 / 2015-03-06 -================== -* Domain reentrant - -0.2.0 / 2015-02-21 -================== -* Support promise mode -* Pending task limit - -0.1.0 / 2015-01-13 -================== -* Initial version diff --git a/node_modules/async-lock/LICENSE b/node_modules/async-lock/LICENSE deleted file mode 100644 index 8bfd9e05..00000000 --- a/node_modules/async-lock/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Rogier Schouten <github@workingcode.ninja> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/node_modules/async-lock/README.md b/node_modules/async-lock/README.md deleted file mode 100644 index 189863f8..00000000 --- a/node_modules/async-lock/README.md +++ /dev/null @@ -1,170 +0,0 @@ -# async-lock - -Lock on asynchronous code - -[![Build Status](https://travis-ci.org/rogierschouten/async-lock.svg?branch=master)](https://travis-ci.org/rogierschouten/async-lock) - -* ES6 promise supported -* Multiple keys lock supported -* Timeout supported -* Occupation time limit supported -* Pending task limit supported -* Domain reentrant supported -* 100% code coverage - -## Disclaimer - -I did not create this package, and I will not add any features to it myself. I was granted the ownership because it was no longer being -maintained, and I volunteered to fix a bug. - -If you have a new feature you would like to have incorporated, please send me a PR and I will be happy to work with you and get it merged. -For any bugs, PRs are most welcome but when possible I will try to get them resolved as soon as possible. - -## Why do you need locking on single threaded nodejs? - -Nodejs is single threaded, and the code execution never gets interrupted inside an event loop, so locking is unnecessary? This is true ONLY IF your critical section can be executed inside a single event loop. -However, if you have any async code inside your critical section (it can be simply triggered by any I/O operation, or timer), your critical logic will across multiple event loops, therefore it's not concurrency safe! - -Consider the following code -```js -redis.get('key', function(err, value) { - redis.set('key', value * 2); -}); -``` -The above code simply multiply a redis key by 2. -However, if two users run concurrently, the execution order may like this -``` -user1: redis.get('key') -> 1 -user2: redis.get('key') -> 1 -user1: redis.set('key', 1 x 2) -> 2 -user2: redis.set('key', 1 x 2) -> 2 -``` -Obviously it's not what you expected - - -With asyncLock, you can easily write your async critical section -```js -lock.acquire('key', function(cb) { - // Concurrency safe - redis.get('key', function(err, value) { - redis.set('key', value * 2, cb); - }); -}, function(err, ret) { -}); -``` - -## Get Started - -```js -var AsyncLock = require('async-lock'); -var lock = new AsyncLock(); - -/** - * @param {String|Array} key resource key or keys to lock - * @param {function} fn execute function - * @param {function} cb (optional) callback function, otherwise will return a promise - * @param {Object} opts (optional) options - */ -lock.acquire(key, function(done) { - // async work - done(err, ret); -}, function(err, ret) { - // lock released -}, opts); - -// Promise mode -lock.acquire(key, function() { - // return value or promise -}, opts).then(function() { - // lock released -}); -``` - -## Error Handling - -```js -// Callback mode -lock.acquire(key, function(done) { - done(new Error('error')); -}, function(err, ret) { - console.log(err.message) // output: error -}); - -// Promise mode -lock.acquire(key, function() { - throw new Error('error'); -}).catch(function(err) { - console.log(err.message) // output: error -}); -``` - -## Acquire multiple keys - -```js -lock.acquire([key1, key2], fn, cb); -``` - -## Domain reentrant lock - -Lock is reentrant in the same domain - -```js -var domain = require('domain'); -var lock = new AsyncLock({domainReentrant : true}); - -var d = domain.create(); -d.run(function() { - lock.acquire('key', function() { - //Enter lock - return lock.acquire('key', function() { - //Enter same lock twice - }); - }); -}); -``` - -## Options - -```js -// Specify timeout -var lock = new AsyncLock({timeout: 5000}); -lock.acquire(key, fn, function(err, ret) { - // timed out error will be returned here if lock not acquired in given time -}); - -// Specify max occupation time -var lock = new AsyncLock({maxOccupationTime: 3000}); -lock.acquire(key, fn, function(err, ret) { - // occupation time exceeded error will be returned here if job not completed in given time -}); - -// Set max pending tasks -var lock = new AsyncLock({maxPending: 1000}); -lock.acquire(key, fn, function(err, ret) { - // Handle too much pending error -}) - -// Whether there is any running or pending async function -lock.isBusy(); - -// Use your own promise library instead of the global Promise variable -var lock = new AsyncLock({Promise: require('bluebird')}); // Bluebird -var lock = new AsyncLock({Promise: require('q')}); // Q - -// Add a task to the front of the queue waiting for a given lock -lock.acquire(key, fn1, cb); // runs immediately -lock.acquire(key, fn2, cb); // added to queue -lock.acquire(key, priorityFn, cb, {skipQueue: true}); // jumps queue and runs before fn2 -``` - -## Changelog - -See [Changelog](./History.md) - -## Issues - -See [issue tracker](https://github.com/rogierschouten/async-lock/issues). - -## License - -MIT, see [LICENSE](./LICENSE) diff --git a/node_modules/async-lock/index.js b/node_modules/async-lock/index.js deleted file mode 100644 index 48315bb6..00000000 --- a/node_modules/async-lock/index.js +++ /dev/null @@ -1,2 +0,0 @@ -'use strict'; -module.exports = require('./lib'); diff --git a/node_modules/async-lock/lib/index.js b/node_modules/async-lock/lib/index.js deleted file mode 100644 index d5279cc4..00000000 --- a/node_modules/async-lock/lib/index.js +++ /dev/null @@ -1,286 +0,0 @@ -'use strict'; - -var AsyncLock = function (opts) { - opts = opts || {}; - - this.Promise = opts.Promise || Promise; - - // format: {key : [fn, fn]} - // queues[key] = null indicates no job running for key - this.queues = Object.create(null); - - // lock is reentrant for same domain - this.domainReentrant = opts.domainReentrant || false; - if (this.domainReentrant) { - if (typeof process === 'undefined' || typeof process.domain === 'undefined') { - throw new Error( - 'Domain-reentrant locks require `process.domain` to exist. Please flip `opts.domainReentrant = false`, ' + - 'use a NodeJS version that still implements Domain, or install a browser polyfill.'); - } - // domain of current running func {key : fn} - this.domains = Object.create(null); - } - - this.timeout = opts.timeout || AsyncLock.DEFAULT_TIMEOUT; - this.maxOccupationTime = opts.maxOccupationTime || AsyncLock.DEFAULT_MAX_OCCUPATION_TIME; - if (opts.maxPending === Infinity || (Number.isInteger(opts.maxPending) && opts.maxPending >= 0)) { - this.maxPending = opts.maxPending; - } else { - this.maxPending = AsyncLock.DEFAULT_MAX_PENDING; - } -}; - -AsyncLock.DEFAULT_TIMEOUT = 0; //Never -AsyncLock.DEFAULT_MAX_OCCUPATION_TIME = 0; //Never -AsyncLock.DEFAULT_MAX_PENDING = 1000; - -/** - * Acquire Locks - * - * @param {String|Array} key resource key or keys to lock - * @param {function} fn async function - * @param {function} cb callback function, otherwise will return a promise - * @param {Object} opts options - */ -AsyncLock.prototype.acquire = function (key, fn, cb, opts) { - if (Array.isArray(key)) { - return this._acquireBatch(key, fn, cb, opts); - } - - if (typeof (fn) !== 'function') { - throw new Error('You must pass a function to execute'); - } - - // faux-deferred promise using new Promise() (as Promise.defer is deprecated) - var deferredResolve = null; - var deferredReject = null; - var deferred = null; - - if (typeof (cb) !== 'function') { - opts = cb; - cb = null; - - // will return a promise - deferred = new this.Promise(function(resolve, reject) { - deferredResolve = resolve; - deferredReject = reject; - }); - } - - opts = opts || {}; - - var resolved = false; - var timer = null; - var occupationTimer = null; - var self = this; - - var done = function (locked, err, ret) { - - if (occupationTimer) { - clearTimeout(occupationTimer); - occupationTimer = null; - } - - if (locked) { - if (!!self.queues[key] && self.queues[key].length === 0) { - delete self.queues[key]; - } - if (self.domainReentrant) { - delete self.domains[key]; - } - } - - if (!resolved) { - if (!deferred) { - if (typeof (cb) === 'function') { - cb(err, ret); - } - } - else { - //promise mode - if (err) { - deferredReject(err); - } - else { - deferredResolve(ret); - } - } - resolved = true; - } - - if (locked) { - //run next func - if (!!self.queues[key] && self.queues[key].length > 0) { - self.queues[key].shift()(); - } - } - }; - - var exec = function (locked) { - if (resolved) { // may due to timed out - return done(locked); - } - - if (timer) { - clearTimeout(timer); - timer = null; - } - - if (self.domainReentrant && locked) { - self.domains[key] = process.domain; - } - - // Callback mode - if (fn.length === 1) { - var called = false; - fn(function (err, ret) { - if (!called) { - called = true; - done(locked, err, ret); - } - }); - } - else { - // Promise mode - self._promiseTry(function () { - return fn(); - }) - .then(function(ret){ - done(locked, undefined, ret); - }, function(error){ - done(locked, error); - }); - } - }; - - if (self.domainReentrant && !!process.domain) { - exec = process.domain.bind(exec); - } - - if (!self.queues[key]) { - self.queues[key] = []; - exec(true); - } - else if (self.domainReentrant && !!process.domain && process.domain === self.domains[key]) { - // If code is in the same domain of current running task, run it directly - // Since lock is re-enterable - exec(false); - } - else if (self.queues[key].length >= self.maxPending) { - done(false, new Error('Too much pending tasks')); - } - else { - var taskFn = function () { - exec(true); - }; - if (opts.skipQueue) { - self.queues[key].unshift(taskFn); - } else { - self.queues[key].push(taskFn); - } - - var timeout = opts.timeout || self.timeout; - if (timeout) { - timer = setTimeout(function () { - timer = null; - done(false, new Error('async-lock timed out')); - }, timeout); - } - } - - var maxOccupationTime = opts.maxOccupationTime || self.maxOccupationTime; - if (maxOccupationTime) { - occupationTimer = setTimeout(function () { - if (!!self.queues[key]) { - done(false, new Error('Maximum occupation time is exceeded')); - } - }, maxOccupationTime); - } - - if (deferred) { - return deferred; - } -}; - -/* - * Below is how this function works: - * - * Equivalent code: - * self.acquire(key1, function(cb){ - * self.acquire(key2, function(cb){ - * self.acquire(key3, fn, cb); - * }, cb); - * }, cb); - * - * Equivalent code: - * var fn3 = getFn(key3, fn); - * var fn2 = getFn(key2, fn3); - * var fn1 = getFn(key1, fn2); - * fn1(cb); - */ -AsyncLock.prototype._acquireBatch = function (keys, fn, cb, opts) { - if (typeof (cb) !== 'function') { - opts = cb; - cb = null; - } - - var self = this; - var getFn = function (key, fn) { - return function (cb) { - self.acquire(key, fn, cb, opts); - }; - }; - - var fnx = fn; - keys.reverse().forEach(function (key) { - fnx = getFn(key, fnx); - }); - - if (typeof (cb) === 'function') { - fnx(cb); - } - else { - return new this.Promise(function (resolve, reject) { - // check for promise mode in case keys is empty array - if (fnx.length === 1) { - fnx(function (err, ret) { - if (err) { - reject(err); - } - else { - resolve(ret); - } - }); - } else { - resolve(fnx()); - } - }); - } -}; - -/* - * Whether there is any running or pending asyncFunc - * - * @param {String} key - */ -AsyncLock.prototype.isBusy = function (key) { - if (!key) { - return Object.keys(this.queues).length > 0; - } - else { - return !!this.queues[key]; - } -}; - -/** - * Promise.try() implementation to become independent of Q-specific methods - */ -AsyncLock.prototype._promiseTry = function(fn) { - try { - return this.Promise.resolve(fn()); - } catch (e) { - return this.Promise.reject(e); - } -}; - -module.exports = AsyncLock; diff --git a/node_modules/async-lock/package.json b/node_modules/async-lock/package.json deleted file mode 100644 index cafc86f6..00000000 --- a/node_modules/async-lock/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "_from": "async-lock@^1.1.0", - "_id": "async-lock@1.3.0", - "_inBundle": false, - "_integrity": "sha512-8A7SkiisnEgME2zEedtDYPxUPzdv3x//E7n5IFktPAtMYSEAV7eNJF0rMwrVyUFj6d/8rgajLantbjcNRQYXIg==", - "_location": "/async-lock", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "async-lock@^1.1.0", - "name": "async-lock", - "escapedName": "async-lock", - "rawSpec": "^1.1.0", - "saveSpec": null, - "fetchSpec": "^1.1.0" - }, - "_requiredBy": [ - "/isomorphic-git" - ], - "_resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.3.0.tgz", - "_shasum": "0fba111bea8b9693020857eba4f9adca173df3e5", - "_spec": "async-lock@^1.1.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/isomorphic-git", - "author": { - "name": "Rogier Schouten", - "email": "github@workingcode.ninja", - "url": "https://github.com/rogierschouten/" - }, - "bugs": { - "url": "https://github.com/rogierschouten/async-lock/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "rain1017", - "url": "https://github.com/rain1017" - }, - { - "name": "JonathanPicques", - "url": "https://github.com/JonathanPicques" - }, - { - "name": "Rogier Schouten", - "url": "https://github.com/rogierschouten" - }, - { - "name": "erikvold", - "url": "https://github.com/erikvold" - }, - { - "name": "Christian Passet", - "url": "https://github.com/thePunIssuer" - }, - { - "name": "Tanguy Krotoff", - "url": "https://github.com/tkrotoff" - }, - { - "name": "jtyers", - "url": "https://github.com/jtyers" - }, - { - "name": "Paul Roub", - "url": "https://github.com/paulroub" - }, - { - "name": "Geoff Whatley", - "url": "https://github.com/meatwallace" - }, - { - "name": "Patryk L.", - "url": "https://github.com/LosTigeros" - }, - { - "name": "Julian Saunderson", - "url": "https://github.com/bitrivers" - }, - { - "name": "Philipp Keck", - "url": "https://github.com/Philipp91" - } - ], - "deprecated": false, - "description": "Lock on asynchronous code", - "devDependencies": { - "bluebird": "^3.5.1", - "grunt": "^1.0.4", - "grunt-cli": "^1.2.0", - "grunt-contrib-clean": "^1.1.0", - "grunt-contrib-jshint": "^1.1.0", - "grunt-contrib-watch": "^1.1.0", - "grunt-env": "^1.0.1", - "grunt-mocha-test": "^0.13.3", - "load-grunt-tasks": "^4.0.0", - "lodash": "^4.17.20", - "mocha": "^7.1.2", - "q": "^1.5.1", - "should": "^13.2.1" - }, - "engines": {}, - "homepage": "https://github.com/rogierschouten/async-lock", - "keywords": [ - "lock", - "async", - "concurrency", - "critical", - "section", - "mutex" - ], - "license": "MIT", - "name": "async-lock", - "private": false, - "repository": { - "type": "git", - "url": "git+https://github.com/rogierschouten/async-lock.git" - }, - "scripts": { - "start": "grunt", - "test": "grunt test" - }, - "version": "1.3.0" -} diff --git a/node_modules/atomic-sleep/.travis.yml b/node_modules/atomic-sleep/.travis.yml deleted file mode 100644 index 3bb09da6..00000000 --- a/node_modules/atomic-sleep/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -sudo: false -node_js: - - 6 - - 8 - - 10 - - 11 - - 12 - - 13 -script: - - npm run ci \ No newline at end of file diff --git a/node_modules/atomic-sleep/LICENSE b/node_modules/atomic-sleep/LICENSE deleted file mode 100644 index d1d88497..00000000 --- a/node_modules/atomic-sleep/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2020 David Mark Clements - - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/atomic-sleep/index.js b/node_modules/atomic-sleep/index.js deleted file mode 100644 index fbfc8b23..00000000 --- a/node_modules/atomic-sleep/index.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict' - -/* global SharedArrayBuffer, Atomics */ - -if (typeof SharedArrayBuffer !== 'undefined' && typeof Atomics !== 'undefined') { - const nil = new Int32Array(new SharedArrayBuffer(4)) - - function sleep (ms) { - // also filters out NaN, non-number types, including empty strings, but allows bigints - const valid = ms > 0 && ms < Infinity - if (valid === false) { - if (typeof ms !== 'number' && typeof ms !== 'bigint') { - throw TypeError('sleep: ms must be a number') - } - throw RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity') - } - - Atomics.wait(nil, 0, 0, Number(ms)) - } - module.exports = sleep -} else { - - function sleep (ms) { - // also filters out NaN, non-number types, including empty strings, but allows bigints - const valid = ms > 0 && ms < Infinity - if (valid === false) { - if (typeof ms !== 'number' && typeof ms !== 'bigint') { - throw TypeError('sleep: ms must be a number') - } - throw RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity') - } - const target = Date.now() + Number(ms) - while (target > Date.now()){} - } - - module.exports = sleep - -} diff --git a/node_modules/atomic-sleep/package.json b/node_modules/atomic-sleep/package.json deleted file mode 100644 index 0724b163..00000000 --- a/node_modules/atomic-sleep/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "atomic-sleep@^1.0.0", - "_id": "atomic-sleep@1.0.0", - "_inBundle": false, - "_integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==", - "_location": "/atomic-sleep", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "atomic-sleep@^1.0.0", - "name": "atomic-sleep", - "escapedName": "atomic-sleep", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/sonic-boom" - ], - "_resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", - "_shasum": "eb85b77a601fc932cfe432c5acd364a9e2c9075b", - "_spec": "atomic-sleep@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/sonic-boom", - "author": { - "name": "David Mark Clements", - "url": "@davidmarkclem" - }, - "bugs": { - "url": "https://github.com/davidmarkclements/atomic-sleep/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Zero CPU overhead, zero dependency, true event-loop blocking sleep", - "devDependencies": { - "standard": "^14.3.1", - "tap": "^14.10.6", - "tape": "^4.13.2" - }, - "engines": { - "node": ">=8.0.0" - }, - "homepage": "https://github.com/davidmarkclements/atomic-sleep#readme", - "keywords": [ - "sleep", - "pause", - "wait", - "performance", - "atomics" - ], - "license": "MIT", - "main": "index.js", - "name": "atomic-sleep", - "repository": { - "type": "git", - "url": "git+https://github.com/davidmarkclements/atomic-sleep.git" - }, - "scripts": { - "ci": "npm run lint && npm test", - "lint": "standard", - "test": "tap -R classic- -j1 test" - }, - "version": "1.0.0" -} diff --git a/node_modules/atomic-sleep/readme.md b/node_modules/atomic-sleep/readme.md deleted file mode 100644 index 3cdd91be..00000000 --- a/node_modules/atomic-sleep/readme.md +++ /dev/null @@ -1,58 +0,0 @@ -<h1 align="center">Welcome to atomic-sleep ⏱️</h1> -<p> - <img alt="Version" src="https://img.shields.io/badge/version-1.0.0-blue.svg?cacheSeconds=2592000" /> - <a href="#" target="_blank"> - <img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" /> - </a> - <a href="https://twitter.com/davidmarkclem" target="_blank"> - <img alt="Twitter: davidmarkclem" src="https://img.shields.io/twitter/follow/davidmarkclem.svg?style=social" /> - </a> -</p> - -> Zero CPU overhead, zero dependency, true event-loop blocking sleep - -## Usage - -```js -const sleep = require('atomic-sleep') - -console.time('sleep') -setTimeout(() => { console.timeEnd('sleep') }, 100) -sleep(1000) -``` - -The `console.time` will report a time of just over 1000ms despite the `setTimeout` -being 100ms. This is because the event loop is paused for 1000ms and the setTimeout -fires immediately after the event loop is no longer blocked (as more than 100ms have passed). - -## Install - -```sh -npm install -``` - -## Run tests - -```sh -npm test -``` - -## Support - -Node and Browser versions that support both `SharedArrayBuffer` and `Atomics` will have (virtually) zero CPU overhead sleep. - -For Node, Atomic Sleep can provide zero CPU overhead sleep from Node 8 and up. - -For browser support see https://caniuse.com/#feat=sharedarraybuffer and https://caniuse.com/#feat=mdn-javascript_builtins_atomics. - - -For older Node versions and olders browsers we fall back to blocking the event loop in a way that will cause a CPU spike. - - - -## Author - -👤 **David Mark Clements (@davidmarkclem)** - -* Twitter: [@davidmarkclem](https://twitter.com/davidmarkclem) -* Github: [@davidmarkclements](https://github.com/davidmarkclements) diff --git a/node_modules/atomic-sleep/test.js b/node_modules/atomic-sleep/test.js deleted file mode 100644 index 0020daa2..00000000 --- a/node_modules/atomic-sleep/test.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict' -const test = require('tape') -const sleep = require('.') - -test('blocks event loop for given amount of milliseconds', ({ is, end }) => { - const now = Date.now() - setTimeout(() => { - const delta = Date.now() - now - const fuzzyDelta = Math.floor(delta / 10) * 10 // allow up to 10ms of execution lag - is(fuzzyDelta, 1000) - end() - }, 100) - sleep(1000) -}) - -if (typeof BigInt !== 'undefined') { - - test('allows ms to be supplied as a BigInt number', ({ is, end }) => { - const now = Date.now() - setTimeout(() => { - const delta = Date.now() - now - const fuzzyDelta = Math.floor(delta / 10) * 10 // allow up to 10ms of execution lag - is(fuzzyDelta, 1000) - end() - }, 100) - sleep(BigInt(1000)) // avoiding n notation as this will error on legacy node/browsers - }) - -} - -test('throws range error if ms less than 0', ({ throws, end }) => { - throws(() => sleep(-1), RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity')) - end() -}) - -test('throws range error if ms is Infinity', ({ throws, end }) => { - throws(() => sleep(Infinity), RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity')) - end() -}) - -test('throws range error if ms is not a number or bigint', ({ throws, end }) => { - throws(() => sleep('Infinity'), TypeError('sleep: ms must be a number')) - throws(() => sleep('foo'), TypeError('sleep: ms must be a number')) - throws(() => sleep({a: 1}), TypeError('sleep: ms must be a number')) - throws(() => sleep([1,2,3]), TypeError('sleep: ms must be a number')) - end() -}) \ No newline at end of file diff --git a/node_modules/balanced-match/.github/FUNDING.yml b/node_modules/balanced-match/.github/FUNDING.yml deleted file mode 100644 index cea8b16e..00000000 --- a/node_modules/balanced-match/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -tidelift: "npm/balanced-match" -patreon: juliangruber diff --git a/node_modules/balanced-match/LICENSE.md b/node_modules/balanced-match/LICENSE.md deleted file mode 100644 index 2cdc8e41..00000000 --- a/node_modules/balanced-match/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/balanced-match/README.md b/node_modules/balanced-match/README.md deleted file mode 100644 index d2a48b6b..00000000 --- a/node_modules/balanced-match/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# balanced-match - -Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well! - -[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) -[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) - -[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) - -## Example - -Get the first matching pair of braces: - -```js -var balanced = require('balanced-match'); - -console.log(balanced('{', '}', 'pre{in{nested}}post')); -console.log(balanced('{', '}', 'pre{first}between{second}post')); -console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); -``` - -The matches are: - -```bash -$ node example.js -{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } -{ start: 3, - end: 9, - pre: 'pre', - body: 'first', - post: 'between{second}post' } -{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } -``` - -## API - -### var m = balanced(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -object with those keys: - -* **start** the index of the first match of `a` -* **end** the index of the matching `b` -* **pre** the preamble, `a` and `b` not included -* **body** the match, `a` and `b` not included -* **post** the postscript, `a` and `b` not included - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. - -### var r = balanced.range(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -array with indexes: `[ <a index>, <b index> ]`. - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install balanced-match -``` - -## Security contact information - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/balanced-match/index.js b/node_modules/balanced-match/index.js deleted file mode 100644 index c67a6460..00000000 --- a/node_modules/balanced-match/index.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - if(a===b) { - return [ai, bi]; - } - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; - } - - if (begs.length) { - result = [ left, right ]; - } - } - - return result; -} diff --git a/node_modules/balanced-match/package.json b/node_modules/balanced-match/package.json deleted file mode 100644 index 18bdb7ab..00000000 --- a/node_modules/balanced-match/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "balanced-match@^1.0.0", - "_id": "balanced-match@1.0.2", - "_inBundle": false, - "_integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "_location": "/balanced-match", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "balanced-match@^1.0.0", - "name": "balanced-match", - "escapedName": "balanced-match", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/brace-expansion" - ], - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "_shasum": "e83e3a7e3f300b34cb9d87f615fa0cbf357690ee", - "_spec": "balanced-match@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/brace-expansion", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/balanced-match/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Match balanced character pairs, like \"{\" and \"}\"", - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "homepage": "https://github.com/juliangruber/balanced-match", - "keywords": [ - "match", - "regexp", - "test", - "balanced", - "parse" - ], - "license": "MIT", - "main": "index.js", - "name": "balanced-match", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/balanced-match.git" - }, - "scripts": { - "bench": "matcha test/bench.js", - "test": "tape test/test.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.0.2" -} diff --git a/node_modules/brace-expansion/LICENSE b/node_modules/brace-expansion/LICENSE deleted file mode 100644 index de322667..00000000 --- a/node_modules/brace-expansion/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/brace-expansion/README.md b/node_modules/brace-expansion/README.md deleted file mode 100644 index 6b4e0e16..00000000 --- a/node_modules/brace-expansion/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# brace-expansion - -[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), -as known from sh/bash, in JavaScript. - -[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) -[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) -[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) - -[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) - -## Example - -```js -var expand = require('brace-expansion'); - -expand('file-{a,b,c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('-v{,,}') -// => ['-v', '-v', '-v'] - -expand('file{0..2}.jpg') -// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] - -expand('file-{a..c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('file{2..0}.jpg') -// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] - -expand('file{0..4..2}.jpg') -// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] - -expand('file-{a..e..2}.jpg') -// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] - -expand('file{00..10..5}.jpg') -// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] - -expand('{{A..C},{a..c}}') -// => ['A', 'B', 'C', 'a', 'b', 'c'] - -expand('ppp{,config,oe{,conf}}') -// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] -``` - -## API - -```js -var expand = require('brace-expansion'); -``` - -### var expanded = expand(str) - -Return an array of all possible and valid expansions of `str`. If none are -found, `[str]` is returned. - -Valid expansions are: - -```js -/^(.*,)+(.+)?$/ -// {a,b,...} -``` - -A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -A numeric sequence from `x` to `y` inclusive, with optional increment. -If `x` or `y` start with a leading `0`, all the numbers will be padded -to have equal length. Negative numbers and backwards iteration work too. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -An alphabetic sequence from `x` to `y` inclusive, with optional increment. -`x` and `y` must be exactly one character, and if given, `incr` must be a -number. - -For compatibility reasons, the string `${` is not eligible for brace expansion. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install brace-expansion -``` - -## Contributors - -- [Julian Gruber](https://github.com/juliangruber) -- [Isaac Z. Schlueter](https://github.com/isaacs) - -## Sponsors - -This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! - -Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/brace-expansion/index.js b/node_modules/brace-expansion/index.js deleted file mode 100644 index 0478be81..00000000 --- a/node_modules/brace-expansion/index.js +++ /dev/null @@ -1,201 +0,0 @@ -var concatMap = require('concat-map'); -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), true).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; -} - diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json deleted file mode 100644 index c0ef533b..00000000 --- a/node_modules/brace-expansion/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_from": "brace-expansion@^1.1.7", - "_id": "brace-expansion@1.1.11", - "_inBundle": false, - "_integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "_location": "/brace-expansion", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "brace-expansion@^1.1.7", - "name": "brace-expansion", - "escapedName": "brace-expansion", - "rawSpec": "^1.1.7", - "saveSpec": null, - "fetchSpec": "^1.1.7" - }, - "_requiredBy": [ - "/minimatch" - ], - "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "_shasum": "3c7fcbf529d87226f3d2f52b966ff5271eb441dd", - "_spec": "brace-expansion@^1.1.7", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/minimatch", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/brace-expansion/issues" - }, - "bundleDependencies": false, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - }, - "deprecated": false, - "description": "Brace expansion as known from sh/bash", - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "homepage": "https://github.com/juliangruber/brace-expansion", - "keywords": [], - "license": "MIT", - "main": "index.js", - "name": "brace-expansion", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" - }, - "scripts": { - "bench": "matcha test/perf/bench.js", - "gentest": "bash test/generate.sh", - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.1.11" -} diff --git a/node_modules/braces/CHANGELOG.md b/node_modules/braces/CHANGELOG.md deleted file mode 100644 index 36f798b0..00000000 --- a/node_modules/braces/CHANGELOG.md +++ /dev/null @@ -1,184 +0,0 @@ -# Release history - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - -<details> - <summary><strong>Guiding Principles</strong></summary> - -- Changelogs are for humans, not machines. -- There should be an entry for every single version. -- The same types of changes should be grouped. -- Versions and sections should be linkable. -- The latest version comes first. -- The release date of each versions is displayed. -- Mention whether you follow Semantic Versioning. - -</details> - -<details> - <summary><strong>Types of changes</strong></summary> - -Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): - -- `Added` for new features. -- `Changed` for changes in existing functionality. -- `Deprecated` for soon-to-be removed features. -- `Removed` for now removed features. -- `Fixed` for any bug fixes. -- `Security` in case of vulnerabilities. - -</details> - -## [3.0.0] - 2018-04-08 - -v3.0 is a complete refactor, resulting in a faster, smaller codebase, with fewer deps, and a more accurate parser and compiler. - -**Breaking Changes** - -- The undocumented `.makeRe` method was removed - -**Non-breaking changes** - -- Caching was removed - -## [2.3.2] - 2018-04-08 - -- start refactoring -- cover sets -- better range handling - -## [2.3.1] - 2018-02-17 - -- Remove unnecessary escape in Regex. (#14) - -## [2.3.0] - 2017-10-19 - -- minor code reorganization -- optimize regex -- expose `maxLength` option - -## [2.2.1] - 2017-05-30 - -- don't condense when braces contain extglobs - -## [2.2.0] - 2017-05-28 - -- ensure word boundaries are preserved -- fixes edge case where extglob characters precede a brace pattern - -## [2.1.1] - 2017-04-27 - -- use snapdragon-node -- handle edge case -- optimizations, lint - -## [2.0.4] - 2017-04-11 - -- pass opts to compiler -- minor optimization in create method -- re-write parser handlers to remove negation regex - -## [2.0.3] - 2016-12-10 - -- use split-string -- clear queue at the end -- adds sequences example -- add unit tests - -## [2.0.2] - 2016-10-21 - -- fix comma handling in nested extglobs - -## [2.0.1] - 2016-10-20 - -- add comments -- more tests, ensure quotes are stripped - -## [2.0.0] - 2016-10-19 - -- don't expand braces inside character classes -- add quantifier pattern - -## [1.8.5] - 2016-05-21 - -- Refactor (#10) - -## [1.8.4] - 2016-04-20 - -- fixes https://github.com/jonschlinkert/micromatch/issues/66 - -## [1.8.0] - 2015-03-18 - -- adds exponent examples, tests -- fixes the first example in https://github.com/jonschlinkert/micromatch/issues/38 - -## [1.6.0] - 2015-01-30 - -- optimizations, `bash` mode: -- improve path escaping - -## [1.5.0] - 2015-01-28 - -- Merge pull request #5 from eush77/lib-files - -## [1.4.0] - 2015-01-24 - -- add extglob tests -- externalize exponent function -- better whitespace handling - -## [1.3.0] - 2015-01-24 - -- make regex patterns explicity - -## [1.1.0] - 2015-01-11 - -- don't create a match group with `makeRe` - -## [1.0.0] - 2014-12-23 - -- Merge commit '97b05f5544f8348736a8efaecf5c32bbe3e2ad6e' -- support empty brace syntax -- better bash coverage -- better support for regex strings - -## [0.1.4] - 2014-11-14 - -- improve recognition of bad args, recognize mismatched argument types -- support escaping -- remove pathname-expansion -- support whitespace in patterns - -## [0.1.0] - -- first commit - -[2.3.2]: https://github.com/micromatch/braces/compare/2.3.1...2.3.2 -[2.3.1]: https://github.com/micromatch/braces/compare/2.3.0...2.3.1 -[2.3.0]: https://github.com/micromatch/braces/compare/2.2.1...2.3.0 -[2.2.1]: https://github.com/micromatch/braces/compare/2.2.0...2.2.1 -[2.2.0]: https://github.com/micromatch/braces/compare/2.1.1...2.2.0 -[2.1.1]: https://github.com/micromatch/braces/compare/2.1.0...2.1.1 -[2.1.0]: https://github.com/micromatch/braces/compare/2.0.4...2.1.0 -[2.0.4]: https://github.com/micromatch/braces/compare/2.0.3...2.0.4 -[2.0.3]: https://github.com/micromatch/braces/compare/2.0.2...2.0.3 -[2.0.2]: https://github.com/micromatch/braces/compare/2.0.1...2.0.2 -[2.0.1]: https://github.com/micromatch/braces/compare/2.0.0...2.0.1 -[2.0.0]: https://github.com/micromatch/braces/compare/1.8.5...2.0.0 -[1.8.5]: https://github.com/micromatch/braces/compare/1.8.4...1.8.5 -[1.8.4]: https://github.com/micromatch/braces/compare/1.8.0...1.8.4 -[1.8.0]: https://github.com/micromatch/braces/compare/1.6.0...1.8.0 -[1.6.0]: https://github.com/micromatch/braces/compare/1.5.0...1.6.0 -[1.5.0]: https://github.com/micromatch/braces/compare/1.4.0...1.5.0 -[1.4.0]: https://github.com/micromatch/braces/compare/1.3.0...1.4.0 -[1.3.0]: https://github.com/micromatch/braces/compare/1.2.0...1.3.0 -[1.2.0]: https://github.com/micromatch/braces/compare/1.1.0...1.2.0 -[1.1.0]: https://github.com/micromatch/braces/compare/1.0.0...1.1.0 -[1.0.0]: https://github.com/micromatch/braces/compare/0.1.4...1.0.0 -[0.1.4]: https://github.com/micromatch/braces/compare/0.1.0...0.1.4 - -[Unreleased]: https://github.com/micromatch/braces/compare/0.1.0...HEAD -[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog \ No newline at end of file diff --git a/node_modules/braces/LICENSE b/node_modules/braces/LICENSE deleted file mode 100644 index d32ab442..00000000 --- a/node_modules/braces/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2018, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/braces/README.md b/node_modules/braces/README.md deleted file mode 100644 index cba2f600..00000000 --- a/node_modules/braces/README.md +++ /dev/null @@ -1,593 +0,0 @@ -# braces [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM monthly downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![NPM total downloads](https://img.shields.io/npm/dt/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Linux Build Status](https://img.shields.io/travis/micromatch/braces.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/braces) - -> Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save braces -``` - -## v3.0.0 Released!! - -See the [changelog](CHANGELOG.md) for details. - -## Why use braces? - -Brace patterns make globs more powerful by adding the ability to match specific ranges and sequences of characters. - -* **Accurate** - complete support for the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/) specification (passes all of the Bash braces tests) -* **[fast and performant](#benchmarks)** - Starts fast, runs fast and [scales well](#performance) as patterns increase in complexity. -* **Organized code base** - The parser and compiler are easy to maintain and update when edge cases crop up. -* **Well-tested** - Thousands of test assertions, and passes all of the Bash, minimatch, and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests (as of the date this was written). -* **Safer** - You shouldn't have to worry about users defining aggressive or malicious brace patterns that can break your application. Braces takes measures to prevent malicious regex that can be used for DDoS attacks (see [catastrophic backtracking](https://www.regular-expressions.info/catastrophic.html)). -* [Supports lists](#lists) - (aka "sets") `a/{b,c}/d` => `['a/b/d', 'a/c/d']` -* [Supports sequences](#sequences) - (aka "ranges") `{01..03}` => `['01', '02', '03']` -* [Supports steps](#steps) - (aka "increments") `{2..10..2}` => `['2', '4', '6', '8', '10']` -* [Supports escaping](#escaping) - To prevent evaluation of special characters. - -## Usage - -The main export is a function that takes one or more brace `patterns` and `options`. - -```js -const braces = require('braces'); -// braces(patterns[, options]); - -console.log(braces(['{01..05}', '{a..e}'])); -//=> ['(0[1-5])', '([a-e])'] - -console.log(braces(['{01..05}', '{a..e}'], { expand: true })); -//=> ['01', '02', '03', '04', '05', 'a', 'b', 'c', 'd', 'e'] -``` - -### Brace Expansion vs. Compilation - -By default, brace patterns are compiled into strings that are optimized for creating regular expressions and matching. - -**Compiled** - -```js -console.log(braces('a/{x,y,z}/b')); -//=> ['a/(x|y|z)/b'] -console.log(braces(['a/{01..20}/b', 'a/{1..5}/b'])); -//=> [ 'a/(0[1-9]|1[0-9]|20)/b', 'a/([1-5])/b' ] -``` - -**Expanded** - -Enable brace expansion by setting the `expand` option to true, or by using [braces.expand()](#expand) (returns an array similar to what you'd expect from Bash, or `echo {1..5}`, or [minimatch](https://github.com/isaacs/minimatch)): - -```js -console.log(braces('a/{x,y,z}/b', { expand: true })); -//=> ['a/x/b', 'a/y/b', 'a/z/b'] - -console.log(braces.expand('{01..10}')); -//=> ['01','02','03','04','05','06','07','08','09','10'] -``` - -### Lists - -Expand lists (like Bash "sets"): - -```js -console.log(braces('a/{foo,bar,baz}/*.js')); -//=> ['a/(foo|bar|baz)/*.js'] - -console.log(braces.expand('a/{foo,bar,baz}/*.js')); -//=> ['a/foo/*.js', 'a/bar/*.js', 'a/baz/*.js'] -``` - -### Sequences - -Expand ranges of characters (like Bash "sequences"): - -```js -console.log(braces.expand('{1..3}')); // ['1', '2', '3'] -console.log(braces.expand('a/{1..3}/b')); // ['a/1/b', 'a/2/b', 'a/3/b'] -console.log(braces('{a..c}', { expand: true })); // ['a', 'b', 'c'] -console.log(braces('foo/{a..c}', { expand: true })); // ['foo/a', 'foo/b', 'foo/c'] - -// supports zero-padded ranges -console.log(braces('a/{01..03}/b')); //=> ['a/(0[1-3])/b'] -console.log(braces('a/{001..300}/b')); //=> ['a/(0{2}[1-9]|0[1-9][0-9]|[12][0-9]{2}|300)/b'] -``` - -See [fill-range](https://github.com/jonschlinkert/fill-range) for all available range-expansion options. - -### Steppped ranges - -Steps, or increments, may be used with ranges: - -```js -console.log(braces.expand('{2..10..2}')); -//=> ['2', '4', '6', '8', '10'] - -console.log(braces('{2..10..2}')); -//=> ['(2|4|6|8|10)'] -``` - -When the [.optimize](#optimize) method is used, or [options.optimize](#optionsoptimize) is set to true, sequences are passed to [to-regex-range](https://github.com/jonschlinkert/to-regex-range) for expansion. - -### Nesting - -Brace patterns may be nested. The results of each expanded string are not sorted, and left to right order is preserved. - -**"Expanded" braces** - -```js -console.log(braces.expand('a{b,c,/{x,y}}/e')); -//=> ['ab/e', 'ac/e', 'a/x/e', 'a/y/e'] - -console.log(braces.expand('a/{x,{1..5},y}/c')); -//=> ['a/x/c', 'a/1/c', 'a/2/c', 'a/3/c', 'a/4/c', 'a/5/c', 'a/y/c'] -``` - -**"Optimized" braces** - -```js -console.log(braces('a{b,c,/{x,y}}/e')); -//=> ['a(b|c|/(x|y))/e'] - -console.log(braces('a/{x,{1..5},y}/c')); -//=> ['a/(x|([1-5])|y)/c'] -``` - -### Escaping - -**Escaping braces** - -A brace pattern will not be expanded or evaluted if _either the opening or closing brace is escaped_: - -```js -console.log(braces.expand('a\\{d,c,b}e')); -//=> ['a{d,c,b}e'] - -console.log(braces.expand('a{d,c,b\\}e')); -//=> ['a{d,c,b}e'] -``` - -**Escaping commas** - -Commas inside braces may also be escaped: - -```js -console.log(braces.expand('a{b\\,c}d')); -//=> ['a{b,c}d'] - -console.log(braces.expand('a{d\\,c,b}e')); -//=> ['ad,ce', 'abe'] -``` - -**Single items** - -Following bash conventions, a brace pattern is also not expanded when it contains a single character: - -```js -console.log(braces.expand('a{b}c')); -//=> ['a{b}c'] -``` - -## Options - -### options.maxLength - -**Type**: `Number` - -**Default**: `65,536` - -**Description**: Limit the length of the input string. Useful when the input string is generated or your application allows users to pass a string, et cetera. - -```js -console.log(braces('a/{b,c}/d', { maxLength: 3 })); //=> throws an error -``` - -### options.expand - -**Type**: `Boolean` - -**Default**: `undefined` - -**Description**: Generate an "expanded" brace pattern (alternatively you can use the `braces.expand()` method, which does the same thing). - -```js -console.log(braces('a/{b,c}/d', { expand: true })); -//=> [ 'a/b/d', 'a/c/d' ] -``` - -### options.nodupes - -**Type**: `Boolean` - -**Default**: `undefined` - -**Description**: Remove duplicates from the returned array. - -### options.rangeLimit - -**Type**: `Number` - -**Default**: `1000` - -**Description**: To prevent malicious patterns from being passed by users, an error is thrown when `braces.expand()` is used or `options.expand` is true and the generated range will exceed the `rangeLimit`. - -You can customize `options.rangeLimit` or set it to `Inifinity` to disable this altogether. - -**Examples** - -```js -// pattern exceeds the "rangeLimit", so it's optimized automatically -console.log(braces.expand('{1..1000}')); -//=> ['([1-9]|[1-9][0-9]{1,2}|1000)'] - -// pattern does not exceed "rangeLimit", so it's NOT optimized -console.log(braces.expand('{1..100}')); -//=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100'] -``` - -### options.transform - -**Type**: `Function` - -**Default**: `undefined` - -**Description**: Customize range expansion. - -**Example: Transforming non-numeric values** - -```js -const alpha = braces.expand('x/{a..e}/y', { - transform(value, index) { - // When non-numeric values are passed, "value" is a character code. - return 'foo/' + String.fromCharCode(value) + '-' + index; - } -}); -console.log(alpha); -//=> [ 'x/foo/a-0/y', 'x/foo/b-1/y', 'x/foo/c-2/y', 'x/foo/d-3/y', 'x/foo/e-4/y' ] -``` - -**Example: Transforming numeric values** - -```js -const numeric = braces.expand('{1..5}', { - transform(value) { - // when numeric values are passed, "value" is a number - return 'foo/' + value * 2; - } -}); -console.log(numeric); -//=> [ 'foo/2', 'foo/4', 'foo/6', 'foo/8', 'foo/10' ] -``` - -### options.quantifiers - -**Type**: `Boolean` - -**Default**: `undefined` - -**Description**: In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times. - -Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists) - -The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) are defined in the given pattern, and not to try to expand them as lists. - -**Examples** - -```js -const braces = require('braces'); -console.log(braces('a/b{1,3}/{x,y,z}')); -//=> [ 'a/b(1|3)/(x|y|z)' ] -console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true})); -//=> [ 'a/b{1,3}/(x|y|z)' ] -console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true, expand: true})); -//=> [ 'a/b{1,3}/x', 'a/b{1,3}/y', 'a/b{1,3}/z' ] -``` - -### options.unescape - -**Type**: `Boolean` - -**Default**: `undefined` - -**Description**: Strip backslashes that were used for escaping from the result. - -## What is "brace expansion"? - -Brace expansion is a type of parameter expansion that was made popular by unix shells for generating lists of strings, as well as regex-like matching when used alongside wildcards (globs). - -In addition to "expansion", braces are also used for matching. In other words: - -* [brace expansion](#brace-expansion) is for generating new lists -* [brace matching](#brace-matching) is for filtering existing lists - -<details> -<summary><strong>More about brace expansion</strong> (click to expand)</summary> - -There are two main types of brace expansion: - -1. **lists**: which are defined using comma-separated values inside curly braces: `{a,b,c}` -2. **sequences**: which are defined using a starting value and an ending value, separated by two dots: `a{1..3}b`. Optionally, a third argument may be passed to define a "step" or increment to use: `a{1..100..10}b`. These are also sometimes referred to as "ranges". - -Here are some example brace patterns to illustrate how they work: - -**Sets** - -``` -{a,b,c} => a b c -{a,b,c}{1,2} => a1 a2 b1 b2 c1 c2 -``` - -**Sequences** - -``` -{1..9} => 1 2 3 4 5 6 7 8 9 -{4..-4} => 4 3 2 1 0 -1 -2 -3 -4 -{1..20..3} => 1 4 7 10 13 16 19 -{a..j} => a b c d e f g h i j -{j..a} => j i h g f e d c b a -{a..z..3} => a d g j m p s v y -``` - -**Combination** - -Sets and sequences can be mixed together or used along with any other strings. - -``` -{a,b,c}{1..3} => a1 a2 a3 b1 b2 b3 c1 c2 c3 -foo/{a,b,c}/bar => foo/a/bar foo/b/bar foo/c/bar -``` - -The fact that braces can be "expanded" from relatively simple patterns makes them ideal for quickly generating test fixtures, file paths, and similar use cases. - -## Brace matching - -In addition to _expansion_, brace patterns are also useful for performing regular-expression-like matching. - -For example, the pattern `foo/{1..3}/bar` would match any of following strings: - -``` -foo/1/bar -foo/2/bar -foo/3/bar -``` - -But not: - -``` -baz/1/qux -baz/2/qux -baz/3/qux -``` - -Braces can also be combined with [glob patterns](https://github.com/jonschlinkert/micromatch) to perform more advanced wildcard matching. For example, the pattern `*/{1..3}/*` would match any of following strings: - -``` -foo/1/bar -foo/2/bar -foo/3/bar -baz/1/qux -baz/2/qux -baz/3/qux -``` - -## Brace matching pitfalls - -Although brace patterns offer a user-friendly way of matching ranges or sets of strings, there are also some major disadvantages and potential risks you should be aware of. - -### tldr - -**"brace bombs"** - -* brace expansion can eat up a huge amount of processing resources -* as brace patterns increase _linearly in size_, the system resources required to expand the pattern increase exponentially -* users can accidentally (or intentially) exhaust your system's resources resulting in the equivalent of a DoS attack (bonus: no programming knowledge is required!) - -For a more detailed explanation with examples, see the [geometric complexity](#geometric-complexity) section. - -### The solution - -Jump to the [performance section](#performance) to see how Braces solves this problem in comparison to other libraries. - -### Geometric complexity - -At minimum, brace patterns with sets limited to two elements have quadradic or `O(n^2)` complexity. But the complexity of the algorithm increases exponentially as the number of sets, _and elements per set_, increases, which is `O(n^c)`. - -For example, the following sets demonstrate quadratic (`O(n^2)`) complexity: - -``` -{1,2}{3,4} => (2X2) => 13 14 23 24 -{1,2}{3,4}{5,6} => (2X2X2) => 135 136 145 146 235 236 245 246 -``` - -But add an element to a set, and we get a n-fold Cartesian product with `O(n^c)` complexity: - -``` -{1,2,3}{4,5,6}{7,8,9} => (3X3X3) => 147 148 149 157 158 159 167 168 169 247 248 - 249 257 258 259 267 268 269 347 348 349 357 - 358 359 367 368 369 -``` - -Now, imagine how this complexity grows given that each element is a n-tuple: - -``` -{1..100}{1..100} => (100X100) => 10,000 elements (38.4 kB) -{1..100}{1..100}{1..100} => (100X100X100) => 1,000,000 elements (5.76 MB) -``` - -Although these examples are clearly contrived, they demonstrate how brace patterns can quickly grow out of control. - -**More information** - -Interested in learning more about brace expansion? - -* [linuxjournal/bash-brace-expansion](http://www.linuxjournal.com/content/bash-brace-expansion) -* [rosettacode/Brace_expansion](https://rosettacode.org/wiki/Brace_expansion) -* [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) - -</details> - -## Performance - -Braces is not only screaming fast, it's also more accurate the other brace expansion libraries. - -### Better algorithms - -Fortunately there is a solution to the ["brace bomb" problem](#brace-matching-pitfalls): _don't expand brace patterns into an array when they're used for matching_. - -Instead, convert the pattern into an optimized regular expression. This is easier said than done, and braces is the only library that does this currently. - -**The proof is in the numbers** - -Minimatch gets exponentially slower as patterns increase in complexity, braces does not. The following results were generated using `braces()` and `minimatch.braceExpand()`, respectively. - -| **Pattern** | **braces** | **[minimatch][]** | -| --- | --- | --- | -| `{1..9007199254740991}`[^1] | `298 B` (5ms 459μs)| N/A (freezes) | -| `{1..1000000000000000}` | `41 B` (1ms 15μs) | N/A (freezes) | -| `{1..100000000000000}` | `40 B` (890μs) | N/A (freezes) | -| `{1..10000000000000}` | `39 B` (2ms 49μs) | N/A (freezes) | -| `{1..1000000000000}` | `38 B` (608μs) | N/A (freezes) | -| `{1..100000000000}` | `37 B` (397μs) | N/A (freezes) | -| `{1..10000000000}` | `35 B` (983μs) | N/A (freezes) | -| `{1..1000000000}` | `34 B` (798μs) | N/A (freezes) | -| `{1..100000000}` | `33 B` (733μs) | N/A (freezes) | -| `{1..10000000}` | `32 B` (5ms 632μs) | `78.89 MB` (16s 388ms 569μs) | -| `{1..1000000}` | `31 B` (1ms 381μs) | `6.89 MB` (1s 496ms 887μs) | -| `{1..100000}` | `30 B` (950μs) | `588.89 kB` (146ms 921μs) | -| `{1..10000}` | `29 B` (1ms 114μs) | `48.89 kB` (14ms 187μs) | -| `{1..1000}` | `28 B` (760μs) | `3.89 kB` (1ms 453μs) | -| `{1..100}` | `22 B` (345μs) | `291 B` (196μs) | -| `{1..10}` | `10 B` (533μs) | `20 B` (37μs) | -| `{1..3}` | `7 B` (190μs) | `5 B` (27μs) | - -### Faster algorithms - -When you need expansion, braces is still much faster. - -_(the following results were generated using `braces.expand()` and `minimatch.braceExpand()`, respectively)_ - -| **Pattern** | **braces** | **[minimatch][]** | -| --- | --- | --- | -| `{1..10000000}` | `78.89 MB` (2s 698ms 642μs) | `78.89 MB` (18s 601ms 974μs) | -| `{1..1000000}` | `6.89 MB` (458ms 576μs) | `6.89 MB` (1s 491ms 621μs) | -| `{1..100000}` | `588.89 kB` (20ms 728μs) | `588.89 kB` (156ms 919μs) | -| `{1..10000}` | `48.89 kB` (2ms 202μs) | `48.89 kB` (13ms 641μs) | -| `{1..1000}` | `3.89 kB` (1ms 796μs) | `3.89 kB` (1ms 958μs) | -| `{1..100}` | `291 B` (424μs) | `291 B` (211μs) | -| `{1..10}` | `20 B` (487μs) | `20 B` (72μs) | -| `{1..3}` | `5 B` (166μs) | `5 B` (27μs) | - -If you'd like to run these comparisons yourself, see [test/support/generate.js](test/support/generate.js). - -## Benchmarks - -### Running benchmarks - -Install dev dependencies: - -```bash -npm i -d && npm benchmark -``` - -### Latest results - -Braces is more accurate, without sacrificing performance. - -```bash -# range (expanded) - braces x 29,040 ops/sec ±3.69% (91 runs sampled)) - minimatch x 4,735 ops/sec ±1.28% (90 runs sampled) - -# range (optimized for regex) - braces x 382,878 ops/sec ±0.56% (94 runs sampled) - minimatch x 1,040 ops/sec ±0.44% (93 runs sampled) - -# nested ranges (expanded) - braces x 19,744 ops/sec ±2.27% (92 runs sampled)) - minimatch x 4,579 ops/sec ±0.50% (93 runs sampled) - -# nested ranges (optimized for regex) - braces x 246,019 ops/sec ±2.02% (93 runs sampled) - minimatch x 1,028 ops/sec ±0.39% (94 runs sampled) - -# set (expanded) - braces x 138,641 ops/sec ±0.53% (95 runs sampled) - minimatch x 219,582 ops/sec ±0.98% (94 runs sampled) - -# set (optimized for regex) - braces x 388,408 ops/sec ±0.41% (95 runs sampled) - minimatch x 44,724 ops/sec ±0.91% (89 runs sampled) - -# nested sets (expanded) - braces x 84,966 ops/sec ±0.48% (94 runs sampled) - minimatch x 140,720 ops/sec ±0.37% (95 runs sampled) - -# nested sets (optimized for regex) - braces x 263,340 ops/sec ±2.06% (92 runs sampled) - minimatch x 28,714 ops/sec ±0.40% (90 runs sampled) -``` - -## About - -<details> -<summary><strong>Contributing</strong></summary> - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -</details> - -<details> -<summary><strong>Running Tests</strong></summary> - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -</details> - -<details> -<summary><strong>Building docs</strong></summary> - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -</details> - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 197 | [jonschlinkert](https://github.com/jonschlinkert) | -| 4 | [doowb](https://github.com/doowb) | -| 1 | [es128](https://github.com/es128) | -| 1 | [eush77](https://github.com/eush77) | -| 1 | [hemanth](https://github.com/hemanth) | -| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | - -### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -### License - -Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._ \ No newline at end of file diff --git a/node_modules/braces/index.js b/node_modules/braces/index.js deleted file mode 100644 index 0eee0f56..00000000 --- a/node_modules/braces/index.js +++ /dev/null @@ -1,170 +0,0 @@ -'use strict'; - -const stringify = require('./lib/stringify'); -const compile = require('./lib/compile'); -const expand = require('./lib/expand'); -const parse = require('./lib/parse'); - -/** - * Expand the given pattern or create a regex-compatible string. - * - * ```js - * const braces = require('braces'); - * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] - * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {String} - * @api public - */ - -const braces = (input, options = {}) => { - let output = []; - - if (Array.isArray(input)) { - for (let pattern of input) { - let result = braces.create(pattern, options); - if (Array.isArray(result)) { - output.push(...result); - } else { - output.push(result); - } - } - } else { - output = [].concat(braces.create(input, options)); - } - - if (options && options.expand === true && options.nodupes === true) { - output = [...new Set(output)]; - } - return output; -}; - -/** - * Parse the given `str` with the given `options`. - * - * ```js - * // braces.parse(pattern, [, options]); - * const ast = braces.parse('a/{b,c}/d'); - * console.log(ast); - * ``` - * @param {String} pattern Brace pattern to parse - * @param {Object} options - * @return {Object} Returns an AST - * @api public - */ - -braces.parse = (input, options = {}) => parse(input, options); - -/** - * Creates a braces string from an AST, or an AST node. - * - * ```js - * const braces = require('braces'); - * let ast = braces.parse('foo/{a,b}/bar'); - * console.log(stringify(ast.nodes[2])); //=> '{a,b}' - * ``` - * @param {String} `input` Brace pattern or AST. - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.stringify = (input, options = {}) => { - if (typeof input === 'string') { - return stringify(braces.parse(input, options), options); - } - return stringify(input, options); -}; - -/** - * Compiles a brace pattern into a regex-compatible, optimized string. - * This method is called by the main [braces](#braces) function by default. - * - * ```js - * const braces = require('braces'); - * console.log(braces.compile('a/{b,c}/d')); - * //=> ['a/(b|c)/d'] - * ``` - * @param {String} `input` Brace pattern or AST. - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.compile = (input, options = {}) => { - if (typeof input === 'string') { - input = braces.parse(input, options); - } - return compile(input, options); -}; - -/** - * Expands a brace pattern into an array. This method is called by the - * main [braces](#braces) function when `options.expand` is true. Before - * using this method it's recommended that you read the [performance notes](#performance)) - * and advantages of using [.compile](#compile) instead. - * - * ```js - * const braces = require('braces'); - * console.log(braces.expand('a/{b,c}/d')); - * //=> ['a/b/d', 'a/c/d']; - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.expand = (input, options = {}) => { - if (typeof input === 'string') { - input = braces.parse(input, options); - } - - let result = expand(input, options); - - // filter out empty strings if specified - if (options.noempty === true) { - result = result.filter(Boolean); - } - - // filter out duplicates if specified - if (options.nodupes === true) { - result = [...new Set(result)]; - } - - return result; -}; - -/** - * Processes a brace pattern and returns either an expanded array - * (if `options.expand` is true), a highly optimized regex-compatible string. - * This method is called by the main [braces](#braces) function. - * - * ```js - * const braces = require('braces'); - * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) - * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.create = (input, options = {}) => { - if (input === '' || input.length < 3) { - return [input]; - } - - return options.expand !== true - ? braces.compile(input, options) - : braces.expand(input, options); -}; - -/** - * Expose "braces" - */ - -module.exports = braces; diff --git a/node_modules/braces/lib/compile.js b/node_modules/braces/lib/compile.js deleted file mode 100644 index 3e984a4b..00000000 --- a/node_modules/braces/lib/compile.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -const fill = require('fill-range'); -const utils = require('./utils'); - -const compile = (ast, options = {}) => { - let walk = (node, parent = {}) => { - let invalidBlock = utils.isInvalidBrace(parent); - let invalidNode = node.invalid === true && options.escapeInvalid === true; - let invalid = invalidBlock === true || invalidNode === true; - let prefix = options.escapeInvalid === true ? '\\' : ''; - let output = ''; - - if (node.isOpen === true) { - return prefix + node.value; - } - if (node.isClose === true) { - return prefix + node.value; - } - - if (node.type === 'open') { - return invalid ? (prefix + node.value) : '('; - } - - if (node.type === 'close') { - return invalid ? (prefix + node.value) : ')'; - } - - if (node.type === 'comma') { - return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|'); - } - - if (node.value) { - return node.value; - } - - if (node.nodes && node.ranges > 0) { - let args = utils.reduce(node.nodes); - let range = fill(...args, { ...options, wrap: false, toRegex: true }); - - if (range.length !== 0) { - return args.length > 1 && range.length > 1 ? `(${range})` : range; - } - } - - if (node.nodes) { - for (let child of node.nodes) { - output += walk(child, node); - } - } - return output; - }; - - return walk(ast); -}; - -module.exports = compile; diff --git a/node_modules/braces/lib/constants.js b/node_modules/braces/lib/constants.js deleted file mode 100644 index a9379436..00000000 --- a/node_modules/braces/lib/constants.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -module.exports = { - MAX_LENGTH: 1024 * 64, - - // Digits - CHAR_0: '0', /* 0 */ - CHAR_9: '9', /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 'A', /* A */ - CHAR_LOWERCASE_A: 'a', /* a */ - CHAR_UPPERCASE_Z: 'Z', /* Z */ - CHAR_LOWERCASE_Z: 'z', /* z */ - - CHAR_LEFT_PARENTHESES: '(', /* ( */ - CHAR_RIGHT_PARENTHESES: ')', /* ) */ - - CHAR_ASTERISK: '*', /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: '&', /* & */ - CHAR_AT: '@', /* @ */ - CHAR_BACKSLASH: '\\', /* \ */ - CHAR_BACKTICK: '`', /* ` */ - CHAR_CARRIAGE_RETURN: '\r', /* \r */ - CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ - CHAR_COLON: ':', /* : */ - CHAR_COMMA: ',', /* , */ - CHAR_DOLLAR: '$', /* . */ - CHAR_DOT: '.', /* . */ - CHAR_DOUBLE_QUOTE: '"', /* " */ - CHAR_EQUAL: '=', /* = */ - CHAR_EXCLAMATION_MARK: '!', /* ! */ - CHAR_FORM_FEED: '\f', /* \f */ - CHAR_FORWARD_SLASH: '/', /* / */ - CHAR_HASH: '#', /* # */ - CHAR_HYPHEN_MINUS: '-', /* - */ - CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ - CHAR_LEFT_CURLY_BRACE: '{', /* { */ - CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ - CHAR_LINE_FEED: '\n', /* \n */ - CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ - CHAR_PERCENT: '%', /* % */ - CHAR_PLUS: '+', /* + */ - CHAR_QUESTION_MARK: '?', /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ - CHAR_RIGHT_CURLY_BRACE: '}', /* } */ - CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ - CHAR_SEMICOLON: ';', /* ; */ - CHAR_SINGLE_QUOTE: '\'', /* ' */ - CHAR_SPACE: ' ', /* */ - CHAR_TAB: '\t', /* \t */ - CHAR_UNDERSCORE: '_', /* _ */ - CHAR_VERTICAL_LINE: '|', /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ -}; diff --git a/node_modules/braces/lib/expand.js b/node_modules/braces/lib/expand.js deleted file mode 100644 index 376c748a..00000000 --- a/node_modules/braces/lib/expand.js +++ /dev/null @@ -1,113 +0,0 @@ -'use strict'; - -const fill = require('fill-range'); -const stringify = require('./stringify'); -const utils = require('./utils'); - -const append = (queue = '', stash = '', enclose = false) => { - let result = []; - - queue = [].concat(queue); - stash = [].concat(stash); - - if (!stash.length) return queue; - if (!queue.length) { - return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; - } - - for (let item of queue) { - if (Array.isArray(item)) { - for (let value of item) { - result.push(append(value, stash, enclose)); - } - } else { - for (let ele of stash) { - if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; - result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele)); - } - } - } - return utils.flatten(result); -}; - -const expand = (ast, options = {}) => { - let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit; - - let walk = (node, parent = {}) => { - node.queue = []; - - let p = parent; - let q = parent.queue; - - while (p.type !== 'brace' && p.type !== 'root' && p.parent) { - p = p.parent; - q = p.queue; - } - - if (node.invalid || node.dollar) { - q.push(append(q.pop(), stringify(node, options))); - return; - } - - if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { - q.push(append(q.pop(), ['{}'])); - return; - } - - if (node.nodes && node.ranges > 0) { - let args = utils.reduce(node.nodes); - - if (utils.exceedsLimit(...args, options.step, rangeLimit)) { - throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); - } - - let range = fill(...args, options); - if (range.length === 0) { - range = stringify(node, options); - } - - q.push(append(q.pop(), range)); - node.nodes = []; - return; - } - - let enclose = utils.encloseBrace(node); - let queue = node.queue; - let block = node; - - while (block.type !== 'brace' && block.type !== 'root' && block.parent) { - block = block.parent; - queue = block.queue; - } - - for (let i = 0; i < node.nodes.length; i++) { - let child = node.nodes[i]; - - if (child.type === 'comma' && node.type === 'brace') { - if (i === 1) queue.push(''); - queue.push(''); - continue; - } - - if (child.type === 'close') { - q.push(append(q.pop(), queue, enclose)); - continue; - } - - if (child.value && child.type !== 'open') { - queue.push(append(queue.pop(), child.value)); - continue; - } - - if (child.nodes) { - walk(child, node); - } - } - - return queue; - }; - - return utils.flatten(walk(ast)); -}; - -module.exports = expand; diff --git a/node_modules/braces/lib/parse.js b/node_modules/braces/lib/parse.js deleted file mode 100644 index 145ea264..00000000 --- a/node_modules/braces/lib/parse.js +++ /dev/null @@ -1,333 +0,0 @@ -'use strict'; - -const stringify = require('./stringify'); - -/** - * Constants - */ - -const { - MAX_LENGTH, - CHAR_BACKSLASH, /* \ */ - CHAR_BACKTICK, /* ` */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_RIGHT_SQUARE_BRACKET, /* ] */ - CHAR_DOUBLE_QUOTE, /* " */ - CHAR_SINGLE_QUOTE, /* ' */ - CHAR_NO_BREAK_SPACE, - CHAR_ZERO_WIDTH_NOBREAK_SPACE -} = require('./constants'); - -/** - * parse - */ - -const parse = (input, options = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - let opts = options || {}; - let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - if (input.length > max) { - throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); - } - - let ast = { type: 'root', input, nodes: [] }; - let stack = [ast]; - let block = ast; - let prev = ast; - let brackets = 0; - let length = input.length; - let index = 0; - let depth = 0; - let value; - let memo = {}; - - /** - * Helpers - */ - - const advance = () => input[index++]; - const push = node => { - if (node.type === 'text' && prev.type === 'dot') { - prev.type = 'text'; - } - - if (prev && prev.type === 'text' && node.type === 'text') { - prev.value += node.value; - return; - } - - block.nodes.push(node); - node.parent = block; - node.prev = prev; - prev = node; - return node; - }; - - push({ type: 'bos' }); - - while (index < length) { - block = stack[stack.length - 1]; - value = advance(); - - /** - * Invalid chars - */ - - if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { - continue; - } - - /** - * Escaped chars - */ - - if (value === CHAR_BACKSLASH) { - push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); - continue; - } - - /** - * Right square bracket (literal): ']' - */ - - if (value === CHAR_RIGHT_SQUARE_BRACKET) { - push({ type: 'text', value: '\\' + value }); - continue; - } - - /** - * Left square bracket: '[' - */ - - if (value === CHAR_LEFT_SQUARE_BRACKET) { - brackets++; - - let closed = true; - let next; - - while (index < length && (next = advance())) { - value += next; - - if (next === CHAR_LEFT_SQUARE_BRACKET) { - brackets++; - continue; - } - - if (next === CHAR_BACKSLASH) { - value += advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - brackets--; - - if (brackets === 0) { - break; - } - } - } - - push({ type: 'text', value }); - continue; - } - - /** - * Parentheses - */ - - if (value === CHAR_LEFT_PARENTHESES) { - block = push({ type: 'paren', nodes: [] }); - stack.push(block); - push({ type: 'text', value }); - continue; - } - - if (value === CHAR_RIGHT_PARENTHESES) { - if (block.type !== 'paren') { - push({ type: 'text', value }); - continue; - } - block = stack.pop(); - push({ type: 'text', value }); - block = stack[stack.length - 1]; - continue; - } - - /** - * Quotes: '|"|` - */ - - if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { - let open = value; - let next; - - if (options.keepQuotes !== true) { - value = ''; - } - - while (index < length && (next = advance())) { - if (next === CHAR_BACKSLASH) { - value += next + advance(); - continue; - } - - if (next === open) { - if (options.keepQuotes === true) value += next; - break; - } - - value += next; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Left curly brace: '{' - */ - - if (value === CHAR_LEFT_CURLY_BRACE) { - depth++; - - let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; - let brace = { - type: 'brace', - open: true, - close: false, - dollar, - depth, - commas: 0, - ranges: 0, - nodes: [] - }; - - block = push(brace); - stack.push(block); - push({ type: 'open', value }); - continue; - } - - /** - * Right curly brace: '}' - */ - - if (value === CHAR_RIGHT_CURLY_BRACE) { - if (block.type !== 'brace') { - push({ type: 'text', value }); - continue; - } - - let type = 'close'; - block = stack.pop(); - block.close = true; - - push({ type, value }); - depth--; - - block = stack[stack.length - 1]; - continue; - } - - /** - * Comma: ',' - */ - - if (value === CHAR_COMMA && depth > 0) { - if (block.ranges > 0) { - block.ranges = 0; - let open = block.nodes.shift(); - block.nodes = [open, { type: 'text', value: stringify(block) }]; - } - - push({ type: 'comma', value }); - block.commas++; - continue; - } - - /** - * Dot: '.' - */ - - if (value === CHAR_DOT && depth > 0 && block.commas === 0) { - let siblings = block.nodes; - - if (depth === 0 || siblings.length === 0) { - push({ type: 'text', value }); - continue; - } - - if (prev.type === 'dot') { - block.range = []; - prev.value += value; - prev.type = 'range'; - - if (block.nodes.length !== 3 && block.nodes.length !== 5) { - block.invalid = true; - block.ranges = 0; - prev.type = 'text'; - continue; - } - - block.ranges++; - block.args = []; - continue; - } - - if (prev.type === 'range') { - siblings.pop(); - - let before = siblings[siblings.length - 1]; - before.value += prev.value + value; - prev = before; - block.ranges--; - continue; - } - - push({ type: 'dot', value }); - continue; - } - - /** - * Text - */ - - push({ type: 'text', value }); - } - - // Mark imbalanced braces and brackets as invalid - do { - block = stack.pop(); - - if (block.type !== 'root') { - block.nodes.forEach(node => { - if (!node.nodes) { - if (node.type === 'open') node.isOpen = true; - if (node.type === 'close') node.isClose = true; - if (!node.nodes) node.type = 'text'; - node.invalid = true; - } - }); - - // get the location of the block on parent.nodes (block's siblings) - let parent = stack[stack.length - 1]; - let index = parent.nodes.indexOf(block); - // replace the (invalid) block with it's nodes - parent.nodes.splice(index, 1, ...block.nodes); - } - } while (stack.length > 0); - - push({ type: 'eos' }); - return ast; -}; - -module.exports = parse; diff --git a/node_modules/braces/lib/stringify.js b/node_modules/braces/lib/stringify.js deleted file mode 100644 index 414b7bcc..00000000 --- a/node_modules/braces/lib/stringify.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -const utils = require('./utils'); - -module.exports = (ast, options = {}) => { - let stringify = (node, parent = {}) => { - let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); - let invalidNode = node.invalid === true && options.escapeInvalid === true; - let output = ''; - - if (node.value) { - if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { - return '\\' + node.value; - } - return node.value; - } - - if (node.value) { - return node.value; - } - - if (node.nodes) { - for (let child of node.nodes) { - output += stringify(child); - } - } - return output; - }; - - return stringify(ast); -}; - diff --git a/node_modules/braces/lib/utils.js b/node_modules/braces/lib/utils.js deleted file mode 100644 index e3551a67..00000000 --- a/node_modules/braces/lib/utils.js +++ /dev/null @@ -1,112 +0,0 @@ -'use strict'; - -exports.isInteger = num => { - if (typeof num === 'number') { - return Number.isInteger(num); - } - if (typeof num === 'string' && num.trim() !== '') { - return Number.isInteger(Number(num)); - } - return false; -}; - -/** - * Find a node of the given type - */ - -exports.find = (node, type) => node.nodes.find(node => node.type === type); - -/** - * Find a node of the given type - */ - -exports.exceedsLimit = (min, max, step = 1, limit) => { - if (limit === false) return false; - if (!exports.isInteger(min) || !exports.isInteger(max)) return false; - return ((Number(max) - Number(min)) / Number(step)) >= limit; -}; - -/** - * Escape the given node with '\\' before node.value - */ - -exports.escapeNode = (block, n = 0, type) => { - let node = block.nodes[n]; - if (!node) return; - - if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { - if (node.escaped !== true) { - node.value = '\\' + node.value; - node.escaped = true; - } - } -}; - -/** - * Returns true if the given brace node should be enclosed in literal braces - */ - -exports.encloseBrace = node => { - if (node.type !== 'brace') return false; - if ((node.commas >> 0 + node.ranges >> 0) === 0) { - node.invalid = true; - return true; - } - return false; -}; - -/** - * Returns true if a brace node is invalid. - */ - -exports.isInvalidBrace = block => { - if (block.type !== 'brace') return false; - if (block.invalid === true || block.dollar) return true; - if ((block.commas >> 0 + block.ranges >> 0) === 0) { - block.invalid = true; - return true; - } - if (block.open !== true || block.close !== true) { - block.invalid = true; - return true; - } - return false; -}; - -/** - * Returns true if a node is an open or close node - */ - -exports.isOpenOrClose = node => { - if (node.type === 'open' || node.type === 'close') { - return true; - } - return node.open === true || node.close === true; -}; - -/** - * Reduce an array of text nodes. - */ - -exports.reduce = nodes => nodes.reduce((acc, node) => { - if (node.type === 'text') acc.push(node.value); - if (node.type === 'range') node.type = 'text'; - return acc; -}, []); - -/** - * Flatten an array - */ - -exports.flatten = (...args) => { - const result = []; - const flat = arr => { - for (let i = 0; i < arr.length; i++) { - let ele = arr[i]; - Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele); - } - return result; - }; - flat(args); - return result; -}; diff --git a/node_modules/braces/package.json b/node_modules/braces/package.json deleted file mode 100644 index fb6ff6c5..00000000 --- a/node_modules/braces/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "_from": "braces@~3.0", - "_id": "braces@3.0.2", - "_inBundle": false, - "_integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "_location": "/braces", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "braces@~3.0", - "name": "braces", - "escapedName": "braces", - "rawSpec": "~3.0", - "saveSpec": null, - "fetchSpec": "~3.0" - }, - "_requiredBy": [ - "/@antora/content-aggregator" - ], - "_resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "_shasum": "3454e1a462ee8d599e236df336cd9ea4f8afe107", - "_spec": "braces@~3.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/content-aggregator", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/micromatch/braces/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Brian Woodward", - "url": "https://twitter.com/doowb" - }, - { - "name": "Elan Shanker", - "url": "https://github.com/es128" - }, - { - "name": "Eugene Sharygin", - "url": "https://github.com/eush77" - }, - { - "name": "hemanth.hm", - "url": "http://h3manth.com" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - } - ], - "dependencies": { - "fill-range": "^7.0.1" - }, - "deprecated": false, - "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.", - "devDependencies": { - "ansi-colors": "^3.2.4", - "bash-path": "^2.0.1", - "gulp-format-md": "^2.0.0", - "mocha": "^6.1.1" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "lib" - ], - "homepage": "https://github.com/micromatch/braces", - "keywords": [ - "alpha", - "alphabetical", - "bash", - "brace", - "braces", - "expand", - "expansion", - "filepath", - "fill", - "fs", - "glob", - "globbing", - "letter", - "match", - "matches", - "matching", - "number", - "numerical", - "path", - "range", - "ranges", - "sh" - ], - "license": "MIT", - "main": "index.js", - "name": "braces", - "repository": { - "type": "git", - "url": "git+https://github.com/micromatch/braces.git" - }, - "scripts": { - "benchmark": "node benchmark", - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "lint": { - "reflinks": true - }, - "plugins": [ - "gulp-format-md" - ] - }, - "version": "3.0.2" -} diff --git a/node_modules/buffer-crc32/LICENSE b/node_modules/buffer-crc32/LICENSE deleted file mode 100644 index 4cef10eb..00000000 --- a/node_modules/buffer-crc32/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -The MIT License - -Copyright (c) 2013 Brian J. Brennan - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the -Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE -FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/buffer-crc32/README.md b/node_modules/buffer-crc32/README.md deleted file mode 100644 index 0d9d8b83..00000000 --- a/node_modules/buffer-crc32/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# buffer-crc32 - -[![Build Status](https://secure.travis-ci.org/brianloveswords/buffer-crc32.png?branch=master)](http://travis-ci.org/brianloveswords/buffer-crc32) - -crc32 that works with binary data and fancy character sets, outputs -buffer, signed or unsigned data and has tests. - -Derived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix - -# install -``` -npm install buffer-crc32 -``` - -# example -```js -var crc32 = require('buffer-crc32'); -// works with buffers -var buf = Buffer([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00]) -crc32(buf) // -> <Buffer 94 5a ab 4a> - -// has convenience methods for getting signed or unsigned ints -crc32.signed(buf) // -> -1805997238 -crc32.unsigned(buf) // -> 2488970058 - -// will cast to buffer if given a string, so you can -// directly use foreign characters safely -crc32('自動販売機') // -> <Buffer cb 03 1a c5> - -// and works in append mode too -var partialCrc = crc32('hey'); -var partialCrc = crc32(' ', partialCrc); -var partialCrc = crc32('sup', partialCrc); -var partialCrc = crc32(' ', partialCrc); -var finalCrc = crc32('bros', partialCrc); // -> <Buffer 47 fa 55 70> -``` - -# tests -This was tested against the output of zlib's crc32 method. You can run -the tests with`npm test` (requires tap) - -# see also -https://github.com/alexgorbatchev/node-crc, `crc.buffer.crc32` also -supports buffer inputs and return unsigned ints (thanks @tjholowaychuk). - -# license -MIT/X11 diff --git a/node_modules/buffer-crc32/index.js b/node_modules/buffer-crc32/index.js deleted file mode 100644 index 6727dd39..00000000 --- a/node_modules/buffer-crc32/index.js +++ /dev/null @@ -1,111 +0,0 @@ -var Buffer = require('buffer').Buffer; - -var CRC_TABLE = [ - 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, - 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, - 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, - 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, - 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, - 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, - 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, - 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, - 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, - 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, - 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, - 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, - 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, - 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, - 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, - 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, - 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, - 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, - 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, - 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, - 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, - 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, - 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, - 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, - 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, - 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, - 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, - 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, - 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, - 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, - 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, - 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, - 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, - 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, - 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, - 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, - 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, - 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, - 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, - 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, - 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, - 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, - 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, - 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, - 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, - 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, - 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, - 0x2d02ef8d -]; - -if (typeof Int32Array !== 'undefined') { - CRC_TABLE = new Int32Array(CRC_TABLE); -} - -function ensureBuffer(input) { - if (Buffer.isBuffer(input)) { - return input; - } - - var hasNewBufferAPI = - typeof Buffer.alloc === "function" && - typeof Buffer.from === "function"; - - if (typeof input === "number") { - return hasNewBufferAPI ? Buffer.alloc(input) : new Buffer(input); - } - else if (typeof input === "string") { - return hasNewBufferAPI ? Buffer.from(input) : new Buffer(input); - } - else { - throw new Error("input must be buffer, number, or string, received " + - typeof input); - } -} - -function bufferizeInt(num) { - var tmp = ensureBuffer(4); - tmp.writeInt32BE(num, 0); - return tmp; -} - -function _crc32(buf, previous) { - buf = ensureBuffer(buf); - if (Buffer.isBuffer(previous)) { - previous = previous.readUInt32BE(0); - } - var crc = ~~previous ^ -1; - for (var n = 0; n < buf.length; n++) { - crc = CRC_TABLE[(crc ^ buf[n]) & 0xff] ^ (crc >>> 8); - } - return (crc ^ -1); -} - -function crc32() { - return bufferizeInt(_crc32.apply(null, arguments)); -} -crc32.signed = function () { - return _crc32.apply(null, arguments); -}; -crc32.unsigned = function () { - return _crc32.apply(null, arguments) >>> 0; -}; - -module.exports = crc32; diff --git a/node_modules/buffer-crc32/package.json b/node_modules/buffer-crc32/package.json deleted file mode 100644 index b8436360..00000000 --- a/node_modules/buffer-crc32/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "buffer-crc32@~0.2.3", - "_id": "buffer-crc32@0.2.13", - "_inBundle": false, - "_integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", - "_location": "/buffer-crc32", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "buffer-crc32@~0.2.3", - "name": "buffer-crc32", - "escapedName": "buffer-crc32", - "rawSpec": "~0.2.3", - "saveSpec": null, - "fetchSpec": "~0.2.3" - }, - "_requiredBy": [ - "/yauzl", - "/yazl" - ], - "_resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "_shasum": "0d333e3f00eac50aa1454abd30ef8c2a5d9a7242", - "_spec": "buffer-crc32@~0.2.3", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/yauzl", - "author": { - "name": "Brian J. Brennan", - "email": "brianloveswords@gmail.com" - }, - "bugs": { - "url": "https://github.com/brianloveswords/buffer-crc32/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Vladimir Kuznetsov" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "A pure javascript CRC32 algorithm that plays nice with binary data", - "devDependencies": { - "tap": "~0.2.5" - }, - "engines": { - "node": "*" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/brianloveswords/buffer-crc32", - "license": "MIT", - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/brianloveswords/buffer-crc32/raw/master/LICENSE" - } - ], - "main": "index.js", - "name": "buffer-crc32", - "optionalDependencies": {}, - "repository": { - "type": "git", - "url": "git://github.com/brianloveswords/buffer-crc32.git" - }, - "scripts": { - "test": "tap tests/*.test.js" - }, - "version": "0.2.13" -} diff --git a/node_modules/buffer-equal/.travis.yml b/node_modules/buffer-equal/.travis.yml deleted file mode 100644 index dad2273c..00000000 --- a/node_modules/buffer-equal/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.8 - - "0.10" diff --git a/node_modules/buffer-equal/LICENSE b/node_modules/buffer-equal/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/buffer-equal/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/buffer-equal/README.markdown b/node_modules/buffer-equal/README.markdown deleted file mode 100644 index 8c062fd0..00000000 --- a/node_modules/buffer-equal/README.markdown +++ /dev/null @@ -1,62 +0,0 @@ -buffer-equal -============ - -Return whether two buffers are equal. - -[![build status](https://secure.travis-ci.org/substack/node-buffer-equal.png)](http://travis-ci.org/substack/node-buffer-equal) - -example -======= - -``` js -var bufferEqual = require('buffer-equal'); - -console.dir(bufferEqual( - new Buffer([253,254,255]), - new Buffer([253,254,255]) -)); -console.dir(bufferEqual( - new Buffer('abc'), - new Buffer('abcd') -)); -console.dir(bufferEqual( - new Buffer('abc'), - 'abc' -)); -``` - -output: - -``` -true -false -undefined -``` - -methods -======= - -``` js -var bufferEqual = require('buffer-equal') -``` - -bufferEqual(a, b) ------------------ - -Return whether the two buffers `a` and `b` are equal. - -If `a` or `b` is not a buffer, return `undefined`. - -install -======= - -With [npm](http://npmjs.org) do: - -``` -npm install buffer-equal -``` - -license -======= - -MIT diff --git a/node_modules/buffer-equal/example/eq.js b/node_modules/buffer-equal/example/eq.js deleted file mode 100644 index 1eb05095..00000000 --- a/node_modules/buffer-equal/example/eq.js +++ /dev/null @@ -1,14 +0,0 @@ -var bufferEqual = require('../'); - -console.dir(bufferEqual( - new Buffer([253,254,255]), - new Buffer([253,254,255]) -)); -console.dir(bufferEqual( - new Buffer('abc'), - new Buffer('abcd') -)); -console.dir(bufferEqual( - new Buffer('abc'), - 'abc' -)); diff --git a/node_modules/buffer-equal/index.js b/node_modules/buffer-equal/index.js deleted file mode 100644 index e640d4e2..00000000 --- a/node_modules/buffer-equal/index.js +++ /dev/null @@ -1,14 +0,0 @@ -var Buffer = require('buffer').Buffer; // for use with browserify - -module.exports = function (a, b) { - if (!Buffer.isBuffer(a)) return undefined; - if (!Buffer.isBuffer(b)) return undefined; - if (typeof a.equals === 'function') return a.equals(b); - if (a.length !== b.length) return false; - - for (var i = 0; i < a.length; i++) { - if (a[i] !== b[i]) return false; - } - - return true; -}; diff --git a/node_modules/buffer-equal/package.json b/node_modules/buffer-equal/package.json deleted file mode 100644 index 385b6e8d..00000000 --- a/node_modules/buffer-equal/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_from": "buffer-equal@^1.0.0", - "_id": "buffer-equal@1.0.0", - "_inBundle": false, - "_integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", - "_location": "/buffer-equal", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "buffer-equal@^1.0.0", - "name": "buffer-equal", - "escapedName": "buffer-equal", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/append-buffer" - ], - "_resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", - "_shasum": "59616b498304d556abd466966b22eeda3eca5fbe", - "_spec": "buffer-equal@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/append-buffer", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/node-buffer-equal/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "return whether two buffers are equal", - "devDependencies": { - "tap": "0.2.4" - }, - "directories": { - "example": "example", - "test": "test" - }, - "engines": { - "node": ">=0.4.0" - }, - "homepage": "https://github.com/substack/node-buffer-equal#readme", - "keywords": [ - "buffer", - "equal" - ], - "license": "MIT", - "main": "index.js", - "name": "buffer-equal", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-buffer-equal.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "1.0.0" -} diff --git a/node_modules/buffer-equal/test/eq.js b/node_modules/buffer-equal/test/eq.js deleted file mode 100644 index 3d340062..00000000 --- a/node_modules/buffer-equal/test/eq.js +++ /dev/null @@ -1,35 +0,0 @@ -var bufferEqual = require('../'); -var test = require('tap').test; - -test('equal', function (t) { - var eq = bufferEqual( - new Buffer([253,254,255]), - new Buffer([253,254,255]) - ); - t.strictEqual(eq, true); - t.end(); -}); - -test('not equal', function (t) { - var eq = bufferEqual( - new Buffer('abc'), - new Buffer('abcd') - ); - t.strictEqual(eq, false); - t.end(); -}); - -test('not equal not buffer', function (t) { - var eq = bufferEqual( - new Buffer('abc'), - 'abc' - ); - t.strictEqual(eq, undefined); - t.end(); -}); - -test('equal not buffer', function (t) { - var eq = bufferEqual('abc', 'abc'); - t.strictEqual(eq, undefined); - t.end(); -}); diff --git a/node_modules/cache-directory/CHANGELOG.md b/node_modules/cache-directory/CHANGELOG.md deleted file mode 100644 index 1074ca36..00000000 --- a/node_modules/cache-directory/CHANGELOG.md +++ /dev/null @@ -1,25 +0,0 @@ -# `cache-directory` changelog - -`cache-directory` follows [Semantic Versioning][1]. - -## 2.0.0 - 2018-03-01 - -### Changed - -* `os.homedir()` is used directly instead of a ponyfill - -### Breaking - -* Node 4 is now required - -## 1.1.0 - 2016-07-23 - -* Added Windows support - -## 1.0.0 - 2016-07-22 - -### Added - -* Initial release - - [1]: http://semver.org/ diff --git a/node_modules/cache-directory/COPYING b/node_modules/cache-directory/COPYING deleted file mode 100644 index 94a9ed02..00000000 --- a/node_modules/cache-directory/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/node_modules/cache-directory/COPYING.LESSER b/node_modules/cache-directory/COPYING.LESSER deleted file mode 100644 index 65c5ca88..00000000 --- a/node_modules/cache-directory/COPYING.LESSER +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/node_modules/cache-directory/README.md b/node_modules/cache-directory/README.md deleted file mode 100644 index e45b91ee..00000000 --- a/node_modules/cache-directory/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# `cache-directory` - -Find the proper cache directory based on operating system - -## Installation - - npm install cache-directory - -## Usage - -`cache-directory` takes one argument, the app name. - -```js -var cacheDir = require('cache-directory'); - -console.log(cacheDir('myApp')); -``` - -## Caveats - -When run on OS X, `cache-directory` assumes it isn't run in a sandboxed process environment. If it is, it will probably break. Additionally, the app name is used instead of the [conventional][1] bundle identifier (for simplicity and because many `cache-directory` consumers won't necessarily _have_ a bundle identifier). - -If a suitable cache directory can't be found, `cache-directory` will return `null`. You need to handle this case. A reasonable course of action would be to use a temp directory, for which you can use the [`cache-or-tmp-directory`][2] module. - -## License - -LGPL 3.0+ - -## Author - -Alex Jordan <alex@strugee.net> - - [1]: https://developer.apple.com/library/prerelease/content/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html#//apple_ref/doc/uid/TP40010672-CH10-SW1 - [2]: https://npmjs.com/package/cache-or-tmp-directory diff --git a/node_modules/cache-directory/index.js b/node_modules/cache-directory/index.js deleted file mode 100644 index 7eb06826..00000000 --- a/node_modules/cache-directory/index.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -'use strict'; - -var xdg = require('xdg-basedir'); -var home = require('os').homedir(); -var path = require('path'); - -function cacheDir(appName) { - switch (process.platform) { - case 'win32': - return process.env.APPDATA ? path.join(process.env.APPDATA, appName, 'Caches') : null; - case 'darwin': - return home ? path.join(home, 'Library/Caches', appName) : null; - case 'linux': - return xdg.cache ? path.join(xdg.cache, appName) : null; - } - - return null; -} - -module.exports = cacheDir; diff --git a/node_modules/cache-directory/package.json b/node_modules/cache-directory/package.json deleted file mode 100644 index c7113d96..00000000 --- a/node_modules/cache-directory/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "cache-directory@~2.0", - "_id": "cache-directory@2.0.0", - "_inBundle": false, - "_integrity": "sha512-7YKEapH+2Uikde8hySyfobXBqPKULDyHNl/lhKm7cKf/GJFdG/tU/WpLrOg2y9aUrQrWUilYqawFIiGJPS6gDA==", - "_location": "/cache-directory", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "cache-directory@~2.0", - "name": "cache-directory", - "escapedName": "cache-directory", - "rawSpec": "~2.0", - "saveSpec": null, - "fetchSpec": "~2.0" - }, - "_requiredBy": [ - "/@antora/content-aggregator", - "/@antora/ui-loader" - ], - "_resolved": "https://registry.npmjs.org/cache-directory/-/cache-directory-2.0.0.tgz", - "_shasum": "0d8efa1abbb6d1dd926d255ce733b4f7c5ab2892", - "_spec": "cache-directory@~2.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/content-aggregator", - "author": { - "name": "Alex Jordan", - "email": "alex@strugee.net" - }, - "bugs": { - "url": "https://github.com/strugee/node-cache-directory/issues" - }, - "bundleDependencies": false, - "dependencies": { - "xdg-basedir": "^3.0.0" - }, - "deprecated": false, - "description": "Find the proper cache directory based on operating system", - "engines": { - "node": ">=4" - }, - "homepage": "https://github.com/strugee/node-cache-directory#readme", - "keywords": [ - "cache", - "xdg", - "directory" - ], - "license": "LGPL-3.0+", - "main": "index.js", - "name": "cache-directory", - "repository": { - "type": "git", - "url": "git+https://github.com/strugee/node-cache-directory.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "2.0.0" -} diff --git a/node_modules/call-bind/.eslintignore b/node_modules/call-bind/.eslintignore deleted file mode 100644 index 404abb22..00000000 --- a/node_modules/call-bind/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -coverage/ diff --git a/node_modules/call-bind/.eslintrc b/node_modules/call-bind/.eslintrc deleted file mode 100644 index e5d3c9a9..00000000 --- a/node_modules/call-bind/.eslintrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "func-name-matching": 0, - "id-length": 0, - "new-cap": [2, { - "capIsNewExceptions": [ - "GetIntrinsic", - ], - }], - "no-magic-numbers": 0, - "operator-linebreak": [2, "before"], - }, -} diff --git a/node_modules/call-bind/.github/FUNDING.yml b/node_modules/call-bind/.github/FUNDING.yml deleted file mode 100644 index c70c2ecd..00000000 --- a/node_modules/call-bind/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/call-bind -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/call-bind/.nycrc b/node_modules/call-bind/.nycrc deleted file mode 100644 index 1826526e..00000000 --- a/node_modules/call-bind/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/call-bind/CHANGELOG.md b/node_modules/call-bind/CHANGELOG.md deleted file mode 100644 index 62a37279..00000000 --- a/node_modules/call-bind/CHANGELOG.md +++ /dev/null @@ -1,42 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.0.2](https://github.com/ljharb/call-bind/compare/v1.0.1...v1.0.2) - 2021-01-11 - -### Commits - -- [Fix] properly include the receiver in the bound length [`dbae7bc`](https://github.com/ljharb/call-bind/commit/dbae7bc676c079a0d33c0a43e9ef92cb7b01345d) - -## [v1.0.1](https://github.com/ljharb/call-bind/compare/v1.0.0...v1.0.1) - 2021-01-08 - -### Commits - -- [Tests] migrate tests to Github Actions [`b6db284`](https://github.com/ljharb/call-bind/commit/b6db284c36f8ccd195b88a6764fe84b7223a0da1) -- [meta] do not publish github action workflow files [`ec7fe46`](https://github.com/ljharb/call-bind/commit/ec7fe46e60cfa4764ee943d2755f5e5a366e578e) -- [Fix] preserve original function’s length when possible [`adbceaa`](https://github.com/ljharb/call-bind/commit/adbceaa3cac4b41ea78bb19d7ccdbaaf7e0bdadb) -- [Tests] gather coverage data on every job [`d69e23c`](https://github.com/ljharb/call-bind/commit/d69e23cc65f101ba1d4c19bb07fa8eb0ec624be8) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`2fd3586`](https://github.com/ljharb/call-bind/commit/2fd3586c5d47b335364c14293114c6b625ae1f71) -- [Deps] update `get-intrinsic` [`f23e931`](https://github.com/ljharb/call-bind/commit/f23e9318cc271c2add8bb38cfded85ee7baf8eee) -- [Deps] update `get-intrinsic` [`72d9f44`](https://github.com/ljharb/call-bind/commit/72d9f44e184465ba8dd3fb48260bbcff234985f2) -- [meta] fix FUNDING.yml [`e723573`](https://github.com/ljharb/call-bind/commit/e723573438c5a68dcec31fb5d96ea6b7e4a93be8) -- [eslint] ignore coverage output [`15e76d2`](https://github.com/ljharb/call-bind/commit/15e76d28a5f43e504696401e5b31ebb78ee1b532) -- [meta] add Automatic Rebase and Require Allow Edits workflows [`8fa4dab`](https://github.com/ljharb/call-bind/commit/8fa4dabb23ba3dd7bb92c9571c1241c08b56e4b6) - -## v1.0.0 - 2020-10-30 - -### Commits - -- Initial commit [`306cf98`](https://github.com/ljharb/call-bind/commit/306cf98c7ec9e7ef66b653ec152277ac1381eb50) -- Tests [`e10d0bb`](https://github.com/ljharb/call-bind/commit/e10d0bbdadc7a10ecedc9a1c035112d3e368b8df) -- Implementation [`43852ed`](https://github.com/ljharb/call-bind/commit/43852eda0f187327b7fad2423ca972149a52bd65) -- npm init [`408f860`](https://github.com/ljharb/call-bind/commit/408f860b773a2f610805fd3613d0d71bac1b6249) -- [meta] add Automatic Rebase and Require Allow Edits workflows [`fb349b2`](https://github.com/ljharb/call-bind/commit/fb349b2e48defbec8b5ec8a8395cc8f69f220b13) -- [meta] add `auto-changelog` [`c4001fc`](https://github.com/ljharb/call-bind/commit/c4001fc43031799ef908211c98d3b0fb2b60fde4) -- [meta] add "funding"; create `FUNDING.yml` [`d4d6d29`](https://github.com/ljharb/call-bind/commit/d4d6d2974a14bc2e98830468eda7fe6d6a776717) -- [Tests] add `npm run lint` [`dedfb98`](https://github.com/ljharb/call-bind/commit/dedfb98bd0ecefb08ddb9a94061bd10cde4332af) -- Only apps should have lockfiles [`54ac776`](https://github.com/ljharb/call-bind/commit/54ac77653db45a7361dc153d2f478e743f110650) -- [meta] add `safe-publish-latest` [`9ea8e43`](https://github.com/ljharb/call-bind/commit/9ea8e435b950ce9b705559cd651039f9bf40140f) diff --git a/node_modules/call-bind/LICENSE b/node_modules/call-bind/LICENSE deleted file mode 100644 index 48f05d01..00000000 --- a/node_modules/call-bind/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/call-bind/README.md b/node_modules/call-bind/README.md deleted file mode 100644 index 53649eb4..00000000 --- a/node_modules/call-bind/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# call-bind -Robustly `.call.bind()` a function. diff --git a/node_modules/call-bind/callBound.js b/node_modules/call-bind/callBound.js deleted file mode 100644 index 8374adfd..00000000 --- a/node_modules/call-bind/callBound.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('get-intrinsic'); - -var callBind = require('./'); - -var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); - -module.exports = function callBoundIntrinsic(name, allowMissing) { - var intrinsic = GetIntrinsic(name, !!allowMissing); - if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { - return callBind(intrinsic); - } - return intrinsic; -}; diff --git a/node_modules/call-bind/index.js b/node_modules/call-bind/index.js deleted file mode 100644 index 6fa3e4af..00000000 --- a/node_modules/call-bind/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); -var GetIntrinsic = require('get-intrinsic'); - -var $apply = GetIntrinsic('%Function.prototype.apply%'); -var $call = GetIntrinsic('%Function.prototype.call%'); -var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); - -var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); -var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); -var $max = GetIntrinsic('%Math.max%'); - -if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - } catch (e) { - // IE 8 has a broken defineProperty - $defineProperty = null; - } -} - -module.exports = function callBind(originalFunction) { - var func = $reflectApply(bind, $call, arguments); - if ($gOPD && $defineProperty) { - var desc = $gOPD(func, 'length'); - if (desc.configurable) { - // original length, plus the receiver, minus any additional arguments (after the receiver) - $defineProperty( - func, - 'length', - { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } - ); - } - } - return func; -}; - -var applyBind = function applyBind() { - return $reflectApply(bind, $apply, arguments); -}; - -if ($defineProperty) { - $defineProperty(module.exports, 'apply', { value: applyBind }); -} else { - module.exports.apply = applyBind; -} diff --git a/node_modules/call-bind/package.json b/node_modules/call-bind/package.json deleted file mode 100644 index d345c9c6..00000000 --- a/node_modules/call-bind/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_from": "call-bind@^1.0.0", - "_id": "call-bind@1.0.2", - "_inBundle": false, - "_integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "_location": "/call-bind", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "call-bind@^1.0.0", - "name": "call-bind", - "escapedName": "call-bind", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/object.assign" - ], - "_resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "_shasum": "b1d4e89e688119c3c9a903ad30abb2f6a919be3c", - "_spec": "call-bind@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/object.assign", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "bugs": { - "url": "https://github.com/ljharb/call-bind/issues" - }, - "bundleDependencies": false, - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "deprecated": false, - "description": "Robustly `.call.bind()` a function", - "devDependencies": { - "@ljharb/eslint-config": "^17.3.0", - "aud": "^1.1.3", - "auto-changelog": "^2.2.1", - "eslint": "^7.17.0", - "nyc": "^10.3.2", - "safe-publish-latest": "^1.1.4", - "tape": "^5.1.1" - }, - "exports": { - ".": [ - { - "default": "./index.js" - }, - "./index.js" - ], - "./callBound": [ - { - "default": "./callBound.js" - }, - "./callBound.js" - ], - "./package.json": "./package.json" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "homepage": "https://github.com/ljharb/call-bind#readme", - "keywords": [ - "javascript", - "ecmascript", - "es", - "js", - "callbind", - "callbound", - "call", - "bind", - "bound", - "call-bind", - "call-bound", - "function", - "es-abstract" - ], - "license": "MIT", - "main": "index.js", - "name": "call-bind", - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/call-bind.git" - }, - "scripts": { - "lint": "eslint --ext=.js,.mjs .", - "posttest": "aud --production", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", - "prepublish": "safe-publish-latest", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "nyc tape 'test/*'", - "version": "auto-changelog && git add CHANGELOG.md" - }, - "version": "1.0.2" -} diff --git a/node_modules/call-bind/test/callBound.js b/node_modules/call-bind/test/callBound.js deleted file mode 100644 index 209ce3cc..00000000 --- a/node_modules/call-bind/test/callBound.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var callBound = require('../callBound'); - -test('callBound', function (t) { - // static primitive - t.equal(callBound('Array.length'), Array.length, 'Array.length yields itself'); - t.equal(callBound('%Array.length%'), Array.length, '%Array.length% yields itself'); - - // static non-function object - t.equal(callBound('Array.prototype'), Array.prototype, 'Array.prototype yields itself'); - t.equal(callBound('%Array.prototype%'), Array.prototype, '%Array.prototype% yields itself'); - t.equal(callBound('Array.constructor'), Array.constructor, 'Array.constructor yields itself'); - t.equal(callBound('%Array.constructor%'), Array.constructor, '%Array.constructor% yields itself'); - - // static function - t.equal(callBound('Date.parse'), Date.parse, 'Date.parse yields itself'); - t.equal(callBound('%Date.parse%'), Date.parse, '%Date.parse% yields itself'); - - // prototype primitive - t.equal(callBound('Error.prototype.message'), Error.prototype.message, 'Error.prototype.message yields itself'); - t.equal(callBound('%Error.prototype.message%'), Error.prototype.message, '%Error.prototype.message% yields itself'); - - // prototype function - t.notEqual(callBound('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString does not yield itself'); - t.notEqual(callBound('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% does not yield itself'); - t.equal(callBound('Object.prototype.toString')(true), Object.prototype.toString.call(true), 'call-bound Object.prototype.toString calls into the original'); - t.equal(callBound('%Object.prototype.toString%')(true), Object.prototype.toString.call(true), 'call-bound %Object.prototype.toString% calls into the original'); - - t['throws']( - function () { callBound('does not exist'); }, - SyntaxError, - 'nonexistent intrinsic throws' - ); - t['throws']( - function () { callBound('does not exist', true); }, - SyntaxError, - 'allowMissing arg still throws for unknown intrinsic' - ); - - /* globals WeakRef: false */ - t.test('real but absent intrinsic', { skip: typeof WeakRef !== 'undefined' }, function (st) { - st['throws']( - function () { callBound('WeakRef'); }, - TypeError, - 'real but absent intrinsic throws' - ); - st.equal(callBound('WeakRef', true), undefined, 'allowMissing arg avoids exception'); - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/call-bind/test/index.js b/node_modules/call-bind/test/index.js deleted file mode 100644 index bf6769c7..00000000 --- a/node_modules/call-bind/test/index.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -var callBind = require('../'); -var bind = require('function-bind'); - -var test = require('tape'); - -/* - * older engines have length nonconfigurable - * in io.js v3, it is configurable except on bound functions, hence the .bind() - */ -var functionsHaveConfigurableLengths = !!( - Object.getOwnPropertyDescriptor - && Object.getOwnPropertyDescriptor(bind.call(function () {}), 'length').configurable -); - -test('callBind', function (t) { - var sentinel = { sentinel: true }; - var func = function (a, b) { - // eslint-disable-next-line no-invalid-this - return [this, a, b]; - }; - t.equal(func.length, 2, 'original function length is 2'); - t.deepEqual(func(), [undefined, undefined, undefined], 'unbound func with too few args'); - t.deepEqual(func(1, 2), [undefined, 1, 2], 'unbound func with right args'); - t.deepEqual(func(1, 2, 3), [undefined, 1, 2], 'unbound func with too many args'); - - var bound = callBind(func); - t.equal(bound.length, func.length + 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths }); - t.deepEqual(bound(), [undefined, undefined, undefined], 'bound func with too few args'); - t.deepEqual(bound(1, 2), [1, 2, undefined], 'bound func with right args'); - t.deepEqual(bound(1, 2, 3), [1, 2, 3], 'bound func with too many args'); - - var boundR = callBind(func, sentinel); - t.equal(boundR.length, func.length, 'function length is preserved', { skip: !functionsHaveConfigurableLengths }); - t.deepEqual(boundR(), [sentinel, undefined, undefined], 'bound func with receiver, with too few args'); - t.deepEqual(boundR(1, 2), [sentinel, 1, 2], 'bound func with receiver, with right args'); - t.deepEqual(boundR(1, 2, 3), [sentinel, 1, 2], 'bound func with receiver, with too many args'); - - var boundArg = callBind(func, sentinel, 1); - t.equal(boundArg.length, func.length - 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths }); - t.deepEqual(boundArg(), [sentinel, 1, undefined], 'bound func with receiver and arg, with too few args'); - t.deepEqual(boundArg(2), [sentinel, 1, 2], 'bound func with receiver and arg, with right arg'); - t.deepEqual(boundArg(2, 3), [sentinel, 1, 2], 'bound func with receiver and arg, with too many args'); - - t.test('callBind.apply', function (st) { - var aBound = callBind.apply(func); - st.deepEqual(aBound(sentinel), [sentinel, undefined, undefined], 'apply-bound func with no args'); - st.deepEqual(aBound(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args'); - st.deepEqual(aBound(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args'); - - var aBoundArg = callBind.apply(func); - st.deepEqual(aBoundArg(sentinel, [1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with too many args'); - st.deepEqual(aBoundArg(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args'); - st.deepEqual(aBoundArg(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args'); - - var aBoundR = callBind.apply(func, sentinel); - st.deepEqual(aBoundR([1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with receiver and too many args'); - st.deepEqual(aBoundR([1, 2], 4), [sentinel, 1, 2], 'apply-bound func with receiver and right args'); - st.deepEqual(aBoundR([1], 4), [sentinel, 1, undefined], 'apply-bound func with receiver and too few args'); - - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/camelcase-keys/index.d.ts b/node_modules/camelcase-keys/index.d.ts deleted file mode 100644 index 8a196b25..00000000 --- a/node_modules/camelcase-keys/index.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -declare namespace camelcaseKeys { - interface Options { - /** - Recurse nested objects and objects in arrays. - - @default false - */ - readonly deep?: boolean; - - /** - Exclude keys from being camel-cased. - - @default [] - */ - readonly exclude?: ReadonlyArray<string | RegExp>; - - /** - Exclude children at the given object paths in dot-notation from being camel-cased. For example, with an object like `{a: {b: '🦄'}}`, the object path to reach the unicorn is `'a.b'`. - - @default [] - - @example - ``` - camelcaseKeys({ - a_b: 1, - a_c: { - c_d: 1, - c_e: { - e_f: 1 - } - } - }, { - deep: true, - stopPaths: [ - 'a_c.c_e' - ] - }), - // { - // aB: 1, - // aC: { - // cD: 1, - // cE: { - // e_f: 1 - // } - // } - // } - ``` - */ - readonly stopPaths?: ReadonlyArray<string>; - - /** - Uppercase the first character as in `bye-bye` → `ByeBye`. - - @default false - */ - readonly pascalCase?: boolean; - } -} - -/** -Convert object keys to camel case using [`camelcase`](https://github.com/sindresorhus/camelcase). - -@param input - Object or array of objects to camel-case. - -@example -``` -import camelcaseKeys = require('camelcase-keys'); - -// Convert an object -camelcaseKeys({'foo-bar': true}); -//=> {fooBar: true} - -// Convert an array of objects -camelcaseKeys([{'foo-bar': true}, {'bar-foo': false}]); -//=> [{fooBar: true}, {barFoo: false}] - -camelcaseKeys({'foo-bar': true, nested: {unicorn_rainbow: true}}, {deep: true}); -//=> {fooBar: true, nested: {unicornRainbow: true}} - -// Convert object keys to pascal case -camelcaseKeys({'foo-bar': true, nested: {unicorn_rainbow: true}}, {deep: true, pascalCase: true}); -//=> {FooBar: true, Nested: {UnicornRainbow: true}} - -import minimist = require('minimist'); - -const argv = minimist(process.argv.slice(2)); -//=> {_: [], 'foo-bar': true} - -camelcaseKeys(argv); -//=> {_: [], fooBar: true} -``` -*/ -declare function camelcaseKeys<T extends ReadonlyArray<{[key: string]: any}>>( - input: T, - options?: camelcaseKeys.Options, -): T; - -declare function camelcaseKeys<T extends {[key: string]: any}>( - input: T, - options?: camelcaseKeys.Options, -): T; - -export = camelcaseKeys; diff --git a/node_modules/camelcase-keys/index.js b/node_modules/camelcase-keys/index.js deleted file mode 100644 index d6349c5b..00000000 --- a/node_modules/camelcase-keys/index.js +++ /dev/null @@ -1,77 +0,0 @@ -'use strict'; -const mapObj = require('map-obj'); -const camelCase = require('camelcase'); -const QuickLru = require('quick-lru'); - -const has = (array, key) => array.some(x => { - if (typeof x === 'string') { - return x === key; - } - - x.lastIndex = 0; - return x.test(key); -}); - -const cache = new QuickLru({maxSize: 100000}); - -// Reproduces behavior from `map-obj` -const isObject = value => - typeof value === 'object' && - value !== null && - !(value instanceof RegExp) && - !(value instanceof Error) && - !(value instanceof Date); - -const camelCaseConvert = (input, options) => { - if (!isObject(input)) { - return input; - } - - options = { - deep: false, - pascalCase: false, - ...options - }; - - const {exclude, pascalCase, stopPaths, deep} = options; - - const stopPathsSet = new Set(stopPaths); - - const makeMapper = parentPath => (key, value) => { - if (deep && isObject(value)) { - const path = parentPath === undefined ? key : `${parentPath}.${key}`; - - if (!stopPathsSet.has(path)) { - value = mapObj(value, makeMapper(path)); - } - } - - if (!(exclude && has(exclude, key))) { - const cacheKey = pascalCase ? `${key}_` : key; - - if (cache.has(cacheKey)) { - key = cache.get(cacheKey); - } else { - const ret = camelCase(key, {pascalCase}); - - if (key.length < 100) { // Prevent abuse - cache.set(cacheKey, ret); - } - - key = ret; - } - } - - return [key, value]; - }; - - return mapObj(input, makeMapper(undefined)); -}; - -module.exports = (input, options) => { - if (Array.isArray(input)) { - return Object.keys(input).map(key => camelCaseConvert(input[key], options)); - } - - return camelCaseConvert(input, options); -}; diff --git a/node_modules/camelcase-keys/license b/node_modules/camelcase-keys/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/camelcase-keys/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/camelcase-keys/node_modules/camelcase/index.d.ts b/node_modules/camelcase-keys/node_modules/camelcase/index.d.ts deleted file mode 100644 index 58f2069a..00000000 --- a/node_modules/camelcase-keys/node_modules/camelcase/index.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -declare namespace camelcase { - interface Options { - /** - Uppercase the first character: `foo-bar` → `FooBar`. - - @default false - */ - readonly pascalCase?: boolean; - } -} - -declare const camelcase: { - /** - Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`. - - @param input - String to convert to camel case. - - @example - ``` - import camelCase = require('camelcase'); - - camelCase('foo-bar'); - //=> 'fooBar' - - camelCase('foo_bar'); - //=> 'fooBar' - - camelCase('Foo-Bar'); - //=> 'fooBar' - - camelCase('Foo-Bar', {pascalCase: true}); - //=> 'FooBar' - - camelCase('--foo.bar', {pascalCase: false}); - //=> 'fooBar' - - camelCase('foo bar'); - //=> 'fooBar' - - console.log(process.argv[3]); - //=> '--foo-bar' - camelCase(process.argv[3]); - //=> 'fooBar' - - camelCase(['foo', 'bar']); - //=> 'fooBar' - - camelCase(['__foo__', '--bar'], {pascalCase: true}); - //=> 'FooBar' - ``` - */ - (input: string | ReadonlyArray<string>, options?: camelcase.Options): string; - - // TODO: Remove this for the next major release, refactor the whole definition to: - // declare function camelcase( - // input: string | ReadonlyArray<string>, - // options?: camelcase.Options - // ): string; - // export = camelcase; - default: typeof camelcase; -}; - -export = camelcase; diff --git a/node_modules/camelcase-keys/node_modules/camelcase/index.js b/node_modules/camelcase-keys/node_modules/camelcase/index.js deleted file mode 100644 index 579f99b4..00000000 --- a/node_modules/camelcase-keys/node_modules/camelcase/index.js +++ /dev/null @@ -1,76 +0,0 @@ -'use strict'; - -const preserveCamelCase = string => { - let isLastCharLower = false; - let isLastCharUpper = false; - let isLastLastCharUpper = false; - - for (let i = 0; i < string.length; i++) { - const character = string[i]; - - if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) { - string = string.slice(0, i) + '-' + string.slice(i); - isLastCharLower = false; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = true; - i++; - } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) { - string = string.slice(0, i - 1) + '-' + string.slice(i - 1); - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = false; - isLastCharLower = true; - } else { - isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character; - } - } - - return string; -}; - -const camelCase = (input, options) => { - if (!(typeof input === 'string' || Array.isArray(input))) { - throw new TypeError('Expected the input to be `string | string[]`'); - } - - options = Object.assign({ - pascalCase: false - }, options); - - const postProcess = x => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x; - - if (Array.isArray(input)) { - input = input.map(x => x.trim()) - .filter(x => x.length) - .join('-'); - } else { - input = input.trim(); - } - - if (input.length === 0) { - return ''; - } - - if (input.length === 1) { - return options.pascalCase ? input.toUpperCase() : input.toLowerCase(); - } - - const hasUpperCase = input !== input.toLowerCase(); - - if (hasUpperCase) { - input = preserveCamelCase(input); - } - - input = input - .replace(/^[_.\- ]+/, '') - .toLowerCase() - .replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()) - .replace(/\d+(\w|$)/g, m => m.toUpperCase()); - - return postProcess(input); -}; - -module.exports = camelCase; -// TODO: Remove this for the next major release -module.exports.default = camelCase; diff --git a/node_modules/camelcase-keys/node_modules/camelcase/license b/node_modules/camelcase-keys/node_modules/camelcase/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/camelcase-keys/node_modules/camelcase/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/camelcase-keys/node_modules/camelcase/package.json b/node_modules/camelcase-keys/node_modules/camelcase/package.json deleted file mode 100644 index 04bb9179..00000000 --- a/node_modules/camelcase-keys/node_modules/camelcase/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_from": "camelcase@^5.3.1", - "_id": "camelcase@5.3.1", - "_inBundle": false, - "_integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "_location": "/camelcase-keys/camelcase", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "camelcase@^5.3.1", - "name": "camelcase", - "escapedName": "camelcase", - "rawSpec": "^5.3.1", - "saveSpec": null, - "fetchSpec": "^5.3.1" - }, - "_requiredBy": [ - "/camelcase-keys" - ], - "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "_shasum": "e3c9b31569e106811df242f715725a1f4c494320", - "_spec": "camelcase@^5.3.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/camelcase-keys", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/camelcase/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`", - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/sindresorhus/camelcase#readme", - "keywords": [ - "camelcase", - "camel-case", - "camel", - "case", - "dash", - "hyphen", - "dot", - "underscore", - "separator", - "string", - "text", - "convert", - "pascalcase", - "pascal-case" - ], - "license": "MIT", - "name": "camelcase", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/camelcase.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "5.3.1" -} diff --git a/node_modules/camelcase-keys/node_modules/camelcase/readme.md b/node_modules/camelcase-keys/node_modules/camelcase/readme.md deleted file mode 100644 index fde27261..00000000 --- a/node_modules/camelcase-keys/node_modules/camelcase/readme.md +++ /dev/null @@ -1,99 +0,0 @@ -# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) - -> Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar` - ---- - -<div align="center"> - <b> - <a href="https://tidelift.com/subscription/pkg/npm-camelcase?utm_source=npm-camelcase&utm_medium=referral&utm_campaign=readme">Get professional support for 'camelcase' with a Tidelift subscription</a> - </b> - <br> - <sub> - Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. - </sub> -</div> - ---- - -## Install - -``` -$ npm install camelcase -``` - - -## Usage - -```js -const camelCase = require('camelcase'); - -camelCase('foo-bar'); -//=> 'fooBar' - -camelCase('foo_bar'); -//=> 'fooBar' - -camelCase('Foo-Bar'); -//=> 'fooBar' - -camelCase('Foo-Bar', {pascalCase: true}); -//=> 'FooBar' - -camelCase('--foo.bar', {pascalCase: false}); -//=> 'fooBar' - -camelCase('foo bar'); -//=> 'fooBar' - -console.log(process.argv[3]); -//=> '--foo-bar' -camelCase(process.argv[3]); -//=> 'fooBar' - -camelCase(['foo', 'bar']); -//=> 'fooBar' - -camelCase(['__foo__', '--bar'], {pascalCase: true}); -//=> 'FooBar' -``` - - -## API - -### camelCase(input, [options]) - -#### input - -Type: `string` `string[]` - -String to convert to camel case. - -#### options - -Type: `Object` - -##### pascalCase - -Type: `boolean`<br> -Default: `false` - -Uppercase the first character: `foo-bar` → `FooBar` - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## Related - -- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module -- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase -- [titleize](https://github.com/sindresorhus/titleize) - Capitalize every word in string -- [humanize-string](https://github.com/sindresorhus/humanize-string) - Convert a camelized/dasherized/underscored string into a humanized one - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/camelcase-keys/package.json b/node_modules/camelcase-keys/package.json deleted file mode 100644 index 6f5a76e8..00000000 --- a/node_modules/camelcase-keys/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "_from": "camelcase-keys@~6.2", - "_id": "camelcase-keys@6.2.2", - "_inBundle": false, - "_integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "_location": "/camelcase-keys", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "camelcase-keys@~6.2", - "name": "camelcase-keys", - "escapedName": "camelcase-keys", - "rawSpec": "~6.2", - "saveSpec": null, - "fetchSpec": "~6.2" - }, - "_requiredBy": [ - "/@antora/content-aggregator", - "/@antora/playbook-builder", - "/@antora/ui-loader" - ], - "_resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "_shasum": "5e755d6ba51aa223ec7d3d52f25778210f9dc3c0", - "_spec": "camelcase-keys@~6.2", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/playbook-builder", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/camelcase-keys/issues" - }, - "bundleDependencies": false, - "dependencies": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - }, - "deprecated": false, - "description": "Convert object keys to camel case", - "devDependencies": { - "ava": "^2.1.0", - "matcha": "^0.7.0", - "tsd": "^0.11.0", - "xo": "^0.25.3" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "funding": "https://github.com/sponsors/sindresorhus", - "homepage": "https://github.com/sindresorhus/camelcase-keys#readme", - "keywords": [ - "map", - "obj", - "object", - "key", - "keys", - "value", - "values", - "val", - "iterate", - "camelcase", - "camel-case", - "camel", - "case", - "dash", - "hyphen", - "dot", - "underscore", - "separator", - "string", - "text", - "convert", - "pascalcase", - "pascal-case", - "deep", - "recurse", - "recursive" - ], - "license": "MIT", - "name": "camelcase-keys", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/camelcase-keys.git" - }, - "scripts": { - "bench": "matcha bench/bench.js", - "test": "xo && ava && tsd" - }, - "version": "6.2.2", - "xo": { - "overrides": [ - { - "files": "bench/bench.js", - "rules": { - "import/no-unresolved": "off" - } - } - ] - } -} diff --git a/node_modules/camelcase-keys/readme.md b/node_modules/camelcase-keys/readme.md deleted file mode 100644 index f0ac0f17..00000000 --- a/node_modules/camelcase-keys/readme.md +++ /dev/null @@ -1,125 +0,0 @@ -# camelcase-keys [![Build Status](https://travis-ci.org/sindresorhus/camelcase-keys.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase-keys) - -> Convert object keys to camel case using [`camelcase`](https://github.com/sindresorhus/camelcase) - -## Install - -``` -$ npm install camelcase-keys -``` - -## Usage - -```js -const camelcaseKeys = require('camelcase-keys'); - -// Convert an object -camelcaseKeys({'foo-bar': true}); -//=> {fooBar: true} - -// Convert an array of objects -camelcaseKeys([{'foo-bar': true}, {'bar-foo': false}]); -//=> [{fooBar: true}, {barFoo: false}] - -camelcaseKeys({'foo-bar': true, nested: {unicorn_rainbow: true}}, {deep: true}); -//=> {fooBar: true, nested: {unicornRainbow: true}} - -camelcaseKeys({a_b: 1, a_c: {c_d: 1, c_e: {e_f: 1}}}, {deep: true, stopPaths: ['a_c.c_e']}), -//=> {aB: 1, aC: {cD: 1, cE: {e_f: 1}}} - -// Convert object keys to pascal case -camelcaseKeys({'foo-bar': true, nested: {unicorn_rainbow: true}}, {deep: true, pascalCase: true}); -//=> {FooBar: true, Nested: {UnicornRainbow: true}} -``` - -```js -const camelcaseKeys = require('camelcase-keys'); - -const argv = require('minimist')(process.argv.slice(2)); -//=> {_: [], 'foo-bar': true} - -camelcaseKeys(argv); -//=> {_: [], fooBar: true} -``` - -## API - -### camelcaseKeys(input, options?) - -#### input - -Type: `object | object[]` - -An object or array of objects to camel-case. - -#### options - -Type: `object` - -##### exclude - -Type: `Array<string | RegExp>`\ -Default: `[]` - -Exclude keys from being camel-cased. - -##### stopPaths - -Type: `string[]`\ -Default: `[]` - -Exclude children at the given object paths in dot-notation from being camel-cased. For example, with an object like `{a: {b: '🦄'}}`, the object path to reach the unicorn is `'a.b'`. - -```js -camelcaseKeys({ - a_b: 1, - a_c: { - c_d: 1, - c_e: { - e_f: 1 - } - } -}, { - deep: true, - stopPaths: [ - 'a_c.c_e' - ] -}), -/* -{ - aB: 1, - aC: { - cD: 1, - cE: { - e_f: 1 - } - } -} -*/ -``` - -##### deep - -Type: `boolean`\ -Default: `false` - -Recurse nested objects and objects in arrays. - -##### pascalCase - -Type: `boolean`\ -Default: `false` - -Uppercase the first character as in `bye-bye` → `ByeBye`. - -## camelcase-keys for enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of camelcase-keys and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-camelcase-keys?utm_source=npm-camelcase-keys&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - -## Related - -- [snakecase-keys](https://github.com/bendrucker/snakecase-keys) -- [kebabcase-keys](https://github.com/mattiloh/kebabcase-keys) - diff --git a/node_modules/camelcase/index.js b/node_modules/camelcase/index.js deleted file mode 100644 index ca3e7e7c..00000000 --- a/node_modules/camelcase/index.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict'; - -const preserveCamelCase = input => { - let isLastCharLower = false; - let isLastCharUpper = false; - let isLastLastCharUpper = false; - - for (let i = 0; i < input.length; i++) { - const c = input[i]; - - if (isLastCharLower && /[a-zA-Z]/.test(c) && c.toUpperCase() === c) { - input = input.slice(0, i) + '-' + input.slice(i); - isLastCharLower = false; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = true; - i++; - } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(c) && c.toLowerCase() === c) { - input = input.slice(0, i - 1) + '-' + input.slice(i - 1); - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = false; - isLastCharLower = true; - } else { - isLastCharLower = c.toLowerCase() === c; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = c.toUpperCase() === c; - } - } - - return input; -}; - -module.exports = (input, options) => { - options = Object.assign({ - pascalCase: false - }, options); - - const postProcess = x => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x; - - if (Array.isArray(input)) { - input = input.map(x => x.trim()) - .filter(x => x.length) - .join('-'); - } else { - input = input.trim(); - } - - if (input.length === 0) { - return ''; - } - - if (input.length === 1) { - return options.pascalCase ? input.toUpperCase() : input.toLowerCase(); - } - - if (/^[a-z\d]+$/.test(input)) { - return postProcess(input); - } - - const hasUpperCase = input !== input.toLowerCase(); - - if (hasUpperCase) { - input = preserveCamelCase(input); - } - - input = input - .replace(/^[_.\- ]+/, '') - .toLowerCase() - .replace(/[_.\- ]+(\w|$)/g, (m, p1) => p1.toUpperCase()); - - return postProcess(input); -}; diff --git a/node_modules/camelcase/license b/node_modules/camelcase/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/camelcase/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/camelcase/package.json b/node_modules/camelcase/package.json deleted file mode 100644 index f0b83105..00000000 --- a/node_modules/camelcase/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "camelcase@5.0.0", - "_id": "camelcase@5.0.0", - "_inBundle": false, - "_integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", - "_location": "/camelcase", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "camelcase@5.0.0", - "name": "camelcase", - "escapedName": "camelcase", - "rawSpec": "5.0.0", - "saveSpec": null, - "fetchSpec": "5.0.0" - }, - "_requiredBy": [ - "/args", - "/yargs-parser" - ], - "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", - "_shasum": "03295527d58bd3cd4aa75363f35b2e8d97be2f42", - "_spec": "camelcase@5.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/args", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/camelcase/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/camelcase#readme", - "keywords": [ - "camelcase", - "camel-case", - "camel", - "case", - "dash", - "hyphen", - "dot", - "underscore", - "separator", - "string", - "text", - "convert", - "pascalcase", - "pascal-case" - ], - "license": "MIT", - "name": "camelcase", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/camelcase.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "5.0.0" -} diff --git a/node_modules/camelcase/readme.md b/node_modules/camelcase/readme.md deleted file mode 100644 index 3bf712c1..00000000 --- a/node_modules/camelcase/readme.md +++ /dev/null @@ -1,81 +0,0 @@ -# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) - -> Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar` - - -## Install - -``` -$ npm install camelcase -``` - - -## Usage - -```js -const camelCase = require('camelcase'); - -camelCase('foo-bar'); -//=> 'fooBar' - -camelCase('foo_bar'); -//=> 'fooBar' - -camelCase('Foo-Bar'); -//=> 'fooBar' - -camelCase('Foo-Bar', {pascalCase: true}); -//=> 'FooBar' - -camelCase('--foo.bar', {pascalCase: false}); -//=> 'fooBar' - -camelCase('foo bar'); -//=> 'fooBar' - -console.log(process.argv[3]); -//=> '--foo-bar' -camelCase(process.argv[3]); -//=> 'fooBar' - -camelCase(['foo', 'bar']); -//=> 'fooBar' - -camelCase(['__foo__', '--bar'], {pascalCase: true}); -//=> 'FooBar' -``` - - -## API - -### camelCase(input, [options]) - -#### input - -Type: `string` `string[]` - -String to convert to camel case. - -#### options - -Type: `Object` - -##### pascalCase - -Type: `boolean`<br> -Default: `false` - -Uppercase the first character: `foo-bar` → `FooBar` - - -## Related - -- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module -- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase -- [titleize](https://github.com/sindresorhus/titleize) - Capitalize every word in string -- [humanize-string](https://github.com/sindresorhus/humanize-string) - Convert a camelized/dasherized/underscored string into a humanized one - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/chalk/index.d.ts b/node_modules/chalk/index.d.ts deleted file mode 100644 index 9cd88f38..00000000 --- a/node_modules/chalk/index.d.ts +++ /dev/null @@ -1,415 +0,0 @@ -/** -Basic foreground colors. - -[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) -*/ -declare type ForegroundColor = - | 'black' - | 'red' - | 'green' - | 'yellow' - | 'blue' - | 'magenta' - | 'cyan' - | 'white' - | 'gray' - | 'grey' - | 'blackBright' - | 'redBright' - | 'greenBright' - | 'yellowBright' - | 'blueBright' - | 'magentaBright' - | 'cyanBright' - | 'whiteBright'; - -/** -Basic background colors. - -[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) -*/ -declare type BackgroundColor = - | 'bgBlack' - | 'bgRed' - | 'bgGreen' - | 'bgYellow' - | 'bgBlue' - | 'bgMagenta' - | 'bgCyan' - | 'bgWhite' - | 'bgGray' - | 'bgGrey' - | 'bgBlackBright' - | 'bgRedBright' - | 'bgGreenBright' - | 'bgYellowBright' - | 'bgBlueBright' - | 'bgMagentaBright' - | 'bgCyanBright' - | 'bgWhiteBright'; - -/** -Basic colors. - -[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) -*/ -declare type Color = ForegroundColor | BackgroundColor; - -declare type Modifiers = - | 'reset' - | 'bold' - | 'dim' - | 'italic' - | 'underline' - | 'inverse' - | 'hidden' - | 'strikethrough' - | 'visible'; - -declare namespace chalk { - /** - Levels: - - `0` - All colors disabled. - - `1` - Basic 16 colors support. - - `2` - ANSI 256 colors support. - - `3` - Truecolor 16 million colors support. - */ - type Level = 0 | 1 | 2 | 3; - - interface Options { - /** - Specify the color support for Chalk. - - By default, color support is automatically detected based on the environment. - - Levels: - - `0` - All colors disabled. - - `1` - Basic 16 colors support. - - `2` - ANSI 256 colors support. - - `3` - Truecolor 16 million colors support. - */ - level?: Level; - } - - /** - Return a new Chalk instance. - */ - type Instance = new (options?: Options) => Chalk; - - /** - Detect whether the terminal supports color. - */ - interface ColorSupport { - /** - The color level used by Chalk. - */ - level: Level; - - /** - Return whether Chalk supports basic 16 colors. - */ - hasBasic: boolean; - - /** - Return whether Chalk supports ANSI 256 colors. - */ - has256: boolean; - - /** - Return whether Chalk supports Truecolor 16 million colors. - */ - has16m: boolean; - } - - interface ChalkFunction { - /** - Use a template string. - - @remarks Template literals are unsupported for nested calls (see [issue #341](https://github.com/chalk/chalk/issues/341)) - - @example - ``` - import chalk = require('chalk'); - - log(chalk` - CPU: {red ${cpu.totalPercent}%} - RAM: {green ${ram.used / ram.total * 100}%} - DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%} - `); - ``` - - @example - ``` - import chalk = require('chalk'); - - log(chalk.red.bgBlack`2 + 3 = {bold ${2 + 3}}`) - ``` - */ - (text: TemplateStringsArray, ...placeholders: unknown[]): string; - - (...text: unknown[]): string; - } - - interface Chalk extends ChalkFunction { - /** - Return a new Chalk instance. - */ - Instance: Instance; - - /** - The color support for Chalk. - - By default, color support is automatically detected based on the environment. - - Levels: - - `0` - All colors disabled. - - `1` - Basic 16 colors support. - - `2` - ANSI 256 colors support. - - `3` - Truecolor 16 million colors support. - */ - level: Level; - - /** - Use HEX value to set text color. - - @param color - Hexadecimal value representing the desired color. - - @example - ``` - import chalk = require('chalk'); - - chalk.hex('#DEADED'); - ``` - */ - hex(color: string): Chalk; - - /** - Use keyword color value to set text color. - - @param color - Keyword value representing the desired color. - - @example - ``` - import chalk = require('chalk'); - - chalk.keyword('orange'); - ``` - */ - keyword(color: string): Chalk; - - /** - Use RGB values to set text color. - */ - rgb(red: number, green: number, blue: number): Chalk; - - /** - Use HSL values to set text color. - */ - hsl(hue: number, saturation: number, lightness: number): Chalk; - - /** - Use HSV values to set text color. - */ - hsv(hue: number, saturation: number, value: number): Chalk; - - /** - Use HWB values to set text color. - */ - hwb(hue: number, whiteness: number, blackness: number): Chalk; - - /** - Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set text color. - - 30 <= code && code < 38 || 90 <= code && code < 98 - For example, 31 for red, 91 for redBright. - */ - ansi(code: number): Chalk; - - /** - Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color. - */ - ansi256(index: number): Chalk; - - /** - Use HEX value to set background color. - - @param color - Hexadecimal value representing the desired color. - - @example - ``` - import chalk = require('chalk'); - - chalk.bgHex('#DEADED'); - ``` - */ - bgHex(color: string): Chalk; - - /** - Use keyword color value to set background color. - - @param color - Keyword value representing the desired color. - - @example - ``` - import chalk = require('chalk'); - - chalk.bgKeyword('orange'); - ``` - */ - bgKeyword(color: string): Chalk; - - /** - Use RGB values to set background color. - */ - bgRgb(red: number, green: number, blue: number): Chalk; - - /** - Use HSL values to set background color. - */ - bgHsl(hue: number, saturation: number, lightness: number): Chalk; - - /** - Use HSV values to set background color. - */ - bgHsv(hue: number, saturation: number, value: number): Chalk; - - /** - Use HWB values to set background color. - */ - bgHwb(hue: number, whiteness: number, blackness: number): Chalk; - - /** - Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set background color. - - 30 <= code && code < 38 || 90 <= code && code < 98 - For example, 31 for red, 91 for redBright. - Use the foreground code, not the background code (for example, not 41, nor 101). - */ - bgAnsi(code: number): Chalk; - - /** - Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color. - */ - bgAnsi256(index: number): Chalk; - - /** - Modifier: Resets the current color chain. - */ - readonly reset: Chalk; - - /** - Modifier: Make text bold. - */ - readonly bold: Chalk; - - /** - Modifier: Emitting only a small amount of light. - */ - readonly dim: Chalk; - - /** - Modifier: Make text italic. (Not widely supported) - */ - readonly italic: Chalk; - - /** - Modifier: Make text underline. (Not widely supported) - */ - readonly underline: Chalk; - - /** - Modifier: Inverse background and foreground colors. - */ - readonly inverse: Chalk; - - /** - Modifier: Prints the text, but makes it invisible. - */ - readonly hidden: Chalk; - - /** - Modifier: Puts a horizontal line through the center of the text. (Not widely supported) - */ - readonly strikethrough: Chalk; - - /** - Modifier: Prints the text only when Chalk has a color support level > 0. - Can be useful for things that are purely cosmetic. - */ - readonly visible: Chalk; - - readonly black: Chalk; - readonly red: Chalk; - readonly green: Chalk; - readonly yellow: Chalk; - readonly blue: Chalk; - readonly magenta: Chalk; - readonly cyan: Chalk; - readonly white: Chalk; - - /* - Alias for `blackBright`. - */ - readonly gray: Chalk; - - /* - Alias for `blackBright`. - */ - readonly grey: Chalk; - - readonly blackBright: Chalk; - readonly redBright: Chalk; - readonly greenBright: Chalk; - readonly yellowBright: Chalk; - readonly blueBright: Chalk; - readonly magentaBright: Chalk; - readonly cyanBright: Chalk; - readonly whiteBright: Chalk; - - readonly bgBlack: Chalk; - readonly bgRed: Chalk; - readonly bgGreen: Chalk; - readonly bgYellow: Chalk; - readonly bgBlue: Chalk; - readonly bgMagenta: Chalk; - readonly bgCyan: Chalk; - readonly bgWhite: Chalk; - - /* - Alias for `bgBlackBright`. - */ - readonly bgGray: Chalk; - - /* - Alias for `bgBlackBright`. - */ - readonly bgGrey: Chalk; - - readonly bgBlackBright: Chalk; - readonly bgRedBright: Chalk; - readonly bgGreenBright: Chalk; - readonly bgYellowBright: Chalk; - readonly bgBlueBright: Chalk; - readonly bgMagentaBright: Chalk; - readonly bgCyanBright: Chalk; - readonly bgWhiteBright: Chalk; - } -} - -/** -Main Chalk object that allows to chain styles together. -Call the last one as a method with a string argument. -Order doesn't matter, and later styles take precedent in case of a conflict. -This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`. -*/ -declare const chalk: chalk.Chalk & chalk.ChalkFunction & { - supportsColor: chalk.ColorSupport | false; - Level: chalk.Level; - Color: Color; - ForegroundColor: ForegroundColor; - BackgroundColor: BackgroundColor; - Modifiers: Modifiers; - stderr: chalk.Chalk & {supportsColor: chalk.ColorSupport | false}; -}; - -export = chalk; diff --git a/node_modules/chalk/license b/node_modules/chalk/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/chalk/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/chalk/node_modules/ansi-styles/index.d.ts b/node_modules/chalk/node_modules/ansi-styles/index.d.ts deleted file mode 100644 index 44a907e5..00000000 --- a/node_modules/chalk/node_modules/ansi-styles/index.d.ts +++ /dev/null @@ -1,345 +0,0 @@ -declare type CSSColor = - | 'aliceblue' - | 'antiquewhite' - | 'aqua' - | 'aquamarine' - | 'azure' - | 'beige' - | 'bisque' - | 'black' - | 'blanchedalmond' - | 'blue' - | 'blueviolet' - | 'brown' - | 'burlywood' - | 'cadetblue' - | 'chartreuse' - | 'chocolate' - | 'coral' - | 'cornflowerblue' - | 'cornsilk' - | 'crimson' - | 'cyan' - | 'darkblue' - | 'darkcyan' - | 'darkgoldenrod' - | 'darkgray' - | 'darkgreen' - | 'darkgrey' - | 'darkkhaki' - | 'darkmagenta' - | 'darkolivegreen' - | 'darkorange' - | 'darkorchid' - | 'darkred' - | 'darksalmon' - | 'darkseagreen' - | 'darkslateblue' - | 'darkslategray' - | 'darkslategrey' - | 'darkturquoise' - | 'darkviolet' - | 'deeppink' - | 'deepskyblue' - | 'dimgray' - | 'dimgrey' - | 'dodgerblue' - | 'firebrick' - | 'floralwhite' - | 'forestgreen' - | 'fuchsia' - | 'gainsboro' - | 'ghostwhite' - | 'gold' - | 'goldenrod' - | 'gray' - | 'green' - | 'greenyellow' - | 'grey' - | 'honeydew' - | 'hotpink' - | 'indianred' - | 'indigo' - | 'ivory' - | 'khaki' - | 'lavender' - | 'lavenderblush' - | 'lawngreen' - | 'lemonchiffon' - | 'lightblue' - | 'lightcoral' - | 'lightcyan' - | 'lightgoldenrodyellow' - | 'lightgray' - | 'lightgreen' - | 'lightgrey' - | 'lightpink' - | 'lightsalmon' - | 'lightseagreen' - | 'lightskyblue' - | 'lightslategray' - | 'lightslategrey' - | 'lightsteelblue' - | 'lightyellow' - | 'lime' - | 'limegreen' - | 'linen' - | 'magenta' - | 'maroon' - | 'mediumaquamarine' - | 'mediumblue' - | 'mediumorchid' - | 'mediumpurple' - | 'mediumseagreen' - | 'mediumslateblue' - | 'mediumspringgreen' - | 'mediumturquoise' - | 'mediumvioletred' - | 'midnightblue' - | 'mintcream' - | 'mistyrose' - | 'moccasin' - | 'navajowhite' - | 'navy' - | 'oldlace' - | 'olive' - | 'olivedrab' - | 'orange' - | 'orangered' - | 'orchid' - | 'palegoldenrod' - | 'palegreen' - | 'paleturquoise' - | 'palevioletred' - | 'papayawhip' - | 'peachpuff' - | 'peru' - | 'pink' - | 'plum' - | 'powderblue' - | 'purple' - | 'rebeccapurple' - | 'red' - | 'rosybrown' - | 'royalblue' - | 'saddlebrown' - | 'salmon' - | 'sandybrown' - | 'seagreen' - | 'seashell' - | 'sienna' - | 'silver' - | 'skyblue' - | 'slateblue' - | 'slategray' - | 'slategrey' - | 'snow' - | 'springgreen' - | 'steelblue' - | 'tan' - | 'teal' - | 'thistle' - | 'tomato' - | 'turquoise' - | 'violet' - | 'wheat' - | 'white' - | 'whitesmoke' - | 'yellow' - | 'yellowgreen'; - -declare namespace ansiStyles { - interface ColorConvert { - /** - The RGB color space. - - @param red - (`0`-`255`) - @param green - (`0`-`255`) - @param blue - (`0`-`255`) - */ - rgb(red: number, green: number, blue: number): string; - - /** - The RGB HEX color space. - - @param hex - A hexadecimal string containing RGB data. - */ - hex(hex: string): string; - - /** - @param keyword - A CSS color name. - */ - keyword(keyword: CSSColor): string; - - /** - The HSL color space. - - @param hue - (`0`-`360`) - @param saturation - (`0`-`100`) - @param lightness - (`0`-`100`) - */ - hsl(hue: number, saturation: number, lightness: number): string; - - /** - The HSV color space. - - @param hue - (`0`-`360`) - @param saturation - (`0`-`100`) - @param value - (`0`-`100`) - */ - hsv(hue: number, saturation: number, value: number): string; - - /** - The HSV color space. - - @param hue - (`0`-`360`) - @param whiteness - (`0`-`100`) - @param blackness - (`0`-`100`) - */ - hwb(hue: number, whiteness: number, blackness: number): string; - - /** - Use a [4-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4-bit) to set text color. - */ - ansi(ansi: number): string; - - /** - Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color. - */ - ansi256(ansi: number): string; - } - - interface CSPair { - /** - The ANSI terminal control sequence for starting this style. - */ - readonly open: string; - - /** - The ANSI terminal control sequence for ending this style. - */ - readonly close: string; - } - - interface ColorBase { - readonly ansi: ColorConvert; - readonly ansi256: ColorConvert; - readonly ansi16m: ColorConvert; - - /** - The ANSI terminal control sequence for ending this color. - */ - readonly close: string; - } - - interface Modifier { - /** - Resets the current color chain. - */ - readonly reset: CSPair; - - /** - Make text bold. - */ - readonly bold: CSPair; - - /** - Emitting only a small amount of light. - */ - readonly dim: CSPair; - - /** - Make text italic. (Not widely supported) - */ - readonly italic: CSPair; - - /** - Make text underline. (Not widely supported) - */ - readonly underline: CSPair; - - /** - Inverse background and foreground colors. - */ - readonly inverse: CSPair; - - /** - Prints the text, but makes it invisible. - */ - readonly hidden: CSPair; - - /** - Puts a horizontal line through the center of the text. (Not widely supported) - */ - readonly strikethrough: CSPair; - } - - interface ForegroundColor { - readonly black: CSPair; - readonly red: CSPair; - readonly green: CSPair; - readonly yellow: CSPair; - readonly blue: CSPair; - readonly cyan: CSPair; - readonly magenta: CSPair; - readonly white: CSPair; - - /** - Alias for `blackBright`. - */ - readonly gray: CSPair; - - /** - Alias for `blackBright`. - */ - readonly grey: CSPair; - - readonly blackBright: CSPair; - readonly redBright: CSPair; - readonly greenBright: CSPair; - readonly yellowBright: CSPair; - readonly blueBright: CSPair; - readonly cyanBright: CSPair; - readonly magentaBright: CSPair; - readonly whiteBright: CSPair; - } - - interface BackgroundColor { - readonly bgBlack: CSPair; - readonly bgRed: CSPair; - readonly bgGreen: CSPair; - readonly bgYellow: CSPair; - readonly bgBlue: CSPair; - readonly bgCyan: CSPair; - readonly bgMagenta: CSPair; - readonly bgWhite: CSPair; - - /** - Alias for `bgBlackBright`. - */ - readonly bgGray: CSPair; - - /** - Alias for `bgBlackBright`. - */ - readonly bgGrey: CSPair; - - readonly bgBlackBright: CSPair; - readonly bgRedBright: CSPair; - readonly bgGreenBright: CSPair; - readonly bgYellowBright: CSPair; - readonly bgBlueBright: CSPair; - readonly bgCyanBright: CSPair; - readonly bgMagentaBright: CSPair; - readonly bgWhiteBright: CSPair; - } -} - -declare const ansiStyles: { - readonly modifier: ansiStyles.Modifier; - readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase; - readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase; - readonly codes: ReadonlyMap<number, number>; -} & ansiStyles.BackgroundColor & ansiStyles.ForegroundColor & ansiStyles.Modifier; - -export = ansiStyles; diff --git a/node_modules/chalk/node_modules/ansi-styles/index.js b/node_modules/chalk/node_modules/ansi-styles/index.js deleted file mode 100644 index 5d82581a..00000000 --- a/node_modules/chalk/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,163 +0,0 @@ -'use strict'; - -const wrapAnsi16 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => (...args) => { - const rgb = fn(...args); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -const ansi2ansi = n => n; -const rgb2rgb = (r, g, b) => [r, g, b]; - -const setLazyProperty = (object, property, get) => { - Object.defineProperty(object, property, { - get: () => { - const value = get(); - - Object.defineProperty(object, property, { - value, - enumerable: true, - configurable: true - }); - - return value; - }, - enumerable: true, - configurable: true - }); -}; - -/** @type {typeof import('color-convert')} */ -let colorConvert; -const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { - if (colorConvert === undefined) { - colorConvert = require('color-convert'); - } - - const offset = isBackground ? 10 : 0; - const styles = {}; - - for (const [sourceSpace, suite] of Object.entries(colorConvert)) { - const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; - if (sourceSpace === targetSpace) { - styles[name] = wrap(identity, offset); - } else if (typeof suite === 'object') { - styles[name] = wrap(suite[targetSpace], offset); - } - } - - return styles; -}; - -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - - // Bright color - blackBright: [90, 39], - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Alias bright black as gray (and grey) - styles.color.gray = styles.color.blackBright; - styles.bgColor.bgGray = styles.bgColor.bgBlackBright; - styles.color.grey = styles.color.blackBright; - styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; - - for (const [groupName, group] of Object.entries(styles)) { - for (const [styleName, style] of Object.entries(group)) { - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - } - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); - setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); - - return styles; -} - -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); diff --git a/node_modules/chalk/node_modules/ansi-styles/license b/node_modules/chalk/node_modules/ansi-styles/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/chalk/node_modules/ansi-styles/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/chalk/node_modules/ansi-styles/package.json deleted file mode 100644 index 260ec0eb..00000000 --- a/node_modules/chalk/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "_from": "ansi-styles@^4.1.0", - "_id": "ansi-styles@4.3.0", - "_inBundle": false, - "_integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "_location": "/chalk/ansi-styles", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "ansi-styles@^4.1.0", - "name": "ansi-styles", - "escapedName": "ansi-styles", - "rawSpec": "^4.1.0", - "saveSpec": null, - "fetchSpec": "^4.1.0" - }, - "_requiredBy": [ - "/chalk" - ], - "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "_shasum": "edd803628ae71c04c85ae7a0906edad34b648937", - "_spec": "ansi-styles@^4.1.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/chalk", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/ansi-styles/issues" - }, - "bundleDependencies": false, - "dependencies": { - "color-convert": "^2.0.1" - }, - "deprecated": false, - "description": "ANSI escape codes for styling strings in the terminal", - "devDependencies": { - "@types/color-convert": "^1.9.0", - "ava": "^2.3.0", - "svg-term-cli": "^2.1.1", - "tsd": "^0.11.0", - "xo": "^0.25.3" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "funding": "https://github.com/chalk/ansi-styles?sponsor=1", - "homepage": "https://github.com/chalk/ansi-styles#readme", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "ansi-styles", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/ansi-styles.git" - }, - "scripts": { - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor", - "test": "xo && ava && tsd" - }, - "version": "4.3.0" -} diff --git a/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/chalk/node_modules/ansi-styles/readme.md deleted file mode 100644 index 24883de8..00000000 --- a/node_modules/chalk/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,152 +0,0 @@ -# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) - -> [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal - -You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. - -<img src="screenshot.svg" width="900"> - -## Install - -``` -$ npm install ansi-styles -``` - -## Usage - -```js -const style = require('ansi-styles'); - -console.log(`${style.green.open}Hello world!${style.green.close}`); - - -// Color conversion between 16/256/truecolor -// NOTE: If conversion goes to 16 colors or 256 colors, the original color -// may be degraded to fit that color palette. This means terminals -// that do not support 16 million colors will best-match the -// original color. -console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); -console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); -console.log(style.color.ansi16m.hex('#abcdef') + 'Hello world!' + style.color.close); -``` - -## API - -Each style has an `open` and `close` property. - -## Styles - -### Modifiers - -- `reset` -- `bold` -- `dim` -- `italic` *(Not widely supported)* -- `underline` -- `inverse` -- `hidden` -- `strikethrough` *(Not widely supported)* - -### Colors - -- `black` -- `red` -- `green` -- `yellow` -- `blue` -- `magenta` -- `cyan` -- `white` -- `blackBright` (alias: `gray`, `grey`) -- `redBright` -- `greenBright` -- `yellowBright` -- `blueBright` -- `magentaBright` -- `cyanBright` -- `whiteBright` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` -- `bgBlackBright` (alias: `bgGray`, `bgGrey`) -- `bgRedBright` -- `bgGreenBright` -- `bgYellowBright` -- `bgBlueBright` -- `bgMagentaBright` -- `bgCyanBright` -- `bgWhiteBright` - -## Advanced usage - -By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. - -- `style.modifier` -- `style.color` -- `style.bgColor` - -###### Example - -```js -console.log(style.color.green.open); -``` - -Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. - -###### Example - -```js -console.log(style.codes.get(36)); -//=> 39 -``` - -## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) - -`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. - -The following color spaces from `color-convert` are supported: - -- `rgb` -- `hex` -- `keyword` -- `hsl` -- `hsv` -- `hwb` -- `ansi` -- `ansi256` - -To use these, call the associated conversion function with the intended output, for example: - -```js -style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code -style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code - -style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code -style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code - -style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code -style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code -``` - -## Related - -- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - -## For enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of `ansi-styles` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-ansi-styles?utm_source=npm-ansi-styles&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/chalk/node_modules/color-convert/CHANGELOG.md b/node_modules/chalk/node_modules/color-convert/CHANGELOG.md deleted file mode 100644 index 0a7bce4f..00000000 --- a/node_modules/chalk/node_modules/color-convert/CHANGELOG.md +++ /dev/null @@ -1,54 +0,0 @@ -# 1.0.0 - 2016-01-07 - -- Removed: unused speed test -- Added: Automatic routing between previously unsupported conversions -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Removed: `convert()` class -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Changed: all functions to lookup dictionary -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Changed: `ansi` to `ansi256` -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Fixed: argument grouping for functions requiring only one argument -([#27](https://github.com/Qix-/color-convert/pull/27)) - -# 0.6.0 - 2015-07-23 - -- Added: methods to handle -[ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors: - - rgb2ansi16 - - rgb2ansi - - hsl2ansi16 - - hsl2ansi - - hsv2ansi16 - - hsv2ansi - - hwb2ansi16 - - hwb2ansi - - cmyk2ansi16 - - cmyk2ansi - - keyword2ansi16 - - keyword2ansi - - ansi162rgb - - ansi162hsl - - ansi162hsv - - ansi162hwb - - ansi162cmyk - - ansi162keyword - - ansi2rgb - - ansi2hsl - - ansi2hsv - - ansi2hwb - - ansi2cmyk - - ansi2keyword -([#18](https://github.com/harthur/color-convert/pull/18)) - -# 0.5.3 - 2015-06-02 - -- Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]` -([#15](https://github.com/harthur/color-convert/issues/15)) - ---- - -Check out commit logs for older releases diff --git a/node_modules/chalk/node_modules/color-convert/LICENSE b/node_modules/chalk/node_modules/color-convert/LICENSE deleted file mode 100644 index 5b4c386f..00000000 --- a/node_modules/chalk/node_modules/color-convert/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2011-2016 Heather Arthur <fayearthur@gmail.com> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/chalk/node_modules/color-convert/README.md b/node_modules/chalk/node_modules/color-convert/README.md deleted file mode 100644 index d4b08fc3..00000000 --- a/node_modules/chalk/node_modules/color-convert/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# color-convert - -[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert) - -Color-convert is a color conversion library for JavaScript and node. -It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest): - -```js -var convert = require('color-convert'); - -convert.rgb.hsl(140, 200, 100); // [96, 48, 59] -convert.keyword.rgb('blue'); // [0, 0, 255] - -var rgbChannels = convert.rgb.channels; // 3 -var cmykChannels = convert.cmyk.channels; // 4 -var ansiChannels = convert.ansi16.channels; // 1 -``` - -# Install - -```console -$ npm install color-convert -``` - -# API - -Simply get the property of the _from_ and _to_ conversion that you're looking for. - -All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function. - -All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha). - -```js -var convert = require('color-convert'); - -// Hex to LAB -convert.hex.lab('DEADBF'); // [ 76, 21, -2 ] -convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ] - -// RGB to CMYK -convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ] -convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ] -``` - -### Arrays -All functions that accept multiple arguments also support passing an array. - -Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.) - -```js -var convert = require('color-convert'); - -convert.rgb.hex(123, 45, 67); // '7B2D43' -convert.rgb.hex([123, 45, 67]); // '7B2D43' -``` - -## Routing - -Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex). - -Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js). - -# Contribute - -If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request. - -# License -Copyright © 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE). diff --git a/node_modules/chalk/node_modules/color-convert/conversions.js b/node_modules/chalk/node_modules/color-convert/conversions.js deleted file mode 100644 index 2657f265..00000000 --- a/node_modules/chalk/node_modules/color-convert/conversions.js +++ /dev/null @@ -1,839 +0,0 @@ -/* MIT license */ -/* eslint-disable no-mixed-operators */ -const cssKeywords = require('color-name'); - -// NOTE: conversions should only return primitive values (i.e. arrays, or -// values that give correct `typeof` results). -// do not use box values types (i.e. Number(), String(), etc.) - -const reverseKeywords = {}; -for (const key of Object.keys(cssKeywords)) { - reverseKeywords[cssKeywords[key]] = key; -} - -const convert = { - rgb: {channels: 3, labels: 'rgb'}, - hsl: {channels: 3, labels: 'hsl'}, - hsv: {channels: 3, labels: 'hsv'}, - hwb: {channels: 3, labels: 'hwb'}, - cmyk: {channels: 4, labels: 'cmyk'}, - xyz: {channels: 3, labels: 'xyz'}, - lab: {channels: 3, labels: 'lab'}, - lch: {channels: 3, labels: 'lch'}, - hex: {channels: 1, labels: ['hex']}, - keyword: {channels: 1, labels: ['keyword']}, - ansi16: {channels: 1, labels: ['ansi16']}, - ansi256: {channels: 1, labels: ['ansi256']}, - hcg: {channels: 3, labels: ['h', 'c', 'g']}, - apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, - gray: {channels: 1, labels: ['gray']} -}; - -module.exports = convert; - -// Hide .channels and .labels properties -for (const model of Object.keys(convert)) { - if (!('channels' in convert[model])) { - throw new Error('missing channels property: ' + model); - } - - if (!('labels' in convert[model])) { - throw new Error('missing channel labels property: ' + model); - } - - if (convert[model].labels.length !== convert[model].channels) { - throw new Error('channel and label counts mismatch: ' + model); - } - - const {channels, labels} = convert[model]; - delete convert[model].channels; - delete convert[model].labels; - Object.defineProperty(convert[model], 'channels', {value: channels}); - Object.defineProperty(convert[model], 'labels', {value: labels}); -} - -convert.rgb.hsl = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const min = Math.min(r, g, b); - const max = Math.max(r, g, b); - const delta = max - min; - let h; - let s; - - if (max === min) { - h = 0; - } else if (r === max) { - h = (g - b) / delta; - } else if (g === max) { - h = 2 + (b - r) / delta; - } else if (b === max) { - h = 4 + (r - g) / delta; - } - - h = Math.min(h * 60, 360); - - if (h < 0) { - h += 360; - } - - const l = (min + max) / 2; - - if (max === min) { - s = 0; - } else if (l <= 0.5) { - s = delta / (max + min); - } else { - s = delta / (2 - max - min); - } - - return [h, s * 100, l * 100]; -}; - -convert.rgb.hsv = function (rgb) { - let rdif; - let gdif; - let bdif; - let h; - let s; - - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const v = Math.max(r, g, b); - const diff = v - Math.min(r, g, b); - const diffc = function (c) { - return (v - c) / 6 / diff + 1 / 2; - }; - - if (diff === 0) { - h = 0; - s = 0; - } else { - s = diff / v; - rdif = diffc(r); - gdif = diffc(g); - bdif = diffc(b); - - if (r === v) { - h = bdif - gdif; - } else if (g === v) { - h = (1 / 3) + rdif - bdif; - } else if (b === v) { - h = (2 / 3) + gdif - rdif; - } - - if (h < 0) { - h += 1; - } else if (h > 1) { - h -= 1; - } - } - - return [ - h * 360, - s * 100, - v * 100 - ]; -}; - -convert.rgb.hwb = function (rgb) { - const r = rgb[0]; - const g = rgb[1]; - let b = rgb[2]; - const h = convert.rgb.hsl(rgb)[0]; - const w = 1 / 255 * Math.min(r, Math.min(g, b)); - - b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); - - return [h, w * 100, b * 100]; -}; - -convert.rgb.cmyk = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - - const k = Math.min(1 - r, 1 - g, 1 - b); - const c = (1 - r - k) / (1 - k) || 0; - const m = (1 - g - k) / (1 - k) || 0; - const y = (1 - b - k) / (1 - k) || 0; - - return [c * 100, m * 100, y * 100, k * 100]; -}; - -function comparativeDistance(x, y) { - /* - See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance - */ - return ( - ((x[0] - y[0]) ** 2) + - ((x[1] - y[1]) ** 2) + - ((x[2] - y[2]) ** 2) - ); -} - -convert.rgb.keyword = function (rgb) { - const reversed = reverseKeywords[rgb]; - if (reversed) { - return reversed; - } - - let currentClosestDistance = Infinity; - let currentClosestKeyword; - - for (const keyword of Object.keys(cssKeywords)) { - const value = cssKeywords[keyword]; - - // Compute comparative distance - const distance = comparativeDistance(rgb, value); - - // Check if its less, if so set as closest - if (distance < currentClosestDistance) { - currentClosestDistance = distance; - currentClosestKeyword = keyword; - } - } - - return currentClosestKeyword; -}; - -convert.keyword.rgb = function (keyword) { - return cssKeywords[keyword]; -}; - -convert.rgb.xyz = function (rgb) { - let r = rgb[0] / 255; - let g = rgb[1] / 255; - let b = rgb[2] / 255; - - // Assume sRGB - r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92); - g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92); - b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92); - - const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); - const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); - const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); - - return [x * 100, y * 100, z * 100]; -}; - -convert.rgb.lab = function (rgb) { - const xyz = convert.rgb.xyz(rgb); - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); - - const l = (116 * y) - 16; - const a = 500 * (x - y); - const b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.hsl.rgb = function (hsl) { - const h = hsl[0] / 360; - const s = hsl[1] / 100; - const l = hsl[2] / 100; - let t2; - let t3; - let val; - - if (s === 0) { - val = l * 255; - return [val, val, val]; - } - - if (l < 0.5) { - t2 = l * (1 + s); - } else { - t2 = l + s - l * s; - } - - const t1 = 2 * l - t2; - - const rgb = [0, 0, 0]; - for (let i = 0; i < 3; i++) { - t3 = h + 1 / 3 * -(i - 1); - if (t3 < 0) { - t3++; - } - - if (t3 > 1) { - t3--; - } - - if (6 * t3 < 1) { - val = t1 + (t2 - t1) * 6 * t3; - } else if (2 * t3 < 1) { - val = t2; - } else if (3 * t3 < 2) { - val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; - } else { - val = t1; - } - - rgb[i] = val * 255; - } - - return rgb; -}; - -convert.hsl.hsv = function (hsl) { - const h = hsl[0]; - let s = hsl[1] / 100; - let l = hsl[2] / 100; - let smin = s; - const lmin = Math.max(l, 0.01); - - l *= 2; - s *= (l <= 1) ? l : 2 - l; - smin *= lmin <= 1 ? lmin : 2 - lmin; - const v = (l + s) / 2; - const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); - - return [h, sv * 100, v * 100]; -}; - -convert.hsv.rgb = function (hsv) { - const h = hsv[0] / 60; - const s = hsv[1] / 100; - let v = hsv[2] / 100; - const hi = Math.floor(h) % 6; - - const f = h - Math.floor(h); - const p = 255 * v * (1 - s); - const q = 255 * v * (1 - (s * f)); - const t = 255 * v * (1 - (s * (1 - f))); - v *= 255; - - switch (hi) { - case 0: - return [v, t, p]; - case 1: - return [q, v, p]; - case 2: - return [p, v, t]; - case 3: - return [p, q, v]; - case 4: - return [t, p, v]; - case 5: - return [v, p, q]; - } -}; - -convert.hsv.hsl = function (hsv) { - const h = hsv[0]; - const s = hsv[1] / 100; - const v = hsv[2] / 100; - const vmin = Math.max(v, 0.01); - let sl; - let l; - - l = (2 - s) * v; - const lmin = (2 - s) * vmin; - sl = s * vmin; - sl /= (lmin <= 1) ? lmin : 2 - lmin; - sl = sl || 0; - l /= 2; - - return [h, sl * 100, l * 100]; -}; - -// http://dev.w3.org/csswg/css-color/#hwb-to-rgb -convert.hwb.rgb = function (hwb) { - const h = hwb[0] / 360; - let wh = hwb[1] / 100; - let bl = hwb[2] / 100; - const ratio = wh + bl; - let f; - - // Wh + bl cant be > 1 - if (ratio > 1) { - wh /= ratio; - bl /= ratio; - } - - const i = Math.floor(6 * h); - const v = 1 - bl; - f = 6 * h - i; - - if ((i & 0x01) !== 0) { - f = 1 - f; - } - - const n = wh + f * (v - wh); // Linear interpolation - - let r; - let g; - let b; - /* eslint-disable max-statements-per-line,no-multi-spaces */ - switch (i) { - default: - case 6: - case 0: r = v; g = n; b = wh; break; - case 1: r = n; g = v; b = wh; break; - case 2: r = wh; g = v; b = n; break; - case 3: r = wh; g = n; b = v; break; - case 4: r = n; g = wh; b = v; break; - case 5: r = v; g = wh; b = n; break; - } - /* eslint-enable max-statements-per-line,no-multi-spaces */ - - return [r * 255, g * 255, b * 255]; -}; - -convert.cmyk.rgb = function (cmyk) { - const c = cmyk[0] / 100; - const m = cmyk[1] / 100; - const y = cmyk[2] / 100; - const k = cmyk[3] / 100; - - const r = 1 - Math.min(1, c * (1 - k) + k); - const g = 1 - Math.min(1, m * (1 - k) + k); - const b = 1 - Math.min(1, y * (1 - k) + k); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.rgb = function (xyz) { - const x = xyz[0] / 100; - const y = xyz[1] / 100; - const z = xyz[2] / 100; - let r; - let g; - let b; - - r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); - g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); - b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); - - // Assume sRGB - r = r > 0.0031308 - ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055) - : r * 12.92; - - g = g > 0.0031308 - ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055) - : g * 12.92; - - b = b > 0.0031308 - ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055) - : b * 12.92; - - r = Math.min(Math.max(0, r), 1); - g = Math.min(Math.max(0, g), 1); - b = Math.min(Math.max(0, b), 1); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.lab = function (xyz) { - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); - - const l = (116 * y) - 16; - const a = 500 * (x - y); - const b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.lab.xyz = function (lab) { - const l = lab[0]; - const a = lab[1]; - const b = lab[2]; - let x; - let y; - let z; - - y = (l + 16) / 116; - x = a / 500 + y; - z = y - b / 200; - - const y2 = y ** 3; - const x2 = x ** 3; - const z2 = z ** 3; - y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; - x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; - z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; - - x *= 95.047; - y *= 100; - z *= 108.883; - - return [x, y, z]; -}; - -convert.lab.lch = function (lab) { - const l = lab[0]; - const a = lab[1]; - const b = lab[2]; - let h; - - const hr = Math.atan2(b, a); - h = hr * 360 / 2 / Math.PI; - - if (h < 0) { - h += 360; - } - - const c = Math.sqrt(a * a + b * b); - - return [l, c, h]; -}; - -convert.lch.lab = function (lch) { - const l = lch[0]; - const c = lch[1]; - const h = lch[2]; - - const hr = h / 360 * 2 * Math.PI; - const a = c * Math.cos(hr); - const b = c * Math.sin(hr); - - return [l, a, b]; -}; - -convert.rgb.ansi16 = function (args, saturation = null) { - const [r, g, b] = args; - let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization - - value = Math.round(value / 50); - - if (value === 0) { - return 30; - } - - let ansi = 30 - + ((Math.round(b / 255) << 2) - | (Math.round(g / 255) << 1) - | Math.round(r / 255)); - - if (value === 2) { - ansi += 60; - } - - return ansi; -}; - -convert.hsv.ansi16 = function (args) { - // Optimization here; we already know the value and don't need to get - // it converted for us. - return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); -}; - -convert.rgb.ansi256 = function (args) { - const r = args[0]; - const g = args[1]; - const b = args[2]; - - // We use the extended greyscale palette here, with the exception of - // black and white. normal palette only has 4 greyscale shades. - if (r === g && g === b) { - if (r < 8) { - return 16; - } - - if (r > 248) { - return 231; - } - - return Math.round(((r - 8) / 247) * 24) + 232; - } - - const ansi = 16 - + (36 * Math.round(r / 255 * 5)) - + (6 * Math.round(g / 255 * 5)) - + Math.round(b / 255 * 5); - - return ansi; -}; - -convert.ansi16.rgb = function (args) { - let color = args % 10; - - // Handle greyscale - if (color === 0 || color === 7) { - if (args > 50) { - color += 3.5; - } - - color = color / 10.5 * 255; - - return [color, color, color]; - } - - const mult = (~~(args > 50) + 1) * 0.5; - const r = ((color & 1) * mult) * 255; - const g = (((color >> 1) & 1) * mult) * 255; - const b = (((color >> 2) & 1) * mult) * 255; - - return [r, g, b]; -}; - -convert.ansi256.rgb = function (args) { - // Handle greyscale - if (args >= 232) { - const c = (args - 232) * 10 + 8; - return [c, c, c]; - } - - args -= 16; - - let rem; - const r = Math.floor(args / 36) / 5 * 255; - const g = Math.floor((rem = args % 36) / 6) / 5 * 255; - const b = (rem % 6) / 5 * 255; - - return [r, g, b]; -}; - -convert.rgb.hex = function (args) { - const integer = ((Math.round(args[0]) & 0xFF) << 16) - + ((Math.round(args[1]) & 0xFF) << 8) - + (Math.round(args[2]) & 0xFF); - - const string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.hex.rgb = function (args) { - const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); - if (!match) { - return [0, 0, 0]; - } - - let colorString = match[0]; - - if (match[0].length === 3) { - colorString = colorString.split('').map(char => { - return char + char; - }).join(''); - } - - const integer = parseInt(colorString, 16); - const r = (integer >> 16) & 0xFF; - const g = (integer >> 8) & 0xFF; - const b = integer & 0xFF; - - return [r, g, b]; -}; - -convert.rgb.hcg = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const max = Math.max(Math.max(r, g), b); - const min = Math.min(Math.min(r, g), b); - const chroma = (max - min); - let grayscale; - let hue; - - if (chroma < 1) { - grayscale = min / (1 - chroma); - } else { - grayscale = 0; - } - - if (chroma <= 0) { - hue = 0; - } else - if (max === r) { - hue = ((g - b) / chroma) % 6; - } else - if (max === g) { - hue = 2 + (b - r) / chroma; - } else { - hue = 4 + (r - g) / chroma; - } - - hue /= 6; - hue %= 1; - - return [hue * 360, chroma * 100, grayscale * 100]; -}; - -convert.hsl.hcg = function (hsl) { - const s = hsl[1] / 100; - const l = hsl[2] / 100; - - const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l)); - - let f = 0; - if (c < 1.0) { - f = (l - 0.5 * c) / (1.0 - c); - } - - return [hsl[0], c * 100, f * 100]; -}; - -convert.hsv.hcg = function (hsv) { - const s = hsv[1] / 100; - const v = hsv[2] / 100; - - const c = s * v; - let f = 0; - - if (c < 1.0) { - f = (v - c) / (1 - c); - } - - return [hsv[0], c * 100, f * 100]; -}; - -convert.hcg.rgb = function (hcg) { - const h = hcg[0] / 360; - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - if (c === 0.0) { - return [g * 255, g * 255, g * 255]; - } - - const pure = [0, 0, 0]; - const hi = (h % 1) * 6; - const v = hi % 1; - const w = 1 - v; - let mg = 0; - - /* eslint-disable max-statements-per-line */ - switch (Math.floor(hi)) { - case 0: - pure[0] = 1; pure[1] = v; pure[2] = 0; break; - case 1: - pure[0] = w; pure[1] = 1; pure[2] = 0; break; - case 2: - pure[0] = 0; pure[1] = 1; pure[2] = v; break; - case 3: - pure[0] = 0; pure[1] = w; pure[2] = 1; break; - case 4: - pure[0] = v; pure[1] = 0; pure[2] = 1; break; - default: - pure[0] = 1; pure[1] = 0; pure[2] = w; - } - /* eslint-enable max-statements-per-line */ - - mg = (1.0 - c) * g; - - return [ - (c * pure[0] + mg) * 255, - (c * pure[1] + mg) * 255, - (c * pure[2] + mg) * 255 - ]; -}; - -convert.hcg.hsv = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - const v = c + g * (1.0 - c); - let f = 0; - - if (v > 0.0) { - f = c / v; - } - - return [hcg[0], f * 100, v * 100]; -}; - -convert.hcg.hsl = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - const l = g * (1.0 - c) + 0.5 * c; - let s = 0; - - if (l > 0.0 && l < 0.5) { - s = c / (2 * l); - } else - if (l >= 0.5 && l < 1.0) { - s = c / (2 * (1 - l)); - } - - return [hcg[0], s * 100, l * 100]; -}; - -convert.hcg.hwb = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - const v = c + g * (1.0 - c); - return [hcg[0], (v - c) * 100, (1 - v) * 100]; -}; - -convert.hwb.hcg = function (hwb) { - const w = hwb[1] / 100; - const b = hwb[2] / 100; - const v = 1 - b; - const c = v - w; - let g = 0; - - if (c < 1) { - g = (v - c) / (1 - c); - } - - return [hwb[0], c * 100, g * 100]; -}; - -convert.apple.rgb = function (apple) { - return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; -}; - -convert.rgb.apple = function (rgb) { - return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; -}; - -convert.gray.rgb = function (args) { - return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; -}; - -convert.gray.hsl = function (args) { - return [0, 0, args[0]]; -}; - -convert.gray.hsv = convert.gray.hsl; - -convert.gray.hwb = function (gray) { - return [0, 100, gray[0]]; -}; - -convert.gray.cmyk = function (gray) { - return [0, 0, 0, gray[0]]; -}; - -convert.gray.lab = function (gray) { - return [gray[0], 0, 0]; -}; - -convert.gray.hex = function (gray) { - const val = Math.round(gray[0] / 100 * 255) & 0xFF; - const integer = (val << 16) + (val << 8) + val; - - const string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.rgb.gray = function (rgb) { - const val = (rgb[0] + rgb[1] + rgb[2]) / 3; - return [val / 255 * 100]; -}; diff --git a/node_modules/chalk/node_modules/color-convert/index.js b/node_modules/chalk/node_modules/color-convert/index.js deleted file mode 100644 index b648e573..00000000 --- a/node_modules/chalk/node_modules/color-convert/index.js +++ /dev/null @@ -1,81 +0,0 @@ -const conversions = require('./conversions'); -const route = require('./route'); - -const convert = {}; - -const models = Object.keys(conversions); - -function wrapRaw(fn) { - const wrappedFn = function (...args) { - const arg0 = args[0]; - if (arg0 === undefined || arg0 === null) { - return arg0; - } - - if (arg0.length > 1) { - args = arg0; - } - - return fn(args); - }; - - // Preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -function wrapRounded(fn) { - const wrappedFn = function (...args) { - const arg0 = args[0]; - - if (arg0 === undefined || arg0 === null) { - return arg0; - } - - if (arg0.length > 1) { - args = arg0; - } - - const result = fn(args); - - // We're assuming the result is an array here. - // see notice in conversions.js; don't use box types - // in conversion functions. - if (typeof result === 'object') { - for (let len = result.length, i = 0; i < len; i++) { - result[i] = Math.round(result[i]); - } - } - - return result; - }; - - // Preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -models.forEach(fromModel => { - convert[fromModel] = {}; - - Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); - Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); - - const routes = route(fromModel); - const routeModels = Object.keys(routes); - - routeModels.forEach(toModel => { - const fn = routes[toModel]; - - convert[fromModel][toModel] = wrapRounded(fn); - convert[fromModel][toModel].raw = wrapRaw(fn); - }); -}); - -module.exports = convert; diff --git a/node_modules/chalk/node_modules/color-convert/package.json b/node_modules/chalk/node_modules/color-convert/package.json deleted file mode 100644 index 7472d0da..00000000 --- a/node_modules/chalk/node_modules/color-convert/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_from": "color-convert@^2.0.1", - "_id": "color-convert@2.0.1", - "_inBundle": false, - "_integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "_location": "/chalk/color-convert", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "color-convert@^2.0.1", - "name": "color-convert", - "escapedName": "color-convert", - "rawSpec": "^2.0.1", - "saveSpec": null, - "fetchSpec": "^2.0.1" - }, - "_requiredBy": [ - "/chalk/ansi-styles" - ], - "_resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "_shasum": "72d3a68d598c9bdb3af2ad1e84f21d896abd4de3", - "_spec": "color-convert@^2.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/chalk/node_modules/ansi-styles", - "author": { - "name": "Heather Arthur", - "email": "fayearthur@gmail.com" - }, - "bugs": { - "url": "https://github.com/Qix-/color-convert/issues" - }, - "bundleDependencies": false, - "dependencies": { - "color-name": "~1.1.4" - }, - "deprecated": false, - "description": "Plain color conversion functions", - "devDependencies": { - "chalk": "^2.4.2", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=7.0.0" - }, - "files": [ - "index.js", - "conversions.js", - "route.js" - ], - "homepage": "https://github.com/Qix-/color-convert#readme", - "keywords": [ - "color", - "colour", - "convert", - "converter", - "conversion", - "rgb", - "hsl", - "hsv", - "hwb", - "cmyk", - "ansi", - "ansi16" - ], - "license": "MIT", - "name": "color-convert", - "repository": { - "type": "git", - "url": "git+https://github.com/Qix-/color-convert.git" - }, - "scripts": { - "pretest": "xo", - "test": "node test/basic.js" - }, - "version": "2.0.1", - "xo": { - "rules": { - "default-case": 0, - "no-inline-comments": 0, - "operator-linebreak": 0 - } - } -} diff --git a/node_modules/chalk/node_modules/color-convert/route.js b/node_modules/chalk/node_modules/color-convert/route.js deleted file mode 100644 index 1a08521b..00000000 --- a/node_modules/chalk/node_modules/color-convert/route.js +++ /dev/null @@ -1,97 +0,0 @@ -const conversions = require('./conversions'); - -/* - This function routes a model to all other models. - - all functions that are routed have a property `.conversion` attached - to the returned synthetic function. This property is an array - of strings, each with the steps in between the 'from' and 'to' - color models (inclusive). - - conversions that are not possible simply are not included. -*/ - -function buildGraph() { - const graph = {}; - // https://jsperf.com/object-keys-vs-for-in-with-closure/3 - const models = Object.keys(conversions); - - for (let len = models.length, i = 0; i < len; i++) { - graph[models[i]] = { - // http://jsperf.com/1-vs-infinity - // micro-opt, but this is simple. - distance: -1, - parent: null - }; - } - - return graph; -} - -// https://en.wikipedia.org/wiki/Breadth-first_search -function deriveBFS(fromModel) { - const graph = buildGraph(); - const queue = [fromModel]; // Unshift -> queue -> pop - - graph[fromModel].distance = 0; - - while (queue.length) { - const current = queue.pop(); - const adjacents = Object.keys(conversions[current]); - - for (let len = adjacents.length, i = 0; i < len; i++) { - const adjacent = adjacents[i]; - const node = graph[adjacent]; - - if (node.distance === -1) { - node.distance = graph[current].distance + 1; - node.parent = current; - queue.unshift(adjacent); - } - } - } - - return graph; -} - -function link(from, to) { - return function (args) { - return to(from(args)); - }; -} - -function wrapConversion(toModel, graph) { - const path = [graph[toModel].parent, toModel]; - let fn = conversions[graph[toModel].parent][toModel]; - - let cur = graph[toModel].parent; - while (graph[cur].parent) { - path.unshift(graph[cur].parent); - fn = link(conversions[graph[cur].parent][cur], fn); - cur = graph[cur].parent; - } - - fn.conversion = path; - return fn; -} - -module.exports = function (fromModel) { - const graph = deriveBFS(fromModel); - const conversion = {}; - - const models = Object.keys(graph); - for (let len = models.length, i = 0; i < len; i++) { - const toModel = models[i]; - const node = graph[toModel]; - - if (node.parent === null) { - // No possible conversion, or this node is the source model. - continue; - } - - conversion[toModel] = wrapConversion(toModel, graph); - } - - return conversion; -}; - diff --git a/node_modules/chalk/node_modules/color-name/LICENSE b/node_modules/chalk/node_modules/color-name/LICENSE deleted file mode 100644 index c6b10012..00000000 --- a/node_modules/chalk/node_modules/color-name/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/chalk/node_modules/color-name/README.md b/node_modules/chalk/node_modules/color-name/README.md deleted file mode 100644 index 932b9791..00000000 --- a/node_modules/chalk/node_modules/color-name/README.md +++ /dev/null @@ -1,11 +0,0 @@ -A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. - -[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) - - -```js -var colors = require('color-name'); -colors.red //[255,0,0] -``` - -<a href="LICENSE"><img src="https://upload.wikimedia.org/wikipedia/commons/0/0c/MIT_logo.svg" width="120"/></a> diff --git a/node_modules/chalk/node_modules/color-name/index.js b/node_modules/chalk/node_modules/color-name/index.js deleted file mode 100644 index b7c198a6..00000000 --- a/node_modules/chalk/node_modules/color-name/index.js +++ /dev/null @@ -1,152 +0,0 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; diff --git a/node_modules/chalk/node_modules/color-name/package.json b/node_modules/chalk/node_modules/color-name/package.json deleted file mode 100644 index 30760b74..00000000 --- a/node_modules/chalk/node_modules/color-name/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "_from": "color-name@~1.1.4", - "_id": "color-name@1.1.4", - "_inBundle": false, - "_integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "_location": "/chalk/color-name", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "color-name@~1.1.4", - "name": "color-name", - "escapedName": "color-name", - "rawSpec": "~1.1.4", - "saveSpec": null, - "fetchSpec": "~1.1.4" - }, - "_requiredBy": [ - "/chalk/color-convert" - ], - "_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "_shasum": "c2a09a87acbde69543de6f63fa3995c826c536a2", - "_spec": "color-name@~1.1.4", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/chalk/node_modules/color-convert", - "author": { - "name": "DY", - "email": "dfcreative@gmail.com" - }, - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A list of color names and its values", - "files": [ - "index.js" - ], - "homepage": "https://github.com/colorjs/color-name", - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "license": "MIT", - "main": "index.js", - "name": "color-name", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/colorjs/color-name.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.1.4" -} diff --git a/node_modules/chalk/node_modules/has-flag/index.d.ts b/node_modules/chalk/node_modules/has-flag/index.d.ts deleted file mode 100644 index a0a48c89..00000000 --- a/node_modules/chalk/node_modules/has-flag/index.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** -Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag. - -@param flag - CLI flag to look for. The `--` prefix is optional. -@param argv - CLI arguments. Default: `process.argv`. -@returns Whether the flag exists. - -@example -``` -// $ ts-node foo.ts -f --unicorn --foo=bar -- --rainbow - -// foo.ts -import hasFlag = require('has-flag'); - -hasFlag('unicorn'); -//=> true - -hasFlag('--unicorn'); -//=> true - -hasFlag('f'); -//=> true - -hasFlag('-f'); -//=> true - -hasFlag('foo=bar'); -//=> true - -hasFlag('foo'); -//=> false - -hasFlag('rainbow'); -//=> false -``` -*/ -declare function hasFlag(flag: string, argv?: string[]): boolean; - -export = hasFlag; diff --git a/node_modules/chalk/node_modules/has-flag/index.js b/node_modules/chalk/node_modules/has-flag/index.js deleted file mode 100644 index b6f80b1f..00000000 --- a/node_modules/chalk/node_modules/has-flag/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -module.exports = (flag, argv = process.argv) => { - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf('--'); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); -}; diff --git a/node_modules/chalk/node_modules/has-flag/license b/node_modules/chalk/node_modules/has-flag/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/chalk/node_modules/has-flag/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/chalk/node_modules/has-flag/package.json b/node_modules/chalk/node_modules/has-flag/package.json deleted file mode 100644 index 1e43bb2b..00000000 --- a/node_modules/chalk/node_modules/has-flag/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_from": "has-flag@^4.0.0", - "_id": "has-flag@4.0.0", - "_inBundle": false, - "_integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "_location": "/chalk/has-flag", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "has-flag@^4.0.0", - "name": "has-flag", - "escapedName": "has-flag", - "rawSpec": "^4.0.0", - "saveSpec": null, - "fetchSpec": "^4.0.0" - }, - "_requiredBy": [ - "/chalk/supports-color" - ], - "_resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "_shasum": "944771fd9c81c81265c4d6941860da06bb59479b", - "_spec": "has-flag@^4.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/chalk/node_modules/supports-color", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/has-flag/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Check if argv has a specific flag", - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/sindresorhus/has-flag#readme", - "keywords": [ - "has", - "check", - "detect", - "contains", - "find", - "flag", - "cli", - "command-line", - "argv", - "process", - "arg", - "args", - "argument", - "arguments", - "getopt", - "minimist", - "optimist" - ], - "license": "MIT", - "name": "has-flag", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/has-flag.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "4.0.0" -} diff --git a/node_modules/chalk/node_modules/has-flag/readme.md b/node_modules/chalk/node_modules/has-flag/readme.md deleted file mode 100644 index 3f72dff2..00000000 --- a/node_modules/chalk/node_modules/has-flag/readme.md +++ /dev/null @@ -1,89 +0,0 @@ -# has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag) - -> Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag - -Correctly stops looking after an `--` argument terminator. - ---- - -<div align="center"> - <b> - <a href="https://tidelift.com/subscription/pkg/npm-has-flag?utm_source=npm-has-flag&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> - </b> - <br> - <sub> - Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. - </sub> -</div> - ---- - - -## Install - -``` -$ npm install has-flag -``` - - -## Usage - -```js -// foo.js -const hasFlag = require('has-flag'); - -hasFlag('unicorn'); -//=> true - -hasFlag('--unicorn'); -//=> true - -hasFlag('f'); -//=> true - -hasFlag('-f'); -//=> true - -hasFlag('foo=bar'); -//=> true - -hasFlag('foo'); -//=> false - -hasFlag('rainbow'); -//=> false -``` - -``` -$ node foo.js -f --unicorn --foo=bar -- --rainbow -``` - - -## API - -### hasFlag(flag, [argv]) - -Returns a boolean for whether the flag exists. - -#### flag - -Type: `string` - -CLI flag to look for. The `--` prefix is optional. - -#### argv - -Type: `string[]`<br> -Default: `process.argv` - -CLI arguments. - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/chalk/node_modules/supports-color/browser.js b/node_modules/chalk/node_modules/supports-color/browser.js deleted file mode 100644 index 62afa3a7..00000000 --- a/node_modules/chalk/node_modules/supports-color/browser.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; -module.exports = { - stdout: false, - stderr: false -}; diff --git a/node_modules/chalk/node_modules/supports-color/index.js b/node_modules/chalk/node_modules/supports-color/index.js deleted file mode 100644 index 6fada390..00000000 --- a/node_modules/chalk/node_modules/supports-color/index.js +++ /dev/null @@ -1,135 +0,0 @@ -'use strict'; -const os = require('os'); -const tty = require('tty'); -const hasFlag = require('has-flag'); - -const {env} = process; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false') || - hasFlag('color=never')) { - forceColor = 0; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = 1; -} - -if ('FORCE_COLOR' in env) { - if (env.FORCE_COLOR === 'true') { - forceColor = 1; - } else if (env.FORCE_COLOR === 'false') { - forceColor = 0; - } else { - forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); - } -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(haveStream, streamIsTTY) { - if (forceColor === 0) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (haveStream && !streamIsTTY && forceColor === undefined) { - return 0; - } - - const min = forceColor || 0; - - if (env.TERM === 'dumb') { - return min; - } - - if (process.platform === 'win32') { - // Windows 10 build 10586 is the first Windows release that supports 256 colors. - // Windows 10 build 14931 is the first release that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - - if (env.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - return min; -} - -function getSupportLevel(stream) { - const level = supportsColor(stream, stream && stream.isTTY); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: translateLevel(supportsColor(true, tty.isatty(1))), - stderr: translateLevel(supportsColor(true, tty.isatty(2))) -}; diff --git a/node_modules/chalk/node_modules/supports-color/license b/node_modules/chalk/node_modules/supports-color/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/chalk/node_modules/supports-color/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/chalk/node_modules/supports-color/package.json b/node_modules/chalk/node_modules/supports-color/package.json deleted file mode 100644 index d4c0dc45..00000000 --- a/node_modules/chalk/node_modules/supports-color/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_from": "supports-color@^7.1.0", - "_id": "supports-color@7.2.0", - "_inBundle": false, - "_integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "_location": "/chalk/supports-color", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "supports-color@^7.1.0", - "name": "supports-color", - "escapedName": "supports-color", - "rawSpec": "^7.1.0", - "saveSpec": null, - "fetchSpec": "^7.1.0" - }, - "_requiredBy": [ - "/chalk" - ], - "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "_shasum": "1b7dcdcb32b8138801b3e478ba6a51caa89648da", - "_spec": "supports-color@^7.1.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/chalk", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/chalk/supports-color/issues" - }, - "bundleDependencies": false, - "dependencies": { - "has-flag": "^4.0.0" - }, - "deprecated": false, - "description": "Detect whether a terminal supports color", - "devDependencies": { - "ava": "^1.4.1", - "import-fresh": "^3.0.0", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "browser.js" - ], - "homepage": "https://github.com/chalk/supports-color#readme", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "supports", - "capability", - "detect", - "truecolor", - "16m" - ], - "license": "MIT", - "name": "supports-color", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/supports-color.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "7.2.0" -} diff --git a/node_modules/chalk/node_modules/supports-color/readme.md b/node_modules/chalk/node_modules/supports-color/readme.md deleted file mode 100644 index 36542285..00000000 --- a/node_modules/chalk/node_modules/supports-color/readme.md +++ /dev/null @@ -1,76 +0,0 @@ -# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) - -> Detect whether a terminal supports color - - -## Install - -``` -$ npm install supports-color -``` - - -## Usage - -```js -const supportsColor = require('supports-color'); - -if (supportsColor.stdout) { - console.log('Terminal stdout supports color'); -} - -if (supportsColor.stdout.has256) { - console.log('Terminal stdout supports 256 colors'); -} - -if (supportsColor.stderr.has16m) { - console.log('Terminal stderr supports 16 million colors (truecolor)'); -} -``` - - -## API - -Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported. - -The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag: - -- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors) -- `.level = 2` and `.has256 = true`: 256 color support -- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors) - - -## Info - -It obeys the `--color` and `--no-color` CLI flags. - -For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. - -Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. - - -## Related - -- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - ---- - -<div align="center"> - <b> - <a href="https://tidelift.com/subscription/pkg/npm-supports-color?utm_source=npm-supports-color&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> - </b> - <br> - <sub> - Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. - </sub> -</div> - ---- diff --git a/node_modules/chalk/package.json b/node_modules/chalk/package.json deleted file mode 100644 index 0dec1622..00000000 --- a/node_modules/chalk/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_from": "chalk@^4.0.0", - "_id": "chalk@4.1.1", - "_inBundle": false, - "_integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", - "_location": "/chalk", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "chalk@^4.0.0", - "name": "chalk", - "escapedName": "chalk", - "rawSpec": "^4.0.0", - "saveSpec": null, - "fetchSpec": "^4.0.0" - }, - "_requiredBy": [ - "/pino-pretty" - ], - "_resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "_shasum": "c80b3fab28bf6371e6863325eee67e618b77e6ad", - "_spec": "chalk@^4.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pino-pretty", - "bugs": { - "url": "https://github.com/chalk/chalk/issues" - }, - "bundleDependencies": false, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "deprecated": false, - "description": "Terminal string styling done right", - "devDependencies": { - "ava": "^2.4.0", - "coveralls": "^3.0.7", - "execa": "^4.0.0", - "import-fresh": "^3.1.0", - "matcha": "^0.7.0", - "nyc": "^15.0.0", - "resolve-from": "^5.0.0", - "tsd": "^0.7.4", - "xo": "^0.28.2" - }, - "engines": { - "node": ">=10" - }, - "files": [ - "source", - "index.d.ts" - ], - "funding": "https://github.com/chalk/chalk?sponsor=1", - "homepage": "https://github.com/chalk/chalk#readme", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "str", - "ansi", - "style", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "main": "source", - "name": "chalk", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/chalk.git" - }, - "scripts": { - "bench": "matcha benchmark.js", - "test": "xo && nyc ava && tsd" - }, - "version": "4.1.1", - "xo": { - "rules": { - "unicorn/prefer-string-slice": "off", - "unicorn/prefer-includes": "off", - "@typescript-eslint/member-ordering": "off", - "no-redeclare": "off", - "unicorn/string-content": "off", - "unicorn/better-regex": "off" - } - } -} diff --git a/node_modules/chalk/readme.md b/node_modules/chalk/readme.md deleted file mode 100644 index 85125921..00000000 --- a/node_modules/chalk/readme.md +++ /dev/null @@ -1,335 +0,0 @@ -<h1 align="center"> - <br> - <br> - <img width="320" src="media/logo.svg" alt="Chalk"> - <br> - <br> - <br> -</h1> - -> Terminal string styling done right - -[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![npm dependents](https://badgen.net/npm/dependents/chalk)](https://www.npmjs.com/package/chalk?activeTab=dependents) [![Downloads](https://badgen.net/npm/dt/chalk)](https://www.npmjs.com/package/chalk) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) ![TypeScript-ready](https://img.shields.io/npm/types/chalk.svg) [![run on repl.it](https://repl.it/badge/github/chalk/chalk)](https://repl.it/github/chalk/chalk) - -<img src="https://cdn.jsdelivr.net/gh/chalk/ansi-styles@8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900"> - -<br> - ---- - -<div align="center"> - <p> - <p> - <sup> - Sindre Sorhus' open source work is supported by the community on <a href="https://github.com/sponsors/sindresorhus">GitHub Sponsors</a> and <a href="https://stakes.social/0x44d871aebF0126Bf646753E2C976Aa7e68A66c15">Dev</a> - </sup> - </p> - <sup>Special thanks to:</sup> - <br> - <br> - <a href="https://standardresume.co/tech"> - <img src="https://sindresorhus.com/assets/thanks/standard-resume-logo.svg" width="160"/> - </a> - <br> - <br> - <a href="https://retool.com/?utm_campaign=sindresorhus"> - <img src="https://sindresorhus.com/assets/thanks/retool-logo.svg" width="210"/> - </a> - <br> - <br> - <a href="https://doppler.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=chalk&utm_source=github"> - <div> - <img src="https://dashboard.doppler.com/imgs/logo-long.svg" width="240" alt="Doppler"> - </div> - <b>All your environment variables, in one place</b> - <div> - <span>Stop struggling with scattered API keys, hacking together home-brewed tools,</span> - <br> - <span>and avoiding access controls. Keep your team and servers in sync with Doppler.</span> - </div> - </a> - </p> -</div> - ---- - -<br> - -## Highlights - -- Expressive API -- Highly performant -- Ability to nest styles -- [256/Truecolor color support](#256-and-truecolor-color-support) -- Auto-detects color support -- Doesn't extend `String.prototype` -- Clean and focused -- Actively maintained -- [Used by ~50,000 packages](https://www.npmjs.com/browse/depended/chalk) as of January 1, 2020 - -## Install - -```console -$ npm install chalk -``` - -## Usage - -```js -const chalk = require('chalk'); - -console.log(chalk.blue('Hello world!')); -``` - -Chalk comes with an easy to use composable API where you just chain and nest the styles you want. - -```js -const chalk = require('chalk'); -const log = console.log; - -// Combine styled and normal strings -log(chalk.blue('Hello') + ' World' + chalk.red('!')); - -// Compose multiple styles using the chainable API -log(chalk.blue.bgRed.bold('Hello world!')); - -// Pass in multiple arguments -log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz')); - -// Nest styles -log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!')); - -// Nest styles of the same type even (color, underline, background) -log(chalk.green( - 'I am a green line ' + - chalk.blue.underline.bold('with a blue substring') + - ' that becomes green again!' -)); - -// ES2015 template literal -log(` -CPU: ${chalk.red('90%')} -RAM: ${chalk.green('40%')} -DISK: ${chalk.yellow('70%')} -`); - -// ES2015 tagged template literal -log(chalk` -CPU: {red ${cpu.totalPercent}%} -RAM: {green ${ram.used / ram.total * 100}%} -DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%} -`); - -// Use RGB colors in terminal emulators that support it. -log(chalk.keyword('orange')('Yay for orange colored text!')); -log(chalk.rgb(123, 45, 67).underline('Underlined reddish color')); -log(chalk.hex('#DEADED').bold('Bold gray!')); -``` - -Easily define your own themes: - -```js -const chalk = require('chalk'); - -const error = chalk.bold.red; -const warning = chalk.keyword('orange'); - -console.log(error('Error!')); -console.log(warning('Warning!')); -``` - -Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args): - -```js -const name = 'Sindre'; -console.log(chalk.green('Hello %s'), name); -//=> 'Hello Sindre' -``` - -## API - -### chalk.`<style>[.<style>...](string, [string...])` - -Example: `chalk.red.bold.underline('Hello', 'world');` - -Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`. - -Multiple arguments will be separated by space. - -### chalk.level - -Specifies the level of color support. - -Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers. - -If you need to change this in a reusable module, create a new instance: - -```js -const ctx = new chalk.Instance({level: 0}); -``` - -| Level | Description | -| :---: | :--- | -| `0` | All colors disabled | -| `1` | Basic color support (16 colors) | -| `2` | 256 color support | -| `3` | Truecolor support (16 million colors) | - -### chalk.supportsColor - -Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience. - -Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. - -Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. - -### chalk.stderr and chalk.stderr.supportsColor - -`chalk.stderr` contains a separate instance configured with color support detected for `stderr` stream instead of `stdout`. Override rules from `chalk.supportsColor` apply to this too. `chalk.stderr.supportsColor` is exposed for convenience. - -## Styles - -### Modifiers - -- `reset` - Resets the current color chain. -- `bold` - Make text bold. -- `dim` - Emitting only a small amount of light. -- `italic` - Make text italic. *(Not widely supported)* -- `underline` - Make text underline. *(Not widely supported)* -- `inverse`- Inverse background and foreground colors. -- `hidden` - Prints the text, but makes it invisible. -- `strikethrough` - Puts a horizontal line through the center of the text. *(Not widely supported)* -- `visible`- Prints the text only when Chalk has a color level > 0. Can be useful for things that are purely cosmetic. - -### Colors - -- `black` -- `red` -- `green` -- `yellow` -- `blue` -- `magenta` -- `cyan` -- `white` -- `blackBright` (alias: `gray`, `grey`) -- `redBright` -- `greenBright` -- `yellowBright` -- `blueBright` -- `magentaBright` -- `cyanBright` -- `whiteBright` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` -- `bgBlackBright` (alias: `bgGray`, `bgGrey`) -- `bgRedBright` -- `bgGreenBright` -- `bgYellowBright` -- `bgBlueBright` -- `bgMagentaBright` -- `bgCyanBright` -- `bgWhiteBright` - -## Tagged template literal - -Chalk can be used as a [tagged template literal](https://exploringjs.com/es6/ch_template-literals.html#_tagged-template-literals). - -```js -const chalk = require('chalk'); - -const miles = 18; -const calculateFeet = miles => miles * 5280; - -console.log(chalk` - There are {bold 5280 feet} in a mile. - In {bold ${miles} miles}, there are {green.bold ${calculateFeet(miles)} feet}. -`); -``` - -Blocks are delimited by an opening curly brace (`{`), a style, some content, and a closing curly brace (`}`). - -Template styles are chained exactly like normal Chalk styles. The following three statements are equivalent: - -```js -console.log(chalk.bold.rgb(10, 100, 200)('Hello!')); -console.log(chalk.bold.rgb(10, 100, 200)`Hello!`); -console.log(chalk`{bold.rgb(10,100,200) Hello!}`); -``` - -Note that function styles (`rgb()`, `hsl()`, `keyword()`, etc.) may not contain spaces between parameters. - -All interpolated values (`` chalk`${foo}` ``) are converted to strings via the `.toString()` method. All curly braces (`{` and `}`) in interpolated value strings are escaped. - -## 256 and Truecolor color support - -Chalk supports 256 colors and [Truecolor](https://gist.github.com/XVilka/8346728) (16 million colors) on supported terminal apps. - -Colors are downsampled from 16 million RGB values to an ANSI color format that is supported by the terminal emulator (or by specifying `{level: n}` as a Chalk option). For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red). - -Examples: - -- `chalk.hex('#DEADED').underline('Hello, world!')` -- `chalk.keyword('orange')('Some orange text')` -- `chalk.rgb(15, 100, 204).inverse('Hello!')` - -Background versions of these models are prefixed with `bg` and the first level of the module capitalized (e.g. `keyword` for foreground colors and `bgKeyword` for background colors). - -- `chalk.bgHex('#DEADED').underline('Hello, world!')` -- `chalk.bgKeyword('orange')('Some orange text')` -- `chalk.bgRgb(15, 100, 204).inverse('Hello!')` - -The following color models can be used: - -- [`rgb`](https://en.wikipedia.org/wiki/RGB_color_model) - Example: `chalk.rgb(255, 136, 0).bold('Orange!')` -- [`hex`](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) - Example: `chalk.hex('#FF8800').bold('Orange!')` -- [`keyword`](https://www.w3.org/wiki/CSS/Properties/color/keywords) (CSS keywords) - Example: `chalk.keyword('orange').bold('Orange!')` -- [`hsl`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 100, 50).bold('Orange!')` -- [`hsv`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsv(32, 100, 100).bold('Orange!')` -- [`hwb`](https://en.wikipedia.org/wiki/HWB_color_model) - Example: `chalk.hwb(32, 0, 50).bold('Orange!')` -- [`ansi`](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) - Example: `chalk.ansi(31).bgAnsi(93)('red on yellowBright')` -- [`ansi256`](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) - Example: `chalk.bgAnsi256(194)('Honeydew, more or less')` - -## Windows - -If you're on Windows, do yourself a favor and use [Windows Terminal](https://github.com/microsoft/terminal) instead of `cmd.exe`. - -## Origin story - -[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative. - -## chalk for enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of chalk and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-chalk?utm_source=npm-chalk&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - -## Related - -- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module -- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal -- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color -- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes -- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Strip ANSI escape codes from a stream -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes -- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes -- [color-convert](https://github.com/qix-/color-convert) - Converts colors between different models -- [chalk-animation](https://github.com/bokub/chalk-animation) - Animate strings in the terminal -- [gradient-string](https://github.com/bokub/gradient-string) - Apply color gradients to strings -- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings -- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) diff --git a/node_modules/chalk/source/index.js b/node_modules/chalk/source/index.js deleted file mode 100644 index 75ec6635..00000000 --- a/node_modules/chalk/source/index.js +++ /dev/null @@ -1,229 +0,0 @@ -'use strict'; -const ansiStyles = require('ansi-styles'); -const {stdout: stdoutColor, stderr: stderrColor} = require('supports-color'); -const { - stringReplaceAll, - stringEncaseCRLFWithFirstIndex -} = require('./util'); - -const {isArray} = Array; - -// `supportsColor.level` → `ansiStyles.color[name]` mapping -const levelMapping = [ - 'ansi', - 'ansi', - 'ansi256', - 'ansi16m' -]; - -const styles = Object.create(null); - -const applyOptions = (object, options = {}) => { - if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) { - throw new Error('The `level` option should be an integer from 0 to 3'); - } - - // Detect level if not set manually - const colorLevel = stdoutColor ? stdoutColor.level : 0; - object.level = options.level === undefined ? colorLevel : options.level; -}; - -class ChalkClass { - constructor(options) { - // eslint-disable-next-line no-constructor-return - return chalkFactory(options); - } -} - -const chalkFactory = options => { - const chalk = {}; - applyOptions(chalk, options); - - chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_); - - Object.setPrototypeOf(chalk, Chalk.prototype); - Object.setPrototypeOf(chalk.template, chalk); - - chalk.template.constructor = () => { - throw new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.'); - }; - - chalk.template.Instance = ChalkClass; - - return chalk.template; -}; - -function Chalk(options) { - return chalkFactory(options); -} - -for (const [styleName, style] of Object.entries(ansiStyles)) { - styles[styleName] = { - get() { - const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty); - Object.defineProperty(this, styleName, {value: builder}); - return builder; - } - }; -} - -styles.visible = { - get() { - const builder = createBuilder(this, this._styler, true); - Object.defineProperty(this, 'visible', {value: builder}); - return builder; - } -}; - -const usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256']; - -for (const model of usedModels) { - styles[model] = { - get() { - const {level} = this; - return function (...arguments_) { - const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler); - return createBuilder(this, styler, this._isEmpty); - }; - } - }; -} - -for (const model of usedModels) { - const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const {level} = this; - return function (...arguments_) { - const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler); - return createBuilder(this, styler, this._isEmpty); - }; - } - }; -} - -const proto = Object.defineProperties(() => {}, { - ...styles, - level: { - enumerable: true, - get() { - return this._generator.level; - }, - set(level) { - this._generator.level = level; - } - } -}); - -const createStyler = (open, close, parent) => { - let openAll; - let closeAll; - if (parent === undefined) { - openAll = open; - closeAll = close; - } else { - openAll = parent.openAll + open; - closeAll = close + parent.closeAll; - } - - return { - open, - close, - openAll, - closeAll, - parent - }; -}; - -const createBuilder = (self, _styler, _isEmpty) => { - const builder = (...arguments_) => { - if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) { - // Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}` - return applyStyle(builder, chalkTag(builder, ...arguments_)); - } - - // Single argument is hot path, implicit coercion is faster than anything - // eslint-disable-next-line no-implicit-coercion - return applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' ')); - }; - - // We alter the prototype because we must return a function, but there is - // no way to create a function with a different prototype - Object.setPrototypeOf(builder, proto); - - builder._generator = self; - builder._styler = _styler; - builder._isEmpty = _isEmpty; - - return builder; -}; - -const applyStyle = (self, string) => { - if (self.level <= 0 || !string) { - return self._isEmpty ? '' : string; - } - - let styler = self._styler; - - if (styler === undefined) { - return string; - } - - const {openAll, closeAll} = styler; - if (string.indexOf('\u001B') !== -1) { - while (styler !== undefined) { - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - string = stringReplaceAll(string, styler.close, styler.open); - - styler = styler.parent; - } - } - - // We can move both next actions out of loop, because remaining actions in loop won't have - // any/visible effect on parts we add here. Close the styling before a linebreak and reopen - // after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92 - const lfIndex = string.indexOf('\n'); - if (lfIndex !== -1) { - string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); - } - - return openAll + string + closeAll; -}; - -let template; -const chalkTag = (chalk, ...strings) => { - const [firstString] = strings; - - if (!isArray(firstString) || !isArray(firstString.raw)) { - // If chalk() was called by itself or with a string, - // return the string itself as a string. - return strings.join(' '); - } - - const arguments_ = strings.slice(1); - const parts = [firstString.raw[0]]; - - for (let i = 1; i < firstString.length; i++) { - parts.push( - String(arguments_[i - 1]).replace(/[{}\\]/g, '\\$&'), - String(firstString.raw[i]) - ); - } - - if (template === undefined) { - template = require('./templates'); - } - - return template(chalk, parts.join('')); -}; - -Object.defineProperties(Chalk.prototype, styles); - -const chalk = Chalk(); // eslint-disable-line new-cap -chalk.supportsColor = stdoutColor; -chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap -chalk.stderr.supportsColor = stderrColor; - -module.exports = chalk; diff --git a/node_modules/chalk/source/templates.js b/node_modules/chalk/source/templates.js deleted file mode 100644 index b130949d..00000000 --- a/node_modules/chalk/source/templates.js +++ /dev/null @@ -1,134 +0,0 @@ -'use strict'; -const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; -const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; -const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; -const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi; - -const ESCAPES = new Map([ - ['n', '\n'], - ['r', '\r'], - ['t', '\t'], - ['b', '\b'], - ['f', '\f'], - ['v', '\v'], - ['0', '\0'], - ['\\', '\\'], - ['e', '\u001B'], - ['a', '\u0007'] -]); - -function unescape(c) { - const u = c[0] === 'u'; - const bracket = c[1] === '{'; - - if ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) { - return String.fromCharCode(parseInt(c.slice(1), 16)); - } - - if (u && bracket) { - return String.fromCodePoint(parseInt(c.slice(2, -1), 16)); - } - - return ESCAPES.get(c) || c; -} - -function parseArguments(name, arguments_) { - const results = []; - const chunks = arguments_.trim().split(/\s*,\s*/g); - let matches; - - for (const chunk of chunks) { - const number = Number(chunk); - if (!Number.isNaN(number)) { - results.push(number); - } else if ((matches = chunk.match(STRING_REGEX))) { - results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character)); - } else { - throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); - } - } - - return results; -} - -function parseStyle(style) { - STYLE_REGEX.lastIndex = 0; - - const results = []; - let matches; - - while ((matches = STYLE_REGEX.exec(style)) !== null) { - const name = matches[1]; - - if (matches[2]) { - const args = parseArguments(name, matches[2]); - results.push([name].concat(args)); - } else { - results.push([name]); - } - } - - return results; -} - -function buildStyle(chalk, styles) { - const enabled = {}; - - for (const layer of styles) { - for (const style of layer.styles) { - enabled[style[0]] = layer.inverse ? null : style.slice(1); - } - } - - let current = chalk; - for (const [styleName, styles] of Object.entries(enabled)) { - if (!Array.isArray(styles)) { - continue; - } - - if (!(styleName in current)) { - throw new Error(`Unknown Chalk style: ${styleName}`); - } - - current = styles.length > 0 ? current[styleName](...styles) : current[styleName]; - } - - return current; -} - -module.exports = (chalk, temporary) => { - const styles = []; - const chunks = []; - let chunk = []; - - // eslint-disable-next-line max-params - temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => { - if (escapeCharacter) { - chunk.push(unescape(escapeCharacter)); - } else if (style) { - const string = chunk.join(''); - chunk = []; - chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string)); - styles.push({inverse, styles: parseStyle(style)}); - } else if (close) { - if (styles.length === 0) { - throw new Error('Found extraneous } in Chalk template literal'); - } - - chunks.push(buildStyle(chalk, styles)(chunk.join(''))); - chunk = []; - styles.pop(); - } else { - chunk.push(character); - } - }); - - chunks.push(chunk.join('')); - - if (styles.length > 0) { - const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; - throw new Error(errMessage); - } - - return chunks.join(''); -}; diff --git a/node_modules/chalk/source/util.js b/node_modules/chalk/source/util.js deleted file mode 100644 index ca466fd4..00000000 --- a/node_modules/chalk/source/util.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -const stringReplaceAll = (string, substring, replacer) => { - let index = string.indexOf(substring); - if (index === -1) { - return string; - } - - const substringLength = substring.length; - let endIndex = 0; - let returnValue = ''; - do { - returnValue += string.substr(endIndex, index - endIndex) + substring + replacer; - endIndex = index + substringLength; - index = string.indexOf(substring, endIndex); - } while (index !== -1); - - returnValue += string.substr(endIndex); - return returnValue; -}; - -const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => { - let endIndex = 0; - let returnValue = ''; - do { - const gotCR = string[index - 1] === '\r'; - returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\r\n' : '\n') + postfix; - endIndex = index + 1; - index = string.indexOf('\n', endIndex); - } while (index !== -1); - - returnValue += string.substr(endIndex); - return returnValue; -}; - -module.exports = { - stringReplaceAll, - stringEncaseCRLFWithFirstIndex -}; diff --git a/node_modules/clean-git-ref/README.md b/node_modules/clean-git-ref/README.md deleted file mode 100644 index e9fa4f32..00000000 --- a/node_modules/clean-git-ref/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# clean-git-ref - -[![Build Status](https://travis-ci.org/TheSavior/clean-git-ref.svg)](https://travis-ci.org/TheSavior/clean-git-ref) - -Clean an input string into a usable git ref. - -For more reference, read https://git-scm.com/docs/git-check-ref-format - -## Installation - -```sh -$ npm install clean-git-ref --save-dev -``` - -## API Usage - -### clean(string input) -> string output -``` -var cleanGitRef = require('clean-git-ref'); - -assert.strictEqual(cleanGitRef.clean('bad git ref formats/'), 'bad-git-ref-formats'); -``` diff --git a/node_modules/clean-git-ref/lib/index.js b/node_modules/clean-git-ref/lib/index.js deleted file mode 100644 index b44fd092..00000000 --- a/node_modules/clean-git-ref/lib/index.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -function escapeRegExp(string) { - return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string -} - -function replaceAll(str, search, replacement) { - search = search instanceof RegExp ? search : new RegExp(escapeRegExp(search), 'g'); - - return str.replace(search, replacement); -} - -var CleanGitRef = { - clean: function clean(value) { - if (typeof value !== 'string') { - throw new Error('Expected a string, received: ' + value); - } - - value = replaceAll(value, './', '/'); - value = replaceAll(value, '..', '.'); - value = replaceAll(value, ' ', '-'); - value = replaceAll(value, /^[~^:?*\\\-]/g, ''); - value = replaceAll(value, /[~^:?*\\]/g, '-'); - value = replaceAll(value, /[~^:?*\\\-]$/g, ''); - value = replaceAll(value, '@{', '-'); - value = replaceAll(value, /\.$/g, ''); - value = replaceAll(value, /\/$/g, ''); - value = replaceAll(value, /\.lock$/g, ''); - return value; - } -}; - -module.exports = CleanGitRef; \ No newline at end of file diff --git a/node_modules/clean-git-ref/package.json b/node_modules/clean-git-ref/package.json deleted file mode 100644 index 582f03fb..00000000 --- a/node_modules/clean-git-ref/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "clean-git-ref@^2.0.1", - "_id": "clean-git-ref@2.0.1", - "_inBundle": false, - "_integrity": "sha512-bLSptAy2P0s6hU4PzuIMKmMJJSE6gLXGH1cntDu7bWJUksvuM+7ReOK61mozULErYvP6a15rnYl0zFDef+pyPw==", - "_location": "/clean-git-ref", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "clean-git-ref@^2.0.1", - "name": "clean-git-ref", - "escapedName": "clean-git-ref", - "rawSpec": "^2.0.1", - "saveSpec": null, - "fetchSpec": "^2.0.1" - }, - "_requiredBy": [ - "/isomorphic-git" - ], - "_resolved": "https://registry.npmjs.org/clean-git-ref/-/clean-git-ref-2.0.1.tgz", - "_shasum": "dcc0ca093b90e527e67adb5a5e55b1af6816dcd9", - "_spec": "clean-git-ref@^2.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/isomorphic-git", - "author": { - "name": "Eli White", - "email": "github@eli-white.com" - }, - "bugs": { - "url": "https://github.com/TheSavior/clean-git-ref/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Clean an input string into a usable git ref", - "devDependencies": { - "babel-cli": "^6.6.5", - "babel-eslint": "^6.0.2", - "babel-preset-es2015": "^6.6.0", - "babel-register": "^6.7.2", - "chai": "^3.5.0", - "eslint": "^3.0.0", - "jscs": "^3.0.6", - "mocha": "^3.0.1", - "wealthfront-javascript": "^3.0.1" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/TheSavior/clean-git-ref#readme", - "license": "Apache-2.0", - "main": "lib/index.js", - "name": "clean-git-ref", - "repository": { - "type": "git", - "url": "git+https://github.com/TheSavior/clean-git-ref.git" - }, - "scripts": { - "build": "babel src -d lib", - "posttest": "npm run build", - "pretest": "npm run style", - "style": "eslint src test && jscs src test", - "test": "mocha" - }, - "version": "2.0.1" -} diff --git a/node_modules/clone-buffer/LICENSE b/node_modules/clone-buffer/LICENSE deleted file mode 100644 index fa16a894..00000000 --- a/node_modules/clone-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/clone-buffer/README.md b/node_modules/clone-buffer/README.md deleted file mode 100644 index 51c8a8d2..00000000 --- a/node_modules/clone-buffer/README.md +++ /dev/null @@ -1,47 +0,0 @@ -<p align="center"> - <a href="http://gulpjs.com"> - <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png"> - </a> -</p> - -# clone-buffer - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] - -Easier Buffer cloning in node. - -## Example - -```js -var cloneBuffer = require('clone-buffer'); - -var buffer = new Buffer('test'); -var cloned = cloneBuffer(buffer); -// buffer !== cloned -``` - -## API - -### `cloneBuffer(buffer)` - -Takes a `Buffer` object and returns a clone. Throws if a non-`Buffer` is passed. - -## License - -MIT - -[downloads-image]: http://img.shields.io/npm/dm/clone-buffer.svg -[npm-url]: https://npmjs.org/package/clone-buffer -[npm-image]: http://img.shields.io/npm/v/clone-buffer.svg - -[travis-url]: https://travis-ci.org/gulpjs/clone-buffer -[travis-image]: http://img.shields.io/travis/gulpjs/clone-buffer.svg?label=travis-ci - -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/clone-buffer -[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/clone-buffer.svg?label=appveyor - -[coveralls-url]: https://coveralls.io/r/gulpjs/clone-buffer -[coveralls-image]: http://img.shields.io/coveralls/gulpjs/clone-buffer/master.svg - -[gitter-url]: https://gitter.im/gulpjs/gulp -[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png diff --git a/node_modules/clone-buffer/index.js b/node_modules/clone-buffer/index.js deleted file mode 100644 index eb3837e6..00000000 --- a/node_modules/clone-buffer/index.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var Buffer = require('buffer').Buffer; - -function hasFrom() { - // Node versions 5.x below 5.10 seem to have a `from` method - // However, it doesn't clone Buffers - // Luckily, it reports as `false` to hasOwnProperty - return (Buffer.hasOwnProperty('from') && typeof Buffer.from === 'function'); -} - -function cloneBuffer(buf) { - if (!Buffer.isBuffer(buf)) { - throw new Error('Can only clone Buffer.'); - } - - if (hasFrom()) { - return Buffer.from(buf); - } - - var copy = new Buffer(buf.length); - buf.copy(copy); - return copy; -} - -cloneBuffer.hasFrom = hasFrom; - -module.exports = cloneBuffer; diff --git a/node_modules/clone-buffer/package.json b/node_modules/clone-buffer/package.json deleted file mode 100644 index bb54e529..00000000 --- a/node_modules/clone-buffer/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_from": "clone-buffer@^1.0.0", - "_id": "clone-buffer@1.0.0", - "_inBundle": false, - "_integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", - "_location": "/clone-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "clone-buffer@^1.0.0", - "name": "clone-buffer", - "escapedName": "clone-buffer", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/vinyl" - ], - "_resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "_shasum": "e3e25b207ac4e701af721e2cb5a16792cac3dc58", - "_spec": "clone-buffer@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl", - "author": { - "name": "Gulp Team", - "email": "team@gulpjs.com", - "url": "http://gulpjs.com/" - }, - "bugs": { - "url": "https://github.com/gulpjs/clone-buffer/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "Easier Buffer cloning in node.", - "devDependencies": { - "eslint": "^1.7.3", - "eslint-config-gulp": "^2.0.0", - "expect": "^1.19.0", - "istanbul": "^0.4.3", - "istanbul-coveralls": "^1.0.3", - "jscs": "^2.3.5", - "jscs-preset-gulp": "^1.0.0", - "mocha": "^2.4.5" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "LICENSE", - "index.js" - ], - "homepage": "https://github.com/gulpjs/clone-buffer#readme", - "keywords": [ - "buffer", - "clone", - "from", - "copy" - ], - "license": "MIT", - "main": "index.js", - "name": "clone-buffer", - "repository": { - "type": "git", - "url": "git+https://github.com/gulpjs/clone-buffer.git" - }, - "scripts": { - "cover": "istanbul cover _mocha --report lcovonly", - "coveralls": "npm run cover && istanbul-coveralls", - "lint": "eslint . && jscs index.js test/", - "pretest": "npm run lint", - "test": "mocha --async-only" - }, - "version": "1.0.0" -} diff --git a/node_modules/clone-stats/LICENSE.md b/node_modules/clone-stats/LICENSE.md deleted file mode 100644 index 146cb32a..00000000 --- a/node_modules/clone-stats/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -## The MIT License (MIT) ## - -Copyright (c) 2014 Hugh Kennedy - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/clone-stats/README.md b/node_modules/clone-stats/README.md deleted file mode 100644 index 8b12b6fa..00000000 --- a/node_modules/clone-stats/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) # - -Safely clone node's -[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without -losing their class methods, i.e. `stat.isDirectory()` and co. - -## Usage ## - -[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats) - -### `copy = require('clone-stats')(stat)` ### - -Returns a clone of the original `fs.Stats` instance (`stat`). - -## License ## - -MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details. diff --git a/node_modules/clone-stats/index.js b/node_modules/clone-stats/index.js deleted file mode 100644 index e797cfe6..00000000 --- a/node_modules/clone-stats/index.js +++ /dev/null @@ -1,13 +0,0 @@ -var Stat = require('fs').Stats - -module.exports = cloneStats - -function cloneStats(stats) { - var replacement = new Stat - - Object.keys(stats).forEach(function(key) { - replacement[key] = stats[key] - }) - - return replacement -} diff --git a/node_modules/clone-stats/package.json b/node_modules/clone-stats/package.json deleted file mode 100644 index 035d3f0c..00000000 --- a/node_modules/clone-stats/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "_from": "clone-stats@^1.0.0", - "_id": "clone-stats@1.0.0", - "_inBundle": false, - "_integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", - "_location": "/clone-stats", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "clone-stats@^1.0.0", - "name": "clone-stats", - "escapedName": "clone-stats", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/vinyl" - ], - "_resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "_shasum": "b3782dff8bb5474e18b9b6bf0fdfe782f8777680", - "_spec": "clone-stats@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl", - "author": { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com", - "url": "http://hughsk.io/" - }, - "browser": "index.js", - "bugs": { - "url": "https://github.com/hughsk/clone-stats/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Safely clone node's fs.Stats instances without losing their class methods", - "devDependencies": { - "tape": "~2.3.2" - }, - "homepage": "https://github.com/hughsk/clone-stats", - "keywords": [ - "stats", - "fs", - "clone", - "copy", - "prototype" - ], - "license": "MIT", - "main": "index.js", - "name": "clone-stats", - "repository": { - "type": "git", - "url": "git://github.com/hughsk/clone-stats.git" - }, - "scripts": { - "test": "node test" - }, - "version": "1.0.0" -} diff --git a/node_modules/clone-stats/test.js b/node_modules/clone-stats/test.js deleted file mode 100644 index e4bb2814..00000000 --- a/node_modules/clone-stats/test.js +++ /dev/null @@ -1,36 +0,0 @@ -var test = require('tape') -var clone = require('./') -var fs = require('fs') - -test('file', function(t) { - compare(t, fs.statSync(__filename)) - t.end() -}) - -test('directory', function(t) { - compare(t, fs.statSync(__dirname)) - t.end() -}) - -function compare(t, stat) { - var copy = clone(stat) - - t.deepEqual(stat, copy, 'clone has equal properties') - t.ok(stat instanceof fs.Stats, 'original is an fs.Stat') - t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat') - - ;['isDirectory' - , 'isFile' - , 'isBlockDevice' - , 'isCharacterDevice' - , 'isSymbolicLink' - , 'isFIFO' - , 'isSocket' - ].forEach(function(method) { - t.equal( - stat[method].call(stat) - , copy[method].call(copy) - , 'equal value for stat.' + method + '()' - ) - }) -} diff --git a/node_modules/clone/.npmignore b/node_modules/clone/.npmignore deleted file mode 100644 index 2ff84f0a..00000000 --- a/node_modules/clone/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -/node_modules/ -/test.js -/.travis.yml -*.html diff --git a/node_modules/clone/LICENSE b/node_modules/clone/LICENSE deleted file mode 100644 index cc3c87bc..00000000 --- a/node_modules/clone/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright © 2011-2015 Paul Vorbach <paul@vorba.ch> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the “Software”), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/clone/README.md b/node_modules/clone/README.md deleted file mode 100644 index 207e60a2..00000000 --- a/node_modules/clone/README.md +++ /dev/null @@ -1,194 +0,0 @@ -# clone - -[![build status](https://secure.travis-ci.org/pvorb/clone.svg)](http://travis-ci.org/pvorb/clone) [![downloads](https://img.shields.io/npm/dt/clone.svg)](http://npm-stat.com/charts.html?package=clone) - -offers foolproof _deep cloning_ of objects, arrays, numbers, strings, maps, -sets, promises, etc. in JavaScript. - -**XSS vulnerability detected** - - -## Installation - - npm install clone - -(It also works with browserify, ender or standalone. You may want to use the -option `noParse` in browserify to reduce the resulting file size, since usually -`Buffer`s are not needed in browsers.) - - -## Example - -~~~ javascript -var clone = require('clone'); - -var a, b; - -a = { foo: { bar: 'baz' } }; // initial value of a - -b = clone(a); // clone a -> b -a.foo.bar = 'foo'; // change a - -console.log(a); // show a -console.log(b); // show b -~~~ - -This will print: - -~~~ javascript -{ foo: { bar: 'foo' } } -{ foo: { bar: 'baz' } } -~~~ - -**clone** masters cloning simple objects (even with custom prototype), arrays, -Date objects, and RegExp objects. Everything is cloned recursively, so that you -can clone dates in arrays in objects, for example. - - -## API - -`clone(val, circular, depth)` - - * `val` -- the value that you want to clone, any type allowed - * `circular` -- boolean - - Call `clone` with `circular` set to `false` if you are certain that `obj` - contains no circular references. This will give better performance if - needed. There is no error if `undefined` or `null` is passed as `obj`. - * `depth` -- depth to which the object is to be cloned (optional, - defaults to infinity) - * `prototype` -- sets the prototype to be used when cloning an object. - (optional, defaults to parent prototype). - * `includeNonEnumerable` -- set to `true` if the non-enumerable properties - should be cloned as well. Non-enumerable properties on the prototype chain - will be ignored. (optional, defaults to `false`) - -`clone.clonePrototype(obj)` - - * `obj` -- the object that you want to clone - -Does a prototype clone as -[described by Oran Looney](http://oranlooney.com/functional-javascript/). - - -## Circular References - -~~~ javascript -var a, b; - -a = { hello: 'world' }; - -a.myself = a; -b = clone(a); - -console.log(b); -~~~ - -This will print: - -~~~ javascript -{ hello: "world", myself: [Circular] } -~~~ - -So, `b.myself` points to `b`, not `a`. Neat! - - -## Test - - npm test - - -## Changelog - -### v2.1.2 - -#### 2018-03-21 - - - Use `Buffer.allocUnsafe()` on Node >= 4.5.0 (contributed by @ChALkeR) - -### v2.1.1 - -#### 2017-03-09 - - - Fix build badge in README - - Add support for cloning Maps and Sets on Internet Explorer - -### v2.1.0 - -#### 2016-11-22 - - - Add support for cloning Errors - - Exclude non-enumerable symbol-named object properties from cloning - - Add option to include non-enumerable own properties of objects - -### v2.0.0 - -#### 2016-09-28 - - - Add support for cloning ES6 Maps, Sets, Promises, and Symbols - -### v1.0.3 - -#### 2017-11-08 - - - Close XSS vulnerability in the NPM package, which included the file - `test-apart-ctx.html`. This vulnerability was disclosed by Juho Nurminen of - 2NS - Second Nature Security. - -### v1.0.2 (deprecated) - -#### 2015-03-25 - - - Fix call on getRegExpFlags - - Refactor utilities - - Refactor test suite - -### v1.0.1 (deprecated) - -#### 2015-03-04 - - - Fix nodeunit version - - Directly call getRegExpFlags - -### v1.0.0 (deprecated) - -#### 2015-02-10 - - - Improve browser support - - Improve browser testability - - Move helper methods to private namespace - -## Caveat - -Some special objects like a socket or `process.stdout`/`stderr` are known to not -be cloneable. If you find other objects that cannot be cloned, please [open an -issue](https://github.com/pvorb/clone/issues/new). - - -## Bugs and Issues - -If you encounter any bugs or issues, feel free to [open an issue at -github](https://github.com/pvorb/clone/issues) or send me an email to -<paul@vorba.ch>. I also always like to hear from you, if you’re using my code. - -## License - -Copyright © 2011-2016 [Paul Vorbach](https://paul.vorba.ch/) and -[contributors](https://github.com/pvorb/clone/graphs/contributors). - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the “Software”), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/clone/clone.iml b/node_modules/clone/clone.iml deleted file mode 100644 index 30de8aee..00000000 --- a/node_modules/clone/clone.iml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<module type="WEB_MODULE" version="4"> - <component name="NewModuleRootManager" inherit-compiler-output="true"> - <exclude-output /> - <content url="file://$MODULE_DIR$" /> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="library" name="clone node_modules" level="project" /> - </component> -</module> \ No newline at end of file diff --git a/node_modules/clone/clone.js b/node_modules/clone/clone.js deleted file mode 100644 index 3fa5fad6..00000000 --- a/node_modules/clone/clone.js +++ /dev/null @@ -1,257 +0,0 @@ -var clone = (function() { -'use strict'; - -function _instanceof(obj, type) { - return type != null && obj instanceof type; -} - -var nativeMap; -try { - nativeMap = Map; -} catch(_) { - // maybe a reference error because no `Map`. Give it a dummy value that no - // value will ever be an instanceof. - nativeMap = function() {}; -} - -var nativeSet; -try { - nativeSet = Set; -} catch(_) { - nativeSet = function() {}; -} - -var nativePromise; -try { - nativePromise = Promise; -} catch(_) { - nativePromise = function() {}; -} - -/** - * Clones (copies) an Object using deep copying. - * - * This function supports circular references by default, but if you are certain - * there are no circular references in your object, you can save some CPU time - * by calling clone(obj, false). - * - * Caution: if `circular` is false and `parent` contains circular references, - * your program may enter an infinite loop and crash. - * - * @param `parent` - the object to be cloned - * @param `circular` - set to true if the object to be cloned may contain - * circular references. (optional - true by default) - * @param `depth` - set to a number if the object is only to be cloned to - * a particular depth. (optional - defaults to Infinity) - * @param `prototype` - sets the prototype to be used when cloning an object. - * (optional - defaults to parent prototype). - * @param `includeNonEnumerable` - set to true if the non-enumerable properties - * should be cloned as well. Non-enumerable properties on the prototype - * chain will be ignored. (optional - false by default) -*/ -function clone(parent, circular, depth, prototype, includeNonEnumerable) { - if (typeof circular === 'object') { - depth = circular.depth; - prototype = circular.prototype; - includeNonEnumerable = circular.includeNonEnumerable; - circular = circular.circular; - } - // maintain two arrays for circular references, where corresponding parents - // and children have the same index - var allParents = []; - var allChildren = []; - - var useBuffer = typeof Buffer != 'undefined'; - - if (typeof circular == 'undefined') - circular = true; - - if (typeof depth == 'undefined') - depth = Infinity; - - // recurse this function so we don't reset allParents and allChildren - function _clone(parent, depth) { - // cloning null always returns null - if (parent === null) - return null; - - if (depth === 0) - return parent; - - var child; - var proto; - if (typeof parent != 'object') { - return parent; - } - - if (_instanceof(parent, nativeMap)) { - child = new nativeMap(); - } else if (_instanceof(parent, nativeSet)) { - child = new nativeSet(); - } else if (_instanceof(parent, nativePromise)) { - child = new nativePromise(function (resolve, reject) { - parent.then(function(value) { - resolve(_clone(value, depth - 1)); - }, function(err) { - reject(_clone(err, depth - 1)); - }); - }); - } else if (clone.__isArray(parent)) { - child = []; - } else if (clone.__isRegExp(parent)) { - child = new RegExp(parent.source, __getRegExpFlags(parent)); - if (parent.lastIndex) child.lastIndex = parent.lastIndex; - } else if (clone.__isDate(parent)) { - child = new Date(parent.getTime()); - } else if (useBuffer && Buffer.isBuffer(parent)) { - if (Buffer.allocUnsafe) { - // Node.js >= 4.5.0 - child = Buffer.allocUnsafe(parent.length); - } else { - // Older Node.js versions - child = new Buffer(parent.length); - } - parent.copy(child); - return child; - } else if (_instanceof(parent, Error)) { - child = Object.create(parent); - } else { - if (typeof prototype == 'undefined') { - proto = Object.getPrototypeOf(parent); - child = Object.create(proto); - } - else { - child = Object.create(prototype); - proto = prototype; - } - } - - if (circular) { - var index = allParents.indexOf(parent); - - if (index != -1) { - return allChildren[index]; - } - allParents.push(parent); - allChildren.push(child); - } - - if (_instanceof(parent, nativeMap)) { - parent.forEach(function(value, key) { - var keyChild = _clone(key, depth - 1); - var valueChild = _clone(value, depth - 1); - child.set(keyChild, valueChild); - }); - } - if (_instanceof(parent, nativeSet)) { - parent.forEach(function(value) { - var entryChild = _clone(value, depth - 1); - child.add(entryChild); - }); - } - - for (var i in parent) { - var attrs; - if (proto) { - attrs = Object.getOwnPropertyDescriptor(proto, i); - } - - if (attrs && attrs.set == null) { - continue; - } - child[i] = _clone(parent[i], depth - 1); - } - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(parent); - for (var i = 0; i < symbols.length; i++) { - // Don't need to worry about cloning a symbol because it is a primitive, - // like a number or string. - var symbol = symbols[i]; - var descriptor = Object.getOwnPropertyDescriptor(parent, symbol); - if (descriptor && !descriptor.enumerable && !includeNonEnumerable) { - continue; - } - child[symbol] = _clone(parent[symbol], depth - 1); - if (!descriptor.enumerable) { - Object.defineProperty(child, symbol, { - enumerable: false - }); - } - } - } - - if (includeNonEnumerable) { - var allPropertyNames = Object.getOwnPropertyNames(parent); - for (var i = 0; i < allPropertyNames.length; i++) { - var propertyName = allPropertyNames[i]; - var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName); - if (descriptor && descriptor.enumerable) { - continue; - } - child[propertyName] = _clone(parent[propertyName], depth - 1); - Object.defineProperty(child, propertyName, { - enumerable: false - }); - } - } - - return child; - } - - return _clone(parent, depth); -} - -/** - * Simple flat clone using prototype, accepts only objects, usefull for property - * override on FLAT configuration object (no nested props). - * - * USE WITH CAUTION! This may not behave as you wish if you do not know how this - * works. - */ -clone.clonePrototype = function clonePrototype(parent) { - if (parent === null) - return null; - - var c = function () {}; - c.prototype = parent; - return new c(); -}; - -// private utility functions - -function __objToStr(o) { - return Object.prototype.toString.call(o); -} -clone.__objToStr = __objToStr; - -function __isDate(o) { - return typeof o === 'object' && __objToStr(o) === '[object Date]'; -} -clone.__isDate = __isDate; - -function __isArray(o) { - return typeof o === 'object' && __objToStr(o) === '[object Array]'; -} -clone.__isArray = __isArray; - -function __isRegExp(o) { - return typeof o === 'object' && __objToStr(o) === '[object RegExp]'; -} -clone.__isRegExp = __isRegExp; - -function __getRegExpFlags(re) { - var flags = ''; - if (re.global) flags += 'g'; - if (re.ignoreCase) flags += 'i'; - if (re.multiline) flags += 'm'; - return flags; -} -clone.__getRegExpFlags = __getRegExpFlags; - -return clone; -})(); - -if (typeof module === 'object' && module.exports) { - module.exports = clone; -} diff --git a/node_modules/clone/package.json b/node_modules/clone/package.json deleted file mode 100644 index c5a2abc6..00000000 --- a/node_modules/clone/package.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "_from": "clone@^2.1.1", - "_id": "clone@2.1.2", - "_inBundle": false, - "_integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "_location": "/clone", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "clone@^2.1.1", - "name": "clone", - "escapedName": "clone", - "rawSpec": "^2.1.1", - "saveSpec": null, - "fetchSpec": "^2.1.1" - }, - "_requiredBy": [ - "/vinyl" - ], - "_resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "_shasum": "1b7f4b9f591f1e8f83670401600345a02887435f", - "_spec": "clone@^2.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl", - "author": { - "name": "Paul Vorbach", - "email": "paul@vorba.ch", - "url": "http://paul.vorba.ch/" - }, - "bugs": { - "url": "https://github.com/pvorb/node-clone/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Blake Miner", - "email": "miner.blake@gmail.com", - "url": "http://www.blakeminer.com/" - }, - { - "name": "Tian You", - "email": "axqd001@gmail.com", - "url": "http://blog.axqd.net/" - }, - { - "name": "George Stagas", - "email": "gstagas@gmail.com", - "url": "http://stagas.com/" - }, - { - "name": "Tobiasz Cudnik", - "email": "tobiasz.cudnik@gmail.com", - "url": "https://github.com/TobiaszCudnik" - }, - { - "name": "Pavel Lang", - "email": "langpavel@phpskelet.org", - "url": "https://github.com/langpavel" - }, - { - "name": "Dan MacTough", - "url": "http://yabfog.com/" - }, - { - "name": "w1nk", - "url": "https://github.com/w1nk" - }, - { - "name": "Hugh Kennedy", - "url": "http://twitter.com/hughskennedy" - }, - { - "name": "Dustin Diaz", - "url": "http://dustindiaz.com" - }, - { - "name": "Ilya Shaisultanov", - "url": "https://github.com/diversario" - }, - { - "name": "Nathan MacInnes", - "email": "nathan@macinn.es", - "url": "http://macinn.es/" - }, - { - "name": "Benjamin E. Coe", - "email": "ben@npmjs.com", - "url": "https://twitter.com/benjamincoe" - }, - { - "name": "Nathan Zadoks", - "url": "https://github.com/nathan7" - }, - { - "name": "Róbert Oroszi", - "email": "robert+gh@oroszi.net", - "url": "https://github.com/oroce" - }, - { - "name": "Aurélio A. Heckert", - "url": "http://softwarelivre.org/aurium" - }, - { - "name": "Guy Ellis", - "url": "http://www.guyellisrocks.com/" - }, - { - "name": "fscherwi", - "url": "https://fscherwi.github.io" - }, - { - "name": "rictic", - "url": "https://github.com/rictic" - }, - { - "name": "Martin Jurča", - "url": "https://github.com/jurca" - }, - { - "name": "Misery Lee", - "email": "miserylee@foxmail.com", - "url": "https://github.com/miserylee" - }, - { - "name": "Clemens Wolff", - "url": "https://github.com/c-w" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "deep cloning of objects and arrays", - "devDependencies": { - "nodeunit": "~0.9.0" - }, - "engines": { - "node": ">=0.8" - }, - "homepage": "https://github.com/pvorb/node-clone#readme", - "license": "MIT", - "main": "clone.js", - "name": "clone", - "optionalDependencies": {}, - "repository": { - "type": "git", - "url": "git://github.com/pvorb/node-clone.git" - }, - "scripts": { - "test": "nodeunit test.js" - }, - "tags": [ - "clone", - "object", - "array", - "function", - "date" - ], - "version": "2.1.2" -} diff --git a/node_modules/cloneable-readable/.travis.yml b/node_modules/cloneable-readable/.travis.yml deleted file mode 100644 index c352b0e6..00000000 --- a/node_modules/cloneable-readable/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: node_js -sudo: false -node_js: - - "0.10" - - "0.12" - - "4" - - "5" - - "6" - - "7" - - "8" - - "9" - - "10" - - "12" diff --git a/node_modules/cloneable-readable/LICENSE b/node_modules/cloneable-readable/LICENSE deleted file mode 100644 index ecf62450..00000000 --- a/node_modules/cloneable-readable/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Matteo Collina - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/cloneable-readable/README.md b/node_modules/cloneable-readable/README.md deleted file mode 100644 index 17b25a24..00000000 --- a/node_modules/cloneable-readable/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# cloneable-readable - -[![Greenkeeper badge](https://badges.greenkeeper.io/mcollina/cloneable-readable.svg)](https://greenkeeper.io/) - -[![Build Status](https://travis-ci.org/mcollina/cloneable-readable.svg?branch=master)](https://travis-ci.org/mcollina/cloneable-readable) - -Clone a Readable stream, safely. - -```js -'use strict' - -var cloneable = require('cloneable-readable') -var fs = require('fs') -var pump = require('pump') - -var stream = cloneable(fs.createReadStream('./package.json')) - -pump(stream.clone(), fs.createWriteStream('./out1')) - -// simulate some asynchronicity -setImmediate(function () { - pump(stream, fs.createWriteStream('./out2')) -}) -``` - -**cloneable-readable** automatically handles `objectMode: true`. - -This module comes out of an healthy discussion on the 'right' way to -clone a Readable in https://github.com/gulpjs/vinyl/issues/85 -and https://github.com/nodejs/readable-stream/issues/202. This is my take. - -**YOU MUST PIPE ALL CLONES TO START THE FLOW** - -You can also attach `'data'` and `'readable'` events to them. - -## API - -### cloneable(stream) - -Create a `Cloneable` stream. -A Cloneable has a `clone()` method to create more clones. -All clones must be resumed/piped to start the flow. - -### cloneable.isCloneable(stream) - -Check if `stream` needs to be wrapped in a `Cloneable` or not. - -## Acknowledgements - -This project was kindly sponsored by [nearForm](http://nearform.com). - -## License - -MIT diff --git a/node_modules/cloneable-readable/example.js b/node_modules/cloneable-readable/example.js deleted file mode 100644 index e980b979..00000000 --- a/node_modules/cloneable-readable/example.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict' - -var cloneable = require('./') -var fs = require('fs') -var pump = require('pump') - -var stream = cloneable(fs.createReadStream('./package.json')) - -pump(stream.clone(), fs.createWriteStream('./out1')) - -// simulate some asynchronicity -setImmediate(function () { - pump(stream, fs.createWriteStream('./out2')) -}) diff --git a/node_modules/cloneable-readable/index.js b/node_modules/cloneable-readable/index.js deleted file mode 100644 index a68765b6..00000000 --- a/node_modules/cloneable-readable/index.js +++ /dev/null @@ -1,153 +0,0 @@ -'use strict' - -var PassThrough = require('readable-stream').PassThrough -var inherits = require('inherits') -var p = require('process-nextick-args') - -function Cloneable (stream, opts) { - if (!(this instanceof Cloneable)) { - return new Cloneable(stream, opts) - } - - var objectMode = stream._readableState.objectMode - this._original = stream - this._clonesCount = 1 - - opts = opts || {} - opts.objectMode = objectMode - - PassThrough.call(this, opts) - - forwardDestroy(stream, this) - - this.on('newListener', onData) - this.once('resume', onResume) - - this._hasListener = true -} - -inherits(Cloneable, PassThrough) - -function onData (event, listener) { - if (event === 'data' || event === 'readable') { - this._hasListener = false - this.removeListener('newListener', onData) - this.removeListener('resume', onResume) - p.nextTick(clonePiped, this) - } -} - -function onResume () { - this._hasListener = false - this.removeListener('newListener', onData) - p.nextTick(clonePiped, this) -} - -Cloneable.prototype.clone = function () { - if (!this._original) { - throw new Error('already started') - } - - this._clonesCount++ - - // the events added by the clone should not count - // for starting the flow - this.removeListener('newListener', onData) - var clone = new Clone(this) - if (this._hasListener) { - this.on('newListener', onData) - } - - return clone -} - -Cloneable.prototype._destroy = function (err, cb) { - if (!err) { - this.push(null) - this.end() - this.emit('close') - } - - p.nextTick(cb, err) -} - -function forwardDestroy (src, dest) { - src.on('error', destroy) - src.on('close', onClose) - - function destroy (err) { - src.removeListener('close', onClose) - dest.destroy(err) - } - - function onClose () { - dest.end() - } -} - -function clonePiped (that) { - if (--that._clonesCount === 0 && !that._readableState.destroyed) { - that._original.pipe(that) - that._original = undefined - } -} - -function Clone (parent, opts) { - if (!(this instanceof Clone)) { - return new Clone(parent, opts) - } - - var objectMode = parent._readableState.objectMode - - opts = opts || {} - opts.objectMode = objectMode - - this.parent = parent - - PassThrough.call(this, opts) - - forwardDestroy(parent, this) - - parent.pipe(this) - - // the events added by the clone should not count - // for starting the flow - // so we add the newListener handle after we are done - this.on('newListener', onDataClone) - this.on('resume', onResumeClone) -} - -function onDataClone (event, listener) { - // We start the flow once all clones are piped or destroyed - if (event === 'data' || event === 'readable' || event === 'close') { - p.nextTick(clonePiped, this.parent) - this.removeListener('newListener', onDataClone) - } -} - -function onResumeClone () { - this.removeListener('newListener', onDataClone) - p.nextTick(clonePiped, this.parent) -} - -inherits(Clone, PassThrough) - -Clone.prototype.clone = function () { - return this.parent.clone() -} - -Cloneable.isCloneable = function (stream) { - return stream instanceof Cloneable || stream instanceof Clone -} - -Clone.prototype._destroy = function (err, cb) { - if (!err) { - this.push(null) - this.end() - this.emit('close') - } - - p.nextTick(cb, err) -} - -module.exports = Cloneable diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/.travis.yml b/node_modules/cloneable-readable/node_modules/readable-stream/.travis.yml deleted file mode 100644 index f62cdac0..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -sudo: false -language: node_js -before_install: - - (test $NPM_LEGACY && npm install -g npm@2 && npm install -g npm@3) || true -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: NPM_LEGACY=true - - node_js: '0.10' - env: NPM_LEGACY=true - - node_js: '0.11' - env: NPM_LEGACY=true - - node_js: '0.12' - env: NPM_LEGACY=true - - node_js: 1 - env: NPM_LEGACY=true - - node_js: 2 - env: NPM_LEGACY=true - - node_js: 3 - env: NPM_LEGACY=true - - node_js: 4 - - node_js: 5 - - node_js: 6 - - node_js: 7 - - node_js: 8 - - node_js: 9 -script: "npm run test" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/cloneable-readable/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58d..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/GOVERNANCE.md b/node_modules/cloneable-readable/node_modules/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93f..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### Streams Working Group - -The Node.js Streams is jointly governed by a Working Group -(WG) -that is responsible for high-level guidance of the project. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Conduct guidelines -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project -[README.md](./README.md#current-project-team-members). - -### Collaborators - -The readable-stream GitHub repository is -maintained by the WG and additional Collaborators who are added by the -WG on an ongoing basis. - -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the WG and their addition as -Collaborators is discussed during the WG meeting. - -_Note:_ If you make a significant contribution and are not considered -for commit-access log an issue or contact a WG member directly and it -will be brought up in the next WG meeting. - -Modifications of the contents of the readable-stream repository are -made on -a collaborative basis. Anybody with a GitHub account may propose a -modification via pull request and it will be considered by the project -Collaborators. All pull requests must be reviewed and accepted by a -Collaborator with sufficient expertise who is able to take full -responsibility for the change. In the case of pull requests proposed -by an existing Collaborator, an additional Collaborator is required -for sign-off. Consensus should be sought if additional Collaborators -participate and there is disagreement around a particular -modification. See _Consensus Seeking Process_ below for further detail -on the consensus model used for governance. - -Collaborators may opt to elevate significant or controversial -modifications, or modifications that have not found consensus to the -WG for discussion by assigning the ***WG-agenda*** tag to a pull -request or issue. The WG should serve as the final arbiter where -required. - -For the current list of Collaborators, see the project -[README.md](./README.md#members). - -### WG Membership - -WG seats are not time-limited. There is no fixed size of the WG. -However, the expected target is between 6 and 12, to ensure adequate -coverage of important areas of expertise, balanced with the ability to -make decisions efficiently. - -There is no specific set of requirements or qualifications for WG -membership beyond these rules. - -The WG may add additional members to the WG by unanimous consensus. - -A WG member may be removed from the WG by voluntary resignation, or by -unanimous consensus of all other WG members. - -Changes to WG membership should be posted in the agenda, and may be -suggested as any other agenda item (see "WG Meetings" below). - -If an addition or removal is proposed during a meeting, and the full -WG is not in attendance to participate, then the addition or removal -is added to the agenda for the subsequent meeting. This is to ensure -that all members are given the opportunity to participate in all -membership decisions. If a WG member is unable to attend a meeting -where a planned membership decision is being made, then their consent -is assumed. - -No more than 1/3 of the WG members may be affiliated with the same -employer. If removal or resignation of a WG member, or a change of -employment by a WG member, creates a situation where more than 1/3 of -the WG membership shares an employer, then the situation must be -immediately remedied by the resignation or removal of one or more WG -members affiliated with the over-represented employer(s). - -### WG Meetings - -The WG meets occasionally on a Google Hangout On Air. A designated moderator -approved by the WG runs the meeting. Each meeting should be -published to YouTube. - -Items are added to the WG agenda that are considered contentious or -are modifications of governance, contribution policy, WG membership, -or release process. - -The intention of the agenda is not to approve or review all patches; -that should happen continuously on GitHub and be handled by the larger -group of Collaborators. - -Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, -WG member or the moderator can add the item to the agenda by adding -the ***WG-agenda*** tag to the issue. - -Prior to each WG meeting the moderator will share the Agenda with -members of the WG. WG members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the WG -cannot veto or remove items. - -The WG may invite persons or representatives from certain projects to -participate in a non-voting capacity. - -The moderator is responsible for summarizing the discussion of each -agenda item and sends it as a pull request after the meeting. - -### Consensus Seeking Process - -The WG follows a -[Consensus -Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) -decision-making model. - -When an agenda item has appeared to reach a consensus the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. - -If an agenda item cannot reach a consensus a WG member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be seconded by a majority of the WG -or else the discussion will continue. Simple majority wins. - -Note that changes to WG membership require a majority consensus. See -"WG Membership" above. diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/LICENSE b/node_modules/cloneable-readable/node_modules/readable-stream/LICENSE deleted file mode 100644 index 2873b3b2..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/README.md b/node_modules/cloneable-readable/node_modules/readable-stream/README.md deleted file mode 100644 index 23fe3f3e..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# readable-stream - -***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -<a name="members"></a> -## Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E -* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/cloneable-readable/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index 83275f19..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,60 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section - - diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/duplex-browser.js b/node_modules/cloneable-readable/node_modules/readable-stream/duplex-browser.js deleted file mode 100644 index f8b2db83..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/duplex-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_duplex.js'); diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/duplex.js b/node_modules/cloneable-readable/node_modules/readable-stream/duplex.js deleted file mode 100644 index 46924cbf..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Duplex diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/cloneable-readable/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 57003c32..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/*<replacement>*/ - -var pna = require('process-nextick-args'); -/*</replacement>*/ - -/*<replacement>*/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/*</replacement>*/ - -module.exports = Duplex; - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -{ - // avoid scope creep, the keys array can then be collected - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - pna.nextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -Object.defineProperty(Duplex.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); - -Duplex.prototype._destroy = function (err, cb) { - this.push(null); - this.end(); - - pna.nextTick(cb, err); -}; \ No newline at end of file diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/cloneable-readable/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 612edb4d..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/cloneable-readable/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 0f807646..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1019 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/*<replacement>*/ - -var pna = require('process-nextick-args'); -/*</replacement>*/ - -module.exports = Readable; - -/*<replacement>*/ -var isArray = require('isarray'); -/*</replacement>*/ - -/*<replacement>*/ -var Duplex; -/*</replacement>*/ - -Readable.ReadableState = ReadableState; - -/*<replacement>*/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/*</replacement>*/ - -/*<replacement>*/ -var Stream = require('./internal/streams/stream'); -/*</replacement>*/ - -/*<replacement>*/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/*</replacement>*/ - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -/*<replacement>*/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/*</replacement>*/ - -var BufferList = require('./internal/streams/BufferList'); -var destroyImpl = require('./internal/streams/destroy'); -var StringDecoder; - -util.inherits(Readable, Stream); - -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); - - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var readableHwm = options.readableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} - -Object.defineProperty(Readable.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); - -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - this.push(null); - cb(err); -}; - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); - } else if (state.ended) { - stream.emit('error', new Error('stream.push() after EOF')); - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - } - } - - return needMoreData(state); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } else { - state.length -= n; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - pna.nextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('_read() is not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - // If the user pushes more data while we're writing to dest then we'll end up - // in ondata again. However, we only want to increase awaitDrain once because - // dest will only emit one 'drain' event for the multiple writes. - // => Introduce a guard on increasing awaitDrain. - var increasedAwaitDrain = false; - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - increasedAwaitDrain = false; - var ret = dest.write(chunk); - if (false === ret && !increasedAwaitDrain) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - increasedAwaitDrain = true; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { hasUnpiped: false }; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, unpipeInfo); - }return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this, unpipeInfo); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data') { - // Start flowing on next tick if stream isn't explicitly paused - if (this._readableState.flowing !== false) this.resume(); - } else if (ev === 'readable') { - var state = this._readableState; - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.emittedReadable = false; - if (!state.reading) { - pna.nextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - pna.nextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - state.awaitDrain = 0; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null) {} -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var _this = this; - - var state = this._readableState; - var paused = false; - - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - - _this.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return this; -}; - -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._readableState.highWaterMark; - } -}); - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = fromListPartial(n, state.buffer, state.decoder); - } - - return ret; -} - -// Extracts only enough buffered data to satisfy the amount requested. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromListPartial(n, list, hasStrings) { - var ret; - if (n < list.head.data.length) { - // slice is the same for buffers and strings - ret = list.head.data.slice(0, n); - list.head.data = list.head.data.slice(n); - } else if (n === list.head.data.length) { - // first chunk is a perfect match - ret = list.shift(); - } else { - // result spans more than one buffer - ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); - } - return ret; -} - -// Copies a specified amount of characters from the list of buffered data -// chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBufferString(n, list) { - var p = list.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -// Copies a specified amount of bytes from the list of buffered data chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBuffer(n, list) { - var ret = Buffer.allocUnsafe(n); - var p = list.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - pna.nextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/cloneable-readable/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index fcfc105a..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -util.inherits(Transform, Duplex); - -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) { - return this.emit('error', new Error('write callback called multiple times')); - } - - ts.writechunk = null; - ts.writecb = null; - - if (data != null) // single equals check for both `null` and `undefined` - this.push(data); - - cb(er); - - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); -} - -function prefinish() { - var _this = this; - - if (typeof this._flush === 'function') { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('_transform() is not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -Transform.prototype._destroy = function (err, cb) { - var _this2 = this; - - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - _this2.emit('close'); - }); -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - - if (data != null) // single equals check for both `null` and `undefined` - stream.push(data); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); - - if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/cloneable-readable/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index b0b02200..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,687 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -/*<replacement>*/ - -var pna = require('process-nextick-args'); -/*</replacement>*/ - -module.exports = Writable; - -/* <replacement> */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* </replacement> */ - -/*<replacement>*/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; -/*</replacement>*/ - -/*<replacement>*/ -var Duplex; -/*</replacement>*/ - -Writable.WritableState = WritableState; - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -/*<replacement>*/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/*</replacement>*/ - -/*<replacement>*/ -var Stream = require('./internal/streams/stream'); -/*</replacement>*/ - -/*<replacement>*/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/*</replacement>*/ - -var destroyImpl = require('./internal/streams/destroy'); - -util.inherits(Writable, Stream); - -function nop() {} - -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var writableHwm = options.writableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // if _final has been called - this.finalCalled = false; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // has it been destroyed - this.destroyed = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function (object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function (object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { - return new Writable(options); - } - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - pna.nextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - pna.nextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} - -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - pna.nextTick(cb, er); - // this can emit finish, and it will always happen - // after error - pna.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /*<replacement>*/ - asyncWrite(afterWrite, stream, state, finished, cb); - /*</replacement>*/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('_write() is not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - stream.emit('error', err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function') { - state.pendingcb++; - state.finalCalled = true; - pna.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = corkReq; - } else { - state.corkedRequestsFree = corkReq; - } -} - -Object.defineProperty(Writable.prototype, 'destroyed', { - get: function () { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); - -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - this.end(); - cb(err); -}; \ No newline at end of file diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/cloneable-readable/node_modules/readable-stream/lib/internal/streams/BufferList.js deleted file mode 100644 index aefc68bd..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/lib/internal/streams/BufferList.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Buffer = require('safe-buffer').Buffer; -var util = require('util'); - -function copyBuffer(src, target, offset) { - src.copy(target, offset); -} - -module.exports = function () { - function BufferList() { - _classCallCheck(this, BufferList); - - this.head = null; - this.tail = null; - this.length = 0; - } - - BufferList.prototype.push = function push(v) { - var entry = { data: v, next: null }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - }; - - BufferList.prototype.unshift = function unshift(v) { - var entry = { data: v, next: this.head }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - }; - - BufferList.prototype.shift = function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - }; - - BufferList.prototype.clear = function clear() { - this.head = this.tail = null; - this.length = 0; - }; - - BufferList.prototype.join = function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) { - ret += s + p.data; - }return ret; - }; - - BufferList.prototype.concat = function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - if (this.length === 1) return this.head.data; - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; - }; - - return BufferList; -}(); - -if (util && util.inspect && util.inspect.custom) { - module.exports.prototype[util.inspect.custom] = function () { - var obj = util.inspect({ length: this.length }); - return this.constructor.name + ' ' + obj; - }; -} \ No newline at end of file diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/cloneable-readable/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index 5a0a0d88..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -/*<replacement>*/ - -var pna = require('process-nextick-args'); -/*</replacement>*/ - -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { - pna.nextTick(emitErrorNT, this, err); - } - return this; - } - - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; - } - - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - pna.nextTick(emitErrorNT, _this, err); - if (_this._writableState) { - _this._writableState.errorEmitted = true; - } - } else if (cb) { - cb(err); - } - }); - - return this; -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy -}; \ No newline at end of file diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/cloneable-readable/node_modules/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3fd..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/cloneable-readable/node_modules/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b6..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/package.json b/node_modules/cloneable-readable/node_modules/readable-stream/package.json deleted file mode 100644 index 56d01284..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "readable-stream@^2.3.5", - "_id": "readable-stream@2.3.7", - "_inBundle": false, - "_integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "_location": "/cloneable-readable/readable-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "readable-stream@^2.3.5", - "name": "readable-stream", - "escapedName": "readable-stream", - "rawSpec": "^2.3.5", - "saveSpec": null, - "fetchSpec": "^2.3.5" - }, - "_requiredBy": [ - "/cloneable-readable" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "_shasum": "1eca1cf711aef814c04f62252a36a62f6cb23b57", - "_spec": "readable-stream@^2.3.5", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/cloneable-readable", - "browser": { - "util": false, - "./readable.js": "./readable-browser.js", - "./writable.js": "./writable-browser.js", - "./duplex.js": "./duplex-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "deprecated": false, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "assert": "^1.4.0", - "babel-polyfill": "^6.9.1", - "buffer": "^4.9.0", - "lolex": "^2.3.2", - "nyc": "^6.4.0", - "tap": "^0.7.0", - "tape": "^4.8.0" - }, - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "name": "readable-stream", - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov", - "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js" - }, - "version": "2.3.7" -} diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/passthrough.js b/node_modules/cloneable-readable/node_modules/readable-stream/passthrough.js deleted file mode 100644 index ffd791d7..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').PassThrough diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/readable-browser.js b/node_modules/cloneable-readable/node_modules/readable-stream/readable-browser.js deleted file mode 100644 index e5037259..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/readable-browser.js +++ /dev/null @@ -1,7 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/readable.js b/node_modules/cloneable-readable/node_modules/readable-stream/readable.js deleted file mode 100644 index ec89ec53..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,19 +0,0 @@ -var Stream = require('stream'); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; - exports = module.exports = Stream.Readable; - exports.Readable = Stream.Readable; - exports.Writable = Stream.Writable; - exports.Duplex = Stream.Duplex; - exports.Transform = Stream.Transform; - exports.PassThrough = Stream.PassThrough; - exports.Stream = Stream; -} else { - exports = module.exports = require('./lib/_stream_readable.js'); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = require('./lib/_stream_writable.js'); - exports.Duplex = require('./lib/_stream_duplex.js'); - exports.Transform = require('./lib/_stream_transform.js'); - exports.PassThrough = require('./lib/_stream_passthrough.js'); -} diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/transform.js b/node_modules/cloneable-readable/node_modules/readable-stream/transform.js deleted file mode 100644 index b1baba26..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Transform diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/writable-browser.js b/node_modules/cloneable-readable/node_modules/readable-stream/writable-browser.js deleted file mode 100644 index ebdde6a8..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/writable-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_writable.js'); diff --git a/node_modules/cloneable-readable/node_modules/readable-stream/writable.js b/node_modules/cloneable-readable/node_modules/readable-stream/writable.js deleted file mode 100644 index 3211a6f8..00000000 --- a/node_modules/cloneable-readable/node_modules/readable-stream/writable.js +++ /dev/null @@ -1,8 +0,0 @@ -var Stream = require("stream") -var Writable = require("./lib/_stream_writable.js") - -if (process.env.READABLE_STREAM === 'disable') { - module.exports = Stream && Stream.Writable || Writable -} else { - module.exports = Writable -} diff --git a/node_modules/cloneable-readable/node_modules/safe-buffer/LICENSE b/node_modules/cloneable-readable/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068cee..00000000 --- a/node_modules/cloneable-readable/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/cloneable-readable/node_modules/safe-buffer/README.md b/node_modules/cloneable-readable/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81afd..00000000 --- a/node_modules/cloneable-readable/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) -<!-- YAML -added: v3.0.0 ---> - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) -<!-- YAML -added: v5.10.0 ---> - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: <Buffer 88 13 a0 0f> - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: <Buffer 88 13 70 17> -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) -<!-- YAML -added: v3.0.0 ---> - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) -<!-- YAML -added: v5.10.0 ---> - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) -<!-- YAML -added: v5.10.0 ---> - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // <Buffer 00 00 00 00 00> -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // <Buffer 61 61 61 61 61> -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64> -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) -<!-- YAML -added: v5.10.0 ---> - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // <Buffer 78 e0 82 02 01> - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // <Buffer 00 00 00 00 00> -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) -<!-- YAML -added: v5.10.0 ---> - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/node_modules/cloneable-readable/node_modules/safe-buffer/index.d.ts b/node_modules/cloneable-readable/node_modules/safe-buffer/index.d.ts deleted file mode 100644 index e9fed809..00000000 --- a/node_modules/cloneable-readable/node_modules/safe-buffer/index.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "safe-buffer" { - export class Buffer { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - } -} \ No newline at end of file diff --git a/node_modules/cloneable-readable/node_modules/safe-buffer/index.js b/node_modules/cloneable-readable/node_modules/safe-buffer/index.js deleted file mode 100644 index 22438dab..00000000 --- a/node_modules/cloneable-readable/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/node_modules/cloneable-readable/node_modules/safe-buffer/package.json b/node_modules/cloneable-readable/node_modules/safe-buffer/package.json deleted file mode 100644 index e6de1424..00000000 --- a/node_modules/cloneable-readable/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "safe-buffer@~5.1.1", - "_id": "safe-buffer@5.1.2", - "_inBundle": false, - "_integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "_location": "/cloneable-readable/safe-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "safe-buffer@~5.1.1", - "name": "safe-buffer", - "escapedName": "safe-buffer", - "rawSpec": "~5.1.1", - "saveSpec": null, - "fetchSpec": "~5.1.1" - }, - "_requiredBy": [ - "/cloneable-readable/readable-stream", - "/cloneable-readable/string_decoder" - ], - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "_shasum": "991ec69d296e0313747d59bdfd2b745c35f8828d", - "_spec": "safe-buffer@~5.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/cloneable-readable/node_modules/readable-stream", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Safer Node.js Buffer API", - "devDependencies": { - "standard": "*", - "tape": "^4.0.0" - }, - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "name": "safe-buffer", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "types": "index.d.ts", - "version": "5.1.2" -} diff --git a/node_modules/cloneable-readable/node_modules/string_decoder/.travis.yml b/node_modules/cloneable-readable/node_modules/string_decoder/.travis.yml deleted file mode 100644 index 3347a725..00000000 --- a/node_modules/cloneable-readable/node_modules/string_decoder/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test diff --git a/node_modules/cloneable-readable/node_modules/string_decoder/LICENSE b/node_modules/cloneable-readable/node_modules/string_decoder/LICENSE deleted file mode 100644 index 778edb20..00000000 --- a/node_modules/cloneable-readable/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - diff --git a/node_modules/cloneable-readable/node_modules/string_decoder/README.md b/node_modules/cloneable-readable/node_modules/string_decoder/README.md deleted file mode 100644 index 5fd58315..00000000 --- a/node_modules/cloneable-readable/node_modules/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# string_decoder - -***Node-core v8.9.4 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. - -## Streams Working Group - -`string_decoder` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -See [readable-stream](https://github.com/nodejs/readable-stream) for -more details. diff --git a/node_modules/cloneable-readable/node_modules/string_decoder/lib/string_decoder.js b/node_modules/cloneable-readable/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63f..00000000 --- a/node_modules/cloneable-readable/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/*<replacement>*/ - -var Buffer = require('safe-buffer').Buffer; -/*</replacement>*/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/node_modules/cloneable-readable/node_modules/string_decoder/package.json b/node_modules/cloneable-readable/node_modules/string_decoder/package.json deleted file mode 100644 index 397d11b2..00000000 --- a/node_modules/cloneable-readable/node_modules/string_decoder/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "string_decoder@~1.1.1", - "_id": "string_decoder@1.1.1", - "_inBundle": false, - "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "_location": "/cloneable-readable/string_decoder", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "string_decoder@~1.1.1", - "name": "string_decoder", - "escapedName": "string_decoder", - "rawSpec": "~1.1.1", - "saveSpec": null, - "fetchSpec": "~1.1.1" - }, - "_requiredBy": [ - "/cloneable-readable/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8", - "_spec": "string_decoder@~1.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/cloneable-readable/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/nodejs/string_decoder/issues" - }, - "bundleDependencies": false, - "dependencies": { - "safe-buffer": "~5.1.0" - }, - "deprecated": false, - "description": "The string_decoder module from Node core", - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "lib/string_decoder.js", - "name": "string_decoder", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "test": "tap test/parallel/*.js && node test/verify-dependencies" - }, - "version": "1.1.1" -} diff --git a/node_modules/cloneable-readable/package.json b/node_modules/cloneable-readable/package.json deleted file mode 100644 index 6200002b..00000000 --- a/node_modules/cloneable-readable/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_from": "cloneable-readable@^1.0.0", - "_id": "cloneable-readable@1.1.3", - "_inBundle": false, - "_integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", - "_location": "/cloneable-readable", - "_phantomChildren": { - "core-util-is": "1.0.2", - "inherits": "2.0.4", - "isarray": "1.0.0", - "process-nextick-args": "2.0.1", - "util-deprecate": "1.0.2" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "cloneable-readable@^1.0.0", - "name": "cloneable-readable", - "escapedName": "cloneable-readable", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/vinyl" - ], - "_resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", - "_shasum": "120a00cb053bfb63a222e709f9683ea2e11d8cec", - "_spec": "cloneable-readable@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl", - "author": { - "name": "Matteo Collina", - "email": "hello@matteocollina.com" - }, - "bugs": { - "url": "https://github.com/mcollina/cloneable-readable/issues" - }, - "bundleDependencies": false, - "dependencies": { - "inherits": "^2.0.1", - "process-nextick-args": "^2.0.0", - "readable-stream": "^2.3.5" - }, - "deprecated": false, - "description": "Clone a Readable stream, safely", - "devDependencies": { - "flush-write-stream": "^1.0.0", - "from2": "^2.1.1", - "pre-commit": "^1.1.2", - "pump": "^3.0.0", - "standard": "^11.0.0", - "tap-spec": "^4.1.1", - "tape": "^4.9.0" - }, - "homepage": "https://github.com/mcollina/cloneable-readable#readme", - "keywords": [ - "readable", - "stream", - "clone" - ], - "license": "MIT", - "main": "index.js", - "name": "cloneable-readable", - "precommit": "test", - "repository": { - "type": "git", - "url": "git+https://github.com/mcollina/cloneable-readable.git" - }, - "scripts": { - "test": "standard && tape test.js | tap-spec" - }, - "version": "1.1.3" -} diff --git a/node_modules/cloneable-readable/test.js b/node_modules/cloneable-readable/test.js deleted file mode 100644 index 35bb78bb..00000000 --- a/node_modules/cloneable-readable/test.js +++ /dev/null @@ -1,702 +0,0 @@ -'use strict' - -var fs = require('fs') -var path = require('path') -var test = require('tape').test -var from = require('from2') -var crypto = require('crypto') -var sink = require('flush-write-stream') -var pump = require('pump') -var cloneable = require('./') - -test('basic passthrough', function (t) { - t.plan(2) - - var read = false - var source = from(function (size, next) { - if (read) { - this.push(null) - } else { - read = true - this.push('hello world') - } - next() - }) - - var instance = cloneable(source) - t.notOk(read, 'stream not started') - - instance.pipe(sink(function (chunk, enc, cb) { - t.equal(chunk.toString(), 'hello world', 'chunk matches') - cb() - })) -}) - -test('clone sync', function (t) { - t.plan(4) - - var read = false - var source = from(function (size, next) { - if (read) { - this.push(null) - } else { - read = true - this.push('hello world') - } - next() - }) - - var instance = cloneable(source) - t.notOk(read, 'stream not started') - - var cloned = instance.clone() - t.notOk(read, 'stream not started') - - instance.pipe(sink(function (chunk, enc, cb) { - t.equal(chunk.toString(), 'hello world', 'chunk matches') - cb() - })) - - cloned.pipe(sink(function (chunk, enc, cb) { - t.equal(chunk.toString(), 'hello world', 'chunk matches') - cb() - })) -}) - -test('clone async', function (t) { - t.plan(4) - - var read = false - var source = from(function (size, next) { - if (read) { - this.push(null) - } else { - read = true - this.push('hello world') - } - next() - }) - - var instance = cloneable(source) - t.notOk(read, 'stream not started') - - var cloned = instance.clone() - t.notOk(read, 'stream not started') - - instance.pipe(sink(function (chunk, enc, cb) { - t.equal(chunk.toString(), 'hello world', 'chunk matches') - cb() - })) - - setImmediate(function () { - cloned.pipe(sink(function (chunk, enc, cb) { - t.equal(chunk.toString(), 'hello world', 'chunk matches') - cb() - })) - }) -}) - -test('basic passthrough in obj mode', function (t) { - t.plan(2) - - var read = false - var source = from.obj(function (size, next) { - if (read) { - return this.push(null) - } else { - read = true - this.push({ hello: 'world' }) - } - next() - }) - - var instance = cloneable(source) - t.notOk(read, 'stream not started') - - instance.pipe(sink.obj(function (chunk, enc, cb) { - t.deepEqual(chunk, { hello: 'world' }, 'chunk matches') - cb() - })) -}) - -test('multiple clone in object mode', function (t) { - t.plan(4) - - var read = false - var source = from.obj(function (size, next) { - if (read) { - return this.push(null) - } else { - read = true - this.push({ hello: 'world' }) - } - next() - }) - - var instance = cloneable(source) - t.notOk(read, 'stream not started') - - var cloned = instance.clone() - t.notOk(read, 'stream not started') - - instance.pipe(sink.obj(function (chunk, enc, cb) { - t.deepEqual(chunk, { hello: 'world' }, 'chunk matches') - cb() - })) - - setImmediate(function () { - cloned.pipe(sink.obj(function (chunk, enc, cb) { - t.deepEqual(chunk, { hello: 'world' }, 'chunk matches') - cb() - })) - }) -}) - -test('basic passthrough with data event', function (t) { - t.plan(2) - - var read = false - var source = from(function (size, next) { - if (read) { - this.push(null) - } else { - read = true - this.push('hello world') - } - next() - }) - - var instance = cloneable(source) - t.notOk(read, 'stream not started') - - var data = '' - instance.on('data', function (chunk) { - data += chunk.toString() - }) - - instance.on('end', function () { - t.equal(data, 'hello world', 'chunk matches') - }) -}) - -test('basic passthrough with data event on clone', function (t) { - t.plan(3) - - var read = false - var source = from(function (size, next) { - if (read) { - this.push(null) - } else { - read = true - this.push('hello world') - } - next() - }) - - var instance = cloneable(source) - var cloned = instance.clone() - - t.notOk(read, 'stream not started') - - var data = '' - cloned.on('data', function (chunk) { - data += chunk.toString() - }) - - cloned.on('end', function () { - t.equal(data, 'hello world', 'chunk matches in clone') - }) - - instance.pipe(sink(function (chunk, enc, cb) { - t.equal(chunk.toString(), 'hello world', 'chunk matches in instance') - cb() - })) -}) - -test('errors if cloned after start', function (t) { - t.plan(2) - - var source = from(function (size, next) { - this.push('hello world') - this.push(null) - next() - }) - - var instance = cloneable(source) - - instance.pipe(sink(function (chunk, enc, cb) { - t.equal(chunk.toString(), 'hello world', 'chunk matches') - t.throws(function () { - instance.clone() - }, 'throws if cloned after start') - cb() - })) -}) - -test('basic passthrough with readable event', function (t) { - t.plan(2) - - var read = false - var source = from(function (size, next) { - if (read) { - this.push(null) - } else { - read = true - this.push('hello world') - } - next() - }) - - var instance = cloneable(source) - t.notOk(read, 'stream not started') - - var data = '' - instance.on('readable', function () { - var chunk - while ((chunk = this.read()) !== null) { - data += chunk.toString() - } - }) - - instance.on('end', function () { - t.equal(data, 'hello world', 'chunk matches') - }) -}) - -test('basic passthrough with readable event on clone', function (t) { - t.plan(3) - - var read = false - var source = from(function (size, next) { - if (read) { - this.push(null) - } else { - read = true - this.push('hello world') - } - next() - }) - - var instance = cloneable(source) - var cloned = instance.clone() - - t.notOk(read, 'stream not started') - - var data = '' - cloned.on('readable', function () { - var chunk - while ((chunk = this.read()) !== null) { - data += chunk.toString() - } - }) - - cloned.on('end', function () { - t.equal(data, 'hello world', 'chunk matches in clone') - }) - - instance.pipe(sink(function (chunk, enc, cb) { - t.equal(chunk.toString(), 'hello world', 'chunk matches in instance') - cb() - })) -}) - -test('source error destroys all', function (t) { - t.plan(3) - - var source = from() - var instance = cloneable(source) - var clone = instance.clone() - - source.on('error', function (err) { - t.ok(err, 'source errors') - - instance.on('error', function (err2) { - t.ok(err === err2, 'instance receives same error') - }) - - clone.on('error', function (err3) { - t.ok(err === err3, 'clone receives same error') - }) - }) - - source.emit('error', new Error()) -}) - -test('source destroy destroys all', function (t) { - t.plan(2) - - var source = from() - var instance = cloneable(source) - var clone = instance.clone() - - instance.on('end', function () { - t.pass('instance has ended') - }) - - clone.on('end', function () { - t.pass('clone has ended') - }) - - clone.resume() - instance.resume() - - source.destroy() -}) - -test('instance error destroys all but the source', function (t) { - t.plan(2) - - var source = from() - var instance = cloneable(source) - var clone = instance.clone() - - source.on('close', function () { - t.fail('source should not be closed') - }) - - instance.on('error', function (err) { - t.is(err.message, 'beep', 'instance errors') - }) - - instance.on('close', function () { - t.fail('close should not be emitted') - }) - - clone.on('error', function (err) { - t.is(err.message, 'beep', 'instance errors') - }) - - clone.on('close', function () { - t.fail('close should not be emitted') - }) - - instance.destroy(new Error('beep')) -}) - -test('instance destroy destroys all but the source', function (t) { - t.plan(2) - - var source = from() - var instance = cloneable(source) - var clone = instance.clone() - - source.on('close', function () { - t.fail('source should not be closed') - }) - - instance.on('end', function () { - t.pass('instance has ended') - }) - - clone.on('end', function () { - t.pass('clone has ended') - }) - - instance.resume() - clone.resume() - - instance.destroy() -}) - -test('clone destroy does not affect other clones, cloneable or source', function (t) { - t.plan(1) - - var source = from() - var instance = cloneable(source) - var clone = instance.clone() - var other = instance.clone() - - source.on('close', function () { - t.fail('source should not be closed') - }) - - instance.on('close', function () { - t.fail('instance should not be closed') - }) - - other.on('close', function () { - t.fail('other clone should not be closed') - }) - - clone.on('close', function () { - t.pass('clone is closed') - }) - - clone.destroy() -}) - -test('clone remains readable if other is destroyed', function (t) { - t.plan(3) - - var read = false - var source = from(function (size, next) { - if (read) { - this.push(null) - } else { - read = true - this.push('hello') - } - next() - }) - - var instance = cloneable(source) - var clone = instance.clone() - var other = instance.clone() - - instance.pipe(sink.obj(function (chunk, enc, cb) { - t.deepEqual(chunk.toString(), 'hello', 'instance chunk matches') - cb() - })) - - clone.pipe(sink.obj(function (chunk, enc, cb) { - t.deepEqual(chunk.toString(), 'hello', 'clone chunk matches') - cb() - })) - - clone.on('close', function () { - t.fail('clone should not be closed') - }) - - instance.on('close', function () { - t.fail('instance should not be closed') - }) - - other.on('close', function () { - t.pass('other is closed') - }) - - other.destroy() -}) - -test('clone of clone', function (t) { - t.plan(6) - - var read = false - var source = from(function (size, next) { - if (read) { - this.push(null) - } else { - read = true - this.push('hello world') - } - next() - }) - - var instance = cloneable(source) - t.notOk(read, 'stream not started') - - var cloned = instance.clone() - t.notOk(read, 'stream not started') - - var replica = cloned.clone() - t.notOk(read, 'stream not started') - - instance.pipe(sink(function (chunk, enc, cb) { - t.equal(chunk.toString(), 'hello world', 'chunk matches') - cb() - })) - - cloned.pipe(sink(function (chunk, enc, cb) { - t.equal(chunk.toString(), 'hello world', 'chunk matches') - cb() - })) - - replica.pipe(sink(function (chunk, enc, cb) { - t.equal(chunk.toString(), 'hello world', 'chunk matches') - cb() - })) -}) - -test('from vinyl', function (t) { - t.plan(3) - - var source = from(['wa', 'dup']) - - var instance = cloneable(source) - var clone = instance.clone() - - var data = '' - var data2 = '' - var ends = 2 - - function latch () { - if (--ends === 0) { - t.equal(data, data2) - } - } - - instance.on('data', function (chunk) { - data += chunk.toString() - }) - - process.nextTick(function () { - t.equal('', data, 'nothing was written yet') - t.equal('', data2, 'nothing was written yet') - - clone.on('data', function (chunk) { - data2 += chunk.toString() - }) - }) - - instance.on('end', latch) - clone.on('end', latch) -}) - -test('waits till all are flowing', function (t) { - t.plan(1) - - var source = from(['wa', 'dup']) - - var instance = cloneable(source) - - // we create a clone - instance.clone() - - instance.on('data', function (chunk) { - t.fail('this should never happen') - }) - - process.nextTick(function () { - t.pass('wait till nextTick') - }) -}) - -test('isCloneable', function (t) { - t.plan(4) - - var source = from(['hello', ' ', 'world']) - t.notOk(cloneable.isCloneable(source), 'a generic readable is not cloneable') - - var instance = cloneable(source) - t.ok(cloneable.isCloneable(instance), 'a cloneable is cloneable') - - var clone = instance.clone() - t.ok(cloneable.isCloneable(clone), 'a clone is cloneable') - - var cloneClone = clone.clone() - t.ok(cloneable.isCloneable(cloneClone), 'a clone of a clone is cloneable') -}) - -test('emits finish', function (t) { - var chunks = ['a', 'b', 'c', 'd', null] - var e1 = ['a', 'b', 'c', 'd'] - var e2 = ['a', 'b', 'c', 'd'] - - t.plan(2 + e1.length + e2.length) - - var source = from(function (size, next) { - setImmediate(next, null, chunks.shift()) - }) - - var instance = cloneable(source) - - var clone = instance.clone() - - clone.on('finish', t.pass.bind(null, 'clone emits finish')) - instance.on('finish', t.pass.bind(null, 'main emits finish')) - - instance.pipe(sink(function (chunk, enc, cb) { - t.equal(chunk.toString(), e1.shift(), 'chunk matches') - cb() - })) - - clone.on('data', function (chunk) { - t.equal(chunk.toString(), e2.shift(), 'chunk matches') - }) -}) - -test('clone async w resume', function (t) { - t.plan(4) - - var read = false - var source = from(function (size, next) { - if (read) { - this.push(null) - } else { - read = true - this.push('hello world') - } - next() - }) - - var instance = cloneable(source) - t.notOk(read, 'stream not started') - - var cloned = instance.clone() - t.notOk(read, 'stream not started') - - instance.on('end', t.pass.bind(null, 'end emitted')) - instance.resume() - - setImmediate(function () { - cloned.on('end', t.pass.bind(null, 'end emitted')) - cloned.resume() - }) -}) - -test('big file', function (t) { - t.plan(13) - - var stream = cloneable(fs.createReadStream(path.join(__dirname, 'big'))) - var hash = crypto.createHash('sha1') - hash.setEncoding('hex') - - var toCheck - - fs.createReadStream(path.join(__dirname, 'big')) - .pipe(hash) - .once('readable', function () { - toCheck = hash.read() - t.ok(toCheck) - }) - - function pipe (s, num) { - s.on('end', function () { - t.pass('end for ' + num) - }) - - var dest = path.join(__dirname, 'out') - - s.pipe(fs.createWriteStream(dest)) - .on('finish', function () { - t.pass('finish for ' + num) - - var destHash = crypto.createHash('sha1') - destHash.setEncoding('hex') - - fs.createReadStream(dest) - .pipe(destHash) - .once('readable', function () { - var hash = destHash.read() - t.ok(hash) - t.equal(hash, toCheck) - }) - }) - } - - // Pipe in another event loop tick <-- this one finished only, it's the original cloneable. - setImmediate(pipe.bind(null, stream, 1)) - - // Pipe in the same event loop tick - pipe(stream.clone(), 0) - - // Pipe a long time after - setTimeout(pipe.bind(null, stream.clone(), 2), 1000) -}) - -test('pump error', function (t) { - t.plan(1) - - var err = new Error('kaboom') - - pump([ - cloneable(from(function () { - this.destroy(err) - })), - sink(function (chunk, enc, cb) { - t.fail('this should not be called') - }) - ], function (_err) { - t.equal(_err, err) - }) -}) diff --git a/node_modules/color-convert/CHANGELOG.md b/node_modules/color-convert/CHANGELOG.md deleted file mode 100644 index 0a7bce4f..00000000 --- a/node_modules/color-convert/CHANGELOG.md +++ /dev/null @@ -1,54 +0,0 @@ -# 1.0.0 - 2016-01-07 - -- Removed: unused speed test -- Added: Automatic routing between previously unsupported conversions -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Removed: `convert()` class -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Changed: all functions to lookup dictionary -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Changed: `ansi` to `ansi256` -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Fixed: argument grouping for functions requiring only one argument -([#27](https://github.com/Qix-/color-convert/pull/27)) - -# 0.6.0 - 2015-07-23 - -- Added: methods to handle -[ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors: - - rgb2ansi16 - - rgb2ansi - - hsl2ansi16 - - hsl2ansi - - hsv2ansi16 - - hsv2ansi - - hwb2ansi16 - - hwb2ansi - - cmyk2ansi16 - - cmyk2ansi - - keyword2ansi16 - - keyword2ansi - - ansi162rgb - - ansi162hsl - - ansi162hsv - - ansi162hwb - - ansi162cmyk - - ansi162keyword - - ansi2rgb - - ansi2hsl - - ansi2hsv - - ansi2hwb - - ansi2cmyk - - ansi2keyword -([#18](https://github.com/harthur/color-convert/pull/18)) - -# 0.5.3 - 2015-06-02 - -- Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]` -([#15](https://github.com/harthur/color-convert/issues/15)) - ---- - -Check out commit logs for older releases diff --git a/node_modules/color-convert/LICENSE b/node_modules/color-convert/LICENSE deleted file mode 100644 index 5b4c386f..00000000 --- a/node_modules/color-convert/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2011-2016 Heather Arthur <fayearthur@gmail.com> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/color-convert/README.md b/node_modules/color-convert/README.md deleted file mode 100644 index d4b08fc3..00000000 --- a/node_modules/color-convert/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# color-convert - -[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert) - -Color-convert is a color conversion library for JavaScript and node. -It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest): - -```js -var convert = require('color-convert'); - -convert.rgb.hsl(140, 200, 100); // [96, 48, 59] -convert.keyword.rgb('blue'); // [0, 0, 255] - -var rgbChannels = convert.rgb.channels; // 3 -var cmykChannels = convert.cmyk.channels; // 4 -var ansiChannels = convert.ansi16.channels; // 1 -``` - -# Install - -```console -$ npm install color-convert -``` - -# API - -Simply get the property of the _from_ and _to_ conversion that you're looking for. - -All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function. - -All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha). - -```js -var convert = require('color-convert'); - -// Hex to LAB -convert.hex.lab('DEADBF'); // [ 76, 21, -2 ] -convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ] - -// RGB to CMYK -convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ] -convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ] -``` - -### Arrays -All functions that accept multiple arguments also support passing an array. - -Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.) - -```js -var convert = require('color-convert'); - -convert.rgb.hex(123, 45, 67); // '7B2D43' -convert.rgb.hex([123, 45, 67]); // '7B2D43' -``` - -## Routing - -Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex). - -Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js). - -# Contribute - -If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request. - -# License -Copyright © 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE). diff --git a/node_modules/color-convert/conversions.js b/node_modules/color-convert/conversions.js deleted file mode 100644 index 32172007..00000000 --- a/node_modules/color-convert/conversions.js +++ /dev/null @@ -1,868 +0,0 @@ -/* MIT license */ -var cssKeywords = require('color-name'); - -// NOTE: conversions should only return primitive values (i.e. arrays, or -// values that give correct `typeof` results). -// do not use box values types (i.e. Number(), String(), etc.) - -var reverseKeywords = {}; -for (var key in cssKeywords) { - if (cssKeywords.hasOwnProperty(key)) { - reverseKeywords[cssKeywords[key]] = key; - } -} - -var convert = module.exports = { - rgb: {channels: 3, labels: 'rgb'}, - hsl: {channels: 3, labels: 'hsl'}, - hsv: {channels: 3, labels: 'hsv'}, - hwb: {channels: 3, labels: 'hwb'}, - cmyk: {channels: 4, labels: 'cmyk'}, - xyz: {channels: 3, labels: 'xyz'}, - lab: {channels: 3, labels: 'lab'}, - lch: {channels: 3, labels: 'lch'}, - hex: {channels: 1, labels: ['hex']}, - keyword: {channels: 1, labels: ['keyword']}, - ansi16: {channels: 1, labels: ['ansi16']}, - ansi256: {channels: 1, labels: ['ansi256']}, - hcg: {channels: 3, labels: ['h', 'c', 'g']}, - apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, - gray: {channels: 1, labels: ['gray']} -}; - -// hide .channels and .labels properties -for (var model in convert) { - if (convert.hasOwnProperty(model)) { - if (!('channels' in convert[model])) { - throw new Error('missing channels property: ' + model); - } - - if (!('labels' in convert[model])) { - throw new Error('missing channel labels property: ' + model); - } - - if (convert[model].labels.length !== convert[model].channels) { - throw new Error('channel and label counts mismatch: ' + model); - } - - var channels = convert[model].channels; - var labels = convert[model].labels; - delete convert[model].channels; - delete convert[model].labels; - Object.defineProperty(convert[model], 'channels', {value: channels}); - Object.defineProperty(convert[model], 'labels', {value: labels}); - } -} - -convert.rgb.hsl = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var min = Math.min(r, g, b); - var max = Math.max(r, g, b); - var delta = max - min; - var h; - var s; - var l; - - if (max === min) { - h = 0; - } else if (r === max) { - h = (g - b) / delta; - } else if (g === max) { - h = 2 + (b - r) / delta; - } else if (b === max) { - h = 4 + (r - g) / delta; - } - - h = Math.min(h * 60, 360); - - if (h < 0) { - h += 360; - } - - l = (min + max) / 2; - - if (max === min) { - s = 0; - } else if (l <= 0.5) { - s = delta / (max + min); - } else { - s = delta / (2 - max - min); - } - - return [h, s * 100, l * 100]; -}; - -convert.rgb.hsv = function (rgb) { - var rdif; - var gdif; - var bdif; - var h; - var s; - - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var v = Math.max(r, g, b); - var diff = v - Math.min(r, g, b); - var diffc = function (c) { - return (v - c) / 6 / diff + 1 / 2; - }; - - if (diff === 0) { - h = s = 0; - } else { - s = diff / v; - rdif = diffc(r); - gdif = diffc(g); - bdif = diffc(b); - - if (r === v) { - h = bdif - gdif; - } else if (g === v) { - h = (1 / 3) + rdif - bdif; - } else if (b === v) { - h = (2 / 3) + gdif - rdif; - } - if (h < 0) { - h += 1; - } else if (h > 1) { - h -= 1; - } - } - - return [ - h * 360, - s * 100, - v * 100 - ]; -}; - -convert.rgb.hwb = function (rgb) { - var r = rgb[0]; - var g = rgb[1]; - var b = rgb[2]; - var h = convert.rgb.hsl(rgb)[0]; - var w = 1 / 255 * Math.min(r, Math.min(g, b)); - - b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); - - return [h, w * 100, b * 100]; -}; - -convert.rgb.cmyk = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var c; - var m; - var y; - var k; - - k = Math.min(1 - r, 1 - g, 1 - b); - c = (1 - r - k) / (1 - k) || 0; - m = (1 - g - k) / (1 - k) || 0; - y = (1 - b - k) / (1 - k) || 0; - - return [c * 100, m * 100, y * 100, k * 100]; -}; - -/** - * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance - * */ -function comparativeDistance(x, y) { - return ( - Math.pow(x[0] - y[0], 2) + - Math.pow(x[1] - y[1], 2) + - Math.pow(x[2] - y[2], 2) - ); -} - -convert.rgb.keyword = function (rgb) { - var reversed = reverseKeywords[rgb]; - if (reversed) { - return reversed; - } - - var currentClosestDistance = Infinity; - var currentClosestKeyword; - - for (var keyword in cssKeywords) { - if (cssKeywords.hasOwnProperty(keyword)) { - var value = cssKeywords[keyword]; - - // Compute comparative distance - var distance = comparativeDistance(rgb, value); - - // Check if its less, if so set as closest - if (distance < currentClosestDistance) { - currentClosestDistance = distance; - currentClosestKeyword = keyword; - } - } - } - - return currentClosestKeyword; -}; - -convert.keyword.rgb = function (keyword) { - return cssKeywords[keyword]; -}; - -convert.rgb.xyz = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - - // assume sRGB - r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); - g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); - b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); - - var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); - var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); - var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); - - return [x * 100, y * 100, z * 100]; -}; - -convert.rgb.lab = function (rgb) { - var xyz = convert.rgb.xyz(rgb); - var x = xyz[0]; - var y = xyz[1]; - var z = xyz[2]; - var l; - var a; - var b; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); - - l = (116 * y) - 16; - a = 500 * (x - y); - b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.hsl.rgb = function (hsl) { - var h = hsl[0] / 360; - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var t1; - var t2; - var t3; - var rgb; - var val; - - if (s === 0) { - val = l * 255; - return [val, val, val]; - } - - if (l < 0.5) { - t2 = l * (1 + s); - } else { - t2 = l + s - l * s; - } - - t1 = 2 * l - t2; - - rgb = [0, 0, 0]; - for (var i = 0; i < 3; i++) { - t3 = h + 1 / 3 * -(i - 1); - if (t3 < 0) { - t3++; - } - if (t3 > 1) { - t3--; - } - - if (6 * t3 < 1) { - val = t1 + (t2 - t1) * 6 * t3; - } else if (2 * t3 < 1) { - val = t2; - } else if (3 * t3 < 2) { - val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; - } else { - val = t1; - } - - rgb[i] = val * 255; - } - - return rgb; -}; - -convert.hsl.hsv = function (hsl) { - var h = hsl[0]; - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var smin = s; - var lmin = Math.max(l, 0.01); - var sv; - var v; - - l *= 2; - s *= (l <= 1) ? l : 2 - l; - smin *= lmin <= 1 ? lmin : 2 - lmin; - v = (l + s) / 2; - sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); - - return [h, sv * 100, v * 100]; -}; - -convert.hsv.rgb = function (hsv) { - var h = hsv[0] / 60; - var s = hsv[1] / 100; - var v = hsv[2] / 100; - var hi = Math.floor(h) % 6; - - var f = h - Math.floor(h); - var p = 255 * v * (1 - s); - var q = 255 * v * (1 - (s * f)); - var t = 255 * v * (1 - (s * (1 - f))); - v *= 255; - - switch (hi) { - case 0: - return [v, t, p]; - case 1: - return [q, v, p]; - case 2: - return [p, v, t]; - case 3: - return [p, q, v]; - case 4: - return [t, p, v]; - case 5: - return [v, p, q]; - } -}; - -convert.hsv.hsl = function (hsv) { - var h = hsv[0]; - var s = hsv[1] / 100; - var v = hsv[2] / 100; - var vmin = Math.max(v, 0.01); - var lmin; - var sl; - var l; - - l = (2 - s) * v; - lmin = (2 - s) * vmin; - sl = s * vmin; - sl /= (lmin <= 1) ? lmin : 2 - lmin; - sl = sl || 0; - l /= 2; - - return [h, sl * 100, l * 100]; -}; - -// http://dev.w3.org/csswg/css-color/#hwb-to-rgb -convert.hwb.rgb = function (hwb) { - var h = hwb[0] / 360; - var wh = hwb[1] / 100; - var bl = hwb[2] / 100; - var ratio = wh + bl; - var i; - var v; - var f; - var n; - - // wh + bl cant be > 1 - if (ratio > 1) { - wh /= ratio; - bl /= ratio; - } - - i = Math.floor(6 * h); - v = 1 - bl; - f = 6 * h - i; - - if ((i & 0x01) !== 0) { - f = 1 - f; - } - - n = wh + f * (v - wh); // linear interpolation - - var r; - var g; - var b; - switch (i) { - default: - case 6: - case 0: r = v; g = n; b = wh; break; - case 1: r = n; g = v; b = wh; break; - case 2: r = wh; g = v; b = n; break; - case 3: r = wh; g = n; b = v; break; - case 4: r = n; g = wh; b = v; break; - case 5: r = v; g = wh; b = n; break; - } - - return [r * 255, g * 255, b * 255]; -}; - -convert.cmyk.rgb = function (cmyk) { - var c = cmyk[0] / 100; - var m = cmyk[1] / 100; - var y = cmyk[2] / 100; - var k = cmyk[3] / 100; - var r; - var g; - var b; - - r = 1 - Math.min(1, c * (1 - k) + k); - g = 1 - Math.min(1, m * (1 - k) + k); - b = 1 - Math.min(1, y * (1 - k) + k); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.rgb = function (xyz) { - var x = xyz[0] / 100; - var y = xyz[1] / 100; - var z = xyz[2] / 100; - var r; - var g; - var b; - - r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); - g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); - b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); - - // assume sRGB - r = r > 0.0031308 - ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) - : r * 12.92; - - g = g > 0.0031308 - ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) - : g * 12.92; - - b = b > 0.0031308 - ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) - : b * 12.92; - - r = Math.min(Math.max(0, r), 1); - g = Math.min(Math.max(0, g), 1); - b = Math.min(Math.max(0, b), 1); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.lab = function (xyz) { - var x = xyz[0]; - var y = xyz[1]; - var z = xyz[2]; - var l; - var a; - var b; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); - - l = (116 * y) - 16; - a = 500 * (x - y); - b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.lab.xyz = function (lab) { - var l = lab[0]; - var a = lab[1]; - var b = lab[2]; - var x; - var y; - var z; - - y = (l + 16) / 116; - x = a / 500 + y; - z = y - b / 200; - - var y2 = Math.pow(y, 3); - var x2 = Math.pow(x, 3); - var z2 = Math.pow(z, 3); - y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; - x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; - z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; - - x *= 95.047; - y *= 100; - z *= 108.883; - - return [x, y, z]; -}; - -convert.lab.lch = function (lab) { - var l = lab[0]; - var a = lab[1]; - var b = lab[2]; - var hr; - var h; - var c; - - hr = Math.atan2(b, a); - h = hr * 360 / 2 / Math.PI; - - if (h < 0) { - h += 360; - } - - c = Math.sqrt(a * a + b * b); - - return [l, c, h]; -}; - -convert.lch.lab = function (lch) { - var l = lch[0]; - var c = lch[1]; - var h = lch[2]; - var a; - var b; - var hr; - - hr = h / 360 * 2 * Math.PI; - a = c * Math.cos(hr); - b = c * Math.sin(hr); - - return [l, a, b]; -}; - -convert.rgb.ansi16 = function (args) { - var r = args[0]; - var g = args[1]; - var b = args[2]; - var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization - - value = Math.round(value / 50); - - if (value === 0) { - return 30; - } - - var ansi = 30 - + ((Math.round(b / 255) << 2) - | (Math.round(g / 255) << 1) - | Math.round(r / 255)); - - if (value === 2) { - ansi += 60; - } - - return ansi; -}; - -convert.hsv.ansi16 = function (args) { - // optimization here; we already know the value and don't need to get - // it converted for us. - return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); -}; - -convert.rgb.ansi256 = function (args) { - var r = args[0]; - var g = args[1]; - var b = args[2]; - - // we use the extended greyscale palette here, with the exception of - // black and white. normal palette only has 4 greyscale shades. - if (r === g && g === b) { - if (r < 8) { - return 16; - } - - if (r > 248) { - return 231; - } - - return Math.round(((r - 8) / 247) * 24) + 232; - } - - var ansi = 16 - + (36 * Math.round(r / 255 * 5)) - + (6 * Math.round(g / 255 * 5)) - + Math.round(b / 255 * 5); - - return ansi; -}; - -convert.ansi16.rgb = function (args) { - var color = args % 10; - - // handle greyscale - if (color === 0 || color === 7) { - if (args > 50) { - color += 3.5; - } - - color = color / 10.5 * 255; - - return [color, color, color]; - } - - var mult = (~~(args > 50) + 1) * 0.5; - var r = ((color & 1) * mult) * 255; - var g = (((color >> 1) & 1) * mult) * 255; - var b = (((color >> 2) & 1) * mult) * 255; - - return [r, g, b]; -}; - -convert.ansi256.rgb = function (args) { - // handle greyscale - if (args >= 232) { - var c = (args - 232) * 10 + 8; - return [c, c, c]; - } - - args -= 16; - - var rem; - var r = Math.floor(args / 36) / 5 * 255; - var g = Math.floor((rem = args % 36) / 6) / 5 * 255; - var b = (rem % 6) / 5 * 255; - - return [r, g, b]; -}; - -convert.rgb.hex = function (args) { - var integer = ((Math.round(args[0]) & 0xFF) << 16) - + ((Math.round(args[1]) & 0xFF) << 8) - + (Math.round(args[2]) & 0xFF); - - var string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.hex.rgb = function (args) { - var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); - if (!match) { - return [0, 0, 0]; - } - - var colorString = match[0]; - - if (match[0].length === 3) { - colorString = colorString.split('').map(function (char) { - return char + char; - }).join(''); - } - - var integer = parseInt(colorString, 16); - var r = (integer >> 16) & 0xFF; - var g = (integer >> 8) & 0xFF; - var b = integer & 0xFF; - - return [r, g, b]; -}; - -convert.rgb.hcg = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var max = Math.max(Math.max(r, g), b); - var min = Math.min(Math.min(r, g), b); - var chroma = (max - min); - var grayscale; - var hue; - - if (chroma < 1) { - grayscale = min / (1 - chroma); - } else { - grayscale = 0; - } - - if (chroma <= 0) { - hue = 0; - } else - if (max === r) { - hue = ((g - b) / chroma) % 6; - } else - if (max === g) { - hue = 2 + (b - r) / chroma; - } else { - hue = 4 + (r - g) / chroma + 4; - } - - hue /= 6; - hue %= 1; - - return [hue * 360, chroma * 100, grayscale * 100]; -}; - -convert.hsl.hcg = function (hsl) { - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var c = 1; - var f = 0; - - if (l < 0.5) { - c = 2.0 * s * l; - } else { - c = 2.0 * s * (1.0 - l); - } - - if (c < 1.0) { - f = (l - 0.5 * c) / (1.0 - c); - } - - return [hsl[0], c * 100, f * 100]; -}; - -convert.hsv.hcg = function (hsv) { - var s = hsv[1] / 100; - var v = hsv[2] / 100; - - var c = s * v; - var f = 0; - - if (c < 1.0) { - f = (v - c) / (1 - c); - } - - return [hsv[0], c * 100, f * 100]; -}; - -convert.hcg.rgb = function (hcg) { - var h = hcg[0] / 360; - var c = hcg[1] / 100; - var g = hcg[2] / 100; - - if (c === 0.0) { - return [g * 255, g * 255, g * 255]; - } - - var pure = [0, 0, 0]; - var hi = (h % 1) * 6; - var v = hi % 1; - var w = 1 - v; - var mg = 0; - - switch (Math.floor(hi)) { - case 0: - pure[0] = 1; pure[1] = v; pure[2] = 0; break; - case 1: - pure[0] = w; pure[1] = 1; pure[2] = 0; break; - case 2: - pure[0] = 0; pure[1] = 1; pure[2] = v; break; - case 3: - pure[0] = 0; pure[1] = w; pure[2] = 1; break; - case 4: - pure[0] = v; pure[1] = 0; pure[2] = 1; break; - default: - pure[0] = 1; pure[1] = 0; pure[2] = w; - } - - mg = (1.0 - c) * g; - - return [ - (c * pure[0] + mg) * 255, - (c * pure[1] + mg) * 255, - (c * pure[2] + mg) * 255 - ]; -}; - -convert.hcg.hsv = function (hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - - var v = c + g * (1.0 - c); - var f = 0; - - if (v > 0.0) { - f = c / v; - } - - return [hcg[0], f * 100, v * 100]; -}; - -convert.hcg.hsl = function (hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - - var l = g * (1.0 - c) + 0.5 * c; - var s = 0; - - if (l > 0.0 && l < 0.5) { - s = c / (2 * l); - } else - if (l >= 0.5 && l < 1.0) { - s = c / (2 * (1 - l)); - } - - return [hcg[0], s * 100, l * 100]; -}; - -convert.hcg.hwb = function (hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - var v = c + g * (1.0 - c); - return [hcg[0], (v - c) * 100, (1 - v) * 100]; -}; - -convert.hwb.hcg = function (hwb) { - var w = hwb[1] / 100; - var b = hwb[2] / 100; - var v = 1 - b; - var c = v - w; - var g = 0; - - if (c < 1) { - g = (v - c) / (1 - c); - } - - return [hwb[0], c * 100, g * 100]; -}; - -convert.apple.rgb = function (apple) { - return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; -}; - -convert.rgb.apple = function (rgb) { - return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; -}; - -convert.gray.rgb = function (args) { - return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; -}; - -convert.gray.hsl = convert.gray.hsv = function (args) { - return [0, 0, args[0]]; -}; - -convert.gray.hwb = function (gray) { - return [0, 100, gray[0]]; -}; - -convert.gray.cmyk = function (gray) { - return [0, 0, 0, gray[0]]; -}; - -convert.gray.lab = function (gray) { - return [gray[0], 0, 0]; -}; - -convert.gray.hex = function (gray) { - var val = Math.round(gray[0] / 100 * 255) & 0xFF; - var integer = (val << 16) + (val << 8) + val; - - var string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.rgb.gray = function (rgb) { - var val = (rgb[0] + rgb[1] + rgb[2]) / 3; - return [val / 255 * 100]; -}; diff --git a/node_modules/color-convert/index.js b/node_modules/color-convert/index.js deleted file mode 100644 index e65b5d77..00000000 --- a/node_modules/color-convert/index.js +++ /dev/null @@ -1,78 +0,0 @@ -var conversions = require('./conversions'); -var route = require('./route'); - -var convert = {}; - -var models = Object.keys(conversions); - -function wrapRaw(fn) { - var wrappedFn = function (args) { - if (args === undefined || args === null) { - return args; - } - - if (arguments.length > 1) { - args = Array.prototype.slice.call(arguments); - } - - return fn(args); - }; - - // preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -function wrapRounded(fn) { - var wrappedFn = function (args) { - if (args === undefined || args === null) { - return args; - } - - if (arguments.length > 1) { - args = Array.prototype.slice.call(arguments); - } - - var result = fn(args); - - // we're assuming the result is an array here. - // see notice in conversions.js; don't use box types - // in conversion functions. - if (typeof result === 'object') { - for (var len = result.length, i = 0; i < len; i++) { - result[i] = Math.round(result[i]); - } - } - - return result; - }; - - // preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -models.forEach(function (fromModel) { - convert[fromModel] = {}; - - Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); - Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); - - var routes = route(fromModel); - var routeModels = Object.keys(routes); - - routeModels.forEach(function (toModel) { - var fn = routes[toModel]; - - convert[fromModel][toModel] = wrapRounded(fn); - convert[fromModel][toModel].raw = wrapRaw(fn); - }); -}); - -module.exports = convert; diff --git a/node_modules/color-convert/package.json b/node_modules/color-convert/package.json deleted file mode 100644 index 21aab919..00000000 --- a/node_modules/color-convert/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "color-convert@^1.9.0", - "_id": "color-convert@1.9.3", - "_inBundle": false, - "_integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "_location": "/color-convert", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "color-convert@^1.9.0", - "name": "color-convert", - "escapedName": "color-convert", - "rawSpec": "^1.9.0", - "saveSpec": null, - "fetchSpec": "^1.9.0" - }, - "_requiredBy": [ - "/ansi-styles" - ], - "_resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "_shasum": "bb71850690e1f136567de629d2d5471deda4c1e8", - "_spec": "color-convert@^1.9.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/ansi-styles", - "author": { - "name": "Heather Arthur", - "email": "fayearthur@gmail.com" - }, - "bugs": { - "url": "https://github.com/Qix-/color-convert/issues" - }, - "bundleDependencies": false, - "dependencies": { - "color-name": "1.1.3" - }, - "deprecated": false, - "description": "Plain color conversion functions", - "devDependencies": { - "chalk": "1.1.1", - "xo": "0.11.2" - }, - "files": [ - "index.js", - "conversions.js", - "css-keywords.js", - "route.js" - ], - "homepage": "https://github.com/Qix-/color-convert#readme", - "keywords": [ - "color", - "colour", - "convert", - "converter", - "conversion", - "rgb", - "hsl", - "hsv", - "hwb", - "cmyk", - "ansi", - "ansi16" - ], - "license": "MIT", - "name": "color-convert", - "repository": { - "type": "git", - "url": "git+https://github.com/Qix-/color-convert.git" - }, - "scripts": { - "pretest": "xo", - "test": "node test/basic.js" - }, - "version": "1.9.3", - "xo": { - "rules": { - "default-case": 0, - "no-inline-comments": 0, - "operator-linebreak": 0 - } - } -} diff --git a/node_modules/color-convert/route.js b/node_modules/color-convert/route.js deleted file mode 100644 index 0a1fdea6..00000000 --- a/node_modules/color-convert/route.js +++ /dev/null @@ -1,97 +0,0 @@ -var conversions = require('./conversions'); - -/* - this function routes a model to all other models. - - all functions that are routed have a property `.conversion` attached - to the returned synthetic function. This property is an array - of strings, each with the steps in between the 'from' and 'to' - color models (inclusive). - - conversions that are not possible simply are not included. -*/ - -function buildGraph() { - var graph = {}; - // https://jsperf.com/object-keys-vs-for-in-with-closure/3 - var models = Object.keys(conversions); - - for (var len = models.length, i = 0; i < len; i++) { - graph[models[i]] = { - // http://jsperf.com/1-vs-infinity - // micro-opt, but this is simple. - distance: -1, - parent: null - }; - } - - return graph; -} - -// https://en.wikipedia.org/wiki/Breadth-first_search -function deriveBFS(fromModel) { - var graph = buildGraph(); - var queue = [fromModel]; // unshift -> queue -> pop - - graph[fromModel].distance = 0; - - while (queue.length) { - var current = queue.pop(); - var adjacents = Object.keys(conversions[current]); - - for (var len = adjacents.length, i = 0; i < len; i++) { - var adjacent = adjacents[i]; - var node = graph[adjacent]; - - if (node.distance === -1) { - node.distance = graph[current].distance + 1; - node.parent = current; - queue.unshift(adjacent); - } - } - } - - return graph; -} - -function link(from, to) { - return function (args) { - return to(from(args)); - }; -} - -function wrapConversion(toModel, graph) { - var path = [graph[toModel].parent, toModel]; - var fn = conversions[graph[toModel].parent][toModel]; - - var cur = graph[toModel].parent; - while (graph[cur].parent) { - path.unshift(graph[cur].parent); - fn = link(conversions[graph[cur].parent][cur], fn); - cur = graph[cur].parent; - } - - fn.conversion = path; - return fn; -} - -module.exports = function (fromModel) { - var graph = deriveBFS(fromModel); - var conversion = {}; - - var models = Object.keys(graph); - for (var len = models.length, i = 0; i < len; i++) { - var toModel = models[i]; - var node = graph[toModel]; - - if (node.parent === null) { - // no possible conversion, or this node is the source model. - continue; - } - - conversion[toModel] = wrapConversion(toModel, graph); - } - - return conversion; -}; - diff --git a/node_modules/color-name/.eslintrc.json b/node_modules/color-name/.eslintrc.json deleted file mode 100644 index c50c2504..00000000 --- a/node_modules/color-name/.eslintrc.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "env": { - "browser": true, - "node": true, - "commonjs": true, - "es6": true - }, - "extends": "eslint:recommended", - "rules": { - "strict": 2, - "indent": 0, - "linebreak-style": 0, - "quotes": 0, - "semi": 0, - "no-cond-assign": 1, - "no-constant-condition": 1, - "no-duplicate-case": 1, - "no-empty": 1, - "no-ex-assign": 1, - "no-extra-boolean-cast": 1, - "no-extra-semi": 1, - "no-fallthrough": 1, - "no-func-assign": 1, - "no-global-assign": 1, - "no-implicit-globals": 2, - "no-inner-declarations": ["error", "functions"], - "no-irregular-whitespace": 2, - "no-loop-func": 1, - "no-multi-str": 1, - "no-mixed-spaces-and-tabs": 1, - "no-proto": 1, - "no-sequences": 1, - "no-throw-literal": 1, - "no-unmodified-loop-condition": 1, - "no-useless-call": 1, - "no-void": 1, - "no-with": 2, - "wrap-iife": 1, - "no-redeclare": 1, - "no-unused-vars": ["error", { "vars": "all", "args": "none" }], - "no-sparse-arrays": 1 - } -} diff --git a/node_modules/color-name/.npmignore b/node_modules/color-name/.npmignore deleted file mode 100644 index f9f28164..00000000 --- a/node_modules/color-name/.npmignore +++ /dev/null @@ -1,107 +0,0 @@ -//this will affect all the git repos -git config --global core.excludesfile ~/.gitignore - - -//update files since .ignore won't if already tracked -git rm --cached <file> - -# Compiled source # -################### -*.com -*.class -*.dll -*.exe -*.o -*.so - -# Packages # -############ -# it's better to unpack these files and commit the raw source -# git has its own built in compression methods -*.7z -*.dmg -*.gz -*.iso -*.jar -*.rar -*.tar -*.zip - -# Logs and databases # -###################### -*.log -*.sql -*.sqlite - -# OS generated files # -###################### -.DS_Store -.DS_Store? -._* -.Spotlight-V100 -.Trashes -# Icon? -ehthumbs.db -Thumbs.db -.cache -.project -.settings -.tmproj -*.esproj -nbproject - -# Numerous always-ignore extensions # -##################################### -*.diff -*.err -*.orig -*.rej -*.swn -*.swo -*.swp -*.vi -*~ -*.sass-cache -*.grunt -*.tmp - -# Dreamweaver added files # -########################### -_notes -dwsync.xml - -# Komodo # -########################### -*.komodoproject -.komodotools - -# Node # -##################### -node_modules - -# Bower # -##################### -bower_components - -# Folders to ignore # -##################### -.hg -.svn -.CVS -intermediate -publish -.idea -.graphics -_test -_archive -uploads -tmp - -# Vim files to ignore # -####################### -.VimballRecord -.netrwhist - -bundle.* - -_demo \ No newline at end of file diff --git a/node_modules/color-name/LICENSE b/node_modules/color-name/LICENSE deleted file mode 100644 index c6b10012..00000000 --- a/node_modules/color-name/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/color-name/README.md b/node_modules/color-name/README.md deleted file mode 100644 index 932b9791..00000000 --- a/node_modules/color-name/README.md +++ /dev/null @@ -1,11 +0,0 @@ -A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. - -[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) - - -```js -var colors = require('color-name'); -colors.red //[255,0,0] -``` - -<a href="LICENSE"><img src="https://upload.wikimedia.org/wikipedia/commons/0/0c/MIT_logo.svg" width="120"/></a> diff --git a/node_modules/color-name/index.js b/node_modules/color-name/index.js deleted file mode 100644 index b7c198a6..00000000 --- a/node_modules/color-name/index.js +++ /dev/null @@ -1,152 +0,0 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; diff --git a/node_modules/color-name/package.json b/node_modules/color-name/package.json deleted file mode 100644 index 34d1d2d0..00000000 --- a/node_modules/color-name/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "_from": "color-name@1.1.3", - "_id": "color-name@1.1.3", - "_inBundle": false, - "_integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "_location": "/color-name", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "color-name@1.1.3", - "name": "color-name", - "escapedName": "color-name", - "rawSpec": "1.1.3", - "saveSpec": null, - "fetchSpec": "1.1.3" - }, - "_requiredBy": [ - "/color-convert" - ], - "_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "_shasum": "a7d0558bd89c42f795dd42328f740831ca53bc25", - "_spec": "color-name@1.1.3", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/color-convert", - "author": { - "name": "DY", - "email": "dfcreative@gmail.com" - }, - "bugs": { - "url": "https://github.com/dfcreative/color-name/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A list of color names and its values", - "homepage": "https://github.com/dfcreative/color-name", - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "license": "MIT", - "main": "index.js", - "name": "color-name", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/dfcreative/color-name.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.1.3" -} diff --git a/node_modules/color-name/test.js b/node_modules/color-name/test.js deleted file mode 100644 index 6e6bf30b..00000000 --- a/node_modules/color-name/test.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -var names = require('./'); -var assert = require('assert'); - -assert.deepEqual(names.red, [255,0,0]); -assert.deepEqual(names.aliceblue, [240,248,255]); diff --git a/node_modules/commander/CHANGELOG.md b/node_modules/commander/CHANGELOG.md deleted file mode 100644 index 0b55881b..00000000 --- a/node_modules/commander/CHANGELOG.md +++ /dev/null @@ -1,440 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). (Format adopted after v3.0.0.) - -<!-- markdownlint-disable MD024 --> -<!-- markdownlint-disable MD004 --> - -## [7.2.0] (2021-03-26) - -### Added - -- TypeScript typing for `parent` property on `Command` ([#1475]) -- TypeScript typing for `.attributeName()` on `Option` ([#1483]) -- support information in package ([#1477]) - -### Changed - -- improvements to error messages, README, and tests -- update dependencies - -## [7.1.0] (2021-02-15) - -### Added - -- support for named imports from ECMAScript modules ([#1440]) -- add `.cjs` to list of expected script file extensions ([#1449]) -- allow using option choices and variadic together ([#1454]) - -### Fixed - -- replace use of deprecated `process.mainModule` ([#1448]) -- regression for legacy `command('*')` and call when command line includes options ([#1464]) -- regression for `on('command:*', ...)` and call when command line includes unknown options ([#1464]) -- display best error for combination of unknown command and unknown option (i.e. unknown command) ([#1464]) - -### Changed - -- make TypeScript typings tests stricter ([#1453]) -- improvements to README and tests - -## [7.0.0] (2021-01-15) - -### Added - -- `.enablePositionalOptions()` to let program and subcommand reuse same option ([#1427]) -- `.passThroughOptions()` to pass options through to other programs without needing `--` ([#1427]) -- `.allowExcessArguments(false)` to show an error message if there are too many command-arguments on command line for the action handler ([#1409]) -- `.configureOutput()` to modify use of stdout and stderr or customise display of errors ([#1387]) -- use `.addHelpText()` to add text before or after the built-in help, for just current command or also for all subcommands ([#1296]) -- enhance Option class ([#1331]) - - allow hiding options from help - - allow restricting option arguments to a list of choices - - allow setting how default value is shown in help -- `.createOption()` to support subclassing of automatically created options (like `.createCommand()`) ([#1380]) -- refactor the code generating the help into a separate public Help class ([#1365]) - - support sorting subcommands and options in help - - support specifying wrap width (columns) - - allow subclassing Help class - - allow configuring Help class without subclassing - -### Changed - -- *Breaking:* options are stored safely by default, not as properties on the command ([#1409]) - - this especially affects accessing options on program, use `program.opts()` - - revert behaviour with `.storeOptionsAsProperties()` -- *Breaking:* action handlers are passed options and command separately ([#1409]) -- deprecated callback parameter to `.help()` and `.outputHelp()` (removed from README) ([#1296]) -- *Breaking:* errors now displayed using `process.stderr.write()` instead of `console.error()` -- deprecate `.on('--help')` (removed from README) ([#1296]) -- initialise the command description to empty string (previously undefined) ([#1365]) -- document and annotate deprecated routines ([#1349]) - -### Fixed - -- wrapping bugs in help ([#1365]) - - first line of command description was wrapping two characters early - - pad width calculation was not including help option and help command - - pad width calculation was including hidden options and commands -- improve backwards compatibility for custom command event listeners ([#1403]) - -### Deleted - -- *Breaking:* `.passCommandToAction()` ([#1409]) - - no longer needed as action handler is passed options and command -- *Breaking:* "extra arguments" parameter to action handler ([#1409]) - - if being used to detect excess arguments, there is now an error available by setting `.allowExcessArguments(false)` - -### Migration Tips - -The biggest change is the parsed option values. Previously the options were stored by default as properties on the command object, and now the options are stored separately. - -If you wish to restore the old behaviour and get running quickly you can call `.storeOptionsAsProperties()`. -To allow you to move to the new code patterns incrementally, the action handler will be passed the command _twice_, -to match the new "options" and "command" parameters (see below). - -**program options** - -Use the `.opts()` method to access the options. This is available on any command but is used most with the program. - -```js -program.option('-d, --debug'); -program.parse(); -// Old code before Commander 7 -if (program.debug) console.log(`Program name is ${program.name()}`); -``` - -```js -// New code -const options = program.opts(); -if (options.debug) console.log(`Program name is ${program.name()}`); -``` - -**action handler** - -The action handler gets passed a parameter for each command-argument you declared. Previously by default the next parameter was the command object with the options as properties. Now the next two parameters are instead the options and the command. If you -only accessed the options there may be no code changes required. - -```js -program - .command('compress <filename>') - .option('-t, --trace') - // Old code before Commander 7 - .action((filename, cmd)) => { - if (cmd.trace) console.log(`Command name is ${cmd.name()}`); - }); -``` - -```js - // New code - .action((filename, options, command)) => { - if (options.trace) console.log(`Command name is ${command.name()}`); - }); -``` - -If you already set `.storeOptionsAsProperties(false)` you may still need to adjust your code. - -```js -program - .command('compress <filename>') - .storeOptionsAsProperties(false) - .option('-t, --trace') - // Old code before Commander 7 - .action((filename, command)) => { - if (command.opts().trace) console.log(`Command name is ${command.name()}`); - }); -``` - -```js - // New code - .action((filename, options, command)) => { - if (command.opts().trace) console.log(`Command name is ${command.name()}`); - }); -``` - -## [7.0.0-2] (2020-12-14) - -(Released in 7.0.0) - -## [7.0.0-1] (2020-11-21) - -(Released in 7.0.0) - -## [7.0.0-0] (2020-10-25) - -(Released in 7.0.0) - -## [6.2.1] (2020-12-13) - -### Fixed - -- some tests failed if directory path included a space ([1390]) - -## [6.2.0] (2020-10-25) - -### Added - -- added 'tsx' file extension for stand-alone executable subcommands ([#1368]) -- documented second parameter to `.description()` to describe command arguments ([#1353]) -- documentation of special cases with options taking varying numbers of option-arguments ([#1332]) -- documentation for terminology ([#1361]) - -### Fixed - -- add missing TypeScript definition for `.addHelpCommand()' ([#1375]) -- removed blank line after "Arguments:" in help, to match "Options:" and "Commands:" ([#1360]) - -### Changed - -- update dependencies - -## [6.1.0] (2020-08-28) - -### Added - -- include URL to relevant section of README for error for potential conflict between Command properties and option values ([#1306]) -- `.combineFlagAndOptionalValue(false)` to ease upgrade path from older versions of Commander ([#1326]) -- allow disabling the built-in help option using `.helpOption(false)` ([#1325]) -- allow just some arguments in `argumentDescription` to `.description()` ([#1323]) - -### Changed - -- tidy async test and remove lint override ([#1312]) - -### Fixed - -- executable subcommand launching when script path not known ([#1322]) - -## [6.0.0] (2020-07-21) - -### Added - -- add support for variadic options ([#1250]) -- allow options to be added with just a short flag ([#1256]) - - *Breaking* the option property has same case as flag. e.g. flag `-n` accessed as `opts().n` (previously uppercase) -- *Breaking* throw an error if there might be a clash between option name and a Command property, with advice on how to resolve ([#1275]) - -### Fixed - -- Options which contain -no- in the middle of the option flag should not be treated as negatable. ([#1301]) - -## [6.0.0-0] (2020-06-20) - -(Released in 6.0.0) - -## [5.1.0] (2020-04-25) - -### Added - -- support for multiple command aliases, the first of which is shown in the auto-generated help ([#531], [#1236]) -- configuration support in `addCommand()` for `hidden` and `isDefault` ([#1232]) - -### Fixed - -- omit masked help flags from the displayed help ([#645], [#1247]) -- remove old short help flag when change help flags using `helpOption` ([#1248]) - -### Changed - -- remove use of `arguments` to improve auto-generated help in editors ([#1235]) -- rename `.command()` configuration `noHelp` to `hidden` (but not remove old support) ([#1232]) -- improvements to documentation -- update dependencies -- update tested versions of node -- eliminate lint errors in TypeScript ([#1208]) - -## [5.0.0] (2020-03-14) - -### Added - -* support for nested commands with action-handlers ([#1] [#764] [#1149]) -* `.addCommand()` for adding a separately configured command ([#764] [#1149]) -* allow a non-executable to be set as the default command ([#742] [#1149]) -* implicit help command when there are subcommands (previously only if executables) ([#1149]) -* customise implicit help command with `.addHelpCommand()` ([#1149]) -* display error message for unknown subcommand, by default ([#432] [#1088] [#1149]) -* display help for missing subcommand, by default ([#1088] [#1149]) -* combined short options as single argument may include boolean flags and value flag and value (e.g. `-a -b -p 80` can be written as `-abp80`) ([#1145]) -* `.parseOption()` includes short flag and long flag expansions ([#1145]) -* `.helpInformation()` returns help text as a string, previously a private routine ([#1169]) -* `.parse()` implicitly uses `process.argv` if arguments not specified ([#1172]) -* optionally specify where `.parse()` arguments "from", if not following node conventions ([#512] [#1172]) -* suggest help option along with unknown command error ([#1179]) -* TypeScript definition for `commands` property of `Command` ([#1184]) -* export `program` property ([#1195]) -* `createCommand` factory method to simplify subclassing ([#1191]) - -### Fixed - -* preserve argument order in subcommands ([#508] [#962] [#1138]) -* do not emit `command:*` for executable subcommands ([#809] [#1149]) -* action handler called whether or not there are non-option arguments ([#1062] [#1149]) -* combining option short flag and value in single argument now works for subcommands ([#1145]) -* only add implicit help command when it will not conflict with other uses of argument ([#1153] [#1149]) -* implicit help command works with command aliases ([#948] [#1149]) -* options are validated whether or not there is an action handler ([#1149]) - -### Changed - -* *Breaking* `.args` contains command arguments with just recognised options removed ([#1032] [#1138]) -* *Breaking* display error if required argument for command is missing ([#995] [#1149]) -* tighten TypeScript definition of custom option processing function passed to `.option()` ([#1119]) -* *Breaking* `.allowUnknownOption()` ([#802] [#1138]) - * unknown options included in arguments passed to command action handler - * unknown options included in `.args` -* only recognised option short flags and long flags are expanded (e.g. `-ab` or `--foo=bar`) ([#1145]) -* *Breaking* `.parseOptions()` ([#1138]) - * `args` in returned result renamed `operands` and does not include anything after first unknown option - * `unknown` in returned result has arguments after first unknown option including operands, not just options and values -* *Breaking* `.on('command:*', callback)` and other command events passed (changed) results from `.parseOptions`, i.e. operands and unknown ([#1138]) -* refactor Option from prototype to class ([#1133]) -* refactor Command from prototype to class ([#1159]) -* changes to error handling ([#1165]) - * throw for author error, not just display message - * preflight for variadic error - * add tips to missing subcommand executable -* TypeScript fluent return types changed to be more subclass friendly, return `this` rather than `Command` ([#1180]) -* `.parseAsync` returns `Promise<this>` to be consistent with `.parse()` ([#1180]) -* update dependencies - -### Removed - -* removed EventEmitter from TypeScript definition for Command, eliminating implicit peer dependency on `@types/node` ([#1146]) -* removed private function `normalize` (the functionality has been integrated into `parseOptions`) ([#1145]) -* `parseExpectedArgs` is now private ([#1149]) - -### Migration Tips - -If you use `.on('command:*')` or more complicated tests to detect an unrecognised subcommand, you may be able to delete the code and rely on the default behaviour. - -If you use `program.args` or more complicated tests to detect a missing subcommand, you may be able to delete the code and rely on the default behaviour. - -If you use `.command('*')` to add a default command, you may be be able to switch to `isDefault:true` with a named command. - -If you want to continue combining short options with optional values as though they were boolean flags, set `combineFlagAndOptionalValue(false)` -to expand `-fb` to `-f -b` rather than `-f b`. - -## [5.0.0-4] (2020-03-03) - -(Released in 5.0.0) - -## [5.0.0-3] (2020-02-20) - -(Released in 5.0.0) - -## [5.0.0-2] (2020-02-10) - -(Released in 5.0.0) - -## [5.0.0-1] (2020-02-08) - -(Released in 5.0.0) - -## [5.0.0-0] (2020-02-02) - -(Released in 5.0.0) - -## Older versions - -* [4.x](./changelogs/CHANGELOG-4.md) -* [3.x](./changelogs/CHANGELOG-3.md) -* [2.x](./changelogs/CHANGELOG-2.md) -* [1.x](./changelogs/CHANGELOG-1.md) -* [0.x](./changelogs/CHANGELOG-0.md) - -[#1]: https://github.com/tj/commander.js/issues/1 -[#432]: https://github.com/tj/commander.js/issues/432 -[#508]: https://github.com/tj/commander.js/issues/508 -[#512]: https://github.com/tj/commander.js/issues/512 -[#531]: https://github.com/tj/commander.js/issues/531 -[#645]: https://github.com/tj/commander.js/issues/645 -[#742]: https://github.com/tj/commander.js/issues/742 -[#764]: https://github.com/tj/commander.js/issues/764 -[#802]: https://github.com/tj/commander.js/issues/802 -[#809]: https://github.com/tj/commander.js/issues/809 -[#948]: https://github.com/tj/commander.js/issues/948 -[#962]: https://github.com/tj/commander.js/issues/962 -[#995]: https://github.com/tj/commander.js/issues/995 -[#1032]: https://github.com/tj/commander.js/issues/1032 -[#1062]: https://github.com/tj/commander.js/pull/1062 -[#1088]: https://github.com/tj/commander.js/issues/1088 -[#1119]: https://github.com/tj/commander.js/pull/1119 -[#1133]: https://github.com/tj/commander.js/pull/1133 -[#1138]: https://github.com/tj/commander.js/pull/1138 -[#1145]: https://github.com/tj/commander.js/pull/1145 -[#1146]: https://github.com/tj/commander.js/pull/1146 -[#1149]: https://github.com/tj/commander.js/pull/1149 -[#1153]: https://github.com/tj/commander.js/issues/1153 -[#1159]: https://github.com/tj/commander.js/pull/1159 -[#1165]: https://github.com/tj/commander.js/pull/1165 -[#1169]: https://github.com/tj/commander.js/pull/1169 -[#1172]: https://github.com/tj/commander.js/pull/1172 -[#1179]: https://github.com/tj/commander.js/pull/1179 -[#1180]: https://github.com/tj/commander.js/pull/1180 -[#1184]: https://github.com/tj/commander.js/pull/1184 -[#1191]: https://github.com/tj/commander.js/pull/1191 -[#1195]: https://github.com/tj/commander.js/pull/1195 -[#1208]: https://github.com/tj/commander.js/pull/1208 -[#1232]: https://github.com/tj/commander.js/pull/1232 -[#1235]: https://github.com/tj/commander.js/pull/1235 -[#1236]: https://github.com/tj/commander.js/pull/1236 -[#1247]: https://github.com/tj/commander.js/pull/1247 -[#1248]: https://github.com/tj/commander.js/pull/1248 -[#1250]: https://github.com/tj/commander.js/pull/1250 -[#1256]: https://github.com/tj/commander.js/pull/1256 -[#1275]: https://github.com/tj/commander.js/pull/1275 -[#1296]: https://github.com/tj/commander.js/pull/1296 -[#1301]: https://github.com/tj/commander.js/issues/1301 -[#1306]: https://github.com/tj/commander.js/pull/1306 -[#1312]: https://github.com/tj/commander.js/pull/1312 -[#1322]: https://github.com/tj/commander.js/pull/1322 -[#1323]: https://github.com/tj/commander.js/pull/1323 -[#1325]: https://github.com/tj/commander.js/pull/1325 -[#1326]: https://github.com/tj/commander.js/pull/1326 -[#1331]: https://github.com/tj/commander.js/pull/1331 -[#1332]: https://github.com/tj/commander.js/pull/1332 -[#1349]: https://github.com/tj/commander.js/pull/1349 -[#1353]: https://github.com/tj/commander.js/pull/1353 -[#1360]: https://github.com/tj/commander.js/pull/1360 -[#1361]: https://github.com/tj/commander.js/pull/1361 -[#1365]: https://github.com/tj/commander.js/pull/1365 -[#1368]: https://github.com/tj/commander.js/pull/1368 -[#1375]: https://github.com/tj/commander.js/pull/1375 -[#1380]: https://github.com/tj/commander.js/pull/1380 -[#1387]: https://github.com/tj/commander.js/pull/1387 -[#1390]: https://github.com/tj/commander.js/pull/1390 -[#1403]: https://github.com/tj/commander.js/pull/1403 -[#1409]: https://github.com/tj/commander.js/pull/1409 -[#1427]: https://github.com/tj/commander.js/pull/1427 -[#1440]: https://github.com/tj/commander.js/pull/1440 -[#1448]: https://github.com/tj/commander.js/pull/1448 -[#1449]: https://github.com/tj/commander.js/pull/1449 -[#1453]: https://github.com/tj/commander.js/pull/1453 -[#1454]: https://github.com/tj/commander.js/pull/1454 -[#1464]: https://github.com/tj/commander.js/pull/1464 -[#1475]: https://github.com/tj/commander.js/pull/1475 -[#1477]: https://github.com/tj/commander.js/pull/1477 -[#1483]: https://github.com/tj/commander.js/pull/1483 - -[Unreleased]: https://github.com/tj/commander.js/compare/master...develop -[7.2.0]: https://github.com/tj/commander.js/compare/v7.1.0...v7.2.0 -[7.1.0]: https://github.com/tj/commander.js/compare/v7.0.0...v7.1.0 -[7.0.0]: https://github.com/tj/commander.js/compare/v6.2.1...v7.0.0 -[7.0.0-2]: https://github.com/tj/commander.js/compare/v7.0.0-1...v7.0.0-2 -[7.0.0-1]: https://github.com/tj/commander.js/compare/v7.0.0-0...v7.0.0-1 -[7.0.0-0]: https://github.com/tj/commander.js/compare/v6.2.0...v7.0.0-0 -[6.2.1]: https://github.com/tj/commander.js/compare/v6.2.0..v6.2.1 -[6.2.0]: https://github.com/tj/commander.js/compare/v6.1.0..v6.2.0 -[6.1.0]: https://github.com/tj/commander.js/compare/v6.0.0..v6.1.0 -[6.0.0]: https://github.com/tj/commander.js/compare/v5.1.0..v6.0.0 -[6.0.0-0]: https://github.com/tj/commander.js/compare/v5.1.0..v6.0.0-0 -[5.1.0]: https://github.com/tj/commander.js/compare/v5.0.0..v5.1.0 -[5.0.0]: https://github.com/tj/commander.js/compare/v4.1.1..v5.0.0 -[5.0.0-4]: https://github.com/tj/commander.js/compare/v5.0.0-3..v5.0.0-4 -[5.0.0-3]: https://github.com/tj/commander.js/compare/v5.0.0-2..v5.0.0-3 -[5.0.0-2]: https://github.com/tj/commander.js/compare/v5.0.0-1..v5.0.0-2 -[5.0.0-1]: https://github.com/tj/commander.js/compare/v5.0.0-0..v5.0.0-1 -[5.0.0-0]: https://github.com/tj/commander.js/compare/v4.1.1..v5.0.0-0 diff --git a/node_modules/commander/LICENSE b/node_modules/commander/LICENSE deleted file mode 100644 index 10f997ab..00000000 --- a/node_modules/commander/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/commander/Readme.md b/node_modules/commander/Readme.md deleted file mode 100644 index d2a88a7b..00000000 --- a/node_modules/commander/Readme.md +++ /dev/null @@ -1,917 +0,0 @@ -# Commander.js - -[![Build Status](https://github.com/tj/commander.js/workflows/build/badge.svg)](https://github.com/tj/commander.js/actions?query=workflow%3A%22build%22) -[![NPM Version](http://img.shields.io/npm/v/commander.svg?style=flat)](https://www.npmjs.org/package/commander) -[![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://npmcharts.com/compare/commander?minimal=true) -[![Install Size](https://packagephobia.now.sh/badge?p=commander)](https://packagephobia.now.sh/result?p=commander) - -The complete solution for [node.js](http://nodejs.org) command-line interfaces. - -Read this in other languages: English | [简体中文](./Readme_zh-CN.md) - -- [Commander.js](#commanderjs) - - [Installation](#installation) - - [Declaring _program_ variable](#declaring-program-variable) - - [Options](#options) - - [Common option types, boolean and value](#common-option-types-boolean-and-value) - - [Default option value](#default-option-value) - - [Other option types, negatable boolean and boolean|value](#other-option-types-negatable-boolean-and-booleanvalue) - - [Required option](#required-option) - - [Variadic option](#variadic-option) - - [Version option](#version-option) - - [More configuration](#more-configuration) - - [Custom option processing](#custom-option-processing) - - [Commands](#commands) - - [Specify the argument syntax](#specify-the-argument-syntax) - - [Action handler](#action-handler) - - [Stand-alone executable (sub)commands](#stand-alone-executable-subcommands) - - [Automated help](#automated-help) - - [Custom help](#custom-help) - - [Display help from code](#display-help-from-code) - - [.usage and .name](#usage-and-name) - - [.helpOption(flags, description)](#helpoptionflags-description) - - [.addHelpCommand()](#addhelpcommand) - - [More configuration](#more-configuration-1) - - [Custom event listeners](#custom-event-listeners) - - [Bits and pieces](#bits-and-pieces) - - [.parse() and .parseAsync()](#parse-and-parseasync) - - [Parsing Configuration](#parsing-configuration) - - [Legacy options as properties](#legacy-options-as-properties) - - [TypeScript](#typescript) - - [createCommand()](#createcommand) - - [Node options such as `--harmony`](#node-options-such-as---harmony) - - [Debugging stand-alone executable subcommands](#debugging-stand-alone-executable-subcommands) - - [Override exit and output handling](#override-exit-and-output-handling) - - [Additional documentation](#additional-documentation) - - [Examples](#examples) - - [Support](#support) - - [Commander for enterprise](#commander-for-enterprise) - -For information about terms used in this document see: [terminology](./docs/terminology.md) - -## Installation - -```bash -npm install commander -``` - -## Declaring _program_ variable - -Commander exports a global object which is convenient for quick programs. -This is used in the examples in this README for brevity. - -```js -const { program } = require('commander'); -program.version('0.0.1'); -``` - -For larger programs which may use commander in multiple ways, including unit testing, it is better to create a local Command object to use. - -```js -const { Command } = require('commander'); -const program = new Command(); -program.version('0.0.1'); -``` - -For named imports in ECMAScript modules, import from `commander/esm.mjs`. - -```js -// index.mjs -import { Command } from 'commander/esm.mjs'; -const program = new Command(); -``` - -And in TypeScript: - -```ts -// index.ts -import { Command } from 'commander'; -const program = new Command(); -``` - - -## Options - -Options are defined with the `.option()` method, also serving as documentation for the options. Each option can have a short flag (single character) and a long name, separated by a comma or space or vertical bar ('|'). - -The parsed options can be accessed by calling `.opts()` on a `Command` object, and are passed to the action handler. Multi-word options such as "--template-engine" are camel-cased, becoming `program.opts().templateEngine` etc. - -Multiple short flags may optionally be combined in a single argument following the dash: boolean flags, followed by a single option taking a value (possibly followed by the value). -For example `-a -b -p 80` may be written as `-ab -p80` or even `-abp80`. - -You can use `--` to indicate the end of the options, and any remaining arguments will be used without being interpreted. - -By default options on the command line are not positional, and can be specified before or after other arguments. - -### Common option types, boolean and value - -The two most used option types are a boolean option, and an option which takes its value -from the following argument (declared with angle brackets like `--expect <value>`). Both are `undefined` unless specified on command line. - -Example file: [options-common.js](./examples/options-common.js) - -```js -program - .option('-d, --debug', 'output extra debugging') - .option('-s, --small', 'small pizza size') - .option('-p, --pizza-type <type>', 'flavour of pizza'); - -program.parse(process.argv); - -const options = program.opts(); -if (options.debug) console.log(options); -console.log('pizza details:'); -if (options.small) console.log('- small pizza size'); -if (options.pizzaType) console.log(`- ${options.pizzaType}`); -``` - -```bash -$ pizza-options -d -{ debug: true, small: undefined, pizzaType: undefined } -pizza details: -$ pizza-options -p -error: option '-p, --pizza-type <type>' argument missing -$ pizza-options -ds -p vegetarian -{ debug: true, small: true, pizzaType: 'vegetarian' } -pizza details: -- small pizza size -- vegetarian -$ pizza-options --pizza-type=cheese -pizza details: -- cheese -``` - -`program.parse(arguments)` processes the arguments, leaving any args not consumed by the program options in the `program.args` array. The parameter is optional and defaults to `process.argv`. - -### Default option value - -You can specify a default value for an option which takes a value. - -Example file: [options-defaults.js](./examples/options-defaults.js) - -```js -program - .option('-c, --cheese <type>', 'add the specified type of cheese', 'blue'); - -program.parse(); - -console.log(`cheese: ${program.opts().cheese}`); -``` - -```bash -$ pizza-options -cheese: blue -$ pizza-options --cheese stilton -cheese: stilton -``` - -### Other option types, negatable boolean and boolean|value - -You can define a boolean option long name with a leading `no-` to set the option value to false when used. -Defined alone this also makes the option true by default. - -If you define `--foo` first, adding `--no-foo` does not change the default value from what it would -otherwise be. You can specify a default boolean value for a boolean option and it can be overridden on command line. - -Example file: [options-negatable.js](./examples/options-negatable.js) - -```js -program - .option('--no-sauce', 'Remove sauce') - .option('--cheese <flavour>', 'cheese flavour', 'mozzarella') - .option('--no-cheese', 'plain with no cheese') - .parse(); - -const options = program.opts(); -const sauceStr = options.sauce ? 'sauce' : 'no sauce'; -const cheeseStr = (options.cheese === false) ? 'no cheese' : `${options.cheese} cheese`; -console.log(`You ordered a pizza with ${sauceStr} and ${cheeseStr}`); -``` - -```bash -$ pizza-options -You ordered a pizza with sauce and mozzarella cheese -$ pizza-options --sauce -error: unknown option '--sauce' -$ pizza-options --cheese=blue -You ordered a pizza with sauce and blue cheese -$ pizza-options --no-sauce --no-cheese -You ordered a pizza with no sauce and no cheese -``` - -You can specify an option which may be used as a boolean option but may optionally take an option-argument -(declared with square brackets like `--optional [value]`). - -Example file: [options-boolean-or-value.js](./examples/options-boolean-or-value.js) - -```js -program - .option('-c, --cheese [type]', 'Add cheese with optional type'); - -program.parse(process.argv); - -const options = program.opts(); -if (options.cheese === undefined) console.log('no cheese'); -else if (options.cheese === true) console.log('add cheese'); -else console.log(`add cheese type ${options.cheese}`); -``` - -```bash -$ pizza-options -no cheese -$ pizza-options --cheese -add cheese -$ pizza-options --cheese mozzarella -add cheese type mozzarella -``` - -For information about possible ambiguous cases, see [options taking varying arguments](./docs/options-taking-varying-arguments.md). - -### Required option - -You may specify a required (mandatory) option using `.requiredOption`. The option must have a value after parsing, usually specified on the command line, or perhaps from a default value (say from environment). The method is otherwise the same as `.option` in format, taking flags and description, and optional default value or custom processing. - -Example file: [options-required.js](./examples/options-required.js) - -```js -program - .requiredOption('-c, --cheese <type>', 'pizza must have cheese'); - -program.parse(); -``` - -```bash -$ pizza -error: required option '-c, --cheese <type>' not specified -``` - -### Variadic option - -You may make an option variadic by appending `...` to the value placeholder when declaring the option. On the command line you -can then specify multiple option-arguments, and the parsed option value will be an array. The extra arguments -are read until the first argument starting with a dash. The special argument `--` stops option processing entirely. If a value -is specified in the same argument as the option then no further values are read. - -Example file: [options-variadic.js](./examples/options-variadic.js) - -```js -program - .option('-n, --number <numbers...>', 'specify numbers') - .option('-l, --letter [letters...]', 'specify letters'); - -program.parse(); - -console.log('Options: ', program.opts()); -console.log('Remaining arguments: ', program.args); -``` - -```bash -$ collect -n 1 2 3 --letter a b c -Options: { number: [ '1', '2', '3' ], letter: [ 'a', 'b', 'c' ] } -Remaining arguments: [] -$ collect --letter=A -n80 operand -Options: { number: [ '80' ], letter: [ 'A' ] } -Remaining arguments: [ 'operand' ] -$ collect --letter -n 1 -n 2 3 -- operand -Options: { number: [ '1', '2', '3' ], letter: true } -Remaining arguments: [ 'operand' ] -``` - -For information about possible ambiguous cases, see [options taking varying arguments](./docs/options-taking-varying-arguments.md). - -### Version option - -The optional `version` method adds handling for displaying the command version. The default option flags are `-V` and `--version`, and when present the command prints the version number and exits. - -```js -program.version('0.0.1'); -``` - -```bash -$ ./examples/pizza -V -0.0.1 -``` - -You may change the flags and description by passing additional parameters to the `version` method, using -the same syntax for flags as the `option` method. - -```js -program.version('0.0.1', '-v, --vers', 'output the current version'); -``` - -### More configuration - -You can add most options using the `.option()` method, but there are some additional features available -by constructing an `Option` explicitly for less common cases. - -Example file: [options-extra.js](./examples/options-extra.js) - -```js -program - .addOption(new Option('-s, --secret').hideHelp()) - .addOption(new Option('-t, --timeout <delay>', 'timeout in seconds').default(60, 'one minute')) - .addOption(new Option('-d, --drink <size>', 'drink size').choices(['small', 'medium', 'large'])); -``` - -```bash -$ extra --help -Usage: help [options] - -Options: - -t, --timeout <delay> timeout in seconds (default: one minute) - -d, --drink <size> drink cup size (choices: "small", "medium", "large") - -h, --help display help for command - -$ extra --drink huge -error: option '-d, --drink <size>' argument 'huge' is invalid. Allowed choices are small, medium, large. -``` - -### Custom option processing - -You may specify a function to do custom processing of option-arguments. The callback function receives two parameters, -the user specified option-argument and the previous value for the option. It returns the new value for the option. - -This allows you to coerce the option-argument to the desired type, or accumulate values, or do entirely custom processing. - -You can optionally specify the default/starting value for the option after the function parameter. - -Example file: [options-custom-processing.js](./examples/options-custom-processing.js) - -```js -function myParseInt(value, dummyPrevious) { - // parseInt takes a string and a radix - const parsedValue = parseInt(value, 10); - if (isNaN(parsedValue)) { - throw new commander.InvalidOptionArgumentError('Not a number.'); - } - return parsedValue; -} - -function increaseVerbosity(dummyValue, previous) { - return previous + 1; -} - -function collect(value, previous) { - return previous.concat([value]); -} - -function commaSeparatedList(value, dummyPrevious) { - return value.split(','); -} - -program - .option('-f, --float <number>', 'float argument', parseFloat) - .option('-i, --integer <number>', 'integer argument', myParseInt) - .option('-v, --verbose', 'verbosity that can be increased', increaseVerbosity, 0) - .option('-c, --collect <value>', 'repeatable value', collect, []) - .option('-l, --list <items>', 'comma separated list', commaSeparatedList) -; - -program.parse(); - -const options = program.opts(); -if (options.float !== undefined) console.log(`float: ${options.float}`); -if (options.integer !== undefined) console.log(`integer: ${options.integer}`); -if (options.verbose > 0) console.log(`verbosity: ${options.verbose}`); -if (options.collect.length > 0) console.log(options.collect); -if (options.list !== undefined) console.log(options.list); -``` - -```bash -$ custom -f 1e2 -float: 100 -$ custom --integer 2 -integer: 2 -$ custom -v -v -v -verbose: 3 -$ custom -c a -c b -c c -[ 'a', 'b', 'c' ] -$ custom --list x,y,z -[ 'x', 'y', 'z' ] -``` - -## Commands - -You can specify (sub)commands using `.command()` or `.addCommand()`. There are two ways these can be implemented: using an action handler attached to the command, or as a stand-alone executable file (described in more detail later). The subcommands may be nested ([example](./examples/nestedCommands.js)). - -In the first parameter to `.command()` you specify the command name and any command-arguments. The arguments may be `<required>` or `[optional]`, and the last argument may also be `variadic...`. - -You can use `.addCommand()` to add an already configured subcommand to the program. - -For example: - -```js -// Command implemented using action handler (description is supplied separately to `.command`) -// Returns new command for configuring. -program - .command('clone <source> [destination]') - .description('clone a repository into a newly created directory') - .action((source, destination) => { - console.log('clone command called'); - }); - -// Command implemented using stand-alone executable file (description is second parameter to `.command`) -// Returns `this` for adding more commands. -program - .command('start <service>', 'start named service') - .command('stop [service]', 'stop named service, or all if no name supplied'); - -// Command prepared separately. -// Returns `this` for adding more commands. -program - .addCommand(build.makeBuildCommand()); -``` - -Configuration options can be passed with the call to `.command()` and `.addCommand()`. Specifying `hidden: true` will -remove the command from the generated help output. Specifying `isDefault: true` will run the subcommand if no other -subcommand is specified ([example](./examples/defaultCommand.js)). - -### Specify the argument syntax - -You use `.arguments` to specify the expected command-arguments for the top-level command, and for subcommands they are usually -included in the `.command` call. Angled brackets (e.g. `<required>`) indicate required command-arguments. -Square brackets (e.g. `[optional]`) indicate optional command-arguments. -You can optionally describe the arguments in the help by supplying a hash as second parameter to `.description()`. - -Example file: [arguments.js](./examples/arguments.js) - -```js -program - .version('0.1.0') - .arguments('<username> [password]') - .description('test command', { - username: 'user to login', - password: 'password for user, if required' - }) - .action((username, password) => { - console.log('username:', username); - console.log('environment:', password || 'no password given'); - }); -``` - - The last argument of a command can be variadic, and only the last argument. To make an argument variadic you - append `...` to the argument name. For example: - -```js -program - .version('0.1.0') - .command('rmdir <dirs...>') - .action(function (dirs) { - dirs.forEach((dir) => { - console.log('rmdir %s', dir); - }); - }); -``` - -The variadic argument is passed to the action handler as an array. - -### Action handler - -The action handler gets passed a parameter for each command-argument you declared, and two additional parameters -which are the parsed options and the command object itself. - -Example file: [thank.js](./examples/thank.js) - -```js -program - .arguments('<name>') - .option('-t, --title <honorific>', 'title to use before name') - .option('-d, --debug', 'display some debugging') - .action((name, options, command) => { - if (options.debug) { - console.error('Called %s with options %o', command.name(), options); - } - const title = options.title ? `${options.title} ` : ''; - console.log(`Thank-you ${title}${name}`); - }); -``` - -You may supply an `async` action handler, in which case you call `.parseAsync` rather than `.parse`. - -```js -async function run() { /* code goes here */ } - -async function main() { - program - .command('run') - .action(run); - await program.parseAsync(process.argv); -} -``` - -A command's options and arguments on the command line are validated when the command is used. Any unknown options or missing arguments will be reported as an error. You can suppress the unknown option checks with `.allowUnknownOption()`. By default it is not an error to -pass more arguments than declared, but you can make this an error with `.allowExcessArguments(false)`. - -### Stand-alone executable (sub)commands - -When `.command()` is invoked with a description argument, this tells Commander that you're going to use stand-alone executables for subcommands. -Commander will search the executables in the directory of the entry script (like `./examples/pm`) with the name `program-subcommand`, like `pm-install`, `pm-search`. -You can specify a custom name with the `executableFile` configuration option. - -You handle the options for an executable (sub)command in the executable, and don't declare them at the top-level. - -Example file: [pm](./examples/pm) - -```js -program - .version('0.1.0') - .command('install [name]', 'install one or more packages') - .command('search [query]', 'search with optional query') - .command('update', 'update installed packages', { executableFile: 'myUpdateSubCommand' }) - .command('list', 'list packages installed', { isDefault: true }); - -program.parse(process.argv); -``` - -If the program is designed to be installed globally, make sure the executables have proper modes, like `755`. - -## Automated help - -The help information is auto-generated based on the information commander already knows about your program. The default -help option is `-h,--help`. - -Example file: [pizza](./examples/pizza) - -```bash -$ node ./examples/pizza --help -Usage: pizza [options] - -An application for pizza ordering - -Options: - -p, --peppers Add peppers - -c, --cheese <type> Add the specified type of cheese (default: "marble") - -C, --no-cheese You do not want any cheese - -h, --help display help for command -``` - -A `help` command is added by default if your command has subcommands. It can be used alone, or with a subcommand name to show -further help for the subcommand. These are effectively the same if the `shell` program has implicit help: - -```bash -shell help -shell --help - -shell help spawn -shell spawn --help -``` - -### Custom help - -You can add extra text to be displayed along with the built-in help. - -Example file: [custom-help](./examples/custom-help) - -```js -program - .option('-f, --foo', 'enable some foo'); - -program.addHelpText('after', ` - -Example call: - $ custom-help --help`); -``` - -Yields the following help output: - -```Text -Usage: custom-help [options] - -Options: - -f, --foo enable some foo - -h, --help display help for command - -Example call: - $ custom-help --help -``` - -The positions in order displayed are: - -- `beforeAll`: add to the program for a global banner or header -- `before`: display extra information before built-in help -- `after`: display extra information after built-in help -- `afterAll`: add to the program for a global footer (epilog) - -The positions "beforeAll" and "afterAll" apply to the command and all its subcommands. - -The second parameter can be a string, or a function returning a string. The function is passed a context object for your convenience. The properties are: - -- error: a boolean for whether the help is being displayed due to a usage error -- command: the Command which is displaying the help - -### Display help from code - -`.help()`: display help information and exit immediately. You can optionally pass `{ error: true }` to display on stderr and exit with an error status. - -`.outputHelp()`: output help information without exiting. You can optionally pass `{ error: true }` to display on stderr. - -`.helpInformation()`: get the built-in command help information as a string for processing or displaying yourself. - -### .usage and .name - -These allow you to customise the usage description in the first line of the help. The name is otherwise -deduced from the (full) program arguments. Given: - -```js -program - .name("my-command") - .usage("[global options] command") -``` - -The help will start with: - -```Text -Usage: my-command [global options] command -``` - -### .helpOption(flags, description) - -By default every command has a help option. Override the default help flags and description. Pass false to disable the built-in help option. - -```js -program - .helpOption('-e, --HELP', 'read more information'); -``` - -### .addHelpCommand() - -A help command is added by default if your command has subcommands. You can explicitly turn on or off the implicit help command with `.addHelpCommand()` and `.addHelpCommand(false)`. - -You can both turn on and customise the help command by supplying the name and description: - -```js -program.addHelpCommand('assist [command]', 'show assistance'); -``` - -### More configuration - -The built-in help is formatted using the Help class. -You can configure the Help behaviour by modifying data properties and methods using `.configureHelp()`, or by subclassing using `.createHelp()` if you prefer. - -The data properties are: - -- `helpWidth`: specify the wrap width, useful for unit tests -- `sortSubcommands`: sort the subcommands alphabetically -- `sortOptions`: sort the options alphabetically - -There are methods getting the visible lists of arguments, options, and subcommands. There are methods for formatting the items in the lists, with each item having a _term_ and _description_. Take a look at `.formatHelp()` to see how they are used. - -Example file: [configure-help.js](./examples/configure-help.js) - -``` -program.configureHelp({ - sortSubcommands: true, - subcommandTerm: (cmd) => cmd.name() // Just show the name, instead of short usage. -}); -``` - -## Custom event listeners - -You can execute custom actions by listening to command and option events. - -```js -program.on('option:verbose', function () { - process.env.VERBOSE = this.opts().verbose; -}); - -program.on('command:*', function (operands) { - console.error(`error: unknown command '${operands[0]}'`); - const availableCommands = program.commands.map(cmd => cmd.name()); - mySuggestBestMatch(operands[0], availableCommands); - process.exitCode = 1; -}); -``` - -## Bits and pieces - -### .parse() and .parseAsync() - -The first argument to `.parse` is the array of strings to parse. You may omit the parameter to implicitly use `process.argv`. - -If the arguments follow different conventions than node you can pass a `from` option in the second parameter: - -- 'node': default, `argv[0]` is the application and `argv[1]` is the script being run, with user parameters after that -- 'electron': `argv[1]` varies depending on whether the electron application is packaged -- 'user': all of the arguments from the user - -For example: - -```js -program.parse(process.argv); // Explicit, node conventions -program.parse(); // Implicit, and auto-detect electron -program.parse(['-f', 'filename'], { from: 'user' }); -``` - -### Parsing Configuration - -If the default parsing does not suit your needs, there are some behaviours to support other usage patterns. - -By default program options are recognised before and after subcommands. To only look for program options before subcommands, use `.enablePositionalOptions()`. This lets you use -an option for a different purpose in subcommands. - -Example file: [positional-options.js](./examples/positional-options.js) - -With positional options, the `-b` is a program option in the first line and a subcommand option in the second line: - -```sh -program -b subcommand -program subcommand -b -``` - -By default options are recognised before and after command-arguments. To only process options that come -before the command-arguments, use `.passThroughOptions()`. This lets you pass the arguments and following options through to another program -without needing to use `--` to end the option processing. -To use pass through options in a subcommand, the program needs to enable positional options. - -Example file: [pass-through-options.js](./examples/pass-through-options.js) - -With pass through options, the `--port=80` is a program option in the first line and passed through as a command-argument in the second line: - -```sh -program --port=80 arg -program arg --port=80 -``` - -By default the option processing shows an error for an unknown option. To have an unknown option treated as an ordinary command-argument and continue looking for options, use `.allowUnknownOption()`. This lets you mix known and unknown options. - -By default the argument processing does not display an error for more command-arguments than expected. -To display an error for excess arguments, use`.allowExcessArguments(false)`. - -### Legacy options as properties - -Before Commander 7, the option values were stored as properties on the command. -This was convenient to code but the downside was possible clashes with -existing properties of `Command`. You can revert to the old behaviour to run unmodified legacy code by using `.storeOptionsAsProperties()`. - -```js -program - .storeOptionsAsProperties() - .option('-d, --debug') - .action((commandAndOptions) => { - if (commandAndOptions.debug) { - console.error(`Called ${commandAndOptions.name()}`); - } - }); -``` - -### TypeScript - -If you use `ts-node` and stand-alone executable subcommands written as `.ts` files, you need to call your program through node to get the subcommands called correctly. e.g. - -```bash -node -r ts-node/register pm.ts -``` - -### createCommand() - -This factory function creates a new command. It is exported and may be used instead of using `new`, like: - -```js -const { createCommand } = require('commander'); -const program = createCommand(); -``` - -`createCommand` is also a method of the Command object, and creates a new command rather than a subcommand. This gets used internally -when creating subcommands using `.command()`, and you may override it to -customise the new subcommand (example file [custom-command-class.js](./examples/custom-command-class.js)). - -### Node options such as `--harmony` - -You can enable `--harmony` option in two ways: - -- Use `#! /usr/bin/env node --harmony` in the subcommands scripts. (Note Windows does not support this pattern.) -- Use the `--harmony` option when call the command, like `node --harmony examples/pm publish`. The `--harmony` option will be preserved when spawning subcommand process. - -### Debugging stand-alone executable subcommands - -An executable subcommand is launched as a separate child process. - -If you are using the node inspector for [debugging](https://nodejs.org/en/docs/guides/debugging-getting-started/) executable subcommands using `node --inspect` et al, -the inspector port is incremented by 1 for the spawned subcommand. - -If you are using VSCode to debug executable subcommands you need to set the `"autoAttachChildProcesses": true` flag in your launch.json configuration. - -### Override exit and output handling - -By default Commander calls `process.exit` when it detects errors, or after displaying the help or version. You can override -this behaviour and optionally supply a callback. The default override throws a `CommanderError`. - -The override callback is passed a `CommanderError` with properties `exitCode` number, `code` string, and `message`. The default override behaviour is to throw the error, except for async handling of executable subcommand completion which carries on. The normal display of error messages or version or help -is not affected by the override which is called after the display. - -```js -program.exitOverride(); - -try { - program.parse(process.argv); -} catch (err) { - // custom processing... -} -``` - -By default Commander is configured for a command-line application and writes to stdout and stderr. -You can modify this behaviour for custom applications. In addition, you can modify the display of error messages. - -Example file: [configure-output.js](./examples/configure-output.js) - - -```js -function errorColor(str) { - // Add ANSI escape codes to display text in red. - return `\x1b[31m${str}\x1b[0m`; -} - -program - .configureOutput({ - // Visibly override write routines as example! - writeOut: (str) => process.stdout.write(`[OUT] ${str}`), - writeErr: (str) => process.stdout.write(`[ERR] ${str}`), - // Highlight errors in color. - outputError: (str, write) => write(errorColor(str)) - }); -``` - -### Additional documentation - -There is more information available about: - -- [deprecated](./docs/deprecated.md) features still supported for backwards compatibility -- [options taking varying arguments](./docs/options-taking-varying-arguments.md) - -## Examples - -In a single command program, you might not need an action handler. - -Example file: [pizza](./examples/pizza) - -```js -const { program } = require('commander'); - -program - .description('An application for pizza ordering') - .option('-p, --peppers', 'Add peppers') - .option('-c, --cheese <type>', 'Add the specified type of cheese', 'marble') - .option('-C, --no-cheese', 'You do not want any cheese'); - -program.parse(); - -const options = program.opts(); -console.log('you ordered a pizza with:'); -if (options.peppers) console.log(' - peppers'); -const cheese = !options.cheese ? 'no' : options.cheese; -console.log(' - %s cheese', cheese); -``` - -In a multi-command program, you will have action handlers for each command (or stand-alone executables for the commands). - -Example file: [deploy](./examples/deploy) - -```js -const { Command } = require('commander'); -const program = new Command(); - -program - .version('0.0.1') - .option('-c, --config <path>', 'set config path', './deploy.conf'); - -program - .command('setup [env]') - .description('run setup commands for all envs') - .option('-s, --setup_mode <mode>', 'Which setup mode to use', 'normal') - .action((env, options) => { - env = env || 'all'; - console.log('read config from %s', program.opts().config); - console.log('setup for %s env(s) with %s mode', env, options.setup_mode); - }); - -program - .command('exec <script>') - .alias('ex') - .description('execute the given remote cmd') - .option('-e, --exec_mode <mode>', 'Which exec mode to use', 'fast') - .action((script, options) => { - console.log('read config from %s', program.opts().config); - console.log('exec "%s" using %s mode and config %s', script, options.exec_mode, program.opts().config); - }).addHelpText('after', ` -Examples: - $ deploy exec sequential - $ deploy exec async` - ); - -program.parse(process.argv); -``` - -More samples can be found in the [examples](https://github.com/tj/commander.js/tree/master/examples) directory. - -## Support - -The current version of Commander is fully supported on Long Term Support versions of node, and requires at least node v10. -(For older versions of node, use an older version of Commander. Commander version 2.x has the widest support.) - -The main forum for free and community support is the project [Issues](https://github.com/tj/commander.js/issues) on GitHub. - -### Commander for enterprise - -Available as part of the Tidelift Subscription - -The maintainers of Commander and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-commander?utm_source=npm-commander&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/commander/esm.mjs b/node_modules/commander/esm.mjs deleted file mode 100644 index 60bf2521..00000000 --- a/node_modules/commander/esm.mjs +++ /dev/null @@ -1,4 +0,0 @@ -import commander from './index.js'; - -// wrapper to provide named exports for ESM. -export const { program, Option, Command, CommanderError, InvalidOptionArgumentError, Help, createCommand } = commander; diff --git a/node_modules/commander/index.js b/node_modules/commander/index.js deleted file mode 100644 index 985a8cfc..00000000 --- a/node_modules/commander/index.js +++ /dev/null @@ -1,2217 +0,0 @@ -/** - * Module dependencies. - */ - -const EventEmitter = require('events').EventEmitter; -const childProcess = require('child_process'); -const path = require('path'); -const fs = require('fs'); - -// @ts-check - -// Although this is a class, methods are static in style to allow override using subclass or just functions. -class Help { - constructor() { - this.helpWidth = undefined; - this.sortSubcommands = false; - this.sortOptions = false; - } - - /** - * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one. - * - * @param {Command} cmd - * @returns {Command[]} - */ - - visibleCommands(cmd) { - const visibleCommands = cmd.commands.filter(cmd => !cmd._hidden); - if (cmd._hasImplicitHelpCommand()) { - // Create a command matching the implicit help command. - const args = cmd._helpCommandnameAndArgs.split(/ +/); - const helpCommand = cmd.createCommand(args.shift()) - .helpOption(false); - helpCommand.description(cmd._helpCommandDescription); - helpCommand._parseExpectedArgs(args); - visibleCommands.push(helpCommand); - } - if (this.sortSubcommands) { - visibleCommands.sort((a, b) => { - return a.name().localeCompare(b.name()); - }); - } - return visibleCommands; - } - - /** - * Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one. - * - * @param {Command} cmd - * @returns {Option[]} - */ - - visibleOptions(cmd) { - const visibleOptions = cmd.options.filter((option) => !option.hidden); - // Implicit help - const showShortHelpFlag = cmd._hasHelpOption && cmd._helpShortFlag && !cmd._findOption(cmd._helpShortFlag); - const showLongHelpFlag = cmd._hasHelpOption && !cmd._findOption(cmd._helpLongFlag); - if (showShortHelpFlag || showLongHelpFlag) { - let helpOption; - if (!showShortHelpFlag) { - helpOption = cmd.createOption(cmd._helpLongFlag, cmd._helpDescription); - } else if (!showLongHelpFlag) { - helpOption = cmd.createOption(cmd._helpShortFlag, cmd._helpDescription); - } else { - helpOption = cmd.createOption(cmd._helpFlags, cmd._helpDescription); - } - visibleOptions.push(helpOption); - } - if (this.sortOptions) { - const getSortKey = (option) => { - // WYSIWYG for order displayed in help with short before long, no special handling for negated. - return option.short ? option.short.replace(/^-/, '') : option.long.replace(/^--/, ''); - }; - visibleOptions.sort((a, b) => { - return getSortKey(a).localeCompare(getSortKey(b)); - }); - } - return visibleOptions; - } - - /** - * Get an array of the arguments which have descriptions. - * - * @param {Command} cmd - * @returns {{ term: string, description:string }[]} - */ - - visibleArguments(cmd) { - if (cmd._argsDescription && cmd._args.length) { - return cmd._args.map((argument) => { - return { term: argument.name, description: cmd._argsDescription[argument.name] || '' }; - }, 0); - } - return []; - } - - /** - * Get the command term to show in the list of subcommands. - * - * @param {Command} cmd - * @returns {string} - */ - - subcommandTerm(cmd) { - // Legacy. Ignores custom usage string, and nested commands. - const args = cmd._args.map(arg => humanReadableArgName(arg)).join(' '); - return cmd._name + - (cmd._aliases[0] ? '|' + cmd._aliases[0] : '') + - (cmd.options.length ? ' [options]' : '') + // simplistic check for non-help option - (args ? ' ' + args : ''); - } - - /** - * Get the option term to show in the list of options. - * - * @param {Option} option - * @returns {string} - */ - - optionTerm(option) { - return option.flags; - } - - /** - * Get the longest command term length. - * - * @param {Command} cmd - * @param {Help} helper - * @returns {number} - */ - - longestSubcommandTermLength(cmd, helper) { - return helper.visibleCommands(cmd).reduce((max, command) => { - return Math.max(max, helper.subcommandTerm(command).length); - }, 0); - }; - - /** - * Get the longest option term length. - * - * @param {Command} cmd - * @param {Help} helper - * @returns {number} - */ - - longestOptionTermLength(cmd, helper) { - return helper.visibleOptions(cmd).reduce((max, option) => { - return Math.max(max, helper.optionTerm(option).length); - }, 0); - }; - - /** - * Get the longest argument term length. - * - * @param {Command} cmd - * @param {Help} helper - * @returns {number} - */ - - longestArgumentTermLength(cmd, helper) { - return helper.visibleArguments(cmd).reduce((max, argument) => { - return Math.max(max, argument.term.length); - }, 0); - }; - - /** - * Get the command usage to be displayed at the top of the built-in help. - * - * @param {Command} cmd - * @returns {string} - */ - - commandUsage(cmd) { - // Usage - let cmdName = cmd._name; - if (cmd._aliases[0]) { - cmdName = cmdName + '|' + cmd._aliases[0]; - } - let parentCmdNames = ''; - for (let parentCmd = cmd.parent; parentCmd; parentCmd = parentCmd.parent) { - parentCmdNames = parentCmd.name() + ' ' + parentCmdNames; - } - return parentCmdNames + cmdName + ' ' + cmd.usage(); - } - - /** - * Get the description for the command. - * - * @param {Command} cmd - * @returns {string} - */ - - commandDescription(cmd) { - // @ts-ignore: overloaded return type - return cmd.description(); - } - - /** - * Get the command description to show in the list of subcommands. - * - * @param {Command} cmd - * @returns {string} - */ - - subcommandDescription(cmd) { - // @ts-ignore: overloaded return type - return cmd.description(); - } - - /** - * Get the option description to show in the list of options. - * - * @param {Option} option - * @return {string} - */ - - optionDescription(option) { - if (option.negate) { - return option.description; - } - const extraInfo = []; - if (option.argChoices) { - extraInfo.push( - // use stringify to match the display of the default value - `choices: ${option.argChoices.map((choice) => JSON.stringify(choice)).join(', ')}`); - } - if (option.defaultValue !== undefined) { - extraInfo.push(`default: ${option.defaultValueDescription || JSON.stringify(option.defaultValue)}`); - } - if (extraInfo.length > 0) { - return `${option.description} (${extraInfo.join(', ')})`; - } - return option.description; - }; - - /** - * Generate the built-in help text. - * - * @param {Command} cmd - * @param {Help} helper - * @returns {string} - */ - - formatHelp(cmd, helper) { - const termWidth = helper.padWidth(cmd, helper); - const helpWidth = helper.helpWidth || 80; - const itemIndentWidth = 2; - const itemSeparatorWidth = 2; // between term and description - function formatItem(term, description) { - if (description) { - const fullText = `${term.padEnd(termWidth + itemSeparatorWidth)}${description}`; - return helper.wrap(fullText, helpWidth - itemIndentWidth, termWidth + itemSeparatorWidth); - } - return term; - }; - function formatList(textArray) { - return textArray.join('\n').replace(/^/gm, ' '.repeat(itemIndentWidth)); - } - - // Usage - let output = [`Usage: ${helper.commandUsage(cmd)}`, '']; - - // Description - const commandDescription = helper.commandDescription(cmd); - if (commandDescription.length > 0) { - output = output.concat([commandDescription, '']); - } - - // Arguments - const argumentList = helper.visibleArguments(cmd).map((argument) => { - return formatItem(argument.term, argument.description); - }); - if (argumentList.length > 0) { - output = output.concat(['Arguments:', formatList(argumentList), '']); - } - - // Options - const optionList = helper.visibleOptions(cmd).map((option) => { - return formatItem(helper.optionTerm(option), helper.optionDescription(option)); - }); - if (optionList.length > 0) { - output = output.concat(['Options:', formatList(optionList), '']); - } - - // Commands - const commandList = helper.visibleCommands(cmd).map((cmd) => { - return formatItem(helper.subcommandTerm(cmd), helper.subcommandDescription(cmd)); - }); - if (commandList.length > 0) { - output = output.concat(['Commands:', formatList(commandList), '']); - } - - return output.join('\n'); - } - - /** - * Calculate the pad width from the maximum term length. - * - * @param {Command} cmd - * @param {Help} helper - * @returns {number} - */ - - padWidth(cmd, helper) { - return Math.max( - helper.longestOptionTermLength(cmd, helper), - helper.longestSubcommandTermLength(cmd, helper), - helper.longestArgumentTermLength(cmd, helper) - ); - }; - - /** - * Wrap the given string to width characters per line, with lines after the first indented. - * Do not wrap if insufficient room for wrapping (minColumnWidth), or string is manually formatted. - * - * @param {string} str - * @param {number} width - * @param {number} indent - * @param {number} [minColumnWidth=40] - * @return {string} - * - */ - - wrap(str, width, indent, minColumnWidth = 40) { - // Detect manually wrapped and indented strings by searching for line breaks - // followed by multiple spaces/tabs. - if (str.match(/[\n]\s+/)) return str; - // Do not wrap if not enough room for a wrapped column of text (as could end up with a word per line). - const columnWidth = width - indent; - if (columnWidth < minColumnWidth) return str; - - const leadingStr = str.substr(0, indent); - const columnText = str.substr(indent); - - const indentString = ' '.repeat(indent); - const regex = new RegExp('.{1,' + (columnWidth - 1) + '}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)', 'g'); - const lines = columnText.match(regex) || []; - return leadingStr + lines.map((line, i) => { - if (line.slice(-1) === '\n') { - line = line.slice(0, line.length - 1); - } - return ((i > 0) ? indentString : '') + line.trimRight(); - }).join('\n'); - } -} - -class Option { - /** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {string} flags - * @param {string} [description] - */ - - constructor(flags, description) { - this.flags = flags; - this.description = description || ''; - - this.required = flags.includes('<'); // A value must be supplied when the option is specified. - this.optional = flags.includes('['); // A value is optional when the option is specified. - // variadic test ignores <value,...> et al which might be used to describe custom splitting of single argument - this.variadic = /\w\.\.\.[>\]]$/.test(flags); // The option can take multiple values. - this.mandatory = false; // The option must have a value after parsing, which usually means it must be specified on command line. - const optionFlags = _parseOptionFlags(flags); - this.short = optionFlags.shortFlag; - this.long = optionFlags.longFlag; - this.negate = false; - if (this.long) { - this.negate = this.long.startsWith('--no-'); - } - this.defaultValue = undefined; - this.defaultValueDescription = undefined; - this.parseArg = undefined; - this.hidden = false; - this.argChoices = undefined; - } - - /** - * Set the default value, and optionally supply the description to be displayed in the help. - * - * @param {any} value - * @param {string} [description] - * @return {Option} - */ - - default(value, description) { - this.defaultValue = value; - this.defaultValueDescription = description; - return this; - }; - - /** - * Set the custom handler for processing CLI option arguments into option values. - * - * @param {Function} [fn] - * @return {Option} - */ - - argParser(fn) { - this.parseArg = fn; - return this; - }; - - /** - * Whether the option is mandatory and must have a value after parsing. - * - * @param {boolean} [mandatory=true] - * @return {Option} - */ - - makeOptionMandatory(mandatory = true) { - this.mandatory = !!mandatory; - return this; - }; - - /** - * Hide option in help. - * - * @param {boolean} [hide=true] - * @return {Option} - */ - - hideHelp(hide = true) { - this.hidden = !!hide; - return this; - }; - - /** - * @api private - */ - - _concatValue(value, previous) { - if (previous === this.defaultValue || !Array.isArray(previous)) { - return [value]; - } - - return previous.concat(value); - } - - /** - * Only allow option value to be one of choices. - * - * @param {string[]} values - * @return {Option} - */ - - choices(values) { - this.argChoices = values; - this.parseArg = (arg, previous) => { - if (!values.includes(arg)) { - throw new InvalidOptionArgumentError(`Allowed choices are ${values.join(', ')}.`); - } - if (this.variadic) { - return this._concatValue(arg, previous); - } - return arg; - }; - return this; - }; - - /** - * Return option name. - * - * @return {string} - */ - - name() { - if (this.long) { - return this.long.replace(/^--/, ''); - } - return this.short.replace(/^-/, ''); - }; - - /** - * Return option name, in a camelcase format that can be used - * as a object attribute key. - * - * @return {string} - * @api private - */ - - attributeName() { - return camelcase(this.name().replace(/^no-/, '')); - }; - - /** - * Check if `arg` matches the short or long flag. - * - * @param {string} arg - * @return {boolean} - * @api private - */ - - is(arg) { - return this.short === arg || this.long === arg; - }; -} - -/** - * CommanderError class - * @class - */ -class CommanderError extends Error { - /** - * Constructs the CommanderError class - * @param {number} exitCode suggested exit code which could be used with process.exit - * @param {string} code an id string representing the error - * @param {string} message human-readable description of the error - * @constructor - */ - constructor(exitCode, code, message) { - super(message); - // properly capture stack trace in Node.js - Error.captureStackTrace(this, this.constructor); - this.name = this.constructor.name; - this.code = code; - this.exitCode = exitCode; - this.nestedError = undefined; - } -} - -/** - * InvalidOptionArgumentError class - * @class - */ -class InvalidOptionArgumentError extends CommanderError { - /** - * Constructs the InvalidOptionArgumentError class - * @param {string} [message] explanation of why argument is invalid - * @constructor - */ - constructor(message) { - super(1, 'commander.invalidOptionArgument', message); - // properly capture stack trace in Node.js - Error.captureStackTrace(this, this.constructor); - this.name = this.constructor.name; - } -} - -class Command extends EventEmitter { - /** - * Initialize a new `Command`. - * - * @param {string} [name] - */ - - constructor(name) { - super(); - this.commands = []; - this.options = []; - this.parent = null; - this._allowUnknownOption = false; - this._allowExcessArguments = true; - this._args = []; - this.rawArgs = null; - this._scriptPath = null; - this._name = name || ''; - this._optionValues = {}; - this._storeOptionsAsProperties = false; - this._actionResults = []; - this._actionHandler = null; - this._executableHandler = false; - this._executableFile = null; // custom name for executable - this._defaultCommandName = null; - this._exitCallback = null; - this._aliases = []; - this._combineFlagAndOptionalValue = true; - this._description = ''; - this._argsDescription = undefined; - this._enablePositionalOptions = false; - this._passThroughOptions = false; - - // see .configureOutput() for docs - this._outputConfiguration = { - writeOut: (str) => process.stdout.write(str), - writeErr: (str) => process.stderr.write(str), - getOutHelpWidth: () => process.stdout.isTTY ? process.stdout.columns : undefined, - getErrHelpWidth: () => process.stderr.isTTY ? process.stderr.columns : undefined, - outputError: (str, write) => write(str) - }; - - this._hidden = false; - this._hasHelpOption = true; - this._helpFlags = '-h, --help'; - this._helpDescription = 'display help for command'; - this._helpShortFlag = '-h'; - this._helpLongFlag = '--help'; - this._addImplicitHelpCommand = undefined; // Deliberately undefined, not decided whether true or false - this._helpCommandName = 'help'; - this._helpCommandnameAndArgs = 'help [command]'; - this._helpCommandDescription = 'display help for command'; - this._helpConfiguration = {}; - } - - /** - * Define a command. - * - * There are two styles of command: pay attention to where to put the description. - * - * Examples: - * - * // Command implemented using action handler (description is supplied separately to `.command`) - * program - * .command('clone <source> [destination]') - * .description('clone a repository into a newly created directory') - * .action((source, destination) => { - * console.log('clone command called'); - * }); - * - * // Command implemented using separate executable file (description is second parameter to `.command`) - * program - * .command('start <service>', 'start named service') - * .command('stop [service]', 'stop named service, or all if no name supplied'); - * - * @param {string} nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...` - * @param {Object|string} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable) - * @param {Object} [execOpts] - configuration options (for executable) - * @return {Command} returns new command for action handler, or `this` for executable command - */ - - command(nameAndArgs, actionOptsOrExecDesc, execOpts) { - let desc = actionOptsOrExecDesc; - let opts = execOpts; - if (typeof desc === 'object' && desc !== null) { - opts = desc; - desc = null; - } - opts = opts || {}; - const args = nameAndArgs.split(/ +/); - const cmd = this.createCommand(args.shift()); - - if (desc) { - cmd.description(desc); - cmd._executableHandler = true; - } - if (opts.isDefault) this._defaultCommandName = cmd._name; - - cmd._outputConfiguration = this._outputConfiguration; - - cmd._hidden = !!(opts.noHelp || opts.hidden); // noHelp is deprecated old name for hidden - cmd._hasHelpOption = this._hasHelpOption; - cmd._helpFlags = this._helpFlags; - cmd._helpDescription = this._helpDescription; - cmd._helpShortFlag = this._helpShortFlag; - cmd._helpLongFlag = this._helpLongFlag; - cmd._helpCommandName = this._helpCommandName; - cmd._helpCommandnameAndArgs = this._helpCommandnameAndArgs; - cmd._helpCommandDescription = this._helpCommandDescription; - cmd._helpConfiguration = this._helpConfiguration; - cmd._exitCallback = this._exitCallback; - cmd._storeOptionsAsProperties = this._storeOptionsAsProperties; - cmd._combineFlagAndOptionalValue = this._combineFlagAndOptionalValue; - cmd._allowExcessArguments = this._allowExcessArguments; - cmd._enablePositionalOptions = this._enablePositionalOptions; - - cmd._executableFile = opts.executableFile || null; // Custom name for executable file, set missing to null to match constructor - this.commands.push(cmd); - cmd._parseExpectedArgs(args); - cmd.parent = this; - - if (desc) return this; - return cmd; - }; - - /** - * Factory routine to create a new unattached command. - * - * See .command() for creating an attached subcommand, which uses this routine to - * create the command. You can override createCommand to customise subcommands. - * - * @param {string} [name] - * @return {Command} new command - */ - - createCommand(name) { - return new Command(name); - }; - - /** - * You can customise the help with a subclass of Help by overriding createHelp, - * or by overriding Help properties using configureHelp(). - * - * @return {Help} - */ - - createHelp() { - return Object.assign(new Help(), this.configureHelp()); - }; - - /** - * You can customise the help by overriding Help properties using configureHelp(), - * or with a subclass of Help by overriding createHelp(). - * - * @param {Object} [configuration] - configuration options - * @return {Command|Object} `this` command for chaining, or stored configuration - */ - - configureHelp(configuration) { - if (configuration === undefined) return this._helpConfiguration; - - this._helpConfiguration = configuration; - return this; - } - - /** - * The default output goes to stdout and stderr. You can customise this for special - * applications. You can also customise the display of errors by overriding outputError. - * - * The configuration properties are all functions: - * - * // functions to change where being written, stdout and stderr - * writeOut(str) - * writeErr(str) - * // matching functions to specify width for wrapping help - * getOutHelpWidth() - * getErrHelpWidth() - * // functions based on what is being written out - * outputError(str, write) // used for displaying errors, and not used for displaying help - * - * @param {Object} [configuration] - configuration options - * @return {Command|Object} `this` command for chaining, or stored configuration - */ - - configureOutput(configuration) { - if (configuration === undefined) return this._outputConfiguration; - - Object.assign(this._outputConfiguration, configuration); - return this; - } - - /** - * Add a prepared subcommand. - * - * See .command() for creating an attached subcommand which inherits settings from its parent. - * - * @param {Command} cmd - new subcommand - * @param {Object} [opts] - configuration options - * @return {Command} `this` command for chaining - */ - - addCommand(cmd, opts) { - if (!cmd._name) throw new Error('Command passed to .addCommand() must have a name'); - - // To keep things simple, block automatic name generation for deeply nested executables. - // Fail fast and detect when adding rather than later when parsing. - function checkExplicitNames(commandArray) { - commandArray.forEach((cmd) => { - if (cmd._executableHandler && !cmd._executableFile) { - throw new Error(`Must specify executableFile for deeply nested executable: ${cmd.name()}`); - } - checkExplicitNames(cmd.commands); - }); - } - checkExplicitNames(cmd.commands); - - opts = opts || {}; - if (opts.isDefault) this._defaultCommandName = cmd._name; - if (opts.noHelp || opts.hidden) cmd._hidden = true; // modifying passed command due to existing implementation - - this.commands.push(cmd); - cmd.parent = this; - return this; - }; - - /** - * Define argument syntax for the command. - */ - - arguments(desc) { - return this._parseExpectedArgs(desc.split(/ +/)); - }; - - /** - * Override default decision whether to add implicit help command. - * - * addHelpCommand() // force on - * addHelpCommand(false); // force off - * addHelpCommand('help [cmd]', 'display help for [cmd]'); // force on with custom details - * - * @return {Command} `this` command for chaining - */ - - addHelpCommand(enableOrNameAndArgs, description) { - if (enableOrNameAndArgs === false) { - this._addImplicitHelpCommand = false; - } else { - this._addImplicitHelpCommand = true; - if (typeof enableOrNameAndArgs === 'string') { - this._helpCommandName = enableOrNameAndArgs.split(' ')[0]; - this._helpCommandnameAndArgs = enableOrNameAndArgs; - } - this._helpCommandDescription = description || this._helpCommandDescription; - } - return this; - }; - - /** - * @return {boolean} - * @api private - */ - - _hasImplicitHelpCommand() { - if (this._addImplicitHelpCommand === undefined) { - return this.commands.length && !this._actionHandler && !this._findCommand('help'); - } - return this._addImplicitHelpCommand; - }; - - /** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {Array} args - * @return {Command} `this` command for chaining - * @api private - */ - - _parseExpectedArgs(args) { - if (!args.length) return; - args.forEach((arg) => { - const argDetails = { - required: false, - name: '', - variadic: false - }; - - switch (arg[0]) { - case '<': - argDetails.required = true; - argDetails.name = arg.slice(1, -1); - break; - case '[': - argDetails.name = arg.slice(1, -1); - break; - } - - if (argDetails.name.length > 3 && argDetails.name.slice(-3) === '...') { - argDetails.variadic = true; - argDetails.name = argDetails.name.slice(0, -3); - } - if (argDetails.name) { - this._args.push(argDetails); - } - }); - this._args.forEach((arg, i) => { - if (arg.variadic && i < this._args.length - 1) { - throw new Error(`only the last argument can be variadic '${arg.name}'`); - } - }); - return this; - }; - - /** - * Register callback to use as replacement for calling process.exit. - * - * @param {Function} [fn] optional callback which will be passed a CommanderError, defaults to throwing - * @return {Command} `this` command for chaining - */ - - exitOverride(fn) { - if (fn) { - this._exitCallback = fn; - } else { - this._exitCallback = (err) => { - if (err.code !== 'commander.executeSubCommandAsync') { - throw err; - } else { - // Async callback from spawn events, not useful to throw. - } - }; - } - return this; - }; - - /** - * Call process.exit, and _exitCallback if defined. - * - * @param {number} exitCode exit code for using with process.exit - * @param {string} code an id string representing the error - * @param {string} message human-readable description of the error - * @return never - * @api private - */ - - _exit(exitCode, code, message) { - if (this._exitCallback) { - this._exitCallback(new CommanderError(exitCode, code, message)); - // Expecting this line is not reached. - } - process.exit(exitCode); - }; - - /** - * Register callback `fn` for the command. - * - * Examples: - * - * program - * .command('help') - * .description('display verbose help') - * .action(function() { - * // output help here - * }); - * - * @param {Function} fn - * @return {Command} `this` command for chaining - */ - - action(fn) { - const listener = (args) => { - // The .action callback takes an extra parameter which is the command or options. - const expectedArgsCount = this._args.length; - const actionArgs = args.slice(0, expectedArgsCount); - if (this._storeOptionsAsProperties) { - actionArgs[expectedArgsCount] = this; // backwards compatible "options" - } else { - actionArgs[expectedArgsCount] = this.opts(); - } - actionArgs.push(this); - - const actionResult = fn.apply(this, actionArgs); - // Remember result in case it is async. Assume parseAsync getting called on root. - let rootCommand = this; - while (rootCommand.parent) { - rootCommand = rootCommand.parent; - } - rootCommand._actionResults.push(actionResult); - }; - this._actionHandler = listener; - return this; - }; - - /** - * Factory routine to create a new unattached option. - * - * See .option() for creating an attached option, which uses this routine to - * create the option. You can override createOption to return a custom option. - * - * @param {string} flags - * @param {string} [description] - * @return {Option} new option - */ - - createOption(flags, description) { - return new Option(flags, description); - }; - - /** - * Add an option. - * - * @param {Option} option - * @return {Command} `this` command for chaining - */ - addOption(option) { - const oname = option.name(); - const name = option.attributeName(); - - let defaultValue = option.defaultValue; - - // preassign default value for --no-*, [optional], <required>, or plain flag if boolean value - if (option.negate || option.optional || option.required || typeof defaultValue === 'boolean') { - // when --no-foo we make sure default is true, unless a --foo option is already defined - if (option.negate) { - const positiveLongFlag = option.long.replace(/^--no-/, '--'); - defaultValue = this._findOption(positiveLongFlag) ? this._getOptionValue(name) : true; - } - // preassign only if we have a default - if (defaultValue !== undefined) { - this._setOptionValue(name, defaultValue); - } - } - - // register the option - this.options.push(option); - - // when it's passed assign the value - // and conditionally invoke the callback - this.on('option:' + oname, (val) => { - const oldValue = this._getOptionValue(name); - - // custom processing - if (val !== null && option.parseArg) { - try { - val = option.parseArg(val, oldValue === undefined ? defaultValue : oldValue); - } catch (err) { - if (err.code === 'commander.invalidOptionArgument') { - const message = `error: option '${option.flags}' argument '${val}' is invalid. ${err.message}`; - this._displayError(err.exitCode, err.code, message); - } - throw err; - } - } else if (val !== null && option.variadic) { - val = option._concatValue(val, oldValue); - } - - // unassigned or boolean value - if (typeof oldValue === 'boolean' || typeof oldValue === 'undefined') { - // if no value, negate false, and we have a default, then use it! - if (val == null) { - this._setOptionValue(name, option.negate - ? false - : defaultValue || true); - } else { - this._setOptionValue(name, val); - } - } else if (val !== null) { - // reassign - this._setOptionValue(name, option.negate ? false : val); - } - }); - - return this; - } - - /** - * Internal implementation shared by .option() and .requiredOption() - * - * @api private - */ - _optionEx(config, flags, description, fn, defaultValue) { - const option = this.createOption(flags, description); - option.makeOptionMandatory(!!config.mandatory); - if (typeof fn === 'function') { - option.default(defaultValue).argParser(fn); - } else if (fn instanceof RegExp) { - // deprecated - const regex = fn; - fn = (val, def) => { - const m = regex.exec(val); - return m ? m[0] : def; - }; - option.default(defaultValue).argParser(fn); - } else { - option.default(fn); - } - - return this.addOption(option); - } - - /** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string contains the short and/or long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * Examples: - * - * // simple boolean defaulting to undefined - * program.option('-p, --pepper', 'add pepper'); - * - * program.pepper - * // => undefined - * - * --pepper - * program.pepper - * // => true - * - * // simple boolean defaulting to true (unless non-negated option is also defined) - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => false - * - * // required argument - * program.option('-C, --chdir <path>', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {string} flags - * @param {string} [description] - * @param {Function|*} [fn] - custom option processing function or default value - * @param {*} [defaultValue] - * @return {Command} `this` command for chaining - */ - - option(flags, description, fn, defaultValue) { - return this._optionEx({}, flags, description, fn, defaultValue); - }; - - /** - * Add a required option which must have a value after parsing. This usually means - * the option must be specified on the command line. (Otherwise the same as .option().) - * - * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. - * - * @param {string} flags - * @param {string} [description] - * @param {Function|*} [fn] - custom option processing function or default value - * @param {*} [defaultValue] - * @return {Command} `this` command for chaining - */ - - requiredOption(flags, description, fn, defaultValue) { - return this._optionEx({ mandatory: true }, flags, description, fn, defaultValue); - }; - - /** - * Alter parsing of short flags with optional values. - * - * Examples: - * - * // for `.option('-f,--flag [value]'): - * .combineFlagAndOptionalValue(true) // `-f80` is treated like `--flag=80`, this is the default behaviour - * .combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b` - * - * @param {Boolean} [combine=true] - if `true` or omitted, an optional value can be specified directly after the flag. - */ - combineFlagAndOptionalValue(combine = true) { - this._combineFlagAndOptionalValue = !!combine; - return this; - }; - - /** - * Allow unknown options on the command line. - * - * @param {Boolean} [allowUnknown=true] - if `true` or omitted, no error will be thrown - * for unknown options. - */ - allowUnknownOption(allowUnknown = true) { - this._allowUnknownOption = !!allowUnknown; - return this; - }; - - /** - * Allow excess command-arguments on the command line. Pass false to make excess arguments an error. - * - * @param {Boolean} [allowExcess=true] - if `true` or omitted, no error will be thrown - * for excess arguments. - */ - allowExcessArguments(allowExcess = true) { - this._allowExcessArguments = !!allowExcess; - return this; - }; - - /** - * Enable positional options. Positional means global options are specified before subcommands which lets - * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions. - * The default behaviour is non-positional and global options may appear anywhere on the command line. - * - * @param {Boolean} [positional=true] - */ - enablePositionalOptions(positional = true) { - this._enablePositionalOptions = !!positional; - return this; - }; - - /** - * Pass through options that come after command-arguments rather than treat them as command-options, - * so actual command-options come before command-arguments. Turning this on for a subcommand requires - * positional options to have been enabled on the program (parent commands). - * The default behaviour is non-positional and options may appear before or after command-arguments. - * - * @param {Boolean} [passThrough=true] - * for unknown options. - */ - passThroughOptions(passThrough = true) { - this._passThroughOptions = !!passThrough; - if (!!this.parent && passThrough && !this.parent._enablePositionalOptions) { - throw new Error('passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)'); - } - return this; - }; - - /** - * Whether to store option values as properties on command object, - * or store separately (specify false). In both cases the option values can be accessed using .opts(). - * - * @param {boolean} [storeAsProperties=true] - * @return {Command} `this` command for chaining - */ - - storeOptionsAsProperties(storeAsProperties = true) { - this._storeOptionsAsProperties = !!storeAsProperties; - if (this.options.length) { - throw new Error('call .storeOptionsAsProperties() before adding options'); - } - return this; - }; - - /** - * Store option value - * - * @param {string} key - * @param {Object} value - * @api private - */ - - _setOptionValue(key, value) { - if (this._storeOptionsAsProperties) { - this[key] = value; - } else { - this._optionValues[key] = value; - } - }; - - /** - * Retrieve option value - * - * @param {string} key - * @return {Object} value - * @api private - */ - - _getOptionValue(key) { - if (this._storeOptionsAsProperties) { - return this[key]; - } - return this._optionValues[key]; - }; - - /** - * Parse `argv`, setting options and invoking commands when defined. - * - * The default expectation is that the arguments are from node and have the application as argv[0] - * and the script being run in argv[1], with user parameters after that. - * - * Examples: - * - * program.parse(process.argv); - * program.parse(); // implicitly use process.argv and auto-detect node vs electron conventions - * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] - * - * @param {string[]} [argv] - optional, defaults to process.argv - * @param {Object} [parseOptions] - optionally specify style of options with from: node/user/electron - * @param {string} [parseOptions.from] - where the args are from: 'node', 'user', 'electron' - * @return {Command} `this` command for chaining - */ - - parse(argv, parseOptions) { - if (argv !== undefined && !Array.isArray(argv)) { - throw new Error('first parameter to parse must be array or undefined'); - } - parseOptions = parseOptions || {}; - - // Default to using process.argv - if (argv === undefined) { - argv = process.argv; - // @ts-ignore: unknown property - if (process.versions && process.versions.electron) { - parseOptions.from = 'electron'; - } - } - this.rawArgs = argv.slice(); - - // make it a little easier for callers by supporting various argv conventions - let userArgs; - switch (parseOptions.from) { - case undefined: - case 'node': - this._scriptPath = argv[1]; - userArgs = argv.slice(2); - break; - case 'electron': - // @ts-ignore: unknown property - if (process.defaultApp) { - this._scriptPath = argv[1]; - userArgs = argv.slice(2); - } else { - userArgs = argv.slice(1); - } - break; - case 'user': - userArgs = argv.slice(0); - break; - default: - throw new Error(`unexpected parse option { from: '${parseOptions.from}' }`); - } - if (!this._scriptPath && require.main) { - this._scriptPath = require.main.filename; - } - - // Guess name, used in usage in help. - this._name = this._name || (this._scriptPath && path.basename(this._scriptPath, path.extname(this._scriptPath))); - - // Let's go! - this._parseCommand([], userArgs); - - return this; - }; - - /** - * Parse `argv`, setting options and invoking commands when defined. - * - * Use parseAsync instead of parse if any of your action handlers are async. Returns a Promise. - * - * The default expectation is that the arguments are from node and have the application as argv[0] - * and the script being run in argv[1], with user parameters after that. - * - * Examples: - * - * program.parseAsync(process.argv); - * program.parseAsync(); // implicitly use process.argv and auto-detect node vs electron conventions - * program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] - * - * @param {string[]} [argv] - * @param {Object} [parseOptions] - * @param {string} parseOptions.from - where the args are from: 'node', 'user', 'electron' - * @return {Promise} - */ - - parseAsync(argv, parseOptions) { - this.parse(argv, parseOptions); - return Promise.all(this._actionResults).then(() => this); - }; - - /** - * Execute a sub-command executable. - * - * @api private - */ - - _executeSubCommand(subcommand, args) { - args = args.slice(); - let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows. - const sourceExt = ['.js', '.ts', '.tsx', '.mjs', '.cjs']; - - // Not checking for help first. Unlikely to have mandatory and executable, and can't robustly test for help flags in external command. - this._checkForMissingMandatoryOptions(); - - // Want the entry script as the reference for command name and directory for searching for other files. - let scriptPath = this._scriptPath; - // Fallback in case not set, due to how Command created or called. - if (!scriptPath && require.main) { - scriptPath = require.main.filename; - } - - let baseDir; - try { - const resolvedLink = fs.realpathSync(scriptPath); - baseDir = path.dirname(resolvedLink); - } catch (e) { - baseDir = '.'; // dummy, probably not going to find executable! - } - - // name of the subcommand, like `pm-install` - let bin = path.basename(scriptPath, path.extname(scriptPath)) + '-' + subcommand._name; - if (subcommand._executableFile) { - bin = subcommand._executableFile; - } - - const localBin = path.join(baseDir, bin); - if (fs.existsSync(localBin)) { - // prefer local `./<bin>` to bin in the $PATH - bin = localBin; - } else { - // Look for source files. - sourceExt.forEach((ext) => { - if (fs.existsSync(`${localBin}${ext}`)) { - bin = `${localBin}${ext}`; - } - }); - } - launchWithNode = sourceExt.includes(path.extname(bin)); - - let proc; - if (process.platform !== 'win32') { - if (launchWithNode) { - args.unshift(bin); - // add executable arguments to spawn - args = incrementNodeInspectorPort(process.execArgv).concat(args); - - proc = childProcess.spawn(process.argv[0], args, { stdio: 'inherit' }); - } else { - proc = childProcess.spawn(bin, args, { stdio: 'inherit' }); - } - } else { - args.unshift(bin); - // add executable arguments to spawn - args = incrementNodeInspectorPort(process.execArgv).concat(args); - proc = childProcess.spawn(process.execPath, args, { stdio: 'inherit' }); - } - - const signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP']; - signals.forEach((signal) => { - // @ts-ignore - process.on(signal, () => { - if (proc.killed === false && proc.exitCode === null) { - proc.kill(signal); - } - }); - }); - - // By default terminate process when spawned process terminates. - // Suppressing the exit if exitCallback defined is a bit messy and of limited use, but does allow process to stay running! - const exitCallback = this._exitCallback; - if (!exitCallback) { - proc.on('close', process.exit.bind(process)); - } else { - proc.on('close', () => { - exitCallback(new CommanderError(process.exitCode || 0, 'commander.executeSubCommandAsync', '(close)')); - }); - } - proc.on('error', (err) => { - // @ts-ignore - if (err.code === 'ENOENT') { - const executableMissing = `'${bin}' does not exist - - if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead - - if the default executable name is not suitable, use the executableFile option to supply a custom name`; - throw new Error(executableMissing); - // @ts-ignore - } else if (err.code === 'EACCES') { - throw new Error(`'${bin}' not executable`); - } - if (!exitCallback) { - process.exit(1); - } else { - const wrappedError = new CommanderError(1, 'commander.executeSubCommandAsync', '(error)'); - wrappedError.nestedError = err; - exitCallback(wrappedError); - } - }); - - // Store the reference to the child process - this.runningCommand = proc; - }; - - /** - * @api private - */ - _dispatchSubcommand(commandName, operands, unknown) { - const subCommand = this._findCommand(commandName); - if (!subCommand) this.help({ error: true }); - - if (subCommand._executableHandler) { - this._executeSubCommand(subCommand, operands.concat(unknown)); - } else { - subCommand._parseCommand(operands, unknown); - } - }; - - /** - * Process arguments in context of this command. - * - * @api private - */ - - _parseCommand(operands, unknown) { - const parsed = this.parseOptions(unknown); - operands = operands.concat(parsed.operands); - unknown = parsed.unknown; - this.args = operands.concat(unknown); - - if (operands && this._findCommand(operands[0])) { - this._dispatchSubcommand(operands[0], operands.slice(1), unknown); - } else if (this._hasImplicitHelpCommand() && operands[0] === this._helpCommandName) { - if (operands.length === 1) { - this.help(); - } else { - this._dispatchSubcommand(operands[1], [], [this._helpLongFlag]); - } - } else if (this._defaultCommandName) { - outputHelpIfRequested(this, unknown); // Run the help for default command from parent rather than passing to default command - this._dispatchSubcommand(this._defaultCommandName, operands, unknown); - } else { - if (this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName) { - // probably missing subcommand and no handler, user needs help - this.help({ error: true }); - } - - outputHelpIfRequested(this, parsed.unknown); - this._checkForMissingMandatoryOptions(); - - // We do not always call this check to avoid masking a "better" error, like unknown command. - const checkForUnknownOptions = () => { - if (parsed.unknown.length > 0) { - this.unknownOption(parsed.unknown[0]); - } - }; - - const commandEvent = `command:${this.name()}`; - if (this._actionHandler) { - checkForUnknownOptions(); - // Check expected arguments and collect variadic together. - const args = this.args.slice(); - this._args.forEach((arg, i) => { - if (arg.required && args[i] == null) { - this.missingArgument(arg.name); - } else if (arg.variadic) { - args[i] = args.splice(i); - args.length = Math.min(i + 1, args.length); - } - }); - if (args.length > this._args.length) { - this._excessArguments(args); - } - - this._actionHandler(args); - if (this.parent) this.parent.emit(commandEvent, operands, unknown); // legacy - } else if (this.parent && this.parent.listenerCount(commandEvent)) { - checkForUnknownOptions(); - this.parent.emit(commandEvent, operands, unknown); // legacy - } else if (operands.length) { - if (this._findCommand('*')) { // legacy default command - this._dispatchSubcommand('*', operands, unknown); - } else if (this.listenerCount('command:*')) { - // skip option check, emit event for possible misspelling suggestion - this.emit('command:*', operands, unknown); - } else if (this.commands.length) { - this.unknownCommand(); - } else { - checkForUnknownOptions(); - } - } else if (this.commands.length) { - // This command has subcommands and nothing hooked up at this level, so display help. - this.help({ error: true }); - } else { - checkForUnknownOptions(); - // fall through for caller to handle after calling .parse() - } - } - }; - - /** - * Find matching command. - * - * @api private - */ - _findCommand(name) { - if (!name) return undefined; - return this.commands.find(cmd => cmd._name === name || cmd._aliases.includes(name)); - }; - - /** - * Return an option matching `arg` if any. - * - * @param {string} arg - * @return {Option} - * @api private - */ - - _findOption(arg) { - return this.options.find(option => option.is(arg)); - }; - - /** - * Display an error message if a mandatory option does not have a value. - * Lazy calling after checking for help flags from leaf subcommand. - * - * @api private - */ - - _checkForMissingMandatoryOptions() { - // Walk up hierarchy so can call in subcommand after checking for displaying help. - for (let cmd = this; cmd; cmd = cmd.parent) { - cmd.options.forEach((anOption) => { - if (anOption.mandatory && (cmd._getOptionValue(anOption.attributeName()) === undefined)) { - cmd.missingMandatoryOptionValue(anOption); - } - }); - } - }; - - /** - * Parse options from `argv` removing known options, - * and return argv split into operands and unknown arguments. - * - * Examples: - * - * argv => operands, unknown - * --known kkk op => [op], [] - * op --known kkk => [op], [] - * sub --unknown uuu op => [sub], [--unknown uuu op] - * sub -- --unknown uuu op => [sub --unknown uuu op], [] - * - * @param {String[]} argv - * @return {{operands: String[], unknown: String[]}} - */ - - parseOptions(argv) { - const operands = []; // operands, not options or values - const unknown = []; // first unknown option and remaining unknown args - let dest = operands; - const args = argv.slice(); - - function maybeOption(arg) { - return arg.length > 1 && arg[0] === '-'; - } - - // parse options - let activeVariadicOption = null; - while (args.length) { - const arg = args.shift(); - - // literal - if (arg === '--') { - if (dest === unknown) dest.push(arg); - dest.push(...args); - break; - } - - if (activeVariadicOption && !maybeOption(arg)) { - this.emit(`option:${activeVariadicOption.name()}`, arg); - continue; - } - activeVariadicOption = null; - - if (maybeOption(arg)) { - const option = this._findOption(arg); - // recognised option, call listener to assign value with possible custom processing - if (option) { - if (option.required) { - const value = args.shift(); - if (value === undefined) this.optionMissingArgument(option); - this.emit(`option:${option.name()}`, value); - } else if (option.optional) { - let value = null; - // historical behaviour is optional value is following arg unless an option - if (args.length > 0 && !maybeOption(args[0])) { - value = args.shift(); - } - this.emit(`option:${option.name()}`, value); - } else { // boolean flag - this.emit(`option:${option.name()}`); - } - activeVariadicOption = option.variadic ? option : null; - continue; - } - } - - // Look for combo options following single dash, eat first one if known. - if (arg.length > 2 && arg[0] === '-' && arg[1] !== '-') { - const option = this._findOption(`-${arg[1]}`); - if (option) { - if (option.required || (option.optional && this._combineFlagAndOptionalValue)) { - // option with value following in same argument - this.emit(`option:${option.name()}`, arg.slice(2)); - } else { - // boolean option, emit and put back remainder of arg for further processing - this.emit(`option:${option.name()}`); - args.unshift(`-${arg.slice(2)}`); - } - continue; - } - } - - // Look for known long flag with value, like --foo=bar - if (/^--[^=]+=/.test(arg)) { - const index = arg.indexOf('='); - const option = this._findOption(arg.slice(0, index)); - if (option && (option.required || option.optional)) { - this.emit(`option:${option.name()}`, arg.slice(index + 1)); - continue; - } - } - - // Not a recognised option by this command. - // Might be a command-argument, or subcommand option, or unknown option, or help command or option. - - // An unknown option means further arguments also classified as unknown so can be reprocessed by subcommands. - if (maybeOption(arg)) { - dest = unknown; - } - - // If using positionalOptions, stop processing our options at subcommand. - if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown.length === 0) { - if (this._findCommand(arg)) { - operands.push(arg); - if (args.length > 0) unknown.push(...args); - break; - } else if (arg === this._helpCommandName && this._hasImplicitHelpCommand()) { - operands.push(arg); - if (args.length > 0) operands.push(...args); - break; - } else if (this._defaultCommandName) { - unknown.push(arg); - if (args.length > 0) unknown.push(...args); - break; - } - } - - // If using passThroughOptions, stop processing options at first command-argument. - if (this._passThroughOptions) { - dest.push(arg); - if (args.length > 0) dest.push(...args); - break; - } - - // add arg - dest.push(arg); - } - - return { operands, unknown }; - }; - - /** - * Return an object containing options as key-value pairs - * - * @return {Object} - */ - opts() { - if (this._storeOptionsAsProperties) { - // Preserve original behaviour so backwards compatible when still using properties - const result = {}; - const len = this.options.length; - - for (let i = 0; i < len; i++) { - const key = this.options[i].attributeName(); - result[key] = key === this._versionOptionName ? this._version : this[key]; - } - return result; - } - - return this._optionValues; - }; - - /** - * Internal bottleneck for handling of parsing errors. - * - * @api private - */ - _displayError(exitCode, code, message) { - this._outputConfiguration.outputError(`${message}\n`, this._outputConfiguration.writeErr); - this._exit(exitCode, code, message); - } - - /** - * Argument `name` is missing. - * - * @param {string} name - * @api private - */ - - missingArgument(name) { - const message = `error: missing required argument '${name}'`; - this._displayError(1, 'commander.missingArgument', message); - }; - - /** - * `Option` is missing an argument. - * - * @param {Option} option - * @api private - */ - - optionMissingArgument(option) { - const message = `error: option '${option.flags}' argument missing`; - this._displayError(1, 'commander.optionMissingArgument', message); - }; - - /** - * `Option` does not have a value, and is a mandatory option. - * - * @param {Option} option - * @api private - */ - - missingMandatoryOptionValue(option) { - const message = `error: required option '${option.flags}' not specified`; - this._displayError(1, 'commander.missingMandatoryOptionValue', message); - }; - - /** - * Unknown option `flag`. - * - * @param {string} flag - * @api private - */ - - unknownOption(flag) { - if (this._allowUnknownOption) return; - const message = `error: unknown option '${flag}'`; - this._displayError(1, 'commander.unknownOption', message); - }; - - /** - * Excess arguments, more than expected. - * - * @param {string[]} receivedArgs - * @api private - */ - - _excessArguments(receivedArgs) { - if (this._allowExcessArguments) return; - - const expected = this._args.length; - const s = (expected === 1) ? '' : 's'; - const forSubcommand = this.parent ? ` for '${this.name()}'` : ''; - const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${receivedArgs.length}.`; - this._displayError(1, 'commander.excessArguments', message); - }; - - /** - * Unknown command. - * - * @api private - */ - - unknownCommand() { - const partCommands = [this.name()]; - for (let parentCmd = this.parent; parentCmd; parentCmd = parentCmd.parent) { - partCommands.unshift(parentCmd.name()); - } - const fullCommand = partCommands.join(' '); - const message = `error: unknown command '${this.args[0]}'.` + - (this._hasHelpOption ? ` See '${fullCommand} ${this._helpLongFlag}'.` : ''); - this._displayError(1, 'commander.unknownCommand', message); - }; - - /** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * You can optionally supply the flags and description to override the defaults. - * - * @param {string} str - * @param {string} [flags] - * @param {string} [description] - * @return {this | string} `this` command for chaining, or version string if no arguments - */ - - version(str, flags, description) { - if (str === undefined) return this._version; - this._version = str; - flags = flags || '-V, --version'; - description = description || 'output the version number'; - const versionOption = this.createOption(flags, description); - this._versionOptionName = versionOption.attributeName(); - this.options.push(versionOption); - this.on('option:' + versionOption.name(), () => { - this._outputConfiguration.writeOut(`${str}\n`); - this._exit(0, 'commander.version', str); - }); - return this; - }; - - /** - * Set the description to `str`. - * - * @param {string} [str] - * @param {Object} [argsDescription] - * @return {string|Command} - */ - description(str, argsDescription) { - if (str === undefined && argsDescription === undefined) return this._description; - this._description = str; - this._argsDescription = argsDescription; - return this; - }; - - /** - * Set an alias for the command. - * - * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help. - * - * @param {string} [alias] - * @return {string|Command} - */ - - alias(alias) { - if (alias === undefined) return this._aliases[0]; // just return first, for backwards compatibility - - let command = this; - if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler) { - // assume adding alias for last added executable subcommand, rather than this - command = this.commands[this.commands.length - 1]; - } - - if (alias === command._name) throw new Error('Command alias can\'t be the same as its name'); - - command._aliases.push(alias); - return this; - }; - - /** - * Set aliases for the command. - * - * Only the first alias is shown in the auto-generated help. - * - * @param {string[]} [aliases] - * @return {string[]|Command} - */ - - aliases(aliases) { - // Getter for the array of aliases is the main reason for having aliases() in addition to alias(). - if (aliases === undefined) return this._aliases; - - aliases.forEach((alias) => this.alias(alias)); - return this; - }; - - /** - * Set / get the command usage `str`. - * - * @param {string} [str] - * @return {String|Command} - */ - - usage(str) { - if (str === undefined) { - if (this._usage) return this._usage; - - const args = this._args.map((arg) => { - return humanReadableArgName(arg); - }); - return [].concat( - (this.options.length || this._hasHelpOption ? '[options]' : []), - (this.commands.length ? '[command]' : []), - (this._args.length ? args : []) - ).join(' '); - } - - this._usage = str; - return this; - }; - - /** - * Get or set the name of the command - * - * @param {string} [str] - * @return {string|Command} - */ - - name(str) { - if (str === undefined) return this._name; - this._name = str; - return this; - }; - - /** - * Return program help documentation. - * - * @param {{ error: boolean }} [contextOptions] - pass {error:true} to wrap for stderr instead of stdout - * @return {string} - */ - - helpInformation(contextOptions) { - const helper = this.createHelp(); - if (helper.helpWidth === undefined) { - helper.helpWidth = (contextOptions && contextOptions.error) ? this._outputConfiguration.getErrHelpWidth() : this._outputConfiguration.getOutHelpWidth(); - } - return helper.formatHelp(this, helper); - }; - - /** - * @api private - */ - - _getHelpContext(contextOptions) { - contextOptions = contextOptions || {}; - const context = { error: !!contextOptions.error }; - let write; - if (context.error) { - write = (arg) => this._outputConfiguration.writeErr(arg); - } else { - write = (arg) => this._outputConfiguration.writeOut(arg); - } - context.write = contextOptions.write || write; - context.command = this; - return context; - } - - /** - * Output help information for this command. - * - * Outputs built-in help, and custom text added using `.addHelpText()`. - * - * @param {{ error: boolean } | Function} [contextOptions] - pass {error:true} to write to stderr instead of stdout - */ - - outputHelp(contextOptions) { - let deprecatedCallback; - if (typeof contextOptions === 'function') { - deprecatedCallback = contextOptions; - contextOptions = undefined; - } - const context = this._getHelpContext(contextOptions); - - const groupListeners = []; - let command = this; - while (command) { - groupListeners.push(command); // ordered from current command to root - command = command.parent; - } - - groupListeners.slice().reverse().forEach(command => command.emit('beforeAllHelp', context)); - this.emit('beforeHelp', context); - - let helpInformation = this.helpInformation(context); - if (deprecatedCallback) { - helpInformation = deprecatedCallback(helpInformation); - if (typeof helpInformation !== 'string' && !Buffer.isBuffer(helpInformation)) { - throw new Error('outputHelp callback must return a string or a Buffer'); - } - } - context.write(helpInformation); - - this.emit(this._helpLongFlag); // deprecated - this.emit('afterHelp', context); - groupListeners.forEach(command => command.emit('afterAllHelp', context)); - }; - - /** - * You can pass in flags and a description to override the help - * flags and help description for your command. Pass in false to - * disable the built-in help option. - * - * @param {string | boolean} [flags] - * @param {string} [description] - * @return {Command} `this` command for chaining - */ - - helpOption(flags, description) { - if (typeof flags === 'boolean') { - this._hasHelpOption = flags; - return this; - } - this._helpFlags = flags || this._helpFlags; - this._helpDescription = description || this._helpDescription; - - const helpFlags = _parseOptionFlags(this._helpFlags); - this._helpShortFlag = helpFlags.shortFlag; - this._helpLongFlag = helpFlags.longFlag; - - return this; - }; - - /** - * Output help information and exit. - * - * Outputs built-in help, and custom text added using `.addHelpText()`. - * - * @param {{ error: boolean }} [contextOptions] - pass {error:true} to write to stderr instead of stdout - */ - - help(contextOptions) { - this.outputHelp(contextOptions); - let exitCode = process.exitCode || 0; - if (exitCode === 0 && contextOptions && typeof contextOptions !== 'function' && contextOptions.error) { - exitCode = 1; - } - // message: do not have all displayed text available so only passing placeholder. - this._exit(exitCode, 'commander.help', '(outputHelp)'); - }; - - /** - * Add additional text to be displayed with the built-in help. - * - * Position is 'before' or 'after' to affect just this command, - * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands. - * - * @param {string} position - before or after built-in help - * @param {string | Function} text - string to add, or a function returning a string - * @return {Command} `this` command for chaining - */ - addHelpText(position, text) { - const allowedValues = ['beforeAll', 'before', 'after', 'afterAll']; - if (!allowedValues.includes(position)) { - throw new Error(`Unexpected value for position to addHelpText. -Expecting one of '${allowedValues.join("', '")}'`); - } - const helpEvent = `${position}Help`; - this.on(helpEvent, (context) => { - let helpStr; - if (typeof text === 'function') { - helpStr = text({ error: context.error, command: context.command }); - } else { - helpStr = text; - } - // Ignore falsy value when nothing to output. - if (helpStr) { - context.write(`${helpStr}\n`); - } - }); - return this; - } -}; - -/** - * Expose the root command. - */ - -exports = module.exports = new Command(); -exports.program = exports; // More explicit access to global command. - -/** - * Expose classes - */ - -exports.Command = Command; -exports.Option = Option; -exports.CommanderError = CommanderError; -exports.InvalidOptionArgumentError = InvalidOptionArgumentError; -exports.Help = Help; - -/** - * Camel-case the given `flag` - * - * @param {string} flag - * @return {string} - * @api private - */ - -function camelcase(flag) { - return flag.split('-').reduce((str, word) => { - return str + word[0].toUpperCase() + word.slice(1); - }); -} - -/** - * Output help information if help flags specified - * - * @param {Command} cmd - command to output help for - * @param {Array} args - array of options to search for help flags - * @api private - */ - -function outputHelpIfRequested(cmd, args) { - const helpOption = cmd._hasHelpOption && args.find(arg => arg === cmd._helpLongFlag || arg === cmd._helpShortFlag); - if (helpOption) { - cmd.outputHelp(); - // (Do not have all displayed text available so only passing placeholder.) - cmd._exit(0, 'commander.helpDisplayed', '(outputHelp)'); - } -} - -/** - * Takes an argument and returns its human readable equivalent for help usage. - * - * @param {Object} arg - * @return {string} - * @api private - */ - -function humanReadableArgName(arg) { - const nameOutput = arg.name + (arg.variadic === true ? '...' : ''); - - return arg.required - ? '<' + nameOutput + '>' - : '[' + nameOutput + ']'; -} - -/** - * Parse the short and long flag out of something like '-m,--mixed <value>' - * - * @api private - */ - -function _parseOptionFlags(flags) { - let shortFlag; - let longFlag; - // Use original very loose parsing to maintain backwards compatibility for now, - // which allowed for example unintended `-sw, --short-word` [sic]. - const flagParts = flags.split(/[ |,]+/); - if (flagParts.length > 1 && !/^[[<]/.test(flagParts[1])) shortFlag = flagParts.shift(); - longFlag = flagParts.shift(); - // Add support for lone short flag without significantly changing parsing! - if (!shortFlag && /^-[^-]$/.test(longFlag)) { - shortFlag = longFlag; - longFlag = undefined; - } - return { shortFlag, longFlag }; -} - -/** - * Scan arguments and increment port number for inspect calls (to avoid conflicts when spawning new command). - * - * @param {string[]} args - array of arguments from node.execArgv - * @returns {string[]} - * @api private - */ - -function incrementNodeInspectorPort(args) { - // Testing for these options: - // --inspect[=[host:]port] - // --inspect-brk[=[host:]port] - // --inspect-port=[host:]port - return args.map((arg) => { - if (!arg.startsWith('--inspect')) { - return arg; - } - let debugOption; - let debugHost = '127.0.0.1'; - let debugPort = '9229'; - let match; - if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) { - // e.g. --inspect - debugOption = match[1]; - } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) { - debugOption = match[1]; - if (/^\d+$/.test(match[3])) { - // e.g. --inspect=1234 - debugPort = match[3]; - } else { - // e.g. --inspect=localhost - debugHost = match[3]; - } - } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null) { - // e.g. --inspect=localhost:1234 - debugOption = match[1]; - debugHost = match[3]; - debugPort = match[4]; - } - - if (debugOption && debugPort !== '0') { - return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`; - } - return arg; - }); -} diff --git a/node_modules/commander/package-support.json b/node_modules/commander/package-support.json deleted file mode 100644 index 4eabb970..00000000 --- a/node_modules/commander/package-support.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "versions": [ - { - "version": "*", - "target": { - "node": "supported" - }, - "response": { - "type": "time-permitting" - }, - "backing": { - "npm-funding": true - } - } - ] -} diff --git a/node_modules/commander/package.json b/node_modules/commander/package.json deleted file mode 100644 index af4e39ed..00000000 --- a/node_modules/commander/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_from": "commander@~7.2", - "_id": "commander@7.2.0", - "_inBundle": false, - "_integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "_location": "/commander", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "commander@~7.2", - "name": "commander", - "escapedName": "commander", - "rawSpec": "~7.2", - "saveSpec": null, - "fetchSpec": "~7.2" - }, - "_requiredBy": [ - "/@antora/cli" - ], - "_resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "_shasum": "a36cb57d0b501ce108e4d20559a150a391d97ab7", - "_spec": "commander@~7.2", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/cli", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "bugs": { - "url": "https://github.com/tj/commander.js/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "the complete solution for node.js command-line programs", - "devDependencies": { - "@types/jest": "^26.0.20", - "@types/node": "^14.14.20", - "@typescript-eslint/eslint-plugin": "^4.12.0", - "@typescript-eslint/parser": "^4.12.0", - "eslint": "^7.17.0", - "eslint-config-standard": "^16.0.2", - "eslint-plugin-jest": "^24.1.3", - "jest": "^26.6.3", - "standard": "^16.0.3", - "ts-jest": "^26.5.1", - "tsd": "^0.14.0", - "typescript": "^4.1.2" - }, - "engines": { - "node": ">= 10" - }, - "files": [ - "index.js", - "esm.mjs", - "typings/index.d.ts", - "package-support.json" - ], - "homepage": "https://github.com/tj/commander.js#readme", - "jest": { - "testEnvironment": "node", - "collectCoverage": true, - "transform": { - "^.+\\.tsx?$": "ts-jest" - }, - "testPathIgnorePatterns": [ - "/node_modules/" - ] - }, - "keywords": [ - "commander", - "command", - "option", - "parser", - "cli", - "argument", - "args", - "argv" - ], - "license": "MIT", - "main": "./index.js", - "name": "commander", - "repository": { - "type": "git", - "url": "git+https://github.com/tj/commander.js.git" - }, - "scripts": { - "lint": "eslint index.js esm.mjs \"tests/**/*.js\"", - "test": "jest && npm run test-typings", - "test-all": "npm run test && npm run lint && npm run typescript-lint && npm run typescript-checkJS && npm run test-esm", - "test-esm": "node --experimental-modules ./tests/esm-imports-test.mjs", - "test-typings": "tsd", - "typescript-checkJS": "tsc --allowJS --checkJS index.js --noEmit", - "typescript-lint": "eslint typings/*.ts tests/*.ts" - }, - "support": true, - "type": "commonjs", - "types": "typings/index.d.ts", - "version": "7.2.0" -} diff --git a/node_modules/commander/typings/index.d.ts b/node_modules/commander/typings/index.d.ts deleted file mode 100644 index ee40d899..00000000 --- a/node_modules/commander/typings/index.d.ts +++ /dev/null @@ -1,627 +0,0 @@ -// Type definitions for commander -// Original definitions by: Alan Agius <https://github.com/alan-agius4>, Marcelo Dezem <https://github.com/mdezem>, vvakame <https://github.com/vvakame>, Jules Randolph <https://github.com/sveinburne> - -// Using method rather than property for method-signature-style, to document method overloads separately. Allow either. -/* eslint-disable @typescript-eslint/method-signature-style */ -/* eslint-disable @typescript-eslint/no-explicit-any */ - -declare namespace commander { - - interface CommanderError extends Error { - code: string; - exitCode: number; - message: string; - nestedError?: string; - } - type CommanderErrorConstructor = new (exitCode: number, code: string, message: string) => CommanderError; - - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface InvalidOptionArgumentError extends CommanderError { - } - type InvalidOptionArgumentErrorConstructor = new (message: string) => InvalidOptionArgumentError; - - interface Option { - flags: string; - description: string; - - required: boolean; // A value must be supplied when the option is specified. - optional: boolean; // A value is optional when the option is specified. - variadic: boolean; - mandatory: boolean; // The option must have a value after parsing, which usually means it must be specified on command line. - optionFlags: string; - short?: string; - long?: string; - negate: boolean; - defaultValue?: any; - defaultValueDescription?: string; - parseArg?: <T>(value: string, previous: T) => T; - hidden: boolean; - argChoices?: string[]; - - /** - * Set the default value, and optionally supply the description to be displayed in the help. - */ - default(value: any, description?: string): this; - - /** - * Calculate the full description, including defaultValue etc. - */ - fullDescription(): string; - - /** - * Set the custom handler for processing CLI option arguments into option values. - */ - argParser<T>(fn: (value: string, previous: T) => T): this; - - /** - * Whether the option is mandatory and must have a value after parsing. - */ - makeOptionMandatory(mandatory?: boolean): this; - - /** - * Hide option in help. - */ - hideHelp(hide?: boolean): this; - - /** - * Validation of option argument failed. - * Intended for use from custom argument processing functions. - */ - argumentRejected(messsage: string): never; - - /** - * Only allow option value to be one of choices. - */ - choices(values: string[]): this; - - /** - * Return option name. - */ - name(): string; - - /** - * Return option name, in a camelcase format that can be used - * as a object attribute key. - */ - attributeName(): string; - } - type OptionConstructor = new (flags: string, description?: string) => Option; - - interface Help { - /** output helpWidth, long lines are wrapped to fit */ - helpWidth?: number; - sortSubcommands: boolean; - sortOptions: boolean; - - /** Get the command term to show in the list of subcommands. */ - subcommandTerm(cmd: Command): string; - /** Get the command description to show in the list of subcommands. */ - subcommandDescription(cmd: Command): string; - /** Get the option term to show in the list of options. */ - optionTerm(option: Option): string; - /** Get the option description to show in the list of options. */ - optionDescription(option: Option): string; - - /** Get the command usage to be displayed at the top of the built-in help. */ - commandUsage(cmd: Command): string; - /** Get the description for the command. */ - commandDescription(cmd: Command): string; - - /** Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one. */ - visibleCommands(cmd: Command): Command[]; - /** Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one. */ - visibleOptions(cmd: Command): Option[]; - /** Get an array of the arguments which have descriptions. */ - visibleArguments(cmd: Command): Array<{ term: string; description: string}>; - - /** Get the longest command term length. */ - longestSubcommandTermLength(cmd: Command, helper: Help): number; - /** Get the longest option term length. */ - longestOptionTermLength(cmd: Command, helper: Help): number; - /** Get the longest argument term length. */ - longestArgumentTermLength(cmd: Command, helper: Help): number; - /** Calculate the pad width from the maximum term length. */ - padWidth(cmd: Command, helper: Help): number; - - /** - * Wrap the given string to width characters per line, with lines after the first indented. - * Do not wrap if insufficient room for wrapping (minColumnWidth), or string is manually formatted. - */ - wrap(str: string, width: number, indent: number, minColumnWidth?: number): string; - - /** Generate the built-in help text. */ - formatHelp(cmd: Command, helper: Help): string; - } - type HelpConstructor = new () => Help; - type HelpConfiguration = Partial<Help>; - - interface ParseOptions { - from: 'node' | 'electron' | 'user'; - } - interface HelpContext { // optional parameter for .help() and .outputHelp() - error: boolean; - } - interface AddHelpTextContext { // passed to text function used with .addHelpText() - error: boolean; - command: Command; - } - interface OutputConfiguration { - writeOut?(str: string): void; - writeErr?(str: string): void; - getOutHelpWidth?(): number; - getErrHelpWidth?(): number; - outputError?(str: string, write: (str: string) => void): void; - - } - - type AddHelpTextPosition = 'beforeAll' | 'before' | 'after' | 'afterAll'; - - interface OptionValues { - [key: string]: any; - } - - interface Command { - args: string[]; - commands: Command[]; - parent: Command | null; - - /** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * You can optionally supply the flags and description to override the defaults. - */ - version(str: string, flags?: string, description?: string): this; - - /** - * Define a command, implemented using an action handler. - * - * @remarks - * The command description is supplied using `.description`, not as a parameter to `.command`. - * - * @example - * ```ts - * program - * .command('clone <source> [destination]') - * .description('clone a repository into a newly created directory') - * .action((source, destination) => { - * console.log('clone command called'); - * }); - * ``` - * - * @param nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...` - * @param opts - configuration options - * @returns new command - */ - command(nameAndArgs: string, opts?: CommandOptions): ReturnType<this['createCommand']>; - /** - * Define a command, implemented in a separate executable file. - * - * @remarks - * The command description is supplied as the second parameter to `.command`. - * - * @example - * ```ts - * program - * .command('start <service>', 'start named service') - * .command('stop [service]', 'stop named service, or all if no name supplied'); - * ``` - * - * @param nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...` - * @param description - description of executable command - * @param opts - configuration options - * @returns `this` command for chaining - */ - command(nameAndArgs: string, description: string, opts?: commander.ExecutableCommandOptions): this; - - /** - * Factory routine to create a new unattached command. - * - * See .command() for creating an attached subcommand, which uses this routine to - * create the command. You can override createCommand to customise subcommands. - */ - createCommand(name?: string): Command; - - /** - * Add a prepared subcommand. - * - * See .command() for creating an attached subcommand which inherits settings from its parent. - * - * @returns `this` command for chaining - */ - addCommand(cmd: Command, opts?: CommandOptions): this; - - /** - * Define argument syntax for command. - * - * @returns `this` command for chaining - */ - arguments(desc: string): this; - - /** - * Override default decision whether to add implicit help command. - * - * addHelpCommand() // force on - * addHelpCommand(false); // force off - * addHelpCommand('help [cmd]', 'display help for [cmd]'); // force on with custom details - * - * @returns `this` command for chaining - */ - addHelpCommand(enableOrNameAndArgs?: string | boolean, description?: string): this; - - /** - * Register callback to use as replacement for calling process.exit. - */ - exitOverride(callback?: (err: CommanderError) => never|void): this; - - /** - * You can customise the help with a subclass of Help by overriding createHelp, - * or by overriding Help properties using configureHelp(). - */ - createHelp(): Help; - - /** - * You can customise the help by overriding Help properties using configureHelp(), - * or with a subclass of Help by overriding createHelp(). - */ - configureHelp(configuration: HelpConfiguration): this; - /** Get configuration */ - configureHelp(): HelpConfiguration; - - /** - * The default output goes to stdout and stderr. You can customise this for special - * applications. You can also customise the display of errors by overriding outputError. - * - * The configuration properties are all functions: - * - * // functions to change where being written, stdout and stderr - * writeOut(str) - * writeErr(str) - * // matching functions to specify width for wrapping help - * getOutHelpWidth() - * getErrHelpWidth() - * // functions based on what is being written out - * outputError(str, write) // used for displaying errors, and not used for displaying help - */ - configureOutput(configuration: OutputConfiguration): this; - /** Get configuration */ - configureOutput(): OutputConfiguration; - - /** - * Register callback `fn` for the command. - * - * @example - * program - * .command('help') - * .description('display verbose help') - * .action(function() { - * // output help here - * }); - * - * @returns `this` command for chaining - */ - action(fn: (...args: any[]) => void | Promise<void>): this; - - /** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string contains the short and/or long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * @example - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to true - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => false - * - * // required argument - * program.option('-C, --chdir <path>', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @returns `this` command for chaining - */ - option(flags: string, description?: string, defaultValue?: string | boolean): this; - option<T>(flags: string, description: string, fn: (value: string, previous: T) => T, defaultValue?: T): this; - /** @deprecated since v7, instead use choices or a custom function */ - option(flags: string, description: string, regexp: RegExp, defaultValue?: string | boolean): this; - - /** - * Define a required option, which must have a value after parsing. This usually means - * the option must be specified on the command line. (Otherwise the same as .option().) - * - * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. - */ - requiredOption(flags: string, description?: string, defaultValue?: string | boolean): this; - requiredOption<T>(flags: string, description: string, fn: (value: string, previous: T) => T, defaultValue?: T): this; - /** @deprecated since v7, instead use choices or a custom function */ - requiredOption(flags: string, description: string, regexp: RegExp, defaultValue?: string | boolean): this; - - /** - * Factory routine to create a new unattached option. - * - * See .option() for creating an attached option, which uses this routine to - * create the option. You can override createOption to return a custom option. - */ - - createOption(flags: string, description?: string): Option; - - /** - * Add a prepared Option. - * - * See .option() and .requiredOption() for creating and attaching an option in a single call. - */ - addOption(option: Option): this; - - /** - * Whether to store option values as properties on command object, - * or store separately (specify false). In both cases the option values can be accessed using .opts(). - * - * @returns `this` command for chaining - */ - storeOptionsAsProperties(): this & OptionValues; - storeOptionsAsProperties(storeAsProperties: true): this & OptionValues; - storeOptionsAsProperties(storeAsProperties?: boolean): this; - - /** - * Alter parsing of short flags with optional values. - * - * @example - * // for `.option('-f,--flag [value]'): - * .combineFlagAndOptionalValue(true) // `-f80` is treated like `--flag=80`, this is the default behaviour - * .combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b` - * - * @returns `this` command for chaining - */ - combineFlagAndOptionalValue(combine?: boolean): this; - - /** - * Allow unknown options on the command line. - * - * @returns `this` command for chaining - */ - allowUnknownOption(allowUnknown?: boolean): this; - - /** - * Allow excess command-arguments on the command line. Pass false to make excess arguments an error. - * - * @returns `this` command for chaining - */ - allowExcessArguments(allowExcess?: boolean): this; - - /** - * Enable positional options. Positional means global options are specified before subcommands which lets - * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions. - * - * The default behaviour is non-positional and global options may appear anywhere on the command line. - * - * @returns `this` command for chaining - */ - enablePositionalOptions(positional?: boolean): this; - - /** - * Pass through options that come after command-arguments rather than treat them as command-options, - * so actual command-options come before command-arguments. Turning this on for a subcommand requires - * positional options to have been enabled on the program (parent commands). - * - * The default behaviour is non-positional and options may appear before or after command-arguments. - * - * @returns `this` command for chaining - */ - passThroughOptions(passThrough?: boolean): this; - - /** - * Parse `argv`, setting options and invoking commands when defined. - * - * The default expectation is that the arguments are from node and have the application as argv[0] - * and the script being run in argv[1], with user parameters after that. - * - * Examples: - * - * program.parse(process.argv); - * program.parse(); // implicitly use process.argv and auto-detect node vs electron conventions - * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] - * - * @returns `this` command for chaining - */ - parse(argv?: string[], options?: ParseOptions): this; - - /** - * Parse `argv`, setting options and invoking commands when defined. - * - * Use parseAsync instead of parse if any of your action handlers are async. Returns a Promise. - * - * The default expectation is that the arguments are from node and have the application as argv[0] - * and the script being run in argv[1], with user parameters after that. - * - * Examples: - * - * program.parseAsync(process.argv); - * program.parseAsync(); // implicitly use process.argv and auto-detect node vs electron conventions - * program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] - * - * @returns Promise - */ - parseAsync(argv?: string[], options?: ParseOptions): Promise<this>; - - /** - * Parse options from `argv` removing known options, - * and return argv split into operands and unknown arguments. - * - * @example - * argv => operands, unknown - * --known kkk op => [op], [] - * op --known kkk => [op], [] - * sub --unknown uuu op => [sub], [--unknown uuu op] - * sub -- --unknown uuu op => [sub --unknown uuu op], [] - */ - parseOptions(argv: string[]): commander.ParseOptionsResult; - - /** - * Return an object containing options as key-value pairs - */ - opts(): OptionValues; - - /** - * Set the description. - * - * @returns `this` command for chaining - */ - description(str: string, argsDescription?: {[argName: string]: string}): this; - /** - * Get the description. - */ - description(): string; - - /** - * Set an alias for the command. - * - * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help. - * - * @returns `this` command for chaining - */ - alias(alias: string): this; - /** - * Get alias for the command. - */ - alias(): string; - - /** - * Set aliases for the command. - * - * Only the first alias is shown in the auto-generated help. - * - * @returns `this` command for chaining - */ - aliases(aliases: string[]): this; - /** - * Get aliases for the command. - */ - aliases(): string[]; - - /** - * Set the command usage. - * - * @returns `this` command for chaining - */ - usage(str: string): this; - /** - * Get the command usage. - */ - usage(): string; - - /** - * Set the name of the command. - * - * @returns `this` command for chaining - */ - name(str: string): this; - /** - * Get the name of the command. - */ - name(): string; - - /** - * Output help information for this command. - * - * Outputs built-in help, and custom text added using `.addHelpText()`. - * - */ - outputHelp(context?: HelpContext): void; - /** @deprecated since v7 */ - outputHelp(cb?: (str: string) => string): void; - - /** - * Return command help documentation. - */ - helpInformation(context?: HelpContext): string; - - /** - * You can pass in flags and a description to override the help - * flags and help description for your command. Pass in false - * to disable the built-in help option. - */ - helpOption(flags?: string | boolean, description?: string): this; - - /** - * Output help information and exit. - * - * Outputs built-in help, and custom text added using `.addHelpText()`. - */ - help(context?: HelpContext): never; - /** @deprecated since v7 */ - help(cb?: (str: string) => string): never; - - /** - * Add additional text to be displayed with the built-in help. - * - * Position is 'before' or 'after' to affect just this command, - * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands. - */ - addHelpText(position: AddHelpTextPosition, text: string): this; - addHelpText(position: AddHelpTextPosition, text: (context: AddHelpTextContext) => string | undefined): this; - - /** - * Add a listener (callback) for when events occur. (Implemented using EventEmitter.) - */ - on(event: string | symbol, listener: (...args: any[]) => void): this; - } - type CommandConstructor = new (name?: string) => Command; - - interface CommandOptions { - hidden?: boolean; - isDefault?: boolean; - /** @deprecated since v7, replaced by hidden */ - noHelp?: boolean; - } - interface ExecutableCommandOptions extends CommandOptions { - executableFile?: string; - } - - // eslint-disable-next-line @typescript-eslint/no-unused-vars - interface ParseOptionsResult { - operands: string[]; - unknown: string[]; - } - - // eslint-disable-next-line @typescript-eslint/no-unused-vars - interface CommanderStatic extends Command { - program: Command; - Command: CommandConstructor; - Option: OptionConstructor; - CommanderError: CommanderErrorConstructor; - InvalidOptionArgumentError: InvalidOptionArgumentErrorConstructor; - Help: HelpConstructor; - } - -} - -// Declaring namespace AND global -// eslint-disable-next-line @typescript-eslint/no-redeclare -declare const commander: commander.CommanderStatic; -export = commander; diff --git a/node_modules/concat-map/.travis.yml b/node_modules/concat-map/.travis.yml deleted file mode 100644 index f1d0f13c..00000000 --- a/node_modules/concat-map/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/node_modules/concat-map/LICENSE b/node_modules/concat-map/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/concat-map/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/concat-map/README.markdown b/node_modules/concat-map/README.markdown deleted file mode 100644 index 408f70a1..00000000 --- a/node_modules/concat-map/README.markdown +++ /dev/null @@ -1,62 +0,0 @@ -concat-map -========== - -Concatenative mapdashery. - -[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) - -[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) - -example -======= - -``` js -var concatMap = require('concat-map'); -var xs = [ 1, 2, 3, 4, 5, 6 ]; -var ys = concatMap(xs, function (x) { - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; -}); -console.dir(ys); -``` - -*** - -``` -[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] -``` - -methods -======= - -``` js -var concatMap = require('concat-map') -``` - -concatMap(xs, fn) ------------------ - -Return an array of concatenated elements by calling `fn(x, i)` for each element -`x` and each index `i` in the array `xs`. - -When `fn(x, i)` returns an array, its result will be concatenated with the -result array. If `fn(x, i)` returns anything else, that value will be pushed -onto the end of the result array. - -install -======= - -With [npm](http://npmjs.org) do: - -``` -npm install concat-map -``` - -license -======= - -MIT - -notes -===== - -This module was written while sitting high above the ground in a tree. diff --git a/node_modules/concat-map/example/map.js b/node_modules/concat-map/example/map.js deleted file mode 100644 index 33656217..00000000 --- a/node_modules/concat-map/example/map.js +++ /dev/null @@ -1,6 +0,0 @@ -var concatMap = require('../'); -var xs = [ 1, 2, 3, 4, 5, 6 ]; -var ys = concatMap(xs, function (x) { - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; -}); -console.dir(ys); diff --git a/node_modules/concat-map/index.js b/node_modules/concat-map/index.js deleted file mode 100644 index b29a7812..00000000 --- a/node_modules/concat-map/index.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; diff --git a/node_modules/concat-map/package.json b/node_modules/concat-map/package.json deleted file mode 100644 index 162f7dff..00000000 --- a/node_modules/concat-map/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "_from": "concat-map@0.0.1", - "_id": "concat-map@0.0.1", - "_inBundle": false, - "_integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "_location": "/concat-map", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "concat-map@0.0.1", - "name": "concat-map", - "escapedName": "concat-map", - "rawSpec": "0.0.1", - "saveSpec": null, - "fetchSpec": "0.0.1" - }, - "_requiredBy": [ - "/brace-expansion" - ], - "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", - "_spec": "concat-map@0.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/brace-expansion", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/node-concat-map/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "concatenative mapdashery", - "devDependencies": { - "tape": "~2.4.0" - }, - "directories": { - "example": "example", - "test": "test" - }, - "homepage": "https://github.com/substack/node-concat-map#readme", - "keywords": [ - "concat", - "concatMap", - "map", - "functional", - "higher-order" - ], - "license": "MIT", - "main": "index.js", - "name": "concat-map", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-concat-map.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": { - "ie": [ - 6, - 7, - 8, - 9 - ], - "ff": [ - 3.5, - 10, - 15 - ], - "chrome": [ - 10, - 22 - ], - "safari": [ - 5.1 - ], - "opera": [ - 12 - ] - } - }, - "version": "0.0.1" -} diff --git a/node_modules/concat-map/test/map.js b/node_modules/concat-map/test/map.js deleted file mode 100644 index fdbd7022..00000000 --- a/node_modules/concat-map/test/map.js +++ /dev/null @@ -1,39 +0,0 @@ -var concatMap = require('../'); -var test = require('tape'); - -test('empty or not', function (t) { - var xs = [ 1, 2, 3, 4, 5, 6 ]; - var ixes = []; - var ys = concatMap(xs, function (x, ix) { - ixes.push(ix); - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; - }); - t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); - t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); - t.end(); -}); - -test('always something', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function (x) { - return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; - }); - t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); - t.end(); -}); - -test('scalars', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function (x) { - return x === 'b' ? [ 'B', 'B', 'B' ] : x; - }); - t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); - t.end(); -}); - -test('undefs', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function () {}); - t.same(ys, [ undefined, undefined, undefined, undefined ]); - t.end(); -}); diff --git a/node_modules/convert-source-map/LICENSE b/node_modules/convert-source-map/LICENSE deleted file mode 100644 index 41702c50..00000000 --- a/node_modules/convert-source-map/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2013 Thorsten Lorenz. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/convert-source-map/README.md b/node_modules/convert-source-map/README.md deleted file mode 100644 index fdee23e4..00000000 --- a/node_modules/convert-source-map/README.md +++ /dev/null @@ -1,120 +0,0 @@ -# convert-source-map [![build status](https://secure.travis-ci.org/thlorenz/convert-source-map.svg?branch=master)](http://travis-ci.org/thlorenz/convert-source-map) - -Converts a source-map from/to different formats and allows adding/changing properties. - -```js -var convert = require('convert-source-map'); - -var json = convert - .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') - .toJSON(); - -var modified = convert - .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') - .setProperty('sources', [ 'SRC/FOO.JS' ]) - .toJSON(); - -console.log(json); -console.log(modified); -``` - -```json -{"version":3,"file":"build/foo.min.js","sources":["src/foo.js"],"names":[],"mappings":"AAAA","sourceRoot":"/"} -{"version":3,"file":"build/foo.min.js","sources":["SRC/FOO.JS"],"names":[],"mappings":"AAAA","sourceRoot":"/"} -``` - -## API - -### fromObject(obj) - -Returns source map converter from given object. - -### fromJSON(json) - -Returns source map converter from given json string. - -### fromBase64(base64) - -Returns source map converter from given base64 encoded json string. - -### fromComment(comment) - -Returns source map converter from given base64 encoded json string prefixed with `//# sourceMappingURL=...`. - -### fromMapFileComment(comment, mapFileDir) - -Returns source map converter from given `filename` by parsing `//# sourceMappingURL=filename`. - -`filename` must point to a file that is found inside the `mapFileDir`. Most tools store this file right next to the -generated file, i.e. the one containing the source map. - -### fromSource(source) - -Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was found. - -### fromMapFileSource(source, mapFileDir) - -Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was -found. - -The sourcemap will be read from the map file found by parsing `# sourceMappingURL=file` comment. For more info see -fromMapFileComment. - -### toObject() - -Returns a copy of the underlying source map. - -### toJSON([space]) - -Converts source map to json string. If `space` is given (optional), this will be passed to -[JSON.stringify](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/JSON/stringify) when the -JSON string is generated. - -### toBase64() - -Converts source map to base64 encoded json string. - -### toComment([options]) - -Converts source map to an inline comment that can be appended to the source-file. - -By default, the comment is formatted like: `//# sourceMappingURL=...`, which you would -normally see in a JS source file. - -When `options.multiline == true`, the comment is formatted like: `/*# sourceMappingURL=... */`, which you would find in a CSS source file. - -### addProperty(key, value) - -Adds given property to the source map. Throws an error if property already exists. - -### setProperty(key, value) - -Sets given property to the source map. If property doesn't exist it is added, otherwise its value is updated. - -### getProperty(key) - -Gets given property of the source map. - -### removeComments(src) - -Returns `src` with all source map comments removed - -### removeMapFileComments(src) - -Returns `src` with all source map comments pointing to map files removed. - -### commentRegex - -Provides __a fresh__ RegExp each time it is accessed. Can be used to find source map comments. - -### mapFileCommentRegex - -Provides __a fresh__ RegExp each time it is accessed. Can be used to find source map comments pointing to map files. - -### generateMapFileComment(file, [options]) - -Returns a comment that links to an external source map via `file`. - -By default, the comment is formatted like: `//# sourceMappingURL=...`, which you would normally see in a JS source file. - -When `options.multiline == true`, the comment is formatted like: `/*# sourceMappingURL=... */`, which you would find in a CSS source file. diff --git a/node_modules/convert-source-map/index.js b/node_modules/convert-source-map/index.js deleted file mode 100644 index d3265f0a..00000000 --- a/node_modules/convert-source-map/index.js +++ /dev/null @@ -1,136 +0,0 @@ -'use strict'; -var fs = require('fs'); -var path = require('path'); -var SafeBuffer = require('safe-buffer'); - -Object.defineProperty(exports, 'commentRegex', { - get: function getCommentRegex () { - return /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/mg; - } -}); - -Object.defineProperty(exports, 'mapFileCommentRegex', { - get: function getMapFileCommentRegex () { - // Matches sourceMappingURL in either // or /* comment styles. - return /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg; - } -}); - - -function decodeBase64(base64) { - return (SafeBuffer.Buffer.from(base64, 'base64') || "").toString(); -} - -function stripComment(sm) { - return sm.split(',').pop(); -} - -function readFromFileMap(sm, dir) { - // NOTE: this will only work on the server since it attempts to read the map file - - var r = exports.mapFileCommentRegex.exec(sm); - - // for some odd reason //# .. captures in 1 and /* .. */ in 2 - var filename = r[1] || r[2]; - var filepath = path.resolve(dir, filename); - - try { - return fs.readFileSync(filepath, 'utf8'); - } catch (e) { - throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e); - } -} - -function Converter (sm, opts) { - opts = opts || {}; - - if (opts.isFileComment) sm = readFromFileMap(sm, opts.commentFileDir); - if (opts.hasComment) sm = stripComment(sm); - if (opts.isEncoded) sm = decodeBase64(sm); - if (opts.isJSON || opts.isEncoded) sm = JSON.parse(sm); - - this.sourcemap = sm; -} - -Converter.prototype.toJSON = function (space) { - return JSON.stringify(this.sourcemap, null, space); -}; - -Converter.prototype.toBase64 = function () { - var json = this.toJSON(); - return (SafeBuffer.Buffer.from(json, 'utf8') || "").toString('base64'); -}; - -Converter.prototype.toComment = function (options) { - var base64 = this.toBase64(); - var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; - return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data; -}; - -// returns copy instead of original -Converter.prototype.toObject = function () { - return JSON.parse(this.toJSON()); -}; - -Converter.prototype.addProperty = function (key, value) { - if (this.sourcemap.hasOwnProperty(key)) throw new Error('property "' + key + '" already exists on the sourcemap, use set property instead'); - return this.setProperty(key, value); -}; - -Converter.prototype.setProperty = function (key, value) { - this.sourcemap[key] = value; - return this; -}; - -Converter.prototype.getProperty = function (key) { - return this.sourcemap[key]; -}; - -exports.fromObject = function (obj) { - return new Converter(obj); -}; - -exports.fromJSON = function (json) { - return new Converter(json, { isJSON: true }); -}; - -exports.fromBase64 = function (base64) { - return new Converter(base64, { isEncoded: true }); -}; - -exports.fromComment = function (comment) { - comment = comment - .replace(/^\/\*/g, '//') - .replace(/\*\/$/g, ''); - - return new Converter(comment, { isEncoded: true, hasComment: true }); -}; - -exports.fromMapFileComment = function (comment, dir) { - return new Converter(comment, { commentFileDir: dir, isFileComment: true, isJSON: true }); -}; - -// Finds last sourcemap comment in file or returns null if none was found -exports.fromSource = function (content) { - var m = content.match(exports.commentRegex); - return m ? exports.fromComment(m.pop()) : null; -}; - -// Finds last sourcemap comment in file or returns null if none was found -exports.fromMapFileSource = function (content, dir) { - var m = content.match(exports.mapFileCommentRegex); - return m ? exports.fromMapFileComment(m.pop(), dir) : null; -}; - -exports.removeComments = function (src) { - return src.replace(exports.commentRegex, ''); -}; - -exports.removeMapFileComments = function (src) { - return src.replace(exports.mapFileCommentRegex, ''); -}; - -exports.generateMapFileComment = function (file, options) { - var data = 'sourceMappingURL=' + file; - return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data; -}; diff --git a/node_modules/convert-source-map/node_modules/safe-buffer/LICENSE b/node_modules/convert-source-map/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068cee..00000000 --- a/node_modules/convert-source-map/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/convert-source-map/node_modules/safe-buffer/README.md b/node_modules/convert-source-map/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81afd..00000000 --- a/node_modules/convert-source-map/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) -<!-- YAML -added: v3.0.0 ---> - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) -<!-- YAML -added: v5.10.0 ---> - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: <Buffer 88 13 a0 0f> - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: <Buffer 88 13 70 17> -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) -<!-- YAML -added: v3.0.0 ---> - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) -<!-- YAML -added: v5.10.0 ---> - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) -<!-- YAML -added: v5.10.0 ---> - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // <Buffer 00 00 00 00 00> -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // <Buffer 61 61 61 61 61> -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64> -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) -<!-- YAML -added: v5.10.0 ---> - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // <Buffer 78 e0 82 02 01> - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // <Buffer 00 00 00 00 00> -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) -<!-- YAML -added: v5.10.0 ---> - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/node_modules/convert-source-map/node_modules/safe-buffer/index.d.ts b/node_modules/convert-source-map/node_modules/safe-buffer/index.d.ts deleted file mode 100644 index e9fed809..00000000 --- a/node_modules/convert-source-map/node_modules/safe-buffer/index.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "safe-buffer" { - export class Buffer { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - } -} \ No newline at end of file diff --git a/node_modules/convert-source-map/node_modules/safe-buffer/index.js b/node_modules/convert-source-map/node_modules/safe-buffer/index.js deleted file mode 100644 index 22438dab..00000000 --- a/node_modules/convert-source-map/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/node_modules/convert-source-map/node_modules/safe-buffer/package.json b/node_modules/convert-source-map/node_modules/safe-buffer/package.json deleted file mode 100644 index e13bb7f3..00000000 --- a/node_modules/convert-source-map/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_from": "safe-buffer@~5.1.1", - "_id": "safe-buffer@5.1.2", - "_inBundle": false, - "_integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "_location": "/convert-source-map/safe-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "safe-buffer@~5.1.1", - "name": "safe-buffer", - "escapedName": "safe-buffer", - "rawSpec": "~5.1.1", - "saveSpec": null, - "fetchSpec": "~5.1.1" - }, - "_requiredBy": [ - "/convert-source-map" - ], - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "_shasum": "991ec69d296e0313747d59bdfd2b745c35f8828d", - "_spec": "safe-buffer@~5.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/convert-source-map", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Safer Node.js Buffer API", - "devDependencies": { - "standard": "*", - "tape": "^4.0.0" - }, - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "name": "safe-buffer", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "types": "index.d.ts", - "version": "5.1.2" -} diff --git a/node_modules/convert-source-map/package.json b/node_modules/convert-source-map/package.json deleted file mode 100644 index 80246956..00000000 --- a/node_modules/convert-source-map/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "_from": "convert-source-map@^1.5.0", - "_id": "convert-source-map@1.8.0", - "_inBundle": false, - "_integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "_location": "/convert-source-map", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "convert-source-map@^1.5.0", - "name": "convert-source-map", - "escapedName": "convert-source-map", - "rawSpec": "^1.5.0", - "saveSpec": null, - "fetchSpec": "^1.5.0" - }, - "_requiredBy": [ - "/vinyl-sourcemap" - ], - "_resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "_shasum": "f3373c32d21b4d780dd8004514684fb791ca4369", - "_spec": "convert-source-map@^1.5.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-sourcemap", - "author": { - "name": "Thorsten Lorenz", - "email": "thlorenz@gmx.de", - "url": "http://thlorenz.com" - }, - "browser": { - "fs": false - }, - "bugs": { - "url": "https://github.com/thlorenz/convert-source-map/issues" - }, - "bundleDependencies": false, - "dependencies": { - "safe-buffer": "~5.1.1" - }, - "deprecated": false, - "description": "Converts a source-map from/to different formats and allows adding/changing properties.", - "devDependencies": { - "inline-source-map": "~0.6.2", - "tap": "~9.0.0" - }, - "engine": { - "node": ">=0.6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/thlorenz/convert-source-map", - "keywords": [ - "convert", - "sourcemap", - "source", - "map", - "browser", - "debug" - ], - "license": "MIT", - "main": "index.js", - "name": "convert-source-map", - "repository": { - "type": "git", - "url": "git://github.com/thlorenz/convert-source-map.git" - }, - "scripts": { - "test": "tap test/*.js --color" - }, - "version": "1.8.0" -} diff --git a/node_modules/convict/LICENSE b/node_modules/convict/LICENSE deleted file mode 100644 index bce57b42..00000000 --- a/node_modules/convict/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2012 the lloydster - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/node_modules/convict/README.md b/node_modules/convict/README.md deleted file mode 100644 index 99bfa54e..00000000 --- a/node_modules/convict/README.md +++ /dev/null @@ -1,626 +0,0 @@ -# Convict - -[![NPM version](http://img.shields.io/npm/v/convict.svg)](https://www.npmjs.org/package/convict) -[![Build Status](https://travis-ci.org/mozilla/node-convict.svg?branch=master)](https://travis-ci.org/mozilla/node-convict) -[![Coverage Status](https://coveralls.io/repos/github/mozilla/node-convict/badge.svg?branch=master)](https://coveralls.io/github/mozilla/node-convict?branch=master) - -Convict expands on the standard pattern of configuring node.js applications in a -way that is more robust and accessible to collaborators, who may have less -interest in digging through code in order to inspect or modify settings. By -introducing a configuration schema, convict gives project collaborators more -**context** on each setting and enables **validation and early failures** for -when configuration goes wrong. - - -## Features - -* **Loading and merging**: configurations are loaded from disk or inline and - merged -* **Nested structure**: keys and values can be organized in a tree structure -* **Environmental variables**: values can be derived from environmental - variables -* **Command-line arguments**: values can also be derived from command-line - arguments -* **Validation**: configurations are validated against your schema (presence - checking, type checking, custom checking), generating an error report with - all errors that are found -* **Comments allowed**: schema and configuration files can be either in the - JSON format or in the newer [JSON5](https://www.npmjs.com/package/json5) - format, so comments are welcome -* **Configuration file additional types support**: custom file type support can - be used for the configuration file - - -## Install - -```shell -npm install convict -``` - -## Usage - -An example `config.js` file: - -```javascript -var convict = require('convict'); - -convict.addFormat(require('convict-format-with-validator').ipaddress); - -// Define a schema -var config = convict({ - env: { - doc: 'The application environment.', - format: ['production', 'development', 'test'], - default: 'development', - env: 'NODE_ENV' - }, - ip: { - doc: 'The IP address to bind.', - format: 'ipaddress', - default: '127.0.0.1', - env: 'IP_ADDRESS', - }, - port: { - doc: 'The port to bind.', - format: 'port', - default: 8080, - env: 'PORT', - arg: 'port' - }, - db: { - host: { - doc: 'Database host name/IP', - format: '*', - default: 'server1.dev.test' - }, - name: { - doc: 'Database name', - format: String, - default: 'users' - } - }, - admins: { - doc: 'Users with write access, or null to grant full access without login.', - format: Array, - nullable: true, - default: null - } -}); - -// Load environment dependent configuration -var env = config.get('env'); -config.loadFile('./config/' + env + '.json'); - -// Perform validation -config.validate({allowed: 'strict'}); - -module.exports = config; -``` - -An example `server.js` file leveraging the `config.js` file above: - -```javascript -var http = require('http'); -var config = require('./config.js'); - -var server = http.createServer(function (req, res) { - res.writeHead(200, {'Content-Type': 'text/plain'}); - res.end('Hello World\n'); -}); - -// Consume -server.listen(config.get('port'), config.get('ip'), function(x) { - var addy = server.address(); - console.log('running on http://' + addy.address + ':' + addy.port); -}); -``` - -To launch your example server, and set a port: - -```shell -node ./server.js --port 8080 -``` - -*Note*: Command-line arguments *must* be supplied with a double-hyphen prefix (e.g. `--arg`). Single-hypen prefixes (e.g. `-a`) are not supported at this time. - - -## The Schema - -A configuration module, with its deep nested schema, could look like this: - -config.js: -```javascript -var config = convict({ - db: { - name: { - format: String, - default: '' - }, - synchro: { - active: { - format: 'Boolean', - default: false - }, - remote_url: { - format: 'url', - default: 'http://localhost:8080/' - } - } - }, - secret: { - doc: 'Secret used for session cookies and CSRF tokens', - format: '*', - default: '', - sensitive: true - } -}); - -config.loadFile(['./prod.json', './config.json']); -``` - -Each setting in the schema has the following possible properties, each aiding in -convict's goal of being more robust and collaborator friendly. - -* **Type information**: the `format` property specifies either a built-in convict format (`ipaddress`, `port`, `int`, etc.), or it can be a function to check a custom format. During validation, if a format check fails it will be added to the error report. -* **Default values**: Every setting *must* have a default value. -* **Environmental variables**: If the variable specified by `env` has a value, it will overwrite the setting's default value. An environment variable may not be mapped to more than one setting. -* **Command-line arguments**: If the command-line argument specified by `arg` is supplied, it will overwrite the setting's default value or the value derived from `env`. -* **Documentation**: The `doc` property is pretty self-explanatory. The nice part about having it in the schema rather than as a comment is that we can call `config.getSchemaString()` and have it displayed in the output. -* **Sensitive values and secrets**: If `sensitive` is set to `true`, this value will be masked to `"[Sensitive]"` when `config.toString()` is called. This helps avoid disclosing secret keys when printing configuration at application start for debugging purposes. -* **Null values**: If `nullable` is set to `true`, the value counts as valid not only if it matches the specified `format`, but also when it is `null`. - - -### Validation - -In order to help detect misconfigurations, convict allows you to define a format for each setting. By default, convict checks if the value of the property has the same type (according to `Object.prototype.toString.call`) as the default value specified in the schema. You can define a custom format checking function in the schema by setting the `format` property. - -convict provides several predefined formats for validation that you can use. Most of them are self-explanatory: - -* `*` - any value is valid -* `int` -* `port` -* `windows_named_pipe` -* `port_or_windows_named_pipe` -* `nat` - positive integer (natural number) - -You can find other format [here](https://www.npmjs.com/search?q=keywords:convict-format). - -If `format` is set to one of the built-in JavaScript constructors, `Object`, `Array`, `String`, `Number`, `RegExp`, or `Boolean`, validation will use Object.prototype.toString.call to check that the setting is the proper type. - -If `nullable` is set to true, `null` will be a valid value as well. - -#### Custom format checking - -You can specify a custom format checking method on a property basis. - -For example: - -```javascript -var config = convict({ - key: { - doc: 'API key', - format: function check (val) { - if (!/^[a-fA-F0-9]{64}$/.test(val)) { - throw new Error('must be a 64 character hex key') - } - }, - default: '3cec609c9bc601c047af917a544645c50caf8cd606806b4e0a23312441014deb' - }, - name: { - doc: 'user name', - format: function check (val) { - if (typeof val.first_name !== 'string') { - throw new TypeError(`first name '${val.first_name}' is not a string`); - } - if (typeof val.last_name !== 'string') { - throw new TypeError(`last name '${val.last_name}' is not a string`); - } - }, - default: { - first_name: 'John', - last_name: 'Doe' - } - } -}); -``` - -Or, you can use `convict.addFormat()` to register a custom format checking -method that can be reused for many different properties: - -```javascript -convict.addFormat({ - name: 'float-percent', - validate: function(val) { - if (val !== 0 && (!val || val > 1 || val < 0)) { - throw new Error('must be a float between 0 and 1, inclusive'); - } - }, - coerce: function(val) { - return parseFloat(val, 10); - } -}); - -var config = convict({ - space_used: { - format: 'float-percent', - default: 0.5 - }, - success_rate: { - format: 'float-percent', - default: 60.0 - } -}); -``` - -The `coerce` function is optional. - -##### Custom format for array items - -You can specify a custom format checking for array items: - -```javascript -convict.addFormat({ - name: 'source-array', - validate: function(sources, schema) { - if (!Array.isArray(sources)) { - throw new Error('must be of type Array'); - } - - for (source of sources) { - convict(schema.children).load(source).validate(); - } - } -}); - -convict.addFormat(require('convict-format-with-validator').url); - -const schema = { - sources: { - doc: 'A collection of data sources.', - format: 'source-array', - default: [], - - children: { - type: { - doc: 'The source type', - format: ['git', 'hg', 'svn'], - default: null - }, - url: { - doc: 'The source URL', - format: 'url', - default: null - } - } - } -}; - -convict(schema).load({ - 'sources': [ - { - 'type': 'git', - 'url': 'https://github.com/mozilla/node-convict.git' - }, - { - 'type': 'git', - 'url': 'https://github.com/github/hub.git' - } - ] -}).validate(); -``` - -### Coercion - -Convict will automatically coerce environmental variables from strings to their proper types when importing them. -For instance, values with the format `int`, `nat`, `port`, or `Number` will become numbers after a straight -forward `parseInt` or `parseFloat`. `duration` and `timestamp` are also parse and converted into numbers, -though they utilize [moment.js](http://momentjs.com/) for date parsing. - - -### Precedence order - -When merging configuration values from different sources, Convict follows precedence rules. -The order, from lowest to highest, for `config.loadFile(file)` and `config.load(json)` is: - -1. Default value -2. File or json set in function argument -3. Environment variables (only used when `env` property is set in schema) -4. Command line arguments (only used when `arg` property is set in schema) - -This order means that if schema defines parameter to be taken from an environment variable -and environment variable is set then you cannot override it with `config.loadFile(file)` -or `config.load(json)`. - -```javascript -process.env.PORT = 8080; // environment variable is set -const config = convict({ - port: { - default: 3000, - env: 'PORT' - } -}); -config.load({ port: 9000 }); -console.log(config.get('port')); // still 8080 from env -``` - -### Overriding Environment variables and Command line arguments - -Convict allows to override Environment variables and Command line arguments. -It can be helpful for testing purposes. - -When creating a config object pass an object with two optional properties as the 2nd parameter: - -- `env: Object` - this object will be used instead of `process.env` -- `args: Array<string>` - this array will be used instead of `process.argv` - -```javascript -var config = convict({ - // configuration schema -}, { - env: { - // Environment variables - }, - args: [ - // Command line arguments - ] -}); -``` - -### Configuration file additional types support - -Convict is able to parse files with custom file types during `loadFile`. -For this specify the corresponding parsers with the associated file extensions. - -```javascript -convict.addParser({ extension: 'toml', parse: toml.parse }); -convict.addParser({ extension: ['yml', 'yaml'], parse: yaml.safeLoad }); -convict.addParser([ - { extension: 'json', parse: JSON.parse }, - { extension: 'json5', parse: json5.parse }, - { extension: ['yml', 'yaml'], parse: yaml.safeLoad }, - { extension: 'toml', parse: toml.parse } -]); - -const config = convict({ ... }); -config.loadFile('config.toml'); -``` - -If no supported extension is detected, `loadFile` will fallback to using the -default json parser. - -#### Allow comments in JSON files - -If you want to allow comments in your JSON file, use [JSON5](https://www.npmjs.com/package/json5). - -```javascript -convict.addParser({extension: 'json', parse: require('json5').parse}); -``` - - -## API - -### var config = convict(schema[, opts]) - -`convict()` takes a schema object or a path to a schema JSON file and returns a -convict configuration object. - -**opts:** Optional object: - - - **opts.env**: Override `process.env` if specified using an object `{'NODE_ENV': 'production'}`. - - **opts.args**: Override `process.argv` if specified using an array `['--argname', 'value']` or - a string `--argname value`. - -The configuration object has an API for getting and setting values, described -below. - -```javascript -var config = convict({ - env: { - doc: 'The application environment.', - format: ['production', 'development', 'test'], - default: 'development', - env: 'NODE_ENV' - }, - log_file_path: { - 'doc': 'Log file path', - 'format': String, - 'default': '/tmp/app.log' - } -}); - -// or -config = convict('/some/path/to/a/config-schema.json'); -``` - -### convict.addParser(parser or parserArray) - -Adds new parsers for custom file extensions - -### convict.addFormat(format) or convict.addFormat(name, validate, coerce) - -Adds a new custom format, `format` being an object, see example below. - -```javascript -convict.addFormat({ - name: 'float-percent', - validate: function(val) { - if (val !== 0 && (!val || val > 1 || val < 0)) { - throw new Error('must be a float between 0 and 1, inclusive'); - } - }, - coerce: function(val) { - return parseFloat(val, 10); - } -}); -``` - -### convict.addFormats(formats) - -Adds new custom formats, `formats` being an object whose keys are the new custom -format names, see example below. - -```javascript -convict.addFormats({ - prime: { - validate: function(val) { - function isPrime(n) { - if (n <= 1) return false; // zero and one are not prime - for (let i=2; i*i <= n; i++) { - if (n % i === 0) return false; - } - return true; - } - if (!isPrime(val)) throw new Error('must be a prime number'); - }, - coerce: function(val) { - return parseInt(val, 10); - } - }, - 'hex-string': { - validate: function(val) { - if (/^[0-9a-fA-F]+$/.test(val)) { - throw new Error('must be a hexadecimal string'); - } - } - } -}); -``` - -### config.get(name) - -Returns the current value of the `name` property. `name` can use dot notation to reference nested values. E.g.: -```javascript -config.get('db.host'); - -// or -config.get('db').host; -``` - -### config.default(name) - -Returns the default value of the `name` property. `name` can use dot notation to reference nested values. E.g.: -```javascript -config.default('server.port'); -``` - -### config.reset(name) - -Resets a property to its default value as defined in the schema. E.g.: -```javascript -config.reset('server.port'); -``` - -### config.has(name) - -Returns `true` if the property `name` is defined, or `false` otherwise. E.g.: -```javascript -if (config.has('some.property')) { - // Do something -} -``` - -### config.set(name, value) - -Sets the value of `name` to value. `name` can use dot notation to reference -nested values, e.g. `"db.port"`. If objects in the chain don't yet exist, -they will be initialized to empty objects. -E.g.: -```javascript -config.set('property.that.may.not.exist.yet', 'some value'); -config.get('property.that.may.not.exist.yet'); -// Returns "some value" -``` - -If you call `config.load` or `config.loadFile` after `config.set` then value provided by `config.set` -will be overridden in case of conflict. - -### config.load(object) - -Loads and merges a JavaScript object into `config`. E.g.: -```javascript -config.load({ - 'env': 'test', - 'ip': '127.0.0.1', - 'port': 80 -}); -``` -### config.loadFile(file or fileArray) - -Loads and merges one or multiple JSON configuration files into `config`. -E.g.: -```javascript -config.loadFile('./config/' + conf.get('env') + '.json'); -``` - -Or, loading multiple files at once: -```javascript -// CONFIG_FILES=/path/to/production.json,/path/to/secrets.json,/path/to/sitespecific.json -config.loadFile(process.env.CONFIG_FILES.split(',')); -``` -### config.validate([options]) - -Validates `config` against the schema used to initialize it. All errors are -collected and thrown or displayed at once. - -#### allowed option - -1. `warn`: If set to `warn` (that is `{allowed: 'warn'}` is passed), any - properties specified in config files that are not declared in the schema will - print a warning. This is the default behavior. - -2. `strict`: If set to `strict` (that is `{allowed: 'strict'}` is passed), any - properties specified in config files that are not declared in the schema will - throw errors. This is to ensure that the schema and the config files are in - sync. - -3. `output` : You can replace the default output `console.log` - by your own output function. You can use [debug module][debug] like this: - ```javascript - output: require('debug')('convict:validate:error') - ``` - -[debug]: https://www.npmjs.com/package/debug - -### config.getProperties() - -Exports all the properties (that is the keys and their current values) as JSON. - -### config.toString() - -Exports all the properties (that is the keys and their current values) as a JSON -string, with sensitive values masked. Sensitive values are masked even if they -aren't set, to avoid revealing any information. - -### config.getSchema() - -Exports the schema as JSON. - -### config.getSchemaString() - -Exports the schema as a JSON string. - -### config.getArgs() - -The array of process arguments (not including the launcher and application file arguments). Defaults to process.argv unless an override is specified using the args key of the second (options) argument of the convict function. - -### config.getEnv() - -The map of environment variables. Defaults to process.env unless an override is specified using the env key of the second argument (options) argument of the convict function. - -## FAQ - -### [How can I define a configuration property as "required" without providing a default value?](https://github.com/mozilla/node-convict/issues/29) - -The philosophy was to have production values be the default values. Usually you only want to change defaults for deploy or instance (in aws speak) specific tweaks. However, you can set a default value to `null` and if your format doesn't accept `null` it will throw an error. - -### [How can I use convict in a (browserify-based) browser context?](https://github.com/mozilla/node-convict/issues/47) - -Thanks to [browserify](http://browserify.org/), `convict` can be used for web applications too. To do so, - -* Use [`brfs`](https://www.npmjs.com/package/brfs) to ensure the `fs.loadFileSync` schema-loading calls are inlined at build time rather than resolved at runtime (in Gulp, add `.transform(brfs)` to your browserify pipe). -* To support *"loading configuration from a `http://foo.bar/some.json` URL"*, build a thin wrapper around convict using your favorite http package (e.g. [`superagent`](https://visionmedia.github.io/superagent/)). Typically, in the success callback, call convict's `load()` on the body of the response. - - -## Migrating - -* [Migrating from Convict 5 to 6](MIGRATING_FROM_CONVICT_5_TO_6.md) diff --git a/node_modules/convict/package.json b/node_modules/convict/package.json deleted file mode 100644 index 6c96063e..00000000 --- a/node_modules/convict/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_from": "convict@~6.1", - "_id": "convict@6.1.0", - "_inBundle": false, - "_integrity": "sha512-8dzppr6Z9URlm6P8N9NiydFRq2NWtQyf4RZOK5m0Q48fWWuKamHLXD7Qz/SiLvRXnjQcKCuHayIk9Fk51sax0w==", - "_location": "/convict", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "convict@~6.1", - "name": "convict", - "escapedName": "convict", - "rawSpec": "~6.1", - "saveSpec": null, - "fetchSpec": "~6.1" - }, - "_requiredBy": [ - "/@antora/playbook-builder" - ], - "_resolved": "https://registry.npmjs.org/convict/-/convict-6.1.0.tgz", - "_shasum": "5b393bd675a0e743390abd0c5bf9e2b9a2edf4b5", - "_spec": "convict@~6.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/playbook-builder", - "author": { - "name": "Lloyd Hilaiel", - "email": "lloyd@hilaiel.com", - "url": "http://lloyd.io" - }, - "bugs": { - "url": "https://github.com/mozilla/node-convict/issues" - }, - "bundleDependencies": false, - "dependencies": { - "lodash.clonedeep": "^4.5.0", - "yargs-parser": "^18.1.3" - }, - "deprecated": false, - "description": "Featureful configuration management library for Node.js (nested structure, schema validation, etc.)", - "engines": { - "node": ">=6" - }, - "files": [ - "src" - ], - "gitHead": "41e8c4ad755483e31c5a602bb4856d82318c0ab6", - "homepage": "https://github.com/mozilla/node-convict", - "keywords": [ - "configuration", - "config", - "conf", - "key value store", - "schema", - "nested", - "validation", - "customize", - "env", - "environment", - "json", - "yaml", - "toml" - ], - "license": "Apache-2.0", - "main": "src/main.js", - "name": "convict", - "repository": { - "type": "git", - "url": "https://github.com/mozilla/node-convict/tree/master/packages/convict" - }, - "version": "6.1.0" -} diff --git a/node_modules/convict/src/main.js b/node_modules/convict/src/main.js deleted file mode 100644 index e3a6a429..00000000 --- a/node_modules/convict/src/main.js +++ /dev/null @@ -1,776 +0,0 @@ -/** - * convict - * Configuration management with support for environmental variables, files, - * and validation. - */ -'use strict' - -const fs = require('fs') -const parseArgs = require('yargs-parser') -const cloneDeep = require('lodash.clonedeep') - -function assert(assertion, err_msg) { - if (!assertion) { - throw new Error(err_msg) - } -} - -// format can be a: -// - predefine type, as seen below -// - an array of enumerated values, e.g. ["production", "development", "testing"] -// - built-in JavaScript type, i.e. Object, Array, String, Number, Boolean, RegExp -// - or if omitted, the Object.prototype.toString.call of the default value - -/** - * Checks if x is a valid port - * - * @param {*} x - * @returns {Boolean} - */ -function isPort(x) { - return Number.isInteger(x) && x >= 0 && x <= 65535 -} - -/** - * Checks if x is a windows named pipe - * - * @see https://msdn.microsoft.com/en-us/library/windows/desktop/aa365783(v=vs.85).aspx - * @param {*} x - * @returns {Boolean} - */ -function isWindowsNamedPipe(x) { - return String(x).includes('\\\\.\\pipe\\') -} - -const types = { - '*': function() { }, - int: function(x) { - assert(Number.isInteger(x), 'must be an integer') - }, - nat: function(x) { - assert(Number.isInteger(x) && x >= 0, 'must be a positive integer') - }, - port: function(x) { - assert(isPort(x), 'ports must be within range 0 - 65535') - }, - windows_named_pipe: function(x) { - assert(isWindowsNamedPipe(x), 'must be a valid pipe') - }, - port_or_windows_named_pipe: function(x) { - if (!isWindowsNamedPipe(x)) { - assert(isPort(x), 'must be a windows named pipe or a number within range 0 - 65535') - } - } -} -// alias -types.integer = types.int - -const converters = new Map() - -const parsers_registry = {'*': JSON.parse} - -const ALLOWED_OPTION_STRICT = 'strict' -const ALLOWED_OPTION_WARN = 'warn' - -function flatten(obj, useProperties) { - const stack = Object.keys(obj) - let key - - const entries = [] - - while (stack.length) { - key = stack.shift() - let val = walk(obj, key) - if (typeof val === 'object' && !Array.isArray(val) && val != null) { - if (useProperties) { - if ('_cvtProperties' in val) { - val = val._cvtProperties - key = key + '._cvtProperties' - } else { - entries.push([key, val]) - continue - } - } - const subkeys = Object.keys(val) - - // Don't filter out empty objects - if (subkeys.length > 0) { - subkeys.forEach(function(subkey) { - stack.push(key + '.' + subkey) - }) - continue - } - } - entries.push([key, val]) - } - - const flattened = {} - entries.forEach(function(entry) { - let key = entry[0] - if (useProperties) { - key = key.replace(/\._cvtProperties/g, '') - } - const val = entry[1] - flattened[key] = val - }) - - return flattened -} - -function validate(instance, schema, strictValidation) { - const errors = { - undeclared: [], - invalid_type: [], - missing: [] - } - - const flatInstance = flatten(instance) - const flatSchema = flatten(schema._cvtProperties, true) - - Object.keys(flatSchema).forEach(function(name) { - const schemaItem = flatSchema[name] - let instanceItem = flatInstance[name] - if (!(name in flatInstance)) { - try { - if (typeof schemaItem.default === 'object' && - !Array.isArray(schemaItem.default)) { - // Missing item may be an object with undeclared children, so try to - // pull it unflattened from the config instance for type validation - instanceItem = walk(instance, name) - } else { - throw new Error('missing') - } - } catch (e) { - const err = new Error("configuration param '" + name - + "' missing from config, did you override its parent?") - errors.missing.push(err) - return - } - } - delete flatInstance[name] - - // ignore nested keys of schema 'object' properties - if (schemaItem.format === 'object' || typeof schemaItem.default === 'object') { - Object.keys(flatInstance) - .filter(function(key) { - return key.lastIndexOf(name + '.', 0) === 0 - }).forEach(function(key) { - delete flatInstance[key] - }) - } - - if (!(typeof schemaItem.default === 'undefined' && - instanceItem === schemaItem.default)) { - try { - schemaItem._format(instanceItem) - } catch (err) { - errors.invalid_type.push(err) - } - } - - return - }) - - if (strictValidation) { - Object.keys(flatInstance).forEach(function(name) { - const err = new Error("configuration param '" + name - + "' not declared in the schema") - errors.undeclared.push(err) - }) - } - - return errors -} - -// helper for asserting that a value is in the list of valid options -function contains(options, x) { - assert(options.indexOf(x) !== -1, 'must be one of the possible values: ' + - JSON.stringify(options)) -} - -const BUILT_INS_BY_NAME = { - Object: Object, - Array: Array, - String: String, - Number: Number, - Boolean: Boolean, - RegExp: RegExp -} -const BUILT_IN_NAMES = Object.keys(BUILT_INS_BY_NAME) -const BUILT_INS = BUILT_IN_NAMES.map(function(name) { - return BUILT_INS_BY_NAME[name] -}) - -function normalizeSchema(name, node, props, fullName, env, argv, sensitive) { - if (name === '_cvtProperties') { - throw new Error("'" + fullName + "': '_cvtProperties' is reserved word of convict.") - } - - // If the current schema node is not a config property (has no "default"), recursively normalize it. - if (typeof node === 'object' && node !== null && !Array.isArray(node) && - Object.keys(node).length > 0 && !('default' in node)) { - props[name] = { - _cvtProperties: {} - } - Object.keys(node).forEach(function(k) { - normalizeSchema(k, node[k], props[name]._cvtProperties, fullName + '.' + - k, env, argv, sensitive) - }) - return - } else if (typeof node !== 'object' || Array.isArray(node) || - node === null || Object.keys(node).length == 0) { - // Normalize shorthand "value" config properties - node = {default: node} - } - - const o = cloneDeep(node) - props[name] = o - // associate this property with an environmental variable - if (o.env) { - if (!env[o.env]) { - env[o.env] = [] - } - env[o.env].push(fullName) - } - - // associate this property with a command-line argument - if (o.arg) { - if (argv[o.arg]) { - throw new Error("'" + fullName + "' reuses a command-line argument: " + - o.arg) - } - argv[o.arg] = fullName - } - - // mark this property as sensitive - if (o.sensitive === true) { - sensitive.add(fullName) - } - - // store original format function - const format = o.format - let newFormat - - if (BUILT_INS.indexOf(format) >= 0 || BUILT_IN_NAMES.indexOf(format) >= 0) { - // if the format property is a built-in JavaScript constructor, - // assert that the value is of that type - const Format = typeof format === 'string' ? BUILT_INS_BY_NAME[format] : format - newFormat = function(x) { - assert(Object.prototype.toString.call(x) == - Object.prototype.toString.call(new Format()), - 'must be of type ' + Format.name) - } - o.format = Format.name.toLowerCase() - - } else if (typeof format === 'string') { - // store declared type - if (!types[format]) { - throw new Error("'" + fullName + "' uses an unknown format type: " + - format) - } - - // use a predefined type - newFormat = types[format] - - } else if (Array.isArray(format)) { - // assert that the value is a valid option - newFormat = contains.bind(null, format) - - } else if (typeof format === 'function') { - newFormat = format - - } else if (format && typeof format !== 'function') { - throw new Error("'" + fullName + - "': `format` must be a function or a known format type.") - } - - if (!newFormat && !format) { - // default format is the typeof the default value - const type = Object.prototype.toString.call(o.default) - newFormat = function(x) { - assert(Object.prototype.toString.call(x) == type, - ' should be of type ' + type.replace(/\[.* |]/g, '')) - } - } - - o._format = function(x) { - // accept null if allowed before calling any format function - if (this.nullable && x === null) { - return - } - - try { - newFormat(x, this) - } catch (e) { - // attach the value and the property's fullName to the error - e.fullName = fullName - e.value = x - throw e - } - } -} - -function importEnvironment(o) { - const env = o.getEnv() - Object.keys(o._env).forEach(function(envStr) { - if (env[envStr] !== undefined) { - const ks = o._env[envStr] - ks.forEach(function(k) { - o.set(k, env[envStr]) - }) - } - }) -} - -function importArguments(o) { - const argv = parseArgs(o.getArgs(), { - configuration: { - 'dot-notation': false - } - }) - Object.keys(o._argv).forEach(function(argStr) { - const k = o._argv[argStr] - if (argv[argStr] !== undefined) { - o.set(k, String(argv[argStr])) - } - }) -} - -function addDefaultValues(schema, c, instance) { - Object.keys(schema._cvtProperties).forEach(function(name) { - const p = schema._cvtProperties[name] - if (p._cvtProperties) { - const kids = c[name] || {} - addDefaultValues(p, kids, instance) - c[name] = kids - } else { - c[name] = coerce(name, cloneDeep(p.default), schema, instance) - } - }) -} - -function isObj(o) { - return typeof o === 'object' && o !== null -} - -function overlay(from, to, schema) { - Object.keys(from).forEach(function(k) { - // leaf - if (Array.isArray(from[k]) || !isObj(from[k]) || !schema || schema.format === 'object') { - to[k] = coerce(k, from[k], schema) - } else { - if (!isObj(to[k])) { - to[k] = {} - } - overlay(from[k], to[k], schema._cvtProperties[k]) - } - }) -} - -function traverseSchema(schema, path) { - const ar = path.split('.') - let o = schema - while (ar.length > 0) { - const k = ar.shift() - if (o && o._cvtProperties && o._cvtProperties[k]) { - o = o._cvtProperties[k] - } else { - o = null - break - } - } - - return o -} - -function getFormat(schema, path) { - const o = traverseSchema(schema, path) - if (o == null) { - return null - } - if (typeof o.format === 'string') { - return o.format - } - if (o.default != null) { - return typeof o.default - } - return null -} - -function coerce(k, v, schema, instance) { - // magic coerceing - const format = getFormat(schema, k) - - if (typeof v === 'string') { - if (converters.has(format)) { - return converters.get(format)(v, instance, k) - } - switch (format) { - case 'port': - case 'nat': - case 'integer': - case 'int': v = parseInt(v, 10); break - case 'port_or_windows_named_pipe': v = isWindowsNamedPipe(v) ? v : parseInt(v, 10); break - case 'number': v = parseFloat(v); break - case 'boolean': v = String(v).toLowerCase() !== 'false'; break - case 'array': v = v.split(','); break - case 'object': v = JSON.parse(v); break - case 'regexp': v = new RegExp(v); break - default: - // TODO: Should we throw an exception here? - } - } - - return v -} - -function loadFile(path) { - const segments = path.split('.') - const extension = segments.length > 1 ? segments.pop() : '' - const parse = parsers_registry[extension] || parsers_registry['*'] - - // TODO Get rid of the sync call - // eslint-disable-next-line no-sync - return parse(fs.readFileSync(path, 'utf-8')) -} - -function walk(obj, path, initializeMissing) { - if (path) { - const ar = path.split('.') - while (ar.length) { - const k = ar.shift() - if (initializeMissing && obj[k] == null) { - obj[k] = {} - obj = obj[k] - } else if (k in obj) { - obj = obj[k] - } else { - throw new Error("cannot find configuration param '" + path + "'") - } - } - } - - return obj -} - -/** - * @returns a config object - */ -const convict = function convict(def, opts) { - - // TODO: Rename this `rv` variable (supposedly "return value") into something - // more meaningful. - const rv = { - /** - * Gets the array of process arguments, using the override passed to the - * convict function or process.argv if no override was passed. - */ - getArgs: function() { - return opts && opts.args || process.argv.slice(2) - }, - - /** - * Gets the environment variable map, using the override passed to the - * convict function or process.env if no override was passed. - */ - getEnv: function() { - return opts && opts.env || process.env - }, - - /** - * Exports all the properties (that is the keys and their current values) as JSON - */ - getProperties: function() { - return cloneDeep(this._instance) - }, - - /** - * Exports all the properties (that is the keys and their current values) as - * a JSON string, with sensitive values masked. Sensitive values are masked - * even if they aren't set, to avoid revealing any information. - */ - toString: function() { - const clone = cloneDeep(this._instance) - this._sensitive.forEach(function(key) { - const path = key.split('.') - const childKey = path.pop() - const parentKey = path.join('.') - const parent = walk(clone, parentKey) - parent[childKey] = '[Sensitive]' - }) - return JSON.stringify(clone, null, 2) - }, - - /** - * Exports the schema as JSON. - */ - getSchema: function() { - return JSON.parse(JSON.stringify(this._schema)) - }, - - /** - * Exports the schema as a JSON string - */ - getSchemaString: function() { - return JSON.stringify(this._schema, null, 2) - }, - - /** - * @returns the current value of the name property. name can use dot - * notation to reference nested values - */ - get: function(path) { - const o = walk(this._instance, path) - return cloneDeep(o) - }, - - /** - * @returns the default value of the name property. name can use dot - * notation to reference nested values - */ - default: function(path) { - // The default value for FOO.BAR.BAZ is stored in `_schema._cvtProperties` at: - // FOO._cvtProperties.BAR._cvtProperties.BAZ.default - path = path.split('.').join('._cvtProperties.') + '.default' - const o = walk(this._schema._cvtProperties, path) - return cloneDeep(o) - }, - - /** - * Resets a property to its default value as defined in the schema - */ - reset: function(prop_name) { - this.set(prop_name, this.default(prop_name)) - }, - - /** - * @returns true if the property name is defined, or false otherwise - */ - has: function(path) { - try { - const r = this.get(path) - // values that are set but undefined return false - return typeof r !== 'undefined' - } catch (e) { - return false - } - }, - - /** - * Sets the value of name to value. name can use dot notation to reference - * nested values, e.g. "database.port". If objects in the chain don't yet - * exist, they will be initialized to empty objects - */ - set: function(k, v) { - v = coerce(k, v, this._schema, this) - const path = k.split('.') - const childKey = path.pop() - const parentKey = path.join('.') - if (!(parentKey == '__proto__' || parentKey == 'constructor' || parentKey == 'prototype')) { - const parent = walk(this._instance, parentKey, true) - parent[childKey] = v - } - return this - }, - - /** - * Loads and merges a JavaScript object into config - */ - load: function(conf) { - overlay(conf, this._instance, this._schema) - // environment and arguments always overrides config files - importEnvironment(rv) - importArguments(rv) - return this - }, - - /** - * Loads and merges one or multiple JSON configuration files into config - */ - loadFile: function(paths) { - const self = this - if (!Array.isArray(paths)) { - paths = [paths] - } - paths.forEach(function(path) { - // Support empty config files #253 - const result = loadFile(path) - if (result) { - overlay(result, self._instance, self._schema) - } - }) - // environment and arguments always overrides config files - importEnvironment(rv) - importArguments(rv) - return this - }, - - /** - * Validates config against the schema used to initialize it - */ - validate: function(options) { - options = options || {} - - options.allowed = options.allowed || ALLOWED_OPTION_WARN - - if (options.output && typeof options.output !== 'function') { - throw new Error('options.output is optionnal and must be a function.') - } - - const output_function = options.output || global.console.log - - const errors = validate(this._instance, this._schema, options.allowed) - - if (errors.invalid_type.length + errors.undeclared.length + errors.missing.length) { - const sensitive = this._sensitive - - const fillErrorBuffer = function(errors) { - let err_buf = '' - for (let i = 0; i < errors.length; i++) { - - if (err_buf.length) { - err_buf += '\n' - } - - const e = errors[i] - - if (e.fullName) { - err_buf += e.fullName + ': ' - } - if (e.message) { - err_buf += e.message - } - if (e.value && !sensitive.has(e.fullName)) { - err_buf += ': value was ' + JSON.stringify(e.value) - } - } - return err_buf - } - - const types_err_buf = fillErrorBuffer(errors.invalid_type) - const params_err_buf = fillErrorBuffer(errors.undeclared) - const missing_err_buf = fillErrorBuffer(errors.missing) - - const output_err_bufs = [types_err_buf, missing_err_buf] - - if (options.allowed === ALLOWED_OPTION_WARN && params_err_buf.length) { - let warning = 'Warning:' - if (process.stdout.isTTY) { - // Write 'Warning:' in bold and in yellow - const SET_BOLD_YELLOW_TEXT = '\x1b[33;1m' - const RESET_ALL_ATTRIBUTES = '\x1b[0m' - warning = SET_BOLD_YELLOW_TEXT + warning + RESET_ALL_ATTRIBUTES - } - output_function(warning + ' ' + params_err_buf) - } else if (options.allowed === ALLOWED_OPTION_STRICT) { - output_err_bufs.push(params_err_buf) - } - - const output = output_err_bufs - .filter(function(str) { - return str.length - }) - .join('\n') - - if (output.length) { - throw new Error(output) - } - - } - return this - } - } - - // If the definition is a string treat it as an external schema file - if (typeof def === 'string') { - rv._def = loadFile(def) - } else { - rv._def = def - } - - // build up current config from definition - rv._schema = { - _cvtProperties: {} - } - - rv._env = {} - rv._argv = {} - rv._sensitive = new Set() - - Object.keys(rv._def).forEach(function(k) { - normalizeSchema(k, rv._def[k], rv._schema._cvtProperties, k, rv._env, rv._argv, - rv._sensitive) - }) - - rv._instance = {} - addDefaultValues(rv._schema, rv._instance, rv) - importEnvironment(rv) - importArguments(rv) - - return rv -} - -/** - * Adds a new custom format - */ -convict.addFormat = function(name, validate, coerce) { - if (typeof name === 'object') { - validate = name.validate - coerce = name.coerce - name = name.name - } - if (typeof validate !== 'function') { - throw new Error('Validation function for ' + name + ' must be a function.') - } - if (coerce && typeof coerce !== 'function') { - throw new Error('Coerce function for ' + name + ' must be a function.') - } - types[name] = validate - if (coerce) { - converters.set(name, coerce) - } -} - -/** - * Adds new custom formats - */ -convict.addFormats = function(formats) { - Object.keys(formats).forEach(function(type) { - convict.addFormat(type, formats[type].validate, formats[type].coerce) - }) -} - -/** - * Adds a new custom file parser - */ -convict.addParser = function(parsers) { - if (!Array.isArray(parsers)) { - parsers = [parsers] - } - - parsers.forEach(function(parser) { - if (!parser) { - throw new Error('Invalid parser') - } - if (!parser.extension) { - throw new Error('Missing parser.extension') - } - if (!parser.parse) { - throw new Error('Missing parser.parse function') - } - - if (typeof parser.parse !== 'function') { - throw new Error('Invalid parser.parse function') - } - - const extensions = !Array.isArray(parser.extension) ? [parser.extension] : parser.extension - extensions.forEach(function(extension) { - if (typeof extension !== 'string') { - throw new Error('Invalid parser.extension') - } - parsers_registry[extension] = parser.parse - }) - }) -} - -module.exports = convict diff --git a/node_modules/core-util-is/LICENSE b/node_modules/core-util-is/LICENSE deleted file mode 100644 index d8d7f943..00000000 --- a/node_modules/core-util-is/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/core-util-is/README.md b/node_modules/core-util-is/README.md deleted file mode 100644 index 5a76b414..00000000 --- a/node_modules/core-util-is/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# core-util-is - -The `util.is*` functions introduced in Node v0.12. diff --git a/node_modules/core-util-is/float.patch b/node_modules/core-util-is/float.patch deleted file mode 100644 index a06d5c05..00000000 --- a/node_modules/core-util-is/float.patch +++ /dev/null @@ -1,604 +0,0 @@ -diff --git a/lib/util.js b/lib/util.js -index a03e874..9074e8e 100644 ---- a/lib/util.js -+++ b/lib/util.js -@@ -19,430 +19,6 @@ - // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - // USE OR OTHER DEALINGS IN THE SOFTWARE. - --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; --}; -- -- --// Mark that a method should not be used. --// Returns a modified function which warns once by default. --// If --no-deprecation is set, then it is a no-op. --exports.deprecate = function(fn, msg) { -- // Allow for deprecating things in the process of starting up. -- 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]; --}; -- -- --/** -- * Echos the value of a value. Trys to print the value out -- * in the best way possible given the different types. -- * -- * @param {Object} obj The object to print out. -- * @param {Object} opts Optional options object that alters the output. -- */ --/* legacy: obj, showHidden, depth, colors*/ --function inspect(obj, opts) { -- // default options -- var ctx = { -- seen: [], -- stylize: stylizeNoColor -- }; -- // legacy... -- if (arguments.length >= 3) ctx.depth = arguments[2]; -- if (arguments.length >= 4) ctx.colors = arguments[3]; -- if (isBoolean(opts)) { -- // legacy... -- ctx.showHidden = opts; -- } else if (opts) { -- // got an "options" object -- exports._extend(ctx, opts); -- } -- // set default options -- 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; -- -- --// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics --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] --}; -- --// Don't use 'blue' not visible on cmd.exe --inspect.styles = { -- 'special': 'cyan', -- 'number': 'yellow', -- 'boolean': 'yellow', -- 'undefined': 'grey', -- 'null': 'bold', -- 'string': 'green', -- 'date': 'magenta', -- // "name": intentionally not styling -- 'regexp': 'red' --}; -- -- --function stylizeWithColor(str, styleType) { -- var style = inspect.styles[styleType]; -- -- if (style) { -- return '\u001b[' + inspect.colors[style][0] + 'm' + str + -- '\u001b[' + 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) { -- // Provide a hook for user-specified inspect functions. -- // Check that value is an object with an inspect function on it -- if (ctx.customInspect && -- value && -- isFunction(value.inspect) && -- // Filter out the util module, it's inspect function is special -- value.inspect !== exports.inspect && -- // Also filter out any prototype objects using the circular check. -- !(value.constructor && value.constructor.prototype === value)) { -- var ret = value.inspect(recurseTimes, ctx); -- if (!isString(ret)) { -- ret = formatValue(ctx, ret, recurseTimes); -- } -- return ret; -- } -- -- // Primitive types cannot have properties -- var primitive = formatPrimitive(ctx, value); -- if (primitive) { -- return primitive; -- } -- -- // Look up the keys of the object. -- var keys = Object.keys(value); -- var visibleKeys = arrayToHash(keys); -- -- if (ctx.showHidden) { -- keys = Object.getOwnPropertyNames(value); -- } -- -- // Some type of object without properties can be shortcutted. -- 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 = ['{', '}']; -- -- // Make Array say that they are Array -- if (isArray(value)) { -- array = true; -- braces = ['[', ']']; -- } -- -- // Make functions say that they are functions -- if (isFunction(value)) { -- var n = value.name ? ': ' + value.name : ''; -- base = ' [Function' + n + ']'; -- } -- -- // Make RegExps say that they are RegExps -- if (isRegExp(value)) { -- base = ' ' + RegExp.prototype.toString.call(value); -- } -- -- // Make dates with properties first say the date -- if (isDate(value)) { -- base = ' ' + Date.prototype.toUTCString.call(value); -- } -- -- // Make error with message first say the error -- 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)) { -- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, -- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . -- if (value === 0 && 1 / value < 0) -- return ctx.stylize('-0', 'number'); -- return ctx.stylize('' + value, 'number'); -- } -- if (isBoolean(value)) -- return ctx.stylize('' + value, 'boolean'); -- // For some reason typeof null is "object", so special case here. -- 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]; --} -- -- - // NOTE: These type checking functions intentionally don't use `instanceof` - // because it is fragile and can be easily faked with `Object.create()`. - function isArray(ar) { -@@ -522,166 +98,10 @@ function isPrimitive(arg) { - exports.isPrimitive = isPrimitive; - - function isBuffer(arg) { -- return arg instanceof Buffer; -+ return Buffer.isBuffer(arg); - } - exports.isBuffer = 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']; -- --// 26 Feb 16:19:34 --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(' '); --} -- -- --// log is just a thin wrapper to console.log that prepends a timestamp --exports.log = function() { -- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); --}; -- -- --/** -- * Inherit the prototype methods from one constructor into another. -- * -- * The Function.prototype.inherits from lang.js rewritten as a standalone -- * function (not on Function.prototype). NOTE: If this file is to be loaded -- * during bootstrapping this function needs to be rewritten using some native -- * functions as prototype setup using normal JavaScript does not work as -- * expected during bootstrapping (see mirror.js in r114903). -- * -- * @param {function} ctor Constructor function which needs to inherit the -- * prototype. -- * @param {function} superCtor Constructor function to inherit prototype from. -- */ --exports.inherits = function(ctor, superCtor) { -- ctor.super_ = superCtor; -- ctor.prototype = Object.create(superCtor.prototype, { -- constructor: { -- value: ctor, -- enumerable: false, -- writable: true, -- configurable: true -- } -- }); --}; -- --exports._extend = function(origin, add) { -- // Don't do anything if add isn't an object -- 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); --} -- -- --// Deprecated old stuff. -- --exports.p = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- console.error(exports.inspect(arguments[i])); -- } --}, 'util.p: Use console.error() instead'); -- -- --exports.exec = exports.deprecate(function() { -- return require('child_process').exec.apply(this, arguments); --}, 'util.exec is now called `child_process.exec`.'); -- -- --exports.print = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(String(arguments[i])); -- } --}, 'util.print: Use console.log instead'); -- -- --exports.puts = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(arguments[i] + '\n'); -- } --}, 'util.puts: Use console.log instead'); -- -- --exports.debug = exports.deprecate(function(x) { -- process.stderr.write('DEBUG: ' + x + '\n'); --}, 'util.debug: Use console.error instead'); -- -- --exports.error = exports.deprecate(function(x) { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stderr.write(arguments[i] + '\n'); -- } --}, 'util.error: Use console.error instead'); -- -- --exports.pump = exports.deprecate(function(readStream, writeStream, callback) { -- var callbackCalled = false; -- -- function call(a, b, c) { -- if (callback && !callbackCalled) { -- callback(a, b, c); -- callbackCalled = true; -- } -- } -- -- readStream.addListener('data', function(chunk) { -- if (writeStream.write(chunk) === false) readStream.pause(); -- }); -- -- writeStream.addListener('drain', function() { -- readStream.resume(); -- }); -- -- readStream.addListener('end', function() { -- writeStream.end(); -- }); -- -- readStream.addListener('close', function() { -- call(); -- }); -- -- readStream.addListener('error', function(err) { -- writeStream.end(); -- call(err); -- }); -- -- writeStream.addListener('error', function(err) { -- readStream.destroy(); -- call(err); -- }); --}, 'util.pump(): Use readableStream.pipe() instead'); -- -- --var uv; --exports._errnoException = function(err, syscall) { -- if (isUndefined(uv)) uv = process.binding('uv'); -- var errname = uv.errname(err); -- var e = new Error(syscall + ' ' + errname); -- e.code = errname; -- e.errno = errname; -- e.syscall = syscall; -- return e; --}; -+} \ No newline at end of file diff --git a/node_modules/core-util-is/lib/util.js b/node_modules/core-util-is/lib/util.js deleted file mode 100644 index ff4c851c..00000000 --- a/node_modules/core-util-is/lib/util.js +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -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 === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return (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 === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} diff --git a/node_modules/core-util-is/package.json b/node_modules/core-util-is/package.json deleted file mode 100644 index 7c0976dc..00000000 --- a/node_modules/core-util-is/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "core-util-is@~1.0.0", - "_id": "core-util-is@1.0.2", - "_inBundle": false, - "_integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "_location": "/core-util-is", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "core-util-is@~1.0.0", - "name": "core-util-is", - "escapedName": "core-util-is", - "rawSpec": "~1.0.0", - "saveSpec": null, - "fetchSpec": "~1.0.0" - }, - "_requiredBy": [ - "/cloneable-readable/readable-stream", - "/duplexify/readable-stream", - "/flush-write-stream/readable-stream", - "/glob-stream/readable-stream", - "/lazystream/readable-stream", - "/ordered-read-streams/readable-stream", - "/through2/readable-stream", - "/vinyl-fs/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "_spec": "core-util-is@~1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/cloneable-readable/node_modules/readable-stream", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/core-util-is/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "The `util.is*` functions introduced in Node v0.12.", - "devDependencies": { - "tap": "^2.3.0" - }, - "homepage": "https://github.com/isaacs/core-util-is#readme", - "keywords": [ - "util", - "isBuffer", - "isArray", - "isNumber", - "isString", - "isRegExp", - "isThis", - "isThat", - "polyfill" - ], - "license": "MIT", - "main": "lib/util.js", - "name": "core-util-is", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/core-util-is.git" - }, - "scripts": { - "test": "tap test.js" - }, - "version": "1.0.2" -} diff --git a/node_modules/core-util-is/test.js b/node_modules/core-util-is/test.js deleted file mode 100644 index 1a490c65..00000000 --- a/node_modules/core-util-is/test.js +++ /dev/null @@ -1,68 +0,0 @@ -var assert = require('tap'); - -var t = require('./lib/util'); - -assert.equal(t.isArray([]), true); -assert.equal(t.isArray({}), false); - -assert.equal(t.isBoolean(null), false); -assert.equal(t.isBoolean(true), true); -assert.equal(t.isBoolean(false), true); - -assert.equal(t.isNull(null), true); -assert.equal(t.isNull(undefined), false); -assert.equal(t.isNull(false), false); -assert.equal(t.isNull(), false); - -assert.equal(t.isNullOrUndefined(null), true); -assert.equal(t.isNullOrUndefined(undefined), true); -assert.equal(t.isNullOrUndefined(false), false); -assert.equal(t.isNullOrUndefined(), true); - -assert.equal(t.isNumber(null), false); -assert.equal(t.isNumber('1'), false); -assert.equal(t.isNumber(1), true); - -assert.equal(t.isString(null), false); -assert.equal(t.isString('1'), true); -assert.equal(t.isString(1), false); - -assert.equal(t.isSymbol(null), false); -assert.equal(t.isSymbol('1'), false); -assert.equal(t.isSymbol(1), false); -assert.equal(t.isSymbol(Symbol()), true); - -assert.equal(t.isUndefined(null), false); -assert.equal(t.isUndefined(undefined), true); -assert.equal(t.isUndefined(false), false); -assert.equal(t.isUndefined(), true); - -assert.equal(t.isRegExp(null), false); -assert.equal(t.isRegExp('1'), false); -assert.equal(t.isRegExp(new RegExp()), true); - -assert.equal(t.isObject({}), true); -assert.equal(t.isObject([]), true); -assert.equal(t.isObject(new RegExp()), true); -assert.equal(t.isObject(new Date()), true); - -assert.equal(t.isDate(null), false); -assert.equal(t.isDate('1'), false); -assert.equal(t.isDate(new Date()), true); - -assert.equal(t.isError(null), false); -assert.equal(t.isError({ err: true }), false); -assert.equal(t.isError(new Error()), true); - -assert.equal(t.isFunction(null), false); -assert.equal(t.isFunction({ }), false); -assert.equal(t.isFunction(function() {}), true); - -assert.equal(t.isPrimitive(null), true); -assert.equal(t.isPrimitive(''), true); -assert.equal(t.isPrimitive(0), true); -assert.equal(t.isPrimitive(new Date()), false); - -assert.equal(t.isBuffer(null), false); -assert.equal(t.isBuffer({}), false); -assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/node_modules/crc-32/LICENSE b/node_modules/crc-32/LICENSE deleted file mode 100644 index 9fd9d568..00000000 --- a/node_modules/crc-32/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (C) 2014-present SheetJS - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/node_modules/crc-32/README.md b/node_modules/crc-32/README.md deleted file mode 100644 index 38445de6..00000000 --- a/node_modules/crc-32/README.md +++ /dev/null @@ -1,128 +0,0 @@ -# crc32 - -Standard CRC-32 algorithm implementation in JS (for the browser and nodejs). -Emphasis on correctness, performance, and IE6+ support. - -## Installation - -With [npm](https://www.npmjs.org/package/crc-32): - -```bash -$ npm install crc-32 -``` - -In the browser: - -```html -<script src="crc32.js"></script> -``` - -The browser exposes a variable `CRC32`. - -When installed globally, npm installs a script `crc32` that computes the -checksum for a specified file or standard input. - -The script will manipulate `module.exports` if available . This is not always -desirable. To prevent the behavior, define `DO_NOT_EXPORT_CRC`. - -## Usage - -In all cases, the relevant function takes an argument representing data and an -optional second argument representing the starting "seed" (for rolling CRC). - -The return value is a signed 32-bit integer. - -- `CRC32.buf(byte array or buffer[, seed])` assumes the argument is a sequence - of 8-bit unsigned integers (nodejs `Buffer`, `Uint8Array` or array of bytes). - -- `CRC32.bstr(binary string[, seed])` assumes the argument is a binary string - where byte `i` is the low byte of the UCS-2 char: `str.charCodeAt(i) & 0xFF` - -- `CRC32.str(string[, seed])` assumes the argument is a standard JS string and - calculates the hash of the UTF-8 encoding. - -For example: - -```js -// var CRC32 = require('crc-32'); // uncomment this line if in node -CRC32.str("SheetJS") // -1647298270 -CRC32.bstr("SheetJS") // -1647298270 -CRC32.buf([ 83, 104, 101, 101, 116, 74, 83 ]) // -1647298270 - -crc32 = CRC32.buf([83, 104]) // -1826163454 "Sh" -crc32 = CRC32.str("eet", crc32) // 1191034598 "Sheet" -CRC32.bstr("JS", crc32) // -1647298270 "SheetJS" - -[CRC32.str("\u2603"), CRC32.str("\u0003")] // [ -1743909036, 1259060791 ] -[CRC32.bstr("\u2603"), CRC32.bstr("\u0003")] // [ 1259060791, 1259060791 ] -[CRC32.buf([0x2603]), CRC32.buf([0x0003])] // [ 1259060791, 1259060791 ] -``` - -## Testing - -`make test` will run the nodejs-based test. - -To run the in-browser tests, run a local server and go to the `ctest` directory. -`make ctestserv` will start a python `SimpleHTTPServer` server on port 8000. - -To update the browser artifacts, run `make ctest`. - -To generate the bits file, use the `crc32` function from python `zlib`: - -```python ->>> from zlib import crc32 ->>> x="foo bar baz٪☃🍣" ->>> crc32(x) -1531648243 ->>> crc32(x+x) --218791105 ->>> crc32(x+x+x) -1834240887 -``` - -The included `crc32.njs` script can process files or standard input: - -```bash -$ echo "this is a test" > t.txt -$ bin/crc32.njs t.txt -1912935186 -``` - -For comparison, the included `crc32.py` script uses python `zlib`: - -```bash -$ bin/crc32.py t.txt -1912935186 -``` - -On OSX the command `cksum` generates unsigned CRC-32 with Algorithm 3: - -```bash -$ cksum -o 3 < IE8.Win7.For.Windows.VMware.zip -1891069052 4161613172 -$ crc32 --unsigned ~/Downloads/IE8.Win7.For.Windows.VMware.zip -1891069052 -``` - -## Performance - -`make perf` will run algorithmic performance tests (which should justify certain -decisions in the code). - -The [`adler-32` project](http://git.io/adler32) has more performance notes - -## License - -Please consult the attached LICENSE file for details. All rights not explicitly -granted by the Apache 2.0 license are reserved by the Original Author. - -## Badges - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/crc32.svg)](https://saucelabs.com/u/crc32) - -[![Build Status](https://travis-ci.org/SheetJS/js-crc32.svg?branch=master)](https://travis-ci.org/SheetJS/js-crc32) -[![Coverage Status](http://img.shields.io/coveralls/SheetJS/js-crc32/master.svg)](https://coveralls.io/r/SheetJS/js-crc32?branch=master) -[![Dependencies Status](https://david-dm.org/sheetjs/js-crc32/status.svg)](https://david-dm.org/sheetjs/js-crc32) -[![NPM Downloads](https://img.shields.io/npm/dt/crc-32.svg)](https://npmjs.org/package/crc-32) -[![ghit.me](https://ghit.me/badge.svg?repo=sheetjs/js-xlsx)](https://ghit.me/repo/sheetjs/js-xlsx) -[![Analytics](https://ga-beacon.appspot.com/UA-36810333-1/SheetJS/js-crc32?pixel)](https://github.com/SheetJS/js-crc32) diff --git a/node_modules/crc-32/bin/crc32.njs b/node_modules/crc-32/bin/crc32.njs deleted file mode 100755 index 657291a8..00000000 --- a/node_modules/crc-32/bin/crc32.njs +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env node -/* crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */ -/* eslint-env node */ -/* vim: set ts=2 ft=javascript: */ -/*jshint node:true */ - -var X/*:CRC32Module*/; -try { X = require('../'); } catch(e) { X = require('crc-32'); } - -function help()/*:number*/ { -[ -"usage: crc32 [options] [filename]", -"", -"Options:", -" -h, --help output usage information", -" -V, --version output the version number", -" -S, --seed=<n> use integer seed as starting value (rolling CRC)", -" -H, --hex-seed=<h> use hex seed as starting value (rolling CRC)", -" -d, --signed print result with format `%d` (default)", -" -u, --unsigned print result with format `%u`", -" -x, --hex print result with format `%0.8x`", -" -X, --HEX print result with format `%0.8X`", -" -F, --format=<s> use specified printf format", -"", -"Set filename = '-' or pipe data into crc32 to read from stdin", -"Default output mode is signed (-d)", -"" -].forEach(function(l) { console.log(l); }); - return 0; -} - -function version()/*:number*/ { console.log(X.version); return 0; } - -var fs = require('fs'); -require('exit-on-epipe'); - -function die(msg/*:string*/, ec/*:?number*/)/*:void*/ { console.error(msg); process.exit(ec || 0); } - -var args/*:Array<string>*/ = process.argv.slice(2); -var filename/*:string*/ = ""; -var fmt/*:string*/ = ""; -var seed = 0, r = 10; - -for(var i = 0; i < args.length; ++i) { - var arg = args[i]; - if(arg.charCodeAt(0) != 45) { if(filename === "") filename = arg; continue; } - var m = arg.indexOf("=") == -1 ? arg : arg.substr(0, arg.indexOf("=")); - switch(m) { - case "-": filename = "-"; break; - - case "--help": case "-h": process.exit(help()); break; - case "--version": case "-V": process.exit(version()); break; - - case "--signed": case "-d": fmt = "%d"; break; - case "--unsigned": case "-u": fmt = "%u"; break; - case "--hex": case "-x": fmt = "%0.8x"; break; - case "--HEX": case "-X": fmt = "%0.8X"; break; - case "--format": case "-F": - fmt = ((m!=arg) ? arg.substr(m.length+1) : args[++i])||""; break; - - case "--hex-seed": case "-H": r = 16; - /* falls through */ - case "--seed": case "-S": - seed=parseInt((m!=arg) ? arg.substr(m.length+1) : args[++i], r)||0; break; - - default: die("crc32: unrecognized option `" + arg + "'", 22); - } -} - -if(!process.stdin.isTTY) filename = filename || "-"; -if(filename.length===0) die("crc32: must specify a filename ('-' for stdin)",1); - -var crc32 = seed; -// $FlowIgnore -- Writable is callable but type sig disagrees -var writable = require('stream').Writable(); -writable._write = function(chunk, e, cb) { crc32 = X.buf(chunk, crc32); cb(); }; -writable._writev = function(chunks, cb) { - chunks.forEach(function(c) { crc32 = X.buf(c.chunk, crc32);}); - cb(); -}; -writable.on('finish', function() { - console.log(fmt === "" ? crc32 : require("printj").sprintf(fmt, crc32)); -}); - -if(filename === "-") process.stdin.pipe(writable); -else if(fs.existsSync(filename)) fs.createReadStream(filename).pipe(writable); -else die("crc32: " + filename + ": No such file or directory", 2); diff --git a/node_modules/crc-32/crc32.js b/node_modules/crc-32/crc32.js deleted file mode 100644 index 6bcecef9..00000000 --- a/node_modules/crc-32/crc32.js +++ /dev/null @@ -1,118 +0,0 @@ -/* crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */ -/* vim: set ts=2: */ -/*exported CRC32 */ -var CRC32; -(function (factory) { - /*jshint ignore:start */ - /*eslint-disable */ - if(typeof DO_NOT_EXPORT_CRC === 'undefined') { - if('object' === typeof exports) { - factory(exports); - } else if ('function' === typeof define && define.amd) { - define(function () { - var module = {}; - factory(module); - return module; - }); - } else { - factory(CRC32 = {}); - } - } else { - factory(CRC32 = {}); - } - /*eslint-enable */ - /*jshint ignore:end */ -}(function(CRC32) { -CRC32.version = '1.2.0'; -/* see perf/crc32table.js */ -/*global Int32Array */ -function signed_crc_table() { - var c = 0, table = new Array(256); - - for(var n =0; n != 256; ++n){ - c = n; - c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1)); - c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1)); - c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1)); - c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1)); - c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1)); - c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1)); - c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1)); - c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1)); - table[n] = c; - } - - return typeof Int32Array !== 'undefined' ? new Int32Array(table) : table; -} - -var T = signed_crc_table(); -function crc32_bstr(bstr, seed) { - var C = seed ^ -1, L = bstr.length - 1; - for(var i = 0; i < L;) { - C = (C>>>8) ^ T[(C^bstr.charCodeAt(i++))&0xFF]; - C = (C>>>8) ^ T[(C^bstr.charCodeAt(i++))&0xFF]; - } - if(i === L) C = (C>>>8) ^ T[(C ^ bstr.charCodeAt(i))&0xFF]; - return C ^ -1; -} - -function crc32_buf(buf, seed) { - if(buf.length > 10000) return crc32_buf_8(buf, seed); - var C = seed ^ -1, L = buf.length - 3; - for(var i = 0; i < L;) { - C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; - C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; - C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; - C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; - } - while(i < L+3) C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; - return C ^ -1; -} - -function crc32_buf_8(buf, seed) { - var C = seed ^ -1, L = buf.length - 7; - for(var i = 0; i < L;) { - C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; - C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; - C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; - C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; - C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; - C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; - C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; - C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; - } - while(i < L+7) C = (C>>>8) ^ T[(C^buf[i++])&0xFF]; - return C ^ -1; -} - -function crc32_str(str, seed) { - var C = seed ^ -1; - for(var i = 0, L=str.length, c, d; i < L;) { - c = str.charCodeAt(i++); - if(c < 0x80) { - C = (C>>>8) ^ T[(C ^ c)&0xFF]; - } else if(c < 0x800) { - C = (C>>>8) ^ T[(C ^ (192|((c>>6)&31)))&0xFF]; - C = (C>>>8) ^ T[(C ^ (128|(c&63)))&0xFF]; - } else if(c >= 0xD800 && c < 0xE000) { - c = (c&1023)+64; d = str.charCodeAt(i++)&1023; - C = (C>>>8) ^ T[(C ^ (240|((c>>8)&7)))&0xFF]; - C = (C>>>8) ^ T[(C ^ (128|((c>>2)&63)))&0xFF]; - C = (C>>>8) ^ T[(C ^ (128|((d>>6)&15)|((c&3)<<4)))&0xFF]; - C = (C>>>8) ^ T[(C ^ (128|(d&63)))&0xFF]; - } else { - C = (C>>>8) ^ T[(C ^ (224|((c>>12)&15)))&0xFF]; - C = (C>>>8) ^ T[(C ^ (128|((c>>6)&63)))&0xFF]; - C = (C>>>8) ^ T[(C ^ (128|(c&63)))&0xFF]; - } - } - return C ^ -1; -} -CRC32.table = T; -// $FlowIgnore -CRC32.bstr = crc32_bstr; -// $FlowIgnore -CRC32.buf = crc32_buf; -// $FlowIgnore -CRC32.str = crc32_str; -})); diff --git a/node_modules/crc-32/package.json b/node_modules/crc-32/package.json deleted file mode 100644 index 5d081475..00000000 --- a/node_modules/crc-32/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "_from": "crc-32@^1.2.0", - "_id": "crc-32@1.2.0", - "_inBundle": false, - "_integrity": "sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA==", - "_location": "/crc-32", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "crc-32@^1.2.0", - "name": "crc-32", - "escapedName": "crc-32", - "rawSpec": "^1.2.0", - "saveSpec": null, - "fetchSpec": "^1.2.0" - }, - "_requiredBy": [ - "/isomorphic-git" - ], - "_resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz", - "_shasum": "cb2db6e29b88508e32d9dd0ec1693e7b41a18208", - "_spec": "crc-32@^1.2.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/isomorphic-git", - "author": { - "name": "sheetjs" - }, - "bin": { - "crc32": "bin/crc32.njs" - }, - "bugs": { - "url": "https://github.com/SheetJS/js-crc32/issues" - }, - "bundleDependencies": false, - "config": { - "blanket": { - "pattern": "crc32.js" - } - }, - "dependencies": { - "exit-on-epipe": "~1.0.1", - "printj": "~1.1.0" - }, - "deprecated": false, - "description": "Pure-JS CRC-32", - "devDependencies": { - "@sheetjs/uglify-js": "~2.7.3", - "@types/node": "^8.0.7", - "blanket": "~1.2.3", - "codepage": "~1.10.0", - "dtslint": "^0.1.2", - "mocha": "~2.5.3", - "typescript": "2.2.0" - }, - "engines": { - "node": ">=0.8" - }, - "files": [ - "crc32.js", - "bin/crc32.njs", - "LICENSE", - "README.md", - "types/index.d.ts", - "types/*.json" - ], - "homepage": "http://sheetjs.com/opensource", - "keywords": [ - "crc", - "crc32", - "checksum" - ], - "license": "Apache-2.0", - "main": "./crc32", - "name": "crc-32", - "repository": { - "type": "git", - "url": "git://github.com/SheetJS/js-crc32.git" - }, - "scripts": { - "build": "make", - "dtslint": "dtslint types", - "lint": "make fullint", - "test": "make test" - }, - "types": "types", - "version": "1.2.0" -} diff --git a/node_modules/crc-32/types/index.d.ts b/node_modules/crc-32/types/index.d.ts deleted file mode 100644 index 16386900..00000000 --- a/node_modules/crc-32/types/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */ -// TypeScript Version: 2.2 - -/** Version string */ -export const version: string; - -/** Process a node buffer or byte array */ -export function buf(data: number[] | Uint8Array, seed?: number): number; - -/** Process a binary string */ -export function bstr(data: string, seed?: number): number; - -/** Process a JS string based on the UTF8 encoding */ -export function str(data: string, seed?: number): number; diff --git a/node_modules/crc-32/types/tsconfig.json b/node_modules/crc-32/types/tsconfig.json deleted file mode 100644 index 6e122c77..00000000 --- a/node_modules/crc-32/types/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ "es5" ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "baseUrl": ".", - "paths": { "crc-32": ["."] }, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - } -} diff --git a/node_modules/crc-32/types/tslint.json b/node_modules/crc-32/types/tslint.json deleted file mode 100644 index d9401a97..00000000 --- a/node_modules/crc-32/types/tslint.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "dtslint/dtslint.json", - "rules": { - "whitespace": false, - "no-sparse-arrays": false, - "only-arrow-functions": false, - "no-consecutive-blank-lines": false, - "prefer-conditional-expression": false, - "one-variable-per-declaration": false - } -} diff --git a/node_modules/dateformat/LICENSE b/node_modules/dateformat/LICENSE deleted file mode 100644 index 57d44e2a..00000000 --- a/node_modules/dateformat/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -(c) 2007-2009 Steven Levithan <stevenlevithan.com> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/dateformat/Readme.md b/node_modules/dateformat/Readme.md deleted file mode 100644 index 9431b901..00000000 --- a/node_modules/dateformat/Readme.md +++ /dev/null @@ -1,204 +0,0 @@ -# dateformat - -A node.js package for Steven Levithan's excellent [dateFormat()][dateformat] function. - -[![Build Status](https://travis-ci.org/felixge/node-dateformat.svg)](https://travis-ci.org/felixge/node-dateformat) - -## Modifications - -- Removed the `Date.prototype.format` method. Sorry folks, but extending native prototypes is for suckers. -- Added a `module.exports = dateFormat;` statement at the bottom -- Added the placeholder `N` to get the ISO 8601 numeric representation of the day of the week - -## Installation - -```bash -$ npm install dateformat -$ dateformat --help -``` - -## Usage - -As taken from Steven's post, modified to match the Modifications listed above: - -```js -var dateFormat = require("dateformat"); -var now = new Date(); - -// Basic usage -dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT"); -// Saturday, June 9th, 2007, 5:46:21 PM - -// You can use one of several named masks -dateFormat(now, "isoDateTime"); -// 2007-06-09T17:46:21 - -// ...Or add your own -dateFormat.masks.hammerTime = 'HH:MM! "Can\'t touch this!"'; -dateFormat(now, "hammerTime"); -// 17:46! Can't touch this! - -// You can also provide the date as a string -dateFormat("Jun 9 2007", "fullDate"); -// Saturday, June 9, 2007 - -// Note that if you don't include the mask argument, -// dateFormat.masks.default is used -dateFormat(now); -// Sat Jun 09 2007 17:46:21 - -// And if you don't include the date argument, -// the current date and time is used -dateFormat(); -// Sat Jun 09 2007 17:46:22 - -// You can also skip the date argument (as long as your mask doesn't -// contain any numbers), in which case the current date/time is used -dateFormat("longTime"); -// 5:46:22 PM EST - -// And finally, you can convert local time to UTC time. Simply pass in -// true as an additional argument (no argument skipping allowed in this case): -dateFormat(now, "longTime", true); -// 10:46:21 PM UTC - -// ...Or add the prefix "UTC:" or "GMT:" to your mask. -dateFormat(now, "UTC:h:MM:ss TT Z"); -// 10:46:21 PM UTC - -// You can also get the ISO 8601 week of the year: -dateFormat(now, "W"); -// 42 - -// and also get the ISO 8601 numeric representation of the day of the week: -dateFormat(now, "N"); -// 6 -``` - -### Mask options - -| Mask | Description | -| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `d` | Day of the month as digits; no leading zero for single-digit days. | -| `dd` | Day of the month as digits; leading zero for single-digit days. | -| `ddd` | Day of the week as a three-letter abbreviation. | -| `DDD` | "Ysd", "Tdy" or "Tmw" if date lies within these three days. Else fall back to ddd. | -| `dddd` | Day of the week as its full name. | -| `DDDD` | "Yesterday", "Today" or "Tomorrow" if date lies within these three days. Else fall back to dddd. | -| `m` | Month as digits; no leading zero for single-digit months. | -| `mm` | Month as digits; leading zero for single-digit months. | -| `mmm` | Month as a three-letter abbreviation. | -| `mmmm` | Month as its full name. | -| `yy` | Year as last two digits; leading zero for years less than 10. | -| `yyyy` | Year represented by four digits. | -| `h` | Hours; no leading zero for single-digit hours (12-hour clock). | -| `hh` | Hours; leading zero for single-digit hours (12-hour clock). | -| `H` | Hours; no leading zero for single-digit hours (24-hour clock). | -| `HH` | Hours; leading zero for single-digit hours (24-hour clock). | -| `M` | Minutes; no leading zero for single-digit minutes. | -| `MM` | Minutes; leading zero for single-digit minutes. | -| `N` | ISO 8601 numeric representation of the day of the week. | -| `o` | GMT/UTC timezone offset, e.g. -0500 or +0230. | -| `p` | GMT/UTC timezone offset, e.g. -05:00 or +02:30. | -| `s` | Seconds; no leading zero for single-digit seconds. | -| `ss` | Seconds; leading zero for single-digit seconds. | -| `S` | The date's ordinal suffix (st, nd, rd, or th). Works well with `d`. | -| `l` | Milliseconds; gives 3 digits. | -| `L` | Milliseconds; gives 2 digits. | -| `t` | Lowercase, single-character time marker string: a or p. | -| `tt` | Lowercase, two-character time marker string: am or pm. | -| `T` | Uppercase, single-character time marker string: A or P. | -| `TT` | Uppercase, two-character time marker string: AM or PM. | -| `W` | ISO 8601 week number of the year, e.g. 4, 42 | -| `WW` | ISO 8601 week number of the year, leading zero for single-digit, e.g. 04, 42 | -| `Z` | US timezone abbreviation, e.g. EST or MDT. For non-US timezones, the GMT/UTC offset is returned, e.g. GMT-0500 | -| `'...'`, `"..."` | Literal character sequence. Surrounding quotes are removed. | -| `UTC:` | Must be the first four characters of the mask. Converts the date from local time to UTC/GMT/Zulu time before applying the mask. The "UTC:" prefix is removed. | - -### Named Formats - -| Name | Mask | Example | -| ----------------- | ------------------------------ | ------------------------ | -| `default` | `ddd mmm dd yyyy HH:MM:ss` | Sat Jun 09 2007 17:46:21 | -| `shortDate` | `m/d/yy` | 6/9/07 | -| `paddedShortDate` | `mm/dd/yyyy` | 06/09/2007 | -| `mediumDate` | `mmm d, yyyy` | Jun 9, 2007 | -| `longDate` | `mmmm d, yyyy` | June 9, 2007 | -| `fullDate` | `dddd, mmmm d, yyyy` | Saturday, June 9, 2007 | -| `shortTime` | `h:MM TT` | 5:46 PM | -| `mediumTime` | `h:MM:ss TT` | 5:46:21 PM | -| `longTime` | `h:MM:ss TT Z` | 5:46:21 PM EST | -| `isoDate` | `yyyy-mm-dd` | 2007-06-09 | -| `isoTime` | `HH:MM:ss` | 17:46:21 | -| `isoDateTime` | `yyyy-mm-dd'T'HH:MM:sso` | 2007-06-09T17:46:21+0700 | -| `isoUtcDateTime` | `UTC:yyyy-mm-dd'T'HH:MM:ss'Z'` | 2007-06-09T22:46:21Z | - -### Localization - -Day names, month names and the AM/PM indicators can be localized by -passing an object with the necessary strings. For example: - -```js -var dateFormat = require("dateformat"); -dateFormat.i18n = { - dayNames: [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat", - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", - ], - monthNames: [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec", - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December", - ], - timeNames: ["a", "p", "am", "pm", "A", "P", "AM", "PM"], -}; -``` - -> Notice that only one language is supported at a time and all strings -> _must_ be present in the new value. - -### Breaking change in 2.1.0 - -- 2.1.0 was published with a breaking change, for those using localized strings. -- 2.2.0 has been published without the change, to keep packages refering to ^2.0.0 to continue working. This is now branch v2_2. -- 3.0.\* contains the localized AM/PM change. - -## License - -(c) 2007-2009 Steven Levithan [stevenlevithan.com][stevenlevithan], MIT license. - -[dateformat]: http://blog.stevenlevithan.com/archives/date-time-format -[stevenlevithan]: http://stevenlevithan.com/ diff --git a/node_modules/dateformat/lib/dateformat.js b/node_modules/dateformat/lib/dateformat.js deleted file mode 100644 index d2145aba..00000000 --- a/node_modules/dateformat/lib/dateformat.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}(function(global){var _arguments=arguments;var dateFormat=function(){var token=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g;var timezone=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g;var timezoneClip=/[^-+\dA-Z]/g;return function(date,mask,utc,gmt){if(_arguments.length===1&&kindOf(date)==="string"&&!/\d/.test(date)){mask=date;date=undefined}date=date||date===0?date:new Date;if(!(date instanceof Date)){date=new Date(date)}if(isNaN(date)){throw TypeError("Invalid date")}mask=String(dateFormat.masks[mask]||mask||dateFormat.masks["default"]);var maskSlice=mask.slice(0,4);if(maskSlice==="UTC:"||maskSlice==="GMT:"){mask=mask.slice(4);utc=true;if(maskSlice==="GMT:"){gmt=true}}var _=function _(){return utc?"getUTC":"get"};var _d=function d(){return date[_()+"Date"]()};var D=function D(){return date[_()+"Day"]()};var _m=function m(){return date[_()+"Month"]()};var y=function y(){return date[_()+"FullYear"]()};var _H=function H(){return date[_()+"Hours"]()};var _M=function M(){return date[_()+"Minutes"]()};var _s=function s(){return date[_()+"Seconds"]()};var _L=function L(){return date[_()+"Milliseconds"]()};var _o=function o(){return utc?0:date.getTimezoneOffset()};var _W=function W(){return getWeek(date)};var _N=function N(){return getDayOfWeek(date)};var flags={d:function d(){return _d()},dd:function dd(){return pad(_d())},ddd:function ddd(){return dateFormat.i18n.dayNames[D()]},DDD:function DDD(){return getDayName({y:y(),m:_m(),d:_d(),_:_(),dayName:dateFormat.i18n.dayNames[D()],short:true})},dddd:function dddd(){return dateFormat.i18n.dayNames[D()+7]},DDDD:function DDDD(){return getDayName({y:y(),m:_m(),d:_d(),_:_(),dayName:dateFormat.i18n.dayNames[D()+7]})},m:function m(){return _m()+1},mm:function mm(){return pad(_m()+1)},mmm:function mmm(){return dateFormat.i18n.monthNames[_m()]},mmmm:function mmmm(){return dateFormat.i18n.monthNames[_m()+12]},yy:function yy(){return String(y()).slice(2)},yyyy:function yyyy(){return pad(y(),4)},h:function h(){return _H()%12||12},hh:function hh(){return pad(_H()%12||12)},H:function H(){return _H()},HH:function HH(){return pad(_H())},M:function M(){return _M()},MM:function MM(){return pad(_M())},s:function s(){return _s()},ss:function ss(){return pad(_s())},l:function l(){return pad(_L(),3)},L:function L(){return pad(Math.floor(_L()/10))},t:function t(){return _H()<12?dateFormat.i18n.timeNames[0]:dateFormat.i18n.timeNames[1]},tt:function tt(){return _H()<12?dateFormat.i18n.timeNames[2]:dateFormat.i18n.timeNames[3]},T:function T(){return _H()<12?dateFormat.i18n.timeNames[4]:dateFormat.i18n.timeNames[5]},TT:function TT(){return _H()<12?dateFormat.i18n.timeNames[6]:dateFormat.i18n.timeNames[7]},Z:function Z(){return gmt?"GMT":utc?"UTC":(String(date).match(timezone)||[""]).pop().replace(timezoneClip,"").replace(/GMT\+0000/g,"UTC")},o:function o(){return(_o()>0?"-":"+")+pad(Math.floor(Math.abs(_o())/60)*100+Math.abs(_o())%60,4)},p:function p(){return(_o()>0?"-":"+")+pad(Math.floor(Math.abs(_o())/60),2)+":"+pad(Math.floor(Math.abs(_o())%60),2)},S:function S(){return["th","st","nd","rd"][_d()%10>3?0:(_d()%100-_d()%10!=10)*_d()%10]},W:function W(){return _W()},WW:function WW(){return pad(_W())},N:function N(){return _N()}};return mask.replace(token,function(match){if(match in flags){return flags[match]()}return match.slice(1,match.length-1)})}}();dateFormat.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"};dateFormat.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]};var pad=function pad(val,len){val=String(val);len=len||2;while(val.length<len){val="0"+val}return val};var getDayName=function getDayName(_ref){var y=_ref.y,m=_ref.m,d=_ref.d,_=_ref._,dayName=_ref.dayName,_ref$short=_ref["short"],_short=_ref$short===void 0?false:_ref$short;var today=new Date;var yesterday=new Date;yesterday.setDate(yesterday[_+"Date"]()-1);var tomorrow=new Date;tomorrow.setDate(tomorrow[_+"Date"]()+1);var today_d=function today_d(){return today[_+"Date"]()};var today_m=function today_m(){return today[_+"Month"]()};var today_y=function today_y(){return today[_+"FullYear"]()};var yesterday_d=function yesterday_d(){return yesterday[_+"Date"]()};var yesterday_m=function yesterday_m(){return yesterday[_+"Month"]()};var yesterday_y=function yesterday_y(){return yesterday[_+"FullYear"]()};var tomorrow_d=function tomorrow_d(){return tomorrow[_+"Date"]()};var tomorrow_m=function tomorrow_m(){return tomorrow[_+"Month"]()};var tomorrow_y=function tomorrow_y(){return tomorrow[_+"FullYear"]()};if(today_y()===y&&today_m()===m&&today_d()===d){return _short?"Tdy":"Today"}else if(yesterday_y()===y&&yesterday_m()===m&&yesterday_d()===d){return _short?"Ysd":"Yesterday"}else if(tomorrow_y()===y&&tomorrow_m()===m&&tomorrow_d()===d){return _short?"Tmw":"Tomorrow"}return dayName};var getWeek=function getWeek(date){var targetThursday=new Date(date.getFullYear(),date.getMonth(),date.getDate());targetThursday.setDate(targetThursday.getDate()-(targetThursday.getDay()+6)%7+3);var firstThursday=new Date(targetThursday.getFullYear(),0,4);firstThursday.setDate(firstThursday.getDate()-(firstThursday.getDay()+6)%7+3);var ds=targetThursday.getTimezoneOffset()-firstThursday.getTimezoneOffset();targetThursday.setHours(targetThursday.getHours()-ds);var weekDiff=(targetThursday-firstThursday)/(864e5*7);return 1+Math.floor(weekDiff)};var getDayOfWeek=function getDayOfWeek(date){var dow=date.getDay();if(dow===0){dow=7}return dow};var kindOf=function kindOf(val){if(val===null){return"null"}if(val===undefined){return"undefined"}if(_typeof(val)!=="object"){return _typeof(val)}if(Array.isArray(val)){return"array"}return{}.toString.call(val).slice(8,-1).toLowerCase()};if(typeof define==="function"&&define.amd){define(function(){return dateFormat})}else if((typeof exports==="undefined"?"undefined":_typeof(exports))==="object"){module.exports=dateFormat}else{global.dateFormat=dateFormat}})(void 0); \ No newline at end of file diff --git a/node_modules/dateformat/package.json b/node_modules/dateformat/package.json deleted file mode 100644 index 6ebb10bd..00000000 --- a/node_modules/dateformat/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_from": "dateformat@^4.5.1", - "_id": "dateformat@4.5.1", - "_inBundle": false, - "_integrity": "sha512-OD0TZ+B7yP7ZgpJf5K2DIbj3FZvFvxgFUuaqA/V5zTjAtAAXZ1E8bktHxmAGs4x5b7PflqA9LeQ84Og7wYtF7Q==", - "_location": "/dateformat", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "dateformat@^4.5.1", - "name": "dateformat", - "escapedName": "dateformat", - "rawSpec": "^4.5.1", - "saveSpec": null, - "fetchSpec": "^4.5.1" - }, - "_requiredBy": [ - "/pino-pretty" - ], - "_resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.5.1.tgz", - "_shasum": "c20e7a9ca77d147906b6dc2261a8be0a5bd2173c", - "_spec": "dateformat@^4.5.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pino-pretty", - "author": { - "name": "Steven Levithan" - }, - "bugs": { - "url": "https://github.com/felixge/node-dateformat/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Steven Levithan" - }, - { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com" - }, - { - "name": "Christoph Tavan", - "email": "dev@tavan.de" - }, - { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "A node.js package for Steven Levithan's excellent dateFormat() function.", - "devDependencies": { - "@babel/cli": "^7.12.10", - "@babel/core": "^7.12.10", - "@babel/preset-env": "^7.12.11", - "mocha": "^8.2.1", - "uglify-js": "^3.12.5" - }, - "engines": { - "node": "*" - }, - "homepage": "https://github.com/felixge/node-dateformat", - "license": "MIT", - "main": "lib/dateformat", - "maintainers": [ - { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com" - } - ], - "name": "dateformat", - "repository": { - "type": "git", - "url": "git+https://github.com/felixge/node-dateformat.git" - }, - "scripts": { - "benchmark": "npm run build && node ./benchmark/benchmark.js", - "build": "babel src --out-dir lib && uglifyjs lib/dateformat.js -o lib/dateformat.js", - "test": "npm run build && mocha" - }, - "version": "4.5.1" -} diff --git a/node_modules/decamelize/index.js b/node_modules/decamelize/index.js deleted file mode 100644 index 8d5bab7e..00000000 --- a/node_modules/decamelize/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; -module.exports = function (str, sep) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - - sep = typeof sep === 'undefined' ? '_' : sep; - - return str - .replace(/([a-z\d])([A-Z])/g, '$1' + sep + '$2') - .replace(/([A-Z]+)([A-Z][a-z\d]+)/g, '$1' + sep + '$2') - .toLowerCase(); -}; diff --git a/node_modules/decamelize/license b/node_modules/decamelize/license deleted file mode 100644 index 654d0bfe..00000000 --- a/node_modules/decamelize/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/decamelize/package.json b/node_modules/decamelize/package.json deleted file mode 100644 index 73e87999..00000000 --- a/node_modules/decamelize/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "decamelize@^1.2.0", - "_id": "decamelize@1.2.0", - "_inBundle": false, - "_integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "_location": "/decamelize", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "decamelize@^1.2.0", - "name": "decamelize", - "escapedName": "decamelize", - "rawSpec": "^1.2.0", - "saveSpec": null, - "fetchSpec": "^1.2.0" - }, - "_requiredBy": [ - "/yargs-parser" - ], - "_resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "_shasum": "f6534d15148269b20352e7bee26f501f9a191290", - "_spec": "decamelize@^1.2.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/yargs-parser", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/decamelize/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/decamelize#readme", - "keywords": [ - "decamelize", - "decamelcase", - "camelcase", - "lowercase", - "case", - "dash", - "hyphen", - "string", - "str", - "text", - "convert" - ], - "license": "MIT", - "name": "decamelize", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/decamelize.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.2.0" -} diff --git a/node_modules/decamelize/readme.md b/node_modules/decamelize/readme.md deleted file mode 100644 index 624c7ee5..00000000 --- a/node_modules/decamelize/readme.md +++ /dev/null @@ -1,48 +0,0 @@ -# decamelize [![Build Status](https://travis-ci.org/sindresorhus/decamelize.svg?branch=master)](https://travis-ci.org/sindresorhus/decamelize) - -> Convert a camelized string into a lowercased one with a custom separator<br> -> Example: `unicornRainbow` → `unicorn_rainbow` - - -## Install - -``` -$ npm install --save decamelize -``` - - -## Usage - -```js -const decamelize = require('decamelize'); - -decamelize('unicornRainbow'); -//=> 'unicorn_rainbow' - -decamelize('unicornRainbow', '-'); -//=> 'unicorn-rainbow' -``` - - -## API - -### decamelize(input, [separator]) - -#### input - -Type: `string` - -#### separator - -Type: `string`<br> -Default: `_` - - -## Related - -See [`camelcase`](https://github.com/sindresorhus/camelcase) for the inverse. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/decompress-response/index.d.ts b/node_modules/decompress-response/index.d.ts deleted file mode 100644 index 18918fa1..00000000 --- a/node_modules/decompress-response/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/// <reference types="node"/> -import {IncomingMessage} from 'http'; - -declare const decompressResponse: { - /** - Decompress a HTTP response if needed. - - @param response - The HTTP incoming stream with compressed data. - @returns The decompressed HTTP response stream. - - @example - ``` - import {http} from 'http'; - import decompressResponse = require('decompress-response'); - - http.get('https://sindresorhus.com', response => { - response = decompressResponse(response); - }); - ``` - */ - (response: IncomingMessage): IncomingMessage; - - // TODO: remove this in the next major version, refactor the whole definition to: - // declare function decompressResponse(response: IncomingMessage): IncomingMessage; - // export = decompressResponse; - default: typeof decompressResponse; -}; - -export = decompressResponse; diff --git a/node_modules/decompress-response/index.js b/node_modules/decompress-response/index.js deleted file mode 100644 index 0379dc5f..00000000 --- a/node_modules/decompress-response/index.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; -const {PassThrough: PassThroughStream} = require('stream'); -const zlib = require('zlib'); -const mimicResponse = require('mimic-response'); - -const decompressResponse = response => { - const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase(); - - if (!['gzip', 'deflate', 'br'].includes(contentEncoding)) { - return response; - } - - const isBrotli = contentEncoding === 'br'; - if (isBrotli && typeof zlib.createBrotliDecompress !== 'function') { - return response; - } - - const decompress = isBrotli ? zlib.createBrotliDecompress() : zlib.createUnzip(); - const stream = new PassThroughStream(); - - mimicResponse(response, stream); - - decompress.on('error', error => { - // Ignore empty response - if (error.code === 'Z_BUF_ERROR') { - stream.end(); - return; - } - - stream.emit('error', error); - }); - - response.pipe(decompress).pipe(stream); - - return stream; -}; - -module.exports = decompressResponse; -// TODO: remove this in the next major version -module.exports.default = decompressResponse; diff --git a/node_modules/decompress-response/license b/node_modules/decompress-response/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/decompress-response/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/decompress-response/package.json b/node_modules/decompress-response/package.json deleted file mode 100644 index 0777b243..00000000 --- a/node_modules/decompress-response/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_from": "decompress-response@^4.2.0", - "_id": "decompress-response@4.2.1", - "_inBundle": false, - "_integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", - "_location": "/decompress-response", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "decompress-response@^4.2.0", - "name": "decompress-response", - "escapedName": "decompress-response", - "rawSpec": "^4.2.0", - "saveSpec": null, - "fetchSpec": "^4.2.0" - }, - "_requiredBy": [ - "/isomorphic-git/simple-get" - ], - "_resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", - "_shasum": "414023cc7a302da25ce2ec82d0d5238ccafd8986", - "_spec": "decompress-response@^4.2.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/isomorphic-git/node_modules/simple-get", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/decompress-response/issues" - }, - "bundleDependencies": false, - "dependencies": { - "mimic-response": "^2.0.0" - }, - "deprecated": false, - "description": "Decompress a HTTP response if needed", - "devDependencies": { - "@types/node": "^12.7.1", - "ava": "^2.2.0", - "get-stream": "^5.0.0", - "pify": "^4.0.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/sindresorhus/decompress-response#readme", - "keywords": [ - "decompress", - "response", - "http", - "https", - "zlib", - "gzip", - "zip", - "deflate", - "unzip", - "ungzip", - "incoming", - "message", - "stream", - "compressed", - "brotli" - ], - "license": "MIT", - "name": "decompress-response", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/decompress-response.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "4.2.1" -} diff --git a/node_modules/decompress-response/readme.md b/node_modules/decompress-response/readme.md deleted file mode 100644 index c87431aa..00000000 --- a/node_modules/decompress-response/readme.md +++ /dev/null @@ -1,52 +0,0 @@ -# decompress-response [![Build Status](https://travis-ci.org/sindresorhus/decompress-response.svg?branch=master)](https://travis-ci.org/sindresorhus/decompress-response) - -> Decompress a HTTP response if needed - -Decompresses the [response](https://nodejs.org/api/http.html#http_class_http_incomingmessage) from [`http.request`](https://nodejs.org/api/http.html#http_http_request_options_callback) if it's gzipped, deflated or compressed with Brotli, otherwise just passes it through. - -Used by [`got`](https://github.com/sindresorhus/got). - - -## Install - -``` -$ npm install decompress-response -``` - - -## Usage - -```js -const http = require('http'); -const decompressResponse = require('decompress-response'); - -http.get('https://sindresorhus.com', response => { - response = decompressResponse(response); -}); -``` - - -## API - -### decompressResponse(response) - -Returns the decompressed HTTP response stream. - -#### response - -Type: [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage) - -The HTTP incoming stream with compressed data. - - ---- - -<div align="center"> - <b> - <a href="https://tidelift.com/subscription/pkg/npm-unzip-response?utm_source=npm-unzip-response&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> - </b> - <br> - <sub> - Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. - </sub> -</div> diff --git a/node_modules/define-properties/.editorconfig b/node_modules/define-properties/.editorconfig deleted file mode 100644 index eaa21416..00000000 --- a/node_modules/define-properties/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -root = true - -[*] -indent_style = tab; -insert_final_newline = true; -quote_type = auto; -space_after_anonymous_functions = true; -space_after_control_statements = true; -spaces_around_operators = true; -trim_trailing_whitespace = true; -spaces_in_brackets = false; -end_of_line = lf; - diff --git a/node_modules/define-properties/.eslintrc b/node_modules/define-properties/.eslintrc deleted file mode 100644 index db992d7a..00000000 --- a/node_modules/define-properties/.eslintrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "id-length": [2, { "min": 1, "max": 35 }], - "max-lines-per-function": [2, 100], - "max-params": [2, 4], - "max-statements": [2, 13] - } -} diff --git a/node_modules/define-properties/.jscs.json b/node_modules/define-properties/.jscs.json deleted file mode 100644 index 6f2d7f9f..00000000 --- a/node_modules/define-properties/.jscs.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "es3": true, - - "additionalRules": [], - - "requireSemicolons": true, - - "disallowMultipleSpaces": true, - - "disallowIdentifierNames": [], - - "requireCurlyBraces": { - "allExcept": [], - "keywords": ["if", "else", "for", "while", "do", "try", "catch"] - }, - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "disallowSpaceBeforeComma": true, - "disallowSpaceAfterComma": false, - "disallowSpaceBeforeSemicolon": true, - - "disallowNodeTypes": [ - "DebuggerStatement", - "LabeledStatement", - "SwitchCase", - "SwitchStatement", - "WithStatement" - ], - - "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "requireSpaceBetweenArguments": true, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "disallowTrailingComma": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "requireDotNotation": { "allExcept": ["keywords"] }, - - "requireParenthesesAroundIIFE": true, - - "validateLineBreaks": "LF", - - "validateQuoteMarks": { - "escape": true, - "mark": "'" - }, - - "disallowOperatorBeforeLineBreak": [], - - "requireSpaceBeforeKeywords": [ - "do", - "for", - "if", - "else", - "switch", - "case", - "try", - "catch", - "finally", - "while", - "with", - "return" - ], - - "validateAlignedFunctionParameters": { - "lineBreakAfterOpeningBraces": true, - "lineBreakBeforeClosingBraces": true - }, - - "requirePaddingNewLinesBeforeExport": true, - - "validateNewlineAfterArrayElements": { - "maximum": 3 - }, - - "requirePaddingNewLinesAfterUseStrict": true, - - "disallowArrowFunctions": true, - - "disallowMultiLineTernary": true, - - "validateOrderInObjectKeys": "asc-insensitive", - - "disallowIdenticalDestructuringNames": true, - - "disallowNestedTernaries": { "maxLevel": 1 }, - - "requireSpaceAfterComma": { "allExcept": ["trailing"] }, - "requireAlignedMultilineParams": false, - - "requireSpacesInGenerator": { - "afterStar": true - }, - - "disallowSpacesInGenerator": { - "beforeStar": true - }, - - "disallowVar": false, - - "requireArrayDestructuring": false, - - "requireEnhancedObjectLiterals": false, - - "requireObjectDestructuring": false, - - "requireEarlyReturn": false, - - "requireCapitalizedConstructorsNew": { - "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] - }, - - "requireImportAlphabetized": false, - - "requireSpaceBeforeObjectValues": true, - "requireSpaceBeforeDestructuredValues": true, - - "disallowSpacesInsideTemplateStringPlaceholders": true, - - "disallowArrayDestructuringReturn": false, - - "requireNewlineBeforeSingleStatementsInIf": false, - - "disallowUnusedVariables": true, - - "requireSpacesInsideImportedObjectBraces": true, - - "requireUseStrict": true -} - diff --git a/node_modules/define-properties/.travis.yml b/node_modules/define-properties/.travis.yml deleted file mode 100644 index ec72d5f3..00000000 --- a/node_modules/define-properties/.travis.yml +++ /dev/null @@ -1,233 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "10.8" - - "9.11" - - "8.11" - - "7.10" - - "6.14" - - "5.12" - - "4.9" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.10" - - "0.8" -before_install: - - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' - - 'nvm install-latest-npm' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "lts/*" - env: PRETEST=true - - node_js: "lts/*" - env: POSTTEST=true - - node_js: "4" - env: COVERAGE=true - - node_js: "10.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true - - env: COVERAGE=true diff --git a/node_modules/define-properties/CHANGELOG.md b/node_modules/define-properties/CHANGELOG.md deleted file mode 100644 index 5cad1e26..00000000 --- a/node_modules/define-properties/CHANGELOG.md +++ /dev/null @@ -1,44 +0,0 @@ -1.1.3 / 2018-08-14 -================= - * [Refactor] use a for loop instead of `foreach` to make for smaller bundle sizes - * [Robustness] cache `Array.prototype.concat` and `Object.defineProperty` - * [Deps] update `object-keys` - * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `tape`, `jscs`; remove unused eccheck script + dep - * [Tests] use pretest/posttest for linting/security - * [Tests] fix npm upgrades on older nodes - -1.1.2 / 2015-10-14 -================= - * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG - * [Deps] Update `object-keys` - * [Dev Deps] update `jscs`, `tape`, `eslint`, `@ljharb/eslint-config`, `nsp` - * [Tests] up to `io.js` `v3.3`, `node` `v4.2` - -1.1.1 / 2015-07-21 -================= - * [Deps] Update `object-keys` - * [Dev Deps] Update `tape`, `eslint` - * [Tests] Test on `io.js` `v2.4` - -1.1.0 / 2015-07-01 -================= - * [New] Add support for symbol-valued properties. - * [Dev Deps] Update `nsp`, `eslint` - * [Tests] Test up to `io.js` `v2.3` - -1.0.3 / 2015-05-30 -================= - * Using a more reliable check for supported property descriptors. - -1.0.2 / 2015-05-23 -================= - * Test up to `io.js` `v2.0` - * Update `tape`, `jscs`, `nsp`, `eslint`, `object-keys`, `editorconfig-tools`, `covert` - -1.0.1 / 2015-01-06 -================= - * Update `object-keys` to fix ES3 support - -1.0.0 / 2015-01-04 -================= - * v1.0.0 diff --git a/node_modules/define-properties/LICENSE b/node_modules/define-properties/LICENSE deleted file mode 100644 index 8c271c14..00000000 --- a/node_modules/define-properties/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (C) 2015 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/define-properties/README.md b/node_modules/define-properties/README.md deleted file mode 100644 index 33b6111f..00000000 --- a/node_modules/define-properties/README.md +++ /dev/null @@ -1,86 +0,0 @@ -#define-properties <sup>[![Version Badge][npm-version-svg]][package-url]</sup> - -[![Build Status][travis-svg]][travis-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -[![browser support][testling-svg]][testling-url] - -Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines. -Existing properties are not overridden. Accepts a map of property names to a predicate that, when true, force-overrides. - -## Example - -```js -var define = require('define-properties'); -var assert = require('assert'); - -var obj = define({ a: 1, b: 2 }, { - a: 10, - b: 20, - c: 30 -}); -assert(obj.a === 1); -assert(obj.b === 2); -assert(obj.c === 30); -if (define.supportsDescriptors) { - assert.deepEqual(Object.keys(obj), ['a', 'b']); - assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'c'), { - configurable: true, - enumerable: false, - value: 30, - writable: false - }); -} -``` - -Then, with predicates: -```js -var define = require('define-properties'); -var assert = require('assert'); - -var obj = define({ a: 1, b: 2, c: 3 }, { - a: 10, - b: 20, - c: 30 -}, { - a: function () { return false; }, - b: function () { return true; } -}); -assert(obj.a === 1); -assert(obj.b === 20); -assert(obj.c === 3); -if (define.supportsDescriptors) { - assert.deepEqual(Object.keys(obj), ['a', 'c']); - assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'b'), { - configurable: true, - enumerable: false, - value: 20, - writable: false - }); -} -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/define-properties -[npm-version-svg]: http://versionbadg.es/ljharb/define-properties.svg -[travis-svg]: https://travis-ci.org/ljharb/define-properties.svg -[travis-url]: https://travis-ci.org/ljharb/define-properties -[deps-svg]: https://david-dm.org/ljharb/define-properties.svg -[deps-url]: https://david-dm.org/ljharb/define-properties -[dev-deps-svg]: https://david-dm.org/ljharb/define-properties/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/define-properties#info=devDependencies -[testling-svg]: https://ci.testling.com/ljharb/define-properties.png -[testling-url]: https://ci.testling.com/ljharb/define-properties -[npm-badge-png]: https://nodei.co/npm/define-properties.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/define-properties.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/define-properties.svg -[downloads-url]: http://npm-stat.com/charts.html?package=define-properties - diff --git a/node_modules/define-properties/index.js b/node_modules/define-properties/index.js deleted file mode 100644 index cb3ae1c7..00000000 --- a/node_modules/define-properties/index.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -var keys = require('object-keys'); -var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; - -var toStr = Object.prototype.toString; -var concat = Array.prototype.concat; -var origDefineProperty = Object.defineProperty; - -var isFunction = function (fn) { - return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; -}; - -var arePropertyDescriptorsSupported = function () { - var obj = {}; - try { - origDefineProperty(obj, 'x', { enumerable: false, value: obj }); - // eslint-disable-next-line no-unused-vars, no-restricted-syntax - for (var _ in obj) { // jscs:ignore disallowUnusedVariables - return false; - } - return obj.x === obj; - } catch (e) { /* this is IE 8. */ - return false; - } -}; -var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); - -var defineProperty = function (object, name, value, predicate) { - if (name in object && (!isFunction(predicate) || !predicate())) { - return; - } - if (supportsDescriptors) { - origDefineProperty(object, name, { - configurable: true, - enumerable: false, - value: value, - writable: true - }); - } else { - object[name] = value; - } -}; - -var defineProperties = function (object, map) { - var predicates = arguments.length > 2 ? arguments[2] : {}; - var props = keys(map); - if (hasSymbols) { - props = concat.call(props, Object.getOwnPropertySymbols(map)); - } - for (var i = 0; i < props.length; i += 1) { - defineProperty(object, props[i], map[props[i]], predicates[props[i]]); - } -}; - -defineProperties.supportsDescriptors = !!supportsDescriptors; - -module.exports = defineProperties; diff --git a/node_modules/define-properties/package.json b/node_modules/define-properties/package.json deleted file mode 100644 index 29de3c43..00000000 --- a/node_modules/define-properties/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "_from": "define-properties@^1.1.3", - "_id": "define-properties@1.1.3", - "_inBundle": false, - "_integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "_location": "/define-properties", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "define-properties@^1.1.3", - "name": "define-properties", - "escapedName": "define-properties", - "rawSpec": "^1.1.3", - "saveSpec": null, - "fetchSpec": "^1.1.3" - }, - "_requiredBy": [ - "/object.assign" - ], - "_resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "_shasum": "cf88da6cbee26fe6db7094f61d870cbd84cee9f1", - "_spec": "define-properties@^1.1.3", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/object.assign", - "author": { - "name": "Jordan Harband" - }, - "bugs": { - "url": "https://github.com/ljharb/define-properties/issues" - }, - "bundleDependencies": false, - "dependencies": { - "object-keys": "^1.0.12" - }, - "deprecated": false, - "description": "Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines.", - "devDependencies": { - "@ljharb/eslint-config": "^13.0.0", - "covert": "^1.1.0", - "eslint": "^5.3.0", - "jscs": "^3.0.7", - "nsp": "^3.2.1", - "tape": "^4.9.0" - }, - "engines": { - "node": ">= 0.4" - }, - "homepage": "https://github.com/ljharb/define-properties#readme", - "keywords": [ - "Object.defineProperty", - "Object.defineProperties", - "object", - "property descriptor", - "descriptor", - "define", - "ES5" - ], - "license": "MIT", - "main": "index.js", - "name": "define-properties", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/define-properties.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "coverage-quiet": "covert test/*.js --quiet", - "eslint": "eslint test/*.js *.js", - "jscs": "jscs test/*.js *.js", - "lint": "npm run --silent jscs && npm run --silent eslint", - "posttest": "npm run --silent security", - "pretest": "npm run --silent lint", - "security": "nsp check", - "test": "npm run --silent tests-only", - "tests-only": "node test/index.js" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.1.3" -} diff --git a/node_modules/define-properties/test/index.js b/node_modules/define-properties/test/index.js deleted file mode 100644 index 3387f6bc..00000000 --- a/node_modules/define-properties/test/index.js +++ /dev/null @@ -1,125 +0,0 @@ -'use strict'; - -var define = require('../'); -var test = require('tape'); -var keys = require('object-keys'); - -var arePropertyDescriptorsSupported = function () { - var obj = { a: 1 }; - try { - Object.defineProperty(obj, 'x', { value: obj }); - return obj.x === obj; - } catch (e) { /* this is IE 8. */ - return false; - } -}; -var descriptorsSupported = !!Object.defineProperty && arePropertyDescriptorsSupported(); - -var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; - -test('defineProperties', function (dt) { - dt.test('with descriptor support', { skip: !descriptorsSupported }, function (t) { - var getDescriptor = function (value) { - return { - configurable: true, - enumerable: false, - value: value, - writable: true - }; - }; - - var obj = { - a: 1, - b: 2, - c: 3 - }; - t.deepEqual(keys(obj), ['a', 'b', 'c'], 'all literal-set keys start enumerable'); - define(obj, { - b: 3, - c: 4, - d: 5 - }); - t.deepEqual(obj, { - a: 1, - b: 2, - c: 3 - }, 'existing properties were not overridden'); - t.deepEqual(Object.getOwnPropertyDescriptor(obj, 'd'), getDescriptor(5), 'new property "d" was added and is not enumerable'); - t.deepEqual(['a', 'b', 'c'], keys(obj), 'new keys are not enumerable'); - - define(obj, { - a: 2, - b: 3, - c: 4 - }, { - a: function () { return true; }, - b: function () { return false; } - }); - t.deepEqual(obj, { - b: 2, - c: 3 - }, 'properties only overriden when predicate exists and returns true'); - t.deepEqual(Object.getOwnPropertyDescriptor(obj, 'd'), getDescriptor(5), 'existing property "d" remained and is not enumerable'); - t.deepEqual(Object.getOwnPropertyDescriptor(obj, 'a'), getDescriptor(2), 'existing property "a" was overridden and is not enumerable'); - t.deepEqual(['b', 'c'], keys(obj), 'overridden keys are not enumerable'); - - t.end(); - }); - - dt.test('without descriptor support', { skip: descriptorsSupported }, function (t) { - var obj = { - a: 1, - b: 2, - c: 3 - }; - define(obj, { - b: 3, - c: 4, - d: 5 - }); - t.deepEqual(obj, { - a: 1, - b: 2, - c: 3, - d: 5 - }, 'existing properties were not overridden, new properties were added'); - - define(obj, { - a: 2, - b: 3, - c: 4 - }, { - a: function () { return true; }, - b: function () { return false; } - }); - t.deepEqual(obj, { - a: 2, - b: 2, - c: 3, - d: 5 - }, 'properties only overriden when predicate exists and returns true'); - - t.end(); - }); - - dt.end(); -}); - -test('symbols', { skip: !hasSymbols }, function (t) { - var sym = Symbol('foo'); - var obj = {}; - var aValue = {}; - var bValue = {}; - var properties = { a: aValue }; - properties[sym] = bValue; - - define(obj, properties); - - t.deepEqual(Object.keys(obj), [], 'object has no enumerable keys'); - t.deepEqual(Object.getOwnPropertyNames(obj), ['a'], 'object has non-enumerable "a" key'); - t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'object has non-enumerable symbol key'); - t.equal(obj.a, aValue, 'string keyed value is defined'); - t.equal(obj[sym], bValue, 'symbol keyed value is defined'); - - t.end(); -}); diff --git a/node_modules/diff3/.npmignore b/node_modules/diff3/.npmignore deleted file mode 100644 index b38069de..00000000 --- a/node_modules/diff3/.npmignore +++ /dev/null @@ -1,28 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git -node_modules diff --git a/node_modules/diff3/README.md b/node_modules/diff3/README.md deleted file mode 100644 index 057594c9..00000000 --- a/node_modules/diff3/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# diff3 - -## Usage -```js -var diff3Merge = require('diff3'); -var a = ['a', 'text', 'file']; -var o = ['a', 'test', 'file']; -var b = ['a', 'toasty', 'filtered', 'file']; -var diff3 = diff3Merge(a, o, b); -``` - -## Output -```JSON -[{ - "ok": ["a"] -}, { - "conflict": { - "a": ["text"], - "aIndex": 1, - "o": ["test"], - "oIndex": 1, - "b": ["toasty", "filtered"], - "bIndex": 1 - } -}, { - "ok": ["file"] -}] -``` diff --git a/node_modules/diff3/diff3.js b/node_modules/diff3/diff3.js deleted file mode 100644 index 772bf9f9..00000000 --- a/node_modules/diff3/diff3.js +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright (c) 2006, 2008 Tony Garnock-Jones <tonyg@lshift.net> -// Copyright (c) 2006, 2008 LShift Ltd. <query@lshift.net> -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation files -// (the "Software"), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -var onp = require('./onp'); - -function longestCommonSubsequence(file1, file2) { - var diff = new onp(file1, file2); - diff.compose(); - var ses = diff.getses(); - - var root; - var prev; - var file1RevIdx = file1.length - 1, - file2RevIdx = file2.length - 1; - for (var i = ses.length - 1; i >= 0; --i) { - if (ses[i].t === diff.SES_COMMON) { - if (prev) { - prev.chain = { - file1index: file1RevIdx, - file2index: file2RevIdx, - chain: null - }; - prev = prev.chain; - } else { - root = { - file1index: file1RevIdx, - file2index: file2RevIdx, - chain: null - }; - prev = root; - } - file1RevIdx--; - file2RevIdx--; - } else if (ses[i].t === diff.SES_DELETE) { - file1RevIdx--; - } else if (ses[i].t === diff.SES_ADD) { - file2RevIdx--; - } - } - - var tail = { - file1index: -1, - file2index: -1, - chain: null - }; - - if (!prev) { - return tail; - } - - prev.chain = tail; - - return root; -} - -function diffIndices(file1, file2) { - // We apply the LCS to give a simple representation of the - // offsets and lengths of mismatched chunks in the input - // files. This is used by diff3_merge_indices below. - - var result = []; - var tail1 = file1.length; - var tail2 = file2.length; - - for (var candidate = longestCommonSubsequence(file1, file2); candidate !== null; candidate = candidate.chain) { - var mismatchLength1 = tail1 - candidate.file1index - 1; - var mismatchLength2 = tail2 - candidate.file2index - 1; - tail1 = candidate.file1index; - tail2 = candidate.file2index; - - if (mismatchLength1 || mismatchLength2) { - result.push({ - file1: [tail1 + 1, mismatchLength1], - file2: [tail2 + 1, mismatchLength2] - }); - } - } - - result.reverse(); - return result; -} - -function diff3MergeIndices(a, o, b) { - // Given three files, A, O, and B, where both A and B are - // independently derived from O, returns a fairly complicated - // internal representation of merge decisions it's taken. The - // interested reader may wish to consult - // - // Sanjeev Khanna, Keshav Kunal, and Benjamin C. Pierce. "A - // Formal Investigation of Diff3." In Arvind and Prasad, - // editors, Foundations of Software Technology and Theoretical - // Computer Science (FSTTCS), December 2007. - // - // (http://www.cis.upenn.edu/~bcpierce/papers/diff3-short.pdf) - var i; - - var m1 = diffIndices(o, a); - var m2 = diffIndices(o, b); - - var hunks = []; - - function addHunk(h, side) { - hunks.push([h.file1[0], side, h.file1[1], h.file2[0], h.file2[1]]); - } - for (i = 0; i < m1.length; i++) { - addHunk(m1[i], 0); - } - for (i = 0; i < m2.length; i++) { - addHunk(m2[i], 2); - } - hunks.sort(function(x, y) { - return x[0] - y[0] - }); - - var result = []; - var commonOffset = 0; - - function copyCommon(targetOffset) { - if (targetOffset > commonOffset) { - result.push([1, commonOffset, targetOffset - commonOffset]); - commonOffset = targetOffset; - } - } - - for (var hunkIndex = 0; hunkIndex < hunks.length; hunkIndex++) { - var firstHunkIndex = hunkIndex; - var hunk = hunks[hunkIndex]; - var regionLhs = hunk[0]; - var regionRhs = regionLhs + hunk[2]; - while (hunkIndex < hunks.length - 1) { - var maybeOverlapping = hunks[hunkIndex + 1]; - var maybeLhs = maybeOverlapping[0]; - if (maybeLhs > regionRhs) break; - regionRhs = Math.max(regionRhs, maybeLhs + maybeOverlapping[2]); - hunkIndex++; - } - - copyCommon(regionLhs); - if (firstHunkIndex == hunkIndex) { - // The "overlap" was only one hunk long, meaning that - // there's no conflict here. Either a and o were the - // same, or b and o were the same. - if (hunk[4] > 0) { - result.push([hunk[1], hunk[3], hunk[4]]); - } - } else { - // A proper conflict. Determine the extents of the - // regions involved from a, o and b. Effectively merge - // all the hunks on the left into one giant hunk, and - // do the same for the right; then, correct for skew - // in the regions of o that each side changed, and - // report appropriate spans for the three sides. - var regions = { - 0: [a.length, -1, o.length, -1], - 2: [b.length, -1, o.length, -1] - }; - for (i = firstHunkIndex; i <= hunkIndex; i++) { - hunk = hunks[i]; - var side = hunk[1]; - var r = regions[side]; - var oLhs = hunk[0]; - var oRhs = oLhs + hunk[2]; - var abLhs = hunk[3]; - var abRhs = abLhs + hunk[4]; - r[0] = Math.min(abLhs, r[0]); - r[1] = Math.max(abRhs, r[1]); - r[2] = Math.min(oLhs, r[2]); - r[3] = Math.max(oRhs, r[3]); - } - var aLhs = regions[0][0] + (regionLhs - regions[0][2]); - var aRhs = regions[0][1] + (regionRhs - regions[0][3]); - var bLhs = regions[2][0] + (regionLhs - regions[2][2]); - var bRhs = regions[2][1] + (regionRhs - regions[2][3]); - result.push([-1, - aLhs, aRhs - aLhs, - regionLhs, regionRhs - regionLhs, - bLhs, bRhs - bLhs - ]); - } - commonOffset = regionRhs; - } - - copyCommon(o.length); - return result; -} - -function diff3Merge(a, o, b) { - // Applies the output of Diff.diff3_merge_indices to actually - // construct the merged file; the returned result alternates - // between "ok" and "conflict" blocks. - - var result = []; - var files = [a, o, b]; - var indices = diff3MergeIndices(a, o, b); - - var okLines = []; - - function flushOk() { - if (okLines.length) { - result.push({ - ok: okLines - }); - } - okLines = []; - } - - function pushOk(xs) { - for (var j = 0; j < xs.length; j++) { - okLines.push(xs[j]); - } - } - - function isTrueConflict(rec) { - if (rec[2] != rec[6]) return true; - var aoff = rec[1]; - var boff = rec[5]; - for (var j = 0; j < rec[2]; j++) { - if (a[j + aoff] != b[j + boff]) return true; - } - return false; - } - - for (var i = 0; i < indices.length; i++) { - var x = indices[i]; - var side = x[0]; - if (side == -1) { - if (!isTrueConflict(x)) { - pushOk(files[0].slice(x[1], x[1] + x[2])); - } else { - flushOk(); - result.push({ - conflict: { - a: a.slice(x[1], x[1] + x[2]), - aIndex: x[1], - o: o.slice(x[3], x[3] + x[4]), - oIndex: x[3], - b: b.slice(x[5], x[5] + x[6]), - bIndex: x[5] - } - }); - } - } else { - pushOk(files[side].slice(x[1], x[1] + x[2])); - } - } - - flushOk(); - return result; -} - -module.exports = diff3Merge; diff --git a/node_modules/diff3/onp.js b/node_modules/diff3/onp.js deleted file mode 100644 index 4bba505c..00000000 --- a/node_modules/diff3/onp.js +++ /dev/null @@ -1,178 +0,0 @@ -/* - * URL: https://github.com/cubicdaiya/onp - * - * Copyright (c) 2013 Tatsuhiko Kubo <cubicdaiya@gmail.com> - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/** - * The algorithm implemented here is based on "An O(NP) Sequence Comparison Algorithm" - * by described by Sun Wu, Udi Manber and Gene Myers -*/ -module.exports = function (a_, b_) { - var a = a_, - b = b_, - m = a.length, - n = b.length, - reverse = false, - ed = null, - offset = m + 1, - path = [], - pathposi = [], - ses = [], - lcs = "", - SES_DELETE = -1, - SES_COMMON = 0, - SES_ADD = 1; - - var tmp1, - tmp2; - - var init = function () { - if (m >= n) { - tmp1 = a; - tmp2 = m; - a = b; - b = tmp1; - m = n; - n = tmp2; - reverse = true; - offset = m + 1; - } - }; - - var P = function (x, y, k) { - return { - 'x' : x, - 'y' : y, - 'k' : k, - }; - }; - - var seselem = function (elem, t) { - return { - 'elem' : elem, - 't' : t, - }; - }; - - var snake = function (k, p, pp) { - var r, x, y; - if (p > pp) { - r = path[k-1+offset]; - } else { - r = path[k+1+offset]; - } - - y = Math.max(p, pp); - x = y - k; - while (x < m && y < n && a[x] === b[y]) { - ++x; - ++y; - } - - path[k+offset] = pathposi.length; - pathposi[pathposi.length] = new P(x, y, r); - return y; - }; - - var recordseq = function (epc) { - var x_idx, y_idx, px_idx, py_idx, i; - x_idx = y_idx = 1; - px_idx = py_idx = 0; - for (i=epc.length-1;i>=0;--i) { - while(px_idx < epc[i].x || py_idx < epc[i].y) { - if (epc[i].y - epc[i].x > py_idx - px_idx) { - if (reverse) { - ses[ses.length] = new seselem(b[py_idx], SES_DELETE); - } else { - ses[ses.length] = new seselem(b[py_idx], SES_ADD); - } - ++y_idx; - ++py_idx; - } else if (epc[i].y - epc[i].x < py_idx - px_idx) { - if (reverse) { - ses[ses.length] = new seselem(a[px_idx], SES_ADD); - } else { - ses[ses.length] = new seselem(a[px_idx], SES_DELETE); - } - ++x_idx; - ++px_idx; - } else { - ses[ses.length] = new seselem(a[px_idx], SES_COMMON); - lcs += a[px_idx]; - ++x_idx; - ++y_idx; - ++px_idx; - ++py_idx; - } - } - } - }; - - init(); - - return { - SES_DELETE : -1, - SES_COMMON : 0, - SES_ADD : 1, - editdistance : function () { - return ed; - }, - getlcs : function () { - return lcs; - }, - getses : function () { - return ses; - }, - compose : function () { - var delta, size, fp, p, r, epc, i, k; - delta = n - m; - size = m + n + 3; - fp = {}; - for (i=0;i<size;++i) { - fp[i] = -1; - path[i] = -1; - } - p = -1; - do { - ++p; - for (k=-p;k<=delta-1;++k) { - fp[k+offset] = snake(k, fp[k-1+offset]+1, fp[k+1+offset]); - } - for (k=delta+p;k>=delta+1;--k) { - fp[k+offset] = snake(k, fp[k-1+offset]+1, fp[k+1+offset]); - } - fp[delta+offset] = snake(delta, fp[delta-1+offset]+1, fp[delta+1+offset]); - } while (fp[delta+offset] !== n); - - ed = delta + 2 * p; - - r = path[delta+offset]; - - epc = []; - while (r !== -1) { - epc[epc.length] = new P(pathposi[r].x, pathposi[r].y, null); - r = pathposi[r].k; - } - recordseq(epc); - } - }; -}; diff --git a/node_modules/diff3/package.json b/node_modules/diff3/package.json deleted file mode 100644 index 2d6265c3..00000000 --- a/node_modules/diff3/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "_from": "diff3@0.0.3", - "_id": "diff3@0.0.3", - "_inBundle": false, - "_integrity": "sha1-1OXDpM305f4SEatC5pP8tDIVgPw=", - "_location": "/diff3", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "diff3@0.0.3", - "name": "diff3", - "escapedName": "diff3", - "rawSpec": "0.0.3", - "saveSpec": null, - "fetchSpec": "0.0.3" - }, - "_requiredBy": [ - "/isomorphic-git" - ], - "_resolved": "https://registry.npmjs.org/diff3/-/diff3-0.0.3.tgz", - "_shasum": "d4e5c3a4cdf4e5fe1211ab42e693fcb4321580fc", - "_spec": "diff3@0.0.3", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/isomorphic-git", - "author": { - "name": "Tyler Wanek" - }, - "bugs": { - "url": "https://github.com/axosoft/diff3/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A diff3 engine for nodejs", - "homepage": "https://github.com/axosoft/diff3#readme", - "keywords": [ - "diff3", - "diff" - ], - "license": "MIT", - "main": "diff3.js", - "name": "diff3", - "repository": { - "type": "git", - "url": "git+https://github.com/axosoft/diff3.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "0.0.3" -} diff --git a/node_modules/duplexify/.travis.yml b/node_modules/duplexify/.travis.yml deleted file mode 100644 index cb6e1826..00000000 --- a/node_modules/duplexify/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "4" - - "6" - - "8" - - "10" diff --git a/node_modules/duplexify/LICENSE b/node_modules/duplexify/LICENSE deleted file mode 100644 index 757562ec..00000000 --- a/node_modules/duplexify/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/duplexify/README.md b/node_modules/duplexify/README.md deleted file mode 100644 index 8352900f..00000000 --- a/node_modules/duplexify/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# duplexify - -Turn a writeable and readable stream into a single streams2 duplex stream. - -Similar to [duplexer2](https://github.com/deoxxa/duplexer2) except it supports both streams2 and streams1 as input -and it allows you to set the readable and writable part asynchronously using `setReadable(stream)` and `setWritable(stream)` - -``` -npm install duplexify -``` - -[![build status](http://img.shields.io/travis/mafintosh/duplexify.svg?style=flat)](http://travis-ci.org/mafintosh/duplexify) - -## Usage - -Use `duplexify(writable, readable, streamOptions)` (or `duplexify.obj(writable, readable)` to create an object stream) - -``` js -var duplexify = require('duplexify') - -// turn writableStream and readableStream into a single duplex stream -var dup = duplexify(writableStream, readableStream) - -dup.write('hello world') // will write to writableStream -dup.on('data', function(data) { - // will read from readableStream -}) -``` - -You can also set the readable and writable parts asynchronously - -``` js -var dup = duplexify() - -dup.write('hello world') // write will buffer until the writable - // part has been set - -// wait a bit ... -dup.setReadable(readableStream) - -// maybe wait some more? -dup.setWritable(writableStream) -``` - -If you call `setReadable` or `setWritable` multiple times it will unregister the previous readable/writable stream. -To disable the readable or writable part call `setReadable` or `setWritable` with `null`. - -If the readable or writable streams emits an error or close it will destroy both streams and bubble up the event. -You can also explicitly destroy the streams by calling `dup.destroy()`. The `destroy` method optionally takes an -error object as argument, in which case the error is emitted as part of the `error` event. - -``` js -dup.on('error', function(err) { - console.log('readable or writable emitted an error - close will follow') -}) - -dup.on('close', function() { - console.log('the duplex stream is destroyed') -}) - -dup.destroy() // calls destroy on the readable and writable part (if present) -``` - -## HTTP request example - -Turn a node core http request into a duplex stream is as easy as - -``` js -var duplexify = require('duplexify') -var http = require('http') - -var request = function(opts) { - var req = http.request(opts) - var dup = duplexify(req) - req.on('response', function(res) { - dup.setReadable(res) - }) - return dup -} - -var req = request({ - method: 'GET', - host: 'www.google.com', - port: 80 -}) - -req.end() -req.pipe(process.stdout) -``` - -## License - -MIT - -## Related - -`duplexify` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/duplexify/example.js b/node_modules/duplexify/example.js deleted file mode 100644 index 5585c197..00000000 --- a/node_modules/duplexify/example.js +++ /dev/null @@ -1,21 +0,0 @@ -var duplexify = require('duplexify') -var http = require('http') - -var request = function(opts) { - var req = http.request(opts) - var dup = duplexify() - dup.setWritable(req) - req.on('response', function(res) { - dup.setReadable(res) - }) - return dup -} - -var req = request({ - method: 'GET', - host: 'www.google.com', - port: 80 -}) - -req.end() -req.pipe(process.stdout) diff --git a/node_modules/duplexify/index.js b/node_modules/duplexify/index.js deleted file mode 100644 index 18634c2f..00000000 --- a/node_modules/duplexify/index.js +++ /dev/null @@ -1,234 +0,0 @@ -var stream = require('readable-stream') -var eos = require('end-of-stream') -var inherits = require('inherits') -var shift = require('stream-shift') - -var SIGNAL_FLUSH = (Buffer.from && Buffer.from !== Uint8Array.from) - ? Buffer.from([0]) - : new Buffer([0]) - -var onuncork = function(self, fn) { - if (self._corked) self.once('uncork', fn) - else fn() -} - -var autoDestroy = function (self, err) { - if (self._autoDestroy) self.destroy(err) -} - -var destroyer = function(self, end) { - return function(err) { - if (err) autoDestroy(self, err.message === 'premature close' ? null : err) - else if (end && !self._ended) self.end() - } -} - -var end = function(ws, fn) { - if (!ws) return fn() - if (ws._writableState && ws._writableState.finished) return fn() - if (ws._writableState) return ws.end(fn) - ws.end() - fn() -} - -var toStreams2 = function(rs) { - return new (stream.Readable)({objectMode:true, highWaterMark:16}).wrap(rs) -} - -var Duplexify = function(writable, readable, opts) { - if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts) - stream.Duplex.call(this, opts) - - this._writable = null - this._readable = null - this._readable2 = null - - this._autoDestroy = !opts || opts.autoDestroy !== false - this._forwardDestroy = !opts || opts.destroy !== false - this._forwardEnd = !opts || opts.end !== false - this._corked = 1 // start corked - this._ondrain = null - this._drained = false - this._forwarding = false - this._unwrite = null - this._unread = null - this._ended = false - - this.destroyed = false - - if (writable) this.setWritable(writable) - if (readable) this.setReadable(readable) -} - -inherits(Duplexify, stream.Duplex) - -Duplexify.obj = function(writable, readable, opts) { - if (!opts) opts = {} - opts.objectMode = true - opts.highWaterMark = 16 - return new Duplexify(writable, readable, opts) -} - -Duplexify.prototype.cork = function() { - if (++this._corked === 1) this.emit('cork') -} - -Duplexify.prototype.uncork = function() { - if (this._corked && --this._corked === 0) this.emit('uncork') -} - -Duplexify.prototype.setWritable = function(writable) { - if (this._unwrite) this._unwrite() - - if (this.destroyed) { - if (writable && writable.destroy) writable.destroy() - return - } - - if (writable === null || writable === false) { - this.end() - return - } - - var self = this - var unend = eos(writable, {writable:true, readable:false}, destroyer(this, this._forwardEnd)) - - var ondrain = function() { - var ondrain = self._ondrain - self._ondrain = null - if (ondrain) ondrain() - } - - var clear = function() { - self._writable.removeListener('drain', ondrain) - unend() - } - - if (this._unwrite) process.nextTick(ondrain) // force a drain on stream reset to avoid livelocks - - this._writable = writable - this._writable.on('drain', ondrain) - this._unwrite = clear - - this.uncork() // always uncork setWritable -} - -Duplexify.prototype.setReadable = function(readable) { - if (this._unread) this._unread() - - if (this.destroyed) { - if (readable && readable.destroy) readable.destroy() - return - } - - if (readable === null || readable === false) { - this.push(null) - this.resume() - return - } - - var self = this - var unend = eos(readable, {writable:false, readable:true}, destroyer(this)) - - var onreadable = function() { - self._forward() - } - - var onend = function() { - self.push(null) - } - - var clear = function() { - self._readable2.removeListener('readable', onreadable) - self._readable2.removeListener('end', onend) - unend() - } - - this._drained = true - this._readable = readable - this._readable2 = readable._readableState ? readable : toStreams2(readable) - this._readable2.on('readable', onreadable) - this._readable2.on('end', onend) - this._unread = clear - - this._forward() -} - -Duplexify.prototype._read = function() { - this._drained = true - this._forward() -} - -Duplexify.prototype._forward = function() { - if (this._forwarding || !this._readable2 || !this._drained) return - this._forwarding = true - - var data - - while (this._drained && (data = shift(this._readable2)) !== null) { - if (this.destroyed) continue - this._drained = this.push(data) - } - - this._forwarding = false -} - -Duplexify.prototype.destroy = function(err) { - if (this.destroyed) return - this.destroyed = true - - var self = this - process.nextTick(function() { - self._destroy(err) - }) -} - -Duplexify.prototype._destroy = function(err) { - if (err) { - var ondrain = this._ondrain - this._ondrain = null - if (ondrain) ondrain(err) - else this.emit('error', err) - } - - if (this._forwardDestroy) { - if (this._readable && this._readable.destroy) this._readable.destroy() - if (this._writable && this._writable.destroy) this._writable.destroy() - } - - this.emit('close') -} - -Duplexify.prototype._write = function(data, enc, cb) { - if (this.destroyed) return cb() - if (this._corked) return onuncork(this, this._write.bind(this, data, enc, cb)) - if (data === SIGNAL_FLUSH) return this._finish(cb) - if (!this._writable) return cb() - - if (this._writable.write(data) === false) this._ondrain = cb - else cb() -} - -Duplexify.prototype._finish = function(cb) { - var self = this - this.emit('preend') - onuncork(this, function() { - end(self._forwardEnd && self._writable, function() { - // haxx to not emit prefinish twice - if (self._writableState.prefinished === false) self._writableState.prefinished = true - self.emit('prefinish') - onuncork(self, cb) - }) - }) -} - -Duplexify.prototype.end = function(data, enc, cb) { - if (typeof data === 'function') return this.end(null, null, data) - if (typeof enc === 'function') return this.end(data, null, enc) - this._ended = true - if (data) this.write(data) - if (!this._writableState.ending) this.write(SIGNAL_FLUSH) - return stream.Writable.prototype.end.call(this, cb) -} - -module.exports = Duplexify diff --git a/node_modules/duplexify/node_modules/readable-stream/.travis.yml b/node_modules/duplexify/node_modules/readable-stream/.travis.yml deleted file mode 100644 index f62cdac0..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -sudo: false -language: node_js -before_install: - - (test $NPM_LEGACY && npm install -g npm@2 && npm install -g npm@3) || true -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: NPM_LEGACY=true - - node_js: '0.10' - env: NPM_LEGACY=true - - node_js: '0.11' - env: NPM_LEGACY=true - - node_js: '0.12' - env: NPM_LEGACY=true - - node_js: 1 - env: NPM_LEGACY=true - - node_js: 2 - env: NPM_LEGACY=true - - node_js: 3 - env: NPM_LEGACY=true - - node_js: 4 - - node_js: 5 - - node_js: 6 - - node_js: 7 - - node_js: 8 - - node_js: 9 -script: "npm run test" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/node_modules/duplexify/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/duplexify/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58d..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/duplexify/node_modules/readable-stream/GOVERNANCE.md b/node_modules/duplexify/node_modules/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93f..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### Streams Working Group - -The Node.js Streams is jointly governed by a Working Group -(WG) -that is responsible for high-level guidance of the project. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Conduct guidelines -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project -[README.md](./README.md#current-project-team-members). - -### Collaborators - -The readable-stream GitHub repository is -maintained by the WG and additional Collaborators who are added by the -WG on an ongoing basis. - -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the WG and their addition as -Collaborators is discussed during the WG meeting. - -_Note:_ If you make a significant contribution and are not considered -for commit-access log an issue or contact a WG member directly and it -will be brought up in the next WG meeting. - -Modifications of the contents of the readable-stream repository are -made on -a collaborative basis. Anybody with a GitHub account may propose a -modification via pull request and it will be considered by the project -Collaborators. All pull requests must be reviewed and accepted by a -Collaborator with sufficient expertise who is able to take full -responsibility for the change. In the case of pull requests proposed -by an existing Collaborator, an additional Collaborator is required -for sign-off. Consensus should be sought if additional Collaborators -participate and there is disagreement around a particular -modification. See _Consensus Seeking Process_ below for further detail -on the consensus model used for governance. - -Collaborators may opt to elevate significant or controversial -modifications, or modifications that have not found consensus to the -WG for discussion by assigning the ***WG-agenda*** tag to a pull -request or issue. The WG should serve as the final arbiter where -required. - -For the current list of Collaborators, see the project -[README.md](./README.md#members). - -### WG Membership - -WG seats are not time-limited. There is no fixed size of the WG. -However, the expected target is between 6 and 12, to ensure adequate -coverage of important areas of expertise, balanced with the ability to -make decisions efficiently. - -There is no specific set of requirements or qualifications for WG -membership beyond these rules. - -The WG may add additional members to the WG by unanimous consensus. - -A WG member may be removed from the WG by voluntary resignation, or by -unanimous consensus of all other WG members. - -Changes to WG membership should be posted in the agenda, and may be -suggested as any other agenda item (see "WG Meetings" below). - -If an addition or removal is proposed during a meeting, and the full -WG is not in attendance to participate, then the addition or removal -is added to the agenda for the subsequent meeting. This is to ensure -that all members are given the opportunity to participate in all -membership decisions. If a WG member is unable to attend a meeting -where a planned membership decision is being made, then their consent -is assumed. - -No more than 1/3 of the WG members may be affiliated with the same -employer. If removal or resignation of a WG member, or a change of -employment by a WG member, creates a situation where more than 1/3 of -the WG membership shares an employer, then the situation must be -immediately remedied by the resignation or removal of one or more WG -members affiliated with the over-represented employer(s). - -### WG Meetings - -The WG meets occasionally on a Google Hangout On Air. A designated moderator -approved by the WG runs the meeting. Each meeting should be -published to YouTube. - -Items are added to the WG agenda that are considered contentious or -are modifications of governance, contribution policy, WG membership, -or release process. - -The intention of the agenda is not to approve or review all patches; -that should happen continuously on GitHub and be handled by the larger -group of Collaborators. - -Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, -WG member or the moderator can add the item to the agenda by adding -the ***WG-agenda*** tag to the issue. - -Prior to each WG meeting the moderator will share the Agenda with -members of the WG. WG members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the WG -cannot veto or remove items. - -The WG may invite persons or representatives from certain projects to -participate in a non-voting capacity. - -The moderator is responsible for summarizing the discussion of each -agenda item and sends it as a pull request after the meeting. - -### Consensus Seeking Process - -The WG follows a -[Consensus -Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) -decision-making model. - -When an agenda item has appeared to reach a consensus the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. - -If an agenda item cannot reach a consensus a WG member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be seconded by a majority of the WG -or else the discussion will continue. Simple majority wins. - -Note that changes to WG membership require a majority consensus. See -"WG Membership" above. diff --git a/node_modules/duplexify/node_modules/readable-stream/LICENSE b/node_modules/duplexify/node_modules/readable-stream/LICENSE deleted file mode 100644 index 2873b3b2..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" diff --git a/node_modules/duplexify/node_modules/readable-stream/README.md b/node_modules/duplexify/node_modules/readable-stream/README.md deleted file mode 100644 index 23fe3f3e..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# readable-stream - -***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -<a name="members"></a> -## Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E -* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/node_modules/duplexify/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/duplexify/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index 83275f19..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,60 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section - - diff --git a/node_modules/duplexify/node_modules/readable-stream/duplex-browser.js b/node_modules/duplexify/node_modules/readable-stream/duplex-browser.js deleted file mode 100644 index f8b2db83..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/duplex-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_duplex.js'); diff --git a/node_modules/duplexify/node_modules/readable-stream/duplex.js b/node_modules/duplexify/node_modules/readable-stream/duplex.js deleted file mode 100644 index 46924cbf..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Duplex diff --git a/node_modules/duplexify/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/duplexify/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 57003c32..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/*<replacement>*/ - -var pna = require('process-nextick-args'); -/*</replacement>*/ - -/*<replacement>*/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/*</replacement>*/ - -module.exports = Duplex; - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -{ - // avoid scope creep, the keys array can then be collected - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - pna.nextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -Object.defineProperty(Duplex.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); - -Duplex.prototype._destroy = function (err, cb) { - this.push(null); - this.end(); - - pna.nextTick(cb, err); -}; \ No newline at end of file diff --git a/node_modules/duplexify/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/duplexify/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 612edb4d..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 0f807646..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1019 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/*<replacement>*/ - -var pna = require('process-nextick-args'); -/*</replacement>*/ - -module.exports = Readable; - -/*<replacement>*/ -var isArray = require('isarray'); -/*</replacement>*/ - -/*<replacement>*/ -var Duplex; -/*</replacement>*/ - -Readable.ReadableState = ReadableState; - -/*<replacement>*/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/*</replacement>*/ - -/*<replacement>*/ -var Stream = require('./internal/streams/stream'); -/*</replacement>*/ - -/*<replacement>*/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/*</replacement>*/ - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -/*<replacement>*/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/*</replacement>*/ - -var BufferList = require('./internal/streams/BufferList'); -var destroyImpl = require('./internal/streams/destroy'); -var StringDecoder; - -util.inherits(Readable, Stream); - -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); - - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var readableHwm = options.readableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} - -Object.defineProperty(Readable.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); - -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - this.push(null); - cb(err); -}; - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); - } else if (state.ended) { - stream.emit('error', new Error('stream.push() after EOF')); - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - } - } - - return needMoreData(state); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } else { - state.length -= n; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - pna.nextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('_read() is not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - // If the user pushes more data while we're writing to dest then we'll end up - // in ondata again. However, we only want to increase awaitDrain once because - // dest will only emit one 'drain' event for the multiple writes. - // => Introduce a guard on increasing awaitDrain. - var increasedAwaitDrain = false; - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - increasedAwaitDrain = false; - var ret = dest.write(chunk); - if (false === ret && !increasedAwaitDrain) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - increasedAwaitDrain = true; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { hasUnpiped: false }; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, unpipeInfo); - }return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this, unpipeInfo); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data') { - // Start flowing on next tick if stream isn't explicitly paused - if (this._readableState.flowing !== false) this.resume(); - } else if (ev === 'readable') { - var state = this._readableState; - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.emittedReadable = false; - if (!state.reading) { - pna.nextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - pna.nextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - state.awaitDrain = 0; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null) {} -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var _this = this; - - var state = this._readableState; - var paused = false; - - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - - _this.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return this; -}; - -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._readableState.highWaterMark; - } -}); - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = fromListPartial(n, state.buffer, state.decoder); - } - - return ret; -} - -// Extracts only enough buffered data to satisfy the amount requested. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromListPartial(n, list, hasStrings) { - var ret; - if (n < list.head.data.length) { - // slice is the same for buffers and strings - ret = list.head.data.slice(0, n); - list.head.data = list.head.data.slice(n); - } else if (n === list.head.data.length) { - // first chunk is a perfect match - ret = list.shift(); - } else { - // result spans more than one buffer - ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); - } - return ret; -} - -// Copies a specified amount of characters from the list of buffered data -// chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBufferString(n, list) { - var p = list.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -// Copies a specified amount of bytes from the list of buffered data chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBuffer(n, list) { - var ret = Buffer.allocUnsafe(n); - var p = list.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - pna.nextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/node_modules/duplexify/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/duplexify/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index fcfc105a..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -util.inherits(Transform, Duplex); - -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) { - return this.emit('error', new Error('write callback called multiple times')); - } - - ts.writechunk = null; - ts.writecb = null; - - if (data != null) // single equals check for both `null` and `undefined` - this.push(data); - - cb(er); - - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); -} - -function prefinish() { - var _this = this; - - if (typeof this._flush === 'function') { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('_transform() is not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -Transform.prototype._destroy = function (err, cb) { - var _this2 = this; - - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - _this2.emit('close'); - }); -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - - if (data != null) // single equals check for both `null` and `undefined` - stream.push(data); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); - - if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/node_modules/duplexify/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/duplexify/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index b0b02200..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,687 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -/*<replacement>*/ - -var pna = require('process-nextick-args'); -/*</replacement>*/ - -module.exports = Writable; - -/* <replacement> */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* </replacement> */ - -/*<replacement>*/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; -/*</replacement>*/ - -/*<replacement>*/ -var Duplex; -/*</replacement>*/ - -Writable.WritableState = WritableState; - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -/*<replacement>*/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/*</replacement>*/ - -/*<replacement>*/ -var Stream = require('./internal/streams/stream'); -/*</replacement>*/ - -/*<replacement>*/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/*</replacement>*/ - -var destroyImpl = require('./internal/streams/destroy'); - -util.inherits(Writable, Stream); - -function nop() {} - -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var writableHwm = options.writableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // if _final has been called - this.finalCalled = false; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // has it been destroyed - this.destroyed = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function (object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function (object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { - return new Writable(options); - } - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - pna.nextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - pna.nextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} - -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - pna.nextTick(cb, er); - // this can emit finish, and it will always happen - // after error - pna.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /*<replacement>*/ - asyncWrite(afterWrite, stream, state, finished, cb); - /*</replacement>*/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('_write() is not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - stream.emit('error', err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function') { - state.pendingcb++; - state.finalCalled = true; - pna.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = corkReq; - } else { - state.corkedRequestsFree = corkReq; - } -} - -Object.defineProperty(Writable.prototype, 'destroyed', { - get: function () { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); - -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - this.end(); - cb(err); -}; \ No newline at end of file diff --git a/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/BufferList.js deleted file mode 100644 index aefc68bd..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/BufferList.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Buffer = require('safe-buffer').Buffer; -var util = require('util'); - -function copyBuffer(src, target, offset) { - src.copy(target, offset); -} - -module.exports = function () { - function BufferList() { - _classCallCheck(this, BufferList); - - this.head = null; - this.tail = null; - this.length = 0; - } - - BufferList.prototype.push = function push(v) { - var entry = { data: v, next: null }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - }; - - BufferList.prototype.unshift = function unshift(v) { - var entry = { data: v, next: this.head }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - }; - - BufferList.prototype.shift = function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - }; - - BufferList.prototype.clear = function clear() { - this.head = this.tail = null; - this.length = 0; - }; - - BufferList.prototype.join = function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) { - ret += s + p.data; - }return ret; - }; - - BufferList.prototype.concat = function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - if (this.length === 1) return this.head.data; - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; - }; - - return BufferList; -}(); - -if (util && util.inspect && util.inspect.custom) { - module.exports.prototype[util.inspect.custom] = function () { - var obj = util.inspect({ length: this.length }); - return this.constructor.name + ' ' + obj; - }; -} \ No newline at end of file diff --git a/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index 5a0a0d88..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -/*<replacement>*/ - -var pna = require('process-nextick-args'); -/*</replacement>*/ - -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { - pna.nextTick(emitErrorNT, this, err); - } - return this; - } - - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; - } - - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - pna.nextTick(emitErrorNT, _this, err); - if (_this._writableState) { - _this._writableState.errorEmitted = true; - } - } else if (cb) { - cb(err); - } - }); - - return this; -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy -}; \ No newline at end of file diff --git a/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3fd..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b6..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/node_modules/duplexify/node_modules/readable-stream/package.json b/node_modules/duplexify/node_modules/readable-stream/package.json deleted file mode 100644 index 27282b49..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "readable-stream@^2.0.0", - "_id": "readable-stream@2.3.7", - "_inBundle": false, - "_integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "_location": "/duplexify/readable-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "readable-stream@^2.0.0", - "name": "readable-stream", - "escapedName": "readable-stream", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/duplexify" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "_shasum": "1eca1cf711aef814c04f62252a36a62f6cb23b57", - "_spec": "readable-stream@^2.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/duplexify", - "browser": { - "util": false, - "./readable.js": "./readable-browser.js", - "./writable.js": "./writable-browser.js", - "./duplex.js": "./duplex-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "deprecated": false, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "assert": "^1.4.0", - "babel-polyfill": "^6.9.1", - "buffer": "^4.9.0", - "lolex": "^2.3.2", - "nyc": "^6.4.0", - "tap": "^0.7.0", - "tape": "^4.8.0" - }, - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "name": "readable-stream", - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov", - "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js" - }, - "version": "2.3.7" -} diff --git a/node_modules/duplexify/node_modules/readable-stream/passthrough.js b/node_modules/duplexify/node_modules/readable-stream/passthrough.js deleted file mode 100644 index ffd791d7..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').PassThrough diff --git a/node_modules/duplexify/node_modules/readable-stream/readable-browser.js b/node_modules/duplexify/node_modules/readable-stream/readable-browser.js deleted file mode 100644 index e5037259..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/readable-browser.js +++ /dev/null @@ -1,7 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/duplexify/node_modules/readable-stream/readable.js b/node_modules/duplexify/node_modules/readable-stream/readable.js deleted file mode 100644 index ec89ec53..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,19 +0,0 @@ -var Stream = require('stream'); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; - exports = module.exports = Stream.Readable; - exports.Readable = Stream.Readable; - exports.Writable = Stream.Writable; - exports.Duplex = Stream.Duplex; - exports.Transform = Stream.Transform; - exports.PassThrough = Stream.PassThrough; - exports.Stream = Stream; -} else { - exports = module.exports = require('./lib/_stream_readable.js'); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = require('./lib/_stream_writable.js'); - exports.Duplex = require('./lib/_stream_duplex.js'); - exports.Transform = require('./lib/_stream_transform.js'); - exports.PassThrough = require('./lib/_stream_passthrough.js'); -} diff --git a/node_modules/duplexify/node_modules/readable-stream/transform.js b/node_modules/duplexify/node_modules/readable-stream/transform.js deleted file mode 100644 index b1baba26..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Transform diff --git a/node_modules/duplexify/node_modules/readable-stream/writable-browser.js b/node_modules/duplexify/node_modules/readable-stream/writable-browser.js deleted file mode 100644 index ebdde6a8..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/writable-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_writable.js'); diff --git a/node_modules/duplexify/node_modules/readable-stream/writable.js b/node_modules/duplexify/node_modules/readable-stream/writable.js deleted file mode 100644 index 3211a6f8..00000000 --- a/node_modules/duplexify/node_modules/readable-stream/writable.js +++ /dev/null @@ -1,8 +0,0 @@ -var Stream = require("stream") -var Writable = require("./lib/_stream_writable.js") - -if (process.env.READABLE_STREAM === 'disable') { - module.exports = Stream && Stream.Writable || Writable -} else { - module.exports = Writable -} diff --git a/node_modules/duplexify/node_modules/safe-buffer/LICENSE b/node_modules/duplexify/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068cee..00000000 --- a/node_modules/duplexify/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/duplexify/node_modules/safe-buffer/README.md b/node_modules/duplexify/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81afd..00000000 --- a/node_modules/duplexify/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) -<!-- YAML -added: v3.0.0 ---> - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) -<!-- YAML -added: v5.10.0 ---> - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: <Buffer 88 13 a0 0f> - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: <Buffer 88 13 70 17> -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) -<!-- YAML -added: v3.0.0 ---> - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) -<!-- YAML -added: v5.10.0 ---> - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) -<!-- YAML -added: v5.10.0 ---> - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // <Buffer 00 00 00 00 00> -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // <Buffer 61 61 61 61 61> -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64> -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) -<!-- YAML -added: v5.10.0 ---> - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // <Buffer 78 e0 82 02 01> - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // <Buffer 00 00 00 00 00> -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) -<!-- YAML -added: v5.10.0 ---> - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/node_modules/duplexify/node_modules/safe-buffer/index.d.ts b/node_modules/duplexify/node_modules/safe-buffer/index.d.ts deleted file mode 100644 index e9fed809..00000000 --- a/node_modules/duplexify/node_modules/safe-buffer/index.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "safe-buffer" { - export class Buffer { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - } -} \ No newline at end of file diff --git a/node_modules/duplexify/node_modules/safe-buffer/index.js b/node_modules/duplexify/node_modules/safe-buffer/index.js deleted file mode 100644 index 22438dab..00000000 --- a/node_modules/duplexify/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/node_modules/duplexify/node_modules/safe-buffer/package.json b/node_modules/duplexify/node_modules/safe-buffer/package.json deleted file mode 100644 index 03e86bf7..00000000 --- a/node_modules/duplexify/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "safe-buffer@~5.1.1", - "_id": "safe-buffer@5.1.2", - "_inBundle": false, - "_integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "_location": "/duplexify/safe-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "safe-buffer@~5.1.1", - "name": "safe-buffer", - "escapedName": "safe-buffer", - "rawSpec": "~5.1.1", - "saveSpec": null, - "fetchSpec": "~5.1.1" - }, - "_requiredBy": [ - "/duplexify/readable-stream", - "/duplexify/string_decoder" - ], - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "_shasum": "991ec69d296e0313747d59bdfd2b745c35f8828d", - "_spec": "safe-buffer@~5.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/duplexify/node_modules/readable-stream", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Safer Node.js Buffer API", - "devDependencies": { - "standard": "*", - "tape": "^4.0.0" - }, - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "name": "safe-buffer", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "types": "index.d.ts", - "version": "5.1.2" -} diff --git a/node_modules/duplexify/node_modules/string_decoder/.travis.yml b/node_modules/duplexify/node_modules/string_decoder/.travis.yml deleted file mode 100644 index 3347a725..00000000 --- a/node_modules/duplexify/node_modules/string_decoder/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test diff --git a/node_modules/duplexify/node_modules/string_decoder/LICENSE b/node_modules/duplexify/node_modules/string_decoder/LICENSE deleted file mode 100644 index 778edb20..00000000 --- a/node_modules/duplexify/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - diff --git a/node_modules/duplexify/node_modules/string_decoder/README.md b/node_modules/duplexify/node_modules/string_decoder/README.md deleted file mode 100644 index 5fd58315..00000000 --- a/node_modules/duplexify/node_modules/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# string_decoder - -***Node-core v8.9.4 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. - -## Streams Working Group - -`string_decoder` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -See [readable-stream](https://github.com/nodejs/readable-stream) for -more details. diff --git a/node_modules/duplexify/node_modules/string_decoder/lib/string_decoder.js b/node_modules/duplexify/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63f..00000000 --- a/node_modules/duplexify/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/*<replacement>*/ - -var Buffer = require('safe-buffer').Buffer; -/*</replacement>*/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/node_modules/duplexify/node_modules/string_decoder/package.json b/node_modules/duplexify/node_modules/string_decoder/package.json deleted file mode 100644 index a7be1bba..00000000 --- a/node_modules/duplexify/node_modules/string_decoder/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "string_decoder@~1.1.1", - "_id": "string_decoder@1.1.1", - "_inBundle": false, - "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "_location": "/duplexify/string_decoder", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "string_decoder@~1.1.1", - "name": "string_decoder", - "escapedName": "string_decoder", - "rawSpec": "~1.1.1", - "saveSpec": null, - "fetchSpec": "~1.1.1" - }, - "_requiredBy": [ - "/duplexify/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8", - "_spec": "string_decoder@~1.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/duplexify/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/nodejs/string_decoder/issues" - }, - "bundleDependencies": false, - "dependencies": { - "safe-buffer": "~5.1.0" - }, - "deprecated": false, - "description": "The string_decoder module from Node core", - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "lib/string_decoder.js", - "name": "string_decoder", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "test": "tap test/parallel/*.js && node test/verify-dependencies" - }, - "version": "1.1.1" -} diff --git a/node_modules/duplexify/package.json b/node_modules/duplexify/package.json deleted file mode 100644 index e2d4a6b0..00000000 --- a/node_modules/duplexify/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "_from": "duplexify@^3.6.0", - "_id": "duplexify@3.7.1", - "_inBundle": false, - "_integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", - "_location": "/duplexify", - "_phantomChildren": { - "core-util-is": "1.0.2", - "inherits": "2.0.4", - "isarray": "1.0.0", - "process-nextick-args": "2.0.1", - "util-deprecate": "1.0.2" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "duplexify@^3.6.0", - "name": "duplexify", - "escapedName": "duplexify", - "rawSpec": "^3.6.0", - "saveSpec": null, - "fetchSpec": "^3.6.0" - }, - "_requiredBy": [ - "/pumpify" - ], - "_resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "_shasum": "2a4df5317f6ccfd91f86d6fd25d8d8a103b88309", - "_spec": "duplexify@^3.6.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pumpify", - "author": { - "name": "Mathias Buus" - }, - "bugs": { - "url": "https://github.com/mafintosh/duplexify/issues" - }, - "bundleDependencies": false, - "dependencies": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - }, - "deprecated": false, - "description": "Turn a writable and readable stream into a streams2 duplex stream with support for async initialization and streams1/streams2 input", - "devDependencies": { - "concat-stream": "^1.5.2", - "tape": "^4.0.0", - "through2": "^2.0.0" - }, - "homepage": "https://github.com/mafintosh/duplexify", - "keywords": [ - "duplex", - "streams2", - "streams", - "stream", - "writable", - "readable", - "async" - ], - "license": "MIT", - "main": "index.js", - "name": "duplexify", - "repository": { - "type": "git", - "url": "git://github.com/mafintosh/duplexify.git" - }, - "scripts": { - "test": "tape test.js" - }, - "version": "3.7.1" -} diff --git a/node_modules/duplexify/test.js b/node_modules/duplexify/test.js deleted file mode 100644 index 0074060d..00000000 --- a/node_modules/duplexify/test.js +++ /dev/null @@ -1,295 +0,0 @@ -var tape = require('tape') -var through = require('through2') -var concat = require('concat-stream') -var net = require('net') -var duplexify = require('./') - -var HELLO_WORLD = (Buffer.from && Buffer.from !== Uint8Array.from) - ? Buffer.from('hello world') - : new Buffer('hello world') - -tape('passthrough', function(t) { - t.plan(2) - - var pt = through() - var dup = duplexify(pt, pt) - - dup.end('hello world') - dup.on('finish', function() { - t.ok(true, 'should finish') - }) - dup.pipe(concat(function(data) { - t.same(data.toString(), 'hello world', 'same in as out') - })) -}) - -tape('passthrough + double end', function(t) { - t.plan(2) - - var pt = through() - var dup = duplexify(pt, pt) - - dup.end('hello world') - dup.end() - - dup.on('finish', function() { - t.ok(true, 'should finish') - }) - dup.pipe(concat(function(data) { - t.same(data.toString(), 'hello world', 'same in as out') - })) -}) - -tape('async passthrough + end', function(t) { - t.plan(2) - - var pt = through.obj({highWaterMark:1}, function(data, enc, cb) { - setTimeout(function() { - cb(null, data) - }, 100) - }) - - var dup = duplexify(pt, pt) - - dup.write('hello ') - dup.write('world') - dup.end() - - dup.on('finish', function() { - t.ok(true, 'should finish') - }) - dup.pipe(concat(function(data) { - t.same(data.toString(), 'hello world', 'same in as out') - })) -}) - -tape('duplex', function(t) { - var readExpected = ['read-a', 'read-b', 'read-c'] - var writeExpected = ['write-a', 'write-b', 'write-c'] - - t.plan(readExpected.length+writeExpected.length+2) - - var readable = through.obj() - var writable = through.obj(function(data, enc, cb) { - t.same(data, writeExpected.shift(), 'onwrite should match') - cb() - }) - - var dup = duplexify.obj(writable, readable) - - readExpected.slice().forEach(function(data) { - readable.write(data) - }) - readable.end() - - writeExpected.slice().forEach(function(data) { - dup.write(data) - }) - dup.end() - - dup.on('data', function(data) { - t.same(data, readExpected.shift(), 'ondata should match') - }) - dup.on('end', function() { - t.ok(true, 'should end') - }) - dup.on('finish', function() { - t.ok(true, 'should finish') - }) -}) - -tape('async', function(t) { - var dup = duplexify() - var pt = through() - - dup.pipe(concat(function(data) { - t.same(data.toString(), 'i was async', 'same in as out') - t.end() - })) - - dup.write('i') - dup.write(' was ') - dup.end('async') - - setTimeout(function() { - dup.setWritable(pt) - setTimeout(function() { - dup.setReadable(pt) - }, 50) - }, 50) -}) - -tape('destroy', function(t) { - t.plan(2) - - var write = through() - var read = through() - var dup = duplexify(write, read) - - write.destroy = function() { - t.ok(true, 'write destroyed') - } - - dup.on('close', function() { - t.ok(true, 'close emitted') - }) - - dup.destroy() - dup.destroy() // should only work once -}) - -tape('destroy both', function(t) { - t.plan(3) - - var write = through() - var read = through() - var dup = duplexify(write, read) - - write.destroy = function() { - t.ok(true, 'write destroyed') - } - - read.destroy = function() { - t.ok(true, 'read destroyed') - } - - dup.on('close', function() { - t.ok(true, 'close emitted') - }) - - dup.destroy() - dup.destroy() // should only work once -}) - -tape('bubble read errors', function(t) { - t.plan(2) - - var write = through() - var read = through() - var dup = duplexify(write, read) - - dup.on('error', function(err) { - t.same(err.message, 'read-error', 'received read error') - }) - dup.on('close', function() { - t.ok(true, 'close emitted') - }) - - read.emit('error', new Error('read-error')) - write.emit('error', new Error('write-error')) // only emit first error -}) - -tape('bubble write errors', function(t) { - t.plan(2) - - var write = through() - var read = through() - var dup = duplexify(write, read) - - dup.on('error', function(err) { - t.same(err.message, 'write-error', 'received write error') - }) - dup.on('close', function() { - t.ok(true, 'close emitted') - }) - - write.emit('error', new Error('write-error')) - read.emit('error', new Error('read-error')) // only emit first error -}) - -tape('reset writable / readable', function(t) { - t.plan(3) - - var toUpperCase = function(data, enc, cb) { - cb(null, data.toString().toUpperCase()) - } - - var passthrough = through() - var upper = through(toUpperCase) - var dup = duplexify(passthrough, passthrough) - - dup.once('data', function(data) { - t.same(data.toString(), 'hello') - dup.setWritable(upper) - dup.setReadable(upper) - dup.once('data', function(data) { - t.same(data.toString(), 'HELLO') - dup.once('data', function(data) { - t.same(data.toString(), 'HI') - t.end() - }) - }) - dup.write('hello') - dup.write('hi') - }) - dup.write('hello') -}) - -tape('cork', function(t) { - var passthrough = through() - var dup = duplexify(passthrough, passthrough) - var ok = false - - dup.on('prefinish', function() { - dup.cork() - setTimeout(function() { - ok = true - dup.uncork() - }, 100) - }) - dup.on('finish', function() { - t.ok(ok) - t.end() - }) - dup.end() -}) - -tape('prefinish not twice', function(t) { - var passthrough = through() - var dup = duplexify(passthrough, passthrough) - var prefinished = false - - dup.on('prefinish', function() { - t.ok(!prefinished, 'only prefinish once') - prefinished = true - }) - - dup.on('finish', function() { - t.end() - }) - - dup.end() -}) - -tape('close', function(t) { - var passthrough = through() - var dup = duplexify(passthrough, passthrough) - - passthrough.emit('close') - dup.on('close', function() { - t.ok(true, 'should forward close') - t.end() - }) -}) - -tape('works with node native streams (net)', function(t) { - t.plan(1) - - var server = net.createServer(function(socket) { - var dup = duplexify(socket, socket) - - dup.once('data', function(chunk) { - t.same(chunk, HELLO_WORLD) - server.close() - socket.end() - t.end() - }) - }) - - server.listen(0, function () { - var socket = net.connect(server.address().port) - var dup = duplexify(socket, socket) - - dup.write(HELLO_WORLD) - }) -}) diff --git a/node_modules/end-of-stream/LICENSE b/node_modules/end-of-stream/LICENSE deleted file mode 100644 index 757562ec..00000000 --- a/node_modules/end-of-stream/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/end-of-stream/README.md b/node_modules/end-of-stream/README.md deleted file mode 100644 index 857b14bd..00000000 --- a/node_modules/end-of-stream/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# end-of-stream - -A node module that calls a callback when a readable/writable/duplex stream has completed or failed. - - npm install end-of-stream - -[![Build status](https://travis-ci.org/mafintosh/end-of-stream.svg?branch=master)](https://travis-ci.org/mafintosh/end-of-stream) - -## Usage - -Simply pass a stream and a callback to the `eos`. -Both legacy streams, streams2 and stream3 are supported. - -``` js -var eos = require('end-of-stream'); - -eos(readableStream, function(err) { - // this will be set to the stream instance - if (err) return console.log('stream had an error or closed early'); - console.log('stream has ended', this === readableStream); -}); - -eos(writableStream, function(err) { - if (err) return console.log('stream had an error or closed early'); - console.log('stream has finished', this === writableStream); -}); - -eos(duplexStream, function(err) { - if (err) return console.log('stream had an error or closed early'); - console.log('stream has ended and finished', this === duplexStream); -}); - -eos(duplexStream, {readable:false}, function(err) { - if (err) return console.log('stream had an error or closed early'); - console.log('stream has finished but might still be readable'); -}); - -eos(duplexStream, {writable:false}, function(err) { - if (err) return console.log('stream had an error or closed early'); - console.log('stream has ended but might still be writable'); -}); - -eos(readableStream, {error:false}, function(err) { - // do not treat emit('error', err) as a end-of-stream -}); -``` - -## License - -MIT - -## Related - -`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/end-of-stream/index.js b/node_modules/end-of-stream/index.js deleted file mode 100644 index c77f0d5d..00000000 --- a/node_modules/end-of-stream/index.js +++ /dev/null @@ -1,94 +0,0 @@ -var once = require('once'); - -var noop = function() {}; - -var isRequest = function(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -}; - -var isChildProcess = function(stream) { - return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 -}; - -var eos = function(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - - callback = once(callback || noop); - - var ws = stream._writableState; - var rs = stream._readableState; - var readable = opts.readable || (opts.readable !== false && stream.readable); - var writable = opts.writable || (opts.writable !== false && stream.writable); - var cancelled = false; - - var onlegacyfinish = function() { - if (!stream.writable) onfinish(); - }; - - var onfinish = function() { - writable = false; - if (!readable) callback.call(stream); - }; - - var onend = function() { - readable = false; - if (!writable) callback.call(stream); - }; - - var onexit = function(exitCode) { - callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); - }; - - var onerror = function(err) { - callback.call(stream, err); - }; - - var onclose = function() { - process.nextTick(onclosenexttick); - }; - - var onclosenexttick = function() { - if (cancelled) return; - if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close')); - if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close')); - }; - - var onrequest = function() { - stream.req.on('finish', onfinish); - }; - - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest(); - else stream.on('request', onrequest); - } else if (writable && !ws) { // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); - } - - if (isChildProcess(stream)) stream.on('exit', onexit); - - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', onerror); - stream.on('close', onclose); - - return function() { - cancelled = true; - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('exit', onexit); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; -}; - -module.exports = eos; diff --git a/node_modules/end-of-stream/package.json b/node_modules/end-of-stream/package.json deleted file mode 100644 index bf35df28..00000000 --- a/node_modules/end-of-stream/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_from": "end-of-stream@^1.1.0", - "_id": "end-of-stream@1.4.4", - "_inBundle": false, - "_integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "_location": "/end-of-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "end-of-stream@^1.1.0", - "name": "end-of-stream", - "escapedName": "end-of-stream", - "rawSpec": "^1.1.0", - "saveSpec": null, - "fetchSpec": "^1.1.0" - }, - "_requiredBy": [ - "/duplexify", - "/pump", - "/pumpify/pump" - ], - "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "_shasum": "5ae64a5f45057baf3626ec14da0ca5e4b2431eb0", - "_spec": "end-of-stream@^1.1.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pump", - "author": { - "name": "Mathias Buus", - "email": "mathiasbuus@gmail.com" - }, - "bugs": { - "url": "https://github.com/mafintosh/end-of-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "once": "^1.4.0" - }, - "deprecated": false, - "description": "Call a callback when a readable/writable/duplex stream has completed or failed.", - "devDependencies": { - "tape": "^4.11.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/mafintosh/end-of-stream", - "keywords": [ - "stream", - "streams", - "callback", - "finish", - "close", - "end", - "wait" - ], - "license": "MIT", - "main": "index.js", - "name": "end-of-stream", - "repository": { - "type": "git", - "url": "git://github.com/mafintosh/end-of-stream.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.4.4" -} diff --git a/node_modules/escape-string-regexp/index.js b/node_modules/escape-string-regexp/index.js deleted file mode 100644 index 7834bf9b..00000000 --- a/node_modules/escape-string-regexp/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; - -module.exports = function (str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - - return str.replace(matchOperatorsRe, '\\$&'); -}; diff --git a/node_modules/escape-string-regexp/license b/node_modules/escape-string-regexp/license deleted file mode 100644 index 654d0bfe..00000000 --- a/node_modules/escape-string-regexp/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/escape-string-regexp/package.json b/node_modules/escape-string-regexp/package.json deleted file mode 100644 index 37acf6a4..00000000 --- a/node_modules/escape-string-regexp/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "escape-string-regexp@^1.0.5", - "_id": "escape-string-regexp@1.0.5", - "_inBundle": false, - "_integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "_location": "/escape-string-regexp", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "escape-string-regexp@^1.0.5", - "name": "escape-string-regexp", - "escapedName": "escape-string-regexp", - "rawSpec": "^1.0.5", - "saveSpec": null, - "fetchSpec": "^1.0.5" - }, - "_requiredBy": [ - "/args/chalk" - ], - "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "_shasum": "1b61c0562190a8dff6ae3bb2cf0200ca130b86d4", - "_spec": "escape-string-regexp@^1.0.5", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/args/node_modules/chalk", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/escape-string-regexp/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Escape RegExp special characters", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=0.8.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/escape-string-regexp#readme", - "keywords": [ - "escape", - "regex", - "regexp", - "re", - "regular", - "expression", - "string", - "str", - "special", - "characters" - ], - "license": "MIT", - "maintainers": [ - { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - { - "name": "Joshua Boy Nicolai Appelman", - "email": "joshua@jbna.nl", - "url": "jbna.nl" - } - ], - "name": "escape-string-regexp", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/escape-string-regexp.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.0.5" -} diff --git a/node_modules/escape-string-regexp/readme.md b/node_modules/escape-string-regexp/readme.md deleted file mode 100644 index 87ac82d5..00000000 --- a/node_modules/escape-string-regexp/readme.md +++ /dev/null @@ -1,27 +0,0 @@ -# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp) - -> Escape RegExp special characters - - -## Install - -``` -$ npm install --save escape-string-regexp -``` - - -## Usage - -```js -const escapeStringRegexp = require('escape-string-regexp'); - -const escapedString = escapeStringRegexp('how much $ for a unicorn?'); -//=> 'how much \$ for a unicorn\?' - -new RegExp(escapedString); -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/exit-on-epipe/LICENSE b/node_modules/exit-on-epipe/LICENSE deleted file mode 100644 index 6d0599c7..00000000 --- a/node_modules/exit-on-epipe/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (C) 2015-present SheetJS - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/exit-on-epipe/README.md b/node_modules/exit-on-epipe/README.md deleted file mode 100644 index b35d720a..00000000 --- a/node_modules/exit-on-epipe/README.md +++ /dev/null @@ -1,104 +0,0 @@ -# exit-on-epipe - -Cleanly exit on pipe errors in NodeJS scripts. - -NOTE: The underlying problem was addressed in 8.x NodeJS versions but the fix -was not backported to 6.x and other versions of NodeJS. - -These errors are common in pipelines that involve NodeJS scripts. For example, -take a simple script that prints out 10 lines: - -```js -for(var i = 0; i < 10; ++i) console.log(i) -``` - -NodeJS will print an error message if the output is truncated: - -```bash -$ cat t.js -for(var i = 0; i < 10; ++i) console.log(i) -$ node --version -v6.11.1 -$ node t.js | head -n 1 -0 -events.js:160 - throw er; // Unhandled 'error' event - ^ - -Error: write EPIPE - at exports._errnoException (util.js:1018:11) - at WriteWrap.afterWrite (net.js:800:14) -``` - -The process will cleanly exit if you require the module: - -```bash -$ cat t.js -require("exit-on-epipe"); -for(var i = 0; i < 10; ++i) console.log(i) -$ node t.js | head -n 1 -0 -``` - -## Installation - -With [npm](https://www.npmjs.org/package/exit-on-epipe): - -```bash -$ npm install exit-on-epipe -``` - -## Usage - -For basic scripts, requiring at the top of the source file suffices: - -```js -require('exit-on-epipe'); -// ... rest of source -``` - -For more advanced situations (e.g. handing other streams), call the module: - -```js -var eoepipe = require('exit-on-epipe'); -eoepipe(stream); // will exit process on an EPIPE error on stream -eoepipe(stream, handler); // will call handler() instead of process.exit -``` - -## Interface - -The module exports a single function (exposed as the variable `eoepipe`). - -`eoepipe(stream, bail)` will attach an error handler to `stream` which will: - -- call the `bail` function if the error `.code` is `"EPIPE"` or `.errno` is `32` -- defer to the default behavior if there are no other error handlers -- noop if the error is not `EPIPE` and if there are other error handlers - -If the `bail` function is not specified, `process.exit` is used. - -If the `stream` parameter is not specified, no action will be taken - -## Notes - -The script will not perform any action if `process` or `process.stdout` are not -available. It is safe to use in a web page. - -## License - -Please consult the attached LICENSE file for details. All rights not explicitly -granted by the Apache 2.0 license are reserved by the Original Author. - -## Badges - -[![Build Status](https://travis-ci.org/SheetJS/node-exit-on-epipe.svg?branch=master)](https://travis-ci.org/SheetJS/node-exit-on-epipe) - -[![npm license](https://img.shields.io/npm/l/exit-on-epipe.svg)](https://npmjs.org/package/exit-on-epipe) - -[![NPM Downloads](https://img.shields.io/npm/dt/exit-on-epipe.svg)](https://npmjs.org/package/exit-on-epipe) - -[![Dependencies Status](https://david-dm.org/sheetjs/node-exit-on-epipe/status.svg)](https://david-dm.org/sheetjs/node-exit-on-epipe) - -[![ghit.me](https://ghit.me/badge.svg?repo=sheetjs/node-exit-on-epipe)](https://ghit.me/repo/sheetjs/node-exit-on-epipe) - -[![Analytics](https://ga-beacon.appspot.com/UA-36810333-1/SheetJS/node-exit-on-epipe?pixel)](https://github.com/SheetJS/node-exit-on-epipe) diff --git a/node_modules/exit-on-epipe/exit-on-epipe.js b/node_modules/exit-on-epipe/exit-on-epipe.js deleted file mode 100644 index a59003ba..00000000 --- a/node_modules/exit-on-epipe/exit-on-epipe.js +++ /dev/null @@ -1,20 +0,0 @@ -/* exit-on-epipe.js (C) 2015-present SheetJS -- http://sheetjs.com */ -/* vim: set ts=2: */ -/*jshint eqnull:true, node:true */ -var eoepipe = function eoepipeit(S/*:events$EventEmitter*/, bail/*:?()=>any*/) { - if(!S || !S.on) return; - if(!bail && typeof process !== 'undefined') bail = process.exit; - var eoe = function eoeit(err/*:ErrnoError*/) { - if(err.code === 'EPIPE' || err.errno === /*EPIPE*/32) { if(bail) bail(); else return; } - var cnt = S.listenerCount ? S.listenerCount('error') : S.listeners('error').length; - if(cnt == 1) { - S.removeListener('error', eoe); - S.emit('error', err); - S.on('error', eoe); - } - }; - S.on('error', eoe); -}; - -if(typeof module !== 'undefined') module.exports = eoepipe; -if(typeof process !== 'undefined') eoepipe(process.stdout); diff --git a/node_modules/exit-on-epipe/package.json b/node_modules/exit-on-epipe/package.json deleted file mode 100644 index db964783..00000000 --- a/node_modules/exit-on-epipe/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "exit-on-epipe@~1.0.1", - "_id": "exit-on-epipe@1.0.1", - "_inBundle": false, - "_integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==", - "_location": "/exit-on-epipe", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "exit-on-epipe@~1.0.1", - "name": "exit-on-epipe", - "escapedName": "exit-on-epipe", - "rawSpec": "~1.0.1", - "saveSpec": null, - "fetchSpec": "~1.0.1" - }, - "_requiredBy": [ - "/crc-32" - ], - "_resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz", - "_shasum": "0bdd92e87d5285d267daa8171d0eb06159689692", - "_spec": "exit-on-epipe@~1.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/crc-32", - "author": { - "name": "sheetjs" - }, - "bugs": { - "url": "https://github.com/SheetJS/node-exit-on-epipe/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Cleanly exit process on EPIPE", - "devDependencies": { - "mocha": "~2.5.3" - }, - "engines": { - "node": ">=0.8" - }, - "files": [ - "exit-on-epipe.js", - "LICENSE", - "README.md" - ], - "homepage": "https://github.com/SheetJS/node-exit-on-epipe#readme", - "keywords": [ - "epipe", - "pipe", - "error", - "exit" - ], - "license": "Apache-2.0", - "main": "./exit-on-epipe", - "name": "exit-on-epipe", - "repository": { - "type": "git", - "url": "git://github.com/SheetJS/node-exit-on-epipe.git" - }, - "scripts": { - "test": "make test" - }, - "version": "1.0.1" -} diff --git a/node_modules/extend/.editorconfig b/node_modules/extend/.editorconfig deleted file mode 100644 index bc228f82..00000000 --- a/node_modules/extend/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -root = true - -[*] -indent_style = tab -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 150 - -[CHANGELOG.md] -indent_style = space -indent_size = 2 - -[*.json] -max_line_length = off - -[Makefile] -max_line_length = off diff --git a/node_modules/extend/.eslintrc b/node_modules/extend/.eslintrc deleted file mode 100644 index a34cf283..00000000 --- a/node_modules/extend/.eslintrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "complexity": [2, 20], - "eqeqeq": [2, "allow-null"], - "func-name-matching": [1], - "max-depth": [1, 4], - "max-statements": [2, 26], - "no-extra-parens": [1], - "no-magic-numbers": [0], - "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"], - "sort-keys": [0], - } -} diff --git a/node_modules/extend/.jscs.json b/node_modules/extend/.jscs.json deleted file mode 100644 index 3cce01d7..00000000 --- a/node_modules/extend/.jscs.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "es3": true, - - "additionalRules": [], - - "requireSemicolons": true, - - "disallowMultipleSpaces": true, - - "disallowIdentifierNames": [], - - "requireCurlyBraces": { - "allExcept": [], - "keywords": ["if", "else", "for", "while", "do", "try", "catch"] - }, - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "disallowSpaceBeforeComma": true, - "disallowSpaceAfterComma": false, - "disallowSpaceBeforeSemicolon": true, - - "disallowNodeTypes": [ - "DebuggerStatement", - "LabeledStatement", - "SwitchCase", - "SwitchStatement", - "WithStatement" - ], - - "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "requireSpaceBetweenArguments": true, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "disallowTrailingComma": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "requireDotNotation": { "allExcept": ["keywords"] }, - - "requireParenthesesAroundIIFE": true, - - "validateLineBreaks": "LF", - - "validateQuoteMarks": { - "escape": true, - "mark": "'" - }, - - "disallowOperatorBeforeLineBreak": [], - - "requireSpaceBeforeKeywords": [ - "do", - "for", - "if", - "else", - "switch", - "case", - "try", - "catch", - "finally", - "while", - "with", - "return" - ], - - "validateAlignedFunctionParameters": { - "lineBreakAfterOpeningBraces": true, - "lineBreakBeforeClosingBraces": true - }, - - "requirePaddingNewLinesBeforeExport": true, - - "validateNewlineAfterArrayElements": { - "maximum": 6 - }, - - "requirePaddingNewLinesAfterUseStrict": true, - - "disallowArrowFunctions": true, - - "disallowMultiLineTernary": true, - - "validateOrderInObjectKeys": false, - - "disallowIdenticalDestructuringNames": true, - - "disallowNestedTernaries": { "maxLevel": 1 }, - - "requireSpaceAfterComma": { "allExcept": ["trailing"] }, - "requireAlignedMultilineParams": false, - - "requireSpacesInGenerator": { - "afterStar": true - }, - - "disallowSpacesInGenerator": { - "beforeStar": true - }, - - "disallowVar": false, - - "requireArrayDestructuring": false, - - "requireEnhancedObjectLiterals": false, - - "requireObjectDestructuring": false, - - "requireEarlyReturn": false, - - "requireCapitalizedConstructorsNew": { - "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] - }, - - "requireImportAlphabetized": false, - - "requireSpaceBeforeObjectValues": true, - "requireSpaceBeforeDestructuredValues": true, - - "disallowSpacesInsideTemplateStringPlaceholders": true, - - "disallowArrayDestructuringReturn": false, - - "requireNewlineBeforeSingleStatementsInIf": false, - - "disallowUnusedVariables": true, - - "requireSpacesInsideImportedObjectBraces": true, - - "requireUseStrict": true -} - diff --git a/node_modules/extend/.travis.yml b/node_modules/extend/.travis.yml deleted file mode 100644 index 5ccdfc49..00000000 --- a/node_modules/extend/.travis.yml +++ /dev/null @@ -1,230 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "10.7" - - "9.11" - - "8.11" - - "7.10" - - "6.14" - - "5.12" - - "4.9" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.10" - - "0.8" -before_install: - - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' - - 'nvm install-latest-npm' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "lts/*" - env: PRETEST=true - - node_js: "lts/*" - env: POSTTEST=true - - node_js: "4" - env: COVERAGE=true - - node_js: "10.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true diff --git a/node_modules/extend/CHANGELOG.md b/node_modules/extend/CHANGELOG.md deleted file mode 100644 index 2cf7de6f..00000000 --- a/node_modules/extend/CHANGELOG.md +++ /dev/null @@ -1,83 +0,0 @@ -3.0.2 / 2018-07-19 -================== - * [Fix] Prevent merging `__proto__` property (#48) - * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` - * [Tests] up to `node` `v10.7`, `v9.11`, `v8.11`, `v7.10`, `v6.14`, `v4.9`; use `nvm install-latest-npm` - -3.0.1 / 2017-04-27 -================== - * [Fix] deep extending should work with a non-object (#46) - * [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config` - * [Tests] up to `node` `v7.9`, `v6.10`, `v4.8`; improve matrix - * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. - * [Docs] Add example to readme (#34) - -3.0.0 / 2015-07-01 -================== - * [Possible breaking change] Use global "strict" directive (#32) - * [Tests] `int` is an ES3 reserved word - * [Tests] Test up to `io.js` `v2.3` - * [Tests] Add `npm run eslint` - * [Dev Deps] Update `covert`, `jscs` - -2.0.1 / 2015-04-25 -================== - * Use an inline `isArray` check, for ES3 browsers. (#27) - * Some old browsers fail when an identifier is `toString` - * Test latest `node` and `io.js` versions on `travis-ci`; speed up builds - * Add license info to package.json (#25) - * Update `tape`, `jscs` - * Adding a CHANGELOG - -2.0.0 / 2014-10-01 -================== - * Increase code coverage to 100%; run code coverage as part of tests - * Add `npm run lint`; Run linter as part of tests - * Remove nodeType and setInterval checks in isPlainObject - * Updating `tape`, `jscs`, `covert` - * General style and README cleanup - -1.3.0 / 2014-06-20 -================== - * Add component.json for browser support (#18) - * Use SVG for badges in README (#16) - * Updating `tape`, `covert` - * Updating travis-ci to work with multiple node versions - * Fix `deep === false` bug (returning target as {}) (#14) - * Fixing constructor checks in isPlainObject - * Adding additional test coverage - * Adding `npm run coverage` - * Add LICENSE (#13) - * Adding a warning about `false`, per #11 - * General style and whitespace cleanup - -1.2.1 / 2013-09-14 -================== - * Fixing hasOwnProperty bugs that would only have shown up in specific browsers. Fixes #8 - * Updating `tape` - -1.2.0 / 2013-09-02 -================== - * Updating the README: add badges - * Adding a missing variable reference. - * Using `tape` instead of `buster` for tests; add more tests (#7) - * Adding node 0.10 to Travis CI (#6) - * Enabling "npm test" and cleaning up package.json (#5) - * Add Travis CI. - -1.1.3 / 2012-12-06 -================== - * Added unit tests. - * Ensure extend function is named. (Looks nicer in a stack trace.) - * README cleanup. - -1.1.1 / 2012-11-07 -================== - * README cleanup. - * Added installation instructions. - * Added a missing semicolon - -1.0.0 / 2012-04-08 -================== - * Initial commit - diff --git a/node_modules/extend/LICENSE b/node_modules/extend/LICENSE deleted file mode 100644 index e16d6a56..00000000 --- a/node_modules/extend/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Stefan Thomas - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/extend/README.md b/node_modules/extend/README.md deleted file mode 100644 index 5b8249aa..00000000 --- a/node_modules/extend/README.md +++ /dev/null @@ -1,81 +0,0 @@ -[![Build Status][travis-svg]][travis-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] - -# extend() for Node.js <sup>[![Version Badge][npm-version-png]][npm-url]</sup> - -`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true. - -Notes: - -* Since Node.js >= 4, - [`Object.assign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) - now offers the same functionality natively (but without the "deep copy" option). - See [ECMAScript 2015 (ES6) in Node.js](https://nodejs.org/en/docs/es6). -* Some native implementations of `Object.assign` in both Node.js and many - browsers (since NPM modules are for the browser too) may not be fully - spec-compliant. - Check [`object.assign`](https://www.npmjs.com/package/object.assign) module for - a compliant candidate. - -## Installation - -This package is available on [npm][npm-url] as: `extend` - -``` sh -npm install extend -``` - -## Usage - -**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)** - -*Extend one object with one or more others, returning the modified object.* - -**Example:** - -``` js -var extend = require('extend'); -extend(targetObject, object1, object2); -``` - -Keep in mind that the target object will be modified, and will be returned from extend(). - -If a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s). -Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over. -Warning: passing `false` as the first argument is not supported. - -### Arguments - -* `deep` *Boolean* (optional) -If set, the merge becomes recursive (i.e. deep copy). -* `target` *Object* -The object to extend. -* `object1` *Object* -The object that will be merged into the first. -* `objectN` *Object* (Optional) -More objects to merge into the first. - -## License - -`node-extend` is licensed under the [MIT License][mit-license-url]. - -## Acknowledgements - -All credit to the jQuery authors for perfecting this amazing utility. - -Ported to Node.js by [Stefan Thomas][github-justmoon] with contributions by [Jonathan Buchanan][github-insin] and [Jordan Harband][github-ljharb]. - -[travis-svg]: https://travis-ci.org/justmoon/node-extend.svg -[travis-url]: https://travis-ci.org/justmoon/node-extend -[npm-url]: https://npmjs.org/package/extend -[mit-license-url]: http://opensource.org/licenses/MIT -[github-justmoon]: https://github.com/justmoon -[github-insin]: https://github.com/insin -[github-ljharb]: https://github.com/ljharb -[npm-version-png]: http://versionbadg.es/justmoon/node-extend.svg -[deps-svg]: https://david-dm.org/justmoon/node-extend.svg -[deps-url]: https://david-dm.org/justmoon/node-extend -[dev-deps-svg]: https://david-dm.org/justmoon/node-extend/dev-status.svg -[dev-deps-url]: https://david-dm.org/justmoon/node-extend#info=devDependencies - diff --git a/node_modules/extend/component.json b/node_modules/extend/component.json deleted file mode 100644 index 1500a2f3..00000000 --- a/node_modules/extend/component.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "extend", - "author": "Stefan Thomas <justmoon@members.fsf.org> (http://www.justmoon.net)", - "version": "3.0.0", - "description": "Port of jQuery.extend for node.js and the browser.", - "scripts": [ - "index.js" - ], - "contributors": [ - { - "name": "Jordan Harband", - "url": "https://github.com/ljharb" - } - ], - "keywords": [ - "extend", - "clone", - "merge" - ], - "repository" : { - "type": "git", - "url": "https://github.com/justmoon/node-extend.git" - }, - "dependencies": { - }, - "devDependencies": { - "tape" : "~3.0.0", - "covert": "~0.4.0", - "jscs": "~1.6.2" - } -} - diff --git a/node_modules/extend/index.js b/node_modules/extend/index.js deleted file mode 100644 index 2aa3faae..00000000 --- a/node_modules/extend/index.js +++ /dev/null @@ -1,117 +0,0 @@ -'use strict'; - -var hasOwn = Object.prototype.hasOwnProperty; -var toStr = Object.prototype.toString; -var defineProperty = Object.defineProperty; -var gOPD = Object.getOwnPropertyDescriptor; - -var isArray = function isArray(arr) { - if (typeof Array.isArray === 'function') { - return Array.isArray(arr); - } - - return toStr.call(arr) === '[object Array]'; -}; - -var isPlainObject = function isPlainObject(obj) { - if (!obj || toStr.call(obj) !== '[object Object]') { - return false; - } - - var hasOwnConstructor = hasOwn.call(obj, 'constructor'); - var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf'); - // Not own constructor property must be Object - if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) { - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - var key; - for (key in obj) { /**/ } - - return typeof key === 'undefined' || hasOwn.call(obj, key); -}; - -// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target -var setProperty = function setProperty(target, options) { - if (defineProperty && options.name === '__proto__') { - defineProperty(target, options.name, { - enumerable: true, - configurable: true, - value: options.newValue, - writable: true - }); - } else { - target[options.name] = options.newValue; - } -}; - -// Return undefined instead of __proto__ if '__proto__' is not an own property -var getProperty = function getProperty(obj, name) { - if (name === '__proto__') { - if (!hasOwn.call(obj, name)) { - return void 0; - } else if (gOPD) { - // In early versions of node, obj['__proto__'] is buggy when obj has - // __proto__ as an own property. Object.getOwnPropertyDescriptor() works. - return gOPD(obj, name).value; - } - } - - return obj[name]; -}; - -module.exports = function extend() { - var options, name, src, copy, copyIsArray, clone; - var target = arguments[0]; - var i = 1; - var length = arguments.length; - var deep = false; - - // Handle a deep copy situation - if (typeof target === 'boolean') { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - if (target == null || (typeof target !== 'object' && typeof target !== 'function')) { - target = {}; - } - - for (; i < length; ++i) { - options = arguments[i]; - // Only deal with non-null/undefined values - if (options != null) { - // Extend the base object - for (name in options) { - src = getProperty(target, name); - copy = getProperty(options, name); - - // Prevent never-ending loop - if (target !== copy) { - // Recurse if we're merging plain objects or arrays - if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) { - if (copyIsArray) { - copyIsArray = false; - clone = src && isArray(src) ? src : []; - } else { - clone = src && isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - setProperty(target, { name: name, newValue: extend(deep, clone, copy) }); - - // Don't bring in undefined values - } else if (typeof copy !== 'undefined') { - setProperty(target, { name: name, newValue: copy }); - } - } - } - } - } - - // Return the modified object - return target; -}; diff --git a/node_modules/extend/package.json b/node_modules/extend/package.json deleted file mode 100644 index 87bad253..00000000 --- a/node_modules/extend/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_from": "extend@^3.0.0", - "_id": "extend@3.0.2", - "_inBundle": false, - "_integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "_location": "/extend", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "extend@^3.0.0", - "name": "extend", - "escapedName": "extend", - "rawSpec": "^3.0.0", - "saveSpec": null, - "fetchSpec": "^3.0.0" - }, - "_requiredBy": [ - "/glob-stream" - ], - "_resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "_shasum": "f8b1136b4071fbd8eb140aff858b1019ec2915fa", - "_spec": "extend@^3.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/glob-stream", - "author": { - "name": "Stefan Thomas", - "email": "justmoon@members.fsf.org", - "url": "http://www.justmoon.net" - }, - "bugs": { - "url": "https://github.com/justmoon/node-extend/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jordan Harband", - "url": "https://github.com/ljharb" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "Port of jQuery.extend for node.js and the browser", - "devDependencies": { - "@ljharb/eslint-config": "^12.2.1", - "covert": "^1.1.0", - "eslint": "^4.19.1", - "jscs": "^3.0.7", - "tape": "^4.9.1" - }, - "homepage": "https://github.com/justmoon/node-extend#readme", - "keywords": [ - "extend", - "clone", - "merge" - ], - "license": "MIT", - "main": "index", - "name": "extend", - "repository": { - "type": "git", - "url": "git+https://github.com/justmoon/node-extend.git" - }, - "scripts": { - "coverage": "covert test/index.js", - "coverage-quiet": "covert test/index.js --quiet", - "eslint": "eslint *.js */*.js", - "jscs": "jscs *.js */*.js", - "lint": "npm run jscs && npm run eslint", - "posttest": "npm run coverage-quiet", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "node test" - }, - "version": "3.0.2" -} diff --git a/node_modules/fast-redact/.travis.yml b/node_modules/fast-redact/.travis.yml deleted file mode 100644 index bfbc6212..00000000 --- a/node_modules/fast-redact/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -sudo: false -node_js: - - 6 - - 8 - - 10 - - 12 - - 13 - - 14 -script: - - npm run ci diff --git a/node_modules/fast-redact/LICENSE b/node_modules/fast-redact/LICENSE deleted file mode 100644 index e1c643e3..00000000 --- a/node_modules/fast-redact/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2019-2020 David Mark Clements - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/node_modules/fast-redact/benchmark/index.js b/node_modules/fast-redact/benchmark/index.js deleted file mode 100644 index b599492b..00000000 --- a/node_modules/fast-redact/benchmark/index.js +++ /dev/null @@ -1,207 +0,0 @@ -'use strict' -const bench = require('fastbench') -const fastRedact = require('..') - -const censorFn = (v) => v + '.' -const censorFnWithPath = (v, p) => v + '.' + p - -const noir = require('pino-noir')(['aa.b.c']) -const redactNoSerialize = fastRedact({ paths: ['ab.b.c'], serialize: false }) -const redactNoSerializeRestore = fastRedact({ paths: ['ac.b.c'], serialize: false }) -const noirWild = require('pino-noir')(['ad.b.*']) -const redactWildNoSerialize = fastRedact({ paths: ['ae.b.*'], serialize: false }) -const redactWildNoSerializeRestore = fastRedact({ paths: ['af.b.*'], serialize: false }) -const redactIntermediateWildNoSerialize = fastRedact({ paths: ['ag.*.c'], serialize: false }) -const redactIntermediateWildNoSerializeRestore = fastRedact({ paths: ['ah.*.c'], serialize: false }) -const noirJSONSerialize = require('pino-noir')(['aj.b.c']) // `ai` used in pure JSON test. -const redact = fastRedact({ paths: ['ak.b.c'] }) -const noirWildJSONSerialize = require('pino-noir')(['al.b.c']) -const redactWild = fastRedact({ paths: ['am.b.*'] }) -const redactIntermediateWild = fastRedact({ paths: ['an.*.c'] }) -const redactIntermediateWildMatchWildOutcome = fastRedact({ paths: ['ao.*.c', 'ao.*.b', 'ao.*.a'] }) -const redactStaticMatchWildOutcome = fastRedact({ paths: ['ap.b.c', 'ap.d.a', 'ap.d.b', 'ap.d.c'] }) -const noirCensorFunction = require('pino-noir')(['aq.b.*'], censorFn) -const redactCensorFunction = fastRedact({ paths: ['ar.b.*'], censor: censorFn, serialize: false }) -const redactIntermediateWildCensorFunction = fastRedact({ paths: ['as.*.c'], censor: censorFn, serialize: false }) -const redactCensorFunctionWithPath = fastRedact({ paths: ['at.d.b'], censor: censorFn, serialize: false }) -const redactWildCensorFunctionWithPath = fastRedact({ paths: ['au.d.*'], censor: censorFnWithPath, serialize: false }) -const redactIntermediateWildCensorFunctionWithPath = fastRedact({ paths: ['av.*.c'], censorFnWithPath, serialize: false }) - -const getObj = (outerKey) => ({ - [outerKey]: { - b: { - c: 's' - }, - d: { - a: 's', - b: 's', - c: 's' - } - } -}) - -const max = 500 - -var run = bench([ - function benchNoirV2 (cb) { - const obj = getObj('aa') - for (var i = 0; i < max; i++) { - noir.aa(obj.aa) - } - setImmediate(cb) - }, - function benchFastRedact (cb) { - const obj = getObj('ab') - for (var i = 0; i < max; i++) { - redactNoSerialize(obj) - } - setImmediate(cb) - }, - function benchFastRedactRestore (cb) { - const obj = getObj('ac') - for (var i = 0; i < max; i++) { - redactNoSerializeRestore(obj) - redactNoSerializeRestore.restore(obj) - } - setImmediate(cb) - }, - function benchNoirV2Wild (cb) { - const obj = getObj('ad') - for (var i = 0; i < max; i++) { - noirWild.ad(obj.ad) - } - setImmediate(cb) - }, - function benchFastRedactWild (cb) { - const obj = getObj('ae') - for (var i = 0; i < max; i++) { - redactWildNoSerialize(obj) - } - setImmediate(cb) - }, - function benchFastRedactWildRestore (cb) { - const obj = getObj('af') - for (var i = 0; i < max; i++) { - redactWildNoSerializeRestore(obj) - redactWildNoSerializeRestore.restore(obj) - } - setImmediate(cb) - }, - function benchFastRedactIntermediateWild (cb) { - const obj = getObj('ag') - for (var i = 0; i < max; i++) { - redactIntermediateWildNoSerialize(obj) - } - setImmediate(cb) - }, - function benchFastRedactIntermediateWildRestore (cb) { - const obj = getObj('ah') - for (var i = 0; i < max; i++) { - redactIntermediateWildNoSerializeRestore(obj) - redactIntermediateWildNoSerializeRestore.restore(obj) - } - setImmediate(cb) - }, - function benchJSONStringify (cb) { - const obj = getObj('ai') - for (var i = 0; i < max; i++) { - JSON.stringify(obj) - } - setImmediate(cb) - }, - function benchNoirV2Serialize (cb) { - const obj = getObj('aj') - for (var i = 0; i < max; i++) { - noirJSONSerialize.aj(obj.aj) - JSON.stringify(obj) - } - setImmediate(cb) - }, - function benchFastRedactSerialize (cb) { - const obj = getObj('ak') - for (var i = 0; i < max; i++) { - redact(obj) - } - setImmediate(cb) - }, - function benchNoirV2WildSerialize (cb) { - const obj = getObj('al') - for (var i = 0; i < max; i++) { - noirWildJSONSerialize.al(obj.al) - JSON.stringify(obj) - } - setImmediate(cb) - }, - function benchFastRedactWildSerialize (cb) { - const obj = getObj('am') - for (var i = 0; i < max; i++) { - redactWild(obj) - } - setImmediate(cb) - }, - function benchFastRedactIntermediateWildSerialize (cb) { - const obj = getObj('an') - for (var i = 0; i < max; i++) { - redactIntermediateWild(obj) - } - setImmediate(cb) - }, - function benchFastRedactIntermediateWildMatchWildOutcomeSerialize (cb) { - const obj = getObj('ao') - for (var i = 0; i < max; i++) { - redactIntermediateWildMatchWildOutcome(obj) - } - setImmediate(cb) - }, - function benchFastRedactStaticMatchWildOutcomeSerialize (cb) { - const obj = getObj('ap') - for (var i = 0; i < max; i++) { - redactStaticMatchWildOutcome(obj) - } - setImmediate(cb) - }, - function benchNoirV2CensorFunction (cb) { - const obj = getObj('aq') - for (var i = 0; i < max; i++) { - noirCensorFunction.aq(obj.aq) - } - setImmediate(cb) - }, - function benchFastRedactCensorFunction (cb) { - const obj = getObj('ar') - for (var i = 0; i < max; i++) { - redactCensorFunction(obj) - } - setImmediate(cb) - }, - function benchFastRedactCensorFunctionIntermediateWild (cb) { - const obj = getObj('as') - for (var i = 0; i < max; i++) { - redactIntermediateWildCensorFunction(obj) - } - setImmediate(cb) - }, - function benchFastRedactCensorFunctionWithPath (cb) { - const obj = getObj('at') - for (var i = 0; i < max; i++) { - redactCensorFunctionWithPath(obj) - } - setImmediate(cb) - }, - function benchFastRedactWildCensorFunctionWithPath (cb) { - const obj = getObj('au') - for (var i = 0; i < max; i++) { - redactWildCensorFunctionWithPath(obj) - } - setImmediate(cb) - }, - function benchFastRedactIntermediateWildCensorFunctionWithPath (cb) { - const obj = getObj('av') - for (var i = 0; i < max; i++) { - redactIntermediateWildCensorFunctionWithPath(obj) - } - setImmediate(cb) - } -], 500) - -run(run) diff --git a/node_modules/fast-redact/example/default-usage.js b/node_modules/fast-redact/example/default-usage.js deleted file mode 100644 index d74cfaf4..00000000 --- a/node_modules/fast-redact/example/default-usage.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict' -const fastRedact = require('..') -const fauxRequest = { - headers: { - host: 'http://example.com', - cookie: `oh oh we don't want this exposed in logs in etc.`, - referer: `if we're cool maybe we'll even redact this` - } -} -const redact = fastRedact({ - paths: ['headers.cookie', 'headers.referer'] -}) - -console.log(redact(fauxRequest)) diff --git a/node_modules/fast-redact/example/intermediate-wildcard-array.js b/node_modules/fast-redact/example/intermediate-wildcard-array.js deleted file mode 100644 index 2b4e1f83..00000000 --- a/node_modules/fast-redact/example/intermediate-wildcard-array.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' -const fastRedact = require('..') -const redact = fastRedact({ paths: ['a[*].c.d'] }) -const obj = { - a: [ - { c: { d: 'hide me', e: 'leave me be' } }, - { c: { d: 'and me', f: 'I want to live' } }, - { c: { d: 'and also I', g: 'I want to run in a stream' } } - ] -} -console.log(redact(obj)) diff --git a/node_modules/fast-redact/example/serialize-false.js b/node_modules/fast-redact/example/serialize-false.js deleted file mode 100644 index 80d0a9a4..00000000 --- a/node_modules/fast-redact/example/serialize-false.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' -const fastRedact = require('..') -const redact = fastRedact({ - paths: ['a'], - serialize: false -}) -const o = { a: 1, b: 2 } -console.log(redact(o) === o) -console.log(o) -console.log(redact.restore(o) === o) -console.log(o) diff --git a/node_modules/fast-redact/example/serialize-function.js b/node_modules/fast-redact/example/serialize-function.js deleted file mode 100644 index 2fc9fbd2..00000000 --- a/node_modules/fast-redact/example/serialize-function.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict' -const fastRedact = require('..') -const redact = fastRedact({ paths: ['a'], serialize: (o) => JSON.stringify(o, 0, 2) }) -console.log(redact({ a: 1, b: 2 })) diff --git a/node_modules/fast-redact/example/top-wildcard-object.js b/node_modules/fast-redact/example/top-wildcard-object.js deleted file mode 100644 index 2c918953..00000000 --- a/node_modules/fast-redact/example/top-wildcard-object.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict' -const fastRedact = require('..') -const redact = fastRedact({ paths: ['*.c.d'] }) -const obj = { - x: { c: { d: 'hide me', e: 'leave me be' } }, - y: { c: { d: 'and me', f: 'I want to live' } }, - z: { c: { d: 'and also I', g: 'I want to run in a stream' } } -} -console.log(redact(obj)) diff --git a/node_modules/fast-redact/index.js b/node_modules/fast-redact/index.js deleted file mode 100644 index 9a13ac27..00000000 --- a/node_modules/fast-redact/index.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict' - -const validator = require('./lib/validator') -const parse = require('./lib/parse') -const redactor = require('./lib/redactor') -const restorer = require('./lib/restorer') -const { groupRedact, nestedRedact } = require('./lib/modifiers') -const state = require('./lib/state') -const rx = require('./lib/rx') -const validate = validator() -const noop = (o) => o -noop.restore = noop - -const DEFAULT_CENSOR = '[REDACTED]' -fastRedact.rx = rx -fastRedact.validator = validator - -module.exports = fastRedact - -function fastRedact (opts = {}) { - const paths = Array.from(new Set(opts.paths || [])) - const serialize = 'serialize' in opts ? ( - opts.serialize === false ? opts.serialize - : (typeof opts.serialize === 'function' ? opts.serialize : JSON.stringify) - ) : JSON.stringify - const remove = opts.remove - if (remove === true && serialize !== JSON.stringify) { - throw Error('fast-redact – remove option may only be set when serializer is JSON.stringify') - } - const censor = remove === true - ? undefined - : 'censor' in opts ? opts.censor : DEFAULT_CENSOR - - const isCensorFct = typeof censor === 'function' - const censorFctTakesPath = isCensorFct && censor.length > 1 - - if (paths.length === 0) return serialize || noop - - validate({ paths, serialize, censor }) - - const { wildcards, wcLen, secret } = parse({ paths, censor }) - - const compileRestore = restorer({ secret, wcLen }) - const strict = 'strict' in opts ? opts.strict : true - - return redactor({ secret, wcLen, serialize, strict, isCensorFct, censorFctTakesPath }, state({ - secret, - censor, - compileRestore, - serialize, - groupRedact, - nestedRedact, - wildcards, - wcLen - })) -} diff --git a/node_modules/fast-redact/lib/modifiers.js b/node_modules/fast-redact/lib/modifiers.js deleted file mode 100644 index 42c16f7a..00000000 --- a/node_modules/fast-redact/lib/modifiers.js +++ /dev/null @@ -1,113 +0,0 @@ -'use strict' - -module.exports = { - groupRedact, - groupRestore, - nestedRedact, - nestedRestore -} - -function groupRestore ({ keys, values, target }) { - if (target == null) return - const length = keys.length - for (var i = 0; i < length; i++) { - const k = keys[i] - target[k] = values[i] - } -} - -function groupRedact (o, path, censor, isCensorFct, censorFctTakesPath) { - const target = get(o, path) - if (target == null) return { keys: null, values: null, target: null, flat: true } - const keys = Object.keys(target) - const keysLength = keys.length - const pathLength = path.length - const pathWithKey = censorFctTakesPath ? [...path] : undefined - const values = new Array(keysLength) - - for (var i = 0; i < keysLength; i++) { - const key = keys[i] - values[i] = target[key] - - if (censorFctTakesPath) { - pathWithKey[pathLength] = key - target[key] = censor(target[key], pathWithKey) - } else if (isCensorFct) { - target[key] = censor(target[key]) - } else { - target[key] = censor - } - } - return { keys, values, target, flat: true } -} - -function nestedRestore (arr) { - const length = arr.length - for (var i = 0; i < length; i++) { - const { key, target, value } = arr[i] - target[key] = value - } -} - -function nestedRedact (store, o, path, ns, censor, isCensorFct, censorFctTakesPath) { - const target = get(o, path) - if (target == null) return - const keys = Object.keys(target) - const keysLength = keys.length - for (var i = 0; i < keysLength; i++) { - const key = keys[i] - const { value, parent, exists } = - specialSet(target, key, path, ns, censor, isCensorFct, censorFctTakesPath) - - if (exists === true && parent !== null) { - store.push({ key: ns[ns.length - 1], target: parent, value }) - } - } - return store -} - -function has (obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop) -} - -function specialSet (o, k, path, afterPath, censor, isCensorFct, censorFctTakesPath) { - const afterPathLen = afterPath.length - const lastPathIndex = afterPathLen - 1 - const originalKey = k - var i = -1 - var n - var nv - var ov - var oov = null - var exists = true - ov = n = o[k] - if (typeof n !== 'object') return { value: null, parent: null, exists } - while (n != null && ++i < afterPathLen) { - k = afterPath[i] - oov = ov - if (!(k in n)) { - exists = false - break - } - ov = n[k] - nv = (i !== lastPathIndex) - ? ov - : (isCensorFct - ? (censorFctTakesPath ? censor(ov, [...path, originalKey, ...afterPath]) : censor(ov)) - : censor) - n[k] = (has(n, k) && nv === ov) || (nv === undefined && censor !== undefined) ? n[k] : nv - n = n[k] - if (typeof n !== 'object') break - } - return { value: ov, parent: oov, exists } -} - -function get (o, p) { - var i = -1 - var l = p.length - var n = o - while (n != null && ++i < l) { - n = n[p[i]] - } - return n -} diff --git a/node_modules/fast-redact/lib/parse.js b/node_modules/fast-redact/lib/parse.js deleted file mode 100644 index ccbd980a..00000000 --- a/node_modules/fast-redact/lib/parse.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict' - -const rx = require('./rx') - -module.exports = parse - -function parse ({ paths }) { - const wildcards = [] - var wcLen = 0 - const secret = paths.reduce(function (o, strPath, ix) { - var path = strPath.match(rx).map((p) => p.replace(/'|"|`/g, '')) - const leadingBracket = strPath[0] === '[' - path = path.map((p) => { - if (p[0] === '[') return p.substr(1, p.length - 2) - else return p - }) - const star = path.indexOf('*') - if (star > -1) { - const before = path.slice(0, star) - const beforeStr = before.join('.') - const after = path.slice(star + 1, path.length) - if (after.indexOf('*') > -1) throw Error('fast-redact – Only one wildcard per path is supported') - const nested = after.length > 0 - wcLen++ - wildcards.push({ - before, - beforeStr, - after, - nested - }) - } else { - o[strPath] = { - path: path, - val: undefined, - precensored: false, - circle: '', - escPath: JSON.stringify(strPath), - leadingBracket: leadingBracket - } - } - return o - }, {}) - - return { wildcards, wcLen, secret } -} diff --git a/node_modules/fast-redact/lib/redactor.js b/node_modules/fast-redact/lib/redactor.js deleted file mode 100644 index af588853..00000000 --- a/node_modules/fast-redact/lib/redactor.js +++ /dev/null @@ -1,99 +0,0 @@ -'use strict' - -const rx = require('./rx') - -module.exports = redactor - -function redactor ({ secret, serialize, wcLen, strict, isCensorFct, censorFctTakesPath }, state) { - /* eslint-disable-next-line */ - const redact = Function('o', ` - if (typeof o !== 'object' || o == null) { - ${strictImpl(strict, serialize)} - } - const { censor, secret } = this - ${redactTmpl(secret, isCensorFct, censorFctTakesPath)} - this.compileRestore() - ${dynamicRedactTmpl(wcLen > 0, isCensorFct, censorFctTakesPath)} - ${resultTmpl(serialize)} - `).bind(state) - - if (serialize === false) { - redact.restore = (o) => state.restore(o) - } - - return redact -} - -function redactTmpl (secret, isCensorFct, censorFctTakesPath) { - return Object.keys(secret).map((path) => { - const { escPath, leadingBracket, path: arrPath } = secret[path] - const skip = leadingBracket ? 1 : 0 - const delim = leadingBracket ? '' : '.' - const hops = [] - var match - while ((match = rx.exec(path)) !== null) { - const [ , ix ] = match - const { index, input } = match - if (index > skip) hops.push(input.substring(0, index - (ix ? 0 : 1))) - } - var existence = hops.map((p) => `o${delim}${p}`).join(' && ') - if (existence.length === 0) existence += `o${delim}${path} != null` - else existence += ` && o${delim}${path} != null` - - const circularDetection = ` - switch (true) { - ${hops.reverse().map((p) => ` - case o${delim}${p} === censor: - secret[${escPath}].circle = ${JSON.stringify(p)} - break - `).join('\n')} - } - ` - - const censorArgs = censorFctTakesPath - ? `val, ${JSON.stringify(arrPath)}` - : `val` - - return ` - if (${existence}) { - const val = o${delim}${path} - if (val === censor) { - secret[${escPath}].precensored = true - } else { - secret[${escPath}].val = val - o${delim}${path} = ${isCensorFct ? `censor(${censorArgs})` : 'censor'} - ${circularDetection} - } - } - ` - }).join('\n') -} - -function dynamicRedactTmpl (hasWildcards, isCensorFct, censorFctTakesPath) { - return hasWildcards === true ? ` - { - const { wildcards, wcLen, groupRedact, nestedRedact } = this - for (var i = 0; i < wcLen; i++) { - const { before, beforeStr, after, nested } = wildcards[i] - if (nested === true) { - secret[beforeStr] = secret[beforeStr] || [] - nestedRedact(secret[beforeStr], o, before, after, censor, ${isCensorFct}, ${censorFctTakesPath}) - } else secret[beforeStr] = groupRedact(o, before, censor, ${isCensorFct}, ${censorFctTakesPath}) - } - } - ` : '' -} - -function resultTmpl (serialize) { - return serialize === false ? `return o` : ` - var s = this.serialize(o) - this.restore(o) - return s - ` -} - -function strictImpl (strict, serialize) { - return strict === true - ? `throw Error('fast-redact: primitives cannot be redacted')` - : serialize === false ? `return o` : `return this.serialize(o)` -} diff --git a/node_modules/fast-redact/lib/restorer.js b/node_modules/fast-redact/lib/restorer.js deleted file mode 100644 index d75ffeda..00000000 --- a/node_modules/fast-redact/lib/restorer.js +++ /dev/null @@ -1,86 +0,0 @@ -'use strict' - -const { groupRestore, nestedRestore } = require('./modifiers') - -module.exports = restorer - -function restorer ({ secret, wcLen }) { - return function compileRestore () { - if (this.restore) return - const paths = Object.keys(secret) - .filter((path) => secret[path].precensored === false) - const resetters = resetTmpl(secret, paths) - const hasWildcards = wcLen > 0 - const state = hasWildcards ? { secret, groupRestore, nestedRestore } : { secret } - /* eslint-disable-next-line */ - this.restore = Function( - 'o', - restoreTmpl(resetters, paths, hasWildcards) - ).bind(state) - } -} - -/** - * Mutates the original object to be censored by restoring its original values - * prior to censoring. - * - * @param {object} secret Compiled object describing which target fields should - * be censored and the field states. - * @param {string[]} paths The list of paths to censor as provided at - * initialization time. - * - * @returns {string} String of JavaScript to be used by `Function()`. The - * string compiles to the function that does the work in the description. - */ -function resetTmpl (secret, paths) { - return paths.map((path) => { - const { circle, escPath, leadingBracket } = secret[path] - const delim = leadingBracket ? '' : '.' - const reset = circle - ? `o.${circle} = secret[${escPath}].val` - : `o${delim}${path} = secret[${escPath}].val` - const clear = `secret[${escPath}].val = undefined` - return ` - if (secret[${escPath}].val !== undefined) { - try { ${reset} } catch (e) {} - ${clear} - } - ` - }).join('') -} - -/** - * Creates the body of the restore function - * - * Restoration of the redacted object happens - * backwards, in reverse order of redactions, - * so that repeated redactions on the same object - * property can be eventually rolled back to the - * original value. - * - * This way dynamic redactions are restored first, - * starting from the last one working backwards and - * followed by the static ones. - * - * @returns {string} the body of the restore function - */ -function restoreTmpl (resetters, paths, hasWildcards) { - const dynamicReset = hasWildcards === true ? ` - const keys = Object.keys(secret) - const len = keys.length - for (var i = len - 1; i >= ${paths.length}; i--) { - const k = keys[i] - const o = secret[k] - if (o.flat === true) this.groupRestore(o) - else this.nestedRestore(o) - secret[k] = null - } - ` : '' - - return ` - const secret = this.secret - ${dynamicReset} - ${resetters} - return o - ` -} diff --git a/node_modules/fast-redact/lib/rx.js b/node_modules/fast-redact/lib/rx.js deleted file mode 100644 index b25be272..00000000 --- a/node_modules/fast-redact/lib/rx.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict' - -module.exports = /[^.[\]]+|\[((?:.)*?)\]/g - -/* -Regular expression explanation: - -Alt 1: /[^.[\]]+/ - Match one or more characters that are *not* a dot (.) - opening square bracket ([) or closing square bracket (]) - -Alt 2: /\[((?:.)*?)\]/ - If the char IS dot or square bracket, then create a capture - group (which will be capture group $1) that matches anything - within square brackets. Expansion is lazy so it will - stop matching as soon as the first closing bracket is met `]` - (rather than continuing to match until the final closing bracket). -*/ diff --git a/node_modules/fast-redact/lib/state.js b/node_modules/fast-redact/lib/state.js deleted file mode 100644 index eb360657..00000000 --- a/node_modules/fast-redact/lib/state.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict' - -module.exports = state - -function state (o) { - const { - secret, - censor, - compileRestore, - serialize, - groupRedact, - nestedRedact, - wildcards, - wcLen - } = o - const builder = [{ secret, censor, compileRestore }] - if (serialize !== false) builder.push({ serialize }) - if (wcLen > 0) builder.push({ groupRedact, nestedRedact, wildcards, wcLen }) - return Object.assign(...builder) -} diff --git a/node_modules/fast-redact/lib/validator.js b/node_modules/fast-redact/lib/validator.js deleted file mode 100644 index 024ac917..00000000 --- a/node_modules/fast-redact/lib/validator.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict' - -const { createContext, runInContext } = require('vm') - -module.exports = validator - -function validator (opts = {}) { - const { - ERR_PATHS_MUST_BE_STRINGS = () => 'fast-redact - Paths must be (non-empty) strings', - ERR_INVALID_PATH = (s) => `fast-redact – Invalid path (${s})` - } = opts - - return function validate ({ paths }) { - paths.forEach((s) => { - if (typeof s !== 'string') { - throw Error(ERR_PATHS_MUST_BE_STRINGS()) - } - try { - if (/〇/.test(s)) throw Error() - const proxy = new Proxy({}, { get: () => proxy, set: () => { throw Error() } }) - const expr = (s[0] === '[' ? '' : '.') + s.replace(/^\*/, '〇').replace(/\.\*/g, '.〇').replace(/\[\*\]/g, '[〇]') - if (/\n|\r|;/.test(expr)) throw Error() - if (/\/\*/.test(expr)) throw Error() - runInContext(` - (function () { - 'use strict' - o${expr} - if ([o${expr}].length !== 1) throw Error() - })() - `, createContext({ o: proxy, 〇: null }), { - codeGeneration: { strings: false, wasm: false } - }) - } catch (e) { - throw Error(ERR_INVALID_PATH(s)) - } - }) - } -} diff --git a/node_modules/fast-redact/package.json b/node_modules/fast-redact/package.json deleted file mode 100644 index 81317ce5..00000000 --- a/node_modules/fast-redact/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_from": "fast-redact@^3.0.0", - "_id": "fast-redact@3.0.1", - "_inBundle": false, - "_integrity": "sha512-kYpn4Y/valC9MdrISg47tZOpYBNoTXKgT9GYXFpHN/jYFs+lFkPoisY+LcBODdKVMY96ATzvzsWv+ES/4Kmufw==", - "_location": "/fast-redact", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "fast-redact@^3.0.0", - "name": "fast-redact", - "escapedName": "fast-redact", - "rawSpec": "^3.0.0", - "saveSpec": null, - "fetchSpec": "^3.0.0" - }, - "_requiredBy": [ - "/pino" - ], - "_resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.0.1.tgz", - "_shasum": "d6015b971e933d03529b01333ba7f22c29961e92", - "_spec": "fast-redact@^3.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pino", - "author": { - "name": "David Mark Clements", - "email": "david.clements@nearform.com" - }, - "bugs": { - "url": "https://github.com/davidmarkclements/fast-redact/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "very fast object redaction", - "devDependencies": { - "fastbench": "^1.0.1", - "pino-noir": "^2.2.1", - "snazzy": "^8.0.0", - "standard": "^12.0.1", - "tap": "^12.5.2" - }, - "directories": { - "example": "example", - "lib": "lib", - "test": "test" - }, - "engines": { - "node": ">=6" - }, - "homepage": "https://github.com/davidmarkclements/fast-redact#readme", - "keywords": [ - "redact", - "censor", - "performance", - "performant", - "gdpr", - "fast", - "speed", - "serialize", - "stringify" - ], - "license": "MIT", - "main": "index.js", - "name": "fast-redact", - "repository": { - "type": "git", - "url": "git+https://github.com/davidmarkclements/fast-redact.git" - }, - "scripts": { - "bench": "node benchmark", - "ci": "tap --cov --100 test", - "cov": "tap --cov test", - "cov-ui": "tap --coverage-report=html test", - "posttest": "standard index.js 'lib/*.js' 'example/*.js' benchmark/index.js test/index.js | snazzy", - "test": "tap test" - }, - "version": "3.0.1" -} diff --git a/node_modules/fast-redact/readme.md b/node_modules/fast-redact/readme.md deleted file mode 100644 index cb116bd9..00000000 --- a/node_modules/fast-redact/readme.md +++ /dev/null @@ -1,280 +0,0 @@ -# fast-redact - -very fast object redaction - -[![Build Status](https://travis-ci.org/davidmarkclements/fast-redact.svg?branch=master)](https://travis-ci.org/davidmarkclements/fast-redact) - -## Default Usage - -By default, `fast-redact` serializes an object with `JSON.stringify`, censoring any -data at paths specified: - -```js -const fastRedact = require('fast-redact') -const fauxRequest = { - headers: { - host: 'http://example.com', - cookie: `oh oh we don't want this exposed in logs in etc.`, - referer: `if we're cool maybe we'll even redact this` - } -} -const redact = fastRedact({ - paths: ['headers.cookie', 'headers.referer'] -}) - -console.log(redact(fauxRequest)) -// {"headers":{"host":"http://example.com","cookie":"[REDACTED]","referer":"[REDACTED]"}} -``` - -## API - -### `require('fast-redact')({paths, censor, serialize}) => Function` - -When called without any options, or with a zero length `paths` array, -`fast-redact` will return `JSON.stringify` or the `serialize` option, if set. - -#### `paths` – `Array` - -An array of strings describing the nested location of a key in an object. - -The syntax follows that of the EcmaScript specification, that is any JavaScript -path is accepted – both bracket and dot notation is supported. For instance in -each of the following cases, the `c` property will be redacted: `a.b.c`,`a['b'].c`, -`a["b"].c`, `a[``b``].c`. Since bracket notation is supported, array indices are also -supported `a[0].b` would redact the `b` key in the first object of the `a` array. - -Leading brackets are also allowed, for instance `["a"].b.c` will work. - -##### Wildcards - -In addition to static paths, asterisk wildcards are also supported. - -When an asterisk is place in the final position it will redact all keys within the -parent object. For instance `a.b.*` will redact all keys in the `b` object. Similarly -for arrays `a.b[*]` will redact all elements of an array (in truth it actually doesn't matter -whether `b` is in an object or array in either case, both notation styles will work). - -When an asterisk is in an intermediate or first position, the paths following the asterisk will -be redacted for every object within the parent. - -For example: - -```js -const fastRedact = require('fast-redact') -const redact = fastRedact({paths: ['*.c.d']}) -const obj = { - x: {c: {d: 'hide me', e: 'leave me be'}}, - y: {c: {d: 'and me', f: 'I want to live'}}, - z: {c: {d: 'and also I', g: 'I want to run in a stream'}} -} -console.log(redact(obj)) -// {"x":{"c":{"d":"[REDACTED]","e":"leave me be"}},"y":{"c":{"d":"[REDACTED]","f":"I want to live"}},"z":{"c":{"d":"[REDACTED]","g":"I want to run in a stream"}}} -``` - -Another example with a nested array: - -```js -const fastRedact = require('..') -const redact = fastRedact({paths: ['a[*].c.d']}) -const obj = { - a: [ - {c: {d: 'hide me', e: 'leave me be'}}, - {c: {d: 'and me', f: 'I want to live'}}, - {c: {d: 'and also I', g: 'I want to run in a stream'}} - ] -} -console.log(redact(obj)) -// {"a":[{"c":{"d":"[REDACTED]","e":"leave me be"}},{"c":{"d":"[REDACTED]","f":"I want to live"}},{"c":{"d":"[REDACTED]","g":"I want to run in a stream"}}]} -``` - -#### `remove` - `Boolean` - `[false]` - -The `remove` option, when set to `true` will cause keys to be removed from the -serialized output. - -Since the implementation exploits the fact that `undefined` keys are ignored -by `JSON.stringify` the `remove` option may *only* be used when `JSON.stringify` -is the serializer (this is the default) – otherwise `fast-redact` will throw. - -If supplying a custom serializer that has the same behavior (removing keys -with `undefined` values), this restriction can be bypassed by explicitly setting -the `censor` to `undefined`. - - -#### `censor` – `<Any type>` – `('[REDACTED]')` - -This is the value which overwrites redacted properties. - -Setting `censor` to `undefined` will cause properties to removed as long as this is -the behavior of the `serializer` – which defaults to `JSON.stringify`, which does -remove `undefined` properties. - -Setting `censor` to a function will cause `fast-redact` to invoke it with the original -value. The output of the `censor` function sets the redacted value. -Please note that asynchronous functions are not supported. - -#### `serialize` – `Function | Boolean` – `(JSON.stringify)` - -The `serialize` option may either be a function or a boolean. If a function is supplied, this -will be used to `serialize` the redacted object. It's important to understand that for -performance reasons `fast-redact` *mutates* the original object, then serializes, then -restores the original values. So the object passed to the serializer is the exact same -object passed to the redacting function. - -The `serialize` option as a function example: - -```js -const fastRedact = require('fast-redact') -const redact = fastRedact({ - paths: ['a'], - serialize: (o) => JSON.stringify(o, 0, 2) -}) -console.log(redact({a: 1, b: 2})) -// { -// "a": "[REDACTED]", -// "b": 2 -// } -``` - -For advanced usage the `serialize` option can be set to `false`. When `serialize` is set to `false`, -instead of the serialized object, the output of the redactor function will be the mutated object -itself (this is the exact same as the object passed in). In addition a `restore` method is supplied -on the redactor function allowing the redacted keys to be restored with the original data. - -```js -const fastRedact = require('fast-redact') -const redact = fastRedact({ - paths: ['a'], - serialize: false -}) -const o = {a: 1, b: 2} -console.log(redact(o) === o) // true -console.log(o) // { a: '[REDACTED]', b: 2 } -console.log(redact.restore(o) === o) // true -console.log(o) // { a: 1, b: 2 } -``` - -#### `strict` – `Boolean` - `[true]` -The `strict` option, when set to `true`, will cause the redactor function to throw if instead -of an object it finds a primitive. When `strict` is set to `false`, the redactor function -will treat the primitive value as having already been redacted, and return it serialized (with -`JSON.stringify` or the user's custom `serialize` function), or as-is if the `serialize` option -was set to false. - -## Approach - -In order to achieve lowest cost/highest performance redaction `fast-redact` -creates and compiles a function (using the `Function` constructor) on initialization. -It's important to distinguish this from the dangers of a runtime eval, no user input -is involved in creating the string that compiles into the function. This is as safe -as writing code normally and having it compiled by V8 in the usual way. - -Thanks to changes in V8 in recent years, state can be injected into compiled functions -using `bind` at very low cost (whereas `bind` used to be expensive, and getting state -into a compiled function by any means was difficult without a performance penalty). - -For static paths, this function simply checks that the path exists and then overwrites -with the censor. Wildcard paths are processed with normal functions that iterate over -the object redacting values as necessary. - -It's important to note, that the original object is mutated – for performance reasons -a copy is not made. See [rfdc](https://github.com/davidmarkclements/rfdc) (Really Fast -Deep Clone) for the fastest known way to clone – it's not nearly close enough in speed -to editing the original object, serializing and then restoring values. - -A `restore` function is also created and compiled to put the original state back on -to the object after redaction. This means that in the default usage case, the operation -is essentially atomic - the object is mutated, serialized and restored internally which -avoids any state management issues. - -## Caveat - -As mentioned in approach, the `paths` array input is dynamically compiled into a function -at initialization time. While the `paths` array is vigourously tested for any developer -errors, it's strongly recommended against allowing user input to directly supply any -paths to redact. It can't be guaranteed that allowing user input for `paths` couldn't -feasibly expose an attack vector. - -## Benchmarks - -The fastest known predecessor to `fast-redact` is the non-generic [`pino-noir`](http://npm.im/pino-noir) -library (which was also written by myself). - -In the direct calling case, `fast-redact` is ~30x faster than `pino-noir`, however a more realistic -comparison is overhead on `JSON.stringify`. - -For a static redaction case (no wildcards) `pino-noir` adds ~25% overhead on top of `JSON.stringify` -whereas `fast-redact` adds ~1% overhead. - -In the basic last-position wildcard case,`fast-redact` is ~12% faster than `pino-noir`. - -The `pino-noir` module does not support intermediate wildcards, but `fast-redact` does, -the cost of an intermediate wildcard that results in two keys over two nested objects -being redacted is about 25% overhead on `JSON.stringify`. The cost of an intermediate -wildcard that results in four keys across two objects being redacted is about 55% overhead -on `JSON.stringify` and ~50% more expensive that explicitly declaring the keys. - -```sh -npm run bench -``` - -``` -benchNoirV2*500: 59.108ms -benchFastRedact*500: 2.483ms -benchFastRedactRestore*500: 10.904ms -benchNoirV2Wild*500: 91.399ms -benchFastRedactWild*500: 21.200ms -benchFastRedactWildRestore*500: 27.304ms -benchFastRedactIntermediateWild*500: 92.304ms -benchFastRedactIntermediateWildRestore*500: 107.047ms -benchJSONStringify*500: 210.573ms -benchNoirV2Serialize*500: 281.148ms -benchFastRedactSerialize*500: 215.845ms -benchNoirV2WildSerialize*500: 281.168ms -benchFastRedactWildSerialize*500: 247.140ms -benchFastRedactIntermediateWildSerialize*500: 333.722ms -benchFastRedactIntermediateWildMatchWildOutcomeSerialize*500: 463.667ms -benchFastRedactStaticMatchWildOutcomeSerialize*500: 239.293ms -``` - -## Tests - -``` -npm test -``` - -``` - 224 passing (499.544ms) -``` - -### Coverage - -``` -npm run cov -``` - -``` ------------------|----------|----------|----------|----------|-------------------| -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | ------------------|----------|----------|----------|----------|-------------------| -All files | 100 | 100 | 100 | 100 | | - fast-redact | 100 | 100 | 100 | 100 | | - index.js | 100 | 100 | 100 | 100 | | - fast-redact/lib | 100 | 100 | 100 | 100 | | - modifiers.js | 100 | 100 | 100 | 100 | | - parse.js | 100 | 100 | 100 | 100 | | - redactor.js | 100 | 100 | 100 | 100 | | - restorer.js | 100 | 100 | 100 | 100 | | - rx.js | 100 | 100 | 100 | 100 | | - state.js | 100 | 100 | 100 | 100 | | - validator.js | 100 | 100 | 100 | 100 | | ------------------|----------|----------|----------|----------|-------------------| -``` - -## License - -MIT - -## Acknowledgements - -Sponsored by [nearForm](http://www.nearform.com) diff --git a/node_modules/fast-redact/test/index.js b/node_modules/fast-redact/test/index.js deleted file mode 100644 index baf24810..00000000 --- a/node_modules/fast-redact/test/index.js +++ /dev/null @@ -1,1063 +0,0 @@ -'use strict' - -const { test } = require('tap') -const fastRedact = require('..') - -const censor = '[REDACTED]' -const censorFct = value => !value ? value : 'xxx' + value.substr(-2) -const censorWithPath = (v, p) => p.join('.') + ' ' + censorFct(v) - -test('returns no-op when passed no paths [serialize: false]', ({ end, doesNotThrow }) => { - const redact = fastRedact({ paths: [], serialize: false }) - doesNotThrow(() => redact({})) - doesNotThrow(() => { - const o = redact({}) - redact.restore(o) - }) - end() -}) - -test('returns serializer when passed no paths [serialize: default]', ({ end, is }) => { - is(fastRedact({ paths: [] }), JSON.stringify) - is(fastRedact(), JSON.stringify) - end() -}) - -test('throws when passed non-object using defaults', ({ end, throws }) => { - const redact = fastRedact({ paths: ['a.b.c'] }) - throws(() => redact(1)) - end() -}) - -test('throws when passed non-object number using [strict: true]', ({ end, throws }) => { - const redact = fastRedact({ paths: ['a.b.c'], strict: true }) - throws(() => redact(1)) - end() -}) - -test('returns JSON.stringified value when passed non-object using [strict: false] and no serialize option', ({ end, is, doesNotThrow }) => { - const redactDefaultSerialize = fastRedact({ paths: ['a.b.c'], strict: false }) - - // expectedOutputs holds `JSON.stringify`ied versions of each primitive. - // We write them out explicitly though to make the test a bit clearer. - const primitives = [null, undefined, 'A', 1, false] - const expectedOutputs = ['null', undefined, '"A"', '1', 'false'] - - primitives.forEach((it, i) => { - doesNotThrow(() => redactDefaultSerialize(it)) - const res = redactDefaultSerialize(it) - is(res, expectedOutputs[i]) - }) - - end() -}) - -test('returns custom serialized value when passed non-object using [strict: false, serialize: fn]', ({ end, is, doesNotThrow }) => { - const customSerialize = (v) => `Hello ${v}!` - const redactCustomSerialize = fastRedact({ - paths: ['a.b.c'], - strict: false, - serialize: customSerialize - }) - - const primitives = [null, undefined, 'A', 1, false] - - primitives.forEach((it) => { - doesNotThrow(() => redactCustomSerialize(it)) - const res = redactCustomSerialize(it) - is(res, customSerialize(it)) - }) - - end() -}) - -test('returns original value when passed non-object using [strict: false, serialize: false]', ({ end, is, doesNotThrow }) => { - const redactSerializeFalse = fastRedact({ - paths: ['a.b.c'], - strict: false, - serialize: false - }) - - const primitives = [null, undefined, 'A', 1, false] - - primitives.forEach((it) => { - doesNotThrow(() => redactSerializeFalse(it)) - const res = redactSerializeFalse(it) - is(res, it) - }) - - end() -}) - -test('throws if a path is not a string', ({ end, throws }) => { - const invalidTypeMsg = 'fast-redact - Paths must be (non-empty) strings' - throws((e) => { - fastRedact({ paths: [1] }) - }, Error(invalidTypeMsg)) - throws((e) => { - fastRedact({ paths: [null] }) - }, Error(invalidTypeMsg)) - throws((e) => { - fastRedact({ paths: [undefined] }) - }, Error(invalidTypeMsg)) - throws((e) => { - fastRedact({ paths: [{}] }) - }, Error(invalidTypeMsg)) - throws((e) => { - fastRedact({ paths: [[null]] }) - }, Error(invalidTypeMsg)) - end() -}) - -test('throws when passed illegal paths', ({ end, throws }) => { - const err = (s) => Error(`fast-redact – Invalid path (${s})`) - throws((e) => { - fastRedact({ paths: ['@'] }) - }, err('@')) - throws((e) => { - fastRedact({ paths: ['0'] }) - }, err('0')) - throws((e) => { - fastRedact({ paths: ['〇'] }) - }, err('〇')) - throws((e) => { - fastRedact({ paths: ['a.1.c'] }) - }, err('a.1.c')) - throws((e) => { - fastRedact({ paths: ['a..c'] }) - }, err('a..c')) - throws((e) => { - fastRedact({ paths: ['1..c'] }) - }, err('1..c')) - throws((e) => { - fastRedact({ paths: ['a = b'] }) - }, err('a = b')) - throws((e) => { - fastRedact({ paths: ['a(b)'] }) - }, err('a(b)')) - throws((e) => { - fastRedact({ paths: ['//a.b.c'] }) - }, err('//a.b.c')) - throws((e) => { - fastRedact({ paths: ['\\a.b.c'] }) - }, err('\\a.b.c')) - throws((e) => { - fastRedact({ paths: ['a.#.c'] }) - }, err('a.#.c')) - throws((e) => { - fastRedact({ paths: ['~~a.b.c'] }) - }, err('~~a.b.c')) - throws((e) => { - fastRedact({ paths: ['^a.b.c'] }) - }, err('^a.b.c')) - throws((e) => { - fastRedact({ paths: ['a + b'] }) - }, err('a + b')) - throws((e) => { - fastRedact({ paths: ['return a + b'] }) - }, err('return a + b')) - throws((e) => { - fastRedact({ paths: ['a / b'] }) - }, err('a / b')) - throws((e) => { - fastRedact({ paths: ['a * b'] }) - }, err('a * b')) - throws((e) => { - fastRedact({ paths: ['a - b'] }) - }, err('a - b')) - throws((e) => { - fastRedact({ paths: ['a ** b'] }) - }, err('a ** b')) - throws((e) => { - fastRedact({ paths: ['a % b'] }) - }, err('a % b')) - throws((e) => { - fastRedact({ paths: ['a.b*.c'] }) - }, err('a.b*.c')) - throws((e) => { - fastRedact({ paths: ['a;global.foo = "bar"'] }) - }, err('a;global.foo = "bar"')) - throws((e) => { - fastRedact({ paths: ['a;while(1){}'] }) - }, err('a;while(1){}')) - throws((e) => { - fastRedact({ paths: ['a//'] }) - }, err('a//')) - throws((e) => { - fastRedact({ paths: ['a/*foo*/'] }) - }, err('a/*foo*/')) - throws((e) => { - fastRedact({ paths: ['a,o.b'] }) - }, err('a,o.b')) - throws((e) => { - fastRedact({ paths: ['a = o.b'] }) - }, err('a = o.b')) - throws((e) => { - fastRedact({ paths: ['a\n'] }) - }, err('a\n')) - throws((e) => { - fastRedact({ paths: ['a\r'] }) - }, err('a\r')) - throws((e) => { - fastRedact({ paths: [''] }) - }, err('')) - throws((e) => { - fastRedact({ paths: ['[""""]'] }) - }, err('[""""]')) - end() -}) - -test('throws if more than one wildcard in a path', ({ end, throws }) => { - throws(() => { - fastRedact({ paths: ['a.*.x.*'], serialize: false }) - }, Error('fast-redact – Only one wildcard per path is supported')) - end() -}) - -test('throws if a custom serializer is used and remove is true', ({ end, throws }) => { - throws(() => { - fastRedact({ paths: ['a'], serialize: (o) => o, remove: true }) - }, Error('fast-redact – remove option may only be set when serializer is JSON.stringify')) - end() -}) - -test('throws if serialize is false and remove is true', ({ end, throws }) => { - throws(() => { - fastRedact({ paths: ['a'], serialize: false, remove: true }) - }, Error('fast-redact – remove option may only be set when serializer is JSON.stringify')) - end() -}) - -test('supports path segments that aren\'t identifiers if bracketed', ({ end, strictSame }) => { - const redactSerializeFalse = fastRedact({ - paths: ['a[""]', 'a["x-y"]', 'a[\'"y"\']', "a['\\'x\\'']"], - serialize: false, - censor: 'X' - }) - - const res = redactSerializeFalse({ a: { '': 'Hi!', 'x-y': 'Hi!', '"y"': 'Hi!', "'x'": 'Hi!' } }) - strictSame(res, { a: { '': 'X', 'x-y': 'X', '"y"': 'X', "'x'": 'X' } }) - end() -}) - -test('supports consecutive bracketed path segments', ({ end, strictSame }) => { - const redactSerializeFalse = fastRedact({ - paths: ['a[""]["y"]'], - serialize: false, - censor: 'X' - }) - - const res = redactSerializeFalse({ a: { '': { 'y': 'Hi!' } } }) - strictSame(res, { a: { '': { 'y': 'X' } } }) - end() -}) - -test('supports leading bracketed widcard', ({ end, strictSame }) => { - const redactSerializeFalse = fastRedact({ - paths: ['[*]["y"]'], - serialize: false, - censor: 'X' - }) - - const res = redactSerializeFalse({ 'x': { 'y': 'Hi!' } }) - strictSame(res, { 'x': { 'y': 'X' } }) - end() -}) - -test('masks according to supplied censor', ({ end, is }) => { - const censor = 'test' - const redact = fastRedact({ paths: ['a'], censor, serialize: false }) - is(redact({ a: 'a' }).a, censor) - end() -}) - -test('redact.restore function is available when serialize is false', ({ end, is }) => { - const censor = 'test' - const redact = fastRedact({ paths: ['a'], censor, serialize: false }) - is(typeof redact.restore, 'function') - end() -}) - -test('redact.restore function places original values back in place', ({ end, is }) => { - const censor = 'test' - const redact = fastRedact({ paths: ['a'], censor, serialize: false }) - const o = { a: 'a' } - redact(o) - is(o.a, censor) - redact.restore(o) - is(o.a, 'a') - end() -}) - -test('masks according to supplied censor function', ({ end, is }) => { - const redact = fastRedact({ paths: ['a'], censor: censorFct, serialize: false }) - is(redact({ a: '0123456' }).a, 'xxx56') - end() -}) - -test('masks according to supplied censor function with wildcards', ({ end, is }) => { - const redact = fastRedact({ paths: '*', censor: censorFct, serialize: false }) - is(redact({ a: '0123456' }).a, 'xxx56') - end() -}) - -test('masks according to supplied censor function with nested wildcards', ({ end, is }) => { - const redact = fastRedact({ paths: ['*.b'], censor: censorFct, serialize: false }) - is(redact({ a: { b: '0123456' } }).a.b, 'xxx56') - is(redact({ c: { b: '0123456', d: 'pristine' } }).c.b, 'xxx56') - is(redact({ c: { b: '0123456', d: 'pristine' } }).c.d, 'pristine') - end() -}) - -test('masks according to supplied censor-with-path function', ({ end, is }) => { - const redact = fastRedact({ paths: ['a'], censor: censorWithPath, serialize: false }) - is(redact({ a: '0123456' }).a, 'a xxx56') - end() -}) - -test('masks according to supplied censor-with-path function with wildcards', ({ end, is }) => { - const redact = fastRedact({ paths: '*', censor: censorWithPath, serialize: false }) - is(redact({ a: '0123456' }).a, 'a xxx56') - end() -}) - -test('masks according to supplied censor-with-path function with nested wildcards', ({ end, is }) => { - const redact = fastRedact({ paths: ['*.b'], censor: censorWithPath, serialize: false }) - is(redact({ a: { b: '0123456' } }).a.b, 'a.b xxx56') - is(redact({ c: { b: '0123456', d: 'pristine' } }).c.b, 'c.b xxx56') - is(redact({ c: { b: '0123456', d: 'pristine' } }).c.d, 'pristine') - end() -}) - -test('redact.restore function places original values back in place with censor function', ({ end, is }) => { - const redact = fastRedact({ paths: ['a'], censor: censorFct, serialize: false }) - const o = { a: 'qwerty' } - redact(o) - is(o.a, 'xxxty') - redact.restore(o) - is(o.a, 'qwerty') - end() -}) - -test('serializes with JSON.stringify by default', ({ end, is }) => { - const redact = fastRedact({ paths: ['a'] }) - const o = { a: 'a' } - is(redact(o), `{"a":"${censor}"}`) - is(o.a, 'a') - end() -}) - -test('removes during serialization instead of redacting when remove option is true', ({ end, is }) => { - const redact = fastRedact({ paths: ['a'], remove: true }) - const o = { a: 'a', b: 'b' } - is(redact(o), `{"b":"b"}`) - is(o.a, 'a') - end() -}) - -test('serializes with JSON.stringify if serialize is true', ({ end, is }) => { - const redact = fastRedact({ paths: ['a'], serialize: true }) - const o = { a: 'a' } - is(redact(o), `{"a":"${censor}"}`) - is(o.a, 'a') - end() -}) - -test('serializes with JSON.stringify if serialize is not a function', ({ end, is }) => { - const redact = fastRedact({ paths: ['a'], serialize: {} }) - const o = { a: 'a' } - is(redact(o), `{"a":"${censor}"}`) - is(o.a, 'a') - end() -}) - -test('serializes with custom serializer if supplied', ({ end, is }) => { - const redact = fastRedact({ paths: ['a'], serialize: (o) => JSON.stringify(o, 0, 2) }) - const o = { a: 'a' } - is(redact(o), `{\n "a": "${censor}"\n}`) - is(o.a, 'a') - end() -}) - -test('redacts parent keys', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b.c'], serialize: false }) - const result = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b.c, censor) - end() -}) - -test('supports paths with array indexes', ({ end, same }) => { - const redact = fastRedact({ paths: ['insideArray.like[3].this'], serialize: false }) - same(redact({ insideArray: { like: ['a', 'b', 'c', { this: { foo: 'meow' } }] } }), { insideArray: { like: ['a', 'b', 'c', { this: censor }] } }) - end() -}) - -test('censor may be any type, including function', ({ end, same }) => { - const redactToString = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: 'censor', serialize: false }) - const redactToUndefined = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: undefined, serialize: false }) - const sym = Symbol('sym') - const redactToSymbol = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: sym, serialize: false }) - const redactToNumber = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: 0, serialize: false }) - const redactToBoolean = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: false, serialize: false }) - const redactToNull = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: null, serialize: false }) - const redactToObject = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: { redacted: true }, serialize: false }) - const redactToArray = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: ['redacted'], serialize: false }) - const redactToBuffer = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: Buffer.from('redacted'), serialize: false }) - const redactToError = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: Error('redacted'), serialize: false }) - const redactToFunction = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: () => 'redacted', serialize: false }) - same(redactToString({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: 'censor', d: { x: 'censor', y: 'censor' } } } }) - same(redactToUndefined({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: undefined, d: { x: undefined, y: undefined } } } }) - same(redactToSymbol({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: sym, d: { x: sym, y: sym } } } }) - same(redactToNumber({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: 0, d: { x: 0, y: 0 } } } }) - same(redactToBoolean({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: false, d: { x: false, y: false } } } }) - same(redactToNull({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: null, d: { x: null, y: null } } } }) - same(redactToObject({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: { redacted: true }, d: { x: { redacted: true }, y: { redacted: true } } } } }) - same(redactToArray({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: ['redacted'], d: { x: ['redacted'], y: ['redacted'] } } } }) - same(redactToBuffer({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: Buffer.from('redacted'), d: { x: Buffer.from('redacted'), y: Buffer.from('redacted') } } } }) - same(redactToError({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: Error('redacted'), d: { x: Error('redacted'), y: Error('redacted') } } } }) - same(redactToFunction({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: 'redacted', d: { x: 'redacted', y: 'redacted' } } } }) - end() -}) - -test('supports multiple paths from the same root', ({ end, same }) => { - const redact = fastRedact({ paths: ['deep.bar.shoe', 'deep.baz.shoe', 'deep.foo', 'deep.not.there.sooo', 'deep.fum.shoe'], serialize: false }) - same(redact({ deep: { bar: 'hmm', baz: { shoe: { k: 1 } }, foo: {}, fum: { shoe: 'moo' } } }), { deep: { bar: 'hmm', baz: { shoe: censor }, foo: censor, fum: { shoe: censor } } }) - end() -}) - -test('supports strings in bracket notation paths (single quote)', ({ end, is }) => { - const redact = fastRedact({ paths: [`a['@#!='].c`], serialize: false }) - const result = redact({ a: { '@#!=': { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a['@#!='].c, censor) - end() -}) - -test('supports strings in bracket notation paths (double quote)', ({ end, is }) => { - const redact = fastRedact({ paths: [`a["@#!="].c`], serialize: false }) - const result = redact({ a: { '@#!=': { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a['@#!='].c, censor) - end() -}) - -test('supports strings in bracket notation paths (backtick quote)', ({ end, is }) => { - const redact = fastRedact({ paths: ['a[`@#!=`].c'], serialize: false }) - const result = redact({ a: { '@#!=': { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a['@#!='].c, censor) - end() -}) - -test('allows * within a bracket notation string', ({ end, is }) => { - const redact = fastRedact({ paths: ['a["*"].c'], serialize: false }) - const result = redact({ a: { '*': { c: 's', x: 1 } } }) - is(result.a['*'].c, censor) - is(result.a['*'].x, 1) - end() -}) - -test('redacts parent keys – restore', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b.c'], serialize: false }) - const result = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b.c, censor) - redact.restore(result) - is(result.a.b.c, 's') - end() -}) - -test('handles null proto objects', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b.c'], serialize: false }) - const result = redact({ __proto__: null, a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b.c, censor) - end() -}) - -test('handles null proto objects – restore', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b.c'], serialize: false }) - const result = redact({ __proto__: null, a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b.c, censor) - redact.restore(result, 's') - is(result.a.b.c, 's') - end() -}) - -test('handles paths that do not match object structure', ({ end, same }) => { - const redact = fastRedact({ paths: ['x.y.z'], serialize: false }) - same(redact({ a: { b: { c: 's' } } }), { a: { b: { c: 's' } } }) - end() -}) - -test('ignores missing paths in object', ({ end, same }) => { - const redact = fastRedact({ paths: ['a.b.c', 'a.z.d', 'a.b.z'], serialize: false }) - same(redact({ a: { b: { c: 's' } } }), { a: { b: { c: censor } } }) - end() -}) - -test('ignores missing paths in object – restore', ({ end, doesNotThrow }) => { - const redact = fastRedact({ paths: ['a.b.c', 'a.z.d', 'a.b.z'], serialize: false }) - const o = { a: { b: { c: 's' } } } - redact(o) - doesNotThrow(() => { - redact.restore(o) - }) - - end() -}) - -test('gracefully handles primitives that match intermediate keys in paths', ({ end, same }) => { - const redact = fastRedact({ paths: ['a.b.c', 'a.b.c.d'], serialize: false }) - same(redact({ a: { b: null } }), { a: { b: null } }) - same(redact({ a: { b: 's' } }), { a: { b: 's' } }) - same(redact({ a: { b: 1 } }), { a: { b: 1 } }) - same(redact({ a: { b: undefined } }), { a: { b: undefined } }) - same(redact({ a: { b: true } }), { a: { b: true } }) - const sym = Symbol('sym') - same(redact({ a: { b: sym } }), { a: { b: sym } }) - end() -}) - -test('handles circulars', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['bar.baz.baz'], serialize: false }) - const bar = { b: 2 } - const o = { a: 1, bar } - bar.baz = bar - o.bar.baz = o.bar - same(redact(o), { a: 1, bar: { b: 2, baz: censor } }) - end() -}) - -test('handles circulars – restore', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['bar.baz.baz'], serialize: false }) - const bar = { b: 2 } - const o = { a: 1, bar } - bar.baz = bar - o.bar.baz = o.bar - is(o.bar.baz, bar) - redact(o) - is(o.bar.baz, censor) - redact.restore(o) - is(o.bar.baz, bar) - end() -}) - -test('handles circulars and cross references – restore', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['bar.baz.baz', 'cf.bar'], serialize: false }) - const bar = { b: 2 } - const o = { a: 1, bar, cf: { bar } } - bar.baz = bar - o.bar.baz = o.bar - is(o.bar.baz, bar) - is(o.cf.bar, bar) - redact(o) - is(o.bar.baz, censor) - is(o.cf.bar, censor) - redact.restore(o) - is(o.bar.baz, bar) - is(o.cf.bar, bar) - end() -}) - -test('ultimate wildcards – shallow', ({ end, same }) => { - const redact = fastRedact({ paths: ['test.*'], serialize: false }) - same(redact({ test: { baz: 1, bar: 'private' } }), { test: { baz: censor, bar: censor } }) - end() -}) - -test('ultimate wildcards – deep', ({ end, same }) => { - const redact = fastRedact({ paths: ['deep.bar.baz.ding.*'], serialize: false }) - same(redact({ deep: { a: 1, bar: { b: 2, baz: { c: 3, ding: { d: 4, e: 5, f: 'six' } } } } }), { deep: { a: 1, bar: { b: 2, baz: { c: 3, ding: { d: censor, e: censor, f: censor } } } } }) - end() -}) - -test('ultimate wildcards - array – shallow', ({ end, same }) => { - const redact = fastRedact({ paths: ['array[*]'], serialize: false }) - same(redact({ array: ['a', 'b', 'c', 'd'] }), { array: [censor, censor, censor, censor] }) - end() -}) - -test('ultimate wildcards – array – deep', ({ end, same }) => { - const redact = fastRedact({ paths: ['deepArray.down.here[*]'], serialize: false }) - same(redact({ deepArray: { down: { here: ['a', 'b', 'c'] } } }), { deepArray: { down: { here: [censor, censor, censor] } } }) - end() -}) - -test('ultimate wildcards – array – single index', ({ end, same }) => { - const redact = fastRedact({ paths: ['insideArray.like[3].this.*'], serialize: false }) - same(redact({ insideArray: { like: ['a', 'b', 'c', { this: { foo: 'meow' } }] } }), { insideArray: { like: ['a', 'b', 'c', { this: { foo: censor } }] } }) - end() -}) - -test('ultimate wildcards - handles null proto objects', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b.c'], serialize: false }) - const result = redact({ __proto__: null, a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b.c, censor) - end() -}) - -test('ultimate wildcards - handles paths that do not match object structure', ({ end, same }) => { - const redact = fastRedact({ paths: ['x.y.z'], serialize: false }) - same(redact({ a: { b: { c: 's' } } }), { a: { b: { c: 's' } } }) - end() -}) - -test('ultimate wildcards - gracefully handles primitives that match intermediate keys in paths', ({ end, same }) => { - const redact = fastRedact({ paths: ['a.b.c', 'a.b.c.d'], serialize: false }) - same(redact({ a: { b: null } }), { a: { b: null } }) - same(redact({ a: { b: 's' } }), { a: { b: 's' } }) - same(redact({ a: { b: 1 } }), { a: { b: 1 } }) - same(redact({ a: { b: undefined } }), { a: { b: undefined } }) - same(redact({ a: { b: true } }), { a: { b: true } }) - const sym = Symbol('sym') - same(redact({ a: { b: sym } }), { a: { b: sym } }) - end() -}) - -test('ultimate wildcards – handles circulars', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['bar.baz.*'], serialize: false }) - const bar = { b: 2 } - const o = { a: 1, bar } - bar.baz = bar - o.bar.baz = o.bar - same(redact(o), { a: 1, bar: { b: censor, baz: censor } }) - end() -}) - -test('ultimate wildcards – handles circulars – restore', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['bar.baz.*'], serialize: false }) - const bar = { b: 2 } - const o = { a: 1, bar } - bar.baz = bar - o.bar.baz = o.bar - is(o.bar.baz, bar) - redact(o) - is(o.bar.baz, censor) - redact.restore(o) - is(o.bar.baz, bar) - end() -}) - -test('ultimate wildcards – handles circulars and cross references – restore', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['bar.baz.*', 'cf.*'], serialize: false }) - const bar = { b: 2 } - const o = { a: 1, bar, cf: { bar } } - bar.baz = bar - o.bar.baz = o.bar - is(o.bar.baz, bar) - is(o.cf.bar, bar) - redact(o) - is(o.bar.baz, censor) - is(o.cf.bar, censor) - redact.restore(o) - is(o.bar.baz, bar) - is(o.cf.bar, bar) - end() -}) - -test('static + wildcards', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b.c', 'a.d.*', 'a.b.z.*'], serialize: false }) - const result = redact({ a: { b: { c: 's', z: { x: 's', y: 's' } }, d: { a: 's', b: 's', c: 's' } } }) - - is(result.a.b.c, censor) - is(result.a.d.a, censor) - is(result.a.d.b, censor) - is(result.a.d.c, censor) - is(result.a.b.z.x, censor) - is(result.a.b.z.y, censor) - end() -}) - -test('static + wildcards reuse', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b.c', 'a.d.*'], serialize: false }) - const result = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - - is(result.a.b.c, censor) - is(result.a.d.a, censor) - is(result.a.d.b, censor) - is(result.a.d.c, censor) - - redact.restore(result) - - const result2 = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result2.a.b.c, censor) - is(result2.a.d.a, censor) - is(result2.a.d.b, censor) - is(result2.a.d.c, censor) - - redact.restore(result2) - end() -}) - -test('parent wildcard – first position', ({ end, is }) => { - const redact = fastRedact({ paths: ['*.c'], serialize: false }) - const result = redact({ b: { c: 's' }, d: { a: 's', b: 's', c: 's' } }) - is(result.b.c, censor) - is(result.d.a, 's') - is(result.d.b, 's') - is(result.d.c, censor) - end() -}) - -test('parent wildcard – one following key', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.*.c'], serialize: false }) - const result = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b.c, censor) - is(result.a.d.a, 's') - is(result.a.d.b, 's') - is(result.a.d.c, censor) - end() -}) - -test('restore parent wildcard – one following key', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.*.c'], serialize: false }) - const result = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - redact.restore(result) - is(result.a.b.c, 's') - is(result.a.d.a, 's') - is(result.a.d.b, 's') - is(result.a.d.c, 's') - end() -}) - -test('parent wildcard – one following key – reuse', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.*.c'], serialize: false }) - const result = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b.c, censor) - is(result.a.d.a, 's') - is(result.a.d.b, 's') - is(result.a.d.c, censor) - const result2 = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result2.a.b.c, censor) - is(result2.a.d.a, 's') - is(result2.a.d.b, 's') - is(result2.a.d.c, censor) - redact.restore(result2) - end() -}) - -test('parent wildcard – two following keys', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.*.x.c'], serialize: false }) - const result = redact({ a: { b: { x: { c: 's' } }, d: { x: { a: 's', b: 's', c: 's' } } } }) - is(result.a.b.x.c, censor) - is(result.a.d.x.a, 's') - is(result.a.d.x.b, 's') - is(result.a.d.x.c, censor) - end() -}) - -test('parent wildcard – two following keys – reuse', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.*.x.c'], serialize: false }) - const result = redact({ a: { b: { x: { c: 's' } }, d: { x: { a: 's', b: 's', c: 's' } } } }) - is(result.a.b.x.c, censor) - is(result.a.d.x.a, 's') - is(result.a.d.x.b, 's') - is(result.a.d.x.c, censor) - redact.restore(result) - const result2 = redact({ a: { b: { x: { c: 's' } }, d: { x: { a: 's', b: 's', c: 's' } } } }) - is(result2.a.b.x.c, censor) - is(result2.a.d.x.a, 's') - is(result2.a.d.x.b, 's') - is(result2.a.d.x.c, censor) - end() -}) - -test('restore parent wildcard – two following keys', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.*.x.c'], serialize: false }) - const result = redact({ a: { b: { x: { c: 's' } }, d: { x: { a: 's', b: 's', c: 's' } } } }) - redact.restore(result) - is(result.a.b.x.c, 's') - is(result.a.d.x.a, 's') - is(result.a.d.x.b, 's') - is(result.a.d.x.c, 's') - end() -}) - -test('parent wildcard - array', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b[*].x'], serialize: false }) - const result = redact({ a: { b: [{ x: 1 }, { a: 2 }], d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b[0].x, censor) - is(result.a.b[1].a, 2) - is(result.a.d.a, 's') - is(result.a.d.b, 's') - end() -}) - -test('parent wildcards – array – single index', ({ end, same }) => { - const redact = fastRedact({ paths: ['insideArray.like[3].*.foo'], serialize: false }) - same(redact({ insideArray: { like: ['a', 'b', 'c', { this: { foo: 'meow' } }] } }), { insideArray: { like: ['a', 'b', 'c', { this: { foo: censor } }] } }) - end() -}) - -test('parent wildcards - handles null proto objects', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.*.c'], serialize: false }) - const result = redact({ __proto__: null, a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b.c, censor) - end() -}) - -test('parent wildcards - handles paths that do not match object structure', ({ end, same }) => { - const redact = fastRedact({ paths: ['a.*.y.z'], serialize: false }) - same(redact({ a: { b: { c: 's' } } }), { a: { b: { c: 's' } } }) - end() -}) - -test('parent wildcards - gracefully handles primitives that match intermediate keys in paths', ({ end, same }) => { - const redact = fastRedact({ paths: ['a.*.c'], serialize: false }) - same(redact({ a: { b: null } }), { a: { b: null } }) - same(redact({ a: { b: 's' } }), { a: { b: 's' } }) - same(redact({ a: { b: 1 } }), { a: { b: 1 } }) - same(redact({ a: { b: undefined } }), { a: { b: undefined } }) - same(redact({ a: { b: true } }), { a: { b: true } }) - const sym = Symbol('sym') - same(redact({ a: { b: sym } }), { a: { b: sym } }) - end() -}) - -test('parent wildcards – handles circulars', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['x.*.baz'], serialize: false }) - const bar = { b: 2 } - const o = { x: { a: 1, bar } } - bar.baz = bar - o.x.bar.baz = o.x.bar - same(redact(o), { x: { a: 1, bar: { b: 2, baz: censor } } }) - end() -}) - -test('parent wildcards – handles circulars – restore', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['x.*.baz'], serialize: false }) - const bar = { b: 2 } - const o = { x: { a: 1, bar } } - bar.baz = bar - o.x.bar.baz = o.x.bar - is(o.x.bar.baz, bar) - redact(o) - is(o.x.a, 1) - is(o.x.bar.baz, censor) - redact.restore(o) - is(o.x.bar.baz, bar) - end() -}) - -test('parent wildcards – handles circulars and cross references – restore', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['x.*.baz', 'x.*.cf.bar'], serialize: false }) - const bar = { b: 2 } - const o = { x: { a: 1, bar, y: { cf: { bar } } } } - bar.baz = bar - o.x.bar.baz = o.x.bar - is(o.x.bar.baz, bar) - is(o.x.y.cf.bar, bar) - redact(o) - is(o.x.bar.baz, censor) - is(o.x.y.cf.bar, censor) - redact.restore(o) - is(o.x.bar.baz, bar) - is(o.x.y.cf.bar, bar) - end() -}) - -test('parent wildcards – handles missing paths', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['z.*.baz'] }) - const o = { a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } } - is(redact(o), JSON.stringify(o)) - end() -}) - -test('ultimate wildcards – handles missing paths', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['z.*'] }) - const o = { a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } } - is(redact(o), JSON.stringify(o)) - end() -}) - -test('parent wildcards – removes during serialization instead of redacting when remove option is true', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.*.c'], remove: true }) - const o = { a: { b: { c: 'c' }, x: { c: 1 } } } - is(redact(o), `{"a":{"b":{},"x":{}}}`) - end() -}) - -test('ultimate wildcards – removes during serialization instead of redacting when remove option is true', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b.*'], remove: true }) - const o = { a: { b: { c: 'c' }, x: { c: 1 } } } - is(redact(o), `{"a":{"b":{},"x":{"c":1}}}`) - end() -}) - -test('supports leading bracket notation', ({ end, is }) => { - const redact = fastRedact({ paths: ['["a"].b.c'] }) - const o = { a: { b: { c: 'd' } } } - is(redact(o), `{"a":{"b":{"c":"${censor}"}}}`) - end() -}) - -test('supports leading bracket notation containing non-legal keyword characters', ({ end, is }) => { - const redact = fastRedact({ paths: ['["a-x"].b.c'] }) - const o = { 'a-x': { b: { c: 'd' } } } - is(redact(o), `{"a-x":{"b":{"c":"${censor}"}}}`) - end() -}) - -test('supports single leading bracket', ({ end, is }) => { - const censor = 'test' - const redact = fastRedact({ paths: ['["a"]'], censor, serialize: false }) - is(redact({ a: 'a' }).a, censor) - end() -}) - -test('supports single leading bracket containing non-legal keyword characters', ({ end, is }) => { - const censor = 'test' - const redact = fastRedact({ paths: ['["a-x"]'], censor, serialize: false }) - is(redact({ 'a-x': 'a' })['a-x'], censor) - end() -}) - -test('(leading brackets) ultimate wildcards – handles circulars and cross references – restore', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['bar.baz.*', 'cf.*'], serialize: false }) - const bar = { b: 2 } - const o = { a: 1, bar, cf: { bar } } - bar.baz = bar - o.bar.baz = o.bar - is(o.bar.baz, bar) - is(o.cf.bar, bar) - redact(o) - is(o.bar.baz, censor) - is(o.cf.bar, censor) - redact.restore(o) - is(o.bar.baz, bar) - is(o.cf.bar, bar) - end() -}) - -test('(leading brackets) parent wildcards – handles circulars and cross references – restore', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['["x"].*.baz', '["x"].*.cf.bar'], serialize: false }) - const bar = { b: 2 } - const o = { x: { a: 1, bar, y: { cf: { bar } } } } - bar.baz = bar - o.x.bar.baz = o.x.bar - is(o.x.bar.baz, bar) - is(o.x.y.cf.bar, bar) - redact(o) - is(o.x.bar.baz, censor) - is(o.x.y.cf.bar, censor) - redact.restore(o) - is(o.x.bar.baz, bar) - is(o.x.y.cf.bar, bar) - end() -}) - -test('(leading brackets) ultimate wildcards – handles missing paths', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['["z"].*'] }) - const o = { a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } } - is(redact(o), JSON.stringify(o)) - end() -}) - -test('(leading brackets) static + wildcards reuse', ({ end, is }) => { - const redact = fastRedact({ paths: ['["a"].b.c', '["a"].d.*'], serialize: false }) - const result = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - - is(result.a.b.c, censor) - is(result.a.d.a, censor) - is(result.a.d.b, censor) - is(result.a.d.c, censor) - - redact.restore(result) - - const result2 = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result2.a.b.c, censor) - is(result2.a.d.a, censor) - is(result2.a.d.b, censor) - is(result2.a.d.c, censor) - - redact.restore(result2) - end() -}) - -test('correctly restores original object when a path does not match object', ({ end, is }) => { - const redact = fastRedact({ paths: ['foo.bar'], strict: false }) - const o = {} - is(redact({ foo: o }), '{"foo":{}}') - is(o.hasOwnProperty('bar'), false) - end() -}) - -test('correctly restores original object when a matching path has value of `undefined`', ({ end, is }) => { - const redact = fastRedact({ paths: ['foo.bar'], strict: false }) - const o = { bar: undefined } - is(redact({ foo: o }), '{"foo":{}}') - is(o.hasOwnProperty('bar'), true) - is(o.bar, undefined) - end() -}) - -test('correctly restores keys matching a static path and a wildcard', ({ end, is }) => { - const redact = fastRedact({ - paths: ['a', '*.b', 'x.b'], - serialize: false - }) - const o = { x: { a: 'a', b: 'b' } } - redact(o) - is(o.x.a, 'a') - is(o.x.b, '[REDACTED]') - redact.restore(o) - is(o.x.a, 'a') - is(o.x.b, 'b') - end() -}) - -test('correctly restores keys matching multiple wildcards', ({ end, is }) => { - const redact = fastRedact({ - paths: ['a', '*.b', 'x.*', 'y.*.z'], - serialize: false - }) - const o = { x: { a: 'a', b: 'b' }, y: { f: { z: 'z' } } } - redact(o) - is(o.x.a, '[REDACTED]') - is(o.x.b, '[REDACTED]') - is(o.y.f.z, '[REDACTED]') - redact.restore(o) - is(o.x.a, 'a') - is(o.x.b, 'b') - is(o.y.f.z, 'z') - end() -}) - -test('handles multiple paths with leading brackets', ({ end, is }) => { - const redact = fastRedact({ paths: ['["x-y"]', '["y-x"]'] }) - const o = { 'x-y': 'test', 'y-x': 'test2' } - is(redact(o), '{"x-y":"[REDACTED]","y-x":"[REDACTED]"}') - end() -}) - -test('handles objects with and then without target paths', ({ end, is }) => { - const redact = fastRedact({ paths: ['test'] }) - const o1 = { test: 'check' } - const o2 = {} - is(redact(o1), '{"test":"[REDACTED]"}') - is(redact(o2), '{}') - // run each check twice to ensure no mutations - is(redact(o1), '{"test":"[REDACTED]"}') - is(redact(o2), '{}') - is('test' in o1, true) - is('test' in o2, false) - end() -}) - -test('handles leading wildcards and null values', ({ end, is }) => { - const redact = fastRedact({ paths: ['*.test'] }) - const o = { prop: null } - is(redact(o), '{"prop":null}') - is(o.prop, null) - end() -}) - -test('handles keys with dots', ({ end, is }) => { - const redactSingleQ = fastRedact({ paths: [`a['b.c']`], serialize: false }) - const redactDoubleQ = fastRedact({ paths: [`a["b.c"]`], serialize: false }) - const redactBacktickQ = fastRedact({ paths: ['a[`b.c`]'], serialize: false }) - const redactNum = fastRedact({ paths: [`a[-1.2]`], serialize: false }) - const redactLeading = fastRedact({ paths: [`["b.c"]`], serialize: false }) - is(redactSingleQ({ a: { 'b.c': 'x', '-1.2': 'x' } }).a['b.c'], censor) - is(redactDoubleQ({ a: { 'b.c': 'x', '-1.2': 'x' } }).a['b.c'], censor) - is(redactBacktickQ({ a: { 'b.c': 'x', '-1.2': 'x' } }).a['b.c'], censor) - is(redactNum({ a: { 'b.c': 'x', '-1.2': 'x' } }).a['-1.2'], censor) - is(redactLeading({ 'b.c': 'x', '-1.2': 'x' })['b.c'], censor) - end() -}) diff --git a/node_modules/fast-safe-stringify/.travis.yml b/node_modules/fast-safe-stringify/.travis.yml deleted file mode 100644 index 2b06d253..00000000 --- a/node_modules/fast-safe-stringify/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -sudo: false -node_js: -- '4' -- '6' -- '8' -- '9' -- '10' diff --git a/node_modules/fast-safe-stringify/CHANGELOG.md b/node_modules/fast-safe-stringify/CHANGELOG.md deleted file mode 100644 index 55f2d082..00000000 --- a/node_modules/fast-safe-stringify/CHANGELOG.md +++ /dev/null @@ -1,17 +0,0 @@ -# Changelog - -## v.2.0.0 - -Features - -- Added stable-stringify (see documentation) -- Support replacer -- Support spacer -- toJSON support without forceDecirc property -- Improved performance - -Breaking changes - -- Manipulating the input value in a `toJSON` function is not possible anymore in - all cases (see documentation) -- Dropped support for e.g. IE8 and Node.js < 4 diff --git a/node_modules/fast-safe-stringify/LICENSE b/node_modules/fast-safe-stringify/LICENSE deleted file mode 100644 index d310c2d1..00000000 --- a/node_modules/fast-safe-stringify/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 David Mark Clements -Copyright (c) 2017 David Mark Clements & Matteo Collina -Copyright (c) 2018 David Mark Clements, Matteo Collina & Ruben Bridgewater - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/fast-safe-stringify/benchmark.js b/node_modules/fast-safe-stringify/benchmark.js deleted file mode 100644 index 7ba5e9f5..00000000 --- a/node_modules/fast-safe-stringify/benchmark.js +++ /dev/null @@ -1,137 +0,0 @@ -const Benchmark = require('benchmark') -const suite = new Benchmark.Suite() -const { inspect } = require('util') -const jsonStringifySafe = require('json-stringify-safe') -const fastSafeStringify = require('./') - -const array = new Array(10).fill(0).map((_, i) => i) -const obj = { foo: array } -const circ = JSON.parse(JSON.stringify(obj)) -circ.o = { obj: circ, array } -const circGetters = JSON.parse(JSON.stringify(obj)) -Object.assign(circGetters, { get o () { return { obj: circGetters, array } } }) - -const deep = require('./package.json') -deep.deep = JSON.parse(JSON.stringify(deep)) -deep.deep.deep = JSON.parse(JSON.stringify(deep)) -deep.deep.deep.deep = JSON.parse(JSON.stringify(deep)) -deep.array = array - -const deepCirc = JSON.parse(JSON.stringify(deep)) -deepCirc.deep.deep.deep.circ = deepCirc -deepCirc.deep.deep.circ = deepCirc -deepCirc.deep.circ = deepCirc -deepCirc.array = array - -const deepCircGetters = JSON.parse(JSON.stringify(deep)) -for (let i = 0; i < 10; i++) { - deepCircGetters[i.toString()] = { - deep: { - deep: { - get circ () { return deep.deep }, - deep: { get circ () { return deep.deep.deep } } - }, - get circ () { return deep } - }, - get array () { return array } - } -} - -const deepCircNonCongifurableGetters = JSON.parse(JSON.stringify(deep)) -Object.defineProperty(deepCircNonCongifurableGetters.deep.deep.deep, 'circ', { - get: () => deepCircNonCongifurableGetters, - enumerable: true, - configurable: false -}) -Object.defineProperty(deepCircNonCongifurableGetters.deep.deep, 'circ', { - get: () => deepCircNonCongifurableGetters, - enumerable: true, - configurable: false -}) -Object.defineProperty(deepCircNonCongifurableGetters.deep, 'circ', { - get: () => deepCircNonCongifurableGetters, - enumerable: true, - configurable: false -}) -Object.defineProperty(deepCircNonCongifurableGetters, 'array', { - get: () => array, - enumerable: true, - configurable: false -}) - -suite.add('util.inspect: simple object ', function () { - inspect(obj, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: circular ', function () { - inspect(circ, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: circular getters ', function () { - inspect(circGetters, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: deep ', function () { - inspect(deep, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: deep circular ', function () { - inspect(deepCirc, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: large deep circular getters ', function () { - inspect(deepCircGetters, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: deep non-conf circular getters', function () { - inspect(deepCircNonCongifurableGetters, { showHidden: false, depth: null }) -}) - -suite.add('\njson-stringify-safe: simple object ', function () { - jsonStringifySafe(obj) -}) -suite.add('json-stringify-safe: circular ', function () { - jsonStringifySafe(circ) -}) -suite.add('json-stringify-safe: circular getters ', function () { - jsonStringifySafe(circGetters) -}) -suite.add('json-stringify-safe: deep ', function () { - jsonStringifySafe(deep) -}) -suite.add('json-stringify-safe: deep circular ', function () { - jsonStringifySafe(deepCirc) -}) -suite.add('json-stringify-safe: large deep circular getters ', function () { - jsonStringifySafe(deepCircGetters) -}) -suite.add('json-stringify-safe: deep non-conf circular getters', function () { - jsonStringifySafe(deepCircNonCongifurableGetters) -}) - -suite.add('\nfast-safe-stringify: simple object ', function () { - fastSafeStringify(obj) -}) -suite.add('fast-safe-stringify: circular ', function () { - fastSafeStringify(circ) -}) -suite.add('fast-safe-stringify: circular getters ', function () { - fastSafeStringify(circGetters) -}) -suite.add('fast-safe-stringify: deep ', function () { - fastSafeStringify(deep) -}) -suite.add('fast-safe-stringify: deep circular ', function () { - fastSafeStringify(deepCirc) -}) -suite.add('fast-safe-stringify: large deep circular getters ', function () { - fastSafeStringify(deepCircGetters) -}) -suite.add('fast-safe-stringify: deep non-conf circular getters', function () { - fastSafeStringify(deepCircNonCongifurableGetters) -}) - -// add listeners -suite.on('cycle', function (event) { - console.log(String(event.target)) -}) - -suite.on('complete', function () { - console.log('\nFastest is ' + this.filter('fastest').map('name')) -}) - -suite.run({ delay: 1, minSamples: 150 }) diff --git a/node_modules/fast-safe-stringify/index.d.ts b/node_modules/fast-safe-stringify/index.d.ts deleted file mode 100644 index 56f68653..00000000 --- a/node_modules/fast-safe-stringify/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare function stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string; - -declare namespace stringify { - export function stable(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string; - export function stableStringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string; -} - -export default stringify; diff --git a/node_modules/fast-safe-stringify/index.js b/node_modules/fast-safe-stringify/index.js deleted file mode 100644 index e29ffa53..00000000 --- a/node_modules/fast-safe-stringify/index.js +++ /dev/null @@ -1,176 +0,0 @@ -module.exports = stringify -stringify.default = stringify -stringify.stable = deterministicStringify -stringify.stableStringify = deterministicStringify - -var arr = [] -var replacerStack = [] - -// Regular stringify -function stringify (obj, replacer, spacer) { - decirc(obj, '', [], undefined) - var res - try { - if (replacerStack.length === 0) { - res = JSON.stringify(obj, replacer, spacer) - } else { - res = JSON.stringify(obj, replaceGetterValues(replacer), spacer) - } - } catch (_) { - return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]') - } finally { - while (arr.length !== 0) { - var part = arr.pop() - if (part.length === 4) { - Object.defineProperty(part[0], part[1], part[3]) - } else { - part[0][part[1]] = part[2] - } - } - } - return res -} -function decirc (val, k, stack, parent) { - var i - if (typeof val === 'object' && val !== null) { - for (i = 0; i < stack.length; i++) { - if (stack[i] === val) { - var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k) - if (propertyDescriptor.get !== undefined) { - if (propertyDescriptor.configurable) { - Object.defineProperty(parent, k, { value: '[Circular]' }) - arr.push([parent, k, val, propertyDescriptor]) - } else { - replacerStack.push([val, k]) - } - } else { - parent[k] = '[Circular]' - arr.push([parent, k, val]) - } - return - } - } - stack.push(val) - // Optimize for Arrays. Big arrays could kill the performance otherwise! - if (Array.isArray(val)) { - for (i = 0; i < val.length; i++) { - decirc(val[i], i, stack, val) - } - } else { - var keys = Object.keys(val) - for (i = 0; i < keys.length; i++) { - var key = keys[i] - decirc(val[key], key, stack, val) - } - } - stack.pop() - } -} - -// Stable-stringify -function compareFunction (a, b) { - if (a < b) { - return -1 - } - if (a > b) { - return 1 - } - return 0 -} - -function deterministicStringify (obj, replacer, spacer) { - var tmp = deterministicDecirc(obj, '', [], undefined) || obj - var res - try { - if (replacerStack.length === 0) { - res = JSON.stringify(tmp, replacer, spacer) - } else { - res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer) - } - } catch (_) { - return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]') - } finally { - // Ensure that we restore the object as it was. - while (arr.length !== 0) { - var part = arr.pop() - if (part.length === 4) { - Object.defineProperty(part[0], part[1], part[3]) - } else { - part[0][part[1]] = part[2] - } - } - } - return res -} - -function deterministicDecirc (val, k, stack, parent) { - var i - if (typeof val === 'object' && val !== null) { - for (i = 0; i < stack.length; i++) { - if (stack[i] === val) { - var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k) - if (propertyDescriptor.get !== undefined) { - if (propertyDescriptor.configurable) { - Object.defineProperty(parent, k, { value: '[Circular]' }) - arr.push([parent, k, val, propertyDescriptor]) - } else { - replacerStack.push([val, k]) - } - } else { - parent[k] = '[Circular]' - arr.push([parent, k, val]) - } - return - } - } - try { - if (typeof val.toJSON === 'function') { - return - } - } catch (_) { - return - } - stack.push(val) - // Optimize for Arrays. Big arrays could kill the performance otherwise! - if (Array.isArray(val)) { - for (i = 0; i < val.length; i++) { - deterministicDecirc(val[i], i, stack, val) - } - } else { - // Create a temporary object in the required way - var tmp = {} - var keys = Object.keys(val).sort(compareFunction) - for (i = 0; i < keys.length; i++) { - var key = keys[i] - deterministicDecirc(val[key], key, stack, val) - tmp[key] = val[key] - } - if (parent !== undefined) { - arr.push([parent, k, val]) - parent[k] = tmp - } else { - return tmp - } - } - stack.pop() - } -} - -// wraps replacer function to handle values we couldn't replace -// and mark them as [Circular] -function replaceGetterValues (replacer) { - replacer = replacer !== undefined ? replacer : function (k, v) { return v } - return function (key, val) { - if (replacerStack.length > 0) { - for (var i = 0; i < replacerStack.length; i++) { - var part = replacerStack[i] - if (part[1] === key && part[0] === val) { - val = '[Circular]' - replacerStack.splice(i, 1) - break - } - } - } - return replacer.call(this, key, val) - } -} diff --git a/node_modules/fast-safe-stringify/package.json b/node_modules/fast-safe-stringify/package.json deleted file mode 100644 index a0d40c77..00000000 --- a/node_modules/fast-safe-stringify/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "_from": "fast-safe-stringify@^2.0.7", - "_id": "fast-safe-stringify@2.0.8", - "_inBundle": false, - "_integrity": "sha512-lXatBjf3WPjmWD6DpIZxkeSsCOwqI0maYMpgDlx8g4U2qi4lbjA9oH/HD2a87G+KfsUmo5WbJFmqBZlPxtptag==", - "_location": "/fast-safe-stringify", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "fast-safe-stringify@^2.0.7", - "name": "fast-safe-stringify", - "escapedName": "fast-safe-stringify", - "rawSpec": "^2.0.7", - "saveSpec": null, - "fetchSpec": "^2.0.7" - }, - "_requiredBy": [ - "/pino", - "/pino-pretty" - ], - "_resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.8.tgz", - "_shasum": "dc2af48c46cf712b683e849b2bbd446b32de936f", - "_spec": "fast-safe-stringify@^2.0.7", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pino", - "author": { - "name": "David Mark Clements" - }, - "bugs": { - "url": "https://github.com/davidmarkclements/fast-safe-stringify/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Ruben Bridgewater" - }, - { - "name": "Matteo Collina" - }, - { - "name": "Ben Gourley" - }, - { - "name": "Gabriel Lesperance" - }, - { - "name": "Alex Liu" - }, - { - "name": "Christoph Walcher" - }, - { - "name": "Nicholas Young" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "Safely and quickly serialize JavaScript objects", - "devDependencies": { - "benchmark": "^2.1.4", - "clone": "^2.1.0", - "json-stringify-safe": "^5.0.1", - "standard": "^11.0.0", - "tap": "^12.0.0" - }, - "homepage": "https://github.com/davidmarkclements/fast-safe-stringify#readme", - "keywords": [ - "stable", - "stringify", - "JSON", - "JSON.stringify", - "safe", - "serialize" - ], - "license": "MIT", - "main": "index.js", - "name": "fast-safe-stringify", - "repository": { - "type": "git", - "url": "git+https://github.com/davidmarkclements/fast-safe-stringify.git" - }, - "scripts": { - "benchmark": "node benchmark.js", - "test": "standard && tap --no-esm test.js test-stable.js" - }, - "typings": "index", - "version": "2.0.8" -} diff --git a/node_modules/fast-safe-stringify/readme.md b/node_modules/fast-safe-stringify/readme.md deleted file mode 100644 index cb4446dc..00000000 --- a/node_modules/fast-safe-stringify/readme.md +++ /dev/null @@ -1,156 +0,0 @@ -# fast-safe-stringify - -Safe and fast serialization alternative to [JSON.stringify][]. - -Gracefully handles circular structures instead of throwing in most cases. -It could return an error string if the circular object is too complex to analyze, -e.g. in case there are proxies involved. - -Provides a deterministic ("stable") version as well that will also gracefully -handle circular structures. See the example below for further information. - -## Usage - -The same as [JSON.stringify][]. - -`stringify(value[, replacer[, space]])` - -```js -const safeStringify = require('fast-safe-stringify') -const o = { a: 1 } -o.o = o - -console.log(safeStringify(o)) -// '{"a":1,"o":"[Circular]"}' -console.log(JSON.stringify(o)) -// TypeError: Converting circular structure to JSON - -function replacer(key, value) { - console.log('Key:', JSON.stringify(key), 'Value:', JSON.stringify(value)) - // Remove the circular structure - if (value === '[Circular]') { - return - } - return value -} -const serialized = safeStringify(o, replacer, 2) -// Key: "" Value: {"a":1,"o":"[Circular]"} -// Key: "a" Value: 1 -// Key: "o" Value: "[Circular]" -console.log(serialized) -// { -// "a": 1 -// } -``` - -Using the deterministic version also works the same: - -```js -const safeStringify = require('fast-safe-stringify') -const o = { b: 1, a: 0 } -o.o = o - -console.log(safeStringify(o)) -// '{"b":1,"a":0,"o":"[Circular]"}' -console.log(safeStringify.stableStringify(o)) -// '{"a":0,"b":1,"o":"[Circular]"}' -console.log(JSON.stringify(o)) -// TypeError: Converting circular structure to JSON -``` - -A faster and side-effect free implementation is available in the -[safe-stable-stringify][] module. However it is still considered experimental -due to a new and more complex implementation. - -## Differences to JSON.stringify - -In general the behavior is identical to [JSON.stringify][]. The [`replacer`][] -and [`space`][] options are also available. - -A few exceptions exist to [JSON.stringify][] while using [`toJSON`][] or -[`replacer`][]: - -### Regular safe stringify - -- Manipulating a circular structure of the passed in value in a `toJSON` or the - `replacer` is not possible! It is possible for any other value and property. - -- In case a circular structure is detected and the [`replacer`][] is used it - will receive the string `[Circular]` as the argument instead of the circular - object itself. - -### Deterministic ("stable") safe stringify - -- Manipulating the input object either in a [`toJSON`][] or the [`replacer`][] - function will not have any effect on the output. The output entirely relies on - the shape the input value had at the point passed to the stringify function! - -- In case a circular structure is detected and the [`replacer`][] is used it - will receive the string `[Circular]` as the argument instead of the circular - object itself. - -A side effect free variation without these limitations can be found as well -([`safe-stable-stringify`][]). It is also faster than the current -implementation. It is still considered experimental due to a new and more -complex implementation. - -## Benchmarks - -Although not JSON, the Node.js `util.inspect` method can be used for similar -purposes (e.g. logging) and also handles circular references. - -Here we compare `fast-safe-stringify` with some alternatives: -(Lenovo T450s with a i7-5600U CPU using Node.js 8.9.4) - -```md -fast-safe-stringify: simple object x 1,121,497 ops/sec ±0.75% (97 runs sampled) -fast-safe-stringify: circular x 560,126 ops/sec ±0.64% (96 runs sampled) -fast-safe-stringify: deep x 32,472 ops/sec ±0.57% (95 runs sampled) -fast-safe-stringify: deep circular x 32,513 ops/sec ±0.80% (92 runs sampled) - -util.inspect: simple object x 272,837 ops/sec ±1.48% (90 runs sampled) -util.inspect: circular x 116,896 ops/sec ±1.19% (95 runs sampled) -util.inspect: deep x 19,382 ops/sec ±0.66% (92 runs sampled) -util.inspect: deep circular x 18,717 ops/sec ±0.63% (96 runs sampled) - -json-stringify-safe: simple object x 233,621 ops/sec ±0.97% (94 runs sampled) -json-stringify-safe: circular x 110,409 ops/sec ±1.85% (95 runs sampled) -json-stringify-safe: deep x 8,705 ops/sec ±0.87% (96 runs sampled) -json-stringify-safe: deep circular x 8,336 ops/sec ±2.20% (93 runs sampled) -``` - -For stable stringify comparisons, see the performance benchmarks in the -[`safe-stable-stringify`][] readme. - -## Protip - -Whether `fast-safe-stringify` or alternatives are used: if the use case -consists of deeply nested objects without circular references the following -pattern will give best results. -Shallow or one level nested objects on the other hand will slow down with it. -It is entirely dependant on the use case. - -```js -const stringify = require('fast-safe-stringify') - -function tryJSONStringify (obj) { - try { return JSON.stringify(obj) } catch (_) {} -} - -const serializedString = tryJSONStringify(deep) || stringify(deep) -``` - -## Acknowledgements - -Sponsored by [nearForm](http://nearform.com) - -## License - -MIT - -[`replacer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The%20replacer%20parameter -[`safe-stable-stringify`]: https://github.com/BridgeAR/safe-stable-stringify -[`space`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The%20space%20argument -[`toJSON`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON()_behavior -[benchmark]: https://github.com/epoberezkin/fast-json-stable-stringify/blob/67f688f7441010cfef91a6147280cc501701e83b/benchmark -[JSON.stringify]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify diff --git a/node_modules/fast-safe-stringify/test-stable.js b/node_modules/fast-safe-stringify/test-stable.js deleted file mode 100644 index 3d26f77e..00000000 --- a/node_modules/fast-safe-stringify/test-stable.js +++ /dev/null @@ -1,323 +0,0 @@ -const test = require('tap').test -const fss = require('./').stable -const clone = require('clone') -const s = JSON.stringify -const stream = require('stream') - -test('circular reference to root', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.circle = fixture - const expected = s( - { circle: '[Circular]', name: 'Tywin Lannister' } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular getter reference to root', function (assert) { - const fixture = { - name: 'Tywin Lannister', - get circle () { - return fixture - } - } - - const expected = s( - { circle: '[Circular]', name: 'Tywin Lannister' } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular reference to root', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.id = { circle: fixture } - const expected = s( - { id: { circle: '[Circular]' }, name: 'Tywin Lannister' } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('child circular reference', function (assert) { - const fixture = { name: 'Tywin Lannister', child: { name: 'Tyrion Lannister' } } - fixture.child.dinklage = fixture.child - const expected = s({ - child: { - dinklage: '[Circular]', name: 'Tyrion Lannister' - }, - name: 'Tywin Lannister' - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested child circular reference', function (assert) { - const fixture = { name: 'Tywin Lannister', child: { name: 'Tyrion Lannister' } } - fixture.child.actor = { dinklage: fixture.child } - const expected = s({ - child: { - actor: { dinklage: '[Circular]' }, name: 'Tyrion Lannister' - }, - name: 'Tywin Lannister' - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular objects in an array', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.hand = [fixture, fixture] - const expected = s({ - hand: ['[Circular]', '[Circular]'], name: 'Tywin Lannister' - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular references in an array', function (assert) { - const fixture = { - name: 'Tywin Lannister', - offspring: [{ name: 'Tyrion Lannister' }, { name: 'Cersei Lannister' }] - } - fixture.offspring[0].dinklage = fixture.offspring[0] - fixture.offspring[1].headey = fixture.offspring[1] - - const expected = s({ - name: 'Tywin Lannister', - offspring: [ - { dinklage: '[Circular]', name: 'Tyrion Lannister' }, - { headey: '[Circular]', name: 'Cersei Lannister' } - ] - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular arrays', function (assert) { - const fixture = [] - fixture.push(fixture, fixture) - const expected = s(['[Circular]', '[Circular]']) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular arrays', function (assert) { - const fixture = [] - fixture.push( - { name: 'Jon Snow', bastards: fixture }, - { name: 'Ramsay Bolton', bastards: fixture } - ) - const expected = s([ - { bastards: '[Circular]', name: 'Jon Snow' }, - { bastards: '[Circular]', name: 'Ramsay Bolton' } - ]) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('repeated non-circular references in objects', function (assert) { - const daenerys = { name: 'Daenerys Targaryen' } - const fixture = { - motherOfDragons: daenerys, - queenOfMeereen: daenerys - } - const expected = s(fixture) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('repeated non-circular references in arrays', function (assert) { - const daenerys = { name: 'Daenerys Targaryen' } - const fixture = [daenerys, daenerys] - const expected = s(fixture) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('double child circular reference', function (assert) { - // create circular reference - const child = { name: 'Tyrion Lannister' } - child.dinklage = child - - // include it twice in the fixture - const fixture = { name: 'Tywin Lannister', childA: child, childB: child } - const cloned = clone(fixture) - const expected = s({ - childA: { - dinklage: '[Circular]', name: 'Tyrion Lannister' - }, - childB: { - dinklage: '[Circular]', name: 'Tyrion Lannister' - }, - name: 'Tywin Lannister' - }) - const actual = fss(fixture) - assert.is(actual, expected) - - // check if the fixture has not been modified - assert.deepEqual(fixture, cloned) - assert.end() -}) - -test('child circular reference with toJSON', function (assert) { - // Create a test object that has an overriden `toJSON` property - TestObject.prototype.toJSON = function () { return { special: 'case' } } - function TestObject (content) {} - - // Creating a simple circular object structure - const parentObject = {} - parentObject.childObject = new TestObject() - parentObject.childObject.parentObject = parentObject - - // Creating a simple circular object structure - const otherParentObject = new TestObject() - otherParentObject.otherChildObject = {} - otherParentObject.otherChildObject.otherParentObject = otherParentObject - - // Making sure our original tests work - assert.deepEqual(parentObject.childObject.parentObject, parentObject) - assert.deepEqual(otherParentObject.otherChildObject.otherParentObject, otherParentObject) - - // Should both be idempotent - assert.equal(fss(parentObject), '{"childObject":{"special":"case"}}') - assert.equal(fss(otherParentObject), '{"special":"case"}') - - // Therefore the following assertion should be `true` - assert.deepEqual(parentObject.childObject.parentObject, parentObject) - assert.deepEqual(otherParentObject.otherChildObject.otherParentObject, otherParentObject) - - assert.end() -}) - -test('null object', function (assert) { - const expected = s(null) - const actual = fss(null) - assert.is(actual, expected) - assert.end() -}) - -test('null property', function (assert) { - const expected = s({ f: null }) - const actual = fss({ f: null }) - assert.is(actual, expected) - assert.end() -}) - -test('nested child circular reference in toJSON', function (assert) { - var circle = { some: 'data' } - circle.circle = circle - var a = { - b: { - toJSON: function () { - a.b = 2 - return '[Redacted]' - } - }, - baz: { - circle, - toJSON: function () { - a.baz = circle - return '[Redacted]' - } - } - } - var o = { - a, - bar: a - } - - const expected = s({ - a: { - b: '[Redacted]', - baz: '[Redacted]' - }, - bar: { - // TODO: This is a known limitation of the current implementation. - // The ideal result would be: - // - // b: 2, - // baz: { - // circle: '[Circular]', - // some: 'data' - // } - // - b: '[Redacted]', - baz: '[Redacted]' - } - }) - const actual = fss(o) - assert.is(actual, expected) - assert.end() -}) - -test('circular getters are restored when stringified', function (assert) { - const fixture = { - name: 'Tywin Lannister', - get circle () { - return fixture - } - } - fss(fixture) - - assert.is(fixture.circle, fixture) - assert.end() -}) - -test('non-configurable circular getters use a replacer instead of markers', function (assert) { - const fixture = { name: 'Tywin Lannister' } - Object.defineProperty(fixture, 'circle', { - configurable: false, - get: function () { return fixture }, - enumerable: true - }) - - fss(fixture) - - assert.is(fixture.circle, fixture) - assert.end() -}) - -test('getter child circular reference', function (assert) { - const fixture = { - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', - get dinklage () { return fixture.child } - }, - get self () { return fixture } - } - - const expected = s({ - child: { - dinklage: '[Circular]', name: 'Tyrion Lannister' - }, - name: 'Tywin Lannister', - self: '[Circular]' - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('Proxy throwing', function (assert) { - assert.plan(1) - const s = new stream.PassThrough() - s.resume() - s.write('', () => { - assert.end() - }) - const actual = fss({ s, p: new Proxy({}, { get() { throw new Error('kaboom') } }) }) - assert.is(actual, '"[unable to serialize, circular reference is too complex to analyze]"') -}) diff --git a/node_modules/fast-safe-stringify/test.js b/node_modules/fast-safe-stringify/test.js deleted file mode 100644 index ffef1d3a..00000000 --- a/node_modules/fast-safe-stringify/test.js +++ /dev/null @@ -1,316 +0,0 @@ -const test = require('tap').test -const fss = require('./') -const clone = require('clone') -const s = JSON.stringify -const stream = require('stream') - -test('circular reference to root', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.circle = fixture - const expected = s( - { name: 'Tywin Lannister', circle: '[Circular]' } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular getter reference to root', function (assert) { - const fixture = { - name: 'Tywin Lannister', - get circle () { - return fixture - } - } - const expected = s( - { name: 'Tywin Lannister', circle: '[Circular]' } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular reference to root', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.id = { circle: fixture } - const expected = s( - { name: 'Tywin Lannister', id: { circle: '[Circular]' } } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('child circular reference', function (assert) { - const fixture = { name: 'Tywin Lannister', child: { name: 'Tyrion Lannister' } } - fixture.child.dinklage = fixture.child - const expected = s({ - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', dinklage: '[Circular]' - } - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested child circular reference', function (assert) { - const fixture = { name: 'Tywin Lannister', child: { name: 'Tyrion Lannister' } } - fixture.child.actor = { dinklage: fixture.child } - const expected = s({ - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', actor: { dinklage: '[Circular]' } - } - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular objects in an array', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.hand = [fixture, fixture] - const expected = s({ - name: 'Tywin Lannister', hand: ['[Circular]', '[Circular]'] - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular references in an array', function (assert) { - const fixture = { - name: 'Tywin Lannister', - offspring: [{ name: 'Tyrion Lannister' }, { name: 'Cersei Lannister' }] - } - fixture.offspring[0].dinklage = fixture.offspring[0] - fixture.offspring[1].headey = fixture.offspring[1] - - const expected = s({ - name: 'Tywin Lannister', - offspring: [ - { name: 'Tyrion Lannister', dinklage: '[Circular]' }, - { name: 'Cersei Lannister', headey: '[Circular]' } - ] - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular arrays', function (assert) { - const fixture = [] - fixture.push(fixture, fixture) - const expected = s(['[Circular]', '[Circular]']) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular arrays', function (assert) { - const fixture = [] - fixture.push( - { name: 'Jon Snow', bastards: fixture }, - { name: 'Ramsay Bolton', bastards: fixture } - ) - const expected = s([ - { name: 'Jon Snow', bastards: '[Circular]' }, - { name: 'Ramsay Bolton', bastards: '[Circular]' } - ]) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('repeated non-circular references in objects', function (assert) { - const daenerys = { name: 'Daenerys Targaryen' } - const fixture = { - motherOfDragons: daenerys, - queenOfMeereen: daenerys - } - const expected = s(fixture) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('repeated non-circular references in arrays', function (assert) { - const daenerys = { name: 'Daenerys Targaryen' } - const fixture = [daenerys, daenerys] - const expected = s(fixture) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('double child circular reference', function (assert) { - // create circular reference - const child = { name: 'Tyrion Lannister' } - child.dinklage = child - - // include it twice in the fixture - const fixture = { name: 'Tywin Lannister', childA: child, childB: child } - const cloned = clone(fixture) - const expected = s({ - name: 'Tywin Lannister', - childA: { - name: 'Tyrion Lannister', dinklage: '[Circular]' - }, - childB: { - name: 'Tyrion Lannister', dinklage: '[Circular]' - } - }) - const actual = fss(fixture) - assert.is(actual, expected) - - // check if the fixture has not been modified - assert.deepEqual(fixture, cloned) - assert.end() -}) - -test('child circular reference with toJSON', function (assert) { - // Create a test object that has an overriden `toJSON` property - TestObject.prototype.toJSON = function () { return { special: 'case' } } - function TestObject (content) {} - - // Creating a simple circular object structure - const parentObject = {} - parentObject.childObject = new TestObject() - parentObject.childObject.parentObject = parentObject - - // Creating a simple circular object structure - const otherParentObject = new TestObject() - otherParentObject.otherChildObject = {} - otherParentObject.otherChildObject.otherParentObject = otherParentObject - - // Making sure our original tests work - assert.deepEqual(parentObject.childObject.parentObject, parentObject) - assert.deepEqual(otherParentObject.otherChildObject.otherParentObject, otherParentObject) - - // Should both be idempotent - assert.equal(fss(parentObject), '{"childObject":{"special":"case"}}') - assert.equal(fss(otherParentObject), '{"special":"case"}') - - // Therefore the following assertion should be `true` - assert.deepEqual(parentObject.childObject.parentObject, parentObject) - assert.deepEqual(otherParentObject.otherChildObject.otherParentObject, otherParentObject) - - assert.end() -}) - -test('null object', function (assert) { - const expected = s(null) - const actual = fss(null) - assert.is(actual, expected) - assert.end() -}) - -test('null property', function (assert) { - const expected = s({ f: null }) - const actual = fss({ f: null }) - assert.is(actual, expected) - assert.end() -}) - -test('nested child circular reference in toJSON', function (assert) { - const circle = { some: 'data' } - circle.circle = circle - const a = { - b: { - toJSON: function () { - a.b = 2 - return '[Redacted]' - } - }, - baz: { - circle, - toJSON: function () { - a.baz = circle - return '[Redacted]' - } - } - } - const o = { - a, - bar: a - } - - const expected = s({ - a: { - b: '[Redacted]', - baz: '[Redacted]' - }, - bar: { - b: 2, - baz: { - some: 'data', - circle: '[Circular]' - } - } - }) - const actual = fss(o) - assert.is(actual, expected) - assert.end() -}) - -test('circular getters are restored when stringified', function (assert) { - const fixture = { - name: 'Tywin Lannister', - get circle () { - return fixture - } - } - fss(fixture) - - assert.is(fixture.circle, fixture) - assert.end() -}) - -test('non-configurable circular getters use a replacer instead of markers', function (assert) { - const fixture = { name: 'Tywin Lannister' } - Object.defineProperty(fixture, 'circle', { - configurable: false, - get: function () { return fixture }, - enumerable: true - }) - - fss(fixture) - - assert.is(fixture.circle, fixture) - assert.end() -}) - -test('getter child circular reference are replaced instead of marked', function (assert) { - const fixture = { - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', - get dinklage () { return fixture.child } - }, - get self () { return fixture } - } - - const expected = s({ - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', dinklage: '[Circular]' - }, - self: '[Circular]' - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('Proxy throwing', function (assert) { - assert.plan(1) - const s = new stream.PassThrough() - s.resume() - s.write('', () => { - assert.end() - }) - const actual = fss({ s, p: new Proxy({}, { get() { throw new Error('kaboom') } }) }) - assert.is(actual, '"[unable to serialize, circular reference is too complex to analyze]"') -}) diff --git a/node_modules/fd-slicer/.npmignore b/node_modules/fd-slicer/.npmignore deleted file mode 100644 index ccc29308..00000000 --- a/node_modules/fd-slicer/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -/coverage -/node_modules diff --git a/node_modules/fd-slicer/.travis.yml b/node_modules/fd-slicer/.travis.yml deleted file mode 100644 index 77b72028..00000000 --- a/node_modules/fd-slicer/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - "0.10" -script: - - "npm run test-travis" -after_script: - - "npm install coveralls@2 && cat ./coverage/lcov.info | ./node_modules/.bin/coveralls" diff --git a/node_modules/fd-slicer/CHANGELOG.md b/node_modules/fd-slicer/CHANGELOG.md deleted file mode 100644 index 783042f8..00000000 --- a/node_modules/fd-slicer/CHANGELOG.md +++ /dev/null @@ -1,49 +0,0 @@ -### 1.0.1 - - * use `setImmediate` instead of `nextTick` - -### 1.0.0 - - * `new FdSlicer(fd, options)` must now be `fdSlicer.createFromFd(fd, options)` - * fix behavior when `end` is 0. - * fix `createWriteStream` when using `createFromBuffer` - -### 0.4.0 - - * add ability to create an FdSlicer instance from a Buffer - -### 0.3.2 - - * fix write stream and read stream destroy behavior - -### 0.3.1 - - * write stream: fix end option behavior - -### 0.3.0 - - * write stream emits 'progress' events - * write stream supports 'end' option which causes the stream to emit an error - if a maximum size is exceeded - * improve documentation - -### 0.2.1 - - * Update pend dependency to latest bugfix version. - -### 0.2.0 - - * Add read and write functions - -### 0.1.0 - - * Add `autoClose` option and `ref()` and `unref()`. - -### 0.0.2 - - * Add API documentation - * read stream: create buffer at last possible moment - -### 0.0.1 - - * Initial release diff --git a/node_modules/fd-slicer/LICENSE b/node_modules/fd-slicer/LICENSE deleted file mode 100644 index e57596d2..00000000 --- a/node_modules/fd-slicer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2014 Andrew Kelley - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation files -(the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/fd-slicer/README.md b/node_modules/fd-slicer/README.md deleted file mode 100644 index ad7f0ec7..00000000 --- a/node_modules/fd-slicer/README.md +++ /dev/null @@ -1,199 +0,0 @@ -# fd-slicer - -[![Build Status](https://travis-ci.org/andrewrk/node-fd-slicer.svg?branch=master)](https://travis-ci.org/andrewrk/node-fd-slicer) - -Safe `fs.ReadStream` and `fs.WriteStream` using the same fd. - -Let's say that you want to perform a parallel upload of a file to a remote -server. To do this, we want to create multiple read streams. The first thing -you might think of is to use the `{start: 0, end: 0}` API of -`fs.createReadStream`. This gives you two choices: - - 0. Use the same file descriptor for all `fs.ReadStream` objects. - 0. Open the file multiple times, resulting in a separate file descriptor - for each read stream. - -Neither of these are acceptable options. The first one is a severe bug, -because the API docs for `fs.write` state: - -> Note that it is unsafe to use `fs.write` multiple times on the same file -> without waiting for the callback. For this scenario, `fs.createWriteStream` -> is strongly recommended. - -`fs.createWriteStream` will solve the problem if you only create one of them -for the file descriptor, but it will exhibit this unsafety if you create -multiple write streams per file descriptor. - -The second option suffers from a race condition. For each additional time the -file is opened after the first, it is possible that the file is modified. So -in our parallel uploading example, we might upload a corrupt file that never -existed on the client's computer. - -This module solves this problem by providing `createReadStream` and -`createWriteStream` that operate on a shared file descriptor and provides -the convenient stream API while still allowing slicing and dicing. - -This module also gives you some additional power that the builtin -`fs.createWriteStream` do not give you. These features are: - - * Emitting a 'progress' event on write. - * Ability to set a maximum size and emit an error if this size is exceeded. - * Ability to create an `FdSlicer` instance from a `Buffer`. This enables you - to provide API for handling files as well as buffers using the same API. - -## Usage - -```js -var fdSlicer = require('fd-slicer'); -var fs = require('fs'); - -fs.open("file.txt", 'r', function(err, fd) { - if (err) throw err; - var slicer = fdSlicer.createFromFd(fd); - var firstPart = slicer.createReadStream({start: 0, end: 100}); - var secondPart = slicer.createReadStream({start: 100}); - var firstOut = fs.createWriteStream("first.txt"); - var secondOut = fs.createWriteStream("second.txt"); - firstPart.pipe(firstOut); - secondPart.pipe(secondOut); -}); -``` - -You can also create from a buffer: - -```js -var fdSlicer = require('fd-slicer'); -var slicer = FdSlicer.createFromBuffer(someBuffer); -var firstPart = slicer.createReadStream({start: 0, end: 100}); -var secondPart = slicer.createReadStream({start: 100}); -var firstOut = fs.createWriteStream("first.txt"); -var secondOut = fs.createWriteStream("second.txt"); -firstPart.pipe(firstOut); -secondPart.pipe(secondOut); -``` - -## API Documentation - -### fdSlicer.createFromFd(fd, [options]) - -```js -var fdSlicer = require('fd-slicer'); -fs.open("file.txt", 'r', function(err, fd) { - if (err) throw err; - var slicer = fdSlicer.createFromFd(fd); - // ... -}); -``` - -Make sure `fd` is a properly initialized file descriptor. If you want to -use `createReadStream` make sure you open it for reading and if you want -to use `createWriteStream` make sure you open it for writing. - -`options` is an optional object which can contain: - - * `autoClose` - if set to `true`, the file descriptor will be automatically - closed once the last stream that references it is closed. Defaults to - `false`. `ref()` and `unref()` can be used to increase or decrease the - reference count, respectively. - -### fdSlicer.createFromBuffer(buffer, [options]) - -```js -var fdSlicer = require('fd-slicer'); -var slicer = fdSlicer.createFromBuffer(someBuffer); -// ... -``` - -`options` is an optional object which can contain: - - * `maxChunkSize` - A `Number` of bytes. see `createReadStream()`. - If falsey, defaults to unlimited. - -#### Properties - -##### fd - -The file descriptor passed in. `undefined` if created from a buffer. - -#### Methods - -##### createReadStream(options) - -Available `options`: - - * `start` - Number. The offset into the file to start reading from. Defaults - to 0. - * `end` - Number. Exclusive upper bound offset into the file to stop reading - from. - * `highWaterMark` - Number. The maximum number of bytes to store in the - internal buffer before ceasing to read from the underlying resource. - Defaults to 16 KB. - * `encoding` - String. If specified, then buffers will be decoded to strings - using the specified encoding. Defaults to `null`. - -The ReadableStream that this returns has these additional methods: - - * `destroy(err)` - stop streaming. `err` is optional and is the error that - will be emitted in order to cause the streaming to stop. Defaults to - `new Error("stream destroyed")`. - -If `maxChunkSize` was specified (see `createFromBuffer()`), the read stream -will provide chunks of at most that size. Normally, the read stream provides -the entire range requested in a single chunk, but this can cause performance -problems in some circumstances. -See [thejoshwolfe/yauzl#87](https://github.com/thejoshwolfe/yauzl/issues/87). - -##### createWriteStream(options) - -Available `options`: - - * `start` - Number. The offset into the file to start writing to. Defaults to - 0. - * `end` - Number. Exclusive upper bound offset into the file. If this offset - is reached, the write stream will emit an 'error' event and stop functioning. - In this situation, `err.code === 'ETOOBIG'`. Defaults to `Infinity`. - * `highWaterMark` - Number. Buffer level when `write()` starts returning - false. Defaults to 16KB. - * `decodeStrings` - Boolean. Whether or not to decode strings into Buffers - before passing them to` _write()`. Defaults to `true`. - -The WritableStream that this returns has these additional methods: - - * `destroy()` - stop streaming - -And these additional properties: - - * `bytesWritten` - number of bytes written to the stream - -And these additional events: - - * 'progress' - emitted when `bytesWritten` changes. - -##### read(buffer, offset, length, position, callback) - -Equivalent to `fs.read`, but with concurrency protection. -`callback` must be defined. - -##### write(buffer, offset, length, position, callback) - -Equivalent to `fs.write`, but with concurrency protection. -`callback` must be defined. - -##### ref() - -Increase the `autoClose` reference count by 1. - -##### unref() - -Decrease the `autoClose` reference count by 1. - -#### Events - -##### 'error' - -Emitted if `fs.close` returns an error when auto closing. - -##### 'close' - -Emitted when fd-slicer closes the file descriptor due to `autoClose`. Never -emitted if created from a buffer. diff --git a/node_modules/fd-slicer/index.js b/node_modules/fd-slicer/index.js deleted file mode 100644 index 65d32a3e..00000000 --- a/node_modules/fd-slicer/index.js +++ /dev/null @@ -1,296 +0,0 @@ -var fs = require('fs'); -var util = require('util'); -var stream = require('stream'); -var Readable = stream.Readable; -var Writable = stream.Writable; -var PassThrough = stream.PassThrough; -var Pend = require('pend'); -var EventEmitter = require('events').EventEmitter; - -exports.createFromBuffer = createFromBuffer; -exports.createFromFd = createFromFd; -exports.BufferSlicer = BufferSlicer; -exports.FdSlicer = FdSlicer; - -util.inherits(FdSlicer, EventEmitter); -function FdSlicer(fd, options) { - options = options || {}; - EventEmitter.call(this); - - this.fd = fd; - this.pend = new Pend(); - this.pend.max = 1; - this.refCount = 0; - this.autoClose = !!options.autoClose; -} - -FdSlicer.prototype.read = function(buffer, offset, length, position, callback) { - var self = this; - self.pend.go(function(cb) { - fs.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer) { - cb(); - callback(err, bytesRead, buffer); - }); - }); -}; - -FdSlicer.prototype.write = function(buffer, offset, length, position, callback) { - var self = this; - self.pend.go(function(cb) { - fs.write(self.fd, buffer, offset, length, position, function(err, written, buffer) { - cb(); - callback(err, written, buffer); - }); - }); -}; - -FdSlicer.prototype.createReadStream = function(options) { - return new ReadStream(this, options); -}; - -FdSlicer.prototype.createWriteStream = function(options) { - return new WriteStream(this, options); -}; - -FdSlicer.prototype.ref = function() { - this.refCount += 1; -}; - -FdSlicer.prototype.unref = function() { - var self = this; - self.refCount -= 1; - - if (self.refCount > 0) return; - if (self.refCount < 0) throw new Error("invalid unref"); - - if (self.autoClose) { - fs.close(self.fd, onCloseDone); - } - - function onCloseDone(err) { - if (err) { - self.emit('error', err); - } else { - self.emit('close'); - } - } -}; - -util.inherits(ReadStream, Readable); -function ReadStream(context, options) { - options = options || {}; - Readable.call(this, options); - - this.context = context; - this.context.ref(); - - this.start = options.start || 0; - this.endOffset = options.end; - this.pos = this.start; - this.destroyed = false; -} - -ReadStream.prototype._read = function(n) { - var self = this; - if (self.destroyed) return; - - var toRead = Math.min(self._readableState.highWaterMark, n); - if (self.endOffset != null) { - toRead = Math.min(toRead, self.endOffset - self.pos); - } - if (toRead <= 0) { - self.destroyed = true; - self.push(null); - self.context.unref(); - return; - } - self.context.pend.go(function(cb) { - if (self.destroyed) return cb(); - var buffer = new Buffer(toRead); - fs.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) { - if (err) { - self.destroy(err); - } else if (bytesRead === 0) { - self.destroyed = true; - self.push(null); - self.context.unref(); - } else { - self.pos += bytesRead; - self.push(buffer.slice(0, bytesRead)); - } - cb(); - }); - }); -}; - -ReadStream.prototype.destroy = function(err) { - if (this.destroyed) return; - err = err || new Error("stream destroyed"); - this.destroyed = true; - this.emit('error', err); - this.context.unref(); -}; - -util.inherits(WriteStream, Writable); -function WriteStream(context, options) { - options = options || {}; - Writable.call(this, options); - - this.context = context; - this.context.ref(); - - this.start = options.start || 0; - this.endOffset = (options.end == null) ? Infinity : +options.end; - this.bytesWritten = 0; - this.pos = this.start; - this.destroyed = false; - - this.on('finish', this.destroy.bind(this)); -} - -WriteStream.prototype._write = function(buffer, encoding, callback) { - var self = this; - if (self.destroyed) return; - - if (self.pos + buffer.length > self.endOffset) { - var err = new Error("maximum file length exceeded"); - err.code = 'ETOOBIG'; - self.destroy(); - callback(err); - return; - } - self.context.pend.go(function(cb) { - if (self.destroyed) return cb(); - fs.write(self.context.fd, buffer, 0, buffer.length, self.pos, function(err, bytes) { - if (err) { - self.destroy(); - cb(); - callback(err); - } else { - self.bytesWritten += bytes; - self.pos += bytes; - self.emit('progress'); - cb(); - callback(); - } - }); - }); -}; - -WriteStream.prototype.destroy = function() { - if (this.destroyed) return; - this.destroyed = true; - this.context.unref(); -}; - -util.inherits(BufferSlicer, EventEmitter); -function BufferSlicer(buffer, options) { - EventEmitter.call(this); - - options = options || {}; - this.refCount = 0; - this.buffer = buffer; - this.maxChunkSize = options.maxChunkSize || Number.MAX_SAFE_INTEGER; -} - -BufferSlicer.prototype.read = function(buffer, offset, length, position, callback) { - var end = position + length; - var delta = end - this.buffer.length; - var written = (delta > 0) ? delta : length; - this.buffer.copy(buffer, offset, position, end); - setImmediate(function() { - callback(null, written); - }); -}; - -BufferSlicer.prototype.write = function(buffer, offset, length, position, callback) { - buffer.copy(this.buffer, position, offset, offset + length); - setImmediate(function() { - callback(null, length, buffer); - }); -}; - -BufferSlicer.prototype.createReadStream = function(options) { - options = options || {}; - var readStream = new PassThrough(options); - readStream.destroyed = false; - readStream.start = options.start || 0; - readStream.endOffset = options.end; - // by the time this function returns, we'll be done. - readStream.pos = readStream.endOffset || this.buffer.length; - - // respect the maxChunkSize option to slice up the chunk into smaller pieces. - var entireSlice = this.buffer.slice(readStream.start, readStream.pos); - var offset = 0; - while (true) { - var nextOffset = offset + this.maxChunkSize; - if (nextOffset >= entireSlice.length) { - // last chunk - if (offset < entireSlice.length) { - readStream.write(entireSlice.slice(offset, entireSlice.length)); - } - break; - } - readStream.write(entireSlice.slice(offset, nextOffset)); - offset = nextOffset; - } - - readStream.end(); - readStream.destroy = function() { - readStream.destroyed = true; - }; - return readStream; -}; - -BufferSlicer.prototype.createWriteStream = function(options) { - var bufferSlicer = this; - options = options || {}; - var writeStream = new Writable(options); - writeStream.start = options.start || 0; - writeStream.endOffset = (options.end == null) ? this.buffer.length : +options.end; - writeStream.bytesWritten = 0; - writeStream.pos = writeStream.start; - writeStream.destroyed = false; - writeStream._write = function(buffer, encoding, callback) { - if (writeStream.destroyed) return; - - var end = writeStream.pos + buffer.length; - if (end > writeStream.endOffset) { - var err = new Error("maximum file length exceeded"); - err.code = 'ETOOBIG'; - writeStream.destroyed = true; - callback(err); - return; - } - buffer.copy(bufferSlicer.buffer, writeStream.pos, 0, buffer.length); - - writeStream.bytesWritten += buffer.length; - writeStream.pos = end; - writeStream.emit('progress'); - callback(); - }; - writeStream.destroy = function() { - writeStream.destroyed = true; - }; - return writeStream; -}; - -BufferSlicer.prototype.ref = function() { - this.refCount += 1; -}; - -BufferSlicer.prototype.unref = function() { - this.refCount -= 1; - - if (this.refCount < 0) { - throw new Error("invalid unref"); - } -}; - -function createFromBuffer(buffer, options) { - return new BufferSlicer(buffer, options); -} - -function createFromFd(fd, options) { - return new FdSlicer(fd, options); -} diff --git a/node_modules/fd-slicer/package.json b/node_modules/fd-slicer/package.json deleted file mode 100644 index 4dba3248..00000000 --- a/node_modules/fd-slicer/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "fd-slicer@~1.1.0", - "_id": "fd-slicer@1.1.0", - "_inBundle": false, - "_integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", - "_location": "/fd-slicer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "fd-slicer@~1.1.0", - "name": "fd-slicer", - "escapedName": "fd-slicer", - "rawSpec": "~1.1.0", - "saveSpec": null, - "fetchSpec": "~1.1.0" - }, - "_requiredBy": [ - "/yauzl" - ], - "_resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "_shasum": "25c7c89cb1f9077f8891bbe61d8f390eae256f1e", - "_spec": "fd-slicer@~1.1.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/yauzl", - "author": { - "name": "Andrew Kelley", - "email": "superjoe30@gmail.com" - }, - "bugs": { - "url": "https://github.com/andrewrk/node-fd-slicer/issues" - }, - "bundleDependencies": false, - "dependencies": { - "pend": "~1.2.0" - }, - "deprecated": false, - "description": "safely create multiple ReadStream or WriteStream objects from the same file descriptor", - "devDependencies": { - "istanbul": "~0.3.3", - "mocha": "~2.0.1", - "stream-equal": "~0.1.5", - "streamsink": "~1.2.0" - }, - "directories": { - "test": "test" - }, - "homepage": "https://github.com/andrewrk/node-fd-slicer#readme", - "keywords": [ - "createReadStream", - "createWriteStream" - ], - "license": "MIT", - "main": "index.js", - "name": "fd-slicer", - "repository": { - "type": "git", - "url": "git://github.com/andrewrk/node-fd-slicer.git" - }, - "scripts": { - "test": "mocha --reporter spec --check-leaks", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/test.js", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --timeout 10000 --reporter spec --check-leaks test/test.js" - }, - "version": "1.1.0" -} diff --git a/node_modules/fd-slicer/test/test.js b/node_modules/fd-slicer/test/test.js deleted file mode 100644 index d05ab003..00000000 --- a/node_modules/fd-slicer/test/test.js +++ /dev/null @@ -1,350 +0,0 @@ -var fdSlicer = require('../'); -var fs = require('fs'); -var crypto = require('crypto'); -var path = require('path'); -var streamEqual = require('stream-equal'); -var assert = require('assert'); -var Pend = require('pend'); -var StreamSink = require('streamsink'); - -var describe = global.describe; -var it = global.it; -var before = global.before; -var beforeEach = global.beforeEach; -var after = global.after; - -var testBlobFile = path.join(__dirname, "test-blob.bin"); -var testBlobFileSize = 20 * 1024 * 1024; -var testOutBlobFile = path.join(__dirname, "test-blob-out.bin"); - -describe("FdSlicer", function() { - before(function(done) { - var out = fs.createWriteStream(testBlobFile); - for (var i = 0; i < testBlobFileSize / 1024; i += 1) { - out.write(crypto.pseudoRandomBytes(1024)); - } - out.end(); - out.on('close', done); - }); - beforeEach(function() { - try { - fs.unlinkSync(testOutBlobFile); - } catch (err) { - } - }); - after(function() { - try { - fs.unlinkSync(testBlobFile); - fs.unlinkSync(testOutBlobFile); - } catch (err) { - } - }); - it("reads a 20MB file (autoClose on)", function(done) { - fs.open(testBlobFile, 'r', function(err, fd) { - if (err) return done(err); - var slicer = fdSlicer.createFromFd(fd, {autoClose: true}); - var actualStream = slicer.createReadStream(); - var expectedStream = fs.createReadStream(testBlobFile); - - var pend = new Pend(); - pend.go(function(cb) { - slicer.on('close', cb); - }); - pend.go(function(cb) { - streamEqual(expectedStream, actualStream, function(err, equal) { - if (err) return done(err); - assert.ok(equal); - cb(); - }); - }); - pend.wait(done); - }); - }); - it("reads 4 chunks simultaneously", function(done) { - fs.open(testBlobFile, 'r', function(err, fd) { - if (err) return done(err); - var slicer = fdSlicer.createFromFd(fd); - var actualPart1 = slicer.createReadStream({start: testBlobFileSize * 0/4, end: testBlobFileSize * 1/4}); - var actualPart2 = slicer.createReadStream({start: testBlobFileSize * 1/4, end: testBlobFileSize * 2/4}); - var actualPart3 = slicer.createReadStream({start: testBlobFileSize * 2/4, end: testBlobFileSize * 3/4}); - var actualPart4 = slicer.createReadStream({start: testBlobFileSize * 3/4, end: testBlobFileSize * 4/4}); - var expectedPart1 = slicer.createReadStream({start: testBlobFileSize * 0/4, end: testBlobFileSize * 1/4}); - var expectedPart2 = slicer.createReadStream({start: testBlobFileSize * 1/4, end: testBlobFileSize * 2/4}); - var expectedPart3 = slicer.createReadStream({start: testBlobFileSize * 2/4, end: testBlobFileSize * 3/4}); - var expectedPart4 = slicer.createReadStream({start: testBlobFileSize * 3/4, end: testBlobFileSize * 4/4}); - var pend = new Pend(); - pend.go(function(cb) { - streamEqual(expectedPart1, actualPart1, function(err, equal) { - assert.ok(equal); - cb(err); - }); - }); - pend.go(function(cb) { - streamEqual(expectedPart2, actualPart2, function(err, equal) { - assert.ok(equal); - cb(err); - }); - }); - pend.go(function(cb) { - streamEqual(expectedPart3, actualPart3, function(err, equal) { - assert.ok(equal); - cb(err); - }); - }); - pend.go(function(cb) { - streamEqual(expectedPart4, actualPart4, function(err, equal) { - assert.ok(equal); - cb(err); - }); - }); - pend.wait(function(err) { - if (err) return done(err); - fs.close(fd, done); - }); - }); - }); - - it("writes a 20MB file (autoClose on)", function(done) { - fs.open(testOutBlobFile, 'w', function(err, fd) { - if (err) return done(err); - var slicer = fdSlicer.createFromFd(fd, {autoClose: true}); - var actualStream = slicer.createWriteStream(); - var inStream = fs.createReadStream(testBlobFile); - - slicer.on('close', function() { - var expected = fs.createReadStream(testBlobFile); - var actual = fs.createReadStream(testOutBlobFile); - - streamEqual(expected, actual, function(err, equal) { - if (err) return done(err); - assert.ok(equal); - done(); - }); - }); - inStream.pipe(actualStream); - }); - }); - - it("writes 4 chunks simultaneously", function(done) { - fs.open(testOutBlobFile, 'w', function(err, fd) { - if (err) return done(err); - var slicer = fdSlicer.createFromFd(fd); - var actualPart1 = slicer.createWriteStream({start: testBlobFileSize * 0/4}); - var actualPart2 = slicer.createWriteStream({start: testBlobFileSize * 1/4}); - var actualPart3 = slicer.createWriteStream({start: testBlobFileSize * 2/4}); - var actualPart4 = slicer.createWriteStream({start: testBlobFileSize * 3/4}); - var in1 = fs.createReadStream(testBlobFile, {start: testBlobFileSize * 0/4, end: testBlobFileSize * 1/4}); - var in2 = fs.createReadStream(testBlobFile, {start: testBlobFileSize * 1/4, end: testBlobFileSize * 2/4}); - var in3 = fs.createReadStream(testBlobFile, {start: testBlobFileSize * 2/4, end: testBlobFileSize * 3/4}); - var in4 = fs.createReadStream(testBlobFile, {start: testBlobFileSize * 3/4, end: testBlobFileSize * 4/4}); - var pend = new Pend(); - pend.go(function(cb) { - actualPart1.on('finish', cb); - }); - pend.go(function(cb) { - actualPart2.on('finish', cb); - }); - pend.go(function(cb) { - actualPart3.on('finish', cb); - }); - pend.go(function(cb) { - actualPart4.on('finish', cb); - }); - in1.pipe(actualPart1); - in2.pipe(actualPart2); - in3.pipe(actualPart3); - in4.pipe(actualPart4); - pend.wait(function() { - fs.close(fd, function(err) { - if (err) return done(err); - var expected = fs.createReadStream(testBlobFile); - var actual = fs.createReadStream(testOutBlobFile); - streamEqual(expected, actual, function(err, equal) { - if (err) return done(err); - assert.ok(equal); - done(); - }); - }); - }); - }); - }); - - it("throws on invalid ref", function(done) { - fs.open(testOutBlobFile, 'w', function(err, fd) { - if (err) return done(err); - var slicer = fdSlicer.createFromFd(fd, {autoClose: true}); - assert.throws(function() { - slicer.unref(); - }, /invalid unref/); - fs.close(fd, done); - }); - }); - - it("write stream emits error when max size exceeded", function(done) { - fs.open(testOutBlobFile, 'w', function(err, fd) { - if (err) return done(err); - var slicer = fdSlicer.createFromFd(fd, {autoClose: true}); - var ws = slicer.createWriteStream({start: 0, end: 1000}); - ws.on('error', function(err) { - assert.strictEqual(err.code, 'ETOOBIG'); - slicer.on('close', done); - }); - ws.end(new Buffer(1001)); - }); - }); - - it("write stream does not emit error when max size not exceeded", function(done) { - fs.open(testOutBlobFile, 'w', function(err, fd) { - if (err) return done(err); - var slicer = fdSlicer.createFromFd(fd, {autoClose: true}); - var ws = slicer.createWriteStream({end: 1000}); - slicer.on('close', done); - ws.end(new Buffer(1000)); - }); - }); - - it("write stream start and end work together", function(done) { - fs.open(testOutBlobFile, 'w', function(err, fd) { - if (err) return done(err); - var slicer = fdSlicer.createFromFd(fd, {autoClose: true}); - var ws = slicer.createWriteStream({start: 1, end: 1000}); - ws.on('error', function(err) { - assert.strictEqual(err.code, 'ETOOBIG'); - slicer.on('close', done); - }); - ws.end(new Buffer(1000)); - }); - }); - - it("write stream emits progress events", function(done) { - fs.open(testOutBlobFile, 'w', function(err, fd) { - if (err) return done(err); - var slicer = fdSlicer.createFromFd(fd, {autoClose: true}); - var ws = slicer.createWriteStream(); - var progressEventCount = 0; - var prevBytesWritten = 0; - ws.on('progress', function() { - progressEventCount += 1; - assert.ok(ws.bytesWritten > prevBytesWritten); - prevBytesWritten = ws.bytesWritten; - }); - slicer.on('close', function() { - assert.ok(progressEventCount > 5); - done(); - }); - for (var i = 0; i < 10; i += 1) { - ws.write(new Buffer(16 * 1024 * 2)); - } - ws.end(); - }); - }); - - it("write stream unrefs when destroyed", function(done) { - fs.open(testOutBlobFile, 'w', function(err, fd) { - if (err) return done(err); - var slicer = fdSlicer.createFromFd(fd, {autoClose: true}); - var ws = slicer.createWriteStream(); - slicer.on('close', done); - ws.write(new Buffer(1000)); - ws.destroy(); - }); - }); - - it("read stream unrefs when destroyed", function(done) { - fs.open(testBlobFile, 'r', function(err, fd) { - if (err) return done(err); - var slicer = fdSlicer.createFromFd(fd, {autoClose: true}); - var rs = slicer.createReadStream(); - rs.on('error', function(err) { - assert.strictEqual(err.message, "stream destroyed"); - slicer.on('close', done); - }); - rs.destroy(); - }); - }); - - it("fdSlicer.read", function(done) { - fs.open(testBlobFile, 'r', function(err, fd) { - if (err) return done(err); - var slicer = fdSlicer.createFromFd(fd); - var outBuf = new Buffer(1024); - slicer.read(outBuf, 0, 10, 0, function(err, bytesRead, buf) { - assert.strictEqual(bytesRead, 10); - fs.close(fd, done); - }); - }); - }); - - it("fdSlicer.write", function(done) { - fs.open(testOutBlobFile, 'w', function(err, fd) { - if (err) return done(err); - var slicer = fdSlicer.createFromFd(fd); - slicer.write(new Buffer("blah\n"), 0, 5, 0, function() { - if (err) return done(err); - fs.close(fd, done); - }); - }); - }); -}); - -describe("BufferSlicer", function() { - it("invalid ref", function() { - var slicer = fdSlicer.createFromBuffer(new Buffer(16)); - slicer.ref(); - slicer.unref(); - assert.throws(function() { - slicer.unref(); - }, /invalid unref/); - }); - it("read and write", function(done) { - var buf = new Buffer("through the tangled thread the needle finds its way"); - var slicer = fdSlicer.createFromBuffer(buf); - var outBuf = new Buffer(1024); - slicer.read(outBuf, 10, 11, 8, function(err) { - if (err) return done(err); - assert.strictEqual(outBuf.toString('utf8', 10, 21), "the tangled"); - slicer.write(new Buffer("derp"), 0, 4, 7, function(err) { - if (err) return done(err); - assert.strictEqual(buf.toString('utf8', 7, 19), "derp tangled"); - done(); - }); - }); - }); - it("createReadStream", function(done) { - var str = "I never conquered rarely came, 16 just held such better days"; - var buf = new Buffer(str); - var slicer = fdSlicer.createFromBuffer(buf); - var inStream = slicer.createReadStream(); - var sink = new StreamSink(); - inStream.pipe(sink); - sink.on('finish', function() { - assert.strictEqual(sink.toString(), str); - inStream.destroy(); - done(); - }); - }); - it("createWriteStream exceed buffer size", function(done) { - var slicer = fdSlicer.createFromBuffer(new Buffer(4)); - var outStream = slicer.createWriteStream(); - outStream.on('error', function(err) { - assert.strictEqual(err.code, 'ETOOBIG'); - done(); - }); - outStream.write("hi!\n"); - outStream.write("it warked\n"); - outStream.end(); - }); - it("createWriteStream ok", function(done) { - var buf = new Buffer(1024); - var slicer = fdSlicer.createFromBuffer(buf); - var outStream = slicer.createWriteStream(); - outStream.on('finish', function() { - assert.strictEqual(buf.toString('utf8', 0, "hi!\nit warked\n".length), "hi!\nit warked\n"); - outStream.destroy(); - done(); - }); - outStream.write("hi!\n"); - outStream.write("it warked\n"); - outStream.end(); - }); -}); diff --git a/node_modules/fill-range/LICENSE b/node_modules/fill-range/LICENSE deleted file mode 100644 index 9af4a67d..00000000 --- a/node_modules/fill-range/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-present, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/fill-range/README.md b/node_modules/fill-range/README.md deleted file mode 100644 index 8d756fe9..00000000 --- a/node_modules/fill-range/README.md +++ /dev/null @@ -1,237 +0,0 @@ -# fill-range [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/fill-range.svg?style=flat)](https://www.npmjs.com/package/fill-range) [![NPM monthly downloads](https://img.shields.io/npm/dm/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![NPM total downloads](https://img.shields.io/npm/dt/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/fill-range.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/fill-range) - -> Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex` - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save fill-range -``` - -## Usage - -Expands numbers and letters, optionally using a `step` as the last argument. _(Numbers may be defined as JavaScript numbers or strings)_. - -```js -const fill = require('fill-range'); -// fill(from, to[, step, options]); - -console.log(fill('1', '10')); //=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] -console.log(fill('1', '10', { toRegex: true })); //=> [1-9]|10 -``` - -**Params** - -* `from`: **{String|Number}** the number or letter to start with -* `to`: **{String|Number}** the number or letter to end with -* `step`: **{String|Number|Object|Function}** Optionally pass a [step](#optionsstep) to use. -* `options`: **{Object|Function}**: See all available [options](#options) - -## Examples - -By default, an array of values is returned. - -**Alphabetical ranges** - -```js -console.log(fill('a', 'e')); //=> ['a', 'b', 'c', 'd', 'e'] -console.log(fill('A', 'E')); //=> [ 'A', 'B', 'C', 'D', 'E' ] -``` - -**Numerical ranges** - -Numbers can be defined as actual numbers or strings. - -```js -console.log(fill(1, 5)); //=> [ 1, 2, 3, 4, 5 ] -console.log(fill('1', '5')); //=> [ 1, 2, 3, 4, 5 ] -``` - -**Negative ranges** - -Numbers can be defined as actual numbers or strings. - -```js -console.log(fill('-5', '-1')); //=> [ '-5', '-4', '-3', '-2', '-1' ] -console.log(fill('-5', '5')); //=> [ '-5', '-4', '-3', '-2', '-1', '0', '1', '2', '3', '4', '5' ] -``` - -**Steps (increments)** - -```js -// numerical ranges with increments -console.log(fill('0', '25', 4)); //=> [ '0', '4', '8', '12', '16', '20', '24' ] -console.log(fill('0', '25', 5)); //=> [ '0', '5', '10', '15', '20', '25' ] -console.log(fill('0', '25', 6)); //=> [ '0', '6', '12', '18', '24' ] - -// alphabetical ranges with increments -console.log(fill('a', 'z', 4)); //=> [ 'a', 'e', 'i', 'm', 'q', 'u', 'y' ] -console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ] -console.log(fill('a', 'z', 6)); //=> [ 'a', 'g', 'm', 's', 'y' ] -``` - -## Options - -### options.step - -**Type**: `number` (formatted as a string or number) - -**Default**: `undefined` - -**Description**: The increment to use for the range. Can be used with letters or numbers. - -**Example(s)** - -```js -// numbers -console.log(fill('1', '10', 2)); //=> [ '1', '3', '5', '7', '9' ] -console.log(fill('1', '10', 3)); //=> [ '1', '4', '7', '10' ] -console.log(fill('1', '10', 4)); //=> [ '1', '5', '9' ] - -// letters -console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ] -console.log(fill('a', 'z', 7)); //=> [ 'a', 'h', 'o', 'v' ] -console.log(fill('a', 'z', 9)); //=> [ 'a', 'j', 's' ] -``` - -### options.strictRanges - -**Type**: `boolean` - -**Default**: `false` - -**Description**: By default, `null` is returned when an invalid range is passed. Enable this option to throw a `RangeError` on invalid ranges. - -**Example(s)** - -The following are all invalid: - -```js -fill('1.1', '2'); // decimals not supported in ranges -fill('a', '2'); // incompatible range values -fill(1, 10, 'foo'); // invalid "step" argument -``` - -### options.stringify - -**Type**: `boolean` - -**Default**: `undefined` - -**Description**: Cast all returned values to strings. By default, integers are returned as numbers. - -**Example(s)** - -```js -console.log(fill(1, 5)); //=> [ 1, 2, 3, 4, 5 ] -console.log(fill(1, 5, { stringify: true })); //=> [ '1', '2', '3', '4', '5' ] -``` - -### options.toRegex - -**Type**: `boolean` - -**Default**: `undefined` - -**Description**: Create a regex-compatible source string, instead of expanding values to an array. - -**Example(s)** - -```js -// alphabetical range -console.log(fill('a', 'e', { toRegex: true })); //=> '[a-e]' -// alphabetical with step -console.log(fill('a', 'z', 3, { toRegex: true })); //=> 'a|d|g|j|m|p|s|v|y' -// numerical range -console.log(fill('1', '100', { toRegex: true })); //=> '[1-9]|[1-9][0-9]|100' -// numerical range with zero padding -console.log(fill('000001', '100000', { toRegex: true })); -//=> '0{5}[1-9]|0{4}[1-9][0-9]|0{3}[1-9][0-9]{2}|0{2}[1-9][0-9]{3}|0[1-9][0-9]{4}|100000' -``` - -### options.transform - -**Type**: `function` - -**Default**: `undefined` - -**Description**: Customize each value in the returned array (or [string](#optionstoRegex)). _(you can also pass this function as the last argument to `fill()`)_. - -**Example(s)** - -```js -// add zero padding -console.log(fill(1, 5, value => String(value).padStart(4, '0'))); -//=> ['0001', '0002', '0003', '0004', '0005'] -``` - -## About - -<details> -<summary><strong>Contributing</strong></summary> - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -</details> - -<details> -<summary><strong>Running Tests</strong></summary> - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -</details> - -<details> -<summary><strong>Building docs</strong></summary> - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -</details> - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 116 | [jonschlinkert](https://github.com/jonschlinkert) | -| 4 | [paulmillr](https://github.com/paulmillr) | -| 2 | [realityking](https://github.com/realityking) | -| 2 | [bluelovers](https://github.com/bluelovers) | -| 1 | [edorivai](https://github.com/edorivai) | -| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | - -### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -Please consider supporting me on Patreon, or [start your own Patreon page](https://patreon.com/invite/bxpbvm)! - -<a href="https://www.patreon.com/jonschlinkert"> -<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" height="50"> -</a> - -### License - -Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._ \ No newline at end of file diff --git a/node_modules/fill-range/index.js b/node_modules/fill-range/index.js deleted file mode 100644 index 97ce35a5..00000000 --- a/node_modules/fill-range/index.js +++ /dev/null @@ -1,249 +0,0 @@ -/*! - * fill-range <https://github.com/jonschlinkert/fill-range> - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -const util = require('util'); -const toRegexRange = require('to-regex-range'); - -const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); - -const transform = toNumber => { - return value => toNumber === true ? Number(value) : String(value); -}; - -const isValidValue = value => { - return typeof value === 'number' || (typeof value === 'string' && value !== ''); -}; - -const isNumber = num => Number.isInteger(+num); - -const zeros = input => { - let value = `${input}`; - let index = -1; - if (value[0] === '-') value = value.slice(1); - if (value === '0') return false; - while (value[++index] === '0'); - return index > 0; -}; - -const stringify = (start, end, options) => { - if (typeof start === 'string' || typeof end === 'string') { - return true; - } - return options.stringify === true; -}; - -const pad = (input, maxLength, toNumber) => { - if (maxLength > 0) { - let dash = input[0] === '-' ? '-' : ''; - if (dash) input = input.slice(1); - input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0')); - } - if (toNumber === false) { - return String(input); - } - return input; -}; - -const toMaxLen = (input, maxLength) => { - let negative = input[0] === '-' ? '-' : ''; - if (negative) { - input = input.slice(1); - maxLength--; - } - while (input.length < maxLength) input = '0' + input; - return negative ? ('-' + input) : input; -}; - -const toSequence = (parts, options) => { - parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - - let prefix = options.capture ? '' : '?:'; - let positives = ''; - let negatives = ''; - let result; - - if (parts.positives.length) { - positives = parts.positives.join('|'); - } - - if (parts.negatives.length) { - negatives = `-(${prefix}${parts.negatives.join('|')})`; - } - - if (positives && negatives) { - result = `${positives}|${negatives}`; - } else { - result = positives || negatives; - } - - if (options.wrap) { - return `(${prefix}${result})`; - } - - return result; -}; - -const toRange = (a, b, isNumbers, options) => { - if (isNumbers) { - return toRegexRange(a, b, { wrap: false, ...options }); - } - - let start = String.fromCharCode(a); - if (a === b) return start; - - let stop = String.fromCharCode(b); - return `[${start}-${stop}]`; -}; - -const toRegex = (start, end, options) => { - if (Array.isArray(start)) { - let wrap = options.wrap === true; - let prefix = options.capture ? '' : '?:'; - return wrap ? `(${prefix}${start.join('|')})` : start.join('|'); - } - return toRegexRange(start, end, options); -}; - -const rangeError = (...args) => { - return new RangeError('Invalid range arguments: ' + util.inspect(...args)); -}; - -const invalidRange = (start, end, options) => { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; -}; - -const invalidStep = (step, options) => { - if (options.strictRanges === true) { - throw new TypeError(`Expected step "${step}" to be a number`); - } - return []; -}; - -const fillNumbers = (start, end, step = 1, options = {}) => { - let a = Number(start); - let b = Number(end); - - if (!Number.isInteger(a) || !Number.isInteger(b)) { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - } - - // fix negative zero - if (a === 0) a = 0; - if (b === 0) b = 0; - - let descending = a > b; - let startString = String(start); - let endString = String(end); - let stepString = String(step); - step = Math.max(Math.abs(step), 1); - - let padded = zeros(startString) || zeros(endString) || zeros(stepString); - let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; - let toNumber = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber); - - if (options.toRegex && step === 1) { - return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); - } - - let parts = { negatives: [], positives: [] }; - let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)); - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - if (options.toRegex === true && step > 1) { - push(a); - } else { - range.push(pad(format(a, index), maxLen, toNumber)); - } - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return step > 1 - ? toSequence(parts, options) - : toRegex(range, null, { wrap: false, ...options }); - } - - return range; -}; - -const fillLetters = (start, end, step = 1, options = {}) => { - if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) { - return invalidRange(start, end, options); - } - - - let format = options.transform || (val => String.fromCharCode(val)); - let a = `${start}`.charCodeAt(0); - let b = `${end}`.charCodeAt(0); - - let descending = a > b; - let min = Math.min(a, b); - let max = Math.max(a, b); - - if (options.toRegex && step === 1) { - return toRange(min, max, false, options); - } - - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - range.push(format(a, index)); - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return toRegex(range, null, { wrap: false, options }); - } - - return range; -}; - -const fill = (start, end, step, options = {}) => { - if (end == null && isValidValue(start)) { - return [start]; - } - - if (!isValidValue(start) || !isValidValue(end)) { - return invalidRange(start, end, options); - } - - if (typeof step === 'function') { - return fill(start, end, 1, { transform: step }); - } - - if (isObject(step)) { - return fill(start, end, 0, step); - } - - let opts = { ...options }; - if (opts.capture === true) opts.wrap = true; - step = step || opts.step || 1; - - if (!isNumber(step)) { - if (step != null && !isObject(step)) return invalidStep(step, opts); - return fill(start, end, 1, step); - } - - if (isNumber(start) && isNumber(end)) { - return fillNumbers(start, end, step, opts); - } - - return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); -}; - -module.exports = fill; diff --git a/node_modules/fill-range/package.json b/node_modules/fill-range/package.json deleted file mode 100644 index c7d6e8a7..00000000 --- a/node_modules/fill-range/package.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "_from": "fill-range@^7.0.1", - "_id": "fill-range@7.0.1", - "_inBundle": false, - "_integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "_location": "/fill-range", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "fill-range@^7.0.1", - "name": "fill-range", - "escapedName": "fill-range", - "rawSpec": "^7.0.1", - "saveSpec": null, - "fetchSpec": "^7.0.1" - }, - "_requiredBy": [ - "/braces" - ], - "_resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "_shasum": "1919a6a7c75fe38b2c7c77e5198535da9acdda40", - "_spec": "fill-range@^7.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/braces", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/fill-range/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Edo Rivai", - "url": "edo.rivai.nl" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Paul Miller", - "url": "paulmillr.com" - }, - { - "name": "Rouven Weßling", - "url": "www.rouvenwessling.de" - }, - { - "url": "https://github.com/wtgtybhertgeghgtwtg" - } - ], - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "deprecated": false, - "description": "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`", - "devDependencies": { - "gulp-format-md": "^2.0.0", - "mocha": "^6.1.1" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/fill-range", - "keywords": [ - "alpha", - "alphabetical", - "array", - "bash", - "brace", - "expand", - "expansion", - "fill", - "glob", - "match", - "matches", - "matching", - "number", - "numerical", - "range", - "ranges", - "regex", - "sh" - ], - "license": "MIT", - "main": "index.js", - "name": "fill-range", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/fill-range.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - } - }, - "version": "7.0.1" -} diff --git a/node_modules/flatstr/LICENSE b/node_modules/flatstr/LICENSE deleted file mode 100644 index b5d3b6e6..00000000 --- a/node_modules/flatstr/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 David Mark Clements - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/flatstr/alt-benchmark.js b/node_modules/flatstr/alt-benchmark.js deleted file mode 100644 index b9eb8197..00000000 --- a/node_modules/flatstr/alt-benchmark.js +++ /dev/null @@ -1,234 +0,0 @@ -'use strict' -var nul = process.platform === 'win32' ? '\\\\.\\NUL' : '/dev/null' -var bench = require('fastbench') -var stream = require('fs').createWriteStream(nul) -var alt0 = require('./') -var largeStr = JSON.stringify(require('./package.json')) -largeStr += largeStr -largeStr += largeStr - -var run = bench([ - function alt0ManySmallConcats (cb) { - stream.write(alt0(makeStr('a', 200))) - setImmediate(cb) - }, - function alt1ManySmallConcats (cb) { - stream.write(alt1(makeStr('a', 200))) - setImmediate(cb) - }, - function alt2ManySmallConcats (cb) { - stream.write(alt2(makeStr('a', 200))) - setImmediate(cb) - }, - function alt3ManySmallConcats (cb) { - stream.write(alt3(makeStr('a', 200))) - setImmediate(cb) - }, - function alt4ManySmallConcats (cb) { - stream.write(alt4(makeStr('a', 200))) - setImmediate(cb) - }, - function alt5ManySmallConcats (cb) { - stream.write(alt5(makeStr('a', 200))) - setImmediate(cb) - }, - function alt6ManySmallConcats (cb) { - stream.write(alt6(makeStr('a', 200))) - setImmediate(cb) - }, - function alt7ManySmallConcats (cb) { - stream.write(alt7(makeStr('a', 200))) - setImmediate(cb) - }, - function alt8ManySmallConcats (cb) { - stream.write(alt8(makeStr('a', 200))) - setImmediate(cb) - }, - function alt9ManySmallConcats (cb) { - stream.write(alt9(makeStr('a', 200))) - setImmediate(cb) - }, - function alt0SeveralLargeConcats (cb) { - stream.write(alt0(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt1SeveralLargeConcats (cb) { - stream.write(alt1(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt2SeveralLargeConcats (cb) { - stream.write(alt2(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt3SeveralLargeConcats (cb) { - stream.write(alt3(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt4SeveralLargeConcats (cb) { - stream.write(alt4(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt5SeveralLargeConcats (cb) { - stream.write(alt5(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt6SeveralLargeConcats (cb) { - stream.write(alt6(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt7SeveralLargeConcats (cb) { - stream.write(alt7(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt8SeveralLargeConcats (cb) { - stream.write(alt8(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt9SeveralLargeConcats (cb) { - stream.write(alt9(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt0ExponentialSmallConcats (cb) { - stream.write(alt0(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt1ExponentialSmallConcats (cb) { - stream.write(alt1(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt2ExponentialSmallConcats (cb) { - stream.write(alt2(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt3ExponentialSmallConcats (cb) { - stream.write(alt3(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt4ExponentialSmallConcats (cb) { - stream.write(alt4(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt5ExponentialSmallConcats (cb) { - stream.write(alt5(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt6ExponentialSmallConcats (cb) { - stream.write(alt6(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt7ExponentialSmallConcats (cb) { - stream.write(alt7(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt8ExponentialSmallConcats (cb) { - stream.write(alt8(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt9ExponentialSmallConcats (cb) { - stream.write(alt9(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt0ExponentialLargeConcats (cb) { - stream.write(alt0(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt1ExponentialLargeConcats (cb) { - stream.write(alt1(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt2ExponentialLargeConcats (cb) { - stream.write(alt2(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt3ExponentialLargeConcats (cb) { - stream.write(alt3(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt4ExponentialLargeConcats (cb) { - stream.write(alt4(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt5ExponentialLargeConcats (cb) { - stream.write(alt5(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt6ExponentialLargeConcats (cb) { - stream.write(alt6(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt7ExponentialLargeConcats (cb) { - stream.write(alt7(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt8ExponentialLargeConcats (cb) { - stream.write(alt8(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt9ExponentialLargeConcats (cb) { - stream.write(alt9(makeExpoStr(largeStr, 7))) - setImmediate(cb) - } -], 10000) - -run(run) - -var rx = /()/ -function alt1 (s) { - rx.test(s) - return s -} -function alt2 (s) { - rx.exec(s) - return s -} - -function alt3 (s) { - s | 0 - return s -} - -function alt4 (s) { - ~s - return s -} - -function alt5 (s) { - escape(s) - return s -} - -function alt6 (s) { - unescape(s) - return s -} - -function alt7 (s) { - parseInt(s, 10) - return s -} - -function alt8 (s) { - parseFloat(s) - return s -} - -function alt9 (s) { - alt9[s] = null - return s -} - -function makeStr (str, concats) { - var s = '' - while (concats--) { - s += str - } - return s -} - -function makeExpoStr (str, concats) { - var s = str - while (concats--) { - s += s - } - return s -} diff --git a/node_modules/flatstr/benchmark.js b/node_modules/flatstr/benchmark.js deleted file mode 100644 index b2122c72..00000000 --- a/node_modules/flatstr/benchmark.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict' -var nul = process.platform === 'win32' ? '\\\\.\\NUL' : '/dev/null' -var bench = require('fastbench') -var stream = require('fs').createWriteStream(nul) -var flatstr = require('./') -var largeStr = JSON.stringify(require('./package.json')) -largeStr += largeStr -largeStr += largeStr - -var run = bench([ - function unflattenedManySmallConcats (cb) { - stream.write(makeStr('a', 200)) - setImmediate(cb) - }, - function flattenedManySmallConcats (cb) { - stream.write(flatstr(makeStr('a', 200))) - setImmediate(cb) - }, - function unflattenedSeveralLargeConcats (cb) { - stream.write(makeStr(largeStr, 10)) - setImmediate(cb) - }, - function flattenedSeveralLargeConcats (cb) { - stream.write(flatstr(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function unflattenedExponentialSmallConcats (cb) { - stream.write(makeExpoStr('a', 12)) - setImmediate(cb) - }, - function flattenedExponentialSmallConcats (cb) { - stream.write(flatstr(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function unflattenedExponentialLargeConcats (cb) { - stream.write(makeExpoStr(largeStr, 7)) - setImmediate(cb) - }, - function flattenedExponentialLargeConcats (cb) { - stream.write(flatstr(makeExpoStr(largeStr, 7))) - setImmediate(cb) - } -], 10000) - -run(run) - -function makeStr (str, concats) { - var s = '' - while (concats--) { - s += str - } - return s -} - -function makeExpoStr (str, concats) { - var s = str - while (concats--) { - s += s - } - return s -} diff --git a/node_modules/flatstr/index.js b/node_modules/flatstr/index.js deleted file mode 100644 index 0513eb16..00000000 --- a/node_modules/flatstr/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict' - -// You may be tempted to copy and paste this, -// but take a look at the commit history first, -// this is a moving target so relying on the module -// is the best way to make sure the optimization -// method is kept up to date and compatible with -// every Node version. - -function flatstr (s) { - s | 0 - return s -} - -module.exports = flatstr \ No newline at end of file diff --git a/node_modules/flatstr/package.json b/node_modules/flatstr/package.json deleted file mode 100644 index cacbd18b..00000000 --- a/node_modules/flatstr/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "_from": "flatstr@^1.0.12", - "_id": "flatstr@1.0.12", - "_inBundle": false, - "_integrity": "sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw==", - "_location": "/flatstr", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "flatstr@^1.0.12", - "name": "flatstr", - "escapedName": "flatstr", - "rawSpec": "^1.0.12", - "saveSpec": null, - "fetchSpec": "^1.0.12" - }, - "_requiredBy": [ - "/pino", - "/sonic-boom" - ], - "_resolved": "https://registry.npmjs.org/flatstr/-/flatstr-1.0.12.tgz", - "_shasum": "c2ba6a08173edbb6c9640e3055b95e287ceb5931", - "_spec": "flatstr@^1.0.12", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pino", - "author": { - "name": "David Mark Clements" - }, - "browser": { - "v8": "./v8" - }, - "bugs": { - "url": "https://github.com/davidmarkclements/flatstr/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Flattens the underlying C structures of a concatenated JavaScript string", - "devDependencies": { - "fastbench": "^1.0.1", - "tap": "^12.0.1" - }, - "homepage": "https://github.com/davidmarkclements/flatstr#readme", - "license": "MIT", - "main": "index.js", - "name": "flatstr", - "repository": { - "type": "git", - "url": "git+https://github.com/davidmarkclements/flatstr.git" - }, - "tags": [ - "perf", - "performance", - "strings", - "concatenation" - ], - "version": "1.0.12" -} diff --git a/node_modules/flatstr/readme.md b/node_modules/flatstr/readme.md deleted file mode 100644 index d8b77b37..00000000 --- a/node_modules/flatstr/readme.md +++ /dev/null @@ -1,82 +0,0 @@ -# flatstr - -Flattens the underlying C structures of a concatenated JavaScript string - -## About - -If you're doing lots of string concatenation and then writing that -string somewhere, you may find that passing your string through -`flatstr` vastly improves performance. - -## Usage - -```js -var flatstr = require('flatstr') -flatstr(someHeavilyConcatenatedString) -``` - -## Benchmarks - -Benchmarks test flat vs non-flat strings being written to -an `fs.WriteStream`. - -``` -unflattenedManySmallConcats*10000: 147.540ms -flattenedManySmallConcats*10000: 105.994ms -unflattenedSeveralLargeConcats*10000: 287.901ms -flattenedSeveralLargeConcats*10000: 226.121ms -unflattenedExponentialSmallConcats*10000: 410.533ms -flattenedExponentialSmallConcats*10000: 219.973ms -unflattenedExponentialLargeConcats*10000: 2774.230ms -flattenedExponentialLargeConcats*10000: 1862.815ms -``` - -In each case, flattened strings win, -here's the performance gains from using `flatstr` - -``` -ManySmallConcats: 28% -SeveralLargeConcats: 21% -ExponentialSmallConcats: 46% -ExponentialLargeConcats: 33% -``` - -## How does it work - -In the v8 C++ layer, JavaScript strings can be represented in two ways. - -1. As an array -2. As a tree - -When JavaScript strings are concatenated, tree structures are used -to represent them. For the concat operation, this is cheaper than -reallocating a larger array. However, performing other operations -on the tree structures can become costly (particularly where lots of -concatenation has occurred). - -V8 has a a method called `String::Flatten`which converts the tree into a C array. This method is typically called before operations that walk through the bytes of the string (for instance, when testing against a regular expression). It may also be called if a string is accessed many times over, -as an optimization on the string. However, strings aren't always flattened. One example is when we pass a string into a `WriteStream`, at some point the string will be converted to a buffer, and this may be expensive if the underlying representation is a tree. - -`String::Flatten` is not exposed as a JavaScript function, but it can be triggered as a side effect. - -There are several ways to indirectly call `String::Flatten` (see `alt-benchmark.js`), -but coercion to a number appears to be (one of) the cheapest. - -However since Node 10 the V8 version has stopped using Flatten in all -places identified. Thus the code has been updated to seamlessly -use the native runtime function `%FlattenString` without having to use -the `--allow-natives-syntax` flag directly. - -One final note: calling flatstr too much can in fact negatively effect performance. For instance, don't call it every time you concat (if that -was performant, v8 wouldn't be using trees in the first place). The best -place to use flatstr is just prior to passing it to an API that eventually -runs non-v8 code (such as `fs.WriteStream`, or perhaps `xhr` or DOM apis in the browser). - - -## Acknowledgements - -* Sponsored by nearForm - -## License - -MIT diff --git a/node_modules/flatstr/test.js b/node_modules/flatstr/test.js deleted file mode 100644 index 50efe8c4..00000000 --- a/node_modules/flatstr/test.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict' -var test = require('tap').test -var flatstr = require('.') - -test('does not throw', function (t) { - t.doesNotThrow(() => { - flatstr('abc') - }) - t.doesNotThrow(() => { - flatstr({}) - }) - t.doesNotThrow(() => { - flatstr(1) - }) - t.doesNotThrow(() => { - flatstr(null) - }) - t.end() -}) - -test('returns the same value that was passed in', function (t) { - var o = {} - t.is(flatstr('abc'), 'abc') - t.is(flatstr(o), o) - t.end() -}) diff --git a/node_modules/flush-write-stream/.travis.yml b/node_modules/flush-write-stream/.travis.yml deleted file mode 100644 index 4689cb7b..00000000 --- a/node_modules/flush-write-stream/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - '4' - - '6' - - '8' - - '10' diff --git a/node_modules/flush-write-stream/LICENSE b/node_modules/flush-write-stream/LICENSE deleted file mode 100644 index 66a4d2a1..00000000 --- a/node_modules/flush-write-stream/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/flush-write-stream/README.md b/node_modules/flush-write-stream/README.md deleted file mode 100644 index 7ea7b699..00000000 --- a/node_modules/flush-write-stream/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# flush-write-stream - -A write stream constructor that supports a flush function that is called before `finish` is emitted - -``` -npm install flush-write-stream -``` - -[![build status](http://img.shields.io/travis/mafintosh/flush-write-stream.svg?style=flat)](http://travis-ci.org/mafintosh/flush-write-stream) - -## Usage - -``` js -var writer = require('flush-write-stream') - -var ws = writer(write, flush) - -ws.on('finish', function () { - console.log('finished') -}) - -ws.write('hello') -ws.write('world') -ws.end() - -function write (data, enc, cb) { - // i am your normal ._write method - console.log('writing', data.toString()) - cb() -} - -function flush (cb) { - // i am called before finish is emitted - setTimeout(cb, 1000) // wait 1 sec -} -``` - -If you run the above it will produce the following output - -``` -writing hello -writing world -(nothing happens for 1 sec) -finished -``` - -## API - -#### `var ws = writer([options], write, [flush])` - -Create a new writable stream. Options are forwarded to the stream constructor. - -#### `var ws = writer.obj([options], write, [flush])` - -Same as the above except `objectMode` is set to `true` per default. - -## License - -MIT diff --git a/node_modules/flush-write-stream/example.js b/node_modules/flush-write-stream/example.js deleted file mode 100644 index fa6b5dab..00000000 --- a/node_modules/flush-write-stream/example.js +++ /dev/null @@ -1,22 +0,0 @@ -var writer = require('./') - -var ws = writer(write, flush) - -ws.on('finish', function () { - console.log('finished') -}) - -ws.write('hello') -ws.write('world') -ws.end() - -function write (data, enc, cb) { - // i am your normal ._write method - console.log('writing', data.toString()) - cb() -} - -function flush (cb) { - // i am called before finish is emitted - setTimeout(cb, 1000) // wait 1 sec -} diff --git a/node_modules/flush-write-stream/index.js b/node_modules/flush-write-stream/index.js deleted file mode 100644 index d7c62095..00000000 --- a/node_modules/flush-write-stream/index.js +++ /dev/null @@ -1,54 +0,0 @@ -var stream = require('readable-stream') -var inherits = require('inherits') - -var SIGNAL_FLUSH =(Buffer.from && Buffer.from !== Uint8Array.from) - ? Buffer.from([0]) - : new Buffer([0]) - -module.exports = WriteStream - -function WriteStream (opts, write, flush) { - if (!(this instanceof WriteStream)) return new WriteStream(opts, write, flush) - - if (typeof opts === 'function') { - flush = write - write = opts - opts = {} - } - - stream.Writable.call(this, opts) - - this.destroyed = false - this._worker = write || null - this._flush = flush || null -} - -inherits(WriteStream, stream.Writable) - -WriteStream.obj = function (opts, worker, flush) { - if (typeof opts === 'function') return WriteStream.obj(null, opts, worker) - if (!opts) opts = {} - opts.objectMode = true - return new WriteStream(opts, worker, flush) -} - -WriteStream.prototype._write = function (data, enc, cb) { - if (SIGNAL_FLUSH === data) this._flush(cb) - else this._worker(data, enc, cb) -} - -WriteStream.prototype.end = function (data, enc, cb) { - if (!this._flush) return stream.Writable.prototype.end.apply(this, arguments) - if (typeof data === 'function') return this.end(null, null, data) - if (typeof enc === 'function') return this.end(data, null, enc) - if (data) this.write(data) - if (!this._writableState.ending) this.write(SIGNAL_FLUSH) - return stream.Writable.prototype.end.call(this, cb) -} - -WriteStream.prototype.destroy = function (err) { - if (this.destroyed) return - this.destroyed = true - if (err) this.emit('error', err) - this.emit('close') -} diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/.travis.yml b/node_modules/flush-write-stream/node_modules/readable-stream/.travis.yml deleted file mode 100644 index f62cdac0..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -sudo: false -language: node_js -before_install: - - (test $NPM_LEGACY && npm install -g npm@2 && npm install -g npm@3) || true -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: NPM_LEGACY=true - - node_js: '0.10' - env: NPM_LEGACY=true - - node_js: '0.11' - env: NPM_LEGACY=true - - node_js: '0.12' - env: NPM_LEGACY=true - - node_js: 1 - env: NPM_LEGACY=true - - node_js: 2 - env: NPM_LEGACY=true - - node_js: 3 - env: NPM_LEGACY=true - - node_js: 4 - - node_js: 5 - - node_js: 6 - - node_js: 7 - - node_js: 8 - - node_js: 9 -script: "npm run test" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/flush-write-stream/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58d..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/GOVERNANCE.md b/node_modules/flush-write-stream/node_modules/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93f..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### Streams Working Group - -The Node.js Streams is jointly governed by a Working Group -(WG) -that is responsible for high-level guidance of the project. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Conduct guidelines -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project -[README.md](./README.md#current-project-team-members). - -### Collaborators - -The readable-stream GitHub repository is -maintained by the WG and additional Collaborators who are added by the -WG on an ongoing basis. - -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the WG and their addition as -Collaborators is discussed during the WG meeting. - -_Note:_ If you make a significant contribution and are not considered -for commit-access log an issue or contact a WG member directly and it -will be brought up in the next WG meeting. - -Modifications of the contents of the readable-stream repository are -made on -a collaborative basis. Anybody with a GitHub account may propose a -modification via pull request and it will be considered by the project -Collaborators. All pull requests must be reviewed and accepted by a -Collaborator with sufficient expertise who is able to take full -responsibility for the change. In the case of pull requests proposed -by an existing Collaborator, an additional Collaborator is required -for sign-off. Consensus should be sought if additional Collaborators -participate and there is disagreement around a particular -modification. See _Consensus Seeking Process_ below for further detail -on the consensus model used for governance. - -Collaborators may opt to elevate significant or controversial -modifications, or modifications that have not found consensus to the -WG for discussion by assigning the ***WG-agenda*** tag to a pull -request or issue. The WG should serve as the final arbiter where -required. - -For the current list of Collaborators, see the project -[README.md](./README.md#members). - -### WG Membership - -WG seats are not time-limited. There is no fixed size of the WG. -However, the expected target is between 6 and 12, to ensure adequate -coverage of important areas of expertise, balanced with the ability to -make decisions efficiently. - -There is no specific set of requirements or qualifications for WG -membership beyond these rules. - -The WG may add additional members to the WG by unanimous consensus. - -A WG member may be removed from the WG by voluntary resignation, or by -unanimous consensus of all other WG members. - -Changes to WG membership should be posted in the agenda, and may be -suggested as any other agenda item (see "WG Meetings" below). - -If an addition or removal is proposed during a meeting, and the full -WG is not in attendance to participate, then the addition or removal -is added to the agenda for the subsequent meeting. This is to ensure -that all members are given the opportunity to participate in all -membership decisions. If a WG member is unable to attend a meeting -where a planned membership decision is being made, then their consent -is assumed. - -No more than 1/3 of the WG members may be affiliated with the same -employer. If removal or resignation of a WG member, or a change of -employment by a WG member, creates a situation where more than 1/3 of -the WG membership shares an employer, then the situation must be -immediately remedied by the resignation or removal of one or more WG -members affiliated with the over-represented employer(s). - -### WG Meetings - -The WG meets occasionally on a Google Hangout On Air. A designated moderator -approved by the WG runs the meeting. Each meeting should be -published to YouTube. - -Items are added to the WG agenda that are considered contentious or -are modifications of governance, contribution policy, WG membership, -or release process. - -The intention of the agenda is not to approve or review all patches; -that should happen continuously on GitHub and be handled by the larger -group of Collaborators. - -Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, -WG member or the moderator can add the item to the agenda by adding -the ***WG-agenda*** tag to the issue. - -Prior to each WG meeting the moderator will share the Agenda with -members of the WG. WG members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the WG -cannot veto or remove items. - -The WG may invite persons or representatives from certain projects to -participate in a non-voting capacity. - -The moderator is responsible for summarizing the discussion of each -agenda item and sends it as a pull request after the meeting. - -### Consensus Seeking Process - -The WG follows a -[Consensus -Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) -decision-making model. - -When an agenda item has appeared to reach a consensus the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. - -If an agenda item cannot reach a consensus a WG member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be seconded by a majority of the WG -or else the discussion will continue. Simple majority wins. - -Note that changes to WG membership require a majority consensus. See -"WG Membership" above. diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/LICENSE b/node_modules/flush-write-stream/node_modules/readable-stream/LICENSE deleted file mode 100644 index 2873b3b2..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/README.md b/node_modules/flush-write-stream/node_modules/readable-stream/README.md deleted file mode 100644 index 23fe3f3e..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# readable-stream - -***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -<a name="members"></a> -## Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E -* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/flush-write-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index 83275f19..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,60 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section - - diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/duplex-browser.js b/node_modules/flush-write-stream/node_modules/readable-stream/duplex-browser.js deleted file mode 100644 index f8b2db83..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/duplex-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_duplex.js'); diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/duplex.js b/node_modules/flush-write-stream/node_modules/readable-stream/duplex.js deleted file mode 100644 index 46924cbf..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Duplex diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 57003c32..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/*<replacement>*/ - -var pna = require('process-nextick-args'); -/*</replacement>*/ - -/*<replacement>*/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/*</replacement>*/ - -module.exports = Duplex; - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -{ - // avoid scope creep, the keys array can then be collected - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - pna.nextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -Object.defineProperty(Duplex.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); - -Duplex.prototype._destroy = function (err, cb) { - this.push(null); - this.end(); - - pna.nextTick(cb, err); -}; \ No newline at end of file diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 612edb4d..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 0f807646..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1019 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/*<replacement>*/ - -var pna = require('process-nextick-args'); -/*</replacement>*/ - -module.exports = Readable; - -/*<replacement>*/ -var isArray = require('isarray'); -/*</replacement>*/ - -/*<replacement>*/ -var Duplex; -/*</replacement>*/ - -Readable.ReadableState = ReadableState; - -/*<replacement>*/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/*</replacement>*/ - -/*<replacement>*/ -var Stream = require('./internal/streams/stream'); -/*</replacement>*/ - -/*<replacement>*/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/*</replacement>*/ - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -/*<replacement>*/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/*</replacement>*/ - -var BufferList = require('./internal/streams/BufferList'); -var destroyImpl = require('./internal/streams/destroy'); -var StringDecoder; - -util.inherits(Readable, Stream); - -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); - - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var readableHwm = options.readableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} - -Object.defineProperty(Readable.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); - -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - this.push(null); - cb(err); -}; - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); - } else if (state.ended) { - stream.emit('error', new Error('stream.push() after EOF')); - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - } - } - - return needMoreData(state); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } else { - state.length -= n; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - pna.nextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('_read() is not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - // If the user pushes more data while we're writing to dest then we'll end up - // in ondata again. However, we only want to increase awaitDrain once because - // dest will only emit one 'drain' event for the multiple writes. - // => Introduce a guard on increasing awaitDrain. - var increasedAwaitDrain = false; - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - increasedAwaitDrain = false; - var ret = dest.write(chunk); - if (false === ret && !increasedAwaitDrain) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - increasedAwaitDrain = true; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { hasUnpiped: false }; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, unpipeInfo); - }return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this, unpipeInfo); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data') { - // Start flowing on next tick if stream isn't explicitly paused - if (this._readableState.flowing !== false) this.resume(); - } else if (ev === 'readable') { - var state = this._readableState; - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.emittedReadable = false; - if (!state.reading) { - pna.nextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - pna.nextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - state.awaitDrain = 0; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null) {} -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var _this = this; - - var state = this._readableState; - var paused = false; - - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - - _this.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return this; -}; - -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._readableState.highWaterMark; - } -}); - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = fromListPartial(n, state.buffer, state.decoder); - } - - return ret; -} - -// Extracts only enough buffered data to satisfy the amount requested. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromListPartial(n, list, hasStrings) { - var ret; - if (n < list.head.data.length) { - // slice is the same for buffers and strings - ret = list.head.data.slice(0, n); - list.head.data = list.head.data.slice(n); - } else if (n === list.head.data.length) { - // first chunk is a perfect match - ret = list.shift(); - } else { - // result spans more than one buffer - ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); - } - return ret; -} - -// Copies a specified amount of characters from the list of buffered data -// chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBufferString(n, list) { - var p = list.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -// Copies a specified amount of bytes from the list of buffered data chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBuffer(n, list) { - var ret = Buffer.allocUnsafe(n); - var p = list.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - pna.nextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index fcfc105a..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -util.inherits(Transform, Duplex); - -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) { - return this.emit('error', new Error('write callback called multiple times')); - } - - ts.writechunk = null; - ts.writecb = null; - - if (data != null) // single equals check for both `null` and `undefined` - this.push(data); - - cb(er); - - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); -} - -function prefinish() { - var _this = this; - - if (typeof this._flush === 'function') { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('_transform() is not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -Transform.prototype._destroy = function (err, cb) { - var _this2 = this; - - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - _this2.emit('close'); - }); -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - - if (data != null) // single equals check for both `null` and `undefined` - stream.push(data); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); - - if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index b0b02200..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,687 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -/*<replacement>*/ - -var pna = require('process-nextick-args'); -/*</replacement>*/ - -module.exports = Writable; - -/* <replacement> */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* </replacement> */ - -/*<replacement>*/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; -/*</replacement>*/ - -/*<replacement>*/ -var Duplex; -/*</replacement>*/ - -Writable.WritableState = WritableState; - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -/*<replacement>*/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/*</replacement>*/ - -/*<replacement>*/ -var Stream = require('./internal/streams/stream'); -/*</replacement>*/ - -/*<replacement>*/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/*</replacement>*/ - -var destroyImpl = require('./internal/streams/destroy'); - -util.inherits(Writable, Stream); - -function nop() {} - -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var writableHwm = options.writableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // if _final has been called - this.finalCalled = false; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // has it been destroyed - this.destroyed = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function (object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function (object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { - return new Writable(options); - } - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - pna.nextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - pna.nextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} - -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - pna.nextTick(cb, er); - // this can emit finish, and it will always happen - // after error - pna.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /*<replacement>*/ - asyncWrite(afterWrite, stream, state, finished, cb); - /*</replacement>*/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('_write() is not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - stream.emit('error', err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function') { - state.pendingcb++; - state.finalCalled = true; - pna.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = corkReq; - } else { - state.corkedRequestsFree = corkReq; - } -} - -Object.defineProperty(Writable.prototype, 'destroyed', { - get: function () { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); - -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - this.end(); - cb(err); -}; \ No newline at end of file diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js deleted file mode 100644 index aefc68bd..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Buffer = require('safe-buffer').Buffer; -var util = require('util'); - -function copyBuffer(src, target, offset) { - src.copy(target, offset); -} - -module.exports = function () { - function BufferList() { - _classCallCheck(this, BufferList); - - this.head = null; - this.tail = null; - this.length = 0; - } - - BufferList.prototype.push = function push(v) { - var entry = { data: v, next: null }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - }; - - BufferList.prototype.unshift = function unshift(v) { - var entry = { data: v, next: this.head }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - }; - - BufferList.prototype.shift = function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - }; - - BufferList.prototype.clear = function clear() { - this.head = this.tail = null; - this.length = 0; - }; - - BufferList.prototype.join = function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) { - ret += s + p.data; - }return ret; - }; - - BufferList.prototype.concat = function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - if (this.length === 1) return this.head.data; - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; - }; - - return BufferList; -}(); - -if (util && util.inspect && util.inspect.custom) { - module.exports.prototype[util.inspect.custom] = function () { - var obj = util.inspect({ length: this.length }); - return this.constructor.name + ' ' + obj; - }; -} \ No newline at end of file diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index 5a0a0d88..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -/*<replacement>*/ - -var pna = require('process-nextick-args'); -/*</replacement>*/ - -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { - pna.nextTick(emitErrorNT, this, err); - } - return this; - } - - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; - } - - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - pna.nextTick(emitErrorNT, _this, err); - if (_this._writableState) { - _this._writableState.errorEmitted = true; - } - } else if (cb) { - cb(err); - } - }); - - return this; -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy -}; \ No newline at end of file diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3fd..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b6..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/package.json b/node_modules/flush-write-stream/node_modules/readable-stream/package.json deleted file mode 100644 index 4f4ee610..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "readable-stream@^2.3.6", - "_id": "readable-stream@2.3.7", - "_inBundle": false, - "_integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "_location": "/flush-write-stream/readable-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "readable-stream@^2.3.6", - "name": "readable-stream", - "escapedName": "readable-stream", - "rawSpec": "^2.3.6", - "saveSpec": null, - "fetchSpec": "^2.3.6" - }, - "_requiredBy": [ - "/flush-write-stream" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "_shasum": "1eca1cf711aef814c04f62252a36a62f6cb23b57", - "_spec": "readable-stream@^2.3.6", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/flush-write-stream", - "browser": { - "util": false, - "./readable.js": "./readable-browser.js", - "./writable.js": "./writable-browser.js", - "./duplex.js": "./duplex-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "deprecated": false, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "assert": "^1.4.0", - "babel-polyfill": "^6.9.1", - "buffer": "^4.9.0", - "lolex": "^2.3.2", - "nyc": "^6.4.0", - "tap": "^0.7.0", - "tape": "^4.8.0" - }, - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "name": "readable-stream", - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov", - "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js" - }, - "version": "2.3.7" -} diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/passthrough.js b/node_modules/flush-write-stream/node_modules/readable-stream/passthrough.js deleted file mode 100644 index ffd791d7..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').PassThrough diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/readable-browser.js b/node_modules/flush-write-stream/node_modules/readable-stream/readable-browser.js deleted file mode 100644 index e5037259..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/readable-browser.js +++ /dev/null @@ -1,7 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/readable.js b/node_modules/flush-write-stream/node_modules/readable-stream/readable.js deleted file mode 100644 index ec89ec53..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,19 +0,0 @@ -var Stream = require('stream'); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; - exports = module.exports = Stream.Readable; - exports.Readable = Stream.Readable; - exports.Writable = Stream.Writable; - exports.Duplex = Stream.Duplex; - exports.Transform = Stream.Transform; - exports.PassThrough = Stream.PassThrough; - exports.Stream = Stream; -} else { - exports = module.exports = require('./lib/_stream_readable.js'); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = require('./lib/_stream_writable.js'); - exports.Duplex = require('./lib/_stream_duplex.js'); - exports.Transform = require('./lib/_stream_transform.js'); - exports.PassThrough = require('./lib/_stream_passthrough.js'); -} diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/transform.js b/node_modules/flush-write-stream/node_modules/readable-stream/transform.js deleted file mode 100644 index b1baba26..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Transform diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/writable-browser.js b/node_modules/flush-write-stream/node_modules/readable-stream/writable-browser.js deleted file mode 100644 index ebdde6a8..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/writable-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_writable.js'); diff --git a/node_modules/flush-write-stream/node_modules/readable-stream/writable.js b/node_modules/flush-write-stream/node_modules/readable-stream/writable.js deleted file mode 100644 index 3211a6f8..00000000 --- a/node_modules/flush-write-stream/node_modules/readable-stream/writable.js +++ /dev/null @@ -1,8 +0,0 @@ -var Stream = require("stream") -var Writable = require("./lib/_stream_writable.js") - -if (process.env.READABLE_STREAM === 'disable') { - module.exports = Stream && Stream.Writable || Writable -} else { - module.exports = Writable -} diff --git a/node_modules/flush-write-stream/node_modules/safe-buffer/LICENSE b/node_modules/flush-write-stream/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068cee..00000000 --- a/node_modules/flush-write-stream/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/flush-write-stream/node_modules/safe-buffer/README.md b/node_modules/flush-write-stream/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81afd..00000000 --- a/node_modules/flush-write-stream/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) -<!-- YAML -added: v3.0.0 ---> - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) -<!-- YAML -added: v5.10.0 ---> - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: <Buffer 88 13 a0 0f> - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: <Buffer 88 13 70 17> -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) -<!-- YAML -added: v3.0.0 ---> - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) -<!-- YAML -added: v5.10.0 ---> - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) -<!-- YAML -added: v5.10.0 ---> - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // <Buffer 00 00 00 00 00> -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // <Buffer 61 61 61 61 61> -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64> -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) -<!-- YAML -added: v5.10.0 ---> - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // <Buffer 78 e0 82 02 01> - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // <Buffer 00 00 00 00 00> -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) -<!-- YAML -added: v5.10.0 ---> - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/node_modules/flush-write-stream/node_modules/safe-buffer/index.d.ts b/node_modules/flush-write-stream/node_modules/safe-buffer/index.d.ts deleted file mode 100644 index e9fed809..00000000 --- a/node_modules/flush-write-stream/node_modules/safe-buffer/index.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "safe-buffer" { - export class Buffer { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - } -} \ No newline at end of file diff --git a/node_modules/flush-write-stream/node_modules/safe-buffer/index.js b/node_modules/flush-write-stream/node_modules/safe-buffer/index.js deleted file mode 100644 index 22438dab..00000000 --- a/node_modules/flush-write-stream/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/node_modules/flush-write-stream/node_modules/safe-buffer/package.json b/node_modules/flush-write-stream/node_modules/safe-buffer/package.json deleted file mode 100644 index 91161170..00000000 --- a/node_modules/flush-write-stream/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "safe-buffer@~5.1.1", - "_id": "safe-buffer@5.1.2", - "_inBundle": false, - "_integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "_location": "/flush-write-stream/safe-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "safe-buffer@~5.1.1", - "name": "safe-buffer", - "escapedName": "safe-buffer", - "rawSpec": "~5.1.1", - "saveSpec": null, - "fetchSpec": "~5.1.1" - }, - "_requiredBy": [ - "/flush-write-stream/readable-stream", - "/flush-write-stream/string_decoder" - ], - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "_shasum": "991ec69d296e0313747d59bdfd2b745c35f8828d", - "_spec": "safe-buffer@~5.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/flush-write-stream/node_modules/readable-stream", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Safer Node.js Buffer API", - "devDependencies": { - "standard": "*", - "tape": "^4.0.0" - }, - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "name": "safe-buffer", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "types": "index.d.ts", - "version": "5.1.2" -} diff --git a/node_modules/flush-write-stream/node_modules/string_decoder/.travis.yml b/node_modules/flush-write-stream/node_modules/string_decoder/.travis.yml deleted file mode 100644 index 3347a725..00000000 --- a/node_modules/flush-write-stream/node_modules/string_decoder/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test diff --git a/node_modules/flush-write-stream/node_modules/string_decoder/LICENSE b/node_modules/flush-write-stream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 778edb20..00000000 --- a/node_modules/flush-write-stream/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - diff --git a/node_modules/flush-write-stream/node_modules/string_decoder/README.md b/node_modules/flush-write-stream/node_modules/string_decoder/README.md deleted file mode 100644 index 5fd58315..00000000 --- a/node_modules/flush-write-stream/node_modules/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# string_decoder - -***Node-core v8.9.4 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. - -## Streams Working Group - -`string_decoder` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -See [readable-stream](https://github.com/nodejs/readable-stream) for -more details. diff --git a/node_modules/flush-write-stream/node_modules/string_decoder/lib/string_decoder.js b/node_modules/flush-write-stream/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63f..00000000 --- a/node_modules/flush-write-stream/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/*<replacement>*/ - -var Buffer = require('safe-buffer').Buffer; -/*</replacement>*/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/node_modules/flush-write-stream/node_modules/string_decoder/package.json b/node_modules/flush-write-stream/node_modules/string_decoder/package.json deleted file mode 100644 index 02148f62..00000000 --- a/node_modules/flush-write-stream/node_modules/string_decoder/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "string_decoder@~1.1.1", - "_id": "string_decoder@1.1.1", - "_inBundle": false, - "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "_location": "/flush-write-stream/string_decoder", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "string_decoder@~1.1.1", - "name": "string_decoder", - "escapedName": "string_decoder", - "rawSpec": "~1.1.1", - "saveSpec": null, - "fetchSpec": "~1.1.1" - }, - "_requiredBy": [ - "/flush-write-stream/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8", - "_spec": "string_decoder@~1.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/flush-write-stream/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/nodejs/string_decoder/issues" - }, - "bundleDependencies": false, - "dependencies": { - "safe-buffer": "~5.1.0" - }, - "deprecated": false, - "description": "The string_decoder module from Node core", - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "lib/string_decoder.js", - "name": "string_decoder", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "test": "tap test/parallel/*.js && node test/verify-dependencies" - }, - "version": "1.1.1" -} diff --git a/node_modules/flush-write-stream/package.json b/node_modules/flush-write-stream/package.json deleted file mode 100644 index 551db298..00000000 --- a/node_modules/flush-write-stream/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "_from": "flush-write-stream@^1.0.2", - "_id": "flush-write-stream@1.1.1", - "_inBundle": false, - "_integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", - "_location": "/flush-write-stream", - "_phantomChildren": { - "core-util-is": "1.0.2", - "inherits": "2.0.4", - "isarray": "1.0.0", - "process-nextick-args": "2.0.1", - "util-deprecate": "1.0.2" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "flush-write-stream@^1.0.2", - "name": "flush-write-stream", - "escapedName": "flush-write-stream", - "rawSpec": "^1.0.2", - "saveSpec": null, - "fetchSpec": "^1.0.2" - }, - "_requiredBy": [ - "/lead" - ], - "_resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "_shasum": "8dd7d873a1babc207d94ead0c2e0e44276ebf2e8", - "_spec": "flush-write-stream@^1.0.2", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/lead", - "author": { - "name": "Mathias Buus", - "url": "@mafintosh" - }, - "bugs": { - "url": "https://github.com/mafintosh/flush-write-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - }, - "deprecated": false, - "description": "A write stream constructor that supports a flush function that is called before finish is emitted", - "devDependencies": { - "tape": "^4.2.2" - }, - "homepage": "https://github.com/mafintosh/flush-write-stream", - "license": "MIT", - "main": "index.js", - "name": "flush-write-stream", - "repository": { - "type": "git", - "url": "git+https://github.com/mafintosh/flush-write-stream.git" - }, - "scripts": { - "test": "tape test.js" - }, - "version": "1.1.1" -} diff --git a/node_modules/flush-write-stream/test.js b/node_modules/flush-write-stream/test.js deleted file mode 100644 index 6cd0c20e..00000000 --- a/node_modules/flush-write-stream/test.js +++ /dev/null @@ -1,85 +0,0 @@ -var tape = require('tape') -var writer = require('./') - -tape('is a write stream', function (t) { - var expected = ['hello', 'world', 'verden'] - var ws = writer.obj(write) - - ws.write('hello') - ws.write('world') - ws.write('verden') - ws.end(function () { - t.same(expected.length, 0) - t.end() - }) - - function write (data, enc, cb) { - t.same(data, expected.shift()) - cb() - } -}) - -tape('is flushable', function (t) { - var expected = ['hello', 'world', 'verden'] - var flushed = false - - var ws = writer.obj(write, flush) - - ws.write('hello') - ws.write('world') - ws.write('verden') - ws.end(function () { - t.same(expected.length, 0) - t.ok(flushed, 'was flushed') - t.end() - }) - - function write (data, enc, cb) { - t.same(data, expected.shift()) - cb() - } - - function flush (cb) { - flushed = true - process.nextTick(cb) - } -}) - -tape('can pass options', function (t) { - var expected = ['hello', 'world', 'verden'] - var flushed = false - - var ws = writer({objectMode: true}, write, flush) - - ws.write('hello') - ws.write('world') - ws.write('verden') - ws.end(function () { - t.same(expected.length, 0) - t.ok(flushed, 'was flushed') - t.end() - }) - - function write (data, enc, cb) { - t.same(data, expected.shift()) - cb() - } - - function flush (cb) { - flushed = true - process.nextTick(cb) - } -}) - -tape('emits error on destroy', function (t) { - var expected = new Error() - - var ws = writer({objectMode: true}, function () {}) - - ws.on('error', function (err) { - t.equal(err, expected) - }) - ws.on('close', t.end) - - ws.destroy(expected) -}) diff --git a/node_modules/fs-mkdirp-stream/LICENSE b/node_modules/fs-mkdirp-stream/LICENSE deleted file mode 100644 index 73593ac1..00000000 --- a/node_modules/fs-mkdirp-stream/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors (Originally based on code from node-mkdirp - MIT/X11 license - Copyright 2010 James Halliday) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/fs-mkdirp-stream/README.md b/node_modules/fs-mkdirp-stream/README.md deleted file mode 100644 index 819f8a38..00000000 --- a/node_modules/fs-mkdirp-stream/README.md +++ /dev/null @@ -1,65 +0,0 @@ -<p align="center"> - <a href="http://gulpjs.com"> - <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png"> - </a> -</p> - -# fs-mkdirp-stream - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] - -Ensure directories exist before writing to them. - -## Usage - -```js -var to = require('to2'); -var from = require('from2'); -var mkdirpStream = require('fs-mkdirp-stream'); - -from.obj([{ dirname: '/path/to/my/', path: '/path/to/my/file.js' }]) - .pipe(mkdirpStream.obj(function(obj, callback) { - // callback can take 3 arguments (err, dirname, mode) - callback(null, obj.dirname); - })) - .pipe(to.obj(function(obj) { - // This will be called once the directory exists - // obj === { dirname: '/path/to/my/', path: '/path/to/my/file.js' } - })); -``` - -## API - -### `mkdirpStream(resolver)` - -Takes a `resolver` function or string and returns a `through2` stream. - -If the `resolver` is a function, it will be called once per chunk with the signature `(chunk, callback)`. The `callback(error, dirpath, mode)` must be called with the `dirpath` to be created as the 2nd parameter or an `error` as the 1st parameter; optionally with a `mode` as the 3rd parameter. - -If the `resolver` is a string, it will be created/ensured for each chunk (e.g. if it were deleted between chunks, it would be recreated). When using a string, a custom `mode` can't be used. - -### `mkdirpStream.obj(resolver)` - -The same as the top-level API but for object streams. See the example to see the benefit of object streams with this module. - -## License - -MIT - -Contains a custom implementation of `mkdirp` originally based on https://github.com/substack/node-mkdirp (Licensed MIT/X11 - Copyright 2010 James Halliday) with heavy modification to better support custom modes. - -[downloads-image]: http://img.shields.io/npm/dm/fs-mkdirp-stream.svg -[npm-url]: https://npmjs.com/package/fs-mkdirp-stream -[npm-image]: http://img.shields.io/npm/v/fs-mkdirp-stream.svg - -[travis-url]: https://travis-ci.org/gulpjs/fs-mkdirp-stream -[travis-image]: http://img.shields.io/travis/gulpjs/fs-mkdirp-stream.svg?label=travis-ci - -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/fs-mkdirp-stream -[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/fs-mkdirp-stream.svg?label=appveyor - -[coveralls-url]: https://coveralls.io/r/gulpjs/fs-mkdirp-stream -[coveralls-image]: http://img.shields.io/coveralls/gulpjs/fs-mkdirp-stream/master.svg - -[gitter-url]: https://gitter.im/gulpjs/gulp -[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png diff --git a/node_modules/fs-mkdirp-stream/index.js b/node_modules/fs-mkdirp-stream/index.js deleted file mode 100644 index cde5e19f..00000000 --- a/node_modules/fs-mkdirp-stream/index.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -var through = require('through2'); - -var mkdirp = require('./mkdirp'); - -function toFunction(dirpath) { - function stringResolver(chunk, callback) { - callback(null, dirpath); - } - - return stringResolver; -} - -function define(options) { - - function mkdirpStream(resolver) { - // Handle resolver that's just a dirpath - if (typeof resolver === 'string') { - resolver = toFunction(resolver); - } - - function makeFileDirs(chunk, enc, callback) { - resolver(chunk, onDirpath); - - function onDirpath(dirpathErr, dirpath, mode) { - if (dirpathErr) { - return callback(dirpathErr); - } - - mkdirp(dirpath, mode, onMkdirp); - } - - function onMkdirp(mkdirpErr) { - if (mkdirpErr) { - return callback(mkdirpErr); - } - - callback(null, chunk); - } - } - - return through(options, makeFileDirs); - } - - return mkdirpStream; -} - -module.exports = define(); -module.exports.obj = define({ objectMode: true, highWaterMark: 16 }); diff --git a/node_modules/fs-mkdirp-stream/mkdirp.js b/node_modules/fs-mkdirp-stream/mkdirp.js deleted file mode 100644 index e70031b0..00000000 --- a/node_modules/fs-mkdirp-stream/mkdirp.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict'; - -var path = require('path'); - -var fs = require('graceful-fs'); - -var MASK_MODE = parseInt('7777', 8); -var DEFAULT_DIR_MODE = parseInt('0777', 8); - -function mkdirp(dirpath, customMode, callback) { - if (typeof customMode === 'function') { - callback = customMode; - customMode = undefined; - } - - var mode = customMode || (DEFAULT_DIR_MODE & ~process.umask()); - dirpath = path.resolve(dirpath); - - fs.mkdir(dirpath, mode, onMkdir); - - function onMkdir(mkdirErr) { - if (!mkdirErr) { - return fs.stat(dirpath, onStat); - } - - switch (mkdirErr.code) { - case 'ENOENT': { - return mkdirp(path.dirname(dirpath), onRecurse); - } - - case 'EEXIST': { - return fs.stat(dirpath, onStat); - } - - default: { - return callback(mkdirErr); - } - } - - function onStat(statErr, stats) { - if (statErr) { - return callback(statErr); - } - - if (!stats.isDirectory()) { - return callback(mkdirErr); - } - - // TODO: Is it proper to mask like this? - if ((stats.mode & MASK_MODE) === mode) { - return callback(); - } - - if (!customMode) { - return callback(); - } - - fs.chmod(dirpath, mode, callback); - } - } - - function onRecurse(recurseErr) { - if (recurseErr) { - return callback(recurseErr); - } - - mkdirp(dirpath, mode, callback); - } -} - -module.exports = mkdirp; diff --git a/node_modules/fs-mkdirp-stream/package.json b/node_modules/fs-mkdirp-stream/package.json deleted file mode 100644 index 6821be33..00000000 --- a/node_modules/fs-mkdirp-stream/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "_from": "fs-mkdirp-stream@^1.0.0", - "_id": "fs-mkdirp-stream@1.0.0", - "_inBundle": false, - "_integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", - "_location": "/fs-mkdirp-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "fs-mkdirp-stream@^1.0.0", - "name": "fs-mkdirp-stream", - "escapedName": "fs-mkdirp-stream", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", - "_shasum": "0b7815fc3201c6a69e14db98ce098c16935259eb", - "_spec": "fs-mkdirp-stream@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs", - "author": { - "name": "Gulp Team", - "email": "team@gulpjs.com", - "url": "http://gulpjs.com/" - }, - "bugs": { - "url": "https://github.com/gulpjs/fs-mkdirp-stream/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com" - } - ], - "dependencies": { - "graceful-fs": "^4.1.11", - "through2": "^2.0.3" - }, - "deprecated": false, - "description": "Ensure directories exist before writing to them.", - "devDependencies": { - "eslint": "^1.10.3", - "eslint-config-gulp": "^2.0.0", - "expect": "^1.20.2", - "istanbul": "^0.4.3", - "istanbul-coveralls": "^1.0.3", - "jscs": "^2.4.0", - "jscs-preset-gulp": "^1.0.0", - "mississippi": "^1.3.0", - "mocha": "^3.2.0", - "rimraf": "^2.6.1" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "LICENSE", - "index.js", - "mkdirp.js" - ], - "homepage": "https://github.com/gulpjs/fs-mkdirp-stream#readme", - "keywords": [ - "fs", - "mkdirp", - "stream", - "mkdir", - "directory", - "directories", - "ensure" - ], - "license": "MIT", - "main": "index.js", - "name": "fs-mkdirp-stream", - "repository": { - "type": "git", - "url": "git+https://github.com/gulpjs/fs-mkdirp-stream.git" - }, - "scripts": { - "cover": "istanbul cover _mocha --report lcovonly", - "coveralls": "npm run cover && istanbul-coveralls", - "lint": "eslint index.js mkdirp.js test/ && jscs index.js mkdirp.js test/", - "pretest": "npm run lint", - "test": "mocha --async-only" - }, - "version": "1.0.0" -} diff --git a/node_modules/fs.realpath/LICENSE b/node_modules/fs.realpath/LICENSE deleted file mode 100644 index 5bd884c2..00000000 --- a/node_modules/fs.realpath/LICENSE +++ /dev/null @@ -1,43 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ----- - -This library bundles a version of the `fs.realpath` and `fs.realpathSync` -methods from Node.js v0.10 under the terms of the Node.js MIT license. - -Node's license follows, also included at the header of `old.js` which contains -the licensed code: - - Copyright Joyent, Inc. and other Node contributors. - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. diff --git a/node_modules/fs.realpath/README.md b/node_modules/fs.realpath/README.md deleted file mode 100644 index a42ceac6..00000000 --- a/node_modules/fs.realpath/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# fs.realpath - -A backwards-compatible fs.realpath for Node v6 and above - -In Node v6, the JavaScript implementation of fs.realpath was replaced -with a faster (but less resilient) native implementation. That raises -new and platform-specific errors and cannot handle long or excessively -symlink-looping paths. - -This module handles those cases by detecting the new errors and -falling back to the JavaScript implementation. On versions of Node -prior to v6, it has no effect. - -## USAGE - -```js -var rp = require('fs.realpath') - -// async version -rp.realpath(someLongAndLoopingPath, function (er, real) { - // the ELOOP was handled, but it was a bit slower -}) - -// sync version -var real = rp.realpathSync(someLongAndLoopingPath) - -// monkeypatch at your own risk! -// This replaces the fs.realpath/fs.realpathSync builtins -rp.monkeypatch() - -// un-do the monkeypatching -rp.unmonkeypatch() -``` diff --git a/node_modules/fs.realpath/index.js b/node_modules/fs.realpath/index.js deleted file mode 100644 index b09c7c7e..00000000 --- a/node_modules/fs.realpath/index.js +++ /dev/null @@ -1,66 +0,0 @@ -module.exports = realpath -realpath.realpath = realpath -realpath.sync = realpathSync -realpath.realpathSync = realpathSync -realpath.monkeypatch = monkeypatch -realpath.unmonkeypatch = unmonkeypatch - -var fs = require('fs') -var origRealpath = fs.realpath -var origRealpathSync = fs.realpathSync - -var version = process.version -var ok = /^v[0-5]\./.test(version) -var old = require('./old.js') - -function newError (er) { - return er && er.syscall === 'realpath' && ( - er.code === 'ELOOP' || - er.code === 'ENOMEM' || - er.code === 'ENAMETOOLONG' - ) -} - -function realpath (p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb) - } - - if (typeof cache === 'function') { - cb = cache - cache = null - } - origRealpath(p, cache, function (er, result) { - if (newError(er)) { - old.realpath(p, cache, cb) - } else { - cb(er, result) - } - }) -} - -function realpathSync (p, cache) { - if (ok) { - return origRealpathSync(p, cache) - } - - try { - return origRealpathSync(p, cache) - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache) - } else { - throw er - } - } -} - -function monkeypatch () { - fs.realpath = realpath - fs.realpathSync = realpathSync -} - -function unmonkeypatch () { - fs.realpath = origRealpath - fs.realpathSync = origRealpathSync -} diff --git a/node_modules/fs.realpath/old.js b/node_modules/fs.realpath/old.js deleted file mode 100644 index b40305e7..00000000 --- a/node_modules/fs.realpath/old.js +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var pathModule = require('path'); -var isWindows = process.platform === 'win32'; -var fs = require('fs'); - -// JavaScript implementation of realpath, ported from node pre-v6 - -var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - -function rethrow() { - // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and - // is fairly slow to generate. - var callback; - if (DEBUG) { - var backtrace = new Error; - callback = debugCallback; - } else - callback = missingCallback; - - return callback; - - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs - else if (!process.noDeprecation) { - var msg = 'fs: missing callback ' + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } -} - -function maybeCallback(cb) { - return typeof cb === 'function' ? cb : rethrow(); -} - -var normalize = pathModule.normalize; - -// Regexp that finds the next partion of a (partial) path -// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] -if (isWindows) { - var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; -} else { - var nextPartRe = /(.*?)(?:[\/]+|$)/g; -} - -// Regex to find the device root, including trailing slash. E.g. 'c:\\'. -if (isWindows) { - var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; -} else { - var splitRootRe = /^[\/]*/; -} - -exports.realpathSync = function realpathSync(p, cache) { - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstatSync(base); - knownHard[base] = true; - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - // NB: p.length changes. - while (pos < p.length) { - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - continue; - } - - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // some known symbolic link. no need to stat again. - resolvedLink = cache[base]; - } else { - var stat = fs.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - - // read the link if it wasn't read before - // dev/ino always return 0 on windows, so skip the check. - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs.statSync(base); - linkTarget = fs.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - // track this, if given a cache. - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - - if (cache) cache[original] = p; - - return p; -}; - - -exports.realpath = function realpath(p, cache, cb) { - if (typeof cb !== 'function') { - cb = maybeCallback(cache); - cache = null; - } - - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - function LOOP() { - // stop if scanned past end of path - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - return process.nextTick(LOOP); - } - - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // known symbolic link. no need to stat again. - return gotResolvedLink(cache[base]); - } - - return fs.lstat(base, gotStat); - } - - function gotStat(err, stat) { - if (err) return cb(err); - - // if not a symlink, skip to the next path part - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - - // stat & read the link if not read before - // call gotTarget as soon as the link target is known - // dev/ino always return 0 on windows, so skip the check. - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs.stat(base, function(err) { - if (err) return cb(err); - - fs.readlink(base, function(err, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err, target); - }); - }); - } - - function gotTarget(err, target, base) { - if (err) return cb(err); - - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base] = resolvedLink; - gotResolvedLink(resolvedLink); - } - - function gotResolvedLink(resolvedLink) { - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } -}; diff --git a/node_modules/fs.realpath/package.json b/node_modules/fs.realpath/package.json deleted file mode 100644 index 3cc1d213..00000000 --- a/node_modules/fs.realpath/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "fs.realpath@^1.0.0", - "_id": "fs.realpath@1.0.0", - "_inBundle": false, - "_integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "_location": "/fs.realpath", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "fs.realpath@^1.0.0", - "name": "fs.realpath", - "escapedName": "fs.realpath", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/glob" - ], - "_resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "_shasum": "1504ad2523158caa40db4a2787cb01411994ea4f", - "_spec": "fs.realpath@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/glob", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/fs.realpath/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", - "devDependencies": {}, - "files": [ - "old.js", - "index.js" - ], - "homepage": "https://github.com/isaacs/fs.realpath#readme", - "keywords": [ - "realpath", - "fs", - "polyfill" - ], - "license": "ISC", - "main": "index.js", - "name": "fs.realpath", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/fs.realpath.git" - }, - "scripts": { - "test": "tap test/*.js --cov" - }, - "version": "1.0.0" -} diff --git a/node_modules/function-bind/.editorconfig b/node_modules/function-bind/.editorconfig deleted file mode 100644 index ac29adef..00000000 --- a/node_modules/function-bind/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -root = true - -[*] -indent_style = tab -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 120 - -[CHANGELOG.md] -indent_style = space -indent_size = 2 - -[*.json] -max_line_length = off - -[Makefile] -max_line_length = off diff --git a/node_modules/function-bind/.eslintrc b/node_modules/function-bind/.eslintrc deleted file mode 100644 index 9b33d8ed..00000000 --- a/node_modules/function-bind/.eslintrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "func-name-matching": 0, - "indent": [2, 4], - "max-nested-callbacks": [2, 3], - "max-params": [2, 3], - "max-statements": [2, 20], - "no-new-func": [1], - "strict": [0] - } -} diff --git a/node_modules/function-bind/.jscs.json b/node_modules/function-bind/.jscs.json deleted file mode 100644 index 8c447948..00000000 --- a/node_modules/function-bind/.jscs.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "es3": true, - - "additionalRules": [], - - "requireSemicolons": true, - - "disallowMultipleSpaces": true, - - "disallowIdentifierNames": [], - - "requireCurlyBraces": { - "allExcept": [], - "keywords": ["if", "else", "for", "while", "do", "try", "catch"] - }, - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "disallowSpaceBeforeComma": true, - "disallowSpaceAfterComma": false, - "disallowSpaceBeforeSemicolon": true, - - "disallowNodeTypes": [ - "DebuggerStatement", - "ForInStatement", - "LabeledStatement", - "SwitchCase", - "SwitchStatement", - "WithStatement" - ], - - "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "requireSpaceBetweenArguments": true, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "disallowTrailingComma": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "requireDotNotation": { "allExcept": ["keywords"] }, - - "requireParenthesesAroundIIFE": true, - - "validateLineBreaks": "LF", - - "validateQuoteMarks": { - "escape": true, - "mark": "'" - }, - - "disallowOperatorBeforeLineBreak": [], - - "requireSpaceBeforeKeywords": [ - "do", - "for", - "if", - "else", - "switch", - "case", - "try", - "catch", - "finally", - "while", - "with", - "return" - ], - - "validateAlignedFunctionParameters": { - "lineBreakAfterOpeningBraces": true, - "lineBreakBeforeClosingBraces": true - }, - - "requirePaddingNewLinesBeforeExport": true, - - "validateNewlineAfterArrayElements": { - "maximum": 8 - }, - - "requirePaddingNewLinesAfterUseStrict": true, - - "disallowArrowFunctions": true, - - "disallowMultiLineTernary": true, - - "validateOrderInObjectKeys": "asc-insensitive", - - "disallowIdenticalDestructuringNames": true, - - "disallowNestedTernaries": { "maxLevel": 1 }, - - "requireSpaceAfterComma": { "allExcept": ["trailing"] }, - "requireAlignedMultilineParams": false, - - "requireSpacesInGenerator": { - "afterStar": true - }, - - "disallowSpacesInGenerator": { - "beforeStar": true - }, - - "disallowVar": false, - - "requireArrayDestructuring": false, - - "requireEnhancedObjectLiterals": false, - - "requireObjectDestructuring": false, - - "requireEarlyReturn": false, - - "requireCapitalizedConstructorsNew": { - "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] - }, - - "requireImportAlphabetized": false, - - "requireSpaceBeforeObjectValues": true, - "requireSpaceBeforeDestructuredValues": true, - - "disallowSpacesInsideTemplateStringPlaceholders": true, - - "disallowArrayDestructuringReturn": false, - - "requireNewlineBeforeSingleStatementsInIf": false, - - "disallowUnusedVariables": true, - - "requireSpacesInsideImportedObjectBraces": true, - - "requireUseStrict": true -} - diff --git a/node_modules/function-bind/.npmignore b/node_modules/function-bind/.npmignore deleted file mode 100644 index dbb555fd..00000000 --- a/node_modules/function-bind/.npmignore +++ /dev/null @@ -1,22 +0,0 @@ -# gitignore -.DS_Store -.monitor -.*.swp -.nodemonignore -releases -*.log -*.err -fleet.json -public/browserify -bin/*.json -.bin -build -compile -.lock-wscript -coverage -node_modules - -# Only apps should have lockfiles -npm-shrinkwrap.json -package-lock.json -yarn.lock diff --git a/node_modules/function-bind/.travis.yml b/node_modules/function-bind/.travis.yml deleted file mode 100644 index 85f70d24..00000000 --- a/node_modules/function-bind/.travis.yml +++ /dev/null @@ -1,168 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "8.4" - - "7.10" - - "6.11" - - "5.12" - - "4.8" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.10" - - "0.8" -before_install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' - - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "node" - env: PRETEST=true - - node_js: "4" - env: COVERAGE=true - - node_js: "8.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true diff --git a/node_modules/function-bind/LICENSE b/node_modules/function-bind/LICENSE deleted file mode 100644 index 62d6d237..00000000 --- a/node_modules/function-bind/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/node_modules/function-bind/README.md b/node_modules/function-bind/README.md deleted file mode 100644 index 81862a02..00000000 --- a/node_modules/function-bind/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# function-bind - -<!-- - [![build status][travis-svg]][travis-url] - [![NPM version][npm-badge-svg]][npm-url] - [![Coverage Status][5]][6] - [![gemnasium Dependency Status][7]][8] - [![Dependency status][deps-svg]][deps-url] - [![Dev Dependency status][dev-deps-svg]][dev-deps-url] ---> - -<!-- [![browser support][11]][12] --> - -Implementation of function.prototype.bind - -## Example - -I mainly do this for unit tests I run on phantomjs. -PhantomJS does not have Function.prototype.bind :( - -```js -Function.prototype.bind = require("function-bind") -``` - -## Installation - -`npm install function-bind` - -## Contributors - - - Raynos - -## MIT Licenced - - [travis-svg]: https://travis-ci.org/Raynos/function-bind.svg - [travis-url]: https://travis-ci.org/Raynos/function-bind - [npm-badge-svg]: https://badge.fury.io/js/function-bind.svg - [npm-url]: https://npmjs.org/package/function-bind - [5]: https://coveralls.io/repos/Raynos/function-bind/badge.png - [6]: https://coveralls.io/r/Raynos/function-bind - [7]: https://gemnasium.com/Raynos/function-bind.png - [8]: https://gemnasium.com/Raynos/function-bind - [deps-svg]: https://david-dm.org/Raynos/function-bind.svg - [deps-url]: https://david-dm.org/Raynos/function-bind - [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg - [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies - [11]: https://ci.testling.com/Raynos/function-bind.png - [12]: https://ci.testling.com/Raynos/function-bind diff --git a/node_modules/function-bind/implementation.js b/node_modules/function-bind/implementation.js deleted file mode 100644 index cc4daec1..00000000 --- a/node_modules/function-bind/implementation.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var slice = Array.prototype.slice; -var toStr = Object.prototype.toString; -var funcType = '[object Function]'; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.call(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slice.call(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - args.concat(slice.call(arguments)) - ); - if (Object(result) === result) { - return result; - } - return this; - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); - } - }; - - var boundLength = Math.max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs.push('$' + i); - } - - bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; diff --git a/node_modules/function-bind/index.js b/node_modules/function-bind/index.js deleted file mode 100644 index 3bb6b960..00000000 --- a/node_modules/function-bind/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -var implementation = require('./implementation'); - -module.exports = Function.prototype.bind || implementation; diff --git a/node_modules/function-bind/package.json b/node_modules/function-bind/package.json deleted file mode 100644 index 2346a36c..00000000 --- a/node_modules/function-bind/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "_from": "function-bind@^1.1.1", - "_id": "function-bind@1.1.1", - "_inBundle": false, - "_integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "_location": "/function-bind", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "function-bind@^1.1.1", - "name": "function-bind", - "escapedName": "function-bind", - "rawSpec": "^1.1.1", - "saveSpec": null, - "fetchSpec": "^1.1.1" - }, - "_requiredBy": [ - "/call-bind", - "/get-intrinsic", - "/has" - ], - "_resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "_shasum": "a56899d3ea3c9bab874bb9773b7c5ede92f4895d", - "_spec": "function-bind@^1.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/call-bind", - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "bugs": { - "url": "https://github.com/Raynos/function-bind/issues", - "email": "raynos2@gmail.com" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Raynos" - }, - { - "name": "Jordan Harband", - "url": "https://github.com/ljharb" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "Implementation of Function.prototype.bind", - "devDependencies": { - "@ljharb/eslint-config": "^12.2.1", - "covert": "^1.1.0", - "eslint": "^4.5.0", - "jscs": "^3.0.7", - "tape": "^4.8.0" - }, - "homepage": "https://github.com/Raynos/function-bind", - "keywords": [ - "function", - "bind", - "shim", - "es5" - ], - "license": "MIT", - "main": "index", - "name": "function-bind", - "repository": { - "type": "git", - "url": "git://github.com/Raynos/function-bind.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "eslint": "eslint *.js */*.js", - "jscs": "jscs *.js */*.js", - "lint": "npm run jscs && npm run eslint", - "posttest": "npm run coverage -- --quiet", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "node test" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "ie/8..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.1.1" -} diff --git a/node_modules/function-bind/test/.eslintrc b/node_modules/function-bind/test/.eslintrc deleted file mode 100644 index 8a56d5b7..00000000 --- a/node_modules/function-bind/test/.eslintrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "rules": { - "array-bracket-newline": 0, - "array-element-newline": 0, - "max-statements-per-line": [2, { "max": 2 }], - "no-invalid-this": 0, - "no-magic-numbers": 0, - } -} diff --git a/node_modules/function-bind/test/index.js b/node_modules/function-bind/test/index.js deleted file mode 100644 index 2edecce2..00000000 --- a/node_modules/function-bind/test/index.js +++ /dev/null @@ -1,252 +0,0 @@ -// jscs:disable requireUseStrict - -var test = require('tape'); - -var functionBind = require('../implementation'); -var getCurrentContext = function () { return this; }; - -test('functionBind is a function', function (t) { - t.equal(typeof functionBind, 'function'); - t.end(); -}); - -test('non-functions', function (t) { - var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; - t.plan(nonFunctions.length); - for (var i = 0; i < nonFunctions.length; ++i) { - try { functionBind.call(nonFunctions[i]); } catch (ex) { - t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); - } - } - t.end(); -}); - -test('without a context', function (t) { - t.test('binds properly', function (st) { - var args, context; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }) - }; - namespace.func(1, 2, 3); - st.deepEqual(args, [1, 2, 3]); - st.equal(context, getCurrentContext.call()); - st.end(); - }); - - t.test('binds properly, and still supplies bound arguments', function (st) { - var args, context; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, undefined, 1, 2, 3) - }; - namespace.func(4, 5, 6); - st.deepEqual(args, [1, 2, 3, 4, 5, 6]); - st.equal(context, getCurrentContext.call()); - st.end(); - }); - - t.test('returns properly', function (st) { - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, null) - }; - var context = namespace.func(1, 2, 3); - st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); - st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); - st.end(); - }); - - t.test('returns properly with bound arguments', function (st) { - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, null, 1, 2, 3) - }; - var context = namespace.func(4, 5, 6); - st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); - st.end(); - }); - - t.test('called as a constructor', function (st) { - var thunkify = function (value) { - return function () { return value; }; - }; - st.test('returns object value', function (sst) { - var expectedReturnValue = [1, 2, 3]; - var Constructor = functionBind.call(thunkify(expectedReturnValue), null); - var result = new Constructor(); - sst.equal(result, expectedReturnValue); - sst.end(); - }); - - st.test('does not return primitive value', function (sst) { - var Constructor = functionBind.call(thunkify(42), null); - var result = new Constructor(); - sst.notEqual(result, 42); - sst.end(); - }); - - st.test('object from bound constructor is instance of original and bound constructor', function (sst) { - var A = function (x) { - this.name = x || 'A'; - }; - var B = functionBind.call(A, null, 'B'); - - var result = new B(); - sst.ok(result instanceof B, 'result is instance of bound constructor'); - sst.ok(result instanceof A, 'result is instance of original constructor'); - sst.end(); - }); - - st.end(); - }); - - t.end(); -}); - -test('with a context', function (t) { - t.test('with no bound arguments', function (st) { - var args, context; - var boundContext = {}; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, boundContext) - }; - namespace.func(1, 2, 3); - st.equal(context, boundContext, 'binds a context properly'); - st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); - st.end(); - }); - - t.test('with bound arguments', function (st) { - var args, context; - var boundContext = {}; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, boundContext, 1, 2, 3) - }; - namespace.func(4, 5, 6); - st.equal(context, boundContext, 'binds a context properly'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); - st.end(); - }); - - t.test('returns properly', function (st) { - var boundContext = {}; - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, boundContext) - }; - var context = namespace.func(1, 2, 3); - st.equal(context, boundContext, 'returned context is bound context'); - st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); - st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); - st.end(); - }); - - t.test('returns properly with bound arguments', function (st) { - var boundContext = {}; - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, boundContext, 1, 2, 3) - }; - var context = namespace.func(4, 5, 6); - st.equal(context, boundContext, 'returned context is bound context'); - st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); - st.end(); - }); - - t.test('passes the correct arguments when called as a constructor', function (st) { - var expected = { name: 'Correct' }; - var namespace = { - Func: functionBind.call(function (arg) { - return arg; - }, { name: 'Incorrect' }) - }; - var returned = new namespace.Func(expected); - st.equal(returned, expected, 'returns the right arg when called as a constructor'); - st.end(); - }); - - t.test('has the new instance\'s context when called as a constructor', function (st) { - var actualContext; - var expectedContext = { foo: 'bar' }; - var namespace = { - Func: functionBind.call(function () { - actualContext = this; - }, expectedContext) - }; - var result = new namespace.Func(); - st.equal(result instanceof namespace.Func, true); - st.notEqual(actualContext, expectedContext); - st.end(); - }); - - t.end(); -}); - -test('bound function length', function (t) { - t.test('sets a correct length without thisArg', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }); - st.equal(subject.length, 3); - st.equal(subject(1, 2, 3), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); - st.equal(subject.length, 3); - st.equal(subject(1, 2, 3), 6); - st.end(); - }); - - t.test('sets a correct length without thisArg and first argument', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); - st.equal(subject.length, 2); - st.equal(subject(2, 3), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg and first argument', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); - st.equal(subject.length, 2); - st.equal(subject(2, 3), 6); - st.end(); - }); - - t.test('sets a correct length without thisArg and too many arguments', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); - st.equal(subject.length, 0); - st.equal(subject(), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg and too many arguments', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); - st.equal(subject.length, 0); - st.equal(subject(), 6); - st.end(); - }); -}); diff --git a/node_modules/get-intrinsic/.eslintignore b/node_modules/get-intrinsic/.eslintignore deleted file mode 100644 index 404abb22..00000000 --- a/node_modules/get-intrinsic/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -coverage/ diff --git a/node_modules/get-intrinsic/.eslintrc b/node_modules/get-intrinsic/.eslintrc deleted file mode 100644 index d04e4839..00000000 --- a/node_modules/get-intrinsic/.eslintrc +++ /dev/null @@ -1,43 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "env": { - "es6": true, - "es2017": true, - "es2020": true, - "es2021": true, - }, - - "globals": { - "AggregateError": false, - }, - - "rules": { - "array-bracket-newline": 0, - "array-element-newline": 0, - "complexity": 0, - "eqeqeq": [2, "allow-null"], - "func-name-matching": 0, - "id-length": 0, - "max-lines-per-function": [2, 80], - "max-params": [2, 4], - "max-statements": 0, - "max-statements-per-line": [2, { "max": 2 }], - "multiline-comment-style": 0, - "no-magic-numbers": 0, - "operator-linebreak": [2, "before"], - "sort-keys": 0, - }, - - "overrides": [ - { - "files": "test/**", - "rules": { - "max-lines-per-function": 0, - "new-cap": 0, - }, - }, - ], -} diff --git a/node_modules/get-intrinsic/.github/FUNDING.yml b/node_modules/get-intrinsic/.github/FUNDING.yml deleted file mode 100644 index 8e8da0dd..00000000 --- a/node_modules/get-intrinsic/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/get-intrinsic -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/get-intrinsic/.nycrc b/node_modules/get-intrinsic/.nycrc deleted file mode 100644 index 1826526e..00000000 --- a/node_modules/get-intrinsic/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/get-intrinsic/CHANGELOG.md b/node_modules/get-intrinsic/CHANGELOG.md deleted file mode 100644 index 32502ec1..00000000 --- a/node_modules/get-intrinsic/CHANGELOG.md +++ /dev/null @@ -1,64 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.1.1](https://github.com/ljharb/get-intrinsic/compare/v1.1.0...v1.1.1) - 2021-02-03 - -### Fixed - -- [meta] export `./package.json` [`#9`](https://github.com/ljharb/get-intrinsic/issues/9) - -### Commits - -- [readme] flesh out the readme; use `evalmd` [`d12f12c`](https://github.com/ljharb/get-intrinsic/commit/d12f12c15345a0a0772cc65a7c64369529abd614) -- [eslint] set up proper globals config [`5a8c098`](https://github.com/ljharb/get-intrinsic/commit/5a8c0984e3319d1ac0e64b102f8ec18b64e79f36) -- [Dev Deps] update `eslint` [`7b9a5c0`](https://github.com/ljharb/get-intrinsic/commit/7b9a5c0d31a90ca1a1234181c74988fb046701cd) - -## [v1.1.0](https://github.com/ljharb/get-intrinsic/compare/v1.0.2...v1.1.0) - 2021-01-25 - -### Fixed - -- [Refactor] delay `Function` eval until syntax-derived values are requested [`#3`](https://github.com/ljharb/get-intrinsic/issues/3) - -### Commits - -- [Tests] migrate tests to Github Actions [`2ab762b`](https://github.com/ljharb/get-intrinsic/commit/2ab762b48164aea8af37a40ba105bbc8246ab8c4) -- [meta] do not publish github action workflow files [`5e7108e`](https://github.com/ljharb/get-intrinsic/commit/5e7108e4768b244d48d9567ba4f8a6cab9c65b8e) -- [Tests] add some coverage [`01ac7a8`](https://github.com/ljharb/get-intrinsic/commit/01ac7a87ac29738567e8524cd8c9e026b1fa8cb3) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `call-bind`, `es-abstract`, `tape`; add `call-bind` [`911b672`](https://github.com/ljharb/get-intrinsic/commit/911b672fbffae433a96924c6ce013585e425f4b7) -- [Refactor] rearrange evalled constructors a bit [`7e7e4bf`](https://github.com/ljharb/get-intrinsic/commit/7e7e4bf583f3799c8ac1c6c5e10d2cb553957347) -- [meta] add Automatic Rebase and Require Allow Edits workflows [`0199968`](https://github.com/ljharb/get-intrinsic/commit/01999687a263ffce0a3cb011dfbcb761754aedbc) - -## [v1.0.2](https://github.com/ljharb/get-intrinsic/compare/v1.0.1...v1.0.2) - 2020-12-17 - -### Commits - -- [Fix] Throw for non‑existent intrinsics [`68f873b`](https://github.com/ljharb/get-intrinsic/commit/68f873b013c732a05ad6f5fc54f697e55515461b) -- [Fix] Throw for non‑existent segments in the intrinsic path [`8325dee`](https://github.com/ljharb/get-intrinsic/commit/8325deee43128f3654d3399aa9591741ebe17b21) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-bigints`, `object-inspect` [`0c227a7`](https://github.com/ljharb/get-intrinsic/commit/0c227a7d8b629166f25715fd242553892e458525) -- [meta] do not lint coverage output [`70d2419`](https://github.com/ljharb/get-intrinsic/commit/70d24199b620043cd9110fc5f426d214ebe21dc9) - -## [v1.0.1](https://github.com/ljharb/get-intrinsic/compare/v1.0.0...v1.0.1) - 2020-10-30 - -### Commits - -- [Tests] gather coverage data on every job [`d1d280d`](https://github.com/ljharb/get-intrinsic/commit/d1d280dec714e3f0519cc877dbcb193057d9cac6) -- [Fix] add missing dependencies [`5031771`](https://github.com/ljharb/get-intrinsic/commit/5031771bb1095b38be88ce7c41d5de88718e432e) -- [Tests] use `es-value-fixtures` [`af48765`](https://github.com/ljharb/get-intrinsic/commit/af48765a23c5323fb0b6b38dbf00eb5099c7bebc) - -## v1.0.0 - 2020-10-29 - -### Commits - -- Implementation [`bbce57c`](https://github.com/ljharb/get-intrinsic/commit/bbce57c6f33d05b2d8d3efa273ceeb3ee01127bb) -- Tests [`17b4f0d`](https://github.com/ljharb/get-intrinsic/commit/17b4f0d56dea6b4059b56fc30ef3ee4d9500ebc2) -- Initial commit [`3153294`](https://github.com/ljharb/get-intrinsic/commit/31532948de363b0a27dd9fd4649e7b7028ec4b44) -- npm init [`fb326c4`](https://github.com/ljharb/get-intrinsic/commit/fb326c4d2817c8419ec31de1295f06bb268a7902) -- [meta] add Automatic Rebase and Require Allow Edits workflows [`48862fb`](https://github.com/ljharb/get-intrinsic/commit/48862fb2508c8f6a57968e6d08b7c883afc9d550) -- [meta] add `auto-changelog` [`5f28ad0`](https://github.com/ljharb/get-intrinsic/commit/5f28ad019e060a353d8028f9f2591a9cc93074a1) -- [meta] add "funding"; create `FUNDING.yml` [`c2bbdde`](https://github.com/ljharb/get-intrinsic/commit/c2bbddeba73a875be61484ee4680b129a6d4e0a1) -- [Tests] add `npm run lint` [`0a84b98`](https://github.com/ljharb/get-intrinsic/commit/0a84b98b22b7cf7a748666f705b0003a493c35fd) -- Only apps should have lockfiles [`9586c75`](https://github.com/ljharb/get-intrinsic/commit/9586c75866c1ee678e4d5d4dbbdef6997e511b05) diff --git a/node_modules/get-intrinsic/LICENSE b/node_modules/get-intrinsic/LICENSE deleted file mode 100644 index 48f05d01..00000000 --- a/node_modules/get-intrinsic/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/get-intrinsic/README.md b/node_modules/get-intrinsic/README.md deleted file mode 100644 index 335a3b49..00000000 --- a/node_modules/get-intrinsic/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# get-intrinsic <sup>[![Version Badge][npm-version-svg]][package-url]</sup> - -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -Get and robustly cache all JS language-level intrinsics at first require time. - -See the syntax described [in the JS spec](https://tc39.es/ecma262/#sec-well-known-intrinsic-objects) for reference. - -## Example - -```js -var GetIntrinsic = require('get-intrinsic'); -var assert = require('assert'); - -// static methods -assert.equal(GetIntrinsic('%Math.pow%'), Math.pow); -assert.equal(Math.pow(2, 3), 8); -assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); -delete Math.pow; -assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); - -// instance methods -var arr = [1]; -assert.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push); -assert.deepEqual(arr, [1]); - -arr.push(2); -assert.deepEqual(arr, [1, 2]); - -GetIntrinsic('%Array.prototype.push%').call(arr, 3); -assert.deepEqual(arr, [1, 2, 3]); - -delete Array.prototype.push; -GetIntrinsic('%Array.prototype.push%').call(arr, 4); -assert.deepEqual(arr, [1, 2, 3, 4]); - -// missing features -delete JSON.parse; // to simulate a real intrinsic that is missing in the environment -assert.throws(() => GetIntrinsic('%JSON.parse%')); -assert.equal(undefined, GetIntrinsic('%JSON.parse%', true)); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -## Security - -Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. - -[package-url]: https://npmjs.org/package/get-intrinsic -[npm-version-svg]: http://versionbadg.es/ljharb/get-intrinsic.svg -[deps-svg]: https://david-dm.org/ljharb/get-intrinsic.svg -[deps-url]: https://david-dm.org/ljharb/get-intrinsic -[dev-deps-svg]: https://david-dm.org/ljharb/get-intrinsic/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/get-intrinsic#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/get-intrinsic.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/get-intrinsic.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/get-intrinsic.svg -[downloads-url]: https://npm-stat.com/charts.html?package=get-intrinsic diff --git a/node_modules/get-intrinsic/index.js b/node_modules/get-intrinsic/index.js deleted file mode 100644 index d6c06c28..00000000 --- a/node_modules/get-intrinsic/index.js +++ /dev/null @@ -1,330 +0,0 @@ -'use strict'; - -var undefined; - -var $SyntaxError = SyntaxError; -var $Function = Function; -var $TypeError = TypeError; - -// eslint-disable-next-line consistent-return -var getEvalledConstructor = function (expressionSyntax) { - try { - return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); - } catch (e) {} -}; - -var $gOPD = Object.getOwnPropertyDescriptor; -if ($gOPD) { - try { - $gOPD({}, ''); - } catch (e) { - $gOPD = null; // this is IE 8, which has a broken gOPD - } -} - -var throwTypeError = function () { - throw new $TypeError(); -}; -var ThrowTypeError = $gOPD - ? (function () { - try { - // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties - arguments.callee; // IE 8 does not throw here - return throwTypeError; - } catch (calleeThrows) { - try { - // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') - return $gOPD(arguments, 'callee').get; - } catch (gOPDthrows) { - return throwTypeError; - } - } - }()) - : throwTypeError; - -var hasSymbols = require('has-symbols')(); - -var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto - -var needsEval = {}; - -var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); - -var INTRINSICS = { - '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, - '%Array%': Array, - '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, - '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': needsEval, - '%AsyncGenerator%': needsEval, - '%AsyncGeneratorFunction%': needsEval, - '%AsyncIteratorPrototype%': needsEval, - '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, - '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, - '%Boolean%': Boolean, - '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, - '%Date%': Date, - '%decodeURI%': decodeURI, - '%decodeURIComponent%': decodeURIComponent, - '%encodeURI%': encodeURI, - '%encodeURIComponent%': encodeURIComponent, - '%Error%': Error, - '%eval%': eval, // eslint-disable-line no-eval - '%EvalError%': EvalError, - '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, - '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, - '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, - '%Function%': $Function, - '%GeneratorFunction%': needsEval, - '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, - '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, - '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, - '%isFinite%': isFinite, - '%isNaN%': isNaN, - '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, - '%JSON%': typeof JSON === 'object' ? JSON : undefined, - '%Map%': typeof Map === 'undefined' ? undefined : Map, - '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), - '%Math%': Math, - '%Number%': Number, - '%Object%': Object, - '%parseFloat%': parseFloat, - '%parseInt%': parseInt, - '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, - '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, - '%RangeError%': RangeError, - '%ReferenceError%': ReferenceError, - '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, - '%RegExp%': RegExp, - '%Set%': typeof Set === 'undefined' ? undefined : Set, - '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), - '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, - '%String%': String, - '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, - '%Symbol%': hasSymbols ? Symbol : undefined, - '%SyntaxError%': $SyntaxError, - '%ThrowTypeError%': ThrowTypeError, - '%TypedArray%': TypedArray, - '%TypeError%': $TypeError, - '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, - '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, - '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, - '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, - '%URIError%': URIError, - '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, - '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, - '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet -}; - -var doEval = function doEval(name) { - var value; - if (name === '%AsyncFunction%') { - value = getEvalledConstructor('async function () {}'); - } else if (name === '%GeneratorFunction%') { - value = getEvalledConstructor('function* () {}'); - } else if (name === '%AsyncGeneratorFunction%') { - value = getEvalledConstructor('async function* () {}'); - } else if (name === '%AsyncGenerator%') { - var fn = doEval('%AsyncGeneratorFunction%'); - if (fn) { - value = fn.prototype; - } - } else if (name === '%AsyncIteratorPrototype%') { - var gen = doEval('%AsyncGenerator%'); - if (gen) { - value = getProto(gen.prototype); - } - } - - INTRINSICS[name] = value; - - return value; -}; - -var LEGACY_ALIASES = { - '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], - '%ArrayPrototype%': ['Array', 'prototype'], - '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], - '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], - '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], - '%ArrayProto_values%': ['Array', 'prototype', 'values'], - '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], - '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], - '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], - '%BooleanPrototype%': ['Boolean', 'prototype'], - '%DataViewPrototype%': ['DataView', 'prototype'], - '%DatePrototype%': ['Date', 'prototype'], - '%ErrorPrototype%': ['Error', 'prototype'], - '%EvalErrorPrototype%': ['EvalError', 'prototype'], - '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], - '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], - '%FunctionPrototype%': ['Function', 'prototype'], - '%Generator%': ['GeneratorFunction', 'prototype'], - '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], - '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], - '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], - '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], - '%JSONParse%': ['JSON', 'parse'], - '%JSONStringify%': ['JSON', 'stringify'], - '%MapPrototype%': ['Map', 'prototype'], - '%NumberPrototype%': ['Number', 'prototype'], - '%ObjectPrototype%': ['Object', 'prototype'], - '%ObjProto_toString%': ['Object', 'prototype', 'toString'], - '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], - '%PromisePrototype%': ['Promise', 'prototype'], - '%PromiseProto_then%': ['Promise', 'prototype', 'then'], - '%Promise_all%': ['Promise', 'all'], - '%Promise_reject%': ['Promise', 'reject'], - '%Promise_resolve%': ['Promise', 'resolve'], - '%RangeErrorPrototype%': ['RangeError', 'prototype'], - '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], - '%RegExpPrototype%': ['RegExp', 'prototype'], - '%SetPrototype%': ['Set', 'prototype'], - '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], - '%StringPrototype%': ['String', 'prototype'], - '%SymbolPrototype%': ['Symbol', 'prototype'], - '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], - '%TypedArrayPrototype%': ['TypedArray', 'prototype'], - '%TypeErrorPrototype%': ['TypeError', 'prototype'], - '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], - '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], - '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], - '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], - '%URIErrorPrototype%': ['URIError', 'prototype'], - '%WeakMapPrototype%': ['WeakMap', 'prototype'], - '%WeakSetPrototype%': ['WeakSet', 'prototype'] -}; - -var bind = require('function-bind'); -var hasOwn = require('has'); -var $concat = bind.call(Function.call, Array.prototype.concat); -var $spliceApply = bind.call(Function.apply, Array.prototype.splice); -var $replace = bind.call(Function.call, String.prototype.replace); -var $strSlice = bind.call(Function.call, String.prototype.slice); - -/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ -var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ -var stringToPath = function stringToPath(string) { - var first = $strSlice(string, 0, 1); - var last = $strSlice(string, -1); - if (first === '%' && last !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); - } else if (last === '%' && first !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); - } - var result = []; - $replace(string, rePropName, function (match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; - }); - return result; -}; -/* end adaptation */ - -var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { - var intrinsicName = name; - var alias; - if (hasOwn(LEGACY_ALIASES, intrinsicName)) { - alias = LEGACY_ALIASES[intrinsicName]; - intrinsicName = '%' + alias[0] + '%'; - } - - if (hasOwn(INTRINSICS, intrinsicName)) { - var value = INTRINSICS[intrinsicName]; - if (value === needsEval) { - value = doEval(intrinsicName); - } - if (typeof value === 'undefined' && !allowMissing) { - throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); - } - - return { - alias: alias, - name: intrinsicName, - value: value - }; - } - - throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); -}; - -module.exports = function GetIntrinsic(name, allowMissing) { - if (typeof name !== 'string' || name.length === 0) { - throw new $TypeError('intrinsic name must be a non-empty string'); - } - if (arguments.length > 1 && typeof allowMissing !== 'boolean') { - throw new $TypeError('"allowMissing" argument must be a boolean'); - } - - var parts = stringToPath(name); - var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; - - var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); - var intrinsicRealName = intrinsic.name; - var value = intrinsic.value; - var skipFurtherCaching = false; - - var alias = intrinsic.alias; - if (alias) { - intrinsicBaseName = alias[0]; - $spliceApply(parts, $concat([0, 1], alias)); - } - - for (var i = 1, isOwn = true; i < parts.length; i += 1) { - var part = parts[i]; - var first = $strSlice(part, 0, 1); - var last = $strSlice(part, -1); - if ( - ( - (first === '"' || first === "'" || first === '`') - || (last === '"' || last === "'" || last === '`') - ) - && first !== last - ) { - throw new $SyntaxError('property names with quotes must have matching quotes'); - } - if (part === 'constructor' || !isOwn) { - skipFurtherCaching = true; - } - - intrinsicBaseName += '.' + part; - intrinsicRealName = '%' + intrinsicBaseName + '%'; - - if (hasOwn(INTRINSICS, intrinsicRealName)) { - value = INTRINSICS[intrinsicRealName]; - } else if (value != null) { - if (!(part in value)) { - if (!allowMissing) { - throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); - } - return void undefined; - } - if ($gOPD && (i + 1) >= parts.length) { - var desc = $gOPD(value, part); - isOwn = !!desc; - - // By convention, when a data property is converted to an accessor - // property to emulate a data property that does not suffer from - // the override mistake, that accessor's getter is marked with - // an `originalValue` property. Here, when we detect this, we - // uphold the illusion by pretending to see that original data - // property, i.e., returning the value rather than the getter - // itself. - if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { - value = desc.get; - } else { - value = value[part]; - } - } else { - isOwn = hasOwn(value, part); - value = value[part]; - } - - if (isOwn && !skipFurtherCaching) { - INTRINSICS[intrinsicRealName] = value; - } - } - } - return value; -}; diff --git a/node_modules/get-intrinsic/package.json b/node_modules/get-intrinsic/package.json deleted file mode 100644 index 4db465a6..00000000 --- a/node_modules/get-intrinsic/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_from": "get-intrinsic@^1.0.2", - "_id": "get-intrinsic@1.1.1", - "_inBundle": false, - "_integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "_location": "/get-intrinsic", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "get-intrinsic@^1.0.2", - "name": "get-intrinsic", - "escapedName": "get-intrinsic", - "rawSpec": "^1.0.2", - "saveSpec": null, - "fetchSpec": "^1.0.2" - }, - "_requiredBy": [ - "/call-bind" - ], - "_resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "_shasum": "15f59f376f855c446963948f0d24cd3637b4abc6", - "_spec": "get-intrinsic@^1.0.2", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/call-bind", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "bugs": { - "url": "https://github.com/ljharb/get-intrinsic/issues" - }, - "bundleDependencies": false, - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - }, - "deprecated": false, - "description": "Get and robustly cache all JS language-level intrinsics at first require time", - "devDependencies": { - "@ljharb/eslint-config": "^17.5.0", - "aud": "^1.1.3", - "auto-changelog": "^2.2.1", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.0-next.2", - "es-value-fixtures": "^1.0.0", - "eslint": "^7.19.0", - "evalmd": "^0.0.19", - "foreach": "^2.0.5", - "has-bigints": "^1.0.1", - "make-async-function": "^1.0.0", - "make-async-generator-function": "^1.0.0", - "make-generator-function": "^2.0.0", - "nyc": "^10.3.2", - "object-inspect": "^1.9.0", - "tape": "^5.1.1" - }, - "exports": { - ".": [ - { - "default": "./index.js" - }, - "./index.js" - ], - "./package.json": "./package.json" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "homepage": "https://github.com/ljharb/get-intrinsic#readme", - "keywords": [ - "javascript", - "ecmascript", - "es", - "js", - "intrinsic", - "getintrinsic", - "es-abstract" - ], - "license": "MIT", - "main": "index.js", - "name": "get-intrinsic", - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/get-intrinsic.git" - }, - "scripts": { - "lint": "eslint --ext=.js,.mjs .", - "posttest": "aud --production", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", - "prelint": "evalmd README.md", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "nyc tape 'test/**/*.js'", - "version": "auto-changelog && git add CHANGELOG.md" - }, - "version": "1.1.1" -} diff --git a/node_modules/get-intrinsic/test/GetIntrinsic.js b/node_modules/get-intrinsic/test/GetIntrinsic.js deleted file mode 100644 index 695e3ad4..00000000 --- a/node_modules/get-intrinsic/test/GetIntrinsic.js +++ /dev/null @@ -1,260 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('../'); - -var test = require('tape'); -var forEach = require('foreach'); -var debug = require('object-inspect'); -var generatorFns = require('make-generator-function')(); -var asyncFns = require('make-async-function').list(); -var asyncGenFns = require('make-async-generator-function')(); - -var callBound = require('call-bind/callBound'); -var v = require('es-value-fixtures'); -var $gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor'); -var defineProperty = require('es-abstract/test/helpers/defineProperty'); - -var $isProto = callBound('%Object.prototype.isPrototypeOf%'); - -test('export', function (t) { - t.equal(typeof GetIntrinsic, 'function', 'it is a function'); - t.equal(GetIntrinsic.length, 2, 'function has length of 2'); - - t.end(); -}); - -test('throws', function (t) { - t['throws']( - function () { GetIntrinsic('not an intrinsic'); }, - SyntaxError, - 'nonexistent intrinsic throws a syntax error' - ); - - t['throws']( - function () { GetIntrinsic(''); }, - TypeError, - 'empty string intrinsic throws a type error' - ); - - t['throws']( - function () { GetIntrinsic('.'); }, - SyntaxError, - '"just a dot" intrinsic throws a syntax error' - ); - - t['throws']( - function () { GetIntrinsic('%String'); }, - SyntaxError, - 'Leading % without trailing % throws a syntax error' - ); - - t['throws']( - function () { GetIntrinsic('String%'); }, - SyntaxError, - 'Trailing % without leading % throws a syntax error' - ); - - t['throws']( - function () { GetIntrinsic("String['prototype]"); }, - SyntaxError, - 'Dynamic property access is disallowed for intrinsics (unterminated string)' - ); - - t['throws']( - function () { GetIntrinsic('%Proxy.prototype.undefined%'); }, - TypeError, - "Throws when middle part doesn't exist (%Proxy.prototype.undefined%)" - ); - - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { GetIntrinsic(nonString); }, - TypeError, - debug(nonString) + ' is not a String' - ); - }); - - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { GetIntrinsic('%', nonBoolean); }, - TypeError, - debug(nonBoolean) + ' is not a Boolean' - ); - }); - - forEach([ - 'toString', - 'propertyIsEnumerable', - 'hasOwnProperty' - ], function (objectProtoMember) { - t['throws']( - function () { GetIntrinsic(objectProtoMember); }, - SyntaxError, - debug(objectProtoMember) + ' is not an intrinsic' - ); - }); - - t.end(); -}); - -test('base intrinsics', function (t) { - t.equal(GetIntrinsic('%Object%'), Object, '%Object% yields Object'); - t.equal(GetIntrinsic('Object'), Object, 'Object yields Object'); - t.equal(GetIntrinsic('%Array%'), Array, '%Array% yields Array'); - t.equal(GetIntrinsic('Array'), Array, 'Array yields Array'); - - t.end(); -}); - -test('dotted paths', function (t) { - t.equal(GetIntrinsic('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% yields Object.prototype.toString'); - t.equal(GetIntrinsic('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString yields Object.prototype.toString'); - t.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push, '%Array.prototype.push% yields Array.prototype.push'); - t.equal(GetIntrinsic('Array.prototype.push'), Array.prototype.push, 'Array.prototype.push yields Array.prototype.push'); - - test('underscore paths are aliases for dotted paths', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { - var original = GetIntrinsic('%ObjProto_toString%'); - - forEach([ - '%Object.prototype.toString%', - 'Object.prototype.toString', - '%ObjectPrototype.toString%', - 'ObjectPrototype.toString', - '%ObjProto_toString%', - 'ObjProto_toString' - ], function (name) { - defineProperty(Object.prototype, 'toString', { - value: function toString() { - return original.apply(this, arguments); - } - }); - st.equal(GetIntrinsic(name), original, name + ' yields original Object.prototype.toString'); - }); - - defineProperty(Object.prototype, 'toString', { value: original }); - st.end(); - }); - - test('dotted paths cache', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { - var original = GetIntrinsic('%Object.prototype.propertyIsEnumerable%'); - - forEach([ - '%Object.prototype.propertyIsEnumerable%', - 'Object.prototype.propertyIsEnumerable', - '%ObjectPrototype.propertyIsEnumerable%', - 'ObjectPrototype.propertyIsEnumerable' - ], function (name) { - // eslint-disable-next-line no-extend-native - Object.prototype.propertyIsEnumerable = function propertyIsEnumerable() { - return original.apply(this, arguments); - }; - st.equal(GetIntrinsic(name), original, name + ' yields cached Object.prototype.propertyIsEnumerable'); - }); - - // eslint-disable-next-line no-extend-native - Object.prototype.propertyIsEnumerable = original; - st.end(); - }); - - test('dotted path reports correct error', function (st) { - st['throws'](function () { - GetIntrinsic('%NonExistentIntrinsic.prototype.property%'); - }, /%NonExistentIntrinsic%/, 'The base intrinsic of %NonExistentIntrinsic.prototype.property% is %NonExistentIntrinsic%'); - - st['throws'](function () { - GetIntrinsic('%NonExistentIntrinsicPrototype.property%'); - }, /%NonExistentIntrinsicPrototype%/, 'The base intrinsic of %NonExistentIntrinsicPrototype.property% is %NonExistentIntrinsicPrototype%'); - - st.end(); - }); - - t.end(); -}); - -test('accessors', { skip: !$gOPD || typeof Map !== 'function' }, function (t) { - var actual = $gOPD(Map.prototype, 'size'); - t.ok(actual, 'Map.prototype.size has a descriptor'); - t.equal(typeof actual.get, 'function', 'Map.prototype.size has a getter function'); - t.equal(GetIntrinsic('%Map.prototype.size%'), actual.get, '%Map.prototype.size% yields the getter for it'); - t.equal(GetIntrinsic('Map.prototype.size'), actual.get, 'Map.prototype.size yields the getter for it'); - - t.end(); -}); - -test('generator functions', { skip: !generatorFns.length }, function (t) { - var $GeneratorFunction = GetIntrinsic('%GeneratorFunction%'); - var $GeneratorFunctionPrototype = GetIntrinsic('%Generator%'); - var $GeneratorPrototype = GetIntrinsic('%GeneratorPrototype%'); - - forEach(generatorFns, function (genFn) { - var fnName = genFn.name; - fnName = fnName ? "'" + fnName + "'" : 'genFn'; - - t.ok(genFn instanceof $GeneratorFunction, fnName + ' instanceof %GeneratorFunction%'); - t.ok($isProto($GeneratorFunctionPrototype, genFn), '%Generator% is prototype of ' + fnName); - t.ok($isProto($GeneratorPrototype, genFn.prototype), '%GeneratorPrototype% is prototype of ' + fnName + '.prototype'); - }); - - t.end(); -}); - -test('async functions', { skip: !asyncFns.length }, function (t) { - var $AsyncFunction = GetIntrinsic('%AsyncFunction%'); - var $AsyncFunctionPrototype = GetIntrinsic('%AsyncFunctionPrototype%'); - - forEach(asyncFns, function (asyncFn) { - var fnName = asyncFn.name; - fnName = fnName ? "'" + fnName + "'" : 'asyncFn'; - - t.ok(asyncFn instanceof $AsyncFunction, fnName + ' instanceof %AsyncFunction%'); - t.ok($isProto($AsyncFunctionPrototype, asyncFn), '%AsyncFunctionPrototype% is prototype of ' + fnName); - }); - - t.end(); -}); - -test('async generator functions', { skip: asyncGenFns.length === 0 }, function (t) { - var $AsyncGeneratorFunction = GetIntrinsic('%AsyncGeneratorFunction%'); - var $AsyncGeneratorFunctionPrototype = GetIntrinsic('%AsyncGenerator%'); - var $AsyncGeneratorPrototype = GetIntrinsic('%AsyncGeneratorPrototype%'); - - forEach(asyncGenFns, function (asyncGenFn) { - var fnName = asyncGenFn.name; - fnName = fnName ? "'" + fnName + "'" : 'asyncGenFn'; - - t.ok(asyncGenFn instanceof $AsyncGeneratorFunction, fnName + ' instanceof %AsyncGeneratorFunction%'); - t.ok($isProto($AsyncGeneratorFunctionPrototype, asyncGenFn), '%AsyncGenerator% is prototype of ' + fnName); - t.ok($isProto($AsyncGeneratorPrototype, asyncGenFn.prototype), '%AsyncGeneratorPrototype% is prototype of ' + fnName + '.prototype'); - }); - - t.end(); -}); - -test('%ThrowTypeError%', function (t) { - var $ThrowTypeError = GetIntrinsic('%ThrowTypeError%'); - - t.equal(typeof $ThrowTypeError, 'function', 'is a function'); - t['throws']( - $ThrowTypeError, - TypeError, - '%ThrowTypeError% throws a TypeError' - ); - - t.end(); -}); - -test('allowMissing', { skip: asyncGenFns.length > 0 }, function (t) { - t['throws']( - function () { GetIntrinsic('%AsyncGeneratorPrototype%'); }, - TypeError, - 'throws when missing' - ); - - t.equal( - GetIntrinsic('%AsyncGeneratorPrototype%', true), - undefined, - 'does not throw when allowMissing' - ); - - t.end(); -}); diff --git a/node_modules/glob-parent/LICENSE b/node_modules/glob-parent/LICENSE deleted file mode 100644 index 734076d8..00000000 --- a/node_modules/glob-parent/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2015 Elan Shanker - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/glob-parent/README.md b/node_modules/glob-parent/README.md deleted file mode 100644 index 3bec5c78..00000000 --- a/node_modules/glob-parent/README.md +++ /dev/null @@ -1,109 +0,0 @@ -glob-parent [![Build Status](https://travis-ci.org/es128/glob-parent.svg)](https://travis-ci.org/es128/glob-parent) [![Coverage Status](https://img.shields.io/coveralls/es128/glob-parent.svg)](https://coveralls.io/r/es128/glob-parent?branch=master) -====== -Javascript module to extract the non-magic parent path from a glob string. - -[![NPM](https://nodei.co/npm/glob-parent.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/glob-parent/) -[![NPM](https://nodei.co/npm-dl/glob-parent.png?height=3&months=9)](https://nodei.co/npm-dl/glob-parent/) - -Usage ------ -```sh -npm install glob-parent --save -``` - -**Examples** - -```js -var globParent = require('glob-parent'); - -globParent('path/to/*.js'); // 'path/to' -globParent('/root/path/to/*.js'); // '/root/path/to' -globParent('/*.js'); // '/' -globParent('*.js'); // '.' -globParent('**/*.js'); // '.' -globParent('path/{to,from}'); // 'path' -globParent('path/!(to|from)'); // 'path' -globParent('path/?(to|from)'); // 'path' -globParent('path/+(to|from)'); // 'path' -globParent('path/*(to|from)'); // 'path' -globParent('path/@(to|from)'); // 'path' -globParent('path/**/*'); // 'path' - -// if provided a non-glob path, returns the nearest dir -globParent('path/foo/bar.js'); // 'path/foo' -globParent('path/foo/'); // 'path/foo' -globParent('path/foo'); // 'path' (see issue #3 for details) -``` - -## Escaping - -The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters: - -- `?` (question mark) -- `*` (star) -- `|` (pipe) -- `(` (opening parenthesis) -- `)` (closing parenthesis) -- `{` (opening curly brace) -- `}` (closing curly brace) -- `[` (opening bracket) -- `]` (closing bracket) - -**Example** - -```js -globParent('foo/[bar]/') // 'foo' -globParent('foo/\\[bar]/') // 'foo/[bar]' -``` - -## Limitations - -#### Braces & Brackets -This library attempts a quick and imperfect method of determining which path -parts have glob magic without fully parsing/lexing the pattern. There are some -advanced use cases that can trip it up, such as nested braces where the outer -pair is escaped and the inner one contains a path separator. If you find -yourself in the unlikely circumstance of being affected by this or need to -ensure higher-fidelity glob handling in your library, it is recommended that you -pre-process your input with [expand-braces] and/or [expand-brackets]. - -#### Windows -Backslashes are not valid path separators for globs. If a path with backslashes -is provided anyway, for simple cases, glob-parent will replace the path -separator for you and return the non-glob parent path (now with -forward-slashes, which are still valid as Windows path separators). - -This cannot be used in conjunction with escape characters. - -```js -// BAD -globParent('C:\\Program Files \\(x86\\)\\*.ext') // 'C:/Program Files /(x86/)' - -// GOOD -globParent('C:/Program Files\\(x86\\)/*.ext') // 'C:/Program Files (x86)' -``` - -If you are using escape characters for a pattern without path parts (i.e. -relative to `cwd`), prefix with `./` to avoid confusing glob-parent. - -```js -// BAD -globParent('foo \\[bar]') // 'foo ' -globParent('foo \\[bar]*') // 'foo ' - -// GOOD -globParent('./foo \\[bar]') // 'foo [bar]' -globParent('./foo \\[bar]*') // '.' -``` - - -Change Log ----------- -[See release notes page on GitHub](https://github.com/es128/glob-parent/releases) - -License -------- -[ISC](https://raw.github.com/es128/glob-parent/master/LICENSE) - -[expand-braces]: https://github.com/jonschlinkert/expand-braces -[expand-brackets]: https://github.com/jonschlinkert/expand-brackets diff --git a/node_modules/glob-parent/index.js b/node_modules/glob-parent/index.js deleted file mode 100644 index 3a14a539..00000000 --- a/node_modules/glob-parent/index.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -var path = require('path'); -var isglob = require('is-glob'); -var pathDirname = require('path-dirname'); -var isWin32 = require('os').platform() === 'win32'; - -module.exports = function globParent(str) { - // flip windows path separators - if (isWin32 && str.indexOf('/') < 0) str = str.split('\\').join('/'); - - // special case for strings ending in enclosure containing path separator - if (/[\{\[].*[\/]*.*[\}\]]$/.test(str)) str += '/'; - - // preserves full path in case of trailing path separator - str += 'a'; - - // remove path parts that are globby - do {str = pathDirname.posix(str)} - while (isglob(str) || /(^|[^\\])([\{\[]|\([^\)]+$)/.test(str)); - - // remove escape chars and return result - return str.replace(/\\([\*\?\|\[\]\(\)\{\}])/g, '$1'); -}; diff --git a/node_modules/glob-parent/package.json b/node_modules/glob-parent/package.json deleted file mode 100644 index f4e20c42..00000000 --- a/node_modules/glob-parent/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "glob-parent@^3.1.0", - "_id": "glob-parent@3.1.0", - "_inBundle": false, - "_integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "_location": "/glob-parent", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "glob-parent@^3.1.0", - "name": "glob-parent", - "escapedName": "glob-parent", - "rawSpec": "^3.1.0", - "saveSpec": null, - "fetchSpec": "^3.1.0" - }, - "_requiredBy": [ - "/glob-stream" - ], - "_resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "_shasum": "9e6af6299d8d3bd2bd40430832bd113df906c5ae", - "_spec": "glob-parent@^3.1.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/glob-stream", - "author": { - "name": "Elan Shanker", - "url": "https://github.com/es128" - }, - "bugs": { - "url": "https://github.com/es128/glob-parent/issues" - }, - "bundleDependencies": false, - "dependencies": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "deprecated": false, - "description": "Strips glob magic from a string to provide the parent directory path", - "devDependencies": { - "coveralls": "^2.11.2", - "istanbul": "^0.3.5", - "mocha": "^2.1.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/es128/glob-parent", - "keywords": [ - "glob", - "parent", - "strip", - "path", - "dirname", - "directory", - "base", - "wildcard" - ], - "license": "ISC", - "main": "index.js", - "name": "glob-parent", - "repository": { - "type": "git", - "url": "git+https://github.com/es128/glob-parent.git" - }, - "scripts": { - "ci-test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls", - "test": "istanbul test node_modules/mocha/bin/_mocha" - }, - "version": "3.1.0" -} diff --git a/node_modules/glob-stream/LICENSE b/node_modules/glob-stream/LICENSE deleted file mode 100755 index 67fa13bd..00000000 --- a/node_modules/glob-stream/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2017 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/glob-stream/README.md b/node_modules/glob-stream/README.md deleted file mode 100644 index 12c103ee..00000000 --- a/node_modules/glob-stream/README.md +++ /dev/null @@ -1,146 +0,0 @@ -<p align="center"> - <a href="http://gulpjs.com"> - <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png"> - </a> -</p> - -# glob-stream - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] - -A [Readable Stream][readable-stream-url] interface over [node-glob][node-glob-url]. - -## Usage - -```javascript -var gs = require('glob-stream'); - -var readable = gs('./files/**/*.coffee', { /* options */ }); - -var writable = /* your WriteableStream */ - -readable.pipe(writable); -``` - -You can pass any combination of glob strings. One caveat is that you cannot __only__ pass a negative glob, you must give it at least one positive glob so it knows where to start. If given a non-glob path (also referred to as a singular glob), only one file will be emitted. If given a singular glob and no files match, an error is emitted (see also [`options.allowEmpty`][allow-empty-url]). - -## API - -### `globStream(globs, options)` - -Takes a glob string or an array of glob strings as the first argument and an options object as the second. Returns a stream of objects that contain `cwd`, `base` and `path` properties. - -#### Options - -##### `options.allowEmpty` - -Whether or not to error upon an empty singular glob. - -Type: `Boolean` - -Default: `false` (error upon no match) - -##### `options.dot` - -Whether or not to treat dotfiles as regular files. This is passed through to [node-glob][node-glob-url]. - -Type: `Boolean` - -Default: `false` - -##### `options.silent` - -Whether or not to suppress warnings on stderr from [node-glob][node-glob-url]. This is passed through to [node-glob][node-glob-url]. - -Type: `Boolean` - -Default: `true` - -##### `options.cwd` - -The current working directory that the glob is resolved against. - -Type: `String` - -Default: `process.cwd()` - -##### `options.root` - -The root path that the glob is resolved against. - -__Note: This is never passed to [node-glob][node-glob-url] because it is pre-resolved against your paths.__ - -Type: `String` - -Default: `undefined` (use the filesystem root) - -##### `options.base` - -The absolute segment of the glob path that isn't a glob. This value is attached to each glob object and is useful for relative pathing. - -Type: `String` - -Default: The absolute path segement before a glob starts (see [glob-parent][glob-parent-url]) - -##### `options.cwdbase` - -Whether or not the `cwd` and `base` should be the same. - -Type: `Boolean` - -Default: `false` - -##### `options.uniqueBy` - -Filters stream to remove duplicates based on the string property name or the result of function. When using a function, the function receives the streamed data (objects containing `cwd`, `base`, `path` properties) to compare against. - -Type: `String` or `Function` - -Default: `'path'` - -##### other - -Any glob-related options are documented in [node-glob][node-glob-url]. Those options are forwarded verbatim, with the exception of `root` and `ignore`. `root` is pre-resolved and `ignore` is joined with all negative globs. - -#### Globbing & Negation - -```js -var stream = gs(['./**/*.js', '!./node_modules/**/*']); -``` - -Globs are executed in order, so negations should follow positive globs. For example: - -The following would __not__ exclude any files: -```js -gs(['!b*.js', '*.js']) -``` - -However, this would exclude all files that started with `b`: -```js -gs(['*.js', '!b*.js']) -``` - -## License - -MIT - -[node-glob-url]: https://github.com/isaacs/node-glob -[glob-parent-url]: https://github.com/es128/glob-parent -[allow-empty-url]: #optionsallowempty -[readable-stream-url]: https://nodejs.org/api/stream.html#stream_readable_streams - -[downloads-image]: http://img.shields.io/npm/dm/glob-stream.svg -[npm-url]: https://www.npmjs.com/package/glob-stream -[npm-image]: http://img.shields.io/npm/v/glob-stream.svg - -[travis-url]: https://travis-ci.org/gulpjs/glob-stream -[travis-image]: http://img.shields.io/travis/gulpjs/glob-stream.svg?label=travis-ci - -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glob-stream -[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glob-stream.svg?label=appveyor - -[coveralls-url]: https://coveralls.io/r/gulpjs/glob-stream -[coveralls-image]: http://img.shields.io/coveralls/gulpjs/glob-stream.svg - -[gitter-url]: https://gitter.im/gulpjs/gulp -[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/glob-stream/index.js b/node_modules/glob-stream/index.js deleted file mode 100644 index dd012f6b..00000000 --- a/node_modules/glob-stream/index.js +++ /dev/null @@ -1,94 +0,0 @@ -'use strict'; - -var Combine = require('ordered-read-streams'); -var unique = require('unique-stream'); -var pumpify = require('pumpify'); -var isNegatedGlob = require('is-negated-glob'); -var extend = require('extend'); - -var GlobStream = require('./readable'); - -function globStream(globs, opt) { - if (!opt) { - opt = {}; - } - - var ourOpt = extend({}, opt); - var ignore = ourOpt.ignore; - - ourOpt.cwd = typeof ourOpt.cwd === 'string' ? ourOpt.cwd : process.cwd(); - ourOpt.dot = typeof ourOpt.dot === 'boolean' ? ourOpt.dot : false; - ourOpt.silent = typeof ourOpt.silent === 'boolean' ? ourOpt.silent : true; - ourOpt.cwdbase = typeof ourOpt.cwdbase === 'boolean' ? ourOpt.cwdbase : false; - ourOpt.uniqueBy = typeof ourOpt.uniqueBy === 'string' || - typeof ourOpt.uniqueBy === 'function' ? ourOpt.uniqueBy : 'path'; - - if (ourOpt.cwdbase) { - ourOpt.base = ourOpt.cwd; - } - // Normalize string `ignore` to array - if (typeof ignore === 'string') { - ignore = [ignore]; - } - // Ensure `ignore` is an array - if (!Array.isArray(ignore)) { - ignore = []; - } - - // Only one glob no need to aggregate - if (!Array.isArray(globs)) { - globs = [globs]; - } - - var positives = []; - var negatives = []; - - globs.forEach(sortGlobs); - - function sortGlobs(globString, index) { - if (typeof globString !== 'string') { - throw new Error('Invalid glob at index ' + index); - } - - var glob = isNegatedGlob(globString); - var globArray = glob.negated ? negatives : positives; - - globArray.push({ - index: index, - glob: glob.pattern, - }); - } - - if (positives.length === 0) { - throw new Error('Missing positive glob'); - } - - // Create all individual streams - var streams = positives.map(streamFromPositive); - - // Then just pipe them to a single unique stream and return it - var aggregate = new Combine(streams); - var uniqueStream = unique(ourOpt.uniqueBy); - - return pumpify.obj(aggregate, uniqueStream); - - function streamFromPositive(positive) { - var negativeGlobs = negatives - .filter(indexGreaterThan(positive.index)) - .map(toGlob) - .concat(ignore); - return new GlobStream(positive.glob, negativeGlobs, ourOpt); - } -} - -function indexGreaterThan(index) { - return function(obj) { - return obj.index > index; - }; -} - -function toGlob(obj) { - return obj.glob; -} - -module.exports = globStream; diff --git a/node_modules/glob-stream/node_modules/readable-stream/.travis.yml b/node_modules/glob-stream/node_modules/readable-stream/.travis.yml deleted file mode 100644 index f62cdac0..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -sudo: false -language: node_js -before_install: - - (test $NPM_LEGACY && npm install -g npm@2 && npm install -g npm@3) || true -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: NPM_LEGACY=true - - node_js: '0.10' - env: NPM_LEGACY=true - - node_js: '0.11' - env: NPM_LEGACY=true - - node_js: '0.12' - env: NPM_LEGACY=true - - node_js: 1 - env: NPM_LEGACY=true - - node_js: 2 - env: NPM_LEGACY=true - - node_js: 3 - env: NPM_LEGACY=true - - node_js: 4 - - node_js: 5 - - node_js: 6 - - node_js: 7 - - node_js: 8 - - node_js: 9 -script: "npm run test" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/node_modules/glob-stream/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/glob-stream/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58d..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/glob-stream/node_modules/readable-stream/GOVERNANCE.md b/node_modules/glob-stream/node_modules/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93f..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### Streams Working Group - -The Node.js Streams is jointly governed by a Working Group -(WG) -that is responsible for high-level guidance of the project. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Conduct guidelines -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project -[README.md](./README.md#current-project-team-members). - -### Collaborators - -The readable-stream GitHub repository is -maintained by the WG and additional Collaborators who are added by the -WG on an ongoing basis. - -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the WG and their addition as -Collaborators is discussed during the WG meeting. - -_Note:_ If you make a significant contribution and are not considered -for commit-access log an issue or contact a WG member directly and it -will be brought up in the next WG meeting. - -Modifications of the contents of the readable-stream repository are -made on -a collaborative basis. Anybody with a GitHub account may propose a -modification via pull request and it will be considered by the project -Collaborators. All pull requests must be reviewed and accepted by a -Collaborator with sufficient expertise who is able to take full -responsibility for the change. In the case of pull requests proposed -by an existing Collaborator, an additional Collaborator is required -for sign-off. Consensus should be sought if additional Collaborators -participate and there is disagreement around a particular -modification. See _Consensus Seeking Process_ below for further detail -on the consensus model used for governance. - -Collaborators may opt to elevate significant or controversial -modifications, or modifications that have not found consensus to the -WG for discussion by assigning the ***WG-agenda*** tag to a pull -request or issue. The WG should serve as the final arbiter where -required. - -For the current list of Collaborators, see the project -[README.md](./README.md#members). - -### WG Membership - -WG seats are not time-limited. There is no fixed size of the WG. -However, the expected target is between 6 and 12, to ensure adequate -coverage of important areas of expertise, balanced with the ability to -make decisions efficiently. - -There is no specific set of requirements or qualifications for WG -membership beyond these rules. - -The WG may add additional members to the WG by unanimous consensus. - -A WG member may be removed from the WG by voluntary resignation, or by -unanimous consensus of all other WG members. - -Changes to WG membership should be posted in the agenda, and may be -suggested as any other agenda item (see "WG Meetings" below). - -If an addition or removal is proposed during a meeting, and the full -WG is not in attendance to participate, then the addition or removal -is added to the agenda for the subsequent meeting. This is to ensure -that all members are given the opportunity to participate in all -membership decisions. If a WG member is unable to attend a meeting -where a planned membership decision is being made, then their consent -is assumed. - -No more than 1/3 of the WG members may be affiliated with the same -employer. If removal or resignation of a WG member, or a change of -employment by a WG member, creates a situation where more than 1/3 of -the WG membership shares an employer, then the situation must be -immediately remedied by the resignation or removal of one or more WG -members affiliated with the over-represented employer(s). - -### WG Meetings - -The WG meets occasionally on a Google Hangout On Air. A designated moderator -approved by the WG runs the meeting. Each meeting should be -published to YouTube. - -Items are added to the WG agenda that are considered contentious or -are modifications of governance, contribution policy, WG membership, -or release process. - -The intention of the agenda is not to approve or review all patches; -that should happen continuously on GitHub and be handled by the larger -group of Collaborators. - -Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, -WG member or the moderator can add the item to the agenda by adding -the ***WG-agenda*** tag to the issue. - -Prior to each WG meeting the moderator will share the Agenda with -members of the WG. WG members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the WG -cannot veto or remove items. - -The WG may invite persons or representatives from certain projects to -participate in a non-voting capacity. - -The moderator is responsible for summarizing the discussion of each -agenda item and sends it as a pull request after the meeting. - -### Consensus Seeking Process - -The WG follows a -[Consensus -Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) -decision-making model. - -When an agenda item has appeared to reach a consensus the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. - -If an agenda item cannot reach a consensus a WG member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be seconded by a majority of the WG -or else the discussion will continue. Simple majority wins. - -Note that changes to WG membership require a majority consensus. See -"WG Membership" above. diff --git a/node_modules/glob-stream/node_modules/readable-stream/LICENSE b/node_modules/glob-stream/node_modules/readable-stream/LICENSE deleted file mode 100644 index 2873b3b2..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" diff --git a/node_modules/glob-stream/node_modules/readable-stream/README.md b/node_modules/glob-stream/node_modules/readable-stream/README.md deleted file mode 100644 index 23fe3f3e..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# readable-stream - -***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -<a name="members"></a> -## Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E -* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/node_modules/glob-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/glob-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index 83275f19..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,60 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section - - diff --git a/node_modules/glob-stream/node_modules/readable-stream/duplex-browser.js b/node_modules/glob-stream/node_modules/readable-stream/duplex-browser.js deleted file mode 100644 index f8b2db83..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/duplex-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_duplex.js'); diff --git a/node_modules/glob-stream/node_modules/readable-stream/duplex.js b/node_modules/glob-stream/node_modules/readable-stream/duplex.js deleted file mode 100644 index 46924cbf..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Duplex diff --git a/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 57003c32..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/*<replacement>*/ - -var pna = require('process-nextick-args'); -/*</replacement>*/ - -/*<replacement>*/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/*</replacement>*/ - -module.exports = Duplex; - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -{ - // avoid scope creep, the keys array can then be collected - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - pna.nextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -Object.defineProperty(Duplex.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); - -Duplex.prototype._destroy = function (err, cb) { - this.push(null); - this.end(); - - pna.nextTick(cb, err); -}; \ No newline at end of file diff --git a/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 612edb4d..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 0f807646..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1019 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/*<replacement>*/ - -var pna = require('process-nextick-args'); -/*</replacement>*/ - -module.exports = Readable; - -/*<replacement>*/ -var isArray = require('isarray'); -/*</replacement>*/ - -/*<replacement>*/ -var Duplex; -/*</replacement>*/ - -Readable.ReadableState = ReadableState; - -/*<replacement>*/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/*</replacement>*/ - -/*<replacement>*/ -var Stream = require('./internal/streams/stream'); -/*</replacement>*/ - -/*<replacement>*/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/*</replacement>*/ - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -/*<replacement>*/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/*</replacement>*/ - -var BufferList = require('./internal/streams/BufferList'); -var destroyImpl = require('./internal/streams/destroy'); -var StringDecoder; - -util.inherits(Readable, Stream); - -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); - - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var readableHwm = options.readableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} - -Object.defineProperty(Readable.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); - -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - this.push(null); - cb(err); -}; - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); - } else if (state.ended) { - stream.emit('error', new Error('stream.push() after EOF')); - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - } - } - - return needMoreData(state); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } else { - state.length -= n; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - pna.nextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('_read() is not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - // If the user pushes more data while we're writing to dest then we'll end up - // in ondata again. However, we only want to increase awaitDrain once because - // dest will only emit one 'drain' event for the multiple writes. - // => Introduce a guard on increasing awaitDrain. - var increasedAwaitDrain = false; - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - increasedAwaitDrain = false; - var ret = dest.write(chunk); - if (false === ret && !increasedAwaitDrain) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - increasedAwaitDrain = true; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { hasUnpiped: false }; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, unpipeInfo); - }return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this, unpipeInfo); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data') { - // Start flowing on next tick if stream isn't explicitly paused - if (this._readableState.flowing !== false) this.resume(); - } else if (ev === 'readable') { - var state = this._readableState; - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.emittedReadable = false; - if (!state.reading) { - pna.nextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - pna.nextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - state.awaitDrain = 0; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null) {} -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var _this = this; - - var state = this._readableState; - var paused = false; - - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - - _this.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return this; -}; - -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._readableState.highWaterMark; - } -}); - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = fromListPartial(n, state.buffer, state.decoder); - } - - return ret; -} - -// Extracts only enough buffered data to satisfy the amount requested. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromListPartial(n, list, hasStrings) { - var ret; - if (n < list.head.data.length) { - // slice is the same for buffers and strings - ret = list.head.data.slice(0, n); - list.head.data = list.head.data.slice(n); - } else if (n === list.head.data.length) { - // first chunk is a perfect match - ret = list.shift(); - } else { - // result spans more than one buffer - ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); - } - return ret; -} - -// Copies a specified amount of characters from the list of buffered data -// chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBufferString(n, list) { - var p = list.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -// Copies a specified amount of bytes from the list of buffered data chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBuffer(n, list) { - var ret = Buffer.allocUnsafe(n); - var p = list.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - pna.nextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index fcfc105a..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -util.inherits(Transform, Duplex); - -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) { - return this.emit('error', new Error('write callback called multiple times')); - } - - ts.writechunk = null; - ts.writecb = null; - - if (data != null) // single equals check for both `null` and `undefined` - this.push(data); - - cb(er); - - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); -} - -function prefinish() { - var _this = this; - - if (typeof this._flush === 'function') { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('_transform() is not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -Transform.prototype._destroy = function (err, cb) { - var _this2 = this; - - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - _this2.emit('close'); - }); -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - - if (data != null) // single equals check for both `null` and `undefined` - stream.push(data); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); - - if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index b0b02200..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,687 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -/*<replacement>*/ - -var pna = require('process-nextick-args'); -/*</replacement>*/ - -module.exports = Writable; - -/* <replacement> */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* </replacement> */ - -/*<replacement>*/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; -/*</replacement>*/ - -/*<replacement>*/ -var Duplex; -/*</replacement>*/ - -Writable.WritableState = WritableState; - -/*<replacement>*/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/*</replacement>*/ - -/*<replacement>*/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/*</replacement>*/ - -/*<replacement>*/ -var Stream = require('./internal/streams/stream'); -/*</replacement>*/ - -/*<replacement>*/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/*</replacement>*/ - -var destroyImpl = require('./internal/streams/destroy'); - -util.inherits(Writable, Stream); - -function nop() {} - -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var writableHwm = options.writableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // if _final has been called - this.finalCalled = false; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // has it been destroyed - this.destroyed = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function (object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function (object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { - return new Writable(options); - } - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - pna.nextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - pna.nextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} - -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - pna.nextTick(cb, er); - // this can emit finish, and it will always happen - // after error - pna.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /*<replacement>*/ - asyncWrite(afterWrite, stream, state, finished, cb); - /*</replacement>*/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('_write() is not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - stream.emit('error', err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function') { - state.pendingcb++; - state.finalCalled = true; - pna.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = corkReq; - } else { - state.corkedRequestsFree = corkReq; - } -} - -Object.defineProperty(Writable.prototype, 'destroyed', { - get: function () { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); - -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - this.end(); - cb(err); -}; \ No newline at end of file diff --git a/node_modules/glob-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/glob-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js deleted file mode 100644 index aefc68bd..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Buffer = require('safe-buffer').Buffer; -var util = require('util'); - -function copyBuffer(src, target, offset) { - src.copy(target, offset); -} - -module.exports = function () { - function BufferList() { - _classCallCheck(this, BufferList); - - this.head = null; - this.tail = null; - this.length = 0; - } - - BufferList.prototype.push = function push(v) { - var entry = { data: v, next: null }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - }; - - BufferList.prototype.unshift = function unshift(v) { - var entry = { data: v, next: this.head }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - }; - - BufferList.prototype.shift = function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - }; - - BufferList.prototype.clear = function clear() { - this.head = this.tail = null; - this.length = 0; - }; - - BufferList.prototype.join = function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) { - ret += s + p.data; - }return ret; - }; - - BufferList.prototype.concat = function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - if (this.length === 1) return this.head.data; - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; - }; - - return BufferList; -}(); - -if (util && util.inspect && util.inspect.custom) { - module.exports.prototype[util.inspect.custom] = function () { - var obj = util.inspect({ length: this.length }); - return this.constructor.name + ' ' + obj; - }; -} \ No newline at end of file diff --git a/node_modules/glob-stream/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/glob-stream/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index 5a0a0d88..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -/*<replacement>*/ - -var pna = require('process-nextick-args'); -/*</replacement>*/ - -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { - pna.nextTick(emitErrorNT, this, err); - } - return this; - } - - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; - } - - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - pna.nextTick(emitErrorNT, _this, err); - if (_this._writableState) { - _this._writableState.errorEmitted = true; - } - } else if (cb) { - cb(err); - } - }); - - return this; -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy -}; \ No newline at end of file diff --git a/node_modules/glob-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/glob-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3fd..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/node_modules/glob-stream/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/glob-stream/node_modules/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b6..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/node_modules/glob-stream/node_modules/readable-stream/package.json b/node_modules/glob-stream/node_modules/readable-stream/package.json deleted file mode 100644 index 260bc5aa..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "readable-stream@^2.1.5", - "_id": "readable-stream@2.3.7", - "_inBundle": false, - "_integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "_location": "/glob-stream/readable-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "readable-stream@^2.1.5", - "name": "readable-stream", - "escapedName": "readable-stream", - "rawSpec": "^2.1.5", - "saveSpec": null, - "fetchSpec": "^2.1.5" - }, - "_requiredBy": [ - "/glob-stream" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "_shasum": "1eca1cf711aef814c04f62252a36a62f6cb23b57", - "_spec": "readable-stream@^2.1.5", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/glob-stream", - "browser": { - "util": false, - "./readable.js": "./readable-browser.js", - "./writable.js": "./writable-browser.js", - "./duplex.js": "./duplex-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "deprecated": false, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "assert": "^1.4.0", - "babel-polyfill": "^6.9.1", - "buffer": "^4.9.0", - "lolex": "^2.3.2", - "nyc": "^6.4.0", - "tap": "^0.7.0", - "tape": "^4.8.0" - }, - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "name": "readable-stream", - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov", - "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js" - }, - "version": "2.3.7" -} diff --git a/node_modules/glob-stream/node_modules/readable-stream/passthrough.js b/node_modules/glob-stream/node_modules/readable-stream/passthrough.js deleted file mode 100644 index ffd791d7..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').PassThrough diff --git a/node_modules/glob-stream/node_modules/readable-stream/readable-browser.js b/node_modules/glob-stream/node_modules/readable-stream/readable-browser.js deleted file mode 100644 index e5037259..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/readable-browser.js +++ /dev/null @@ -1,7 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/glob-stream/node_modules/readable-stream/readable.js b/node_modules/glob-stream/node_modules/readable-stream/readable.js deleted file mode 100644 index ec89ec53..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,19 +0,0 @@ -var Stream = require('stream'); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; - exports = module.exports = Stream.Readable; - exports.Readable = Stream.Readable; - exports.Writable = Stream.Writable; - exports.Duplex = Stream.Duplex; - exports.Transform = Stream.Transform; - exports.PassThrough = Stream.PassThrough; - exports.Stream = Stream; -} else { - exports = module.exports = require('./lib/_stream_readable.js'); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = require('./lib/_stream_writable.js'); - exports.Duplex = require('./lib/_stream_duplex.js'); - exports.Transform = require('./lib/_stream_transform.js'); - exports.PassThrough = require('./lib/_stream_passthrough.js'); -} diff --git a/node_modules/glob-stream/node_modules/readable-stream/transform.js b/node_modules/glob-stream/node_modules/readable-stream/transform.js deleted file mode 100644 index b1baba26..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Transform diff --git a/node_modules/glob-stream/node_modules/readable-stream/writable-browser.js b/node_modules/glob-stream/node_modules/readable-stream/writable-browser.js deleted file mode 100644 index ebdde6a8..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/writable-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_writable.js'); diff --git a/node_modules/glob-stream/node_modules/readable-stream/writable.js b/node_modules/glob-stream/node_modules/readable-stream/writable.js deleted file mode 100644 index 3211a6f8..00000000 --- a/node_modules/glob-stream/node_modules/readable-stream/writable.js +++ /dev/null @@ -1,8 +0,0 @@ -var Stream = require("stream") -var Writable = require("./lib/_stream_writable.js") - -if (process.env.READABLE_STREAM === 'disable') { - module.exports = Stream && Stream.Writable || Writable -} else { - module.exports = Writable -} diff --git a/node_modules/glob-stream/node_modules/safe-buffer/LICENSE b/node_modules/glob-stream/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068cee..00000000 --- a/node_modules/glob-stream/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/glob-stream/node_modules/safe-buffer/README.md b/node_modules/glob-stream/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81afd..00000000 --- a/node_modules/glob-stream/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) -<!-- YAML -added: v3.0.0 ---> - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) -<!-- YAML -added: v5.10.0 ---> - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: <Buffer 88 13 a0 0f> - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: <Buffer 88 13 70 17> -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) -<!-- YAML -added: v3.0.0 ---> - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) -<!-- YAML -added: v5.10.0 ---> - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) -<!-- YAML -added: v5.10.0 ---> - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // <Buffer 00 00 00 00 00> -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // <Buffer 61 61 61 61 61> -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64> -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) -<!-- YAML -added: v5.10.0 ---> - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // <Buffer 78 e0 82 02 01> - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // <Buffer 00 00 00 00 00> -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) -<!-- YAML -added: v5.10.0 ---> - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/node_modules/glob-stream/node_modules/safe-buffer/index.d.ts b/node_modules/glob-stream/node_modules/safe-buffer/index.d.ts deleted file mode 100644 index e9fed809..00000000 --- a/node_modules/glob-stream/node_modules/safe-buffer/index.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "safe-buffer" { - export class Buffer { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - } -} \ No newline at end of file diff --git a/node_modules/glob-stream/node_modules/safe-buffer/index.js b/node_modules/glob-stream/node_modules/safe-buffer/index.js deleted file mode 100644 index 22438dab..00000000 --- a/node_modules/glob-stream/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/node_modules/glob-stream/node_modules/safe-buffer/package.json b/node_modules/glob-stream/node_modules/safe-buffer/package.json deleted file mode 100644 index 36241dcf..00000000 --- a/node_modules/glob-stream/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "safe-buffer@~5.1.1", - "_id": "safe-buffer@5.1.2", - "_inBundle": false, - "_integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "_location": "/glob-stream/safe-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "safe-buffer@~5.1.1", - "name": "safe-buffer", - "escapedName": "safe-buffer", - "rawSpec": "~5.1.1", - "saveSpec": null, - "fetchSpec": "~5.1.1" - }, - "_requiredBy": [ - "/glob-stream/readable-stream", - "/glob-stream/string_decoder" - ], - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "_shasum": "991ec69d296e0313747d59bdfd2b745c35f8828d", - "_spec": "safe-buffer@~5.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/glob-stream/node_modules/readable-stream", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Safer Node.js Buffer API", - "devDependencies": { - "standard": "*", - "tape": "^4.0.0" - }, - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "name": "safe-buffer", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "types": "index.d.ts", - "version": "5.1.2" -} diff --git a/node_modules/glob-stream/node_modules/string_decoder/.travis.yml b/node_modules/glob-stream/node_modules/string_decoder/.travis.yml deleted file mode 100644 index 3347a725..00000000 --- a/node_modules/glob-stream/node_modules/string_decoder/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test diff --git a/node_modules/glob-stream/node_modules/string_decoder/LICENSE b/node_modules/glob-stream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 778edb20..00000000 --- a/node_modules/glob-stream/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - diff --git a/node_modules/glob-stream/node_modules/string_decoder/README.md b/node_modules/glob-stream/node_modules/string_decoder/README.md deleted file mode 100644 index 5fd58315..00000000 --- a/node_modules/glob-stream/node_modules/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# string_decoder - -***Node-core v8.9.4 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. - -## Streams Working Group - -`string_decoder` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -See [readable-stream](https://github.com/nodejs/readable-stream) for -more details. diff --git a/node_modules/glob-stream/node_modules/string_decoder/lib/string_decoder.js b/node_modules/glob-stream/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63f..00000000 --- a/node_modules/glob-stream/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/*<replacement>*/ - -var Buffer = require('safe-buffer').Buffer; -/*</replacement>*/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/node_modules/glob-stream/node_modules/string_decoder/package.json b/node_modules/glob-stream/node_modules/string_decoder/package.json deleted file mode 100644 index e40b5cbb..00000000 --- a/node_modules/glob-stream/node_modules/string_decoder/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "string_decoder@~1.1.1", - "_id": "string_decoder@1.1.1", - "_inBundle": false, - "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "_location": "/glob-stream/string_decoder", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "string_decoder@~1.1.1", - "name": "string_decoder", - "escapedName": "string_decoder", - "rawSpec": "~1.1.1", - "saveSpec": null, - "fetchSpec": "~1.1.1" - }, - "_requiredBy": [ - "/glob-stream/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8", - "_spec": "string_decoder@~1.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/glob-stream/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/nodejs/string_decoder/issues" - }, - "bundleDependencies": false, - "dependencies": { - "safe-buffer": "~5.1.0" - }, - "deprecated": false, - "description": "The string_decoder module from Node core", - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "lib/string_decoder.js", - "name": "string_decoder", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "test": "tap test/parallel/*.js && node test/verify-dependencies" - }, - "version": "1.1.1" -} diff --git a/node_modules/glob-stream/package.json b/node_modules/glob-stream/package.json deleted file mode 100644 index be22533f..00000000 --- a/node_modules/glob-stream/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "_from": "glob-stream@^6.1.0", - "_id": "glob-stream@6.1.0", - "_inBundle": false, - "_integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", - "_location": "/glob-stream", - "_phantomChildren": { - "core-util-is": "1.0.2", - "inherits": "2.0.4", - "isarray": "1.0.0", - "process-nextick-args": "2.0.1", - "util-deprecate": "1.0.2" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "glob-stream@^6.1.0", - "name": "glob-stream", - "escapedName": "glob-stream", - "rawSpec": "^6.1.0", - "saveSpec": null, - "fetchSpec": "^6.1.0" - }, - "_requiredBy": [ - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", - "_shasum": "7045c99413b3eb94888d83ab46d0b404cc7bdde4", - "_spec": "glob-stream@^6.1.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs", - "author": { - "name": "Gulp Team", - "email": "team@gulpjs.com", - "url": "http://gulpjs.com/" - }, - "bugs": { - "url": "https://github.com/gulpjs/glob-stream/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Eric Schoffstall", - "email": "yo@contra.io" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com" - } - ], - "dependencies": { - "extend": "^3.0.0", - "glob": "^7.1.1", - "glob-parent": "^3.1.0", - "is-negated-glob": "^1.0.0", - "ordered-read-streams": "^1.0.0", - "pumpify": "^1.3.5", - "readable-stream": "^2.1.5", - "remove-trailing-separator": "^1.0.1", - "to-absolute-glob": "^2.0.0", - "unique-stream": "^2.0.2" - }, - "deprecated": false, - "description": "A Readable Stream interface over node-glob.", - "devDependencies": { - "eslint": "^1.10.3", - "eslint-config-gulp": "^2.0.0", - "expect": "^1.19.0", - "istanbul": "^0.4.3", - "istanbul-coveralls": "^1.0.3", - "jscs": "^2.4.0", - "jscs-preset-gulp": "^1.0.0", - "mississippi": "^1.2.0", - "mocha": "^2.4.5" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "index.js", - "readable.js", - "LICENSE" - ], - "homepage": "https://github.com/gulpjs/glob-stream#readme", - "keywords": [ - "glob", - "stream", - "gulp", - "readable", - "fs", - "files" - ], - "license": "MIT", - "main": "index.js", - "name": "glob-stream", - "repository": { - "type": "git", - "url": "git+https://github.com/gulpjs/glob-stream.git" - }, - "scripts": { - "cover": "istanbul cover _mocha --report lcovonly", - "coveralls": "npm run cover && istanbul-coveralls", - "lint": "eslint . && jscs index.js readable.js test/", - "pretest": "npm run lint", - "test": "mocha --async-only" - }, - "version": "6.1.0" -} diff --git a/node_modules/glob-stream/readable.js b/node_modules/glob-stream/readable.js deleted file mode 100644 index 36cf7b67..00000000 --- a/node_modules/glob-stream/readable.js +++ /dev/null @@ -1,117 +0,0 @@ -'use strict'; - -var inherits = require('util').inherits; - -var glob = require('glob'); -var extend = require('extend'); -var Readable = require('readable-stream').Readable; -var globParent = require('glob-parent'); -var toAbsoluteGlob = require('to-absolute-glob'); -var removeTrailingSeparator = require('remove-trailing-separator'); - -var globErrMessage1 = 'File not found with singular glob: '; -var globErrMessage2 = ' (if this was purposeful, use `allowEmpty` option)'; - -function getBasePath(ourGlob, opt) { - return globParent(toAbsoluteGlob(ourGlob, opt)); -} - -function globIsSingular(glob) { - var globSet = glob.minimatch.set; - if (globSet.length !== 1) { - return false; - } - - return globSet[0].every(function isString(value) { - return typeof value === 'string'; - }); -} - -function GlobStream(ourGlob, negatives, opt) { - if (!(this instanceof GlobStream)) { - return new GlobStream(ourGlob, negatives, opt); - } - - var ourOpt = extend({}, opt); - - Readable.call(this, { - objectMode: true, - highWaterMark: ourOpt.highWaterMark || 16, - }); - - // Delete `highWaterMark` after inheriting from Readable - delete ourOpt.highWaterMark; - - var self = this; - - function resolveNegatives(negative) { - return toAbsoluteGlob(negative, ourOpt); - } - - var ourNegatives = negatives.map(resolveNegatives); - ourOpt.ignore = ourNegatives; - - var cwd = ourOpt.cwd; - var allowEmpty = ourOpt.allowEmpty || false; - - // Extract base path from glob - var basePath = ourOpt.base || getBasePath(ourGlob, ourOpt); - - // Remove path relativity to make globs make sense - ourGlob = toAbsoluteGlob(ourGlob, ourOpt); - // Delete `root` after all resolving done - delete ourOpt.root; - - var globber = new glob.Glob(ourGlob, ourOpt); - this._globber = globber; - - var found = false; - - globber.on('match', function(filepath) { - found = true; - var obj = { - cwd: cwd, - base: basePath, - path: removeTrailingSeparator(filepath), - }; - if (!self.push(obj)) { - globber.pause(); - } - }); - - globber.once('end', function() { - if (allowEmpty !== true && !found && globIsSingular(globber)) { - var err = new Error(globErrMessage1 + ourGlob + globErrMessage2); - - return self.destroy(err); - } - - self.push(null); - }); - - function onError(err) { - self.destroy(err); - } - - globber.once('error', onError); -} -inherits(GlobStream, Readable); - -GlobStream.prototype._read = function() { - this._globber.resume(); -}; - -GlobStream.prototype.destroy = function(err) { - var self = this; - - this._globber.abort(); - - process.nextTick(function() { - if (err) { - self.emit('error', err); - } - self.emit('close'); - }); -}; - -module.exports = GlobStream; diff --git a/node_modules/glob/LICENSE b/node_modules/glob/LICENSE deleted file mode 100644 index 19129e31..00000000 --- a/node_modules/glob/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/glob/README.md b/node_modules/glob/README.md deleted file mode 100644 index baa1d1ba..00000000 --- a/node_modules/glob/README.md +++ /dev/null @@ -1,368 +0,0 @@ -# Glob - -Match files using the patterns the shell uses, like stars and stuff. - -[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master) - -This is a glob implementation in JavaScript. It uses the `minimatch` -library to do its matching. - -![](oh-my-glob.gif) - -## Usage - -Install with npm - -``` -npm i glob -``` - -```javascript -var glob = require("glob") - -// options is optional -glob("**/*.js", options, function (er, files) { - // files is an array of filenames. - // If the `nonull` option is set, and nothing - // was found, then files is ["**/*.js"] - // er is an error object or null. -}) -``` - -## Glob Primer - -"Globs" are the patterns you type when you do stuff like `ls *.js` on -the command line, or put `build/*` in a `.gitignore` file. - -Before parsing the path part patterns, braced sections are expanded -into a set. Braced sections start with `{` and end with `}`, with any -number of comma-delimited sections within. Braced sections may contain -slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. - -The following characters have special magic meaning when used in a -path portion: - -* `*` Matches 0 or more characters in a single path portion -* `?` Matches 1 character -* `[...]` Matches a range of characters, similar to a RegExp range. - If the first character of the range is `!` or `^` then it matches - any character not in the range. -* `!(pattern|pattern|pattern)` Matches anything that does not match - any of the patterns provided. -* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the - patterns provided. -* `+(pattern|pattern|pattern)` Matches one or more occurrences of the - patterns provided. -* `*(a|b|c)` Matches zero or more occurrences of the patterns provided -* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns - provided -* `**` If a "globstar" is alone in a path portion, then it matches - zero or more directories and subdirectories searching for matches. - It does not crawl symlinked directories. - -### Dots - -If a file or directory path portion has a `.` as the first character, -then it will not match any glob pattern unless that pattern's -corresponding path part also has a `.` as its first character. - -For example, the pattern `a/.*/c` would match the file at `a/.b/c`. -However the pattern `a/*/c` would not, because `*` does not start with -a dot character. - -You can make glob treat dots as normal characters by setting -`dot:true` in the options. - -### Basename Matching - -If you set `matchBase:true` in the options, and the pattern has no -slashes in it, then it will seek for any file anywhere in the tree -with a matching basename. For example, `*.js` would match -`test/simple/basic.js`. - -### Empty Sets - -If no matching files are found, then an empty array is returned. This -differs from the shell, where the pattern itself is returned. For -example: - - $ echo a*s*d*f - a*s*d*f - -To get the bash-style behavior, set the `nonull:true` in the options. - -### See Also: - -* `man sh` -* `man bash` (Search for "Pattern Matching") -* `man 3 fnmatch` -* `man 5 gitignore` -* [minimatch documentation](https://github.com/isaacs/minimatch) - -## glob.hasMagic(pattern, [options]) - -Returns `true` if there are any special characters in the pattern, and -`false` otherwise. - -Note that the options affect the results. If `noext:true` is set in -the options object, then `+(a|b)` will not be considered a magic -pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` -then that is considered magical, unless `nobrace:true` is set in the -options. - -## glob(pattern, [options], cb) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* `cb` `{Function}` - * `err` `{Error | null}` - * `matches` `{Array<String>}` filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options]) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* return: `{Array<String>}` filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instantiating the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` `{String}` pattern to search for -* `options` `{Object}` -* `cb` `{Function}` Called when an error occurs, or matches are found - * `err` `{Error | null}` - * `matches` `{Array<String>}` filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. -* `cache` Convenience object. Each field has the following possible - values: - * `false` - Path does not exist - * `true` - Path exists - * `'FILE'` - Path exists, and is not a directory - * `'DIR'` - Path exists, and is a directory - * `[file, entries, ...]` - Path exists, is a directory, and the - array value is the results of `fs.readdir` -* `statCache` Cache of `fs.stat` results, to prevent statting the same - path multiple times. -* `symlinks` A record of which paths are symbolic links, which is - relevant in resolving `**` patterns. -* `realpathCache` An optional object which is passed to `fs.realpath` - to minimize unnecessary syscalls. It is stored on the instantiated - Glob object, and may be re-used. - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the specific - thing that matched. It is not deduplicated or resolved to a realpath. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `pause` Temporarily stop the search -* `resume` Resume the search -* `abort` Stop the search forever - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the Glob object, as well. - -If you are running many `glob` operations, you can pass a Glob object -as the `options` argument to a subsequent operation to shortcut some -`stat` and `readdir` calls. At the very least, you may pass in shared -`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that -parallel glob operations will be sped up by sharing information about -the filesystem. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `dot` Include `.dot` files in normal matches and `globstar` matches. - Note that an explicit dot in a portion of the pattern will always - match dot files. -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. -* `silent` When an unusual error is encountered when attempting to - read a directory, a warning will be printed to stderr. Set the - `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered when attempting to - read a directory, the process will just continue on in search of - other matches. Set the `strict` option to raise an error in these - cases. -* `cache` See `cache` property above. Pass in a previously generated - cache object to save some fs calls. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary - to set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `symlinks` A cache of known symbolic links. You may pass in a - previously generated `symlinks` object to save `lstat` calls when - resolving `**` matches. -* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. Set this - flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `debug` Set to enable debug logging in minimatch and glob. -* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. -* `noglobstar` Do not match `**` against multiple filenames. (Ie, - treat it as a normal `*` instead.) -* `noext` Do not match `+(a|b)` "extglob" patterns. -* `nocase` Perform a case-insensitive match. Note: on - case-insensitive filesystems, non-magic patterns will match by - default, since `stat` and `readdir` will not raise errors. -* `matchBase` Perform a basename-only match if the pattern does not - contain any slash characters. That is, `*.js` would be treated as - equivalent to `**/*.js`, matching all js files in all directories. -* `nodir` Do not match directories, only files. (Note: to match - *only* directories, simply put a `/` at the end of the pattern.) -* `ignore` Add a pattern or an array of glob patterns to exclude matches. - Note: `ignore` patterns are *always* in `dot:true` mode, regardless - of any other settings. -* `follow` Follow symlinked directories when expanding `**` patterns. - Note that this can result in a lot of duplicate references in the - presence of cyclic links. -* `realpath` Set to true to call `fs.realpath` on all of the results. - In the case of a symlink that cannot be resolved, the full absolute - path to the matched entry is returned (though it will usually be a - broken symlink) -* `absolute` Set to true to always receive absolute paths for matched - files. Unlike `realpath`, this also affects the values returned in - the `match` event. - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.3, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -Note that symlinked directories are not crawled as part of a `**`, -though their contents may match against subsequent portions of the -pattern. This prevents infinite loops and duplicates and the like. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -### Comments and Negation - -Previously, this module let you mark a pattern as a "comment" if it -started with a `#` character, or a "negated" pattern if it started -with a `!` character. - -These options were deprecated in version 5, and removed in version 6. - -To specify things that should not match, use the `ignore` option. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the cache or statCache objects are reused between glob -calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast majority -of operations, this is never a problem. - -## Contributing - -Any change to behavior (including bugfixes) must come with a test. - -Patches that fail tests or reduce performance will be rejected. - -``` -# to run tests -npm test - -# to re-generate test fixtures -npm run test-regen - -# to benchmark against bash/zsh -npm run bench - -# to profile javascript -npm run prof -``` diff --git a/node_modules/glob/changelog.md b/node_modules/glob/changelog.md deleted file mode 100644 index 41636771..00000000 --- a/node_modules/glob/changelog.md +++ /dev/null @@ -1,67 +0,0 @@ -## 7.0 - -- Raise error if `options.cwd` is specified, and not a directory - -## 6.0 - -- Remove comment and negation pattern support -- Ignore patterns are always in `dot:true` mode - -## 5.0 - -- Deprecate comment and negation patterns -- Fix regression in `mark` and `nodir` options from making all cache - keys absolute path. -- Abort if `fs.readdir` returns an error that's unexpected -- Don't emit `match` events for ignored items -- Treat ENOTSUP like ENOTDIR in readdir - -## 4.5 - -- Add `options.follow` to always follow directory symlinks in globstar -- Add `options.realpath` to call `fs.realpath` on all results -- Always cache based on absolute path - -## 4.4 - -- Add `options.ignore` -- Fix handling of broken symlinks - -## 4.3 - -- Bump minimatch to 2.x -- Pass all tests on Windows - -## 4.2 - -- Add `glob.hasMagic` function -- Add `options.nodir` flag - -## 4.1 - -- Refactor sync and async implementations for performance -- Throw if callback provided to sync glob function -- Treat symbolic links in globstar results the same as Bash 4.3 - -## 4.0 - -- Use `^` for dependency versions (bumped major because this breaks - older npm versions) -- Ensure callbacks are only ever called once -- switch to ISC license - -## 3.x - -- Rewrite in JavaScript -- Add support for setting root, cwd, and windows support -- Cache many fs calls -- Add globstar support -- emit match events - -## 2.x - -- Use `glob.h` and `fnmatch.h` from NetBSD - -## 1.x - -- `glob.h` static binding. diff --git a/node_modules/glob/common.js b/node_modules/glob/common.js deleted file mode 100644 index 66651bb3..00000000 --- a/node_modules/glob/common.js +++ /dev/null @@ -1,240 +0,0 @@ -exports.alphasort = alphasort -exports.alphasorti = alphasorti -exports.setopts = setopts -exports.ownProp = ownProp -exports.makeAbs = makeAbs -exports.finish = finish -exports.mark = mark -exports.isIgnored = isIgnored -exports.childrenIgnored = childrenIgnored - -function ownProp (obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field) -} - -var path = require("path") -var minimatch = require("minimatch") -var isAbsolute = require("path-is-absolute") -var Minimatch = minimatch.Minimatch - -function alphasorti (a, b) { - return a.toLowerCase().localeCompare(b.toLowerCase()) -} - -function alphasort (a, b) { - return a.localeCompare(b) -} - -function setupIgnores (self, options) { - self.ignore = options.ignore || [] - - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore] - - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap) - } -} - -// ignore patterns are always in dot:true mode. -function ignoreMap (pattern) { - var gmatcher = null - if (pattern.slice(-3) === '/**') { - var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern, { dot: true }) - } - - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher: gmatcher - } -} - -function setopts (self, pattern, options) { - if (!options) - options = {} - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - self.silent = !!options.silent - self.pattern = pattern - self.strict = options.strict !== false - self.realpath = !!options.realpath - self.realpathCache = options.realpathCache || Object.create(null) - self.follow = !!options.follow - self.dot = !!options.dot - self.mark = !!options.mark - self.nodir = !!options.nodir - if (self.nodir) - self.mark = true - self.sync = !!options.sync - self.nounique = !!options.nounique - self.nonull = !!options.nonull - self.nosort = !!options.nosort - self.nocase = !!options.nocase - self.stat = !!options.stat - self.noprocess = !!options.noprocess - self.absolute = !!options.absolute - - self.maxLength = options.maxLength || Infinity - self.cache = options.cache || Object.create(null) - self.statCache = options.statCache || Object.create(null) - self.symlinks = options.symlinks || Object.create(null) - - setupIgnores(self, options) - - self.changedCwd = false - var cwd = process.cwd() - if (!ownProp(options, "cwd")) - self.cwd = cwd - else { - self.cwd = path.resolve(options.cwd) - self.changedCwd = self.cwd !== cwd - } - - self.root = options.root || path.resolve(self.cwd, "/") - self.root = path.resolve(self.root) - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/") - - // TODO: is an absolute `cwd` supposed to be resolved against `root`? - // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') - self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) - if (process.platform === "win32") - self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") - self.nomount = !!options.nomount - - // disable comments and negation in Minimatch. - // Note that they are not supported in Glob itself anyway. - options.nonegate = true - options.nocomment = true - - self.minimatch = new Minimatch(pattern, options) - self.options = self.minimatch.options -} - -function finish (self) { - var nou = self.nounique - var all = nou ? [] : Object.create(null) - - for (var i = 0, l = self.matches.length; i < l; i ++) { - var matches = self.matches[i] - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - // do like the shell, and spit out the literal glob - var literal = self.minimatch.globSet[i] - if (nou) - all.push(literal) - else - all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) - all.push.apply(all, m) - else - m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) - all = Object.keys(all) - - if (!self.nosort) - all = all.sort(self.nocase ? alphasorti : alphasort) - - // at *some* point we statted all of these - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]) - } - if (self.nodir) { - all = all.filter(function (e) { - var notDir = !(/\/$/.test(e)) - var c = self.cache[e] || self.cache[makeAbs(self, e)] - if (notDir && c) - notDir = c !== 'DIR' && !Array.isArray(c) - return notDir - }) - } - } - - if (self.ignore.length) - all = all.filter(function(m) { - return !isIgnored(self, m) - }) - - self.found = all -} - -function mark (self, p) { - var abs = makeAbs(self, p) - var c = self.cache[abs] - var m = p - if (c) { - var isDir = c === 'DIR' || Array.isArray(c) - var slash = p.slice(-1) === '/' - - if (isDir && !slash) - m += '/' - else if (!isDir && slash) - m = m.slice(0, -1) - - if (m !== p) { - var mabs = makeAbs(self, m) - self.statCache[mabs] = self.statCache[abs] - self.cache[mabs] = self.cache[abs] - } - } - - return m -} - -// lotta situps... -function makeAbs (self, f) { - var abs = f - if (f.charAt(0) === '/') { - abs = path.join(self.root, f) - } else if (isAbsolute(f) || f === '') { - abs = f - } else if (self.changedCwd) { - abs = path.resolve(self.cwd, f) - } else { - abs = path.resolve(f) - } - - if (process.platform === 'win32') - abs = abs.replace(/\\/g, '/') - - return abs -} - - -// Return true, if pattern ends with globstar '**', for the accompanying parent directory. -// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents -function isIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - -function childrenIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path)) - }) -} diff --git a/node_modules/glob/glob.js b/node_modules/glob/glob.js deleted file mode 100644 index 58dec0f6..00000000 --- a/node_modules/glob/glob.js +++ /dev/null @@ -1,790 +0,0 @@ -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern, false) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern, inGlobStar) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// -// If inGlobStar and PREFIX is symlink and points to dir -// set ENTRIES = [] -// else readdir(PREFIX) as ENTRIES -// If fail, END -// -// with ENTRIES -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// // Mark that this entry is a globstar match -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - -module.exports = glob - -var fs = require('fs') -var rp = require('fs.realpath') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var inherits = require('inherits') -var EE = require('events').EventEmitter -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var globSync = require('./sync.js') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var setopts = common.setopts -var ownProp = common.ownProp -var inflight = require('inflight') -var util = require('util') -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -var once = require('once') - -function glob (pattern, options, cb) { - if (typeof options === 'function') cb = options, options = {} - if (!options) options = {} - - if (options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return globSync(pattern, options) - } - - return new Glob(pattern, options, cb) -} - -glob.sync = globSync -var GlobSync = glob.GlobSync = globSync.GlobSync - -// old api surface -glob.glob = glob - -function extend (origin, add) { - if (add === null || typeof add !== 'object') { - return origin - } - - var keys = Object.keys(add) - var i = keys.length - while (i--) { - origin[keys[i]] = add[keys[i]] - } - return origin -} - -glob.hasMagic = function (pattern, options_) { - var options = extend({}, options_) - options.noprocess = true - - var g = new Glob(pattern, options) - var set = g.minimatch.set - - if (!pattern) - return false - - if (set.length > 1) - return true - - for (var j = 0; j < set[0].length; j++) { - if (typeof set[0][j] !== 'string') - return true - } - - return false -} - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - - if (options && options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return new GlobSync(pattern, options) - } - - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb) - - setopts(this, pattern, options) - this._didRealPath = false - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {<filename>: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - if (typeof cb === 'function') { - cb = once(cb) - this.on('error', cb) - this.on('end', function (matches) { - cb(null, matches) - }) - } - - var self = this - this._processing = 0 - - this._emitQueue = [] - this._processQueue = [] - this.paused = false - - if (this.noprocess) - return this - - if (n === 0) - return done() - - var sync = true - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false, done) - } - sync = false - - function done () { - --self._processing - if (self._processing <= 0) { - if (sync) { - process.nextTick(function () { - self._finish() - }) - } else { - self._finish() - } - } - } -} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - if (this.aborted) - return - - if (this.realpath && !this._didRealpath) - return this._realpath() - - common.finish(this) - this.emit('end', this.found) -} - -Glob.prototype._realpath = function () { - if (this._didRealpath) - return - - this._didRealpath = true - - var n = this.matches.length - if (n === 0) - return this._finish() - - var self = this - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next) - - function next () { - if (--n === 0) - self._finish() - } -} - -Glob.prototype._realpathSet = function (index, cb) { - var matchset = this.matches[index] - if (!matchset) - return cb() - - var found = Object.keys(matchset) - var self = this - var n = found.length - - if (n === 0) - return cb() - - var set = this.matches[index] = Object.create(null) - found.forEach(function (p, i) { - // If there's a problem with the stat, then it means that - // one or more of the links in the realpath couldn't be - // resolved. just return the abs value in that case. - p = self._makeAbs(p) - rp.realpath(p, self.realpathCache, function (er, real) { - if (!er) - set[real] = true - else if (er.syscall === 'stat') - set[p] = true - else - self.emit('error', er) // srsly wtf right here - - if (--n === 0) { - self.matches[index] = set - cb() - } - }) - }) -} - -Glob.prototype._mark = function (p) { - return common.mark(this, p) -} - -Glob.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit('abort') -} - -Glob.prototype.pause = function () { - if (!this.paused) { - this.paused = true - this.emit('pause') - } -} - -Glob.prototype.resume = function () { - if (this.paused) { - this.emit('resume') - this.paused = false - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0) - this._emitQueue.length = 0 - for (var i = 0; i < eq.length; i ++) { - var e = eq[i] - this._emitMatch(e[0], e[1]) - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0) - this._processQueue.length = 0 - for (var i = 0; i < pq.length; i ++) { - var p = pq[i] - this._processing-- - this._process(p[0], p[1], p[2], p[3]) - } - } - } -} - -Glob.prototype._process = function (pattern, index, inGlobStar, cb) { - assert(this instanceof Glob) - assert(typeof cb === 'function') - - if (this.aborted) - return - - this._processing++ - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]) - return - } - - //console.error('PROCESS %d', this._processing, pattern) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index, cb) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip _processing - if (childrenIgnored(this, read)) - return cb() - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) -} - -Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - -Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return cb() - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return cb() - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return cb() - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - this._process([e].concat(remain), index, inGlobStar, cb) - } - cb() -} - -Glob.prototype._emitMatch = function (index, e) { - if (this.aborted) - return - - if (isIgnored(this, e)) - return - - if (this.paused) { - this._emitQueue.push([index, e]) - return - } - - var abs = isAbsolute(e) ? e : this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) - e = abs - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - var st = this.statCache[abs] - if (st) - this.emit('stat', e, st) - - this.emit('match', e) -} - -Glob.prototype._readdirInGlobStar = function (abs, cb) { - if (this.aborted) - return - - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false, cb) - - var lstatkey = 'lstat\0' + abs - var self = this - var lstatcb = inflight(lstatkey, lstatcb_) - - if (lstatcb) - fs.lstat(abs, lstatcb) - - function lstatcb_ (er, lstat) { - if (er && er.code === 'ENOENT') - return cb() - - var isSym = lstat && lstat.isSymbolicLink() - self.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) { - self.cache[abs] = 'FILE' - cb() - } else - self._readdir(abs, false, cb) - } -} - -Glob.prototype._readdir = function (abs, inGlobStar, cb) { - if (this.aborted) - return - - cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) - if (!cb) - return - - //console.error('RD %j %j', +inGlobStar, abs) - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return cb() - - if (Array.isArray(c)) - return cb(null, c) - } - - var self = this - fs.readdir(abs, readdirCb(this, abs, cb)) -} - -function readdirCb (self, abs, cb) { - return function (er, entries) { - if (er) - self._readdirError(abs, er, cb) - else - self._readdirEntries(abs, entries, cb) - } -} - -Glob.prototype._readdirEntries = function (abs, entries, cb) { - if (this.aborted) - return - - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - return cb(null, entries) -} - -Glob.prototype._readdirError = function (f, er, cb) { - if (this.aborted) - return - - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - this.emit('error', error) - this.abort() - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) { - this.emit('error', er) - // If the error is handled, then we abort - // if not, we threw out of here - this.abort() - } - if (!this.silent) - console.error('glob error', er) - break - } - - return cb() -} - -Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - - -Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error('pgs2', prefix, remain[0], entries) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return cb() - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false, cb) - - var isSym = this.symlinks[abs] - var len = entries.length - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return cb() - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true, cb) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true, cb) - } - - cb() -} - -Glob.prototype._processSimple = function (prefix, index, cb) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var self = this - this._stat(prefix, function (er, exists) { - self._processSimple2(prefix, index, er, exists, cb) - }) -} -Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - - //console.error('ps2', prefix, exists) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return cb() - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) - cb() -} - -// Returns either 'DIR', 'FILE', or false -Glob.prototype._stat = function (f, cb) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return cb() - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return cb(null, c) - - if (needDir && c === 'FILE') - return cb() - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (stat !== undefined) { - if (stat === false) - return cb(null, stat) - else { - var type = stat.isDirectory() ? 'DIR' : 'FILE' - if (needDir && type === 'FILE') - return cb() - else - return cb(null, type, stat) - } - } - - var self = this - var statcb = inflight('stat\0' + abs, lstatcb_) - if (statcb) - fs.lstat(abs, statcb) - - function lstatcb_ (er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - // If it's a symlink, then treat it as the target, unless - // the target does not exist, then treat it as a file. - return fs.stat(abs, function (er, stat) { - if (er) - self._stat2(f, abs, null, lstat, cb) - else - self._stat2(f, abs, er, stat, cb) - }) - } else { - self._stat2(f, abs, er, lstat, cb) - } - } -} - -Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return cb() - } - - var needDir = f.slice(-1) === '/' - this.statCache[abs] = stat - - if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) - return cb(null, false, stat) - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return cb() - - return cb(null, c, stat) -} diff --git a/node_modules/glob/package.json b/node_modules/glob/package.json deleted file mode 100644 index 7b318235..00000000 --- a/node_modules/glob/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_from": "glob@7.1.3", - "_id": "glob@7.1.3", - "_inBundle": false, - "_integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "_location": "/glob", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "glob@7.1.3", - "name": "glob", - "escapedName": "glob", - "rawSpec": "7.1.3", - "saveSpec": null, - "fetchSpec": "7.1.3" - }, - "_requiredBy": [ - "/asciidoctor-opal-runtime", - "/glob-stream" - ], - "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "_shasum": "3960832d3f1574108342dafd3a67b332c0969df1", - "_spec": "glob@7.1.3", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/asciidoctor-opal-runtime", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/node-glob/issues" - }, - "bundleDependencies": false, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "deprecated": false, - "description": "a little globber", - "devDependencies": { - "mkdirp": "0", - "rimraf": "^2.2.8", - "tap": "^12.0.1", - "tick": "0.0.6" - }, - "engines": { - "node": "*" - }, - "files": [ - "glob.js", - "sync.js", - "common.js" - ], - "homepage": "https://github.com/isaacs/node-glob#readme", - "license": "ISC", - "main": "glob.js", - "name": "glob", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "scripts": { - "bench": "bash benchmark.sh", - "benchclean": "node benchclean.js", - "prepublish": "npm run benchclean", - "prof": "bash prof.sh && cat profile.txt", - "profclean": "rm -f v8.log profile.txt", - "test": "tap test/*.js --cov", - "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" - }, - "version": "7.1.3" -} diff --git a/node_modules/glob/sync.js b/node_modules/glob/sync.js deleted file mode 100644 index c952134b..00000000 --- a/node_modules/glob/sync.js +++ /dev/null @@ -1,486 +0,0 @@ -module.exports = globSync -globSync.GlobSync = GlobSync - -var fs = require('fs') -var rp = require('fs.realpath') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var Glob = require('./glob.js').Glob -var util = require('util') -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - return new GlobSync(pattern, options).found -} - -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') - - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) - - setopts(this, pattern, options) - - if (this.noprocess) - return this - - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) - } - this._finish() -} - -GlobSync.prototype._finish = function () { - assert(this instanceof GlobSync) - if (this.realpath) { - var self = this - this.matches.forEach(function (matchset, index) { - var set = self.matches[index] = Object.create(null) - for (var p in matchset) { - try { - p = self._makeAbs(p) - var real = rp.realpathSync(p, self.realpathCache) - set[real] = true - } catch (er) { - if (er.syscall === 'stat') - set[self._makeAbs(p)] = true - else - throw er - } - } - }) - } - common.finish(this) -} - - -GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert(this instanceof GlobSync) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // See if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip processing - if (childrenIgnored(this, read)) - return - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) -} - - -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) - } -} - - -GlobSync.prototype._emitMatch = function (index, e) { - if (isIgnored(this, e)) - return - - var abs = this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) { - e = abs - } - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - if (this.stat) - this._stat(e) -} - - -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) - - var entries - var lstat - var stat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - if (er.code === 'ENOENT') { - // lstat failed, doesn't exist - return null - } - } - - var isSym = lstat && lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} - -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries - - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null - - if (Array.isArray(c)) - return c - } - - try { - return this._readdirEntries(abs, fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} - -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - - // mark and cache dir-ness - return entries -} - -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - throw error - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) - throw er - if (!this.silent) - console.error('glob error', er) - break - } -} - -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - - var entries = this._readdir(abs, inGlobStar) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) - - var len = entries.length - var isSym = this.symlinks[abs] - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} - -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) -} - -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return false - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c - - if (needDir && c === 'FILE') - return false - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return false - } - } - - if (lstat && lstat.isSymbolicLink()) { - try { - stat = fs.statSync(abs) - } catch (er) { - stat = lstat - } - } else { - stat = lstat - } - } - - this.statCache[abs] = stat - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return false - - return c -} - -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} - -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} diff --git a/node_modules/graceful-fs/LICENSE b/node_modules/graceful-fs/LICENSE deleted file mode 100644 index 9d2c8036..00000000 --- a/node_modules/graceful-fs/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/graceful-fs/README.md b/node_modules/graceful-fs/README.md deleted file mode 100644 index 5273a50a..00000000 --- a/node_modules/graceful-fs/README.md +++ /dev/null @@ -1,133 +0,0 @@ -# graceful-fs - -graceful-fs functions as a drop-in replacement for the fs module, -making various improvements. - -The improvements are meant to normalize behavior across different -platforms and environments, and to make filesystem access more -resilient to errors. - -## Improvements over [fs module](https://nodejs.org/api/fs.html) - -* Queues up `open` and `readdir` calls, and retries them once - something closes if there is an EMFILE error from too many file - descriptors. -* fixes `lchmod` for Node versions prior to 0.6.2. -* implements `fs.lutimes` if possible. Otherwise it becomes a noop. -* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or - `lchown` if the user isn't root. -* makes `lchmod` and `lchown` become noops, if not available. -* retries reading a file if `read` results in EAGAIN error. - -On Windows, it retries renaming a file for up to one second if `EACCESS` -or `EPERM` error occurs, likely because antivirus software has locked -the directory. - -## USAGE - -```javascript -// use just like fs -var fs = require('graceful-fs') - -// now go and do stuff with it... -fs.readFileSync('some-file-or-whatever') -``` - -## Global Patching - -If you want to patch the global fs module (or any other fs-like -module) you can do this: - -```javascript -// Make sure to read the caveat below. -var realFs = require('fs') -var gracefulFs = require('graceful-fs') -gracefulFs.gracefulify(realFs) -``` - -This should only ever be done at the top-level application layer, in -order to delay on EMFILE errors from any fs-using dependencies. You -should **not** do this in a library, because it can cause unexpected -delays in other parts of the program. - -## Changes - -This module is fairly stable at this point, and used by a lot of -things. That being said, because it implements a subtle behavior -change in a core part of the node API, even modest changes can be -extremely breaking, and the versioning is thus biased towards -bumping the major when in doubt. - -The main change between major versions has been switching between -providing a fully-patched `fs` module vs monkey-patching the node core -builtin, and the approach by which a non-monkey-patched `fs` was -created. - -The goal is to trade `EMFILE` errors for slower fs operations. So, if -you try to open a zillion files, rather than crashing, `open` -operations will be queued up and wait for something else to `close`. - -There are advantages to each approach. Monkey-patching the fs means -that no `EMFILE` errors can possibly occur anywhere in your -application, because everything is using the same core `fs` module, -which is patched. However, it can also obviously cause undesirable -side-effects, especially if the module is loaded multiple times. - -Implementing a separate-but-identical patched `fs` module is more -surgical (and doesn't run the risk of patching multiple times), but -also imposes the challenge of keeping in sync with the core module. - -The current approach loads the `fs` module, and then creates a -lookalike object that has all the same methods, except a few that are -patched. It is safe to use in all versions of Node from 0.8 through -7.0. - -### v4 - -* Do not monkey-patch the fs module. This module may now be used as a - drop-in dep, and users can opt into monkey-patching the fs builtin - if their app requires it. - -### v3 - -* Monkey-patch fs, because the eval approach no longer works on recent - node. -* fixed possible type-error throw if rename fails on windows -* verify that we *never* get EMFILE errors -* Ignore ENOSYS from chmod/chown -* clarify that graceful-fs must be used as a drop-in - -### v2.1.0 - -* Use eval rather than monkey-patching fs. -* readdir: Always sort the results -* win32: requeue a file if error has an OK status - -### v2.0 - -* A return to monkey patching -* wrap process.cwd - -### v1.1 - -* wrap readFile -* Wrap fs.writeFile. -* readdir protection -* Don't clobber the fs builtin -* Handle fs.read EAGAIN errors by trying again -* Expose the curOpen counter -* No-op lchown/lchmod if not implemented -* fs.rename patch only for win32 -* Patch fs.rename to handle AV software on Windows -* Close #4 Chown should not fail on einval or eperm if non-root -* Fix isaacs/fstream#1 Only wrap fs one time -* Fix #3 Start at 1024 max files, then back off on EMFILE -* lutimes that doens't blow up on Linux -* A full on-rewrite using a queue instead of just swallowing the EMFILE error -* Wrap Read/Write streams as well - -### 1.0 - -* Update engines for node 0.6 -* Be lstat-graceful on Windows -* first diff --git a/node_modules/graceful-fs/clone.js b/node_modules/graceful-fs/clone.js deleted file mode 100644 index dff3cc8c..00000000 --- a/node_modules/graceful-fs/clone.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict' - -module.exports = clone - -var getPrototypeOf = Object.getPrototypeOf || function (obj) { - return obj.__proto__ -} - -function clone (obj) { - if (obj === null || typeof obj !== 'object') - return obj - - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) } - else - var copy = Object.create(null) - - Object.getOwnPropertyNames(obj).forEach(function (key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) - }) - - return copy -} diff --git a/node_modules/graceful-fs/graceful-fs.js b/node_modules/graceful-fs/graceful-fs.js deleted file mode 100644 index e15042da..00000000 --- a/node_modules/graceful-fs/graceful-fs.js +++ /dev/null @@ -1,373 +0,0 @@ -var fs = require('fs') -var polyfills = require('./polyfills.js') -var legacy = require('./legacy-streams.js') -var clone = require('./clone.js') - -var util = require('util') - -/* istanbul ignore next - node 0.x polyfill */ -var gracefulQueue -var previousSymbol - -/* istanbul ignore else - node 0.x polyfill */ -if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { - gracefulQueue = Symbol.for('graceful-fs.queue') - // This is used in testing by future versions - previousSymbol = Symbol.for('graceful-fs.previous') -} else { - gracefulQueue = '___graceful-fs.queue' - previousSymbol = '___graceful-fs.previous' -} - -function noop () {} - -function publishQueue(context, queue) { - Object.defineProperty(context, gracefulQueue, { - get: function() { - return queue - } - }) -} - -var debug = noop -if (util.debuglog) - debug = util.debuglog('gfs4') -else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') - console.error(m) - } - -// Once time initialization -if (!fs[gracefulQueue]) { - // This queue can be shared by multiple loaded instances - var queue = global[gracefulQueue] || [] - publishQueue(fs, queue) - - // Patch fs.close/closeSync to shared queue version, because we need - // to retry() whenever a close happens *anywhere* in the program. - // This is essential when multiple graceful-fs instances are - // in play at the same time. - fs.close = (function (fs$close) { - function close (fd, cb) { - return fs$close.call(fs, fd, function (err) { - // This function uses the graceful-fs shared queue - if (!err) { - retry() - } - - if (typeof cb === 'function') - cb.apply(this, arguments) - }) - } - - Object.defineProperty(close, previousSymbol, { - value: fs$close - }) - return close - })(fs.close) - - fs.closeSync = (function (fs$closeSync) { - function closeSync (fd) { - // This function uses the graceful-fs shared queue - fs$closeSync.apply(fs, arguments) - retry() - } - - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }) - return closeSync - })(fs.closeSync) - - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug(fs[gracefulQueue]) - require('assert').equal(fs[gracefulQueue].length, 0) - }) - } -} - -if (!global[gracefulQueue]) { - publishQueue(global, fs[gracefulQueue]); -} - -module.exports = patch(clone(fs)) -if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { - module.exports = patch(fs) - fs.__patched = true; -} - -function patch (fs) { - // Everything that references the open() function needs to be in here - polyfills(fs) - fs.gracefulify = patch - - fs.createReadStream = createReadStream - fs.createWriteStream = createWriteStream - var fs$readFile = fs.readFile - fs.readFile = readFile - function readFile (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$readFile(path, options, cb) - - function go$readFile (path, options, cb) { - return fs$readFile(path, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readFile, [path, options, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } - - var fs$writeFile = fs.writeFile - fs.writeFile = writeFile - function writeFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$writeFile(path, data, options, cb) - - function go$writeFile (path, data, options, cb) { - return fs$writeFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$writeFile, [path, data, options, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } - - var fs$appendFile = fs.appendFile - if (fs$appendFile) - fs.appendFile = appendFile - function appendFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$appendFile(path, data, options, cb) - - function go$appendFile (path, data, options, cb) { - return fs$appendFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$appendFile, [path, data, options, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } - - var fs$copyFile = fs.copyFile - if (fs$copyFile) - fs.copyFile = copyFile - function copyFile (src, dest, flags, cb) { - if (typeof flags === 'function') { - cb = flags - flags = 0 - } - return fs$copyFile(src, dest, flags, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([fs$copyFile, [src, dest, flags, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - - var fs$readdir = fs.readdir - fs.readdir = readdir - function readdir (path, options, cb) { - var args = [path] - if (typeof options !== 'function') { - args.push(options) - } else { - cb = options - } - args.push(go$readdir$cb) - - return go$readdir(args) - - function go$readdir$cb (err, files) { - if (files && files.sort) - files.sort() - - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readdir, [args]]) - - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - } - } - - function go$readdir (args) { - return fs$readdir.apply(fs, args) - } - - if (process.version.substr(0, 4) === 'v0.8') { - var legStreams = legacy(fs) - ReadStream = legStreams.ReadStream - WriteStream = legStreams.WriteStream - } - - var fs$ReadStream = fs.ReadStream - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype) - ReadStream.prototype.open = ReadStream$open - } - - var fs$WriteStream = fs.WriteStream - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype) - WriteStream.prototype.open = WriteStream$open - } - - Object.defineProperty(fs, 'ReadStream', { - get: function () { - return ReadStream - }, - set: function (val) { - ReadStream = val - }, - enumerable: true, - configurable: true - }) - Object.defineProperty(fs, 'WriteStream', { - get: function () { - return WriteStream - }, - set: function (val) { - WriteStream = val - }, - enumerable: true, - configurable: true - }) - - // legacy names - var FileReadStream = ReadStream - Object.defineProperty(fs, 'FileReadStream', { - get: function () { - return FileReadStream - }, - set: function (val) { - FileReadStream = val - }, - enumerable: true, - configurable: true - }) - var FileWriteStream = WriteStream - Object.defineProperty(fs, 'FileWriteStream', { - get: function () { - return FileWriteStream - }, - set: function (val) { - FileWriteStream = val - }, - enumerable: true, - configurable: true - }) - - function ReadStream (path, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments) - } - - function ReadStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - if (that.autoClose) - that.destroy() - - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - that.read() - } - }) - } - - function WriteStream (path, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments) - } - - function WriteStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - that.destroy() - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - } - }) - } - - function createReadStream (path, options) { - return new fs.ReadStream(path, options) - } - - function createWriteStream (path, options) { - return new fs.WriteStream(path, options) - } - - var fs$open = fs.open - fs.open = open - function open (path, flags, mode, cb) { - if (typeof mode === 'function') - cb = mode, mode = null - - return go$open(path, flags, mode, cb) - - function go$open (path, flags, mode, cb) { - return fs$open(path, flags, mode, function (err, fd) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$open, [path, flags, mode, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } - - return fs -} - -function enqueue (elem) { - debug('ENQUEUE', elem[0].name, elem[1]) - fs[gracefulQueue].push(elem) -} - -function retry () { - var elem = fs[gracefulQueue].shift() - if (elem) { - debug('RETRY', elem[0].name, elem[1]) - elem[0].apply(null, elem[1]) - } -} diff --git a/node_modules/graceful-fs/legacy-streams.js b/node_modules/graceful-fs/legacy-streams.js deleted file mode 100644 index d617b50f..00000000 --- a/node_modules/graceful-fs/legacy-streams.js +++ /dev/null @@ -1,118 +0,0 @@ -var Stream = require('stream').Stream - -module.exports = legacy - -function legacy (fs) { - return { - ReadStream: ReadStream, - WriteStream: WriteStream - } - - function ReadStream (path, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path, options); - - Stream.call(this); - - var self = this; - - this.path = path; - this.fd = null; - this.readable = true; - this.paused = false; - - this.flags = 'r'; - this.mode = 438; /*=0666*/ - this.bufferSize = 64 * 1024; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.encoding) this.setEncoding(this.encoding); - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.end === undefined) { - this.end = Infinity; - } else if ('number' !== typeof this.end) { - throw TypeError('end must be a Number'); - } - - if (this.start > this.end) { - throw new Error('start must be <= end'); - } - - this.pos = this.start; - } - - if (this.fd !== null) { - process.nextTick(function() { - self._read(); - }); - return; - } - - fs.open(this.path, this.flags, this.mode, function (err, fd) { - if (err) { - self.emit('error', err); - self.readable = false; - return; - } - - self.fd = fd; - self.emit('open', fd); - self._read(); - }) - } - - function WriteStream (path, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path, options); - - Stream.call(this); - - this.path = path; - this.fd = null; - this.writable = true; - - this.flags = 'w'; - this.encoding = 'binary'; - this.mode = 438; /*=0666*/ - this.bytesWritten = 0; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.start < 0) { - throw new Error('start must be >= zero'); - } - - this.pos = this.start; - } - - this.busy = false; - this._queue = []; - - if (this.fd === null) { - this._open = fs.open; - this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); - this.flush(); - } - } -} diff --git a/node_modules/graceful-fs/package.json b/node_modules/graceful-fs/package.json deleted file mode 100644 index 1d3c44b4..00000000 --- a/node_modules/graceful-fs/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "graceful-fs@^4.0.0", - "_id": "graceful-fs@4.2.6", - "_inBundle": false, - "_integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", - "_location": "/graceful-fs", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "graceful-fs@^4.0.0", - "name": "graceful-fs", - "escapedName": "graceful-fs", - "rawSpec": "^4.0.0", - "saveSpec": null, - "fetchSpec": "^4.0.0" - }, - "_requiredBy": [ - "/fs-mkdirp-stream", - "/vinyl-fs", - "/vinyl-sourcemap" - ], - "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "_shasum": "ff040b2b0853b23c3d31027523706f1885d76bee", - "_spec": "graceful-fs@^4.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs", - "bugs": { - "url": "https://github.com/isaacs/node-graceful-fs/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A drop-in replacement for fs, making various improvements.", - "devDependencies": { - "import-fresh": "^2.0.0", - "mkdirp": "^0.5.0", - "rimraf": "^2.2.8", - "tap": "^12.7.0" - }, - "directories": { - "test": "test" - }, - "files": [ - "fs.js", - "graceful-fs.js", - "legacy-streams.js", - "polyfills.js", - "clone.js" - ], - "homepage": "https://github.com/isaacs/node-graceful-fs#readme", - "keywords": [ - "fs", - "module", - "reading", - "retry", - "retries", - "queue", - "error", - "errors", - "handling", - "EMFILE", - "EAGAIN", - "EINVAL", - "EPERM", - "EACCESS" - ], - "license": "ISC", - "main": "graceful-fs.js", - "name": "graceful-fs", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/node-graceful-fs.git" - }, - "scripts": { - "postpublish": "git push origin --follow-tags", - "posttest": "nyc report", - "postversion": "npm publish", - "preversion": "npm test", - "test": "nyc --silent node test.js | tap -c -" - }, - "version": "4.2.6" -} diff --git a/node_modules/graceful-fs/polyfills.js b/node_modules/graceful-fs/polyfills.js deleted file mode 100644 index 1287da1a..00000000 --- a/node_modules/graceful-fs/polyfills.js +++ /dev/null @@ -1,346 +0,0 @@ -var constants = require('constants') - -var origCwd = process.cwd -var cwd = null - -var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform - -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd -} -try { - process.cwd() -} catch (er) {} - -// This check is needed until node.js 12 is required -if (typeof process.chdir === 'function') { - var chdir = process.chdir - process.chdir = function (d) { - cwd = null - chdir.call(process, d) - } - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) -} - -module.exports = patch - -function patch (fs) { - // (re-)implement some things that are known busted or missing. - - // lchmod, broken prior to 0.6.2 - // back-port the fix here. - if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs) - } - - // lutimes implementation, or no-op - if (!fs.lutimes) { - patchLutimes(fs) - } - - // https://github.com/isaacs/node-graceful-fs/issues/4 - // Chown should not fail on einval or eperm if non-root. - // It should not fail on enosys ever, as this just indicates - // that a fs doesn't support the intended operation. - - fs.chown = chownFix(fs.chown) - fs.fchown = chownFix(fs.fchown) - fs.lchown = chownFix(fs.lchown) - - fs.chmod = chmodFix(fs.chmod) - fs.fchmod = chmodFix(fs.fchmod) - fs.lchmod = chmodFix(fs.lchmod) - - fs.chownSync = chownFixSync(fs.chownSync) - fs.fchownSync = chownFixSync(fs.fchownSync) - fs.lchownSync = chownFixSync(fs.lchownSync) - - fs.chmodSync = chmodFixSync(fs.chmodSync) - fs.fchmodSync = chmodFixSync(fs.fchmodSync) - fs.lchmodSync = chmodFixSync(fs.lchmodSync) - - fs.stat = statFix(fs.stat) - fs.fstat = statFix(fs.fstat) - fs.lstat = statFix(fs.lstat) - - fs.statSync = statFixSync(fs.statSync) - fs.fstatSync = statFixSync(fs.fstatSync) - fs.lstatSync = statFixSync(fs.lstatSync) - - // if lchmod/lchown do not exist, then make them no-ops - if (!fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - if (cb) process.nextTick(cb) - } - fs.lchmodSync = function () {} - } - if (!fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - if (cb) process.nextTick(cb) - } - fs.lchownSync = function () {} - } - - // on Windows, A/V software can lock the directory, causing this - // to fail with an EACCES or EPERM if the directory contains newly - // created files. Try again on failure, for up to 60 seconds. - - // Set the timeout this long because some Windows Anti-Virus, such as Parity - // bit9, may lock files for up to a minute, causing npm package install - // failures. Also, take care to yield the scheduler. Windows scheduling gives - // CPU to a busy looping process, which can cause the program causing the lock - // contention to be starved of CPU by node, so the contention doesn't resolve. - if (platform === "win32") { - fs.rename = (function (fs$rename) { return function (from, to, cb) { - var start = Date.now() - var backoff = 0; - fs$rename(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM") - && Date.now() - start < 60000) { - setTimeout(function() { - fs.stat(to, function (stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er) - }) - }, backoff) - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er) - }) - }})(fs.rename) - } - - // if read() returns EAGAIN, then just try it again. - fs.read = (function (fs$read) { - function read (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - - // This ensures `util.promisify` works as it does for native `fs.read`. - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read) - return read - })(fs.read) - - fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return fs$readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } - }})(fs.readSync) - - function patchLchmod (fs) { - fs.lchmod = function (path, mode, callback) { - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - if (callback) callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - if (callback) callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var threw = true - var ret - try { - ret = fs.fchmodSync(fd, mode) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - } - - function patchLutimes (fs) { - if (constants.hasOwnProperty("O_SYMLINK")) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - if (er) { - if (cb) cb(er) - return - } - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - if (cb) cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - var ret - var threw = true - try { - ret = fs.futimesSync(fd, at, mt) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - - } else { - fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } - fs.lutimesSync = function () {} - } - } - - function chmodFix (orig) { - if (!orig) return orig - return function (target, mode, cb) { - return orig.call(fs, target, mode, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chmodFixSync (orig) { - if (!orig) return orig - return function (target, mode) { - try { - return orig.call(fs, target, mode) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - - function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - function statFix (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - function callback (er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - if (cb) cb.apply(this, arguments) - } - return options ? orig.call(fs, target, options, callback) - : orig.call(fs, target, callback) - } - } - - function statFixSync (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options) { - var stats = options ? orig.call(fs, target, options) - : orig.call(fs, target) - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - return stats; - } - } - - // ENOSYS means that the fs doesn't support the op. Just ignore - // that, because it doesn't matter. - // - // if there's no getuid, or if getuid() is something other - // than 0, and the error is EINVAL or EPERM, then just ignore - // it. - // - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // - // When running as root, or if other types of errors are - // encountered, then it's strict. - function chownErOk (er) { - if (!er) - return true - - if (er.code === "ENOSYS") - return true - - var nonroot = !process.getuid || process.getuid() !== 0 - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true - } - - return false - } -} diff --git a/node_modules/gulp-vinyl-zip/.eslintrc b/node_modules/gulp-vinyl-zip/.eslintrc deleted file mode 100644 index 78a13ee1..00000000 --- a/node_modules/gulp-vinyl-zip/.eslintrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "env": { - "node": true - }, - "rules": { - "no-console": 0, - "no-cond-assign": 0, - "no-unused-vars": 1, - "no-extra-semi": "warn", - "semi": "warn" - }, - "extends": "eslint:recommended" -} \ No newline at end of file diff --git a/node_modules/gulp-vinyl-zip/.eslintrc.json b/node_modules/gulp-vinyl-zip/.eslintrc.json deleted file mode 100644 index 002dc701..00000000 --- a/node_modules/gulp-vinyl-zip/.eslintrc.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "standard", - "rules": { - "indent": ["error", "tab"], - "linebreak-style": ["error", "unix"], - "no-tabs": "off", - "semi": ["error", "always"], - "space-before-function-paren": ["error", { - "anonymous": "always", - "named": "never", - "asyncArrow": "always" - }], - "spaced-comment": "off" - } -} diff --git a/node_modules/gulp-vinyl-zip/.travis.yml b/node_modules/gulp-vinyl-zip/.travis.yml deleted file mode 100644 index 520a2ffa..00000000 --- a/node_modules/gulp-vinyl-zip/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -sudo: false -language: node_js -node_js: -- "6" -- "8" -- "10" -- "12" -script: -- npm run lint -- npm test diff --git a/node_modules/gulp-vinyl-zip/README.md b/node_modules/gulp-vinyl-zip/README.md deleted file mode 100644 index 8b909442..00000000 --- a/node_modules/gulp-vinyl-zip/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# gulp-vinyl-zip - -[![Build Status](https://travis-ci.org/joaomoreno/gulp-vinyl-zip.svg?branch=master)](https://travis-ci.org/joaomoreno/gulp-vinyl-zip) - -A library for creating and extracting ZIP archives from/to streams. - -Uses [yazl](https://github.com/thejoshwolfe/yazl) -and [yauzl](https://github.com/thejoshwolfe/yauzl). - -## Usage - -**Archive → Archive** - -```javascript -var gulp = require('gulp'); -var zip = require('gulp-vinyl-zip'); - -gulp.task('default', function () { - return zip.src('src.zip') - .pipe(/* knock yourself out */) - .pipe(zip.dest('out.zip')); -}); -``` - -or - -```javascript -var gulp = require('gulp'); -var zip = require('gulp-vinyl-zip'); - -gulp.task('default', function () { - return gulp.src('src.zip') - .pipe(zip.src()) - .pipe(/* knock yourself out */) - .pipe(zip.dest('out.zip')); -}); -``` - -**Archive → File System** - -```javascript -var gulp = require('gulp'); -var zip = require('gulp-vinyl-zip'); - -gulp.task('default', function () { - return zip.src('src.zip') - .pipe(/* knock yourself out */) - .pipe(gulp.dest('out')); -}); -``` - -**File System → Archive** - -```javascript -var gulp = require('gulp'); -var zip = require('gulp-vinyl-zip'); - -gulp.task('default', function () { - return gulp.src('src/**/*') - .pipe(/* knock yourself out */) - .pipe(zip.dest('out.zip')); -}); -``` - -**File System → Archive Stream → Disk** - -```javascript -var gulp = require('gulp'); -var zip = require('gulp-vinyl-zip').zip; // zip transform only - -gulp.task('default', function () { - return gulp.src('src/**/*') - .pipe(/* knock yourself out */) - .pipe(zip('out.zip')) - .pipe(/* knock your zip out */) - .pipe(gulp.dest('./')); -}); -``` diff --git a/node_modules/gulp-vinyl-zip/index.js b/node_modules/gulp-vinyl-zip/index.js deleted file mode 100644 index 36a6c743..00000000 --- a/node_modules/gulp-vinyl-zip/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -module.exports = { - src: require('./lib/src'), - zip: require('./lib/zip'), - dest: require('./lib/dest') -}; diff --git a/node_modules/gulp-vinyl-zip/lib/dest/index.js b/node_modules/gulp-vinyl-zip/lib/dest/index.js deleted file mode 100644 index 38625540..00000000 --- a/node_modules/gulp-vinyl-zip/lib/dest/index.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -var through = require('through2'); -var vfs = require('vinyl-fs'); -var zip = require('../zip'); -var path = require('path'); - -function dest(zipPath, opts) { - var input = zip(path.basename(zipPath), opts); - var output = vfs.dest(path.dirname(zipPath), opts); - - var stream = through.obj(function (file, enc, cb) { - input.write(file); - cb(); - }, function (cb) { - input.end(); - output.on('end', function () { - stream.end(); - cb(); - }); - }); - - input.pipe(output); - output.on('data', function (data) { - stream.push(data); - }); - - stream.resume(); - return stream; -} - -module.exports = dest; diff --git a/node_modules/gulp-vinyl-zip/lib/src/index.js b/node_modules/gulp-vinyl-zip/lib/src/index.js deleted file mode 100644 index 7c67bbe8..00000000 --- a/node_modules/gulp-vinyl-zip/lib/src/index.js +++ /dev/null @@ -1,134 +0,0 @@ -'use strict'; - -var fs = require('fs'); -var constants = fs.constants; -var yauzl = require('yauzl'); -var File = require('../vinyl-zip'); -var queue = require('queue'); -var through = require('through'); -var map = require('through2').obj; - -function modeFromEntry(entry) { - var attr = entry.externalFileAttributes >> 16 || 33188; - - // The following constants are not available on all platforms: - // 448 = constants.S_IRWXU, 56 = constants.S_IRWXG, 7 = constants.S_IRWXO - return [448, 56, 7] - .map(function (mask) { return attr & mask; }) - .reduce(function (a, b) { return a + b; }, attr & constants.S_IFMT); -} - -function mtimeFromEntry(entry) { - return yauzl.dosDateTimeToDate(entry.lastModFileDate, entry.lastModFileTime); -} - -function toStream(zip) { - var result = through(); - var q = queue(); - var didErr = false; - - q.on('error', function (err) { - didErr = true; - result.emit('error', err); - }); - - zip.on('entry', function (entry) { - if (didErr) { return; } - - var stat = new fs.Stats(); - stat.mode = modeFromEntry(entry); - stat.mtime = mtimeFromEntry(entry); - - // directories - if (/\/$/.test(entry.fileName)) { - stat.mode = (stat.mode & ~constants.S_IFMT) | constants.S_IFDIR; - } - - var file = { - path: entry.fileName, - stat: stat - }; - - if (stat.isFile()) { - if (entry.uncompressedSize === 0) { - file.contents = Buffer.alloc(0); - result.emit('data', new File(file)); - } else { - q.push(function (cb) { - zip.openReadStream(entry, function (err, readStream) { - if (err) { return cb(err); } - file.contents = readStream; - result.emit('data', new File(file)); - cb(); - }); - }); - - q.start(); - } - } else if (stat.isSymbolicLink()) { - q.push(function (cb) { - zip.openReadStream(entry, function (err, readStream) { - if (err) { return cb(err); } - file.symlink = ''; - readStream.on('data', function (c) { file.symlink += c; }); - readStream.on('error', cb); - readStream.on('end', function () { - result.emit('data', new File(file)); - cb(); - }); - }); - }); - - q.start(); - } else if (stat.isDirectory()) { - file.contents = null; - result.emit('data', new File(file)); - } else { - result.emit('data', new File(file)); - } - }); - - zip.on('end', function () { - if (didErr) { - return; - } - - if (q.length === 0) { - result.end(); - } else { - q.on('end', function () { - result.end(); - }); - } - }); - - return result; -} - -function unzipFile(zipPath) { - var result = through(); - yauzl.open(zipPath, function (err, zip) { - if (err) { return result.emit('error', err); } - toStream(zip).pipe(result); - }); - return result; -} - -function unzip() { - return map(function (file, enc, next) { - if (!file.isBuffer()) return next(new Error('Only supports buffers')); - yauzl.fromBuffer(file.contents, (err, zip) => { - if (err) return this.emit('error', err); - toStream(zip) - .on('error', next) - .on('data', (data) => this.push(data)) - .on('end', next); - }); - }); -} - -function src(zipPath) { - return zipPath ? unzipFile(zipPath) : unzip(); -} - -module.exports = src; diff --git a/node_modules/gulp-vinyl-zip/lib/vinyl-zip.js b/node_modules/gulp-vinyl-zip/lib/vinyl-zip.js deleted file mode 100644 index bfb2c202..00000000 --- a/node_modules/gulp-vinyl-zip/lib/vinyl-zip.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var File = require('vinyl'); - -class ZipFile extends File { -} - -module.exports = ZipFile; diff --git a/node_modules/gulp-vinyl-zip/lib/zip/index.js b/node_modules/gulp-vinyl-zip/lib/zip/index.js deleted file mode 100644 index 80cd6729..00000000 --- a/node_modules/gulp-vinyl-zip/lib/zip/index.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - -var through = require('through2'); -var yazl = require('yazl'); -var File = require('../vinyl-zip'); - -function zip(zipPath, options) { - if (!zipPath) throw new Error('No zip path specified.'); - - options = options || {}; - - var zip = new yazl.ZipFile(); - var isEmpty = true; - - var stream = through.obj(function (file, enc, cb) { - var stat = file.stat || {}; - - var opts = { - mtime: stat.mtime, - mode: stat.mode - }; - - opts.compress = options.compress; - - var path = file.relative.replace(/\\/g, '/'); - - if (stat.isSymbolicLink && stat.isSymbolicLink()) { - zip.addBuffer(Buffer.from(file.symlink), path, opts); - } else if (file.isDirectory()) { - // In Windows, directories have a 666 permissions. This doesn't go well - // on OS X and Linux, where directories are expected to be 755. - if (/win32/.test(process.platform)) { - opts.mode = 16877; - } - - zip.addEmptyDirectory(path, opts); - } else if (file.isBuffer()) { - zip.addBuffer(file.contents, path, opts); - } else if (file.isStream()) { - zip.addReadStream(file.contents, path, opts); - } - - isEmpty = false; - cb(); - }, function (cb) { - if (isEmpty && options.unlessEmpty) { - return cb(); - } - - stream.push(new File({ path: zipPath, contents: zip.outputStream })); - zip.end(function () { - cb(); - }); - }); - - stream.resume(); - return stream; -} - -module.exports = zip; diff --git a/node_modules/gulp-vinyl-zip/package.json b/node_modules/gulp-vinyl-zip/package.json deleted file mode 100644 index d9c54e83..00000000 --- a/node_modules/gulp-vinyl-zip/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "_from": "gulp-vinyl-zip@~2.2", - "_id": "gulp-vinyl-zip@2.2.1", - "_inBundle": false, - "_integrity": "sha512-9lwCZUkrENzP649hVQB2r+8GgeGtVrqA2fEeVDX6aYr6+yJjdczWu0r1C6WvbZdzhXcA61MtR5MEyjR9a3D7cw==", - "_location": "/gulp-vinyl-zip", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "gulp-vinyl-zip@~2.2", - "name": "gulp-vinyl-zip", - "escapedName": "gulp-vinyl-zip", - "rawSpec": "~2.2", - "saveSpec": null, - "fetchSpec": "~2.2" - }, - "_requiredBy": [ - "/@antora/site-publisher", - "/@antora/ui-loader" - ], - "_resolved": "https://registry.npmjs.org/gulp-vinyl-zip/-/gulp-vinyl-zip-2.2.1.tgz", - "_shasum": "24a60230afeb3b88b1efba06d31653ef7145dfd8", - "_spec": "gulp-vinyl-zip@~2.2", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/site-publisher", - "author": { - "name": "João Moreno" - }, - "bugs": { - "url": "https://github.com/joaomoreno/gulp-vinyl-zip/issues" - }, - "bundleDependencies": false, - "dependencies": { - "queue": "^4.2.1", - "through": "^2.3.8", - "through2": "^2.0.3", - "vinyl": "^2.0.2", - "vinyl-fs": "^3.0.3", - "yauzl": "^2.2.1", - "yazl": "^2.2.1" - }, - "deprecated": false, - "description": "Streaming vinyl adapter for zip archives", - "devDependencies": { - "mocha": "^5.2.0", - "standard": "^12.0.1", - "temp": "^0.8.1" - }, - "homepage": "https://github.com/joaomoreno/gulp-vinyl-zip", - "keywords": [ - "gulp", - "gulpplugin", - "yazl", - "yazul", - "zip", - "streams", - "vinyl", - "vinyl-zip" - ], - "license": "MIT", - "main": "index.js", - "name": "gulp-vinyl-zip", - "repository": { - "type": "git", - "url": "git+https://github.com/joaomoreno/gulp-vinyl-zip.git" - }, - "scripts": { - "lint": "eslint lib test", - "test": "mocha" - }, - "version": "2.2.1" -} diff --git a/node_modules/gulp-vinyl-zip/test/assets/archive.zip b/node_modules/gulp-vinyl-zip/test/assets/archive.zip deleted file mode 100644 index 0de79dcf..00000000 Binary files a/node_modules/gulp-vinyl-zip/test/assets/archive.zip and /dev/null differ diff --git a/node_modules/gulp-vinyl-zip/test/tests.js b/node_modules/gulp-vinyl-zip/test/tests.js deleted file mode 100644 index 950166d8..00000000 --- a/node_modules/gulp-vinyl-zip/test/tests.js +++ /dev/null @@ -1,157 +0,0 @@ -'use strict'; - -/*global describe,it*/ - -var assert = require('assert'); -var fs = require('fs'); -var path = require('path'); -var through = require('through2'); -var temp = require('temp').track(); -var vfs = require('vinyl-fs'); -var lib = require('..'); - -describe('gulp-vinyl-zip', function () { - it('src should be able to read from archives', function (cb) { - var count = 0; - - lib.src(path.join(__dirname, 'assets', 'archive.zip')) - .pipe(through.obj(function (chunk, enc, cb) { - const filepath = chunk.path; - const filemode = chunk.stat.mode; - if (filepath === 'vinyl-zip.fs') { - assert.strictEqual(33188, filemode); - } else if (chunk.path === 'src/index.js') { - assert.strictEqual(33204, filemode); - } - count++; - cb(); - }, function () { - assert.strictEqual(7, count); - cb(); - })); - }); - - it('src should be able to read from archives in streams', function (cb) { - var count = 0; - - vfs.src(path.join(__dirname, 'assets', '*.zip')) - .pipe(lib.src()) - .pipe(through.obj(function (chunk, enc, cb) { - count++; - cb(); - }, function () { - assert.strictEqual(7, count); - cb(); - })); - }); - - it('src should emit error to stream', function (done) { - var message; - - vfs.src(__filename) - .pipe(lib.src()) - .on('error', function (err) { - message = err.message; - this.emit('end'); - }) - .pipe(through.obj((file, enc, next) => next(null, file), function () { this.emit('end'); })) - .on('end', () => { - assert.strictEqual('end of central directory record signature not found', message); - done(); - }); - }); - - it('dest should be able to create an archive from another archive', function (cb) { - var dest = temp.openSync('gulp-vinyl-zip-test').path; - - lib.src(path.join(__dirname, 'assets', 'archive.zip')) - .pipe(lib.dest(dest)) - .on('end', function () { - assert(fs.existsSync(dest)); - cb(); - }); - }); - - it('dest should be able to create an archive\'s directory tree', function (cb) { - var dest = temp.mkdirSync('gulp-vinyl-zip-test'); - var archive = path.join(dest, 'foo', 'bar', 'archive.zip'); - - lib.src(path.join(__dirname, 'assets', 'archive.zip')) - .pipe(lib.dest(archive)) - .on('end', function () { - assert(fs.existsSync(archive)); - cb(); - }); - }); - - it('should be compatible with vinyl-fs', function (cb) { - var dest = temp.mkdirSync('gulp-vinyl-zip-test'); - - lib.src(path.join(__dirname, 'assets', 'archive.zip')) - .pipe(vfs.dest(dest)) - .on('end', function () { - assert(fs.existsSync(dest)); - - assert.strictEqual(4, fs.readdirSync(dest).length); - cb(); - }); - }); - - it('dest should preserve stat', function (cb) { - var dest = temp.openSync('gulp-vinyl-zip-test').path; - var stats = Object.create(null); - - lib.src(path.join(__dirname, 'assets', 'archive.zip')) - .pipe(through.obj(function (file, enc, cb) { - assert(file.stat); - stats[file.path] = file.stat; - cb(null, file); - }, function (cb) { - this.emit('end'); - cb(); - })) - .pipe(lib.dest(dest)) - .on('end', function () { - var count = 0; - - lib.src(dest) - .pipe(through.obj(function (file, enc, cb) { - count++; - - if (stats[file.path].atime.valueOf() || file.stat.atime.valueOf()) { - assert.strictEqual(stats[file.path].atime.getTime(), file.stat.atime.getTime()); - } - - if (stats[file.path].ctime.valueOf() || file.stat.ctime.valueOf()) { - assert.strictEqual(stats[file.path].ctime.getTime(), file.stat.ctime.getTime()); - } - - if (stats[file.path].mtime.valueOf() || file.stat.mtime.valueOf()) { - assert.strictEqual(stats[file.path].mtime.getTime(), file.stat.mtime.getTime()); - } - - assert.strictEqual(stats[file.path].isFile(), file.stat.isFile()); - assert.strictEqual(stats[file.path].isDirectory(), file.stat.isDirectory()); - assert.strictEqual(stats[file.path].isSymbolicLink(), file.stat.isSymbolicLink()); - - cb(); - }, function () { - assert.strictEqual(7, count); - cb(); - })); - }); - }); - - it('dest should not assume files have `stat`', function (cb) { - var dest = temp.openSync('gulp-vinyl-zip-test').path; - - lib.src(path.join(__dirname, 'assets', 'archive.zip')) - .pipe(through.obj(function (chunk, enc, cb) { - delete chunk.stat; - this.push(chunk); - cb(); - })) - .pipe(lib.dest(dest)) - .on('end', cb); - }); -}); diff --git a/node_modules/handlebars/LICENSE b/node_modules/handlebars/LICENSE deleted file mode 100644 index 4d9d5806..00000000 --- a/node_modules/handlebars/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2011-2019 by Yehuda Katz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/handlebars/README.markdown b/node_modules/handlebars/README.markdown deleted file mode 100644 index 5450f9cd..00000000 --- a/node_modules/handlebars/README.markdown +++ /dev/null @@ -1,168 +0,0 @@ -[![Travis Build Status](https://img.shields.io/travis/wycats/handlebars.js/master.svg)](https://travis-ci.org/wycats/handlebars.js) -[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/github/wycats/handlebars.js?branch=master&svg=true)](https://ci.appveyor.com/project/wycats/handlebars-js) -[![Selenium Test Status](https://saucelabs.com/buildstatus/handlebars)](https://saucelabs.com/u/handlebars) - -Handlebars.js -============= - -Handlebars.js is an extension to the [Mustache templating -language](http://mustache.github.com/) created by Chris Wanstrath. -Handlebars.js and Mustache are both logicless templating languages that -keep the view and the code separated like we all know they should be. - -Checkout the official Handlebars docs site at -[https://handlebarsjs.com/](https://handlebarsjs.com) and the live demo at [http://tryhandlebarsjs.com/](http://tryhandlebarsjs.com/). - -Installing ----------- - -See our [installation documentation](https://handlebarsjs.com/installation/). - -Usage ------ -In general, the syntax of Handlebars.js templates is a superset -of Mustache templates. For basic syntax, check out the [Mustache -manpage](http://mustache.github.com/mustache.5.html). - -Once you have a template, use the `Handlebars.compile` method to compile -the template into a function. The generated function takes a context -argument, which will be used to render the template. - -```js -var source = "<p>Hello, my name is {{name}}. I am from {{hometown}}. I have " + - "{{kids.length}} kids:</p>" + - "<ul>{{#kids}}<li>{{name}} is {{age}}</li>{{/kids}}</ul>"; -var template = Handlebars.compile(source); - -var data = { "name": "Alan", "hometown": "Somewhere, TX", - "kids": [{"name": "Jimmy", "age": "12"}, {"name": "Sally", "age": "4"}]}; -var result = template(data); - -// Would render: -// <p>Hello, my name is Alan. I am from Somewhere, TX. I have 2 kids:</p> -// <ul> -// <li>Jimmy is 12</li> -// <li>Sally is 4</li> -// </ul> -``` - -Full documentation and more examples are at [handlebarsjs.com](https://handlebarsjs.com/). - -Precompiling Templates ----------------------- - -Handlebars allows templates to be precompiled and included as javascript code rather than the handlebars template allowing for faster startup time. Full details are located [here](https://handlebarsjs.com/installation/precompilation.html). - -Differences Between Handlebars.js and Mustache ----------------------------------------------- -Handlebars.js adds a couple of additional features to make writing -templates easier and also changes a tiny detail of how partials work. - -- [Nested Paths](https://handlebarsjs.com/guide/expressions.html#path-expressions) -- [Helpers](https://handlebarsjs.com/guide/expressions.html#helpers) -- [Block Expressions](https://handlebarsjs.com/guide/block-helpers.html#basic-blocks) -- [Literal Values](https://handlebarsjs.com/guide/expressions.html#literal-segments) -- [Delimited Comments](https://handlebarsjs.com/guide/#template-comments) - -Block expressions have the same syntax as mustache sections but should not be confused with one another. Sections are akin to an implicit `each` or `with` statement depending on the input data and helpers are explicit pieces of code that are free to implement whatever behavior they like. The [mustache spec](http://mustache.github.io/mustache.5.html) defines the exact behavior of sections. In the case of name conflicts, helpers are given priority. - -### Compatibility - -There are a few Mustache behaviors that Handlebars does not implement. -- Handlebars deviates from Mustache slightly in that it does not perform recursive lookup by default. The compile time `compat` flag must be set to enable this functionality. Users should note that there is a performance cost for enabling this flag. The exact cost varies by template, but it's recommended that performance sensitive operations should avoid this mode and instead opt for explicit path references. -- The optional Mustache-style lambdas are not supported. Instead Handlebars provides its own lambda resolution that follows the behaviors of helpers. -- Alternative delimiters are not supported. - - -Supported Environments ----------------------- - -Handlebars has been designed to work in any ECMAScript 3 environment. This includes - -- Node.js -- Chrome -- Firefox -- Safari 5+ -- Opera 11+ -- IE 6+ - -Older versions and other runtimes are likely to work but have not been formally -tested. The compiler requires `JSON.stringify` to be implemented natively or via a polyfill. If using the precompiler this is not necessary. - -[![Selenium Test Status](https://saucelabs.com/browser-matrix/handlebars.svg)](https://saucelabs.com/u/handlebars) - -Performance ------------ - -In a rough performance test, precompiled Handlebars.js templates (in -the original version of Handlebars.js) rendered in about half the -time of Mustache templates. It would be a shame if it were any other -way, since they were precompiled, but the difference in architecture -does have some big performance advantages. Justin Marney, a.k.a. -[gotascii](http://github.com/gotascii), confirmed that with an -[independent test](http://sorescode.com/2010/09/12/benchmarks.html). The -rewritten Handlebars (current version) is faster than the old version, -with many [performance tests](https://travis-ci.org/wycats/handlebars.js/builds/33392182#L538) being 5 to 7 times faster than the Mustache equivalent. - - -Upgrading ---------- - -See [release-notes.md](https://github.com/wycats/handlebars.js/blob/master/release-notes.md) for upgrade notes. - -Known Issues ------------- - -See [FAQ.md](https://github.com/wycats/handlebars.js/blob/master/FAQ.md) for known issues and common pitfalls. - - -Handlebars in the Wild ----------------------- - -* [Assemble](http://assemble.io), by [@jonschlinkert](https://github.com/jonschlinkert) - and [@doowb](https://github.com/doowb), is a static site generator that uses Handlebars.js - as its template engine. -* [Cory](https://github.com/leo/cory), by [@leo](https://github.com/leo), is another tiny static site generator -* [CoSchedule](http://coschedule.com) An editorial calendar for WordPress that uses Handlebars.js -* [dashbars](https://github.com/pismute/dashbars) A modern helper library for Handlebars.js. -* [Ember.js](http://www.emberjs.com) makes Handlebars.js the primary way to - structure your views, also with automatic data binding support. -* [Ghost](https://ghost.org/) Just a blogging platform. -* [handlebars_assets](http://github.com/leshill/handlebars_assets): A Rails Asset Pipeline gem - from Les Hill (@leshill). -* [handlebars-helpers](https://github.com/assemble/handlebars-helpers) is an extensive library - with 100+ handlebars helpers. -* [handlebars-layouts](https://github.com/shannonmoeller/handlebars-layouts) is a set of helpers which implement extendible and embeddable layout blocks as seen in other popular templating languages. -* [hbs](http://github.com/donpark/hbs): An Express.js view engine adapter for Handlebars.js, - from Don Park. -* [koa-hbs](https://github.com/jwilm/koa-hbs): [koa](https://github.com/koajs/koa) generator based - renderer for Handlebars.js. -* [jblotus](http://github.com/jblotus) created [http://tryhandlebarsjs.com](http://tryhandlebarsjs.com) - for anyone who would like to try out Handlebars.js in their browser. -* [jQuery plugin](http://71104.github.io/jquery-handlebars/): allows you to use - Handlebars.js with [jQuery](http://jquery.com/). -* [Lumbar](http://walmartlabs.github.io/lumbar) provides easy module-based template management for - handlebars projects. -* [Marionette.Handlebars](https://github.com/hashchange/marionette.handlebars) adds support for Handlebars and Mustache templates to Marionette. -* [sammy.js](http://github.com/quirkey/sammy) by Aaron Quint, a.k.a. quirkey, - supports Handlebars.js as one of its template plugins. -* [SproutCore](http://www.sproutcore.com) uses Handlebars.js as its main - templating engine, extending it with automatic data binding support. -* [YUI](http://yuilibrary.com/yui/docs/handlebars/) implements a port of handlebars -* [Swag](https://github.com/elving/swag) by [@elving](https://github.com/elving) is a growing collection of helpers for handlebars.js. Give your handlebars.js templates some swag son! -* [DOMBars](https://github.com/blakeembrey/dombars) is a DOM-based templating engine built on the Handlebars parser and runtime **DEPRECATED** -* [promised-handlebars](https://github.com/nknapp/promised-handlebars) is a wrapper for Handlebars that allows helpers to return Promises. -* [just-handlebars-helpers](https://github.com/leapfrogtechnology/just-handlebars-helpers) A fully tested lightweight package with common Handlebars helpers. - -External Resources ------------------- - -* [Gist about Synchronous and asynchronous loading of external handlebars templates](https://gist.github.com/2287070) - -Have a project using Handlebars? Send us a [pull request][pull-request]! - -License -------- -Handlebars.js is released under the MIT license. - -[pull-request]: https://github.com/wycats/handlebars.js/pull/new/master diff --git a/node_modules/handlebars/bin/.eslintrc.js b/node_modules/handlebars/bin/.eslintrc.js deleted file mode 100644 index ad6e812a..00000000 --- a/node_modules/handlebars/bin/.eslintrc.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - rules: { - 'no-console': 0, - 'no-var': 0 - } -}; diff --git a/node_modules/handlebars/bin/handlebars b/node_modules/handlebars/bin/handlebars deleted file mode 100755 index 7749121d..00000000 --- a/node_modules/handlebars/bin/handlebars +++ /dev/null @@ -1,176 +0,0 @@ -#!/usr/bin/env node - -var argv = parseArgs({ - 'f': { - 'type': 'string', - 'description': 'Output File', - 'alias': 'output' - }, - 'map': { - 'type': 'string', - 'description': 'Source Map File' - }, - 'a': { - 'type': 'boolean', - 'description': 'Exports amd style (require.js)', - 'alias': 'amd' - }, - 'c': { - 'type': 'string', - 'description': 'Exports CommonJS style, path to Handlebars module', - 'alias': 'commonjs', - 'default': null - }, - 'h': { - 'type': 'string', - 'description': 'Path to handlebar.js (only valid for amd-style)', - 'alias': 'handlebarPath', - 'default': '' - }, - 'k': { - 'type': 'string', - 'description': 'Known helpers', - 'alias': 'known' - }, - 'o': { - 'type': 'boolean', - 'description': 'Known helpers only', - 'alias': 'knownOnly' - }, - 'm': { - 'type': 'boolean', - 'description': 'Minimize output', - 'alias': 'min' - }, - 'n': { - 'type': 'string', - 'description': 'Template namespace', - 'alias': 'namespace', - 'default': 'Handlebars.templates' - }, - 's': { - 'type': 'boolean', - 'description': 'Output template function only.', - 'alias': 'simple' - }, - 'N': { - 'type': 'string', - 'description': 'Name of passed string templates. Optional if running in a simple mode. Required when operating on multiple templates.', - 'alias': 'name' - }, - 'i': { - 'type': 'string', - 'description': 'Generates a template from the passed CLI argument.\n"-" is treated as a special value and causes stdin to be read for the template value.', - 'alias': 'string' - }, - 'r': { - 'type': 'string', - 'description': 'Template root. Base value that will be stripped from template names.', - 'alias': 'root' - }, - 'p': { - 'type': 'boolean', - 'description': 'Compiling a partial template', - 'alias': 'partial' - }, - 'd': { - 'type': 'boolean', - 'description': 'Include data when compiling', - 'alias': 'data' - }, - 'e': { - 'type': 'string', - 'description': 'Template extension.', - 'alias': 'extension', - 'default': 'handlebars' - }, - 'b': { - 'type': 'boolean', - 'description': 'Removes the BOM (Byte Order Mark) from the beginning of the templates.', - 'alias': 'bom' - }, - 'v': { - 'type': 'boolean', - 'description': 'Prints the current compiler version', - 'alias': 'version' - }, - 'help': { - 'type': 'boolean', - 'description': 'Outputs this message' - } -}); - -argv.files = argv._; -delete argv._; - -var Precompiler = require('../dist/cjs/precompiler'); -Precompiler.loadTemplates(argv, function(err, opts) { - - if (err) { - throw err; - } - - if (opts.help || (!opts.templates.length && !opts.version)) { - printUsage(argv._spec, 120); - } else { - Precompiler.cli(opts); - } -}); - -function pad(n) { - var str = ''; - while (str.length < n) { - str += ' '; - } - return str; -} - -function parseArgs(spec) { - var opts = { alias: {}, boolean: [], default: {}, string: [] }; - - Object.keys(spec).forEach(function (arg) { - var opt = spec[arg]; - opts[opt.type].push(arg); - if ('alias' in opt) opts.alias[arg] = opt.alias; - if ('default' in opt) opts.default[arg] = opt.default; - }); - - var argv = require('minimist')(process.argv.slice(2), opts); - argv._spec = spec; - return argv; -} - -function printUsage(spec, wrap) { - var wordwrap = require('wordwrap'); - - console.log('Precompile handlebar templates.'); - console.log('Usage: handlebars [template|directory]...'); - - var opts = []; - var width = 0; - Object.keys(spec).forEach(function (arg) { - var opt = spec[arg]; - - var name = (arg.length === 1 ? '-' : '--') + arg; - if ('alias' in opt) name += ', --' + opt.alias; - - var meta = '[' + opt.type + ']'; - if ('default' in opt) meta += ' [default: ' + JSON.stringify(opt.default) + ']'; - - opts.push({ name: name, desc: opt.description, meta: meta }); - if (name.length > width) width = name.length; - }); - - console.log('Options:'); - opts.forEach(function (opt) { - var desc = wordwrap(width + 4, wrap + 1)(opt.desc); - - console.log(' %s%s%s%s%s', - opt.name, - pad(width - opt.name.length + 2), - desc.slice(width + 4), - pad(wrap - opt.meta.length - desc.split(/\n/).pop().length), - opt.meta - ); - }); -} diff --git a/node_modules/handlebars/dist/amd/handlebars.js b/node_modules/handlebars/dist/amd/handlebars.js deleted file mode 100644 index b9f29522..00000000 --- a/node_modules/handlebars/dist/amd/handlebars.js +++ /dev/null @@ -1,52 +0,0 @@ -define(['exports', 'module', './handlebars.runtime', './handlebars/compiler/ast', './handlebars/compiler/base', './handlebars/compiler/compiler', './handlebars/compiler/javascript-compiler', './handlebars/compiler/visitor', './handlebars/no-conflict'], function (exports, module, _handlebarsRuntime, _handlebarsCompilerAst, _handlebarsCompilerBase, _handlebarsCompilerCompiler, _handlebarsCompilerJavascriptCompiler, _handlebarsCompilerVisitor, _handlebarsNoConflict) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _runtime = _interopRequireDefault(_handlebarsRuntime); - - // Compiler imports - - var _AST = _interopRequireDefault(_handlebarsCompilerAst); - - var _JavaScriptCompiler = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler); - - var _Visitor = _interopRequireDefault(_handlebarsCompilerVisitor); - - var _noConflict = _interopRequireDefault(_handlebarsNoConflict); - - var _create = _runtime['default'].create; - function create() { - var hb = _create(); - - hb.compile = function (input, options) { - return _handlebarsCompilerCompiler.compile(input, options, hb); - }; - hb.precompile = function (input, options) { - return _handlebarsCompilerCompiler.precompile(input, options, hb); - }; - - hb.AST = _AST['default']; - hb.Compiler = _handlebarsCompilerCompiler.Compiler; - hb.JavaScriptCompiler = _JavaScriptCompiler['default']; - hb.Parser = _handlebarsCompilerBase.parser; - hb.parse = _handlebarsCompilerBase.parse; - hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing; - - return hb; - } - - var inst = create(); - inst.create = create; - - _noConflict['default'](inst); - - inst.Visitor = _Visitor['default']; - - inst['default'] = inst; - - module.exports = inst; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9oYW5kbGViYXJzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFlQSxNQUFJLE9BQU8sR0FBRyxvQkFBUSxNQUFNLENBQUM7QUFDN0IsV0FBUyxNQUFNLEdBQUc7QUFDaEIsUUFBSSxFQUFFLEdBQUcsT0FBTyxFQUFFLENBQUM7O0FBRW5CLE1BQUUsQ0FBQyxPQUFPLEdBQUcsVUFBUyxLQUFLLEVBQUUsT0FBTyxFQUFFO0FBQ3BDLGFBQU8sNEJBWFEsT0FBTyxDQVdQLEtBQUssRUFBRSxPQUFPLEVBQUUsRUFBRSxDQUFDLENBQUM7S0FDcEMsQ0FBQztBQUNGLE1BQUUsQ0FBQyxVQUFVLEdBQUcsVUFBUyxLQUFLLEVBQUUsT0FBTyxFQUFFO0FBQ3ZDLGFBQU8sNEJBZGlCLFVBQVUsQ0FjaEIsS0FBSyxFQUFFLE9BQU8sRUFBRSxFQUFFLENBQUMsQ0FBQztLQUN2Q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XG4iXX0= diff --git a/node_modules/handlebars/dist/amd/handlebars.runtime.js b/node_modules/handlebars/dist/amd/handlebars.runtime.js deleted file mode 100644 index e5311e83..00000000 --- a/node_modules/handlebars/dist/amd/handlebars.runtime.js +++ /dev/null @@ -1,44 +0,0 @@ -define(['exports', 'module', './handlebars/base', './handlebars/safe-string', './handlebars/exception', './handlebars/utils', './handlebars/runtime', './handlebars/no-conflict'], function (exports, module, _handlebarsBase, _handlebarsSafeString, _handlebarsException, _handlebarsUtils, _handlebarsRuntime, _handlebarsNoConflict) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - // Each of these augment the Handlebars object. No need to setup here. - // (This is done to easily share code between commonjs and browse envs) - - var _SafeString = _interopRequireDefault(_handlebarsSafeString); - - var _Exception = _interopRequireDefault(_handlebarsException); - - var _noConflict = _interopRequireDefault(_handlebarsNoConflict); - - // For compatibility and usage outside of module systems, make the Handlebars object a namespace - function create() { - var hb = new _handlebarsBase.HandlebarsEnvironment(); - - _handlebarsUtils.extend(hb, _handlebarsBase); - hb.SafeString = _SafeString['default']; - hb.Exception = _Exception['default']; - hb.Utils = _handlebarsUtils; - hb.escapeExpression = _handlebarsUtils.escapeExpression; - - hb.VM = _handlebarsRuntime; - hb.template = function (spec) { - return _handlebarsRuntime.template(spec, hb); - }; - - return hb; - } - - var inst = create(); - inst.create = create; - - _noConflict['default'](inst); - - inst['default'] = inst; - - module.exports = inst; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9oYW5kbGViYXJzLnJ1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFZQSxXQUFTLE1BQU0sR0FBRztBQUNoQixRQUFJLEVBQUUsR0FBRyxJQUFJLGdCQUFLLHFCQUFxQixFQUFFLENBQUM7O0FB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3J0IEV4Y2VwdGlvbiBmcm9tICcuL2hhbmRsZWJhcnMvZXhjZXB0aW9uJztcbmltcG9ydCAqIGFzIFV0aWxzIGZyb20gJy4vaGFuZGxlYmFycy91dGlscyc7XG5pbXBvcnQgKiBhcyBydW50aW1lIGZyb20gJy4vaGFuZGxlYmFycy9ydW50aW1lJztcblxuaW1wb3J0IG5vQ29uZmxpY3QgZnJvbSAnLi9oYW5kbGViYXJzL25vLWNvbmZsaWN0JztcblxuLy8gRm9yIGNvbXBhdGliaWxpdHkgYW5kIHVzYWdlIG91dHNpZGUgb2YgbW9kdWxlIHN5c3RlbXMsIG1ha2UgdGhlIEhhbmRsZWJhcnMgb2JqZWN0IGEgbmFtZXNwYWNlXG5mdW5jdGlvbiBjcmVhdGUoKSB7XG4gIGxldCBoYiA9IG5ldyBiYXNlLkhhbmRsZWJhcnNFbnZpcm9ubWVudCgpO1xuXG4gIFV0aWxzLmV4dGVuZChoYiwgYmFzZSk7XG4gIGhiLlNhZmVTdHJpbmcgPSBTYWZlU3RyaW5nO1xuICBoYi5FeGNlcHRpb24gPSBFeGNlcHRpb247XG4gIGhiLlV0aWxzID0gVXRpbHM7XG4gIGhiLmVzY2FwZUV4cHJlc3Npb24gPSBVdGlscy5lc2NhcGVFeHByZXNzaW9uO1xuXG4gIGhiLlZNID0gcnVudGltZTtcbiAgaGIudGVtcGxhdGUgPSBmdW5jdGlvbihzcGVjKSB7XG4gICAgcmV0dXJuIHJ1bnRpbWUudGVtcGxhdGUoc3BlYywgaGIpO1xuICB9O1xuXG4gIHJldHVybiBoYjtcbn1cblxubGV0IGluc3QgPSBjcmVhdGUoKTtcbmluc3QuY3JlYXRlID0gY3JlYXRlO1xuXG5ub0NvbmZsaWN0KGluc3QpO1xuXG5pbnN0WydkZWZhdWx0J10gPSBpbnN0O1xuXG5leHBvcnQgZGVmYXVsdCBpbnN0O1xuIl19 diff --git a/node_modules/handlebars/dist/amd/handlebars/base.js b/node_modules/handlebars/dist/amd/handlebars/base.js deleted file mode 100644 index a606a69c..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/base.js +++ /dev/null @@ -1,106 +0,0 @@ -define(['exports', './utils', './exception', './helpers', './decorators', './logger', './internal/proto-access'], function (exports, _utils, _exception, _helpers, _decorators, _logger, _internalProtoAccess) { - 'use strict'; - - exports.__esModule = true; - exports.HandlebarsEnvironment = HandlebarsEnvironment; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - var _logger2 = _interopRequireDefault(_logger); - - var VERSION = '4.7.7'; - exports.VERSION = VERSION; - var COMPILER_REVISION = 8; - exports.COMPILER_REVISION = COMPILER_REVISION; - var LAST_COMPATIBLE_COMPILER_REVISION = 7; - - exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION; - var REVISION_CHANGES = { - 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it - 2: '== 1.0.0-rc.3', - 3: '== 1.0.0-rc.4', - 4: '== 1.x.x', - 5: '== 2.0.0-alpha.x', - 6: '>= 2.0.0-beta.1', - 7: '>= 4.0.0 <4.3.0', - 8: '>= 4.3.0' - }; - - exports.REVISION_CHANGES = REVISION_CHANGES; - var objectType = '[object Object]'; - - function HandlebarsEnvironment(helpers, partials, decorators) { - this.helpers = helpers || {}; - this.partials = partials || {}; - this.decorators = decorators || {}; - - _helpers.registerDefaultHelpers(this); - _decorators.registerDefaultDecorators(this); - } - - HandlebarsEnvironment.prototype = { - constructor: HandlebarsEnvironment, - - logger: _logger2['default'], - log: _logger2['default'].log, - - registerHelper: function registerHelper(name, fn) { - if (_utils.toString.call(name) === objectType) { - if (fn) { - throw new _Exception['default']('Arg not supported with multiple helpers'); - } - _utils.extend(this.helpers, name); - } else { - this.helpers[name] = fn; - } - }, - unregisterHelper: function unregisterHelper(name) { - delete this.helpers[name]; - }, - - registerPartial: function registerPartial(name, partial) { - if (_utils.toString.call(name) === objectType) { - _utils.extend(this.partials, name); - } else { - if (typeof partial === 'undefined') { - throw new _Exception['default']('Attempting to register a partial called "' + name + '" as undefined'); - } - this.partials[name] = partial; - } - }, - unregisterPartial: function unregisterPartial(name) { - delete this.partials[name]; - }, - - registerDecorator: function registerDecorator(name, fn) { - if (_utils.toString.call(name) === objectType) { - if (fn) { - throw new _Exception['default']('Arg not supported with multiple decorators'); - } - _utils.extend(this.decorators, name); - } else { - this.decorators[name] = fn; - } - }, - unregisterDecorator: function unregisterDecorator(name) { - delete this.decorators[name]; - }, - /** - * Reset the memory of illegal property accesses that have already been logged. - * @deprecated should only be used in handlebars test-cases - */ - resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() { - _internalProtoAccess.resetLoggedProperties(); - } - }; - - var log = _logger2['default'].log; - - exports.log = log; - exports.createFrame = _utils.createFrame; - exports.logger = _logger2['default']; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztBQU9PLE1BQU0sT0FBTyxHQUFHLE9BQU8sQ0FBQzs7QUFDeEIsTUFBTSxpQkFBaUIsR0FBRyxDQUFDLENBQUM7O0FBQzVCLE1BQU0saUNBQWlDLEdBQUcsQ0FBQyxDQUFDOzs7QUFFNUMsTUFBTSxnQkFBZ0IsR0FBRztBQUM5QixLQUFDLEVBQUUsYUFBYTtBQUNoQixLQUFDLEVBQUUsZUFBZTtBQUNsQixLQUFDLEVBQUUsZUFBZTtBQUNsQixLQUFDLEVBQUUsVUFBVTtBQUNiLEtBQUMsRUFBRSxrQkFBa0I7QUFDckIsS0FBQyxFQUFFLGlCQUFpQjtBQUNwQixLQUFDLEVBQUUsaUJBQWlCO0FBQ3BCLEtBQUMsRUFBRSxVQUFVO0dBQ2QsQ0FBQzs7O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Y29yYXRvcjogZnVuY3Rpb24obmFtZSkge1xuICAgIGRlbGV0ZSB0aGlzLmRlY29yYXRvcnNbbmFtZV07XG4gIH0sXG4gIC8qKlxuICAgKiBSZXNldCB0aGUgbWVtb3J5IG9mIGlsbGVnYWwgcHJvcGVydHkgYWNjZXNzZXMgdGhhdCBoYXZlIGFscmVhZHkgYmVlbiBsb2dnZWQuXG4gICAqIEBkZXByZWNhdGVkIHNob3VsZCBvbmx5IGJlIHVzZWQgaW4gaGFuZGxlYmFycyB0ZXN0LWNhc2VzXG4gICAqL1xuICByZXNldExvZ2dlZFByb3BlcnR5QWNjZXNzZXMoKSB7XG4gICAgcmVzZXRMb2dnZWRQcm9wZXJ0aWVzKCk7XG4gIH1cbn07XG5cbmV4cG9ydCBsZXQgbG9nID0gbG9nZ2VyLmxvZztcblxuZXhwb3J0IHsgY3JlYXRlRnJhbWUsIGxvZ2dlciB9O1xuIl19 diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/ast.js b/node_modules/handlebars/dist/amd/handlebars/compiler/ast.js deleted file mode 100644 index a1a54a39..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/ast.js +++ /dev/null @@ -1,31 +0,0 @@ -define(['exports', 'module'], function (exports, module) { - 'use strict'; - - var AST = { - // Public API used to evaluate derived attributes regarding AST nodes - helpers: { - // a mustache is definitely a helper if: - // * it is an eligible helper, and - // * it has at least one parameter or hash segment - helperExpression: function helperExpression(node) { - return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash); - }, - - scopedId: function scopedId(path) { - return (/^\.|this\b/.test(path.original) - ); - }, - - // an ID is simple if it only has one part, and that part is not - // `..` or `this`. - simpleId: function simpleId(path) { - return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; - } - } - }; - - // Must be exported as an object rather than the root of the module as the jison lexer - // must modify the object to operate properly. - module.exports = AST; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ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VjdCByYXRoZXIgdGhhbiB0aGUgcm9vdCBvZiB0aGUgbW9kdWxlIGFzIHRoZSBqaXNvbiBsZXhlclxuLy8gbXVzdCBtb2RpZnkgdGhlIG9iamVjdCB0byBvcGVyYXRlIHByb3Blcmx5LlxuZXhwb3J0IGRlZmF1bHQgQVNUO1xuIl19 diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/base.js b/node_modules/handlebars/dist/amd/handlebars/compiler/base.js deleted file mode 100644 index caf20b62..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/base.js +++ /dev/null @@ -1,45 +0,0 @@ -define(['exports', './parser', './whitespace-control', './helpers', '../utils'], function (exports, _parser, _whitespaceControl, _helpers, _utils) { - 'use strict'; - - exports.__esModule = true; - exports.parseWithoutProcessing = parseWithoutProcessing; - exports.parse = parse; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _parser2 = _interopRequireDefault(_parser); - - var _WhitespaceControl = _interopRequireDefault(_whitespaceControl); - - exports.parser = _parser2['default']; - - var yy = {}; - _utils.extend(yy, _helpers); - - function parseWithoutProcessing(input, options) { - // Just return if an already-compiled AST was passed in. - if (input.type === 'Program') { - return input; - } - - _parser2['default'].yy = yy; - - // Altering the shared object here, but this is ok as parser is a sync operation - yy.locInfo = function (locInfo) { - return new yy.SourceLocation(options && options.srcName, locInfo); - }; - - var ast = _parser2['default'].parse(input); - - return ast; - } - - function parse(input, options) { - var ast = parseWithoutProcessing(input, options); - var strip = new _WhitespaceControl['default'](options); - - return strip.accept(ast); - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7VUFLUyxNQUFNOztBQUVmLE1BQUksRUFBRSxH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0aWxzJztcblxuZXhwb3J0IHsgcGFyc2VyIH07XG5cbmxldCB5eSA9IHt9O1xuZXh0ZW5kKHl5LCBIZWxwZXJzKTtcblxuZXhwb3J0IGZ1bmN0aW9uIHBhcnNlV2l0aG91dFByb2Nlc3NpbmcoaW5wdXQsIG9wdGlvbnMpIHtcbiAgLy8gSnVzdCByZXR1cm4gaWYgYW4gYWxyZWFkeS1jb21waWxlZCBBU1Qgd2FzIHBhc3NlZCBpbi5cbiAgaWYgKGlucHV0LnR5cGUgPT09ICdQcm9ncmFtJykge1xuICAgIHJldHVybiBpbnB1dDtcbiAgfVxuXG4gIHBhcnNlci55eSA9IHl5O1xuXG4gIC8vIEFsdGVyaW5nIHRoZSBzaGFyZWQgb2JqZWN0IGhlcmUsIGJ1dCB0aGlzIGlzIG9rIGFzIHBhcnNlciBpcyBhIHN5bmMgb3BlcmF0aW9uXG4gIHl5LmxvY0luZm8gPSBmdW5jdGlvbihsb2NJbmZvKSB7XG4gICAgcmV0dXJuIG5ldyB5eS5Tb3VyY2VMb2NhdGlvbihvcHRpb25zICYmIG9wdGlvbnMuc3JjTmFtZSwgbG9jSW5mbyk7XG4gIH07XG5cbiAgbGV0IGFzdCA9IHBhcnNlci5wYXJzZShpbnB1dCk7XG5cbiAgcmV0dXJuIGFzdDtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHBhcnNlKGlucHV0LCBvcHRpb25zKSB7XG4gIGxldCBhc3QgPSBwYXJzZVdpdGhvdXRQcm9jZXNzaW5nKGlucHV0LCBvcHRpb25zKTtcbiAgbGV0IHN0cmlwID0gbmV3IFdoaXRlc3BhY2VDb250cm9sKG9wdGlvbnMpO1xuXG4gIHJldHVybiBzdHJpcC5hY2NlcHQoYXN0KTtcbn1cbiJdfQ== diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/code-gen.js b/node_modules/handlebars/dist/amd/handlebars/compiler/code-gen.js deleted file mode 100644 index 19c798c3..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/code-gen.js +++ /dev/null @@ -1,165 +0,0 @@ -define(['exports', 'module', '../utils'], function (exports, module, _utils) { - /* global define */ - 'use strict'; - - var SourceNode = undefined; - - try { - /* istanbul ignore next */ - if (typeof define !== 'function' || !define.amd) { - // We don't support this in AMD environments. For these environments, we asusme that - // they are running on the browser and thus have no need for the source-map library. - var SourceMap = require('source-map'); - SourceNode = SourceMap.SourceNode; - } - } catch (err) {} - /* NOP */ - - /* istanbul ignore if: tested but not covered in istanbul due to dist build */ - if (!SourceNode) { - SourceNode = function (line, column, srcFile, chunks) { - this.src = ''; - if (chunks) { - this.add(chunks); - } - }; - /* istanbul ignore next */ - SourceNode.prototype = { - add: function add(chunks) { - if (_utils.isArray(chunks)) { - chunks = chunks.join(''); - } - this.src += chunks; - }, - prepend: function prepend(chunks) { - if (_utils.isArray(chunks)) { - chunks = chunks.join(''); - } - this.src = chunks + this.src; - }, - toStringWithSourceMap: function toStringWithSourceMap() { - return { code: this.toString() }; - }, - toString: function toString() { - return this.src; - } - }; - } - - function castChunk(chunk, codeGen, loc) { - if (_utils.isArray(chunk)) { - var ret = []; - - for (var i = 0, len = chunk.length; i < len; i++) { - ret.push(codeGen.wrap(chunk[i], loc)); - } - return ret; - } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { - // Handle primitives that the SourceNode will throw up on - return chunk + ''; - } - return chunk; - } - - function CodeGen(srcFile) { - this.srcFile = srcFile; - this.source = []; - } - - CodeGen.prototype = { - isEmpty: function isEmpty() { - return !this.source.length; - }, - prepend: function prepend(source, loc) { - this.source.unshift(this.wrap(source, loc)); - }, - push: function push(source, loc) { - this.source.push(this.wrap(source, loc)); - }, - - merge: function merge() { - var source = this.empty(); - this.each(function (line) { - source.add([' ', line, '\n']); - }); - return source; - }, - - each: function each(iter) { - for (var i = 0, len = this.source.length; i < len; i++) { - iter(this.source[i]); - } - }, - - empty: function empty() { - var loc = this.currentLocation || { start: {} }; - return new SourceNode(loc.start.line, loc.start.column, this.srcFile); - }, - wrap: function wrap(chunk) { - var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1]; - - if (chunk instanceof SourceNode) { - return chunk; - } - - chunk = castChunk(chunk, this, loc); - - return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); - }, - - functionCall: function functionCall(fn, type, params) { - params = this.generateList(params); - return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); - }, - - quotedString: function quotedString(str) { - return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 - .replace(/\u2029/g, '\\u2029') + '"'; - }, - - objectLiteral: function objectLiteral(obj) { - // istanbul ignore next - - var _this = this; - - var pairs = []; - - Object.keys(obj).forEach(function (key) { - var value = castChunk(obj[key], _this); - if (value !== 'undefined') { - pairs.push([_this.quotedString(key), ':', value]); - } - }); - - var ret = this.generateList(pairs); - ret.prepend('{'); - ret.add('}'); - return ret; - }, - - generateList: function generateList(entries) { - var ret = this.empty(); - - for (var i = 0, len = entries.length; i < len; i++) { - if (i) { - ret.add(','); - } - - ret.add(castChunk(entries[i], this)); - } - - return ret; - }, - - generateArray: function generateArray(entries) { - var ret = this.generateList(entries); - ret.prepend('['); - ret.add(']'); - - return ret; - } - }; - - module.exports = CodeGen; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2NvZGUtZ2VuLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFHQSxNQUFJLFVBQVUsWUFBQSxDQUFDOztBQUVmLE1BQUk7O0FBRUYsUUFBSSxPQUFPLE1BQU0sS0FBSyxVQUFVLElBQUksQ0FBQyxNQUFNLENBQUMsR0FBRyxFQUFFOzs7QUFHL0MsVUFBSSxTQ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IHRoaXMuZ2VuZXJhdGVMaXN0KHBhaXJzKTtcbiAgICByZXQucHJlcGVuZCgneycpO1xuICAgIHJldC5hZGQoJ30nKTtcbiAgICByZXR1cm4gcmV0O1xuICB9LFxuXG4gIGdlbmVyYXRlTGlzdDogZnVuY3Rpb24oZW50cmllcykge1xuICAgIGxldCByZXQgPSB0aGlzLmVtcHR5KCk7XG5cbiAgICBmb3IgKGxldCBpID0gMCwgbGVuID0gZW50cmllcy5sZW5ndGg7IGkgPCBsZW47IGkrKykge1xuICAgICAgaWYgKGkpIHtcbiAgICAgICAgcmV0LmFkZCgnLCcpO1xuICAgICAgfVxuXG4gICAgICByZXQuYWRkKGNhc3RDaHVuayhlbnRyaWVzW2ldLCB0aGlzKSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHJldDtcbiAgfSxcblxuICBnZW5lcmF0ZUFycmF5OiBmdW5jdGlvbihlbnRyaWVzKSB7XG4gICAgbGV0IHJldCA9IHRoaXMuZ2VuZXJhdGVMaXN0KGVudHJpZXMpO1xuICAgIHJldC5wcmVwZW5kKCdbJyk7XG4gICAgcmV0LmFkZCgnXScpO1xuXG4gICAgcmV0dXJuIHJldDtcbiAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29kZUdlbjtcbiJdfQ== diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/compiler.js b/node_modules/handlebars/dist/amd/handlebars/compiler/compiler.js deleted file mode 100644 index 5c258074..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/compiler.js +++ /dev/null @@ -1,562 +0,0 @@ -define(['exports', '../exception', '../utils', './ast'], function (exports, _exception, _utils, _ast) { - /* eslint-disable new-cap */ - - 'use strict'; - - exports.__esModule = true; - exports.Compiler = Compiler; - exports.precompile = precompile; - exports.compile = compile; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - var _AST = _interopRequireDefault(_ast); - - var slice = [].slice; - - function Compiler() {} - - // the foundHelper register will disambiguate helper lookup from finding a - // function in a context. This is necessary for mustache compatibility, which - // requires that context functions in blocks are evaluated by blockHelperMissing, - // and then proceed as if the resulting value was provided to blockHelperMissing. - - Compiler.prototype = { - compiler: Compiler, - - equals: function equals(other) { - var len = this.opcodes.length; - if (other.opcodes.length !== len) { - return false; - } - - for (var i = 0; i < len; i++) { - var opcode = this.opcodes[i], - otherOpcode = other.opcodes[i]; - if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { - return false; - } - } - - // We know that length is the same between the two arrays because they are directly tied - // to the opcode behavior above. - len = this.children.length; - for (var i = 0; i < len; i++) { - if (!this.children[i].equals(other.children[i])) { - return false; - } - } - - return true; - }, - - guid: 0, - - compile: function compile(program, options) { - this.sourceNode = []; - this.opcodes = []; - this.children = []; - this.options = options; - this.stringParams = options.stringParams; - this.trackIds = options.trackIds; - - options.blockParams = options.blockParams || []; - - options.knownHelpers = _utils.extend(Object.create(null), { - helperMissing: true, - blockHelperMissing: true, - each: true, - 'if': true, - unless: true, - 'with': true, - log: true, - lookup: true - }, options.knownHelpers); - - return this.accept(program); - }, - - compileProgram: function compileProgram(program) { - var childCompiler = new this.compiler(), - // eslint-disable-line new-cap - result = childCompiler.compile(program, this.options), - guid = this.guid++; - - this.usePartial = this.usePartial || result.usePartial; - - this.children[guid] = result; - this.useDepths = this.useDepths || result.useDepths; - - return guid; - }, - - accept: function accept(node) { - /* istanbul ignore next: Sanity code */ - if (!this[node.type]) { - throw new _Exception['default']('Unknown type: ' + node.type, node); - } - - this.sourceNode.unshift(node); - var ret = this[node.type](node); - this.sourceNode.shift(); - return ret; - }, - - Program: function Program(program) { - this.options.blockParams.unshift(program.blockParams); - - var body = program.body, - bodyLength = body.length; - for (var i = 0; i < bodyLength; i++) { - this.accept(body[i]); - } - - this.options.blockParams.shift(); - - this.isSimple = bodyLength === 1; - this.blockParams = program.blockParams ? program.blockParams.length : 0; - - return this; - }, - - BlockStatement: function BlockStatement(block) { - transformLiteralToPath(block); - - var program = block.program, - inverse = block.inverse; - - program = program && this.compileProgram(program); - inverse = inverse && this.compileProgram(inverse); - - var type = this.classifySexpr(block); - - if (type === 'helper') { - this.helperSexpr(block, program, inverse); - } else if (type === 'simple') { - this.simpleSexpr(block); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('blockValue', block.path.original); - } else { - this.ambiguousSexpr(block, program, inverse); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('ambiguousBlockValue'); - } - - this.opcode('append'); - }, - - DecoratorBlock: function DecoratorBlock(decorator) { - var program = decorator.program && this.compileProgram(decorator.program); - var params = this.setupFullMustacheParams(decorator, program, undefined), - path = decorator.path; - - this.useDecorators = true; - this.opcode('registerDecorator', params.length, path.original); - }, - - PartialStatement: function PartialStatement(partial) { - this.usePartial = true; - - var program = partial.program; - if (program) { - program = this.compileProgram(partial.program); - } - - var params = partial.params; - if (params.length > 1) { - throw new _Exception['default']('Unsupported number of partial arguments: ' + params.length, partial); - } else if (!params.length) { - if (this.options.explicitPartialContext) { - this.opcode('pushLiteral', 'undefined'); - } else { - params.push({ type: 'PathExpression', parts: [], depth: 0 }); - } - } - - var partialName = partial.name.original, - isDynamic = partial.name.type === 'SubExpression'; - if (isDynamic) { - this.accept(partial.name); - } - - this.setupFullMustacheParams(partial, program, undefined, true); - - var indent = partial.indent || ''; - if (this.options.preventIndent && indent) { - this.opcode('appendContent', indent); - indent = ''; - } - - this.opcode('invokePartial', isDynamic, partialName, indent); - this.opcode('append'); - }, - PartialBlockStatement: function PartialBlockStatement(partialBlock) { - this.PartialStatement(partialBlock); - }, - - MustacheStatement: function MustacheStatement(mustache) { - this.SubExpression(mustache); - - if (mustache.escaped && !this.options.noEscape) { - this.opcode('appendEscaped'); - } else { - this.opcode('append'); - } - }, - Decorator: function Decorator(decorator) { - this.DecoratorBlock(decorator); - }, - - ContentStatement: function ContentStatement(content) { - if (content.value) { - this.opcode('appendContent', content.value); - } - }, - - CommentStatement: function CommentStatement() {}, - - SubExpression: function SubExpression(sexpr) { - transformLiteralToPath(sexpr); - var type = this.classifySexpr(sexpr); - - if (type === 'simple') { - this.simpleSexpr(sexpr); - } else if (type === 'helper') { - this.helperSexpr(sexpr); - } else { - this.ambiguousSexpr(sexpr); - } - }, - ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { - var path = sexpr.path, - name = path.parts[0], - isBlock = program != null || inverse != null; - - this.opcode('getContext', path.depth); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - path.strict = true; - this.accept(path); - - this.opcode('invokeAmbiguous', name, isBlock); - }, - - simpleSexpr: function simpleSexpr(sexpr) { - var path = sexpr.path; - path.strict = true; - this.accept(path); - this.opcode('resolvePossibleLambda'); - }, - - helperSexpr: function helperSexpr(sexpr, program, inverse) { - var params = this.setupFullMustacheParams(sexpr, program, inverse), - path = sexpr.path, - name = path.parts[0]; - - if (this.options.knownHelpers[name]) { - this.opcode('invokeKnownHelper', params.length, name); - } else if (this.options.knownHelpersOnly) { - throw new _Exception['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); - } else { - path.strict = true; - path.falsy = true; - - this.accept(path); - this.opcode('invokeHelper', params.length, path.original, _AST['default'].helpers.simpleId(path)); - } - }, - - PathExpression: function PathExpression(path) { - this.addDepth(path.depth); - this.opcode('getContext', path.depth); - - var name = path.parts[0], - scoped = _AST['default'].helpers.scopedId(path), - blockParamId = !path.depth && !scoped && this.blockParamIndex(name); - - if (blockParamId) { - this.opcode('lookupBlockParam', blockParamId, path.parts); - } else if (!name) { - // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` - this.opcode('pushContext'); - } else if (path.data) { - this.options.data = true; - this.opcode('lookupData', path.depth, path.parts, path.strict); - } else { - this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped); - } - }, - - StringLiteral: function StringLiteral(string) { - this.opcode('pushString', string.value); - }, - - NumberLiteral: function NumberLiteral(number) { - this.opcode('pushLiteral', number.value); - }, - - BooleanLiteral: function BooleanLiteral(bool) { - this.opcode('pushLiteral', bool.value); - }, - - UndefinedLiteral: function UndefinedLiteral() { - this.opcode('pushLiteral', 'undefined'); - }, - - NullLiteral: function NullLiteral() { - this.opcode('pushLiteral', 'null'); - }, - - Hash: function Hash(hash) { - var pairs = hash.pairs, - i = 0, - l = pairs.length; - - this.opcode('pushHash'); - - for (; i < l; i++) { - this.pushParam(pairs[i].value); - } - while (i--) { - this.opcode('assignToHash', pairs[i].key); - } - this.opcode('popHash'); - }, - - // HELPERS - opcode: function opcode(name) { - this.opcodes.push({ - opcode: name, - args: slice.call(arguments, 1), - loc: this.sourceNode[0].loc - }); - }, - - addDepth: function addDepth(depth) { - if (!depth) { - return; - } - - this.useDepths = true; - }, - - classifySexpr: function classifySexpr(sexpr) { - var isSimple = _AST['default'].helpers.simpleId(sexpr.path); - - var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); - - // a mustache is an eligible helper if: - // * its id is simple (a single part, not `this` or `..`) - var isHelper = !isBlockParam && _AST['default'].helpers.helperExpression(sexpr); - - // if a mustache is an eligible helper but not a definite - // helper, it is ambiguous, and will be resolved in a later - // pass or at runtime. - var isEligible = !isBlockParam && (isHelper || isSimple); - - // if ambiguous, we can possibly resolve the ambiguity now - // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. - if (isEligible && !isHelper) { - var _name = sexpr.path.parts[0], - options = this.options; - if (options.knownHelpers[_name]) { - isHelper = true; - } else if (options.knownHelpersOnly) { - isEligible = false; - } - } - - if (isHelper) { - return 'helper'; - } else if (isEligible) { - return 'ambiguous'; - } else { - return 'simple'; - } - }, - - pushParams: function pushParams(params) { - for (var i = 0, l = params.length; i < l; i++) { - this.pushParam(params[i]); - } - }, - - pushParam: function pushParam(val) { - var value = val.value != null ? val.value : val.original || ''; - - if (this.stringParams) { - if (value.replace) { - value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); - } - - if (val.depth) { - this.addDepth(val.depth); - } - this.opcode('getContext', val.depth || 0); - this.opcode('pushStringParam', value, val.type); - - if (val.type === 'SubExpression') { - // SubExpressions get evaluated and passed in - // in string params mode. - this.accept(val); - } - } else { - if (this.trackIds) { - var blockParamIndex = undefined; - if (val.parts && !_AST['default'].helpers.scopedId(val) && !val.depth) { - blockParamIndex = this.blockParamIndex(val.parts[0]); - } - if (blockParamIndex) { - var blockParamChild = val.parts.slice(1).join('.'); - this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); - } else { - value = val.original || value; - if (value.replace) { - value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, ''); - } - - this.opcode('pushId', val.type, value); - } - } - this.accept(val); - } - }, - - setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { - var params = sexpr.params; - this.pushParams(params); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - if (sexpr.hash) { - this.accept(sexpr.hash); - } else { - this.opcode('emptyHash', omitEmpty); - } - - return params; - }, - - blockParamIndex: function blockParamIndex(name) { - for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { - var blockParams = this.options.blockParams[depth], - param = blockParams && _utils.indexOf(blockParams, name); - if (blockParams && param >= 0) { - return [depth, param]; - } - } - } - }; - - function precompile(input, options, env) { - if (input == null || typeof input !== 'string' && input.type !== 'Program') { - throw new _Exception['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); - } - - options = options || {}; - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - var ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options); - return new env.JavaScriptCompiler().compile(environment, options); - } - - function compile(input, options, env) { - if (options === undefined) options = {}; - - if (input == null || typeof input !== 'string' && input.type !== 'Program') { - throw new _Exception['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); - } - - options = _utils.extend({}, options); - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - var compiled = undefined; - - function compileInput() { - var ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options), - templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); - return env.template(templateSpec); - } - - // Template is only compiled on first use and cached after that point. - function ret(context, execOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled.call(this, context, execOptions); - } - ret._setup = function (setupOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._setup(setupOptions); - }; - ret._child = function (i, data, blockParams, depths) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._child(i, data, blockParams, depths); - }; - return ret; - } - - function argEquals(a, b) { - if (a === b) { - return true; - } - - if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { - for (var i = 0; i < a.length; i++) { - if (!argEquals(a[i], b[i])) { - return false; - } - } - return true; - } - } - - function transformLiteralToPath(sexpr) { - if (!sexpr.path.parts) { - var literal = sexpr.path; - // Casting to string here to make false and 0 literal values play nicely with the rest - // of the system. - sexpr.path = { - type: 'PathExpression', - data: false, - depth: 0, - parts: [literal.original + ''], - original: literal.original + '', - loc: literal.loc - }; - } - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2NvbXBpbGVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBTUEsTUFBTSxLQUFLLEdBQUcsRUFBRSxDQUFDLEtBQUssQ0FBQzs7QUFFaEIsV0FBUyxRQUFRLEdBQUcsRUFBRTs7Ozs7OztBQU83QixVQUFRLENBQUMsU0FBUyxHQUFHO0FBQ25CLFlBQVEsR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xzZSBhbmQgMCBsaXRlcmFsIHZhbHVlcyBwbGF5IG5pY2VseSB3aXRoIHRoZSByZXN0XG4gICAgLy8gb2YgdGhlIHN5c3RlbS5cbiAgICBzZXhwci5wYXRoID0ge1xuICAgICAgdHlwZTogJ1BhdGhFeHByZXNzaW9uJyxcbiAgICAgIGRhdGE6IGZhbHNlLFxuICAgICAgZGVwdGg6IDAsXG4gICAgICBwYXJ0czogW2xpdGVyYWwub3JpZ2luYWwgKyAnJ10sXG4gICAgICBvcmlnaW5hbDogbGl0ZXJhbC5vcmlnaW5hbCArICcnLFxuICAgICAgbG9jOiBsaXRlcmFsLmxvY1xuICAgIH07XG4gIH1cbn1cbiJdfQ== diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/helpers.js b/node_modules/handlebars/dist/amd/handlebars/compiler/helpers.js deleted file mode 100644 index a1eaaf2b..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/helpers.js +++ /dev/null @@ -1,228 +0,0 @@ -define(['exports', '../exception'], function (exports, _exception) { - 'use strict'; - - exports.__esModule = true; - exports.SourceLocation = SourceLocation; - exports.id = id; - exports.stripFlags = stripFlags; - exports.stripComment = stripComment; - exports.preparePath = preparePath; - exports.prepareMustache = prepareMustache; - exports.prepareRawBlock = prepareRawBlock; - exports.prepareBlock = prepareBlock; - exports.prepareProgram = prepareProgram; - exports.preparePartialBlock = preparePartialBlock; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - function validateClose(open, close) { - close = close.path ? close.path.original : close; - - if (open.path.original !== close) { - var errorNode = { loc: open.path.loc }; - - throw new _Exception['default'](open.path.original + " doesn't match " + close, errorNode); - } - } - - function SourceLocation(source, locInfo) { - this.source = source; - this.start = { - line: locInfo.first_line, - column: locInfo.first_column - }; - this.end = { - line: locInfo.last_line, - column: locInfo.last_column - }; - } - - function id(token) { - if (/^\[.*\]$/.test(token)) { - return token.substring(1, token.length - 1); - } else { - return token; - } - } - - function stripFlags(open, close) { - return { - open: open.charAt(2) === '~', - close: close.charAt(close.length - 3) === '~' - }; - } - - function stripComment(comment) { - return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, ''); - } - - function preparePath(data, parts, loc) { - loc = this.locInfo(loc); - - var original = data ? '@' : '', - dig = [], - depth = 0; - - for (var i = 0, l = parts.length; i < l; i++) { - var part = parts[i].part, - - // If we have [] syntax then we do not treat path references as operators, - // i.e. foo.[this] resolves to approximately context.foo['this'] - isLiteral = parts[i].original !== part; - original += (parts[i].separator || '') + part; - - if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { - if (dig.length > 0) { - throw new _Exception['default']('Invalid path: ' + original, { loc: loc }); - } else if (part === '..') { - depth++; - } - } else { - dig.push(part); - } - } - - return { - type: 'PathExpression', - data: data, - depth: depth, - parts: dig, - original: original, - loc: loc - }; - } - - function prepareMustache(path, params, hash, open, strip, locInfo) { - // Must use charAt to support IE pre-10 - var escapeFlag = open.charAt(3) || open.charAt(2), - escaped = escapeFlag !== '{' && escapeFlag !== '&'; - - var decorator = /\*/.test(open); - return { - type: decorator ? 'Decorator' : 'MustacheStatement', - path: path, - params: params, - hash: hash, - escaped: escaped, - strip: strip, - loc: this.locInfo(locInfo) - }; - } - - function prepareRawBlock(openRawBlock, contents, close, locInfo) { - validateClose(openRawBlock, close); - - locInfo = this.locInfo(locInfo); - var program = { - type: 'Program', - body: contents, - strip: {}, - loc: locInfo - }; - - return { - type: 'BlockStatement', - path: openRawBlock.path, - params: openRawBlock.params, - hash: openRawBlock.hash, - program: program, - openStrip: {}, - inverseStrip: {}, - closeStrip: {}, - loc: locInfo - }; - } - - function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { - if (close && close.path) { - validateClose(openBlock, close); - } - - var decorator = /\*/.test(openBlock.open); - - program.blockParams = openBlock.blockParams; - - var inverse = undefined, - inverseStrip = undefined; - - if (inverseAndProgram) { - if (decorator) { - throw new _Exception['default']('Unexpected inverse block on decorator', inverseAndProgram); - } - - if (inverseAndProgram.chain) { - inverseAndProgram.program.body[0].closeStrip = close.strip; - } - - inverseStrip = inverseAndProgram.strip; - inverse = inverseAndProgram.program; - } - - if (inverted) { - inverted = inverse; - inverse = program; - program = inverted; - } - - return { - type: decorator ? 'DecoratorBlock' : 'BlockStatement', - path: openBlock.path, - params: openBlock.params, - hash: openBlock.hash, - program: program, - inverse: inverse, - openStrip: openBlock.strip, - inverseStrip: inverseStrip, - closeStrip: close && close.strip, - loc: this.locInfo(locInfo) - }; - } - - function prepareProgram(statements, loc) { - if (!loc && statements.length) { - var firstLoc = statements[0].loc, - lastLoc = statements[statements.length - 1].loc; - - /* istanbul ignore else */ - if (firstLoc && lastLoc) { - loc = { - source: firstLoc.source, - start: { - line: firstLoc.start.line, - column: firstLoc.start.column - }, - end: { - line: lastLoc.end.line, - column: lastLoc.end.column - } - }; - } - } - - return { - type: 'Program', - body: statements, - strip: {}, - loc: loc - }; - } - - function preparePartialBlock(open, program, close, locInfo) { - validateClose(open, close); - - return { - type: 'PartialBlockStatement', - name: open.path, - params: open.params, - hash: open.hash, - program: program, - openStrip: open.strip, - closeStrip: close && close.strip, - loc: this.locInfo(locInfo) - }; - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2hlbHBlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFFQSxXQUFTLGFBQWEsQ0FBQyxJQUFJLEVBQUUsS0FBSyxFQUFFO0FBQ2xDLFNBQUssR0FBRyxLQUFLLENBQUMsSUFBSSxHQUFHLEtBQUssQ0FBQyxJQUFJLENBQUMsUUFBUSxHQUFHLEtBQUssQ0FBQzs7QUFFakQsUUFBSSxJQUFJLENBQUMsSUFBSSxDQU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zdExvYy5lbmQuY29sdW1uXG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHtcbiAgICB0eXBlOiAnUHJvZ3JhbScsXG4gICAgYm9keTogc3RhdGVtZW50cyxcbiAgICBzdHJpcDoge30sXG4gICAgbG9jOiBsb2NcbiAgfTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHByZXBhcmVQYXJ0aWFsQmxvY2sob3BlbiwgcHJvZ3JhbSwgY2xvc2UsIGxvY0luZm8pIHtcbiAgdmFsaWRhdGVDbG9zZShvcGVuLCBjbG9zZSk7XG5cbiAgcmV0dXJuIHtcbiAgICB0eXBlOiAnUGFydGlhbEJsb2NrU3RhdGVtZW50JyxcbiAgICBuYW1lOiBvcGVuLnBhdGgsXG4gICAgcGFyYW1zOiBvcGVuLnBhcmFtcyxcbiAgICBoYXNoOiBvcGVuLmhhc2gsXG4gICAgcHJvZ3JhbSxcbiAgICBvcGVuU3RyaXA6IG9wZW4uc3RyaXAsXG4gICAgY2xvc2VTdHJpcDogY2xvc2UgJiYgY2xvc2Uuc3RyaXAsXG4gICAgbG9jOiB0aGlzLmxvY0luZm8obG9jSW5mbylcbiAgfTtcbn1cbiJdfQ== diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js b/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js deleted file mode 100644 index 6e48e7ee..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js +++ /dev/null @@ -1,1151 +0,0 @@ -define(['exports', 'module', '../base', '../exception', '../utils', './code-gen'], function (exports, module, _base, _exception, _utils, _codeGen) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - var _CodeGen = _interopRequireDefault(_codeGen); - - function Literal(value) { - this.value = value; - } - - function JavaScriptCompiler() {} - - JavaScriptCompiler.prototype = { - // PUBLIC API: You can override these methods in a subclass to provide - // alternative compiled forms for name lookup and buffering semantics - nameLookup: function nameLookup(parent, name /*, type */) { - return this.internalNameLookup(parent, name); - }, - depthedLookup: function depthedLookup(name) { - return [this.aliasable('container.lookup'), '(depths, ', JSON.stringify(name), ')']; - }, - - compilerInfo: function compilerInfo() { - var revision = _base.COMPILER_REVISION, - versions = _base.REVISION_CHANGES[revision]; - return [revision, versions]; - }, - - appendToBuffer: function appendToBuffer(source, location, explicit) { - // Force a source as this simplifies the merge logic. - if (!_utils.isArray(source)) { - source = [source]; - } - source = this.source.wrap(source, location); - - if (this.environment.isSimple) { - return ['return ', source, ';']; - } else if (explicit) { - // This is a case where the buffer operation occurs as a child of another - // construct, generally braces. We have to explicitly output these buffer - // operations to ensure that the emitted code goes in the correct location. - return ['buffer += ', source, ';']; - } else { - source.appendToBuffer = true; - return source; - } - }, - - initializeBuffer: function initializeBuffer() { - return this.quotedString(''); - }, - // END PUBLIC API - internalNameLookup: function internalNameLookup(parent, name) { - this.lookupPropertyFunctionIsUsed = true; - return ['lookupProperty(', parent, ',', JSON.stringify(name), ')']; - }, - - lookupPropertyFunctionIsUsed: false, - - compile: function compile(environment, options, context, asObject) { - this.environment = environment; - this.options = options; - this.stringParams = this.options.stringParams; - this.trackIds = this.options.trackIds; - this.precompile = !asObject; - - this.name = this.environment.name; - this.isChild = !!context; - this.context = context || { - decorators: [], - programs: [], - environments: [] - }; - - this.preamble(); - - this.stackSlot = 0; - this.stackVars = []; - this.aliases = {}; - this.registers = { list: [] }; - this.hashes = []; - this.compileStack = []; - this.inlineStack = []; - this.blockParams = []; - - this.compileChildren(environment, options); - - this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat; - this.useBlockParams = this.useBlockParams || environment.useBlockParams; - - var opcodes = environment.opcodes, - opcode = undefined, - firstLoc = undefined, - i = undefined, - l = undefined; - - for (i = 0, l = opcodes.length; i < l; i++) { - opcode = opcodes[i]; - - this.source.currentLocation = opcode.loc; - firstLoc = firstLoc || opcode.loc; - this[opcode.opcode].apply(this, opcode.args); - } - - // Flush any trailing content that might be pending. - this.source.currentLocation = firstLoc; - this.pushSource(''); - - /* istanbul ignore next */ - if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { - throw new _Exception['default']('Compile completed with content left on stack'); - } - - if (!this.decorators.isEmpty()) { - this.useDecorators = true; - - this.decorators.prepend(['var decorators = container.decorators, ', this.lookupPropertyFunctionVarDeclaration(), ';\n']); - this.decorators.push('return fn;'); - - if (asObject) { - this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]); - } else { - this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n'); - this.decorators.push('}\n'); - this.decorators = this.decorators.merge(); - } - } else { - this.decorators = undefined; - } - - var fn = this.createFunctionContext(asObject); - if (!this.isChild) { - var ret = { - compiler: this.compilerInfo(), - main: fn - }; - - if (this.decorators) { - ret.main_d = this.decorators; // eslint-disable-line camelcase - ret.useDecorators = true; - } - - var _context = this.context; - var programs = _context.programs; - var decorators = _context.decorators; - - for (i = 0, l = programs.length; i < l; i++) { - if (programs[i]) { - ret[i] = programs[i]; - if (decorators[i]) { - ret[i + '_d'] = decorators[i]; - ret.useDecorators = true; - } - } - } - - if (this.environment.usePartial) { - ret.usePartial = true; - } - if (this.options.data) { - ret.useData = true; - } - if (this.useDepths) { - ret.useDepths = true; - } - if (this.useBlockParams) { - ret.useBlockParams = true; - } - if (this.options.compat) { - ret.compat = true; - } - - if (!asObject) { - ret.compiler = JSON.stringify(ret.compiler); - - this.source.currentLocation = { start: { line: 1, column: 0 } }; - ret = this.objectLiteral(ret); - - if (options.srcName) { - ret = ret.toStringWithSourceMap({ file: options.destName }); - ret.map = ret.map && ret.map.toString(); - } else { - ret = ret.toString(); - } - } else { - ret.compilerOptions = this.options; - } - - return ret; - } else { - return fn; - } - }, - - preamble: function preamble() { - // track the last context pushed into place to allow skipping the - // getContext opcode when it would be a noop - this.lastContext = 0; - this.source = new _CodeGen['default'](this.options.srcName); - this.decorators = new _CodeGen['default'](this.options.srcName); - }, - - createFunctionContext: function createFunctionContext(asObject) { - // istanbul ignore next - - var _this = this; - - var varDeclarations = ''; - - var locals = this.stackVars.concat(this.registers.list); - if (locals.length > 0) { - varDeclarations += ', ' + locals.join(', '); - } - - // Generate minimizer alias mappings - // - // When using true SourceNodes, this will update all references to the given alias - // as the source nodes are reused in situ. For the non-source node compilation mode, - // aliases will not be used, but this case is already being run on the client and - // we aren't concern about minimizing the template size. - var aliasCount = 0; - Object.keys(this.aliases).forEach(function (alias) { - var node = _this.aliases[alias]; - if (node.children && node.referenceCount > 1) { - varDeclarations += ', alias' + ++aliasCount + '=' + alias; - node.children[0] = 'alias' + aliasCount; - } - }); - - if (this.lookupPropertyFunctionIsUsed) { - varDeclarations += ', ' + this.lookupPropertyFunctionVarDeclaration(); - } - - var params = ['container', 'depth0', 'helpers', 'partials', 'data']; - - if (this.useBlockParams || this.useDepths) { - params.push('blockParams'); - } - if (this.useDepths) { - params.push('depths'); - } - - // Perform a second pass over the output to merge content when possible - var source = this.mergeSource(varDeclarations); - - if (asObject) { - params.push(source); - - return Function.apply(this, params); - } else { - return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); - } - }, - mergeSource: function mergeSource(varDeclarations) { - var isSimple = this.environment.isSimple, - appendOnly = !this.forceBuffer, - appendFirst = undefined, - sourceSeen = undefined, - bufferStart = undefined, - bufferEnd = undefined; - this.source.each(function (line) { - if (line.appendToBuffer) { - if (bufferStart) { - line.prepend(' + '); - } else { - bufferStart = line; - } - bufferEnd = line; - } else { - if (bufferStart) { - if (!sourceSeen) { - appendFirst = true; - } else { - bufferStart.prepend('buffer += '); - } - bufferEnd.add(';'); - bufferStart = bufferEnd = undefined; - } - - sourceSeen = true; - if (!isSimple) { - appendOnly = false; - } - } - }); - - if (appendOnly) { - if (bufferStart) { - bufferStart.prepend('return '); - bufferEnd.add(';'); - } else if (!sourceSeen) { - this.source.push('return "";'); - } - } else { - varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); - - if (bufferStart) { - bufferStart.prepend('return buffer + '); - bufferEnd.add(';'); - } else { - this.source.push('return buffer;'); - } - } - - if (varDeclarations) { - this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); - } - - return this.source.merge(); - }, - - lookupPropertyFunctionVarDeclaration: function lookupPropertyFunctionVarDeclaration() { - return '\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n '.trim(); - }, - - // [blockValue] - // - // On stack, before: hash, inverse, program, value - // On stack, after: return value of blockHelperMissing - // - // The purpose of this opcode is to take a block of the form - // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and - // replace it on the stack with the result of properly - // invoking blockHelperMissing. - blockValue: function blockValue(name) { - var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'), - params = [this.contextName(0)]; - this.setupHelperArgs(name, 0, params); - - var blockName = this.popStack(); - params.splice(1, 0, blockName); - - this.push(this.source.functionCall(blockHelperMissing, 'call', params)); - }, - - // [ambiguousBlockValue] - // - // On stack, before: hash, inverse, program, value - // Compiler value, before: lastHelper=value of last found helper, if any - // On stack, after, if no lastHelper: same as [blockValue] - // On stack, after, if lastHelper: value - ambiguousBlockValue: function ambiguousBlockValue() { - // We're being a bit cheeky and reusing the options value from the prior exec - var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'), - params = [this.contextName(0)]; - this.setupHelperArgs('', 0, params, true); - - this.flushInline(); - - var current = this.topStack(); - params.splice(1, 0, current); - - this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']); - }, - - // [appendContent] - // - // On stack, before: ... - // On stack, after: ... - // - // Appends the string value of `content` to the current buffer - appendContent: function appendContent(content) { - if (this.pendingContent) { - content = this.pendingContent + content; - } else { - this.pendingLocation = this.source.currentLocation; - } - - this.pendingContent = content; - }, - - // [append] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Coerces `value` to a String and appends it to the current buffer. - // - // If `value` is truthy, or 0, it is coerced into a string and appended - // Otherwise, the empty string is appended - append: function append() { - if (this.isInline()) { - this.replaceStack(function (current) { - return [' != null ? ', current, ' : ""']; - }); - - this.pushSource(this.appendToBuffer(this.popStack())); - } else { - var local = this.popStack(); - this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); - if (this.environment.isSimple) { - this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']); - } - } - }, - - // [appendEscaped] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Escape `value` and append it to the buffer - appendEscaped: function appendEscaped() { - this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')'])); - }, - - // [getContext] - // - // On stack, before: ... - // On stack, after: ... - // Compiler value, after: lastContext=depth - // - // Set the value of the `lastContext` compiler value to the depth - getContext: function getContext(depth) { - this.lastContext = depth; - }, - - // [pushContext] - // - // On stack, before: ... - // On stack, after: currentContext, ... - // - // Pushes the value of the current context onto the stack. - pushContext: function pushContext() { - this.pushStackLiteral(this.contextName(this.lastContext)); - }, - - // [lookupOnContext] - // - // On stack, before: ... - // On stack, after: currentContext[name], ... - // - // Looks up the value of `name` on the current context and pushes - // it onto the stack. - lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) { - var i = 0; - - if (!scoped && this.options.compat && !this.lastContext) { - // The depthed query is expected to handle the undefined logic for the root level that - // is implemented below, so we evaluate that directly in compat mode - this.push(this.depthedLookup(parts[i++])); - } else { - this.pushContext(); - } - - this.resolvePath('context', parts, i, falsy, strict); - }, - - // [lookupBlockParam] - // - // On stack, before: ... - // On stack, after: blockParam[name], ... - // - // Looks up the value of `parts` on the given block param and pushes - // it onto the stack. - lookupBlockParam: function lookupBlockParam(blockParamId, parts) { - this.useBlockParams = true; - - this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); - this.resolvePath('context', parts, 1); - }, - - // [lookupData] - // - // On stack, before: ... - // On stack, after: data, ... - // - // Push the data lookup operator - lookupData: function lookupData(depth, parts, strict) { - if (!depth) { - this.pushStackLiteral('data'); - } else { - this.pushStackLiteral('container.data(data, ' + depth + ')'); - } - - this.resolvePath('data', parts, 0, true, strict); - }, - - resolvePath: function resolvePath(type, parts, i, falsy, strict) { - // istanbul ignore next - - var _this2 = this; - - if (this.options.strict || this.options.assumeObjects) { - this.push(strictLookup(this.options.strict && strict, this, parts, type)); - return; - } - - var len = parts.length; - for (; i < len; i++) { - /* eslint-disable no-loop-func */ - this.replaceStack(function (current) { - var lookup = _this2.nameLookup(current, parts[i], type); - // We want to ensure that zero and false are handled properly if the context (falsy flag) - // needs to have the special handling for these values. - if (!falsy) { - return [' != null ? ', lookup, ' : ', current]; - } else { - // Otherwise we can use generic falsy handling - return [' && ', lookup]; - } - }); - /* eslint-enable no-loop-func */ - } - }, - - // [resolvePossibleLambda] - // - // On stack, before: value, ... - // On stack, after: resolved value, ... - // - // If the `value` is a lambda, replace it on the stack by - // the return value of the lambda - resolvePossibleLambda: function resolvePossibleLambda() { - this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); - }, - - // [pushStringParam] - // - // On stack, before: ... - // On stack, after: string, currentContext, ... - // - // This opcode is designed for use in string mode, which - // provides the string value of a parameter along with its - // depth rather than resolving it immediately. - pushStringParam: function pushStringParam(string, type) { - this.pushContext(); - this.pushString(type); - - // If it's a subexpression, the string result - // will be pushed after this opcode. - if (type !== 'SubExpression') { - if (typeof string === 'string') { - this.pushString(string); - } else { - this.pushStackLiteral(string); - } - } - }, - - emptyHash: function emptyHash(omitEmpty) { - if (this.trackIds) { - this.push('{}'); // hashIds - } - if (this.stringParams) { - this.push('{}'); // hashContexts - this.push('{}'); // hashTypes - } - this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); - }, - pushHash: function pushHash() { - if (this.hash) { - this.hashes.push(this.hash); - } - this.hash = { values: {}, types: [], contexts: [], ids: [] }; - }, - popHash: function popHash() { - var hash = this.hash; - this.hash = this.hashes.pop(); - - if (this.trackIds) { - this.push(this.objectLiteral(hash.ids)); - } - if (this.stringParams) { - this.push(this.objectLiteral(hash.contexts)); - this.push(this.objectLiteral(hash.types)); - } - - this.push(this.objectLiteral(hash.values)); - }, - - // [pushString] - // - // On stack, before: ... - // On stack, after: quotedString(string), ... - // - // Push a quoted version of `string` onto the stack - pushString: function pushString(string) { - this.pushStackLiteral(this.quotedString(string)); - }, - - // [pushLiteral] - // - // On stack, before: ... - // On stack, after: value, ... - // - // Pushes a value onto the stack. This operation prevents - // the compiler from creating a temporary variable to hold - // it. - pushLiteral: function pushLiteral(value) { - this.pushStackLiteral(value); - }, - - // [pushProgram] - // - // On stack, before: ... - // On stack, after: program(guid), ... - // - // Push a program expression onto the stack. This takes - // a compile-time guid and converts it into a runtime-accessible - // expression. - pushProgram: function pushProgram(guid) { - if (guid != null) { - this.pushStackLiteral(this.programExpression(guid)); - } else { - this.pushStackLiteral(null); - } - }, - - // [registerDecorator] - // - // On stack, before: hash, program, params..., ... - // On stack, after: ... - // - // Pops off the decorator's parameters, invokes the decorator, - // and inserts the decorator into the decorators list. - registerDecorator: function registerDecorator(paramSize, name) { - var foundDecorator = this.nameLookup('decorators', name, 'decorator'), - options = this.setupHelperArgs(name, paramSize); - - this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']); - }, - - // [invokeHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // Pops off the helper's parameters, invokes the helper, - // and pushes the helper's return value onto the stack. - // - // If the helper is not found, `helperMissing` is called. - invokeHelper: function invokeHelper(paramSize, name, isSimple) { - var nonHelper = this.popStack(), - helper = this.setupHelper(paramSize, name); - - var possibleFunctionCalls = []; - - if (isSimple) { - // direct call to helper - possibleFunctionCalls.push(helper.name); - } - // call a function from the input object - possibleFunctionCalls.push(nonHelper); - if (!this.options.strict) { - possibleFunctionCalls.push(this.aliasable('container.hooks.helperMissing')); - } - - var functionLookupCode = ['(', this.itemsSeparatedBy(possibleFunctionCalls, '||'), ')']; - var functionCall = this.source.functionCall(functionLookupCode, 'call', helper.callParams); - this.push(functionCall); - }, - - itemsSeparatedBy: function itemsSeparatedBy(items, separator) { - var result = []; - result.push(items[0]); - for (var i = 1; i < items.length; i++) { - result.push(separator, items[i]); - } - return result; - }, - // [invokeKnownHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // This operation is used when the helper is known to exist, - // so a `helperMissing` fallback is not required. - invokeKnownHelper: function invokeKnownHelper(paramSize, name) { - var helper = this.setupHelper(paramSize, name); - this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); - }, - - // [invokeAmbiguous] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of disambiguation - // - // This operation is used when an expression like `{{foo}}` - // is provided, but we don't know at compile-time whether it - // is a helper or a path. - // - // This operation emits more code than the other options, - // and can be avoided by passing the `knownHelpers` and - // `knownHelpersOnly` flags at compile-time. - invokeAmbiguous: function invokeAmbiguous(name, helperCall) { - this.useRegister('helper'); - - var nonHelper = this.popStack(); - - this.emptyHash(); - var helper = this.setupHelper(0, name, helperCall); - - var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); - - var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; - if (!this.options.strict) { - lookup[0] = '(helper = '; - lookup.push(' != null ? helper : ', this.aliasable('container.hooks.helperMissing')); - } - - this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']); - }, - - // [invokePartial] - // - // On stack, before: context, ... - // On stack after: result of partial invocation - // - // This operation pops off a context, invokes a partial with that context, - // and pushes the result of the invocation back. - invokePartial: function invokePartial(isDynamic, name, indent) { - var params = [], - options = this.setupParams(name, 1, params); - - if (isDynamic) { - name = this.popStack(); - delete options.name; - } - - if (indent) { - options.indent = JSON.stringify(indent); - } - options.helpers = 'helpers'; - options.partials = 'partials'; - options.decorators = 'container.decorators'; - - if (!isDynamic) { - params.unshift(this.nameLookup('partials', name, 'partial')); - } else { - params.unshift(name); - } - - if (this.options.compat) { - options.depths = 'depths'; - } - options = this.objectLiteral(options); - params.push(options); - - this.push(this.source.functionCall('container.invokePartial', '', params)); - }, - - // [assignToHash] - // - // On stack, before: value, ..., hash, ... - // On stack, after: ..., hash, ... - // - // Pops a value off the stack and assigns it to the current hash - assignToHash: function assignToHash(key) { - var value = this.popStack(), - context = undefined, - type = undefined, - id = undefined; - - if (this.trackIds) { - id = this.popStack(); - } - if (this.stringParams) { - type = this.popStack(); - context = this.popStack(); - } - - var hash = this.hash; - if (context) { - hash.contexts[key] = context; - } - if (type) { - hash.types[key] = type; - } - if (id) { - hash.ids[key] = id; - } - hash.values[key] = value; - }, - - pushId: function pushId(type, name, child) { - if (type === 'BlockParam') { - this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : '')); - } else if (type === 'PathExpression') { - this.pushString(name); - } else if (type === 'SubExpression') { - this.pushStackLiteral('true'); - } else { - this.pushStackLiteral('null'); - } - }, - - // HELPERS - - compiler: JavaScriptCompiler, - - compileChildren: function compileChildren(environment, options) { - var children = environment.children, - child = undefined, - compiler = undefined; - - for (var i = 0, l = children.length; i < l; i++) { - child = children[i]; - compiler = new this.compiler(); // eslint-disable-line new-cap - - var existing = this.matchExistingProgram(child); - - if (existing == null) { - this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children - var index = this.context.programs.length; - child.index = index; - child.name = 'program' + index; - this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); - this.context.decorators[index] = compiler.decorators; - this.context.environments[index] = child; - - this.useDepths = this.useDepths || compiler.useDepths; - this.useBlockParams = this.useBlockParams || compiler.useBlockParams; - child.useDepths = this.useDepths; - child.useBlockParams = this.useBlockParams; - } else { - child.index = existing.index; - child.name = 'program' + existing.index; - - this.useDepths = this.useDepths || existing.useDepths; - this.useBlockParams = this.useBlockParams || existing.useBlockParams; - } - } - }, - matchExistingProgram: function matchExistingProgram(child) { - for (var i = 0, len = this.context.environments.length; i < len; i++) { - var environment = this.context.environments[i]; - if (environment && environment.equals(child)) { - return environment; - } - } - }, - - programExpression: function programExpression(guid) { - var child = this.environment.children[guid], - programParams = [child.index, 'data', child.blockParams]; - - if (this.useBlockParams || this.useDepths) { - programParams.push('blockParams'); - } - if (this.useDepths) { - programParams.push('depths'); - } - - return 'container.program(' + programParams.join(', ') + ')'; - }, - - useRegister: function useRegister(name) { - if (!this.registers[name]) { - this.registers[name] = true; - this.registers.list.push(name); - } - }, - - push: function push(expr) { - if (!(expr instanceof Literal)) { - expr = this.source.wrap(expr); - } - - this.inlineStack.push(expr); - return expr; - }, - - pushStackLiteral: function pushStackLiteral(item) { - this.push(new Literal(item)); - }, - - pushSource: function pushSource(source) { - if (this.pendingContent) { - this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); - this.pendingContent = undefined; - } - - if (source) { - this.source.push(source); - } - }, - - replaceStack: function replaceStack(callback) { - var prefix = ['('], - stack = undefined, - createdStack = undefined, - usedLiteral = undefined; - - /* istanbul ignore next */ - if (!this.isInline()) { - throw new _Exception['default']('replaceStack on non-inline'); - } - - // We want to merge the inline statement into the replacement statement via ',' - var top = this.popStack(true); - - if (top instanceof Literal) { - // Literals do not need to be inlined - stack = [top.value]; - prefix = ['(', stack]; - usedLiteral = true; - } else { - // Get or create the current stack name for use by the inline - createdStack = true; - var _name = this.incrStack(); - - prefix = ['((', this.push(_name), ' = ', top, ')']; - stack = this.topStack(); - } - - var item = callback.call(this, stack); - - if (!usedLiteral) { - this.popStack(); - } - if (createdStack) { - this.stackSlot--; - } - this.push(prefix.concat(item, ')')); - }, - - incrStack: function incrStack() { - this.stackSlot++; - if (this.stackSlot > this.stackVars.length) { - this.stackVars.push('stack' + this.stackSlot); - } - return this.topStackName(); - }, - topStackName: function topStackName() { - return 'stack' + this.stackSlot; - }, - flushInline: function flushInline() { - var inlineStack = this.inlineStack; - this.inlineStack = []; - for (var i = 0, len = inlineStack.length; i < len; i++) { - var entry = inlineStack[i]; - /* istanbul ignore if */ - if (entry instanceof Literal) { - this.compileStack.push(entry); - } else { - var stack = this.incrStack(); - this.pushSource([stack, ' = ', entry, ';']); - this.compileStack.push(stack); - } - } - }, - isInline: function isInline() { - return this.inlineStack.length; - }, - - popStack: function popStack(wrapped) { - var inline = this.isInline(), - item = (inline ? this.inlineStack : this.compileStack).pop(); - - if (!wrapped && item instanceof Literal) { - return item.value; - } else { - if (!inline) { - /* istanbul ignore next */ - if (!this.stackSlot) { - throw new _Exception['default']('Invalid stack pop'); - } - this.stackSlot--; - } - return item; - } - }, - - topStack: function topStack() { - var stack = this.isInline() ? this.inlineStack : this.compileStack, - item = stack[stack.length - 1]; - - /* istanbul ignore if */ - if (item instanceof Literal) { - return item.value; - } else { - return item; - } - }, - - contextName: function contextName(context) { - if (this.useDepths && context) { - return 'depths[' + context + ']'; - } else { - return 'depth' + context; - } - }, - - quotedString: function quotedString(str) { - return this.source.quotedString(str); - }, - - objectLiteral: function objectLiteral(obj) { - return this.source.objectLiteral(obj); - }, - - aliasable: function aliasable(name) { - var ret = this.aliases[name]; - if (ret) { - ret.referenceCount++; - return ret; - } - - ret = this.aliases[name] = this.source.wrap(name); - ret.aliasable = true; - ret.referenceCount = 1; - - return ret; - }, - - setupHelper: function setupHelper(paramSize, name, blockHelper) { - var params = [], - paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); - var foundHelper = this.nameLookup('helpers', name, 'helper'), - callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : (container.nullContext || {})'); - - return { - params: params, - paramsInit: paramsInit, - name: foundHelper, - callParams: [callContext].concat(params) - }; - }, - - setupParams: function setupParams(helper, paramSize, params) { - var options = {}, - contexts = [], - types = [], - ids = [], - objectArgs = !params, - param = undefined; - - if (objectArgs) { - params = []; - } - - options.name = this.quotedString(helper); - options.hash = this.popStack(); - - if (this.trackIds) { - options.hashIds = this.popStack(); - } - if (this.stringParams) { - options.hashTypes = this.popStack(); - options.hashContexts = this.popStack(); - } - - var inverse = this.popStack(), - program = this.popStack(); - - // Avoid setting fn and inverse if neither are set. This allows - // helpers to do a check for `if (options.fn)` - if (program || inverse) { - options.fn = program || 'container.noop'; - options.inverse = inverse || 'container.noop'; - } - - // The parameters go on to the stack in order (making sure that they are evaluated in order) - // so we need to pop them off the stack in reverse order - var i = paramSize; - while (i--) { - param = this.popStack(); - params[i] = param; - - if (this.trackIds) { - ids[i] = this.popStack(); - } - if (this.stringParams) { - types[i] = this.popStack(); - contexts[i] = this.popStack(); - } - } - - if (objectArgs) { - options.args = this.source.generateArray(params); - } - - if (this.trackIds) { - options.ids = this.source.generateArray(ids); - } - if (this.stringParams) { - options.types = this.source.generateArray(types); - options.contexts = this.source.generateArray(contexts); - } - - if (this.options.data) { - options.data = 'data'; - } - if (this.useBlockParams) { - options.blockParams = 'blockParams'; - } - return options; - }, - - setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { - var options = this.setupParams(helper, paramSize, params); - options.loc = JSON.stringify(this.source.currentLocation); - options = this.objectLiteral(options); - if (useRegister) { - this.useRegister('options'); - params.push('options'); - return ['options=', options]; - } else if (params) { - params.push(options); - return ''; - } else { - return options; - } - } - }; - - (function () { - var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' '); - - var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; - - for (var i = 0, l = reservedWords.length; i < l; i++) { - compilerWords[reservedWords[i]] = true; - } - })(); - - /** - * @deprecated May be removed in the next major version - */ - JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { - return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); - }; - - function strictLookup(requireTerminal, compiler, parts, type) { - var stack = compiler.popStack(), - i = 0, - len = parts.length; - if (requireTerminal) { - len--; - } - - for (; i < len; i++) { - stack = compiler.nameLookup(stack, parts[i], type); - } - - if (requireTerminal) { - return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ', ', JSON.stringify(compiler.source.currentLocation), ' )']; - } else { - return stack; - } - } - - module.exports = JavaScriptCompiler; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2phdmFzY3JpcHQtY29tcGlsZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFLQSxXQUFTLE9BQU8sQ0FBQyxLQUFLLEVBQUU7QUFDdEIsUUFBSSxDQUFDLEtBQUssR0FBRyxLQUFLLENBQUM7R0FDcEI7O0FBRUQsV0FBUyxrQkFBa0IsR0FBRyxFQUFFOztBQUVoQyxvQkFBa0IsQ0FBQyxTQUFTLEdBQUc7OztBQUc3QixjQUFVLEVBQUUsb0JBQVMsTUFBTSxFQUFFLElBQUksZUFBZTtBQUM5QyxhQUFPLElBQUksQ0FBQyxrQkFBa0IsQ0FBQyxNQUFNLEVBQUUsSUFBSSxDQUFDLENBQUM7S0FDOUM7QUFDRCxpQkFBYSxFQUFFLHVCQUFTLElBQUksRUFBRTtBQUM1QixhQUFPLENBQ0wsSUFBSSxDQUFDLFNBQVMsQ0FBQyxrQkFBa0IsQ0FBQyxFQUNsQyxXQUFXLEVBQ1gsSUFBSSxDQUFDLFNBQV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VxuICAgICAgaWYgKHRoaXMub3B0aW9ucy5kYXRhKSB7XG4gICAgICAgIHJldC51c2VEYXRhID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLnVzZURlcHRocykge1xuICAgICAgICByZXQudXNlRGVwdGhzID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLnVzZUJsb2NrUGFyYW1zKSB7XG4gICAgICAgIHJldC51c2VCbG9ja1BhcmFtcyA9IHRydWU7XG4gICAgICB9XG4gICAgICBpZiAodGhpcy5vcHRpb25zLmNvbXBhdCkge1xuICAgICAgICByZXQuY29tcGF0ID0gdHJ1ZTtcbiAgICAgIH1cblxuICAgICAgaWYgKCFhc09iamVjdCkge1xuICAgICAgICByZXQuY29tcGlsZXIgPSBKU09OLnN0cmluZ2lmeShyZXQuY29tcGlsZXIpO1xuXG4gICAgICAgIHRoaXMuc291cmNlLmN1cnJlbnRMb2NhdGlvbiA9IHsgc3RhcnQ6IHsgbGluZTogMSwgY29sdW1uOiAwIH0gfTtcbiAgICAgICAgcmV0ID0gdGhpcy5vYmplY3RMaXRlcmFsKHJldCk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuc3JjTmFtZSkge1xuICAgICAgICAgIHJldCA9IHJldC50b1N0cmluZ1dpdGhTb3VyY2VNYXAoeyBmaWxlOiBvcHRpb25zLmRlc3ROYW1lIH0pO1xuICAgICAgICAgIHJldC5tYXAgPSByZXQubWFwICYmIHJldC5tYXAudG9TdHJpbmcoKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXQgPSByZXQudG9TdHJpbmcoKTtcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0LmNvbXBpbGVyT3B0aW9ucyA9IHRoaXMub3B0aW9ucztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHJldDtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGZuO1xuICAgIH1cbiAgfSxcblxuICB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ZSBzdGFjayBhbmQgYXNzaWducyBpdCB0byB0aGUgY3VycmVudCBoYXNoXG4gIGFzc2lnblRvSGFzaDogZnVuY3Rpb24oa2V5KSB7XG4gICAgbGV0IHZhbHVlID0gdGhpcy5wb3BTdGFjaygpLFxuICAgICAgY29udGV4dCxcbiAgICAgIHR5cGUsXG4gICAgICBpZDtcblxuICAgIGlmICh0aGlzLnRyYWNrSWRzKSB7XG4gICAgICBpZCA9IHRoaXMucG9wU3RhY2soKTtcbiAgICB9XG4gICAgaWYgKHRoaXMuc3RyaW5nUGFyYW1zKSB7XG4gICAgICB0eXBlID0gdGhpcy5wb3BTdGFjaygpO1xuICAgICAgY29udGV4dCA9IHRoaXMucG9wU3RhY2soKTtcbiAgICB9XG5cbiAgICBsZXQgaGFzaCA9IHRoaXMuaGFzaDtcbiAgICBpZiAoY29udGV4dCkge1xuICAgICAgaGFzaC5jb250ZXh0c1trZXldID0gY29udGV4dDtcbiAgICB9XG4gICAgaWYgKHR5cGUpIHtcbiAgICAgIGhhc2gudHlwZXNba2V5XSA9IHR5cGU7XG4gICAgfVxuICAgIGlmIChpZCkge1xuICAgICAgaGFzaC5pZHNba2V5XSA9IGlkO1xuICAgIH1cbiAgICBoYXNoLnZhbHVlc1trZXldID0gdmFsdWU7XG4gIH0sXG5cbiAgcHVzaElkOiBmdW5jdGlvbih0eXBlLCBuYW1lLCBjaGlsZCkge1xuICAgIGlmICh0eXBlID09PSAnQmxvY2tQYXJhbScpIHtcbiAgICAgIHRoaXMucHVzaFN0YWNrTGl0ZXJhbChcbiAgICAgICAgJ2Jsb2NrUGFyYW1zWycgK1xuICAgICAgICAgIG5hbWVbMF0gK1xuICAgICAgICAgICddLnBhdGhbJyArXG4gICAgICAgICAgbmFtZVsxXSArXG4gICAgICAgICAgJ10nICtcbiAgICAgICAgICAoY2hpbGQgPyAnICsgJyArIEpTT04uc3RyaW5naWZ5KCcuJyArIGNoaWxkKSA6ICcnKVxuICAgICAgKTtcbiAgICB9IGVsc2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gJyApJ1xuICAgIF07XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIHN0YWNrO1xuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IEphdmFTY3JpcHRDb21waWxlcjtcbiJdfQ== diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/parser.js b/node_modules/handlebars/dist/amd/handlebars/compiler/parser.js deleted file mode 100644 index 6f71d9a6..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/parser.js +++ /dev/null @@ -1,737 +0,0 @@ -define(["exports", "module"], function (exports, module) { - // File ignored in coverage tests via setting in .istanbul.yml - /* Jison generated parser */ - "use strict"; - - var handlebars = (function () { - var parser = { trace: function trace() {}, - yy: {}, - symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" }, - productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 0], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - - var $0 = $$.length - 1; - switch (yystate) { - case 1: - return $$[$0 - 1]; - break; - case 2: - this.$ = yy.prepareProgram($$[$0]); - break; - case 3: - this.$ = $$[$0]; - break; - case 4: - this.$ = $$[$0]; - break; - case 5: - this.$ = $$[$0]; - break; - case 6: - this.$ = $$[$0]; - break; - case 7: - this.$ = $$[$0]; - break; - case 8: - this.$ = $$[$0]; - break; - case 9: - this.$ = { - type: 'CommentStatement', - value: yy.stripComment($$[$0]), - strip: yy.stripFlags($$[$0], $$[$0]), - loc: yy.locInfo(this._$) - }; - - break; - case 10: - this.$ = { - type: 'ContentStatement', - original: $$[$0], - value: $$[$0], - loc: yy.locInfo(this._$) - }; - - break; - case 11: - this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); - break; - case 12: - this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; - break; - case 13: - this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); - break; - case 14: - this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); - break; - case 15: - this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 16: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 17: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 18: - this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; - break; - case 19: - var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), - program = yy.prepareProgram([inverse], $$[$0 - 1].loc); - program.chained = true; - - this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true }; - - break; - case 20: - this.$ = $$[$0]; - break; - case 21: - this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; - break; - case 22: - this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); - break; - case 23: - this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); - break; - case 24: - this.$ = { - type: 'PartialStatement', - name: $$[$0 - 3], - params: $$[$0 - 2], - hash: $$[$0 - 1], - indent: '', - strip: yy.stripFlags($$[$0 - 4], $$[$0]), - loc: yy.locInfo(this._$) - }; - - break; - case 25: - this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); - break; - case 26: - this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) }; - break; - case 27: - this.$ = $$[$0]; - break; - case 28: - this.$ = $$[$0]; - break; - case 29: - this.$ = { - type: 'SubExpression', - path: $$[$0 - 3], - params: $$[$0 - 2], - hash: $$[$0 - 1], - loc: yy.locInfo(this._$) - }; - - break; - case 30: - this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) }; - break; - case 31: - this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) }; - break; - case 32: - this.$ = yy.id($$[$0 - 1]); - break; - case 33: - this.$ = $$[$0]; - break; - case 34: - this.$ = $$[$0]; - break; - case 35: - this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) }; - break; - case 36: - this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) }; - break; - case 37: - this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) }; - break; - case 38: - this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) }; - break; - case 39: - this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) }; - break; - case 40: - this.$ = $$[$0]; - break; - case 41: - this.$ = $$[$0]; - break; - case 42: - this.$ = yy.preparePath(true, $$[$0], this._$); - break; - case 43: - this.$ = yy.preparePath(false, $$[$0], this._$); - break; - case 44: - $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2]; - break; - case 45: - this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; - break; - case 46: - this.$ = []; - break; - case 47: - $$[$0 - 1].push($$[$0]); - break; - case 48: - this.$ = []; - break; - case 49: - $$[$0 - 1].push($$[$0]); - break; - case 50: - this.$ = []; - break; - case 51: - $$[$0 - 1].push($$[$0]); - break; - case 58: - this.$ = []; - break; - case 59: - $$[$0 - 1].push($$[$0]); - break; - case 64: - this.$ = []; - break; - case 65: - $$[$0 - 1].push($$[$0]); - break; - case 70: - this.$ = []; - break; - case 71: - $$[$0 - 1].push($$[$0]); - break; - case 78: - this.$ = []; - break; - case 79: - $$[$0 - 1].push($$[$0]); - break; - case 82: - this.$ = []; - break; - case 83: - $$[$0 - 1].push($$[$0]); - break; - case 86: - this.$ = []; - break; - case 87: - $$[$0 - 1].push($$[$0]); - break; - case 90: - this.$ = []; - break; - case 91: - $$[$0 - 1].push($$[$0]); - break; - case 94: - this.$ = []; - break; - case 95: - $$[$0 - 1].push($$[$0]); - break; - case 98: - this.$ = [$$[$0]]; - break; - case 99: - $$[$0 - 1].push($$[$0]); - break; - case 100: - this.$ = [$$[$0]]; - break; - case 101: - $$[$0 - 1].push($$[$0]); - break; - } - }, - table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 15: [2, 48], 17: 39, 18: [2, 48] }, { 20: 41, 56: 40, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 44, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 45, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 41, 56: 48, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 49, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 50] }, { 72: [1, 35], 86: 51 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 52, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 53, 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 54, 47: [2, 54] }, { 28: 59, 43: 60, 44: [1, 58], 47: [2, 56] }, { 13: 62, 15: [1, 20], 18: [1, 61] }, { 33: [2, 86], 57: 63, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 64, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 65, 47: [1, 66] }, { 30: 67, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 68, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 69, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 70, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 74, 33: [2, 80], 50: 71, 63: 72, 64: 75, 65: [1, 43], 69: 73, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 79] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 50] }, { 20: 74, 53: 80, 54: [2, 84], 63: 81, 64: 75, 65: [1, 43], 69: 82, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 83, 47: [1, 66] }, { 47: [2, 55] }, { 4: 84, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 85, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 86, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 87, 47: [1, 66] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 74, 33: [2, 88], 58: 88, 63: 89, 64: 75, 65: [1, 43], 69: 90, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 91, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 92, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 31: 93, 33: [2, 60], 63: 94, 64: 75, 65: [1, 43], 69: 95, 70: 76, 71: 77, 72: [1, 78], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 66], 36: 96, 63: 97, 64: 75, 65: [1, 43], 69: 98, 70: 76, 71: 77, 72: [1, 78], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 22: 99, 23: [2, 52], 63: 100, 64: 75, 65: [1, 43], 69: 101, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 92], 62: 102, 63: 103, 64: 75, 65: [1, 43], 69: 104, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 105] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 106, 72: [1, 107], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 108], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 109] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 111, 46: 110, 47: [2, 76] }, { 33: [2, 70], 40: 112, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 113] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 74, 63: 115, 64: 75, 65: [1, 43], 67: 114, 68: [2, 96], 69: 116, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 117] }, { 32: 118, 33: [2, 62], 74: 119, 75: [1, 120] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 121, 74: 122, 75: [1, 120] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 123] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 124] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 108] }, { 20: 74, 63: 125, 64: 75, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 74, 33: [2, 72], 41: 126, 63: 127, 64: 75, 65: [1, 43], 69: 128, 70: 76, 71: 77, 72: [1, 78], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 129] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 130] }, { 33: [2, 63] }, { 72: [1, 132], 76: 131 }, { 33: [1, 133] }, { 33: [2, 69] }, { 15: [2, 12], 18: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 134, 74: 135, 75: [1, 120] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 137], 77: [1, 136] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 138] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], - defaultActions: { 4: [2, 1], 54: [2, 55], 56: [2, 20], 60: [2, 57], 73: [2, 81], 82: [2, 85], 86: [2, 18], 90: [2, 89], 101: [2, 53], 104: [2, 93], 110: [2, 19], 111: [2, 77], 116: [2, 97], 119: [2, 63], 122: [2, 69], 135: [2, 75], 136: [2, 32] }, - parseError: function parseError(str, hash) { - throw new Error(str); - }, - parse: function parse(input) { - var self = this, - stack = [0], - vstack = [null], - lstack = [], - table = this.table, - yytext = "", - yylineno = 0, - yyleng = 0, - recovering = 0, - TERROR = 2, - EOF = 1; - this.lexer.setInput(input); - this.lexer.yy = this.yy; - this.yy.lexer = this.lexer; - this.yy.parser = this; - if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; - var yyloc = this.lexer.yylloc; - lstack.push(yyloc); - var ranges = this.lexer.options && this.lexer.options.ranges; - if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = self.lexer.lex() || 1; - if (typeof token !== "number") { - token = self.symbols_[token] || token; - } - return token; - } - var symbol, - preErrorSymbol, - state, - action, - a, - r, - yyval = {}, - p, - len, - newState, - expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - if (!recovering) { - expected = []; - for (p in table[state]) if (this.terminals_[p] && p > 2) { - expected.push("'" + this.terminals_[p] + "'"); - } - if (this.lexer.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); - } - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) recovering--; - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; - if (ranges) { - yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; - } - r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - /* Jison generated lexer */ - var lexer = (function () { - var lexer = { EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - setInput: function setInput(input) { - this._input = input; - this._more = this._less = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; - if (this.options.ranges) this.yylloc.range = [0, 0]; - this.offset = 0; - return this; - }, - input: function input() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) this.yylloc.range[1]++; - - this._input = this._input.slice(1); - return ch; - }, - unput: function unput(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) this.yylineno -= lines.length - 1; - var r = this.yylloc.range; - - this.yylloc = { first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - return this; - }, - more: function more() { - this._more = true; - return this; - }, - less: function less(n) { - this.unput(this.match.slice(n)); - }, - pastInput: function pastInput() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, ""); - }, - upcomingInput: function upcomingInput() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - showPosition: function showPosition() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - next: function next() { - if (this.done) { - return this.EOF; - } - if (!this._input) this.done = true; - - var token, match, tempMatch, index, col, lines; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (!this.options.flex) break; - } - } - if (match) { - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) this.yylineno += lines.length; - this.yylloc = { first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) this.done = false; - if (token) return token;else return; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno }); - } - }, - lex: function lex() { - var r = this.next(); - if (typeof r !== 'undefined') { - return r; - } else { - return this.lex(); - } - }, - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - popState: function popState() { - return this.conditionStack.pop(); - }, - _currentRules: function _currentRules() { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - }, - topState: function topState() { - return this.conditionStack[this.conditionStack.length - 2]; - }, - pushState: function begin(condition) { - this.begin(condition); - } }; - lexer.options = {}; - lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - - function strip(start, end) { - return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start); - } - - var YYSTATE = YY_START; - switch ($avoiding_name_collisions) { - case 0: - if (yy_.yytext.slice(-2) === "\\\\") { - strip(0, 1); - this.begin("mu"); - } else if (yy_.yytext.slice(-1) === "\\") { - strip(0, 1); - this.begin("emu"); - } else { - this.begin("mu"); - } - if (yy_.yytext) return 15; - - break; - case 1: - return 15; - break; - case 2: - this.popState(); - return 15; - - break; - case 3: - this.begin('raw');return 15; - break; - case 4: - this.popState(); - // Should be using `this.topState()` below, but it currently - // returns the second top instead of the first top. Opened an - // issue about it at https://github.com/zaach/jison/issues/291 - if (this.conditionStack[this.conditionStack.length - 1] === 'raw') { - return 15; - } else { - strip(5, 9); - return 'END_RAW_BLOCK'; - } - - break; - case 5: - return 15; - break; - case 6: - this.popState(); - return 14; - - break; - case 7: - return 65; - break; - case 8: - return 68; - break; - case 9: - return 19; - break; - case 10: - this.popState(); - this.begin('raw'); - return 23; - - break; - case 11: - return 55; - break; - case 12: - return 60; - break; - case 13: - return 29; - break; - case 14: - return 47; - break; - case 15: - this.popState();return 44; - break; - case 16: - this.popState();return 44; - break; - case 17: - return 34; - break; - case 18: - return 39; - break; - case 19: - return 51; - break; - case 20: - return 48; - break; - case 21: - this.unput(yy_.yytext); - this.popState(); - this.begin('com'); - - break; - case 22: - this.popState(); - return 14; - - break; - case 23: - return 48; - break; - case 24: - return 73; - break; - case 25: - return 72; - break; - case 26: - return 72; - break; - case 27: - return 87; - break; - case 28: - // ignore whitespace - break; - case 29: - this.popState();return 54; - break; - case 30: - this.popState();return 33; - break; - case 31: - yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80; - break; - case 32: - yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80; - break; - case 33: - return 85; - break; - case 34: - return 82; - break; - case 35: - return 82; - break; - case 36: - return 83; - break; - case 37: - return 84; - break; - case 38: - return 81; - break; - case 39: - return 75; - break; - case 40: - return 77; - break; - case 41: - return 72; - break; - case 42: - yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72; - break; - case 43: - return 'INVALID'; - break; - case 44: - return 5; - break; - } - }; - lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/]; - lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } }; - return lexer; - })(); - parser.lexer = lexer; - function Parser() { - this.yy = {}; - }Parser.prototype = parser;parser.Parser = Parser; - return new Parser(); - })();module.exports = handlebars; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3BhcnNlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdz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zIHBvc3NpYmxlIGF0IHN0YXRlOiBcIiArIHN0YXRlICsgXCIsIHRva2VuOiBcIiArIHN5bWJvbCk7XG4gICAgICAgIH1cbiAgICAgICAgc3dpdGNoIChhY3Rpb25bMF0pIHtcbiAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgc3RhY2sucHVzaChzeW1ib2wpO1xuICAgICAgICAgICAgdnN0YWNrLnB1c2godGhpcy5sZXhlci55eXRleHQpO1xuICAgICAgICAgICAgbHN0YWNrLnB1c2godGhpcy5sZXhlci55eWxsb2MpO1xuICAgICAgICAgICAgc3RhY2sucHVzaChhY3Rpb25bMV0pO1xuICAgICAgICAgICAgc3ltYm9sID0gbnVsbDtcbiAgICAgICAgICAgIGlmICghcHJlRXJyb3JTeW1ib2wpIHtcbiAgICAgICAgICAgICAgICB5eWxlbmcgPSB0aGlzLmxleGVyLnl5bGVuZztcbiAgICAgICAgICAgICAgICB5eXRleHQgPSB0aGlzLmxleGVyLnl5dGV4dDtcbiAgICAgICAgICAgICAgICB5eWxpbmVubyA9IHRoaXMubGV4ZXIueXlsaW5lbm87XG4gICAgICAgICAgICAgICAgeXlsb2MgPSB0aGlzLmxleGVyLnl5bGxvYztcbiAgICAgICAgICAgICAgICBpZiAocmVjb3ZlcmluZyA+IDApXG4gICAgICAgICAgICAgICAgICAgIHJlY292ZXJpbmctLTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgc3ltYm9sID0gcHJlRXJyb3JTeW1ib2w7XG4gICAgICAgICAgICAgICAgcHJlRXJyb3JTeW1ib2wgPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgIGxlbiA9IHRoaXMucHJvZHVjdGlvbnNfW2FjdGlvblsxXV1bMV07XG4gICAgICAgICAgICB5eXZhbC4kID0gdnN0YWNrW3ZzdGFjay5sZW5ndGggLSBsZW5dO1xuICAgICAgICAgICAgeX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GlvbnMuZmxleCkgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1hdGNoKSB7XG4gICAgICAgICAgICBsaW5lcyA9IG1hdGNoWzBdLm1hdGNoKC8oPzpcXHJcXG4/fFxcbikuKi9nKTtcbiAgICAgICAgICAgIGlmIChsaW5lcykgdGhpcy55eWxpbmVubyArPSBsaW5lcy5sZW5ndGg7XG4gICAgICAgICAgICB0aGlzLnl5bGxvYyA9IHtmaXJzdF9saW5lOiB0aGlzLnl5bGxvYy5sYXN0X2xpbmUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0X2xpbmU6IHRoaXMueXlsaW5lbm8rMSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpcnN0X2NvbHVtbjogdGhpcy55eWxsb2MubGFzdF9jb2x1bW4sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0X2NvbHVtbjogbGluZXMgPyBsaW5lc1tsaW5lcy5sZW5ndGgtMV0ubGVuZ3RoLWxpbmVzW2xpbmVzLmxlbmd0aC0xXS5tYXRjaCgvXFxyP1xcbj8vKVswXS5sZW5ndGggOiB0aGlzLnl5bGxvYy5sYXN0X2NvbHVtbiArIG1hdGNoWzBdLmxlbmd0aH07XG4gICAgICAgICAgICB0aGlzLnl5dGV4dCArPSBtYXRjaFswXTtcbiAgICAgICAgICAgIHRoaXMubWF0Y2ggKz0gbWF0Y2hbMF07XG4gICAgICAgICAgICB0aGlzLm1hdGNoZXMgPSBtYXRjaDtcbiAgICAgICAgICAgIHRoaXMueXlsZW5nID0gdGhpcy55eXRleHQubGVuZ3RoO1xuICAgICAgICAgICAgaWYgKHRoaXMub3B0aW9ucy5yYW5nZXMpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnl5bGxvYy5yYW5nZSA9IFt0aGlzLm9mZnNldCwgdGhpcy5vZmZzZXQgKz0gdGhpcy55eWxlbmddO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5fbW9yZSA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5faW5wdXQgPSB0aGlzLl9pbnB1dC5zbGljZShtYXRjaFswXS5sZW5ndGgpO1xuICAgICAgICAgICAgdGhpcy5tYXRjaGVkICs9IG1hdGNoWzBdO1xuICAgICAgICAgICAgdG9rZW4gPSB0aGlzLnBlcmZvcm1BY3Rpb24uY2FsbCh0aGlzLCB0aGlzLnl5LCB0aGlzLCBydWxlc1tpbmRleF0sdGhpcy5jb25kaXRpb25TdGFja1t0aGlzLmNvbmRpdGlvblN0YWNrLmxlbmd0aC0xXSk7XG4gICAgICAgICAgICBpZiAodGhpcy5kb25lICYmIHRoaXMuX2lucHV0KSB0aGlzLmRvbmUgPSBmYWxzZTtcbiAgICAgICAgICAgIGlmICh0b2tlbikgcmV0dXJuIHRva2VuO1xuICAgICAgICAgICAgZWxzZSByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMuX2lucHV0ID09PSBcIlwiKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5FT0Y7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5wYXJzZUVycm9yKCdMZXhpY2FsIGVycm9yIG9uIGxpbmUgJysodGhpcy55eWxpbmVubysxKSsnLiBVbnJlY29nbml6ZWQgdGV4dC5cXG4nK3RoaXMuc2hvd1Bvc2l0aW9uKCksXG4gICAgICAgICAgICAgICAgICAgIHt0ZXh0OiBcIlwiLCB0b2tlbjogbnVsbCwgbGluZTogdGhpcy55eWxpbmVub30pO1xuICAgICAgICB9XG4gICAgfSxcbmxleDpmdW5jdGlvbiBsZXggKCkge1xuICAgICAgICB2YXIgciA9IHRoaXMubmV4dCgpO1xuICAgICAgICBpZiAodHlwZW9mIHIgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICByZXR1cm4gcjtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzL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XNlIDA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHl5Xy55eXRleHQuc2xpY2UoLTIpID09PSBcIlxcXFxcXFxcXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJpcCgwLDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYmVnaW4oXCJtdVwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmKHl5Xy55eXRleHQuc2xpY2UoLTEpID09PSBcIlxcXFxcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmlwKDAsMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5iZWdpbihcImVtdVwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmJlZ2luKFwibXVcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoeXlfLnl5dGV4dCkgcmV0dXJuIDE1O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5icmVhaztcbmNhc2UgMTpyZXR1cm4gMTU7XG5icmVhaztcbmNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wb3BTdGF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbmJyZWFrO1xuY2FzZSAzOnRoaXMuYmVnaW4oJ3JhdycpOyByZXR1cm4gMTU7XG5icmVhaztcbmNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBvcFN0YXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2hvdWxkIGJlIHVzaW5nIGB0aGlzLnRvcFN0YXRlKClgIGJlbG93LCBidXQgaXQgY3VycmVudGx5XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmV0dXJucyB0aGUgc2Vjb25kIHRvcCBpbnN0ZWFkIG9mIHRoZSBmaXJzdCB0b3AuIE9wZW5lZCBhblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlzc3VlIGFib3V0IGl0IGF0IGh0dHBzOi8vZ2l0aHViLmNvbS96YWFjaC9qaXNvbi9pc3N1ZXMvMjkxXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuY29uZGl0aW9uU3RhY2tbdGhpcy5jb25kaXRpb25TdGFjay5sZW5ndGgtMV0gPT09ICdyYXcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmlwKDUsIDkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdFTkRfUkFXX0JMT0NLJztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbmJyZWFrO1xuY2FzZSA1OiByZXR1cm4gMTU7IFxuYnJlYWs7XG5jYXNlIDY6XG4gIHRoaXMucG9wU3RhdGUoKTtcbiAgcmV0dXJuIDE0O1xuXG5icmVhaztcbmNhc2UgNzpyZXR1cm4gNjU7XG5icmVhaztcbmNhc2UgODpyZXR1cm4gNjg7XG5icmVhaztcbmNhc2UgOTogcmV0dXJuIDE5OyBcbmJyZWFrO1xuY2FzZSAxMDpcbiAgICAgICAgICAgICAg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0rKD86XFwuWzAtOV0rKT8oPz0oW359XFxzKV0pKSkvLC9eKD86YXNcXHMrXFx8KS8sL14oPzpcXHwpLywvXig/OihbXlxccyFcIiMlLSxcXC5cXC87LT5AXFxbLVxcXmBcXHstfl0rKD89KFs9fn1cXHNcXC8uKXxdKSkpKS8sL14oPzpcXFsoXFxcXFxcXXxbXlxcXV0pKlxcXSkvLC9eKD86LikvLC9eKD86JCkvXTtcbmxleGVyLmNvbmRpdGlvbnMgPSB7XCJtdVwiOntcInJ1bGVzXCI6WzcsOCw5LDEwLDExLDEyLDEzLDE0LDE1LDE2LDE3LDE4LDE5LDIwLDIxLDIyLDIzLDI0LDI1LDI2LDI3LDI4LDI5LDMwLDMxLDMyLDMzLDM0LDM1LDM2LDM3LDM4LDM5LDQwLDQxLDQyLDQzLDQ0XSxcImluY2x1c2l2ZVwiOmZhbHNlfSxcImVtdVwiOntcInJ1bGVzXCI6WzJdLFwiaW5jbHVzaXZlXCI6ZmFsc2V9LFwiY29tXCI6e1wicnVsZXNcIjpbNl0sXCJpbmNsdXNpdmVcIjpmYWxzZX0sXCJyYXdcIjp7XCJydWxlc1wiOlszLDQsNV0sXCJpbmNsdXNpdmVcIjpmYWxzZX0sXCJJTklUSUFMXCI6e1wicnVsZXNcIjpbMCwxLDQ0XSxcImluY2x1c2l2ZVwiOnRydWV9fTtcbnJldHVybiBsZXhlcjt9KSgpXG5wYXJzZXIubGV4ZXIgPSBsZXhlcjtcbmZ1bmN0aW9uIFBhcnNlciAoKSB7IHRoaXMueXkgPSB7fTsgfVBhcnNlci5wcm90b3R5cGUgPSBwYXJzZXI7cGFyc2VyLlBhcnNlciA9IFBhcnNlcjtcbnJldHVybiBuZXcgUGFyc2VyO1xufSkoKTtleHBvcnQgZGVmYXVsdCBoYW5kbGViYXJzO1xuIl19 diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/printer.js b/node_modules/handlebars/dist/amd/handlebars/compiler/printer.js deleted file mode 100644 index 3ab4f7a2..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/printer.js +++ /dev/null @@ -1,186 +0,0 @@ -define(['exports', './visitor'], function (exports, _visitor) { - /* eslint-disable new-cap */ - 'use strict'; - - exports.__esModule = true; - exports.print = print; - exports.PrintVisitor = PrintVisitor; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Visitor = _interopRequireDefault(_visitor); - - function print(ast) { - return new PrintVisitor().accept(ast); - } - - function PrintVisitor() { - this.padding = 0; - } - - PrintVisitor.prototype = new _Visitor['default'](); - - PrintVisitor.prototype.pad = function (string) { - var out = ''; - - for (var i = 0, l = this.padding; i < l; i++) { - out += ' '; - } - - out += string + '\n'; - return out; - }; - - PrintVisitor.prototype.Program = function (program) { - var out = '', - body = program.body, - i = undefined, - l = undefined; - - if (program.blockParams) { - var blockParams = 'BLOCK PARAMS: ['; - for (i = 0, l = program.blockParams.length; i < l; i++) { - blockParams += ' ' + program.blockParams[i]; - } - blockParams += ' ]'; - out += this.pad(blockParams); - } - - for (i = 0, l = body.length; i < l; i++) { - out += this.accept(body[i]); - } - - this.padding--; - - return out; - }; - - PrintVisitor.prototype.MustacheStatement = function (mustache) { - return this.pad('{{ ' + this.SubExpression(mustache) + ' }}'); - }; - PrintVisitor.prototype.Decorator = function (mustache) { - return this.pad('{{ DIRECTIVE ' + this.SubExpression(mustache) + ' }}'); - }; - - PrintVisitor.prototype.BlockStatement = PrintVisitor.prototype.DecoratorBlock = function (block) { - var out = ''; - - out += this.pad((block.type === 'DecoratorBlock' ? 'DIRECTIVE ' : '') + 'BLOCK:'); - this.padding++; - out += this.pad(this.SubExpression(block)); - if (block.program) { - out += this.pad('PROGRAM:'); - this.padding++; - out += this.accept(block.program); - this.padding--; - } - if (block.inverse) { - if (block.program) { - this.padding++; - } - out += this.pad('{{^}}'); - this.padding++; - out += this.accept(block.inverse); - this.padding--; - if (block.program) { - this.padding--; - } - } - this.padding--; - - return out; - }; - - PrintVisitor.prototype.PartialStatement = function (partial) { - var content = 'PARTIAL:' + partial.name.original; - if (partial.params[0]) { - content += ' ' + this.accept(partial.params[0]); - } - if (partial.hash) { - content += ' ' + this.accept(partial.hash); - } - return this.pad('{{> ' + content + ' }}'); - }; - PrintVisitor.prototype.PartialBlockStatement = function (partial) { - var content = 'PARTIAL BLOCK:' + partial.name.original; - if (partial.params[0]) { - content += ' ' + this.accept(partial.params[0]); - } - if (partial.hash) { - content += ' ' + this.accept(partial.hash); - } - - content += ' ' + this.pad('PROGRAM:'); - this.padding++; - content += this.accept(partial.program); - this.padding--; - - return this.pad('{{> ' + content + ' }}'); - }; - - PrintVisitor.prototype.ContentStatement = function (content) { - return this.pad("CONTENT[ '" + content.value + "' ]"); - }; - - PrintVisitor.prototype.CommentStatement = function (comment) { - return this.pad("{{! '" + comment.value + "' }}"); - }; - - PrintVisitor.prototype.SubExpression = function (sexpr) { - var params = sexpr.params, - paramStrings = [], - hash = undefined; - - for (var i = 0, l = params.length; i < l; i++) { - paramStrings.push(this.accept(params[i])); - } - - params = '[' + paramStrings.join(', ') + ']'; - - hash = sexpr.hash ? ' ' + this.accept(sexpr.hash) : ''; - - return this.accept(sexpr.path) + ' ' + params + hash; - }; - - PrintVisitor.prototype.PathExpression = function (id) { - var path = id.parts.join('/'); - return (id.data ? '@' : '') + 'PATH:' + path; - }; - - PrintVisitor.prototype.StringLiteral = function (string) { - return '"' + string.value + '"'; - }; - - PrintVisitor.prototype.NumberLiteral = function (number) { - return 'NUMBER{' + number.value + '}'; - }; - - PrintVisitor.prototype.BooleanLiteral = function (bool) { - return 'BOOLEAN{' + bool.value + '}'; - }; - - PrintVisitor.prototype.UndefinedLiteral = function () { - return 'UNDEFINED'; - }; - - PrintVisitor.prototype.NullLiteral = function () { - return 'NULL'; - }; - - PrintVisitor.prototype.Hash = function (hash) { - var pairs = hash.pairs, - joinedPairs = []; - - for (var i = 0, l = pairs.length; i < l; i++) { - joinedPairs.push(this.accept(pairs[i])); - } - - return 'HASH{' + joinedPairs.join(', ') + '}'; - }; - PrintVisitor.prototype.HashPair = function (pair) { - return pair.key + '=' + this.accept(pair.value); - }; - /* eslint-enable new-cap */ -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3ByaW50ZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztBQUdPLFdBQVMsS0FBSyxDQUFDLEdBQUcsRUFBRTtBQUN6QixXQUFPLElBQUksWUFBWSxFQUFFLENBQUMsTUFBTSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0dBQ3ZDOztBQUVNLFdBQVMsWUFBWSxHQUFHO0FBQzdCLFFBQUksQ0FBQyxPQUFPLEdBQUcsQ0FBQyxDQUFDO0dBQ2xCOztBQUVELGNBQVksQ0FBQyxTQUFTLEdBQUcseUJBQWEsQ0FBQzs7QUFFdkMsY0FBWSxDQUFDLFNBQVMsQ0FBQyxHQUFHLEdBQUcsVUFBUyxNQUFNLEVBQUU7QUFDNUMsUUFBSSxHQUFHLEdBQUcsRUFBRSxDQUFDOztBQUViLFNBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxJQUFJLENBQUMsT0FBTyxFQUFFLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUU7QUFDNUMsU0FBRyxJQUFJLElBQUksQ0FBQztLQUNiOztBQUVELE9BQUcsSUFBSSxNQUFNLEdBQUcsSUFBSSxDQUFDO0FBQ3JCLFdBQU8sR0FBRyxDQUFDO0dBQ1osQ0FBQzs7QUFFRixjQUFZLENBQUMsU0FBUyxDQUFDLE9BQU8sR0FBRyxVQUFTLE9BQU8sRUFBRTtBQUNqRCxRQUFJLEdBQUcsR0FBRyxFQUFFO1FBQ1YsSUFBSSxHQUFHLE9BQU8sQ0FBQ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FUnsnICsgbnVtYmVyLnZhbHVlICsgJ30nO1xufTtcblxuUHJpbnRWaXNpdG9yLnByb3RvdHlwZS5Cb29sZWFuTGl0ZXJhbCA9IGZ1bmN0aW9uKGJvb2wpIHtcbiAgcmV0dXJuICdCT09MRUFOeycgKyBib29sLnZhbHVlICsgJ30nO1xufTtcblxuUHJpbnRWaXNpdG9yLnByb3RvdHlwZS5VbmRlZmluZWRMaXRlcmFsID0gZnVuY3Rpb24oKSB7XG4gIHJldHVybiAnVU5ERUZJTkVEJztcbn07XG5cblByaW50VmlzaXRvci5wcm90b3R5cGUuTnVsbExpdGVyYWwgPSBmdW5jdGlvbigpIHtcbiAgcmV0dXJuICdOVUxMJztcbn07XG5cblByaW50VmlzaXRvci5wcm90b3R5cGUuSGFzaCA9IGZ1bmN0aW9uKGhhc2gpIHtcbiAgbGV0IHBhaXJzID0gaGFzaC5wYWlycyxcbiAgICBqb2luZWRQYWlycyA9IFtdO1xuXG4gIGZvciAobGV0IGkgPSAwLCBsID0gcGFpcnMubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgam9pbmVkUGFpcnMucHVzaCh0aGlzLmFjY2VwdChwYWlyc1tpXSkpO1xuICB9XG5cbiAgcmV0dXJuICdIQVNIeycgKyBqb2luZWRQYWlycy5qb2luKCcsICcpICsgJ30nO1xufTtcblByaW50VmlzaXRvci5wcm90b3R5cGUuSGFzaFBhaXIgPSBmdW5jdGlvbihwYWlyKSB7XG4gIHJldHVybiBwYWlyLmtleSArICc9JyArIHRoaXMuYWNjZXB0KHBhaXIudmFsdWUpO1xufTtcbi8qIGVzbGludC1lbmFibGUgbmV3LWNhcCAqL1xuIl19 diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/visitor.js b/node_modules/handlebars/dist/amd/handlebars/compiler/visitor.js deleted file mode 100644 index 864c0398..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/visitor.js +++ /dev/null @@ -1,138 +0,0 @@ -define(['exports', 'module', '../exception'], function (exports, module, _exception) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - function Visitor() { - this.parents = []; - } - - Visitor.prototype = { - constructor: Visitor, - mutating: false, - - // Visits a given value. If mutating, will replace the value if necessary. - acceptKey: function acceptKey(node, name) { - var value = this.accept(node[name]); - if (this.mutating) { - // Hacky sanity check: This may have a few false positives for type for the helper - // methods but will generally do the right thing without a lot of overhead. - if (value && !Visitor.prototype[value.type]) { - throw new _Exception['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); - } - node[name] = value; - } - }, - - // Performs an accept operation with added sanity check to ensure - // required keys are not removed. - acceptRequired: function acceptRequired(node, name) { - this.acceptKey(node, name); - - if (!node[name]) { - throw new _Exception['default'](node.type + ' requires ' + name); - } - }, - - // Traverses a given array. If mutating, empty respnses will be removed - // for child elements. - acceptArray: function acceptArray(array) { - for (var i = 0, l = array.length; i < l; i++) { - this.acceptKey(array, i); - - if (!array[i]) { - array.splice(i, 1); - i--; - l--; - } - } - }, - - accept: function accept(object) { - if (!object) { - return; - } - - /* istanbul ignore next: Sanity code */ - if (!this[object.type]) { - throw new _Exception['default']('Unknown type: ' + object.type, object); - } - - if (this.current) { - this.parents.unshift(this.current); - } - this.current = object; - - var ret = this[object.type](object); - - this.current = this.parents.shift(); - - if (!this.mutating || ret) { - return ret; - } else if (ret !== false) { - return object; - } - }, - - Program: function Program(program) { - this.acceptArray(program.body); - }, - - MustacheStatement: visitSubExpression, - Decorator: visitSubExpression, - - BlockStatement: visitBlock, - DecoratorBlock: visitBlock, - - PartialStatement: visitPartial, - PartialBlockStatement: function PartialBlockStatement(partial) { - visitPartial.call(this, partial); - - this.acceptKey(partial, 'program'); - }, - - ContentStatement: function ContentStatement() /* content */{}, - CommentStatement: function CommentStatement() /* comment */{}, - - SubExpression: visitSubExpression, - - PathExpression: function PathExpression() /* path */{}, - - StringLiteral: function StringLiteral() /* string */{}, - NumberLiteral: function NumberLiteral() /* number */{}, - BooleanLiteral: function BooleanLiteral() /* bool */{}, - UndefinedLiteral: function UndefinedLiteral() /* literal */{}, - NullLiteral: function NullLiteral() /* literal */{}, - - Hash: function Hash(hash) { - this.acceptArray(hash.pairs); - }, - HashPair: function HashPair(pair) { - this.acceptRequired(pair, 'value'); - } - }; - - function visitSubExpression(mustache) { - this.acceptRequired(mustache, 'path'); - this.acceptArray(mustache.params); - this.acceptKey(mustache, 'hash'); - } - function visitBlock(block) { - visitSubExpression.call(this, block); - - this.acceptKey(block, 'program'); - this.acceptKey(block, 'inverse'); - } - function visitPartial(partial) { - this.acceptRequired(partial, 'name'); - this.acceptArray(partial.params); - this.acceptKey(partial, 'hash'); - } - - module.exports = Visitor; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3Zpc2l0b3IuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBRUEsV0FBUyxPQUFPLEdBQUc7QUFDakIsUUFBSSxDQUFDLE9BQU8sR0FBRyxFQUFFLENBQUM7R0FDbkI7O0FBRUQsU0FBTyxDQUFDLFNBQVMsR0FBRztBQUNsQixlQUFXLEVBQUUsT0FBTztBQUNwQixZQUFRLEVBQUUsS0FBSzs7O0FBR2YsYUFBUyxFQUFFLG1CQUFTLElBQUksRUFBRSxJQUFJLEVBQUU7QUFDOUIsVUFBSSxLQUFLLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztBQUNwQyxVQUFJLElBQUksQ0FBQyxRQUFRLEVBQUU7OztBQUdqQixZQUFJLEtBQUssSUFBSSxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxFQUFFO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BhaXJzKTtcbiAgfSxcbiAgSGFzaFBhaXI6IGZ1bmN0aW9uKHBhaXIpIHtcbiAgICB0aGlzLmFjY2VwdFJlcXVpcmVkKHBhaXIsICd2YWx1ZScpO1xuICB9XG59O1xuXG5mdW5jdGlvbiB2aXNpdFN1YkV4cHJlc3Npb24obXVzdGFjaGUpIHtcbiAgdGhpcy5hY2NlcHRSZXF1aXJlZChtdXN0YWNoZSwgJ3BhdGgnKTtcbiAgdGhpcy5hY2NlcHRBcnJheShtdXN0YWNoZS5wYXJhbXMpO1xuICB0aGlzLmFjY2VwdEtleShtdXN0YWNoZSwgJ2hhc2gnKTtcbn1cbmZ1bmN0aW9uIHZpc2l0QmxvY2soYmxvY2spIHtcbiAgdmlzaXRTdWJFeHByZXNzaW9uLmNhbGwodGhpcywgYmxvY2spO1xuXG4gIHRoaXMuYWNjZXB0S2V5KGJsb2NrLCAncHJvZ3JhbScpO1xuICB0aGlzLmFjY2VwdEtleShibG9jaywgJ2ludmVyc2UnKTtcbn1cbmZ1bmN0aW9uIHZpc2l0UGFydGlhbChwYXJ0aWFsKSB7XG4gIHRoaXMuYWNjZXB0UmVxdWlyZWQocGFydGlhbCwgJ25hbWUnKTtcbiAgdGhpcy5hY2NlcHRBcnJheShwYXJ0aWFsLnBhcmFtcyk7XG4gIHRoaXMuYWNjZXB0S2V5KHBhcnRpYWwsICdoYXNoJyk7XG59XG5cbmV4cG9ydCBkZWZhdWx0IFZpc2l0b3I7XG4iXX0= diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/whitespace-control.js b/node_modules/handlebars/dist/amd/handlebars/compiler/whitespace-control.js deleted file mode 100644 index a4c86cc0..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/whitespace-control.js +++ /dev/null @@ -1,219 +0,0 @@ -define(['exports', 'module', './visitor'], function (exports, module, _visitor) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Visitor = _interopRequireDefault(_visitor); - - function WhitespaceControl() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - - this.options = options; - } - WhitespaceControl.prototype = new _Visitor['default'](); - - WhitespaceControl.prototype.Program = function (program) { - var doStandalone = !this.options.ignoreStandalone; - - var isRoot = !this.isRootSeen; - this.isRootSeen = true; - - var body = program.body; - for (var i = 0, l = body.length; i < l; i++) { - var current = body[i], - strip = this.accept(current); - - if (!strip) { - continue; - } - - var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), - _isNextWhitespace = isNextWhitespace(body, i, isRoot), - openStandalone = strip.openStandalone && _isPrevWhitespace, - closeStandalone = strip.closeStandalone && _isNextWhitespace, - inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; - - if (strip.close) { - omitRight(body, i, true); - } - if (strip.open) { - omitLeft(body, i, true); - } - - if (doStandalone && inlineStandalone) { - omitRight(body, i); - - if (omitLeft(body, i)) { - // If we are on a standalone node, save the indent info for partials - if (current.type === 'PartialStatement') { - // Pull out the whitespace from the final line - current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; - } - } - } - if (doStandalone && openStandalone) { - omitRight((current.program || current.inverse).body); - - // Strip out the previous content node if it's whitespace only - omitLeft(body, i); - } - if (doStandalone && closeStandalone) { - // Always strip the next node - omitRight(body, i); - - omitLeft((current.inverse || current.program).body); - } - } - - return program; - }; - - WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) { - this.accept(block.program); - this.accept(block.inverse); - - // Find the inverse program that is involed with whitespace stripping. - var program = block.program || block.inverse, - inverse = block.program && block.inverse, - firstInverse = inverse, - lastInverse = inverse; - - if (inverse && inverse.chained) { - firstInverse = inverse.body[0].program; - - // Walk the inverse chain to find the last inverse that is actually in the chain. - while (lastInverse.chained) { - lastInverse = lastInverse.body[lastInverse.body.length - 1].program; - } - } - - var strip = { - open: block.openStrip.open, - close: block.closeStrip.close, - - // Determine the standalone candiacy. Basically flag our content as being possibly standalone - // so our parent can determine if we actually are standalone - openStandalone: isNextWhitespace(program.body), - closeStandalone: isPrevWhitespace((firstInverse || program).body) - }; - - if (block.openStrip.close) { - omitRight(program.body, null, true); - } - - if (inverse) { - var inverseStrip = block.inverseStrip; - - if (inverseStrip.open) { - omitLeft(program.body, null, true); - } - - if (inverseStrip.close) { - omitRight(firstInverse.body, null, true); - } - if (block.closeStrip.open) { - omitLeft(lastInverse.body, null, true); - } - - // Find standalone else statments - if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { - omitLeft(program.body); - omitRight(firstInverse.body); - } - } else if (block.closeStrip.open) { - omitLeft(program.body, null, true); - } - - return strip; - }; - - WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) { - return mustache.strip; - }; - - WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) { - /* istanbul ignore next */ - var strip = node.strip || {}; - return { - inlineStandalone: true, - open: strip.open, - close: strip.close - }; - }; - - function isPrevWhitespace(body, i, isRoot) { - if (i === undefined) { - i = body.length; - } - - // Nodes that end with newlines are considered whitespace (but are special - // cased for strip operations) - var prev = body[i - 1], - sibling = body[i - 2]; - if (!prev) { - return isRoot; - } - - if (prev.type === 'ContentStatement') { - return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); - } - } - function isNextWhitespace(body, i, isRoot) { - if (i === undefined) { - i = -1; - } - - var next = body[i + 1], - sibling = body[i + 2]; - if (!next) { - return isRoot; - } - - if (next.type === 'ContentStatement') { - return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); - } - } - - // Marks the node to the right of the position as omitted. - // I.e. {{foo}}' ' will mark the ' ' node as omitted. - // - // If i is undefined, then the first child will be marked as such. - // - // If mulitple is truthy then all whitespace will be stripped out until non-whitespace - // content is met. - function omitRight(body, i, multiple) { - var current = body[i == null ? 0 : i + 1]; - if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) { - return; - } - - var original = current.value; - current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ''); - current.rightStripped = current.value !== original; - } - - // Marks the node to the left of the position as omitted. - // I.e. ' '{{foo}} will mark the ' ' node as omitted. - // - // If i is undefined then the last child will be marked as such. - // - // If mulitple is truthy then all whitespace will be stripped out until non-whitespace - // content is met. - function omitLeft(body, i, multiple) { - var current = body[i == null ? body.length - 1 : i - 1]; - if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) { - return; - } - - // We omit the last node if it's whitespace only and not preceded by a non-content node. - var original = current.value; - current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ''); - current.leftStripped = current.value !== original; - return current.leftStripped; - } - - module.exports = WhitespaceControl; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3doaXRlc3BhY2UtY29udHJvbC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFFQSxXQUFTLGlCQUFpQixHQUFlO1FBQWQsT0FBTyx5REFBRyxFQUFFOztBQUNyQyxRQUFJLENBQUMsT0FBTyxHQUFHLE9BQU8sQ0FBQztHQUN4QjtBQUNELG1CQUFpQixDQUFDLFNBQVMsR0FBRyx5QkFBYSxDQUFDOztBQUU1QyxtQkFBaUIsQ0FBQyxTQUFTLENBQUMsT0FBTyxHQUFHLFVBQVMsT0FBTyxFQUFFO0FBQ3RELFFBQU0sWUFBWSxHQUFHLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxnQkFBZ0IsQ0FBQzs7QUFFcEQsUUFBSSxNQUFNLEdBQUcsQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDO0FBQzlCLFFBQUksQ0FBQyxVQUFVL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kLlxuLy9cbi8vIElmIGkgaXMgdW5kZWZpbmVkIHRoZW4gdGhlIGxhc3QgY2hpbGQgd2lsbCBiZSBtYXJrZWQgYXMgc3VjaC5cbi8vXG4vLyBJZiBtdWxpdHBsZSBpcyB0cnV0aHkgdGhlbiBhbGwgd2hpdGVzcGFjZSB3aWxsIGJlIHN0cmlwcGVkIG91dCB1bnRpbCBub24td2hpdGVzcGFjZVxuLy8gY29udGVudCBpcyBtZXQuXG5mdW5jdGlvbiBvbWl0TGVmdChib2R5LCBpLCBtdWx0aXBsZSkge1xuICBsZXQgY3VycmVudCA9IGJvZHlbaSA9PSBudWxsID8gYm9keS5sZW5ndGggLSAxIDogaSAtIDFdO1xuICBpZiAoXG4gICAgIWN1cnJlbnQgfHxcbiAgICBjdXJyZW50LnR5cGUgIT09ICdDb250ZW50U3RhdGVtZW50JyB8fFxuICAgICghbXVsdGlwbGUgJiYgY3VycmVudC5sZWZ0U3RyaXBwZWQpXG4gICkge1xuICAgIHJldHVybjtcbiAgfVxuXG4gIC8vIFdlIG9taXQgdGhlIGxhc3Qgbm9kZSBpZiBpdCdzIHdoaXRlc3BhY2Ugb25seSBhbmQgbm90IHByZWNlZGVkIGJ5IGEgbm9uLWNvbnRlbnQgbm9kZS5cbiAgbGV0IG9yaWdpbmFsID0gY3VycmVudC52YWx1ZTtcbiAgY3VycmVudC52YWx1ZSA9IGN1cnJlbnQudmFsdWUucmVwbGFjZShtdWx0aXBsZSA/IC9cXHMrJC8gOiAvWyBcXHRdKyQvLCAnJyk7XG4gIGN1cnJlbnQubGVmdFN0cmlwcGVkID0gY3VycmVudC52YWx1ZSAhPT0gb3JpZ2luYWw7XG4gIHJldHVybiBjdXJyZW50LmxlZnRTdHJpcHBlZDtcbn1cblxuZXhwb3J0IGRlZmF1bHQgV2hpdGVzcGFjZUNvbnRyb2w7XG4iXX0= diff --git a/node_modules/handlebars/dist/amd/handlebars/decorators.js b/node_modules/handlebars/dist/amd/handlebars/decorators.js deleted file mode 100644 index 363d81ed..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/decorators.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['exports', './decorators/inline'], function (exports, _decoratorsInline) { - 'use strict'; - - exports.__esModule = true; - exports.registerDefaultDecorators = registerDefaultDecorators; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _registerInline = _interopRequireDefault(_decoratorsInline); - - function registerDefaultDecorators(instance) { - _registerInline['default'](instance); - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFFTyxXQUFTLHlCQUF5QixDQUFDLFFBQVEsRUFBRTtBQUNsRCwrQkFBZSxRQUFRLENBQUMsQ0FBQztHQUMxQiIsImZpbGUiOiJkZWNvcmF0b3JzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHJlZ2lzdGVySW5saW5lIGZyb20gJy4vZGVjb3JhdG9ycy9pbmxpbmUnO1xuXG5leHBvcnQgZnVuY3Rpb24gcmVnaXN0ZXJEZWZhdWx0RGVjb3JhdG9ycyhpbnN0YW5jZSkge1xuICByZWdpc3RlcklubGluZShpbnN0YW5jZSk7XG59XG4iXX0= diff --git a/node_modules/handlebars/dist/amd/handlebars/decorators/inline.js b/node_modules/handlebars/dist/amd/handlebars/decorators/inline.js deleted file mode 100644 index 104b5e0d..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/decorators/inline.js +++ /dev/null @@ -1,25 +0,0 @@ -define(['exports', 'module', '../utils'], function (exports, module, _utils) { - 'use strict'; - - module.exports = function (instance) { - instance.registerDecorator('inline', function (fn, props, container, options) { - var ret = fn; - if (!props.partials) { - props.partials = {}; - ret = function (context, options) { - // Create a new partials stack frame prior to exec. - var original = container.partials; - container.partials = _utils.extend({}, original, props.partials); - var ret = fn(context, options); - container.partials = original; - return ret; - }; - } - - props.partials[options.args[0]] = options.fn; - - return ret; - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMvaW5saW5lLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFFZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsaUJBQWlCLENBQUMsUUFBUSxFQUFFLFVBQVMsRUFBRSxFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFO0FBQzNFLFVBQUksR0FBRyxHQUFHLEVBQUUsQ0FBQztBQUNiLFVBQUksQ0FBQyxLQUFLLENBQUMsUUFBUSxFQUFFO0FBQ25CLGFBQUssQ0FBQyxRQUFRLEdBQUcsRUFBRSxDQUFDO0FBQ3BCLFdBQUcsR0FBRyxVQUFTLE9BQU8sRUFBRSxPQUFPLEVBQUU7O0FBRS9CLGNBQUksUUFBUSxHQUFHLFNBQVMsQ0FBQyxRQUFRLENBQUM7QUFDbEMsbUJBQVMsQ0FBQyxRQUFRLEdBQUcsT0FWcEIsTUFBTSxDQVVxQixFQUFFLEVBQUUsUUFBUSxFQUFFLEtBQUssQ0FBQyxRQUFRLENBQUMsQ0FBQztBQUMxRCxjQUFJLEdBQUcsR0FBRyxFQUFFLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDO0FBQy9CLG1CQUFTLENBQUMsUUFBUSxHQUFHLFFBQVEsQ0FBQztBQUM5QixpQkFBTyxHQUFHLENBQUM7U0FDWixDQUFDO09BQ0g7O0FBRUQsV0FBSyxDQUFDLFFBQVEsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsT0FBTyxDQUFDLEVBQUUsQ0FBQzs7QUFFN0MsYUFBTyxHQUFHLENBQUM7S0FDWixDQUFDLENBQUM7R0FDSiIsImZpbGUiOiJpbmxpbmUuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBleHRlbmQgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVyRGVjb3JhdG9yKCdpbmxpbmUnLCBmdW5jdGlvbihmbiwgcHJvcHMsIGNvbnRhaW5lciwgb3B0aW9ucykge1xuICAgIGxldCByZXQgPSBmbjtcbiAgICBpZiAoIXByb3BzLnBhcnRpYWxzKSB7XG4gICAgICBwcm9wcy5wYXJ0aWFscyA9IHt9O1xuICAgICAgcmV0ID0gZnVuY3Rpb24oY29udGV4dCwgb3B0aW9ucykge1xuICAgICAgICAvLyBDcmVhdGUgYSBuZXcgcGFydGlhbHMgc3RhY2sgZnJhbWUgcHJpb3IgdG8gZXhlYy5cbiAgICAgICAgbGV0IG9yaWdpbmFsID0gY29udGFpbmVyLnBhcnRpYWxzO1xuICAgICAgICBjb250YWluZXIucGFydGlhbHMgPSBleHRlbmQoe30sIG9yaWdpbmFsLCBwcm9wcy5wYXJ0aWFscyk7XG4gICAgICAgIGxldCByZXQgPSBmbihjb250ZXh0LCBvcHRpb25zKTtcbiAgICAgICAgY29udGFpbmVyLnBhcnRpYWxzID0gb3JpZ2luYWw7XG4gICAgICAgIHJldHVybiByZXQ7XG4gICAgICB9O1xuICAgIH1cblxuICAgIHByb3BzLnBhcnRpYWxzW29wdGlvbnMuYXJnc1swXV0gPSBvcHRpb25zLmZuO1xuXG4gICAgcmV0dXJuIHJldDtcbiAgfSk7XG59XG4iXX0= diff --git a/node_modules/handlebars/dist/amd/handlebars/exception.js b/node_modules/handlebars/dist/amd/handlebars/exception.js deleted file mode 100644 index 82419c92..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/exception.js +++ /dev/null @@ -1,64 +0,0 @@ -define(['exports', 'module'], function (exports, module) { - 'use strict'; - - var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack']; - - function Exception(message, node) { - var loc = node && node.loc, - line = undefined, - endLineNumber = undefined, - column = undefined, - endColumn = undefined; - - if (loc) { - line = loc.start.line; - endLineNumber = loc.end.line; - column = loc.start.column; - endColumn = loc.end.column; - - message += ' - ' + line + ':' + column; - } - - var tmp = Error.prototype.constructor.call(this, message); - - // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. - for (var idx = 0; idx < errorProps.length; idx++) { - this[errorProps[idx]] = tmp[errorProps[idx]]; - } - - /* istanbul ignore else */ - if (Error.captureStackTrace) { - Error.captureStackTrace(this, Exception); - } - - try { - if (loc) { - this.lineNumber = line; - this.endLineNumber = endLineNumber; - - // Work around issue under safari where we can't directly set the column value - /* istanbul ignore next */ - if (Object.defineProperty) { - Object.defineProperty(this, 'column', { - value: column, - enumerable: true - }); - Object.defineProperty(this, 'endColumn', { - value: endColumn, - enumerable: true - }); - } else { - this.column = column; - this.endColumn = endColumn; - } - } - } catch (nop) { - /* Ignore if the browser is very particular */ - } - } - - Exception.prototype = new Error(); - - module.exports = Exception; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2V4Y2VwdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxNQUFNLFVBQVUsR0FBRyxDQUNqQixhQUFhLEVBQ2IsVUFBVSxFQUNWLFlBQVksRUFDWixlQUFlLEVBQ2YsU0FBUyxFQUNULE1BQU0sRUFDTixRQUFRLEVBQ1IsT0FBTyxDQUNSLENBQUM7O0FBRUYsV0FBUyxTQUFTLENBQUMsT0FBTyxFQUFFLElBQUksRUFBRTtBQUNoQyxRQUFJLEdBQUcsR0FBRyx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LmRlZmluZVByb3BlcnR5KSB7XG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh0aGlzLCAnY29sdW1uJywge1xuICAgICAgICAgIHZhbHVlOiBjb2x1bW4sXG4gICAgICAgICAgZW51bWVyYWJsZTogdHJ1ZVxuICAgICAgICB9KTtcbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHRoaXMsICdlbmRDb2x1bW4nLCB7XG4gICAgICAgICAgdmFsdWU6IGVuZENvbHVtbixcbiAgICAgICAgICBlbnVtZXJhYmxlOiB0cnVlXG4gICAgICAgIH0pO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhpcy5jb2x1bW4gPSBjb2x1bW47XG4gICAgICAgIHRoaXMuZW5kQ29sdW1uID0gZW5kQ29sdW1uO1xuICAgICAgfVxuICAgIH1cbiAgfSBjYXRjaCAobm9wKSB7XG4gICAgLyogSWdub3JlIGlmIHRoZSBicm93c2VyIGlzIHZlcnkgcGFydGljdWxhciAqL1xuICB9XG59XG5cbkV4Y2VwdGlvbi5wcm90b3R5cGUgPSBuZXcgRXJyb3IoKTtcblxuZXhwb3J0IGRlZmF1bHQgRXhjZXB0aW9uO1xuIl19 diff --git a/node_modules/handlebars/dist/amd/handlebars/helpers.js b/node_modules/handlebars/dist/amd/handlebars/helpers.js deleted file mode 100644 index 3f26f60c..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/helpers.js +++ /dev/null @@ -1,44 +0,0 @@ -define(['exports', './helpers/block-helper-missing', './helpers/each', './helpers/helper-missing', './helpers/if', './helpers/log', './helpers/lookup', './helpers/with'], function (exports, _helpersBlockHelperMissing, _helpersEach, _helpersHelperMissing, _helpersIf, _helpersLog, _helpersLookup, _helpersWith) { - 'use strict'; - - exports.__esModule = true; - exports.registerDefaultHelpers = registerDefaultHelpers; - exports.moveHelperToHooks = moveHelperToHooks; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _registerBlockHelperMissing = _interopRequireDefault(_helpersBlockHelperMissing); - - var _registerEach = _interopRequireDefault(_helpersEach); - - var _registerHelperMissing = _interopRequireDefault(_helpersHelperMissing); - - var _registerIf = _interopRequireDefault(_helpersIf); - - var _registerLog = _interopRequireDefault(_helpersLog); - - var _registerLookup = _interopRequireDefault(_helpersLookup); - - var _registerWith = _interopRequireDefault(_helpersWith); - - function registerDefaultHelpers(instance) { - _registerBlockHelperMissing['default'](instance); - _registerEach['default'](instance); - _registerHelperMissing['default'](instance); - _registerIf['default'](instance); - _registerLog['default'](instance); - _registerLookup['default'](instance); - _registerWith['default'](instance); - } - - function moveHelperToHooks(instance, helperName, keepHelper) { - if (instance.helpers[helperName]) { - instance.hooks[helperName] = instance.helpers[helperName]; - if (!keepHelper) { - delete instance.helpers[helperName]; - } - } - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBUU8sV0FBUyxzQkFBc0IsQ0FBQyxRQUFRLEVBQUU7QUFDL0MsMkNBQTJCLFFBQVEsQ0FBQyxDQUFDO0FBQ3JDLDZCQUFhLFFBQVEsQ0FBQyxDQUFDO0FBQ3ZCLHNDQUFzQixRQUFRLENBQUMsQ0FBQztBQUNoQywyQkFBVyxRQUFRLENBQUMsQ0FBQztBQUNyQiw0QkFBWSxRQUFRLENBQUMsQ0FBQztBQUN0QiwrQkFBZSxRQUFRLENBQUMsQ0FBQztBQUN6Qiw2QkFBYSxRQUFRLENBQUMsQ0FBQztHQUN4Qjs7QUFFTSxXQUFTLGlCQUFpQixDQUFDLFFBQVEsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFO0FBQ2xFLFFBQUksUUFBUSxDQUFDLE9BQU8sQ0FBQyx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ZXJMb29rdXAoaW5zdGFuY2UpO1xuICByZWdpc3RlcldpdGgoaW5zdGFuY2UpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gbW92ZUhlbHBlclRvSG9va3MoaW5zdGFuY2UsIGhlbHBlck5hbWUsIGtlZXBIZWxwZXIpIHtcbiAgaWYgKGluc3RhbmNlLmhlbHBlcnNbaGVscGVyTmFtZV0pIHtcbiAgICBpbnN0YW5jZS5ob29rc1toZWxwZXJOYW1lXSA9IGluc3RhbmNlLmhlbHBlcnNbaGVscGVyTmFtZV07XG4gICAgaWYgKCFrZWVwSGVscGVyKSB7XG4gICAgICBkZWxldGUgaW5zdGFuY2UuaGVscGVyc1toZWxwZXJOYW1lXTtcbiAgICB9XG4gIH1cbn1cbiJdfQ== diff --git a/node_modules/handlebars/dist/amd/handlebars/helpers/block-helper-missing.js b/node_modules/handlebars/dist/amd/handlebars/helpers/block-helper-missing.js deleted file mode 100644 index 4511f66d..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/helpers/block-helper-missing.js +++ /dev/null @@ -1,35 +0,0 @@ -define(['exports', 'module', '../utils'], function (exports, module, _utils) { - 'use strict'; - - module.exports = function (instance) { - instance.registerHelper('blockHelperMissing', function (context, options) { - var inverse = options.inverse, - fn = options.fn; - - if (context === true) { - return fn(this); - } else if (context === false || context == null) { - return inverse(this); - } else if (_utils.isArray(context)) { - if (context.length > 0) { - if (options.ids) { - options.ids = [options.name]; - } - - return instance.helpers.each(context, options); - } else { - return inverse(this); - } - } else { - if (options.data && options.ids) { - var data = _utils.createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); - options = { data: data }; - } - - return fn(context, options); - } - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvYmxvY2staGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJt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jZS5oZWxwZXJzLmVhY2goY29udGV4dCwgb3B0aW9ucyk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gaW52ZXJzZSh0aGlzKTtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgaWYgKG9wdGlvbnMuZGF0YSAmJiBvcHRpb25zLmlkcykge1xuICAgICAgICBsZXQgZGF0YSA9IGNyZWF0ZUZyYW1lKG9wdGlvbnMuZGF0YSk7XG4gICAgICAgIGRhdGEuY29udGV4dFBhdGggPSBhcHBlbmRDb250ZXh0UGF0aChcbiAgICAgICAgICBvcHRpb25zLmRhdGEuY29udGV4dFBhdGgsXG4gICAgICAgICAgb3B0aW9ucy5uYW1lXG4gICAgICAgICk7XG4gICAgICAgIG9wdGlvbnMgPSB7IGRhdGE6IGRhdGEgfTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIGZuKGNvbnRleHQsIG9wdGlvbnMpO1xuICAgIH1cbiAgfSk7XG59XG4iXX0= diff --git a/node_modules/handlebars/dist/amd/handlebars/helpers/each.js b/node_modules/handlebars/dist/amd/handlebars/helpers/each.js deleted file mode 100644 index 1ab45ba0..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/helpers/each.js +++ /dev/null @@ -1,99 +0,0 @@ -define(['exports', 'module', '../utils', '../exception'], function (exports, module, _utils, _exception) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - module.exports = function (instance) { - instance.registerHelper('each', function (context, options) { - if (!options) { - throw new _Exception['default']('Must pass iterator to #each'); - } - - var fn = options.fn, - inverse = options.inverse, - i = 0, - ret = '', - data = undefined, - contextPath = undefined; - - if (options.data && options.ids) { - contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; - } - - if (_utils.isFunction(context)) { - context = context.call(this); - } - - if (options.data) { - data = _utils.createFrame(options.data); - } - - function execIteration(field, index, last) { - if (data) { - data.key = field; - data.index = index; - data.first = index === 0; - data.last = !!last; - - if (contextPath) { - data.contextPath = contextPath + field; - } - } - - ret = ret + fn(context[field], { - data: data, - blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) - }); - } - - if (context && typeof context === 'object') { - if (_utils.isArray(context)) { - for (var j = context.length; i < j; i++) { - if (i in context) { - execIteration(i, i, i === context.length - 1); - } - } - } else if (global.Symbol && context[global.Symbol.iterator]) { - var newContext = []; - var iterator = context[global.Symbol.iterator](); - for (var it = iterator.next(); !it.done; it = iterator.next()) { - newContext.push(it.value); - } - context = newContext; - for (var j = context.length; i < j; i++) { - execIteration(i, i, i === context.length - 1); - } - } else { - (function () { - var priorKey = undefined; - - Object.keys(context).forEach(function (key) { - // We're running the iterations one step out of sync so we can detect - // the last iteration without have to scan the object twice and create - // an itermediate keys array. - if (priorKey !== undefined) { - execIteration(priorKey, i - 1); - } - priorKey = key; - i++; - }); - if (priorKey !== undefined) { - execIteration(priorKey, i - 1, true); - } - })(); - } - } - - if (i === 0) { - ret = inverse(this); - } - - return ret; - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvZWFjaC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7bUJBU2UsVUFBUyxRQUFRLEVBQUU7QUFDaEMsWUFBUSxDQUFDLGNBQWMsQ0FBQyxNQUFNLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3pELFVBQUksQ0FBQyxPQUFPLEVBQUU7QUFDWixjQUFNLDBCQUFjLDZCQUE2QixDQUFDLENBQUM7T0FDcEQ7O0FBRUQsVUFBSSxFQUFFLEdBQUcsT0FBTyxDQUFDLEVBQUU7VUFDakIsT0FBTyxHQUFHLE9BQU8sQ0FBQyxPQUFPO1VBQ3pCLENBQUMsR0F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YS5rZXkgPSBmaWVsZDtcbiAgICAgICAgZGF0YS5pbmRleCA9IGluZGV4O1xuICAgICAgICBkYXRhLmZpcnN0ID0gaW5kZXggPT09IDA7XG4gICAgICAgIGRhdGEubGFzdCA9ICEhbGFzdDtcblxuICAgICAgICBpZiAoY29udGV4dFBhdGgpIHtcbiAgICAgICAgICBkYXRhLmNvbnRleHRQYXRoID0gY29udGV4dFBhdGggKyBmaWVsZDtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICByZXQgPVxuICAgICAgICByZXQgK1xuICAgICAgICBmbihjb250ZXh0W2ZpZWxkXSwge1xuICAgICAgICAgIGRhdGE6IGRhdGEsXG4gICAgICAgICAgYmxvY2tQYXJhbXM6IGJsb2NrUGFyYW1zKFxuICAgICAgICAgICAgW2NvbnRleHRbZmllbGRdLCBmaWVsZF0sXG4gICAgICAgICAgICBbY29udGV4dFBhdGggKyBmaWVsZCwgbnVsbF1cbiAgICAgICAgICApXG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGlmIChjb250ZXh0ICYmIHR5cGVvZiBjb250ZXh0ID09PSAnb2JqZWN0Jykge1xuICAgICAgaWYgKGlzQXJyYXkoY29udGV4dCkpIHtcbiAgICAgICAgZm9yIChsZXQgaiA9IGNvbnRleHQubGVuZ3RoOyBpIDwgajsgaSsrKSB7XG4gICAgICAgICAgaWYgKGkgaW4gY29udGV4dCkge1xuICAgICAgICAgICAgZXhlY0l0ZXJhdGlvbihpLCBpLCBpID09PSBjb250ZXh0Lmxlbmd0aCAtIDEpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSBlbHNlIGlmIChnbG9iYWwuU3ltYm9sICYmIGNvbnRleHRbZ2xvYmFsLlN5bWJvbC5pdGVyYXRvcl0pIHtcbiAgICAgICAgY29uc3QgbmV3Q29udGV4dCA9IFtdO1xuICAgICAgICBjb25zdCBpdGVyYXRvciA9IGNvbnRleHRbZ2xvYmFsLlN5bWJvbC5pdGVyYXRvcl0oKTtcbiAgICAgICAgZm9yIChsZXQgaXQgPSBpdGVyYXRvci5uZXh0KCk7ICFpdC5kb25lOyBpdCA9IGl0ZXJhdG9yLm5leHQoKSkge1xuICAgICAgICAgIG5ld0NvbnRleHQucHVzaChpdC52YWx1ZSk7XG4gICAgICAgIH1cbiAgICAgICAgY29udGV4dCA9IG5ld0NvbnRleHQ7XG4gICAgICAgIGZvciAobGV0IGogPSBjb250ZXh0Lmxlbmd0aDsgaSA8IGo7IGkrKykge1xuICAgICAgICAgIGV4ZWNJdGVyYXRpb24oaSwgaSwgaSA9PT0gY29udGV4dC5sZW5ndGggLSAxKTtcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgbGV0IHByaW9yS2V5O1xuXG4gICAgICAgIE9iamVjdC5rZXlzKGNvbnRleHQpLmZvckVhY2goa2V5ID0+IHtcbiAgICAgICAgICAvLyBXZSdyZSBydW5uaW5nIHRoZSBpdGVyYXRpb25zIG9uZSBzdGVwIG91dCBvZiBzeW5jIHNvIHdlIGNhbiBkZXRlY3RcbiAgICAgICAgICAvLyB0aGUgbGFzdCBpdGVyYXRpb24gd2l0aG91dCBoYXZlIHRvIHNjYW4gdGhlIG9iamVjdCB0d2ljZSBhbmQgY3JlYXRlXG4gICAgICAgICAgLy8gYW4gaXRlcm1lZGlhdGUga2V5cyBhcnJheS5cbiAgICAgICAgICBpZiAocHJpb3JLZXkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgZXhlY0l0ZXJhdGlvbihwcmlvcktleSwgaSAtIDEpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBwcmlvcktleSA9IGtleTtcbiAgICAgICAgICBpKys7XG4gICAgICAgIH0pO1xuICAgICAgICBpZiAocHJpb3JLZXkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIGV4ZWNJdGVyYXRpb24ocHJpb3JLZXksIGkgLSAxLCB0cnVlKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIGlmIChpID09PSAwKSB7XG4gICAgICByZXQgPSBpbnZlcnNlKHRoaXMpO1xuICAgIH1cblxuICAgIHJldHVybiByZXQ7XG4gIH0pO1xufVxuIl19 diff --git a/node_modules/handlebars/dist/amd/handlebars/helpers/helper-missing.js b/node_modules/handlebars/dist/amd/handlebars/helpers/helper-missing.js deleted file mode 100644 index 0a3442ef..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/helpers/helper-missing.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['exports', 'module', '../exception'], function (exports, module, _exception) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - module.exports = function (instance) { - instance.registerHelper('helperMissing', function () /* [args, ]options */{ - if (arguments.length === 1) { - // A missing field in a {{foo}} construct. - return undefined; - } else { - // Someone is actually trying to call something, blow up. - throw new _Exception['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); - } - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O21CQUVlLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxjQUFjLENBQUMsZUFBZSxFQUFFLGlDQUFnQztBQUN2RSxVQUFJLFNBQVMsQ0FBQyxNQUFNLEtBQUssQ0FBQyxFQUFFOztBQUUxQixlQUFPLFNBQVMsQ0FBQztPQUNsQixNQUFNOztBQUVMLGNBQU0sMEJBQ0osbUJBQW1CLEdBQUcsU0FBUyxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDLENBQUMsSUFBSSxHQUFHLEdBQUcsQ0FDakUsQ0FBQztPQUNIO0tBQ0YsQ0FBQyxDQUFDO0dBQ0oiLCJmaWxlIjoiaGVscGVyLW1pc3NpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRXhjZXB0aW9uIGZyb20gJy4uL2V4Y2VwdGlvbic7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVySGVscGVyKCdoZWxwZXJNaXNzaW5nJywgZnVuY3Rpb24oLyogW2FyZ3MsIF1vcHRpb25zICovKSB7XG4gICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDEpIHtcbiAgICAgIC8vIEEgbWlzc2luZyBmaWVsZCBpbiBhIHt7Zm9vfX0gY29uc3RydWN0LlxuICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9IGVsc2Uge1xuICAgICAgLy8gU29tZW9uZSBpcyBhY3R1YWxseSB0cnlpbmcgdG8gY2FsbCBzb21ldGhpbmcsIGJsb3cgdXAuXG4gICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKFxuICAgICAgICAnTWlzc2luZyBoZWxwZXI6IFwiJyArIGFyZ3VtZW50c1thcmd1bWVudHMubGVuZ3RoIC0gMV0ubmFtZSArICdcIidcbiAgICAgICk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ== diff --git a/node_modules/handlebars/dist/amd/handlebars/helpers/if.js b/node_modules/handlebars/dist/amd/handlebars/helpers/if.js deleted file mode 100644 index 301de2d1..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/helpers/if.js +++ /dev/null @@ -1,41 +0,0 @@ -define(['exports', 'module', '../utils', '../exception'], function (exports, module, _utils, _exception) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - module.exports = function (instance) { - instance.registerHelper('if', function (conditional, options) { - if (arguments.length != 2) { - throw new _Exception['default']('#if requires exactly one argument'); - } - if (_utils.isFunction(conditional)) { - conditional = conditional.call(this); - } - - // Default behavior is to render the positive path if the value is truthy and not empty. - // The `includeZero` option may be set to treat the condtional as purely not empty based on the - // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. - if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { - return options.inverse(this); - } else { - return options.fn(this); - } - }); - - instance.registerHelper('unless', function (conditional, options) { - if (arguments.length != 2) { - throw new _Exception['default']('#unless requires exactly one argument'); - } - return instance.helpers['if'].call(this, conditional, { - fn: options.inverse, - inverse: options.fn, - hash: options.hash - }); - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaWYuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O21CQUdlLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxjQUFjLENBQUMsSUFBSSxFQUFFLFVBQVMsV0FBVyxFQUFFLE9BQU8sRUFBRTtBQUMzRCxVQUFJLFNBQVMsQ0FBQyxNQUFNLElBQUksQ0FBQyxFQUFFO0FBQ3pCLGNBQU0sMEJBQWMsbUNBQW1DLENBQUMsQ0FBQztPQUMxRDtBQUNELFVBQUksT0FSVSxVQUFVLENBUVQsV0FBVyxDQUFDLEVBQUU7QUFDM0IsbUJBQVcsR0FBRyxXQUFXLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO09BQ3RDOzs7OztBQUtELFVBQUksQUFBQyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsV0FBVyxJQUFJLENBQUMsV0FBVyxJQUFLLE9BZjlDLE9BQU8sQ0FlK0MsV0FBVyxDQUFDLEVBQUU7QUFDdkUsZUFBTyxPQUFPLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO09BQzlCLE1BQU07QUFDTCxl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uLFxuICAgICAgaGFzaDogb3B0aW9ucy5oYXNoXG4gICAgfSk7XG4gIH0pO1xufVxuIl19 diff --git a/node_modules/handlebars/dist/amd/handlebars/helpers/log.js b/node_modules/handlebars/dist/amd/handlebars/helpers/log.js deleted file mode 100644 index 5709b0a9..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/helpers/log.js +++ /dev/null @@ -1,24 +0,0 @@ -define(['exports', 'module'], function (exports, module) { - 'use strict'; - - module.exports = function (instance) { - instance.registerHelper('log', function () /* message, options */{ - var args = [undefined], - options = arguments[arguments.length - 1]; - for (var i = 0; i < arguments.length - 1; i++) { - args.push(arguments[i]); - } - - var level = 1; - if (options.hash.level != null) { - level = options.hash.level; - } else if (options.data && options.data.level != null) { - level = options.data.level; - } - args[0] = level; - - instance.log.apply(instance, args); - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFBZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsY0FBYyxDQUFDLEtBQUssRUFBRSxrQ0FBaUM7QUFDOUQsVUFBSSxJQUFJLEdBQUcsQ0FBQyxTQUFTLENBQUM7VUFDcEIsT0FBTyxHQUFHLFNBQVMsQ0FBQyxTQUFTLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQyxDQUFDO0FBQzVDLFdBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxTQUFTLENBQUMsTUFBTSxHQUFHLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRTtBQUM3QyxZQUFJLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO09BQ3pCOztBQUVELFVBQUksS0FBSyxHQUFHLENBQUM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sbCkge1xuICAgICAgbGV2ZWwgPSBvcHRpb25zLmRhdGEubGV2ZWw7XG4gICAgfVxuICAgIGFyZ3NbMF0gPSBsZXZlbDtcblxuICAgIGluc3RhbmNlLmxvZyguLi5hcmdzKTtcbiAgfSk7XG59XG4iXX0= diff --git a/node_modules/handlebars/dist/amd/handlebars/helpers/lookup.js b/node_modules/handlebars/dist/amd/handlebars/helpers/lookup.js deleted file mode 100644 index 3f59ca84..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/helpers/lookup.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['exports', 'module'], function (exports, module) { - 'use strict'; - - module.exports = function (instance) { - instance.registerHelper('lookup', function (obj, field, options) { - if (!obj) { - // Note for 5.0: Change to "obj == null" in 5.0 - return obj; - } - return options.lookupProperty(obj, field); - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9va3VwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFBZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsY0FBYyxDQUFDLFFBQVEsRUFBRSxVQUFTLEdBQUcsRUFBRSxLQUFLLEVBQUUsT0FBTyxFQUFFO0FBQzlELFVBQUksQ0FBQyxHQUFHLEVBQUU7O0FBRVIsZUFBTyxHQUFHLENBQUM7T0FDWjtBQUNELGFBQU8sT0FBTyxDQUFDLGNBQWMsQ0FBQyxHQUFHLEVBQUUsS0FBSyxDQUFDLENBQUM7S0FDM0MsQ0FBQyxDQUFDO0dBQ0oiLCJmaWxlIjoibG9va3VwLmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ2xvb2t1cCcsIGZ1bmN0aW9uKG9iaiwgZmllbGQsIG9wdGlvbnMpIHtcbiAgICBpZiAoIW9iaikge1xuICAgICAgLy8gTm90ZSBmb3IgNS4wOiBDaGFuZ2UgdG8gXCJvYmogPT0gbnVsbFwiIGluIDUuMFxuICAgICAgcmV0dXJuIG9iajtcbiAgICB9XG4gICAgcmV0dXJuIG9wdGlvbnMubG9va3VwUHJvcGVydHkob2JqLCBmaWVsZCk7XG4gIH0pO1xufVxuIl19 diff --git a/node_modules/handlebars/dist/amd/handlebars/helpers/with.js b/node_modules/handlebars/dist/amd/handlebars/helpers/with.js deleted file mode 100644 index 34921a9b..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/helpers/with.js +++ /dev/null @@ -1,38 +0,0 @@ -define(['exports', 'module', '../utils', '../exception'], function (exports, module, _utils, _exception) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - module.exports = function (instance) { - instance.registerHelper('with', function (context, options) { - if (arguments.length != 2) { - throw new _Exception['default']('#with requires exactly one argument'); - } - if (_utils.isFunction(context)) { - context = context.call(this); - } - - var fn = options.fn; - - if (!_utils.isEmpty(context)) { - var data = options.data; - if (options.data && options.ids) { - data = _utils.createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); - } - - return fn(context, { - data: data, - blockParams: _utils.blockParams([context], [data && data.contextPath]) - }); - } else { - return options.inverse(this); - } - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvd2l0aC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7bUJBU2UsVUFBUyxRQUFRLEVBQUU7QUFDaEMsWUFBUSxDQUFDLGNBQWMsQ0FBQyxNQUFNLEVBQUUsVUFBUyxPQ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ICAgICAgICBkYXRhOiBkYXRhLFxuICAgICAgICBibG9ja1BhcmFtczogYmxvY2tQYXJhbXMoW2NvbnRleHRdLCBbZGF0YSAmJiBkYXRhLmNvbnRleHRQYXRoXSlcbiAgICAgIH0pO1xuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gb3B0aW9ucy5pbnZlcnNlKHRoaXMpO1xuICAgIH1cbiAgfSk7XG59XG4iXX0= diff --git a/node_modules/handlebars/dist/amd/handlebars/internal/create-new-lookup-object.js b/node_modules/handlebars/dist/amd/handlebars/internal/create-new-lookup-object.js deleted file mode 100644 index 7892e668..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/internal/create-new-lookup-object.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['exports', '../utils'], function (exports, _utils) { - 'use strict'; - - exports.__esModule = true; - exports.createNewLookupObject = createNewLookupObject; - - /** - * Create a new object with "null"-prototype to avoid truthy results on prototype properties. - * The resulting object can be used with "object[property]" to check if a property exists - * @param {...object} sources a varargs parameter of source objects that will be merged - * @returns {object} - */ - - function createNewLookupObject() { - for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) { - sources[_key] = arguments[_key]; - } - - return _utils.extend.apply(undefined, [Object.create(null)].concat(sources)); - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL2NyZWF0ZS1uZXctbG9va3VwLW9iamVjdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7O0FBUU8sV0FBUyxxQkFBcUIsR0FBYTtzQ0FBVCxPQUFPO0FBQVAsYUFBTzs7O0FBQzlDLFdBQU8sT0FUQSxNQUFNLG1CQVNDLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLFNBQUssT0FBTyxFQUFDLENBQUM7R0FDaEQiLCJmaWxlIjoiY3JlYXRlLW5ldy1sb29rdXAtb2JqZWN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgZXh0ZW5kIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vKipcbiAqIENyZWF0ZSBhIG5ldyBvYmplY3Qgd2l0aCBcIm51bGxcIi1wcm90b3R5cGUgdG8gYXZvaWQgdHJ1dGh5IHJlc3VsdHMgb24gcHJvdG90eXBlIHByb3BlcnRpZXMuXG4gKiBUaGUgcmVzdWx0aW5nIG9iamVjdCBjYW4gYmUgdXNlZCB3aXRoIFwib2JqZWN0W3Byb3BlcnR5XVwiIHRvIGNoZWNrIGlmIGEgcHJvcGVydHkgZXhpc3RzXG4gKiBAcGFyYW0gey4uLm9iamVjdH0gc291cmNlcyBhIHZhcmFyZ3MgcGFyYW1ldGVyIG9mIHNvdXJjZSBvYmplY3RzIHRoYXQgd2lsbCBiZSBtZXJnZWRcbiAqIEByZXR1cm5zIHtvYmplY3R9XG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVOZXdMb29rdXBPYmplY3QoLi4uc291cmNlcykge1xuICByZXR1cm4gZXh0ZW5kKE9iamVjdC5jcmVhdGUobnVsbCksIC4uLnNvdXJjZXMpO1xufVxuIl19 diff --git a/node_modules/handlebars/dist/amd/handlebars/internal/proto-access.js b/node_modules/handlebars/dist/amd/handlebars/internal/proto-access.js deleted file mode 100644 index 02ee1e0e..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/internal/proto-access.js +++ /dev/null @@ -1,66 +0,0 @@ -define(['exports', './create-new-lookup-object', '../logger'], function (exports, _createNewLookupObject, _logger) { - 'use strict'; - - exports.__esModule = true; - exports.createProtoAccessControl = createProtoAccessControl; - exports.resultIsAllowed = resultIsAllowed; - exports.resetLoggedProperties = resetLoggedProperties; - - var loggedProperties = Object.create(null); - - function createProtoAccessControl(runtimeOptions) { - var defaultMethodWhiteList = Object.create(null); - defaultMethodWhiteList['constructor'] = false; - defaultMethodWhiteList['__defineGetter__'] = false; - defaultMethodWhiteList['__defineSetter__'] = false; - defaultMethodWhiteList['__lookupGetter__'] = false; - - var defaultPropertyWhiteList = Object.create(null); - // eslint-disable-next-line no-proto - defaultPropertyWhiteList['__proto__'] = false; - - return { - properties: { - whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties), - defaultValue: runtimeOptions.allowProtoPropertiesByDefault - }, - methods: { - whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods), - defaultValue: runtimeOptions.allowProtoMethodsByDefault - } - }; - } - - function resultIsAllowed(result, protoAccessControl, propertyName) { - if (typeof result === 'function') { - return checkWhiteList(protoAccessControl.methods, propertyName); - } else { - return checkWhiteList(protoAccessControl.properties, propertyName); - } - } - - function checkWhiteList(protoAccessControlForType, propertyName) { - if (protoAccessControlForType.whitelist[propertyName] !== undefined) { - return protoAccessControlForType.whitelist[propertyName] === true; - } - if (protoAccessControlForType.defaultValue !== undefined) { - return protoAccessControlForType.defaultValue; - } - logUnexpecedPropertyAccessOnce(propertyName); - return false; - } - - function logUnexpecedPropertyAccessOnce(propertyName) { - if (loggedProperties[propertyName] !== true) { - loggedProperties[propertyName] = true; - _logger.log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'); - } - } - - function resetLoggedProperties() { - Object.keys(loggedProperties).forEach(function (propertyName) { - delete loggedProperties[propertyName]; - }); - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL3Byb3RvLWFjY2Vzcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUdBLE1BQU0sZ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uY3Rpb24gcmVzZXRMb2dnZWRQcm9wZXJ0aWVzKCkge1xuICBPYmplY3Qua2V5cyhsb2dnZWRQcm9wZXJ0aWVzKS5mb3JFYWNoKHByb3BlcnR5TmFtZSA9PiB7XG4gICAgZGVsZXRlIGxvZ2dlZFByb3BlcnRpZXNbcHJvcGVydHlOYW1lXTtcbiAgfSk7XG59XG4iXX0= diff --git a/node_modules/handlebars/dist/amd/handlebars/internal/wrapHelper.js b/node_modules/handlebars/dist/amd/handlebars/internal/wrapHelper.js deleted file mode 100644 index 6b525a74..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/internal/wrapHelper.js +++ /dev/null @@ -1,21 +0,0 @@ -define(['exports'], function (exports) { - 'use strict'; - - exports.__esModule = true; - exports.wrapHelper = wrapHelper; - - function wrapHelper(helper, transformOptionsFn) { - if (typeof helper !== 'function') { - // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639 - // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function. - return helper; - } - var wrapper = function wrapper() /* dynamic arguments */{ - var options = arguments[arguments.length - 1]; - arguments[arguments.length - 1] = transformOptionsFn(options); - return helper.apply(this, arguments); - }; - return wrapper; - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL3dyYXBIZWxwZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQU8sV0FBUyxVQUFVLENBQUMsTUFBTSxFQUFFLGtCQUFrQixFQUFFO0FBQ3JELFFBQUksT0FBTyxNQUFNLEtBQUssVUFBVSxFQUFFOzs7QUFHaEMsYUFBTyxNQUFNLENBQUM7S0FDZjtBQUNELFFBQUksT0FBTyxHQUFHLFNBQVYsT0FBTywwQkFBcUM7QUFDOUMsVUFBTSxPQUFPLEdBQUcsU0FBUyxDQUFDLFNBQVMsQ0FBQyxNQ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HVybiB3cmFwcGVyO1xufVxuIl19 diff --git a/node_modules/handlebars/dist/amd/handlebars/logger.js b/node_modules/handlebars/dist/amd/handlebars/logger.js deleted file mode 100644 index f6df80a4..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/logger.js +++ /dev/null @@ -1,44 +0,0 @@ -define(['exports', 'module', './utils'], function (exports, module, _utils) { - 'use strict'; - - var logger = { - methodMap: ['debug', 'info', 'warn', 'error'], - level: 'info', - - // Maps a given level value to the `methodMap` indexes above. - lookupLevel: function lookupLevel(level) { - if (typeof level === 'string') { - var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); - if (levelMap >= 0) { - level = levelMap; - } else { - level = parseInt(level, 10); - } - } - - return level; - }, - - // Can be overridden in the host environment - log: function log(level) { - level = logger.lookupLevel(level); - - if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { - var method = logger.methodMap[level]; - // eslint-disable-next-line no-console - if (!console[method]) { - method = 'log'; - } - - for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - message[_key - 1] = arguments[_key]; - } - - console[method].apply(console, message); // eslint-disable-line no-console - } - } - }; - - module.exports = logger; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2xvZ2dlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxNQUFJLE1BQU0sR0FBRztBQUNYLGFBQVMsRUFBRSxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLE9BQU8sQ0FBQztBQUM3QyxTQUFLLEVBQUUsTUFBTTs7O0FBR2IsZUFBVyxFQUFFLHFCQUFTLEtBQUssRUFBRTtBQUMzQixVQUFJLE9BQU8sS0FBSyxLQUFLLFFBQVEsRUFBRTtBQUM3QixZQUFJLFFBQVEsR0FBRyxPQVRaLE9BQU8s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luZSBuby1jb25zb2xlXG4gICAgfVxuICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBsb2dnZXI7XG4iXX0= diff --git a/node_modules/handlebars/dist/amd/handlebars/no-conflict.js b/node_modules/handlebars/dist/amd/handlebars/no-conflict.js deleted file mode 100644 index 500408b6..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/no-conflict.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['exports', 'module'], function (exports, module) { - 'use strict'; - - module.exports = function (Handlebars) { - /* istanbul ignore next */ - var root = typeof global !== 'undefined' ? global : window, - $Handlebars = root.Handlebars; - /* istanbul ignore next */ - Handlebars.noConflict = function () { - if (root.Handlebars === Handlebars) { - root.Handlebars = $Handlebars; - } - return Handlebars; - }; - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL25vLWNvbmZsaWN0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFBZSxVQUFTLFVBQVUsRUFBRTs7QUFFbEMsUUFBSSxJQUFJLEdBQUcsT0FBTyxNQUFNLEtBQUssV0FBVyxHQUFHLE1BQU0sR0FBRyxNQUFNO1FBQ3hELFdBQVcsR0FBRyxJQUFJLENBQUMsVUFBVSxDQUFDOztBQUVoQyxjQUFVLENBQUMsVUFBVSxHQUFHLFlBQVc7QUFDakMsVUFBSSxJQUFJLENBQUMsVUFBVSxLQUFLLFVBQVUsRUFBRTtBQUNsQyxZQUFJLENBQUMsVUFBVSxHQUFHLFdBQVcsQ0FBQztPQUMvQjtBQUNELGFBQU8sVUFBVSxDQUFDO0tBQ25CLENBQUM7R0FDSCIsImZpbGUiOiJuby1jb25mbGljdC5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKEhhbmRsZWJhcnMpIHtcbiAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgbGV0IHJvb3QgPSB0eXBlb2YgZ2xvYmFsICE9PSAndW5kZWZpbmVkJyA/IGdsb2JhbCA6IHdpbmRvdyxcbiAgICAkSGFuZGxlYmFycyA9IHJvb3QuSGFuZGxlYmFycztcbiAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgSGFuZGxlYmFycy5ub0NvbmZsaWN0ID0gZnVuY3Rpb24oKSB7XG4gICAgaWYgKHJvb3QuSGFuZGxlYmFycyA9PT0gSGFuZGxlYmFycykge1xuICAgICAgcm9vdC5IYW5kbGViYXJzID0gJEhhbmRsZWJhcnM7XG4gICAgfVxuICAgIHJldHVybiBIYW5kbGViYXJzO1xuICB9O1xufVxuIl19 diff --git a/node_modules/handlebars/dist/amd/handlebars/runtime.js b/node_modules/handlebars/dist/amd/handlebars/runtime.js deleted file mode 100644 index b9feb7ef..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/runtime.js +++ /dev/null @@ -1,356 +0,0 @@ -define(['exports', './utils', './exception', './base', './helpers', './internal/wrapHelper', './internal/proto-access'], function (exports, _utils, _exception, _base, _helpers, _internalWrapHelper, _internalProtoAccess) { - 'use strict'; - - exports.__esModule = true; - exports.checkRevision = checkRevision; - exports.template = template; - exports.wrapProgram = wrapProgram; - exports.resolvePartial = resolvePartial; - exports.invokePartial = invokePartial; - exports.noop = noop; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - function checkRevision(compilerInfo) { - var compilerRevision = compilerInfo && compilerInfo[0] || 1, - currentRevision = _base.COMPILER_REVISION; - - if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) { - return; - } - - if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) { - var runtimeVersions = _base.REVISION_CHANGES[currentRevision], - compilerVersions = _base.REVISION_CHANGES[compilerRevision]; - throw new _Exception['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); - } else { - // Use the embedded version info since the runtime doesn't know about this revision yet - throw new _Exception['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); - } - } - - function template(templateSpec, env) { - /* istanbul ignore next */ - if (!env) { - throw new _Exception['default']('No environment passed to template'); - } - if (!templateSpec || !templateSpec.main) { - throw new _Exception['default']('Unknown template object: ' + typeof templateSpec); - } - - templateSpec.main.decorator = templateSpec.main_d; - - // Note: Using env.VM references rather than local var references throughout this section to allow - // for external users to override these as pseudo-supported APIs. - env.VM.checkRevision(templateSpec.compiler); - - // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0) - var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7; - - function invokePartialWrapper(partial, context, options) { - if (options.hash) { - context = _utils.extend({}, context, options.hash); - if (options.ids) { - options.ids[0] = true; - } - } - partial = env.VM.resolvePartial.call(this, partial, context, options); - - var extendedOptions = _utils.extend({}, options, { - hooks: this.hooks, - protoAccessControl: this.protoAccessControl - }); - - var result = env.VM.invokePartial.call(this, partial, context, extendedOptions); - - if (result == null && env.compile) { - options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); - result = options.partials[options.name](context, extendedOptions); - } - if (result != null) { - if (options.indent) { - var lines = result.split('\n'); - for (var i = 0, l = lines.length; i < l; i++) { - if (!lines[i] && i + 1 === l) { - break; - } - - lines[i] = options.indent + lines[i]; - } - result = lines.join('\n'); - } - return result; - } else { - throw new _Exception['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); - } - } - - // Just add water - var container = { - strict: function strict(obj, name, loc) { - if (!obj || !(name in obj)) { - throw new _Exception['default']('"' + name + '" not defined in ' + obj, { - loc: loc - }); - } - return container.lookupProperty(obj, name); - }, - lookupProperty: function lookupProperty(parent, propertyName) { - var result = parent[propertyName]; - if (result == null) { - return result; - } - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return result; - } - - if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) { - return result; - } - return undefined; - }, - lookup: function lookup(depths, name) { - var len = depths.length; - for (var i = 0; i < len; i++) { - var result = depths[i] && container.lookupProperty(depths[i], name); - if (result != null) { - return depths[i][name]; - } - } - }, - lambda: function lambda(current, context) { - return typeof current === 'function' ? current.call(context) : current; - }, - - escapeExpression: _utils.escapeExpression, - invokePartial: invokePartialWrapper, - - fn: function fn(i) { - var ret = templateSpec[i]; - ret.decorator = templateSpec[i + '_d']; - return ret; - }, - - programs: [], - program: function program(i, data, declaredBlockParams, blockParams, depths) { - var programWrapper = this.programs[i], - fn = this.fn(i); - if (data || depths || blockParams || declaredBlockParams) { - programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); - } else if (!programWrapper) { - programWrapper = this.programs[i] = wrapProgram(this, i, fn); - } - return programWrapper; - }, - - data: function data(value, depth) { - while (value && depth--) { - value = value._parent; - } - return value; - }, - mergeIfNeeded: function mergeIfNeeded(param, common) { - var obj = param || common; - - if (param && common && param !== common) { - obj = _utils.extend({}, common, param); - } - - return obj; - }, - // An empty object to use as replacement for null-contexts - nullContext: Object.seal({}), - - noop: env.VM.noop, - compilerInfo: templateSpec.compiler - }; - - function ret(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var data = options.data; - - ret._setup(options); - if (!options.partial && templateSpec.useData) { - data = initData(context, data); - } - var depths = undefined, - blockParams = templateSpec.useBlockParams ? [] : undefined; - if (templateSpec.useDepths) { - if (options.depths) { - depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths; - } else { - depths = [context]; - } - } - - function main(context /*, options*/) { - return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); - } - - main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); - return main(context, options); - } - - ret.isTop = true; - - ret._setup = function (options) { - if (!options.partial) { - var mergedHelpers = _utils.extend({}, env.helpers, options.helpers); - wrapHelpersToPassLookupProperty(mergedHelpers, container); - container.helpers = mergedHelpers; - - if (templateSpec.usePartial) { - // Use mergeIfNeeded here to prevent compiling global partials multiple times - container.partials = container.mergeIfNeeded(options.partials, env.partials); - } - if (templateSpec.usePartial || templateSpec.useDecorators) { - container.decorators = _utils.extend({}, env.decorators, options.decorators); - } - - container.hooks = {}; - container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options); - - var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7; - _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers); - _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers); - } else { - container.protoAccessControl = options.protoAccessControl; // internal option - container.helpers = options.helpers; - container.partials = options.partials; - container.decorators = options.decorators; - container.hooks = options.hooks; - } - }; - - ret._child = function (i, data, blockParams, depths) { - if (templateSpec.useBlockParams && !blockParams) { - throw new _Exception['default']('must pass block params'); - } - if (templateSpec.useDepths && !depths) { - throw new _Exception['default']('must pass parent depths'); - } - - return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); - }; - return ret; - } - - function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { - function prog(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var currentDepths = depths; - if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) { - currentDepths = [context].concat(depths); - } - - return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); - } - - prog = executeDecorators(fn, prog, container, depths, data, blockParams); - - prog.program = i; - prog.depth = depths ? depths.length : 0; - prog.blockParams = declaredBlockParams || 0; - return prog; - } - - /** - * This is currently part of the official API, therefore implementation details should not be changed. - */ - - function resolvePartial(partial, context, options) { - if (!partial) { - if (options.name === '@partial-block') { - partial = options.data['partial-block']; - } else { - partial = options.partials[options.name]; - } - } else if (!partial.call && !options.name) { - // This is a dynamic partial that returned a string - options.name = partial; - partial = options.partials[partial]; - } - return partial; - } - - function invokePartial(partial, context, options) { - // Use the current closure context to save the partial-block if this partial - var currentPartialBlock = options.data && options.data['partial-block']; - options.partial = true; - if (options.ids) { - options.data.contextPath = options.ids[0] || options.data.contextPath; - } - - var partialBlock = undefined; - if (options.fn && options.fn !== noop) { - (function () { - options.data = _base.createFrame(options.data); - // Wrapper function to get access to currentPartialBlock from the closure - var fn = options.fn; - partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - // Restore the partial-block from the closure for the execution of the block - // i.e. the part inside the block of the partial call. - options.data = _base.createFrame(options.data); - options.data['partial-block'] = currentPartialBlock; - return fn(context, options); - }; - if (fn.partials) { - options.partials = _utils.extend({}, options.partials, fn.partials); - } - })(); - } - - if (partial === undefined && partialBlock) { - partial = partialBlock; - } - - if (partial === undefined) { - throw new _Exception['default']('The partial ' + options.name + ' could not be found'); - } else if (partial instanceof Function) { - return partial(context, options); - } - } - - function noop() { - return ''; - } - - function initData(context, data) { - if (!data || !('root' in data)) { - data = data ? _base.createFrame(data) : {}; - data.root = context; - } - return data; - } - - function executeDecorators(fn, prog, container, depths, data, blockParams) { - if (fn.decorator) { - var props = {}; - prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); - _utils.extend(prog, props); - } - return prog; - } - - function wrapHelpersToPassLookupProperty(mergedHelpers, container) { - Object.keys(mergedHelpers).forEach(function (helperName) { - var helper = mergedHelpers[helperName]; - mergedHelpers[helperName] = passLookupPropertyOption(helper, container); - }); - } - - function passLookupPropertyOption(helper, container) { - var lookupProperty = container.lookupProperty; - return _internalWrapHelper.wrapHelper(helper, function (options) { - return _utils.extend({ lookupProperty: lookupProperty }, options); - }); - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy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HByb2c7XG59XG5cbmZ1bmN0aW9uIHdyYXBIZWxwZXJzVG9QYXNzTG9va3VwUHJvcGVydHkobWVyZ2VkSGVscGVycywgY29udGFpbmVyKSB7XG4gIE9iamVjdC5rZXlzKG1lcmdlZEhlbHBlcnMpLmZvckVhY2goaGVscGVyTmFtZSA9PiB7XG4gICAgbGV0IGhlbHBlciA9IG1lcmdlZEhlbHBlcnNbaGVscGVyTmFtZV07XG4gICAgbWVyZ2VkSGVscGVyc1toZWxwZXJOYW1lXSA9IHBhc3NMb29rdXBQcm9wZXJ0eU9wdGlvbihoZWxwZXIsIGNvbnRhaW5lcik7XG4gIH0pO1xufVxuXG5mdW5jdGlvbiBwYXNzTG9va3VwUHJvcGVydHlPcHRpb24oaGVscGVyLCBjb250YWluZXIpIHtcbiAgY29uc3QgbG9va3VwUHJvcGVydHkgPSBjb250YWluZXIubG9va3VwUHJvcGVydHk7XG4gIHJldHVybiB3cmFwSGVscGVyKGhlbHBlciwgb3B0aW9ucyA9PiB7XG4gICAgcmV0dXJuIFV0aWxzLmV4dGVuZCh7IGxvb2t1cFByb3BlcnR5IH0sIG9wdGlvbnMpO1xuICB9KTtcbn1cbiJdfQ== diff --git a/node_modules/handlebars/dist/amd/handlebars/safe-string.js b/node_modules/handlebars/dist/amd/handlebars/safe-string.js deleted file mode 100644 index 1c44286b..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/safe-string.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['exports', 'module'], function (exports, module) { - // Build out our basic SafeString type - 'use strict'; - - function SafeString(string) { - this.string = string; - } - - SafeString.prototype.toString = SafeString.prototype.toHTML = function () { - return '' + this.string; - }; - - module.exports = SafeString; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3NhZmUtc3RyaW5nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFDQSxXQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUU7QUFDMUIsUUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7R0FDdEI7O0FBRUQsWUFBVSxDQUFDLFNBQVMsQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsWUFBVztBQUN2RSxXQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDO0dBQ3pCLENBQUM7O21CQUVhLFVBQVUiLCJmaWxlIjoic2FmZS1zdHJpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBCdWlsZCBvdXQgb3VyIGJhc2ljIFNhZmVTdHJpbmcgdHlwZVxuZnVuY3Rpb24gU2FmZVN0cmluZyhzdHJpbmcpIHtcbiAgdGhpcy5zdHJpbmcgPSBzdHJpbmc7XG59XG5cblNhZmVTdHJpbmcucHJvdG90eXBlLnRvU3RyaW5nID0gU2FmZVN0cmluZy5wcm90b3R5cGUudG9IVE1MID0gZnVuY3Rpb24oKSB7XG4gIHJldHVybiAnJyArIHRoaXMuc3RyaW5nO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgU2FmZVN0cmluZztcbiJdfQ== diff --git a/node_modules/handlebars/dist/amd/handlebars/utils.js b/node_modules/handlebars/dist/amd/handlebars/utils.js deleted file mode 100644 index a9a6b0b4..00000000 --- a/node_modules/handlebars/dist/amd/handlebars/utils.js +++ /dev/null @@ -1,126 +0,0 @@ -define(['exports'], function (exports) { - 'use strict'; - - exports.__esModule = true; - exports.extend = extend; - exports.indexOf = indexOf; - exports.escapeExpression = escapeExpression; - exports.isEmpty = isEmpty; - exports.createFrame = createFrame; - exports.blockParams = blockParams; - exports.appendContextPath = appendContextPath; - var escape = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`', - '=': '=' - }; - - var badChars = /[&<>"'`=]/g, - possible = /[&<>"'`=]/; - - function escapeChar(chr) { - return escape[chr]; - } - - function extend(obj /* , ...source */) { - for (var i = 1; i < arguments.length; i++) { - for (var key in arguments[i]) { - if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { - obj[key] = arguments[i][key]; - } - } - } - - return obj; - } - - var toString = Object.prototype.toString; - - exports.toString = toString; - // Sourced from lodash - // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt - /* eslint-disable func-style */ - var isFunction = function isFunction(value) { - return typeof value === 'function'; - }; - // fallback for older versions of Chrome and Safari - /* istanbul ignore next */ - if (isFunction(/x/)) { - exports.isFunction = isFunction = function (value) { - return typeof value === 'function' && toString.call(value) === '[object Function]'; - }; - } - exports.isFunction = isFunction; - - /* eslint-enable func-style */ - - /* istanbul ignore next */ - var isArray = Array.isArray || function (value) { - return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; - }; - - exports.isArray = isArray; - // Older IE versions do not directly support indexOf so we must implement our own, sadly. - - function indexOf(array, value) { - for (var i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { - return i; - } - } - return -1; - } - - function escapeExpression(string) { - if (typeof string !== 'string') { - // don't escape SafeStrings, since they're already safe - if (string && string.toHTML) { - return string.toHTML(); - } else if (string == null) { - return ''; - } else if (!string) { - return string + ''; - } - - // Force a string conversion as this will be done by the append regardless and - // the regex test will do this transparently behind the scenes, causing issues if - // an object's to string has escaped characters in it. - string = '' + string; - } - - if (!possible.test(string)) { - return string; - } - return string.replace(badChars, escapeChar); - } - - function isEmpty(value) { - if (!value && value !== 0) { - return true; - } else if (isArray(value) && value.length === 0) { - return true; - } else { - return false; - } - } - - function createFrame(object) { - var frame = extend({}, object); - frame._parent = object; - return frame; - } - - function blockParams(params, ids) { - params.path = ids; - return params; - } - - function appendContextPath(contextPath, id) { - return (contextPath ? contextPath + '.' : '') + id; - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3V0aWxzLmpzI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gaWYgKCFwb3NzaWJsZS50ZXN0KHN0cmluZykpIHtcbiAgICByZXR1cm4gc3RyaW5nO1xuICB9XG4gIHJldHVybiBzdHJpbmcucmVwbGFjZShiYWRDaGFycywgZXNjYXBlQ2hhcik7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBpc0VtcHR5KHZhbHVlKSB7XG4gIGlmICghdmFsdWUgJiYgdmFsdWUgIT09IDApIHtcbiAgICByZXR1cm4gdHJ1ZTtcbiAgfSBlbHNlIGlmIChpc0FycmF5KHZhbHVlKSAmJiB2YWx1ZS5sZW5ndGggPT09IDApIHtcbiAgICByZXR1cm4gdHJ1ZTtcbiAgfSBlbHNlIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGNyZWF0ZUZyYW1lKG9iamVjdCkge1xuICBsZXQgZnJhbWUgPSBleHRlbmQoe30sIG9iamVjdCk7XG4gIGZyYW1lLl9wYXJlbnQgPSBvYmplY3Q7XG4gIHJldHVybiBmcmFtZTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGJsb2NrUGFyYW1zKHBhcmFtcywgaWRzKSB7XG4gIHBhcmFtcy5wYXRoID0gaWRzO1xuICByZXR1cm4gcGFyYW1zO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gYXBwZW5kQ29udGV4dFBhdGgoY29udGV4dFBhdGgsIGlkKSB7XG4gIHJldHVybiAoY29udGV4dFBhdGggPyBjb250ZXh0UGF0aCArICcuJyA6ICcnKSArIGlkO1xufVxuIl19 diff --git a/node_modules/handlebars/dist/amd/precompiler.js b/node_modules/handlebars/dist/amd/precompiler.js deleted file mode 100644 index a36fc424..00000000 --- a/node_modules/handlebars/dist/amd/precompiler.js +++ /dev/null @@ -1,313 +0,0 @@ -define(['exports', 'neo-async', 'fs', './handlebars', 'path', 'source-map'], function (exports, _neoAsync, _fs, _handlebars, _path, _sourceMap) { - /* eslint-disable no-console */ - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Async = _interopRequireDefault(_neoAsync); - - var _fs2 = _interopRequireDefault(_fs); - - module.exports.loadTemplates = function (opts, callback) { - loadStrings(opts, function (err, strings) { - if (err) { - callback(err); - } else { - loadFiles(opts, function (err, files) { - if (err) { - callback(err); - } else { - opts.templates = strings.concat(files); - callback(undefined, opts); - } - }); - } - }); - }; - - function loadStrings(opts, callback) { - var strings = arrayCast(opts.string), - names = arrayCast(opts.name); - - if (names.length !== strings.length && strings.length > 1) { - return callback(new _handlebars.Exception('Number of names did not match the number of string inputs')); - } - - _Async['default'].map(strings, function (string, callback) { - if (string !== '-') { - callback(undefined, string); - } else { - (function () { - // Load from stdin - var buffer = ''; - process.stdin.setEncoding('utf8'); - - process.stdin.on('data', function (chunk) { - buffer += chunk; - }); - process.stdin.on('end', function () { - callback(undefined, buffer); - }); - })(); - } - }, function (err, strings) { - strings = strings.map(function (string, index) { - return { - name: names[index], - path: names[index], - source: string - }; - }); - callback(err, strings); - }); - } - - function loadFiles(opts, callback) { - // Build file extension pattern - var extension = (opts.extension || 'handlebars').replace(/[\\^$*+?.():=!|{}\-[\]]/g, function (arg) { - return '\\' + arg; - }); - extension = new RegExp('\\.' + extension + '$'); - - var ret = [], - queue = (opts.files || []).map(function (template) { - return { template: template, root: opts.root }; - }); - _Async['default'].whilst(function () { - return queue.length; - }, function (callback) { - var _queue$shift = queue.shift(); - - var path = _queue$shift.template; - var root = _queue$shift.root; - - _fs2['default'].stat(path, function (err, stat) { - if (err) { - return callback(new _handlebars.Exception('Unable to open template file "' + path + '"')); - } - - if (stat.isDirectory()) { - opts.hasDirectory = true; - - _fs2['default'].readdir(path, function (err, children) { - /* istanbul ignore next : Race condition that being too lazy to test */ - if (err) { - return callback(err); - } - children.forEach(function (file) { - var childPath = path + '/' + file; - - if (extension.test(childPath) || _fs2['default'].statSync(childPath).isDirectory()) { - queue.push({ template: childPath, root: root || path }); - } - }); - - callback(); - }); - } else { - _fs2['default'].readFile(path, 'utf8', function (err, data) { - /* istanbul ignore next : Race condition that being too lazy to test */ - if (err) { - return callback(err); - } - - if (opts.bom && data.indexOf('') === 0) { - data = data.substring(1); - } - - // Clean the template name - var name = path; - if (!root) { - name = _path.basename(name); - } else if (name.indexOf(root) === 0) { - name = name.substring(root.length + 1); - } - name = name.replace(extension, ''); - - ret.push({ - path: path, - name: name, - source: data - }); - - callback(); - }); - } - }); - }, function (err) { - if (err) { - callback(err); - } else { - callback(undefined, ret); - } - }); - } - - module.exports.cli = function (opts) { - if (opts.version) { - console.log(_handlebars.VERSION); - return; - } - - if (!opts.templates.length && !opts.hasDirectory) { - throw new _handlebars.Exception('Must define at least one template or directory.'); - } - - if (opts.simple && opts.min) { - throw new _handlebars.Exception('Unable to minimize simple output'); - } - - var multiple = opts.templates.length !== 1 || opts.hasDirectory; - if (opts.simple && multiple) { - throw new _handlebars.Exception('Unable to output multiple templates in simple mode'); - } - - // Force simple mode if we have only one template and it's unnamed. - if (!opts.amd && !opts.commonjs && opts.templates.length === 1 && !opts.templates[0].name) { - opts.simple = true; - } - - // Convert the known list into a hash - var known = {}; - if (opts.known && !Array.isArray(opts.known)) { - opts.known = [opts.known]; - } - if (opts.known) { - for (var i = 0, len = opts.known.length; i < len; i++) { - known[opts.known[i]] = true; - } - } - - var objectName = opts.partial ? 'Handlebars.partials' : 'templates'; - - var output = new _sourceMap.SourceNode(); - if (!opts.simple) { - if (opts.amd) { - output.add("define(['" + opts.handlebarPath + 'handlebars.runtime\'], function(Handlebars) {\n Handlebars = Handlebars["default"];'); - } else if (opts.commonjs) { - output.add('var Handlebars = require("' + opts.commonjs + '");'); - } else { - output.add('(function() {\n'); - } - output.add(' var template = Handlebars.template, templates = '); - if (opts.namespace) { - output.add(opts.namespace); - output.add(' = '); - output.add(opts.namespace); - output.add(' || '); - } - output.add('{};\n'); - } - - opts.templates.forEach(function (template) { - var options = { - knownHelpers: known, - knownHelpersOnly: opts.o - }; - - if (opts.map) { - options.srcName = template.path; - } - if (opts.data) { - options.data = true; - } - - var precompiled = _handlebars.precompile(template.source, options); - - // If we are generating a source map, we have to reconstruct the SourceNode object - if (opts.map) { - var consumer = new _sourceMap.SourceMapConsumer(precompiled.map); - precompiled = _sourceMap.SourceNode.fromStringWithSourceMap(precompiled.code, consumer); - } - - if (opts.simple) { - output.add([precompiled, '\n']); - } else { - if (!template.name) { - throw new _handlebars.Exception('Name missing for template'); - } - - if (opts.amd && !multiple) { - output.add('return '); - } - output.add([objectName, "['", template.name, "'] = template(", precompiled, ');\n']); - } - }); - - // Output the content - if (!opts.simple) { - if (opts.amd) { - if (multiple) { - output.add(['return ', objectName, ';\n']); - } - output.add('});'); - } else if (!opts.commonjs) { - output.add('})();'); - } - } - - if (opts.map) { - output.add('\n//# sourceMappingURL=' + opts.map + '\n'); - } - - output = output.toStringWithSourceMap(); - output.map = output.map + ''; - - if (opts.min) { - output = minify(output, opts.map); - } - - if (opts.map) { - _fs2['default'].writeFileSync(opts.map, output.map, 'utf8'); - } - output = output.code; - - if (opts.output) { - _fs2['default'].writeFileSync(opts.output, output, 'utf8'); - } else { - console.log(output); - } - }; - - function arrayCast(value) { - value = value != null ? value : []; - if (!Array.isArray(value)) { - value = [value]; - } - return value; - } - - /** - * Run uglify to minify the compiled template, if uglify exists in the dependencies. - * - * We are using `require` instead of `import` here, because es6-modules do not allow - * dynamic imports and uglify-js is an optional dependency. Since we are inside NodeJS here, this - * should not be a problem. - * - * @param {string} output the compiled template - * @param {string} sourceMapFile the file to write the source map to. - */ - function minify(output, sourceMapFile) { - try { - // Try to resolve uglify-js in order to see if it does exist - require.resolve('uglify-js'); - } catch (e) { - if (e.code !== 'MODULE_NOT_FOUND') { - // Something else seems to be wrong - throw e; - } - // it does not exist! - console.error('Code minimization is disabled due to missing uglify-js dependency'); - return output; - } - return require('uglify-js').minify(output.code, { - sourceMap: { - content: output.map, - url: sourceMapFile - } - }); - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;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gIGZzLnN0YXQocGF0aCwgZnVuY3Rpb24oZXJyLCBzdGF0KSB7XG4gICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICByZXR1cm4gY2FsbGJhY2soXG4gICAgICAgICAgICBuZXcgSGFuZGxlYmFycy5FeGNlcHRpb24oYFVuYWJsZSB0byBvcGVuIHRlbXBsYXRlIGZpbGUgXCIke3BhdGh9XCJgKVxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoc3RhdC5pc0RpcmVjdG9yeSgpKSB7XG4gICAgICAgICAgb3B0cy5oYXNEaXJlY3RvcnkgPSB0cnVlO1xuXG4gICAgICAgICAgZnMucmVhZGRpcihwYXRoLCBmdW5jdGlvbihlcnIsIGNoaWxkcmVuKSB7XG4gICAgICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCA6IFJhY2UgY29uZGl0aW9uIHRoYXQgYmVpbmcgdG9vIGxhenkgdG8gdGVzdCAqL1xuICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICByZXR1cm4gY2FsbGJhY2soZXJyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNoaWxkcmVuLmZvckVhY2goZnVuY3Rpb24oZmlsZSkge1xuICAgICAgICAgICAgICBsZXQgY2hpbGRQYXRoID0gcGF0aCArICcvJyArIGZpbGU7XG5cbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIGV4dGVuc2lvbi50ZXN0KGNoaWxkUGF0aCkgfHxcbiAgICAgICAgICAgICAgICBmcy5zdGF0U3luYyhjaGlsZFBhdGgpLmlzRGlyZWN0b3J5KClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgcXVldWUucHVzaCh7IHRlbXBsYXRlOiBjaGlsZFBhdGgsIHJvb3Q6IHJvb3QgfHwgcGF0aCB9KTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGNhbGxiYWNrKCk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgZnMucmVhZEZpbGUocGF0aCwgJ3V0ZjgnLCBmdW5jdGlvbihlcnIsIGRhdGEpIHtcbiAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0IDogUmFjZSBjb25kaXRpb24gdGhhdCBiZWluZyB0b28gbGF6eSB0byB0ZXN0ICovXG4gICAgICAgICAgICBpZiAoZXJyKSB7XG4gICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhlcnIpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAob3B0cy5ib20gJiYgZGF0YS5pbmRleE9mKCdcXHVGRUZGJykgPT09IDApIHtcbiAgICAgICAgICAgICAgZGF0YSA9IGRhdGEuc3Vic3RyaW5nKDEpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBDbGVhbiB0aGUgdGVtcGxhdGUgbmFtZVxuICAgICAgICAgICAgbGV0IG5hbWUgPSBwYXRoO1xuICAgICAgICAgICAgaWYgKCFyb290KSB7XG4gICAgICAgICAgICAgIG5hbWUgPSBiYXNlbmFtZShuYW1lKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobmFtZS5pbmRleE9mKHJvb3QpID09PSAwKSB7XG4gICAgICAgICAgICAgIG5hbWUgPSBuYW1lLnN1YnN0cmluZyhyb290Lmxlbmd0aCArIDEpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbmFtZSA9IG5hbWUucmVwbGFjZShleHRlbnNpb24sICcnKTtcblxuICAgICAgICAgICAgcmV0LnB1c2goe1xuICAgICAgICAgICAgICBwYXRoOiBwYXRoLFxuICAgICAgICAgICAgICBuYW1lOiBuYW1lLFxuICAgICAgICAgICAgICBzb3VyY2U6IGRhdGFcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBjYWxsYmFjaygpO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gIC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ICBzb3VyY2VNYXA6IHtcbiAgICAgIGNvbnRlbnQ6IG91dHB1dC5tYXAsXG4gICAgICB1cmw6IHNvdXJjZU1hcEZpbGVcbiAgICB9XG4gIH0pO1xufVxuIl19 diff --git a/node_modules/handlebars/dist/cjs/handlebars.js b/node_modules/handlebars/dist/cjs/handlebars.js deleted file mode 100644 index b6cdc33d..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -exports.__esModule = true; -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _handlebarsRuntime = require('./handlebars.runtime'); - -var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime); - -// Compiler imports - -var _handlebarsCompilerAst = require('./handlebars/compiler/ast'); - -var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst); - -var _handlebarsCompilerBase = require('./handlebars/compiler/base'); - -var _handlebarsCompilerCompiler = require('./handlebars/compiler/compiler'); - -var _handlebarsCompilerJavascriptCompiler = require('./handlebars/compiler/javascript-compiler'); - -var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler); - -var _handlebarsCompilerVisitor = require('./handlebars/compiler/visitor'); - -var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor); - -var _handlebarsNoConflict = require('./handlebars/no-conflict'); - -var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); - -var _create = _handlebarsRuntime2['default'].create; -function create() { - var hb = _create(); - - hb.compile = function (input, options) { - return _handlebarsCompilerCompiler.compile(input, options, hb); - }; - hb.precompile = function (input, options) { - return _handlebarsCompilerCompiler.precompile(input, options, hb); - }; - - hb.AST = _handlebarsCompilerAst2['default']; - hb.Compiler = _handlebarsCompilerCompiler.Compiler; - hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default']; - hb.Parser = _handlebarsCompilerBase.parser; - hb.parse = _handlebarsCompilerBase.parse; - hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing; - - return hb; -} - -var inst = create(); -inst.create = create; - -_handlebarsNoConflict2['default'](inst); - -inst.Visitor = _handlebarsCompilerVisitor2['default']; - -inst['default'] = inst; - -exports['default'] = inst; -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9oYW5kbGViYXJzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7aUNBQW9CLHNCQUFzQjs7Ozs7O3FDQUcxQiwyQkFBMkI7Ozs7c0NBS3BDLDRCQUE0Qjs7MENBQ1csZ0NBQWdDOztvREFDL0MsMkNBQTJDOzs7O3lDQUN0RCwrQkFBK0I7Ozs7b0NBRTVCLDBCQUEwQjs7OztBQUVqRCxJQUFJLE9BQU8sR0FBRywrQkFBUSxNQUFNLENBQUM7QUFDN0IsU0FBUyxNQUFNLEdBQUc7QUFDaEIsTUFBSSxFQUFFLEdBQUcsT0FBTyxFQUFFLENBQUM7O0FBRW5CLElBQUUsQ0FBQyxPQUFPLEdBQUcsVUFBUyxLQUFLLEVBQUUsT0FBTyxFQUFFO0FBQ3BDLFdBQU8sb0NBQVEsS0FBSyxFQUFFLE9BQU8sRUFBRSxFQUFFLENBQUMsQ0FBQztHQUNwQyxDQUFDO0FBQ0YsSUFBRSxDQUFDLFVBQVUsR0FBRyxVQUFTLEtBQUssRUFBRSxPQUFPLEVBQUU7QUFDdkMsV0FBTyx1Q0FBVyxLQUFLLEVBQUUsT0FBTyxFQUFFLEVBQUUsQ0FBQyxDQUFDO0dBQ3ZDLENBQUM7O0FBRUYsSUFBRSxDQUFDLEdBQUcscUNBQU0sQ0FBQztBQUNiLElBQUUsQ0FBQyxRQUFRLHVDQUFXLENBQUM7QUFDdkIsSUFBRSxDQUFDLGtCQUFrQixvREFBcUIsQ0FBQztBQUMzQ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hhbmRsZWJhcnMvbm8tY29uZmxpY3QnO1xuXG5sZXQgX2NyZWF0ZSA9IHJ1bnRpbWUuY3JlYXRlO1xuZnVuY3Rpb24gY3JlYXRlKCkge1xuICBsZXQgaGIgPSBfY3JlYXRlKCk7XG5cbiAgaGIuY29tcGlsZSA9IGZ1bmN0aW9uKGlucHV0LCBvcHRpb25zKSB7XG4gICAgcmV0dXJuIGNvbXBpbGUoaW5wdXQsIG9wdGlvbnMsIGhiKTtcbiAgfTtcbiAgaGIucHJlY29tcGlsZSA9IGZ1bmN0aW9uKGlucHV0LCBvcHRpb25zKSB7XG4gICAgcmV0dXJuIHByZWNvbXBpbGUoaW5wdXQsIG9wdGlvbnMsIGhiKTtcbiAgfTtcblxuICBoYi5BU1QgPSBBU1Q7XG4gIGhiLkNvbXBpbGVyID0gQ29tcGlsZXI7XG4gIGhiLkphdmFTY3JpcHRDb21waWxlciA9IEphdmFTY3JpcHRDb21waWxlcjtcbiAgaGIuUGFyc2VyID0gUGFyc2VyO1xuICBoYi5wYXJzZSA9IHBhcnNlO1xuICBoYi5wYXJzZVdpdGhvdXRQcm9jZXNzaW5nID0gcGFyc2VXaXRob3V0UHJvY2Vzc2luZztcblxuICByZXR1cm4gaGI7XG59XG5cbmxldCBpbnN0ID0gY3JlYXRlKCk7XG5pbnN0LmNyZWF0ZSA9IGNyZWF0ZTtcblxubm9Db25mbGljdChpbnN0KTtcblxuaW5zdC5WaXNpdG9yID0gVmlzaXRvcjtcblxuaW5zdFsnZGVmYXVsdCddID0gaW5zdDtcblxuZXhwb3J0IGRlZmF1bHQgaW5zdDtcbiJdfQ== diff --git a/node_modules/handlebars/dist/cjs/handlebars.runtime.js b/node_modules/handlebars/dist/cjs/handlebars.runtime.js deleted file mode 100644 index a4fe6c05..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars.runtime.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -exports.__esModule = true; -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -// istanbul ignore next - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -var _handlebarsBase = require('./handlebars/base'); - -var base = _interopRequireWildcard(_handlebarsBase); - -// Each of these augment the Handlebars object. No need to setup here. -// (This is done to easily share code between commonjs and browse envs) - -var _handlebarsSafeString = require('./handlebars/safe-string'); - -var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); - -var _handlebarsException = require('./handlebars/exception'); - -var _handlebarsException2 = _interopRequireDefault(_handlebarsException); - -var _handlebarsUtils = require('./handlebars/utils'); - -var Utils = _interopRequireWildcard(_handlebarsUtils); - -var _handlebarsRuntime = require('./handlebars/runtime'); - -var runtime = _interopRequireWildcard(_handlebarsRuntime); - -var _handlebarsNoConflict = require('./handlebars/no-conflict'); - -var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); - -// For compatibility and usage outside of module systems, make the Handlebars object a namespace -function create() { - var hb = new base.HandlebarsEnvironment(); - - Utils.extend(hb, base); - hb.SafeString = _handlebarsSafeString2['default']; - hb.Exception = _handlebarsException2['default']; - hb.Utils = Utils; - hb.escapeExpression = Utils.escapeExpression; - - hb.VM = runtime; - hb.template = function (spec) { - return runtime.template(spec, hb); - }; - - return hb; -} - -var inst = create(); -inst.create = create; - -_handlebarsNoConflict2['default'](inst); - -inst['default'] = inst; - -exports['default'] = inst; -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9oYW5kbGViYXJzLnJ1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OEJBQXNCLG1CQUFtQjs7SUFBN0IsSUFBSTs7Ozs7b0NBSU8sMEJB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nVudGltZS50ZW1wbGF0ZShzcGVjLCBoYik7XG4gIH07XG5cbiAgcmV0dXJuIGhiO1xufVxuXG5sZXQgaW5zdCA9IGNyZWF0ZSgpO1xuaW5zdC5jcmVhdGUgPSBjcmVhdGU7XG5cbm5vQ29uZmxpY3QoaW5zdCk7XG5cbmluc3RbJ2RlZmF1bHQnXSA9IGluc3Q7XG5cbmV4cG9ydCBkZWZhdWx0IGluc3Q7XG4iXX0= diff --git a/node_modules/handlebars/dist/cjs/handlebars/base.js b/node_modules/handlebars/dist/cjs/handlebars/base.js deleted file mode 100644 index 98b6ca42..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/base.js +++ /dev/null @@ -1,116 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.HandlebarsEnvironment = HandlebarsEnvironment; -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _utils = require('./utils'); - -var _exception = require('./exception'); - -var _exception2 = _interopRequireDefault(_exception); - -var _helpers = require('./helpers'); - -var _decorators = require('./decorators'); - -var _logger = require('./logger'); - -var _logger2 = _interopRequireDefault(_logger); - -var _internalProtoAccess = require('./internal/proto-access'); - -var VERSION = '4.7.7'; -exports.VERSION = VERSION; -var COMPILER_REVISION = 8; -exports.COMPILER_REVISION = COMPILER_REVISION; -var LAST_COMPATIBLE_COMPILER_REVISION = 7; - -exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION; -var REVISION_CHANGES = { - 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it - 2: '== 1.0.0-rc.3', - 3: '== 1.0.0-rc.4', - 4: '== 1.x.x', - 5: '== 2.0.0-alpha.x', - 6: '>= 2.0.0-beta.1', - 7: '>= 4.0.0 <4.3.0', - 8: '>= 4.3.0' -}; - -exports.REVISION_CHANGES = REVISION_CHANGES; -var objectType = '[object Object]'; - -function HandlebarsEnvironment(helpers, partials, decorators) { - this.helpers = helpers || {}; - this.partials = partials || {}; - this.decorators = decorators || {}; - - _helpers.registerDefaultHelpers(this); - _decorators.registerDefaultDecorators(this); -} - -HandlebarsEnvironment.prototype = { - constructor: HandlebarsEnvironment, - - logger: _logger2['default'], - log: _logger2['default'].log, - - registerHelper: function registerHelper(name, fn) { - if (_utils.toString.call(name) === objectType) { - if (fn) { - throw new _exception2['default']('Arg not supported with multiple helpers'); - } - _utils.extend(this.helpers, name); - } else { - this.helpers[name] = fn; - } - }, - unregisterHelper: function unregisterHelper(name) { - delete this.helpers[name]; - }, - - registerPartial: function registerPartial(name, partial) { - if (_utils.toString.call(name) === objectType) { - _utils.extend(this.partials, name); - } else { - if (typeof partial === 'undefined') { - throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined'); - } - this.partials[name] = partial; - } - }, - unregisterPartial: function unregisterPartial(name) { - delete this.partials[name]; - }, - - registerDecorator: function registerDecorator(name, fn) { - if (_utils.toString.call(name) === objectType) { - if (fn) { - throw new _exception2['default']('Arg not supported with multiple decorators'); - } - _utils.extend(this.decorators, name); - } else { - this.decorators[name] = fn; - } - }, - unregisterDecorator: function unregisterDecorator(name) { - delete this.decorators[name]; - }, - /** - * Reset the memory of illegal property accesses that have already been logged. - * @deprecated should only be used in handlebars test-cases - */ - resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() { - _internalProtoAccess.resetLoggedProperties(); - } -}; - -var log = _logger2['default'].log; - -exports.log = log; -exports.createFrame = _utils.createFrame; -exports.logger = _logger2['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7cUJBQThDLFNBQVM7O3lCQUNqQyxhQUFhOzs7O3VCQUNJLFdBQVc7OzBCQUNSLGNBQWM7O3NCQUNyQyxVQUFVOzs7O21DQUNTLHlCQUF5Qj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AgICAgIHRocm93IG5ldyBFeGNlcHRpb24oJ0FyZyBub3Qgc3VwcG9ydGVkIHdpdGggbXVsdGlwbGUgZGVjb3JhdG9ycycpO1xuICAgICAgfVxuICAgICAgZXh0ZW5kKHRoaXMuZGVjb3JhdG9ycywgbmFtZSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMuZGVjb3JhdG9yc1tuYW1lXSA9IGZuO1xuICAgIH1cbiAgfSxcbiAgdW5yZWdpc3RlckRlY29yYXRvcjogZnVuY3Rpb24obmFtZSkge1xuICAgIGRlbGV0ZSB0aGlzLmRlY29yYXRvcnNbbmFtZV07XG4gIH0sXG4gIC8qKlxuICAgKiBSZXNldCB0aGUgbWVtb3J5IG9mIGlsbGVnYWwgcHJvcGVydHkgYWNjZXNzZXMgdGhhdCBoYXZlIGFscmVhZHkgYmVlbiBsb2dnZWQuXG4gICAqIEBkZXByZWNhdGVkIHNob3VsZCBvbmx5IGJlIHVzZWQgaW4gaGFuZGxlYmFycyB0ZXN0LWNhc2VzXG4gICAqL1xuICByZXNldExvZ2dlZFByb3BlcnR5QWNjZXNzZXMoKSB7XG4gICAgcmVzZXRMb2dnZWRQcm9wZXJ0aWVzKCk7XG4gIH1cbn07XG5cbmV4cG9ydCBsZXQgbG9nID0gbG9nZ2VyLmxvZztcblxuZXhwb3J0IHsgY3JlYXRlRnJhbWUsIGxvZ2dlciB9O1xuIl19 diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js deleted file mode 100644 index 889f6d92..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -exports.__esModule = true; -var AST = { - // Public API used to evaluate derived attributes regarding AST nodes - helpers: { - // a mustache is definitely a helper if: - // * it is an eligible helper, and - // * it has at least one parameter or hash segment - helperExpression: function helperExpression(node) { - return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash); - }, - - scopedId: function scopedId(path) { - return (/^\.|this\b/.test(path.original) - ); - }, - - // an ID is simple if it only has one part, and that part is not - // `..` or `this`. - simpleId: function simpleId(path) { - return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; - } - } -}; - -// Must be exported as an object rather than the root of the module as the jison lexer -// must modify the object to operate properly. -exports['default'] = AST; -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2FzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxJQUFJLEdBQUcsR0FBRzs7QUFFUixTQUFPLEVBQUU7Ozs7QUFJUCxvQkFBZ0IsRUFBRSwwQkFBUyxJQUFJLEVBQUU7QUFDL0IsYUFDRSxJQUFJLENBQUMsSUFBSSxLQUFLLGVBQWUsSUFDNUIsQ0FBQyxJQUFJLENBQUMsSUFBSSxLQUFLLG1CQUFtQixJQUNqQyxJQUFJLENBQUMsSUFBSSxLQUFLLGdCQUFnQixDQUFBLElBQzlCLENBQUMsRUFBRSxBQUFDLElBQUksQ0FBQyxNQUFNLElBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLElBQUssSUFBSSxDQUFDLElBQUksQ0FBQSxBQUFDLEFBQUMsQ0FDdkQ7S0FDSDs7QUFFRCxZQUFRLEVBQUUsa0JBQVMsSUFBSSxFQUFFO0FBQ3ZCLGFBQU8sYUFBWSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDO1FBQUM7S0FDekM7Ozs7QUFJRCxZQUFRLEVBQUUsa0JBQVMsSUFBSSxFQUFFO0FBQ3ZCLGFBQ0UsSUFBSSxDQUFDLEtBQUssQ0FBQyxNQUFNLEtBQUssQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDL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8vIGAuLmAgb3IgYHRoaXNgLlxuICAgIHNpbXBsZUlkOiBmdW5jdGlvbihwYXRoKSB7XG4gICAgICByZXR1cm4gKFxuICAgICAgICBwYXRoLnBhcnRzLmxlbmd0aCA9PT0gMSAmJiAhQVNULmhlbHBlcnMuc2NvcGVkSWQocGF0aCkgJiYgIXBhdGguZGVwdGhcbiAgICAgICk7XG4gICAgfVxuICB9XG59O1xuXG4vLyBNdXN0IGJlIGV4cG9ydGVkIGFzIGFuIG9iamVjdCByYXRoZXIgdGhhbiB0aGUgcm9vdCBvZiB0aGUgbW9kdWxlIGFzIHRoZSBqaXNvbiBsZXhlclxuLy8gbXVzdCBtb2RpZnkgdGhlIG9iamVjdCB0byBvcGVyYXRlIHByb3Blcmx5LlxuZXhwb3J0IGRlZmF1bHQgQVNUO1xuIl19 diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js deleted file mode 100644 index 1c1e8f8b..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.parseWithoutProcessing = parseWithoutProcessing; -exports.parse = parse; -// istanbul ignore next - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _parser = require('./parser'); - -var _parser2 = _interopRequireDefault(_parser); - -var _whitespaceControl = require('./whitespace-control'); - -var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl); - -var _helpers = require('./helpers'); - -var Helpers = _interopRequireWildcard(_helpers); - -var _utils = require('../utils'); - -exports.parser = _parser2['default']; - -var yy = {}; -_utils.extend(yy, Helpers); - -function parseWithoutProcessing(input, options) { - // Just return if an already-compiled AST was passed in. - if (input.type === 'Program') { - return input; - } - - _parser2['default'].yy = yy; - - // Altering the shared object here, but this is ok as parser is a sync operation - yy.locInfo = function (locInfo) { - return new yy.SourceLocation(options && options.srcName, locInfo); - }; - - var ast = _parser2['default'].parse(input); - - return ast; -} - -function parse(input, options) { - var ast = parseWithoutProcessing(input, options); - var strip = new _whitespaceControl2['default'](options); - - return strip.accept(ast); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztzQkFBbUIsVUFBVTs7OztpQ0FDQyxzQkFBc0I7Ozs7dUJBQzNCLFdBQVc7O0lBQXhCLE9BQU87O3FCQUNJLFVBQVU7O1FBRXhCLE1BQU07O0FBRWYsSUFBSSxFQUFFLEdBQUcsRUFBRSxDQUFDO0FBQ1osY0FBTyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUM7O0FBRWIsU0FBUyxzQkFBc0IsQ0FBQyxLQUFLLEVBQUUsT0FBTyxFQUFFOztBQUVyRCxNQUFJLEtBQUssQ0FBQyxJQUFJLEtBQUssU0FBUyxFQUFFO0FBQzVCLFdBQU8sS0FBSyxDQUFDO0dBQ2Q7O0FBRUQsc0JBQU8sRUFBRSxHQUFHLEVBQUUsQ0FBQzs7O0FBR2YsSUFBRSxDQUFDLE9BQU8sR0FBRyxVQUFTLE9BQU8sRUFBRTtBQUM3QixXQUFPLElBQUksRUFBRSxDQUFDLGNBQWMsQ0FBQyxPQUFPLElBQUksT0FBTyxDQUFDLE9BQU8sRUFBRSxPQUFPLENBQUMsQ0FBQztHQUNuRSxDQUFDOztBQUVGLE1BQUksR0FBRyxHQUFHLG9CQUFPLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQzs7QUFFOUIsU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AgICByZXR1cm4gbmV3IHl5LlNvdXJjZUxvY2F0aW9uKG9wdGlvbnMgJiYgb3B0aW9ucy5zcmNOYW1lLCBsb2NJbmZvKTtcbiAgfTtcblxuICBsZXQgYXN0ID0gcGFyc2VyLnBhcnNlKGlucHV0KTtcblxuICByZXR1cm4gYXN0O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gcGFyc2UoaW5wdXQsIG9wdGlvbnMpIHtcbiAgbGV0IGFzdCA9IHBhcnNlV2l0aG91dFByb2Nlc3NpbmcoaW5wdXQsIG9wdGlvbnMpO1xuICBsZXQgc3RyaXAgPSBuZXcgV2hpdGVzcGFjZUNvbnRyb2wob3B0aW9ucyk7XG5cbiAgcmV0dXJuIHN0cmlwLmFjY2VwdChhc3QpO1xufVxuIl19 diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js deleted file mode 100644 index f3bc8db1..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js +++ /dev/null @@ -1,168 +0,0 @@ -/* global define */ -'use strict'; - -exports.__esModule = true; - -var _utils = require('../utils'); - -var SourceNode = undefined; - -try { - /* istanbul ignore next */ - if (typeof define !== 'function' || !define.amd) { - // We don't support this in AMD environments. For these environments, we asusme that - // they are running on the browser and thus have no need for the source-map library. - var SourceMap = require('source-map'); - SourceNode = SourceMap.SourceNode; - } -} catch (err) {} -/* NOP */ - -/* istanbul ignore if: tested but not covered in istanbul due to dist build */ -if (!SourceNode) { - SourceNode = function (line, column, srcFile, chunks) { - this.src = ''; - if (chunks) { - this.add(chunks); - } - }; - /* istanbul ignore next */ - SourceNode.prototype = { - add: function add(chunks) { - if (_utils.isArray(chunks)) { - chunks = chunks.join(''); - } - this.src += chunks; - }, - prepend: function prepend(chunks) { - if (_utils.isArray(chunks)) { - chunks = chunks.join(''); - } - this.src = chunks + this.src; - }, - toStringWithSourceMap: function toStringWithSourceMap() { - return { code: this.toString() }; - }, - toString: function toString() { - return this.src; - } - }; -} - -function castChunk(chunk, codeGen, loc) { - if (_utils.isArray(chunk)) { - var ret = []; - - for (var i = 0, len = chunk.length; i < len; i++) { - ret.push(codeGen.wrap(chunk[i], loc)); - } - return ret; - } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { - // Handle primitives that the SourceNode will throw up on - return chunk + ''; - } - return chunk; -} - -function CodeGen(srcFile) { - this.srcFile = srcFile; - this.source = []; -} - -CodeGen.prototype = { - isEmpty: function isEmpty() { - return !this.source.length; - }, - prepend: function prepend(source, loc) { - this.source.unshift(this.wrap(source, loc)); - }, - push: function push(source, loc) { - this.source.push(this.wrap(source, loc)); - }, - - merge: function merge() { - var source = this.empty(); - this.each(function (line) { - source.add([' ', line, '\n']); - }); - return source; - }, - - each: function each(iter) { - for (var i = 0, len = this.source.length; i < len; i++) { - iter(this.source[i]); - } - }, - - empty: function empty() { - var loc = this.currentLocation || { start: {} }; - return new SourceNode(loc.start.line, loc.start.column, this.srcFile); - }, - wrap: function wrap(chunk) { - var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1]; - - if (chunk instanceof SourceNode) { - return chunk; - } - - chunk = castChunk(chunk, this, loc); - - return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); - }, - - functionCall: function functionCall(fn, type, params) { - params = this.generateList(params); - return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); - }, - - quotedString: function quotedString(str) { - return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 - .replace(/\u2029/g, '\\u2029') + '"'; - }, - - objectLiteral: function objectLiteral(obj) { - // istanbul ignore next - - var _this = this; - - var pairs = []; - - Object.keys(obj).forEach(function (key) { - var value = castChunk(obj[key], _this); - if (value !== 'undefined') { - pairs.push([_this.quotedString(key), ':', value]); - } - }); - - var ret = this.generateList(pairs); - ret.prepend('{'); - ret.add('}'); - return ret; - }, - - generateList: function generateList(entries) { - var ret = this.empty(); - - for (var i = 0, len = entries.length; i < len; i++) { - if (i) { - ret.add(','); - } - - ret.add(castChunk(entries[i], this)); - } - - return ret; - }, - - generateArray: function generateArray(entries) { - var ret = this.generateList(entries); - ret.prepend('['); - ret.add(']'); - - return ret; - } -}; - -exports['default'] = CodeGen; -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2NvZGUtZ2VuLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O3FCQUN3QixVQUFVOztBQUVsQyxJQUFJLFVBQVUsWUFBQSxDQUFDOztBQUVmLElBQUk7O0FBRUYsTUFBSSxPQUFPLE1BQU0sS0FBSyxVQUFVLElBQUksQ0FBQyxNQUFNLENBQUMsR0FBRyxFQUFFOzs7QUFHL0MsUUFBSSxTQUFTLEdBQUcsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQUFDO0FBQ3RDLGNBQVUsR0FBRyxTQUFTLENBQUMsVUFBVSxDQUFDO0dBQ25DO0NBQ0YsQ0FBQyxPQUFPLEdBQUcsRUFBRSxFQUViOzs7O0FBQUEsQUFHRCxJQUFJLENBQUMsVUFBVSxFQUFFO0FBQ2YsWUFBVSxHQUFHLFVBQVMsSUFBSSxFQUFFLE1BQU0sRUFBRSxPQUFPLEVBQUUsTUFBTSxFQUFFO0FBQ25ELFFBQUksQ0FBQyxHQUFHLEdBQUcsRUFBRSxDQUFDO0FBQ2QsUUFBSSxNQUFNLEVBQUU7QUFDVixVQUFJLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBQyxDQUFDO0tBQ2xCO0dBQ0YsQ0FBQzs7QUFFRixZQUFVLENBQUMsU0FBUyxHQUFHO0FBQ3JCLE9BQUcsRUFBRSxhQUF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uZCgnWycpO1xuICAgIHJldC5hZGQoJ10nKTtcblxuICAgIHJldHVybiByZXQ7XG4gIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IENvZGVHZW47XG4iXX0= diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js deleted file mode 100644 index 73e6bce1..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js +++ /dev/null @@ -1,566 +0,0 @@ -/* eslint-disable new-cap */ - -'use strict'; - -exports.__esModule = true; -exports.Compiler = Compiler; -exports.precompile = precompile; -exports.compile = compile; -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _exception = require('../exception'); - -var _exception2 = _interopRequireDefault(_exception); - -var _utils = require('../utils'); - -var _ast = require('./ast'); - -var _ast2 = _interopRequireDefault(_ast); - -var slice = [].slice; - -function Compiler() {} - -// the foundHelper register will disambiguate helper lookup from finding a -// function in a context. This is necessary for mustache compatibility, which -// requires that context functions in blocks are evaluated by blockHelperMissing, -// and then proceed as if the resulting value was provided to blockHelperMissing. - -Compiler.prototype = { - compiler: Compiler, - - equals: function equals(other) { - var len = this.opcodes.length; - if (other.opcodes.length !== len) { - return false; - } - - for (var i = 0; i < len; i++) { - var opcode = this.opcodes[i], - otherOpcode = other.opcodes[i]; - if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { - return false; - } - } - - // We know that length is the same between the two arrays because they are directly tied - // to the opcode behavior above. - len = this.children.length; - for (var i = 0; i < len; i++) { - if (!this.children[i].equals(other.children[i])) { - return false; - } - } - - return true; - }, - - guid: 0, - - compile: function compile(program, options) { - this.sourceNode = []; - this.opcodes = []; - this.children = []; - this.options = options; - this.stringParams = options.stringParams; - this.trackIds = options.trackIds; - - options.blockParams = options.blockParams || []; - - options.knownHelpers = _utils.extend(Object.create(null), { - helperMissing: true, - blockHelperMissing: true, - each: true, - 'if': true, - unless: true, - 'with': true, - log: true, - lookup: true - }, options.knownHelpers); - - return this.accept(program); - }, - - compileProgram: function compileProgram(program) { - var childCompiler = new this.compiler(), - // eslint-disable-line new-cap - result = childCompiler.compile(program, this.options), - guid = this.guid++; - - this.usePartial = this.usePartial || result.usePartial; - - this.children[guid] = result; - this.useDepths = this.useDepths || result.useDepths; - - return guid; - }, - - accept: function accept(node) { - /* istanbul ignore next: Sanity code */ - if (!this[node.type]) { - throw new _exception2['default']('Unknown type: ' + node.type, node); - } - - this.sourceNode.unshift(node); - var ret = this[node.type](node); - this.sourceNode.shift(); - return ret; - }, - - Program: function Program(program) { - this.options.blockParams.unshift(program.blockParams); - - var body = program.body, - bodyLength = body.length; - for (var i = 0; i < bodyLength; i++) { - this.accept(body[i]); - } - - this.options.blockParams.shift(); - - this.isSimple = bodyLength === 1; - this.blockParams = program.blockParams ? program.blockParams.length : 0; - - return this; - }, - - BlockStatement: function BlockStatement(block) { - transformLiteralToPath(block); - - var program = block.program, - inverse = block.inverse; - - program = program && this.compileProgram(program); - inverse = inverse && this.compileProgram(inverse); - - var type = this.classifySexpr(block); - - if (type === 'helper') { - this.helperSexpr(block, program, inverse); - } else if (type === 'simple') { - this.simpleSexpr(block); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('blockValue', block.path.original); - } else { - this.ambiguousSexpr(block, program, inverse); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('ambiguousBlockValue'); - } - - this.opcode('append'); - }, - - DecoratorBlock: function DecoratorBlock(decorator) { - var program = decorator.program && this.compileProgram(decorator.program); - var params = this.setupFullMustacheParams(decorator, program, undefined), - path = decorator.path; - - this.useDecorators = true; - this.opcode('registerDecorator', params.length, path.original); - }, - - PartialStatement: function PartialStatement(partial) { - this.usePartial = true; - - var program = partial.program; - if (program) { - program = this.compileProgram(partial.program); - } - - var params = partial.params; - if (params.length > 1) { - throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial); - } else if (!params.length) { - if (this.options.explicitPartialContext) { - this.opcode('pushLiteral', 'undefined'); - } else { - params.push({ type: 'PathExpression', parts: [], depth: 0 }); - } - } - - var partialName = partial.name.original, - isDynamic = partial.name.type === 'SubExpression'; - if (isDynamic) { - this.accept(partial.name); - } - - this.setupFullMustacheParams(partial, program, undefined, true); - - var indent = partial.indent || ''; - if (this.options.preventIndent && indent) { - this.opcode('appendContent', indent); - indent = ''; - } - - this.opcode('invokePartial', isDynamic, partialName, indent); - this.opcode('append'); - }, - PartialBlockStatement: function PartialBlockStatement(partialBlock) { - this.PartialStatement(partialBlock); - }, - - MustacheStatement: function MustacheStatement(mustache) { - this.SubExpression(mustache); - - if (mustache.escaped && !this.options.noEscape) { - this.opcode('appendEscaped'); - } else { - this.opcode('append'); - } - }, - Decorator: function Decorator(decorator) { - this.DecoratorBlock(decorator); - }, - - ContentStatement: function ContentStatement(content) { - if (content.value) { - this.opcode('appendContent', content.value); - } - }, - - CommentStatement: function CommentStatement() {}, - - SubExpression: function SubExpression(sexpr) { - transformLiteralToPath(sexpr); - var type = this.classifySexpr(sexpr); - - if (type === 'simple') { - this.simpleSexpr(sexpr); - } else if (type === 'helper') { - this.helperSexpr(sexpr); - } else { - this.ambiguousSexpr(sexpr); - } - }, - ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { - var path = sexpr.path, - name = path.parts[0], - isBlock = program != null || inverse != null; - - this.opcode('getContext', path.depth); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - path.strict = true; - this.accept(path); - - this.opcode('invokeAmbiguous', name, isBlock); - }, - - simpleSexpr: function simpleSexpr(sexpr) { - var path = sexpr.path; - path.strict = true; - this.accept(path); - this.opcode('resolvePossibleLambda'); - }, - - helperSexpr: function helperSexpr(sexpr, program, inverse) { - var params = this.setupFullMustacheParams(sexpr, program, inverse), - path = sexpr.path, - name = path.parts[0]; - - if (this.options.knownHelpers[name]) { - this.opcode('invokeKnownHelper', params.length, name); - } else if (this.options.knownHelpersOnly) { - throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); - } else { - path.strict = true; - path.falsy = true; - - this.accept(path); - this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path)); - } - }, - - PathExpression: function PathExpression(path) { - this.addDepth(path.depth); - this.opcode('getContext', path.depth); - - var name = path.parts[0], - scoped = _ast2['default'].helpers.scopedId(path), - blockParamId = !path.depth && !scoped && this.blockParamIndex(name); - - if (blockParamId) { - this.opcode('lookupBlockParam', blockParamId, path.parts); - } else if (!name) { - // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` - this.opcode('pushContext'); - } else if (path.data) { - this.options.data = true; - this.opcode('lookupData', path.depth, path.parts, path.strict); - } else { - this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped); - } - }, - - StringLiteral: function StringLiteral(string) { - this.opcode('pushString', string.value); - }, - - NumberLiteral: function NumberLiteral(number) { - this.opcode('pushLiteral', number.value); - }, - - BooleanLiteral: function BooleanLiteral(bool) { - this.opcode('pushLiteral', bool.value); - }, - - UndefinedLiteral: function UndefinedLiteral() { - this.opcode('pushLiteral', 'undefined'); - }, - - NullLiteral: function NullLiteral() { - this.opcode('pushLiteral', 'null'); - }, - - Hash: function Hash(hash) { - var pairs = hash.pairs, - i = 0, - l = pairs.length; - - this.opcode('pushHash'); - - for (; i < l; i++) { - this.pushParam(pairs[i].value); - } - while (i--) { - this.opcode('assignToHash', pairs[i].key); - } - this.opcode('popHash'); - }, - - // HELPERS - opcode: function opcode(name) { - this.opcodes.push({ - opcode: name, - args: slice.call(arguments, 1), - loc: this.sourceNode[0].loc - }); - }, - - addDepth: function addDepth(depth) { - if (!depth) { - return; - } - - this.useDepths = true; - }, - - classifySexpr: function classifySexpr(sexpr) { - var isSimple = _ast2['default'].helpers.simpleId(sexpr.path); - - var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); - - // a mustache is an eligible helper if: - // * its id is simple (a single part, not `this` or `..`) - var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr); - - // if a mustache is an eligible helper but not a definite - // helper, it is ambiguous, and will be resolved in a later - // pass or at runtime. - var isEligible = !isBlockParam && (isHelper || isSimple); - - // if ambiguous, we can possibly resolve the ambiguity now - // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. - if (isEligible && !isHelper) { - var _name = sexpr.path.parts[0], - options = this.options; - if (options.knownHelpers[_name]) { - isHelper = true; - } else if (options.knownHelpersOnly) { - isEligible = false; - } - } - - if (isHelper) { - return 'helper'; - } else if (isEligible) { - return 'ambiguous'; - } else { - return 'simple'; - } - }, - - pushParams: function pushParams(params) { - for (var i = 0, l = params.length; i < l; i++) { - this.pushParam(params[i]); - } - }, - - pushParam: function pushParam(val) { - var value = val.value != null ? val.value : val.original || ''; - - if (this.stringParams) { - if (value.replace) { - value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); - } - - if (val.depth) { - this.addDepth(val.depth); - } - this.opcode('getContext', val.depth || 0); - this.opcode('pushStringParam', value, val.type); - - if (val.type === 'SubExpression') { - // SubExpressions get evaluated and passed in - // in string params mode. - this.accept(val); - } - } else { - if (this.trackIds) { - var blockParamIndex = undefined; - if (val.parts && !_ast2['default'].helpers.scopedId(val) && !val.depth) { - blockParamIndex = this.blockParamIndex(val.parts[0]); - } - if (blockParamIndex) { - var blockParamChild = val.parts.slice(1).join('.'); - this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); - } else { - value = val.original || value; - if (value.replace) { - value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, ''); - } - - this.opcode('pushId', val.type, value); - } - } - this.accept(val); - } - }, - - setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { - var params = sexpr.params; - this.pushParams(params); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - if (sexpr.hash) { - this.accept(sexpr.hash); - } else { - this.opcode('emptyHash', omitEmpty); - } - - return params; - }, - - blockParamIndex: function blockParamIndex(name) { - for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { - var blockParams = this.options.blockParams[depth], - param = blockParams && _utils.indexOf(blockParams, name); - if (blockParams && param >= 0) { - return [depth, param]; - } - } - } -}; - -function precompile(input, options, env) { - if (input == null || typeof input !== 'string' && input.type !== 'Program') { - throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); - } - - options = options || {}; - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - var ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options); - return new env.JavaScriptCompiler().compile(environment, options); -} - -function compile(input, options, env) { - if (options === undefined) options = {}; - - if (input == null || typeof input !== 'string' && input.type !== 'Program') { - throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); - } - - options = _utils.extend({}, options); - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - var compiled = undefined; - - function compileInput() { - var ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options), - templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); - return env.template(templateSpec); - } - - // Template is only compiled on first use and cached after that point. - function ret(context, execOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled.call(this, context, execOptions); - } - ret._setup = function (setupOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._setup(setupOptions); - }; - ret._child = function (i, data, blockParams, depths) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._child(i, data, blockParams, depths); - }; - return ret; -} - -function argEquals(a, b) { - if (a === b) { - return true; - } - - if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { - for (var i = 0; i < a.length; i++) { - if (!argEquals(a[i], b[i])) { - return false; - } - } - return true; - } -} - -function transformLiteralToPath(sexpr) { - if (!sexpr.path.parts) { - var literal = sexpr.path; - // Casting to string here to make false and 0 literal values play nicely with the rest - // of the system. - sexpr.path = { - type: 'PathExpression', - data: false, - depth: 0, - parts: [literal.original + ''], - original: literal.original + '', - loc: literal.loc - }; - } -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2NvbXBpbGVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozt5QkFFc0IsY0FBYzs7OztxQkFDSyxVQUFVOzttQkFDbkMsT0FBTzs7OztBQUV2QixJQUFNLEtBQUssR0FBRyxFQUFFLENBQUMsS0FBSyxDQUFDOztBQUVoQixTQUFTLFFBQVEsR0FBRyxFQUFFOzs7Ozs7O0FBTzdCLFFBQVEsQ0FBQyxTQUFTLEdBQUc7QUFDbkIsVUFBUSxFQUFFLFFBQVE7O0FBRWxCLFFBQU0sRUFBRSxnQkFBUyxLQUFLLEVBQUU7QUFDdEIsUUFBSSxHQUFHLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUM7QUFDOUIsUUFBSSxLQUFLLENBQUMsT0FBTyxDQUFDLE1BQU0sS0FBSyxHQUFHLEVBQUU7QUFDaEMsYUFBTyxLQUFLLENBQUM7S0FDZDs7QUFFRCxTQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsR0FBRyxFQUFFLENBQUMsRUFBRSxFQUFFO0FBQzVCLFVBQUksTUFBTSxHQUFHLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDO1VBQzFCLFdBQVcsR0FBRyxLQUFLLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ2pDLFVBQ0UsTUFBTSxDQUFDLE1BQU0sS0FBSyxXQ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0IGkgPSAwOyBpIDwgYS5sZW5ndGg7IGkrKykge1xuICAgICAgaWYgKCFhcmdFcXVhbHMoYVtpXSwgYltpXSkpIHtcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gdHJ1ZTtcbiAgfVxufVxuXG5mdW5jdGlvbiB0cmFuc2Zvcm1MaXRlcmFsVG9QYXRoKHNleHByKSB7XG4gIGlmICghc2V4cHIucGF0aC5wYXJ0cykge1xuICAgIGxldCBsaXRlcmFsID0gc2V4cHIucGF0aDtcbiAgICAvLyBDYXN0aW5nIHRvIHN0cmluZyBoZXJlIHRvIG1ha2UgZmFsc2UgYW5kIDAgbGl0ZXJhbCB2YWx1ZXMgcGxheSBuaWNlbHkgd2l0aCB0aGUgcmVzdFxuICAgIC8vIG9mIHRoZSBzeXN0ZW0uXG4gICAgc2V4cHIucGF0aCA9IHtcbiAgICAgIHR5cGU6ICdQYXRoRXhwcmVzc2lvbicsXG4gICAgICBkYXRhOiBmYWxzZSxcbiAgICAgIGRlcHRoOiAwLFxuICAgICAgcGFydHM6IFtsaXRlcmFsLm9yaWdpbmFsICsgJyddLFxuICAgICAgb3JpZ2luYWw6IGxpdGVyYWwub3JpZ2luYWwgKyAnJyxcbiAgICAgIGxvYzogbGl0ZXJhbC5sb2NcbiAgICB9O1xuICB9XG59XG4iXX0= diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js deleted file mode 100644 index fd1ecc59..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js +++ /dev/null @@ -1,228 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.SourceLocation = SourceLocation; -exports.id = id; -exports.stripFlags = stripFlags; -exports.stripComment = stripComment; -exports.preparePath = preparePath; -exports.prepareMustache = prepareMustache; -exports.prepareRawBlock = prepareRawBlock; -exports.prepareBlock = prepareBlock; -exports.prepareProgram = prepareProgram; -exports.preparePartialBlock = preparePartialBlock; -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _exception = require('../exception'); - -var _exception2 = _interopRequireDefault(_exception); - -function validateClose(open, close) { - close = close.path ? close.path.original : close; - - if (open.path.original !== close) { - var errorNode = { loc: open.path.loc }; - - throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode); - } -} - -function SourceLocation(source, locInfo) { - this.source = source; - this.start = { - line: locInfo.first_line, - column: locInfo.first_column - }; - this.end = { - line: locInfo.last_line, - column: locInfo.last_column - }; -} - -function id(token) { - if (/^\[.*\]$/.test(token)) { - return token.substring(1, token.length - 1); - } else { - return token; - } -} - -function stripFlags(open, close) { - return { - open: open.charAt(2) === '~', - close: close.charAt(close.length - 3) === '~' - }; -} - -function stripComment(comment) { - return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, ''); -} - -function preparePath(data, parts, loc) { - loc = this.locInfo(loc); - - var original = data ? '@' : '', - dig = [], - depth = 0; - - for (var i = 0, l = parts.length; i < l; i++) { - var part = parts[i].part, - - // If we have [] syntax then we do not treat path references as operators, - // i.e. foo.[this] resolves to approximately context.foo['this'] - isLiteral = parts[i].original !== part; - original += (parts[i].separator || '') + part; - - if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { - if (dig.length > 0) { - throw new _exception2['default']('Invalid path: ' + original, { loc: loc }); - } else if (part === '..') { - depth++; - } - } else { - dig.push(part); - } - } - - return { - type: 'PathExpression', - data: data, - depth: depth, - parts: dig, - original: original, - loc: loc - }; -} - -function prepareMustache(path, params, hash, open, strip, locInfo) { - // Must use charAt to support IE pre-10 - var escapeFlag = open.charAt(3) || open.charAt(2), - escaped = escapeFlag !== '{' && escapeFlag !== '&'; - - var decorator = /\*/.test(open); - return { - type: decorator ? 'Decorator' : 'MustacheStatement', - path: path, - params: params, - hash: hash, - escaped: escaped, - strip: strip, - loc: this.locInfo(locInfo) - }; -} - -function prepareRawBlock(openRawBlock, contents, close, locInfo) { - validateClose(openRawBlock, close); - - locInfo = this.locInfo(locInfo); - var program = { - type: 'Program', - body: contents, - strip: {}, - loc: locInfo - }; - - return { - type: 'BlockStatement', - path: openRawBlock.path, - params: openRawBlock.params, - hash: openRawBlock.hash, - program: program, - openStrip: {}, - inverseStrip: {}, - closeStrip: {}, - loc: locInfo - }; -} - -function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { - if (close && close.path) { - validateClose(openBlock, close); - } - - var decorator = /\*/.test(openBlock.open); - - program.blockParams = openBlock.blockParams; - - var inverse = undefined, - inverseStrip = undefined; - - if (inverseAndProgram) { - if (decorator) { - throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram); - } - - if (inverseAndProgram.chain) { - inverseAndProgram.program.body[0].closeStrip = close.strip; - } - - inverseStrip = inverseAndProgram.strip; - inverse = inverseAndProgram.program; - } - - if (inverted) { - inverted = inverse; - inverse = program; - program = inverted; - } - - return { - type: decorator ? 'DecoratorBlock' : 'BlockStatement', - path: openBlock.path, - params: openBlock.params, - hash: openBlock.hash, - program: program, - inverse: inverse, - openStrip: openBlock.strip, - inverseStrip: inverseStrip, - closeStrip: close && close.strip, - loc: this.locInfo(locInfo) - }; -} - -function prepareProgram(statements, loc) { - if (!loc && statements.length) { - var firstLoc = statements[0].loc, - lastLoc = statements[statements.length - 1].loc; - - /* istanbul ignore else */ - if (firstLoc && lastLoc) { - loc = { - source: firstLoc.source, - start: { - line: firstLoc.start.line, - column: firstLoc.start.column - }, - end: { - line: lastLoc.end.line, - column: lastLoc.end.column - } - }; - } - } - - return { - type: 'Program', - body: statements, - strip: {}, - loc: loc - }; -} - -function preparePartialBlock(open, program, close, locInfo) { - validateClose(open, close); - - return { - type: 'PartialBlockStatement', - name: open.path, - params: open.params, - hash: open.hash, - program: program, - openStrip: open.strip, - closeStrip: close && close.strip, - loc: this.locInfo(locInfo) - }; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJz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WxzZSAqL1xuICAgIGlmIChmaXJzdExvYyAmJiBsYXN0TG9jKSB7XG4gICAgICBsb2MgPSB7XG4gICAgICAgIHNvdXJjZTogZmlyc3RMb2Muc291cmNlLFxuICAgICAgICBzdGFydDoge1xuICAgICAgICAgIGxpbmU6IGZpcnN0TG9jLnN0YXJ0LmxpbmUsXG4gICAgICAgICAgY29sdW1uOiBmaXJzdExvYy5zdGFydC5jb2x1bW5cbiAgICAgICAgfSxcbiAgICAgICAgZW5kOiB7XG4gICAgICAgICAgbGluZTogbGFzdExvYy5lbmQubGluZSxcbiAgICAgICAgICBjb2x1bW46IGxhc3RMb2MuZW5kLmNvbHVtblxuICAgICAgICB9XG4gICAgICB9O1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB7XG4gICAgdHlwZTogJ1Byb2dyYW0nLFxuICAgIGJvZHk6IHN0YXRlbWVudHMsXG4gICAgc3RyaXA6IHt9LFxuICAgIGxvYzogbG9jXG4gIH07XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBwcmVwYXJlUGFydGlhbEJsb2NrKG9wZW4sIHByb2dyYW0sIGNsb3NlLCBsb2NJbmZvKSB7XG4gIHZhbGlkYXRlQ2xvc2Uob3BlbiwgY2xvc2UpO1xuXG4gIHJldHVybiB7XG4gICAgdHlwZTogJ1BhcnRpYWxCbG9ja1N0YXRlbWVudCcsXG4gICAgbmFtZTogb3Blbi5wYXRoLFxuICAgIHBhcmFtczogb3Blbi5wYXJhbXMsXG4gICAgaGFzaDogb3Blbi5oYXNoLFxuICAgIHByb2dyYW0sXG4gICAgb3BlblN0cmlwOiBvcGVuLnN0cmlwLFxuICAgIGNsb3NlU3RyaXA6IGNsb3NlICYmIGNsb3NlLnN0cmlwLFxuICAgIGxvYzogdGhpcy5sb2NJbmZvKGxvY0luZm8pXG4gIH07XG59XG4iXX0= diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js deleted file mode 100644 index efcf3ad2..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js +++ /dev/null @@ -1,1159 +0,0 @@ -'use strict'; - -exports.__esModule = true; -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _base = require('../base'); - -var _exception = require('../exception'); - -var _exception2 = _interopRequireDefault(_exception); - -var _utils = require('../utils'); - -var _codeGen = require('./code-gen'); - -var _codeGen2 = _interopRequireDefault(_codeGen); - -function Literal(value) { - this.value = value; -} - -function JavaScriptCompiler() {} - -JavaScriptCompiler.prototype = { - // PUBLIC API: You can override these methods in a subclass to provide - // alternative compiled forms for name lookup and buffering semantics - nameLookup: function nameLookup(parent, name /*, type */) { - return this.internalNameLookup(parent, name); - }, - depthedLookup: function depthedLookup(name) { - return [this.aliasable('container.lookup'), '(depths, ', JSON.stringify(name), ')']; - }, - - compilerInfo: function compilerInfo() { - var revision = _base.COMPILER_REVISION, - versions = _base.REVISION_CHANGES[revision]; - return [revision, versions]; - }, - - appendToBuffer: function appendToBuffer(source, location, explicit) { - // Force a source as this simplifies the merge logic. - if (!_utils.isArray(source)) { - source = [source]; - } - source = this.source.wrap(source, location); - - if (this.environment.isSimple) { - return ['return ', source, ';']; - } else if (explicit) { - // This is a case where the buffer operation occurs as a child of another - // construct, generally braces. We have to explicitly output these buffer - // operations to ensure that the emitted code goes in the correct location. - return ['buffer += ', source, ';']; - } else { - source.appendToBuffer = true; - return source; - } - }, - - initializeBuffer: function initializeBuffer() { - return this.quotedString(''); - }, - // END PUBLIC API - internalNameLookup: function internalNameLookup(parent, name) { - this.lookupPropertyFunctionIsUsed = true; - return ['lookupProperty(', parent, ',', JSON.stringify(name), ')']; - }, - - lookupPropertyFunctionIsUsed: false, - - compile: function compile(environment, options, context, asObject) { - this.environment = environment; - this.options = options; - this.stringParams = this.options.stringParams; - this.trackIds = this.options.trackIds; - this.precompile = !asObject; - - this.name = this.environment.name; - this.isChild = !!context; - this.context = context || { - decorators: [], - programs: [], - environments: [] - }; - - this.preamble(); - - this.stackSlot = 0; - this.stackVars = []; - this.aliases = {}; - this.registers = { list: [] }; - this.hashes = []; - this.compileStack = []; - this.inlineStack = []; - this.blockParams = []; - - this.compileChildren(environment, options); - - this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat; - this.useBlockParams = this.useBlockParams || environment.useBlockParams; - - var opcodes = environment.opcodes, - opcode = undefined, - firstLoc = undefined, - i = undefined, - l = undefined; - - for (i = 0, l = opcodes.length; i < l; i++) { - opcode = opcodes[i]; - - this.source.currentLocation = opcode.loc; - firstLoc = firstLoc || opcode.loc; - this[opcode.opcode].apply(this, opcode.args); - } - - // Flush any trailing content that might be pending. - this.source.currentLocation = firstLoc; - this.pushSource(''); - - /* istanbul ignore next */ - if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { - throw new _exception2['default']('Compile completed with content left on stack'); - } - - if (!this.decorators.isEmpty()) { - this.useDecorators = true; - - this.decorators.prepend(['var decorators = container.decorators, ', this.lookupPropertyFunctionVarDeclaration(), ';\n']); - this.decorators.push('return fn;'); - - if (asObject) { - this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]); - } else { - this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n'); - this.decorators.push('}\n'); - this.decorators = this.decorators.merge(); - } - } else { - this.decorators = undefined; - } - - var fn = this.createFunctionContext(asObject); - if (!this.isChild) { - var ret = { - compiler: this.compilerInfo(), - main: fn - }; - - if (this.decorators) { - ret.main_d = this.decorators; // eslint-disable-line camelcase - ret.useDecorators = true; - } - - var _context = this.context; - var programs = _context.programs; - var decorators = _context.decorators; - - for (i = 0, l = programs.length; i < l; i++) { - if (programs[i]) { - ret[i] = programs[i]; - if (decorators[i]) { - ret[i + '_d'] = decorators[i]; - ret.useDecorators = true; - } - } - } - - if (this.environment.usePartial) { - ret.usePartial = true; - } - if (this.options.data) { - ret.useData = true; - } - if (this.useDepths) { - ret.useDepths = true; - } - if (this.useBlockParams) { - ret.useBlockParams = true; - } - if (this.options.compat) { - ret.compat = true; - } - - if (!asObject) { - ret.compiler = JSON.stringify(ret.compiler); - - this.source.currentLocation = { start: { line: 1, column: 0 } }; - ret = this.objectLiteral(ret); - - if (options.srcName) { - ret = ret.toStringWithSourceMap({ file: options.destName }); - ret.map = ret.map && ret.map.toString(); - } else { - ret = ret.toString(); - } - } else { - ret.compilerOptions = this.options; - } - - return ret; - } else { - return fn; - } - }, - - preamble: function preamble() { - // track the last context pushed into place to allow skipping the - // getContext opcode when it would be a noop - this.lastContext = 0; - this.source = new _codeGen2['default'](this.options.srcName); - this.decorators = new _codeGen2['default'](this.options.srcName); - }, - - createFunctionContext: function createFunctionContext(asObject) { - // istanbul ignore next - - var _this = this; - - var varDeclarations = ''; - - var locals = this.stackVars.concat(this.registers.list); - if (locals.length > 0) { - varDeclarations += ', ' + locals.join(', '); - } - - // Generate minimizer alias mappings - // - // When using true SourceNodes, this will update all references to the given alias - // as the source nodes are reused in situ. For the non-source node compilation mode, - // aliases will not be used, but this case is already being run on the client and - // we aren't concern about minimizing the template size. - var aliasCount = 0; - Object.keys(this.aliases).forEach(function (alias) { - var node = _this.aliases[alias]; - if (node.children && node.referenceCount > 1) { - varDeclarations += ', alias' + ++aliasCount + '=' + alias; - node.children[0] = 'alias' + aliasCount; - } - }); - - if (this.lookupPropertyFunctionIsUsed) { - varDeclarations += ', ' + this.lookupPropertyFunctionVarDeclaration(); - } - - var params = ['container', 'depth0', 'helpers', 'partials', 'data']; - - if (this.useBlockParams || this.useDepths) { - params.push('blockParams'); - } - if (this.useDepths) { - params.push('depths'); - } - - // Perform a second pass over the output to merge content when possible - var source = this.mergeSource(varDeclarations); - - if (asObject) { - params.push(source); - - return Function.apply(this, params); - } else { - return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); - } - }, - mergeSource: function mergeSource(varDeclarations) { - var isSimple = this.environment.isSimple, - appendOnly = !this.forceBuffer, - appendFirst = undefined, - sourceSeen = undefined, - bufferStart = undefined, - bufferEnd = undefined; - this.source.each(function (line) { - if (line.appendToBuffer) { - if (bufferStart) { - line.prepend(' + '); - } else { - bufferStart = line; - } - bufferEnd = line; - } else { - if (bufferStart) { - if (!sourceSeen) { - appendFirst = true; - } else { - bufferStart.prepend('buffer += '); - } - bufferEnd.add(';'); - bufferStart = bufferEnd = undefined; - } - - sourceSeen = true; - if (!isSimple) { - appendOnly = false; - } - } - }); - - if (appendOnly) { - if (bufferStart) { - bufferStart.prepend('return '); - bufferEnd.add(';'); - } else if (!sourceSeen) { - this.source.push('return "";'); - } - } else { - varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); - - if (bufferStart) { - bufferStart.prepend('return buffer + '); - bufferEnd.add(';'); - } else { - this.source.push('return buffer;'); - } - } - - if (varDeclarations) { - this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); - } - - return this.source.merge(); - }, - - lookupPropertyFunctionVarDeclaration: function lookupPropertyFunctionVarDeclaration() { - return '\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n '.trim(); - }, - - // [blockValue] - // - // On stack, before: hash, inverse, program, value - // On stack, after: return value of blockHelperMissing - // - // The purpose of this opcode is to take a block of the form - // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and - // replace it on the stack with the result of properly - // invoking blockHelperMissing. - blockValue: function blockValue(name) { - var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'), - params = [this.contextName(0)]; - this.setupHelperArgs(name, 0, params); - - var blockName = this.popStack(); - params.splice(1, 0, blockName); - - this.push(this.source.functionCall(blockHelperMissing, 'call', params)); - }, - - // [ambiguousBlockValue] - // - // On stack, before: hash, inverse, program, value - // Compiler value, before: lastHelper=value of last found helper, if any - // On stack, after, if no lastHelper: same as [blockValue] - // On stack, after, if lastHelper: value - ambiguousBlockValue: function ambiguousBlockValue() { - // We're being a bit cheeky and reusing the options value from the prior exec - var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'), - params = [this.contextName(0)]; - this.setupHelperArgs('', 0, params, true); - - this.flushInline(); - - var current = this.topStack(); - params.splice(1, 0, current); - - this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']); - }, - - // [appendContent] - // - // On stack, before: ... - // On stack, after: ... - // - // Appends the string value of `content` to the current buffer - appendContent: function appendContent(content) { - if (this.pendingContent) { - content = this.pendingContent + content; - } else { - this.pendingLocation = this.source.currentLocation; - } - - this.pendingContent = content; - }, - - // [append] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Coerces `value` to a String and appends it to the current buffer. - // - // If `value` is truthy, or 0, it is coerced into a string and appended - // Otherwise, the empty string is appended - append: function append() { - if (this.isInline()) { - this.replaceStack(function (current) { - return [' != null ? ', current, ' : ""']; - }); - - this.pushSource(this.appendToBuffer(this.popStack())); - } else { - var local = this.popStack(); - this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); - if (this.environment.isSimple) { - this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']); - } - } - }, - - // [appendEscaped] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Escape `value` and append it to the buffer - appendEscaped: function appendEscaped() { - this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')'])); - }, - - // [getContext] - // - // On stack, before: ... - // On stack, after: ... - // Compiler value, after: lastContext=depth - // - // Set the value of the `lastContext` compiler value to the depth - getContext: function getContext(depth) { - this.lastContext = depth; - }, - - // [pushContext] - // - // On stack, before: ... - // On stack, after: currentContext, ... - // - // Pushes the value of the current context onto the stack. - pushContext: function pushContext() { - this.pushStackLiteral(this.contextName(this.lastContext)); - }, - - // [lookupOnContext] - // - // On stack, before: ... - // On stack, after: currentContext[name], ... - // - // Looks up the value of `name` on the current context and pushes - // it onto the stack. - lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) { - var i = 0; - - if (!scoped && this.options.compat && !this.lastContext) { - // The depthed query is expected to handle the undefined logic for the root level that - // is implemented below, so we evaluate that directly in compat mode - this.push(this.depthedLookup(parts[i++])); - } else { - this.pushContext(); - } - - this.resolvePath('context', parts, i, falsy, strict); - }, - - // [lookupBlockParam] - // - // On stack, before: ... - // On stack, after: blockParam[name], ... - // - // Looks up the value of `parts` on the given block param and pushes - // it onto the stack. - lookupBlockParam: function lookupBlockParam(blockParamId, parts) { - this.useBlockParams = true; - - this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); - this.resolvePath('context', parts, 1); - }, - - // [lookupData] - // - // On stack, before: ... - // On stack, after: data, ... - // - // Push the data lookup operator - lookupData: function lookupData(depth, parts, strict) { - if (!depth) { - this.pushStackLiteral('data'); - } else { - this.pushStackLiteral('container.data(data, ' + depth + ')'); - } - - this.resolvePath('data', parts, 0, true, strict); - }, - - resolvePath: function resolvePath(type, parts, i, falsy, strict) { - // istanbul ignore next - - var _this2 = this; - - if (this.options.strict || this.options.assumeObjects) { - this.push(strictLookup(this.options.strict && strict, this, parts, type)); - return; - } - - var len = parts.length; - for (; i < len; i++) { - /* eslint-disable no-loop-func */ - this.replaceStack(function (current) { - var lookup = _this2.nameLookup(current, parts[i], type); - // We want to ensure that zero and false are handled properly if the context (falsy flag) - // needs to have the special handling for these values. - if (!falsy) { - return [' != null ? ', lookup, ' : ', current]; - } else { - // Otherwise we can use generic falsy handling - return [' && ', lookup]; - } - }); - /* eslint-enable no-loop-func */ - } - }, - - // [resolvePossibleLambda] - // - // On stack, before: value, ... - // On stack, after: resolved value, ... - // - // If the `value` is a lambda, replace it on the stack by - // the return value of the lambda - resolvePossibleLambda: function resolvePossibleLambda() { - this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); - }, - - // [pushStringParam] - // - // On stack, before: ... - // On stack, after: string, currentContext, ... - // - // This opcode is designed for use in string mode, which - // provides the string value of a parameter along with its - // depth rather than resolving it immediately. - pushStringParam: function pushStringParam(string, type) { - this.pushContext(); - this.pushString(type); - - // If it's a subexpression, the string result - // will be pushed after this opcode. - if (type !== 'SubExpression') { - if (typeof string === 'string') { - this.pushString(string); - } else { - this.pushStackLiteral(string); - } - } - }, - - emptyHash: function emptyHash(omitEmpty) { - if (this.trackIds) { - this.push('{}'); // hashIds - } - if (this.stringParams) { - this.push('{}'); // hashContexts - this.push('{}'); // hashTypes - } - this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); - }, - pushHash: function pushHash() { - if (this.hash) { - this.hashes.push(this.hash); - } - this.hash = { values: {}, types: [], contexts: [], ids: [] }; - }, - popHash: function popHash() { - var hash = this.hash; - this.hash = this.hashes.pop(); - - if (this.trackIds) { - this.push(this.objectLiteral(hash.ids)); - } - if (this.stringParams) { - this.push(this.objectLiteral(hash.contexts)); - this.push(this.objectLiteral(hash.types)); - } - - this.push(this.objectLiteral(hash.values)); - }, - - // [pushString] - // - // On stack, before: ... - // On stack, after: quotedString(string), ... - // - // Push a quoted version of `string` onto the stack - pushString: function pushString(string) { - this.pushStackLiteral(this.quotedString(string)); - }, - - // [pushLiteral] - // - // On stack, before: ... - // On stack, after: value, ... - // - // Pushes a value onto the stack. This operation prevents - // the compiler from creating a temporary variable to hold - // it. - pushLiteral: function pushLiteral(value) { - this.pushStackLiteral(value); - }, - - // [pushProgram] - // - // On stack, before: ... - // On stack, after: program(guid), ... - // - // Push a program expression onto the stack. This takes - // a compile-time guid and converts it into a runtime-accessible - // expression. - pushProgram: function pushProgram(guid) { - if (guid != null) { - this.pushStackLiteral(this.programExpression(guid)); - } else { - this.pushStackLiteral(null); - } - }, - - // [registerDecorator] - // - // On stack, before: hash, program, params..., ... - // On stack, after: ... - // - // Pops off the decorator's parameters, invokes the decorator, - // and inserts the decorator into the decorators list. - registerDecorator: function registerDecorator(paramSize, name) { - var foundDecorator = this.nameLookup('decorators', name, 'decorator'), - options = this.setupHelperArgs(name, paramSize); - - this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']); - }, - - // [invokeHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // Pops off the helper's parameters, invokes the helper, - // and pushes the helper's return value onto the stack. - // - // If the helper is not found, `helperMissing` is called. - invokeHelper: function invokeHelper(paramSize, name, isSimple) { - var nonHelper = this.popStack(), - helper = this.setupHelper(paramSize, name); - - var possibleFunctionCalls = []; - - if (isSimple) { - // direct call to helper - possibleFunctionCalls.push(helper.name); - } - // call a function from the input object - possibleFunctionCalls.push(nonHelper); - if (!this.options.strict) { - possibleFunctionCalls.push(this.aliasable('container.hooks.helperMissing')); - } - - var functionLookupCode = ['(', this.itemsSeparatedBy(possibleFunctionCalls, '||'), ')']; - var functionCall = this.source.functionCall(functionLookupCode, 'call', helper.callParams); - this.push(functionCall); - }, - - itemsSeparatedBy: function itemsSeparatedBy(items, separator) { - var result = []; - result.push(items[0]); - for (var i = 1; i < items.length; i++) { - result.push(separator, items[i]); - } - return result; - }, - // [invokeKnownHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // This operation is used when the helper is known to exist, - // so a `helperMissing` fallback is not required. - invokeKnownHelper: function invokeKnownHelper(paramSize, name) { - var helper = this.setupHelper(paramSize, name); - this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); - }, - - // [invokeAmbiguous] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of disambiguation - // - // This operation is used when an expression like `{{foo}}` - // is provided, but we don't know at compile-time whether it - // is a helper or a path. - // - // This operation emits more code than the other options, - // and can be avoided by passing the `knownHelpers` and - // `knownHelpersOnly` flags at compile-time. - invokeAmbiguous: function invokeAmbiguous(name, helperCall) { - this.useRegister('helper'); - - var nonHelper = this.popStack(); - - this.emptyHash(); - var helper = this.setupHelper(0, name, helperCall); - - var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); - - var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; - if (!this.options.strict) { - lookup[0] = '(helper = '; - lookup.push(' != null ? helper : ', this.aliasable('container.hooks.helperMissing')); - } - - this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']); - }, - - // [invokePartial] - // - // On stack, before: context, ... - // On stack after: result of partial invocation - // - // This operation pops off a context, invokes a partial with that context, - // and pushes the result of the invocation back. - invokePartial: function invokePartial(isDynamic, name, indent) { - var params = [], - options = this.setupParams(name, 1, params); - - if (isDynamic) { - name = this.popStack(); - delete options.name; - } - - if (indent) { - options.indent = JSON.stringify(indent); - } - options.helpers = 'helpers'; - options.partials = 'partials'; - options.decorators = 'container.decorators'; - - if (!isDynamic) { - params.unshift(this.nameLookup('partials', name, 'partial')); - } else { - params.unshift(name); - } - - if (this.options.compat) { - options.depths = 'depths'; - } - options = this.objectLiteral(options); - params.push(options); - - this.push(this.source.functionCall('container.invokePartial', '', params)); - }, - - // [assignToHash] - // - // On stack, before: value, ..., hash, ... - // On stack, after: ..., hash, ... - // - // Pops a value off the stack and assigns it to the current hash - assignToHash: function assignToHash(key) { - var value = this.popStack(), - context = undefined, - type = undefined, - id = undefined; - - if (this.trackIds) { - id = this.popStack(); - } - if (this.stringParams) { - type = this.popStack(); - context = this.popStack(); - } - - var hash = this.hash; - if (context) { - hash.contexts[key] = context; - } - if (type) { - hash.types[key] = type; - } - if (id) { - hash.ids[key] = id; - } - hash.values[key] = value; - }, - - pushId: function pushId(type, name, child) { - if (type === 'BlockParam') { - this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : '')); - } else if (type === 'PathExpression') { - this.pushString(name); - } else if (type === 'SubExpression') { - this.pushStackLiteral('true'); - } else { - this.pushStackLiteral('null'); - } - }, - - // HELPERS - - compiler: JavaScriptCompiler, - - compileChildren: function compileChildren(environment, options) { - var children = environment.children, - child = undefined, - compiler = undefined; - - for (var i = 0, l = children.length; i < l; i++) { - child = children[i]; - compiler = new this.compiler(); // eslint-disable-line new-cap - - var existing = this.matchExistingProgram(child); - - if (existing == null) { - this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children - var index = this.context.programs.length; - child.index = index; - child.name = 'program' + index; - this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); - this.context.decorators[index] = compiler.decorators; - this.context.environments[index] = child; - - this.useDepths = this.useDepths || compiler.useDepths; - this.useBlockParams = this.useBlockParams || compiler.useBlockParams; - child.useDepths = this.useDepths; - child.useBlockParams = this.useBlockParams; - } else { - child.index = existing.index; - child.name = 'program' + existing.index; - - this.useDepths = this.useDepths || existing.useDepths; - this.useBlockParams = this.useBlockParams || existing.useBlockParams; - } - } - }, - matchExistingProgram: function matchExistingProgram(child) { - for (var i = 0, len = this.context.environments.length; i < len; i++) { - var environment = this.context.environments[i]; - if (environment && environment.equals(child)) { - return environment; - } - } - }, - - programExpression: function programExpression(guid) { - var child = this.environment.children[guid], - programParams = [child.index, 'data', child.blockParams]; - - if (this.useBlockParams || this.useDepths) { - programParams.push('blockParams'); - } - if (this.useDepths) { - programParams.push('depths'); - } - - return 'container.program(' + programParams.join(', ') + ')'; - }, - - useRegister: function useRegister(name) { - if (!this.registers[name]) { - this.registers[name] = true; - this.registers.list.push(name); - } - }, - - push: function push(expr) { - if (!(expr instanceof Literal)) { - expr = this.source.wrap(expr); - } - - this.inlineStack.push(expr); - return expr; - }, - - pushStackLiteral: function pushStackLiteral(item) { - this.push(new Literal(item)); - }, - - pushSource: function pushSource(source) { - if (this.pendingContent) { - this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); - this.pendingContent = undefined; - } - - if (source) { - this.source.push(source); - } - }, - - replaceStack: function replaceStack(callback) { - var prefix = ['('], - stack = undefined, - createdStack = undefined, - usedLiteral = undefined; - - /* istanbul ignore next */ - if (!this.isInline()) { - throw new _exception2['default']('replaceStack on non-inline'); - } - - // We want to merge the inline statement into the replacement statement via ',' - var top = this.popStack(true); - - if (top instanceof Literal) { - // Literals do not need to be inlined - stack = [top.value]; - prefix = ['(', stack]; - usedLiteral = true; - } else { - // Get or create the current stack name for use by the inline - createdStack = true; - var _name = this.incrStack(); - - prefix = ['((', this.push(_name), ' = ', top, ')']; - stack = this.topStack(); - } - - var item = callback.call(this, stack); - - if (!usedLiteral) { - this.popStack(); - } - if (createdStack) { - this.stackSlot--; - } - this.push(prefix.concat(item, ')')); - }, - - incrStack: function incrStack() { - this.stackSlot++; - if (this.stackSlot > this.stackVars.length) { - this.stackVars.push('stack' + this.stackSlot); - } - return this.topStackName(); - }, - topStackName: function topStackName() { - return 'stack' + this.stackSlot; - }, - flushInline: function flushInline() { - var inlineStack = this.inlineStack; - this.inlineStack = []; - for (var i = 0, len = inlineStack.length; i < len; i++) { - var entry = inlineStack[i]; - /* istanbul ignore if */ - if (entry instanceof Literal) { - this.compileStack.push(entry); - } else { - var stack = this.incrStack(); - this.pushSource([stack, ' = ', entry, ';']); - this.compileStack.push(stack); - } - } - }, - isInline: function isInline() { - return this.inlineStack.length; - }, - - popStack: function popStack(wrapped) { - var inline = this.isInline(), - item = (inline ? this.inlineStack : this.compileStack).pop(); - - if (!wrapped && item instanceof Literal) { - return item.value; - } else { - if (!inline) { - /* istanbul ignore next */ - if (!this.stackSlot) { - throw new _exception2['default']('Invalid stack pop'); - } - this.stackSlot--; - } - return item; - } - }, - - topStack: function topStack() { - var stack = this.isInline() ? this.inlineStack : this.compileStack, - item = stack[stack.length - 1]; - - /* istanbul ignore if */ - if (item instanceof Literal) { - return item.value; - } else { - return item; - } - }, - - contextName: function contextName(context) { - if (this.useDepths && context) { - return 'depths[' + context + ']'; - } else { - return 'depth' + context; - } - }, - - quotedString: function quotedString(str) { - return this.source.quotedString(str); - }, - - objectLiteral: function objectLiteral(obj) { - return this.source.objectLiteral(obj); - }, - - aliasable: function aliasable(name) { - var ret = this.aliases[name]; - if (ret) { - ret.referenceCount++; - return ret; - } - - ret = this.aliases[name] = this.source.wrap(name); - ret.aliasable = true; - ret.referenceCount = 1; - - return ret; - }, - - setupHelper: function setupHelper(paramSize, name, blockHelper) { - var params = [], - paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); - var foundHelper = this.nameLookup('helpers', name, 'helper'), - callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : (container.nullContext || {})'); - - return { - params: params, - paramsInit: paramsInit, - name: foundHelper, - callParams: [callContext].concat(params) - }; - }, - - setupParams: function setupParams(helper, paramSize, params) { - var options = {}, - contexts = [], - types = [], - ids = [], - objectArgs = !params, - param = undefined; - - if (objectArgs) { - params = []; - } - - options.name = this.quotedString(helper); - options.hash = this.popStack(); - - if (this.trackIds) { - options.hashIds = this.popStack(); - } - if (this.stringParams) { - options.hashTypes = this.popStack(); - options.hashContexts = this.popStack(); - } - - var inverse = this.popStack(), - program = this.popStack(); - - // Avoid setting fn and inverse if neither are set. This allows - // helpers to do a check for `if (options.fn)` - if (program || inverse) { - options.fn = program || 'container.noop'; - options.inverse = inverse || 'container.noop'; - } - - // The parameters go on to the stack in order (making sure that they are evaluated in order) - // so we need to pop them off the stack in reverse order - var i = paramSize; - while (i--) { - param = this.popStack(); - params[i] = param; - - if (this.trackIds) { - ids[i] = this.popStack(); - } - if (this.stringParams) { - types[i] = this.popStack(); - contexts[i] = this.popStack(); - } - } - - if (objectArgs) { - options.args = this.source.generateArray(params); - } - - if (this.trackIds) { - options.ids = this.source.generateArray(ids); - } - if (this.stringParams) { - options.types = this.source.generateArray(types); - options.contexts = this.source.generateArray(contexts); - } - - if (this.options.data) { - options.data = 'data'; - } - if (this.useBlockParams) { - options.blockParams = 'blockParams'; - } - return options; - }, - - setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { - var options = this.setupParams(helper, paramSize, params); - options.loc = JSON.stringify(this.source.currentLocation); - options = this.objectLiteral(options); - if (useRegister) { - this.useRegister('options'); - params.push('options'); - return ['options=', options]; - } else if (params) { - params.push(options); - return ''; - } else { - return options; - } - } -}; - -(function () { - var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' '); - - var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; - - for (var i = 0, l = reservedWords.length; i < l; i++) { - compilerWords[reservedWords[i]] = true; - } -})(); - -/** - * @deprecated May be removed in the next major version - */ -JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { - return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); -}; - -function strictLookup(requireTerminal, compiler, parts, type) { - var stack = compiler.popStack(), - i = 0, - len = parts.length; - if (requireTerminal) { - len--; - } - - for (; i < len; i++) { - stack = compiler.nameLookup(stack, parts[i], type); - } - - if (requireTerminal) { - return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ', ', JSON.stringify(compiler.source.currentLocation), ' )']; - } else { - return stack; - } -} - -exports['default'] = JavaScriptCompiler; -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2phdmFzY3JpcHQtY29tcGlsZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztvQkFBb0QsU0FBUzs7eUJBQ3ZDLGNBQWM7Ozs7cUJBQ1osVUFBVTs7dUJBQ2QsWUFBWTs7OztBQUVoQyxTQUFTLE9BQU8sQ0FBQyxLQUFLLEVBQUU7QUFDdEIsTUF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aV0gPSBwcm9ncmFtc1tpXTtcbiAgICAgICAgICBpZiAoZGVjb3JhdG9yc1tpXSkge1xuICAgICAgICAgICAgcmV0W2kgKyAnX2QnXSA9IGRlY29yYXRvcnNbaV07XG4gICAgICAgICAgICByZXQudXNlRGVjb3JhdG9ycyA9IHRydWU7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmICh0aGlzLmVudmlyb25tZW50LnVzZVBhcnRpYWwpIHtcbiAgICAgICAgcmV0LnVzZVBhcnRpYWwgPSB0cnVlO1xuICAgICAgfVxuICAgICAgaWYgKHRoaXMub3B0aW9ucy5kYXRhKSB7XG4gICAgICAgIHJldC51c2VEYXRhID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLnVzZURlcHRocykge1xuICAgICAgICByZXQudXNlRGVwdGhzID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLnVzZUJsb2NrUGFyYW1zKSB7XG4gICAgICAgIHJldC51c2VCbG9ja1BhcmFtcyA9IHRydWU7XG4gICAgICB9XG4gICAgICBpZiAodGhpcy5vcHRpb25zLmNvbXBhdCkge1xuICAgICAgICByZXQuY29tcGF0ID0gdHJ1ZTtcbiAgICAgIH1cblxuICAgICAgaWYgKCFhc09iamVjdCkge1xuICAgICAgICByZXQuY29tcGlsZXIgPSBKU09OLnN0cmluZ2lmeShyZXQuY29tcGlsZXIpO1xuXG4gICAgICAgIHRoaXMuc291cmNlLmN1cnJlbnRMb2NhdGlvbiA9IHsgc3RhcnQ6IHsgbGluZTogMSwgY29sdW1uOiAwIH0gfTtcbiAgICAgICAgcmV0ID0gdGhpcy5vYmplY3RMaXRlcmFsKHJldCk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuc3JjTmFtZSkge1xuICAgICAgICAgIHJldCA9IHJldC50b1N0cmluZ1dpdGhTb3VyY2VNYXAoeyBmaWxlOiBvcHRpb25zLmRlc3ROYW1lIH0pO1xuICAgIC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KTtcbiAgfVxuXG4gIGlmIChyZXF1aXJlVGVybWluYWwpIHtcbiAgICByZXR1cm4gW1xuICAgICAgY29tcGlsZXIuYWxpYXNhYmxlKCdjb250YWluZXIuc3RyaWN0JyksXG4gICAgICAnKCcsXG4gICAgICBzdGFjayxcbiAgICAgICcsICcsXG4gICAgICBjb21waWxlci5xdW90ZWRTdHJpbmcocGFydHNbaV0pLFxuICAgICAgJywgJyxcbiAgICAgIEpTT04uc3RyaW5naWZ5KGNvbXBpbGVyLnNvdXJjZS5jdXJyZW50TG9jYXRpb24pLFxuICAgICAgJyApJ1xuICAgIF07XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIHN0YWNrO1xuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IEphdmFTY3JpcHRDb21waWxlcjtcbiJdfQ== diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js deleted file mode 100644 index 18306d23..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js +++ /dev/null @@ -1,737 +0,0 @@ -// File ignored in coverage tests via setting in .istanbul.yml -/* Jison generated parser */ -"use strict"; - -exports.__esModule = true; -var handlebars = (function () { - var parser = { trace: function trace() {}, - yy: {}, - symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" }, - productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 0], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - - var $0 = $$.length - 1; - switch (yystate) { - case 1: - return $$[$0 - 1]; - break; - case 2: - this.$ = yy.prepareProgram($$[$0]); - break; - case 3: - this.$ = $$[$0]; - break; - case 4: - this.$ = $$[$0]; - break; - case 5: - this.$ = $$[$0]; - break; - case 6: - this.$ = $$[$0]; - break; - case 7: - this.$ = $$[$0]; - break; - case 8: - this.$ = $$[$0]; - break; - case 9: - this.$ = { - type: 'CommentStatement', - value: yy.stripComment($$[$0]), - strip: yy.stripFlags($$[$0], $$[$0]), - loc: yy.locInfo(this._$) - }; - - break; - case 10: - this.$ = { - type: 'ContentStatement', - original: $$[$0], - value: $$[$0], - loc: yy.locInfo(this._$) - }; - - break; - case 11: - this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); - break; - case 12: - this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; - break; - case 13: - this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); - break; - case 14: - this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); - break; - case 15: - this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 16: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 17: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 18: - this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; - break; - case 19: - var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), - program = yy.prepareProgram([inverse], $$[$0 - 1].loc); - program.chained = true; - - this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true }; - - break; - case 20: - this.$ = $$[$0]; - break; - case 21: - this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; - break; - case 22: - this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); - break; - case 23: - this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); - break; - case 24: - this.$ = { - type: 'PartialStatement', - name: $$[$0 - 3], - params: $$[$0 - 2], - hash: $$[$0 - 1], - indent: '', - strip: yy.stripFlags($$[$0 - 4], $$[$0]), - loc: yy.locInfo(this._$) - }; - - break; - case 25: - this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); - break; - case 26: - this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) }; - break; - case 27: - this.$ = $$[$0]; - break; - case 28: - this.$ = $$[$0]; - break; - case 29: - this.$ = { - type: 'SubExpression', - path: $$[$0 - 3], - params: $$[$0 - 2], - hash: $$[$0 - 1], - loc: yy.locInfo(this._$) - }; - - break; - case 30: - this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) }; - break; - case 31: - this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) }; - break; - case 32: - this.$ = yy.id($$[$0 - 1]); - break; - case 33: - this.$ = $$[$0]; - break; - case 34: - this.$ = $$[$0]; - break; - case 35: - this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) }; - break; - case 36: - this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) }; - break; - case 37: - this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) }; - break; - case 38: - this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) }; - break; - case 39: - this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) }; - break; - case 40: - this.$ = $$[$0]; - break; - case 41: - this.$ = $$[$0]; - break; - case 42: - this.$ = yy.preparePath(true, $$[$0], this._$); - break; - case 43: - this.$ = yy.preparePath(false, $$[$0], this._$); - break; - case 44: - $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2]; - break; - case 45: - this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; - break; - case 46: - this.$ = []; - break; - case 47: - $$[$0 - 1].push($$[$0]); - break; - case 48: - this.$ = []; - break; - case 49: - $$[$0 - 1].push($$[$0]); - break; - case 50: - this.$ = []; - break; - case 51: - $$[$0 - 1].push($$[$0]); - break; - case 58: - this.$ = []; - break; - case 59: - $$[$0 - 1].push($$[$0]); - break; - case 64: - this.$ = []; - break; - case 65: - $$[$0 - 1].push($$[$0]); - break; - case 70: - this.$ = []; - break; - case 71: - $$[$0 - 1].push($$[$0]); - break; - case 78: - this.$ = []; - break; - case 79: - $$[$0 - 1].push($$[$0]); - break; - case 82: - this.$ = []; - break; - case 83: - $$[$0 - 1].push($$[$0]); - break; - case 86: - this.$ = []; - break; - case 87: - $$[$0 - 1].push($$[$0]); - break; - case 90: - this.$ = []; - break; - case 91: - $$[$0 - 1].push($$[$0]); - break; - case 94: - this.$ = []; - break; - case 95: - $$[$0 - 1].push($$[$0]); - break; - case 98: - this.$ = [$$[$0]]; - break; - case 99: - $$[$0 - 1].push($$[$0]); - break; - case 100: - this.$ = [$$[$0]]; - break; - case 101: - $$[$0 - 1].push($$[$0]); - break; - } - }, - table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 15: [2, 48], 17: 39, 18: [2, 48] }, { 20: 41, 56: 40, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 44, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 45, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 41, 56: 48, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 49, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 50] }, { 72: [1, 35], 86: 51 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 52, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 53, 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 54, 47: [2, 54] }, { 28: 59, 43: 60, 44: [1, 58], 47: [2, 56] }, { 13: 62, 15: [1, 20], 18: [1, 61] }, { 33: [2, 86], 57: 63, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 64, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 65, 47: [1, 66] }, { 30: 67, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 68, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 69, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 70, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 74, 33: [2, 80], 50: 71, 63: 72, 64: 75, 65: [1, 43], 69: 73, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 79] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 50] }, { 20: 74, 53: 80, 54: [2, 84], 63: 81, 64: 75, 65: [1, 43], 69: 82, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 83, 47: [1, 66] }, { 47: [2, 55] }, { 4: 84, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 85, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 86, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 87, 47: [1, 66] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 74, 33: [2, 88], 58: 88, 63: 89, 64: 75, 65: [1, 43], 69: 90, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 91, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 92, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 31: 93, 33: [2, 60], 63: 94, 64: 75, 65: [1, 43], 69: 95, 70: 76, 71: 77, 72: [1, 78], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 66], 36: 96, 63: 97, 64: 75, 65: [1, 43], 69: 98, 70: 76, 71: 77, 72: [1, 78], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 22: 99, 23: [2, 52], 63: 100, 64: 75, 65: [1, 43], 69: 101, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 92], 62: 102, 63: 103, 64: 75, 65: [1, 43], 69: 104, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 105] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 106, 72: [1, 107], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 108], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 109] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 111, 46: 110, 47: [2, 76] }, { 33: [2, 70], 40: 112, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 113] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 74, 63: 115, 64: 75, 65: [1, 43], 67: 114, 68: [2, 96], 69: 116, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 117] }, { 32: 118, 33: [2, 62], 74: 119, 75: [1, 120] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 121, 74: 122, 75: [1, 120] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 123] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 124] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 108] }, { 20: 74, 63: 125, 64: 75, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 74, 33: [2, 72], 41: 126, 63: 127, 64: 75, 65: [1, 43], 69: 128, 70: 76, 71: 77, 72: [1, 78], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 129] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 130] }, { 33: [2, 63] }, { 72: [1, 132], 76: 131 }, { 33: [1, 133] }, { 33: [2, 69] }, { 15: [2, 12], 18: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 134, 74: 135, 75: [1, 120] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 137], 77: [1, 136] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 138] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], - defaultActions: { 4: [2, 1], 54: [2, 55], 56: [2, 20], 60: [2, 57], 73: [2, 81], 82: [2, 85], 86: [2, 18], 90: [2, 89], 101: [2, 53], 104: [2, 93], 110: [2, 19], 111: [2, 77], 116: [2, 97], 119: [2, 63], 122: [2, 69], 135: [2, 75], 136: [2, 32] }, - parseError: function parseError(str, hash) { - throw new Error(str); - }, - parse: function parse(input) { - var self = this, - stack = [0], - vstack = [null], - lstack = [], - table = this.table, - yytext = "", - yylineno = 0, - yyleng = 0, - recovering = 0, - TERROR = 2, - EOF = 1; - this.lexer.setInput(input); - this.lexer.yy = this.yy; - this.yy.lexer = this.lexer; - this.yy.parser = this; - if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; - var yyloc = this.lexer.yylloc; - lstack.push(yyloc); - var ranges = this.lexer.options && this.lexer.options.ranges; - if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = self.lexer.lex() || 1; - if (typeof token !== "number") { - token = self.symbols_[token] || token; - } - return token; - } - var symbol, - preErrorSymbol, - state, - action, - a, - r, - yyval = {}, - p, - len, - newState, - expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - if (!recovering) { - expected = []; - for (p in table[state]) if (this.terminals_[p] && p > 2) { - expected.push("'" + this.terminals_[p] + "'"); - } - if (this.lexer.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); - } - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) recovering--; - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; - if (ranges) { - yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; - } - r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - /* Jison generated lexer */ - var lexer = (function () { - var lexer = { EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - setInput: function setInput(input) { - this._input = input; - this._more = this._less = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; - if (this.options.ranges) this.yylloc.range = [0, 0]; - this.offset = 0; - return this; - }, - input: function input() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) this.yylloc.range[1]++; - - this._input = this._input.slice(1); - return ch; - }, - unput: function unput(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) this.yylineno -= lines.length - 1; - var r = this.yylloc.range; - - this.yylloc = { first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - return this; - }, - more: function more() { - this._more = true; - return this; - }, - less: function less(n) { - this.unput(this.match.slice(n)); - }, - pastInput: function pastInput() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, ""); - }, - upcomingInput: function upcomingInput() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - showPosition: function showPosition() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - next: function next() { - if (this.done) { - return this.EOF; - } - if (!this._input) this.done = true; - - var token, match, tempMatch, index, col, lines; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (!this.options.flex) break; - } - } - if (match) { - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) this.yylineno += lines.length; - this.yylloc = { first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) this.done = false; - if (token) return token;else return; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno }); - } - }, - lex: function lex() { - var r = this.next(); - if (typeof r !== 'undefined') { - return r; - } else { - return this.lex(); - } - }, - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - popState: function popState() { - return this.conditionStack.pop(); - }, - _currentRules: function _currentRules() { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - }, - topState: function topState() { - return this.conditionStack[this.conditionStack.length - 2]; - }, - pushState: function begin(condition) { - this.begin(condition); - } }; - lexer.options = {}; - lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - - function strip(start, end) { - return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start); - } - - var YYSTATE = YY_START; - switch ($avoiding_name_collisions) { - case 0: - if (yy_.yytext.slice(-2) === "\\\\") { - strip(0, 1); - this.begin("mu"); - } else if (yy_.yytext.slice(-1) === "\\") { - strip(0, 1); - this.begin("emu"); - } else { - this.begin("mu"); - } - if (yy_.yytext) return 15; - - break; - case 1: - return 15; - break; - case 2: - this.popState(); - return 15; - - break; - case 3: - this.begin('raw');return 15; - break; - case 4: - this.popState(); - // Should be using `this.topState()` below, but it currently - // returns the second top instead of the first top. Opened an - // issue about it at https://github.com/zaach/jison/issues/291 - if (this.conditionStack[this.conditionStack.length - 1] === 'raw') { - return 15; - } else { - strip(5, 9); - return 'END_RAW_BLOCK'; - } - - break; - case 5: - return 15; - break; - case 6: - this.popState(); - return 14; - - break; - case 7: - return 65; - break; - case 8: - return 68; - break; - case 9: - return 19; - break; - case 10: - this.popState(); - this.begin('raw'); - return 23; - - break; - case 11: - return 55; - break; - case 12: - return 60; - break; - case 13: - return 29; - break; - case 14: - return 47; - break; - case 15: - this.popState();return 44; - break; - case 16: - this.popState();return 44; - break; - case 17: - return 34; - break; - case 18: - return 39; - break; - case 19: - return 51; - break; - case 20: - return 48; - break; - case 21: - this.unput(yy_.yytext); - this.popState(); - this.begin('com'); - - break; - case 22: - this.popState(); - return 14; - - break; - case 23: - return 48; - break; - case 24: - return 73; - break; - case 25: - return 72; - break; - case 26: - return 72; - break; - case 27: - return 87; - break; - case 28: - // ignore whitespace - break; - case 29: - this.popState();return 54; - break; - case 30: - this.popState();return 33; - break; - case 31: - yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80; - break; - case 32: - yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80; - break; - case 33: - return 85; - break; - case 34: - return 82; - break; - case 35: - return 82; - break; - case 36: - return 83; - break; - case 37: - return 84; - break; - case 38: - return 81; - break; - case 39: - return 75; - break; - case 40: - return 77; - break; - case 41: - return 72; - break; - case 42: - yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72; - break; - case 43: - return 'INVALID'; - break; - case 44: - return 5; - break; - } - }; - lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/]; - lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } }; - return lexer; - })(); - parser.lexer = lexer; - function Parser() { - this.yy = {}; - }Parser.prototype = parser;parser.Parser = Parser; - return new Parser(); -})();exports["default"] = handlebars; -module.exports = exports["default"]; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3BhcnNlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUVBLElBQUksVUFBVSxHQUFHLENBQUMsWUFBVTtBQUM1QixRQUFJLE1BQU0sR0FBRyxFQUFDLEtBQUssRUFBRSxTQUFTLEtBQUssR0FBSSxFQUFHO0FBQzFDLFVBQUUsRUFBRSxFQUFFO0FBQ04sZ0JBQVEsRUFBRSxFQUFDLE9BQU8sRUFBQyxDQUFDLEVBQUMsTUFBTSxFQUFDLENBQUMsRUFBQyxTQUFTLEVBQUMsQ0FBQyxFQUFDLEtBQUssRUFBQyxDQUFDLEVBQUMscUJBQXFCLEVBQUMsQ0FBQyxFQUFDLFdBQVcsRUFBQyxDQUFDLEVBQUMsVUFBVSxFQUFDLENBQUMsRUFBQyxPQUFPLEVBQUMsQ0FBQyxFQUFDLFVBQVUsRUFBQyxFQUFFLEVBQUMsU0FBUyxFQUFDLEVBQUUsRUFBQyxjQUFjLEVBQUMsRUFBRSxFQUFDLFNBQVMsRUFBQyxFQUFFLEVBQUMsU0FBUyxFQUFDLEVBQUUsRUFBQyxTQUFTLEVBQUMsRUFBRSxFQUFDLGNBQWMsRUFBQyxFQUFFLEVBQUMsc0JBQXNCLEVBQUMsRUFBRSxFQUFDLGVBQWUsRUFBQyxFQUFFLEVBQUMsZ0JBQWdCLEVBQUMsRUFBRSxFQUFDLFlBQVksRUFBQyxFQUFFLEVBQUMsMEJBQTBCLEVBQUMsRUFBRSxFQUFDLHNC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TdHIgPSBcIlwiO1xuICAgICAgICAgICAgaWYgKCFyZWNvdmVyaW5nKSB7XG4gICAgICAgICAgICAgICAgZXhwZWN0ZWQgPSBbXTtcbiAgICAgICAgICAgICAgICBmb3IgKHAgaW4gdGFibGVbc3RhdGVdKVxuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy50ZXJtaW5hbHNfW3BdICYmIHAgPiAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBleHBlY3RlZC5wdXNoKFwiJ1wiICsgdGhpcy50ZXJtaW5hbHNfW3BdICsgXCInXCIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMubGV4ZXIuc2hvd1Bvc2l0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIGVyclN0ciA9IFwiUGFyc2UgZXJyb3Igb24gbGluZSBcIiArICh5eWxpbmVubyArIDEpICsgXCI6XFxuXCIgKyB0aGlzLmxleGVyLnNob3dQb3NpdGlvbigpICsgXCJcXG5FeHBlY3RpbmcgXCIgKyBleHBlY3RlZC5qb2luKFwiLCBcIikgKyBcIiwgZ290ICdcIiArICh0aGlzLnRlcm1pbmFsc19bc3ltYm9sXSB8fCBzeW1ib2wpICsgXCInXCI7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZXJyU3RyID0gXCJQYXJzZSBlcnJvciBvbiBsaW5lIFwiICsgKHl5bGluZW5vICsgMSkgKyBcIjogVW5leHBlY3RlZCBcIiArIChzeW1ib2wgPT0gMT9cImVuZCBvZiBpbnB1dFwiOlwiJ1wiICsgKHRoaXMudGVybWluYWxzX1tzeW1ib2xdIHx8IHN5bWJvbCkgKyBcIidcIik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMucGFyc2VFcnJvcihlcnJTdHIsIHt0ZXh0OiB0aGlzLmxleGVyLm1hdGNoLCB0b2tlbjogdGhpcy50ZXJtaW5hbHNfW3N5bWJvbF0gfHwgc3ltYm9sLCBsaW5lOiB0aGlzLmxleGVyLnl5bGluZW5vLCBsb2M6IHl5bG9jLCBleHBlY3RlZDogZXhwZWN0ZWR9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoYWN0aW9uWzBdIGluc3RhbmNlb2YgQXJyYXkgJiYgYWN0aW9uLmxlbmd0aCA+IDEpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIlBhcnNlIEVycm9yOiBtdWx0aXBsZSBhY3Rpb25zIHBvc3NpYmxlIGF0IHN0YXRlOiBcIiArIHN0YXRlICsgXCIsIHRva2VuOiBcIiArIHN5bWJvbCk7XG4gICAgICAgIH1cbiAgICAgICAgc3dpdGNoIChhY3Rpb25bMF0pIHtcbiAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgc3RhY2sucHVzaChzeW1ib2wpO1xuICAgICAgICAgICAgdnN0YWNrLnB1c2godGhpcy5sZXhlci55eXRleHQpO1xuICAgICAgICAgICAgbHN0YWNrLnB1c2godGhpcy5sZXhlci55eWxsb2MpO1xuICAgICAgICAgICAgc3RhY2sucHVzaChhY3Rpb25bMV0pO1xuICAgICAgICAgICAgc3ltYm9sID0gbnVsbDtcbiAgICAgICAgICAgIGlmICghcHJlRXJyb3JTeW1ib2wpIHtcbiAgICAgICAgICAgICAgICB5eWxlbmcgPSB0aGlzLmxleGVyLnl5bGVuZztcbiAgICAgICAgICAgICAgICB5eXRleHQgPSB0aGlzLmxleGVyLnl5dGV4dDtcbiAgICAgICAgICAgICAgICB5eWxpbmVubyA9IHRoaXMubGV4ZXIueXlsaW5lbm87XG4gICAgICAgICAgICAgICAgeXlsb2MgPSB0aGlzLmxleGVyLnl5bGxvYztcbiAgICAgICAgICAgICAgICBpZiAocmVjb3ZlcmluZyA+IDApXG4gICAgICAgICAgICAgICAgICAgIHJlY292ZXJpbmctLTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICA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lmIChsZW4pIHtcbiAgICAgICAgICAgICAgICBzdGFjayA9IHN0YWNrLnNsaWNlKDAsIC0xICogbGVuICogMik7XG4gICAgICAgICAgICAgICAgdnN0YWNrID0gdnN0YWNrLnNsaWNlKDAsIC0xICogbGVuKTtcbiAgICAgICAgICAgICAgICBsc3RhY2sgPSBsc3RhY2suc2xpY2UoMCwgLTEgKiBsZW4pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc3RhY2sucHVzaCh0aGlzLnByb2R1Y3Rpb25zX1thY3Rpb25bMV1dWzBdKTtcbiAgICAgICAgICAgIHZzdGFjay5wdXNoKHl5dmFsLiQpO1xuICAgICAgICAgICAgbHN0YWNrLnB1c2goeXl2YWwuXyQpO1xuICAgICAgICAgICAgbmV3U3RhdGUgPSB0YWJsZVtzdGFja1tzdGFjay5sZW5ndGggLSAyXV1bc3RhY2tbc3RhY2subGVuZ3RoIC0gMV1dO1xuICAgICAgICAgICAgc3RhY2sucHVzaChuZXdTdGF0ZSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHRydWU7XG59XG59O1xuLyogSmlzb24gZ2VuZXJhdGVkIGxleGVyICovXG52YXIgbGV4ZXIgPSAoZnVuY3Rpb24oKXtcbnZhciBsZXhlciA9ICh7RU9GOjEsXG5wYXJzZUVycm9yOmZ1bmN0aW9uIHBhcnNlRXJyb3Ioc3RyLCBoYXNoKSB7XG4gICAgICAgIGlmICh0aGlzLnl5LnBhcnNlcikge1xuICAgICAgICAgICAgdGhpcy55eS5wYXJzZXIucGFyc2VFcnJvcihzdHIsIGhhc2gpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKHN0cik7XG4gICAgICAgIH1cbiAgICB9LFxuc2V0SW5wdXQ6ZnVuY3Rpb24gKGlucHV0KSB7XG4gICAgIC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mIChuZXh0Lmxlbmd0aCA8IDIwKSB7XG4gICAgICAgICAgICBuZXh0ICs9IHRoaXMuX2lucHV0LnN1YnN0cigwLCAyMC1uZXh0Lmxlbmd0aCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIChuZXh0LnN1YnN0cigwLDIwKSsobmV4dC5sZW5ndGggPiAyMCA/ICcuLi4nOicnKSkucmVwbGFjZSgvXFxuL2csIFwiXCIpO1xuICAgIH0sXG5zaG93UG9zaXRpb246ZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgcHJlID0gdGhpcy5wYXN0SW5wdXQoKTtcbiAgICAgICAgdmFyIGMgPSBuZXcgQXJyYXkocHJlLmxlbmd0aCArIDEpLmpvaW4oXCItXCIpO1xuICAgICAgICByZXR1cm4gcHJlICsgdGhpcy51cGNvbWluZ0lucHV0KCkgKyBcIlxcblwiICsgYytcIl5cIjtcbiAgICB9LFxubmV4dDpmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmICh0aGlzLmRvbmUpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLkVPRjtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIXRoaXMuX2lucHV0KSB0aGlzLmRvbmUgPSB0cnVlO1xuXG4gICAgICAgIHZhciB0b2tlbixcbiAgICAgICAgICAgIG1hdGNoLFxuICAgICAgICAgICAgdGVtcE1hdGNoLFxuICAgICAgICAgICAgaW5kZXgsXG4gICAgICAgICAgICBjb2wsXG4gICAgICAgICAgICBsaW5lcztcbiAgICAgICAgaWYgKCF0aGlzLl9tb3JlKSB7XG4gICAgICAgICAgICB0aGlzLnl5dGV4dCA9ICcnO1xuICAgICAgICAgICAgdGhpcy5tYXRjaCA9ICcnO1xuICAgICAgICB9XG4gICAgICAgIHZhciBydWxlcyA9IHRoaXMuX2N1cnJlbnRSdWxlcygpO1xuICAgICAgICBmb3IgKHZhciBpPTA7aSA8IHJ1bGVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB0ZW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2hbMF07XG4gICAgICAgICAgICB0aGlzLm1hdGNoZXMgPSBtYXRjaDtcbiAgICAgICAgICAgIHRoaXMueXlsZW5nID0gdGhpcy55eXRleHQubGVuZ3RoO1xuICAgICAgICAgICAgaWYgKHRoaXMub3B0aW9ucy5yYW5nZXMpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnl5bGxvYy5yYW5nZSA9IFt0aGlzLm9mZnNldCwgdGhpcy5vZmZzZXQgKz0gdGhpcy55eWxlbmddO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5fbW9yZSA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5faW5wdXQgPSB0aGlzLl9pbnB1dC5zbGljZShtYXRjaFswXS5sZW5ndGgpO1xuICAgICAgICAgICAgdGhpcy5tYXRjaGVkICs9IG1hdGNoWzBdO1xuICAgICAgICAgICAgdG9rZW4gPSB0aGlzLnBlcmZvcm1BY3Rpb24uY2FsbCh0aGlzLCB0aGlzLnl5LCB0aGlzLCBydWxlc1tpbmRleF0sdGhpcy5jb25kaXRpb25TdGFja1t0aGlzLmNvbmRpdGlvblN0YWNrLmxlbmd0aC0xXSk7XG4gICAgICAgICAgICBpZiAodGhpcy5kb25lICYmIHRoaXMuX2lucHV0KSB0aGlzLmRvbmUgPSBmYWxzZTtcbiAgICAgICAgICAgIGlmICh0b2tlbikgcmV0dXJuIHRva2VuO1xuICAgICAgICAgICAgZWxzZSByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMuX2lucHV0ID09PSBcIlwiKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5FT0Y7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5wYXJzZUVycm9yKCdMZXhpY2FsIGVycm9yIG9uIGxpbmUgJysodGhpcy55eWxpbmVubysxKSsnLiBVbnJlY29nbml6ZWQgdGV4dC5cXG4nK3RoaXMuc2hvd1Bvc2l0aW9uKCksXG4gICAgICAg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YXZvaWRpbmdfbmFtZV9jb2xsaXNpb25zLFlZX1NUQVJUXG4pIHtcblxuXG5mdW5jdGlvbiBzdHJpcChzdGFydCwgZW5kKSB7XG4gIHJldHVybiB5eV8ueXl0ZXh0ID0geXlfLnl5dGV4dC5zdWJzdHJpbmcoc3RhcnQsIHl5Xy55eWxlbmcgLSBlbmQgKyBzdGFydCk7XG59XG5cblxudmFyIFlZU1RBVEU9WVlfU1RBUlRcbnN3aXRjaCgkYXZvaWRpbmdfbmFtZV9jb2xsaXNpb25zKSB7XG5jYXNlIDA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHl5Xy55eXRleHQuc2xpY2UoLTIpID09PSBcIlxcXFxcXFxcXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJpcCgwLDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYmVnaW4oXCJtdVwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmKHl5Xy55eXRleHQuc2xpY2UoLTEpID09PSBcIlxcXFxcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmlwKDAsMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5iZWdpbihcImVtdVwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmJlZ2luKFwibXVcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoeXlfLnl5dGV4dCkgcmV0dXJuIDE1O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5icmVhaztcbmNhc2UgMTpyZXR1cm4gMTU7XG5icmVhaztcbmNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wb3BTdGF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbmJyZWFrO1xuY2FzZSAzOnRoaXMuYmVnaW4oJ3JhdycpOyByZXR1cm4gMTU7XG5icmVhaztcbmNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBvcFN0YXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2hvdWxkIGJlIHVzaW5nIGB0aGlzLnRvcFN0YXRlKClgIGJlbG93LCBidXQgaXQgY3VycmVudGx5XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmV0dXJucyB0aGUgc2Vjb25kIHRvcCBpbnN0ZWFkIG9mIHRoZSBmaXJzdCB0b3AuIE9wZW5lZCBhblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlzc3VlIGFib3V0IGl0IGF0IGh0dHBzOi8vZ2l0aHViLmNvbS96YWFjaC9qaXNvbi9pc3N1ZXMvMjkxXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuY29uZGl0aW9uU3RhY2tbdGhpcy5jb25kaXRpb25TdGFjay5sZW5ndGgtMV0gPT09ICdyYXcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmlwKDUsIDkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdFTkRfUkFXX0JMT0NLJztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gIC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XhlcjtcbmZ1bmN0aW9uIFBhcnNlciAoKSB7IHRoaXMueXkgPSB7fTsgfVBhcnNlci5wcm90b3R5cGUgPSBwYXJzZXI7cGFyc2VyLlBhcnNlciA9IFBhcnNlcjtcbnJldHVybiBuZXcgUGFyc2VyO1xufSkoKTtleHBvcnQgZGVmYXVsdCBoYW5kbGViYXJzO1xuIl19 diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js deleted file mode 100644 index 7f06d19c..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js +++ /dev/null @@ -1,186 +0,0 @@ -/* eslint-disable new-cap */ -'use strict'; - -exports.__esModule = true; -exports.print = print; -exports.PrintVisitor = PrintVisitor; -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _visitor = require('./visitor'); - -var _visitor2 = _interopRequireDefault(_visitor); - -function print(ast) { - return new PrintVisitor().accept(ast); -} - -function PrintVisitor() { - this.padding = 0; -} - -PrintVisitor.prototype = new _visitor2['default'](); - -PrintVisitor.prototype.pad = function (string) { - var out = ''; - - for (var i = 0, l = this.padding; i < l; i++) { - out += ' '; - } - - out += string + '\n'; - return out; -}; - -PrintVisitor.prototype.Program = function (program) { - var out = '', - body = program.body, - i = undefined, - l = undefined; - - if (program.blockParams) { - var blockParams = 'BLOCK PARAMS: ['; - for (i = 0, l = program.blockParams.length; i < l; i++) { - blockParams += ' ' + program.blockParams[i]; - } - blockParams += ' ]'; - out += this.pad(blockParams); - } - - for (i = 0, l = body.length; i < l; i++) { - out += this.accept(body[i]); - } - - this.padding--; - - return out; -}; - -PrintVisitor.prototype.MustacheStatement = function (mustache) { - return this.pad('{{ ' + this.SubExpression(mustache) + ' }}'); -}; -PrintVisitor.prototype.Decorator = function (mustache) { - return this.pad('{{ DIRECTIVE ' + this.SubExpression(mustache) + ' }}'); -}; - -PrintVisitor.prototype.BlockStatement = PrintVisitor.prototype.DecoratorBlock = function (block) { - var out = ''; - - out += this.pad((block.type === 'DecoratorBlock' ? 'DIRECTIVE ' : '') + 'BLOCK:'); - this.padding++; - out += this.pad(this.SubExpression(block)); - if (block.program) { - out += this.pad('PROGRAM:'); - this.padding++; - out += this.accept(block.program); - this.padding--; - } - if (block.inverse) { - if (block.program) { - this.padding++; - } - out += this.pad('{{^}}'); - this.padding++; - out += this.accept(block.inverse); - this.padding--; - if (block.program) { - this.padding--; - } - } - this.padding--; - - return out; -}; - -PrintVisitor.prototype.PartialStatement = function (partial) { - var content = 'PARTIAL:' + partial.name.original; - if (partial.params[0]) { - content += ' ' + this.accept(partial.params[0]); - } - if (partial.hash) { - content += ' ' + this.accept(partial.hash); - } - return this.pad('{{> ' + content + ' }}'); -}; -PrintVisitor.prototype.PartialBlockStatement = function (partial) { - var content = 'PARTIAL BLOCK:' + partial.name.original; - if (partial.params[0]) { - content += ' ' + this.accept(partial.params[0]); - } - if (partial.hash) { - content += ' ' + this.accept(partial.hash); - } - - content += ' ' + this.pad('PROGRAM:'); - this.padding++; - content += this.accept(partial.program); - this.padding--; - - return this.pad('{{> ' + content + ' }}'); -}; - -PrintVisitor.prototype.ContentStatement = function (content) { - return this.pad("CONTENT[ '" + content.value + "' ]"); -}; - -PrintVisitor.prototype.CommentStatement = function (comment) { - return this.pad("{{! '" + comment.value + "' }}"); -}; - -PrintVisitor.prototype.SubExpression = function (sexpr) { - var params = sexpr.params, - paramStrings = [], - hash = undefined; - - for (var i = 0, l = params.length; i < l; i++) { - paramStrings.push(this.accept(params[i])); - } - - params = '[' + paramStrings.join(', ') + ']'; - - hash = sexpr.hash ? ' ' + this.accept(sexpr.hash) : ''; - - return this.accept(sexpr.path) + ' ' + params + hash; -}; - -PrintVisitor.prototype.PathExpression = function (id) { - var path = id.parts.join('/'); - return (id.data ? '@' : '') + 'PATH:' + path; -}; - -PrintVisitor.prototype.StringLiteral = function (string) { - return '"' + string.value + '"'; -}; - -PrintVisitor.prototype.NumberLiteral = function (number) { - return 'NUMBER{' + number.value + '}'; -}; - -PrintVisitor.prototype.BooleanLiteral = function (bool) { - return 'BOOLEAN{' + bool.value + '}'; -}; - -PrintVisitor.prototype.UndefinedLiteral = function () { - return 'UNDEFINED'; -}; - -PrintVisitor.prototype.NullLiteral = function () { - return 'NULL'; -}; - -PrintVisitor.prototype.Hash = function (hash) { - var pairs = hash.pairs, - joinedPairs = []; - - for (var i = 0, l = pairs.length; i < l; i++) { - joinedPairs.push(this.accept(pairs[i])); - } - - return 'HASH{' + joinedPairs.join(', ') + '}'; -}; -PrintVisitor.prototype.HashPair = function (pair) { - return pair.key + '=' + this.accept(pair.value); -}; -/* eslint-enable new-cap */ -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3ByaW50ZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozt1QkFDb0IsV0FBVzs7OztBQUV4QixTQUFTLEtBQUssQ0FBQyxHQUFHLEVBQUU7QUFDekIsU0FBTyxJQUFJLFlBQVksRUFBRSxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQztDQUN2Qzs7QUFFTSxTQUFTLFlBQVksR0FBRztBQUM3QixNQUFJLENBQUMsT0FBTyxHQUFHLENBQUMsQ0FBQztDQUNsQjs7QUFFRCxZQUFZLENBQUMsU0FBUyxHQUFHLDBCQUFhLENBQUM7O0FBRXZDLFlBQVksQ0FBQyxTQUFTLENBQUMsR0FBRyxHQUFHLFVBQVMsTUFBTSxFQUFFO0FBQzVDLE1BQUksR0FBRyxHQUFHLEVBQUUsQ0FBQzs7QUFFYixPQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsSUFBSSxDQUFDLE9BQU8sRUFBRSxDQUFDLEdBQUcsQ0FBQyxFQUFFLEN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2V5ICsgJz0nICsgdGhpcy5hY2NlcHQocGFpci52YWx1ZSk7XG59O1xuLyogZXNsaW50LWVuYWJsZSBuZXctY2FwICovXG4iXX0= diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js deleted file mode 100644 index 5fc98ed3..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js +++ /dev/null @@ -1,140 +0,0 @@ -'use strict'; - -exports.__esModule = true; -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _exception = require('../exception'); - -var _exception2 = _interopRequireDefault(_exception); - -function Visitor() { - this.parents = []; -} - -Visitor.prototype = { - constructor: Visitor, - mutating: false, - - // Visits a given value. If mutating, will replace the value if necessary. - acceptKey: function acceptKey(node, name) { - var value = this.accept(node[name]); - if (this.mutating) { - // Hacky sanity check: This may have a few false positives for type for the helper - // methods but will generally do the right thing without a lot of overhead. - if (value && !Visitor.prototype[value.type]) { - throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); - } - node[name] = value; - } - }, - - // Performs an accept operation with added sanity check to ensure - // required keys are not removed. - acceptRequired: function acceptRequired(node, name) { - this.acceptKey(node, name); - - if (!node[name]) { - throw new _exception2['default'](node.type + ' requires ' + name); - } - }, - - // Traverses a given array. If mutating, empty respnses will be removed - // for child elements. - acceptArray: function acceptArray(array) { - for (var i = 0, l = array.length; i < l; i++) { - this.acceptKey(array, i); - - if (!array[i]) { - array.splice(i, 1); - i--; - l--; - } - } - }, - - accept: function accept(object) { - if (!object) { - return; - } - - /* istanbul ignore next: Sanity code */ - if (!this[object.type]) { - throw new _exception2['default']('Unknown type: ' + object.type, object); - } - - if (this.current) { - this.parents.unshift(this.current); - } - this.current = object; - - var ret = this[object.type](object); - - this.current = this.parents.shift(); - - if (!this.mutating || ret) { - return ret; - } else if (ret !== false) { - return object; - } - }, - - Program: function Program(program) { - this.acceptArray(program.body); - }, - - MustacheStatement: visitSubExpression, - Decorator: visitSubExpression, - - BlockStatement: visitBlock, - DecoratorBlock: visitBlock, - - PartialStatement: visitPartial, - PartialBlockStatement: function PartialBlockStatement(partial) { - visitPartial.call(this, partial); - - this.acceptKey(partial, 'program'); - }, - - ContentStatement: function ContentStatement() /* content */{}, - CommentStatement: function CommentStatement() /* comment */{}, - - SubExpression: visitSubExpression, - - PathExpression: function PathExpression() /* path */{}, - - StringLiteral: function StringLiteral() /* string */{}, - NumberLiteral: function NumberLiteral() /* number */{}, - BooleanLiteral: function BooleanLiteral() /* bool */{}, - UndefinedLiteral: function UndefinedLiteral() /* literal */{}, - NullLiteral: function NullLiteral() /* literal */{}, - - Hash: function Hash(hash) { - this.acceptArray(hash.pairs); - }, - HashPair: function HashPair(pair) { - this.acceptRequired(pair, 'value'); - } -}; - -function visitSubExpression(mustache) { - this.acceptRequired(mustache, 'path'); - this.acceptArray(mustache.params); - this.acceptKey(mustache, 'hash'); -} -function visitBlock(block) { - visitSubExpression.call(this, block); - - this.acceptKey(block, 'program'); - this.acceptKey(block, 'inverse'); -} -function visitPartial(partial) { - this.acceptRequired(partial, 'name'); - this.acceptArray(partial.params); - this.acceptKey(partial, 'hash'); -} - -exports['default'] = Visitor; -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3Zpc2l0b3IuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozt5QkFBc0IsY0FBYzs7OztBQUVwQyxTQUFTLE9BQU8sR0FBRztBQUNqQixNQUFJLENBQUMsT0FBTyxHQUFHLEVBQUUsQ0FBQztDQUNuQjs7QUFFRCxPQUFPLENBQUMsU0FBUyxHQUFHO0FBQ2xCLGFBQVcsRUFBRSxPQUFPO0FBQ3BCLFVBQVEsRUFBRS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9vbCAqLykge30sXG4gIFVuZGVmaW5lZExpdGVyYWw6IGZ1bmN0aW9uKC8qIGxpdGVyYWwgKi8pIHt9LFxuICBOdWxsTGl0ZXJhbDogZnVuY3Rpb24oLyogbGl0ZXJhbCAqLykge30sXG5cbiAgSGFzaDogZnVuY3Rpb24oaGFzaCkge1xuICAgIHRoaXMuYWNjZXB0QXJyYXkoaGFzaC5wYWlycyk7XG4gIH0sXG4gIEhhc2hQYWlyOiBmdW5jdGlvbihwYWlyKSB7XG4gICAgdGhpcy5hY2NlcHRSZXF1aXJlZChwYWlyLCAndmFsdWUnKTtcbiAgfVxufTtcblxuZnVuY3Rpb24gdmlzaXRTdWJFeHByZXNzaW9uKG11c3RhY2hlKSB7XG4gIHRoaXMuYWNjZXB0UmVxdWlyZWQobXVzdGFjaGUsICdwYXRoJyk7XG4gIHRoaXMuYWNjZXB0QXJyYXkobXVzdGFjaGUucGFyYW1zKTtcbiAgdGhpcy5hY2NlcHRLZXkobXVzdGFjaGUsICdoYXNoJyk7XG59XG5mdW5jdGlvbiB2aXNpdEJsb2NrKGJsb2NrKSB7XG4gIHZpc2l0U3ViRXhwcmVzc2lvbi5jYWxsKHRoaXMsIGJsb2NrKTtcblxuICB0aGlzLmFjY2VwdEtleShibG9jaywgJ3Byb2dyYW0nKTtcbiAgdGhpcy5hY2NlcHRLZXkoYmxvY2ssICdpbnZlcnNlJyk7XG59XG5mdW5jdGlvbiB2aXNpdFBhcnRpYWwocGFydGlhbCkge1xuICB0aGlzLmFjY2VwdFJlcXVpcmVkKHBhcnRpYWwsICduYW1lJyk7XG4gIHRoaXMuYWNjZXB0QXJyYXkocGFydGlhbC5wYXJhbXMpO1xuICB0aGlzLmFjY2VwdEtleShwYXJ0aWFsLCAnaGFzaCcpO1xufVxuXG5leHBvcnQgZGVmYXVsdCBWaXNpdG9yO1xuIl19 diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js deleted file mode 100644 index a52240fe..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js +++ /dev/null @@ -1,221 +0,0 @@ -'use strict'; - -exports.__esModule = true; -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _visitor = require('./visitor'); - -var _visitor2 = _interopRequireDefault(_visitor); - -function WhitespaceControl() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - - this.options = options; -} -WhitespaceControl.prototype = new _visitor2['default'](); - -WhitespaceControl.prototype.Program = function (program) { - var doStandalone = !this.options.ignoreStandalone; - - var isRoot = !this.isRootSeen; - this.isRootSeen = true; - - var body = program.body; - for (var i = 0, l = body.length; i < l; i++) { - var current = body[i], - strip = this.accept(current); - - if (!strip) { - continue; - } - - var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), - _isNextWhitespace = isNextWhitespace(body, i, isRoot), - openStandalone = strip.openStandalone && _isPrevWhitespace, - closeStandalone = strip.closeStandalone && _isNextWhitespace, - inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; - - if (strip.close) { - omitRight(body, i, true); - } - if (strip.open) { - omitLeft(body, i, true); - } - - if (doStandalone && inlineStandalone) { - omitRight(body, i); - - if (omitLeft(body, i)) { - // If we are on a standalone node, save the indent info for partials - if (current.type === 'PartialStatement') { - // Pull out the whitespace from the final line - current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; - } - } - } - if (doStandalone && openStandalone) { - omitRight((current.program || current.inverse).body); - - // Strip out the previous content node if it's whitespace only - omitLeft(body, i); - } - if (doStandalone && closeStandalone) { - // Always strip the next node - omitRight(body, i); - - omitLeft((current.inverse || current.program).body); - } - } - - return program; -}; - -WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) { - this.accept(block.program); - this.accept(block.inverse); - - // Find the inverse program that is involed with whitespace stripping. - var program = block.program || block.inverse, - inverse = block.program && block.inverse, - firstInverse = inverse, - lastInverse = inverse; - - if (inverse && inverse.chained) { - firstInverse = inverse.body[0].program; - - // Walk the inverse chain to find the last inverse that is actually in the chain. - while (lastInverse.chained) { - lastInverse = lastInverse.body[lastInverse.body.length - 1].program; - } - } - - var strip = { - open: block.openStrip.open, - close: block.closeStrip.close, - - // Determine the standalone candiacy. Basically flag our content as being possibly standalone - // so our parent can determine if we actually are standalone - openStandalone: isNextWhitespace(program.body), - closeStandalone: isPrevWhitespace((firstInverse || program).body) - }; - - if (block.openStrip.close) { - omitRight(program.body, null, true); - } - - if (inverse) { - var inverseStrip = block.inverseStrip; - - if (inverseStrip.open) { - omitLeft(program.body, null, true); - } - - if (inverseStrip.close) { - omitRight(firstInverse.body, null, true); - } - if (block.closeStrip.open) { - omitLeft(lastInverse.body, null, true); - } - - // Find standalone else statments - if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { - omitLeft(program.body); - omitRight(firstInverse.body); - } - } else if (block.closeStrip.open) { - omitLeft(program.body, null, true); - } - - return strip; -}; - -WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) { - return mustache.strip; -}; - -WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) { - /* istanbul ignore next */ - var strip = node.strip || {}; - return { - inlineStandalone: true, - open: strip.open, - close: strip.close - }; -}; - -function isPrevWhitespace(body, i, isRoot) { - if (i === undefined) { - i = body.length; - } - - // Nodes that end with newlines are considered whitespace (but are special - // cased for strip operations) - var prev = body[i - 1], - sibling = body[i - 2]; - if (!prev) { - return isRoot; - } - - if (prev.type === 'ContentStatement') { - return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); - } -} -function isNextWhitespace(body, i, isRoot) { - if (i === undefined) { - i = -1; - } - - var next = body[i + 1], - sibling = body[i + 2]; - if (!next) { - return isRoot; - } - - if (next.type === 'ContentStatement') { - return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); - } -} - -// Marks the node to the right of the position as omitted. -// I.e. {{foo}}' ' will mark the ' ' node as omitted. -// -// If i is undefined, then the first child will be marked as such. -// -// If mulitple is truthy then all whitespace will be stripped out until non-whitespace -// content is met. -function omitRight(body, i, multiple) { - var current = body[i == null ? 0 : i + 1]; - if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) { - return; - } - - var original = current.value; - current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ''); - current.rightStripped = current.value !== original; -} - -// Marks the node to the left of the position as omitted. -// I.e. ' '{{foo}} will mark the ' ' node as omitted. -// -// If i is undefined then the last child will be marked as such. -// -// If mulitple is truthy then all whitespace will be stripped out until non-whitespace -// content is met. -function omitLeft(body, i, multiple) { - var current = body[i == null ? body.length - 1 : i - 1]; - if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) { - return; - } - - // We omit the last node if it's whitespace only and not preceded by a non-content node. - var original = current.value; - current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ''); - current.leftStripped = current.value !== original; - return current.leftStripped; -} - -exports['default'] = WhitespaceControl; -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3doaXRlc3BhY2UtY29udHJvbC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O3VCQUFvQixXQUFXOzs7O0FBRS9CLFNBQVMsaUJBQWlCLEdBQWU7TUFBZCxPQUFPLHlEQUFHLEVBQUU7O0FBQ3JDLE1BQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDO0NBQ3hCO0FBQ0QsaUJBQWlCLENBQUMsU0FBUyxHQUFHLDBCQUFhLENBQUM7O0FBRTVDLGlCQUFp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A9IGN1cnJlbnQudmFsdWUgIT09IG9yaWdpbmFsO1xuICByZXR1cm4gY3VycmVudC5sZWZ0U3RyaXBwZWQ7XG59XG5cbmV4cG9ydCBkZWZhdWx0IFdoaXRlc3BhY2VDb250cm9sO1xuIl19 diff --git a/node_modules/handlebars/dist/cjs/handlebars/decorators.js b/node_modules/handlebars/dist/cjs/handlebars/decorators.js deleted file mode 100644 index aaa3d6ee..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/decorators.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.registerDefaultDecorators = registerDefaultDecorators; -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _decoratorsInline = require('./decorators/inline'); - -var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); - -function registerDefaultDecorators(instance) { - _decoratorsInline2['default'](instance); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Z0NBQTJCLHFCQUFxQjs7OztBQUV6QyxTQUFTLHlCQUF5QixDQUFDLFFBQVEsRUFBRTtBQUNsRCxnQ0FBZSxRQUFRLENBQUMsQ0FBQztDQUMxQiIsImZpbGUiOiJkZWNvcmF0b3JzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHJlZ2lzdGVySW5saW5lIGZyb20gJy4vZGVjb3JhdG9ycy9pbmxpbmUnO1xuXG5leHBvcnQgZnVuY3Rpb24gcmVnaXN0ZXJEZWZhdWx0RGVjb3JhdG9ycyhpbnN0YW5jZSkge1xuICByZWdpc3RlcklubGluZShpbnN0YW5jZSk7XG59XG4iXX0= diff --git a/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js b/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js deleted file mode 100644 index f6114d35..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -exports.__esModule = true; - -var _utils = require('../utils'); - -exports['default'] = function (instance) { - instance.registerDecorator('inline', function (fn, props, container, options) { - var ret = fn; - if (!props.partials) { - props.partials = {}; - ret = function (context, options) { - // Create a new partials stack frame prior to exec. - var original = container.partials; - container.partials = _utils.extend({}, original, props.partials); - var ret = fn(context, options); - container.partials = original; - return ret; - }; - } - - props.partials[options.args[0]] = options.fn; - - return ret; - }); -}; - -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMvaW5saW5lLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7cUJBQXVCLFVBQVU7O3FCQUVsQixVQUFTLFFBQVEsRUFBRTtBQUNoQyxVQUFRLENBQUMsaUJBQWlCLENBQUMsUUFBUSxFQUFFLFVBQVMsRUFBRSxFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFO0FBQzNFLFFBQUksR0FBRyxHQUFHLEVBQUUsQ0FBQztBQUNiLFFBQUksQ0FBQyxLQUFLLENBQUMsUUFBUSxFQUFFO0FBQ25CLFdBQUssQ0FBQyxRQUFRLEdBQUcsRUFBRSxDQUFDO0FBQ3BCLFNBQUcsR0FBRyxVQUFTLE9BQU8sRUFBRSxPQUFPLEVBQUU7O0FBRS9CLFlBQUksUUFBUSxHQUFHLFNBQVMsQ0FBQyxRQUFRLENBQUM7QUFDbEMsaUJBQVMsQ0FBQyxRQUFRLEdBQUcsY0FBTyxFQUFFLEVBQUUsUUFBUSxFQUFFLEtBQUssQ0FBQyxRQUFRLENBQUMsQ0FBQztBQUMxRCxZQUFJLEdBQUcsR0FBRyxFQUFF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AgIH07XG4gICAgfVxuXG4gICAgcHJvcHMucGFydGlhbHNbb3B0aW9ucy5hcmdzWzBdXSA9IG9wdGlvbnMuZm47XG5cbiAgICByZXR1cm4gcmV0O1xuICB9KTtcbn1cbiJdfQ== diff --git a/node_modules/handlebars/dist/cjs/handlebars/exception.js b/node_modules/handlebars/dist/cjs/handlebars/exception.js deleted file mode 100644 index 690bd5bb..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/exception.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; - -exports.__esModule = true; -var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack']; - -function Exception(message, node) { - var loc = node && node.loc, - line = undefined, - endLineNumber = undefined, - column = undefined, - endColumn = undefined; - - if (loc) { - line = loc.start.line; - endLineNumber = loc.end.line; - column = loc.start.column; - endColumn = loc.end.column; - - message += ' - ' + line + ':' + column; - } - - var tmp = Error.prototype.constructor.call(this, message); - - // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. - for (var idx = 0; idx < errorProps.length; idx++) { - this[errorProps[idx]] = tmp[errorProps[idx]]; - } - - /* istanbul ignore else */ - if (Error.captureStackTrace) { - Error.captureStackTrace(this, Exception); - } - - try { - if (loc) { - this.lineNumber = line; - this.endLineNumber = endLineNumber; - - // Work around issue under safari where we can't directly set the column value - /* istanbul ignore next */ - if (Object.defineProperty) { - Object.defineProperty(this, 'column', { - value: column, - enumerable: true - }); - Object.defineProperty(this, 'endColumn', { - value: endColumn, - enumerable: true - }); - } else { - this.column = column; - this.endColumn = endColumn; - } - } - } catch (nop) { - /* Ignore if the browser is very particular */ - } -} - -Exception.prototype = new Error(); - -exports['default'] = Exception; -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2V4Y2VwdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1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RoaXMuZW5kTGluZU51bWJlciA9IGVuZExpbmVOdW1iZXI7XG5cbiAgICAgIC8vIFdvcmsgYXJvdW5kIGlzc3VlIHVuZGVyIHNhZmFyaSB3aGVyZSB3ZSBjYW4ndCBkaXJlY3RseSBzZXQgdGhlIGNvbHVtbiB2YWx1ZVxuICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgIGlmIChPYmplY3QuZGVmaW5lUHJvcGVydHkpIHtcbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHRoaXMsICdjb2x1bW4nLCB7XG4gICAgICAgICAgdmFsdWU6IGNvbHVtbixcbiAgICAgICAgICBlbnVtZXJhYmxlOiB0cnVlXG4gICAgICAgIH0pO1xuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkodGhpcywgJ2VuZENvbHVtbicsIHtcbiAgICAgICAgICB2YWx1ZTogZW5kQ29sdW1uLFxuICAgICAgICAgIGVudW1lcmFibGU6IHRydWVcbiAgICAgICAgfSk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLmNvbHVtbiA9IGNvbHVtbjtcbiAgICAgICAgdGhpcy5lbmRDb2x1bW4gPSBlbmRDb2x1bW47XG4gICAgICB9XG4gICAgfVxuICB9IGNhdGNoIChub3ApIHtcbiAgICAvKiBJZ25vcmUgaWYgdGhlIGJyb3dzZXIgaXMgdmVyeSBwYXJ0aWN1bGFyICovXG4gIH1cbn1cblxuRXhjZXB0aW9uLnByb3RvdHlwZSA9IG5ldyBFcnJvcigpO1xuXG5leHBvcnQgZGVmYXVsdCBFeGNlcHRpb247XG4iXX0= diff --git a/node_modules/handlebars/dist/cjs/handlebars/helpers.js b/node_modules/handlebars/dist/cjs/handlebars/helpers.js deleted file mode 100644 index a0cf1fce..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/helpers.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.registerDefaultHelpers = registerDefaultHelpers; -exports.moveHelperToHooks = moveHelperToHooks; -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _helpersBlockHelperMissing = require('./helpers/block-helper-missing'); - -var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); - -var _helpersEach = require('./helpers/each'); - -var _helpersEach2 = _interopRequireDefault(_helpersEach); - -var _helpersHelperMissing = require('./helpers/helper-missing'); - -var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); - -var _helpersIf = require('./helpers/if'); - -var _helpersIf2 = _interopRequireDefault(_helpersIf); - -var _helpersLog = require('./helpers/log'); - -var _helpersLog2 = _interopRequireDefault(_helpersLog); - -var _helpersLookup = require('./helpers/lookup'); - -var _helpersLookup2 = _interopRequireDefault(_helpersLookup); - -var _helpersWith = require('./helpers/with'); - -var _helpersWith2 = _interopRequireDefault(_helpersWith); - -function registerDefaultHelpers(instance) { - _helpersBlockHelperMissing2['default'](instance); - _helpersEach2['default'](instance); - _helpersHelperMissing2['default'](instance); - _helpersIf2['default'](instance); - _helpersLog2['default'](instance); - _helpersLookup2['default'](instance); - _helpersWith2['default'](instance); -} - -function moveHelperToHooks(instance, helperName, keepHelper) { - if (instance.helpers[helperName]) { - instance.hooks[helperName] = instance.helpers[helperName]; - if (!keepHelper) { - delete instance.helpers[helperName]; - } - } -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O3lDQUF1QyxnQ0FBZ0M7Ozs7MkJBQzlDLGdCQUFnQjs7OztvQ0FDUCwwQkFBMEI7Ozs7eUJBQ3JDLGNBQWM7Ozs7MEJBQ2IsZUFBZTs7Ozs2QkFDWixrQkFBa0I7Ozs7MkJBQ3BCLGdCQUFnQjs7OztBQUVs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wZXJzL2xvZyc7XG5pbXBvcnQgcmVnaXN0ZXJMb29rdXAgZnJvbSAnLi9oZWxwZXJzL2xvb2t1cCc7XG5pbXBvcnQgcmVnaXN0ZXJXaXRoIGZyb20gJy4vaGVscGVycy93aXRoJztcblxuZXhwb3J0IGZ1bmN0aW9uIHJlZ2lzdGVyRGVmYXVsdEhlbHBlcnMoaW5zdGFuY2UpIHtcbiAgcmVnaXN0ZXJCbG9ja0hlbHBlck1pc3NpbmcoaW5zdGFuY2UpO1xuICByZWdpc3RlckVhY2goaW5zdGFuY2UpO1xuICByZWdpc3RlckhlbHBlck1pc3NpbmcoaW5zdGFuY2UpO1xuICByZWdpc3RlcklmKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJMb2coaW5zdGFuY2UpO1xuICByZWdpc3Rlckxvb2t1cChpbnN0YW5jZSk7XG4gIHJlZ2lzdGVyV2l0aChpbnN0YW5jZSk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBtb3ZlSGVscGVyVG9Ib29rcyhpbnN0YW5jZSwgaGVscGVyTmFtZSwga2VlcEhlbHBlcikge1xuICBpZiAoaW5zdGFuY2UuaGVscGVyc1toZWxwZXJOYW1lXSkge1xuICAgIGluc3RhbmNlLmhvb2tzW2hlbHBlck5hbWVdID0gaW5zdGFuY2UuaGVscGVyc1toZWxwZXJOYW1lXTtcbiAgICBpZiAoIWtlZXBIZWxwZXIpIHtcbiAgICAgIGRlbGV0ZSBpbnN0YW5jZS5oZWxwZXJzW2hlbHBlck5hbWVdO1xuICAgIH1cbiAgfVxufVxuIl19 diff --git a/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js b/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js deleted file mode 100644 index 61c704df..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -exports.__esModule = true; - -var _utils = require('../utils'); - -exports['default'] = function (instance) { - instance.registerHelper('blockHelperMissing', function (context, options) { - var inverse = options.inverse, - fn = options.fn; - - if (context === true) { - return fn(this); - } else if (context === false || context == null) { - return inverse(this); - } else if (_utils.isArray(context)) { - if (context.length > 0) { - if (options.ids) { - options.ids = [options.name]; - } - - return instance.helpers.each(context, options); - } else { - return inverse(this); - } - } else { - if (options.data && options.ids) { - var data = _utils.createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); - options = { data: data }; - } - - return fn(context, options); - } - }); -}; - -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvYmxvY2staGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztxQkFBd0QsVUFBVTs7cUJBRW5ELFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFVBQVEsQ0FBQyxjQUFjLENBQUMsb0JBQW9CLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3ZFLFFBQUksT0FBTyxHQUFHLE9BQU8sQ0FBQyxPQUFPO1FBQzNCLEVBQUUsR0FBRyxPQUFPLENBQUMsRUFBRSxDQUFDOztBQUVsQixRQUFJLE9BQU8sS0FBSyxJQUFJLEVBQUU7QUFDcEIsYUFBTyxFQUFFLENBQUMsSUFBSSxDQUFDLENBQUM7S0FDakIsTUFBTSxJQUFJLE9BQU8sS0FBSyxLQUFLLElBQUksT0FBTyxJQUFJLElBQUksRUFBRTtBQUMvQyxhQUFPLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUN0QixNQUFNLElBQUksZUFBUSxPQUFPLENBQUMsRUFBRTtBQUMzQixVQUFJLE9BQU8sQ0FBQyxNQUFNLEdBQUcsQ0FBQyxFQUFFO0FBQ3RCLFlBQUksT0FBTyxDQUFDLEdBQUcsRUFBRTtBQUNmLGl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blxuICAgIGlmIChjb250ZXh0ID09PSB0cnVlKSB7XG4gICAgICByZXR1cm4gZm4odGhpcyk7XG4gICAgfSBlbHNlIGlmIChjb250ZXh0ID09PSBmYWxzZSB8fCBjb250ZXh0ID09IG51bGwpIHtcbiAgICAgIHJldHVybiBpbnZlcnNlKHRoaXMpO1xuICAgIH0gZWxzZSBpZiAoaXNBcnJheShjb250ZXh0KSkge1xuICAgICAgaWYgKGNvbnRleHQubGVuZ3RoID4gMCkge1xuICAgICAgICBpZiAob3B0aW9ucy5pZHMpIHtcbiAgICAgICAgICBvcHRpb25zLmlkcyA9IFtvcHRpb25zLm5hbWVdO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGluc3RhbmNlLmhlbHBlcnMuZWFjaChjb250ZXh0LCBvcHRpb25zKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBpbnZlcnNlKHRoaXMpO1xuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBpZiAob3B0aW9ucy5kYXRhICYmIG9wdGlvbnMuaWRzKSB7XG4gICAgICAgIGxldCBkYXRhID0gY3JlYXRlRnJhbWUob3B0aW9ucy5kYXRhKTtcbiAgICAgICAgZGF0YS5jb250ZXh0UGF0aCA9IGFwcGVuZENvbnRleHRQYXRoKFxuICAgICAgICAgIG9wdGlvbnMuZGF0YS5jb250ZXh0UGF0aCxcbiAgICAgICAgICBvcHRpb25zLm5hbWVcbiAgICAgICAgKTtcbiAgICAgICAgb3B0aW9ucyA9IHsgZGF0YTogZGF0YSB9O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gZm4oY29udGV4dCwgb3B0aW9ucyk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ== diff --git a/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js b/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js deleted file mode 100644 index 5632dfc4..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js +++ /dev/null @@ -1,104 +0,0 @@ -'use strict'; - -exports.__esModule = true; -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _utils = require('../utils'); - -var _exception = require('../exception'); - -var _exception2 = _interopRequireDefault(_exception); - -exports['default'] = function (instance) { - instance.registerHelper('each', function (context, options) { - if (!options) { - throw new _exception2['default']('Must pass iterator to #each'); - } - - var fn = options.fn, - inverse = options.inverse, - i = 0, - ret = '', - data = undefined, - contextPath = undefined; - - if (options.data && options.ids) { - contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; - } - - if (_utils.isFunction(context)) { - context = context.call(this); - } - - if (options.data) { - data = _utils.createFrame(options.data); - } - - function execIteration(field, index, last) { - if (data) { - data.key = field; - data.index = index; - data.first = index === 0; - data.last = !!last; - - if (contextPath) { - data.contextPath = contextPath + field; - } - } - - ret = ret + fn(context[field], { - data: data, - blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) - }); - } - - if (context && typeof context === 'object') { - if (_utils.isArray(context)) { - for (var j = context.length; i < j; i++) { - if (i in context) { - execIteration(i, i, i === context.length - 1); - } - } - } else if (global.Symbol && context[global.Symbol.iterator]) { - var newContext = []; - var iterator = context[global.Symbol.iterator](); - for (var it = iterator.next(); !it.done; it = iterator.next()) { - newContext.push(it.value); - } - context = newContext; - for (var j = context.length; i < j; i++) { - execIteration(i, i, i === context.length - 1); - } - } else { - (function () { - var priorKey = undefined; - - Object.keys(context).forEach(function (key) { - // We're running the iterations one step out of sync so we can detect - // the last iteration without have to scan the object twice and create - // an itermediate keys array. - if (priorKey !== undefined) { - execIteration(priorKey, i - 1); - } - priorKey = key; - i++; - }); - if (priorKey !== undefined) { - execIteration(priorKey, i - 1, true); - } - })(); - } - } - - if (i === 0) { - ret = inverse(this); - } - - return ret; - }); -}; - -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL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uICAgICAgICAgIC8vIGFuIGl0ZXJtZWRpYXRlIGtleXMgYXJyYXkuXG4gICAgICAgICAgaWYgKHByaW9yS2V5ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIGV4ZWNJdGVyYXRpb24ocHJpb3JLZXksIGkgLSAxKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcHJpb3JLZXkgPSBrZXk7XG4gICAgICAgICAgaSsrO1xuICAgICAgICB9KTtcbiAgICAgICAgaWYgKHByaW9yS2V5ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBleGVjSXRlcmF0aW9uKHByaW9yS2V5LCBpIC0gMSwgdHJ1ZSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoaSA9PT0gMCkge1xuICAgICAgcmV0ID0gaW52ZXJzZSh0aGlzKTtcbiAgICB9XG5cbiAgICByZXR1cm4gcmV0O1xuICB9KTtcbn1cbiJdfQ== diff --git a/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js b/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js deleted file mode 100644 index 74dc7487..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -exports.__esModule = true; -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _exception = require('../exception'); - -var _exception2 = _interopRequireDefault(_exception); - -exports['default'] = function (instance) { - instance.registerHelper('helperMissing', function () /* [args, ]options */{ - if (arguments.length === 1) { - // A missing field in a {{foo}} construct. - return undefined; - } else { - // Someone is actually trying to call something, blow up. - throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); - } - }); -}; - -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hl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cy5sZW5ndGggLSAxXS5uYW1lICsgJ1wiJ1xuICAgICAgKTtcbiAgICB9XG4gIH0pO1xufVxuIl19 diff --git a/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js b/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js deleted file mode 100644 index 71392c55..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -exports.__esModule = true; -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _utils = require('../utils'); - -var _exception = require('../exception'); - -var _exception2 = _interopRequireDefault(_exception); - -exports['default'] = function (instance) { - instance.registerHelper('if', function (conditional, options) { - if (arguments.length != 2) { - throw new _exception2['default']('#if requires exactly one argument'); - } - if (_utils.isFunction(conditional)) { - conditional = conditional.call(this); - } - - // Default behavior is to render the positive path if the value is truthy and not empty. - // The `includeZero` option may be set to treat the condtional as purely not empty based on the - // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. - if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { - return options.inverse(this); - } else { - return options.fn(this); - } - }); - - instance.registerHelper('unless', function (conditional, options) { - if (arguments.length != 2) { - throw new _exception2['default']('#unless requires exactly one argument'); - } - return instance.helpers['if'].call(this, conditional, { - fn: options.inverse, - inverse: options.fn, - hash: options.hash - }); - }); -}; - -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaWYuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztxQkFBb0MsVUFBVTs7eUJBQ3hCLGNBQWM7Ozs7cUJBRXJCLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFVBQVEsQ0FBQyxjQUFjLENBQUMsSUFBSSxFQUFFLFVBQVMsV0FBVyx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iAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIG9wdGlvbnMuZm4odGhpcyk7XG4gICAgfVxuICB9KTtcblxuICBpbnN0YW5jZS5yZWdpc3RlckhlbHBlcigndW5sZXNzJywgZnVuY3Rpb24oY29uZGl0aW9uYWwsIG9wdGlvbnMpIHtcbiAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCAhPSAyKSB7XG4gICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKCcjdW5sZXNzIHJlcXVpcmVzIGV4YWN0bHkgb25lIGFyZ3VtZW50Jyk7XG4gICAgfVxuICAgIHJldHVybiBpbnN0YW5jZS5oZWxwZXJzWydpZiddLmNhbGwodGhpcywgY29uZGl0aW9uYWwsIHtcbiAgICAgIGZuOiBvcHRpb25zLmludmVyc2UsXG4gICAgICBpbnZlcnNlOiBvcHRpb25zLmZuLFxuICAgICAgaGFzaDogb3B0aW9ucy5oYXNoXG4gICAgfSk7XG4gIH0pO1xufVxuIl19 diff --git a/node_modules/handlebars/dist/cjs/handlebars/helpers/log.js b/node_modules/handlebars/dist/cjs/handlebars/helpers/log.js deleted file mode 100644 index da6671e5..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/helpers/log.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -exports.__esModule = true; - -exports['default'] = function (instance) { - instance.registerHelper('log', function () /* message, options */{ - var args = [undefined], - options = arguments[arguments.length - 1]; - for (var i = 0; i < arguments.length - 1; i++) { - args.push(arguments[i]); - } - - var level = 1; - if (options.hash.level != null) { - level = options.hash.level; - } else if (options.data && options.data.level != null) { - level = options.data.level; - } - args[0] = level; - - instance.log.apply(instance, args); - }); -}; - -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7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ZXIoJ2xvZycsIGZ1bmN0aW9uKC8qIG1lc3NhZ2UsIG9wdGlvbnMgKi8pIHtcbiAgICBsZXQgYXJncyA9IFt1bmRlZmluZWRdLFxuICAgICAgb3B0aW9ucyA9IGFyZ3VtZW50c1thcmd1bWVudHMubGVuZ3RoIC0gMV07XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcmd1bWVudHMubGVuZ3RoIC0gMTsgaSsrKSB7XG4gICAgICBhcmdzLnB1c2goYXJndW1lbnRzW2ldKTtcbiAgICB9XG5cbiAgICBsZXQgbGV2ZWwgPSAxO1xuICAgIGlmIChvcHRpb25zLmhhc2gubGV2ZWwgIT0gbnVsbCkge1xuICAgICAgbGV2ZWwgPSBvcHRpb25zLmhhc2gubGV2ZWw7XG4gICAgfSBlbHNlIGlmIChvcHRpb25zLmRhdGEgJiYgb3B0aW9ucy5kYXRhLmxldmVsICE9IG51bGwpIHtcbiAgICAgIGxldmVsID0gb3B0aW9ucy5kYXRhLmxldmVsO1xuICAgIH1cbiAgICBhcmdzWzBdID0gbGV2ZWw7XG5cbiAgICBpbnN0YW5jZS5sb2coLi4uYXJncyk7XG4gIH0pO1xufVxuIl19 diff --git a/node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js b/node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js deleted file mode 100644 index 512a0e1d..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -exports.__esModule = true; - -exports['default'] = function (instance) { - instance.registerHelper('lookup', function (obj, field, options) { - if (!obj) { - // Note for 5.0: Change to "obj == null" in 5.0 - return obj; - } - return options.lookupProperty(obj, field); - }); -}; - -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9va3VwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7cUJBQWUsVUFBUyxRQUFRLEVBQUU7QUFDaEMsVUFBUSxDQUFDLGNBQWMsQ0FBQyxRQUFRLEVBQUUsVUFBUyxHQUFHLEVBQUUsS0FBSyxFQUFFLE9BQU8sRUFBRTtBQUM5RCxRQUFJLENBQUMsR0FBRyxFQUFFOztBQUVSLGFBQU8sR0FBRyxDQUFDO0tBQ1o7QUFDRCxXQUFPLE9BQU8sQ0FBQyxjQUFjLENBQUMsR0FBRyxFQUFFLEtBQUssQ0FBQyxDQUFDO0dBQzNDLENBQUMsQ0FBQztDQUNKIiwiZmlsZSI6Imxvb2t1cC5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVySGVscGVyKCdsb29rdXAnLCBmdW5jdGlvbihvYmosIGZpZWxkLCBvcHRpb25zKSB7XG4gICAgaWYgKCFvYmopIHtcbiAgICAgIC8vIE5vdGUgZm9yIDUuMDogQ2hhbmdlIHRvIFwib2JqID09IG51bGxcIiBpbiA1LjBcbiAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIHJldHVybiBvcHRpb25zLmxvb2t1cFByb3BlcnR5KG9iaiwgZmllbGQpO1xuICB9KTtcbn1cbiJdfQ== diff --git a/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js b/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js deleted file mode 100644 index eaeec33a..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -exports.__esModule = true; -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _utils = require('../utils'); - -var _exception = require('../exception'); - -var _exception2 = _interopRequireDefault(_exception); - -exports['default'] = function (instance) { - instance.registerHelper('with', function (context, options) { - if (arguments.length != 2) { - throw new _exception2['default']('#with requires exactly one argument'); - } - if (_utils.isFunction(context)) { - context = context.call(this); - } - - var fn = options.fn; - - if (!_utils.isEmpty(context)) { - var data = options.data; - if (options.data && options.ids) { - data = _utils.createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); - } - - return fn(context, { - data: data, - blockParams: _utils.blockParams([context], [data && data.contextPath]) - }); - } else { - return options.inverse(this); - } - }); -}; - -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvd2l0aC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O3FCQU1PLFVBQVU7O3lCQUNLLGNBQWM7Ozs7cUJBRXJCLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFVBQVEsQ0FBQyxjQUFjLENBQUMsTUFBTSxFQUFFLFVBQVMsT0FBTyxFQUFFLE9BQU8sRUFBRTtBQUN6RCxRQUFJLFNBQVMsQ0FBQyxNQUFNLElBQUksQ0FBQyxFQUFFO0FBQ3pCLFlBQU0sMkJBQWMscUNBQXFDLENBQUMsQ0FBQztLQUM1RDtBQUNELFFBQUksa0JBQVcsT0FBTyxDQUFDLEVBQUU7QUFDdkIsYUFBTyxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7S0FDOUI7O0FBRUQsUUFBSSxFQUFFLEdBQUcsT0FBTyxDQUFDLEVBQUUsQ0FBQzs7QUFFcEIsUUFBSSxDQUFDLGVBQVEsT0FBTyxDQUFDLEVBQUU7QUFDckIsVUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQztBQUN4QixVQUFJLE9BQU8sQ0FBQyxJQUFJLElBQUksT0FBTyxDQUFDLEdBQUcsRUFBRTtBQUMvQixZQUFJLEdBQUcsbUJBQVksT0FBTyxDQU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ID0gY29udGV4dC5jYWxsKHRoaXMpO1xuICAgIH1cblxuICAgIGxldCBmbiA9IG9wdGlvbnMuZm47XG5cbiAgICBpZiAoIWlzRW1wdHkoY29udGV4dCkpIHtcbiAgICAgIGxldCBkYXRhID0gb3B0aW9ucy5kYXRhO1xuICAgICAgaWYgKG9wdGlvbnMuZGF0YSAmJiBvcHRpb25zLmlkcykge1xuICAgICAgICBkYXRhID0gY3JlYXRlRnJhbWUob3B0aW9ucy5kYXRhKTtcbiAgICAgICAgZGF0YS5jb250ZXh0UGF0aCA9IGFwcGVuZENvbnRleHRQYXRoKFxuICAgICAgICAgIG9wdGlvbnMuZGF0YS5jb250ZXh0UGF0aCxcbiAgICAgICAgICBvcHRpb25zLmlkc1swXVxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gZm4oY29udGV4dCwge1xuICAgICAgICBkYXRhOiBkYXRhLFxuICAgICAgICBibG9ja1BhcmFtczogYmxvY2tQYXJhbXMoW2NvbnRleHRdLCBbZGF0YSAmJiBkYXRhLmNvbnRleHRQYXRoXSlcbiAgICAgIH0pO1xuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gb3B0aW9ucy5pbnZlcnNlKHRoaXMpO1xuICAgIH1cbiAgfSk7XG59XG4iXX0= diff --git a/node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js b/node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js deleted file mode 100644 index fed2a467..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.createNewLookupObject = createNewLookupObject; - -var _utils = require('../utils'); - -/** - * Create a new object with "null"-prototype to avoid truthy results on prototype properties. - * The resulting object can be used with "object[property]" to check if a property exists - * @param {...object} sources a varargs parameter of source objects that will be merged - * @returns {object} - */ - -function createNewLookupObject() { - for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) { - sources[_key] = arguments[_key]; - } - - return _utils.extend.apply(undefined, [Object.create(null)].concat(sources)); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL2NyZWF0ZS1uZXctbG9va3VwLW9iamVjdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztxQkFBdUIsVUFBVTs7Ozs7Ozs7O0FBUTFCLFNBQVMscUJBQXFCLEdBQWE7b0NBQVQsT0FBTztBQUFQLFdBQU87OztBQUM5QyxTQUFPLGdDQUFPLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLFNBQUssT0FBTyxFQUFDLENBQUM7Q0FDaEQiLCJmaWxlIjoiY3JlYXRlLW5ldy1sb29rdXAtb2JqZWN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgZXh0ZW5kIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vKipcbiAqIENyZWF0ZSBhIG5ldyBvYmplY3Qgd2l0aCBcIm51bGxcIi1wcm90b3R5cGUgdG8gYXZvaWQgdHJ1dGh5IHJlc3VsdHMgb24gcHJvdG90eXBlIHByb3BlcnRpZXMuXG4gKiBUaGUgcmVzdWx0aW5nIG9iamVjdCBjYW4gYmUgdXNlZCB3aXRoIFwib2JqZWN0W3Byb3BlcnR5XVwiIHRvIGNoZWNrIGlmIGEgcHJvcGVydHkgZXhpc3RzXG4gKiBAcGFyYW0gey4uLm9iamVjdH0gc291cmNlcyBhIHZhcmFyZ3MgcGFyYW1ldGVyIG9mIHNvdXJjZSBvYmplY3RzIHRoYXQgd2lsbCBiZSBtZXJnZWRcbiAqIEByZXR1cm5zIHtvYmplY3R9XG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVOZXdMb29rdXBPYmplY3QoLi4uc291cmNlcykge1xuICByZXR1cm4gZXh0ZW5kKE9iamVjdC5jcmVhdGUobnVsbCksIC4uLnNvdXJjZXMpO1xufVxuIl19 diff --git a/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js b/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js deleted file mode 100644 index c0db5561..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.createProtoAccessControl = createProtoAccessControl; -exports.resultIsAllowed = resultIsAllowed; -exports.resetLoggedProperties = resetLoggedProperties; -// istanbul ignore next - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -var _createNewLookupObject = require('./create-new-lookup-object'); - -var _logger = require('../logger'); - -var logger = _interopRequireWildcard(_logger); - -var loggedProperties = Object.create(null); - -function createProtoAccessControl(runtimeOptions) { - var defaultMethodWhiteList = Object.create(null); - defaultMethodWhiteList['constructor'] = false; - defaultMethodWhiteList['__defineGetter__'] = false; - defaultMethodWhiteList['__defineSetter__'] = false; - defaultMethodWhiteList['__lookupGetter__'] = false; - - var defaultPropertyWhiteList = Object.create(null); - // eslint-disable-next-line no-proto - defaultPropertyWhiteList['__proto__'] = false; - - return { - properties: { - whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties), - defaultValue: runtimeOptions.allowProtoPropertiesByDefault - }, - methods: { - whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods), - defaultValue: runtimeOptions.allowProtoMethodsByDefault - } - }; -} - -function resultIsAllowed(result, protoAccessControl, propertyName) { - if (typeof result === 'function') { - return checkWhiteList(protoAccessControl.methods, propertyName); - } else { - return checkWhiteList(protoAccessControl.properties, propertyName); - } -} - -function checkWhiteList(protoAccessControlForType, propertyName) { - if (protoAccessControlForType.whitelist[propertyName] !== undefined) { - return protoAccessControlForType.whitelist[propertyName] === true; - } - if (protoAccessControlForType.defaultValue !== undefined) { - return protoAccessControlForType.defaultValue; - } - logUnexpecedPropertyAccessOnce(propertyName); - return false; -} - -function logUnexpecedPropertyAccessOnce(propertyName) { - if (loggedProperties[propertyName] !== true) { - loggedProperties[propertyName] = true; - logger.log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'); - } -} - -function resetLoggedProperties() { - Object.keys(loggedProperties).forEach(function (propertyName) { - delete loggedProperties[propertyName]; - }); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL3Byb3RvLWFjY2Vzcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O3FDQUFzQyw0QkFBNEI7O3NCQUMxQyxXQUFXOztJQUF2QixNQUFNOztBQUVsQixJQUFNLGdCQUFnQixHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUM7O0FBRXRDLFNBQVMsd0JBQXdCLENBQUMsY0FBYyxFQUFFO0FBQ3ZELE1BQUksc0JBQXNCLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUNqRCx3QkFBc0IsQ0FBQyxhQUFhLENBQUMsR0FBRyxLQUFLLENBQUM7QUFDOUMsd0JBQXNCLENBQUMsa0JBQWtCLENBQUMsR0FBRyxLQUFLLENBQUM7QUFDbkQsd0JBQXNCLENBQUMsa0JBQWtCLENBQUMsR0FBRyxLQUFLLENBQUM7QUFDbkQsd0JBQXNCLENBQUMsa0JBQWtCLENBQUMsR0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WVdICE9PSB0cnVlKSB7XG4gICAgbG9nZ2VkUHJvcGVydGllc1twcm9wZXJ0eU5hbWVdID0gdHJ1ZTtcbiAgICBsb2dnZXIubG9nKFxuICAgICAgJ2Vycm9yJyxcbiAgICAgIGBIYW5kbGViYXJzOiBBY2Nlc3MgaGFzIGJlZW4gZGVuaWVkIHRvIHJlc29sdmUgdGhlIHByb3BlcnR5IFwiJHtwcm9wZXJ0eU5hbWV9XCIgYmVjYXVzZSBpdCBpcyBub3QgYW4gXCJvd24gcHJvcGVydHlcIiBvZiBpdHMgcGFyZW50LlxcbmAgK1xuICAgICAgICBgWW91IGNhbiBhZGQgYSBydW50aW1lIG9wdGlvbiB0byBkaXNhYmxlIHRoZSBjaGVjayBvciB0aGlzIHdhcm5pbmc6XFxuYCArXG4gICAgICAgIGBTZWUgaHR0cHM6Ly9oYW5kbGViYXJzanMuY29tL2FwaS1yZWZlcmVuY2UvcnVudGltZS1vcHRpb25zLmh0bWwjb3B0aW9ucy10by1jb250cm9sLXByb3RvdHlwZS1hY2Nlc3MgZm9yIGRldGFpbHNgXG4gICAgKTtcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gcmVzZXRMb2dnZWRQcm9wZXJ0aWVzKCkge1xuICBPYmplY3Qua2V5cyhsb2dnZWRQcm9wZXJ0aWVzKS5mb3JFYWNoKHByb3BlcnR5TmFtZSA9PiB7XG4gICAgZGVsZXRlIGxvZ2dlZFByb3BlcnRpZXNbcHJvcGVydHlOYW1lXTtcbiAgfSk7XG59XG4iXX0= diff --git a/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js b/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js deleted file mode 100644 index 3722eb42..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.wrapHelper = wrapHelper; - -function wrapHelper(helper, transformOptionsFn) { - if (typeof helper !== 'function') { - // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639 - // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function. - return helper; - } - var wrapper = function wrapper() /* dynamic arguments */{ - var options = arguments[arguments.length - 1]; - arguments[arguments.length - 1] = transformOptionsFn(options); - return helper.apply(this, arguments); - }; - return wrapper; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL3dyYXBIZWxwZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBTyxTQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUUsa0JBQWtCLEVBQUU7QUFDckQsTUFBSSxPQUFPLE1BQU0sS0FBSyxVQUFVLEVBQUU7OztBQUdoQyxXQUFPLE1BQU0sQ0FBQztHQUNmO0FBQ0QsTUFBSSxPQUFPLEdBQUcsU0FBVixPQUFPLDBCQUFxQztBQUM5QyxRQUFNLE9BQU8sR0FBRyxTQUFTLENBQUMsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQztBQUNoRCxhQUFTLENBQUMsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsR0FBRyxrQkFBa0IsQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUM5RCxXQUFPLE1BQU0sQ0FBQyxLQUFLLENBQUMsSUFBSSxFQUFFLFNBQVMsQ0FBQyxDQUFDO0dBQ3RDLENBQUM7QUFDRixTQUFPLE9BQU8sQ0FBQztDQUNoQiIsImZpbGUiOiJ3cmFwSGVscGVyLmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGZ1bmN0aW9uIHdyYXBIZWxwZXIoaGVscGVyLCB0cmFuc2Zvcm1PcHRpb25zRm4pIHtcbiAgaWYgKHR5cGVvZiBoZWxwZXIgIT09ICdmdW5jdGlvbicpIHtcbiAgICAvLyBUaGlzIHNob3VsZCBub3QgaGFwcGVuLCBidXQgYXBwYXJlbnRseSBpdCBkb2VzIGluIGh0dHBzOi8vZ2l0aHViLmNvbS93eWNhdHMvaGFuZGxlYmFycy5qcy9pc3N1ZXMvMTYzOVxuICAgIC8vIFdlIHRyeSB0byBtYWtlIHRoZSB3cmFwcGVyIGxlYXN0LWludmFzaXZlIGJ5IG5vdCB3cmFwcGluZyBpdCwgaWYgdGhlIGhlbHBlciBpcyBub3QgYSBmdW5jdGlvbi5cbiAgICByZXR1cm4gaGVscGVyO1xuICB9XG4gIGxldCB3cmFwcGVyID0gZnVuY3Rpb24oLyogZHluYW1pYyBhcmd1bWVudHMgKi8pIHtcbiAgICBjb25zdCBvcHRpb25zID0gYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAxXTtcbiAgICBhcmd1bWVudHNbYXJndW1lbnRzLmxlbmd0aCAtIDFdID0gdHJhbnNmb3JtT3B0aW9uc0ZuKG9wdGlvbnMpO1xuICAgIHJldHVybiBoZWxwZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgfTtcbiAgcmV0dXJuIHdyYXBwZXI7XG59XG4iXX0= diff --git a/node_modules/handlebars/dist/cjs/handlebars/logger.js b/node_modules/handlebars/dist/cjs/handlebars/logger.js deleted file mode 100644 index c0fd5268..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/logger.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -exports.__esModule = true; - -var _utils = require('./utils'); - -var logger = { - methodMap: ['debug', 'info', 'warn', 'error'], - level: 'info', - - // Maps a given level value to the `methodMap` indexes above. - lookupLevel: function lookupLevel(level) { - if (typeof level === 'string') { - var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); - if (levelMap >= 0) { - level = levelMap; - } else { - level = parseInt(level, 10); - } - } - - return level; - }, - - // Can be overridden in the host environment - log: function log(level) { - level = logger.lookupLevel(level); - - if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { - var method = logger.methodMap[level]; - // eslint-disable-next-line no-console - if (!console[method]) { - method = 'log'; - } - - for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - message[_key - 1] = arguments[_key]; - } - - console[method].apply(console, message); // eslint-disable-line no-console - } - } -}; - -exports['default'] = logger; -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2xvZ2dlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O3FCQUF3QixTQUFTOztBQUVqQyxJQUFJLE1BQU0sR0FBRztBQUNYLFdBQVMsRUFBRSxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLE9BQU8sQ0FBQztBQUM3QyxPQUFLLEVBQUUsTUFBTTs7O0FBR2IsYUFBVyxFQUFFLHFCQUFTLEtBQUssRUFBRTtBQUMzQixRQUFJLE9BQU8sS0FBSyxLQUFLLFFBQVEsRUFBRTtBQUM3QixVQUFJLFFBQVEsR0FBRyxlQUFRLE1BQU0sQ0FBQyxTQUFTLEVBQUUsS0FBSyxDQUFDLFdBQVcsRUFBRSxDQUFDLENBQUM7QUFDOUQsVUFBSSxRQUFRLElBQUksQ0FBQyxFQUFFO0FBQ2pCLGFBQUssR0FBRyxRQUFRLENBQUM7T0FDbEIsTUFBTTtBQUNMLGFBQUssR0FBRyxRQUFRLENBQUMsS0FBSyxFQUFFLEVBQUUsQ0FBQyxDQUFDO09BQzdCO0tBQ0Y7O0FBRUQsV0FBTyxLQUFLLENBQUM7R0FDZDs7O0FBR0QsS0FBRyxFQUFFLGFBQVMsS0FBSyxFQUFjO0FBQy9CLFNBQUssR0FBRyxNQUFNLENBQUMsV0FBVyxDQUFDLEtBQUssQ0FBQyxDQUFDOztBQUVsQyxRQUNFLE9BQU8sT0FBTyxLQUFLLFdBQVc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XG5cbiAgICByZXR1cm4gbGV2ZWw7XG4gIH0sXG5cbiAgLy8gQ2FuIGJlIG92ZXJyaWRkZW4gaW4gdGhlIGhvc3QgZW52aXJvbm1lbnRcbiAgbG9nOiBmdW5jdGlvbihsZXZlbCwgLi4ubWVzc2FnZSkge1xuICAgIGxldmVsID0gbG9nZ2VyLmxvb2t1cExldmVsKGxldmVsKTtcblxuICAgIGlmIChcbiAgICAgIHR5cGVvZiBjb25zb2xlICE9PSAndW5kZWZpbmVkJyAmJlxuICAgICAgbG9nZ2VyLmxvb2t1cExldmVsKGxvZ2dlci5sZXZlbCkgPD0gbGV2ZWxcbiAgICApIHtcbiAgICAgIGxldCBtZXRob2QgPSBsb2dnZXIubWV0aG9kTWFwW2xldmVsXTtcbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1jb25zb2xlXG4gICAgICBpZiAoIWNvbnNvbGVbbWV0aG9kXSkge1xuICAgICAgICBtZXRob2QgPSAnbG9nJztcbiAgICAgIH1cbiAgICAgIGNvbnNvbGVbbWV0aG9kXSguLi5tZXNzYWdlKTsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby1jb25zb2xlXG4gICAgfVxuICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBsb2dnZXI7XG4iXX0= diff --git a/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js b/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js deleted file mode 100644 index 690c4064..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -exports.__esModule = true; - -exports['default'] = function (Handlebars) { - /* istanbul ignore next */ - var root = typeof global !== 'undefined' ? global : window, - $Handlebars = root.Handlebars; - /* istanbul ignore next */ - Handlebars.noConflict = function () { - if (root.Handlebars === Handlebars) { - root.Handlebars = $Handlebars; - } - return Handlebars; - }; -}; - -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ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_modules/handlebars/dist/cjs/handlebars/runtime.js deleted file mode 100644 index 5b976262..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/runtime.js +++ /dev/null @@ -1,372 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.checkRevision = checkRevision; -exports.template = template; -exports.wrapProgram = wrapProgram; -exports.resolvePartial = resolvePartial; -exports.invokePartial = invokePartial; -exports.noop = noop; -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -// istanbul ignore next - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -var _utils = require('./utils'); - -var Utils = _interopRequireWildcard(_utils); - -var _exception = require('./exception'); - -var _exception2 = _interopRequireDefault(_exception); - -var _base = require('./base'); - -var _helpers = require('./helpers'); - -var _internalWrapHelper = require('./internal/wrapHelper'); - -var _internalProtoAccess = require('./internal/proto-access'); - -function checkRevision(compilerInfo) { - var compilerRevision = compilerInfo && compilerInfo[0] || 1, - currentRevision = _base.COMPILER_REVISION; - - if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) { - return; - } - - if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) { - var runtimeVersions = _base.REVISION_CHANGES[currentRevision], - compilerVersions = _base.REVISION_CHANGES[compilerRevision]; - throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); - } else { - // Use the embedded version info since the runtime doesn't know about this revision yet - throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); - } -} - -function template(templateSpec, env) { - /* istanbul ignore next */ - if (!env) { - throw new _exception2['default']('No environment passed to template'); - } - if (!templateSpec || !templateSpec.main) { - throw new _exception2['default']('Unknown template object: ' + typeof templateSpec); - } - - templateSpec.main.decorator = templateSpec.main_d; - - // Note: Using env.VM references rather than local var references throughout this section to allow - // for external users to override these as pseudo-supported APIs. - env.VM.checkRevision(templateSpec.compiler); - - // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0) - var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7; - - function invokePartialWrapper(partial, context, options) { - if (options.hash) { - context = Utils.extend({}, context, options.hash); - if (options.ids) { - options.ids[0] = true; - } - } - partial = env.VM.resolvePartial.call(this, partial, context, options); - - var extendedOptions = Utils.extend({}, options, { - hooks: this.hooks, - protoAccessControl: this.protoAccessControl - }); - - var result = env.VM.invokePartial.call(this, partial, context, extendedOptions); - - if (result == null && env.compile) { - options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); - result = options.partials[options.name](context, extendedOptions); - } - if (result != null) { - if (options.indent) { - var lines = result.split('\n'); - for (var i = 0, l = lines.length; i < l; i++) { - if (!lines[i] && i + 1 === l) { - break; - } - - lines[i] = options.indent + lines[i]; - } - result = lines.join('\n'); - } - return result; - } else { - throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); - } - } - - // Just add water - var container = { - strict: function strict(obj, name, loc) { - if (!obj || !(name in obj)) { - throw new _exception2['default']('"' + name + '" not defined in ' + obj, { - loc: loc - }); - } - return container.lookupProperty(obj, name); - }, - lookupProperty: function lookupProperty(parent, propertyName) { - var result = parent[propertyName]; - if (result == null) { - return result; - } - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return result; - } - - if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) { - return result; - } - return undefined; - }, - lookup: function lookup(depths, name) { - var len = depths.length; - for (var i = 0; i < len; i++) { - var result = depths[i] && container.lookupProperty(depths[i], name); - if (result != null) { - return depths[i][name]; - } - } - }, - lambda: function lambda(current, context) { - return typeof current === 'function' ? current.call(context) : current; - }, - - escapeExpression: Utils.escapeExpression, - invokePartial: invokePartialWrapper, - - fn: function fn(i) { - var ret = templateSpec[i]; - ret.decorator = templateSpec[i + '_d']; - return ret; - }, - - programs: [], - program: function program(i, data, declaredBlockParams, blockParams, depths) { - var programWrapper = this.programs[i], - fn = this.fn(i); - if (data || depths || blockParams || declaredBlockParams) { - programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); - } else if (!programWrapper) { - programWrapper = this.programs[i] = wrapProgram(this, i, fn); - } - return programWrapper; - }, - - data: function data(value, depth) { - while (value && depth--) { - value = value._parent; - } - return value; - }, - mergeIfNeeded: function mergeIfNeeded(param, common) { - var obj = param || common; - - if (param && common && param !== common) { - obj = Utils.extend({}, common, param); - } - - return obj; - }, - // An empty object to use as replacement for null-contexts - nullContext: Object.seal({}), - - noop: env.VM.noop, - compilerInfo: templateSpec.compiler - }; - - function ret(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var data = options.data; - - ret._setup(options); - if (!options.partial && templateSpec.useData) { - data = initData(context, data); - } - var depths = undefined, - blockParams = templateSpec.useBlockParams ? [] : undefined; - if (templateSpec.useDepths) { - if (options.depths) { - depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths; - } else { - depths = [context]; - } - } - - function main(context /*, options*/) { - return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); - } - - main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); - return main(context, options); - } - - ret.isTop = true; - - ret._setup = function (options) { - if (!options.partial) { - var mergedHelpers = Utils.extend({}, env.helpers, options.helpers); - wrapHelpersToPassLookupProperty(mergedHelpers, container); - container.helpers = mergedHelpers; - - if (templateSpec.usePartial) { - // Use mergeIfNeeded here to prevent compiling global partials multiple times - container.partials = container.mergeIfNeeded(options.partials, env.partials); - } - if (templateSpec.usePartial || templateSpec.useDecorators) { - container.decorators = Utils.extend({}, env.decorators, options.decorators); - } - - container.hooks = {}; - container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options); - - var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7; - _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers); - _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers); - } else { - container.protoAccessControl = options.protoAccessControl; // internal option - container.helpers = options.helpers; - container.partials = options.partials; - container.decorators = options.decorators; - container.hooks = options.hooks; - } - }; - - ret._child = function (i, data, blockParams, depths) { - if (templateSpec.useBlockParams && !blockParams) { - throw new _exception2['default']('must pass block params'); - } - if (templateSpec.useDepths && !depths) { - throw new _exception2['default']('must pass parent depths'); - } - - return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); - }; - return ret; -} - -function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { - function prog(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var currentDepths = depths; - if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) { - currentDepths = [context].concat(depths); - } - - return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); - } - - prog = executeDecorators(fn, prog, container, depths, data, blockParams); - - prog.program = i; - prog.depth = depths ? depths.length : 0; - prog.blockParams = declaredBlockParams || 0; - return prog; -} - -/** - * This is currently part of the official API, therefore implementation details should not be changed. - */ - -function resolvePartial(partial, context, options) { - if (!partial) { - if (options.name === '@partial-block') { - partial = options.data['partial-block']; - } else { - partial = options.partials[options.name]; - } - } else if (!partial.call && !options.name) { - // This is a dynamic partial that returned a string - options.name = partial; - partial = options.partials[partial]; - } - return partial; -} - -function invokePartial(partial, context, options) { - // Use the current closure context to save the partial-block if this partial - var currentPartialBlock = options.data && options.data['partial-block']; - options.partial = true; - if (options.ids) { - options.data.contextPath = options.ids[0] || options.data.contextPath; - } - - var partialBlock = undefined; - if (options.fn && options.fn !== noop) { - (function () { - options.data = _base.createFrame(options.data); - // Wrapper function to get access to currentPartialBlock from the closure - var fn = options.fn; - partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - // Restore the partial-block from the closure for the execution of the block - // i.e. the part inside the block of the partial call. - options.data = _base.createFrame(options.data); - options.data['partial-block'] = currentPartialBlock; - return fn(context, options); - }; - if (fn.partials) { - options.partials = Utils.extend({}, options.partials, fn.partials); - } - })(); - } - - if (partial === undefined && partialBlock) { - partial = partialBlock; - } - - if (partial === undefined) { - throw new _exception2['default']('The partial ' + options.name + ' could not be found'); - } else if (partial instanceof Function) { - return partial(context, options); - } -} - -function noop() { - return ''; -} - -function initData(context, data) { - if (!data || !('root' in data)) { - data = data ? _base.createFrame(data) : {}; - data.root = context; - } - return data; -} - -function executeDecorators(fn, prog, container, depths, data, blockParams) { - if (fn.decorator) { - var props = {}; - prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); - Utils.extend(prog, props); - } - return prog; -} - -function wrapHelpersToPassLookupProperty(mergedHelpers, container) { - Object.keys(mergedHelpers).forEach(function (helperName) { - var helper = mergedHelpers[helperName]; - mergedHelpers[helperName] = passLookupPropertyOption(helper, container); - }); -} - -function passLookupPropertyOption(helper, container) { - var lookupProperty = container.lookupProperty; - return _internalWrapHelper.wrapHelper(helper, function (options) { - return Utils.extend({ lookupProperty: lookupProperty }, options); - }); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3J1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7cUJBQXVCLFNBQVM7O0lBQXBCLEtBQUs7O3lCQUNLLGFBQWE7Ozs7b0JBTTVCLFFBQVE7O3VCQUNtQixXQUFXOztrQ0FDbEIsdUJBQXVCOzttQ0FJM0MseUJBQXlCOztBQUV6Qix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ICAgICAgICAgY29udGV4dCxcbiAgICAgICAgICBjb250YWluZXIuaGVscGVycyxcbiAgICAgICAgICBjb250YWluZXIucGFydGlhbHMsXG4gICAgICAgICAgZGF0YSxcbiAgICAgICAgICBibG9ja1BhcmFtcyxcbiAgICAgICAgICBkZXB0aHNcbiAgICAgICAgKVxuICAgICAgKTtcbiAgICB9XG5cbiAgICBtYWluID0gZXhlY3V0ZURlY29yYXRvcnMoXG4gICAgICB0ZW1wbGF0ZVNwZWMubWFpbixcbiAgICAgIG1haW4sXG4gICAgICBjb250YWluZXIsXG4gICAgICBvcHRpb25zLmRlcHRocyB8fCBbXSxcbiAgICAgIGRhdGEsXG4gICAgICBibG9ja1BhcmFtc1xuICAgICk7XG4gICAgcmV0dXJuIG1haW4oY29udGV4dCwgb3B0aW9ucyk7XG4gIH1cblxuICByZXQuaXNUb3AgPSB0cnVlO1xuXG4gIHJldC5fc2V0dXAgPSBmdW5jdGlvbihvcHRpb25zKSB7XG4gICAgaWYgKCFvcHRpb25zLnBhcnRpYWwpIHtcbiAgICAgIGxldCBtZXJnZWRIZWxwZXJzID0gVXRpbHMuZXh0ZW5kKHt9LCBlbnYuaGVscGVycywgb3B0aW9ucy5oZWxwZXJzKTtcbiAgICAgIHdyYXBIZWxwZXJzVG9QYXNzTG9va3VwUHJvcGVydHkobWVyZ2VkSGVscGVycywgY29udGFpbmVyKTtcbiAgICAgIGNvbnRhaW5lci5oZWxwZXJzID0gbWVyZ2VkSGVscGVycztcblxuICAgICAgaWYgKHRlbXBsYXRlU3BlYy51c2VQYXJ0aWFsKSB7XG4gICAgICAgIC8vIFVzZSBtZXJnZUlmTmVlZGVkIGhlcmUgdG8gcHJldmVudCBjb21waWxpbmcgZ2xvYmFsIHBhcnRpYWxzIG11bHRpcGxlIHRpbWVzXG4gICAgICAgIGNvbnRhaW5lci5wYXJ0aWFscyA9IGNvbnRhaW5lci5tZXJnZUlmTmVlZGVkKFxuICAgICAgICAgIG9wdGlvbnMucGFydGlhbHMsXG4gICAgICAgICAgZW52LnBhcnRpYWxzXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgICBpZiAodGVtcGxhdGVTcGVjLnVzZVBhcnRpYWwgfHwgdGVtcGxhdGVTcGVjLnVzZURlY29yYXRvcnMpIHtcbiAgICAgICAgY29udGFpbmVyLmRlY29yYXRvcnMgPSBVdGlscy5leHRlbmQoXG4gICAgICAgICAge30sXG4gICAgICAgICAgZW52LmRlY29yYXRvcnMsXG4gICAgICAgICAgb3B0aW9ucy5kZWNvcmF0b3JzXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnRhaW5lci5ob29rcyA9IHt9O1xuICAgICAgY29udGFpbmVyLnByb3RvQWNjZXNzQ29udHJvbCA9IGNyZWF0ZVByb3RvQWNjZXNzQ29udHJvbChvcHRpb25zKTtcblxuICAgICAgbGV0IGtlZXBIZWxwZXJJbkhlbHBlcnMgPVxuICAgICAgICBvcHRpb25zLmFsbG93Q2FsbHNUb0hlbHBlck1pc3NpbmcgfHxcbiAgICAgICAgdGVtcGxhdGVXYXNQcmVjb21waWxlZFdpdGhDb21waWxlclY3O1xuICAgICAgbW92ZUhlbHBlclRvSG9va3MoY29udGFpbmVyLCAnaGVscGVyTWlzc2luZycsIGtlZXBIZWxwZXJJbkhlbHBlcnMpO1xuICAgICAgbW92ZUhlbHBlclRvSG9va3MoY29udGFpbmVyLCAnYmxvY2tIZWxwZXJNaXNzaW5nJywga2VlcEhlbHBlckluSGVscGVycyk7XG4gICAgfSBlbHNlIHtcbiAgICAgIGNvbnRhaW5lci5wcm90b0FjY2Vzc0NvbnRyb2wgPSBvcHRpb25zLnByb3RvQWNjZXNzQ29udHJvbDsgLy8gaW50ZXJuYWwgb3B0aW9uXG4gICAgICBjb250YWluZXIuaGVscGVycyA9IG9wdGlvbnMuaGVscGVycztcbiAgICAgIGNvbnRhaW5lci5wYXJ0aWFscyA9IG9wdGlvbnMucGFydGlhbHM7XG4gICAgICBjb250YWluZXIuZGVjb3J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G9va3VwUHJvcGVydHlPcHRpb24oaGVscGVyLCBjb250YWluZXIpO1xuICB9KTtcbn1cblxuZnVuY3Rpb24gcGFzc0xvb2t1cFByb3BlcnR5T3B0aW9uKGhlbHBlciwgY29udGFpbmVyKSB7XG4gIGNvbnN0IGxvb2t1cFByb3BlcnR5ID0gY29udGFpbmVyLmxvb2t1cFByb3BlcnR5O1xuICByZXR1cm4gd3JhcEhlbHBlcihoZWxwZXIsIG9wdGlvbnMgPT4ge1xuICAgIHJldHVybiBVdGlscy5leHRlbmQoeyBsb29rdXBQcm9wZXJ0eSB9LCBvcHRpb25zKTtcbiAgfSk7XG59XG4iXX0= diff --git a/node_modules/handlebars/dist/cjs/handlebars/safe-string.js b/node_modules/handlebars/dist/cjs/handlebars/safe-string.js deleted file mode 100644 index fc9da63c..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/safe-string.js +++ /dev/null @@ -1,15 +0,0 @@ -// Build out our basic SafeString type -'use strict'; - -exports.__esModule = true; -function SafeString(string) { - this.string = string; -} - -SafeString.prototype.toString = SafeString.prototype.toHTML = function () { - return '' + this.string; -}; - -exports['default'] = SafeString; -module.exports = exports['default']; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3NhZmUtc3RyaW5nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFDQSxTQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUU7QUFDMUIsTUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7Q0FDdEI7O0FBRUQsVUFBVSxDQUFDLFNBQVMsQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsWUFBVztBQUN2RSxTQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDO0NBQ3pCLENBQUM7O3FCQUVhLFVBQVUiLCJmaWxlIjoic2FmZS1zdHJpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBCdWlsZCBvdXQgb3VyIGJhc2ljIFNhZmVTdHJpbmcgdHlwZVxuZnVuY3Rpb24gU2FmZVN0cmluZyhzdHJpbmcpIHtcbiAgdGhpcy5zdHJpbmcgPSBzdHJpbmc7XG59XG5cblNhZmVTdHJpbmcucHJvdG90eXBlLnRvU3RyaW5nID0gU2FmZVN0cmluZy5wcm90b3R5cGUudG9IVE1MID0gZnVuY3Rpb24oKSB7XG4gIHJldHVybiAnJyArIHRoaXMuc3RyaW5nO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgU2FmZVN0cmluZztcbiJdfQ== diff --git a/node_modules/handlebars/dist/cjs/handlebars/utils.js b/node_modules/handlebars/dist/cjs/handlebars/utils.js deleted file mode 100644 index c7704b37..00000000 --- a/node_modules/handlebars/dist/cjs/handlebars/utils.js +++ /dev/null @@ -1,124 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.extend = extend; -exports.indexOf = indexOf; -exports.escapeExpression = escapeExpression; -exports.isEmpty = isEmpty; -exports.createFrame = createFrame; -exports.blockParams = blockParams; -exports.appendContextPath = appendContextPath; -var escape = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`', - '=': '=' -}; - -var badChars = /[&<>"'`=]/g, - possible = /[&<>"'`=]/; - -function escapeChar(chr) { - return escape[chr]; -} - -function extend(obj /* , ...source */) { - for (var i = 1; i < arguments.length; i++) { - for (var key in arguments[i]) { - if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { - obj[key] = arguments[i][key]; - } - } - } - - return obj; -} - -var toString = Object.prototype.toString; - -exports.toString = toString; -// Sourced from lodash -// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt -/* eslint-disable func-style */ -var isFunction = function isFunction(value) { - return typeof value === 'function'; -}; -// fallback for older versions of Chrome and Safari -/* istanbul ignore next */ -if (isFunction(/x/)) { - exports.isFunction = isFunction = function (value) { - return typeof value === 'function' && toString.call(value) === '[object Function]'; - }; -} -exports.isFunction = isFunction; - -/* eslint-enable func-style */ - -/* istanbul ignore next */ -var isArray = Array.isArray || function (value) { - return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; -}; - -exports.isArray = isArray; -// Older IE versions do not directly support indexOf so we must implement our own, sadly. - -function indexOf(array, value) { - for (var i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { - return i; - } - } - return -1; -} - -function escapeExpression(string) { - if (typeof string !== 'string') { - // don't escape SafeStrings, since they're already safe - if (string && string.toHTML) { - return string.toHTML(); - } else if (string == null) { - return ''; - } else if (!string) { - return string + ''; - } - - // Force a string conversion as this will be done by the append regardless and - // the regex test will do this transparently behind the scenes, causing issues if - // an object's to string has escaped characters in it. - string = '' + string; - } - - if (!possible.test(string)) { - return string; - } - return string.replace(badChars, escapeChar); -} - -function isEmpty(value) { - if (!value && value !== 0) { - return true; - } else if (isArray(value) && value.length === 0) { - return true; - } else { - return false; - } -} - -function createFrame(object) { - var frame = extend({}, object); - frame._parent = object; - return frame; -} - -function blockParams(params, ids) { - params.path = ids; - return params; -} - -function appendContextPath(contextPath, id) { - return (contextPath ? contextPath + '.' : '') + id; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3V0aWxzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSxJQUFNLE1BQU0sR0FBRztBQUNiLEtBQUcsRUFBRSxPQUFPO0FBQ1osS0FBRyxFQUFFLE1BQU07QUFDWCxLQUFHLEVBQUUsTUFBTTtBQUNYLEtBQUcsRUFBRSxRQUFRO0FBQ2IsS0FBRyxFQUFFLFFBQVE7QUFDYixLQUFHLEVBQUUsUUFBUTtBQUNiLEtBQUcsRUFBRSxRQUFRO0NBQ2QsQ0FBQzs7QUFFRixJQUF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IHZhbHVlLmxlbmd0aCA9PT0gMCkge1xuICAgIHJldHVybiB0cnVlO1xuICB9IGVsc2Uge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlRnJhbWUob2JqZWN0KSB7XG4gIGxldCBmcmFtZSA9IGV4dGVuZCh7fSwgb2JqZWN0KTtcbiAgZnJhbWUuX3BhcmVudCA9IG9iamVjdDtcbiAgcmV0dXJuIGZyYW1lO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gYmxvY2tQYXJhbXMocGFyYW1zLCBpZHMpIHtcbiAgcGFyYW1zLnBhdGggPSBpZHM7XG4gIHJldHVybiBwYXJhbXM7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBhcHBlbmRDb250ZXh0UGF0aChjb250ZXh0UGF0aCwgaWQpIHtcbiAgcmV0dXJuIChjb250ZXh0UGF0aCA/IGNvbnRleHRQYXRoICsgJy4nIDogJycpICsgaWQ7XG59XG4iXX0= diff --git a/node_modules/handlebars/dist/cjs/precompiler.js b/node_modules/handlebars/dist/cjs/precompiler.js deleted file mode 100644 index 9e6cd636..00000000 --- a/node_modules/handlebars/dist/cjs/precompiler.js +++ /dev/null @@ -1,327 +0,0 @@ -/* eslint-disable no-console */ -'use strict'; - -// istanbul ignore next - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -// istanbul ignore next - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _neoAsync = require('neo-async'); - -var _neoAsync2 = _interopRequireDefault(_neoAsync); - -var _fs = require('fs'); - -var _fs2 = _interopRequireDefault(_fs); - -var _handlebars = require('./handlebars'); - -var Handlebars = _interopRequireWildcard(_handlebars); - -var _path = require('path'); - -var _sourceMap = require('source-map'); - -module.exports.loadTemplates = function (opts, callback) { - loadStrings(opts, function (err, strings) { - if (err) { - callback(err); - } else { - loadFiles(opts, function (err, files) { - if (err) { - callback(err); - } else { - opts.templates = strings.concat(files); - callback(undefined, opts); - } - }); - } - }); -}; - -function loadStrings(opts, callback) { - var strings = arrayCast(opts.string), - names = arrayCast(opts.name); - - if (names.length !== strings.length && strings.length > 1) { - return callback(new Handlebars.Exception('Number of names did not match the number of string inputs')); - } - - _neoAsync2['default'].map(strings, function (string, callback) { - if (string !== '-') { - callback(undefined, string); - } else { - (function () { - // Load from stdin - var buffer = ''; - process.stdin.setEncoding('utf8'); - - process.stdin.on('data', function (chunk) { - buffer += chunk; - }); - process.stdin.on('end', function () { - callback(undefined, buffer); - }); - })(); - } - }, function (err, strings) { - strings = strings.map(function (string, index) { - return { - name: names[index], - path: names[index], - source: string - }; - }); - callback(err, strings); - }); -} - -function loadFiles(opts, callback) { - // Build file extension pattern - var extension = (opts.extension || 'handlebars').replace(/[\\^$*+?.():=!|{}\-[\]]/g, function (arg) { - return '\\' + arg; - }); - extension = new RegExp('\\.' + extension + '$'); - - var ret = [], - queue = (opts.files || []).map(function (template) { - return { template: template, root: opts.root }; - }); - _neoAsync2['default'].whilst(function () { - return queue.length; - }, function (callback) { - var _queue$shift = queue.shift(); - - var path = _queue$shift.template; - var root = _queue$shift.root; - - _fs2['default'].stat(path, function (err, stat) { - if (err) { - return callback(new Handlebars.Exception('Unable to open template file "' + path + '"')); - } - - if (stat.isDirectory()) { - opts.hasDirectory = true; - - _fs2['default'].readdir(path, function (err, children) { - /* istanbul ignore next : Race condition that being too lazy to test */ - if (err) { - return callback(err); - } - children.forEach(function (file) { - var childPath = path + '/' + file; - - if (extension.test(childPath) || _fs2['default'].statSync(childPath).isDirectory()) { - queue.push({ template: childPath, root: root || path }); - } - }); - - callback(); - }); - } else { - _fs2['default'].readFile(path, 'utf8', function (err, data) { - /* istanbul ignore next : Race condition that being too lazy to test */ - if (err) { - return callback(err); - } - - if (opts.bom && data.indexOf('') === 0) { - data = data.substring(1); - } - - // Clean the template name - var name = path; - if (!root) { - name = _path.basename(name); - } else if (name.indexOf(root) === 0) { - name = name.substring(root.length + 1); - } - name = name.replace(extension, ''); - - ret.push({ - path: path, - name: name, - source: data - }); - - callback(); - }); - } - }); - }, function (err) { - if (err) { - callback(err); - } else { - callback(undefined, ret); - } - }); -} - -module.exports.cli = function (opts) { - if (opts.version) { - console.log(Handlebars.VERSION); - return; - } - - if (!opts.templates.length && !opts.hasDirectory) { - throw new Handlebars.Exception('Must define at least one template or directory.'); - } - - if (opts.simple && opts.min) { - throw new Handlebars.Exception('Unable to minimize simple output'); - } - - var multiple = opts.templates.length !== 1 || opts.hasDirectory; - if (opts.simple && multiple) { - throw new Handlebars.Exception('Unable to output multiple templates in simple mode'); - } - - // Force simple mode if we have only one template and it's unnamed. - if (!opts.amd && !opts.commonjs && opts.templates.length === 1 && !opts.templates[0].name) { - opts.simple = true; - } - - // Convert the known list into a hash - var known = {}; - if (opts.known && !Array.isArray(opts.known)) { - opts.known = [opts.known]; - } - if (opts.known) { - for (var i = 0, len = opts.known.length; i < len; i++) { - known[opts.known[i]] = true; - } - } - - var objectName = opts.partial ? 'Handlebars.partials' : 'templates'; - - var output = new _sourceMap.SourceNode(); - if (!opts.simple) { - if (opts.amd) { - output.add("define(['" + opts.handlebarPath + 'handlebars.runtime\'], function(Handlebars) {\n Handlebars = Handlebars["default"];'); - } else if (opts.commonjs) { - output.add('var Handlebars = require("' + opts.commonjs + '");'); - } else { - output.add('(function() {\n'); - } - output.add(' var template = Handlebars.template, templates = '); - if (opts.namespace) { - output.add(opts.namespace); - output.add(' = '); - output.add(opts.namespace); - output.add(' || '); - } - output.add('{};\n'); - } - - opts.templates.forEach(function (template) { - var options = { - knownHelpers: known, - knownHelpersOnly: opts.o - }; - - if (opts.map) { - options.srcName = template.path; - } - if (opts.data) { - options.data = true; - } - - var precompiled = Handlebars.precompile(template.source, options); - - // If we are generating a source map, we have to reconstruct the SourceNode object - if (opts.map) { - var consumer = new _sourceMap.SourceMapConsumer(precompiled.map); - precompiled = _sourceMap.SourceNode.fromStringWithSourceMap(precompiled.code, consumer); - } - - if (opts.simple) { - output.add([precompiled, '\n']); - } else { - if (!template.name) { - throw new Handlebars.Exception('Name missing for template'); - } - - if (opts.amd && !multiple) { - output.add('return '); - } - output.add([objectName, "['", template.name, "'] = template(", precompiled, ');\n']); - } - }); - - // Output the content - if (!opts.simple) { - if (opts.amd) { - if (multiple) { - output.add(['return ', objectName, ';\n']); - } - output.add('});'); - } else if (!opts.commonjs) { - output.add('})();'); - } - } - - if (opts.map) { - output.add('\n//# sourceMappingURL=' + opts.map + '\n'); - } - - output = output.toStringWithSourceMap(); - output.map = output.map + ''; - - if (opts.min) { - output = minify(output, opts.map); - } - - if (opts.map) { - _fs2['default'].writeFileSync(opts.map, output.map, 'utf8'); - } - output = output.code; - - if (opts.output) { - _fs2['default'].writeFileSync(opts.output, output, 'utf8'); - } else { - console.log(output); - } -}; - -function arrayCast(value) { - value = value != null ? value : []; - if (!Array.isArray(value)) { - value = [value]; - } - return value; -} - -/** - * Run uglify to minify the compiled template, if uglify exists in the dependencies. - * - * We are using `require` instead of `import` here, because es6-modules do not allow - * dynamic imports and uglify-js is an optional dependency. Since we are inside NodeJS here, this - * should not be a problem. - * - * @param {string} output the compiled template - * @param {string} sourceMapFile the file to write the source map to. - */ -function minify(output, sourceMapFile) { - try { - // Try to resolve uglify-js in order to see if it does exist - require.resolve('uglify-js'); - } catch (e) { - if (e.code !== 'MODULE_NOT_FOUND') { - // Something else seems to be wrong - throw e; - } - // it does not exist! - console.error('Code minimization is disabled due to missing uglify-js dependency'); - return output; - } - return require('uglify-js').minify(output.code, { - sourceMap: { - content: output.map, - url: sourceMapFile - } - }); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9wcmVjb21waWxlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIj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7XG4gICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICByZXR1cm4gY2FsbGJhY2soXG4gICAgICAgICAgICBuZXcgSGFuZGxlYmFycy5FeGNlcHRpb24oYFVuYWJsZSB0byBvcGVuIHRlbXBsYXRlIGZpbGUgXCIke3BhdGh9XCJgKVxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoc3RhdC5pc0RpcmVjdG9yeSgpKSB7XG4gICAgICAgICAgb3B0cy5oYXNEaXJlY3RvcnkgPSB0cnVlO1xuXG4gICAgICAgICAgZnMucmVhZGRpcihwYXRoLCBmdW5jdGlvbihlcnIsIGNoaWxkcmVuKSB7XG4gICAgICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCA6IFJhY2UgY29uZGl0aW9uIHRoYXQgYmVpbmcgdG9vIGxhenkgdG8gdGVzdCAqL1xuICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICByZXR1cm4gY2FsbGJhY2soZXJyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNoaWxkcmVuLmZvckVhY2goZnVuY3Rpb24oZmlsZSkge1xuICAgICAgICAgICAgICBsZXQgY2hpbGRQYXRoID0gcGF0aCArICcvJyArIGZpbGU7XG5cbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIGV4dGVuc2lvbi50ZXN0KGNoaWxkUGF0aCkgfHxcbiAgICAgICAgICAgICAgICBmcy5zdGF0U3luYyhjaGlsZFBhdGgpLmlzRGlyZWN0b3J5KClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgcXVldWUucHVzaCh7IHRlbXBsYXRlOiBjaGlsZFBhdGgsIHJvb3Q6IHJvb3QgfHwgcGF0aCB9KTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGNhbGxiYWNrKCk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgZnMucmVhZEZpbGUocGF0aCwgJ3V0ZjgnLCBmdW5jdGlvbihlcnIsIGRhdGEpIHtcbiAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0IDogUmFjZSBjb25kaXRpb24gdGhhdCBiZWluZyB0b28gbGF6eSB0byB0ZXN0ICovXG4gICAgICAgICAgICBpZiAoZXJyKSB7XG4gICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhlcnIpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAob3B0cy5ib20gJiYgZGF0YS5pbmRleE9mKCdcXHVGRUZGJykgPT09IDApIHtcbiAgICAgICAgICAgICAgZGF0YSA9IGRhdGEuc3Vic3RyaW5nKDEpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBDbGVhbiB0aGUgdGVtcGxhdGUgbmFtZVxuICAgICAgICAgICAgbGV0IG5hbWUgPSBwYXRoO1xuICAgICAgICAgICAgaWYgKCFyb290KSB7XG4gICAgICAgICAgICAgIG5hbWUgPSBiYXNlbmFtZShuYW1lKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobmFtZS5pbmRleE9mKHJvb3QpID09PSAwKSB7XG4gICAgICAgICAgICAgIG5hbWUgPSBuYW1lLnN1YnN0cmluZyhyb290Lmxlbmd0aCArIDEpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbmFtZSA9IG5hbWUucmVwbGFjZShleHRlbnNpb24sICcnKTtcblxuICAgICAgICAgICAgcmV0LnB1c2goe1xuICAgICAgICAgICAgICBwYXRoOiBwYXRoLFxuICAgICAgICAgICAgICBuYW1lOiBuYW1lLFxuICAgICAgICAgICAgICBzb3VyY2U6IGRhdGFcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBjYWxsYmFjaygpO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9LFxuICAgIGZ1bmN0aW9uKGVycikge1xuICA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C5tYXAsXG4gICAgICB1cmw6IHNvdXJjZU1hcEZpbGVcbiAgICB9XG4gIH0pO1xufVxuIl19 diff --git a/node_modules/handlebars/dist/handlebars.amd.js b/node_modules/handlebars/dist/handlebars.amd.js deleted file mode 100644 index 9e6543ec..00000000 --- a/node_modules/handlebars/dist/handlebars.amd.js +++ /dev/null @@ -1,4624 +0,0 @@ -/**! - - @license - handlebars v4.7.7 - -Copyright (C) 2011-2019 by Yehuda Katz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ -define('handlebars/utils',['exports'], function (exports) { - 'use strict'; - - exports.__esModule = true; - exports.extend = extend; - exports.indexOf = indexOf; - exports.escapeExpression = escapeExpression; - exports.isEmpty = isEmpty; - exports.createFrame = createFrame; - exports.blockParams = blockParams; - exports.appendContextPath = appendContextPath; - var escape = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`', - '=': '=' - }; - - var badChars = /[&<>"'`=]/g, - possible = /[&<>"'`=]/; - - function escapeChar(chr) { - return escape[chr]; - } - - function extend(obj /* , ...source */) { - for (var i = 1; i < arguments.length; i++) { - for (var key in arguments[i]) { - if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { - obj[key] = arguments[i][key]; - } - } - } - - return obj; - } - - var toString = Object.prototype.toString; - - exports.toString = toString; - // Sourced from lodash - // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt - /* eslint-disable func-style */ - var isFunction = function isFunction(value) { - return typeof value === 'function'; - }; - // fallback for older versions of Chrome and Safari - /* istanbul ignore next */ - if (isFunction(/x/)) { - exports.isFunction = isFunction = function (value) { - return typeof value === 'function' && toString.call(value) === '[object Function]'; - }; - } - exports.isFunction = isFunction; - - /* eslint-enable func-style */ - - /* istanbul ignore next */ - var isArray = Array.isArray || function (value) { - return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; - }; - - exports.isArray = isArray; - // Older IE versions do not directly support indexOf so we must implement our own, sadly. - - function indexOf(array, value) { - for (var i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { - return i; - } - } - return -1; - } - - function escapeExpression(string) { - if (typeof string !== 'string') { - // don't escape SafeStrings, since they're already safe - if (string && string.toHTML) { - return string.toHTML(); - } else if (string == null) { - return ''; - } else if (!string) { - return string + ''; - } - - // Force a string conversion as this will be done by the append regardless and - // the regex test will do this transparently behind the scenes, causing issues if - // an object's to string has escaped characters in it. - string = '' + string; - } - - if (!possible.test(string)) { - return string; - } - return string.replace(badChars, escapeChar); - } - - function isEmpty(value) { - if (!value && value !== 0) { - return true; - } else if (isArray(value) && value.length === 0) { - return true; - } else { - return false; - } - } - - function createFrame(object) { - var frame = extend({}, object); - frame._parent = object; - return frame; - } - - function blockParams(params, ids) { - params.path = ids; - return params; - } - - function appendContextPath(contextPath, id) { - return (contextPath ? contextPath + '.' : '') + id; - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3V0aWxzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI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ykpIHtcbiAgICByZXR1cm4gc3RyaW5nO1xuICB9XG4gIHJldHVybiBzdHJpbmcucmVwbGFjZShiYWRDaGFycywgZXNjYXBlQ2hhcik7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBpc0VtcHR5KHZhbHVlKSB7XG4gIGlmICghdmFsdWUgJiYgdmFsdWUgIT09IDApIHtcbiAgICByZXR1cm4gdHJ1ZTtcbiAgfSBlbHNlIGlmIChpc0FycmF5KHZhbHVlKSAmJiB2YWx1ZS5sZW5ndGggPT09IDApIHtcbiAgICByZXR1cm4gdHJ1ZTtcbiAgfSBlbHNlIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGNyZWF0ZUZyYW1lKG9iamVjdCkge1xuICBsZXQgZnJhbWUgPSBleHRlbmQoe30sIG9iamVjdCk7XG4gIGZyYW1lLl9wYXJlbnQgPSBvYmplY3Q7XG4gIHJldHVybiBmcmFtZTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGJsb2NrUGFyYW1zKHBhcmFtcywgaWRzKSB7XG4gIHBhcmFtcy5wYXRoID0gaWRzO1xuICByZXR1cm4gcGFyYW1zO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gYXBwZW5kQ29udGV4dFBhdGgoY29udGV4dFBhdGgsIGlkKSB7XG4gIHJldHVybiAoY29udGV4dFBhdGggPyBjb250ZXh0UGF0aCArICcuJyA6ICcnKSArIGlkO1xufVxuIl19 -; -define('handlebars/exception',['exports', 'module'], function (exports, module) { - 'use strict'; - - var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack']; - - function Exception(message, node) { - var loc = node && node.loc, - line = undefined, - endLineNumber = undefined, - column = undefined, - endColumn = undefined; - - if (loc) { - line = loc.start.line; - endLineNumber = loc.end.line; - column = loc.start.column; - endColumn = loc.end.column; - - message += ' - ' + line + ':' + column; - } - - var tmp = Error.prototype.constructor.call(this, message); - - // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. - for (var idx = 0; idx < errorProps.length; idx++) { - this[errorProps[idx]] = tmp[errorProps[idx]]; - } - - /* istanbul ignore else */ - if (Error.captureStackTrace) { - Error.captureStackTrace(this, Exception); - } - - try { - if (loc) { - this.lineNumber = line; - this.endLineNumber = endLineNumber; - - // Work around issue under safari where we can't directly set the column value - /* istanbul ignore next */ - if (Object.defineProperty) { - Object.defineProperty(this, 'column', { - value: column, - enumerable: true - }); - Object.defineProperty(this, 'endColumn', { - value: endColumn, - enumerable: true - }); - } else { - this.column = column; - this.endColumn = endColumn; - } - } - } catch (nop) { - /* Ignore if the browser is very particular */ - } - } - - Exception.prototype = new Error(); - - module.exports = Exception; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2V4Y2VwdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxNQUFNLFVBQVUsR0FBRyxDQUNqQixhQUFhLEVBQ2IsVUFBVSxFQUNWLFlBQVksRUFDWixlQUFlLEVBQ2YsU0FBUyxFQUNULE1BQU0sRUFDTixRQUFRLEVBQ1IsT0FBTyxDQUNSLENBQUM7O0FBRUYsV0FBUyxTQUFTLENBQUMsT0FBTyxFQUFFLElBQUksRUFBRTtBQUNoQyxRQUFJLEdBQUcsR0FBRyxJQUFJLElBQUksSUFBSSxDQUFDLEdBQUc7UUFDeEIsSUFBSSxZQUFBO1FBQ0osYUFBYSxZQUFBO1FBQ2IsTUFBTSxZQUFBO1FBQ04sU0FBUyxZQUFBLENBQUM7O0FBRVosUUFBSSxHQUFHLEVBQUU7QUFDUCxVQUFJLEdBQUcsR0FBRyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUM7QUFDdEIsbUJBQWEsR0FBRyxHQUFHLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQztBQUM3Q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gICBlbnVtZXJhYmxlOiB0cnVlXG4gICAgICAgIH0pO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhpcy5jb2x1bW4gPSBjb2x1bW47XG4gICAgICAgIHRoaXMuZW5kQ29sdW1uID0gZW5kQ29sdW1uO1xuICAgICAgfVxuICAgIH1cbiAgfSBjYXRjaCAobm9wKSB7XG4gICAgLyogSWdub3JlIGlmIHRoZSBicm93c2VyIGlzIHZlcnkgcGFydGljdWxhciAqL1xuICB9XG59XG5cbkV4Y2VwdGlvbi5wcm90b3R5cGUgPSBuZXcgRXJyb3IoKTtcblxuZXhwb3J0IGRlZmF1bHQgRXhjZXB0aW9uO1xuIl19 -; -define('handlebars/helpers/block-helper-missing',['exports', 'module', '../utils'], function (exports, module, _utils) { - 'use strict'; - - module.exports = function (instance) { - instance.registerHelper('blockHelperMissing', function (context, options) { - var inverse = options.inverse, - fn = options.fn; - - if (context === true) { - return fn(this); - } else if (context === false || context == null) { - return inverse(this); - } else if (_utils.isArray(context)) { - if (context.length > 0) { - if (options.ids) { - options.ids = [options.name]; - } - - return instance.helpers.each(context, options); - } else { - return inverse(this); - } - } else { - if (options.data && options.ids) { - var data = _utils.createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); - options = { data: data }; - } - - return fn(context, options); - } - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvYmxvY2staGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O21CQUVlLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxjQUFjLENBQUMsb0JBQW9CLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3ZFLFVBQUksT0FBTyxHQUFHLE9BQU8sQ0FBQyxPQUFPO1VBQz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AgICBsZXQgZGF0YSA9IGNyZWF0ZUZyYW1lKG9wdGlvbnMuZGF0YSk7XG4gICAgICAgIGRhdGEuY29udGV4dFBhdGggPSBhcHBlbmRDb250ZXh0UGF0aChcbiAgICAgICAgICBvcHRpb25zLmRhdGEuY29udGV4dFBhdGgsXG4gICAgICAgICAgb3B0aW9ucy5uYW1lXG4gICAgICAgICk7XG4gICAgICAgIG9wdGlvbnMgPSB7IGRhdGE6IGRhdGEgfTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIGZuKGNvbnRleHQsIG9wdGlvbnMpO1xuICAgIH1cbiAgfSk7XG59XG4iXX0= -; -define('handlebars/helpers/each',['exports', 'module', '../utils', '../exception'], function (exports, module, _utils, _exception) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - module.exports = function (instance) { - instance.registerHelper('each', function (context, options) { - if (!options) { - throw new _Exception['default']('Must pass iterator to #each'); - } - - var fn = options.fn, - inverse = options.inverse, - i = 0, - ret = '', - data = undefined, - contextPath = undefined; - - if (options.data && options.ids) { - contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; - } - - if (_utils.isFunction(context)) { - context = context.call(this); - } - - if (options.data) { - data = _utils.createFrame(options.data); - } - - function execIteration(field, index, last) { - if (data) { - data.key = field; - data.index = index; - data.first = index === 0; - data.last = !!last; - - if (contextPath) { - data.contextPath = contextPath + field; - } - } - - ret = ret + fn(context[field], { - data: data, - blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) - }); - } - - if (context && typeof context === 'object') { - if (_utils.isArray(context)) { - for (var j = context.length; i < j; i++) { - if (i in context) { - execIteration(i, i, i === context.length - 1); - } - } - } else if (global.Symbol && context[global.Symbol.iterator]) { - var newContext = []; - var iterator = context[global.Symbol.iterator](); - for (var it = iterator.next(); !it.done; it = iterator.next()) { - newContext.push(it.value); - } - context = newContext; - for (var j = context.length; i < j; i++) { - execIteration(i, i, i === context.length - 1); - } - } else { - (function () { - var priorKey = undefined; - - Object.keys(context).forEach(function (key) { - // We're running the iterations one step out of sync so we can detect - // the last iteration without have to scan the object twice and create - // an itermediate keys array. - if (priorKey !== undefined) { - execIteration(priorKey, i - 1); - } - priorKey = key; - i++; - }); - if (priorKey !== undefined) { - execIteration(priorKey, i - 1, true); - } - })(); - } - } - - if (i === 0) { - ret = inverse(this); - } - - return ret; - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvZWFjaC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7bUJBU2UsVUFBUyxRQUFRLEVBQUU7QUFDaEMsWUFBUSxDQUFDLGNBQWMsQ0FBQyxNQUFNLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3pELFVBQUksQ0FBQyxPQUFPLEVBQUU7QUFDWixjQUFNLDBCQUFjLDZCQUE2QixDQUFDLENBQUM7T0FDcEQ7O0FBRUQsVUFBSSxFQUFFLEdBQUcsT0FBTyxDQUFDLEVBQUU7VUFDakIsT0FBTyxHQUFHLE9BQU8sQ0FBQyxPQUFPO1VBQ3pCLENBQUMsR0FBRyxDQUFDO1VBQ0wsR0FBRyxHQUFHLEVBQUU7VUFDUixJQUFJLFlBQUE7VUFDSixXQUFXLFlBQUEsQ0FBQzs7QUFFZCxVQUFJLE9BQU8sQ0FBQyxJQUFJLElBQUksT0FBTyxDQUFDLEdBQUcsRUFBRTtBQUMvQixtQkFBVyxHQUNULE9BdkJOLGlCQUFpQixDQXVCTyxPQUFPLENBQUMsSUFBSSxDQUFDLFdBQVcsRUFBRSxPQUFPLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsR0FBRyxDQUFDO09BQ3JFOztBQUVELFV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B0aW9ucykge1xuICAgICAgdGhyb3cgbmV3IEV4Y2VwdGlvbignTXVzdCBwYXNzIGl0ZXJhdG9yIHRvICNlYWNoJyk7XG4gICAgfVxuXG4gICAgbGV0IGZuID0gb3B0aW9ucy5mbixcbiAgICAgIGludmVyc2UgPSBvcHRpb25zLmludmVyc2UsXG4gICAgICBpID0gMCxcbiAgICAgIHJldCA9ICcnLFxuICAgICAgZGF0YSxcbiAgICAgIGNvbnRleHRQYXRoO1xuXG4gICAgaWYgKG9wdGlvbnMuZGF0YSAmJiBvcHRpb25zLmlkcykge1xuICAgICAgY29udGV4dFBhdGggPVxuICAgICAgICBhcHBlbmRDb250ZXh0UGF0aChvcHRpb25zLmRhdGEuY29udGV4dFBhdGgsIG9wdGlvbnMuaWRzWzBdKSArICcuJztcbiAgICB9XG5cbiAgICBpZiAoaXNGdW5jdGlvbihjb250ZXh0KSkge1xuICAgICAgY29udGV4dCA9IGNvbnRleHQuY2FsbCh0aGlzKTtcbiAgICB9XG5cbiAgICBpZiAob3B0aW9ucy5kYXRhKSB7XG4gICAgICBkYXRhID0gY3JlYXRlRnJhbWUob3B0aW9ucy5kYXRhKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBleGVjSXRlcmF0aW9uKGZpZWxkLCBpbmRleCwgbGFzdCkge1xuICAgICAgaWYgKGRhdGEpIHtcbiAgICAgICAgZGF0YS5rZXkgPSBmaWVsZDtcbiAgICAgICAgZGF0YS5pbmRleCA9IGluZGV4O1xuICAgICAgICBkYXRhLmZpcnN0ID0gaW5kZXggPT09IDA7XG4gICAgICAgIGRhdGEubGFzdCA9ICEhbGFzdDtcblxuICAgICAgICBpZiAoY29udGV4dFBhdGgpIHtcbiAgICAgICAgICBkYXRhLmNvbnRleHRQYXRoID0gY29udGV4dFBhdGggKyBmaWVsZDtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICByZXQgPVxuICAgICAgICByZXQgK1xuICAgICAgICBmbihjb250ZXh0W2ZpZWxkXSwge1xuICAgICAgICAgIGRhdGE6IGRhdGEsXG4gICAgICAgICAgYmxvY2tQYXJhbXM6IGJsb2NrUGFyYW1zKFxuICAgICAgICAgICAgW2NvbnRleHRbZmllbGRdLCBmaWVsZF0sXG4gICAgICAgICAgICBbY29udGV4dFBhdGggKyBmaWVsZCwgbnVsbF1cbiAgICAgICAgICApXG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGlmIChjb250ZXh0ICYmIHR5cGVvZiBjb250ZXh0ID09PSAnb2JqZWN0Jykge1xuICAgICAgaWYgKGlzQXJyYXkoY29udGV4dCkpIHtcbiAgICAgICAgZm9yIChsZXQgaiA9IGNvbnRleHQubGVuZ3RoOyBpIDwgajsgaSsrKSB7XG4gICAgICAgICAgaWYgKGkgaW4gY29udGV4dCkge1xuICAgICAgICAgICAgZXhlY0l0ZXJhdGlvbihpLCBpLCBpID09PSBjb250ZXh0Lmxlbmd0aCAtIDEpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSBlbHNlIGlmIChnbG9iYWwuU3ltYm9sICYmIGNvbnRleHRbZ2xvYmFsLlN5bWJvbC5pdGVyYXRvcl0pIHtcbiAgICAgICAgY29uc3QgbmV3Q29udGV4dCA9IFtdO1xuICAgICAgICBjb25zdCBpdGVyYXRvciA9IGNvbnRleHRbZ2xvYmFsLlN5bWJvbC5pdGVyYXRvcl0oKTtcbiAgICAgICAgZm9yIChsZXQgaXQgPSBpdGVyYXRvci5uZXh0KCk7ICFpdC5kb25lOyBpdCA9IGl0ZXJhdG9yLm5leHQoKSkge1xuICAgICAgICAgIG5ld0NvbnRleHQucHVzaChpdC52YWx1ZSk7XG4gICAgICAgIH1cbiAgICAgICAgY29udGV4dCA9IG5ld0NvbnRleHQ7XG4gICAgICAgIGZvciAobGV0IGogPSBjb250ZXh0Lmxlbmd0aDsgaSA8IGo7IGkrKykge1xuICAgICAgICAgIGV4ZWNJdGVyYXRpb24oaSwgaSwgaSA9PT0gY29udGV4dC5sZW5ndGggLSAxKTtcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgbGV0IHByaW9yS2V5O1xuXG4gICAgICAgIE9iamVjdC5rZXlzKGNvbnRleHQpLmZvckVhY2goa2V5ID0+IHtcbiAgICAgICAgICAvLyBXZSdyZSBydW5uaW5nIHRoZSBpdGVyYXRpb25zIG9uZSBzdGVwIG91dCBvZiBzeW5jIHNvIHdlIGNhbiBkZXRlY3RcbiAgICAgICAgICAvLyB0aGUgbGFzdCBpdGVyYXRpb24gd2l0aG91dCBoYXZlIHRvIHNjYW4gdGhlIG9iamVjdCB0d2ljZSBhbmQgY3JlYXRlXG4gICAgICAgICAgLy8gYW4gaXRlcm1lZGlhdGUga2V5cyBhcnJheS5cbiAgICAgICAgICBpZiAocHJpb3JLZXkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgZXhlY0l0ZXJhdGlvbihwcmlvcktleSwgaSAtIDEpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBwcmlvcktleSA9IGtleTtcbiAgICAgICAgICBpKys7XG4gICAgICAgIH0pO1xuICAgICAgICBpZiAocHJpb3JLZXkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIGV4ZWNJdGVyYXRpb24ocHJpb3JLZXksIGkgLSAxLCB0cnVlKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIGlmIChpID09PSAwKSB7XG4gICAgICByZXQgPSBpbnZlcnNlKHRoaXMpO1xuICAgIH1cblxuICAgIHJldHVybiByZXQ7XG4gIH0pO1xufVxuIl19 -; -define('handlebars/helpers/helper-missing',['exports', 'module', '../exception'], function (exports, module, _exception) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - module.exports = function (instance) { - instance.registerHelper('helperMissing', function () /* [args, ]options */{ - if (arguments.length === 1) { - // A missing field in a {{foo}} construct. - return undefined; - } else { - // Someone is actually trying to call something, blow up. - throw new _Exception['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); - } - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O21CQUVlLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxjQUFjLENBQUMsZUFBZSxFQUFFLGlDQUFnQztBQUN2RSxVQUFJLFNBQVMsQ0FBQyxNQUFNLEtBQUssQ0FBQyxFQUFFOztBQUUxQixlQUFPLFNBQVMsQ0FBQztPQUNsQixNQUFNOztBQUVMLGNBQU0sMEJBQ0osbUJBQW1CLEdBQUcsU0FBUyxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDLENBQUMsSUFBSSxHQUFHLEdBQUcsQ0FDakUsQ0FBQztPQUNIO0tBQ0YsQ0FBQyxDQUFDO0dBQ0oiLCJmaWxlIjoiaGVscGVyLW1pc3NpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRXhjZXB0aW9uIGZyb20gJy4uL2V4Y2VwdGlvbic7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVySGVscGVyKCdoZWxwZXJNaXNzaW5nJywgZnVuY3Rpb24oLyogW2FyZ3MsIF1vcHRpb25zICovKSB7XG4gICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDEpIHtcbiAgICAgIC8vIEEgbWlzc2luZyBmaWVsZCBpbiBhIHt7Zm9vfX0gY29uc3RydWN0LlxuICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9IGVsc2Uge1xuICAgICAgLy8gU29tZW9uZSBpcyBhY3R1YWxseSB0cnlpbmcgdG8gY2FsbCBzb21ldGhpbmcsIGJsb3cgdXAuXG4gICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKFxuICAgICAgICAnTWlzc2luZyBoZWxwZXI6IFwiJyArIGFyZ3VtZW50c1thcmd1bWVudHMubGVuZ3RoIC0gMV0ubmFtZSArICdcIidcbiAgICAgICk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ== -; -define('handlebars/helpers/if',['exports', 'module', '../utils', '../exception'], function (exports, module, _utils, _exception) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - module.exports = function (instance) { - instance.registerHelper('if', function (conditional, options) { - if (arguments.length != 2) { - throw new _Exception['default']('#if requires exactly one argument'); - } - if (_utils.isFunction(conditional)) { - conditional = conditional.call(this); - } - - // Default behavior is to render the positive path if the value is truthy and not empty. - // The `includeZero` option may be set to treat the condtional as purely not empty based on the - // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. - if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { - return options.inverse(this); - } else { - return options.fn(this); - } - }); - - instance.registerHelper('unless', function (conditional, options) { - if (arguments.length != 2) { - throw new _Exception['default']('#unless requires exactly one argument'); - } - return instance.helpers['if'].call(this, conditional, { - fn: options.inverse, - inverse: options.fn, - hash: options.hash - }); - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaWYuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O21CQUdlLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxjQUFjLENBQUMsSUFBSSxFQUFFLFVBQVMsV0FBVyxFQUFFLE9BQU8sRUFBRTtBQUM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iAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIG9wdGlvbnMuZm4odGhpcyk7XG4gICAgfVxuICB9KTtcblxuICBpbnN0YW5jZS5yZWdpc3RlckhlbHBlcigndW5sZXNzJywgZnVuY3Rpb24oY29uZGl0aW9uYWwsIG9wdGlvbnMpIHtcbiAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCAhPSAyKSB7XG4gICAgICB0aHJvdyBuZXcgRXhjZXB0aW9uKCcjdW5sZXNzIHJlcXVpcmVzIGV4YWN0bHkgb25lIGFyZ3VtZW50Jyk7XG4gICAgfVxuICAgIHJldHVybiBpbnN0YW5jZS5oZWxwZXJzWydpZiddLmNhbGwodGhpcywgY29uZGl0aW9uYWwsIHtcbiAgICAgIGZuOiBvcHRpb25zLmludmVyc2UsXG4gICAgICBpbnZlcnNlOiBvcHRpb25zLmZuLFxuICAgICAgaGFzaDogb3B0aW9ucy5oYXNoXG4gICAgfSk7XG4gIH0pO1xufVxuIl19 -; -define('handlebars/helpers/log',['exports', 'module'], function (exports, module) { - 'use strict'; - - module.exports = function (instance) { - instance.registerHelper('log', function () /* message, options */{ - var args = [undefined], - options = arguments[arguments.length - 1]; - for (var i = 0; i < arguments.length - 1; i++) { - args.push(arguments[i]); - } - - var level = 1; - if (options.hash.level != null) { - level = options.hash.level; - } else if (options.data && options.data.level != null) { - level = options.data.level; - } - args[0] = level; - - instance.log.apply(instance, args); - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFBZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsY0FBYyxDQUFDLEtBQUssRUFBRSxrQ0FBaUM7QUFDOUQsVUFBSSxJQUFJLEdBQUcsQ0FBQyxTQUFTLENBQUM7V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tcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFyZ3VtZW50cy5sZW5ndGggLSAxOyBpKyspIHtcbiAgICAgIGFyZ3MucHVzaChhcmd1bWVudHNbaV0pO1xuICAgIH1cblxuICAgIGxldCBsZXZlbCA9IDE7XG4gICAgaWYgKG9wdGlvbnMuaGFzaC5sZXZlbCAhPSBudWxsKSB7XG4gICAgICBsZXZlbCA9IG9wdGlvbnMuaGFzaC5sZXZlbDtcbiAgICB9IGVsc2UgaWYgKG9wdGlvbnMuZGF0YSAmJiBvcHRpb25zLmRhdGEubGV2ZWwgIT0gbnVsbCkge1xuICAgICAgbGV2ZWwgPSBvcHRpb25zLmRhdGEubGV2ZWw7XG4gICAgfVxuICAgIGFyZ3NbMF0gPSBsZXZlbDtcblxuICAgIGluc3RhbmNlLmxvZyguLi5hcmdzKTtcbiAgfSk7XG59XG4iXX0= -; -define('handlebars/helpers/lookup',['exports', 'module'], function (exports, module) { - 'use strict'; - - module.exports = function (instance) { - instance.registerHelper('lookup', function (obj, field, options) { - if (!obj) { - // Note for 5.0: Change to "obj == null" in 5.0 - return obj; - } - return options.lookupProperty(obj, field); - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9va3VwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFBZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsY0FBYyxDQUFDLFFBQVEsRUFBRSxVQUFTLEdBQUcsRUFBRSxLQUFLLEVBQUUsT0FBTyxFQUFFO0FBQzlELFVBQUksQ0FBQyxHQUFHLEVBQUU7O0FBRVIsZUFBTyxHQUFHLENBQUM7T0FDWjtBQUNELGFBQU8sT0FBTyxDQUFDLGNBQWMsQ0FBQyxHQUFHLEVBQUUsS0FBSyxDQUFDLENBQUM7S0FDM0MsQ0FBQyxDQUFDO0dBQ0oiLCJmaWxlIjoibG9va3VwLmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ2xvb2t1cCcsIGZ1bmN0aW9uKG9iaiwgZmllbGQsIG9wdGlvbnMpIHtcbiAgICBpZiAoIW9iaikge1xuICAgICAgLy8gTm90ZSBmb3IgNS4wOiBDaGFuZ2UgdG8gXCJvYmogPT0gbnVsbFwiIGluIDUuMFxuICAgICAgcmV0dXJuIG9iajtcbiAgICB9XG4gICAgcmV0dXJuIG9wdGlvbnMubG9va3VwUHJvcGVydHkob2JqLCBmaWVsZCk7XG4gIH0pO1xufVxuIl19 -; -define('handlebars/helpers/with',['exports', 'module', '../utils', '../exception'], function (exports, module, _utils, _exception) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - module.exports = function (instance) { - instance.registerHelper('with', function (context, options) { - if (arguments.length != 2) { - throw new _Exception['default']('#with requires exactly one argument'); - } - if (_utils.isFunction(context)) { - context = context.call(this); - } - - var fn = options.fn; - - if (!_utils.isEmpty(context)) { - var data = options.data; - if (options.data && options.ids) { - data = _utils.createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); - } - - return fn(context, { - data: data, - blockParams: _utils.blockParams([context], [data && data.contextPath]) - }); - } else { - return options.inverse(this); - } - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvd2l0aC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7bUJBU2UsVUFBUyxRQUFRLEVBQUU7QUFDaEMsWU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O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gZm4oY29udGV4dCwge1xuICAgICAgICBkYXRhOiBkYXRhLFxuICAgICAgICBibG9ja1BhcmFtczogYmxvY2tQYXJhbXMoW2NvbnRleHRdLCBbZGF0YSAmJiBkYXRhLmNvbnRleHRQYXRoXSlcbiAgICAgIH0pO1xuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gb3B0aW9ucy5pbnZlcnNlKHRoaXMpO1xuICAgIH1cbiAgfSk7XG59XG4iXX0= -; -define('handlebars/helpers',['exports', './helpers/block-helper-missing', './helpers/each', './helpers/helper-missing', './helpers/if', './helpers/log', './helpers/lookup', './helpers/with'], function (exports, _helpersBlockHelperMissing, _helpersEach, _helpersHelperMissing, _helpersIf, _helpersLog, _helpersLookup, _helpersWith) { - 'use strict'; - - exports.__esModule = true; - exports.registerDefaultHelpers = registerDefaultHelpers; - exports.moveHelperToHooks = moveHelperToHooks; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _registerBlockHelperMissing = _interopRequireDefault(_helpersBlockHelperMissing); - - var _registerEach = _interopRequireDefault(_helpersEach); - - var _registerHelperMissing = _interopRequireDefault(_helpersHelperMissing); - - var _registerIf = _interopRequireDefault(_helpersIf); - - var _registerLog = _interopRequireDefault(_helpersLog); - - var _registerLookup = _interopRequireDefault(_helpersLookup); - - var _registerWith = _interopRequireDefault(_helpersWith); - - function registerDefaultHelpers(instance) { - _registerBlockHelperMissing['default'](instance); - _registerEach['default'](instance); - _registerHelperMissing['default'](instance); - _registerIf['default'](instance); - _registerLog['default'](instance); - _registerLookup['default'](instance); - _registerWith['default'](instance); - } - - function moveHelperToHooks(instance, helperName, keepHelper) { - if (instance.helpers[helperName]) { - instance.hooks[helperName] = instance.helpers[helperName]; - if (!keepHelper) { - delete instance.helpers[helperName]; - } - } - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2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VscGVycy9oZWxwZXItbWlzc2luZyc7XG5pbXBvcnQgcmVnaXN0ZXJJZiBmcm9tICcuL2hlbHBlcnMvaWYnO1xuaW1wb3J0IHJlZ2lzdGVyTG9nIGZyb20gJy4vaGVscGVycy9sb2cnO1xuaW1wb3J0IHJlZ2lzdGVyTG9va3VwIGZyb20gJy4vaGVscGVycy9sb29rdXAnO1xuaW1wb3J0IHJlZ2lzdGVyV2l0aCBmcm9tICcuL2hlbHBlcnMvd2l0aCc7XG5cbmV4cG9ydCBmdW5jdGlvbiByZWdpc3RlckRlZmF1bHRIZWxwZXJzKGluc3RhbmNlKSB7XG4gIHJlZ2lzdGVyQmxvY2tIZWxwZXJNaXNzaW5nKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJFYWNoKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJIZWxwZXJNaXNzaW5nKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJJZihpbnN0YW5jZSk7XG4gIHJlZ2lzdGVyTG9nKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJMb29rdXAoaW5zdGFuY2UpO1xuICByZWdpc3RlcldpdGgoaW5zdGFuY2UpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gbW92ZUhlbHBlclRvSG9va3MoaW5zdGFuY2UsIGhlbHBlck5hbWUsIGtlZXBIZWxwZXIpIHtcbiAgaWYgKGluc3RhbmNlLmhlbHBlcnNbaGVscGVyTmFtZV0pIHtcbiAgICBpbnN0YW5jZS5ob29rc1toZWxwZXJOYW1lXSA9IGluc3RhbmNlLmhlbHBlcnNbaGVscGVyTmFtZV07XG4gICAgaWYgKCFrZWVwSGVscGVyKSB7XG4gICAgICBkZWxldGUgaW5zdGFuY2UuaGVscGVyc1toZWxwZXJOYW1lXTtcbiAgICB9XG4gIH1cbn1cbiJdfQ== -; -define('handlebars/decorators/inline',['exports', 'module', '../utils'], function (exports, module, _utils) { - 'use strict'; - - module.exports = function (instance) { - instance.registerDecorator('inline', function (fn, props, container, options) { - var ret = fn; - if (!props.partials) { - props.partials = {}; - ret = function (context, options) { - // Create a new partials stack frame prior to exec. - var original = container.partials; - container.partials = _utils.extend({}, original, props.partials); - var ret = fn(context, options); - container.partials = original; - return ret; - }; - } - - props.partials[options.args[0]] = options.fn; - - return ret; - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMvaW5saW5lLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFFZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsaUJBQWlCLENBQUMsUUFBUSxFQUFFLFVBQVMsRUFBRSxFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFO0FBQzNFLFVBQUksR0FBRyxHQUFHLEVBQUUsQ0FBQztBQUNiLFVBQUksQ0FBQyxLQUFLLENBQUMsUUFBUSxFQUFFO0FBQ25CLGFBQUssQ0FBQyxRQUFRLEdBQUcsRUFBRSxDQUFDO0FBQ3BCLFdBQUcsR0FBRyxVQUFTLE9BQU8sRUFBRSxPQUFPLEVBQUU7O0FBRS9CLGNBQUksUUFBUSxHQUFHLFNBQVMsQ0FBQyxRQUFRLENBQUM7QUFDbEMsbUJBQVMsQ0FBQyxRQUFRLEdBQUcsT0FWcEIsTUFBTSxDQVVxQixFQUFFLEVBQUUsUUFBUSxFQUFFLEtBQUssQ0FBQyxRQUFRLENBQUMsQ0FBQztBQUMxRCxjQUFJLEdBQUcsR0FBRyxFQUFFLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDO0FBQy9CLG1CQUFTLENBQUMsUUFBUSxHQUFHLFFBQVEsQ0FBQztBQUM5QixpQkFBTyxHQUFHLENBQUM7U0FDWixDQUFDO09BQ0g7O0FBRUQsV0FBSyxDQUFDLFFBQVEsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsT0FBTyxDQUFDLEVBQUUsQ0FBQzs7QUFFN0MsYUFBTyxHQUFHLENBQUM7S0FDWixDQUFDLENBQUM7R0FDSiIsImZpbGUiOiJpbmxpbmUuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBleHRlbmQgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVyRGVjb3JhdG9yKCdpbmxpbmUnLCBmdW5jdGlvbihmbiwgcHJvcHMsIGNvbnRhaW5lciwgb3B0aW9ucykge1xuICAgIGxldCByZXQgPSBmbjtcbiAgICBpZiAoIXByb3BzLnBhcnRpYWxzKSB7XG4gICAgICBwcm9wcy5wYXJ0aWFscyA9IHt9O1xuICAgICAgcmV0ID0gZnVuY3Rpb24oY29udGV4dCwgb3B0aW9ucykge1xuICAgICAgICAvLyBDcmVhdGUgYSBuZXcgcGFydGlhbHMgc3RhY2sgZnJhbWUgcHJpb3IgdG8gZXhlYy5cbiAgICAgICAgbGV0IG9yaWdpbmFsID0gY29udGFpbmVyLnBhcnRpYWxzO1xuICAgICAgICBjb250YWluZXIucGFydGlhbHMgPSBleHRlbmQoe30sIG9yaWdpbmFsLCBwcm9wcy5wYXJ0aWFscyk7XG4gICAgICAgIGxldCByZXQgPSBmbihjb250ZXh0LCBvcHRpb25zKTtcbiAgICAgICAgY29udGFpbmVyLnBhcnRpYWxzID0gb3JpZ2luYWw7XG4gICAgICAgIHJldHVybiByZXQ7XG4gICAgICB9O1xuICAgIH1cblxuICAgIHByb3BzLnBhcnRpYWxzW29wdGlvbnMuYXJnc1swXV0gPSBvcHRpb25zLmZuO1xuXG4gICAgcmV0dXJuIHJldDtcbiAgfSk7XG59XG4iXX0= -; -define('handlebars/decorators',['exports', './decorators/inline'], function (exports, _decoratorsInline) { - 'use strict'; - - exports.__esModule = true; - exports.registerDefaultDecorators = registerDefaultDecorators; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _registerInline = _interopRequireDefault(_decoratorsInline); - - function registerDefaultDecorators(instance) { - _registerInline['default'](instance); - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFFTyxXQUFTLHlCQUF5QixDQUFDLFFBQVEsRUFBRTtBQUNsRCwrQkFBZSxRQUFRLENBQUMsQ0FBQztHQUMxQiIsImZpbGUiOiJkZWNvcmF0b3JzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHJlZ2lzdGVySW5saW5lIGZyb20gJy4vZGVjb3JhdG9ycy9pbmxpbmUnO1xuXG5leHBvcnQgZnVuY3Rpb24gcmVnaXN0ZXJEZWZhdWx0RGVjb3JhdG9ycyhpbnN0YW5jZSkge1xuICByZWdpc3RlcklubGluZShpbnN0YW5jZSk7XG59XG4iXX0= -; -define('handlebars/logger',['exports', 'module', './utils'], function (exports, module, _utils) { - 'use strict'; - - var logger = { - methodMap: ['debug', 'info', 'warn', 'error'], - level: 'info', - - // Maps a given level value to the `methodMap` indexes above. - lookupLevel: function lookupLevel(level) { - if (typeof level === 'string') { - var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); - if (levelMap >= 0) { - level = levelMap; - } else { - level = parseInt(level, 10); - } - } - - return level; - }, - - // Can be overridden in the host environment - log: function log(level) { - level = logger.lookupLevel(level); - - if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { - var method = logger.methodMap[level]; - // eslint-disable-next-line no-console - if (!console[method]) { - method = 'log'; - } - - for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - message[_key - 1] = arguments[_key]; - } - - console[method].apply(console, message); // eslint-disable-line no-console - } - } - }; - - module.exports = logger; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2xvZ2dlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxNQUFJLE1BQU0sR0FBRztBQUNYLGFBQVMsRUFBRSxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLE9BQU8sQ0FBQztBQUM3QyxTQUFLLEVBQUUsTUFBTTs7O0FBR2IsZUFBVyxFQUFFLHFCQUFTLEtBQUssRUFBRTtBQUMzQixVQUFJLE9BQU8sS0FBSyxLQUFLLFFBQVEsRUFBRTtBQUM3QixZQUFJLFFBQVEsR0FBRyxPQVRaLE9BQU8sQ0FTYSxNQUFNLENBQUMsU0FBUyxFQUFFLEtBQUssQ0FBQyxXQUFXLEVBQUUsQ0FBQyxDQUFDO0FBQzlELFlBQUksUUFBUSxJQUFJLENBQUMsRUFBRTtBQUNqQixlQUFLLEdBQUcsUUFBUSxDQUFDO1NBQ2xCLE1BQU07QUFDTCxlQUFLLEdBQUcsUUFBUSxDQUFDLEtBQUssRUFBRSxFQUFFLENBQUMsQ0FBQztTQUM3QjtPQUNGOztBQUVELGFBQU8sS0FBSyxDQUFDO0tBQ2Q7OztBQUdELE9BQUcsRUFBRSxhQUFTLEtBQUssRUFBYztBQUMvQixXQUFLLEdBQUcsTUFBTSxDQUFDLFdBQVcsQ0FBQyxLQUFLLENBQUMsQ0FBQzs7QUFFbEMsVUFDRSxPQUFPLE9BQU8sS0FBSyxXQUFXLElBQzlCLE1BQU0sQ0FBQyxXQUFXLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxJQUFJLEtBQUssRUFDekM7QUFDQSxZQUFJLE1BQU0sR0FBRyxNQU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iAgbG9nOiBmdW5jdGlvbihsZXZlbCwgLi4ubWVzc2FnZSkge1xuICAgIGxldmVsID0gbG9nZ2VyLmxvb2t1cExldmVsKGxldmVsKTtcblxuICAgIGlmIChcbiAgICAgIHR5cGVvZiBjb25zb2xlICE9PSAndW5kZWZpbmVkJyAmJlxuICAgICAgbG9nZ2VyLmxvb2t1cExldmVsKGxvZ2dlci5sZXZlbCkgPD0gbGV2ZWxcbiAgICApIHtcbiAgICAgIGxldCBtZXRob2QgPSBsb2dnZXIubWV0aG9kTWFwW2xldmVsXTtcbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1jb25zb2xlXG4gICAgICBpZiAoIWNvbnNvbGVbbWV0aG9kXSkge1xuICAgICAgICBtZXRob2QgPSAnbG9nJztcbiAgICAgIH1cbiAgICAgIGNvbnNvbGVbbWV0aG9kXSguLi5tZXNzYWdlKTsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby1jb25zb2xlXG4gICAgfVxuICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBsb2dnZXI7XG4iXX0= -; -define('handlebars/internal/create-new-lookup-object',['exports', '../utils'], function (exports, _utils) { - 'use strict'; - - exports.__esModule = true; - exports.createNewLookupObject = createNewLookupObject; - - /** - * Create a new object with "null"-prototype to avoid truthy results on prototype properties. - * The resulting object can be used with "object[property]" to check if a property exists - * @param {...object} sources a varargs parameter of source objects that will be merged - * @returns {object} - */ - - function createNewLookupObject() { - for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) { - sources[_key] = arguments[_key]; - } - - return _utils.extend.apply(undefined, [Object.create(null)].concat(sources)); - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL2NyZWF0ZS1uZXctbG9va3VwLW9iamVjdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7O0FBUU8sV0FBUyxxQkFBcUIsR0FBYTtzQ0FBVCxPQUFPO0FBQVAsYUFBTzs7O0FBQzlDLFdBQU8sT0FUQSxNQUFNLG1CQVNDLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLFNBQUssT0FBTyxFQUFDLENBQUM7R0FDaEQiLCJmaWxlIjoiY3JlYXRlLW5ldy1sb29rdXAtb2JqZWN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgZXh0ZW5kIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vKipcbiAqIENyZWF0ZSBhIG5ldyBvYmplY3Qgd2l0aCBcIm51bGxcIi1wcm90b3R5cGUgdG8gYXZvaWQgdHJ1dGh5IHJlc3VsdHMgb24gcHJvdG90eXBlIHByb3BlcnRpZXMuXG4gKiBUaGUgcmVzdWx0aW5nIG9iamVjdCBjYW4gYmUgdXNlZCB3aXRoIFwib2JqZWN0W3Byb3BlcnR5XVwiIHRvIGNoZWNrIGlmIGEgcHJvcGVydHkgZXhpc3RzXG4gKiBAcGFyYW0gey4uLm9iamVjdH0gc291cmNlcyBhIHZhcmFyZ3MgcGFyYW1ldGVyIG9mIHNvdXJjZSBvYmplY3RzIHRoYXQgd2lsbCBiZSBtZXJnZWRcbiAqIEByZXR1cm5zIHtvYmplY3R9XG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVOZXdMb29rdXBPYmplY3QoLi4uc291cmNlcykge1xuICByZXR1cm4gZXh0ZW5kKE9iamVjdC5jcmVhdGUobnVsbCksIC4uLnNvdXJjZXMpO1xufVxuIl19 -; -define('handlebars/internal/proto-access',['exports', './create-new-lookup-object', '../logger'], function (exports, _createNewLookupObject, _logger) { - 'use strict'; - - exports.__esModule = true; - exports.createProtoAccessControl = createProtoAccessControl; - exports.resultIsAllowed = resultIsAllowed; - exports.resetLoggedProperties = resetLoggedProperties; - - var loggedProperties = Object.create(null); - - function createProtoAccessControl(runtimeOptions) { - var defaultMethodWhiteList = Object.create(null); - defaultMethodWhiteList['constructor'] = false; - defaultMethodWhiteList['__defineGetter__'] = false; - defaultMethodWhiteList['__defineSetter__'] = false; - defaultMethodWhiteList['__lookupGetter__'] = false; - - var defaultPropertyWhiteList = Object.create(null); - // eslint-disable-next-line no-proto - defaultPropertyWhiteList['__proto__'] = false; - - return { - properties: { - whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties), - defaultValue: runtimeOptions.allowProtoPropertiesByDefault - }, - methods: { - whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods), - defaultValue: runtimeOptions.allowProtoMethodsByDefault - } - }; - } - - function resultIsAllowed(result, protoAccessControl, propertyName) { - if (typeof result === 'function') { - return checkWhiteList(protoAccessControl.methods, propertyName); - } else { - return checkWhiteList(protoAccessControl.properties, propertyName); - } - } - - function checkWhiteList(protoAccessControlForType, propertyName) { - if (protoAccessControlForType.whitelist[propertyName] !== undefined) { - return protoAccessControlForType.whitelist[propertyName] === true; - } - if (protoAccessControlForType.defaultValue !== undefined) { - return protoAccessControlForType.defaultValue; - } - logUnexpecedPropertyAccessOnce(propertyName); - return false; - } - - function logUnexpecedPropertyAccessOnce(propertyName) { - if (loggedProperties[propertyName] !== true) { - loggedProperties[propertyName] = true; - _logger.log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'); - } - } - - function resetLoggedProperties() { - Object.keys(loggedProperties).forEach(function (propertyName) { - delete loggedProperties[propertyName]; - }); - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL3Byb3RvLWF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RvdHlwZS1hY2Nlc3MgZm9yIGRldGFpbHNgXG4gICAgKTtcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gcmVzZXRMb2dnZWRQcm9wZXJ0aWVzKCkge1xuICBPYmplY3Qua2V5cyhsb2dnZWRQcm9wZXJ0aWVzKS5mb3JFYWNoKHByb3BlcnR5TmFtZSA9PiB7XG4gICAgZGVsZXRlIGxvZ2dlZFByb3BlcnRpZXNbcHJvcGVydHlOYW1lXTtcbiAgfSk7XG59XG4iXX0= -; -define('handlebars/base',['exports', './utils', './exception', './helpers', './decorators', './logger', './internal/proto-access'], function (exports, _utils, _exception, _helpers, _decorators, _logger, _internalProtoAccess) { - 'use strict'; - - exports.__esModule = true; - exports.HandlebarsEnvironment = HandlebarsEnvironment; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - var _logger2 = _interopRequireDefault(_logger); - - var VERSION = '4.7.7'; - exports.VERSION = VERSION; - var COMPILER_REVISION = 8; - exports.COMPILER_REVISION = COMPILER_REVISION; - var LAST_COMPATIBLE_COMPILER_REVISION = 7; - - exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION; - var REVISION_CHANGES = { - 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it - 2: '== 1.0.0-rc.3', - 3: '== 1.0.0-rc.4', - 4: '== 1.x.x', - 5: '== 2.0.0-alpha.x', - 6: '>= 2.0.0-beta.1', - 7: '>= 4.0.0 <4.3.0', - 8: '>= 4.3.0' - }; - - exports.REVISION_CHANGES = REVISION_CHANGES; - var objectType = '[object Object]'; - - function HandlebarsEnvironment(helpers, partials, decorators) { - this.helpers = helpers || {}; - this.partials = partials || {}; - this.decorators = decorators || {}; - - _helpers.registerDefaultHelpers(this); - _decorators.registerDefaultDecorators(this); - } - - HandlebarsEnvironment.prototype = { - constructor: HandlebarsEnvironment, - - logger: _logger2['default'], - log: _logger2['default'].log, - - registerHelper: function registerHelper(name, fn) { - if (_utils.toString.call(name) === objectType) { - if (fn) { - throw new _Exception['default']('Arg not supported with multiple helpers'); - } - _utils.extend(this.helpers, name); - } else { - this.helpers[name] = fn; - } - }, - unregisterHelper: function unregisterHelper(name) { - delete this.helpers[name]; - }, - - registerPartial: function registerPartial(name, partial) { - if (_utils.toString.call(name) === objectType) { - _utils.extend(this.partials, name); - } else { - if (typeof partial === 'undefined') { - throw new _Exception['default']('Attempting to register a partial called "' + name + '" as undefined'); - } - this.partials[name] = partial; - } - }, - unregisterPartial: function unregisterPartial(name) { - delete this.partials[name]; - }, - - registerDecorator: function registerDecorator(name, fn) { - if (_utils.toString.call(name) === objectType) { - if (fn) { - throw new _Exception['default']('Arg not supported with multiple decorators'); - } - _utils.extend(this.decorators, name); - } else { - this.decorators[name] = fn; - } - }, - unregisterDecorator: function unregisterDecorator(name) { - delete this.decorators[name]; - }, - /** - * Reset the memory of illegal property accesses that have already been logged. - * @deprecated should only be used in handlebars test-cases - */ - resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() { - _internalProtoAccess.resetLoggedProperties(); - } - }; - - var log = _logger2['default'].log; - - exports.log = log; - exports.createFrame = _utils.createFrame; - exports.logger = _logger2['default']; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztBQU9PLE1BQU0sT0FBTyxHQUFHLE9BQU8sQ0FBQzs7QUFDeEIsTUFBTSxpQkFBaUIsR0FBRyxDQUFDLENBQUM7O0FBQzVCLE1BQU0saUNBQWlDLEdBQUcsQ0FBQyxDQUFDOzs7QUFFNUMsTUFBTSxnQkFBZ0IsR0FBRztBQUM5QixLQUFDLEVBQUUsYUFBYTtBQUNoQixLQUFDLEVB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9ydGVkIHdpdGggbXVsdGlwbGUgZGVjb3JhdG9ycycpO1xuICAgICAgfVxuICAgICAgZXh0ZW5kKHRoaXMuZGVjb3JhdG9ycywgbmFtZSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMuZGVjb3JhdG9yc1tuYW1lXSA9IGZuO1xuICAgIH1cbiAgfSxcbiAgdW5yZWdpc3RlckRlY29yYXRvcjogZnVuY3Rpb24obmFtZSkge1xuICAgIGRlbGV0ZSB0aGlzLmRlY29yYXRvcnNbbmFtZV07XG4gIH0sXG4gIC8qKlxuICAgKiBSZXNldCB0aGUgbWVtb3J5IG9mIGlsbGVnYWwgcHJvcGVydHkgYWNjZXNzZXMgdGhhdCBoYXZlIGFscmVhZHkgYmVlbiBsb2dnZWQuXG4gICAqIEBkZXByZWNhdGVkIHNob3VsZCBvbmx5IGJlIHVzZWQgaW4gaGFuZGxlYmFycyB0ZXN0LWNhc2VzXG4gICAqL1xuICByZXNldExvZ2dlZFByb3BlcnR5QWNjZXNzZXMoKSB7XG4gICAgcmVzZXRMb2dnZWRQcm9wZXJ0aWVzKCk7XG4gIH1cbn07XG5cbmV4cG9ydCBsZXQgbG9nID0gbG9nZ2VyLmxvZztcblxuZXhwb3J0IHsgY3JlYXRlRnJhbWUsIGxvZ2dlciB9O1xuIl19 -; -define('handlebars/safe-string',['exports', 'module'], function (exports, module) { - // Build out our basic SafeString type - 'use strict'; - - function SafeString(string) { - this.string = string; - } - - SafeString.prototype.toString = SafeString.prototype.toHTML = function () { - return '' + this.string; - }; - - module.exports = SafeString; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3NhZmUtc3RyaW5nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFDQSxXQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUU7QUFDMUIsUUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7R0FDdEI7O0FBRUQsWUFBVSxDQUFDLFNBQVMsQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsWUFBVztBQUN2RSxXQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDO0dBQ3pCLENBQUM7O21CQUVhLFVBQVUiLCJmaWxlIjoic2FmZS1zdHJpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBCdWlsZCBvdXQgb3VyIGJhc2ljIFNhZmVTdHJpbmcgdHlwZVxuZnVuY3Rpb24gU2FmZVN0cmluZyhzdHJpbmcpIHtcbiAgdGhpcy5zdHJpbmcgPSBzdHJpbmc7XG59XG5cblNhZmVTdHJpbmcucHJvdG90eXBlLnRvU3RyaW5nID0gU2FmZVN0cmluZy5wcm90b3R5cGUudG9IVE1MID0gZnVuY3Rpb24oKSB7XG4gIHJldHVybiAnJyArIHRoaXMuc3RyaW5nO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgU2FmZVN0cmluZztcbiJdfQ== -; -define('handlebars/internal/wrapHelper',['exports'], function (exports) { - 'use strict'; - - exports.__esModule = true; - exports.wrapHelper = wrapHelper; - - function wrapHelper(helper, transformOptionsFn) { - if (typeof helper !== 'function') { - // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639 - // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function. - return helper; - } - var wrapper = function wrapper() /* dynamic arguments */{ - var options = arguments[arguments.length - 1]; - arguments[arguments.length - 1] = transformOptionsFn(options); - return helper.apply(this, arguments); - }; - return wrapper; - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL3dyYXBIZWxwZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0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YXJndW1lbnRzICovKSB7XG4gICAgY29uc3Qgb3B0aW9ucyA9IGFyZ3VtZW50c1thcmd1bWVudHMubGVuZ3RoIC0gMV07XG4gICAgYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAxXSA9IHRyYW5zZm9ybU9wdGlvbnNGbihvcHRpb25zKTtcbiAgICByZXR1cm4gaGVscGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7XG4gIH07XG4gIHJldHVybiB3cmFwcGVyO1xufVxuIl19 -; -define('handlebars/runtime',['exports', './utils', './exception', './base', './helpers', './internal/wrapHelper', './internal/proto-access'], function (exports, _utils, _exception, _base, _helpers, _internalWrapHelper, _internalProtoAccess) { - 'use strict'; - - exports.__esModule = true; - exports.checkRevision = checkRevision; - exports.template = template; - exports.wrapProgram = wrapProgram; - exports.resolvePartial = resolvePartial; - exports.invokePartial = invokePartial; - exports.noop = noop; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - function checkRevision(compilerInfo) { - var compilerRevision = compilerInfo && compilerInfo[0] || 1, - currentRevision = _base.COMPILER_REVISION; - - if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) { - return; - } - - if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) { - var runtimeVersions = _base.REVISION_CHANGES[currentRevision], - compilerVersions = _base.REVISION_CHANGES[compilerRevision]; - throw new _Exception['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); - } else { - // Use the embedded version info since the runtime doesn't know about this revision yet - throw new _Exception['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); - } - } - - function template(templateSpec, env) { - /* istanbul ignore next */ - if (!env) { - throw new _Exception['default']('No environment passed to template'); - } - if (!templateSpec || !templateSpec.main) { - throw new _Exception['default']('Unknown template object: ' + typeof templateSpec); - } - - templateSpec.main.decorator = templateSpec.main_d; - - // Note: Using env.VM references rather than local var references throughout this section to allow - // for external users to override these as pseudo-supported APIs. - env.VM.checkRevision(templateSpec.compiler); - - // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0) - var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7; - - function invokePartialWrapper(partial, context, options) { - if (options.hash) { - context = _utils.extend({}, context, options.hash); - if (options.ids) { - options.ids[0] = true; - } - } - partial = env.VM.resolvePartial.call(this, partial, context, options); - - var extendedOptions = _utils.extend({}, options, { - hooks: this.hooks, - protoAccessControl: this.protoAccessControl - }); - - var result = env.VM.invokePartial.call(this, partial, context, extendedOptions); - - if (result == null && env.compile) { - options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); - result = options.partials[options.name](context, extendedOptions); - } - if (result != null) { - if (options.indent) { - var lines = result.split('\n'); - for (var i = 0, l = lines.length; i < l; i++) { - if (!lines[i] && i + 1 === l) { - break; - } - - lines[i] = options.indent + lines[i]; - } - result = lines.join('\n'); - } - return result; - } else { - throw new _Exception['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); - } - } - - // Just add water - var container = { - strict: function strict(obj, name, loc) { - if (!obj || !(name in obj)) { - throw new _Exception['default']('"' + name + '" not defined in ' + obj, { - loc: loc - }); - } - return container.lookupProperty(obj, name); - }, - lookupProperty: function lookupProperty(parent, propertyName) { - var result = parent[propertyName]; - if (result == null) { - return result; - } - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return result; - } - - if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) { - return result; - } - return undefined; - }, - lookup: function lookup(depths, name) { - var len = depths.length; - for (var i = 0; i < len; i++) { - var result = depths[i] && container.lookupProperty(depths[i], name); - if (result != null) { - return depths[i][name]; - } - } - }, - lambda: function lambda(current, context) { - return typeof current === 'function' ? current.call(context) : current; - }, - - escapeExpression: _utils.escapeExpression, - invokePartial: invokePartialWrapper, - - fn: function fn(i) { - var ret = templateSpec[i]; - ret.decorator = templateSpec[i + '_d']; - return ret; - }, - - programs: [], - program: function program(i, data, declaredBlockParams, blockParams, depths) { - var programWrapper = this.programs[i], - fn = this.fn(i); - if (data || depths || blockParams || declaredBlockParams) { - programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); - } else if (!programWrapper) { - programWrapper = this.programs[i] = wrapProgram(this, i, fn); - } - return programWrapper; - }, - - data: function data(value, depth) { - while (value && depth--) { - value = value._parent; - } - return value; - }, - mergeIfNeeded: function mergeIfNeeded(param, common) { - var obj = param || common; - - if (param && common && param !== common) { - obj = _utils.extend({}, common, param); - } - - return obj; - }, - // An empty object to use as replacement for null-contexts - nullContext: Object.seal({}), - - noop: env.VM.noop, - compilerInfo: templateSpec.compiler - }; - - function ret(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var data = options.data; - - ret._setup(options); - if (!options.partial && templateSpec.useData) { - data = initData(context, data); - } - var depths = undefined, - blockParams = templateSpec.useBlockParams ? [] : undefined; - if (templateSpec.useDepths) { - if (options.depths) { - depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths; - } else { - depths = [context]; - } - } - - function main(context /*, options*/) { - return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); - } - - main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); - return main(context, options); - } - - ret.isTop = true; - - ret._setup = function (options) { - if (!options.partial) { - var mergedHelpers = _utils.extend({}, env.helpers, options.helpers); - wrapHelpersToPassLookupProperty(mergedHelpers, container); - container.helpers = mergedHelpers; - - if (templateSpec.usePartial) { - // Use mergeIfNeeded here to prevent compiling global partials multiple times - container.partials = container.mergeIfNeeded(options.partials, env.partials); - } - if (templateSpec.usePartial || templateSpec.useDecorators) { - container.decorators = _utils.extend({}, env.decorators, options.decorators); - } - - container.hooks = {}; - container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options); - - var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7; - _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers); - _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers); - } else { - container.protoAccessControl = options.protoAccessControl; // internal option - container.helpers = options.helpers; - container.partials = options.partials; - container.decorators = options.decorators; - container.hooks = options.hooks; - } - }; - - ret._child = function (i, data, blockParams, depths) { - if (templateSpec.useBlockParams && !blockParams) { - throw new _Exception['default']('must pass block params'); - } - if (templateSpec.useDepths && !depths) { - throw new _Exception['default']('must pass parent depths'); - } - - return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); - }; - return ret; - } - - function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { - function prog(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var currentDepths = depths; - if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) { - currentDepths = [context].concat(depths); - } - - return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); - } - - prog = executeDecorators(fn, prog, container, depths, data, blockParams); - - prog.program = i; - prog.depth = depths ? depths.length : 0; - prog.blockParams = declaredBlockParams || 0; - return prog; - } - - /** - * This is currently part of the official API, therefore implementation details should not be changed. - */ - - function resolvePartial(partial, context, options) { - if (!partial) { - if (options.name === '@partial-block') { - partial = options.data['partial-block']; - } else { - partial = options.partials[options.name]; - } - } else if (!partial.call && !options.name) { - // This is a dynamic partial that returned a string - options.name = partial; - partial = options.partials[partial]; - } - return partial; - } - - function invokePartial(partial, context, options) { - // Use the current closure context to save the partial-block if this partial - var currentPartialBlock = options.data && options.data['partial-block']; - options.partial = true; - if (options.ids) { - options.data.contextPath = options.ids[0] || options.data.contextPath; - } - - var partialBlock = undefined; - if (options.fn && options.fn !== noop) { - (function () { - options.data = _base.createFrame(options.data); - // Wrapper function to get access to currentPartialBlock from the closure - var fn = options.fn; - partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - // Restore the partial-block from the closure for the execution of the block - // i.e. the part inside the block of the partial call. - options.data = _base.createFrame(options.data); - options.data['partial-block'] = currentPartialBlock; - return fn(context, options); - }; - if (fn.partials) { - options.partials = _utils.extend({}, options.partials, fn.partials); - } - })(); - } - - if (partial === undefined && partialBlock) { - partial = partialBlock; - } - - if (partial === undefined) { - throw new _Exception['default']('The partial ' + options.name + ' could not be found'); - } else if (partial instanceof Function) { - return partial(context, options); - } - } - - function noop() { - return ''; - } - - function initData(context, data) { - if (!data || !('root' in data)) { - data = data ? _base.createFrame(data) : {}; - data.root = context; - } - return data; - } - - function executeDecorators(fn, prog, container, depths, data, blockParams) { - if (fn.decorator) { - var props = {}; - prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); - _utils.extend(prog, props); - } - return prog; - } - - function wrapHelpersToPassLookupProperty(mergedHelpers, container) { - Object.keys(mergedHelpers).forEach(function (helperName) { - var helper = mergedHelpers[helperName]; - mergedHelpers[helperName] = passLookupPropertyOption(helper, container); - }); - } - - function passLookupPropertyOption(helper, container) { - var lookupProperty = container.lookupProperty; - return _internalWrapHelper.wrapHelper(helper, function (options) { - return _utils.extend({ lookupProperty: lookupProperty }, options); - }); - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3J1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQWVPLFdBQVMsYUFBYSxDQUFDLFlBQVksRUFBRTtBQUMxQyxRQUFNLGdCQUFnQixHQUFHLEFBQUMsWUFBWSxJQUFJLFlBQVksQ0FBQyxDQUFDLENBQUMsSUFBSyxDQUFDO1FBQzdELGV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CwgY29udGV4dCwgb3B0aW9ucyk7XG5cbiAgICBsZXQgZXh0ZW5kZWRPcHRpb25zID0gVXRpbHMuZXh0ZW5kKHt9LCBvcHRpb25zLCB7XG4gICAgICBob29rczogdGhpcy5ob29rcyxcbiAgICAgIHByb3RvQWNjZXNzQ29udHJvbDogdGhpcy5wcm90b0FjY2Vzc0NvbnRyb2xcbiAgICB9KTtcblxuICAgIGxldCByZXN1bHQgPSBlbnYuVk0uaW52b2tlUGFydGlhbC5jYWxsKFxuICAgICAgdGhpcyxcbiAgICAgIHBhcnRpYWwsXG4gICAgICBjb250ZXh0LFxuICAgICAgZXh0ZW5kZWRPcHRpb25zXG4gICAgKTtcblxuICAgIGlmIChyZXN1bHQgPT0gbnVsbCAmJiBlbnYuY29tcGlsZSkge1xuICAgICAgb3B0aW9ucy5wYXJ0aWFsc1tvcHRpb25zLm5hbWVdID0gZW52LmNvbXBpbGUoXG4gICAgICAgIHBhcnRpYWwsXG4gICAgICAgIHRlbXBsYXRlU3BlYy5jb21waWxlck9wdGlvbnMsXG4gICAgICAgIGVudlxuICAgICAgKTtcbiAgICAgIHJlc3VsdCA9IG9wdGlvbnMucGFydGlhbHNbb3B0aW9ucy5uYW1lXShjb250ZXh0LCBleHRlbmRlZE9wdGlvbnMpO1xuICAgIH1cbiAgICBpZiAocmVzdWx0ICE9IG51bGwpIHtcbiAgICAgIGlmIChvcHRpb25zLmluZGVudCkge1xuICAgICAgICBsZXQgbGluZXMgPSByZXN1bHQuc3BsaXQoJ1xcbicpO1xuICAgICAgICBmb3IgKGxldCBpID0gMCwgbCA9IGxpbmVzLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICAgIGlmICghbGluZXNbaV0gJiYgaSArIDEgPT09IGwpIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGxpbmVzW2ldID0gb3B0aW9ucy5pbmRlbnQgKyBsaW5lc1tpXTtcbiAgICAgICAgfVxuICAgICAg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0gY29udGFpbmVyLm1lcmdlSWZOZWVkZWQoXG4gICAgICAgICAgb3B0aW9ucy5wYXJ0aWFscyxcbiAgICAgICAgICBlbnYucGFydGlhbHNcbiAgICAgICAgKTtcbiAgICAgIH1cbiAgICAgIGlmICh0ZW1wbGF0ZVNwZWMudXNlUGFydGlhbCB8fCB0ZW1wbGF0ZVNwZWMudXNlRGVjb3JhdG9ycykge1xuICAgICAgICBjb250YWluZXIuZGVjb3JhdG9ycyA9IFV0aWxzLmV4dGVuZChcbiAgICAgICAgICB7fSxcbiAgICAgICAgICBlbnYuZGVjb3JhdG9ycyxcbiAgICAgICAgICBvcHRpb25zLmRlY29yYXRvcnNcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29udGFpbmVyLmhvb2tzID0ge307XG4gICAgICBjb250YWluZXIucHJvdG9BY2Nlc3NDb250cm9sID0gY3JlYXRlUHJvdG9BY2Nlc3NDb250cm9sKG9wdGlvbnMpO1xuXG4gICAgICBsZXQga2VlcEhlbHBlckluSGVscGVycyA9XG4gICAgICAgIG9wdGlvbnMuYWxsb3dDYWxsc1RvSGVscGVyTWlzc2luZyB8fFxuICAgICAgICB0ZW1wbGF0ZVdhc1ByZWNvbXBpbGVkV2l0aENvbXBpbGVyVjc7XG4gICAgICBtb3ZlSGVscGVyVG9Ib29rcyhjb250YWluZXIsICdoZWxwZXJNaXNzaW5nJywga2VlcEhlbHBlckluSGVscGVycyk7XG4gICAgICBtb3ZlSGVscGVyVG9Ib29rcyhjb250YWluZXIsICdibG9ja0hlbHBlck1pc3NpbmcnLCBrZWVwSGVscGVySW5IZWxwZXJzKTtcbiAgICB9IGVsc2Uge1xuICAgICAgY29udGFpbmVyLnByb3RvQWNjZXNzQ29udHJvbCA9IG9wdGlvbnMucHJvdG9BY2Nlc3NDb250cm9sOyAvLyBpbnRlcm5hbCBvcHRpb25cbiAgICAgIGNvbnRhaW5lci5oZWxwZXJzID0gb3B0aW9ucy5oZWxwZXJzO1xuICAgICAgY29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yZ2VkSGVscGVyc1toZWxwZXJOYW1lXSA9IHBhc3NMb29rdXBQcm9wZXJ0eU9wdGlvbihoZWxwZXIsIGNvbnRhaW5lcik7XG4gIH0pO1xufVxuXG5mdW5jdGlvbiBwYXNzTG9va3VwUHJvcGVydHlPcHRpb24oaGVscGVyLCBjb250YWluZXIpIHtcbiAgY29uc3QgbG9va3VwUHJvcGVydHkgPSBjb250YWluZXIubG9va3VwUHJvcGVydHk7XG4gIHJldHVybiB3cmFwSGVscGVyKGhlbHBlciwgb3B0aW9ucyA9PiB7XG4gICAgcmV0dXJuIFV0aWxzLmV4dGVuZCh7IGxvb2t1cFByb3BlcnR5IH0sIG9wdGlvbnMpO1xuICB9KTtcbn1cbiJdfQ== -; -define('handlebars/no-conflict',['exports', 'module'], function (exports, module) { - 'use strict'; - - module.exports = function (Handlebars) { - /* istanbul ignore next */ - var root = typeof global !== 'undefined' ? global : window, - $Handlebars = root.Handlebars; - /* istanbul ignore next */ - Handlebars.noConflict = function () { - if (root.Handlebars === Handlebars) { - root.Handlebars = $Handlebars; - } - return Handlebars; - }; - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL25vLWNvbmZsaWN0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFBZSxVQUFTLFVBQVUsRUFBRTs7QUFFbEMsUUFBSSxJQUFJLEdBQUcsT0FBTyxNQUFNLEtBQUssV0FBVyxHQUFHLE1BQU0sR0FBRyxNQUFNO1FBQ3hELFdBQVcsR0FBRyxJQUFJLENBQUMsVUFBVSxDQUFDOztBQUVoQyxjQUFVLENBQUMsVUFBVSxHQUFHLFlBQVc7QUFDakMsVUFBSSxJQUFJLENBQUMsVUFBVSxLQUFLLFVBQVUsRUFBRTtBQUNsQyxZQUFJLENBQUMsVUFBVSxHQUFHLFdBQVcsQ0FBQztPQUMvQjtBQUNELGFBQU8sVUFBVSxDQUFDO0tBQ25CLENBQUM7R0FDSCIsImZpbGUiOiJuby1jb25mbGljdC5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKEhhbmRsZWJhcnMpIHtcbiAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgbGV0IHJvb3QgPSB0eXBlb2YgZ2xvYmFsICE9PSAndW5kZWZpbmVkJyA/IGdsb2JhbCA6IHdpbmRvdyxcbiAgICAkSGFuZGxlYmFycyA9IHJvb3QuSGFuZGxlYmFycztcbiAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgSGFuZGxlYmFycy5ub0NvbmZsaWN0ID0gZnVuY3Rpb24oKSB7XG4gICAgaWYgKHJvb3QuSGFuZGxlYmFycyA9PT0gSGFuZGxlYmFycykge1xuICAgICAgcm9vdC5IYW5kbGViYXJzID0gJEhhbmRsZWJhcnM7XG4gICAgfVxuICAgIHJldHVybiBIYW5kbGViYXJzO1xuICB9O1xufVxuIl19 -; -define('handlebars.runtime',['exports', 'module', './handlebars/base', './handlebars/safe-string', './handlebars/exception', './handlebars/utils', './handlebars/runtime', './handlebars/no-conflict'], function (exports, module, _handlebarsBase, _handlebarsSafeString, _handlebarsException, _handlebarsUtils, _handlebarsRuntime, _handlebarsNoConflict) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - // Each of these augment the Handlebars object. No need to setup here. - // (This is done to easily share code between commonjs and browse envs) - - var _SafeString = _interopRequireDefault(_handlebarsSafeString); - - var _Exception = _interopRequireDefault(_handlebarsException); - - var _noConflict = _interopRequireDefault(_handlebarsNoConflict); - - // For compatibility and usage outside of module systems, make the Handlebars object a namespace - function create() { - var hb = new _handlebarsBase.HandlebarsEnvironment(); - - _handlebarsUtils.extend(hb, _handlebarsBase); - hb.SafeString = _SafeString['default']; - hb.Exception = _Exception['default']; - hb.Utils = _handlebarsUtils; - hb.escapeExpression = _handlebarsUtils.escapeExpression; - - hb.VM = _handlebarsRuntime; - hb.template = function (spec) { - return _handlebarsRuntime.template(spec, hb); - }; - - return hb; - } - - var inst = create(); - inst.create = create; - - _noConflict['default'](inst); - - inst['default'] = inst; - - module.exports = inst; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9oYW5kbGViYXJzLnJ1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFZQSxXQUFTLE1BQU0sR0FBRztBQUNoQixRQUFJLEVBQUUsR0FBRyxJQUFJLGdCQUFLLHFCQUFxQixFQUFFLENBQUM7O0FBRTFDLHFCQUFNLE1BQU0sQ0FBQyxFQUFFLGtCQUFPLENBQUM7QUFDdkIsTUFBRSxDQUFDLFVBQVUseUJBQWEsQ0FBQztBQUMzQixNQUFFLENBQUMsU0FBUyx3QkFBWSxDQUFDO0FBQ3pCLE1BQUUsQ0FBQyxLQUFLLG1CQUFRLENBQUM7QUFDakIsTUFBRSxDQUFDLGdCQUFnQixHQUFHLGlCQUFNLGdCQUFnQixDQUFDOztBQUU3QyxNQUFFLENBQUMsRUFBRSxxQkFBVSxDQUFDO0FBQ2hCLE1BQUUsQ0FBQyxRQUFRLEdBQUcsVUFBUyxJQUFJLEVBQUU7QUFDM0IsYUFBTyxtQkFBUSxRQUFRLENBQUMsSUFBSSxFQUFFLEVBQUUsQ0FBQyxDQUFDO0tBQ25DLENBQUM7O0FBRUYsV0FBTyxFQUFFLENBQUM7R0FDWDs7QUFFRCxNQUFJLElBQUksR0FBRyxNQUFNLEVBQUUsQ0FBQztBQUNwQixNQUFJLENBQUMsTUFBTSxHQUFHLE1BQU0sQ0FBQzs7QUFFckIseUJBQVcsSUFBSSxDQUFDLENBQUM7O0FBRWpCLE1BQUksQ0FBQyxTQUFTLENBQUM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mVzY2FwZUV4cHJlc3Npb24gPSBVdGlscy5lc2NhcGVFeHByZXNzaW9uO1xuXG4gIGhiLlZNID0gcnVudGltZTtcbiAgaGIudGVtcGxhdGUgPSBmdW5jdGlvbihzcGVjKSB7XG4gICAgcmV0dXJuIHJ1bnRpbWUudGVtcGxhdGUoc3BlYywgaGIpO1xuICB9O1xuXG4gIHJldHVybiBoYjtcbn1cblxubGV0IGluc3QgPSBjcmVhdGUoKTtcbmluc3QuY3JlYXRlID0gY3JlYXRlO1xuXG5ub0NvbmZsaWN0KGluc3QpO1xuXG5pbnN0WydkZWZhdWx0J10gPSBpbnN0O1xuXG5leHBvcnQgZGVmYXVsdCBpbnN0O1xuIl19 -; -define('handlebars/compiler/ast',['exports', 'module'], function (exports, module) { - 'use strict'; - - var AST = { - // Public API used to evaluate derived attributes regarding AST nodes - helpers: { - // a mustache is definitely a helper if: - // * it is an eligible helper, and - // * it has at least one parameter or hash segment - helperExpression: function helperExpression(node) { - return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash); - }, - - scopedId: function scopedId(path) { - return (/^\.|this\b/.test(path.original) - ); - }, - - // an ID is simple if it only has one part, and that part is not - // `..` or `this`. - simpleId: function simpleId(path) { - return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; - } - } - }; - - // Must be exported as an object rather than the root of the module as the jison lexer - // must modify the object to operate properly. - module.exports = AST; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2FzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxNQUFJLEdBQUcsR0FBRzs7QUFFUixXQUFPLEVBQUU7Ozs7QUFJUCxzQkFBZ0IsRUFBRSwwQkFBUyxJQUFJLEVBQUU7QUFDL0IsZUFDRSxJQUFJLENBQ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zc2lvbjogZnVuY3Rpb24obm9kZSkge1xuICAgICAgcmV0dXJuIChcbiAgICAgICAgbm9kZS50eXBlID09PSAnU3ViRXhwcmVzc2lvbicgfHxcbiAgICAgICAgKChub2RlLnR5cGUgPT09ICdNdXN0YWNoZVN0YXRlbWVudCcgfHxcbiAgICAgICAgICBub2RlLnR5cGUgPT09ICdCbG9ja1N0YXRlbWVudCcpICYmXG4gICAgICAgICAgISEoKG5vZGUucGFyYW1zICYmIG5vZGUucGFyYW1zLmxlbmd0aCkgfHwgbm9kZS5oYXNoKSlcbiAgICAgICk7XG4gICAgfSxcblxuICAgIHNjb3BlZElkOiBmdW5jdGlvbihwYXRoKSB7XG4gICAgICByZXR1cm4gL15cXC58dGhpc1xcYi8udGVzdChwYXRoLm9yaWdpbmFsKTtcbiAgICB9LFxuXG4gICAgLy8gYW4gSUQgaXMgc2ltcGxlIGlmIGl0IG9ubHkgaGFzIG9uZSBwYXJ0LCBhbmQgdGhhdCBwYXJ0IGlzIG5vdFxuICAgIC8vIGAuLmAgb3IgYHRoaXNgLlxuICAgIHNpbXBsZUlkOiBmdW5jdGlvbihwYXRoKSB7XG4gICAgICByZXR1cm4gKFxuICAgICAgICBwYXRoLnBhcnRzLmxlbmd0aCA9PT0gMSAmJiAhQVNULmhlbHBlcnMuc2NvcGVkSWQocGF0aCkgJiYgIXBhdGguZGVwdGhcbiAgICAgICk7XG4gICAgfVxuICB9XG59O1xuXG4vLyBNdXN0IGJlIGV4cG9ydGVkIGFzIGFuIG9iamVjdCByYXRoZXIgdGhhbiB0aGUgcm9vdCBvZiB0aGUgbW9kdWxlIGFzIHRoZSBqaXNvbiBsZXhlclxuLy8gbXVzdCBtb2RpZnkgdGhlIG9iamVjdCB0byBvcGVyYXRlIHByb3Blcmx5LlxuZXhwb3J0IGRlZmF1bHQgQVNUO1xuIl19 -; -define('handlebars/compiler/parser',["exports", "module"], function (exports, module) { - // File ignored in coverage tests via setting in .istanbul.yml - /* Jison generated parser */ - "use strict"; - - var handlebars = (function () { - var parser = { trace: function trace() {}, - yy: {}, - symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" }, - productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 0], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - - var $0 = $$.length - 1; - switch (yystate) { - case 1: - return $$[$0 - 1]; - break; - case 2: - this.$ = yy.prepareProgram($$[$0]); - break; - case 3: - this.$ = $$[$0]; - break; - case 4: - this.$ = $$[$0]; - break; - case 5: - this.$ = $$[$0]; - break; - case 6: - this.$ = $$[$0]; - break; - case 7: - this.$ = $$[$0]; - break; - case 8: - this.$ = $$[$0]; - break; - case 9: - this.$ = { - type: 'CommentStatement', - value: yy.stripComment($$[$0]), - strip: yy.stripFlags($$[$0], $$[$0]), - loc: yy.locInfo(this._$) - }; - - break; - case 10: - this.$ = { - type: 'ContentStatement', - original: $$[$0], - value: $$[$0], - loc: yy.locInfo(this._$) - }; - - break; - case 11: - this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); - break; - case 12: - this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; - break; - case 13: - this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); - break; - case 14: - this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); - break; - case 15: - this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 16: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 17: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 18: - this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; - break; - case 19: - var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), - program = yy.prepareProgram([inverse], $$[$0 - 1].loc); - program.chained = true; - - this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true }; - - break; - case 20: - this.$ = $$[$0]; - break; - case 21: - this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; - break; - case 22: - this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); - break; - case 23: - this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); - break; - case 24: - this.$ = { - type: 'PartialStatement', - name: $$[$0 - 3], - params: $$[$0 - 2], - hash: $$[$0 - 1], - indent: '', - strip: yy.stripFlags($$[$0 - 4], $$[$0]), - loc: yy.locInfo(this._$) - }; - - break; - case 25: - this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); - break; - case 26: - this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) }; - break; - case 27: - this.$ = $$[$0]; - break; - case 28: - this.$ = $$[$0]; - break; - case 29: - this.$ = { - type: 'SubExpression', - path: $$[$0 - 3], - params: $$[$0 - 2], - hash: $$[$0 - 1], - loc: yy.locInfo(this._$) - }; - - break; - case 30: - this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) }; - break; - case 31: - this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) }; - break; - case 32: - this.$ = yy.id($$[$0 - 1]); - break; - case 33: - this.$ = $$[$0]; - break; - case 34: - this.$ = $$[$0]; - break; - case 35: - this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) }; - break; - case 36: - this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) }; - break; - case 37: - this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) }; - break; - case 38: - this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) }; - break; - case 39: - this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) }; - break; - case 40: - this.$ = $$[$0]; - break; - case 41: - this.$ = $$[$0]; - break; - case 42: - this.$ = yy.preparePath(true, $$[$0], this._$); - break; - case 43: - this.$ = yy.preparePath(false, $$[$0], this._$); - break; - case 44: - $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2]; - break; - case 45: - this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; - break; - case 46: - this.$ = []; - break; - case 47: - $$[$0 - 1].push($$[$0]); - break; - case 48: - this.$ = []; - break; - case 49: - $$[$0 - 1].push($$[$0]); - break; - case 50: - this.$ = []; - break; - case 51: - $$[$0 - 1].push($$[$0]); - break; - case 58: - this.$ = []; - break; - case 59: - $$[$0 - 1].push($$[$0]); - break; - case 64: - this.$ = []; - break; - case 65: - $$[$0 - 1].push($$[$0]); - break; - case 70: - this.$ = []; - break; - case 71: - $$[$0 - 1].push($$[$0]); - break; - case 78: - this.$ = []; - break; - case 79: - $$[$0 - 1].push($$[$0]); - break; - case 82: - this.$ = []; - break; - case 83: - $$[$0 - 1].push($$[$0]); - break; - case 86: - this.$ = []; - break; - case 87: - $$[$0 - 1].push($$[$0]); - break; - case 90: - this.$ = []; - break; - case 91: - $$[$0 - 1].push($$[$0]); - break; - case 94: - this.$ = []; - break; - case 95: - $$[$0 - 1].push($$[$0]); - break; - case 98: - this.$ = [$$[$0]]; - break; - case 99: - $$[$0 - 1].push($$[$0]); - break; - case 100: - this.$ = [$$[$0]]; - break; - case 101: - $$[$0 - 1].push($$[$0]); - break; - } - }, - table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 15: [2, 48], 17: 39, 18: [2, 48] }, { 20: 41, 56: 40, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 44, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 45, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 41, 56: 48, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 49, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 50] }, { 72: [1, 35], 86: 51 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 52, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 53, 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 54, 47: [2, 54] }, { 28: 59, 43: 60, 44: [1, 58], 47: [2, 56] }, { 13: 62, 15: [1, 20], 18: [1, 61] }, { 33: [2, 86], 57: 63, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 64, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 65, 47: [1, 66] }, { 30: 67, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 68, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 69, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 70, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 74, 33: [2, 80], 50: 71, 63: 72, 64: 75, 65: [1, 43], 69: 73, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 79] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 50] }, { 20: 74, 53: 80, 54: [2, 84], 63: 81, 64: 75, 65: [1, 43], 69: 82, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 83, 47: [1, 66] }, { 47: [2, 55] }, { 4: 84, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 85, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 86, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 87, 47: [1, 66] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 74, 33: [2, 88], 58: 88, 63: 89, 64: 75, 65: [1, 43], 69: 90, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 91, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 92, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 31: 93, 33: [2, 60], 63: 94, 64: 75, 65: [1, 43], 69: 95, 70: 76, 71: 77, 72: [1, 78], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 66], 36: 96, 63: 97, 64: 75, 65: [1, 43], 69: 98, 70: 76, 71: 77, 72: [1, 78], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 22: 99, 23: [2, 52], 63: 100, 64: 75, 65: [1, 43], 69: 101, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 92], 62: 102, 63: 103, 64: 75, 65: [1, 43], 69: 104, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 105] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 106, 72: [1, 107], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 108], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 109] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 111, 46: 110, 47: [2, 76] }, { 33: [2, 70], 40: 112, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 113] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 74, 63: 115, 64: 75, 65: [1, 43], 67: 114, 68: [2, 96], 69: 116, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 117] }, { 32: 118, 33: [2, 62], 74: 119, 75: [1, 120] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 121, 74: 122, 75: [1, 120] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 123] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 124] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 108] }, { 20: 74, 63: 125, 64: 75, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 74, 33: [2, 72], 41: 126, 63: 127, 64: 75, 65: [1, 43], 69: 128, 70: 76, 71: 77, 72: [1, 78], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 129] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 130] }, { 33: [2, 63] }, { 72: [1, 132], 76: 131 }, { 33: [1, 133] }, { 33: [2, 69] }, { 15: [2, 12], 18: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 134, 74: 135, 75: [1, 120] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 137], 77: [1, 136] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 138] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], - defaultActions: { 4: [2, 1], 54: [2, 55], 56: [2, 20], 60: [2, 57], 73: [2, 81], 82: [2, 85], 86: [2, 18], 90: [2, 89], 101: [2, 53], 104: [2, 93], 110: [2, 19], 111: [2, 77], 116: [2, 97], 119: [2, 63], 122: [2, 69], 135: [2, 75], 136: [2, 32] }, - parseError: function parseError(str, hash) { - throw new Error(str); - }, - parse: function parse(input) { - var self = this, - stack = [0], - vstack = [null], - lstack = [], - table = this.table, - yytext = "", - yylineno = 0, - yyleng = 0, - recovering = 0, - TERROR = 2, - EOF = 1; - this.lexer.setInput(input); - this.lexer.yy = this.yy; - this.yy.lexer = this.lexer; - this.yy.parser = this; - if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; - var yyloc = this.lexer.yylloc; - lstack.push(yyloc); - var ranges = this.lexer.options && this.lexer.options.ranges; - if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = self.lexer.lex() || 1; - if (typeof token !== "number") { - token = self.symbols_[token] || token; - } - return token; - } - var symbol, - preErrorSymbol, - state, - action, - a, - r, - yyval = {}, - p, - len, - newState, - expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - if (!recovering) { - expected = []; - for (p in table[state]) if (this.terminals_[p] && p > 2) { - expected.push("'" + this.terminals_[p] + "'"); - } - if (this.lexer.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); - } - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) recovering--; - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; - if (ranges) { - yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; - } - r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - /* Jison generated lexer */ - var lexer = (function () { - var lexer = { EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - setInput: function setInput(input) { - this._input = input; - this._more = this._less = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; - if (this.options.ranges) this.yylloc.range = [0, 0]; - this.offset = 0; - return this; - }, - input: function input() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) this.yylloc.range[1]++; - - this._input = this._input.slice(1); - return ch; - }, - unput: function unput(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) this.yylineno -= lines.length - 1; - var r = this.yylloc.range; - - this.yylloc = { first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - return this; - }, - more: function more() { - this._more = true; - return this; - }, - less: function less(n) { - this.unput(this.match.slice(n)); - }, - pastInput: function pastInput() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, ""); - }, - upcomingInput: function upcomingInput() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - showPosition: function showPosition() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - next: function next() { - if (this.done) { - return this.EOF; - } - if (!this._input) this.done = true; - - var token, match, tempMatch, index, col, lines; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (!this.options.flex) break; - } - } - if (match) { - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) this.yylineno += lines.length; - this.yylloc = { first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) this.done = false; - if (token) return token;else return; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno }); - } - }, - lex: function lex() { - var r = this.next(); - if (typeof r !== 'undefined') { - return r; - } else { - return this.lex(); - } - }, - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - popState: function popState() { - return this.conditionStack.pop(); - }, - _currentRules: function _currentRules() { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - }, - topState: function topState() { - return this.conditionStack[this.conditionStack.length - 2]; - }, - pushState: function begin(condition) { - this.begin(condition); - } }; - lexer.options = {}; - lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - - function strip(start, end) { - return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start); - } - - var YYSTATE = YY_START; - switch ($avoiding_name_collisions) { - case 0: - if (yy_.yytext.slice(-2) === "\\\\") { - strip(0, 1); - this.begin("mu"); - } else if (yy_.yytext.slice(-1) === "\\") { - strip(0, 1); - this.begin("emu"); - } else { - this.begin("mu"); - } - if (yy_.yytext) return 15; - - break; - case 1: - return 15; - break; - case 2: - this.popState(); - return 15; - - break; - case 3: - this.begin('raw');return 15; - break; - case 4: - this.popState(); - // Should be using `this.topState()` below, but it currently - // returns the second top instead of the first top. Opened an - // issue about it at https://github.com/zaach/jison/issues/291 - if (this.conditionStack[this.conditionStack.length - 1] === 'raw') { - return 15; - } else { - strip(5, 9); - return 'END_RAW_BLOCK'; - } - - break; - case 5: - return 15; - break; - case 6: - this.popState(); - return 14; - - break; - case 7: - return 65; - break; - case 8: - return 68; - break; - case 9: - return 19; - break; - case 10: - this.popState(); - this.begin('raw'); - return 23; - - break; - case 11: - return 55; - break; - case 12: - return 60; - break; - case 13: - return 29; - break; - case 14: - return 47; - break; - case 15: - this.popState();return 44; - break; - case 16: - this.popState();return 44; - break; - case 17: - return 34; - break; - case 18: - return 39; - break; - case 19: - return 51; - break; - case 20: - return 48; - break; - case 21: - this.unput(yy_.yytext); - this.popState(); - this.begin('com'); - - break; - case 22: - this.popState(); - return 14; - - break; - case 23: - return 48; - break; - case 24: - return 73; - break; - case 25: - return 72; - break; - case 26: - return 72; - break; - case 27: - return 87; - break; - case 28: - // ignore whitespace - break; - case 29: - this.popState();return 54; - break; - case 30: - this.popState();return 33; - break; - case 31: - yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80; - break; - case 32: - yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80; - break; - case 33: - return 85; - break; - case 34: - return 82; - break; - case 35: - return 82; - break; - case 36: - return 83; - break; - case 37: - return 84; - break; - case 38: - return 81; - break; - case 39: - return 75; - break; - case 40: - return 77; - break; - case 41: - return 72; - break; - case 42: - yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72; - break; - case 43: - return 'INVALID'; - break; - case 44: - return 5; - break; - } - }; - lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/]; - lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } }; - return lexer; - })(); - parser.lexer = lexer; - function Parser() { - this.yy = {}; - }Parser.prototype = parser;parser.Parser = Parser; - return new Parser(); - })();module.exports = handlebars; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL3BhcnNlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUVBLFFBQUksVUFBVSxHQUFHLENBQUMsWUFBVTtBQUM1QixZQUFJLE1BQU0sR0FBRyxFQUFDLEtBQUssRUFBRSxTQUFTLEtBQUssR0FBSSxFQUFHO0FBQzFDLGNBQUUsRUFBRSxFQUFFO0FBQ04sb0JBQVEsRUFBRSxFQUFDLE9BQU8sRUFBQyxDQUFDLEVBQUMsTUFBTSxFQUFDLENBQUMsRUFBQyxTQUFTLEVBQUMsQ0FBQyxFQUFDLEtBQUssRUFBQyxDQUFDLEVBQUMscUJBQXFCLEVBQUMsQ0FBQyxFQUFDLFdBQVcsRUFBQyxDQUFDL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9uID0gdGhpcy5kZWZhdWx0QWN0aW9uc1tzdGF0ZV07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAoc3ltYm9sID09PSBudWxsIHx8IHR5cGVvZiBzeW1ib2wgPT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICAgICAgICAgIHN5bWJvbCA9IGxleCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYWN0aW9uID0gdGFibGVbc3RhdGVdICYmIHRhYmxlW3N0YXRlXVtzeW1ib2xdO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0eXBlb2YgYWN0aW9uID09PSBcInVuZGVmaW5lZFwiIHx8ICFhY3Rpb24ubGVuZ3RoIHx8ICFhY3Rpb25bMF0pIHtcbiAgICAgICAgICAgIHZhciBlcnJTdHIgPSBcIlwiO1xuICAgICAgICAgICAgaWYgKCFyZWNvdmVyaW5nKSB7XG4gICAgICAgICAgICAgICAgZXhwZWN0ZWQgPSBbXTtcbiAgICAgICAgICAgICAgICBmb3IgKHAgaW4gdGFibGVbc3RhdGVdKVxuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy50ZXJtaW5hbHNfW3BdICYmIHAgPiAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBleHBlY3RlZC5wdXNoKFwiJ1wiICsgdGhpcy50ZXJtaW5hbHNfW3BdICsgXCInXCIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMubGV4ZXIuc2hvd1Bvc2l0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIGVyclN0ciA9IFwiUGFyc2UgZXJyb3Igb24gbGluZSBcIiArICh5eWxpbmVubyArIDEpICsgXCI6XFxuXCIgKyB0aGlzLmxleGVyLnNob3dQb3NpdGlvbigpICsgXCJcXG5FeHBlY3RpbmcgXCIgKyBleHBlY3RlZC5qb2luKFwiLCBcIikgKyBcIiwgZ290ICdcIiArICh0aGlzLnRlcm1pbmFsc19bc3ltY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AgICAgICAgICAgc3ltYm9sID0gbnVsbDtcbiAgICAgICAgICAgIGlmICghcHJlRXJyb3JTeW1ib2wpIHtcbiAgICAgICAgICAgICAgICB5eWxlbmcgPSB0aGlzLmxleGVyLnl5bGVuZztcbiAgICAgICAgICAgICAgICB5eXRleHQgPSB0aGlzLmxleGVyLnl5dGV4dDtcbiAgICAgICAgICAgICAgICB5eWxpbmVubyA9IHRoaXMubGV4ZXIueXlsaW5lbm87XG4gICAgICAgICAgICAgICAgeXlsb2MgPSB0aGlzLmxleGVyLnl5bGxvYztcbiAgICAgICAgICAgICAgICBpZiAocmVjb3ZlcmluZyA+IDApXG4gICAgICAgICAgICAgICAgICAgIHJlY292ZXJpbmctLTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgc3ltYm9sID0gcHJlRXJyb3JTeW1ib2w7XG4gICAgICAgICAgICAgICAgcHJlRXJyb3JTeW1ib2wgPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgIGxlbiA9IHRoaXMucHJvZHVjdGlvbnNfW2FjdGlvblsxXV1bMV07XG4gICAgICAgICAgICB5eXZhbC4kID0gdnN0YWNrW3ZzdGFjay5sZW5ndGggLSBsZW5dO1xuICAgICAgICAgICAgeXl2YWwuXyQgPSB7Zmlyc3RfbGluZTogbHN0YWNrW2xzdGFjay5sZW5ndGggLSAobGVuIHx8IDEpXS5maXJzdF9saW5lLCBsYXN0X2xpbmU6IGxzdGFja1tsc3RhY2subGVuZ3RoIC0gMV0ubGFzdF9saW5lLCBmaXJzdF9jb2x1bW46IGxzdGFja1tsc3RhY2subGVuZ3RoIC0gKGxlbiB8fCAxKV0uZmlyc3RfY29sdW1uLCBsYXN0X2NvbHVtbjogbHN0YWNrW2xzdGFjay5sZW5ndGggLSAxXS5sYXN0X2NvbHVtbn07XG4gICAgICAgICAgICBpZiAocmFuZ2VzKSB7XG4gICAgICAgICAgICAgICAgeXl2YWwuXyQucmFuZ2UgPSBbbHN0YWNrW2xzdGFjay5sZW5ndGggLSAobGVuIHx8IDEpXS5yYW5nZVswXSwgbHN0YWNrW2xzdGFjay5sZW5ndGggLSAxXS5yYW5nZVsxXV07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByID0gdGhpcy5wZXJmb3JtQWN0aW9uLmNhbGwoeXl2YWwsIHl5dGV4dCwgeXlsZW5nLCB5eWxpbmVubywgdGhpcy55eSwgYWN0aW9uWzFdLCB2c3RhY2ssIGxzdGFjayk7XG4gICAgICAgICAgICBpZiAodHlwZW9mIHIgIT09IFwidW5kZWZpbmVkXCIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChsZW4pIHtcbiAgICAgICAgICAgICAgICBzdGFjayA9IHN0YWNrLnNsaWNlKDAsIC0xICogbGVuICogMik7XG4gICAgICAgICAgICAgICAgdnN0YWNrID0gdnN0YWNrLnNsaWNlKDAsIC0xICogbGVuKTtcbiAgICAgICAgICAgICAgICBsc3RhY2sgPSBsc3RhY2suc2xpY2UoMCwgLTEgKiBsZW4pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc3RhY2sucHVzaCh0aGlzLnByb2R1Y3Rpb25zX1thY3Rpb25bMV1dWzBdKTtcbiAgICAgICAgICAgIHZzdGFjay5wdXNoKHl5dmFsLiQpO1xuICAgICAgICAgICAgbHN0YWNrLnB1c2goeXl2YWwuXyQpO1xuICAgICAgICAgICAgbmV3U3RhdGUgPSB0YWJsZVtzdGFja1tzdGFjay5sZW5ndGggLSAyXV1bc3RhY2tbc3RhY2subGVuZ3RoIC0gMV1dO1xuICAgICAgICAgICAgc3RhY2sucHVzaChuZXdTdGF0ZSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICB9XG4g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lzLmRvbmUgPSB0cnVlO1xuXG4gICAgICAgIHZhciB0b2tlbixcbiAgICAgICAgICAgIG1hdGNoLFxuICAgICAgICAgICAgdGVtcE1hdGNoLFxuICAgICAgICAgICAgaW5kZXgsXG4gICAgICAgICAgICBjb2wsXG4gICAgICAgICAgICBsaW5lcztcbiAgICAgICAgaWYgKCF0aGlzLl9tb3JlKSB7XG4gICAgICAgICAgICB0aGlzLnl5dGV4dCA9ICcnO1xuICAgICAgICAgICAgdGhpcy5tYXRjaCA9ICcnO1xuICAgICAgICB9XG4gICAgICAgIHZhciBydWxlcyA9IHRoaXMuX2N1cnJlbnRSdWxlcygpO1xuICAgICAgICBmb3IgKHZhciBpPTA7aSA8IHJ1bGVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB0ZW1wTWF0Y2ggPSB0aGlzLl9pbnB1dC5tYXRjaCh0aGlzLnJ1bGVzW3J1bGVzW2ldXSk7XG4gICAgICAgICAgICBpZiAodGVtcE1hdGNoICYmICghbWF0Y2ggfHwgdGVtcE1hdGNoWzBdLmxlbmd0aCA+IG1hdGNoWzBdLmxlbmd0aCkpIHtcbiAgICAgICAgICAgICAgICBtYXRjaCA9IHRlbXBNYXRjaDtcbiAgICAgICAgICAgICAgICBpbmRleCA9IGk7XG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLm9wdGlvbnMuZmxleCkgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1hdGNoKSB7XG4gICAgICAgICAgICBsaW5lcyA9IG1hdGNoWzBdLm1hdGNoKC8oPzpcXHJcXG4/fFxcbikuKi9nKTtcbiAgICAgICAgICAgIGlmIChsaW5lcykgdGhpcy55eWxpbmVubyArPSBsaW5lcy5sZW5ndGg7XG4gICAgICAgICAgICB0aGlzLnl5bGxvYyA9IHtmaXJzdF9saW5lOiB0aGlzLnl5bGxvYy5sYXN0X2xpbmUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN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iAodGhpcy5kb25lICYmIHRoaXMuX2lucHV0KSB0aGlzLmRvbmUgPSBmYWxzZTtcbiAgICAgICAgICAgIGlmICh0b2tlbikgcmV0dXJuIHRva2VuO1xuICAgICAgICAgICAgZWxzZSByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMuX2lucHV0ID09PSBcIlwiKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5FT0Y7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5wYXJzZUVycm9yKCdMZXhpY2FsIGVycm9yIG9uIGxpbmUgJysodGhpcy55eWxpbmVubysxKSsnLiBVbnJlY29nbml6ZWQgdGV4dC5cXG4nK3RoaXMuc2hvd1Bvc2l0aW9uKCksXG4gICAgICAgICAgICAgICAgICAgIHt0ZXh0OiBcIlwiLCB0b2tlbjogbnVsbCwgbGluZTogdGhpcy55eWxpbmVub30pO1xuICAgICAgICB9XG4gICAgfSxcbmxleDpmdW5jdGlvbiBsZXggKCkge1xuICAgICAgICB2YXIgciA9IHRoaXMubmV4dCgpO1xuICAgICAgICBpZiAodHlwZW9mIHIgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICByZXR1cm4gcjtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmxleCgpO1xuICAgICAgICB9XG4gICAgfSxcbmJlZ2luOmZ1bmN0aW9uIGJlZ2luIChjb25kaXRpb24pIHtcbiAgICAgICAgdGhpcy5jb25kaXRpb25TdGFjay5wdXNoKGNvbmRpdGlvbik7XG4gICAgfSxcbnBvcFN0YXRlOmZ1bmN0aW9uIHBvcFN0YXRlICgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuY29uZGl0aW9uU3RhY2sucG9wKCk7XG4gICAgfSxcbl9jdXJyZW50UnVsZXM6ZnVuY3Rpb24gX2N1cnJlbnRSdWxlcyAoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLm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AgICAgICAgICAgICAgICAgICAgICAgIHN0cmlwKDAsMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5iZWdpbihcImVtdVwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmJlZ2luKFwibXVcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoeXlfLnl5dGV4dCkgcmV0dXJuIDE1O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5icmVhaztcbmNhc2UgMTpyZXR1cm4gMTU7XG5icmVhaztcbmNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wb3BTdGF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbmJyZWFrO1xuY2FzZSAzOnRoaXMuYmVnaW4oJ3JhdycpOyByZXR1cm4gMTU7XG5icmVhaztcbmNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBvcFN0YXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2hvdWxkIGJlIHVzaW5nIGB0aGlzLnRvcFN0YXRlKClgIGJlbG93LCBidXQgaXQgY3VycmVudGx5XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmV0dXJucyB0aGUgc2Vjb25kIHRvcCBpbnN0ZWFkIG9mIHRoZSBmaXJzdCB0b3AuIE9wZW5lZCBhblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlzc3VlIGFib3V0IGl0IGF0IGh0dHBzOi8vZ2l0aHViLmNvbS96YWFjaC9qaXNvbi9pc3N1ZXMvMjkxXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuY29uZGl0aW9uU3RhY2tbdGhpcy5jb25kaXRpb25TdGFjay5sZW5ndGgtMV0gPT09ICdyYXcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmlwKDUsIDkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdFTkRfUkFXX0JMT0NLJztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbmJyZWFrO1xuY2FzZSA1OiByZXR1cm4gMTU7IFxuYnJlYWs7XG5jYXNlIDY6XG4gIHRoaXMucG9wU3RhdGUoKTtcbiAgcmV0dXJuIDE0O1xuXG5icmVhaztcbmNhc2UgNzpyZXR1cm4gNjU7XG5icmVhaztcbmNhc2UgODpyZXR1cm4gNjg7XG5icmVhaztcbmNhc2UgOTogcmV0dXJuIDE5OyBcbmJyZWFrO1xuY2FzZSAxMDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBvcFN0YXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5iZWdpbigncmF3Jyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDIzO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG5icmVhaztcbmNhc2UgMTE6cmV0dXJuIDU1O1xuYnJlYWs7XG5jYXNlIDEyOnJldHVybiA2MDtcbmJyZWFrO1xuY2FzZSAxMzpyZXR1cm4gMjk7XG5icmVhaztcbmNhc2UgMTQ6cmV0dXJuIDQ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yLDIzLDI0LDI1LDI2LDI3LDI4LDI5LDMwLDMxLDMyLDMzLDM0LDM1LDM2LDM3LDM4LDM5LDQwLDQxLDQyLDQzLDQ0XSxcImluY2x1c2l2ZVwiOmZhbHNlfSxcImVtdVwiOntcInJ1bGVzXCI6WzJdLFwiaW5jbHVzaXZlXCI6ZmFsc2V9LFwiY29tXCI6e1wicnVsZXNcIjpbNl0sXCJpbmNsdXNpdmVcIjpmYWxzZX0sXCJyYXdcIjp7XCJydWxlc1wiOlszLDQsNV0sXCJpbmNsdXNpdmVcIjpmYWxzZX0sXCJJTklUSUFMXCI6e1wicnVsZXNcIjpbMCwxLDQ0XSxcImluY2x1c2l2ZVwiOnRydWV9fTtcbnJldHVybiBsZXhlcjt9KSgpXG5wYXJzZXIubGV4ZXIgPSBsZXhlcjtcbmZ1bmN0aW9uIFBhcnNlciAoKSB7IHRoaXMueXkgPSB7fTsgfVBhcnNlci5wcm90b3R5cGUgPSBwYXJzZXI7cGFyc2VyLlBhcnNlciA9IFBhcnNlcjtcbnJldHVybiBuZXcgUGFyc2VyO1xufSkoKTtleHBvcnQgZGVmYXVsdCBoYW5kbGViYXJzO1xuIl19 -; -define('handlebars/compiler/visitor',['exports', 'module', '../exception'], function (exports, module, _exception) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - function Visitor() { - this.parents = []; - } - - Visitor.prototype = { - constructor: Visitor, - mutating: false, - - // Visits a given value. If mutating, will replace the value if necessary. - acceptKey: function acceptKey(node, name) { - var value = this.accept(node[name]); - if (this.mutating) { - // Hacky sanity check: This may have a few false positives for type for the helper - // methods but will generally do the right thing without a lot of overhead. - if (value && !Visitor.prototype[value.type]) { - throw new _Exception['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); - } - node[name] = value; - } - }, - - // Performs an accept operation with added sanity check to ensure - // required keys are not removed. - acceptRequired: function acceptRequired(node, name) { - this.acceptKey(node, name); - - if (!node[name]) { - throw new _Exception['default'](node.type + ' requires ' + name); - } - }, - - // Traverses a given array. If mutating, empty respnses will be removed - // for child elements. - acceptArray: function acceptArray(array) { - for (var i = 0, l = array.length; i < l; i++) { - this.acceptKey(array, i); - - if (!array[i]) { - array.splice(i, 1); - i--; - l--; - } - } - }, - - accept: function accept(object) { - if (!object) { - return; - } - - /* istanbul ignore next: Sanity code */ - if (!this[object.type]) { - throw new _Exception['default']('Unknown type: ' + object.type, object); - } - - if (this.current) { - this.parents.unshift(this.current); - } - this.current = object; - - var ret = this[object.type](object); - - this.current = this.parents.shift(); - - if (!this.mutating || ret) { - return ret; - } else if (ret !== false) { - return object; - } - }, - - Program: function Program(program) { - this.acceptArray(program.body); - }, - - MustacheStatement: visitSubExpression, - Decorator: visitSubExpression, - - BlockStatement: visitBlock, - DecoratorBlock: visitBlock, - - PartialStatement: visitPartial, - PartialBlockStatement: function PartialBlockStatement(partial) { - visitPartial.call(this, partial); - - this.acceptKey(partial, 'program'); - }, - - ContentStatement: function ContentStatement() /* content */{}, - CommentStatement: function CommentStatement() /* comment */{}, - - SubExpression: visitSubExpression, - - PathExpression: function PathExpression() /* path */{}, - - StringLiteral: function StringLiteral() /* string */{}, - NumberLiteral: function NumberLiteral() /* number */{}, - BooleanLiteral: function BooleanLiteral() /* bool */{}, - UndefinedLiteral: function UndefinedLiteral() /* literal */{}, - NullLiteral: function NullLiteral() /* literal */{}, - - Hash: function Hash(hash) { - this.acceptArray(hash.pairs); - }, - HashPair: function HashPair(pair) { - this.acceptRequired(pair, 'value'); - } - }; - - function visitSubExpression(mustache) { - this.acceptRequired(mustache, 'path'); - this.acceptArray(mustache.params); - this.acceptKey(mustache, 'hash'); - } - function visitBlock(block) { - visitSubExpression.call(this, block); - - this.acceptKey(block, 'program'); - this.acceptKey(block, 'inverse'); - } - function visitPartial(partial) { - this.acceptRequired(partial, 'name'); - this.acceptArray(partial.params); - this.acceptKey(partial, 'hash'); - } -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HByZXNzaW9uLmNhbGwodGhpcywgYmxvY2spO1xuXG4gIHRoaXMuYWNjZXB0S2V5KGJsb2NrLCAncHJvZ3JhbScpO1xuICB0aGlzLmFjY2VwdEtleShibG9jaywgJ2ludmVyc2UnKTtcbn1cbmZ1bmN0aW9uIHZpc2l0UGFydGlhbChwYXJ0aWFsKSB7XG4gIHRoaXMuYWNjZXB0UmVxdWlyZWQocGFydGlhbCwgJ25hbWUnKTtcbiAgdGhpcy5hY2NlcHRBcnJheShwYXJ0aWFsLnBhcmFtcyk7XG4gIHRoaXMuYWNjZXB0S2V5KHBhcnRpYWwsICdoYXNoJyk7XG59XG5cbmV4cG9ydCBkZWZhdWx0IFZpc2l0b3I7XG4iXX0= -; -define('handlebars/compiler/whitespace-control',['exports', 'module', './visitor'], function (exports, module, _visitor) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Visitor = _interopRequireDefault(_visitor); - - function WhitespaceControl() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - - this.options = options; - } - WhitespaceControl.prototype = new _Visitor['default'](); - - WhitespaceControl.prototype.Program = function (program) { - var doStandalone = !this.options.ignoreStandalone; - - var isRoot = !this.isRootSeen; - this.isRootSeen = true; - - var body = program.body; - for (var i = 0, l = body.length; i < l; i++) { - var current = body[i], - strip = this.accept(current); - - if (!strip) { - continue; - } - - var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), - _isNextWhitespace = isNextWhitespace(body, i, isRoot), - openStandalone = strip.openStandalone && _isPrevWhitespace, - closeStandalone = strip.closeStandalone && _isNextWhitespace, - inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; - - if (strip.close) { - omitRight(body, i, true); - } - if (strip.open) { - omitLeft(body, i, true); - } - - if (doStandalone && inlineStandalone) { - omitRight(body, i); - - if (omitLeft(body, i)) { - // If we are on a standalone node, save the indent info for partials - if (current.type === 'PartialStatement') { - // Pull out the whitespace from the final line - current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; - } - } - } - if (doStandalone && openStandalone) { - omitRight((current.program || current.inverse).body); - - // Strip out the previous content node if it's whitespace only - omitLeft(body, i); - } - if (doStandalone && closeStandalone) { - // Always strip the next node - omitRight(body, i); - - omitLeft((current.inverse || current.program).body); - } - } - - return program; - }; - - WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) { - this.accept(block.program); - this.accept(block.inverse); - - // Find the inverse program that is involed with whitespace stripping. - var program = block.program || block.inverse, - inverse = block.program && block.inverse, - firstInverse = inverse, - lastInverse = inverse; - - if (inverse && inverse.chained) { - firstInverse = inverse.body[0].program; - - // Walk the inverse chain to find the last inverse that is actually in the chain. - while (lastInverse.chained) { - lastInverse = lastInverse.body[lastInverse.body.length - 1].program; - } - } - - var strip = { - open: block.openStrip.open, - close: block.closeStrip.close, - - // Determine the standalone candiacy. Basically flag our content as being possibly standalone - // so our parent can determine if we actually are standalone - openStandalone: isNextWhitespace(program.body), - closeStandalone: isPrevWhitespace((firstInverse || program).body) - }; - - if (block.openStrip.close) { - omitRight(program.body, null, true); - } - - if (inverse) { - var inverseStrip = block.inverseStrip; - - if (inverseStrip.open) { - omitLeft(program.body, null, true); - } - - if (inverseStrip.close) { - omitRight(firstInverse.body, null, true); - } - if (block.closeStrip.open) { - omitLeft(lastInverse.body, null, true); - } - - // Find standalone else statments - if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { - omitLeft(program.body); - omitRight(firstInverse.body); - } - } else if (block.closeStrip.open) { - omitLeft(program.body, null, true); - } - - return strip; - }; - - WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) { - return mustache.strip; - }; - - WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) { - /* istanbul ignore next */ - var strip = node.strip || {}; - return { - inlineStandalone: true, - open: strip.open, - close: strip.close - }; - }; - - function isPrevWhitespace(body, i, isRoot) { - if (i === undefined) { - i = body.length; - } - - // Nodes that end with newlines are considered whitespace (but are special - // cased for strip operations) - var prev = body[i - 1], - sibling = body[i - 2]; - if (!prev) { - return isRoot; - } - - if (prev.type === 'ContentStatement') { - return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); - } - } - function isNextWhitespace(body, i, isRoot) { - if (i === undefined) { - i = -1; - } - - var next = body[i + 1], - sibling = body[i + 2]; - if (!next) { - return isRoot; - } - - if (next.type === 'ContentStatement') { - return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); - } - } - - // Marks the node to the right of the position as omitted. - // I.e. {{foo}}' ' will mark the ' ' node as omitted. - // - // If i is undefined, then the first child will be marked as such. - // - // If mulitple is truthy then all whitespace will be stripped out until non-whitespace - // content is met. - function omitRight(body, i, multiple) { - var current = body[i == null ? 0 : i + 1]; - if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) { - return; - } - - var original = current.value; - current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ''); - current.rightStripped = current.value !== original; - } - - // Marks the node to the left of the position as omitted. - // I.e. ' '{{foo}} will mark the ' ' node as omitted. - // - // If i is undefined then the last child will be marked as such. - // - // If mulitple is truthy then all whitespace will be stripped out until non-whitespace - // content is met. - function omitLeft(body, i, multiple) { - var current = body[i == null ? body.length - 1 : i - 1]; - if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) { - return; - } - - // We omit the last node if it's whitespace only and not preceded by a non-content node. - var original = current.value; - current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ''); - current.leftStripped = current.value !== original; - return current.leftStripped; - } - - module.exports = WhitespaceControl; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW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IC8vIFdlIG9taXQgdGhlIGxhc3Qgbm9kZSBpZiBpdCdzIHdoaXRlc3BhY2Ugb25seSBhbmQgbm90IHByZWNlZGVkIGJ5IGEgbm9uLWNvbnRlbnQgbm9kZS5cbiAgbGV0IG9yaWdpbmFsID0gY3VycmVudC52YWx1ZTtcbiAgY3VycmVudC52YWx1ZSA9IGN1cnJlbnQudmFsdWUucmVwbGFjZShtdWx0aXBsZSA/IC9cXHMrJC8gOiAvWyBcXHRdKyQvLCAnJyk7XG4gIGN1cnJlbnQubGVmdFN0cmlwcGVkID0gY3VycmVudC52YWx1ZSAhPT0gb3JpZ2luYWw7XG4gIHJldHVybiBjdXJyZW50LmxlZnRTdHJpcHBlZDtcbn1cblxuZXhwb3J0IGRlZmF1bHQgV2hpdGVzcGFjZUNvbnRyb2w7XG4iXX0= -; -define('handlebars/compiler/helpers',['exports', '../exception'], function (exports, _exception) { - 'use strict'; - - exports.__esModule = true; - exports.SourceLocation = SourceLocation; - exports.id = id; - exports.stripFlags = stripFlags; - exports.stripComment = stripComment; - exports.preparePath = preparePath; - exports.prepareMustache = prepareMustache; - exports.prepareRawBlock = prepareRawBlock; - exports.prepareBlock = prepareBlock; - exports.prepareProgram = prepareProgram; - exports.preparePartialBlock = preparePartialBlock; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - function validateClose(open, close) { - close = close.path ? close.path.original : close; - - if (open.path.original !== close) { - var errorNode = { loc: open.path.loc }; - - throw new _Exception['default'](open.path.original + " doesn't match " + close, errorNode); - } - } - - function SourceLocation(source, locInfo) { - this.source = source; - this.start = { - line: locInfo.first_line, - column: locInfo.first_column - }; - this.end = { - line: locInfo.last_line, - column: locInfo.last_column - }; - } - - function id(token) { - if (/^\[.*\]$/.test(token)) { - return token.substring(1, token.length - 1); - } else { - return token; - } - } - - function stripFlags(open, close) { - return { - open: open.charAt(2) === '~', - close: close.charAt(close.length - 3) === '~' - }; - } - - function stripComment(comment) { - return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, ''); - } - - function preparePath(data, parts, loc) { - loc = this.locInfo(loc); - - var original = data ? '@' : '', - dig = [], - depth = 0; - - for (var i = 0, l = parts.length; i < l; i++) { - var part = parts[i].part, - - // If we have [] syntax then we do not treat path references as operators, - // i.e. foo.[this] resolves to approximately context.foo['this'] - isLiteral = parts[i].original !== part; - original += (parts[i].separator || '') + part; - - if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { - if (dig.length > 0) { - throw new _Exception['default']('Invalid path: ' + original, { loc: loc }); - } else if (part === '..') { - depth++; - } - } else { - dig.push(part); - } - } - - return { - type: 'PathExpression', - data: data, - depth: depth, - parts: dig, - original: original, - loc: loc - }; - } - - function prepareMustache(path, params, hash, open, strip, locInfo) { - // Must use charAt to support IE pre-10 - var escapeFlag = open.charAt(3) || open.charAt(2), - escaped = escapeFlag !== '{' && escapeFlag !== '&'; - - var decorator = /\*/.test(open); - return { - type: decorator ? 'Decorator' : 'MustacheStatement', - path: path, - params: params, - hash: hash, - escaped: escaped, - strip: strip, - loc: this.locInfo(locInfo) - }; - } - - function prepareRawBlock(openRawBlock, contents, close, locInfo) { - validateClose(openRawBlock, close); - - locInfo = this.locInfo(locInfo); - var program = { - type: 'Program', - body: contents, - strip: {}, - loc: locInfo - }; - - return { - type: 'BlockStatement', - path: openRawBlock.path, - params: openRawBlock.params, - hash: openRawBlock.hash, - program: program, - openStrip: {}, - inverseStrip: {}, - closeStrip: {}, - loc: locInfo - }; - } - - function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { - if (close && close.path) { - validateClose(openBlock, close); - } - - var decorator = /\*/.test(openBlock.open); - - program.blockParams = openBlock.blockParams; - - var inverse = undefined, - inverseStrip = undefined; - - if (inverseAndProgram) { - if (decorator) { - throw new _Exception['default']('Unexpected inverse block on decorator', inverseAndProgram); - } - - if (inverseAndProgram.chain) { - inverseAndProgram.program.body[0].closeStrip = close.strip; - } - - inverseStrip = inverseAndProgram.strip; - inverse = inverseAndProgram.program; - } - - if (inverted) { - inverted = inverse; - inverse = program; - program = inverted; - } - - return { - type: decorator ? 'DecoratorBlock' : 'BlockStatement', - path: openBlock.path, - params: openBlock.params, - hash: openBlock.hash, - program: program, - inverse: inverse, - openStrip: openBlock.strip, - inverseStrip: inverseStrip, - closeStrip: close && close.strip, - loc: this.locInfo(locInfo) - }; - } - - function prepareProgram(statements, loc) { - if (!loc && statements.length) { - var firstLoc = statements[0].loc, - lastLoc = statements[statements.length - 1].loc; - - /* istanbul ignore else */ - if (firstLoc && lastLoc) { - loc = { - source: firstLoc.source, - start: { - line: firstLoc.start.line, - column: firstLoc.start.column - }, - end: { - line: lastLoc.end.line, - column: lastLoc.end.column - } - }; - } - } - - return { - type: 'Program', - body: statements, - strip: {}, - loc: loc - }; - } - - function preparePartialBlock(open, program, close, locInfo) { - validateClose(open, close); - - return { - type: 'PartialBlockStatement', - name: open.path, - params: open.params, - hash: open.hash, - program: program, - openStrip: open.strip, - closeStrip: close && close.strip, - loc: this.locInfo(locInfo) - }; - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2hlbHBlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFFQSxXQUFTLGFBQWEsQ0FBQyxJQUFJLEVBQUUsS0FBSyxFQUFFO0FBQ2xDLFNBQUssR0FBRyxLQUFLLENBQUMsSUFBSSxHQUFHLEtBQUssQ0FBQyxJQUFJLENBQUMsUUFBUSxHQUFHLEtBQUssQ0FBQzs7QUFFakQsUUFBSSxJQUFJLENBQUMsSUFBSSxDQUFDLFFBQVEsS0FBSyxLQUFLLEVBQUU7QUFDaEMsVUFBSSxTQUFTLEdBQUcsRUFBRSxHQ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V0dXJuIHtcbiAgICB0eXBlOiAnUHJvZ3JhbScsXG4gICAgYm9keTogc3RhdGVtZW50cyxcbiAgICBzdHJpcDoge30sXG4gICAgbG9jOiBsb2NcbiAgfTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHByZXBhcmVQYXJ0aWFsQmxvY2sob3BlbiwgcHJvZ3JhbSwgY2xvc2UsIGxvY0luZm8pIHtcbiAgdmFsaWRhdGVDbG9zZShvcGVuLCBjbG9zZSk7XG5cbiAgcmV0dXJuIHtcbiAgICB0eXBlOiAnUGFydGlhbEJsb2NrU3RhdGVtZW50JyxcbiAgICBuYW1lOiBvcGVuLnBhdGgsXG4gICAgcGFyYW1zOiBvcGVuLnBhcmFtcyxcbiAgICBoYXNoOiBvcGVuLmhhc2gsXG4gICAgcHJvZ3JhbSxcbiAgICBvcGVuU3RyaXA6IG9wZW4uc3RyaXAsXG4gICAgY2xvc2VTdHJpcDogY2xvc2UgJiYgY2xvc2Uuc3RyaXAsXG4gICAgbG9jOiB0aGlzLmxvY0luZm8obG9jSW5mbylcbiAgfTtcbn1cbiJdfQ== -; -define('handlebars/compiler/base',['exports', './parser', './whitespace-control', './helpers', '../utils'], function (exports, _parser, _whitespaceControl, _helpers, _utils) { - 'use strict'; - - exports.__esModule = true; - exports.parseWithoutProcessing = parseWithoutProcessing; - exports.parse = parse; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _parser2 = _interopRequireDefault(_parser); - - var _WhitespaceControl = _interopRequireDefault(_whitespaceControl); - - exports.parser = _parser2['default']; - - var yy = {}; - _utils.extend(yy, _helpers); - - function parseWithoutProcessing(input, options) { - // Just return if an already-compiled AST was passed in. - if (input.type === 'Program') { - return input; - } - - _parser2['default'].yy = yy; - - // Altering the shared object here, but this is ok as parser is a sync operation - yy.locInfo = function (locInfo) { - return new yy.SourceLocation(options && options.srcName, locInfo); - }; - - var ast = _parser2['default'].parse(input); - - return ast; - } - - function parse(input, options) { - var ast = parseWithoutProcessing(input, options); - var strip = new _WhitespaceControl['default'](options); - - return strip.accept(ast); - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7VUFLUyxNQUFNOztBQUVmLE1BQUksRUFBRSxHQUFHLEVBQUUsQ0FBQztBQUNaLFNBTFMsTUFBTSxDQUtSLEVBQUUsV0FBVSxDQUFDOztBQUViLFdBQVMsc0JBQXNCLENBQUMsS0FBSyxFQUFFLE9BQU8sRUFBRTs7QUFFckQsUUFBSSxLQUFLLENBQUMsSUFBSSxLQUFLLFNBQVMsRUFBRTtBQUM1QixhQUFPLEtBQUssQ0FBQztLQUNkOztBQUVELHdCQUFPLEVBQUUsR0FBRyxFQUFFLENBQUM7OztBQUdmLE1BQUUsQ0FBQyxPQUFPLEdBQUcsVUFBUyxPQUFPLEVBQUU7QUFDN0IsYUFBTyxJQUFJLEVBQUUsQ0FBQyxjQUFjLENBQUMsT0FBTyxJQUFJLE9BQU8sQ0FBQyxPQUFPLEVBQUUsT0FBTyxDQUFDLENBQUM7S0FDbkUsQ0FBQzs7QUFFRixRQUFJLEdBQUcsR0FBRyxvQkFBTyxLQUFLLENBQUMsS0FBSyxDQUFDLENBQUM7O0FBRTlCLFdBQU8sR0FBRyxDQUFDO0dBQ1o7O0FBRU0sV0FBUyxLQUFLLENBQUMsS0FBSyxFQUFFLE9BQU8sRUFBRTtBQUNwQyxRQUFJLEdBQUcsR0FBRyxzQkFBc0IsQ0FBQyxLQUFLLEVBQUUsT0FBTyxDQUFDLENBQUM7QUFDakQsUUFBSSxLQUFLLEdBQUcsa0NBQXNCLE9BQU8sQ0FBQyxDQUFDOztBQUUzQyxXQUFPLEtBQUssQ0FBQyxNQUFNLENB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pdGhvdXRQcm9jZXNzaW5nKGlucHV0LCBvcHRpb25zKTtcbiAgbGV0IHN0cmlwID0gbmV3IFdoaXRlc3BhY2VDb250cm9sKG9wdGlvbnMpO1xuXG4gIHJldHVybiBzdHJpcC5hY2NlcHQoYXN0KTtcbn1cbiJdfQ== -; -define('handlebars/compiler/compiler',['exports', '../exception', '../utils', './ast'], function (exports, _exception, _utils, _ast) { - /* eslint-disable new-cap */ - - 'use strict'; - - exports.__esModule = true; - exports.Compiler = Compiler; - exports.precompile = precompile; - exports.compile = compile; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - var _AST = _interopRequireDefault(_ast); - - var slice = [].slice; - - function Compiler() {} - - // the foundHelper register will disambiguate helper lookup from finding a - // function in a context. This is necessary for mustache compatibility, which - // requires that context functions in blocks are evaluated by blockHelperMissing, - // and then proceed as if the resulting value was provided to blockHelperMissing. - - Compiler.prototype = { - compiler: Compiler, - - equals: function equals(other) { - var len = this.opcodes.length; - if (other.opcodes.length !== len) { - return false; - } - - for (var i = 0; i < len; i++) { - var opcode = this.opcodes[i], - otherOpcode = other.opcodes[i]; - if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { - return false; - } - } - - // We know that length is the same between the two arrays because they are directly tied - // to the opcode behavior above. - len = this.children.length; - for (var i = 0; i < len; i++) { - if (!this.children[i].equals(other.children[i])) { - return false; - } - } - - return true; - }, - - guid: 0, - - compile: function compile(program, options) { - this.sourceNode = []; - this.opcodes = []; - this.children = []; - this.options = options; - this.stringParams = options.stringParams; - this.trackIds = options.trackIds; - - options.blockParams = options.blockParams || []; - - options.knownHelpers = _utils.extend(Object.create(null), { - helperMissing: true, - blockHelperMissing: true, - each: true, - 'if': true, - unless: true, - 'with': true, - log: true, - lookup: true - }, options.knownHelpers); - - return this.accept(program); - }, - - compileProgram: function compileProgram(program) { - var childCompiler = new this.compiler(), - // eslint-disable-line new-cap - result = childCompiler.compile(program, this.options), - guid = this.guid++; - - this.usePartial = this.usePartial || result.usePartial; - - this.children[guid] = result; - this.useDepths = this.useDepths || result.useDepths; - - return guid; - }, - - accept: function accept(node) { - /* istanbul ignore next: Sanity code */ - if (!this[node.type]) { - throw new _Exception['default']('Unknown type: ' + node.type, node); - } - - this.sourceNode.unshift(node); - var ret = this[node.type](node); - this.sourceNode.shift(); - return ret; - }, - - Program: function Program(program) { - this.options.blockParams.unshift(program.blockParams); - - var body = program.body, - bodyLength = body.length; - for (var i = 0; i < bodyLength; i++) { - this.accept(body[i]); - } - - this.options.blockParams.shift(); - - this.isSimple = bodyLength === 1; - this.blockParams = program.blockParams ? program.blockParams.length : 0; - - return this; - }, - - BlockStatement: function BlockStatement(block) { - transformLiteralToPath(block); - - var program = block.program, - inverse = block.inverse; - - program = program && this.compileProgram(program); - inverse = inverse && this.compileProgram(inverse); - - var type = this.classifySexpr(block); - - if (type === 'helper') { - this.helperSexpr(block, program, inverse); - } else if (type === 'simple') { - this.simpleSexpr(block); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('blockValue', block.path.original); - } else { - this.ambiguousSexpr(block, program, inverse); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('ambiguousBlockValue'); - } - - this.opcode('append'); - }, - - DecoratorBlock: function DecoratorBlock(decorator) { - var program = decorator.program && this.compileProgram(decorator.program); - var params = this.setupFullMustacheParams(decorator, program, undefined), - path = decorator.path; - - this.useDecorators = true; - this.opcode('registerDecorator', params.length, path.original); - }, - - PartialStatement: function PartialStatement(partial) { - this.usePartial = true; - - var program = partial.program; - if (program) { - program = this.compileProgram(partial.program); - } - - var params = partial.params; - if (params.length > 1) { - throw new _Exception['default']('Unsupported number of partial arguments: ' + params.length, partial); - } else if (!params.length) { - if (this.options.explicitPartialContext) { - this.opcode('pushLiteral', 'undefined'); - } else { - params.push({ type: 'PathExpression', parts: [], depth: 0 }); - } - } - - var partialName = partial.name.original, - isDynamic = partial.name.type === 'SubExpression'; - if (isDynamic) { - this.accept(partial.name); - } - - this.setupFullMustacheParams(partial, program, undefined, true); - - var indent = partial.indent || ''; - if (this.options.preventIndent && indent) { - this.opcode('appendContent', indent); - indent = ''; - } - - this.opcode('invokePartial', isDynamic, partialName, indent); - this.opcode('append'); - }, - PartialBlockStatement: function PartialBlockStatement(partialBlock) { - this.PartialStatement(partialBlock); - }, - - MustacheStatement: function MustacheStatement(mustache) { - this.SubExpression(mustache); - - if (mustache.escaped && !this.options.noEscape) { - this.opcode('appendEscaped'); - } else { - this.opcode('append'); - } - }, - Decorator: function Decorator(decorator) { - this.DecoratorBlock(decorator); - }, - - ContentStatement: function ContentStatement(content) { - if (content.value) { - this.opcode('appendContent', content.value); - } - }, - - CommentStatement: function CommentStatement() {}, - - SubExpression: function SubExpression(sexpr) { - transformLiteralToPath(sexpr); - var type = this.classifySexpr(sexpr); - - if (type === 'simple') { - this.simpleSexpr(sexpr); - } else if (type === 'helper') { - this.helperSexpr(sexpr); - } else { - this.ambiguousSexpr(sexpr); - } - }, - ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { - var path = sexpr.path, - name = path.parts[0], - isBlock = program != null || inverse != null; - - this.opcode('getContext', path.depth); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - path.strict = true; - this.accept(path); - - this.opcode('invokeAmbiguous', name, isBlock); - }, - - simpleSexpr: function simpleSexpr(sexpr) { - var path = sexpr.path; - path.strict = true; - this.accept(path); - this.opcode('resolvePossibleLambda'); - }, - - helperSexpr: function helperSexpr(sexpr, program, inverse) { - var params = this.setupFullMustacheParams(sexpr, program, inverse), - path = sexpr.path, - name = path.parts[0]; - - if (this.options.knownHelpers[name]) { - this.opcode('invokeKnownHelper', params.length, name); - } else if (this.options.knownHelpersOnly) { - throw new _Exception['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); - } else { - path.strict = true; - path.falsy = true; - - this.accept(path); - this.opcode('invokeHelper', params.length, path.original, _AST['default'].helpers.simpleId(path)); - } - }, - - PathExpression: function PathExpression(path) { - this.addDepth(path.depth); - this.opcode('getContext', path.depth); - - var name = path.parts[0], - scoped = _AST['default'].helpers.scopedId(path), - blockParamId = !path.depth && !scoped && this.blockParamIndex(name); - - if (blockParamId) { - this.opcode('lookupBlockParam', blockParamId, path.parts); - } else if (!name) { - // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` - this.opcode('pushContext'); - } else if (path.data) { - this.options.data = true; - this.opcode('lookupData', path.depth, path.parts, path.strict); - } else { - this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped); - } - }, - - StringLiteral: function StringLiteral(string) { - this.opcode('pushString', string.value); - }, - - NumberLiteral: function NumberLiteral(number) { - this.opcode('pushLiteral', number.value); - }, - - BooleanLiteral: function BooleanLiteral(bool) { - this.opcode('pushLiteral', bool.value); - }, - - UndefinedLiteral: function UndefinedLiteral() { - this.opcode('pushLiteral', 'undefined'); - }, - - NullLiteral: function NullLiteral() { - this.opcode('pushLiteral', 'null'); - }, - - Hash: function Hash(hash) { - var pairs = hash.pairs, - i = 0, - l = pairs.length; - - this.opcode('pushHash'); - - for (; i < l; i++) { - this.pushParam(pairs[i].value); - } - while (i--) { - this.opcode('assignToHash', pairs[i].key); - } - this.opcode('popHash'); - }, - - // HELPERS - opcode: function opcode(name) { - this.opcodes.push({ - opcode: name, - args: slice.call(arguments, 1), - loc: this.sourceNode[0].loc - }); - }, - - addDepth: function addDepth(depth) { - if (!depth) { - return; - } - - this.useDepths = true; - }, - - classifySexpr: function classifySexpr(sexpr) { - var isSimple = _AST['default'].helpers.simpleId(sexpr.path); - - var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); - - // a mustache is an eligible helper if: - // * its id is simple (a single part, not `this` or `..`) - var isHelper = !isBlockParam && _AST['default'].helpers.helperExpression(sexpr); - - // if a mustache is an eligible helper but not a definite - // helper, it is ambiguous, and will be resolved in a later - // pass or at runtime. - var isEligible = !isBlockParam && (isHelper || isSimple); - - // if ambiguous, we can possibly resolve the ambiguity now - // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. - if (isEligible && !isHelper) { - var _name = sexpr.path.parts[0], - options = this.options; - if (options.knownHelpers[_name]) { - isHelper = true; - } else if (options.knownHelpersOnly) { - isEligible = false; - } - } - - if (isHelper) { - return 'helper'; - } else if (isEligible) { - return 'ambiguous'; - } else { - return 'simple'; - } - }, - - pushParams: function pushParams(params) { - for (var i = 0, l = params.length; i < l; i++) { - this.pushParam(params[i]); - } - }, - - pushParam: function pushParam(val) { - var value = val.value != null ? val.value : val.original || ''; - - if (this.stringParams) { - if (value.replace) { - value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); - } - - if (val.depth) { - this.addDepth(val.depth); - } - this.opcode('getContext', val.depth || 0); - this.opcode('pushStringParam', value, val.type); - - if (val.type === 'SubExpression') { - // SubExpressions get evaluated and passed in - // in string params mode. - this.accept(val); - } - } else { - if (this.trackIds) { - var blockParamIndex = undefined; - if (val.parts && !_AST['default'].helpers.scopedId(val) && !val.depth) { - blockParamIndex = this.blockParamIndex(val.parts[0]); - } - if (blockParamIndex) { - var blockParamChild = val.parts.slice(1).join('.'); - this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); - } else { - value = val.original || value; - if (value.replace) { - value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, ''); - } - - this.opcode('pushId', val.type, value); - } - } - this.accept(val); - } - }, - - setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { - var params = sexpr.params; - this.pushParams(params); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - if (sexpr.hash) { - this.accept(sexpr.hash); - } else { - this.opcode('emptyHash', omitEmpty); - } - - return params; - }, - - blockParamIndex: function blockParamIndex(name) { - for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { - var blockParams = this.options.blockParams[depth], - param = blockParams && _utils.indexOf(blockParams, name); - if (blockParams && param >= 0) { - return [depth, param]; - } - } - } - }; - - function precompile(input, options, env) { - if (input == null || typeof input !== 'string' && input.type !== 'Program') { - throw new _Exception['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); - } - - options = options || {}; - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - var ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options); - return new env.JavaScriptCompiler().compile(environment, options); - } - - function compile(input, options, env) { - if (options === undefined) options = {}; - - if (input == null || typeof input !== 'string' && input.type !== 'Program') { - throw new _Exception['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); - } - - options = _utils.extend({}, options); - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - var compiled = undefined; - - function compileInput() { - var ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options), - templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); - return env.template(templateSpec); - } - - // Template is only compiled on first use and cached after that point. - function ret(context, execOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled.call(this, context, execOptions); - } - ret._setup = function (setupOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._setup(setupOptions); - }; - ret._child = function (i, data, blockParams, depths) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._child(i, data, blockParams, depths); - }; - return ret; - } - - function argEquals(a, b) { - if (a === b) { - return true; - } - - if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { - for (var i = 0; i < a.length; i++) { - if (!argEquals(a[i], b[i])) { - return false; - } - } - return true; - } - } - - function transformLiteralToPath(sexpr) { - if (!sexpr.path.parts) { - var literal = sexpr.path; - // Casting to string here to make false and 0 literal values play nicely with the rest - // of the system. - sexpr.path = { - type: 'PathExpression', - data: false, - depth: 0, - parts: [literal.original + ''], - original: literal.original + '', - loc: literal.loc - }; - } - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2NvbXBpbGVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBTUEsTUFBTSxLQUFLLEdBQUcsRUFBRSxDQUFDLEtBQUssQ0FBQzs7QUFFaEIsV0FBUyxRQUFRLEdBQUcsRUFBRTs7Ozs7OztBQU83QixVQUFRLENBQUMsU0FBUyxHQUFHO0FBQ25CLFlBQVEsRUFBRSxRQUFROztBQUVsQixVQUFNLEVBQUUsZ0JBQVMsS0FBSyxFQUFFO0FBQ3RCLFVBQUksR0FBRyxHQUFHLElBQUksQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDO0FBQzlCLFVBQUksS0FBSyxDQUFDLE9BQU8sQ0FBQyxNQUFNLEtBQUssR0FBRyxFQUFFO0FBQ2hDLGVBQU8sS0FBSyxDQUFDO09BQ2Q7O0FBRUQsV0FBSyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLEdBQUcsRUFBRSxDQUFDLEVBQUUsRUFBRTtBQUM1QixZQUFJLE1BQU0sR0FBRyxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQztZQUMxQixXQUFXLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUNqQyxZQUNFLE1BQU0sQ0FBQyxNQUFNLEtBQUssV0FBVyxDQUFDLE1BQU0sSUFDcEMsQ0FBQyxTQUFTLENBQUMsTUFBTSxDQUFDLElBQUksRUFBRSxXQUFXLENBQUMsSUFBSSxDQUFDLEVBQ3pDO0FBQ0EsaUJBQU8sS0FBSyxDQUFDO1NBQ2Q7T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GggPT09IGIubGVuZ3RoKSB7XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhLmxlbmd0aDsgaSsrKSB7XG4gICAgICBpZiAoIWFyZ0VxdWFscyhhW2ldLCBiW2ldKSkge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiB0cnVlO1xuICB9XG59XG5cbmZ1bmN0aW9uIHRyYW5zZm9ybUxpdGVyYWxUb1BhdGgoc2V4cHIpIHtcbiAgaWYgKCFzZXhwci5wYXRoLnBhcnRzKSB7XG4gICAgbGV0IGxpdGVyYWwgPSBzZXhwci5wYXRoO1xuICAgIC8vIENhc3RpbmcgdG8gc3RyaW5nIGhlcmUgdG8gbWFrZSBmYWxzZSBhbmQgMCBsaXRlcmFsIHZhbHVlcyBwbGF5IG5pY2VseSB3aXRoIHRoZSByZXN0XG4gICAgLy8gb2YgdGhlIHN5c3RlbS5cbiAgICBzZXhwci5wYXRoID0ge1xuICAgICAgdHlwZTogJ1BhdGhFeHByZXNzaW9uJyxcbiAgICAgIGRhdGE6IGZhbHNlLFxuICAgICAgZGVwdGg6IDAsXG4gICAgICBwYXJ0czogW2xpdGVyYWwub3JpZ2luYWwgKyAnJ10sXG4gICAgICBvcmlnaW5hbDogbGl0ZXJhbC5vcmlnaW5hbCArICcnLFxuICAgICAgbG9jOiBsaXRlcmFsLmxvY1xuICAgIH07XG4gIH1cbn1cbiJdfQ== -; -define('handlebars/compiler/code-gen',['exports', 'module', '../utils'], function (exports, module, _utils) { - /* global define */ - 'use strict'; - - var SourceNode = undefined; - - try { - /* istanbul ignore next */ - if (typeof define !== 'function' || !define.amd) { - // We don't support this in AMD environments. For these environments, we asusme that - // they are running on the browser and thus have no need for the source-map library. - var SourceMap = require('source-map'); - SourceNode = SourceMap.SourceNode; - } - } catch (err) {} - /* NOP */ - - /* istanbul ignore if: tested but not covered in istanbul due to dist build */ - if (!SourceNode) { - SourceNode = function (line, column, srcFile, chunks) { - this.src = ''; - if (chunks) { - this.add(chunks); - } - }; - /* istanbul ignore next */ - SourceNode.prototype = { - add: function add(chunks) { - if (_utils.isArray(chunks)) { - chunks = chunks.join(''); - } - this.src += chunks; - }, - prepend: function prepend(chunks) { - if (_utils.isArray(chunks)) { - chunks = chunks.join(''); - } - this.src = chunks + this.src; - }, - toStringWithSourceMap: function toStringWithSourceMap() { - return { code: this.toString() }; - }, - toString: function toString() { - return this.src; - } - }; - } - - function castChunk(chunk, codeGen, loc) { - if (_utils.isArray(chunk)) { - var ret = []; - - for (var i = 0, len = chunk.length; i < len; i++) { - ret.push(codeGen.wrap(chunk[i], loc)); - } - return ret; - } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { - // Handle primitives that the SourceNode will throw up on - return chunk + ''; - } - return chunk; - } - - function CodeGen(srcFile) { - this.srcFile = srcFile; - this.source = []; - } - - CodeGen.prototype = { - isEmpty: function isEmpty() { - return !this.source.length; - }, - prepend: function prepend(source, loc) { - this.source.unshift(this.wrap(source, loc)); - }, - push: function push(source, loc) { - this.source.push(this.wrap(source, loc)); - }, - - merge: function merge() { - var source = this.empty(); - this.each(function (line) { - source.add([' ', line, '\n']); - }); - return source; - }, - - each: function each(iter) { - for (var i = 0, len = this.source.length; i < len; i++) { - iter(this.source[i]); - } - }, - - empty: function empty() { - var loc = this.currentLocation || { start: {} }; - return new SourceNode(loc.start.line, loc.start.column, this.srcFile); - }, - wrap: function wrap(chunk) { - var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1]; - - if (chunk instanceof SourceNode) { - return chunk; - } - - chunk = castChunk(chunk, this, loc); - - return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); - }, - - functionCall: function functionCall(fn, type, params) { - params = this.generateList(params); - return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); - }, - - quotedString: function quotedString(str) { - return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 - .replace(/\u2029/g, '\\u2029') + '"'; - }, - - objectLiteral: function objectLiteral(obj) { - // istanbul ignore next - - var _this = this; - - var pairs = []; - - Object.keys(obj).forEach(function (key) { - var value = castChunk(obj[key], _this); - if (value !== 'undefined') { - pairs.push([_this.quotedString(key), ':', value]); - } - }); - - var ret = this.generateList(pairs); - ret.prepend('{'); - ret.add('}'); - return ret; - }, - - generateList: function generateList(entries) { - var ret = this.empty(); - - for (var i = 0, len = entries.length; i < len; i++) { - if (i) { - ret.add(','); - } - - ret.add(castChunk(entries[i], this)); - } - - return ret; - }, - - generateArray: function generateArray(entries) { - var ret = this.generateList(entries); - ret.prepend('['); - ret.add(']'); - - return ret; - } - }; - - module.exports = CodeGen; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2NvZGUtZ2VuLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFHQSxNQUFJLFVBQVUsWUFBQSxDQUFDOztBQUVmLE1BQUk7O0FBRUYsUUFBSSxPQUFPLE1BQU0sS0FBSyxVQUFVLElBQUksQ0FBQyxNQUFNLENBQUMsR0FBRyxFQUFFOzs7QUFHL0MsVUFBSSxTQUFTLEdBQUcsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQUFDO0FBQ3RDLGdCQUFVLEdBQUcsU0FBUyxDQUFDLFVBQVUsQ0FBQztLQUNuQztHQUNGLENBQUMsT0FBTyxHQUFHLEVBQUUsRUFFYjs7OztBQUFBLEFBR0QsTUFBSSxDQUFDLFVBQVUsRUFBRTtBQUNmLGNBQVUsR0FBRyxVQUFTLElBQUksRUFBRSxNQUFNLEVBQUUsT0FBTyxFQUFFLE1BQU0sRUFBRTtBQUNuRCxVQUFJLENBQUMsR0FBRyxHQUFHLEVBQ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mV0LmFkZCgnLCcpO1xuICAgICAgfVxuXG4gICAgICByZXQuYWRkKGNhc3RDaHVuayhlbnRyaWVzW2ldLCB0aGlzKSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHJldDtcbiAgfSxcblxuICBnZW5lcmF0ZUFycmF5OiBmdW5jdGlvbihlbnRyaWVzKSB7XG4gICAgbGV0IHJldCA9IHRoaXMuZ2VuZXJhdGVMaXN0KGVudHJpZXMpO1xuICAgIHJldC5wcmVwZW5kKCdbJyk7XG4gICAgcmV0LmFkZCgnXScpO1xuXG4gICAgcmV0dXJuIHJldDtcbiAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29kZUdlbjtcbiJdfQ== -; -define('handlebars/compiler/javascript-compiler',['exports', 'module', '../base', '../exception', '../utils', './code-gen'], function (exports, module, _base, _exception, _utils, _codeGen) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - var _CodeGen = _interopRequireDefault(_codeGen); - - function Literal(value) { - this.value = value; - } - - function JavaScriptCompiler() {} - - JavaScriptCompiler.prototype = { - // PUBLIC API: You can override these methods in a subclass to provide - // alternative compiled forms for name lookup and buffering semantics - nameLookup: function nameLookup(parent, name /*, type */) { - return this.internalNameLookup(parent, name); - }, - depthedLookup: function depthedLookup(name) { - return [this.aliasable('container.lookup'), '(depths, ', JSON.stringify(name), ')']; - }, - - compilerInfo: function compilerInfo() { - var revision = _base.COMPILER_REVISION, - versions = _base.REVISION_CHANGES[revision]; - return [revision, versions]; - }, - - appendToBuffer: function appendToBuffer(source, location, explicit) { - // Force a source as this simplifies the merge logic. - if (!_utils.isArray(source)) { - source = [source]; - } - source = this.source.wrap(source, location); - - if (this.environment.isSimple) { - return ['return ', source, ';']; - } else if (explicit) { - // This is a case where the buffer operation occurs as a child of another - // construct, generally braces. We have to explicitly output these buffer - // operations to ensure that the emitted code goes in the correct location. - return ['buffer += ', source, ';']; - } else { - source.appendToBuffer = true; - return source; - } - }, - - initializeBuffer: function initializeBuffer() { - return this.quotedString(''); - }, - // END PUBLIC API - internalNameLookup: function internalNameLookup(parent, name) { - this.lookupPropertyFunctionIsUsed = true; - return ['lookupProperty(', parent, ',', JSON.stringify(name), ')']; - }, - - lookupPropertyFunctionIsUsed: false, - - compile: function compile(environment, options, context, asObject) { - this.environment = environment; - this.options = options; - this.stringParams = this.options.stringParams; - this.trackIds = this.options.trackIds; - this.precompile = !asObject; - - this.name = this.environment.name; - this.isChild = !!context; - this.context = context || { - decorators: [], - programs: [], - environments: [] - }; - - this.preamble(); - - this.stackSlot = 0; - this.stackVars = []; - this.aliases = {}; - this.registers = { list: [] }; - this.hashes = []; - this.compileStack = []; - this.inlineStack = []; - this.blockParams = []; - - this.compileChildren(environment, options); - - this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat; - this.useBlockParams = this.useBlockParams || environment.useBlockParams; - - var opcodes = environment.opcodes, - opcode = undefined, - firstLoc = undefined, - i = undefined, - l = undefined; - - for (i = 0, l = opcodes.length; i < l; i++) { - opcode = opcodes[i]; - - this.source.currentLocation = opcode.loc; - firstLoc = firstLoc || opcode.loc; - this[opcode.opcode].apply(this, opcode.args); - } - - // Flush any trailing content that might be pending. - this.source.currentLocation = firstLoc; - this.pushSource(''); - - /* istanbul ignore next */ - if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { - throw new _Exception['default']('Compile completed with content left on stack'); - } - - if (!this.decorators.isEmpty()) { - this.useDecorators = true; - - this.decorators.prepend(['var decorators = container.decorators, ', this.lookupPropertyFunctionVarDeclaration(), ';\n']); - this.decorators.push('return fn;'); - - if (asObject) { - this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]); - } else { - this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n'); - this.decorators.push('}\n'); - this.decorators = this.decorators.merge(); - } - } else { - this.decorators = undefined; - } - - var fn = this.createFunctionContext(asObject); - if (!this.isChild) { - var ret = { - compiler: this.compilerInfo(), - main: fn - }; - - if (this.decorators) { - ret.main_d = this.decorators; // eslint-disable-line camelcase - ret.useDecorators = true; - } - - var _context = this.context; - var programs = _context.programs; - var decorators = _context.decorators; - - for (i = 0, l = programs.length; i < l; i++) { - if (programs[i]) { - ret[i] = programs[i]; - if (decorators[i]) { - ret[i + '_d'] = decorators[i]; - ret.useDecorators = true; - } - } - } - - if (this.environment.usePartial) { - ret.usePartial = true; - } - if (this.options.data) { - ret.useData = true; - } - if (this.useDepths) { - ret.useDepths = true; - } - if (this.useBlockParams) { - ret.useBlockParams = true; - } - if (this.options.compat) { - ret.compat = true; - } - - if (!asObject) { - ret.compiler = JSON.stringify(ret.compiler); - - this.source.currentLocation = { start: { line: 1, column: 0 } }; - ret = this.objectLiteral(ret); - - if (options.srcName) { - ret = ret.toStringWithSourceMap({ file: options.destName }); - ret.map = ret.map && ret.map.toString(); - } else { - ret = ret.toString(); - } - } else { - ret.compilerOptions = this.options; - } - - return ret; - } else { - return fn; - } - }, - - preamble: function preamble() { - // track the last context pushed into place to allow skipping the - // getContext opcode when it would be a noop - this.lastContext = 0; - this.source = new _CodeGen['default'](this.options.srcName); - this.decorators = new _CodeGen['default'](this.options.srcName); - }, - - createFunctionContext: function createFunctionContext(asObject) { - // istanbul ignore next - - var _this = this; - - var varDeclarations = ''; - - var locals = this.stackVars.concat(this.registers.list); - if (locals.length > 0) { - varDeclarations += ', ' + locals.join(', '); - } - - // Generate minimizer alias mappings - // - // When using true SourceNodes, this will update all references to the given alias - // as the source nodes are reused in situ. For the non-source node compilation mode, - // aliases will not be used, but this case is already being run on the client and - // we aren't concern about minimizing the template size. - var aliasCount = 0; - Object.keys(this.aliases).forEach(function (alias) { - var node = _this.aliases[alias]; - if (node.children && node.referenceCount > 1) { - varDeclarations += ', alias' + ++aliasCount + '=' + alias; - node.children[0] = 'alias' + aliasCount; - } - }); - - if (this.lookupPropertyFunctionIsUsed) { - varDeclarations += ', ' + this.lookupPropertyFunctionVarDeclaration(); - } - - var params = ['container', 'depth0', 'helpers', 'partials', 'data']; - - if (this.useBlockParams || this.useDepths) { - params.push('blockParams'); - } - if (this.useDepths) { - params.push('depths'); - } - - // Perform a second pass over the output to merge content when possible - var source = this.mergeSource(varDeclarations); - - if (asObject) { - params.push(source); - - return Function.apply(this, params); - } else { - return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); - } - }, - mergeSource: function mergeSource(varDeclarations) { - var isSimple = this.environment.isSimple, - appendOnly = !this.forceBuffer, - appendFirst = undefined, - sourceSeen = undefined, - bufferStart = undefined, - bufferEnd = undefined; - this.source.each(function (line) { - if (line.appendToBuffer) { - if (bufferStart) { - line.prepend(' + '); - } else { - bufferStart = line; - } - bufferEnd = line; - } else { - if (bufferStart) { - if (!sourceSeen) { - appendFirst = true; - } else { - bufferStart.prepend('buffer += '); - } - bufferEnd.add(';'); - bufferStart = bufferEnd = undefined; - } - - sourceSeen = true; - if (!isSimple) { - appendOnly = false; - } - } - }); - - if (appendOnly) { - if (bufferStart) { - bufferStart.prepend('return '); - bufferEnd.add(';'); - } else if (!sourceSeen) { - this.source.push('return "";'); - } - } else { - varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); - - if (bufferStart) { - bufferStart.prepend('return buffer + '); - bufferEnd.add(';'); - } else { - this.source.push('return buffer;'); - } - } - - if (varDeclarations) { - this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); - } - - return this.source.merge(); - }, - - lookupPropertyFunctionVarDeclaration: function lookupPropertyFunctionVarDeclaration() { - return '\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n '.trim(); - }, - - // [blockValue] - // - // On stack, before: hash, inverse, program, value - // On stack, after: return value of blockHelperMissing - // - // The purpose of this opcode is to take a block of the form - // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and - // replace it on the stack with the result of properly - // invoking blockHelperMissing. - blockValue: function blockValue(name) { - var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'), - params = [this.contextName(0)]; - this.setupHelperArgs(name, 0, params); - - var blockName = this.popStack(); - params.splice(1, 0, blockName); - - this.push(this.source.functionCall(blockHelperMissing, 'call', params)); - }, - - // [ambiguousBlockValue] - // - // On stack, before: hash, inverse, program, value - // Compiler value, before: lastHelper=value of last found helper, if any - // On stack, after, if no lastHelper: same as [blockValue] - // On stack, after, if lastHelper: value - ambiguousBlockValue: function ambiguousBlockValue() { - // We're being a bit cheeky and reusing the options value from the prior exec - var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'), - params = [this.contextName(0)]; - this.setupHelperArgs('', 0, params, true); - - this.flushInline(); - - var current = this.topStack(); - params.splice(1, 0, current); - - this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']); - }, - - // [appendContent] - // - // On stack, before: ... - // On stack, after: ... - // - // Appends the string value of `content` to the current buffer - appendContent: function appendContent(content) { - if (this.pendingContent) { - content = this.pendingContent + content; - } else { - this.pendingLocation = this.source.currentLocation; - } - - this.pendingContent = content; - }, - - // [append] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Coerces `value` to a String and appends it to the current buffer. - // - // If `value` is truthy, or 0, it is coerced into a string and appended - // Otherwise, the empty string is appended - append: function append() { - if (this.isInline()) { - this.replaceStack(function (current) { - return [' != null ? ', current, ' : ""']; - }); - - this.pushSource(this.appendToBuffer(this.popStack())); - } else { - var local = this.popStack(); - this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); - if (this.environment.isSimple) { - this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']); - } - } - }, - - // [appendEscaped] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Escape `value` and append it to the buffer - appendEscaped: function appendEscaped() { - this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')'])); - }, - - // [getContext] - // - // On stack, before: ... - // On stack, after: ... - // Compiler value, after: lastContext=depth - // - // Set the value of the `lastContext` compiler value to the depth - getContext: function getContext(depth) { - this.lastContext = depth; - }, - - // [pushContext] - // - // On stack, before: ... - // On stack, after: currentContext, ... - // - // Pushes the value of the current context onto the stack. - pushContext: function pushContext() { - this.pushStackLiteral(this.contextName(this.lastContext)); - }, - - // [lookupOnContext] - // - // On stack, before: ... - // On stack, after: currentContext[name], ... - // - // Looks up the value of `name` on the current context and pushes - // it onto the stack. - lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) { - var i = 0; - - if (!scoped && this.options.compat && !this.lastContext) { - // The depthed query is expected to handle the undefined logic for the root level that - // is implemented below, so we evaluate that directly in compat mode - this.push(this.depthedLookup(parts[i++])); - } else { - this.pushContext(); - } - - this.resolvePath('context', parts, i, falsy, strict); - }, - - // [lookupBlockParam] - // - // On stack, before: ... - // On stack, after: blockParam[name], ... - // - // Looks up the value of `parts` on the given block param and pushes - // it onto the stack. - lookupBlockParam: function lookupBlockParam(blockParamId, parts) { - this.useBlockParams = true; - - this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); - this.resolvePath('context', parts, 1); - }, - - // [lookupData] - // - // On stack, before: ... - // On stack, after: data, ... - // - // Push the data lookup operator - lookupData: function lookupData(depth, parts, strict) { - if (!depth) { - this.pushStackLiteral('data'); - } else { - this.pushStackLiteral('container.data(data, ' + depth + ')'); - } - - this.resolvePath('data', parts, 0, true, strict); - }, - - resolvePath: function resolvePath(type, parts, i, falsy, strict) { - // istanbul ignore next - - var _this2 = this; - - if (this.options.strict || this.options.assumeObjects) { - this.push(strictLookup(this.options.strict && strict, this, parts, type)); - return; - } - - var len = parts.length; - for (; i < len; i++) { - /* eslint-disable no-loop-func */ - this.replaceStack(function (current) { - var lookup = _this2.nameLookup(current, parts[i], type); - // We want to ensure that zero and false are handled properly if the context (falsy flag) - // needs to have the special handling for these values. - if (!falsy) { - return [' != null ? ', lookup, ' : ', current]; - } else { - // Otherwise we can use generic falsy handling - return [' && ', lookup]; - } - }); - /* eslint-enable no-loop-func */ - } - }, - - // [resolvePossibleLambda] - // - // On stack, before: value, ... - // On stack, after: resolved value, ... - // - // If the `value` is a lambda, replace it on the stack by - // the return value of the lambda - resolvePossibleLambda: function resolvePossibleLambda() { - this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); - }, - - // [pushStringParam] - // - // On stack, before: ... - // On stack, after: string, currentContext, ... - // - // This opcode is designed for use in string mode, which - // provides the string value of a parameter along with its - // depth rather than resolving it immediately. - pushStringParam: function pushStringParam(string, type) { - this.pushContext(); - this.pushString(type); - - // If it's a subexpression, the string result - // will be pushed after this opcode. - if (type !== 'SubExpression') { - if (typeof string === 'string') { - this.pushString(string); - } else { - this.pushStackLiteral(string); - } - } - }, - - emptyHash: function emptyHash(omitEmpty) { - if (this.trackIds) { - this.push('{}'); // hashIds - } - if (this.stringParams) { - this.push('{}'); // hashContexts - this.push('{}'); // hashTypes - } - this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); - }, - pushHash: function pushHash() { - if (this.hash) { - this.hashes.push(this.hash); - } - this.hash = { values: {}, types: [], contexts: [], ids: [] }; - }, - popHash: function popHash() { - var hash = this.hash; - this.hash = this.hashes.pop(); - - if (this.trackIds) { - this.push(this.objectLiteral(hash.ids)); - } - if (this.stringParams) { - this.push(this.objectLiteral(hash.contexts)); - this.push(this.objectLiteral(hash.types)); - } - - this.push(this.objectLiteral(hash.values)); - }, - - // [pushString] - // - // On stack, before: ... - // On stack, after: quotedString(string), ... - // - // Push a quoted version of `string` onto the stack - pushString: function pushString(string) { - this.pushStackLiteral(this.quotedString(string)); - }, - - // [pushLiteral] - // - // On stack, before: ... - // On stack, after: value, ... - // - // Pushes a value onto the stack. This operation prevents - // the compiler from creating a temporary variable to hold - // it. - pushLiteral: function pushLiteral(value) { - this.pushStackLiteral(value); - }, - - // [pushProgram] - // - // On stack, before: ... - // On stack, after: program(guid), ... - // - // Push a program expression onto the stack. This takes - // a compile-time guid and converts it into a runtime-accessible - // expression. - pushProgram: function pushProgram(guid) { - if (guid != null) { - this.pushStackLiteral(this.programExpression(guid)); - } else { - this.pushStackLiteral(null); - } - }, - - // [registerDecorator] - // - // On stack, before: hash, program, params..., ... - // On stack, after: ... - // - // Pops off the decorator's parameters, invokes the decorator, - // and inserts the decorator into the decorators list. - registerDecorator: function registerDecorator(paramSize, name) { - var foundDecorator = this.nameLookup('decorators', name, 'decorator'), - options = this.setupHelperArgs(name, paramSize); - - this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']); - }, - - // [invokeHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // Pops off the helper's parameters, invokes the helper, - // and pushes the helper's return value onto the stack. - // - // If the helper is not found, `helperMissing` is called. - invokeHelper: function invokeHelper(paramSize, name, isSimple) { - var nonHelper = this.popStack(), - helper = this.setupHelper(paramSize, name); - - var possibleFunctionCalls = []; - - if (isSimple) { - // direct call to helper - possibleFunctionCalls.push(helper.name); - } - // call a function from the input object - possibleFunctionCalls.push(nonHelper); - if (!this.options.strict) { - possibleFunctionCalls.push(this.aliasable('container.hooks.helperMissing')); - } - - var functionLookupCode = ['(', this.itemsSeparatedBy(possibleFunctionCalls, '||'), ')']; - var functionCall = this.source.functionCall(functionLookupCode, 'call', helper.callParams); - this.push(functionCall); - }, - - itemsSeparatedBy: function itemsSeparatedBy(items, separator) { - var result = []; - result.push(items[0]); - for (var i = 1; i < items.length; i++) { - result.push(separator, items[i]); - } - return result; - }, - // [invokeKnownHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // This operation is used when the helper is known to exist, - // so a `helperMissing` fallback is not required. - invokeKnownHelper: function invokeKnownHelper(paramSize, name) { - var helper = this.setupHelper(paramSize, name); - this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); - }, - - // [invokeAmbiguous] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of disambiguation - // - // This operation is used when an expression like `{{foo}}` - // is provided, but we don't know at compile-time whether it - // is a helper or a path. - // - // This operation emits more code than the other options, - // and can be avoided by passing the `knownHelpers` and - // `knownHelpersOnly` flags at compile-time. - invokeAmbiguous: function invokeAmbiguous(name, helperCall) { - this.useRegister('helper'); - - var nonHelper = this.popStack(); - - this.emptyHash(); - var helper = this.setupHelper(0, name, helperCall); - - var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); - - var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; - if (!this.options.strict) { - lookup[0] = '(helper = '; - lookup.push(' != null ? helper : ', this.aliasable('container.hooks.helperMissing')); - } - - this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']); - }, - - // [invokePartial] - // - // On stack, before: context, ... - // On stack after: result of partial invocation - // - // This operation pops off a context, invokes a partial with that context, - // and pushes the result of the invocation back. - invokePartial: function invokePartial(isDynamic, name, indent) { - var params = [], - options = this.setupParams(name, 1, params); - - if (isDynamic) { - name = this.popStack(); - delete options.name; - } - - if (indent) { - options.indent = JSON.stringify(indent); - } - options.helpers = 'helpers'; - options.partials = 'partials'; - options.decorators = 'container.decorators'; - - if (!isDynamic) { - params.unshift(this.nameLookup('partials', name, 'partial')); - } else { - params.unshift(name); - } - - if (this.options.compat) { - options.depths = 'depths'; - } - options = this.objectLiteral(options); - params.push(options); - - this.push(this.source.functionCall('container.invokePartial', '', params)); - }, - - // [assignToHash] - // - // On stack, before: value, ..., hash, ... - // On stack, after: ..., hash, ... - // - // Pops a value off the stack and assigns it to the current hash - assignToHash: function assignToHash(key) { - var value = this.popStack(), - context = undefined, - type = undefined, - id = undefined; - - if (this.trackIds) { - id = this.popStack(); - } - if (this.stringParams) { - type = this.popStack(); - context = this.popStack(); - } - - var hash = this.hash; - if (context) { - hash.contexts[key] = context; - } - if (type) { - hash.types[key] = type; - } - if (id) { - hash.ids[key] = id; - } - hash.values[key] = value; - }, - - pushId: function pushId(type, name, child) { - if (type === 'BlockParam') { - this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : '')); - } else if (type === 'PathExpression') { - this.pushString(name); - } else if (type === 'SubExpression') { - this.pushStackLiteral('true'); - } else { - this.pushStackLiteral('null'); - } - }, - - // HELPERS - - compiler: JavaScriptCompiler, - - compileChildren: function compileChildren(environment, options) { - var children = environment.children, - child = undefined, - compiler = undefined; - - for (var i = 0, l = children.length; i < l; i++) { - child = children[i]; - compiler = new this.compiler(); // eslint-disable-line new-cap - - var existing = this.matchExistingProgram(child); - - if (existing == null) { - this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children - var index = this.context.programs.length; - child.index = index; - child.name = 'program' + index; - this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); - this.context.decorators[index] = compiler.decorators; - this.context.environments[index] = child; - - this.useDepths = this.useDepths || compiler.useDepths; - this.useBlockParams = this.useBlockParams || compiler.useBlockParams; - child.useDepths = this.useDepths; - child.useBlockParams = this.useBlockParams; - } else { - child.index = existing.index; - child.name = 'program' + existing.index; - - this.useDepths = this.useDepths || existing.useDepths; - this.useBlockParams = this.useBlockParams || existing.useBlockParams; - } - } - }, - matchExistingProgram: function matchExistingProgram(child) { - for (var i = 0, len = this.context.environments.length; i < len; i++) { - var environment = this.context.environments[i]; - if (environment && environment.equals(child)) { - return environment; - } - } - }, - - programExpression: function programExpression(guid) { - var child = this.environment.children[guid], - programParams = [child.index, 'data', child.blockParams]; - - if (this.useBlockParams || this.useDepths) { - programParams.push('blockParams'); - } - if (this.useDepths) { - programParams.push('depths'); - } - - return 'container.program(' + programParams.join(', ') + ')'; - }, - - useRegister: function useRegister(name) { - if (!this.registers[name]) { - this.registers[name] = true; - this.registers.list.push(name); - } - }, - - push: function push(expr) { - if (!(expr instanceof Literal)) { - expr = this.source.wrap(expr); - } - - this.inlineStack.push(expr); - return expr; - }, - - pushStackLiteral: function pushStackLiteral(item) { - this.push(new Literal(item)); - }, - - pushSource: function pushSource(source) { - if (this.pendingContent) { - this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); - this.pendingContent = undefined; - } - - if (source) { - this.source.push(source); - } - }, - - replaceStack: function replaceStack(callback) { - var prefix = ['('], - stack = undefined, - createdStack = undefined, - usedLiteral = undefined; - - /* istanbul ignore next */ - if (!this.isInline()) { - throw new _Exception['default']('replaceStack on non-inline'); - } - - // We want to merge the inline statement into the replacement statement via ',' - var top = this.popStack(true); - - if (top instanceof Literal) { - // Literals do not need to be inlined - stack = [top.value]; - prefix = ['(', stack]; - usedLiteral = true; - } else { - // Get or create the current stack name for use by the inline - createdStack = true; - var _name = this.incrStack(); - - prefix = ['((', this.push(_name), ' = ', top, ')']; - stack = this.topStack(); - } - - var item = callback.call(this, stack); - - if (!usedLiteral) { - this.popStack(); - } - if (createdStack) { - this.stackSlot--; - } - this.push(prefix.concat(item, ')')); - }, - - incrStack: function incrStack() { - this.stackSlot++; - if (this.stackSlot > this.stackVars.length) { - this.stackVars.push('stack' + this.stackSlot); - } - return this.topStackName(); - }, - topStackName: function topStackName() { - return 'stack' + this.stackSlot; - }, - flushInline: function flushInline() { - var inlineStack = this.inlineStack; - this.inlineStack = []; - for (var i = 0, len = inlineStack.length; i < len; i++) { - var entry = inlineStack[i]; - /* istanbul ignore if */ - if (entry instanceof Literal) { - this.compileStack.push(entry); - } else { - var stack = this.incrStack(); - this.pushSource([stack, ' = ', entry, ';']); - this.compileStack.push(stack); - } - } - }, - isInline: function isInline() { - return this.inlineStack.length; - }, - - popStack: function popStack(wrapped) { - var inline = this.isInline(), - item = (inline ? this.inlineStack : this.compileStack).pop(); - - if (!wrapped && item instanceof Literal) { - return item.value; - } else { - if (!inline) { - /* istanbul ignore next */ - if (!this.stackSlot) { - throw new _Exception['default']('Invalid stack pop'); - } - this.stackSlot--; - } - return item; - } - }, - - topStack: function topStack() { - var stack = this.isInline() ? this.inlineStack : this.compileStack, - item = stack[stack.length - 1]; - - /* istanbul ignore if */ - if (item instanceof Literal) { - return item.value; - } else { - return item; - } - }, - - contextName: function contextName(context) { - if (this.useDepths && context) { - return 'depths[' + context + ']'; - } else { - return 'depth' + context; - } - }, - - quotedString: function quotedString(str) { - return this.source.quotedString(str); - }, - - objectLiteral: function objectLiteral(obj) { - return this.source.objectLiteral(obj); - }, - - aliasable: function aliasable(name) { - var ret = this.aliases[name]; - if (ret) { - ret.referenceCount++; - return ret; - } - - ret = this.aliases[name] = this.source.wrap(name); - ret.aliasable = true; - ret.referenceCount = 1; - - return ret; - }, - - setupHelper: function setupHelper(paramSize, name, blockHelper) { - var params = [], - paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); - var foundHelper = this.nameLookup('helpers', name, 'helper'), - callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : (container.nullContext || {})'); - - return { - params: params, - paramsInit: paramsInit, - name: foundHelper, - callParams: [callContext].concat(params) - }; - }, - - setupParams: function setupParams(helper, paramSize, params) { - var options = {}, - contexts = [], - types = [], - ids = [], - objectArgs = !params, - param = undefined; - - if (objectArgs) { - params = []; - } - - options.name = this.quotedString(helper); - options.hash = this.popStack(); - - if (this.trackIds) { - options.hashIds = this.popStack(); - } - if (this.stringParams) { - options.hashTypes = this.popStack(); - options.hashContexts = this.popStack(); - } - - var inverse = this.popStack(), - program = this.popStack(); - - // Avoid setting fn and inverse if neither are set. This allows - // helpers to do a check for `if (options.fn)` - if (program || inverse) { - options.fn = program || 'container.noop'; - options.inverse = inverse || 'container.noop'; - } - - // The parameters go on to the stack in order (making sure that they are evaluated in order) - // so we need to pop them off the stack in reverse order - var i = paramSize; - while (i--) { - param = this.popStack(); - params[i] = param; - - if (this.trackIds) { - ids[i] = this.popStack(); - } - if (this.stringParams) { - types[i] = this.popStack(); - contexts[i] = this.popStack(); - } - } - - if (objectArgs) { - options.args = this.source.generateArray(params); - } - - if (this.trackIds) { - options.ids = this.source.generateArray(ids); - } - if (this.stringParams) { - options.types = this.source.generateArray(types); - options.contexts = this.source.generateArray(contexts); - } - - if (this.options.data) { - options.data = 'data'; - } - if (this.useBlockParams) { - options.blockParams = 'blockParams'; - } - return options; - }, - - setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { - var options = this.setupParams(helper, paramSize, params); - options.loc = JSON.stringify(this.source.currentLocation); - options = this.objectLiteral(options); - if (useRegister) { - this.useRegister('options'); - params.push('options'); - return ['options=', options]; - } else if (params) { - params.push(options); - return ''; - } else { - return options; - } - } - }; - - (function () { - var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' '); - - var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; - - for (var i = 0, l = reservedWords.length; i < l; i++) { - compilerWords[reservedWords[i]] = true; - } - })(); - - /** - * @deprecated May be removed in the next major version - */ - JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { - return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); - }; - - function strictLookup(requireTerminal, compiler, parts, type) { - var stack = compiler.popStack(), - i = 0, - len = parts.length; - if (requireTerminal) { - len--; - } - - for (; i < len; i++) { - stack = compiler.nameLookup(stack, parts[i], type); - } - - if (requireTerminal) { - return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ', ', JSON.stringify(compiler.source.currentLocation), ' )']; - } else { - return stack; - } - } - - module.exports = JavaScriptCompiler; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZX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haW5fZCA9IHRoaXMuZGVjb3JhdG9yczsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBjYW1lbGNhc2VcbiAgICAgICAgcmV0LnVzZURlY29yYXRvcnMgPSB0cnVlO1xuICAgICAgfVxuXG4gICAgICBsZXQgeyBwcm9ncmFtcywgZGVjb3JhdG9ycyB9ID0gdGhpcy5jb250ZXh0O1xuICAgICAgZm9yIChpID0gMCwgbCA9IHByb2dyYW1zLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICBpZiAocHJvZ3JhbXNbaV0pIHtcbiAgICAgICAgICByZXRbaV0gPSBwcm9ncmFtc1tpXTtcbiAgICAgICAgICBpZiAoZGVjb3JhdG9yc1tpXSkge1xuICAgICAgICAgICAgcmV0W2kgKyAnX2QnXSA9IGRlY29yYXRvcnNbaV07XG4gICAgICAgICAgICByZXQudXNlRGVjb3JhdG9ycyA9IHRydWU7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmICh0aGlzLmVudmlyb25tZW50LnVzZVBhcnRpYWwpIHtcbiAgICAgICAgcmV0LnVzZVBhcnRpYWwgPSB0cnVlO1xuICAgICAgfVxuICAgICAgaWYgKHRoaXMub3B0aW9ucy5kYXRhKSB7XG4gICAgICAgIHJldC51c2VEYXRhID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLnVzZURlcHRocykge1xuICAgICAgICByZXQudXNlRGVwdGhzID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLnVzZUJsb2NrUGFyYW1zKSB7XG4gICAgICAgIHJldC51c2VCbG9ja1BhcmFtcyA9IHRydWU7XG4gICAgICB9XG4gICAgICBpZiAodGhpcy5vcHRpb25zLmNvbXBhdCkge1xuICAgICAgICByZXQuY29tcGF0ID0gdHJ1ZTtcbiAgICAgIH1cblxuICAgICAgaWYgKCFhc09iamVjdCkge1xuICAgICAgICByZXQuY29tcGlsZXIgPSBKU09OLnN0cm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Mb29rdXAocmVxdWlyZVRlcm1pbmFsLCBjb21waWxlciwgcGFydHMsIHR5cGUpIHtcbiAgbGV0IHN0YWNrID0gY29tcGlsZXIucG9wU3RhY2soKSxcbiAgICBpID0gMCxcbiAgICBsZW4gPSBwYXJ0cy5sZW5ndGg7XG4gIGlmIChyZXF1aXJlVGVybWluYWwpIHtcbiAgICBsZW4tLTtcbiAgfVxuXG4gIGZvciAoOyBpIDwgbGVuOyBpKyspIHtcbiAgICBzdGFjayA9IGNvbXBpbGVyLm5hbWVMb29rdXAoc3RhY2ssIHBhcnRzW2ldLCB0eXBlKTtcbiAgfVxuXG4gIGlmIChyZXF1aXJlVGVybWluYWwpIHtcbiAgICByZXR1cm4gW1xuICAgICAgY29tcGlsZXIuYWxpYXNhYmxlKCdjb250YWluZXIuc3RyaWN0JyksXG4gICAgICAnKCcsXG4gICAgICBzdGFjayxcbiAgICAgICcsICcsXG4gICAgICBjb21waWxlci5xdW90ZWRTdHJpbmcocGFydHNbaV0pLFxuICAgICAgJywgJyxcbiAgICAgIEpTT04uc3RyaW5naWZ5KGNvbXBpbGVyLnNvdXJjZS5jdXJyZW50TG9jYXRpb24pLFxuICAgICAgJyApJ1xuICAgIF07XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIHN0YWNrO1xuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IEphdmFTY3JpcHRDb21waWxlcjtcbiJdfQ== -; -define('handlebars',['exports', 'module', './handlebars.runtime', './handlebars/compiler/ast', './handlebars/compiler/base', './handlebars/compiler/compiler', './handlebars/compiler/javascript-compiler', './handlebars/compiler/visitor', './handlebars/no-conflict'], function (exports, module, _handlebarsRuntime, _handlebarsCompilerAst, _handlebarsCompilerBase, _handlebarsCompilerCompiler, _handlebarsCompilerJavascriptCompiler, _handlebarsCompilerVisitor, _handlebarsNoConflict) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _runtime = _interopRequireDefault(_handlebarsRuntime); - - // Compiler imports - - var _AST = _interopRequireDefault(_handlebarsCompilerAst); - - var _JavaScriptCompiler = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler); - - var _Visitor = _interopRequireDefault(_handlebarsCompilerVisitor); - - var _noConflict = _interopRequireDefault(_handlebarsNoConflict); - - var _create = _runtime['default'].create; - function create() { - var hb = _create(); - - hb.compile = function (input, options) { - return _handlebarsCompilerCompiler.compile(input, options, hb); - }; - hb.precompile = function (input, options) { - return _handlebarsCompilerCompiler.precompile(input, options, hb); - }; - - hb.AST = _AST['default']; - hb.Compiler = _handlebarsCompilerCompiler.Compiler; - hb.JavaScriptCompiler = _JavaScriptCompiler['default']; - hb.Parser = _handlebarsCompilerBase.parser; - hb.parse = _handlebarsCompilerBase.parse; - hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing; - - return hb; - } - - var inst = create(); - inst.create = create; - - _noConflict['default'](inst); - - inst.Visitor = _Visitor['default']; - - inst['default'] = inst; - - module.exports = inst; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9oYW5kbGViYXJzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFlQSxNQUFJLE9BQU8sR0FBRyxvQkFBUSxNQUFNLENBQUM7QUFDN0IsV0FBUyxNQUFNLEdBQUc7QUFDaEIsUUFBSSxFQUFFLEdBQUcsT0FBTyxFQUFFLENBQUM7O0FBRW5CLE1BQUUsQ0FBQyxPQUFPLEdBQUcsVUFBUyxLQUFLLEVBQUUsT0FBTyxFQUFFO0FBQ3BDLGFBQU8sNEJBWFEsT0FBTyxDQVdQLEtBQUssRUFBRSxPQUFPLEVBQUUsRUFBRSxDQUFDLENBQUM7S0FDcEMsQ0FBQztBQUNGLE1BQUUsQ0FBQyxVQUFVLEdBQUcsVUFBUyxLQUFLLEVB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oaW5zdCk7XG5cbmluc3QuVmlzaXRvciA9IFZpc2l0b3I7XG5cbmluc3RbJ2RlZmF1bHQnXSA9IGluc3Q7XG5cbmV4cG9ydCBkZWZhdWx0IGluc3Q7XG4iXX0= -; diff --git a/node_modules/handlebars/dist/handlebars.amd.min.js b/node_modules/handlebars/dist/handlebars.amd.min.js deleted file mode 100644 index b5da9dc4..00000000 --- a/node_modules/handlebars/dist/handlebars.amd.min.js +++ /dev/null @@ -1,29 +0,0 @@ -/**! - - @license - handlebars v4.7.7 - -Copyright (C) 2011-2019 by Yehuda Katz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ -define("handlebars/utils",["exports"],function(a){"use strict";function b(a){return j[a]}function c(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function d(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function e(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return l.test(a)?a.replace(k,b):a}function f(a){return!a&&0!==a||!(!o(a)||0!==a.length)}function g(a){var b=c({},a);return b._parent=a,b}function h(a,b){return a.path=b,a}function i(a,b){return(a?a+".":"")+b}a.__esModule=!0,a.extend=c,a.indexOf=d,a.escapeExpression=e,a.isEmpty=f,a.createFrame=g,a.blockParams=h,a.appendContextPath=i;var j={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},k=/[&<>"'`=]/g,l=/[&<>"'`=]/,m=Object.prototype.toString;a.toString=m;var n=function(a){return"function"==typeof a};n(/x/)&&(a.isFunction=n=function(a){return"function"==typeof a&&"[object Function]"===m.call(a)}),a.isFunction=n;var o=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===m.call(a)};a.isArray=o}),define("handlebars/exception",["exports","module"],function(a,b){"use strict";function c(a,b){var e=b&&b.loc,f=void 0,g=void 0,h=void 0,i=void 0;e&&(f=e.start.line,g=e.end.line,h=e.start.column,i=e.end.column,a+=" - "+f+":"+h);for(var j=Error.prototype.constructor.call(this,a),k=0;k<d.length;k++)this[d[k]]=j[d[k]];Error.captureStackTrace&&Error.captureStackTrace(this,c);try{e&&(this.lineNumber=f,this.endLineNumber=g,Object.defineProperty?(Object.defineProperty(this,"column",{value:h,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:i,enumerable:!0})):(this.column=h,this.endColumn=i))}catch(l){}}var d=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];c.prototype=new Error,b.exports=c}),define("handlebars/helpers/block-helper-missing",["exports","module","../utils"],function(a,b,c){"use strict";b.exports=function(a){a.registerHelper("blockHelperMissing",function(b,d){var e=d.inverse,f=d.fn;if(b===!0)return f(this);if(b===!1||null==b)return e(this);if(c.isArray(b))return b.length>0?(d.ids&&(d.ids=[d.name]),a.helpers.each(b,d)):e(this);if(d.data&&d.ids){var g=c.createFrame(d.data);g.contextPath=c.appendContextPath(d.data.contextPath,d.name),d={data:g}}return f(b,d)})}}),define("handlebars/helpers/each",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("each",function(a,b){function d(b,d,f){j&&(j.key=b,j.index=d,j.first=0===d,j.last=!!f,k&&(j.contextPath=k+b)),i+=e(a[b],{data:j,blockParams:c.blockParams([a[b],b],[k+b,null])})}if(!b)throw new f["default"]("Must pass iterator to #each");var e=b.fn,g=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=c.appendContextPath(b.data.contextPath,b.ids[0])+"."),c.isFunction(a)&&(a=a.call(this)),b.data&&(j=c.createFrame(b.data)),a&&"object"==typeof a)if(c.isArray(a))for(var l=a.length;h<l;h++)h in a&&d(h,h,h===a.length-1);else if(global.Symbol&&a[global.Symbol.iterator]){for(var m=[],n=a[global.Symbol.iterator](),o=n.next();!o.done;o=n.next())m.push(o.value);a=m;for(var l=a.length;h<l;h++)d(h,h,h===a.length-1)}else!function(){var b=void 0;Object.keys(a).forEach(function(a){void 0!==b&&d(b,h-1),b=a,h++}),void 0!==b&&d(b,h-1,!0)}();return 0===h&&(i=g(this)),i})}}),define("handlebars/helpers/helper-missing",["exports","module","../exception"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}var e=d(c);b.exports=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new e["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})}}),define("handlebars/helpers/if",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("if",function(a,b){if(2!=arguments.length)throw new f["default"]("#if requires exactly one argument");return c.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||c.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){if(2!=arguments.length)throw new f["default"]("#unless requires exactly one argument");return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})}}),define("handlebars/helpers/log",["exports","module"],function(a,b){"use strict";b.exports=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d<arguments.length-1;d++)b.push(arguments[d]);var e=1;null!=c.hash.level?e=c.hash.level:c.data&&null!=c.data.level&&(e=c.data.level),b[0]=e,a.log.apply(a,b)})}}),define("handlebars/helpers/lookup",["exports","module"],function(a,b){"use strict";b.exports=function(a){a.registerHelper("lookup",function(a,b,c){return a?c.lookupProperty(a,b):a})}}),define("handlebars/helpers/with",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("with",function(a,b){if(2!=arguments.length)throw new f["default"]("#with requires exactly one argument");c.isFunction(a)&&(a=a.call(this));var d=b.fn;if(c.isEmpty(a))return b.inverse(this);var e=b.data;return b.data&&b.ids&&(e=c.createFrame(b.data),e.contextPath=c.appendContextPath(b.data.contextPath,b.ids[0])),d(a,{data:e,blockParams:c.blockParams([a],[e&&e.contextPath])})})}}),define("handlebars/helpers",["exports","./helpers/block-helper-missing","./helpers/each","./helpers/helper-missing","./helpers/if","./helpers/log","./helpers/lookup","./helpers/with"],function(a,b,c,d,e,f,g,h){"use strict";function i(a){return a&&a.__esModule?a:{"default":a}}function j(a){l["default"](a),m["default"](a),n["default"](a),o["default"](a),p["default"](a),q["default"](a),r["default"](a)}function k(a,b,c){a.helpers[b]&&(a.hooks[b]=a.helpers[b],c||delete a.helpers[b])}a.__esModule=!0,a.registerDefaultHelpers=j,a.moveHelperToHooks=k;var l=i(b),m=i(c),n=i(d),o=i(e),p=i(f),q=i(g),r=i(h)}),define("handlebars/decorators/inline",["exports","module","../utils"],function(a,b,c){"use strict";b.exports=function(a){a.registerDecorator("inline",function(a,b,d,e){var f=a;return b.partials||(b.partials={},f=function(e,f){var g=d.partials;d.partials=c.extend({},g,b.partials);var h=a(e,f);return d.partials=g,h}),b.partials[e.args[0]]=e.fn,f})}}),define("handlebars/decorators",["exports","./decorators/inline"],function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a){e["default"](a)}a.__esModule=!0,a.registerDefaultDecorators=d;var e=c(b)}),define("handlebars/logger",["exports","module","./utils"],function(a,b,c){"use strict";var d={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(a){if("string"==typeof a){var b=c.indexOf(d.methodMap,a.toLowerCase());a=b>=0?b:parseInt(a,10)}return a},log:function(a){if(a=d.lookupLevel(a),"undefined"!=typeof console&&d.lookupLevel(d.level)<=a){var b=d.methodMap[a];console[b]||(b="log");for(var c=arguments.length,e=Array(c>1?c-1:0),f=1;f<c;f++)e[f-1]=arguments[f];console[b].apply(console,e)}}};b.exports=d}),define("handlebars/internal/create-new-lookup-object",["exports","../utils"],function(a,b){"use strict";function c(){for(var a=arguments.length,c=Array(a),d=0;d<a;d++)c[d]=arguments[d];return b.extend.apply(void 0,[Object.create(null)].concat(c))}a.__esModule=!0,a.createNewLookupObject=c}),define("handlebars/internal/proto-access",["exports","./create-new-lookup-object","../logger"],function(a,b,c){"use strict";function d(a){var c=Object.create(null);c.constructor=!1,c.__defineGetter__=!1,c.__defineSetter__=!1,c.__lookupGetter__=!1;var d=Object.create(null);return d.__proto__=!1,{properties:{whitelist:b.createNewLookupObject(d,a.allowedProtoProperties),defaultValue:a.allowProtoPropertiesByDefault},methods:{whitelist:b.createNewLookupObject(c,a.allowedProtoMethods),defaultValue:a.allowProtoMethodsByDefault}}}function e(a,b,c){return"function"==typeof a?f(b.methods,c):f(b.properties,c)}function f(a,b){return void 0!==a.whitelist[b]?a.whitelist[b]===!0:void 0!==a.defaultValue?a.defaultValue:(g(b),!1)}function g(a){i[a]!==!0&&(i[a]=!0,c.log("error",'Handlebars: Access has been denied to resolve the property "'+a+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}function h(){Object.keys(i).forEach(function(a){delete i[a]})}a.__esModule=!0,a.createProtoAccessControl=d,a.resultIsAllowed=e,a.resetLoggedProperties=h;var i=Object.create(null)}),define("handlebars/base",["exports","./utils","./exception","./helpers","./decorators","./logger","./internal/proto-access"],function(a,b,c,d,e,f,g){"use strict";function h(a){return a&&a.__esModule?a:{"default":a}}function i(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},d.registerDefaultHelpers(this),e.registerDefaultDecorators(this)}a.__esModule=!0,a.HandlebarsEnvironment=i;var j=h(c),k=h(f),l="4.7.7";a.VERSION=l;var m=8;a.COMPILER_REVISION=m;var n=7;a.LAST_COMPATIBLE_COMPILER_REVISION=n;var o={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};a.REVISION_CHANGES=o;var p="[object Object]";i.prototype={constructor:i,logger:k["default"],log:k["default"].log,registerHelper:function(a,c){if(b.toString.call(a)===p){if(c)throw new j["default"]("Arg not supported with multiple helpers");b.extend(this.helpers,a)}else this.helpers[a]=c},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,c){if(b.toString.call(a)===p)b.extend(this.partials,a);else{if("undefined"==typeof c)throw new j["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=c}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,c){if(b.toString.call(a)===p){if(c)throw new j["default"]("Arg not supported with multiple decorators");b.extend(this.decorators,a)}else this.decorators[a]=c},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){g.resetLoggedProperties()}};var q=k["default"].log;a.log=q,a.createFrame=b.createFrame,a.logger=k["default"]}),define("handlebars/safe-string",["exports","module"],function(a,b){"use strict";function c(a){this.string=a}c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b.exports=c}),define("handlebars/internal/wrapHelper",["exports"],function(a){"use strict";function b(a,b){if("function"!=typeof a)return a;var c=function(){var c=arguments[arguments.length-1];return arguments[arguments.length-1]=b(c),a.apply(this,arguments)};return c}a.__esModule=!0,a.wrapHelper=b}),define("handlebars/runtime",["exports","./utils","./exception","./base","./helpers","./internal/wrapHelper","./internal/proto-access"],function(a,b,c,d,e,f,g){"use strict";function h(a){return a&&a.__esModule?a:{"default":a}}function i(a){var b=a&&a[0]||1,c=d.COMPILER_REVISION;if(!(b>=d.LAST_COMPATIBLE_COMPILER_REVISION&&b<=d.COMPILER_REVISION)){if(b<d.LAST_COMPATIBLE_COMPILER_REVISION){var e=d.REVISION_CHANGES[c],f=d.REVISION_CHANGES[b];throw new s["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+e+") or downgrade your runtime to an older version ("+f+").")}throw new s["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function j(a,c){function d(d,e,f){f.hash&&(e=b.extend({},e,f.hash),f.ids&&(f.ids[0]=!0)),d=c.VM.resolvePartial.call(this,d,e,f);var g=b.extend({},f,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),h=c.VM.invokePartial.call(this,d,e,g);if(null==h&&c.compile&&(f.partials[f.name]=c.compile(d,a.compilerOptions,c),h=f.partials[f.name](e,g)),null!=h){if(f.indent){for(var i=h.split("\n"),j=0,k=i.length;j<k&&(i[j]||j+1!==k);j++)i[j]=f.indent+i[j];h=i.join("\n")}return h}throw new s["default"]("The partial "+f.name+" could not be compiled when running in runtime-only mode")}function f(b){function c(b){return""+a.main(i,b,i.helpers,i.partials,e,h,g)}var d=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],e=d.data;f._setup(d),!d.partial&&a.useData&&(e=o(b,e));var g=void 0,h=a.useBlockParams?[]:void 0;return a.useDepths&&(g=d.depths?b!=d.depths[0]?[b].concat(d.depths):d.depths:[b]),(c=p(a.main,c,i,d.depths||[],e,h))(b,d)}if(!c)throw new s["default"]("No environment passed to template");if(!a||!a.main)throw new s["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,c.VM.checkRevision(a.compiler);var h=a.compiler&&7===a.compiler[0],i={strict:function(a,b,c){if(!(a&&b in a))throw new s["default"]('"'+b+'" not defined in '+a,{loc:c});return i.lookupProperty(a,b)},lookupProperty:function(a,b){var c=a[b];return null==c?c:Object.prototype.hasOwnProperty.call(a,b)?c:g.resultIsAllowed(c,i.protoAccessControl,b)?c:void 0},lookup:function(a,b){for(var c=a.length,d=0;d<c;d++){var e=a[d]&&i.lookupProperty(a[d],b);if(null!=e)return a[d][b]}},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:b.escapeExpression,invokePartial:d,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var f=this.programs[a],g=this.fn(a);return b||e||d||c?f=k(this,a,g,b,c,d,e):f||(f=this.programs[a]=k(this,a,g)),f},data:function(a,b){for(;a&&b--;)a=a._parent;return a},mergeIfNeeded:function(a,c){var d=a||c;return a&&c&&a!==c&&(d=b.extend({},c,a)),d},nullContext:Object.seal({}),noop:c.VM.noop,compilerInfo:a.compiler};return f.isTop=!0,f._setup=function(d){if(d.partial)i.protoAccessControl=d.protoAccessControl,i.helpers=d.helpers,i.partials=d.partials,i.decorators=d.decorators,i.hooks=d.hooks;else{var f=b.extend({},c.helpers,d.helpers);q(f,i),i.helpers=f,a.usePartial&&(i.partials=i.mergeIfNeeded(d.partials,c.partials)),(a.usePartial||a.useDecorators)&&(i.decorators=b.extend({},c.decorators,d.decorators)),i.hooks={},i.protoAccessControl=g.createProtoAccessControl(d);var j=d.allowCallsToHelperMissing||h;e.moveHelperToHooks(i,"helperMissing",j),e.moveHelperToHooks(i,"blockHelperMissing",j)}},f._child=function(b,c,d,e){if(a.useBlockParams&&!d)throw new s["default"]("must pass block params");if(a.useDepths&&!e)throw new s["default"]("must pass parent depths");return k(i,b,a[b],c,0,d,e)},f}function k(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return!g||b==g[0]||b===a.nullContext&&null===g[0]||(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=p(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function l(a,b,c){return a?a.call||c.name||(c.name=a,a=c.partials[a]):a="@partial-block"===c.name?c.data["partial-block"]:c.partials[c.name],a}function m(a,c,e){var f=e.data&&e.data["partial-block"];e.partial=!0,e.ids&&(e.data.contextPath=e.ids[0]||e.data.contextPath);var g=void 0;if(e.fn&&e.fn!==n&&!function(){e.data=d.createFrame(e.data);var a=e.fn;g=e.data["partial-block"]=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return c.data=d.createFrame(c.data),c.data["partial-block"]=f,a(b,c)},a.partials&&(e.partials=b.extend({},e.partials,a.partials))}(),void 0===a&&g&&(a=g),void 0===a)throw new s["default"]("The partial "+e.name+" could not be found");if(a instanceof Function)return a(c,e)}function n(){return""}function o(a,b){return b&&"root"in b||(b=b?d.createFrame(b):{},b.root=a),b}function p(a,c,d,e,f,g){if(a.decorator){var h={};c=a.decorator(c,h,d,e&&e[0],f,g,e),b.extend(c,h)}return c}function q(a,b){Object.keys(a).forEach(function(c){var d=a[c];a[c]=r(d,b)})}function r(a,c){var d=c.lookupProperty;return f.wrapHelper(a,function(a){return b.extend({lookupProperty:d},a)})}a.__esModule=!0,a.checkRevision=i,a.template=j,a.wrapProgram=k,a.resolvePartial=l,a.invokePartial=m,a.noop=n;var s=h(c)}),define("handlebars/no-conflict",["exports","module"],function(a,b){"use strict";b.exports=function(a){var b="undefined"!=typeof global?global:window,c=b.Handlebars;a.noConflict=function(){return b.Handlebars===a&&(b.Handlebars=c),a}}}),define("handlebars.runtime",["exports","module","./handlebars/base","./handlebars/safe-string","./handlebars/exception","./handlebars/utils","./handlebars/runtime","./handlebars/no-conflict"],function(a,b,c,d,e,f,g,h){"use strict";function i(a){return a&&a.__esModule?a:{"default":a}}function j(){var a=new c.HandlebarsEnvironment;return f.extend(a,c),a.SafeString=k["default"],a.Exception=l["default"],a.Utils=f,a.escapeExpression=f.escapeExpression,a.VM=g,a.template=function(b){return g.template(b,a)},a}var k=i(d),l=i(e),m=i(h),n=j();n.create=j,m["default"](n),n["default"]=n,b.exports=n}),define("handlebars/compiler/ast",["exports","module"],function(a,b){"use strict";var c={helpers:{helperExpression:function(a){return"SubExpression"===a.type||("MustacheStatement"===a.type||"BlockStatement"===a.type)&&!!(a.params&&a.params.length||a.hash)},scopedId:function(a){return/^\.|this\b/.test(a.original)},simpleId:function(a){return 1===a.parts.length&&!c.helpers.scopedId(a)&&!a.depth}}};b.exports=c}),define("handlebars/compiler/parser",["exports","module"],function(a,b){"use strict";var c=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:this.$=d.prepareProgram(f[h]);break;case 3:this.$=f[h];break;case 4:this.$=f[h];break;case 5:this.$=f[h];break;case 6:this.$=f[h];break;case 7:this.$=f[h];break;case 8:this.$=f[h];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(f[h]),strip:d.stripFlags(f[h],f[h]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:f[h],value:f[h],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(f[h-2],f[h-1],f[h],this._$);break;case 12:this.$={path:f[h-3],params:f[h-2],hash:f[h-1]};break;case 13:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!1,this._$);break;case 14:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!0,this._$);break;case 15:this.$={open:f[h-5],path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 16:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 17:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 18:this.$={strip:d.stripFlags(f[h-1],f[h-1]),program:f[h]};break;case 19:var i=d.prepareBlock(f[h-2],f[h-1],f[h],f[h],!1,this._$),j=d.prepareProgram([i],f[h-1].loc);j.chained=!0,this.$={strip:f[h-2].strip,program:j,chain:!0};break;case 20:this.$=f[h];break;case 21:this.$={path:f[h-1],strip:d.stripFlags(f[h-2],f[h])};break;case 22:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 23:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:f[h-3],params:f[h-2],hash:f[h-1],indent:"",strip:d.stripFlags(f[h-4],f[h]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(f[h-2],f[h-1],f[h],this._$);break;case 26:this.$={path:f[h-3],params:f[h-2],hash:f[h-1],strip:d.stripFlags(f[h-4],f[h])};break;case 27:this.$=f[h];break;case 28:this.$=f[h];break;case 29:this.$={type:"SubExpression",path:f[h-3],params:f[h-2],hash:f[h-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:f[h],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(f[h-2]),value:f[h],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(f[h-1]);break;case 33:this.$=f[h];break;case 34:this.$=f[h];break;case 35:this.$={type:"StringLiteral",value:f[h],original:f[h],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(f[h]),original:Number(f[h]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===f[h],original:"true"===f[h],loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=f[h];break;case 41:this.$=f[h];break;case 42:this.$=d.preparePath(!0,f[h],this._$);break;case 43:this.$=d.preparePath(!1,f[h],this._$);break;case 44:f[h-2].push({part:d.id(f[h]),original:f[h],separator:f[h-1]}),this.$=f[h-2];break;case 45:this.$=[{part:d.id(f[h]),original:f[h]}];break;case 46:this.$=[];break;case 47:f[h-1].push(f[h]);break;case 48:this.$=[];break;case 49:f[h-1].push(f[h]);break;case 50:this.$=[];break;case 51:f[h-1].push(f[h]);break;case 58:this.$=[];break;case 59:f[h-1].push(f[h]);break;case 64:this.$=[];break;case 65:f[h-1].push(f[h]);break;case 70:this.$=[];break;case 71:f[h-1].push(f[h]);break;case 78:this.$=[];break;case 79:f[h-1].push(f[h]);break;case 82:this.$=[];break;case 83:f[h-1].push(f[h]);break;case 86:this.$=[];break;case 87:f[h-1].push(f[h]);break;case 90:this.$=[];break;case 91:f[h-1].push(f[h]);break;case 94:this.$=[];break;case 95:f[h-1].push(f[h]);break;case 98:this.$=[f[h]];break;case 99:f[h-1].push(f[h]);break;case 100:this.$=[f[h]];break;case 101:f[h-1].push(f[h])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45], -84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:(null!==n&&"undefined"!=typeof n||(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;g<f.length&&(c=this._input.match(this.rules[f[g]]),!c||b&&!(c[0].length>b[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substring(a,b.yyleng-c+a)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b.exports=c}),define("handlebars/compiler/visitor",["exports","module","../exception"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(){this.parents=[]}function f(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function g(a){f.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function h(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var i=d(c);e.prototype={constructor:e,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!e.prototype[c.type])throw new i["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new i["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;b<c;b++)this.acceptKey(a,b),a[b]||(a.splice(b,1),b--,c--)},accept:function(a){if(a){if(!this[a.type])throw new i["default"]("Unknown type: "+a.type,a);this.current&&this.parents.unshift(this.current),this.current=a;var b=this[a.type](a);return this.current=this.parents.shift(),!this.mutating||b?b:b!==!1?a:void 0}},Program:function(a){this.acceptArray(a.body)},MustacheStatement:f,Decorator:f,BlockStatement:g,DecoratorBlock:g,PartialStatement:h,PartialBlockStatement:function(a){h.call(this,a),this.acceptKey(a,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:f,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(a){this.acceptArray(a.pairs)},HashPair:function(a){this.acceptRequired(a,"value")}},b.exports=e}),define("handlebars/compiler/whitespace-control",["exports","module","./visitor"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function f(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function g(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function h(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function i(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var j=d(c);e.prototype=new j["default"],e.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,e=0,j=d.length;e<j;e++){var k=d[e],l=this.accept(k);if(l){var m=f(d,e,c),n=g(d,e,c),o=l.openStandalone&&m,p=l.closeStandalone&&n,q=l.inlineStandalone&&m&&n;l.close&&h(d,e,!0),l.open&&i(d,e,!0),b&&q&&(h(d,e),i(d,e)&&"PartialStatement"===k.type&&(k.indent=/([ \t]+$)/.exec(d[e-1].original)[1])),b&&o&&(h((k.program||k.inverse).body),i(d,e)),b&&p&&(h(d,e),i((k.inverse||k.program).body))}}return a},e.prototype.BlockStatement=e.prototype.DecoratorBlock=e.prototype.PartialBlockStatement=function(a){this.accept(a.program),this.accept(a.inverse);var b=a.program||a.inverse,c=a.program&&a.inverse,d=c,e=c;if(c&&c.chained)for(d=c.body[0].program;e.chained;)e=e.body[e.body.length-1].program;var j={open:a.openStrip.open,close:a.closeStrip.close,openStandalone:g(b.body),closeStandalone:f((d||b).body)};if(a.openStrip.close&&h(b.body,null,!0),c){var k=a.inverseStrip;k.open&&i(b.body,null,!0),k.close&&h(d.body,null,!0),a.closeStrip.open&&i(e.body,null,!0),!this.options.ignoreStandalone&&f(b.body)&&g(d.body)&&(i(b.body),h(d.body))}else a.closeStrip.open&&i(b.body,null,!0);return j},e.prototype.Decorator=e.prototype.MustacheStatement=function(a){return a.strip},e.prototype.PartialStatement=e.prototype.CommentStatement=function(a){var b=a.strip||{};return{inlineStandalone:!0,open:b.open,close:b.close}},b.exports=e}),define("handlebars/compiler/helpers",["exports","../exception"],function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a,b){if(b=b.path?b.path.original:b,a.path.original!==b){var c={loc:a.path.loc};throw new o["default"](a.path.original+" doesn't match "+b,c)}}function e(a,b){this.source=a,this.start={line:b.first_line,column:b.first_column},this.end={line:b.last_line,column:b.last_column}}function f(a){return/^\[.*\]$/.test(a)?a.substring(1,a.length-1):a}function g(a,b){return{open:"~"===a.charAt(2),close:"~"===b.charAt(b.length-3)}}function h(a){return a.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function i(a,b,c){c=this.locInfo(c);for(var d=a?"@":"",e=[],f=0,g=0,h=b.length;g<h;g++){var i=b[g].part,j=b[g].original!==i;if(d+=(b[g].separator||"")+i,j||".."!==i&&"."!==i&&"this"!==i)e.push(i);else{if(e.length>0)throw new o["default"]("Invalid path: "+d,{loc:c});".."===i&&f++}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new o["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}a.__esModule=!0,a.SourceLocation=e,a.id=f,a.stripFlags=g,a.stripComment=h,a.preparePath=i,a.prepareMustache=j,a.prepareRawBlock=k,a.prepareBlock=l,a.prepareProgram=m,a.preparePartialBlock=n;var o=c(b)}),define("handlebars/compiler/base",["exports","./parser","./whitespace-control","./helpers","../utils"],function(a,b,c,d,e){"use strict";function f(a){return a&&a.__esModule?a:{"default":a}}function g(a,b){if("Program"===a.type)return a;i["default"].yy=k,k.locInfo=function(a){return new k.SourceLocation(b&&b.srcName,a)};var c=i["default"].parse(a);return c}function h(a,b){var c=g(a,b),d=new j["default"](b);return d.accept(c)}a.__esModule=!0,a.parseWithoutProcessing=g,a.parse=h;var i=f(b),j=f(c);a.parser=i["default"];var k={};e.extend(k,d)}),define("handlebars/compiler/compiler",["exports","../exception","../utils","./ast"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}function f(){}function g(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function h(a,b,d){function e(){var c=d.parse(a,b),e=(new d.Compiler).compile(c,b),f=(new d.JavaScriptCompiler).compile(e,b,void 0,!0);return d.template(f)}function f(a,b){return g||(g=e()),g.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=c.extend({},b),"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var g=void 0;return f._setup=function(a){return g||(g=e()),g._setup(a)},f._child=function(a,b,c,d){return g||(g=e()),g._child(a,b,c,d)},f}function i(a,b){if(a===b)return!0;if(c.isArray(a)&&c.isArray(b)&&a.length===b.length){for(var d=0;d<a.length;d++)if(!i(a[d],b[d]))return!1;return!0}}function j(a){if(!a.path.parts){var b=a.path;a.path={type:"PathExpression",data:!1,depth:0,parts:[b.original+""],original:b.original+"",loc:b.loc}}}a.__esModule=!0,a.Compiler=f,a.precompile=g,a.compile=h;var k=e(b),l=e(d),m=[].slice;f.prototype={compiler:f,equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;c<b;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!i(d.args,e.args))return!1}b=this.children.length;for(var c=0;c<b;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds,b.blockParams=b.blockParams||[],b.knownHelpers=c.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},b.knownHelpers),this.accept(a)},compileProgram:function(a){var b=new this.compiler,c=b.compile(a,this.options),d=this.guid++;return this.usePartial=this.usePartial||c.usePartial,this.children[d]=c,this.useDepths=this.useDepths||c.useDepths,d},accept:function(a){if(!this[a.type])throw new k["default"]("Unknown type: "+a.type,a);this.sourceNode.unshift(a);var b=this[a.type](a);return this.sourceNode.shift(),b},Program:function(a){this.options.blockParams.unshift(a.blockParams);for(var b=a.body,c=b.length,d=0;d<c;d++)this.accept(b[d]);return this.options.blockParams.shift(),this.isSimple=1===c,this.blockParams=a.blockParams?a.blockParams.length:0,this},BlockStatement:function(a){j(a);var b=a.program,c=a.inverse;b=b&&this.compileProgram(b),c=c&&this.compileProgram(c);var d=this.classifySexpr(a);"helper"===d?this.helperSexpr(a,b,c):"simple"===d?(this.simpleSexpr(a),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("blockValue",a.path.original)):(this.ambiguousSexpr(a,b,c),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(a){var b=a.program&&this.compileProgram(a.program),c=this.setupFullMustacheParams(a,b,void 0),d=a.path;this.useDecorators=!0,this.opcode("registerDecorator",c.length,d.original)},PartialStatement:function(a){this.usePartial=!0;var b=a.program;b&&(b=this.compileProgram(a.program));var c=a.params;if(c.length>1)throw new k["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){j(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new k["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,l["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=l["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");c<d;c++)this.pushParam(b[c].value);for(;c--;)this.opcode("assignToHash",b[c].key);this.opcode("popHash")},opcode:function(a){this.opcodes.push({opcode:a,args:m.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(a){a&&(this.useDepths=!0)},classifySexpr:function(a){var b=l["default"].helpers.simpleId(a.path),c=b&&!!this.blockParamIndex(a.path.parts[0]),d=!c&&l["default"].helpers.helperExpression(a),e=!c&&(d||b);if(e&&!d){var f=a.path.parts[0],g=this.options;g.knownHelpers[f]?d=!0:g.knownHelpersOnly&&(e=!1)}return d?"helper":e?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;b<c;b++)this.pushParam(a[b])},pushParam:function(a){var b=null!=a.value?a.value:a.original||"";if(this.stringParams)b.replace&&(b=b.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",b,a.type),"SubExpression"===a.type&&this.accept(a);else{if(this.trackIds){var c=void 0;if(!a.parts||l["default"].helpers.scopedId(a)||a.depth||(c=this.blockParamIndex(a.parts[0])),c){var d=a.parts.slice(1).join(".");this.opcode("pushId","BlockParam",c,d)}else b=a.original||b,b.replace&&(b=b.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",a.type,b)}this.accept(a)}},setupFullMustacheParams:function(a,b,c,d){var e=a.params;return this.pushParams(e),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.accept(a.hash):this.opcode("emptyHash",d),e},blockParamIndex:function(a){for(var b=0,d=this.options.blockParams.length;b<d;b++){var e=this.options.blockParams[b],f=e&&c.indexOf(e,a);if(e&&f>=0)return[b,f]}}}}),define("handlebars/compiler/code-gen",["exports","module","../utils"],function(a,b,c){"use strict";function d(a,b,d){if(c.isArray(a)){for(var e=[],f=0,g=a.length;f<g;f++)e.push(b.wrap(a[f],d));return e}return"boolean"==typeof a||"number"==typeof a?a+"":a}function e(a){this.srcFile=a,this.source=[]}var f=void 0;try{if("function"!=typeof define||!define.amd){var g=require("source-map");f=g.SourceNode}}catch(h){}f||(f=function(a,b,c,d){this.src="",d&&this.add(d)},f.prototype={add:function(a){c.isArray(a)&&(a=a.join("")),this.src+=a},prepend:function(a){c.isArray(a)&&(a=a.join("")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),e.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,b){this.source.unshift(this.wrap(a,b))},push:function(a,b){this.source.push(this.wrap(a,b))},merge:function(){var a=this.empty();return this.each(function(b){a.add([" ",b,"\n"])}),a},each:function(a){for(var b=0,c=this.source.length;b<c;b++)a(this.source[b])},empty:function(){var a=this.currentLocation||{start:{}};return new f(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return a instanceof f?a:(a=d(a,this,b),new f(b.start.line,b.start.column,this.srcFile,a))},functionCall:function(a,b,c){return c=this.generateList(c),this.wrap([a,b?"."+b+"(":"(",c,")"])},quotedString:function(a){return'"'+(a+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=this,c=[];Object.keys(a).forEach(function(e){var f=d(a[e],b);"undefined"!==f&&c.push([b.quotedString(e),":",f])});var e=this.generateList(c);return e.prepend("{"),e.add("}"),e},generateList:function(a){for(var b=this.empty(),c=0,e=a.length;c<e;c++)c&&b.add(","),b.add(d(a[c],this));return b},generateArray:function(a){var b=this.generateList(a);return b.prepend("["),b.add("]"),b}},b.exports=e}),define("handlebars/compiler/javascript-compiler",["exports","module","../base","../exception","../utils","./code-gen"],function(a,b,c,d,e,f){"use strict";function g(a){return a&&a.__esModule?a:{"default":a}}function h(a){this.value=a}function i(){}function j(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;f<g;f++)e=b.nameLookup(e,c[f],d);return a?[b.aliasable("container.strict"),"(",e,", ",b.quotedString(c[f]),", ",JSON.stringify(b.source.currentLocation)," )"]:e}var k=g(d),l=g(f);i.prototype={nameLookup:function(a,b){return this.internalNameLookup(a,b)},depthedLookup:function(a){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(a),")"]},compilerInfo:function(){var a=c.COMPILER_REVISION,b=c.REVISION_CHANGES[a];return[a,b]},appendToBuffer:function(a,b,c){return e.isArray(a)||(a=[a]),a=this.source.wrap(a,b),this.environment.isSimple?["return ",a,";"]:c?["buffer += ",a,";"]:(a.appendToBuffer=!0,a)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(a,b){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",a,",",JSON.stringify(b),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.useDepths||a.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||a.useBlockParams;var e=a.opcodes,f=void 0,g=void 0,h=void 0,i=void 0;for(h=0,i=e.length;h<i;h++)f=e[h],this.source.currentLocation=f.loc,g=g||f.loc,this[f.opcode].apply(this,f.args);if(this.source.currentLocation=g,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new k["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),";\n"]),this.decorators.push("return fn;"),d?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge())); -var j=this.createFunctionContext(d);if(this.isChild)return j;var l={compiler:this.compilerInfo(),main:j};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var m=this.context,n=m.programs,o=m.decorators;for(h=0,i=n.length;h<i;h++)n[h]&&(l[h]=n[h],o[h]&&(l[h+"_d"]=o[h],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),d?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),b.srcName?(l=l.toStringWithSourceMap({file:b.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new l["default"](this.options.srcName),this.decorators=new l["default"](this.options.srcName)},createFunctionContext:function(a){var b=this,c="",d=this.stackVars.concat(this.registers.list);d.length>0&&(c+=", "+d.join(", "));var e=0;Object.keys(this.aliases).forEach(function(a){var d=b.aliases[a];d.children&&d.referenceCount>1&&(c+=", alias"+ ++e+"="+a,d.children[0]="alias"+e)}),this.lookupPropertyFunctionIsUsed&&(c+=", "+this.lookupPropertyFunctionVarDeclaration());var f=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&f.push("blockParams"),this.useDepths&&f.push("depths");var g=this.mergeSource(c);return a?(f.push(g),Function.apply(this,f)):this.source.wrap(["function(",f.join(","),") {\n ",g,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function(a){var b=this.aliasable("container.hooks.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("container.hooks.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var f=this;if(this.options.strict||this.options.assumeObjects)return void this.push(j(this.options.strict&&e,this,b,a));for(var g=b.length;c<g;c++)this.replaceStack(function(e){var g=f.nameLookup(e,b[c],a);return d?[" && ",g]:[" != null ? ",g," : ",e]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"SubExpression"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(a){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(a?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(a.ids)),this.stringParams&&(this.push(this.objectLiteral(a.contexts)),this.push(this.objectLiteral(a.types))),this.push(this.objectLiteral(a.values))},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},registerDecorator:function(a,b){var c=this.nameLookup("decorators",b,"decorator"),d=this.setupHelperArgs(b,a);this.decorators.push(["fn = ",this.decorators.functionCall(c,"",["fn","props","container",d])," || fn;"])},invokeHelper:function(a,b,c){var d=this.popStack(),e=this.setupHelper(a,b),f=[];c&&f.push(e.name),f.push(d),this.options.strict||f.push(this.aliasable("container.hooks.helperMissing"));var g=["(",this.itemsSeparatedBy(f,"||"),")"],h=this.source.functionCall(g,"call",e.callParams);this.push(h)},itemsSeparatedBy:function(a,b){var c=[];c.push(a[0]);for(var d=1;d<a.length;d++)c.push(b,a[d]);return c},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(this.source.functionCall(c.name,"call",c.callParams))},invokeAmbiguous:function(a,b){this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper"),f=["(","(helper = ",e," || ",c,")"];this.options.strict||(f[0]="(helper = ",f.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",f,d.paramsInit?["),(",d.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",d.callParams)," : helper))"])},invokePartial:function(a,b,c){var d=[],e=this.setupParams(b,1,d);a&&(b=this.popStack(),delete e.name),c&&(e.indent=JSON.stringify(c)),e.helpers="helpers",e.partials="partials",e.decorators="container.decorators",a?d.unshift(b):d.unshift(this.nameLookup("partials",b,"partial")),this.options.compat&&(e.depths="depths"),e=this.objectLiteral(e),d.push(e),this.push(this.source.functionCall("container.invokePartial","",d))},assignToHash:function(a){var b=this.popStack(),c=void 0,d=void 0,e=void 0;this.trackIds&&(e=this.popStack()),this.stringParams&&(d=this.popStack(),c=this.popStack());var f=this.hash;c&&(f.contexts[a]=c),d&&(f.types[a]=d),e&&(f.ids[a]=e),f.values[a]=b},pushId:function(a,b,c){"BlockParam"===a?this.pushStackLiteral("blockParams["+b[0]+"].path["+b[1]+"]"+(c?" + "+JSON.stringify("."+c):"")):"PathExpression"===a?this.pushString(b):"SubExpression"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:i,compileChildren:function(a,b){for(var c=a.children,d=void 0,e=void 0,f=0,g=c.length;f<g;f++){d=c[f],e=new this.compiler;var h=this.matchExistingProgram(d);if(null==h){this.context.programs.push("");var i=this.context.programs.length;d.index=i,d.name="program"+i,this.context.programs[i]=e.compile(d,b,this.context,!this.precompile),this.context.decorators[i]=e.decorators,this.context.environments[i]=d,this.useDepths=this.useDepths||e.useDepths,this.useBlockParams=this.useBlockParams||e.useBlockParams,d.useDepths=this.useDepths,d.useBlockParams=this.useBlockParams}else d.index=h.index,d.name="program"+h.index,this.useDepths=this.useDepths||h.useDepths,this.useBlockParams=this.useBlockParams||h.useBlockParams}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;b<c;b++){var d=this.context.environments[b];if(d&&d.equals(a))return d}},programExpression:function(a){var b=this.environment.children[a],c=[b.index,"data",b.blockParams];return(this.useBlockParams||this.useDepths)&&c.push("blockParams"),this.useDepths&&c.push("depths"),"container.program("+c.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},push:function(a){return a instanceof h||(a=this.source.wrap(a)),this.inlineStack.push(a),a},pushStackLiteral:function(a){this.push(new h(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),a&&this.source.push(a)},replaceStack:function(a){var b=["("],c=void 0,d=void 0,e=void 0;if(!this.isInline())throw new k["default"]("replaceStack on non-inline");var f=this.popStack(!0);if(f instanceof h)c=[f.value],b=["(",c],e=!0;else{d=!0;var g=this.incrStack();b=["((",this.push(g)," = ",f,")"],c=this.topStack()}var i=a.call(this,c);e||this.popStack(),d&&this.stackSlot--,this.push(b.concat(i,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;b<c;b++){var d=a[b];if(d instanceof h)this.compileStack.push(d);else{var e=this.incrStack();this.pushSource([e," = ",d,";"]),this.compileStack.push(e)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof h)return c.value;if(!b){if(!this.stackSlot)throw new k["default"]("Invalid stack pop");this.stackSlot--}return c},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof h?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return this.source.quotedString(a)},objectLiteral:function(a){return this.source.objectLiteral(a)},aliasable:function(a){var b=this.aliases[a];return b?(b.referenceCount++,b):(b=this.aliases[a]=this.source.wrap(a),b.aliasable=!0,b.referenceCount=1,b)},setupHelper:function(a,b,c){var d=[],e=this.setupHelperArgs(b,a,d,c),f=this.nameLookup("helpers",b,"helper"),g=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:d,paramsInit:e,name:f,callParams:[g].concat(d)}},setupParams:function(a,b,c){var d={},e=[],f=[],g=[],h=!c,i=void 0;h&&(c=[]),d.name=this.quotedString(a),d.hash=this.popStack(),this.trackIds&&(d.hashIds=this.popStack()),this.stringParams&&(d.hashTypes=this.popStack(),d.hashContexts=this.popStack());var j=this.popStack(),k=this.popStack();(k||j)&&(d.fn=k||"container.noop",d.inverse=j||"container.noop");for(var l=b;l--;)i=this.popStack(),c[l]=i,this.trackIds&&(g[l]=this.popStack()),this.stringParams&&(f[l]=this.popStack(),e[l]=this.popStack());return h&&(d.args=this.source.generateArray(c)),this.trackIds&&(d.ids=this.source.generateArray(g)),this.stringParams&&(d.types=this.source.generateArray(f),d.contexts=this.source.generateArray(e)),this.options.data&&(d.data="data"),this.useBlockParams&&(d.blockParams="blockParams"),d},setupHelperArgs:function(a,b,c,d){var e=this.setupParams(a,b,c);return e.loc=JSON.stringify(this.source.currentLocation),e=this.objectLiteral(e),d?(this.useRegister("options"),c.push("options"),["options=",e]):c?(c.push(e),""):e}},function(){for(var a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),b=i.RESERVED_WORDS={},c=0,d=a.length;c<d;c++)b[a[c]]=!0}(),i.isValidJavaScriptVariableName=function(a){return!i.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},b.exports=i}),define("handlebars",["exports","module","./handlebars.runtime","./handlebars/compiler/ast","./handlebars/compiler/base","./handlebars/compiler/compiler","./handlebars/compiler/javascript-compiler","./handlebars/compiler/visitor","./handlebars/no-conflict"],function(a,b,c,d,e,f,g,h,i){"use strict";function j(a){return a&&a.__esModule?a:{"default":a}}function k(){var a=q();return a.compile=function(b,c){return f.compile(b,c,a)},a.precompile=function(b,c){return f.precompile(b,c,a)},a.AST=m["default"],a.Compiler=f.Compiler,a.JavaScriptCompiler=n["default"],a.Parser=e.parser,a.parse=e.parse,a.parseWithoutProcessing=e.parseWithoutProcessing,a}var l=j(c),m=j(d),n=j(g),o=j(h),p=j(i),q=l["default"].create,r=k();r.create=k,p["default"](r),r.Visitor=o["default"],r["default"]=r,b.exports=r}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/handlebars.js b/node_modules/handlebars/dist/handlebars.js deleted file mode 100644 index baad5d3d..00000000 --- a/node_modules/handlebars/dist/handlebars.js +++ /dev/null @@ -1,5210 +0,0 @@ -/**! - - @license - handlebars v4.7.7 - -Copyright (C) 2011-2019 by Yehuda Katz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["Handlebars"] = factory(); - else - root["Handlebars"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - - var _handlebarsRuntime = __webpack_require__(2); - - var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime); - - // Compiler imports - - var _handlebarsCompilerAst = __webpack_require__(45); - - var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst); - - var _handlebarsCompilerBase = __webpack_require__(46); - - var _handlebarsCompilerCompiler = __webpack_require__(51); - - var _handlebarsCompilerJavascriptCompiler = __webpack_require__(52); - - var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler); - - var _handlebarsCompilerVisitor = __webpack_require__(49); - - var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor); - - var _handlebarsNoConflict = __webpack_require__(44); - - var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); - - var _create = _handlebarsRuntime2['default'].create; - function create() { - var hb = _create(); - - hb.compile = function (input, options) { - return _handlebarsCompilerCompiler.compile(input, options, hb); - }; - hb.precompile = function (input, options) { - return _handlebarsCompilerCompiler.precompile(input, options, hb); - }; - - hb.AST = _handlebarsCompilerAst2['default']; - hb.Compiler = _handlebarsCompilerCompiler.Compiler; - hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default']; - hb.Parser = _handlebarsCompilerBase.parser; - hb.parse = _handlebarsCompilerBase.parse; - hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing; - - return hb; - } - - var inst = create(); - inst.create = create; - - _handlebarsNoConflict2['default'](inst); - - inst.Visitor = _handlebarsCompilerVisitor2['default']; - - inst['default'] = inst; - - exports['default'] = inst; - module.exports = exports['default']; - -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - - "use strict"; - - exports["default"] = function (obj) { - return obj && obj.__esModule ? obj : { - "default": obj - }; - }; - - exports.__esModule = true; - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireWildcard = __webpack_require__(3)['default']; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - - var _handlebarsBase = __webpack_require__(4); - - var base = _interopRequireWildcard(_handlebarsBase); - - // Each of these augment the Handlebars object. No need to setup here. - // (This is done to easily share code between commonjs and browse envs) - - var _handlebarsSafeString = __webpack_require__(37); - - var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); - - var _handlebarsException = __webpack_require__(6); - - var _handlebarsException2 = _interopRequireDefault(_handlebarsException); - - var _handlebarsUtils = __webpack_require__(5); - - var Utils = _interopRequireWildcard(_handlebarsUtils); - - var _handlebarsRuntime = __webpack_require__(38); - - var runtime = _interopRequireWildcard(_handlebarsRuntime); - - var _handlebarsNoConflict = __webpack_require__(44); - - var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); - - // For compatibility and usage outside of module systems, make the Handlebars object a namespace - function create() { - var hb = new base.HandlebarsEnvironment(); - - Utils.extend(hb, base); - hb.SafeString = _handlebarsSafeString2['default']; - hb.Exception = _handlebarsException2['default']; - hb.Utils = Utils; - hb.escapeExpression = Utils.escapeExpression; - - hb.VM = runtime; - hb.template = function (spec) { - return runtime.template(spec, hb); - }; - - return hb; - } - - var inst = create(); - inst.create = create; - - _handlebarsNoConflict2['default'](inst); - - inst['default'] = inst; - - exports['default'] = inst; - module.exports = exports['default']; - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - "use strict"; - - exports["default"] = function (obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - } - - newObj["default"] = obj; - return newObj; - } - }; - - exports.__esModule = true; - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - exports.HandlebarsEnvironment = HandlebarsEnvironment; - - var _utils = __webpack_require__(5); - - var _exception = __webpack_require__(6); - - var _exception2 = _interopRequireDefault(_exception); - - var _helpers = __webpack_require__(10); - - var _decorators = __webpack_require__(30); - - var _logger = __webpack_require__(32); - - var _logger2 = _interopRequireDefault(_logger); - - var _internalProtoAccess = __webpack_require__(33); - - var VERSION = '4.7.7'; - exports.VERSION = VERSION; - var COMPILER_REVISION = 8; - exports.COMPILER_REVISION = COMPILER_REVISION; - var LAST_COMPATIBLE_COMPILER_REVISION = 7; - - exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION; - var REVISION_CHANGES = { - 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it - 2: '== 1.0.0-rc.3', - 3: '== 1.0.0-rc.4', - 4: '== 1.x.x', - 5: '== 2.0.0-alpha.x', - 6: '>= 2.0.0-beta.1', - 7: '>= 4.0.0 <4.3.0', - 8: '>= 4.3.0' - }; - - exports.REVISION_CHANGES = REVISION_CHANGES; - var objectType = '[object Object]'; - - function HandlebarsEnvironment(helpers, partials, decorators) { - this.helpers = helpers || {}; - this.partials = partials || {}; - this.decorators = decorators || {}; - - _helpers.registerDefaultHelpers(this); - _decorators.registerDefaultDecorators(this); - } - - HandlebarsEnvironment.prototype = { - constructor: HandlebarsEnvironment, - - logger: _logger2['default'], - log: _logger2['default'].log, - - registerHelper: function registerHelper(name, fn) { - if (_utils.toString.call(name) === objectType) { - if (fn) { - throw new _exception2['default']('Arg not supported with multiple helpers'); - } - _utils.extend(this.helpers, name); - } else { - this.helpers[name] = fn; - } - }, - unregisterHelper: function unregisterHelper(name) { - delete this.helpers[name]; - }, - - registerPartial: function registerPartial(name, partial) { - if (_utils.toString.call(name) === objectType) { - _utils.extend(this.partials, name); - } else { - if (typeof partial === 'undefined') { - throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined'); - } - this.partials[name] = partial; - } - }, - unregisterPartial: function unregisterPartial(name) { - delete this.partials[name]; - }, - - registerDecorator: function registerDecorator(name, fn) { - if (_utils.toString.call(name) === objectType) { - if (fn) { - throw new _exception2['default']('Arg not supported with multiple decorators'); - } - _utils.extend(this.decorators, name); - } else { - this.decorators[name] = fn; - } - }, - unregisterDecorator: function unregisterDecorator(name) { - delete this.decorators[name]; - }, - /** - * Reset the memory of illegal property accesses that have already been logged. - * @deprecated should only be used in handlebars test-cases - */ - resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() { - _internalProtoAccess.resetLoggedProperties(); - } - }; - - var log = _logger2['default'].log; - - exports.log = log; - exports.createFrame = _utils.createFrame; - exports.logger = _logger2['default']; - -/***/ }), -/* 5 */ -/***/ (function(module, exports) { - - 'use strict'; - - exports.__esModule = true; - exports.extend = extend; - exports.indexOf = indexOf; - exports.escapeExpression = escapeExpression; - exports.isEmpty = isEmpty; - exports.createFrame = createFrame; - exports.blockParams = blockParams; - exports.appendContextPath = appendContextPath; - var escape = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`', - '=': '=' - }; - - var badChars = /[&<>"'`=]/g, - possible = /[&<>"'`=]/; - - function escapeChar(chr) { - return escape[chr]; - } - - function extend(obj /* , ...source */) { - for (var i = 1; i < arguments.length; i++) { - for (var key in arguments[i]) { - if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { - obj[key] = arguments[i][key]; - } - } - } - - return obj; - } - - var toString = Object.prototype.toString; - - exports.toString = toString; - // Sourced from lodash - // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt - /* eslint-disable func-style */ - var isFunction = function isFunction(value) { - return typeof value === 'function'; - }; - // fallback for older versions of Chrome and Safari - /* istanbul ignore next */ - if (isFunction(/x/)) { - exports.isFunction = isFunction = function (value) { - return typeof value === 'function' && toString.call(value) === '[object Function]'; - }; - } - exports.isFunction = isFunction; - - /* eslint-enable func-style */ - - /* istanbul ignore next */ - var isArray = Array.isArray || function (value) { - return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; - }; - - exports.isArray = isArray; - // Older IE versions do not directly support indexOf so we must implement our own, sadly. - - function indexOf(array, value) { - for (var i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { - return i; - } - } - return -1; - } - - function escapeExpression(string) { - if (typeof string !== 'string') { - // don't escape SafeStrings, since they're already safe - if (string && string.toHTML) { - return string.toHTML(); - } else if (string == null) { - return ''; - } else if (!string) { - return string + ''; - } - - // Force a string conversion as this will be done by the append regardless and - // the regex test will do this transparently behind the scenes, causing issues if - // an object's to string has escaped characters in it. - string = '' + string; - } - - if (!possible.test(string)) { - return string; - } - return string.replace(badChars, escapeChar); - } - - function isEmpty(value) { - if (!value && value !== 0) { - return true; - } else if (isArray(value) && value.length === 0) { - return true; - } else { - return false; - } - } - - function createFrame(object) { - var frame = extend({}, object); - frame._parent = object; - return frame; - } - - function blockParams(params, ids) { - params.path = ids; - return params; - } - - function appendContextPath(contextPath, id) { - return (contextPath ? contextPath + '.' : '') + id; - } - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _Object$defineProperty = __webpack_require__(7)['default']; - - exports.__esModule = true; - var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack']; - - function Exception(message, node) { - var loc = node && node.loc, - line = undefined, - endLineNumber = undefined, - column = undefined, - endColumn = undefined; - - if (loc) { - line = loc.start.line; - endLineNumber = loc.end.line; - column = loc.start.column; - endColumn = loc.end.column; - - message += ' - ' + line + ':' + column; - } - - var tmp = Error.prototype.constructor.call(this, message); - - // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. - for (var idx = 0; idx < errorProps.length; idx++) { - this[errorProps[idx]] = tmp[errorProps[idx]]; - } - - /* istanbul ignore else */ - if (Error.captureStackTrace) { - Error.captureStackTrace(this, Exception); - } - - try { - if (loc) { - this.lineNumber = line; - this.endLineNumber = endLineNumber; - - // Work around issue under safari where we can't directly set the column value - /* istanbul ignore next */ - if (_Object$defineProperty) { - Object.defineProperty(this, 'column', { - value: column, - enumerable: true - }); - Object.defineProperty(this, 'endColumn', { - value: endColumn, - enumerable: true - }); - } else { - this.column = column; - this.endColumn = endColumn; - } - } - } catch (nop) { - /* Ignore if the browser is very particular */ - } - } - - Exception.prototype = new Error(); - - exports['default'] = Exception; - module.exports = exports['default']; - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(8), __esModule: true }; - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - - var $ = __webpack_require__(9); - module.exports = function defineProperty(it, key, desc){ - return $.setDesc(it, key, desc); - }; - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - var $Object = Object; - module.exports = { - create: $Object.create, - getProto: $Object.getPrototypeOf, - isEnum: {}.propertyIsEnumerable, - getDesc: $Object.getOwnPropertyDescriptor, - setDesc: $Object.defineProperty, - setDescs: $Object.defineProperties, - getKeys: $Object.keys, - getNames: $Object.getOwnPropertyNames, - getSymbols: $Object.getOwnPropertySymbols, - each: [].forEach - }; - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - exports.registerDefaultHelpers = registerDefaultHelpers; - exports.moveHelperToHooks = moveHelperToHooks; - - var _helpersBlockHelperMissing = __webpack_require__(11); - - var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); - - var _helpersEach = __webpack_require__(12); - - var _helpersEach2 = _interopRequireDefault(_helpersEach); - - var _helpersHelperMissing = __webpack_require__(25); - - var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); - - var _helpersIf = __webpack_require__(26); - - var _helpersIf2 = _interopRequireDefault(_helpersIf); - - var _helpersLog = __webpack_require__(27); - - var _helpersLog2 = _interopRequireDefault(_helpersLog); - - var _helpersLookup = __webpack_require__(28); - - var _helpersLookup2 = _interopRequireDefault(_helpersLookup); - - var _helpersWith = __webpack_require__(29); - - var _helpersWith2 = _interopRequireDefault(_helpersWith); - - function registerDefaultHelpers(instance) { - _helpersBlockHelperMissing2['default'](instance); - _helpersEach2['default'](instance); - _helpersHelperMissing2['default'](instance); - _helpersIf2['default'](instance); - _helpersLog2['default'](instance); - _helpersLookup2['default'](instance); - _helpersWith2['default'](instance); - } - - function moveHelperToHooks(instance, helperName, keepHelper) { - if (instance.helpers[helperName]) { - instance.hooks[helperName] = instance.helpers[helperName]; - if (!keepHelper) { - delete instance.helpers[helperName]; - } - } - } - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _utils = __webpack_require__(5); - - exports['default'] = function (instance) { - instance.registerHelper('blockHelperMissing', function (context, options) { - var inverse = options.inverse, - fn = options.fn; - - if (context === true) { - return fn(this); - } else if (context === false || context == null) { - return inverse(this); - } else if (_utils.isArray(context)) { - if (context.length > 0) { - if (options.ids) { - options.ids = [options.name]; - } - - return instance.helpers.each(context, options); - } else { - return inverse(this); - } - } else { - if (options.data && options.ids) { - var data = _utils.createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); - options = { data: data }; - } - - return fn(context, options); - } - }); - }; - - module.exports = exports['default']; - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(global) {'use strict'; - - var _Object$keys = __webpack_require__(13)['default']; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - - var _utils = __webpack_require__(5); - - var _exception = __webpack_require__(6); - - var _exception2 = _interopRequireDefault(_exception); - - exports['default'] = function (instance) { - instance.registerHelper('each', function (context, options) { - if (!options) { - throw new _exception2['default']('Must pass iterator to #each'); - } - - var fn = options.fn, - inverse = options.inverse, - i = 0, - ret = '', - data = undefined, - contextPath = undefined; - - if (options.data && options.ids) { - contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; - } - - if (_utils.isFunction(context)) { - context = context.call(this); - } - - if (options.data) { - data = _utils.createFrame(options.data); - } - - function execIteration(field, index, last) { - if (data) { - data.key = field; - data.index = index; - data.first = index === 0; - data.last = !!last; - - if (contextPath) { - data.contextPath = contextPath + field; - } - } - - ret = ret + fn(context[field], { - data: data, - blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) - }); - } - - if (context && typeof context === 'object') { - if (_utils.isArray(context)) { - for (var j = context.length; i < j; i++) { - if (i in context) { - execIteration(i, i, i === context.length - 1); - } - } - } else if (global.Symbol && context[global.Symbol.iterator]) { - var newContext = []; - var iterator = context[global.Symbol.iterator](); - for (var it = iterator.next(); !it.done; it = iterator.next()) { - newContext.push(it.value); - } - context = newContext; - for (var j = context.length; i < j; i++) { - execIteration(i, i, i === context.length - 1); - } - } else { - (function () { - var priorKey = undefined; - - _Object$keys(context).forEach(function (key) { - // We're running the iterations one step out of sync so we can detect - // the last iteration without have to scan the object twice and create - // an itermediate keys array. - if (priorKey !== undefined) { - execIteration(priorKey, i - 1); - } - priorKey = key; - i++; - }); - if (priorKey !== undefined) { - execIteration(priorKey, i - 1, true); - } - })(); - } - } - - if (i === 0) { - ret = inverse(this); - } - - return ret; - }); - }; - - module.exports = exports['default']; - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(14), __esModule: true }; - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - - __webpack_require__(15); - module.exports = __webpack_require__(21).Object.keys; - -/***/ }), -/* 15 */ -/***/ (function(module, exports, __webpack_require__) { - - // 19.1.2.14 Object.keys(O) - var toObject = __webpack_require__(16); - - __webpack_require__(18)('keys', function($keys){ - return function keys(it){ - return $keys(toObject(it)); - }; - }); - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - - // 7.1.13 ToObject(argument) - var defined = __webpack_require__(17); - module.exports = function(it){ - return Object(defined(it)); - }; - -/***/ }), -/* 17 */ -/***/ (function(module, exports) { - - // 7.2.1 RequireObjectCoercible(argument) - module.exports = function(it){ - if(it == undefined)throw TypeError("Can't call method on " + it); - return it; - }; - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - - // most Object methods by ES6 should accept primitives - var $export = __webpack_require__(19) - , core = __webpack_require__(21) - , fails = __webpack_require__(24); - module.exports = function(KEY, exec){ - var fn = (core.Object || {})[KEY] || Object[KEY] - , exp = {}; - exp[KEY] = exec(fn); - $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); - }; - -/***/ }), -/* 19 */ -/***/ (function(module, exports, __webpack_require__) { - - var global = __webpack_require__(20) - , core = __webpack_require__(21) - , ctx = __webpack_require__(22) - , PROTOTYPE = 'prototype'; - - var $export = function(type, name, source){ - var IS_FORCED = type & $export.F - , IS_GLOBAL = type & $export.G - , IS_STATIC = type & $export.S - , IS_PROTO = type & $export.P - , IS_BIND = type & $export.B - , IS_WRAP = type & $export.W - , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) - , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] - , key, own, out; - if(IS_GLOBAL)source = name; - for(key in source){ - // contains in native - own = !IS_FORCED && target && key in target; - if(own && key in exports)continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] - // bind timers to global for call from export context - : IS_BIND && own ? ctx(out, global) - // wrap global constructors for prevent change them in library - : IS_WRAP && target[key] == out ? (function(C){ - var F = function(param){ - return this instanceof C ? new C(param) : C(param); - }; - F[PROTOTYPE] = C[PROTOTYPE]; - return F; - // make static versions for prototype methods - })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; - } - }; - // type bitmap - $export.F = 1; // forced - $export.G = 2; // global - $export.S = 4; // static - $export.P = 8; // proto - $export.B = 16; // bind - $export.W = 32; // wrap - module.exports = $export; - -/***/ }), -/* 20 */ -/***/ (function(module, exports) { - - // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 - var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); - if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef - -/***/ }), -/* 21 */ -/***/ (function(module, exports) { - - var core = module.exports = {version: '1.2.6'}; - if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - - // optional / simple context binding - var aFunction = __webpack_require__(23); - module.exports = function(fn, that, length){ - aFunction(fn); - if(that === undefined)return fn; - switch(length){ - case 1: return function(a){ - return fn.call(that, a); - }; - case 2: return function(a, b){ - return fn.call(that, a, b); - }; - case 3: return function(a, b, c){ - return fn.call(that, a, b, c); - }; - } - return function(/* ...args */){ - return fn.apply(that, arguments); - }; - }; - -/***/ }), -/* 23 */ -/***/ (function(module, exports) { - - module.exports = function(it){ - if(typeof it != 'function')throw TypeError(it + ' is not a function!'); - return it; - }; - -/***/ }), -/* 24 */ -/***/ (function(module, exports) { - - module.exports = function(exec){ - try { - return !!exec(); - } catch(e){ - return true; - } - }; - -/***/ }), -/* 25 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - - var _exception = __webpack_require__(6); - - var _exception2 = _interopRequireDefault(_exception); - - exports['default'] = function (instance) { - instance.registerHelper('helperMissing', function () /* [args, ]options */{ - if (arguments.length === 1) { - // A missing field in a {{foo}} construct. - return undefined; - } else { - // Someone is actually trying to call something, blow up. - throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); - } - }); - }; - - module.exports = exports['default']; - -/***/ }), -/* 26 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - - var _utils = __webpack_require__(5); - - var _exception = __webpack_require__(6); - - var _exception2 = _interopRequireDefault(_exception); - - exports['default'] = function (instance) { - instance.registerHelper('if', function (conditional, options) { - if (arguments.length != 2) { - throw new _exception2['default']('#if requires exactly one argument'); - } - if (_utils.isFunction(conditional)) { - conditional = conditional.call(this); - } - - // Default behavior is to render the positive path if the value is truthy and not empty. - // The `includeZero` option may be set to treat the condtional as purely not empty based on the - // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. - if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { - return options.inverse(this); - } else { - return options.fn(this); - } - }); - - instance.registerHelper('unless', function (conditional, options) { - if (arguments.length != 2) { - throw new _exception2['default']('#unless requires exactly one argument'); - } - return instance.helpers['if'].call(this, conditional, { - fn: options.inverse, - inverse: options.fn, - hash: options.hash - }); - }); - }; - - module.exports = exports['default']; - -/***/ }), -/* 27 */ -/***/ (function(module, exports) { - - 'use strict'; - - exports.__esModule = true; - - exports['default'] = function (instance) { - instance.registerHelper('log', function () /* message, options */{ - var args = [undefined], - options = arguments[arguments.length - 1]; - for (var i = 0; i < arguments.length - 1; i++) { - args.push(arguments[i]); - } - - var level = 1; - if (options.hash.level != null) { - level = options.hash.level; - } else if (options.data && options.data.level != null) { - level = options.data.level; - } - args[0] = level; - - instance.log.apply(instance, args); - }); - }; - - module.exports = exports['default']; - -/***/ }), -/* 28 */ -/***/ (function(module, exports) { - - 'use strict'; - - exports.__esModule = true; - - exports['default'] = function (instance) { - instance.registerHelper('lookup', function (obj, field, options) { - if (!obj) { - // Note for 5.0: Change to "obj == null" in 5.0 - return obj; - } - return options.lookupProperty(obj, field); - }); - }; - - module.exports = exports['default']; - -/***/ }), -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - - var _utils = __webpack_require__(5); - - var _exception = __webpack_require__(6); - - var _exception2 = _interopRequireDefault(_exception); - - exports['default'] = function (instance) { - instance.registerHelper('with', function (context, options) { - if (arguments.length != 2) { - throw new _exception2['default']('#with requires exactly one argument'); - } - if (_utils.isFunction(context)) { - context = context.call(this); - } - - var fn = options.fn; - - if (!_utils.isEmpty(context)) { - var data = options.data; - if (options.data && options.ids) { - data = _utils.createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); - } - - return fn(context, { - data: data, - blockParams: _utils.blockParams([context], [data && data.contextPath]) - }); - } else { - return options.inverse(this); - } - }); - }; - - module.exports = exports['default']; - -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - exports.registerDefaultDecorators = registerDefaultDecorators; - - var _decoratorsInline = __webpack_require__(31); - - var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); - - function registerDefaultDecorators(instance) { - _decoratorsInline2['default'](instance); - } - -/***/ }), -/* 31 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _utils = __webpack_require__(5); - - exports['default'] = function (instance) { - instance.registerDecorator('inline', function (fn, props, container, options) { - var ret = fn; - if (!props.partials) { - props.partials = {}; - ret = function (context, options) { - // Create a new partials stack frame prior to exec. - var original = container.partials; - container.partials = _utils.extend({}, original, props.partials); - var ret = fn(context, options); - container.partials = original; - return ret; - }; - } - - props.partials[options.args[0]] = options.fn; - - return ret; - }); - }; - - module.exports = exports['default']; - -/***/ }), -/* 32 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _utils = __webpack_require__(5); - - var logger = { - methodMap: ['debug', 'info', 'warn', 'error'], - level: 'info', - - // Maps a given level value to the `methodMap` indexes above. - lookupLevel: function lookupLevel(level) { - if (typeof level === 'string') { - var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); - if (levelMap >= 0) { - level = levelMap; - } else { - level = parseInt(level, 10); - } - } - - return level; - }, - - // Can be overridden in the host environment - log: function log(level) { - level = logger.lookupLevel(level); - - if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { - var method = logger.methodMap[level]; - // eslint-disable-next-line no-console - if (!console[method]) { - method = 'log'; - } - - for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - message[_key - 1] = arguments[_key]; - } - - console[method].apply(console, message); // eslint-disable-line no-console - } - } - }; - - exports['default'] = logger; - module.exports = exports['default']; - -/***/ }), -/* 33 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _Object$create = __webpack_require__(34)['default']; - - var _Object$keys = __webpack_require__(13)['default']; - - var _interopRequireWildcard = __webpack_require__(3)['default']; - - exports.__esModule = true; - exports.createProtoAccessControl = createProtoAccessControl; - exports.resultIsAllowed = resultIsAllowed; - exports.resetLoggedProperties = resetLoggedProperties; - - var _createNewLookupObject = __webpack_require__(36); - - var _logger = __webpack_require__(32); - - var logger = _interopRequireWildcard(_logger); - - var loggedProperties = _Object$create(null); - - function createProtoAccessControl(runtimeOptions) { - var defaultMethodWhiteList = _Object$create(null); - defaultMethodWhiteList['constructor'] = false; - defaultMethodWhiteList['__defineGetter__'] = false; - defaultMethodWhiteList['__defineSetter__'] = false; - defaultMethodWhiteList['__lookupGetter__'] = false; - - var defaultPropertyWhiteList = _Object$create(null); - // eslint-disable-next-line no-proto - defaultPropertyWhiteList['__proto__'] = false; - - return { - properties: { - whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties), - defaultValue: runtimeOptions.allowProtoPropertiesByDefault - }, - methods: { - whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods), - defaultValue: runtimeOptions.allowProtoMethodsByDefault - } - }; - } - - function resultIsAllowed(result, protoAccessControl, propertyName) { - if (typeof result === 'function') { - return checkWhiteList(protoAccessControl.methods, propertyName); - } else { - return checkWhiteList(protoAccessControl.properties, propertyName); - } - } - - function checkWhiteList(protoAccessControlForType, propertyName) { - if (protoAccessControlForType.whitelist[propertyName] !== undefined) { - return protoAccessControlForType.whitelist[propertyName] === true; - } - if (protoAccessControlForType.defaultValue !== undefined) { - return protoAccessControlForType.defaultValue; - } - logUnexpecedPropertyAccessOnce(propertyName); - return false; - } - - function logUnexpecedPropertyAccessOnce(propertyName) { - if (loggedProperties[propertyName] !== true) { - loggedProperties[propertyName] = true; - logger.log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'); - } - } - - function resetLoggedProperties() { - _Object$keys(loggedProperties).forEach(function (propertyName) { - delete loggedProperties[propertyName]; - }); - } - -/***/ }), -/* 34 */ -/***/ (function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(35), __esModule: true }; - -/***/ }), -/* 35 */ -/***/ (function(module, exports, __webpack_require__) { - - var $ = __webpack_require__(9); - module.exports = function create(P, D){ - return $.create(P, D); - }; - -/***/ }), -/* 36 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _Object$create = __webpack_require__(34)['default']; - - exports.__esModule = true; - exports.createNewLookupObject = createNewLookupObject; - - var _utils = __webpack_require__(5); - - /** - * Create a new object with "null"-prototype to avoid truthy results on prototype properties. - * The resulting object can be used with "object[property]" to check if a property exists - * @param {...object} sources a varargs parameter of source objects that will be merged - * @returns {object} - */ - - function createNewLookupObject() { - for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) { - sources[_key] = arguments[_key]; - } - - return _utils.extend.apply(undefined, [_Object$create(null)].concat(sources)); - } - -/***/ }), -/* 37 */ -/***/ (function(module, exports) { - - // Build out our basic SafeString type - 'use strict'; - - exports.__esModule = true; - function SafeString(string) { - this.string = string; - } - - SafeString.prototype.toString = SafeString.prototype.toHTML = function () { - return '' + this.string; - }; - - exports['default'] = SafeString; - module.exports = exports['default']; - -/***/ }), -/* 38 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _Object$seal = __webpack_require__(39)['default']; - - var _Object$keys = __webpack_require__(13)['default']; - - var _interopRequireWildcard = __webpack_require__(3)['default']; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - exports.checkRevision = checkRevision; - exports.template = template; - exports.wrapProgram = wrapProgram; - exports.resolvePartial = resolvePartial; - exports.invokePartial = invokePartial; - exports.noop = noop; - - var _utils = __webpack_require__(5); - - var Utils = _interopRequireWildcard(_utils); - - var _exception = __webpack_require__(6); - - var _exception2 = _interopRequireDefault(_exception); - - var _base = __webpack_require__(4); - - var _helpers = __webpack_require__(10); - - var _internalWrapHelper = __webpack_require__(43); - - var _internalProtoAccess = __webpack_require__(33); - - function checkRevision(compilerInfo) { - var compilerRevision = compilerInfo && compilerInfo[0] || 1, - currentRevision = _base.COMPILER_REVISION; - - if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) { - return; - } - - if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) { - var runtimeVersions = _base.REVISION_CHANGES[currentRevision], - compilerVersions = _base.REVISION_CHANGES[compilerRevision]; - throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); - } else { - // Use the embedded version info since the runtime doesn't know about this revision yet - throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); - } - } - - function template(templateSpec, env) { - /* istanbul ignore next */ - if (!env) { - throw new _exception2['default']('No environment passed to template'); - } - if (!templateSpec || !templateSpec.main) { - throw new _exception2['default']('Unknown template object: ' + typeof templateSpec); - } - - templateSpec.main.decorator = templateSpec.main_d; - - // Note: Using env.VM references rather than local var references throughout this section to allow - // for external users to override these as pseudo-supported APIs. - env.VM.checkRevision(templateSpec.compiler); - - // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0) - var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7; - - function invokePartialWrapper(partial, context, options) { - if (options.hash) { - context = Utils.extend({}, context, options.hash); - if (options.ids) { - options.ids[0] = true; - } - } - partial = env.VM.resolvePartial.call(this, partial, context, options); - - var extendedOptions = Utils.extend({}, options, { - hooks: this.hooks, - protoAccessControl: this.protoAccessControl - }); - - var result = env.VM.invokePartial.call(this, partial, context, extendedOptions); - - if (result == null && env.compile) { - options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); - result = options.partials[options.name](context, extendedOptions); - } - if (result != null) { - if (options.indent) { - var lines = result.split('\n'); - for (var i = 0, l = lines.length; i < l; i++) { - if (!lines[i] && i + 1 === l) { - break; - } - - lines[i] = options.indent + lines[i]; - } - result = lines.join('\n'); - } - return result; - } else { - throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); - } - } - - // Just add water - var container = { - strict: function strict(obj, name, loc) { - if (!obj || !(name in obj)) { - throw new _exception2['default']('"' + name + '" not defined in ' + obj, { - loc: loc - }); - } - return container.lookupProperty(obj, name); - }, - lookupProperty: function lookupProperty(parent, propertyName) { - var result = parent[propertyName]; - if (result == null) { - return result; - } - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return result; - } - - if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) { - return result; - } - return undefined; - }, - lookup: function lookup(depths, name) { - var len = depths.length; - for (var i = 0; i < len; i++) { - var result = depths[i] && container.lookupProperty(depths[i], name); - if (result != null) { - return depths[i][name]; - } - } - }, - lambda: function lambda(current, context) { - return typeof current === 'function' ? current.call(context) : current; - }, - - escapeExpression: Utils.escapeExpression, - invokePartial: invokePartialWrapper, - - fn: function fn(i) { - var ret = templateSpec[i]; - ret.decorator = templateSpec[i + '_d']; - return ret; - }, - - programs: [], - program: function program(i, data, declaredBlockParams, blockParams, depths) { - var programWrapper = this.programs[i], - fn = this.fn(i); - if (data || depths || blockParams || declaredBlockParams) { - programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); - } else if (!programWrapper) { - programWrapper = this.programs[i] = wrapProgram(this, i, fn); - } - return programWrapper; - }, - - data: function data(value, depth) { - while (value && depth--) { - value = value._parent; - } - return value; - }, - mergeIfNeeded: function mergeIfNeeded(param, common) { - var obj = param || common; - - if (param && common && param !== common) { - obj = Utils.extend({}, common, param); - } - - return obj; - }, - // An empty object to use as replacement for null-contexts - nullContext: _Object$seal({}), - - noop: env.VM.noop, - compilerInfo: templateSpec.compiler - }; - - function ret(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var data = options.data; - - ret._setup(options); - if (!options.partial && templateSpec.useData) { - data = initData(context, data); - } - var depths = undefined, - blockParams = templateSpec.useBlockParams ? [] : undefined; - if (templateSpec.useDepths) { - if (options.depths) { - depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths; - } else { - depths = [context]; - } - } - - function main(context /*, options*/) { - return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); - } - - main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); - return main(context, options); - } - - ret.isTop = true; - - ret._setup = function (options) { - if (!options.partial) { - var mergedHelpers = Utils.extend({}, env.helpers, options.helpers); - wrapHelpersToPassLookupProperty(mergedHelpers, container); - container.helpers = mergedHelpers; - - if (templateSpec.usePartial) { - // Use mergeIfNeeded here to prevent compiling global partials multiple times - container.partials = container.mergeIfNeeded(options.partials, env.partials); - } - if (templateSpec.usePartial || templateSpec.useDecorators) { - container.decorators = Utils.extend({}, env.decorators, options.decorators); - } - - container.hooks = {}; - container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options); - - var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7; - _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers); - _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers); - } else { - container.protoAccessControl = options.protoAccessControl; // internal option - container.helpers = options.helpers; - container.partials = options.partials; - container.decorators = options.decorators; - container.hooks = options.hooks; - } - }; - - ret._child = function (i, data, blockParams, depths) { - if (templateSpec.useBlockParams && !blockParams) { - throw new _exception2['default']('must pass block params'); - } - if (templateSpec.useDepths && !depths) { - throw new _exception2['default']('must pass parent depths'); - } - - return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); - }; - return ret; - } - - function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { - function prog(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var currentDepths = depths; - if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) { - currentDepths = [context].concat(depths); - } - - return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); - } - - prog = executeDecorators(fn, prog, container, depths, data, blockParams); - - prog.program = i; - prog.depth = depths ? depths.length : 0; - prog.blockParams = declaredBlockParams || 0; - return prog; - } - - /** - * This is currently part of the official API, therefore implementation details should not be changed. - */ - - function resolvePartial(partial, context, options) { - if (!partial) { - if (options.name === '@partial-block') { - partial = options.data['partial-block']; - } else { - partial = options.partials[options.name]; - } - } else if (!partial.call && !options.name) { - // This is a dynamic partial that returned a string - options.name = partial; - partial = options.partials[partial]; - } - return partial; - } - - function invokePartial(partial, context, options) { - // Use the current closure context to save the partial-block if this partial - var currentPartialBlock = options.data && options.data['partial-block']; - options.partial = true; - if (options.ids) { - options.data.contextPath = options.ids[0] || options.data.contextPath; - } - - var partialBlock = undefined; - if (options.fn && options.fn !== noop) { - (function () { - options.data = _base.createFrame(options.data); - // Wrapper function to get access to currentPartialBlock from the closure - var fn = options.fn; - partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - // Restore the partial-block from the closure for the execution of the block - // i.e. the part inside the block of the partial call. - options.data = _base.createFrame(options.data); - options.data['partial-block'] = currentPartialBlock; - return fn(context, options); - }; - if (fn.partials) { - options.partials = Utils.extend({}, options.partials, fn.partials); - } - })(); - } - - if (partial === undefined && partialBlock) { - partial = partialBlock; - } - - if (partial === undefined) { - throw new _exception2['default']('The partial ' + options.name + ' could not be found'); - } else if (partial instanceof Function) { - return partial(context, options); - } - } - - function noop() { - return ''; - } - - function initData(context, data) { - if (!data || !('root' in data)) { - data = data ? _base.createFrame(data) : {}; - data.root = context; - } - return data; - } - - function executeDecorators(fn, prog, container, depths, data, blockParams) { - if (fn.decorator) { - var props = {}; - prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); - Utils.extend(prog, props); - } - return prog; - } - - function wrapHelpersToPassLookupProperty(mergedHelpers, container) { - _Object$keys(mergedHelpers).forEach(function (helperName) { - var helper = mergedHelpers[helperName]; - mergedHelpers[helperName] = passLookupPropertyOption(helper, container); - }); - } - - function passLookupPropertyOption(helper, container) { - var lookupProperty = container.lookupProperty; - return _internalWrapHelper.wrapHelper(helper, function (options) { - return Utils.extend({ lookupProperty: lookupProperty }, options); - }); - } - -/***/ }), -/* 39 */ -/***/ (function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(40), __esModule: true }; - -/***/ }), -/* 40 */ -/***/ (function(module, exports, __webpack_require__) { - - __webpack_require__(41); - module.exports = __webpack_require__(21).Object.seal; - -/***/ }), -/* 41 */ -/***/ (function(module, exports, __webpack_require__) { - - // 19.1.2.17 Object.seal(O) - var isObject = __webpack_require__(42); - - __webpack_require__(18)('seal', function($seal){ - return function seal(it){ - return $seal && isObject(it) ? $seal(it) : it; - }; - }); - -/***/ }), -/* 42 */ -/***/ (function(module, exports) { - - module.exports = function(it){ - return typeof it === 'object' ? it !== null : typeof it === 'function'; - }; - -/***/ }), -/* 43 */ -/***/ (function(module, exports) { - - 'use strict'; - - exports.__esModule = true; - exports.wrapHelper = wrapHelper; - - function wrapHelper(helper, transformOptionsFn) { - if (typeof helper !== 'function') { - // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639 - // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function. - return helper; - } - var wrapper = function wrapper() /* dynamic arguments */{ - var options = arguments[arguments.length - 1]; - arguments[arguments.length - 1] = transformOptionsFn(options); - return helper.apply(this, arguments); - }; - return wrapper; - } - -/***/ }), -/* 44 */ -/***/ (function(module, exports) { - - /* WEBPACK VAR INJECTION */(function(global) {'use strict'; - - exports.__esModule = true; - - exports['default'] = function (Handlebars) { - /* istanbul ignore next */ - var root = typeof global !== 'undefined' ? global : window, - $Handlebars = root.Handlebars; - /* istanbul ignore next */ - Handlebars.noConflict = function () { - if (root.Handlebars === Handlebars) { - root.Handlebars = $Handlebars; - } - return Handlebars; - }; - }; - - module.exports = exports['default']; - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - -/***/ }), -/* 45 */ -/***/ (function(module, exports) { - - 'use strict'; - - exports.__esModule = true; - var AST = { - // Public API used to evaluate derived attributes regarding AST nodes - helpers: { - // a mustache is definitely a helper if: - // * it is an eligible helper, and - // * it has at least one parameter or hash segment - helperExpression: function helperExpression(node) { - return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash); - }, - - scopedId: function scopedId(path) { - return (/^\.|this\b/.test(path.original) - ); - }, - - // an ID is simple if it only has one part, and that part is not - // `..` or `this`. - simpleId: function simpleId(path) { - return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; - } - } - }; - - // Must be exported as an object rather than the root of the module as the jison lexer - // must modify the object to operate properly. - exports['default'] = AST; - module.exports = exports['default']; - -/***/ }), -/* 46 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - var _interopRequireWildcard = __webpack_require__(3)['default']; - - exports.__esModule = true; - exports.parseWithoutProcessing = parseWithoutProcessing; - exports.parse = parse; - - var _parser = __webpack_require__(47); - - var _parser2 = _interopRequireDefault(_parser); - - var _whitespaceControl = __webpack_require__(48); - - var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl); - - var _helpers = __webpack_require__(50); - - var Helpers = _interopRequireWildcard(_helpers); - - var _utils = __webpack_require__(5); - - exports.parser = _parser2['default']; - - var yy = {}; - _utils.extend(yy, Helpers); - - function parseWithoutProcessing(input, options) { - // Just return if an already-compiled AST was passed in. - if (input.type === 'Program') { - return input; - } - - _parser2['default'].yy = yy; - - // Altering the shared object here, but this is ok as parser is a sync operation - yy.locInfo = function (locInfo) { - return new yy.SourceLocation(options && options.srcName, locInfo); - }; - - var ast = _parser2['default'].parse(input); - - return ast; - } - - function parse(input, options) { - var ast = parseWithoutProcessing(input, options); - var strip = new _whitespaceControl2['default'](options); - - return strip.accept(ast); - } - -/***/ }), -/* 47 */ -/***/ (function(module, exports) { - - // File ignored in coverage tests via setting in .istanbul.yml - /* Jison generated parser */ - "use strict"; - - exports.__esModule = true; - var handlebars = (function () { - var parser = { trace: function trace() {}, - yy: {}, - symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 }, - terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" }, - productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 0], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - - var $0 = $$.length - 1; - switch (yystate) { - case 1: - return $$[$0 - 1]; - break; - case 2: - this.$ = yy.prepareProgram($$[$0]); - break; - case 3: - this.$ = $$[$0]; - break; - case 4: - this.$ = $$[$0]; - break; - case 5: - this.$ = $$[$0]; - break; - case 6: - this.$ = $$[$0]; - break; - case 7: - this.$ = $$[$0]; - break; - case 8: - this.$ = $$[$0]; - break; - case 9: - this.$ = { - type: 'CommentStatement', - value: yy.stripComment($$[$0]), - strip: yy.stripFlags($$[$0], $$[$0]), - loc: yy.locInfo(this._$) - }; - - break; - case 10: - this.$ = { - type: 'ContentStatement', - original: $$[$0], - value: $$[$0], - loc: yy.locInfo(this._$) - }; - - break; - case 11: - this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); - break; - case 12: - this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; - break; - case 13: - this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); - break; - case 14: - this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); - break; - case 15: - this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 16: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 17: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 18: - this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; - break; - case 19: - var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), - program = yy.prepareProgram([inverse], $$[$0 - 1].loc); - program.chained = true; - - this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true }; - - break; - case 20: - this.$ = $$[$0]; - break; - case 21: - this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; - break; - case 22: - this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); - break; - case 23: - this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); - break; - case 24: - this.$ = { - type: 'PartialStatement', - name: $$[$0 - 3], - params: $$[$0 - 2], - hash: $$[$0 - 1], - indent: '', - strip: yy.stripFlags($$[$0 - 4], $$[$0]), - loc: yy.locInfo(this._$) - }; - - break; - case 25: - this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); - break; - case 26: - this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) }; - break; - case 27: - this.$ = $$[$0]; - break; - case 28: - this.$ = $$[$0]; - break; - case 29: - this.$ = { - type: 'SubExpression', - path: $$[$0 - 3], - params: $$[$0 - 2], - hash: $$[$0 - 1], - loc: yy.locInfo(this._$) - }; - - break; - case 30: - this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) }; - break; - case 31: - this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) }; - break; - case 32: - this.$ = yy.id($$[$0 - 1]); - break; - case 33: - this.$ = $$[$0]; - break; - case 34: - this.$ = $$[$0]; - break; - case 35: - this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) }; - break; - case 36: - this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) }; - break; - case 37: - this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) }; - break; - case 38: - this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) }; - break; - case 39: - this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) }; - break; - case 40: - this.$ = $$[$0]; - break; - case 41: - this.$ = $$[$0]; - break; - case 42: - this.$ = yy.preparePath(true, $$[$0], this._$); - break; - case 43: - this.$ = yy.preparePath(false, $$[$0], this._$); - break; - case 44: - $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2]; - break; - case 45: - this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; - break; - case 46: - this.$ = []; - break; - case 47: - $$[$0 - 1].push($$[$0]); - break; - case 48: - this.$ = []; - break; - case 49: - $$[$0 - 1].push($$[$0]); - break; - case 50: - this.$ = []; - break; - case 51: - $$[$0 - 1].push($$[$0]); - break; - case 58: - this.$ = []; - break; - case 59: - $$[$0 - 1].push($$[$0]); - break; - case 64: - this.$ = []; - break; - case 65: - $$[$0 - 1].push($$[$0]); - break; - case 70: - this.$ = []; - break; - case 71: - $$[$0 - 1].push($$[$0]); - break; - case 78: - this.$ = []; - break; - case 79: - $$[$0 - 1].push($$[$0]); - break; - case 82: - this.$ = []; - break; - case 83: - $$[$0 - 1].push($$[$0]); - break; - case 86: - this.$ = []; - break; - case 87: - $$[$0 - 1].push($$[$0]); - break; - case 90: - this.$ = []; - break; - case 91: - $$[$0 - 1].push($$[$0]); - break; - case 94: - this.$ = []; - break; - case 95: - $$[$0 - 1].push($$[$0]); - break; - case 98: - this.$ = [$$[$0]]; - break; - case 99: - $$[$0 - 1].push($$[$0]); - break; - case 100: - this.$ = [$$[$0]]; - break; - case 101: - $$[$0 - 1].push($$[$0]); - break; - } - }, - table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 15: [2, 48], 17: 39, 18: [2, 48] }, { 20: 41, 56: 40, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 44, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 45, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 41, 56: 48, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 49, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 50] }, { 72: [1, 35], 86: 51 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 52, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 53, 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 54, 47: [2, 54] }, { 28: 59, 43: 60, 44: [1, 58], 47: [2, 56] }, { 13: 62, 15: [1, 20], 18: [1, 61] }, { 33: [2, 86], 57: 63, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 64, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 65, 47: [1, 66] }, { 30: 67, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 68, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 69, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 70, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 74, 33: [2, 80], 50: 71, 63: 72, 64: 75, 65: [1, 43], 69: 73, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 79] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 50] }, { 20: 74, 53: 80, 54: [2, 84], 63: 81, 64: 75, 65: [1, 43], 69: 82, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 83, 47: [1, 66] }, { 47: [2, 55] }, { 4: 84, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 85, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 86, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 87, 47: [1, 66] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 74, 33: [2, 88], 58: 88, 63: 89, 64: 75, 65: [1, 43], 69: 90, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 91, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 92, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 31: 93, 33: [2, 60], 63: 94, 64: 75, 65: [1, 43], 69: 95, 70: 76, 71: 77, 72: [1, 78], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 66], 36: 96, 63: 97, 64: 75, 65: [1, 43], 69: 98, 70: 76, 71: 77, 72: [1, 78], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 22: 99, 23: [2, 52], 63: 100, 64: 75, 65: [1, 43], 69: 101, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 92], 62: 102, 63: 103, 64: 75, 65: [1, 43], 69: 104, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 105] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 106, 72: [1, 107], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 108], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 109] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 111, 46: 110, 47: [2, 76] }, { 33: [2, 70], 40: 112, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 113] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 74, 63: 115, 64: 75, 65: [1, 43], 67: 114, 68: [2, 96], 69: 116, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 117] }, { 32: 118, 33: [2, 62], 74: 119, 75: [1, 120] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 121, 74: 122, 75: [1, 120] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 123] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 124] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 108] }, { 20: 74, 63: 125, 64: 75, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 74, 33: [2, 72], 41: 126, 63: 127, 64: 75, 65: [1, 43], 69: 128, 70: 76, 71: 77, 72: [1, 78], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 129] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 130] }, { 33: [2, 63] }, { 72: [1, 132], 76: 131 }, { 33: [1, 133] }, { 33: [2, 69] }, { 15: [2, 12], 18: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 134, 74: 135, 75: [1, 120] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 137], 77: [1, 136] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 138] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], - defaultActions: { 4: [2, 1], 54: [2, 55], 56: [2, 20], 60: [2, 57], 73: [2, 81], 82: [2, 85], 86: [2, 18], 90: [2, 89], 101: [2, 53], 104: [2, 93], 110: [2, 19], 111: [2, 77], 116: [2, 97], 119: [2, 63], 122: [2, 69], 135: [2, 75], 136: [2, 32] }, - parseError: function parseError(str, hash) { - throw new Error(str); - }, - parse: function parse(input) { - var self = this, - stack = [0], - vstack = [null], - lstack = [], - table = this.table, - yytext = "", - yylineno = 0, - yyleng = 0, - recovering = 0, - TERROR = 2, - EOF = 1; - this.lexer.setInput(input); - this.lexer.yy = this.yy; - this.yy.lexer = this.lexer; - this.yy.parser = this; - if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; - var yyloc = this.lexer.yylloc; - lstack.push(yyloc); - var ranges = this.lexer.options && this.lexer.options.ranges; - if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = self.lexer.lex() || 1; - if (typeof token !== "number") { - token = self.symbols_[token] || token; - } - return token; - } - var symbol, - preErrorSymbol, - state, - action, - a, - r, - yyval = {}, - p, - len, - newState, - expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - if (!recovering) { - expected = []; - for (p in table[state]) if (this.terminals_[p] && p > 2) { - expected.push("'" + this.terminals_[p] + "'"); - } - if (this.lexer.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); - } - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) recovering--; - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; - if (ranges) { - yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; - } - r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - /* Jison generated lexer */ - var lexer = (function () { - var lexer = { EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - setInput: function setInput(input) { - this._input = input; - this._more = this._less = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; - if (this.options.ranges) this.yylloc.range = [0, 0]; - this.offset = 0; - return this; - }, - input: function input() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) this.yylloc.range[1]++; - - this._input = this._input.slice(1); - return ch; - }, - unput: function unput(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) this.yylineno -= lines.length - 1; - var r = this.yylloc.range; - - this.yylloc = { first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - return this; - }, - more: function more() { - this._more = true; - return this; - }, - less: function less(n) { - this.unput(this.match.slice(n)); - }, - pastInput: function pastInput() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, ""); - }, - upcomingInput: function upcomingInput() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - showPosition: function showPosition() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - next: function next() { - if (this.done) { - return this.EOF; - } - if (!this._input) this.done = true; - - var token, match, tempMatch, index, col, lines; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (!this.options.flex) break; - } - } - if (match) { - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) this.yylineno += lines.length; - this.yylloc = { first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) this.done = false; - if (token) return token;else return; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno }); - } - }, - lex: function lex() { - var r = this.next(); - if (typeof r !== 'undefined') { - return r; - } else { - return this.lex(); - } - }, - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - popState: function popState() { - return this.conditionStack.pop(); - }, - _currentRules: function _currentRules() { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - }, - topState: function topState() { - return this.conditionStack[this.conditionStack.length - 2]; - }, - pushState: function begin(condition) { - this.begin(condition); - } }; - lexer.options = {}; - lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - - function strip(start, end) { - return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start); - } - - var YYSTATE = YY_START; - switch ($avoiding_name_collisions) { - case 0: - if (yy_.yytext.slice(-2) === "\\\\") { - strip(0, 1); - this.begin("mu"); - } else if (yy_.yytext.slice(-1) === "\\") { - strip(0, 1); - this.begin("emu"); - } else { - this.begin("mu"); - } - if (yy_.yytext) return 15; - - break; - case 1: - return 15; - break; - case 2: - this.popState(); - return 15; - - break; - case 3: - this.begin('raw');return 15; - break; - case 4: - this.popState(); - // Should be using `this.topState()` below, but it currently - // returns the second top instead of the first top. Opened an - // issue about it at https://github.com/zaach/jison/issues/291 - if (this.conditionStack[this.conditionStack.length - 1] === 'raw') { - return 15; - } else { - strip(5, 9); - return 'END_RAW_BLOCK'; - } - - break; - case 5: - return 15; - break; - case 6: - this.popState(); - return 14; - - break; - case 7: - return 65; - break; - case 8: - return 68; - break; - case 9: - return 19; - break; - case 10: - this.popState(); - this.begin('raw'); - return 23; - - break; - case 11: - return 55; - break; - case 12: - return 60; - break; - case 13: - return 29; - break; - case 14: - return 47; - break; - case 15: - this.popState();return 44; - break; - case 16: - this.popState();return 44; - break; - case 17: - return 34; - break; - case 18: - return 39; - break; - case 19: - return 51; - break; - case 20: - return 48; - break; - case 21: - this.unput(yy_.yytext); - this.popState(); - this.begin('com'); - - break; - case 22: - this.popState(); - return 14; - - break; - case 23: - return 48; - break; - case 24: - return 73; - break; - case 25: - return 72; - break; - case 26: - return 72; - break; - case 27: - return 87; - break; - case 28: - // ignore whitespace - break; - case 29: - this.popState();return 54; - break; - case 30: - this.popState();return 33; - break; - case 31: - yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80; - break; - case 32: - yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80; - break; - case 33: - return 85; - break; - case 34: - return 82; - break; - case 35: - return 82; - break; - case 36: - return 83; - break; - case 37: - return 84; - break; - case 38: - return 81; - break; - case 39: - return 75; - break; - case 40: - return 77; - break; - case 41: - return 72; - break; - case 42: - yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72; - break; - case 43: - return 'INVALID'; - break; - case 44: - return 5; - break; - } - }; - lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/]; - lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } }; - return lexer; - })(); - parser.lexer = lexer; - function Parser() { - this.yy = {}; - }Parser.prototype = parser;parser.Parser = Parser; - return new Parser(); - })();exports["default"] = handlebars; - module.exports = exports["default"]; - -/***/ }), -/* 48 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - - var _visitor = __webpack_require__(49); - - var _visitor2 = _interopRequireDefault(_visitor); - - function WhitespaceControl() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - - this.options = options; - } - WhitespaceControl.prototype = new _visitor2['default'](); - - WhitespaceControl.prototype.Program = function (program) { - var doStandalone = !this.options.ignoreStandalone; - - var isRoot = !this.isRootSeen; - this.isRootSeen = true; - - var body = program.body; - for (var i = 0, l = body.length; i < l; i++) { - var current = body[i], - strip = this.accept(current); - - if (!strip) { - continue; - } - - var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), - _isNextWhitespace = isNextWhitespace(body, i, isRoot), - openStandalone = strip.openStandalone && _isPrevWhitespace, - closeStandalone = strip.closeStandalone && _isNextWhitespace, - inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; - - if (strip.close) { - omitRight(body, i, true); - } - if (strip.open) { - omitLeft(body, i, true); - } - - if (doStandalone && inlineStandalone) { - omitRight(body, i); - - if (omitLeft(body, i)) { - // If we are on a standalone node, save the indent info for partials - if (current.type === 'PartialStatement') { - // Pull out the whitespace from the final line - current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; - } - } - } - if (doStandalone && openStandalone) { - omitRight((current.program || current.inverse).body); - - // Strip out the previous content node if it's whitespace only - omitLeft(body, i); - } - if (doStandalone && closeStandalone) { - // Always strip the next node - omitRight(body, i); - - omitLeft((current.inverse || current.program).body); - } - } - - return program; - }; - - WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) { - this.accept(block.program); - this.accept(block.inverse); - - // Find the inverse program that is involed with whitespace stripping. - var program = block.program || block.inverse, - inverse = block.program && block.inverse, - firstInverse = inverse, - lastInverse = inverse; - - if (inverse && inverse.chained) { - firstInverse = inverse.body[0].program; - - // Walk the inverse chain to find the last inverse that is actually in the chain. - while (lastInverse.chained) { - lastInverse = lastInverse.body[lastInverse.body.length - 1].program; - } - } - - var strip = { - open: block.openStrip.open, - close: block.closeStrip.close, - - // Determine the standalone candiacy. Basically flag our content as being possibly standalone - // so our parent can determine if we actually are standalone - openStandalone: isNextWhitespace(program.body), - closeStandalone: isPrevWhitespace((firstInverse || program).body) - }; - - if (block.openStrip.close) { - omitRight(program.body, null, true); - } - - if (inverse) { - var inverseStrip = block.inverseStrip; - - if (inverseStrip.open) { - omitLeft(program.body, null, true); - } - - if (inverseStrip.close) { - omitRight(firstInverse.body, null, true); - } - if (block.closeStrip.open) { - omitLeft(lastInverse.body, null, true); - } - - // Find standalone else statments - if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { - omitLeft(program.body); - omitRight(firstInverse.body); - } - } else if (block.closeStrip.open) { - omitLeft(program.body, null, true); - } - - return strip; - }; - - WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) { - return mustache.strip; - }; - - WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) { - /* istanbul ignore next */ - var strip = node.strip || {}; - return { - inlineStandalone: true, - open: strip.open, - close: strip.close - }; - }; - - function isPrevWhitespace(body, i, isRoot) { - if (i === undefined) { - i = body.length; - } - - // Nodes that end with newlines are considered whitespace (but are special - // cased for strip operations) - var prev = body[i - 1], - sibling = body[i - 2]; - if (!prev) { - return isRoot; - } - - if (prev.type === 'ContentStatement') { - return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); - } - } - function isNextWhitespace(body, i, isRoot) { - if (i === undefined) { - i = -1; - } - - var next = body[i + 1], - sibling = body[i + 2]; - if (!next) { - return isRoot; - } - - if (next.type === 'ContentStatement') { - return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); - } - } - - // Marks the node to the right of the position as omitted. - // I.e. {{foo}}' ' will mark the ' ' node as omitted. - // - // If i is undefined, then the first child will be marked as such. - // - // If mulitple is truthy then all whitespace will be stripped out until non-whitespace - // content is met. - function omitRight(body, i, multiple) { - var current = body[i == null ? 0 : i + 1]; - if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) { - return; - } - - var original = current.value; - current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ''); - current.rightStripped = current.value !== original; - } - - // Marks the node to the left of the position as omitted. - // I.e. ' '{{foo}} will mark the ' ' node as omitted. - // - // If i is undefined then the last child will be marked as such. - // - // If mulitple is truthy then all whitespace will be stripped out until non-whitespace - // content is met. - function omitLeft(body, i, multiple) { - var current = body[i == null ? body.length - 1 : i - 1]; - if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) { - return; - } - - // We omit the last node if it's whitespace only and not preceded by a non-content node. - var original = current.value; - current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ''); - current.leftStripped = current.value !== original; - return current.leftStripped; - } - - exports['default'] = WhitespaceControl; - module.exports = exports['default']; - -/***/ }), -/* 49 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - - var _exception = __webpack_require__(6); - - var _exception2 = _interopRequireDefault(_exception); - - function Visitor() { - this.parents = []; - } - - Visitor.prototype = { - constructor: Visitor, - mutating: false, - - // Visits a given value. If mutating, will replace the value if necessary. - acceptKey: function acceptKey(node, name) { - var value = this.accept(node[name]); - if (this.mutating) { - // Hacky sanity check: This may have a few false positives for type for the helper - // methods but will generally do the right thing without a lot of overhead. - if (value && !Visitor.prototype[value.type]) { - throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); - } - node[name] = value; - } - }, - - // Performs an accept operation with added sanity check to ensure - // required keys are not removed. - acceptRequired: function acceptRequired(node, name) { - this.acceptKey(node, name); - - if (!node[name]) { - throw new _exception2['default'](node.type + ' requires ' + name); - } - }, - - // Traverses a given array. If mutating, empty respnses will be removed - // for child elements. - acceptArray: function acceptArray(array) { - for (var i = 0, l = array.length; i < l; i++) { - this.acceptKey(array, i); - - if (!array[i]) { - array.splice(i, 1); - i--; - l--; - } - } - }, - - accept: function accept(object) { - if (!object) { - return; - } - - /* istanbul ignore next: Sanity code */ - if (!this[object.type]) { - throw new _exception2['default']('Unknown type: ' + object.type, object); - } - - if (this.current) { - this.parents.unshift(this.current); - } - this.current = object; - - var ret = this[object.type](object); - - this.current = this.parents.shift(); - - if (!this.mutating || ret) { - return ret; - } else if (ret !== false) { - return object; - } - }, - - Program: function Program(program) { - this.acceptArray(program.body); - }, - - MustacheStatement: visitSubExpression, - Decorator: visitSubExpression, - - BlockStatement: visitBlock, - DecoratorBlock: visitBlock, - - PartialStatement: visitPartial, - PartialBlockStatement: function PartialBlockStatement(partial) { - visitPartial.call(this, partial); - - this.acceptKey(partial, 'program'); - }, - - ContentStatement: function ContentStatement() /* content */{}, - CommentStatement: function CommentStatement() /* comment */{}, - - SubExpression: visitSubExpression, - - PathExpression: function PathExpression() /* path */{}, - - StringLiteral: function StringLiteral() /* string */{}, - NumberLiteral: function NumberLiteral() /* number */{}, - BooleanLiteral: function BooleanLiteral() /* bool */{}, - UndefinedLiteral: function UndefinedLiteral() /* literal */{}, - NullLiteral: function NullLiteral() /* literal */{}, - - Hash: function Hash(hash) { - this.acceptArray(hash.pairs); - }, - HashPair: function HashPair(pair) { - this.acceptRequired(pair, 'value'); - } - }; - - function visitSubExpression(mustache) { - this.acceptRequired(mustache, 'path'); - this.acceptArray(mustache.params); - this.acceptKey(mustache, 'hash'); - } - function visitBlock(block) { - visitSubExpression.call(this, block); - - this.acceptKey(block, 'program'); - this.acceptKey(block, 'inverse'); - } - function visitPartial(partial) { - this.acceptRequired(partial, 'name'); - this.acceptArray(partial.params); - this.acceptKey(partial, 'hash'); - } - - exports['default'] = Visitor; - module.exports = exports['default']; - -/***/ }), -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - exports.SourceLocation = SourceLocation; - exports.id = id; - exports.stripFlags = stripFlags; - exports.stripComment = stripComment; - exports.preparePath = preparePath; - exports.prepareMustache = prepareMustache; - exports.prepareRawBlock = prepareRawBlock; - exports.prepareBlock = prepareBlock; - exports.prepareProgram = prepareProgram; - exports.preparePartialBlock = preparePartialBlock; - - var _exception = __webpack_require__(6); - - var _exception2 = _interopRequireDefault(_exception); - - function validateClose(open, close) { - close = close.path ? close.path.original : close; - - if (open.path.original !== close) { - var errorNode = { loc: open.path.loc }; - - throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode); - } - } - - function SourceLocation(source, locInfo) { - this.source = source; - this.start = { - line: locInfo.first_line, - column: locInfo.first_column - }; - this.end = { - line: locInfo.last_line, - column: locInfo.last_column - }; - } - - function id(token) { - if (/^\[.*\]$/.test(token)) { - return token.substring(1, token.length - 1); - } else { - return token; - } - } - - function stripFlags(open, close) { - return { - open: open.charAt(2) === '~', - close: close.charAt(close.length - 3) === '~' - }; - } - - function stripComment(comment) { - return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, ''); - } - - function preparePath(data, parts, loc) { - loc = this.locInfo(loc); - - var original = data ? '@' : '', - dig = [], - depth = 0; - - for (var i = 0, l = parts.length; i < l; i++) { - var part = parts[i].part, - - // If we have [] syntax then we do not treat path references as operators, - // i.e. foo.[this] resolves to approximately context.foo['this'] - isLiteral = parts[i].original !== part; - original += (parts[i].separator || '') + part; - - if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { - if (dig.length > 0) { - throw new _exception2['default']('Invalid path: ' + original, { loc: loc }); - } else if (part === '..') { - depth++; - } - } else { - dig.push(part); - } - } - - return { - type: 'PathExpression', - data: data, - depth: depth, - parts: dig, - original: original, - loc: loc - }; - } - - function prepareMustache(path, params, hash, open, strip, locInfo) { - // Must use charAt to support IE pre-10 - var escapeFlag = open.charAt(3) || open.charAt(2), - escaped = escapeFlag !== '{' && escapeFlag !== '&'; - - var decorator = /\*/.test(open); - return { - type: decorator ? 'Decorator' : 'MustacheStatement', - path: path, - params: params, - hash: hash, - escaped: escaped, - strip: strip, - loc: this.locInfo(locInfo) - }; - } - - function prepareRawBlock(openRawBlock, contents, close, locInfo) { - validateClose(openRawBlock, close); - - locInfo = this.locInfo(locInfo); - var program = { - type: 'Program', - body: contents, - strip: {}, - loc: locInfo - }; - - return { - type: 'BlockStatement', - path: openRawBlock.path, - params: openRawBlock.params, - hash: openRawBlock.hash, - program: program, - openStrip: {}, - inverseStrip: {}, - closeStrip: {}, - loc: locInfo - }; - } - - function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { - if (close && close.path) { - validateClose(openBlock, close); - } - - var decorator = /\*/.test(openBlock.open); - - program.blockParams = openBlock.blockParams; - - var inverse = undefined, - inverseStrip = undefined; - - if (inverseAndProgram) { - if (decorator) { - throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram); - } - - if (inverseAndProgram.chain) { - inverseAndProgram.program.body[0].closeStrip = close.strip; - } - - inverseStrip = inverseAndProgram.strip; - inverse = inverseAndProgram.program; - } - - if (inverted) { - inverted = inverse; - inverse = program; - program = inverted; - } - - return { - type: decorator ? 'DecoratorBlock' : 'BlockStatement', - path: openBlock.path, - params: openBlock.params, - hash: openBlock.hash, - program: program, - inverse: inverse, - openStrip: openBlock.strip, - inverseStrip: inverseStrip, - closeStrip: close && close.strip, - loc: this.locInfo(locInfo) - }; - } - - function prepareProgram(statements, loc) { - if (!loc && statements.length) { - var firstLoc = statements[0].loc, - lastLoc = statements[statements.length - 1].loc; - - /* istanbul ignore else */ - if (firstLoc && lastLoc) { - loc = { - source: firstLoc.source, - start: { - line: firstLoc.start.line, - column: firstLoc.start.column - }, - end: { - line: lastLoc.end.line, - column: lastLoc.end.column - } - }; - } - } - - return { - type: 'Program', - body: statements, - strip: {}, - loc: loc - }; - } - - function preparePartialBlock(open, program, close, locInfo) { - validateClose(open, close); - - return { - type: 'PartialBlockStatement', - name: open.path, - params: open.params, - hash: open.hash, - program: program, - openStrip: open.strip, - closeStrip: close && close.strip, - loc: this.locInfo(locInfo) - }; - } - -/***/ }), -/* 51 */ -/***/ (function(module, exports, __webpack_require__) { - - /* eslint-disable new-cap */ - - 'use strict'; - - var _Object$create = __webpack_require__(34)['default']; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - exports.Compiler = Compiler; - exports.precompile = precompile; - exports.compile = compile; - - var _exception = __webpack_require__(6); - - var _exception2 = _interopRequireDefault(_exception); - - var _utils = __webpack_require__(5); - - var _ast = __webpack_require__(45); - - var _ast2 = _interopRequireDefault(_ast); - - var slice = [].slice; - - function Compiler() {} - - // the foundHelper register will disambiguate helper lookup from finding a - // function in a context. This is necessary for mustache compatibility, which - // requires that context functions in blocks are evaluated by blockHelperMissing, - // and then proceed as if the resulting value was provided to blockHelperMissing. - - Compiler.prototype = { - compiler: Compiler, - - equals: function equals(other) { - var len = this.opcodes.length; - if (other.opcodes.length !== len) { - return false; - } - - for (var i = 0; i < len; i++) { - var opcode = this.opcodes[i], - otherOpcode = other.opcodes[i]; - if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { - return false; - } - } - - // We know that length is the same between the two arrays because they are directly tied - // to the opcode behavior above. - len = this.children.length; - for (var i = 0; i < len; i++) { - if (!this.children[i].equals(other.children[i])) { - return false; - } - } - - return true; - }, - - guid: 0, - - compile: function compile(program, options) { - this.sourceNode = []; - this.opcodes = []; - this.children = []; - this.options = options; - this.stringParams = options.stringParams; - this.trackIds = options.trackIds; - - options.blockParams = options.blockParams || []; - - options.knownHelpers = _utils.extend(_Object$create(null), { - helperMissing: true, - blockHelperMissing: true, - each: true, - 'if': true, - unless: true, - 'with': true, - log: true, - lookup: true - }, options.knownHelpers); - - return this.accept(program); - }, - - compileProgram: function compileProgram(program) { - var childCompiler = new this.compiler(), - // eslint-disable-line new-cap - result = childCompiler.compile(program, this.options), - guid = this.guid++; - - this.usePartial = this.usePartial || result.usePartial; - - this.children[guid] = result; - this.useDepths = this.useDepths || result.useDepths; - - return guid; - }, - - accept: function accept(node) { - /* istanbul ignore next: Sanity code */ - if (!this[node.type]) { - throw new _exception2['default']('Unknown type: ' + node.type, node); - } - - this.sourceNode.unshift(node); - var ret = this[node.type](node); - this.sourceNode.shift(); - return ret; - }, - - Program: function Program(program) { - this.options.blockParams.unshift(program.blockParams); - - var body = program.body, - bodyLength = body.length; - for (var i = 0; i < bodyLength; i++) { - this.accept(body[i]); - } - - this.options.blockParams.shift(); - - this.isSimple = bodyLength === 1; - this.blockParams = program.blockParams ? program.blockParams.length : 0; - - return this; - }, - - BlockStatement: function BlockStatement(block) { - transformLiteralToPath(block); - - var program = block.program, - inverse = block.inverse; - - program = program && this.compileProgram(program); - inverse = inverse && this.compileProgram(inverse); - - var type = this.classifySexpr(block); - - if (type === 'helper') { - this.helperSexpr(block, program, inverse); - } else if (type === 'simple') { - this.simpleSexpr(block); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('blockValue', block.path.original); - } else { - this.ambiguousSexpr(block, program, inverse); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('ambiguousBlockValue'); - } - - this.opcode('append'); - }, - - DecoratorBlock: function DecoratorBlock(decorator) { - var program = decorator.program && this.compileProgram(decorator.program); - var params = this.setupFullMustacheParams(decorator, program, undefined), - path = decorator.path; - - this.useDecorators = true; - this.opcode('registerDecorator', params.length, path.original); - }, - - PartialStatement: function PartialStatement(partial) { - this.usePartial = true; - - var program = partial.program; - if (program) { - program = this.compileProgram(partial.program); - } - - var params = partial.params; - if (params.length > 1) { - throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial); - } else if (!params.length) { - if (this.options.explicitPartialContext) { - this.opcode('pushLiteral', 'undefined'); - } else { - params.push({ type: 'PathExpression', parts: [], depth: 0 }); - } - } - - var partialName = partial.name.original, - isDynamic = partial.name.type === 'SubExpression'; - if (isDynamic) { - this.accept(partial.name); - } - - this.setupFullMustacheParams(partial, program, undefined, true); - - var indent = partial.indent || ''; - if (this.options.preventIndent && indent) { - this.opcode('appendContent', indent); - indent = ''; - } - - this.opcode('invokePartial', isDynamic, partialName, indent); - this.opcode('append'); - }, - PartialBlockStatement: function PartialBlockStatement(partialBlock) { - this.PartialStatement(partialBlock); - }, - - MustacheStatement: function MustacheStatement(mustache) { - this.SubExpression(mustache); - - if (mustache.escaped && !this.options.noEscape) { - this.opcode('appendEscaped'); - } else { - this.opcode('append'); - } - }, - Decorator: function Decorator(decorator) { - this.DecoratorBlock(decorator); - }, - - ContentStatement: function ContentStatement(content) { - if (content.value) { - this.opcode('appendContent', content.value); - } - }, - - CommentStatement: function CommentStatement() {}, - - SubExpression: function SubExpression(sexpr) { - transformLiteralToPath(sexpr); - var type = this.classifySexpr(sexpr); - - if (type === 'simple') { - this.simpleSexpr(sexpr); - } else if (type === 'helper') { - this.helperSexpr(sexpr); - } else { - this.ambiguousSexpr(sexpr); - } - }, - ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { - var path = sexpr.path, - name = path.parts[0], - isBlock = program != null || inverse != null; - - this.opcode('getContext', path.depth); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - path.strict = true; - this.accept(path); - - this.opcode('invokeAmbiguous', name, isBlock); - }, - - simpleSexpr: function simpleSexpr(sexpr) { - var path = sexpr.path; - path.strict = true; - this.accept(path); - this.opcode('resolvePossibleLambda'); - }, - - helperSexpr: function helperSexpr(sexpr, program, inverse) { - var params = this.setupFullMustacheParams(sexpr, program, inverse), - path = sexpr.path, - name = path.parts[0]; - - if (this.options.knownHelpers[name]) { - this.opcode('invokeKnownHelper', params.length, name); - } else if (this.options.knownHelpersOnly) { - throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); - } else { - path.strict = true; - path.falsy = true; - - this.accept(path); - this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path)); - } - }, - - PathExpression: function PathExpression(path) { - this.addDepth(path.depth); - this.opcode('getContext', path.depth); - - var name = path.parts[0], - scoped = _ast2['default'].helpers.scopedId(path), - blockParamId = !path.depth && !scoped && this.blockParamIndex(name); - - if (blockParamId) { - this.opcode('lookupBlockParam', blockParamId, path.parts); - } else if (!name) { - // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` - this.opcode('pushContext'); - } else if (path.data) { - this.options.data = true; - this.opcode('lookupData', path.depth, path.parts, path.strict); - } else { - this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped); - } - }, - - StringLiteral: function StringLiteral(string) { - this.opcode('pushString', string.value); - }, - - NumberLiteral: function NumberLiteral(number) { - this.opcode('pushLiteral', number.value); - }, - - BooleanLiteral: function BooleanLiteral(bool) { - this.opcode('pushLiteral', bool.value); - }, - - UndefinedLiteral: function UndefinedLiteral() { - this.opcode('pushLiteral', 'undefined'); - }, - - NullLiteral: function NullLiteral() { - this.opcode('pushLiteral', 'null'); - }, - - Hash: function Hash(hash) { - var pairs = hash.pairs, - i = 0, - l = pairs.length; - - this.opcode('pushHash'); - - for (; i < l; i++) { - this.pushParam(pairs[i].value); - } - while (i--) { - this.opcode('assignToHash', pairs[i].key); - } - this.opcode('popHash'); - }, - - // HELPERS - opcode: function opcode(name) { - this.opcodes.push({ - opcode: name, - args: slice.call(arguments, 1), - loc: this.sourceNode[0].loc - }); - }, - - addDepth: function addDepth(depth) { - if (!depth) { - return; - } - - this.useDepths = true; - }, - - classifySexpr: function classifySexpr(sexpr) { - var isSimple = _ast2['default'].helpers.simpleId(sexpr.path); - - var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); - - // a mustache is an eligible helper if: - // * its id is simple (a single part, not `this` or `..`) - var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr); - - // if a mustache is an eligible helper but not a definite - // helper, it is ambiguous, and will be resolved in a later - // pass or at runtime. - var isEligible = !isBlockParam && (isHelper || isSimple); - - // if ambiguous, we can possibly resolve the ambiguity now - // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. - if (isEligible && !isHelper) { - var _name = sexpr.path.parts[0], - options = this.options; - if (options.knownHelpers[_name]) { - isHelper = true; - } else if (options.knownHelpersOnly) { - isEligible = false; - } - } - - if (isHelper) { - return 'helper'; - } else if (isEligible) { - return 'ambiguous'; - } else { - return 'simple'; - } - }, - - pushParams: function pushParams(params) { - for (var i = 0, l = params.length; i < l; i++) { - this.pushParam(params[i]); - } - }, - - pushParam: function pushParam(val) { - var value = val.value != null ? val.value : val.original || ''; - - if (this.stringParams) { - if (value.replace) { - value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); - } - - if (val.depth) { - this.addDepth(val.depth); - } - this.opcode('getContext', val.depth || 0); - this.opcode('pushStringParam', value, val.type); - - if (val.type === 'SubExpression') { - // SubExpressions get evaluated and passed in - // in string params mode. - this.accept(val); - } - } else { - if (this.trackIds) { - var blockParamIndex = undefined; - if (val.parts && !_ast2['default'].helpers.scopedId(val) && !val.depth) { - blockParamIndex = this.blockParamIndex(val.parts[0]); - } - if (blockParamIndex) { - var blockParamChild = val.parts.slice(1).join('.'); - this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); - } else { - value = val.original || value; - if (value.replace) { - value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, ''); - } - - this.opcode('pushId', val.type, value); - } - } - this.accept(val); - } - }, - - setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { - var params = sexpr.params; - this.pushParams(params); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - if (sexpr.hash) { - this.accept(sexpr.hash); - } else { - this.opcode('emptyHash', omitEmpty); - } - - return params; - }, - - blockParamIndex: function blockParamIndex(name) { - for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { - var blockParams = this.options.blockParams[depth], - param = blockParams && _utils.indexOf(blockParams, name); - if (blockParams && param >= 0) { - return [depth, param]; - } - } - } - }; - - function precompile(input, options, env) { - if (input == null || typeof input !== 'string' && input.type !== 'Program') { - throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); - } - - options = options || {}; - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - var ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options); - return new env.JavaScriptCompiler().compile(environment, options); - } - - function compile(input, options, env) { - if (options === undefined) options = {}; - - if (input == null || typeof input !== 'string' && input.type !== 'Program') { - throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); - } - - options = _utils.extend({}, options); - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - var compiled = undefined; - - function compileInput() { - var ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options), - templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); - return env.template(templateSpec); - } - - // Template is only compiled on first use and cached after that point. - function ret(context, execOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled.call(this, context, execOptions); - } - ret._setup = function (setupOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._setup(setupOptions); - }; - ret._child = function (i, data, blockParams, depths) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._child(i, data, blockParams, depths); - }; - return ret; - } - - function argEquals(a, b) { - if (a === b) { - return true; - } - - if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { - for (var i = 0; i < a.length; i++) { - if (!argEquals(a[i], b[i])) { - return false; - } - } - return true; - } - } - - function transformLiteralToPath(sexpr) { - if (!sexpr.path.parts) { - var literal = sexpr.path; - // Casting to string here to make false and 0 literal values play nicely with the rest - // of the system. - sexpr.path = { - type: 'PathExpression', - data: false, - depth: 0, - parts: [literal.original + ''], - original: literal.original + '', - loc: literal.loc - }; - } - } - -/***/ }), -/* 52 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _Object$keys = __webpack_require__(13)['default']; - - var _interopRequireDefault = __webpack_require__(1)['default']; - - exports.__esModule = true; - - var _base = __webpack_require__(4); - - var _exception = __webpack_require__(6); - - var _exception2 = _interopRequireDefault(_exception); - - var _utils = __webpack_require__(5); - - var _codeGen = __webpack_require__(53); - - var _codeGen2 = _interopRequireDefault(_codeGen); - - function Literal(value) { - this.value = value; - } - - function JavaScriptCompiler() {} - - JavaScriptCompiler.prototype = { - // PUBLIC API: You can override these methods in a subclass to provide - // alternative compiled forms for name lookup and buffering semantics - nameLookup: function nameLookup(parent, name /*, type */) { - return this.internalNameLookup(parent, name); - }, - depthedLookup: function depthedLookup(name) { - return [this.aliasable('container.lookup'), '(depths, ', JSON.stringify(name), ')']; - }, - - compilerInfo: function compilerInfo() { - var revision = _base.COMPILER_REVISION, - versions = _base.REVISION_CHANGES[revision]; - return [revision, versions]; - }, - - appendToBuffer: function appendToBuffer(source, location, explicit) { - // Force a source as this simplifies the merge logic. - if (!_utils.isArray(source)) { - source = [source]; - } - source = this.source.wrap(source, location); - - if (this.environment.isSimple) { - return ['return ', source, ';']; - } else if (explicit) { - // This is a case where the buffer operation occurs as a child of another - // construct, generally braces. We have to explicitly output these buffer - // operations to ensure that the emitted code goes in the correct location. - return ['buffer += ', source, ';']; - } else { - source.appendToBuffer = true; - return source; - } - }, - - initializeBuffer: function initializeBuffer() { - return this.quotedString(''); - }, - // END PUBLIC API - internalNameLookup: function internalNameLookup(parent, name) { - this.lookupPropertyFunctionIsUsed = true; - return ['lookupProperty(', parent, ',', JSON.stringify(name), ')']; - }, - - lookupPropertyFunctionIsUsed: false, - - compile: function compile(environment, options, context, asObject) { - this.environment = environment; - this.options = options; - this.stringParams = this.options.stringParams; - this.trackIds = this.options.trackIds; - this.precompile = !asObject; - - this.name = this.environment.name; - this.isChild = !!context; - this.context = context || { - decorators: [], - programs: [], - environments: [] - }; - - this.preamble(); - - this.stackSlot = 0; - this.stackVars = []; - this.aliases = {}; - this.registers = { list: [] }; - this.hashes = []; - this.compileStack = []; - this.inlineStack = []; - this.blockParams = []; - - this.compileChildren(environment, options); - - this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat; - this.useBlockParams = this.useBlockParams || environment.useBlockParams; - - var opcodes = environment.opcodes, - opcode = undefined, - firstLoc = undefined, - i = undefined, - l = undefined; - - for (i = 0, l = opcodes.length; i < l; i++) { - opcode = opcodes[i]; - - this.source.currentLocation = opcode.loc; - firstLoc = firstLoc || opcode.loc; - this[opcode.opcode].apply(this, opcode.args); - } - - // Flush any trailing content that might be pending. - this.source.currentLocation = firstLoc; - this.pushSource(''); - - /* istanbul ignore next */ - if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { - throw new _exception2['default']('Compile completed with content left on stack'); - } - - if (!this.decorators.isEmpty()) { - this.useDecorators = true; - - this.decorators.prepend(['var decorators = container.decorators, ', this.lookupPropertyFunctionVarDeclaration(), ';\n']); - this.decorators.push('return fn;'); - - if (asObject) { - this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]); - } else { - this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n'); - this.decorators.push('}\n'); - this.decorators = this.decorators.merge(); - } - } else { - this.decorators = undefined; - } - - var fn = this.createFunctionContext(asObject); - if (!this.isChild) { - var ret = { - compiler: this.compilerInfo(), - main: fn - }; - - if (this.decorators) { - ret.main_d = this.decorators; // eslint-disable-line camelcase - ret.useDecorators = true; - } - - var _context = this.context; - var programs = _context.programs; - var decorators = _context.decorators; - - for (i = 0, l = programs.length; i < l; i++) { - if (programs[i]) { - ret[i] = programs[i]; - if (decorators[i]) { - ret[i + '_d'] = decorators[i]; - ret.useDecorators = true; - } - } - } - - if (this.environment.usePartial) { - ret.usePartial = true; - } - if (this.options.data) { - ret.useData = true; - } - if (this.useDepths) { - ret.useDepths = true; - } - if (this.useBlockParams) { - ret.useBlockParams = true; - } - if (this.options.compat) { - ret.compat = true; - } - - if (!asObject) { - ret.compiler = JSON.stringify(ret.compiler); - - this.source.currentLocation = { start: { line: 1, column: 0 } }; - ret = this.objectLiteral(ret); - - if (options.srcName) { - ret = ret.toStringWithSourceMap({ file: options.destName }); - ret.map = ret.map && ret.map.toString(); - } else { - ret = ret.toString(); - } - } else { - ret.compilerOptions = this.options; - } - - return ret; - } else { - return fn; - } - }, - - preamble: function preamble() { - // track the last context pushed into place to allow skipping the - // getContext opcode when it would be a noop - this.lastContext = 0; - this.source = new _codeGen2['default'](this.options.srcName); - this.decorators = new _codeGen2['default'](this.options.srcName); - }, - - createFunctionContext: function createFunctionContext(asObject) { - // istanbul ignore next - - var _this = this; - - var varDeclarations = ''; - - var locals = this.stackVars.concat(this.registers.list); - if (locals.length > 0) { - varDeclarations += ', ' + locals.join(', '); - } - - // Generate minimizer alias mappings - // - // When using true SourceNodes, this will update all references to the given alias - // as the source nodes are reused in situ. For the non-source node compilation mode, - // aliases will not be used, but this case is already being run on the client and - // we aren't concern about minimizing the template size. - var aliasCount = 0; - _Object$keys(this.aliases).forEach(function (alias) { - var node = _this.aliases[alias]; - if (node.children && node.referenceCount > 1) { - varDeclarations += ', alias' + ++aliasCount + '=' + alias; - node.children[0] = 'alias' + aliasCount; - } - }); - - if (this.lookupPropertyFunctionIsUsed) { - varDeclarations += ', ' + this.lookupPropertyFunctionVarDeclaration(); - } - - var params = ['container', 'depth0', 'helpers', 'partials', 'data']; - - if (this.useBlockParams || this.useDepths) { - params.push('blockParams'); - } - if (this.useDepths) { - params.push('depths'); - } - - // Perform a second pass over the output to merge content when possible - var source = this.mergeSource(varDeclarations); - - if (asObject) { - params.push(source); - - return Function.apply(this, params); - } else { - return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); - } - }, - mergeSource: function mergeSource(varDeclarations) { - var isSimple = this.environment.isSimple, - appendOnly = !this.forceBuffer, - appendFirst = undefined, - sourceSeen = undefined, - bufferStart = undefined, - bufferEnd = undefined; - this.source.each(function (line) { - if (line.appendToBuffer) { - if (bufferStart) { - line.prepend(' + '); - } else { - bufferStart = line; - } - bufferEnd = line; - } else { - if (bufferStart) { - if (!sourceSeen) { - appendFirst = true; - } else { - bufferStart.prepend('buffer += '); - } - bufferEnd.add(';'); - bufferStart = bufferEnd = undefined; - } - - sourceSeen = true; - if (!isSimple) { - appendOnly = false; - } - } - }); - - if (appendOnly) { - if (bufferStart) { - bufferStart.prepend('return '); - bufferEnd.add(';'); - } else if (!sourceSeen) { - this.source.push('return "";'); - } - } else { - varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); - - if (bufferStart) { - bufferStart.prepend('return buffer + '); - bufferEnd.add(';'); - } else { - this.source.push('return buffer;'); - } - } - - if (varDeclarations) { - this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); - } - - return this.source.merge(); - }, - - lookupPropertyFunctionVarDeclaration: function lookupPropertyFunctionVarDeclaration() { - return '\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n '.trim(); - }, - - // [blockValue] - // - // On stack, before: hash, inverse, program, value - // On stack, after: return value of blockHelperMissing - // - // The purpose of this opcode is to take a block of the form - // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and - // replace it on the stack with the result of properly - // invoking blockHelperMissing. - blockValue: function blockValue(name) { - var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'), - params = [this.contextName(0)]; - this.setupHelperArgs(name, 0, params); - - var blockName = this.popStack(); - params.splice(1, 0, blockName); - - this.push(this.source.functionCall(blockHelperMissing, 'call', params)); - }, - - // [ambiguousBlockValue] - // - // On stack, before: hash, inverse, program, value - // Compiler value, before: lastHelper=value of last found helper, if any - // On stack, after, if no lastHelper: same as [blockValue] - // On stack, after, if lastHelper: value - ambiguousBlockValue: function ambiguousBlockValue() { - // We're being a bit cheeky and reusing the options value from the prior exec - var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'), - params = [this.contextName(0)]; - this.setupHelperArgs('', 0, params, true); - - this.flushInline(); - - var current = this.topStack(); - params.splice(1, 0, current); - - this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']); - }, - - // [appendContent] - // - // On stack, before: ... - // On stack, after: ... - // - // Appends the string value of `content` to the current buffer - appendContent: function appendContent(content) { - if (this.pendingContent) { - content = this.pendingContent + content; - } else { - this.pendingLocation = this.source.currentLocation; - } - - this.pendingContent = content; - }, - - // [append] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Coerces `value` to a String and appends it to the current buffer. - // - // If `value` is truthy, or 0, it is coerced into a string and appended - // Otherwise, the empty string is appended - append: function append() { - if (this.isInline()) { - this.replaceStack(function (current) { - return [' != null ? ', current, ' : ""']; - }); - - this.pushSource(this.appendToBuffer(this.popStack())); - } else { - var local = this.popStack(); - this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); - if (this.environment.isSimple) { - this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']); - } - } - }, - - // [appendEscaped] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Escape `value` and append it to the buffer - appendEscaped: function appendEscaped() { - this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')'])); - }, - - // [getContext] - // - // On stack, before: ... - // On stack, after: ... - // Compiler value, after: lastContext=depth - // - // Set the value of the `lastContext` compiler value to the depth - getContext: function getContext(depth) { - this.lastContext = depth; - }, - - // [pushContext] - // - // On stack, before: ... - // On stack, after: currentContext, ... - // - // Pushes the value of the current context onto the stack. - pushContext: function pushContext() { - this.pushStackLiteral(this.contextName(this.lastContext)); - }, - - // [lookupOnContext] - // - // On stack, before: ... - // On stack, after: currentContext[name], ... - // - // Looks up the value of `name` on the current context and pushes - // it onto the stack. - lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) { - var i = 0; - - if (!scoped && this.options.compat && !this.lastContext) { - // The depthed query is expected to handle the undefined logic for the root level that - // is implemented below, so we evaluate that directly in compat mode - this.push(this.depthedLookup(parts[i++])); - } else { - this.pushContext(); - } - - this.resolvePath('context', parts, i, falsy, strict); - }, - - // [lookupBlockParam] - // - // On stack, before: ... - // On stack, after: blockParam[name], ... - // - // Looks up the value of `parts` on the given block param and pushes - // it onto the stack. - lookupBlockParam: function lookupBlockParam(blockParamId, parts) { - this.useBlockParams = true; - - this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); - this.resolvePath('context', parts, 1); - }, - - // [lookupData] - // - // On stack, before: ... - // On stack, after: data, ... - // - // Push the data lookup operator - lookupData: function lookupData(depth, parts, strict) { - if (!depth) { - this.pushStackLiteral('data'); - } else { - this.pushStackLiteral('container.data(data, ' + depth + ')'); - } - - this.resolvePath('data', parts, 0, true, strict); - }, - - resolvePath: function resolvePath(type, parts, i, falsy, strict) { - // istanbul ignore next - - var _this2 = this; - - if (this.options.strict || this.options.assumeObjects) { - this.push(strictLookup(this.options.strict && strict, this, parts, type)); - return; - } - - var len = parts.length; - for (; i < len; i++) { - /* eslint-disable no-loop-func */ - this.replaceStack(function (current) { - var lookup = _this2.nameLookup(current, parts[i], type); - // We want to ensure that zero and false are handled properly if the context (falsy flag) - // needs to have the special handling for these values. - if (!falsy) { - return [' != null ? ', lookup, ' : ', current]; - } else { - // Otherwise we can use generic falsy handling - return [' && ', lookup]; - } - }); - /* eslint-enable no-loop-func */ - } - }, - - // [resolvePossibleLambda] - // - // On stack, before: value, ... - // On stack, after: resolved value, ... - // - // If the `value` is a lambda, replace it on the stack by - // the return value of the lambda - resolvePossibleLambda: function resolvePossibleLambda() { - this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); - }, - - // [pushStringParam] - // - // On stack, before: ... - // On stack, after: string, currentContext, ... - // - // This opcode is designed for use in string mode, which - // provides the string value of a parameter along with its - // depth rather than resolving it immediately. - pushStringParam: function pushStringParam(string, type) { - this.pushContext(); - this.pushString(type); - - // If it's a subexpression, the string result - // will be pushed after this opcode. - if (type !== 'SubExpression') { - if (typeof string === 'string') { - this.pushString(string); - } else { - this.pushStackLiteral(string); - } - } - }, - - emptyHash: function emptyHash(omitEmpty) { - if (this.trackIds) { - this.push('{}'); // hashIds - } - if (this.stringParams) { - this.push('{}'); // hashContexts - this.push('{}'); // hashTypes - } - this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); - }, - pushHash: function pushHash() { - if (this.hash) { - this.hashes.push(this.hash); - } - this.hash = { values: {}, types: [], contexts: [], ids: [] }; - }, - popHash: function popHash() { - var hash = this.hash; - this.hash = this.hashes.pop(); - - if (this.trackIds) { - this.push(this.objectLiteral(hash.ids)); - } - if (this.stringParams) { - this.push(this.objectLiteral(hash.contexts)); - this.push(this.objectLiteral(hash.types)); - } - - this.push(this.objectLiteral(hash.values)); - }, - - // [pushString] - // - // On stack, before: ... - // On stack, after: quotedString(string), ... - // - // Push a quoted version of `string` onto the stack - pushString: function pushString(string) { - this.pushStackLiteral(this.quotedString(string)); - }, - - // [pushLiteral] - // - // On stack, before: ... - // On stack, after: value, ... - // - // Pushes a value onto the stack. This operation prevents - // the compiler from creating a temporary variable to hold - // it. - pushLiteral: function pushLiteral(value) { - this.pushStackLiteral(value); - }, - - // [pushProgram] - // - // On stack, before: ... - // On stack, after: program(guid), ... - // - // Push a program expression onto the stack. This takes - // a compile-time guid and converts it into a runtime-accessible - // expression. - pushProgram: function pushProgram(guid) { - if (guid != null) { - this.pushStackLiteral(this.programExpression(guid)); - } else { - this.pushStackLiteral(null); - } - }, - - // [registerDecorator] - // - // On stack, before: hash, program, params..., ... - // On stack, after: ... - // - // Pops off the decorator's parameters, invokes the decorator, - // and inserts the decorator into the decorators list. - registerDecorator: function registerDecorator(paramSize, name) { - var foundDecorator = this.nameLookup('decorators', name, 'decorator'), - options = this.setupHelperArgs(name, paramSize); - - this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']); - }, - - // [invokeHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // Pops off the helper's parameters, invokes the helper, - // and pushes the helper's return value onto the stack. - // - // If the helper is not found, `helperMissing` is called. - invokeHelper: function invokeHelper(paramSize, name, isSimple) { - var nonHelper = this.popStack(), - helper = this.setupHelper(paramSize, name); - - var possibleFunctionCalls = []; - - if (isSimple) { - // direct call to helper - possibleFunctionCalls.push(helper.name); - } - // call a function from the input object - possibleFunctionCalls.push(nonHelper); - if (!this.options.strict) { - possibleFunctionCalls.push(this.aliasable('container.hooks.helperMissing')); - } - - var functionLookupCode = ['(', this.itemsSeparatedBy(possibleFunctionCalls, '||'), ')']; - var functionCall = this.source.functionCall(functionLookupCode, 'call', helper.callParams); - this.push(functionCall); - }, - - itemsSeparatedBy: function itemsSeparatedBy(items, separator) { - var result = []; - result.push(items[0]); - for (var i = 1; i < items.length; i++) { - result.push(separator, items[i]); - } - return result; - }, - // [invokeKnownHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // This operation is used when the helper is known to exist, - // so a `helperMissing` fallback is not required. - invokeKnownHelper: function invokeKnownHelper(paramSize, name) { - var helper = this.setupHelper(paramSize, name); - this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); - }, - - // [invokeAmbiguous] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of disambiguation - // - // This operation is used when an expression like `{{foo}}` - // is provided, but we don't know at compile-time whether it - // is a helper or a path. - // - // This operation emits more code than the other options, - // and can be avoided by passing the `knownHelpers` and - // `knownHelpersOnly` flags at compile-time. - invokeAmbiguous: function invokeAmbiguous(name, helperCall) { - this.useRegister('helper'); - - var nonHelper = this.popStack(); - - this.emptyHash(); - var helper = this.setupHelper(0, name, helperCall); - - var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); - - var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; - if (!this.options.strict) { - lookup[0] = '(helper = '; - lookup.push(' != null ? helper : ', this.aliasable('container.hooks.helperMissing')); - } - - this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']); - }, - - // [invokePartial] - // - // On stack, before: context, ... - // On stack after: result of partial invocation - // - // This operation pops off a context, invokes a partial with that context, - // and pushes the result of the invocation back. - invokePartial: function invokePartial(isDynamic, name, indent) { - var params = [], - options = this.setupParams(name, 1, params); - - if (isDynamic) { - name = this.popStack(); - delete options.name; - } - - if (indent) { - options.indent = JSON.stringify(indent); - } - options.helpers = 'helpers'; - options.partials = 'partials'; - options.decorators = 'container.decorators'; - - if (!isDynamic) { - params.unshift(this.nameLookup('partials', name, 'partial')); - } else { - params.unshift(name); - } - - if (this.options.compat) { - options.depths = 'depths'; - } - options = this.objectLiteral(options); - params.push(options); - - this.push(this.source.functionCall('container.invokePartial', '', params)); - }, - - // [assignToHash] - // - // On stack, before: value, ..., hash, ... - // On stack, after: ..., hash, ... - // - // Pops a value off the stack and assigns it to the current hash - assignToHash: function assignToHash(key) { - var value = this.popStack(), - context = undefined, - type = undefined, - id = undefined; - - if (this.trackIds) { - id = this.popStack(); - } - if (this.stringParams) { - type = this.popStack(); - context = this.popStack(); - } - - var hash = this.hash; - if (context) { - hash.contexts[key] = context; - } - if (type) { - hash.types[key] = type; - } - if (id) { - hash.ids[key] = id; - } - hash.values[key] = value; - }, - - pushId: function pushId(type, name, child) { - if (type === 'BlockParam') { - this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : '')); - } else if (type === 'PathExpression') { - this.pushString(name); - } else if (type === 'SubExpression') { - this.pushStackLiteral('true'); - } else { - this.pushStackLiteral('null'); - } - }, - - // HELPERS - - compiler: JavaScriptCompiler, - - compileChildren: function compileChildren(environment, options) { - var children = environment.children, - child = undefined, - compiler = undefined; - - for (var i = 0, l = children.length; i < l; i++) { - child = children[i]; - compiler = new this.compiler(); // eslint-disable-line new-cap - - var existing = this.matchExistingProgram(child); - - if (existing == null) { - this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children - var index = this.context.programs.length; - child.index = index; - child.name = 'program' + index; - this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); - this.context.decorators[index] = compiler.decorators; - this.context.environments[index] = child; - - this.useDepths = this.useDepths || compiler.useDepths; - this.useBlockParams = this.useBlockParams || compiler.useBlockParams; - child.useDepths = this.useDepths; - child.useBlockParams = this.useBlockParams; - } else { - child.index = existing.index; - child.name = 'program' + existing.index; - - this.useDepths = this.useDepths || existing.useDepths; - this.useBlockParams = this.useBlockParams || existing.useBlockParams; - } - } - }, - matchExistingProgram: function matchExistingProgram(child) { - for (var i = 0, len = this.context.environments.length; i < len; i++) { - var environment = this.context.environments[i]; - if (environment && environment.equals(child)) { - return environment; - } - } - }, - - programExpression: function programExpression(guid) { - var child = this.environment.children[guid], - programParams = [child.index, 'data', child.blockParams]; - - if (this.useBlockParams || this.useDepths) { - programParams.push('blockParams'); - } - if (this.useDepths) { - programParams.push('depths'); - } - - return 'container.program(' + programParams.join(', ') + ')'; - }, - - useRegister: function useRegister(name) { - if (!this.registers[name]) { - this.registers[name] = true; - this.registers.list.push(name); - } - }, - - push: function push(expr) { - if (!(expr instanceof Literal)) { - expr = this.source.wrap(expr); - } - - this.inlineStack.push(expr); - return expr; - }, - - pushStackLiteral: function pushStackLiteral(item) { - this.push(new Literal(item)); - }, - - pushSource: function pushSource(source) { - if (this.pendingContent) { - this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); - this.pendingContent = undefined; - } - - if (source) { - this.source.push(source); - } - }, - - replaceStack: function replaceStack(callback) { - var prefix = ['('], - stack = undefined, - createdStack = undefined, - usedLiteral = undefined; - - /* istanbul ignore next */ - if (!this.isInline()) { - throw new _exception2['default']('replaceStack on non-inline'); - } - - // We want to merge the inline statement into the replacement statement via ',' - var top = this.popStack(true); - - if (top instanceof Literal) { - // Literals do not need to be inlined - stack = [top.value]; - prefix = ['(', stack]; - usedLiteral = true; - } else { - // Get or create the current stack name for use by the inline - createdStack = true; - var _name = this.incrStack(); - - prefix = ['((', this.push(_name), ' = ', top, ')']; - stack = this.topStack(); - } - - var item = callback.call(this, stack); - - if (!usedLiteral) { - this.popStack(); - } - if (createdStack) { - this.stackSlot--; - } - this.push(prefix.concat(item, ')')); - }, - - incrStack: function incrStack() { - this.stackSlot++; - if (this.stackSlot > this.stackVars.length) { - this.stackVars.push('stack' + this.stackSlot); - } - return this.topStackName(); - }, - topStackName: function topStackName() { - return 'stack' + this.stackSlot; - }, - flushInline: function flushInline() { - var inlineStack = this.inlineStack; - this.inlineStack = []; - for (var i = 0, len = inlineStack.length; i < len; i++) { - var entry = inlineStack[i]; - /* istanbul ignore if */ - if (entry instanceof Literal) { - this.compileStack.push(entry); - } else { - var stack = this.incrStack(); - this.pushSource([stack, ' = ', entry, ';']); - this.compileStack.push(stack); - } - } - }, - isInline: function isInline() { - return this.inlineStack.length; - }, - - popStack: function popStack(wrapped) { - var inline = this.isInline(), - item = (inline ? this.inlineStack : this.compileStack).pop(); - - if (!wrapped && item instanceof Literal) { - return item.value; - } else { - if (!inline) { - /* istanbul ignore next */ - if (!this.stackSlot) { - throw new _exception2['default']('Invalid stack pop'); - } - this.stackSlot--; - } - return item; - } - }, - - topStack: function topStack() { - var stack = this.isInline() ? this.inlineStack : this.compileStack, - item = stack[stack.length - 1]; - - /* istanbul ignore if */ - if (item instanceof Literal) { - return item.value; - } else { - return item; - } - }, - - contextName: function contextName(context) { - if (this.useDepths && context) { - return 'depths[' + context + ']'; - } else { - return 'depth' + context; - } - }, - - quotedString: function quotedString(str) { - return this.source.quotedString(str); - }, - - objectLiteral: function objectLiteral(obj) { - return this.source.objectLiteral(obj); - }, - - aliasable: function aliasable(name) { - var ret = this.aliases[name]; - if (ret) { - ret.referenceCount++; - return ret; - } - - ret = this.aliases[name] = this.source.wrap(name); - ret.aliasable = true; - ret.referenceCount = 1; - - return ret; - }, - - setupHelper: function setupHelper(paramSize, name, blockHelper) { - var params = [], - paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); - var foundHelper = this.nameLookup('helpers', name, 'helper'), - callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : (container.nullContext || {})'); - - return { - params: params, - paramsInit: paramsInit, - name: foundHelper, - callParams: [callContext].concat(params) - }; - }, - - setupParams: function setupParams(helper, paramSize, params) { - var options = {}, - contexts = [], - types = [], - ids = [], - objectArgs = !params, - param = undefined; - - if (objectArgs) { - params = []; - } - - options.name = this.quotedString(helper); - options.hash = this.popStack(); - - if (this.trackIds) { - options.hashIds = this.popStack(); - } - if (this.stringParams) { - options.hashTypes = this.popStack(); - options.hashContexts = this.popStack(); - } - - var inverse = this.popStack(), - program = this.popStack(); - - // Avoid setting fn and inverse if neither are set. This allows - // helpers to do a check for `if (options.fn)` - if (program || inverse) { - options.fn = program || 'container.noop'; - options.inverse = inverse || 'container.noop'; - } - - // The parameters go on to the stack in order (making sure that they are evaluated in order) - // so we need to pop them off the stack in reverse order - var i = paramSize; - while (i--) { - param = this.popStack(); - params[i] = param; - - if (this.trackIds) { - ids[i] = this.popStack(); - } - if (this.stringParams) { - types[i] = this.popStack(); - contexts[i] = this.popStack(); - } - } - - if (objectArgs) { - options.args = this.source.generateArray(params); - } - - if (this.trackIds) { - options.ids = this.source.generateArray(ids); - } - if (this.stringParams) { - options.types = this.source.generateArray(types); - options.contexts = this.source.generateArray(contexts); - } - - if (this.options.data) { - options.data = 'data'; - } - if (this.useBlockParams) { - options.blockParams = 'blockParams'; - } - return options; - }, - - setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { - var options = this.setupParams(helper, paramSize, params); - options.loc = JSON.stringify(this.source.currentLocation); - options = this.objectLiteral(options); - if (useRegister) { - this.useRegister('options'); - params.push('options'); - return ['options=', options]; - } else if (params) { - params.push(options); - return ''; - } else { - return options; - } - } - }; - - (function () { - var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' '); - - var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; - - for (var i = 0, l = reservedWords.length; i < l; i++) { - compilerWords[reservedWords[i]] = true; - } - })(); - - /** - * @deprecated May be removed in the next major version - */ - JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { - return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); - }; - - function strictLookup(requireTerminal, compiler, parts, type) { - var stack = compiler.popStack(), - i = 0, - len = parts.length; - if (requireTerminal) { - len--; - } - - for (; i < len; i++) { - stack = compiler.nameLookup(stack, parts[i], type); - } - - if (requireTerminal) { - return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ', ', JSON.stringify(compiler.source.currentLocation), ' )']; - } else { - return stack; - } - } - - exports['default'] = JavaScriptCompiler; - module.exports = exports['default']; - -/***/ }), -/* 53 */ -/***/ (function(module, exports, __webpack_require__) { - - /* global define */ - 'use strict'; - - var _Object$keys = __webpack_require__(13)['default']; - - exports.__esModule = true; - - var _utils = __webpack_require__(5); - - var SourceNode = undefined; - - try { - /* istanbul ignore next */ - if (false) { - // We don't support this in AMD environments. For these environments, we asusme that - // they are running on the browser and thus have no need for the source-map library. - var SourceMap = require('source-map'); - SourceNode = SourceMap.SourceNode; - } - } catch (err) {} - /* NOP */ - - /* istanbul ignore if: tested but not covered in istanbul due to dist build */ - if (!SourceNode) { - SourceNode = function (line, column, srcFile, chunks) { - this.src = ''; - if (chunks) { - this.add(chunks); - } - }; - /* istanbul ignore next */ - SourceNode.prototype = { - add: function add(chunks) { - if (_utils.isArray(chunks)) { - chunks = chunks.join(''); - } - this.src += chunks; - }, - prepend: function prepend(chunks) { - if (_utils.isArray(chunks)) { - chunks = chunks.join(''); - } - this.src = chunks + this.src; - }, - toStringWithSourceMap: function toStringWithSourceMap() { - return { code: this.toString() }; - }, - toString: function toString() { - return this.src; - } - }; - } - - function castChunk(chunk, codeGen, loc) { - if (_utils.isArray(chunk)) { - var ret = []; - - for (var i = 0, len = chunk.length; i < len; i++) { - ret.push(codeGen.wrap(chunk[i], loc)); - } - return ret; - } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { - // Handle primitives that the SourceNode will throw up on - return chunk + ''; - } - return chunk; - } - - function CodeGen(srcFile) { - this.srcFile = srcFile; - this.source = []; - } - - CodeGen.prototype = { - isEmpty: function isEmpty() { - return !this.source.length; - }, - prepend: function prepend(source, loc) { - this.source.unshift(this.wrap(source, loc)); - }, - push: function push(source, loc) { - this.source.push(this.wrap(source, loc)); - }, - - merge: function merge() { - var source = this.empty(); - this.each(function (line) { - source.add([' ', line, '\n']); - }); - return source; - }, - - each: function each(iter) { - for (var i = 0, len = this.source.length; i < len; i++) { - iter(this.source[i]); - } - }, - - empty: function empty() { - var loc = this.currentLocation || { start: {} }; - return new SourceNode(loc.start.line, loc.start.column, this.srcFile); - }, - wrap: function wrap(chunk) { - var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1]; - - if (chunk instanceof SourceNode) { - return chunk; - } - - chunk = castChunk(chunk, this, loc); - - return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); - }, - - functionCall: function functionCall(fn, type, params) { - params = this.generateList(params); - return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); - }, - - quotedString: function quotedString(str) { - return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 - .replace(/\u2029/g, '\\u2029') + '"'; - }, - - objectLiteral: function objectLiteral(obj) { - // istanbul ignore next - - var _this = this; - - var pairs = []; - - _Object$keys(obj).forEach(function (key) { - var value = castChunk(obj[key], _this); - if (value !== 'undefined') { - pairs.push([_this.quotedString(key), ':', value]); - } - }); - - var ret = this.generateList(pairs); - ret.prepend('{'); - ret.add('}'); - return ret; - }, - - generateList: function generateList(entries) { - var ret = this.empty(); - - for (var i = 0, len = entries.length; i < len; i++) { - if (i) { - ret.add(','); - } - - ret.add(castChunk(entries[i], this)); - } - - return ret; - }, - - generateArray: function generateArray(entries) { - var ret = this.generateList(entries); - ret.prepend('['); - ret.add(']'); - - return ret; - } - }; - - exports['default'] = CodeGen; - module.exports = exports['default']; - -/***/ }) -/******/ ]) -}); -; \ No newline at end of file diff --git a/node_modules/handlebars/dist/handlebars.min.js b/node_modules/handlebars/dist/handlebars.min.js deleted file mode 100644 index 1ebc2606..00000000 --- a/node_modules/handlebars/dist/handlebars.min.js +++ /dev/null @@ -1,29 +0,0 @@ -/**! - - @license - handlebars v4.7.7 - -Copyright (C) 2011-2019 by Yehuda Katz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ -!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=r();return a.compile=function(b,c){return k.compile(b,c,a)},a.precompile=function(b,c){return k.precompile(b,c,a)},a.AST=i["default"],a.Compiler=k.Compiler,a.JavaScriptCompiler=m["default"],a.Parser=j.parser,a.parse=j.parse,a.parseWithoutProcessing=j.parseWithoutProcessing,a}var e=c(1)["default"];b.__esModule=!0;var f=c(2),g=e(f),h=c(45),i=e(h),j=c(46),k=c(51),l=c(52),m=e(l),n=c(49),o=e(n),p=c(44),q=e(p),r=g["default"].create,s=d();s.create=d,q["default"](s),s.Visitor=o["default"],s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(3)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(4),h=e(g),i=c(37),j=f(i),k=c(6),l=f(k),m=c(5),n=e(m),o=c(38),p=e(o),q=c(44),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(1)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(5),g=c(6),h=e(g),i=c(10),j=c(30),k=c(32),l=e(k),m=c(33),n="4.7.7";b.VERSION=n;var o=8;b.COMPILER_REVISION=o;var p=7;b.LAST_COMPATIBLE_COMPILER_REVISION=p;var q={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};b.REVISION_CHANGES=q;var r="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===r)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){m.resetLoggedProperties()}};var s=l["default"].log;b.log=s,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function e(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function f(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return m.test(a)?a.replace(l,c):a}function g(a){return!a&&0!==a||!(!p(a)||0!==a.length)}function h(a){var b=d({},a);return b._parent=a,b}function i(a,b){return a.path=b,a}function j(a,b){return(a?a+".":"")+b}b.__esModule=!0,b.extend=d,b.indexOf=e,b.escapeExpression=f,b.isEmpty=g,b.createFrame=h,b.blockParams=i,b.appendContextPath=j;var k={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===n.call(a)};b.isArray=p},function(a,b,c){"use strict";function d(a,b){var c=b&&b.loc,g=void 0,h=void 0,i=void 0,j=void 0;c&&(g=c.start.line,h=c.end.line,i=c.start.column,j=c.end.column,a+=" - "+g+":"+i);for(var k=Error.prototype.constructor.call(this,a),l=0;l<f.length;l++)this[f[l]]=k[f[l]];Error.captureStackTrace&&Error.captureStackTrace(this,d);try{c&&(this.lineNumber=g,this.endLineNumber=h,e?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:j,enumerable:!0})):(this.column=i,this.endColumn=j))}catch(m){}}var e=c(7)["default"];b.__esModule=!0;var f=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];d.prototype=new Error,b["default"]=d,a.exports=b["default"]},function(a,b,c){a.exports={"default":c(8),__esModule:!0}},function(a,b,c){var d=c(9);a.exports=function(a,b,c){return d.setDesc(a,b,c)}},function(a,b){var c=Object;a.exports={create:c.create,getProto:c.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:c.getOwnPropertyDescriptor,setDesc:c.defineProperty,setDescs:c.defineProperties,getKeys:c.keys,getNames:c.getOwnPropertyNames,getSymbols:c.getOwnPropertySymbols,each:[].forEach}},function(a,b,c){"use strict";function d(a){h["default"](a),j["default"](a),l["default"](a),n["default"](a),p["default"](a),r["default"](a),t["default"](a)}function e(a,b,c){a.helpers[b]&&(a.hooks[b]=a.helpers[b],c||delete a.helpers[b])}var f=c(1)["default"];b.__esModule=!0,b.registerDefaultHelpers=d,b.moveHelperToHooks=e;var g=c(11),h=f(g),i=c(12),j=f(i),k=c(25),l=f(k),m=c(26),n=f(m),o=c(27),p=f(o),q=c(28),r=f(q),s=c(29),t=f(s)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("blockHelperMissing",function(b,c){var e=c.inverse,f=c.fn;if(b===!0)return f(this);if(b===!1||null==b)return e(this);if(d.isArray(b))return b.length>0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){(function(d){"use strict";var e=c(13)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(5),h=c(6),i=f(h);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,d){l&&(l.key=b,l.index=c,l.first=0===c,l.last=!!d,m&&(l.contextPath=m+b)),k+=f(a[b],{data:l,blockParams:g.blockParams([a[b],b],[m+b,null])})}if(!b)throw new i["default"]("Must pass iterator to #each");var f=b.fn,h=b.inverse,j=0,k="",l=void 0,m=void 0;if(b.data&&b.ids&&(m=g.appendContextPath(b.data.contextPath,b.ids[0])+"."),g.isFunction(a)&&(a=a.call(this)),b.data&&(l=g.createFrame(b.data)),a&&"object"==typeof a)if(g.isArray(a))for(var n=a.length;j<n;j++)j in a&&c(j,j,j===a.length-1);else if(d.Symbol&&a[d.Symbol.iterator]){for(var o=[],p=a[d.Symbol.iterator](),q=p.next();!q.done;q=p.next())o.push(q.value);a=o;for(var n=a.length;j<n;j++)c(j,j,j===a.length-1)}else!function(){var b=void 0;e(a).forEach(function(a){void 0!==b&&c(b,j-1),b=a,j++}),void 0!==b&&c(b,j-1,!0)}();return 0===j&&(k=h(this)),k})},a.exports=b["default"]}).call(b,function(){return this}())},function(a,b,c){a.exports={"default":c(14),__esModule:!0}},function(a,b,c){c(15),a.exports=c(21).Object.keys},function(a,b,c){var d=c(16);c(18)("keys",function(a){return function(b){return a(d(b))}})},function(a,b,c){var d=c(17);a.exports=function(a){return Object(d(a))}},function(a,b){a.exports=function(a){if(void 0==a)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(19),e=c(21),f=c(24);a.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},function(a,b,c){var d=c(20),e=c(21),f=c(22),g="prototype",h=function(a,b,c){var i,j,k,l=a&h.F,m=a&h.G,n=a&h.S,o=a&h.P,p=a&h.B,q=a&h.W,r=m?e:e[b]||(e[b]={}),s=m?d:n?d[b]:(d[b]||{})[g];m&&(c=b);for(i in c)j=!l&&s&&i in s,j&&i in r||(k=j?s[i]:c[i],r[i]=m&&"function"!=typeof s[i]?c[i]:p&&j?f(k,d):q&&s[i]==k?function(a){var b=function(b){return this instanceof a?new a(b):a(b)};return b[g]=a[g],b}(k):o&&"function"==typeof k?f(Function.call,k):k,o&&((r[g]||(r[g]={}))[i]=k))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,a.exports=h},function(a,b){var c=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=c)},function(a,b){var c=a.exports={version:"1.2.6"};"number"==typeof __e&&(__e=c)},function(a,b,c){var d=c(23);a.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(6),f=d(e);b["default"]=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new f["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("if",function(a,b){if(2!=arguments.length)throw new g["default"]("#if requires exactly one argument");return e.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||e.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){if(2!=arguments.length)throw new g["default"]("#unless requires exactly one argument");return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d<arguments.length-1;d++)b.push(arguments[d]);var e=1;null!=c.hash.level?e=c.hash.level:c.data&&null!=c.data.level&&(e=c.data.level),b[0]=e,a.log.apply(a,b)})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("lookup",function(a,b,c){return a?c.lookupProperty(a,b):a})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("with",function(a,b){if(2!=arguments.length)throw new g["default"]("#with requires exactly one argument");e.isFunction(a)&&(a=a.call(this));var c=b.fn;if(e.isEmpty(a))return b.inverse(this);var d=b.data;return b.data&&b.ids&&(d=e.createFrame(b.data),d.contextPath=e.appendContextPath(b.data.contextPath,b.ids[0])),c(a,{data:d,blockParams:e.blockParams([a],[d&&d.contextPath])})})},a.exports=b["default"]},function(a,b,c){"use strict";function d(a){g["default"](a)}var e=c(1)["default"];b.__esModule=!0,b.registerDefaultDecorators=d;var f=c(31),g=e(f)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerDecorator("inline",function(a,b,c,e){var f=a;return b.partials||(b.partials={},f=function(e,f){var g=c.partials;c.partials=d.extend({},g,b.partials);var h=a(e,f);return c.partials=g,h}),b.partials[e.args[0]]=e.fn,f})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5),e={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(a){if("string"==typeof a){var b=d.indexOf(e.methodMap,a.toLowerCase());a=b>=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];console[b].apply(console,d)}}};b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=i(null);b.constructor=!1,b.__defineGetter__=!1,b.__defineSetter__=!1,b.__lookupGetter__=!1;var c=i(null);return c.__proto__=!1,{properties:{whitelist:l.createNewLookupObject(c,a.allowedProtoProperties),defaultValue:a.allowProtoPropertiesByDefault},methods:{whitelist:l.createNewLookupObject(b,a.allowedProtoMethods),defaultValue:a.allowProtoMethodsByDefault}}}function e(a,b,c){return"function"==typeof a?f(b.methods,c):f(b.properties,c)}function f(a,b){return void 0!==a.whitelist[b]?a.whitelist[b]===!0:void 0!==a.defaultValue?a.defaultValue:(g(b),!1)}function g(a){o[a]!==!0&&(o[a]=!0,n.log("error",'Handlebars: Access has been denied to resolve the property "'+a+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}function h(){j(o).forEach(function(a){delete o[a]})}var i=c(34)["default"],j=c(13)["default"],k=c(3)["default"];b.__esModule=!0,b.createProtoAccessControl=d,b.resultIsAllowed=e,b.resetLoggedProperties=h;var l=c(36),m=c(32),n=k(m),o=i(null)},function(a,b,c){a.exports={"default":c(35),__esModule:!0}},function(a,b,c){var d=c(9);a.exports=function(a,b){return d.create(a,b)}},function(a,b,c){"use strict";function d(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return f.extend.apply(void 0,[e(null)].concat(b))}var e=c(34)["default"];b.__esModule=!0,b.createNewLookupObject=d;var f=c(5)},function(a,b){"use strict";function c(a){this.string=a}b.__esModule=!0,c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=v.COMPILER_REVISION;if(!(b>=v.LAST_COMPATIBLE_COMPILER_REVISION&&b<=v.COMPILER_REVISION)){if(b<v.LAST_COMPATIBLE_COMPILER_REVISION){var d=v.REVISION_CHANGES[c],e=v.REVISION_CHANGES[b];throw new u["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new u["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){function c(c,d,e){e.hash&&(d=s.extend({},d,e.hash),e.ids&&(e.ids[0]=!0)),c=b.VM.resolvePartial.call(this,c,d,e);var f=s.extend({},e,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),g=b.VM.invokePartial.call(this,c,d,f);if(null==g&&b.compile&&(e.partials[e.name]=b.compile(c,a.compilerOptions,b),g=e.partials[e.name](d,f)),null!=g){if(e.indent){for(var h=g.split("\n"),i=0,j=h.length;i<j&&(h[i]||i+1!==j);i++)h[i]=e.indent+h[i];g=h.join("\n")}return g}throw new u["default"]("The partial "+e.name+" could not be compiled when running in runtime-only mode")}function d(b){function c(b){return""+a.main(g,b,g.helpers,g.partials,f,i,h)}var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],f=e.data;d._setup(e),!e.partial&&a.useData&&(f=j(b,f));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=e.depths?b!=e.depths[0]?[b].concat(e.depths):e.depths:[b]),(c=k(a.main,c,g,e.depths||[],f,i))(b,e)}if(!b)throw new u["default"]("No environment passed to template");if(!a||!a.main)throw new u["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,b.VM.checkRevision(a.compiler);var e=a.compiler&&7===a.compiler[0],g={strict:function(a,b,c){if(!(a&&b in a))throw new u["default"]('"'+b+'" not defined in '+a,{loc:c});return g.lookupProperty(a,b)},lookupProperty:function(a,b){var c=a[b];return null==c?c:Object.prototype.hasOwnProperty.call(a,b)?c:y.resultIsAllowed(c,g.protoAccessControl,b)?c:void 0},lookup:function(a,b){for(var c=a.length,d=0;d<c;d++){var e=a[d]&&g.lookupProperty(a[d],b);if(null!=e)return a[d][b]}},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:s.escapeExpression,invokePartial:c,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var g=this.programs[a],h=this.fn(a);return b||e||d||c?g=f(this,a,h,b,c,d,e):g||(g=this.programs[a]=f(this,a,h)),g},data:function(a,b){for(;a&&b--;)a=a._parent;return a},mergeIfNeeded:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=s.extend({},b,a)),c},nullContext:n({}),noop:b.VM.noop,compilerInfo:a.compiler};return d.isTop=!0,d._setup=function(c){if(c.partial)g.protoAccessControl=c.protoAccessControl,g.helpers=c.helpers,g.partials=c.partials,g.decorators=c.decorators,g.hooks=c.hooks;else{var d=s.extend({},b.helpers,c.helpers);l(d,g),g.helpers=d,a.usePartial&&(g.partials=g.mergeIfNeeded(c.partials,b.partials)),(a.usePartial||a.useDecorators)&&(g.decorators=s.extend({},b.decorators,c.decorators)),g.hooks={},g.protoAccessControl=y.createProtoAccessControl(c);var f=c.allowCallsToHelperMissing||e;w.moveHelperToHooks(g,"helperMissing",f),w.moveHelperToHooks(g,"blockHelperMissing",f)}},d._child=function(b,c,d,e){if(a.useBlockParams&&!d)throw new u["default"]("must pass block params");if(a.useDepths&&!e)throw new u["default"]("must pass parent depths");return f(g,b,a[b],c,0,d,e)},d}function f(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return!g||b==g[0]||b===a.nullContext&&null===g[0]||(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=k(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function g(a,b,c){return a?a.call||c.name||(c.name=a,a=c.partials[a]):a="@partial-block"===c.name?c.data["partial-block"]:c.partials[c.name],a}function h(a,b,c){var d=c.data&&c.data["partial-block"];c.partial=!0,c.ids&&(c.data.contextPath=c.ids[0]||c.data.contextPath);var e=void 0;if(c.fn&&c.fn!==i&&!function(){c.data=v.createFrame(c.data);var a=c.fn;e=c.data["partial-block"]=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return c.data=v.createFrame(c.data),c.data["partial-block"]=d,a(b,c)},a.partials&&(c.partials=s.extend({},c.partials,a.partials))}(),void 0===a&&e&&(a=e),void 0===a)throw new u["default"]("The partial "+c.name+" could not be found");if(a instanceof Function)return a(b,c)}function i(){return""}function j(a,b){return b&&"root"in b||(b=b?v.createFrame(b):{},b.root=a),b}function k(a,b,c,d,e,f){if(a.decorator){var g={};b=a.decorator(b,g,c,d&&d[0],e,f,d),s.extend(b,g)}return b}function l(a,b){o(a).forEach(function(c){var d=a[c];a[c]=m(d,b)})}function m(a,b){var c=b.lookupProperty;return x.wrapHelper(a,function(a){return s.extend({lookupProperty:c},a)})}var n=c(39)["default"],o=c(13)["default"],p=c(3)["default"],q=c(1)["default"];b.__esModule=!0,b.checkRevision=d,b.template=e,b.wrapProgram=f,b.resolvePartial=g,b.invokePartial=h,b.noop=i;var r=c(5),s=p(r),t=c(6),u=q(t),v=c(4),w=c(10),x=c(43),y=c(33)},function(a,b,c){a.exports={"default":c(40),__esModule:!0}},function(a,b,c){c(41),a.exports=c(21).Object.seal},function(a,b,c){var d=c(42);c(18)("seal",function(a){return function(b){return a&&d(b)?a(b):b}})},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b){"use strict";function c(a,b){if("function"!=typeof a)return a;var c=function(){var c=arguments[arguments.length-1];return arguments[arguments.length-1]=b(c),a.apply(this,arguments)};return c}b.__esModule=!0,b.wrapHelper=c},function(a,b){(function(c){"use strict";b.__esModule=!0,b["default"]=function(a){var b="undefined"!=typeof c?c:window,d=b.Handlebars;a.noConflict=function(){return b.Handlebars===a&&(b.Handlebars=d),a}},a.exports=b["default"]}).call(b,function(){return this}())},function(a,b){"use strict";b.__esModule=!0;var c={helpers:{helperExpression:function(a){return"SubExpression"===a.type||("MustacheStatement"===a.type||"BlockStatement"===a.type)&&!!(a.params&&a.params.length||a.hash)},scopedId:function(a){return/^\.|this\b/.test(a.original)},simpleId:function(a){return 1===a.parts.length&&!c.helpers.scopedId(a)&&!a.depth}}};b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if("Program"===a.type)return a;i["default"].yy=o,o.locInfo=function(a){return new o.SourceLocation(b&&b.srcName,a)};var c=i["default"].parse(a);return c}function e(a,b){var c=d(a,b),e=new k["default"](b);return e.accept(c)}var f=c(1)["default"],g=c(3)["default"];b.__esModule=!0,b.parseWithoutProcessing=d,b.parse=e;var h=c(47),i=f(h),j=c(48),k=f(j),l=c(50),m=g(l),n=c(5);b.parser=i["default"];var o={};n.extend(o,m)},function(a,b){"use strict";b.__esModule=!0;var c=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:this.$=d.prepareProgram(f[h]);break;case 3:this.$=f[h];break;case 4:this.$=f[h];break;case 5:this.$=f[h];break;case 6:this.$=f[h];break;case 7:this.$=f[h];break;case 8:this.$=f[h];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(f[h]),strip:d.stripFlags(f[h],f[h]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:f[h],value:f[h],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(f[h-2],f[h-1],f[h],this._$);break;case 12:this.$={path:f[h-3],params:f[h-2],hash:f[h-1]};break;case 13:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!1,this._$);break;case 14:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!0,this._$);break;case 15:this.$={open:f[h-5],path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 16:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 17:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 18:this.$={strip:d.stripFlags(f[h-1],f[h-1]),program:f[h]};break;case 19:var i=d.prepareBlock(f[h-2],f[h-1],f[h],f[h],!1,this._$),j=d.prepareProgram([i],f[h-1].loc);j.chained=!0,this.$={strip:f[h-2].strip,program:j,chain:!0};break;case 20:this.$=f[h];break;case 21:this.$={path:f[h-1],strip:d.stripFlags(f[h-2],f[h])};break;case 22:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 23:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:f[h-3],params:f[h-2],hash:f[h-1],indent:"",strip:d.stripFlags(f[h-4],f[h]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(f[h-2],f[h-1],f[h],this._$);break;case 26:this.$={path:f[h-3],params:f[h-2],hash:f[h-1],strip:d.stripFlags(f[h-4],f[h])};break;case 27:this.$=f[h];break;case 28:this.$=f[h];break;case 29:this.$={type:"SubExpression",path:f[h-3],params:f[h-2],hash:f[h-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:f[h],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(f[h-2]),value:f[h],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(f[h-1]);break;case 33:this.$=f[h];break;case 34:this.$=f[h];break;case 35:this.$={type:"StringLiteral",value:f[h],original:f[h],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(f[h]),original:Number(f[h]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===f[h],original:"true"===f[h],loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=f[h];break;case 41:this.$=f[h];break;case 42:this.$=d.preparePath(!0,f[h],this._$);break;case 43:this.$=d.preparePath(!1,f[h],this._$);break;case 44:f[h-2].push({part:d.id(f[h]),original:f[h],separator:f[h-1]}),this.$=f[h-2];break;case 45:this.$=[{part:d.id(f[h]),original:f[h]}];break;case 46:this.$=[];break;case 47:f[h-1].push(f[h]);break;case 48:this.$=[];break;case 49:f[h-1].push(f[h]);break;case 50:this.$=[];break;case 51:f[h-1].push(f[h]);break;case 58:this.$=[];break;case 59:f[h-1].push(f[h]);break;case 64:this.$=[];break;case 65:f[h-1].push(f[h]);break;case 70:this.$=[];break;case 71:f[h-1].push(f[h]);break;case 78:this.$=[];break;case 79:f[h-1].push(f[h]);break;case 82:this.$=[];break;case 83:f[h-1].push(f[h]);break;case 86:this.$=[];break;case 87:f[h-1].push(f[h]);break;case 90:this.$=[];break;case 91:f[h-1].push(f[h]);break;case 94:this.$=[];break;case 95:f[h-1].push(f[h]);break;case 98:this.$=[f[h]];break;case 99:f[h-1].push(f[h]);break;case 100:this.$=[f[h]];break;case 101:f[h-1].push(f[h])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{ -33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:(null!==n&&"undefined"!=typeof n||(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;g<f.length&&(c=this._input.match(this.rules[f[g]]),!c||b&&!(c[0].length>b[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substring(a,b.yyleng-c+a)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(49),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;i<j;i++){var k=d[i],l=this.accept(k);if(l){var m=e(d,i,c),n=f(d,i,c),o=l.openStandalone&&m,p=l.closeStandalone&&n,q=l.inlineStandalone&&m&&n;l.close&&g(d,i,!0),l.open&&h(d,i,!0),b&&q&&(g(d,i),h(d,i)&&"PartialStatement"===k.type&&(k.indent=/([ \t]+$)/.exec(d[i-1].original)[1])),b&&o&&(g((k.program||k.inverse).body),h(d,i)),b&&p&&(g(d,i),h((k.inverse||k.program).body))}}return a},d.prototype.BlockStatement=d.prototype.DecoratorBlock=d.prototype.PartialBlockStatement=function(a){this.accept(a.program),this.accept(a.inverse);var b=a.program||a.inverse,c=a.program&&a.inverse,d=c,i=c;if(c&&c.chained)for(d=c.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var j={open:a.openStrip.open,close:a.closeStrip.close,openStandalone:f(b.body),closeStandalone:e((d||b).body)};if(a.openStrip.close&&g(b.body,null,!0),c){var k=a.inverseStrip;k.open&&h(b.body,null,!0),k.close&&g(d.body,null,!0),a.closeStrip.open&&h(i.body,null,!0),!this.options.ignoreStandalone&&e(b.body)&&f(d.body)&&(h(b.body),g(d.body))}else a.closeStrip.open&&h(b.body,null,!0);return j},d.prototype.Decorator=d.prototype.MustacheStatement=function(a){return a.strip},d.prototype.PartialStatement=d.prototype.CommentStatement=function(a){var b=a.strip||{};return{inlineStandalone:!0,open:b.open,close:b.close}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(){this.parents=[]}function e(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function f(a){e.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function g(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var h=c(1)["default"];b.__esModule=!0;var i=c(6),j=h(i);d.prototype={constructor:d,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!d.prototype[c.type])throw new j["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new j["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;b<c;b++)this.acceptKey(a,b),a[b]||(a.splice(b,1),b--,c--)},accept:function(a){if(a){if(!this[a.type])throw new j["default"]("Unknown type: "+a.type,a);this.current&&this.parents.unshift(this.current),this.current=a;var b=this[a.type](a);return this.current=this.parents.shift(),!this.mutating||b?b:b!==!1?a:void 0}},Program:function(a){this.acceptArray(a.body)},MustacheStatement:e,Decorator:e,BlockStatement:f,DecoratorBlock:f,PartialStatement:g,PartialBlockStatement:function(a){g.call(this,a),this.acceptKey(a,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:e,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(a){this.acceptArray(a.pairs)},HashPair:function(a){this.acceptRequired(a,"value")}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if(b=b.path?b.path.original:b,a.path.original!==b){var c={loc:a.path.loc};throw new q["default"](a.path.original+" doesn't match "+b,c)}}function e(a,b){this.source=a,this.start={line:b.first_line,column:b.first_column},this.end={line:b.last_line,column:b.last_column}}function f(a){return/^\[.*\]$/.test(a)?a.substring(1,a.length-1):a}function g(a,b){return{open:"~"===a.charAt(2),close:"~"===b.charAt(b.length-3)}}function h(a){return a.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function i(a,b,c){c=this.locInfo(c);for(var d=a?"@":"",e=[],f=0,g=0,h=b.length;g<h;g++){var i=b[g].part,j=b[g].original!==i;if(d+=(b[g].separator||"")+i,j||".."!==i&&"."!==i&&"this"!==i)e.push(i);else{if(e.length>0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===i&&f++}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=m.extend({},b),"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(m.isArray(a)&&m.isArray(b)&&a.length===b.length){for(var c=0;c<a.length;c++)if(!g(a[c],b[c]))return!1;return!0}}function h(a){if(!a.path.parts){var b=a.path;a.path={type:"PathExpression",data:!1,depth:0,parts:[b.original+""],original:b.original+"",loc:b.loc}}}var i=c(34)["default"],j=c(1)["default"];b.__esModule=!0,b.Compiler=d,b.precompile=e,b.compile=f;var k=c(6),l=j(k),m=c(5),n=c(45),o=j(n),p=[].slice;d.prototype={compiler:d,equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;c<b;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!g(d.args,e.args))return!1}b=this.children.length;for(var c=0;c<b;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds,b.blockParams=b.blockParams||[],b.knownHelpers=m.extend(i(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},b.knownHelpers),this.accept(a)},compileProgram:function(a){var b=new this.compiler,c=b.compile(a,this.options),d=this.guid++;return this.usePartial=this.usePartial||c.usePartial,this.children[d]=c,this.useDepths=this.useDepths||c.useDepths,d},accept:function(a){if(!this[a.type])throw new l["default"]("Unknown type: "+a.type,a);this.sourceNode.unshift(a);var b=this[a.type](a);return this.sourceNode.shift(),b},Program:function(a){this.options.blockParams.unshift(a.blockParams);for(var b=a.body,c=b.length,d=0;d<c;d++)this.accept(b[d]);return this.options.blockParams.shift(),this.isSimple=1===c,this.blockParams=a.blockParams?a.blockParams.length:0,this},BlockStatement:function(a){h(a);var b=a.program,c=a.inverse;b=b&&this.compileProgram(b),c=c&&this.compileProgram(c);var d=this.classifySexpr(a);"helper"===d?this.helperSexpr(a,b,c):"simple"===d?(this.simpleSexpr(a),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("blockValue",a.path.original)):(this.ambiguousSexpr(a,b,c),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(a){var b=a.program&&this.compileProgram(a.program),c=this.setupFullMustacheParams(a,b,void 0),d=a.path;this.useDecorators=!0,this.opcode("registerDecorator",c.length,d.original)},PartialStatement:function(a){this.usePartial=!0;var b=a.program;b&&(b=this.compileProgram(a.program));var c=a.params;if(c.length>1)throw new l["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new l["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,o["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=o["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");c<d;c++)this.pushParam(b[c].value);for(;c--;)this.opcode("assignToHash",b[c].key);this.opcode("popHash")},opcode:function(a){this.opcodes.push({opcode:a,args:p.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(a){a&&(this.useDepths=!0)},classifySexpr:function(a){var b=o["default"].helpers.simpleId(a.path),c=b&&!!this.blockParamIndex(a.path.parts[0]),d=!c&&o["default"].helpers.helperExpression(a),e=!c&&(d||b);if(e&&!d){var f=a.path.parts[0],g=this.options;g.knownHelpers[f]?d=!0:g.knownHelpersOnly&&(e=!1)}return d?"helper":e?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;b<c;b++)this.pushParam(a[b])},pushParam:function(a){var b=null!=a.value?a.value:a.original||"";if(this.stringParams)b.replace&&(b=b.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",b,a.type),"SubExpression"===a.type&&this.accept(a);else{if(this.trackIds){var c=void 0;if(!a.parts||o["default"].helpers.scopedId(a)||a.depth||(c=this.blockParamIndex(a.parts[0])),c){var d=a.parts.slice(1).join(".");this.opcode("pushId","BlockParam",c,d)}else b=a.original||b,b.replace&&(b=b.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",a.type,b)}this.accept(a)}},setupFullMustacheParams:function(a,b,c,d){var e=a.params;return this.pushParams(e),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.accept(a.hash):this.opcode("emptyHash",d),e},blockParamIndex:function(a){for(var b=0,c=this.options.blockParams.length;b<c;b++){var d=this.options.blockParams[b],e=d&&m.indexOf(d,a);if(d&&e>=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;f<g;f++)e=b.nameLookup(e,c[f],d);return a?[b.aliasable("container.strict"),"(",e,", ",b.quotedString(c[f]),", ",JSON.stringify(b.source.currentLocation)," )"]:e}var g=c(13)["default"],h=c(1)["default"];b.__esModule=!0;var i=c(4),j=c(6),k=h(j),l=c(5),m=c(53),n=h(m);e.prototype={nameLookup:function(a,b){return this.internalNameLookup(a,b)},depthedLookup:function(a){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(a),")"]},compilerInfo:function(){var a=i.COMPILER_REVISION,b=i.REVISION_CHANGES[a];return[a,b]},appendToBuffer:function(a,b,c){return l.isArray(a)||(a=[a]),a=this.source.wrap(a,b),this.environment.isSimple?["return ",a,";"]:c?["buffer += ",a,";"]:(a.appendToBuffer=!0,a)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(a,b){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",a,",",JSON.stringify(b),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.useDepths||a.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||a.useBlockParams;var e=a.opcodes,f=void 0,g=void 0,h=void 0,i=void 0;for(h=0,i=e.length;h<i;h++)f=e[h],this.source.currentLocation=f.loc,g=g||f.loc,this[f.opcode].apply(this,f.args);if(this.source.currentLocation=g,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new k["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),";\n"]), -this.decorators.push("return fn;"),d?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var j=this.createFunctionContext(d);if(this.isChild)return j;var l={compiler:this.compilerInfo(),main:j};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var m=this.context,n=m.programs,o=m.decorators;for(h=0,i=n.length;h<i;h++)n[h]&&(l[h]=n[h],o[h]&&(l[h+"_d"]=o[h],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),d?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),b.srcName?(l=l.toStringWithSourceMap({file:b.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new n["default"](this.options.srcName),this.decorators=new n["default"](this.options.srcName)},createFunctionContext:function(a){var b=this,c="",d=this.stackVars.concat(this.registers.list);d.length>0&&(c+=", "+d.join(", "));var e=0;g(this.aliases).forEach(function(a){var d=b.aliases[a];d.children&&d.referenceCount>1&&(c+=", alias"+ ++e+"="+a,d.children[0]="alias"+e)}),this.lookupPropertyFunctionIsUsed&&(c+=", "+this.lookupPropertyFunctionVarDeclaration());var f=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&f.push("blockParams"),this.useDepths&&f.push("depths");var h=this.mergeSource(c);return a?(f.push(h),Function.apply(this,f)):this.source.wrap(["function(",f.join(","),") {\n ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function(a){var b=this.aliasable("container.hooks.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("container.hooks.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var g=this;if(this.options.strict||this.options.assumeObjects)return void this.push(f(this.options.strict&&e,this,b,a));for(var h=b.length;c<h;c++)this.replaceStack(function(e){var f=g.nameLookup(e,b[c],a);return d?[" && ",f]:[" != null ? ",f," : ",e]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"SubExpression"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(a){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(a?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(a.ids)),this.stringParams&&(this.push(this.objectLiteral(a.contexts)),this.push(this.objectLiteral(a.types))),this.push(this.objectLiteral(a.values))},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},registerDecorator:function(a,b){var c=this.nameLookup("decorators",b,"decorator"),d=this.setupHelperArgs(b,a);this.decorators.push(["fn = ",this.decorators.functionCall(c,"",["fn","props","container",d])," || fn;"])},invokeHelper:function(a,b,c){var d=this.popStack(),e=this.setupHelper(a,b),f=[];c&&f.push(e.name),f.push(d),this.options.strict||f.push(this.aliasable("container.hooks.helperMissing"));var g=["(",this.itemsSeparatedBy(f,"||"),")"],h=this.source.functionCall(g,"call",e.callParams);this.push(h)},itemsSeparatedBy:function(a,b){var c=[];c.push(a[0]);for(var d=1;d<a.length;d++)c.push(b,a[d]);return c},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(this.source.functionCall(c.name,"call",c.callParams))},invokeAmbiguous:function(a,b){this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper"),f=["(","(helper = ",e," || ",c,")"];this.options.strict||(f[0]="(helper = ",f.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",f,d.paramsInit?["),(",d.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",d.callParams)," : helper))"])},invokePartial:function(a,b,c){var d=[],e=this.setupParams(b,1,d);a&&(b=this.popStack(),delete e.name),c&&(e.indent=JSON.stringify(c)),e.helpers="helpers",e.partials="partials",e.decorators="container.decorators",a?d.unshift(b):d.unshift(this.nameLookup("partials",b,"partial")),this.options.compat&&(e.depths="depths"),e=this.objectLiteral(e),d.push(e),this.push(this.source.functionCall("container.invokePartial","",d))},assignToHash:function(a){var b=this.popStack(),c=void 0,d=void 0,e=void 0;this.trackIds&&(e=this.popStack()),this.stringParams&&(d=this.popStack(),c=this.popStack());var f=this.hash;c&&(f.contexts[a]=c),d&&(f.types[a]=d),e&&(f.ids[a]=e),f.values[a]=b},pushId:function(a,b,c){"BlockParam"===a?this.pushStackLiteral("blockParams["+b[0]+"].path["+b[1]+"]"+(c?" + "+JSON.stringify("."+c):"")):"PathExpression"===a?this.pushString(b):"SubExpression"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:e,compileChildren:function(a,b){for(var c=a.children,d=void 0,e=void 0,f=0,g=c.length;f<g;f++){d=c[f],e=new this.compiler;var h=this.matchExistingProgram(d);if(null==h){this.context.programs.push("");var i=this.context.programs.length;d.index=i,d.name="program"+i,this.context.programs[i]=e.compile(d,b,this.context,!this.precompile),this.context.decorators[i]=e.decorators,this.context.environments[i]=d,this.useDepths=this.useDepths||e.useDepths,this.useBlockParams=this.useBlockParams||e.useBlockParams,d.useDepths=this.useDepths,d.useBlockParams=this.useBlockParams}else d.index=h.index,d.name="program"+h.index,this.useDepths=this.useDepths||h.useDepths,this.useBlockParams=this.useBlockParams||h.useBlockParams}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;b<c;b++){var d=this.context.environments[b];if(d&&d.equals(a))return d}},programExpression:function(a){var b=this.environment.children[a],c=[b.index,"data",b.blockParams];return(this.useBlockParams||this.useDepths)&&c.push("blockParams"),this.useDepths&&c.push("depths"),"container.program("+c.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},push:function(a){return a instanceof d||(a=this.source.wrap(a)),this.inlineStack.push(a),a},pushStackLiteral:function(a){this.push(new d(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),a&&this.source.push(a)},replaceStack:function(a){var b=["("],c=void 0,e=void 0,f=void 0;if(!this.isInline())throw new k["default"]("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof d)c=[g.value],b=["(",c],f=!0;else{e=!0;var h=this.incrStack();b=["((",this.push(h)," = ",g,")"],c=this.topStack()}var i=a.call(this,c);f||this.popStack(),e&&this.stackSlot--,this.push(b.concat(i,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;b<c;b++){var e=a[b];if(e instanceof d)this.compileStack.push(e);else{var f=this.incrStack();this.pushSource([f," = ",e,";"]),this.compileStack.push(f)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof d)return c.value;if(!b){if(!this.stackSlot)throw new k["default"]("Invalid stack pop");this.stackSlot--}return c},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof d?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return this.source.quotedString(a)},objectLiteral:function(a){return this.source.objectLiteral(a)},aliasable:function(a){var b=this.aliases[a];return b?(b.referenceCount++,b):(b=this.aliases[a]=this.source.wrap(a),b.aliasable=!0,b.referenceCount=1,b)},setupHelper:function(a,b,c){var d=[],e=this.setupHelperArgs(b,a,d,c),f=this.nameLookup("helpers",b,"helper"),g=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:d,paramsInit:e,name:f,callParams:[g].concat(d)}},setupParams:function(a,b,c){var d={},e=[],f=[],g=[],h=!c,i=void 0;h&&(c=[]),d.name=this.quotedString(a),d.hash=this.popStack(),this.trackIds&&(d.hashIds=this.popStack()),this.stringParams&&(d.hashTypes=this.popStack(),d.hashContexts=this.popStack());var j=this.popStack(),k=this.popStack();(k||j)&&(d.fn=k||"container.noop",d.inverse=j||"container.noop");for(var l=b;l--;)i=this.popStack(),c[l]=i,this.trackIds&&(g[l]=this.popStack()),this.stringParams&&(f[l]=this.popStack(),e[l]=this.popStack());return h&&(d.args=this.source.generateArray(c)),this.trackIds&&(d.ids=this.source.generateArray(g)),this.stringParams&&(d.types=this.source.generateArray(f),d.contexts=this.source.generateArray(e)),this.options.data&&(d.data="data"),this.useBlockParams&&(d.blockParams="blockParams"),d},setupHelperArgs:function(a,b,c,d){var e=this.setupParams(a,b,c);return e.loc=JSON.stringify(this.source.currentLocation),e=this.objectLiteral(e),d?(this.useRegister("options"),c.push("options"),["options=",e]):c?(c.push(e),""):e}},function(){for(var a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),b=e.RESERVED_WORDS={},c=0,d=a.length;c<d;c++)b[a[c]]=!0}(),e.isValidJavaScriptVariableName=function(a){return!e.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b,c){if(g.isArray(a)){for(var d=[],e=0,f=a.length;e<f;e++)d.push(b.wrap(a[e],c));return d}return"boolean"==typeof a||"number"==typeof a?a+"":a}function e(a){this.srcFile=a,this.source=[]}var f=c(13)["default"];b.__esModule=!0;var g=c(5),h=void 0;try{}catch(i){}h||(h=function(a,b,c,d){this.src="",d&&this.add(d)},h.prototype={add:function(a){g.isArray(a)&&(a=a.join("")),this.src+=a},prepend:function(a){g.isArray(a)&&(a=a.join("")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),e.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,b){this.source.unshift(this.wrap(a,b))},push:function(a,b){this.source.push(this.wrap(a,b))},merge:function(){var a=this.empty();return this.each(function(b){a.add([" ",b,"\n"])}),a},each:function(a){for(var b=0,c=this.source.length;b<c;b++)a(this.source[b])},empty:function(){var a=this.currentLocation||{start:{}};return new h(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return a instanceof h?a:(a=d(a,this,b),new h(b.start.line,b.start.column,this.srcFile,a))},functionCall:function(a,b,c){return c=this.generateList(c),this.wrap([a,b?"."+b+"(":"(",c,")"])},quotedString:function(a){return'"'+(a+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=this,c=[];f(a).forEach(function(e){var f=d(a[e],b);"undefined"!==f&&c.push([b.quotedString(e),":",f])});var e=this.generateList(c);return e.prepend("{"),e.add("}"),e},generateList:function(a){for(var b=this.empty(),c=0,e=a.length;c<e;c++)c&&b.add(","),b.add(d(a[c],this));return b},generateArray:function(a){var b=this.generateList(a);return b.prepend("["),b.add("]"),b}},b["default"]=e,a.exports=b["default"]}])}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/handlebars.runtime.amd.js b/node_modules/handlebars/dist/handlebars.runtime.amd.js deleted file mode 100644 index 87f41929..00000000 --- a/node_modules/handlebars/dist/handlebars.runtime.amd.js +++ /dev/null @@ -1,1286 +0,0 @@ -/**! - - @license - handlebars v4.7.7 - -Copyright (C) 2011-2019 by Yehuda Katz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ -define('handlebars/utils',['exports'], function (exports) { - 'use strict'; - - exports.__esModule = true; - exports.extend = extend; - exports.indexOf = indexOf; - exports.escapeExpression = escapeExpression; - exports.isEmpty = isEmpty; - exports.createFrame = createFrame; - exports.blockParams = blockParams; - exports.appendContextPath = appendContextPath; - var escape = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`', - '=': '=' - }; - - var badChars = /[&<>"'`=]/g, - possible = /[&<>"'`=]/; - - function escapeChar(chr) { - return escape[chr]; - } - - function extend(obj /* , ...source */) { - for (var i = 1; i < arguments.length; i++) { - for (var key in arguments[i]) { - if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { - obj[key] = arguments[i][key]; - } - } - } - - return obj; - } - - var toString = Object.prototype.toString; - - exports.toString = toString; - // Sourced from lodash - // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt - /* eslint-disable func-style */ - var isFunction = function isFunction(value) { - return typeof value === 'function'; - }; - // fallback for older versions of Chrome and Safari - /* istanbul ignore next */ - if (isFunction(/x/)) { - exports.isFunction = isFunction = function (value) { - return typeof value === 'function' && toString.call(value) === '[object Function]'; - }; - } - exports.isFunction = isFunction; - - /* eslint-enable func-style */ - - /* istanbul ignore next */ - var isArray = Array.isArray || function (value) { - return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; - }; - - exports.isArray = isArray; - // Older IE versions do not directly support indexOf so we must implement our own, sadly. - - function indexOf(array, value) { - for (var i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { - return i; - } - } - return -1; - } - - function escapeExpression(string) { - if (typeof string !== 'string') { - // don't escape SafeStrings, since they're already safe - if (string && string.toHTML) { - return string.toHTML(); - } else if (string == null) { - return ''; - } else if (!string) { - return string + ''; - } - - // Force a string conversion as this will be done by the append regardless and - // the regex test will do this transparently behind the scenes, causing issues if - // an object's to string has escaped characters in it. - string = '' + string; - } - - if (!possible.test(string)) { - return string; - } - return string.replace(badChars, escapeChar); - } - - function isEmpty(value) { - if (!value && value !== 0) { - return true; - } else if (isArray(value) && value.length === 0) { - return true; - } else { - return false; - } - } - - function createFrame(object) { - var frame = extend({}, object); - frame._parent = object; - return frame; - } - - function blockParams(params, ids) { - params.path = ids; - return params; - } - - function appendContextPath(contextPath, id) { - return (contextPath ? contextPath + '.' : '') + id; - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3V0aWxzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUEsTUFBTSxNQUFNLEdBQUc7QUFDYixPQUFHLEVBQUUsT0FBTztBQUNaLE9BQUcsRUFBRSxNQUFNO0FBQ1gsT0FBRyxFQUFFLE1BQU07QUFDWCxPQUFHLEVBQUUsUUFBUTtBQUNiLE9BQUcsRUFBRSxRQUFRO0FBQ2IsT0FBRyxFQUFFLFFBQVE7QUFDYixPQUFHLEVBQUUsUUFBUTtHQUNkLENBQUM7O0FB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mJiB2YWx1ZS5sZW5ndGggPT09IDApIHtcbiAgICByZXR1cm4gdHJ1ZTtcbiAgfSBlbHNlIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGNyZWF0ZUZyYW1lKG9iamVjdCkge1xuICBsZXQgZnJhbWUgPSBleHRlbmQoe30sIG9iamVjdCk7XG4gIGZyYW1lLl9wYXJlbnQgPSBvYmplY3Q7XG4gIHJldHVybiBmcmFtZTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGJsb2NrUGFyYW1zKHBhcmFtcywgaWRzKSB7XG4gIHBhcmFtcy5wYXRoID0gaWRzO1xuICByZXR1cm4gcGFyYW1zO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gYXBwZW5kQ29udGV4dFBhdGgoY29udGV4dFBhdGgsIGlkKSB7XG4gIHJldHVybiAoY29udGV4dFBhdGggPyBjb250ZXh0UGF0aCArICcuJyA6ICcnKSArIGlkO1xufVxuIl19 -; -define('handlebars/exception',['exports', 'module'], function (exports, module) { - 'use strict'; - - var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack']; - - function Exception(message, node) { - var loc = node && node.loc, - line = undefined, - endLineNumber = undefined, - column = undefined, - endColumn = undefined; - - if (loc) { - line = loc.start.line; - endLineNumber = loc.end.line; - column = loc.start.column; - endColumn = loc.end.column; - - message += ' - ' + line + ':' + column; - } - - var tmp = Error.prototype.constructor.call(this, message); - - // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. - for (var idx = 0; idx < errorProps.length; idx++) { - this[errorProps[idx]] = tmp[errorProps[idx]]; - } - - /* istanbul ignore else */ - if (Error.captureStackTrace) { - Error.captureStackTrace(this, Exception); - } - - try { - if (loc) { - this.lineNumber = line; - this.endLineNumber = endLineNumber; - - // Work around issue under safari where we can't directly set the column value - /* istanbul ignore next */ - if (Object.defineProperty) { - Object.defineProperty(this, 'column', { - value: column, - enumerable: true - }); - Object.defineProperty(this, 'endColumn', { - value: endColumn, - enumerable: true - }); - } else { - this.column = column; - this.endColumn = endColumn; - } - } - } catch (nop) { - /* Ignore if the browser is very particular */ - } - } - - Exception.prototype = new Error(); - - module.exports = Exception; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2V4Y2VwdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxNQUFNLFVBQVUsR0FBRyxDQUNqQixhQUFhLEVBQ2IsVUFBVSxFQUNWLFlBQVksRUFDWixlQUFlLEVBQ2YsU0FBUyxFQUNULE1BQU0sRUFDTixRQUFRLEVBQ1IsT0FBTyxDQUNSLENBQUM7O0FBRUYsV0FBUyxTQUFTLENBQUMsT0FBTyxFQUFFLElBQUksRUFBRTtBQUNoQyxRQUFJLEdBQUcsR0FBRyxJQUFJLElBQUksSUFBSSxDQUFDLEdBQUc7UUFDeEIsSUFBSSxZQUFBO1FBQ0osYUFBYSxZQUFBO1FBQ2IsTUFBTSxZQUFBO1FBQ04sU0FBUyxZQUFBLENBQUM7O0FBRVosUUFBSSxHQUFHLEVBQUU7QUFDUCxVQUFJLEdBQUcsR0FBRyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUM7QUFDdEIsbUJBQWEsR0FBRyxHQUFHLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQztBQUM3QixZQUFNLEdBQUcsR0FBRyxDQUFDLEtBQUssQ0FBQyxNQUFNLENBQUM7QUFDMUIsZUFBUyxHQUFHLEdBQUcsQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDOztBQUUzQixhQUFPLElBQUksS0FBSyxHQUFHLElBQUksR0FBRyxHQUFHLEdBQUcsTUFBTSxDQUFDO0tBQ3hDOztBQUVELFFBQUksR0FBRyxHQUFHLEtBQUssQ0FBQyxTQUFTLENBQUMsV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qL1xuICB9XG59XG5cbkV4Y2VwdGlvbi5wcm90b3R5cGUgPSBuZXcgRXJyb3IoKTtcblxuZXhwb3J0IGRlZmF1bHQgRXhjZXB0aW9uO1xuIl19 -; -define('handlebars/helpers/block-helper-missing',['exports', 'module', '../utils'], function (exports, module, _utils) { - 'use strict'; - - module.exports = function (instance) { - instance.registerHelper('blockHelperMissing', function (context, options) { - var inverse = options.inverse, - fn = options.fn; - - if (context === true) { - return fn(this); - } else if (context === false || context == null) { - return inverse(this); - } else if (_utils.isArray(context)) { - if (context.length > 0) { - if (options.ids) { - options.ids = [options.name]; - } - - return instance.helpers.each(context, options); - } else { - return inverse(this); - } - } else { - if (options.data && options.ids) { - var data = _utils.createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); - options = { data: data }; - } - - return fn(context, options); - } - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvYmxvY2staGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O21CQUVlLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxjQUFjLENBQUMsb0JBQW9CLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3ZFLFVBQUksT0FBTyxHQUFHLE9BQU8sQ0FBQyxPQUFPO1VBQzNCLEVBQUUsR0FBRyxPQUFPLENBQUMsRUFBRSxDQUFDOztBQUVsQixVQUFJLE9BQU8sS0FBSyxJQUFJLEVBQUU7QUFDcEIsZUFBTyxFQUFFLENBQUMsSUFBSSxDQUFDLENBQUM7T0FDakIsTUFBTSxJQUFJLE9BQU8sS0FBSyxLQUFLLElBQUksT0FBTyxJQUFJLElBQUksRUFBRTtBQUMvQyxlQUFPLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FB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ICAgIH1cblxuICAgICAgcmV0dXJuIGZuKGNvbnRleHQsIG9wdGlvbnMpO1xuICAgIH1cbiAgfSk7XG59XG4iXX0= -; -define('handlebars/helpers/each',['exports', 'module', '../utils', '../exception'], function (exports, module, _utils, _exception) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - module.exports = function (instance) { - instance.registerHelper('each', function (context, options) { - if (!options) { - throw new _Exception['default']('Must pass iterator to #each'); - } - - var fn = options.fn, - inverse = options.inverse, - i = 0, - ret = '', - data = undefined, - contextPath = undefined; - - if (options.data && options.ids) { - contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; - } - - if (_utils.isFunction(context)) { - context = context.call(this); - } - - if (options.data) { - data = _utils.createFrame(options.data); - } - - function execIteration(field, index, last) { - if (data) { - data.key = field; - data.index = index; - data.first = index === 0; - data.last = !!last; - - if (contextPath) { - data.contextPath = contextPath + field; - } - } - - ret = ret + fn(context[field], { - data: data, - blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) - }); - } - - if (context && typeof context === 'object') { - if (_utils.isArray(context)) { - for (var j = context.length; i < j; i++) { - if (i in context) { - execIteration(i, i, i === context.length - 1); - } - } - } else if (global.Symbol && context[global.Symbol.iterator]) { - var newContext = []; - var iterator = context[global.Symbol.iterator](); - for (var it = iterator.next(); !it.done; it = iterator.next()) { - newContext.push(it.value); - } - context = newContext; - for (var j = context.length; i < j; i++) { - execIteration(i, i, i === context.length - 1); - } - } else { - (function () { - var priorKey = undefined; - - Object.keys(context).forEach(function (key) { - // We're running the iterations one step out of sync so we can detect - // the last iteration without have to scan the object twice and create - // an itermediate keys array. - if (priorKey !== undefined) { - execIteration(priorKey, i - 1); - } - priorKey = key; - i++; - }); - if (priorKey !== undefined) { - execIteration(priorKey, i - 1, true); - } - })(); - } - } - - if (i === 0) { - ret = inverse(this); - } - - return ret; - }); - }; -}); -//# sour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uXG4gICAgaWYgKG9wdGlvbnMuZGF0YSAmJiBvcHRpb25zLmlkcykge1xuICAgICAgY29udGV4dFBhdGggPVxuICAgICAgICBhcHBlbmRDb250ZXh0UGF0aChvcHRpb25zLmRhdGEuY29udGV4dFBhdGgsIG9wdGlvbnMuaWRzWzBdKSArICcuJztcbiAgICB9XG5cbiAgICBpZiAoaXNGdW5jdGlvbihjb250ZXh0KSkge1xuICAgICAgY29udGV4dCA9IGNvbnRleHQuY2FsbCh0aGlzKTtcbiAgICB9XG5cbiAgICBpZiAob3B0aW9ucy5kYXRhKSB7XG4gICAgICBkYXRhID0gY3JlYXRlRnJhbWUob3B0aW9ucy5kYXRhKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBleGVjSXRlcmF0aW9uKGZpZWxkLCBpbmRleCwgbGFzdCkge1xuICAgICAgaWYgKGRhdGEpIHtcbiAgICAgICAgZGF0YS5rZXkgPSBmaWVsZDtcbiAgICAgICAgZGF0YS5pbmRleCA9IGluZGV4O1xuICAgICAgICBkYXRhLmZpcnN0ID0gaW5kZXggPT09IDA7XG4gICAgICAgIGRhdGEubGFzdCA9ICEhbGFzdDtcblxuICAgICAgICBpZiAoY29udGV4dFBhdGgpIHtcbiAgICAgICAgICBkYXRhLmNvbnRleHRQYXRoID0gY29udGV4dFBhdGggKyBmaWVsZDtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICByZXQgPVxuICAgICAgICByZXQgK1xuICAgICAgICBmbihjb250ZXh0W2ZpZWxkXSwge1xuICAgICAgICAgIGRhdGE6IGRhdGEsXG4gICAgICAgICAgYmxvY2tQYXJhbXM6IGJsb2NrUGFyYW1zKFxuICAgICAgICAgICAgW2NvbnRleHRbZmllbGRdLCBmaWVsZF0sXG4gICAgICAgICAgICBbY29udGV4dFBhdGggKyBmaWVsZCwgbnVsbF1cbiAgICAgICAgICApXG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGlmIChjb250ZXh0ICYmIHR5cGVvZiBjb250ZX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aGUgbGFzdCBpdGVyYXRpb24gd2l0aG91dCBoYXZlIHRvIHNjYW4gdGhlIG9iamVjdCB0d2ljZSBhbmQgY3JlYXRlXG4gICAgICAgICAgLy8gYW4gaXRlcm1lZGlhdGUga2V5cyBhcnJheS5cbiAgICAgICAgICBpZiAocHJpb3JLZXkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgZXhlY0l0ZXJhdGlvbihwcmlvcktleSwgaSAtIDEpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBwcmlvcktleSA9IGtleTtcbiAgICAgICAgICBpKys7XG4gICAgICAgIH0pO1xuICAgICAgICBpZiAocHJpb3JLZXkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIGV4ZWNJdGVyYXRpb24ocHJpb3JLZXksIGkgLSAxLCB0cnVlKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIGlmIChpID09PSAwKSB7XG4gICAgICByZXQgPSBpbnZlcnNlKHRoaXMpO1xuICAgIH1cblxuICAgIHJldHVybiByZXQ7XG4gIH0pO1xufVxuIl19 -; -define('handlebars/helpers/helper-missing',['exports', 'module', '../exception'], function (exports, module, _exception) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - module.exports = function (instance) { - instance.registerHelper('helperMissing', function () /* [args, ]options */{ - if (arguments.length === 1) { - // A missing field in a {{foo}} construct. - return undefined; - } else { - // Someone is actually trying to call something, blow up. - throw new _Exception['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); - } - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O21CQUVl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['exports', 'module', '../utils', '../exception'], function (exports, module, _utils, _exception) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - module.exports = function (instance) { - instance.registerHelper('if', function (conditional, options) { - if (arguments.length != 2) { - throw new _Exception['default']('#if requires exactly one argument'); - } - if (_utils.isFunction(conditional)) { - conditional = conditional.call(this); - } - - // Default behavior is to render the positive path if the value is truthy and not empty. - // The `includeZero` option may be set to treat the condtional as purely not empty based on the - // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. - if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { - return options.inverse(this); - } else { - return options.fn(this); - } - }); - - instance.registerHelper('unless', function (conditional, options) { - if (arguments.length != 2) { - throw new _Exception['default']('#unless requires exactly one argument'); - } - return instance.helpers['if'].call(this, conditional, { - fn: options.inverse, - inverse: options.fn, - hash: options.hash - }); - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaWYuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O21CQUdlLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFlBQVEsQ0FBQyxjQUFjLENBQUMsSUFBSSxFQUFFLFVBQVMsV0FBVyxFQUFFLE9BQU8sRUFBRTtBQUMzRCxVQUFJLFNBQVMsQ0FBQyxNQUFNLElBQUksQ0FBQyxFQUFFO0FBQ3pCLGNBQU0sMEJBQWMsbUNBQW1DLENBQUMsQ0FBQztPQUMxRDtBQUNELFVBQUksT0FSVSxVQUFVLENBUVQsV0FBVyxDQUFDLEVBQUU7QUFDM0IsbUJBQVcsR0FBRyxXQUFXLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO09BQ3RDOzs7OztBQUtELFVBQUks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sZXNzIHJlcXVpcmVzIGV4YWN0bHkgb25lIGFyZ3VtZW50Jyk7XG4gICAgfVxuICAgIHJldHVybiBpbnN0YW5jZS5oZWxwZXJzWydpZiddLmNhbGwodGhpcywgY29uZGl0aW9uYWwsIHtcbiAgICAgIGZuOiBvcHRpb25zLmludmVyc2UsXG4gICAgICBpbnZlcnNlOiBvcHRpb25zLmZuLFxuICAgICAgaGFzaDogb3B0aW9ucy5oYXNoXG4gICAgfSk7XG4gIH0pO1xufVxuIl19 -; -define('handlebars/helpers/log',['exports', 'module'], function (exports, module) { - 'use strict'; - - module.exports = function (instance) { - instance.registerHelper('log', function () /* message, options */{ - var args = [undefined], - options = arguments[arguments.length - 1]; - for (var i = 0; i < arguments.length - 1; i++) { - args.push(arguments[i]); - } - - var level = 1; - if (options.hash.level != null) { - level = options.hash.level; - } else if (options.data && options.data.level != null) { - level = options.data.level; - } - args[0] = level; - - instance.log.apply(instance, args); - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFBZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsY0FBYyxDQUFDLEtBQUssRUFBRSxrQ0FBaUM7QUFDOUQsVUFBSSxJQUFJLEdBQUcsQ0FBQyxTQUFTLENBQUM7VUFDcEIsT0FBTyxHQUFHLFNBQVMsQ0FBQyxTQUFTLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQyxDQUFDO0FBQzVDLFdBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxTQUFTLENBQUMsTUFBTSxHQUFHLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRTtBQUM3QyxZQUFJLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQ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IGVsc2UgaWYgKG9wdGlvbnMuZGF0YSAmJiBvcHRpb25zLmRhdGEubGV2ZWwgIT0gbnVsbCkge1xuICAgICAgbGV2ZWwgPSBvcHRpb25zLmRhdGEubGV2ZWw7XG4gICAgfVxuICAgIGFyZ3NbMF0gPSBsZXZlbDtcblxuICAgIGluc3RhbmNlLmxvZyguLi5hcmdzKTtcbiAgfSk7XG59XG4iXX0= -; -define('handlebars/helpers/lookup',['exports', 'module'], function (exports, module) { - 'use strict'; - - module.exports = function (instance) { - instance.registerHelper('lookup', function (obj, field, options) { - if (!obj) { - // Note for 5.0: Change to "obj == null" in 5.0 - return obj; - } - return options.lookupProperty(obj, field); - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvbG9va3VwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFBZSxVQUFTLFFBQVEsRUFBRTtBQUNoQyxZQUFRLENBQUMsY0FBYyxDQUFDLFFBQVEsRUFBRSxVQUFTLEdBQUcsRUFBRSxLQUFLLEVBQUUsT0FBTyxFQUFFO0FBQzlELFVBQUksQ0FBQyxHQUFHLEVBQUU7O0FBRVIsZUFBTyxHQUFHLENBQUM7T0FDWjtBQUNELGFBQU8sT0FBTyxDQUFDLGNBQWMsQ0FBQyxHQUFHLEVBQUUsS0FBSyxDQUFDLENBQUM7S0FDM0MsQ0FBQyxDQUFDO0dBQ0oiLCJmaWxlIjoibG9va3VwLmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ2xvb2t1cCcsIGZ1bmN0aW9uKG9iaiwgZmllbGQsIG9wdGlvbnMpIHtcbiAgICBpZiAoIW9iaikge1xuICAgICAgLy8gTm90ZSBmb3IgNS4wOiBDaGFuZ2UgdG8gXCJvYmogPT0gbnVsbFwiIGluIDUuMFxuICAgICAgcmV0dXJuIG9iajtcbiAgICB9XG4gICAgcmV0dXJuIG9wdGlvbnMubG9va3VwUHJvcGVydHkob2JqLCBmaWVsZCk7XG4gIH0pO1xufVxuIl19 -; -define('handlebars/helpers/with',['exports', 'module', '../utils', '../exception'], function (exports, module, _utils, _exception) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - module.exports = function (instance) { - instance.registerHelper('with', function (context, options) { - if (arguments.length != 2) { - throw new _Exception['default']('#with requires exactly one argument'); - } - if (_utils.isFunction(context)) { - context = context.call(this); - } - - var fn = options.fn; - - if (!_utils.isEmpty(context)) { - var data = options.data; - if (options.data && options.ids) { - data = _utils.createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); - } - - return fn(context, { - data: data, - blockParams: _utils.blockParams([context], [data && data.contextPath]) - }); - } else { - return options.inverse(this); - } - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvd2l0aC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7bUJBU2UsVUFBUyxRQUFRLEVBQUU7QUFDaEMsWUFBUSxDQUFDLGNBQWMsQ0FBQyxNQUFNLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3pELFVBQUksU0FBUyxDQUFDLE1BQU0sSUFBSSxDQUFDLEVBQUU7QUFDekIsY0FBTSwwQkFBYyxxQ0FBcUMsQ0FBQyxDQUFDO09BQzVEO0FBQ0QsVUFBSSxPQVROLFVBQVUsQ0FTTyxPQUFPLENBQUMsRUFBRTtBQUN2QixlQUFP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1cbiAgfSk7XG59XG4iXX0= -; -define('handlebars/helpers',['exports', './helpers/block-helper-missing', './helpers/each', './helpers/helper-missing', './helpers/if', './helpers/log', './helpers/lookup', './helpers/with'], function (exports, _helpersBlockHelperMissing, _helpersEach, _helpersHelperMissing, _helpersIf, _helpersLog, _helpersLookup, _helpersWith) { - 'use strict'; - - exports.__esModule = true; - exports.registerDefaultHelpers = registerDefaultHelpers; - exports.moveHelperToHooks = moveHelperToHooks; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _registerBlockHelperMissing = _interopRequireDefault(_helpersBlockHelperMissing); - - var _registerEach = _interopRequireDefault(_helpersEach); - - var _registerHelperMissing = _interopRequireDefault(_helpersHelperMissing); - - var _registerIf = _interopRequireDefault(_helpersIf); - - var _registerLog = _interopRequireDefault(_helpersLog); - - var _registerLookup = _interopRequireDefault(_helpersLookup); - - var _registerWith = _interopRequireDefault(_helpersWith); - - function registerDefaultHelpers(instance) { - _registerBlockHelperMissing['default'](instance); - _registerEach['default'](instance); - _registerHelperMissing['default'](instance); - _registerIf['default'](instance); - _registerLog['default'](instance); - _registerLookup['default'](instance); - _registerWith['default'](instance); - } - - function moveHelperToHooks(instance, helperName, keepHelper) { - if (instance.helpers[helperName]) { - instance.hooks[helperName] = instance.helpers[helperName]; - if (!keepHelper) { - delete instance.helpers[helperName]; - } - } - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBUU8sV0FBUyxzQkFBc0IsQ0FBQyxRQUFRLEVBQUU7QUFDL0MsMkNBQTJCLFFBQVEsQ0FBQyxDQUFDO0FBQ3JDLDZCQUFhLFFBQVEsQ0FBQyxDQUFDO0F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2l0aCc7XG5cbmV4cG9ydCBmdW5jdGlvbiByZWdpc3RlckRlZmF1bHRIZWxwZXJzKGluc3RhbmNlKSB7XG4gIHJlZ2lzdGVyQmxvY2tIZWxwZXJNaXNzaW5nKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJFYWNoKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJIZWxwZXJNaXNzaW5nKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJJZihpbnN0YW5jZSk7XG4gIHJlZ2lzdGVyTG9nKGluc3RhbmNlKTtcbiAgcmVnaXN0ZXJMb29rdXAoaW5zdGFuY2UpO1xuICByZWdpc3RlcldpdGgoaW5zdGFuY2UpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gbW92ZUhlbHBlclRvSG9va3MoaW5zdGFuY2UsIGhlbHBlck5hbWUsIGtlZXBIZWxwZXIpIHtcbiAgaWYgKGluc3RhbmNlLmhlbHBlcnNbaGVscGVyTmFtZV0pIHtcbiAgICBpbnN0YW5jZS5ob29rc1toZWxwZXJOYW1lXSA9IGluc3RhbmNlLmhlbHBlcnNbaGVscGVyTmFtZV07XG4gICAgaWYgKCFrZWVwSGVscGVyKSB7XG4gICAgICBkZWxldGUgaW5zdGFuY2UuaGVscGVyc1toZWxwZXJOYW1lXTtcbiAgICB9XG4gIH1cbn1cbiJdfQ== -; -define('handlebars/decorators/inline',['exports', 'module', '../utils'], function (exports, module, _utils) { - 'use strict'; - - module.exports = function (instance) { - instance.registerDecorator('inline', function (fn, props, container, options) { - var ret = fn; - if (!props.partials) { - props.partials = {}; - ret = function (context, options) { - // Create a new partials stack frame prior to exec. - var original = container.partials; - container.partials = _utils.extend({}, original, props.partials); - var ret = fn(context, options); - container.partials = original; - return ret; - }; - } - - props.partials[options.args[0]] = options.fn; - - return ret; - }); - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5k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bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVyRGVjb3JhdG9yKCdpbmxpbmUnLCBmdW5jdGlvbihmbiwgcHJvcHMsIGNvbnRhaW5lciwgb3B0aW9ucykge1xuICAgIGxldCByZXQgPSBmbjtcbiAgICBpZiAoIXByb3BzLnBhcnRpYWxzKSB7XG4gICAgICBwcm9wcy5wYXJ0aWFscyA9IHt9O1xuICAgICAgcmV0ID0gZnVuY3Rpb24oY29udGV4dCwgb3B0aW9ucykge1xuICAgICAgICAvLyBDcmVhdGUgYSBuZXcgcGFydGlhbHMgc3RhY2sgZnJhbWUgcHJpb3IgdG8gZXhlYy5cbiAgICAgICAgbGV0IG9yaWdpbmFsID0gY29udGFpbmVyLnBhcnRpYWxzO1xuICAgICAgICBjb250YWluZXIucGFydGlhbHMgPSBleHRlbmQoe30sIG9yaWdpbmFsLCBwcm9wcy5wYXJ0aWFscyk7XG4gICAgICAgIGxldCByZXQgPSBmbihjb250ZXh0LCBvcHRpb25zKTtcbiAgICAgICAgY29udGFpbmVyLnBhcnRpYWxzID0gb3JpZ2luYWw7XG4gICAgICAgIHJldHVybiByZXQ7XG4gICAgICB9O1xuICAgIH1cblxuICAgIHByb3BzLnBhcnRpYWxzW29wdGlvbnMuYXJnc1swXV0gPSBvcHRpb25zLmZuO1xuXG4gICAgcmV0dXJuIHJldDtcbiAgfSk7XG59XG4iXX0= -; -define('handlebars/decorators',['exports', './decorators/inline'], function (exports, _decoratorsInline) { - 'use strict'; - - exports.__esModule = true; - exports.registerDefaultDecorators = registerDefaultDecorators; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _registerInline = _interopRequireDefault(_decoratorsInline); - - function registerDefaultDecorators(instance) { - _registerInline['default'](instance); - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2RlY29yYXRvcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFFTyxXQUFTLHlCQUF5QixDQUFDLFFBQVEsRUFBRTtBQUNsRCwrQkFBZSxRQUFRLENBQUMsQ0FBQztHQUMxQiIsImZpbGUiOiJkZWNvcmF0b3JzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHJlZ2lzdGVySW5saW5lIGZyb20gJy4vZGVjb3JhdG9ycy9pbmxpbmUnO1xuXG5leHBvcnQgZnVuY3Rpb24gcmVnaXN0ZXJEZWZhdWx0RGVjb3JhdG9ycyhpbnN0YW5jZSkge1xuICByZWdpc3RlcklubGluZShpbnN0YW5jZSk7XG59XG4iXX0= -; -define('handlebars/logger',['exports', 'module', './utils'], function (exports, module, _utils) { - 'use strict'; - - var logger = { - methodMap: ['debug', 'info', 'warn', 'error'], - level: 'info', - - // Maps a given level value to the `methodMap` indexes above. - lookupLevel: function lookupLevel(level) { - if (typeof level === 'string') { - var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); - if (levelMap >= 0) { - level = levelMap; - } else { - level = parseInt(level, 10); - } - } - - return level; - }, - - // Can be overridden in the host environment - log: function log(level) { - level = logger.lookupLevel(level); - - if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { - var method = logger.methodMap[level]; - // eslint-disable-next-line no-console - if (!console[method]) { - method = 'log'; - } - - for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - message[_key - 1] = arguments[_key]; - } - - console[method].apply(console, message); // eslint-disable-line no-console - } - } - }; - - module.exports = logger; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2xvZ2dlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxNQUFJLE1BQU0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BtZXRob2QgPSBsb2dnZXIubWV0aG9kTWFwW2xldmVsXTtcbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1jb25zb2xlXG4gICAgICBpZiAoIWNvbnNvbGVbbWV0aG9kXSkge1xuICAgICAgICBtZXRob2QgPSAnbG9nJztcbiAgICAgIH1cbiAgICAgIGNvbnNvbGVbbWV0aG9kXSguLi5tZXNzYWdlKTsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby1jb25zb2xlXG4gICAgfVxuICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBsb2dnZXI7XG4iXX0= -; -define('handlebars/internal/create-new-lookup-object',['exports', '../utils'], function (exports, _utils) { - 'use strict'; - - exports.__esModule = true; - exports.createNewLookupObject = createNewLookupObject; - - /** - * Create a new object with "null"-prototype to avoid truthy results on prototype properties. - * The resulting object can be used with "object[property]" to check if a property exists - * @param {...object} sources a varargs parameter of source objects that will be merged - * @returns {object} - */ - - function createNewLookupObject() { - for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) { - sources[_key] = arguments[_key]; - } - - return _utils.extend.apply(undefined, [Object.create(null)].concat(sources)); - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL2NyZWF0ZS1uZXctbG9va3VwLW9iamVjdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7O0FBUU8sV0FBUyxxQkFBcUIsR0FBYTtzQ0FBVCxPQUFPO0FBQVAsYUFBTzs7O0FBQzlDLFdBQU8sT0FUQSxNQUFNLG1CQVNDLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLFNBQUssT0FBTyxFQUFDLENBQUM7R0FDaEQiLCJmaWxlIjoiY3JlYXRlLW5ldy1sb29rdXAtb2JqZWN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgZXh0ZW5kIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vKipcbiAqIENyZWF0ZSBhIG5ldyBvYmplY3Qgd2l0aCBcIm51bGxcIi1wcm90b3R5cGUgdG8gYXZvaWQgdHJ1dGh5IHJlc3VsdHMgb24gcHJvdG90eXBlIHByb3BlcnRpZXMuXG4gKiBUaGUgcmVzdWx0aW5nIG9iamVjdCBjYW4gYmUgdXNlZCB3aXRoIFwib2JqZWN0W3Byb3BlcnR5XVwiIHRvIGNoZWNrIGlmIGEgcHJvcGVydHkgZXhpc3RzXG4gKiBAcGFyYW0gey4uLm9iamVjdH0gc291cmNlcyBhIHZhcmFyZ3MgcGFyYW1ldGVyIG9mIHNvdXJjZSBvYmplY3RzIHRoYXQgd2lsbCBiZSBtZXJnZWRcbiAqIEByZXR1cm5zIHtvYmplY3R9XG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVOZXdMb29rdXBPYmplY3QoLi4uc291cmNlcykge1xuICByZXR1cm4gZXh0ZW5kKE9iamVjdC5jcmVhdGUobnVsbCksIC4uLnNvdXJjZXMpO1xufVxuIl19 -; -define('handlebars/internal/proto-access',['exports', './create-new-lookup-object', '../logger'], function (exports, _createNewLookupObject, _logger) { - 'use strict'; - - exports.__esModule = true; - exports.createProtoAccessControl = createProtoAccessControl; - exports.resultIsAllowed = resultIsAllowed; - exports.resetLoggedProperties = resetLoggedProperties; - - var loggedProperties = Object.create(null); - - function createProtoAccessControl(runtimeOptions) { - var defaultMethodWhiteList = Object.create(null); - defaultMethodWhiteList['constructor'] = false; - defaultMethodWhiteList['__defineGetter__'] = false; - defaultMethodWhiteList['__defineSetter__'] = false; - defaultMethodWhiteList['__lookupGetter__'] = false; - - var defaultPropertyWhiteList = Object.create(null); - // eslint-disable-next-line no-proto - defaultPropertyWhiteList['__proto__'] = false; - - return { - properties: { - whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties), - defaultValue: runtimeOptions.allowProtoPropertiesByDefault - }, - methods: { - whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods), - defaultValue: runtimeOptions.allowProtoMethodsByDefault - } - }; - } - - function resultIsAllowed(result, protoAccessControl, propertyName) { - if (typeof result === 'function') { - return checkWhiteList(protoAccessControl.methods, propertyName); - } else { - return checkWhiteList(protoAccessControl.properties, propertyName); - } - } - - function checkWhiteList(protoAccessControlForType, propertyName) { - if (protoAccessControlForType.whitelist[propertyName] !== undefined) { - return protoAccessControlForType.whitelist[propertyName] === true; - } - if (protoAccessControlForType.defaultValue !== undefined) { - return protoAccessControlForType.defaultValue; - } - logUnexpecedPropertyAccessOnce(propertyName); - return false; - } - - function logUnexpecedPropertyAccessOnce(propertyName) { - if (loggedProperties[propertyName] !== true) { - loggedProperties[propertyName] = true; - _logger.log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'); - } - } - - function resetLoggedProperties() { - Object.keys(loggedProperties).forEach(function (propertyName) { - delete loggedProperties[propertyName]; - }); - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL3Byb3RvLWFjY2Vzcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUdBLE1BQU0sZ0JBQWdCLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQzs7QUFFdEMsV0FBUyx3QkFBd0IsQ0FBQyxjQUFjLEVBQUU7QUFDdkQsUUFBSSxzQkFBc0IsR0FBRyxNQUFNLENBQUMsTUFBTSxDQUFDLElBQUksQ0F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tcbiAgfSk7XG59XG4iXX0= -; -define('handlebars/base',['exports', './utils', './exception', './helpers', './decorators', './logger', './internal/proto-access'], function (exports, _utils, _exception, _helpers, _decorators, _logger, _internalProtoAccess) { - 'use strict'; - - exports.__esModule = true; - exports.HandlebarsEnvironment = HandlebarsEnvironment; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - var _logger2 = _interopRequireDefault(_logger); - - var VERSION = '4.7.7'; - exports.VERSION = VERSION; - var COMPILER_REVISION = 8; - exports.COMPILER_REVISION = COMPILER_REVISION; - var LAST_COMPATIBLE_COMPILER_REVISION = 7; - - exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION; - var REVISION_CHANGES = { - 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it - 2: '== 1.0.0-rc.3', - 3: '== 1.0.0-rc.4', - 4: '== 1.x.x', - 5: '== 2.0.0-alpha.x', - 6: '>= 2.0.0-beta.1', - 7: '>= 4.0.0 <4.3.0', - 8: '>= 4.3.0' - }; - - exports.REVISION_CHANGES = REVISION_CHANGES; - var objectType = '[object Object]'; - - function HandlebarsEnvironment(helpers, partials, decorators) { - this.helpers = helpers || {}; - this.partials = partials || {}; - this.decorators = decorators || {}; - - _helpers.registerDefaultHelpers(this); - _decorators.registerDefaultDecorators(this); - } - - HandlebarsEnvironment.prototype = { - constructor: HandlebarsEnvironment, - - logger: _logger2['default'], - log: _logger2['default'].log, - - registerHelper: function registerHelper(name, fn) { - if (_utils.toString.call(name) === objectType) { - if (fn) { - throw new _Exception['default']('Arg not supported with multiple helpers'); - } - _utils.extend(this.helpers, name); - } else { - this.helpers[name] = fn; - } - }, - unregisterHelper: function unregisterHelper(name) { - delete this.helpers[name]; - }, - - registerPartial: function registerPartial(name, partial) { - if (_utils.toString.call(name) === objectType) { - _utils.extend(this.partials, name); - } else { - if (typeof partial === 'undefined') { - throw new _Exception['default']('Attempting to register a partial called "' + name + '" as undefined'); - } - this.partials[name] = partial; - } - }, - unregisterPartial: function unregisterPartial(name) { - delete this.partials[name]; - }, - - registerDecorator: function registerDecorator(name, fn) { - if (_utils.toString.call(name) === objectType) { - if (fn) { - throw new _Exception['default']('Arg not supported with multiple decorators'); - } - _utils.extend(this.decorators, name); - } else { - this.decorators[name] = fn; - } - }, - unregisterDecorator: function unregisterDecorator(name) { - delete this.decorators[name]; - }, - /** - * Reset the memory of illegal property accesses that have already been logged. - * @deprecated should only be used in handlebars test-cases - */ - resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() { - _internalProtoAccess.resetLoggedProperties(); - } - }; - - var log = _logger2['default'].log; - - exports.log = log; - exports.createFrame = _utils.createFrame; - exports.logger = _logger2['default']; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2Jhc2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztBQU9PLE1BQU0sT0FBTyxHQUFHLE9BQU8sQ0FBQzs7QUFDeEIsTUFBTSxpQkFBaUIsR0FBRyxDQUFDLENBQUM7O0FBQzVCLE1BQU0saUNBQWlDLEdBQUcsQ0FBQyxDQUFDOzs7QUFFNUMsTUFBTSxnQkFBZ0IsR0FBRztBQUM5QixLQUFDLEVBQUUsYUFBYTtBQUNoQixLQUFDLEVBQUUsZUFBZTtBQUNsQixLQUFDLEVBQUUsZUFBZTtBQUNsQixLQUFDLEVBQUUsVUFBVTtBQUNiLEtBQUMsRUFBRSxrQkFBa0I7QUFDckIsS0FBQyxFQUFFLGlCQUFpQjtBQUNwQixLQUFDLEVBQUUsaUJBQWlCO0FBQ3BCLEtBQUMsRUFBRSxVQUFVO0dBQ2QsQ0FBQzs7O0FBRUYsTUFBTSxVQUFVLEdBQUcsaUJBQWlCLENBQUM7O0F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SB0aGlzLmRlY29yYXRvcnNbbmFtZV07XG4gIH0sXG4gIC8qKlxuICAgKiBSZXNldCB0aGUgbWVtb3J5IG9mIGlsbGVnYWwgcHJvcGVydHkgYWNjZXNzZXMgdGhhdCBoYXZlIGFscmVhZHkgYmVlbiBsb2dnZWQuXG4gICAqIEBkZXByZWNhdGVkIHNob3VsZCBvbmx5IGJlIHVzZWQgaW4gaGFuZGxlYmFycyB0ZXN0LWNhc2VzXG4gICAqL1xuICByZXNldExvZ2dlZFByb3BlcnR5QWNjZXNzZXMoKSB7XG4gICAgcmVzZXRMb2dnZWRQcm9wZXJ0aWVzKCk7XG4gIH1cbn07XG5cbmV4cG9ydCBsZXQgbG9nID0gbG9nZ2VyLmxvZztcblxuZXhwb3J0IHsgY3JlYXRlRnJhbWUsIGxvZ2dlciB9O1xuIl19 -; -define('handlebars/safe-string',['exports', 'module'], function (exports, module) { - // Build out our basic SafeString type - 'use strict'; - - function SafeString(string) { - this.string = string; - } - - SafeString.prototype.toString = SafeString.prototype.toHTML = function () { - return '' + this.string; - }; - - module.exports = SafeString; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3NhZmUtc3RyaW5nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFDQSxXQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUU7QUFDMUIsUUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7R0FDdEI7O0FBRUQsWUFBVSxDQUFDLFNBQVMsQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsWUFBVztBQUN2RSxXQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDO0dBQ3pCLENBQUM7O21CQUVhLFVBQVUiLCJmaWxlIjoic2FmZS1zdHJpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBCdWlsZCBvdXQgb3VyIGJhc2ljIFNhZmVTdHJpbmcgdHlwZVxuZnVuY3Rpb24gU2FmZVN0cmluZyhzdHJpbmcpIHtcbiAgdGhpcy5zdHJpbmcgPSBzdHJpbmc7XG59XG5cblNhZmVTdHJpbmcucHJvdG90eXBlLnRvU3RyaW5nID0gU2FmZVN0cmluZy5wcm90b3R5cGUudG9IVE1MID0gZnVuY3Rpb24oKSB7XG4gIHJldHVybiAnJyArIHRoaXMuc3RyaW5nO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgU2FmZVN0cmluZztcbiJdfQ== -; -define('handlebars/internal/wrapHelper',['exports'], function (exports) { - 'use strict'; - - exports.__esModule = true; - exports.wrapHelper = wrapHelper; - - function wrapHelper(helper, transformOptionsFn) { - if (typeof helper !== 'function') { - // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639 - // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function. - return helper; - } - var wrapper = function wrapper() /* dynamic arguments */{ - var options = arguments[arguments.length - 1]; - arguments[arguments.length - 1] = transformOptionsFn(options); - return helper.apply(this, arguments); - }; - return wrapper; - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2ludGVybmFsL3dyYXBIZWxwZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQU8sV0FBUyxVQUFVLENBQUMsTUFBTSxFQUFFLGtCQUFrQixFQUFFO0FBQ3JELFFBQUksT0FBTyxNQUFNLEtBQUssVUFBVSxFQUFFOzs7QUFHaEMsYUFBTyxNQUFNLENBQUM7S0FDZjtBQUNELFFBQUksT0FBTyxHQUFHLFNBQVYsT0FBTywwQkFBcUM7QUFDOUMsVUFBTSxPQUFPLEdBQUcsU0FBUyxDQUFDLFNBQVMsQ0FBQyxNQUFNLE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3cmFwcGVyO1xufVxuIl19 -; -define('handlebars/runtime',['exports', './utils', './exception', './base', './helpers', './internal/wrapHelper', './internal/proto-access'], function (exports, _utils, _exception, _base, _helpers, _internalWrapHelper, _internalProtoAccess) { - 'use strict'; - - exports.__esModule = true; - exports.checkRevision = checkRevision; - exports.template = template; - exports.wrapProgram = wrapProgram; - exports.resolvePartial = resolvePartial; - exports.invokePartial = invokePartial; - exports.noop = noop; - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _Exception = _interopRequireDefault(_exception); - - function checkRevision(compilerInfo) { - var compilerRevision = compilerInfo && compilerInfo[0] || 1, - currentRevision = _base.COMPILER_REVISION; - - if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) { - return; - } - - if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) { - var runtimeVersions = _base.REVISION_CHANGES[currentRevision], - compilerVersions = _base.REVISION_CHANGES[compilerRevision]; - throw new _Exception['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); - } else { - // Use the embedded version info since the runtime doesn't know about this revision yet - throw new _Exception['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); - } - } - - function template(templateSpec, env) { - /* istanbul ignore next */ - if (!env) { - throw new _Exception['default']('No environment passed to template'); - } - if (!templateSpec || !templateSpec.main) { - throw new _Exception['default']('Unknown template object: ' + typeof templateSpec); - } - - templateSpec.main.decorator = templateSpec.main_d; - - // Note: Using env.VM references rather than local var references throughout this section to allow - // for external users to override these as pseudo-supported APIs. - env.VM.checkRevision(templateSpec.compiler); - - // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0) - var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7; - - function invokePartialWrapper(partial, context, options) { - if (options.hash) { - context = _utils.extend({}, context, options.hash); - if (options.ids) { - options.ids[0] = true; - } - } - partial = env.VM.resolvePartial.call(this, partial, context, options); - - var extendedOptions = _utils.extend({}, options, { - hooks: this.hooks, - protoAccessControl: this.protoAccessControl - }); - - var result = env.VM.invokePartial.call(this, partial, context, extendedOptions); - - if (result == null && env.compile) { - options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); - result = options.partials[options.name](context, extendedOptions); - } - if (result != null) { - if (options.indent) { - var lines = result.split('\n'); - for (var i = 0, l = lines.length; i < l; i++) { - if (!lines[i] && i + 1 === l) { - break; - } - - lines[i] = options.indent + lines[i]; - } - result = lines.join('\n'); - } - return result; - } else { - throw new _Exception['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); - } - } - - // Just add water - var container = { - strict: function strict(obj, name, loc) { - if (!obj || !(name in obj)) { - throw new _Exception['default']('"' + name + '" not defined in ' + obj, { - loc: loc - }); - } - return container.lookupProperty(obj, name); - }, - lookupProperty: function lookupProperty(parent, propertyName) { - var result = parent[propertyName]; - if (result == null) { - return result; - } - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return result; - } - - if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) { - return result; - } - return undefined; - }, - lookup: function lookup(depths, name) { - var len = depths.length; - for (var i = 0; i < len; i++) { - var result = depths[i] && container.lookupProperty(depths[i], name); - if (result != null) { - return depths[i][name]; - } - } - }, - lambda: function lambda(current, context) { - return typeof current === 'function' ? current.call(context) : current; - }, - - escapeExpression: _utils.escapeExpression, - invokePartial: invokePartialWrapper, - - fn: function fn(i) { - var ret = templateSpec[i]; - ret.decorator = templateSpec[i + '_d']; - return ret; - }, - - programs: [], - program: function program(i, data, declaredBlockParams, blockParams, depths) { - var programWrapper = this.programs[i], - fn = this.fn(i); - if (data || depths || blockParams || declaredBlockParams) { - programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); - } else if (!programWrapper) { - programWrapper = this.programs[i] = wrapProgram(this, i, fn); - } - return programWrapper; - }, - - data: function data(value, depth) { - while (value && depth--) { - value = value._parent; - } - return value; - }, - mergeIfNeeded: function mergeIfNeeded(param, common) { - var obj = param || common; - - if (param && common && param !== common) { - obj = _utils.extend({}, common, param); - } - - return obj; - }, - // An empty object to use as replacement for null-contexts - nullContext: Object.seal({}), - - noop: env.VM.noop, - compilerInfo: templateSpec.compiler - }; - - function ret(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var data = options.data; - - ret._setup(options); - if (!options.partial && templateSpec.useData) { - data = initData(context, data); - } - var depths = undefined, - blockParams = templateSpec.useBlockParams ? [] : undefined; - if (templateSpec.useDepths) { - if (options.depths) { - depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths; - } else { - depths = [context]; - } - } - - function main(context /*, options*/) { - return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); - } - - main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); - return main(context, options); - } - - ret.isTop = true; - - ret._setup = function (options) { - if (!options.partial) { - var mergedHelpers = _utils.extend({}, env.helpers, options.helpers); - wrapHelpersToPassLookupProperty(mergedHelpers, container); - container.helpers = mergedHelpers; - - if (templateSpec.usePartial) { - // Use mergeIfNeeded here to prevent compiling global partials multiple times - container.partials = container.mergeIfNeeded(options.partials, env.partials); - } - if (templateSpec.usePartial || templateSpec.useDecorators) { - container.decorators = _utils.extend({}, env.decorators, options.decorators); - } - - container.hooks = {}; - container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options); - - var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7; - _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers); - _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers); - } else { - container.protoAccessControl = options.protoAccessControl; // internal option - container.helpers = options.helpers; - container.partials = options.partials; - container.decorators = options.decorators; - container.hooks = options.hooks; - } - }; - - ret._child = function (i, data, blockParams, depths) { - if (templateSpec.useBlockParams && !blockParams) { - throw new _Exception['default']('must pass block params'); - } - if (templateSpec.useDepths && !depths) { - throw new _Exception['default']('must pass parent depths'); - } - - return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); - }; - return ret; - } - - function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { - function prog(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var currentDepths = depths; - if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) { - currentDepths = [context].concat(depths); - } - - return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); - } - - prog = executeDecorators(fn, prog, container, depths, data, blockParams); - - prog.program = i; - prog.depth = depths ? depths.length : 0; - prog.blockParams = declaredBlockParams || 0; - return prog; - } - - /** - * This is currently part of the official API, therefore implementation details should not be changed. - */ - - function resolvePartial(partial, context, options) { - if (!partial) { - if (options.name === '@partial-block') { - partial = options.data['partial-block']; - } else { - partial = options.partials[options.name]; - } - } else if (!partial.call && !options.name) { - // This is a dynamic partial that returned a string - options.name = partial; - partial = options.partials[partial]; - } - return partial; - } - - function invokePartial(partial, context, options) { - // Use the current closure context to save the partial-block if this partial - var currentPartialBlock = options.data && options.data['partial-block']; - options.partial = true; - if (options.ids) { - options.data.contextPath = options.ids[0] || options.data.contextPath; - } - - var partialBlock = undefined; - if (options.fn && options.fn !== noop) { - (function () { - options.data = _base.createFrame(options.data); - // Wrapper function to get access to currentPartialBlock from the closure - var fn = options.fn; - partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - // Restore the partial-block from the closure for the execution of the block - // i.e. the part inside the block of the partial call. - options.data = _base.createFrame(options.data); - options.data['partial-block'] = currentPartialBlock; - return fn(context, options); - }; - if (fn.partials) { - options.partials = _utils.extend({}, options.partials, fn.partials); - } - })(); - } - - if (partial === undefined && partialBlock) { - partial = partialBlock; - } - - if (partial === undefined) { - throw new _Exception['default']('The partial ' + options.name + ' could not be found'); - } else if (partial instanceof Function) { - return partial(context, options); - } - } - - function noop() { - return ''; - } - - function initData(context, data) { - if (!data || !('root' in data)) { - data = data ? _base.createFrame(data) : {}; - data.root = context; - } - return data; - } - - function executeDecorators(fn, prog, container, depths, data, blockParams) { - if (fn.decorator) { - var props = {}; - prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); - _utils.extend(prog, props); - } - return prog; - } - - function wrapHelpersToPassLookupProperty(mergedHelpers, container) { - Object.keys(mergedHelpers).forEach(function (helperName) { - var helper = mergedHelpers[helperName]; - mergedHelpers[helperName] = passLookupPropertyOption(helper, container); - }); - } - - function passLookupPropertyOption(helper, container) { - var lookupProperty = container.lookupProperty; - return _internalWrapHelper.wrapHelper(helper, function (options) { - return _utils.extend({ lookupProperty: lookupProperty }, options); - }); - } -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3J1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQWVPLFdBQVMsYUFBYSxDQUFDLFlBQVksRUFBRTtBQUMxQyxRQUFNLGdCQUFnQixHQUFHLEFBQUMsWUFBWSxJQUFJLFlBQVksQ0FBQyxDQUFDLENBQUMsSUFBSyxDQUFDO1FBQzdELGVBQWUsU0FkakIsaUJBQWlCLEFBY29CLENBQUM7O0FBRXRDLFFBQ0UsZ0JBQWdCLFVBZmxCLGlDQUFpQyxBQWVzQixJQUNyRCxnQkFBZ0IsVUFsQmxCLGlCQUFpQixBQWtCc0IsRUFDckM7QUFDQSxhQUFPO0tBQ1I7O0FBRUQsUUFBSSxnQkFBZ0IsU0FyQnBCLGlDQUFpQyxBQXFCdUIsRUFBRTtBQUN4RCxVQUFNLGVBQWUsR0FBR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ydGlhbC5jYWxsKFxuICAgICAgdGhpcyxcbiAgICAgIHBhcnRpYWwsXG4gICAgICBjb250ZXh0LFxuICAgICAgZXh0ZW5kZWRPcHRpb25zXG4gICAgKTtcblxuICAgIGlmIChyZXN1bHQgPT0gbnVsbCAmJiBlbnYuY29tcGlsZSkge1xuICAgICAgb3B0aW9ucy5wYXJ0aWFsc1tvcHRpb25zLm5hbWVdID0gZW52LmNvbXBpbGUoXG4gICAgICAgIHBhcnRpYWwsXG4gICAgICAgIHRlbXBsYXRlU3BlYy5jb21waWxlck9wdGlvbnMsXG4gICAgICAgIGVudlxuICAgICAgKTtcbiAgICAgIHJlc3VsdCA9IG9wdGlvbnMucGFydGlhbHNbb3B0aW9ucy5uYW1lXShjb250ZXh0LCBleHRlbmRlZE9wdGlvbnMpO1xuICAgIH1cbiAgICBpZiAocmVzdWx0ICE9IG51bGwpIHtcbiAgICAgIGlmIChvcHRpb25zLmluZGVudCkge1xuICAgICAgICBsZXQgbGluZXMgPSByZXN1bHQuc3BsaXQoJ1xcbicpO1xuICAgICAgICBmb3IgKGxldCBpID0gMCwgbCA9IGxpbmVzLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICAgIGlmICghbGluZXNbaV0gJiYgaSArIDEgPT09IGwpIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGxpbmVzW2ldID0gb3B0aW9ucy5pbmRlbnQgKyBsaW5lc1tpXTtcbiAgICAgICAgfVxuICAgICAgICByZXN1bHQgPSBsaW5lcy5qb2luKCdcXG4nKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfSBlbHNlIHtcbiAgICAgIHRocm93IG5ldyBFeGNlcHRpb24oXG4gICAgICAgICdUaGUgcGFydGlhbCAnICtcbiAgICAgICAgICBvcHRpb25zLm5hbWUgK1xuICAgICAgICAgICcgY291bGQgbm90IGJlIGNvbXBpbGVkIHdoZW4gcnVubmluZyBpbiB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iAgfTtcblxuICBmdW5jdGlvbiByZXQoY29udGV4dCwgb3B0aW9ucyA9IHt9KSB7XG4gICAgbGV0IGRhdGEgPSBvcHRpb25zLmRhdGE7XG5cbiAgICByZXQuX3NldHVwKG9wdGlvbnMpO1xuICAgIGlmICghb3B0aW9ucy5wYXJ0aWFsICYmIHRlbXBsYXRlU3BlYy51c2VEYXRhKSB7XG4gICAgICBkYXRhID0gaW5pdERhdGEoY29udGV4dCwgZGF0YSk7XG4gICAgfVxuICAgIGxldCBkZXB0aHMsXG4gICAgICBibG9ja1BhcmFtcyA9IHRlbXBsYXRlU3BlYy51c2VCbG9ja1BhcmFtcyA/IFtdIDogdW5kZWZpbmVkO1xuICAgIGlmICh0ZW1wbGF0ZVNwZWMudXNlRGVwdGhzKSB7XG4gICAgICBpZiAob3B0aW9ucy5kZXB0aHMpIHtcbiAgICAgICAgZGVwdGhzID1cbiAgICAgICAgICBjb250ZXh0ICE9IG9wdGlvbnMuZGVwdGhzWzBdXG4gICAgICAgICAgICA/IFtjb250ZXh0XS5jb25jYXQob3B0aW9ucy5kZXB0aHMpXG4gICAgICAgICAgICA6IG9wdGlvbnMuZGVwdGhzO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVwdGhzID0gW2NvbnRleHRdO1xuICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIG1haW4oY29udGV4dCAvKiwgb3B0aW9ucyovKSB7XG4gICAgICByZXR1cm4gKFxuICAgICAgICAnJyArXG4gICAgICAgIHRlbXBsYXRlU3BlYy5tYWluKFxuICAgICAgICAgIGNvbnRhaW5lcixcbiAgICAgICAgICBjb250ZXh0LFxuICAgICAgICAgIGNvbnRhaW5lci5oZWxwZXJzLFxuICAgICAgICAgIGNvbnRhaW5lci5wYXJ0aWFscyxcbiAgICAgICAgICBkYXRhLFxuICAgICAgICAgIGJsb2NrUGFyYW1zLFxuICAgICAgICAgIGRlcHRoc1xuICAgICAgICApXG4gICAgICApO1xuICAgIH1cblxuIC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B3cmFwSGVscGVyKGhlbHBlciwgb3B0aW9ucyA9PiB7XG4gICAgcmV0dXJuIFV0aWxzLmV4dGVuZCh7IGxvb2t1cFByb3BlcnR5IH0sIG9wdGlvbnMpO1xuICB9KTtcbn1cbiJdfQ== -; -define('handlebars/no-conflict',['exports', 'module'], function (exports, module) { - 'use strict'; - - module.exports = function (Handlebars) { - /* istanbul ignore next */ - var root = typeof global !== 'undefined' ? global : window, - $Handlebars = root.Handlebars; - /* istanbul ignore next */ - Handlebars.noConflict = function () { - if (root.Handlebars === Handlebars) { - root.Handlebars = $Handlebars; - } - return Handlebars; - }; - }; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL25vLWNvbmZsaWN0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OzttQkFBZSxVQUFTLFVBQVUsRUFBRTs7QUFFbEMsUUFBSSxJQUFJLEdBQUcsT0FBTyxNQUFNLEtBQUssV0FBVyxHQUFHLE1BQU0sR0FBRyxNQUFNO1FBQ3hELFdBQVcsR0FBRyxJQUFJLENBQUMsVUFBVSxDQUFDOztBQUVoQyxjQUFVLENBQUMsVUFBVSxHQUFHLFlBQVc7QUFDakMsVUFBSSxJQUFJLENBQUMsVUFBVSxLQUFLLFVBQVUsRUFBRTtBQUNsQyxZQUFJLENBQUMsVUFBVSxHQUFHLFdBQVcsQ0FBQztPQUMvQjtBQUNELGFBQU8sVUFBVSxDQUFDO0tBQ25CLENBQUM7R0FDSCIsImZpbGUiOiJuby1jb25mbGljdC5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKEhhbmRsZWJhcnMpIHtcbiAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgbGV0IHJvb3QgPSB0eXBlb2YgZ2xvYmFsICE9PSAndW5kZWZpbmVkJyA/IGdsb2JhbCA6IHdpbmRvdyxcbiAgICAkSGFuZGxlYmFycyA9IHJvb3QuSGFuZGxlYmFycztcbiAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgSGFuZGxlYmFycy5ub0NvbmZsaWN0ID0gZnVuY3Rpb24oKSB7XG4gICAgaWYgKHJvb3QuSGFuZGxlYmFycyA9PT0gSGFuZGxlYmFycykge1xuICAgICAgcm9vdC5IYW5kbGViYXJzID0gJEhhbmRsZWJhcnM7XG4gICAgfVxuICAgIHJldHVybiBIYW5kbGViYXJzO1xuICB9O1xufVxuIl19 -; -define('handlebars.runtime',['exports', 'module', './handlebars/base', './handlebars/safe-string', './handlebars/exception', './handlebars/utils', './handlebars/runtime', './handlebars/no-conflict'], function (exports, module, _handlebarsBase, _handlebarsSafeString, _handlebarsException, _handlebarsUtils, _handlebarsRuntime, _handlebarsNoConflict) { - 'use strict'; - - // istanbul ignore next - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - // Each of these augment the Handlebars object. No need to setup here. - // (This is done to easily share code between commonjs and browse envs) - - var _SafeString = _interopRequireDefault(_handlebarsSafeString); - - var _Exception = _interopRequireDefault(_handlebarsException); - - var _noConflict = _interopRequireDefault(_handlebarsNoConflict); - - // For compatibility and usage outside of module systems, make the Handlebars object a namespace - function create() { - var hb = new _handlebarsBase.HandlebarsEnvironment(); - - _handlebarsUtils.extend(hb, _handlebarsBase); - hb.SafeString = _SafeString['default']; - hb.Exception = _Exception['default']; - hb.Utils = _handlebarsUtils; - hb.escapeExpression = _handlebarsUtils.escapeExpression; - - hb.VM = _handlebarsRuntime; - hb.template = function (spec) { - return _handlebarsRuntime.template(spec, hb); - }; - - return hb; - } - - var inst = create(); - inst.create = create; - - _noConflict['default'](inst); - - inst['default'] = inst; - - module.exports = inst; -}); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9oYW5kbGViYX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lYXRlID0gY3JlYXRlO1xuXG5ub0NvbmZsaWN0KGluc3QpO1xuXG5pbnN0WydkZWZhdWx0J10gPSBpbnN0O1xuXG5leHBvcnQgZGVmYXVsdCBpbnN0O1xuIl19 -; diff --git a/node_modules/handlebars/dist/handlebars.runtime.amd.min.js b/node_modules/handlebars/dist/handlebars.runtime.amd.min.js deleted file mode 100644 index 1b2cce36..00000000 --- a/node_modules/handlebars/dist/handlebars.runtime.amd.min.js +++ /dev/null @@ -1,27 +0,0 @@ -/**! - - @license - handlebars v4.7.7 - -Copyright (C) 2011-2019 by Yehuda Katz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ -define("handlebars/utils",["exports"],function(a){"use strict";function b(a){return j[a]}function c(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function d(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function e(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return l.test(a)?a.replace(k,b):a}function f(a){return!a&&0!==a||!(!o(a)||0!==a.length)}function g(a){var b=c({},a);return b._parent=a,b}function h(a,b){return a.path=b,a}function i(a,b){return(a?a+".":"")+b}a.__esModule=!0,a.extend=c,a.indexOf=d,a.escapeExpression=e,a.isEmpty=f,a.createFrame=g,a.blockParams=h,a.appendContextPath=i;var j={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},k=/[&<>"'`=]/g,l=/[&<>"'`=]/,m=Object.prototype.toString;a.toString=m;var n=function(a){return"function"==typeof a};n(/x/)&&(a.isFunction=n=function(a){return"function"==typeof a&&"[object Function]"===m.call(a)}),a.isFunction=n;var o=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===m.call(a)};a.isArray=o}),define("handlebars/exception",["exports","module"],function(a,b){"use strict";function c(a,b){var e=b&&b.loc,f=void 0,g=void 0,h=void 0,i=void 0;e&&(f=e.start.line,g=e.end.line,h=e.start.column,i=e.end.column,a+=" - "+f+":"+h);for(var j=Error.prototype.constructor.call(this,a),k=0;k<d.length;k++)this[d[k]]=j[d[k]];Error.captureStackTrace&&Error.captureStackTrace(this,c);try{e&&(this.lineNumber=f,this.endLineNumber=g,Object.defineProperty?(Object.defineProperty(this,"column",{value:h,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:i,enumerable:!0})):(this.column=h,this.endColumn=i))}catch(l){}}var d=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];c.prototype=new Error,b.exports=c}),define("handlebars/helpers/block-helper-missing",["exports","module","../utils"],function(a,b,c){"use strict";b.exports=function(a){a.registerHelper("blockHelperMissing",function(b,d){var e=d.inverse,f=d.fn;if(b===!0)return f(this);if(b===!1||null==b)return e(this);if(c.isArray(b))return b.length>0?(d.ids&&(d.ids=[d.name]),a.helpers.each(b,d)):e(this);if(d.data&&d.ids){var g=c.createFrame(d.data);g.contextPath=c.appendContextPath(d.data.contextPath,d.name),d={data:g}}return f(b,d)})}}),define("handlebars/helpers/each",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("each",function(a,b){function d(b,d,f){j&&(j.key=b,j.index=d,j.first=0===d,j.last=!!f,k&&(j.contextPath=k+b)),i+=e(a[b],{data:j,blockParams:c.blockParams([a[b],b],[k+b,null])})}if(!b)throw new f["default"]("Must pass iterator to #each");var e=b.fn,g=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=c.appendContextPath(b.data.contextPath,b.ids[0])+"."),c.isFunction(a)&&(a=a.call(this)),b.data&&(j=c.createFrame(b.data)),a&&"object"==typeof a)if(c.isArray(a))for(var l=a.length;h<l;h++)h in a&&d(h,h,h===a.length-1);else if(global.Symbol&&a[global.Symbol.iterator]){for(var m=[],n=a[global.Symbol.iterator](),o=n.next();!o.done;o=n.next())m.push(o.value);a=m;for(var l=a.length;h<l;h++)d(h,h,h===a.length-1)}else!function(){var b=void 0;Object.keys(a).forEach(function(a){void 0!==b&&d(b,h-1),b=a,h++}),void 0!==b&&d(b,h-1,!0)}();return 0===h&&(i=g(this)),i})}}),define("handlebars/helpers/helper-missing",["exports","module","../exception"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}var e=d(c);b.exports=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new e["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})}}),define("handlebars/helpers/if",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("if",function(a,b){if(2!=arguments.length)throw new f["default"]("#if requires exactly one argument");return c.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||c.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){if(2!=arguments.length)throw new f["default"]("#unless requires exactly one argument");return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})}}),define("handlebars/helpers/log",["exports","module"],function(a,b){"use strict";b.exports=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d<arguments.length-1;d++)b.push(arguments[d]);var e=1;null!=c.hash.level?e=c.hash.level:c.data&&null!=c.data.level&&(e=c.data.level),b[0]=e,a.log.apply(a,b)})}}),define("handlebars/helpers/lookup",["exports","module"],function(a,b){"use strict";b.exports=function(a){a.registerHelper("lookup",function(a,b,c){return a?c.lookupProperty(a,b):a})}}),define("handlebars/helpers/with",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("with",function(a,b){if(2!=arguments.length)throw new f["default"]("#with requires exactly one argument");c.isFunction(a)&&(a=a.call(this));var d=b.fn;if(c.isEmpty(a))return b.inverse(this);var e=b.data;return b.data&&b.ids&&(e=c.createFrame(b.data),e.contextPath=c.appendContextPath(b.data.contextPath,b.ids[0])),d(a,{data:e,blockParams:c.blockParams([a],[e&&e.contextPath])})})}}),define("handlebars/helpers",["exports","./helpers/block-helper-missing","./helpers/each","./helpers/helper-missing","./helpers/if","./helpers/log","./helpers/lookup","./helpers/with"],function(a,b,c,d,e,f,g,h){"use strict";function i(a){return a&&a.__esModule?a:{"default":a}}function j(a){l["default"](a),m["default"](a),n["default"](a),o["default"](a),p["default"](a),q["default"](a),r["default"](a)}function k(a,b,c){a.helpers[b]&&(a.hooks[b]=a.helpers[b],c||delete a.helpers[b])}a.__esModule=!0,a.registerDefaultHelpers=j,a.moveHelperToHooks=k;var l=i(b),m=i(c),n=i(d),o=i(e),p=i(f),q=i(g),r=i(h)}),define("handlebars/decorators/inline",["exports","module","../utils"],function(a,b,c){"use strict";b.exports=function(a){a.registerDecorator("inline",function(a,b,d,e){var f=a;return b.partials||(b.partials={},f=function(e,f){var g=d.partials;d.partials=c.extend({},g,b.partials);var h=a(e,f);return d.partials=g,h}),b.partials[e.args[0]]=e.fn,f})}}),define("handlebars/decorators",["exports","./decorators/inline"],function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a){e["default"](a)}a.__esModule=!0,a.registerDefaultDecorators=d;var e=c(b)}),define("handlebars/logger",["exports","module","./utils"],function(a,b,c){"use strict";var d={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(a){if("string"==typeof a){var b=c.indexOf(d.methodMap,a.toLowerCase());a=b>=0?b:parseInt(a,10)}return a},log:function(a){if(a=d.lookupLevel(a),"undefined"!=typeof console&&d.lookupLevel(d.level)<=a){var b=d.methodMap[a];console[b]||(b="log");for(var c=arguments.length,e=Array(c>1?c-1:0),f=1;f<c;f++)e[f-1]=arguments[f];console[b].apply(console,e)}}};b.exports=d}),define("handlebars/internal/create-new-lookup-object",["exports","../utils"],function(a,b){"use strict";function c(){for(var a=arguments.length,c=Array(a),d=0;d<a;d++)c[d]=arguments[d];return b.extend.apply(void 0,[Object.create(null)].concat(c))}a.__esModule=!0,a.createNewLookupObject=c}),define("handlebars/internal/proto-access",["exports","./create-new-lookup-object","../logger"],function(a,b,c){"use strict";function d(a){var c=Object.create(null);c.constructor=!1,c.__defineGetter__=!1,c.__defineSetter__=!1,c.__lookupGetter__=!1;var d=Object.create(null);return d.__proto__=!1,{properties:{whitelist:b.createNewLookupObject(d,a.allowedProtoProperties),defaultValue:a.allowProtoPropertiesByDefault},methods:{whitelist:b.createNewLookupObject(c,a.allowedProtoMethods),defaultValue:a.allowProtoMethodsByDefault}}}function e(a,b,c){return"function"==typeof a?f(b.methods,c):f(b.properties,c)}function f(a,b){return void 0!==a.whitelist[b]?a.whitelist[b]===!0:void 0!==a.defaultValue?a.defaultValue:(g(b),!1)}function g(a){i[a]!==!0&&(i[a]=!0,c.log("error",'Handlebars: Access has been denied to resolve the property "'+a+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}function h(){Object.keys(i).forEach(function(a){delete i[a]})}a.__esModule=!0,a.createProtoAccessControl=d,a.resultIsAllowed=e,a.resetLoggedProperties=h;var i=Object.create(null)}),define("handlebars/base",["exports","./utils","./exception","./helpers","./decorators","./logger","./internal/proto-access"],function(a,b,c,d,e,f,g){"use strict";function h(a){return a&&a.__esModule?a:{"default":a}}function i(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},d.registerDefaultHelpers(this),e.registerDefaultDecorators(this)}a.__esModule=!0,a.HandlebarsEnvironment=i;var j=h(c),k=h(f),l="4.7.7";a.VERSION=l;var m=8;a.COMPILER_REVISION=m;var n=7;a.LAST_COMPATIBLE_COMPILER_REVISION=n;var o={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};a.REVISION_CHANGES=o;var p="[object Object]";i.prototype={constructor:i,logger:k["default"],log:k["default"].log,registerHelper:function(a,c){if(b.toString.call(a)===p){if(c)throw new j["default"]("Arg not supported with multiple helpers");b.extend(this.helpers,a)}else this.helpers[a]=c},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,c){if(b.toString.call(a)===p)b.extend(this.partials,a);else{if("undefined"==typeof c)throw new j["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=c}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,c){if(b.toString.call(a)===p){if(c)throw new j["default"]("Arg not supported with multiple decorators");b.extend(this.decorators,a)}else this.decorators[a]=c},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){g.resetLoggedProperties()}};var q=k["default"].log;a.log=q,a.createFrame=b.createFrame,a.logger=k["default"]}),define("handlebars/safe-string",["exports","module"],function(a,b){"use strict";function c(a){this.string=a}c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b.exports=c}),define("handlebars/internal/wrapHelper",["exports"],function(a){"use strict";function b(a,b){if("function"!=typeof a)return a;var c=function(){var c=arguments[arguments.length-1];return arguments[arguments.length-1]=b(c),a.apply(this,arguments)};return c}a.__esModule=!0,a.wrapHelper=b}),define("handlebars/runtime",["exports","./utils","./exception","./base","./helpers","./internal/wrapHelper","./internal/proto-access"],function(a,b,c,d,e,f,g){"use strict";function h(a){return a&&a.__esModule?a:{"default":a}}function i(a){var b=a&&a[0]||1,c=d.COMPILER_REVISION;if(!(b>=d.LAST_COMPATIBLE_COMPILER_REVISION&&b<=d.COMPILER_REVISION)){if(b<d.LAST_COMPATIBLE_COMPILER_REVISION){var e=d.REVISION_CHANGES[c],f=d.REVISION_CHANGES[b];throw new s["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+e+") or downgrade your runtime to an older version ("+f+").")}throw new s["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function j(a,c){function d(d,e,f){f.hash&&(e=b.extend({},e,f.hash),f.ids&&(f.ids[0]=!0)),d=c.VM.resolvePartial.call(this,d,e,f);var g=b.extend({},f,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),h=c.VM.invokePartial.call(this,d,e,g);if(null==h&&c.compile&&(f.partials[f.name]=c.compile(d,a.compilerOptions,c),h=f.partials[f.name](e,g)),null!=h){if(f.indent){for(var i=h.split("\n"),j=0,k=i.length;j<k&&(i[j]||j+1!==k);j++)i[j]=f.indent+i[j];h=i.join("\n")}return h}throw new s["default"]("The partial "+f.name+" could not be compiled when running in runtime-only mode")}function f(b){function c(b){return""+a.main(i,b,i.helpers,i.partials,e,h,g)}var d=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],e=d.data;f._setup(d),!d.partial&&a.useData&&(e=o(b,e));var g=void 0,h=a.useBlockParams?[]:void 0;return a.useDepths&&(g=d.depths?b!=d.depths[0]?[b].concat(d.depths):d.depths:[b]),(c=p(a.main,c,i,d.depths||[],e,h))(b,d)}if(!c)throw new s["default"]("No environment passed to template");if(!a||!a.main)throw new s["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,c.VM.checkRevision(a.compiler);var h=a.compiler&&7===a.compiler[0],i={strict:function(a,b,c){if(!(a&&b in a))throw new s["default"]('"'+b+'" not defined in '+a,{loc:c});return i.lookupProperty(a,b)},lookupProperty:function(a,b){var c=a[b];return null==c?c:Object.prototype.hasOwnProperty.call(a,b)?c:g.resultIsAllowed(c,i.protoAccessControl,b)?c:void 0},lookup:function(a,b){for(var c=a.length,d=0;d<c;d++){var e=a[d]&&i.lookupProperty(a[d],b);if(null!=e)return a[d][b]}},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:b.escapeExpression,invokePartial:d,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var f=this.programs[a],g=this.fn(a);return b||e||d||c?f=k(this,a,g,b,c,d,e):f||(f=this.programs[a]=k(this,a,g)),f},data:function(a,b){for(;a&&b--;)a=a._parent;return a},mergeIfNeeded:function(a,c){var d=a||c;return a&&c&&a!==c&&(d=b.extend({},c,a)),d},nullContext:Object.seal({}),noop:c.VM.noop,compilerInfo:a.compiler};return f.isTop=!0,f._setup=function(d){if(d.partial)i.protoAccessControl=d.protoAccessControl,i.helpers=d.helpers,i.partials=d.partials,i.decorators=d.decorators,i.hooks=d.hooks;else{var f=b.extend({},c.helpers,d.helpers);q(f,i),i.helpers=f,a.usePartial&&(i.partials=i.mergeIfNeeded(d.partials,c.partials)),(a.usePartial||a.useDecorators)&&(i.decorators=b.extend({},c.decorators,d.decorators)),i.hooks={},i.protoAccessControl=g.createProtoAccessControl(d);var j=d.allowCallsToHelperMissing||h;e.moveHelperToHooks(i,"helperMissing",j),e.moveHelperToHooks(i,"blockHelperMissing",j)}},f._child=function(b,c,d,e){if(a.useBlockParams&&!d)throw new s["default"]("must pass block params");if(a.useDepths&&!e)throw new s["default"]("must pass parent depths");return k(i,b,a[b],c,0,d,e)},f}function k(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return!g||b==g[0]||b===a.nullContext&&null===g[0]||(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=p(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function l(a,b,c){return a?a.call||c.name||(c.name=a,a=c.partials[a]):a="@partial-block"===c.name?c.data["partial-block"]:c.partials[c.name],a}function m(a,c,e){var f=e.data&&e.data["partial-block"];e.partial=!0,e.ids&&(e.data.contextPath=e.ids[0]||e.data.contextPath);var g=void 0;if(e.fn&&e.fn!==n&&!function(){e.data=d.createFrame(e.data);var a=e.fn;g=e.data["partial-block"]=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return c.data=d.createFrame(c.data),c.data["partial-block"]=f,a(b,c)},a.partials&&(e.partials=b.extend({},e.partials,a.partials))}(),void 0===a&&g&&(a=g),void 0===a)throw new s["default"]("The partial "+e.name+" could not be found");if(a instanceof Function)return a(c,e)}function n(){return""}function o(a,b){return b&&"root"in b||(b=b?d.createFrame(b):{},b.root=a),b}function p(a,c,d,e,f,g){if(a.decorator){var h={};c=a.decorator(c,h,d,e&&e[0],f,g,e),b.extend(c,h)}return c}function q(a,b){Object.keys(a).forEach(function(c){var d=a[c];a[c]=r(d,b)})}function r(a,c){var d=c.lookupProperty;return f.wrapHelper(a,function(a){return b.extend({lookupProperty:d},a)})}a.__esModule=!0,a.checkRevision=i,a.template=j,a.wrapProgram=k,a.resolvePartial=l,a.invokePartial=m,a.noop=n;var s=h(c)}),define("handlebars/no-conflict",["exports","module"],function(a,b){"use strict";b.exports=function(a){var b="undefined"!=typeof global?global:window,c=b.Handlebars;a.noConflict=function(){return b.Handlebars===a&&(b.Handlebars=c),a}}}),define("handlebars.runtime",["exports","module","./handlebars/base","./handlebars/safe-string","./handlebars/exception","./handlebars/utils","./handlebars/runtime","./handlebars/no-conflict"],function(a,b,c,d,e,f,g,h){"use strict";function i(a){return a&&a.__esModule?a:{"default":a}}function j(){var a=new c.HandlebarsEnvironment;return f.extend(a,c),a.SafeString=k["default"],a.Exception=l["default"],a.Utils=f,a.escapeExpression=f.escapeExpression,a.VM=g,a.template=function(b){return g.template(b,a)},a}var k=i(d),l=i(e),m=i(h),n=j();n.create=j,m["default"](n),n["default"]=n,b.exports=n}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/handlebars.runtime.js b/node_modules/handlebars/dist/handlebars.runtime.js deleted file mode 100644 index 4bed375d..00000000 --- a/node_modules/handlebars/dist/handlebars.runtime.js +++ /dev/null @@ -1,1800 +0,0 @@ -/**! - - @license - handlebars v4.7.7 - -Copyright (C) 2011-2019 by Yehuda Katz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["Handlebars"] = factory(); - else - root["Handlebars"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireWildcard = __webpack_require__(1)['default']; - - var _interopRequireDefault = __webpack_require__(2)['default']; - - exports.__esModule = true; - - var _handlebarsBase = __webpack_require__(3); - - var base = _interopRequireWildcard(_handlebarsBase); - - // Each of these augment the Handlebars object. No need to setup here. - // (This is done to easily share code between commonjs and browse envs) - - var _handlebarsSafeString = __webpack_require__(36); - - var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); - - var _handlebarsException = __webpack_require__(5); - - var _handlebarsException2 = _interopRequireDefault(_handlebarsException); - - var _handlebarsUtils = __webpack_require__(4); - - var Utils = _interopRequireWildcard(_handlebarsUtils); - - var _handlebarsRuntime = __webpack_require__(37); - - var runtime = _interopRequireWildcard(_handlebarsRuntime); - - var _handlebarsNoConflict = __webpack_require__(43); - - var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); - - // For compatibility and usage outside of module systems, make the Handlebars object a namespace - function create() { - var hb = new base.HandlebarsEnvironment(); - - Utils.extend(hb, base); - hb.SafeString = _handlebarsSafeString2['default']; - hb.Exception = _handlebarsException2['default']; - hb.Utils = Utils; - hb.escapeExpression = Utils.escapeExpression; - - hb.VM = runtime; - hb.template = function (spec) { - return runtime.template(spec, hb); - }; - - return hb; - } - - var inst = create(); - inst.create = create; - - _handlebarsNoConflict2['default'](inst); - - inst['default'] = inst; - - exports['default'] = inst; - module.exports = exports['default']; - -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - - "use strict"; - - exports["default"] = function (obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - } - - newObj["default"] = obj; - return newObj; - } - }; - - exports.__esModule = true; - -/***/ }), -/* 2 */ -/***/ (function(module, exports) { - - "use strict"; - - exports["default"] = function (obj) { - return obj && obj.__esModule ? obj : { - "default": obj - }; - }; - - exports.__esModule = true; - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(2)['default']; - - exports.__esModule = true; - exports.HandlebarsEnvironment = HandlebarsEnvironment; - - var _utils = __webpack_require__(4); - - var _exception = __webpack_require__(5); - - var _exception2 = _interopRequireDefault(_exception); - - var _helpers = __webpack_require__(9); - - var _decorators = __webpack_require__(29); - - var _logger = __webpack_require__(31); - - var _logger2 = _interopRequireDefault(_logger); - - var _internalProtoAccess = __webpack_require__(32); - - var VERSION = '4.7.7'; - exports.VERSION = VERSION; - var COMPILER_REVISION = 8; - exports.COMPILER_REVISION = COMPILER_REVISION; - var LAST_COMPATIBLE_COMPILER_REVISION = 7; - - exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION; - var REVISION_CHANGES = { - 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it - 2: '== 1.0.0-rc.3', - 3: '== 1.0.0-rc.4', - 4: '== 1.x.x', - 5: '== 2.0.0-alpha.x', - 6: '>= 2.0.0-beta.1', - 7: '>= 4.0.0 <4.3.0', - 8: '>= 4.3.0' - }; - - exports.REVISION_CHANGES = REVISION_CHANGES; - var objectType = '[object Object]'; - - function HandlebarsEnvironment(helpers, partials, decorators) { - this.helpers = helpers || {}; - this.partials = partials || {}; - this.decorators = decorators || {}; - - _helpers.registerDefaultHelpers(this); - _decorators.registerDefaultDecorators(this); - } - - HandlebarsEnvironment.prototype = { - constructor: HandlebarsEnvironment, - - logger: _logger2['default'], - log: _logger2['default'].log, - - registerHelper: function registerHelper(name, fn) { - if (_utils.toString.call(name) === objectType) { - if (fn) { - throw new _exception2['default']('Arg not supported with multiple helpers'); - } - _utils.extend(this.helpers, name); - } else { - this.helpers[name] = fn; - } - }, - unregisterHelper: function unregisterHelper(name) { - delete this.helpers[name]; - }, - - registerPartial: function registerPartial(name, partial) { - if (_utils.toString.call(name) === objectType) { - _utils.extend(this.partials, name); - } else { - if (typeof partial === 'undefined') { - throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined'); - } - this.partials[name] = partial; - } - }, - unregisterPartial: function unregisterPartial(name) { - delete this.partials[name]; - }, - - registerDecorator: function registerDecorator(name, fn) { - if (_utils.toString.call(name) === objectType) { - if (fn) { - throw new _exception2['default']('Arg not supported with multiple decorators'); - } - _utils.extend(this.decorators, name); - } else { - this.decorators[name] = fn; - } - }, - unregisterDecorator: function unregisterDecorator(name) { - delete this.decorators[name]; - }, - /** - * Reset the memory of illegal property accesses that have already been logged. - * @deprecated should only be used in handlebars test-cases - */ - resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() { - _internalProtoAccess.resetLoggedProperties(); - } - }; - - var log = _logger2['default'].log; - - exports.log = log; - exports.createFrame = _utils.createFrame; - exports.logger = _logger2['default']; - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - 'use strict'; - - exports.__esModule = true; - exports.extend = extend; - exports.indexOf = indexOf; - exports.escapeExpression = escapeExpression; - exports.isEmpty = isEmpty; - exports.createFrame = createFrame; - exports.blockParams = blockParams; - exports.appendContextPath = appendContextPath; - var escape = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`', - '=': '=' - }; - - var badChars = /[&<>"'`=]/g, - possible = /[&<>"'`=]/; - - function escapeChar(chr) { - return escape[chr]; - } - - function extend(obj /* , ...source */) { - for (var i = 1; i < arguments.length; i++) { - for (var key in arguments[i]) { - if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { - obj[key] = arguments[i][key]; - } - } - } - - return obj; - } - - var toString = Object.prototype.toString; - - exports.toString = toString; - // Sourced from lodash - // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt - /* eslint-disable func-style */ - var isFunction = function isFunction(value) { - return typeof value === 'function'; - }; - // fallback for older versions of Chrome and Safari - /* istanbul ignore next */ - if (isFunction(/x/)) { - exports.isFunction = isFunction = function (value) { - return typeof value === 'function' && toString.call(value) === '[object Function]'; - }; - } - exports.isFunction = isFunction; - - /* eslint-enable func-style */ - - /* istanbul ignore next */ - var isArray = Array.isArray || function (value) { - return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; - }; - - exports.isArray = isArray; - // Older IE versions do not directly support indexOf so we must implement our own, sadly. - - function indexOf(array, value) { - for (var i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { - return i; - } - } - return -1; - } - - function escapeExpression(string) { - if (typeof string !== 'string') { - // don't escape SafeStrings, since they're already safe - if (string && string.toHTML) { - return string.toHTML(); - } else if (string == null) { - return ''; - } else if (!string) { - return string + ''; - } - - // Force a string conversion as this will be done by the append regardless and - // the regex test will do this transparently behind the scenes, causing issues if - // an object's to string has escaped characters in it. - string = '' + string; - } - - if (!possible.test(string)) { - return string; - } - return string.replace(badChars, escapeChar); - } - - function isEmpty(value) { - if (!value && value !== 0) { - return true; - } else if (isArray(value) && value.length === 0) { - return true; - } else { - return false; - } - } - - function createFrame(object) { - var frame = extend({}, object); - frame._parent = object; - return frame; - } - - function blockParams(params, ids) { - params.path = ids; - return params; - } - - function appendContextPath(contextPath, id) { - return (contextPath ? contextPath + '.' : '') + id; - } - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _Object$defineProperty = __webpack_require__(6)['default']; - - exports.__esModule = true; - var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack']; - - function Exception(message, node) { - var loc = node && node.loc, - line = undefined, - endLineNumber = undefined, - column = undefined, - endColumn = undefined; - - if (loc) { - line = loc.start.line; - endLineNumber = loc.end.line; - column = loc.start.column; - endColumn = loc.end.column; - - message += ' - ' + line + ':' + column; - } - - var tmp = Error.prototype.constructor.call(this, message); - - // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. - for (var idx = 0; idx < errorProps.length; idx++) { - this[errorProps[idx]] = tmp[errorProps[idx]]; - } - - /* istanbul ignore else */ - if (Error.captureStackTrace) { - Error.captureStackTrace(this, Exception); - } - - try { - if (loc) { - this.lineNumber = line; - this.endLineNumber = endLineNumber; - - // Work around issue under safari where we can't directly set the column value - /* istanbul ignore next */ - if (_Object$defineProperty) { - Object.defineProperty(this, 'column', { - value: column, - enumerable: true - }); - Object.defineProperty(this, 'endColumn', { - value: endColumn, - enumerable: true - }); - } else { - this.column = column; - this.endColumn = endColumn; - } - } - } catch (nop) { - /* Ignore if the browser is very particular */ - } - } - - Exception.prototype = new Error(); - - exports['default'] = Exception; - module.exports = exports['default']; - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(7), __esModule: true }; - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - var $ = __webpack_require__(8); - module.exports = function defineProperty(it, key, desc){ - return $.setDesc(it, key, desc); - }; - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - var $Object = Object; - module.exports = { - create: $Object.create, - getProto: $Object.getPrototypeOf, - isEnum: {}.propertyIsEnumerable, - getDesc: $Object.getOwnPropertyDescriptor, - setDesc: $Object.defineProperty, - setDescs: $Object.defineProperties, - getKeys: $Object.keys, - getNames: $Object.getOwnPropertyNames, - getSymbols: $Object.getOwnPropertySymbols, - each: [].forEach - }; - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(2)['default']; - - exports.__esModule = true; - exports.registerDefaultHelpers = registerDefaultHelpers; - exports.moveHelperToHooks = moveHelperToHooks; - - var _helpersBlockHelperMissing = __webpack_require__(10); - - var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); - - var _helpersEach = __webpack_require__(11); - - var _helpersEach2 = _interopRequireDefault(_helpersEach); - - var _helpersHelperMissing = __webpack_require__(24); - - var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); - - var _helpersIf = __webpack_require__(25); - - var _helpersIf2 = _interopRequireDefault(_helpersIf); - - var _helpersLog = __webpack_require__(26); - - var _helpersLog2 = _interopRequireDefault(_helpersLog); - - var _helpersLookup = __webpack_require__(27); - - var _helpersLookup2 = _interopRequireDefault(_helpersLookup); - - var _helpersWith = __webpack_require__(28); - - var _helpersWith2 = _interopRequireDefault(_helpersWith); - - function registerDefaultHelpers(instance) { - _helpersBlockHelperMissing2['default'](instance); - _helpersEach2['default'](instance); - _helpersHelperMissing2['default'](instance); - _helpersIf2['default'](instance); - _helpersLog2['default'](instance); - _helpersLookup2['default'](instance); - _helpersWith2['default'](instance); - } - - function moveHelperToHooks(instance, helperName, keepHelper) { - if (instance.helpers[helperName]) { - instance.hooks[helperName] = instance.helpers[helperName]; - if (!keepHelper) { - delete instance.helpers[helperName]; - } - } - } - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _utils = __webpack_require__(4); - - exports['default'] = function (instance) { - instance.registerHelper('blockHelperMissing', function (context, options) { - var inverse = options.inverse, - fn = options.fn; - - if (context === true) { - return fn(this); - } else if (context === false || context == null) { - return inverse(this); - } else if (_utils.isArray(context)) { - if (context.length > 0) { - if (options.ids) { - options.ids = [options.name]; - } - - return instance.helpers.each(context, options); - } else { - return inverse(this); - } - } else { - if (options.data && options.ids) { - var data = _utils.createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); - options = { data: data }; - } - - return fn(context, options); - } - }); - }; - - module.exports = exports['default']; - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(global) {'use strict'; - - var _Object$keys = __webpack_require__(12)['default']; - - var _interopRequireDefault = __webpack_require__(2)['default']; - - exports.__esModule = true; - - var _utils = __webpack_require__(4); - - var _exception = __webpack_require__(5); - - var _exception2 = _interopRequireDefault(_exception); - - exports['default'] = function (instance) { - instance.registerHelper('each', function (context, options) { - if (!options) { - throw new _exception2['default']('Must pass iterator to #each'); - } - - var fn = options.fn, - inverse = options.inverse, - i = 0, - ret = '', - data = undefined, - contextPath = undefined; - - if (options.data && options.ids) { - contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; - } - - if (_utils.isFunction(context)) { - context = context.call(this); - } - - if (options.data) { - data = _utils.createFrame(options.data); - } - - function execIteration(field, index, last) { - if (data) { - data.key = field; - data.index = index; - data.first = index === 0; - data.last = !!last; - - if (contextPath) { - data.contextPath = contextPath + field; - } - } - - ret = ret + fn(context[field], { - data: data, - blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) - }); - } - - if (context && typeof context === 'object') { - if (_utils.isArray(context)) { - for (var j = context.length; i < j; i++) { - if (i in context) { - execIteration(i, i, i === context.length - 1); - } - } - } else if (global.Symbol && context[global.Symbol.iterator]) { - var newContext = []; - var iterator = context[global.Symbol.iterator](); - for (var it = iterator.next(); !it.done; it = iterator.next()) { - newContext.push(it.value); - } - context = newContext; - for (var j = context.length; i < j; i++) { - execIteration(i, i, i === context.length - 1); - } - } else { - (function () { - var priorKey = undefined; - - _Object$keys(context).forEach(function (key) { - // We're running the iterations one step out of sync so we can detect - // the last iteration without have to scan the object twice and create - // an itermediate keys array. - if (priorKey !== undefined) { - execIteration(priorKey, i - 1); - } - priorKey = key; - i++; - }); - if (priorKey !== undefined) { - execIteration(priorKey, i - 1, true); - } - })(); - } - } - - if (i === 0) { - ret = inverse(this); - } - - return ret; - }); - }; - - module.exports = exports['default']; - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(13), __esModule: true }; - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - - __webpack_require__(14); - module.exports = __webpack_require__(20).Object.keys; - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - - // 19.1.2.14 Object.keys(O) - var toObject = __webpack_require__(15); - - __webpack_require__(17)('keys', function($keys){ - return function keys(it){ - return $keys(toObject(it)); - }; - }); - -/***/ }), -/* 15 */ -/***/ (function(module, exports, __webpack_require__) { - - // 7.1.13 ToObject(argument) - var defined = __webpack_require__(16); - module.exports = function(it){ - return Object(defined(it)); - }; - -/***/ }), -/* 16 */ -/***/ (function(module, exports) { - - // 7.2.1 RequireObjectCoercible(argument) - module.exports = function(it){ - if(it == undefined)throw TypeError("Can't call method on " + it); - return it; - }; - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - - // most Object methods by ES6 should accept primitives - var $export = __webpack_require__(18) - , core = __webpack_require__(20) - , fails = __webpack_require__(23); - module.exports = function(KEY, exec){ - var fn = (core.Object || {})[KEY] || Object[KEY] - , exp = {}; - exp[KEY] = exec(fn); - $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); - }; - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - - var global = __webpack_require__(19) - , core = __webpack_require__(20) - , ctx = __webpack_require__(21) - , PROTOTYPE = 'prototype'; - - var $export = function(type, name, source){ - var IS_FORCED = type & $export.F - , IS_GLOBAL = type & $export.G - , IS_STATIC = type & $export.S - , IS_PROTO = type & $export.P - , IS_BIND = type & $export.B - , IS_WRAP = type & $export.W - , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) - , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] - , key, own, out; - if(IS_GLOBAL)source = name; - for(key in source){ - // contains in native - own = !IS_FORCED && target && key in target; - if(own && key in exports)continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] - // bind timers to global for call from export context - : IS_BIND && own ? ctx(out, global) - // wrap global constructors for prevent change them in library - : IS_WRAP && target[key] == out ? (function(C){ - var F = function(param){ - return this instanceof C ? new C(param) : C(param); - }; - F[PROTOTYPE] = C[PROTOTYPE]; - return F; - // make static versions for prototype methods - })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; - } - }; - // type bitmap - $export.F = 1; // forced - $export.G = 2; // global - $export.S = 4; // static - $export.P = 8; // proto - $export.B = 16; // bind - $export.W = 32; // wrap - module.exports = $export; - -/***/ }), -/* 19 */ -/***/ (function(module, exports) { - - // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 - var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); - if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef - -/***/ }), -/* 20 */ -/***/ (function(module, exports) { - - var core = module.exports = {version: '1.2.6'}; - if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - - // optional / simple context binding - var aFunction = __webpack_require__(22); - module.exports = function(fn, that, length){ - aFunction(fn); - if(that === undefined)return fn; - switch(length){ - case 1: return function(a){ - return fn.call(that, a); - }; - case 2: return function(a, b){ - return fn.call(that, a, b); - }; - case 3: return function(a, b, c){ - return fn.call(that, a, b, c); - }; - } - return function(/* ...args */){ - return fn.apply(that, arguments); - }; - }; - -/***/ }), -/* 22 */ -/***/ (function(module, exports) { - - module.exports = function(it){ - if(typeof it != 'function')throw TypeError(it + ' is not a function!'); - return it; - }; - -/***/ }), -/* 23 */ -/***/ (function(module, exports) { - - module.exports = function(exec){ - try { - return !!exec(); - } catch(e){ - return true; - } - }; - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(2)['default']; - - exports.__esModule = true; - - var _exception = __webpack_require__(5); - - var _exception2 = _interopRequireDefault(_exception); - - exports['default'] = function (instance) { - instance.registerHelper('helperMissing', function () /* [args, ]options */{ - if (arguments.length === 1) { - // A missing field in a {{foo}} construct. - return undefined; - } else { - // Someone is actually trying to call something, blow up. - throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); - } - }); - }; - - module.exports = exports['default']; - -/***/ }), -/* 25 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(2)['default']; - - exports.__esModule = true; - - var _utils = __webpack_require__(4); - - var _exception = __webpack_require__(5); - - var _exception2 = _interopRequireDefault(_exception); - - exports['default'] = function (instance) { - instance.registerHelper('if', function (conditional, options) { - if (arguments.length != 2) { - throw new _exception2['default']('#if requires exactly one argument'); - } - if (_utils.isFunction(conditional)) { - conditional = conditional.call(this); - } - - // Default behavior is to render the positive path if the value is truthy and not empty. - // The `includeZero` option may be set to treat the condtional as purely not empty based on the - // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. - if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { - return options.inverse(this); - } else { - return options.fn(this); - } - }); - - instance.registerHelper('unless', function (conditional, options) { - if (arguments.length != 2) { - throw new _exception2['default']('#unless requires exactly one argument'); - } - return instance.helpers['if'].call(this, conditional, { - fn: options.inverse, - inverse: options.fn, - hash: options.hash - }); - }); - }; - - module.exports = exports['default']; - -/***/ }), -/* 26 */ -/***/ (function(module, exports) { - - 'use strict'; - - exports.__esModule = true; - - exports['default'] = function (instance) { - instance.registerHelper('log', function () /* message, options */{ - var args = [undefined], - options = arguments[arguments.length - 1]; - for (var i = 0; i < arguments.length - 1; i++) { - args.push(arguments[i]); - } - - var level = 1; - if (options.hash.level != null) { - level = options.hash.level; - } else if (options.data && options.data.level != null) { - level = options.data.level; - } - args[0] = level; - - instance.log.apply(instance, args); - }); - }; - - module.exports = exports['default']; - -/***/ }), -/* 27 */ -/***/ (function(module, exports) { - - 'use strict'; - - exports.__esModule = true; - - exports['default'] = function (instance) { - instance.registerHelper('lookup', function (obj, field, options) { - if (!obj) { - // Note for 5.0: Change to "obj == null" in 5.0 - return obj; - } - return options.lookupProperty(obj, field); - }); - }; - - module.exports = exports['default']; - -/***/ }), -/* 28 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(2)['default']; - - exports.__esModule = true; - - var _utils = __webpack_require__(4); - - var _exception = __webpack_require__(5); - - var _exception2 = _interopRequireDefault(_exception); - - exports['default'] = function (instance) { - instance.registerHelper('with', function (context, options) { - if (arguments.length != 2) { - throw new _exception2['default']('#with requires exactly one argument'); - } - if (_utils.isFunction(context)) { - context = context.call(this); - } - - var fn = options.fn; - - if (!_utils.isEmpty(context)) { - var data = options.data; - if (options.data && options.ids) { - data = _utils.createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); - } - - return fn(context, { - data: data, - blockParams: _utils.blockParams([context], [data && data.contextPath]) - }); - } else { - return options.inverse(this); - } - }); - }; - - module.exports = exports['default']; - -/***/ }), -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = __webpack_require__(2)['default']; - - exports.__esModule = true; - exports.registerDefaultDecorators = registerDefaultDecorators; - - var _decoratorsInline = __webpack_require__(30); - - var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); - - function registerDefaultDecorators(instance) { - _decoratorsInline2['default'](instance); - } - -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _utils = __webpack_require__(4); - - exports['default'] = function (instance) { - instance.registerDecorator('inline', function (fn, props, container, options) { - var ret = fn; - if (!props.partials) { - props.partials = {}; - ret = function (context, options) { - // Create a new partials stack frame prior to exec. - var original = container.partials; - container.partials = _utils.extend({}, original, props.partials); - var ret = fn(context, options); - container.partials = original; - return ret; - }; - } - - props.partials[options.args[0]] = options.fn; - - return ret; - }); - }; - - module.exports = exports['default']; - -/***/ }), -/* 31 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _utils = __webpack_require__(4); - - var logger = { - methodMap: ['debug', 'info', 'warn', 'error'], - level: 'info', - - // Maps a given level value to the `methodMap` indexes above. - lookupLevel: function lookupLevel(level) { - if (typeof level === 'string') { - var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); - if (levelMap >= 0) { - level = levelMap; - } else { - level = parseInt(level, 10); - } - } - - return level; - }, - - // Can be overridden in the host environment - log: function log(level) { - level = logger.lookupLevel(level); - - if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { - var method = logger.methodMap[level]; - // eslint-disable-next-line no-console - if (!console[method]) { - method = 'log'; - } - - for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - message[_key - 1] = arguments[_key]; - } - - console[method].apply(console, message); // eslint-disable-line no-console - } - } - }; - - exports['default'] = logger; - module.exports = exports['default']; - -/***/ }), -/* 32 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _Object$create = __webpack_require__(33)['default']; - - var _Object$keys = __webpack_require__(12)['default']; - - var _interopRequireWildcard = __webpack_require__(1)['default']; - - exports.__esModule = true; - exports.createProtoAccessControl = createProtoAccessControl; - exports.resultIsAllowed = resultIsAllowed; - exports.resetLoggedProperties = resetLoggedProperties; - - var _createNewLookupObject = __webpack_require__(35); - - var _logger = __webpack_require__(31); - - var logger = _interopRequireWildcard(_logger); - - var loggedProperties = _Object$create(null); - - function createProtoAccessControl(runtimeOptions) { - var defaultMethodWhiteList = _Object$create(null); - defaultMethodWhiteList['constructor'] = false; - defaultMethodWhiteList['__defineGetter__'] = false; - defaultMethodWhiteList['__defineSetter__'] = false; - defaultMethodWhiteList['__lookupGetter__'] = false; - - var defaultPropertyWhiteList = _Object$create(null); - // eslint-disable-next-line no-proto - defaultPropertyWhiteList['__proto__'] = false; - - return { - properties: { - whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties), - defaultValue: runtimeOptions.allowProtoPropertiesByDefault - }, - methods: { - whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods), - defaultValue: runtimeOptions.allowProtoMethodsByDefault - } - }; - } - - function resultIsAllowed(result, protoAccessControl, propertyName) { - if (typeof result === 'function') { - return checkWhiteList(protoAccessControl.methods, propertyName); - } else { - return checkWhiteList(protoAccessControl.properties, propertyName); - } - } - - function checkWhiteList(protoAccessControlForType, propertyName) { - if (protoAccessControlForType.whitelist[propertyName] !== undefined) { - return protoAccessControlForType.whitelist[propertyName] === true; - } - if (protoAccessControlForType.defaultValue !== undefined) { - return protoAccessControlForType.defaultValue; - } - logUnexpecedPropertyAccessOnce(propertyName); - return false; - } - - function logUnexpecedPropertyAccessOnce(propertyName) { - if (loggedProperties[propertyName] !== true) { - loggedProperties[propertyName] = true; - logger.log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'); - } - } - - function resetLoggedProperties() { - _Object$keys(loggedProperties).forEach(function (propertyName) { - delete loggedProperties[propertyName]; - }); - } - -/***/ }), -/* 33 */ -/***/ (function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(34), __esModule: true }; - -/***/ }), -/* 34 */ -/***/ (function(module, exports, __webpack_require__) { - - var $ = __webpack_require__(8); - module.exports = function create(P, D){ - return $.create(P, D); - }; - -/***/ }), -/* 35 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _Object$create = __webpack_require__(33)['default']; - - exports.__esModule = true; - exports.createNewLookupObject = createNewLookupObject; - - var _utils = __webpack_require__(4); - - /** - * Create a new object with "null"-prototype to avoid truthy results on prototype properties. - * The resulting object can be used with "object[property]" to check if a property exists - * @param {...object} sources a varargs parameter of source objects that will be merged - * @returns {object} - */ - - function createNewLookupObject() { - for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) { - sources[_key] = arguments[_key]; - } - - return _utils.extend.apply(undefined, [_Object$create(null)].concat(sources)); - } - -/***/ }), -/* 36 */ -/***/ (function(module, exports) { - - // Build out our basic SafeString type - 'use strict'; - - exports.__esModule = true; - function SafeString(string) { - this.string = string; - } - - SafeString.prototype.toString = SafeString.prototype.toHTML = function () { - return '' + this.string; - }; - - exports['default'] = SafeString; - module.exports = exports['default']; - -/***/ }), -/* 37 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var _Object$seal = __webpack_require__(38)['default']; - - var _Object$keys = __webpack_require__(12)['default']; - - var _interopRequireWildcard = __webpack_require__(1)['default']; - - var _interopRequireDefault = __webpack_require__(2)['default']; - - exports.__esModule = true; - exports.checkRevision = checkRevision; - exports.template = template; - exports.wrapProgram = wrapProgram; - exports.resolvePartial = resolvePartial; - exports.invokePartial = invokePartial; - exports.noop = noop; - - var _utils = __webpack_require__(4); - - var Utils = _interopRequireWildcard(_utils); - - var _exception = __webpack_require__(5); - - var _exception2 = _interopRequireDefault(_exception); - - var _base = __webpack_require__(3); - - var _helpers = __webpack_require__(9); - - var _internalWrapHelper = __webpack_require__(42); - - var _internalProtoAccess = __webpack_require__(32); - - function checkRevision(compilerInfo) { - var compilerRevision = compilerInfo && compilerInfo[0] || 1, - currentRevision = _base.COMPILER_REVISION; - - if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) { - return; - } - - if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) { - var runtimeVersions = _base.REVISION_CHANGES[currentRevision], - compilerVersions = _base.REVISION_CHANGES[compilerRevision]; - throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); - } else { - // Use the embedded version info since the runtime doesn't know about this revision yet - throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); - } - } - - function template(templateSpec, env) { - /* istanbul ignore next */ - if (!env) { - throw new _exception2['default']('No environment passed to template'); - } - if (!templateSpec || !templateSpec.main) { - throw new _exception2['default']('Unknown template object: ' + typeof templateSpec); - } - - templateSpec.main.decorator = templateSpec.main_d; - - // Note: Using env.VM references rather than local var references throughout this section to allow - // for external users to override these as pseudo-supported APIs. - env.VM.checkRevision(templateSpec.compiler); - - // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0) - var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7; - - function invokePartialWrapper(partial, context, options) { - if (options.hash) { - context = Utils.extend({}, context, options.hash); - if (options.ids) { - options.ids[0] = true; - } - } - partial = env.VM.resolvePartial.call(this, partial, context, options); - - var extendedOptions = Utils.extend({}, options, { - hooks: this.hooks, - protoAccessControl: this.protoAccessControl - }); - - var result = env.VM.invokePartial.call(this, partial, context, extendedOptions); - - if (result == null && env.compile) { - options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); - result = options.partials[options.name](context, extendedOptions); - } - if (result != null) { - if (options.indent) { - var lines = result.split('\n'); - for (var i = 0, l = lines.length; i < l; i++) { - if (!lines[i] && i + 1 === l) { - break; - } - - lines[i] = options.indent + lines[i]; - } - result = lines.join('\n'); - } - return result; - } else { - throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); - } - } - - // Just add water - var container = { - strict: function strict(obj, name, loc) { - if (!obj || !(name in obj)) { - throw new _exception2['default']('"' + name + '" not defined in ' + obj, { - loc: loc - }); - } - return container.lookupProperty(obj, name); - }, - lookupProperty: function lookupProperty(parent, propertyName) { - var result = parent[propertyName]; - if (result == null) { - return result; - } - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return result; - } - - if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) { - return result; - } - return undefined; - }, - lookup: function lookup(depths, name) { - var len = depths.length; - for (var i = 0; i < len; i++) { - var result = depths[i] && container.lookupProperty(depths[i], name); - if (result != null) { - return depths[i][name]; - } - } - }, - lambda: function lambda(current, context) { - return typeof current === 'function' ? current.call(context) : current; - }, - - escapeExpression: Utils.escapeExpression, - invokePartial: invokePartialWrapper, - - fn: function fn(i) { - var ret = templateSpec[i]; - ret.decorator = templateSpec[i + '_d']; - return ret; - }, - - programs: [], - program: function program(i, data, declaredBlockParams, blockParams, depths) { - var programWrapper = this.programs[i], - fn = this.fn(i); - if (data || depths || blockParams || declaredBlockParams) { - programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); - } else if (!programWrapper) { - programWrapper = this.programs[i] = wrapProgram(this, i, fn); - } - return programWrapper; - }, - - data: function data(value, depth) { - while (value && depth--) { - value = value._parent; - } - return value; - }, - mergeIfNeeded: function mergeIfNeeded(param, common) { - var obj = param || common; - - if (param && common && param !== common) { - obj = Utils.extend({}, common, param); - } - - return obj; - }, - // An empty object to use as replacement for null-contexts - nullContext: _Object$seal({}), - - noop: env.VM.noop, - compilerInfo: templateSpec.compiler - }; - - function ret(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var data = options.data; - - ret._setup(options); - if (!options.partial && templateSpec.useData) { - data = initData(context, data); - } - var depths = undefined, - blockParams = templateSpec.useBlockParams ? [] : undefined; - if (templateSpec.useDepths) { - if (options.depths) { - depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths; - } else { - depths = [context]; - } - } - - function main(context /*, options*/) { - return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); - } - - main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); - return main(context, options); - } - - ret.isTop = true; - - ret._setup = function (options) { - if (!options.partial) { - var mergedHelpers = Utils.extend({}, env.helpers, options.helpers); - wrapHelpersToPassLookupProperty(mergedHelpers, container); - container.helpers = mergedHelpers; - - if (templateSpec.usePartial) { - // Use mergeIfNeeded here to prevent compiling global partials multiple times - container.partials = container.mergeIfNeeded(options.partials, env.partials); - } - if (templateSpec.usePartial || templateSpec.useDecorators) { - container.decorators = Utils.extend({}, env.decorators, options.decorators); - } - - container.hooks = {}; - container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options); - - var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7; - _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers); - _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers); - } else { - container.protoAccessControl = options.protoAccessControl; // internal option - container.helpers = options.helpers; - container.partials = options.partials; - container.decorators = options.decorators; - container.hooks = options.hooks; - } - }; - - ret._child = function (i, data, blockParams, depths) { - if (templateSpec.useBlockParams && !blockParams) { - throw new _exception2['default']('must pass block params'); - } - if (templateSpec.useDepths && !depths) { - throw new _exception2['default']('must pass parent depths'); - } - - return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); - }; - return ret; - } - - function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { - function prog(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var currentDepths = depths; - if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) { - currentDepths = [context].concat(depths); - } - - return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); - } - - prog = executeDecorators(fn, prog, container, depths, data, blockParams); - - prog.program = i; - prog.depth = depths ? depths.length : 0; - prog.blockParams = declaredBlockParams || 0; - return prog; - } - - /** - * This is currently part of the official API, therefore implementation details should not be changed. - */ - - function resolvePartial(partial, context, options) { - if (!partial) { - if (options.name === '@partial-block') { - partial = options.data['partial-block']; - } else { - partial = options.partials[options.name]; - } - } else if (!partial.call && !options.name) { - // This is a dynamic partial that returned a string - options.name = partial; - partial = options.partials[partial]; - } - return partial; - } - - function invokePartial(partial, context, options) { - // Use the current closure context to save the partial-block if this partial - var currentPartialBlock = options.data && options.data['partial-block']; - options.partial = true; - if (options.ids) { - options.data.contextPath = options.ids[0] || options.data.contextPath; - } - - var partialBlock = undefined; - if (options.fn && options.fn !== noop) { - (function () { - options.data = _base.createFrame(options.data); - // Wrapper function to get access to currentPartialBlock from the closure - var fn = options.fn; - partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - // Restore the partial-block from the closure for the execution of the block - // i.e. the part inside the block of the partial call. - options.data = _base.createFrame(options.data); - options.data['partial-block'] = currentPartialBlock; - return fn(context, options); - }; - if (fn.partials) { - options.partials = Utils.extend({}, options.partials, fn.partials); - } - })(); - } - - if (partial === undefined && partialBlock) { - partial = partialBlock; - } - - if (partial === undefined) { - throw new _exception2['default']('The partial ' + options.name + ' could not be found'); - } else if (partial instanceof Function) { - return partial(context, options); - } - } - - function noop() { - return ''; - } - - function initData(context, data) { - if (!data || !('root' in data)) { - data = data ? _base.createFrame(data) : {}; - data.root = context; - } - return data; - } - - function executeDecorators(fn, prog, container, depths, data, blockParams) { - if (fn.decorator) { - var props = {}; - prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); - Utils.extend(prog, props); - } - return prog; - } - - function wrapHelpersToPassLookupProperty(mergedHelpers, container) { - _Object$keys(mergedHelpers).forEach(function (helperName) { - var helper = mergedHelpers[helperName]; - mergedHelpers[helperName] = passLookupPropertyOption(helper, container); - }); - } - - function passLookupPropertyOption(helper, container) { - var lookupProperty = container.lookupProperty; - return _internalWrapHelper.wrapHelper(helper, function (options) { - return Utils.extend({ lookupProperty: lookupProperty }, options); - }); - } - -/***/ }), -/* 38 */ -/***/ (function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(39), __esModule: true }; - -/***/ }), -/* 39 */ -/***/ (function(module, exports, __webpack_require__) { - - __webpack_require__(40); - module.exports = __webpack_require__(20).Object.seal; - -/***/ }), -/* 40 */ -/***/ (function(module, exports, __webpack_require__) { - - // 19.1.2.17 Object.seal(O) - var isObject = __webpack_require__(41); - - __webpack_require__(17)('seal', function($seal){ - return function seal(it){ - return $seal && isObject(it) ? $seal(it) : it; - }; - }); - -/***/ }), -/* 41 */ -/***/ (function(module, exports) { - - module.exports = function(it){ - return typeof it === 'object' ? it !== null : typeof it === 'function'; - }; - -/***/ }), -/* 42 */ -/***/ (function(module, exports) { - - 'use strict'; - - exports.__esModule = true; - exports.wrapHelper = wrapHelper; - - function wrapHelper(helper, transformOptionsFn) { - if (typeof helper !== 'function') { - // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639 - // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function. - return helper; - } - var wrapper = function wrapper() /* dynamic arguments */{ - var options = arguments[arguments.length - 1]; - arguments[arguments.length - 1] = transformOptionsFn(options); - return helper.apply(this, arguments); - }; - return wrapper; - } - -/***/ }), -/* 43 */ -/***/ (function(module, exports) { - - /* WEBPACK VAR INJECTION */(function(global) {'use strict'; - - exports.__esModule = true; - - exports['default'] = function (Handlebars) { - /* istanbul ignore next */ - var root = typeof global !== 'undefined' ? global : window, - $Handlebars = root.Handlebars; - /* istanbul ignore next */ - Handlebars.noConflict = function () { - if (root.Handlebars === Handlebars) { - root.Handlebars = $Handlebars; - } - return Handlebars; - }; - }; - - module.exports = exports['default']; - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - -/***/ }) -/******/ ]) -}); -; \ No newline at end of file diff --git a/node_modules/handlebars/dist/handlebars.runtime.min.js b/node_modules/handlebars/dist/handlebars.runtime.min.js deleted file mode 100644 index 72ffad6c..00000000 --- a/node_modules/handlebars/dist/handlebars.runtime.min.js +++ /dev/null @@ -1,27 +0,0 @@ -/**! - - @license - handlebars v4.7.7 - -Copyright (C) 2011-2019 by Yehuda Katz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ -!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(1)["default"],f=c(2)["default"];b.__esModule=!0;var g=c(3),h=e(g),i=c(36),j=f(i),k=c(5),l=f(k),m=c(4),n=e(m),o=c(37),p=e(o),q=c(43),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(2)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(4),g=c(5),h=e(g),i=c(9),j=c(29),k=c(31),l=e(k),m=c(32),n="4.7.7";b.VERSION=n;var o=8;b.COMPILER_REVISION=o;var p=7;b.LAST_COMPATIBLE_COMPILER_REVISION=p;var q={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};b.REVISION_CHANGES=q;var r="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===r)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){m.resetLoggedProperties()}};var s=l["default"].log;b.log=s,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function e(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function f(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return m.test(a)?a.replace(l,c):a}function g(a){return!a&&0!==a||!(!p(a)||0!==a.length)}function h(a){var b=d({},a);return b._parent=a,b}function i(a,b){return a.path=b,a}function j(a,b){return(a?a+".":"")+b}b.__esModule=!0,b.extend=d,b.indexOf=e,b.escapeExpression=f,b.isEmpty=g,b.createFrame=h,b.blockParams=i,b.appendContextPath=j;var k={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===n.call(a)};b.isArray=p},function(a,b,c){"use strict";function d(a,b){var c=b&&b.loc,g=void 0,h=void 0,i=void 0,j=void 0;c&&(g=c.start.line,h=c.end.line,i=c.start.column,j=c.end.column,a+=" - "+g+":"+i);for(var k=Error.prototype.constructor.call(this,a),l=0;l<f.length;l++)this[f[l]]=k[f[l]];Error.captureStackTrace&&Error.captureStackTrace(this,d);try{c&&(this.lineNumber=g,this.endLineNumber=h,e?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:j,enumerable:!0})):(this.column=i,this.endColumn=j))}catch(m){}}var e=c(6)["default"];b.__esModule=!0;var f=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];d.prototype=new Error,b["default"]=d,a.exports=b["default"]},function(a,b,c){a.exports={"default":c(7),__esModule:!0}},function(a,b,c){var d=c(8);a.exports=function(a,b,c){return d.setDesc(a,b,c)}},function(a,b){var c=Object;a.exports={create:c.create,getProto:c.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:c.getOwnPropertyDescriptor,setDesc:c.defineProperty,setDescs:c.defineProperties,getKeys:c.keys,getNames:c.getOwnPropertyNames,getSymbols:c.getOwnPropertySymbols,each:[].forEach}},function(a,b,c){"use strict";function d(a){h["default"](a),j["default"](a),l["default"](a),n["default"](a),p["default"](a),r["default"](a),t["default"](a)}function e(a,b,c){a.helpers[b]&&(a.hooks[b]=a.helpers[b],c||delete a.helpers[b])}var f=c(2)["default"];b.__esModule=!0,b.registerDefaultHelpers=d,b.moveHelperToHooks=e;var g=c(10),h=f(g),i=c(11),j=f(i),k=c(24),l=f(k),m=c(25),n=f(m),o=c(26),p=f(o),q=c(27),r=f(q),s=c(28),t=f(s)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(4);b["default"]=function(a){a.registerHelper("blockHelperMissing",function(b,c){var e=c.inverse,f=c.fn;if(b===!0)return f(this);if(b===!1||null==b)return e(this);if(d.isArray(b))return b.length>0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){(function(d){"use strict";var e=c(12)["default"],f=c(2)["default"];b.__esModule=!0;var g=c(4),h=c(5),i=f(h);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,d){l&&(l.key=b,l.index=c,l.first=0===c,l.last=!!d,m&&(l.contextPath=m+b)),k+=f(a[b],{data:l,blockParams:g.blockParams([a[b],b],[m+b,null])})}if(!b)throw new i["default"]("Must pass iterator to #each");var f=b.fn,h=b.inverse,j=0,k="",l=void 0,m=void 0;if(b.data&&b.ids&&(m=g.appendContextPath(b.data.contextPath,b.ids[0])+"."),g.isFunction(a)&&(a=a.call(this)),b.data&&(l=g.createFrame(b.data)),a&&"object"==typeof a)if(g.isArray(a))for(var n=a.length;j<n;j++)j in a&&c(j,j,j===a.length-1);else if(d.Symbol&&a[d.Symbol.iterator]){for(var o=[],p=a[d.Symbol.iterator](),q=p.next();!q.done;q=p.next())o.push(q.value);a=o;for(var n=a.length;j<n;j++)c(j,j,j===a.length-1)}else!function(){var b=void 0;e(a).forEach(function(a){void 0!==b&&c(b,j-1),b=a,j++}),void 0!==b&&c(b,j-1,!0)}();return 0===j&&(k=h(this)),k})},a.exports=b["default"]}).call(b,function(){return this}())},function(a,b,c){a.exports={"default":c(13),__esModule:!0}},function(a,b,c){c(14),a.exports=c(20).Object.keys},function(a,b,c){var d=c(15);c(17)("keys",function(a){return function(b){return a(d(b))}})},function(a,b,c){var d=c(16);a.exports=function(a){return Object(d(a))}},function(a,b){a.exports=function(a){if(void 0==a)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(18),e=c(20),f=c(23);a.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},function(a,b,c){var d=c(19),e=c(20),f=c(21),g="prototype",h=function(a,b,c){var i,j,k,l=a&h.F,m=a&h.G,n=a&h.S,o=a&h.P,p=a&h.B,q=a&h.W,r=m?e:e[b]||(e[b]={}),s=m?d:n?d[b]:(d[b]||{})[g];m&&(c=b);for(i in c)j=!l&&s&&i in s,j&&i in r||(k=j?s[i]:c[i],r[i]=m&&"function"!=typeof s[i]?c[i]:p&&j?f(k,d):q&&s[i]==k?function(a){var b=function(b){return this instanceof a?new a(b):a(b)};return b[g]=a[g],b}(k):o&&"function"==typeof k?f(Function.call,k):k,o&&((r[g]||(r[g]={}))[i]=k))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,a.exports=h},function(a,b){var c=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=c)},function(a,b){var c=a.exports={version:"1.2.6"};"number"==typeof __e&&(__e=c)},function(a,b,c){var d=c(22);a.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b,c){"use strict";var d=c(2)["default"];b.__esModule=!0;var e=c(5),f=d(e);b["default"]=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new f["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(2)["default"];b.__esModule=!0;var e=c(4),f=c(5),g=d(f);b["default"]=function(a){a.registerHelper("if",function(a,b){if(2!=arguments.length)throw new g["default"]("#if requires exactly one argument");return e.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||e.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){if(2!=arguments.length)throw new g["default"]("#unless requires exactly one argument");return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d<arguments.length-1;d++)b.push(arguments[d]);var e=1;null!=c.hash.level?e=c.hash.level:c.data&&null!=c.data.level&&(e=c.data.level),b[0]=e,a.log.apply(a,b)})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("lookup",function(a,b,c){return a?c.lookupProperty(a,b):a})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(2)["default"];b.__esModule=!0;var e=c(4),f=c(5),g=d(f);b["default"]=function(a){a.registerHelper("with",function(a,b){if(2!=arguments.length)throw new g["default"]("#with requires exactly one argument");e.isFunction(a)&&(a=a.call(this));var c=b.fn;if(e.isEmpty(a))return b.inverse(this);var d=b.data;return b.data&&b.ids&&(d=e.createFrame(b.data),d.contextPath=e.appendContextPath(b.data.contextPath,b.ids[0])),c(a,{data:d,blockParams:e.blockParams([a],[d&&d.contextPath])})})},a.exports=b["default"]},function(a,b,c){"use strict";function d(a){g["default"](a)}var e=c(2)["default"];b.__esModule=!0,b.registerDefaultDecorators=d;var f=c(30),g=e(f)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(4);b["default"]=function(a){a.registerDecorator("inline",function(a,b,c,e){var f=a;return b.partials||(b.partials={},f=function(e,f){var g=c.partials;c.partials=d.extend({},g,b.partials);var h=a(e,f);return c.partials=g,h}),b.partials[e.args[0]]=e.fn,f})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(4),e={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(a){if("string"==typeof a){var b=d.indexOf(e.methodMap,a.toLowerCase());a=b>=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];console[b].apply(console,d)}}};b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=i(null);b.constructor=!1,b.__defineGetter__=!1,b.__defineSetter__=!1,b.__lookupGetter__=!1;var c=i(null);return c.__proto__=!1,{properties:{whitelist:l.createNewLookupObject(c,a.allowedProtoProperties),defaultValue:a.allowProtoPropertiesByDefault},methods:{whitelist:l.createNewLookupObject(b,a.allowedProtoMethods),defaultValue:a.allowProtoMethodsByDefault}}}function e(a,b,c){return"function"==typeof a?f(b.methods,c):f(b.properties,c)}function f(a,b){return void 0!==a.whitelist[b]?a.whitelist[b]===!0:void 0!==a.defaultValue?a.defaultValue:(g(b),!1)}function g(a){o[a]!==!0&&(o[a]=!0,n.log("error",'Handlebars: Access has been denied to resolve the property "'+a+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}function h(){j(o).forEach(function(a){delete o[a]})}var i=c(33)["default"],j=c(12)["default"],k=c(1)["default"];b.__esModule=!0,b.createProtoAccessControl=d,b.resultIsAllowed=e,b.resetLoggedProperties=h;var l=c(35),m=c(31),n=k(m),o=i(null)},function(a,b,c){a.exports={"default":c(34),__esModule:!0}},function(a,b,c){var d=c(8);a.exports=function(a,b){return d.create(a,b)}},function(a,b,c){"use strict";function d(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return f.extend.apply(void 0,[e(null)].concat(b))}var e=c(33)["default"];b.__esModule=!0,b.createNewLookupObject=d;var f=c(4)},function(a,b){"use strict";function c(a){this.string=a}b.__esModule=!0,c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=v.COMPILER_REVISION;if(!(b>=v.LAST_COMPATIBLE_COMPILER_REVISION&&b<=v.COMPILER_REVISION)){if(b<v.LAST_COMPATIBLE_COMPILER_REVISION){var d=v.REVISION_CHANGES[c],e=v.REVISION_CHANGES[b];throw new u["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new u["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){function c(c,d,e){e.hash&&(d=s.extend({},d,e.hash),e.ids&&(e.ids[0]=!0)),c=b.VM.resolvePartial.call(this,c,d,e);var f=s.extend({},e,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),g=b.VM.invokePartial.call(this,c,d,f);if(null==g&&b.compile&&(e.partials[e.name]=b.compile(c,a.compilerOptions,b),g=e.partials[e.name](d,f)),null!=g){if(e.indent){for(var h=g.split("\n"),i=0,j=h.length;i<j&&(h[i]||i+1!==j);i++)h[i]=e.indent+h[i];g=h.join("\n")}return g}throw new u["default"]("The partial "+e.name+" could not be compiled when running in runtime-only mode")}function d(b){function c(b){return""+a.main(g,b,g.helpers,g.partials,f,i,h)}var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],f=e.data;d._setup(e),!e.partial&&a.useData&&(f=j(b,f));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=e.depths?b!=e.depths[0]?[b].concat(e.depths):e.depths:[b]),(c=k(a.main,c,g,e.depths||[],f,i))(b,e)}if(!b)throw new u["default"]("No environment passed to template");if(!a||!a.main)throw new u["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,b.VM.checkRevision(a.compiler);var e=a.compiler&&7===a.compiler[0],g={strict:function(a,b,c){if(!(a&&b in a))throw new u["default"]('"'+b+'" not defined in '+a,{loc:c});return g.lookupProperty(a,b)},lookupProperty:function(a,b){var c=a[b];return null==c?c:Object.prototype.hasOwnProperty.call(a,b)?c:y.resultIsAllowed(c,g.protoAccessControl,b)?c:void 0},lookup:function(a,b){for(var c=a.length,d=0;d<c;d++){var e=a[d]&&g.lookupProperty(a[d],b);if(null!=e)return a[d][b]}},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:s.escapeExpression,invokePartial:c,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var g=this.programs[a],h=this.fn(a);return b||e||d||c?g=f(this,a,h,b,c,d,e):g||(g=this.programs[a]=f(this,a,h)),g},data:function(a,b){for(;a&&b--;)a=a._parent;return a},mergeIfNeeded:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=s.extend({},b,a)),c},nullContext:n({}),noop:b.VM.noop,compilerInfo:a.compiler};return d.isTop=!0,d._setup=function(c){if(c.partial)g.protoAccessControl=c.protoAccessControl,g.helpers=c.helpers,g.partials=c.partials,g.decorators=c.decorators,g.hooks=c.hooks;else{var d=s.extend({},b.helpers,c.helpers);l(d,g),g.helpers=d,a.usePartial&&(g.partials=g.mergeIfNeeded(c.partials,b.partials)),(a.usePartial||a.useDecorators)&&(g.decorators=s.extend({},b.decorators,c.decorators)),g.hooks={},g.protoAccessControl=y.createProtoAccessControl(c);var f=c.allowCallsToHelperMissing||e;w.moveHelperToHooks(g,"helperMissing",f),w.moveHelperToHooks(g,"blockHelperMissing",f)}},d._child=function(b,c,d,e){if(a.useBlockParams&&!d)throw new u["default"]("must pass block params");if(a.useDepths&&!e)throw new u["default"]("must pass parent depths");return f(g,b,a[b],c,0,d,e)},d}function f(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return!g||b==g[0]||b===a.nullContext&&null===g[0]||(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=k(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function g(a,b,c){return a?a.call||c.name||(c.name=a,a=c.partials[a]):a="@partial-block"===c.name?c.data["partial-block"]:c.partials[c.name],a}function h(a,b,c){var d=c.data&&c.data["partial-block"];c.partial=!0,c.ids&&(c.data.contextPath=c.ids[0]||c.data.contextPath);var e=void 0;if(c.fn&&c.fn!==i&&!function(){c.data=v.createFrame(c.data);var a=c.fn;e=c.data["partial-block"]=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return c.data=v.createFrame(c.data),c.data["partial-block"]=d,a(b,c)},a.partials&&(c.partials=s.extend({},c.partials,a.partials))}(),void 0===a&&e&&(a=e),void 0===a)throw new u["default"]("The partial "+c.name+" could not be found");if(a instanceof Function)return a(b,c)}function i(){return""}function j(a,b){return b&&"root"in b||(b=b?v.createFrame(b):{},b.root=a),b}function k(a,b,c,d,e,f){if(a.decorator){var g={};b=a.decorator(b,g,c,d&&d[0],e,f,d),s.extend(b,g)}return b}function l(a,b){o(a).forEach(function(c){var d=a[c];a[c]=m(d,b)})}function m(a,b){var c=b.lookupProperty;return x.wrapHelper(a,function(a){return s.extend({lookupProperty:c},a)})}var n=c(38)["default"],o=c(12)["default"],p=c(1)["default"],q=c(2)["default"];b.__esModule=!0,b.checkRevision=d,b.template=e,b.wrapProgram=f,b.resolvePartial=g,b.invokePartial=h,b.noop=i;var r=c(4),s=p(r),t=c(5),u=q(t),v=c(3),w=c(9),x=c(42),y=c(32)},function(a,b,c){a.exports={"default":c(39),__esModule:!0}},function(a,b,c){c(40),a.exports=c(20).Object.seal},function(a,b,c){var d=c(41);c(17)("seal",function(a){return function(b){return a&&d(b)?a(b):b}})},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b){"use strict";function c(a,b){if("function"!=typeof a)return a;var c=function(){var c=arguments[arguments.length-1];return arguments[arguments.length-1]=b(c),a.apply(this,arguments)};return c}b.__esModule=!0,b.wrapHelper=c},function(a,b){(function(c){"use strict";b.__esModule=!0,b["default"]=function(a){var b="undefined"!=typeof c?c:window,d=b.Handlebars;a.noConflict=function(){return b.Handlebars===a&&(b.Handlebars=d),a}},a.exports=b["default"]}).call(b,function(){return this}())}])}); \ No newline at end of file diff --git a/node_modules/handlebars/lib/handlebars.js b/node_modules/handlebars/lib/handlebars.js deleted file mode 100644 index c4f8fc78..00000000 --- a/node_modules/handlebars/lib/handlebars.js +++ /dev/null @@ -1,46 +0,0 @@ -import runtime from './handlebars.runtime'; - -// Compiler imports -import AST from './handlebars/compiler/ast'; -import { - parser as Parser, - parse, - parseWithoutProcessing -} from './handlebars/compiler/base'; -import { Compiler, compile, precompile } from './handlebars/compiler/compiler'; -import JavaScriptCompiler from './handlebars/compiler/javascript-compiler'; -import Visitor from './handlebars/compiler/visitor'; - -import noConflict from './handlebars/no-conflict'; - -let _create = runtime.create; -function create() { - let hb = _create(); - - hb.compile = function(input, options) { - return compile(input, options, hb); - }; - hb.precompile = function(input, options) { - return precompile(input, options, hb); - }; - - hb.AST = AST; - hb.Compiler = Compiler; - hb.JavaScriptCompiler = JavaScriptCompiler; - hb.Parser = Parser; - hb.parse = parse; - hb.parseWithoutProcessing = parseWithoutProcessing; - - return hb; -} - -let inst = create(); -inst.create = create; - -noConflict(inst); - -inst.Visitor = Visitor; - -inst['default'] = inst; - -export default inst; diff --git a/node_modules/handlebars/lib/handlebars.runtime.js b/node_modules/handlebars/lib/handlebars.runtime.js deleted file mode 100644 index 3d05b544..00000000 --- a/node_modules/handlebars/lib/handlebars.runtime.js +++ /dev/null @@ -1,37 +0,0 @@ -import * as base from './handlebars/base'; - -// Each of these augment the Handlebars object. No need to setup here. -// (This is done to easily share code between commonjs and browse envs) -import SafeString from './handlebars/safe-string'; -import Exception from './handlebars/exception'; -import * as Utils from './handlebars/utils'; -import * as runtime from './handlebars/runtime'; - -import noConflict from './handlebars/no-conflict'; - -// For compatibility and usage outside of module systems, make the Handlebars object a namespace -function create() { - let hb = new base.HandlebarsEnvironment(); - - Utils.extend(hb, base); - hb.SafeString = SafeString; - hb.Exception = Exception; - hb.Utils = Utils; - hb.escapeExpression = Utils.escapeExpression; - - hb.VM = runtime; - hb.template = function(spec) { - return runtime.template(spec, hb); - }; - - return hb; -} - -let inst = create(); -inst.create = create; - -noConflict(inst); - -inst['default'] = inst; - -export default inst; diff --git a/node_modules/handlebars/lib/handlebars/base.js b/node_modules/handlebars/lib/handlebars/base.js deleted file mode 100644 index 13bc32b0..00000000 --- a/node_modules/handlebars/lib/handlebars/base.js +++ /dev/null @@ -1,94 +0,0 @@ -import { createFrame, extend, toString } from './utils'; -import Exception from './exception'; -import { registerDefaultHelpers } from './helpers'; -import { registerDefaultDecorators } from './decorators'; -import logger from './logger'; -import { resetLoggedProperties } from './internal/proto-access'; - -export const VERSION = '4.7.7'; -export const COMPILER_REVISION = 8; -export const LAST_COMPATIBLE_COMPILER_REVISION = 7; - -export const REVISION_CHANGES = { - 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it - 2: '== 1.0.0-rc.3', - 3: '== 1.0.0-rc.4', - 4: '== 1.x.x', - 5: '== 2.0.0-alpha.x', - 6: '>= 2.0.0-beta.1', - 7: '>= 4.0.0 <4.3.0', - 8: '>= 4.3.0' -}; - -const objectType = '[object Object]'; - -export function HandlebarsEnvironment(helpers, partials, decorators) { - this.helpers = helpers || {}; - this.partials = partials || {}; - this.decorators = decorators || {}; - - registerDefaultHelpers(this); - registerDefaultDecorators(this); -} - -HandlebarsEnvironment.prototype = { - constructor: HandlebarsEnvironment, - - logger: logger, - log: logger.log, - - registerHelper: function(name, fn) { - if (toString.call(name) === objectType) { - if (fn) { - throw new Exception('Arg not supported with multiple helpers'); - } - extend(this.helpers, name); - } else { - this.helpers[name] = fn; - } - }, - unregisterHelper: function(name) { - delete this.helpers[name]; - }, - - registerPartial: function(name, partial) { - if (toString.call(name) === objectType) { - extend(this.partials, name); - } else { - if (typeof partial === 'undefined') { - throw new Exception( - `Attempting to register a partial called "${name}" as undefined` - ); - } - this.partials[name] = partial; - } - }, - unregisterPartial: function(name) { - delete this.partials[name]; - }, - - registerDecorator: function(name, fn) { - if (toString.call(name) === objectType) { - if (fn) { - throw new Exception('Arg not supported with multiple decorators'); - } - extend(this.decorators, name); - } else { - this.decorators[name] = fn; - } - }, - unregisterDecorator: function(name) { - delete this.decorators[name]; - }, - /** - * Reset the memory of illegal property accesses that have already been logged. - * @deprecated should only be used in handlebars test-cases - */ - resetLoggedPropertyAccesses() { - resetLoggedProperties(); - } -}; - -export let log = logger.log; - -export { createFrame, logger }; diff --git a/node_modules/handlebars/lib/handlebars/compiler/ast.js b/node_modules/handlebars/lib/handlebars/compiler/ast.js deleted file mode 100644 index d77629a5..00000000 --- a/node_modules/handlebars/lib/handlebars/compiler/ast.js +++ /dev/null @@ -1,32 +0,0 @@ -let AST = { - // Public API used to evaluate derived attributes regarding AST nodes - helpers: { - // a mustache is definitely a helper if: - // * it is an eligible helper, and - // * it has at least one parameter or hash segment - helperExpression: function(node) { - return ( - node.type === 'SubExpression' || - ((node.type === 'MustacheStatement' || - node.type === 'BlockStatement') && - !!((node.params && node.params.length) || node.hash)) - ); - }, - - scopedId: function(path) { - return /^\.|this\b/.test(path.original); - }, - - // an ID is simple if it only has one part, and that part is not - // `..` or `this`. - simpleId: function(path) { - return ( - path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth - ); - } - } -}; - -// Must be exported as an object rather than the root of the module as the jison lexer -// must modify the object to operate properly. -export default AST; diff --git a/node_modules/handlebars/lib/handlebars/compiler/base.js b/node_modules/handlebars/lib/handlebars/compiler/base.js deleted file mode 100644 index 1dd5af1a..00000000 --- a/node_modules/handlebars/lib/handlebars/compiler/base.js +++ /dev/null @@ -1,34 +0,0 @@ -import parser from './parser'; -import WhitespaceControl from './whitespace-control'; -import * as Helpers from './helpers'; -import { extend } from '../utils'; - -export { parser }; - -let yy = {}; -extend(yy, Helpers); - -export function parseWithoutProcessing(input, options) { - // Just return if an already-compiled AST was passed in. - if (input.type === 'Program') { - return input; - } - - parser.yy = yy; - - // Altering the shared object here, but this is ok as parser is a sync operation - yy.locInfo = function(locInfo) { - return new yy.SourceLocation(options && options.srcName, locInfo); - }; - - let ast = parser.parse(input); - - return ast; -} - -export function parse(input, options) { - let ast = parseWithoutProcessing(input, options); - let strip = new WhitespaceControl(options); - - return strip.accept(ast); -} diff --git a/node_modules/handlebars/lib/handlebars/compiler/code-gen.js b/node_modules/handlebars/lib/handlebars/compiler/code-gen.js deleted file mode 100644 index 4a174ba0..00000000 --- a/node_modules/handlebars/lib/handlebars/compiler/code-gen.js +++ /dev/null @@ -1,171 +0,0 @@ -/* global define */ -import { isArray } from '../utils'; - -let SourceNode; - -try { - /* istanbul ignore next */ - if (typeof define !== 'function' || !define.amd) { - // We don't support this in AMD environments. For these environments, we asusme that - // they are running on the browser and thus have no need for the source-map library. - let SourceMap = require('source-map'); - SourceNode = SourceMap.SourceNode; - } -} catch (err) { - /* NOP */ -} - -/* istanbul ignore if: tested but not covered in istanbul due to dist build */ -if (!SourceNode) { - SourceNode = function(line, column, srcFile, chunks) { - this.src = ''; - if (chunks) { - this.add(chunks); - } - }; - /* istanbul ignore next */ - SourceNode.prototype = { - add: function(chunks) { - if (isArray(chunks)) { - chunks = chunks.join(''); - } - this.src += chunks; - }, - prepend: function(chunks) { - if (isArray(chunks)) { - chunks = chunks.join(''); - } - this.src = chunks + this.src; - }, - toStringWithSourceMap: function() { - return { code: this.toString() }; - }, - toString: function() { - return this.src; - } - }; -} - -function castChunk(chunk, codeGen, loc) { - if (isArray(chunk)) { - let ret = []; - - for (let i = 0, len = chunk.length; i < len; i++) { - ret.push(codeGen.wrap(chunk[i], loc)); - } - return ret; - } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { - // Handle primitives that the SourceNode will throw up on - return chunk + ''; - } - return chunk; -} - -function CodeGen(srcFile) { - this.srcFile = srcFile; - this.source = []; -} - -CodeGen.prototype = { - isEmpty() { - return !this.source.length; - }, - prepend: function(source, loc) { - this.source.unshift(this.wrap(source, loc)); - }, - push: function(source, loc) { - this.source.push(this.wrap(source, loc)); - }, - - merge: function() { - let source = this.empty(); - this.each(function(line) { - source.add([' ', line, '\n']); - }); - return source; - }, - - each: function(iter) { - for (let i = 0, len = this.source.length; i < len; i++) { - iter(this.source[i]); - } - }, - - empty: function() { - let loc = this.currentLocation || { start: {} }; - return new SourceNode(loc.start.line, loc.start.column, this.srcFile); - }, - wrap: function(chunk, loc = this.currentLocation || { start: {} }) { - if (chunk instanceof SourceNode) { - return chunk; - } - - chunk = castChunk(chunk, this, loc); - - return new SourceNode( - loc.start.line, - loc.start.column, - this.srcFile, - chunk - ); - }, - - functionCall: function(fn, type, params) { - params = this.generateList(params); - return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); - }, - - quotedString: function(str) { - return ( - '"' + - (str + '') - .replace(/\\/g, '\\\\') - .replace(/"/g, '\\"') - .replace(/\n/g, '\\n') - .replace(/\r/g, '\\r') - .replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 - .replace(/\u2029/g, '\\u2029') + - '"' - ); - }, - - objectLiteral: function(obj) { - let pairs = []; - - Object.keys(obj).forEach(key => { - let value = castChunk(obj[key], this); - if (value !== 'undefined') { - pairs.push([this.quotedString(key), ':', value]); - } - }); - - let ret = this.generateList(pairs); - ret.prepend('{'); - ret.add('}'); - return ret; - }, - - generateList: function(entries) { - let ret = this.empty(); - - for (let i = 0, len = entries.length; i < len; i++) { - if (i) { - ret.add(','); - } - - ret.add(castChunk(entries[i], this)); - } - - return ret; - }, - - generateArray: function(entries) { - let ret = this.generateList(entries); - ret.prepend('['); - ret.add(']'); - - return ret; - } -}; - -export default CodeGen; diff --git a/node_modules/handlebars/lib/handlebars/compiler/compiler.js b/node_modules/handlebars/lib/handlebars/compiler/compiler.js deleted file mode 100644 index 33bd2b11..00000000 --- a/node_modules/handlebars/lib/handlebars/compiler/compiler.js +++ /dev/null @@ -1,594 +0,0 @@ -/* eslint-disable new-cap */ - -import Exception from '../exception'; -import { isArray, indexOf, extend } from '../utils'; -import AST from './ast'; - -const slice = [].slice; - -export function Compiler() {} - -// the foundHelper register will disambiguate helper lookup from finding a -// function in a context. This is necessary for mustache compatibility, which -// requires that context functions in blocks are evaluated by blockHelperMissing, -// and then proceed as if the resulting value was provided to blockHelperMissing. - -Compiler.prototype = { - compiler: Compiler, - - equals: function(other) { - let len = this.opcodes.length; - if (other.opcodes.length !== len) { - return false; - } - - for (let i = 0; i < len; i++) { - let opcode = this.opcodes[i], - otherOpcode = other.opcodes[i]; - if ( - opcode.opcode !== otherOpcode.opcode || - !argEquals(opcode.args, otherOpcode.args) - ) { - return false; - } - } - - // We know that length is the same between the two arrays because they are directly tied - // to the opcode behavior above. - len = this.children.length; - for (let i = 0; i < len; i++) { - if (!this.children[i].equals(other.children[i])) { - return false; - } - } - - return true; - }, - - guid: 0, - - compile: function(program, options) { - this.sourceNode = []; - this.opcodes = []; - this.children = []; - this.options = options; - this.stringParams = options.stringParams; - this.trackIds = options.trackIds; - - options.blockParams = options.blockParams || []; - - options.knownHelpers = extend( - Object.create(null), - { - helperMissing: true, - blockHelperMissing: true, - each: true, - if: true, - unless: true, - with: true, - log: true, - lookup: true - }, - options.knownHelpers - ); - - return this.accept(program); - }, - - compileProgram: function(program) { - let childCompiler = new this.compiler(), // eslint-disable-line new-cap - result = childCompiler.compile(program, this.options), - guid = this.guid++; - - this.usePartial = this.usePartial || result.usePartial; - - this.children[guid] = result; - this.useDepths = this.useDepths || result.useDepths; - - return guid; - }, - - accept: function(node) { - /* istanbul ignore next: Sanity code */ - if (!this[node.type]) { - throw new Exception('Unknown type: ' + node.type, node); - } - - this.sourceNode.unshift(node); - let ret = this[node.type](node); - this.sourceNode.shift(); - return ret; - }, - - Program: function(program) { - this.options.blockParams.unshift(program.blockParams); - - let body = program.body, - bodyLength = body.length; - for (let i = 0; i < bodyLength; i++) { - this.accept(body[i]); - } - - this.options.blockParams.shift(); - - this.isSimple = bodyLength === 1; - this.blockParams = program.blockParams ? program.blockParams.length : 0; - - return this; - }, - - BlockStatement: function(block) { - transformLiteralToPath(block); - - let program = block.program, - inverse = block.inverse; - - program = program && this.compileProgram(program); - inverse = inverse && this.compileProgram(inverse); - - let type = this.classifySexpr(block); - - if (type === 'helper') { - this.helperSexpr(block, program, inverse); - } else if (type === 'simple') { - this.simpleSexpr(block); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('blockValue', block.path.original); - } else { - this.ambiguousSexpr(block, program, inverse); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('ambiguousBlockValue'); - } - - this.opcode('append'); - }, - - DecoratorBlock(decorator) { - let program = decorator.program && this.compileProgram(decorator.program); - let params = this.setupFullMustacheParams(decorator, program, undefined), - path = decorator.path; - - this.useDecorators = true; - this.opcode('registerDecorator', params.length, path.original); - }, - - PartialStatement: function(partial) { - this.usePartial = true; - - let program = partial.program; - if (program) { - program = this.compileProgram(partial.program); - } - - let params = partial.params; - if (params.length > 1) { - throw new Exception( - 'Unsupported number of partial arguments: ' + params.length, - partial - ); - } else if (!params.length) { - if (this.options.explicitPartialContext) { - this.opcode('pushLiteral', 'undefined'); - } else { - params.push({ type: 'PathExpression', parts: [], depth: 0 }); - } - } - - let partialName = partial.name.original, - isDynamic = partial.name.type === 'SubExpression'; - if (isDynamic) { - this.accept(partial.name); - } - - this.setupFullMustacheParams(partial, program, undefined, true); - - let indent = partial.indent || ''; - if (this.options.preventIndent && indent) { - this.opcode('appendContent', indent); - indent = ''; - } - - this.opcode('invokePartial', isDynamic, partialName, indent); - this.opcode('append'); - }, - PartialBlockStatement: function(partialBlock) { - this.PartialStatement(partialBlock); - }, - - MustacheStatement: function(mustache) { - this.SubExpression(mustache); - - if (mustache.escaped && !this.options.noEscape) { - this.opcode('appendEscaped'); - } else { - this.opcode('append'); - } - }, - Decorator(decorator) { - this.DecoratorBlock(decorator); - }, - - ContentStatement: function(content) { - if (content.value) { - this.opcode('appendContent', content.value); - } - }, - - CommentStatement: function() {}, - - SubExpression: function(sexpr) { - transformLiteralToPath(sexpr); - let type = this.classifySexpr(sexpr); - - if (type === 'simple') { - this.simpleSexpr(sexpr); - } else if (type === 'helper') { - this.helperSexpr(sexpr); - } else { - this.ambiguousSexpr(sexpr); - } - }, - ambiguousSexpr: function(sexpr, program, inverse) { - let path = sexpr.path, - name = path.parts[0], - isBlock = program != null || inverse != null; - - this.opcode('getContext', path.depth); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - path.strict = true; - this.accept(path); - - this.opcode('invokeAmbiguous', name, isBlock); - }, - - simpleSexpr: function(sexpr) { - let path = sexpr.path; - path.strict = true; - this.accept(path); - this.opcode('resolvePossibleLambda'); - }, - - helperSexpr: function(sexpr, program, inverse) { - let params = this.setupFullMustacheParams(sexpr, program, inverse), - path = sexpr.path, - name = path.parts[0]; - - if (this.options.knownHelpers[name]) { - this.opcode('invokeKnownHelper', params.length, name); - } else if (this.options.knownHelpersOnly) { - throw new Exception( - 'You specified knownHelpersOnly, but used the unknown helper ' + name, - sexpr - ); - } else { - path.strict = true; - path.falsy = true; - - this.accept(path); - this.opcode( - 'invokeHelper', - params.length, - path.original, - AST.helpers.simpleId(path) - ); - } - }, - - PathExpression: function(path) { - this.addDepth(path.depth); - this.opcode('getContext', path.depth); - - let name = path.parts[0], - scoped = AST.helpers.scopedId(path), - blockParamId = !path.depth && !scoped && this.blockParamIndex(name); - - if (blockParamId) { - this.opcode('lookupBlockParam', blockParamId, path.parts); - } else if (!name) { - // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` - this.opcode('pushContext'); - } else if (path.data) { - this.options.data = true; - this.opcode('lookupData', path.depth, path.parts, path.strict); - } else { - this.opcode( - 'lookupOnContext', - path.parts, - path.falsy, - path.strict, - scoped - ); - } - }, - - StringLiteral: function(string) { - this.opcode('pushString', string.value); - }, - - NumberLiteral: function(number) { - this.opcode('pushLiteral', number.value); - }, - - BooleanLiteral: function(bool) { - this.opcode('pushLiteral', bool.value); - }, - - UndefinedLiteral: function() { - this.opcode('pushLiteral', 'undefined'); - }, - - NullLiteral: function() { - this.opcode('pushLiteral', 'null'); - }, - - Hash: function(hash) { - let pairs = hash.pairs, - i = 0, - l = pairs.length; - - this.opcode('pushHash'); - - for (; i < l; i++) { - this.pushParam(pairs[i].value); - } - while (i--) { - this.opcode('assignToHash', pairs[i].key); - } - this.opcode('popHash'); - }, - - // HELPERS - opcode: function(name) { - this.opcodes.push({ - opcode: name, - args: slice.call(arguments, 1), - loc: this.sourceNode[0].loc - }); - }, - - addDepth: function(depth) { - if (!depth) { - return; - } - - this.useDepths = true; - }, - - classifySexpr: function(sexpr) { - let isSimple = AST.helpers.simpleId(sexpr.path); - - let isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); - - // a mustache is an eligible helper if: - // * its id is simple (a single part, not `this` or `..`) - let isHelper = !isBlockParam && AST.helpers.helperExpression(sexpr); - - // if a mustache is an eligible helper but not a definite - // helper, it is ambiguous, and will be resolved in a later - // pass or at runtime. - let isEligible = !isBlockParam && (isHelper || isSimple); - - // if ambiguous, we can possibly resolve the ambiguity now - // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. - if (isEligible && !isHelper) { - let name = sexpr.path.parts[0], - options = this.options; - if (options.knownHelpers[name]) { - isHelper = true; - } else if (options.knownHelpersOnly) { - isEligible = false; - } - } - - if (isHelper) { - return 'helper'; - } else if (isEligible) { - return 'ambiguous'; - } else { - return 'simple'; - } - }, - - pushParams: function(params) { - for (let i = 0, l = params.length; i < l; i++) { - this.pushParam(params[i]); - } - }, - - pushParam: function(val) { - let value = val.value != null ? val.value : val.original || ''; - - if (this.stringParams) { - if (value.replace) { - value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); - } - - if (val.depth) { - this.addDepth(val.depth); - } - this.opcode('getContext', val.depth || 0); - this.opcode('pushStringParam', value, val.type); - - if (val.type === 'SubExpression') { - // SubExpressions get evaluated and passed in - // in string params mode. - this.accept(val); - } - } else { - if (this.trackIds) { - let blockParamIndex; - if (val.parts && !AST.helpers.scopedId(val) && !val.depth) { - blockParamIndex = this.blockParamIndex(val.parts[0]); - } - if (blockParamIndex) { - let blockParamChild = val.parts.slice(1).join('.'); - this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); - } else { - value = val.original || value; - if (value.replace) { - value = value - .replace(/^this(?:\.|$)/, '') - .replace(/^\.\//, '') - .replace(/^\.$/, ''); - } - - this.opcode('pushId', val.type, value); - } - } - this.accept(val); - } - }, - - setupFullMustacheParams: function(sexpr, program, inverse, omitEmpty) { - let params = sexpr.params; - this.pushParams(params); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - if (sexpr.hash) { - this.accept(sexpr.hash); - } else { - this.opcode('emptyHash', omitEmpty); - } - - return params; - }, - - blockParamIndex: function(name) { - for ( - let depth = 0, len = this.options.blockParams.length; - depth < len; - depth++ - ) { - let blockParams = this.options.blockParams[depth], - param = blockParams && indexOf(blockParams, name); - if (blockParams && param >= 0) { - return [depth, param]; - } - } - } -}; - -export function precompile(input, options, env) { - if ( - input == null || - (typeof input !== 'string' && input.type !== 'Program') - ) { - throw new Exception( - 'You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + - input - ); - } - - options = options || {}; - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - let ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options); - return new env.JavaScriptCompiler().compile(environment, options); -} - -export function compile(input, options = {}, env) { - if ( - input == null || - (typeof input !== 'string' && input.type !== 'Program') - ) { - throw new Exception( - 'You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + - input - ); - } - - options = extend({}, options); - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - let compiled; - - function compileInput() { - let ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options), - templateSpec = new env.JavaScriptCompiler().compile( - environment, - options, - undefined, - true - ); - return env.template(templateSpec); - } - - // Template is only compiled on first use and cached after that point. - function ret(context, execOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled.call(this, context, execOptions); - } - ret._setup = function(setupOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._setup(setupOptions); - }; - ret._child = function(i, data, blockParams, depths) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._child(i, data, blockParams, depths); - }; - return ret; -} - -function argEquals(a, b) { - if (a === b) { - return true; - } - - if (isArray(a) && isArray(b) && a.length === b.length) { - for (let i = 0; i < a.length; i++) { - if (!argEquals(a[i], b[i])) { - return false; - } - } - return true; - } -} - -function transformLiteralToPath(sexpr) { - if (!sexpr.path.parts) { - let literal = sexpr.path; - // Casting to string here to make false and 0 literal values play nicely with the rest - // of the system. - sexpr.path = { - type: 'PathExpression', - data: false, - depth: 0, - parts: [literal.original + ''], - original: literal.original + '', - loc: literal.loc - }; - } -} diff --git a/node_modules/handlebars/lib/handlebars/compiler/helpers.js b/node_modules/handlebars/lib/handlebars/compiler/helpers.js deleted file mode 100644 index 27033a1d..00000000 --- a/node_modules/handlebars/lib/handlebars/compiler/helpers.js +++ /dev/null @@ -1,219 +0,0 @@ -import Exception from '../exception'; - -function validateClose(open, close) { - close = close.path ? close.path.original : close; - - if (open.path.original !== close) { - let errorNode = { loc: open.path.loc }; - - throw new Exception( - open.path.original + " doesn't match " + close, - errorNode - ); - } -} - -export function SourceLocation(source, locInfo) { - this.source = source; - this.start = { - line: locInfo.first_line, - column: locInfo.first_column - }; - this.end = { - line: locInfo.last_line, - column: locInfo.last_column - }; -} - -export function id(token) { - if (/^\[.*\]$/.test(token)) { - return token.substring(1, token.length - 1); - } else { - return token; - } -} - -export function stripFlags(open, close) { - return { - open: open.charAt(2) === '~', - close: close.charAt(close.length - 3) === '~' - }; -} - -export function stripComment(comment) { - return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, ''); -} - -export function preparePath(data, parts, loc) { - loc = this.locInfo(loc); - - let original = data ? '@' : '', - dig = [], - depth = 0; - - for (let i = 0, l = parts.length; i < l; i++) { - let part = parts[i].part, - // If we have [] syntax then we do not treat path references as operators, - // i.e. foo.[this] resolves to approximately context.foo['this'] - isLiteral = parts[i].original !== part; - original += (parts[i].separator || '') + part; - - if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { - if (dig.length > 0) { - throw new Exception('Invalid path: ' + original, { loc }); - } else if (part === '..') { - depth++; - } - } else { - dig.push(part); - } - } - - return { - type: 'PathExpression', - data, - depth, - parts: dig, - original, - loc - }; -} - -export function prepareMustache(path, params, hash, open, strip, locInfo) { - // Must use charAt to support IE pre-10 - let escapeFlag = open.charAt(3) || open.charAt(2), - escaped = escapeFlag !== '{' && escapeFlag !== '&'; - - let decorator = /\*/.test(open); - return { - type: decorator ? 'Decorator' : 'MustacheStatement', - path, - params, - hash, - escaped, - strip, - loc: this.locInfo(locInfo) - }; -} - -export function prepareRawBlock(openRawBlock, contents, close, locInfo) { - validateClose(openRawBlock, close); - - locInfo = this.locInfo(locInfo); - let program = { - type: 'Program', - body: contents, - strip: {}, - loc: locInfo - }; - - return { - type: 'BlockStatement', - path: openRawBlock.path, - params: openRawBlock.params, - hash: openRawBlock.hash, - program, - openStrip: {}, - inverseStrip: {}, - closeStrip: {}, - loc: locInfo - }; -} - -export function prepareBlock( - openBlock, - program, - inverseAndProgram, - close, - inverted, - locInfo -) { - if (close && close.path) { - validateClose(openBlock, close); - } - - let decorator = /\*/.test(openBlock.open); - - program.blockParams = openBlock.blockParams; - - let inverse, inverseStrip; - - if (inverseAndProgram) { - if (decorator) { - throw new Exception( - 'Unexpected inverse block on decorator', - inverseAndProgram - ); - } - - if (inverseAndProgram.chain) { - inverseAndProgram.program.body[0].closeStrip = close.strip; - } - - inverseStrip = inverseAndProgram.strip; - inverse = inverseAndProgram.program; - } - - if (inverted) { - inverted = inverse; - inverse = program; - program = inverted; - } - - return { - type: decorator ? 'DecoratorBlock' : 'BlockStatement', - path: openBlock.path, - params: openBlock.params, - hash: openBlock.hash, - program, - inverse, - openStrip: openBlock.strip, - inverseStrip, - closeStrip: close && close.strip, - loc: this.locInfo(locInfo) - }; -} - -export function prepareProgram(statements, loc) { - if (!loc && statements.length) { - const firstLoc = statements[0].loc, - lastLoc = statements[statements.length - 1].loc; - - /* istanbul ignore else */ - if (firstLoc && lastLoc) { - loc = { - source: firstLoc.source, - start: { - line: firstLoc.start.line, - column: firstLoc.start.column - }, - end: { - line: lastLoc.end.line, - column: lastLoc.end.column - } - }; - } - } - - return { - type: 'Program', - body: statements, - strip: {}, - loc: loc - }; -} - -export function preparePartialBlock(open, program, close, locInfo) { - validateClose(open, close); - - return { - type: 'PartialBlockStatement', - name: open.path, - params: open.params, - hash: open.hash, - program, - openStrip: open.strip, - closeStrip: close && close.strip, - loc: this.locInfo(locInfo) - }; -} diff --git a/node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js b/node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js deleted file mode 100644 index db1c50c6..00000000 --- a/node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js +++ /dev/null @@ -1,1292 +0,0 @@ -import { COMPILER_REVISION, REVISION_CHANGES } from '../base'; -import Exception from '../exception'; -import { isArray } from '../utils'; -import CodeGen from './code-gen'; - -function Literal(value) { - this.value = value; -} - -function JavaScriptCompiler() {} - -JavaScriptCompiler.prototype = { - // PUBLIC API: You can override these methods in a subclass to provide - // alternative compiled forms for name lookup and buffering semantics - nameLookup: function(parent, name /*, type */) { - return this.internalNameLookup(parent, name); - }, - depthedLookup: function(name) { - return [ - this.aliasable('container.lookup'), - '(depths, ', - JSON.stringify(name), - ')' - ]; - }, - - compilerInfo: function() { - const revision = COMPILER_REVISION, - versions = REVISION_CHANGES[revision]; - return [revision, versions]; - }, - - appendToBuffer: function(source, location, explicit) { - // Force a source as this simplifies the merge logic. - if (!isArray(source)) { - source = [source]; - } - source = this.source.wrap(source, location); - - if (this.environment.isSimple) { - return ['return ', source, ';']; - } else if (explicit) { - // This is a case where the buffer operation occurs as a child of another - // construct, generally braces. We have to explicitly output these buffer - // operations to ensure that the emitted code goes in the correct location. - return ['buffer += ', source, ';']; - } else { - source.appendToBuffer = true; - return source; - } - }, - - initializeBuffer: function() { - return this.quotedString(''); - }, - // END PUBLIC API - internalNameLookup: function(parent, name) { - this.lookupPropertyFunctionIsUsed = true; - return ['lookupProperty(', parent, ',', JSON.stringify(name), ')']; - }, - - lookupPropertyFunctionIsUsed: false, - - compile: function(environment, options, context, asObject) { - this.environment = environment; - this.options = options; - this.stringParams = this.options.stringParams; - this.trackIds = this.options.trackIds; - this.precompile = !asObject; - - this.name = this.environment.name; - this.isChild = !!context; - this.context = context || { - decorators: [], - programs: [], - environments: [] - }; - - this.preamble(); - - this.stackSlot = 0; - this.stackVars = []; - this.aliases = {}; - this.registers = { list: [] }; - this.hashes = []; - this.compileStack = []; - this.inlineStack = []; - this.blockParams = []; - - this.compileChildren(environment, options); - - this.useDepths = - this.useDepths || - environment.useDepths || - environment.useDecorators || - this.options.compat; - this.useBlockParams = this.useBlockParams || environment.useBlockParams; - - let opcodes = environment.opcodes, - opcode, - firstLoc, - i, - l; - - for (i = 0, l = opcodes.length; i < l; i++) { - opcode = opcodes[i]; - - this.source.currentLocation = opcode.loc; - firstLoc = firstLoc || opcode.loc; - this[opcode.opcode].apply(this, opcode.args); - } - - // Flush any trailing content that might be pending. - this.source.currentLocation = firstLoc; - this.pushSource(''); - - /* istanbul ignore next */ - if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { - throw new Exception('Compile completed with content left on stack'); - } - - if (!this.decorators.isEmpty()) { - this.useDecorators = true; - - this.decorators.prepend([ - 'var decorators = container.decorators, ', - this.lookupPropertyFunctionVarDeclaration(), - ';\n' - ]); - this.decorators.push('return fn;'); - - if (asObject) { - this.decorators = Function.apply(this, [ - 'fn', - 'props', - 'container', - 'depth0', - 'data', - 'blockParams', - 'depths', - this.decorators.merge() - ]); - } else { - this.decorators.prepend( - 'function(fn, props, container, depth0, data, blockParams, depths) {\n' - ); - this.decorators.push('}\n'); - this.decorators = this.decorators.merge(); - } - } else { - this.decorators = undefined; - } - - let fn = this.createFunctionContext(asObject); - if (!this.isChild) { - let ret = { - compiler: this.compilerInfo(), - main: fn - }; - - if (this.decorators) { - ret.main_d = this.decorators; // eslint-disable-line camelcase - ret.useDecorators = true; - } - - let { programs, decorators } = this.context; - for (i = 0, l = programs.length; i < l; i++) { - if (programs[i]) { - ret[i] = programs[i]; - if (decorators[i]) { - ret[i + '_d'] = decorators[i]; - ret.useDecorators = true; - } - } - } - - if (this.environment.usePartial) { - ret.usePartial = true; - } - if (this.options.data) { - ret.useData = true; - } - if (this.useDepths) { - ret.useDepths = true; - } - if (this.useBlockParams) { - ret.useBlockParams = true; - } - if (this.options.compat) { - ret.compat = true; - } - - if (!asObject) { - ret.compiler = JSON.stringify(ret.compiler); - - this.source.currentLocation = { start: { line: 1, column: 0 } }; - ret = this.objectLiteral(ret); - - if (options.srcName) { - ret = ret.toStringWithSourceMap({ file: options.destName }); - ret.map = ret.map && ret.map.toString(); - } else { - ret = ret.toString(); - } - } else { - ret.compilerOptions = this.options; - } - - return ret; - } else { - return fn; - } - }, - - preamble: function() { - // track the last context pushed into place to allow skipping the - // getContext opcode when it would be a noop - this.lastContext = 0; - this.source = new CodeGen(this.options.srcName); - this.decorators = new CodeGen(this.options.srcName); - }, - - createFunctionContext: function(asObject) { - let varDeclarations = ''; - - let locals = this.stackVars.concat(this.registers.list); - if (locals.length > 0) { - varDeclarations += ', ' + locals.join(', '); - } - - // Generate minimizer alias mappings - // - // When using true SourceNodes, this will update all references to the given alias - // as the source nodes are reused in situ. For the non-source node compilation mode, - // aliases will not be used, but this case is already being run on the client and - // we aren't concern about minimizing the template size. - let aliasCount = 0; - Object.keys(this.aliases).forEach(alias => { - let node = this.aliases[alias]; - if (node.children && node.referenceCount > 1) { - varDeclarations += ', alias' + ++aliasCount + '=' + alias; - node.children[0] = 'alias' + aliasCount; - } - }); - - if (this.lookupPropertyFunctionIsUsed) { - varDeclarations += ', ' + this.lookupPropertyFunctionVarDeclaration(); - } - - let params = ['container', 'depth0', 'helpers', 'partials', 'data']; - - if (this.useBlockParams || this.useDepths) { - params.push('blockParams'); - } - if (this.useDepths) { - params.push('depths'); - } - - // Perform a second pass over the output to merge content when possible - let source = this.mergeSource(varDeclarations); - - if (asObject) { - params.push(source); - - return Function.apply(this, params); - } else { - return this.source.wrap([ - 'function(', - params.join(','), - ') {\n ', - source, - '}' - ]); - } - }, - mergeSource: function(varDeclarations) { - let isSimple = this.environment.isSimple, - appendOnly = !this.forceBuffer, - appendFirst, - sourceSeen, - bufferStart, - bufferEnd; - this.source.each(line => { - if (line.appendToBuffer) { - if (bufferStart) { - line.prepend(' + '); - } else { - bufferStart = line; - } - bufferEnd = line; - } else { - if (bufferStart) { - if (!sourceSeen) { - appendFirst = true; - } else { - bufferStart.prepend('buffer += '); - } - bufferEnd.add(';'); - bufferStart = bufferEnd = undefined; - } - - sourceSeen = true; - if (!isSimple) { - appendOnly = false; - } - } - }); - - if (appendOnly) { - if (bufferStart) { - bufferStart.prepend('return '); - bufferEnd.add(';'); - } else if (!sourceSeen) { - this.source.push('return "";'); - } - } else { - varDeclarations += - ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); - - if (bufferStart) { - bufferStart.prepend('return buffer + '); - bufferEnd.add(';'); - } else { - this.source.push('return buffer;'); - } - } - - if (varDeclarations) { - this.source.prepend( - 'var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n') - ); - } - - return this.source.merge(); - }, - - lookupPropertyFunctionVarDeclaration: function() { - return ` - lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - } - `.trim(); - }, - - // [blockValue] - // - // On stack, before: hash, inverse, program, value - // On stack, after: return value of blockHelperMissing - // - // The purpose of this opcode is to take a block of the form - // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and - // replace it on the stack with the result of properly - // invoking blockHelperMissing. - blockValue: function(name) { - let blockHelperMissing = this.aliasable( - 'container.hooks.blockHelperMissing' - ), - params = [this.contextName(0)]; - this.setupHelperArgs(name, 0, params); - - let blockName = this.popStack(); - params.splice(1, 0, blockName); - - this.push(this.source.functionCall(blockHelperMissing, 'call', params)); - }, - - // [ambiguousBlockValue] - // - // On stack, before: hash, inverse, program, value - // Compiler value, before: lastHelper=value of last found helper, if any - // On stack, after, if no lastHelper: same as [blockValue] - // On stack, after, if lastHelper: value - ambiguousBlockValue: function() { - // We're being a bit cheeky and reusing the options value from the prior exec - let blockHelperMissing = this.aliasable( - 'container.hooks.blockHelperMissing' - ), - params = [this.contextName(0)]; - this.setupHelperArgs('', 0, params, true); - - this.flushInline(); - - let current = this.topStack(); - params.splice(1, 0, current); - - this.pushSource([ - 'if (!', - this.lastHelper, - ') { ', - current, - ' = ', - this.source.functionCall(blockHelperMissing, 'call', params), - '}' - ]); - }, - - // [appendContent] - // - // On stack, before: ... - // On stack, after: ... - // - // Appends the string value of `content` to the current buffer - appendContent: function(content) { - if (this.pendingContent) { - content = this.pendingContent + content; - } else { - this.pendingLocation = this.source.currentLocation; - } - - this.pendingContent = content; - }, - - // [append] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Coerces `value` to a String and appends it to the current buffer. - // - // If `value` is truthy, or 0, it is coerced into a string and appended - // Otherwise, the empty string is appended - append: function() { - if (this.isInline()) { - this.replaceStack(current => [' != null ? ', current, ' : ""']); - - this.pushSource(this.appendToBuffer(this.popStack())); - } else { - let local = this.popStack(); - this.pushSource([ - 'if (', - local, - ' != null) { ', - this.appendToBuffer(local, undefined, true), - ' }' - ]); - if (this.environment.isSimple) { - this.pushSource([ - 'else { ', - this.appendToBuffer("''", undefined, true), - ' }' - ]); - } - } - }, - - // [appendEscaped] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Escape `value` and append it to the buffer - appendEscaped: function() { - this.pushSource( - this.appendToBuffer([ - this.aliasable('container.escapeExpression'), - '(', - this.popStack(), - ')' - ]) - ); - }, - - // [getContext] - // - // On stack, before: ... - // On stack, after: ... - // Compiler value, after: lastContext=depth - // - // Set the value of the `lastContext` compiler value to the depth - getContext: function(depth) { - this.lastContext = depth; - }, - - // [pushContext] - // - // On stack, before: ... - // On stack, after: currentContext, ... - // - // Pushes the value of the current context onto the stack. - pushContext: function() { - this.pushStackLiteral(this.contextName(this.lastContext)); - }, - - // [lookupOnContext] - // - // On stack, before: ... - // On stack, after: currentContext[name], ... - // - // Looks up the value of `name` on the current context and pushes - // it onto the stack. - lookupOnContext: function(parts, falsy, strict, scoped) { - let i = 0; - - if (!scoped && this.options.compat && !this.lastContext) { - // The depthed query is expected to handle the undefined logic for the root level that - // is implemented below, so we evaluate that directly in compat mode - this.push(this.depthedLookup(parts[i++])); - } else { - this.pushContext(); - } - - this.resolvePath('context', parts, i, falsy, strict); - }, - - // [lookupBlockParam] - // - // On stack, before: ... - // On stack, after: blockParam[name], ... - // - // Looks up the value of `parts` on the given block param and pushes - // it onto the stack. - lookupBlockParam: function(blockParamId, parts) { - this.useBlockParams = true; - - this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); - this.resolvePath('context', parts, 1); - }, - - // [lookupData] - // - // On stack, before: ... - // On stack, after: data, ... - // - // Push the data lookup operator - lookupData: function(depth, parts, strict) { - if (!depth) { - this.pushStackLiteral('data'); - } else { - this.pushStackLiteral('container.data(data, ' + depth + ')'); - } - - this.resolvePath('data', parts, 0, true, strict); - }, - - resolvePath: function(type, parts, i, falsy, strict) { - if (this.options.strict || this.options.assumeObjects) { - this.push(strictLookup(this.options.strict && strict, this, parts, type)); - return; - } - - let len = parts.length; - for (; i < len; i++) { - /* eslint-disable no-loop-func */ - this.replaceStack(current => { - let lookup = this.nameLookup(current, parts[i], type); - // We want to ensure that zero and false are handled properly if the context (falsy flag) - // needs to have the special handling for these values. - if (!falsy) { - return [' != null ? ', lookup, ' : ', current]; - } else { - // Otherwise we can use generic falsy handling - return [' && ', lookup]; - } - }); - /* eslint-enable no-loop-func */ - } - }, - - // [resolvePossibleLambda] - // - // On stack, before: value, ... - // On stack, after: resolved value, ... - // - // If the `value` is a lambda, replace it on the stack by - // the return value of the lambda - resolvePossibleLambda: function() { - this.push([ - this.aliasable('container.lambda'), - '(', - this.popStack(), - ', ', - this.contextName(0), - ')' - ]); - }, - - // [pushStringParam] - // - // On stack, before: ... - // On stack, after: string, currentContext, ... - // - // This opcode is designed for use in string mode, which - // provides the string value of a parameter along with its - // depth rather than resolving it immediately. - pushStringParam: function(string, type) { - this.pushContext(); - this.pushString(type); - - // If it's a subexpression, the string result - // will be pushed after this opcode. - if (type !== 'SubExpression') { - if (typeof string === 'string') { - this.pushString(string); - } else { - this.pushStackLiteral(string); - } - } - }, - - emptyHash: function(omitEmpty) { - if (this.trackIds) { - this.push('{}'); // hashIds - } - if (this.stringParams) { - this.push('{}'); // hashContexts - this.push('{}'); // hashTypes - } - this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); - }, - pushHash: function() { - if (this.hash) { - this.hashes.push(this.hash); - } - this.hash = { values: {}, types: [], contexts: [], ids: [] }; - }, - popHash: function() { - let hash = this.hash; - this.hash = this.hashes.pop(); - - if (this.trackIds) { - this.push(this.objectLiteral(hash.ids)); - } - if (this.stringParams) { - this.push(this.objectLiteral(hash.contexts)); - this.push(this.objectLiteral(hash.types)); - } - - this.push(this.objectLiteral(hash.values)); - }, - - // [pushString] - // - // On stack, before: ... - // On stack, after: quotedString(string), ... - // - // Push a quoted version of `string` onto the stack - pushString: function(string) { - this.pushStackLiteral(this.quotedString(string)); - }, - - // [pushLiteral] - // - // On stack, before: ... - // On stack, after: value, ... - // - // Pushes a value onto the stack. This operation prevents - // the compiler from creating a temporary variable to hold - // it. - pushLiteral: function(value) { - this.pushStackLiteral(value); - }, - - // [pushProgram] - // - // On stack, before: ... - // On stack, after: program(guid), ... - // - // Push a program expression onto the stack. This takes - // a compile-time guid and converts it into a runtime-accessible - // expression. - pushProgram: function(guid) { - if (guid != null) { - this.pushStackLiteral(this.programExpression(guid)); - } else { - this.pushStackLiteral(null); - } - }, - - // [registerDecorator] - // - // On stack, before: hash, program, params..., ... - // On stack, after: ... - // - // Pops off the decorator's parameters, invokes the decorator, - // and inserts the decorator into the decorators list. - registerDecorator(paramSize, name) { - let foundDecorator = this.nameLookup('decorators', name, 'decorator'), - options = this.setupHelperArgs(name, paramSize); - - this.decorators.push([ - 'fn = ', - this.decorators.functionCall(foundDecorator, '', [ - 'fn', - 'props', - 'container', - options - ]), - ' || fn;' - ]); - }, - - // [invokeHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // Pops off the helper's parameters, invokes the helper, - // and pushes the helper's return value onto the stack. - // - // If the helper is not found, `helperMissing` is called. - invokeHelper: function(paramSize, name, isSimple) { - let nonHelper = this.popStack(), - helper = this.setupHelper(paramSize, name); - - let possibleFunctionCalls = []; - - if (isSimple) { - // direct call to helper - possibleFunctionCalls.push(helper.name); - } - // call a function from the input object - possibleFunctionCalls.push(nonHelper); - if (!this.options.strict) { - possibleFunctionCalls.push( - this.aliasable('container.hooks.helperMissing') - ); - } - - let functionLookupCode = [ - '(', - this.itemsSeparatedBy(possibleFunctionCalls, '||'), - ')' - ]; - let functionCall = this.source.functionCall( - functionLookupCode, - 'call', - helper.callParams - ); - this.push(functionCall); - }, - - itemsSeparatedBy: function(items, separator) { - let result = []; - result.push(items[0]); - for (let i = 1; i < items.length; i++) { - result.push(separator, items[i]); - } - return result; - }, - // [invokeKnownHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // This operation is used when the helper is known to exist, - // so a `helperMissing` fallback is not required. - invokeKnownHelper: function(paramSize, name) { - let helper = this.setupHelper(paramSize, name); - this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); - }, - - // [invokeAmbiguous] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of disambiguation - // - // This operation is used when an expression like `{{foo}}` - // is provided, but we don't know at compile-time whether it - // is a helper or a path. - // - // This operation emits more code than the other options, - // and can be avoided by passing the `knownHelpers` and - // `knownHelpersOnly` flags at compile-time. - invokeAmbiguous: function(name, helperCall) { - this.useRegister('helper'); - - let nonHelper = this.popStack(); - - this.emptyHash(); - let helper = this.setupHelper(0, name, helperCall); - - let helperName = (this.lastHelper = this.nameLookup( - 'helpers', - name, - 'helper' - )); - - let lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; - if (!this.options.strict) { - lookup[0] = '(helper = '; - lookup.push( - ' != null ? helper : ', - this.aliasable('container.hooks.helperMissing') - ); - } - - this.push([ - '(', - lookup, - helper.paramsInit ? ['),(', helper.paramsInit] : [], - '),', - '(typeof helper === ', - this.aliasable('"function"'), - ' ? ', - this.source.functionCall('helper', 'call', helper.callParams), - ' : helper))' - ]); - }, - - // [invokePartial] - // - // On stack, before: context, ... - // On stack after: result of partial invocation - // - // This operation pops off a context, invokes a partial with that context, - // and pushes the result of the invocation back. - invokePartial: function(isDynamic, name, indent) { - let params = [], - options = this.setupParams(name, 1, params); - - if (isDynamic) { - name = this.popStack(); - delete options.name; - } - - if (indent) { - options.indent = JSON.stringify(indent); - } - options.helpers = 'helpers'; - options.partials = 'partials'; - options.decorators = 'container.decorators'; - - if (!isDynamic) { - params.unshift(this.nameLookup('partials', name, 'partial')); - } else { - params.unshift(name); - } - - if (this.options.compat) { - options.depths = 'depths'; - } - options = this.objectLiteral(options); - params.push(options); - - this.push(this.source.functionCall('container.invokePartial', '', params)); - }, - - // [assignToHash] - // - // On stack, before: value, ..., hash, ... - // On stack, after: ..., hash, ... - // - // Pops a value off the stack and assigns it to the current hash - assignToHash: function(key) { - let value = this.popStack(), - context, - type, - id; - - if (this.trackIds) { - id = this.popStack(); - } - if (this.stringParams) { - type = this.popStack(); - context = this.popStack(); - } - - let hash = this.hash; - if (context) { - hash.contexts[key] = context; - } - if (type) { - hash.types[key] = type; - } - if (id) { - hash.ids[key] = id; - } - hash.values[key] = value; - }, - - pushId: function(type, name, child) { - if (type === 'BlockParam') { - this.pushStackLiteral( - 'blockParams[' + - name[0] + - '].path[' + - name[1] + - ']' + - (child ? ' + ' + JSON.stringify('.' + child) : '') - ); - } else if (type === 'PathExpression') { - this.pushString(name); - } else if (type === 'SubExpression') { - this.pushStackLiteral('true'); - } else { - this.pushStackLiteral('null'); - } - }, - - // HELPERS - - compiler: JavaScriptCompiler, - - compileChildren: function(environment, options) { - let children = environment.children, - child, - compiler; - - for (let i = 0, l = children.length; i < l; i++) { - child = children[i]; - compiler = new this.compiler(); // eslint-disable-line new-cap - - let existing = this.matchExistingProgram(child); - - if (existing == null) { - this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children - let index = this.context.programs.length; - child.index = index; - child.name = 'program' + index; - this.context.programs[index] = compiler.compile( - child, - options, - this.context, - !this.precompile - ); - this.context.decorators[index] = compiler.decorators; - this.context.environments[index] = child; - - this.useDepths = this.useDepths || compiler.useDepths; - this.useBlockParams = this.useBlockParams || compiler.useBlockParams; - child.useDepths = this.useDepths; - child.useBlockParams = this.useBlockParams; - } else { - child.index = existing.index; - child.name = 'program' + existing.index; - - this.useDepths = this.useDepths || existing.useDepths; - this.useBlockParams = this.useBlockParams || existing.useBlockParams; - } - } - }, - matchExistingProgram: function(child) { - for (let i = 0, len = this.context.environments.length; i < len; i++) { - let environment = this.context.environments[i]; - if (environment && environment.equals(child)) { - return environment; - } - } - }, - - programExpression: function(guid) { - let child = this.environment.children[guid], - programParams = [child.index, 'data', child.blockParams]; - - if (this.useBlockParams || this.useDepths) { - programParams.push('blockParams'); - } - if (this.useDepths) { - programParams.push('depths'); - } - - return 'container.program(' + programParams.join(', ') + ')'; - }, - - useRegister: function(name) { - if (!this.registers[name]) { - this.registers[name] = true; - this.registers.list.push(name); - } - }, - - push: function(expr) { - if (!(expr instanceof Literal)) { - expr = this.source.wrap(expr); - } - - this.inlineStack.push(expr); - return expr; - }, - - pushStackLiteral: function(item) { - this.push(new Literal(item)); - }, - - pushSource: function(source) { - if (this.pendingContent) { - this.source.push( - this.appendToBuffer( - this.source.quotedString(this.pendingContent), - this.pendingLocation - ) - ); - this.pendingContent = undefined; - } - - if (source) { - this.source.push(source); - } - }, - - replaceStack: function(callback) { - let prefix = ['('], - stack, - createdStack, - usedLiteral; - - /* istanbul ignore next */ - if (!this.isInline()) { - throw new Exception('replaceStack on non-inline'); - } - - // We want to merge the inline statement into the replacement statement via ',' - let top = this.popStack(true); - - if (top instanceof Literal) { - // Literals do not need to be inlined - stack = [top.value]; - prefix = ['(', stack]; - usedLiteral = true; - } else { - // Get or create the current stack name for use by the inline - createdStack = true; - let name = this.incrStack(); - - prefix = ['((', this.push(name), ' = ', top, ')']; - stack = this.topStack(); - } - - let item = callback.call(this, stack); - - if (!usedLiteral) { - this.popStack(); - } - if (createdStack) { - this.stackSlot--; - } - this.push(prefix.concat(item, ')')); - }, - - incrStack: function() { - this.stackSlot++; - if (this.stackSlot > this.stackVars.length) { - this.stackVars.push('stack' + this.stackSlot); - } - return this.topStackName(); - }, - topStackName: function() { - return 'stack' + this.stackSlot; - }, - flushInline: function() { - let inlineStack = this.inlineStack; - this.inlineStack = []; - for (let i = 0, len = inlineStack.length; i < len; i++) { - let entry = inlineStack[i]; - /* istanbul ignore if */ - if (entry instanceof Literal) { - this.compileStack.push(entry); - } else { - let stack = this.incrStack(); - this.pushSource([stack, ' = ', entry, ';']); - this.compileStack.push(stack); - } - } - }, - isInline: function() { - return this.inlineStack.length; - }, - - popStack: function(wrapped) { - let inline = this.isInline(), - item = (inline ? this.inlineStack : this.compileStack).pop(); - - if (!wrapped && item instanceof Literal) { - return item.value; - } else { - if (!inline) { - /* istanbul ignore next */ - if (!this.stackSlot) { - throw new Exception('Invalid stack pop'); - } - this.stackSlot--; - } - return item; - } - }, - - topStack: function() { - let stack = this.isInline() ? this.inlineStack : this.compileStack, - item = stack[stack.length - 1]; - - /* istanbul ignore if */ - if (item instanceof Literal) { - return item.value; - } else { - return item; - } - }, - - contextName: function(context) { - if (this.useDepths && context) { - return 'depths[' + context + ']'; - } else { - return 'depth' + context; - } - }, - - quotedString: function(str) { - return this.source.quotedString(str); - }, - - objectLiteral: function(obj) { - return this.source.objectLiteral(obj); - }, - - aliasable: function(name) { - let ret = this.aliases[name]; - if (ret) { - ret.referenceCount++; - return ret; - } - - ret = this.aliases[name] = this.source.wrap(name); - ret.aliasable = true; - ret.referenceCount = 1; - - return ret; - }, - - setupHelper: function(paramSize, name, blockHelper) { - let params = [], - paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); - let foundHelper = this.nameLookup('helpers', name, 'helper'), - callContext = this.aliasable( - `${this.contextName(0)} != null ? ${this.contextName( - 0 - )} : (container.nullContext || {})` - ); - - return { - params: params, - paramsInit: paramsInit, - name: foundHelper, - callParams: [callContext].concat(params) - }; - }, - - setupParams: function(helper, paramSize, params) { - let options = {}, - contexts = [], - types = [], - ids = [], - objectArgs = !params, - param; - - if (objectArgs) { - params = []; - } - - options.name = this.quotedString(helper); - options.hash = this.popStack(); - - if (this.trackIds) { - options.hashIds = this.popStack(); - } - if (this.stringParams) { - options.hashTypes = this.popStack(); - options.hashContexts = this.popStack(); - } - - let inverse = this.popStack(), - program = this.popStack(); - - // Avoid setting fn and inverse if neither are set. This allows - // helpers to do a check for `if (options.fn)` - if (program || inverse) { - options.fn = program || 'container.noop'; - options.inverse = inverse || 'container.noop'; - } - - // The parameters go on to the stack in order (making sure that they are evaluated in order) - // so we need to pop them off the stack in reverse order - let i = paramSize; - while (i--) { - param = this.popStack(); - params[i] = param; - - if (this.trackIds) { - ids[i] = this.popStack(); - } - if (this.stringParams) { - types[i] = this.popStack(); - contexts[i] = this.popStack(); - } - } - - if (objectArgs) { - options.args = this.source.generateArray(params); - } - - if (this.trackIds) { - options.ids = this.source.generateArray(ids); - } - if (this.stringParams) { - options.types = this.source.generateArray(types); - options.contexts = this.source.generateArray(contexts); - } - - if (this.options.data) { - options.data = 'data'; - } - if (this.useBlockParams) { - options.blockParams = 'blockParams'; - } - return options; - }, - - setupHelperArgs: function(helper, paramSize, params, useRegister) { - let options = this.setupParams(helper, paramSize, params); - options.loc = JSON.stringify(this.source.currentLocation); - options = this.objectLiteral(options); - if (useRegister) { - this.useRegister('options'); - params.push('options'); - return ['options=', options]; - } else if (params) { - params.push(options); - return ''; - } else { - return options; - } - } -}; - -(function() { - const reservedWords = ( - 'break else new var' + - ' case finally return void' + - ' catch for switch while' + - ' continue function this with' + - ' default if throw' + - ' delete in try' + - ' do instanceof typeof' + - ' abstract enum int short' + - ' boolean export interface static' + - ' byte extends long super' + - ' char final native synchronized' + - ' class float package throws' + - ' const goto private transient' + - ' debugger implements protected volatile' + - ' double import public let yield await' + - ' null true false' - ).split(' '); - - const compilerWords = (JavaScriptCompiler.RESERVED_WORDS = {}); - - for (let i = 0, l = reservedWords.length; i < l; i++) { - compilerWords[reservedWords[i]] = true; - } -})(); - -/** - * @deprecated May be removed in the next major version - */ -JavaScriptCompiler.isValidJavaScriptVariableName = function(name) { - return ( - !JavaScriptCompiler.RESERVED_WORDS[name] && - /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name) - ); -}; - -function strictLookup(requireTerminal, compiler, parts, type) { - let stack = compiler.popStack(), - i = 0, - len = parts.length; - if (requireTerminal) { - len--; - } - - for (; i < len; i++) { - stack = compiler.nameLookup(stack, parts[i], type); - } - - if (requireTerminal) { - return [ - compiler.aliasable('container.strict'), - '(', - stack, - ', ', - compiler.quotedString(parts[i]), - ', ', - JSON.stringify(compiler.source.currentLocation), - ' )' - ]; - } else { - return stack; - } -} - -export default JavaScriptCompiler; diff --git a/node_modules/handlebars/lib/handlebars/compiler/parser.js b/node_modules/handlebars/lib/handlebars/compiler/parser.js deleted file mode 100644 index 6f5d25f2..00000000 --- a/node_modules/handlebars/lib/handlebars/compiler/parser.js +++ /dev/null @@ -1,622 +0,0 @@ -// File ignored in coverage tests via setting in .istanbul.yml -/* Jison generated parser */ -var handlebars = (function(){ -var parser = {trace: function trace () { }, -yy: {}, -symbols_: {"error":2,"root":3,"program":4,"EOF":5,"program_repetition0":6,"statement":7,"mustache":8,"block":9,"rawBlock":10,"partial":11,"partialBlock":12,"content":13,"COMMENT":14,"CONTENT":15,"openRawBlock":16,"rawBlock_repetition0":17,"END_RAW_BLOCK":18,"OPEN_RAW_BLOCK":19,"helperName":20,"openRawBlock_repetition0":21,"openRawBlock_option0":22,"CLOSE_RAW_BLOCK":23,"openBlock":24,"block_option0":25,"closeBlock":26,"openInverse":27,"block_option1":28,"OPEN_BLOCK":29,"openBlock_repetition0":30,"openBlock_option0":31,"openBlock_option1":32,"CLOSE":33,"OPEN_INVERSE":34,"openInverse_repetition0":35,"openInverse_option0":36,"openInverse_option1":37,"openInverseChain":38,"OPEN_INVERSE_CHAIN":39,"openInverseChain_repetition0":40,"openInverseChain_option0":41,"openInverseChain_option1":42,"inverseAndProgram":43,"INVERSE":44,"inverseChain":45,"inverseChain_option0":46,"OPEN_ENDBLOCK":47,"OPEN":48,"mustache_repetition0":49,"mustache_option0":50,"OPEN_UNESCAPED":51,"mustache_repetition1":52,"mustache_option1":53,"CLOSE_UNESCAPED":54,"OPEN_PARTIAL":55,"partialName":56,"partial_repetition0":57,"partial_option0":58,"openPartialBlock":59,"OPEN_PARTIAL_BLOCK":60,"openPartialBlock_repetition0":61,"openPartialBlock_option0":62,"param":63,"sexpr":64,"OPEN_SEXPR":65,"sexpr_repetition0":66,"sexpr_option0":67,"CLOSE_SEXPR":68,"hash":69,"hash_repetition_plus0":70,"hashSegment":71,"ID":72,"EQUALS":73,"blockParams":74,"OPEN_BLOCK_PARAMS":75,"blockParams_repetition_plus0":76,"CLOSE_BLOCK_PARAMS":77,"path":78,"dataName":79,"STRING":80,"NUMBER":81,"BOOLEAN":82,"UNDEFINED":83,"NULL":84,"DATA":85,"pathSegments":86,"SEP":87,"$accept":0,"$end":1}, -terminals_: {2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"}, -productions_: [0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]], -performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$ -) { - -var $0 = $$.length - 1; -switch (yystate) { -case 1: return $$[$0-1]; -break; -case 2:this.$ = yy.prepareProgram($$[$0]); -break; -case 3:this.$ = $$[$0]; -break; -case 4:this.$ = $$[$0]; -break; -case 5:this.$ = $$[$0]; -break; -case 6:this.$ = $$[$0]; -break; -case 7:this.$ = $$[$0]; -break; -case 8:this.$ = $$[$0]; -break; -case 9: - this.$ = { - type: 'CommentStatement', - value: yy.stripComment($$[$0]), - strip: yy.stripFlags($$[$0], $$[$0]), - loc: yy.locInfo(this._$) - }; - -break; -case 10: - this.$ = { - type: 'ContentStatement', - original: $$[$0], - value: $$[$0], - loc: yy.locInfo(this._$) - }; - -break; -case 11:this.$ = yy.prepareRawBlock($$[$0-2], $$[$0-1], $$[$0], this._$); -break; -case 12:this.$ = { path: $$[$0-3], params: $$[$0-2], hash: $$[$0-1] }; -break; -case 13:this.$ = yy.prepareBlock($$[$0-3], $$[$0-2], $$[$0-1], $$[$0], false, this._$); -break; -case 14:this.$ = yy.prepareBlock($$[$0-3], $$[$0-2], $$[$0-1], $$[$0], true, this._$); -break; -case 15:this.$ = { open: $$[$0-5], path: $$[$0-4], params: $$[$0-3], hash: $$[$0-2], blockParams: $$[$0-1], strip: yy.stripFlags($$[$0-5], $$[$0]) }; -break; -case 16:this.$ = { path: $$[$0-4], params: $$[$0-3], hash: $$[$0-2], blockParams: $$[$0-1], strip: yy.stripFlags($$[$0-5], $$[$0]) }; -break; -case 17:this.$ = { path: $$[$0-4], params: $$[$0-3], hash: $$[$0-2], blockParams: $$[$0-1], strip: yy.stripFlags($$[$0-5], $$[$0]) }; -break; -case 18:this.$ = { strip: yy.stripFlags($$[$0-1], $$[$0-1]), program: $$[$0] }; -break; -case 19: - var inverse = yy.prepareBlock($$[$0-2], $$[$0-1], $$[$0], $$[$0], false, this._$), - program = yy.prepareProgram([inverse], $$[$0-1].loc); - program.chained = true; - - this.$ = { strip: $$[$0-2].strip, program: program, chain: true }; - -break; -case 20:this.$ = $$[$0]; -break; -case 21:this.$ = {path: $$[$0-1], strip: yy.stripFlags($$[$0-2], $$[$0])}; -break; -case 22:this.$ = yy.prepareMustache($$[$0-3], $$[$0-2], $$[$0-1], $$[$0-4], yy.stripFlags($$[$0-4], $$[$0]), this._$); -break; -case 23:this.$ = yy.prepareMustache($$[$0-3], $$[$0-2], $$[$0-1], $$[$0-4], yy.stripFlags($$[$0-4], $$[$0]), this._$); -break; -case 24: - this.$ = { - type: 'PartialStatement', - name: $$[$0-3], - params: $$[$0-2], - hash: $$[$0-1], - indent: '', - strip: yy.stripFlags($$[$0-4], $$[$0]), - loc: yy.locInfo(this._$) - }; - -break; -case 25:this.$ = yy.preparePartialBlock($$[$0-2], $$[$0-1], $$[$0], this._$); -break; -case 26:this.$ = { path: $$[$0-3], params: $$[$0-2], hash: $$[$0-1], strip: yy.stripFlags($$[$0-4], $$[$0]) }; -break; -case 27:this.$ = $$[$0]; -break; -case 28:this.$ = $$[$0]; -break; -case 29: - this.$ = { - type: 'SubExpression', - path: $$[$0-3], - params: $$[$0-2], - hash: $$[$0-1], - loc: yy.locInfo(this._$) - }; - -break; -case 30:this.$ = {type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$)}; -break; -case 31:this.$ = {type: 'HashPair', key: yy.id($$[$0-2]), value: $$[$0], loc: yy.locInfo(this._$)}; -break; -case 32:this.$ = yy.id($$[$0-1]); -break; -case 33:this.$ = $$[$0]; -break; -case 34:this.$ = $$[$0]; -break; -case 35:this.$ = {type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$)}; -break; -case 36:this.$ = {type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$)}; -break; -case 37:this.$ = {type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$)}; -break; -case 38:this.$ = {type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$)}; -break; -case 39:this.$ = {type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$)}; -break; -case 40:this.$ = $$[$0]; -break; -case 41:this.$ = $$[$0]; -break; -case 42:this.$ = yy.preparePath(true, $$[$0], this._$); -break; -case 43:this.$ = yy.preparePath(false, $$[$0], this._$); -break; -case 44: $$[$0-2].push({part: yy.id($$[$0]), original: $$[$0], separator: $$[$0-1]}); this.$ = $$[$0-2]; -break; -case 45:this.$ = [{part: yy.id($$[$0]), original: $$[$0]}]; -break; -case 46:this.$ = []; -break; -case 47:$$[$0-1].push($$[$0]); -break; -case 48:this.$ = []; -break; -case 49:$$[$0-1].push($$[$0]); -break; -case 50:this.$ = []; -break; -case 51:$$[$0-1].push($$[$0]); -break; -case 58:this.$ = []; -break; -case 59:$$[$0-1].push($$[$0]); -break; -case 64:this.$ = []; -break; -case 65:$$[$0-1].push($$[$0]); -break; -case 70:this.$ = []; -break; -case 71:$$[$0-1].push($$[$0]); -break; -case 78:this.$ = []; -break; -case 79:$$[$0-1].push($$[$0]); -break; -case 82:this.$ = []; -break; -case 83:$$[$0-1].push($$[$0]); -break; -case 86:this.$ = []; -break; -case 87:$$[$0-1].push($$[$0]); -break; -case 90:this.$ = []; -break; -case 91:$$[$0-1].push($$[$0]); -break; -case 94:this.$ = []; -break; -case 95:$$[$0-1].push($$[$0]); -break; -case 98:this.$ = [$$[$0]]; -break; -case 99:$$[$0-1].push($$[$0]); -break; -case 100:this.$ = [$$[$0]]; -break; -case 101:$$[$0-1].push($$[$0]); -break; -} -}, -table: [{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}], -defaultActions: {4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]}, -parseError: function parseError (str, hash) { - throw new Error(str); -}, -parse: function parse(input) { - var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - this.lexer.setInput(input); - this.lexer.yy = this.yy; - this.yy.lexer = this.lexer; - this.yy.parser = this; - if (typeof this.lexer.yylloc == "undefined") - this.lexer.yylloc = {}; - var yyloc = this.lexer.yylloc; - lstack.push(yyloc); - var ranges = this.lexer.options && this.lexer.options.ranges; - if (typeof this.yy.parseError === "function") - this.parseError = this.yy.parseError; - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = self.lexer.lex() || 1; - if (typeof token !== "number") { - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - if (!recovering) { - expected = []; - for (p in table[state]) - if (this.terminals_[p] && p > 2) { - expected.push("'" + this.terminals_[p] + "'"); - } - if (this.lexer.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected}); - } - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) - recovering--; - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column}; - if (ranges) { - yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; - } - r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -} -}; -/* Jison generated lexer */ -var lexer = (function(){ -var lexer = ({EOF:1, -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, -setInput:function (input) { - this._input = input; - this._more = this._less = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0}; - if (this.options.ranges) this.yylloc.range = [0,0]; - this.offset = 0; - return this; - }, -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) this.yylloc.range[1]++; - - this._input = this._input.slice(1); - return ch; - }, -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length-len-1); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length-1); - this.matched = this.matched.substr(0, this.matched.length-1); - - if (lines.length-1) this.yylineno -= lines.length-1; - var r = this.yylloc.range; - - this.yylloc = {first_line: this.yylloc.first_line, - last_line: this.yylineno+1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length: - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - return this; - }, -more:function () { - this._more = true; - return this; - }, -less:function (n) { - this.unput(this.match.slice(n)); - }, -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, ""); - }, -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c+"^"; - }, -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) this.done = true; - - var token, - match, - tempMatch, - index, - col, - lines; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i=0;i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (!this.options.flex) break; - } - } - if (match) { - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) this.yylineno += lines.length; - this.yylloc = {first_line: this.yylloc.last_line, - last_line: this.yylineno+1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length}; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]); - if (this.done && this._input) this.done = false; - if (token) return token; - else return; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(), - {text: "", token: null, line: this.yylineno}); - } - }, -lex:function lex () { - var r = this.next(); - if (typeof r !== 'undefined') { - return r; - } else { - return this.lex(); - } - }, -begin:function begin (condition) { - this.conditionStack.push(condition); - }, -popState:function popState () { - return this.conditionStack.pop(); - }, -_currentRules:function _currentRules () { - return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules; - }, -topState:function () { - return this.conditionStack[this.conditionStack.length-2]; - }, -pushState:function begin (condition) { - this.begin(condition); - }}); -lexer.options = {}; -lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START -) { - - -function strip(start, end) { - return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start); -} - - -var YYSTATE=YY_START -switch($avoiding_name_collisions) { -case 0: - if(yy_.yytext.slice(-2) === "\\\\") { - strip(0,1); - this.begin("mu"); - } else if(yy_.yytext.slice(-1) === "\\") { - strip(0,1); - this.begin("emu"); - } else { - this.begin("mu"); - } - if(yy_.yytext) return 15; - -break; -case 1:return 15; -break; -case 2: - this.popState(); - return 15; - -break; -case 3:this.begin('raw'); return 15; -break; -case 4: - this.popState(); - // Should be using `this.topState()` below, but it currently - // returns the second top instead of the first top. Opened an - // issue about it at https://github.com/zaach/jison/issues/291 - if (this.conditionStack[this.conditionStack.length-1] === 'raw') { - return 15; - } else { - strip(5, 9); - return 'END_RAW_BLOCK'; - } - -break; -case 5: return 15; -break; -case 6: - this.popState(); - return 14; - -break; -case 7:return 65; -break; -case 8:return 68; -break; -case 9: return 19; -break; -case 10: - this.popState(); - this.begin('raw'); - return 23; - -break; -case 11:return 55; -break; -case 12:return 60; -break; -case 13:return 29; -break; -case 14:return 47; -break; -case 15:this.popState(); return 44; -break; -case 16:this.popState(); return 44; -break; -case 17:return 34; -break; -case 18:return 39; -break; -case 19:return 51; -break; -case 20:return 48; -break; -case 21: - this.unput(yy_.yytext); - this.popState(); - this.begin('com'); - -break; -case 22: - this.popState(); - return 14; - -break; -case 23:return 48; -break; -case 24:return 73; -break; -case 25:return 72; -break; -case 26:return 72; -break; -case 27:return 87; -break; -case 28:// ignore whitespace -break; -case 29:this.popState(); return 54; -break; -case 30:this.popState(); return 33; -break; -case 31:yy_.yytext = strip(1,2).replace(/\\"/g,'"'); return 80; -break; -case 32:yy_.yytext = strip(1,2).replace(/\\'/g,"'"); return 80; -break; -case 33:return 85; -break; -case 34:return 82; -break; -case 35:return 82; -break; -case 36:return 83; -break; -case 37:return 84; -break; -case 38:return 81; -break; -case 39:return 75; -break; -case 40:return 77; -break; -case 41:return 72; -break; -case 42:yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g,'$1'); return 72; -break; -case 43:return 'INVALID'; -break; -case 44:return 5; -break; -} -}; -lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/]; -lexer.conditions = {"mu":{"rules":[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"com":{"rules":[6],"inclusive":false},"raw":{"rules":[3,4,5],"inclusive":false},"INITIAL":{"rules":[0,1,44],"inclusive":true}}; -return lexer;})() -parser.lexer = lexer; -function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})();export default handlebars; diff --git a/node_modules/handlebars/lib/handlebars/compiler/printer.js b/node_modules/handlebars/lib/handlebars/compiler/printer.js deleted file mode 100644 index e087806c..00000000 --- a/node_modules/handlebars/lib/handlebars/compiler/printer.js +++ /dev/null @@ -1,178 +0,0 @@ -/* eslint-disable new-cap */ -import Visitor from './visitor'; - -export function print(ast) { - return new PrintVisitor().accept(ast); -} - -export function PrintVisitor() { - this.padding = 0; -} - -PrintVisitor.prototype = new Visitor(); - -PrintVisitor.prototype.pad = function(string) { - let out = ''; - - for (let i = 0, l = this.padding; i < l; i++) { - out += ' '; - } - - out += string + '\n'; - return out; -}; - -PrintVisitor.prototype.Program = function(program) { - let out = '', - body = program.body, - i, - l; - - if (program.blockParams) { - let blockParams = 'BLOCK PARAMS: ['; - for (i = 0, l = program.blockParams.length; i < l; i++) { - blockParams += ' ' + program.blockParams[i]; - } - blockParams += ' ]'; - out += this.pad(blockParams); - } - - for (i = 0, l = body.length; i < l; i++) { - out += this.accept(body[i]); - } - - this.padding--; - - return out; -}; - -PrintVisitor.prototype.MustacheStatement = function(mustache) { - return this.pad('{{ ' + this.SubExpression(mustache) + ' }}'); -}; -PrintVisitor.prototype.Decorator = function(mustache) { - return this.pad('{{ DIRECTIVE ' + this.SubExpression(mustache) + ' }}'); -}; - -PrintVisitor.prototype.BlockStatement = PrintVisitor.prototype.DecoratorBlock = function( - block -) { - let out = ''; - - out += this.pad( - (block.type === 'DecoratorBlock' ? 'DIRECTIVE ' : '') + 'BLOCK:' - ); - this.padding++; - out += this.pad(this.SubExpression(block)); - if (block.program) { - out += this.pad('PROGRAM:'); - this.padding++; - out += this.accept(block.program); - this.padding--; - } - if (block.inverse) { - if (block.program) { - this.padding++; - } - out += this.pad('{{^}}'); - this.padding++; - out += this.accept(block.inverse); - this.padding--; - if (block.program) { - this.padding--; - } - } - this.padding--; - - return out; -}; - -PrintVisitor.prototype.PartialStatement = function(partial) { - let content = 'PARTIAL:' + partial.name.original; - if (partial.params[0]) { - content += ' ' + this.accept(partial.params[0]); - } - if (partial.hash) { - content += ' ' + this.accept(partial.hash); - } - return this.pad('{{> ' + content + ' }}'); -}; -PrintVisitor.prototype.PartialBlockStatement = function(partial) { - let content = 'PARTIAL BLOCK:' + partial.name.original; - if (partial.params[0]) { - content += ' ' + this.accept(partial.params[0]); - } - if (partial.hash) { - content += ' ' + this.accept(partial.hash); - } - - content += ' ' + this.pad('PROGRAM:'); - this.padding++; - content += this.accept(partial.program); - this.padding--; - - return this.pad('{{> ' + content + ' }}'); -}; - -PrintVisitor.prototype.ContentStatement = function(content) { - return this.pad("CONTENT[ '" + content.value + "' ]"); -}; - -PrintVisitor.prototype.CommentStatement = function(comment) { - return this.pad("{{! '" + comment.value + "' }}"); -}; - -PrintVisitor.prototype.SubExpression = function(sexpr) { - let params = sexpr.params, - paramStrings = [], - hash; - - for (let i = 0, l = params.length; i < l; i++) { - paramStrings.push(this.accept(params[i])); - } - - params = '[' + paramStrings.join(', ') + ']'; - - hash = sexpr.hash ? ' ' + this.accept(sexpr.hash) : ''; - - return this.accept(sexpr.path) + ' ' + params + hash; -}; - -PrintVisitor.prototype.PathExpression = function(id) { - let path = id.parts.join('/'); - return (id.data ? '@' : '') + 'PATH:' + path; -}; - -PrintVisitor.prototype.StringLiteral = function(string) { - return '"' + string.value + '"'; -}; - -PrintVisitor.prototype.NumberLiteral = function(number) { - return 'NUMBER{' + number.value + '}'; -}; - -PrintVisitor.prototype.BooleanLiteral = function(bool) { - return 'BOOLEAN{' + bool.value + '}'; -}; - -PrintVisitor.prototype.UndefinedLiteral = function() { - return 'UNDEFINED'; -}; - -PrintVisitor.prototype.NullLiteral = function() { - return 'NULL'; -}; - -PrintVisitor.prototype.Hash = function(hash) { - let pairs = hash.pairs, - joinedPairs = []; - - for (let i = 0, l = pairs.length; i < l; i++) { - joinedPairs.push(this.accept(pairs[i])); - } - - return 'HASH{' + joinedPairs.join(', ') + '}'; -}; -PrintVisitor.prototype.HashPair = function(pair) { - return pair.key + '=' + this.accept(pair.value); -}; -/* eslint-enable new-cap */ diff --git a/node_modules/handlebars/lib/handlebars/compiler/visitor.js b/node_modules/handlebars/lib/handlebars/compiler/visitor.js deleted file mode 100644 index 76bb01f1..00000000 --- a/node_modules/handlebars/lib/handlebars/compiler/visitor.js +++ /dev/null @@ -1,136 +0,0 @@ -import Exception from '../exception'; - -function Visitor() { - this.parents = []; -} - -Visitor.prototype = { - constructor: Visitor, - mutating: false, - - // Visits a given value. If mutating, will replace the value if necessary. - acceptKey: function(node, name) { - let value = this.accept(node[name]); - if (this.mutating) { - // Hacky sanity check: This may have a few false positives for type for the helper - // methods but will generally do the right thing without a lot of overhead. - if (value && !Visitor.prototype[value.type]) { - throw new Exception( - 'Unexpected node type "' + - value.type + - '" found when accepting ' + - name + - ' on ' + - node.type - ); - } - node[name] = value; - } - }, - - // Performs an accept operation with added sanity check to ensure - // required keys are not removed. - acceptRequired: function(node, name) { - this.acceptKey(node, name); - - if (!node[name]) { - throw new Exception(node.type + ' requires ' + name); - } - }, - - // Traverses a given array. If mutating, empty respnses will be removed - // for child elements. - acceptArray: function(array) { - for (let i = 0, l = array.length; i < l; i++) { - this.acceptKey(array, i); - - if (!array[i]) { - array.splice(i, 1); - i--; - l--; - } - } - }, - - accept: function(object) { - if (!object) { - return; - } - - /* istanbul ignore next: Sanity code */ - if (!this[object.type]) { - throw new Exception('Unknown type: ' + object.type, object); - } - - if (this.current) { - this.parents.unshift(this.current); - } - this.current = object; - - let ret = this[object.type](object); - - this.current = this.parents.shift(); - - if (!this.mutating || ret) { - return ret; - } else if (ret !== false) { - return object; - } - }, - - Program: function(program) { - this.acceptArray(program.body); - }, - - MustacheStatement: visitSubExpression, - Decorator: visitSubExpression, - - BlockStatement: visitBlock, - DecoratorBlock: visitBlock, - - PartialStatement: visitPartial, - PartialBlockStatement: function(partial) { - visitPartial.call(this, partial); - - this.acceptKey(partial, 'program'); - }, - - ContentStatement: function(/* content */) {}, - CommentStatement: function(/* comment */) {}, - - SubExpression: visitSubExpression, - - PathExpression: function(/* path */) {}, - - StringLiteral: function(/* string */) {}, - NumberLiteral: function(/* number */) {}, - BooleanLiteral: function(/* bool */) {}, - UndefinedLiteral: function(/* literal */) {}, - NullLiteral: function(/* literal */) {}, - - Hash: function(hash) { - this.acceptArray(hash.pairs); - }, - HashPair: function(pair) { - this.acceptRequired(pair, 'value'); - } -}; - -function visitSubExpression(mustache) { - this.acceptRequired(mustache, 'path'); - this.acceptArray(mustache.params); - this.acceptKey(mustache, 'hash'); -} -function visitBlock(block) { - visitSubExpression.call(this, block); - - this.acceptKey(block, 'program'); - this.acceptKey(block, 'inverse'); -} -function visitPartial(partial) { - this.acceptRequired(partial, 'name'); - this.acceptArray(partial.params); - this.acceptKey(partial, 'hash'); -} - -export default Visitor; diff --git a/node_modules/handlebars/lib/handlebars/compiler/whitespace-control.js b/node_modules/handlebars/lib/handlebars/compiler/whitespace-control.js deleted file mode 100644 index 7db68398..00000000 --- a/node_modules/handlebars/lib/handlebars/compiler/whitespace-control.js +++ /dev/null @@ -1,234 +0,0 @@ -import Visitor from './visitor'; - -function WhitespaceControl(options = {}) { - this.options = options; -} -WhitespaceControl.prototype = new Visitor(); - -WhitespaceControl.prototype.Program = function(program) { - const doStandalone = !this.options.ignoreStandalone; - - let isRoot = !this.isRootSeen; - this.isRootSeen = true; - - let body = program.body; - for (let i = 0, l = body.length; i < l; i++) { - let current = body[i], - strip = this.accept(current); - - if (!strip) { - continue; - } - - let _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), - _isNextWhitespace = isNextWhitespace(body, i, isRoot), - openStandalone = strip.openStandalone && _isPrevWhitespace, - closeStandalone = strip.closeStandalone && _isNextWhitespace, - inlineStandalone = - strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; - - if (strip.close) { - omitRight(body, i, true); - } - if (strip.open) { - omitLeft(body, i, true); - } - - if (doStandalone && inlineStandalone) { - omitRight(body, i); - - if (omitLeft(body, i)) { - // If we are on a standalone node, save the indent info for partials - if (current.type === 'PartialStatement') { - // Pull out the whitespace from the final line - current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; - } - } - } - if (doStandalone && openStandalone) { - omitRight((current.program || current.inverse).body); - - // Strip out the previous content node if it's whitespace only - omitLeft(body, i); - } - if (doStandalone && closeStandalone) { - // Always strip the next node - omitRight(body, i); - - omitLeft((current.inverse || current.program).body); - } - } - - return program; -}; - -WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function( - block -) { - this.accept(block.program); - this.accept(block.inverse); - - // Find the inverse program that is involed with whitespace stripping. - let program = block.program || block.inverse, - inverse = block.program && block.inverse, - firstInverse = inverse, - lastInverse = inverse; - - if (inverse && inverse.chained) { - firstInverse = inverse.body[0].program; - - // Walk the inverse chain to find the last inverse that is actually in the chain. - while (lastInverse.chained) { - lastInverse = lastInverse.body[lastInverse.body.length - 1].program; - } - } - - let strip = { - open: block.openStrip.open, - close: block.closeStrip.close, - - // Determine the standalone candiacy. Basically flag our content as being possibly standalone - // so our parent can determine if we actually are standalone - openStandalone: isNextWhitespace(program.body), - closeStandalone: isPrevWhitespace((firstInverse || program).body) - }; - - if (block.openStrip.close) { - omitRight(program.body, null, true); - } - - if (inverse) { - let inverseStrip = block.inverseStrip; - - if (inverseStrip.open) { - omitLeft(program.body, null, true); - } - - if (inverseStrip.close) { - omitRight(firstInverse.body, null, true); - } - if (block.closeStrip.open) { - omitLeft(lastInverse.body, null, true); - } - - // Find standalone else statments - if ( - !this.options.ignoreStandalone && - isPrevWhitespace(program.body) && - isNextWhitespace(firstInverse.body) - ) { - omitLeft(program.body); - omitRight(firstInverse.body); - } - } else if (block.closeStrip.open) { - omitLeft(program.body, null, true); - } - - return strip; -}; - -WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function( - mustache -) { - return mustache.strip; -}; - -WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function( - node -) { - /* istanbul ignore next */ - let strip = node.strip || {}; - return { - inlineStandalone: true, - open: strip.open, - close: strip.close - }; -}; - -function isPrevWhitespace(body, i, isRoot) { - if (i === undefined) { - i = body.length; - } - - // Nodes that end with newlines are considered whitespace (but are special - // cased for strip operations) - let prev = body[i - 1], - sibling = body[i - 2]; - if (!prev) { - return isRoot; - } - - if (prev.type === 'ContentStatement') { - return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test( - prev.original - ); - } -} -function isNextWhitespace(body, i, isRoot) { - if (i === undefined) { - i = -1; - } - - let next = body[i + 1], - sibling = body[i + 2]; - if (!next) { - return isRoot; - } - - if (next.type === 'ContentStatement') { - return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test( - next.original - ); - } -} - -// Marks the node to the right of the position as omitted. -// I.e. {{foo}}' ' will mark the ' ' node as omitted. -// -// If i is undefined, then the first child will be marked as such. -// -// If mulitple is truthy then all whitespace will be stripped out until non-whitespace -// content is met. -function omitRight(body, i, multiple) { - let current = body[i == null ? 0 : i + 1]; - if ( - !current || - current.type !== 'ContentStatement' || - (!multiple && current.rightStripped) - ) { - return; - } - - let original = current.value; - current.value = current.value.replace( - multiple ? /^\s+/ : /^[ \t]*\r?\n?/, - '' - ); - current.rightStripped = current.value !== original; -} - -// Marks the node to the left of the position as omitted. -// I.e. ' '{{foo}} will mark the ' ' node as omitted. -// -// If i is undefined then the last child will be marked as such. -// -// If mulitple is truthy then all whitespace will be stripped out until non-whitespace -// content is met. -function omitLeft(body, i, multiple) { - let current = body[i == null ? body.length - 1 : i - 1]; - if ( - !current || - current.type !== 'ContentStatement' || - (!multiple && current.leftStripped) - ) { - return; - } - - // We omit the last node if it's whitespace only and not preceded by a non-content node. - let original = current.value; - current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ''); - current.leftStripped = current.value !== original; - return current.leftStripped; -} - -export default WhitespaceControl; diff --git a/node_modules/handlebars/lib/handlebars/decorators.js b/node_modules/handlebars/lib/handlebars/decorators.js deleted file mode 100644 index d9d5e8a9..00000000 --- a/node_modules/handlebars/lib/handlebars/decorators.js +++ /dev/null @@ -1,5 +0,0 @@ -import registerInline from './decorators/inline'; - -export function registerDefaultDecorators(instance) { - registerInline(instance); -} diff --git a/node_modules/handlebars/lib/handlebars/decorators/inline.js b/node_modules/handlebars/lib/handlebars/decorators/inline.js deleted file mode 100644 index 02f5be7b..00000000 --- a/node_modules/handlebars/lib/handlebars/decorators/inline.js +++ /dev/null @@ -1,22 +0,0 @@ -import { extend } from '../utils'; - -export default function(instance) { - instance.registerDecorator('inline', function(fn, props, container, options) { - let ret = fn; - if (!props.partials) { - props.partials = {}; - ret = function(context, options) { - // Create a new partials stack frame prior to exec. - let original = container.partials; - container.partials = extend({}, original, props.partials); - let ret = fn(context, options); - container.partials = original; - return ret; - }; - } - - props.partials[options.args[0]] = options.fn; - - return ret; - }); -} diff --git a/node_modules/handlebars/lib/handlebars/exception.js b/node_modules/handlebars/lib/handlebars/exception.js deleted file mode 100644 index b2fdc00b..00000000 --- a/node_modules/handlebars/lib/handlebars/exception.js +++ /dev/null @@ -1,68 +0,0 @@ -const errorProps = [ - 'description', - 'fileName', - 'lineNumber', - 'endLineNumber', - 'message', - 'name', - 'number', - 'stack' -]; - -function Exception(message, node) { - let loc = node && node.loc, - line, - endLineNumber, - column, - endColumn; - - if (loc) { - line = loc.start.line; - endLineNumber = loc.end.line; - column = loc.start.column; - endColumn = loc.end.column; - - message += ' - ' + line + ':' + column; - } - - let tmp = Error.prototype.constructor.call(this, message); - - // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. - for (let idx = 0; idx < errorProps.length; idx++) { - this[errorProps[idx]] = tmp[errorProps[idx]]; - } - - /* istanbul ignore else */ - if (Error.captureStackTrace) { - Error.captureStackTrace(this, Exception); - } - - try { - if (loc) { - this.lineNumber = line; - this.endLineNumber = endLineNumber; - - // Work around issue under safari where we can't directly set the column value - /* istanbul ignore next */ - if (Object.defineProperty) { - Object.defineProperty(this, 'column', { - value: column, - enumerable: true - }); - Object.defineProperty(this, 'endColumn', { - value: endColumn, - enumerable: true - }); - } else { - this.column = column; - this.endColumn = endColumn; - } - } - } catch (nop) { - /* Ignore if the browser is very particular */ - } -} - -Exception.prototype = new Error(); - -export default Exception; diff --git a/node_modules/handlebars/lib/handlebars/helpers.js b/node_modules/handlebars/lib/handlebars/helpers.js deleted file mode 100644 index 80479682..00000000 --- a/node_modules/handlebars/lib/handlebars/helpers.js +++ /dev/null @@ -1,26 +0,0 @@ -import registerBlockHelperMissing from './helpers/block-helper-missing'; -import registerEach from './helpers/each'; -import registerHelperMissing from './helpers/helper-missing'; -import registerIf from './helpers/if'; -import registerLog from './helpers/log'; -import registerLookup from './helpers/lookup'; -import registerWith from './helpers/with'; - -export function registerDefaultHelpers(instance) { - registerBlockHelperMissing(instance); - registerEach(instance); - registerHelperMissing(instance); - registerIf(instance); - registerLog(instance); - registerLookup(instance); - registerWith(instance); -} - -export function moveHelperToHooks(instance, helperName, keepHelper) { - if (instance.helpers[helperName]) { - instance.hooks[helperName] = instance.helpers[helperName]; - if (!keepHelper) { - delete instance.helpers[helperName]; - } - } -} diff --git a/node_modules/handlebars/lib/handlebars/helpers/block-helper-missing.js b/node_modules/handlebars/lib/handlebars/helpers/block-helper-missing.js deleted file mode 100644 index 9aeea9b9..00000000 --- a/node_modules/handlebars/lib/handlebars/helpers/block-helper-missing.js +++ /dev/null @@ -1,35 +0,0 @@ -import { appendContextPath, createFrame, isArray } from '../utils'; - -export default function(instance) { - instance.registerHelper('blockHelperMissing', function(context, options) { - let inverse = options.inverse, - fn = options.fn; - - if (context === true) { - return fn(this); - } else if (context === false || context == null) { - return inverse(this); - } else if (isArray(context)) { - if (context.length > 0) { - if (options.ids) { - options.ids = [options.name]; - } - - return instance.helpers.each(context, options); - } else { - return inverse(this); - } - } else { - if (options.data && options.ids) { - let data = createFrame(options.data); - data.contextPath = appendContextPath( - options.data.contextPath, - options.name - ); - options = { data: data }; - } - - return fn(context, options); - } - }); -} diff --git a/node_modules/handlebars/lib/handlebars/helpers/each.js b/node_modules/handlebars/lib/handlebars/helpers/each.js deleted file mode 100644 index c1fa20f3..00000000 --- a/node_modules/handlebars/lib/handlebars/helpers/each.js +++ /dev/null @@ -1,101 +0,0 @@ -import { - appendContextPath, - blockParams, - createFrame, - isArray, - isFunction -} from '../utils'; -import Exception from '../exception'; - -export default function(instance) { - instance.registerHelper('each', function(context, options) { - if (!options) { - throw new Exception('Must pass iterator to #each'); - } - - let fn = options.fn, - inverse = options.inverse, - i = 0, - ret = '', - data, - contextPath; - - if (options.data && options.ids) { - contextPath = - appendContextPath(options.data.contextPath, options.ids[0]) + '.'; - } - - if (isFunction(context)) { - context = context.call(this); - } - - if (options.data) { - data = createFrame(options.data); - } - - function execIteration(field, index, last) { - if (data) { - data.key = field; - data.index = index; - data.first = index === 0; - data.last = !!last; - - if (contextPath) { - data.contextPath = contextPath + field; - } - } - - ret = - ret + - fn(context[field], { - data: data, - blockParams: blockParams( - [context[field], field], - [contextPath + field, null] - ) - }); - } - - if (context && typeof context === 'object') { - if (isArray(context)) { - for (let j = context.length; i < j; i++) { - if (i in context) { - execIteration(i, i, i === context.length - 1); - } - } - } else if (global.Symbol && context[global.Symbol.iterator]) { - const newContext = []; - const iterator = context[global.Symbol.iterator](); - for (let it = iterator.next(); !it.done; it = iterator.next()) { - newContext.push(it.value); - } - context = newContext; - for (let j = context.length; i < j; i++) { - execIteration(i, i, i === context.length - 1); - } - } else { - let priorKey; - - Object.keys(context).forEach(key => { - // We're running the iterations one step out of sync so we can detect - // the last iteration without have to scan the object twice and create - // an itermediate keys array. - if (priorKey !== undefined) { - execIteration(priorKey, i - 1); - } - priorKey = key; - i++; - }); - if (priorKey !== undefined) { - execIteration(priorKey, i - 1, true); - } - } - } - - if (i === 0) { - ret = inverse(this); - } - - return ret; - }); -} diff --git a/node_modules/handlebars/lib/handlebars/helpers/helper-missing.js b/node_modules/handlebars/lib/handlebars/helpers/helper-missing.js deleted file mode 100644 index f8869e9c..00000000 --- a/node_modules/handlebars/lib/handlebars/helpers/helper-missing.js +++ /dev/null @@ -1,15 +0,0 @@ -import Exception from '../exception'; - -export default function(instance) { - instance.registerHelper('helperMissing', function(/* [args, ]options */) { - if (arguments.length === 1) { - // A missing field in a {{foo}} construct. - return undefined; - } else { - // Someone is actually trying to call something, blow up. - throw new Exception( - 'Missing helper: "' + arguments[arguments.length - 1].name + '"' - ); - } - }); -} diff --git a/node_modules/handlebars/lib/handlebars/helpers/if.js b/node_modules/handlebars/lib/handlebars/helpers/if.js deleted file mode 100644 index 55241ecb..00000000 --- a/node_modules/handlebars/lib/handlebars/helpers/if.js +++ /dev/null @@ -1,33 +0,0 @@ -import { isEmpty, isFunction } from '../utils'; -import Exception from '../exception'; - -export default function(instance) { - instance.registerHelper('if', function(conditional, options) { - if (arguments.length != 2) { - throw new Exception('#if requires exactly one argument'); - } - if (isFunction(conditional)) { - conditional = conditional.call(this); - } - - // Default behavior is to render the positive path if the value is truthy and not empty. - // The `includeZero` option may be set to treat the condtional as purely not empty based on the - // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. - if ((!options.hash.includeZero && !conditional) || isEmpty(conditional)) { - return options.inverse(this); - } else { - return options.fn(this); - } - }); - - instance.registerHelper('unless', function(conditional, options) { - if (arguments.length != 2) { - throw new Exception('#unless requires exactly one argument'); - } - return instance.helpers['if'].call(this, conditional, { - fn: options.inverse, - inverse: options.fn, - hash: options.hash - }); - }); -} diff --git a/node_modules/handlebars/lib/handlebars/helpers/log.js b/node_modules/handlebars/lib/handlebars/helpers/log.js deleted file mode 100644 index ab0d7364..00000000 --- a/node_modules/handlebars/lib/handlebars/helpers/log.js +++ /dev/null @@ -1,19 +0,0 @@ -export default function(instance) { - instance.registerHelper('log', function(/* message, options */) { - let args = [undefined], - options = arguments[arguments.length - 1]; - for (let i = 0; i < arguments.length - 1; i++) { - args.push(arguments[i]); - } - - let level = 1; - if (options.hash.level != null) { - level = options.hash.level; - } else if (options.data && options.data.level != null) { - level = options.data.level; - } - args[0] = level; - - instance.log(...args); - }); -} diff --git a/node_modules/handlebars/lib/handlebars/helpers/lookup.js b/node_modules/handlebars/lib/handlebars/helpers/lookup.js deleted file mode 100644 index 5620aba3..00000000 --- a/node_modules/handlebars/lib/handlebars/helpers/lookup.js +++ /dev/null @@ -1,9 +0,0 @@ -export default function(instance) { - instance.registerHelper('lookup', function(obj, field, options) { - if (!obj) { - // Note for 5.0: Change to "obj == null" in 5.0 - return obj; - } - return options.lookupProperty(obj, field); - }); -} diff --git a/node_modules/handlebars/lib/handlebars/helpers/with.js b/node_modules/handlebars/lib/handlebars/helpers/with.js deleted file mode 100644 index eb1cf1a9..00000000 --- a/node_modules/handlebars/lib/handlebars/helpers/with.js +++ /dev/null @@ -1,39 +0,0 @@ -import { - appendContextPath, - blockParams, - createFrame, - isEmpty, - isFunction -} from '../utils'; -import Exception from '../exception'; - -export default function(instance) { - instance.registerHelper('with', function(context, options) { - if (arguments.length != 2) { - throw new Exception('#with requires exactly one argument'); - } - if (isFunction(context)) { - context = context.call(this); - } - - let fn = options.fn; - - if (!isEmpty(context)) { - let data = options.data; - if (options.data && options.ids) { - data = createFrame(options.data); - data.contextPath = appendContextPath( - options.data.contextPath, - options.ids[0] - ); - } - - return fn(context, { - data: data, - blockParams: blockParams([context], [data && data.contextPath]) - }); - } else { - return options.inverse(this); - } - }); -} diff --git a/node_modules/handlebars/lib/handlebars/internal/create-new-lookup-object.js b/node_modules/handlebars/lib/handlebars/internal/create-new-lookup-object.js deleted file mode 100644 index 256f1eca..00000000 --- a/node_modules/handlebars/lib/handlebars/internal/create-new-lookup-object.js +++ /dev/null @@ -1,11 +0,0 @@ -import { extend } from '../utils'; - -/** - * Create a new object with "null"-prototype to avoid truthy results on prototype properties. - * The resulting object can be used with "object[property]" to check if a property exists - * @param {...object} sources a varargs parameter of source objects that will be merged - * @returns {object} - */ -export function createNewLookupObject(...sources) { - return extend(Object.create(null), ...sources); -} diff --git a/node_modules/handlebars/lib/handlebars/internal/proto-access.js b/node_modules/handlebars/lib/handlebars/internal/proto-access.js deleted file mode 100644 index a8c5394d..00000000 --- a/node_modules/handlebars/lib/handlebars/internal/proto-access.js +++ /dev/null @@ -1,70 +0,0 @@ -import { createNewLookupObject } from './create-new-lookup-object'; -import * as logger from '../logger'; - -const loggedProperties = Object.create(null); - -export function createProtoAccessControl(runtimeOptions) { - let defaultMethodWhiteList = Object.create(null); - defaultMethodWhiteList['constructor'] = false; - defaultMethodWhiteList['__defineGetter__'] = false; - defaultMethodWhiteList['__defineSetter__'] = false; - defaultMethodWhiteList['__lookupGetter__'] = false; - - let defaultPropertyWhiteList = Object.create(null); - // eslint-disable-next-line no-proto - defaultPropertyWhiteList['__proto__'] = false; - - return { - properties: { - whitelist: createNewLookupObject( - defaultPropertyWhiteList, - runtimeOptions.allowedProtoProperties - ), - defaultValue: runtimeOptions.allowProtoPropertiesByDefault - }, - methods: { - whitelist: createNewLookupObject( - defaultMethodWhiteList, - runtimeOptions.allowedProtoMethods - ), - defaultValue: runtimeOptions.allowProtoMethodsByDefault - } - }; -} - -export function resultIsAllowed(result, protoAccessControl, propertyName) { - if (typeof result === 'function') { - return checkWhiteList(protoAccessControl.methods, propertyName); - } else { - return checkWhiteList(protoAccessControl.properties, propertyName); - } -} - -function checkWhiteList(protoAccessControlForType, propertyName) { - if (protoAccessControlForType.whitelist[propertyName] !== undefined) { - return protoAccessControlForType.whitelist[propertyName] === true; - } - if (protoAccessControlForType.defaultValue !== undefined) { - return protoAccessControlForType.defaultValue; - } - logUnexpecedPropertyAccessOnce(propertyName); - return false; -} - -function logUnexpecedPropertyAccessOnce(propertyName) { - if (loggedProperties[propertyName] !== true) { - loggedProperties[propertyName] = true; - logger.log( - 'error', - `Handlebars: Access has been denied to resolve the property "${propertyName}" because it is not an "own property" of its parent.\n` + - `You can add a runtime option to disable the check or this warning:\n` + - `See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details` - ); - } -} - -export function resetLoggedProperties() { - Object.keys(loggedProperties).forEach(propertyName => { - delete loggedProperties[propertyName]; - }); -} diff --git a/node_modules/handlebars/lib/handlebars/internal/wrapHelper.js b/node_modules/handlebars/lib/handlebars/internal/wrapHelper.js deleted file mode 100644 index 29d65b03..00000000 --- a/node_modules/handlebars/lib/handlebars/internal/wrapHelper.js +++ /dev/null @@ -1,13 +0,0 @@ -export function wrapHelper(helper, transformOptionsFn) { - if (typeof helper !== 'function') { - // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639 - // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function. - return helper; - } - let wrapper = function(/* dynamic arguments */) { - const options = arguments[arguments.length - 1]; - arguments[arguments.length - 1] = transformOptionsFn(options); - return helper.apply(this, arguments); - }; - return wrapper; -} diff --git a/node_modules/handlebars/lib/handlebars/logger.js b/node_modules/handlebars/lib/handlebars/logger.js deleted file mode 100644 index bc411b25..00000000 --- a/node_modules/handlebars/lib/handlebars/logger.js +++ /dev/null @@ -1,39 +0,0 @@ -import { indexOf } from './utils'; - -let logger = { - methodMap: ['debug', 'info', 'warn', 'error'], - level: 'info', - - // Maps a given level value to the `methodMap` indexes above. - lookupLevel: function(level) { - if (typeof level === 'string') { - let levelMap = indexOf(logger.methodMap, level.toLowerCase()); - if (levelMap >= 0) { - level = levelMap; - } else { - level = parseInt(level, 10); - } - } - - return level; - }, - - // Can be overridden in the host environment - log: function(level, ...message) { - level = logger.lookupLevel(level); - - if ( - typeof console !== 'undefined' && - logger.lookupLevel(logger.level) <= level - ) { - let method = logger.methodMap[level]; - // eslint-disable-next-line no-console - if (!console[method]) { - method = 'log'; - } - console[method](...message); // eslint-disable-line no-console - } - } -}; - -export default logger; diff --git a/node_modules/handlebars/lib/handlebars/no-conflict.js b/node_modules/handlebars/lib/handlebars/no-conflict.js deleted file mode 100644 index 618b750f..00000000 --- a/node_modules/handlebars/lib/handlebars/no-conflict.js +++ /dev/null @@ -1,12 +0,0 @@ -export default function(Handlebars) { - /* istanbul ignore next */ - let root = typeof global !== 'undefined' ? global : window, - $Handlebars = root.Handlebars; - /* istanbul ignore next */ - Handlebars.noConflict = function() { - if (root.Handlebars === Handlebars) { - root.Handlebars = $Handlebars; - } - return Handlebars; - }; -} diff --git a/node_modules/handlebars/lib/handlebars/runtime.js b/node_modules/handlebars/lib/handlebars/runtime.js deleted file mode 100644 index 36bf6c94..00000000 --- a/node_modules/handlebars/lib/handlebars/runtime.js +++ /dev/null @@ -1,450 +0,0 @@ -import * as Utils from './utils'; -import Exception from './exception'; -import { - COMPILER_REVISION, - createFrame, - LAST_COMPATIBLE_COMPILER_REVISION, - REVISION_CHANGES -} from './base'; -import { moveHelperToHooks } from './helpers'; -import { wrapHelper } from './internal/wrapHelper'; -import { - createProtoAccessControl, - resultIsAllowed -} from './internal/proto-access'; - -export function checkRevision(compilerInfo) { - const compilerRevision = (compilerInfo && compilerInfo[0]) || 1, - currentRevision = COMPILER_REVISION; - - if ( - compilerRevision >= LAST_COMPATIBLE_COMPILER_REVISION && - compilerRevision <= COMPILER_REVISION - ) { - return; - } - - if (compilerRevision < LAST_COMPATIBLE_COMPILER_REVISION) { - const runtimeVersions = REVISION_CHANGES[currentRevision], - compilerVersions = REVISION_CHANGES[compilerRevision]; - throw new Exception( - 'Template was precompiled with an older version of Handlebars than the current runtime. ' + - 'Please update your precompiler to a newer version (' + - runtimeVersions + - ') or downgrade your runtime to an older version (' + - compilerVersions + - ').' - ); - } else { - // Use the embedded version info since the runtime doesn't know about this revision yet - throw new Exception( - 'Template was precompiled with a newer version of Handlebars than the current runtime. ' + - 'Please update your runtime to a newer version (' + - compilerInfo[1] + - ').' - ); - } -} - -export function template(templateSpec, env) { - /* istanbul ignore next */ - if (!env) { - throw new Exception('No environment passed to template'); - } - if (!templateSpec || !templateSpec.main) { - throw new Exception('Unknown template object: ' + typeof templateSpec); - } - - templateSpec.main.decorator = templateSpec.main_d; - - // Note: Using env.VM references rather than local var references throughout this section to allow - // for external users to override these as pseudo-supported APIs. - env.VM.checkRevision(templateSpec.compiler); - - // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0) - const templateWasPrecompiledWithCompilerV7 = - templateSpec.compiler && templateSpec.compiler[0] === 7; - - function invokePartialWrapper(partial, context, options) { - if (options.hash) { - context = Utils.extend({}, context, options.hash); - if (options.ids) { - options.ids[0] = true; - } - } - partial = env.VM.resolvePartial.call(this, partial, context, options); - - let extendedOptions = Utils.extend({}, options, { - hooks: this.hooks, - protoAccessControl: this.protoAccessControl - }); - - let result = env.VM.invokePartial.call( - this, - partial, - context, - extendedOptions - ); - - if (result == null && env.compile) { - options.partials[options.name] = env.compile( - partial, - templateSpec.compilerOptions, - env - ); - result = options.partials[options.name](context, extendedOptions); - } - if (result != null) { - if (options.indent) { - let lines = result.split('\n'); - for (let i = 0, l = lines.length; i < l; i++) { - if (!lines[i] && i + 1 === l) { - break; - } - - lines[i] = options.indent + lines[i]; - } - result = lines.join('\n'); - } - return result; - } else { - throw new Exception( - 'The partial ' + - options.name + - ' could not be compiled when running in runtime-only mode' - ); - } - } - - // Just add water - let container = { - strict: function(obj, name, loc) { - if (!obj || !(name in obj)) { - throw new Exception('"' + name + '" not defined in ' + obj, { - loc: loc - }); - } - return container.lookupProperty(obj, name); - }, - lookupProperty: function(parent, propertyName) { - let result = parent[propertyName]; - if (result == null) { - return result; - } - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return result; - } - - if (resultIsAllowed(result, container.protoAccessControl, propertyName)) { - return result; - } - return undefined; - }, - lookup: function(depths, name) { - const len = depths.length; - for (let i = 0; i < len; i++) { - let result = depths[i] && container.lookupProperty(depths[i], name); - if (result != null) { - return depths[i][name]; - } - } - }, - lambda: function(current, context) { - return typeof current === 'function' ? current.call(context) : current; - }, - - escapeExpression: Utils.escapeExpression, - invokePartial: invokePartialWrapper, - - fn: function(i) { - let ret = templateSpec[i]; - ret.decorator = templateSpec[i + '_d']; - return ret; - }, - - programs: [], - program: function(i, data, declaredBlockParams, blockParams, depths) { - let programWrapper = this.programs[i], - fn = this.fn(i); - if (data || depths || blockParams || declaredBlockParams) { - programWrapper = wrapProgram( - this, - i, - fn, - data, - declaredBlockParams, - blockParams, - depths - ); - } else if (!programWrapper) { - programWrapper = this.programs[i] = wrapProgram(this, i, fn); - } - return programWrapper; - }, - - data: function(value, depth) { - while (value && depth--) { - value = value._parent; - } - return value; - }, - mergeIfNeeded: function(param, common) { - let obj = param || common; - - if (param && common && param !== common) { - obj = Utils.extend({}, common, param); - } - - return obj; - }, - // An empty object to use as replacement for null-contexts - nullContext: Object.seal({}), - - noop: env.VM.noop, - compilerInfo: templateSpec.compiler - }; - - function ret(context, options = {}) { - let data = options.data; - - ret._setup(options); - if (!options.partial && templateSpec.useData) { - data = initData(context, data); - } - let depths, - blockParams = templateSpec.useBlockParams ? [] : undefined; - if (templateSpec.useDepths) { - if (options.depths) { - depths = - context != options.depths[0] - ? [context].concat(options.depths) - : options.depths; - } else { - depths = [context]; - } - } - - function main(context /*, options*/) { - return ( - '' + - templateSpec.main( - container, - context, - container.helpers, - container.partials, - data, - blockParams, - depths - ) - ); - } - - main = executeDecorators( - templateSpec.main, - main, - container, - options.depths || [], - data, - blockParams - ); - return main(context, options); - } - - ret.isTop = true; - - ret._setup = function(options) { - if (!options.partial) { - let mergedHelpers = Utils.extend({}, env.helpers, options.helpers); - wrapHelpersToPassLookupProperty(mergedHelpers, container); - container.helpers = mergedHelpers; - - if (templateSpec.usePartial) { - // Use mergeIfNeeded here to prevent compiling global partials multiple times - container.partials = container.mergeIfNeeded( - options.partials, - env.partials - ); - } - if (templateSpec.usePartial || templateSpec.useDecorators) { - container.decorators = Utils.extend( - {}, - env.decorators, - options.decorators - ); - } - - container.hooks = {}; - container.protoAccessControl = createProtoAccessControl(options); - - let keepHelperInHelpers = - options.allowCallsToHelperMissing || - templateWasPrecompiledWithCompilerV7; - moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers); - moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers); - } else { - container.protoAccessControl = options.protoAccessControl; // internal option - container.helpers = options.helpers; - container.partials = options.partials; - container.decorators = options.decorators; - container.hooks = options.hooks; - } - }; - - ret._child = function(i, data, blockParams, depths) { - if (templateSpec.useBlockParams && !blockParams) { - throw new Exception('must pass block params'); - } - if (templateSpec.useDepths && !depths) { - throw new Exception('must pass parent depths'); - } - - return wrapProgram( - container, - i, - templateSpec[i], - data, - 0, - blockParams, - depths - ); - }; - return ret; -} - -export function wrapProgram( - container, - i, - fn, - data, - declaredBlockParams, - blockParams, - depths -) { - function prog(context, options = {}) { - let currentDepths = depths; - if ( - depths && - context != depths[0] && - !(context === container.nullContext && depths[0] === null) - ) { - currentDepths = [context].concat(depths); - } - - return fn( - container, - context, - container.helpers, - container.partials, - options.data || data, - blockParams && [options.blockParams].concat(blockParams), - currentDepths - ); - } - - prog = executeDecorators(fn, prog, container, depths, data, blockParams); - - prog.program = i; - prog.depth = depths ? depths.length : 0; - prog.blockParams = declaredBlockParams || 0; - return prog; -} - -/** - * This is currently part of the official API, therefore implementation details should not be changed. - */ -export function resolvePartial(partial, context, options) { - if (!partial) { - if (options.name === '@partial-block') { - partial = options.data['partial-block']; - } else { - partial = options.partials[options.name]; - } - } else if (!partial.call && !options.name) { - // This is a dynamic partial that returned a string - options.name = partial; - partial = options.partials[partial]; - } - return partial; -} - -export function invokePartial(partial, context, options) { - // Use the current closure context to save the partial-block if this partial - const currentPartialBlock = options.data && options.data['partial-block']; - options.partial = true; - if (options.ids) { - options.data.contextPath = options.ids[0] || options.data.contextPath; - } - - let partialBlock; - if (options.fn && options.fn !== noop) { - options.data = createFrame(options.data); - // Wrapper function to get access to currentPartialBlock from the closure - let fn = options.fn; - partialBlock = options.data['partial-block'] = function partialBlockWrapper( - context, - options = {} - ) { - // Restore the partial-block from the closure for the execution of the block - // i.e. the part inside the block of the partial call. - options.data = createFrame(options.data); - options.data['partial-block'] = currentPartialBlock; - return fn(context, options); - }; - if (fn.partials) { - options.partials = Utils.extend({}, options.partials, fn.partials); - } - } - - if (partial === undefined && partialBlock) { - partial = partialBlock; - } - - if (partial === undefined) { - throw new Exception('The partial ' + options.name + ' could not be found'); - } else if (partial instanceof Function) { - return partial(context, options); - } -} - -export function noop() { - return ''; -} - -function initData(context, data) { - if (!data || !('root' in data)) { - data = data ? createFrame(data) : {}; - data.root = context; - } - return data; -} - -function executeDecorators(fn, prog, container, depths, data, blockParams) { - if (fn.decorator) { - let props = {}; - prog = fn.decorator( - prog, - props, - container, - depths && depths[0], - data, - blockParams, - depths - ); - Utils.extend(prog, props); - } - return prog; -} - -function wrapHelpersToPassLookupProperty(mergedHelpers, container) { - Object.keys(mergedHelpers).forEach(helperName => { - let helper = mergedHelpers[helperName]; - mergedHelpers[helperName] = passLookupPropertyOption(helper, container); - }); -} - -function passLookupPropertyOption(helper, container) { - const lookupProperty = container.lookupProperty; - return wrapHelper(helper, options => { - return Utils.extend({ lookupProperty }, options); - }); -} diff --git a/node_modules/handlebars/lib/handlebars/safe-string.js b/node_modules/handlebars/lib/handlebars/safe-string.js deleted file mode 100644 index 46801942..00000000 --- a/node_modules/handlebars/lib/handlebars/safe-string.js +++ /dev/null @@ -1,10 +0,0 @@ -// Build out our basic SafeString type -function SafeString(string) { - this.string = string; -} - -SafeString.prototype.toString = SafeString.prototype.toHTML = function() { - return '' + this.string; -}; - -export default SafeString; diff --git a/node_modules/handlebars/lib/handlebars/utils.js b/node_modules/handlebars/lib/handlebars/utils.js deleted file mode 100644 index 6fa43b23..00000000 --- a/node_modules/handlebars/lib/handlebars/utils.js +++ /dev/null @@ -1,116 +0,0 @@ -const escape = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`', - '=': '=' -}; - -const badChars = /[&<>"'`=]/g, - possible = /[&<>"'`=]/; - -function escapeChar(chr) { - return escape[chr]; -} - -export function extend(obj /* , ...source */) { - for (let i = 1; i < arguments.length; i++) { - for (let key in arguments[i]) { - if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { - obj[key] = arguments[i][key]; - } - } - } - - return obj; -} - -export let toString = Object.prototype.toString; - -// Sourced from lodash -// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt -/* eslint-disable func-style */ -let isFunction = function(value) { - return typeof value === 'function'; -}; -// fallback for older versions of Chrome and Safari -/* istanbul ignore next */ -if (isFunction(/x/)) { - isFunction = function(value) { - return ( - typeof value === 'function' && - toString.call(value) === '[object Function]' - ); - }; -} -export { isFunction }; -/* eslint-enable func-style */ - -/* istanbul ignore next */ -export const isArray = - Array.isArray || - function(value) { - return value && typeof value === 'object' - ? toString.call(value) === '[object Array]' - : false; - }; - -// Older IE versions do not directly support indexOf so we must implement our own, sadly. -export function indexOf(array, value) { - for (let i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { - return i; - } - } - return -1; -} - -export function escapeExpression(string) { - if (typeof string !== 'string') { - // don't escape SafeStrings, since they're already safe - if (string && string.toHTML) { - return string.toHTML(); - } else if (string == null) { - return ''; - } else if (!string) { - return string + ''; - } - - // Force a string conversion as this will be done by the append regardless and - // the regex test will do this transparently behind the scenes, causing issues if - // an object's to string has escaped characters in it. - string = '' + string; - } - - if (!possible.test(string)) { - return string; - } - return string.replace(badChars, escapeChar); -} - -export function isEmpty(value) { - if (!value && value !== 0) { - return true; - } else if (isArray(value) && value.length === 0) { - return true; - } else { - return false; - } -} - -export function createFrame(object) { - let frame = extend({}, object); - frame._parent = object; - return frame; -} - -export function blockParams(params, ids) { - params.path = ids; - return params; -} - -export function appendContextPath(contextPath, id) { - return (contextPath ? contextPath + '.' : '') + id; -} diff --git a/node_modules/handlebars/lib/index.js b/node_modules/handlebars/lib/index.js deleted file mode 100644 index 0383c02f..00000000 --- a/node_modules/handlebars/lib/index.js +++ /dev/null @@ -1,25 +0,0 @@ -// USAGE: -// var handlebars = require('handlebars'); -/* eslint-disable no-var */ - -// var local = handlebars.create(); - -var handlebars = require('../dist/cjs/handlebars')['default']; - -var printer = require('../dist/cjs/handlebars/compiler/printer'); -handlebars.PrintVisitor = printer.PrintVisitor; -handlebars.print = printer.print; - -module.exports = handlebars; - -// Publish a Node.js require() handler for .handlebars and .hbs files -function extension(module, filename) { - var fs = require('fs'); - var templateString = fs.readFileSync(filename, 'utf8'); - module.exports = handlebars.compile(templateString); -} -/* istanbul ignore else */ -if (typeof require !== 'undefined' && require.extensions) { - require.extensions['.handlebars'] = extension; - require.extensions['.hbs'] = extension; -} diff --git a/node_modules/handlebars/lib/precompiler.js b/node_modules/handlebars/lib/precompiler.js deleted file mode 100644 index 689c9f4d..00000000 --- a/node_modules/handlebars/lib/precompiler.js +++ /dev/null @@ -1,340 +0,0 @@ -/* eslint-disable no-console */ -import Async from 'neo-async'; -import fs from 'fs'; -import * as Handlebars from './handlebars'; -import { basename } from 'path'; -import { SourceMapConsumer, SourceNode } from 'source-map'; - -module.exports.loadTemplates = function(opts, callback) { - loadStrings(opts, function(err, strings) { - if (err) { - callback(err); - } else { - loadFiles(opts, function(err, files) { - if (err) { - callback(err); - } else { - opts.templates = strings.concat(files); - callback(undefined, opts); - } - }); - } - }); -}; - -function loadStrings(opts, callback) { - let strings = arrayCast(opts.string), - names = arrayCast(opts.name); - - if (names.length !== strings.length && strings.length > 1) { - return callback( - new Handlebars.Exception( - 'Number of names did not match the number of string inputs' - ) - ); - } - - Async.map( - strings, - function(string, callback) { - if (string !== '-') { - callback(undefined, string); - } else { - // Load from stdin - let buffer = ''; - process.stdin.setEncoding('utf8'); - - process.stdin.on('data', function(chunk) { - buffer += chunk; - }); - process.stdin.on('end', function() { - callback(undefined, buffer); - }); - } - }, - function(err, strings) { - strings = strings.map((string, index) => ({ - name: names[index], - path: names[index], - source: string - })); - callback(err, strings); - } - ); -} - -function loadFiles(opts, callback) { - // Build file extension pattern - let extension = (opts.extension || 'handlebars').replace( - /[\\^$*+?.():=!|{}\-[\]]/g, - function(arg) { - return '\\' + arg; - } - ); - extension = new RegExp('\\.' + extension + '$'); - - let ret = [], - queue = (opts.files || []).map(template => ({ template, root: opts.root })); - Async.whilst( - () => queue.length, - function(callback) { - let { template: path, root } = queue.shift(); - - fs.stat(path, function(err, stat) { - if (err) { - return callback( - new Handlebars.Exception(`Unable to open template file "${path}"`) - ); - } - - if (stat.isDirectory()) { - opts.hasDirectory = true; - - fs.readdir(path, function(err, children) { - /* istanbul ignore next : Race condition that being too lazy to test */ - if (err) { - return callback(err); - } - children.forEach(function(file) { - let childPath = path + '/' + file; - - if ( - extension.test(childPath) || - fs.statSync(childPath).isDirectory() - ) { - queue.push({ template: childPath, root: root || path }); - } - }); - - callback(); - }); - } else { - fs.readFile(path, 'utf8', function(err, data) { - /* istanbul ignore next : Race condition that being too lazy to test */ - if (err) { - return callback(err); - } - - if (opts.bom && data.indexOf('\uFEFF') === 0) { - data = data.substring(1); - } - - // Clean the template name - let name = path; - if (!root) { - name = basename(name); - } else if (name.indexOf(root) === 0) { - name = name.substring(root.length + 1); - } - name = name.replace(extension, ''); - - ret.push({ - path: path, - name: name, - source: data - }); - - callback(); - }); - } - }); - }, - function(err) { - if (err) { - callback(err); - } else { - callback(undefined, ret); - } - } - ); -} - -module.exports.cli = function(opts) { - if (opts.version) { - console.log(Handlebars.VERSION); - return; - } - - if (!opts.templates.length && !opts.hasDirectory) { - throw new Handlebars.Exception( - 'Must define at least one template or directory.' - ); - } - - if (opts.simple && opts.min) { - throw new Handlebars.Exception('Unable to minimize simple output'); - } - - const multiple = opts.templates.length !== 1 || opts.hasDirectory; - if (opts.simple && multiple) { - throw new Handlebars.Exception( - 'Unable to output multiple templates in simple mode' - ); - } - - // Force simple mode if we have only one template and it's unnamed. - if ( - !opts.amd && - !opts.commonjs && - opts.templates.length === 1 && - !opts.templates[0].name - ) { - opts.simple = true; - } - - // Convert the known list into a hash - let known = {}; - if (opts.known && !Array.isArray(opts.known)) { - opts.known = [opts.known]; - } - if (opts.known) { - for (let i = 0, len = opts.known.length; i < len; i++) { - known[opts.known[i]] = true; - } - } - - const objectName = opts.partial ? 'Handlebars.partials' : 'templates'; - - let output = new SourceNode(); - if (!opts.simple) { - if (opts.amd) { - output.add( - "define(['" + - opts.handlebarPath + - 'handlebars.runtime\'], function(Handlebars) {\n Handlebars = Handlebars["default"];' - ); - } else if (opts.commonjs) { - output.add('var Handlebars = require("' + opts.commonjs + '");'); - } else { - output.add('(function() {\n'); - } - output.add(' var template = Handlebars.template, templates = '); - if (opts.namespace) { - output.add(opts.namespace); - output.add(' = '); - output.add(opts.namespace); - output.add(' || '); - } - output.add('{};\n'); - } - - opts.templates.forEach(function(template) { - let options = { - knownHelpers: known, - knownHelpersOnly: opts.o - }; - - if (opts.map) { - options.srcName = template.path; - } - if (opts.data) { - options.data = true; - } - - let precompiled = Handlebars.precompile(template.source, options); - - // If we are generating a source map, we have to reconstruct the SourceNode object - if (opts.map) { - let consumer = new SourceMapConsumer(precompiled.map); - precompiled = SourceNode.fromStringWithSourceMap( - precompiled.code, - consumer - ); - } - - if (opts.simple) { - output.add([precompiled, '\n']); - } else { - if (!template.name) { - throw new Handlebars.Exception('Name missing for template'); - } - - if (opts.amd && !multiple) { - output.add('return '); - } - output.add([ - objectName, - "['", - template.name, - "'] = template(", - precompiled, - ');\n' - ]); - } - }); - - // Output the content - if (!opts.simple) { - if (opts.amd) { - if (multiple) { - output.add(['return ', objectName, ';\n']); - } - output.add('});'); - } else if (!opts.commonjs) { - output.add('})();'); - } - } - - if (opts.map) { - output.add('\n//# sourceMappingURL=' + opts.map + '\n'); - } - - output = output.toStringWithSourceMap(); - output.map = output.map + ''; - - if (opts.min) { - output = minify(output, opts.map); - } - - if (opts.map) { - fs.writeFileSync(opts.map, output.map, 'utf8'); - } - output = output.code; - - if (opts.output) { - fs.writeFileSync(opts.output, output, 'utf8'); - } else { - console.log(output); - } -}; - -function arrayCast(value) { - value = value != null ? value : []; - if (!Array.isArray(value)) { - value = [value]; - } - return value; -} - -/** - * Run uglify to minify the compiled template, if uglify exists in the dependencies. - * - * We are using `require` instead of `import` here, because es6-modules do not allow - * dynamic imports and uglify-js is an optional dependency. Since we are inside NodeJS here, this - * should not be a problem. - * - * @param {string} output the compiled template - * @param {string} sourceMapFile the file to write the source map to. - */ -function minify(output, sourceMapFile) { - try { - // Try to resolve uglify-js in order to see if it does exist - require.resolve('uglify-js'); - } catch (e) { - if (e.code !== 'MODULE_NOT_FOUND') { - // Something else seems to be wrong - throw e; - } - // it does not exist! - console.error( - 'Code minimization is disabled due to missing uglify-js dependency' - ); - return output; - } - return require('uglify-js').minify(output.code, { - sourceMap: { - content: output.map, - url: sourceMapFile - } - }); -} diff --git a/node_modules/handlebars/package.json b/node_modules/handlebars/package.json deleted file mode 100644 index b17d7ca5..00000000 --- a/node_modules/handlebars/package.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "_from": "handlebars@~4.7", - "_id": "handlebars@4.7.7", - "_inBundle": false, - "_integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "_location": "/handlebars", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "handlebars@~4.7", - "name": "handlebars", - "escapedName": "handlebars", - "rawSpec": "~4.7", - "saveSpec": null, - "fetchSpec": "~4.7" - }, - "_requiredBy": [ - "/@antora/page-composer" - ], - "_resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "_shasum": "9ce33416aad02dbd6c8fafa8240d5d98004945a1", - "_spec": "handlebars@~4.7", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/page-composer", - "author": { - "name": "Yehuda Katz" - }, - "barename": "handlebars", - "bin": { - "handlebars": "bin/handlebars" - }, - "browser": { - ".": "./dist/cjs/handlebars.js", - "./runtime": "./dist/cjs/handlebars.runtime.js" - }, - "bugs": { - "url": "https://github.com/wycats/handlebars.js/issues" - }, - "bundleDependencies": false, - "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - }, - "deprecated": false, - "description": "Handlebars provides the power necessary to let you build semantic templates effectively with no frustration", - "devDependencies": { - "@knappi/grunt-saucelabs": "^9.0.2", - "aws-sdk": "^2.1.49", - "babel-loader": "^5.0.0", - "babel-runtime": "^5.1.10", - "benchmark": "~1.0", - "chai": "^4.2.0", - "chai-diff": "^1.0.1", - "concurrently": "^5.0.0", - "dirty-chai": "^2.0.1", - "dtslint": "^0.5.5", - "dustjs-linkedin": "^2.0.2", - "eco": "~1.1.0-rc-3", - "eslint": "^6.7.2", - "eslint-config-prettier": "^6.7.0", - "eslint-plugin-compat": "^3.3.0", - "eslint-plugin-es5": "^1.4.1", - "fs-extra": "^8.1.0", - "grunt": "^1.0.4", - "grunt-babel": "^5.0.0", - "grunt-bg-shell": "^2.3.3", - "grunt-cli": "^1", - "grunt-contrib-clean": "^1", - "grunt-contrib-concat": "^1", - "grunt-contrib-connect": "^1", - "grunt-contrib-copy": "^1", - "grunt-contrib-requirejs": "^1", - "grunt-contrib-uglify": "^1", - "grunt-contrib-watch": "^1.1.0", - "grunt-webpack": "^1.0.8", - "husky": "^3.1.0", - "jison": "~0.3.0", - "lint-staged": "^9.5.0", - "mocha": "^5", - "mock-stdin": "^0.3.0", - "mustache": "^2.1.3", - "nyc": "^14.1.1", - "prettier": "^1.19.1", - "semver": "^5.0.1", - "sinon": "^7.5.0", - "typescript": "^3.4.3", - "underscore": "^1.5.1", - "webpack": "^1.12.6", - "webpack-dev-server": "^1.12.1" - }, - "engines": { - "node": ">=0.4.7" - }, - "files": [ - "bin", - "dist/*.js", - "dist/amd/**/*.js", - "dist/cjs/**/*.js", - "lib", - "print-script", - "release-notes.md", - "runtime.js", - "types/*.d.ts", - "runtime.d.ts" - ], - "homepage": "http://www.handlebarsjs.com/", - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "jspm": { - "main": "handlebars", - "directories": { - "lib": "dist/amd" - }, - "buildConfig": { - "minify": true - } - }, - "keywords": [ - "handlebars", - "mustache", - "template", - "html" - ], - "license": "MIT", - "lint-staged": { - "*.{js,css,json,md}": [ - "prettier --write", - "git add" - ], - "*.js": [ - "eslint --fix", - "git add" - ] - }, - "main": "lib/index.js", - "name": "handlebars", - "optionalDependencies": { - "uglify-js": "^3.1.4" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/wycats/handlebars.js.git" - }, - "scripts": { - "--- combined tasks ---": "", - "check-before-pull-request": "concurrently --kill-others-on-fail npm:lint npm:dtslint npm:check-format npm:test", - "check-format": "prettier --check '**/*.js'", - "dtslint": "dtslint types", - "extensive-tests-and-publish-to-aws": "npx mocha tasks/task-tests/ && grunt --stack extensive-tests-and-publish-to-aws", - "format": "prettier --write '**/*.js' && eslint --fix .", - "integration-test": "grunt integration-tests", - "lint": "eslint --max-warnings 0 .", - "test": "grunt" - }, - "types": "types/index.d.ts", - "version": "4.7.7" -} diff --git a/node_modules/handlebars/print-script b/node_modules/handlebars/print-script deleted file mode 100755 index 046b99c1..00000000 --- a/node_modules/handlebars/print-script +++ /dev/null @@ -1,95 +0,0 @@ -#! /usr/bin/env node -/* eslint-disable no-console, no-var */ -// Util script for debugging source code generation issues - -var script = process.argv[2].replace(/\\n/g, '\n'), - verbose = process.argv[3] === '-v'; - -var Handlebars = require('./lib'), - SourceMap = require('source-map'), - SourceMapConsumer = SourceMap.SourceMapConsumer; - -var template = Handlebars.precompile(script, { - srcName: 'input.hbs', - destName: 'output.js', - - assumeObjects: true, - compat: false, - strict: true, - trackIds: true, - knownHelpersOnly: false - }); - -if (!verbose) { - console.log(template); -} else { - var consumer = new SourceMapConsumer(template.map), - lines = template.code.split('\n'), - srcLines = script.split('\n'); - - console.log(); - console.log('Source:'); - srcLines.forEach(function(source, index) { - console.log(index + 1, source); - }); - console.log(); - console.log('Generated:'); - console.log(template.code); - lines.forEach(function(source, index) { - console.log(index + 1, source); - }); - console.log(); - console.log('Map:'); - console.log(template.map); - console.log(); - - function collectSource(lines, lineName, colName, order) { - var ret = {}, - ordered = [], - last; - - function collect(current) { - if (last) { - var mapLines = lines.slice(last[lineName] - 1, current && current[lineName]); - if (mapLines.length) { - if (current) { - mapLines[mapLines.length - 1] = mapLines[mapLines.length - 1].slice(0, current[colName]); - } - mapLines[0] = mapLines[0].slice(last[colName]); - } - ret[last[lineName] + ':' + last[colName]] = mapLines.join('\n'); - ordered.push({ - startLine: last[lineName], - startCol: last[colName], - endLine: current && current[lineName] - }); - } - last = current; - } - - consumer.eachMapping(collect, undefined, order); - collect(); - - return ret; - } - - srcLines = collectSource(srcLines, 'originalLine', 'originalColumn', SourceMapConsumer.ORIGINAL_ORDER); - lines = collectSource(lines, 'generatedLine', 'generatedColumn'); - - consumer.eachMapping(function(mapping) { - var originalSrc = srcLines[mapping.originalLine + ':' + mapping.originalColumn], - generatedSrc = lines[mapping.generatedLine + ':' + mapping.generatedColumn]; - - if (!mapping.originalLine) { - console.log('generated', mapping.generatedLine + ':' + mapping.generatedColumn, generatedSrc); - } else { - console.log('map', - mapping.source, - mapping.originalLine + ':' + mapping.originalColumn, - originalSrc, - '->', - mapping.generatedLine + ':' + mapping.generatedColumn, - generatedSrc); - } - }); -} diff --git a/node_modules/handlebars/release-notes.md b/node_modules/handlebars/release-notes.md deleted file mode 100644 index cabef32b..00000000 --- a/node_modules/handlebars/release-notes.md +++ /dev/null @@ -1,1091 +0,0 @@ -# Release Notes - -## Development - -[Commits](https://github.com/handlebars-lang/handlebars.js/compare/v4.7.7...master) - -## v4.7.7 - February 15th, 2021 - -- fix weird error in integration tests - eb860c0 -- fix: check prototype property access in strict-mode (#1736) - b6d3de7 -- fix: escape property names in compat mode (#1736) - f058970 -- refactor: In spec tests, use expectTemplate over equals and shouldThrow (#1683) - 77825f8 -- chore: start testing on Node.js 12 and 13 - 3789a30 - -(POSSIBLY) BREAKING CHANGES: - -- the changes from version [4.6.0](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md#v460---january-8th-2020) now also apply - in when using the compile-option "strict: true". Access to prototype properties is forbidden completely by default, specific properties or methods - can be allowed via runtime-options. See #1633 for details. If you are using Handlebars as documented, you should not be accessing prototype properties - from your template anyway, so the changes should not be a problem for you. Only the use of undocumented features can break your build. - -That is why we only bump the patch version despite mentioning breaking changes. - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.7.6...v4.7.7) - -## v4.7.6 - April 3rd, 2020 - -Chore/Housekeeping: - -- [#1672](https://github.com/wycats/handlebars.js/issues/1672) - Switch cmd parser to latest minimist ([@dougwilson](https://api.github.com/users/dougwilson) - -Compatibility notes: - -- Restored Node.js compatibility - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.7.5...v4.7.6) - -## v4.7.5 - April 2nd, 2020 - -Chore/Housekeeping: - -- ~Node.js version support has been changed to v6+~ Reverted in 4.7.6 - -Compatibility notes: - -- ~Node.js < v6 is no longer supported~ Reverted in 4.7.6 - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.7.4...v4.7.5) - -## v4.7.4 - April 1st, 2020 - -Chore/Housekeeping: - -- [#1666](https://github.com/wycats/handlebars.js/issues/1666) - Replaced minimist with yargs for handlebars CLI ([@aorinevo](https://api.github.com/users/aorinevo), [@AviVahl](https://api.github.com/users/AviVahl) & [@fabb](https://api.github.com/users/fabb)) - -Compatibility notes: - -- No incompatibilities are to be expected - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.7.3...v4.7.4) - -## v4.7.3 - February 5th, 2020 - -Chore/Housekeeping: - -- [#1644](https://github.com/wycats/handlebars.js/issues/1644) - Download links to aws broken on handlebarsjs.com - access denied ([@Tea56](https://api.github.com/users/Tea56)) -- Fix spelling and punctuation in changelog - d78cc73 - -Bugfixes: - -- Add Type Definition for Handlebars.VERSION, Fixes #1647 - 4de51fe -- Include Type Definition for runtime.js in Package - a32d05f - -Compatibility notes: - -- No incompatibilities are to be expected - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.7.2...v4.7.3) - -## v4.7.2 - January 13th, 2020 - -Bugfixes: - -- fix: don't wrap helpers that are not functions - 9d5aa36, #1639 - -Chore/Build: - -- chore: execute saucelabs-task only if access-key exists - a4fd391 - -Compatibility notes: - -- No breaking changes are to be expected - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.7.1...v4.7.2) - -## v4.7.1 - January 12th, 2020 - -Bugfixes: - -- fix: fix log output in case of illegal property access - f152dfc -- fix: log error for illegal property access only once per property - 3c1e252 - -Compatibility notes: - -- no incompatibilities are to be expected. - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.7.0...v4.7.1) - -## v4.7.0 - January 10th, 2020 - -Features: - -- feat: default options for controlling proto access - 7af1c12, #1635 - - This makes it possible to disable the prototype access restrictions added in 4.6.0 - - an error is logged in the console, if access to prototype properties is attempted and denied - and no explicit configuration has taken place. - -Compatibility notes: - -- no compatibilities are expected - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.6.0...v4.7.0) - -## v4.6.0 - January 8th, 2020 - -Features: - -- feat: access control to prototype properties via whitelist (#1633)- d03b6ec - -Bugfixes: - -- fix(runtime.js): partials compile not caching (#1600) - 23d58e7 - -Chores, docs: - -- various refactorings and improvements to tests - d7f0dcf, 187d611, d337f40 -- modernize the build-setup - - use prettier to format and eslint to verify - c40d9f3, 8901c28, e97685e, 1f61f21 - - use nyc instead of istanbul to collect coverage - 164b7ff, 1ebce2b - - update build code to use modern javascript and make it cleaner - 14b621c, 1ec1737, 3a5b65e, dde108e, 04b1984, 587e7a3 - - restructur build commands - e913dc5, -- eslint rule changes - ac4655e, dc54952 -- Update (C) year in the LICENSE file - d1fb07b -- chore: try to fix saucelabs credentials (#1627) - -- Update readme.md with updated links (#1620) - edcc84f - -BREAKING CHANGES: - -- access to prototype properties is forbidden completely by default, - specific properties or methods can be allowed via runtime-options. - See #1633 for details. - If you are using Handlebars as documented, you should not be accessing prototype - properties from your template anyway, so the changes should not be a problem - for you. Only the use of undocumented features can break your build. - - That is why we only bump the minor version despite mentioning breaking changes. - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.5.3...v4.6.0) - -## v4.5.3 - November 18th, 2019 - -Bugfixes: - -- fix: add "no-prototype-builtins" eslint-rule and fix all occurences - f7f05d7 -- fix: add more properties required to be enumerable - 1988878 - -Chores / Build: - -- fix: use !== 0 instead of != 0 - c02b05f -- add chai and dirty-chai and sinon, for cleaner test-assertions and spies, - deprecate old assertion-methods - 93e284e, 886ba86, 0817dad, 93516a0 - -Security: - -- The properties `__proto__`, `__defineGetter__`, `__defineSetter__` and `__lookupGetter__` - have been added to the list of "properties that must be enumerable". - If a property by that name is found and not enumerable on its parent, - it will silently evaluate to `undefined`. This is done in both the compiled template and the "lookup"-helper. - This will prevent new Remote-Code-Execution exploits that have been - published recently. - -Compatibility notes: - -- Due to the security-fixes. The semantics of the templates using - `__proto__`, `__defineGetter__`, `__defineSetter__` and `__lookupGetter__` in the respect that those expression now return - `undefined` rather than their actual value from the proto. -- The semantics have not changed in cases where the properties are enumerable, as in: - -```js -{ - __proto__: 'some string'; -} -``` - -- The change may be breaking in that respect, but we still only - increase the patch-version, because the incompatible use-cases - are not intended, undocumented and far less important than fixing - Remote-Code-Execution exploits on existing systems. - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.5.2...v4.5.3) - -## v4.5.2 - November 13th, 2019 - -# Bugfixes - -- fix: use String(field) in lookup when checking for "constructor" - d541378 -- test: add fluent API for testing Handlebars - c2ac79c - -Compatibility notes: - -- no incompatibility are to be expected - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.5.1...v4.5.2) - -## v4.5.1 - October 29th, 2019 - -Bugfixs - -- fix: move "eslint-plugin-compat" to devDependencies - 5e9d17f (#1589) - -Compatibility notes: - -- No compatibility issues are to be expected - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.5.0...v4.5.1) - -## v4.5.0 - October 28th, 2019 - -Features / Improvements - -- Add method Handlebars.parseWithoutProcessing (#1584) - 62ed3c2 -- add guard to if & unless helpers (#1549) -- show source location for the strict lookup exceptions - feb60f8 - -Bugfixes: - -- Use objects for hash value tracking - 7fcf9d2 - -Chore: - -- Resolve deprecation warning message from eslint while running eslint (#1586) - 7052e88 -- chore: add eslint-plugin-compat and eslint-plugin-es5 - 088e618 - -Compatibility notes: - -- No compatibility issues are to be expected - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.4.5...v4.5.0) - -## v4.4.5 - October 20th, 2019 - -Bugfixes: - -- Contents of raw-blocks must be matched with non-eager regex-matching - 8d5530e, #1579 - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.4.4...v4.4.5) - -## v4.4.4 - October 20th, 2019 - -Bugfixes: - -- fix: prevent zero length tokens in raw-blocks (#1577, #1578) - f1752fe - -Chore: - -- chore: link to s3 bucket with https, add "npm ci" to build instructions - 0b593bf - -Compatibility notes: - -- no compatibility issues are expected - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.4.3...v4.4.4) - -## v4.4.3 - October 8th, 2019 - -Bugfixes - -Typings: - -- add missing type fields to AST typings and add tests for them - 0440af2 - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.4.2...v4.4.3) - -## v4.4.2 - October 2nd, 2019 - -- chore: fix grunt-saucelabs dependency - b7eada0 - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.4.1...v4.4.2) - -## v4.4.1 - October 2nd, 2019 - -- [#1562](https://github.com/wycats/handlebars.js/issues/1562) - Error message for syntax error missing location in 4.2.1+ - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.4.0...v4.4.1) - -## v4.4.0 - September 29th, 2019 - -- Added support for iterable objects in {{#each}} helper (#1557) - cf7545e - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.3.4...v4.4.0) - -## v4.3.4 - September 28th, 2019 - -- fix: harden "propertyIsEnumerable"-check - ff4d827 - -Compatibility notes: - -- No incompatibilities are known. - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.3.3...v4.3.4) - -## v4.3.3 - September 27th, 2019 - -- fix test case for browsers that do not support **defineGetter** - 8742bde - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.3.2...v4.3.3) - -## v4.3.2 - September 26th, 2019 - -- Use Object.prototype.propertyIsEnumerable to check for constructors - 213c0bb, #1563 - -Compatibility notes: - -- There are no breaking changes - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.3.1...v4.3.2) - -## v4.3.1 - September 25th, 2019 - -Fixes: - -- do not break on precompiled templates from Handlebars >=4.0.0 <4.3.0 - 1266838, #1561 -- Ensure allowCallsToHelperMissing runtime option is optional in typings - 93444c5, 64ecb9e, #1560 - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.3.0...v4.3.1) - -## v4.3.0 - September 24th, 2019 - -Fixes: - -- Security: Disallow calling "helperMissing" and "blockHelperMissing" directly - 2078c72 -- Disallow calling "helperMissing" and "blockHelperMissing" directly - 2078c72 - -Features: - -- Add new runtime option `allowCallsToHelperMissing` to allow calling `blockHelperMissing` and `helperMissing`. - -Breaking changes: - -Compatibility notes: - -- Compiler revision increased - 06b7224 - - - This means that template compiled with versions prior to 4.3.0 will not work with runtimes >= 4.3.0 - The increase was done because the "helperMissing" and "blockHelperMissing" are now moved from the helpers - to the internal "container.hooks" object, so old templates will not be able to call them anymore. We suggest - that you always recompile your templates with the latest compiler in your build pipelines. - -- Disallow calling "helperMissing" and "blockHelperMissing" directly - 2078c72 - - Calling "helperMissing" and "blockHelperMissing" directly from a template (like in `{{blockHelperMissing}}` was - never intended and was part of the exploits that have been revealed early in 2019 - (see https://github.com/wycats/handlebars.js/issues/1495). _It is also part of a new exploit that - is not captured by the earlier fix._ In order to harden Handlebars against such exploits, calling thos helpers - is now not possible anymore. _Overriding_ those helpers is still possible. - - If you really need this behavior, you can set the runtime option `allowCallsToHelperMissing` to `true` and the - calls will again be possible - -Both bullet points imly that Handlebars is not 100% percent compatible to 4.2.0, despite the minor version bump. - -We consider it more important to resolve a major security issue than to maintain 100% compatibility. - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.2.1...v4.3.0) - -## v4.2.1 - September 20th, 2019 - -Bugfixes: - -- The "browser" property in the package.json has been updated to use the common-js builds instead of the minified UMD - c55a7be, #1553 - -Compatibility notes: - -- No compatibility issues should arise - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.2.0...v4.2.1) - -## v4.2.0 - September 3rd, 2019 - -Chore/Test: - -- Use custom `grunt-saucelab` with current sauce-connect proxy - f119497 -- Add framework for various integration tests - f9cce4d -- Add integration test for webpack - a57b682 - -Bugfixes: - -- [#1544](https://github.com/wycats/handlebars.js/issues/1544) - Typescript types: `knownHelpers` doesnt allow for custom helpers ([@NickCis](https://api.github.com/users/NickCis)) -- [#1534](https://github.com/wycats/handlebars.js/pull/1534) - Add typings for "Handlebars.VM.resolvePartial ([@AndrewLeedham](https://api.github.com/users/AndrewLeedham)) - -Features: - -- [#1540](https://github.com/wycats/handlebars.js/pull/1540) - added "browser"-property to package.json, resolves #1102 ([@ouijan](https://api.github.com/users/ouijan)) - -Compatibility notes: - -- The new "browser"-property should not break anything, but you can never be sure. The integration test for webpack - shows that it works, but if it doesn't please open an issue. - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.1.2-0...v4.2.0) - -## v4.1.2-0 - August 25th, 2019 - -[#1540](https://github.com/wycats/handlebars.js/pull/1540) - added browser to package.json, resolves #1102 ([@ouijan](https://api.github.com/users/ouijan)) - -Compatibility notes: - -- We are not sure if imports via webpack are still working, which is why this release is a pre-release - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.1.2...v4.1.2-0) - -## v4.1.2 - April 13th, 2019 - -Chore/Test: - -- [#1515](https://github.com/wycats/handlebars.js/pull/1515) - Port over linting and test for typings ([@zimmi88](https://api.github.com/users/zimmi88)) -- chore: add missing typescript dependency, add package-lock.json - 594f1e3 -- test: remove safari from saucelabs - 871accc - -Bugfixes: - -- fix: prevent RCE through the "lookup"-helper - cd38583 - -Compatibility notes: - -Access to the constructor of a class thought `{{lookup obj "constructor" }}` is now prohibited. This closes -a leak that only half closed in versions 4.0.13 and 4.1.0, but it is a slight incompatibility. - -This kind of access is not the intended use of Handlebars and leads to the vulnerability described -in #1495. We will **not** increase the major version, because such use is not intended or documented, -and because of the potential impact of the issue (we fear that most people won't use a new major version -and the issue may not be resolved on many systems). - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.1.1...v4.1.2) - -## v4.1.1 - March 16th, 2019 - -Bugfixes: - -- fix: add "runtime.d.ts" to allow "require('handlebars/runtime')" in TypeScript - 5cedd62 - -Refactorings: - -- replace "async" with "neo-async" - 048f2ce -- use "substring"-function instead of "substr" - 445ae12 - -Compatibility notes: - -- This is a bugfix release. There are no breaking change and no new features. - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.1.0...v4.1.1) - -## v4.1.0 - February 7th, 2019 - -New Features - -- import TypeScript typings - 27ac1ee - -Security fixes: - -- disallow access to the constructor in templates to prevent RCE - 42841c4, #1495 - -Housekeeping - -- chore: fix components/handlebars package.json and auto-update on release - bacd473 -- chore: Use node 10 to build handlebars - 78dd89c -- chore/doc: Add more release docs - 6b87c21 - -Compatibility notes: - -Access to class constructors (i.e. `({}).constructor`) is now prohibited to prevent -Remote Code Execution. This means that following construct will no work anymore: - -``` -class SomeClass { -} - -SomeClass.staticProperty = 'static' - -var template = Handlebars.compile('{{constructor.staticProperty}}'); -document.getElementById('output').innerHTML = template(new SomeClass()); -// expected: 'static', but now this is empty. -``` - -This kind of access is not the intended use of Handlebars and leads to the vulnerability described in #1495. We will **not** increase the major version, because such use is not intended or documented, and because of the potential impact of the issue (we fear that most people won't use a new major version and the issue may not be resolved on many systems). - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.12...v4.1.0) - -## v4.0.12 - September 4th, 2018 - -New features: - -- none - -Various dependency updates - -- [#1464](https://github.com/wycats/handlebars.js/pull/1464) - Bump versions of grunt-plugins to 1.x -- [#1398](https://github.com/wycats/handlebars.js/pull/1398) - Chore: updated various dev dependencies -- upgrade uglify-js - d3d3942 -- Update grunt-eslint to 20.1.0 - 7729aa9 -- Update dependencies "async" to 2.5.0 and "source-map" to 0.6.1 (73d5637) - -Bugfixes: - -- [components/handlebars.js#24](https://github.com/components/handlebars.js#24) Add package.json to components shim -- Updated `source-map`-package should work better with `rollup`[#1463](https://github.com/wycats/handlebars.js/issues/1463) - -Removed obsolete code: - -- unnecessary check - 0ddff8b -- Use `files` field - 69c6ca5 -- Update jsfiddle to 4.0.11 - 8947dd0 - -Compatibility notes: - -- No compatibility issues are to be expected - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.11...v4.0.12) - -## v4.0.11 - October 17th, 2017 - -- [#1391](https://github.com/wycats/handlebars.js/issues/1391) - `uglify-js` is unconditionally imported, but only listed as optional dependency ([@Turbo87](https://github.com/Turbo87)) -- [#1233](https://github.com/wycats/handlebars.js/issues/1233) - Unable to build under windows - error at test:bin task ([@blikblum](https://github.com/blikblum)) -- Update (C) year in the LICENSE file - 21386b6 - -Compatibility notes: - -- This is a bugfix release. There are no breaking change and no new features. - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.10...v4.0.11) - -## v4.0.10 - May 21st, 2017 - -- Fix regression in 4.0.9: Replace "Object.assign" (not support in IE) by "util/extend" - 0e953d1 - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.9...v4.0.10) - -## v4.0.9 - May 21st, 2017 - -- [#1327](https://github.com/wycats/handlebars.js/issues/1327) Handlebars.compile() does not modify "options" anymore -- pending [#1331](https://github.com/wycats/handlebars.js/issues/1331) Attempts to build Handlebars in a Windows environment - - Fix build in windows - cc554a5 - - Ensure LF line-edings in handlebars-template fixtures (\*.hbs) - ed879a6 - - Run integration test with `node handlebars -a ...` on Windows - 2e21e2b - - Ensure LF line-edings in lexer-files (\*.l) - bdfdbea - - Force LF line-endings for spec/artifacts - b50ef03 - - Use istanbul/lib/cli.js instead of node_modules/.bin/istanbul - 6e6269f -- TravisCI: Publish valid semver tags independently of the branch - 7378f85 - -Compatibility notes: - -- No compatibility issues are expected. - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.8...v4.0.9) - -## v4.0.8 - May 2nd, 2017 - -- [#1341](https://github.com/wycats/handlebars.js/issues/1341) [#1342](https://github.com/wycats/handlebars.js/issues/1342) Allow partial-blocks to be executed without "options" ([@nknapp](https://github.com/nknapp)) - a00c598 - -Compatibility notes: - -- No breaking changes - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.7...v4.0.8) - -## v4.0.7 - April 29th, 2017 - -- [#1319](https://github.com/wycats/handlebars.js/issues/1319): Fix context-stack when calling block-helpers on null values ([@nknapp](https://github.com/nknapp)) - c8f4b57 -- [#1315](https://github.com/wycats/handlebars.js/pull/1315) Parser: Change suffix to use ES6 default module export ([@Turbo87](https://github.com/Turbo87))- b617375 -- [#1290](https://github.com/wycats/handlebars.js/pull/1290) [#1252](https://github.com/wycats/handlebars.js/issue/1290) Add more tests for partial-blocks and inline partials ([@nknapp](https://github.com/nknapp)) - 63a8e0c -- [#1252](https://github.com/wycats/handlebars.js/issue/1290) Using @partial-block twice in a template not possible ([@nknapp](https://github.com/nknapp)) - 5a164d0 -- [#1310](https://github.com/wycats/handlebars.js/pull/1310) Avoid duplicate "sourceMappingURL=" lines. ([@joonas-lahtinen](https://github.com/joonas-lahtinen)) - 01b0f65 -- [#1275](https://github.com/wycats/handlebars.js/pull/1275) require('sys') is deprecated, using 'util' instead ([@travnels](https://github.com/travnels)) - 406f2ee -- [#1285](https://github.com/wycats/handlebars.js/pull/1285) [#1284](https://github.com/wycats/handlebars.js/issues/1284) Make "column"-property of Errors enumerable ([@nknapp](https://github.com/nknapp)) - a023cb4 -- [#1285](https://github.com/wycats/handlebars.js/pull/1285) Testcase to verify that compile-errors have a column-property ([@nknapp](https://github.com/nknapp)) - c7dc353 - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.6...v4.0.7) - -## v4.0.6 - November 12th, 2016 - -- [#1243](https://github.com/wycats/handlebars.js/pull/1243) - Walk up data frames for nested @partial-block ([@lawnsea](https://github.com/lawnsea)) -- [#1210](https://github.com/wycats/handlebars.js/pull/1210) - Add a new lightweight package based on handlebars in the README ([@kabirbaidhya](https://github.com/kabirbaidhya)) -- [#1187](https://github.com/wycats/handlebars.js/pull/1187) - Ensure that existing blockParams and depths are respected on dupe programs ([@charleso](https://github.com/charleso)) -- [#1191](https://github.com/wycats/handlebars.js/pull/1191) - Added cory ([@leo](https://github.com/leo)) -- [#1177](https://github.com/wycats/handlebars.js/pull/1177) - Preserve License info in Closure Compiler ([@gennadiylitvinyuk](https://github.com/gennadiylitvinyuk)) -- [#1171](https://github.com/wycats/handlebars.js/pull/1171) - Contributing doc fix: failing thats -> failing tests ([@paulfalgout](https://github.com/paulfalgout)) -- [#1166](https://github.com/wycats/handlebars.js/pull/1166) - Update license date ([@timwangdev](https://github.com/timwangdev)) -- Update jsfiddle to point to latest - 959ee55 (originally dfc7554 by [@kpdecker](https://github.com/kpdecker)) -- [#1163](https://github.com/wycats/handlebars.js/pull/1163) - Fix typos on decorators-api.md. ([@adjohnson916](https://github.com/adjohnson916)) -- Drop extra Error params - 8c19874 (originally 63fdb92 by [@kpdecker](https://github.com/kpdecker)) -- [#1153](https://github.com/wycats/handlebars.js/pull/1153) - Add documentation for running tests to contributing.md ([@ryanmurakami](https://github.com/ryanmurakami)) -- Avoid error in older browsers in test - 400916c (originally a6121ca by [@kpdecker](https://github.com/kpdecker)) -- Update target browser test versions - fee2334 (originally 871c32a by [@kpdecker](https://github.com/kpdecker)) -- Exclude coverage check in exception conditional - 32d6363 (originally 326734b by [@kpdecker](https://github.com/kpdecker)) -- Fix throw when creating exception object in Safari - 20c965c (originally 2ea6119 by [@kpdecker](https://github.com/kpdecker)) -- Update build for modern node versions - 6c9f98c (originally 8289c0b by [@kpdecker](https://github.com/kpdecker)) -- [#1135](https://github.com/wycats/handlebars.js/issues/1135) - Relax depth check for context push - c393c81 (originally 25458fd by [@kpdecker](https://github.com/kpdecker)) - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.5...v4.0.6) - -## v4.0.5 - November 19th, 2015 - -- [#1132](https://github.com/wycats/handlebars.js/pull/1132) - Update uglify-js to avoid vulnerability ([@plynchnlm](https://github.com/plynchnlm)) -- [#1129](https://github.com/wycats/handlebars.js/issues/1129) - Minified lib returns an empty string ([@bricss](https://github.com/bricss)) -- Return current handlebars instance from noConflict - 685cf92 -- Add webpack to dev dependency to support npm 3 - 7a6c228 -- Further relax uglify dependency - 0a3b3c2 -- Include tests for minimized artifacts - c21118d -- Fix lint errors under latest eslint - 9f59de9 -- Add print-script helper script - 98a6717 - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.4...v4.0.5) - -## v4.0.4 - October 29th, 2015 - -- [#1121](https://github.com/wycats/handlebars.js/pull/1121) - Include partial name in 'undefined partial' exception message ([@shinypb](https://github.com/shinypb)) -- [#1125](https://github.com/wycats/handlebars.js/pull/1125) - Add promised-handlebars to "in-the-wild"-list ([@nknapp](https://github.com/nknapp)) - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.3...v4.0.4) - -## v4.0.3 - September 23rd, 2015 - -- [#1099](https://github.com/wycats/handlebars.js/issues/1099) - @partial-block is overridden ([@btmorex](https://github.com/btmorex)) -- [#1093](https://github.com/wycats/handlebars.js/issues/1093) - #each skips iteration on undefined values ([@florianpilz](https://github.com/florianpilz)) -- [#1092](https://github.com/wycats/handlebars.js/issues/1092) - Square braces in key name ([@distantnative](https://github.com/distantnative)) -- [#1091](https://github.com/wycats/handlebars.js/pull/1091) - fix typo in release notes ([@nikolas](https://github.com/nikolas)) -- [#1090](https://github.com/wycats/handlebars.js/pull/1090) - grammar fixes in 4.0.0 release notes ([@nikolas](https://github.com/nikolas)) - -Compatibility notes: - -- `each` iteration with `undefined` values has been restored to the 3.0 behaviors. Helper calls with undefined context values will now execute against an arbitrary empty object to avoid executing against global object in non-strict mode. -- `]` can now be included in `[]` wrapped identifiers by escaping with `\`. Any `[]` identifiers that include `\` will now have to properly escape these values. - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.2...v4.0.3) - -## v4.0.2 - September 4th, 2015 - -- [#1089](https://github.com/wycats/handlebars.js/issues/1089) - "Failover content" not working in multiple levels of inline partials ([@michaellopez](https://github.com/michaellopez)) - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.1...v4.0.2) - -## v4.0.1 - September 2nd, 2015 - -- Fix failure when using decorators in partials - 05b82a2 - -[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.0...v4.0.1) - -## v4.0.0 - September 1st, 2015 - -- [#1082](https://github.com/wycats/handlebars.js/pull/1082) - Decorators and Inline Partials ([@kpdecker](https://github.com/kpdecker)) -- [#1076](https://github.com/wycats/handlebars.js/pull/1076) - Implement partial blocks ([@kpdecker](https://github.com/kpdecker)) -- [#1087](https://github.com/wycats/handlebars.js/pull/1087) - Fix #each when last object entry has empty key ([@denniskuczynski](https://github.com/denniskuczynski)) -- [#1084](https://github.com/wycats/handlebars.js/pull/1084) - Bump uglify version to fix vulnerability ([@John-Steidley](https://github.com/John-Steidley)) -- [#1068](https://github.com/wycats/handlebars.js/pull/1068) - Fix typo ([@0xack13](https://github.com/0xack13)) -- [#1060](https://github.com/wycats/handlebars.js/pull/1060) - #1056 Fixed grammar for nested raw blocks ([@ericbn](https://github.com/ericbn)) -- [#1052](https://github.com/wycats/handlebars.js/pull/1052) - Updated year in License ([@maqnouch](https://github.com/maqnouch)) -- [#1037](https://github.com/wycats/handlebars.js/pull/1037) - Fix minor typos in README ([@tomxtobin](https://github.com/tomxtobin)) -- [#1032](https://github.com/wycats/handlebars.js/issues/1032) - Is it possible to render a partial without the parent scope? ([@aputinski](https://github.com/aputinski)) -- [#1019](https://github.com/wycats/handlebars.js/pull/1019) - Fixes typo in tests ([@aymerick](https://github.com/aymerick)) -- [#1016](https://github.com/wycats/handlebars.js/issues/1016) - Version mis-match ([@mayankdedhia](https://github.com/mayankdedhia)) -- [#1023](https://github.com/wycats/handlebars.js/issues/1023) - is it possible for nested custom helpers to communicate between each other? -- [#893](https://github.com/wycats/handlebars.js/issues/893) - [Proposal] Section blocks. -- [#792](https://github.com/wycats/handlebars.js/issues/792) - feature request: inline partial definitions -- [#583](https://github.com/wycats/handlebars.js/issues/583) - Parent path continues to drill down depth with multiple conditionals -- [#404](https://github.com/wycats/handlebars.js/issues/404) - Add named child helpers that can be referenced by block helpers -- Escape = in HTML content - [83b8e84](https://github.com/wycats/handlebars.js/commit/83b8e84) -- Drop AST constructors in favor of JSON - [95d84ba](https://github.com/wycats/handlebars.js/commit/95d84ba) -- Pass container rather than exec as context - [9a2d1d6](https://github.com/wycats/handlebars.js/commit/9a2d1d6) -- Add ignoreStandalone compiler option - [ea3a5a1](https://github.com/wycats/handlebars.js/commit/ea3a5a1) -- Ignore empty when iterating on sparse arrays - [06d515a](https://github.com/wycats/handlebars.js/commit/06d515a) -- Add support for string and stdin precompilation - [0de8dac](https://github.com/wycats/handlebars.js/commit/0de8dac) -- Simplify object assignment generation logic - [77e6bfc](https://github.com/wycats/handlebars.js/commit/77e6bfc) -- Bulletproof AST.helpers.helperExpression - [93b0760](https://github.com/wycats/handlebars.js/commit/93b0760) -- Always return string responses - [8e868ab](https://github.com/wycats/handlebars.js/commit/8e868ab) -- Pass undefined fields to helpers in strict mode - [5d4b8da](https://github.com/wycats/handlebars.js/commit/5d4b8da) -- Avoid depth creation when context remains the same - [279e038](https://github.com/wycats/handlebars.js/commit/279e038) -- Improve logging API - [9a49d35](https://github.com/wycats/handlebars.js/commit/9a49d35) -- Fix with operator in no @data mode - [231a8d7](https://github.com/wycats/handlebars.js/commit/231a8d7) -- Allow empty key name in each iteration - [1bb640b](https://github.com/wycats/handlebars.js/commit/1bb640b) -- Add with block parameter support - [2a85106](https://github.com/wycats/handlebars.js/commit/2a85106) -- Fix escaping of non-javascript identifiers - [410141c](https://github.com/wycats/handlebars.js/commit/410141c) -- Fix location information for programs - [93faffa](https://github.com/wycats/handlebars.js/commit/93faffa) - -Compatibility notes: - -- Depthed paths are now conditionally pushed on to the stack. If the helper uses the same context, then a new stack is not created. This leads to behavior that better matches expectations for helpers like `if` that do not seem to alter the context. Any instances of `../` in templates will need to be checked for the correct behavior under 4.0.0. In general templates will either reduce the number of `../` instances or leave them as is. See [#1028](https://github.com/wycats/handlebars.js/issues/1028). -- The `=` character is now HTML escaped. This closes a potential exploit case when using unquoted attributes, i.e. `<div foo={{bar}}>`. In general it's recommended that attributes always be quoted when their values are generated from a mustache to avoid any potential exploit surfaces. -- AST constructors have been dropped in favor of plain old javascript objects -- The runtime version has been increased. Precompiled templates will need to use runtime of at least 4.0.0. - -[Commits](https://github.com/wycats/handlebars.js/compare/v3.0.3...v4.0.0) - -## v3.0.3 - April 28th, 2015 - -- [#1004](https://github.com/wycats/handlebars.js/issues/1004) - Latest version breaks with RequireJS (global is undefined) ([@boskee](https://github.com/boskee)) - -[Commits](https://github.com/wycats/handlebars.js/compare/v3.0.2...v3.0.3) - -## v3.0.2 - April 20th, 2015 - -- [#998](https://github.com/wycats/handlebars.js/pull/998) - Add full support for es6 ([@kpdecker](https://github.com/kpdecker)) -- [#994](https://github.com/wycats/handlebars.js/issues/994) - Access Handlebars.Visitor in browser ([@tamlyn](https://github.com/tamlyn)) -- [#990](https://github.com/wycats/handlebars.js/issues/990) - Allow passing null/undefined literals subexpressions ([@blimmer](https://github.com/blimmer)) -- [#989](https://github.com/wycats/handlebars.js/issues/989) - Source-map error with requirejs ([@SteppeEagle](https://github.com/SteppeEagle)) -- [#967](https://github.com/wycats/handlebars.js/issues/967) - can't access "this" property ([@75lb](https://github.com/75lb)) -- Use captureStackTrace for error handler - a009a97 -- Ignore branches tested without coverage monitoring - 37a664b - -[Commits](https://github.com/wycats/handlebars.js/compare/v3.0.1...v3.0.2) - -## v3.0.1 - March 24th, 2015 - -- [#984](https://github.com/wycats/handlebars.js/pull/984) - Adding documentation for passing arguments into partials ([@johneke](https://github.com/johneke)) -- [#973](https://github.com/wycats/handlebars.js/issues/973) - version 3 is slower than version 2 ([@elover](https://github.com/elover)) -- [#966](https://github.com/wycats/handlebars.js/issues/966) - "handlebars --version" does not work with v3.0.0 ([@abloomston](https://github.com/abloomston)) -- [#964](https://github.com/wycats/handlebars.js/pull/964) - default is a reserved word ([@grassick](https://github.com/grassick)) -- [#962](https://github.com/wycats/handlebars.js/pull/962) - Add dashbars' link on README. ([@pismute](https://github.com/pismute)) - -[Commits](https://github.com/wycats/handlebars.js/compare/v3.0.0...v3.0.1) - -## v3.0.0 - February 10th, 2015 - -- [#941](https://github.com/wycats/handlebars.js/pull/941) - Add support for dynamic partial names ([@kpdecker](https://github.com/kpdecker)) -- [#940](https://github.com/wycats/handlebars.js/pull/940) - Add missing reserved words so compiler knows to use array syntax: ([@mattflaschen](https://github.com/mattflaschen)) -- [#938](https://github.com/wycats/handlebars.js/pull/938) - Fix example using #with helper ([@diwo](https://github.com/diwo)) -- [#930](https://github.com/wycats/handlebars.js/pull/930) - Add parent tracking and mutation to AST visitors ([@kpdecker](https://github.com/kpdecker)) -- [#926](https://github.com/wycats/handlebars.js/issues/926) - Depthed lookups fail when program duplicator runs ([@kpdecker](https://github.com/kpdecker)) -- [#918](https://github.com/wycats/handlebars.js/pull/918) - Add instructions for 'spec/mustache' to CONTRIBUTING.md, fix a few typos ([@oneeman](https://github.com/oneeman)) -- [#915](https://github.com/wycats/handlebars.js/pull/915) - Ast update ([@kpdecker](https://github.com/kpdecker)) -- [#910](https://github.com/wycats/handlebars.js/issues/910) - Different behavior of {{@last}} when {{#each}} in {{#each}} ([@zordius](https://github.com/zordius)) -- [#907](https://github.com/wycats/handlebars.js/issues/907) - Implement named helper variable references ([@kpdecker](https://github.com/kpdecker)) -- [#906](https://github.com/wycats/handlebars.js/pull/906) - Add parser support for block params ([@mmun](https://github.com/mmun)) -- [#903](https://github.com/wycats/handlebars.js/issues/903) - Only provide aliases for multiple use calls ([@kpdecker](https://github.com/kpdecker)) -- [#902](https://github.com/wycats/handlebars.js/pull/902) - Generate Source Maps ([@kpdecker](https://github.com/kpdecker)) -- [#901](https://github.com/wycats/handlebars.js/issues/901) - Still escapes with noEscape enabled on isolated Handlebars environment ([@zedknight](https://github.com/zedknight)) -- [#896](https://github.com/wycats/handlebars.js/pull/896) - Simplify BlockNode by removing intermediate MustacheNode ([@mmun](https://github.com/mmun)) -- [#892](https://github.com/wycats/handlebars.js/pull/892) - Implement parser for else chaining of helpers ([@kpdecker](https://github.com/kpdecker)) -- [#889](https://github.com/wycats/handlebars.js/issues/889) - Consider extensible parser API ([@kpdecker](https://github.com/kpdecker)) -- [#887](https://github.com/wycats/handlebars.js/issues/887) - Handlebars.noConflict() option? ([@bradvogel](https://github.com/bradvogel)) -- [#886](https://github.com/wycats/handlebars.js/issues/886) - Add SafeString to context (or use duck-typing) ([@dominicbarnes](https://github.com/dominicbarnes)) -- [#870](https://github.com/wycats/handlebars.js/pull/870) - Registering undefined partial throws exception. ([@max-b](https://github.com/max-b)) -- [#866](https://github.com/wycats/handlebars.js/issues/866) - comments don't respect whitespace control ([@75lb](https://github.com/75lb)) -- [#863](https://github.com/wycats/handlebars.js/pull/863) - + jsDelivr CDN info ([@tomByrer](https://github.com/tomByrer)) -- [#858](https://github.com/wycats/handlebars.js/issues/858) - Disable new default auto-indent at included partials ([@majodev](https://github.com/majodev)) -- [#856](https://github.com/wycats/handlebars.js/pull/856) - jspm compatibility ([@MajorBreakfast](https://github.com/MajorBreakfast)) -- [#805](https://github.com/wycats/handlebars.js/issues/805) - Request: "strict" lookups ([@nzakas](https://github.com/nzakas)) - -- Export the default object for handlebars/runtime - 5594416 -- Lookup partials when undefined - 617dd57 - -Compatibility notes: - -- Runtime breaking changes. Must match 3.x runtime and precompiler. -- The AST has been upgraded to a public API. - - There are a number of changes to this, but the format is now documented in docs/compiler-api.md - - The Visitor API has been expanded to support mutation and provide a base implementation -- The `JavaScriptCompiler` APIs have been formalized and documented. As part of the sourcemap handling these should be updated to return arrays for concatenation. -- `JavaScriptCompiler.namespace` has been removed as it was unused. -- `SafeString` is now duck typed on `toHTML` - -New Features: - -- noConflict -- Source Maps -- Block Params -- Strict Mode -- @last and other each changes -- Chained else blocks -- @data methods can now have helper parameters passed to them -- Dynamic partials - -[Commits](https://github.com/wycats/handlebars.js/compare/v2.0.0...v3.0.0) - -## v2.0.0 - September 1st, 2014 - -- Update jsfiddle to 2.0.0-beta.1 - 0670f65 -- Add contrib note regarding handlebarsjs.com docs - 4d17e3c -- Play nice with gemspec version numbers - 64d5481 - -[Commits](https://github.com/wycats/handlebars.js/compare/v2.0.0-beta.1...v2.0.0) - -## v2.0.0-beta.1 - August 26th, 2014 - -- [#787](https://github.com/wycats/handlebars.js/pull/787) - Remove whitespace surrounding standalone statements ([@kpdecker](https://github.com/kpdecker)) -- [#827](https://github.com/wycats/handlebars.js/issues/827) - Render false literal as “false” ([@scoot557](https://github.com/scoot557)) -- [#767](https://github.com/wycats/handlebars.js/issues/767) - Subexpressions bug with hash and context ([@evensoul](https://github.com/evensoul)) -- Changes to 0/undefined handling - - [#731](https://github.com/wycats/handlebars.js/pull/731) - Strange behavior for {{#foo}} {{bar}} {{/foo}} when foo is 0 ([@kpdecker](https://github.com/kpdecker)) - - [#820](https://github.com/wycats/handlebars.js/issues/820) - strange behavior for {{foo.bar}} when foo is 0 or null or false ([@zordius](https://github.com/zordius)) - - [#837](https://github.com/wycats/handlebars.js/issues/837) - Strange input for custom helper ( foo.bar == false when foo is undefined ) ([@zordius](https://github.com/zordius)) -- [#819](https://github.com/wycats/handlebars.js/pull/819) - Implement recursive field lookup ([@kpdecker](https://github.com/kpdecker)) -- [#764](https://github.com/wycats/handlebars.js/issues/764) - This reference not working for helpers ([@kpdecker](https://github.com/kpdecker)) -- [#773](https://github.com/wycats/handlebars.js/issues/773) - Implicit parameters in {{#each}} introduces a peculiarity in helpers calling convention ([@Bertrand](https://github.com/Bertrand)) -- [#783](https://github.com/wycats/handlebars.js/issues/783) - helperMissing and consistency for different expression types ([@ErisDS](https://github.com/ErisDS)) -- [#795](https://github.com/wycats/handlebars.js/pull/795) - Turn the precompile script into a wrapper around a module. ([@jwietelmann](https://github.com/jwietelmann)) -- [#823](https://github.com/wycats/handlebars.js/pull/823) - Support inverse sections on the with helper ([@dan-manges](https://github.com/dan-manges)) -- [#834](https://github.com/wycats/handlebars.js/pull/834) - Refactor blocks, programs and inverses ([@mmun](https://github.com/mmun)) -- [#852](https://github.com/wycats/handlebars.js/issues/852) - {{foo~}} space control behavior is different from older version ([@zordius](https://github.com/zordius)) -- [#835](https://github.com/wycats/handlebars.js/issues/835) - Templates overwritten if file is loaded twice - -- Expose escapeExpression on the root object - 980c38c -- Remove nested function eval in blockHelperMissing - 6f22ec1 -- Fix compiler program de-duping - 9e3f824 - -Compatibility notes: - -- The default build now outputs a generic UMD wrapper. This should be transparent change but may cause issues in some environments. -- Runtime compatibility breaks in both directions. Ensure that both compiler and client are upgraded to 2.0.0-beta.1 or higher at the same time. - - `programWithDepth` has been removed an instead an array of context values is passed to fields needing depth lookups. -- `false` values are now printed to output rather than silently dropped -- Lines containing only block statements and whitespace are now removed. This matches the Mustache spec but may cause issues with code that expects whitespace to exist but would not otherwise. -- Partials that are standalone will now indent their rendered content -- `AST.ProgramNode`'s signature has changed. -- Numerious methods/features removed from pseudo-API classes - - `JavaScriptCompiler.register` - - `JavaScriptCompiler.replaceStack` no longer supports non-inline replace - - `Compiler.disassemble` - - `DECLARE` opcode - - `strip` opcode - - `lookup` opcode - - Content nodes may have their `string` values mutated over time. `original` field provides the unmodified value. -- Removed unused `Handlebars.registerHelper` `inverse` parameter -- `each` helper requires iterator parameter - -[Commits](https://github.com/wycats/handlebars.js/compare/v2.0.0-alpha.4...v2.0.0-beta.1) - -## v2.0.0-alpha.4 - May 19th, 2014 - -- Expose setup wrappers for compiled templates - 3638874 - -[Commits](https://github.com/wycats/handlebars.js/compare/v2.0.0-alpha.3...v2.0.0-alpha.4) - -## v2.0.0-alpha.3 - May 19th, 2014 - -- [#797](https://github.com/wycats/handlebars.js/pull/797) - Pass full helper ID to helperMissing when options are provided ([@tomdale](https://github.com/tomdale)) -- [#793](https://github.com/wycats/handlebars.js/pull/793) - Ensure isHelper is coerced to a boolean ([@mmun](https://github.com/mmun)) -- Refactor template init logic - 085e5e1 - -[Commits](https://github.com/wycats/handlebars.js/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) - -## v2.0.0-alpha.2 - March 6th, 2014 - -- [#756](https://github.com/wycats/handlebars.js/pull/756) - fix bug in IE<=8 (no Array::map), closes #751 ([@jenseng](https://github.com/jenseng)) -- [#749](https://github.com/wycats/handlebars.js/pull/749) - properly handle multiple subexpressions in the same hash, fixes #748 ([@jenseng](https://github.com/jenseng)) -- [#743](https://github.com/wycats/handlebars.js/issues/743) - subexpression confusion/problem? ([@waynedpj](https://github.com/waynedpj)) -- [#746](https://github.com/wycats/handlebars.js/issues/746) - [CLI] support `handlebars --version` ([@apfelbox](https://github.com/apfelbox)) -- [#747](https://github.com/wycats/handlebars.js/pull/747) - updated grunt-saucelabs, failing tests revealed ([@Jonahss](https://github.com/Jonahss)) -- Make JSON a requirement for the compiler. - 058c0fb -- Temporarily kill the AWS publish CI step - 8347ee2 - -Compatibility notes: - -- A JSON polyfill is required to run the compiler under IE8 and below. It's recommended that the precompiler be used in lieu of running the compiler on these legacy environments. - -[Commits](https://github.com/wycats/handlebars.js/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) - -## v2.0.0-alpha.1 - February 10th, 2014 - -- [#182](https://github.com/wycats/handlebars.js/pull/182) - Allow passing hash parameters to partials ([@kpdecker](https://github.com/kpdecker)) -- [#392](https://github.com/wycats/handlebars.js/pull/392) - Access to root context in partials and helpers ([@kpdecker](https://github.com/kpdecker)) -- [#472](https://github.com/wycats/handlebars.js/issues/472) - Helpers cannot have decimal parameters ([@kayleg](https://github.com/kayleg)) -- [#569](https://github.com/wycats/handlebars.js/pull/569) - Unable to lookup array values using @index ([@kpdecker](https://github.com/kpdecker)) -- [#491](https://github.com/wycats/handlebars.js/pull/491) - For nested helpers: get the @ variables of the outer helper from the inner one ([@kpdecker](https://github.com/kpdecker)) -- [#669](https://github.com/wycats/handlebars.js/issues/669) - Ability to unregister a helper ([@dbachrach](https://github.com/dbachrach)) -- [#730](https://github.com/wycats/handlebars.js/pull/730) - Raw block helpers ([@kpdecker](https://github.com/kpdecker)) -- [#634](https://github.com/wycats/handlebars.js/pull/634) - It would be great to have the helper name passed to `blockHelperMissing` ([@kpdecker](https://github.com/kpdecker)) -- [#729](https://github.com/wycats/handlebars.js/pull/729) - Convert template spec to object literal ([@kpdecker](https://github.com/kpdecker)) - -- [#658](https://github.com/wycats/handlebars.js/issues/658) - Depthed helpers do not work after an upgrade from 1.0.0 ([@xibxor](https://github.com/xibxor)) -- [#671](https://github.com/wycats/handlebars.js/issues/671) - Crashes on no-parameter {{#each}} ([@stepancheg](https://github.com/stepancheg)) -- [#689](https://github.com/wycats/handlebars.js/issues/689) - broken template precompilation ([@AAS](https://github.com/AAS)) -- [#698](https://github.com/wycats/handlebars.js/pull/698) - Fix parser generation under windows ([@osiris43](https://github.com/osiris43)) -- [#699](https://github.com/wycats/handlebars.js/issues/699) - @DATA not compiles to invalid JS in stringParams mode ([@kpdecker](https://github.com/kpdecker)) -- [#705](https://github.com/wycats/handlebars.js/issues/705) - 1.3.0 can not be wrapped in an IIFE ([@craigteegarden](https://github.com/craigteegarden)) -- [#706](https://github.com/wycats/handlebars.js/pull/706) - README: Use with helper instead of relying on blockHelperMissing ([@scottgonzalez](https://github.com/scottgonzalez)) - -- [#700](https://github.com/wycats/handlebars.js/pull/700) - Remove redundant conditions ([@blakeembrey](https://github.com/blakeembrey)) -- [#704](https://github.com/wycats/handlebars.js/pull/704) - JavaScript Compiler Cleanup ([@blakeembrey](https://github.com/blakeembrey)) - -Compatibility notes: - -- `helperMissing` helper no longer has the indexed name argument. Helper name is now available via `options.name`. -- Precompiler output has changed, which breaks compatibility with prior versions of the runtime and precompiled output. -- `JavaScriptCompiler.compilerInfo` now returns generic objects rather than javascript source. -- AST changes - - INTEGER -> NUMBER - - Additional PartialNode hash parameter - - New RawBlockNode type -- Data frames now have a `_parent` field. This is internal but is enumerable for performance/compatibility reasons. - -[Commits](https://github.com/wycats/handlebars.js/compare/v1.3.0...v2.0.0-alpha.1) - -## v1.3.0 - January 1st, 2014 - -- [#690](https://github.com/wycats/handlebars.js/pull/690) - Added support for subexpressions ([@machty](https://github.com/machty)) -- [#696](https://github.com/wycats/handlebars.js/pull/696) - Fix for reserved keyword "default" ([@nateirwin](https://github.com/nateirwin)) -- [#692](https://github.com/wycats/handlebars.js/pull/692) - add line numbers to nodes when parsing ([@fivetanley](https://github.com/fivetanley)) -- [#695](https://github.com/wycats/handlebars.js/pull/695) - Pull options out from param setup to allow easier extension ([@blakeembrey](https://github.com/blakeembrey)) -- [#694](https://github.com/wycats/handlebars.js/pull/694) - Make the environment reusable ([@blakeembrey](https://github.com/blakeembrey)) -- [#636](https://github.com/wycats/handlebars.js/issues/636) - Print line and column of errors ([@sgronblo](https://github.com/sgronblo)) -- Use literal for data lookup - c1a93d3 -- Add stack handling sanity checks - cd885bf -- Fix stack id "leak" on replaceStack - ddfe457 -- Fix incorrect stack pop when replacing literals - f4d337d - -[Commits](https://github.com/wycats/handlebars.js/compare/v1.2.1...v1.3.0) - -## v1.2.1 - December 26th, 2013 - -- [#684](https://github.com/wycats/handlebars.js/pull/684) - Allow any number of trailing characters for valid JavaScript variable ([@blakeembrey](https://github.com/blakeembrey)) -- [#686](https://github.com/wycats/handlebars.js/pull/686) - Falsy AMD module names in version 1.2.0 ([@kpdecker](https://github.com/kpdecker)) - -[Commits](https://github.com/wycats/handlebars.js/compare/v1.2.0...v1.2.1) - -## v1.2.0 - December 23rd, 2013 - -- [#675](https://github.com/wycats/handlebars.js/issues/675) - Cannot compile empty template for partial ([@erwinw](https://github.com/erwinw)) -- [#677](https://github.com/wycats/handlebars.js/issues/677) - Triple brace statements fail under IE ([@hamzaCM](https://github.com/hamzaCM)) -- [#655](https://github.com/wycats/handlebars.js/issues/655) - Loading Handlebars using bower ([@niki4810](https://github.com/niki4810)) -- [#657](https://github.com/wycats/handlebars.js/pull/657) - Fixes issue where cli compiles non handlebars templates ([@chrishoage](https://github.com/chrishoage)) -- [#681](https://github.com/wycats/handlebars.js/pull/681) - Adds in-browser testing and Saucelabs CI ([@kpdecker](https://github.com/kpdecker)) -- [#661](https://github.com/wycats/handlebars.js/pull/661) - Add @first and @index to #each object iteration ([@cgp](https://github.com/cgp)) -- [#650](https://github.com/wycats/handlebars.js/pull/650) - Handlebars is MIT-licensed ([@thomasboyt](https://github.com/thomasboyt)) -- [#641](https://github.com/wycats/handlebars.js/pull/641) - Document ember testing process ([@kpdecker](https://github.com/kpdecker)) -- [#662](https://github.com/wycats/handlebars.js/issues/662) - handlebars-source 1.1.2 is missing from RubyGems. -- [#656](https://github.com/wycats/handlebars.js/issues/656) - Expose COMPILER_REVISION checks as a hook ([@machty](https://github.com/machty)) -- [#668](https://github.com/wycats/handlebars.js/issues/668) - Consider publishing handlebars-runtime as a separate module on npm ([@dlmanning](https://github.com/dlmanning)) -- [#679](https://github.com/wycats/handlebars.js/issues/679) - Unable to override invokePartial ([@mattbrailsford](https://github.com/mattbrailsford)) -- [#646](https://github.com/wycats/handlebars.js/pull/646) - Fix "\\{{" immediately following "\{{" ([@dmarcotte](https://github.com/dmarcotte)) -- Allow extend to work with non-prototyped objects - eb53f2e -- Add JavascriptCompiler public API tests - 1a751b2 -- Add AST test coverage for more complex paths - ddea5be -- Fix handling of boolean escape in MustacheNode - b4968bb - -Compatibility notes: - -- `@index` and `@first` are now supported for `each` iteration on objects -- `Handlebars.VM.checkRevision` and `Handlebars.JavaScriptCompiler.prototype.compilerInfo` now available to modify the version checking behavior. -- Browserify users may link to the runtime library via `require('handlebars/runtime')` - -[Commits](https://github.com/wycats/handlebars.js/compare/v1.1.2...v1.2.0) - -## v1.1.2 - November 5th, 2013 - -- [#645](https://github.com/wycats/handlebars.js/issues/645) - 1.1.1 fails under IE8 ([@kpdecker](https://github.com/kpdecker)) -- [#644](https://github.com/wycats/handlebars.js/issues/644) - Using precompiled templates (AMD mode) with handlebars.runtime 1.1.1 ([@fddima](https://github.com/fddima)) - -- Add simple binary utility tests - 96a45a4 -- Fix empty string compilation - eea708a - -[Commits](https://github.com/wycats/handlebars.js/compare/v1.1.1...v1.1.2) - -## v1.1.1 - November 4th, 2013 - -- [#642](https://github.com/wycats/handlebars.js/issues/642) - handlebars 1.1.0 are broken with nodejs - -- Fix release notes link - 17ba258 - -[Commits](https://github.com/wycats/handlebars.js/compare/v1.1.0...v1.1.1) - -## v1.1.0 - November 3rd, 2013 - -- [#628](https://github.com/wycats/handlebars.js/pull/628) - Convert code to ES6 modules ([@kpdecker](https://github.com/kpdecker)) -- [#336](https://github.com/wycats/handlebars.js/pull/336) - Add whitespace control syntax ([@kpdecker](https://github.com/kpdecker)) -- [#535](https://github.com/wycats/handlebars.js/pull/535) - Fix for probable JIT error under Safari ([@sorentwo](https://github.com/sorentwo)) -- [#483](https://github.com/wycats/handlebars.js/issues/483) - Add first and last @ vars to each helper ([@denniskuczynski](https://github.com/denniskuczynski)) -- [#557](https://github.com/wycats/handlebars.js/pull/557) - `\\{{foo}}` escaping only works in some situations ([@dmarcotte](https://github.com/dmarcotte)) -- [#552](https://github.com/wycats/handlebars.js/pull/552) - Added BOM removal flag. ([@blessenm](https://github.com/blessenm)) -- [#543](https://github.com/wycats/handlebars.js/pull/543) - publish passing master builds to s3 ([@fivetanley](https://github.com/fivetanley)) - -- [#608](https://github.com/wycats/handlebars.js/issues/608) - Add `includeZero` flag to `if` conditional -- [#498](https://github.com/wycats/handlebars.js/issues/498) - `Handlebars.compile` fails on empty string although a single blank works fine -- [#599](https://github.com/wycats/handlebars.js/issues/599) - lambda helpers only receive options if used with arguments -- [#592](https://github.com/wycats/handlebars.js/issues/592) - Optimize array and subprogram performance -- [#571](https://github.com/wycats/handlebars.js/issues/571) - uglify upgrade breaks compatibility with older versions of node -- [#587](https://github.com/wycats/handlebars.js/issues/587) - Partial inside partial breaks? - -Compatibility notes: - -- The project now includes separate artifacts for AMD, CommonJS, and global objects. - - AMD: Users may load the bundled `handlebars.amd.js` or `handlebars.runtime.amd.js` files or load individual modules directly. AMD users should also note that the handlebars object is exposed via the `default` field on the imported object. This [gist](https://gist.github.com/wycats/7417be0dc361a69d5916) provides some discussion of possible compatibility shims. - - CommonJS/Node: Node loading occurs as normal via `require` - - Globals: The `handlebars.js` and `handlebars.runtime.js` files should behave in the same manner as the v1.0.12 / 1.0.0 release. -- Build artifacts have been removed from the repository. [npm][npm], [components/handlebars.js][components], [cdnjs][cdnjs], or the [builds page][builds-page] should now be used as the source of built artifacts. -- Context-stored helpers are now always passed the `options` hash. Previously no-argument helpers did not have this argument. - -[Commits](https://github.com/wycats/handlebars.js/compare/v1.0.12...v1.1.0) - -## v1.0.12 / 1.0.0 - May 31 2013 - -- [#515](https://github.com/wycats/handlebars.js/issues/515) - Add node require extensions support ([@jjclark1982](https://github.com/jjclark1982)) -- [#517](https://github.com/wycats/handlebars.js/issues/517) - Fix amd precompiler output with directories ([@blessenm](https://github.com/blessenm)) -- [#433](https://github.com/wycats/handlebars.js/issues/433) - Add support for unicode ids -- [#469](https://github.com/wycats/handlebars.js/issues/469) - Add support for `?` in ids -- [#534](https://github.com/wycats/handlebars.js/issues/534) - Protect from object prototype modifications -- [#519](https://github.com/wycats/handlebars.js/issues/519) - Fix partials with . name ([@jamesgorrie](https://github.com/jamesgorrie)) -- [#519](https://github.com/wycats/handlebars.js/issues/519) - Allow ID or strings in partial names -- [#437](https://github.com/wycats/handlebars.js/issues/437) - Require matching brace counts in escaped expressions -- Merge passed partials and helpers with global namespace values -- Add support for complex ids in @data references -- Docs updates - -Compatibility notes: - -- The parser is now stricter on `{{{`, requiring that the end token be `}}}`. Templates that do not - follow this convention should add the additional brace value. -- Code that relies on global the namespace being muted when custom helpers or partials are passed will need to explicitly pass an `undefined` value for any helpers that should not be available. -- The compiler version has changed. Precompiled templates with 1.0.12 or higher must use the 1.0.0 or higher runtime. - -[Commits](https://github.com/wycats/handlebars.js/compare/v1.0.11...v1.0.12) - -## v1.0.11 / 1.0.0-rc4 - May 13 2013 - -- [#458](https://github.com/wycats/handlebars.js/issues/458) - Fix `./foo` syntax ([@jpfiset](https://github.com/jpfiset)) -- [#460](https://github.com/wycats/handlebars.js/issues/460) - Allow `:` in unescaped identifiers ([@jpfiset](https://github.com/jpfiset)) -- [#471](https://github.com/wycats/handlebars.js/issues/471) - Create release notes (These!) -- [#456](https://github.com/wycats/handlebars.js/issues/456) - Allow escaping of `\\` -- [#211](https://github.com/wycats/handlebars.js/issues/211) - Fix exception in `escapeExpression` -- [#375](https://github.com/wycats/handlebars.js/issues/375) - Escape unicode newlines -- [#461](https://github.com/wycats/handlebars.js/issues/461) - Do not fail when compiling `""` -- [#302](https://github.com/wycats/handlebars.js/issues/302) - Fix sanity check in knownHelpersOnly mode -- [#369](https://github.com/wycats/handlebars.js/issues/369) - Allow registration of multiple helpers and partial by passing definition object -- Add bower package declaration ([@DevinClark](https://github.com/DevinClark)) -- Add NuSpec package declaration ([@MikeMayer](https://github.com/MikeMayer)) -- Handle empty context in `with` ([@thejohnfreeman](https://github.com/thejohnfreeman)) -- Support custom template extensions in CLI ([@matteoagosti](https://github.com/matteoagosti)) -- Fix Rhino support ([@broady](https://github.com/broady)) -- Include contexts in string mode ([@leshill](https://github.com/leshill)) -- Return precompiled scripts when compiling to AMD ([@JamesMaroney](https://github.com/JamesMaroney)) -- Docs updates ([@iangreenleaf](https://github.com/iangreenleaf), [@gilesbowkett](https://github.com/gilesbowkett), [@utkarsh2012](https://github.com/utkarsh2012)) -- Fix `toString` handling under IE and browserify ([@tommydudebreaux](https://github.com/tommydudebreaux)) -- Add program metadata - -[Commits](https://github.com/wycats/handlebars.js/compare/v1.0.10...v1.0.11) - -## v1.0.10 - Node - Feb 27 2013 - -- [#428](https://github.com/wycats/handlebars.js/issues/428) - Fix incorrect rendering of nested programs -- Fix exception message ([@tricknotes](https://github.com/tricknotes)) -- Added negative number literal support -- Concert library to single IIFE -- Add handlebars-source gemspec ([@machty](https://github.com/machty)) - -[Commits](https://github.com/wycats/handlebars.js/compare/v1.0.9...v1.0.10) - -## v1.0.9 - Node - Feb 15 2013 - -- Added `Handlebars.create` API in node module for sandboxed instances ([@tommydudebreaux](https://github.com/tommydudebreaux)) - -[Commits](https://github.com/wycats/handlebars.js/compare/1.0.0-rc.3...v1.0.9) - -## 1.0.0-rc3 - Browser - Feb 14 2013 - -- Prevent use of `this` or `..` in illogical place ([@leshill](https://github.com/leshill)) -- Allow AST passing for `parse`/`compile`/`precompile` ([@machty](https://github.com/machty)) -- Optimize generated output by inlining statements where possible -- Check compiler version when evaluating templates -- Package browser dist in npm package - -[Commits](https://github.com/wycats/handlebars.js/compare/v1.0.8...1.0.0-rc.3) - -## Prior Versions - -When upgrading from the Handlebars 0.9 series, be aware that the -signature for passing custom helpers or partials to templates has -changed. - -Instead of: - -```js -template(context, helpers, partials, [data]); -``` - -Use: - -```js -template(context, { helpers: helpers, partials: partials, data: data }); -``` - -[builds-page]: http://builds.handlebarsjs.com.s3.amazonaws.com/index.html -[cdnjs]: http://cdnjs.com/libraries/handlebars.js/ -[components]: https://github.com/components/handlebars.js -[npm]: https://npmjs.org/package/handlebars diff --git a/node_modules/handlebars/runtime.d.ts b/node_modules/handlebars/runtime.d.ts deleted file mode 100644 index 0d5105eb..00000000 --- a/node_modules/handlebars/runtime.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import Handlebars = require('handlebars') - -declare module "handlebars/runtime" { - -} \ No newline at end of file diff --git a/node_modules/handlebars/runtime.js b/node_modules/handlebars/runtime.js deleted file mode 100644 index 306207cd..00000000 --- a/node_modules/handlebars/runtime.js +++ /dev/null @@ -1,3 +0,0 @@ -// Create a simple path alias to allow browserify to resolve -// the runtime on a supported path. -module.exports = require('./dist/cjs/handlebars.runtime')['default']; diff --git a/node_modules/handlebars/types/index.d.ts b/node_modules/handlebars/types/index.d.ts deleted file mode 100644 index 3f2f8b79..00000000 --- a/node_modules/handlebars/types/index.d.ts +++ /dev/null @@ -1,422 +0,0 @@ -/* These definitions were imported from https://github.com/DefinitelyTyped/DefinitelyTyped - * and includes previous contributions from the DefinitelyTyped community by: - * - Albert Willemsen <https://github.com/AlbertWillemsen-Centric> - * - Boris Yankov <https://github.com/borisyankov> - * - Jessica Franco <https://github.com/Kovensky> - * - Masahiro Wakame <https://github.com/vvakame> - * - Raanan Weber <https://github.com/RaananW> - * - Sergei Dorogin <https://github.com/evil-shrike> - * - webbiesdk <https://github.com/webbiesdk> - * - Andrew Leedham <https://github.com/AndrewLeedham> - * - Nils Knappmeier <https://github.com/nknapp> - * For full history prior to their migration to handlebars.js, please see: - * https://github.com/DefinitelyTyped/DefinitelyTyped/commits/1ce60bdc07f10e0b076778c6c953271c072bc894/types/handlebars/index.d.ts - */ -// TypeScript Version: 2.3 - -declare namespace Handlebars { - export interface TemplateDelegate<T = any> { - (context: T, options?: RuntimeOptions): string; - } - - export type Template<T = any> = TemplateDelegate<T>|string; - - export interface RuntimeOptions { - partial?: boolean; - depths?: any[]; - helpers?: { [name: string]: Function }; - partials?: { [name: string]: HandlebarsTemplateDelegate }; - decorators?: { [name: string]: Function }; - data?: any; - blockParams?: any[]; - allowCallsToHelperMissing?: boolean; - allowedProtoProperties?: { [name: string]: boolean }; - allowedProtoMethods?: { [name: string]: boolean }; - allowProtoPropertiesByDefault?: boolean; - allowProtoMethodsByDefault?: boolean; - } - - export interface HelperOptions { - fn: TemplateDelegate; - inverse: TemplateDelegate; - hash: any; - data?: any; - } - - export interface HelperDelegate { - (context?: any, arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any, options?: HelperOptions): any; - } - export interface HelperDeclareSpec { - [key: string]: HelperDelegate; - } - - export interface ParseOptions { - srcName?: string; - ignoreStandalone?: boolean; - } - - export function registerHelper(name: string, fn: HelperDelegate): void; - export function registerHelper(name: HelperDeclareSpec): void; - export function unregisterHelper(name: string): void; - - export function registerPartial(name: string, fn: Template): void; - export function registerPartial(spec: { [name: string]: HandlebarsTemplateDelegate }): void; - export function unregisterPartial(name: string): void; - - // TODO: replace Function with actual signature - export function registerDecorator(name: string, fn: Function): void; - export function unregisterDecorator(name: string): void; - - export function K(): void; - export function createFrame(object: any): any; - export function blockParams(obj: any[], ids: any[]): any[]; - export function log(level: number, obj: any): void; - export function parse(input: string, options?: ParseOptions): hbs.AST.Program; - export function parseWithoutProcessing(input: string, options?: ParseOptions): hbs.AST.Program; - export function compile<T = any>(input: any, options?: CompileOptions): HandlebarsTemplateDelegate<T>; - export function precompile(input: any, options?: PrecompileOptions): TemplateSpecification; - export function template<T = any>(precompilation: TemplateSpecification): HandlebarsTemplateDelegate<T>; - - export function create(): typeof Handlebars; - - export const escapeExpression: typeof Utils.escapeExpression; - //export const Utils: typeof hbs.Utils; - export const logger: Logger; - export const templates: HandlebarsTemplates; - export const helpers: { [name: string]: HelperDelegate }; - export const partials: { [name: string]: any }; - // TODO: replace Function with actual signature - export const decorators: { [name: string]: Function }; - - export const VERSION: string; - - export function noConflict(): typeof Handlebars; - - export class Exception { - constructor(message: string, node?: hbs.AST.Node); - description: string; - fileName: string; - lineNumber?: any; - endLineNumber?: any; - message: string; - name: string; - number: number; - stack?: string; - column?: any; - endColumn?: any; - } - - export class SafeString { - constructor(str: string); - toString(): string; - toHTML(): string; - } - - export namespace Utils { - export function escapeExpression(str: string): string; - export function createFrame(object: any): any; - export function blockParams(obj: any[], ids: any[]): any[]; - export function isEmpty(obj: any) : boolean; - export function extend(obj: any, ...source: any[]): any; - export function toString(obj: any): string; - export function isArray(obj: any): boolean; - export function isFunction(obj: any): boolean; - } - - export namespace AST { - export const helpers: hbs.AST.helpers; - } - - interface ICompiler { - accept(node: hbs.AST.Node): void; - Program(program: hbs.AST.Program): void; - BlockStatement(block: hbs.AST.BlockStatement): void; - PartialStatement(partial: hbs.AST.PartialStatement): void; - PartialBlockStatement(partial: hbs.AST.PartialBlockStatement): void; - DecoratorBlock(decorator: hbs.AST.DecoratorBlock): void; - Decorator(decorator: hbs.AST.Decorator): void; - MustacheStatement(mustache: hbs.AST.MustacheStatement): void; - ContentStatement(content: hbs.AST.ContentStatement): void; - CommentStatement(comment?: hbs.AST.CommentStatement): void; - SubExpression(sexpr: hbs.AST.SubExpression): void; - PathExpression(path: hbs.AST.PathExpression): void; - StringLiteral(str: hbs.AST.StringLiteral): void; - NumberLiteral(num: hbs.AST.NumberLiteral): void; - BooleanLiteral(bool: hbs.AST.BooleanLiteral): void; - UndefinedLiteral(): void; - NullLiteral(): void; - Hash(hash: hbs.AST.Hash): void; - } - - export class Visitor implements ICompiler { - accept(node: hbs.AST.Node): void; - acceptKey(node: hbs.AST.Node, name: string): void; - acceptArray(arr: hbs.AST.Expression[]): void; - Program(program: hbs.AST.Program): void; - BlockStatement(block: hbs.AST.BlockStatement): void; - PartialStatement(partial: hbs.AST.PartialStatement): void; - PartialBlockStatement(partial: hbs.AST.PartialBlockStatement): void; - DecoratorBlock(decorator: hbs.AST.DecoratorBlock): void; - Decorator(decorator: hbs.AST.Decorator): void; - MustacheStatement(mustache: hbs.AST.MustacheStatement): void; - ContentStatement(content: hbs.AST.ContentStatement): void; - CommentStatement(comment?: hbs.AST.CommentStatement): void; - SubExpression(sexpr: hbs.AST.SubExpression): void; - PathExpression(path: hbs.AST.PathExpression): void; - StringLiteral(str: hbs.AST.StringLiteral): void; - NumberLiteral(num: hbs.AST.NumberLiteral): void; - BooleanLiteral(bool: hbs.AST.BooleanLiteral): void; - UndefinedLiteral(): void; - NullLiteral(): void; - Hash(hash: hbs.AST.Hash): void; - } - - - export interface ResolvePartialOptions { - name: string; - helpers?: { [name: string]: Function }; - partials?: { [name: string]: HandlebarsTemplateDelegate }; - decorators?: { [name: string]: Function }; - data?: any; - } - - export namespace VM { - /** - * @deprecated - */ - export function resolvePartial<T = any>(partial: HandlebarsTemplateDelegate<T> | undefined, context: any, options: ResolvePartialOptions): HandlebarsTemplateDelegate<T>; - } -} - -/** -* Implement this interface on your MVW/MVVM/MVC views such as Backbone.View -**/ -interface HandlebarsTemplatable { - template: HandlebarsTemplateDelegate; -} - -// NOTE: for backward compatibility of this typing -type HandlebarsTemplateDelegate<T = any> = Handlebars.TemplateDelegate<T>; - -interface HandlebarsTemplates { - [index: string]: HandlebarsTemplateDelegate; -} - -interface TemplateSpecification { - -} - -// for backward compatibility of this typing -type RuntimeOptions = Handlebars.RuntimeOptions; - -interface CompileOptions { - data?: boolean; - compat?: boolean; - knownHelpers?: KnownHelpers; - knownHelpersOnly?: boolean; - noEscape?: boolean; - strict?: boolean; - assumeObjects?: boolean; - preventIndent?: boolean; - ignoreStandalone?: boolean; - explicitPartialContext?: boolean; -} - -type KnownHelpers = { - [name in BuiltinHelperName | CustomHelperName]: boolean; -}; - -type BuiltinHelperName = - "helperMissing"| - "blockHelperMissing"| - "each"| - "if"| - "unless"| - "with"| - "log"| - "lookup"; - -type CustomHelperName = string; - -interface PrecompileOptions extends CompileOptions { - srcName?: string; - destName?: string; -} - -declare namespace hbs { - // for backward compatibility of this typing - type SafeString = Handlebars.SafeString; - - type Utils = typeof Handlebars.Utils; -} - -interface Logger { - DEBUG: number; - INFO: number; - WARN: number; - ERROR: number; - level: number; - - methodMap: { [level: number]: string }; - - log(level: number, obj: string): void; -} - -type CompilerInfo = [number/* revision */, string /* versions */]; - -declare namespace hbs { - namespace AST { - interface Node { - type: string; - loc: SourceLocation; - } - - interface SourceLocation { - source: string; - start: Position; - end: Position; - } - - interface Position { - line: number; - column: number; - } - - interface Program extends Node { - body: Statement[]; - blockParams: string[]; - } - - interface Statement extends Node {} - - interface MustacheStatement extends Statement { - type: 'MustacheStatement'; - path: PathExpression | Literal; - params: Expression[]; - hash: Hash; - escaped: boolean; - strip: StripFlags; - } - - interface Decorator extends MustacheStatement { } - - interface BlockStatement extends Statement { - type: 'BlockStatement'; - path: PathExpression; - params: Expression[]; - hash: Hash; - program: Program; - inverse: Program; - openStrip: StripFlags; - inverseStrip: StripFlags; - closeStrip: StripFlags; - } - - interface DecoratorBlock extends BlockStatement { } - - interface PartialStatement extends Statement { - type: 'PartialStatement'; - name: PathExpression | SubExpression; - params: Expression[]; - hash: Hash; - indent: string; - strip: StripFlags; - } - - interface PartialBlockStatement extends Statement { - type: 'PartialBlockStatement'; - name: PathExpression | SubExpression; - params: Expression[]; - hash: Hash; - program: Program; - openStrip: StripFlags; - closeStrip: StripFlags; - } - - interface ContentStatement extends Statement { - type: 'ContentStatement'; - value: string; - original: StripFlags; - } - - interface CommentStatement extends Statement { - type: 'CommentStatement'; - value: string; - strip: StripFlags; - } - - interface Expression extends Node {} - - interface SubExpression extends Expression { - type: 'SubExpression'; - path: PathExpression; - params: Expression[]; - hash: Hash; - } - - interface PathExpression extends Expression { - type: 'PathExpression'; - data: boolean; - depth: number; - parts: string[]; - original: string; - } - - interface Literal extends Expression {} - interface StringLiteral extends Literal { - type: 'StringLiteral'; - value: string; - original: string; - } - - interface BooleanLiteral extends Literal { - type: 'BooleanLiteral'; - value: boolean; - original: boolean; - } - - interface NumberLiteral extends Literal { - type: 'NumberLiteral'; - value: number; - original: number; - } - - interface UndefinedLiteral extends Literal { - type: 'UndefinedLiteral'; - } - - interface NullLiteral extends Literal { - type: 'NullLiteral'; - } - - interface Hash extends Node { - type: 'Hash'; - pairs: HashPair[]; - } - - interface HashPair extends Node { - type: 'HashPair'; - key: string; - value: Expression; - } - - interface StripFlags { - open: boolean; - close: boolean; - } - - interface helpers { - helperExpression(node: Node): boolean; - scopeId(path: PathExpression): boolean; - simpleId(path: PathExpression): boolean; - } - } -} - -declare module "handlebars" { - export = Handlebars; -} - -declare module "handlebars/runtime" { - export = Handlebars; -} diff --git a/node_modules/has-flag/index.js b/node_modules/has-flag/index.js deleted file mode 100644 index 5139728f..00000000 --- a/node_modules/has-flag/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; -module.exports = (flag, argv) => { - argv = argv || process.argv; - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const pos = argv.indexOf(prefix + flag); - const terminatorPos = argv.indexOf('--'); - return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); -}; diff --git a/node_modules/has-flag/license b/node_modules/has-flag/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/has-flag/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/has-flag/package.json b/node_modules/has-flag/package.json deleted file mode 100644 index 040e58c4..00000000 --- a/node_modules/has-flag/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "has-flag@^3.0.0", - "_id": "has-flag@3.0.0", - "_inBundle": false, - "_integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "_location": "/has-flag", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "has-flag@^3.0.0", - "name": "has-flag", - "escapedName": "has-flag", - "rawSpec": "^3.0.0", - "saveSpec": null, - "fetchSpec": "^3.0.0" - }, - "_requiredBy": [ - "/supports-color" - ], - "_resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "_shasum": "b5d454dc2199ae225699f3467e5a07f3b955bafd", - "_spec": "has-flag@^3.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/supports-color", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/has-flag/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Check if argv has a specific flag", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/has-flag#readme", - "keywords": [ - "has", - "check", - "detect", - "contains", - "find", - "flag", - "cli", - "command-line", - "argv", - "process", - "arg", - "args", - "argument", - "arguments", - "getopt", - "minimist", - "optimist" - ], - "license": "MIT", - "name": "has-flag", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/has-flag.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "3.0.0" -} diff --git a/node_modules/has-flag/readme.md b/node_modules/has-flag/readme.md deleted file mode 100644 index 677893c2..00000000 --- a/node_modules/has-flag/readme.md +++ /dev/null @@ -1,70 +0,0 @@ -# has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag) - -> Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag - -Correctly stops looking after an `--` argument terminator. - - -## Install - -``` -$ npm install has-flag -``` - - -## Usage - -```js -// foo.js -const hasFlag = require('has-flag'); - -hasFlag('unicorn'); -//=> true - -hasFlag('--unicorn'); -//=> true - -hasFlag('f'); -//=> true - -hasFlag('-f'); -//=> true - -hasFlag('foo=bar'); -//=> true - -hasFlag('foo'); -//=> false - -hasFlag('rainbow'); -//=> false -``` - -``` -$ node foo.js -f --unicorn --foo=bar -- --rainbow -``` - - -## API - -### hasFlag(flag, [argv]) - -Returns a boolean for whether the flag exists. - -#### flag - -Type: `string` - -CLI flag to look for. The `--` prefix is optional. - -#### argv - -Type: `string[]`<br> -Default: `process.argv` - -CLI arguments. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/has-symbols/.eslintignore b/node_modules/has-symbols/.eslintignore deleted file mode 100644 index 404abb22..00000000 --- a/node_modules/has-symbols/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -coverage/ diff --git a/node_modules/has-symbols/.eslintrc b/node_modules/has-symbols/.eslintrc deleted file mode 100644 index 2d9a66a8..00000000 --- a/node_modules/has-symbols/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "max-statements-per-line": [2, { "max": 2 }], - "no-magic-numbers": 0, - "multiline-comment-style": 0, - } -} diff --git a/node_modules/has-symbols/.github/FUNDING.yml b/node_modules/has-symbols/.github/FUNDING.yml deleted file mode 100644 index 04cf87e6..00000000 --- a/node_modules/has-symbols/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/has-symbols -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/has-symbols/.nycrc b/node_modules/has-symbols/.nycrc deleted file mode 100644 index 1826526e..00000000 --- a/node_modules/has-symbols/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/has-symbols/CHANGELOG.md b/node_modules/has-symbols/CHANGELOG.md deleted file mode 100644 index 852ca042..00000000 --- a/node_modules/has-symbols/CHANGELOG.md +++ /dev/null @@ -1,58 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.0.2](https://github.com/inspect-js/has-symbols/compare/v1.0.1...v1.0.2) - 2021-02-27 - -### Fixed - -- [Fix] use a universal way to get the original Symbol [`#11`](https://github.com/inspect-js/has-symbols/issues/11) - -### Commits - -- [Tests] migrate tests to Github Actions [`90ae798`](https://github.com/inspect-js/has-symbols/commit/90ae79820bdfe7bc703d67f5f3c5e205f98556d3) -- [meta] do not publish github action workflow files [`29e60a1`](https://github.com/inspect-js/has-symbols/commit/29e60a1b7c25c7f1acf7acff4a9320d0d10c49b4) -- [Tests] run `nyc` on all tests [`8476b91`](https://github.com/inspect-js/has-symbols/commit/8476b915650d360915abe2522505abf4b0e8f0ae) -- [readme] fix repo URLs, remove defunct badges [`126288e`](https://github.com/inspect-js/has-symbols/commit/126288ecc1797c0a40247a6b78bcb2e0bc5d7036) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `get-own-property-symbols` [`d84bdfa`](https://github.com/inspect-js/has-symbols/commit/d84bdfa48ac5188abbb4904b42614cd6c030940a) -- [Tests] fix linting errors [`0df3070`](https://github.com/inspect-js/has-symbols/commit/0df3070b981b6c9f2ee530c09189a7f5c6def839) -- [actions] add "Allow Edits" workflow [`1e6bc29`](https://github.com/inspect-js/has-symbols/commit/1e6bc29b188f32b9648657b07eda08504be5aa9c) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`36cea2a`](https://github.com/inspect-js/has-symbols/commit/36cea2addd4e6ec435f35a2656b4e9ef82498e9b) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1278338`](https://github.com/inspect-js/has-symbols/commit/127833801865fbc2cc8979beb9ca869c7bfe8222) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1493254`](https://github.com/inspect-js/has-symbols/commit/1493254eda13db5fb8fc5e4a3e8324b3d196029d) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js` [`b090bf2`](https://github.com/inspect-js/has-symbols/commit/b090bf214d3679a30edc1e2d729d466ab5183e1d) -- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4addb7a`](https://github.com/inspect-js/has-symbols/commit/4addb7ab4dc73f927ae99928d68817554fc21dc0) -- [Dev Deps] update `auto-changelog`, `tape` [`81d0baf`](https://github.com/inspect-js/has-symbols/commit/81d0baf3816096a89a8558e8043895f7a7d10d8b) -- [Dev Deps] update `auto-changelog`; add `aud` [`1a4e561`](https://github.com/inspect-js/has-symbols/commit/1a4e5612c25d91c3a03d509721d02630bc4fe3da) -- [readme] remove unused testling URLs [`3000941`](https://github.com/inspect-js/has-symbols/commit/3000941f958046e923ed8152edb1ef4a599e6fcc) -- [Tests] only audit prod deps [`692e974`](https://github.com/inspect-js/has-symbols/commit/692e9743c912410e9440207631a643a34b4741a1) -- [Dev Deps] update `@ljharb/eslint-config` [`51c946c`](https://github.com/inspect-js/has-symbols/commit/51c946c7f6baa793ec5390bb5a45cdce16b4ba76) - -## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-16 - -### Commits - -- [Tests] use shared travis-ci configs [`ce396c9`](https://github.com/inspect-js/has-symbols/commit/ce396c9419ff11c43d0da5d05cdbb79f7fb42229) -- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v4.9`; use `nvm install-latest-npm` [`0690732`](https://github.com/inspect-js/has-symbols/commit/0690732801f47ab429f39ba1962f522d5c462d6b) -- [meta] add `auto-changelog` [`2163d0b`](https://github.com/inspect-js/has-symbols/commit/2163d0b7f36343076b8f947cd1667dd1750f26fc) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`8e0951f`](https://github.com/inspect-js/has-symbols/commit/8e0951f1a7a2e52068222b7bb73511761e6e4d9c) -- [actions] add automatic rebasing / merge commit blocking [`b09cdb7`](https://github.com/inspect-js/has-symbols/commit/b09cdb7cd7ee39e7a769878f56e2d6066f5ccd1d) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `core-js`, `get-own-property-symbols`, `tape` [`1dd42cd`](https://github.com/inspect-js/has-symbols/commit/1dd42cd86183ed0c50f99b1062345c458babca91) -- [meta] create FUNDING.yml [`aa57a17`](https://github.com/inspect-js/has-symbols/commit/aa57a17b19708906d1927f821ea8e73394d84ca4) -- Only apps should have lockfiles [`a2d8bea`](https://github.com/inspect-js/has-symbols/commit/a2d8bea23a97d15c09eaf60f5b107fcf9a4d57aa) -- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`9e96cb7`](https://github.com/inspect-js/has-symbols/commit/9e96cb783746cbed0c10ef78e599a8eaa7ebe193) -- [meta] add `funding` field [`a0b32cf`](https://github.com/inspect-js/has-symbols/commit/a0b32cf68e803f963c1639b6d47b0a9d6440bab0) -- [Dev Deps] update `safe-publish-latest` [`cb9f0a5`](https://github.com/inspect-js/has-symbols/commit/cb9f0a521a3a1790f1064d437edd33bb6c3d6af0) - -## v1.0.0 - 2016-09-19 - -### Commits - -- Tests. [`ecb6eb9`](https://github.com/inspect-js/has-symbols/commit/ecb6eb934e4883137f3f93b965ba5e0a98df430d) -- package.json [`88a337c`](https://github.com/inspect-js/has-symbols/commit/88a337cee0864a0da35f5d19e69ff0ef0150e46a) -- Initial commit [`42e1e55`](https://github.com/inspect-js/has-symbols/commit/42e1e5502536a2b8ac529c9443984acd14836b1c) -- Initial implementation. [`33f5cc6`](https://github.com/inspect-js/has-symbols/commit/33f5cc6cdff86e2194b081ee842bfdc63caf43fb) -- read me [`01f1170`](https://github.com/inspect-js/has-symbols/commit/01f1170188ff7cb1558aa297f6ba5b516c6d7b0c) diff --git a/node_modules/has-symbols/LICENSE b/node_modules/has-symbols/LICENSE deleted file mode 100644 index df31cbf3..00000000 --- a/node_modules/has-symbols/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/has-symbols/README.md b/node_modules/has-symbols/README.md deleted file mode 100644 index 3875d7e5..00000000 --- a/node_modules/has-symbols/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# has-symbols <sup>[![Version Badge][2]][1]</sup> - -[![dependency status][5]][6] -[![dev dependency status][7]][8] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][11]][1] - -Determine if the JS environment has Symbol support. Supports spec, or shams. - -## Example - -```js -var hasSymbols = require('has-symbols'); - -hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable. - -var hasSymbolsKinda = require('has-symbols/shams'); -hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec. -``` - -## Supported Symbol shams - - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) - - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/has-symbols -[2]: https://versionbadg.es/inspect-js/has-symbols.svg -[5]: https://david-dm.org/inspect-js/has-symbols.svg -[6]: https://david-dm.org/inspect-js/has-symbols -[7]: https://david-dm.org/inspect-js/has-symbols/dev-status.svg -[8]: https://david-dm.org/inspect-js/has-symbols#info=devDependencies -[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/has-symbols.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/has-symbols.svg -[downloads-url]: https://npm-stat.com/charts.html?package=has-symbols diff --git a/node_modules/has-symbols/index.js b/node_modules/has-symbols/index.js deleted file mode 100644 index 17044fa2..00000000 --- a/node_modules/has-symbols/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -var origSymbol = typeof Symbol !== 'undefined' && Symbol; -var hasSymbolSham = require('./shams'); - -module.exports = function hasNativeSymbols() { - if (typeof origSymbol !== 'function') { return false; } - if (typeof Symbol !== 'function') { return false; } - if (typeof origSymbol('foo') !== 'symbol') { return false; } - if (typeof Symbol('bar') !== 'symbol') { return false; } - - return hasSymbolSham(); -}; diff --git a/node_modules/has-symbols/package.json b/node_modules/has-symbols/package.json deleted file mode 100644 index 4369dc4b..00000000 --- a/node_modules/has-symbols/package.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "_from": "has-symbols@^1.0.1", - "_id": "has-symbols@1.0.2", - "_inBundle": false, - "_integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "_location": "/has-symbols", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "has-symbols@^1.0.1", - "name": "has-symbols", - "escapedName": "has-symbols", - "rawSpec": "^1.0.1", - "saveSpec": null, - "fetchSpec": "^1.0.1" - }, - "_requiredBy": [ - "/get-intrinsic", - "/object.assign" - ], - "_resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "_shasum": "165d3070c00309752a1236a479331e3ac56f1423", - "_spec": "has-symbols@^1.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/object.assign", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "bugs": { - "url": "https://github.com/inspect-js/has-symbols/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "deprecated": false, - "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", - "devDependencies": { - "@ljharb/eslint-config": "^17.5.1", - "aud": "^1.1.4", - "auto-changelog": "^2.2.1", - "core-js": "^2.6.12", - "eslint": "^7.20.0", - "get-own-property-symbols": "^0.9.5", - "nyc": "^10.3.2", - "safe-publish-latest": "^1.1.4", - "tape": "^5.2.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "greenkeeper": { - "ignore": [ - "core-js" - ] - }, - "homepage": "https://github.com/inspect-js/has-symbols#readme", - "keywords": [ - "Symbol", - "symbols", - "typeof", - "sham", - "polyfill", - "native", - "core-js", - "ES6" - ], - "license": "MIT", - "main": "index.js", - "name": "has-symbols", - "repository": { - "type": "git", - "url": "git://github.com/inspect-js/has-symbols.git" - }, - "scripts": { - "lint": "eslint --ext=js,mjs .", - "posttest": "aud --production", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", - "prepublish": "safe-publish-latest", - "pretest": "npm run --silent lint", - "test": "npm run tests-only", - "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", - "test:shams:corejs": "nyc node test/shams/core-js.js", - "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", - "test:staging": "nyc node --harmony --es-staging test", - "test:stock": "nyc node test", - "tests-only": "npm run test:stock && npm run test:staging && npm run test:shams", - "version": "auto-changelog && git add CHANGELOG.md" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.0.2" -} diff --git a/node_modules/has-symbols/shams.js b/node_modules/has-symbols/shams.js deleted file mode 100644 index 1285210e..00000000 --- a/node_modules/has-symbols/shams.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -/* eslint complexity: [2, 18], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; diff --git a/node_modules/has-symbols/test/index.js b/node_modules/has-symbols/test/index.js deleted file mode 100644 index 352129ca..00000000 --- a/node_modules/has-symbols/test/index.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -var test = require('tape'); -var hasSymbols = require('../'); -var runSymbolTests = require('./tests'); - -test('interface', function (t) { - t.equal(typeof hasSymbols, 'function', 'is a function'); - t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); - t.end(); -}); - -test('Symbols are supported', { skip: !hasSymbols() }, function (t) { - runSymbolTests(t); - t.end(); -}); - -test('Symbols are not supported', { skip: hasSymbols() }, function (t) { - t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined'); - t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist'); - t.end(); -}); diff --git a/node_modules/has-symbols/test/shams/core-js.js b/node_modules/has-symbols/test/shams/core-js.js deleted file mode 100644 index df5365c2..00000000 --- a/node_modules/has-symbols/test/shams/core-js.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var test = require('tape'); - -if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { - test('has native Symbol support', function (t) { - t.equal(typeof Symbol, 'function'); - t.equal(typeof Symbol(), 'symbol'); - t.end(); - }); - return; -} - -var hasSymbols = require('../../shams'); - -test('polyfilled Symbols', function (t) { - /* eslint-disable global-require */ - t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); - require('core-js/fn/symbol'); - require('core-js/fn/symbol/to-string-tag'); - - require('../tests')(t); - - var hasSymbolsAfter = hasSymbols(); - t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); - /* eslint-enable global-require */ - t.end(); -}); diff --git a/node_modules/has-symbols/test/shams/get-own-property-symbols.js b/node_modules/has-symbols/test/shams/get-own-property-symbols.js deleted file mode 100644 index 9191b248..00000000 --- a/node_modules/has-symbols/test/shams/get-own-property-symbols.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var test = require('tape'); - -if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { - test('has native Symbol support', function (t) { - t.equal(typeof Symbol, 'function'); - t.equal(typeof Symbol(), 'symbol'); - t.end(); - }); - return; -} - -var hasSymbols = require('../../shams'); - -test('polyfilled Symbols', function (t) { - /* eslint-disable global-require */ - t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); - - require('get-own-property-symbols'); - - require('../tests')(t); - - var hasSymbolsAfter = hasSymbols(); - t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); - /* eslint-enable global-require */ - t.end(); -}); diff --git a/node_modules/has-symbols/test/tests.js b/node_modules/has-symbols/test/tests.js deleted file mode 100644 index 89edd129..00000000 --- a/node_modules/has-symbols/test/tests.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -// eslint-disable-next-line consistent-return -module.exports = function runSymbolTests(t) { - t.equal(typeof Symbol, 'function', 'global Symbol is a function'); - - if (typeof Symbol !== 'function') { return false; } - - t.notEqual(Symbol(), Symbol(), 'two symbols are not equal'); - - /* - t.equal( - Symbol.prototype.toString.call(Symbol('foo')), - Symbol.prototype.toString.call(Symbol('foo')), - 'two symbols with the same description stringify the same' - ); - */ - - /* - var foo = Symbol('foo'); - - t.notEqual( - String(foo), - String(Symbol('bar')), - 'two symbols with different descriptions do not stringify the same' - ); - */ - - t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function'); - // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol'); - - t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function'); - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - t.notEqual(typeof sym, 'string', 'Symbol is not a string'); - t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly'); - t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly'); - - var symVal = 42; - obj[sym] = symVal; - // eslint-disable-next-line no-restricted-syntax - for (sym in obj) { t.fail('symbol property key was found in for..in of object'); } - - t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object'); - t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object'); - t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object'); - t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable'); - t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), { - configurable: true, - enumerable: true, - value: 42, - writable: true - }, 'property descriptor is correct'); -}; diff --git a/node_modules/has/LICENSE-MIT b/node_modules/has/LICENSE-MIT deleted file mode 100644 index ae7014d3..00000000 --- a/node_modules/has/LICENSE-MIT +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013 Thiago de Arruda - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/has/README.md b/node_modules/has/README.md deleted file mode 100644 index 635e3a4b..00000000 --- a/node_modules/has/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# has - -> Object.prototype.hasOwnProperty.call shortcut - -## Installation - -```sh -npm install --save has -``` - -## Usage - -```js -var has = require('has'); - -has({}, 'hasOwnProperty'); // false -has(Object.prototype, 'hasOwnProperty'); // true -``` diff --git a/node_modules/has/package.json b/node_modules/has/package.json deleted file mode 100644 index 02a6d2d5..00000000 --- a/node_modules/has/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_from": "has@^1.0.3", - "_id": "has@1.0.3", - "_inBundle": false, - "_integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "_location": "/has", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "has@^1.0.3", - "name": "has", - "escapedName": "has", - "rawSpec": "^1.0.3", - "saveSpec": null, - "fetchSpec": "^1.0.3" - }, - "_requiredBy": [ - "/get-intrinsic" - ], - "_resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "_shasum": "722d7cbfc1f6aa8241f16dd814e011e1f41e8796", - "_spec": "has@^1.0.3", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/get-intrinsic", - "author": { - "name": "Thiago de Arruda", - "email": "tpadilha84@gmail.com" - }, - "bugs": { - "url": "https://github.com/tarruda/has/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "dependencies": { - "function-bind": "^1.1.1" - }, - "deprecated": false, - "description": "Object.prototype.hasOwnProperty.call shortcut", - "devDependencies": { - "@ljharb/eslint-config": "^12.2.1", - "eslint": "^4.19.1", - "tape": "^4.9.0" - }, - "engines": { - "node": ">= 0.4.0" - }, - "homepage": "https://github.com/tarruda/has", - "license": "MIT", - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT" - } - ], - "main": "./src", - "name": "has", - "repository": { - "type": "git", - "url": "git://github.com/tarruda/has.git" - }, - "scripts": { - "lint": "eslint .", - "pretest": "npm run lint", - "test": "tape test" - }, - "version": "1.0.3" -} diff --git a/node_modules/has/src/index.js b/node_modules/has/src/index.js deleted file mode 100644 index dd92dd90..00000000 --- a/node_modules/has/src/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); - -module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); diff --git a/node_modules/has/test/index.js b/node_modules/has/test/index.js deleted file mode 100644 index 43d480b2..00000000 --- a/node_modules/has/test/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var test = require('tape'); -var has = require('../'); - -test('has', function (t) { - t.equal(has({}, 'hasOwnProperty'), false, 'object literal does not have own property "hasOwnProperty"'); - t.equal(has(Object.prototype, 'hasOwnProperty'), true, 'Object.prototype has own property "hasOwnProperty"'); - t.end(); -}); diff --git a/node_modules/hpagent/.github/dependabot.yml b/node_modules/hpagent/.github/dependabot.yml deleted file mode 100644 index 9dcd1583..00000000 --- a/node_modules/hpagent/.github/dependabot.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: 2 -updates: -- package-ecosystem: npm - directory: "/" - schedule: - interval: daily - time: "04:00" - open-pull-requests-limit: 10 diff --git a/node_modules/hpagent/.github/workflows/build.yml b/node_modules/hpagent/.github/workflows/build.yml deleted file mode 100644 index 444d84f0..00000000 --- a/node_modules/hpagent/.github/workflows/build.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: build - -on: [push, pull_request] - -jobs: - test: - name: Test - runs-on: ${{ matrix.os }} - - strategy: - matrix: - node-version: [10.x, 12.x, 14.x] - os: [ubuntu-latest, windows-latest, macOS-latest] - - steps: - - uses: actions/checkout@v2 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - - name: Install - run: | - npm install - - - name: Test - run: | - npm test diff --git a/node_modules/hpagent/LICENSE b/node_modules/hpagent/LICENSE deleted file mode 100644 index 1b5f50a9..00000000 --- a/node_modules/hpagent/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Tomas Della Vedova - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/hpagent/README.md b/node_modules/hpagent/README.md deleted file mode 100644 index 3c1df685..00000000 --- a/node_modules/hpagent/README.md +++ /dev/null @@ -1,138 +0,0 @@ -# hpagent - -[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) ![build](https://github.com/delvedor/hpagent/workflows/build/badge.svg) - -A ready to use http and https agent for working with proxies that keeps connections alive! - -## Install - -``` -npm install hpagent -``` - -## Usage - -Based on your infrastructure, you should use the http agent or the https agent. -The following table will help you picking the right one. - -| Type | Proxy | Server | -|-------------------|--------|--------| -| `HttpProxyAgent` | HTTP | HTTP | -| `HttpProxyAgent` | HTTPS | HTTP | -| `HttpsProxyAgent` | HTTP | HTTPS | -| `HttpsProxyAgent` | HTTPS | HTTPS | - -```js -const { HttpProxyAgent, HttpsProxyAgent } = require('hpagent') -``` - -Once you have understood the right agent for your use case, you can instance it. It takes the same parameter of the Node.js core's http(s) agent and an additional `proxy` option, which is the url of your proxy. - -```js -const http = require('http') -const { HttpProxyAgent } = require('hpagent') - -const agent = new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - proxy: 'http://localhost:8080' -}) - -http.get('http://localhost:9200', { agent }) - .on('response', console.log) - .end() -``` - -If your proxy requires basic authentication, you can configure it in the proxy url: - -```js -const http = require('http') -const { HttpProxyAgent } = require('hpagent') - -const agent = new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - proxy: 'http://user:pwd@localhost:8080' -}) - -http.get('http://localhost:9200', { agent }) - .on('response', console.log) - .end() -``` - -## Integrations - -Following you can find the list of userland http libraries that are tested with this agent. - -### [got](https://github.com/sindresorhus/got) - -```js -got('http://localhost:9200', { - agent: { - http: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: 'http://localhost:8080' - }) - } -}) -``` - -### [needle](https://github.com/tomas/needle) - -```js -needle('get', 'http://localhost:9200', { - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: 'http://localhost:8080' - }) -}) -``` - -### [node-fetch](https://github.com/node-fetch/node-fetch) - -```js -fetch('http://localhost:9200', { - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: 'http://localhost:8080' - }) -}) -``` - -### [simple-get](https://github.com/feross/simple-get) - -```js -sget.concat({ - url: `http://${server.address().address}:${server.address().port}`, - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) -}, function (err, response, data) { - // handle the response -}) -``` - -## License - -This software is licensed under the [MIT](./LICENSE). diff --git a/node_modules/hpagent/index.d.ts b/node_modules/hpagent/index.d.ts deleted file mode 100644 index a61e9699..00000000 --- a/node_modules/hpagent/index.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import * as http from 'http' -import * as https from 'https' -import { URL } from 'url' - -declare class HttpProxyAgent extends http.Agent { - constructor(options: HttpProxyAgentOptions) -} - -interface HttpProxyAgentOptions extends http.AgentOptions { - proxy: string | URL -} - -declare class HttpsProxyAgent extends https.Agent { - constructor(options: HttpsProxyAgentOptions) -} - -interface HttpsProxyAgentOptions extends https.AgentOptions { - proxy: string | URL -} - -export { - HttpProxyAgent, - HttpProxyAgentOptions, - HttpsProxyAgent, - HttpsProxyAgentOptions -} diff --git a/node_modules/hpagent/index.js b/node_modules/hpagent/index.js deleted file mode 100644 index ad37aaca..00000000 --- a/node_modules/hpagent/index.js +++ /dev/null @@ -1,101 +0,0 @@ -'use strict' - -const https = require('https') -const http = require('http') -const { URL } = require('url') - -class HttpProxyAgent extends http.Agent { - constructor (options) { - const { proxy, ...opts } = options - super(opts) - this.proxy = typeof proxy === 'string' - ? new URL(proxy) - : proxy - } - - createConnection (options, callback) { - const requestOptions = { - method: 'CONNECT', - host: this.proxy.hostname, - port: this.proxy.port, - path: `${options.host}:${options.port}`, - setHost: false, - headers: { connection: this.keepAlive ? 'keep-alive' : 'close', host: `${options.host}:${options.port}` }, - agent: false - } - - if (this.proxy.username || this.proxy.password) { - const base64 = Buffer.from(`${this.proxy.username || ''}:${this.proxy.password || ''}`).toString('base64') - requestOptions.headers['proxy-authorization'] = `Basic ${base64}` - } - - const request = (this.proxy.protocol === 'http:' ? http : https).request(requestOptions) - request.once('connect', (response, socket, head) => { - request.removeAllListeners() - socket.removeAllListeners() - if (response.statusCode === 200) { - callback(null, socket) - } else { - callback(new Error(`Bad response: ${response.statusCode}`), null) - } - }) - - request.once('error', err => { - request.removeAllListeners() - callback(err, null) - }) - - request.end() - } -} - -class HttpsProxyAgent extends https.Agent { - constructor (options) { - const { proxy, ...opts } = options - super(opts) - this.proxy = typeof proxy === 'string' - ? new URL(proxy) - : proxy - } - - createConnection (options, callback) { - const requestOptions = { - method: 'CONNECT', - host: this.proxy.hostname, - port: this.proxy.port, - path: `${options.host}:${options.port}`, - setHost: false, - headers: { connection: this.keepAlive ? 'keep-alive' : 'close', host: `${options.host}:${options.port}` }, - agent: false - } - - if (this.proxy.username || this.proxy.password) { - const base64 = Buffer.from(`${this.proxy.username || ''}:${this.proxy.password || ''}`).toString('base64') - requestOptions.headers['proxy-authorization'] = `Basic ${base64}` - } - - const request = (this.proxy.protocol === 'http:' ? http : https).request(requestOptions) - request.once('connect', (response, socket, head) => { - request.removeAllListeners() - socket.removeAllListeners() - if (response.statusCode === 200) { - const secureSocket = super.createConnection({ ...options, socket }) - callback(null, secureSocket) - } else { - callback(new Error(`Bad response: ${response.statusCode}`), null) - } - }) - - request.once('error', err => { - request.removeAllListeners() - callback(err, null) - }) - - request.end() - } -} - -module.exports = { - HttpProxyAgent, - HttpsProxyAgent -} diff --git a/node_modules/hpagent/index.mjs b/node_modules/hpagent/index.mjs deleted file mode 100644 index fd36cded..00000000 --- a/node_modules/hpagent/index.mjs +++ /dev/null @@ -1,5 +0,0 @@ -import mod from './index.js' - -export default mod -export const HttpProxyAgent = mod.HttpProxyAgent -export const HttpsProxyAgent = mod.HttpsProxyAgent diff --git a/node_modules/hpagent/package.json b/node_modules/hpagent/package.json deleted file mode 100644 index f8c874f5..00000000 --- a/node_modules/hpagent/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_from": "hpagent@~0.1.0", - "_id": "hpagent@0.1.2", - "_inBundle": false, - "_integrity": "sha512-ePqFXHtSQWAFXYmj+JtOTHr84iNrII4/QRlAAPPE+zqnKy4xJo7Ie1Y4kC7AdB+LxLxSTTzBMASsEcy0q8YyvQ==", - "_location": "/hpagent", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "hpagent@~0.1.0", - "name": "hpagent", - "escapedName": "hpagent", - "rawSpec": "~0.1.0", - "saveSpec": null, - "fetchSpec": "~0.1.0" - }, - "_requiredBy": [ - "/@antora/content-aggregator", - "/@antora/ui-loader" - ], - "_resolved": "https://registry.npmjs.org/hpagent/-/hpagent-0.1.2.tgz", - "_shasum": "cab39c66d4df2d4377dbd212295d878deb9bdaa9", - "_spec": "hpagent@~0.1.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/content-aggregator", - "author": { - "name": "Tomas Della Vedova" - }, - "bugs": { - "url": "https://github.com/delvedor/hpagent/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A ready to use http and https agent for working with proxies that keeps connections alive!", - "devDependencies": { - "ava": "^3.10.1", - "got": "^11.5.1", - "needle": "^2.5.0", - "node-fetch": "^2.6.0", - "proxy": "^1.0.2", - "simple-get": "^4.0.0", - "standard": "^16.0.1", - "tsd": "^0.13.1" - }, - "exports": { - ".": { - "require": "./index.js", - "import": "./index.mjs" - }, - "./": "./" - }, - "homepage": "https://github.com/delvedor/hpagent#readme", - "keywords": [ - "agent", - "http", - "https", - "secure", - "proxy", - "alive", - "keep-alive" - ], - "license": "MIT", - "main": "index.js", - "name": "hpagent", - "repository": { - "type": "git", - "url": "git+https://github.com/delvedor/hpagent.git" - }, - "scripts": { - "test": "standard && ava -v test/*.test.js && tsd" - }, - "tsd": { - "directory": "test" - }, - "types": "index.d.ts", - "version": "0.1.2" -} diff --git a/node_modules/hpagent/test/got.test.js b/node_modules/hpagent/test/got.test.js deleted file mode 100644 index bb69b5aa..00000000 --- a/node_modules/hpagent/test/got.test.js +++ /dev/null @@ -1,111 +0,0 @@ -'use strict' - -const got = require('got') -const test = require('ava') -const { - createServer, - createSecureServer, - createProxy, - createSecureProxy -} = require('./utils') -const { HttpProxyAgent, HttpsProxyAgent } = require('../') - -test('http to http', async t => { - const server = await createServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await got(`http://${server.address().address}:${server.address().port}`, { - agent: { - http: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - } - }) - - t.is(response.body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('https to http', async t => { - const server = await createServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await got(`http://${server.address().address}:${server.address().port}`, { - agent: { - http: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - } - }) - - t.is(response.body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('http to https', async t => { - const server = await createSecureServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await got(`https://${server.address().address}:${server.address().port}`, { - agent: { - http: new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - } - }) - - t.is(response.body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('https to https', async t => { - const server = await createSecureServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await got(`https://${server.address().address}:${server.address().port}`, { - agent: { - http: new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - } - }) - - t.is(response.body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) diff --git a/node_modules/hpagent/test/http-http.test.js b/node_modules/hpagent/test/http-http.test.js deleted file mode 100644 index b96556a0..00000000 --- a/node_modules/hpagent/test/http-http.test.js +++ /dev/null @@ -1,351 +0,0 @@ -'use strict' - -const http = require('http') -const test = require('ava') -const { createServer, createProxy } = require('./utils') -const { HttpProxyAgent } = require('../') - -function request (opts) { - return new Promise((resolve, reject) => { - const req = http.request(opts, resolve) - req.on('error', reject) - req.end(opts.body) - }) -} - -test('Basic', async t => { - const server = await createServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Connection header (keep-alive)', async t => { - const server = await createServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - proxy.authenticate = function (req, fn) { - t.is(req.headers.connection, 'keep-alive') - fn(null, true) - } - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Connection header (close)', async t => { - const server = await createServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - proxy.authenticate = function (req, fn) { - t.is(req.headers.connection, 'close') - fn(null, true) - } - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpProxyAgent({ - keepAlive: false, - keepAliveMsecs: 1000, - maxSockets: Infinity, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Proxy authentication (empty)', async t => { - const server = await createServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - proxy.authenticate = function (req, fn) { - fn(null, req.headers['proxy-authorization'] === undefined) - } - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Proxy authentication', async t => { - const server = await createServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - proxy.authenticate = function (req, fn) { - fn(null, req.headers['proxy-authorization'] === `Basic ${Buffer.from('hello:world').toString('base64')}`) - } - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://hello:world@${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Configure the agent to reuse sockets', async t => { - const server = await createServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - let count = 0 - proxy.on('connection', () => { - count += 1 - t.is(count, 1) - }) - - const agent = new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - - let response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent - }) - - body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Configure the agent to NOT reuse sockets', async t => { - const server = await createServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - const ports = [] - proxy.on('connection', socket => { - t.false(ports.includes(socket.remotePort)) - ports.push(socket.remotePort) - }) - - const agent = new HttpProxyAgent({ - keepAlive: false, - keepAliveMsecs: 1000, - maxSockets: Infinity, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - - let response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent - }) - - body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Test Host Header', async t => { - const server = await createServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - proxy.authenticate = function (req, fn) { - t.is(req.headers.host, `${server.address().address}:${server.address().port}`) - fn(null, true) - } - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) diff --git a/node_modules/hpagent/test/http-https.test.js b/node_modules/hpagent/test/http-https.test.js deleted file mode 100644 index f59bdd2f..00000000 --- a/node_modules/hpagent/test/http-https.test.js +++ /dev/null @@ -1,313 +0,0 @@ -'use strict' - -const https = require('https') -const test = require('ava') -const { createSecureServer, createProxy } = require('./utils') -const { HttpsProxyAgent } = require('../') - -function request (opts) { - return new Promise((resolve, reject) => { - const req = https.request(opts, resolve) - req.on('error', reject) - req.end(opts.body) - }) -} - -test('Basic', async t => { - const server = await createSecureServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Connection header (keep-alive)', async t => { - const server = await createSecureServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - proxy.authenticate = function (req, fn) { - t.is(req.headers.connection, 'keep-alive') - fn(null, true) - } - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Connection header (close)', async t => { - const server = await createSecureServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - proxy.authenticate = function (req, fn) { - t.is(req.headers.connection, 'close') - fn(null, true) - } - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpsProxyAgent({ - keepAlive: false, - keepAliveMsecs: 1000, - maxSockets: Infinity, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Proxy authentication (empty)', async t => { - const server = await createSecureServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - proxy.authenticate = function (req, fn) { - fn(null, req.headers['proxy-authorization'] === undefined) - } - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Proxy authentication', async t => { - const server = await createSecureServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - proxy.authenticate = function (req, fn) { - fn(null, req.headers['proxy-authorization'] === `Basic ${Buffer.from('hello:world').toString('base64')}`) - } - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://hello:world@${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Configure the agent to reuse sockets', async t => { - const server = await createSecureServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - let count = 0 - proxy.on('connection', () => { - count += 1 - t.is(count, 1) - }) - - const agent = new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - - let response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent - }) - - body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Configure the agent to NOT reuse sockets', async t => { - const server = await createSecureServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - const ports = [] - proxy.on('connection', socket => { - t.false(ports.includes(socket.remotePort)) - ports.push(socket.remotePort) - }) - - const agent = new HttpsProxyAgent({ - keepAlive: false, - keepAliveMsecs: 1000, - maxSockets: Infinity, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - - let response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent - }) - - body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) diff --git a/node_modules/hpagent/test/https-http.test.js b/node_modules/hpagent/test/https-http.test.js deleted file mode 100644 index 8d6a47c3..00000000 --- a/node_modules/hpagent/test/https-http.test.js +++ /dev/null @@ -1,313 +0,0 @@ -'use strict' - -const http = require('http') -const test = require('ava') -const { createServer, createSecureProxy } = require('./utils') -const { HttpProxyAgent } = require('../') - -function request (opts) { - return new Promise((resolve, reject) => { - const req = http.request(opts, resolve) - req.on('error', reject) - req.end(opts.body) - }) -} - -test('Basic', async t => { - const server = await createServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Connection header (keep-alive)', async t => { - const server = await createServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - proxy.authenticate = function (req, fn) { - t.is(req.headers.connection, 'keep-alive') - fn(null, true) - } - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Connection header (close)', async t => { - const server = await createServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - proxy.authenticate = function (req, fn) { - t.is(req.headers.connection, 'close') - fn(null, true) - } - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpProxyAgent({ - keepAlive: false, - keepAliveMsecs: 1000, - maxSockets: Infinity, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Proxy authentication (empty)', async t => { - const server = await createServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - proxy.authenticate = function (req, fn) { - fn(null, req.headers['proxy-authorization'] === undefined) - } - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Proxy authentication', async t => { - const server = await createServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - proxy.authenticate = function (req, fn) { - fn(null, req.headers['proxy-authorization'] === `Basic ${Buffer.from('hello:world').toString('base64')}`) - } - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://hello:world@${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Configure the agent to reuse sockets', async t => { - const server = await createServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - let count = 0 - proxy.on('connection', () => { - count += 1 - t.is(count, 1) - }) - - const agent = new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - - let response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent - }) - - body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Configure the agent to NOT reuse sockets', async t => { - const server = await createServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - const ports = [] - proxy.on('connection', socket => { - t.false(ports.includes(socket.remotePort)) - ports.push(socket.remotePort) - }) - - const agent = new HttpProxyAgent({ - keepAlive: false, - keepAliveMsecs: 1000, - maxSockets: Infinity, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - - let response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent - }) - - body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) diff --git a/node_modules/hpagent/test/https-https.test.js b/node_modules/hpagent/test/https-https.test.js deleted file mode 100644 index b718e522..00000000 --- a/node_modules/hpagent/test/https-https.test.js +++ /dev/null @@ -1,313 +0,0 @@ -'use strict' - -const https = require('https') -const test = require('ava') -const { createSecureServer, createSecureProxy } = require('./utils') -const { HttpsProxyAgent } = require('../') - -function request (opts) { - return new Promise((resolve, reject) => { - const req = https.request(opts, resolve) - req.on('error', reject) - req.end(opts.body) - }) -} - -test('Basic', async t => { - const server = await createSecureServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Connection header (keep-alive)', async t => { - const server = await createSecureServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - proxy.authenticate = function (req, fn) { - t.is(req.headers.connection, 'keep-alive') - fn(null, true) - } - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Connection header (close)', async t => { - const server = await createSecureServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - proxy.authenticate = function (req, fn) { - t.is(req.headers.connection, 'close') - fn(null, true) - } - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpsProxyAgent({ - keepAlive: false, - keepAliveMsecs: 1000, - maxSockets: Infinity, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Proxy authentication (empty)', async t => { - const server = await createSecureServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - proxy.authenticate = function (req, fn) { - fn(null, req.headers['proxy-authorization'] === undefined) - } - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Proxy authentication', async t => { - const server = await createSecureServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - proxy.authenticate = function (req, fn) { - fn(null, req.headers['proxy-authorization'] === `Basic ${Buffer.from('hello:world').toString('base64')}`) - } - - const response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent: new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://hello:world@${proxy.address().address}:${proxy.address().port}` - }) - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Configure the agent to reuse sockets', async t => { - const server = await createSecureServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - let count = 0 - proxy.on('connection', () => { - count += 1 - t.is(count, 1) - }) - - const agent = new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - - let response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent - }) - - body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('Configure the agent to NOT reuse sockets', async t => { - const server = await createSecureServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - const ports = [] - proxy.on('connection', socket => { - t.false(ports.includes(socket.remotePort)) - ports.push(socket.remotePort) - }) - - const agent = new HttpsProxyAgent({ - keepAlive: false, - keepAliveMsecs: 1000, - maxSockets: Infinity, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - - let response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent - }) - - let body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - response = await request({ - method: 'GET', - hostname: server.address().address, - port: server.address().port, - path: '/', - agent - }) - - body = '' - response.setEncoding('utf8') - for await (const chunk of response) { - body += chunk - } - - t.is(body, 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) diff --git a/node_modules/hpagent/test/index.test-d.ts b/node_modules/hpagent/test/index.test-d.ts deleted file mode 100644 index 71d0b8d5..00000000 --- a/node_modules/hpagent/test/index.test-d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import * as http from 'http' -import * as https from 'https' -import { expectType } from 'tsd' -import { - HttpProxyAgent, - HttpProxyAgentOptions, - HttpsProxyAgent, - HttpsProxyAgentOptions -} from '../' - -{ - const agent = new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - proxy: 'http://localhost:8080' - }) - - expectType<HttpProxyAgent>(agent) - http.request({ - method: 'GET', - hostname: 'localhost', - port: 9200, - agent - }) -} - -{ - const agent = new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - proxy: 'http://localhost:8080' - }) - - expectType<HttpsProxyAgent>(agent) - https.request({ - method: 'GET', - hostname: 'localhost', - port: 9200, - agent - }) -} diff --git a/node_modules/hpagent/test/needle.test.js b/node_modules/hpagent/test/needle.test.js deleted file mode 100644 index 814d8a2c..00000000 --- a/node_modules/hpagent/test/needle.test.js +++ /dev/null @@ -1,103 +0,0 @@ -'use strict' - -const needle = require('needle') -const test = require('ava') -const { - createServer, - createSecureServer, - createProxy, - createSecureProxy -} = require('./utils') -const { HttpProxyAgent, HttpsProxyAgent } = require('../') - -test('http to http', async t => { - const server = await createServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await needle('get', `http://${server.address().address}:${server.address().port}`, { - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - }) - - t.is(response.body.toString(), 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('https to http', async t => { - const server = await createServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await needle('get', `http://${server.address().address}:${server.address().port}`, { - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - }) - - t.is(response.body.toString(), 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('http to https', async t => { - const server = await createSecureServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await needle('get', `https://${server.address().address}:${server.address().port}`, { - agent: new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - }) - - t.is(response.body.toString(), 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('https to https', async t => { - const server = await createSecureServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await needle('get', `https://${server.address().address}:${server.address().port}`, { - agent: new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - }) - - t.is(response.body.toString(), 'ok') - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) diff --git a/node_modules/hpagent/test/node-fetch.test.js b/node_modules/hpagent/test/node-fetch.test.js deleted file mode 100644 index 60f157db..00000000 --- a/node_modules/hpagent/test/node-fetch.test.js +++ /dev/null @@ -1,103 +0,0 @@ -'use strict' - -const fetch = require('node-fetch') -const test = require('ava') -const { - createServer, - createSecureServer, - createProxy, - createSecureProxy -} = require('./utils') -const { HttpProxyAgent, HttpsProxyAgent } = require('../') - -test('http to http', async t => { - const server = await createServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await fetch(`http://${server.address().address}:${server.address().port}`, { - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - }) - - t.is(await response.text(), 'ok') - t.is(response.status, 200) - - server.close() - proxy.close() -}) - -test('https to http', async t => { - const server = await createServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await fetch(`http://${server.address().address}:${server.address().port}`, { - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - }) - - t.is(await response.text(), 'ok') - t.is(response.status, 200) - - server.close() - proxy.close() -}) - -test('http to https', async t => { - const server = await createSecureServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await fetch(`https://${server.address().address}:${server.address().port}`, { - agent: new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - }) - - t.is(await response.text(), 'ok') - t.is(response.status, 200) - - server.close() - proxy.close() -}) - -test('https to https', async t => { - const server = await createSecureServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await fetch(`https://${server.address().address}:${server.address().port}`, { - agent: new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - }) - - t.is(await response.text(), 'ok') - t.is(response.status, 200) - - server.close() - proxy.close() -}) diff --git a/node_modules/hpagent/test/simple-get.test.js b/node_modules/hpagent/test/simple-get.test.js deleted file mode 100644 index 9468aa6d..00000000 --- a/node_modules/hpagent/test/simple-get.test.js +++ /dev/null @@ -1,139 +0,0 @@ -'use strict' - -const sget = require('simple-get') -const test = require('ava') -const { - createServer, - createSecureServer, - createProxy, - createSecureProxy -} = require('./utils') -const { HttpProxyAgent, HttpsProxyAgent } = require('..') - -test('http to http', async t => { - const server = await createServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await new Promise((resolve, reject) => { - sget.concat({ - url: `http://${server.address().address}:${server.address().port}`, - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - }, function (err, response, data) { - if (err) { - return reject(err) - } - t.is(data.toString(), 'ok') - - return resolve(response) - }) - }) - - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('https to http', async t => { - const server = await createServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await new Promise((resolve, reject) => { - sget.concat({ - url: `http://${server.address().address}:${server.address().port}`, - agent: new HttpProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - }, function (err, response, data) { - if (err) { - return reject(err) - } - t.is(data.toString(), 'ok') - - return resolve(response) - }) - }) - - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('http to https', async t => { - const server = await createSecureServer() - const proxy = await createProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await new Promise((resolve, reject) => { - sget.concat({ - url: `https://${server.address().address}:${server.address().port}`, - agent: new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `http://${proxy.address().address}:${proxy.address().port}` - }) - }, function (err, response, data) { - if (err) { - return reject(err) - } - t.is(data.toString(), 'ok') - - return resolve(response) - }) - }) - - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) - -test('https to https', async t => { - const server = await createSecureServer() - const proxy = await createSecureProxy() - server.on('request', (req, res) => res.end('ok')) - - const response = await new Promise((resolve, reject) => { - sget.concat({ - url: `https://${server.address().address}:${server.address().port}`, - agent: new HttpsProxyAgent({ - keepAlive: true, - keepAliveMsecs: 1000, - maxSockets: 256, - maxFreeSockets: 256, - scheduling: 'lifo', - proxy: `https://${proxy.address().address}:${proxy.address().port}` - }) - }, function (err, response, data) { - if (err) { - return reject(err) - } - t.is(data.toString(), 'ok') - - return resolve(response) - }) - }) - - t.is(response.statusCode, 200) - - server.close() - proxy.close() -}) diff --git a/node_modules/hpagent/test/ssl.cert b/node_modules/hpagent/test/ssl.cert deleted file mode 100644 index d859cfa9..00000000 --- a/node_modules/hpagent/test/ssl.cert +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDBzCCAe+gAwIBAgIJALbQMeb7k/WqMA0GCSqGSIb3DQEBBQUAMBoxGDAWBgNV -BAMMD3d3dy5mYXN0aWZ5Lm9yZzAeFw0xNzAyMDcyMDE5NDJaFw0yNzAyMDUyMDE5 -NDJaMBoxGDAWBgNVBAMMD3d3dy5mYXN0aWZ5Lm9yZzCCASIwDQYJKoZIhvcNAQEB -BQADggEPADCCAQoCggEBAKtfXzDMmU+n3A7oVVOiqp6Z5cgu1t+qgj7TadwXONvO -RZvuOcE8BZpM9tQEDE5XEIdcszDx0tWKHHSobgZAxDaEuK1PMhh/RTNvw1KzYJFm -2G38mqgm11JUni87xmIFqpgJfeCApHnWUv+3/npuQniOoVSL13jdXEifeFM8onQn -R73TVDyvMOjljTulMo0n9V8pYhVSzPnm2uxTu03p5+HosQE2bU0QKj7k8/8dwRVX -EqnTtbLoW+Wf7V2W3cr/UnfPH8JSaBWTqct0pgXqYIqOSTiWQkO7pE69mGPHrRlm -7+whp4WRriTacB3Ul+Cbx28wHU+D83ver4A8LKGVDSECAwEAAaNQME4wHQYDVR0O -BBYEFHVzTr/tNziIUrR75UHXXA84yqmgMB8GA1UdIwQYMBaAFHVzTr/tNziIUrR7 -5UHXXA84yqmgMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAKVSdGeF -vYcZOi0TG2WX7O3tSmu4G4nGxTldFiEVF89G0AU+HhNy9iwKXQLjDB7zMe/ZKbtJ -cQgc6s8eZWxBk/OoPD1WNFGstx2EO2kRkSUBKhwnOct7CIS5X+NPXyHx2Yi03JHX -unMA4WaHyo0dK4vAuali4OYdQqajNwL74avkRIxXFnZQeHzaq6tc6gX+ryB4dDSr -tYn46Lo14D5jH6PtZ8DlGK+jIzM4IE7TEp2iv0CgaTU4ryt/SHPnLxfwZUpl7gSO -EqkMAy3TlRMpv0oXM2Vh/CsyJzq2P/nY/O3bolsashSPWo9WsQTH4giYVA51ZVDK -lGksQD+oWpfa3X0= ------END CERTIFICATE----- diff --git a/node_modules/hpagent/test/ssl.key b/node_modules/hpagent/test/ssl.key deleted file mode 100644 index e3778a19..00000000 --- a/node_modules/hpagent/test/ssl.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEAq19fMMyZT6fcDuhVU6KqnpnlyC7W36qCPtNp3Bc4285Fm+45 -wTwFmkz21AQMTlcQh1yzMPHS1YocdKhuBkDENoS4rU8yGH9FM2/DUrNgkWbYbfya -qCbXUlSeLzvGYgWqmAl94ICkedZS/7f+em5CeI6hVIvXeN1cSJ94UzyidCdHvdNU -PK8w6OWNO6UyjSf1XyliFVLM+eba7FO7Tenn4eixATZtTRAqPuTz/x3BFVcSqdO1 -suhb5Z/tXZbdyv9Sd88fwlJoFZOpy3SmBepgio5JOJZCQ7ukTr2YY8etGWbv7CGn -hZGuJNpwHdSX4JvHbzAdT4Pze96vgDwsoZUNIQIDAQABAoIBAG278ys/R8he1yVg -lgqo9ZH7P8zwWTz9ZMsv+vAomor9SUtwvuDCO2AzejYGpY6gZ4AV1tQ3dOaxukjk -9Rbh8AJs+AhZ1t0i2b/3B95z6BkS/vFmt+2GeYhJkMT0BLMNp9AU+9p+5VLy71C5 -k6T3525k/l8x8HZ/YDFMk/LQt8GhvM6A3J3BNElKraiDVO6ZIWgQQ5wiefJkApo1 -BsptHNTx83FbnkEbAahmOR8PfKcRdKY/mZDM2WrlfoU2uwVzPV0/KdYucpsfg2et -jb5bdJzcvZDuDF4GsPi1asCSC1c403R0XGuPFW9TiBuOPxbfhYK2o60yTggX6H2X -39WBc/ECgYEA3KNGgXEWzDSLpGciUisP+MzulOdQPawBTUHNykpQklEppnZbNWCX -07dv6uasnp0pFHG4WlhZJ4+IQBpZH6xAVy9y68PvN7IDYdgMiEiYPSyqQu0rvJGa -2ZR79SHDokZ8K5oofocC839RzleNRqWqxIwhHt29sxVs73kvml6OQm0CgYEAxtbA -zbQwf6DXtFwutSgfOLgdXQK72beBdyeTcpUGbkonl5xHSbtz0CFmRpKiPnXfgg4W -GXlTrqlYF/o048B7dU9+jCKY5DXx1Yzg/EFisEIClad3WXMhNOz1vBYVH6xU3Zq1 -YuYr5dcqiCWDv89e6Y6WJOhwIDZi6RqikD2EJQUCgYEAnWSAJFCnIa8OOo4z5oe/ -kg2m2GQWUphEKXeatQbEaUwquQvPTsmEJUzDMr+xPkkAiAwDpbdGijkSyh/Bmh2H -nGpFwbf5CzMaxI6ZihK3P1SAdNO5koAQBcytjJW0eCtt4rDK2E+5pDgcBGVia5Y8 -to78BYfLDlhnaIF7mtR/CRUCgYEAvGCuzvOcUv4F/eirk5NMaQb9QqYZZD2XWVTU -O2T2b7yvX9J+M1t1cESESe4X6cbwlp1T0JSCdGIZhLXWL8Om80/52zfX07VLxP6w -FCy6G7SeEDxVNRh+6E5qzOO65YP17vDoUacxBZJgyBWKiUkkaW9dzd+sgsgj0yYZ -xz+QlyUCgYEAxdNWQnz0pR5Rt2dbIedPs7wmiZ7eAe0VjCdhMa52IyJpejdeB6Bn -Es+3lkHr0Xzty8XlQZcpbswhM8UZRgPVoBvvwQdQbv5yV+LdUu69pLM7InsdZy8u -opPY/+q9lRdJt4Pbep3pOWYeLP7k5l4vei2vOEMHRjHnoqM5etSb6RU= ------END RSA PRIVATE KEY----- diff --git a/node_modules/hpagent/test/utils.js b/node_modules/hpagent/test/utils.js deleted file mode 100644 index 96e352fc..00000000 --- a/node_modules/hpagent/test/utils.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict' - -// We are using self-signed certificates -process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0 - -const proxy = require('proxy') -const { readFileSync } = require('fs') -const { join } = require('path') -const http = require('http') -const https = require('https') - -const ssl = { - key: readFileSync(join(__dirname, 'ssl.key')), - cert: readFileSync(join(__dirname, 'ssl.cert')) -} - -function createProxy () { - return new Promise((resolve, reject) => { - const server = proxy(http.createServer()) - server.listen(0, '127.0.0.1', () => { - resolve(server) - }) - }) -} - -function createSecureProxy () { - return new Promise((resolve, reject) => { - const server = proxy(https.createServer(ssl)) - server.listen(0, '127.0.0.1', () => { - resolve(server) - }) - }) -} - -function createServer (handler, callback) { - return new Promise((resolve, reject) => { - const server = http.createServer() - server.listen(0, '127.0.0.1', () => { - resolve(server) - }) - }) -} - -function createSecureServer (handler, callback) { - return new Promise((resolve, reject) => { - const server = https.createServer(ssl) - server.listen(0, '127.0.0.1', () => { - resolve(server) - }) - }) -} - -module.exports = { - ssl, - createProxy, - createSecureProxy, - createServer, - createSecureServer -} diff --git a/node_modules/ignore/CHANGELOG.md b/node_modules/ignore/CHANGELOG.md deleted file mode 100644 index dc38d633..00000000 --- a/node_modules/ignore/CHANGELOG.md +++ /dev/null @@ -1,32 +0,0 @@ -# `node-ignore` 5 ChangeLog - -# 5.x - -## 2018-08-14, Version 5.0.1 - -- **PATCH**: fixes for windows. -- **PATCH**: improves tests for typescript and windows. - -## 2018-08-13, Version 5.0.0 - -- **SEMVER-MAJOR**: [#20](https://github.com/kaelzhang/node-ignore/issues/20): it will throw if an invalid pathname passes into `.ignores(pathname)`, see [Upgrade 4.x -> 5.x](https://github.com/kaelzhang/node-ignore#upgrade-4x---5x). -- **FEATURE**: [#31](https://github.com/kaelzhang/node-ignore/issues/31): adds a new method [`.test(pathname)`](https://github.com/kaelzhang/node-ignore#testpathname-pathname-since-500). -- **BENCHMARK**: improves performance by 26%. - -# 4.x - -## 2018-08-12, Version 4.0.6 - -- **PATCH**: `Object.prototype` methods will not ruin the result any more. - -## ~ 2018-08-09, Version 4.0.1 - 4.0.5 - -- **PATCH**: updates README.md about frequent asked quesions from github issues. - -## 2018-06-22, Version 4.0.0 - -- **SEMVER-MAJOR**: Drop support for node < 6 by default. -- **FEATURE**: supports the missing character ranges and sets, such as `*.[a-z]` and `*.[jJ][pP][gG]` -- **FEATURE**: new option: `ignorecase` to make `ignore` case insensitive. -- **FEATURE**: supports question mark which matches a single character. -- **PATCH**: fixes typescript declaration. diff --git a/node_modules/ignore/LICENSE-MIT b/node_modules/ignore/LICENSE-MIT deleted file mode 100644 index 825533e3..00000000 --- a/node_modules/ignore/LICENSE-MIT +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2013 Kael Zhang <i@kael.me>, contributors -http://kael.me/ - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/ignore/README.md b/node_modules/ignore/README.md deleted file mode 100644 index 4bdac9da..00000000 --- a/node_modules/ignore/README.md +++ /dev/null @@ -1,392 +0,0 @@ -<table><thead> - <tr> - <th>Linux</th> - <th>OS X</th> - <th>Windows</th> - <th>Coverage</th> - <th>Downloads</th> - </tr> -</thead><tbody><tr> - <td colspan="2" align="center"> - <a href="https://travis-ci.org/kaelzhang/node-ignore"> - <img - src="https://travis-ci.org/kaelzhang/node-ignore.svg?branch=master" - alt="Build Status" /></a> - </td> - <td align="center"> - <a href="https://ci.appveyor.com/project/kaelzhang/node-ignore"> - <img - src="https://ci.appveyor.com/api/projects/status/github/kaelzhang/node-ignore?branch=master&svg=true" - alt="Windows Build Status" /></a> - </td> - <td align="center"> - <a href="https://codecov.io/gh/kaelzhang/node-ignore"> - <img - src="https://codecov.io/gh/kaelzhang/node-ignore/branch/master/graph/badge.svg" - alt="Coverage Status" /></a> - </td> - <td align="center"> - <a href="https://www.npmjs.org/package/ignore"> - <img - src="http://img.shields.io/npm/dm/ignore.svg" - alt="npm module downloads per month" /></a> - </td> -</tr></tbody></table> - -# ignore - -`ignore` is a manager, filter and parser which implemented in pure JavaScript according to the [.gitignore spec 2.22.1](http://git-scm.com/docs/gitignore). - -`ignore` is used by eslint, gitbook and [many others](https://www.npmjs.com/browse/depended/ignore). - -Pay **ATTENTION** that [`minimatch`](https://www.npmjs.org/package/minimatch) (which used by `fstream-ignore`) does not follow the gitignore spec. - -To filter filenames according to a .gitignore file, I recommend this npm package, `ignore`. - -To parse an `.npmignore` file, you should use `minimatch`, because an `.npmignore` file is parsed by npm using `minimatch` and it does not work in the .gitignore way. - -### Tested on - -`ignore` is fully tested, and has more than **five hundreds** of unit tests. - -- Linux + Node: `0.8` - `7.x` -- Windows + Node: `0.10` - `7.x`, node < `0.10` is not tested due to the lack of support of appveyor. - -Actually, `ignore` does not rely on any versions of node specially. - -Since `4.0.0`, ignore will no longer support `node < 6` by default, to use in node < 6, `require('ignore/legacy')`. For details, see [CHANGELOG](https://github.com/kaelzhang/node-ignore/blob/master/CHANGELOG.md). - -## Table Of Main Contents - -- [Usage](#usage) -- [`Pathname` Conventions](#pathname-conventions) -- See Also: - - [`glob-gitignore`](https://www.npmjs.com/package/glob-gitignore) matches files using patterns and filters them according to gitignore rules. -- [Upgrade Guide](#upgrade-guide) - -## Install - -```sh -npm i ignore -``` - -## Usage - -```js -import ignore from 'ignore' -const ig = ignore().add(['.abc/*', '!.abc/d/']) -``` - -### Filter the given paths - -```js -const paths = [ - '.abc/a.js', // filtered out - '.abc/d/e.js' // included -] - -ig.filter(paths) // ['.abc/d/e.js'] -ig.ignores('.abc/a.js') // true -``` - -### As the filter function - -```js -paths.filter(ig.createFilter()); // ['.abc/d/e.js'] -``` - -### Win32 paths will be handled - -```js -ig.filter(['.abc\\a.js', '.abc\\d\\e.js']) -// if the code above runs on windows, the result will be -// ['.abc\\d\\e.js'] -``` - -## Why another ignore? - -- `ignore` is a standalone module, and is much simpler so that it could easy work with other programs, unlike [isaacs](https://npmjs.org/~isaacs)'s [fstream-ignore](https://npmjs.org/package/fstream-ignore) which must work with the modules of the fstream family. - -- `ignore` only contains utility methods to filter paths according to the specified ignore rules, so - - `ignore` never try to find out ignore rules by traversing directories or fetching from git configurations. - - `ignore` don't cares about sub-modules of git projects. - -- Exactly according to [gitignore man page](http://git-scm.com/docs/gitignore), fixes some known matching issues of fstream-ignore, such as: - - '`/*.js`' should only match '`a.js`', but not '`abc/a.js`'. - - '`**/foo`' should match '`foo`' anywhere. - - Prevent re-including a file if a parent directory of that file is excluded. - - Handle trailing whitespaces: - - `'a '`(one space) should not match `'a '`(two spaces). - - `'a \ '` matches `'a '` - - All test cases are verified with the result of `git check-ignore`. - -# Methods - -## .add(pattern: string | Ignore): this -## .add(patterns: Array<string | Ignore>): this - -- **pattern** `String | Ignore` An ignore pattern string, or the `Ignore` instance -- **patterns** `Array<String | Ignore>` Array of ignore patterns. - -Adds a rule or several rules to the current manager. - -Returns `this` - -Notice that a line starting with `'#'`(hash) is treated as a comment. Put a backslash (`'\'`) in front of the first hash for patterns that begin with a hash, if you want to ignore a file with a hash at the beginning of the filename. - -```js -ignore().add('#abc').ignores('#abc') // false -ignore().add('\#abc').ignores('#abc') // true -``` - -`pattern` could either be a line of ignore pattern or a string of multiple ignore patterns, which means we could just `ignore().add()` the content of a ignore file: - -```js -ignore() -.add(fs.readFileSync(filenameOfGitignore).toString()) -.filter(filenames) -``` - -`pattern` could also be an `ignore` instance, so that we could easily inherit the rules of another `Ignore` instance. - -## <strike>.addIgnoreFile(path)</strike> - -REMOVED in `3.x` for now. - -To upgrade `ignore@2.x` up to `3.x`, use - -```js -import fs from 'fs' - -if (fs.existsSync(filename)) { - ignore().add(fs.readFileSync(filename).toString()) -} -``` - -instead. - -## .filter(paths: Array<Pathname>): Array<Pathname> - -```ts -type Pathname = string -``` - -Filters the given array of pathnames, and returns the filtered array. - -- **paths** `Array.<Pathname>` The array of `pathname`s to be filtered. - -### `Pathname` Conventions: - -#### 1. `Pathname` should be a `path.relative()`d pathname - -`Pathname` should be a string that have been `path.join()`ed, or the return value of `path.relative()` to the current directory, - -```js -// WRONG, an error will be thrown -ig.ignores('./abc') - -// WRONG, for it will never happen, and an error will be thrown -// If the gitignore rule locates at the root directory, -// `'/abc'` should be changed to `'abc'`. -// ``` -// path.relative('/', '/abc') -> 'abc' -// ``` -ig.ignores('/abc') - -// WRONG, that it is an absolute path on Windows, an error will be thrown -ig.ignores('C:\\abc') - -// Right -ig.ignores('abc') - -// Right -ig.ignores(path.join('./abc')) // path.join('./abc') -> 'abc' -``` - -In other words, each `Pathname` here should be a relative path to the directory of the gitignore rules. - -Suppose the dir structure is: - -``` -/path/to/your/repo - |-- a - | |-- a.js - | - |-- .b - | - |-- .c - |-- .DS_store -``` - -Then the `paths` might be like this: - -```js -[ - 'a/a.js' - '.b', - '.c/.DS_store' -] -``` - -#### 2. filenames and dirnames - -`node-ignore` does NO `fs.stat` during path matching, so for the example below: - -```js -// First, we add a ignore pattern to ignore a directory -ig.add('config/') - -// `ig` does NOT know if 'config', in the real world, -// is a normal file, directory or something. - -ig.ignores('config') -// `ig` treats `config` as a file, so it returns `false` - -ig.ignores('config/') -// returns `true` -``` - -Specially for people who develop some library based on `node-ignore`, it is important to understand that. - -Usually, you could use [`glob`](http://npmjs.org/package/glob) with `option.mark = true` to fetch the structure of the current directory: - -```js -import glob from 'glob' - -glob('**', { - // Adds a / character to directory matches. - mark: true -}, (err, files) => { - if (err) { - return console.error(err) - } - - let filtered = ignore().add(patterns).filter(files) - console.log(filtered) -}) -``` - -## .ignores(pathname: Pathname): boolean - -> new in 3.2.0 - -Returns `Boolean` whether `pathname` should be ignored. - -```js -ig.ignores('.abc/a.js') // true -``` - -## .createFilter() - -Creates a filter function which could filter an array of paths with `Array.prototype.filter`. - -Returns `function(path)` the filter function. - -## .test(pathname: Pathname) since 5.0.0 - -Returns `TestResult` - -```ts -interface TestResult { - ignored: boolean - // true if the `pathname` is finally unignored by some negative pattern - unignored: boolean -} -``` - -- `{ignored: true, unignored: false}`: the `pathname` is ignored -- `{ignored: false, unignored: true}`: the `pathname` is unignored -- `{ignored: false, unignored: false}`: the `pathname` is never matched by any ignore rules. - -## `options.ignorecase` since 4.0.0 - -Similar as the `core.ignorecase` option of [git-config](https://git-scm.com/docs/git-config), `node-ignore` will be case insensitive if `options.ignorecase` is set to `true` (the default value), otherwise case sensitive. - -```js -const ig = ignore({ - ignorecase: false -}) - -ig.add('*.png') - -ig.ignores('*.PNG') // false -``` - -## static `ignore.isPathValid(pathname): boolean` since 5.0.0 - -Check whether the `pathname` is an valid `path.relative()`d path according to the [convention](#1-pathname-should-be-a-pathrelatived-pathname). - -This method is **NOT** used to check if an ignore pattern is valid. - -```js -ignore.isPathValid('./foo') // false -``` - -**** - -# Upgrade Guide - -## Upgrade 4.x -> 5.x - -Since `5.0.0`, if an invalid `Pathname` passed into `ig.ignores()`, an error will be thrown, while `ignore < 5.0.0` did not make sure what the return value was, as well as - -```ts -.ignores(pathname: Pathname): boolean - -.filter(pathnames: Array<Pathname>): Array<Pathname> - -.createFilter(): (pathname: Pathname) => boolean - -.test(pathname: Pathname): {ignored: boolean, unignored: boolean} -``` - -See the convention [here](#1-pathname-should-be-a-pathrelatived-pathname) for details. - -If there are invalid pathnames, the conversion and filtration should be done by users. - -```js -import {isPathValid} from 'ignore' // introduced in 5.0.0 - -const paths = [ - // invalid - ////////////////// - '', - false, - '../foo', - '.', - ////////////////// - - // valid - 'foo' -] -.filter(isValidPath) - -ig.filter(paths) -``` - -## Upgrade 3.x -> 4.x - -Since `4.0.0`, `ignore` will no longer support node < 6, to use `ignore` in node < 6: - -```js -var ignore = require('ignore/legacy') -``` - -## Upgrade 2.x -> 3.x - -- All `options` of 2.x are unnecessary and removed, so just remove them. -- `ignore()` instance is no longer an [`EventEmitter`](nodejs.org/api/events.html), and all events are unnecessary and removed. -- `.addIgnoreFile()` is removed, see the [.addIgnoreFile](#addignorefilepath) section for details. - -**** - -# Collaborators - -- [@whitecolor](https://github.com/whitecolor) *Alex* -- [@SamyPesse](https://github.com/SamyPesse) *Samy Pessé* -- [@azproduction](https://github.com/azproduction) *Mikhail Davydov* -- [@TrySound](https://github.com/TrySound) *Bogdan Chadkin* -- [@JanMattner](https://github.com/JanMattner) *Jan Mattner* -- [@ntwb](https://github.com/ntwb) *Stephen Edgar* -- [@kasperisager](https://github.com/kasperisager) *Kasper Isager* -- [@sandersn](https://github.com/sandersn) *Nathan Shively-Sanders* diff --git a/node_modules/ignore/index.d.ts b/node_modules/ignore/index.d.ts deleted file mode 100644 index 66657af5..00000000 --- a/node_modules/ignore/index.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -type Pathname = string - -interface TestResult { - ignored: boolean - unignored: boolean -} - -export interface Ignore { - /** - * Adds a rule rules to the current manager. - * @param {string | Ignore} pattern - * @returns IgnoreBase - */ - add(pattern: string | Ignore): this - /** - * Adds several rules to the current manager. - * @param {string[]} patterns - * @returns IgnoreBase - */ - add(patterns: (string | Ignore)[]): this - - /** - * Filters the given array of pathnames, and returns the filtered array. - * NOTICE that each path here should be a relative path to the root of your repository. - * @param paths the array of paths to be filtered. - * @returns The filtered array of paths - */ - filter(pathnames: Pathname[]): Pathname[] - /** - * Creates a filter function which could filter - * an array of paths with Array.prototype.filter. - */ - createFilter(): (pathname: Pathname) => boolean - - /** - * Returns Boolean whether pathname should be ignored. - * @param {string} pathname a path to check - * @returns boolean - */ - ignores(pathname: Pathname): boolean - - /** - * Returns whether pathname should be ignored or unignored - * @param {string} pathname a path to check - * @returns TestResult - */ - test(pathname: Pathname): TestResult -} - -interface Options { - ignorecase?: boolean -} - -/** - * Creates new ignore manager. - */ -declare function ignore(options?: Options): Ignore - -declare namespace ignore { - export function isPathValid (pathname: string): boolean -} - -export default ignore diff --git a/node_modules/ignore/index.js b/node_modules/ignore/index.js deleted file mode 100644 index 9dcee20d..00000000 --- a/node_modules/ignore/index.js +++ /dev/null @@ -1,597 +0,0 @@ -// A simple implementation of make-array -function makeArray (subject) { - return Array.isArray(subject) - ? subject - : [subject] -} - -const EMPTY = '' -const SPACE = ' ' -const ESCAPE = '\\' -const REGEX_TEST_BLANK_LINE = /^\s+$/ -const REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/ -const REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/ -const REGEX_SPLITALL_CRLF = /\r?\n/g -// /foo, -// ./foo, -// ../foo, -// . -// .. -const REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/ - -const SLASH = '/' -const KEY_IGNORE = typeof Symbol !== 'undefined' - ? Symbol.for('node-ignore') - /* istanbul ignore next */ - : 'node-ignore' - -const define = (object, key, value) => - Object.defineProperty(object, key, {value}) - -const REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g - -// Sanitize the range of a regular expression -// The cases are complicated, see test cases for details -const sanitizeRange = range => range.replace( - REGEX_REGEXP_RANGE, - (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) - ? match - // Invalid range (out of order) which is ok for gitignore rules but - // fatal for JavaScript regular expression, so eliminate it. - : EMPTY -) - -// See fixtures #59 -const cleanRangeBackSlash = slashes => { - const {length} = slashes - return slashes.slice(0, length - length % 2) -} - -// > If the pattern ends with a slash, -// > it is removed for the purpose of the following description, -// > but it would only find a match with a directory. -// > In other words, foo/ will match a directory foo and paths underneath it, -// > but will not match a regular file or a symbolic link foo -// > (this is consistent with the way how pathspec works in general in Git). -// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`' -// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call -// you could use option `mark: true` with `glob` - -// '`foo/`' should not continue with the '`..`' -const REPLACERS = [ - - // > Trailing spaces are ignored unless they are quoted with backslash ("\") - [ - // (a\ ) -> (a ) - // (a ) -> (a) - // (a \ ) -> (a ) - /\\?\s+$/, - match => match.indexOf('\\') === 0 - ? SPACE - : EMPTY - ], - - // replace (\ ) with ' ' - [ - /\\\s/g, - () => SPACE - ], - - // Escape metacharacters - // which is written down by users but means special for regular expressions. - - // > There are 12 characters with special meanings: - // > - the backslash \, - // > - the caret ^, - // > - the dollar sign $, - // > - the period or dot ., - // > - the vertical bar or pipe symbol |, - // > - the question mark ?, - // > - the asterisk or star *, - // > - the plus sign +, - // > - the opening parenthesis (, - // > - the closing parenthesis ), - // > - and the opening square bracket [, - // > - the opening curly brace {, - // > These special characters are often called "metacharacters". - [ - /[\\$.|*+(){^]/g, - match => `\\${match}` - ], - - [ - // > a question mark (?) matches a single character - /(?!\\)\?/g, - () => '[^/]' - ], - - // leading slash - [ - - // > A leading slash matches the beginning of the pathname. - // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". - // A leading slash matches the beginning of the pathname - /^\//, - () => '^' - ], - - // replace special metacharacter slash after the leading slash - [ - /\//g, - () => '\\/' - ], - - [ - // > A leading "**" followed by a slash means match in all directories. - // > For example, "**/foo" matches file or directory "foo" anywhere, - // > the same as pattern "foo". - // > "**/foo/bar" matches file or directory "bar" anywhere that is directly - // > under directory "foo". - // Notice that the '*'s have been replaced as '\\*' - /^\^*\\\*\\\*\\\//, - - // '**/foo' <-> 'foo' - () => '^(?:.*\\/)?' - ], - - // starting - [ - // there will be no leading '/' - // (which has been replaced by section "leading slash") - // If starts with '**', adding a '^' to the regular expression also works - /^(?=[^^])/, - function startingReplacer () { - // If has a slash `/` at the beginning or middle - return !/\/(?!$)/.test(this) - // > Prior to 2.22.1 - // > If the pattern does not contain a slash /, - // > Git treats it as a shell glob pattern - // Actually, if there is only a trailing slash, - // git also treats it as a shell glob pattern - - // After 2.22.1 (compatible but clearer) - // > If there is a separator at the beginning or middle (or both) - // > of the pattern, then the pattern is relative to the directory - // > level of the particular .gitignore file itself. - // > Otherwise the pattern may also match at any level below - // > the .gitignore level. - ? '(?:^|\\/)' - - // > Otherwise, Git treats the pattern as a shell glob suitable for - // > consumption by fnmatch(3) - : '^' - } - ], - - // two globstars - [ - // Use lookahead assertions so that we could match more than one `'/**'` - /\\\/\\\*\\\*(?=\\\/|$)/g, - - // Zero, one or several directories - // should not use '*', or it will be replaced by the next replacer - - // Check if it is not the last `'/**'` - (_, index, str) => index + 6 < str.length - - // case: /**/ - // > A slash followed by two consecutive asterisks then a slash matches - // > zero or more directories. - // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on. - // '/**/' - ? '(?:\\/[^\\/]+)*' - - // case: /** - // > A trailing `"/**"` matches everything inside. - - // #21: everything inside but it should not include the current folder - : '\\/.+' - ], - - // intermediate wildcards - [ - // Never replace escaped '*' - // ignore rule '\*' will match the path '*' - - // 'abc.*/' -> go - // 'abc.*' -> skip this rule - /(^|[^\\]+)\\\*(?=.+)/g, - - // '*.js' matches '.js' - // '*.js' doesn't match 'abc' - (_, p1) => `${p1}[^\\/]*` - ], - - [ - // unescape, revert step 3 except for back slash - // For example, if a user escape a '\\*', - // after step 3, the result will be '\\\\\\*' - /\\\\\\(?=[$.|*+(){^])/g, - () => ESCAPE - ], - - [ - // '\\\\' -> '\\' - /\\\\/g, - () => ESCAPE - ], - - [ - // > The range notation, e.g. [a-zA-Z], - // > can be used to match one of the characters in a range. - - // `\` is escaped by step 3 - /(\\)?\[([^\]/]*?)(\\*)($|\])/g, - (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE - // '\\[bar]' -> '\\\\[bar\\]' - ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` - : close === ']' - ? endEscape.length % 2 === 0 - // A normal case, and it is a range notation - // '[bar]' - // '[bar\\\\]' - ? `[${sanitizeRange(range)}${endEscape}]` - // Invalid range notaton - // '[bar\\]' -> '[bar\\\\]' - : '[]' - : '[]' - ], - - // ending - [ - // 'js' will not match 'js.' - // 'ab' will not match 'abc' - /(?:[^*])$/, - - // WTF! - // https://git-scm.com/docs/gitignore - // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) - // which re-fixes #24, #38 - - // > If there is a separator at the end of the pattern then the pattern - // > will only match directories, otherwise the pattern can match both - // > files and directories. - - // 'js*' will not match 'a.js' - // 'js/' will not match 'a.js' - // 'js' will match 'a.js' and 'a.js/' - match => /\/$/.test(match) - // foo/ will not match 'foo' - ? `${match}$` - // foo matches 'foo' and 'foo/' - : `${match}(?=$|\\/$)` - ], - - // trailing wildcard - [ - /(\^|\\\/)?\\\*$/, - (_, p1) => { - const prefix = p1 - // '\^': - // '/*' does not match EMPTY - // '/*' does not match everything - - // '\\\/': - // 'abc/*' does not match 'abc/' - ? `${p1}[^/]+` - - // 'a*' matches 'a' - // 'a*' matches 'aa' - : '[^/]*' - - return `${prefix}(?=$|\\/$)` - } - ], -] - -// A simple cache, because an ignore rule only has only one certain meaning -const regexCache = Object.create(null) - -// @param {pattern} -const makeRegex = (pattern, negative, ignorecase) => { - const r = regexCache[pattern] - if (r) { - return r - } - - // const replacers = negative - // ? NEGATIVE_REPLACERS - // : POSITIVE_REPLACERS - - const source = REPLACERS.reduce( - (prev, current) => prev.replace(current[0], current[1].bind(pattern)), - pattern - ) - - return regexCache[pattern] = ignorecase - ? new RegExp(source, 'i') - : new RegExp(source) -} - -const isString = subject => typeof subject === 'string' - -// > A blank line matches no files, so it can serve as a separator for readability. -const checkPattern = pattern => pattern - && isString(pattern) - && !REGEX_TEST_BLANK_LINE.test(pattern) - - // > A line starting with # serves as a comment. - && pattern.indexOf('#') !== 0 - -const splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF) - -class IgnoreRule { - constructor ( - origin, - pattern, - negative, - regex - ) { - this.origin = origin - this.pattern = pattern - this.negative = negative - this.regex = regex - } -} - -const createRule = (pattern, ignorecase) => { - const origin = pattern - let negative = false - - // > An optional prefix "!" which negates the pattern; - if (pattern.indexOf('!') === 0) { - negative = true - pattern = pattern.substr(1) - } - - pattern = pattern - // > Put a backslash ("\") in front of the first "!" for patterns that - // > begin with a literal "!", for example, `"\!important!.txt"`. - .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!') - // > Put a backslash ("\") in front of the first hash for patterns that - // > begin with a hash. - .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#') - - const regex = makeRegex(pattern, negative, ignorecase) - - return new IgnoreRule( - origin, - pattern, - negative, - regex - ) -} - -const throwError = (message, Ctor) => { - throw new Ctor(message) -} - -const checkPath = (path, originalPath, doThrow) => { - if (!isString(path)) { - return doThrow( - `path must be a string, but got \`${originalPath}\``, - TypeError - ) - } - - // We don't know if we should ignore EMPTY, so throw - if (!path) { - return doThrow(`path must not be empty`, TypeError) - } - - // Check if it is a relative path - if (checkPath.isNotRelative(path)) { - const r = '`path.relative()`d' - return doThrow( - `path should be a ${r} string, but got "${originalPath}"`, - RangeError - ) - } - - return true -} - -const isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path) - -checkPath.isNotRelative = isNotRelative -checkPath.convert = p => p - -class Ignore { - constructor ({ - ignorecase = true - } = {}) { - this._rules = [] - this._ignorecase = ignorecase - define(this, KEY_IGNORE, true) - this._initCache() - } - - _initCache () { - this._ignoreCache = Object.create(null) - this._testCache = Object.create(null) - } - - _addPattern (pattern) { - // #32 - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules) - this._added = true - return - } - - if (checkPattern(pattern)) { - const rule = createRule(pattern, this._ignorecase) - this._added = true - this._rules.push(rule) - } - } - - // @param {Array<string> | string | Ignore} pattern - add (pattern) { - this._added = false - - makeArray( - isString(pattern) - ? splitPattern(pattern) - : pattern - ).forEach(this._addPattern, this) - - // Some rules have just added to the ignore, - // making the behavior changed. - if (this._added) { - this._initCache() - } - - return this - } - - // legacy - addPattern (pattern) { - return this.add(pattern) - } - - // | ignored : unignored - // negative | 0:0 | 0:1 | 1:0 | 1:1 - // -------- | ------- | ------- | ------- | -------- - // 0 | TEST | TEST | SKIP | X - // 1 | TESTIF | SKIP | TEST | X - - // - SKIP: always skip - // - TEST: always test - // - TESTIF: only test if checkUnignored - // - X: that never happen - - // @param {boolean} whether should check if the path is unignored, - // setting `checkUnignored` to `false` could reduce additional - // path matching. - - // @returns {TestResult} true if a file is ignored - _testOne (path, checkUnignored) { - let ignored = false - let unignored = false - - this._rules.forEach(rule => { - const {negative} = rule - if ( - unignored === negative && ignored !== unignored - || negative && !ignored && !unignored && !checkUnignored - ) { - return - } - - const matched = rule.regex.test(path) - - if (matched) { - ignored = !negative - unignored = negative - } - }) - - return { - ignored, - unignored - } - } - - // @returns {TestResult} - _test (originalPath, cache, checkUnignored, slices) { - const path = originalPath - // Supports nullable path - && checkPath.convert(originalPath) - - checkPath(path, originalPath, throwError) - - return this._t(path, cache, checkUnignored, slices) - } - - _t (path, cache, checkUnignored, slices) { - if (path in cache) { - return cache[path] - } - - if (!slices) { - // path/to/a.js - // ['path', 'to', 'a.js'] - slices = path.split(SLASH) - } - - slices.pop() - - // If the path has no parent directory, just test it - if (!slices.length) { - return cache[path] = this._testOne(path, checkUnignored) - } - - const parent = this._t( - slices.join(SLASH) + SLASH, - cache, - checkUnignored, - slices - ) - - // If the path contains a parent directory, check the parent first - return cache[path] = parent.ignored - // > It is not possible to re-include a file if a parent directory of - // > that file is excluded. - ? parent - : this._testOne(path, checkUnignored) - } - - ignores (path) { - return this._test(path, this._ignoreCache, false).ignored - } - - createFilter () { - return path => !this.ignores(path) - } - - filter (paths) { - return makeArray(paths).filter(this.createFilter()) - } - - // @returns {TestResult} - test (path) { - return this._test(path, this._testCache, true) - } -} - -const factory = options => new Ignore(options) - -const returnFalse = () => false - -const isPathValid = path => - checkPath(path && checkPath.convert(path), path, returnFalse) - -factory.isPathValid = isPathValid - -// Fixes typescript -factory.default = factory - -module.exports = factory - -// Windows -// -------------------------------------------------------------- -/* istanbul ignore if */ -if ( - // Detect `process` so that it can run in browsers. - typeof process !== 'undefined' - && ( - process.env && process.env.IGNORE_TEST_WIN32 - || process.platform === 'win32' - ) -) { - /* eslint no-control-regex: "off" */ - const makePosix = str => /^\\\\\?\\/.test(str) - || /["<>|\u0000-\u001F]+/u.test(str) - ? str - : str.replace(/\\/g, '/') - - checkPath.convert = makePosix - - // 'C:\\foo' <- 'C:\\foo' has been converted to 'C:/' - // 'd:\\foo' - const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i - checkPath.isNotRelative = path => - REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) - || isNotRelative(path) -} diff --git a/node_modules/ignore/legacy.js b/node_modules/ignore/legacy.js deleted file mode 100644 index 176bf62d..00000000 --- a/node_modules/ignore/legacy.js +++ /dev/null @@ -1,495 +0,0 @@ -"use strict"; - -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); } } - -function _createClass(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"); } } - -// A simple implementation of make-array -function makeArray(subject) { - return Array.isArray(subject) ? subject : [subject]; -} - -var EMPTY = ''; -var SPACE = ' '; -var ESCAPE = '\\'; -var REGEX_TEST_BLANK_LINE = /^\s+$/; -var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; -var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; -var REGEX_SPLITALL_CRLF = /\r?\n/g; // /foo, -// ./foo, -// ../foo, -// . -// .. - -var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; -var SLASH = '/'; -var KEY_IGNORE = typeof Symbol !== 'undefined' ? Symbol["for"]('node-ignore') -/* istanbul ignore next */ -: 'node-ignore'; - -var define = function define(object, key, value) { - return Object.defineProperty(object, key, { - value: value - }); -}; - -var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; // Sanitize the range of a regular expression -// The cases are complicated, see test cases for details - -var sanitizeRange = function sanitizeRange(range) { - return range.replace(REGEX_REGEXP_RANGE, function (match, from, to) { - return from.charCodeAt(0) <= to.charCodeAt(0) ? match // Invalid range (out of order) which is ok for gitignore rules but - // fatal for JavaScript regular expression, so eliminate it. - : EMPTY; - }); -}; // See fixtures #59 - - -var cleanRangeBackSlash = function cleanRangeBackSlash(slashes) { - var length = slashes.length; - return slashes.slice(0, length - length % 2); -}; // > If the pattern ends with a slash, -// > it is removed for the purpose of the following description, -// > but it would only find a match with a directory. -// > In other words, foo/ will match a directory foo and paths underneath it, -// > but will not match a regular file or a symbolic link foo -// > (this is consistent with the way how pathspec works in general in Git). -// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`' -// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call -// you could use option `mark: true` with `glob` -// '`foo/`' should not continue with the '`..`' - - -var REPLACERS = [// > Trailing spaces are ignored unless they are quoted with backslash ("\") -[// (a\ ) -> (a ) -// (a ) -> (a) -// (a \ ) -> (a ) -/\\?\s+$/, function (match) { - return match.indexOf('\\') === 0 ? SPACE : EMPTY; -}], // replace (\ ) with ' ' -[/\\\s/g, function () { - return SPACE; -}], // Escape metacharacters -// which is written down by users but means special for regular expressions. -// > There are 12 characters with special meanings: -// > - the backslash \, -// > - the caret ^, -// > - the dollar sign $, -// > - the period or dot ., -// > - the vertical bar or pipe symbol |, -// > - the question mark ?, -// > - the asterisk or star *, -// > - the plus sign +, -// > - the opening parenthesis (, -// > - the closing parenthesis ), -// > - and the opening square bracket [, -// > - the opening curly brace {, -// > These special characters are often called "metacharacters". -[/[\\$.|*+(){^]/g, function (match) { - return "\\".concat(match); -}], [// > a question mark (?) matches a single character -/(?!\\)\?/g, function () { - return '[^/]'; -}], // leading slash -[// > A leading slash matches the beginning of the pathname. -// > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". -// A leading slash matches the beginning of the pathname -/^\//, function () { - return '^'; -}], // replace special metacharacter slash after the leading slash -[/\//g, function () { - return '\\/'; -}], [// > A leading "**" followed by a slash means match in all directories. -// > For example, "**/foo" matches file or directory "foo" anywhere, -// > the same as pattern "foo". -// > "**/foo/bar" matches file or directory "bar" anywhere that is directly -// > under directory "foo". -// Notice that the '*'s have been replaced as '\\*' -/^\^*\\\*\\\*\\\//, // '**/foo' <-> 'foo' -function () { - return '^(?:.*\\/)?'; -}], // starting -[// there will be no leading '/' -// (which has been replaced by section "leading slash") -// If starts with '**', adding a '^' to the regular expression also works -/^(?=[^^])/, function startingReplacer() { - // If has a slash `/` at the beginning or middle - return !/\/(?!$)/.test(this) // > Prior to 2.22.1 - // > If the pattern does not contain a slash /, - // > Git treats it as a shell glob pattern - // Actually, if there is only a trailing slash, - // git also treats it as a shell glob pattern - // After 2.22.1 (compatible but clearer) - // > If there is a separator at the beginning or middle (or both) - // > of the pattern, then the pattern is relative to the directory - // > level of the particular .gitignore file itself. - // > Otherwise the pattern may also match at any level below - // > the .gitignore level. - ? '(?:^|\\/)' // > Otherwise, Git treats the pattern as a shell glob suitable for - // > consumption by fnmatch(3) - : '^'; -}], // two globstars -[// Use lookahead assertions so that we could match more than one `'/**'` -/\\\/\\\*\\\*(?=\\\/|$)/g, // Zero, one or several directories -// should not use '*', or it will be replaced by the next replacer -// Check if it is not the last `'/**'` -function (_, index, str) { - return index + 6 < str.length // case: /**/ - // > A slash followed by two consecutive asterisks then a slash matches - // > zero or more directories. - // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on. - // '/**/' - ? '(?:\\/[^\\/]+)*' // case: /** - // > A trailing `"/**"` matches everything inside. - // #21: everything inside but it should not include the current folder - : '\\/.+'; -}], // intermediate wildcards -[// Never replace escaped '*' -// ignore rule '\*' will match the path '*' -// 'abc.*/' -> go -// 'abc.*' -> skip this rule -/(^|[^\\]+)\\\*(?=.+)/g, // '*.js' matches '.js' -// '*.js' doesn't match 'abc' -function (_, p1) { - return "".concat(p1, "[^\\/]*"); -}], [// unescape, revert step 3 except for back slash -// For example, if a user escape a '\\*', -// after step 3, the result will be '\\\\\\*' -/\\\\\\(?=[$.|*+(){^])/g, function () { - return ESCAPE; -}], [// '\\\\' -> '\\' -/\\\\/g, function () { - return ESCAPE; -}], [// > The range notation, e.g. [a-zA-Z], -// > can be used to match one of the characters in a range. -// `\` is escaped by step 3 -/(\\)?\[([^\]/]*?)(\\*)($|\])/g, function (match, leadEscape, range, endEscape, close) { - return leadEscape === ESCAPE // '\\[bar]' -> '\\\\[bar\\]' - ? "\\[".concat(range).concat(cleanRangeBackSlash(endEscape)).concat(close) : close === ']' ? endEscape.length % 2 === 0 // A normal case, and it is a range notation - // '[bar]' - // '[bar\\\\]' - ? "[".concat(sanitizeRange(range)).concat(endEscape, "]") // Invalid range notaton - // '[bar\\]' -> '[bar\\\\]' - : '[]' : '[]'; -}], // ending -[// 'js' will not match 'js.' -// 'ab' will not match 'abc' -/(?:[^*])$/, // WTF! -// https://git-scm.com/docs/gitignore -// changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) -// which re-fixes #24, #38 -// > If there is a separator at the end of the pattern then the pattern -// > will only match directories, otherwise the pattern can match both -// > files and directories. -// 'js*' will not match 'a.js' -// 'js/' will not match 'a.js' -// 'js' will match 'a.js' and 'a.js/' -function (match) { - return /\/$/.test(match) // foo/ will not match 'foo' - ? "".concat(match, "$") // foo matches 'foo' and 'foo/' - : "".concat(match, "(?=$|\\/$)"); -}], // trailing wildcard -[/(\^|\\\/)?\\\*$/, function (_, p1) { - var prefix = p1 // '\^': - // '/*' does not match EMPTY - // '/*' does not match everything - // '\\\/': - // 'abc/*' does not match 'abc/' - ? "".concat(p1, "[^/]+") // 'a*' matches 'a' - // 'a*' matches 'aa' - : '[^/]*'; - return "".concat(prefix, "(?=$|\\/$)"); -}]]; // A simple cache, because an ignore rule only has only one certain meaning - -var regexCache = Object.create(null); // @param {pattern} - -var makeRegex = function makeRegex(pattern, negative, ignorecase) { - var r = regexCache[pattern]; - - if (r) { - return r; - } // const replacers = negative - // ? NEGATIVE_REPLACERS - // : POSITIVE_REPLACERS - - - var source = REPLACERS.reduce(function (prev, current) { - return prev.replace(current[0], current[1].bind(pattern)); - }, pattern); - return regexCache[pattern] = ignorecase ? new RegExp(source, 'i') : new RegExp(source); -}; - -var isString = function isString(subject) { - return typeof subject === 'string'; -}; // > A blank line matches no files, so it can serve as a separator for readability. - - -var checkPattern = function checkPattern(pattern) { - return pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) // > A line starting with # serves as a comment. - && pattern.indexOf('#') !== 0; -}; - -var splitPattern = function splitPattern(pattern) { - return pattern.split(REGEX_SPLITALL_CRLF); -}; - -var IgnoreRule = function IgnoreRule(origin, pattern, negative, regex) { - _classCallCheck(this, IgnoreRule); - - this.origin = origin; - this.pattern = pattern; - this.negative = negative; - this.regex = regex; -}; - -var createRule = function createRule(pattern, ignorecase) { - var origin = pattern; - var negative = false; // > An optional prefix "!" which negates the pattern; - - if (pattern.indexOf('!') === 0) { - negative = true; - pattern = pattern.substr(1); - } - - pattern = pattern // > Put a backslash ("\") in front of the first "!" for patterns that - // > begin with a literal "!", for example, `"\!important!.txt"`. - .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!') // > Put a backslash ("\") in front of the first hash for patterns that - // > begin with a hash. - .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#'); - var regex = makeRegex(pattern, negative, ignorecase); - return new IgnoreRule(origin, pattern, negative, regex); -}; - -var throwError = function throwError(message, Ctor) { - throw new Ctor(message); -}; - -var checkPath = function checkPath(path, originalPath, doThrow) { - if (!isString(path)) { - return doThrow("path must be a string, but got `".concat(originalPath, "`"), TypeError); - } // We don't know if we should ignore EMPTY, so throw - - - if (!path) { - return doThrow("path must not be empty", TypeError); - } // Check if it is a relative path - - - if (checkPath.isNotRelative(path)) { - var r = '`path.relative()`d'; - return doThrow("path should be a ".concat(r, " string, but got \"").concat(originalPath, "\""), RangeError); - } - - return true; -}; - -var isNotRelative = function isNotRelative(path) { - return REGEX_TEST_INVALID_PATH.test(path); -}; - -checkPath.isNotRelative = isNotRelative; - -checkPath.convert = function (p) { - return p; -}; - -var Ignore = /*#__PURE__*/function () { - function Ignore() { - var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - _ref$ignorecase = _ref.ignorecase, - ignorecase = _ref$ignorecase === void 0 ? true : _ref$ignorecase; - - _classCallCheck(this, Ignore); - - this._rules = []; - this._ignorecase = ignorecase; - define(this, KEY_IGNORE, true); - - this._initCache(); - } - - _createClass(Ignore, [{ - key: "_initCache", - value: function _initCache() { - this._ignoreCache = Object.create(null); - this._testCache = Object.create(null); - } - }, { - key: "_addPattern", - value: function _addPattern(pattern) { - // #32 - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules); - this._added = true; - return; - } - - if (checkPattern(pattern)) { - var rule = createRule(pattern, this._ignorecase); - this._added = true; - - this._rules.push(rule); - } - } // @param {Array<string> | string | Ignore} pattern - - }, { - key: "add", - value: function add(pattern) { - this._added = false; - makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._addPattern, this); // Some rules have just added to the ignore, - // making the behavior changed. - - if (this._added) { - this._initCache(); - } - - return this; - } // legacy - - }, { - key: "addPattern", - value: function addPattern(pattern) { - return this.add(pattern); - } // | ignored : unignored - // negative | 0:0 | 0:1 | 1:0 | 1:1 - // -------- | ------- | ------- | ------- | -------- - // 0 | TEST | TEST | SKIP | X - // 1 | TESTIF | SKIP | TEST | X - // - SKIP: always skip - // - TEST: always test - // - TESTIF: only test if checkUnignored - // - X: that never happen - // @param {boolean} whether should check if the path is unignored, - // setting `checkUnignored` to `false` could reduce additional - // path matching. - // @returns {TestResult} true if a file is ignored - - }, { - key: "_testOne", - value: function _testOne(path, checkUnignored) { - var ignored = false; - var unignored = false; - - this._rules.forEach(function (rule) { - var negative = rule.negative; - - if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { - return; - } - - var matched = rule.regex.test(path); - - if (matched) { - ignored = !negative; - unignored = negative; - } - }); - - return { - ignored: ignored, - unignored: unignored - }; - } // @returns {TestResult} - - }, { - key: "_test", - value: function _test(originalPath, cache, checkUnignored, slices) { - var path = originalPath // Supports nullable path - && checkPath.convert(originalPath); - checkPath(path, originalPath, throwError); - return this._t(path, cache, checkUnignored, slices); - } - }, { - key: "_t", - value: function _t(path, cache, checkUnignored, slices) { - if (path in cache) { - return cache[path]; - } - - if (!slices) { - // path/to/a.js - // ['path', 'to', 'a.js'] - slices = path.split(SLASH); - } - - slices.pop(); // If the path has no parent directory, just test it - - if (!slices.length) { - return cache[path] = this._testOne(path, checkUnignored); - } - - var parent = this._t(slices.join(SLASH) + SLASH, cache, checkUnignored, slices); // If the path contains a parent directory, check the parent first - - - return cache[path] = parent.ignored // > It is not possible to re-include a file if a parent directory of - // > that file is excluded. - ? parent : this._testOne(path, checkUnignored); - } - }, { - key: "ignores", - value: function ignores(path) { - return this._test(path, this._ignoreCache, false).ignored; - } - }, { - key: "createFilter", - value: function createFilter() { - var _this = this; - - return function (path) { - return !_this.ignores(path); - }; - } - }, { - key: "filter", - value: function filter(paths) { - return makeArray(paths).filter(this.createFilter()); - } // @returns {TestResult} - - }, { - key: "test", - value: function test(path) { - return this._test(path, this._testCache, true); - } - }]); - - return Ignore; -}(); - -var factory = function factory(options) { - return new Ignore(options); -}; - -var returnFalse = function returnFalse() { - return false; -}; - -var isPathValid = function isPathValid(path) { - return checkPath(path && checkPath.convert(path), path, returnFalse); -}; - -factory.isPathValid = isPathValid; // Fixes typescript - -factory["default"] = factory; -module.exports = factory; // Windows -// -------------------------------------------------------------- - -/* istanbul ignore if */ - -if ( // Detect `process` so that it can run in browsers. -typeof process !== 'undefined' && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === 'win32')) { - /* eslint no-control-regex: "off" */ - var makePosix = function makePosix(str) { - return /^\\\\\?\\/.test(str) || /[\0-\x1F"<>\|]+/.test(str) ? str : str.replace(/\\/g, '/'); - }; - - checkPath.convert = makePosix; // 'C:\\foo' <- 'C:\\foo' has been converted to 'C:/' - // 'd:\\foo' - - var REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; - - checkPath.isNotRelative = function (path) { - return REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) || isNotRelative(path); - }; -} diff --git a/node_modules/ignore/package.json b/node_modules/ignore/package.json deleted file mode 100644 index ea39ee6d..00000000 --- a/node_modules/ignore/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "_from": "ignore@^5.1.4", - "_id": "ignore@5.1.8", - "_inBundle": false, - "_integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "_location": "/ignore", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "ignore@^5.1.4", - "name": "ignore", - "escapedName": "ignore", - "rawSpec": "^5.1.4", - "saveSpec": null, - "fetchSpec": "^5.1.4" - }, - "_requiredBy": [ - "/isomorphic-git" - ], - "_resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "_shasum": "f150a8b50a34289b33e22f5889abd4d8016f0e57", - "_spec": "ignore@^5.1.4", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/isomorphic-git", - "author": { - "name": "kael" - }, - "bugs": { - "url": "https://github.com/kaelzhang/node-ignore/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Ignore is a manager and filter for .gitignore rules, the one used by eslint, gitbook and many others.", - "devDependencies": { - "@babel/cli": "^7.8.4", - "@babel/core": "^7.9.6", - "@babel/preset-env": "^7.9.6", - "codecov": "^3.7.0", - "debug": "^4.1.1", - "eslint": "^7.0.0", - "eslint-config-ostai": "^3.0.0", - "eslint-plugin-import": "^2.20.2", - "mkdirp": "^1.0.4", - "pre-suf": "^1.1.1", - "rimraf": "^3.0.2", - "spawn-sync": "^2.0.0", - "tap": "^14.10.7", - "tmp": "0.2.1", - "typescript": "^3.9.3" - }, - "engines": { - "node": ">= 4" - }, - "files": [ - "legacy.js", - "index.js", - "index.d.ts", - "LICENSE-MIT" - ], - "homepage": "https://github.com/kaelzhang/node-ignore#readme", - "keywords": [ - "ignore", - ".gitignore", - "gitignore", - "npmignore", - "rules", - "manager", - "filter", - "regexp", - "regex", - "fnmatch", - "glob", - "asterisks", - "regular-expression" - ], - "license": "MIT", - "name": "ignore", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/kaelzhang/node-ignore.git" - }, - "scripts": { - "build": "babel -o legacy.js index.js", - "posttest": "tap --coverage-report=html && codecov", - "prepublishOnly": "npm run build", - "test": "npm run test:only", - "test:cases": "tap test/*.js --coverage", - "test:git": "tap test/git-check-ignore.js", - "test:ignore": "tap test/ignore.js", - "test:lint": "eslint .", - "test:only": "npm run test:lint && npm run test:tsc && npm run test:ts && npm run test:cases", - "test:others": "tap test/others.js", - "test:ts": "node ./test/ts/simple.js", - "test:tsc": "tsc ./test/ts/simple.ts --lib ES6", - "test:win32": "IGNORE_TEST_WIN32=1 npm run test" - }, - "version": "5.1.8" -} diff --git a/node_modules/inflight/LICENSE b/node_modules/inflight/LICENSE deleted file mode 100644 index 05eeeb88..00000000 --- a/node_modules/inflight/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/inflight/README.md b/node_modules/inflight/README.md deleted file mode 100644 index 6dc89291..00000000 --- a/node_modules/inflight/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# inflight - -Add callbacks to requests in flight to avoid async duplication - -## USAGE - -```javascript -var inflight = require('inflight') - -// some request that does some stuff -function req(key, callback) { - // key is any random string. like a url or filename or whatever. - // - // will return either a falsey value, indicating that the - // request for this key is already in flight, or a new callback - // which when called will call all callbacks passed to inflightk - // with the same key - callback = inflight(key, callback) - - // If we got a falsey value back, then there's already a req going - if (!callback) return - - // this is where you'd fetch the url or whatever - // callback is also once()-ified, so it can safely be assigned - // to multiple events etc. First call wins. - setTimeout(function() { - callback(null, key) - }, 100) -} - -// only assigns a single setTimeout -// when it dings, all cbs get called -req('foo', cb1) -req('foo', cb2) -req('foo', cb3) -req('foo', cb4) -``` diff --git a/node_modules/inflight/inflight.js b/node_modules/inflight/inflight.js deleted file mode 100644 index 48202b3c..00000000 --- a/node_modules/inflight/inflight.js +++ /dev/null @@ -1,54 +0,0 @@ -var wrappy = require('wrappy') -var reqs = Object.create(null) -var once = require('once') - -module.exports = wrappy(inflight) - -function inflight (key, cb) { - if (reqs[key]) { - reqs[key].push(cb) - return null - } else { - reqs[key] = [cb] - return makeres(key) - } -} - -function makeres (key) { - return once(function RES () { - var cbs = reqs[key] - var len = cbs.length - var args = slice(arguments) - - // XXX It's somewhat ambiguous whether a new callback added in this - // pass should be queued for later execution if something in the - // list of callbacks throws, or if it should just be discarded. - // However, it's such an edge case that it hardly matters, and either - // choice is likely as surprising as the other. - // As it happens, we do go ahead and schedule it for later execution. - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args) - } - } finally { - if (cbs.length > len) { - // added more in the interim. - // de-zalgo, just in case, but don't call again. - cbs.splice(0, len) - process.nextTick(function () { - RES.apply(null, args) - }) - } else { - delete reqs[key] - } - } - }) -} - -function slice (args) { - var length = args.length - var array = [] - - for (var i = 0; i < length; i++) array[i] = args[i] - return array -} diff --git a/node_modules/inflight/package.json b/node_modules/inflight/package.json deleted file mode 100644 index 82288998..00000000 --- a/node_modules/inflight/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "_from": "inflight@^1.0.4", - "_id": "inflight@1.0.6", - "_inBundle": false, - "_integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "_location": "/inflight", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "inflight@^1.0.4", - "name": "inflight", - "escapedName": "inflight", - "rawSpec": "^1.0.4", - "saveSpec": null, - "fetchSpec": "^1.0.4" - }, - "_requiredBy": [ - "/glob" - ], - "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "_shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9", - "_spec": "inflight@^1.0.4", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/glob", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/inflight/issues" - }, - "bundleDependencies": false, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - }, - "deprecated": false, - "description": "Add callbacks to requests in flight to avoid async duplication", - "devDependencies": { - "tap": "^7.1.2" - }, - "files": [ - "inflight.js" - ], - "homepage": "https://github.com/isaacs/inflight", - "license": "ISC", - "main": "inflight.js", - "name": "inflight", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/inflight.git" - }, - "scripts": { - "test": "tap test.js --100" - }, - "version": "1.0.6" -} diff --git a/node_modules/inherits/LICENSE b/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013d..00000000 --- a/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/inherits/README.md b/node_modules/inherits/README.md deleted file mode 100644 index b1c56658..00000000 --- a/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/node_modules/inherits/inherits.js b/node_modules/inherits/inherits.js deleted file mode 100644 index f71f2d93..00000000 --- a/node_modules/inherits/inherits.js +++ /dev/null @@ -1,9 +0,0 @@ -try { - var util = require('util'); - /* istanbul ignore next */ - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - /* istanbul ignore next */ - module.exports = require('./inherits_browser.js'); -} diff --git a/node_modules/inherits/inherits_browser.js b/node_modules/inherits/inherits_browser.js deleted file mode 100644 index 86bbb3dc..00000000 --- a/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,27 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }) - } - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } - } -} diff --git a/node_modules/inherits/package.json b/node_modules/inherits/package.json deleted file mode 100644 index f8c4689e..00000000 --- a/node_modules/inherits/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "inherits@^2.0.3", - "_id": "inherits@2.0.4", - "_inBundle": false, - "_integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "_location": "/inherits", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "inherits@^2.0.3", - "name": "inherits", - "escapedName": "inherits", - "rawSpec": "^2.0.3", - "saveSpec": null, - "fetchSpec": "^2.0.3" - }, - "_requiredBy": [ - "/cloneable-readable", - "/cloneable-readable/readable-stream", - "/duplexify", - "/duplexify/readable-stream", - "/flush-write-stream", - "/flush-write-stream/readable-stream", - "/glob", - "/glob-stream/readable-stream", - "/lazystream/readable-stream", - "/ordered-read-streams/readable-stream", - "/pumpify", - "/queue", - "/readable-stream", - "/sha.js", - "/through2/readable-stream", - "/vinyl-fs/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "_shasum": "0fa2c64f932917c3433a0ded55363aae37416b7c", - "_spec": "inherits@^2.0.3", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/readable-stream", - "browser": "./inherits_browser.js", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "devDependencies": { - "tap": "^14.2.4" - }, - "files": [ - "inherits.js", - "inherits_browser.js" - ], - "homepage": "https://github.com/isaacs/inherits#readme", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "license": "ISC", - "main": "./inherits.js", - "name": "inherits", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits.git" - }, - "scripts": { - "test": "tap" - }, - "version": "2.0.4" -} diff --git a/node_modules/is-absolute/LICENSE b/node_modules/is-absolute/LICENSE deleted file mode 100644 index 44cf43b2..00000000 --- a/node_modules/is-absolute/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2017, Jon Schlinkert. -Copyright (c) 2009-2014, TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/is-absolute/README.md b/node_modules/is-absolute/README.md deleted file mode 100644 index edc1ceb7..00000000 --- a/node_modules/is-absolute/README.md +++ /dev/null @@ -1,114 +0,0 @@ -# is-absolute [![NPM version](https://img.shields.io/npm/v/is-absolute.svg?style=flat)](https://www.npmjs.com/package/is-absolute) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-absolute.svg?style=flat)](https://npmjs.org/package/is-absolute) [![NPM total downloads](https://img.shields.io/npm/dt/is-absolute.svg?style=flat)](https://npmjs.org/package/is-absolute) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-absolute.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-absolute) - -> Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-absolute -``` - -Originally based on the `isAbsolute` utility method in [express](https://github.com/visionmedia/express). - -## Usage - -```js -var isAbsolute = require('is-absolute'); - -isAbsolute('a/b/c.js'); -//=> 'false' -isAbsolute('/a/b/c.js'); -//=> 'true' -``` - -**Explicitly test windows paths** - -```js -isAbsolute.posix('/foo/bar'); -isAbsolute.posix('/user/docs/Letter.txt'); -//=> true - -isAbsolute.posix('foo/bar'); -//=> false -``` - -**Explicitly test windows paths** - -```js -var isAbsolute = require('is-absolute'); - -isAbsolute.win32('c:\\'); -isAbsolute.win32('//C://user\\docs\\Letter.txt'); -isAbsolute.win32('\\\\unc\\share'); -isAbsolute.win32('\\\\unc\\share\\foo'); -isAbsolute.win32('\\\\unc\\share\\foo\\'); -isAbsolute.win32('\\\\unc\\share\\foo\\bar'); -isAbsolute.win32('\\\\unc\\share\\foo\\bar\\'); -isAbsolute.win32('\\\\unc\\share\\foo\\bar\\baz'); -//=> true - -isAbsolute.win32('a:foo/a/b/c/d'); -isAbsolute.win32(':\\'); -isAbsolute.win32('foo\\bar\\baz'); -isAbsolute.win32('foo\\bar\\baz\\'); -//=> false -``` - -## About - -### Related projects - -* [is-dotfile](https://www.npmjs.com/package/is-dotfile): Return true if a file path is (or has) a dotfile. Returns false if the… [more](https://github.com/jonschlinkert/is-dotfile) | [homepage](https://github.com/jonschlinkert/is-dotfile "Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory.") -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") -* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") -* [is-unc-path](https://www.npmjs.com/package/is-unc-path): Returns true if a filepath is a windows UNC file path. | [homepage](https://github.com/jonschlinkert/is-unc-path "Returns true if a filepath is a windows UNC file path.") -* [is-valid-glob](https://www.npmjs.com/package/is-valid-glob): Return true if a value is a valid glob pattern or patterns. | [homepage](https://github.com/jonschlinkert/is-valid-glob "Return true if a value is a valid glob pattern or patterns.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 35 | [jonschlinkert](https://github.com/jonschlinkert) | -| 1 | [es128](https://github.com/es128) | -| 1 | [shinnn](https://github.com/shinnn) | -| 1 | [Sobak](https://github.com/Sobak) | - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 13, 2017._ \ No newline at end of file diff --git a/node_modules/is-absolute/index.js b/node_modules/is-absolute/index.js deleted file mode 100644 index 06d67311..00000000 --- a/node_modules/is-absolute/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -var isRelative = require('is-relative'); -var isWindows = require('is-windows'); - -/** - * Expose `isAbsolute` - */ - -module.exports = isAbsolute; - -/** - * Returns true if a file path is absolute. - * - * @param {String} `fp` - * @return {Boolean} - */ - -function isAbsolute(fp) { - if (typeof fp !== 'string') { - throw new TypeError('isAbsolute expects a string.'); - } - return isWindows() ? isAbsolute.win32(fp) : isAbsolute.posix(fp); -} - -/** - * Test posix paths. - */ - -isAbsolute.posix = function posixPath(fp) { - return fp.charAt(0) === '/'; -}; - -/** - * Test windows paths. - */ - -isAbsolute.win32 = function win32(fp) { - if (/[a-z]/i.test(fp.charAt(0)) && fp.charAt(1) === ':' && fp.charAt(2) === '\\') { - return true; - } - // Microsoft Azure absolute filepath - if (fp.slice(0, 2) === '\\\\') { - return true; - } - return !isRelative(fp); -}; diff --git a/node_modules/is-absolute/package.json b/node_modules/is-absolute/package.json deleted file mode 100644 index 914cc437..00000000 --- a/node_modules/is-absolute/package.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "_from": "is-absolute@^1.0.0", - "_id": "is-absolute@1.0.0", - "_inBundle": false, - "_integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "_location": "/is-absolute", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "is-absolute@^1.0.0", - "name": "is-absolute", - "escapedName": "is-absolute", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/to-absolute-glob" - ], - "_resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "_shasum": "395e1ae84b11f26ad1795e73c17378e48a301576", - "_spec": "is-absolute@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/to-absolute-glob", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-absolute/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Elan Shanker", - "url": "https://github.com/es128" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Shinnosuke Watanabe", - "url": "https://shinnn.github.io" - }, - { - "url": "http://sobak.pl" - } - ], - "dependencies": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - }, - "deprecated": false, - "description": "Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.", - "devDependencies": { - "gulp-format-md": "^1.0.0", - "mocha": "^3.4.2" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/is-absolute", - "keywords": [ - "absolute", - "built", - "built-in", - "check", - "core", - "detect", - "dir", - "file", - "filepath", - "is", - "is-absolute", - "isabsolute", - "normalize", - "path", - "path-absolute", - "path-is-absolute", - "paths", - "polyfill", - "relative", - "resolve", - "shim", - "slash", - "slashes", - "uri", - "url", - "util", - "utils" - ], - "license": "MIT", - "main": "index.js", - "name": "is-absolute", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-absolute.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "run": true, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "is-dotfile", - "is-glob", - "is-relative", - "is-unc-path", - "is-valid-glob" - ] - }, - "reflinks": [ - "verb" - ], - "lint": { - "reflinks": true - } - }, - "version": "1.0.0" -} diff --git a/node_modules/is-buffer/LICENSE b/node_modules/is-buffer/LICENSE deleted file mode 100644 index 0c068cee..00000000 --- a/node_modules/is-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/is-buffer/README.md b/node_modules/is-buffer/README.md deleted file mode 100644 index cce0a8cf..00000000 --- a/node_modules/is-buffer/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# is-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/is-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/is-buffer -[npm-image]: https://img.shields.io/npm/v/is-buffer.svg -[npm-url]: https://npmjs.org/package/is-buffer -[downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg -[downloads-url]: https://npmjs.org/package/is-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (including the [browserify Buffer](https://github.com/feross/buffer)) - -[![saucelabs][saucelabs-image]][saucelabs-url] - -[saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg -[saucelabs-url]: https://saucelabs.com/u/is-buffer - -## Why not use `Buffer.isBuffer`? - -This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)). - -It's future-proof and works in node too! - -## install - -```bash -npm install is-buffer -``` - -## usage - -```js -var isBuffer = require('is-buffer') - -isBuffer(new Buffer(4)) // true - -isBuffer(undefined) // false -isBuffer(null) // false -isBuffer('') // false -isBuffer(true) // false -isBuffer(false) // false -isBuffer(0) // false -isBuffer(1) // false -isBuffer(1.0) // false -isBuffer('string') // false -isBuffer({}) // false -isBuffer(function foo () {}) // false -``` - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). diff --git a/node_modules/is-buffer/index.js b/node_modules/is-buffer/index.js deleted file mode 100644 index 9cce3965..00000000 --- a/node_modules/is-buffer/index.js +++ /dev/null @@ -1,21 +0,0 @@ -/*! - * Determine if an object is a Buffer - * - * @author Feross Aboukhadijeh <https://feross.org> - * @license MIT - */ - -// The _isBuffer check is for Safari 5-7 support, because it's missing -// Object.prototype.constructor. Remove this eventually -module.exports = function (obj) { - return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) -} - -function isBuffer (obj) { - return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) -} - -// For Node v0.10 support. Remove this eventually. -function isSlowBuffer (obj) { - return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) -} diff --git a/node_modules/is-buffer/package.json b/node_modules/is-buffer/package.json deleted file mode 100644 index 6e7458bc..00000000 --- a/node_modules/is-buffer/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_from": "is-buffer@^1.1.5", - "_id": "is-buffer@1.1.6", - "_inBundle": false, - "_integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "_location": "/is-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "is-buffer@^1.1.5", - "name": "is-buffer", - "escapedName": "is-buffer", - "rawSpec": "^1.1.5", - "saveSpec": null, - "fetchSpec": "^1.1.5" - }, - "_requiredBy": [ - "/remove-bom-buffer" - ], - "_resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "_shasum": "efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be", - "_spec": "is-buffer@^1.1.5", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/remove-bom-buffer", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org/" - }, - "bugs": { - "url": "https://github.com/feross/is-buffer/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Determine if an object is a Buffer", - "devDependencies": { - "standard": "*", - "tape": "^4.0.0", - "zuul": "^3.0.0" - }, - "homepage": "https://github.com/feross/is-buffer#readme", - "keywords": [ - "buffer", - "buffers", - "type", - "core buffer", - "browser buffer", - "browserify", - "typed array", - "uint32array", - "int16array", - "int32array", - "float32array", - "float64array", - "browser", - "arraybuffer", - "dataview" - ], - "license": "MIT", - "main": "index.js", - "name": "is-buffer", - "repository": { - "type": "git", - "url": "git://github.com/feross/is-buffer.git" - }, - "scripts": { - "test": "standard && npm run test-node && npm run test-browser", - "test-browser": "zuul -- test/*.js", - "test-browser-local": "zuul --local -- test/*.js", - "test-node": "tape test/*.js" - }, - "testling": { - "files": "test/*.js" - }, - "version": "1.1.6" -} diff --git a/node_modules/is-buffer/test/basic.js b/node_modules/is-buffer/test/basic.js deleted file mode 100644 index be4f8e43..00000000 --- a/node_modules/is-buffer/test/basic.js +++ /dev/null @@ -1,24 +0,0 @@ -var isBuffer = require('../') -var test = require('tape') - -test('is-buffer', function (t) { - t.equal(isBuffer(Buffer.alloc(4)), true, 'new Buffer(4)') - t.equal(isBuffer(Buffer.allocUnsafeSlow(100)), true, 'SlowBuffer(100)') - - t.equal(isBuffer(undefined), false, 'undefined') - t.equal(isBuffer(null), false, 'null') - t.equal(isBuffer(''), false, 'empty string') - t.equal(isBuffer(true), false, 'true') - t.equal(isBuffer(false), false, 'false') - t.equal(isBuffer(0), false, '0') - t.equal(isBuffer(1), false, '1') - t.equal(isBuffer(1.0), false, '1.0') - t.equal(isBuffer('string'), false, 'string') - t.equal(isBuffer({}), false, '{}') - t.equal(isBuffer([]), false, '[]') - t.equal(isBuffer(function foo () {}), false, 'function foo () {}') - t.equal(isBuffer({ isBuffer: null }), false, '{ isBuffer: null }') - t.equal(isBuffer({ isBuffer: function () { throw new Error() } }), false, '{ isBuffer: function () { throw new Error() } }') - - t.end() -}) diff --git a/node_modules/is-extglob/LICENSE b/node_modules/is-extglob/LICENSE deleted file mode 100644 index 842218cf..00000000 --- a/node_modules/is-extglob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2016, Jon Schlinkert - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/is-extglob/README.md b/node_modules/is-extglob/README.md deleted file mode 100644 index 0416af5c..00000000 --- a/node_modules/is-extglob/README.md +++ /dev/null @@ -1,107 +0,0 @@ -# is-extglob [![NPM version](https://img.shields.io/npm/v/is-extglob.svg?style=flat)](https://www.npmjs.com/package/is-extglob) [![NPM downloads](https://img.shields.io/npm/dm/is-extglob.svg?style=flat)](https://npmjs.org/package/is-extglob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-extglob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-extglob) - -> Returns true if a string has an extglob. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-extglob -``` - -## Usage - -```js -var isExtglob = require('is-extglob'); -``` - -**True** - -```js -isExtglob('?(abc)'); -isExtglob('@(abc)'); -isExtglob('!(abc)'); -isExtglob('*(abc)'); -isExtglob('+(abc)'); -``` - -**False** - -Escaped extglobs: - -```js -isExtglob('\\?(abc)'); -isExtglob('\\@(abc)'); -isExtglob('\\!(abc)'); -isExtglob('\\*(abc)'); -isExtglob('\\+(abc)'); -``` - -Everything else... - -```js -isExtglob('foo.js'); -isExtglob('!foo.js'); -isExtglob('*.js'); -isExtglob('**/abc.js'); -isExtglob('abc/*.js'); -isExtglob('abc/(aaa|bbb).js'); -isExtglob('abc/[a-z].js'); -isExtglob('abc/{a,b}.js'); -isExtglob('abc/?.js'); -isExtglob('abc.js'); -isExtglob('abc/def/ghi.js'); -``` - -## History - -**v2.0** - -Adds support for escaping. Escaped exglobs no longer return true. - -## About - -### Related projects - -* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob "Returns `true` if an array has a glob pattern.") -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") -* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Building docs - -_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ - -To generate the readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install -g verb verb-generate-readme && verb -``` - -### Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -### License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/is-extglob/blob/master/LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file diff --git a/node_modules/is-extglob/index.js b/node_modules/is-extglob/index.js deleted file mode 100644 index c1d986fc..00000000 --- a/node_modules/is-extglob/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/*! - * is-extglob <https://github.com/jonschlinkert/is-extglob> - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - */ - -module.exports = function isExtglob(str) { - if (typeof str !== 'string' || str === '') { - return false; - } - - var match; - while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { - if (match[2]) return true; - str = str.slice(match.index + match[0].length); - } - - return false; -}; diff --git a/node_modules/is-extglob/package.json b/node_modules/is-extglob/package.json deleted file mode 100644 index 9674e0e9..00000000 --- a/node_modules/is-extglob/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_from": "is-extglob@^2.1.0", - "_id": "is-extglob@2.1.1", - "_inBundle": false, - "_integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "_location": "/is-extglob", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "is-extglob@^2.1.0", - "name": "is-extglob", - "escapedName": "is-extglob", - "rawSpec": "^2.1.0", - "saveSpec": null, - "fetchSpec": "^2.1.0" - }, - "_requiredBy": [ - "/is-glob" - ], - "_resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "_shasum": "a88c02535791f02ed37c76a1b9ea9773c833f8c2", - "_spec": "is-extglob@^2.1.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/is-glob", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-extglob/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Returns true if a string has an extglob.", - "devDependencies": { - "gulp-format-md": "^0.1.10", - "mocha": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/is-extglob", - "keywords": [ - "bash", - "braces", - "check", - "exec", - "expression", - "extglob", - "glob", - "globbing", - "globstar", - "is", - "match", - "matches", - "pattern", - "regex", - "regular", - "string", - "test" - ], - "license": "MIT", - "main": "index.js", - "name": "is-extglob", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-extglob.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "has-glob", - "is-glob", - "micromatch" - ] - }, - "reflinks": [ - "verb", - "verb-generate-readme" - ], - "lint": { - "reflinks": true - } - }, - "version": "2.1.1" -} diff --git a/node_modules/is-glob/LICENSE b/node_modules/is-glob/LICENSE deleted file mode 100644 index 39245ac1..00000000 --- a/node_modules/is-glob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2016, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/is-glob/README.md b/node_modules/is-glob/README.md deleted file mode 100644 index 6f4404fe..00000000 --- a/node_modules/is-glob/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-glob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-glob) - -> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-glob -``` - -You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob). - -## Usage - -```js -var isGlob = require('is-glob'); -``` - -**True** - -Patterns that have glob characters or regex patterns will return `true`: - -```js -isGlob('!foo.js'); -isGlob('*.js'); -isGlob('**/abc.js'); -isGlob('abc/*.js'); -isGlob('abc/(aaa|bbb).js'); -isGlob('abc/[a-z].js'); -isGlob('abc/{a,b}.js'); -isGlob('abc/?.js'); -//=> true -``` - -Extglobs - -```js -isGlob('abc/@(a).js'); -isGlob('abc/!(a).js'); -isGlob('abc/+(a).js'); -isGlob('abc/*(a).js'); -isGlob('abc/?(a).js'); -//=> true -``` - -**False** - -Escaped globs or extglobs return `false`: - -```js -isGlob('abc/\\@(a).js'); -isGlob('abc/\\!(a).js'); -isGlob('abc/\\+(a).js'); -isGlob('abc/\\*(a).js'); -isGlob('abc/\\?(a).js'); -isGlob('\\!foo.js'); -isGlob('\\*.js'); -isGlob('\\*\\*/abc.js'); -isGlob('abc/\\*.js'); -isGlob('abc/\\(aaa|bbb).js'); -isGlob('abc/\\[a-z].js'); -isGlob('abc/\\{a,b}.js'); -isGlob('abc/\\?.js'); -//=> false -``` - -Patterns that do not have glob patterns return `false`: - -```js -isGlob('abc.js'); -isGlob('abc/def/ghi.js'); -isGlob('foo.js'); -isGlob('abc/@.js'); -isGlob('abc/+.js'); -isGlob(); -isGlob(null); -//=> false -``` - -Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)): - -```js -isGlob(['**/*.js']); -isGlob(['foo.js']); -//=> false -``` - -## About - -### Related projects - -* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit") -* [base](https://www.npmjs.com/package/base): base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/node-base/base) | [homepage](https://github.com/node-base/base "base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.") -* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.") -* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor**<br/> | -| --- | --- | -| 40 | [jonschlinkert](https://github.com/jonschlinkert) | -| 1 | [tuvistavie](https://github.com/tuvistavie) | - -### Building docs - -_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ - -To generate the readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install -g verb verb-generate-readme && verb -``` - -### Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -### License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/is-glob/blob/master/LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file diff --git a/node_modules/is-glob/index.js b/node_modules/is-glob/index.js deleted file mode 100644 index 2ecbe2a7..00000000 --- a/node_modules/is-glob/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/*! - * is-glob <https://github.com/jonschlinkert/is-glob> - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - */ - -var isExtglob = require('is-extglob'); - -module.exports = function isGlob(str) { - if (typeof str !== 'string' || str === '') { - return false; - } - - if (isExtglob(str)) return true; - - var regex = /(\\).|([*?]|\[.*\]|\{.*\}|\(.*\|.*\)|^!)/; - var match; - - while ((match = regex.exec(str))) { - if (match[2]) return true; - str = str.slice(match.index + match[0].length); - } - return false; -}; diff --git a/node_modules/is-glob/package.json b/node_modules/is-glob/package.json deleted file mode 100644 index 6fb6aa40..00000000 --- a/node_modules/is-glob/package.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "_from": "is-glob@^3.1.0", - "_id": "is-glob@3.1.0", - "_inBundle": false, - "_integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "_location": "/is-glob", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "is-glob@^3.1.0", - "name": "is-glob", - "escapedName": "is-glob", - "rawSpec": "^3.1.0", - "saveSpec": null, - "fetchSpec": "^3.1.0" - }, - "_requiredBy": [ - "/glob-parent" - ], - "_resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "_shasum": "7ba5ae24217804ac70707b96922567486cc3e84a", - "_spec": "is-glob@^3.1.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/glob-parent", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-glob/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Daniel Perez", - "email": "daniel@claudetech.com", - "url": "http://tuvistavie.com" - }, - { - "name": "Jon Schlinkert", - "email": "jon.schlinkert@sellside.com", - "url": "http://twitter.com/jonschlinkert" - } - ], - "dependencies": { - "is-extglob": "^2.1.0" - }, - "deprecated": false, - "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", - "devDependencies": { - "gulp-format-md": "^0.1.10", - "mocha": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/is-glob", - "keywords": [ - "bash", - "braces", - "check", - "exec", - "expression", - "extglob", - "glob", - "globbing", - "globstar", - "is", - "match", - "matches", - "pattern", - "regex", - "regular", - "string", - "test" - ], - "license": "MIT", - "main": "index.js", - "name": "is-glob", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-glob.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "layout": "default", - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "assemble", - "base", - "update", - "verb" - ] - }, - "reflinks": [ - "assemble", - "bach", - "base", - "composer", - "gulp", - "has-glob", - "is-valid-glob", - "micromatch", - "npm", - "scaffold", - "verb", - "vinyl" - ] - }, - "version": "3.1.0" -} diff --git a/node_modules/is-negated-glob/LICENSE b/node_modules/is-negated-glob/LICENSE deleted file mode 100644 index 66ae69c7..00000000 --- a/node_modules/is-negated-glob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Jon Schlinkert - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/is-negated-glob/README.md b/node_modules/is-negated-glob/README.md deleted file mode 100644 index c909408a..00000000 --- a/node_modules/is-negated-glob/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# is-negated-glob [![NPM version](https://img.shields.io/npm/v/is-negated-glob.svg?style=flat)](https://www.npmjs.com/package/is-negated-glob) [![NPM downloads](https://img.shields.io/npm/dm/is-negated-glob.svg?style=flat)](https://npmjs.org/package/is-negated-glob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-negated-glob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-negated-glob) - -> Returns an object with a `negated` boolean and the `!` stripped from negation patterns. Also respects extglobs. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-negated-glob -``` - -## Usage - -```js -var isNegatedGlob = require('is-negated-glob'); - -console.log(isNegatedGlob('foo')); -// { pattern: 'foo', negated: false } - -console.log(isNegatedGlob('!foo')); -// { pattern: 'foo', negated: true } - -console.log(isNegatedGlob('!(foo)')); -// extglob patterns are ignored -// { pattern: '!(foo)', negated: false } -``` - -## About - -### Related projects - -* [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob "Returns true if a string has an extglob.") -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") -* [to-absolute-glob](https://www.npmjs.com/package/to-absolute-glob): Make a glob pattern absolute, ensuring that negative globs and patterns with trailing slashes are… [more](https://github.com/jonschlinkert/to-absolute-glob) | [homepage](https://github.com/jonschlinkert/to-absolute-glob "Make a glob pattern absolute, ensuring that negative globs and patterns with trailing slashes are correctly handled.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Building docs - -_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ - -To generate the readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install -g verb verb-generate-readme && verb -``` - -### Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -### License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/is-negated-glob/blob/master/LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.30, on September 08, 2016._ \ No newline at end of file diff --git a/node_modules/is-negated-glob/index.js b/node_modules/is-negated-glob/index.js deleted file mode 100644 index d1c060db..00000000 --- a/node_modules/is-negated-glob/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -module.exports = function(pattern) { - if (typeof pattern !== 'string') { - throw new TypeError('expected a string'); - } - - var glob = { negated: false, pattern: pattern, original: pattern }; - if (pattern.charAt(0) === '!' && pattern.charAt(1) !== '(') { - glob.negated = true; - glob.pattern = pattern.slice(1); - } - - return glob; -}; diff --git a/node_modules/is-negated-glob/package.json b/node_modules/is-negated-glob/package.json deleted file mode 100644 index 908fc2a7..00000000 --- a/node_modules/is-negated-glob/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_from": "is-negated-glob@^1.0.0", - "_id": "is-negated-glob@1.0.0", - "_inBundle": false, - "_integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", - "_location": "/is-negated-glob", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "is-negated-glob@^1.0.0", - "name": "is-negated-glob", - "escapedName": "is-negated-glob", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/glob-stream", - "/to-absolute-glob" - ], - "_resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", - "_shasum": "6910bca5da8c95e784b5751b976cf5a10fee36d2", - "_spec": "is-negated-glob@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/glob-stream", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-negated-glob/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Returns an object with a `negated` boolean and the `!` stripped from negation patterns. Also respects extglobs.", - "devDependencies": { - "gulp-format-md": "^0.1.10", - "mocha": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js", - "LICENSE", - "README.md" - ], - "homepage": "https://github.com/jonschlinkert/is-negated-glob", - "keywords": [ - "extglob", - "glob", - "inverse", - "inverted", - "is", - "is-glob", - "match", - "micromatch", - "negate", - "negated", - "negation", - "negative", - "pattern", - "test" - ], - "license": "MIT", - "main": "index.js", - "name": "is-negated-glob", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-negated-glob.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "is-extglob", - "is-glob", - "to-absolute-glob" - ] - }, - "reflinks": [ - "verb", - "verb-generate-readme" - ], - "lint": { - "reflinks": true - } - }, - "version": "1.0.0" -} diff --git a/node_modules/is-number/LICENSE b/node_modules/is-number/LICENSE deleted file mode 100644 index 9af4a67d..00000000 --- a/node_modules/is-number/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-present, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/is-number/README.md b/node_modules/is-number/README.md deleted file mode 100644 index eb8149e8..00000000 --- a/node_modules/is-number/README.md +++ /dev/null @@ -1,187 +0,0 @@ -# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![NPM total downloads](https://img.shields.io/npm/dt/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-number) - -> Returns true if the value is a finite number. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-number -``` - -## Why is this needed? - -In JavaScript, it's not always as straightforward as it should be to reliably check if a value is a number. It's common for devs to use `+`, `-`, or `Number()` to cast a string value to a number (for example, when values are returned from user input, regex matches, parsers, etc). But there are many non-intuitive edge cases that yield unexpected results: - -```js -console.log(+[]); //=> 0 -console.log(+''); //=> 0 -console.log(+' '); //=> 0 -console.log(typeof NaN); //=> 'number' -``` - -This library offers a performant way to smooth out edge cases like these. - -## Usage - -```js -const isNumber = require('is-number'); -``` - -See the [tests](./test.js) for more examples. - -### true - -```js -isNumber(5e3); // true -isNumber(0xff); // true -isNumber(-1.1); // true -isNumber(0); // true -isNumber(1); // true -isNumber(1.1); // true -isNumber(10); // true -isNumber(10.10); // true -isNumber(100); // true -isNumber('-1.1'); // true -isNumber('0'); // true -isNumber('012'); // true -isNumber('0xff'); // true -isNumber('1'); // true -isNumber('1.1'); // true -isNumber('10'); // true -isNumber('10.10'); // true -isNumber('100'); // true -isNumber('5e3'); // true -isNumber(parseInt('012')); // true -isNumber(parseFloat('012')); // true -``` - -### False - -Everything else is false, as you would expect: - -```js -isNumber(Infinity); // false -isNumber(NaN); // false -isNumber(null); // false -isNumber(undefined); // false -isNumber(''); // false -isNumber(' '); // false -isNumber('foo'); // false -isNumber([1]); // false -isNumber([]); // false -isNumber(function () {}); // false -isNumber({}); // false -``` - -## Release history - -### 7.0.0 - -* Refactor. Now uses `.isFinite` if it exists. -* Performance is about the same as v6.0 when the value is a string or number. But it's now 3x-4x faster when the value is not a string or number. - -### 6.0.0 - -* Optimizations, thanks to @benaadams. - -### 5.0.0 - -**Breaking changes** - -* removed support for `instanceof Number` and `instanceof String` - -## Benchmarks - -As with all benchmarks, take these with a grain of salt. See the [benchmarks](./benchmark/index.js) for more detail. - -``` -# all -v7.0 x 413,222 ops/sec ±2.02% (86 runs sampled) -v6.0 x 111,061 ops/sec ±1.29% (85 runs sampled) -parseFloat x 317,596 ops/sec ±1.36% (86 runs sampled) -fastest is 'v7.0' - -# string -v7.0 x 3,054,496 ops/sec ±1.05% (89 runs sampled) -v6.0 x 2,957,781 ops/sec ±0.98% (88 runs sampled) -parseFloat x 3,071,060 ops/sec ±1.13% (88 runs sampled) -fastest is 'parseFloat,v7.0' - -# number -v7.0 x 3,146,895 ops/sec ±0.89% (89 runs sampled) -v6.0 x 3,214,038 ops/sec ±1.07% (89 runs sampled) -parseFloat x 3,077,588 ops/sec ±1.07% (87 runs sampled) -fastest is 'v6.0' -``` - -## About - -<details> -<summary><strong>Contributing</strong></summary> - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -</details> - -<details> -<summary><strong>Running Tests</strong></summary> - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -</details> - -<details> -<summary><strong>Building docs</strong></summary> - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -</details> - -### Related projects - -You might also be interested in these projects: - -* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") -* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") -* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") -* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 49 | [jonschlinkert](https://github.com/jonschlinkert) | -| 5 | [charlike-old](https://github.com/charlike-old) | -| 1 | [benaadams](https://github.com/benaadams) | -| 1 | [realityking](https://github.com/realityking) | - -### Author - -**Jon Schlinkert** - -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 15, 2018._ \ No newline at end of file diff --git a/node_modules/is-number/index.js b/node_modules/is-number/index.js deleted file mode 100644 index 27f19b75..00000000 --- a/node_modules/is-number/index.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! - * is-number <https://github.com/jonschlinkert/is-number> - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -module.exports = function(num) { - if (typeof num === 'number') { - return num - num === 0; - } - if (typeof num === 'string' && num.trim() !== '') { - return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); - } - return false; -}; diff --git a/node_modules/is-number/package.json b/node_modules/is-number/package.json deleted file mode 100644 index 13a237e8..00000000 --- a/node_modules/is-number/package.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "_from": "is-number@^7.0.0", - "_id": "is-number@7.0.0", - "_inBundle": false, - "_integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "_location": "/is-number", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "is-number@^7.0.0", - "name": "is-number", - "escapedName": "is-number", - "rawSpec": "^7.0.0", - "saveSpec": null, - "fetchSpec": "^7.0.0" - }, - "_requiredBy": [ - "/to-regex-range" - ], - "_resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "_shasum": "7535345b896734d5f80c4d06c50955527a14f12b", - "_spec": "is-number@^7.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/to-regex-range", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-number/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Olsten Larck", - "url": "https://i.am.charlike.online" - }, - { - "name": "Rouven Weßling", - "url": "www.rouvenwessling.de" - } - ], - "deprecated": false, - "description": "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.", - "devDependencies": { - "ansi": "^0.3.1", - "benchmark": "^2.1.4", - "gulp-format-md": "^1.0.0", - "mocha": "^3.5.3" - }, - "engines": { - "node": ">=0.12.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/is-number", - "keywords": [ - "cast", - "check", - "coerce", - "coercion", - "finite", - "integer", - "is", - "isnan", - "is-nan", - "is-num", - "is-number", - "isnumber", - "isfinite", - "istype", - "kind", - "math", - "nan", - "num", - "number", - "numeric", - "parseFloat", - "parseInt", - "test", - "type", - "typeof", - "value" - ], - "license": "MIT", - "main": "index.js", - "name": "is-number", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-number.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "related": { - "list": [ - "is-plain-object", - "is-primitive", - "isobject", - "kind-of" - ] - }, - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - } - }, - "version": "7.0.0" -} diff --git a/node_modules/is-relative/LICENSE b/node_modules/is-relative/LICENSE deleted file mode 100644 index 3f2eca18..00000000 --- a/node_modules/is-relative/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2017, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/is-relative/README.md b/node_modules/is-relative/README.md deleted file mode 100644 index eff8c74d..00000000 --- a/node_modules/is-relative/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# is-relative [![NPM version](https://img.shields.io/npm/v/is-relative.svg?style=flat)](https://www.npmjs.com/package/is-relative) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-relative.svg?style=flat)](https://npmjs.org/package/is-relative) [![NPM total downloads](https://img.shields.io/npm/dt/is-relative.svg?style=flat)](https://npmjs.org/package/is-relative) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-relative.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-relative) - -> Returns `true` if the path appears to be relative. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-relative -``` - -## Usage - -```js -var isRelative = require('is-relative'); -console.log(isRelative('README.md')); -//=> true - -console.log(isRelative('/User/dev/foo/README.md')); -//=> false -``` - -## About - -### Related projects - -* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute "Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute.") -* [is-dotfile](https://www.npmjs.com/package/is-dotfile): Return true if a file path is (or has) a dotfile. Returns false if the… [more](https://github.com/jonschlinkert/is-dotfile) | [homepage](https://github.com/jonschlinkert/is-dotfile "Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory.") -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") -* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") -* [is-unc-path](https://www.npmjs.com/package/is-unc-path): Returns true if a filepath is a windows UNC file path. | [homepage](https://github.com/jonschlinkert/is-unc-path "Returns true if a filepath is a windows UNC file path.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 13 | [jonschlinkert](https://github.com/jonschlinkert) | -| 3 | [shinnn](https://github.com/shinnn) | - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 13, 2017._ \ No newline at end of file diff --git a/node_modules/is-relative/index.js b/node_modules/is-relative/index.js deleted file mode 100644 index 37563577..00000000 --- a/node_modules/is-relative/index.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -var isUncPath = require('is-unc-path'); - -module.exports = function isRelative(filepath) { - if (typeof filepath !== 'string') { - throw new TypeError('expected filepath to be a string'); - } - - // Windows UNC paths are always considered to be absolute. - return !isUncPath(filepath) && !/^([a-z]:)?[\\\/]/i.test(filepath); -}; diff --git a/node_modules/is-relative/package.json b/node_modules/is-relative/package.json deleted file mode 100644 index 320a84b5..00000000 --- a/node_modules/is-relative/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_from": "is-relative@^1.0.0", - "_id": "is-relative@1.0.0", - "_inBundle": false, - "_integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "_location": "/is-relative", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "is-relative@^1.0.0", - "name": "is-relative", - "escapedName": "is-relative", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/is-absolute" - ], - "_resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "_shasum": "a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d", - "_spec": "is-relative@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/is-absolute", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-relative/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Shinnosuke Watanabe", - "url": "https://shinnn.github.io" - } - ], - "dependencies": { - "is-unc-path": "^1.0.0" - }, - "deprecated": false, - "description": "Returns `true` if the path appears to be relative.", - "devDependencies": { - "gulp-format-md": "^1.0.0", - "mocha": "^3.4.2" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/is-relative", - "keywords": [ - "absolute", - "check", - "file", - "filepath", - "is", - "normalize", - "path", - "path.relative", - "relative", - "resolve", - "slash", - "slashes", - "uri", - "url" - ], - "license": "MIT", - "main": "index.js", - "name": "is-relative", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-relative.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "is-absolute", - "is-dotfile", - "is-glob", - "is-relative", - "is-unc-path" - ] - }, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - } - }, - "version": "1.0.0" -} diff --git a/node_modules/is-unc-path/LICENSE b/node_modules/is-unc-path/LICENSE deleted file mode 100644 index c0d7f136..00000000 --- a/node_modules/is-unc-path/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2017, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/is-unc-path/README.md b/node_modules/is-unc-path/README.md deleted file mode 100644 index ba959101..00000000 --- a/node_modules/is-unc-path/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# is-unc-path [![NPM version](https://img.shields.io/npm/v/is-unc-path.svg?style=flat)](https://www.npmjs.com/package/is-unc-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-unc-path.svg?style=flat)](https://npmjs.org/package/is-unc-path) [![NPM total downloads](https://img.shields.io/npm/dt/is-unc-path.svg?style=flat)](https://npmjs.org/package/is-unc-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-unc-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-unc-path) - -> Returns true if a filepath is a windows UNC file path. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-unc-path -``` - -## Usage - -```js -var isUncPath = require('is-unc-path'); -``` - -**true** - -Returns true for windows UNC paths: - -```js -isUncPath('\\/foo/bar'); -isUncPath('\\\\foo/bar'); -isUncPath('\\\\foo\\admin$'); -isUncPath('\\\\foo\\admin$\\system32'); -isUncPath('\\\\foo\\temp'); -isUncPath('\\\\/foo/bar'); -isUncPath('\\\\\\/foo/bar'); -``` - -**false** - -Returns false for non-UNC paths: - -```js -isUncPath('/foo/bar'); -isUncPath('/'); -isUncPath('/foo'); -isUncPath('/foo/'); -isUncPath('c:'); -isUncPath('c:.'); -isUncPath('c:./'); -isUncPath('c:./file'); -isUncPath('c:/'); -isUncPath('c:/file'); -``` - -**Customization** - -Use `.source` to use the regex as a component of another regex: - -```js -var myRegex = new RegExp(isUncPath.source + 'foo'); -``` - -**[Rules for UNC paths](http://resources.esri.com/help/9.3/ArcGISDesktop/com/Gp_ToolRef/sharing_tools_and_toolboxes/pathnames_explained_colon_absolute_relative_unc_and_url.htm)** - -* The computer name is always preceded by a double backward-slash (`\\`). -* UNC paths cannot contain a drive letter (such as `D:`) - -## Release history - -### v1.0.0 - 2017-07-12 - -**Changes** - -* now throws a `TypeError` if value is not a string - -## About - -### Related projects - -* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute "Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute.") -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") -* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 13, 2017._ \ No newline at end of file diff --git a/node_modules/is-unc-path/index.js b/node_modules/is-unc-path/index.js deleted file mode 100644 index a9b839ed..00000000 --- a/node_modules/is-unc-path/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var regex = require('unc-path-regex')(); - -module.exports = function(filepath) { - if (typeof filepath !== 'string') { - throw new TypeError('expected a string'); - } - return regex.test(filepath); -}; diff --git a/node_modules/is-unc-path/package.json b/node_modules/is-unc-path/package.json deleted file mode 100644 index d41e7f06..00000000 --- a/node_modules/is-unc-path/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "_from": "is-unc-path@^1.0.0", - "_id": "is-unc-path@1.0.0", - "_inBundle": false, - "_integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "_location": "/is-unc-path", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "is-unc-path@^1.0.0", - "name": "is-unc-path", - "escapedName": "is-unc-path", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/is-relative" - ], - "_resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "_shasum": "d731e8898ed090a12c352ad2eaed5095ad322c9d", - "_spec": "is-unc-path@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/is-relative", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-unc-path/issues" - }, - "bundleDependencies": false, - "dependencies": { - "unc-path-regex": "^0.1.2" - }, - "deprecated": false, - "description": "Returns true if a filepath is a windows UNC file path.", - "devDependencies": { - "gulp-format-md": "^1.0.0", - "mocha": "^3.4.2" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/is-unc-path", - "keywords": [ - "absolute", - "expression", - "file", - "filepath", - "is", - "match", - "matching", - "path", - "regex", - "regexp", - "regular", - "unc", - "win", - "windows" - ], - "license": "MIT", - "main": "index.js", - "name": "is-unc-path", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-unc-path.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "related": { - "list": [ - "is-relative", - "is-absolute", - "is-glob" - ] - } - }, - "version": "1.0.0" -} diff --git a/node_modules/is-utf8/LICENSE b/node_modules/is-utf8/LICENSE deleted file mode 100644 index 2c8d4b99..00000000 --- a/node_modules/is-utf8/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) - -Copyright (C) 2014 Wei Fanzhe - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -   -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/is-utf8/README.md b/node_modules/is-utf8/README.md deleted file mode 100644 index b62ddde1..00000000 --- a/node_modules/is-utf8/README.md +++ /dev/null @@ -1,16 +0,0 @@ -#utf8 detector - -Detect if a Buffer is utf8 encoded. -It need The minimum amount of bytes is 4. - - -```javascript - var fs = require('fs'); - var isUtf8 = require('is-utf8'); - var ansi = fs.readFileSync('ansi.txt'); - var utf8 = fs.readFileSync('utf8.txt'); - - console.log('ansi.txt is utf8: '+isUtf8(ansi)); //false - console.log('utf8.txt is utf8: '+isUtf8(utf8)); //true -``` - diff --git a/node_modules/is-utf8/is-utf8.js b/node_modules/is-utf8/is-utf8.js deleted file mode 100644 index 8a5f15d1..00000000 --- a/node_modules/is-utf8/is-utf8.js +++ /dev/null @@ -1,76 +0,0 @@ - -exports = module.exports = function(bytes) -{ - var i = 0; - while(i < bytes.length) - { - if( (// ASCII - bytes[i] == 0x09 || - bytes[i] == 0x0A || - bytes[i] == 0x0D || - (0x20 <= bytes[i] && bytes[i] <= 0x7E) - ) - ) { - i += 1; - continue; - } - - if( (// non-overlong 2-byte - (0xC2 <= bytes[i] && bytes[i] <= 0xDF) && - (0x80 <= bytes[i+1] && bytes[i+1] <= 0xBF) - ) - ) { - i += 2; - continue; - } - - if( (// excluding overlongs - bytes[i] == 0xE0 && - (0xA0 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) && - (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) - ) || - (// straight 3-byte - ((0xE1 <= bytes[i] && bytes[i] <= 0xEC) || - bytes[i] == 0xEE || - bytes[i] == 0xEF) && - (0x80 <= bytes[i + 1] && bytes[i+1] <= 0xBF) && - (0x80 <= bytes[i+2] && bytes[i+2] <= 0xBF) - ) || - (// excluding surrogates - bytes[i] == 0xED && - (0x80 <= bytes[i+1] && bytes[i+1] <= 0x9F) && - (0x80 <= bytes[i+2] && bytes[i+2] <= 0xBF) - ) - ) { - i += 3; - continue; - } - - if( (// planes 1-3 - bytes[i] == 0xF0 && - (0x90 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) && - (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) && - (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF) - ) || - (// planes 4-15 - (0xF1 <= bytes[i] && bytes[i] <= 0xF3) && - (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0xBF) && - (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) && - (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF) - ) || - (// plane 16 - bytes[i] == 0xF4 && - (0x80 <= bytes[i + 1] && bytes[i + 1] <= 0x8F) && - (0x80 <= bytes[i + 2] && bytes[i + 2] <= 0xBF) && - (0x80 <= bytes[i + 3] && bytes[i + 3] <= 0xBF) - ) - ) { - i += 4; - continue; - } - - return false; - } - - return true; -} diff --git a/node_modules/is-utf8/package.json b/node_modules/is-utf8/package.json deleted file mode 100644 index b0d9575d..00000000 --- a/node_modules/is-utf8/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "_from": "is-utf8@^0.2.1", - "_id": "is-utf8@0.2.1", - "_inBundle": false, - "_integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "_location": "/is-utf8", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "is-utf8@^0.2.1", - "name": "is-utf8", - "escapedName": "is-utf8", - "rawSpec": "^0.2.1", - "saveSpec": null, - "fetchSpec": "^0.2.1" - }, - "_requiredBy": [ - "/remove-bom-buffer" - ], - "_resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "_shasum": "4b0da1442104d1b336340e80797e865cf39f7d72", - "_spec": "is-utf8@^0.2.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/remove-bom-buffer", - "author": { - "name": "wayfind" - }, - "bugs": { - "url": "https://github.com/wayfind/is-utf8/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Detect if a buffer is utf8 encoded.", - "files": [ - "is-utf8.js" - ], - "homepage": "https://github.com/wayfind/is-utf8#readme", - "keywords": [ - "utf8", - "charset" - ], - "license": "MIT", - "main": "is-utf8.js", - "name": "is-utf8", - "repository": { - "type": "git", - "url": "git+https://github.com/wayfind/is-utf8.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "0.2.1" -} diff --git a/node_modules/is-valid-glob/LICENSE b/node_modules/is-valid-glob/LICENSE deleted file mode 100644 index 83b56e70..00000000 --- a/node_modules/is-valid-glob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2017, Jon Schlinkert - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/is-valid-glob/README.md b/node_modules/is-valid-glob/README.md deleted file mode 100644 index 80100a6a..00000000 --- a/node_modules/is-valid-glob/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# is-valid-glob [![NPM version](https://img.shields.io/npm/v/is-valid-glob.svg?style=flat)](https://www.npmjs.com/package/is-valid-glob) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-valid-glob.svg?style=flat)](https://npmjs.org/package/is-valid-glob) [![NPM total downloads](https://img.shields.io/npm/dt/is-valid-glob.svg?style=flat)](https://npmjs.org/package/is-valid-glob) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-valid-glob.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-valid-glob) - -> Return true if a value is a valid glob pattern or patterns. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-valid-glob -``` - -## Usage - -This really just checks to make sure that a pattern is either a string or array, and if it's an array it's either empty or consists of only strings. - -```js -var isValidGlob = require('is-valid-glob'); - -isValidGlob('foo/*.js'); -//=> true -``` - -**Valid patterns** - -```js -isValidGlob('a'); -isValidGlob('a.js'); -isValidGlob('*.js'); -isValidGlob(['a', 'b']); -//=> all true -``` - -**Invalid patterns** - -```js -isValidGlob(); -isValidGlob(''); -isValidGlob(null); -isValidGlob(undefined); -isValidGlob(new Buffer('foo')); -isValidGlob(['foo', [[]]]); -isValidGlob(['foo', [['bar']]]); -isValidGlob(['foo', {}]); -isValidGlob({}); -isValidGlob([]); -isValidGlob(['']); -//=> all false -``` - -## About - -### Related projects - -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") -* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") -* [vinyl-fs](https://www.npmjs.com/package/vinyl-fs): Vinyl adapter for the file system | [homepage](http://github.com/wearefractal/vinyl-fs "Vinyl adapter for the file system") -* [vinyl](https://www.npmjs.com/package/vinyl): Virtual file format. | [homepage](https://github.com/gulpjs/vinyl#readme "Virtual file format.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 9 | [jonschlinkert](https://github.com/jonschlinkert) | -| 2 | [contra](https://github.com/contra) | - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 21, 2017._ \ No newline at end of file diff --git a/node_modules/is-valid-glob/index.js b/node_modules/is-valid-glob/index.js deleted file mode 100644 index 6b1899f1..00000000 --- a/node_modules/is-valid-glob/index.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -module.exports = function isValidGlob(glob) { - if (typeof glob === 'string' && glob.length > 0) { - return true; - } - if (Array.isArray(glob)) { - return glob.length !== 0 && every(glob); - } - return false; -}; - -function every(arr) { - var len = arr.length; - while (len--) { - if (typeof arr[len] !== 'string' || arr[len].length <= 0) { - return false; - } - } - return true; -} diff --git a/node_modules/is-valid-glob/package.json b/node_modules/is-valid-glob/package.json deleted file mode 100644 index cb5fe599..00000000 --- a/node_modules/is-valid-glob/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_from": "is-valid-glob@^1.0.0", - "_id": "is-valid-glob@1.0.0", - "_inBundle": false, - "_integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", - "_location": "/is-valid-glob", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "is-valid-glob@^1.0.0", - "name": "is-valid-glob", - "escapedName": "is-valid-glob", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", - "_shasum": "29bf3eff701be2d4d315dbacc39bc39fe8f601aa", - "_spec": "is-valid-glob@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-valid-glob/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "contra", - "url": "http://contra.io" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - } - ], - "deprecated": false, - "description": "Return true if a value is a valid glob pattern or patterns.", - "devDependencies": { - "gulp-format-md": "^0.1.12", - "mocha": "^3.4.2" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/is-valid-glob", - "keywords": [ - "array", - "check", - "glob", - "is", - "match", - "pattern", - "patterns", - "read", - "test", - "valid", - "validate" - ], - "license": "MIT", - "main": "index.js", - "name": "is-valid-glob", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-valid-glob.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "is-glob", - "micromatch", - "vinyl-fs", - "vinyl" - ] - }, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - } - }, - "version": "1.0.0" -} diff --git a/node_modules/is-windows/LICENSE b/node_modules/is-windows/LICENSE deleted file mode 100644 index f8de0630..00000000 --- a/node_modules/is-windows/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2018, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/is-windows/README.md b/node_modules/is-windows/README.md deleted file mode 100644 index 485bfdec..00000000 --- a/node_modules/is-windows/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# is-windows [![NPM version](https://img.shields.io/npm/v/is-windows.svg?style=flat)](https://www.npmjs.com/package/is-windows) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-windows.svg?style=flat)](https://npmjs.org/package/is-windows) [![NPM total downloads](https://img.shields.io/npm/dt/is-windows.svg?style=flat)](https://npmjs.org/package/is-windows) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-windows.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-windows) - -> Returns true if the platform is windows. UMD module, works with node.js, commonjs, browser, AMD, electron, etc. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-windows -``` - -## Heads up! - -As of `v0.2.0` this module always returns a function. - -## Node.js usage - -```js -var isWindows = require('is-windows'); - -console.log(isWindows()); -//=> returns true if the platform is windows -``` - -## About - -<details> -<summary><strong>Contributing</strong></summary> - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -</details> - -<details> -<summary><strong>Running Tests</strong></summary> - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -</details> - -<details> -<summary><strong>Building docs</strong></summary> - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -</details> - -### Related projects - -You might also be interested in these projects: - -* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. Does not rely on the path module… [more](https://github.com/jonschlinkert/is-absolute) | [homepage](https://github.com/jonschlinkert/is-absolute "Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.") -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") -* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") -* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") -* [window-size](https://www.npmjs.com/package/window-size): Reliable way to get the height and width of terminal/console, since it's not calculated or… [more](https://github.com/jonschlinkert/window-size) | [homepage](https://github.com/jonschlinkert/window-size "Reliable way to get the height and width of terminal/console, since it's not calculated or updated the same way on all platforms, environments and node.js versions.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 11 | [jonschlinkert](https://github.com/jonschlinkert) | -| 4 | [doowb](https://github.com/doowb) | -| 1 | [SimenB](https://github.com/SimenB) | -| 1 | [gucong3000](https://github.com/gucong3000) | - -### Author - -**Jon Schlinkert** - -* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 14, 2018._ \ No newline at end of file diff --git a/node_modules/is-windows/index.js b/node_modules/is-windows/index.js deleted file mode 100644 index 55d43e09..00000000 --- a/node_modules/is-windows/index.js +++ /dev/null @@ -1,27 +0,0 @@ -/*! - * is-windows <https://github.com/jonschlinkert/is-windows> - * - * Copyright © 2015-2018, Jon Schlinkert. - * Released under the MIT License. - */ - -(function(factory) { - if (exports && typeof exports === 'object' && typeof module !== 'undefined') { - module.exports = factory(); - } else if (typeof define === 'function' && define.amd) { - define([], factory); - } else if (typeof window !== 'undefined') { - window.isWindows = factory(); - } else if (typeof global !== 'undefined') { - global.isWindows = factory(); - } else if (typeof self !== 'undefined') { - self.isWindows = factory(); - } else { - this.isWindows = factory(); - } -})(function() { - 'use strict'; - return function isWindows() { - return process && (process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE)); - }; -}); diff --git a/node_modules/is-windows/package.json b/node_modules/is-windows/package.json deleted file mode 100644 index c0791465..00000000 --- a/node_modules/is-windows/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "_from": "is-windows@^1.0.1", - "_id": "is-windows@1.0.2", - "_inBundle": false, - "_integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "_location": "/is-windows", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "is-windows@^1.0.1", - "name": "is-windows", - "escapedName": "is-windows", - "rawSpec": "^1.0.1", - "saveSpec": null, - "fetchSpec": "^1.0.1" - }, - "_requiredBy": [ - "/is-absolute" - ], - "_resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "_shasum": "d1850eb9791ecd18e6182ce12a30f396634bb19d", - "_spec": "is-windows@^1.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/is-absolute", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-windows/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Simen Bekkhus", - "url": "https://github.com/SimenB" - }, - { - "name": "刘祺", - "url": "gucong.co.cc" - } - ], - "deprecated": false, - "description": "Returns true if the platform is windows. UMD module, works with node.js, commonjs, browser, AMD, electron, etc.", - "devDependencies": { - "gulp-format-md": "^1.0.0", - "mocha": "^3.5.3" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/is-windows", - "keywords": [ - "check", - "cywin", - "is", - "is-windows", - "nix", - "operating system", - "os", - "platform", - "process", - "unix", - "win", - "win32", - "windows" - ], - "license": "MIT", - "main": "index.js", - "name": "is-windows", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-windows.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "is-absolute", - "is-glob", - "is-relative", - "isobject", - "window-size" - ] - }, - "lint": { - "reflinks": true - }, - "reflinks": [ - "verb" - ] - }, - "version": "1.0.2" -} diff --git a/node_modules/isarray/.npmignore b/node_modules/isarray/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/isarray/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/isarray/.travis.yml b/node_modules/isarray/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/isarray/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/isarray/Makefile b/node_modules/isarray/Makefile deleted file mode 100644 index 787d56e1..00000000 --- a/node_modules/isarray/Makefile +++ /dev/null @@ -1,6 +0,0 @@ - -test: - @node_modules/.bin/tape test.js - -.PHONY: test - diff --git a/node_modules/isarray/README.md b/node_modules/isarray/README.md deleted file mode 100644 index 16d2c59c..00000000 --- a/node_modules/isarray/README.md +++ /dev/null @@ -1,60 +0,0 @@ - -# isarray - -`Array#isArray` for older browsers. - -[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray) -[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray) - -[![browser support](https://ci.testling.com/juliangruber/isarray.png) -](https://ci.testling.com/juliangruber/isarray) - -## Usage - -```js -var isArray = require('isarray'); - -console.log(isArray([])); // => true -console.log(isArray({})); // => false -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isarray -``` - -Then bundle for the browser with -[browserify](https://github.com/substack/browserify). - -With [component](http://component.io) do - -```bash -$ component install juliangruber/isarray -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/isarray/component.json b/node_modules/isarray/component.json deleted file mode 100644 index 9e31b683..00000000 --- a/node_modules/isarray/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name" : "isarray", - "description" : "Array#isArray for older browsers", - "version" : "0.0.1", - "repository" : "juliangruber/isarray", - "homepage": "https://github.com/juliangruber/isarray", - "main" : "index.js", - "scripts" : [ - "index.js" - ], - "dependencies" : {}, - "keywords": ["browser","isarray","array"], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT" -} diff --git a/node_modules/isarray/index.js b/node_modules/isarray/index.js deleted file mode 100644 index a57f6349..00000000 --- a/node_modules/isarray/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; diff --git a/node_modules/isarray/package.json b/node_modules/isarray/package.json deleted file mode 100644 index 768fe3fa..00000000 --- a/node_modules/isarray/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_from": "isarray@~1.0.0", - "_id": "isarray@1.0.0", - "_inBundle": false, - "_integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "_location": "/isarray", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "isarray@~1.0.0", - "name": "isarray", - "escapedName": "isarray", - "rawSpec": "~1.0.0", - "saveSpec": null, - "fetchSpec": "~1.0.0" - }, - "_requiredBy": [ - "/cloneable-readable/readable-stream", - "/duplexify/readable-stream", - "/flush-write-stream/readable-stream", - "/glob-stream/readable-stream", - "/lazystream/readable-stream", - "/ordered-read-streams/readable-stream", - "/through2/readable-stream", - "/vinyl-fs/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "_shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "_spec": "isarray@~1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/cloneable-readable/node_modules/readable-stream", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Array#isArray for older browsers", - "devDependencies": { - "tape": "~2.13.4" - }, - "homepage": "https://github.com/juliangruber/isarray", - "keywords": [ - "browser", - "isarray", - "array" - ], - "license": "MIT", - "main": "index.js", - "name": "isarray", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "scripts": { - "test": "tape test.js" - }, - "testling": { - "files": "test.js", - "browsers": [ - "ie/8..latest", - "firefox/17..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.0.0" -} diff --git a/node_modules/isarray/test.js b/node_modules/isarray/test.js deleted file mode 100644 index e0c3444d..00000000 --- a/node_modules/isarray/test.js +++ /dev/null @@ -1,20 +0,0 @@ -var isArray = require('./'); -var test = require('tape'); - -test('is array', function(t){ - t.ok(isArray([])); - t.notOk(isArray({})); - t.notOk(isArray(null)); - t.notOk(isArray(false)); - - var obj = {}; - obj[0] = true; - t.notOk(isArray(obj)); - - var arr = []; - arr.foo = 'bar'; - t.ok(isArray(arr)); - - t.end(); -}); - diff --git a/node_modules/isomorphic-git/LICENSE.md b/node_modules/isomorphic-git/LICENSE.md deleted file mode 100644 index 5e8ff76b..00000000 --- a/node_modules/isomorphic-git/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2017-2018 the 'isomorphic-git' authors - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/isomorphic-git/README.md b/node_modules/isomorphic-git/README.md deleted file mode 100644 index ca5c5f84..00000000 --- a/node_modules/isomorphic-git/README.md +++ /dev/null @@ -1,378 +0,0 @@ -<p align="center"> - <img src="https://raw.githubusercontent.com/isomorphic-git/isomorphic-git/main/website/static/img/isomorphic-git-logo.svg?sanitize=true" alt="" height="150"/> -</p> - -# isomorphic-git - -`isomorphic-git` is a pure JavaScript reimplementation of git that works in both Node.js and browser JavaScript environments. It can read and write to git repositories, fetch from and push to git remotes (such as GitHub), all without any native C++ module dependencies. - -## Goals - -Isomorphic-git aims for 100% interoperability with the canonical git implementation. This means it does all its operations by modifying files in a ".git" directory just like the git you are used to. The included `isogit` CLI can operate on git repositories on your desktop or server. - -This library aims to be a complete solution with no assembly required. -The API has been designed with modern tools like Rollup and Webpack in mind. -By providing functionality as individual functions, code bundlers can produce smaller bundles by including only the functions your application uses. - -The project includes type definitions so you can enjoy static type-checking and intelligent code completion in editors like VS Code and [CodeSandbox](https://codesandbox.io). - -## Supported Environments - -The following environments are tested in CI and will continue to be supported until the next breaking version: - -<table width="100%"> -<tr> -<td align="center"><img src="https://raw.githubusercontent.com/isomorphic-git/isomorphic-git/main/website/static/img/browsers/node.webp" alt="" width="64" height="64"><br> Node 10</td> -<td align="center"><img src="https://raw.githubusercontent.com/alrra/browser-logos/bc47e4601d2c1fd46a7912f9aed5cdda4afdb301/src/chrome/chrome.svg?sanitize=true" alt="" width="64" height="64"><br> Chrome 79</td> -<td align="center"><img src="https://raw.githubusercontent.com/alrra/browser-logos/bc47e4601d2c1fd46a7912f9aed5cdda4afdb301/src/edge/edge.svg?sanitize=true" alt="" width="64" height="64"><br> Edge 79</td> -<td align="center"><img src="https://raw.githubusercontent.com/alrra/browser-logos/bc47e4601d2c1fd46a7912f9aed5cdda4afdb301/src/firefox/firefox.svg?sanitize=true" alt="" width="64" height="64"><br> Firefox 72</td> -<td align="center"><img src="https://raw.githubusercontent.com/alrra/browser-logos/bc47e4601d2c1fd46a7912f9aed5cdda4afdb301/src/safari/safari_64x64.png" alt="" width="64" height="64"><br> Safari 13</td> -<td align="center"><img src="https://upload.wikimedia.org/wikipedia/commons/8/82/Android_logo_2019.svg" alt="" width="64" height="64"><br> Android 10</td> -<td align="center"><img src="https://upload.wikimedia.org/wikipedia/commons/d/d6/IOS_13_logo.svg" alt="" width="64" height="64"><br> iOS 13</td> -</tr> -</table> - -## Upgrading from version 0.x to version 1.x? - -See the full [Release Notes](https://github.com/isomorphic-git/isomorphic-git/releases/tag/v1.0.0) on GitHub and the release [Blog Post](https://isomorphic-git.org/blog/2020/02/25/version-1-0-0). - -## Install - -You can install it from npm: - -``` -npm install --save isomorphic-git -``` - -## Getting Started - -The "isomorphic" in `isomorphic-git` means that the same code runs in either the server or the browser. -That's tricky to do since git uses the file system and makes HTTP requests. Browsers don't have an `fs` module. -And node and browsers have different APIs for making HTTP requests! - -So rather than relying on the `fs` and `http` modules, `isomorphic-git` lets you bring your own file system -and HTTP client. - -If you're using `isomorphic-git` in node, you use the native `fs` module and the provided node HTTP client. - -```js -// node.js example -const path = require('path') -const git = require('isomorphic-git') -const http = require('isomorphic-git/http/node') -const fs = require('fs') - -const dir = path.join(process.cwd(), 'test-clone') -git.clone({ fs, http, dir, url: 'https://github.com/isomorphic-git/lightning-fs' }).then(console.log) -``` - -If you're using `isomorphic-git` in the browser, you'll need something that emulates the `fs` API. -The easiest to setup and most performant library is [LightningFS](https://github.com/isomorphic-git/lightning-fs) which is written and maintained by the same author and is part of the `isomorphic-git` suite. -If LightningFS doesn't meet your requirements, isomorphic-git should also work with [BrowserFS](https://github.com/jvilk/BrowserFS) and [Filer](https://github.com/filerjs/filer). -Instead of `isomorphic-git/http/node` this time import `isomorphic-git/http/web`: - -```html -<script src="https://unpkg.com/@isomorphic-git/lightning-fs"></script> -<script src="https://unpkg.com/isomorphic-git"></script> -<script type="module"> -import http from 'https://unpkg.com/isomorphic-git@beta/http/web/index.js' -const fs = new LightningFS('fs') - -const dir = '/test-clone' -git.clone({ fs, http, dir, url: 'https://github.com/isomorphic-git/lightning-fs', corsProxy: 'https://cors.isomorphic-git.org' }).then(console.log) -</script> -``` - -If you're using ES module syntax, you can use either the default import for convenience, or named imports to benefit from tree-shaking if you are using a bundler: - -```js -import git from 'isomorphic-git' -// or -import * as git from 'isomorphic-git' -// or -import {plugins, clone, commit, push} from 'isomorphic-git' -``` - -View the full [Getting Started guide](https://isomorphic-git.github.io/docs/quickstart.html) on the docs website. - -Then check out the [Useful Snippets](https://isomorphic-git.org/docs/en/snippets) page, which includes even more sample code written by the community! - -### CORS support - -Unfortunately, due to the same-origin policy by default `isomorphic-git` can only clone from the same origin as the webpage it is running on. This is terribly inconvenient, as it means for all practical purposes cloning and pushing repos must be done through a proxy. - -For this purpose [@isomorphic-git/cors-proxy](https://github.com/isomorphic-git/cors-proxy) exists which you can clone or [`npm install`](https://www.npmjs.com/package/@isomorphic-git/cors-proxy). -For testing or small projects, you can also use [https://cors.isomorphic-git.org](https://cors.isomorphic-git.org) - a free proxy sponsored by [Clever Cloud](https://www.clever-cloud.com/?utm_source=ref&utm_medium=link&utm_campaign=isomorphic-git). - -I'm hoping to get CORS headers added to all the major Git hosting platforms eventually, and will list my progress here: - -| Service | Supports CORS requests | -| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Gogs (self-hosted) | [✔](https://isomorphic-git.github.io/blog/2018/04/07/gogs-adds-cors-headers-for-isomorphic-git.html) | -| Gitea (self-hosted) | [✔](https://github.com/go-gitea/gitea/pull/5719) | -| Azure DevOps | [✔](https://github.com/isomorphic-git/isomorphic-git/issues/678#issuecomment-452402740) (Usage Note: requires authentication) | -| Gitlab | ❌ My [PR](https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/219) was rejected, but the [issue](https://gitlab.com/gitlab-org/gitlab/issues/20590) is still open! | -| Bitbucket | ❌ | -| Github | ❌ | - -It is literally just two lines of code to add the CORS headers!! Easy stuff. Surely it will happen. - -### `isogit` CLI - -Isomorphic-git comes with a simple CLI tool, named `isogit` because `isomorphic-git` is a lot to type. It is really just a thin shell that translates command line arguments into the equivalent JS API commands. So you should be able to run *any* current or future isomorphic-git commands using the CLI. - -It always starts with an the assumption that the current working directory is a git root. -E.g. `{ dir: '.' }`. - -It uses `minimisted` to parse command line options and will print out the equivalent JS command and pretty-print the output JSON. - -The CLI is more of a lark for quickly testing `isomorphic-git` and isn't really meant as a `git` CLI replacement. - -## Supported Git commands - -This project follows semantic versioning, so I may continue to make changes to the API but they will always be backwards compatible -unless there is a major version bump. - -### commands - -<!-- API-LIST:START - Do not remove or modify this section --> -<!-- prettier-ignore-start --> -<!-- markdownlint-disable --> - -<!-- autogenerated_by: __tests__/__helpers__/generate-docs.js --> - -- [add](https://isomorphic-git.github.io/docs/add.html) -- [addNote](https://isomorphic-git.github.io/docs/addNote.html) -- [addRemote](https://isomorphic-git.github.io/docs/addRemote.html) -- [annotatedTag](https://isomorphic-git.github.io/docs/annotatedTag.html) -- [branch](https://isomorphic-git.github.io/docs/branch.html) -- [checkout](https://isomorphic-git.github.io/docs/checkout.html) -- [clone](https://isomorphic-git.github.io/docs/clone.html) -- [commit](https://isomorphic-git.github.io/docs/commit.html) -- [currentBranch](https://isomorphic-git.github.io/docs/currentBranch.html) -- [deleteBranch](https://isomorphic-git.github.io/docs/deleteBranch.html) -- [deleteRef](https://isomorphic-git.github.io/docs/deleteRef.html) -- [deleteRemote](https://isomorphic-git.github.io/docs/deleteRemote.html) -- [deleteTag](https://isomorphic-git.github.io/docs/deleteTag.html) -- [expandOid](https://isomorphic-git.github.io/docs/expandOid.html) -- [expandRef](https://isomorphic-git.github.io/docs/expandRef.html) -- [fastForward](https://isomorphic-git.github.io/docs/fastForward.html) -- [fetch](https://isomorphic-git.github.io/docs/fetch.html) -- [findMergeBase](https://isomorphic-git.github.io/docs/findMergeBase.html) -- [findRoot](https://isomorphic-git.github.io/docs/findRoot.html) -- [getConfig](https://isomorphic-git.github.io/docs/getConfig.html) -- [getConfigAll](https://isomorphic-git.github.io/docs/getConfigAll.html) -- [getRemoteInfo](https://isomorphic-git.github.io/docs/getRemoteInfo.html) -- [getRemoteInfo2](https://isomorphic-git.github.io/docs/getRemoteInfo2.html) -- [hashBlob](https://isomorphic-git.github.io/docs/hashBlob.html) -- [indexPack](https://isomorphic-git.github.io/docs/indexPack.html) -- [init](https://isomorphic-git.github.io/docs/init.html) -- [isDescendent](https://isomorphic-git.github.io/docs/isDescendent.html) -- [listBranches](https://isomorphic-git.github.io/docs/listBranches.html) -- [listFiles](https://isomorphic-git.github.io/docs/listFiles.html) -- [listNotes](https://isomorphic-git.github.io/docs/listNotes.html) -- [listRemotes](https://isomorphic-git.github.io/docs/listRemotes.html) -- [listServerRefs](https://isomorphic-git.github.io/docs/listServerRefs.html) -- [listTags](https://isomorphic-git.github.io/docs/listTags.html) -- [log](https://isomorphic-git.github.io/docs/log.html) -- [merge](https://isomorphic-git.github.io/docs/merge.html) -- [packObjects](https://isomorphic-git.github.io/docs/packObjects.html) -- [pull](https://isomorphic-git.github.io/docs/pull.html) -- [push](https://isomorphic-git.github.io/docs/push.html) -- [readBlob](https://isomorphic-git.github.io/docs/readBlob.html) -- [readCommit](https://isomorphic-git.github.io/docs/readCommit.html) -- [readNote](https://isomorphic-git.github.io/docs/readNote.html) -- [readObject](https://isomorphic-git.github.io/docs/readObject.html) -- [readTag](https://isomorphic-git.github.io/docs/readTag.html) -- [readTree](https://isomorphic-git.github.io/docs/readTree.html) -- [remove](https://isomorphic-git.github.io/docs/remove.html) -- [removeNote](https://isomorphic-git.github.io/docs/removeNote.html) -- [renameBranch](https://isomorphic-git.github.io/docs/renameBranch.html) -- [resetIndex](https://isomorphic-git.github.io/docs/resetIndex.html) -- [resolveRef](https://isomorphic-git.github.io/docs/resolveRef.html) -- [setConfig](https://isomorphic-git.github.io/docs/setConfig.html) -- [status](https://isomorphic-git.github.io/docs/status.html) -- [statusMatrix](https://isomorphic-git.github.io/docs/statusMatrix.html) -- [tag](https://isomorphic-git.github.io/docs/tag.html) -- [version](https://isomorphic-git.github.io/docs/version.html) -- [walk](https://isomorphic-git.github.io/docs/walk.html) -- [writeBlob](https://isomorphic-git.github.io/docs/writeBlob.html) -- [writeCommit](https://isomorphic-git.github.io/docs/writeCommit.html) -- [writeObject](https://isomorphic-git.github.io/docs/writeObject.html) -- [writeRef](https://isomorphic-git.github.io/docs/writeRef.html) -- [writeTag](https://isomorphic-git.github.io/docs/writeTag.html) -- [writeTree](https://isomorphic-git.github.io/docs/writeTree.html) - -<!-- markdownlint-enable --> -<!-- prettier-ignore-end --> -<!-- API-LIST:END --> - -## Community - -Share your questions and ideas with us! We love that. -You can find us in our [Gitter chatroom](https://gitter.im/isomorphic-git/Lobby) or just create an issue here on Github! -We are also [@IsomorphicGit](https://twitter.com/IsomorphicGit) on Twitter. - -## Contributing to `isomorphic-git` - -The development setup is similar to that of a large web application. -The main difference is the ridiculous amount of hacks involved in the tests. -We use Facebook's [Jest](https://jestjs.io) for testing, which make doing TDD fast and fun, -but we also used custom hacks so that the same -tests will also run in the browser using [Jasmine](https://jasmine.github.io/) via [Karma](https://karma-runner.github.io). -We even have our own [mock server](https://github.com/isomorphic-git/git-http-mock-server) for serving -git repository test fixtures! - -You'll need [node.js](https://nodejs.org) installed, but everything else is a devDependency. - -```sh -git clone https://github.com/isomorphic-git/isomorphic-git -cd isomorphic-git -npm install -npm test -``` - -Check out the [`CONTRIBUTING`](./CONTRIBUTING.md) document for more instructions. - -## Who is using isomorphic-git? - -- [nde](https://nde.now.sh) - a futuristic next-generation web IDE -- [git-app-manager](https://git-app-manager.now.sh/) - install "unhosted" websites locally by git cloning them -- [GIT Web Terminal](https://jcubic.github.io/git/) -- [Next Editor](https://next-editor.app/) -- [Clever Cloud](https://www.clever-cloud.com/?utm_source=ref&utm_medium=link&utm_campaign=isomorphic-git) -- [Stoplight Studio](https://stoplight.io/studio/?utm_source=ref&utm_medium=link&utm_campaign=isomorphic-git) - a modern editor for API design and technical writing - -## Similar projects - -- [js-git](https://github.com/creationix/js-git) -- [es-git](https://github.com/es-git/es-git) - -## Acknowledgments - -Isomorphic-git would not have been possible without the pioneering work by -@creationix and @chrisdickinson. Git is a tricky binary mess, and without -their examples (and their modules!) I would not have been able to come even -close to finishing this. They are geniuses ahead of their time. - -Cross-browser device testing is provided by: - -[![BrowserStack](https://user-images.githubusercontent.com/587740/39730261-9c65c4d8-522e-11e8-9f12-16b349377a35.png)](http://browserstack.com/) - -[![SauceLabs](https://saucelabs.com/content/images/logo.png)](https://saucelabs.com) - -## Contributors - -Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)): - -<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> -<!-- prettier-ignore-start --> -<!-- markdownlint-disable --> -<table> - <tr> - <td align="center"><a href="https://onename.com/wmhilton"><img src="https://avatars2.githubusercontent.com/u/587740?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>William Hilton</b></sub></a><br /><a href="#blog-wmhilton" title="Blogposts">📝</a> <a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Awmhilton" title="Bug reports">🐛</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=wmhilton" title="Code">💻</a> <a href="#design-wmhilton" title="Design">🎨</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=wmhilton" title="Documentation">📖</a> <a href="#example-wmhilton" title="Examples">💡</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=wmhilton" title="Tests">⚠️</a> <a href="#tutorial-wmhilton" title="Tutorials">✅</a></td> - <td align="center"><a href="https://github.com/wDhTIG"><img src="https://avatars2.githubusercontent.com/u/33748231?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>wDhTIG</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3AwDhTIG" title="Bug reports">🐛</a></td> - <td align="center"><a href="https://github.com/marbemac"><img src="https://avatars3.githubusercontent.com/u/847542?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Marc MacLeod</b></sub></a><br /><a href="#ideas-marbemac" title="Ideas, Planning, & Feedback">🤔</a> <a href="#fundingFinding-marbemac" title="Funding Finding">🔍</a></td> - <td align="center"><a href="http://brett-zamir.me"><img src="https://avatars3.githubusercontent.com/u/20234?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Brett Zamir</b></sub></a><br /><a href="#ideas-brettz9" title="Ideas, Planning, & Feedback">🤔</a></td> - <td align="center"><a href="http://mojavelinux.com"><img src="https://avatars2.githubusercontent.com/u/79351?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Dan Allen</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Amojavelinux" title="Bug reports">🐛</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=mojavelinux" title="Code">💻</a> <a href="#ideas-mojavelinux" title="Ideas, Planning, & Feedback">🤔</a></td> - <td align="center"><a href="https://TomasHubelbauer.net"><img src="https://avatars1.githubusercontent.com/u/6831144?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Tomáš Hübelbauer</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3ATomasHubelbauer" title="Bug reports">🐛</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=TomasHubelbauer" title="Code">💻</a></td> - <td align="center"><a href="https://github.com/juancampa"><img src="https://avatars2.githubusercontent.com/u/1410520?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Juan Campa</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Ajuancampa" title="Bug reports">🐛</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=juancampa" title="Code">💻</a></td> - </tr> - <tr> - <td align="center"><a href="http://iramiller.com"><img src="https://avatars2.githubusercontent.com/u/1041868?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Ira Miller</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Aisysd" title="Bug reports">🐛</a></td> - <td align="center"><a href="http://rhys.arkins.net"><img src="https://avatars1.githubusercontent.com/u/6311784?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Rhys Arkins</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=rarkins" title="Code">💻</a></td> - <td align="center"><a href="http://twitter.com/TheLarkInn"><img src="https://avatars1.githubusercontent.com/u/3408176?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Sean Larkin</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=TheLarkInn" title="Code">💻</a></td> - <td align="center"><a href="https://daniel-ruf.de"><img src="https://avatars1.githubusercontent.com/u/827205?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Daniel Ruf</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=DanielRuf" title="Code">💻</a></td> - <td align="center"><a href="http://blog.bokuweb.me/"><img src="https://avatars0.githubusercontent.com/u/10220449?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>bokuweb</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=bokuweb" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=bokuweb" title="Documentation">📖</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=bokuweb" title="Tests">⚠️</a></td> - <td align="center"><a href="https://github.com/hirokiosame"><img src="https://avatars0.githubusercontent.com/u/1075694?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Hiroki Osame</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=hirokiosame" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=hirokiosame" title="Documentation">📖</a></td> - <td align="center"><a href="http://jcubic.pl/me"><img src="https://avatars1.githubusercontent.com/u/280241?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Jakub Jankiewicz</b></sub></a><br /><a href="#question-jcubic" title="Answering Questions">💬</a> <a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Ajcubic" title="Bug reports">🐛</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=jcubic" title="Code">💻</a> <a href="#example-jcubic" title="Examples">💡</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=jcubic" title="Tests">⚠️</a></td> - </tr> - <tr> - <td align="center"><a href="https://github.com/howardgod"><img src="https://avatars1.githubusercontent.com/u/10459637?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>howardgod</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Ahowardgod" title="Bug reports">🐛</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=howardgod" title="Code">💻</a></td> - <td align="center"><a href="https://twitter.com/btyga"><img src="https://avatars3.githubusercontent.com/u/263378?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>burningTyger</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3AburningTyger" title="Bug reports">🐛</a></td> - <td align="center"><a href="https://melvincarvalho.com/#me"><img src="https://avatars2.githubusercontent.com/u/65864?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Melvin Carvalho</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=melvincarvalho" title="Documentation">📖</a></td> - <td align="center"><img src="https://avatars2.githubusercontent.com/u/3035266?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>akaJes</b></sub><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=akaJes" title="Code">💻</a></td> - <td align="center"><a href="http://twitter.com/dimasabanin"><img src="https://avatars2.githubusercontent.com/u/8316?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Dima Sabanin</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Adsabanin" title="Bug reports">🐛</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=dsabanin" title="Code">💻</a></td> - <td align="center"><a href="http://twitter.com/mizchi"><img src="https://avatars2.githubusercontent.com/u/73962?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Koutaro Chikuba</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Amizchi" title="Bug reports">🐛</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=mizchi" title="Code">💻</a></td> - <td align="center"><a href="https://www.hsablonniere.com/"><img src="https://avatars2.githubusercontent.com/u/236342?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Hubert SABLONNIÈRE</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=hsablonniere" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=hsablonniere" title="Tests">⚠️</a> <a href="#ideas-hsablonniere" title="Ideas, Planning, & Feedback">🤔</a> <a href="#fundingFinding-hsablonniere" title="Funding Finding">🔍</a></td> - </tr> - <tr> - <td align="center"><a href="https://github.com/DeltaEvo"><img src="https://avatars1.githubusercontent.com/u/8864716?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>David Duarte</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=DeltaEvo" title="Code">💻</a></td> - <td align="center"><a href="http://stoplight.io/"><img src="https://avatars2.githubusercontent.com/u/2294309?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Thomas Pytleski</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Apytlesk4" title="Bug reports">🐛</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=pytlesk4" title="Code">💻</a></td> - <td align="center"><a href="http://linkedin.com/in/vmarkovtsev"><img src="https://avatars3.githubusercontent.com/u/2793551?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Vadim Markovtsev</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Avmarkovtsev" title="Bug reports">🐛</a></td> - <td align="center"><a href="https://yuhr.org"><img src="https://avatars0.githubusercontent.com/u/18474125?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Yu Shimura</b></sub></a><br /><a href="#ideas-yuhr" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=yuhr" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=yuhr" title="Tests">⚠️</a></td> - <td align="center"><a href="https://github.com/pyramation"><img src="https://avatars1.githubusercontent.com/u/545047?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Dan Lynch</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=pyramation" title="Code">💻</a></td> - <td align="center"><a href="https://www.jeffreywescott.com/"><img src="https://avatars3.githubusercontent.com/u/130597?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Jeffrey Wescott</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Ajeffreywescott" title="Bug reports">🐛</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=jeffreywescott" title="Code">💻</a></td> - <td align="center"><a href="https://github.com/zebzhao"><img src="https://avatars2.githubusercontent.com/u/5515758?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>zebzhao</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=zebzhao" title="Code">💻</a></td> - </tr> - <tr> - <td align="center"><a href="https://github.com/tilersmyth"><img src="https://avatars2.githubusercontent.com/u/8736328?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Tyler Smith</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Atilersmyth" title="Bug reports">🐛</a></td> - <td align="center"><a href="https://github.com/beeman"><img src="https://avatars3.githubusercontent.com/u/36491?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Bram Borggreve</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Abeeman" title="Bug reports">🐛</a></td> - <td align="center"><a href="https://github.com/stefan-guggisberg"><img src="https://avatars1.githubusercontent.com/u/1543625?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Stefan Guggisberg</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Astefan-guggisberg" title="Bug reports">🐛</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=stefan-guggisberg" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=stefan-guggisberg" title="Tests">⚠️</a></td> - <td align="center"><a href="https://github.com/katakonst"><img src="https://avatars2.githubusercontent.com/u/6519792?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Catalin Pirvu</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=katakonst" title="Code">💻</a></td> - <td align="center"><a href="http://web.engr.oregonstate.edu/~nelsonni/"><img src="https://avatars1.githubusercontent.com/u/6432572?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Nicholas Nelson</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=nelsonni" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=nelsonni" title="Tests">⚠️</a></td> - <td align="center"><a href="https://twitter.com/addaleax"><img src="https://avatars2.githubusercontent.com/u/899444?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Anna Henningsen</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=addaleax" title="Code">💻</a></td> - <td align="center"><a href="https://hen.ne.ke"><img src="https://avatars0.githubusercontent.com/u/4312191?v=4&s=60?s=60" width="60px;" alt=""/><br /><sub><b>Fabian Henneke</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3AFabianHenneke" title="Bug reports">🐛</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=FabianHenneke" title="Code">💻</a></td> - </tr> - <tr> - <td align="center"><a href="https://github.com/djencks"><img src="https://avatars2.githubusercontent.com/u/569822?v=4?s=60" width="60px;" alt=""/><br /><sub><b>djencks</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Adjencks" title="Bug reports">🐛</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=djencks" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=djencks" title="Tests">⚠️</a></td> - <td align="center"><a href="https://justamouse.com"><img src="https://avatars0.githubusercontent.com/u/1086421?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Clemens Wolff</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=c-w" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=c-w" title="Documentation">📖</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=c-w" title="Tests">⚠️</a></td> - <td align="center"><a href="https://sojin.io"><img src="https://avatars1.githubusercontent.com/u/3102175?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Sojin Park</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=raon0211" title="Code">💻</a></td> - <td align="center"><a href="http://eaf4.com"><img src="https://avatars0.githubusercontent.com/u/319282?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Edward Faulkner</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=ef4" title="Code">💻</a></td> - <td align="center"><a href="https://github.com/KSXGitHub"><img src="https://avatars2.githubusercontent.com/u/11488886?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Khải</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3AKSXGitHub" title="Bug reports">🐛</a></td> - <td align="center"><a href="https://crutchcorn.dev/"><img src="https://avatars0.githubusercontent.com/u/9100169?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Corbin Crutchley</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=crutchcorn" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=crutchcorn" title="Documentation">📖</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=crutchcorn" title="Tests">⚠️</a></td> - <td align="center"><a href="https://onetwo.ren/"><img src="https://avatars1.githubusercontent.com/u/3746270?v=4?s=60" width="60px;" alt=""/><br /><sub><b>lin onetwo</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=linonetwo" title="Code">💻</a></td> - </tr> - <tr> - <td align="center"><a href="https://github.com/linfaxin"><img src="https://avatars2.githubusercontent.com/u/3705017?v=4?s=60" width="60px;" alt=""/><br /><sub><b>林法鑫</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Alinfaxin" title="Bug reports">🐛</a></td> - <td align="center"><a href="https://github.com/willstott101"><img src="https://avatars2.githubusercontent.com/u/335152?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Will Stott</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=willstott101" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=willstott101" title="Tests">⚠️</a></td> - <td align="center"><a href="http://mtnspring.org/"><img src="https://avatars2.githubusercontent.com/u/223277?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Seth Nickell</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Asnickell" title="Bug reports">🐛</a></td> - <td align="center"><a href="https://www.alextitarenko.me/"><img src="https://avatars0.githubusercontent.com/u/3290313?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Alex Titarenko</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=alex-titarenko" title="Code">💻</a></td> - <td align="center"><a href="https://github.com/mmkal"><img src="https://avatars2.githubusercontent.com/u/15040698?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Misha Kaletsky</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=mmkal" title="Code">💻</a></td> - <td align="center"><a href="https://github.com/rczulch"><img src="https://avatars1.githubusercontent.com/u/54646976?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Richard C. Zulch</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=rczulch" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=rczulch" title="Documentation">📖</a></td> - <td align="center"><a href="https://scrapbox.io/mkizka/README"><img src="https://avatars.githubusercontent.com/u/30231179?v=4?s=60" width="60px;" alt=""/><br /><sub><b>mkizka</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=mkizka" title="Code">💻</a></td> - <td align="center"><a href="https://ryotak.me/"><img src="https://avatars.githubusercontent.com/u/49341894?v=4?s=60" width="60px;" alt=""/><br /><sub><b>RyotaK</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3ARy0taK" title="Bug reports">🐛</a></td> - </tr> -</table> - -<!-- markdownlint-restore --> -<!-- prettier-ignore-end --> - -<!-- ALL-CONTRIBUTORS-LIST:END --> - -This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome! - -<!-- -### Contributors - -This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. -<a href="graphs/contributors"><img src="https://opencollective.com/isomorphic-git/contributors.svg?width=890&button=false" /></a> ---> - -### Backers - -Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/isomorphic-git#backer)] - -<a href="https://opencollective.com/isomorphic-git#backers" target="_blank"><img src="https://opencollective.com/isomorphic-git/backers.svg?width=890"></a> - - -### Sponsors - -Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/isomorphic-git#sponsor)] - -<a href="https://opencollective.com/isomorphic-git/sponsor/0/website" target="_blank"><img src="https://opencollective.com/isomorphic-git/sponsor/0/avatar.svg"></a> -<a href="https://opencollective.com/isomorphic-git/sponsor/1/website" target="_blank"><img src="https://opencollective.com/isomorphic-git/sponsor/1/avatar.svg"></a> -<a href="https://opencollective.com/isomorphic-git/sponsor/2/website" target="_blank"><img src="https://opencollective.com/isomorphic-git/sponsor/2/avatar.svg"></a> -<a href="https://opencollective.com/isomorphic-git/sponsor/3/website" target="_blank"><img src="https://opencollective.com/isomorphic-git/sponsor/3/avatar.svg"></a> -<a href="https://opencollective.com/isomorphic-git/sponsor/4/website" target="_blank"><img src="https://opencollective.com/isomorphic-git/sponsor/4/avatar.svg"></a> -<a href="https://opencollective.com/isomorphic-git/sponsor/5/website" target="_blank"><img src="https://opencollective.com/isomorphic-git/sponsor/5/avatar.svg"></a> -<a href="https://opencollective.com/isomorphic-git/sponsor/6/website" target="_blank"><img src="https://opencollective.com/isomorphic-git/sponsor/6/avatar.svg"></a> -<a href="https://opencollective.com/isomorphic-git/sponsor/7/website" target="_blank"><img src="https://opencollective.com/isomorphic-git/sponsor/7/avatar.svg"></a> -<a href="https://opencollective.com/isomorphic-git/sponsor/8/website" target="_blank"><img src="https://opencollective.com/isomorphic-git/sponsor/8/avatar.svg"></a> -<a href="https://opencollective.com/isomorphic-git/sponsor/9/website" target="_blank"><img src="https://opencollective.com/isomorphic-git/sponsor/9/avatar.svg"></a> - -## License - -This work is released under [The MIT License](https://opensource.org/licenses/MIT) - -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fisomorphic-git%2Fisomorphic-git.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fisomorphic-git%2Fisomorphic-git?ref=badge_large) diff --git a/node_modules/isomorphic-git/browser-tests.json b/node_modules/isomorphic-git/browser-tests.json deleted file mode 100644 index 940ec845..00000000 --- a/node_modules/isomorphic-git/browser-tests.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - "HeadlessChrome 0.0.0 (Linux 0.0.0)", - "Firefox 89.0.0 (Ubuntu 0.0.0)", - "Chrome Mobile 89.0.4389 (Android 0.0.0)", - "Chrome 79.0.3945 (Windows 10 0.0.0)", - "Safari 13.1.0 (Mac OS X 10.15.4)", - "Mobile Safari 13.0.0 (iOS 13.0.0)" -] \ No newline at end of file diff --git a/node_modules/isomorphic-git/cli.cjs b/node_modules/isomorphic-git/cli.cjs deleted file mode 100755 index fad1027f..00000000 --- a/node_modules/isomorphic-git/cli.cjs +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env node -const fs = require('fs') - -const minimisted = require('minimisted') - -const git = require('.') - -const http = require('./http/node') - -// This really isn't much of a CLI. It's mostly for testing. -// But it's very versatile and works surprisingly well. - -minimisted(async function({ _: [command, ...args], ...opts }) { - try { - const result = await git[command]( - Object.assign( - { - fs, - http, - dir: '.', - onAuth: () => ({ username: opts.username, password: opts.password }), - headers: { - 'User-Agent': `git/isogit-${git.version()}`, - }, - }, - opts - ) - ) - if (result === undefined) return - // detect streams - if (typeof result.on === 'function') { - result.pipe(process.stdout) - } else { - console.log(JSON.stringify(result, null, 2)) - } - } catch (err) { - process.stderr.write(err.message + '\n') - console.log(err) - process.exit(1) - } -}) diff --git a/node_modules/isomorphic-git/http/node/index.cjs b/node_modules/isomorphic-git/http/node/index.cjs deleted file mode 100644 index 563a73da..00000000 --- a/node_modules/isomorphic-git/http/node/index.cjs +++ /dev/null @@ -1,230 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var get = _interopDefault(require('simple-get')); - -/** - * @typedef {Object} GitProgressEvent - * @property {string} phase - * @property {number} loaded - * @property {number} total - */ - -/** - * @callback ProgressCallback - * @param {GitProgressEvent} progress - * @returns {void | Promise<void>} - */ - -/** - * @typedef {Object} GitHttpRequest - * @property {string} url - The URL to request - * @property {string} [method='GET'] - The HTTP method to use - * @property {Object<string, string>} [headers={}] - Headers to include in the HTTP request - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of POST requests - * @property {ProgressCallback} [onProgress] - Reserved for future use (emitting `GitProgressEvent`s) - * @property {object} [signal] - Reserved for future use (canceling a request) - */ - -/** - * @typedef {Object} GitHttpResponse - * @property {string} url - The final URL that was fetched after any redirects - * @property {string} [method] - The HTTP method that was used - * @property {Object<string, string>} [headers] - HTTP response headers - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of the response - * @property {number} statusCode - The HTTP status code - * @property {string} statusMessage - The HTTP status message - */ - -/** - * @callback HttpFetch - * @param {GitHttpRequest} request - * @returns {Promise<GitHttpResponse>} - */ - -/** - * @typedef {Object} HttpClient - * @property {HttpFetch} request - */ - -// Convert a value to an Async Iterator -// This will be easier with async generator functions. -function fromValue(value) { - let queue = [value]; - return { - next() { - return Promise.resolve({ done: queue.length === 0, value: queue.pop() }) - }, - return() { - queue = []; - return {} - }, - [Symbol.asyncIterator]() { - return this - }, - } -} - -function getIterator(iterable) { - if (iterable[Symbol.asyncIterator]) { - return iterable[Symbol.asyncIterator]() - } - if (iterable[Symbol.iterator]) { - return iterable[Symbol.iterator]() - } - if (iterable.next) { - return iterable - } - return fromValue(iterable) -} - -// Currently 'for await' upsets my linters. -async function forAwait(iterable, cb) { - const iter = getIterator(iterable); - while (true) { - const { value, done } = await iter.next(); - if (value) await cb(value); - if (done) break - } - if (iter.return) iter.return(); -} - -function asyncIteratorToStream(iter) { - const { PassThrough } = require('readable-stream'); - const stream = new PassThrough(); - setTimeout(async () => { - await forAwait(iter, chunk => stream.write(chunk)); - stream.end(); - }, 1); - return stream -} - -async function collect(iterable) { - let size = 0; - const buffers = []; - // This will be easier once `for await ... of` loops are available. - await forAwait(iterable, value => { - buffers.push(value); - size += value.byteLength; - }); - const result = new Uint8Array(size); - let nextIndex = 0; - for (const buffer of buffers) { - result.set(buffer, nextIndex); - nextIndex += buffer.byteLength; - } - return result -} - -// Convert a Node stream to an Async Iterator -function fromNodeStream(stream) { - // Use native async iteration if it's available. - const asyncIterator = Object.getOwnPropertyDescriptor( - stream, - Symbol.asyncIterator - ); - if (asyncIterator && asyncIterator.enumerable) { - return stream - } - // Author's Note - // I tried many MANY ways to do this. - // I tried two npm modules (stream-to-async-iterator and streams-to-async-iterator) with no luck. - // I tried using 'readable' and .read(), and .pause() and .resume() - // It took me two loooong evenings to get to this point. - // So if you are horrified that this solution just builds up a queue with no backpressure, - // and turns Promises inside out, too bad. This is the first code that worked reliably. - let ended = false; - const queue = []; - let defer = {}; - stream.on('data', chunk => { - queue.push(chunk); - if (defer.resolve) { - defer.resolve({ value: queue.shift(), done: false }); - defer = {}; - } - }); - stream.on('error', err => { - if (defer.reject) { - defer.reject(err); - defer = {}; - } - }); - stream.on('end', () => { - ended = true; - if (defer.resolve) { - defer.resolve({ done: true }); - defer = {}; - } - }); - return { - next() { - return new Promise((resolve, reject) => { - if (queue.length === 0 && ended) { - return resolve({ done: true }) - } else if (queue.length > 0) { - return resolve({ value: queue.shift(), done: false }) - } else if (queue.length === 0 && !ended) { - defer = { resolve, reject }; - } - }) - }, - return() { - stream.removeAllListeners(); - if (stream.destroy) stream.destroy(); - }, - [Symbol.asyncIterator]() { - return this - }, - } -} - -/** - * HttpClient - * - * @param {GitHttpRequest} request - * @returns {Promise<GitHttpResponse>} - */ -async function request({ - onProgress, - url, - method = 'GET', - headers = {}, - body, -}) { - // If we can, we should send it as a single buffer so it sets a Content-Length header. - if (body && Array.isArray(body)) { - body = Buffer.from(await collect(body)); - } else if (body) { - body = asyncIteratorToStream(body); - } - return new Promise((resolve, reject) => { - get( - { - url, - method, - headers, - body, - }, - (err, res) => { - if (err) return reject(err) - const iter = fromNodeStream(res); - resolve({ - url: res.url, - method: res.method, - statusCode: res.statusCode, - statusMessage: res.statusMessage, - body: iter, - headers: res.headers, - }); - } - ); - }) -} - -var index = { request }; - -exports.default = index; -exports.request = request; diff --git a/node_modules/isomorphic-git/http/node/index.d.ts b/node_modules/isomorphic-git/http/node/index.d.ts deleted file mode 100644 index 6100bb17..00000000 --- a/node_modules/isomorphic-git/http/node/index.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -export default index; -export type GitProgressEvent = { - phase: string; - loaded: number; - total: number; -}; -export type ProgressCallback = (progress: GitProgressEvent) => void | Promise<void>; -export type GitHttpRequest = { - /** - * - The URL to request - */ - url: string; - /** - * - The HTTP method to use - */ - method?: string; - /** - * - Headers to include in the HTTP request - */ - headers?: { - [x: string]: string; - }; - /** - * - An async iterator of Uint8Arrays that make up the body of POST requests - */ - body?: any; - /** - * - Reserved for future use (emitting `GitProgressEvent`s) - */ - onProgress?: ProgressCallback; - /** - * - Reserved for future use (canceling a request) - */ - signal?: any; -}; -export type GitHttpResponse = { - /** - * - The final URL that was fetched after any redirects - */ - url: string; - /** - * - The HTTP method that was used - */ - method?: string; - /** - * - HTTP response headers - */ - headers?: { - [x: string]: string; - }; - /** - * - An async iterator of Uint8Arrays that make up the body of the response - */ - body?: any; - /** - * - The HTTP status code - */ - statusCode: number; - /** - * - The HTTP status message - */ - statusMessage: string; -}; -export type HttpFetch = (request: GitHttpRequest) => Promise<GitHttpResponse>; -export type HttpClient = { - request: HttpFetch; -}; -declare namespace index { - export { request }; -} -/** - * HttpClient - * - * @param {GitHttpRequest} request - * @returns {Promise<GitHttpResponse>} - */ -export function request({ onProgress, url, method, headers, body, }: GitHttpRequest): Promise<GitHttpResponse>; diff --git a/node_modules/isomorphic-git/http/node/index.js b/node_modules/isomorphic-git/http/node/index.js deleted file mode 100644 index 55721f01..00000000 --- a/node_modules/isomorphic-git/http/node/index.js +++ /dev/null @@ -1,224 +0,0 @@ -import get from 'simple-get'; - -/** - * @typedef {Object} GitProgressEvent - * @property {string} phase - * @property {number} loaded - * @property {number} total - */ - -/** - * @callback ProgressCallback - * @param {GitProgressEvent} progress - * @returns {void | Promise<void>} - */ - -/** - * @typedef {Object} GitHttpRequest - * @property {string} url - The URL to request - * @property {string} [method='GET'] - The HTTP method to use - * @property {Object<string, string>} [headers={}] - Headers to include in the HTTP request - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of POST requests - * @property {ProgressCallback} [onProgress] - Reserved for future use (emitting `GitProgressEvent`s) - * @property {object} [signal] - Reserved for future use (canceling a request) - */ - -/** - * @typedef {Object} GitHttpResponse - * @property {string} url - The final URL that was fetched after any redirects - * @property {string} [method] - The HTTP method that was used - * @property {Object<string, string>} [headers] - HTTP response headers - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of the response - * @property {number} statusCode - The HTTP status code - * @property {string} statusMessage - The HTTP status message - */ - -/** - * @callback HttpFetch - * @param {GitHttpRequest} request - * @returns {Promise<GitHttpResponse>} - */ - -/** - * @typedef {Object} HttpClient - * @property {HttpFetch} request - */ - -// Convert a value to an Async Iterator -// This will be easier with async generator functions. -function fromValue(value) { - let queue = [value]; - return { - next() { - return Promise.resolve({ done: queue.length === 0, value: queue.pop() }) - }, - return() { - queue = []; - return {} - }, - [Symbol.asyncIterator]() { - return this - }, - } -} - -function getIterator(iterable) { - if (iterable[Symbol.asyncIterator]) { - return iterable[Symbol.asyncIterator]() - } - if (iterable[Symbol.iterator]) { - return iterable[Symbol.iterator]() - } - if (iterable.next) { - return iterable - } - return fromValue(iterable) -} - -// Currently 'for await' upsets my linters. -async function forAwait(iterable, cb) { - const iter = getIterator(iterable); - while (true) { - const { value, done } = await iter.next(); - if (value) await cb(value); - if (done) break - } - if (iter.return) iter.return(); -} - -function asyncIteratorToStream(iter) { - const { PassThrough } = require('readable-stream'); - const stream = new PassThrough(); - setTimeout(async () => { - await forAwait(iter, chunk => stream.write(chunk)); - stream.end(); - }, 1); - return stream -} - -async function collect(iterable) { - let size = 0; - const buffers = []; - // This will be easier once `for await ... of` loops are available. - await forAwait(iterable, value => { - buffers.push(value); - size += value.byteLength; - }); - const result = new Uint8Array(size); - let nextIndex = 0; - for (const buffer of buffers) { - result.set(buffer, nextIndex); - nextIndex += buffer.byteLength; - } - return result -} - -// Convert a Node stream to an Async Iterator -function fromNodeStream(stream) { - // Use native async iteration if it's available. - const asyncIterator = Object.getOwnPropertyDescriptor( - stream, - Symbol.asyncIterator - ); - if (asyncIterator && asyncIterator.enumerable) { - return stream - } - // Author's Note - // I tried many MANY ways to do this. - // I tried two npm modules (stream-to-async-iterator and streams-to-async-iterator) with no luck. - // I tried using 'readable' and .read(), and .pause() and .resume() - // It took me two loooong evenings to get to this point. - // So if you are horrified that this solution just builds up a queue with no backpressure, - // and turns Promises inside out, too bad. This is the first code that worked reliably. - let ended = false; - const queue = []; - let defer = {}; - stream.on('data', chunk => { - queue.push(chunk); - if (defer.resolve) { - defer.resolve({ value: queue.shift(), done: false }); - defer = {}; - } - }); - stream.on('error', err => { - if (defer.reject) { - defer.reject(err); - defer = {}; - } - }); - stream.on('end', () => { - ended = true; - if (defer.resolve) { - defer.resolve({ done: true }); - defer = {}; - } - }); - return { - next() { - return new Promise((resolve, reject) => { - if (queue.length === 0 && ended) { - return resolve({ done: true }) - } else if (queue.length > 0) { - return resolve({ value: queue.shift(), done: false }) - } else if (queue.length === 0 && !ended) { - defer = { resolve, reject }; - } - }) - }, - return() { - stream.removeAllListeners(); - if (stream.destroy) stream.destroy(); - }, - [Symbol.asyncIterator]() { - return this - }, - } -} - -/** - * HttpClient - * - * @param {GitHttpRequest} request - * @returns {Promise<GitHttpResponse>} - */ -async function request({ - onProgress, - url, - method = 'GET', - headers = {}, - body, -}) { - // If we can, we should send it as a single buffer so it sets a Content-Length header. - if (body && Array.isArray(body)) { - body = Buffer.from(await collect(body)); - } else if (body) { - body = asyncIteratorToStream(body); - } - return new Promise((resolve, reject) => { - get( - { - url, - method, - headers, - body, - }, - (err, res) => { - if (err) return reject(err) - const iter = fromNodeStream(res); - resolve({ - url: res.url, - method: res.method, - statusCode: res.statusCode, - statusMessage: res.statusMessage, - body: iter, - headers: res.headers, - }); - } - ); - }) -} - -var index = { request }; - -export default index; -export { request }; diff --git a/node_modules/isomorphic-git/http/node/package.json b/node_modules/isomorphic-git/http/node/package.json deleted file mode 100644 index 71d7fbed..00000000 --- a/node_modules/isomorphic-git/http/node/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type": "module", - "main": "index.cjs", - "module": "index.js", - "typings": "index.d.ts" -} \ No newline at end of file diff --git a/node_modules/isomorphic-git/http/web/index.cjs b/node_modules/isomorphic-git/http/web/index.cjs deleted file mode 100644 index e6f87496..00000000 --- a/node_modules/isomorphic-git/http/web/index.cjs +++ /dev/null @@ -1,170 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -/** - * @typedef {Object} GitProgressEvent - * @property {string} phase - * @property {number} loaded - * @property {number} total - */ - -/** - * @callback ProgressCallback - * @param {GitProgressEvent} progress - * @returns {void | Promise<void>} - */ - -/** - * @typedef {Object} GitHttpRequest - * @property {string} url - The URL to request - * @property {string} [method='GET'] - The HTTP method to use - * @property {Object<string, string>} [headers={}] - Headers to include in the HTTP request - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of POST requests - * @property {ProgressCallback} [onProgress] - Reserved for future use (emitting `GitProgressEvent`s) - * @property {object} [signal] - Reserved for future use (canceling a request) - */ - -/** - * @typedef {Object} GitHttpResponse - * @property {string} url - The final URL that was fetched after any redirects - * @property {string} [method] - The HTTP method that was used - * @property {Object<string, string>} [headers] - HTTP response headers - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of the response - * @property {number} statusCode - The HTTP status code - * @property {string} statusMessage - The HTTP status message - */ - -/** - * @callback HttpFetch - * @param {GitHttpRequest} request - * @returns {Promise<GitHttpResponse>} - */ - -/** - * @typedef {Object} HttpClient - * @property {HttpFetch} request - */ - -// Convert a value to an Async Iterator -// This will be easier with async generator functions. -function fromValue(value) { - let queue = [value]; - return { - next() { - return Promise.resolve({ done: queue.length === 0, value: queue.pop() }) - }, - return() { - queue = []; - return {} - }, - [Symbol.asyncIterator]() { - return this - }, - } -} - -function getIterator(iterable) { - if (iterable[Symbol.asyncIterator]) { - return iterable[Symbol.asyncIterator]() - } - if (iterable[Symbol.iterator]) { - return iterable[Symbol.iterator]() - } - if (iterable.next) { - return iterable - } - return fromValue(iterable) -} - -// Currently 'for await' upsets my linters. -async function forAwait(iterable, cb) { - const iter = getIterator(iterable); - while (true) { - const { value, done } = await iter.next(); - if (value) await cb(value); - if (done) break - } - if (iter.return) iter.return(); -} - -async function collect(iterable) { - let size = 0; - const buffers = []; - // This will be easier once `for await ... of` loops are available. - await forAwait(iterable, value => { - buffers.push(value); - size += value.byteLength; - }); - const result = new Uint8Array(size); - let nextIndex = 0; - for (const buffer of buffers) { - result.set(buffer, nextIndex); - nextIndex += buffer.byteLength; - } - return result -} - -// Convert a web ReadableStream (not Node stream!) to an Async Iterator -// adapted from https://jakearchibald.com/2017/async-iterators-and-generators/ -function fromStream(stream) { - // Use native async iteration if it's available. - if (stream[Symbol.asyncIterator]) return stream - const reader = stream.getReader(); - return { - next() { - return reader.read() - }, - return() { - reader.releaseLock(); - return {} - }, - [Symbol.asyncIterator]() { - return this - }, - } -} - -/* eslint-env browser */ - -/** - * HttpClient - * - * @param {GitHttpRequest} request - * @returns {Promise<GitHttpResponse>} - */ -async function request({ - onProgress, - url, - method = 'GET', - headers = {}, - body, -}) { - // streaming uploads aren't possible yet in the browser - if (body) { - body = await collect(body); - } - const res = await fetch(url, { method, headers, body }); - const iter = - res.body && res.body.getReader - ? fromStream(res.body) - : [new Uint8Array(await res.arrayBuffer())]; - // convert Header object to ordinary JSON - headers = {}; - for (const [key, value] of res.headers.entries()) { - headers[key] = value; - } - return { - url: res.url, - method: res.method, - statusCode: res.status, - statusMessage: res.statusText, - body: iter, - headers: headers, - } -} - -var index = { request }; - -exports.default = index; -exports.request = request; diff --git a/node_modules/isomorphic-git/http/web/index.d.ts b/node_modules/isomorphic-git/http/web/index.d.ts deleted file mode 100644 index 6100bb17..00000000 --- a/node_modules/isomorphic-git/http/web/index.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -export default index; -export type GitProgressEvent = { - phase: string; - loaded: number; - total: number; -}; -export type ProgressCallback = (progress: GitProgressEvent) => void | Promise<void>; -export type GitHttpRequest = { - /** - * - The URL to request - */ - url: string; - /** - * - The HTTP method to use - */ - method?: string; - /** - * - Headers to include in the HTTP request - */ - headers?: { - [x: string]: string; - }; - /** - * - An async iterator of Uint8Arrays that make up the body of POST requests - */ - body?: any; - /** - * - Reserved for future use (emitting `GitProgressEvent`s) - */ - onProgress?: ProgressCallback; - /** - * - Reserved for future use (canceling a request) - */ - signal?: any; -}; -export type GitHttpResponse = { - /** - * - The final URL that was fetched after any redirects - */ - url: string; - /** - * - The HTTP method that was used - */ - method?: string; - /** - * - HTTP response headers - */ - headers?: { - [x: string]: string; - }; - /** - * - An async iterator of Uint8Arrays that make up the body of the response - */ - body?: any; - /** - * - The HTTP status code - */ - statusCode: number; - /** - * - The HTTP status message - */ - statusMessage: string; -}; -export type HttpFetch = (request: GitHttpRequest) => Promise<GitHttpResponse>; -export type HttpClient = { - request: HttpFetch; -}; -declare namespace index { - export { request }; -} -/** - * HttpClient - * - * @param {GitHttpRequest} request - * @returns {Promise<GitHttpResponse>} - */ -export function request({ onProgress, url, method, headers, body, }: GitHttpRequest): Promise<GitHttpResponse>; diff --git a/node_modules/isomorphic-git/http/web/index.js b/node_modules/isomorphic-git/http/web/index.js deleted file mode 100644 index ee134c2b..00000000 --- a/node_modules/isomorphic-git/http/web/index.js +++ /dev/null @@ -1,166 +0,0 @@ -/** - * @typedef {Object} GitProgressEvent - * @property {string} phase - * @property {number} loaded - * @property {number} total - */ - -/** - * @callback ProgressCallback - * @param {GitProgressEvent} progress - * @returns {void | Promise<void>} - */ - -/** - * @typedef {Object} GitHttpRequest - * @property {string} url - The URL to request - * @property {string} [method='GET'] - The HTTP method to use - * @property {Object<string, string>} [headers={}] - Headers to include in the HTTP request - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of POST requests - * @property {ProgressCallback} [onProgress] - Reserved for future use (emitting `GitProgressEvent`s) - * @property {object} [signal] - Reserved for future use (canceling a request) - */ - -/** - * @typedef {Object} GitHttpResponse - * @property {string} url - The final URL that was fetched after any redirects - * @property {string} [method] - The HTTP method that was used - * @property {Object<string, string>} [headers] - HTTP response headers - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of the response - * @property {number} statusCode - The HTTP status code - * @property {string} statusMessage - The HTTP status message - */ - -/** - * @callback HttpFetch - * @param {GitHttpRequest} request - * @returns {Promise<GitHttpResponse>} - */ - -/** - * @typedef {Object} HttpClient - * @property {HttpFetch} request - */ - -// Convert a value to an Async Iterator -// This will be easier with async generator functions. -function fromValue(value) { - let queue = [value]; - return { - next() { - return Promise.resolve({ done: queue.length === 0, value: queue.pop() }) - }, - return() { - queue = []; - return {} - }, - [Symbol.asyncIterator]() { - return this - }, - } -} - -function getIterator(iterable) { - if (iterable[Symbol.asyncIterator]) { - return iterable[Symbol.asyncIterator]() - } - if (iterable[Symbol.iterator]) { - return iterable[Symbol.iterator]() - } - if (iterable.next) { - return iterable - } - return fromValue(iterable) -} - -// Currently 'for await' upsets my linters. -async function forAwait(iterable, cb) { - const iter = getIterator(iterable); - while (true) { - const { value, done } = await iter.next(); - if (value) await cb(value); - if (done) break - } - if (iter.return) iter.return(); -} - -async function collect(iterable) { - let size = 0; - const buffers = []; - // This will be easier once `for await ... of` loops are available. - await forAwait(iterable, value => { - buffers.push(value); - size += value.byteLength; - }); - const result = new Uint8Array(size); - let nextIndex = 0; - for (const buffer of buffers) { - result.set(buffer, nextIndex); - nextIndex += buffer.byteLength; - } - return result -} - -// Convert a web ReadableStream (not Node stream!) to an Async Iterator -// adapted from https://jakearchibald.com/2017/async-iterators-and-generators/ -function fromStream(stream) { - // Use native async iteration if it's available. - if (stream[Symbol.asyncIterator]) return stream - const reader = stream.getReader(); - return { - next() { - return reader.read() - }, - return() { - reader.releaseLock(); - return {} - }, - [Symbol.asyncIterator]() { - return this - }, - } -} - -/* eslint-env browser */ - -/** - * HttpClient - * - * @param {GitHttpRequest} request - * @returns {Promise<GitHttpResponse>} - */ -async function request({ - onProgress, - url, - method = 'GET', - headers = {}, - body, -}) { - // streaming uploads aren't possible yet in the browser - if (body) { - body = await collect(body); - } - const res = await fetch(url, { method, headers, body }); - const iter = - res.body && res.body.getReader - ? fromStream(res.body) - : [new Uint8Array(await res.arrayBuffer())]; - // convert Header object to ordinary JSON - headers = {}; - for (const [key, value] of res.headers.entries()) { - headers[key] = value; - } - return { - url: res.url, - method: res.method, - statusCode: res.status, - statusMessage: res.statusText, - body: iter, - headers: headers, - } -} - -var index = { request }; - -export default index; -export { request }; diff --git a/node_modules/isomorphic-git/http/web/index.umd.js b/node_modules/isomorphic-git/http/web/index.umd.js deleted file mode 100644 index 82e372ca..00000000 --- a/node_modules/isomorphic-git/http/web/index.umd.js +++ /dev/null @@ -1,176 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = global || self, factory(global.GitHttp = {})); -}(this, (function (exports) { 'use strict'; - - /** - * @typedef {Object} GitProgressEvent - * @property {string} phase - * @property {number} loaded - * @property {number} total - */ - - /** - * @callback ProgressCallback - * @param {GitProgressEvent} progress - * @returns {void | Promise<void>} - */ - - /** - * @typedef {Object} GitHttpRequest - * @property {string} url - The URL to request - * @property {string} [method='GET'] - The HTTP method to use - * @property {Object<string, string>} [headers={}] - Headers to include in the HTTP request - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of POST requests - * @property {ProgressCallback} [onProgress] - Reserved for future use (emitting `GitProgressEvent`s) - * @property {object} [signal] - Reserved for future use (canceling a request) - */ - - /** - * @typedef {Object} GitHttpResponse - * @property {string} url - The final URL that was fetched after any redirects - * @property {string} [method] - The HTTP method that was used - * @property {Object<string, string>} [headers] - HTTP response headers - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of the response - * @property {number} statusCode - The HTTP status code - * @property {string} statusMessage - The HTTP status message - */ - - /** - * @callback HttpFetch - * @param {GitHttpRequest} request - * @returns {Promise<GitHttpResponse>} - */ - - /** - * @typedef {Object} HttpClient - * @property {HttpFetch} request - */ - - // Convert a value to an Async Iterator - // This will be easier with async generator functions. - function fromValue(value) { - let queue = [value]; - return { - next() { - return Promise.resolve({ done: queue.length === 0, value: queue.pop() }) - }, - return() { - queue = []; - return {} - }, - [Symbol.asyncIterator]() { - return this - }, - } - } - - function getIterator(iterable) { - if (iterable[Symbol.asyncIterator]) { - return iterable[Symbol.asyncIterator]() - } - if (iterable[Symbol.iterator]) { - return iterable[Symbol.iterator]() - } - if (iterable.next) { - return iterable - } - return fromValue(iterable) - } - - // Currently 'for await' upsets my linters. - async function forAwait(iterable, cb) { - const iter = getIterator(iterable); - while (true) { - const { value, done } = await iter.next(); - if (value) await cb(value); - if (done) break - } - if (iter.return) iter.return(); - } - - async function collect(iterable) { - let size = 0; - const buffers = []; - // This will be easier once `for await ... of` loops are available. - await forAwait(iterable, value => { - buffers.push(value); - size += value.byteLength; - }); - const result = new Uint8Array(size); - let nextIndex = 0; - for (const buffer of buffers) { - result.set(buffer, nextIndex); - nextIndex += buffer.byteLength; - } - return result - } - - // Convert a web ReadableStream (not Node stream!) to an Async Iterator - // adapted from https://jakearchibald.com/2017/async-iterators-and-generators/ - function fromStream(stream) { - // Use native async iteration if it's available. - if (stream[Symbol.asyncIterator]) return stream - const reader = stream.getReader(); - return { - next() { - return reader.read() - }, - return() { - reader.releaseLock(); - return {} - }, - [Symbol.asyncIterator]() { - return this - }, - } - } - - /* eslint-env browser */ - - /** - * HttpClient - * - * @param {GitHttpRequest} request - * @returns {Promise<GitHttpResponse>} - */ - async function request({ - onProgress, - url, - method = 'GET', - headers = {}, - body, - }) { - // streaming uploads aren't possible yet in the browser - if (body) { - body = await collect(body); - } - const res = await fetch(url, { method, headers, body }); - const iter = - res.body && res.body.getReader - ? fromStream(res.body) - : [new Uint8Array(await res.arrayBuffer())]; - // convert Header object to ordinary JSON - headers = {}; - for (const [key, value] of res.headers.entries()) { - headers[key] = value; - } - return { - url: res.url, - method: res.method, - statusCode: res.status, - statusMessage: res.statusText, - body: iter, - headers: headers, - } - } - - var index = { request }; - - exports.default = index; - exports.request = request; - - Object.defineProperty(exports, '__esModule', { value: true }); - -}))); diff --git a/node_modules/isomorphic-git/http/web/package.json b/node_modules/isomorphic-git/http/web/package.json deleted file mode 100644 index e9df68f4..00000000 --- a/node_modules/isomorphic-git/http/web/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "module", - "main": "index.cjs", - "module": "index.js", - "typings": "index.d.ts", - "unpkg": "index.umd.js" -} \ No newline at end of file diff --git a/node_modules/isomorphic-git/index.cjs b/node_modules/isomorphic-git/index.cjs deleted file mode 100644 index a2af02e3..00000000 --- a/node_modules/isomorphic-git/index.cjs +++ /dev/null @@ -1,13991 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var AsyncLock = _interopDefault(require('async-lock')); -var Hash = _interopDefault(require('sha.js/sha1.js')); -var crc32 = _interopDefault(require('crc-32')); -var pako = _interopDefault(require('pako')); -var ignore = _interopDefault(require('ignore')); -var pify = _interopDefault(require('pify')); -var cleanGitRef = _interopDefault(require('clean-git-ref')); -var diff3Merge = _interopDefault(require('diff3')); - -/** - * @typedef {Object} GitProgressEvent - * @property {string} phase - * @property {number} loaded - * @property {number} total - */ - -/** - * @callback ProgressCallback - * @param {GitProgressEvent} progress - * @returns {void | Promise<void>} - */ - -/** - * @typedef {Object} GitHttpRequest - * @property {string} url - The URL to request - * @property {string} [method='GET'] - The HTTP method to use - * @property {Object<string, string>} [headers={}] - Headers to include in the HTTP request - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of POST requests - * @property {ProgressCallback} [onProgress] - Reserved for future use (emitting `GitProgressEvent`s) - * @property {object} [signal] - Reserved for future use (canceling a request) - */ - -/** - * @typedef {Object} GitHttpResponse - * @property {string} url - The final URL that was fetched after any redirects - * @property {string} [method] - The HTTP method that was used - * @property {Object<string, string>} [headers] - HTTP response headers - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of the response - * @property {number} statusCode - The HTTP status code - * @property {string} statusMessage - The HTTP status message - */ - -/** - * @callback HttpFetch - * @param {GitHttpRequest} request - * @returns {Promise<GitHttpResponse>} - */ - -/** - * @typedef {Object} HttpClient - * @property {HttpFetch} request - */ - -/** - * A git commit object. - * - * @typedef {Object} CommitObject - * @property {string} message Commit message - * @property {string} tree SHA-1 object id of corresponding file tree - * @property {string[]} parent an array of zero or more SHA-1 object ids - * @property {Object} author - * @property {string} author.name The author's name - * @property {string} author.email The author's email - * @property {number} author.timestamp UTC Unix timestamp in seconds - * @property {number} author.timezoneOffset Timezone difference from UTC in minutes - * @property {Object} committer - * @property {string} committer.name The committer's name - * @property {string} committer.email The committer's email - * @property {number} committer.timestamp UTC Unix timestamp in seconds - * @property {number} committer.timezoneOffset Timezone difference from UTC in minutes - * @property {string} [gpgsig] PGP signature (if present) - */ - -/** - * An entry from a git tree object. Files are called 'blobs' and directories are called 'trees'. - * - * @typedef {Object} TreeEntry - * @property {string} mode the 6 digit hexadecimal mode - * @property {string} path the name of the file or directory - * @property {string} oid the SHA-1 object id of the blob or tree - * @property {'commit'|'blob'|'tree'} type the type of object - */ - -/** - * A git tree object. Trees represent a directory snapshot. - * - * @typedef {TreeEntry[]} TreeObject - */ - -/** - * A git annotated tag object. - * - * @typedef {Object} TagObject - * @property {string} object SHA-1 object id of object being tagged - * @property {'blob' | 'tree' | 'commit' | 'tag'} type the type of the object being tagged - * @property {string} tag the tag name - * @property {Object} tagger - * @property {string} tagger.name the tagger's name - * @property {string} tagger.email the tagger's email - * @property {number} tagger.timestamp UTC Unix timestamp in seconds - * @property {number} tagger.timezoneOffset timezone difference from UTC in minutes - * @property {string} message tag message - * @property {string} [gpgsig] PGP signature (if present) - */ - -/** - * @typedef {Object} ReadCommitResult - * @property {string} oid - SHA-1 object id of this commit - * @property {CommitObject} commit - the parsed commit object - * @property {string} payload - PGP signing payload - */ - -/** - * @typedef {Object} ServerRef - This object has the following schema: - * @property {string} ref - The name of the ref - * @property {string} oid - The SHA-1 object id the ref points to - * @property {string} [target] - The target ref pointed to by a symbolic ref - * @property {string} [peeled] - If the oid is the SHA-1 object id of an annotated tag, this is the SHA-1 object id that the annotated tag points to - */ - -/** - * @typedef Walker - * @property {Symbol} Symbol('GitWalkerSymbol') - */ - -/** - * Normalized subset of filesystem `stat` data: - * - * @typedef {Object} Stat - * @property {number} ctimeSeconds - * @property {number} ctimeNanoseconds - * @property {number} mtimeSeconds - * @property {number} mtimeNanoseconds - * @property {number} dev - * @property {number} ino - * @property {number} mode - * @property {number} uid - * @property {number} gid - * @property {number} size - */ - -/** - * The `WalkerEntry` is an interface that abstracts computing many common tree / blob stats. - * - * @typedef {Object} WalkerEntry - * @property {function(): Promise<'tree'|'blob'|'special'|'commit'>} type - * @property {function(): Promise<number>} mode - * @property {function(): Promise<string>} oid - * @property {function(): Promise<Uint8Array|void>} content - * @property {function(): Promise<Stat>} stat - */ - -/** - * @typedef {Object} CallbackFsClient - * @property {function} readFile - https://nodejs.org/api/fs.html#fs_fs_readfile_path_options_callback - * @property {function} writeFile - https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback - * @property {function} unlink - https://nodejs.org/api/fs.html#fs_fs_unlink_path_callback - * @property {function} readdir - https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback - * @property {function} mkdir - https://nodejs.org/api/fs.html#fs_fs_mkdir_path_mode_callback - * @property {function} rmdir - https://nodejs.org/api/fs.html#fs_fs_rmdir_path_callback - * @property {function} stat - https://nodejs.org/api/fs.html#fs_fs_stat_path_options_callback - * @property {function} lstat - https://nodejs.org/api/fs.html#fs_fs_lstat_path_options_callback - * @property {function} [readlink] - https://nodejs.org/api/fs.html#fs_fs_readlink_path_options_callback - * @property {function} [symlink] - https://nodejs.org/api/fs.html#fs_fs_symlink_target_path_type_callback - * @property {function} [chmod] - https://nodejs.org/api/fs.html#fs_fs_chmod_path_mode_callback - */ - -/** - * @typedef {Object} PromiseFsClient - * @property {Object} promises - * @property {function} promises.readFile - https://nodejs.org/api/fs.html#fs_fspromises_readfile_path_options - * @property {function} promises.writeFile - https://nodejs.org/api/fs.html#fs_fspromises_writefile_file_data_options - * @property {function} promises.unlink - https://nodejs.org/api/fs.html#fs_fspromises_unlink_path - * @property {function} promises.readdir - https://nodejs.org/api/fs.html#fs_fspromises_readdir_path_options - * @property {function} promises.mkdir - https://nodejs.org/api/fs.html#fs_fspromises_mkdir_path_options - * @property {function} promises.rmdir - https://nodejs.org/api/fs.html#fs_fspromises_rmdir_path - * @property {function} promises.stat - https://nodejs.org/api/fs.html#fs_fspromises_stat_path_options - * @property {function} promises.lstat - https://nodejs.org/api/fs.html#fs_fspromises_lstat_path_options - * @property {function} [promises.readlink] - https://nodejs.org/api/fs.html#fs_fspromises_readlink_path_options - * @property {function} [promises.symlink] - https://nodejs.org/api/fs.html#fs_fspromises_symlink_target_path_type - * @property {function} [promises.chmod] - https://nodejs.org/api/fs.html#fs_fspromises_chmod_path_mode - */ - -/** - * @typedef {CallbackFsClient | PromiseFsClient} FsClient - */ - -/** - * @callback MessageCallback - * @param {string} message - * @returns {void | Promise<void>} - */ - -/** - * @typedef {Object} GitAuth - * @property {string} [username] - * @property {string} [password] - * @property {Object<string, string>} [headers] - * @property {boolean} [cancel] Tells git to throw a `UserCanceledError` (instead of an `HttpError`). - */ - -/** - * @callback AuthCallback - * @param {string} url - * @param {GitAuth} auth Might have some values if the URL itself originally contained a username or password. - * @returns {GitAuth | void | Promise<GitAuth | void>} - */ - -/** - * @callback AuthFailureCallback - * @param {string} url - * @param {GitAuth} auth The credentials that failed - * @returns {GitAuth | void | Promise<GitAuth | void>} - */ - -/** - * @callback AuthSuccessCallback - * @param {string} url - * @param {GitAuth} auth - * @returns {void | Promise<void>} - */ - -/** - * @typedef {Object} SignParams - * @property {string} payload - a plaintext message - * @property {string} secretKey - an 'ASCII armor' encoded PGP key (technically can actually contain _multiple_ keys) - */ - -/** - * @callback SignCallback - * @param {SignParams} args - * @return {{signature: string} | Promise<{signature: string}>} - an 'ASCII armor' encoded "detached" signature - */ - -/** - * @callback WalkerMap - * @param {string} filename - * @param {WalkerEntry[]} entries - * @returns {Promise<any>} - */ - -/** - * @callback WalkerReduce - * @param {any} parent - * @param {any[]} children - * @returns {Promise<any>} - */ - -/** - * @callback WalkerIterateCallback - * @param {WalkerEntry[]} entries - * @returns {Promise<any[]>} - */ - -/** - * @callback WalkerIterate - * @param {WalkerIterateCallback} walk - * @param {IterableIterator<WalkerEntry[]>} children - * @returns {Promise<any[]>} - */ - -/** - * @typedef {Object} RefUpdateStatus - * @property {boolean} ok - * @property {string} error - */ - -/** - * @typedef {Object} PushResult - * @property {boolean} ok - * @property {?string} error - * @property {Object<string, RefUpdateStatus>} refs - * @property {Object<string, string>} [headers] - */ - -/** - * @typedef {0|1} HeadStatus - */ - -/** - * @typedef {0|1|2} WorkdirStatus - */ - -/** - * @typedef {0|1|2|3} StageStatus - */ - -/** - * @typedef {[string, HeadStatus, WorkdirStatus, StageStatus]} StatusRow - */ - -class BaseError extends Error { - constructor(message) { - super(message); - // Setting this here allows TS to infer that all git errors have a `caller` property and - // that its type is string. - this.caller = ''; - } - - toJSON() { - // Error objects aren't normally serializable. So we do something about that. - return { - code: this.code, - data: this.data, - caller: this.caller, - message: this.message, - stack: this.stack, - } - } - - fromJSON(json) { - const e = new BaseError(json.message); - e.code = json.code; - e.data = json.data; - e.caller = json.caller; - e.stack = json.stack; - return e - } - - get isIsomorphicGitError() { - return true - } -} - -class InternalError extends BaseError { - /** - * @param {string} message - */ - constructor(message) { - super( - `An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${message}` - ); - this.code = this.name = InternalError.code; - this.data = { message }; - } -} -/** @type {'InternalError'} */ -InternalError.code = 'InternalError'; - -class UnsafeFilepathError extends BaseError { - /** - * @param {string} filepath - */ - constructor(filepath) { - super(`The filepath "${filepath}" contains unsafe character sequences`); - this.code = this.name = UnsafeFilepathError.code; - this.data = { filepath }; - } -} -/** @type {'UnsafeFilepathError'} */ -UnsafeFilepathError.code = 'UnsafeFilepathError'; - -// Modeled after https://github.com/tjfontaine/node-buffercursor -// but with the goal of being much lighter weight. -class BufferCursor { - constructor(buffer) { - this.buffer = buffer; - this._start = 0; - } - - eof() { - return this._start >= this.buffer.length - } - - tell() { - return this._start - } - - seek(n) { - this._start = n; - } - - slice(n) { - const r = this.buffer.slice(this._start, this._start + n); - this._start += n; - return r - } - - toString(enc, length) { - const r = this.buffer.toString(enc, this._start, this._start + length); - this._start += length; - return r - } - - write(value, length, enc) { - const r = this.buffer.write(value, this._start, length, enc); - this._start += length; - return r - } - - copy(source, start, end) { - const r = source.copy(this.buffer, this._start, start, end); - this._start += r; - return r - } - - readUInt8() { - const r = this.buffer.readUInt8(this._start); - this._start += 1; - return r - } - - writeUInt8(value) { - const r = this.buffer.writeUInt8(value, this._start); - this._start += 1; - return r - } - - readUInt16BE() { - const r = this.buffer.readUInt16BE(this._start); - this._start += 2; - return r - } - - writeUInt16BE(value) { - const r = this.buffer.writeUInt16BE(value, this._start); - this._start += 2; - return r - } - - readUInt32BE() { - const r = this.buffer.readUInt32BE(this._start); - this._start += 4; - return r - } - - writeUInt32BE(value) { - const r = this.buffer.writeUInt32BE(value, this._start); - this._start += 4; - return r - } -} - -function compareStrings(a, b) { - // https://stackoverflow.com/a/40355107/2168416 - return -(a < b) || +(a > b) -} - -function comparePath(a, b) { - // https://stackoverflow.com/a/40355107/2168416 - return compareStrings(a.path, b.path) -} - -/** - * From https://github.com/git/git/blob/master/Documentation/technical/index-format.txt - * - * 32-bit mode, split into (high to low bits) - * - * 4-bit object type - * valid values in binary are 1000 (regular file), 1010 (symbolic link) - * and 1110 (gitlink) - * - * 3-bit unused - * - * 9-bit unix permission. Only 0755 and 0644 are valid for regular files. - * Symbolic links and gitlinks have value 0 in this field. - */ -function normalizeMode(mode) { - // Note: BrowserFS will use -1 for "unknown" - // I need to make it non-negative for these bitshifts to work. - let type = mode > 0 ? mode >> 12 : 0; - // If it isn't valid, assume it as a "regular file" - // 0100 = directory - // 1000 = regular file - // 1010 = symlink - // 1110 = gitlink - if ( - type !== 0b0100 && - type !== 0b1000 && - type !== 0b1010 && - type !== 0b1110 - ) { - type = 0b1000; - } - let permissions = mode & 0o777; - // Is the file executable? then 755. Else 644. - if (permissions & 0b001001001) { - permissions = 0o755; - } else { - permissions = 0o644; - } - // If it's not a regular file, scrub all permissions - if (type !== 0b1000) permissions = 0; - return (type << 12) + permissions -} - -const MAX_UINT32 = 2 ** 32; - -function SecondsNanoseconds( - givenSeconds, - givenNanoseconds, - milliseconds, - date -) { - if (givenSeconds !== undefined && givenNanoseconds !== undefined) { - return [givenSeconds, givenNanoseconds] - } - if (milliseconds === undefined) { - milliseconds = date.valueOf(); - } - const seconds = Math.floor(milliseconds / 1000); - const nanoseconds = (milliseconds - seconds * 1000) * 1000000; - return [seconds, nanoseconds] -} - -function normalizeStats(e) { - const [ctimeSeconds, ctimeNanoseconds] = SecondsNanoseconds( - e.ctimeSeconds, - e.ctimeNanoseconds, - e.ctimeMs, - e.ctime - ); - const [mtimeSeconds, mtimeNanoseconds] = SecondsNanoseconds( - e.mtimeSeconds, - e.mtimeNanoseconds, - e.mtimeMs, - e.mtime - ); - - return { - ctimeSeconds: ctimeSeconds % MAX_UINT32, - ctimeNanoseconds: ctimeNanoseconds % MAX_UINT32, - mtimeSeconds: mtimeSeconds % MAX_UINT32, - mtimeNanoseconds: mtimeNanoseconds % MAX_UINT32, - dev: e.dev % MAX_UINT32, - ino: e.ino % MAX_UINT32, - mode: normalizeMode(e.mode % MAX_UINT32), - uid: e.uid % MAX_UINT32, - gid: e.gid % MAX_UINT32, - // size of -1 happens over a BrowserFS HTTP Backend that doesn't serve Content-Length headers - // (like the Karma webserver) because BrowserFS HTTP Backend uses HTTP HEAD requests to do fs.stat - size: e.size > -1 ? e.size % MAX_UINT32 : 0, - } -} - -function toHex(buffer) { - let hex = ''; - for (const byte of new Uint8Array(buffer)) { - if (byte < 16) hex += '0'; - hex += byte.toString(16); - } - return hex -} - -/* eslint-env node, browser */ - -let supportsSubtleSHA1 = null; - -async function shasum(buffer) { - if (supportsSubtleSHA1 === null) { - supportsSubtleSHA1 = await testSubtleSHA1(); - } - return supportsSubtleSHA1 ? subtleSHA1(buffer) : shasumSync(buffer) -} - -// This is modeled after @dominictarr's "shasum" module, -// but without the 'json-stable-stringify' dependency and -// extra type-casting features. -function shasumSync(buffer) { - return new Hash().update(buffer).digest('hex') -} - -async function subtleSHA1(buffer) { - const hash = await crypto.subtle.digest('SHA-1', buffer); - return toHex(hash) -} - -async function testSubtleSHA1() { - // I'm using a rather crude method of progressive enhancement, because - // some browsers that have crypto.subtle.digest don't actually implement SHA-1. - try { - const hash = await subtleSHA1(new Uint8Array([])); - if (hash === 'da39a3ee5e6b4b0d3255bfef95601890afd80709') return true - } catch (_) { - // no bother - } - return false -} - -// Extract 1-bit assume-valid, 1-bit extended flag, 2-bit merge state flag, 12-bit path length flag -function parseCacheEntryFlags(bits) { - return { - assumeValid: Boolean(bits & 0b1000000000000000), - extended: Boolean(bits & 0b0100000000000000), - stage: (bits & 0b0011000000000000) >> 12, - nameLength: bits & 0b0000111111111111, - } -} - -function renderCacheEntryFlags(entry) { - const flags = entry.flags; - // 1-bit extended flag (must be zero in version 2) - flags.extended = false; - // 12-bit name length if the length is less than 0xFFF; otherwise 0xFFF - // is stored in this field. - flags.nameLength = Math.min(Buffer.from(entry.path).length, 0xfff); - return ( - (flags.assumeValid ? 0b1000000000000000 : 0) + - (flags.extended ? 0b0100000000000000 : 0) + - ((flags.stage & 0b11) << 12) + - (flags.nameLength & 0b111111111111) - ) -} - -class GitIndex { - /*:: - _entries: Map<string, CacheEntry> - _dirty: boolean // Used to determine if index needs to be saved to filesystem - */ - constructor(entries) { - this._dirty = false; - this._entries = entries || new Map(); - } - - static async from(buffer) { - if (Buffer.isBuffer(buffer)) { - return GitIndex.fromBuffer(buffer) - } else if (buffer === null) { - return new GitIndex(null) - } else { - throw new InternalError('invalid type passed to GitIndex.from') - } - } - - static async fromBuffer(buffer) { - // Verify shasum - const shaComputed = await shasum(buffer.slice(0, -20)); - const shaClaimed = buffer.slice(-20).toString('hex'); - if (shaClaimed !== shaComputed) { - throw new InternalError( - `Invalid checksum in GitIndex buffer: expected ${shaClaimed} but saw ${shaComputed}` - ) - } - const reader = new BufferCursor(buffer); - const _entries = new Map(); - const magic = reader.toString('utf8', 4); - if (magic !== 'DIRC') { - throw new InternalError(`Inavlid dircache magic file number: ${magic}`) - } - const version = reader.readUInt32BE(); - if (version !== 2) { - throw new InternalError(`Unsupported dircache version: ${version}`) - } - const numEntries = reader.readUInt32BE(); - let i = 0; - while (!reader.eof() && i < numEntries) { - const entry = {}; - entry.ctimeSeconds = reader.readUInt32BE(); - entry.ctimeNanoseconds = reader.readUInt32BE(); - entry.mtimeSeconds = reader.readUInt32BE(); - entry.mtimeNanoseconds = reader.readUInt32BE(); - entry.dev = reader.readUInt32BE(); - entry.ino = reader.readUInt32BE(); - entry.mode = reader.readUInt32BE(); - entry.uid = reader.readUInt32BE(); - entry.gid = reader.readUInt32BE(); - entry.size = reader.readUInt32BE(); - entry.oid = reader.slice(20).toString('hex'); - const flags = reader.readUInt16BE(); - entry.flags = parseCacheEntryFlags(flags); - // TODO: handle if (version === 3 && entry.flags.extended) - const pathlength = buffer.indexOf(0, reader.tell() + 1) - reader.tell(); - if (pathlength < 1) { - throw new InternalError(`Got a path length of: ${pathlength}`) - } - // TODO: handle pathnames larger than 12 bits - entry.path = reader.toString('utf8', pathlength); - - // Prevent malicious paths like "..\foo" - if (entry.path.includes('..\\') || entry.path.includes('../')) { - throw new UnsafeFilepathError(entry.path) - } - - // The next bit is awkward. We expect 1 to 8 null characters - // such that the total size of the entry is a multiple of 8 bits. - // (Hence subtract 12 bytes for the header.) - let padding = 8 - ((reader.tell() - 12) % 8); - if (padding === 0) padding = 8; - while (padding--) { - const tmp = reader.readUInt8(); - if (tmp !== 0) { - throw new InternalError( - `Expected 1-8 null characters but got '${tmp}' after ${entry.path}` - ) - } else if (reader.eof()) { - throw new InternalError('Unexpected end of file') - } - } - // end of awkward part - _entries.set(entry.path, entry); - i++; - } - return new GitIndex(_entries) - } - - get entries() { - return [...this._entries.values()].sort(comparePath) - } - - get entriesMap() { - return this._entries - } - - *[Symbol.iterator]() { - for (const entry of this.entries) { - yield entry; - } - } - - insert({ filepath, stats, oid }) { - stats = normalizeStats(stats); - const bfilepath = Buffer.from(filepath); - const entry = { - ctimeSeconds: stats.ctimeSeconds, - ctimeNanoseconds: stats.ctimeNanoseconds, - mtimeSeconds: stats.mtimeSeconds, - mtimeNanoseconds: stats.mtimeNanoseconds, - dev: stats.dev, - ino: stats.ino, - // We provide a fallback value for `mode` here because not all fs - // implementations assign it, but we use it in GitTree. - // '100644' is for a "regular non-executable file" - mode: stats.mode || 0o100644, - uid: stats.uid, - gid: stats.gid, - size: stats.size, - path: filepath, - oid: oid, - flags: { - assumeValid: false, - extended: false, - stage: 0, - nameLength: bfilepath.length < 0xfff ? bfilepath.length : 0xfff, - }, - }; - this._entries.set(entry.path, entry); - this._dirty = true; - } - - delete({ filepath }) { - if (this._entries.has(filepath)) { - this._entries.delete(filepath); - } else { - for (const key of this._entries.keys()) { - if (key.startsWith(filepath + '/')) { - this._entries.delete(key); - } - } - } - this._dirty = true; - } - - clear() { - this._entries.clear(); - this._dirty = true; - } - - render() { - return this.entries - .map(entry => `${entry.mode.toString(8)} ${entry.oid} ${entry.path}`) - .join('\n') - } - - async toObject() { - const header = Buffer.alloc(12); - const writer = new BufferCursor(header); - writer.write('DIRC', 4, 'utf8'); - writer.writeUInt32BE(2); - writer.writeUInt32BE(this.entries.length); - const body = Buffer.concat( - this.entries.map(entry => { - const bpath = Buffer.from(entry.path); - // the fixed length + the filename + at least one null char => align by 8 - const length = Math.ceil((62 + bpath.length + 1) / 8) * 8; - const written = Buffer.alloc(length); - const writer = new BufferCursor(written); - const stat = normalizeStats(entry); - writer.writeUInt32BE(stat.ctimeSeconds); - writer.writeUInt32BE(stat.ctimeNanoseconds); - writer.writeUInt32BE(stat.mtimeSeconds); - writer.writeUInt32BE(stat.mtimeNanoseconds); - writer.writeUInt32BE(stat.dev); - writer.writeUInt32BE(stat.ino); - writer.writeUInt32BE(stat.mode); - writer.writeUInt32BE(stat.uid); - writer.writeUInt32BE(stat.gid); - writer.writeUInt32BE(stat.size); - writer.write(entry.oid, 20, 'hex'); - writer.writeUInt16BE(renderCacheEntryFlags(entry)); - writer.write(entry.path, bpath.length, 'utf8'); - return written - }) - ); - const main = Buffer.concat([header, body]); - const sum = await shasum(main); - return Buffer.concat([main, Buffer.from(sum, 'hex')]) - } -} - -function compareStats(entry, stats) { - // Comparison based on the description in Paragraph 4 of - // https://www.kernel.org/pub/software/scm/git/docs/technical/racy-git.txt - const e = normalizeStats(entry); - const s = normalizeStats(stats); - const staleness = - e.mode !== s.mode || - e.mtimeSeconds !== s.mtimeSeconds || - e.ctimeSeconds !== s.ctimeSeconds || - e.uid !== s.uid || - e.gid !== s.gid || - e.ino !== s.ino || - e.size !== s.size; - return staleness -} - -// import LockManager from 'travix-lock-manager' - -// import Lock from '../utils.js' - -// const lm = new LockManager() -let lock = null; - -const IndexCache = Symbol('IndexCache'); - -function createCache() { - return { - map: new Map(), - stats: new Map(), - } -} - -async function updateCachedIndexFile(fs, filepath, cache) { - const stat = await fs.lstat(filepath); - const rawIndexFile = await fs.read(filepath); - const index = await GitIndex.from(rawIndexFile); - // cache the GitIndex object so we don't need to re-read it every time. - cache.map.set(filepath, index); - // Save the stat data for the index so we know whether the cached file is stale (modified by an outside process). - cache.stats.set(filepath, stat); -} - -// Determine whether our copy of the index file is stale -async function isIndexStale(fs, filepath, cache) { - const savedStats = cache.stats.get(filepath); - if (savedStats === undefined) return true - const currStats = await fs.lstat(filepath); - if (savedStats === null) return false - if (currStats === null) return false - return compareStats(savedStats, currStats) -} - -class GitIndexManager { - /** - * - * @param {object} opts - * @param {import('../models/FileSystem.js').FileSystem} opts.fs - * @param {string} opts.gitdir - * @param {object} opts.cache - * @param {function(GitIndex): any} closure - */ - static async acquire({ fs, gitdir, cache }, closure) { - if (!cache[IndexCache]) cache[IndexCache] = createCache(); - - const filepath = `${gitdir}/index`; - if (lock === null) lock = new AsyncLock({ maxPending: Infinity }); - let result; - await lock.acquire(filepath, async function() { - // Acquire a file lock while we're reading the index - // to make sure other processes aren't writing to it - // simultaneously, which could result in a corrupted index. - // const fileLock = await Lock(filepath) - if (await isIndexStale(fs, filepath, cache[IndexCache])) { - await updateCachedIndexFile(fs, filepath, cache[IndexCache]); - } - const index = cache[IndexCache].map.get(filepath); - result = await closure(index); - if (index._dirty) { - // Acquire a file lock while we're writing the index file - // let fileLock = await Lock(filepath) - const buffer = await index.toObject(); - await fs.write(filepath, buffer); - // Update cached stat value - cache[IndexCache].stats.set(filepath, await fs.lstat(filepath)); - index._dirty = false; - } - }); - return result - } -} - -function basename(path) { - const last = Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\')); - if (last > -1) { - path = path.slice(last + 1); - } - return path -} - -function dirname(path) { - const last = Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\')); - if (last === -1) return '.' - if (last === 0) return '/' - return path.slice(0, last) -} - -/*:: -type Node = { - type: string, - fullpath: string, - basename: string, - metadata: Object, // mode, oid - parent?: Node, - children: Array<Node> -} -*/ - -function flatFileListToDirectoryStructure(files) { - const inodes = new Map(); - const mkdir = function(name) { - if (!inodes.has(name)) { - const dir = { - type: 'tree', - fullpath: name, - basename: basename(name), - metadata: {}, - children: [], - }; - inodes.set(name, dir); - // This recursively generates any missing parent folders. - // We do it after we've added the inode to the set so that - // we don't recurse infinitely trying to create the root '.' dirname. - dir.parent = mkdir(dirname(name)); - if (dir.parent && dir.parent !== dir) dir.parent.children.push(dir); - } - return inodes.get(name) - }; - - const mkfile = function(name, metadata) { - if (!inodes.has(name)) { - const file = { - type: 'blob', - fullpath: name, - basename: basename(name), - metadata: metadata, - // This recursively generates any missing parent folders. - parent: mkdir(dirname(name)), - children: [], - }; - if (file.parent) file.parent.children.push(file); - inodes.set(name, file); - } - return inodes.get(name) - }; - - mkdir('.'); - for (const file of files) { - mkfile(file.path, file); - } - return inodes -} - -/** - * - * @param {number} mode - */ -function mode2type(mode) { - // prettier-ignore - switch (mode) { - case 0o040000: return 'tree' - case 0o100644: return 'blob' - case 0o100755: return 'blob' - case 0o120000: return 'blob' - case 0o160000: return 'commit' - } - throw new InternalError(`Unexpected GitTree entry mode: ${mode.toString(8)}`) -} - -class GitWalkerIndex { - constructor({ fs, gitdir, cache }) { - this.treePromise = GitIndexManager.acquire( - { fs, gitdir, cache }, - async function(index) { - return flatFileListToDirectoryStructure(index.entries) - } - ); - const walker = this; - this.ConstructEntry = class StageEntry { - constructor(fullpath) { - this._fullpath = fullpath; - this._type = false; - this._mode = false; - this._stat = false; - this._oid = false; - } - - async type() { - return walker.type(this) - } - - async mode() { - return walker.mode(this) - } - - async stat() { - return walker.stat(this) - } - - async content() { - return walker.content(this) - } - - async oid() { - return walker.oid(this) - } - }; - } - - async readdir(entry) { - const filepath = entry._fullpath; - const tree = await this.treePromise; - const inode = tree.get(filepath); - if (!inode) return null - if (inode.type === 'blob') return null - if (inode.type !== 'tree') { - throw new Error(`ENOTDIR: not a directory, scandir '${filepath}'`) - } - const names = inode.children.map(inode => inode.fullpath); - names.sort(compareStrings); - return names - } - - async type(entry) { - if (entry._type === false) { - await entry.stat(); - } - return entry._type - } - - async mode(entry) { - if (entry._mode === false) { - await entry.stat(); - } - return entry._mode - } - - async stat(entry) { - if (entry._stat === false) { - const tree = await this.treePromise; - const inode = tree.get(entry._fullpath); - if (!inode) { - throw new Error( - `ENOENT: no such file or directory, lstat '${entry._fullpath}'` - ) - } - const stats = inode.type === 'tree' ? {} : normalizeStats(inode.metadata); - entry._type = inode.type === 'tree' ? 'tree' : mode2type(stats.mode); - entry._mode = stats.mode; - if (inode.type === 'tree') { - entry._stat = undefined; - } else { - entry._stat = stats; - } - } - return entry._stat - } - - async content(_entry) { - // Cannot get content for an index entry - } - - async oid(entry) { - if (entry._oid === false) { - const tree = await this.treePromise; - const inode = tree.get(entry._fullpath); - entry._oid = inode.metadata.oid; - } - return entry._oid - } -} - -// This is part of an elaborate system to facilitate code-splitting / tree-shaking. -// commands/walk.js can depend on only this, and the actual Walker classes exported -// can be opaque - only having a single property (this symbol) that is not enumerable, -// and thus the constructor can be passed as an argument to walk while being "unusable" -// outside of it. -const GitWalkSymbol = Symbol('GitWalkSymbol'); - -// @ts-check - -/** - * @returns {Walker} - */ -function STAGE() { - const o = Object.create(null); - Object.defineProperty(o, GitWalkSymbol, { - value: function({ fs, gitdir, cache }) { - return new GitWalkerIndex({ fs, gitdir, cache }) - }, - }); - Object.freeze(o); - return o -} - -// @ts-check - -class NotFoundError extends BaseError { - /** - * @param {string} what - */ - constructor(what) { - super(`Could not find ${what}.`); - this.code = this.name = NotFoundError.code; - this.data = { what }; - } -} -/** @type {'NotFoundError'} */ -NotFoundError.code = 'NotFoundError'; - -class ObjectTypeError extends BaseError { - /** - * @param {string} oid - * @param {'blob'|'commit'|'tag'|'tree'} actual - * @param {'blob'|'commit'|'tag'|'tree'} expected - * @param {string} [filepath] - */ - constructor(oid, actual, expected, filepath) { - super( - `Object ${oid} ${ - filepath ? `at ${filepath}` : '' - }was anticipated to be a ${expected} but it is a ${actual}.` - ); - this.code = this.name = ObjectTypeError.code; - this.data = { oid, actual, expected, filepath }; - } -} -/** @type {'ObjectTypeError'} */ -ObjectTypeError.code = 'ObjectTypeError'; - -class InvalidOidError extends BaseError { - /** - * @param {string} value - */ - constructor(value) { - super(`Expected a 40-char hex object id but saw "${value}".`); - this.code = this.name = InvalidOidError.code; - this.data = { value }; - } -} -/** @type {'InvalidOidError'} */ -InvalidOidError.code = 'InvalidOidError'; - -class NoRefspecError extends BaseError { - /** - * @param {string} remote - */ - constructor(remote) { - super(`Could not find a fetch refspec for remote "${remote}". Make sure the config file has an entry like the following: -[remote "${remote}"] -\tfetch = +refs/heads/*:refs/remotes/origin/* -`); - this.code = this.name = NoRefspecError.code; - this.data = { remote }; - } -} -/** @type {'NoRefspecError'} */ -NoRefspecError.code = 'NoRefspecError'; - -class GitPackedRefs { - constructor(text) { - this.refs = new Map(); - this.parsedConfig = []; - if (text) { - let key = null; - this.parsedConfig = text - .trim() - .split('\n') - .map(line => { - if (/^\s*#/.test(line)) { - return { line, comment: true } - } - const i = line.indexOf(' '); - if (line.startsWith('^')) { - // This is a oid for the commit associated with the annotated tag immediately preceding this line. - // Trim off the '^' - const value = line.slice(1); - // The tagname^{} syntax is based on the output of `git show-ref --tags -d` - this.refs.set(key + '^{}', value); - return { line, ref: key, peeled: value } - } else { - // This is an oid followed by the ref name - const value = line.slice(0, i); - key = line.slice(i + 1); - this.refs.set(key, value); - return { line, ref: key, oid: value } - } - }); - } - return this - } - - static from(text) { - return new GitPackedRefs(text) - } - - delete(ref) { - this.parsedConfig = this.parsedConfig.filter(entry => entry.ref !== ref); - this.refs.delete(ref); - } - - toString() { - return this.parsedConfig.map(({ line }) => line).join('\n') + '\n' - } -} - -class GitRefSpec { - constructor({ remotePath, localPath, force, matchPrefix }) { - Object.assign(this, { - remotePath, - localPath, - force, - matchPrefix, - }); - } - - static from(refspec) { - const [ - forceMatch, - remotePath, - remoteGlobMatch, - localPath, - localGlobMatch, - ] = refspec.match(/^(\+?)(.*?)(\*?):(.*?)(\*?)$/).slice(1); - const force = forceMatch === '+'; - const remoteIsGlob = remoteGlobMatch === '*'; - const localIsGlob = localGlobMatch === '*'; - // validate - // TODO: Make this check more nuanced, and depend on whether this is a fetch refspec or a push refspec - if (remoteIsGlob !== localIsGlob) { - throw new InternalError('Invalid refspec') - } - return new GitRefSpec({ - remotePath, - localPath, - force, - matchPrefix: remoteIsGlob, - }) - // TODO: We need to run resolveRef on both paths to expand them to their full name. - } - - translate(remoteBranch) { - if (this.matchPrefix) { - if (remoteBranch.startsWith(this.remotePath)) { - return this.localPath + remoteBranch.replace(this.remotePath, '') - } - } else { - if (remoteBranch === this.remotePath) return this.localPath - } - return null - } - - reverseTranslate(localBranch) { - if (this.matchPrefix) { - if (localBranch.startsWith(this.localPath)) { - return this.remotePath + localBranch.replace(this.localPath, '') - } - } else { - if (localBranch === this.localPath) return this.remotePath - } - return null - } -} - -class GitRefSpecSet { - constructor(rules = []) { - this.rules = rules; - } - - static from(refspecs) { - const rules = []; - for (const refspec of refspecs) { - rules.push(GitRefSpec.from(refspec)); // might throw - } - return new GitRefSpecSet(rules) - } - - add(refspec) { - const rule = GitRefSpec.from(refspec); // might throw - this.rules.push(rule); - } - - translate(remoteRefs) { - const result = []; - for (const rule of this.rules) { - for (const remoteRef of remoteRefs) { - const localRef = rule.translate(remoteRef); - if (localRef) { - result.push([remoteRef, localRef]); - } - } - } - return result - } - - translateOne(remoteRef) { - let result = null; - for (const rule of this.rules) { - const localRef = rule.translate(remoteRef); - if (localRef) { - result = localRef; - } - } - return result - } - - localNamespaces() { - return this.rules - .filter(rule => rule.matchPrefix) - .map(rule => rule.localPath.replace(/\/$/, '')) - } -} - -function compareRefNames(a, b) { - // https://stackoverflow.com/a/40355107/2168416 - const _a = a.replace(/\^\{\}$/, ''); - const _b = b.replace(/\^\{\}$/, ''); - const tmp = -(_a < _b) || +(_a > _b); - if (tmp === 0) { - return a.endsWith('^{}') ? 1 : -1 - } - return tmp -} - -function normalizePath(path) { - return path - .replace(/\/\.\//g, '/') // Replace '/./' with '/' - .replace(/\/{2,}/g, '/') // Replace consecutive '/' - .replace(/^\/\.$/, '/') // if path === '/.' return '/' - .replace(/^\.\/$/, '.') // if path === './' return '.' - .replace(/^\.\//, '') // Remove leading './' - .replace(/\/\.$/, '') // Remove trailing '/.' - .replace(/(.+)\/$/, '$1') // Remove trailing '/' - .replace(/^$/, '.') // if path === '' return '.' -} - -// For some reason path.posix.join is undefined in webpack - -function join(...parts) { - return normalizePath(parts.map(normalizePath).join('/')) -} - -// This is straight from parse_unit_factor in config.c of canonical git -const num = val => { - val = val.toLowerCase(); - let n = parseInt(val); - if (val.endsWith('k')) n *= 1024; - if (val.endsWith('m')) n *= 1024 * 1024; - if (val.endsWith('g')) n *= 1024 * 1024 * 1024; - return n -}; - -// This is straight from git_parse_maybe_bool_text in config.c of canonical git -const bool = val => { - val = val.trim().toLowerCase(); - if (val === 'true' || val === 'yes' || val === 'on') return true - if (val === 'false' || val === 'no' || val === 'off') return false - throw Error( - `Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${val}` - ) -}; - -const schema = { - core: { - filemode: bool, - bare: bool, - logallrefupdates: bool, - symlinks: bool, - ignorecase: bool, - bigFileThreshold: num, - }, -}; - -// https://git-scm.com/docs/git-config#_syntax - -// section starts with [ and ends with ] -// section is alphanumeric (ASCII) with - and . -// section is case insensitive -// subsection is optionnal -// subsection is specified after section and one or more spaces -// subsection is specified between double quotes -const SECTION_LINE_REGEX = /^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/; -const SECTION_REGEX = /^[A-Za-z0-9-.]+$/; - -// variable lines contain a name, and equal sign and then a value -// variable lines can also only contain a name (the implicit value is a boolean true) -// variable name is alphanumeric (ASCII) with - -// variable name starts with an alphabetic character -// variable name is case insensitive -const VARIABLE_LINE_REGEX = /^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/; -const VARIABLE_NAME_REGEX = /^[A-Za-z][A-Za-z-]*$/; - -const VARIABLE_VALUE_COMMENT_REGEX = /^(.*?)( *[#;].*)$/; - -const extractSectionLine = line => { - const matches = SECTION_LINE_REGEX.exec(line); - if (matches != null) { - const [section, subsection] = matches.slice(1); - return [section, subsection] - } - return null -}; - -const extractVariableLine = line => { - const matches = VARIABLE_LINE_REGEX.exec(line); - if (matches != null) { - const [name, rawValue = 'true'] = matches.slice(1); - const valueWithoutComments = removeComments(rawValue); - const valueWithoutQuotes = removeQuotes(valueWithoutComments); - return [name, valueWithoutQuotes] - } - return null -}; - -const removeComments = rawValue => { - const commentMatches = VARIABLE_VALUE_COMMENT_REGEX.exec(rawValue); - if (commentMatches == null) { - return rawValue - } - const [valueWithoutComment, comment] = commentMatches.slice(1); - // if odd number of quotes before and after comment => comment is escaped - if ( - hasOddNumberOfQuotes(valueWithoutComment) && - hasOddNumberOfQuotes(comment) - ) { - return `${valueWithoutComment}${comment}` - } - return valueWithoutComment -}; - -const hasOddNumberOfQuotes = text => { - const numberOfQuotes = (text.match(/(?:^|[^\\])"/g) || []).length; - return numberOfQuotes % 2 !== 0 -}; - -const removeQuotes = text => { - return text.split('').reduce((newText, c, idx, text) => { - const isQuote = c === '"' && text[idx - 1] !== '\\'; - const isEscapeForQuote = c === '\\' && text[idx + 1] === '"'; - if (isQuote || isEscapeForQuote) { - return newText - } - return newText + c - }, '') -}; - -const lower = text => { - return text != null ? text.toLowerCase() : null -}; - -const getPath = (section, subsection, name) => { - return [lower(section), subsection, lower(name)] - .filter(a => a != null) - .join('.') -}; - -const findLastIndex = (array, callback) => { - return array.reduce((lastIndex, item, index) => { - return callback(item) ? index : lastIndex - }, -1) -}; - -// Note: there are a LOT of edge cases that aren't covered (e.g. keys in sections that also -// have subsections, [include] directives, etc. -class GitConfig { - constructor(text) { - let section = null; - let subsection = null; - this.parsedConfig = text.split('\n').map(line => { - let name = null; - let value = null; - - const trimmedLine = line.trim(); - const extractedSection = extractSectionLine(trimmedLine); - const isSection = extractedSection != null; - if (isSection) { - ;[section, subsection] = extractedSection; - } else { - const extractedVariable = extractVariableLine(trimmedLine); - const isVariable = extractedVariable != null; - if (isVariable) { - ;[name, value] = extractedVariable; - } - } - - const path = getPath(section, subsection, name); - return { line, isSection, section, subsection, name, value, path } - }); - } - - static from(text) { - return new GitConfig(text) - } - - async get(path, getall = false) { - const allValues = this.parsedConfig - .filter(config => config.path === path.toLowerCase()) - .map(({ section, name, value }) => { - const fn = schema[section] && schema[section][name]; - return fn ? fn(value) : value - }); - return getall ? allValues : allValues.pop() - } - - async getall(path) { - return this.get(path, true) - } - - async getSubsections(section) { - return this.parsedConfig - .filter(config => config.section === section && config.isSection) - .map(config => config.subsection) - } - - async deleteSection(section, subsection) { - this.parsedConfig = this.parsedConfig.filter( - config => - !(config.section === section && config.subsection === subsection) - ); - } - - async append(path, value) { - return this.set(path, value, true) - } - - async set(path, value, append = false) { - const configIndex = findLastIndex( - this.parsedConfig, - config => config.path === path.toLowerCase() - ); - if (value == null) { - if (configIndex !== -1) { - this.parsedConfig.splice(configIndex, 1); - } - } else { - if (configIndex !== -1) { - const config = this.parsedConfig[configIndex]; - const modifiedConfig = Object.assign({}, config, { - value, - modified: true, - }); - if (append) { - this.parsedConfig.splice(configIndex + 1, 0, modifiedConfig); - } else { - this.parsedConfig[configIndex] = modifiedConfig; - } - } else { - const sectionPath = path - .split('.') - .slice(0, -1) - .join('.') - .toLowerCase(); - const sectionIndex = this.parsedConfig.findIndex( - config => config.path === sectionPath - ); - const [section, subsection] = sectionPath.split('.'); - const name = path.split('.').pop(); - const newConfig = { - section, - subsection, - name, - value, - modified: true, - path: getPath(section, subsection, name), - }; - if (SECTION_REGEX.test(section) && VARIABLE_NAME_REGEX.test(name)) { - if (sectionIndex >= 0) { - // Reuse existing section - this.parsedConfig.splice(sectionIndex + 1, 0, newConfig); - } else { - // Add a new section - const newSection = { - section, - subsection, - modified: true, - path: getPath(section, subsection, null), - }; - this.parsedConfig.push(newSection, newConfig); - } - } - } - } - } - - toString() { - return this.parsedConfig - .map(({ line, section, subsection, name, value, modified = false }) => { - if (!modified) { - return line - } - if (name != null && value != null) { - return `\t${name} = ${value}` - } - if (subsection != null) { - return `[${section} "${subsection}"]` - } - return `[${section}]` - }) - .join('\n') - } -} - -class GitConfigManager { - static async get({ fs, gitdir }) { - // We can improve efficiency later if needed. - // TODO: read from full list of git config files - const text = await fs.read(`${gitdir}/config`, { encoding: 'utf8' }); - return GitConfig.from(text) - } - - static async save({ fs, gitdir, config }) { - // We can improve efficiency later if needed. - // TODO: handle saving to the correct global/user/repo location - await fs.write(`${gitdir}/config`, config.toString(), { - encoding: 'utf8', - }); - } -} - -// This is a convenience wrapper for reading and writing files in the 'refs' directory. - -// @see https://git-scm.com/docs/git-rev-parse.html#_specifying_revisions -const refpaths = ref => [ - `${ref}`, - `refs/${ref}`, - `refs/tags/${ref}`, - `refs/heads/${ref}`, - `refs/remotes/${ref}`, - `refs/remotes/${ref}/HEAD`, -]; - -// @see https://git-scm.com/docs/gitrepository-layout -const GIT_FILES = ['config', 'description', 'index', 'shallow', 'commondir']; - -class GitRefManager { - static async updateRemoteRefs({ - fs, - gitdir, - remote, - refs, - symrefs, - tags, - refspecs = undefined, - prune = false, - pruneTags = false, - }) { - // Validate input - for (const value of refs.values()) { - if (!value.match(/[0-9a-f]{40}/)) { - throw new InvalidOidError(value) - } - } - const config = await GitConfigManager.get({ fs, gitdir }); - if (!refspecs) { - refspecs = await config.getall(`remote.${remote}.fetch`); - if (refspecs.length === 0) { - throw new NoRefspecError(remote) - } - // There's some interesting behavior with HEAD that doesn't follow the refspec. - refspecs.unshift(`+HEAD:refs/remotes/${remote}/HEAD`); - } - const refspec = GitRefSpecSet.from(refspecs); - const actualRefsToWrite = new Map(); - // Delete all current tags if the pruneTags argument is true. - if (pruneTags) { - const tags = await GitRefManager.listRefs({ - fs, - gitdir, - filepath: 'refs/tags', - }); - await GitRefManager.deleteRefs({ - fs, - gitdir, - refs: tags.map(tag => `refs/tags/${tag}`), - }); - } - // Add all tags if the fetch tags argument is true. - if (tags) { - for (const serverRef of refs.keys()) { - if (serverRef.startsWith('refs/tags') && !serverRef.endsWith('^{}')) { - // Git's behavior is to only fetch tags that do not conflict with tags already present. - if (!(await GitRefManager.exists({ fs, gitdir, ref: serverRef }))) { - // If there is a dereferenced an annotated tag value available, prefer that. - const oid = refs.get(serverRef + '^{}') || refs.get(serverRef); - actualRefsToWrite.set(serverRef, oid); - } - } - } - } - // Combine refs and symrefs giving symrefs priority - const refTranslations = refspec.translate([...refs.keys()]); - for (const [serverRef, translatedRef] of refTranslations) { - const value = refs.get(serverRef); - actualRefsToWrite.set(translatedRef, value); - } - const symrefTranslations = refspec.translate([...symrefs.keys()]); - for (const [serverRef, translatedRef] of symrefTranslations) { - const value = symrefs.get(serverRef); - const symtarget = refspec.translateOne(value); - if (symtarget) { - actualRefsToWrite.set(translatedRef, `ref: ${symtarget}`); - } - } - // If `prune` argument is true, clear out the existing local refspec roots - const pruned = []; - if (prune) { - for (const filepath of refspec.localNamespaces()) { - const refs = ( - await GitRefManager.listRefs({ - fs, - gitdir, - filepath, - }) - ).map(file => `${filepath}/${file}`); - for (const ref of refs) { - if (!actualRefsToWrite.has(ref)) { - pruned.push(ref); - } - } - } - if (pruned.length > 0) { - await GitRefManager.deleteRefs({ fs, gitdir, refs: pruned }); - } - } - // Update files - // TODO: For large repos with a history of thousands of pull requests - // (i.e. gitlab-ce) it would be vastly more efficient to write them - // to .git/packed-refs. - // The trick is to make sure we a) don't write a packed ref that is - // already shadowed by a loose ref and b) don't loose any refs already - // in packed-refs. Doing this efficiently may be difficult. A - // solution that might work is - // a) load the current packed-refs file - // b) add actualRefsToWrite, overriding the existing values if present - // c) enumerate all the loose refs currently in .git/refs/remotes/${remote} - // d) overwrite their value with the new value. - // Examples of refs we need to avoid writing in loose format for efficieny's sake - // are .git/refs/remotes/origin/refs/remotes/remote_mirror_3059 - // and .git/refs/remotes/origin/refs/merge-requests - for (const [key, value] of actualRefsToWrite) { - await fs.write(join(gitdir, key), `${value.trim()}\n`, 'utf8'); - } - return { pruned } - } - - // TODO: make this less crude? - static async writeRef({ fs, gitdir, ref, value }) { - // Validate input - if (!value.match(/[0-9a-f]{40}/)) { - throw new InvalidOidError(value) - } - await fs.write(join(gitdir, ref), `${value.trim()}\n`, 'utf8'); - } - - static async writeSymbolicRef({ fs, gitdir, ref, value }) { - await fs.write(join(gitdir, ref), 'ref: ' + `${value.trim()}\n`, 'utf8'); - } - - static async deleteRef({ fs, gitdir, ref }) { - return GitRefManager.deleteRefs({ fs, gitdir, refs: [ref] }) - } - - static async deleteRefs({ fs, gitdir, refs }) { - // Delete regular ref - await Promise.all(refs.map(ref => fs.rm(join(gitdir, ref)))); - // Delete any packed ref - let text = await fs.read(`${gitdir}/packed-refs`, { encoding: 'utf8' }); - const packed = GitPackedRefs.from(text); - const beforeSize = packed.refs.size; - for (const ref of refs) { - if (packed.refs.has(ref)) { - packed.delete(ref); - } - } - if (packed.refs.size < beforeSize) { - text = packed.toString(); - await fs.write(`${gitdir}/packed-refs`, text, { encoding: 'utf8' }); - } - } - - /** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.ref - * @param {number} [args.depth] - * @returns {Promise<string>} - */ - static async resolve({ fs, gitdir, ref, depth = undefined }) { - if (depth !== undefined) { - depth--; - if (depth === -1) { - return ref - } - } - let sha; - // Is it a ref pointer? - if (ref.startsWith('ref: ')) { - ref = ref.slice('ref: '.length); - return GitRefManager.resolve({ fs, gitdir, ref, depth }) - } - // Is it a complete and valid SHA? - if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) { - return ref - } - // We need to alternate between the file system and the packed-refs - const packedMap = await GitRefManager.packedRefs({ fs, gitdir }); - // Look in all the proper paths, in this order - const allpaths = refpaths(ref).filter(p => !GIT_FILES.includes(p)); // exclude git system files (#709) - - for (const ref of allpaths) { - sha = - (await fs.read(`${gitdir}/${ref}`, { encoding: 'utf8' })) || - packedMap.get(ref); - if (sha) { - return GitRefManager.resolve({ fs, gitdir, ref: sha.trim(), depth }) - } - } - // Do we give up? - throw new NotFoundError(ref) - } - - static async exists({ fs, gitdir, ref }) { - try { - await GitRefManager.expand({ fs, gitdir, ref }); - return true - } catch (err) { - return false - } - } - - static async expand({ fs, gitdir, ref }) { - // Is it a complete and valid SHA? - if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) { - return ref - } - // We need to alternate between the file system and the packed-refs - const packedMap = await GitRefManager.packedRefs({ fs, gitdir }); - // Look in all the proper paths, in this order - const allpaths = refpaths(ref); - for (const ref of allpaths) { - if (await fs.exists(`${gitdir}/${ref}`)) return ref - if (packedMap.has(ref)) return ref - } - // Do we give up? - throw new NotFoundError(ref) - } - - static async expandAgainstMap({ ref, map }) { - // Look in all the proper paths, in this order - const allpaths = refpaths(ref); - for (const ref of allpaths) { - if (await map.has(ref)) return ref - } - // Do we give up? - throw new NotFoundError(ref) - } - - static resolveAgainstMap({ ref, fullref = ref, depth = undefined, map }) { - if (depth !== undefined) { - depth--; - if (depth === -1) { - return { fullref, oid: ref } - } - } - // Is it a ref pointer? - if (ref.startsWith('ref: ')) { - ref = ref.slice('ref: '.length); - return GitRefManager.resolveAgainstMap({ ref, fullref, depth, map }) - } - // Is it a complete and valid SHA? - if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) { - return { fullref, oid: ref } - } - // Look in all the proper paths, in this order - const allpaths = refpaths(ref); - for (const ref of allpaths) { - const sha = map.get(ref); - if (sha) { - return GitRefManager.resolveAgainstMap({ - ref: sha.trim(), - fullref: ref, - depth, - map, - }) - } - } - // Do we give up? - throw new NotFoundError(ref) - } - - static async packedRefs({ fs, gitdir }) { - const text = await fs.read(`${gitdir}/packed-refs`, { encoding: 'utf8' }); - const packed = GitPackedRefs.from(text); - return packed.refs - } - - // List all the refs that match the `filepath` prefix - static async listRefs({ fs, gitdir, filepath }) { - const packedMap = GitRefManager.packedRefs({ fs, gitdir }); - let files = null; - try { - files = await fs.readdirDeep(`${gitdir}/${filepath}`); - files = files.map(x => x.replace(`${gitdir}/${filepath}/`, '')); - } catch (err) { - files = []; - } - - for (let key of (await packedMap).keys()) { - // filter by prefix - if (key.startsWith(filepath)) { - // remove prefix - key = key.replace(filepath + '/', ''); - // Don't include duplicates; the loose files have precedence anyway - if (!files.includes(key)) { - files.push(key); - } - } - } - // since we just appended things onto an array, we need to sort them now - files.sort(compareRefNames); - return files - } - - static async listBranches({ fs, gitdir, remote }) { - if (remote) { - return GitRefManager.listRefs({ - fs, - gitdir, - filepath: `refs/remotes/${remote}`, - }) - } else { - return GitRefManager.listRefs({ fs, gitdir, filepath: `refs/heads` }) - } - } - - static async listTags({ fs, gitdir }) { - const tags = await GitRefManager.listRefs({ - fs, - gitdir, - filepath: `refs/tags`, - }); - return tags.filter(x => !x.endsWith('^{}')) - } -} - -function compareTreeEntryPath(a, b) { - // Git sorts tree entries as if there is a trailing slash on directory names. - return compareStrings(appendSlashIfDir(a), appendSlashIfDir(b)) -} - -function appendSlashIfDir(entry) { - return entry.mode === '040000' ? entry.path + '/' : entry.path -} - -/** - * - * @typedef {Object} TreeEntry - * @property {string} mode - the 6 digit hexadecimal mode - * @property {string} path - the name of the file or directory - * @property {string} oid - the SHA-1 object id of the blob or tree - * @property {'commit'|'blob'|'tree'} type - the type of object - */ - -function mode2type$1(mode) { - // prettier-ignore - switch (mode) { - case '040000': return 'tree' - case '100644': return 'blob' - case '100755': return 'blob' - case '120000': return 'blob' - case '160000': return 'commit' - } - throw new InternalError(`Unexpected GitTree entry mode: ${mode}`) -} - -function parseBuffer(buffer) { - const _entries = []; - let cursor = 0; - while (cursor < buffer.length) { - const space = buffer.indexOf(32, cursor); - if (space === -1) { - throw new InternalError( - `GitTree: Error parsing buffer at byte location ${cursor}: Could not find the next space character.` - ) - } - const nullchar = buffer.indexOf(0, cursor); - if (nullchar === -1) { - throw new InternalError( - `GitTree: Error parsing buffer at byte location ${cursor}: Could not find the next null character.` - ) - } - let mode = buffer.slice(cursor, space).toString('utf8'); - if (mode === '40000') mode = '040000'; // makes it line up neater in printed output - const type = mode2type$1(mode); - const path = buffer.slice(space + 1, nullchar).toString('utf8'); - - // Prevent malicious git repos from writing to "..\foo" on clone etc - if (path.includes('\\') || path.includes('/')) { - throw new UnsafeFilepathError(path) - } - - const oid = buffer.slice(nullchar + 1, nullchar + 21).toString('hex'); - cursor = nullchar + 21; - _entries.push({ mode, path, oid, type }); - } - return _entries -} - -function limitModeToAllowed(mode) { - if (typeof mode === 'number') { - mode = mode.toString(8); - } - // tree - if (mode.match(/^0?4.*/)) return '040000' // Directory - if (mode.match(/^1006.*/)) return '100644' // Regular non-executable file - if (mode.match(/^1007.*/)) return '100755' // Regular executable file - if (mode.match(/^120.*/)) return '120000' // Symbolic link - if (mode.match(/^160.*/)) return '160000' // Commit (git submodule reference) - throw new InternalError(`Could not understand file mode: ${mode}`) -} - -function nudgeIntoShape(entry) { - if (!entry.oid && entry.sha) { - entry.oid = entry.sha; // Github - } - entry.mode = limitModeToAllowed(entry.mode); // index - if (!entry.type) { - entry.type = mode2type$1(entry.mode); // index - } - return entry -} - -class GitTree { - constructor(entries) { - if (Buffer.isBuffer(entries)) { - this._entries = parseBuffer(entries); - } else if (Array.isArray(entries)) { - this._entries = entries.map(nudgeIntoShape); - } else { - throw new InternalError('invalid type passed to GitTree constructor') - } - // Tree entries are not sorted alphabetically in the usual sense (see `compareTreeEntryPath`) - // but it is important later on that these be sorted in the same order as they would be returned from readdir. - this._entries.sort(comparePath); - } - - static from(tree) { - return new GitTree(tree) - } - - render() { - return this._entries - .map(entry => `${entry.mode} ${entry.type} ${entry.oid} ${entry.path}`) - .join('\n') - } - - toObject() { - // Adjust the sort order to match git's - const entries = [...this._entries]; - entries.sort(compareTreeEntryPath); - return Buffer.concat( - entries.map(entry => { - const mode = Buffer.from(entry.mode.replace(/^0/, '')); - const space = Buffer.from(' '); - const path = Buffer.from(entry.path, 'utf8'); - const nullchar = Buffer.from([0]); - const oid = Buffer.from(entry.oid, 'hex'); - return Buffer.concat([mode, space, path, nullchar, oid]) - }) - ) - } - - /** - * @returns {TreeEntry[]} - */ - entries() { - return this._entries - } - - *[Symbol.iterator]() { - for (const entry of this._entries) { - yield entry; - } - } -} - -class GitObject { - static wrap({ type, object }) { - return Buffer.concat([ - Buffer.from(`${type} ${object.byteLength.toString()}\x00`), - Buffer.from(object), - ]) - } - - static unwrap(buffer) { - const s = buffer.indexOf(32); // first space - const i = buffer.indexOf(0); // first null value - const type = buffer.slice(0, s).toString('utf8'); // get type of object - const length = buffer.slice(s + 1, i).toString('utf8'); // get type of object - const actualLength = buffer.length - (i + 1); - // verify length - if (parseInt(length) !== actualLength) { - throw new InternalError( - `Length mismatch: expected ${length} bytes but got ${actualLength} instead.` - ) - } - return { - type, - object: Buffer.from(buffer.slice(i + 1)), - } - } -} - -async function readObjectLoose({ fs, gitdir, oid }) { - const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`; - const file = await fs.read(`${gitdir}/${source}`); - if (!file) { - return null - } - return { object: file, format: 'deflated', source } -} - -/** - * @param {Buffer} delta - * @param {Buffer} source - * @returns {Buffer} - */ -function applyDelta(delta, source) { - const reader = new BufferCursor(delta); - const sourceSize = readVarIntLE(reader); - - if (sourceSize !== source.byteLength) { - throw new InternalError( - `applyDelta expected source buffer to be ${sourceSize} bytes but the provided buffer was ${source.length} bytes` - ) - } - const targetSize = readVarIntLE(reader); - let target; - - const firstOp = readOp(reader, source); - // Speed optimization - return raw buffer if it's just single simple copy - if (firstOp.byteLength === targetSize) { - target = firstOp; - } else { - // Otherwise, allocate a fresh buffer and slices - target = Buffer.alloc(targetSize); - const writer = new BufferCursor(target); - writer.copy(firstOp); - - while (!reader.eof()) { - writer.copy(readOp(reader, source)); - } - - const tell = writer.tell(); - if (targetSize !== tell) { - throw new InternalError( - `applyDelta expected target buffer to be ${targetSize} bytes but the resulting buffer was ${tell} bytes` - ) - } - } - return target -} - -function readVarIntLE(reader) { - let result = 0; - let shift = 0; - let byte = null; - do { - byte = reader.readUInt8(); - result |= (byte & 0b01111111) << shift; - shift += 7; - } while (byte & 0b10000000) - return result -} - -function readCompactLE(reader, flags, size) { - let result = 0; - let shift = 0; - while (size--) { - if (flags & 0b00000001) { - result |= reader.readUInt8() << shift; - } - flags >>= 1; - shift += 8; - } - return result -} - -function readOp(reader, source) { - /** @type {number} */ - const byte = reader.readUInt8(); - const COPY = 0b10000000; - const OFFS = 0b00001111; - const SIZE = 0b01110000; - if (byte & COPY) { - // copy consists of 4 byte offset, 3 byte size (in LE order) - const offset = readCompactLE(reader, byte & OFFS, 4); - let size = readCompactLE(reader, (byte & SIZE) >> 4, 3); - // Yup. They really did this optimization. - if (size === 0) size = 0x10000; - return source.slice(offset, offset + size) - } else { - // insert - return reader.slice(byte) - } -} - -// Convert a value to an Async Iterator -// This will be easier with async generator functions. -function fromValue(value) { - let queue = [value]; - return { - next() { - return Promise.resolve({ done: queue.length === 0, value: queue.pop() }) - }, - return() { - queue = []; - return {} - }, - [Symbol.asyncIterator]() { - return this - }, - } -} - -function getIterator(iterable) { - if (iterable[Symbol.asyncIterator]) { - return iterable[Symbol.asyncIterator]() - } - if (iterable[Symbol.iterator]) { - return iterable[Symbol.iterator]() - } - if (iterable.next) { - return iterable - } - return fromValue(iterable) -} - -// inspired by 'gartal' but lighter-weight and more battle-tested. -class StreamReader { - constructor(stream) { - this.stream = getIterator(stream); - this.buffer = null; - this.cursor = 0; - this.undoCursor = 0; - this.started = false; - this._ended = false; - this._discardedBytes = 0; - } - - eof() { - return this._ended && this.cursor === this.buffer.length - } - - tell() { - return this._discardedBytes + this.cursor - } - - async byte() { - if (this.eof()) return - if (!this.started) await this._init(); - if (this.cursor === this.buffer.length) { - await this._loadnext(); - if (this._ended) return - } - this._moveCursor(1); - return this.buffer[this.undoCursor] - } - - async chunk() { - if (this.eof()) return - if (!this.started) await this._init(); - if (this.cursor === this.buffer.length) { - await this._loadnext(); - if (this._ended) return - } - this._moveCursor(this.buffer.length); - return this.buffer.slice(this.undoCursor, this.cursor) - } - - async read(n) { - if (this.eof()) return - if (!this.started) await this._init(); - if (this.cursor + n > this.buffer.length) { - this._trim(); - await this._accumulate(n); - } - this._moveCursor(n); - return this.buffer.slice(this.undoCursor, this.cursor) - } - - async skip(n) { - if (this.eof()) return - if (!this.started) await this._init(); - if (this.cursor + n > this.buffer.length) { - this._trim(); - await this._accumulate(n); - } - this._moveCursor(n); - } - - async undo() { - this.cursor = this.undoCursor; - } - - async _next() { - this.started = true; - let { done, value } = await this.stream.next(); - if (done) { - this._ended = true; - } - if (value) { - value = Buffer.from(value); - } - return value - } - - _trim() { - // Throw away parts of the buffer we don't need anymore - // assert(this.cursor <= this.buffer.length) - this.buffer = this.buffer.slice(this.undoCursor); - this.cursor -= this.undoCursor; - this._discardedBytes += this.undoCursor; - this.undoCursor = 0; - } - - _moveCursor(n) { - this.undoCursor = this.cursor; - this.cursor += n; - if (this.cursor > this.buffer.length) { - this.cursor = this.buffer.length; - } - } - - async _accumulate(n) { - if (this._ended) return - // Expand the buffer until we have N bytes of data - // or we've reached the end of the stream - const buffers = [this.buffer]; - while (this.cursor + n > lengthBuffers(buffers)) { - const nextbuffer = await this._next(); - if (this._ended) break - buffers.push(nextbuffer); - } - this.buffer = Buffer.concat(buffers); - } - - async _loadnext() { - this._discardedBytes += this.buffer.length; - this.undoCursor = 0; - this.cursor = 0; - this.buffer = await this._next(); - } - - async _init() { - this.buffer = await this._next(); - } -} - -// This helper function helps us postpone concatenating buffers, which -// would create intermediate buffer objects, -function lengthBuffers(buffers) { - return buffers.reduce((acc, buffer) => acc + buffer.length, 0) -} - -// My version of git-list-pack - roughly 15x faster than the original - -async function listpack(stream, onData) { - const reader = new StreamReader(stream); - let PACK = await reader.read(4); - PACK = PACK.toString('utf8'); - if (PACK !== 'PACK') { - throw new InternalError(`Invalid PACK header '${PACK}'`) - } - - let version = await reader.read(4); - version = version.readUInt32BE(0); - if (version !== 2) { - throw new InternalError(`Invalid packfile version: ${version}`) - } - - let numObjects = await reader.read(4); - numObjects = numObjects.readUInt32BE(0); - // If (for some godforsaken reason) this is an empty packfile, abort now. - if (numObjects < 1) return - - while (!reader.eof() && numObjects--) { - const offset = reader.tell(); - const { type, length, ofs, reference } = await parseHeader(reader); - const inflator = new pako.Inflate(); - while (!inflator.result) { - const chunk = await reader.chunk(); - if (reader.ended) break - inflator.push(chunk, false); - if (inflator.err) { - throw new InternalError(`Pako error: ${inflator.msg}`) - } - if (inflator.result) { - if (inflator.result.length !== length) { - throw new InternalError( - `Inflated object size is different from that stated in packfile.` - ) - } - - // Backtrack parser to where deflated data ends - await reader.undo(); - await reader.read(chunk.length - inflator.strm.avail_in); - const end = reader.tell(); - await onData({ - data: inflator.result, - type, - num: numObjects, - offset, - end, - reference, - ofs, - }); - } - } - } -} - -async function parseHeader(reader) { - // Object type is encoded in bits 654 - let byte = await reader.byte(); - const type = (byte >> 4) & 0b111; - // The length encoding get complicated. - // Last four bits of length is encoded in bits 3210 - let length = byte & 0b1111; - // Whether the next byte is part of the variable-length encoded number - // is encoded in bit 7 - if (byte & 0b10000000) { - let shift = 4; - do { - byte = await reader.byte(); - length |= (byte & 0b01111111) << shift; - shift += 7; - } while (byte & 0b10000000) - } - // Handle deltified objects - let ofs; - let reference; - if (type === 6) { - let shift = 0; - ofs = 0; - const bytes = []; - do { - byte = await reader.byte(); - ofs |= (byte & 0b01111111) << shift; - shift += 7; - bytes.push(byte); - } while (byte & 0b10000000) - reference = Buffer.from(bytes); - } - if (type === 7) { - const buf = await reader.read(20); - reference = buf; - } - return { type, length, ofs, reference } -} - -/* eslint-env node, browser */ - -let supportsDecompressionStream = false; - -async function inflate(buffer) { - if (supportsDecompressionStream === null) { - supportsDecompressionStream = testDecompressionStream(); - } - return supportsDecompressionStream - ? browserInflate(buffer) - : pako.inflate(buffer) -} - -async function browserInflate(buffer) { - const ds = new DecompressionStream('deflate'); - const d = new Blob([buffer]).stream().pipeThrough(ds); - return new Uint8Array(await new Response(d).arrayBuffer()) -} - -function testDecompressionStream() { - try { - const ds = new DecompressionStream('deflate'); - if (ds) return true - } catch (_) { - // no bother - } - return false -} - -function decodeVarInt(reader) { - const bytes = []; - let byte = 0; - let multibyte = 0; - do { - byte = reader.readUInt8(); - // We keep bits 6543210 - const lastSeven = byte & 0b01111111; - bytes.push(lastSeven); - // Whether the next byte is part of the variable-length encoded number - // is encoded in bit 7 - multibyte = byte & 0b10000000; - } while (multibyte) - // Now that all the bytes are in big-endian order, - // alternate shifting the bits left by 7 and OR-ing the next byte. - // And... do a weird increment-by-one thing that I don't quite understand. - return bytes.reduce((a, b) => ((a + 1) << 7) | b, -1) -} - -// I'm pretty much copying this one from the git C source code, -// because it makes no sense. -function otherVarIntDecode(reader, startWith) { - let result = startWith; - let shift = 4; - let byte = null; - do { - byte = reader.readUInt8(); - result |= (byte & 0b01111111) << shift; - shift += 7; - } while (byte & 0b10000000) - return result -} - -class GitPackIndex { - constructor(stuff) { - Object.assign(this, stuff); - this.offsetCache = {}; - } - - static async fromIdx({ idx, getExternalRefDelta }) { - const reader = new BufferCursor(idx); - const magic = reader.slice(4).toString('hex'); - // Check for IDX v2 magic number - if (magic !== 'ff744f63') { - return // undefined - } - const version = reader.readUInt32BE(); - if (version !== 2) { - throw new InternalError( - `Unable to read version ${version} packfile IDX. (Only version 2 supported)` - ) - } - if (idx.byteLength > 2048 * 1024 * 1024) { - throw new InternalError( - `To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.` - ) - } - // Skip over fanout table - reader.seek(reader.tell() + 4 * 255); - // Get hashes - const size = reader.readUInt32BE(); - const hashes = []; - for (let i = 0; i < size; i++) { - const hash = reader.slice(20).toString('hex'); - hashes[i] = hash; - } - reader.seek(reader.tell() + 4 * size); - // Skip over CRCs - // Get offsets - const offsets = new Map(); - for (let i = 0; i < size; i++) { - offsets.set(hashes[i], reader.readUInt32BE()); - } - const packfileSha = reader.slice(20).toString('hex'); - return new GitPackIndex({ - hashes, - crcs: {}, - offsets, - packfileSha, - getExternalRefDelta, - }) - } - - static async fromPack({ pack, getExternalRefDelta, onProgress }) { - const listpackTypes = { - 1: 'commit', - 2: 'tree', - 3: 'blob', - 4: 'tag', - 6: 'ofs-delta', - 7: 'ref-delta', - }; - const offsetToObject = {}; - - // Older packfiles do NOT use the shasum of the pack itself, - // so it is recommended to just use whatever bytes are in the trailer. - // Source: https://github.com/git/git/commit/1190a1acf800acdcfd7569f87ac1560e2d077414 - const packfileSha = pack.slice(-20).toString('hex'); - - const hashes = []; - const crcs = {}; - const offsets = new Map(); - let totalObjectCount = null; - let lastPercent = null; - - await listpack([pack], async ({ data, type, reference, offset, num }) => { - if (totalObjectCount === null) totalObjectCount = num; - const percent = Math.floor( - ((totalObjectCount - num) * 100) / totalObjectCount - ); - if (percent !== lastPercent) { - if (onProgress) { - await onProgress({ - phase: 'Receiving objects', - loaded: totalObjectCount - num, - total: totalObjectCount, - }); - } - } - lastPercent = percent; - // Change type from a number to a meaningful string - type = listpackTypes[type]; - - if (['commit', 'tree', 'blob', 'tag'].includes(type)) { - offsetToObject[offset] = { - type, - offset, - }; - } else if (type === 'ofs-delta') { - offsetToObject[offset] = { - type, - offset, - }; - } else if (type === 'ref-delta') { - offsetToObject[offset] = { - type, - offset, - }; - } - }); - - // We need to know the lengths of the slices to compute the CRCs. - const offsetArray = Object.keys(offsetToObject).map(Number); - for (const [i, start] of offsetArray.entries()) { - const end = - i + 1 === offsetArray.length ? pack.byteLength - 20 : offsetArray[i + 1]; - const o = offsetToObject[start]; - const crc = crc32.buf(pack.slice(start, end)) >>> 0; - o.end = end; - o.crc = crc; - } - - // We don't have the hashes yet. But we can generate them using the .readSlice function! - const p = new GitPackIndex({ - pack: Promise.resolve(pack), - packfileSha, - crcs, - hashes, - offsets, - getExternalRefDelta, - }); - - // Resolve deltas and compute the oids - lastPercent = null; - let count = 0; - const objectsByDepth = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - for (let offset in offsetToObject) { - offset = Number(offset); - const percent = Math.floor((count++ * 100) / totalObjectCount); - if (percent !== lastPercent) { - if (onProgress) { - await onProgress({ - phase: 'Resolving deltas', - loaded: count, - total: totalObjectCount, - }); - } - } - lastPercent = percent; - - const o = offsetToObject[offset]; - if (o.oid) continue - try { - p.readDepth = 0; - p.externalReadDepth = 0; - const { type, object } = await p.readSlice({ start: offset }); - objectsByDepth[p.readDepth] += 1; - const oid = await shasum(GitObject.wrap({ type, object })); - o.oid = oid; - hashes.push(oid); - offsets.set(oid, offset); - crcs[oid] = o.crc; - } catch (err) { - continue - } - } - - hashes.sort(); - return p - } - - async toBuffer() { - const buffers = []; - const write = (str, encoding) => { - buffers.push(Buffer.from(str, encoding)); - }; - // Write out IDX v2 magic number - write('ff744f63', 'hex'); - // Write out version number 2 - write('00000002', 'hex'); - // Write fanout table - const fanoutBuffer = new BufferCursor(Buffer.alloc(256 * 4)); - for (let i = 0; i < 256; i++) { - let count = 0; - for (const hash of this.hashes) { - if (parseInt(hash.slice(0, 2), 16) <= i) count++; - } - fanoutBuffer.writeUInt32BE(count); - } - buffers.push(fanoutBuffer.buffer); - // Write out hashes - for (const hash of this.hashes) { - write(hash, 'hex'); - } - // Write out crcs - const crcsBuffer = new BufferCursor(Buffer.alloc(this.hashes.length * 4)); - for (const hash of this.hashes) { - crcsBuffer.writeUInt32BE(this.crcs[hash]); - } - buffers.push(crcsBuffer.buffer); - // Write out offsets - const offsetsBuffer = new BufferCursor(Buffer.alloc(this.hashes.length * 4)); - for (const hash of this.hashes) { - offsetsBuffer.writeUInt32BE(this.offsets.get(hash)); - } - buffers.push(offsetsBuffer.buffer); - // Write out packfile checksum - write(this.packfileSha, 'hex'); - // Write out shasum - const totalBuffer = Buffer.concat(buffers); - const sha = await shasum(totalBuffer); - const shaBuffer = Buffer.alloc(20); - shaBuffer.write(sha, 'hex'); - return Buffer.concat([totalBuffer, shaBuffer]) - } - - async load({ pack }) { - this.pack = pack; - } - - async unload() { - this.pack = null; - } - - async read({ oid }) { - if (!this.offsets.get(oid)) { - if (this.getExternalRefDelta) { - this.externalReadDepth++; - return this.getExternalRefDelta(oid) - } else { - throw new InternalError(`Could not read object ${oid} from packfile`) - } - } - const start = this.offsets.get(oid); - return this.readSlice({ start }) - } - - async readSlice({ start }) { - if (this.offsetCache[start]) { - return Object.assign({}, this.offsetCache[start]) - } - this.readDepth++; - const types = { - 0b0010000: 'commit', - 0b0100000: 'tree', - 0b0110000: 'blob', - 0b1000000: 'tag', - 0b1100000: 'ofs_delta', - 0b1110000: 'ref_delta', - }; - if (!this.pack) { - throw new InternalError( - 'Tried to read from a GitPackIndex with no packfile loaded into memory' - ) - } - const raw = (await this.pack).slice(start); - const reader = new BufferCursor(raw); - const byte = reader.readUInt8(); - // Object type is encoded in bits 654 - const btype = byte & 0b1110000; - let type = types[btype]; - if (type === undefined) { - throw new InternalError('Unrecognized type: 0b' + btype.toString(2)) - } - // The length encoding get complicated. - // Last four bits of length is encoded in bits 3210 - const lastFour = byte & 0b1111; - let length = lastFour; - // Whether the next byte is part of the variable-length encoded number - // is encoded in bit 7 - const multibyte = byte & 0b10000000; - if (multibyte) { - length = otherVarIntDecode(reader, lastFour); - } - let base = null; - let object = null; - // Handle deltified objects - if (type === 'ofs_delta') { - const offset = decodeVarInt(reader); - const baseOffset = start - offset - ;({ object: base, type } = await this.readSlice({ start: baseOffset })); - } - if (type === 'ref_delta') { - const oid = reader.slice(20).toString('hex') - ;({ object: base, type } = await this.read({ oid })); - } - // Handle undeltified objects - const buffer = raw.slice(reader.tell()); - object = Buffer.from(await inflate(buffer)); - // Assert that the object length is as expected. - if (object.byteLength !== length) { - throw new InternalError( - `Packfile told us object would have length ${length} but it had length ${object.byteLength}` - ) - } - if (base) { - object = Buffer.from(applyDelta(object, base)); - } - // Cache the result based on depth. - if (this.readDepth > 3) { - // hand tuned for speed / memory usage tradeoff - this.offsetCache[start] = { type, object }; - } - return { type, format: 'content', object } - } -} - -const PackfileCache = Symbol('PackfileCache'); - -async function loadPackIndex({ - fs, - filename, - getExternalRefDelta, - emitter, - emitterPrefix, -}) { - const idx = await fs.read(filename); - return GitPackIndex.fromIdx({ idx, getExternalRefDelta }) -} - -function readPackIndex({ - fs, - cache, - filename, - getExternalRefDelta, - emitter, - emitterPrefix, -}) { - // Try to get the packfile index from the in-memory cache - if (!cache[PackfileCache]) cache[PackfileCache] = new Map(); - let p = cache[PackfileCache].get(filename); - if (!p) { - p = loadPackIndex({ - fs, - filename, - getExternalRefDelta, - emitter, - emitterPrefix, - }); - cache[PackfileCache].set(filename, p); - } - return p -} - -async function readObjectPacked({ - fs, - cache, - gitdir, - oid, - format = 'content', - getExternalRefDelta, -}) { - // Check to see if it's in a packfile. - // Iterate through all the .idx files - let list = await fs.readdir(join(gitdir, 'objects/pack')); - list = list.filter(x => x.endsWith('.idx')); - for (const filename of list) { - const indexFile = `${gitdir}/objects/pack/${filename}`; - const p = await readPackIndex({ - fs, - cache, - filename: indexFile, - getExternalRefDelta, - }); - if (p.error) throw new InternalError(p.error) - // If the packfile DOES have the oid we're looking for... - if (p.offsets.has(oid)) { - // Get the resolved git object from the packfile - if (!p.pack) { - const packFile = indexFile.replace(/idx$/, 'pack'); - p.pack = fs.read(packFile); - } - const result = await p.read({ oid, getExternalRefDelta }); - result.format = 'content'; - result.source = `objects/pack/${filename.replace(/idx$/, 'pack')}`; - return result - } - } - // Failed to find it - return null -} - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} args.oid - * @param {string} [args.format] - */ -async function _readObject({ - fs, - cache, - gitdir, - oid, - format = 'content', -}) { - // Curry the current read method so that the packfile un-deltification - // process can acquire external ref-deltas. - const getExternalRefDelta = oid => _readObject({ fs, cache, gitdir, oid }); - - let result; - // Empty tree - hard-coded so we can use it as a shorthand. - // Note: I think the canonical git implementation must do this too because - // `git cat-file -t 4b825dc642cb6eb9a060e54bf8d69288fbee4904` prints "tree" even in empty repos. - if (oid === '4b825dc642cb6eb9a060e54bf8d69288fbee4904') { - result = { format: 'wrapped', object: Buffer.from(`tree 0\x00`) }; - } - // Look for it in the loose object directory. - if (!result) { - result = await readObjectLoose({ fs, gitdir, oid }); - } - // Check to see if it's in a packfile. - if (!result) { - result = await readObjectPacked({ - fs, - cache, - gitdir, - oid, - getExternalRefDelta, - }); - } - // Finally - if (!result) { - throw new NotFoundError(oid) - } - - if (format === 'deflated') { - return result - } - - if (result.format === 'deflated') { - result.object = Buffer.from(await inflate(result.object)); - result.format = 'wrapped'; - } - - if (result.format === 'wrapped') { - if (format === 'wrapped' && result.format === 'wrapped') { - return result - } - const sha = await shasum(result.object); - if (sha !== oid) { - throw new InternalError( - `SHA check failed! Expected ${oid}, computed ${sha}` - ) - } - const { object, type } = GitObject.unwrap(result.object); - result.type = type; - result.object = object; - result.format = 'content'; - } - - if (result.format === 'content') { - if (format === 'content') return result - return - } - - throw new InternalError(`invalid format "${result.format}"`) -} - -class AlreadyExistsError extends BaseError { - /** - * @param {'note'|'remote'|'tag'|'branch'} noun - * @param {string} where - * @param {boolean} canForce - */ - constructor(noun, where, canForce = true) { - super( - `Failed to create ${noun} at ${where} because it already exists.${ - canForce - ? ` (Hint: use 'force: true' parameter to overwrite existing ${noun}.)` - : '' - }` - ); - this.code = this.name = AlreadyExistsError.code; - this.data = { noun, where, canForce }; - } -} -/** @type {'AlreadyExistsError'} */ -AlreadyExistsError.code = 'AlreadyExistsError'; - -class AmbiguousError extends BaseError { - /** - * @param {'oids'|'refs'} nouns - * @param {string} short - * @param {string[]} matches - */ - constructor(nouns, short, matches) { - super( - `Found multiple ${nouns} matching "${short}" (${matches.join( - ', ' - )}). Use a longer abbreviation length to disambiguate them.` - ); - this.code = this.name = AmbiguousError.code; - this.data = { nouns, short, matches }; - } -} -/** @type {'AmbiguousError'} */ -AmbiguousError.code = 'AmbiguousError'; - -class CheckoutConflictError extends BaseError { - /** - * @param {string[]} filepaths - */ - constructor(filepaths) { - super( - `Your local changes to the following files would be overwritten by checkout: ${filepaths.join( - ', ' - )}` - ); - this.code = this.name = CheckoutConflictError.code; - this.data = { filepaths }; - } -} -/** @type {'CheckoutConflictError'} */ -CheckoutConflictError.code = 'CheckoutConflictError'; - -class CommitNotFetchedError extends BaseError { - /** - * @param {string} ref - * @param {string} oid - */ - constructor(ref, oid) { - super( - `Failed to checkout "${ref}" because commit ${oid} is not available locally. Do a git fetch to make the branch available locally.` - ); - this.code = this.name = CommitNotFetchedError.code; - this.data = { ref, oid }; - } -} -/** @type {'CommitNotFetchedError'} */ -CommitNotFetchedError.code = 'CommitNotFetchedError'; - -class EmptyServerResponseError extends BaseError { - constructor() { - super(`Empty response from git server.`); - this.code = this.name = EmptyServerResponseError.code; - this.data = {}; - } -} -/** @type {'EmptyServerResponseError'} */ -EmptyServerResponseError.code = 'EmptyServerResponseError'; - -class FastForwardError extends BaseError { - constructor() { - super(`A simple fast-forward merge was not possible.`); - this.code = this.name = FastForwardError.code; - this.data = {}; - } -} -/** @type {'FastForwardError'} */ -FastForwardError.code = 'FastForwardError'; - -class GitPushError extends BaseError { - /** - * @param {string} prettyDetails - * @param {PushResult} result - */ - constructor(prettyDetails, result) { - super(`One or more branches were not updated: ${prettyDetails}`); - this.code = this.name = GitPushError.code; - this.data = { prettyDetails, result }; - } -} -/** @type {'GitPushError'} */ -GitPushError.code = 'GitPushError'; - -class HttpError extends BaseError { - /** - * @param {number} statusCode - * @param {string} statusMessage - * @param {string} response - */ - constructor(statusCode, statusMessage, response) { - super(`HTTP Error: ${statusCode} ${statusMessage}`); - this.code = this.name = HttpError.code; - this.data = { statusCode, statusMessage, response }; - } -} -/** @type {'HttpError'} */ -HttpError.code = 'HttpError'; - -class InvalidFilepathError extends BaseError { - /** - * @param {'leading-slash'|'trailing-slash'} [reason] - */ - constructor(reason) { - let message = 'invalid filepath'; - if (reason === 'leading-slash' || reason === 'trailing-slash') { - message = `"filepath" parameter should not include leading or trailing directory separators because these can cause problems on some platforms.`; - } - super(message); - this.code = this.name = InvalidFilepathError.code; - this.data = { reason }; - } -} -/** @type {'InvalidFilepathError'} */ -InvalidFilepathError.code = 'InvalidFilepathError'; - -class InvalidRefNameError extends BaseError { - /** - * @param {string} ref - * @param {string} suggestion - * @param {boolean} canForce - */ - constructor(ref, suggestion) { - super( - `"${ref}" would be an invalid git reference. (Hint: a valid alternative would be "${suggestion}".)` - ); - this.code = this.name = InvalidRefNameError.code; - this.data = { ref, suggestion }; - } -} -/** @type {'InvalidRefNameError'} */ -InvalidRefNameError.code = 'InvalidRefNameError'; - -class MaxDepthError extends BaseError { - /** - * @param {number} depth - */ - constructor(depth) { - super(`Maximum search depth of ${depth} exceeded.`); - this.code = this.name = MaxDepthError.code; - this.data = { depth }; - } -} -/** @type {'MaxDepthError'} */ -MaxDepthError.code = 'MaxDepthError'; - -class MergeNotSupportedError extends BaseError { - constructor() { - super(`Merges with conflicts are not supported yet.`); - this.code = this.name = MergeNotSupportedError.code; - this.data = {}; - } -} -/** @type {'MergeNotSupportedError'} */ -MergeNotSupportedError.code = 'MergeNotSupportedError'; - -class MissingNameError extends BaseError { - /** - * @param {'author'|'committer'|'tagger'} role - */ - constructor(role) { - super( - `No name was provided for ${role} in the argument or in the .git/config file.` - ); - this.code = this.name = MissingNameError.code; - this.data = { role }; - } -} -/** @type {'MissingNameError'} */ -MissingNameError.code = 'MissingNameError'; - -class MissingParameterError extends BaseError { - /** - * @param {string} parameter - */ - constructor(parameter) { - super( - `The function requires a "${parameter}" parameter but none was provided.` - ); - this.code = this.name = MissingParameterError.code; - this.data = { parameter }; - } -} -/** @type {'MissingParameterError'} */ -MissingParameterError.code = 'MissingParameterError'; - -class ParseError extends BaseError { - /** - * @param {string} expected - * @param {string} actual - */ - constructor(expected, actual) { - super(`Expected "${expected}" but received "${actual}".`); - this.code = this.name = ParseError.code; - this.data = { expected, actual }; - } -} -/** @type {'ParseError'} */ -ParseError.code = 'ParseError'; - -class PushRejectedError extends BaseError { - /** - * @param {'not-fast-forward'|'tag-exists'} reason - */ - constructor(reason) { - let message = ''; - if (reason === 'not-fast-forward') { - message = ' because it was not a simple fast-forward'; - } else if (reason === 'tag-exists') { - message = ' because tag already exists'; - } - super(`Push rejected${message}. Use "force: true" to override.`); - this.code = this.name = PushRejectedError.code; - this.data = { reason }; - } -} -/** @type {'PushRejectedError'} */ -PushRejectedError.code = 'PushRejectedError'; - -class RemoteCapabilityError extends BaseError { - /** - * @param {'shallow'|'deepen-since'|'deepen-not'|'deepen-relative'} capability - * @param {'depth'|'since'|'exclude'|'relative'} parameter - */ - constructor(capability, parameter) { - super( - `Remote does not support the "${capability}" so the "${parameter}" parameter cannot be used.` - ); - this.code = this.name = RemoteCapabilityError.code; - this.data = { capability, parameter }; - } -} -/** @type {'RemoteCapabilityError'} */ -RemoteCapabilityError.code = 'RemoteCapabilityError'; - -class SmartHttpError extends BaseError { - /** - * @param {string} preview - * @param {string} response - */ - constructor(preview, response) { - super( - `Remote did not reply using the "smart" HTTP protocol. Expected "001e# service=git-upload-pack" but received: ${preview}` - ); - this.code = this.name = SmartHttpError.code; - this.data = { preview, response }; - } -} -/** @type {'SmartHttpError'} */ -SmartHttpError.code = 'SmartHttpError'; - -class UnknownTransportError extends BaseError { - /** - * @param {string} url - * @param {string} transport - * @param {string} suggestion - */ - constructor(url, transport, suggestion) { - super( - `Git remote "${url}" uses an unrecognized transport protocol: "${transport}"` - ); - this.code = this.name = UnknownTransportError.code; - this.data = { url, transport, suggestion }; - } -} -/** @type {'UnknownTransportError'} */ -UnknownTransportError.code = 'UnknownTransportError'; - -class UrlParseError extends BaseError { - /** - * @param {string} url - */ - constructor(url) { - super(`Cannot parse remote URL: "${url}"`); - this.code = this.name = UrlParseError.code; - this.data = { url }; - } -} -/** @type {'UrlParseError'} */ -UrlParseError.code = 'UrlParseError'; - -class UserCanceledError extends BaseError { - constructor() { - super(`The operation was canceled.`); - this.code = this.name = UserCanceledError.code; - this.data = {}; - } -} -/** @type {'UserCanceledError'} */ -UserCanceledError.code = 'UserCanceledError'; - - - -var Errors = /*#__PURE__*/Object.freeze({ - __proto__: null, - AlreadyExistsError: AlreadyExistsError, - AmbiguousError: AmbiguousError, - CheckoutConflictError: CheckoutConflictError, - CommitNotFetchedError: CommitNotFetchedError, - EmptyServerResponseError: EmptyServerResponseError, - FastForwardError: FastForwardError, - GitPushError: GitPushError, - HttpError: HttpError, - InternalError: InternalError, - InvalidFilepathError: InvalidFilepathError, - InvalidOidError: InvalidOidError, - InvalidRefNameError: InvalidRefNameError, - MaxDepthError: MaxDepthError, - MergeNotSupportedError: MergeNotSupportedError, - MissingNameError: MissingNameError, - MissingParameterError: MissingParameterError, - NoRefspecError: NoRefspecError, - NotFoundError: NotFoundError, - ObjectTypeError: ObjectTypeError, - ParseError: ParseError, - PushRejectedError: PushRejectedError, - RemoteCapabilityError: RemoteCapabilityError, - SmartHttpError: SmartHttpError, - UnknownTransportError: UnknownTransportError, - UnsafeFilepathError: UnsafeFilepathError, - UrlParseError: UrlParseError, - UserCanceledError: UserCanceledError -}); - -function formatAuthor({ name, email, timestamp, timezoneOffset }) { - timezoneOffset = formatTimezoneOffset(timezoneOffset); - return `${name} <${email}> ${timestamp} ${timezoneOffset}` -} - -// The amount of effort that went into crafting these cases to handle -// -0 (just so we don't lose that information when parsing and reconstructing) -// but can also default to +0 was extraordinary. - -function formatTimezoneOffset(minutes) { - const sign = simpleSign(negateExceptForZero(minutes)); - minutes = Math.abs(minutes); - const hours = Math.floor(minutes / 60); - minutes -= hours * 60; - let strHours = String(hours); - let strMinutes = String(minutes); - if (strHours.length < 2) strHours = '0' + strHours; - if (strMinutes.length < 2) strMinutes = '0' + strMinutes; - return (sign === -1 ? '-' : '+') + strHours + strMinutes -} - -function simpleSign(n) { - return Math.sign(n) || (Object.is(n, -0) ? -1 : 1) -} - -function negateExceptForZero(n) { - return n === 0 ? n : -n -} - -function normalizeNewlines(str) { - // remove all <CR> - str = str.replace(/\r/g, ''); - // no extra newlines up front - str = str.replace(/^\n+/, ''); - // and a single newline at the end - str = str.replace(/\n+$/, '') + '\n'; - return str -} - -function parseAuthor(author) { - const [, name, email, timestamp, offset] = author.match( - /^(.*) <(.*)> (.*) (.*)$/ - ); - return { - name: name, - email: email, - timestamp: Number(timestamp), - timezoneOffset: parseTimezoneOffset(offset), - } -} - -// The amount of effort that went into crafting these cases to handle -// -0 (just so we don't lose that information when parsing and reconstructing) -// but can also default to +0 was extraordinary. - -function parseTimezoneOffset(offset) { - let [, sign, hours, minutes] = offset.match(/(\+|-)(\d\d)(\d\d)/); - minutes = (sign === '+' ? 1 : -1) * (Number(hours) * 60 + Number(minutes)); - return negateExceptForZero$1(minutes) -} - -function negateExceptForZero$1(n) { - return n === 0 ? n : -n -} - -class GitAnnotatedTag { - constructor(tag) { - if (typeof tag === 'string') { - this._tag = tag; - } else if (Buffer.isBuffer(tag)) { - this._tag = tag.toString('utf8'); - } else if (typeof tag === 'object') { - this._tag = GitAnnotatedTag.render(tag); - } else { - throw new InternalError( - 'invalid type passed to GitAnnotatedTag constructor' - ) - } - } - - static from(tag) { - return new GitAnnotatedTag(tag) - } - - static render(obj) { - return `object ${obj.object} -type ${obj.type} -tag ${obj.tag} -tagger ${formatAuthor(obj.tagger)} - -${obj.message} -${obj.gpgsig ? obj.gpgsig : ''}` - } - - justHeaders() { - return this._tag.slice(0, this._tag.indexOf('\n\n')) - } - - message() { - const tag = this.withoutSignature(); - return tag.slice(tag.indexOf('\n\n') + 2) - } - - parse() { - return Object.assign(this.headers(), { - message: this.message(), - gpgsig: this.gpgsig(), - }) - } - - render() { - return this._tag - } - - headers() { - const headers = this.justHeaders().split('\n'); - const hs = []; - for (const h of headers) { - if (h[0] === ' ') { - // combine with previous header (without space indent) - hs[hs.length - 1] += '\n' + h.slice(1); - } else { - hs.push(h); - } - } - const obj = {}; - for (const h of hs) { - const key = h.slice(0, h.indexOf(' ')); - const value = h.slice(h.indexOf(' ') + 1); - if (Array.isArray(obj[key])) { - obj[key].push(value); - } else { - obj[key] = value; - } - } - if (obj.tagger) { - obj.tagger = parseAuthor(obj.tagger); - } - if (obj.committer) { - obj.committer = parseAuthor(obj.committer); - } - return obj - } - - withoutSignature() { - const tag = normalizeNewlines(this._tag); - if (tag.indexOf('\n-----BEGIN PGP SIGNATURE-----') === -1) return tag - return tag.slice(0, tag.lastIndexOf('\n-----BEGIN PGP SIGNATURE-----')) - } - - gpgsig() { - if (this._tag.indexOf('\n-----BEGIN PGP SIGNATURE-----') === -1) return - const signature = this._tag.slice( - this._tag.indexOf('-----BEGIN PGP SIGNATURE-----'), - this._tag.indexOf('-----END PGP SIGNATURE-----') + - '-----END PGP SIGNATURE-----'.length - ); - return normalizeNewlines(signature) - } - - payload() { - return this.withoutSignature() + '\n' - } - - toObject() { - return Buffer.from(this._tag, 'utf8') - } - - static async sign(tag, sign, secretKey) { - const payload = tag.payload(); - let { signature } = await sign({ payload, secretKey }); - // renormalize the line endings to the one true line-ending - signature = normalizeNewlines(signature); - const signedTag = payload + signature; - // return a new tag object - return GitAnnotatedTag.from(signedTag) - } -} - -function indent(str) { - return ( - str - .trim() - .split('\n') - .map(x => ' ' + x) - .join('\n') + '\n' - ) -} - -function outdent(str) { - return str - .split('\n') - .map(x => x.replace(/^ /, '')) - .join('\n') -} - -class GitCommit { - constructor(commit) { - if (typeof commit === 'string') { - this._commit = commit; - } else if (Buffer.isBuffer(commit)) { - this._commit = commit.toString('utf8'); - } else if (typeof commit === 'object') { - this._commit = GitCommit.render(commit); - } else { - throw new InternalError('invalid type passed to GitCommit constructor') - } - } - - static fromPayloadSignature({ payload, signature }) { - const headers = GitCommit.justHeaders(payload); - const message = GitCommit.justMessage(payload); - const commit = normalizeNewlines( - headers + '\ngpgsig' + indent(signature) + '\n' + message - ); - return new GitCommit(commit) - } - - static from(commit) { - return new GitCommit(commit) - } - - toObject() { - return Buffer.from(this._commit, 'utf8') - } - - // Todo: allow setting the headers and message - headers() { - return this.parseHeaders() - } - - // Todo: allow setting the headers and message - message() { - return GitCommit.justMessage(this._commit) - } - - parse() { - return Object.assign({ message: this.message() }, this.headers()) - } - - static justMessage(commit) { - return normalizeNewlines(commit.slice(commit.indexOf('\n\n') + 2)) - } - - static justHeaders(commit) { - return commit.slice(0, commit.indexOf('\n\n')) - } - - parseHeaders() { - const headers = GitCommit.justHeaders(this._commit).split('\n'); - const hs = []; - for (const h of headers) { - if (h[0] === ' ') { - // combine with previous header (without space indent) - hs[hs.length - 1] += '\n' + h.slice(1); - } else { - hs.push(h); - } - } - const obj = { - parent: [], - }; - for (const h of hs) { - const key = h.slice(0, h.indexOf(' ')); - const value = h.slice(h.indexOf(' ') + 1); - if (Array.isArray(obj[key])) { - obj[key].push(value); - } else { - obj[key] = value; - } - } - if (obj.author) { - obj.author = parseAuthor(obj.author); - } - if (obj.committer) { - obj.committer = parseAuthor(obj.committer); - } - return obj - } - - static renderHeaders(obj) { - let headers = ''; - if (obj.tree) { - headers += `tree ${obj.tree}\n`; - } else { - headers += `tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n`; // the null tree - } - if (obj.parent) { - if (obj.parent.length === undefined) { - throw new InternalError(`commit 'parent' property should be an array`) - } - for (const p of obj.parent) { - headers += `parent ${p}\n`; - } - } - const author = obj.author; - headers += `author ${formatAuthor(author)}\n`; - const committer = obj.committer || obj.author; - headers += `committer ${formatAuthor(committer)}\n`; - if (obj.gpgsig) { - headers += 'gpgsig' + indent(obj.gpgsig); - } - return headers - } - - static render(obj) { - return GitCommit.renderHeaders(obj) + '\n' + normalizeNewlines(obj.message) - } - - render() { - return this._commit - } - - withoutSignature() { - const commit = normalizeNewlines(this._commit); - if (commit.indexOf('\ngpgsig') === -1) return commit - const headers = commit.slice(0, commit.indexOf('\ngpgsig')); - const message = commit.slice( - commit.indexOf('-----END PGP SIGNATURE-----\n') + - '-----END PGP SIGNATURE-----\n'.length - ); - return normalizeNewlines(headers + '\n' + message) - } - - isolateSignature() { - const signature = this._commit.slice( - this._commit.indexOf('-----BEGIN PGP SIGNATURE-----'), - this._commit.indexOf('-----END PGP SIGNATURE-----') + - '-----END PGP SIGNATURE-----'.length - ); - return outdent(signature) - } - - static async sign(commit, sign, secretKey) { - const payload = commit.withoutSignature(); - const message = GitCommit.justMessage(commit._commit); - let { signature } = await sign({ payload, secretKey }); - // renormalize the line endings to the one true line-ending - signature = normalizeNewlines(signature); - const headers = GitCommit.justHeaders(commit._commit); - const signedCommit = - headers + '\n' + 'gpgsig' + indent(signature) + '\n' + message; - // return a new commit object - return GitCommit.from(signedCommit) - } -} - -async function resolveTree({ fs, cache, gitdir, oid }) { - // Empty tree - bypass `readObject` - if (oid === '4b825dc642cb6eb9a060e54bf8d69288fbee4904') { - return { tree: GitTree.from([]), oid } - } - const { type, object } = await _readObject({ fs, cache, gitdir, oid }); - // Resolve annotated tag objects to whatever - if (type === 'tag') { - oid = GitAnnotatedTag.from(object).parse().object; - return resolveTree({ fs, cache, gitdir, oid }) - } - // Resolve commits to trees - if (type === 'commit') { - oid = GitCommit.from(object).parse().tree; - return resolveTree({ fs, cache, gitdir, oid }) - } - if (type !== 'tree') { - throw new ObjectTypeError(oid, type, 'tree') - } - return { tree: GitTree.from(object), oid } -} - -class GitWalkerRepo { - constructor({ fs, gitdir, ref, cache }) { - this.fs = fs; - this.cache = cache; - this.gitdir = gitdir; - this.mapPromise = (async () => { - const map = new Map(); - let oid; - try { - oid = await GitRefManager.resolve({ fs, gitdir, ref }); - } catch (e) { - if (e instanceof NotFoundError) { - // Handle fresh branches with no commits - oid = '4b825dc642cb6eb9a060e54bf8d69288fbee4904'; - } - } - const tree = await resolveTree({ fs, cache: this.cache, gitdir, oid }); - tree.type = 'tree'; - tree.mode = '40000'; - map.set('.', tree); - return map - })(); - const walker = this; - this.ConstructEntry = class TreeEntry { - constructor(fullpath) { - this._fullpath = fullpath; - this._type = false; - this._mode = false; - this._stat = false; - this._content = false; - this._oid = false; - } - - async type() { - return walker.type(this) - } - - async mode() { - return walker.mode(this) - } - - async stat() { - return walker.stat(this) - } - - async content() { - return walker.content(this) - } - - async oid() { - return walker.oid(this) - } - }; - } - - async readdir(entry) { - const filepath = entry._fullpath; - const { fs, cache, gitdir } = this; - const map = await this.mapPromise; - const obj = map.get(filepath); - if (!obj) throw new Error(`No obj for ${filepath}`) - const oid = obj.oid; - if (!oid) throw new Error(`No oid for obj ${JSON.stringify(obj)}`) - if (obj.type !== 'tree') { - // TODO: support submodules (type === 'commit') - return null - } - const { type, object } = await _readObject({ fs, cache, gitdir, oid }); - if (type !== obj.type) { - throw new ObjectTypeError(oid, type, obj.type) - } - const tree = GitTree.from(object); - // cache all entries - for (const entry of tree) { - map.set(join(filepath, entry.path), entry); - } - return tree.entries().map(entry => join(filepath, entry.path)) - } - - async type(entry) { - if (entry._type === false) { - const map = await this.mapPromise; - const { type } = map.get(entry._fullpath); - entry._type = type; - } - return entry._type - } - - async mode(entry) { - if (entry._mode === false) { - const map = await this.mapPromise; - const { mode } = map.get(entry._fullpath); - entry._mode = normalizeMode(parseInt(mode, 8)); - } - return entry._mode - } - - async stat(_entry) {} - - async content(entry) { - if (entry._content === false) { - const map = await this.mapPromise; - const { fs, cache, gitdir } = this; - const obj = map.get(entry._fullpath); - const oid = obj.oid; - const { type, object } = await _readObject({ fs, cache, gitdir, oid }); - if (type !== 'blob') { - entry._content = undefined; - } else { - entry._content = new Uint8Array(object); - } - } - return entry._content - } - - async oid(entry) { - if (entry._oid === false) { - const map = await this.mapPromise; - const obj = map.get(entry._fullpath); - entry._oid = obj.oid; - } - return entry._oid - } -} - -// @ts-check - -/** - * @param {object} args - * @param {string} [args.ref='HEAD'] - * @returns {Walker} - */ -function TREE({ ref = 'HEAD' }) { - const o = Object.create(null); - Object.defineProperty(o, GitWalkSymbol, { - value: function({ fs, gitdir, cache }) { - return new GitWalkerRepo({ fs, gitdir, ref, cache }) - }, - }); - Object.freeze(o); - return o -} - -// @ts-check - -class GitWalkerFs { - constructor({ fs, dir, gitdir, cache }) { - this.fs = fs; - this.cache = cache; - this.dir = dir; - this.gitdir = gitdir; - const walker = this; - this.ConstructEntry = class WorkdirEntry { - constructor(fullpath) { - this._fullpath = fullpath; - this._type = false; - this._mode = false; - this._stat = false; - this._content = false; - this._oid = false; - } - - async type() { - return walker.type(this) - } - - async mode() { - return walker.mode(this) - } - - async stat() { - return walker.stat(this) - } - - async content() { - return walker.content(this) - } - - async oid() { - return walker.oid(this) - } - }; - } - - async readdir(entry) { - const filepath = entry._fullpath; - const { fs, dir } = this; - const names = await fs.readdir(join(dir, filepath)); - if (names === null) return null - return names.map(name => join(filepath, name)) - } - - async type(entry) { - if (entry._type === false) { - await entry.stat(); - } - return entry._type - } - - async mode(entry) { - if (entry._mode === false) { - await entry.stat(); - } - return entry._mode - } - - async stat(entry) { - if (entry._stat === false) { - const { fs, dir } = this; - let stat = await fs.lstat(`${dir}/${entry._fullpath}`); - if (!stat) { - throw new Error( - `ENOENT: no such file or directory, lstat '${entry._fullpath}'` - ) - } - let type = stat.isDirectory() ? 'tree' : 'blob'; - if (type === 'blob' && !stat.isFile() && !stat.isSymbolicLink()) { - type = 'special'; - } - entry._type = type; - stat = normalizeStats(stat); - entry._mode = stat.mode; - // workaround for a BrowserFS edge case - if (stat.size === -1 && entry._actualSize) { - stat.size = entry._actualSize; - } - entry._stat = stat; - } - return entry._stat - } - - async content(entry) { - if (entry._content === false) { - const { fs, dir } = this; - if ((await entry.type()) === 'tree') { - entry._content = undefined; - } else { - const content = await fs.read(`${dir}/${entry._fullpath}`); - // workaround for a BrowserFS edge case - entry._actualSize = content.length; - if (entry._stat && entry._stat.size === -1) { - entry._stat.size = entry._actualSize; - } - entry._content = new Uint8Array(content); - } - } - return entry._content - } - - async oid(entry) { - if (entry._oid === false) { - const { fs, gitdir, cache } = this; - let oid; - // See if we can use the SHA1 hash in the index. - await GitIndexManager.acquire({ fs, gitdir, cache }, async function( - index - ) { - const stage = index.entriesMap.get(entry._fullpath); - const stats = await entry.stat(); - if (!stage || compareStats(stats, stage)) { - const content = await entry.content(); - if (content === undefined) { - oid = undefined; - } else { - oid = await shasum( - GitObject.wrap({ type: 'blob', object: await entry.content() }) - ); - if (stage && oid === stage.oid) { - index.insert({ - filepath: entry._fullpath, - stats, - oid: oid, - }); - } - } - } else { - // Use the index SHA1 rather than compute it - oid = stage.oid; - } - }); - entry._oid = oid; - } - return entry._oid - } -} - -// @ts-check - -/** - * @returns {Walker} - */ -function WORKDIR() { - const o = Object.create(null); - Object.defineProperty(o, GitWalkSymbol, { - value: function({ fs, dir, gitdir, cache }) { - return new GitWalkerFs({ fs, dir, gitdir, cache }) - }, - }); - Object.freeze(o); - return o -} - -// @ts-check - -// I'm putting this in a Manager because I reckon it could benefit -// from a LOT of cacheing. -class GitIgnoreManager { - static async isIgnored({ fs, dir, gitdir = join(dir, '.git'), filepath }) { - // ALWAYS ignore ".git" folders. - if (basename(filepath) === '.git') return true - // '.' is not a valid gitignore entry, so '.' is never ignored - if (filepath === '.') return false - // Check and load exclusion rules from project exclude file (.git/info/exclude) - let excludes = ''; - const excludesFile = join(gitdir, 'info', 'exclude'); - if (await fs.exists(excludesFile)) { - excludes = await fs.read(excludesFile, 'utf8'); - } - // Find all the .gitignore files that could affect this file - const pairs = [ - { - gitignore: join(dir, '.gitignore'), - filepath, - }, - ]; - const pieces = filepath.split('/'); - for (let i = 1; i < pieces.length; i++) { - const folder = pieces.slice(0, i).join('/'); - const file = pieces.slice(i).join('/'); - pairs.push({ - gitignore: join(dir, folder, '.gitignore'), - filepath: file, - }); - } - let ignoredStatus = false; - for (const p of pairs) { - let file; - try { - file = await fs.read(p.gitignore, 'utf8'); - } catch (err) { - if (err.code === 'NOENT') continue - } - const ign = ignore().add(excludes); - ign.add(file); - // If the parent directory is excluded, we are done. - // "It is not possible to re-include a file if a parent directory of that file is excluded. Git doesn’t list excluded directories for performance reasons, so any patterns on contained files have no effect, no matter where they are defined." - // source: https://git-scm.com/docs/gitignore - const parentdir = dirname(p.filepath); - if (parentdir !== '.' && ign.ignores(parentdir)) return true - // If the file is currently ignored, test for UNignoring. - if (ignoredStatus) { - ignoredStatus = !ign.test(p.filepath).unignored; - } else { - ignoredStatus = ign.test(p.filepath).ignored; - } - } - return ignoredStatus - } -} - -/** - * This is just a collection of helper functions really. At least that's how it started. - */ -class FileSystem { - constructor(fs) { - if (typeof fs._original_unwrapped_fs !== 'undefined') return fs - - const promises = Object.getOwnPropertyDescriptor(fs, 'promises'); - if (promises && promises.enumerable) { - this._readFile = fs.promises.readFile.bind(fs.promises); - this._writeFile = fs.promises.writeFile.bind(fs.promises); - this._mkdir = fs.promises.mkdir.bind(fs.promises); - this._rmdir = fs.promises.rmdir.bind(fs.promises); - this._unlink = fs.promises.unlink.bind(fs.promises); - this._stat = fs.promises.stat.bind(fs.promises); - this._lstat = fs.promises.lstat.bind(fs.promises); - this._readdir = fs.promises.readdir.bind(fs.promises); - this._readlink = fs.promises.readlink.bind(fs.promises); - this._symlink = fs.promises.symlink.bind(fs.promises); - } else { - this._readFile = pify(fs.readFile.bind(fs)); - this._writeFile = pify(fs.writeFile.bind(fs)); - this._mkdir = pify(fs.mkdir.bind(fs)); - this._rmdir = pify(fs.rmdir.bind(fs)); - this._unlink = pify(fs.unlink.bind(fs)); - this._stat = pify(fs.stat.bind(fs)); - this._lstat = pify(fs.lstat.bind(fs)); - this._readdir = pify(fs.readdir.bind(fs)); - this._readlink = pify(fs.readlink.bind(fs)); - this._symlink = pify(fs.symlink.bind(fs)); - } - this._original_unwrapped_fs = fs; - } - - /** - * Return true if a file exists, false if it doesn't exist. - * Rethrows errors that aren't related to file existance. - */ - async exists(filepath, options = {}) { - try { - await this._stat(filepath); - return true - } catch (err) { - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') { - return false - } else { - console.log('Unhandled error in "FileSystem.exists()" function', err); - throw err - } - } - } - - /** - * Return the contents of a file if it exists, otherwise returns null. - * - * @param {string} filepath - * @param {object} [options] - * - * @returns {Promise<Buffer|string|null>} - */ - async read(filepath, options = {}) { - try { - let buffer = await this._readFile(filepath, options); - // Convert plain ArrayBuffers to Buffers - if (typeof buffer !== 'string') { - buffer = Buffer.from(buffer); - } - return buffer - } catch (err) { - return null - } - } - - /** - * Write a file (creating missing directories if need be) without throwing errors. - * - * @param {string} filepath - * @param {Buffer|Uint8Array|string} contents - * @param {object|string} [options] - */ - async write(filepath, contents, options = {}) { - try { - await this._writeFile(filepath, contents, options); - return - } catch (err) { - // Hmm. Let's try mkdirp and try again. - await this.mkdir(dirname(filepath)); - await this._writeFile(filepath, contents, options); - } - } - - /** - * Make a directory (or series of nested directories) without throwing an error if it already exists. - */ - async mkdir(filepath, _selfCall = false) { - try { - await this._mkdir(filepath); - return - } catch (err) { - // If err is null then operation succeeded! - if (err === null) return - // If the directory already exists, that's OK! - if (err.code === 'EEXIST') return - // Avoid infinite loops of failure - if (_selfCall) throw err - // If we got a "no such file or directory error" backup and try again. - if (err.code === 'ENOENT') { - const parent = dirname(filepath); - // Check to see if we've gone too far - if (parent === '.' || parent === '/' || parent === filepath) throw err - // Infinite recursion, what could go wrong? - await this.mkdir(parent); - await this.mkdir(filepath, true); - } - } - } - - /** - * Delete a file without throwing an error if it is already deleted. - */ - async rm(filepath) { - try { - await this._unlink(filepath); - } catch (err) { - if (err.code !== 'ENOENT') throw err - } - } - - /** - * Delete a directory without throwing an error if it is already deleted. - */ - async rmdir(filepath) { - try { - await this._rmdir(filepath); - } catch (err) { - if (err.code !== 'ENOENT') throw err - } - } - - /** - * Read a directory without throwing an error is the directory doesn't exist - */ - async readdir(filepath) { - try { - const names = await this._readdir(filepath); - // Ordering is not guaranteed, and system specific (Windows vs Unix) - // so we must sort them ourselves. - names.sort(compareStrings); - return names - } catch (err) { - if (err.code === 'ENOTDIR') return null - return [] - } - } - - /** - * Return a flast list of all the files nested inside a directory - * - * Based on an elegant concurrent recursive solution from SO - * https://stackoverflow.com/a/45130990/2168416 - */ - async readdirDeep(dir) { - const subdirs = await this._readdir(dir); - const files = await Promise.all( - subdirs.map(async subdir => { - const res = dir + '/' + subdir; - return (await this._stat(res)).isDirectory() - ? this.readdirDeep(res) - : res - }) - ); - return files.reduce((a, f) => a.concat(f), []) - } - - /** - * Return the Stats of a file/symlink if it exists, otherwise returns null. - * Rethrows errors that aren't related to file existance. - */ - async lstat(filename) { - try { - const stats = await this._lstat(filename); - return stats - } catch (err) { - if (err.code === 'ENOENT') { - return null - } - throw err - } - } - - /** - * Reads the contents of a symlink if it exists, otherwise returns null. - * Rethrows errors that aren't related to file existance. - */ - async readlink(filename, opts = { encoding: 'buffer' }) { - // Note: FileSystem.readlink returns a buffer by default - // so we can dump it into GitObject.write just like any other file. - try { - return this._readlink(filename, opts) - } catch (err) { - if (err.code === 'ENOENT') { - return null - } - throw err - } - } - - /** - * Write the contents of buffer to a symlink. - */ - async writelink(filename, buffer) { - return this._symlink(buffer.toString('utf8'), filename) - } -} - -async function writeObjectLoose({ fs, gitdir, object, format, oid }) { - if (format !== 'deflated') { - throw new InternalError( - 'GitObjectStoreLoose expects objects to write to be in deflated format' - ) - } - const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`; - const filepath = `${gitdir}/${source}`; - // Don't overwrite existing git objects - this helps avoid EPERM errors. - // Although I don't know how we'd fix corrupted objects then. Perhaps delete them - // on read? - if (!(await fs.exists(filepath))) await fs.write(filepath, object); -} - -/* eslint-env node, browser */ - -let supportsCompressionStream = null; - -async function deflate(buffer) { - if (supportsCompressionStream === null) { - supportsCompressionStream = testCompressionStream(); - } - return supportsCompressionStream - ? browserDeflate(buffer) - : pako.deflate(buffer) -} - -async function browserDeflate(buffer) { - const cs = new CompressionStream('deflate'); - const c = new Blob([buffer]).stream().pipeThrough(cs); - return new Uint8Array(await new Response(c).arrayBuffer()) -} - -function testCompressionStream() { - try { - const cs = new CompressionStream('deflate'); - // Test if `Blob.stream` is present. React Native does not have the `stream` method - new Blob([]).stream(); - if (cs) return true - } catch (_) { - // no bother - } - return false -} - -async function _writeObject({ - fs, - gitdir, - type, - object, - format = 'content', - oid = undefined, - dryRun = false, -}) { - if (format !== 'deflated') { - if (format !== 'wrapped') { - object = GitObject.wrap({ type, object }); - } - oid = await shasum(object); - object = Buffer.from(await deflate(object)); - } - if (!dryRun) { - await writeObjectLoose({ fs, gitdir, object, format: 'deflated', oid }); - } - return oid -} - -function assertParameter(name, value) { - if (value === undefined) { - throw new MissingParameterError(name) - } -} - -// @ts-check - -/** - * Add a file to the git index (aka staging area) - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the file to add to the index - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully once the git index has been updated - * - * @example - * await fs.promises.writeFile('/tutorial/README.md', `# TEST`) - * await git.add({ fs, dir: '/tutorial', filepath: 'README.md' }) - * console.log('done') - * - */ -async function add({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - filepath, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('dir', dir); - assertParameter('gitdir', gitdir); - assertParameter('filepath', filepath); - - const fs = new FileSystem(_fs); - await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) { - await addToIndex({ dir, gitdir, fs, filepath, index }); - }); - } catch (err) { - err.caller = 'git.add'; - throw err - } -} - -async function addToIndex({ dir, gitdir, fs, filepath, index }) { - // TODO: Should ignore UNLESS it's already in the index. - const ignored = await GitIgnoreManager.isIgnored({ - fs, - dir, - gitdir, - filepath, - }); - if (ignored) return - const stats = await fs.lstat(join(dir, filepath)); - if (!stats) throw new NotFoundError(filepath) - if (stats.isDirectory()) { - const children = await fs.readdir(join(dir, filepath)); - const promises = children.map(child => - addToIndex({ dir, gitdir, fs, filepath: join(filepath, child), index }) - ); - await Promise.all(promises); - } else { - const object = stats.isSymbolicLink() - ? await fs.readlink(join(dir, filepath)) - : await fs.read(join(dir, filepath)); - if (object === null) throw new NotFoundError(filepath) - const oid = await _writeObject({ fs, gitdir, type: 'blob', object }); - index.insert({ filepath, stats, oid }); - } -} - -// @ts-check - -/** - * - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {SignCallback} [args.onSign] - * @param {string} args.gitdir - * @param {string} args.message - * @param {Object} args.author - * @param {string} args.author.name - * @param {string} args.author.email - * @param {number} args.author.timestamp - * @param {number} args.author.timezoneOffset - * @param {Object} args.committer - * @param {string} args.committer.name - * @param {string} args.committer.email - * @param {number} args.committer.timestamp - * @param {number} args.committer.timezoneOffset - * @param {string} [args.signingKey] - * @param {boolean} [args.dryRun = false] - * @param {boolean} [args.noUpdateBranch = false] - * @param {string} [args.ref] - * @param {string[]} [args.parent] - * @param {string} [args.tree] - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly created commit. - */ -async function _commit({ - fs, - cache, - onSign, - gitdir, - message, - author, - committer, - signingKey, - dryRun = false, - noUpdateBranch = false, - ref, - parent, - tree, -}) { - if (!ref) { - ref = await GitRefManager.resolve({ - fs, - gitdir, - ref: 'HEAD', - depth: 2, - }); - } - - return GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) { - const inodes = flatFileListToDirectoryStructure(index.entries); - const inode = inodes.get('.'); - if (!tree) { - tree = await constructTree({ fs, gitdir, inode, dryRun }); - } - if (!parent) { - try { - parent = [ - await GitRefManager.resolve({ - fs, - gitdir, - ref, - }), - ]; - } catch (err) { - // Probably an initial commit - parent = []; - } - } - let comm = GitCommit.from({ - tree, - parent, - author, - committer, - message, - }); - if (signingKey) { - comm = await GitCommit.sign(comm, onSign, signingKey); - } - const oid = await _writeObject({ - fs, - gitdir, - type: 'commit', - object: comm.toObject(), - dryRun, - }); - if (!noUpdateBranch && !dryRun) { - // Update branch pointer - await GitRefManager.writeRef({ - fs, - gitdir, - ref, - value: oid, - }); - } - return oid - }) -} - -async function constructTree({ fs, gitdir, inode, dryRun }) { - // use depth first traversal - const children = inode.children; - for (const inode of children) { - if (inode.type === 'tree') { - inode.metadata.mode = '040000'; - inode.metadata.oid = await constructTree({ fs, gitdir, inode, dryRun }); - } - } - const entries = children.map(inode => ({ - mode: inode.metadata.mode, - path: inode.basename, - oid: inode.metadata.oid, - type: inode.type, - })); - const tree = GitTree.from(entries); - const oid = await _writeObject({ - fs, - gitdir, - type: 'tree', - object: tree.toObject(), - dryRun, - }); - return oid -} - -// @ts-check - -async function resolveFilepath({ fs, cache, gitdir, oid, filepath }) { - // Ensure there are no leading or trailing directory separators. - // I was going to do this automatically, but then found that the Git Terminal for Windows - // auto-expands --filepath=/src/utils to --filepath=C:/Users/Will/AppData/Local/Programs/Git/src/utils - // so I figured it would be wise to promote the behavior in the application layer not just the library layer. - if (filepath.startsWith('/')) { - throw new InvalidFilepathError('leading-slash') - } else if (filepath.endsWith('/')) { - throw new InvalidFilepathError('trailing-slash') - } - const _oid = oid; - const result = await resolveTree({ fs, cache, gitdir, oid }); - const tree = result.tree; - if (filepath === '') { - oid = result.oid; - } else { - const pathArray = filepath.split('/'); - oid = await _resolveFilepath({ - fs, - cache, - gitdir, - tree, - pathArray, - oid: _oid, - filepath, - }); - } - return oid -} - -async function _resolveFilepath({ - fs, - cache, - gitdir, - tree, - pathArray, - oid, - filepath, -}) { - const name = pathArray.shift(); - for (const entry of tree) { - if (entry.path === name) { - if (pathArray.length === 0) { - return entry.oid - } else { - const { type, object } = await _readObject({ - fs, - cache, - gitdir, - oid: entry.oid, - }); - if (type !== 'tree') { - throw new ObjectTypeError(oid, type, 'blob', filepath) - } - tree = GitTree.from(object); - return _resolveFilepath({ - fs, - cache, - gitdir, - tree, - pathArray, - oid, - filepath, - }) - } - } - } - throw new NotFoundError(`file or directory found at "${oid}:${filepath}"`) -} - -// @ts-check - -/** - * - * @typedef {Object} ReadTreeResult - The object returned has the following schema: - * @property {string} oid - SHA-1 object id of this tree - * @property {TreeObject} tree - the parsed tree object - */ - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} args.oid - * @param {string} [args.filepath] - * - * @returns {Promise<ReadTreeResult>} - */ -async function _readTree({ - fs, - cache, - gitdir, - oid, - filepath = undefined, -}) { - if (filepath !== undefined) { - oid = await resolveFilepath({ fs, cache, gitdir, oid, filepath }); - } - const { tree, oid: treeOid } = await resolveTree({ fs, cache, gitdir, oid }); - const result = { - oid: treeOid, - tree: tree.entries(), - }; - return result -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {TreeObject} args.tree - * - * @returns {Promise<string>} - */ -async function _writeTree({ fs, gitdir, tree }) { - // Convert object to buffer - const object = GitTree.from(tree).toObject(); - const oid = await _writeObject({ - fs, - gitdir, - type: 'tree', - object, - format: 'content', - }); - return oid -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {SignCallback} [args.onSign] - * @param {string} args.gitdir - * @param {string} args.ref - * @param {string} args.oid - * @param {string|Uint8Array} args.note - * @param {boolean} [args.force] - * @param {Object} args.author - * @param {string} args.author.name - * @param {string} args.author.email - * @param {number} args.author.timestamp - * @param {number} args.author.timezoneOffset - * @param {Object} args.committer - * @param {string} args.committer.name - * @param {string} args.committer.email - * @param {number} args.committer.timestamp - * @param {number} args.committer.timezoneOffset - * @param {string} [args.signingKey] - * - * @returns {Promise<string>} - */ - -async function _addNote({ - fs, - cache, - onSign, - gitdir, - ref, - oid, - note, - force, - author, - committer, - signingKey, -}) { - // Get the current note commit - let parent; - try { - parent = await GitRefManager.resolve({ gitdir, fs, ref }); - } catch (err) { - if (!(err instanceof NotFoundError)) { - throw err - } - } - - // I'm using the "empty tree" magic number here for brevity - const result = await _readTree({ - fs, - cache, - gitdir, - oid: parent || '4b825dc642cb6eb9a060e54bf8d69288fbee4904', - }); - let tree = result.tree; - - // Handle the case where a note already exists - if (force) { - tree = tree.filter(entry => entry.path !== oid); - } else { - for (const entry of tree) { - if (entry.path === oid) { - throw new AlreadyExistsError('note', oid) - } - } - } - - // Create the note blob - if (typeof note === 'string') { - note = Buffer.from(note, 'utf8'); - } - const noteOid = await _writeObject({ - fs, - gitdir, - type: 'blob', - object: note, - format: 'content', - }); - - // Create the new note tree - tree.push({ mode: '100644', path: oid, oid: noteOid, type: 'blob' }); - const treeOid = await _writeTree({ - fs, - gitdir, - tree, - }); - - // Create the new note commit - const commitOid = await _commit({ - fs, - cache, - onSign, - gitdir, - ref, - tree: treeOid, - parent: parent && [parent], - message: `Note added by 'isomorphic-git addNote'\n`, - author, - committer, - signingKey, - }); - - return commitOid -} - -// @ts-check - -/** - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.path - * - * @returns {Promise<any>} Resolves with the config value - * - * @example - * // Read config value - * let value = await git.getConfig({ - * dir: '$input((/))', - * path: '$input((user.name))' - * }) - * console.log(value) - * - */ -async function _getConfig({ fs, gitdir, path }) { - const config = await GitConfigManager.get({ fs, gitdir }); - return config.get(path) -} - -/** - * - * @returns {Promise<void | {name: string, email: string, date: Date, timestamp: number, timezoneOffset: number }>} - */ -async function normalizeAuthorObject({ fs, gitdir, author = {} }) { - let { name, email, timestamp, timezoneOffset } = author; - name = name || (await _getConfig({ fs, gitdir, path: 'user.name' })); - email = email || (await _getConfig({ fs, gitdir, path: 'user.email' })) || ''; - - if (name === undefined) { - return undefined - } - - timestamp = timestamp != null ? timestamp : Math.floor(Date.now() / 1000); - timezoneOffset = - timezoneOffset != null - ? timezoneOffset - : new Date(timestamp * 1000).getTimezoneOffset(); - - return { name, email, timestamp, timezoneOffset } -} - -/** - * - * @returns {Promise<void | {name: string, email: string, timestamp: number, timezoneOffset: number }>} - */ -async function normalizeCommitterObject({ - fs, - gitdir, - author, - committer, -}) { - committer = Object.assign({}, committer || author); - // Match committer's date to author's one, if omitted - if (author) { - committer.timestamp = committer.timestamp || author.timestamp; - committer.timezoneOffset = committer.timezoneOffset || author.timezoneOffset; - } - committer = await normalizeAuthorObject({ fs, gitdir, author: committer }); - return committer -} - -// @ts-check - -/** - * Add or update an object note - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - The notes ref to look under - * @param {string} args.oid - The SHA-1 object id of the object to add the note to. - * @param {string|Uint8Array} args.note - The note to add - * @param {boolean} [args.force] - Over-write note if it already exists. - * @param {Object} [args.author] - The details about the author. - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer = author] - The details about the note committer, in the same format as the author parameter. If not specified, the author details are used. - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - Sign the note commit using this private PGP key. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the commit object for the added note. - */ - -async function addNote({ - fs: _fs, - onSign, - dir, - gitdir = join(dir, '.git'), - ref = 'refs/notes/commits', - oid, - note, - force, - author: _author, - committer: _committer, - signingKey, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - assertParameter('note', note); - if (signingKey) { - assertParameter('onSign', onSign); - } - const fs = new FileSystem(_fs); - - const author = await normalizeAuthorObject({ fs, gitdir, author: _author }); - if (!author) throw new MissingNameError('author') - - const committer = await normalizeCommitterObject({ - fs, - gitdir, - author, - committer: _committer, - }); - if (!committer) throw new MissingNameError('committer') - - return await _addNote({ - fs: new FileSystem(fs), - cache, - onSign, - gitdir, - ref, - oid, - note, - force, - author, - committer, - signingKey, - }) - } catch (err) { - err.caller = 'git.addNote'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.remote - * @param {string} args.url - * @param {boolean} args.force - * - * @returns {Promise<void>} - * - */ -async function _addRemote({ fs, gitdir, remote, url, force }) { - if (remote !== cleanGitRef.clean(remote)) { - throw new InvalidRefNameError(remote, cleanGitRef.clean(remote)) - } - const config = await GitConfigManager.get({ fs, gitdir }); - if (!force) { - // Check that setting it wouldn't overwrite. - const remoteNames = await config.getSubsections('remote'); - if (remoteNames.includes(remote)) { - // Throw an error if it would overwrite an existing remote, - // but not if it's simply setting the same value again. - if (url !== (await config.get(`remote.${remote}.url`))) { - throw new AlreadyExistsError('remote', remote) - } - } - } - await config.set(`remote.${remote}.url`, url); - await config.set( - `remote.${remote}.fetch`, - `+refs/heads/*:refs/remotes/${remote}/*` - ); - await GitConfigManager.save({ fs, gitdir, config }); -} - -// @ts-check - -/** - * Add or update a remote - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.remote - The name of the remote - * @param {string} args.url - The URL of the remote - * @param {boolean} [args.force = false] - Instead of throwing an error if a remote named `remote` already exists, overwrite the existing remote. - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.addRemote({ - * fs, - * dir: '/tutorial', - * remote: 'upstream', - * url: 'https://github.com/isomorphic-git/isomorphic-git' - * }) - * console.log('done') - * - */ -async function addRemote({ - fs, - dir, - gitdir = join(dir, '.git'), - remote, - url, - force = false, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('remote', remote); - assertParameter('url', url); - return await _addRemote({ - fs: new FileSystem(fs), - gitdir, - remote, - url, - force, - }) - } catch (err) { - err.caller = 'git.addRemote'; - throw err - } -} - -// @ts-check - -/** - * Create an annotated tag. - * - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {SignCallback} [args.onSign] - * @param {string} args.gitdir - * @param {string} args.ref - * @param {string} [args.message = ref] - * @param {string} [args.object = 'HEAD'] - * @param {object} [args.tagger] - * @param {string} args.tagger.name - * @param {string} args.tagger.email - * @param {number} args.tagger.timestamp - * @param {number} args.tagger.timezoneOffset - * @param {string} [args.gpgsig] - * @param {string} [args.signingKey] - * @param {boolean} [args.force = false] - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.annotatedTag({ - * dir: '$input((/))', - * ref: '$input((test-tag))', - * message: '$input((This commit is awesome))', - * tagger: { - * name: '$input((Mr. Test))', - * email: '$input((mrtest@example.com))' - * } - * }) - * console.log('done') - * - */ -async function _annotatedTag({ - fs, - cache, - onSign, - gitdir, - ref, - tagger, - message = ref, - gpgsig, - object, - signingKey, - force = false, -}) { - ref = ref.startsWith('refs/tags/') ? ref : `refs/tags/${ref}`; - - if (!force && (await GitRefManager.exists({ fs, gitdir, ref }))) { - throw new AlreadyExistsError('tag', ref) - } - - // Resolve passed value - const oid = await GitRefManager.resolve({ - fs, - gitdir, - ref: object || 'HEAD', - }); - - const { type } = await _readObject({ fs, cache, gitdir, oid }); - let tagObject = GitAnnotatedTag.from({ - object: oid, - type, - tag: ref.replace('refs/tags/', ''), - tagger, - message, - gpgsig, - }); - if (signingKey) { - tagObject = await GitAnnotatedTag.sign(tagObject, onSign, signingKey); - } - const value = await _writeObject({ - fs, - gitdir, - type: 'tag', - object: tagObject.toObject(), - }); - - await GitRefManager.writeRef({ fs, gitdir, ref, value }); -} - -// @ts-check - -/** - * Create an annotated tag. - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - What to name the tag - * @param {string} [args.message = ref] - The tag message to use. - * @param {string} [args.object = 'HEAD'] - The SHA-1 object id the tag points to. (Will resolve to a SHA-1 object id if value is a ref.) By default, the commit object which is referred by the current `HEAD` is used. - * @param {object} [args.tagger] - The details about the tagger. - * @param {string} [args.tagger.name] - Default is `user.name` config. - * @param {string} [args.tagger.email] - Default is `user.email` config. - * @param {number} [args.tagger.timestamp=Math.floor(Date.now()/1000)] - Set the tagger timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.tagger.timezoneOffset] - Set the tagger timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.gpgsig] - The gpgsig attatched to the tag object. (Mutually exclusive with the `signingKey` option.) - * @param {string} [args.signingKey] - Sign the tag object using this private PGP key. (Mutually exclusive with the `gpgsig` option.) - * @param {boolean} [args.force = false] - Instead of throwing an error if a tag named `ref` already exists, overwrite the existing tag. Note that this option does not modify the original tag object itself. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.annotatedTag({ - * fs, - * dir: '/tutorial', - * ref: 'test-tag', - * message: 'This commit is awesome', - * tagger: { - * name: 'Mr. Test', - * email: 'mrtest@example.com' - * } - * }) - * console.log('done') - * - */ -async function annotatedTag({ - fs: _fs, - onSign, - dir, - gitdir = join(dir, '.git'), - ref, - tagger: _tagger, - message = ref, - gpgsig, - object, - signingKey, - force = false, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - if (signingKey) { - assertParameter('onSign', onSign); - } - const fs = new FileSystem(_fs); - - // Fill in missing arguments with default values - const tagger = await normalizeAuthorObject({ fs, gitdir, author: _tagger }); - if (!tagger) throw new MissingNameError('tagger') - - return await _annotatedTag({ - fs, - cache, - onSign, - gitdir, - ref, - tagger, - message, - gpgsig, - object, - signingKey, - force, - }) - } catch (err) { - err.caller = 'git.annotatedTag'; - throw err - } -} - -// @ts-check - -/** - * Create a branch - * - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.ref - * @param {boolean} [args.checkout = false] - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.branch({ dir: '$input((/))', ref: '$input((develop))' }) - * console.log('done') - * - */ -async function _branch({ fs, gitdir, ref, checkout = false }) { - if (ref !== cleanGitRef.clean(ref)) { - throw new InvalidRefNameError(ref, cleanGitRef.clean(ref)) - } - - const fullref = `refs/heads/${ref}`; - - const exist = await GitRefManager.exists({ fs, gitdir, ref: fullref }); - if (exist) { - throw new AlreadyExistsError('branch', ref, false) - } - - // Get current HEAD tree oid - let oid; - try { - oid = await GitRefManager.resolve({ fs, gitdir, ref: 'HEAD' }); - } catch (e) { - // Probably an empty repo - } - - // Create a new ref that points at the current commit - if (oid) { - await GitRefManager.writeRef({ fs, gitdir, ref: fullref, value: oid }); - } - - if (checkout) { - // Update HEAD - await GitRefManager.writeSymbolicRef({ - fs, - gitdir, - ref: 'HEAD', - value: fullref, - }); - } -} - -// @ts-check - -/** - * Create a branch - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - What to name the branch - * @param {boolean} [args.checkout = false] - Update `HEAD` to point at the newly created branch - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.branch({ fs, dir: '/tutorial', ref: 'develop' }) - * console.log('done') - * - */ -async function branch({ - fs, - dir, - gitdir = join(dir, '.git'), - ref, - checkout = false, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - return await _branch({ - fs: new FileSystem(fs), - gitdir, - ref, - checkout, - }) - } catch (err) { - err.caller = 'git.branch'; - throw err - } -} - -// https://dev.to/namirsab/comment/2050 -function arrayRange(start, end) { - const length = end - start; - return Array.from({ length }, (_, i) => start + i) -} - -// TODO: Should I just polyfill Array.flat? -const flat = - typeof Array.prototype.flat === 'undefined' - ? entries => entries.reduce((acc, x) => acc.concat(x), []) - : entries => entries.flat(); - -// This is convenient for computing unions/joins of sorted lists. -class RunningMinimum { - constructor() { - // Using a getter for 'value' would just bloat the code. - // You know better than to set it directly right? - this.value = null; - } - - consider(value) { - if (value === null || value === undefined) return - if (this.value === null) { - this.value = value; - } else if (value < this.value) { - this.value = value; - } - } - - reset() { - this.value = null; - } -} - -// Take an array of length N of -// iterators of length Q_n -// of strings -// and return an iterator of length max(Q_n) for all n -// of arrays of length N -// of string|null who all have the same string value -function* unionOfIterators(sets) { - /* NOTE: We can assume all arrays are sorted. - * Indexes are sorted because they are defined that way: - * - * > Index entries are sorted in ascending order on the name field, - * > interpreted as a string of unsigned bytes (i.e. memcmp() order, no - * > localization, no special casing of directory separator '/'). Entries - * > with the same name are sorted by their stage field. - * - * Trees should be sorted because they are created directly from indexes. - * They definitely should be sorted, or else they wouldn't have a unique SHA1. - * So that would be very naughty on the part of the tree-creator. - * - * Lastly, the working dir entries are sorted because I choose to sort them - * in my FileSystem.readdir() implementation. - */ - - // Init - const min = new RunningMinimum(); - let minimum; - const heads = []; - const numsets = sets.length; - for (let i = 0; i < numsets; i++) { - // Abuse the fact that iterators continue to return 'undefined' for value - // once they are done - heads[i] = sets[i].next().value; - if (heads[i] !== undefined) { - min.consider(heads[i]); - } - } - if (min.value === null) return - // Iterate - while (true) { - const result = []; - minimum = min.value; - min.reset(); - for (let i = 0; i < numsets; i++) { - if (heads[i] !== undefined && heads[i] === minimum) { - result[i] = heads[i]; - heads[i] = sets[i].next().value; - } else { - // A little hacky, but eh - result[i] = null; - } - if (heads[i] !== undefined) { - min.consider(heads[i]); - } - } - yield result; - if (min.value === null) return - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {string} [args.dir] - * @param {string} [args.gitdir=join(dir,'.git')] - * @param {Walker[]} args.trees - * @param {WalkerMap} [args.map] - * @param {WalkerReduce} [args.reduce] - * @param {WalkerIterate} [args.iterate] - * - * @returns {Promise<any>} The finished tree-walking result - * - * @see {WalkerMap} - * - */ -async function _walk({ - fs, - cache, - dir, - gitdir, - trees, - // @ts-ignore - map = async (_, entry) => entry, - // The default reducer is a flatmap that filters out undefineds. - reduce = async (parent, children) => { - const flatten = flat(children); - if (parent !== undefined) flatten.unshift(parent); - return flatten - }, - // The default iterate function walks all children concurrently - iterate = (walk, children) => Promise.all([...children].map(walk)), -}) { - const walkers = trees.map(proxy => - proxy[GitWalkSymbol]({ fs, dir, gitdir, cache }) - ); - - const root = new Array(walkers.length).fill('.'); - const range = arrayRange(0, walkers.length); - const unionWalkerFromReaddir = async entries => { - range.map(i => { - entries[i] = entries[i] && new walkers[i].ConstructEntry(entries[i]); - }); - const subdirs = await Promise.all( - range.map(i => (entries[i] ? walkers[i].readdir(entries[i]) : [])) - ); - // Now process child directories - const iterators = subdirs - .map(array => (array === null ? [] : array)) - .map(array => array[Symbol.iterator]()); - return { - entries, - children: unionOfIterators(iterators), - } - }; - - const walk = async root => { - const { entries, children } = await unionWalkerFromReaddir(root); - const fullpath = entries.find(entry => entry && entry._fullpath)._fullpath; - const parent = await map(fullpath, entries); - if (parent !== null) { - let walkedChildren = await iterate(walk, children); - walkedChildren = walkedChildren.filter(x => x !== undefined); - return reduce(parent, walkedChildren) - } - }; - return walk(root) -} - -const worthWalking = (filepath, root) => { - if (filepath === '.' || root == null || root.length === 0 || root === '.') { - return true - } - if (root.length >= filepath.length) { - return root.startsWith(filepath) - } else { - return filepath.startsWith(root) - } -}; - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {ProgressCallback} [args.onProgress] - * @param {string} args.dir - * @param {string} args.gitdir - * @param {string} args.ref - * @param {string[]} [args.filepaths] - * @param {string} args.remote - * @param {boolean} args.noCheckout - * @param {boolean} [args.noUpdateHead] - * @param {boolean} [args.dryRun] - * @param {boolean} [args.force] - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - */ -async function _checkout({ - fs, - cache, - onProgress, - dir, - gitdir, - remote, - ref, - filepaths, - noCheckout, - noUpdateHead, - dryRun, - force, -}) { - // Get tree oid - let oid; - try { - oid = await GitRefManager.resolve({ fs, gitdir, ref }); - // TODO: Figure out what to do if both 'ref' and 'remote' are specified, ref already exists, - // and is configured to track a different remote. - } catch (err) { - if (ref === 'HEAD') throw err - // If `ref` doesn't exist, create a new remote tracking branch - // Figure out the commit to checkout - const remoteRef = `${remote}/${ref}`; - oid = await GitRefManager.resolve({ - fs, - gitdir, - ref: remoteRef, - }); - // Set up remote tracking branch - const config = await GitConfigManager.get({ fs, gitdir }); - await config.set(`branch.${ref}.remote`, remote); - await config.set(`branch.${ref}.merge`, `refs/heads/${ref}`); - await GitConfigManager.save({ fs, gitdir, config }); - // Create a new branch that points at that same commit - await GitRefManager.writeRef({ - fs, - gitdir, - ref: `refs/heads/${ref}`, - value: oid, - }); - } - - // Update working dir - if (!noCheckout) { - let ops; - // First pass - just analyze files (not directories) and figure out what needs to be done - try { - ops = await analyze({ - fs, - cache, - onProgress, - dir, - gitdir, - ref, - force, - filepaths, - }); - } catch (err) { - // Throw a more helpful error message for this common mistake. - if (err instanceof NotFoundError && err.data.what === oid) { - throw new CommitNotFetchedError(ref, oid) - } else { - throw err - } - } - - // Report conflicts - const conflicts = ops - .filter(([method]) => method === 'conflict') - .map(([method, fullpath]) => fullpath); - if (conflicts.length > 0) { - throw new CheckoutConflictError(conflicts) - } - - // Collect errors - const errors = ops - .filter(([method]) => method === 'error') - .map(([method, fullpath]) => fullpath); - if (errors.length > 0) { - throw new InternalError(errors.join(', ')) - } - - if (dryRun) { - // Since the format of 'ops' is in flux, I really would rather folk besides myself not start relying on it - // return ops - return - } - - // Second pass - execute planned changes - // The cheapest semi-parallel solution without computing a full dependency graph will be - // to just do ops in 4 dumb phases: delete files, delete dirs, create dirs, write files - - let count = 0; - const total = ops.length; - await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) { - await Promise.all( - ops - .filter( - ([method]) => method === 'delete' || method === 'delete-index' - ) - .map(async function([method, fullpath]) { - const filepath = `${dir}/${fullpath}`; - if (method === 'delete') { - await fs.rm(filepath); - } - index.delete({ filepath: fullpath }); - if (onProgress) { - await onProgress({ - phase: 'Updating workdir', - loaded: ++count, - total, - }); - } - }) - ); - }); - - // Note: this is cannot be done naively in parallel - await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) { - for (const [method, fullpath] of ops) { - if (method === 'rmdir' || method === 'rmdir-index') { - const filepath = `${dir}/${fullpath}`; - try { - if (method === 'rmdir-index') { - index.delete({ filepath: fullpath }); - } - await fs.rmdir(filepath); - if (onProgress) { - await onProgress({ - phase: 'Updating workdir', - loaded: ++count, - total, - }); - } - } catch (e) { - if (e.code === 'ENOTEMPTY') { - console.log( - `Did not delete ${fullpath} because directory is not empty` - ); - } else { - throw e - } - } - } - } - }); - - await Promise.all( - ops - .filter(([method]) => method === 'mkdir' || method === 'mkdir-index') - .map(async function([_, fullpath]) { - const filepath = `${dir}/${fullpath}`; - await fs.mkdir(filepath); - if (onProgress) { - await onProgress({ - phase: 'Updating workdir', - loaded: ++count, - total, - }); - } - }) - ); - - await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) { - await Promise.all( - ops - .filter( - ([method]) => - method === 'create' || - method === 'create-index' || - method === 'update' || - method === 'mkdir-index' - ) - .map(async function([method, fullpath, oid, mode, chmod]) { - const filepath = `${dir}/${fullpath}`; - try { - if (method !== 'create-index' && method !== 'mkdir-index') { - const { object } = await _readObject({ fs, cache, gitdir, oid }); - if (chmod) { - // Note: the mode option of fs.write only works when creating files, - // not updating them. Since the `fs` plugin doesn't expose `chmod` this - // is our only option. - await fs.rm(filepath); - } - if (mode === 0o100644) { - // regular file - await fs.write(filepath, object); - } else if (mode === 0o100755) { - // executable file - await fs.write(filepath, object, { mode: 0o777 }); - } else if (mode === 0o120000) { - // symlink - await fs.writelink(filepath, object); - } else { - throw new InternalError( - `Invalid mode 0o${mode.toString(8)} detected in blob ${oid}` - ) - } - } - - const stats = await fs.lstat(filepath); - // We can't trust the executable bit returned by lstat on Windows, - // so we need to preserve this value from the TREE. - // TODO: Figure out how git handles this internally. - if (mode === 0o100755) { - stats.mode = 0o755; - } - // Submodules are present in the git index but use a unique mode different from trees - if (method === 'mkdir-index') { - stats.mode = 0o160000; - } - index.insert({ - filepath: fullpath, - stats, - oid, - }); - if (onProgress) { - await onProgress({ - phase: 'Updating workdir', - loaded: ++count, - total, - }); - } - } catch (e) { - console.log(e); - } - }) - ); - }); - } - - // Update HEAD - if (!noUpdateHead) { - const fullRef = await GitRefManager.expand({ fs, gitdir, ref }); - if (fullRef.startsWith('refs/heads')) { - await GitRefManager.writeSymbolicRef({ - fs, - gitdir, - ref: 'HEAD', - value: fullRef, - }); - } else { - // detached head - await GitRefManager.writeRef({ fs, gitdir, ref: 'HEAD', value: oid }); - } - } -} - -async function analyze({ - fs, - cache, - onProgress, - dir, - gitdir, - ref, - force, - filepaths, -}) { - let count = 0; - return _walk({ - fs, - cache, - dir, - gitdir, - trees: [TREE({ ref }), WORKDIR(), STAGE()], - map: async function(fullpath, [commit, workdir, stage]) { - if (fullpath === '.') return - // match against base paths - if (filepaths && !filepaths.some(base => worthWalking(fullpath, base))) { - return null - } - // Emit progress event - if (onProgress) { - await onProgress({ phase: 'Analyzing workdir', loaded: ++count }); - } - - // This is a kind of silly pattern but it worked so well for me in the past - // and it makes intuitively demonstrating exhaustiveness so *easy*. - // This checks for the presense and/or absense of each of the 3 entries, - // converts that to a 3-bit binary representation, and then handles - // every possible combination (2^3 or 8 cases) with a lookup table. - const key = [!!stage, !!commit, !!workdir].map(Number).join(''); - switch (key) { - // Impossible case. - case '000': - return - // Ignore workdir files that are not tracked and not part of the new commit. - case '001': - // OK, make an exception for explicitly named files. - if (force && filepaths && filepaths.includes(fullpath)) { - return ['delete', fullpath] - } - return - // New entries - case '010': { - switch (await commit.type()) { - case 'tree': { - return ['mkdir', fullpath] - } - case 'blob': { - return [ - 'create', - fullpath, - await commit.oid(), - await commit.mode(), - ] - } - case 'commit': { - return [ - 'mkdir-index', - fullpath, - await commit.oid(), - await commit.mode(), - ] - } - default: { - return [ - 'error', - `new entry Unhandled type ${await commit.type()}`, - ] - } - } - } - // New entries but there is already something in the workdir there. - case '011': { - switch (`${await commit.type()}-${await workdir.type()}`) { - case 'tree-tree': { - return // noop - } - case 'tree-blob': - case 'blob-tree': { - return ['conflict', fullpath] - } - case 'blob-blob': { - // Is the incoming file different? - if ((await commit.oid()) !== (await workdir.oid())) { - if (force) { - return [ - 'update', - fullpath, - await commit.oid(), - await commit.mode(), - (await commit.mode()) !== (await workdir.mode()), - ] - } else { - return ['conflict', fullpath] - } - } else { - // Is the incoming file a different mode? - if ((await commit.mode()) !== (await workdir.mode())) { - if (force) { - return [ - 'update', - fullpath, - await commit.oid(), - await commit.mode(), - true, - ] - } else { - return ['conflict', fullpath] - } - } else { - return [ - 'create-index', - fullpath, - await commit.oid(), - await commit.mode(), - ] - } - } - } - case 'commit-tree': { - // TODO: submodule - // We'll ignore submodule directories for now. - // Users prefer we not throw an error for lack of submodule support. - // gitlinks - return - } - case 'commit-blob': { - // TODO: submodule - // But... we'll complain if there is a *file* where we would - // put a submodule if we had submodule support. - return ['conflict', fullpath] - } - default: { - return ['error', `new entry Unhandled type ${commit.type}`] - } - } - } - // Something in stage but not in the commit OR the workdir. - // Note: I verified this behavior against canonical git. - case '100': { - return ['delete-index', fullpath] - } - // Deleted entries - // TODO: How to handle if stage type and workdir type mismatch? - case '101': { - switch (await stage.type()) { - case 'tree': { - return ['rmdir', fullpath] - } - case 'blob': { - // Git checks that the workdir.oid === stage.oid before deleting file - if ((await stage.oid()) !== (await workdir.oid())) { - if (force) { - return ['delete', fullpath] - } else { - return ['conflict', fullpath] - } - } else { - return ['delete', fullpath] - } - } - case 'commit': { - return ['rmdir-index', fullpath] - } - default: { - return [ - 'error', - `delete entry Unhandled type ${await stage.type()}`, - ] - } - } - } - /* eslint-disable no-fallthrough */ - // File missing from workdir - case '110': - // Possibly modified entries - case '111': { - /* eslint-enable no-fallthrough */ - switch (`${await stage.type()}-${await commit.type()}`) { - case 'tree-tree': { - return - } - case 'blob-blob': { - // If the file hasn't changed, there is no need to do anything. - // Existing file modifications in the workdir can be be left as is. - if ( - (await stage.oid()) === (await commit.oid()) && - (await stage.mode()) === (await commit.mode()) && - !force - ) { - return - } - - // Check for local changes that would be lost - if (workdir) { - // Note: canonical git only compares with the stage. But we're smart enough - // to compare to the stage AND the incoming commit. - if ( - (await workdir.oid()) !== (await stage.oid()) && - (await workdir.oid()) !== (await commit.oid()) - ) { - if (force) { - return [ - 'update', - fullpath, - await commit.oid(), - await commit.mode(), - (await commit.mode()) !== (await workdir.mode()), - ] - } else { - return ['conflict', fullpath] - } - } - } else if (force) { - return [ - 'update', - fullpath, - await commit.oid(), - await commit.mode(), - (await commit.mode()) !== (await stage.mode()), - ] - } - // Has file mode changed? - if ((await commit.mode()) !== (await stage.mode())) { - return [ - 'update', - fullpath, - await commit.oid(), - await commit.mode(), - true, - ] - } - // TODO: HANDLE SYMLINKS - // Has the file content changed? - if ((await commit.oid()) !== (await stage.oid())) { - return [ - 'update', - fullpath, - await commit.oid(), - await commit.mode(), - false, - ] - } else { - return - } - } - case 'tree-blob': { - return ['update-dir-to-blob', fullpath, await commit.oid()] - } - case 'blob-tree': { - return ['update-blob-to-tree', fullpath] - } - case 'commit-commit': { - return [ - 'mkdir-index', - fullpath, - await commit.oid(), - await commit.mode(), - ] - } - default: { - return [ - 'error', - `update entry Unhandled type ${await stage.type()}-${await commit.type()}`, - ] - } - } - } - } - }, - // Modify the default flat mapping - reduce: async function(parent, children) { - children = flat(children); - if (!parent) { - return children - } else if (parent && parent[0] === 'rmdir') { - children.push(parent); - return children - } else { - children.unshift(parent); - return children - } - }, - }) -} - -// @ts-check - -/** - * Checkout a branch - * - * If the branch already exists it will check out that branch. Otherwise, it will create a new remote tracking branch set to track the remote branch of that name. - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref = 'HEAD'] - Source to checkout files from - * @param {string[]} [args.filepaths] - Limit the checkout to the given files and directories - * @param {string} [args.remote = 'origin'] - Which remote repository to use - * @param {boolean} [args.noCheckout = false] - If true, will update HEAD but won't update the working directory - * @param {boolean} [args.noUpdateHead] - If true, will update the working directory but won't update HEAD. Defaults to `false` when `ref` is provided, and `true` if `ref` is not provided. - * @param {boolean} [args.dryRun = false] - If true, simulates a checkout so you can test whether it would succeed. - * @param {boolean} [args.force = false] - If true, conflicts will be ignored and files will be overwritten regardless of local changes. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * // switch to the main branch - * await git.checkout({ - * fs, - * dir: '/tutorial', - * ref: 'main' - * }) - * console.log('done') - * - * @example - * // restore the 'docs' and 'src/docs' folders to the way they were, overwriting any changes - * await git.checkout({ - * fs, - * dir: '/tutorial', - * force: true, - * filepaths: ['docs', 'src/docs'] - * }) - * console.log('done') - * - * @example - * // restore the 'docs' and 'src/docs' folders to the way they are in the 'develop' branch, overwriting any changes - * await git.checkout({ - * fs, - * dir: '/tutorial', - * ref: 'develop', - * noUpdateHead: true, - * force: true, - * filepaths: ['docs', 'src/docs'] - * }) - * console.log('done') - */ -async function checkout({ - fs, - onProgress, - dir, - gitdir = join(dir, '.git'), - remote = 'origin', - ref: _ref, - filepaths, - noCheckout = false, - noUpdateHead = _ref === undefined, - dryRun = false, - force = false, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('dir', dir); - assertParameter('gitdir', gitdir); - - const ref = _ref || 'HEAD'; - return await _checkout({ - fs: new FileSystem(fs), - cache, - onProgress, - dir, - gitdir, - remote, - ref, - filepaths, - noCheckout, - noUpdateHead, - dryRun, - force, - }) - } catch (err) { - err.caller = 'git.checkout'; - throw err - } -} - -// @see https://git-scm.com/docs/git-rev-parse.html#_specifying_revisions -const abbreviateRx = new RegExp('^refs/(heads/|tags/|remotes/)?(.*)'); - -function abbreviateRef(ref) { - const match = abbreviateRx.exec(ref); - if (match) { - if (match[1] === 'remotes/' && ref.endsWith('/HEAD')) { - return match[2].slice(0, -5) - } else { - return match[2] - } - } - return ref -} - -// @ts-check - -/** - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {boolean} [args.fullname = false] - Return the full path (e.g. "refs/heads/main") instead of the abbreviated form. - * @param {boolean} [args.test = false] - If the current branch doesn't actually exist (such as right after git init) then return `undefined`. - * - * @returns {Promise<string|void>} The name of the current branch or undefined if the HEAD is detached. - * - */ -async function _currentBranch({ - fs, - gitdir, - fullname = false, - test = false, -}) { - const ref = await GitRefManager.resolve({ - fs, - gitdir, - ref: 'HEAD', - depth: 2, - }); - if (test) { - try { - await GitRefManager.resolve({ fs, gitdir, ref }); - } catch (_) { - return - } - } - // Return `undefined` for detached HEAD - if (!ref.startsWith('refs/')) return - return fullname ? ref : abbreviateRef(ref) -} - -function translateSSHtoHTTP(url) { - // handle "shorter scp-like syntax" - url = url.replace(/^git@([^:]+):/, 'https://$1/'); - // handle proper SSH URLs - url = url.replace(/^ssh:\/\//, 'https://'); - return url -} - -function calculateBasicAuthHeader({ username = '', password = '' }) { - return `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}` -} - -// Currently 'for await' upsets my linters. -async function forAwait(iterable, cb) { - const iter = getIterator(iterable); - while (true) { - const { value, done } = await iter.next(); - if (value) await cb(value); - if (done) break - } - if (iter.return) iter.return(); -} - -async function collect(iterable) { - let size = 0; - const buffers = []; - // This will be easier once `for await ... of` loops are available. - await forAwait(iterable, value => { - buffers.push(value); - size += value.byteLength; - }); - const result = new Uint8Array(size); - let nextIndex = 0; - for (const buffer of buffers) { - result.set(buffer, nextIndex); - nextIndex += buffer.byteLength; - } - return result -} - -function extractAuthFromUrl(url) { - // For whatever reason, the `fetch` API does not convert credentials embedded in the URL - // into Basic Authentication headers automatically. Instead it throws an error! - // So we must manually parse the URL, rip out the user:password portion if it is present - // and compute the Authorization header. - // Note: I tried using new URL(url) but that throws a security exception in Edge. :rolleyes: - let userpass = url.match(/^https?:\/\/([^/]+)@/); - // No credentials, return the url unmodified and an empty auth object - if (userpass == null) return { url, auth: {} } - userpass = userpass[1]; - const [username, password] = userpass.split(':'); - // Remove credentials from URL - url = url.replace(`${userpass}@`, ''); - // Has credentials, return the fetch-safe URL and the parsed credentials - return { url, auth: { username, password } } -} - -function padHex(b, n) { - const s = n.toString(16); - return '0'.repeat(b - s.length) + s -} - -/** -pkt-line Format ---------------- - -Much (but not all) of the payload is described around pkt-lines. - -A pkt-line is a variable length binary string. The first four bytes -of the line, the pkt-len, indicates the total length of the line, -in hexadecimal. The pkt-len includes the 4 bytes used to contain -the length's hexadecimal representation. - -A pkt-line MAY contain binary data, so implementors MUST ensure -pkt-line parsing/formatting routines are 8-bit clean. - -A non-binary line SHOULD BE terminated by an LF, which if present -MUST be included in the total length. Receivers MUST treat pkt-lines -with non-binary data the same whether or not they contain the trailing -LF (stripping the LF if present, and not complaining when it is -missing). - -The maximum length of a pkt-line's data component is 65516 bytes. -Implementations MUST NOT send pkt-line whose length exceeds 65520 -(65516 bytes of payload + 4 bytes of length data). - -Implementations SHOULD NOT send an empty pkt-line ("0004"). - -A pkt-line with a length field of 0 ("0000"), called a flush-pkt, -is a special case and MUST be handled differently than an empty -pkt-line ("0004"). - ----- - pkt-line = data-pkt / flush-pkt - - data-pkt = pkt-len pkt-payload - pkt-len = 4*(HEXDIG) - pkt-payload = (pkt-len - 4)*(OCTET) - - flush-pkt = "0000" ----- - -Examples (as C-style strings): - ----- - pkt-line actual value - --------------------------------- - "0006a\n" "a\n" - "0005a" "a" - "000bfoobar\n" "foobar\n" - "0004" "" ----- -*/ - -// I'm really using this more as a namespace. -// There's not a lot of "state" in a pkt-line - -class GitPktLine { - static flush() { - return Buffer.from('0000', 'utf8') - } - - static delim() { - return Buffer.from('0001', 'utf8') - } - - static encode(line) { - if (typeof line === 'string') { - line = Buffer.from(line); - } - const length = line.length + 4; - const hexlength = padHex(4, length); - return Buffer.concat([Buffer.from(hexlength, 'utf8'), line]) - } - - static streamReader(stream) { - const reader = new StreamReader(stream); - return async function read() { - try { - let length = await reader.read(4); - if (length == null) return true - length = parseInt(length.toString('utf8'), 16); - if (length === 0) return null - if (length === 1) return null // delim packets - const buffer = await reader.read(length - 4); - if (buffer == null) return true - return buffer - } catch (err) { - console.log('error', err); - return true - } - } - } -} - -// @ts-check - -/** - * @param {function} read - */ -async function parseCapabilitiesV2(read) { - /** @type {Object<string, string | true>} */ - const capabilities2 = {}; - - let line; - while (true) { - line = await read(); - if (line === true) break - if (line === null) continue - line = line.toString('utf8').replace(/\n$/, ''); - const i = line.indexOf('='); - if (i > -1) { - const key = line.slice(0, i); - const value = line.slice(i + 1); - capabilities2[key] = value; - } else { - capabilities2[line] = true; - } - } - return { protocolVersion: 2, capabilities2 } -} - -async function parseRefsAdResponse(stream, { service }) { - const capabilities = new Set(); - const refs = new Map(); - const symrefs = new Map(); - - // There is probably a better way to do this, but for now - // let's just throw the result parser inline here. - const read = GitPktLine.streamReader(stream); - let lineOne = await read(); - // skip past any flushes - while (lineOne === null) lineOne = await read(); - if (lineOne === true) throw new EmptyServerResponseError() - // Clients MUST ignore an LF at the end of the line. - if (lineOne.toString('utf8').replace(/\n$/, '') !== `# service=${service}`) { - throw new ParseError(`# service=${service}\\n`, lineOne.toString('utf8')) - } - let lineTwo = await read(); - // skip past any flushes - while (lineTwo === null) lineTwo = await read(); - // In the edge case of a brand new repo, zero refs (and zero capabilities) - // are returned. - if (lineTwo === true) return { capabilities, refs, symrefs } - lineTwo = lineTwo.toString('utf8'); - // Handle protocol v2 responses - if (lineTwo.includes('version 2')) { - return parseCapabilitiesV2(read) - } - const [firstRef, capabilitiesLine] = splitAndAssert(lineTwo, '\x00', '\\x00'); - capabilitiesLine.split(' ').map(x => capabilities.add(x)); - const [ref, name] = splitAndAssert(firstRef, ' ', ' '); - refs.set(name, ref); - while (true) { - const line = await read(); - if (line === true) break - if (line !== null) { - const [ref, name] = splitAndAssert(line.toString('utf8'), ' ', ' '); - refs.set(name, ref); - } - } - // Symrefs are thrown into the "capabilities" unfortunately. - for (const cap of capabilities) { - if (cap.startsWith('symref=')) { - const m = cap.match(/symref=([^:]+):(.*)/); - if (m.length === 3) { - symrefs.set(m[1], m[2]); - } - } - } - return { protocolVersion: 1, capabilities, refs, symrefs } -} - -function splitAndAssert(line, sep, expected) { - const split = line.trim().split(sep); - if (split.length !== 2) { - throw new ParseError( - `Two strings separated by '${expected}'`, - line.toString('utf8') - ) - } - return split -} - -// Try to accomodate known CORS proxy implementations: -// - https://jcubic.pl/proxy.php? <-- uses query string -// - https://cors.isomorphic-git.org <-- uses path -const corsProxify = (corsProxy, url) => - corsProxy.endsWith('?') - ? `${corsProxy}${url}` - : `${corsProxy}/${url.replace(/^https?:\/\//, '')}`; - -const updateHeaders = (headers, auth) => { - // Update the basic auth header - if (auth.username || auth.password) { - headers.Authorization = calculateBasicAuthHeader(auth); - } - // but any manually provided headers take precedence - if (auth.headers) { - Object.assign(headers, auth.headers); - } -}; - -/** - * @param {GitHttpResponse} res - * - * @returns {{ preview: string, response: string, data: Buffer }} - */ -const stringifyBody = async res => { - try { - // Some services provide a meaningful error message in the body of 403s like "token lacks the scopes necessary to perform this action" - const data = Buffer.from(await collect(res.body)); - const response = data.toString('utf8'); - const preview = - response.length < 256 ? response : response.slice(0, 256) + '...'; - return { preview, response, data } - } catch (e) { - return {} - } -}; - -class GitRemoteHTTP { - static async capabilities() { - return ['discover', 'connect'] - } - - /** - * @param {Object} args - * @param {HttpClient} args.http - * @param {ProgressCallback} [args.onProgress] - * @param {AuthCallback} [args.onAuth] - * @param {AuthFailureCallback} [args.onAuthFailure] - * @param {AuthSuccessCallback} [args.onAuthSuccess] - * @param {string} [args.corsProxy] - * @param {string} args.service - * @param {string} args.url - * @param {Object<string, string>} args.headers - * @param {1 | 2} args.protocolVersion - Git Protocol Version - */ - static async discover({ - http, - onProgress, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - service, - url: _origUrl, - headers, - protocolVersion, - }) { - let { url, auth } = extractAuthFromUrl(_origUrl); - const proxifiedURL = corsProxy ? corsProxify(corsProxy, url) : url; - if (auth.username || auth.password) { - headers.Authorization = calculateBasicAuthHeader(auth); - } - if (protocolVersion === 2) { - headers['Git-Protocol'] = 'version=2'; - } - - let res; - let tryAgain; - let providedAuthBefore = false; - do { - res = await http.request({ - onProgress, - method: 'GET', - url: `${proxifiedURL}/info/refs?service=${service}`, - headers, - }); - - // the default loop behavior - tryAgain = false; - - // 401 is the "correct" response for access denied. 203 is Non-Authoritative Information and comes from Azure DevOps, which - // apparently doesn't realize this is a git request and is returning the HTML for the "Azure DevOps Services | Sign In" page. - if (res.statusCode === 401 || res.statusCode === 203) { - // On subsequent 401s, call `onAuthFailure` instead of `onAuth`. - // This is so that naive `onAuth` callbacks that return a fixed value don't create an infinite loop of retrying. - const getAuth = providedAuthBefore ? onAuthFailure : onAuth; - if (getAuth) { - // Acquire credentials and try again - // TODO: read `useHttpPath` value from git config and pass along? - auth = await getAuth(url, { - ...auth, - headers: { ...headers }, - }); - if (auth && auth.cancel) { - throw new UserCanceledError() - } else if (auth) { - updateHeaders(headers, auth); - providedAuthBefore = true; - tryAgain = true; - } - } - } else if ( - res.statusCode === 200 && - providedAuthBefore && - onAuthSuccess - ) { - await onAuthSuccess(url, auth); - } - } while (tryAgain) - - if (res.statusCode !== 200) { - const { response } = await stringifyBody(res); - throw new HttpError(res.statusCode, res.statusMessage, response) - } - // Git "smart" HTTP servers should respond with the correct Content-Type header. - if ( - res.headers['content-type'] === `application/x-${service}-advertisement` - ) { - const remoteHTTP = await parseRefsAdResponse(res.body, { service }); - remoteHTTP.auth = auth; - return remoteHTTP - } else { - // If they don't send the correct content-type header, that's a good indicator it is either a "dumb" HTTP - // server, or the user specified an incorrect remote URL and the response is actually an HTML page. - // In this case, we save the response as plain text so we can generate a better error message if needed. - const { preview, response, data } = await stringifyBody(res); - // For backwards compatibility, try to parse it anyway. - // TODO: maybe just throw instead of trying? - try { - const remoteHTTP = await parseRefsAdResponse([data], { service }); - remoteHTTP.auth = auth; - return remoteHTTP - } catch (e) { - throw new SmartHttpError(preview, response) - } - } - } - - /** - * @param {Object} args - * @param {HttpClient} args.http - * @param {ProgressCallback} [args.onProgress] - * @param {string} [args.corsProxy] - * @param {string} args.service - * @param {string} args.url - * @param {Object<string, string>} [args.headers] - * @param {any} args.body - * @param {any} args.auth - */ - static async connect({ - http, - onProgress, - corsProxy, - service, - url, - auth, - body, - headers, - }) { - // We already have the "correct" auth value at this point, but - // we need to strip out the username/password from the URL yet again. - const urlAuth = extractAuthFromUrl(url); - if (urlAuth) url = urlAuth.url; - - if (corsProxy) url = corsProxify(corsProxy, url); - - headers['content-type'] = `application/x-${service}-request`; - headers.accept = `application/x-${service}-result`; - updateHeaders(headers, auth); - - const res = await http.request({ - onProgress, - method: 'POST', - url: `${url}/${service}`, - body, - headers, - }); - if (res.statusCode !== 200) { - const { response } = stringifyBody(res); - throw new HttpError(res.statusCode, res.statusMessage, response) - } - return res - } -} - -function parseRemoteUrl({ url }) { - // the stupid "shorter scp-like syntax" - if (url.startsWith('git@')) { - return { - transport: 'ssh', - address: url, - } - } - const matches = url.match(/(\w+)(:\/\/|::)(.*)/); - if (matches === null) return - /* - * When git encounters a URL of the form <transport>://<address>, where <transport> is - * a protocol that it cannot handle natively, it automatically invokes git remote-<transport> - * with the full URL as the second argument. - * - * @see https://git-scm.com/docs/git-remote-helpers - */ - if (matches[2] === '://') { - return { - transport: matches[1], - address: matches[0], - } - } - /* - * A URL of the form <transport>::<address> explicitly instructs git to invoke - * git remote-<transport> with <address> as the second argument. - * - * @see https://git-scm.com/docs/git-remote-helpers - */ - if (matches[2] === '::') { - return { - transport: matches[1], - address: matches[3], - } - } -} - -class GitRemoteManager { - static getRemoteHelperFor({ url }) { - // TODO: clean up the remoteHelper API and move into PluginCore - const remoteHelpers = new Map(); - remoteHelpers.set('http', GitRemoteHTTP); - remoteHelpers.set('https', GitRemoteHTTP); - - const parts = parseRemoteUrl({ url }); - if (!parts) { - throw new UrlParseError(url) - } - if (remoteHelpers.has(parts.transport)) { - return remoteHelpers.get(parts.transport) - } - throw new UnknownTransportError( - url, - parts.transport, - parts.transport === 'ssh' ? translateSSHtoHTTP(url) : undefined - ) - } -} - -let lock$1 = null; - -class GitShallowManager { - static async read({ fs, gitdir }) { - if (lock$1 === null) lock$1 = new AsyncLock(); - const filepath = join(gitdir, 'shallow'); - const oids = new Set(); - await lock$1.acquire(filepath, async function() { - const text = await fs.read(filepath, { encoding: 'utf8' }); - if (text === null) return oids // no file - if (text.trim() === '') return oids // empty file - text - .trim() - .split('\n') - .map(oid => oids.add(oid)); - }); - return oids - } - - static async write({ fs, gitdir, oids }) { - if (lock$1 === null) lock$1 = new AsyncLock(); - const filepath = join(gitdir, 'shallow'); - if (oids.size > 0) { - const text = [...oids].join('\n') + '\n'; - await lock$1.acquire(filepath, async function() { - await fs.write(filepath, text, { - encoding: 'utf8', - }); - }); - } else { - // No shallows - await lock$1.acquire(filepath, async function() { - await fs.rm(filepath); - }); - } - } -} - -async function hasObjectLoose({ fs, gitdir, oid }) { - const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`; - return fs.exists(`${gitdir}/${source}`) -} - -async function hasObjectPacked({ - fs, - cache, - gitdir, - oid, - getExternalRefDelta, -}) { - // Check to see if it's in a packfile. - // Iterate through all the .idx files - let list = await fs.readdir(join(gitdir, 'objects/pack')); - list = list.filter(x => x.endsWith('.idx')); - for (const filename of list) { - const indexFile = `${gitdir}/objects/pack/${filename}`; - const p = await readPackIndex({ - fs, - cache, - filename: indexFile, - getExternalRefDelta, - }); - if (p.error) throw new InternalError(p.error) - // If the packfile DOES have the oid we're looking for... - if (p.offsets.has(oid)) { - return true - } - } - // Failed to find it - return false -} - -async function hasObject({ - fs, - cache, - gitdir, - oid, - format = 'content', -}) { - // Curry the current read method so that the packfile un-deltification - // process can acquire external ref-deltas. - const getExternalRefDelta = oid => _readObject({ fs, cache, gitdir, oid }); - - // Look for it in the loose object directory. - let result = await hasObjectLoose({ fs, gitdir, oid }); - // Check to see if it's in a packfile. - if (!result) { - result = await hasObjectPacked({ - fs, - cache, - gitdir, - oid, - getExternalRefDelta, - }); - } - // Finally - return result -} - -// TODO: make a function that just returns obCount. then emptyPackfile = () => sizePack(pack) === 0 -function emptyPackfile(pack) { - const pheader = '5041434b'; - const version = '00000002'; - const obCount = '00000000'; - const header = pheader + version + obCount; - return pack.slice(0, 12).toString('hex') === header -} - -function filterCapabilities(server, client) { - const serverNames = server.map(cap => cap.split('=', 1)[0]); - return client.filter(cap => { - const name = cap.split('=', 1)[0]; - return serverNames.includes(name) - }) -} - -const pkg = { - name: 'isomorphic-git', - version: '1.8.10', - agent: 'git/isomorphic-git@1.8.10', -}; - -class FIFO { - constructor() { - this._queue = []; - } - - write(chunk) { - if (this._ended) { - throw Error('You cannot write to a FIFO that has already been ended!') - } - if (this._waiting) { - const resolve = this._waiting; - this._waiting = null; - resolve({ value: chunk }); - } else { - this._queue.push(chunk); - } - } - - end() { - this._ended = true; - if (this._waiting) { - const resolve = this._waiting; - this._waiting = null; - resolve({ done: true }); - } - } - - destroy(err) { - this._ended = true; - this.error = err; - } - - async next() { - if (this._queue.length > 0) { - return { value: this._queue.shift() } - } - if (this._ended) { - return { done: true } - } - if (this._waiting) { - throw Error( - 'You cannot call read until the previous call to read has returned!' - ) - } - return new Promise(resolve => { - this._waiting = resolve; - }) - } -} - -// Note: progress messages are designed to be written directly to the terminal, -// so they are often sent with just a carriage return to overwrite the last line of output. -// But there are also messages delimited with newlines. -// I also include CRLF just in case. -function findSplit(str) { - const r = str.indexOf('\r'); - const n = str.indexOf('\n'); - if (r === -1 && n === -1) return -1 - if (r === -1) return n + 1 // \n - if (n === -1) return r + 1 // \r - if (n === r + 1) return n + 1 // \r\n - return Math.min(r, n) + 1 // \r or \n -} - -function splitLines(input) { - const output = new FIFO(); - let tmp = '' - ;(async () => { - await forAwait(input, chunk => { - chunk = chunk.toString('utf8'); - tmp += chunk; - while (true) { - const i = findSplit(tmp); - if (i === -1) break - output.write(tmp.slice(0, i)); - tmp = tmp.slice(i); - } - }); - if (tmp.length > 0) { - output.write(tmp); - } - output.end(); - })(); - return output -} - -/* -If 'side-band' or 'side-band-64k' capabilities have been specified by -the client, the server will send the packfile data multiplexed. - -Each packet starting with the packet-line length of the amount of data -that follows, followed by a single byte specifying the sideband the -following data is coming in on. - -In 'side-band' mode, it will send up to 999 data bytes plus 1 control -code, for a total of up to 1000 bytes in a pkt-line. In 'side-band-64k' -mode it will send up to 65519 data bytes plus 1 control code, for a -total of up to 65520 bytes in a pkt-line. - -The sideband byte will be a '1', '2' or a '3'. Sideband '1' will contain -packfile data, sideband '2' will be used for progress information that the -client will generally print to stderr and sideband '3' is used for error -information. - -If no 'side-band' capability was specified, the server will stream the -entire packfile without multiplexing. -*/ - -class GitSideBand { - static demux(input) { - const read = GitPktLine.streamReader(input); - // And now for the ridiculous side-band or side-band-64k protocol - const packetlines = new FIFO(); - const packfile = new FIFO(); - const progress = new FIFO(); - // TODO: Use a proper through stream? - const nextBit = async function() { - const line = await read(); - // Skip over flush packets - if (line === null) return nextBit() - // A made up convention to signal there's no more to read. - if (line === true) { - packetlines.end(); - progress.end(); - packfile.end(); - return - } - // Examine first byte to determine which output "stream" to use - switch (line[0]) { - case 1: { - // pack data - packfile.write(line.slice(1)); - break - } - case 2: { - // progress message - progress.write(line.slice(1)); - break - } - case 3: { - // fatal error message just before stream aborts - const error = line.slice(1); - progress.write(error); - packfile.destroy(new Error(error.toString('utf8'))); - return - } - default: { - // Not part of the side-band-64k protocol - packetlines.write(line.slice(0)); - } - } - // Careful not to blow up the stack. - // I think Promises in a tail-call position should be OK. - nextBit(); - }; - nextBit(); - return { - packetlines, - packfile, - progress, - } - } - // static mux ({ - // protocol, // 'side-band' or 'side-band-64k' - // packetlines, - // packfile, - // progress, - // error - // }) { - // const MAX_PACKET_LENGTH = protocol === 'side-band-64k' ? 999 : 65519 - // let output = new PassThrough() - // packetlines.on('data', data => { - // if (data === null) { - // output.write(GitPktLine.flush()) - // } else { - // output.write(GitPktLine.encode(data)) - // } - // }) - // let packfileWasEmpty = true - // let packfileEnded = false - // let progressEnded = false - // let errorEnded = false - // let goodbye = Buffer.concat([ - // GitPktLine.encode(Buffer.from('010A', 'hex')), - // GitPktLine.flush() - // ]) - // packfile - // .on('data', data => { - // packfileWasEmpty = false - // const buffers = splitBuffer(data, MAX_PACKET_LENGTH) - // for (const buffer of buffers) { - // output.write( - // GitPktLine.encode(Buffer.concat([Buffer.from('01', 'hex'), buffer])) - // ) - // } - // }) - // .on('end', () => { - // packfileEnded = true - // if (!packfileWasEmpty) output.write(goodbye) - // if (progressEnded && errorEnded) output.end() - // }) - // progress - // .on('data', data => { - // const buffers = splitBuffer(data, MAX_PACKET_LENGTH) - // for (const buffer of buffers) { - // output.write( - // GitPktLine.encode(Buffer.concat([Buffer.from('02', 'hex'), buffer])) - // ) - // } - // }) - // .on('end', () => { - // progressEnded = true - // if (packfileEnded && errorEnded) output.end() - // }) - // error - // .on('data', data => { - // const buffers = splitBuffer(data, MAX_PACKET_LENGTH) - // for (const buffer of buffers) { - // output.write( - // GitPktLine.encode(Buffer.concat([Buffer.from('03', 'hex'), buffer])) - // ) - // } - // }) - // .on('end', () => { - // errorEnded = true - // if (progressEnded && packfileEnded) output.end() - // }) - // return output - // } -} - -async function parseUploadPackResponse(stream) { - const { packetlines, packfile, progress } = GitSideBand.demux(stream); - const shallows = []; - const unshallows = []; - const acks = []; - let nak = false; - let done = false; - return new Promise((resolve, reject) => { - // Parse the response - forAwait(packetlines, data => { - const line = data.toString('utf8').trim(); - if (line.startsWith('shallow')) { - const oid = line.slice(-41).trim(); - if (oid.length !== 40) { - reject(new InvalidOidError(oid)); - } - shallows.push(oid); - } else if (line.startsWith('unshallow')) { - const oid = line.slice(-41).trim(); - if (oid.length !== 40) { - reject(new InvalidOidError(oid)); - } - unshallows.push(oid); - } else if (line.startsWith('ACK')) { - const [, oid, status] = line.split(' '); - acks.push({ oid, status }); - if (!status) done = true; - } else if (line.startsWith('NAK')) { - nak = true; - done = true; - } - if (done) { - resolve({ shallows, unshallows, acks, nak, packfile, progress }); - } - }); - }) -} - -function writeUploadPackRequest({ - capabilities = [], - wants = [], - haves = [], - shallows = [], - depth = null, - since = null, - exclude = [], -}) { - const packstream = []; - wants = [...new Set(wants)]; // remove duplicates - let firstLineCapabilities = ` ${capabilities.join(' ')}`; - for (const oid of wants) { - packstream.push(GitPktLine.encode(`want ${oid}${firstLineCapabilities}\n`)); - firstLineCapabilities = ''; - } - for (const oid of shallows) { - packstream.push(GitPktLine.encode(`shallow ${oid}\n`)); - } - if (depth !== null) { - packstream.push(GitPktLine.encode(`deepen ${depth}\n`)); - } - if (since !== null) { - packstream.push( - GitPktLine.encode(`deepen-since ${Math.floor(since.valueOf() / 1000)}\n`) - ); - } - for (const oid of exclude) { - packstream.push(GitPktLine.encode(`deepen-not ${oid}\n`)); - } - packstream.push(GitPktLine.flush()); - for (const oid of haves) { - packstream.push(GitPktLine.encode(`have ${oid}\n`)); - } - packstream.push(GitPktLine.encode(`done\n`)); - return packstream -} - -// @ts-check - -/** - * - * @typedef {object} FetchResult - The object returned has the following schema: - * @property {string | null} defaultBranch - The branch that is cloned if no branch is specified - * @property {string | null} fetchHead - The SHA-1 object id of the fetched head commit - * @property {string | null} fetchHeadDescription - a textual description of the branch that was fetched - * @property {Object<string, string>} [headers] - The HTTP response headers returned by the git server - * @property {string[]} [pruned] - A list of branches that were pruned, if you provided the `prune` parameter - * - */ - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {HttpClient} args.http - * @param {ProgressCallback} [args.onProgress] - * @param {MessageCallback} [args.onMessage] - * @param {AuthCallback} [args.onAuth] - * @param {AuthFailureCallback} [args.onAuthFailure] - * @param {AuthSuccessCallback} [args.onAuthSuccess] - * @param {string} args.gitdir - * @param {string|void} [args.url] - * @param {string} [args.corsProxy] - * @param {string} [args.ref] - * @param {string} [args.remoteRef] - * @param {string} [args.remote] - * @param {boolean} [args.singleBranch = false] - * @param {boolean} [args.tags = false] - * @param {number} [args.depth] - * @param {Date} [args.since] - * @param {string[]} [args.exclude = []] - * @param {boolean} [args.relative = false] - * @param {Object<string, string>} [args.headers] - * @param {boolean} [args.prune] - * @param {boolean} [args.pruneTags] - * - * @returns {Promise<FetchResult>} - * @see FetchResult - */ -async function _fetch({ - fs, - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - gitdir, - ref: _ref, - remoteRef: _remoteRef, - remote: _remote, - url: _url, - corsProxy, - depth = null, - since = null, - exclude = [], - relative = false, - tags = false, - singleBranch = false, - headers = {}, - prune = false, - pruneTags = false, -}) { - const ref = _ref || (await _currentBranch({ fs, gitdir, test: true })); - const config = await GitConfigManager.get({ fs, gitdir }); - // Figure out what remote to use. - const remote = - _remote || (ref && (await config.get(`branch.${ref}.remote`))) || 'origin'; - // Lookup the URL for the given remote. - const url = _url || (await config.get(`remote.${remote}.url`)); - if (typeof url === 'undefined') { - throw new MissingParameterError('remote OR url') - } - // Figure out what remote ref to use. - const remoteRef = - _remoteRef || - (ref && (await config.get(`branch.${ref}.merge`))) || - _ref || - 'HEAD'; - - if (corsProxy === undefined) { - corsProxy = await config.get('http.corsProxy'); - } - - const GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url }); - const remoteHTTP = await GitRemoteHTTP.discover({ - http, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - service: 'git-upload-pack', - url, - headers, - protocolVersion: 1, - }); - const auth = remoteHTTP.auth; // hack to get new credentials from CredentialManager API - const remoteRefs = remoteHTTP.refs; - // For the special case of an empty repository with no refs, return null. - if (remoteRefs.size === 0) { - return { - defaultBranch: null, - fetchHead: null, - fetchHeadDescription: null, - } - } - // Check that the remote supports the requested features - if (depth !== null && !remoteHTTP.capabilities.has('shallow')) { - throw new RemoteCapabilityError('shallow', 'depth') - } - if (since !== null && !remoteHTTP.capabilities.has('deepen-since')) { - throw new RemoteCapabilityError('deepen-since', 'since') - } - if (exclude.length > 0 && !remoteHTTP.capabilities.has('deepen-not')) { - throw new RemoteCapabilityError('deepen-not', 'exclude') - } - if (relative === true && !remoteHTTP.capabilities.has('deepen-relative')) { - throw new RemoteCapabilityError('deepen-relative', 'relative') - } - // Figure out the SHA for the requested ref - const { oid, fullref } = GitRefManager.resolveAgainstMap({ - ref: remoteRef, - map: remoteRefs, - }); - // Filter out refs we want to ignore: only keep ref we're cloning, HEAD, branches, and tags (if we're keeping them) - for (const remoteRef of remoteRefs.keys()) { - if ( - remoteRef === fullref || - remoteRef === 'HEAD' || - remoteRef.startsWith('refs/heads/') || - (tags && remoteRef.startsWith('refs/tags/')) - ) { - continue - } - remoteRefs.delete(remoteRef); - } - // Assemble the application/x-git-upload-pack-request - const capabilities = filterCapabilities( - [...remoteHTTP.capabilities], - [ - 'multi_ack_detailed', - 'no-done', - 'side-band-64k', - // Note: I removed 'thin-pack' option since our code doesn't "fatten" packfiles, - // which is necessary for compatibility with git. It was the cause of mysterious - // 'fatal: pack has [x] unresolved deltas' errors that plagued us for some time. - // isomorphic-git is perfectly happy with thin packfiles in .git/objects/pack but - // canonical git it turns out is NOT. - 'ofs-delta', - `agent=${pkg.agent}`, - ] - ); - if (relative) capabilities.push('deepen-relative'); - // Start figuring out which oids from the remote we want to request - const wants = singleBranch ? [oid] : remoteRefs.values(); - // Come up with a reasonable list of oids to tell the remote we already have - // (preferably oids that are close ancestors of the branch heads we're fetching) - const haveRefs = singleBranch - ? [ref] - : await GitRefManager.listRefs({ - fs, - gitdir, - filepath: `refs`, - }); - let haves = []; - for (let ref of haveRefs) { - try { - ref = await GitRefManager.expand({ fs, gitdir, ref }); - const oid = await GitRefManager.resolve({ fs, gitdir, ref }); - if (await hasObject({ fs, cache, gitdir, oid })) { - haves.push(oid); - } - } catch (err) {} - } - haves = [...new Set(haves)]; - const oids = await GitShallowManager.read({ fs, gitdir }); - const shallows = remoteHTTP.capabilities.has('shallow') ? [...oids] : []; - const packstream = writeUploadPackRequest({ - capabilities, - wants, - haves, - shallows, - depth, - since, - exclude, - }); - // CodeCommit will hang up if we don't send a Content-Length header - // so we can't stream the body. - const packbuffer = Buffer.from(await collect(packstream)); - const raw = await GitRemoteHTTP.connect({ - http, - onProgress, - corsProxy, - service: 'git-upload-pack', - url, - auth, - body: [packbuffer], - headers, - }); - const response = await parseUploadPackResponse(raw.body); - if (raw.headers) { - response.headers = raw.headers; - } - // Apply all the 'shallow' and 'unshallow' commands - for (const oid of response.shallows) { - if (!oids.has(oid)) { - // this is in a try/catch mostly because my old test fixtures are missing objects - try { - // server says it's shallow, but do we have the parents? - const { object } = await _readObject({ fs, cache, gitdir, oid }); - const commit = new GitCommit(object); - const hasParents = await Promise.all( - commit - .headers() - .parent.map(oid => hasObject({ fs, cache, gitdir, oid })) - ); - const haveAllParents = - hasParents.length === 0 || hasParents.every(has => has); - if (!haveAllParents) { - oids.add(oid); - } - } catch (err) { - oids.add(oid); - } - } - } - for (const oid of response.unshallows) { - oids.delete(oid); - } - await GitShallowManager.write({ fs, gitdir, oids }); - // Update local remote refs - if (singleBranch) { - const refs = new Map([[fullref, oid]]); - // But wait, maybe it was a symref, like 'HEAD'! - // We need to save all the refs in the symref chain (sigh). - const symrefs = new Map(); - let bail = 10; - let key = fullref; - while (bail--) { - const value = remoteHTTP.symrefs.get(key); - if (value === undefined) break - symrefs.set(key, value); - key = value; - } - // final value must not be a symref but a real ref - const realRef = remoteRefs.get(key); - // There may be no ref at all if we've fetched a specific commit hash - if (realRef) { - refs.set(key, realRef); - } - const { pruned } = await GitRefManager.updateRemoteRefs({ - fs, - gitdir, - remote, - refs, - symrefs, - tags, - prune, - }); - if (prune) { - response.pruned = pruned; - } - } else { - const { pruned } = await GitRefManager.updateRemoteRefs({ - fs, - gitdir, - remote, - refs: remoteRefs, - symrefs: remoteHTTP.symrefs, - tags, - prune, - pruneTags, - }); - if (prune) { - response.pruned = pruned; - } - } - // We need this value later for the `clone` command. - response.HEAD = remoteHTTP.symrefs.get('HEAD'); - // AWS CodeCommit doesn't list HEAD as a symref, but we can reverse engineer it - // Find the SHA of the branch called HEAD - if (response.HEAD === undefined) { - const { oid } = GitRefManager.resolveAgainstMap({ - ref: 'HEAD', - map: remoteRefs, - }); - // Use the name of the first branch that's not called HEAD that has - // the same SHA as the branch called HEAD. - for (const [key, value] of remoteRefs.entries()) { - if (key !== 'HEAD' && value === oid) { - response.HEAD = key; - break - } - } - } - const noun = fullref.startsWith('refs/tags') ? 'tag' : 'branch'; - response.FETCH_HEAD = { - oid, - description: `${noun} '${abbreviateRef(fullref)}' of ${url}`, - }; - - if (onProgress || onMessage) { - const lines = splitLines(response.progress); - forAwait(lines, async line => { - if (onMessage) await onMessage(line); - if (onProgress) { - const matches = line.match(/([^:]*).*\((\d+?)\/(\d+?)\)/); - if (matches) { - await onProgress({ - phase: matches[1].trim(), - loaded: parseInt(matches[2], 10), - total: parseInt(matches[3], 10), - }); - } - } - }); - } - const packfile = Buffer.from(await collect(response.packfile)); - const packfileSha = packfile.slice(-20).toString('hex'); - const res = { - defaultBranch: response.HEAD, - fetchHead: response.FETCH_HEAD.oid, - fetchHeadDescription: response.FETCH_HEAD.description, - }; - if (response.headers) { - res.headers = response.headers; - } - if (prune) { - res.pruned = response.pruned; - } - // This is a quick fix for the empty .git/objects/pack/pack-.pack file error, - // which due to the way `git-list-pack` works causes the program to hang when it tries to read it. - // TODO: Longer term, we should actually: - // a) NOT concatenate the entire packfile into memory (line 78), - // b) compute the SHA of the stream except for the last 20 bytes, using the same library used in push.js, and - // c) compare the computed SHA with the last 20 bytes of the stream before saving to disk, and throwing a "packfile got corrupted during download" error if the SHA doesn't match. - if (packfileSha !== '' && !emptyPackfile(packfile)) { - res.packfile = `objects/pack/pack-${packfileSha}.pack`; - const fullpath = join(gitdir, res.packfile); - await fs.write(fullpath, packfile); - const getExternalRefDelta = oid => _readObject({ fs, cache, gitdir, oid }); - const idx = await GitPackIndex.fromPack({ - pack: packfile, - getExternalRefDelta, - onProgress, - }); - await fs.write(fullpath.replace(/\.pack$/, '.idx'), await idx.toBuffer()); - } - return res -} - -// @ts-check - -/** - * Initialize a new repository - * - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} [args.dir] - * @param {string} [args.gitdir] - * @param {boolean} [args.bare = false] - * @param {string} [args.defaultBranch = 'master'] - * @returns {Promise<void>} - */ -async function _init({ - fs, - bare = false, - dir, - gitdir = bare ? dir : join(dir, '.git'), - defaultBranch = 'master', -}) { - // Don't overwrite an existing config - if (await fs.exists(gitdir + '/config')) return - - let folders = [ - 'hooks', - 'info', - 'objects/info', - 'objects/pack', - 'refs/heads', - 'refs/tags', - ]; - folders = folders.map(dir => gitdir + '/' + dir); - for (const folder of folders) { - await fs.mkdir(folder); - } - - await fs.write( - gitdir + '/config', - '[core]\n' + - '\trepositoryformatversion = 0\n' + - '\tfilemode = false\n' + - `\tbare = ${bare}\n` + - (bare ? '' : '\tlogallrefupdates = true\n') + - '\tsymlinks = false\n' + - '\tignorecase = true\n' - ); - await fs.write(gitdir + '/HEAD', `ref: refs/heads/${defaultBranch}\n`); -} - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.dirname - */ -async function deleteRecursively({ fs, dirname }) { - const filesToDelete = []; - const directoriesToDelete = []; - const pathsToTraverse = [dirname]; - - while (pathsToTraverse.length > 0) { - const path = pathsToTraverse.pop(); - - if ((await fs._stat(path)).isDirectory()) { - directoriesToDelete.push(path); - pathsToTraverse.push( - ...(await fs.readdir(path)).map(subPath => join(path, subPath)) - ); - } else { - filesToDelete.push(path); - } - } - - for (const path of filesToDelete) { - await fs.rm(path); - } - for (const path of directoriesToDelete.reverse()) { - await fs.rmdir(path); - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {HttpClient} args.http - * @param {ProgressCallback} [args.onProgress] - * @param {MessageCallback} [args.onMessage] - * @param {AuthCallback} [args.onAuth] - * @param {AuthFailureCallback} [args.onAuthFailure] - * @param {AuthSuccessCallback} [args.onAuthSuccess] - * @param {string} [args.dir] - * @param {string} args.gitdir - * @param {string} args.url - * @param {string} args.corsProxy - * @param {string} args.ref - * @param {boolean} args.singleBranch - * @param {boolean} args.noCheckout - * @param {boolean} args.noTags - * @param {string} args.remote - * @param {number} args.depth - * @param {Date} args.since - * @param {string[]} args.exclude - * @param {boolean} args.relative - * @param {Object<string, string>} args.headers - * - * @returns {Promise<void>} Resolves successfully when clone completes - * - */ -async function _clone({ - fs, - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir, - url, - corsProxy, - ref, - remote, - depth, - since, - exclude, - relative, - singleBranch, - noCheckout, - noTags, - headers, -}) { - try { - await _init({ fs, gitdir }); - await _addRemote({ fs, gitdir, remote, url, force: false }); - if (corsProxy) { - const config = await GitConfigManager.get({ fs, gitdir }); - await config.set(`http.corsProxy`, corsProxy); - await GitConfigManager.save({ fs, gitdir, config }); - } - const { defaultBranch, fetchHead } = await _fetch({ - fs, - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - gitdir, - ref, - remote, - corsProxy, - depth, - since, - exclude, - relative, - singleBranch, - headers, - tags: !noTags, - }); - if (fetchHead === null) return - ref = ref || defaultBranch; - ref = ref.replace('refs/heads/', ''); - // Checkout that branch - await _checkout({ - fs, - cache, - onProgress, - dir, - gitdir, - ref, - remote, - noCheckout, - }); - } catch (err) { - // Remove partial local repository, see #1283 - try { - await deleteRecursively({ fs, dirname: gitdir }); - } catch (err) { - // Ignore this error, we are already failing. - // This try-catch is necessary so the original error is - // not masked by potential errors in deleteRecursively. - } - - throw err - } -} - -// @ts-check - -/** - * Clone a repository - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.url - The URL of the remote repository - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Value is stored in the git config file for that repo. - * @param {string} [args.ref] - Which branch to checkout. By default this is the designated "main branch" of the repository. - * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch. - * @param {boolean} [args.noCheckout = false] - If true, clone will only fetch the repo, not check out a branch. Skipping checkout can save a lot of time normally spent writing files to disk. - * @param {boolean} [args.noTags = false] - By default clone will fetch all tags. `noTags` disables that behavior. - * @param {string} [args.remote = 'origin'] - What to name the remote that is created. - * @param {number} [args.depth] - Integer. Determines how much of the git repository's history to retrieve - * @param {Date} [args.since] - Only fetch commits created after the given date. Mutually exclusive with `depth`. - * @param {string[]} [args.exclude = []] - A list of branches or tags. Instructs the remote server not to send us any commits reachable from these refs. - * @param {boolean} [args.relative = false] - Changes the meaning of `depth` to be measured from the current shallow depth rather than from the branch tip. - * @param {Object<string, string>} [args.headers = {}] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when clone completes - * - * @example - * await git.clone({ - * fs, - * http, - * dir: '/tutorial', - * corsProxy: 'https://cors.isomorphic-git.org', - * url: 'https://github.com/isomorphic-git/isomorphic-git', - * singleBranch: true, - * depth: 1 - * }) - * console.log('done') - * - */ -async function clone({ - fs, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir = join(dir, '.git'), - url, - corsProxy = undefined, - ref = undefined, - remote = 'origin', - depth = undefined, - since = undefined, - exclude = [], - relative = false, - singleBranch = false, - noCheckout = false, - noTags = false, - headers = {}, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('http', http); - assertParameter('gitdir', gitdir); - if (!noCheckout) { - assertParameter('dir', dir); - } - assertParameter('url', url); - - return await _clone({ - fs: new FileSystem(fs), - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir, - url, - corsProxy, - ref, - remote, - depth, - since, - exclude, - relative, - singleBranch, - noCheckout, - noTags, - headers, - }) - } catch (err) { - err.caller = 'git.clone'; - throw err - } -} - -// @ts-check - -/** - * Create a new commit - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.message - The commit message to use. - * @param {Object} [args.author] - The details about the author. - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer = author] - The details about the commit committer, in the same format as the author parameter. If not specified, the author details are used. - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - Sign the tag object using this private PGP key. - * @param {boolean} [args.dryRun = false] - If true, simulates making a commit so you can test whether it would succeed. Implies `noUpdateBranch`. - * @param {boolean} [args.noUpdateBranch = false] - If true, does not update the branch pointer after creating the commit. - * @param {string} [args.ref] - The fully expanded name of the branch to commit to. Default is the current branch pointed to by HEAD. (TODO: fix it so it can expand branch names without throwing if the branch doesn't exist yet.) - * @param {string[]} [args.parent] - The SHA-1 object ids of the commits to use as parents. If not specified, the commit pointed to by `ref` is used. - * @param {string} [args.tree] - The SHA-1 object id of the tree to use. If not specified, a new tree object is created from the current git index. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly created commit. - * - * @example - * let sha = await git.commit({ - * fs, - * dir: '/tutorial', - * author: { - * name: 'Mr. Test', - * email: 'mrtest@example.com', - * }, - * message: 'Added the a.txt file' - * }) - * console.log(sha) - * - */ -async function commit({ - fs: _fs, - onSign, - dir, - gitdir = join(dir, '.git'), - message, - author: _author, - committer: _committer, - signingKey, - dryRun = false, - noUpdateBranch = false, - ref, - parent, - tree, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('message', message); - if (signingKey) { - assertParameter('onSign', onSign); - } - const fs = new FileSystem(_fs); - - const author = await normalizeAuthorObject({ fs, gitdir, author: _author }); - if (!author) throw new MissingNameError('author') - - const committer = await normalizeCommitterObject({ - fs, - gitdir, - author, - committer: _committer, - }); - if (!committer) throw new MissingNameError('committer') - - return await _commit({ - fs, - cache, - onSign, - gitdir, - message, - author, - committer, - signingKey, - dryRun, - noUpdateBranch, - ref, - parent, - tree, - }) - } catch (err) { - err.caller = 'git.commit'; - throw err - } -} - -// @ts-check - -/** - * Get the name of the branch currently pointed to by .git/HEAD - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {boolean} [args.fullname = false] - Return the full path (e.g. "refs/heads/main") instead of the abbreviated form. - * @param {boolean} [args.test = false] - If the current branch doesn't actually exist (such as right after git init) then return `undefined`. - * - * @returns {Promise<string|void>} The name of the current branch or undefined if the HEAD is detached. - * - * @example - * // Get the current branch name - * let branch = await git.currentBranch({ - * fs, - * dir: '/tutorial', - * fullname: false - * }) - * console.log(branch) - * - */ -async function currentBranch({ - fs, - dir, - gitdir = join(dir, '.git'), - fullname = false, - test = false, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - return await _currentBranch({ - fs: new FileSystem(fs), - gitdir, - fullname, - test, - }) - } catch (err) { - err.caller = 'git.currentBranch'; - throw err - } -} - -// @ts-check - -/** - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.ref - * - * @returns {Promise<void>} - */ -async function _deleteBranch({ fs, gitdir, ref }) { - const exist = await GitRefManager.exists({ fs, gitdir, ref }); - if (!exist) { - throw new NotFoundError(ref) - } - - const fullRef = await GitRefManager.expand({ fs, gitdir, ref }); - const currentRef = await _currentBranch({ fs, gitdir, fullname: true }); - if (fullRef === currentRef) { - // detach HEAD - const value = await GitRefManager.resolve({ fs, gitdir, ref: fullRef }); - await GitRefManager.writeRef({ fs, gitdir, ref: 'HEAD', value }); - } - - // Delete a specified branch - await GitRefManager.deleteRef({ fs, gitdir, ref: fullRef }); -} - -// @ts-check - -/** - * Delete a local branch - * - * > Note: This only deletes loose branches - it should be fixed in the future to delete packed branches as well. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The branch to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteBranch({ fs, dir: '/tutorial', ref: 'local-branch' }) - * console.log('done') - * - */ -async function deleteBranch({ - fs, - dir, - gitdir = join(dir, '.git'), - ref, -}) { - try { - assertParameter('fs', fs); - assertParameter('ref', ref); - return await _deleteBranch({ - fs: new FileSystem(fs), - gitdir, - ref, - }) - } catch (err) { - err.caller = 'git.deleteBranch'; - throw err - } -} - -// @ts-check - -/** - * Delete a local ref - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The ref to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteRef({ fs, dir: '/tutorial', ref: 'refs/tags/test-tag' }) - * console.log('done') - * - */ -async function deleteRef({ fs, dir, gitdir = join(dir, '.git'), ref }) { - try { - assertParameter('fs', fs); - assertParameter('ref', ref); - await GitRefManager.deleteRef({ fs: new FileSystem(fs), gitdir, ref }); - } catch (err) { - err.caller = 'git.deleteRef'; - throw err - } -} - -// @ts-check - -/** - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.remote - * - * @returns {Promise<void>} - */ -async function _deleteRemote({ fs, gitdir, remote }) { - const config = await GitConfigManager.get({ fs, gitdir }); - await config.deleteSection('remote', remote); - await GitConfigManager.save({ fs, gitdir, config }); -} - -// @ts-check - -/** - * Removes the local config entry for a given remote - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.remote - The name of the remote to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteRemote({ fs, dir: '/tutorial', remote: 'upstream' }) - * console.log('done') - * - */ -async function deleteRemote({ - fs, - dir, - gitdir = join(dir, '.git'), - remote, -}) { - try { - assertParameter('fs', fs); - assertParameter('remote', remote); - return await _deleteRemote({ - fs: new FileSystem(fs), - gitdir, - remote, - }) - } catch (err) { - err.caller = 'git.deleteRemote'; - throw err - } -} - -// @ts-check - -/** - * Delete a local tag ref - * - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.ref - The tag to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteTag({ dir: '$input((/))', ref: '$input((test-tag))' }) - * console.log('done') - * - */ -async function _deleteTag({ fs, gitdir, ref }) { - ref = ref.startsWith('refs/tags/') ? ref : `refs/tags/${ref}`; - await GitRefManager.deleteRef({ fs, gitdir, ref }); -} - -// @ts-check - -/** - * Delete a local tag ref - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The tag to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteTag({ fs, dir: '/tutorial', ref: 'test-tag' }) - * console.log('done') - * - */ -async function deleteTag({ fs, dir, gitdir = join(dir, '.git'), ref }) { - try { - assertParameter('fs', fs); - assertParameter('ref', ref); - return await _deleteTag({ - fs: new FileSystem(fs), - gitdir, - ref, - }) - } catch (err) { - err.caller = 'git.deleteTag'; - throw err - } -} - -async function expandOidLoose({ fs, gitdir, oid: short }) { - const prefix = short.slice(0, 2); - const objectsSuffixes = await fs.readdir(`${gitdir}/objects/${prefix}`); - return objectsSuffixes - .map(suffix => `${prefix}${suffix}`) - .filter(_oid => _oid.startsWith(short)) -} - -async function expandOidPacked({ - fs, - cache, - gitdir, - oid: short, - getExternalRefDelta, -}) { - // Iterate through all the .pack files - const results = []; - let list = await fs.readdir(join(gitdir, 'objects/pack')); - list = list.filter(x => x.endsWith('.idx')); - for (const filename of list) { - const indexFile = `${gitdir}/objects/pack/${filename}`; - const p = await readPackIndex({ - fs, - cache, - filename: indexFile, - getExternalRefDelta, - }); - if (p.error) throw new InternalError(p.error) - // Search through the list of oids in the packfile - for (const oid of p.offsets.keys()) { - if (oid.startsWith(short)) results.push(oid); - } - } - return results -} - -async function _expandOid({ fs, cache, gitdir, oid: short }) { - // Curry the current read method so that the packfile un-deltification - // process can acquire external ref-deltas. - const getExternalRefDelta = oid => _readObject({ fs, cache, gitdir, oid }); - - const results1 = await expandOidLoose({ fs, gitdir, oid: short }); - const results2 = await expandOidPacked({ - fs, - cache, - gitdir, - oid: short, - getExternalRefDelta, - }); - const results = results1.concat(results2); - - if (results.length === 1) { - return results[0] - } - if (results.length > 1) { - throw new AmbiguousError('oids', short, results) - } - throw new NotFoundError(`an object matching "${short}"`) -} - -// @ts-check - -/** - * Expand and resolve a short oid into a full oid - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The shortened oid prefix to expand (like "0414d2a") - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<string>} Resolves successfully with the full oid (like "0414d2a286d7bbc7a4a326a61c1f9f888a8ab87f") - * - * @example - * let oid = await git.expandOid({ fs, dir: '/tutorial', oid: '0414d2a'}) - * console.log(oid) - * - */ -async function expandOid({ - fs, - dir, - gitdir = join(dir, '.git'), - oid, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - return await _expandOid({ - fs: new FileSystem(fs), - cache, - gitdir, - oid, - }) - } catch (err) { - err.caller = 'git.expandOid'; - throw err - } -} - -// @ts-check - -/** - * Expand an abbreviated ref to its full name - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The ref to expand (like "v1.0.0") - * - * @returns {Promise<string>} Resolves successfully with a full ref name ("refs/tags/v1.0.0") - * - * @example - * let fullRef = await git.expandRef({ fs, dir: '/tutorial', ref: 'main'}) - * console.log(fullRef) - * - */ -async function expandRef({ fs, dir, gitdir = join(dir, '.git'), ref }) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - return await GitRefManager.expand({ - fs: new FileSystem(fs), - gitdir, - ref, - }) - } catch (err) { - err.caller = 'git.expandRef'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string[]} args.oids - * - */ -async function _findMergeBase({ fs, cache, gitdir, oids }) { - // Note: right now, the tests are geared so that the output should match that of - // `git merge-base --all --octopus` - // because without the --octopus flag, git's output seems to depend on the ORDER of the oids, - // and computing virtual merge bases is just too much for me to fathom right now. - - // If we start N independent walkers, one at each of the given `oids`, and walk backwards - // through ancestors, eventually we'll discover a commit where each one of these N walkers - // has passed through. So we just need to keep track of which walkers have visited each commit - // until we find a commit that N distinct walkers has visited. - const visits = {}; - const passes = oids.length; - let heads = oids.map((oid, index) => ({ index, oid })); - while (heads.length) { - // Count how many times we've passed each commit - const result = new Set(); - for (const { oid, index } of heads) { - if (!visits[oid]) visits[oid] = new Set(); - visits[oid].add(index); - if (visits[oid].size === passes) { - result.add(oid); - } - } - if (result.size > 0) { - return [...result] - } - // We haven't found a common ancestor yet - const newheads = new Map(); - for (const { oid, index } of heads) { - try { - const { object } = await _readObject({ fs, cache, gitdir, oid }); - const commit = GitCommit.from(object); - const { parent } = commit.parseHeaders(); - for (const oid of parent) { - if (!visits[oid] || !visits[oid].has(index)) { - newheads.set(oid + ':' + index, { oid, index }); - } - } - } catch (err) { - // do nothing - } - } - heads = Array.from(newheads.values()); - } - return [] -} - -const LINEBREAKS = /^.*(\r?\n|$)/gm; - -function mergeFile({ - ourContent, - baseContent, - theirContent, - ourName = 'ours', - baseName = 'base', - theirName = 'theirs', - format = 'diff', - markerSize = 7, -}) { - const ours = ourContent.match(LINEBREAKS); - const base = baseContent.match(LINEBREAKS); - const theirs = theirContent.match(LINEBREAKS); - - // Here we let the diff3 library do the heavy lifting. - const result = diff3Merge(ours, base, theirs); - - // Here we note whether there are conflicts and format the results - let mergedText = ''; - let cleanMerge = true; - for (const item of result) { - if (item.ok) { - mergedText += item.ok.join(''); - } - if (item.conflict) { - cleanMerge = false; - mergedText += `${'<'.repeat(markerSize)} ${ourName}\n`; - mergedText += item.conflict.a.join(''); - if (format === 'diff3') { - mergedText += `${'|'.repeat(markerSize)} ${baseName}\n`; - mergedText += item.conflict.o.join(''); - } - mergedText += `${'='.repeat(markerSize)}\n`; - mergedText += item.conflict.b.join(''); - mergedText += `${'>'.repeat(markerSize)} ${theirName}\n`; - } - } - return { cleanMerge, mergedText } -} - -// @ts-check - -/** - * Create a merged tree - * - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ourOid - The SHA-1 object id of our tree - * @param {string} args.baseOid - The SHA-1 object id of the base tree - * @param {string} args.theirOid - The SHA-1 object id of their tree - * @param {string} [args.ourName='ours'] - The name to use in conflicted files for our hunks - * @param {string} [args.baseName='base'] - The name to use in conflicted files (in diff3 format) for the base hunks - * @param {string} [args.theirName='theirs'] - The name to use in conflicted files for their hunks - * @param {boolean} [args.dryRun=false] - * - * @returns {Promise<string>} - The SHA-1 object id of the merged tree - * - */ -async function mergeTree({ - fs, - cache, - dir, - gitdir = join(dir, '.git'), - ourOid, - baseOid, - theirOid, - ourName = 'ours', - baseName = 'base', - theirName = 'theirs', - dryRun = false, -}) { - const ourTree = TREE({ ref: ourOid }); - const baseTree = TREE({ ref: baseOid }); - const theirTree = TREE({ ref: theirOid }); - - const results = await _walk({ - fs, - cache, - dir, - gitdir, - trees: [ourTree, baseTree, theirTree], - map: async function(filepath, [ours, base, theirs]) { - const path = basename(filepath); - // What we did, what they did - const ourChange = await modified(ours, base); - const theirChange = await modified(theirs, base); - switch (`${ourChange}-${theirChange}`) { - case 'false-false': { - return { - mode: await base.mode(), - path, - oid: await base.oid(), - type: await base.type(), - } - } - case 'false-true': { - return theirs - ? { - mode: await theirs.mode(), - path, - oid: await theirs.oid(), - type: await theirs.type(), - } - : undefined - } - case 'true-false': { - return ours - ? { - mode: await ours.mode(), - path, - oid: await ours.oid(), - type: await ours.type(), - } - : undefined - } - case 'true-true': { - // Modifications - if ( - ours && - base && - theirs && - (await ours.type()) === 'blob' && - (await base.type()) === 'blob' && - (await theirs.type()) === 'blob' - ) { - return mergeBlobs({ - fs, - gitdir, - path, - ours, - base, - theirs, - ourName, - baseName, - theirName, - }) - } - // all other types of conflicts fail - throw new MergeNotSupportedError() - } - } - }, - /** - * @param {TreeEntry} [parent] - * @param {Array<TreeEntry>} children - */ - reduce: async (parent, children) => { - const entries = children.filter(Boolean); // remove undefineds - - // if the parent was deleted, the children have to go - if (!parent) return - - // automatically delete directories if they have been emptied - if (parent && parent.type === 'tree' && entries.length === 0) return - - if (entries.length > 0) { - const tree = new GitTree(entries); - const object = tree.toObject(); - const oid = await _writeObject({ - fs, - gitdir, - type: 'tree', - object, - dryRun, - }); - parent.oid = oid; - } - return parent - }, - }); - return results.oid -} - -/** - * - * @param {WalkerEntry} entry - * @param {WalkerEntry} base - * - */ -async function modified(entry, base) { - if (!entry && !base) return false - if (entry && !base) return true - if (!entry && base) return true - if ((await entry.type()) === 'tree' && (await base.type()) === 'tree') { - return false - } - if ( - (await entry.type()) === (await base.type()) && - (await entry.mode()) === (await base.mode()) && - (await entry.oid()) === (await base.oid()) - ) { - return false - } - return true -} - -/** - * - * @param {Object} args - * @param {import('../models/FileSystem').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.path - * @param {WalkerEntry} args.ours - * @param {WalkerEntry} args.base - * @param {WalkerEntry} args.theirs - * @param {string} [args.ourName] - * @param {string} [args.baseName] - * @param {string} [args.theirName] - * @param {string} [args.format] - * @param {number} [args.markerSize] - * @param {boolean} [args.dryRun = false] - * - */ -async function mergeBlobs({ - fs, - gitdir, - path, - ours, - base, - theirs, - ourName, - theirName, - baseName, - format, - markerSize, - dryRun, -}) { - const type = 'blob'; - // Compute the new mode. - // Since there are ONLY two valid blob modes ('100755' and '100644') it boils down to this - const mode = - (await base.mode()) === (await ours.mode()) - ? await theirs.mode() - : await ours.mode(); - // The trivial case: nothing to merge except maybe mode - if ((await ours.oid()) === (await theirs.oid())) { - return { mode, path, oid: await ours.oid(), type } - } - // if only one side made oid changes, return that side's oid - if ((await ours.oid()) === (await base.oid())) { - return { mode, path, oid: await theirs.oid(), type } - } - if ((await theirs.oid()) === (await base.oid())) { - return { mode, path, oid: await ours.oid(), type } - } - // if both sides made changes do a merge - const { mergedText, cleanMerge } = mergeFile({ - ourContent: Buffer.from(await ours.content()).toString('utf8'), - baseContent: Buffer.from(await base.content()).toString('utf8'), - theirContent: Buffer.from(await theirs.content()).toString('utf8'), - ourName, - theirName, - baseName, - format, - markerSize, - }); - if (!cleanMerge) { - // all other types of conflicts fail - throw new MergeNotSupportedError() - } - const oid = await _writeObject({ - fs, - gitdir, - type: 'blob', - object: Buffer.from(mergedText, 'utf8'), - dryRun, - }); - return { mode, path, oid, type } -} - -// @ts-check - -// import diff3 from 'node-diff3' -/** - * - * @typedef {Object} MergeResult - Returns an object with a schema like this: - * @property {string} [oid] - The SHA-1 object id that is now at the head of the branch. Absent only if `dryRun` was specified and `mergeCommit` is true. - * @property {boolean} [alreadyMerged] - True if the branch was already merged so no changes were made - * @property {boolean} [fastForward] - True if it was a fast-forward merge - * @property {boolean} [mergeCommit] - True if merge resulted in a merge commit - * @property {string} [tree] - The SHA-1 object id of the tree resulting from a merge commit - * - */ - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {string} args.gitdir - * @param {string} [args.ours] - * @param {string} args.theirs - * @param {boolean} args.fastForwardOnly - * @param {boolean} args.dryRun - * @param {boolean} args.noUpdateBranch - * @param {string} [args.message] - * @param {Object} args.author - * @param {string} args.author.name - * @param {string} args.author.email - * @param {number} args.author.timestamp - * @param {number} args.author.timezoneOffset - * @param {Object} args.committer - * @param {string} args.committer.name - * @param {string} args.committer.email - * @param {number} args.committer.timestamp - * @param {number} args.committer.timezoneOffset - * @param {string} [args.signingKey] - * - * @returns {Promise<MergeResult>} Resolves to a description of the merge operation - * - */ -async function _merge({ - fs, - cache, - gitdir, - ours, - theirs, - fastForwardOnly = false, - dryRun = false, - noUpdateBranch = false, - message, - author, - committer, - signingKey, -}) { - if (ours === undefined) { - ours = await _currentBranch({ fs, gitdir, fullname: true }); - } - ours = await GitRefManager.expand({ - fs, - gitdir, - ref: ours, - }); - theirs = await GitRefManager.expand({ - fs, - gitdir, - ref: theirs, - }); - const ourOid = await GitRefManager.resolve({ - fs, - gitdir, - ref: ours, - }); - const theirOid = await GitRefManager.resolve({ - fs, - gitdir, - ref: theirs, - }); - // find most recent common ancestor of ref a and ref b - const baseOids = await _findMergeBase({ - fs, - cache, - gitdir, - oids: [ourOid, theirOid], - }); - if (baseOids.length !== 1) { - throw new MergeNotSupportedError() - } - const baseOid = baseOids[0]; - // handle fast-forward case - if (baseOid === theirOid) { - return { - oid: ourOid, - alreadyMerged: true, - } - } - if (baseOid === ourOid) { - if (!dryRun && !noUpdateBranch) { - await GitRefManager.writeRef({ fs, gitdir, ref: ours, value: theirOid }); - } - return { - oid: theirOid, - fastForward: true, - } - } else { - // not a simple fast-forward - if (fastForwardOnly) { - throw new FastForwardError() - } - // try a fancier merge - const tree = await mergeTree({ - fs, - cache, - gitdir, - ourOid, - theirOid, - baseOid, - ourName: ours, - baseName: 'base', - theirName: theirs, - dryRun, - }); - if (!message) { - message = `Merge branch '${abbreviateRef(theirs)}' into ${abbreviateRef( - ours - )}`; - } - const oid = await _commit({ - fs, - cache, - gitdir, - message, - ref: ours, - tree, - parent: [ourOid, theirOid], - author, - committer, - signingKey, - dryRun, - noUpdateBranch, - }); - return { - oid, - tree, - mergeCommit: true, - } - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {HttpClient} args.http - * @param {ProgressCallback} [args.onProgress] - * @param {MessageCallback} [args.onMessage] - * @param {AuthCallback} [args.onAuth] - * @param {AuthFailureCallback} [args.onAuthFailure] - * @param {AuthSuccessCallback} [args.onAuthSuccess] - * @param {string} args.dir - * @param {string} args.gitdir - * @param {string} args.ref - * @param {string} [args.url] - * @param {string} [args.remote] - * @param {string} [args.remoteRef] - * @param {string} [args.corsProxy] - * @param {boolean} args.singleBranch - * @param {boolean} args.fastForwardOnly - * @param {Object<string, string>} [args.headers] - * @param {Object} args.author - * @param {string} args.author.name - * @param {string} args.author.email - * @param {number} args.author.timestamp - * @param {number} args.author.timezoneOffset - * @param {Object} args.committer - * @param {string} args.committer.name - * @param {string} args.committer.email - * @param {number} args.committer.timestamp - * @param {number} args.committer.timezoneOffset - * @param {string} [args.signingKey] - * - * @returns {Promise<void>} Resolves successfully when pull operation completes - * - */ -async function _pull({ - fs, - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir, - ref, - url, - remote, - remoteRef, - fastForwardOnly, - corsProxy, - singleBranch, - headers, - author, - committer, - signingKey, -}) { - try { - // If ref is undefined, use 'HEAD' - if (!ref) { - const head = await _currentBranch({ fs, gitdir }); - // TODO: use a better error. - if (!head) { - throw new MissingParameterError('ref') - } - ref = head; - } - - const { fetchHead, fetchHeadDescription } = await _fetch({ - fs, - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - gitdir, - corsProxy, - ref, - url, - remote, - remoteRef, - singleBranch, - headers, - }); - // Merge the remote tracking branch into the local one. - await _merge({ - fs, - cache, - gitdir, - ours: ref, - theirs: fetchHead, - fastForwardOnly, - message: `Merge ${fetchHeadDescription}`, - author, - committer, - signingKey, - dryRun: false, - noUpdateBranch: false, - }); - await _checkout({ - fs, - cache, - onProgress, - dir, - gitdir, - ref, - remote, - noCheckout: false, - }); - } catch (err) { - err.caller = 'git.pull'; - throw err - } -} - -// @ts-check - -/** - * Like `pull`, but hard-coded with `fastForward: true` so there is no need for an `author` parameter. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - Which branch to merge into. By default this is the currently checked out branch. - * @param {string} [args.url] - (Added in 1.1.0) The URL of the remote repository. The default is the value set in the git config for that remote. - * @param {string} [args.remote] - (Added in 1.1.0) If URL is not specified, determines which remote to use. - * @param {string} [args.remoteRef] - (Added in 1.1.0) The name of the branch on the remote to fetch. By default this is the configured remote tracking branch. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when pull operation completes - * - * @example - * await git.fastForward({ - * fs, - * http, - * dir: '/tutorial', - * ref: 'main', - * singleBranch: true - * }) - * console.log('done') - * - */ -async function fastForward({ - fs, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir = join(dir, '.git'), - ref, - url, - remote, - remoteRef, - corsProxy, - singleBranch, - headers = {}, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('http', http); - assertParameter('gitdir', gitdir); - - const thisWillNotBeUsed = { - name: '', - email: '', - timestamp: Date.now(), - timezoneOffset: 0, - }; - - return await _pull({ - fs: new FileSystem(fs), - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir, - ref, - url, - remote, - remoteRef, - fastForwardOnly: true, - corsProxy, - singleBranch, - headers, - author: thisWillNotBeUsed, - committer: thisWillNotBeUsed, - }) - } catch (err) { - err.caller = 'git.fastForward'; - throw err - } -} - -// @ts-check - -/** - * - * @typedef {object} FetchResult - The object returned has the following schema: - * @property {string | null} defaultBranch - The branch that is cloned if no branch is specified - * @property {string | null} fetchHead - The SHA-1 object id of the fetched head commit - * @property {string | null} fetchHeadDescription - a textual description of the branch that was fetched - * @property {Object<string, string>} [headers] - The HTTP response headers returned by the git server - * @property {string[]} [pruned] - A list of branches that were pruned, if you provided the `prune` parameter - * - */ - -/** - * Fetch commits from a remote repository - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.url] - The URL of the remote repository. The default is the value set in the git config for that remote. - * @param {string} [args.remote] - If URL is not specified, determines which remote to use. - * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch. - * @param {string} [args.ref] - Which branch to fetch if `singleBranch` is true. By default this is the current branch or the remote's default branch. - * @param {string} [args.remoteRef] - The name of the branch on the remote to fetch if `singleBranch` is true. By default this is the configured remote tracking branch. - * @param {boolean} [args.tags = false] - Also fetch tags - * @param {number} [args.depth] - Integer. Determines how much of the git repository's history to retrieve - * @param {boolean} [args.relative = false] - Changes the meaning of `depth` to be measured from the current shallow depth rather than from the branch tip. - * @param {Date} [args.since] - Only fetch commits created after the given date. Mutually exclusive with `depth`. - * @param {string[]} [args.exclude = []] - A list of branches or tags. Instructs the remote server not to send us any commits reachable from these refs. - * @param {boolean} [args.prune] - Delete local remote-tracking branches that are not present on the remote - * @param {boolean} [args.pruneTags] - Prune local tags that don’t exist on the remote, and force-update those tags that differ - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<FetchResult>} Resolves successfully when fetch completes - * @see FetchResult - * - * @example - * let result = await git.fetch({ - * fs, - * http, - * dir: '/tutorial', - * corsProxy: 'https://cors.isomorphic-git.org', - * url: 'https://github.com/isomorphic-git/isomorphic-git', - * ref: 'main', - * depth: 1, - * singleBranch: true, - * tags: false - * }) - * console.log(result) - * - */ -async function fetch({ - fs, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir = join(dir, '.git'), - ref, - remote, - remoteRef, - url, - corsProxy, - depth = null, - since = null, - exclude = [], - relative = false, - tags = false, - singleBranch = false, - headers = {}, - prune = false, - pruneTags = false, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('http', http); - assertParameter('gitdir', gitdir); - - return await _fetch({ - fs: new FileSystem(fs), - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - gitdir, - ref, - remote, - remoteRef, - url, - corsProxy, - depth, - since, - exclude, - relative, - tags, - singleBranch, - headers, - prune, - pruneTags, - }) - } catch (err) { - err.caller = 'git.fetch'; - throw err - } -} - -// @ts-check - -/** - * Find the merge base for a set of commits - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string[]} args.oids - Which commits - * @param {object} [args.cache] - a [cache](cache.md) object - * - */ -async function findMergeBase({ - fs, - dir, - gitdir = join(dir, '.git'), - oids, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('oids', oids); - - return await _findMergeBase({ - fs: new FileSystem(fs), - cache, - gitdir, - oids, - }) - } catch (err) { - err.caller = 'git.findMergeBase'; - throw err - } -} - -// @ts-check - -/** - * Find the root git directory - * - * Starting at `filepath`, walks upward until it finds a directory that contains a subdirectory called '.git'. - * - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.filepath - * - * @returns {Promise<string>} Resolves successfully with a root git directory path - */ -async function _findRoot({ fs, filepath }) { - if (await fs.exists(join(filepath, '.git'))) { - return filepath - } else { - const parent = dirname(filepath); - if (parent === filepath) { - throw new NotFoundError(`git root for ${filepath}`) - } - return _findRoot({ fs, filepath: parent }) - } -} - -// @ts-check - -/** - * Find the root git directory - * - * Starting at `filepath`, walks upward until it finds a directory that contains a subdirectory called '.git'. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system client - * @param {string} args.filepath - The file directory to start searching in. - * - * @returns {Promise<string>} Resolves successfully with a root git directory path - * @throws {NotFoundError} - * - * @example - * let gitroot = await git.findRoot({ - * fs, - * filepath: '/tutorial/src/utils' - * }) - * console.log(gitroot) - * - */ -async function findRoot({ fs, filepath }) { - try { - assertParameter('fs', fs); - assertParameter('filepath', filepath); - - return await _findRoot({ fs: new FileSystem(fs), filepath }) - } catch (err) { - err.caller = 'git.findRoot'; - throw err - } -} - -// @ts-check - -/** - * Read an entry from the git config files. - * - * *Caveats:* - * - Currently only the local `$GIT_DIR/config` file can be read or written. However support for the global `~/.gitconfig` and system `$(prefix)/etc/gitconfig` will be added in the future. - * - The current parser does not support the more exotic features of the git-config file format such as `[include]` and `[includeIf]`. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.path - The key of the git config entry - * - * @returns {Promise<any>} Resolves with the config value - * - * @example - * // Read config value - * let value = await git.getConfig({ - * fs, - * dir: '/tutorial', - * path: 'remote.origin.url' - * }) - * console.log(value) - * - */ -async function getConfig({ fs, dir, gitdir = join(dir, '.git'), path }) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('path', path); - - return await _getConfig({ - fs: new FileSystem(fs), - gitdir, - path, - }) - } catch (err) { - err.caller = 'git.getConfig'; - throw err - } -} - -// @ts-check - -/** - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.path - * - * @returns {Promise<Array<any>>} Resolves with an array of the config value - * - */ -async function _getConfigAll({ fs, gitdir, path }) { - const config = await GitConfigManager.get({ fs, gitdir }); - return config.getall(path) -} - -// @ts-check - -/** - * Read a multi-valued entry from the git config files. - * - * *Caveats:* - * - Currently only the local `$GIT_DIR/config` file can be read or written. However support for the global `~/.gitconfig` and system `$(prefix)/etc/gitconfig` will be added in the future. - * - The current parser does not support the more exotic features of the git-config file format such as `[include]` and `[includeIf]`. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.path - The key of the git config entry - * - * @returns {Promise<Array<any>>} Resolves with the config value - * - */ -async function getConfigAll({ - fs, - dir, - gitdir = join(dir, '.git'), - path, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('path', path); - - return await _getConfigAll({ - fs: new FileSystem(fs), - gitdir, - path, - }) - } catch (err) { - err.caller = 'git.getConfigAll'; - throw err - } -} - -// @ts-check - -/** - * - * @typedef {Object} GetRemoteInfoResult - The object returned has the following schema: - * @property {string[]} capabilities - The list of capabilities returned by the server (part of the Git protocol) - * @property {Object} [refs] - * @property {string} [HEAD] - The default branch of the remote - * @property {Object<string, string>} [refs.heads] - The branches on the remote - * @property {Object<string, string>} [refs.pull] - The special branches representing pull requests (non-standard) - * @property {Object<string, string>} [refs.tags] - The tags on the remote - * - */ - -/** - * List a remote servers branches, tags, and capabilities. - * - * This is a rare command that doesn't require an `fs`, `dir`, or even `gitdir` argument. - * It just communicates to a remote git server, using the first step of the `git-upload-pack` handshake, but stopping short of fetching the packfile. - * - * @param {object} args - * @param {HttpClient} args.http - an HTTP client - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.url - The URL of the remote repository. Will be gotten from gitconfig if absent. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.forPush = false] - By default, the command queries the 'fetch' capabilities. If true, it will ask for the 'push' capabilities. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * - * @returns {Promise<GetRemoteInfoResult>} Resolves successfully with an object listing the branches, tags, and capabilities of the remote. - * @see GetRemoteInfoResult - * - * @example - * let info = await git.getRemoteInfo({ - * http, - * url: - * "https://cors.isomorphic-git.org/github.com/isomorphic-git/isomorphic-git.git" - * }); - * console.log(info); - * - */ -async function getRemoteInfo({ - http, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - url, - headers = {}, - forPush = false, -}) { - try { - assertParameter('http', http); - assertParameter('url', url); - - const GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url }); - const remote = await GitRemoteHTTP.discover({ - http, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - service: forPush ? 'git-receive-pack' : 'git-upload-pack', - url, - headers, - protocolVersion: 1, - }); - - // Note: remote.capabilities, remote.refs, and remote.symrefs are Set and Map objects, - // but one of the objectives of the public API is to always return JSON-compatible objects - // so we must JSONify them. - const result = { - capabilities: [...remote.capabilities], - }; - // Convert the flat list into an object tree, because I figure 99% of the time - // that will be easier to use. - for (const [ref, oid] of remote.refs) { - const parts = ref.split('/'); - const last = parts.pop(); - let o = result; - for (const part of parts) { - o[part] = o[part] || {}; - o = o[part]; - } - o[last] = oid; - } - // Merge symrefs on top of refs to more closely match actual git repo layouts - for (const [symref, ref] of remote.symrefs) { - const parts = symref.split('/'); - const last = parts.pop(); - let o = result; - for (const part of parts) { - o[part] = o[part] || {}; - o = o[part]; - } - o[last] = ref; - } - return result - } catch (err) { - err.caller = 'git.getRemoteInfo'; - throw err - } -} - -// @ts-check - -/** - * @param {any} remote - * @param {string} prefix - * @param {boolean} symrefs - * @param {boolean} peelTags - * @returns {ServerRef[]} - */ -function formatInfoRefs(remote, prefix, symrefs, peelTags) { - const refs = []; - for (const [key, value] of remote.refs) { - if (prefix && !key.startsWith(prefix)) continue - - if (key.endsWith('^{}')) { - if (peelTags) { - const _key = key.replace('^{}', ''); - // Peeled tags are almost always listed immediately after the original tag - const last = refs[refs.length - 1]; - const r = last.ref === _key ? last : refs.find(x => x.ref === _key); - if (r === undefined) { - throw new Error('I did not expect this to happen') - } - r.peeled = value; - } - continue - } - /** @type ServerRef */ - const ref = { ref: key, oid: value }; - if (symrefs) { - if (remote.symrefs.has(key)) { - ref.target = remote.symrefs.get(key); - } - } - refs.push(ref); - } - return refs -} - -// @ts-check - -/** - * @typedef {Object} GetRemoteInfo2Result - This object has the following schema: - * @property {1 | 2} protocolVersion - Git protocol version the server supports - * @property {Object<string, string | true>} capabilities - An object of capabilities represented as keys and values - * @property {ServerRef[]} [refs] - Server refs (they get returned by protocol version 1 whether you want them or not) - */ - -/** - * List a remote server's capabilities. - * - * This is a rare command that doesn't require an `fs`, `dir`, or even `gitdir` argument. - * It just communicates to a remote git server, determining what protocol version, commands, and features it supports. - * - * > The successor to [`getRemoteInfo`](./getRemoteInfo.md), this command supports Git Wire Protocol Version 2. - * > Therefore its return type is more complicated as either: - * > - * > - v1 capabilities (and refs) or - * > - v2 capabilities (and no refs) - * > - * > are returned. - * > If you just care about refs, use [`listServerRefs`](./listServerRefs.md) - * - * @param {object} args - * @param {HttpClient} args.http - an HTTP client - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.url - The URL of the remote repository. Will be gotten from gitconfig if absent. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.forPush = false] - By default, the command queries the 'fetch' capabilities. If true, it will ask for the 'push' capabilities. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {1 | 2} [args.protocolVersion = 2] - Which version of the Git Protocol to use. - * - * @returns {Promise<GetRemoteInfo2Result>} Resolves successfully with an object listing the capabilities of the remote. - * @see GetRemoteInfo2Result - * @see ServerRef - * - * @example - * let info = await git.getRemoteInfo2({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git" - * }); - * console.log(info); - * - */ -async function getRemoteInfo2({ - http, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - url, - headers = {}, - forPush = false, - protocolVersion = 2, -}) { - try { - assertParameter('http', http); - assertParameter('url', url); - - const GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url }); - const remote = await GitRemoteHTTP.discover({ - http, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - service: forPush ? 'git-receive-pack' : 'git-upload-pack', - url, - headers, - protocolVersion, - }); - - if (remote.protocolVersion === 2) { - /** @type GetRemoteInfo2Result */ - return { - protocolVersion: remote.protocolVersion, - capabilities: remote.capabilities2, - } - } - - // Note: remote.capabilities, remote.refs, and remote.symrefs are Set and Map objects, - // but one of the objectives of the public API is to always return JSON-compatible objects - // so we must JSONify them. - /** @type Object<string, true> */ - const capabilities = {}; - for (const cap of remote.capabilities) { - const [key, value] = cap.split('='); - if (value) { - capabilities[key] = value; - } else { - capabilities[key] = true; - } - } - /** @type GetRemoteInfo2Result */ - return { - protocolVersion: 1, - capabilities, - refs: formatInfoRefs(remote, undefined, true, true), - } - } catch (err) { - err.caller = 'git.getRemoteInfo2'; - throw err - } -} - -async function hashObject({ - type, - object, - format = 'content', - oid = undefined, -}) { - if (format !== 'deflated') { - if (format !== 'wrapped') { - object = GitObject.wrap({ type, object }); - } - oid = await shasum(object); - } - return { oid, object } -} - -// @ts-check - -/** - * - * @typedef {object} HashBlobResult - The object returned has the following schema: - * @property {string} oid - The SHA-1 object id - * @property {'blob'} type - The type of the object - * @property {Uint8Array} object - The wrapped git object (the thing that is hashed) - * @property {'wrapped'} format - The format of the object - * - */ - -/** - * Compute what the SHA-1 object id of a file would be - * - * @param {object} args - * @param {Uint8Array|string} args.object - The object to write. If `object` is a String then it will be converted to a Uint8Array using UTF-8 encoding. - * - * @returns {Promise<HashBlobResult>} Resolves successfully with the SHA-1 object id and the wrapped object Uint8Array. - * @see HashBlobResult - * - * @example - * let { oid, type, object, format } = await git.hashBlob({ - * object: 'Hello world!', - * }) - * - * console.log('oid', oid) - * console.log('type', type) - * console.log('object', object) - * console.log('format', format) - * - */ -async function hashBlob({ object }) { - try { - assertParameter('object', object); - - // Convert object to buffer - if (typeof object === 'string') { - object = Buffer.from(object, 'utf8'); - } else { - object = Buffer.from(object); - } - - const type = 'blob'; - const { oid, object: _object } = await hashObject({ - type: 'blob', - format: 'content', - object, - }); - return { oid, type, object: new Uint8Array(_object), format: 'wrapped' } - } catch (err) { - err.caller = 'git.hashBlob'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {ProgressCallback} [args.onProgress] - * @param {string} args.dir - * @param {string} args.gitdir - * @param {string} args.filepath - * - * @returns {Promise<{oids: string[]}>} - */ -async function _indexPack({ - fs, - cache, - onProgress, - dir, - gitdir, - filepath, -}) { - try { - filepath = join(dir, filepath); - const pack = await fs.read(filepath); - const getExternalRefDelta = oid => _readObject({ fs, cache, gitdir, oid }); - const idx = await GitPackIndex.fromPack({ - pack, - getExternalRefDelta, - onProgress, - }); - await fs.write(filepath.replace(/\.pack$/, '.idx'), await idx.toBuffer()); - return { - oids: [...idx.hashes], - } - } catch (err) { - err.caller = 'git.indexPack'; - throw err - } -} - -// @ts-check - -/** - * Create the .idx file for a given .pack file - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the .pack file to index - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<{oids: string[]}>} Resolves with a list of the SHA-1 object ids contained in the packfile - * - * @example - * let packfiles = await fs.promises.readdir('/tutorial/.git/objects/pack') - * packfiles = packfiles.filter(name => name.endsWith('.pack')) - * console.log('packfiles', packfiles) - * - * const { oids } = await git.indexPack({ - * fs, - * dir: '/tutorial', - * filepath: `.git/objects/pack/${packfiles[0]}`, - * async onProgress (evt) { - * console.log(`${evt.phase}: ${evt.loaded} / ${evt.total}`) - * } - * }) - * console.log(oids) - * - */ -async function indexPack({ - fs, - onProgress, - dir, - gitdir = join(dir, '.git'), - filepath, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('dir', dir); - assertParameter('gitdir', dir); - assertParameter('filepath', filepath); - - return await _indexPack({ - fs: new FileSystem(fs), - cache, - onProgress, - dir, - gitdir, - filepath, - }) - } catch (err) { - err.caller = 'git.indexPack'; - throw err - } -} - -// @ts-check - -/** - * Initialize a new repository - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {boolean} [args.bare = false] - Initialize a bare repository - * @param {string} [args.defaultBranch = 'master'] - The name of the default branch (might be changed to a required argument in 2.0.0) - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.init({ fs, dir: '/tutorial' }) - * console.log('done') - * - */ -async function init({ - fs, - bare = false, - dir, - gitdir = bare ? dir : join(dir, '.git'), - defaultBranch = 'master', -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - if (!bare) { - assertParameter('dir', dir); - } - - return await _init({ - fs: new FileSystem(fs), - bare, - dir, - gitdir, - defaultBranch, - }) - } catch (err) { - err.caller = 'git.init'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} args.oid - * @param {string} args.ancestor - * @param {number} args.depth - Maximum depth to search before giving up. -1 means no maximum depth. - * - * @returns {Promise<boolean>} - */ -async function _isDescendent({ - fs, - cache, - gitdir, - oid, - ancestor, - depth, -}) { - const shallows = await GitShallowManager.read({ fs, gitdir }); - if (!oid) { - throw new MissingParameterError('oid') - } - if (!ancestor) { - throw new MissingParameterError('ancestor') - } - // If you don't like this behavior, add your own check. - // Edge cases are hard to define a perfect solution. - if (oid === ancestor) return false - // We do not use recursion here, because that would lead to depth-first traversal, - // and we want to maintain a breadth-first traversal to avoid hitting shallow clone depth cutoffs. - const queue = [oid]; - const visited = new Set(); - let searchdepth = 0; - while (queue.length) { - if (searchdepth++ === depth) { - throw new MaxDepthError(depth) - } - const oid = queue.shift(); - const { type, object } = await _readObject({ - fs, - cache, - gitdir, - oid, - }); - if (type !== 'commit') { - throw new ObjectTypeError(oid, type, 'commit') - } - const commit = GitCommit.from(object).parse(); - // Are any of the parents the sought-after ancestor? - for (const parent of commit.parent) { - if (parent === ancestor) return true - } - // If not, add them to heads (unless we know this is a shallow commit) - if (!shallows.has(oid)) { - for (const parent of commit.parent) { - if (!visited.has(parent)) { - queue.push(parent); - visited.add(parent); - } - } - } - // Eventually, we'll travel entire tree to the roots where all the parents are empty arrays, - // or hit the shallow depth and throw an error. Excluding the possibility of grafts, or - // different branches cloned to different depths, you would hit this error at the same time - // for all parents, so trying to continue is futile. - } - return false -} - -// @ts-check - -/** - * Check whether a git commit is descended from another - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The descendent commit - * @param {string} args.ancestor - The (proposed) ancestor commit - * @param {number} [args.depth = -1] - Maximum depth to search before giving up. -1 means no maximum depth. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<boolean>} Resolves to true if `oid` is a descendent of `ancestor` - * - * @example - * let oid = await git.resolveRef({ fs, dir: '/tutorial', ref: 'main' }) - * let ancestor = await git.resolveRef({ fs, dir: '/tutorial', ref: 'v0.20.0' }) - * console.log(oid, ancestor) - * await git.isDescendent({ fs, dir: '/tutorial', oid, ancestor, depth: -1 }) - * - */ -async function isDescendent({ - fs, - dir, - gitdir = join(dir, '.git'), - oid, - ancestor, - depth = -1, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - assertParameter('ancestor', ancestor); - - return await _isDescendent({ - fs: new FileSystem(fs), - cache, - gitdir, - oid, - ancestor, - depth, - }) - } catch (err) { - err.caller = 'git.isDescendent'; - throw err - } -} - -// @ts-check - -/** - * List branches - * - * By default it lists local branches. If a 'remote' is specified, it lists the remote's branches. When listing remote branches, the HEAD branch is not filtered out, so it may be included in the list of results. - * - * Note that specifying a remote does not actually contact the server and update the list of branches. - * If you want an up-to-date list, first do a `fetch` to that remote. - * (Which branch you fetch doesn't matter - the list of branches available on the remote is updated during the fetch handshake.) - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.remote] - Instead of the branches in `refs/heads`, list the branches in `refs/remotes/${remote}`. - * - * @returns {Promise<Array<string>>} Resolves successfully with an array of branch names - * - * @example - * let branches = await git.listBranches({ fs, dir: '/tutorial' }) - * console.log(branches) - * let remoteBranches = await git.listBranches({ fs, dir: '/tutorial', remote: 'origin' }) - * console.log(remoteBranches) - * - */ -async function listBranches({ - fs, - dir, - gitdir = join(dir, '.git'), - remote, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - - return GitRefManager.listBranches({ - fs: new FileSystem(fs), - gitdir, - remote, - }) - } catch (err) { - err.caller = 'git.listBranches'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {string} args.gitdir - * @param {string} [args.ref] - * - * @returns {Promise<Array<string>>} - */ -async function _listFiles({ fs, gitdir, ref, cache }) { - if (ref) { - const oid = await GitRefManager.resolve({ gitdir, fs, ref }); - const filenames = []; - await accumulateFilesFromOid({ - fs, - cache, - gitdir, - oid, - filenames, - prefix: '', - }); - return filenames - } else { - return GitIndexManager.acquire({ fs, gitdir, cache }, async function( - index - ) { - return index.entries.map(x => x.path) - }) - } -} - -async function accumulateFilesFromOid({ - fs, - cache, - gitdir, - oid, - filenames, - prefix, -}) { - const { tree } = await _readTree({ fs, cache, gitdir, oid }); - // TODO: Use `walk` to do this. Should be faster. - for (const entry of tree) { - if (entry.type === 'tree') { - await accumulateFilesFromOid({ - fs, - cache, - gitdir, - oid: entry.oid, - filenames, - prefix: join(prefix, entry.path), - }); - } else { - filenames.push(join(prefix, entry.path)); - } - } -} - -// @ts-check - -/** - * List all the files in the git index or a commit - * - * > Note: This function is efficient for listing the files in the staging area, but listing all the files in a commit requires recursively walking through the git object store. - * > If you do not require a complete list of every file, better performance can be achieved by using [walk](./walk) and ignoring subdirectories you don't care about. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - Return a list of all the files in the commit at `ref` instead of the files currently in the git index (aka staging area) - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Array<string>>} Resolves successfully with an array of filepaths - * - * @example - * // All the files in the previous commit - * let files = await git.listFiles({ fs, dir: '/tutorial', ref: 'HEAD' }) - * console.log(files) - * // All the files in the current staging area - * files = await git.listFiles({ fs, dir: '/tutorial' }) - * console.log(files) - * - */ -async function listFiles({ - fs, - dir, - gitdir = join(dir, '.git'), - ref, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - - return await _listFiles({ - fs: new FileSystem(fs), - cache, - gitdir, - ref, - }) - } catch (err) { - err.caller = 'git.listFiles'; - throw err - } -} - -// @ts-check - -/** - * List all the object notes - * - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} args.ref - * - * @returns {Promise<Array<{target: string, note: string}>>} - */ - -async function _listNotes({ fs, cache, gitdir, ref }) { - // Get the current note commit - let parent; - try { - parent = await GitRefManager.resolve({ gitdir, fs, ref }); - } catch (err) { - if (err instanceof NotFoundError) { - return [] - } - } - - // Create the current note tree - const result = await _readTree({ - fs, - cache, - gitdir, - oid: parent, - }); - - // Format the tree entries - const notes = result.tree.map(entry => ({ - target: entry.path, - note: entry.oid, - })); - return notes -} - -// @ts-check - -/** - * List all the object notes - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - The notes ref to look under - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Array<{target: string, note: string}>>} Resolves successfully with an array of entries containing SHA-1 object ids of the note and the object the note targets - */ - -async function listNotes({ - fs, - dir, - gitdir = join(dir, '.git'), - ref = 'refs/notes/commits', - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - - return await _listNotes({ - fs: new FileSystem(fs), - cache, - gitdir, - ref, - }) - } catch (err) { - err.caller = 'git.listNotes'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * - * @returns {Promise<Array<{remote: string, url: string}>>} - */ -async function _listRemotes({ fs, gitdir }) { - const config = await GitConfigManager.get({ fs, gitdir }); - const remoteNames = await config.getSubsections('remote'); - const remotes = Promise.all( - remoteNames.map(async remote => { - const url = await config.get(`remote.${remote}.url`); - return { remote, url } - }) - ); - return remotes -} - -// @ts-check - -/** - * List remotes - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * - * @returns {Promise<Array<{remote: string, url: string}>>} Resolves successfully with an array of `{remote, url}` objects - * - * @example - * let remotes = await git.listRemotes({ fs, dir: '/tutorial' }) - * console.log(remotes) - * - */ -async function listRemotes({ fs, dir, gitdir = join(dir, '.git') }) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - - return await _listRemotes({ - fs: new FileSystem(fs), - gitdir, - }) - } catch (err) { - err.caller = 'git.listRemotes'; - throw err - } -} - -/** - * @typedef {Object} ServerRef - This object has the following schema: - * @property {string} ref - The name of the ref - * @property {string} oid - The SHA-1 object id the ref points to - * @property {string} [target] - The target ref pointed to by a symbolic ref - * @property {string} [peeled] - If the oid is the SHA-1 object id of an annotated tag, this is the SHA-1 object id that the annotated tag points to - */ - -async function parseListRefsResponse(stream) { - const read = GitPktLine.streamReader(stream); - - // TODO: when we re-write everything to minimize memory usage, - // we could make this a generator - const refs = []; - - let line; - while (true) { - line = await read(); - if (line === true) break - if (line === null) continue - line = line.toString('utf8').replace(/\n$/, ''); - const [oid, ref, ...attrs] = line.split(' '); - const r = { ref, oid }; - for (const attr of attrs) { - const [name, value] = attr.split(':'); - if (name === 'symref-target') { - r.target = value; - } else if (name === 'peeled') { - r.peeled = value; - } - } - refs.push(r); - } - - return refs -} - -/** - * @param {object} args - * @param {string} [args.prefix] - Only list refs that start with this prefix - * @param {boolean} [args.symrefs = false] - Include symbolic ref targets - * @param {boolean} [args.peelTags = false] - Include peeled tags values - * @returns {Uint8Array[]} - */ -async function writeListRefsRequest({ prefix, symrefs, peelTags }) { - const packstream = []; - // command - packstream.push(GitPktLine.encode('command=ls-refs\n')); - // capability-list - packstream.push(GitPktLine.encode(`agent=${pkg.agent}\n`)); - // [command-args] - if (peelTags || symrefs || prefix) { - packstream.push(GitPktLine.delim()); - } - if (peelTags) packstream.push(GitPktLine.encode('peel')); - if (symrefs) packstream.push(GitPktLine.encode('symrefs')); - if (prefix) packstream.push(GitPktLine.encode(`ref-prefix ${prefix}`)); - packstream.push(GitPktLine.flush()); - return packstream -} - -// @ts-check - -/** - * Fetch a list of refs (branches, tags, etc) from a server. - * - * This is a rare command that doesn't require an `fs`, `dir`, or even `gitdir` argument. - * It just requires an `http` argument. - * - * ### About `protocolVersion` - * - * There's a rather fun trade-off between Git Protocol Version 1 and Git Protocol Version 2. - * Version 2 actually requires 2 HTTP requests instead of 1, making it similar to fetch or push in that regard. - * However, version 2 supports server-side filtering by prefix, whereas that filtering is done client-side in version 1. - * Which protocol is most efficient therefore depends on the number of refs on the remote, the latency of the server, and speed of the network connection. - * For an small repos (or fast Internet connections), the requirement to make two trips to the server makes protocol 2 slower. - * But for large repos (or slow Internet connections), the decreased payload size of the second request makes up for the additional request. - * - * Hard numbers vary by situation, but here's some numbers from my machine: - * - * Using isomorphic-git in a browser, with a CORS proxy, listing only the branches (refs/heads) of https://github.com/isomorphic-git/isomorphic-git - * - Protocol Version 1 took ~300ms and transfered 84 KB. - * - Protocol Version 2 took ~500ms and transfered 4.1 KB. - * - * Using isomorphic-git in a browser, with a CORS proxy, listing only the branches (refs/heads) of https://gitlab.com/gitlab-org/gitlab - * - Protocol Version 1 took ~4900ms and transfered 9.41 MB. - * - Protocol Version 2 took ~1280ms and transfered 433 KB. - * - * Finally, there is a fun quirk regarding the `symrefs` parameter. - * Protocol Version 1 will generally only return the `HEAD` symref and not others. - * Historically, this meant that servers don't use symbolic refs except for `HEAD`, which is used to point at the "default branch". - * However Protocol Version 2 can return *all* the symbolic refs on the server. - * So if you are running your own git server, you could take advantage of that I guess. - * - * #### TL;DR - * If you are _not_ taking advantage of `prefix` I would recommend `protocolVersion: 1`. - * Otherwise, I recommend to use the default which is `protocolVersion: 2`. - * - * @param {object} args - * @param {HttpClient} args.http - an HTTP client - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.url - The URL of the remote repository. Will be gotten from gitconfig if absent. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.forPush = false] - By default, the command queries the 'fetch' capabilities. If true, it will ask for the 'push' capabilities. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {1 | 2} [args.protocolVersion = 2] - Which version of the Git Protocol to use. - * @param {string} [args.prefix] - Only list refs that start with this prefix - * @param {boolean} [args.symrefs = false] - Include symbolic ref targets - * @param {boolean} [args.peelTags = false] - Include annotated tag peeled targets - * - * @returns {Promise<ServerRef[]>} Resolves successfully with an array of ServerRef objects - * @see ServerRef - * - * @example - * // List all the branches on a repo - * let refs = await git.listServerRefs({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git", - * prefix: "refs/heads/", - * }); - * console.log(refs); - * - * @example - * // Get the default branch on a repo - * let refs = await git.listServerRefs({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git", - * prefix: "HEAD", - * symrefs: true, - * }); - * console.log(refs); - * - * @example - * // List all the tags on a repo - * let refs = await git.listServerRefs({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git", - * prefix: "refs/tags/", - * peelTags: true, - * }); - * console.log(refs); - * - * @example - * // List all the pull requests on a repo - * let refs = await git.listServerRefs({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git", - * prefix: "refs/pull/", - * }); - * console.log(refs); - * - */ -async function listServerRefs({ - http, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - url, - headers = {}, - forPush = false, - protocolVersion = 2, - prefix, - symrefs, - peelTags, -}) { - try { - assertParameter('http', http); - assertParameter('url', url); - - const remote = await GitRemoteHTTP.discover({ - http, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - service: forPush ? 'git-receive-pack' : 'git-upload-pack', - url, - headers, - protocolVersion, - }); - - if (remote.protocolVersion === 1) { - return formatInfoRefs(remote, prefix, symrefs, peelTags) - } - - // Protocol Version 2 - const body = await writeListRefsRequest({ prefix, symrefs, peelTags }); - - const res = await GitRemoteHTTP.connect({ - http, - auth: remote.auth, - headers, - corsProxy, - service: forPush ? 'git-receive-pack' : 'git-upload-pack', - url, - body, - }); - - return parseListRefsResponse(res.body) - } catch (err) { - err.caller = 'git.listServerRefs'; - throw err - } -} - -// @ts-check - -/** - * List tags - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * - * @returns {Promise<Array<string>>} Resolves successfully with an array of tag names - * - * @example - * let tags = await git.listTags({ fs, dir: '/tutorial' }) - * console.log(tags) - * - */ -async function listTags({ fs, dir, gitdir = join(dir, '.git') }) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - return GitRefManager.listTags({ fs: new FileSystem(fs), gitdir }) - } catch (err) { - err.caller = 'git.listTags'; - throw err - } -} - -async function resolveCommit({ fs, cache, gitdir, oid }) { - const { type, object } = await _readObject({ fs, cache, gitdir, oid }); - // Resolve annotated tag objects to whatever - if (type === 'tag') { - oid = GitAnnotatedTag.from(object).parse().object; - return resolveCommit({ fs, cache, gitdir, oid }) - } - if (type !== 'commit') { - throw new ObjectTypeError(oid, type, 'commit') - } - return { commit: GitCommit.from(object), oid } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} args.oid - * - * @returns {Promise<ReadCommitResult>} Resolves successfully with a git commit object - * @see ReadCommitResult - * @see CommitObject - * - */ -async function _readCommit({ fs, cache, gitdir, oid }) { - const { commit, oid: commitOid } = await resolveCommit({ - fs, - cache, - gitdir, - oid, - }); - const result = { - oid: commitOid, - commit: commit.parse(), - payload: commit.withoutSignature(), - }; - // @ts-ignore - return result -} - -function compareAge(a, b) { - return a.committer.timestamp - b.committer.timestamp -} - -// @ts-check - -/** - * Get commit descriptions from the git history - * - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} args.ref - * @param {number|void} args.depth - * @param {Date|void} args.since - * - * @returns {Promise<Array<ReadCommitResult>>} - */ -async function _log({ fs, cache, gitdir, ref, depth, since }) { - const sinceTimestamp = - typeof since === 'undefined' - ? undefined - : Math.floor(since.valueOf() / 1000); - // TODO: In the future, we may want to have an API where we return a - // async iterator that emits commits. - const commits = []; - const shallowCommits = await GitShallowManager.read({ fs, gitdir }); - const oid = await GitRefManager.resolve({ fs, gitdir, ref }); - const tips = [await _readCommit({ fs, cache, gitdir, oid })]; - - while (tips.length > 0) { - const commit = tips.pop(); - - // Stop the log if we've hit the age limit - if ( - sinceTimestamp !== undefined && - commit.commit.committer.timestamp <= sinceTimestamp - ) { - break - } - - commits.push(commit); - - // Stop the loop if we have enough commits now. - if (depth !== undefined && commits.length === depth) break - - // If this is not a shallow commit... - if (!shallowCommits.has(commit.oid)) { - // Add the parents of this commit to the queue - // Note: for the case of a commit with no parents, it will concat an empty array, having no net effect. - for (const oid of commit.commit.parent) { - const commit = await _readCommit({ fs, cache, gitdir, oid }); - if (!tips.map(commit => commit.oid).includes(commit.oid)) { - tips.push(commit); - } - } - } - - // Process tips in order by age - tips.sort((a, b) => compareAge(a.commit, b.commit)); - } - return commits -} - -// @ts-check - -/** - * Get commit descriptions from the git history - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref = 'HEAD'] - The commit to begin walking backwards through the history from - * @param {number} [args.depth] - Limit the number of commits returned. No limit by default. - * @param {Date} [args.since] - Return history newer than the given date. Can be combined with `depth` to get whichever is shorter. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Array<ReadCommitResult>>} Resolves to an array of ReadCommitResult objects - * @see ReadCommitResult - * @see CommitObject - * - * @example - * let commits = await git.log({ - * fs, - * dir: '/tutorial', - * depth: 5, - * ref: 'main' - * }) - * console.log(commits) - * - */ -async function log({ - fs, - dir, - gitdir = join(dir, '.git'), - ref = 'HEAD', - depth, - since, // Date - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - - return await _log({ - fs: new FileSystem(fs), - cache, - gitdir, - ref, - depth, - since, - }) - } catch (err) { - err.caller = 'git.log'; - throw err - } -} - -// @ts-check - -/** - * - * @typedef {Object} MergeResult - Returns an object with a schema like this: - * @property {string} [oid] - The SHA-1 object id that is now at the head of the branch. Absent only if `dryRun` was specified and `mergeCommit` is true. - * @property {boolean} [alreadyMerged] - True if the branch was already merged so no changes were made - * @property {boolean} [fastForward] - True if it was a fast-forward merge - * @property {boolean} [mergeCommit] - True if merge resulted in a merge commit - * @property {string} [tree] - The SHA-1 object id of the tree resulting from a merge commit - * - */ - -/** - * Merge two branches - * - * ## Limitations - * - * Currently it does not support incomplete merges. That is, if there are merge conflicts it cannot solve - * with the built in diff3 algorithm it will not modify the working dir, and will throw a [`MergeNotSupportedError`](./errors.md#mergenotsupportedError) error. - * - * Currently it will fail if multiple candidate merge bases are found. (It doesn't yet implement the recursive merge strategy.) - * - * Currently it does not support selecting alternative merge strategies. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ours] - The branch receiving the merge. If undefined, defaults to the current branch. - * @param {string} args.theirs - The branch to be merged - * @param {boolean} [args.fastForwardOnly = false] - If true, then non-fast-forward merges will throw an Error instead of performing a merge. - * @param {boolean} [args.dryRun = false] - If true, simulates a merge so you can test whether it would succeed. - * @param {boolean} [args.noUpdateBranch = false] - If true, does not update the branch pointer after creating the commit. - * @param {string} [args.message] - Overrides the default auto-generated merge commit message - * @param {Object} [args.author] - passed to [commit](commit.md) when creating a merge commit - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer] - passed to [commit](commit.md) when creating a merge commit - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - passed to [commit](commit.md) when creating a merge commit - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<MergeResult>} Resolves to a description of the merge operation - * @see MergeResult - * - * @example - * let m = await git.merge({ - * fs, - * dir: '/tutorial', - * ours: 'main', - * theirs: 'remotes/origin/main' - * }) - * console.log(m) - * - */ -async function merge({ - fs: _fs, - onSign, - dir, - gitdir = join(dir, '.git'), - ours, - theirs, - fastForwardOnly = false, - dryRun = false, - noUpdateBranch = false, - message, - author: _author, - committer: _committer, - signingKey, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - if (signingKey) { - assertParameter('onSign', onSign); - } - const fs = new FileSystem(_fs); - - const author = await normalizeAuthorObject({ fs, gitdir, author: _author }); - if (!author && !fastForwardOnly) throw new MissingNameError('author') - - const committer = await normalizeCommitterObject({ - fs, - gitdir, - author, - committer: _committer, - }); - if (!committer && !fastForwardOnly) { - throw new MissingNameError('committer') - } - - return await _merge({ - fs, - cache, - gitdir, - ours, - theirs, - fastForwardOnly, - dryRun, - noUpdateBranch, - message, - author, - committer, - signingKey, - }) - } catch (err) { - err.caller = 'git.merge'; - throw err - } -} - -/** - * @enum {number} - */ -const types = { - commit: 0b0010000, - tree: 0b0100000, - blob: 0b0110000, - tag: 0b1000000, - ofs_delta: 0b1100000, - ref_delta: 0b1110000, -}; - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string[]} args.oids - */ -async function _pack({ - fs, - cache, - dir, - gitdir = join(dir, '.git'), - oids, -}) { - const hash = new Hash(); - const outputStream = []; - function write(chunk, enc) { - const buff = Buffer.from(chunk, enc); - outputStream.push(buff); - hash.update(buff); - } - async function writeObject({ stype, object }) { - // Object type is encoded in bits 654 - const type = types[stype]; - // The length encoding gets complicated. - let length = object.length; - // Whether the next byte is part of the variable-length encoded number - // is encoded in bit 7 - let multibyte = length > 0b1111 ? 0b10000000 : 0b0; - // Last four bits of length is encoded in bits 3210 - const lastFour = length & 0b1111; - // Discard those bits - length = length >>> 4; - // The first byte is then (1-bit multibyte?), (3-bit type), (4-bit least sig 4-bits of length) - let byte = (multibyte | type | lastFour).toString(16); - write(byte, 'hex'); - // Now we keep chopping away at length 7-bits at a time until its zero, - // writing out the bytes in what amounts to little-endian order. - while (multibyte) { - multibyte = length > 0b01111111 ? 0b10000000 : 0b0; - byte = multibyte | (length & 0b01111111); - write(padHex(2, byte), 'hex'); - length = length >>> 7; - } - // Lastly, we can compress and write the object. - write(Buffer.from(await deflate(object))); - } - write('PACK'); - write('00000002', 'hex'); - // Write a 4 byte (32-bit) int - write(padHex(8, oids.length), 'hex'); - for (const oid of oids) { - const { type, object } = await _readObject({ fs, cache, gitdir, oid }); - await writeObject({ write, object, stype: type }); - } - // Write SHA1 checksum - const digest = hash.digest(); - outputStream.push(digest); - return outputStream -} - -// @ts-check - -/** - * - * @typedef {Object} PackObjectsResult The packObjects command returns an object with two properties: - * @property {string} filename - The suggested filename for the packfile if you want to save it to disk somewhere. It includes the packfile SHA. - * @property {Uint8Array} [packfile] - The packfile contents. Not present if `write` parameter was true, in which case the packfile was written straight to disk. - */ - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string[]} args.oids - * @param {boolean} args.write - * - * @returns {Promise<PackObjectsResult>} - * @see PackObjectsResult - */ -async function _packObjects({ fs, cache, gitdir, oids, write }) { - const buffers = await _pack({ fs, cache, gitdir, oids }); - const packfile = Buffer.from(await collect(buffers)); - const packfileSha = packfile.slice(-20).toString('hex'); - const filename = `pack-${packfileSha}.pack`; - if (write) { - await fs.write(join(gitdir, `objects/pack/${filename}`), packfile); - return { filename } - } - return { - filename, - packfile: new Uint8Array(packfile), - } -} - -// @ts-check - -/** - * - * @typedef {Object} PackObjectsResult The packObjects command returns an object with two properties: - * @property {string} filename - The suggested filename for the packfile if you want to save it to disk somewhere. It includes the packfile SHA. - * @property {Uint8Array} [packfile] - The packfile contents. Not present if `write` parameter was true, in which case the packfile was written straight to disk. - */ - -/** - * Create a packfile from an array of SHA-1 object ids - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string[]} args.oids - An array of SHA-1 object ids to be included in the packfile - * @param {boolean} [args.write = false] - Whether to save the packfile to disk or not - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<PackObjectsResult>} Resolves successfully when the packfile is ready with the filename and buffer - * @see PackObjectsResult - * - * @example - * // Create a packfile containing only an empty tree - * let { packfile } = await git.packObjects({ - * fs, - * dir: '/tutorial', - * oids: ['4b825dc642cb6eb9a060e54bf8d69288fbee4904'] - * }) - * console.log(packfile) - * - */ -async function packObjects({ - fs, - dir, - gitdir = join(dir, '.git'), - oids, - write = false, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('oids', oids); - - return await _packObjects({ - fs: new FileSystem(fs), - cache, - gitdir, - oids, - write, - }) - } catch (err) { - err.caller = 'git.packObjects'; - throw err - } -} - -// @ts-check - -/** - * Fetch and merge commits from a remote repository - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - Which branch to merge into. By default this is the currently checked out branch. - * @param {string} [args.url] - (Added in 1.1.0) The URL of the remote repository. The default is the value set in the git config for that remote. - * @param {string} [args.remote] - (Added in 1.1.0) If URL is not specified, determines which remote to use. - * @param {string} [args.remoteRef] - (Added in 1.1.0) The name of the branch on the remote to fetch. By default this is the configured remote tracking branch. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch. - * @param {boolean} [args.fastForwardOnly = false] - Only perform simple fast-forward merges. (Don't create merge commits.) - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {Object} [args.author] - The details about the author. - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer = author] - The details about the commit committer, in the same format as the author parameter. If not specified, the author details are used. - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - passed to [commit](commit.md) when creating a merge commit - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when pull operation completes - * - * @example - * await git.pull({ - * fs, - * http, - * dir: '/tutorial', - * ref: 'main', - * singleBranch: true - * }) - * console.log('done') - * - */ -async function pull({ - fs: _fs, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir = join(dir, '.git'), - ref, - url, - remote, - remoteRef, - fastForwardOnly = false, - corsProxy, - singleBranch, - headers = {}, - author: _author, - committer: _committer, - signingKey, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - - const fs = new FileSystem(_fs); - - const author = await normalizeAuthorObject({ fs, gitdir, author: _author }); - if (!author) throw new MissingNameError('author') - - const committer = await normalizeCommitterObject({ - fs, - gitdir, - author, - committer: _committer, - }); - if (!committer) throw new MissingNameError('committer') - - return await _pull({ - fs, - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir, - ref, - url, - remote, - remoteRef, - fastForwardOnly, - corsProxy, - singleBranch, - headers, - author, - committer, - signingKey, - }) - } catch (err) { - err.caller = 'git.pull'; - throw err - } -} - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} [args.dir] - * @param {string} args.gitdir - * @param {Iterable<string>} args.start - * @param {Iterable<string>} args.finish - * @returns {Promise<Set<string>>} - */ -async function listCommitsAndTags({ - fs, - cache, - dir, - gitdir = join(dir, '.git'), - start, - finish, -}) { - const shallows = await GitShallowManager.read({ fs, gitdir }); - const startingSet = new Set(); - const finishingSet = new Set(); - for (const ref of start) { - startingSet.add(await GitRefManager.resolve({ fs, gitdir, ref })); - } - for (const ref of finish) { - // We may not have these refs locally so we must try/catch - try { - const oid = await GitRefManager.resolve({ fs, gitdir, ref }); - finishingSet.add(oid); - } catch (err) {} - } - const visited = new Set(); - // Because git commits are named by their hash, there is no - // way to construct a cycle. Therefore we won't worry about - // setting a default recursion limit. - async function walk(oid) { - visited.add(oid); - const { type, object } = await _readObject({ fs, cache, gitdir, oid }); - // Recursively resolve annotated tags - if (type === 'tag') { - const tag = GitAnnotatedTag.from(object); - const commit = tag.headers().object; - return walk(commit) - } - if (type !== 'commit') { - throw new ObjectTypeError(oid, type, 'commit') - } - if (!shallows.has(oid)) { - const commit = GitCommit.from(object); - const parents = commit.headers().parent; - for (oid of parents) { - if (!finishingSet.has(oid) && !visited.has(oid)) { - await walk(oid); - } - } - } - } - // Let's go walking! - for (const oid of startingSet) { - await walk(oid); - } - return visited -} - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} [args.dir] - * @param {string} args.gitdir - * @param {Iterable<string>} args.oids - * @returns {Promise<Set<string>>} - */ -async function listObjects({ - fs, - cache, - dir, - gitdir = join(dir, '.git'), - oids, -}) { - const visited = new Set(); - // We don't do the purest simplest recursion, because we can - // avoid reading Blob objects entirely since the Tree objects - // tell us which oids are Blobs and which are Trees. - async function walk(oid) { - if (visited.has(oid)) return - visited.add(oid); - const { type, object } = await _readObject({ fs, cache, gitdir, oid }); - if (type === 'tag') { - const tag = GitAnnotatedTag.from(object); - const obj = tag.headers().object; - await walk(obj); - } else if (type === 'commit') { - const commit = GitCommit.from(object); - const tree = commit.headers().tree; - await walk(tree); - } else if (type === 'tree') { - const tree = GitTree.from(object); - for (const entry of tree) { - // add blobs to the set - // skip over submodules whose type is 'commit' - if (entry.type === 'blob') { - visited.add(entry.oid); - } - // recurse for trees - if (entry.type === 'tree') { - await walk(entry.oid); - } - } - } - } - // Let's go walking! - for (const oid of oids) { - await walk(oid); - } - return visited -} - -async function parseReceivePackResponse(packfile) { - /** @type PushResult */ - const result = {}; - let response = ''; - const read = GitPktLine.streamReader(packfile); - let line = await read(); - while (line !== true) { - if (line !== null) response += line.toString('utf8') + '\n'; - line = await read(); - } - - const lines = response.toString('utf8').split('\n'); - // We're expecting "unpack {unpack-result}" - line = lines.shift(); - if (!line.startsWith('unpack ')) { - throw new ParseError('unpack ok" or "unpack [error message]', line) - } - result.ok = line === 'unpack ok'; - if (!result.ok) { - result.error = line.slice('unpack '.length); - } - result.refs = {}; - for (const line of lines) { - if (line.trim() === '') continue - const status = line.slice(0, 2); - const refAndMessage = line.slice(3); - let space = refAndMessage.indexOf(' '); - if (space === -1) space = refAndMessage.length; - const ref = refAndMessage.slice(0, space); - const error = refAndMessage.slice(space + 1); - result.refs[ref] = { - ok: status === 'ok', - error, - }; - } - return result -} - -async function writeReceivePackRequest({ - capabilities = [], - triplets = [], -}) { - const packstream = []; - let capsFirstLine = `\x00 ${capabilities.join(' ')}`; - for (const trip of triplets) { - packstream.push( - GitPktLine.encode( - `${trip.oldoid} ${trip.oid} ${trip.fullRef}${capsFirstLine}\n` - ) - ); - capsFirstLine = ''; - } - packstream.push(GitPktLine.flush()); - return packstream -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {HttpClient} args.http - * @param {ProgressCallback} [args.onProgress] - * @param {MessageCallback} [args.onMessage] - * @param {AuthCallback} [args.onAuth] - * @param {AuthFailureCallback} [args.onAuthFailure] - * @param {AuthSuccessCallback} [args.onAuthSuccess] - * @param {string} args.gitdir - * @param {string} [args.ref] - * @param {string} [args.remoteRef] - * @param {string} [args.remote] - * @param {boolean} [args.force = false] - * @param {boolean} [args.delete = false] - * @param {string} [args.url] - * @param {string} [args.corsProxy] - * @param {Object<string, string>} [args.headers] - * - * @returns {Promise<PushResult>} - */ -async function _push({ - fs, - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - gitdir, - ref: _ref, - remoteRef: _remoteRef, - remote, - url: _url, - force = false, - delete: _delete = false, - corsProxy, - headers = {}, -}) { - const ref = _ref || (await _currentBranch({ fs, gitdir })); - if (typeof ref === 'undefined') { - throw new MissingParameterError('ref') - } - const config = await GitConfigManager.get({ fs, gitdir }); - // Figure out what remote to use. - remote = - remote || - (await config.get(`branch.${ref}.pushRemote`)) || - (await config.get('remote.pushDefault')) || - (await config.get(`branch.${ref}.remote`)) || - 'origin'; - // Lookup the URL for the given remote. - const url = - _url || - (await config.get(`remote.${remote}.pushurl`)) || - (await config.get(`remote.${remote}.url`)); - if (typeof url === 'undefined') { - throw new MissingParameterError('remote OR url') - } - // Figure out what remote ref to use. - const remoteRef = _remoteRef || (await config.get(`branch.${ref}.merge`)); - if (typeof url === 'undefined') { - throw new MissingParameterError('remoteRef') - } - - if (corsProxy === undefined) { - corsProxy = await config.get('http.corsProxy'); - } - - const fullRef = await GitRefManager.expand({ fs, gitdir, ref }); - const oid = _delete - ? '0000000000000000000000000000000000000000' - : await GitRefManager.resolve({ fs, gitdir, ref: fullRef }); - - /** @type typeof import("../managers/GitRemoteHTTP").GitRemoteHTTP */ - const GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url }); - const httpRemote = await GitRemoteHTTP.discover({ - http, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - service: 'git-receive-pack', - url, - headers, - protocolVersion: 1, - }); - const auth = httpRemote.auth; // hack to get new credentials from CredentialManager API - let fullRemoteRef; - if (!remoteRef) { - fullRemoteRef = fullRef; - } else { - try { - fullRemoteRef = await GitRefManager.expandAgainstMap({ - ref: remoteRef, - map: httpRemote.refs, - }); - } catch (err) { - if (err instanceof NotFoundError) { - // The remote reference doesn't exist yet. - // If it is fully specified, use that value. Otherwise, treat it as a branch. - fullRemoteRef = remoteRef.startsWith('refs/') - ? remoteRef - : `refs/heads/${remoteRef}`; - } else { - throw err - } - } - } - const oldoid = - httpRemote.refs.get(fullRemoteRef) || - '0000000000000000000000000000000000000000'; - - // Remotes can always accept thin-packs UNLESS they specify the 'no-thin' capability - const thinPack = !httpRemote.capabilities.has('no-thin'); - - let objects = new Set(); - if (!_delete) { - const finish = [...httpRemote.refs.values()]; - let skipObjects = new Set(); - - // If remote branch is present, look for a common merge base. - if (oldoid !== '0000000000000000000000000000000000000000') { - // trick to speed up common force push scenarios - const mergebase = await _findMergeBase({ - fs, - cache, - gitdir, - oids: [oid, oldoid], - }); - for (const oid of mergebase) finish.push(oid); - if (thinPack) { - skipObjects = await listObjects({ fs, cache, gitdir, oids: mergebase }); - } - } - - // If remote does not have the commit, figure out the objects to send - if (!finish.includes(oid)) { - const commits = await listCommitsAndTags({ - fs, - cache, - gitdir, - start: [oid], - finish, - }); - objects = await listObjects({ fs, cache, gitdir, oids: commits }); - } - - if (thinPack) { - // If there's a default branch for the remote lets skip those objects too. - // Since this is an optional optimization, we just catch and continue if there is - // an error (because we can't find a default branch, or can't find a commit, etc) - try { - // Sadly, the discovery phase with 'forPush' doesn't return symrefs, so we have to - // rely on existing ones. - const ref = await GitRefManager.resolve({ - fs, - gitdir, - ref: `refs/remotes/${remote}/HEAD`, - depth: 2, - }); - const { oid } = await GitRefManager.resolveAgainstMap({ - ref: ref.replace(`refs/remotes/${remote}/`, ''), - fullref: ref, - map: httpRemote.refs, - }); - const oids = [oid]; - for (const oid of await listObjects({ fs, cache, gitdir, oids })) { - skipObjects.add(oid); - } - } catch (e) {} - - // Remove objects that we know the remote already has - for (const oid of skipObjects) { - objects.delete(oid); - } - } - - if (!force) { - // Is it a tag that already exists? - if ( - fullRef.startsWith('refs/tags') && - oldoid !== '0000000000000000000000000000000000000000' - ) { - throw new PushRejectedError('tag-exists') - } - // Is it a non-fast-forward commit? - if ( - oid !== '0000000000000000000000000000000000000000' && - oldoid !== '0000000000000000000000000000000000000000' && - !(await _isDescendent({ - fs, - cache, - gitdir, - oid, - ancestor: oldoid, - depth: -1, - })) - ) { - throw new PushRejectedError('not-fast-forward') - } - } - } - // We can only safely use capabilities that the server also understands. - // For instance, AWS CodeCommit aborts a push if you include the `agent`!!! - const capabilities = filterCapabilities( - [...httpRemote.capabilities], - ['report-status', 'side-band-64k', `agent=${pkg.agent}`] - ); - const packstream1 = await writeReceivePackRequest({ - capabilities, - triplets: [{ oldoid, oid, fullRef: fullRemoteRef }], - }); - const packstream2 = _delete - ? [] - : await _pack({ - fs, - cache, - gitdir, - oids: [...objects], - }); - const res = await GitRemoteHTTP.connect({ - http, - onProgress, - corsProxy, - service: 'git-receive-pack', - url, - auth, - headers, - body: [...packstream1, ...packstream2], - }); - const { packfile, progress } = await GitSideBand.demux(res.body); - if (onMessage) { - const lines = splitLines(progress); - forAwait(lines, async line => { - await onMessage(line); - }); - } - // Parse the response! - const result = await parseReceivePackResponse(packfile); - if (res.headers) { - result.headers = res.headers; - } - - // Update the local copy of the remote ref - if (remote && result.ok && result.refs[fullRemoteRef].ok) { - // TODO: I think this should actually be using a refspec transform rather than assuming 'refs/remotes/{remote}' - const ref = `refs/remotes/${remote}/${fullRemoteRef.replace( - 'refs/heads', - '' - )}`; - if (_delete) { - await GitRefManager.deleteRef({ fs, gitdir, ref }); - } else { - await GitRefManager.writeRef({ fs, gitdir, ref, value: oid }); - } - } - if (result.ok && Object.values(result.refs).every(result => result.ok)) { - return result - } else { - const prettyDetails = Object.entries(result.refs) - .filter(([k, v]) => !v.ok) - .map(([k, v]) => `\n - ${k}: ${v.error}`) - .join(''); - throw new GitPushError(prettyDetails, result) - } -} - -// @ts-check - -/** - * Push a branch or tag - * - * The push command returns an object that describes the result of the attempted push operation. - * *Notes:* If there were no errors, then there will be no `errors` property. There can be a mix of `ok` messages and `errors` messages. - * - * | param | type [= default] | description | - * | ------ | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | ok | Array\<string\> | The first item is "unpack" if the overall operation was successful. The remaining items are the names of refs that were updated successfully. | - * | errors | Array\<string\> | If the overall operation threw and error, the first item will be "unpack {Overall error message}". The remaining items are individual refs that failed to be updated in the format "{ref name} {error message}". | - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - Which branch to push. By default this is the currently checked out branch. - * @param {string} [args.url] - The URL of the remote repository. The default is the value set in the git config for that remote. - * @param {string} [args.remote] - If URL is not specified, determines which remote to use. - * @param {string} [args.remoteRef] - The name of the receiving branch on the remote. By default this is the configured remote tracking branch. - * @param {boolean} [args.force = false] - If true, behaves the same as `git push --force` - * @param {boolean} [args.delete = false] - If true, delete the remote ref - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<PushResult>} Resolves successfully when push completes with a detailed description of the operation from the server. - * @see PushResult - * @see RefUpdateStatus - * - * @example - * let pushResult = await git.push({ - * fs, - * http, - * dir: '/tutorial', - * remote: 'origin', - * ref: 'main', - * onAuth: () => ({ username: process.env.GITHUB_TOKEN }), - * }) - * console.log(pushResult) - * - */ -async function push({ - fs, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir = join(dir, '.git'), - ref, - remoteRef, - remote = 'origin', - url, - force = false, - delete: _delete = false, - corsProxy, - headers = {}, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('http', http); - assertParameter('gitdir', gitdir); - - return await _push({ - fs: new FileSystem(fs), - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - gitdir, - ref, - remoteRef, - remote, - url, - force, - delete: _delete, - corsProxy, - headers, - }) - } catch (err) { - err.caller = 'git.push'; - throw err - } -} - -async function resolveBlob({ fs, cache, gitdir, oid }) { - const { type, object } = await _readObject({ fs, cache, gitdir, oid }); - // Resolve annotated tag objects to whatever - if (type === 'tag') { - oid = GitAnnotatedTag.from(object).parse().object; - return resolveBlob({ fs, cache, gitdir, oid }) - } - if (type !== 'blob') { - throw new ObjectTypeError(oid, type, 'blob') - } - return { oid, blob: new Uint8Array(object) } -} - -// @ts-check - -/** - * - * @typedef {Object} ReadBlobResult - The object returned has the following schema: - * @property {string} oid - * @property {Uint8Array} blob - * - */ - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} args.oid - * @param {string} [args.filepath] - * - * @returns {Promise<ReadBlobResult>} Resolves successfully with a blob object description - * @see ReadBlobResult - */ -async function _readBlob({ - fs, - cache, - gitdir, - oid, - filepath = undefined, -}) { - if (filepath !== undefined) { - oid = await resolveFilepath({ fs, cache, gitdir, oid, filepath }); - } - const blob = await resolveBlob({ - fs, - cache, - gitdir, - oid, - }); - return blob -} - -// @ts-check - -/** - * - * @typedef {Object} ReadBlobResult - The object returned has the following schema: - * @property {string} oid - * @property {Uint8Array} blob - * - */ - -/** - * Read a blob object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get. Annotated tags, commits, and trees are peeled. - * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the blob object at that filepath. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadBlobResult>} Resolves successfully with a blob object description - * @see ReadBlobResult - * - * @example - * // Get the contents of 'README.md' in the main branch. - * let commitOid = await git.resolveRef({ fs, dir: '/tutorial', ref: 'main' }) - * console.log(commitOid) - * let { blob } = await git.readBlob({ - * fs, - * dir: '/tutorial', - * oid: commitOid, - * filepath: 'README.md' - * }) - * console.log(Buffer.from(blob).toString('utf8')) - * - */ -async function readBlob({ - fs, - dir, - gitdir = join(dir, '.git'), - oid, - filepath, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - - return await _readBlob({ - fs: new FileSystem(fs), - cache, - gitdir, - oid, - filepath, - }) - } catch (err) { - err.caller = 'git.readBlob'; - throw err - } -} - -// @ts-check - -/** - * Read a commit object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get. Annotated tags are peeled. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadCommitResult>} Resolves successfully with a git commit object - * @see ReadCommitResult - * @see CommitObject - * - * @example - * // Read a commit object - * let sha = await git.resolveRef({ fs, dir: '/tutorial', ref: 'main' }) - * console.log(sha) - * let commit = await git.readCommit({ fs, dir: '/tutorial', oid: sha }) - * console.log(commit) - * - */ -async function readCommit({ - fs, - dir, - gitdir = join(dir, '.git'), - oid, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - - return await _readCommit({ - fs: new FileSystem(fs), - cache, - gitdir, - oid, - }) - } catch (err) { - err.caller = 'git.readCommit'; - throw err - } -} - -// @ts-check - -/** - * Read the contents of a note - * - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} [args.ref] - The notes ref to look under - * @param {string} args.oid - * - * @returns {Promise<Uint8Array>} Resolves successfully with note contents as a Buffer. - */ - -async function _readNote({ - fs, - cache, - gitdir, - ref = 'refs/notes/commits', - oid, -}) { - const parent = await GitRefManager.resolve({ gitdir, fs, ref }); - const { blob } = await _readBlob({ - fs, - cache, - gitdir, - oid: parent, - filepath: oid, - }); - - return blob -} - -// @ts-check - -/** - * Read the contents of a note - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - The notes ref to look under - * @param {string} args.oid - The SHA-1 object id of the object to get the note for. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Uint8Array>} Resolves successfully with note contents as a Buffer. - */ - -async function readNote({ - fs, - dir, - gitdir = join(dir, '.git'), - ref = 'refs/notes/commits', - oid, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - assertParameter('oid', oid); - - return await _readNote({ - fs: new FileSystem(fs), - cache, - gitdir, - ref, - oid, - }) - } catch (err) { - err.caller = 'git.readNote'; - throw err - } -} - -// @ts-check - -/** - * - * @typedef {Object} DeflatedObject - * @property {string} oid - * @property {'deflated'} type - * @property {'deflated'} format - * @property {Uint8Array} object - * @property {string} [source] - * - */ - -/** - * - * @typedef {Object} WrappedObject - * @property {string} oid - * @property {'wrapped'} type - * @property {'wrapped'} format - * @property {Uint8Array} object - * @property {string} [source] - * - */ - -/** - * - * @typedef {Object} RawObject - * @property {string} oid - * @property {'blob'|'commit'|'tree'|'tag'} type - * @property {'content'} format - * @property {Uint8Array} object - * @property {string} [source] - * - */ - -/** - * - * @typedef {Object} ParsedBlobObject - * @property {string} oid - * @property {'blob'} type - * @property {'parsed'} format - * @property {string} object - * @property {string} [source] - * - */ - -/** - * - * @typedef {Object} ParsedCommitObject - * @property {string} oid - * @property {'commit'} type - * @property {'parsed'} format - * @property {CommitObject} object - * @property {string} [source] - * - */ - -/** - * - * @typedef {Object} ParsedTreeObject - * @property {string} oid - * @property {'tree'} type - * @property {'parsed'} format - * @property {TreeObject} object - * @property {string} [source] - * - */ - -/** - * - * @typedef {Object} ParsedTagObject - * @property {string} oid - * @property {'tag'} type - * @property {'parsed'} format - * @property {TagObject} object - * @property {string} [source] - * - */ - -/** - * - * @typedef {ParsedBlobObject | ParsedCommitObject | ParsedTreeObject | ParsedTagObject} ParsedObject - */ - -/** - * - * @typedef {DeflatedObject | WrappedObject | RawObject | ParsedObject } ReadObjectResult - */ - -/** - * Read a git object directly by its SHA-1 object id - * - * Regarding `ReadObjectResult`: - * - * - `oid` will be the same as the `oid` argument unless the `filepath` argument is provided, in which case it will be the oid of the tree or blob being returned. - * - `type` of deflated objects is `'deflated'`, and `type` of wrapped objects is `'wrapped'` - * - `format` is usually, but not always, the format you requested. Packfiles do not store each object individually compressed so if you end up reading the object from a packfile it will be returned in format 'content' even if you requested 'deflated' or 'wrapped'. - * - `object` will be an actual Object if format is 'parsed' and the object is a commit, tree, or annotated tag. Blobs are still formatted as Buffers unless an encoding is provided in which case they'll be strings. If format is anything other than 'parsed', object will be a Buffer. - * - `source` is the name of the packfile or loose object file where the object was found. - * - * The `format` parameter can have the following values: - * - * | param | description | - * | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | 'deflated' | Return the raw deflate-compressed buffer for an object if possible. Useful for efficiently shuffling around loose objects when you don't care about the contents and can save time by not inflating them. | - * | 'wrapped' | Return the inflated object buffer wrapped in the git object header if possible. This is the raw data used when calculating the SHA-1 object id of a git object. | - * | 'content' | Return the object buffer without the git header. | - * | 'parsed' | Returns a parsed representation of the object. | - * - * The result will be in one of the following schemas: - * - * ## `'deflated'` format - * - * {@link DeflatedObject typedef} - * - * ## `'wrapped'` format - * - * {@link WrappedObject typedef} - * - * ## `'content'` format - * - * {@link RawObject typedef} - * - * ## `'parsed'` format - * - * ### parsed `'blob'` type - * - * {@link ParsedBlobObject typedef} - * - * ### parsed `'commit'` type - * - * {@link ParsedCommitObject typedef} - * {@link CommitObject typedef} - * - * ### parsed `'tree'` type - * - * {@link ParsedTreeObject typedef} - * {@link TreeObject typedef} - * {@link TreeEntry typedef} - * - * ### parsed `'tag'` type - * - * {@link ParsedTagObject typedef} - * {@link TagObject typedef} - * - * @deprecated - * > This command is overly complicated. - * > - * > If you know the type of object you are reading, use [`readBlob`](./readBlob.md), [`readCommit`](./readCommit.md), [`readTag`](./readTag.md), or [`readTree`](./readTree.md). - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get - * @param {'deflated' | 'wrapped' | 'content' | 'parsed'} [args.format = 'parsed'] - What format to return the object in. The choices are described in more detail below. - * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the object at that filepath. To return the root directory of a tree set filepath to `''` - * @param {string} [args.encoding] - A convenience argument that only affects blobs. Instead of returning `object` as a buffer, it returns a string parsed using the given encoding. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadObjectResult>} Resolves successfully with a git object description - * @see ReadObjectResult - * - * @example - * // Given a ransom SHA-1 object id, figure out what it is - * let { type, object } = await git.readObject({ - * fs, - * dir: '/tutorial', - * oid: '0698a781a02264a6f37ba3ff41d78067eaf0f075' - * }) - * switch (type) { - * case 'commit': { - * console.log(object) - * break - * } - * case 'tree': { - * console.log(object) - * break - * } - * case 'blob': { - * console.log(object) - * break - * } - * case 'tag': { - * console.log(object) - * break - * } - * } - * - */ -async function readObject({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - oid, - format = 'parsed', - filepath = undefined, - encoding = undefined, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - - const fs = new FileSystem(_fs); - if (filepath !== undefined) { - oid = await resolveFilepath({ - fs, - cache, - gitdir, - oid, - filepath, - }); - } - // GitObjectManager does not know how to parse content, so we tweak that parameter before passing it. - const _format = format === 'parsed' ? 'content' : format; - const result = await _readObject({ - fs, - cache, - gitdir, - oid, - format: _format, - }); - result.oid = oid; - if (format === 'parsed') { - result.format = 'parsed'; - switch (result.type) { - case 'commit': - result.object = GitCommit.from(result.object).parse(); - break - case 'tree': - result.object = GitTree.from(result.object).entries(); - break - case 'blob': - // Here we consider returning a raw Buffer as the 'content' format - // and returning a string as the 'parsed' format - if (encoding) { - result.object = result.object.toString(encoding); - } else { - result.object = new Uint8Array(result.object); - result.format = 'content'; - } - break - case 'tag': - result.object = GitAnnotatedTag.from(result.object).parse(); - break - default: - throw new ObjectTypeError( - result.oid, - result.type, - 'blob|commit|tag|tree' - ) - } - } else if (result.format === 'deflated' || result.format === 'wrapped') { - result.type = result.format; - } - return result - } catch (err) { - err.caller = 'git.readObject'; - throw err - } -} - -// @ts-check - -/** - * - * @typedef {Object} ReadTagResult - The object returned has the following schema: - * @property {string} oid - SHA-1 object id of this tag - * @property {TagObject} tag - the parsed tag object - * @property {string} payload - PGP signing payload - */ - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} args.oid - * - * @returns {Promise<ReadTagResult>} - */ -async function _readTag({ fs, cache, gitdir, oid }) { - const { type, object } = await _readObject({ - fs, - cache, - gitdir, - oid, - format: 'content', - }); - if (type !== 'tag') { - throw new ObjectTypeError(oid, type, 'tag') - } - const tag = GitAnnotatedTag.from(object); - const result = { - oid, - tag: tag.parse(), - payload: tag.payload(), - }; - // @ts-ignore - return result -} - -/** - * - * @typedef {Object} ReadTagResult - The object returned has the following schema: - * @property {string} oid - SHA-1 object id of this tag - * @property {TagObject} tag - the parsed tag object - * @property {string} payload - PGP signing payload - */ - -/** - * Read an annotated tag object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadTagResult>} Resolves successfully with a git object description - * @see ReadTagResult - * @see TagObject - * - */ -async function readTag({ - fs, - dir, - gitdir = join(dir, '.git'), - oid, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - - return await _readTag({ - fs: new FileSystem(fs), - cache, - gitdir, - oid, - }) - } catch (err) { - err.caller = 'git.readTag'; - throw err - } -} - -// @ts-check - -/** - * - * @typedef {Object} ReadTreeResult - The object returned has the following schema: - * @property {string} oid - SHA-1 object id of this tree - * @property {TreeObject} tree - the parsed tree object - */ - -/** - * Read a tree object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get. Annotated tags and commits are peeled. - * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the tree object at that filepath. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadTreeResult>} Resolves successfully with a git tree object - * @see ReadTreeResult - * @see TreeObject - * @see TreeEntry - * - */ -async function readTree({ - fs, - dir, - gitdir = join(dir, '.git'), - oid, - filepath = undefined, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - - return await _readTree({ - fs: new FileSystem(fs), - cache, - gitdir, - oid, - filepath, - }) - } catch (err) { - err.caller = 'git.readTree'; - throw err - } -} - -// @ts-check - -/** - * Remove a file from the git index (aka staging area) - * - * Note that this does NOT delete the file in the working directory. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the file to remove from the index - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully once the git index has been updated - * - * @example - * await git.remove({ fs, dir: '/tutorial', filepath: 'README.md' }) - * console.log('done') - * - */ -async function remove({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - filepath, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('filepath', filepath); - - await GitIndexManager.acquire( - { fs: new FileSystem(_fs), gitdir, cache }, - async function(index) { - index.delete({ filepath }); - } - ); - } catch (err) { - err.caller = 'git.remove'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {SignCallback} [args.onSign] - * @param {string} [args.dir] - * @param {string} [args.gitdir=join(dir,'.git')] - * @param {string} [args.ref] - * @param {string} args.oid - * @param {Object} args.author - * @param {string} args.author.name - * @param {string} args.author.email - * @param {number} args.author.timestamp - * @param {number} args.author.timezoneOffset - * @param {Object} args.committer - * @param {string} args.committer.name - * @param {string} args.committer.email - * @param {number} args.committer.timestamp - * @param {number} args.committer.timezoneOffset - * @param {string} [args.signingKey] - * - * @returns {Promise<string>} - */ - -async function _removeNote({ - fs, - cache, - onSign, - gitdir, - ref = 'refs/notes/commits', - oid, - author, - committer, - signingKey, -}) { - // Get the current note commit - let parent; - try { - parent = await GitRefManager.resolve({ gitdir, fs, ref }); - } catch (err) { - if (!(err instanceof NotFoundError)) { - throw err - } - } - - // I'm using the "empty tree" magic number here for brevity - const result = await _readTree({ - fs, - gitdir, - oid: parent || '4b825dc642cb6eb9a060e54bf8d69288fbee4904', - }); - let tree = result.tree; - - // Remove the note blob entry from the tree - tree = tree.filter(entry => entry.path !== oid); - - // Create the new note tree - const treeOid = await _writeTree({ - fs, - gitdir, - tree, - }); - - // Create the new note commit - const commitOid = await _commit({ - fs, - cache, - onSign, - gitdir, - ref, - tree: treeOid, - parent: parent && [parent], - message: `Note removed by 'isomorphic-git removeNote'\n`, - author, - committer, - signingKey, - }); - - return commitOid -} - -// @ts-check - -/** - * Remove an object note - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - The notes ref to look under - * @param {string} args.oid - The SHA-1 object id of the object to remove the note from. - * @param {Object} [args.author] - The details about the author. - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer = author] - The details about the note committer, in the same format as the author parameter. If not specified, the author details are used. - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - Sign the tag object using this private PGP key. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the commit object for the note removal. - */ - -async function removeNote({ - fs: _fs, - onSign, - dir, - gitdir = join(dir, '.git'), - ref = 'refs/notes/commits', - oid, - author: _author, - committer: _committer, - signingKey, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - - const fs = new FileSystem(_fs); - - const author = await normalizeAuthorObject({ fs, gitdir, author: _author }); - if (!author) throw new MissingNameError('author') - - const committer = await normalizeCommitterObject({ - fs, - gitdir, - author, - committer: _committer, - }); - if (!committer) throw new MissingNameError('committer') - - return await _removeNote({ - fs, - cache, - onSign, - gitdir, - ref, - oid, - author, - committer, - signingKey, - }) - } catch (err) { - err.caller = 'git.removeNote'; - throw err - } -} - -// @ts-check - -/** - * Rename a branch - * - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.ref - The name of the new branch - * @param {string} args.oldref - The name of the old branch - * @param {boolean} [args.checkout = false] - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - */ -async function _renameBranch({ - fs, - gitdir, - oldref, - ref, - checkout = false, -}) { - if (ref !== cleanGitRef.clean(ref)) { - throw new InvalidRefNameError(ref, cleanGitRef.clean(ref)) - } - - if (oldref !== cleanGitRef.clean(oldref)) { - throw new InvalidRefNameError(oldref, cleanGitRef.clean(oldref)) - } - - const fulloldref = `refs/heads/${oldref}`; - const fullnewref = `refs/heads/${ref}`; - - const newexist = await GitRefManager.exists({ fs, gitdir, ref: fullnewref }); - - if (newexist) { - throw new AlreadyExistsError('branch', ref, false) - } - - const value = await GitRefManager.resolve({ - fs, - gitdir, - ref: fulloldref, - depth: 1, - }); - - await GitRefManager.writeRef({ fs, gitdir, ref: fullnewref, value }); - await GitRefManager.deleteRef({ fs, gitdir, ref: fulloldref }); - - if (checkout) { - // Update HEAD - await GitRefManager.writeSymbolicRef({ - fs, - gitdir, - ref: 'HEAD', - value: fullnewref, - }); - } -} - -// @ts-check - -/** - * Rename a branch - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - What to name the branch - * @param {string} args.oldref - What the name of the branch was - * @param {boolean} [args.checkout = false] - Update `HEAD` to point at the newly created branch - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.renameBranch({ fs, dir: '/tutorial', ref: 'main', oldref: 'master' }) - * console.log('done') - * - */ -async function renameBranch({ - fs, - dir, - gitdir = join(dir, '.git'), - ref, - oldref, - checkout = false, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - assertParameter('oldref', oldref); - return await _renameBranch({ - fs: new FileSystem(fs), - gitdir, - ref, - oldref, - checkout, - }) - } catch (err) { - err.caller = 'git.renameBranch'; - throw err - } -} - -async function hashObject$1({ gitdir, type, object }) { - return shasum(GitObject.wrap({ type, object })) -} - -// @ts-check - -/** - * Reset a file in the git index (aka staging area) - * - * Note that this does NOT modify the file in the working directory. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the file to reset in the index - * @param {string} [args.ref = 'HEAD'] - A ref to the commit to use - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully once the git index has been updated - * - * @example - * await git.resetIndex({ fs, dir: '/tutorial', filepath: 'README.md' }) - * console.log('done') - * - */ -async function resetIndex({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - filepath, - ref = 'HEAD', - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('filepath', filepath); - assertParameter('ref', ref); - - const fs = new FileSystem(_fs); - // Resolve commit - let oid = await GitRefManager.resolve({ fs, gitdir, ref }); - let workdirOid; - try { - // Resolve blob - oid = await resolveFilepath({ - fs, - cache, - gitdir, - oid, - filepath, - }); - } catch (e) { - // This means we're resetting the file to a "deleted" state - oid = null; - } - // For files that aren't in the workdir use zeros - let stats = { - ctime: new Date(0), - mtime: new Date(0), - dev: 0, - ino: 0, - mode: 0, - uid: 0, - gid: 0, - size: 0, - }; - // If the file exists in the workdir... - const object = dir && (await fs.read(join(dir, filepath))); - if (object) { - // ... and has the same hash as the desired state... - workdirOid = await hashObject$1({ - gitdir, - type: 'blob', - object, - }); - if (oid === workdirOid) { - // ... use the workdir Stats object - stats = await fs.lstat(join(dir, filepath)); - } - } - await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) { - index.delete({ filepath }); - if (oid) { - index.insert({ filepath, stats, oid }); - } - }); - } catch (err) { - err.caller = 'git.reset'; - throw err - } -} - -// @ts-check - -/** - * Get the value of a symbolic ref or resolve a ref to its SHA-1 object id - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The ref to resolve - * @param {number} [args.depth = undefined] - How many symbolic references to follow before returning - * - * @returns {Promise<string>} Resolves successfully with a SHA-1 object id or the value of a symbolic ref - * - * @example - * let currentCommit = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD' }) - * console.log(currentCommit) - * let currentBranch = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD', depth: 2 }) - * console.log(currentBranch) - * - */ -async function resolveRef({ - fs, - dir, - gitdir = join(dir, '.git'), - ref, - depth, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - - const oid = await GitRefManager.resolve({ - fs: new FileSystem(fs), - gitdir, - ref, - depth, - }); - return oid - } catch (err) { - err.caller = 'git.resolveRef'; - throw err - } -} - -// @ts-check - -/** - * Write an entry to the git config files. - * - * *Caveats:* - * - Currently only the local `$GIT_DIR/config` file can be read or written. However support for the global `~/.gitconfig` and system `$(prefix)/etc/gitconfig` will be added in the future. - * - The current parser does not support the more exotic features of the git-config file format such as `[include]` and `[includeIf]`. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.path - The key of the git config entry - * @param {string | boolean | number | void} args.value - A value to store at that path. (Use `undefined` as the value to delete a config entry.) - * @param {boolean} [args.append = false] - If true, will append rather than replace when setting (use with multi-valued config options). - * - * @returns {Promise<void>} Resolves successfully when operation completed - * - * @example - * // Write config value - * await git.setConfig({ - * fs, - * dir: '/tutorial', - * path: 'user.name', - * value: 'Mr. Test' - * }) - * - * // Print out config file - * let file = await fs.promises.readFile('/tutorial/.git/config', 'utf8') - * console.log(file) - * - * // Delete a config entry - * await git.setConfig({ - * fs, - * dir: '/tutorial', - * path: 'user.name', - * value: undefined - * }) - * - * // Print out config file - * file = await fs.promises.readFile('/tutorial/.git/config', 'utf8') - * console.log(file) - */ -async function setConfig({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - path, - value, - append = false, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('path', path); - // assertParameter('value', value) // We actually allow 'undefined' as a value to unset/delete - - const fs = new FileSystem(_fs); - const config = await GitConfigManager.get({ fs, gitdir }); - if (append) { - await config.append(path, value); - } else { - await config.set(path, value); - } - await GitConfigManager.save({ fs, gitdir, config }); - } catch (err) { - err.caller = 'git.setConfig'; - throw err - } -} - -// @ts-check - -/** - * Tell whether a file has been changed - * - * The possible resolve values are: - * - * | status | description | - * | --------------------- | ------------------------------------------------------------------------------------- | - * | `"ignored"` | file ignored by a .gitignore rule | - * | `"unmodified"` | file unchanged from HEAD commit | - * | `"*modified"` | file has modifications, not yet staged | - * | `"*deleted"` | file has been removed, but the removal is not yet staged | - * | `"*added"` | file is untracked, not yet staged | - * | `"absent"` | file not present in HEAD commit, staging area, or working dir | - * | `"modified"` | file has modifications, staged | - * | `"deleted"` | file has been removed, staged | - * | `"added"` | previously untracked file, staged | - * | `"*unmodified"` | working dir and HEAD commit match, but index differs | - * | `"*absent"` | file not present in working dir or HEAD commit, but present in the index | - * | `"*undeleted"` | file was deleted from the index, but is still in the working dir | - * | `"*undeletemodified"` | file was deleted from the index, but is present with modifications in the working dir | - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the file to query - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<'ignored'|'unmodified'|'*modified'|'*deleted'|'*added'|'absent'|'modified'|'deleted'|'added'|'*unmodified'|'*absent'|'*undeleted'|'*undeletemodified'>} Resolves successfully with the file's git status - * - * @example - * let status = await git.status({ fs, dir: '/tutorial', filepath: 'README.md' }) - * console.log(status) - * - */ -async function status({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - filepath, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('filepath', filepath); - - const fs = new FileSystem(_fs); - const ignored = await GitIgnoreManager.isIgnored({ - fs, - gitdir, - dir, - filepath, - }); - if (ignored) { - return 'ignored' - } - const headTree = await getHeadTree({ fs, cache, gitdir }); - const treeOid = await getOidAtPath({ - fs, - cache, - gitdir, - tree: headTree, - path: filepath, - }); - const indexEntry = await GitIndexManager.acquire( - { fs, gitdir, cache }, - async function(index) { - for (const entry of index) { - if (entry.path === filepath) return entry - } - return null - } - ); - const stats = await fs.lstat(join(dir, filepath)); - - const H = treeOid !== null; // head - const I = indexEntry !== null; // index - const W = stats !== null; // working dir - - const getWorkdirOid = async () => { - if (I && !compareStats(indexEntry, stats)) { - return indexEntry.oid - } else { - const object = await fs.read(join(dir, filepath)); - const workdirOid = await hashObject$1({ - gitdir, - type: 'blob', - object, - }); - // If the oid in the index === working dir oid but stats differed update cache - if (I && indexEntry.oid === workdirOid) { - // and as long as our fs.stats aren't bad. - // size of -1 happens over a BrowserFS HTTP Backend that doesn't serve Content-Length headers - // (like the Karma webserver) because BrowserFS HTTP Backend uses HTTP HEAD requests to do fs.stat - if (stats.size !== -1) { - // We don't await this so we can return faster for one-off cases. - GitIndexManager.acquire({ fs, gitdir, cache }, async function( - index - ) { - index.insert({ filepath, stats, oid: workdirOid }); - }); - } - } - return workdirOid - } - }; - - if (!H && !W && !I) return 'absent' // --- - if (!H && !W && I) return '*absent' // -A- - if (!H && W && !I) return '*added' // --A - if (!H && W && I) { - const workdirOid = await getWorkdirOid(); - // @ts-ignore - return workdirOid === indexEntry.oid ? 'added' : '*added' // -AA : -AB - } - if (H && !W && !I) return 'deleted' // A-- - if (H && !W && I) { - // @ts-ignore - return treeOid === indexEntry.oid ? '*deleted' : '*deleted' // AA- : AB- - } - if (H && W && !I) { - const workdirOid = await getWorkdirOid(); - return workdirOid === treeOid ? '*undeleted' : '*undeletemodified' // A-A : A-B - } - if (H && W && I) { - const workdirOid = await getWorkdirOid(); - if (workdirOid === treeOid) { - // @ts-ignore - return workdirOid === indexEntry.oid ? 'unmodified' : '*unmodified' // AAA : ABA - } else { - // @ts-ignore - return workdirOid === indexEntry.oid ? 'modified' : '*modified' // ABB : AAB - } - } - /* - --- - -A- - --A - -AA - -AB - A-- - AA- - AB- - A-A - A-B - AAA - ABA - ABB - AAB - */ - } catch (err) { - err.caller = 'git.status'; - throw err - } -} - -async function getOidAtPath({ fs, cache, gitdir, tree, path }) { - if (typeof path === 'string') path = path.split('/'); - const dirname = path.shift(); - for (const entry of tree) { - if (entry.path === dirname) { - if (path.length === 0) { - return entry.oid - } - const { type, object } = await _readObject({ - fs, - cache, - gitdir, - oid: entry.oid, - }); - if (type === 'tree') { - const tree = GitTree.from(object); - return getOidAtPath({ fs, cache, gitdir, tree, path }) - } - if (type === 'blob') { - throw new ObjectTypeError(entry.oid, type, 'blob', path.join('/')) - } - } - } - return null -} - -async function getHeadTree({ fs, cache, gitdir }) { - // Get the tree from the HEAD commit. - let oid; - try { - oid = await GitRefManager.resolve({ fs, gitdir, ref: 'HEAD' }); - } catch (e) { - // Handle fresh branches with no commits - if (e instanceof NotFoundError) { - return [] - } - } - const { tree } = await _readTree({ fs, cache, gitdir, oid }); - return tree -} - -// @ts-check - -/** - * Efficiently get the status of multiple files at once. - * - * The returned `StatusMatrix` is admittedly not the easiest format to read. - * However it conveys a large amount of information in dense format that should make it easy to create reports about the current state of the repository; - * without having to do multiple, time-consuming isomorphic-git calls. - * My hope is that the speed and flexibility of the function will make up for the learning curve of interpreting the return value. - * - * ```js live - * // get the status of all the files in 'src' - * let status = await git.statusMatrix({ - * fs, - * dir: '/tutorial', - * filter: f => f.startsWith('src/') - * }) - * console.log(status) - * ``` - * - * ```js live - * // get the status of all the JSON and Markdown files - * let status = await git.statusMatrix({ - * fs, - * dir: '/tutorial', - * filter: f => f.endsWith('.json') || f.endsWith('.md') - * }) - * console.log(status) - * ``` - * - * The result is returned as a 2D array. - * The outer array represents the files and/or blobs in the repo, in alphabetical order. - * The inner arrays describe the status of the file: - * the first value is the filepath, and the next three are integers - * representing the HEAD status, WORKDIR status, and STAGE status of the entry. - * - * ```js - * // example StatusMatrix - * [ - * ["a.txt", 0, 2, 0], // new, untracked - * ["b.txt", 0, 2, 2], // added, staged - * ["c.txt", 0, 2, 3], // added, staged, with unstaged changes - * ["d.txt", 1, 1, 1], // unmodified - * ["e.txt", 1, 2, 1], // modified, unstaged - * ["f.txt", 1, 2, 2], // modified, staged - * ["g.txt", 1, 2, 3], // modified, staged, with unstaged changes - * ["h.txt", 1, 0, 1], // deleted, unstaged - * ["i.txt", 1, 0, 0], // deleted, staged - * ] - * ``` - * - * - The HEAD status is either absent (0) or present (1). - * - The WORKDIR status is either absent (0), identical to HEAD (1), or different from HEAD (2). - * - The STAGE status is either absent (0), identical to HEAD (1), identical to WORKDIR (2), or different from WORKDIR (3). - * - * ```ts - * type Filename = string - * type HeadStatus = 0 | 1 - * type WorkdirStatus = 0 | 1 | 2 - * type StageStatus = 0 | 1 | 2 | 3 - * - * type StatusRow = [Filename, HeadStatus, WorkdirStatus, StageStatus] - * - * type StatusMatrix = StatusRow[] - * ``` - * - * > Think of the natural progression of file modifications as being from HEAD (previous) -> WORKDIR (current) -> STAGE (next). - * > Then HEAD is "version 1", WORKDIR is "version 2", and STAGE is "version 3". - * > Then, imagine a "version 0" which is before the file was created. - * > Then the status value in each column corresponds to the oldest version of the file it is identical to. - * > (For a file to be identical to "version 0" means the file is deleted.) - * - * Here are some examples of queries you can answer using the result: - * - * #### Q: What files have been deleted? - * ```js - * const FILE = 0, WORKDIR = 2 - * - * const filenames = (await statusMatrix({ dir })) - * .filter(row => row[WORKDIR] === 0) - * .map(row => row[FILE]) - * ``` - * - * #### Q: What files have unstaged changes? - * ```js - * const FILE = 0, WORKDIR = 2, STAGE = 3 - * - * const filenames = (await statusMatrix({ dir })) - * .filter(row => row[WORKDIR] !== row[STAGE]) - * .map(row => row[FILE]) - * ``` - * - * #### Q: What files have been modified since the last commit? - * ```js - * const FILE = 0, HEAD = 1, WORKDIR = 2 - * - * const filenames = (await statusMatrix({ dir })) - * .filter(row => row[HEAD] !== row[WORKDIR]) - * .map(row => row[FILE]) - * ``` - * - * #### Q: What files will NOT be changed if I commit right now? - * ```js - * const FILE = 0, HEAD = 1, STAGE = 3 - * - * const filenames = (await statusMatrix({ dir })) - * .filter(row => row[HEAD] === row[STAGE]) - * .map(row => row[FILE]) - * ``` - * - * For reference, here are all possible combinations: - * - * | HEAD | WORKDIR | STAGE | `git status --short` equivalent | - * | ---- | ------- | ----- | ------------------------------- | - * | 0 | 0 | 0 | `` | - * | 0 | 0 | 3 | `AD` | - * | 0 | 2 | 0 | `??` | - * | 0 | 2 | 2 | `A ` | - * | 0 | 2 | 3 | `AM` | - * | 1 | 0 | 0 | `D ` | - * | 1 | 0 | 1 | ` D` | - * | 1 | 0 | 3 | `MD` | - * | 1 | 1 | 0 | `D ` + `??` | - * | 1 | 1 | 1 | `` | - * | 1 | 1 | 3 | `MM` | - * | 1 | 2 | 0 | `D ` + `??` | - * | 1 | 2 | 1 | ` M` | - * | 1 | 2 | 2 | `M ` | - * | 1 | 2 | 3 | `MM` | - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref = 'HEAD'] - Optionally specify a different commit to compare against the workdir and stage instead of the HEAD - * @param {string[]} [args.filepaths = ['.']] - Limit the query to the given files and directories - * @param {function(string): boolean} [args.filter] - Filter the results to only those whose filepath matches a function. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Array<StatusRow>>} Resolves with a status matrix, described below. - * @see StatusRow - */ -async function statusMatrix({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - ref = 'HEAD', - filepaths = ['.'], - filter, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - - const fs = new FileSystem(_fs); - return await _walk({ - fs, - cache, - dir, - gitdir, - trees: [TREE({ ref }), WORKDIR(), STAGE()], - map: async function(filepath, [head, workdir, stage]) { - // Ignore ignored files, but only if they are not already tracked. - if (!head && !stage && workdir) { - if ( - await GitIgnoreManager.isIgnored({ - fs, - dir, - filepath, - }) - ) { - return null - } - } - // match against base paths - if (!filepaths.some(base => worthWalking(filepath, base))) { - return null - } - // Late filter against file names - if (filter) { - if (!filter(filepath)) return - } - - // For now, just bail on directories - const headType = head && (await head.type()); - if (headType === 'tree' || headType === 'special') return - if (headType === 'commit') return null - - const workdirType = workdir && (await workdir.type()); - if (workdirType === 'tree' || workdirType === 'special') return - - const stageType = stage && (await stage.type()); - if (stageType === 'commit') return null - if (stageType === 'tree' || stageType === 'special') return - - // Figure out the oids, using the staged oid for the working dir oid if the stats match. - const headOid = head ? await head.oid() : undefined; - const stageOid = stage ? await stage.oid() : undefined; - let workdirOid; - if (!head && workdir && !stage) { - // We don't actually NEED the sha. Any sha will do - // TODO: update this logic to handle N trees instead of just 3. - workdirOid = '42'; - } else if (workdir) { - workdirOid = await workdir.oid(); - } - const entry = [undefined, headOid, workdirOid, stageOid]; - const result = entry.map(value => entry.indexOf(value)); - result.shift(); // remove leading undefined entry - return [filepath, ...result] - }, - }) - } catch (err) { - err.caller = 'git.statusMatrix'; - throw err - } -} - -// @ts-check - -/** - * Create a lightweight tag - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - What to name the tag - * @param {string} [args.object = 'HEAD'] - What oid the tag refers to. (Will resolve to oid if value is a ref.) By default, the commit object which is referred by the current `HEAD` is used. - * @param {boolean} [args.force = false] - Instead of throwing an error if a tag named `ref` already exists, overwrite the existing tag. - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.tag({ fs, dir: '/tutorial', ref: 'test-tag' }) - * console.log('done') - * - */ -async function tag({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - ref, - object, - force = false, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - - const fs = new FileSystem(_fs); - - if (ref === undefined) { - throw new MissingParameterError('ref') - } - - ref = ref.startsWith('refs/tags/') ? ref : `refs/tags/${ref}`; - - // Resolve passed object - const value = await GitRefManager.resolve({ - fs, - gitdir, - ref: object || 'HEAD', - }); - - if (!force && (await GitRefManager.exists({ fs, gitdir, ref }))) { - throw new AlreadyExistsError('tag', ref) - } - - await GitRefManager.writeRef({ fs, gitdir, ref, value }); - } catch (err) { - err.caller = 'git.tag'; - throw err - } -} - -// @ts-check - -/** - * Return the version number of isomorphic-git - * - * I don't know why you might need this. I added it just so I could check that I was getting - * the correct version of the library and not a cached version. - * - * @returns {string} the version string taken from package.json at publication time - * - * @example - * console.log(git.version()) - * - */ -function version() { - try { - return pkg.version - } catch (err) { - err.caller = 'git.version'; - throw err - } -} - -// @ts-check - -/** - * @callback WalkerMap - * @param {string} filename - * @param {Array<WalkerEntry | null>} entries - * @returns {Promise<any>} - */ - -/** - * @callback WalkerReduce - * @param {any} parent - * @param {any[]} children - * @returns {Promise<any>} - */ - -/** - * @callback WalkerIterateCallback - * @param {WalkerEntry[]} entries - * @returns {Promise<any[]>} - */ - -/** - * @callback WalkerIterate - * @param {WalkerIterateCallback} walk - * @param {IterableIterator<WalkerEntry[]>} children - * @returns {Promise<any[]>} - */ - -/** - * A powerful recursive tree-walking utility. - * - * The `walk` API simplifies gathering detailed information about a tree or comparing all the filepaths in two or more trees. - * Trees can be git commits, the working directory, or the or git index (staging area). - * As long as a file or directory is present in at least one of the trees, it will be traversed. - * Entries are traversed in alphabetical order. - * - * The arguments to `walk` are the `trees` you want to traverse, and 3 optional transform functions: - * `map`, `reduce`, and `iterate`. - * - * ## `TREE`, `WORKDIR`, and `STAGE` - * - * Tree walkers are represented by three separate functions that can be imported: - * - * ```js - * import { TREE, WORKDIR, STAGE } from 'isomorphic-git' - * ``` - * - * These functions return opaque handles called `Walker`s. - * The only thing that `Walker` objects are good for is passing into `walk`. - * Here are the three `Walker`s passed into `walk` by the `statusMatrix` command for example: - * - * ```js - * let ref = 'HEAD' - * - * let trees = [TREE({ ref }), WORKDIR(), STAGE()] - * ``` - * - * For the arguments, see the doc pages for [TREE](./TREE.md), [WORKDIR](./WORKDIR.md), and [STAGE](./STAGE.md). - * - * `map`, `reduce`, and `iterate` allow you control the recursive walk by pruning and transforming `WalkerEntry`s into the desired result. - * - * ## WalkerEntry - * - * {@link WalkerEntry typedef} - * - * `map` receives an array of `WalkerEntry[]` as its main argument, one `WalkerEntry` for each `Walker` in the `trees` argument. - * The methods are memoized per `WalkerEntry` so calling them multiple times in a `map` function does not adversely impact performance. - * By only computing these values if needed, you build can build lean, mean, efficient walking machines. - * - * ### WalkerEntry#type() - * - * Returns the kind as a string. This is normally either `tree` or `blob`. - * - * `TREE`, `STAGE`, and `WORKDIR` walkers all return a string. - * - * Possible values: - * - * - `'tree'` directory - * - `'blob'` file - * - `'special'` used by `WORKDIR` to represent irregular files like sockets and FIFOs - * - `'commit'` used by `TREE` to represent submodules - * - * ```js - * await entry.type() - * ``` - * - * ### WalkerEntry#mode() - * - * Returns the file mode as a number. Use this to distinguish between regular files, symlinks, and executable files. - * - * `TREE`, `STAGE`, and `WORKDIR` walkers all return a number for all `type`s of entries. - * - * It has been normalized to one of the 4 values that are allowed in git commits: - * - * - `0o40000` directory - * - `0o100644` file - * - `0o100755` file (executable) - * - `0o120000` symlink - * - * Tip: to make modes more readable, you can print them to octal using `.toString(8)`. - * - * ```js - * await entry.mode() - * ``` - * - * ### WalkerEntry#oid() - * - * Returns the SHA-1 object id for blobs and trees. - * - * `TREE` walkers return a string for `blob` and `tree` entries. - * - * `STAGE` and `WORKDIR` walkers return a string for `blob` entries and `undefined` for `tree` entries. - * - * ```js - * await entry.oid() - * ``` - * - * ### WalkerEntry#content() - * - * Returns the file contents as a Buffer. - * - * `TREE` and `WORKDIR` walkers return a Buffer for `blob` entries and `undefined` for `tree` entries. - * - * `STAGE` walkers always return `undefined` since the file contents are never stored in the stage. - * - * ```js - * await entry.content() - * ``` - * - * ### WalkerEntry#stat() - * - * Returns a normalized subset of filesystem Stat data. - * - * `WORKDIR` walkers return a `Stat` for `blob` and `tree` entries. - * - * `STAGE` walkers return a `Stat` for `blob` entries and `undefined` for `tree` entries. - * - * `TREE` walkers return `undefined` for all entry types. - * - * ```js - * await entry.stat() - * ``` - * - * {@link Stat typedef} - * - * ## map(string, Array<WalkerEntry|null>) => Promise<any> - * - * {@link WalkerMap typedef} - * - * This is the function that is called once per entry BEFORE visiting the children of that node. - * - * If you return `null` for a `tree` entry, then none of the children of that `tree` entry will be walked. - * - * This is a good place for query logic, such as examining the contents of a file. - * Ultimately, compare all the entries and return any values you are interested in. - * If you do not return a value (or return undefined) that entry will be filtered from the results. - * - * Example 1: Find all the files containing the word 'foo'. - * ```js - * async function map(filepath, [head, workdir]) { - * let content = (await workdir.content()).toString('utf8') - * if (content.contains('foo')) { - * return { - * filepath, - * content - * } - * } - * } - * ``` - * - * Example 2: Return the difference between the working directory and the HEAD commit - * ```js - * const diff = require('diff-lines') - * async function map(filepath, [head, workdir]) { - * return { - * filepath, - * oid: await head.oid(), - * diff: diff((await head.content()).toString('utf8'), (await workdir.content()).toString('utf8')) - * } - * } - * ``` - * - * Example 3: - * ```js - * let path = require('path') - * // Only examine files in the directory `cwd` - * let cwd = 'src/app' - * async function map (filepath, [head, workdir, stage]) { - * if ( - * // don't skip the root directory - * head.fullpath !== '.' && - * // return true for 'src' and 'src/app' - * !cwd.startsWith(filepath) && - * // return true for 'src/app/*' - * path.dirname(filepath) !== cwd - * ) { - * return null - * } else { - * return filepath - * } - * } - * ``` - * - * ## reduce(parent, children) - * - * {@link WalkerReduce typedef} - * - * This is the function that is called once per entry AFTER visiting the children of that node. - * - * Default: `async (parent, children) => parent === undefined ? children.flat() : [parent, children].flat()` - * - * The default implementation of this function returns all directories and children in a giant flat array. - * You can define a different accumulation method though. - * - * Example: Return a hierarchical structure - * ```js - * async function reduce (parent, children) { - * return Object.assign(parent, { children }) - * } - * ``` - * - * ## iterate(walk, children) - * - * {@link WalkerIterate typedef} - * - * {@link WalkerIterateCallback typedef} - * - * Default: `(walk, children) => Promise.all([...children].map(walk))` - * - * The default implementation recurses all children concurrently using Promise.all. - * However you could use a custom function to traverse children serially or use a global queue to throttle recursion. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {Walker[]} args.trees - The trees you want to traverse - * @param {WalkerMap} [args.map] - Transform `WalkerEntry`s into a result form - * @param {WalkerReduce} [args.reduce] - Control how mapped entries are combined with their parent result - * @param {WalkerIterate} [args.iterate] - Fine-tune how entries within a tree are iterated over - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<any>} The finished tree-walking result - */ -async function walk({ - fs, - dir, - gitdir = join(dir, '.git'), - trees, - map, - reduce, - iterate, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('trees', trees); - - return await _walk({ - fs: new FileSystem(fs), - cache, - dir, - gitdir, - trees, - map, - reduce, - iterate, - }) - } catch (err) { - err.caller = 'git.walk'; - throw err - } -} - -// @ts-check - -/** - * Write a blob object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {Uint8Array} args.blob - The blob object to write - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object - * - * @example - * // Manually create a blob. - * let oid = await git.writeBlob({ - * fs, - * dir: '/tutorial', - * blob: new Uint8Array([]) - * }) - * - * console.log('oid', oid) // should be 'e69de29bb2d1d6434b8b29ae775ad8c2e48c5391' - * - */ -async function writeBlob({ fs, dir, gitdir = join(dir, '.git'), blob }) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('blob', blob); - - return await _writeObject({ - fs: new FileSystem(fs), - gitdir, - type: 'blob', - object: blob, - format: 'content', - }) - } catch (err) { - err.caller = 'git.writeBlob'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {CommitObject} args.commit - * - * @returns {Promise<string>} - * @see CommitObject - * - */ -async function _writeCommit({ fs, gitdir, commit }) { - // Convert object to buffer - const object = GitCommit.from(commit).toObject(); - const oid = await _writeObject({ - fs, - gitdir, - type: 'commit', - object, - format: 'content', - }); - return oid -} - -// @ts-check - -/** - * Write a commit object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {CommitObject} args.commit - The object to write - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object - * @see CommitObject - * - */ -async function writeCommit({ - fs, - dir, - gitdir = join(dir, '.git'), - commit, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('commit', commit); - - return await _writeCommit({ - fs: new FileSystem(fs), - gitdir, - commit, - }) - } catch (err) { - err.caller = 'git.writeCommit'; - throw err - } -} - -// @ts-check - -/** - * Write a git object directly - * - * `format` can have the following values: - * - * | param | description | - * | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | 'deflated' | Treat `object` as the raw deflate-compressed buffer for an object, meaning can be written to `.git/objects/**` as-is. | - * | 'wrapped' | Treat `object` as the inflated object buffer wrapped in the git object header. This is the raw buffer used when calculating the SHA-1 object id of a git object. | - * | 'content' | Treat `object` as the object buffer without the git header. | - * | 'parsed' | Treat `object` as a parsed representation of the object. | - * - * If `format` is `'parsed'`, then `object` must match one of the schemas for `CommitObject`, `TreeObject`, `TagObject`, or a `string` (for blobs). - * - * {@link CommitObject typedef} - * - * {@link TreeObject typedef} - * - * {@link TagObject typedef} - * - * If `format` is `'content'`, `'wrapped'`, or `'deflated'`, `object` should be a `Uint8Array`. - * - * @deprecated - * > This command is overly complicated. - * > - * > If you know the type of object you are writing, use [`writeBlob`](./writeBlob.md), [`writeCommit`](./writeCommit.md), [`writeTag`](./writeTag.md), or [`writeTree`](./writeTree.md). - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string | Uint8Array | CommitObject | TreeObject | TagObject} args.object - The object to write. - * @param {'blob'|'tree'|'commit'|'tag'} [args.type] - The kind of object to write. - * @param {'deflated' | 'wrapped' | 'content' | 'parsed'} [args.format = 'parsed'] - What format the object is in. The possible choices are listed below. - * @param {string} [args.oid] - If `format` is `'deflated'` then this param is required. Otherwise it is calculated. - * @param {string} [args.encoding] - If `type` is `'blob'` then `object` will be converted to a Uint8Array using `encoding`. - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object. - * - * @example - * // Manually create an annotated tag. - * let sha = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD' }) - * console.log('commit', sha) - * - * let oid = await git.writeObject({ - * fs, - * dir: '/tutorial', - * type: 'tag', - * object: { - * object: sha, - * type: 'commit', - * tag: 'my-tag', - * tagger: { - * name: 'your name', - * email: 'email@example.com', - * timestamp: Math.floor(Date.now()/1000), - * timezoneOffset: new Date().getTimezoneOffset() - * }, - * message: 'Optional message' - * } - * }) - * - * console.log('tag', oid) - * - */ -async function writeObject({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - type, - object, - format = 'parsed', - oid, - encoding = undefined, -}) { - try { - const fs = new FileSystem(_fs); - // Convert object to buffer - if (format === 'parsed') { - switch (type) { - case 'commit': - object = GitCommit.from(object).toObject(); - break - case 'tree': - object = GitTree.from(object).toObject(); - break - case 'blob': - object = Buffer.from(object, encoding); - break - case 'tag': - object = GitAnnotatedTag.from(object).toObject(); - break - default: - throw new ObjectTypeError(oid || '', type, 'blob|commit|tag|tree') - } - // GitObjectManager does not know how to serialize content, so we tweak that parameter before passing it. - format = 'content'; - } - oid = await _writeObject({ - fs, - gitdir, - type, - object, - oid, - format, - }); - return oid - } catch (err) { - err.caller = 'git.writeObject'; - throw err - } -} - -// @ts-check - -/** - * Write a ref which refers to the specified SHA-1 object id, or a symbolic ref which refers to the specified ref. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The name of the ref to write - * @param {string} args.value - When `symbolic` is false, a ref or an SHA-1 object id. When true, a ref starting with `refs/`. - * @param {boolean} [args.force = false] - Instead of throwing an error if a ref named `ref` already exists, overwrite the existing ref. - * @param {boolean} [args.symbolic = false] - Whether the ref is symbolic or not. - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.writeRef({ - * fs, - * dir: '/tutorial', - * ref: 'refs/heads/another-branch', - * value: 'HEAD' - * }) - * await git.writeRef({ - * fs, - * dir: '/tutorial', - * ref: 'HEAD', - * value: 'refs/heads/another-branch', - * force: true, - * symbolic: true - * }) - * console.log('done') - * - */ -async function writeRef({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - ref, - value, - force = false, - symbolic = false, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - assertParameter('value', value); - - const fs = new FileSystem(_fs); - - if (ref !== cleanGitRef.clean(ref)) { - throw new InvalidRefNameError(ref, cleanGitRef.clean(ref)) - } - - if (!force && (await GitRefManager.exists({ fs, gitdir, ref }))) { - throw new AlreadyExistsError('ref', ref) - } - - if (symbolic) { - await GitRefManager.writeSymbolicRef({ - fs, - gitdir, - ref, - value, - }); - } else { - value = await GitRefManager.resolve({ - fs, - gitdir, - ref: value, - }); - await GitRefManager.writeRef({ - fs, - gitdir, - ref, - value, - }); - } - } catch (err) { - err.caller = 'git.writeRef'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {TagObject} args.tag - * - * @returns {Promise<string>} - */ -async function _writeTag({ fs, gitdir, tag }) { - // Convert object to buffer - const object = GitAnnotatedTag.from(tag).toObject(); - const oid = await _writeObject({ - fs, - gitdir, - type: 'tag', - object, - format: 'content', - }); - return oid -} - -// @ts-check - -/** - * Write an annotated tag object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {TagObject} args.tag - The object to write - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object - * @see TagObject - * - * @example - * // Manually create an annotated tag. - * let sha = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD' }) - * console.log('commit', sha) - * - * let oid = await git.writeTag({ - * fs, - * dir: '/tutorial', - * tag: { - * object: sha, - * type: 'commit', - * tag: 'my-tag', - * tagger: { - * name: 'your name', - * email: 'email@example.com', - * timestamp: Math.floor(Date.now()/1000), - * timezoneOffset: new Date().getTimezoneOffset() - * }, - * message: 'Optional message' - * } - * }) - * - * console.log('tag', oid) - * - */ -async function writeTag({ fs, dir, gitdir = join(dir, '.git'), tag }) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('tag', tag); - - return await _writeTag({ - fs: new FileSystem(fs), - gitdir, - tag, - }) - } catch (err) { - err.caller = 'git.writeTag'; - throw err - } -} - -// @ts-check - -/** - * Write a tree object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {TreeObject} args.tree - The object to write - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object. - * @see TreeObject - * @see TreeEntry - * - */ -async function writeTree({ fs, dir, gitdir = join(dir, '.git'), tree }) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('tree', tree); - - return await _writeTree({ - fs: new FileSystem(fs), - gitdir, - tree, - }) - } catch (err) { - err.caller = 'git.writeTree'; - throw err - } -} - -// default export -var index = { - Errors, - STAGE, - TREE, - WORKDIR, - add, - addNote, - addRemote, - annotatedTag, - branch, - checkout, - clone, - commit, - getConfig, - getConfigAll, - setConfig, - currentBranch, - deleteBranch, - deleteRef, - deleteRemote, - deleteTag, - expandOid, - expandRef, - fastForward, - fetch, - findMergeBase, - findRoot, - getRemoteInfo, - getRemoteInfo2, - hashBlob, - indexPack, - init, - isDescendent, - listBranches, - listFiles, - listNotes, - listRemotes, - listServerRefs, - listTags, - log, - merge, - packObjects, - pull, - push, - readBlob, - readCommit, - readNote, - readObject, - readTag, - readTree, - remove, - removeNote, - renameBranch, - resetIndex, - resolveRef, - status, - statusMatrix, - tag, - version, - walk, - writeBlob, - writeCommit, - writeObject, - writeRef, - writeTag, - writeTree, -}; - -exports.Errors = Errors; -exports.STAGE = STAGE; -exports.TREE = TREE; -exports.WORKDIR = WORKDIR; -exports.add = add; -exports.addNote = addNote; -exports.addRemote = addRemote; -exports.annotatedTag = annotatedTag; -exports.branch = branch; -exports.checkout = checkout; -exports.clone = clone; -exports.commit = commit; -exports.currentBranch = currentBranch; -exports.default = index; -exports.deleteBranch = deleteBranch; -exports.deleteRef = deleteRef; -exports.deleteRemote = deleteRemote; -exports.deleteTag = deleteTag; -exports.expandOid = expandOid; -exports.expandRef = expandRef; -exports.fastForward = fastForward; -exports.fetch = fetch; -exports.findMergeBase = findMergeBase; -exports.findRoot = findRoot; -exports.getConfig = getConfig; -exports.getConfigAll = getConfigAll; -exports.getRemoteInfo = getRemoteInfo; -exports.getRemoteInfo2 = getRemoteInfo2; -exports.hashBlob = hashBlob; -exports.indexPack = indexPack; -exports.init = init; -exports.isDescendent = isDescendent; -exports.listBranches = listBranches; -exports.listFiles = listFiles; -exports.listNotes = listNotes; -exports.listRemotes = listRemotes; -exports.listServerRefs = listServerRefs; -exports.listTags = listTags; -exports.log = log; -exports.merge = merge; -exports.packObjects = packObjects; -exports.pull = pull; -exports.push = push; -exports.readBlob = readBlob; -exports.readCommit = readCommit; -exports.readNote = readNote; -exports.readObject = readObject; -exports.readTag = readTag; -exports.readTree = readTree; -exports.remove = remove; -exports.removeNote = removeNote; -exports.renameBranch = renameBranch; -exports.resetIndex = resetIndex; -exports.resolveRef = resolveRef; -exports.setConfig = setConfig; -exports.status = status; -exports.statusMatrix = statusMatrix; -exports.tag = tag; -exports.version = version; -exports.walk = walk; -exports.writeBlob = writeBlob; -exports.writeCommit = writeCommit; -exports.writeObject = writeObject; -exports.writeRef = writeRef; -exports.writeTag = writeTag; -exports.writeTree = writeTree; diff --git a/node_modules/isomorphic-git/index.d.ts b/node_modules/isomorphic-git/index.d.ts deleted file mode 100644 index 1ea98694..00000000 --- a/node_modules/isomorphic-git/index.d.ts +++ /dev/null @@ -1,4234 +0,0 @@ -export default index; -export type TreeEntry = { - /** - * - the 6 digit hexadecimal mode - */ - mode: string; - /** - * - the name of the file or directory - */ - path: string; - /** - * - the SHA-1 object id of the blob or tree - */ - oid: string; - /** - * - the type of object - */ - type: "blob" | "tree" | "commit"; -}; -/** - * - The object returned has the following schema: - */ -export type ReadTreeResult = { - /** - * - SHA-1 object id of this tree - */ - oid: string; - /** - * - the parsed tree object - */ - tree: TreeEntry[]; -}; -/** - * - The object returned has the following schema: - */ -export type FetchResult = { - /** - * - The branch that is cloned if no branch is specified - */ - defaultBranch: string | null; - /** - * - The SHA-1 object id of the fetched head commit - */ - fetchHead: string | null; - /** - * - a textual description of the branch that was fetched - */ - fetchHeadDescription: string | null; - /** - * - The HTTP response headers returned by the git server - */ - headers?: { - [x: string]: string; - }; - /** - * - A list of branches that were pruned, if you provided the `prune` parameter - */ - pruned?: string[]; -}; -/** - * - Returns an object with a schema like this: - */ -export type MergeResult = { - /** - * - The SHA-1 object id that is now at the head of the branch. Absent only if `dryRun` was specified and `mergeCommit` is true. - */ - oid?: string; - /** - * - True if the branch was already merged so no changes were made - */ - alreadyMerged?: boolean; - /** - * - True if it was a fast-forward merge - */ - fastForward?: boolean; - /** - * - True if merge resulted in a merge commit - */ - mergeCommit?: boolean; - /** - * - The SHA-1 object id of the tree resulting from a merge commit - */ - tree?: string; -}; -/** - * - The object returned has the following schema: - */ -export type GetRemoteInfoResult = { - /** - * - The list of capabilities returned by the server (part of the Git protocol) - */ - capabilities: string[]; - refs?: any; - /** - * - The default branch of the remote - */ - HEAD?: string; - /** - * - The branches on the remote - */ - heads?: { - [x: string]: string; - }; - /** - * - The special branches representing pull requests (non-standard) - */ - pull?: { - [x: string]: string; - }; - /** - * - The tags on the remote - */ - tags?: { - [x: string]: string; - }; -}; -/** - * - This object has the following schema: - */ -export type GetRemoteInfo2Result = { - /** - * - Git protocol version the server supports - */ - protocolVersion: 1 | 2; - /** - * - An object of capabilities represented as keys and values - */ - capabilities: { - [x: string]: string | true; - }; - /** - * - Server refs (they get returned by protocol version 1 whether you want them or not) - */ - refs?: ServerRef[]; -}; -/** - * - The object returned has the following schema: - */ -export type HashBlobResult = { - /** - * - The SHA-1 object id - */ - oid: string; - /** - * - The type of the object - */ - type: "blob"; - /** - * - The wrapped git object (the thing that is hashed) - */ - object: Uint8Array; - /** - * - The format of the object - */ - format: "wrapped"; -}; -/** - * - This object has the following schema: - */ -export type ServerRef = { - /** - * - The name of the ref - */ - ref: string; - /** - * - The SHA-1 object id the ref points to - */ - oid: string; - /** - * - The target ref pointed to by a symbolic ref - */ - target?: string; - /** - * - If the oid is the SHA-1 object id of an annotated tag, this is the SHA-1 object id that the annotated tag points to - */ - peeled?: string; -}; -/** - * The packObjects command returns an object with two properties: - */ -export type PackObjectsResult = { - /** - * - The suggested filename for the packfile if you want to save it to disk somewhere. It includes the packfile SHA. - */ - filename: string; - /** - * - The packfile contents. Not present if `write` parameter was true, in which case the packfile was written straight to disk. - */ - packfile?: Uint8Array; -}; -/** - * - The object returned has the following schema: - */ -export type ReadBlobResult = { - oid: string; - blob: Uint8Array; -}; -export type DeflatedObject = { - oid: string; - type: "deflated"; - format: "deflated"; - object: Uint8Array; - source?: string; -}; -export type WrappedObject = { - oid: string; - type: "wrapped"; - format: "wrapped"; - object: Uint8Array; - source?: string; -}; -export type RawObject = { - oid: string; - type: "blob" | "tree" | "commit" | "tag"; - format: "content"; - object: Uint8Array; - source?: string; -}; -export type ParsedBlobObject = { - oid: string; - type: "blob"; - format: "parsed"; - object: string; - source?: string; -}; -export type ParsedCommitObject = { - oid: string; - type: "commit"; - format: "parsed"; - object: CommitObject; - source?: string; -}; -export type ParsedTreeObject = { - oid: string; - type: "tree"; - format: "parsed"; - object: TreeEntry[]; - source?: string; -}; -export type ParsedTagObject = { - oid: string; - type: "tag"; - format: "parsed"; - object: TagObject; - source?: string; -}; -export type ParsedObject = ParsedBlobObject | ParsedCommitObject | ParsedTreeObject | ParsedTagObject; -export type ReadObjectResult = ParsedBlobObject | ParsedCommitObject | ParsedTreeObject | ParsedTagObject | DeflatedObject | WrappedObject | RawObject; -/** - * - The object returned has the following schema: - */ -export type ReadTagResult = { - /** - * - SHA-1 object id of this tag - */ - oid: string; - /** - * - the parsed tag object - */ - tag: TagObject; - /** - * - PGP signing payload - */ - payload: string; -}; -export type WalkerMap = (filename: string, entries: (WalkerEntry | null)[]) => Promise<any>; -export type WalkerReduce = (parent: any, children: any[]) => Promise<any>; -export type WalkerIterateCallback = (entries: WalkerEntry[]) => Promise<any[]>; -export type WalkerIterate = (walk: WalkerIterateCallback, children: any) => Promise<any[]>; -export type GitProgressEvent = { - phase: string; - loaded: number; - total: number; -}; -export type ProgressCallback = (progress: GitProgressEvent) => void | Promise<void>; -export type GitHttpRequest = { - /** - * - The URL to request - */ - url: string; - /** - * - The HTTP method to use - */ - method?: string; - /** - * - Headers to include in the HTTP request - */ - headers?: { - [x: string]: string; - }; - /** - * - An async iterator of Uint8Arrays that make up the body of POST requests - */ - body?: any; - /** - * - Reserved for future use (emitting `GitProgressEvent`s) - */ - onProgress?: ProgressCallback; - /** - * - Reserved for future use (canceling a request) - */ - signal?: any; -}; -export type GitHttpResponse = { - /** - * - The final URL that was fetched after any redirects - */ - url: string; - /** - * - The HTTP method that was used - */ - method?: string; - /** - * - HTTP response headers - */ - headers?: { - [x: string]: string; - }; - /** - * - An async iterator of Uint8Arrays that make up the body of the response - */ - body?: any; - /** - * - The HTTP status code - */ - statusCode: number; - /** - * - The HTTP status message - */ - statusMessage: string; -}; -export type HttpFetch = (request: GitHttpRequest) => Promise<GitHttpResponse>; -export type HttpClient = { - request: HttpFetch; -}; -/** - * A git commit object. - */ -export type CommitObject = { - /** - * Commit message - */ - message: string; - /** - * SHA-1 object id of corresponding file tree - */ - tree: string; - /** - * an array of zero or more SHA-1 object ids - */ - parent: string[]; - author: { - /** - * The author's name - */ - name: string; - /** - * The author's email - */ - email: string; - /** - * UTC Unix timestamp in seconds - */ - timestamp: number; - /** - * Timezone difference from UTC in minutes - */ - timezoneOffset: number; - }; - committer: { - /** - * The committer's name - */ - name: string; - /** - * The committer's email - */ - email: string; - /** - * UTC Unix timestamp in seconds - */ - timestamp: number; - /** - * Timezone difference from UTC in minutes - */ - timezoneOffset: number; - }; - /** - * PGP signature (if present) - */ - gpgsig?: string; -}; -/** - * A git tree object. Trees represent a directory snapshot. - */ -export type TreeObject = TreeEntry[]; -/** - * A git annotated tag object. - */ -export type TagObject = { - /** - * SHA-1 object id of object being tagged - */ - object: string; - /** - * the type of the object being tagged - */ - type: "blob" | "tree" | "commit" | "tag"; - /** - * the tag name - */ - tag: string; - tagger: { - /** - * the tagger's name - */ - name: string; - /** - * the tagger's email - */ - email: string; - /** - * UTC Unix timestamp in seconds - */ - timestamp: number; - /** - * timezone difference from UTC in minutes - */ - timezoneOffset: number; - }; - /** - * tag message - */ - message: string; - /** - * PGP signature (if present) - */ - gpgsig?: string; -}; -export type ReadCommitResult = { - /** - * - SHA-1 object id of this commit - */ - oid: string; - /** - * - the parsed commit object - */ - commit: CommitObject; - /** - * - PGP signing payload - */ - payload: string; -}; -export type Walker = { - /** - * ('GitWalkerSymbol') - */ - Symbol: Symbol; -}; -/** - * Normalized subset of filesystem `stat` data: - */ -export type Stat = { - ctimeSeconds: number; - ctimeNanoseconds: number; - mtimeSeconds: number; - mtimeNanoseconds: number; - dev: number; - ino: number; - mode: number; - uid: number; - gid: number; - size: number; -}; -/** - * The `WalkerEntry` is an interface that abstracts computing many common tree / blob stats. - */ -export type WalkerEntry = { - type: () => Promise<"blob" | "tree" | "commit" | "special">; - mode: () => Promise<number>; - oid: () => Promise<string>; - content: () => Promise<void | Uint8Array>; - stat: () => Promise<Stat>; -}; -export type CallbackFsClient = { - /** - * - https://nodejs.org/api/fs.html#fs_fs_readfile_path_options_callback - */ - readFile: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback - */ - writeFile: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_unlink_path_callback - */ - unlink: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback - */ - readdir: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_mkdir_path_mode_callback - */ - mkdir: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_rmdir_path_callback - */ - rmdir: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_stat_path_options_callback - */ - stat: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_lstat_path_options_callback - */ - lstat: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_readlink_path_options_callback - */ - readlink?: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_symlink_target_path_type_callback - */ - symlink?: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_chmod_path_mode_callback - */ - chmod?: Function; -}; -export type PromiseFsClient = { - promises: { - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_readfile_path_options - */ - readFile: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_writefile_file_data_options - */ - writeFile: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_unlink_path - */ - unlink: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_readdir_path_options - */ - readdir: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_mkdir_path_options - */ - mkdir: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_rmdir_path - */ - rmdir: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_stat_path_options - */ - stat: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_lstat_path_options - */ - lstat: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_readlink_path_options - */ - readlink?: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_symlink_target_path_type - */ - symlink?: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_chmod_path_mode - */ - chmod?: Function; - }; -}; -export type FsClient = CallbackFsClient | PromiseFsClient; -export type MessageCallback = (message: string) => void | Promise<void>; -export type GitAuth = { - username?: string; - password?: string; - headers?: { - [x: string]: string; - }; - /** - * Tells git to throw a `UserCanceledError` (instead of an `HttpError`). - */ - cancel?: boolean; -}; -export type AuthCallback = (url: string, auth: GitAuth) => void | GitAuth | Promise<void | GitAuth>; -export type AuthFailureCallback = (url: string, auth: GitAuth) => void | GitAuth | Promise<void | GitAuth>; -export type AuthSuccessCallback = (url: string, auth: GitAuth) => void | Promise<void>; -export type SignParams = { - /** - * - a plaintext message - */ - payload: string; - /** - * - an 'ASCII armor' encoded PGP key (technically can actually contain _multiple_ keys) - */ - secretKey: string; -}; -export type SignCallback = (args: SignParams) => { - signature: string; -} | Promise<{ - signature: string; -}>; -export type RefUpdateStatus = { - ok: boolean; - error: string; -}; -export type PushResult = { - ok: boolean; - error: string | null; - refs: { - [x: string]: RefUpdateStatus; - }; - headers?: { - [x: string]: string; - }; -}; -export type HeadStatus = 0 | 1; -export type WorkdirStatus = 0 | 1 | 2; -export type StageStatus = 0 | 1 | 2 | 3; -export type StatusRow = [string, 0 | 1, 0 | 1 | 2, 0 | 1 | 2 | 3]; -export type types = number; -declare namespace index { - export { Errors }; - export { STAGE }; - export { TREE }; - export { WORKDIR }; - export { add }; - export { addNote }; - export { addRemote }; - export { annotatedTag }; - export { branch }; - export { checkout }; - export { clone }; - export { commit }; - export { getConfig }; - export { getConfigAll }; - export { setConfig }; - export { currentBranch }; - export { deleteBranch }; - export { deleteRef }; - export { deleteRemote }; - export { deleteTag }; - export { expandOid }; - export { expandRef }; - export { fastForward }; - export { fetch }; - export { findMergeBase }; - export { findRoot }; - export { getRemoteInfo }; - export { getRemoteInfo2 }; - export { hashBlob }; - export { indexPack }; - export { init }; - export { isDescendent }; - export { listBranches }; - export { listFiles }; - export { listNotes }; - export { listRemotes }; - export { listServerRefs }; - export { listTags }; - export { log }; - export { merge }; - export { packObjects }; - export { pull }; - export { push }; - export { readBlob }; - export { readCommit }; - export { readNote }; - export { readObject }; - export { readTag }; - export { readTree }; - export { remove }; - export { removeNote }; - export { renameBranch }; - export { resetIndex }; - export { resolveRef }; - export { status }; - export { statusMatrix }; - export { tag }; - export { version }; - export { walk }; - export { writeBlob }; - export { writeCommit }; - export { writeObject }; - export { writeRef }; - export { writeTag }; - export { writeTree }; -} -export var Errors: Readonly<{ - __proto__: null; - AlreadyExistsError: typeof AlreadyExistsError; - AmbiguousError: typeof AmbiguousError; - CheckoutConflictError: typeof CheckoutConflictError; - CommitNotFetchedError: typeof CommitNotFetchedError; - EmptyServerResponseError: typeof EmptyServerResponseError; - FastForwardError: typeof FastForwardError; - GitPushError: typeof GitPushError; - HttpError: typeof HttpError; - InternalError: typeof InternalError; - InvalidFilepathError: typeof InvalidFilepathError; - InvalidOidError: typeof InvalidOidError; - InvalidRefNameError: typeof InvalidRefNameError; - MaxDepthError: typeof MaxDepthError; - MergeNotSupportedError: typeof MergeNotSupportedError; - MissingNameError: typeof MissingNameError; - MissingParameterError: typeof MissingParameterError; - NoRefspecError: typeof NoRefspecError; - NotFoundError: typeof NotFoundError; - ObjectTypeError: typeof ObjectTypeError; - ParseError: typeof ParseError; - PushRejectedError: typeof PushRejectedError; - RemoteCapabilityError: typeof RemoteCapabilityError; - SmartHttpError: typeof SmartHttpError; - UnknownTransportError: typeof UnknownTransportError; - UnsafeFilepathError: typeof UnsafeFilepathError; - UrlParseError: typeof UrlParseError; - UserCanceledError: typeof UserCanceledError; -}>; -/** - * @returns {Walker} - */ -export function STAGE(): Walker; -/** - * @param {object} args - * @param {string} [args.ref='HEAD'] - * @returns {Walker} - */ -export function TREE({ ref }: { - ref?: string; -}): Walker; -/** - * @returns {Walker} - */ -export function WORKDIR(): Walker; -/** - * Add a file to the git index (aka staging area) - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the file to add to the index - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully once the git index has been updated - * - * @example - * await fs.promises.writeFile('/tutorial/README.md', `# TEST`) - * await git.add({ fs, dir: '/tutorial', filepath: 'README.md' }) - * console.log('done') - * - */ -export function add({ fs: _fs, dir, gitdir, filepath, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir: string; - gitdir?: string; - filepath: string; - cache?: any; -}): Promise<void>; -/** - * Add or update an object note - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - The notes ref to look under - * @param {string} args.oid - The SHA-1 object id of the object to add the note to. - * @param {string|Uint8Array} args.note - The note to add - * @param {boolean} [args.force] - Over-write note if it already exists. - * @param {Object} [args.author] - The details about the author. - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer = author] - The details about the note committer, in the same format as the author parameter. If not specified, the author details are used. - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - Sign the note commit using this private PGP key. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the commit object for the added note. - */ -export function addNote({ fs: _fs, onSign, dir, gitdir, ref, oid, note, force, author: _author, committer: _committer, signingKey, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - onSign?: SignCallback; - dir?: string; - gitdir?: string; - ref?: string; - oid: string; - note: string | Uint8Array; - force?: boolean; - author?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - committer?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - signingKey?: string; - cache?: any; -}): Promise<string>; -/** - * Add or update a remote - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.remote - The name of the remote - * @param {string} args.url - The URL of the remote - * @param {boolean} [args.force = false] - Instead of throwing an error if a remote named `remote` already exists, overwrite the existing remote. - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.addRemote({ - * fs, - * dir: '/tutorial', - * remote: 'upstream', - * url: 'https://github.com/isomorphic-git/isomorphic-git' - * }) - * console.log('done') - * - */ -export function addRemote({ fs, dir, gitdir, remote, url, force, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - remote: string; - url: string; - force?: boolean; -}): Promise<void>; -/** - * Create an annotated tag. - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - What to name the tag - * @param {string} [args.message = ref] - The tag message to use. - * @param {string} [args.object = 'HEAD'] - The SHA-1 object id the tag points to. (Will resolve to a SHA-1 object id if value is a ref.) By default, the commit object which is referred by the current `HEAD` is used. - * @param {object} [args.tagger] - The details about the tagger. - * @param {string} [args.tagger.name] - Default is `user.name` config. - * @param {string} [args.tagger.email] - Default is `user.email` config. - * @param {number} [args.tagger.timestamp=Math.floor(Date.now()/1000)] - Set the tagger timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.tagger.timezoneOffset] - Set the tagger timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.gpgsig] - The gpgsig attatched to the tag object. (Mutually exclusive with the `signingKey` option.) - * @param {string} [args.signingKey] - Sign the tag object using this private PGP key. (Mutually exclusive with the `gpgsig` option.) - * @param {boolean} [args.force = false] - Instead of throwing an error if a tag named `ref` already exists, overwrite the existing tag. Note that this option does not modify the original tag object itself. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.annotatedTag({ - * fs, - * dir: '/tutorial', - * ref: 'test-tag', - * message: 'This commit is awesome', - * tagger: { - * name: 'Mr. Test', - * email: 'mrtest@example.com' - * } - * }) - * console.log('done') - * - */ -export function annotatedTag({ fs: _fs, onSign, dir, gitdir, ref, tagger: _tagger, message, gpgsig, object, signingKey, force, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - onSign?: SignCallback; - dir?: string; - gitdir?: string; - ref: string; - message?: string; - object?: string; - tagger?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - gpgsig?: string; - signingKey?: string; - force?: boolean; - cache?: any; -}): Promise<void>; -/** - * Create a branch - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - What to name the branch - * @param {boolean} [args.checkout = false] - Update `HEAD` to point at the newly created branch - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.branch({ fs, dir: '/tutorial', ref: 'develop' }) - * console.log('done') - * - */ -export function branch({ fs, dir, gitdir, ref, checkout, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; - checkout?: boolean; -}): Promise<void>; -/** - * Checkout a branch - * - * If the branch already exists it will check out that branch. Otherwise, it will create a new remote tracking branch set to track the remote branch of that name. - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref = 'HEAD'] - Source to checkout files from - * @param {string[]} [args.filepaths] - Limit the checkout to the given files and directories - * @param {string} [args.remote = 'origin'] - Which remote repository to use - * @param {boolean} [args.noCheckout = false] - If true, will update HEAD but won't update the working directory - * @param {boolean} [args.noUpdateHead] - If true, will update the working directory but won't update HEAD. Defaults to `false` when `ref` is provided, and `true` if `ref` is not provided. - * @param {boolean} [args.dryRun = false] - If true, simulates a checkout so you can test whether it would succeed. - * @param {boolean} [args.force = false] - If true, conflicts will be ignored and files will be overwritten regardless of local changes. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * // switch to the main branch - * await git.checkout({ - * fs, - * dir: '/tutorial', - * ref: 'main' - * }) - * console.log('done') - * - * @example - * // restore the 'docs' and 'src/docs' folders to the way they were, overwriting any changes - * await git.checkout({ - * fs, - * dir: '/tutorial', - * force: true, - * filepaths: ['docs', 'src/docs'] - * }) - * console.log('done') - * - * @example - * // restore the 'docs' and 'src/docs' folders to the way they are in the 'develop' branch, overwriting any changes - * await git.checkout({ - * fs, - * dir: '/tutorial', - * ref: 'develop', - * noUpdateHead: true, - * force: true, - * filepaths: ['docs', 'src/docs'] - * }) - * console.log('done') - */ -export function checkout({ fs, onProgress, dir, gitdir, remote, ref: _ref, filepaths, noCheckout, noUpdateHead, dryRun, force, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - onProgress?: ProgressCallback; - dir: string; - gitdir?: string; - ref?: string; - filepaths?: string[]; - remote?: string; - noCheckout?: boolean; - noUpdateHead?: boolean; - dryRun?: boolean; - force?: boolean; - cache?: any; -}): Promise<void>; -/** - * Clone a repository - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.url - The URL of the remote repository - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Value is stored in the git config file for that repo. - * @param {string} [args.ref] - Which branch to checkout. By default this is the designated "main branch" of the repository. - * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch. - * @param {boolean} [args.noCheckout = false] - If true, clone will only fetch the repo, not check out a branch. Skipping checkout can save a lot of time normally spent writing files to disk. - * @param {boolean} [args.noTags = false] - By default clone will fetch all tags. `noTags` disables that behavior. - * @param {string} [args.remote = 'origin'] - What to name the remote that is created. - * @param {number} [args.depth] - Integer. Determines how much of the git repository's history to retrieve - * @param {Date} [args.since] - Only fetch commits created after the given date. Mutually exclusive with `depth`. - * @param {string[]} [args.exclude = []] - A list of branches or tags. Instructs the remote server not to send us any commits reachable from these refs. - * @param {boolean} [args.relative = false] - Changes the meaning of `depth` to be measured from the current shallow depth rather than from the branch tip. - * @param {Object<string, string>} [args.headers = {}] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when clone completes - * - * @example - * await git.clone({ - * fs, - * http, - * dir: '/tutorial', - * corsProxy: 'https://cors.isomorphic-git.org', - * url: 'https://github.com/isomorphic-git/isomorphic-git', - * singleBranch: true, - * depth: 1 - * }) - * console.log('done') - * - */ -export function clone({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, url, corsProxy, ref, remote, depth, since, exclude, relative, singleBranch, noCheckout, noTags, headers, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - http: HttpClient; - onProgress?: ProgressCallback; - onMessage?: MessageCallback; - onAuth?: AuthCallback; - onAuthFailure?: AuthFailureCallback; - onAuthSuccess?: AuthSuccessCallback; - dir: string; - gitdir?: string; - url: string; - corsProxy?: string; - ref?: string; - singleBranch?: boolean; - noCheckout?: boolean; - noTags?: boolean; - remote?: string; - depth?: number; - since?: Date; - exclude?: string[]; - relative?: boolean; - headers?: { - [x: string]: string; - }; - cache?: any; -}): Promise<void>; -/** - * Create a new commit - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.message - The commit message to use. - * @param {Object} [args.author] - The details about the author. - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer = author] - The details about the commit committer, in the same format as the author parameter. If not specified, the author details are used. - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - Sign the tag object using this private PGP key. - * @param {boolean} [args.dryRun = false] - If true, simulates making a commit so you can test whether it would succeed. Implies `noUpdateBranch`. - * @param {boolean} [args.noUpdateBranch = false] - If true, does not update the branch pointer after creating the commit. - * @param {string} [args.ref] - The fully expanded name of the branch to commit to. Default is the current branch pointed to by HEAD. (TODO: fix it so it can expand branch names without throwing if the branch doesn't exist yet.) - * @param {string[]} [args.parent] - The SHA-1 object ids of the commits to use as parents. If not specified, the commit pointed to by `ref` is used. - * @param {string} [args.tree] - The SHA-1 object id of the tree to use. If not specified, a new tree object is created from the current git index. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly created commit. - * - * @example - * let sha = await git.commit({ - * fs, - * dir: '/tutorial', - * author: { - * name: 'Mr. Test', - * email: 'mrtest@example.com', - * }, - * message: 'Added the a.txt file' - * }) - * console.log(sha) - * - */ -export function commit({ fs: _fs, onSign, dir, gitdir, message, author: _author, committer: _committer, signingKey, dryRun, noUpdateBranch, ref, parent, tree, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - onSign?: SignCallback; - dir?: string; - gitdir?: string; - message: string; - author?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - committer?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - signingKey?: string; - dryRun?: boolean; - noUpdateBranch?: boolean; - ref?: string; - parent?: string[]; - tree?: string; - cache?: any; -}): Promise<string>; -/** - * Get the name of the branch currently pointed to by .git/HEAD - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {boolean} [args.fullname = false] - Return the full path (e.g. "refs/heads/main") instead of the abbreviated form. - * @param {boolean} [args.test = false] - If the current branch doesn't actually exist (such as right after git init) then return `undefined`. - * - * @returns {Promise<string|void>} The name of the current branch or undefined if the HEAD is detached. - * - * @example - * // Get the current branch name - * let branch = await git.currentBranch({ - * fs, - * dir: '/tutorial', - * fullname: false - * }) - * console.log(branch) - * - */ -export function currentBranch({ fs, dir, gitdir, fullname, test, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - fullname?: boolean; - test?: boolean; -}): Promise<string | void>; -/** - * Delete a local branch - * - * > Note: This only deletes loose branches - it should be fixed in the future to delete packed branches as well. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The branch to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteBranch({ fs, dir: '/tutorial', ref: 'local-branch' }) - * console.log('done') - * - */ -export function deleteBranch({ fs, dir, gitdir, ref, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; -}): Promise<void>; -/** - * Delete a local ref - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The ref to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteRef({ fs, dir: '/tutorial', ref: 'refs/tags/test-tag' }) - * console.log('done') - * - */ -export function deleteRef({ fs, dir, gitdir, ref }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; -}): Promise<void>; -/** - * Removes the local config entry for a given remote - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.remote - The name of the remote to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteRemote({ fs, dir: '/tutorial', remote: 'upstream' }) - * console.log('done') - * - */ -export function deleteRemote({ fs, dir, gitdir, remote, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - remote: string; -}): Promise<void>; -/** - * Delete a local tag ref - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The tag to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteTag({ fs, dir: '/tutorial', ref: 'test-tag' }) - * console.log('done') - * - */ -export function deleteTag({ fs, dir, gitdir, ref }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; -}): Promise<void>; -/** - * Expand and resolve a short oid into a full oid - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The shortened oid prefix to expand (like "0414d2a") - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<string>} Resolves successfully with the full oid (like "0414d2a286d7bbc7a4a326a61c1f9f888a8ab87f") - * - * @example - * let oid = await git.expandOid({ fs, dir: '/tutorial', oid: '0414d2a'}) - * console.log(oid) - * - */ -export function expandOid({ fs, dir, gitdir, oid, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oid: string; - cache?: any; -}): Promise<string>; -/** - * Expand an abbreviated ref to its full name - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The ref to expand (like "v1.0.0") - * - * @returns {Promise<string>} Resolves successfully with a full ref name ("refs/tags/v1.0.0") - * - * @example - * let fullRef = await git.expandRef({ fs, dir: '/tutorial', ref: 'main'}) - * console.log(fullRef) - * - */ -export function expandRef({ fs, dir, gitdir, ref }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; -}): Promise<string>; -/** - * Like `pull`, but hard-coded with `fastForward: true` so there is no need for an `author` parameter. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - Which branch to merge into. By default this is the currently checked out branch. - * @param {string} [args.url] - (Added in 1.1.0) The URL of the remote repository. The default is the value set in the git config for that remote. - * @param {string} [args.remote] - (Added in 1.1.0) If URL is not specified, determines which remote to use. - * @param {string} [args.remoteRef] - (Added in 1.1.0) The name of the branch on the remote to fetch. By default this is the configured remote tracking branch. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when pull operation completes - * - * @example - * await git.fastForward({ - * fs, - * http, - * dir: '/tutorial', - * ref: 'main', - * singleBranch: true - * }) - * console.log('done') - * - */ -export function fastForward({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, url, remote, remoteRef, corsProxy, singleBranch, headers, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - http: HttpClient; - onProgress?: ProgressCallback; - onMessage?: MessageCallback; - onAuth?: AuthCallback; - onAuthFailure?: AuthFailureCallback; - onAuthSuccess?: AuthSuccessCallback; - dir: string; - gitdir?: string; - ref?: string; - url?: string; - remote?: string; - remoteRef?: string; - corsProxy?: string; - singleBranch?: boolean; - headers?: { - [x: string]: string; - }; - cache?: any; -}): Promise<void>; -/** - * - * @typedef {object} FetchResult - The object returned has the following schema: - * @property {string | null} defaultBranch - The branch that is cloned if no branch is specified - * @property {string | null} fetchHead - The SHA-1 object id of the fetched head commit - * @property {string | null} fetchHeadDescription - a textual description of the branch that was fetched - * @property {Object<string, string>} [headers] - The HTTP response headers returned by the git server - * @property {string[]} [pruned] - A list of branches that were pruned, if you provided the `prune` parameter - * - */ -/** - * Fetch commits from a remote repository - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.url] - The URL of the remote repository. The default is the value set in the git config for that remote. - * @param {string} [args.remote] - If URL is not specified, determines which remote to use. - * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch. - * @param {string} [args.ref] - Which branch to fetch if `singleBranch` is true. By default this is the current branch or the remote's default branch. - * @param {string} [args.remoteRef] - The name of the branch on the remote to fetch if `singleBranch` is true. By default this is the configured remote tracking branch. - * @param {boolean} [args.tags = false] - Also fetch tags - * @param {number} [args.depth] - Integer. Determines how much of the git repository's history to retrieve - * @param {boolean} [args.relative = false] - Changes the meaning of `depth` to be measured from the current shallow depth rather than from the branch tip. - * @param {Date} [args.since] - Only fetch commits created after the given date. Mutually exclusive with `depth`. - * @param {string[]} [args.exclude = []] - A list of branches or tags. Instructs the remote server not to send us any commits reachable from these refs. - * @param {boolean} [args.prune] - Delete local remote-tracking branches that are not present on the remote - * @param {boolean} [args.pruneTags] - Prune local tags that don’t exist on the remote, and force-update those tags that differ - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<FetchResult>} Resolves successfully when fetch completes - * @see FetchResult - * - * @example - * let result = await git.fetch({ - * fs, - * http, - * dir: '/tutorial', - * corsProxy: 'https://cors.isomorphic-git.org', - * url: 'https://github.com/isomorphic-git/isomorphic-git', - * ref: 'main', - * depth: 1, - * singleBranch: true, - * tags: false - * }) - * console.log(result) - * - */ -export function fetch({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, remote, remoteRef, url, corsProxy, depth, since, exclude, relative, tags, singleBranch, headers, prune, pruneTags, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - http: HttpClient; - onProgress?: ProgressCallback; - onMessage?: MessageCallback; - onAuth?: AuthCallback; - onAuthFailure?: AuthFailureCallback; - onAuthSuccess?: AuthSuccessCallback; - dir?: string; - gitdir?: string; - url?: string; - remote?: string; - singleBranch?: boolean; - ref?: string; - remoteRef?: string; - tags?: boolean; - depth?: number; - relative?: boolean; - since?: Date; - exclude?: string[]; - prune?: boolean; - pruneTags?: boolean; - corsProxy?: string; - headers?: { - [x: string]: string; - }; - cache?: any; -}): Promise<FetchResult>; -/** - * Find the merge base for a set of commits - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string[]} args.oids - Which commits - * @param {object} [args.cache] - a [cache](cache.md) object - * - */ -export function findMergeBase({ fs, dir, gitdir, oids, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oids: string[]; - cache?: any; -}): Promise<any[]>; -/** - * Find the root git directory - * - * Starting at `filepath`, walks upward until it finds a directory that contains a subdirectory called '.git'. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system client - * @param {string} args.filepath - The file directory to start searching in. - * - * @returns {Promise<string>} Resolves successfully with a root git directory path - * @throws {NotFoundError} - * - * @example - * let gitroot = await git.findRoot({ - * fs, - * filepath: '/tutorial/src/utils' - * }) - * console.log(gitroot) - * - */ -export function findRoot({ fs, filepath }: { - fs: CallbackFsClient | PromiseFsClient; - filepath: string; -}): Promise<string>; -/** - * Read an entry from the git config files. - * - * *Caveats:* - * - Currently only the local `$GIT_DIR/config` file can be read or written. However support for the global `~/.gitconfig` and system `$(prefix)/etc/gitconfig` will be added in the future. - * - The current parser does not support the more exotic features of the git-config file format such as `[include]` and `[includeIf]`. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.path - The key of the git config entry - * - * @returns {Promise<any>} Resolves with the config value - * - * @example - * // Read config value - * let value = await git.getConfig({ - * fs, - * dir: '/tutorial', - * path: 'remote.origin.url' - * }) - * console.log(value) - * - */ -export function getConfig({ fs, dir, gitdir, path }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - path: string; -}): Promise<any>; -/** - * Read a multi-valued entry from the git config files. - * - * *Caveats:* - * - Currently only the local `$GIT_DIR/config` file can be read or written. However support for the global `~/.gitconfig` and system `$(prefix)/etc/gitconfig` will be added in the future. - * - The current parser does not support the more exotic features of the git-config file format such as `[include]` and `[includeIf]`. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.path - The key of the git config entry - * - * @returns {Promise<Array<any>>} Resolves with the config value - * - */ -export function getConfigAll({ fs, dir, gitdir, path, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - path: string; -}): Promise<any[]>; -/** - * - * @typedef {Object} GetRemoteInfoResult - The object returned has the following schema: - * @property {string[]} capabilities - The list of capabilities returned by the server (part of the Git protocol) - * @property {Object} [refs] - * @property {string} [HEAD] - The default branch of the remote - * @property {Object<string, string>} [refs.heads] - The branches on the remote - * @property {Object<string, string>} [refs.pull] - The special branches representing pull requests (non-standard) - * @property {Object<string, string>} [refs.tags] - The tags on the remote - * - */ -/** - * List a remote servers branches, tags, and capabilities. - * - * This is a rare command that doesn't require an `fs`, `dir`, or even `gitdir` argument. - * It just communicates to a remote git server, using the first step of the `git-upload-pack` handshake, but stopping short of fetching the packfile. - * - * @param {object} args - * @param {HttpClient} args.http - an HTTP client - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.url - The URL of the remote repository. Will be gotten from gitconfig if absent. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.forPush = false] - By default, the command queries the 'fetch' capabilities. If true, it will ask for the 'push' capabilities. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * - * @returns {Promise<GetRemoteInfoResult>} Resolves successfully with an object listing the branches, tags, and capabilities of the remote. - * @see GetRemoteInfoResult - * - * @example - * let info = await git.getRemoteInfo({ - * http, - * url: - * "https://cors.isomorphic-git.org/github.com/isomorphic-git/isomorphic-git.git" - * }); - * console.log(info); - * - */ -export function getRemoteInfo({ http, onAuth, onAuthSuccess, onAuthFailure, corsProxy, url, headers, forPush, }: { - http: HttpClient; - onAuth?: AuthCallback; - onAuthFailure?: AuthFailureCallback; - onAuthSuccess?: AuthSuccessCallback; - url: string; - corsProxy?: string; - forPush?: boolean; - headers?: { - [x: string]: string; - }; -}): Promise<GetRemoteInfoResult>; -/** - * @typedef {Object} GetRemoteInfo2Result - This object has the following schema: - * @property {1 | 2} protocolVersion - Git protocol version the server supports - * @property {Object<string, string | true>} capabilities - An object of capabilities represented as keys and values - * @property {ServerRef[]} [refs] - Server refs (they get returned by protocol version 1 whether you want them or not) - */ -/** - * List a remote server's capabilities. - * - * This is a rare command that doesn't require an `fs`, `dir`, or even `gitdir` argument. - * It just communicates to a remote git server, determining what protocol version, commands, and features it supports. - * - * > The successor to [`getRemoteInfo`](./getRemoteInfo.md), this command supports Git Wire Protocol Version 2. - * > Therefore its return type is more complicated as either: - * > - * > - v1 capabilities (and refs) or - * > - v2 capabilities (and no refs) - * > - * > are returned. - * > If you just care about refs, use [`listServerRefs`](./listServerRefs.md) - * - * @param {object} args - * @param {HttpClient} args.http - an HTTP client - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.url - The URL of the remote repository. Will be gotten from gitconfig if absent. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.forPush = false] - By default, the command queries the 'fetch' capabilities. If true, it will ask for the 'push' capabilities. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {1 | 2} [args.protocolVersion = 2] - Which version of the Git Protocol to use. - * - * @returns {Promise<GetRemoteInfo2Result>} Resolves successfully with an object listing the capabilities of the remote. - * @see GetRemoteInfo2Result - * @see ServerRef - * - * @example - * let info = await git.getRemoteInfo2({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git" - * }); - * console.log(info); - * - */ -export function getRemoteInfo2({ http, onAuth, onAuthSuccess, onAuthFailure, corsProxy, url, headers, forPush, protocolVersion, }: { - http: HttpClient; - onAuth?: AuthCallback; - onAuthFailure?: AuthFailureCallback; - onAuthSuccess?: AuthSuccessCallback; - url: string; - corsProxy?: string; - forPush?: boolean; - headers?: { - [x: string]: string; - }; - protocolVersion?: 1 | 2; -}): Promise<GetRemoteInfo2Result>; -/** - * - * @typedef {object} HashBlobResult - The object returned has the following schema: - * @property {string} oid - The SHA-1 object id - * @property {'blob'} type - The type of the object - * @property {Uint8Array} object - The wrapped git object (the thing that is hashed) - * @property {'wrapped'} format - The format of the object - * - */ -/** - * Compute what the SHA-1 object id of a file would be - * - * @param {object} args - * @param {Uint8Array|string} args.object - The object to write. If `object` is a String then it will be converted to a Uint8Array using UTF-8 encoding. - * - * @returns {Promise<HashBlobResult>} Resolves successfully with the SHA-1 object id and the wrapped object Uint8Array. - * @see HashBlobResult - * - * @example - * let { oid, type, object, format } = await git.hashBlob({ - * object: 'Hello world!', - * }) - * - * console.log('oid', oid) - * console.log('type', type) - * console.log('object', object) - * console.log('format', format) - * - */ -export function hashBlob({ object }: { - object: string | Uint8Array; -}): Promise<HashBlobResult>; -/** - * Create the .idx file for a given .pack file - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the .pack file to index - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<{oids: string[]}>} Resolves with a list of the SHA-1 object ids contained in the packfile - * - * @example - * let packfiles = await fs.promises.readdir('/tutorial/.git/objects/pack') - * packfiles = packfiles.filter(name => name.endsWith('.pack')) - * console.log('packfiles', packfiles) - * - * const { oids } = await git.indexPack({ - * fs, - * dir: '/tutorial', - * filepath: `.git/objects/pack/${packfiles[0]}`, - * async onProgress (evt) { - * console.log(`${evt.phase}: ${evt.loaded} / ${evt.total}`) - * } - * }) - * console.log(oids) - * - */ -export function indexPack({ fs, onProgress, dir, gitdir, filepath, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - onProgress?: ProgressCallback; - dir: string; - gitdir?: string; - filepath: string; - cache?: any; -}): Promise<{ - oids: string[]; -}>; -/** - * Initialize a new repository - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {boolean} [args.bare = false] - Initialize a bare repository - * @param {string} [args.defaultBranch = 'master'] - The name of the default branch (might be changed to a required argument in 2.0.0) - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.init({ fs, dir: '/tutorial' }) - * console.log('done') - * - */ -export function init({ fs, bare, dir, gitdir, defaultBranch, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - bare?: boolean; - defaultBranch?: string; -}): Promise<void>; -/** - * Check whether a git commit is descended from another - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The descendent commit - * @param {string} args.ancestor - The (proposed) ancestor commit - * @param {number} [args.depth = -1] - Maximum depth to search before giving up. -1 means no maximum depth. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<boolean>} Resolves to true if `oid` is a descendent of `ancestor` - * - * @example - * let oid = await git.resolveRef({ fs, dir: '/tutorial', ref: 'main' }) - * let ancestor = await git.resolveRef({ fs, dir: '/tutorial', ref: 'v0.20.0' }) - * console.log(oid, ancestor) - * await git.isDescendent({ fs, dir: '/tutorial', oid, ancestor, depth: -1 }) - * - */ -export function isDescendent({ fs, dir, gitdir, oid, ancestor, depth, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oid: string; - ancestor: string; - depth?: number; - cache?: any; -}): Promise<boolean>; -/** - * List branches - * - * By default it lists local branches. If a 'remote' is specified, it lists the remote's branches. When listing remote branches, the HEAD branch is not filtered out, so it may be included in the list of results. - * - * Note that specifying a remote does not actually contact the server and update the list of branches. - * If you want an up-to-date list, first do a `fetch` to that remote. - * (Which branch you fetch doesn't matter - the list of branches available on the remote is updated during the fetch handshake.) - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.remote] - Instead of the branches in `refs/heads`, list the branches in `refs/remotes/${remote}`. - * - * @returns {Promise<Array<string>>} Resolves successfully with an array of branch names - * - * @example - * let branches = await git.listBranches({ fs, dir: '/tutorial' }) - * console.log(branches) - * let remoteBranches = await git.listBranches({ fs, dir: '/tutorial', remote: 'origin' }) - * console.log(remoteBranches) - * - */ -export function listBranches({ fs, dir, gitdir, remote, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - remote?: string; -}): Promise<string[]>; -/** - * List all the files in the git index or a commit - * - * > Note: This function is efficient for listing the files in the staging area, but listing all the files in a commit requires recursively walking through the git object store. - * > If you do not require a complete list of every file, better performance can be achieved by using [walk](./walk) and ignoring subdirectories you don't care about. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - Return a list of all the files in the commit at `ref` instead of the files currently in the git index (aka staging area) - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Array<string>>} Resolves successfully with an array of filepaths - * - * @example - * // All the files in the previous commit - * let files = await git.listFiles({ fs, dir: '/tutorial', ref: 'HEAD' }) - * console.log(files) - * // All the files in the current staging area - * files = await git.listFiles({ fs, dir: '/tutorial' }) - * console.log(files) - * - */ -export function listFiles({ fs, dir, gitdir, ref, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref?: string; - cache?: any; -}): Promise<string[]>; -/** - * List all the object notes - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - The notes ref to look under - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Array<{target: string, note: string}>>} Resolves successfully with an array of entries containing SHA-1 object ids of the note and the object the note targets - */ -export function listNotes({ fs, dir, gitdir, ref, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref?: string; - cache?: any; -}): Promise<{ - target: string; - note: string; -}[]>; -/** - * List remotes - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * - * @returns {Promise<Array<{remote: string, url: string}>>} Resolves successfully with an array of `{remote, url}` objects - * - * @example - * let remotes = await git.listRemotes({ fs, dir: '/tutorial' }) - * console.log(remotes) - * - */ -export function listRemotes({ fs, dir, gitdir }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; -}): Promise<{ - remote: string; - url: string; -}[]>; -/** - * Fetch a list of refs (branches, tags, etc) from a server. - * - * This is a rare command that doesn't require an `fs`, `dir`, or even `gitdir` argument. - * It just requires an `http` argument. - * - * ### About `protocolVersion` - * - * There's a rather fun trade-off between Git Protocol Version 1 and Git Protocol Version 2. - * Version 2 actually requires 2 HTTP requests instead of 1, making it similar to fetch or push in that regard. - * However, version 2 supports server-side filtering by prefix, whereas that filtering is done client-side in version 1. - * Which protocol is most efficient therefore depends on the number of refs on the remote, the latency of the server, and speed of the network connection. - * For an small repos (or fast Internet connections), the requirement to make two trips to the server makes protocol 2 slower. - * But for large repos (or slow Internet connections), the decreased payload size of the second request makes up for the additional request. - * - * Hard numbers vary by situation, but here's some numbers from my machine: - * - * Using isomorphic-git in a browser, with a CORS proxy, listing only the branches (refs/heads) of https://github.com/isomorphic-git/isomorphic-git - * - Protocol Version 1 took ~300ms and transfered 84 KB. - * - Protocol Version 2 took ~500ms and transfered 4.1 KB. - * - * Using isomorphic-git in a browser, with a CORS proxy, listing only the branches (refs/heads) of https://gitlab.com/gitlab-org/gitlab - * - Protocol Version 1 took ~4900ms and transfered 9.41 MB. - * - Protocol Version 2 took ~1280ms and transfered 433 KB. - * - * Finally, there is a fun quirk regarding the `symrefs` parameter. - * Protocol Version 1 will generally only return the `HEAD` symref and not others. - * Historically, this meant that servers don't use symbolic refs except for `HEAD`, which is used to point at the "default branch". - * However Protocol Version 2 can return *all* the symbolic refs on the server. - * So if you are running your own git server, you could take advantage of that I guess. - * - * #### TL;DR - * If you are _not_ taking advantage of `prefix` I would recommend `protocolVersion: 1`. - * Otherwise, I recommend to use the default which is `protocolVersion: 2`. - * - * @param {object} args - * @param {HttpClient} args.http - an HTTP client - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.url - The URL of the remote repository. Will be gotten from gitconfig if absent. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.forPush = false] - By default, the command queries the 'fetch' capabilities. If true, it will ask for the 'push' capabilities. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {1 | 2} [args.protocolVersion = 2] - Which version of the Git Protocol to use. - * @param {string} [args.prefix] - Only list refs that start with this prefix - * @param {boolean} [args.symrefs = false] - Include symbolic ref targets - * @param {boolean} [args.peelTags = false] - Include annotated tag peeled targets - * - * @returns {Promise<ServerRef[]>} Resolves successfully with an array of ServerRef objects - * @see ServerRef - * - * @example - * // List all the branches on a repo - * let refs = await git.listServerRefs({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git", - * prefix: "refs/heads/", - * }); - * console.log(refs); - * - * @example - * // Get the default branch on a repo - * let refs = await git.listServerRefs({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git", - * prefix: "HEAD", - * symrefs: true, - * }); - * console.log(refs); - * - * @example - * // List all the tags on a repo - * let refs = await git.listServerRefs({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git", - * prefix: "refs/tags/", - * peelTags: true, - * }); - * console.log(refs); - * - * @example - * // List all the pull requests on a repo - * let refs = await git.listServerRefs({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git", - * prefix: "refs/pull/", - * }); - * console.log(refs); - * - */ -export function listServerRefs({ http, onAuth, onAuthSuccess, onAuthFailure, corsProxy, url, headers, forPush, protocolVersion, prefix, symrefs, peelTags, }: { - http: HttpClient; - onAuth?: AuthCallback; - onAuthFailure?: AuthFailureCallback; - onAuthSuccess?: AuthSuccessCallback; - url: string; - corsProxy?: string; - forPush?: boolean; - headers?: { - [x: string]: string; - }; - protocolVersion?: 1 | 2; - prefix?: string; - symrefs?: boolean; - peelTags?: boolean; -}): Promise<ServerRef[]>; -/** - * List tags - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * - * @returns {Promise<Array<string>>} Resolves successfully with an array of tag names - * - * @example - * let tags = await git.listTags({ fs, dir: '/tutorial' }) - * console.log(tags) - * - */ -export function listTags({ fs, dir, gitdir }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; -}): Promise<string[]>; -/** - * Get commit descriptions from the git history - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref = 'HEAD'] - The commit to begin walking backwards through the history from - * @param {number} [args.depth] - Limit the number of commits returned. No limit by default. - * @param {Date} [args.since] - Return history newer than the given date. Can be combined with `depth` to get whichever is shorter. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Array<ReadCommitResult>>} Resolves to an array of ReadCommitResult objects - * @see ReadCommitResult - * @see CommitObject - * - * @example - * let commits = await git.log({ - * fs, - * dir: '/tutorial', - * depth: 5, - * ref: 'main' - * }) - * console.log(commits) - * - */ -export function log({ fs, dir, gitdir, ref, depth, since, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref?: string; - depth?: number; - since?: Date; - cache?: any; -}): Promise<ReadCommitResult[]>; -/** - * - * @typedef {Object} MergeResult - Returns an object with a schema like this: - * @property {string} [oid] - The SHA-1 object id that is now at the head of the branch. Absent only if `dryRun` was specified and `mergeCommit` is true. - * @property {boolean} [alreadyMerged] - True if the branch was already merged so no changes were made - * @property {boolean} [fastForward] - True if it was a fast-forward merge - * @property {boolean} [mergeCommit] - True if merge resulted in a merge commit - * @property {string} [tree] - The SHA-1 object id of the tree resulting from a merge commit - * - */ -/** - * Merge two branches - * - * ## Limitations - * - * Currently it does not support incomplete merges. That is, if there are merge conflicts it cannot solve - * with the built in diff3 algorithm it will not modify the working dir, and will throw a [`MergeNotSupportedError`](./errors.md#mergenotsupportedError) error. - * - * Currently it will fail if multiple candidate merge bases are found. (It doesn't yet implement the recursive merge strategy.) - * - * Currently it does not support selecting alternative merge strategies. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ours] - The branch receiving the merge. If undefined, defaults to the current branch. - * @param {string} args.theirs - The branch to be merged - * @param {boolean} [args.fastForwardOnly = false] - If true, then non-fast-forward merges will throw an Error instead of performing a merge. - * @param {boolean} [args.dryRun = false] - If true, simulates a merge so you can test whether it would succeed. - * @param {boolean} [args.noUpdateBranch = false] - If true, does not update the branch pointer after creating the commit. - * @param {string} [args.message] - Overrides the default auto-generated merge commit message - * @param {Object} [args.author] - passed to [commit](commit.md) when creating a merge commit - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer] - passed to [commit](commit.md) when creating a merge commit - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - passed to [commit](commit.md) when creating a merge commit - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<MergeResult>} Resolves to a description of the merge operation - * @see MergeResult - * - * @example - * let m = await git.merge({ - * fs, - * dir: '/tutorial', - * ours: 'main', - * theirs: 'remotes/origin/main' - * }) - * console.log(m) - * - */ -export function merge({ fs: _fs, onSign, dir, gitdir, ours, theirs, fastForwardOnly, dryRun, noUpdateBranch, message, author: _author, committer: _committer, signingKey, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - onSign?: SignCallback; - dir?: string; - gitdir?: string; - ours?: string; - theirs: string; - fastForwardOnly?: boolean; - dryRun?: boolean; - noUpdateBranch?: boolean; - message?: string; - author?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - committer?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - signingKey?: string; - cache?: any; -}): Promise<MergeResult>; -/** - * - * @typedef {Object} PackObjectsResult The packObjects command returns an object with two properties: - * @property {string} filename - The suggested filename for the packfile if you want to save it to disk somewhere. It includes the packfile SHA. - * @property {Uint8Array} [packfile] - The packfile contents. Not present if `write` parameter was true, in which case the packfile was written straight to disk. - */ -/** - * Create a packfile from an array of SHA-1 object ids - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string[]} args.oids - An array of SHA-1 object ids to be included in the packfile - * @param {boolean} [args.write = false] - Whether to save the packfile to disk or not - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<PackObjectsResult>} Resolves successfully when the packfile is ready with the filename and buffer - * @see PackObjectsResult - * - * @example - * // Create a packfile containing only an empty tree - * let { packfile } = await git.packObjects({ - * fs, - * dir: '/tutorial', - * oids: ['4b825dc642cb6eb9a060e54bf8d69288fbee4904'] - * }) - * console.log(packfile) - * - */ -export function packObjects({ fs, dir, gitdir, oids, write, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oids: string[]; - write?: boolean; - cache?: any; -}): Promise<PackObjectsResult>; -/** - * Fetch and merge commits from a remote repository - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - Which branch to merge into. By default this is the currently checked out branch. - * @param {string} [args.url] - (Added in 1.1.0) The URL of the remote repository. The default is the value set in the git config for that remote. - * @param {string} [args.remote] - (Added in 1.1.0) If URL is not specified, determines which remote to use. - * @param {string} [args.remoteRef] - (Added in 1.1.0) The name of the branch on the remote to fetch. By default this is the configured remote tracking branch. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch. - * @param {boolean} [args.fastForwardOnly = false] - Only perform simple fast-forward merges. (Don't create merge commits.) - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {Object} [args.author] - The details about the author. - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer = author] - The details about the commit committer, in the same format as the author parameter. If not specified, the author details are used. - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - passed to [commit](commit.md) when creating a merge commit - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when pull operation completes - * - * @example - * await git.pull({ - * fs, - * http, - * dir: '/tutorial', - * ref: 'main', - * singleBranch: true - * }) - * console.log('done') - * - */ -export function pull({ fs: _fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, url, remote, remoteRef, fastForwardOnly, corsProxy, singleBranch, headers, author: _author, committer: _committer, signingKey, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - http: HttpClient; - onProgress?: ProgressCallback; - onMessage?: MessageCallback; - onAuth?: AuthCallback; - onAuthFailure?: AuthFailureCallback; - onAuthSuccess?: AuthSuccessCallback; - dir: string; - gitdir?: string; - ref?: string; - url?: string; - remote?: string; - remoteRef?: string; - corsProxy?: string; - singleBranch?: boolean; - fastForwardOnly?: boolean; - headers?: { - [x: string]: string; - }; - author?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - committer?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - signingKey?: string; - cache?: any; -}): Promise<void>; -/** - * Push a branch or tag - * - * The push command returns an object that describes the result of the attempted push operation. - * *Notes:* If there were no errors, then there will be no `errors` property. There can be a mix of `ok` messages and `errors` messages. - * - * | param | type [= default] | description | - * | ------ | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | ok | Array\<string\> | The first item is "unpack" if the overall operation was successful. The remaining items are the names of refs that were updated successfully. | - * | errors | Array\<string\> | If the overall operation threw and error, the first item will be "unpack {Overall error message}". The remaining items are individual refs that failed to be updated in the format "{ref name} {error message}". | - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - Which branch to push. By default this is the currently checked out branch. - * @param {string} [args.url] - The URL of the remote repository. The default is the value set in the git config for that remote. - * @param {string} [args.remote] - If URL is not specified, determines which remote to use. - * @param {string} [args.remoteRef] - The name of the receiving branch on the remote. By default this is the configured remote tracking branch. - * @param {boolean} [args.force = false] - If true, behaves the same as `git push --force` - * @param {boolean} [args.delete = false] - If true, delete the remote ref - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<PushResult>} Resolves successfully when push completes with a detailed description of the operation from the server. - * @see PushResult - * @see RefUpdateStatus - * - * @example - * let pushResult = await git.push({ - * fs, - * http, - * dir: '/tutorial', - * remote: 'origin', - * ref: 'main', - * onAuth: () => ({ username: process.env.GITHUB_TOKEN }), - * }) - * console.log(pushResult) - * - */ -export function push({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, remoteRef, remote, url, force, delete: _delete, corsProxy, headers, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - http: HttpClient; - onProgress?: ProgressCallback; - onMessage?: MessageCallback; - onAuth?: AuthCallback; - onAuthFailure?: AuthFailureCallback; - onAuthSuccess?: AuthSuccessCallback; - dir?: string; - gitdir?: string; - ref?: string; - url?: string; - remote?: string; - remoteRef?: string; - force?: boolean; - delete?: boolean; - corsProxy?: string; - headers?: { - [x: string]: string; - }; - cache?: any; -}): Promise<PushResult>; -/** - * - * @typedef {Object} ReadBlobResult - The object returned has the following schema: - * @property {string} oid - * @property {Uint8Array} blob - * - */ -/** - * Read a blob object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get. Annotated tags, commits, and trees are peeled. - * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the blob object at that filepath. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadBlobResult>} Resolves successfully with a blob object description - * @see ReadBlobResult - * - * @example - * // Get the contents of 'README.md' in the main branch. - * let commitOid = await git.resolveRef({ fs, dir: '/tutorial', ref: 'main' }) - * console.log(commitOid) - * let { blob } = await git.readBlob({ - * fs, - * dir: '/tutorial', - * oid: commitOid, - * filepath: 'README.md' - * }) - * console.log(Buffer.from(blob).toString('utf8')) - * - */ -export function readBlob({ fs, dir, gitdir, oid, filepath, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oid: string; - filepath?: string; - cache?: any; -}): Promise<ReadBlobResult>; -/** - * Read a commit object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get. Annotated tags are peeled. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadCommitResult>} Resolves successfully with a git commit object - * @see ReadCommitResult - * @see CommitObject - * - * @example - * // Read a commit object - * let sha = await git.resolveRef({ fs, dir: '/tutorial', ref: 'main' }) - * console.log(sha) - * let commit = await git.readCommit({ fs, dir: '/tutorial', oid: sha }) - * console.log(commit) - * - */ -export function readCommit({ fs, dir, gitdir, oid, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oid: string; - cache?: any; -}): Promise<ReadCommitResult>; -/** - * Read the contents of a note - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - The notes ref to look under - * @param {string} args.oid - The SHA-1 object id of the object to get the note for. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Uint8Array>} Resolves successfully with note contents as a Buffer. - */ -export function readNote({ fs, dir, gitdir, ref, oid, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref?: string; - oid: string; - cache?: any; -}): Promise<Uint8Array>; -/** - * - * @typedef {Object} DeflatedObject - * @property {string} oid - * @property {'deflated'} type - * @property {'deflated'} format - * @property {Uint8Array} object - * @property {string} [source] - * - */ -/** - * - * @typedef {Object} WrappedObject - * @property {string} oid - * @property {'wrapped'} type - * @property {'wrapped'} format - * @property {Uint8Array} object - * @property {string} [source] - * - */ -/** - * - * @typedef {Object} RawObject - * @property {string} oid - * @property {'blob'|'commit'|'tree'|'tag'} type - * @property {'content'} format - * @property {Uint8Array} object - * @property {string} [source] - * - */ -/** - * - * @typedef {Object} ParsedBlobObject - * @property {string} oid - * @property {'blob'} type - * @property {'parsed'} format - * @property {string} object - * @property {string} [source] - * - */ -/** - * - * @typedef {Object} ParsedCommitObject - * @property {string} oid - * @property {'commit'} type - * @property {'parsed'} format - * @property {CommitObject} object - * @property {string} [source] - * - */ -/** - * - * @typedef {Object} ParsedTreeObject - * @property {string} oid - * @property {'tree'} type - * @property {'parsed'} format - * @property {TreeObject} object - * @property {string} [source] - * - */ -/** - * - * @typedef {Object} ParsedTagObject - * @property {string} oid - * @property {'tag'} type - * @property {'parsed'} format - * @property {TagObject} object - * @property {string} [source] - * - */ -/** - * - * @typedef {ParsedBlobObject | ParsedCommitObject | ParsedTreeObject | ParsedTagObject} ParsedObject - */ -/** - * - * @typedef {DeflatedObject | WrappedObject | RawObject | ParsedObject } ReadObjectResult - */ -/** - * Read a git object directly by its SHA-1 object id - * - * Regarding `ReadObjectResult`: - * - * - `oid` will be the same as the `oid` argument unless the `filepath` argument is provided, in which case it will be the oid of the tree or blob being returned. - * - `type` of deflated objects is `'deflated'`, and `type` of wrapped objects is `'wrapped'` - * - `format` is usually, but not always, the format you requested. Packfiles do not store each object individually compressed so if you end up reading the object from a packfile it will be returned in format 'content' even if you requested 'deflated' or 'wrapped'. - * - `object` will be an actual Object if format is 'parsed' and the object is a commit, tree, or annotated tag. Blobs are still formatted as Buffers unless an encoding is provided in which case they'll be strings. If format is anything other than 'parsed', object will be a Buffer. - * - `source` is the name of the packfile or loose object file where the object was found. - * - * The `format` parameter can have the following values: - * - * | param | description | - * | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | 'deflated' | Return the raw deflate-compressed buffer for an object if possible. Useful for efficiently shuffling around loose objects when you don't care about the contents and can save time by not inflating them. | - * | 'wrapped' | Return the inflated object buffer wrapped in the git object header if possible. This is the raw data used when calculating the SHA-1 object id of a git object. | - * | 'content' | Return the object buffer without the git header. | - * | 'parsed' | Returns a parsed representation of the object. | - * - * The result will be in one of the following schemas: - * - * ## `'deflated'` format - * - * {@link DeflatedObject typedef} - * - * ## `'wrapped'` format - * - * {@link WrappedObject typedef} - * - * ## `'content'` format - * - * {@link RawObject typedef} - * - * ## `'parsed'` format - * - * ### parsed `'blob'` type - * - * {@link ParsedBlobObject typedef} - * - * ### parsed `'commit'` type - * - * {@link ParsedCommitObject typedef} - * {@link CommitObject typedef} - * - * ### parsed `'tree'` type - * - * {@link ParsedTreeObject typedef} - * {@link TreeObject typedef} - * {@link TreeEntry typedef} - * - * ### parsed `'tag'` type - * - * {@link ParsedTagObject typedef} - * {@link TagObject typedef} - * - * @deprecated - * > This command is overly complicated. - * > - * > If you know the type of object you are reading, use [`readBlob`](./readBlob.md), [`readCommit`](./readCommit.md), [`readTag`](./readTag.md), or [`readTree`](./readTree.md). - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get - * @param {'deflated' | 'wrapped' | 'content' | 'parsed'} [args.format = 'parsed'] - What format to return the object in. The choices are described in more detail below. - * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the object at that filepath. To return the root directory of a tree set filepath to `''` - * @param {string} [args.encoding] - A convenience argument that only affects blobs. Instead of returning `object` as a buffer, it returns a string parsed using the given encoding. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadObjectResult>} Resolves successfully with a git object description - * @see ReadObjectResult - * - * @example - * // Given a ransom SHA-1 object id, figure out what it is - * let { type, object } = await git.readObject({ - * fs, - * dir: '/tutorial', - * oid: '0698a781a02264a6f37ba3ff41d78067eaf0f075' - * }) - * switch (type) { - * case 'commit': { - * console.log(object) - * break - * } - * case 'tree': { - * console.log(object) - * break - * } - * case 'blob': { - * console.log(object) - * break - * } - * case 'tag': { - * console.log(object) - * break - * } - * } - * - */ -export function readObject({ fs: _fs, dir, gitdir, oid, format, filepath, encoding, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oid: string; - format?: "parsed" | "deflated" | "content" | "wrapped"; - filepath?: string; - encoding?: string; - cache?: any; -}): Promise<ParsedBlobObject | ParsedCommitObject | ParsedTreeObject | ParsedTagObject | DeflatedObject | WrappedObject | RawObject>; -/** - * - * @typedef {Object} ReadTagResult - The object returned has the following schema: - * @property {string} oid - SHA-1 object id of this tag - * @property {TagObject} tag - the parsed tag object - * @property {string} payload - PGP signing payload - */ -/** - * Read an annotated tag object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadTagResult>} Resolves successfully with a git object description - * @see ReadTagResult - * @see TagObject - * - */ -export function readTag({ fs, dir, gitdir, oid, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oid: string; - cache?: any; -}): Promise<ReadTagResult>; -/** - * - * @typedef {Object} ReadTreeResult - The object returned has the following schema: - * @property {string} oid - SHA-1 object id of this tree - * @property {TreeObject} tree - the parsed tree object - */ -/** - * Read a tree object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get. Annotated tags and commits are peeled. - * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the tree object at that filepath. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadTreeResult>} Resolves successfully with a git tree object - * @see ReadTreeResult - * @see TreeObject - * @see TreeEntry - * - */ -export function readTree({ fs, dir, gitdir, oid, filepath, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oid: string; - filepath?: string; - cache?: any; -}): Promise<ReadTreeResult>; -/** - * Remove a file from the git index (aka staging area) - * - * Note that this does NOT delete the file in the working directory. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the file to remove from the index - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully once the git index has been updated - * - * @example - * await git.remove({ fs, dir: '/tutorial', filepath: 'README.md' }) - * console.log('done') - * - */ -export function remove({ fs: _fs, dir, gitdir, filepath, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - filepath: string; - cache?: any; -}): Promise<void>; -/** - * Remove an object note - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - The notes ref to look under - * @param {string} args.oid - The SHA-1 object id of the object to remove the note from. - * @param {Object} [args.author] - The details about the author. - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer = author] - The details about the note committer, in the same format as the author parameter. If not specified, the author details are used. - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - Sign the tag object using this private PGP key. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the commit object for the note removal. - */ -export function removeNote({ fs: _fs, onSign, dir, gitdir, ref, oid, author: _author, committer: _committer, signingKey, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - onSign?: SignCallback; - dir?: string; - gitdir?: string; - ref?: string; - oid: string; - author?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - committer?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - signingKey?: string; - cache?: any; -}): Promise<string>; -/** - * Rename a branch - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - What to name the branch - * @param {string} args.oldref - What the name of the branch was - * @param {boolean} [args.checkout = false] - Update `HEAD` to point at the newly created branch - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.renameBranch({ fs, dir: '/tutorial', ref: 'main', oldref: 'master' }) - * console.log('done') - * - */ -export function renameBranch({ fs, dir, gitdir, ref, oldref, checkout, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; - oldref: string; - checkout?: boolean; -}): Promise<void>; -/** - * Reset a file in the git index (aka staging area) - * - * Note that this does NOT modify the file in the working directory. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the file to reset in the index - * @param {string} [args.ref = 'HEAD'] - A ref to the commit to use - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully once the git index has been updated - * - * @example - * await git.resetIndex({ fs, dir: '/tutorial', filepath: 'README.md' }) - * console.log('done') - * - */ -export function resetIndex({ fs: _fs, dir, gitdir, filepath, ref, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - filepath: string; - ref?: string; - cache?: any; -}): Promise<void>; -/** - * Get the value of a symbolic ref or resolve a ref to its SHA-1 object id - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The ref to resolve - * @param {number} [args.depth = undefined] - How many symbolic references to follow before returning - * - * @returns {Promise<string>} Resolves successfully with a SHA-1 object id or the value of a symbolic ref - * - * @example - * let currentCommit = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD' }) - * console.log(currentCommit) - * let currentBranch = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD', depth: 2 }) - * console.log(currentBranch) - * - */ -export function resolveRef({ fs, dir, gitdir, ref, depth, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; - depth?: number; -}): Promise<string>; -/** - * Write an entry to the git config files. - * - * *Caveats:* - * - Currently only the local `$GIT_DIR/config` file can be read or written. However support for the global `~/.gitconfig` and system `$(prefix)/etc/gitconfig` will be added in the future. - * - The current parser does not support the more exotic features of the git-config file format such as `[include]` and `[includeIf]`. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.path - The key of the git config entry - * @param {string | boolean | number | void} args.value - A value to store at that path. (Use `undefined` as the value to delete a config entry.) - * @param {boolean} [args.append = false] - If true, will append rather than replace when setting (use with multi-valued config options). - * - * @returns {Promise<void>} Resolves successfully when operation completed - * - * @example - * // Write config value - * await git.setConfig({ - * fs, - * dir: '/tutorial', - * path: 'user.name', - * value: 'Mr. Test' - * }) - * - * // Print out config file - * let file = await fs.promises.readFile('/tutorial/.git/config', 'utf8') - * console.log(file) - * - * // Delete a config entry - * await git.setConfig({ - * fs, - * dir: '/tutorial', - * path: 'user.name', - * value: undefined - * }) - * - * // Print out config file - * file = await fs.promises.readFile('/tutorial/.git/config', 'utf8') - * console.log(file) - */ -export function setConfig({ fs: _fs, dir, gitdir, path, value, append, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - path: string; - value: string | number | boolean | void; - append?: boolean; -}): Promise<void>; -/** - * Tell whether a file has been changed - * - * The possible resolve values are: - * - * | status | description | - * | --------------------- | ------------------------------------------------------------------------------------- | - * | `"ignored"` | file ignored by a .gitignore rule | - * | `"unmodified"` | file unchanged from HEAD commit | - * | `"*modified"` | file has modifications, not yet staged | - * | `"*deleted"` | file has been removed, but the removal is not yet staged | - * | `"*added"` | file is untracked, not yet staged | - * | `"absent"` | file not present in HEAD commit, staging area, or working dir | - * | `"modified"` | file has modifications, staged | - * | `"deleted"` | file has been removed, staged | - * | `"added"` | previously untracked file, staged | - * | `"*unmodified"` | working dir and HEAD commit match, but index differs | - * | `"*absent"` | file not present in working dir or HEAD commit, but present in the index | - * | `"*undeleted"` | file was deleted from the index, but is still in the working dir | - * | `"*undeletemodified"` | file was deleted from the index, but is present with modifications in the working dir | - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the file to query - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<'ignored'|'unmodified'|'*modified'|'*deleted'|'*added'|'absent'|'modified'|'deleted'|'added'|'*unmodified'|'*absent'|'*undeleted'|'*undeletemodified'>} Resolves successfully with the file's git status - * - * @example - * let status = await git.status({ fs, dir: '/tutorial', filepath: 'README.md' }) - * console.log(status) - * - */ -export function status({ fs: _fs, dir, gitdir, filepath, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir: string; - gitdir?: string; - filepath: string; - cache?: any; -}): Promise<"modified" | "ignored" | "unmodified" | "*modified" | "*deleted" | "*added" | "absent" | "deleted" | "added" | "*unmodified" | "*absent" | "*undeleted" | "*undeletemodified">; -/** - * Efficiently get the status of multiple files at once. - * - * The returned `StatusMatrix` is admittedly not the easiest format to read. - * However it conveys a large amount of information in dense format that should make it easy to create reports about the current state of the repository; - * without having to do multiple, time-consuming isomorphic-git calls. - * My hope is that the speed and flexibility of the function will make up for the learning curve of interpreting the return value. - * - * ```js live - * // get the status of all the files in 'src' - * let status = await git.statusMatrix({ - * fs, - * dir: '/tutorial', - * filter: f => f.startsWith('src/') - * }) - * console.log(status) - * ``` - * - * ```js live - * // get the status of all the JSON and Markdown files - * let status = await git.statusMatrix({ - * fs, - * dir: '/tutorial', - * filter: f => f.endsWith('.json') || f.endsWith('.md') - * }) - * console.log(status) - * ``` - * - * The result is returned as a 2D array. - * The outer array represents the files and/or blobs in the repo, in alphabetical order. - * The inner arrays describe the status of the file: - * the first value is the filepath, and the next three are integers - * representing the HEAD status, WORKDIR status, and STAGE status of the entry. - * - * ```js - * // example StatusMatrix - * [ - * ["a.txt", 0, 2, 0], // new, untracked - * ["b.txt", 0, 2, 2], // added, staged - * ["c.txt", 0, 2, 3], // added, staged, with unstaged changes - * ["d.txt", 1, 1, 1], // unmodified - * ["e.txt", 1, 2, 1], // modified, unstaged - * ["f.txt", 1, 2, 2], // modified, staged - * ["g.txt", 1, 2, 3], // modified, staged, with unstaged changes - * ["h.txt", 1, 0, 1], // deleted, unstaged - * ["i.txt", 1, 0, 0], // deleted, staged - * ] - * ``` - * - * - The HEAD status is either absent (0) or present (1). - * - The WORKDIR status is either absent (0), identical to HEAD (1), or different from HEAD (2). - * - The STAGE status is either absent (0), identical to HEAD (1), identical to WORKDIR (2), or different from WORKDIR (3). - * - * ```ts - * type Filename = string - * type HeadStatus = 0 | 1 - * type WorkdirStatus = 0 | 1 | 2 - * type StageStatus = 0 | 1 | 2 | 3 - * - * type StatusRow = [Filename, HeadStatus, WorkdirStatus, StageStatus] - * - * type StatusMatrix = StatusRow[] - * ``` - * - * > Think of the natural progression of file modifications as being from HEAD (previous) -> WORKDIR (current) -> STAGE (next). - * > Then HEAD is "version 1", WORKDIR is "version 2", and STAGE is "version 3". - * > Then, imagine a "version 0" which is before the file was created. - * > Then the status value in each column corresponds to the oldest version of the file it is identical to. - * > (For a file to be identical to "version 0" means the file is deleted.) - * - * Here are some examples of queries you can answer using the result: - * - * #### Q: What files have been deleted? - * ```js - * const FILE = 0, WORKDIR = 2 - * - * const filenames = (await statusMatrix({ dir })) - * .filter(row => row[WORKDIR] === 0) - * .map(row => row[FILE]) - * ``` - * - * #### Q: What files have unstaged changes? - * ```js - * const FILE = 0, WORKDIR = 2, STAGE = 3 - * - * const filenames = (await statusMatrix({ dir })) - * .filter(row => row[WORKDIR] !== row[STAGE]) - * .map(row => row[FILE]) - * ``` - * - * #### Q: What files have been modified since the last commit? - * ```js - * const FILE = 0, HEAD = 1, WORKDIR = 2 - * - * const filenames = (await statusMatrix({ dir })) - * .filter(row => row[HEAD] !== row[WORKDIR]) - * .map(row => row[FILE]) - * ``` - * - * #### Q: What files will NOT be changed if I commit right now? - * ```js - * const FILE = 0, HEAD = 1, STAGE = 3 - * - * const filenames = (await statusMatrix({ dir })) - * .filter(row => row[HEAD] === row[STAGE]) - * .map(row => row[FILE]) - * ``` - * - * For reference, here are all possible combinations: - * - * | HEAD | WORKDIR | STAGE | `git status --short` equivalent | - * | ---- | ------- | ----- | ------------------------------- | - * | 0 | 0 | 0 | `` | - * | 0 | 0 | 3 | `AD` | - * | 0 | 2 | 0 | `??` | - * | 0 | 2 | 2 | `A ` | - * | 0 | 2 | 3 | `AM` | - * | 1 | 0 | 0 | `D ` | - * | 1 | 0 | 1 | ` D` | - * | 1 | 0 | 3 | `MD` | - * | 1 | 1 | 0 | `D ` + `??` | - * | 1 | 1 | 1 | `` | - * | 1 | 1 | 3 | `MM` | - * | 1 | 2 | 0 | `D ` + `??` | - * | 1 | 2 | 1 | ` M` | - * | 1 | 2 | 2 | `M ` | - * | 1 | 2 | 3 | `MM` | - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref = 'HEAD'] - Optionally specify a different commit to compare against the workdir and stage instead of the HEAD - * @param {string[]} [args.filepaths = ['.']] - Limit the query to the given files and directories - * @param {function(string): boolean} [args.filter] - Filter the results to only those whose filepath matches a function. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Array<StatusRow>>} Resolves with a status matrix, described below. - * @see StatusRow - */ -export function statusMatrix({ fs: _fs, dir, gitdir, ref, filepaths, filter, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir: string; - gitdir?: string; - ref?: string; - filepaths?: string[]; - filter?: (arg0: string) => boolean; - cache?: any; -}): Promise<[string, 0 | 1, 0 | 1 | 2, 0 | 1 | 2 | 3][]>; -/** - * Create a lightweight tag - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - What to name the tag - * @param {string} [args.object = 'HEAD'] - What oid the tag refers to. (Will resolve to oid if value is a ref.) By default, the commit object which is referred by the current `HEAD` is used. - * @param {boolean} [args.force = false] - Instead of throwing an error if a tag named `ref` already exists, overwrite the existing tag. - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.tag({ fs, dir: '/tutorial', ref: 'test-tag' }) - * console.log('done') - * - */ -export function tag({ fs: _fs, dir, gitdir, ref, object, force, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; - object?: string; - force?: boolean; -}): Promise<void>; -/** - * Return the version number of isomorphic-git - * - * I don't know why you might need this. I added it just so I could check that I was getting - * the correct version of the library and not a cached version. - * - * @returns {string} the version string taken from package.json at publication time - * - * @example - * console.log(git.version()) - * - */ -export function version(): string; -/** - * @callback WalkerMap - * @param {string} filename - * @param {Array<WalkerEntry | null>} entries - * @returns {Promise<any>} - */ -/** - * @callback WalkerReduce - * @param {any} parent - * @param {any[]} children - * @returns {Promise<any>} - */ -/** - * @callback WalkerIterateCallback - * @param {WalkerEntry[]} entries - * @returns {Promise<any[]>} - */ -/** - * @callback WalkerIterate - * @param {WalkerIterateCallback} walk - * @param {IterableIterator<WalkerEntry[]>} children - * @returns {Promise<any[]>} - */ -/** - * A powerful recursive tree-walking utility. - * - * The `walk` API simplifies gathering detailed information about a tree or comparing all the filepaths in two or more trees. - * Trees can be git commits, the working directory, or the or git index (staging area). - * As long as a file or directory is present in at least one of the trees, it will be traversed. - * Entries are traversed in alphabetical order. - * - * The arguments to `walk` are the `trees` you want to traverse, and 3 optional transform functions: - * `map`, `reduce`, and `iterate`. - * - * ## `TREE`, `WORKDIR`, and `STAGE` - * - * Tree walkers are represented by three separate functions that can be imported: - * - * ```js - * import { TREE, WORKDIR, STAGE } from 'isomorphic-git' - * ``` - * - * These functions return opaque handles called `Walker`s. - * The only thing that `Walker` objects are good for is passing into `walk`. - * Here are the three `Walker`s passed into `walk` by the `statusMatrix` command for example: - * - * ```js - * let ref = 'HEAD' - * - * let trees = [TREE({ ref }), WORKDIR(), STAGE()] - * ``` - * - * For the arguments, see the doc pages for [TREE](./TREE.md), [WORKDIR](./WORKDIR.md), and [STAGE](./STAGE.md). - * - * `map`, `reduce`, and `iterate` allow you control the recursive walk by pruning and transforming `WalkerEntry`s into the desired result. - * - * ## WalkerEntry - * - * {@link WalkerEntry typedef} - * - * `map` receives an array of `WalkerEntry[]` as its main argument, one `WalkerEntry` for each `Walker` in the `trees` argument. - * The methods are memoized per `WalkerEntry` so calling them multiple times in a `map` function does not adversely impact performance. - * By only computing these values if needed, you build can build lean, mean, efficient walking machines. - * - * ### WalkerEntry#type() - * - * Returns the kind as a string. This is normally either `tree` or `blob`. - * - * `TREE`, `STAGE`, and `WORKDIR` walkers all return a string. - * - * Possible values: - * - * - `'tree'` directory - * - `'blob'` file - * - `'special'` used by `WORKDIR` to represent irregular files like sockets and FIFOs - * - `'commit'` used by `TREE` to represent submodules - * - * ```js - * await entry.type() - * ``` - * - * ### WalkerEntry#mode() - * - * Returns the file mode as a number. Use this to distinguish between regular files, symlinks, and executable files. - * - * `TREE`, `STAGE`, and `WORKDIR` walkers all return a number for all `type`s of entries. - * - * It has been normalized to one of the 4 values that are allowed in git commits: - * - * - `0o40000` directory - * - `0o100644` file - * - `0o100755` file (executable) - * - `0o120000` symlink - * - * Tip: to make modes more readable, you can print them to octal using `.toString(8)`. - * - * ```js - * await entry.mode() - * ``` - * - * ### WalkerEntry#oid() - * - * Returns the SHA-1 object id for blobs and trees. - * - * `TREE` walkers return a string for `blob` and `tree` entries. - * - * `STAGE` and `WORKDIR` walkers return a string for `blob` entries and `undefined` for `tree` entries. - * - * ```js - * await entry.oid() - * ``` - * - * ### WalkerEntry#content() - * - * Returns the file contents as a Buffer. - * - * `TREE` and `WORKDIR` walkers return a Buffer for `blob` entries and `undefined` for `tree` entries. - * - * `STAGE` walkers always return `undefined` since the file contents are never stored in the stage. - * - * ```js - * await entry.content() - * ``` - * - * ### WalkerEntry#stat() - * - * Returns a normalized subset of filesystem Stat data. - * - * `WORKDIR` walkers return a `Stat` for `blob` and `tree` entries. - * - * `STAGE` walkers return a `Stat` for `blob` entries and `undefined` for `tree` entries. - * - * `TREE` walkers return `undefined` for all entry types. - * - * ```js - * await entry.stat() - * ``` - * - * {@link Stat typedef} - * - * ## map(string, Array<WalkerEntry|null>) => Promise<any> - * - * {@link WalkerMap typedef} - * - * This is the function that is called once per entry BEFORE visiting the children of that node. - * - * If you return `null` for a `tree` entry, then none of the children of that `tree` entry will be walked. - * - * This is a good place for query logic, such as examining the contents of a file. - * Ultimately, compare all the entries and return any values you are interested in. - * If you do not return a value (or return undefined) that entry will be filtered from the results. - * - * Example 1: Find all the files containing the word 'foo'. - * ```js - * async function map(filepath, [head, workdir]) { - * let content = (await workdir.content()).toString('utf8') - * if (content.contains('foo')) { - * return { - * filepath, - * content - * } - * } - * } - * ``` - * - * Example 2: Return the difference between the working directory and the HEAD commit - * ```js - * const diff = require('diff-lines') - * async function map(filepath, [head, workdir]) { - * return { - * filepath, - * oid: await head.oid(), - * diff: diff((await head.content()).toString('utf8'), (await workdir.content()).toString('utf8')) - * } - * } - * ``` - * - * Example 3: - * ```js - * let path = require('path') - * // Only examine files in the directory `cwd` - * let cwd = 'src/app' - * async function map (filepath, [head, workdir, stage]) { - * if ( - * // don't skip the root directory - * head.fullpath !== '.' && - * // return true for 'src' and 'src/app' - * !cwd.startsWith(filepath) && - * // return true for 'src/app/*' - * path.dirname(filepath) !== cwd - * ) { - * return null - * } else { - * return filepath - * } - * } - * ``` - * - * ## reduce(parent, children) - * - * {@link WalkerReduce typedef} - * - * This is the function that is called once per entry AFTER visiting the children of that node. - * - * Default: `async (parent, children) => parent === undefined ? children.flat() : [parent, children].flat()` - * - * The default implementation of this function returns all directories and children in a giant flat array. - * You can define a different accumulation method though. - * - * Example: Return a hierarchical structure - * ```js - * async function reduce (parent, children) { - * return Object.assign(parent, { children }) - * } - * ``` - * - * ## iterate(walk, children) - * - * {@link WalkerIterate typedef} - * - * {@link WalkerIterateCallback typedef} - * - * Default: `(walk, children) => Promise.all([...children].map(walk))` - * - * The default implementation recurses all children concurrently using Promise.all. - * However you could use a custom function to traverse children serially or use a global queue to throttle recursion. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {Walker[]} args.trees - The trees you want to traverse - * @param {WalkerMap} [args.map] - Transform `WalkerEntry`s into a result form - * @param {WalkerReduce} [args.reduce] - Control how mapped entries are combined with their parent result - * @param {WalkerIterate} [args.iterate] - Fine-tune how entries within a tree are iterated over - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<any>} The finished tree-walking result - */ -export function walk({ fs, dir, gitdir, trees, map, reduce, iterate, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - trees: Walker[]; - map?: WalkerMap; - reduce?: WalkerReduce; - iterate?: WalkerIterate; - cache?: any; -}): Promise<any>; -/** - * Write a blob object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {Uint8Array} args.blob - The blob object to write - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object - * - * @example - * // Manually create a blob. - * let oid = await git.writeBlob({ - * fs, - * dir: '/tutorial', - * blob: new Uint8Array([]) - * }) - * - * console.log('oid', oid) // should be 'e69de29bb2d1d6434b8b29ae775ad8c2e48c5391' - * - */ -export function writeBlob({ fs, dir, gitdir, blob }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - blob: Uint8Array; -}): Promise<string>; -/** - * Write a commit object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {CommitObject} args.commit - The object to write - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object - * @see CommitObject - * - */ -export function writeCommit({ fs, dir, gitdir, commit, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - commit: CommitObject; -}): Promise<string>; -/** - * Write a git object directly - * - * `format` can have the following values: - * - * | param | description | - * | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | 'deflated' | Treat `object` as the raw deflate-compressed buffer for an object, meaning can be written to `.git/objects/**` as-is. | - * | 'wrapped' | Treat `object` as the inflated object buffer wrapped in the git object header. This is the raw buffer used when calculating the SHA-1 object id of a git object. | - * | 'content' | Treat `object` as the object buffer without the git header. | - * | 'parsed' | Treat `object` as a parsed representation of the object. | - * - * If `format` is `'parsed'`, then `object` must match one of the schemas for `CommitObject`, `TreeObject`, `TagObject`, or a `string` (for blobs). - * - * {@link CommitObject typedef} - * - * {@link TreeObject typedef} - * - * {@link TagObject typedef} - * - * If `format` is `'content'`, `'wrapped'`, or `'deflated'`, `object` should be a `Uint8Array`. - * - * @deprecated - * > This command is overly complicated. - * > - * > If you know the type of object you are writing, use [`writeBlob`](./writeBlob.md), [`writeCommit`](./writeCommit.md), [`writeTag`](./writeTag.md), or [`writeTree`](./writeTree.md). - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string | Uint8Array | CommitObject | TreeObject | TagObject} args.object - The object to write. - * @param {'blob'|'tree'|'commit'|'tag'} [args.type] - The kind of object to write. - * @param {'deflated' | 'wrapped' | 'content' | 'parsed'} [args.format = 'parsed'] - What format the object is in. The possible choices are listed below. - * @param {string} [args.oid] - If `format` is `'deflated'` then this param is required. Otherwise it is calculated. - * @param {string} [args.encoding] - If `type` is `'blob'` then `object` will be converted to a Uint8Array using `encoding`. - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object. - * - * @example - * // Manually create an annotated tag. - * let sha = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD' }) - * console.log('commit', sha) - * - * let oid = await git.writeObject({ - * fs, - * dir: '/tutorial', - * type: 'tag', - * object: { - * object: sha, - * type: 'commit', - * tag: 'my-tag', - * tagger: { - * name: 'your name', - * email: 'email@example.com', - * timestamp: Math.floor(Date.now()/1000), - * timezoneOffset: new Date().getTimezoneOffset() - * }, - * message: 'Optional message' - * } - * }) - * - * console.log('tag', oid) - * - */ -export function writeObject({ fs: _fs, dir, gitdir, type, object, format, oid, encoding, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - object: string | Uint8Array | TreeEntry[] | CommitObject | TagObject; - type?: "blob" | "tree" | "commit" | "tag"; - format?: "parsed" | "deflated" | "content" | "wrapped"; - oid?: string; - encoding?: string; -}): Promise<string>; -/** - * Write a ref which refers to the specified SHA-1 object id, or a symbolic ref which refers to the specified ref. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The name of the ref to write - * @param {string} args.value - When `symbolic` is false, a ref or an SHA-1 object id. When true, a ref starting with `refs/`. - * @param {boolean} [args.force = false] - Instead of throwing an error if a ref named `ref` already exists, overwrite the existing ref. - * @param {boolean} [args.symbolic = false] - Whether the ref is symbolic or not. - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.writeRef({ - * fs, - * dir: '/tutorial', - * ref: 'refs/heads/another-branch', - * value: 'HEAD' - * }) - * await git.writeRef({ - * fs, - * dir: '/tutorial', - * ref: 'HEAD', - * value: 'refs/heads/another-branch', - * force: true, - * symbolic: true - * }) - * console.log('done') - * - */ -export function writeRef({ fs: _fs, dir, gitdir, ref, value, force, symbolic, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; - value: string; - force?: boolean; - symbolic?: boolean; -}): Promise<void>; -/** - * Write an annotated tag object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {TagObject} args.tag - The object to write - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object - * @see TagObject - * - * @example - * // Manually create an annotated tag. - * let sha = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD' }) - * console.log('commit', sha) - * - * let oid = await git.writeTag({ - * fs, - * dir: '/tutorial', - * tag: { - * object: sha, - * type: 'commit', - * tag: 'my-tag', - * tagger: { - * name: 'your name', - * email: 'email@example.com', - * timestamp: Math.floor(Date.now()/1000), - * timezoneOffset: new Date().getTimezoneOffset() - * }, - * message: 'Optional message' - * } - * }) - * - * console.log('tag', oid) - * - */ -export function writeTag({ fs, dir, gitdir, tag }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - tag: TagObject; -}): Promise<string>; -/** - * Write a tree object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {TreeObject} args.tree - The object to write - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object. - * @see TreeObject - * @see TreeEntry - * - */ -export function writeTree({ fs, dir, gitdir, tree }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - tree: TreeEntry[]; -}): Promise<string>; -declare class AlreadyExistsError extends BaseError { - /** - * @param {'note'|'remote'|'tag'|'branch'} noun - * @param {string} where - * @param {boolean} canForce - */ - constructor(noun: "tag" | "remote" | "note" | "branch", where: string, canForce?: boolean); - code: "AlreadyExistsError"; - name: "AlreadyExistsError"; - data: { - noun: "tag" | "remote" | "note" | "branch"; - where: string; - canForce: boolean; - }; -} -declare namespace AlreadyExistsError { - export const code: 'AlreadyExistsError'; -} -declare class AmbiguousError extends BaseError { - /** - * @param {'oids'|'refs'} nouns - * @param {string} short - * @param {string[]} matches - */ - constructor(nouns: "refs" | "oids", short: string, matches: string[]); - code: "AmbiguousError"; - name: "AmbiguousError"; - data: { - nouns: "refs" | "oids"; - short: string; - matches: string[]; - }; -} -declare namespace AmbiguousError { - const code_1: 'AmbiguousError'; - export { code_1 as code }; -} -declare class CheckoutConflictError extends BaseError { - /** - * @param {string[]} filepaths - */ - constructor(filepaths: string[]); - code: "CheckoutConflictError"; - name: "CheckoutConflictError"; - data: { - filepaths: string[]; - }; -} -declare namespace CheckoutConflictError { - const code_2: 'CheckoutConflictError'; - export { code_2 as code }; -} -declare class CommitNotFetchedError extends BaseError { - /** - * @param {string} ref - * @param {string} oid - */ - constructor(ref: string, oid: string); - code: "CommitNotFetchedError"; - name: "CommitNotFetchedError"; - data: { - ref: string; - oid: string; - }; -} -declare namespace CommitNotFetchedError { - const code_3: 'CommitNotFetchedError'; - export { code_3 as code }; -} -declare class EmptyServerResponseError extends BaseError { - code: "EmptyServerResponseError"; - name: "EmptyServerResponseError"; - data: {}; -} -declare namespace EmptyServerResponseError { - const code_4: 'EmptyServerResponseError'; - export { code_4 as code }; -} -declare class FastForwardError extends BaseError { - code: "FastForwardError"; - name: "FastForwardError"; - data: {}; -} -declare namespace FastForwardError { - const code_5: 'FastForwardError'; - export { code_5 as code }; -} -declare class GitPushError extends BaseError { - /** - * @param {string} prettyDetails - * @param {PushResult} result - */ - constructor(prettyDetails: string, result: PushResult); - code: "GitPushError"; - name: "GitPushError"; - data: { - prettyDetails: string; - result: PushResult; - }; -} -declare namespace GitPushError { - const code_6: 'GitPushError'; - export { code_6 as code }; -} -declare class HttpError extends BaseError { - /** - * @param {number} statusCode - * @param {string} statusMessage - * @param {string} response - */ - constructor(statusCode: number, statusMessage: string, response: string); - code: "HttpError"; - name: "HttpError"; - data: { - statusCode: number; - statusMessage: string; - response: string; - }; -} -declare namespace HttpError { - const code_7: 'HttpError'; - export { code_7 as code }; -} -declare class InternalError extends BaseError { - /** - * @param {string} message - */ - constructor(message: string); - code: "InternalError"; - name: "InternalError"; - data: { - message: string; - }; -} -declare namespace InternalError { - const code_8: 'InternalError'; - export { code_8 as code }; -} -declare class InvalidFilepathError extends BaseError { - /** - * @param {'leading-slash'|'trailing-slash'} [reason] - */ - constructor(reason?: "leading-slash" | "trailing-slash" | undefined); - code: "InvalidFilepathError"; - name: "InvalidFilepathError"; - data: { - reason: "leading-slash" | "trailing-slash" | undefined; - }; -} -declare namespace InvalidFilepathError { - const code_9: 'InvalidFilepathError'; - export { code_9 as code }; -} -declare class InvalidOidError extends BaseError { - /** - * @param {string} value - */ - constructor(value: string); - code: "InvalidOidError"; - name: "InvalidOidError"; - data: { - value: string; - }; -} -declare namespace InvalidOidError { - const code_10: 'InvalidOidError'; - export { code_10 as code }; -} -declare class InvalidRefNameError extends BaseError { - /** - * @param {string} ref - * @param {string} suggestion - * @param {boolean} canForce - */ - constructor(ref: string, suggestion: string); - code: "InvalidRefNameError"; - name: "InvalidRefNameError"; - data: { - ref: string; - suggestion: string; - }; -} -declare namespace InvalidRefNameError { - const code_11: 'InvalidRefNameError'; - export { code_11 as code }; -} -declare class MaxDepthError extends BaseError { - /** - * @param {number} depth - */ - constructor(depth: number); - code: "MaxDepthError"; - name: "MaxDepthError"; - data: { - depth: number; - }; -} -declare namespace MaxDepthError { - const code_12: 'MaxDepthError'; - export { code_12 as code }; -} -declare class MergeNotSupportedError extends BaseError { - code: "MergeNotSupportedError"; - name: "MergeNotSupportedError"; - data: {}; -} -declare namespace MergeNotSupportedError { - const code_13: 'MergeNotSupportedError'; - export { code_13 as code }; -} -declare class MissingNameError extends BaseError { - /** - * @param {'author'|'committer'|'tagger'} role - */ - constructor(role: "author" | "committer" | "tagger"); - code: "MissingNameError"; - name: "MissingNameError"; - data: { - role: "author" | "committer" | "tagger"; - }; -} -declare namespace MissingNameError { - const code_14: 'MissingNameError'; - export { code_14 as code }; -} -declare class MissingParameterError extends BaseError { - /** - * @param {string} parameter - */ - constructor(parameter: string); - code: "MissingParameterError"; - name: "MissingParameterError"; - data: { - parameter: string; - }; -} -declare namespace MissingParameterError { - const code_15: 'MissingParameterError'; - export { code_15 as code }; -} -declare class NoRefspecError extends BaseError { - /** - * @param {string} remote - */ - constructor(remote: string); - code: "NoRefspecError"; - name: "NoRefspecError"; - data: { - remote: string; - }; -} -declare namespace NoRefspecError { - const code_16: 'NoRefspecError'; - export { code_16 as code }; -} -declare class NotFoundError extends BaseError { - /** - * @param {string} what - */ - constructor(what: string); - code: "NotFoundError"; - name: "NotFoundError"; - data: { - what: string; - }; -} -declare namespace NotFoundError { - const code_17: 'NotFoundError'; - export { code_17 as code }; -} -declare class ObjectTypeError extends BaseError { - /** - * @param {string} oid - * @param {'blob'|'commit'|'tag'|'tree'} actual - * @param {'blob'|'commit'|'tag'|'tree'} expected - * @param {string} [filepath] - */ - constructor(oid: string, actual: "blob" | "tree" | "commit" | "tag", expected: "blob" | "tree" | "commit" | "tag", filepath?: string | undefined); - code: "ObjectTypeError"; - name: "ObjectTypeError"; - data: { - oid: string; - actual: "blob" | "tree" | "commit" | "tag"; - expected: "blob" | "tree" | "commit" | "tag"; - filepath: string | undefined; - }; -} -declare namespace ObjectTypeError { - const code_18: 'ObjectTypeError'; - export { code_18 as code }; -} -declare class ParseError extends BaseError { - /** - * @param {string} expected - * @param {string} actual - */ - constructor(expected: string, actual: string); - code: "ParseError"; - name: "ParseError"; - data: { - expected: string; - actual: string; - }; -} -declare namespace ParseError { - const code_19: 'ParseError'; - export { code_19 as code }; -} -declare class PushRejectedError extends BaseError { - /** - * @param {'not-fast-forward'|'tag-exists'} reason - */ - constructor(reason: "not-fast-forward" | "tag-exists"); - code: "PushRejectedError"; - name: "PushRejectedError"; - data: { - reason: "not-fast-forward" | "tag-exists"; - }; -} -declare namespace PushRejectedError { - const code_20: 'PushRejectedError'; - export { code_20 as code }; -} -declare class RemoteCapabilityError extends BaseError { - /** - * @param {'shallow'|'deepen-since'|'deepen-not'|'deepen-relative'} capability - * @param {'depth'|'since'|'exclude'|'relative'} parameter - */ - constructor(capability: "shallow" | "deepen-since" | "deepen-not" | "deepen-relative", parameter: "depth" | "since" | "exclude" | "relative"); - code: "RemoteCapabilityError"; - name: "RemoteCapabilityError"; - data: { - capability: "shallow" | "deepen-since" | "deepen-not" | "deepen-relative"; - parameter: "depth" | "since" | "exclude" | "relative"; - }; -} -declare namespace RemoteCapabilityError { - const code_21: 'RemoteCapabilityError'; - export { code_21 as code }; -} -declare class SmartHttpError extends BaseError { - /** - * @param {string} preview - * @param {string} response - */ - constructor(preview: string, response: string); - code: "SmartHttpError"; - name: "SmartHttpError"; - data: { - preview: string; - response: string; - }; -} -declare namespace SmartHttpError { - const code_22: 'SmartHttpError'; - export { code_22 as code }; -} -declare class UnknownTransportError extends BaseError { - /** - * @param {string} url - * @param {string} transport - * @param {string} suggestion - */ - constructor(url: string, transport: string, suggestion: string); - code: "UnknownTransportError"; - name: "UnknownTransportError"; - data: { - url: string; - transport: string; - suggestion: string; - }; -} -declare namespace UnknownTransportError { - const code_23: 'UnknownTransportError'; - export { code_23 as code }; -} -declare class UnsafeFilepathError extends BaseError { - /** - * @param {string} filepath - */ - constructor(filepath: string); - code: "UnsafeFilepathError"; - name: "UnsafeFilepathError"; - data: { - filepath: string; - }; -} -declare namespace UnsafeFilepathError { - const code_24: 'UnsafeFilepathError'; - export { code_24 as code }; -} -declare class UrlParseError extends BaseError { - /** - * @param {string} url - */ - constructor(url: string); - code: "UrlParseError"; - name: "UrlParseError"; - data: { - url: string; - }; -} -declare namespace UrlParseError { - const code_25: 'UrlParseError'; - export { code_25 as code }; -} -declare class UserCanceledError extends BaseError { - code: "UserCanceledError"; - name: "UserCanceledError"; - data: {}; -} -declare namespace UserCanceledError { - const code_26: 'UserCanceledError'; - export { code_26 as code }; -} -/** - * @typedef {Object} GitProgressEvent - * @property {string} phase - * @property {number} loaded - * @property {number} total - */ -/** - * @callback ProgressCallback - * @param {GitProgressEvent} progress - * @returns {void | Promise<void>} - */ -/** - * @typedef {Object} GitHttpRequest - * @property {string} url - The URL to request - * @property {string} [method='GET'] - The HTTP method to use - * @property {Object<string, string>} [headers={}] - Headers to include in the HTTP request - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of POST requests - * @property {ProgressCallback} [onProgress] - Reserved for future use (emitting `GitProgressEvent`s) - * @property {object} [signal] - Reserved for future use (canceling a request) - */ -/** - * @typedef {Object} GitHttpResponse - * @property {string} url - The final URL that was fetched after any redirects - * @property {string} [method] - The HTTP method that was used - * @property {Object<string, string>} [headers] - HTTP response headers - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of the response - * @property {number} statusCode - The HTTP status code - * @property {string} statusMessage - The HTTP status message - */ -/** - * @callback HttpFetch - * @param {GitHttpRequest} request - * @returns {Promise<GitHttpResponse>} - */ -/** - * @typedef {Object} HttpClient - * @property {HttpFetch} request - */ -/** - * A git commit object. - * - * @typedef {Object} CommitObject - * @property {string} message Commit message - * @property {string} tree SHA-1 object id of corresponding file tree - * @property {string[]} parent an array of zero or more SHA-1 object ids - * @property {Object} author - * @property {string} author.name The author's name - * @property {string} author.email The author's email - * @property {number} author.timestamp UTC Unix timestamp in seconds - * @property {number} author.timezoneOffset Timezone difference from UTC in minutes - * @property {Object} committer - * @property {string} committer.name The committer's name - * @property {string} committer.email The committer's email - * @property {number} committer.timestamp UTC Unix timestamp in seconds - * @property {number} committer.timezoneOffset Timezone difference from UTC in minutes - * @property {string} [gpgsig] PGP signature (if present) - */ -/** - * An entry from a git tree object. Files are called 'blobs' and directories are called 'trees'. - * - * @typedef {Object} TreeEntry - * @property {string} mode the 6 digit hexadecimal mode - * @property {string} path the name of the file or directory - * @property {string} oid the SHA-1 object id of the blob or tree - * @property {'commit'|'blob'|'tree'} type the type of object - */ -/** - * A git tree object. Trees represent a directory snapshot. - * - * @typedef {TreeEntry[]} TreeObject - */ -/** - * A git annotated tag object. - * - * @typedef {Object} TagObject - * @property {string} object SHA-1 object id of object being tagged - * @property {'blob' | 'tree' | 'commit' | 'tag'} type the type of the object being tagged - * @property {string} tag the tag name - * @property {Object} tagger - * @property {string} tagger.name the tagger's name - * @property {string} tagger.email the tagger's email - * @property {number} tagger.timestamp UTC Unix timestamp in seconds - * @property {number} tagger.timezoneOffset timezone difference from UTC in minutes - * @property {string} message tag message - * @property {string} [gpgsig] PGP signature (if present) - */ -/** - * @typedef {Object} ReadCommitResult - * @property {string} oid - SHA-1 object id of this commit - * @property {CommitObject} commit - the parsed commit object - * @property {string} payload - PGP signing payload - */ -/** - * @typedef {Object} ServerRef - This object has the following schema: - * @property {string} ref - The name of the ref - * @property {string} oid - The SHA-1 object id the ref points to - * @property {string} [target] - The target ref pointed to by a symbolic ref - * @property {string} [peeled] - If the oid is the SHA-1 object id of an annotated tag, this is the SHA-1 object id that the annotated tag points to - */ -/** - * @typedef Walker - * @property {Symbol} Symbol('GitWalkerSymbol') - */ -/** - * Normalized subset of filesystem `stat` data: - * - * @typedef {Object} Stat - * @property {number} ctimeSeconds - * @property {number} ctimeNanoseconds - * @property {number} mtimeSeconds - * @property {number} mtimeNanoseconds - * @property {number} dev - * @property {number} ino - * @property {number} mode - * @property {number} uid - * @property {number} gid - * @property {number} size - */ -/** - * The `WalkerEntry` is an interface that abstracts computing many common tree / blob stats. - * - * @typedef {Object} WalkerEntry - * @property {function(): Promise<'tree'|'blob'|'special'|'commit'>} type - * @property {function(): Promise<number>} mode - * @property {function(): Promise<string>} oid - * @property {function(): Promise<Uint8Array|void>} content - * @property {function(): Promise<Stat>} stat - */ -/** - * @typedef {Object} CallbackFsClient - * @property {function} readFile - https://nodejs.org/api/fs.html#fs_fs_readfile_path_options_callback - * @property {function} writeFile - https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback - * @property {function} unlink - https://nodejs.org/api/fs.html#fs_fs_unlink_path_callback - * @property {function} readdir - https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback - * @property {function} mkdir - https://nodejs.org/api/fs.html#fs_fs_mkdir_path_mode_callback - * @property {function} rmdir - https://nodejs.org/api/fs.html#fs_fs_rmdir_path_callback - * @property {function} stat - https://nodejs.org/api/fs.html#fs_fs_stat_path_options_callback - * @property {function} lstat - https://nodejs.org/api/fs.html#fs_fs_lstat_path_options_callback - * @property {function} [readlink] - https://nodejs.org/api/fs.html#fs_fs_readlink_path_options_callback - * @property {function} [symlink] - https://nodejs.org/api/fs.html#fs_fs_symlink_target_path_type_callback - * @property {function} [chmod] - https://nodejs.org/api/fs.html#fs_fs_chmod_path_mode_callback - */ -/** - * @typedef {Object} PromiseFsClient - * @property {Object} promises - * @property {function} promises.readFile - https://nodejs.org/api/fs.html#fs_fspromises_readfile_path_options - * @property {function} promises.writeFile - https://nodejs.org/api/fs.html#fs_fspromises_writefile_file_data_options - * @property {function} promises.unlink - https://nodejs.org/api/fs.html#fs_fspromises_unlink_path - * @property {function} promises.readdir - https://nodejs.org/api/fs.html#fs_fspromises_readdir_path_options - * @property {function} promises.mkdir - https://nodejs.org/api/fs.html#fs_fspromises_mkdir_path_options - * @property {function} promises.rmdir - https://nodejs.org/api/fs.html#fs_fspromises_rmdir_path - * @property {function} promises.stat - https://nodejs.org/api/fs.html#fs_fspromises_stat_path_options - * @property {function} promises.lstat - https://nodejs.org/api/fs.html#fs_fspromises_lstat_path_options - * @property {function} [promises.readlink] - https://nodejs.org/api/fs.html#fs_fspromises_readlink_path_options - * @property {function} [promises.symlink] - https://nodejs.org/api/fs.html#fs_fspromises_symlink_target_path_type - * @property {function} [promises.chmod] - https://nodejs.org/api/fs.html#fs_fspromises_chmod_path_mode - */ -/** - * @typedef {CallbackFsClient | PromiseFsClient} FsClient - */ -/** - * @callback MessageCallback - * @param {string} message - * @returns {void | Promise<void>} - */ -/** - * @typedef {Object} GitAuth - * @property {string} [username] - * @property {string} [password] - * @property {Object<string, string>} [headers] - * @property {boolean} [cancel] Tells git to throw a `UserCanceledError` (instead of an `HttpError`). - */ -/** - * @callback AuthCallback - * @param {string} url - * @param {GitAuth} auth Might have some values if the URL itself originally contained a username or password. - * @returns {GitAuth | void | Promise<GitAuth | void>} - */ -/** - * @callback AuthFailureCallback - * @param {string} url - * @param {GitAuth} auth The credentials that failed - * @returns {GitAuth | void | Promise<GitAuth | void>} - */ -/** - * @callback AuthSuccessCallback - * @param {string} url - * @param {GitAuth} auth - * @returns {void | Promise<void>} - */ -/** - * @typedef {Object} SignParams - * @property {string} payload - a plaintext message - * @property {string} secretKey - an 'ASCII armor' encoded PGP key (technically can actually contain _multiple_ keys) - */ -/** - * @callback SignCallback - * @param {SignParams} args - * @return {{signature: string} | Promise<{signature: string}>} - an 'ASCII armor' encoded "detached" signature - */ -/** - * @callback WalkerMap - * @param {string} filename - * @param {WalkerEntry[]} entries - * @returns {Promise<any>} - */ -/** - * @callback WalkerReduce - * @param {any} parent - * @param {any[]} children - * @returns {Promise<any>} - */ -/** - * @callback WalkerIterateCallback - * @param {WalkerEntry[]} entries - * @returns {Promise<any[]>} - */ -/** - * @callback WalkerIterate - * @param {WalkerIterateCallback} walk - * @param {IterableIterator<WalkerEntry[]>} children - * @returns {Promise<any[]>} - */ -/** - * @typedef {Object} RefUpdateStatus - * @property {boolean} ok - * @property {string} error - */ -/** - * @typedef {Object} PushResult - * @property {boolean} ok - * @property {?string} error - * @property {Object<string, RefUpdateStatus>} refs - * @property {Object<string, string>} [headers] - */ -/** - * @typedef {0|1} HeadStatus - */ -/** - * @typedef {0|1|2} WorkdirStatus - */ -/** - * @typedef {0|1|2|3} StageStatus - */ -/** - * @typedef {[string, HeadStatus, WorkdirStatus, StageStatus]} StatusRow - */ -declare class BaseError extends Error { - constructor(message: any); - caller: string; - toJSON(): { - code: any; - data: any; - caller: string; - message: string; - stack: string | undefined; - }; - fromJSON(json: any): BaseError; - get isIsomorphicGitError(): boolean; -} diff --git a/node_modules/isomorphic-git/index.js b/node_modules/isomorphic-git/index.js deleted file mode 100644 index 32f61ff0..00000000 --- a/node_modules/isomorphic-git/index.js +++ /dev/null @@ -1,13921 +0,0 @@ -import AsyncLock from 'async-lock'; -import Hash from 'sha.js/sha1.js'; -import crc32 from 'crc-32'; -import pako from 'pako'; -import ignore from 'ignore'; -import pify from 'pify'; -import cleanGitRef from 'clean-git-ref'; -import diff3Merge from 'diff3'; - -/** - * @typedef {Object} GitProgressEvent - * @property {string} phase - * @property {number} loaded - * @property {number} total - */ - -/** - * @callback ProgressCallback - * @param {GitProgressEvent} progress - * @returns {void | Promise<void>} - */ - -/** - * @typedef {Object} GitHttpRequest - * @property {string} url - The URL to request - * @property {string} [method='GET'] - The HTTP method to use - * @property {Object<string, string>} [headers={}] - Headers to include in the HTTP request - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of POST requests - * @property {ProgressCallback} [onProgress] - Reserved for future use (emitting `GitProgressEvent`s) - * @property {object} [signal] - Reserved for future use (canceling a request) - */ - -/** - * @typedef {Object} GitHttpResponse - * @property {string} url - The final URL that was fetched after any redirects - * @property {string} [method] - The HTTP method that was used - * @property {Object<string, string>} [headers] - HTTP response headers - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of the response - * @property {number} statusCode - The HTTP status code - * @property {string} statusMessage - The HTTP status message - */ - -/** - * @callback HttpFetch - * @param {GitHttpRequest} request - * @returns {Promise<GitHttpResponse>} - */ - -/** - * @typedef {Object} HttpClient - * @property {HttpFetch} request - */ - -/** - * A git commit object. - * - * @typedef {Object} CommitObject - * @property {string} message Commit message - * @property {string} tree SHA-1 object id of corresponding file tree - * @property {string[]} parent an array of zero or more SHA-1 object ids - * @property {Object} author - * @property {string} author.name The author's name - * @property {string} author.email The author's email - * @property {number} author.timestamp UTC Unix timestamp in seconds - * @property {number} author.timezoneOffset Timezone difference from UTC in minutes - * @property {Object} committer - * @property {string} committer.name The committer's name - * @property {string} committer.email The committer's email - * @property {number} committer.timestamp UTC Unix timestamp in seconds - * @property {number} committer.timezoneOffset Timezone difference from UTC in minutes - * @property {string} [gpgsig] PGP signature (if present) - */ - -/** - * An entry from a git tree object. Files are called 'blobs' and directories are called 'trees'. - * - * @typedef {Object} TreeEntry - * @property {string} mode the 6 digit hexadecimal mode - * @property {string} path the name of the file or directory - * @property {string} oid the SHA-1 object id of the blob or tree - * @property {'commit'|'blob'|'tree'} type the type of object - */ - -/** - * A git tree object. Trees represent a directory snapshot. - * - * @typedef {TreeEntry[]} TreeObject - */ - -/** - * A git annotated tag object. - * - * @typedef {Object} TagObject - * @property {string} object SHA-1 object id of object being tagged - * @property {'blob' | 'tree' | 'commit' | 'tag'} type the type of the object being tagged - * @property {string} tag the tag name - * @property {Object} tagger - * @property {string} tagger.name the tagger's name - * @property {string} tagger.email the tagger's email - * @property {number} tagger.timestamp UTC Unix timestamp in seconds - * @property {number} tagger.timezoneOffset timezone difference from UTC in minutes - * @property {string} message tag message - * @property {string} [gpgsig] PGP signature (if present) - */ - -/** - * @typedef {Object} ReadCommitResult - * @property {string} oid - SHA-1 object id of this commit - * @property {CommitObject} commit - the parsed commit object - * @property {string} payload - PGP signing payload - */ - -/** - * @typedef {Object} ServerRef - This object has the following schema: - * @property {string} ref - The name of the ref - * @property {string} oid - The SHA-1 object id the ref points to - * @property {string} [target] - The target ref pointed to by a symbolic ref - * @property {string} [peeled] - If the oid is the SHA-1 object id of an annotated tag, this is the SHA-1 object id that the annotated tag points to - */ - -/** - * @typedef Walker - * @property {Symbol} Symbol('GitWalkerSymbol') - */ - -/** - * Normalized subset of filesystem `stat` data: - * - * @typedef {Object} Stat - * @property {number} ctimeSeconds - * @property {number} ctimeNanoseconds - * @property {number} mtimeSeconds - * @property {number} mtimeNanoseconds - * @property {number} dev - * @property {number} ino - * @property {number} mode - * @property {number} uid - * @property {number} gid - * @property {number} size - */ - -/** - * The `WalkerEntry` is an interface that abstracts computing many common tree / blob stats. - * - * @typedef {Object} WalkerEntry - * @property {function(): Promise<'tree'|'blob'|'special'|'commit'>} type - * @property {function(): Promise<number>} mode - * @property {function(): Promise<string>} oid - * @property {function(): Promise<Uint8Array|void>} content - * @property {function(): Promise<Stat>} stat - */ - -/** - * @typedef {Object} CallbackFsClient - * @property {function} readFile - https://nodejs.org/api/fs.html#fs_fs_readfile_path_options_callback - * @property {function} writeFile - https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback - * @property {function} unlink - https://nodejs.org/api/fs.html#fs_fs_unlink_path_callback - * @property {function} readdir - https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback - * @property {function} mkdir - https://nodejs.org/api/fs.html#fs_fs_mkdir_path_mode_callback - * @property {function} rmdir - https://nodejs.org/api/fs.html#fs_fs_rmdir_path_callback - * @property {function} stat - https://nodejs.org/api/fs.html#fs_fs_stat_path_options_callback - * @property {function} lstat - https://nodejs.org/api/fs.html#fs_fs_lstat_path_options_callback - * @property {function} [readlink] - https://nodejs.org/api/fs.html#fs_fs_readlink_path_options_callback - * @property {function} [symlink] - https://nodejs.org/api/fs.html#fs_fs_symlink_target_path_type_callback - * @property {function} [chmod] - https://nodejs.org/api/fs.html#fs_fs_chmod_path_mode_callback - */ - -/** - * @typedef {Object} PromiseFsClient - * @property {Object} promises - * @property {function} promises.readFile - https://nodejs.org/api/fs.html#fs_fspromises_readfile_path_options - * @property {function} promises.writeFile - https://nodejs.org/api/fs.html#fs_fspromises_writefile_file_data_options - * @property {function} promises.unlink - https://nodejs.org/api/fs.html#fs_fspromises_unlink_path - * @property {function} promises.readdir - https://nodejs.org/api/fs.html#fs_fspromises_readdir_path_options - * @property {function} promises.mkdir - https://nodejs.org/api/fs.html#fs_fspromises_mkdir_path_options - * @property {function} promises.rmdir - https://nodejs.org/api/fs.html#fs_fspromises_rmdir_path - * @property {function} promises.stat - https://nodejs.org/api/fs.html#fs_fspromises_stat_path_options - * @property {function} promises.lstat - https://nodejs.org/api/fs.html#fs_fspromises_lstat_path_options - * @property {function} [promises.readlink] - https://nodejs.org/api/fs.html#fs_fspromises_readlink_path_options - * @property {function} [promises.symlink] - https://nodejs.org/api/fs.html#fs_fspromises_symlink_target_path_type - * @property {function} [promises.chmod] - https://nodejs.org/api/fs.html#fs_fspromises_chmod_path_mode - */ - -/** - * @typedef {CallbackFsClient | PromiseFsClient} FsClient - */ - -/** - * @callback MessageCallback - * @param {string} message - * @returns {void | Promise<void>} - */ - -/** - * @typedef {Object} GitAuth - * @property {string} [username] - * @property {string} [password] - * @property {Object<string, string>} [headers] - * @property {boolean} [cancel] Tells git to throw a `UserCanceledError` (instead of an `HttpError`). - */ - -/** - * @callback AuthCallback - * @param {string} url - * @param {GitAuth} auth Might have some values if the URL itself originally contained a username or password. - * @returns {GitAuth | void | Promise<GitAuth | void>} - */ - -/** - * @callback AuthFailureCallback - * @param {string} url - * @param {GitAuth} auth The credentials that failed - * @returns {GitAuth | void | Promise<GitAuth | void>} - */ - -/** - * @callback AuthSuccessCallback - * @param {string} url - * @param {GitAuth} auth - * @returns {void | Promise<void>} - */ - -/** - * @typedef {Object} SignParams - * @property {string} payload - a plaintext message - * @property {string} secretKey - an 'ASCII armor' encoded PGP key (technically can actually contain _multiple_ keys) - */ - -/** - * @callback SignCallback - * @param {SignParams} args - * @return {{signature: string} | Promise<{signature: string}>} - an 'ASCII armor' encoded "detached" signature - */ - -/** - * @callback WalkerMap - * @param {string} filename - * @param {WalkerEntry[]} entries - * @returns {Promise<any>} - */ - -/** - * @callback WalkerReduce - * @param {any} parent - * @param {any[]} children - * @returns {Promise<any>} - */ - -/** - * @callback WalkerIterateCallback - * @param {WalkerEntry[]} entries - * @returns {Promise<any[]>} - */ - -/** - * @callback WalkerIterate - * @param {WalkerIterateCallback} walk - * @param {IterableIterator<WalkerEntry[]>} children - * @returns {Promise<any[]>} - */ - -/** - * @typedef {Object} RefUpdateStatus - * @property {boolean} ok - * @property {string} error - */ - -/** - * @typedef {Object} PushResult - * @property {boolean} ok - * @property {?string} error - * @property {Object<string, RefUpdateStatus>} refs - * @property {Object<string, string>} [headers] - */ - -/** - * @typedef {0|1} HeadStatus - */ - -/** - * @typedef {0|1|2} WorkdirStatus - */ - -/** - * @typedef {0|1|2|3} StageStatus - */ - -/** - * @typedef {[string, HeadStatus, WorkdirStatus, StageStatus]} StatusRow - */ - -class BaseError extends Error { - constructor(message) { - super(message); - // Setting this here allows TS to infer that all git errors have a `caller` property and - // that its type is string. - this.caller = ''; - } - - toJSON() { - // Error objects aren't normally serializable. So we do something about that. - return { - code: this.code, - data: this.data, - caller: this.caller, - message: this.message, - stack: this.stack, - } - } - - fromJSON(json) { - const e = new BaseError(json.message); - e.code = json.code; - e.data = json.data; - e.caller = json.caller; - e.stack = json.stack; - return e - } - - get isIsomorphicGitError() { - return true - } -} - -class InternalError extends BaseError { - /** - * @param {string} message - */ - constructor(message) { - super( - `An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${message}` - ); - this.code = this.name = InternalError.code; - this.data = { message }; - } -} -/** @type {'InternalError'} */ -InternalError.code = 'InternalError'; - -class UnsafeFilepathError extends BaseError { - /** - * @param {string} filepath - */ - constructor(filepath) { - super(`The filepath "${filepath}" contains unsafe character sequences`); - this.code = this.name = UnsafeFilepathError.code; - this.data = { filepath }; - } -} -/** @type {'UnsafeFilepathError'} */ -UnsafeFilepathError.code = 'UnsafeFilepathError'; - -// Modeled after https://github.com/tjfontaine/node-buffercursor -// but with the goal of being much lighter weight. -class BufferCursor { - constructor(buffer) { - this.buffer = buffer; - this._start = 0; - } - - eof() { - return this._start >= this.buffer.length - } - - tell() { - return this._start - } - - seek(n) { - this._start = n; - } - - slice(n) { - const r = this.buffer.slice(this._start, this._start + n); - this._start += n; - return r - } - - toString(enc, length) { - const r = this.buffer.toString(enc, this._start, this._start + length); - this._start += length; - return r - } - - write(value, length, enc) { - const r = this.buffer.write(value, this._start, length, enc); - this._start += length; - return r - } - - copy(source, start, end) { - const r = source.copy(this.buffer, this._start, start, end); - this._start += r; - return r - } - - readUInt8() { - const r = this.buffer.readUInt8(this._start); - this._start += 1; - return r - } - - writeUInt8(value) { - const r = this.buffer.writeUInt8(value, this._start); - this._start += 1; - return r - } - - readUInt16BE() { - const r = this.buffer.readUInt16BE(this._start); - this._start += 2; - return r - } - - writeUInt16BE(value) { - const r = this.buffer.writeUInt16BE(value, this._start); - this._start += 2; - return r - } - - readUInt32BE() { - const r = this.buffer.readUInt32BE(this._start); - this._start += 4; - return r - } - - writeUInt32BE(value) { - const r = this.buffer.writeUInt32BE(value, this._start); - this._start += 4; - return r - } -} - -function compareStrings(a, b) { - // https://stackoverflow.com/a/40355107/2168416 - return -(a < b) || +(a > b) -} - -function comparePath(a, b) { - // https://stackoverflow.com/a/40355107/2168416 - return compareStrings(a.path, b.path) -} - -/** - * From https://github.com/git/git/blob/master/Documentation/technical/index-format.txt - * - * 32-bit mode, split into (high to low bits) - * - * 4-bit object type - * valid values in binary are 1000 (regular file), 1010 (symbolic link) - * and 1110 (gitlink) - * - * 3-bit unused - * - * 9-bit unix permission. Only 0755 and 0644 are valid for regular files. - * Symbolic links and gitlinks have value 0 in this field. - */ -function normalizeMode(mode) { - // Note: BrowserFS will use -1 for "unknown" - // I need to make it non-negative for these bitshifts to work. - let type = mode > 0 ? mode >> 12 : 0; - // If it isn't valid, assume it as a "regular file" - // 0100 = directory - // 1000 = regular file - // 1010 = symlink - // 1110 = gitlink - if ( - type !== 0b0100 && - type !== 0b1000 && - type !== 0b1010 && - type !== 0b1110 - ) { - type = 0b1000; - } - let permissions = mode & 0o777; - // Is the file executable? then 755. Else 644. - if (permissions & 0b001001001) { - permissions = 0o755; - } else { - permissions = 0o644; - } - // If it's not a regular file, scrub all permissions - if (type !== 0b1000) permissions = 0; - return (type << 12) + permissions -} - -const MAX_UINT32 = 2 ** 32; - -function SecondsNanoseconds( - givenSeconds, - givenNanoseconds, - milliseconds, - date -) { - if (givenSeconds !== undefined && givenNanoseconds !== undefined) { - return [givenSeconds, givenNanoseconds] - } - if (milliseconds === undefined) { - milliseconds = date.valueOf(); - } - const seconds = Math.floor(milliseconds / 1000); - const nanoseconds = (milliseconds - seconds * 1000) * 1000000; - return [seconds, nanoseconds] -} - -function normalizeStats(e) { - const [ctimeSeconds, ctimeNanoseconds] = SecondsNanoseconds( - e.ctimeSeconds, - e.ctimeNanoseconds, - e.ctimeMs, - e.ctime - ); - const [mtimeSeconds, mtimeNanoseconds] = SecondsNanoseconds( - e.mtimeSeconds, - e.mtimeNanoseconds, - e.mtimeMs, - e.mtime - ); - - return { - ctimeSeconds: ctimeSeconds % MAX_UINT32, - ctimeNanoseconds: ctimeNanoseconds % MAX_UINT32, - mtimeSeconds: mtimeSeconds % MAX_UINT32, - mtimeNanoseconds: mtimeNanoseconds % MAX_UINT32, - dev: e.dev % MAX_UINT32, - ino: e.ino % MAX_UINT32, - mode: normalizeMode(e.mode % MAX_UINT32), - uid: e.uid % MAX_UINT32, - gid: e.gid % MAX_UINT32, - // size of -1 happens over a BrowserFS HTTP Backend that doesn't serve Content-Length headers - // (like the Karma webserver) because BrowserFS HTTP Backend uses HTTP HEAD requests to do fs.stat - size: e.size > -1 ? e.size % MAX_UINT32 : 0, - } -} - -function toHex(buffer) { - let hex = ''; - for (const byte of new Uint8Array(buffer)) { - if (byte < 16) hex += '0'; - hex += byte.toString(16); - } - return hex -} - -/* eslint-env node, browser */ - -let supportsSubtleSHA1 = null; - -async function shasum(buffer) { - if (supportsSubtleSHA1 === null) { - supportsSubtleSHA1 = await testSubtleSHA1(); - } - return supportsSubtleSHA1 ? subtleSHA1(buffer) : shasumSync(buffer) -} - -// This is modeled after @dominictarr's "shasum" module, -// but without the 'json-stable-stringify' dependency and -// extra type-casting features. -function shasumSync(buffer) { - return new Hash().update(buffer).digest('hex') -} - -async function subtleSHA1(buffer) { - const hash = await crypto.subtle.digest('SHA-1', buffer); - return toHex(hash) -} - -async function testSubtleSHA1() { - // I'm using a rather crude method of progressive enhancement, because - // some browsers that have crypto.subtle.digest don't actually implement SHA-1. - try { - const hash = await subtleSHA1(new Uint8Array([])); - if (hash === 'da39a3ee5e6b4b0d3255bfef95601890afd80709') return true - } catch (_) { - // no bother - } - return false -} - -// Extract 1-bit assume-valid, 1-bit extended flag, 2-bit merge state flag, 12-bit path length flag -function parseCacheEntryFlags(bits) { - return { - assumeValid: Boolean(bits & 0b1000000000000000), - extended: Boolean(bits & 0b0100000000000000), - stage: (bits & 0b0011000000000000) >> 12, - nameLength: bits & 0b0000111111111111, - } -} - -function renderCacheEntryFlags(entry) { - const flags = entry.flags; - // 1-bit extended flag (must be zero in version 2) - flags.extended = false; - // 12-bit name length if the length is less than 0xFFF; otherwise 0xFFF - // is stored in this field. - flags.nameLength = Math.min(Buffer.from(entry.path).length, 0xfff); - return ( - (flags.assumeValid ? 0b1000000000000000 : 0) + - (flags.extended ? 0b0100000000000000 : 0) + - ((flags.stage & 0b11) << 12) + - (flags.nameLength & 0b111111111111) - ) -} - -class GitIndex { - /*:: - _entries: Map<string, CacheEntry> - _dirty: boolean // Used to determine if index needs to be saved to filesystem - */ - constructor(entries) { - this._dirty = false; - this._entries = entries || new Map(); - } - - static async from(buffer) { - if (Buffer.isBuffer(buffer)) { - return GitIndex.fromBuffer(buffer) - } else if (buffer === null) { - return new GitIndex(null) - } else { - throw new InternalError('invalid type passed to GitIndex.from') - } - } - - static async fromBuffer(buffer) { - // Verify shasum - const shaComputed = await shasum(buffer.slice(0, -20)); - const shaClaimed = buffer.slice(-20).toString('hex'); - if (shaClaimed !== shaComputed) { - throw new InternalError( - `Invalid checksum in GitIndex buffer: expected ${shaClaimed} but saw ${shaComputed}` - ) - } - const reader = new BufferCursor(buffer); - const _entries = new Map(); - const magic = reader.toString('utf8', 4); - if (magic !== 'DIRC') { - throw new InternalError(`Inavlid dircache magic file number: ${magic}`) - } - const version = reader.readUInt32BE(); - if (version !== 2) { - throw new InternalError(`Unsupported dircache version: ${version}`) - } - const numEntries = reader.readUInt32BE(); - let i = 0; - while (!reader.eof() && i < numEntries) { - const entry = {}; - entry.ctimeSeconds = reader.readUInt32BE(); - entry.ctimeNanoseconds = reader.readUInt32BE(); - entry.mtimeSeconds = reader.readUInt32BE(); - entry.mtimeNanoseconds = reader.readUInt32BE(); - entry.dev = reader.readUInt32BE(); - entry.ino = reader.readUInt32BE(); - entry.mode = reader.readUInt32BE(); - entry.uid = reader.readUInt32BE(); - entry.gid = reader.readUInt32BE(); - entry.size = reader.readUInt32BE(); - entry.oid = reader.slice(20).toString('hex'); - const flags = reader.readUInt16BE(); - entry.flags = parseCacheEntryFlags(flags); - // TODO: handle if (version === 3 && entry.flags.extended) - const pathlength = buffer.indexOf(0, reader.tell() + 1) - reader.tell(); - if (pathlength < 1) { - throw new InternalError(`Got a path length of: ${pathlength}`) - } - // TODO: handle pathnames larger than 12 bits - entry.path = reader.toString('utf8', pathlength); - - // Prevent malicious paths like "..\foo" - if (entry.path.includes('..\\') || entry.path.includes('../')) { - throw new UnsafeFilepathError(entry.path) - } - - // The next bit is awkward. We expect 1 to 8 null characters - // such that the total size of the entry is a multiple of 8 bits. - // (Hence subtract 12 bytes for the header.) - let padding = 8 - ((reader.tell() - 12) % 8); - if (padding === 0) padding = 8; - while (padding--) { - const tmp = reader.readUInt8(); - if (tmp !== 0) { - throw new InternalError( - `Expected 1-8 null characters but got '${tmp}' after ${entry.path}` - ) - } else if (reader.eof()) { - throw new InternalError('Unexpected end of file') - } - } - // end of awkward part - _entries.set(entry.path, entry); - i++; - } - return new GitIndex(_entries) - } - - get entries() { - return [...this._entries.values()].sort(comparePath) - } - - get entriesMap() { - return this._entries - } - - *[Symbol.iterator]() { - for (const entry of this.entries) { - yield entry; - } - } - - insert({ filepath, stats, oid }) { - stats = normalizeStats(stats); - const bfilepath = Buffer.from(filepath); - const entry = { - ctimeSeconds: stats.ctimeSeconds, - ctimeNanoseconds: stats.ctimeNanoseconds, - mtimeSeconds: stats.mtimeSeconds, - mtimeNanoseconds: stats.mtimeNanoseconds, - dev: stats.dev, - ino: stats.ino, - // We provide a fallback value for `mode` here because not all fs - // implementations assign it, but we use it in GitTree. - // '100644' is for a "regular non-executable file" - mode: stats.mode || 0o100644, - uid: stats.uid, - gid: stats.gid, - size: stats.size, - path: filepath, - oid: oid, - flags: { - assumeValid: false, - extended: false, - stage: 0, - nameLength: bfilepath.length < 0xfff ? bfilepath.length : 0xfff, - }, - }; - this._entries.set(entry.path, entry); - this._dirty = true; - } - - delete({ filepath }) { - if (this._entries.has(filepath)) { - this._entries.delete(filepath); - } else { - for (const key of this._entries.keys()) { - if (key.startsWith(filepath + '/')) { - this._entries.delete(key); - } - } - } - this._dirty = true; - } - - clear() { - this._entries.clear(); - this._dirty = true; - } - - render() { - return this.entries - .map(entry => `${entry.mode.toString(8)} ${entry.oid} ${entry.path}`) - .join('\n') - } - - async toObject() { - const header = Buffer.alloc(12); - const writer = new BufferCursor(header); - writer.write('DIRC', 4, 'utf8'); - writer.writeUInt32BE(2); - writer.writeUInt32BE(this.entries.length); - const body = Buffer.concat( - this.entries.map(entry => { - const bpath = Buffer.from(entry.path); - // the fixed length + the filename + at least one null char => align by 8 - const length = Math.ceil((62 + bpath.length + 1) / 8) * 8; - const written = Buffer.alloc(length); - const writer = new BufferCursor(written); - const stat = normalizeStats(entry); - writer.writeUInt32BE(stat.ctimeSeconds); - writer.writeUInt32BE(stat.ctimeNanoseconds); - writer.writeUInt32BE(stat.mtimeSeconds); - writer.writeUInt32BE(stat.mtimeNanoseconds); - writer.writeUInt32BE(stat.dev); - writer.writeUInt32BE(stat.ino); - writer.writeUInt32BE(stat.mode); - writer.writeUInt32BE(stat.uid); - writer.writeUInt32BE(stat.gid); - writer.writeUInt32BE(stat.size); - writer.write(entry.oid, 20, 'hex'); - writer.writeUInt16BE(renderCacheEntryFlags(entry)); - writer.write(entry.path, bpath.length, 'utf8'); - return written - }) - ); - const main = Buffer.concat([header, body]); - const sum = await shasum(main); - return Buffer.concat([main, Buffer.from(sum, 'hex')]) - } -} - -function compareStats(entry, stats) { - // Comparison based on the description in Paragraph 4 of - // https://www.kernel.org/pub/software/scm/git/docs/technical/racy-git.txt - const e = normalizeStats(entry); - const s = normalizeStats(stats); - const staleness = - e.mode !== s.mode || - e.mtimeSeconds !== s.mtimeSeconds || - e.ctimeSeconds !== s.ctimeSeconds || - e.uid !== s.uid || - e.gid !== s.gid || - e.ino !== s.ino || - e.size !== s.size; - return staleness -} - -// import LockManager from 'travix-lock-manager' - -// import Lock from '../utils.js' - -// const lm = new LockManager() -let lock = null; - -const IndexCache = Symbol('IndexCache'); - -function createCache() { - return { - map: new Map(), - stats: new Map(), - } -} - -async function updateCachedIndexFile(fs, filepath, cache) { - const stat = await fs.lstat(filepath); - const rawIndexFile = await fs.read(filepath); - const index = await GitIndex.from(rawIndexFile); - // cache the GitIndex object so we don't need to re-read it every time. - cache.map.set(filepath, index); - // Save the stat data for the index so we know whether the cached file is stale (modified by an outside process). - cache.stats.set(filepath, stat); -} - -// Determine whether our copy of the index file is stale -async function isIndexStale(fs, filepath, cache) { - const savedStats = cache.stats.get(filepath); - if (savedStats === undefined) return true - const currStats = await fs.lstat(filepath); - if (savedStats === null) return false - if (currStats === null) return false - return compareStats(savedStats, currStats) -} - -class GitIndexManager { - /** - * - * @param {object} opts - * @param {import('../models/FileSystem.js').FileSystem} opts.fs - * @param {string} opts.gitdir - * @param {object} opts.cache - * @param {function(GitIndex): any} closure - */ - static async acquire({ fs, gitdir, cache }, closure) { - if (!cache[IndexCache]) cache[IndexCache] = createCache(); - - const filepath = `${gitdir}/index`; - if (lock === null) lock = new AsyncLock({ maxPending: Infinity }); - let result; - await lock.acquire(filepath, async function() { - // Acquire a file lock while we're reading the index - // to make sure other processes aren't writing to it - // simultaneously, which could result in a corrupted index. - // const fileLock = await Lock(filepath) - if (await isIndexStale(fs, filepath, cache[IndexCache])) { - await updateCachedIndexFile(fs, filepath, cache[IndexCache]); - } - const index = cache[IndexCache].map.get(filepath); - result = await closure(index); - if (index._dirty) { - // Acquire a file lock while we're writing the index file - // let fileLock = await Lock(filepath) - const buffer = await index.toObject(); - await fs.write(filepath, buffer); - // Update cached stat value - cache[IndexCache].stats.set(filepath, await fs.lstat(filepath)); - index._dirty = false; - } - }); - return result - } -} - -function basename(path) { - const last = Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\')); - if (last > -1) { - path = path.slice(last + 1); - } - return path -} - -function dirname(path) { - const last = Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\')); - if (last === -1) return '.' - if (last === 0) return '/' - return path.slice(0, last) -} - -/*:: -type Node = { - type: string, - fullpath: string, - basename: string, - metadata: Object, // mode, oid - parent?: Node, - children: Array<Node> -} -*/ - -function flatFileListToDirectoryStructure(files) { - const inodes = new Map(); - const mkdir = function(name) { - if (!inodes.has(name)) { - const dir = { - type: 'tree', - fullpath: name, - basename: basename(name), - metadata: {}, - children: [], - }; - inodes.set(name, dir); - // This recursively generates any missing parent folders. - // We do it after we've added the inode to the set so that - // we don't recurse infinitely trying to create the root '.' dirname. - dir.parent = mkdir(dirname(name)); - if (dir.parent && dir.parent !== dir) dir.parent.children.push(dir); - } - return inodes.get(name) - }; - - const mkfile = function(name, metadata) { - if (!inodes.has(name)) { - const file = { - type: 'blob', - fullpath: name, - basename: basename(name), - metadata: metadata, - // This recursively generates any missing parent folders. - parent: mkdir(dirname(name)), - children: [], - }; - if (file.parent) file.parent.children.push(file); - inodes.set(name, file); - } - return inodes.get(name) - }; - - mkdir('.'); - for (const file of files) { - mkfile(file.path, file); - } - return inodes -} - -/** - * - * @param {number} mode - */ -function mode2type(mode) { - // prettier-ignore - switch (mode) { - case 0o040000: return 'tree' - case 0o100644: return 'blob' - case 0o100755: return 'blob' - case 0o120000: return 'blob' - case 0o160000: return 'commit' - } - throw new InternalError(`Unexpected GitTree entry mode: ${mode.toString(8)}`) -} - -class GitWalkerIndex { - constructor({ fs, gitdir, cache }) { - this.treePromise = GitIndexManager.acquire( - { fs, gitdir, cache }, - async function(index) { - return flatFileListToDirectoryStructure(index.entries) - } - ); - const walker = this; - this.ConstructEntry = class StageEntry { - constructor(fullpath) { - this._fullpath = fullpath; - this._type = false; - this._mode = false; - this._stat = false; - this._oid = false; - } - - async type() { - return walker.type(this) - } - - async mode() { - return walker.mode(this) - } - - async stat() { - return walker.stat(this) - } - - async content() { - return walker.content(this) - } - - async oid() { - return walker.oid(this) - } - }; - } - - async readdir(entry) { - const filepath = entry._fullpath; - const tree = await this.treePromise; - const inode = tree.get(filepath); - if (!inode) return null - if (inode.type === 'blob') return null - if (inode.type !== 'tree') { - throw new Error(`ENOTDIR: not a directory, scandir '${filepath}'`) - } - const names = inode.children.map(inode => inode.fullpath); - names.sort(compareStrings); - return names - } - - async type(entry) { - if (entry._type === false) { - await entry.stat(); - } - return entry._type - } - - async mode(entry) { - if (entry._mode === false) { - await entry.stat(); - } - return entry._mode - } - - async stat(entry) { - if (entry._stat === false) { - const tree = await this.treePromise; - const inode = tree.get(entry._fullpath); - if (!inode) { - throw new Error( - `ENOENT: no such file or directory, lstat '${entry._fullpath}'` - ) - } - const stats = inode.type === 'tree' ? {} : normalizeStats(inode.metadata); - entry._type = inode.type === 'tree' ? 'tree' : mode2type(stats.mode); - entry._mode = stats.mode; - if (inode.type === 'tree') { - entry._stat = undefined; - } else { - entry._stat = stats; - } - } - return entry._stat - } - - async content(_entry) { - // Cannot get content for an index entry - } - - async oid(entry) { - if (entry._oid === false) { - const tree = await this.treePromise; - const inode = tree.get(entry._fullpath); - entry._oid = inode.metadata.oid; - } - return entry._oid - } -} - -// This is part of an elaborate system to facilitate code-splitting / tree-shaking. -// commands/walk.js can depend on only this, and the actual Walker classes exported -// can be opaque - only having a single property (this symbol) that is not enumerable, -// and thus the constructor can be passed as an argument to walk while being "unusable" -// outside of it. -const GitWalkSymbol = Symbol('GitWalkSymbol'); - -// @ts-check - -/** - * @returns {Walker} - */ -function STAGE() { - const o = Object.create(null); - Object.defineProperty(o, GitWalkSymbol, { - value: function({ fs, gitdir, cache }) { - return new GitWalkerIndex({ fs, gitdir, cache }) - }, - }); - Object.freeze(o); - return o -} - -// @ts-check - -class NotFoundError extends BaseError { - /** - * @param {string} what - */ - constructor(what) { - super(`Could not find ${what}.`); - this.code = this.name = NotFoundError.code; - this.data = { what }; - } -} -/** @type {'NotFoundError'} */ -NotFoundError.code = 'NotFoundError'; - -class ObjectTypeError extends BaseError { - /** - * @param {string} oid - * @param {'blob'|'commit'|'tag'|'tree'} actual - * @param {'blob'|'commit'|'tag'|'tree'} expected - * @param {string} [filepath] - */ - constructor(oid, actual, expected, filepath) { - super( - `Object ${oid} ${ - filepath ? `at ${filepath}` : '' - }was anticipated to be a ${expected} but it is a ${actual}.` - ); - this.code = this.name = ObjectTypeError.code; - this.data = { oid, actual, expected, filepath }; - } -} -/** @type {'ObjectTypeError'} */ -ObjectTypeError.code = 'ObjectTypeError'; - -class InvalidOidError extends BaseError { - /** - * @param {string} value - */ - constructor(value) { - super(`Expected a 40-char hex object id but saw "${value}".`); - this.code = this.name = InvalidOidError.code; - this.data = { value }; - } -} -/** @type {'InvalidOidError'} */ -InvalidOidError.code = 'InvalidOidError'; - -class NoRefspecError extends BaseError { - /** - * @param {string} remote - */ - constructor(remote) { - super(`Could not find a fetch refspec for remote "${remote}". Make sure the config file has an entry like the following: -[remote "${remote}"] -\tfetch = +refs/heads/*:refs/remotes/origin/* -`); - this.code = this.name = NoRefspecError.code; - this.data = { remote }; - } -} -/** @type {'NoRefspecError'} */ -NoRefspecError.code = 'NoRefspecError'; - -class GitPackedRefs { - constructor(text) { - this.refs = new Map(); - this.parsedConfig = []; - if (text) { - let key = null; - this.parsedConfig = text - .trim() - .split('\n') - .map(line => { - if (/^\s*#/.test(line)) { - return { line, comment: true } - } - const i = line.indexOf(' '); - if (line.startsWith('^')) { - // This is a oid for the commit associated with the annotated tag immediately preceding this line. - // Trim off the '^' - const value = line.slice(1); - // The tagname^{} syntax is based on the output of `git show-ref --tags -d` - this.refs.set(key + '^{}', value); - return { line, ref: key, peeled: value } - } else { - // This is an oid followed by the ref name - const value = line.slice(0, i); - key = line.slice(i + 1); - this.refs.set(key, value); - return { line, ref: key, oid: value } - } - }); - } - return this - } - - static from(text) { - return new GitPackedRefs(text) - } - - delete(ref) { - this.parsedConfig = this.parsedConfig.filter(entry => entry.ref !== ref); - this.refs.delete(ref); - } - - toString() { - return this.parsedConfig.map(({ line }) => line).join('\n') + '\n' - } -} - -class GitRefSpec { - constructor({ remotePath, localPath, force, matchPrefix }) { - Object.assign(this, { - remotePath, - localPath, - force, - matchPrefix, - }); - } - - static from(refspec) { - const [ - forceMatch, - remotePath, - remoteGlobMatch, - localPath, - localGlobMatch, - ] = refspec.match(/^(\+?)(.*?)(\*?):(.*?)(\*?)$/).slice(1); - const force = forceMatch === '+'; - const remoteIsGlob = remoteGlobMatch === '*'; - const localIsGlob = localGlobMatch === '*'; - // validate - // TODO: Make this check more nuanced, and depend on whether this is a fetch refspec or a push refspec - if (remoteIsGlob !== localIsGlob) { - throw new InternalError('Invalid refspec') - } - return new GitRefSpec({ - remotePath, - localPath, - force, - matchPrefix: remoteIsGlob, - }) - // TODO: We need to run resolveRef on both paths to expand them to their full name. - } - - translate(remoteBranch) { - if (this.matchPrefix) { - if (remoteBranch.startsWith(this.remotePath)) { - return this.localPath + remoteBranch.replace(this.remotePath, '') - } - } else { - if (remoteBranch === this.remotePath) return this.localPath - } - return null - } - - reverseTranslate(localBranch) { - if (this.matchPrefix) { - if (localBranch.startsWith(this.localPath)) { - return this.remotePath + localBranch.replace(this.localPath, '') - } - } else { - if (localBranch === this.localPath) return this.remotePath - } - return null - } -} - -class GitRefSpecSet { - constructor(rules = []) { - this.rules = rules; - } - - static from(refspecs) { - const rules = []; - for (const refspec of refspecs) { - rules.push(GitRefSpec.from(refspec)); // might throw - } - return new GitRefSpecSet(rules) - } - - add(refspec) { - const rule = GitRefSpec.from(refspec); // might throw - this.rules.push(rule); - } - - translate(remoteRefs) { - const result = []; - for (const rule of this.rules) { - for (const remoteRef of remoteRefs) { - const localRef = rule.translate(remoteRef); - if (localRef) { - result.push([remoteRef, localRef]); - } - } - } - return result - } - - translateOne(remoteRef) { - let result = null; - for (const rule of this.rules) { - const localRef = rule.translate(remoteRef); - if (localRef) { - result = localRef; - } - } - return result - } - - localNamespaces() { - return this.rules - .filter(rule => rule.matchPrefix) - .map(rule => rule.localPath.replace(/\/$/, '')) - } -} - -function compareRefNames(a, b) { - // https://stackoverflow.com/a/40355107/2168416 - const _a = a.replace(/\^\{\}$/, ''); - const _b = b.replace(/\^\{\}$/, ''); - const tmp = -(_a < _b) || +(_a > _b); - if (tmp === 0) { - return a.endsWith('^{}') ? 1 : -1 - } - return tmp -} - -function normalizePath(path) { - return path - .replace(/\/\.\//g, '/') // Replace '/./' with '/' - .replace(/\/{2,}/g, '/') // Replace consecutive '/' - .replace(/^\/\.$/, '/') // if path === '/.' return '/' - .replace(/^\.\/$/, '.') // if path === './' return '.' - .replace(/^\.\//, '') // Remove leading './' - .replace(/\/\.$/, '') // Remove trailing '/.' - .replace(/(.+)\/$/, '$1') // Remove trailing '/' - .replace(/^$/, '.') // if path === '' return '.' -} - -// For some reason path.posix.join is undefined in webpack - -function join(...parts) { - return normalizePath(parts.map(normalizePath).join('/')) -} - -// This is straight from parse_unit_factor in config.c of canonical git -const num = val => { - val = val.toLowerCase(); - let n = parseInt(val); - if (val.endsWith('k')) n *= 1024; - if (val.endsWith('m')) n *= 1024 * 1024; - if (val.endsWith('g')) n *= 1024 * 1024 * 1024; - return n -}; - -// This is straight from git_parse_maybe_bool_text in config.c of canonical git -const bool = val => { - val = val.trim().toLowerCase(); - if (val === 'true' || val === 'yes' || val === 'on') return true - if (val === 'false' || val === 'no' || val === 'off') return false - throw Error( - `Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${val}` - ) -}; - -const schema = { - core: { - filemode: bool, - bare: bool, - logallrefupdates: bool, - symlinks: bool, - ignorecase: bool, - bigFileThreshold: num, - }, -}; - -// https://git-scm.com/docs/git-config#_syntax - -// section starts with [ and ends with ] -// section is alphanumeric (ASCII) with - and . -// section is case insensitive -// subsection is optionnal -// subsection is specified after section and one or more spaces -// subsection is specified between double quotes -const SECTION_LINE_REGEX = /^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/; -const SECTION_REGEX = /^[A-Za-z0-9-.]+$/; - -// variable lines contain a name, and equal sign and then a value -// variable lines can also only contain a name (the implicit value is a boolean true) -// variable name is alphanumeric (ASCII) with - -// variable name starts with an alphabetic character -// variable name is case insensitive -const VARIABLE_LINE_REGEX = /^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/; -const VARIABLE_NAME_REGEX = /^[A-Za-z][A-Za-z-]*$/; - -const VARIABLE_VALUE_COMMENT_REGEX = /^(.*?)( *[#;].*)$/; - -const extractSectionLine = line => { - const matches = SECTION_LINE_REGEX.exec(line); - if (matches != null) { - const [section, subsection] = matches.slice(1); - return [section, subsection] - } - return null -}; - -const extractVariableLine = line => { - const matches = VARIABLE_LINE_REGEX.exec(line); - if (matches != null) { - const [name, rawValue = 'true'] = matches.slice(1); - const valueWithoutComments = removeComments(rawValue); - const valueWithoutQuotes = removeQuotes(valueWithoutComments); - return [name, valueWithoutQuotes] - } - return null -}; - -const removeComments = rawValue => { - const commentMatches = VARIABLE_VALUE_COMMENT_REGEX.exec(rawValue); - if (commentMatches == null) { - return rawValue - } - const [valueWithoutComment, comment] = commentMatches.slice(1); - // if odd number of quotes before and after comment => comment is escaped - if ( - hasOddNumberOfQuotes(valueWithoutComment) && - hasOddNumberOfQuotes(comment) - ) { - return `${valueWithoutComment}${comment}` - } - return valueWithoutComment -}; - -const hasOddNumberOfQuotes = text => { - const numberOfQuotes = (text.match(/(?:^|[^\\])"/g) || []).length; - return numberOfQuotes % 2 !== 0 -}; - -const removeQuotes = text => { - return text.split('').reduce((newText, c, idx, text) => { - const isQuote = c === '"' && text[idx - 1] !== '\\'; - const isEscapeForQuote = c === '\\' && text[idx + 1] === '"'; - if (isQuote || isEscapeForQuote) { - return newText - } - return newText + c - }, '') -}; - -const lower = text => { - return text != null ? text.toLowerCase() : null -}; - -const getPath = (section, subsection, name) => { - return [lower(section), subsection, lower(name)] - .filter(a => a != null) - .join('.') -}; - -const findLastIndex = (array, callback) => { - return array.reduce((lastIndex, item, index) => { - return callback(item) ? index : lastIndex - }, -1) -}; - -// Note: there are a LOT of edge cases that aren't covered (e.g. keys in sections that also -// have subsections, [include] directives, etc. -class GitConfig { - constructor(text) { - let section = null; - let subsection = null; - this.parsedConfig = text.split('\n').map(line => { - let name = null; - let value = null; - - const trimmedLine = line.trim(); - const extractedSection = extractSectionLine(trimmedLine); - const isSection = extractedSection != null; - if (isSection) { - ;[section, subsection] = extractedSection; - } else { - const extractedVariable = extractVariableLine(trimmedLine); - const isVariable = extractedVariable != null; - if (isVariable) { - ;[name, value] = extractedVariable; - } - } - - const path = getPath(section, subsection, name); - return { line, isSection, section, subsection, name, value, path } - }); - } - - static from(text) { - return new GitConfig(text) - } - - async get(path, getall = false) { - const allValues = this.parsedConfig - .filter(config => config.path === path.toLowerCase()) - .map(({ section, name, value }) => { - const fn = schema[section] && schema[section][name]; - return fn ? fn(value) : value - }); - return getall ? allValues : allValues.pop() - } - - async getall(path) { - return this.get(path, true) - } - - async getSubsections(section) { - return this.parsedConfig - .filter(config => config.section === section && config.isSection) - .map(config => config.subsection) - } - - async deleteSection(section, subsection) { - this.parsedConfig = this.parsedConfig.filter( - config => - !(config.section === section && config.subsection === subsection) - ); - } - - async append(path, value) { - return this.set(path, value, true) - } - - async set(path, value, append = false) { - const configIndex = findLastIndex( - this.parsedConfig, - config => config.path === path.toLowerCase() - ); - if (value == null) { - if (configIndex !== -1) { - this.parsedConfig.splice(configIndex, 1); - } - } else { - if (configIndex !== -1) { - const config = this.parsedConfig[configIndex]; - const modifiedConfig = Object.assign({}, config, { - value, - modified: true, - }); - if (append) { - this.parsedConfig.splice(configIndex + 1, 0, modifiedConfig); - } else { - this.parsedConfig[configIndex] = modifiedConfig; - } - } else { - const sectionPath = path - .split('.') - .slice(0, -1) - .join('.') - .toLowerCase(); - const sectionIndex = this.parsedConfig.findIndex( - config => config.path === sectionPath - ); - const [section, subsection] = sectionPath.split('.'); - const name = path.split('.').pop(); - const newConfig = { - section, - subsection, - name, - value, - modified: true, - path: getPath(section, subsection, name), - }; - if (SECTION_REGEX.test(section) && VARIABLE_NAME_REGEX.test(name)) { - if (sectionIndex >= 0) { - // Reuse existing section - this.parsedConfig.splice(sectionIndex + 1, 0, newConfig); - } else { - // Add a new section - const newSection = { - section, - subsection, - modified: true, - path: getPath(section, subsection, null), - }; - this.parsedConfig.push(newSection, newConfig); - } - } - } - } - } - - toString() { - return this.parsedConfig - .map(({ line, section, subsection, name, value, modified = false }) => { - if (!modified) { - return line - } - if (name != null && value != null) { - return `\t${name} = ${value}` - } - if (subsection != null) { - return `[${section} "${subsection}"]` - } - return `[${section}]` - }) - .join('\n') - } -} - -class GitConfigManager { - static async get({ fs, gitdir }) { - // We can improve efficiency later if needed. - // TODO: read from full list of git config files - const text = await fs.read(`${gitdir}/config`, { encoding: 'utf8' }); - return GitConfig.from(text) - } - - static async save({ fs, gitdir, config }) { - // We can improve efficiency later if needed. - // TODO: handle saving to the correct global/user/repo location - await fs.write(`${gitdir}/config`, config.toString(), { - encoding: 'utf8', - }); - } -} - -// This is a convenience wrapper for reading and writing files in the 'refs' directory. - -// @see https://git-scm.com/docs/git-rev-parse.html#_specifying_revisions -const refpaths = ref => [ - `${ref}`, - `refs/${ref}`, - `refs/tags/${ref}`, - `refs/heads/${ref}`, - `refs/remotes/${ref}`, - `refs/remotes/${ref}/HEAD`, -]; - -// @see https://git-scm.com/docs/gitrepository-layout -const GIT_FILES = ['config', 'description', 'index', 'shallow', 'commondir']; - -class GitRefManager { - static async updateRemoteRefs({ - fs, - gitdir, - remote, - refs, - symrefs, - tags, - refspecs = undefined, - prune = false, - pruneTags = false, - }) { - // Validate input - for (const value of refs.values()) { - if (!value.match(/[0-9a-f]{40}/)) { - throw new InvalidOidError(value) - } - } - const config = await GitConfigManager.get({ fs, gitdir }); - if (!refspecs) { - refspecs = await config.getall(`remote.${remote}.fetch`); - if (refspecs.length === 0) { - throw new NoRefspecError(remote) - } - // There's some interesting behavior with HEAD that doesn't follow the refspec. - refspecs.unshift(`+HEAD:refs/remotes/${remote}/HEAD`); - } - const refspec = GitRefSpecSet.from(refspecs); - const actualRefsToWrite = new Map(); - // Delete all current tags if the pruneTags argument is true. - if (pruneTags) { - const tags = await GitRefManager.listRefs({ - fs, - gitdir, - filepath: 'refs/tags', - }); - await GitRefManager.deleteRefs({ - fs, - gitdir, - refs: tags.map(tag => `refs/tags/${tag}`), - }); - } - // Add all tags if the fetch tags argument is true. - if (tags) { - for (const serverRef of refs.keys()) { - if (serverRef.startsWith('refs/tags') && !serverRef.endsWith('^{}')) { - // Git's behavior is to only fetch tags that do not conflict with tags already present. - if (!(await GitRefManager.exists({ fs, gitdir, ref: serverRef }))) { - // If there is a dereferenced an annotated tag value available, prefer that. - const oid = refs.get(serverRef + '^{}') || refs.get(serverRef); - actualRefsToWrite.set(serverRef, oid); - } - } - } - } - // Combine refs and symrefs giving symrefs priority - const refTranslations = refspec.translate([...refs.keys()]); - for (const [serverRef, translatedRef] of refTranslations) { - const value = refs.get(serverRef); - actualRefsToWrite.set(translatedRef, value); - } - const symrefTranslations = refspec.translate([...symrefs.keys()]); - for (const [serverRef, translatedRef] of symrefTranslations) { - const value = symrefs.get(serverRef); - const symtarget = refspec.translateOne(value); - if (symtarget) { - actualRefsToWrite.set(translatedRef, `ref: ${symtarget}`); - } - } - // If `prune` argument is true, clear out the existing local refspec roots - const pruned = []; - if (prune) { - for (const filepath of refspec.localNamespaces()) { - const refs = ( - await GitRefManager.listRefs({ - fs, - gitdir, - filepath, - }) - ).map(file => `${filepath}/${file}`); - for (const ref of refs) { - if (!actualRefsToWrite.has(ref)) { - pruned.push(ref); - } - } - } - if (pruned.length > 0) { - await GitRefManager.deleteRefs({ fs, gitdir, refs: pruned }); - } - } - // Update files - // TODO: For large repos with a history of thousands of pull requests - // (i.e. gitlab-ce) it would be vastly more efficient to write them - // to .git/packed-refs. - // The trick is to make sure we a) don't write a packed ref that is - // already shadowed by a loose ref and b) don't loose any refs already - // in packed-refs. Doing this efficiently may be difficult. A - // solution that might work is - // a) load the current packed-refs file - // b) add actualRefsToWrite, overriding the existing values if present - // c) enumerate all the loose refs currently in .git/refs/remotes/${remote} - // d) overwrite their value with the new value. - // Examples of refs we need to avoid writing in loose format for efficieny's sake - // are .git/refs/remotes/origin/refs/remotes/remote_mirror_3059 - // and .git/refs/remotes/origin/refs/merge-requests - for (const [key, value] of actualRefsToWrite) { - await fs.write(join(gitdir, key), `${value.trim()}\n`, 'utf8'); - } - return { pruned } - } - - // TODO: make this less crude? - static async writeRef({ fs, gitdir, ref, value }) { - // Validate input - if (!value.match(/[0-9a-f]{40}/)) { - throw new InvalidOidError(value) - } - await fs.write(join(gitdir, ref), `${value.trim()}\n`, 'utf8'); - } - - static async writeSymbolicRef({ fs, gitdir, ref, value }) { - await fs.write(join(gitdir, ref), 'ref: ' + `${value.trim()}\n`, 'utf8'); - } - - static async deleteRef({ fs, gitdir, ref }) { - return GitRefManager.deleteRefs({ fs, gitdir, refs: [ref] }) - } - - static async deleteRefs({ fs, gitdir, refs }) { - // Delete regular ref - await Promise.all(refs.map(ref => fs.rm(join(gitdir, ref)))); - // Delete any packed ref - let text = await fs.read(`${gitdir}/packed-refs`, { encoding: 'utf8' }); - const packed = GitPackedRefs.from(text); - const beforeSize = packed.refs.size; - for (const ref of refs) { - if (packed.refs.has(ref)) { - packed.delete(ref); - } - } - if (packed.refs.size < beforeSize) { - text = packed.toString(); - await fs.write(`${gitdir}/packed-refs`, text, { encoding: 'utf8' }); - } - } - - /** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.ref - * @param {number} [args.depth] - * @returns {Promise<string>} - */ - static async resolve({ fs, gitdir, ref, depth = undefined }) { - if (depth !== undefined) { - depth--; - if (depth === -1) { - return ref - } - } - let sha; - // Is it a ref pointer? - if (ref.startsWith('ref: ')) { - ref = ref.slice('ref: '.length); - return GitRefManager.resolve({ fs, gitdir, ref, depth }) - } - // Is it a complete and valid SHA? - if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) { - return ref - } - // We need to alternate between the file system and the packed-refs - const packedMap = await GitRefManager.packedRefs({ fs, gitdir }); - // Look in all the proper paths, in this order - const allpaths = refpaths(ref).filter(p => !GIT_FILES.includes(p)); // exclude git system files (#709) - - for (const ref of allpaths) { - sha = - (await fs.read(`${gitdir}/${ref}`, { encoding: 'utf8' })) || - packedMap.get(ref); - if (sha) { - return GitRefManager.resolve({ fs, gitdir, ref: sha.trim(), depth }) - } - } - // Do we give up? - throw new NotFoundError(ref) - } - - static async exists({ fs, gitdir, ref }) { - try { - await GitRefManager.expand({ fs, gitdir, ref }); - return true - } catch (err) { - return false - } - } - - static async expand({ fs, gitdir, ref }) { - // Is it a complete and valid SHA? - if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) { - return ref - } - // We need to alternate between the file system and the packed-refs - const packedMap = await GitRefManager.packedRefs({ fs, gitdir }); - // Look in all the proper paths, in this order - const allpaths = refpaths(ref); - for (const ref of allpaths) { - if (await fs.exists(`${gitdir}/${ref}`)) return ref - if (packedMap.has(ref)) return ref - } - // Do we give up? - throw new NotFoundError(ref) - } - - static async expandAgainstMap({ ref, map }) { - // Look in all the proper paths, in this order - const allpaths = refpaths(ref); - for (const ref of allpaths) { - if (await map.has(ref)) return ref - } - // Do we give up? - throw new NotFoundError(ref) - } - - static resolveAgainstMap({ ref, fullref = ref, depth = undefined, map }) { - if (depth !== undefined) { - depth--; - if (depth === -1) { - return { fullref, oid: ref } - } - } - // Is it a ref pointer? - if (ref.startsWith('ref: ')) { - ref = ref.slice('ref: '.length); - return GitRefManager.resolveAgainstMap({ ref, fullref, depth, map }) - } - // Is it a complete and valid SHA? - if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) { - return { fullref, oid: ref } - } - // Look in all the proper paths, in this order - const allpaths = refpaths(ref); - for (const ref of allpaths) { - const sha = map.get(ref); - if (sha) { - return GitRefManager.resolveAgainstMap({ - ref: sha.trim(), - fullref: ref, - depth, - map, - }) - } - } - // Do we give up? - throw new NotFoundError(ref) - } - - static async packedRefs({ fs, gitdir }) { - const text = await fs.read(`${gitdir}/packed-refs`, { encoding: 'utf8' }); - const packed = GitPackedRefs.from(text); - return packed.refs - } - - // List all the refs that match the `filepath` prefix - static async listRefs({ fs, gitdir, filepath }) { - const packedMap = GitRefManager.packedRefs({ fs, gitdir }); - let files = null; - try { - files = await fs.readdirDeep(`${gitdir}/${filepath}`); - files = files.map(x => x.replace(`${gitdir}/${filepath}/`, '')); - } catch (err) { - files = []; - } - - for (let key of (await packedMap).keys()) { - // filter by prefix - if (key.startsWith(filepath)) { - // remove prefix - key = key.replace(filepath + '/', ''); - // Don't include duplicates; the loose files have precedence anyway - if (!files.includes(key)) { - files.push(key); - } - } - } - // since we just appended things onto an array, we need to sort them now - files.sort(compareRefNames); - return files - } - - static async listBranches({ fs, gitdir, remote }) { - if (remote) { - return GitRefManager.listRefs({ - fs, - gitdir, - filepath: `refs/remotes/${remote}`, - }) - } else { - return GitRefManager.listRefs({ fs, gitdir, filepath: `refs/heads` }) - } - } - - static async listTags({ fs, gitdir }) { - const tags = await GitRefManager.listRefs({ - fs, - gitdir, - filepath: `refs/tags`, - }); - return tags.filter(x => !x.endsWith('^{}')) - } -} - -function compareTreeEntryPath(a, b) { - // Git sorts tree entries as if there is a trailing slash on directory names. - return compareStrings(appendSlashIfDir(a), appendSlashIfDir(b)) -} - -function appendSlashIfDir(entry) { - return entry.mode === '040000' ? entry.path + '/' : entry.path -} - -/** - * - * @typedef {Object} TreeEntry - * @property {string} mode - the 6 digit hexadecimal mode - * @property {string} path - the name of the file or directory - * @property {string} oid - the SHA-1 object id of the blob or tree - * @property {'commit'|'blob'|'tree'} type - the type of object - */ - -function mode2type$1(mode) { - // prettier-ignore - switch (mode) { - case '040000': return 'tree' - case '100644': return 'blob' - case '100755': return 'blob' - case '120000': return 'blob' - case '160000': return 'commit' - } - throw new InternalError(`Unexpected GitTree entry mode: ${mode}`) -} - -function parseBuffer(buffer) { - const _entries = []; - let cursor = 0; - while (cursor < buffer.length) { - const space = buffer.indexOf(32, cursor); - if (space === -1) { - throw new InternalError( - `GitTree: Error parsing buffer at byte location ${cursor}: Could not find the next space character.` - ) - } - const nullchar = buffer.indexOf(0, cursor); - if (nullchar === -1) { - throw new InternalError( - `GitTree: Error parsing buffer at byte location ${cursor}: Could not find the next null character.` - ) - } - let mode = buffer.slice(cursor, space).toString('utf8'); - if (mode === '40000') mode = '040000'; // makes it line up neater in printed output - const type = mode2type$1(mode); - const path = buffer.slice(space + 1, nullchar).toString('utf8'); - - // Prevent malicious git repos from writing to "..\foo" on clone etc - if (path.includes('\\') || path.includes('/')) { - throw new UnsafeFilepathError(path) - } - - const oid = buffer.slice(nullchar + 1, nullchar + 21).toString('hex'); - cursor = nullchar + 21; - _entries.push({ mode, path, oid, type }); - } - return _entries -} - -function limitModeToAllowed(mode) { - if (typeof mode === 'number') { - mode = mode.toString(8); - } - // tree - if (mode.match(/^0?4.*/)) return '040000' // Directory - if (mode.match(/^1006.*/)) return '100644' // Regular non-executable file - if (mode.match(/^1007.*/)) return '100755' // Regular executable file - if (mode.match(/^120.*/)) return '120000' // Symbolic link - if (mode.match(/^160.*/)) return '160000' // Commit (git submodule reference) - throw new InternalError(`Could not understand file mode: ${mode}`) -} - -function nudgeIntoShape(entry) { - if (!entry.oid && entry.sha) { - entry.oid = entry.sha; // Github - } - entry.mode = limitModeToAllowed(entry.mode); // index - if (!entry.type) { - entry.type = mode2type$1(entry.mode); // index - } - return entry -} - -class GitTree { - constructor(entries) { - if (Buffer.isBuffer(entries)) { - this._entries = parseBuffer(entries); - } else if (Array.isArray(entries)) { - this._entries = entries.map(nudgeIntoShape); - } else { - throw new InternalError('invalid type passed to GitTree constructor') - } - // Tree entries are not sorted alphabetically in the usual sense (see `compareTreeEntryPath`) - // but it is important later on that these be sorted in the same order as they would be returned from readdir. - this._entries.sort(comparePath); - } - - static from(tree) { - return new GitTree(tree) - } - - render() { - return this._entries - .map(entry => `${entry.mode} ${entry.type} ${entry.oid} ${entry.path}`) - .join('\n') - } - - toObject() { - // Adjust the sort order to match git's - const entries = [...this._entries]; - entries.sort(compareTreeEntryPath); - return Buffer.concat( - entries.map(entry => { - const mode = Buffer.from(entry.mode.replace(/^0/, '')); - const space = Buffer.from(' '); - const path = Buffer.from(entry.path, 'utf8'); - const nullchar = Buffer.from([0]); - const oid = Buffer.from(entry.oid, 'hex'); - return Buffer.concat([mode, space, path, nullchar, oid]) - }) - ) - } - - /** - * @returns {TreeEntry[]} - */ - entries() { - return this._entries - } - - *[Symbol.iterator]() { - for (const entry of this._entries) { - yield entry; - } - } -} - -class GitObject { - static wrap({ type, object }) { - return Buffer.concat([ - Buffer.from(`${type} ${object.byteLength.toString()}\x00`), - Buffer.from(object), - ]) - } - - static unwrap(buffer) { - const s = buffer.indexOf(32); // first space - const i = buffer.indexOf(0); // first null value - const type = buffer.slice(0, s).toString('utf8'); // get type of object - const length = buffer.slice(s + 1, i).toString('utf8'); // get type of object - const actualLength = buffer.length - (i + 1); - // verify length - if (parseInt(length) !== actualLength) { - throw new InternalError( - `Length mismatch: expected ${length} bytes but got ${actualLength} instead.` - ) - } - return { - type, - object: Buffer.from(buffer.slice(i + 1)), - } - } -} - -async function readObjectLoose({ fs, gitdir, oid }) { - const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`; - const file = await fs.read(`${gitdir}/${source}`); - if (!file) { - return null - } - return { object: file, format: 'deflated', source } -} - -/** - * @param {Buffer} delta - * @param {Buffer} source - * @returns {Buffer} - */ -function applyDelta(delta, source) { - const reader = new BufferCursor(delta); - const sourceSize = readVarIntLE(reader); - - if (sourceSize !== source.byteLength) { - throw new InternalError( - `applyDelta expected source buffer to be ${sourceSize} bytes but the provided buffer was ${source.length} bytes` - ) - } - const targetSize = readVarIntLE(reader); - let target; - - const firstOp = readOp(reader, source); - // Speed optimization - return raw buffer if it's just single simple copy - if (firstOp.byteLength === targetSize) { - target = firstOp; - } else { - // Otherwise, allocate a fresh buffer and slices - target = Buffer.alloc(targetSize); - const writer = new BufferCursor(target); - writer.copy(firstOp); - - while (!reader.eof()) { - writer.copy(readOp(reader, source)); - } - - const tell = writer.tell(); - if (targetSize !== tell) { - throw new InternalError( - `applyDelta expected target buffer to be ${targetSize} bytes but the resulting buffer was ${tell} bytes` - ) - } - } - return target -} - -function readVarIntLE(reader) { - let result = 0; - let shift = 0; - let byte = null; - do { - byte = reader.readUInt8(); - result |= (byte & 0b01111111) << shift; - shift += 7; - } while (byte & 0b10000000) - return result -} - -function readCompactLE(reader, flags, size) { - let result = 0; - let shift = 0; - while (size--) { - if (flags & 0b00000001) { - result |= reader.readUInt8() << shift; - } - flags >>= 1; - shift += 8; - } - return result -} - -function readOp(reader, source) { - /** @type {number} */ - const byte = reader.readUInt8(); - const COPY = 0b10000000; - const OFFS = 0b00001111; - const SIZE = 0b01110000; - if (byte & COPY) { - // copy consists of 4 byte offset, 3 byte size (in LE order) - const offset = readCompactLE(reader, byte & OFFS, 4); - let size = readCompactLE(reader, (byte & SIZE) >> 4, 3); - // Yup. They really did this optimization. - if (size === 0) size = 0x10000; - return source.slice(offset, offset + size) - } else { - // insert - return reader.slice(byte) - } -} - -// Convert a value to an Async Iterator -// This will be easier with async generator functions. -function fromValue(value) { - let queue = [value]; - return { - next() { - return Promise.resolve({ done: queue.length === 0, value: queue.pop() }) - }, - return() { - queue = []; - return {} - }, - [Symbol.asyncIterator]() { - return this - }, - } -} - -function getIterator(iterable) { - if (iterable[Symbol.asyncIterator]) { - return iterable[Symbol.asyncIterator]() - } - if (iterable[Symbol.iterator]) { - return iterable[Symbol.iterator]() - } - if (iterable.next) { - return iterable - } - return fromValue(iterable) -} - -// inspired by 'gartal' but lighter-weight and more battle-tested. -class StreamReader { - constructor(stream) { - this.stream = getIterator(stream); - this.buffer = null; - this.cursor = 0; - this.undoCursor = 0; - this.started = false; - this._ended = false; - this._discardedBytes = 0; - } - - eof() { - return this._ended && this.cursor === this.buffer.length - } - - tell() { - return this._discardedBytes + this.cursor - } - - async byte() { - if (this.eof()) return - if (!this.started) await this._init(); - if (this.cursor === this.buffer.length) { - await this._loadnext(); - if (this._ended) return - } - this._moveCursor(1); - return this.buffer[this.undoCursor] - } - - async chunk() { - if (this.eof()) return - if (!this.started) await this._init(); - if (this.cursor === this.buffer.length) { - await this._loadnext(); - if (this._ended) return - } - this._moveCursor(this.buffer.length); - return this.buffer.slice(this.undoCursor, this.cursor) - } - - async read(n) { - if (this.eof()) return - if (!this.started) await this._init(); - if (this.cursor + n > this.buffer.length) { - this._trim(); - await this._accumulate(n); - } - this._moveCursor(n); - return this.buffer.slice(this.undoCursor, this.cursor) - } - - async skip(n) { - if (this.eof()) return - if (!this.started) await this._init(); - if (this.cursor + n > this.buffer.length) { - this._trim(); - await this._accumulate(n); - } - this._moveCursor(n); - } - - async undo() { - this.cursor = this.undoCursor; - } - - async _next() { - this.started = true; - let { done, value } = await this.stream.next(); - if (done) { - this._ended = true; - } - if (value) { - value = Buffer.from(value); - } - return value - } - - _trim() { - // Throw away parts of the buffer we don't need anymore - // assert(this.cursor <= this.buffer.length) - this.buffer = this.buffer.slice(this.undoCursor); - this.cursor -= this.undoCursor; - this._discardedBytes += this.undoCursor; - this.undoCursor = 0; - } - - _moveCursor(n) { - this.undoCursor = this.cursor; - this.cursor += n; - if (this.cursor > this.buffer.length) { - this.cursor = this.buffer.length; - } - } - - async _accumulate(n) { - if (this._ended) return - // Expand the buffer until we have N bytes of data - // or we've reached the end of the stream - const buffers = [this.buffer]; - while (this.cursor + n > lengthBuffers(buffers)) { - const nextbuffer = await this._next(); - if (this._ended) break - buffers.push(nextbuffer); - } - this.buffer = Buffer.concat(buffers); - } - - async _loadnext() { - this._discardedBytes += this.buffer.length; - this.undoCursor = 0; - this.cursor = 0; - this.buffer = await this._next(); - } - - async _init() { - this.buffer = await this._next(); - } -} - -// This helper function helps us postpone concatenating buffers, which -// would create intermediate buffer objects, -function lengthBuffers(buffers) { - return buffers.reduce((acc, buffer) => acc + buffer.length, 0) -} - -// My version of git-list-pack - roughly 15x faster than the original - -async function listpack(stream, onData) { - const reader = new StreamReader(stream); - let PACK = await reader.read(4); - PACK = PACK.toString('utf8'); - if (PACK !== 'PACK') { - throw new InternalError(`Invalid PACK header '${PACK}'`) - } - - let version = await reader.read(4); - version = version.readUInt32BE(0); - if (version !== 2) { - throw new InternalError(`Invalid packfile version: ${version}`) - } - - let numObjects = await reader.read(4); - numObjects = numObjects.readUInt32BE(0); - // If (for some godforsaken reason) this is an empty packfile, abort now. - if (numObjects < 1) return - - while (!reader.eof() && numObjects--) { - const offset = reader.tell(); - const { type, length, ofs, reference } = await parseHeader(reader); - const inflator = new pako.Inflate(); - while (!inflator.result) { - const chunk = await reader.chunk(); - if (reader.ended) break - inflator.push(chunk, false); - if (inflator.err) { - throw new InternalError(`Pako error: ${inflator.msg}`) - } - if (inflator.result) { - if (inflator.result.length !== length) { - throw new InternalError( - `Inflated object size is different from that stated in packfile.` - ) - } - - // Backtrack parser to where deflated data ends - await reader.undo(); - await reader.read(chunk.length - inflator.strm.avail_in); - const end = reader.tell(); - await onData({ - data: inflator.result, - type, - num: numObjects, - offset, - end, - reference, - ofs, - }); - } - } - } -} - -async function parseHeader(reader) { - // Object type is encoded in bits 654 - let byte = await reader.byte(); - const type = (byte >> 4) & 0b111; - // The length encoding get complicated. - // Last four bits of length is encoded in bits 3210 - let length = byte & 0b1111; - // Whether the next byte is part of the variable-length encoded number - // is encoded in bit 7 - if (byte & 0b10000000) { - let shift = 4; - do { - byte = await reader.byte(); - length |= (byte & 0b01111111) << shift; - shift += 7; - } while (byte & 0b10000000) - } - // Handle deltified objects - let ofs; - let reference; - if (type === 6) { - let shift = 0; - ofs = 0; - const bytes = []; - do { - byte = await reader.byte(); - ofs |= (byte & 0b01111111) << shift; - shift += 7; - bytes.push(byte); - } while (byte & 0b10000000) - reference = Buffer.from(bytes); - } - if (type === 7) { - const buf = await reader.read(20); - reference = buf; - } - return { type, length, ofs, reference } -} - -/* eslint-env node, browser */ - -let supportsDecompressionStream = false; - -async function inflate(buffer) { - if (supportsDecompressionStream === null) { - supportsDecompressionStream = testDecompressionStream(); - } - return supportsDecompressionStream - ? browserInflate(buffer) - : pako.inflate(buffer) -} - -async function browserInflate(buffer) { - const ds = new DecompressionStream('deflate'); - const d = new Blob([buffer]).stream().pipeThrough(ds); - return new Uint8Array(await new Response(d).arrayBuffer()) -} - -function testDecompressionStream() { - try { - const ds = new DecompressionStream('deflate'); - if (ds) return true - } catch (_) { - // no bother - } - return false -} - -function decodeVarInt(reader) { - const bytes = []; - let byte = 0; - let multibyte = 0; - do { - byte = reader.readUInt8(); - // We keep bits 6543210 - const lastSeven = byte & 0b01111111; - bytes.push(lastSeven); - // Whether the next byte is part of the variable-length encoded number - // is encoded in bit 7 - multibyte = byte & 0b10000000; - } while (multibyte) - // Now that all the bytes are in big-endian order, - // alternate shifting the bits left by 7 and OR-ing the next byte. - // And... do a weird increment-by-one thing that I don't quite understand. - return bytes.reduce((a, b) => ((a + 1) << 7) | b, -1) -} - -// I'm pretty much copying this one from the git C source code, -// because it makes no sense. -function otherVarIntDecode(reader, startWith) { - let result = startWith; - let shift = 4; - let byte = null; - do { - byte = reader.readUInt8(); - result |= (byte & 0b01111111) << shift; - shift += 7; - } while (byte & 0b10000000) - return result -} - -class GitPackIndex { - constructor(stuff) { - Object.assign(this, stuff); - this.offsetCache = {}; - } - - static async fromIdx({ idx, getExternalRefDelta }) { - const reader = new BufferCursor(idx); - const magic = reader.slice(4).toString('hex'); - // Check for IDX v2 magic number - if (magic !== 'ff744f63') { - return // undefined - } - const version = reader.readUInt32BE(); - if (version !== 2) { - throw new InternalError( - `Unable to read version ${version} packfile IDX. (Only version 2 supported)` - ) - } - if (idx.byteLength > 2048 * 1024 * 1024) { - throw new InternalError( - `To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.` - ) - } - // Skip over fanout table - reader.seek(reader.tell() + 4 * 255); - // Get hashes - const size = reader.readUInt32BE(); - const hashes = []; - for (let i = 0; i < size; i++) { - const hash = reader.slice(20).toString('hex'); - hashes[i] = hash; - } - reader.seek(reader.tell() + 4 * size); - // Skip over CRCs - // Get offsets - const offsets = new Map(); - for (let i = 0; i < size; i++) { - offsets.set(hashes[i], reader.readUInt32BE()); - } - const packfileSha = reader.slice(20).toString('hex'); - return new GitPackIndex({ - hashes, - crcs: {}, - offsets, - packfileSha, - getExternalRefDelta, - }) - } - - static async fromPack({ pack, getExternalRefDelta, onProgress }) { - const listpackTypes = { - 1: 'commit', - 2: 'tree', - 3: 'blob', - 4: 'tag', - 6: 'ofs-delta', - 7: 'ref-delta', - }; - const offsetToObject = {}; - - // Older packfiles do NOT use the shasum of the pack itself, - // so it is recommended to just use whatever bytes are in the trailer. - // Source: https://github.com/git/git/commit/1190a1acf800acdcfd7569f87ac1560e2d077414 - const packfileSha = pack.slice(-20).toString('hex'); - - const hashes = []; - const crcs = {}; - const offsets = new Map(); - let totalObjectCount = null; - let lastPercent = null; - - await listpack([pack], async ({ data, type, reference, offset, num }) => { - if (totalObjectCount === null) totalObjectCount = num; - const percent = Math.floor( - ((totalObjectCount - num) * 100) / totalObjectCount - ); - if (percent !== lastPercent) { - if (onProgress) { - await onProgress({ - phase: 'Receiving objects', - loaded: totalObjectCount - num, - total: totalObjectCount, - }); - } - } - lastPercent = percent; - // Change type from a number to a meaningful string - type = listpackTypes[type]; - - if (['commit', 'tree', 'blob', 'tag'].includes(type)) { - offsetToObject[offset] = { - type, - offset, - }; - } else if (type === 'ofs-delta') { - offsetToObject[offset] = { - type, - offset, - }; - } else if (type === 'ref-delta') { - offsetToObject[offset] = { - type, - offset, - }; - } - }); - - // We need to know the lengths of the slices to compute the CRCs. - const offsetArray = Object.keys(offsetToObject).map(Number); - for (const [i, start] of offsetArray.entries()) { - const end = - i + 1 === offsetArray.length ? pack.byteLength - 20 : offsetArray[i + 1]; - const o = offsetToObject[start]; - const crc = crc32.buf(pack.slice(start, end)) >>> 0; - o.end = end; - o.crc = crc; - } - - // We don't have the hashes yet. But we can generate them using the .readSlice function! - const p = new GitPackIndex({ - pack: Promise.resolve(pack), - packfileSha, - crcs, - hashes, - offsets, - getExternalRefDelta, - }); - - // Resolve deltas and compute the oids - lastPercent = null; - let count = 0; - const objectsByDepth = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - for (let offset in offsetToObject) { - offset = Number(offset); - const percent = Math.floor((count++ * 100) / totalObjectCount); - if (percent !== lastPercent) { - if (onProgress) { - await onProgress({ - phase: 'Resolving deltas', - loaded: count, - total: totalObjectCount, - }); - } - } - lastPercent = percent; - - const o = offsetToObject[offset]; - if (o.oid) continue - try { - p.readDepth = 0; - p.externalReadDepth = 0; - const { type, object } = await p.readSlice({ start: offset }); - objectsByDepth[p.readDepth] += 1; - const oid = await shasum(GitObject.wrap({ type, object })); - o.oid = oid; - hashes.push(oid); - offsets.set(oid, offset); - crcs[oid] = o.crc; - } catch (err) { - continue - } - } - - hashes.sort(); - return p - } - - async toBuffer() { - const buffers = []; - const write = (str, encoding) => { - buffers.push(Buffer.from(str, encoding)); - }; - // Write out IDX v2 magic number - write('ff744f63', 'hex'); - // Write out version number 2 - write('00000002', 'hex'); - // Write fanout table - const fanoutBuffer = new BufferCursor(Buffer.alloc(256 * 4)); - for (let i = 0; i < 256; i++) { - let count = 0; - for (const hash of this.hashes) { - if (parseInt(hash.slice(0, 2), 16) <= i) count++; - } - fanoutBuffer.writeUInt32BE(count); - } - buffers.push(fanoutBuffer.buffer); - // Write out hashes - for (const hash of this.hashes) { - write(hash, 'hex'); - } - // Write out crcs - const crcsBuffer = new BufferCursor(Buffer.alloc(this.hashes.length * 4)); - for (const hash of this.hashes) { - crcsBuffer.writeUInt32BE(this.crcs[hash]); - } - buffers.push(crcsBuffer.buffer); - // Write out offsets - const offsetsBuffer = new BufferCursor(Buffer.alloc(this.hashes.length * 4)); - for (const hash of this.hashes) { - offsetsBuffer.writeUInt32BE(this.offsets.get(hash)); - } - buffers.push(offsetsBuffer.buffer); - // Write out packfile checksum - write(this.packfileSha, 'hex'); - // Write out shasum - const totalBuffer = Buffer.concat(buffers); - const sha = await shasum(totalBuffer); - const shaBuffer = Buffer.alloc(20); - shaBuffer.write(sha, 'hex'); - return Buffer.concat([totalBuffer, shaBuffer]) - } - - async load({ pack }) { - this.pack = pack; - } - - async unload() { - this.pack = null; - } - - async read({ oid }) { - if (!this.offsets.get(oid)) { - if (this.getExternalRefDelta) { - this.externalReadDepth++; - return this.getExternalRefDelta(oid) - } else { - throw new InternalError(`Could not read object ${oid} from packfile`) - } - } - const start = this.offsets.get(oid); - return this.readSlice({ start }) - } - - async readSlice({ start }) { - if (this.offsetCache[start]) { - return Object.assign({}, this.offsetCache[start]) - } - this.readDepth++; - const types = { - 0b0010000: 'commit', - 0b0100000: 'tree', - 0b0110000: 'blob', - 0b1000000: 'tag', - 0b1100000: 'ofs_delta', - 0b1110000: 'ref_delta', - }; - if (!this.pack) { - throw new InternalError( - 'Tried to read from a GitPackIndex with no packfile loaded into memory' - ) - } - const raw = (await this.pack).slice(start); - const reader = new BufferCursor(raw); - const byte = reader.readUInt8(); - // Object type is encoded in bits 654 - const btype = byte & 0b1110000; - let type = types[btype]; - if (type === undefined) { - throw new InternalError('Unrecognized type: 0b' + btype.toString(2)) - } - // The length encoding get complicated. - // Last four bits of length is encoded in bits 3210 - const lastFour = byte & 0b1111; - let length = lastFour; - // Whether the next byte is part of the variable-length encoded number - // is encoded in bit 7 - const multibyte = byte & 0b10000000; - if (multibyte) { - length = otherVarIntDecode(reader, lastFour); - } - let base = null; - let object = null; - // Handle deltified objects - if (type === 'ofs_delta') { - const offset = decodeVarInt(reader); - const baseOffset = start - offset - ;({ object: base, type } = await this.readSlice({ start: baseOffset })); - } - if (type === 'ref_delta') { - const oid = reader.slice(20).toString('hex') - ;({ object: base, type } = await this.read({ oid })); - } - // Handle undeltified objects - const buffer = raw.slice(reader.tell()); - object = Buffer.from(await inflate(buffer)); - // Assert that the object length is as expected. - if (object.byteLength !== length) { - throw new InternalError( - `Packfile told us object would have length ${length} but it had length ${object.byteLength}` - ) - } - if (base) { - object = Buffer.from(applyDelta(object, base)); - } - // Cache the result based on depth. - if (this.readDepth > 3) { - // hand tuned for speed / memory usage tradeoff - this.offsetCache[start] = { type, object }; - } - return { type, format: 'content', object } - } -} - -const PackfileCache = Symbol('PackfileCache'); - -async function loadPackIndex({ - fs, - filename, - getExternalRefDelta, - emitter, - emitterPrefix, -}) { - const idx = await fs.read(filename); - return GitPackIndex.fromIdx({ idx, getExternalRefDelta }) -} - -function readPackIndex({ - fs, - cache, - filename, - getExternalRefDelta, - emitter, - emitterPrefix, -}) { - // Try to get the packfile index from the in-memory cache - if (!cache[PackfileCache]) cache[PackfileCache] = new Map(); - let p = cache[PackfileCache].get(filename); - if (!p) { - p = loadPackIndex({ - fs, - filename, - getExternalRefDelta, - emitter, - emitterPrefix, - }); - cache[PackfileCache].set(filename, p); - } - return p -} - -async function readObjectPacked({ - fs, - cache, - gitdir, - oid, - format = 'content', - getExternalRefDelta, -}) { - // Check to see if it's in a packfile. - // Iterate through all the .idx files - let list = await fs.readdir(join(gitdir, 'objects/pack')); - list = list.filter(x => x.endsWith('.idx')); - for (const filename of list) { - const indexFile = `${gitdir}/objects/pack/${filename}`; - const p = await readPackIndex({ - fs, - cache, - filename: indexFile, - getExternalRefDelta, - }); - if (p.error) throw new InternalError(p.error) - // If the packfile DOES have the oid we're looking for... - if (p.offsets.has(oid)) { - // Get the resolved git object from the packfile - if (!p.pack) { - const packFile = indexFile.replace(/idx$/, 'pack'); - p.pack = fs.read(packFile); - } - const result = await p.read({ oid, getExternalRefDelta }); - result.format = 'content'; - result.source = `objects/pack/${filename.replace(/idx$/, 'pack')}`; - return result - } - } - // Failed to find it - return null -} - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} args.oid - * @param {string} [args.format] - */ -async function _readObject({ - fs, - cache, - gitdir, - oid, - format = 'content', -}) { - // Curry the current read method so that the packfile un-deltification - // process can acquire external ref-deltas. - const getExternalRefDelta = oid => _readObject({ fs, cache, gitdir, oid }); - - let result; - // Empty tree - hard-coded so we can use it as a shorthand. - // Note: I think the canonical git implementation must do this too because - // `git cat-file -t 4b825dc642cb6eb9a060e54bf8d69288fbee4904` prints "tree" even in empty repos. - if (oid === '4b825dc642cb6eb9a060e54bf8d69288fbee4904') { - result = { format: 'wrapped', object: Buffer.from(`tree 0\x00`) }; - } - // Look for it in the loose object directory. - if (!result) { - result = await readObjectLoose({ fs, gitdir, oid }); - } - // Check to see if it's in a packfile. - if (!result) { - result = await readObjectPacked({ - fs, - cache, - gitdir, - oid, - getExternalRefDelta, - }); - } - // Finally - if (!result) { - throw new NotFoundError(oid) - } - - if (format === 'deflated') { - return result - } - - if (result.format === 'deflated') { - result.object = Buffer.from(await inflate(result.object)); - result.format = 'wrapped'; - } - - if (result.format === 'wrapped') { - if (format === 'wrapped' && result.format === 'wrapped') { - return result - } - const sha = await shasum(result.object); - if (sha !== oid) { - throw new InternalError( - `SHA check failed! Expected ${oid}, computed ${sha}` - ) - } - const { object, type } = GitObject.unwrap(result.object); - result.type = type; - result.object = object; - result.format = 'content'; - } - - if (result.format === 'content') { - if (format === 'content') return result - return - } - - throw new InternalError(`invalid format "${result.format}"`) -} - -class AlreadyExistsError extends BaseError { - /** - * @param {'note'|'remote'|'tag'|'branch'} noun - * @param {string} where - * @param {boolean} canForce - */ - constructor(noun, where, canForce = true) { - super( - `Failed to create ${noun} at ${where} because it already exists.${ - canForce - ? ` (Hint: use 'force: true' parameter to overwrite existing ${noun}.)` - : '' - }` - ); - this.code = this.name = AlreadyExistsError.code; - this.data = { noun, where, canForce }; - } -} -/** @type {'AlreadyExistsError'} */ -AlreadyExistsError.code = 'AlreadyExistsError'; - -class AmbiguousError extends BaseError { - /** - * @param {'oids'|'refs'} nouns - * @param {string} short - * @param {string[]} matches - */ - constructor(nouns, short, matches) { - super( - `Found multiple ${nouns} matching "${short}" (${matches.join( - ', ' - )}). Use a longer abbreviation length to disambiguate them.` - ); - this.code = this.name = AmbiguousError.code; - this.data = { nouns, short, matches }; - } -} -/** @type {'AmbiguousError'} */ -AmbiguousError.code = 'AmbiguousError'; - -class CheckoutConflictError extends BaseError { - /** - * @param {string[]} filepaths - */ - constructor(filepaths) { - super( - `Your local changes to the following files would be overwritten by checkout: ${filepaths.join( - ', ' - )}` - ); - this.code = this.name = CheckoutConflictError.code; - this.data = { filepaths }; - } -} -/** @type {'CheckoutConflictError'} */ -CheckoutConflictError.code = 'CheckoutConflictError'; - -class CommitNotFetchedError extends BaseError { - /** - * @param {string} ref - * @param {string} oid - */ - constructor(ref, oid) { - super( - `Failed to checkout "${ref}" because commit ${oid} is not available locally. Do a git fetch to make the branch available locally.` - ); - this.code = this.name = CommitNotFetchedError.code; - this.data = { ref, oid }; - } -} -/** @type {'CommitNotFetchedError'} */ -CommitNotFetchedError.code = 'CommitNotFetchedError'; - -class EmptyServerResponseError extends BaseError { - constructor() { - super(`Empty response from git server.`); - this.code = this.name = EmptyServerResponseError.code; - this.data = {}; - } -} -/** @type {'EmptyServerResponseError'} */ -EmptyServerResponseError.code = 'EmptyServerResponseError'; - -class FastForwardError extends BaseError { - constructor() { - super(`A simple fast-forward merge was not possible.`); - this.code = this.name = FastForwardError.code; - this.data = {}; - } -} -/** @type {'FastForwardError'} */ -FastForwardError.code = 'FastForwardError'; - -class GitPushError extends BaseError { - /** - * @param {string} prettyDetails - * @param {PushResult} result - */ - constructor(prettyDetails, result) { - super(`One or more branches were not updated: ${prettyDetails}`); - this.code = this.name = GitPushError.code; - this.data = { prettyDetails, result }; - } -} -/** @type {'GitPushError'} */ -GitPushError.code = 'GitPushError'; - -class HttpError extends BaseError { - /** - * @param {number} statusCode - * @param {string} statusMessage - * @param {string} response - */ - constructor(statusCode, statusMessage, response) { - super(`HTTP Error: ${statusCode} ${statusMessage}`); - this.code = this.name = HttpError.code; - this.data = { statusCode, statusMessage, response }; - } -} -/** @type {'HttpError'} */ -HttpError.code = 'HttpError'; - -class InvalidFilepathError extends BaseError { - /** - * @param {'leading-slash'|'trailing-slash'} [reason] - */ - constructor(reason) { - let message = 'invalid filepath'; - if (reason === 'leading-slash' || reason === 'trailing-slash') { - message = `"filepath" parameter should not include leading or trailing directory separators because these can cause problems on some platforms.`; - } - super(message); - this.code = this.name = InvalidFilepathError.code; - this.data = { reason }; - } -} -/** @type {'InvalidFilepathError'} */ -InvalidFilepathError.code = 'InvalidFilepathError'; - -class InvalidRefNameError extends BaseError { - /** - * @param {string} ref - * @param {string} suggestion - * @param {boolean} canForce - */ - constructor(ref, suggestion) { - super( - `"${ref}" would be an invalid git reference. (Hint: a valid alternative would be "${suggestion}".)` - ); - this.code = this.name = InvalidRefNameError.code; - this.data = { ref, suggestion }; - } -} -/** @type {'InvalidRefNameError'} */ -InvalidRefNameError.code = 'InvalidRefNameError'; - -class MaxDepthError extends BaseError { - /** - * @param {number} depth - */ - constructor(depth) { - super(`Maximum search depth of ${depth} exceeded.`); - this.code = this.name = MaxDepthError.code; - this.data = { depth }; - } -} -/** @type {'MaxDepthError'} */ -MaxDepthError.code = 'MaxDepthError'; - -class MergeNotSupportedError extends BaseError { - constructor() { - super(`Merges with conflicts are not supported yet.`); - this.code = this.name = MergeNotSupportedError.code; - this.data = {}; - } -} -/** @type {'MergeNotSupportedError'} */ -MergeNotSupportedError.code = 'MergeNotSupportedError'; - -class MissingNameError extends BaseError { - /** - * @param {'author'|'committer'|'tagger'} role - */ - constructor(role) { - super( - `No name was provided for ${role} in the argument or in the .git/config file.` - ); - this.code = this.name = MissingNameError.code; - this.data = { role }; - } -} -/** @type {'MissingNameError'} */ -MissingNameError.code = 'MissingNameError'; - -class MissingParameterError extends BaseError { - /** - * @param {string} parameter - */ - constructor(parameter) { - super( - `The function requires a "${parameter}" parameter but none was provided.` - ); - this.code = this.name = MissingParameterError.code; - this.data = { parameter }; - } -} -/** @type {'MissingParameterError'} */ -MissingParameterError.code = 'MissingParameterError'; - -class ParseError extends BaseError { - /** - * @param {string} expected - * @param {string} actual - */ - constructor(expected, actual) { - super(`Expected "${expected}" but received "${actual}".`); - this.code = this.name = ParseError.code; - this.data = { expected, actual }; - } -} -/** @type {'ParseError'} */ -ParseError.code = 'ParseError'; - -class PushRejectedError extends BaseError { - /** - * @param {'not-fast-forward'|'tag-exists'} reason - */ - constructor(reason) { - let message = ''; - if (reason === 'not-fast-forward') { - message = ' because it was not a simple fast-forward'; - } else if (reason === 'tag-exists') { - message = ' because tag already exists'; - } - super(`Push rejected${message}. Use "force: true" to override.`); - this.code = this.name = PushRejectedError.code; - this.data = { reason }; - } -} -/** @type {'PushRejectedError'} */ -PushRejectedError.code = 'PushRejectedError'; - -class RemoteCapabilityError extends BaseError { - /** - * @param {'shallow'|'deepen-since'|'deepen-not'|'deepen-relative'} capability - * @param {'depth'|'since'|'exclude'|'relative'} parameter - */ - constructor(capability, parameter) { - super( - `Remote does not support the "${capability}" so the "${parameter}" parameter cannot be used.` - ); - this.code = this.name = RemoteCapabilityError.code; - this.data = { capability, parameter }; - } -} -/** @type {'RemoteCapabilityError'} */ -RemoteCapabilityError.code = 'RemoteCapabilityError'; - -class SmartHttpError extends BaseError { - /** - * @param {string} preview - * @param {string} response - */ - constructor(preview, response) { - super( - `Remote did not reply using the "smart" HTTP protocol. Expected "001e# service=git-upload-pack" but received: ${preview}` - ); - this.code = this.name = SmartHttpError.code; - this.data = { preview, response }; - } -} -/** @type {'SmartHttpError'} */ -SmartHttpError.code = 'SmartHttpError'; - -class UnknownTransportError extends BaseError { - /** - * @param {string} url - * @param {string} transport - * @param {string} suggestion - */ - constructor(url, transport, suggestion) { - super( - `Git remote "${url}" uses an unrecognized transport protocol: "${transport}"` - ); - this.code = this.name = UnknownTransportError.code; - this.data = { url, transport, suggestion }; - } -} -/** @type {'UnknownTransportError'} */ -UnknownTransportError.code = 'UnknownTransportError'; - -class UrlParseError extends BaseError { - /** - * @param {string} url - */ - constructor(url) { - super(`Cannot parse remote URL: "${url}"`); - this.code = this.name = UrlParseError.code; - this.data = { url }; - } -} -/** @type {'UrlParseError'} */ -UrlParseError.code = 'UrlParseError'; - -class UserCanceledError extends BaseError { - constructor() { - super(`The operation was canceled.`); - this.code = this.name = UserCanceledError.code; - this.data = {}; - } -} -/** @type {'UserCanceledError'} */ -UserCanceledError.code = 'UserCanceledError'; - - - -var Errors = /*#__PURE__*/Object.freeze({ - __proto__: null, - AlreadyExistsError: AlreadyExistsError, - AmbiguousError: AmbiguousError, - CheckoutConflictError: CheckoutConflictError, - CommitNotFetchedError: CommitNotFetchedError, - EmptyServerResponseError: EmptyServerResponseError, - FastForwardError: FastForwardError, - GitPushError: GitPushError, - HttpError: HttpError, - InternalError: InternalError, - InvalidFilepathError: InvalidFilepathError, - InvalidOidError: InvalidOidError, - InvalidRefNameError: InvalidRefNameError, - MaxDepthError: MaxDepthError, - MergeNotSupportedError: MergeNotSupportedError, - MissingNameError: MissingNameError, - MissingParameterError: MissingParameterError, - NoRefspecError: NoRefspecError, - NotFoundError: NotFoundError, - ObjectTypeError: ObjectTypeError, - ParseError: ParseError, - PushRejectedError: PushRejectedError, - RemoteCapabilityError: RemoteCapabilityError, - SmartHttpError: SmartHttpError, - UnknownTransportError: UnknownTransportError, - UnsafeFilepathError: UnsafeFilepathError, - UrlParseError: UrlParseError, - UserCanceledError: UserCanceledError -}); - -function formatAuthor({ name, email, timestamp, timezoneOffset }) { - timezoneOffset = formatTimezoneOffset(timezoneOffset); - return `${name} <${email}> ${timestamp} ${timezoneOffset}` -} - -// The amount of effort that went into crafting these cases to handle -// -0 (just so we don't lose that information when parsing and reconstructing) -// but can also default to +0 was extraordinary. - -function formatTimezoneOffset(minutes) { - const sign = simpleSign(negateExceptForZero(minutes)); - minutes = Math.abs(minutes); - const hours = Math.floor(minutes / 60); - minutes -= hours * 60; - let strHours = String(hours); - let strMinutes = String(minutes); - if (strHours.length < 2) strHours = '0' + strHours; - if (strMinutes.length < 2) strMinutes = '0' + strMinutes; - return (sign === -1 ? '-' : '+') + strHours + strMinutes -} - -function simpleSign(n) { - return Math.sign(n) || (Object.is(n, -0) ? -1 : 1) -} - -function negateExceptForZero(n) { - return n === 0 ? n : -n -} - -function normalizeNewlines(str) { - // remove all <CR> - str = str.replace(/\r/g, ''); - // no extra newlines up front - str = str.replace(/^\n+/, ''); - // and a single newline at the end - str = str.replace(/\n+$/, '') + '\n'; - return str -} - -function parseAuthor(author) { - const [, name, email, timestamp, offset] = author.match( - /^(.*) <(.*)> (.*) (.*)$/ - ); - return { - name: name, - email: email, - timestamp: Number(timestamp), - timezoneOffset: parseTimezoneOffset(offset), - } -} - -// The amount of effort that went into crafting these cases to handle -// -0 (just so we don't lose that information when parsing and reconstructing) -// but can also default to +0 was extraordinary. - -function parseTimezoneOffset(offset) { - let [, sign, hours, minutes] = offset.match(/(\+|-)(\d\d)(\d\d)/); - minutes = (sign === '+' ? 1 : -1) * (Number(hours) * 60 + Number(minutes)); - return negateExceptForZero$1(minutes) -} - -function negateExceptForZero$1(n) { - return n === 0 ? n : -n -} - -class GitAnnotatedTag { - constructor(tag) { - if (typeof tag === 'string') { - this._tag = tag; - } else if (Buffer.isBuffer(tag)) { - this._tag = tag.toString('utf8'); - } else if (typeof tag === 'object') { - this._tag = GitAnnotatedTag.render(tag); - } else { - throw new InternalError( - 'invalid type passed to GitAnnotatedTag constructor' - ) - } - } - - static from(tag) { - return new GitAnnotatedTag(tag) - } - - static render(obj) { - return `object ${obj.object} -type ${obj.type} -tag ${obj.tag} -tagger ${formatAuthor(obj.tagger)} - -${obj.message} -${obj.gpgsig ? obj.gpgsig : ''}` - } - - justHeaders() { - return this._tag.slice(0, this._tag.indexOf('\n\n')) - } - - message() { - const tag = this.withoutSignature(); - return tag.slice(tag.indexOf('\n\n') + 2) - } - - parse() { - return Object.assign(this.headers(), { - message: this.message(), - gpgsig: this.gpgsig(), - }) - } - - render() { - return this._tag - } - - headers() { - const headers = this.justHeaders().split('\n'); - const hs = []; - for (const h of headers) { - if (h[0] === ' ') { - // combine with previous header (without space indent) - hs[hs.length - 1] += '\n' + h.slice(1); - } else { - hs.push(h); - } - } - const obj = {}; - for (const h of hs) { - const key = h.slice(0, h.indexOf(' ')); - const value = h.slice(h.indexOf(' ') + 1); - if (Array.isArray(obj[key])) { - obj[key].push(value); - } else { - obj[key] = value; - } - } - if (obj.tagger) { - obj.tagger = parseAuthor(obj.tagger); - } - if (obj.committer) { - obj.committer = parseAuthor(obj.committer); - } - return obj - } - - withoutSignature() { - const tag = normalizeNewlines(this._tag); - if (tag.indexOf('\n-----BEGIN PGP SIGNATURE-----') === -1) return tag - return tag.slice(0, tag.lastIndexOf('\n-----BEGIN PGP SIGNATURE-----')) - } - - gpgsig() { - if (this._tag.indexOf('\n-----BEGIN PGP SIGNATURE-----') === -1) return - const signature = this._tag.slice( - this._tag.indexOf('-----BEGIN PGP SIGNATURE-----'), - this._tag.indexOf('-----END PGP SIGNATURE-----') + - '-----END PGP SIGNATURE-----'.length - ); - return normalizeNewlines(signature) - } - - payload() { - return this.withoutSignature() + '\n' - } - - toObject() { - return Buffer.from(this._tag, 'utf8') - } - - static async sign(tag, sign, secretKey) { - const payload = tag.payload(); - let { signature } = await sign({ payload, secretKey }); - // renormalize the line endings to the one true line-ending - signature = normalizeNewlines(signature); - const signedTag = payload + signature; - // return a new tag object - return GitAnnotatedTag.from(signedTag) - } -} - -function indent(str) { - return ( - str - .trim() - .split('\n') - .map(x => ' ' + x) - .join('\n') + '\n' - ) -} - -function outdent(str) { - return str - .split('\n') - .map(x => x.replace(/^ /, '')) - .join('\n') -} - -class GitCommit { - constructor(commit) { - if (typeof commit === 'string') { - this._commit = commit; - } else if (Buffer.isBuffer(commit)) { - this._commit = commit.toString('utf8'); - } else if (typeof commit === 'object') { - this._commit = GitCommit.render(commit); - } else { - throw new InternalError('invalid type passed to GitCommit constructor') - } - } - - static fromPayloadSignature({ payload, signature }) { - const headers = GitCommit.justHeaders(payload); - const message = GitCommit.justMessage(payload); - const commit = normalizeNewlines( - headers + '\ngpgsig' + indent(signature) + '\n' + message - ); - return new GitCommit(commit) - } - - static from(commit) { - return new GitCommit(commit) - } - - toObject() { - return Buffer.from(this._commit, 'utf8') - } - - // Todo: allow setting the headers and message - headers() { - return this.parseHeaders() - } - - // Todo: allow setting the headers and message - message() { - return GitCommit.justMessage(this._commit) - } - - parse() { - return Object.assign({ message: this.message() }, this.headers()) - } - - static justMessage(commit) { - return normalizeNewlines(commit.slice(commit.indexOf('\n\n') + 2)) - } - - static justHeaders(commit) { - return commit.slice(0, commit.indexOf('\n\n')) - } - - parseHeaders() { - const headers = GitCommit.justHeaders(this._commit).split('\n'); - const hs = []; - for (const h of headers) { - if (h[0] === ' ') { - // combine with previous header (without space indent) - hs[hs.length - 1] += '\n' + h.slice(1); - } else { - hs.push(h); - } - } - const obj = { - parent: [], - }; - for (const h of hs) { - const key = h.slice(0, h.indexOf(' ')); - const value = h.slice(h.indexOf(' ') + 1); - if (Array.isArray(obj[key])) { - obj[key].push(value); - } else { - obj[key] = value; - } - } - if (obj.author) { - obj.author = parseAuthor(obj.author); - } - if (obj.committer) { - obj.committer = parseAuthor(obj.committer); - } - return obj - } - - static renderHeaders(obj) { - let headers = ''; - if (obj.tree) { - headers += `tree ${obj.tree}\n`; - } else { - headers += `tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n`; // the null tree - } - if (obj.parent) { - if (obj.parent.length === undefined) { - throw new InternalError(`commit 'parent' property should be an array`) - } - for (const p of obj.parent) { - headers += `parent ${p}\n`; - } - } - const author = obj.author; - headers += `author ${formatAuthor(author)}\n`; - const committer = obj.committer || obj.author; - headers += `committer ${formatAuthor(committer)}\n`; - if (obj.gpgsig) { - headers += 'gpgsig' + indent(obj.gpgsig); - } - return headers - } - - static render(obj) { - return GitCommit.renderHeaders(obj) + '\n' + normalizeNewlines(obj.message) - } - - render() { - return this._commit - } - - withoutSignature() { - const commit = normalizeNewlines(this._commit); - if (commit.indexOf('\ngpgsig') === -1) return commit - const headers = commit.slice(0, commit.indexOf('\ngpgsig')); - const message = commit.slice( - commit.indexOf('-----END PGP SIGNATURE-----\n') + - '-----END PGP SIGNATURE-----\n'.length - ); - return normalizeNewlines(headers + '\n' + message) - } - - isolateSignature() { - const signature = this._commit.slice( - this._commit.indexOf('-----BEGIN PGP SIGNATURE-----'), - this._commit.indexOf('-----END PGP SIGNATURE-----') + - '-----END PGP SIGNATURE-----'.length - ); - return outdent(signature) - } - - static async sign(commit, sign, secretKey) { - const payload = commit.withoutSignature(); - const message = GitCommit.justMessage(commit._commit); - let { signature } = await sign({ payload, secretKey }); - // renormalize the line endings to the one true line-ending - signature = normalizeNewlines(signature); - const headers = GitCommit.justHeaders(commit._commit); - const signedCommit = - headers + '\n' + 'gpgsig' + indent(signature) + '\n' + message; - // return a new commit object - return GitCommit.from(signedCommit) - } -} - -async function resolveTree({ fs, cache, gitdir, oid }) { - // Empty tree - bypass `readObject` - if (oid === '4b825dc642cb6eb9a060e54bf8d69288fbee4904') { - return { tree: GitTree.from([]), oid } - } - const { type, object } = await _readObject({ fs, cache, gitdir, oid }); - // Resolve annotated tag objects to whatever - if (type === 'tag') { - oid = GitAnnotatedTag.from(object).parse().object; - return resolveTree({ fs, cache, gitdir, oid }) - } - // Resolve commits to trees - if (type === 'commit') { - oid = GitCommit.from(object).parse().tree; - return resolveTree({ fs, cache, gitdir, oid }) - } - if (type !== 'tree') { - throw new ObjectTypeError(oid, type, 'tree') - } - return { tree: GitTree.from(object), oid } -} - -class GitWalkerRepo { - constructor({ fs, gitdir, ref, cache }) { - this.fs = fs; - this.cache = cache; - this.gitdir = gitdir; - this.mapPromise = (async () => { - const map = new Map(); - let oid; - try { - oid = await GitRefManager.resolve({ fs, gitdir, ref }); - } catch (e) { - if (e instanceof NotFoundError) { - // Handle fresh branches with no commits - oid = '4b825dc642cb6eb9a060e54bf8d69288fbee4904'; - } - } - const tree = await resolveTree({ fs, cache: this.cache, gitdir, oid }); - tree.type = 'tree'; - tree.mode = '40000'; - map.set('.', tree); - return map - })(); - const walker = this; - this.ConstructEntry = class TreeEntry { - constructor(fullpath) { - this._fullpath = fullpath; - this._type = false; - this._mode = false; - this._stat = false; - this._content = false; - this._oid = false; - } - - async type() { - return walker.type(this) - } - - async mode() { - return walker.mode(this) - } - - async stat() { - return walker.stat(this) - } - - async content() { - return walker.content(this) - } - - async oid() { - return walker.oid(this) - } - }; - } - - async readdir(entry) { - const filepath = entry._fullpath; - const { fs, cache, gitdir } = this; - const map = await this.mapPromise; - const obj = map.get(filepath); - if (!obj) throw new Error(`No obj for ${filepath}`) - const oid = obj.oid; - if (!oid) throw new Error(`No oid for obj ${JSON.stringify(obj)}`) - if (obj.type !== 'tree') { - // TODO: support submodules (type === 'commit') - return null - } - const { type, object } = await _readObject({ fs, cache, gitdir, oid }); - if (type !== obj.type) { - throw new ObjectTypeError(oid, type, obj.type) - } - const tree = GitTree.from(object); - // cache all entries - for (const entry of tree) { - map.set(join(filepath, entry.path), entry); - } - return tree.entries().map(entry => join(filepath, entry.path)) - } - - async type(entry) { - if (entry._type === false) { - const map = await this.mapPromise; - const { type } = map.get(entry._fullpath); - entry._type = type; - } - return entry._type - } - - async mode(entry) { - if (entry._mode === false) { - const map = await this.mapPromise; - const { mode } = map.get(entry._fullpath); - entry._mode = normalizeMode(parseInt(mode, 8)); - } - return entry._mode - } - - async stat(_entry) {} - - async content(entry) { - if (entry._content === false) { - const map = await this.mapPromise; - const { fs, cache, gitdir } = this; - const obj = map.get(entry._fullpath); - const oid = obj.oid; - const { type, object } = await _readObject({ fs, cache, gitdir, oid }); - if (type !== 'blob') { - entry._content = undefined; - } else { - entry._content = new Uint8Array(object); - } - } - return entry._content - } - - async oid(entry) { - if (entry._oid === false) { - const map = await this.mapPromise; - const obj = map.get(entry._fullpath); - entry._oid = obj.oid; - } - return entry._oid - } -} - -// @ts-check - -/** - * @param {object} args - * @param {string} [args.ref='HEAD'] - * @returns {Walker} - */ -function TREE({ ref = 'HEAD' }) { - const o = Object.create(null); - Object.defineProperty(o, GitWalkSymbol, { - value: function({ fs, gitdir, cache }) { - return new GitWalkerRepo({ fs, gitdir, ref, cache }) - }, - }); - Object.freeze(o); - return o -} - -// @ts-check - -class GitWalkerFs { - constructor({ fs, dir, gitdir, cache }) { - this.fs = fs; - this.cache = cache; - this.dir = dir; - this.gitdir = gitdir; - const walker = this; - this.ConstructEntry = class WorkdirEntry { - constructor(fullpath) { - this._fullpath = fullpath; - this._type = false; - this._mode = false; - this._stat = false; - this._content = false; - this._oid = false; - } - - async type() { - return walker.type(this) - } - - async mode() { - return walker.mode(this) - } - - async stat() { - return walker.stat(this) - } - - async content() { - return walker.content(this) - } - - async oid() { - return walker.oid(this) - } - }; - } - - async readdir(entry) { - const filepath = entry._fullpath; - const { fs, dir } = this; - const names = await fs.readdir(join(dir, filepath)); - if (names === null) return null - return names.map(name => join(filepath, name)) - } - - async type(entry) { - if (entry._type === false) { - await entry.stat(); - } - return entry._type - } - - async mode(entry) { - if (entry._mode === false) { - await entry.stat(); - } - return entry._mode - } - - async stat(entry) { - if (entry._stat === false) { - const { fs, dir } = this; - let stat = await fs.lstat(`${dir}/${entry._fullpath}`); - if (!stat) { - throw new Error( - `ENOENT: no such file or directory, lstat '${entry._fullpath}'` - ) - } - let type = stat.isDirectory() ? 'tree' : 'blob'; - if (type === 'blob' && !stat.isFile() && !stat.isSymbolicLink()) { - type = 'special'; - } - entry._type = type; - stat = normalizeStats(stat); - entry._mode = stat.mode; - // workaround for a BrowserFS edge case - if (stat.size === -1 && entry._actualSize) { - stat.size = entry._actualSize; - } - entry._stat = stat; - } - return entry._stat - } - - async content(entry) { - if (entry._content === false) { - const { fs, dir } = this; - if ((await entry.type()) === 'tree') { - entry._content = undefined; - } else { - const content = await fs.read(`${dir}/${entry._fullpath}`); - // workaround for a BrowserFS edge case - entry._actualSize = content.length; - if (entry._stat && entry._stat.size === -1) { - entry._stat.size = entry._actualSize; - } - entry._content = new Uint8Array(content); - } - } - return entry._content - } - - async oid(entry) { - if (entry._oid === false) { - const { fs, gitdir, cache } = this; - let oid; - // See if we can use the SHA1 hash in the index. - await GitIndexManager.acquire({ fs, gitdir, cache }, async function( - index - ) { - const stage = index.entriesMap.get(entry._fullpath); - const stats = await entry.stat(); - if (!stage || compareStats(stats, stage)) { - const content = await entry.content(); - if (content === undefined) { - oid = undefined; - } else { - oid = await shasum( - GitObject.wrap({ type: 'blob', object: await entry.content() }) - ); - if (stage && oid === stage.oid) { - index.insert({ - filepath: entry._fullpath, - stats, - oid: oid, - }); - } - } - } else { - // Use the index SHA1 rather than compute it - oid = stage.oid; - } - }); - entry._oid = oid; - } - return entry._oid - } -} - -// @ts-check - -/** - * @returns {Walker} - */ -function WORKDIR() { - const o = Object.create(null); - Object.defineProperty(o, GitWalkSymbol, { - value: function({ fs, dir, gitdir, cache }) { - return new GitWalkerFs({ fs, dir, gitdir, cache }) - }, - }); - Object.freeze(o); - return o -} - -// @ts-check - -// I'm putting this in a Manager because I reckon it could benefit -// from a LOT of cacheing. -class GitIgnoreManager { - static async isIgnored({ fs, dir, gitdir = join(dir, '.git'), filepath }) { - // ALWAYS ignore ".git" folders. - if (basename(filepath) === '.git') return true - // '.' is not a valid gitignore entry, so '.' is never ignored - if (filepath === '.') return false - // Check and load exclusion rules from project exclude file (.git/info/exclude) - let excludes = ''; - const excludesFile = join(gitdir, 'info', 'exclude'); - if (await fs.exists(excludesFile)) { - excludes = await fs.read(excludesFile, 'utf8'); - } - // Find all the .gitignore files that could affect this file - const pairs = [ - { - gitignore: join(dir, '.gitignore'), - filepath, - }, - ]; - const pieces = filepath.split('/'); - for (let i = 1; i < pieces.length; i++) { - const folder = pieces.slice(0, i).join('/'); - const file = pieces.slice(i).join('/'); - pairs.push({ - gitignore: join(dir, folder, '.gitignore'), - filepath: file, - }); - } - let ignoredStatus = false; - for (const p of pairs) { - let file; - try { - file = await fs.read(p.gitignore, 'utf8'); - } catch (err) { - if (err.code === 'NOENT') continue - } - const ign = ignore().add(excludes); - ign.add(file); - // If the parent directory is excluded, we are done. - // "It is not possible to re-include a file if a parent directory of that file is excluded. Git doesn’t list excluded directories for performance reasons, so any patterns on contained files have no effect, no matter where they are defined." - // source: https://git-scm.com/docs/gitignore - const parentdir = dirname(p.filepath); - if (parentdir !== '.' && ign.ignores(parentdir)) return true - // If the file is currently ignored, test for UNignoring. - if (ignoredStatus) { - ignoredStatus = !ign.test(p.filepath).unignored; - } else { - ignoredStatus = ign.test(p.filepath).ignored; - } - } - return ignoredStatus - } -} - -/** - * This is just a collection of helper functions really. At least that's how it started. - */ -class FileSystem { - constructor(fs) { - if (typeof fs._original_unwrapped_fs !== 'undefined') return fs - - const promises = Object.getOwnPropertyDescriptor(fs, 'promises'); - if (promises && promises.enumerable) { - this._readFile = fs.promises.readFile.bind(fs.promises); - this._writeFile = fs.promises.writeFile.bind(fs.promises); - this._mkdir = fs.promises.mkdir.bind(fs.promises); - this._rmdir = fs.promises.rmdir.bind(fs.promises); - this._unlink = fs.promises.unlink.bind(fs.promises); - this._stat = fs.promises.stat.bind(fs.promises); - this._lstat = fs.promises.lstat.bind(fs.promises); - this._readdir = fs.promises.readdir.bind(fs.promises); - this._readlink = fs.promises.readlink.bind(fs.promises); - this._symlink = fs.promises.symlink.bind(fs.promises); - } else { - this._readFile = pify(fs.readFile.bind(fs)); - this._writeFile = pify(fs.writeFile.bind(fs)); - this._mkdir = pify(fs.mkdir.bind(fs)); - this._rmdir = pify(fs.rmdir.bind(fs)); - this._unlink = pify(fs.unlink.bind(fs)); - this._stat = pify(fs.stat.bind(fs)); - this._lstat = pify(fs.lstat.bind(fs)); - this._readdir = pify(fs.readdir.bind(fs)); - this._readlink = pify(fs.readlink.bind(fs)); - this._symlink = pify(fs.symlink.bind(fs)); - } - this._original_unwrapped_fs = fs; - } - - /** - * Return true if a file exists, false if it doesn't exist. - * Rethrows errors that aren't related to file existance. - */ - async exists(filepath, options = {}) { - try { - await this._stat(filepath); - return true - } catch (err) { - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') { - return false - } else { - console.log('Unhandled error in "FileSystem.exists()" function', err); - throw err - } - } - } - - /** - * Return the contents of a file if it exists, otherwise returns null. - * - * @param {string} filepath - * @param {object} [options] - * - * @returns {Promise<Buffer|string|null>} - */ - async read(filepath, options = {}) { - try { - let buffer = await this._readFile(filepath, options); - // Convert plain ArrayBuffers to Buffers - if (typeof buffer !== 'string') { - buffer = Buffer.from(buffer); - } - return buffer - } catch (err) { - return null - } - } - - /** - * Write a file (creating missing directories if need be) without throwing errors. - * - * @param {string} filepath - * @param {Buffer|Uint8Array|string} contents - * @param {object|string} [options] - */ - async write(filepath, contents, options = {}) { - try { - await this._writeFile(filepath, contents, options); - return - } catch (err) { - // Hmm. Let's try mkdirp and try again. - await this.mkdir(dirname(filepath)); - await this._writeFile(filepath, contents, options); - } - } - - /** - * Make a directory (or series of nested directories) without throwing an error if it already exists. - */ - async mkdir(filepath, _selfCall = false) { - try { - await this._mkdir(filepath); - return - } catch (err) { - // If err is null then operation succeeded! - if (err === null) return - // If the directory already exists, that's OK! - if (err.code === 'EEXIST') return - // Avoid infinite loops of failure - if (_selfCall) throw err - // If we got a "no such file or directory error" backup and try again. - if (err.code === 'ENOENT') { - const parent = dirname(filepath); - // Check to see if we've gone too far - if (parent === '.' || parent === '/' || parent === filepath) throw err - // Infinite recursion, what could go wrong? - await this.mkdir(parent); - await this.mkdir(filepath, true); - } - } - } - - /** - * Delete a file without throwing an error if it is already deleted. - */ - async rm(filepath) { - try { - await this._unlink(filepath); - } catch (err) { - if (err.code !== 'ENOENT') throw err - } - } - - /** - * Delete a directory without throwing an error if it is already deleted. - */ - async rmdir(filepath) { - try { - await this._rmdir(filepath); - } catch (err) { - if (err.code !== 'ENOENT') throw err - } - } - - /** - * Read a directory without throwing an error is the directory doesn't exist - */ - async readdir(filepath) { - try { - const names = await this._readdir(filepath); - // Ordering is not guaranteed, and system specific (Windows vs Unix) - // so we must sort them ourselves. - names.sort(compareStrings); - return names - } catch (err) { - if (err.code === 'ENOTDIR') return null - return [] - } - } - - /** - * Return a flast list of all the files nested inside a directory - * - * Based on an elegant concurrent recursive solution from SO - * https://stackoverflow.com/a/45130990/2168416 - */ - async readdirDeep(dir) { - const subdirs = await this._readdir(dir); - const files = await Promise.all( - subdirs.map(async subdir => { - const res = dir + '/' + subdir; - return (await this._stat(res)).isDirectory() - ? this.readdirDeep(res) - : res - }) - ); - return files.reduce((a, f) => a.concat(f), []) - } - - /** - * Return the Stats of a file/symlink if it exists, otherwise returns null. - * Rethrows errors that aren't related to file existance. - */ - async lstat(filename) { - try { - const stats = await this._lstat(filename); - return stats - } catch (err) { - if (err.code === 'ENOENT') { - return null - } - throw err - } - } - - /** - * Reads the contents of a symlink if it exists, otherwise returns null. - * Rethrows errors that aren't related to file existance. - */ - async readlink(filename, opts = { encoding: 'buffer' }) { - // Note: FileSystem.readlink returns a buffer by default - // so we can dump it into GitObject.write just like any other file. - try { - return this._readlink(filename, opts) - } catch (err) { - if (err.code === 'ENOENT') { - return null - } - throw err - } - } - - /** - * Write the contents of buffer to a symlink. - */ - async writelink(filename, buffer) { - return this._symlink(buffer.toString('utf8'), filename) - } -} - -async function writeObjectLoose({ fs, gitdir, object, format, oid }) { - if (format !== 'deflated') { - throw new InternalError( - 'GitObjectStoreLoose expects objects to write to be in deflated format' - ) - } - const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`; - const filepath = `${gitdir}/${source}`; - // Don't overwrite existing git objects - this helps avoid EPERM errors. - // Although I don't know how we'd fix corrupted objects then. Perhaps delete them - // on read? - if (!(await fs.exists(filepath))) await fs.write(filepath, object); -} - -/* eslint-env node, browser */ - -let supportsCompressionStream = null; - -async function deflate(buffer) { - if (supportsCompressionStream === null) { - supportsCompressionStream = testCompressionStream(); - } - return supportsCompressionStream - ? browserDeflate(buffer) - : pako.deflate(buffer) -} - -async function browserDeflate(buffer) { - const cs = new CompressionStream('deflate'); - const c = new Blob([buffer]).stream().pipeThrough(cs); - return new Uint8Array(await new Response(c).arrayBuffer()) -} - -function testCompressionStream() { - try { - const cs = new CompressionStream('deflate'); - // Test if `Blob.stream` is present. React Native does not have the `stream` method - new Blob([]).stream(); - if (cs) return true - } catch (_) { - // no bother - } - return false -} - -async function _writeObject({ - fs, - gitdir, - type, - object, - format = 'content', - oid = undefined, - dryRun = false, -}) { - if (format !== 'deflated') { - if (format !== 'wrapped') { - object = GitObject.wrap({ type, object }); - } - oid = await shasum(object); - object = Buffer.from(await deflate(object)); - } - if (!dryRun) { - await writeObjectLoose({ fs, gitdir, object, format: 'deflated', oid }); - } - return oid -} - -function assertParameter(name, value) { - if (value === undefined) { - throw new MissingParameterError(name) - } -} - -// @ts-check - -/** - * Add a file to the git index (aka staging area) - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the file to add to the index - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully once the git index has been updated - * - * @example - * await fs.promises.writeFile('/tutorial/README.md', `# TEST`) - * await git.add({ fs, dir: '/tutorial', filepath: 'README.md' }) - * console.log('done') - * - */ -async function add({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - filepath, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('dir', dir); - assertParameter('gitdir', gitdir); - assertParameter('filepath', filepath); - - const fs = new FileSystem(_fs); - await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) { - await addToIndex({ dir, gitdir, fs, filepath, index }); - }); - } catch (err) { - err.caller = 'git.add'; - throw err - } -} - -async function addToIndex({ dir, gitdir, fs, filepath, index }) { - // TODO: Should ignore UNLESS it's already in the index. - const ignored = await GitIgnoreManager.isIgnored({ - fs, - dir, - gitdir, - filepath, - }); - if (ignored) return - const stats = await fs.lstat(join(dir, filepath)); - if (!stats) throw new NotFoundError(filepath) - if (stats.isDirectory()) { - const children = await fs.readdir(join(dir, filepath)); - const promises = children.map(child => - addToIndex({ dir, gitdir, fs, filepath: join(filepath, child), index }) - ); - await Promise.all(promises); - } else { - const object = stats.isSymbolicLink() - ? await fs.readlink(join(dir, filepath)) - : await fs.read(join(dir, filepath)); - if (object === null) throw new NotFoundError(filepath) - const oid = await _writeObject({ fs, gitdir, type: 'blob', object }); - index.insert({ filepath, stats, oid }); - } -} - -// @ts-check - -/** - * - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {SignCallback} [args.onSign] - * @param {string} args.gitdir - * @param {string} args.message - * @param {Object} args.author - * @param {string} args.author.name - * @param {string} args.author.email - * @param {number} args.author.timestamp - * @param {number} args.author.timezoneOffset - * @param {Object} args.committer - * @param {string} args.committer.name - * @param {string} args.committer.email - * @param {number} args.committer.timestamp - * @param {number} args.committer.timezoneOffset - * @param {string} [args.signingKey] - * @param {boolean} [args.dryRun = false] - * @param {boolean} [args.noUpdateBranch = false] - * @param {string} [args.ref] - * @param {string[]} [args.parent] - * @param {string} [args.tree] - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly created commit. - */ -async function _commit({ - fs, - cache, - onSign, - gitdir, - message, - author, - committer, - signingKey, - dryRun = false, - noUpdateBranch = false, - ref, - parent, - tree, -}) { - if (!ref) { - ref = await GitRefManager.resolve({ - fs, - gitdir, - ref: 'HEAD', - depth: 2, - }); - } - - return GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) { - const inodes = flatFileListToDirectoryStructure(index.entries); - const inode = inodes.get('.'); - if (!tree) { - tree = await constructTree({ fs, gitdir, inode, dryRun }); - } - if (!parent) { - try { - parent = [ - await GitRefManager.resolve({ - fs, - gitdir, - ref, - }), - ]; - } catch (err) { - // Probably an initial commit - parent = []; - } - } - let comm = GitCommit.from({ - tree, - parent, - author, - committer, - message, - }); - if (signingKey) { - comm = await GitCommit.sign(comm, onSign, signingKey); - } - const oid = await _writeObject({ - fs, - gitdir, - type: 'commit', - object: comm.toObject(), - dryRun, - }); - if (!noUpdateBranch && !dryRun) { - // Update branch pointer - await GitRefManager.writeRef({ - fs, - gitdir, - ref, - value: oid, - }); - } - return oid - }) -} - -async function constructTree({ fs, gitdir, inode, dryRun }) { - // use depth first traversal - const children = inode.children; - for (const inode of children) { - if (inode.type === 'tree') { - inode.metadata.mode = '040000'; - inode.metadata.oid = await constructTree({ fs, gitdir, inode, dryRun }); - } - } - const entries = children.map(inode => ({ - mode: inode.metadata.mode, - path: inode.basename, - oid: inode.metadata.oid, - type: inode.type, - })); - const tree = GitTree.from(entries); - const oid = await _writeObject({ - fs, - gitdir, - type: 'tree', - object: tree.toObject(), - dryRun, - }); - return oid -} - -// @ts-check - -async function resolveFilepath({ fs, cache, gitdir, oid, filepath }) { - // Ensure there are no leading or trailing directory separators. - // I was going to do this automatically, but then found that the Git Terminal for Windows - // auto-expands --filepath=/src/utils to --filepath=C:/Users/Will/AppData/Local/Programs/Git/src/utils - // so I figured it would be wise to promote the behavior in the application layer not just the library layer. - if (filepath.startsWith('/')) { - throw new InvalidFilepathError('leading-slash') - } else if (filepath.endsWith('/')) { - throw new InvalidFilepathError('trailing-slash') - } - const _oid = oid; - const result = await resolveTree({ fs, cache, gitdir, oid }); - const tree = result.tree; - if (filepath === '') { - oid = result.oid; - } else { - const pathArray = filepath.split('/'); - oid = await _resolveFilepath({ - fs, - cache, - gitdir, - tree, - pathArray, - oid: _oid, - filepath, - }); - } - return oid -} - -async function _resolveFilepath({ - fs, - cache, - gitdir, - tree, - pathArray, - oid, - filepath, -}) { - const name = pathArray.shift(); - for (const entry of tree) { - if (entry.path === name) { - if (pathArray.length === 0) { - return entry.oid - } else { - const { type, object } = await _readObject({ - fs, - cache, - gitdir, - oid: entry.oid, - }); - if (type !== 'tree') { - throw new ObjectTypeError(oid, type, 'blob', filepath) - } - tree = GitTree.from(object); - return _resolveFilepath({ - fs, - cache, - gitdir, - tree, - pathArray, - oid, - filepath, - }) - } - } - } - throw new NotFoundError(`file or directory found at "${oid}:${filepath}"`) -} - -// @ts-check - -/** - * - * @typedef {Object} ReadTreeResult - The object returned has the following schema: - * @property {string} oid - SHA-1 object id of this tree - * @property {TreeObject} tree - the parsed tree object - */ - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} args.oid - * @param {string} [args.filepath] - * - * @returns {Promise<ReadTreeResult>} - */ -async function _readTree({ - fs, - cache, - gitdir, - oid, - filepath = undefined, -}) { - if (filepath !== undefined) { - oid = await resolveFilepath({ fs, cache, gitdir, oid, filepath }); - } - const { tree, oid: treeOid } = await resolveTree({ fs, cache, gitdir, oid }); - const result = { - oid: treeOid, - tree: tree.entries(), - }; - return result -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {TreeObject} args.tree - * - * @returns {Promise<string>} - */ -async function _writeTree({ fs, gitdir, tree }) { - // Convert object to buffer - const object = GitTree.from(tree).toObject(); - const oid = await _writeObject({ - fs, - gitdir, - type: 'tree', - object, - format: 'content', - }); - return oid -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {SignCallback} [args.onSign] - * @param {string} args.gitdir - * @param {string} args.ref - * @param {string} args.oid - * @param {string|Uint8Array} args.note - * @param {boolean} [args.force] - * @param {Object} args.author - * @param {string} args.author.name - * @param {string} args.author.email - * @param {number} args.author.timestamp - * @param {number} args.author.timezoneOffset - * @param {Object} args.committer - * @param {string} args.committer.name - * @param {string} args.committer.email - * @param {number} args.committer.timestamp - * @param {number} args.committer.timezoneOffset - * @param {string} [args.signingKey] - * - * @returns {Promise<string>} - */ - -async function _addNote({ - fs, - cache, - onSign, - gitdir, - ref, - oid, - note, - force, - author, - committer, - signingKey, -}) { - // Get the current note commit - let parent; - try { - parent = await GitRefManager.resolve({ gitdir, fs, ref }); - } catch (err) { - if (!(err instanceof NotFoundError)) { - throw err - } - } - - // I'm using the "empty tree" magic number here for brevity - const result = await _readTree({ - fs, - cache, - gitdir, - oid: parent || '4b825dc642cb6eb9a060e54bf8d69288fbee4904', - }); - let tree = result.tree; - - // Handle the case where a note already exists - if (force) { - tree = tree.filter(entry => entry.path !== oid); - } else { - for (const entry of tree) { - if (entry.path === oid) { - throw new AlreadyExistsError('note', oid) - } - } - } - - // Create the note blob - if (typeof note === 'string') { - note = Buffer.from(note, 'utf8'); - } - const noteOid = await _writeObject({ - fs, - gitdir, - type: 'blob', - object: note, - format: 'content', - }); - - // Create the new note tree - tree.push({ mode: '100644', path: oid, oid: noteOid, type: 'blob' }); - const treeOid = await _writeTree({ - fs, - gitdir, - tree, - }); - - // Create the new note commit - const commitOid = await _commit({ - fs, - cache, - onSign, - gitdir, - ref, - tree: treeOid, - parent: parent && [parent], - message: `Note added by 'isomorphic-git addNote'\n`, - author, - committer, - signingKey, - }); - - return commitOid -} - -// @ts-check - -/** - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.path - * - * @returns {Promise<any>} Resolves with the config value - * - * @example - * // Read config value - * let value = await git.getConfig({ - * dir: '$input((/))', - * path: '$input((user.name))' - * }) - * console.log(value) - * - */ -async function _getConfig({ fs, gitdir, path }) { - const config = await GitConfigManager.get({ fs, gitdir }); - return config.get(path) -} - -/** - * - * @returns {Promise<void | {name: string, email: string, date: Date, timestamp: number, timezoneOffset: number }>} - */ -async function normalizeAuthorObject({ fs, gitdir, author = {} }) { - let { name, email, timestamp, timezoneOffset } = author; - name = name || (await _getConfig({ fs, gitdir, path: 'user.name' })); - email = email || (await _getConfig({ fs, gitdir, path: 'user.email' })) || ''; - - if (name === undefined) { - return undefined - } - - timestamp = timestamp != null ? timestamp : Math.floor(Date.now() / 1000); - timezoneOffset = - timezoneOffset != null - ? timezoneOffset - : new Date(timestamp * 1000).getTimezoneOffset(); - - return { name, email, timestamp, timezoneOffset } -} - -/** - * - * @returns {Promise<void | {name: string, email: string, timestamp: number, timezoneOffset: number }>} - */ -async function normalizeCommitterObject({ - fs, - gitdir, - author, - committer, -}) { - committer = Object.assign({}, committer || author); - // Match committer's date to author's one, if omitted - if (author) { - committer.timestamp = committer.timestamp || author.timestamp; - committer.timezoneOffset = committer.timezoneOffset || author.timezoneOffset; - } - committer = await normalizeAuthorObject({ fs, gitdir, author: committer }); - return committer -} - -// @ts-check - -/** - * Add or update an object note - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - The notes ref to look under - * @param {string} args.oid - The SHA-1 object id of the object to add the note to. - * @param {string|Uint8Array} args.note - The note to add - * @param {boolean} [args.force] - Over-write note if it already exists. - * @param {Object} [args.author] - The details about the author. - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer = author] - The details about the note committer, in the same format as the author parameter. If not specified, the author details are used. - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - Sign the note commit using this private PGP key. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the commit object for the added note. - */ - -async function addNote({ - fs: _fs, - onSign, - dir, - gitdir = join(dir, '.git'), - ref = 'refs/notes/commits', - oid, - note, - force, - author: _author, - committer: _committer, - signingKey, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - assertParameter('note', note); - if (signingKey) { - assertParameter('onSign', onSign); - } - const fs = new FileSystem(_fs); - - const author = await normalizeAuthorObject({ fs, gitdir, author: _author }); - if (!author) throw new MissingNameError('author') - - const committer = await normalizeCommitterObject({ - fs, - gitdir, - author, - committer: _committer, - }); - if (!committer) throw new MissingNameError('committer') - - return await _addNote({ - fs: new FileSystem(fs), - cache, - onSign, - gitdir, - ref, - oid, - note, - force, - author, - committer, - signingKey, - }) - } catch (err) { - err.caller = 'git.addNote'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.remote - * @param {string} args.url - * @param {boolean} args.force - * - * @returns {Promise<void>} - * - */ -async function _addRemote({ fs, gitdir, remote, url, force }) { - if (remote !== cleanGitRef.clean(remote)) { - throw new InvalidRefNameError(remote, cleanGitRef.clean(remote)) - } - const config = await GitConfigManager.get({ fs, gitdir }); - if (!force) { - // Check that setting it wouldn't overwrite. - const remoteNames = await config.getSubsections('remote'); - if (remoteNames.includes(remote)) { - // Throw an error if it would overwrite an existing remote, - // but not if it's simply setting the same value again. - if (url !== (await config.get(`remote.${remote}.url`))) { - throw new AlreadyExistsError('remote', remote) - } - } - } - await config.set(`remote.${remote}.url`, url); - await config.set( - `remote.${remote}.fetch`, - `+refs/heads/*:refs/remotes/${remote}/*` - ); - await GitConfigManager.save({ fs, gitdir, config }); -} - -// @ts-check - -/** - * Add or update a remote - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.remote - The name of the remote - * @param {string} args.url - The URL of the remote - * @param {boolean} [args.force = false] - Instead of throwing an error if a remote named `remote` already exists, overwrite the existing remote. - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.addRemote({ - * fs, - * dir: '/tutorial', - * remote: 'upstream', - * url: 'https://github.com/isomorphic-git/isomorphic-git' - * }) - * console.log('done') - * - */ -async function addRemote({ - fs, - dir, - gitdir = join(dir, '.git'), - remote, - url, - force = false, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('remote', remote); - assertParameter('url', url); - return await _addRemote({ - fs: new FileSystem(fs), - gitdir, - remote, - url, - force, - }) - } catch (err) { - err.caller = 'git.addRemote'; - throw err - } -} - -// @ts-check - -/** - * Create an annotated tag. - * - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {SignCallback} [args.onSign] - * @param {string} args.gitdir - * @param {string} args.ref - * @param {string} [args.message = ref] - * @param {string} [args.object = 'HEAD'] - * @param {object} [args.tagger] - * @param {string} args.tagger.name - * @param {string} args.tagger.email - * @param {number} args.tagger.timestamp - * @param {number} args.tagger.timezoneOffset - * @param {string} [args.gpgsig] - * @param {string} [args.signingKey] - * @param {boolean} [args.force = false] - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.annotatedTag({ - * dir: '$input((/))', - * ref: '$input((test-tag))', - * message: '$input((This commit is awesome))', - * tagger: { - * name: '$input((Mr. Test))', - * email: '$input((mrtest@example.com))' - * } - * }) - * console.log('done') - * - */ -async function _annotatedTag({ - fs, - cache, - onSign, - gitdir, - ref, - tagger, - message = ref, - gpgsig, - object, - signingKey, - force = false, -}) { - ref = ref.startsWith('refs/tags/') ? ref : `refs/tags/${ref}`; - - if (!force && (await GitRefManager.exists({ fs, gitdir, ref }))) { - throw new AlreadyExistsError('tag', ref) - } - - // Resolve passed value - const oid = await GitRefManager.resolve({ - fs, - gitdir, - ref: object || 'HEAD', - }); - - const { type } = await _readObject({ fs, cache, gitdir, oid }); - let tagObject = GitAnnotatedTag.from({ - object: oid, - type, - tag: ref.replace('refs/tags/', ''), - tagger, - message, - gpgsig, - }); - if (signingKey) { - tagObject = await GitAnnotatedTag.sign(tagObject, onSign, signingKey); - } - const value = await _writeObject({ - fs, - gitdir, - type: 'tag', - object: tagObject.toObject(), - }); - - await GitRefManager.writeRef({ fs, gitdir, ref, value }); -} - -// @ts-check - -/** - * Create an annotated tag. - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - What to name the tag - * @param {string} [args.message = ref] - The tag message to use. - * @param {string} [args.object = 'HEAD'] - The SHA-1 object id the tag points to. (Will resolve to a SHA-1 object id if value is a ref.) By default, the commit object which is referred by the current `HEAD` is used. - * @param {object} [args.tagger] - The details about the tagger. - * @param {string} [args.tagger.name] - Default is `user.name` config. - * @param {string} [args.tagger.email] - Default is `user.email` config. - * @param {number} [args.tagger.timestamp=Math.floor(Date.now()/1000)] - Set the tagger timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.tagger.timezoneOffset] - Set the tagger timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.gpgsig] - The gpgsig attatched to the tag object. (Mutually exclusive with the `signingKey` option.) - * @param {string} [args.signingKey] - Sign the tag object using this private PGP key. (Mutually exclusive with the `gpgsig` option.) - * @param {boolean} [args.force = false] - Instead of throwing an error if a tag named `ref` already exists, overwrite the existing tag. Note that this option does not modify the original tag object itself. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.annotatedTag({ - * fs, - * dir: '/tutorial', - * ref: 'test-tag', - * message: 'This commit is awesome', - * tagger: { - * name: 'Mr. Test', - * email: 'mrtest@example.com' - * } - * }) - * console.log('done') - * - */ -async function annotatedTag({ - fs: _fs, - onSign, - dir, - gitdir = join(dir, '.git'), - ref, - tagger: _tagger, - message = ref, - gpgsig, - object, - signingKey, - force = false, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - if (signingKey) { - assertParameter('onSign', onSign); - } - const fs = new FileSystem(_fs); - - // Fill in missing arguments with default values - const tagger = await normalizeAuthorObject({ fs, gitdir, author: _tagger }); - if (!tagger) throw new MissingNameError('tagger') - - return await _annotatedTag({ - fs, - cache, - onSign, - gitdir, - ref, - tagger, - message, - gpgsig, - object, - signingKey, - force, - }) - } catch (err) { - err.caller = 'git.annotatedTag'; - throw err - } -} - -// @ts-check - -/** - * Create a branch - * - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.ref - * @param {boolean} [args.checkout = false] - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.branch({ dir: '$input((/))', ref: '$input((develop))' }) - * console.log('done') - * - */ -async function _branch({ fs, gitdir, ref, checkout = false }) { - if (ref !== cleanGitRef.clean(ref)) { - throw new InvalidRefNameError(ref, cleanGitRef.clean(ref)) - } - - const fullref = `refs/heads/${ref}`; - - const exist = await GitRefManager.exists({ fs, gitdir, ref: fullref }); - if (exist) { - throw new AlreadyExistsError('branch', ref, false) - } - - // Get current HEAD tree oid - let oid; - try { - oid = await GitRefManager.resolve({ fs, gitdir, ref: 'HEAD' }); - } catch (e) { - // Probably an empty repo - } - - // Create a new ref that points at the current commit - if (oid) { - await GitRefManager.writeRef({ fs, gitdir, ref: fullref, value: oid }); - } - - if (checkout) { - // Update HEAD - await GitRefManager.writeSymbolicRef({ - fs, - gitdir, - ref: 'HEAD', - value: fullref, - }); - } -} - -// @ts-check - -/** - * Create a branch - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - What to name the branch - * @param {boolean} [args.checkout = false] - Update `HEAD` to point at the newly created branch - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.branch({ fs, dir: '/tutorial', ref: 'develop' }) - * console.log('done') - * - */ -async function branch({ - fs, - dir, - gitdir = join(dir, '.git'), - ref, - checkout = false, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - return await _branch({ - fs: new FileSystem(fs), - gitdir, - ref, - checkout, - }) - } catch (err) { - err.caller = 'git.branch'; - throw err - } -} - -// https://dev.to/namirsab/comment/2050 -function arrayRange(start, end) { - const length = end - start; - return Array.from({ length }, (_, i) => start + i) -} - -// TODO: Should I just polyfill Array.flat? -const flat = - typeof Array.prototype.flat === 'undefined' - ? entries => entries.reduce((acc, x) => acc.concat(x), []) - : entries => entries.flat(); - -// This is convenient for computing unions/joins of sorted lists. -class RunningMinimum { - constructor() { - // Using a getter for 'value' would just bloat the code. - // You know better than to set it directly right? - this.value = null; - } - - consider(value) { - if (value === null || value === undefined) return - if (this.value === null) { - this.value = value; - } else if (value < this.value) { - this.value = value; - } - } - - reset() { - this.value = null; - } -} - -// Take an array of length N of -// iterators of length Q_n -// of strings -// and return an iterator of length max(Q_n) for all n -// of arrays of length N -// of string|null who all have the same string value -function* unionOfIterators(sets) { - /* NOTE: We can assume all arrays are sorted. - * Indexes are sorted because they are defined that way: - * - * > Index entries are sorted in ascending order on the name field, - * > interpreted as a string of unsigned bytes (i.e. memcmp() order, no - * > localization, no special casing of directory separator '/'). Entries - * > with the same name are sorted by their stage field. - * - * Trees should be sorted because they are created directly from indexes. - * They definitely should be sorted, or else they wouldn't have a unique SHA1. - * So that would be very naughty on the part of the tree-creator. - * - * Lastly, the working dir entries are sorted because I choose to sort them - * in my FileSystem.readdir() implementation. - */ - - // Init - const min = new RunningMinimum(); - let minimum; - const heads = []; - const numsets = sets.length; - for (let i = 0; i < numsets; i++) { - // Abuse the fact that iterators continue to return 'undefined' for value - // once they are done - heads[i] = sets[i].next().value; - if (heads[i] !== undefined) { - min.consider(heads[i]); - } - } - if (min.value === null) return - // Iterate - while (true) { - const result = []; - minimum = min.value; - min.reset(); - for (let i = 0; i < numsets; i++) { - if (heads[i] !== undefined && heads[i] === minimum) { - result[i] = heads[i]; - heads[i] = sets[i].next().value; - } else { - // A little hacky, but eh - result[i] = null; - } - if (heads[i] !== undefined) { - min.consider(heads[i]); - } - } - yield result; - if (min.value === null) return - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {string} [args.dir] - * @param {string} [args.gitdir=join(dir,'.git')] - * @param {Walker[]} args.trees - * @param {WalkerMap} [args.map] - * @param {WalkerReduce} [args.reduce] - * @param {WalkerIterate} [args.iterate] - * - * @returns {Promise<any>} The finished tree-walking result - * - * @see {WalkerMap} - * - */ -async function _walk({ - fs, - cache, - dir, - gitdir, - trees, - // @ts-ignore - map = async (_, entry) => entry, - // The default reducer is a flatmap that filters out undefineds. - reduce = async (parent, children) => { - const flatten = flat(children); - if (parent !== undefined) flatten.unshift(parent); - return flatten - }, - // The default iterate function walks all children concurrently - iterate = (walk, children) => Promise.all([...children].map(walk)), -}) { - const walkers = trees.map(proxy => - proxy[GitWalkSymbol]({ fs, dir, gitdir, cache }) - ); - - const root = new Array(walkers.length).fill('.'); - const range = arrayRange(0, walkers.length); - const unionWalkerFromReaddir = async entries => { - range.map(i => { - entries[i] = entries[i] && new walkers[i].ConstructEntry(entries[i]); - }); - const subdirs = await Promise.all( - range.map(i => (entries[i] ? walkers[i].readdir(entries[i]) : [])) - ); - // Now process child directories - const iterators = subdirs - .map(array => (array === null ? [] : array)) - .map(array => array[Symbol.iterator]()); - return { - entries, - children: unionOfIterators(iterators), - } - }; - - const walk = async root => { - const { entries, children } = await unionWalkerFromReaddir(root); - const fullpath = entries.find(entry => entry && entry._fullpath)._fullpath; - const parent = await map(fullpath, entries); - if (parent !== null) { - let walkedChildren = await iterate(walk, children); - walkedChildren = walkedChildren.filter(x => x !== undefined); - return reduce(parent, walkedChildren) - } - }; - return walk(root) -} - -const worthWalking = (filepath, root) => { - if (filepath === '.' || root == null || root.length === 0 || root === '.') { - return true - } - if (root.length >= filepath.length) { - return root.startsWith(filepath) - } else { - return filepath.startsWith(root) - } -}; - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {ProgressCallback} [args.onProgress] - * @param {string} args.dir - * @param {string} args.gitdir - * @param {string} args.ref - * @param {string[]} [args.filepaths] - * @param {string} args.remote - * @param {boolean} args.noCheckout - * @param {boolean} [args.noUpdateHead] - * @param {boolean} [args.dryRun] - * @param {boolean} [args.force] - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - */ -async function _checkout({ - fs, - cache, - onProgress, - dir, - gitdir, - remote, - ref, - filepaths, - noCheckout, - noUpdateHead, - dryRun, - force, -}) { - // Get tree oid - let oid; - try { - oid = await GitRefManager.resolve({ fs, gitdir, ref }); - // TODO: Figure out what to do if both 'ref' and 'remote' are specified, ref already exists, - // and is configured to track a different remote. - } catch (err) { - if (ref === 'HEAD') throw err - // If `ref` doesn't exist, create a new remote tracking branch - // Figure out the commit to checkout - const remoteRef = `${remote}/${ref}`; - oid = await GitRefManager.resolve({ - fs, - gitdir, - ref: remoteRef, - }); - // Set up remote tracking branch - const config = await GitConfigManager.get({ fs, gitdir }); - await config.set(`branch.${ref}.remote`, remote); - await config.set(`branch.${ref}.merge`, `refs/heads/${ref}`); - await GitConfigManager.save({ fs, gitdir, config }); - // Create a new branch that points at that same commit - await GitRefManager.writeRef({ - fs, - gitdir, - ref: `refs/heads/${ref}`, - value: oid, - }); - } - - // Update working dir - if (!noCheckout) { - let ops; - // First pass - just analyze files (not directories) and figure out what needs to be done - try { - ops = await analyze({ - fs, - cache, - onProgress, - dir, - gitdir, - ref, - force, - filepaths, - }); - } catch (err) { - // Throw a more helpful error message for this common mistake. - if (err instanceof NotFoundError && err.data.what === oid) { - throw new CommitNotFetchedError(ref, oid) - } else { - throw err - } - } - - // Report conflicts - const conflicts = ops - .filter(([method]) => method === 'conflict') - .map(([method, fullpath]) => fullpath); - if (conflicts.length > 0) { - throw new CheckoutConflictError(conflicts) - } - - // Collect errors - const errors = ops - .filter(([method]) => method === 'error') - .map(([method, fullpath]) => fullpath); - if (errors.length > 0) { - throw new InternalError(errors.join(', ')) - } - - if (dryRun) { - // Since the format of 'ops' is in flux, I really would rather folk besides myself not start relying on it - // return ops - return - } - - // Second pass - execute planned changes - // The cheapest semi-parallel solution without computing a full dependency graph will be - // to just do ops in 4 dumb phases: delete files, delete dirs, create dirs, write files - - let count = 0; - const total = ops.length; - await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) { - await Promise.all( - ops - .filter( - ([method]) => method === 'delete' || method === 'delete-index' - ) - .map(async function([method, fullpath]) { - const filepath = `${dir}/${fullpath}`; - if (method === 'delete') { - await fs.rm(filepath); - } - index.delete({ filepath: fullpath }); - if (onProgress) { - await onProgress({ - phase: 'Updating workdir', - loaded: ++count, - total, - }); - } - }) - ); - }); - - // Note: this is cannot be done naively in parallel - await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) { - for (const [method, fullpath] of ops) { - if (method === 'rmdir' || method === 'rmdir-index') { - const filepath = `${dir}/${fullpath}`; - try { - if (method === 'rmdir-index') { - index.delete({ filepath: fullpath }); - } - await fs.rmdir(filepath); - if (onProgress) { - await onProgress({ - phase: 'Updating workdir', - loaded: ++count, - total, - }); - } - } catch (e) { - if (e.code === 'ENOTEMPTY') { - console.log( - `Did not delete ${fullpath} because directory is not empty` - ); - } else { - throw e - } - } - } - } - }); - - await Promise.all( - ops - .filter(([method]) => method === 'mkdir' || method === 'mkdir-index') - .map(async function([_, fullpath]) { - const filepath = `${dir}/${fullpath}`; - await fs.mkdir(filepath); - if (onProgress) { - await onProgress({ - phase: 'Updating workdir', - loaded: ++count, - total, - }); - } - }) - ); - - await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) { - await Promise.all( - ops - .filter( - ([method]) => - method === 'create' || - method === 'create-index' || - method === 'update' || - method === 'mkdir-index' - ) - .map(async function([method, fullpath, oid, mode, chmod]) { - const filepath = `${dir}/${fullpath}`; - try { - if (method !== 'create-index' && method !== 'mkdir-index') { - const { object } = await _readObject({ fs, cache, gitdir, oid }); - if (chmod) { - // Note: the mode option of fs.write only works when creating files, - // not updating them. Since the `fs` plugin doesn't expose `chmod` this - // is our only option. - await fs.rm(filepath); - } - if (mode === 0o100644) { - // regular file - await fs.write(filepath, object); - } else if (mode === 0o100755) { - // executable file - await fs.write(filepath, object, { mode: 0o777 }); - } else if (mode === 0o120000) { - // symlink - await fs.writelink(filepath, object); - } else { - throw new InternalError( - `Invalid mode 0o${mode.toString(8)} detected in blob ${oid}` - ) - } - } - - const stats = await fs.lstat(filepath); - // We can't trust the executable bit returned by lstat on Windows, - // so we need to preserve this value from the TREE. - // TODO: Figure out how git handles this internally. - if (mode === 0o100755) { - stats.mode = 0o755; - } - // Submodules are present in the git index but use a unique mode different from trees - if (method === 'mkdir-index') { - stats.mode = 0o160000; - } - index.insert({ - filepath: fullpath, - stats, - oid, - }); - if (onProgress) { - await onProgress({ - phase: 'Updating workdir', - loaded: ++count, - total, - }); - } - } catch (e) { - console.log(e); - } - }) - ); - }); - } - - // Update HEAD - if (!noUpdateHead) { - const fullRef = await GitRefManager.expand({ fs, gitdir, ref }); - if (fullRef.startsWith('refs/heads')) { - await GitRefManager.writeSymbolicRef({ - fs, - gitdir, - ref: 'HEAD', - value: fullRef, - }); - } else { - // detached head - await GitRefManager.writeRef({ fs, gitdir, ref: 'HEAD', value: oid }); - } - } -} - -async function analyze({ - fs, - cache, - onProgress, - dir, - gitdir, - ref, - force, - filepaths, -}) { - let count = 0; - return _walk({ - fs, - cache, - dir, - gitdir, - trees: [TREE({ ref }), WORKDIR(), STAGE()], - map: async function(fullpath, [commit, workdir, stage]) { - if (fullpath === '.') return - // match against base paths - if (filepaths && !filepaths.some(base => worthWalking(fullpath, base))) { - return null - } - // Emit progress event - if (onProgress) { - await onProgress({ phase: 'Analyzing workdir', loaded: ++count }); - } - - // This is a kind of silly pattern but it worked so well for me in the past - // and it makes intuitively demonstrating exhaustiveness so *easy*. - // This checks for the presense and/or absense of each of the 3 entries, - // converts that to a 3-bit binary representation, and then handles - // every possible combination (2^3 or 8 cases) with a lookup table. - const key = [!!stage, !!commit, !!workdir].map(Number).join(''); - switch (key) { - // Impossible case. - case '000': - return - // Ignore workdir files that are not tracked and not part of the new commit. - case '001': - // OK, make an exception for explicitly named files. - if (force && filepaths && filepaths.includes(fullpath)) { - return ['delete', fullpath] - } - return - // New entries - case '010': { - switch (await commit.type()) { - case 'tree': { - return ['mkdir', fullpath] - } - case 'blob': { - return [ - 'create', - fullpath, - await commit.oid(), - await commit.mode(), - ] - } - case 'commit': { - return [ - 'mkdir-index', - fullpath, - await commit.oid(), - await commit.mode(), - ] - } - default: { - return [ - 'error', - `new entry Unhandled type ${await commit.type()}`, - ] - } - } - } - // New entries but there is already something in the workdir there. - case '011': { - switch (`${await commit.type()}-${await workdir.type()}`) { - case 'tree-tree': { - return // noop - } - case 'tree-blob': - case 'blob-tree': { - return ['conflict', fullpath] - } - case 'blob-blob': { - // Is the incoming file different? - if ((await commit.oid()) !== (await workdir.oid())) { - if (force) { - return [ - 'update', - fullpath, - await commit.oid(), - await commit.mode(), - (await commit.mode()) !== (await workdir.mode()), - ] - } else { - return ['conflict', fullpath] - } - } else { - // Is the incoming file a different mode? - if ((await commit.mode()) !== (await workdir.mode())) { - if (force) { - return [ - 'update', - fullpath, - await commit.oid(), - await commit.mode(), - true, - ] - } else { - return ['conflict', fullpath] - } - } else { - return [ - 'create-index', - fullpath, - await commit.oid(), - await commit.mode(), - ] - } - } - } - case 'commit-tree': { - // TODO: submodule - // We'll ignore submodule directories for now. - // Users prefer we not throw an error for lack of submodule support. - // gitlinks - return - } - case 'commit-blob': { - // TODO: submodule - // But... we'll complain if there is a *file* where we would - // put a submodule if we had submodule support. - return ['conflict', fullpath] - } - default: { - return ['error', `new entry Unhandled type ${commit.type}`] - } - } - } - // Something in stage but not in the commit OR the workdir. - // Note: I verified this behavior against canonical git. - case '100': { - return ['delete-index', fullpath] - } - // Deleted entries - // TODO: How to handle if stage type and workdir type mismatch? - case '101': { - switch (await stage.type()) { - case 'tree': { - return ['rmdir', fullpath] - } - case 'blob': { - // Git checks that the workdir.oid === stage.oid before deleting file - if ((await stage.oid()) !== (await workdir.oid())) { - if (force) { - return ['delete', fullpath] - } else { - return ['conflict', fullpath] - } - } else { - return ['delete', fullpath] - } - } - case 'commit': { - return ['rmdir-index', fullpath] - } - default: { - return [ - 'error', - `delete entry Unhandled type ${await stage.type()}`, - ] - } - } - } - /* eslint-disable no-fallthrough */ - // File missing from workdir - case '110': - // Possibly modified entries - case '111': { - /* eslint-enable no-fallthrough */ - switch (`${await stage.type()}-${await commit.type()}`) { - case 'tree-tree': { - return - } - case 'blob-blob': { - // If the file hasn't changed, there is no need to do anything. - // Existing file modifications in the workdir can be be left as is. - if ( - (await stage.oid()) === (await commit.oid()) && - (await stage.mode()) === (await commit.mode()) && - !force - ) { - return - } - - // Check for local changes that would be lost - if (workdir) { - // Note: canonical git only compares with the stage. But we're smart enough - // to compare to the stage AND the incoming commit. - if ( - (await workdir.oid()) !== (await stage.oid()) && - (await workdir.oid()) !== (await commit.oid()) - ) { - if (force) { - return [ - 'update', - fullpath, - await commit.oid(), - await commit.mode(), - (await commit.mode()) !== (await workdir.mode()), - ] - } else { - return ['conflict', fullpath] - } - } - } else if (force) { - return [ - 'update', - fullpath, - await commit.oid(), - await commit.mode(), - (await commit.mode()) !== (await stage.mode()), - ] - } - // Has file mode changed? - if ((await commit.mode()) !== (await stage.mode())) { - return [ - 'update', - fullpath, - await commit.oid(), - await commit.mode(), - true, - ] - } - // TODO: HANDLE SYMLINKS - // Has the file content changed? - if ((await commit.oid()) !== (await stage.oid())) { - return [ - 'update', - fullpath, - await commit.oid(), - await commit.mode(), - false, - ] - } else { - return - } - } - case 'tree-blob': { - return ['update-dir-to-blob', fullpath, await commit.oid()] - } - case 'blob-tree': { - return ['update-blob-to-tree', fullpath] - } - case 'commit-commit': { - return [ - 'mkdir-index', - fullpath, - await commit.oid(), - await commit.mode(), - ] - } - default: { - return [ - 'error', - `update entry Unhandled type ${await stage.type()}-${await commit.type()}`, - ] - } - } - } - } - }, - // Modify the default flat mapping - reduce: async function(parent, children) { - children = flat(children); - if (!parent) { - return children - } else if (parent && parent[0] === 'rmdir') { - children.push(parent); - return children - } else { - children.unshift(parent); - return children - } - }, - }) -} - -// @ts-check - -/** - * Checkout a branch - * - * If the branch already exists it will check out that branch. Otherwise, it will create a new remote tracking branch set to track the remote branch of that name. - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref = 'HEAD'] - Source to checkout files from - * @param {string[]} [args.filepaths] - Limit the checkout to the given files and directories - * @param {string} [args.remote = 'origin'] - Which remote repository to use - * @param {boolean} [args.noCheckout = false] - If true, will update HEAD but won't update the working directory - * @param {boolean} [args.noUpdateHead] - If true, will update the working directory but won't update HEAD. Defaults to `false` when `ref` is provided, and `true` if `ref` is not provided. - * @param {boolean} [args.dryRun = false] - If true, simulates a checkout so you can test whether it would succeed. - * @param {boolean} [args.force = false] - If true, conflicts will be ignored and files will be overwritten regardless of local changes. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * // switch to the main branch - * await git.checkout({ - * fs, - * dir: '/tutorial', - * ref: 'main' - * }) - * console.log('done') - * - * @example - * // restore the 'docs' and 'src/docs' folders to the way they were, overwriting any changes - * await git.checkout({ - * fs, - * dir: '/tutorial', - * force: true, - * filepaths: ['docs', 'src/docs'] - * }) - * console.log('done') - * - * @example - * // restore the 'docs' and 'src/docs' folders to the way they are in the 'develop' branch, overwriting any changes - * await git.checkout({ - * fs, - * dir: '/tutorial', - * ref: 'develop', - * noUpdateHead: true, - * force: true, - * filepaths: ['docs', 'src/docs'] - * }) - * console.log('done') - */ -async function checkout({ - fs, - onProgress, - dir, - gitdir = join(dir, '.git'), - remote = 'origin', - ref: _ref, - filepaths, - noCheckout = false, - noUpdateHead = _ref === undefined, - dryRun = false, - force = false, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('dir', dir); - assertParameter('gitdir', gitdir); - - const ref = _ref || 'HEAD'; - return await _checkout({ - fs: new FileSystem(fs), - cache, - onProgress, - dir, - gitdir, - remote, - ref, - filepaths, - noCheckout, - noUpdateHead, - dryRun, - force, - }) - } catch (err) { - err.caller = 'git.checkout'; - throw err - } -} - -// @see https://git-scm.com/docs/git-rev-parse.html#_specifying_revisions -const abbreviateRx = new RegExp('^refs/(heads/|tags/|remotes/)?(.*)'); - -function abbreviateRef(ref) { - const match = abbreviateRx.exec(ref); - if (match) { - if (match[1] === 'remotes/' && ref.endsWith('/HEAD')) { - return match[2].slice(0, -5) - } else { - return match[2] - } - } - return ref -} - -// @ts-check - -/** - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {boolean} [args.fullname = false] - Return the full path (e.g. "refs/heads/main") instead of the abbreviated form. - * @param {boolean} [args.test = false] - If the current branch doesn't actually exist (such as right after git init) then return `undefined`. - * - * @returns {Promise<string|void>} The name of the current branch or undefined if the HEAD is detached. - * - */ -async function _currentBranch({ - fs, - gitdir, - fullname = false, - test = false, -}) { - const ref = await GitRefManager.resolve({ - fs, - gitdir, - ref: 'HEAD', - depth: 2, - }); - if (test) { - try { - await GitRefManager.resolve({ fs, gitdir, ref }); - } catch (_) { - return - } - } - // Return `undefined` for detached HEAD - if (!ref.startsWith('refs/')) return - return fullname ? ref : abbreviateRef(ref) -} - -function translateSSHtoHTTP(url) { - // handle "shorter scp-like syntax" - url = url.replace(/^git@([^:]+):/, 'https://$1/'); - // handle proper SSH URLs - url = url.replace(/^ssh:\/\//, 'https://'); - return url -} - -function calculateBasicAuthHeader({ username = '', password = '' }) { - return `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}` -} - -// Currently 'for await' upsets my linters. -async function forAwait(iterable, cb) { - const iter = getIterator(iterable); - while (true) { - const { value, done } = await iter.next(); - if (value) await cb(value); - if (done) break - } - if (iter.return) iter.return(); -} - -async function collect(iterable) { - let size = 0; - const buffers = []; - // This will be easier once `for await ... of` loops are available. - await forAwait(iterable, value => { - buffers.push(value); - size += value.byteLength; - }); - const result = new Uint8Array(size); - let nextIndex = 0; - for (const buffer of buffers) { - result.set(buffer, nextIndex); - nextIndex += buffer.byteLength; - } - return result -} - -function extractAuthFromUrl(url) { - // For whatever reason, the `fetch` API does not convert credentials embedded in the URL - // into Basic Authentication headers automatically. Instead it throws an error! - // So we must manually parse the URL, rip out the user:password portion if it is present - // and compute the Authorization header. - // Note: I tried using new URL(url) but that throws a security exception in Edge. :rolleyes: - let userpass = url.match(/^https?:\/\/([^/]+)@/); - // No credentials, return the url unmodified and an empty auth object - if (userpass == null) return { url, auth: {} } - userpass = userpass[1]; - const [username, password] = userpass.split(':'); - // Remove credentials from URL - url = url.replace(`${userpass}@`, ''); - // Has credentials, return the fetch-safe URL and the parsed credentials - return { url, auth: { username, password } } -} - -function padHex(b, n) { - const s = n.toString(16); - return '0'.repeat(b - s.length) + s -} - -/** -pkt-line Format ---------------- - -Much (but not all) of the payload is described around pkt-lines. - -A pkt-line is a variable length binary string. The first four bytes -of the line, the pkt-len, indicates the total length of the line, -in hexadecimal. The pkt-len includes the 4 bytes used to contain -the length's hexadecimal representation. - -A pkt-line MAY contain binary data, so implementors MUST ensure -pkt-line parsing/formatting routines are 8-bit clean. - -A non-binary line SHOULD BE terminated by an LF, which if present -MUST be included in the total length. Receivers MUST treat pkt-lines -with non-binary data the same whether or not they contain the trailing -LF (stripping the LF if present, and not complaining when it is -missing). - -The maximum length of a pkt-line's data component is 65516 bytes. -Implementations MUST NOT send pkt-line whose length exceeds 65520 -(65516 bytes of payload + 4 bytes of length data). - -Implementations SHOULD NOT send an empty pkt-line ("0004"). - -A pkt-line with a length field of 0 ("0000"), called a flush-pkt, -is a special case and MUST be handled differently than an empty -pkt-line ("0004"). - ----- - pkt-line = data-pkt / flush-pkt - - data-pkt = pkt-len pkt-payload - pkt-len = 4*(HEXDIG) - pkt-payload = (pkt-len - 4)*(OCTET) - - flush-pkt = "0000" ----- - -Examples (as C-style strings): - ----- - pkt-line actual value - --------------------------------- - "0006a\n" "a\n" - "0005a" "a" - "000bfoobar\n" "foobar\n" - "0004" "" ----- -*/ - -// I'm really using this more as a namespace. -// There's not a lot of "state" in a pkt-line - -class GitPktLine { - static flush() { - return Buffer.from('0000', 'utf8') - } - - static delim() { - return Buffer.from('0001', 'utf8') - } - - static encode(line) { - if (typeof line === 'string') { - line = Buffer.from(line); - } - const length = line.length + 4; - const hexlength = padHex(4, length); - return Buffer.concat([Buffer.from(hexlength, 'utf8'), line]) - } - - static streamReader(stream) { - const reader = new StreamReader(stream); - return async function read() { - try { - let length = await reader.read(4); - if (length == null) return true - length = parseInt(length.toString('utf8'), 16); - if (length === 0) return null - if (length === 1) return null // delim packets - const buffer = await reader.read(length - 4); - if (buffer == null) return true - return buffer - } catch (err) { - console.log('error', err); - return true - } - } - } -} - -// @ts-check - -/** - * @param {function} read - */ -async function parseCapabilitiesV2(read) { - /** @type {Object<string, string | true>} */ - const capabilities2 = {}; - - let line; - while (true) { - line = await read(); - if (line === true) break - if (line === null) continue - line = line.toString('utf8').replace(/\n$/, ''); - const i = line.indexOf('='); - if (i > -1) { - const key = line.slice(0, i); - const value = line.slice(i + 1); - capabilities2[key] = value; - } else { - capabilities2[line] = true; - } - } - return { protocolVersion: 2, capabilities2 } -} - -async function parseRefsAdResponse(stream, { service }) { - const capabilities = new Set(); - const refs = new Map(); - const symrefs = new Map(); - - // There is probably a better way to do this, but for now - // let's just throw the result parser inline here. - const read = GitPktLine.streamReader(stream); - let lineOne = await read(); - // skip past any flushes - while (lineOne === null) lineOne = await read(); - if (lineOne === true) throw new EmptyServerResponseError() - // Clients MUST ignore an LF at the end of the line. - if (lineOne.toString('utf8').replace(/\n$/, '') !== `# service=${service}`) { - throw new ParseError(`# service=${service}\\n`, lineOne.toString('utf8')) - } - let lineTwo = await read(); - // skip past any flushes - while (lineTwo === null) lineTwo = await read(); - // In the edge case of a brand new repo, zero refs (and zero capabilities) - // are returned. - if (lineTwo === true) return { capabilities, refs, symrefs } - lineTwo = lineTwo.toString('utf8'); - // Handle protocol v2 responses - if (lineTwo.includes('version 2')) { - return parseCapabilitiesV2(read) - } - const [firstRef, capabilitiesLine] = splitAndAssert(lineTwo, '\x00', '\\x00'); - capabilitiesLine.split(' ').map(x => capabilities.add(x)); - const [ref, name] = splitAndAssert(firstRef, ' ', ' '); - refs.set(name, ref); - while (true) { - const line = await read(); - if (line === true) break - if (line !== null) { - const [ref, name] = splitAndAssert(line.toString('utf8'), ' ', ' '); - refs.set(name, ref); - } - } - // Symrefs are thrown into the "capabilities" unfortunately. - for (const cap of capabilities) { - if (cap.startsWith('symref=')) { - const m = cap.match(/symref=([^:]+):(.*)/); - if (m.length === 3) { - symrefs.set(m[1], m[2]); - } - } - } - return { protocolVersion: 1, capabilities, refs, symrefs } -} - -function splitAndAssert(line, sep, expected) { - const split = line.trim().split(sep); - if (split.length !== 2) { - throw new ParseError( - `Two strings separated by '${expected}'`, - line.toString('utf8') - ) - } - return split -} - -// Try to accomodate known CORS proxy implementations: -// - https://jcubic.pl/proxy.php? <-- uses query string -// - https://cors.isomorphic-git.org <-- uses path -const corsProxify = (corsProxy, url) => - corsProxy.endsWith('?') - ? `${corsProxy}${url}` - : `${corsProxy}/${url.replace(/^https?:\/\//, '')}`; - -const updateHeaders = (headers, auth) => { - // Update the basic auth header - if (auth.username || auth.password) { - headers.Authorization = calculateBasicAuthHeader(auth); - } - // but any manually provided headers take precedence - if (auth.headers) { - Object.assign(headers, auth.headers); - } -}; - -/** - * @param {GitHttpResponse} res - * - * @returns {{ preview: string, response: string, data: Buffer }} - */ -const stringifyBody = async res => { - try { - // Some services provide a meaningful error message in the body of 403s like "token lacks the scopes necessary to perform this action" - const data = Buffer.from(await collect(res.body)); - const response = data.toString('utf8'); - const preview = - response.length < 256 ? response : response.slice(0, 256) + '...'; - return { preview, response, data } - } catch (e) { - return {} - } -}; - -class GitRemoteHTTP { - static async capabilities() { - return ['discover', 'connect'] - } - - /** - * @param {Object} args - * @param {HttpClient} args.http - * @param {ProgressCallback} [args.onProgress] - * @param {AuthCallback} [args.onAuth] - * @param {AuthFailureCallback} [args.onAuthFailure] - * @param {AuthSuccessCallback} [args.onAuthSuccess] - * @param {string} [args.corsProxy] - * @param {string} args.service - * @param {string} args.url - * @param {Object<string, string>} args.headers - * @param {1 | 2} args.protocolVersion - Git Protocol Version - */ - static async discover({ - http, - onProgress, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - service, - url: _origUrl, - headers, - protocolVersion, - }) { - let { url, auth } = extractAuthFromUrl(_origUrl); - const proxifiedURL = corsProxy ? corsProxify(corsProxy, url) : url; - if (auth.username || auth.password) { - headers.Authorization = calculateBasicAuthHeader(auth); - } - if (protocolVersion === 2) { - headers['Git-Protocol'] = 'version=2'; - } - - let res; - let tryAgain; - let providedAuthBefore = false; - do { - res = await http.request({ - onProgress, - method: 'GET', - url: `${proxifiedURL}/info/refs?service=${service}`, - headers, - }); - - // the default loop behavior - tryAgain = false; - - // 401 is the "correct" response for access denied. 203 is Non-Authoritative Information and comes from Azure DevOps, which - // apparently doesn't realize this is a git request and is returning the HTML for the "Azure DevOps Services | Sign In" page. - if (res.statusCode === 401 || res.statusCode === 203) { - // On subsequent 401s, call `onAuthFailure` instead of `onAuth`. - // This is so that naive `onAuth` callbacks that return a fixed value don't create an infinite loop of retrying. - const getAuth = providedAuthBefore ? onAuthFailure : onAuth; - if (getAuth) { - // Acquire credentials and try again - // TODO: read `useHttpPath` value from git config and pass along? - auth = await getAuth(url, { - ...auth, - headers: { ...headers }, - }); - if (auth && auth.cancel) { - throw new UserCanceledError() - } else if (auth) { - updateHeaders(headers, auth); - providedAuthBefore = true; - tryAgain = true; - } - } - } else if ( - res.statusCode === 200 && - providedAuthBefore && - onAuthSuccess - ) { - await onAuthSuccess(url, auth); - } - } while (tryAgain) - - if (res.statusCode !== 200) { - const { response } = await stringifyBody(res); - throw new HttpError(res.statusCode, res.statusMessage, response) - } - // Git "smart" HTTP servers should respond with the correct Content-Type header. - if ( - res.headers['content-type'] === `application/x-${service}-advertisement` - ) { - const remoteHTTP = await parseRefsAdResponse(res.body, { service }); - remoteHTTP.auth = auth; - return remoteHTTP - } else { - // If they don't send the correct content-type header, that's a good indicator it is either a "dumb" HTTP - // server, or the user specified an incorrect remote URL and the response is actually an HTML page. - // In this case, we save the response as plain text so we can generate a better error message if needed. - const { preview, response, data } = await stringifyBody(res); - // For backwards compatibility, try to parse it anyway. - // TODO: maybe just throw instead of trying? - try { - const remoteHTTP = await parseRefsAdResponse([data], { service }); - remoteHTTP.auth = auth; - return remoteHTTP - } catch (e) { - throw new SmartHttpError(preview, response) - } - } - } - - /** - * @param {Object} args - * @param {HttpClient} args.http - * @param {ProgressCallback} [args.onProgress] - * @param {string} [args.corsProxy] - * @param {string} args.service - * @param {string} args.url - * @param {Object<string, string>} [args.headers] - * @param {any} args.body - * @param {any} args.auth - */ - static async connect({ - http, - onProgress, - corsProxy, - service, - url, - auth, - body, - headers, - }) { - // We already have the "correct" auth value at this point, but - // we need to strip out the username/password from the URL yet again. - const urlAuth = extractAuthFromUrl(url); - if (urlAuth) url = urlAuth.url; - - if (corsProxy) url = corsProxify(corsProxy, url); - - headers['content-type'] = `application/x-${service}-request`; - headers.accept = `application/x-${service}-result`; - updateHeaders(headers, auth); - - const res = await http.request({ - onProgress, - method: 'POST', - url: `${url}/${service}`, - body, - headers, - }); - if (res.statusCode !== 200) { - const { response } = stringifyBody(res); - throw new HttpError(res.statusCode, res.statusMessage, response) - } - return res - } -} - -function parseRemoteUrl({ url }) { - // the stupid "shorter scp-like syntax" - if (url.startsWith('git@')) { - return { - transport: 'ssh', - address: url, - } - } - const matches = url.match(/(\w+)(:\/\/|::)(.*)/); - if (matches === null) return - /* - * When git encounters a URL of the form <transport>://<address>, where <transport> is - * a protocol that it cannot handle natively, it automatically invokes git remote-<transport> - * with the full URL as the second argument. - * - * @see https://git-scm.com/docs/git-remote-helpers - */ - if (matches[2] === '://') { - return { - transport: matches[1], - address: matches[0], - } - } - /* - * A URL of the form <transport>::<address> explicitly instructs git to invoke - * git remote-<transport> with <address> as the second argument. - * - * @see https://git-scm.com/docs/git-remote-helpers - */ - if (matches[2] === '::') { - return { - transport: matches[1], - address: matches[3], - } - } -} - -class GitRemoteManager { - static getRemoteHelperFor({ url }) { - // TODO: clean up the remoteHelper API and move into PluginCore - const remoteHelpers = new Map(); - remoteHelpers.set('http', GitRemoteHTTP); - remoteHelpers.set('https', GitRemoteHTTP); - - const parts = parseRemoteUrl({ url }); - if (!parts) { - throw new UrlParseError(url) - } - if (remoteHelpers.has(parts.transport)) { - return remoteHelpers.get(parts.transport) - } - throw new UnknownTransportError( - url, - parts.transport, - parts.transport === 'ssh' ? translateSSHtoHTTP(url) : undefined - ) - } -} - -let lock$1 = null; - -class GitShallowManager { - static async read({ fs, gitdir }) { - if (lock$1 === null) lock$1 = new AsyncLock(); - const filepath = join(gitdir, 'shallow'); - const oids = new Set(); - await lock$1.acquire(filepath, async function() { - const text = await fs.read(filepath, { encoding: 'utf8' }); - if (text === null) return oids // no file - if (text.trim() === '') return oids // empty file - text - .trim() - .split('\n') - .map(oid => oids.add(oid)); - }); - return oids - } - - static async write({ fs, gitdir, oids }) { - if (lock$1 === null) lock$1 = new AsyncLock(); - const filepath = join(gitdir, 'shallow'); - if (oids.size > 0) { - const text = [...oids].join('\n') + '\n'; - await lock$1.acquire(filepath, async function() { - await fs.write(filepath, text, { - encoding: 'utf8', - }); - }); - } else { - // No shallows - await lock$1.acquire(filepath, async function() { - await fs.rm(filepath); - }); - } - } -} - -async function hasObjectLoose({ fs, gitdir, oid }) { - const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`; - return fs.exists(`${gitdir}/${source}`) -} - -async function hasObjectPacked({ - fs, - cache, - gitdir, - oid, - getExternalRefDelta, -}) { - // Check to see if it's in a packfile. - // Iterate through all the .idx files - let list = await fs.readdir(join(gitdir, 'objects/pack')); - list = list.filter(x => x.endsWith('.idx')); - for (const filename of list) { - const indexFile = `${gitdir}/objects/pack/${filename}`; - const p = await readPackIndex({ - fs, - cache, - filename: indexFile, - getExternalRefDelta, - }); - if (p.error) throw new InternalError(p.error) - // If the packfile DOES have the oid we're looking for... - if (p.offsets.has(oid)) { - return true - } - } - // Failed to find it - return false -} - -async function hasObject({ - fs, - cache, - gitdir, - oid, - format = 'content', -}) { - // Curry the current read method so that the packfile un-deltification - // process can acquire external ref-deltas. - const getExternalRefDelta = oid => _readObject({ fs, cache, gitdir, oid }); - - // Look for it in the loose object directory. - let result = await hasObjectLoose({ fs, gitdir, oid }); - // Check to see if it's in a packfile. - if (!result) { - result = await hasObjectPacked({ - fs, - cache, - gitdir, - oid, - getExternalRefDelta, - }); - } - // Finally - return result -} - -// TODO: make a function that just returns obCount. then emptyPackfile = () => sizePack(pack) === 0 -function emptyPackfile(pack) { - const pheader = '5041434b'; - const version = '00000002'; - const obCount = '00000000'; - const header = pheader + version + obCount; - return pack.slice(0, 12).toString('hex') === header -} - -function filterCapabilities(server, client) { - const serverNames = server.map(cap => cap.split('=', 1)[0]); - return client.filter(cap => { - const name = cap.split('=', 1)[0]; - return serverNames.includes(name) - }) -} - -const pkg = { - name: 'isomorphic-git', - version: '1.8.10', - agent: 'git/isomorphic-git@1.8.10', -}; - -class FIFO { - constructor() { - this._queue = []; - } - - write(chunk) { - if (this._ended) { - throw Error('You cannot write to a FIFO that has already been ended!') - } - if (this._waiting) { - const resolve = this._waiting; - this._waiting = null; - resolve({ value: chunk }); - } else { - this._queue.push(chunk); - } - } - - end() { - this._ended = true; - if (this._waiting) { - const resolve = this._waiting; - this._waiting = null; - resolve({ done: true }); - } - } - - destroy(err) { - this._ended = true; - this.error = err; - } - - async next() { - if (this._queue.length > 0) { - return { value: this._queue.shift() } - } - if (this._ended) { - return { done: true } - } - if (this._waiting) { - throw Error( - 'You cannot call read until the previous call to read has returned!' - ) - } - return new Promise(resolve => { - this._waiting = resolve; - }) - } -} - -// Note: progress messages are designed to be written directly to the terminal, -// so they are often sent with just a carriage return to overwrite the last line of output. -// But there are also messages delimited with newlines. -// I also include CRLF just in case. -function findSplit(str) { - const r = str.indexOf('\r'); - const n = str.indexOf('\n'); - if (r === -1 && n === -1) return -1 - if (r === -1) return n + 1 // \n - if (n === -1) return r + 1 // \r - if (n === r + 1) return n + 1 // \r\n - return Math.min(r, n) + 1 // \r or \n -} - -function splitLines(input) { - const output = new FIFO(); - let tmp = '' - ;(async () => { - await forAwait(input, chunk => { - chunk = chunk.toString('utf8'); - tmp += chunk; - while (true) { - const i = findSplit(tmp); - if (i === -1) break - output.write(tmp.slice(0, i)); - tmp = tmp.slice(i); - } - }); - if (tmp.length > 0) { - output.write(tmp); - } - output.end(); - })(); - return output -} - -/* -If 'side-band' or 'side-band-64k' capabilities have been specified by -the client, the server will send the packfile data multiplexed. - -Each packet starting with the packet-line length of the amount of data -that follows, followed by a single byte specifying the sideband the -following data is coming in on. - -In 'side-band' mode, it will send up to 999 data bytes plus 1 control -code, for a total of up to 1000 bytes in a pkt-line. In 'side-band-64k' -mode it will send up to 65519 data bytes plus 1 control code, for a -total of up to 65520 bytes in a pkt-line. - -The sideband byte will be a '1', '2' or a '3'. Sideband '1' will contain -packfile data, sideband '2' will be used for progress information that the -client will generally print to stderr and sideband '3' is used for error -information. - -If no 'side-band' capability was specified, the server will stream the -entire packfile without multiplexing. -*/ - -class GitSideBand { - static demux(input) { - const read = GitPktLine.streamReader(input); - // And now for the ridiculous side-band or side-band-64k protocol - const packetlines = new FIFO(); - const packfile = new FIFO(); - const progress = new FIFO(); - // TODO: Use a proper through stream? - const nextBit = async function() { - const line = await read(); - // Skip over flush packets - if (line === null) return nextBit() - // A made up convention to signal there's no more to read. - if (line === true) { - packetlines.end(); - progress.end(); - packfile.end(); - return - } - // Examine first byte to determine which output "stream" to use - switch (line[0]) { - case 1: { - // pack data - packfile.write(line.slice(1)); - break - } - case 2: { - // progress message - progress.write(line.slice(1)); - break - } - case 3: { - // fatal error message just before stream aborts - const error = line.slice(1); - progress.write(error); - packfile.destroy(new Error(error.toString('utf8'))); - return - } - default: { - // Not part of the side-band-64k protocol - packetlines.write(line.slice(0)); - } - } - // Careful not to blow up the stack. - // I think Promises in a tail-call position should be OK. - nextBit(); - }; - nextBit(); - return { - packetlines, - packfile, - progress, - } - } - // static mux ({ - // protocol, // 'side-band' or 'side-band-64k' - // packetlines, - // packfile, - // progress, - // error - // }) { - // const MAX_PACKET_LENGTH = protocol === 'side-band-64k' ? 999 : 65519 - // let output = new PassThrough() - // packetlines.on('data', data => { - // if (data === null) { - // output.write(GitPktLine.flush()) - // } else { - // output.write(GitPktLine.encode(data)) - // } - // }) - // let packfileWasEmpty = true - // let packfileEnded = false - // let progressEnded = false - // let errorEnded = false - // let goodbye = Buffer.concat([ - // GitPktLine.encode(Buffer.from('010A', 'hex')), - // GitPktLine.flush() - // ]) - // packfile - // .on('data', data => { - // packfileWasEmpty = false - // const buffers = splitBuffer(data, MAX_PACKET_LENGTH) - // for (const buffer of buffers) { - // output.write( - // GitPktLine.encode(Buffer.concat([Buffer.from('01', 'hex'), buffer])) - // ) - // } - // }) - // .on('end', () => { - // packfileEnded = true - // if (!packfileWasEmpty) output.write(goodbye) - // if (progressEnded && errorEnded) output.end() - // }) - // progress - // .on('data', data => { - // const buffers = splitBuffer(data, MAX_PACKET_LENGTH) - // for (const buffer of buffers) { - // output.write( - // GitPktLine.encode(Buffer.concat([Buffer.from('02', 'hex'), buffer])) - // ) - // } - // }) - // .on('end', () => { - // progressEnded = true - // if (packfileEnded && errorEnded) output.end() - // }) - // error - // .on('data', data => { - // const buffers = splitBuffer(data, MAX_PACKET_LENGTH) - // for (const buffer of buffers) { - // output.write( - // GitPktLine.encode(Buffer.concat([Buffer.from('03', 'hex'), buffer])) - // ) - // } - // }) - // .on('end', () => { - // errorEnded = true - // if (progressEnded && packfileEnded) output.end() - // }) - // return output - // } -} - -async function parseUploadPackResponse(stream) { - const { packetlines, packfile, progress } = GitSideBand.demux(stream); - const shallows = []; - const unshallows = []; - const acks = []; - let nak = false; - let done = false; - return new Promise((resolve, reject) => { - // Parse the response - forAwait(packetlines, data => { - const line = data.toString('utf8').trim(); - if (line.startsWith('shallow')) { - const oid = line.slice(-41).trim(); - if (oid.length !== 40) { - reject(new InvalidOidError(oid)); - } - shallows.push(oid); - } else if (line.startsWith('unshallow')) { - const oid = line.slice(-41).trim(); - if (oid.length !== 40) { - reject(new InvalidOidError(oid)); - } - unshallows.push(oid); - } else if (line.startsWith('ACK')) { - const [, oid, status] = line.split(' '); - acks.push({ oid, status }); - if (!status) done = true; - } else if (line.startsWith('NAK')) { - nak = true; - done = true; - } - if (done) { - resolve({ shallows, unshallows, acks, nak, packfile, progress }); - } - }); - }) -} - -function writeUploadPackRequest({ - capabilities = [], - wants = [], - haves = [], - shallows = [], - depth = null, - since = null, - exclude = [], -}) { - const packstream = []; - wants = [...new Set(wants)]; // remove duplicates - let firstLineCapabilities = ` ${capabilities.join(' ')}`; - for (const oid of wants) { - packstream.push(GitPktLine.encode(`want ${oid}${firstLineCapabilities}\n`)); - firstLineCapabilities = ''; - } - for (const oid of shallows) { - packstream.push(GitPktLine.encode(`shallow ${oid}\n`)); - } - if (depth !== null) { - packstream.push(GitPktLine.encode(`deepen ${depth}\n`)); - } - if (since !== null) { - packstream.push( - GitPktLine.encode(`deepen-since ${Math.floor(since.valueOf() / 1000)}\n`) - ); - } - for (const oid of exclude) { - packstream.push(GitPktLine.encode(`deepen-not ${oid}\n`)); - } - packstream.push(GitPktLine.flush()); - for (const oid of haves) { - packstream.push(GitPktLine.encode(`have ${oid}\n`)); - } - packstream.push(GitPktLine.encode(`done\n`)); - return packstream -} - -// @ts-check - -/** - * - * @typedef {object} FetchResult - The object returned has the following schema: - * @property {string | null} defaultBranch - The branch that is cloned if no branch is specified - * @property {string | null} fetchHead - The SHA-1 object id of the fetched head commit - * @property {string | null} fetchHeadDescription - a textual description of the branch that was fetched - * @property {Object<string, string>} [headers] - The HTTP response headers returned by the git server - * @property {string[]} [pruned] - A list of branches that were pruned, if you provided the `prune` parameter - * - */ - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {HttpClient} args.http - * @param {ProgressCallback} [args.onProgress] - * @param {MessageCallback} [args.onMessage] - * @param {AuthCallback} [args.onAuth] - * @param {AuthFailureCallback} [args.onAuthFailure] - * @param {AuthSuccessCallback} [args.onAuthSuccess] - * @param {string} args.gitdir - * @param {string|void} [args.url] - * @param {string} [args.corsProxy] - * @param {string} [args.ref] - * @param {string} [args.remoteRef] - * @param {string} [args.remote] - * @param {boolean} [args.singleBranch = false] - * @param {boolean} [args.tags = false] - * @param {number} [args.depth] - * @param {Date} [args.since] - * @param {string[]} [args.exclude = []] - * @param {boolean} [args.relative = false] - * @param {Object<string, string>} [args.headers] - * @param {boolean} [args.prune] - * @param {boolean} [args.pruneTags] - * - * @returns {Promise<FetchResult>} - * @see FetchResult - */ -async function _fetch({ - fs, - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - gitdir, - ref: _ref, - remoteRef: _remoteRef, - remote: _remote, - url: _url, - corsProxy, - depth = null, - since = null, - exclude = [], - relative = false, - tags = false, - singleBranch = false, - headers = {}, - prune = false, - pruneTags = false, -}) { - const ref = _ref || (await _currentBranch({ fs, gitdir, test: true })); - const config = await GitConfigManager.get({ fs, gitdir }); - // Figure out what remote to use. - const remote = - _remote || (ref && (await config.get(`branch.${ref}.remote`))) || 'origin'; - // Lookup the URL for the given remote. - const url = _url || (await config.get(`remote.${remote}.url`)); - if (typeof url === 'undefined') { - throw new MissingParameterError('remote OR url') - } - // Figure out what remote ref to use. - const remoteRef = - _remoteRef || - (ref && (await config.get(`branch.${ref}.merge`))) || - _ref || - 'HEAD'; - - if (corsProxy === undefined) { - corsProxy = await config.get('http.corsProxy'); - } - - const GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url }); - const remoteHTTP = await GitRemoteHTTP.discover({ - http, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - service: 'git-upload-pack', - url, - headers, - protocolVersion: 1, - }); - const auth = remoteHTTP.auth; // hack to get new credentials from CredentialManager API - const remoteRefs = remoteHTTP.refs; - // For the special case of an empty repository with no refs, return null. - if (remoteRefs.size === 0) { - return { - defaultBranch: null, - fetchHead: null, - fetchHeadDescription: null, - } - } - // Check that the remote supports the requested features - if (depth !== null && !remoteHTTP.capabilities.has('shallow')) { - throw new RemoteCapabilityError('shallow', 'depth') - } - if (since !== null && !remoteHTTP.capabilities.has('deepen-since')) { - throw new RemoteCapabilityError('deepen-since', 'since') - } - if (exclude.length > 0 && !remoteHTTP.capabilities.has('deepen-not')) { - throw new RemoteCapabilityError('deepen-not', 'exclude') - } - if (relative === true && !remoteHTTP.capabilities.has('deepen-relative')) { - throw new RemoteCapabilityError('deepen-relative', 'relative') - } - // Figure out the SHA for the requested ref - const { oid, fullref } = GitRefManager.resolveAgainstMap({ - ref: remoteRef, - map: remoteRefs, - }); - // Filter out refs we want to ignore: only keep ref we're cloning, HEAD, branches, and tags (if we're keeping them) - for (const remoteRef of remoteRefs.keys()) { - if ( - remoteRef === fullref || - remoteRef === 'HEAD' || - remoteRef.startsWith('refs/heads/') || - (tags && remoteRef.startsWith('refs/tags/')) - ) { - continue - } - remoteRefs.delete(remoteRef); - } - // Assemble the application/x-git-upload-pack-request - const capabilities = filterCapabilities( - [...remoteHTTP.capabilities], - [ - 'multi_ack_detailed', - 'no-done', - 'side-band-64k', - // Note: I removed 'thin-pack' option since our code doesn't "fatten" packfiles, - // which is necessary for compatibility with git. It was the cause of mysterious - // 'fatal: pack has [x] unresolved deltas' errors that plagued us for some time. - // isomorphic-git is perfectly happy with thin packfiles in .git/objects/pack but - // canonical git it turns out is NOT. - 'ofs-delta', - `agent=${pkg.agent}`, - ] - ); - if (relative) capabilities.push('deepen-relative'); - // Start figuring out which oids from the remote we want to request - const wants = singleBranch ? [oid] : remoteRefs.values(); - // Come up with a reasonable list of oids to tell the remote we already have - // (preferably oids that are close ancestors of the branch heads we're fetching) - const haveRefs = singleBranch - ? [ref] - : await GitRefManager.listRefs({ - fs, - gitdir, - filepath: `refs`, - }); - let haves = []; - for (let ref of haveRefs) { - try { - ref = await GitRefManager.expand({ fs, gitdir, ref }); - const oid = await GitRefManager.resolve({ fs, gitdir, ref }); - if (await hasObject({ fs, cache, gitdir, oid })) { - haves.push(oid); - } - } catch (err) {} - } - haves = [...new Set(haves)]; - const oids = await GitShallowManager.read({ fs, gitdir }); - const shallows = remoteHTTP.capabilities.has('shallow') ? [...oids] : []; - const packstream = writeUploadPackRequest({ - capabilities, - wants, - haves, - shallows, - depth, - since, - exclude, - }); - // CodeCommit will hang up if we don't send a Content-Length header - // so we can't stream the body. - const packbuffer = Buffer.from(await collect(packstream)); - const raw = await GitRemoteHTTP.connect({ - http, - onProgress, - corsProxy, - service: 'git-upload-pack', - url, - auth, - body: [packbuffer], - headers, - }); - const response = await parseUploadPackResponse(raw.body); - if (raw.headers) { - response.headers = raw.headers; - } - // Apply all the 'shallow' and 'unshallow' commands - for (const oid of response.shallows) { - if (!oids.has(oid)) { - // this is in a try/catch mostly because my old test fixtures are missing objects - try { - // server says it's shallow, but do we have the parents? - const { object } = await _readObject({ fs, cache, gitdir, oid }); - const commit = new GitCommit(object); - const hasParents = await Promise.all( - commit - .headers() - .parent.map(oid => hasObject({ fs, cache, gitdir, oid })) - ); - const haveAllParents = - hasParents.length === 0 || hasParents.every(has => has); - if (!haveAllParents) { - oids.add(oid); - } - } catch (err) { - oids.add(oid); - } - } - } - for (const oid of response.unshallows) { - oids.delete(oid); - } - await GitShallowManager.write({ fs, gitdir, oids }); - // Update local remote refs - if (singleBranch) { - const refs = new Map([[fullref, oid]]); - // But wait, maybe it was a symref, like 'HEAD'! - // We need to save all the refs in the symref chain (sigh). - const symrefs = new Map(); - let bail = 10; - let key = fullref; - while (bail--) { - const value = remoteHTTP.symrefs.get(key); - if (value === undefined) break - symrefs.set(key, value); - key = value; - } - // final value must not be a symref but a real ref - const realRef = remoteRefs.get(key); - // There may be no ref at all if we've fetched a specific commit hash - if (realRef) { - refs.set(key, realRef); - } - const { pruned } = await GitRefManager.updateRemoteRefs({ - fs, - gitdir, - remote, - refs, - symrefs, - tags, - prune, - }); - if (prune) { - response.pruned = pruned; - } - } else { - const { pruned } = await GitRefManager.updateRemoteRefs({ - fs, - gitdir, - remote, - refs: remoteRefs, - symrefs: remoteHTTP.symrefs, - tags, - prune, - pruneTags, - }); - if (prune) { - response.pruned = pruned; - } - } - // We need this value later for the `clone` command. - response.HEAD = remoteHTTP.symrefs.get('HEAD'); - // AWS CodeCommit doesn't list HEAD as a symref, but we can reverse engineer it - // Find the SHA of the branch called HEAD - if (response.HEAD === undefined) { - const { oid } = GitRefManager.resolveAgainstMap({ - ref: 'HEAD', - map: remoteRefs, - }); - // Use the name of the first branch that's not called HEAD that has - // the same SHA as the branch called HEAD. - for (const [key, value] of remoteRefs.entries()) { - if (key !== 'HEAD' && value === oid) { - response.HEAD = key; - break - } - } - } - const noun = fullref.startsWith('refs/tags') ? 'tag' : 'branch'; - response.FETCH_HEAD = { - oid, - description: `${noun} '${abbreviateRef(fullref)}' of ${url}`, - }; - - if (onProgress || onMessage) { - const lines = splitLines(response.progress); - forAwait(lines, async line => { - if (onMessage) await onMessage(line); - if (onProgress) { - const matches = line.match(/([^:]*).*\((\d+?)\/(\d+?)\)/); - if (matches) { - await onProgress({ - phase: matches[1].trim(), - loaded: parseInt(matches[2], 10), - total: parseInt(matches[3], 10), - }); - } - } - }); - } - const packfile = Buffer.from(await collect(response.packfile)); - const packfileSha = packfile.slice(-20).toString('hex'); - const res = { - defaultBranch: response.HEAD, - fetchHead: response.FETCH_HEAD.oid, - fetchHeadDescription: response.FETCH_HEAD.description, - }; - if (response.headers) { - res.headers = response.headers; - } - if (prune) { - res.pruned = response.pruned; - } - // This is a quick fix for the empty .git/objects/pack/pack-.pack file error, - // which due to the way `git-list-pack` works causes the program to hang when it tries to read it. - // TODO: Longer term, we should actually: - // a) NOT concatenate the entire packfile into memory (line 78), - // b) compute the SHA of the stream except for the last 20 bytes, using the same library used in push.js, and - // c) compare the computed SHA with the last 20 bytes of the stream before saving to disk, and throwing a "packfile got corrupted during download" error if the SHA doesn't match. - if (packfileSha !== '' && !emptyPackfile(packfile)) { - res.packfile = `objects/pack/pack-${packfileSha}.pack`; - const fullpath = join(gitdir, res.packfile); - await fs.write(fullpath, packfile); - const getExternalRefDelta = oid => _readObject({ fs, cache, gitdir, oid }); - const idx = await GitPackIndex.fromPack({ - pack: packfile, - getExternalRefDelta, - onProgress, - }); - await fs.write(fullpath.replace(/\.pack$/, '.idx'), await idx.toBuffer()); - } - return res -} - -// @ts-check - -/** - * Initialize a new repository - * - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} [args.dir] - * @param {string} [args.gitdir] - * @param {boolean} [args.bare = false] - * @param {string} [args.defaultBranch = 'master'] - * @returns {Promise<void>} - */ -async function _init({ - fs, - bare = false, - dir, - gitdir = bare ? dir : join(dir, '.git'), - defaultBranch = 'master', -}) { - // Don't overwrite an existing config - if (await fs.exists(gitdir + '/config')) return - - let folders = [ - 'hooks', - 'info', - 'objects/info', - 'objects/pack', - 'refs/heads', - 'refs/tags', - ]; - folders = folders.map(dir => gitdir + '/' + dir); - for (const folder of folders) { - await fs.mkdir(folder); - } - - await fs.write( - gitdir + '/config', - '[core]\n' + - '\trepositoryformatversion = 0\n' + - '\tfilemode = false\n' + - `\tbare = ${bare}\n` + - (bare ? '' : '\tlogallrefupdates = true\n') + - '\tsymlinks = false\n' + - '\tignorecase = true\n' - ); - await fs.write(gitdir + '/HEAD', `ref: refs/heads/${defaultBranch}\n`); -} - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.dirname - */ -async function deleteRecursively({ fs, dirname }) { - const filesToDelete = []; - const directoriesToDelete = []; - const pathsToTraverse = [dirname]; - - while (pathsToTraverse.length > 0) { - const path = pathsToTraverse.pop(); - - if ((await fs._stat(path)).isDirectory()) { - directoriesToDelete.push(path); - pathsToTraverse.push( - ...(await fs.readdir(path)).map(subPath => join(path, subPath)) - ); - } else { - filesToDelete.push(path); - } - } - - for (const path of filesToDelete) { - await fs.rm(path); - } - for (const path of directoriesToDelete.reverse()) { - await fs.rmdir(path); - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {HttpClient} args.http - * @param {ProgressCallback} [args.onProgress] - * @param {MessageCallback} [args.onMessage] - * @param {AuthCallback} [args.onAuth] - * @param {AuthFailureCallback} [args.onAuthFailure] - * @param {AuthSuccessCallback} [args.onAuthSuccess] - * @param {string} [args.dir] - * @param {string} args.gitdir - * @param {string} args.url - * @param {string} args.corsProxy - * @param {string} args.ref - * @param {boolean} args.singleBranch - * @param {boolean} args.noCheckout - * @param {boolean} args.noTags - * @param {string} args.remote - * @param {number} args.depth - * @param {Date} args.since - * @param {string[]} args.exclude - * @param {boolean} args.relative - * @param {Object<string, string>} args.headers - * - * @returns {Promise<void>} Resolves successfully when clone completes - * - */ -async function _clone({ - fs, - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir, - url, - corsProxy, - ref, - remote, - depth, - since, - exclude, - relative, - singleBranch, - noCheckout, - noTags, - headers, -}) { - try { - await _init({ fs, gitdir }); - await _addRemote({ fs, gitdir, remote, url, force: false }); - if (corsProxy) { - const config = await GitConfigManager.get({ fs, gitdir }); - await config.set(`http.corsProxy`, corsProxy); - await GitConfigManager.save({ fs, gitdir, config }); - } - const { defaultBranch, fetchHead } = await _fetch({ - fs, - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - gitdir, - ref, - remote, - corsProxy, - depth, - since, - exclude, - relative, - singleBranch, - headers, - tags: !noTags, - }); - if (fetchHead === null) return - ref = ref || defaultBranch; - ref = ref.replace('refs/heads/', ''); - // Checkout that branch - await _checkout({ - fs, - cache, - onProgress, - dir, - gitdir, - ref, - remote, - noCheckout, - }); - } catch (err) { - // Remove partial local repository, see #1283 - try { - await deleteRecursively({ fs, dirname: gitdir }); - } catch (err) { - // Ignore this error, we are already failing. - // This try-catch is necessary so the original error is - // not masked by potential errors in deleteRecursively. - } - - throw err - } -} - -// @ts-check - -/** - * Clone a repository - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.url - The URL of the remote repository - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Value is stored in the git config file for that repo. - * @param {string} [args.ref] - Which branch to checkout. By default this is the designated "main branch" of the repository. - * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch. - * @param {boolean} [args.noCheckout = false] - If true, clone will only fetch the repo, not check out a branch. Skipping checkout can save a lot of time normally spent writing files to disk. - * @param {boolean} [args.noTags = false] - By default clone will fetch all tags. `noTags` disables that behavior. - * @param {string} [args.remote = 'origin'] - What to name the remote that is created. - * @param {number} [args.depth] - Integer. Determines how much of the git repository's history to retrieve - * @param {Date} [args.since] - Only fetch commits created after the given date. Mutually exclusive with `depth`. - * @param {string[]} [args.exclude = []] - A list of branches or tags. Instructs the remote server not to send us any commits reachable from these refs. - * @param {boolean} [args.relative = false] - Changes the meaning of `depth` to be measured from the current shallow depth rather than from the branch tip. - * @param {Object<string, string>} [args.headers = {}] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when clone completes - * - * @example - * await git.clone({ - * fs, - * http, - * dir: '/tutorial', - * corsProxy: 'https://cors.isomorphic-git.org', - * url: 'https://github.com/isomorphic-git/isomorphic-git', - * singleBranch: true, - * depth: 1 - * }) - * console.log('done') - * - */ -async function clone({ - fs, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir = join(dir, '.git'), - url, - corsProxy = undefined, - ref = undefined, - remote = 'origin', - depth = undefined, - since = undefined, - exclude = [], - relative = false, - singleBranch = false, - noCheckout = false, - noTags = false, - headers = {}, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('http', http); - assertParameter('gitdir', gitdir); - if (!noCheckout) { - assertParameter('dir', dir); - } - assertParameter('url', url); - - return await _clone({ - fs: new FileSystem(fs), - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir, - url, - corsProxy, - ref, - remote, - depth, - since, - exclude, - relative, - singleBranch, - noCheckout, - noTags, - headers, - }) - } catch (err) { - err.caller = 'git.clone'; - throw err - } -} - -// @ts-check - -/** - * Create a new commit - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.message - The commit message to use. - * @param {Object} [args.author] - The details about the author. - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer = author] - The details about the commit committer, in the same format as the author parameter. If not specified, the author details are used. - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - Sign the tag object using this private PGP key. - * @param {boolean} [args.dryRun = false] - If true, simulates making a commit so you can test whether it would succeed. Implies `noUpdateBranch`. - * @param {boolean} [args.noUpdateBranch = false] - If true, does not update the branch pointer after creating the commit. - * @param {string} [args.ref] - The fully expanded name of the branch to commit to. Default is the current branch pointed to by HEAD. (TODO: fix it so it can expand branch names without throwing if the branch doesn't exist yet.) - * @param {string[]} [args.parent] - The SHA-1 object ids of the commits to use as parents. If not specified, the commit pointed to by `ref` is used. - * @param {string} [args.tree] - The SHA-1 object id of the tree to use. If not specified, a new tree object is created from the current git index. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly created commit. - * - * @example - * let sha = await git.commit({ - * fs, - * dir: '/tutorial', - * author: { - * name: 'Mr. Test', - * email: 'mrtest@example.com', - * }, - * message: 'Added the a.txt file' - * }) - * console.log(sha) - * - */ -async function commit({ - fs: _fs, - onSign, - dir, - gitdir = join(dir, '.git'), - message, - author: _author, - committer: _committer, - signingKey, - dryRun = false, - noUpdateBranch = false, - ref, - parent, - tree, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('message', message); - if (signingKey) { - assertParameter('onSign', onSign); - } - const fs = new FileSystem(_fs); - - const author = await normalizeAuthorObject({ fs, gitdir, author: _author }); - if (!author) throw new MissingNameError('author') - - const committer = await normalizeCommitterObject({ - fs, - gitdir, - author, - committer: _committer, - }); - if (!committer) throw new MissingNameError('committer') - - return await _commit({ - fs, - cache, - onSign, - gitdir, - message, - author, - committer, - signingKey, - dryRun, - noUpdateBranch, - ref, - parent, - tree, - }) - } catch (err) { - err.caller = 'git.commit'; - throw err - } -} - -// @ts-check - -/** - * Get the name of the branch currently pointed to by .git/HEAD - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {boolean} [args.fullname = false] - Return the full path (e.g. "refs/heads/main") instead of the abbreviated form. - * @param {boolean} [args.test = false] - If the current branch doesn't actually exist (such as right after git init) then return `undefined`. - * - * @returns {Promise<string|void>} The name of the current branch or undefined if the HEAD is detached. - * - * @example - * // Get the current branch name - * let branch = await git.currentBranch({ - * fs, - * dir: '/tutorial', - * fullname: false - * }) - * console.log(branch) - * - */ -async function currentBranch({ - fs, - dir, - gitdir = join(dir, '.git'), - fullname = false, - test = false, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - return await _currentBranch({ - fs: new FileSystem(fs), - gitdir, - fullname, - test, - }) - } catch (err) { - err.caller = 'git.currentBranch'; - throw err - } -} - -// @ts-check - -/** - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.ref - * - * @returns {Promise<void>} - */ -async function _deleteBranch({ fs, gitdir, ref }) { - const exist = await GitRefManager.exists({ fs, gitdir, ref }); - if (!exist) { - throw new NotFoundError(ref) - } - - const fullRef = await GitRefManager.expand({ fs, gitdir, ref }); - const currentRef = await _currentBranch({ fs, gitdir, fullname: true }); - if (fullRef === currentRef) { - // detach HEAD - const value = await GitRefManager.resolve({ fs, gitdir, ref: fullRef }); - await GitRefManager.writeRef({ fs, gitdir, ref: 'HEAD', value }); - } - - // Delete a specified branch - await GitRefManager.deleteRef({ fs, gitdir, ref: fullRef }); -} - -// @ts-check - -/** - * Delete a local branch - * - * > Note: This only deletes loose branches - it should be fixed in the future to delete packed branches as well. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The branch to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteBranch({ fs, dir: '/tutorial', ref: 'local-branch' }) - * console.log('done') - * - */ -async function deleteBranch({ - fs, - dir, - gitdir = join(dir, '.git'), - ref, -}) { - try { - assertParameter('fs', fs); - assertParameter('ref', ref); - return await _deleteBranch({ - fs: new FileSystem(fs), - gitdir, - ref, - }) - } catch (err) { - err.caller = 'git.deleteBranch'; - throw err - } -} - -// @ts-check - -/** - * Delete a local ref - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The ref to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteRef({ fs, dir: '/tutorial', ref: 'refs/tags/test-tag' }) - * console.log('done') - * - */ -async function deleteRef({ fs, dir, gitdir = join(dir, '.git'), ref }) { - try { - assertParameter('fs', fs); - assertParameter('ref', ref); - await GitRefManager.deleteRef({ fs: new FileSystem(fs), gitdir, ref }); - } catch (err) { - err.caller = 'git.deleteRef'; - throw err - } -} - -// @ts-check - -/** - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.remote - * - * @returns {Promise<void>} - */ -async function _deleteRemote({ fs, gitdir, remote }) { - const config = await GitConfigManager.get({ fs, gitdir }); - await config.deleteSection('remote', remote); - await GitConfigManager.save({ fs, gitdir, config }); -} - -// @ts-check - -/** - * Removes the local config entry for a given remote - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.remote - The name of the remote to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteRemote({ fs, dir: '/tutorial', remote: 'upstream' }) - * console.log('done') - * - */ -async function deleteRemote({ - fs, - dir, - gitdir = join(dir, '.git'), - remote, -}) { - try { - assertParameter('fs', fs); - assertParameter('remote', remote); - return await _deleteRemote({ - fs: new FileSystem(fs), - gitdir, - remote, - }) - } catch (err) { - err.caller = 'git.deleteRemote'; - throw err - } -} - -// @ts-check - -/** - * Delete a local tag ref - * - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.ref - The tag to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteTag({ dir: '$input((/))', ref: '$input((test-tag))' }) - * console.log('done') - * - */ -async function _deleteTag({ fs, gitdir, ref }) { - ref = ref.startsWith('refs/tags/') ? ref : `refs/tags/${ref}`; - await GitRefManager.deleteRef({ fs, gitdir, ref }); -} - -// @ts-check - -/** - * Delete a local tag ref - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The tag to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteTag({ fs, dir: '/tutorial', ref: 'test-tag' }) - * console.log('done') - * - */ -async function deleteTag({ fs, dir, gitdir = join(dir, '.git'), ref }) { - try { - assertParameter('fs', fs); - assertParameter('ref', ref); - return await _deleteTag({ - fs: new FileSystem(fs), - gitdir, - ref, - }) - } catch (err) { - err.caller = 'git.deleteTag'; - throw err - } -} - -async function expandOidLoose({ fs, gitdir, oid: short }) { - const prefix = short.slice(0, 2); - const objectsSuffixes = await fs.readdir(`${gitdir}/objects/${prefix}`); - return objectsSuffixes - .map(suffix => `${prefix}${suffix}`) - .filter(_oid => _oid.startsWith(short)) -} - -async function expandOidPacked({ - fs, - cache, - gitdir, - oid: short, - getExternalRefDelta, -}) { - // Iterate through all the .pack files - const results = []; - let list = await fs.readdir(join(gitdir, 'objects/pack')); - list = list.filter(x => x.endsWith('.idx')); - for (const filename of list) { - const indexFile = `${gitdir}/objects/pack/${filename}`; - const p = await readPackIndex({ - fs, - cache, - filename: indexFile, - getExternalRefDelta, - }); - if (p.error) throw new InternalError(p.error) - // Search through the list of oids in the packfile - for (const oid of p.offsets.keys()) { - if (oid.startsWith(short)) results.push(oid); - } - } - return results -} - -async function _expandOid({ fs, cache, gitdir, oid: short }) { - // Curry the current read method so that the packfile un-deltification - // process can acquire external ref-deltas. - const getExternalRefDelta = oid => _readObject({ fs, cache, gitdir, oid }); - - const results1 = await expandOidLoose({ fs, gitdir, oid: short }); - const results2 = await expandOidPacked({ - fs, - cache, - gitdir, - oid: short, - getExternalRefDelta, - }); - const results = results1.concat(results2); - - if (results.length === 1) { - return results[0] - } - if (results.length > 1) { - throw new AmbiguousError('oids', short, results) - } - throw new NotFoundError(`an object matching "${short}"`) -} - -// @ts-check - -/** - * Expand and resolve a short oid into a full oid - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The shortened oid prefix to expand (like "0414d2a") - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<string>} Resolves successfully with the full oid (like "0414d2a286d7bbc7a4a326a61c1f9f888a8ab87f") - * - * @example - * let oid = await git.expandOid({ fs, dir: '/tutorial', oid: '0414d2a'}) - * console.log(oid) - * - */ -async function expandOid({ - fs, - dir, - gitdir = join(dir, '.git'), - oid, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - return await _expandOid({ - fs: new FileSystem(fs), - cache, - gitdir, - oid, - }) - } catch (err) { - err.caller = 'git.expandOid'; - throw err - } -} - -// @ts-check - -/** - * Expand an abbreviated ref to its full name - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The ref to expand (like "v1.0.0") - * - * @returns {Promise<string>} Resolves successfully with a full ref name ("refs/tags/v1.0.0") - * - * @example - * let fullRef = await git.expandRef({ fs, dir: '/tutorial', ref: 'main'}) - * console.log(fullRef) - * - */ -async function expandRef({ fs, dir, gitdir = join(dir, '.git'), ref }) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - return await GitRefManager.expand({ - fs: new FileSystem(fs), - gitdir, - ref, - }) - } catch (err) { - err.caller = 'git.expandRef'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string[]} args.oids - * - */ -async function _findMergeBase({ fs, cache, gitdir, oids }) { - // Note: right now, the tests are geared so that the output should match that of - // `git merge-base --all --octopus` - // because without the --octopus flag, git's output seems to depend on the ORDER of the oids, - // and computing virtual merge bases is just too much for me to fathom right now. - - // If we start N independent walkers, one at each of the given `oids`, and walk backwards - // through ancestors, eventually we'll discover a commit where each one of these N walkers - // has passed through. So we just need to keep track of which walkers have visited each commit - // until we find a commit that N distinct walkers has visited. - const visits = {}; - const passes = oids.length; - let heads = oids.map((oid, index) => ({ index, oid })); - while (heads.length) { - // Count how many times we've passed each commit - const result = new Set(); - for (const { oid, index } of heads) { - if (!visits[oid]) visits[oid] = new Set(); - visits[oid].add(index); - if (visits[oid].size === passes) { - result.add(oid); - } - } - if (result.size > 0) { - return [...result] - } - // We haven't found a common ancestor yet - const newheads = new Map(); - for (const { oid, index } of heads) { - try { - const { object } = await _readObject({ fs, cache, gitdir, oid }); - const commit = GitCommit.from(object); - const { parent } = commit.parseHeaders(); - for (const oid of parent) { - if (!visits[oid] || !visits[oid].has(index)) { - newheads.set(oid + ':' + index, { oid, index }); - } - } - } catch (err) { - // do nothing - } - } - heads = Array.from(newheads.values()); - } - return [] -} - -const LINEBREAKS = /^.*(\r?\n|$)/gm; - -function mergeFile({ - ourContent, - baseContent, - theirContent, - ourName = 'ours', - baseName = 'base', - theirName = 'theirs', - format = 'diff', - markerSize = 7, -}) { - const ours = ourContent.match(LINEBREAKS); - const base = baseContent.match(LINEBREAKS); - const theirs = theirContent.match(LINEBREAKS); - - // Here we let the diff3 library do the heavy lifting. - const result = diff3Merge(ours, base, theirs); - - // Here we note whether there are conflicts and format the results - let mergedText = ''; - let cleanMerge = true; - for (const item of result) { - if (item.ok) { - mergedText += item.ok.join(''); - } - if (item.conflict) { - cleanMerge = false; - mergedText += `${'<'.repeat(markerSize)} ${ourName}\n`; - mergedText += item.conflict.a.join(''); - if (format === 'diff3') { - mergedText += `${'|'.repeat(markerSize)} ${baseName}\n`; - mergedText += item.conflict.o.join(''); - } - mergedText += `${'='.repeat(markerSize)}\n`; - mergedText += item.conflict.b.join(''); - mergedText += `${'>'.repeat(markerSize)} ${theirName}\n`; - } - } - return { cleanMerge, mergedText } -} - -// @ts-check - -/** - * Create a merged tree - * - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ourOid - The SHA-1 object id of our tree - * @param {string} args.baseOid - The SHA-1 object id of the base tree - * @param {string} args.theirOid - The SHA-1 object id of their tree - * @param {string} [args.ourName='ours'] - The name to use in conflicted files for our hunks - * @param {string} [args.baseName='base'] - The name to use in conflicted files (in diff3 format) for the base hunks - * @param {string} [args.theirName='theirs'] - The name to use in conflicted files for their hunks - * @param {boolean} [args.dryRun=false] - * - * @returns {Promise<string>} - The SHA-1 object id of the merged tree - * - */ -async function mergeTree({ - fs, - cache, - dir, - gitdir = join(dir, '.git'), - ourOid, - baseOid, - theirOid, - ourName = 'ours', - baseName = 'base', - theirName = 'theirs', - dryRun = false, -}) { - const ourTree = TREE({ ref: ourOid }); - const baseTree = TREE({ ref: baseOid }); - const theirTree = TREE({ ref: theirOid }); - - const results = await _walk({ - fs, - cache, - dir, - gitdir, - trees: [ourTree, baseTree, theirTree], - map: async function(filepath, [ours, base, theirs]) { - const path = basename(filepath); - // What we did, what they did - const ourChange = await modified(ours, base); - const theirChange = await modified(theirs, base); - switch (`${ourChange}-${theirChange}`) { - case 'false-false': { - return { - mode: await base.mode(), - path, - oid: await base.oid(), - type: await base.type(), - } - } - case 'false-true': { - return theirs - ? { - mode: await theirs.mode(), - path, - oid: await theirs.oid(), - type: await theirs.type(), - } - : undefined - } - case 'true-false': { - return ours - ? { - mode: await ours.mode(), - path, - oid: await ours.oid(), - type: await ours.type(), - } - : undefined - } - case 'true-true': { - // Modifications - if ( - ours && - base && - theirs && - (await ours.type()) === 'blob' && - (await base.type()) === 'blob' && - (await theirs.type()) === 'blob' - ) { - return mergeBlobs({ - fs, - gitdir, - path, - ours, - base, - theirs, - ourName, - baseName, - theirName, - }) - } - // all other types of conflicts fail - throw new MergeNotSupportedError() - } - } - }, - /** - * @param {TreeEntry} [parent] - * @param {Array<TreeEntry>} children - */ - reduce: async (parent, children) => { - const entries = children.filter(Boolean); // remove undefineds - - // if the parent was deleted, the children have to go - if (!parent) return - - // automatically delete directories if they have been emptied - if (parent && parent.type === 'tree' && entries.length === 0) return - - if (entries.length > 0) { - const tree = new GitTree(entries); - const object = tree.toObject(); - const oid = await _writeObject({ - fs, - gitdir, - type: 'tree', - object, - dryRun, - }); - parent.oid = oid; - } - return parent - }, - }); - return results.oid -} - -/** - * - * @param {WalkerEntry} entry - * @param {WalkerEntry} base - * - */ -async function modified(entry, base) { - if (!entry && !base) return false - if (entry && !base) return true - if (!entry && base) return true - if ((await entry.type()) === 'tree' && (await base.type()) === 'tree') { - return false - } - if ( - (await entry.type()) === (await base.type()) && - (await entry.mode()) === (await base.mode()) && - (await entry.oid()) === (await base.oid()) - ) { - return false - } - return true -} - -/** - * - * @param {Object} args - * @param {import('../models/FileSystem').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.path - * @param {WalkerEntry} args.ours - * @param {WalkerEntry} args.base - * @param {WalkerEntry} args.theirs - * @param {string} [args.ourName] - * @param {string} [args.baseName] - * @param {string} [args.theirName] - * @param {string} [args.format] - * @param {number} [args.markerSize] - * @param {boolean} [args.dryRun = false] - * - */ -async function mergeBlobs({ - fs, - gitdir, - path, - ours, - base, - theirs, - ourName, - theirName, - baseName, - format, - markerSize, - dryRun, -}) { - const type = 'blob'; - // Compute the new mode. - // Since there are ONLY two valid blob modes ('100755' and '100644') it boils down to this - const mode = - (await base.mode()) === (await ours.mode()) - ? await theirs.mode() - : await ours.mode(); - // The trivial case: nothing to merge except maybe mode - if ((await ours.oid()) === (await theirs.oid())) { - return { mode, path, oid: await ours.oid(), type } - } - // if only one side made oid changes, return that side's oid - if ((await ours.oid()) === (await base.oid())) { - return { mode, path, oid: await theirs.oid(), type } - } - if ((await theirs.oid()) === (await base.oid())) { - return { mode, path, oid: await ours.oid(), type } - } - // if both sides made changes do a merge - const { mergedText, cleanMerge } = mergeFile({ - ourContent: Buffer.from(await ours.content()).toString('utf8'), - baseContent: Buffer.from(await base.content()).toString('utf8'), - theirContent: Buffer.from(await theirs.content()).toString('utf8'), - ourName, - theirName, - baseName, - format, - markerSize, - }); - if (!cleanMerge) { - // all other types of conflicts fail - throw new MergeNotSupportedError() - } - const oid = await _writeObject({ - fs, - gitdir, - type: 'blob', - object: Buffer.from(mergedText, 'utf8'), - dryRun, - }); - return { mode, path, oid, type } -} - -// @ts-check - -// import diff3 from 'node-diff3' -/** - * - * @typedef {Object} MergeResult - Returns an object with a schema like this: - * @property {string} [oid] - The SHA-1 object id that is now at the head of the branch. Absent only if `dryRun` was specified and `mergeCommit` is true. - * @property {boolean} [alreadyMerged] - True if the branch was already merged so no changes were made - * @property {boolean} [fastForward] - True if it was a fast-forward merge - * @property {boolean} [mergeCommit] - True if merge resulted in a merge commit - * @property {string} [tree] - The SHA-1 object id of the tree resulting from a merge commit - * - */ - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {string} args.gitdir - * @param {string} [args.ours] - * @param {string} args.theirs - * @param {boolean} args.fastForwardOnly - * @param {boolean} args.dryRun - * @param {boolean} args.noUpdateBranch - * @param {string} [args.message] - * @param {Object} args.author - * @param {string} args.author.name - * @param {string} args.author.email - * @param {number} args.author.timestamp - * @param {number} args.author.timezoneOffset - * @param {Object} args.committer - * @param {string} args.committer.name - * @param {string} args.committer.email - * @param {number} args.committer.timestamp - * @param {number} args.committer.timezoneOffset - * @param {string} [args.signingKey] - * - * @returns {Promise<MergeResult>} Resolves to a description of the merge operation - * - */ -async function _merge({ - fs, - cache, - gitdir, - ours, - theirs, - fastForwardOnly = false, - dryRun = false, - noUpdateBranch = false, - message, - author, - committer, - signingKey, -}) { - if (ours === undefined) { - ours = await _currentBranch({ fs, gitdir, fullname: true }); - } - ours = await GitRefManager.expand({ - fs, - gitdir, - ref: ours, - }); - theirs = await GitRefManager.expand({ - fs, - gitdir, - ref: theirs, - }); - const ourOid = await GitRefManager.resolve({ - fs, - gitdir, - ref: ours, - }); - const theirOid = await GitRefManager.resolve({ - fs, - gitdir, - ref: theirs, - }); - // find most recent common ancestor of ref a and ref b - const baseOids = await _findMergeBase({ - fs, - cache, - gitdir, - oids: [ourOid, theirOid], - }); - if (baseOids.length !== 1) { - throw new MergeNotSupportedError() - } - const baseOid = baseOids[0]; - // handle fast-forward case - if (baseOid === theirOid) { - return { - oid: ourOid, - alreadyMerged: true, - } - } - if (baseOid === ourOid) { - if (!dryRun && !noUpdateBranch) { - await GitRefManager.writeRef({ fs, gitdir, ref: ours, value: theirOid }); - } - return { - oid: theirOid, - fastForward: true, - } - } else { - // not a simple fast-forward - if (fastForwardOnly) { - throw new FastForwardError() - } - // try a fancier merge - const tree = await mergeTree({ - fs, - cache, - gitdir, - ourOid, - theirOid, - baseOid, - ourName: ours, - baseName: 'base', - theirName: theirs, - dryRun, - }); - if (!message) { - message = `Merge branch '${abbreviateRef(theirs)}' into ${abbreviateRef( - ours - )}`; - } - const oid = await _commit({ - fs, - cache, - gitdir, - message, - ref: ours, - tree, - parent: [ourOid, theirOid], - author, - committer, - signingKey, - dryRun, - noUpdateBranch, - }); - return { - oid, - tree, - mergeCommit: true, - } - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {HttpClient} args.http - * @param {ProgressCallback} [args.onProgress] - * @param {MessageCallback} [args.onMessage] - * @param {AuthCallback} [args.onAuth] - * @param {AuthFailureCallback} [args.onAuthFailure] - * @param {AuthSuccessCallback} [args.onAuthSuccess] - * @param {string} args.dir - * @param {string} args.gitdir - * @param {string} args.ref - * @param {string} [args.url] - * @param {string} [args.remote] - * @param {string} [args.remoteRef] - * @param {string} [args.corsProxy] - * @param {boolean} args.singleBranch - * @param {boolean} args.fastForwardOnly - * @param {Object<string, string>} [args.headers] - * @param {Object} args.author - * @param {string} args.author.name - * @param {string} args.author.email - * @param {number} args.author.timestamp - * @param {number} args.author.timezoneOffset - * @param {Object} args.committer - * @param {string} args.committer.name - * @param {string} args.committer.email - * @param {number} args.committer.timestamp - * @param {number} args.committer.timezoneOffset - * @param {string} [args.signingKey] - * - * @returns {Promise<void>} Resolves successfully when pull operation completes - * - */ -async function _pull({ - fs, - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir, - ref, - url, - remote, - remoteRef, - fastForwardOnly, - corsProxy, - singleBranch, - headers, - author, - committer, - signingKey, -}) { - try { - // If ref is undefined, use 'HEAD' - if (!ref) { - const head = await _currentBranch({ fs, gitdir }); - // TODO: use a better error. - if (!head) { - throw new MissingParameterError('ref') - } - ref = head; - } - - const { fetchHead, fetchHeadDescription } = await _fetch({ - fs, - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - gitdir, - corsProxy, - ref, - url, - remote, - remoteRef, - singleBranch, - headers, - }); - // Merge the remote tracking branch into the local one. - await _merge({ - fs, - cache, - gitdir, - ours: ref, - theirs: fetchHead, - fastForwardOnly, - message: `Merge ${fetchHeadDescription}`, - author, - committer, - signingKey, - dryRun: false, - noUpdateBranch: false, - }); - await _checkout({ - fs, - cache, - onProgress, - dir, - gitdir, - ref, - remote, - noCheckout: false, - }); - } catch (err) { - err.caller = 'git.pull'; - throw err - } -} - -// @ts-check - -/** - * Like `pull`, but hard-coded with `fastForward: true` so there is no need for an `author` parameter. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - Which branch to merge into. By default this is the currently checked out branch. - * @param {string} [args.url] - (Added in 1.1.0) The URL of the remote repository. The default is the value set in the git config for that remote. - * @param {string} [args.remote] - (Added in 1.1.0) If URL is not specified, determines which remote to use. - * @param {string} [args.remoteRef] - (Added in 1.1.0) The name of the branch on the remote to fetch. By default this is the configured remote tracking branch. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when pull operation completes - * - * @example - * await git.fastForward({ - * fs, - * http, - * dir: '/tutorial', - * ref: 'main', - * singleBranch: true - * }) - * console.log('done') - * - */ -async function fastForward({ - fs, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir = join(dir, '.git'), - ref, - url, - remote, - remoteRef, - corsProxy, - singleBranch, - headers = {}, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('http', http); - assertParameter('gitdir', gitdir); - - const thisWillNotBeUsed = { - name: '', - email: '', - timestamp: Date.now(), - timezoneOffset: 0, - }; - - return await _pull({ - fs: new FileSystem(fs), - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir, - ref, - url, - remote, - remoteRef, - fastForwardOnly: true, - corsProxy, - singleBranch, - headers, - author: thisWillNotBeUsed, - committer: thisWillNotBeUsed, - }) - } catch (err) { - err.caller = 'git.fastForward'; - throw err - } -} - -// @ts-check - -/** - * - * @typedef {object} FetchResult - The object returned has the following schema: - * @property {string | null} defaultBranch - The branch that is cloned if no branch is specified - * @property {string | null} fetchHead - The SHA-1 object id of the fetched head commit - * @property {string | null} fetchHeadDescription - a textual description of the branch that was fetched - * @property {Object<string, string>} [headers] - The HTTP response headers returned by the git server - * @property {string[]} [pruned] - A list of branches that were pruned, if you provided the `prune` parameter - * - */ - -/** - * Fetch commits from a remote repository - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.url] - The URL of the remote repository. The default is the value set in the git config for that remote. - * @param {string} [args.remote] - If URL is not specified, determines which remote to use. - * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch. - * @param {string} [args.ref] - Which branch to fetch if `singleBranch` is true. By default this is the current branch or the remote's default branch. - * @param {string} [args.remoteRef] - The name of the branch on the remote to fetch if `singleBranch` is true. By default this is the configured remote tracking branch. - * @param {boolean} [args.tags = false] - Also fetch tags - * @param {number} [args.depth] - Integer. Determines how much of the git repository's history to retrieve - * @param {boolean} [args.relative = false] - Changes the meaning of `depth` to be measured from the current shallow depth rather than from the branch tip. - * @param {Date} [args.since] - Only fetch commits created after the given date. Mutually exclusive with `depth`. - * @param {string[]} [args.exclude = []] - A list of branches or tags. Instructs the remote server not to send us any commits reachable from these refs. - * @param {boolean} [args.prune] - Delete local remote-tracking branches that are not present on the remote - * @param {boolean} [args.pruneTags] - Prune local tags that don’t exist on the remote, and force-update those tags that differ - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<FetchResult>} Resolves successfully when fetch completes - * @see FetchResult - * - * @example - * let result = await git.fetch({ - * fs, - * http, - * dir: '/tutorial', - * corsProxy: 'https://cors.isomorphic-git.org', - * url: 'https://github.com/isomorphic-git/isomorphic-git', - * ref: 'main', - * depth: 1, - * singleBranch: true, - * tags: false - * }) - * console.log(result) - * - */ -async function fetch({ - fs, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir = join(dir, '.git'), - ref, - remote, - remoteRef, - url, - corsProxy, - depth = null, - since = null, - exclude = [], - relative = false, - tags = false, - singleBranch = false, - headers = {}, - prune = false, - pruneTags = false, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('http', http); - assertParameter('gitdir', gitdir); - - return await _fetch({ - fs: new FileSystem(fs), - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - gitdir, - ref, - remote, - remoteRef, - url, - corsProxy, - depth, - since, - exclude, - relative, - tags, - singleBranch, - headers, - prune, - pruneTags, - }) - } catch (err) { - err.caller = 'git.fetch'; - throw err - } -} - -// @ts-check - -/** - * Find the merge base for a set of commits - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string[]} args.oids - Which commits - * @param {object} [args.cache] - a [cache](cache.md) object - * - */ -async function findMergeBase({ - fs, - dir, - gitdir = join(dir, '.git'), - oids, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('oids', oids); - - return await _findMergeBase({ - fs: new FileSystem(fs), - cache, - gitdir, - oids, - }) - } catch (err) { - err.caller = 'git.findMergeBase'; - throw err - } -} - -// @ts-check - -/** - * Find the root git directory - * - * Starting at `filepath`, walks upward until it finds a directory that contains a subdirectory called '.git'. - * - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.filepath - * - * @returns {Promise<string>} Resolves successfully with a root git directory path - */ -async function _findRoot({ fs, filepath }) { - if (await fs.exists(join(filepath, '.git'))) { - return filepath - } else { - const parent = dirname(filepath); - if (parent === filepath) { - throw new NotFoundError(`git root for ${filepath}`) - } - return _findRoot({ fs, filepath: parent }) - } -} - -// @ts-check - -/** - * Find the root git directory - * - * Starting at `filepath`, walks upward until it finds a directory that contains a subdirectory called '.git'. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system client - * @param {string} args.filepath - The file directory to start searching in. - * - * @returns {Promise<string>} Resolves successfully with a root git directory path - * @throws {NotFoundError} - * - * @example - * let gitroot = await git.findRoot({ - * fs, - * filepath: '/tutorial/src/utils' - * }) - * console.log(gitroot) - * - */ -async function findRoot({ fs, filepath }) { - try { - assertParameter('fs', fs); - assertParameter('filepath', filepath); - - return await _findRoot({ fs: new FileSystem(fs), filepath }) - } catch (err) { - err.caller = 'git.findRoot'; - throw err - } -} - -// @ts-check - -/** - * Read an entry from the git config files. - * - * *Caveats:* - * - Currently only the local `$GIT_DIR/config` file can be read or written. However support for the global `~/.gitconfig` and system `$(prefix)/etc/gitconfig` will be added in the future. - * - The current parser does not support the more exotic features of the git-config file format such as `[include]` and `[includeIf]`. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.path - The key of the git config entry - * - * @returns {Promise<any>} Resolves with the config value - * - * @example - * // Read config value - * let value = await git.getConfig({ - * fs, - * dir: '/tutorial', - * path: 'remote.origin.url' - * }) - * console.log(value) - * - */ -async function getConfig({ fs, dir, gitdir = join(dir, '.git'), path }) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('path', path); - - return await _getConfig({ - fs: new FileSystem(fs), - gitdir, - path, - }) - } catch (err) { - err.caller = 'git.getConfig'; - throw err - } -} - -// @ts-check - -/** - * @param {Object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.path - * - * @returns {Promise<Array<any>>} Resolves with an array of the config value - * - */ -async function _getConfigAll({ fs, gitdir, path }) { - const config = await GitConfigManager.get({ fs, gitdir }); - return config.getall(path) -} - -// @ts-check - -/** - * Read a multi-valued entry from the git config files. - * - * *Caveats:* - * - Currently only the local `$GIT_DIR/config` file can be read or written. However support for the global `~/.gitconfig` and system `$(prefix)/etc/gitconfig` will be added in the future. - * - The current parser does not support the more exotic features of the git-config file format such as `[include]` and `[includeIf]`. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.path - The key of the git config entry - * - * @returns {Promise<Array<any>>} Resolves with the config value - * - */ -async function getConfigAll({ - fs, - dir, - gitdir = join(dir, '.git'), - path, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('path', path); - - return await _getConfigAll({ - fs: new FileSystem(fs), - gitdir, - path, - }) - } catch (err) { - err.caller = 'git.getConfigAll'; - throw err - } -} - -// @ts-check - -/** - * - * @typedef {Object} GetRemoteInfoResult - The object returned has the following schema: - * @property {string[]} capabilities - The list of capabilities returned by the server (part of the Git protocol) - * @property {Object} [refs] - * @property {string} [HEAD] - The default branch of the remote - * @property {Object<string, string>} [refs.heads] - The branches on the remote - * @property {Object<string, string>} [refs.pull] - The special branches representing pull requests (non-standard) - * @property {Object<string, string>} [refs.tags] - The tags on the remote - * - */ - -/** - * List a remote servers branches, tags, and capabilities. - * - * This is a rare command that doesn't require an `fs`, `dir`, or even `gitdir` argument. - * It just communicates to a remote git server, using the first step of the `git-upload-pack` handshake, but stopping short of fetching the packfile. - * - * @param {object} args - * @param {HttpClient} args.http - an HTTP client - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.url - The URL of the remote repository. Will be gotten from gitconfig if absent. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.forPush = false] - By default, the command queries the 'fetch' capabilities. If true, it will ask for the 'push' capabilities. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * - * @returns {Promise<GetRemoteInfoResult>} Resolves successfully with an object listing the branches, tags, and capabilities of the remote. - * @see GetRemoteInfoResult - * - * @example - * let info = await git.getRemoteInfo({ - * http, - * url: - * "https://cors.isomorphic-git.org/github.com/isomorphic-git/isomorphic-git.git" - * }); - * console.log(info); - * - */ -async function getRemoteInfo({ - http, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - url, - headers = {}, - forPush = false, -}) { - try { - assertParameter('http', http); - assertParameter('url', url); - - const GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url }); - const remote = await GitRemoteHTTP.discover({ - http, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - service: forPush ? 'git-receive-pack' : 'git-upload-pack', - url, - headers, - protocolVersion: 1, - }); - - // Note: remote.capabilities, remote.refs, and remote.symrefs are Set and Map objects, - // but one of the objectives of the public API is to always return JSON-compatible objects - // so we must JSONify them. - const result = { - capabilities: [...remote.capabilities], - }; - // Convert the flat list into an object tree, because I figure 99% of the time - // that will be easier to use. - for (const [ref, oid] of remote.refs) { - const parts = ref.split('/'); - const last = parts.pop(); - let o = result; - for (const part of parts) { - o[part] = o[part] || {}; - o = o[part]; - } - o[last] = oid; - } - // Merge symrefs on top of refs to more closely match actual git repo layouts - for (const [symref, ref] of remote.symrefs) { - const parts = symref.split('/'); - const last = parts.pop(); - let o = result; - for (const part of parts) { - o[part] = o[part] || {}; - o = o[part]; - } - o[last] = ref; - } - return result - } catch (err) { - err.caller = 'git.getRemoteInfo'; - throw err - } -} - -// @ts-check - -/** - * @param {any} remote - * @param {string} prefix - * @param {boolean} symrefs - * @param {boolean} peelTags - * @returns {ServerRef[]} - */ -function formatInfoRefs(remote, prefix, symrefs, peelTags) { - const refs = []; - for (const [key, value] of remote.refs) { - if (prefix && !key.startsWith(prefix)) continue - - if (key.endsWith('^{}')) { - if (peelTags) { - const _key = key.replace('^{}', ''); - // Peeled tags are almost always listed immediately after the original tag - const last = refs[refs.length - 1]; - const r = last.ref === _key ? last : refs.find(x => x.ref === _key); - if (r === undefined) { - throw new Error('I did not expect this to happen') - } - r.peeled = value; - } - continue - } - /** @type ServerRef */ - const ref = { ref: key, oid: value }; - if (symrefs) { - if (remote.symrefs.has(key)) { - ref.target = remote.symrefs.get(key); - } - } - refs.push(ref); - } - return refs -} - -// @ts-check - -/** - * @typedef {Object} GetRemoteInfo2Result - This object has the following schema: - * @property {1 | 2} protocolVersion - Git protocol version the server supports - * @property {Object<string, string | true>} capabilities - An object of capabilities represented as keys and values - * @property {ServerRef[]} [refs] - Server refs (they get returned by protocol version 1 whether you want them or not) - */ - -/** - * List a remote server's capabilities. - * - * This is a rare command that doesn't require an `fs`, `dir`, or even `gitdir` argument. - * It just communicates to a remote git server, determining what protocol version, commands, and features it supports. - * - * > The successor to [`getRemoteInfo`](./getRemoteInfo.md), this command supports Git Wire Protocol Version 2. - * > Therefore its return type is more complicated as either: - * > - * > - v1 capabilities (and refs) or - * > - v2 capabilities (and no refs) - * > - * > are returned. - * > If you just care about refs, use [`listServerRefs`](./listServerRefs.md) - * - * @param {object} args - * @param {HttpClient} args.http - an HTTP client - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.url - The URL of the remote repository. Will be gotten from gitconfig if absent. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.forPush = false] - By default, the command queries the 'fetch' capabilities. If true, it will ask for the 'push' capabilities. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {1 | 2} [args.protocolVersion = 2] - Which version of the Git Protocol to use. - * - * @returns {Promise<GetRemoteInfo2Result>} Resolves successfully with an object listing the capabilities of the remote. - * @see GetRemoteInfo2Result - * @see ServerRef - * - * @example - * let info = await git.getRemoteInfo2({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git" - * }); - * console.log(info); - * - */ -async function getRemoteInfo2({ - http, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - url, - headers = {}, - forPush = false, - protocolVersion = 2, -}) { - try { - assertParameter('http', http); - assertParameter('url', url); - - const GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url }); - const remote = await GitRemoteHTTP.discover({ - http, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - service: forPush ? 'git-receive-pack' : 'git-upload-pack', - url, - headers, - protocolVersion, - }); - - if (remote.protocolVersion === 2) { - /** @type GetRemoteInfo2Result */ - return { - protocolVersion: remote.protocolVersion, - capabilities: remote.capabilities2, - } - } - - // Note: remote.capabilities, remote.refs, and remote.symrefs are Set and Map objects, - // but one of the objectives of the public API is to always return JSON-compatible objects - // so we must JSONify them. - /** @type Object<string, true> */ - const capabilities = {}; - for (const cap of remote.capabilities) { - const [key, value] = cap.split('='); - if (value) { - capabilities[key] = value; - } else { - capabilities[key] = true; - } - } - /** @type GetRemoteInfo2Result */ - return { - protocolVersion: 1, - capabilities, - refs: formatInfoRefs(remote, undefined, true, true), - } - } catch (err) { - err.caller = 'git.getRemoteInfo2'; - throw err - } -} - -async function hashObject({ - type, - object, - format = 'content', - oid = undefined, -}) { - if (format !== 'deflated') { - if (format !== 'wrapped') { - object = GitObject.wrap({ type, object }); - } - oid = await shasum(object); - } - return { oid, object } -} - -// @ts-check - -/** - * - * @typedef {object} HashBlobResult - The object returned has the following schema: - * @property {string} oid - The SHA-1 object id - * @property {'blob'} type - The type of the object - * @property {Uint8Array} object - The wrapped git object (the thing that is hashed) - * @property {'wrapped'} format - The format of the object - * - */ - -/** - * Compute what the SHA-1 object id of a file would be - * - * @param {object} args - * @param {Uint8Array|string} args.object - The object to write. If `object` is a String then it will be converted to a Uint8Array using UTF-8 encoding. - * - * @returns {Promise<HashBlobResult>} Resolves successfully with the SHA-1 object id and the wrapped object Uint8Array. - * @see HashBlobResult - * - * @example - * let { oid, type, object, format } = await git.hashBlob({ - * object: 'Hello world!', - * }) - * - * console.log('oid', oid) - * console.log('type', type) - * console.log('object', object) - * console.log('format', format) - * - */ -async function hashBlob({ object }) { - try { - assertParameter('object', object); - - // Convert object to buffer - if (typeof object === 'string') { - object = Buffer.from(object, 'utf8'); - } else { - object = Buffer.from(object); - } - - const type = 'blob'; - const { oid, object: _object } = await hashObject({ - type: 'blob', - format: 'content', - object, - }); - return { oid, type, object: new Uint8Array(_object), format: 'wrapped' } - } catch (err) { - err.caller = 'git.hashBlob'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {ProgressCallback} [args.onProgress] - * @param {string} args.dir - * @param {string} args.gitdir - * @param {string} args.filepath - * - * @returns {Promise<{oids: string[]}>} - */ -async function _indexPack({ - fs, - cache, - onProgress, - dir, - gitdir, - filepath, -}) { - try { - filepath = join(dir, filepath); - const pack = await fs.read(filepath); - const getExternalRefDelta = oid => _readObject({ fs, cache, gitdir, oid }); - const idx = await GitPackIndex.fromPack({ - pack, - getExternalRefDelta, - onProgress, - }); - await fs.write(filepath.replace(/\.pack$/, '.idx'), await idx.toBuffer()); - return { - oids: [...idx.hashes], - } - } catch (err) { - err.caller = 'git.indexPack'; - throw err - } -} - -// @ts-check - -/** - * Create the .idx file for a given .pack file - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the .pack file to index - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<{oids: string[]}>} Resolves with a list of the SHA-1 object ids contained in the packfile - * - * @example - * let packfiles = await fs.promises.readdir('/tutorial/.git/objects/pack') - * packfiles = packfiles.filter(name => name.endsWith('.pack')) - * console.log('packfiles', packfiles) - * - * const { oids } = await git.indexPack({ - * fs, - * dir: '/tutorial', - * filepath: `.git/objects/pack/${packfiles[0]}`, - * async onProgress (evt) { - * console.log(`${evt.phase}: ${evt.loaded} / ${evt.total}`) - * } - * }) - * console.log(oids) - * - */ -async function indexPack({ - fs, - onProgress, - dir, - gitdir = join(dir, '.git'), - filepath, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('dir', dir); - assertParameter('gitdir', dir); - assertParameter('filepath', filepath); - - return await _indexPack({ - fs: new FileSystem(fs), - cache, - onProgress, - dir, - gitdir, - filepath, - }) - } catch (err) { - err.caller = 'git.indexPack'; - throw err - } -} - -// @ts-check - -/** - * Initialize a new repository - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {boolean} [args.bare = false] - Initialize a bare repository - * @param {string} [args.defaultBranch = 'master'] - The name of the default branch (might be changed to a required argument in 2.0.0) - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.init({ fs, dir: '/tutorial' }) - * console.log('done') - * - */ -async function init({ - fs, - bare = false, - dir, - gitdir = bare ? dir : join(dir, '.git'), - defaultBranch = 'master', -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - if (!bare) { - assertParameter('dir', dir); - } - - return await _init({ - fs: new FileSystem(fs), - bare, - dir, - gitdir, - defaultBranch, - }) - } catch (err) { - err.caller = 'git.init'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} args.oid - * @param {string} args.ancestor - * @param {number} args.depth - Maximum depth to search before giving up. -1 means no maximum depth. - * - * @returns {Promise<boolean>} - */ -async function _isDescendent({ - fs, - cache, - gitdir, - oid, - ancestor, - depth, -}) { - const shallows = await GitShallowManager.read({ fs, gitdir }); - if (!oid) { - throw new MissingParameterError('oid') - } - if (!ancestor) { - throw new MissingParameterError('ancestor') - } - // If you don't like this behavior, add your own check. - // Edge cases are hard to define a perfect solution. - if (oid === ancestor) return false - // We do not use recursion here, because that would lead to depth-first traversal, - // and we want to maintain a breadth-first traversal to avoid hitting shallow clone depth cutoffs. - const queue = [oid]; - const visited = new Set(); - let searchdepth = 0; - while (queue.length) { - if (searchdepth++ === depth) { - throw new MaxDepthError(depth) - } - const oid = queue.shift(); - const { type, object } = await _readObject({ - fs, - cache, - gitdir, - oid, - }); - if (type !== 'commit') { - throw new ObjectTypeError(oid, type, 'commit') - } - const commit = GitCommit.from(object).parse(); - // Are any of the parents the sought-after ancestor? - for (const parent of commit.parent) { - if (parent === ancestor) return true - } - // If not, add them to heads (unless we know this is a shallow commit) - if (!shallows.has(oid)) { - for (const parent of commit.parent) { - if (!visited.has(parent)) { - queue.push(parent); - visited.add(parent); - } - } - } - // Eventually, we'll travel entire tree to the roots where all the parents are empty arrays, - // or hit the shallow depth and throw an error. Excluding the possibility of grafts, or - // different branches cloned to different depths, you would hit this error at the same time - // for all parents, so trying to continue is futile. - } - return false -} - -// @ts-check - -/** - * Check whether a git commit is descended from another - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The descendent commit - * @param {string} args.ancestor - The (proposed) ancestor commit - * @param {number} [args.depth = -1] - Maximum depth to search before giving up. -1 means no maximum depth. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<boolean>} Resolves to true if `oid` is a descendent of `ancestor` - * - * @example - * let oid = await git.resolveRef({ fs, dir: '/tutorial', ref: 'main' }) - * let ancestor = await git.resolveRef({ fs, dir: '/tutorial', ref: 'v0.20.0' }) - * console.log(oid, ancestor) - * await git.isDescendent({ fs, dir: '/tutorial', oid, ancestor, depth: -1 }) - * - */ -async function isDescendent({ - fs, - dir, - gitdir = join(dir, '.git'), - oid, - ancestor, - depth = -1, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - assertParameter('ancestor', ancestor); - - return await _isDescendent({ - fs: new FileSystem(fs), - cache, - gitdir, - oid, - ancestor, - depth, - }) - } catch (err) { - err.caller = 'git.isDescendent'; - throw err - } -} - -// @ts-check - -/** - * List branches - * - * By default it lists local branches. If a 'remote' is specified, it lists the remote's branches. When listing remote branches, the HEAD branch is not filtered out, so it may be included in the list of results. - * - * Note that specifying a remote does not actually contact the server and update the list of branches. - * If you want an up-to-date list, first do a `fetch` to that remote. - * (Which branch you fetch doesn't matter - the list of branches available on the remote is updated during the fetch handshake.) - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.remote] - Instead of the branches in `refs/heads`, list the branches in `refs/remotes/${remote}`. - * - * @returns {Promise<Array<string>>} Resolves successfully with an array of branch names - * - * @example - * let branches = await git.listBranches({ fs, dir: '/tutorial' }) - * console.log(branches) - * let remoteBranches = await git.listBranches({ fs, dir: '/tutorial', remote: 'origin' }) - * console.log(remoteBranches) - * - */ -async function listBranches({ - fs, - dir, - gitdir = join(dir, '.git'), - remote, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - - return GitRefManager.listBranches({ - fs: new FileSystem(fs), - gitdir, - remote, - }) - } catch (err) { - err.caller = 'git.listBranches'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {string} args.gitdir - * @param {string} [args.ref] - * - * @returns {Promise<Array<string>>} - */ -async function _listFiles({ fs, gitdir, ref, cache }) { - if (ref) { - const oid = await GitRefManager.resolve({ gitdir, fs, ref }); - const filenames = []; - await accumulateFilesFromOid({ - fs, - cache, - gitdir, - oid, - filenames, - prefix: '', - }); - return filenames - } else { - return GitIndexManager.acquire({ fs, gitdir, cache }, async function( - index - ) { - return index.entries.map(x => x.path) - }) - } -} - -async function accumulateFilesFromOid({ - fs, - cache, - gitdir, - oid, - filenames, - prefix, -}) { - const { tree } = await _readTree({ fs, cache, gitdir, oid }); - // TODO: Use `walk` to do this. Should be faster. - for (const entry of tree) { - if (entry.type === 'tree') { - await accumulateFilesFromOid({ - fs, - cache, - gitdir, - oid: entry.oid, - filenames, - prefix: join(prefix, entry.path), - }); - } else { - filenames.push(join(prefix, entry.path)); - } - } -} - -// @ts-check - -/** - * List all the files in the git index or a commit - * - * > Note: This function is efficient for listing the files in the staging area, but listing all the files in a commit requires recursively walking through the git object store. - * > If you do not require a complete list of every file, better performance can be achieved by using [walk](./walk) and ignoring subdirectories you don't care about. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - Return a list of all the files in the commit at `ref` instead of the files currently in the git index (aka staging area) - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Array<string>>} Resolves successfully with an array of filepaths - * - * @example - * // All the files in the previous commit - * let files = await git.listFiles({ fs, dir: '/tutorial', ref: 'HEAD' }) - * console.log(files) - * // All the files in the current staging area - * files = await git.listFiles({ fs, dir: '/tutorial' }) - * console.log(files) - * - */ -async function listFiles({ - fs, - dir, - gitdir = join(dir, '.git'), - ref, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - - return await _listFiles({ - fs: new FileSystem(fs), - cache, - gitdir, - ref, - }) - } catch (err) { - err.caller = 'git.listFiles'; - throw err - } -} - -// @ts-check - -/** - * List all the object notes - * - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} args.ref - * - * @returns {Promise<Array<{target: string, note: string}>>} - */ - -async function _listNotes({ fs, cache, gitdir, ref }) { - // Get the current note commit - let parent; - try { - parent = await GitRefManager.resolve({ gitdir, fs, ref }); - } catch (err) { - if (err instanceof NotFoundError) { - return [] - } - } - - // Create the current note tree - const result = await _readTree({ - fs, - cache, - gitdir, - oid: parent, - }); - - // Format the tree entries - const notes = result.tree.map(entry => ({ - target: entry.path, - note: entry.oid, - })); - return notes -} - -// @ts-check - -/** - * List all the object notes - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - The notes ref to look under - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Array<{target: string, note: string}>>} Resolves successfully with an array of entries containing SHA-1 object ids of the note and the object the note targets - */ - -async function listNotes({ - fs, - dir, - gitdir = join(dir, '.git'), - ref = 'refs/notes/commits', - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - - return await _listNotes({ - fs: new FileSystem(fs), - cache, - gitdir, - ref, - }) - } catch (err) { - err.caller = 'git.listNotes'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * - * @returns {Promise<Array<{remote: string, url: string}>>} - */ -async function _listRemotes({ fs, gitdir }) { - const config = await GitConfigManager.get({ fs, gitdir }); - const remoteNames = await config.getSubsections('remote'); - const remotes = Promise.all( - remoteNames.map(async remote => { - const url = await config.get(`remote.${remote}.url`); - return { remote, url } - }) - ); - return remotes -} - -// @ts-check - -/** - * List remotes - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * - * @returns {Promise<Array<{remote: string, url: string}>>} Resolves successfully with an array of `{remote, url}` objects - * - * @example - * let remotes = await git.listRemotes({ fs, dir: '/tutorial' }) - * console.log(remotes) - * - */ -async function listRemotes({ fs, dir, gitdir = join(dir, '.git') }) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - - return await _listRemotes({ - fs: new FileSystem(fs), - gitdir, - }) - } catch (err) { - err.caller = 'git.listRemotes'; - throw err - } -} - -/** - * @typedef {Object} ServerRef - This object has the following schema: - * @property {string} ref - The name of the ref - * @property {string} oid - The SHA-1 object id the ref points to - * @property {string} [target] - The target ref pointed to by a symbolic ref - * @property {string} [peeled] - If the oid is the SHA-1 object id of an annotated tag, this is the SHA-1 object id that the annotated tag points to - */ - -async function parseListRefsResponse(stream) { - const read = GitPktLine.streamReader(stream); - - // TODO: when we re-write everything to minimize memory usage, - // we could make this a generator - const refs = []; - - let line; - while (true) { - line = await read(); - if (line === true) break - if (line === null) continue - line = line.toString('utf8').replace(/\n$/, ''); - const [oid, ref, ...attrs] = line.split(' '); - const r = { ref, oid }; - for (const attr of attrs) { - const [name, value] = attr.split(':'); - if (name === 'symref-target') { - r.target = value; - } else if (name === 'peeled') { - r.peeled = value; - } - } - refs.push(r); - } - - return refs -} - -/** - * @param {object} args - * @param {string} [args.prefix] - Only list refs that start with this prefix - * @param {boolean} [args.symrefs = false] - Include symbolic ref targets - * @param {boolean} [args.peelTags = false] - Include peeled tags values - * @returns {Uint8Array[]} - */ -async function writeListRefsRequest({ prefix, symrefs, peelTags }) { - const packstream = []; - // command - packstream.push(GitPktLine.encode('command=ls-refs\n')); - // capability-list - packstream.push(GitPktLine.encode(`agent=${pkg.agent}\n`)); - // [command-args] - if (peelTags || symrefs || prefix) { - packstream.push(GitPktLine.delim()); - } - if (peelTags) packstream.push(GitPktLine.encode('peel')); - if (symrefs) packstream.push(GitPktLine.encode('symrefs')); - if (prefix) packstream.push(GitPktLine.encode(`ref-prefix ${prefix}`)); - packstream.push(GitPktLine.flush()); - return packstream -} - -// @ts-check - -/** - * Fetch a list of refs (branches, tags, etc) from a server. - * - * This is a rare command that doesn't require an `fs`, `dir`, or even `gitdir` argument. - * It just requires an `http` argument. - * - * ### About `protocolVersion` - * - * There's a rather fun trade-off between Git Protocol Version 1 and Git Protocol Version 2. - * Version 2 actually requires 2 HTTP requests instead of 1, making it similar to fetch or push in that regard. - * However, version 2 supports server-side filtering by prefix, whereas that filtering is done client-side in version 1. - * Which protocol is most efficient therefore depends on the number of refs on the remote, the latency of the server, and speed of the network connection. - * For an small repos (or fast Internet connections), the requirement to make two trips to the server makes protocol 2 slower. - * But for large repos (or slow Internet connections), the decreased payload size of the second request makes up for the additional request. - * - * Hard numbers vary by situation, but here's some numbers from my machine: - * - * Using isomorphic-git in a browser, with a CORS proxy, listing only the branches (refs/heads) of https://github.com/isomorphic-git/isomorphic-git - * - Protocol Version 1 took ~300ms and transfered 84 KB. - * - Protocol Version 2 took ~500ms and transfered 4.1 KB. - * - * Using isomorphic-git in a browser, with a CORS proxy, listing only the branches (refs/heads) of https://gitlab.com/gitlab-org/gitlab - * - Protocol Version 1 took ~4900ms and transfered 9.41 MB. - * - Protocol Version 2 took ~1280ms and transfered 433 KB. - * - * Finally, there is a fun quirk regarding the `symrefs` parameter. - * Protocol Version 1 will generally only return the `HEAD` symref and not others. - * Historically, this meant that servers don't use symbolic refs except for `HEAD`, which is used to point at the "default branch". - * However Protocol Version 2 can return *all* the symbolic refs on the server. - * So if you are running your own git server, you could take advantage of that I guess. - * - * #### TL;DR - * If you are _not_ taking advantage of `prefix` I would recommend `protocolVersion: 1`. - * Otherwise, I recommend to use the default which is `protocolVersion: 2`. - * - * @param {object} args - * @param {HttpClient} args.http - an HTTP client - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.url - The URL of the remote repository. Will be gotten from gitconfig if absent. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.forPush = false] - By default, the command queries the 'fetch' capabilities. If true, it will ask for the 'push' capabilities. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {1 | 2} [args.protocolVersion = 2] - Which version of the Git Protocol to use. - * @param {string} [args.prefix] - Only list refs that start with this prefix - * @param {boolean} [args.symrefs = false] - Include symbolic ref targets - * @param {boolean} [args.peelTags = false] - Include annotated tag peeled targets - * - * @returns {Promise<ServerRef[]>} Resolves successfully with an array of ServerRef objects - * @see ServerRef - * - * @example - * // List all the branches on a repo - * let refs = await git.listServerRefs({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git", - * prefix: "refs/heads/", - * }); - * console.log(refs); - * - * @example - * // Get the default branch on a repo - * let refs = await git.listServerRefs({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git", - * prefix: "HEAD", - * symrefs: true, - * }); - * console.log(refs); - * - * @example - * // List all the tags on a repo - * let refs = await git.listServerRefs({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git", - * prefix: "refs/tags/", - * peelTags: true, - * }); - * console.log(refs); - * - * @example - * // List all the pull requests on a repo - * let refs = await git.listServerRefs({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git", - * prefix: "refs/pull/", - * }); - * console.log(refs); - * - */ -async function listServerRefs({ - http, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - url, - headers = {}, - forPush = false, - protocolVersion = 2, - prefix, - symrefs, - peelTags, -}) { - try { - assertParameter('http', http); - assertParameter('url', url); - - const remote = await GitRemoteHTTP.discover({ - http, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - service: forPush ? 'git-receive-pack' : 'git-upload-pack', - url, - headers, - protocolVersion, - }); - - if (remote.protocolVersion === 1) { - return formatInfoRefs(remote, prefix, symrefs, peelTags) - } - - // Protocol Version 2 - const body = await writeListRefsRequest({ prefix, symrefs, peelTags }); - - const res = await GitRemoteHTTP.connect({ - http, - auth: remote.auth, - headers, - corsProxy, - service: forPush ? 'git-receive-pack' : 'git-upload-pack', - url, - body, - }); - - return parseListRefsResponse(res.body) - } catch (err) { - err.caller = 'git.listServerRefs'; - throw err - } -} - -// @ts-check - -/** - * List tags - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * - * @returns {Promise<Array<string>>} Resolves successfully with an array of tag names - * - * @example - * let tags = await git.listTags({ fs, dir: '/tutorial' }) - * console.log(tags) - * - */ -async function listTags({ fs, dir, gitdir = join(dir, '.git') }) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - return GitRefManager.listTags({ fs: new FileSystem(fs), gitdir }) - } catch (err) { - err.caller = 'git.listTags'; - throw err - } -} - -async function resolveCommit({ fs, cache, gitdir, oid }) { - const { type, object } = await _readObject({ fs, cache, gitdir, oid }); - // Resolve annotated tag objects to whatever - if (type === 'tag') { - oid = GitAnnotatedTag.from(object).parse().object; - return resolveCommit({ fs, cache, gitdir, oid }) - } - if (type !== 'commit') { - throw new ObjectTypeError(oid, type, 'commit') - } - return { commit: GitCommit.from(object), oid } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} args.oid - * - * @returns {Promise<ReadCommitResult>} Resolves successfully with a git commit object - * @see ReadCommitResult - * @see CommitObject - * - */ -async function _readCommit({ fs, cache, gitdir, oid }) { - const { commit, oid: commitOid } = await resolveCommit({ - fs, - cache, - gitdir, - oid, - }); - const result = { - oid: commitOid, - commit: commit.parse(), - payload: commit.withoutSignature(), - }; - // @ts-ignore - return result -} - -function compareAge(a, b) { - return a.committer.timestamp - b.committer.timestamp -} - -// @ts-check - -/** - * Get commit descriptions from the git history - * - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} args.ref - * @param {number|void} args.depth - * @param {Date|void} args.since - * - * @returns {Promise<Array<ReadCommitResult>>} - */ -async function _log({ fs, cache, gitdir, ref, depth, since }) { - const sinceTimestamp = - typeof since === 'undefined' - ? undefined - : Math.floor(since.valueOf() / 1000); - // TODO: In the future, we may want to have an API where we return a - // async iterator that emits commits. - const commits = []; - const shallowCommits = await GitShallowManager.read({ fs, gitdir }); - const oid = await GitRefManager.resolve({ fs, gitdir, ref }); - const tips = [await _readCommit({ fs, cache, gitdir, oid })]; - - while (tips.length > 0) { - const commit = tips.pop(); - - // Stop the log if we've hit the age limit - if ( - sinceTimestamp !== undefined && - commit.commit.committer.timestamp <= sinceTimestamp - ) { - break - } - - commits.push(commit); - - // Stop the loop if we have enough commits now. - if (depth !== undefined && commits.length === depth) break - - // If this is not a shallow commit... - if (!shallowCommits.has(commit.oid)) { - // Add the parents of this commit to the queue - // Note: for the case of a commit with no parents, it will concat an empty array, having no net effect. - for (const oid of commit.commit.parent) { - const commit = await _readCommit({ fs, cache, gitdir, oid }); - if (!tips.map(commit => commit.oid).includes(commit.oid)) { - tips.push(commit); - } - } - } - - // Process tips in order by age - tips.sort((a, b) => compareAge(a.commit, b.commit)); - } - return commits -} - -// @ts-check - -/** - * Get commit descriptions from the git history - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref = 'HEAD'] - The commit to begin walking backwards through the history from - * @param {number} [args.depth] - Limit the number of commits returned. No limit by default. - * @param {Date} [args.since] - Return history newer than the given date. Can be combined with `depth` to get whichever is shorter. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Array<ReadCommitResult>>} Resolves to an array of ReadCommitResult objects - * @see ReadCommitResult - * @see CommitObject - * - * @example - * let commits = await git.log({ - * fs, - * dir: '/tutorial', - * depth: 5, - * ref: 'main' - * }) - * console.log(commits) - * - */ -async function log({ - fs, - dir, - gitdir = join(dir, '.git'), - ref = 'HEAD', - depth, - since, // Date - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - - return await _log({ - fs: new FileSystem(fs), - cache, - gitdir, - ref, - depth, - since, - }) - } catch (err) { - err.caller = 'git.log'; - throw err - } -} - -// @ts-check - -/** - * - * @typedef {Object} MergeResult - Returns an object with a schema like this: - * @property {string} [oid] - The SHA-1 object id that is now at the head of the branch. Absent only if `dryRun` was specified and `mergeCommit` is true. - * @property {boolean} [alreadyMerged] - True if the branch was already merged so no changes were made - * @property {boolean} [fastForward] - True if it was a fast-forward merge - * @property {boolean} [mergeCommit] - True if merge resulted in a merge commit - * @property {string} [tree] - The SHA-1 object id of the tree resulting from a merge commit - * - */ - -/** - * Merge two branches - * - * ## Limitations - * - * Currently it does not support incomplete merges. That is, if there are merge conflicts it cannot solve - * with the built in diff3 algorithm it will not modify the working dir, and will throw a [`MergeNotSupportedError`](./errors.md#mergenotsupportedError) error. - * - * Currently it will fail if multiple candidate merge bases are found. (It doesn't yet implement the recursive merge strategy.) - * - * Currently it does not support selecting alternative merge strategies. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ours] - The branch receiving the merge. If undefined, defaults to the current branch. - * @param {string} args.theirs - The branch to be merged - * @param {boolean} [args.fastForwardOnly = false] - If true, then non-fast-forward merges will throw an Error instead of performing a merge. - * @param {boolean} [args.dryRun = false] - If true, simulates a merge so you can test whether it would succeed. - * @param {boolean} [args.noUpdateBranch = false] - If true, does not update the branch pointer after creating the commit. - * @param {string} [args.message] - Overrides the default auto-generated merge commit message - * @param {Object} [args.author] - passed to [commit](commit.md) when creating a merge commit - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer] - passed to [commit](commit.md) when creating a merge commit - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - passed to [commit](commit.md) when creating a merge commit - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<MergeResult>} Resolves to a description of the merge operation - * @see MergeResult - * - * @example - * let m = await git.merge({ - * fs, - * dir: '/tutorial', - * ours: 'main', - * theirs: 'remotes/origin/main' - * }) - * console.log(m) - * - */ -async function merge({ - fs: _fs, - onSign, - dir, - gitdir = join(dir, '.git'), - ours, - theirs, - fastForwardOnly = false, - dryRun = false, - noUpdateBranch = false, - message, - author: _author, - committer: _committer, - signingKey, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - if (signingKey) { - assertParameter('onSign', onSign); - } - const fs = new FileSystem(_fs); - - const author = await normalizeAuthorObject({ fs, gitdir, author: _author }); - if (!author && !fastForwardOnly) throw new MissingNameError('author') - - const committer = await normalizeCommitterObject({ - fs, - gitdir, - author, - committer: _committer, - }); - if (!committer && !fastForwardOnly) { - throw new MissingNameError('committer') - } - - return await _merge({ - fs, - cache, - gitdir, - ours, - theirs, - fastForwardOnly, - dryRun, - noUpdateBranch, - message, - author, - committer, - signingKey, - }) - } catch (err) { - err.caller = 'git.merge'; - throw err - } -} - -/** - * @enum {number} - */ -const types = { - commit: 0b0010000, - tree: 0b0100000, - blob: 0b0110000, - tag: 0b1000000, - ofs_delta: 0b1100000, - ref_delta: 0b1110000, -}; - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string[]} args.oids - */ -async function _pack({ - fs, - cache, - dir, - gitdir = join(dir, '.git'), - oids, -}) { - const hash = new Hash(); - const outputStream = []; - function write(chunk, enc) { - const buff = Buffer.from(chunk, enc); - outputStream.push(buff); - hash.update(buff); - } - async function writeObject({ stype, object }) { - // Object type is encoded in bits 654 - const type = types[stype]; - // The length encoding gets complicated. - let length = object.length; - // Whether the next byte is part of the variable-length encoded number - // is encoded in bit 7 - let multibyte = length > 0b1111 ? 0b10000000 : 0b0; - // Last four bits of length is encoded in bits 3210 - const lastFour = length & 0b1111; - // Discard those bits - length = length >>> 4; - // The first byte is then (1-bit multibyte?), (3-bit type), (4-bit least sig 4-bits of length) - let byte = (multibyte | type | lastFour).toString(16); - write(byte, 'hex'); - // Now we keep chopping away at length 7-bits at a time until its zero, - // writing out the bytes in what amounts to little-endian order. - while (multibyte) { - multibyte = length > 0b01111111 ? 0b10000000 : 0b0; - byte = multibyte | (length & 0b01111111); - write(padHex(2, byte), 'hex'); - length = length >>> 7; - } - // Lastly, we can compress and write the object. - write(Buffer.from(await deflate(object))); - } - write('PACK'); - write('00000002', 'hex'); - // Write a 4 byte (32-bit) int - write(padHex(8, oids.length), 'hex'); - for (const oid of oids) { - const { type, object } = await _readObject({ fs, cache, gitdir, oid }); - await writeObject({ write, object, stype: type }); - } - // Write SHA1 checksum - const digest = hash.digest(); - outputStream.push(digest); - return outputStream -} - -// @ts-check - -/** - * - * @typedef {Object} PackObjectsResult The packObjects command returns an object with two properties: - * @property {string} filename - The suggested filename for the packfile if you want to save it to disk somewhere. It includes the packfile SHA. - * @property {Uint8Array} [packfile] - The packfile contents. Not present if `write` parameter was true, in which case the packfile was written straight to disk. - */ - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string[]} args.oids - * @param {boolean} args.write - * - * @returns {Promise<PackObjectsResult>} - * @see PackObjectsResult - */ -async function _packObjects({ fs, cache, gitdir, oids, write }) { - const buffers = await _pack({ fs, cache, gitdir, oids }); - const packfile = Buffer.from(await collect(buffers)); - const packfileSha = packfile.slice(-20).toString('hex'); - const filename = `pack-${packfileSha}.pack`; - if (write) { - await fs.write(join(gitdir, `objects/pack/${filename}`), packfile); - return { filename } - } - return { - filename, - packfile: new Uint8Array(packfile), - } -} - -// @ts-check - -/** - * - * @typedef {Object} PackObjectsResult The packObjects command returns an object with two properties: - * @property {string} filename - The suggested filename for the packfile if you want to save it to disk somewhere. It includes the packfile SHA. - * @property {Uint8Array} [packfile] - The packfile contents. Not present if `write` parameter was true, in which case the packfile was written straight to disk. - */ - -/** - * Create a packfile from an array of SHA-1 object ids - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string[]} args.oids - An array of SHA-1 object ids to be included in the packfile - * @param {boolean} [args.write = false] - Whether to save the packfile to disk or not - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<PackObjectsResult>} Resolves successfully when the packfile is ready with the filename and buffer - * @see PackObjectsResult - * - * @example - * // Create a packfile containing only an empty tree - * let { packfile } = await git.packObjects({ - * fs, - * dir: '/tutorial', - * oids: ['4b825dc642cb6eb9a060e54bf8d69288fbee4904'] - * }) - * console.log(packfile) - * - */ -async function packObjects({ - fs, - dir, - gitdir = join(dir, '.git'), - oids, - write = false, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('oids', oids); - - return await _packObjects({ - fs: new FileSystem(fs), - cache, - gitdir, - oids, - write, - }) - } catch (err) { - err.caller = 'git.packObjects'; - throw err - } -} - -// @ts-check - -/** - * Fetch and merge commits from a remote repository - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - Which branch to merge into. By default this is the currently checked out branch. - * @param {string} [args.url] - (Added in 1.1.0) The URL of the remote repository. The default is the value set in the git config for that remote. - * @param {string} [args.remote] - (Added in 1.1.0) If URL is not specified, determines which remote to use. - * @param {string} [args.remoteRef] - (Added in 1.1.0) The name of the branch on the remote to fetch. By default this is the configured remote tracking branch. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch. - * @param {boolean} [args.fastForwardOnly = false] - Only perform simple fast-forward merges. (Don't create merge commits.) - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {Object} [args.author] - The details about the author. - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer = author] - The details about the commit committer, in the same format as the author parameter. If not specified, the author details are used. - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - passed to [commit](commit.md) when creating a merge commit - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when pull operation completes - * - * @example - * await git.pull({ - * fs, - * http, - * dir: '/tutorial', - * ref: 'main', - * singleBranch: true - * }) - * console.log('done') - * - */ -async function pull({ - fs: _fs, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir = join(dir, '.git'), - ref, - url, - remote, - remoteRef, - fastForwardOnly = false, - corsProxy, - singleBranch, - headers = {}, - author: _author, - committer: _committer, - signingKey, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - - const fs = new FileSystem(_fs); - - const author = await normalizeAuthorObject({ fs, gitdir, author: _author }); - if (!author) throw new MissingNameError('author') - - const committer = await normalizeCommitterObject({ - fs, - gitdir, - author, - committer: _committer, - }); - if (!committer) throw new MissingNameError('committer') - - return await _pull({ - fs, - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir, - ref, - url, - remote, - remoteRef, - fastForwardOnly, - corsProxy, - singleBranch, - headers, - author, - committer, - signingKey, - }) - } catch (err) { - err.caller = 'git.pull'; - throw err - } -} - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} [args.dir] - * @param {string} args.gitdir - * @param {Iterable<string>} args.start - * @param {Iterable<string>} args.finish - * @returns {Promise<Set<string>>} - */ -async function listCommitsAndTags({ - fs, - cache, - dir, - gitdir = join(dir, '.git'), - start, - finish, -}) { - const shallows = await GitShallowManager.read({ fs, gitdir }); - const startingSet = new Set(); - const finishingSet = new Set(); - for (const ref of start) { - startingSet.add(await GitRefManager.resolve({ fs, gitdir, ref })); - } - for (const ref of finish) { - // We may not have these refs locally so we must try/catch - try { - const oid = await GitRefManager.resolve({ fs, gitdir, ref }); - finishingSet.add(oid); - } catch (err) {} - } - const visited = new Set(); - // Because git commits are named by their hash, there is no - // way to construct a cycle. Therefore we won't worry about - // setting a default recursion limit. - async function walk(oid) { - visited.add(oid); - const { type, object } = await _readObject({ fs, cache, gitdir, oid }); - // Recursively resolve annotated tags - if (type === 'tag') { - const tag = GitAnnotatedTag.from(object); - const commit = tag.headers().object; - return walk(commit) - } - if (type !== 'commit') { - throw new ObjectTypeError(oid, type, 'commit') - } - if (!shallows.has(oid)) { - const commit = GitCommit.from(object); - const parents = commit.headers().parent; - for (oid of parents) { - if (!finishingSet.has(oid) && !visited.has(oid)) { - await walk(oid); - } - } - } - } - // Let's go walking! - for (const oid of startingSet) { - await walk(oid); - } - return visited -} - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} [args.dir] - * @param {string} args.gitdir - * @param {Iterable<string>} args.oids - * @returns {Promise<Set<string>>} - */ -async function listObjects({ - fs, - cache, - dir, - gitdir = join(dir, '.git'), - oids, -}) { - const visited = new Set(); - // We don't do the purest simplest recursion, because we can - // avoid reading Blob objects entirely since the Tree objects - // tell us which oids are Blobs and which are Trees. - async function walk(oid) { - if (visited.has(oid)) return - visited.add(oid); - const { type, object } = await _readObject({ fs, cache, gitdir, oid }); - if (type === 'tag') { - const tag = GitAnnotatedTag.from(object); - const obj = tag.headers().object; - await walk(obj); - } else if (type === 'commit') { - const commit = GitCommit.from(object); - const tree = commit.headers().tree; - await walk(tree); - } else if (type === 'tree') { - const tree = GitTree.from(object); - for (const entry of tree) { - // add blobs to the set - // skip over submodules whose type is 'commit' - if (entry.type === 'blob') { - visited.add(entry.oid); - } - // recurse for trees - if (entry.type === 'tree') { - await walk(entry.oid); - } - } - } - } - // Let's go walking! - for (const oid of oids) { - await walk(oid); - } - return visited -} - -async function parseReceivePackResponse(packfile) { - /** @type PushResult */ - const result = {}; - let response = ''; - const read = GitPktLine.streamReader(packfile); - let line = await read(); - while (line !== true) { - if (line !== null) response += line.toString('utf8') + '\n'; - line = await read(); - } - - const lines = response.toString('utf8').split('\n'); - // We're expecting "unpack {unpack-result}" - line = lines.shift(); - if (!line.startsWith('unpack ')) { - throw new ParseError('unpack ok" or "unpack [error message]', line) - } - result.ok = line === 'unpack ok'; - if (!result.ok) { - result.error = line.slice('unpack '.length); - } - result.refs = {}; - for (const line of lines) { - if (line.trim() === '') continue - const status = line.slice(0, 2); - const refAndMessage = line.slice(3); - let space = refAndMessage.indexOf(' '); - if (space === -1) space = refAndMessage.length; - const ref = refAndMessage.slice(0, space); - const error = refAndMessage.slice(space + 1); - result.refs[ref] = { - ok: status === 'ok', - error, - }; - } - return result -} - -async function writeReceivePackRequest({ - capabilities = [], - triplets = [], -}) { - const packstream = []; - let capsFirstLine = `\x00 ${capabilities.join(' ')}`; - for (const trip of triplets) { - packstream.push( - GitPktLine.encode( - `${trip.oldoid} ${trip.oid} ${trip.fullRef}${capsFirstLine}\n` - ) - ); - capsFirstLine = ''; - } - packstream.push(GitPktLine.flush()); - return packstream -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {HttpClient} args.http - * @param {ProgressCallback} [args.onProgress] - * @param {MessageCallback} [args.onMessage] - * @param {AuthCallback} [args.onAuth] - * @param {AuthFailureCallback} [args.onAuthFailure] - * @param {AuthSuccessCallback} [args.onAuthSuccess] - * @param {string} args.gitdir - * @param {string} [args.ref] - * @param {string} [args.remoteRef] - * @param {string} [args.remote] - * @param {boolean} [args.force = false] - * @param {boolean} [args.delete = false] - * @param {string} [args.url] - * @param {string} [args.corsProxy] - * @param {Object<string, string>} [args.headers] - * - * @returns {Promise<PushResult>} - */ -async function _push({ - fs, - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - gitdir, - ref: _ref, - remoteRef: _remoteRef, - remote, - url: _url, - force = false, - delete: _delete = false, - corsProxy, - headers = {}, -}) { - const ref = _ref || (await _currentBranch({ fs, gitdir })); - if (typeof ref === 'undefined') { - throw new MissingParameterError('ref') - } - const config = await GitConfigManager.get({ fs, gitdir }); - // Figure out what remote to use. - remote = - remote || - (await config.get(`branch.${ref}.pushRemote`)) || - (await config.get('remote.pushDefault')) || - (await config.get(`branch.${ref}.remote`)) || - 'origin'; - // Lookup the URL for the given remote. - const url = - _url || - (await config.get(`remote.${remote}.pushurl`)) || - (await config.get(`remote.${remote}.url`)); - if (typeof url === 'undefined') { - throw new MissingParameterError('remote OR url') - } - // Figure out what remote ref to use. - const remoteRef = _remoteRef || (await config.get(`branch.${ref}.merge`)); - if (typeof url === 'undefined') { - throw new MissingParameterError('remoteRef') - } - - if (corsProxy === undefined) { - corsProxy = await config.get('http.corsProxy'); - } - - const fullRef = await GitRefManager.expand({ fs, gitdir, ref }); - const oid = _delete - ? '0000000000000000000000000000000000000000' - : await GitRefManager.resolve({ fs, gitdir, ref: fullRef }); - - /** @type typeof import("../managers/GitRemoteHTTP").GitRemoteHTTP */ - const GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url }); - const httpRemote = await GitRemoteHTTP.discover({ - http, - onAuth, - onAuthSuccess, - onAuthFailure, - corsProxy, - service: 'git-receive-pack', - url, - headers, - protocolVersion: 1, - }); - const auth = httpRemote.auth; // hack to get new credentials from CredentialManager API - let fullRemoteRef; - if (!remoteRef) { - fullRemoteRef = fullRef; - } else { - try { - fullRemoteRef = await GitRefManager.expandAgainstMap({ - ref: remoteRef, - map: httpRemote.refs, - }); - } catch (err) { - if (err instanceof NotFoundError) { - // The remote reference doesn't exist yet. - // If it is fully specified, use that value. Otherwise, treat it as a branch. - fullRemoteRef = remoteRef.startsWith('refs/') - ? remoteRef - : `refs/heads/${remoteRef}`; - } else { - throw err - } - } - } - const oldoid = - httpRemote.refs.get(fullRemoteRef) || - '0000000000000000000000000000000000000000'; - - // Remotes can always accept thin-packs UNLESS they specify the 'no-thin' capability - const thinPack = !httpRemote.capabilities.has('no-thin'); - - let objects = new Set(); - if (!_delete) { - const finish = [...httpRemote.refs.values()]; - let skipObjects = new Set(); - - // If remote branch is present, look for a common merge base. - if (oldoid !== '0000000000000000000000000000000000000000') { - // trick to speed up common force push scenarios - const mergebase = await _findMergeBase({ - fs, - cache, - gitdir, - oids: [oid, oldoid], - }); - for (const oid of mergebase) finish.push(oid); - if (thinPack) { - skipObjects = await listObjects({ fs, cache, gitdir, oids: mergebase }); - } - } - - // If remote does not have the commit, figure out the objects to send - if (!finish.includes(oid)) { - const commits = await listCommitsAndTags({ - fs, - cache, - gitdir, - start: [oid], - finish, - }); - objects = await listObjects({ fs, cache, gitdir, oids: commits }); - } - - if (thinPack) { - // If there's a default branch for the remote lets skip those objects too. - // Since this is an optional optimization, we just catch and continue if there is - // an error (because we can't find a default branch, or can't find a commit, etc) - try { - // Sadly, the discovery phase with 'forPush' doesn't return symrefs, so we have to - // rely on existing ones. - const ref = await GitRefManager.resolve({ - fs, - gitdir, - ref: `refs/remotes/${remote}/HEAD`, - depth: 2, - }); - const { oid } = await GitRefManager.resolveAgainstMap({ - ref: ref.replace(`refs/remotes/${remote}/`, ''), - fullref: ref, - map: httpRemote.refs, - }); - const oids = [oid]; - for (const oid of await listObjects({ fs, cache, gitdir, oids })) { - skipObjects.add(oid); - } - } catch (e) {} - - // Remove objects that we know the remote already has - for (const oid of skipObjects) { - objects.delete(oid); - } - } - - if (!force) { - // Is it a tag that already exists? - if ( - fullRef.startsWith('refs/tags') && - oldoid !== '0000000000000000000000000000000000000000' - ) { - throw new PushRejectedError('tag-exists') - } - // Is it a non-fast-forward commit? - if ( - oid !== '0000000000000000000000000000000000000000' && - oldoid !== '0000000000000000000000000000000000000000' && - !(await _isDescendent({ - fs, - cache, - gitdir, - oid, - ancestor: oldoid, - depth: -1, - })) - ) { - throw new PushRejectedError('not-fast-forward') - } - } - } - // We can only safely use capabilities that the server also understands. - // For instance, AWS CodeCommit aborts a push if you include the `agent`!!! - const capabilities = filterCapabilities( - [...httpRemote.capabilities], - ['report-status', 'side-band-64k', `agent=${pkg.agent}`] - ); - const packstream1 = await writeReceivePackRequest({ - capabilities, - triplets: [{ oldoid, oid, fullRef: fullRemoteRef }], - }); - const packstream2 = _delete - ? [] - : await _pack({ - fs, - cache, - gitdir, - oids: [...objects], - }); - const res = await GitRemoteHTTP.connect({ - http, - onProgress, - corsProxy, - service: 'git-receive-pack', - url, - auth, - headers, - body: [...packstream1, ...packstream2], - }); - const { packfile, progress } = await GitSideBand.demux(res.body); - if (onMessage) { - const lines = splitLines(progress); - forAwait(lines, async line => { - await onMessage(line); - }); - } - // Parse the response! - const result = await parseReceivePackResponse(packfile); - if (res.headers) { - result.headers = res.headers; - } - - // Update the local copy of the remote ref - if (remote && result.ok && result.refs[fullRemoteRef].ok) { - // TODO: I think this should actually be using a refspec transform rather than assuming 'refs/remotes/{remote}' - const ref = `refs/remotes/${remote}/${fullRemoteRef.replace( - 'refs/heads', - '' - )}`; - if (_delete) { - await GitRefManager.deleteRef({ fs, gitdir, ref }); - } else { - await GitRefManager.writeRef({ fs, gitdir, ref, value: oid }); - } - } - if (result.ok && Object.values(result.refs).every(result => result.ok)) { - return result - } else { - const prettyDetails = Object.entries(result.refs) - .filter(([k, v]) => !v.ok) - .map(([k, v]) => `\n - ${k}: ${v.error}`) - .join(''); - throw new GitPushError(prettyDetails, result) - } -} - -// @ts-check - -/** - * Push a branch or tag - * - * The push command returns an object that describes the result of the attempted push operation. - * *Notes:* If there were no errors, then there will be no `errors` property. There can be a mix of `ok` messages and `errors` messages. - * - * | param | type [= default] | description | - * | ------ | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | ok | Array\<string\> | The first item is "unpack" if the overall operation was successful. The remaining items are the names of refs that were updated successfully. | - * | errors | Array\<string\> | If the overall operation threw and error, the first item will be "unpack {Overall error message}". The remaining items are individual refs that failed to be updated in the format "{ref name} {error message}". | - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - Which branch to push. By default this is the currently checked out branch. - * @param {string} [args.url] - The URL of the remote repository. The default is the value set in the git config for that remote. - * @param {string} [args.remote] - If URL is not specified, determines which remote to use. - * @param {string} [args.remoteRef] - The name of the receiving branch on the remote. By default this is the configured remote tracking branch. - * @param {boolean} [args.force = false] - If true, behaves the same as `git push --force` - * @param {boolean} [args.delete = false] - If true, delete the remote ref - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<PushResult>} Resolves successfully when push completes with a detailed description of the operation from the server. - * @see PushResult - * @see RefUpdateStatus - * - * @example - * let pushResult = await git.push({ - * fs, - * http, - * dir: '/tutorial', - * remote: 'origin', - * ref: 'main', - * onAuth: () => ({ username: process.env.GITHUB_TOKEN }), - * }) - * console.log(pushResult) - * - */ -async function push({ - fs, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - dir, - gitdir = join(dir, '.git'), - ref, - remoteRef, - remote = 'origin', - url, - force = false, - delete: _delete = false, - corsProxy, - headers = {}, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('http', http); - assertParameter('gitdir', gitdir); - - return await _push({ - fs: new FileSystem(fs), - cache, - http, - onProgress, - onMessage, - onAuth, - onAuthSuccess, - onAuthFailure, - gitdir, - ref, - remoteRef, - remote, - url, - force, - delete: _delete, - corsProxy, - headers, - }) - } catch (err) { - err.caller = 'git.push'; - throw err - } -} - -async function resolveBlob({ fs, cache, gitdir, oid }) { - const { type, object } = await _readObject({ fs, cache, gitdir, oid }); - // Resolve annotated tag objects to whatever - if (type === 'tag') { - oid = GitAnnotatedTag.from(object).parse().object; - return resolveBlob({ fs, cache, gitdir, oid }) - } - if (type !== 'blob') { - throw new ObjectTypeError(oid, type, 'blob') - } - return { oid, blob: new Uint8Array(object) } -} - -// @ts-check - -/** - * - * @typedef {Object} ReadBlobResult - The object returned has the following schema: - * @property {string} oid - * @property {Uint8Array} blob - * - */ - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} args.oid - * @param {string} [args.filepath] - * - * @returns {Promise<ReadBlobResult>} Resolves successfully with a blob object description - * @see ReadBlobResult - */ -async function _readBlob({ - fs, - cache, - gitdir, - oid, - filepath = undefined, -}) { - if (filepath !== undefined) { - oid = await resolveFilepath({ fs, cache, gitdir, oid, filepath }); - } - const blob = await resolveBlob({ - fs, - cache, - gitdir, - oid, - }); - return blob -} - -// @ts-check - -/** - * - * @typedef {Object} ReadBlobResult - The object returned has the following schema: - * @property {string} oid - * @property {Uint8Array} blob - * - */ - -/** - * Read a blob object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get. Annotated tags, commits, and trees are peeled. - * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the blob object at that filepath. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadBlobResult>} Resolves successfully with a blob object description - * @see ReadBlobResult - * - * @example - * // Get the contents of 'README.md' in the main branch. - * let commitOid = await git.resolveRef({ fs, dir: '/tutorial', ref: 'main' }) - * console.log(commitOid) - * let { blob } = await git.readBlob({ - * fs, - * dir: '/tutorial', - * oid: commitOid, - * filepath: 'README.md' - * }) - * console.log(Buffer.from(blob).toString('utf8')) - * - */ -async function readBlob({ - fs, - dir, - gitdir = join(dir, '.git'), - oid, - filepath, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - - return await _readBlob({ - fs: new FileSystem(fs), - cache, - gitdir, - oid, - filepath, - }) - } catch (err) { - err.caller = 'git.readBlob'; - throw err - } -} - -// @ts-check - -/** - * Read a commit object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get. Annotated tags are peeled. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadCommitResult>} Resolves successfully with a git commit object - * @see ReadCommitResult - * @see CommitObject - * - * @example - * // Read a commit object - * let sha = await git.resolveRef({ fs, dir: '/tutorial', ref: 'main' }) - * console.log(sha) - * let commit = await git.readCommit({ fs, dir: '/tutorial', oid: sha }) - * console.log(commit) - * - */ -async function readCommit({ - fs, - dir, - gitdir = join(dir, '.git'), - oid, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - - return await _readCommit({ - fs: new FileSystem(fs), - cache, - gitdir, - oid, - }) - } catch (err) { - err.caller = 'git.readCommit'; - throw err - } -} - -// @ts-check - -/** - * Read the contents of a note - * - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} [args.ref] - The notes ref to look under - * @param {string} args.oid - * - * @returns {Promise<Uint8Array>} Resolves successfully with note contents as a Buffer. - */ - -async function _readNote({ - fs, - cache, - gitdir, - ref = 'refs/notes/commits', - oid, -}) { - const parent = await GitRefManager.resolve({ gitdir, fs, ref }); - const { blob } = await _readBlob({ - fs, - cache, - gitdir, - oid: parent, - filepath: oid, - }); - - return blob -} - -// @ts-check - -/** - * Read the contents of a note - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - The notes ref to look under - * @param {string} args.oid - The SHA-1 object id of the object to get the note for. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Uint8Array>} Resolves successfully with note contents as a Buffer. - */ - -async function readNote({ - fs, - dir, - gitdir = join(dir, '.git'), - ref = 'refs/notes/commits', - oid, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - assertParameter('oid', oid); - - return await _readNote({ - fs: new FileSystem(fs), - cache, - gitdir, - ref, - oid, - }) - } catch (err) { - err.caller = 'git.readNote'; - throw err - } -} - -// @ts-check - -/** - * - * @typedef {Object} DeflatedObject - * @property {string} oid - * @property {'deflated'} type - * @property {'deflated'} format - * @property {Uint8Array} object - * @property {string} [source] - * - */ - -/** - * - * @typedef {Object} WrappedObject - * @property {string} oid - * @property {'wrapped'} type - * @property {'wrapped'} format - * @property {Uint8Array} object - * @property {string} [source] - * - */ - -/** - * - * @typedef {Object} RawObject - * @property {string} oid - * @property {'blob'|'commit'|'tree'|'tag'} type - * @property {'content'} format - * @property {Uint8Array} object - * @property {string} [source] - * - */ - -/** - * - * @typedef {Object} ParsedBlobObject - * @property {string} oid - * @property {'blob'} type - * @property {'parsed'} format - * @property {string} object - * @property {string} [source] - * - */ - -/** - * - * @typedef {Object} ParsedCommitObject - * @property {string} oid - * @property {'commit'} type - * @property {'parsed'} format - * @property {CommitObject} object - * @property {string} [source] - * - */ - -/** - * - * @typedef {Object} ParsedTreeObject - * @property {string} oid - * @property {'tree'} type - * @property {'parsed'} format - * @property {TreeObject} object - * @property {string} [source] - * - */ - -/** - * - * @typedef {Object} ParsedTagObject - * @property {string} oid - * @property {'tag'} type - * @property {'parsed'} format - * @property {TagObject} object - * @property {string} [source] - * - */ - -/** - * - * @typedef {ParsedBlobObject | ParsedCommitObject | ParsedTreeObject | ParsedTagObject} ParsedObject - */ - -/** - * - * @typedef {DeflatedObject | WrappedObject | RawObject | ParsedObject } ReadObjectResult - */ - -/** - * Read a git object directly by its SHA-1 object id - * - * Regarding `ReadObjectResult`: - * - * - `oid` will be the same as the `oid` argument unless the `filepath` argument is provided, in which case it will be the oid of the tree or blob being returned. - * - `type` of deflated objects is `'deflated'`, and `type` of wrapped objects is `'wrapped'` - * - `format` is usually, but not always, the format you requested. Packfiles do not store each object individually compressed so if you end up reading the object from a packfile it will be returned in format 'content' even if you requested 'deflated' or 'wrapped'. - * - `object` will be an actual Object if format is 'parsed' and the object is a commit, tree, or annotated tag. Blobs are still formatted as Buffers unless an encoding is provided in which case they'll be strings. If format is anything other than 'parsed', object will be a Buffer. - * - `source` is the name of the packfile or loose object file where the object was found. - * - * The `format` parameter can have the following values: - * - * | param | description | - * | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | 'deflated' | Return the raw deflate-compressed buffer for an object if possible. Useful for efficiently shuffling around loose objects when you don't care about the contents and can save time by not inflating them. | - * | 'wrapped' | Return the inflated object buffer wrapped in the git object header if possible. This is the raw data used when calculating the SHA-1 object id of a git object. | - * | 'content' | Return the object buffer without the git header. | - * | 'parsed' | Returns a parsed representation of the object. | - * - * The result will be in one of the following schemas: - * - * ## `'deflated'` format - * - * {@link DeflatedObject typedef} - * - * ## `'wrapped'` format - * - * {@link WrappedObject typedef} - * - * ## `'content'` format - * - * {@link RawObject typedef} - * - * ## `'parsed'` format - * - * ### parsed `'blob'` type - * - * {@link ParsedBlobObject typedef} - * - * ### parsed `'commit'` type - * - * {@link ParsedCommitObject typedef} - * {@link CommitObject typedef} - * - * ### parsed `'tree'` type - * - * {@link ParsedTreeObject typedef} - * {@link TreeObject typedef} - * {@link TreeEntry typedef} - * - * ### parsed `'tag'` type - * - * {@link ParsedTagObject typedef} - * {@link TagObject typedef} - * - * @deprecated - * > This command is overly complicated. - * > - * > If you know the type of object you are reading, use [`readBlob`](./readBlob.md), [`readCommit`](./readCommit.md), [`readTag`](./readTag.md), or [`readTree`](./readTree.md). - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get - * @param {'deflated' | 'wrapped' | 'content' | 'parsed'} [args.format = 'parsed'] - What format to return the object in. The choices are described in more detail below. - * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the object at that filepath. To return the root directory of a tree set filepath to `''` - * @param {string} [args.encoding] - A convenience argument that only affects blobs. Instead of returning `object` as a buffer, it returns a string parsed using the given encoding. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadObjectResult>} Resolves successfully with a git object description - * @see ReadObjectResult - * - * @example - * // Given a ransom SHA-1 object id, figure out what it is - * let { type, object } = await git.readObject({ - * fs, - * dir: '/tutorial', - * oid: '0698a781a02264a6f37ba3ff41d78067eaf0f075' - * }) - * switch (type) { - * case 'commit': { - * console.log(object) - * break - * } - * case 'tree': { - * console.log(object) - * break - * } - * case 'blob': { - * console.log(object) - * break - * } - * case 'tag': { - * console.log(object) - * break - * } - * } - * - */ -async function readObject({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - oid, - format = 'parsed', - filepath = undefined, - encoding = undefined, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - - const fs = new FileSystem(_fs); - if (filepath !== undefined) { - oid = await resolveFilepath({ - fs, - cache, - gitdir, - oid, - filepath, - }); - } - // GitObjectManager does not know how to parse content, so we tweak that parameter before passing it. - const _format = format === 'parsed' ? 'content' : format; - const result = await _readObject({ - fs, - cache, - gitdir, - oid, - format: _format, - }); - result.oid = oid; - if (format === 'parsed') { - result.format = 'parsed'; - switch (result.type) { - case 'commit': - result.object = GitCommit.from(result.object).parse(); - break - case 'tree': - result.object = GitTree.from(result.object).entries(); - break - case 'blob': - // Here we consider returning a raw Buffer as the 'content' format - // and returning a string as the 'parsed' format - if (encoding) { - result.object = result.object.toString(encoding); - } else { - result.object = new Uint8Array(result.object); - result.format = 'content'; - } - break - case 'tag': - result.object = GitAnnotatedTag.from(result.object).parse(); - break - default: - throw new ObjectTypeError( - result.oid, - result.type, - 'blob|commit|tag|tree' - ) - } - } else if (result.format === 'deflated' || result.format === 'wrapped') { - result.type = result.format; - } - return result - } catch (err) { - err.caller = 'git.readObject'; - throw err - } -} - -// @ts-check - -/** - * - * @typedef {Object} ReadTagResult - The object returned has the following schema: - * @property {string} oid - SHA-1 object id of this tag - * @property {TagObject} tag - the parsed tag object - * @property {string} payload - PGP signing payload - */ - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {any} args.cache - * @param {string} args.gitdir - * @param {string} args.oid - * - * @returns {Promise<ReadTagResult>} - */ -async function _readTag({ fs, cache, gitdir, oid }) { - const { type, object } = await _readObject({ - fs, - cache, - gitdir, - oid, - format: 'content', - }); - if (type !== 'tag') { - throw new ObjectTypeError(oid, type, 'tag') - } - const tag = GitAnnotatedTag.from(object); - const result = { - oid, - tag: tag.parse(), - payload: tag.payload(), - }; - // @ts-ignore - return result -} - -/** - * - * @typedef {Object} ReadTagResult - The object returned has the following schema: - * @property {string} oid - SHA-1 object id of this tag - * @property {TagObject} tag - the parsed tag object - * @property {string} payload - PGP signing payload - */ - -/** - * Read an annotated tag object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadTagResult>} Resolves successfully with a git object description - * @see ReadTagResult - * @see TagObject - * - */ -async function readTag({ - fs, - dir, - gitdir = join(dir, '.git'), - oid, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - - return await _readTag({ - fs: new FileSystem(fs), - cache, - gitdir, - oid, - }) - } catch (err) { - err.caller = 'git.readTag'; - throw err - } -} - -// @ts-check - -/** - * - * @typedef {Object} ReadTreeResult - The object returned has the following schema: - * @property {string} oid - SHA-1 object id of this tree - * @property {TreeObject} tree - the parsed tree object - */ - -/** - * Read a tree object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get. Annotated tags and commits are peeled. - * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the tree object at that filepath. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadTreeResult>} Resolves successfully with a git tree object - * @see ReadTreeResult - * @see TreeObject - * @see TreeEntry - * - */ -async function readTree({ - fs, - dir, - gitdir = join(dir, '.git'), - oid, - filepath = undefined, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - - return await _readTree({ - fs: new FileSystem(fs), - cache, - gitdir, - oid, - filepath, - }) - } catch (err) { - err.caller = 'git.readTree'; - throw err - } -} - -// @ts-check - -/** - * Remove a file from the git index (aka staging area) - * - * Note that this does NOT delete the file in the working directory. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the file to remove from the index - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully once the git index has been updated - * - * @example - * await git.remove({ fs, dir: '/tutorial', filepath: 'README.md' }) - * console.log('done') - * - */ -async function remove({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - filepath, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('filepath', filepath); - - await GitIndexManager.acquire( - { fs: new FileSystem(_fs), gitdir, cache }, - async function(index) { - index.delete({ filepath }); - } - ); - } catch (err) { - err.caller = 'git.remove'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {object} args.cache - * @param {SignCallback} [args.onSign] - * @param {string} [args.dir] - * @param {string} [args.gitdir=join(dir,'.git')] - * @param {string} [args.ref] - * @param {string} args.oid - * @param {Object} args.author - * @param {string} args.author.name - * @param {string} args.author.email - * @param {number} args.author.timestamp - * @param {number} args.author.timezoneOffset - * @param {Object} args.committer - * @param {string} args.committer.name - * @param {string} args.committer.email - * @param {number} args.committer.timestamp - * @param {number} args.committer.timezoneOffset - * @param {string} [args.signingKey] - * - * @returns {Promise<string>} - */ - -async function _removeNote({ - fs, - cache, - onSign, - gitdir, - ref = 'refs/notes/commits', - oid, - author, - committer, - signingKey, -}) { - // Get the current note commit - let parent; - try { - parent = await GitRefManager.resolve({ gitdir, fs, ref }); - } catch (err) { - if (!(err instanceof NotFoundError)) { - throw err - } - } - - // I'm using the "empty tree" magic number here for brevity - const result = await _readTree({ - fs, - gitdir, - oid: parent || '4b825dc642cb6eb9a060e54bf8d69288fbee4904', - }); - let tree = result.tree; - - // Remove the note blob entry from the tree - tree = tree.filter(entry => entry.path !== oid); - - // Create the new note tree - const treeOid = await _writeTree({ - fs, - gitdir, - tree, - }); - - // Create the new note commit - const commitOid = await _commit({ - fs, - cache, - onSign, - gitdir, - ref, - tree: treeOid, - parent: parent && [parent], - message: `Note removed by 'isomorphic-git removeNote'\n`, - author, - committer, - signingKey, - }); - - return commitOid -} - -// @ts-check - -/** - * Remove an object note - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - The notes ref to look under - * @param {string} args.oid - The SHA-1 object id of the object to remove the note from. - * @param {Object} [args.author] - The details about the author. - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer = author] - The details about the note committer, in the same format as the author parameter. If not specified, the author details are used. - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - Sign the tag object using this private PGP key. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the commit object for the note removal. - */ - -async function removeNote({ - fs: _fs, - onSign, - dir, - gitdir = join(dir, '.git'), - ref = 'refs/notes/commits', - oid, - author: _author, - committer: _committer, - signingKey, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('oid', oid); - - const fs = new FileSystem(_fs); - - const author = await normalizeAuthorObject({ fs, gitdir, author: _author }); - if (!author) throw new MissingNameError('author') - - const committer = await normalizeCommitterObject({ - fs, - gitdir, - author, - committer: _committer, - }); - if (!committer) throw new MissingNameError('committer') - - return await _removeNote({ - fs, - cache, - onSign, - gitdir, - ref, - oid, - author, - committer, - signingKey, - }) - } catch (err) { - err.caller = 'git.removeNote'; - throw err - } -} - -// @ts-check - -/** - * Rename a branch - * - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {string} args.ref - The name of the new branch - * @param {string} args.oldref - The name of the old branch - * @param {boolean} [args.checkout = false] - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - */ -async function _renameBranch({ - fs, - gitdir, - oldref, - ref, - checkout = false, -}) { - if (ref !== cleanGitRef.clean(ref)) { - throw new InvalidRefNameError(ref, cleanGitRef.clean(ref)) - } - - if (oldref !== cleanGitRef.clean(oldref)) { - throw new InvalidRefNameError(oldref, cleanGitRef.clean(oldref)) - } - - const fulloldref = `refs/heads/${oldref}`; - const fullnewref = `refs/heads/${ref}`; - - const newexist = await GitRefManager.exists({ fs, gitdir, ref: fullnewref }); - - if (newexist) { - throw new AlreadyExistsError('branch', ref, false) - } - - const value = await GitRefManager.resolve({ - fs, - gitdir, - ref: fulloldref, - depth: 1, - }); - - await GitRefManager.writeRef({ fs, gitdir, ref: fullnewref, value }); - await GitRefManager.deleteRef({ fs, gitdir, ref: fulloldref }); - - if (checkout) { - // Update HEAD - await GitRefManager.writeSymbolicRef({ - fs, - gitdir, - ref: 'HEAD', - value: fullnewref, - }); - } -} - -// @ts-check - -/** - * Rename a branch - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - What to name the branch - * @param {string} args.oldref - What the name of the branch was - * @param {boolean} [args.checkout = false] - Update `HEAD` to point at the newly created branch - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.renameBranch({ fs, dir: '/tutorial', ref: 'main', oldref: 'master' }) - * console.log('done') - * - */ -async function renameBranch({ - fs, - dir, - gitdir = join(dir, '.git'), - ref, - oldref, - checkout = false, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - assertParameter('oldref', oldref); - return await _renameBranch({ - fs: new FileSystem(fs), - gitdir, - ref, - oldref, - checkout, - }) - } catch (err) { - err.caller = 'git.renameBranch'; - throw err - } -} - -async function hashObject$1({ gitdir, type, object }) { - return shasum(GitObject.wrap({ type, object })) -} - -// @ts-check - -/** - * Reset a file in the git index (aka staging area) - * - * Note that this does NOT modify the file in the working directory. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the file to reset in the index - * @param {string} [args.ref = 'HEAD'] - A ref to the commit to use - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully once the git index has been updated - * - * @example - * await git.resetIndex({ fs, dir: '/tutorial', filepath: 'README.md' }) - * console.log('done') - * - */ -async function resetIndex({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - filepath, - ref = 'HEAD', - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('filepath', filepath); - assertParameter('ref', ref); - - const fs = new FileSystem(_fs); - // Resolve commit - let oid = await GitRefManager.resolve({ fs, gitdir, ref }); - let workdirOid; - try { - // Resolve blob - oid = await resolveFilepath({ - fs, - cache, - gitdir, - oid, - filepath, - }); - } catch (e) { - // This means we're resetting the file to a "deleted" state - oid = null; - } - // For files that aren't in the workdir use zeros - let stats = { - ctime: new Date(0), - mtime: new Date(0), - dev: 0, - ino: 0, - mode: 0, - uid: 0, - gid: 0, - size: 0, - }; - // If the file exists in the workdir... - const object = dir && (await fs.read(join(dir, filepath))); - if (object) { - // ... and has the same hash as the desired state... - workdirOid = await hashObject$1({ - gitdir, - type: 'blob', - object, - }); - if (oid === workdirOid) { - // ... use the workdir Stats object - stats = await fs.lstat(join(dir, filepath)); - } - } - await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) { - index.delete({ filepath }); - if (oid) { - index.insert({ filepath, stats, oid }); - } - }); - } catch (err) { - err.caller = 'git.reset'; - throw err - } -} - -// @ts-check - -/** - * Get the value of a symbolic ref or resolve a ref to its SHA-1 object id - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The ref to resolve - * @param {number} [args.depth = undefined] - How many symbolic references to follow before returning - * - * @returns {Promise<string>} Resolves successfully with a SHA-1 object id or the value of a symbolic ref - * - * @example - * let currentCommit = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD' }) - * console.log(currentCommit) - * let currentBranch = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD', depth: 2 }) - * console.log(currentBranch) - * - */ -async function resolveRef({ - fs, - dir, - gitdir = join(dir, '.git'), - ref, - depth, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - - const oid = await GitRefManager.resolve({ - fs: new FileSystem(fs), - gitdir, - ref, - depth, - }); - return oid - } catch (err) { - err.caller = 'git.resolveRef'; - throw err - } -} - -// @ts-check - -/** - * Write an entry to the git config files. - * - * *Caveats:* - * - Currently only the local `$GIT_DIR/config` file can be read or written. However support for the global `~/.gitconfig` and system `$(prefix)/etc/gitconfig` will be added in the future. - * - The current parser does not support the more exotic features of the git-config file format such as `[include]` and `[includeIf]`. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.path - The key of the git config entry - * @param {string | boolean | number | void} args.value - A value to store at that path. (Use `undefined` as the value to delete a config entry.) - * @param {boolean} [args.append = false] - If true, will append rather than replace when setting (use with multi-valued config options). - * - * @returns {Promise<void>} Resolves successfully when operation completed - * - * @example - * // Write config value - * await git.setConfig({ - * fs, - * dir: '/tutorial', - * path: 'user.name', - * value: 'Mr. Test' - * }) - * - * // Print out config file - * let file = await fs.promises.readFile('/tutorial/.git/config', 'utf8') - * console.log(file) - * - * // Delete a config entry - * await git.setConfig({ - * fs, - * dir: '/tutorial', - * path: 'user.name', - * value: undefined - * }) - * - * // Print out config file - * file = await fs.promises.readFile('/tutorial/.git/config', 'utf8') - * console.log(file) - */ -async function setConfig({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - path, - value, - append = false, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('path', path); - // assertParameter('value', value) // We actually allow 'undefined' as a value to unset/delete - - const fs = new FileSystem(_fs); - const config = await GitConfigManager.get({ fs, gitdir }); - if (append) { - await config.append(path, value); - } else { - await config.set(path, value); - } - await GitConfigManager.save({ fs, gitdir, config }); - } catch (err) { - err.caller = 'git.setConfig'; - throw err - } -} - -// @ts-check - -/** - * Tell whether a file has been changed - * - * The possible resolve values are: - * - * | status | description | - * | --------------------- | ------------------------------------------------------------------------------------- | - * | `"ignored"` | file ignored by a .gitignore rule | - * | `"unmodified"` | file unchanged from HEAD commit | - * | `"*modified"` | file has modifications, not yet staged | - * | `"*deleted"` | file has been removed, but the removal is not yet staged | - * | `"*added"` | file is untracked, not yet staged | - * | `"absent"` | file not present in HEAD commit, staging area, or working dir | - * | `"modified"` | file has modifications, staged | - * | `"deleted"` | file has been removed, staged | - * | `"added"` | previously untracked file, staged | - * | `"*unmodified"` | working dir and HEAD commit match, but index differs | - * | `"*absent"` | file not present in working dir or HEAD commit, but present in the index | - * | `"*undeleted"` | file was deleted from the index, but is still in the working dir | - * | `"*undeletemodified"` | file was deleted from the index, but is present with modifications in the working dir | - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the file to query - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<'ignored'|'unmodified'|'*modified'|'*deleted'|'*added'|'absent'|'modified'|'deleted'|'added'|'*unmodified'|'*absent'|'*undeleted'|'*undeletemodified'>} Resolves successfully with the file's git status - * - * @example - * let status = await git.status({ fs, dir: '/tutorial', filepath: 'README.md' }) - * console.log(status) - * - */ -async function status({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - filepath, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('filepath', filepath); - - const fs = new FileSystem(_fs); - const ignored = await GitIgnoreManager.isIgnored({ - fs, - gitdir, - dir, - filepath, - }); - if (ignored) { - return 'ignored' - } - const headTree = await getHeadTree({ fs, cache, gitdir }); - const treeOid = await getOidAtPath({ - fs, - cache, - gitdir, - tree: headTree, - path: filepath, - }); - const indexEntry = await GitIndexManager.acquire( - { fs, gitdir, cache }, - async function(index) { - for (const entry of index) { - if (entry.path === filepath) return entry - } - return null - } - ); - const stats = await fs.lstat(join(dir, filepath)); - - const H = treeOid !== null; // head - const I = indexEntry !== null; // index - const W = stats !== null; // working dir - - const getWorkdirOid = async () => { - if (I && !compareStats(indexEntry, stats)) { - return indexEntry.oid - } else { - const object = await fs.read(join(dir, filepath)); - const workdirOid = await hashObject$1({ - gitdir, - type: 'blob', - object, - }); - // If the oid in the index === working dir oid but stats differed update cache - if (I && indexEntry.oid === workdirOid) { - // and as long as our fs.stats aren't bad. - // size of -1 happens over a BrowserFS HTTP Backend that doesn't serve Content-Length headers - // (like the Karma webserver) because BrowserFS HTTP Backend uses HTTP HEAD requests to do fs.stat - if (stats.size !== -1) { - // We don't await this so we can return faster for one-off cases. - GitIndexManager.acquire({ fs, gitdir, cache }, async function( - index - ) { - index.insert({ filepath, stats, oid: workdirOid }); - }); - } - } - return workdirOid - } - }; - - if (!H && !W && !I) return 'absent' // --- - if (!H && !W && I) return '*absent' // -A- - if (!H && W && !I) return '*added' // --A - if (!H && W && I) { - const workdirOid = await getWorkdirOid(); - // @ts-ignore - return workdirOid === indexEntry.oid ? 'added' : '*added' // -AA : -AB - } - if (H && !W && !I) return 'deleted' // A-- - if (H && !W && I) { - // @ts-ignore - return treeOid === indexEntry.oid ? '*deleted' : '*deleted' // AA- : AB- - } - if (H && W && !I) { - const workdirOid = await getWorkdirOid(); - return workdirOid === treeOid ? '*undeleted' : '*undeletemodified' // A-A : A-B - } - if (H && W && I) { - const workdirOid = await getWorkdirOid(); - if (workdirOid === treeOid) { - // @ts-ignore - return workdirOid === indexEntry.oid ? 'unmodified' : '*unmodified' // AAA : ABA - } else { - // @ts-ignore - return workdirOid === indexEntry.oid ? 'modified' : '*modified' // ABB : AAB - } - } - /* - --- - -A- - --A - -AA - -AB - A-- - AA- - AB- - A-A - A-B - AAA - ABA - ABB - AAB - */ - } catch (err) { - err.caller = 'git.status'; - throw err - } -} - -async function getOidAtPath({ fs, cache, gitdir, tree, path }) { - if (typeof path === 'string') path = path.split('/'); - const dirname = path.shift(); - for (const entry of tree) { - if (entry.path === dirname) { - if (path.length === 0) { - return entry.oid - } - const { type, object } = await _readObject({ - fs, - cache, - gitdir, - oid: entry.oid, - }); - if (type === 'tree') { - const tree = GitTree.from(object); - return getOidAtPath({ fs, cache, gitdir, tree, path }) - } - if (type === 'blob') { - throw new ObjectTypeError(entry.oid, type, 'blob', path.join('/')) - } - } - } - return null -} - -async function getHeadTree({ fs, cache, gitdir }) { - // Get the tree from the HEAD commit. - let oid; - try { - oid = await GitRefManager.resolve({ fs, gitdir, ref: 'HEAD' }); - } catch (e) { - // Handle fresh branches with no commits - if (e instanceof NotFoundError) { - return [] - } - } - const { tree } = await _readTree({ fs, cache, gitdir, oid }); - return tree -} - -// @ts-check - -/** - * Efficiently get the status of multiple files at once. - * - * The returned `StatusMatrix` is admittedly not the easiest format to read. - * However it conveys a large amount of information in dense format that should make it easy to create reports about the current state of the repository; - * without having to do multiple, time-consuming isomorphic-git calls. - * My hope is that the speed and flexibility of the function will make up for the learning curve of interpreting the return value. - * - * ```js live - * // get the status of all the files in 'src' - * let status = await git.statusMatrix({ - * fs, - * dir: '/tutorial', - * filter: f => f.startsWith('src/') - * }) - * console.log(status) - * ``` - * - * ```js live - * // get the status of all the JSON and Markdown files - * let status = await git.statusMatrix({ - * fs, - * dir: '/tutorial', - * filter: f => f.endsWith('.json') || f.endsWith('.md') - * }) - * console.log(status) - * ``` - * - * The result is returned as a 2D array. - * The outer array represents the files and/or blobs in the repo, in alphabetical order. - * The inner arrays describe the status of the file: - * the first value is the filepath, and the next three are integers - * representing the HEAD status, WORKDIR status, and STAGE status of the entry. - * - * ```js - * // example StatusMatrix - * [ - * ["a.txt", 0, 2, 0], // new, untracked - * ["b.txt", 0, 2, 2], // added, staged - * ["c.txt", 0, 2, 3], // added, staged, with unstaged changes - * ["d.txt", 1, 1, 1], // unmodified - * ["e.txt", 1, 2, 1], // modified, unstaged - * ["f.txt", 1, 2, 2], // modified, staged - * ["g.txt", 1, 2, 3], // modified, staged, with unstaged changes - * ["h.txt", 1, 0, 1], // deleted, unstaged - * ["i.txt", 1, 0, 0], // deleted, staged - * ] - * ``` - * - * - The HEAD status is either absent (0) or present (1). - * - The WORKDIR status is either absent (0), identical to HEAD (1), or different from HEAD (2). - * - The STAGE status is either absent (0), identical to HEAD (1), identical to WORKDIR (2), or different from WORKDIR (3). - * - * ```ts - * type Filename = string - * type HeadStatus = 0 | 1 - * type WorkdirStatus = 0 | 1 | 2 - * type StageStatus = 0 | 1 | 2 | 3 - * - * type StatusRow = [Filename, HeadStatus, WorkdirStatus, StageStatus] - * - * type StatusMatrix = StatusRow[] - * ``` - * - * > Think of the natural progression of file modifications as being from HEAD (previous) -> WORKDIR (current) -> STAGE (next). - * > Then HEAD is "version 1", WORKDIR is "version 2", and STAGE is "version 3". - * > Then, imagine a "version 0" which is before the file was created. - * > Then the status value in each column corresponds to the oldest version of the file it is identical to. - * > (For a file to be identical to "version 0" means the file is deleted.) - * - * Here are some examples of queries you can answer using the result: - * - * #### Q: What files have been deleted? - * ```js - * const FILE = 0, WORKDIR = 2 - * - * const filenames = (await statusMatrix({ dir })) - * .filter(row => row[WORKDIR] === 0) - * .map(row => row[FILE]) - * ``` - * - * #### Q: What files have unstaged changes? - * ```js - * const FILE = 0, WORKDIR = 2, STAGE = 3 - * - * const filenames = (await statusMatrix({ dir })) - * .filter(row => row[WORKDIR] !== row[STAGE]) - * .map(row => row[FILE]) - * ``` - * - * #### Q: What files have been modified since the last commit? - * ```js - * const FILE = 0, HEAD = 1, WORKDIR = 2 - * - * const filenames = (await statusMatrix({ dir })) - * .filter(row => row[HEAD] !== row[WORKDIR]) - * .map(row => row[FILE]) - * ``` - * - * #### Q: What files will NOT be changed if I commit right now? - * ```js - * const FILE = 0, HEAD = 1, STAGE = 3 - * - * const filenames = (await statusMatrix({ dir })) - * .filter(row => row[HEAD] === row[STAGE]) - * .map(row => row[FILE]) - * ``` - * - * For reference, here are all possible combinations: - * - * | HEAD | WORKDIR | STAGE | `git status --short` equivalent | - * | ---- | ------- | ----- | ------------------------------- | - * | 0 | 0 | 0 | `` | - * | 0 | 0 | 3 | `AD` | - * | 0 | 2 | 0 | `??` | - * | 0 | 2 | 2 | `A ` | - * | 0 | 2 | 3 | `AM` | - * | 1 | 0 | 0 | `D ` | - * | 1 | 0 | 1 | ` D` | - * | 1 | 0 | 3 | `MD` | - * | 1 | 1 | 0 | `D ` + `??` | - * | 1 | 1 | 1 | `` | - * | 1 | 1 | 3 | `MM` | - * | 1 | 2 | 0 | `D ` + `??` | - * | 1 | 2 | 1 | ` M` | - * | 1 | 2 | 2 | `M ` | - * | 1 | 2 | 3 | `MM` | - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref = 'HEAD'] - Optionally specify a different commit to compare against the workdir and stage instead of the HEAD - * @param {string[]} [args.filepaths = ['.']] - Limit the query to the given files and directories - * @param {function(string): boolean} [args.filter] - Filter the results to only those whose filepath matches a function. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Array<StatusRow>>} Resolves with a status matrix, described below. - * @see StatusRow - */ -async function statusMatrix({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - ref = 'HEAD', - filepaths = ['.'], - filter, - cache = {}, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - - const fs = new FileSystem(_fs); - return await _walk({ - fs, - cache, - dir, - gitdir, - trees: [TREE({ ref }), WORKDIR(), STAGE()], - map: async function(filepath, [head, workdir, stage]) { - // Ignore ignored files, but only if they are not already tracked. - if (!head && !stage && workdir) { - if ( - await GitIgnoreManager.isIgnored({ - fs, - dir, - filepath, - }) - ) { - return null - } - } - // match against base paths - if (!filepaths.some(base => worthWalking(filepath, base))) { - return null - } - // Late filter against file names - if (filter) { - if (!filter(filepath)) return - } - - // For now, just bail on directories - const headType = head && (await head.type()); - if (headType === 'tree' || headType === 'special') return - if (headType === 'commit') return null - - const workdirType = workdir && (await workdir.type()); - if (workdirType === 'tree' || workdirType === 'special') return - - const stageType = stage && (await stage.type()); - if (stageType === 'commit') return null - if (stageType === 'tree' || stageType === 'special') return - - // Figure out the oids, using the staged oid for the working dir oid if the stats match. - const headOid = head ? await head.oid() : undefined; - const stageOid = stage ? await stage.oid() : undefined; - let workdirOid; - if (!head && workdir && !stage) { - // We don't actually NEED the sha. Any sha will do - // TODO: update this logic to handle N trees instead of just 3. - workdirOid = '42'; - } else if (workdir) { - workdirOid = await workdir.oid(); - } - const entry = [undefined, headOid, workdirOid, stageOid]; - const result = entry.map(value => entry.indexOf(value)); - result.shift(); // remove leading undefined entry - return [filepath, ...result] - }, - }) - } catch (err) { - err.caller = 'git.statusMatrix'; - throw err - } -} - -// @ts-check - -/** - * Create a lightweight tag - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - What to name the tag - * @param {string} [args.object = 'HEAD'] - What oid the tag refers to. (Will resolve to oid if value is a ref.) By default, the commit object which is referred by the current `HEAD` is used. - * @param {boolean} [args.force = false] - Instead of throwing an error if a tag named `ref` already exists, overwrite the existing tag. - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.tag({ fs, dir: '/tutorial', ref: 'test-tag' }) - * console.log('done') - * - */ -async function tag({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - ref, - object, - force = false, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - - const fs = new FileSystem(_fs); - - if (ref === undefined) { - throw new MissingParameterError('ref') - } - - ref = ref.startsWith('refs/tags/') ? ref : `refs/tags/${ref}`; - - // Resolve passed object - const value = await GitRefManager.resolve({ - fs, - gitdir, - ref: object || 'HEAD', - }); - - if (!force && (await GitRefManager.exists({ fs, gitdir, ref }))) { - throw new AlreadyExistsError('tag', ref) - } - - await GitRefManager.writeRef({ fs, gitdir, ref, value }); - } catch (err) { - err.caller = 'git.tag'; - throw err - } -} - -// @ts-check - -/** - * Return the version number of isomorphic-git - * - * I don't know why you might need this. I added it just so I could check that I was getting - * the correct version of the library and not a cached version. - * - * @returns {string} the version string taken from package.json at publication time - * - * @example - * console.log(git.version()) - * - */ -function version() { - try { - return pkg.version - } catch (err) { - err.caller = 'git.version'; - throw err - } -} - -// @ts-check - -/** - * @callback WalkerMap - * @param {string} filename - * @param {Array<WalkerEntry | null>} entries - * @returns {Promise<any>} - */ - -/** - * @callback WalkerReduce - * @param {any} parent - * @param {any[]} children - * @returns {Promise<any>} - */ - -/** - * @callback WalkerIterateCallback - * @param {WalkerEntry[]} entries - * @returns {Promise<any[]>} - */ - -/** - * @callback WalkerIterate - * @param {WalkerIterateCallback} walk - * @param {IterableIterator<WalkerEntry[]>} children - * @returns {Promise<any[]>} - */ - -/** - * A powerful recursive tree-walking utility. - * - * The `walk` API simplifies gathering detailed information about a tree or comparing all the filepaths in two or more trees. - * Trees can be git commits, the working directory, or the or git index (staging area). - * As long as a file or directory is present in at least one of the trees, it will be traversed. - * Entries are traversed in alphabetical order. - * - * The arguments to `walk` are the `trees` you want to traverse, and 3 optional transform functions: - * `map`, `reduce`, and `iterate`. - * - * ## `TREE`, `WORKDIR`, and `STAGE` - * - * Tree walkers are represented by three separate functions that can be imported: - * - * ```js - * import { TREE, WORKDIR, STAGE } from 'isomorphic-git' - * ``` - * - * These functions return opaque handles called `Walker`s. - * The only thing that `Walker` objects are good for is passing into `walk`. - * Here are the three `Walker`s passed into `walk` by the `statusMatrix` command for example: - * - * ```js - * let ref = 'HEAD' - * - * let trees = [TREE({ ref }), WORKDIR(), STAGE()] - * ``` - * - * For the arguments, see the doc pages for [TREE](./TREE.md), [WORKDIR](./WORKDIR.md), and [STAGE](./STAGE.md). - * - * `map`, `reduce`, and `iterate` allow you control the recursive walk by pruning and transforming `WalkerEntry`s into the desired result. - * - * ## WalkerEntry - * - * {@link WalkerEntry typedef} - * - * `map` receives an array of `WalkerEntry[]` as its main argument, one `WalkerEntry` for each `Walker` in the `trees` argument. - * The methods are memoized per `WalkerEntry` so calling them multiple times in a `map` function does not adversely impact performance. - * By only computing these values if needed, you build can build lean, mean, efficient walking machines. - * - * ### WalkerEntry#type() - * - * Returns the kind as a string. This is normally either `tree` or `blob`. - * - * `TREE`, `STAGE`, and `WORKDIR` walkers all return a string. - * - * Possible values: - * - * - `'tree'` directory - * - `'blob'` file - * - `'special'` used by `WORKDIR` to represent irregular files like sockets and FIFOs - * - `'commit'` used by `TREE` to represent submodules - * - * ```js - * await entry.type() - * ``` - * - * ### WalkerEntry#mode() - * - * Returns the file mode as a number. Use this to distinguish between regular files, symlinks, and executable files. - * - * `TREE`, `STAGE`, and `WORKDIR` walkers all return a number for all `type`s of entries. - * - * It has been normalized to one of the 4 values that are allowed in git commits: - * - * - `0o40000` directory - * - `0o100644` file - * - `0o100755` file (executable) - * - `0o120000` symlink - * - * Tip: to make modes more readable, you can print them to octal using `.toString(8)`. - * - * ```js - * await entry.mode() - * ``` - * - * ### WalkerEntry#oid() - * - * Returns the SHA-1 object id for blobs and trees. - * - * `TREE` walkers return a string for `blob` and `tree` entries. - * - * `STAGE` and `WORKDIR` walkers return a string for `blob` entries and `undefined` for `tree` entries. - * - * ```js - * await entry.oid() - * ``` - * - * ### WalkerEntry#content() - * - * Returns the file contents as a Buffer. - * - * `TREE` and `WORKDIR` walkers return a Buffer for `blob` entries and `undefined` for `tree` entries. - * - * `STAGE` walkers always return `undefined` since the file contents are never stored in the stage. - * - * ```js - * await entry.content() - * ``` - * - * ### WalkerEntry#stat() - * - * Returns a normalized subset of filesystem Stat data. - * - * `WORKDIR` walkers return a `Stat` for `blob` and `tree` entries. - * - * `STAGE` walkers return a `Stat` for `blob` entries and `undefined` for `tree` entries. - * - * `TREE` walkers return `undefined` for all entry types. - * - * ```js - * await entry.stat() - * ``` - * - * {@link Stat typedef} - * - * ## map(string, Array<WalkerEntry|null>) => Promise<any> - * - * {@link WalkerMap typedef} - * - * This is the function that is called once per entry BEFORE visiting the children of that node. - * - * If you return `null` for a `tree` entry, then none of the children of that `tree` entry will be walked. - * - * This is a good place for query logic, such as examining the contents of a file. - * Ultimately, compare all the entries and return any values you are interested in. - * If you do not return a value (or return undefined) that entry will be filtered from the results. - * - * Example 1: Find all the files containing the word 'foo'. - * ```js - * async function map(filepath, [head, workdir]) { - * let content = (await workdir.content()).toString('utf8') - * if (content.contains('foo')) { - * return { - * filepath, - * content - * } - * } - * } - * ``` - * - * Example 2: Return the difference between the working directory and the HEAD commit - * ```js - * const diff = require('diff-lines') - * async function map(filepath, [head, workdir]) { - * return { - * filepath, - * oid: await head.oid(), - * diff: diff((await head.content()).toString('utf8'), (await workdir.content()).toString('utf8')) - * } - * } - * ``` - * - * Example 3: - * ```js - * let path = require('path') - * // Only examine files in the directory `cwd` - * let cwd = 'src/app' - * async function map (filepath, [head, workdir, stage]) { - * if ( - * // don't skip the root directory - * head.fullpath !== '.' && - * // return true for 'src' and 'src/app' - * !cwd.startsWith(filepath) && - * // return true for 'src/app/*' - * path.dirname(filepath) !== cwd - * ) { - * return null - * } else { - * return filepath - * } - * } - * ``` - * - * ## reduce(parent, children) - * - * {@link WalkerReduce typedef} - * - * This is the function that is called once per entry AFTER visiting the children of that node. - * - * Default: `async (parent, children) => parent === undefined ? children.flat() : [parent, children].flat()` - * - * The default implementation of this function returns all directories and children in a giant flat array. - * You can define a different accumulation method though. - * - * Example: Return a hierarchical structure - * ```js - * async function reduce (parent, children) { - * return Object.assign(parent, { children }) - * } - * ``` - * - * ## iterate(walk, children) - * - * {@link WalkerIterate typedef} - * - * {@link WalkerIterateCallback typedef} - * - * Default: `(walk, children) => Promise.all([...children].map(walk))` - * - * The default implementation recurses all children concurrently using Promise.all. - * However you could use a custom function to traverse children serially or use a global queue to throttle recursion. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {Walker[]} args.trees - The trees you want to traverse - * @param {WalkerMap} [args.map] - Transform `WalkerEntry`s into a result form - * @param {WalkerReduce} [args.reduce] - Control how mapped entries are combined with their parent result - * @param {WalkerIterate} [args.iterate] - Fine-tune how entries within a tree are iterated over - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<any>} The finished tree-walking result - */ -async function walk({ - fs, - dir, - gitdir = join(dir, '.git'), - trees, - map, - reduce, - iterate, - cache = {}, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('trees', trees); - - return await _walk({ - fs: new FileSystem(fs), - cache, - dir, - gitdir, - trees, - map, - reduce, - iterate, - }) - } catch (err) { - err.caller = 'git.walk'; - throw err - } -} - -// @ts-check - -/** - * Write a blob object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {Uint8Array} args.blob - The blob object to write - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object - * - * @example - * // Manually create a blob. - * let oid = await git.writeBlob({ - * fs, - * dir: '/tutorial', - * blob: new Uint8Array([]) - * }) - * - * console.log('oid', oid) // should be 'e69de29bb2d1d6434b8b29ae775ad8c2e48c5391' - * - */ -async function writeBlob({ fs, dir, gitdir = join(dir, '.git'), blob }) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('blob', blob); - - return await _writeObject({ - fs: new FileSystem(fs), - gitdir, - type: 'blob', - object: blob, - format: 'content', - }) - } catch (err) { - err.caller = 'git.writeBlob'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {CommitObject} args.commit - * - * @returns {Promise<string>} - * @see CommitObject - * - */ -async function _writeCommit({ fs, gitdir, commit }) { - // Convert object to buffer - const object = GitCommit.from(commit).toObject(); - const oid = await _writeObject({ - fs, - gitdir, - type: 'commit', - object, - format: 'content', - }); - return oid -} - -// @ts-check - -/** - * Write a commit object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {CommitObject} args.commit - The object to write - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object - * @see CommitObject - * - */ -async function writeCommit({ - fs, - dir, - gitdir = join(dir, '.git'), - commit, -}) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('commit', commit); - - return await _writeCommit({ - fs: new FileSystem(fs), - gitdir, - commit, - }) - } catch (err) { - err.caller = 'git.writeCommit'; - throw err - } -} - -// @ts-check - -/** - * Write a git object directly - * - * `format` can have the following values: - * - * | param | description | - * | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | 'deflated' | Treat `object` as the raw deflate-compressed buffer for an object, meaning can be written to `.git/objects/**` as-is. | - * | 'wrapped' | Treat `object` as the inflated object buffer wrapped in the git object header. This is the raw buffer used when calculating the SHA-1 object id of a git object. | - * | 'content' | Treat `object` as the object buffer without the git header. | - * | 'parsed' | Treat `object` as a parsed representation of the object. | - * - * If `format` is `'parsed'`, then `object` must match one of the schemas for `CommitObject`, `TreeObject`, `TagObject`, or a `string` (for blobs). - * - * {@link CommitObject typedef} - * - * {@link TreeObject typedef} - * - * {@link TagObject typedef} - * - * If `format` is `'content'`, `'wrapped'`, or `'deflated'`, `object` should be a `Uint8Array`. - * - * @deprecated - * > This command is overly complicated. - * > - * > If you know the type of object you are writing, use [`writeBlob`](./writeBlob.md), [`writeCommit`](./writeCommit.md), [`writeTag`](./writeTag.md), or [`writeTree`](./writeTree.md). - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string | Uint8Array | CommitObject | TreeObject | TagObject} args.object - The object to write. - * @param {'blob'|'tree'|'commit'|'tag'} [args.type] - The kind of object to write. - * @param {'deflated' | 'wrapped' | 'content' | 'parsed'} [args.format = 'parsed'] - What format the object is in. The possible choices are listed below. - * @param {string} [args.oid] - If `format` is `'deflated'` then this param is required. Otherwise it is calculated. - * @param {string} [args.encoding] - If `type` is `'blob'` then `object` will be converted to a Uint8Array using `encoding`. - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object. - * - * @example - * // Manually create an annotated tag. - * let sha = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD' }) - * console.log('commit', sha) - * - * let oid = await git.writeObject({ - * fs, - * dir: '/tutorial', - * type: 'tag', - * object: { - * object: sha, - * type: 'commit', - * tag: 'my-tag', - * tagger: { - * name: 'your name', - * email: 'email@example.com', - * timestamp: Math.floor(Date.now()/1000), - * timezoneOffset: new Date().getTimezoneOffset() - * }, - * message: 'Optional message' - * } - * }) - * - * console.log('tag', oid) - * - */ -async function writeObject({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - type, - object, - format = 'parsed', - oid, - encoding = undefined, -}) { - try { - const fs = new FileSystem(_fs); - // Convert object to buffer - if (format === 'parsed') { - switch (type) { - case 'commit': - object = GitCommit.from(object).toObject(); - break - case 'tree': - object = GitTree.from(object).toObject(); - break - case 'blob': - object = Buffer.from(object, encoding); - break - case 'tag': - object = GitAnnotatedTag.from(object).toObject(); - break - default: - throw new ObjectTypeError(oid || '', type, 'blob|commit|tag|tree') - } - // GitObjectManager does not know how to serialize content, so we tweak that parameter before passing it. - format = 'content'; - } - oid = await _writeObject({ - fs, - gitdir, - type, - object, - oid, - format, - }); - return oid - } catch (err) { - err.caller = 'git.writeObject'; - throw err - } -} - -// @ts-check - -/** - * Write a ref which refers to the specified SHA-1 object id, or a symbolic ref which refers to the specified ref. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The name of the ref to write - * @param {string} args.value - When `symbolic` is false, a ref or an SHA-1 object id. When true, a ref starting with `refs/`. - * @param {boolean} [args.force = false] - Instead of throwing an error if a ref named `ref` already exists, overwrite the existing ref. - * @param {boolean} [args.symbolic = false] - Whether the ref is symbolic or not. - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.writeRef({ - * fs, - * dir: '/tutorial', - * ref: 'refs/heads/another-branch', - * value: 'HEAD' - * }) - * await git.writeRef({ - * fs, - * dir: '/tutorial', - * ref: 'HEAD', - * value: 'refs/heads/another-branch', - * force: true, - * symbolic: true - * }) - * console.log('done') - * - */ -async function writeRef({ - fs: _fs, - dir, - gitdir = join(dir, '.git'), - ref, - value, - force = false, - symbolic = false, -}) { - try { - assertParameter('fs', _fs); - assertParameter('gitdir', gitdir); - assertParameter('ref', ref); - assertParameter('value', value); - - const fs = new FileSystem(_fs); - - if (ref !== cleanGitRef.clean(ref)) { - throw new InvalidRefNameError(ref, cleanGitRef.clean(ref)) - } - - if (!force && (await GitRefManager.exists({ fs, gitdir, ref }))) { - throw new AlreadyExistsError('ref', ref) - } - - if (symbolic) { - await GitRefManager.writeSymbolicRef({ - fs, - gitdir, - ref, - value, - }); - } else { - value = await GitRefManager.resolve({ - fs, - gitdir, - ref: value, - }); - await GitRefManager.writeRef({ - fs, - gitdir, - ref, - value, - }); - } - } catch (err) { - err.caller = 'git.writeRef'; - throw err - } -} - -// @ts-check - -/** - * @param {object} args - * @param {import('../models/FileSystem.js').FileSystem} args.fs - * @param {string} args.gitdir - * @param {TagObject} args.tag - * - * @returns {Promise<string>} - */ -async function _writeTag({ fs, gitdir, tag }) { - // Convert object to buffer - const object = GitAnnotatedTag.from(tag).toObject(); - const oid = await _writeObject({ - fs, - gitdir, - type: 'tag', - object, - format: 'content', - }); - return oid -} - -// @ts-check - -/** - * Write an annotated tag object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {TagObject} args.tag - The object to write - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object - * @see TagObject - * - * @example - * // Manually create an annotated tag. - * let sha = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD' }) - * console.log('commit', sha) - * - * let oid = await git.writeTag({ - * fs, - * dir: '/tutorial', - * tag: { - * object: sha, - * type: 'commit', - * tag: 'my-tag', - * tagger: { - * name: 'your name', - * email: 'email@example.com', - * timestamp: Math.floor(Date.now()/1000), - * timezoneOffset: new Date().getTimezoneOffset() - * }, - * message: 'Optional message' - * } - * }) - * - * console.log('tag', oid) - * - */ -async function writeTag({ fs, dir, gitdir = join(dir, '.git'), tag }) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('tag', tag); - - return await _writeTag({ - fs: new FileSystem(fs), - gitdir, - tag, - }) - } catch (err) { - err.caller = 'git.writeTag'; - throw err - } -} - -// @ts-check - -/** - * Write a tree object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {TreeObject} args.tree - The object to write - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object. - * @see TreeObject - * @see TreeEntry - * - */ -async function writeTree({ fs, dir, gitdir = join(dir, '.git'), tree }) { - try { - assertParameter('fs', fs); - assertParameter('gitdir', gitdir); - assertParameter('tree', tree); - - return await _writeTree({ - fs: new FileSystem(fs), - gitdir, - tree, - }) - } catch (err) { - err.caller = 'git.writeTree'; - throw err - } -} - -// default export -var index = { - Errors, - STAGE, - TREE, - WORKDIR, - add, - addNote, - addRemote, - annotatedTag, - branch, - checkout, - clone, - commit, - getConfig, - getConfigAll, - setConfig, - currentBranch, - deleteBranch, - deleteRef, - deleteRemote, - deleteTag, - expandOid, - expandRef, - fastForward, - fetch, - findMergeBase, - findRoot, - getRemoteInfo, - getRemoteInfo2, - hashBlob, - indexPack, - init, - isDescendent, - listBranches, - listFiles, - listNotes, - listRemotes, - listServerRefs, - listTags, - log, - merge, - packObjects, - pull, - push, - readBlob, - readCommit, - readNote, - readObject, - readTag, - readTree, - remove, - removeNote, - renameBranch, - resetIndex, - resolveRef, - status, - statusMatrix, - tag, - version, - walk, - writeBlob, - writeCommit, - writeObject, - writeRef, - writeTag, - writeTree, -}; - -export default index; -export { Errors, STAGE, TREE, WORKDIR, add, addNote, addRemote, annotatedTag, branch, checkout, clone, commit, currentBranch, deleteBranch, deleteRef, deleteRemote, deleteTag, expandOid, expandRef, fastForward, fetch, findMergeBase, findRoot, getConfig, getConfigAll, getRemoteInfo, getRemoteInfo2, hashBlob, indexPack, init, isDescendent, listBranches, listFiles, listNotes, listRemotes, listServerRefs, listTags, log, merge, packObjects, pull, push, readBlob, readCommit, readNote, readObject, readTag, readTree, remove, removeNote, renameBranch, resetIndex, resolveRef, setConfig, status, statusMatrix, tag, version, walk, writeBlob, writeCommit, writeObject, writeRef, writeTag, writeTree }; diff --git a/node_modules/isomorphic-git/index.umd.min.d.ts b/node_modules/isomorphic-git/index.umd.min.d.ts deleted file mode 100644 index 1ea98694..00000000 --- a/node_modules/isomorphic-git/index.umd.min.d.ts +++ /dev/null @@ -1,4234 +0,0 @@ -export default index; -export type TreeEntry = { - /** - * - the 6 digit hexadecimal mode - */ - mode: string; - /** - * - the name of the file or directory - */ - path: string; - /** - * - the SHA-1 object id of the blob or tree - */ - oid: string; - /** - * - the type of object - */ - type: "blob" | "tree" | "commit"; -}; -/** - * - The object returned has the following schema: - */ -export type ReadTreeResult = { - /** - * - SHA-1 object id of this tree - */ - oid: string; - /** - * - the parsed tree object - */ - tree: TreeEntry[]; -}; -/** - * - The object returned has the following schema: - */ -export type FetchResult = { - /** - * - The branch that is cloned if no branch is specified - */ - defaultBranch: string | null; - /** - * - The SHA-1 object id of the fetched head commit - */ - fetchHead: string | null; - /** - * - a textual description of the branch that was fetched - */ - fetchHeadDescription: string | null; - /** - * - The HTTP response headers returned by the git server - */ - headers?: { - [x: string]: string; - }; - /** - * - A list of branches that were pruned, if you provided the `prune` parameter - */ - pruned?: string[]; -}; -/** - * - Returns an object with a schema like this: - */ -export type MergeResult = { - /** - * - The SHA-1 object id that is now at the head of the branch. Absent only if `dryRun` was specified and `mergeCommit` is true. - */ - oid?: string; - /** - * - True if the branch was already merged so no changes were made - */ - alreadyMerged?: boolean; - /** - * - True if it was a fast-forward merge - */ - fastForward?: boolean; - /** - * - True if merge resulted in a merge commit - */ - mergeCommit?: boolean; - /** - * - The SHA-1 object id of the tree resulting from a merge commit - */ - tree?: string; -}; -/** - * - The object returned has the following schema: - */ -export type GetRemoteInfoResult = { - /** - * - The list of capabilities returned by the server (part of the Git protocol) - */ - capabilities: string[]; - refs?: any; - /** - * - The default branch of the remote - */ - HEAD?: string; - /** - * - The branches on the remote - */ - heads?: { - [x: string]: string; - }; - /** - * - The special branches representing pull requests (non-standard) - */ - pull?: { - [x: string]: string; - }; - /** - * - The tags on the remote - */ - tags?: { - [x: string]: string; - }; -}; -/** - * - This object has the following schema: - */ -export type GetRemoteInfo2Result = { - /** - * - Git protocol version the server supports - */ - protocolVersion: 1 | 2; - /** - * - An object of capabilities represented as keys and values - */ - capabilities: { - [x: string]: string | true; - }; - /** - * - Server refs (they get returned by protocol version 1 whether you want them or not) - */ - refs?: ServerRef[]; -}; -/** - * - The object returned has the following schema: - */ -export type HashBlobResult = { - /** - * - The SHA-1 object id - */ - oid: string; - /** - * - The type of the object - */ - type: "blob"; - /** - * - The wrapped git object (the thing that is hashed) - */ - object: Uint8Array; - /** - * - The format of the object - */ - format: "wrapped"; -}; -/** - * - This object has the following schema: - */ -export type ServerRef = { - /** - * - The name of the ref - */ - ref: string; - /** - * - The SHA-1 object id the ref points to - */ - oid: string; - /** - * - The target ref pointed to by a symbolic ref - */ - target?: string; - /** - * - If the oid is the SHA-1 object id of an annotated tag, this is the SHA-1 object id that the annotated tag points to - */ - peeled?: string; -}; -/** - * The packObjects command returns an object with two properties: - */ -export type PackObjectsResult = { - /** - * - The suggested filename for the packfile if you want to save it to disk somewhere. It includes the packfile SHA. - */ - filename: string; - /** - * - The packfile contents. Not present if `write` parameter was true, in which case the packfile was written straight to disk. - */ - packfile?: Uint8Array; -}; -/** - * - The object returned has the following schema: - */ -export type ReadBlobResult = { - oid: string; - blob: Uint8Array; -}; -export type DeflatedObject = { - oid: string; - type: "deflated"; - format: "deflated"; - object: Uint8Array; - source?: string; -}; -export type WrappedObject = { - oid: string; - type: "wrapped"; - format: "wrapped"; - object: Uint8Array; - source?: string; -}; -export type RawObject = { - oid: string; - type: "blob" | "tree" | "commit" | "tag"; - format: "content"; - object: Uint8Array; - source?: string; -}; -export type ParsedBlobObject = { - oid: string; - type: "blob"; - format: "parsed"; - object: string; - source?: string; -}; -export type ParsedCommitObject = { - oid: string; - type: "commit"; - format: "parsed"; - object: CommitObject; - source?: string; -}; -export type ParsedTreeObject = { - oid: string; - type: "tree"; - format: "parsed"; - object: TreeEntry[]; - source?: string; -}; -export type ParsedTagObject = { - oid: string; - type: "tag"; - format: "parsed"; - object: TagObject; - source?: string; -}; -export type ParsedObject = ParsedBlobObject | ParsedCommitObject | ParsedTreeObject | ParsedTagObject; -export type ReadObjectResult = ParsedBlobObject | ParsedCommitObject | ParsedTreeObject | ParsedTagObject | DeflatedObject | WrappedObject | RawObject; -/** - * - The object returned has the following schema: - */ -export type ReadTagResult = { - /** - * - SHA-1 object id of this tag - */ - oid: string; - /** - * - the parsed tag object - */ - tag: TagObject; - /** - * - PGP signing payload - */ - payload: string; -}; -export type WalkerMap = (filename: string, entries: (WalkerEntry | null)[]) => Promise<any>; -export type WalkerReduce = (parent: any, children: any[]) => Promise<any>; -export type WalkerIterateCallback = (entries: WalkerEntry[]) => Promise<any[]>; -export type WalkerIterate = (walk: WalkerIterateCallback, children: any) => Promise<any[]>; -export type GitProgressEvent = { - phase: string; - loaded: number; - total: number; -}; -export type ProgressCallback = (progress: GitProgressEvent) => void | Promise<void>; -export type GitHttpRequest = { - /** - * - The URL to request - */ - url: string; - /** - * - The HTTP method to use - */ - method?: string; - /** - * - Headers to include in the HTTP request - */ - headers?: { - [x: string]: string; - }; - /** - * - An async iterator of Uint8Arrays that make up the body of POST requests - */ - body?: any; - /** - * - Reserved for future use (emitting `GitProgressEvent`s) - */ - onProgress?: ProgressCallback; - /** - * - Reserved for future use (canceling a request) - */ - signal?: any; -}; -export type GitHttpResponse = { - /** - * - The final URL that was fetched after any redirects - */ - url: string; - /** - * - The HTTP method that was used - */ - method?: string; - /** - * - HTTP response headers - */ - headers?: { - [x: string]: string; - }; - /** - * - An async iterator of Uint8Arrays that make up the body of the response - */ - body?: any; - /** - * - The HTTP status code - */ - statusCode: number; - /** - * - The HTTP status message - */ - statusMessage: string; -}; -export type HttpFetch = (request: GitHttpRequest) => Promise<GitHttpResponse>; -export type HttpClient = { - request: HttpFetch; -}; -/** - * A git commit object. - */ -export type CommitObject = { - /** - * Commit message - */ - message: string; - /** - * SHA-1 object id of corresponding file tree - */ - tree: string; - /** - * an array of zero or more SHA-1 object ids - */ - parent: string[]; - author: { - /** - * The author's name - */ - name: string; - /** - * The author's email - */ - email: string; - /** - * UTC Unix timestamp in seconds - */ - timestamp: number; - /** - * Timezone difference from UTC in minutes - */ - timezoneOffset: number; - }; - committer: { - /** - * The committer's name - */ - name: string; - /** - * The committer's email - */ - email: string; - /** - * UTC Unix timestamp in seconds - */ - timestamp: number; - /** - * Timezone difference from UTC in minutes - */ - timezoneOffset: number; - }; - /** - * PGP signature (if present) - */ - gpgsig?: string; -}; -/** - * A git tree object. Trees represent a directory snapshot. - */ -export type TreeObject = TreeEntry[]; -/** - * A git annotated tag object. - */ -export type TagObject = { - /** - * SHA-1 object id of object being tagged - */ - object: string; - /** - * the type of the object being tagged - */ - type: "blob" | "tree" | "commit" | "tag"; - /** - * the tag name - */ - tag: string; - tagger: { - /** - * the tagger's name - */ - name: string; - /** - * the tagger's email - */ - email: string; - /** - * UTC Unix timestamp in seconds - */ - timestamp: number; - /** - * timezone difference from UTC in minutes - */ - timezoneOffset: number; - }; - /** - * tag message - */ - message: string; - /** - * PGP signature (if present) - */ - gpgsig?: string; -}; -export type ReadCommitResult = { - /** - * - SHA-1 object id of this commit - */ - oid: string; - /** - * - the parsed commit object - */ - commit: CommitObject; - /** - * - PGP signing payload - */ - payload: string; -}; -export type Walker = { - /** - * ('GitWalkerSymbol') - */ - Symbol: Symbol; -}; -/** - * Normalized subset of filesystem `stat` data: - */ -export type Stat = { - ctimeSeconds: number; - ctimeNanoseconds: number; - mtimeSeconds: number; - mtimeNanoseconds: number; - dev: number; - ino: number; - mode: number; - uid: number; - gid: number; - size: number; -}; -/** - * The `WalkerEntry` is an interface that abstracts computing many common tree / blob stats. - */ -export type WalkerEntry = { - type: () => Promise<"blob" | "tree" | "commit" | "special">; - mode: () => Promise<number>; - oid: () => Promise<string>; - content: () => Promise<void | Uint8Array>; - stat: () => Promise<Stat>; -}; -export type CallbackFsClient = { - /** - * - https://nodejs.org/api/fs.html#fs_fs_readfile_path_options_callback - */ - readFile: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback - */ - writeFile: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_unlink_path_callback - */ - unlink: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback - */ - readdir: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_mkdir_path_mode_callback - */ - mkdir: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_rmdir_path_callback - */ - rmdir: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_stat_path_options_callback - */ - stat: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_lstat_path_options_callback - */ - lstat: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_readlink_path_options_callback - */ - readlink?: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_symlink_target_path_type_callback - */ - symlink?: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fs_chmod_path_mode_callback - */ - chmod?: Function; -}; -export type PromiseFsClient = { - promises: { - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_readfile_path_options - */ - readFile: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_writefile_file_data_options - */ - writeFile: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_unlink_path - */ - unlink: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_readdir_path_options - */ - readdir: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_mkdir_path_options - */ - mkdir: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_rmdir_path - */ - rmdir: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_stat_path_options - */ - stat: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_lstat_path_options - */ - lstat: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_readlink_path_options - */ - readlink?: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_symlink_target_path_type - */ - symlink?: Function; - /** - * - https://nodejs.org/api/fs.html#fs_fspromises_chmod_path_mode - */ - chmod?: Function; - }; -}; -export type FsClient = CallbackFsClient | PromiseFsClient; -export type MessageCallback = (message: string) => void | Promise<void>; -export type GitAuth = { - username?: string; - password?: string; - headers?: { - [x: string]: string; - }; - /** - * Tells git to throw a `UserCanceledError` (instead of an `HttpError`). - */ - cancel?: boolean; -}; -export type AuthCallback = (url: string, auth: GitAuth) => void | GitAuth | Promise<void | GitAuth>; -export type AuthFailureCallback = (url: string, auth: GitAuth) => void | GitAuth | Promise<void | GitAuth>; -export type AuthSuccessCallback = (url: string, auth: GitAuth) => void | Promise<void>; -export type SignParams = { - /** - * - a plaintext message - */ - payload: string; - /** - * - an 'ASCII armor' encoded PGP key (technically can actually contain _multiple_ keys) - */ - secretKey: string; -}; -export type SignCallback = (args: SignParams) => { - signature: string; -} | Promise<{ - signature: string; -}>; -export type RefUpdateStatus = { - ok: boolean; - error: string; -}; -export type PushResult = { - ok: boolean; - error: string | null; - refs: { - [x: string]: RefUpdateStatus; - }; - headers?: { - [x: string]: string; - }; -}; -export type HeadStatus = 0 | 1; -export type WorkdirStatus = 0 | 1 | 2; -export type StageStatus = 0 | 1 | 2 | 3; -export type StatusRow = [string, 0 | 1, 0 | 1 | 2, 0 | 1 | 2 | 3]; -export type types = number; -declare namespace index { - export { Errors }; - export { STAGE }; - export { TREE }; - export { WORKDIR }; - export { add }; - export { addNote }; - export { addRemote }; - export { annotatedTag }; - export { branch }; - export { checkout }; - export { clone }; - export { commit }; - export { getConfig }; - export { getConfigAll }; - export { setConfig }; - export { currentBranch }; - export { deleteBranch }; - export { deleteRef }; - export { deleteRemote }; - export { deleteTag }; - export { expandOid }; - export { expandRef }; - export { fastForward }; - export { fetch }; - export { findMergeBase }; - export { findRoot }; - export { getRemoteInfo }; - export { getRemoteInfo2 }; - export { hashBlob }; - export { indexPack }; - export { init }; - export { isDescendent }; - export { listBranches }; - export { listFiles }; - export { listNotes }; - export { listRemotes }; - export { listServerRefs }; - export { listTags }; - export { log }; - export { merge }; - export { packObjects }; - export { pull }; - export { push }; - export { readBlob }; - export { readCommit }; - export { readNote }; - export { readObject }; - export { readTag }; - export { readTree }; - export { remove }; - export { removeNote }; - export { renameBranch }; - export { resetIndex }; - export { resolveRef }; - export { status }; - export { statusMatrix }; - export { tag }; - export { version }; - export { walk }; - export { writeBlob }; - export { writeCommit }; - export { writeObject }; - export { writeRef }; - export { writeTag }; - export { writeTree }; -} -export var Errors: Readonly<{ - __proto__: null; - AlreadyExistsError: typeof AlreadyExistsError; - AmbiguousError: typeof AmbiguousError; - CheckoutConflictError: typeof CheckoutConflictError; - CommitNotFetchedError: typeof CommitNotFetchedError; - EmptyServerResponseError: typeof EmptyServerResponseError; - FastForwardError: typeof FastForwardError; - GitPushError: typeof GitPushError; - HttpError: typeof HttpError; - InternalError: typeof InternalError; - InvalidFilepathError: typeof InvalidFilepathError; - InvalidOidError: typeof InvalidOidError; - InvalidRefNameError: typeof InvalidRefNameError; - MaxDepthError: typeof MaxDepthError; - MergeNotSupportedError: typeof MergeNotSupportedError; - MissingNameError: typeof MissingNameError; - MissingParameterError: typeof MissingParameterError; - NoRefspecError: typeof NoRefspecError; - NotFoundError: typeof NotFoundError; - ObjectTypeError: typeof ObjectTypeError; - ParseError: typeof ParseError; - PushRejectedError: typeof PushRejectedError; - RemoteCapabilityError: typeof RemoteCapabilityError; - SmartHttpError: typeof SmartHttpError; - UnknownTransportError: typeof UnknownTransportError; - UnsafeFilepathError: typeof UnsafeFilepathError; - UrlParseError: typeof UrlParseError; - UserCanceledError: typeof UserCanceledError; -}>; -/** - * @returns {Walker} - */ -export function STAGE(): Walker; -/** - * @param {object} args - * @param {string} [args.ref='HEAD'] - * @returns {Walker} - */ -export function TREE({ ref }: { - ref?: string; -}): Walker; -/** - * @returns {Walker} - */ -export function WORKDIR(): Walker; -/** - * Add a file to the git index (aka staging area) - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the file to add to the index - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully once the git index has been updated - * - * @example - * await fs.promises.writeFile('/tutorial/README.md', `# TEST`) - * await git.add({ fs, dir: '/tutorial', filepath: 'README.md' }) - * console.log('done') - * - */ -export function add({ fs: _fs, dir, gitdir, filepath, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir: string; - gitdir?: string; - filepath: string; - cache?: any; -}): Promise<void>; -/** - * Add or update an object note - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - The notes ref to look under - * @param {string} args.oid - The SHA-1 object id of the object to add the note to. - * @param {string|Uint8Array} args.note - The note to add - * @param {boolean} [args.force] - Over-write note if it already exists. - * @param {Object} [args.author] - The details about the author. - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer = author] - The details about the note committer, in the same format as the author parameter. If not specified, the author details are used. - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - Sign the note commit using this private PGP key. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the commit object for the added note. - */ -export function addNote({ fs: _fs, onSign, dir, gitdir, ref, oid, note, force, author: _author, committer: _committer, signingKey, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - onSign?: SignCallback; - dir?: string; - gitdir?: string; - ref?: string; - oid: string; - note: string | Uint8Array; - force?: boolean; - author?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - committer?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - signingKey?: string; - cache?: any; -}): Promise<string>; -/** - * Add or update a remote - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.remote - The name of the remote - * @param {string} args.url - The URL of the remote - * @param {boolean} [args.force = false] - Instead of throwing an error if a remote named `remote` already exists, overwrite the existing remote. - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.addRemote({ - * fs, - * dir: '/tutorial', - * remote: 'upstream', - * url: 'https://github.com/isomorphic-git/isomorphic-git' - * }) - * console.log('done') - * - */ -export function addRemote({ fs, dir, gitdir, remote, url, force, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - remote: string; - url: string; - force?: boolean; -}): Promise<void>; -/** - * Create an annotated tag. - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - What to name the tag - * @param {string} [args.message = ref] - The tag message to use. - * @param {string} [args.object = 'HEAD'] - The SHA-1 object id the tag points to. (Will resolve to a SHA-1 object id if value is a ref.) By default, the commit object which is referred by the current `HEAD` is used. - * @param {object} [args.tagger] - The details about the tagger. - * @param {string} [args.tagger.name] - Default is `user.name` config. - * @param {string} [args.tagger.email] - Default is `user.email` config. - * @param {number} [args.tagger.timestamp=Math.floor(Date.now()/1000)] - Set the tagger timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.tagger.timezoneOffset] - Set the tagger timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.gpgsig] - The gpgsig attatched to the tag object. (Mutually exclusive with the `signingKey` option.) - * @param {string} [args.signingKey] - Sign the tag object using this private PGP key. (Mutually exclusive with the `gpgsig` option.) - * @param {boolean} [args.force = false] - Instead of throwing an error if a tag named `ref` already exists, overwrite the existing tag. Note that this option does not modify the original tag object itself. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.annotatedTag({ - * fs, - * dir: '/tutorial', - * ref: 'test-tag', - * message: 'This commit is awesome', - * tagger: { - * name: 'Mr. Test', - * email: 'mrtest@example.com' - * } - * }) - * console.log('done') - * - */ -export function annotatedTag({ fs: _fs, onSign, dir, gitdir, ref, tagger: _tagger, message, gpgsig, object, signingKey, force, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - onSign?: SignCallback; - dir?: string; - gitdir?: string; - ref: string; - message?: string; - object?: string; - tagger?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - gpgsig?: string; - signingKey?: string; - force?: boolean; - cache?: any; -}): Promise<void>; -/** - * Create a branch - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - What to name the branch - * @param {boolean} [args.checkout = false] - Update `HEAD` to point at the newly created branch - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.branch({ fs, dir: '/tutorial', ref: 'develop' }) - * console.log('done') - * - */ -export function branch({ fs, dir, gitdir, ref, checkout, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; - checkout?: boolean; -}): Promise<void>; -/** - * Checkout a branch - * - * If the branch already exists it will check out that branch. Otherwise, it will create a new remote tracking branch set to track the remote branch of that name. - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref = 'HEAD'] - Source to checkout files from - * @param {string[]} [args.filepaths] - Limit the checkout to the given files and directories - * @param {string} [args.remote = 'origin'] - Which remote repository to use - * @param {boolean} [args.noCheckout = false] - If true, will update HEAD but won't update the working directory - * @param {boolean} [args.noUpdateHead] - If true, will update the working directory but won't update HEAD. Defaults to `false` when `ref` is provided, and `true` if `ref` is not provided. - * @param {boolean} [args.dryRun = false] - If true, simulates a checkout so you can test whether it would succeed. - * @param {boolean} [args.force = false] - If true, conflicts will be ignored and files will be overwritten regardless of local changes. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * // switch to the main branch - * await git.checkout({ - * fs, - * dir: '/tutorial', - * ref: 'main' - * }) - * console.log('done') - * - * @example - * // restore the 'docs' and 'src/docs' folders to the way they were, overwriting any changes - * await git.checkout({ - * fs, - * dir: '/tutorial', - * force: true, - * filepaths: ['docs', 'src/docs'] - * }) - * console.log('done') - * - * @example - * // restore the 'docs' and 'src/docs' folders to the way they are in the 'develop' branch, overwriting any changes - * await git.checkout({ - * fs, - * dir: '/tutorial', - * ref: 'develop', - * noUpdateHead: true, - * force: true, - * filepaths: ['docs', 'src/docs'] - * }) - * console.log('done') - */ -export function checkout({ fs, onProgress, dir, gitdir, remote, ref: _ref, filepaths, noCheckout, noUpdateHead, dryRun, force, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - onProgress?: ProgressCallback; - dir: string; - gitdir?: string; - ref?: string; - filepaths?: string[]; - remote?: string; - noCheckout?: boolean; - noUpdateHead?: boolean; - dryRun?: boolean; - force?: boolean; - cache?: any; -}): Promise<void>; -/** - * Clone a repository - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.url - The URL of the remote repository - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Value is stored in the git config file for that repo. - * @param {string} [args.ref] - Which branch to checkout. By default this is the designated "main branch" of the repository. - * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch. - * @param {boolean} [args.noCheckout = false] - If true, clone will only fetch the repo, not check out a branch. Skipping checkout can save a lot of time normally spent writing files to disk. - * @param {boolean} [args.noTags = false] - By default clone will fetch all tags. `noTags` disables that behavior. - * @param {string} [args.remote = 'origin'] - What to name the remote that is created. - * @param {number} [args.depth] - Integer. Determines how much of the git repository's history to retrieve - * @param {Date} [args.since] - Only fetch commits created after the given date. Mutually exclusive with `depth`. - * @param {string[]} [args.exclude = []] - A list of branches or tags. Instructs the remote server not to send us any commits reachable from these refs. - * @param {boolean} [args.relative = false] - Changes the meaning of `depth` to be measured from the current shallow depth rather than from the branch tip. - * @param {Object<string, string>} [args.headers = {}] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when clone completes - * - * @example - * await git.clone({ - * fs, - * http, - * dir: '/tutorial', - * corsProxy: 'https://cors.isomorphic-git.org', - * url: 'https://github.com/isomorphic-git/isomorphic-git', - * singleBranch: true, - * depth: 1 - * }) - * console.log('done') - * - */ -export function clone({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, url, corsProxy, ref, remote, depth, since, exclude, relative, singleBranch, noCheckout, noTags, headers, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - http: HttpClient; - onProgress?: ProgressCallback; - onMessage?: MessageCallback; - onAuth?: AuthCallback; - onAuthFailure?: AuthFailureCallback; - onAuthSuccess?: AuthSuccessCallback; - dir: string; - gitdir?: string; - url: string; - corsProxy?: string; - ref?: string; - singleBranch?: boolean; - noCheckout?: boolean; - noTags?: boolean; - remote?: string; - depth?: number; - since?: Date; - exclude?: string[]; - relative?: boolean; - headers?: { - [x: string]: string; - }; - cache?: any; -}): Promise<void>; -/** - * Create a new commit - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.message - The commit message to use. - * @param {Object} [args.author] - The details about the author. - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer = author] - The details about the commit committer, in the same format as the author parameter. If not specified, the author details are used. - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - Sign the tag object using this private PGP key. - * @param {boolean} [args.dryRun = false] - If true, simulates making a commit so you can test whether it would succeed. Implies `noUpdateBranch`. - * @param {boolean} [args.noUpdateBranch = false] - If true, does not update the branch pointer after creating the commit. - * @param {string} [args.ref] - The fully expanded name of the branch to commit to. Default is the current branch pointed to by HEAD. (TODO: fix it so it can expand branch names without throwing if the branch doesn't exist yet.) - * @param {string[]} [args.parent] - The SHA-1 object ids of the commits to use as parents. If not specified, the commit pointed to by `ref` is used. - * @param {string} [args.tree] - The SHA-1 object id of the tree to use. If not specified, a new tree object is created from the current git index. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly created commit. - * - * @example - * let sha = await git.commit({ - * fs, - * dir: '/tutorial', - * author: { - * name: 'Mr. Test', - * email: 'mrtest@example.com', - * }, - * message: 'Added the a.txt file' - * }) - * console.log(sha) - * - */ -export function commit({ fs: _fs, onSign, dir, gitdir, message, author: _author, committer: _committer, signingKey, dryRun, noUpdateBranch, ref, parent, tree, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - onSign?: SignCallback; - dir?: string; - gitdir?: string; - message: string; - author?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - committer?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - signingKey?: string; - dryRun?: boolean; - noUpdateBranch?: boolean; - ref?: string; - parent?: string[]; - tree?: string; - cache?: any; -}): Promise<string>; -/** - * Get the name of the branch currently pointed to by .git/HEAD - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {boolean} [args.fullname = false] - Return the full path (e.g. "refs/heads/main") instead of the abbreviated form. - * @param {boolean} [args.test = false] - If the current branch doesn't actually exist (such as right after git init) then return `undefined`. - * - * @returns {Promise<string|void>} The name of the current branch or undefined if the HEAD is detached. - * - * @example - * // Get the current branch name - * let branch = await git.currentBranch({ - * fs, - * dir: '/tutorial', - * fullname: false - * }) - * console.log(branch) - * - */ -export function currentBranch({ fs, dir, gitdir, fullname, test, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - fullname?: boolean; - test?: boolean; -}): Promise<string | void>; -/** - * Delete a local branch - * - * > Note: This only deletes loose branches - it should be fixed in the future to delete packed branches as well. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The branch to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteBranch({ fs, dir: '/tutorial', ref: 'local-branch' }) - * console.log('done') - * - */ -export function deleteBranch({ fs, dir, gitdir, ref, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; -}): Promise<void>; -/** - * Delete a local ref - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The ref to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteRef({ fs, dir: '/tutorial', ref: 'refs/tags/test-tag' }) - * console.log('done') - * - */ -export function deleteRef({ fs, dir, gitdir, ref }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; -}): Promise<void>; -/** - * Removes the local config entry for a given remote - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.remote - The name of the remote to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteRemote({ fs, dir: '/tutorial', remote: 'upstream' }) - * console.log('done') - * - */ -export function deleteRemote({ fs, dir, gitdir, remote, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - remote: string; -}): Promise<void>; -/** - * Delete a local tag ref - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The tag to delete - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.deleteTag({ fs, dir: '/tutorial', ref: 'test-tag' }) - * console.log('done') - * - */ -export function deleteTag({ fs, dir, gitdir, ref }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; -}): Promise<void>; -/** - * Expand and resolve a short oid into a full oid - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The shortened oid prefix to expand (like "0414d2a") - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<string>} Resolves successfully with the full oid (like "0414d2a286d7bbc7a4a326a61c1f9f888a8ab87f") - * - * @example - * let oid = await git.expandOid({ fs, dir: '/tutorial', oid: '0414d2a'}) - * console.log(oid) - * - */ -export function expandOid({ fs, dir, gitdir, oid, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oid: string; - cache?: any; -}): Promise<string>; -/** - * Expand an abbreviated ref to its full name - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The ref to expand (like "v1.0.0") - * - * @returns {Promise<string>} Resolves successfully with a full ref name ("refs/tags/v1.0.0") - * - * @example - * let fullRef = await git.expandRef({ fs, dir: '/tutorial', ref: 'main'}) - * console.log(fullRef) - * - */ -export function expandRef({ fs, dir, gitdir, ref }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; -}): Promise<string>; -/** - * Like `pull`, but hard-coded with `fastForward: true` so there is no need for an `author` parameter. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - Which branch to merge into. By default this is the currently checked out branch. - * @param {string} [args.url] - (Added in 1.1.0) The URL of the remote repository. The default is the value set in the git config for that remote. - * @param {string} [args.remote] - (Added in 1.1.0) If URL is not specified, determines which remote to use. - * @param {string} [args.remoteRef] - (Added in 1.1.0) The name of the branch on the remote to fetch. By default this is the configured remote tracking branch. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when pull operation completes - * - * @example - * await git.fastForward({ - * fs, - * http, - * dir: '/tutorial', - * ref: 'main', - * singleBranch: true - * }) - * console.log('done') - * - */ -export function fastForward({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, url, remote, remoteRef, corsProxy, singleBranch, headers, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - http: HttpClient; - onProgress?: ProgressCallback; - onMessage?: MessageCallback; - onAuth?: AuthCallback; - onAuthFailure?: AuthFailureCallback; - onAuthSuccess?: AuthSuccessCallback; - dir: string; - gitdir?: string; - ref?: string; - url?: string; - remote?: string; - remoteRef?: string; - corsProxy?: string; - singleBranch?: boolean; - headers?: { - [x: string]: string; - }; - cache?: any; -}): Promise<void>; -/** - * - * @typedef {object} FetchResult - The object returned has the following schema: - * @property {string | null} defaultBranch - The branch that is cloned if no branch is specified - * @property {string | null} fetchHead - The SHA-1 object id of the fetched head commit - * @property {string | null} fetchHeadDescription - a textual description of the branch that was fetched - * @property {Object<string, string>} [headers] - The HTTP response headers returned by the git server - * @property {string[]} [pruned] - A list of branches that were pruned, if you provided the `prune` parameter - * - */ -/** - * Fetch commits from a remote repository - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.url] - The URL of the remote repository. The default is the value set in the git config for that remote. - * @param {string} [args.remote] - If URL is not specified, determines which remote to use. - * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch. - * @param {string} [args.ref] - Which branch to fetch if `singleBranch` is true. By default this is the current branch or the remote's default branch. - * @param {string} [args.remoteRef] - The name of the branch on the remote to fetch if `singleBranch` is true. By default this is the configured remote tracking branch. - * @param {boolean} [args.tags = false] - Also fetch tags - * @param {number} [args.depth] - Integer. Determines how much of the git repository's history to retrieve - * @param {boolean} [args.relative = false] - Changes the meaning of `depth` to be measured from the current shallow depth rather than from the branch tip. - * @param {Date} [args.since] - Only fetch commits created after the given date. Mutually exclusive with `depth`. - * @param {string[]} [args.exclude = []] - A list of branches or tags. Instructs the remote server not to send us any commits reachable from these refs. - * @param {boolean} [args.prune] - Delete local remote-tracking branches that are not present on the remote - * @param {boolean} [args.pruneTags] - Prune local tags that don’t exist on the remote, and force-update those tags that differ - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<FetchResult>} Resolves successfully when fetch completes - * @see FetchResult - * - * @example - * let result = await git.fetch({ - * fs, - * http, - * dir: '/tutorial', - * corsProxy: 'https://cors.isomorphic-git.org', - * url: 'https://github.com/isomorphic-git/isomorphic-git', - * ref: 'main', - * depth: 1, - * singleBranch: true, - * tags: false - * }) - * console.log(result) - * - */ -export function fetch({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, remote, remoteRef, url, corsProxy, depth, since, exclude, relative, tags, singleBranch, headers, prune, pruneTags, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - http: HttpClient; - onProgress?: ProgressCallback; - onMessage?: MessageCallback; - onAuth?: AuthCallback; - onAuthFailure?: AuthFailureCallback; - onAuthSuccess?: AuthSuccessCallback; - dir?: string; - gitdir?: string; - url?: string; - remote?: string; - singleBranch?: boolean; - ref?: string; - remoteRef?: string; - tags?: boolean; - depth?: number; - relative?: boolean; - since?: Date; - exclude?: string[]; - prune?: boolean; - pruneTags?: boolean; - corsProxy?: string; - headers?: { - [x: string]: string; - }; - cache?: any; -}): Promise<FetchResult>; -/** - * Find the merge base for a set of commits - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string[]} args.oids - Which commits - * @param {object} [args.cache] - a [cache](cache.md) object - * - */ -export function findMergeBase({ fs, dir, gitdir, oids, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oids: string[]; - cache?: any; -}): Promise<any[]>; -/** - * Find the root git directory - * - * Starting at `filepath`, walks upward until it finds a directory that contains a subdirectory called '.git'. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system client - * @param {string} args.filepath - The file directory to start searching in. - * - * @returns {Promise<string>} Resolves successfully with a root git directory path - * @throws {NotFoundError} - * - * @example - * let gitroot = await git.findRoot({ - * fs, - * filepath: '/tutorial/src/utils' - * }) - * console.log(gitroot) - * - */ -export function findRoot({ fs, filepath }: { - fs: CallbackFsClient | PromiseFsClient; - filepath: string; -}): Promise<string>; -/** - * Read an entry from the git config files. - * - * *Caveats:* - * - Currently only the local `$GIT_DIR/config` file can be read or written. However support for the global `~/.gitconfig` and system `$(prefix)/etc/gitconfig` will be added in the future. - * - The current parser does not support the more exotic features of the git-config file format such as `[include]` and `[includeIf]`. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.path - The key of the git config entry - * - * @returns {Promise<any>} Resolves with the config value - * - * @example - * // Read config value - * let value = await git.getConfig({ - * fs, - * dir: '/tutorial', - * path: 'remote.origin.url' - * }) - * console.log(value) - * - */ -export function getConfig({ fs, dir, gitdir, path }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - path: string; -}): Promise<any>; -/** - * Read a multi-valued entry from the git config files. - * - * *Caveats:* - * - Currently only the local `$GIT_DIR/config` file can be read or written. However support for the global `~/.gitconfig` and system `$(prefix)/etc/gitconfig` will be added in the future. - * - The current parser does not support the more exotic features of the git-config file format such as `[include]` and `[includeIf]`. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.path - The key of the git config entry - * - * @returns {Promise<Array<any>>} Resolves with the config value - * - */ -export function getConfigAll({ fs, dir, gitdir, path, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - path: string; -}): Promise<any[]>; -/** - * - * @typedef {Object} GetRemoteInfoResult - The object returned has the following schema: - * @property {string[]} capabilities - The list of capabilities returned by the server (part of the Git protocol) - * @property {Object} [refs] - * @property {string} [HEAD] - The default branch of the remote - * @property {Object<string, string>} [refs.heads] - The branches on the remote - * @property {Object<string, string>} [refs.pull] - The special branches representing pull requests (non-standard) - * @property {Object<string, string>} [refs.tags] - The tags on the remote - * - */ -/** - * List a remote servers branches, tags, and capabilities. - * - * This is a rare command that doesn't require an `fs`, `dir`, or even `gitdir` argument. - * It just communicates to a remote git server, using the first step of the `git-upload-pack` handshake, but stopping short of fetching the packfile. - * - * @param {object} args - * @param {HttpClient} args.http - an HTTP client - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.url - The URL of the remote repository. Will be gotten from gitconfig if absent. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.forPush = false] - By default, the command queries the 'fetch' capabilities. If true, it will ask for the 'push' capabilities. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * - * @returns {Promise<GetRemoteInfoResult>} Resolves successfully with an object listing the branches, tags, and capabilities of the remote. - * @see GetRemoteInfoResult - * - * @example - * let info = await git.getRemoteInfo({ - * http, - * url: - * "https://cors.isomorphic-git.org/github.com/isomorphic-git/isomorphic-git.git" - * }); - * console.log(info); - * - */ -export function getRemoteInfo({ http, onAuth, onAuthSuccess, onAuthFailure, corsProxy, url, headers, forPush, }: { - http: HttpClient; - onAuth?: AuthCallback; - onAuthFailure?: AuthFailureCallback; - onAuthSuccess?: AuthSuccessCallback; - url: string; - corsProxy?: string; - forPush?: boolean; - headers?: { - [x: string]: string; - }; -}): Promise<GetRemoteInfoResult>; -/** - * @typedef {Object} GetRemoteInfo2Result - This object has the following schema: - * @property {1 | 2} protocolVersion - Git protocol version the server supports - * @property {Object<string, string | true>} capabilities - An object of capabilities represented as keys and values - * @property {ServerRef[]} [refs] - Server refs (they get returned by protocol version 1 whether you want them or not) - */ -/** - * List a remote server's capabilities. - * - * This is a rare command that doesn't require an `fs`, `dir`, or even `gitdir` argument. - * It just communicates to a remote git server, determining what protocol version, commands, and features it supports. - * - * > The successor to [`getRemoteInfo`](./getRemoteInfo.md), this command supports Git Wire Protocol Version 2. - * > Therefore its return type is more complicated as either: - * > - * > - v1 capabilities (and refs) or - * > - v2 capabilities (and no refs) - * > - * > are returned. - * > If you just care about refs, use [`listServerRefs`](./listServerRefs.md) - * - * @param {object} args - * @param {HttpClient} args.http - an HTTP client - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.url - The URL of the remote repository. Will be gotten from gitconfig if absent. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.forPush = false] - By default, the command queries the 'fetch' capabilities. If true, it will ask for the 'push' capabilities. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {1 | 2} [args.protocolVersion = 2] - Which version of the Git Protocol to use. - * - * @returns {Promise<GetRemoteInfo2Result>} Resolves successfully with an object listing the capabilities of the remote. - * @see GetRemoteInfo2Result - * @see ServerRef - * - * @example - * let info = await git.getRemoteInfo2({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git" - * }); - * console.log(info); - * - */ -export function getRemoteInfo2({ http, onAuth, onAuthSuccess, onAuthFailure, corsProxy, url, headers, forPush, protocolVersion, }: { - http: HttpClient; - onAuth?: AuthCallback; - onAuthFailure?: AuthFailureCallback; - onAuthSuccess?: AuthSuccessCallback; - url: string; - corsProxy?: string; - forPush?: boolean; - headers?: { - [x: string]: string; - }; - protocolVersion?: 1 | 2; -}): Promise<GetRemoteInfo2Result>; -/** - * - * @typedef {object} HashBlobResult - The object returned has the following schema: - * @property {string} oid - The SHA-1 object id - * @property {'blob'} type - The type of the object - * @property {Uint8Array} object - The wrapped git object (the thing that is hashed) - * @property {'wrapped'} format - The format of the object - * - */ -/** - * Compute what the SHA-1 object id of a file would be - * - * @param {object} args - * @param {Uint8Array|string} args.object - The object to write. If `object` is a String then it will be converted to a Uint8Array using UTF-8 encoding. - * - * @returns {Promise<HashBlobResult>} Resolves successfully with the SHA-1 object id and the wrapped object Uint8Array. - * @see HashBlobResult - * - * @example - * let { oid, type, object, format } = await git.hashBlob({ - * object: 'Hello world!', - * }) - * - * console.log('oid', oid) - * console.log('type', type) - * console.log('object', object) - * console.log('format', format) - * - */ -export function hashBlob({ object }: { - object: string | Uint8Array; -}): Promise<HashBlobResult>; -/** - * Create the .idx file for a given .pack file - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the .pack file to index - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<{oids: string[]}>} Resolves with a list of the SHA-1 object ids contained in the packfile - * - * @example - * let packfiles = await fs.promises.readdir('/tutorial/.git/objects/pack') - * packfiles = packfiles.filter(name => name.endsWith('.pack')) - * console.log('packfiles', packfiles) - * - * const { oids } = await git.indexPack({ - * fs, - * dir: '/tutorial', - * filepath: `.git/objects/pack/${packfiles[0]}`, - * async onProgress (evt) { - * console.log(`${evt.phase}: ${evt.loaded} / ${evt.total}`) - * } - * }) - * console.log(oids) - * - */ -export function indexPack({ fs, onProgress, dir, gitdir, filepath, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - onProgress?: ProgressCallback; - dir: string; - gitdir?: string; - filepath: string; - cache?: any; -}): Promise<{ - oids: string[]; -}>; -/** - * Initialize a new repository - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {boolean} [args.bare = false] - Initialize a bare repository - * @param {string} [args.defaultBranch = 'master'] - The name of the default branch (might be changed to a required argument in 2.0.0) - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.init({ fs, dir: '/tutorial' }) - * console.log('done') - * - */ -export function init({ fs, bare, dir, gitdir, defaultBranch, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - bare?: boolean; - defaultBranch?: string; -}): Promise<void>; -/** - * Check whether a git commit is descended from another - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The descendent commit - * @param {string} args.ancestor - The (proposed) ancestor commit - * @param {number} [args.depth = -1] - Maximum depth to search before giving up. -1 means no maximum depth. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<boolean>} Resolves to true if `oid` is a descendent of `ancestor` - * - * @example - * let oid = await git.resolveRef({ fs, dir: '/tutorial', ref: 'main' }) - * let ancestor = await git.resolveRef({ fs, dir: '/tutorial', ref: 'v0.20.0' }) - * console.log(oid, ancestor) - * await git.isDescendent({ fs, dir: '/tutorial', oid, ancestor, depth: -1 }) - * - */ -export function isDescendent({ fs, dir, gitdir, oid, ancestor, depth, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oid: string; - ancestor: string; - depth?: number; - cache?: any; -}): Promise<boolean>; -/** - * List branches - * - * By default it lists local branches. If a 'remote' is specified, it lists the remote's branches. When listing remote branches, the HEAD branch is not filtered out, so it may be included in the list of results. - * - * Note that specifying a remote does not actually contact the server and update the list of branches. - * If you want an up-to-date list, first do a `fetch` to that remote. - * (Which branch you fetch doesn't matter - the list of branches available on the remote is updated during the fetch handshake.) - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.remote] - Instead of the branches in `refs/heads`, list the branches in `refs/remotes/${remote}`. - * - * @returns {Promise<Array<string>>} Resolves successfully with an array of branch names - * - * @example - * let branches = await git.listBranches({ fs, dir: '/tutorial' }) - * console.log(branches) - * let remoteBranches = await git.listBranches({ fs, dir: '/tutorial', remote: 'origin' }) - * console.log(remoteBranches) - * - */ -export function listBranches({ fs, dir, gitdir, remote, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - remote?: string; -}): Promise<string[]>; -/** - * List all the files in the git index or a commit - * - * > Note: This function is efficient for listing the files in the staging area, but listing all the files in a commit requires recursively walking through the git object store. - * > If you do not require a complete list of every file, better performance can be achieved by using [walk](./walk) and ignoring subdirectories you don't care about. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - Return a list of all the files in the commit at `ref` instead of the files currently in the git index (aka staging area) - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Array<string>>} Resolves successfully with an array of filepaths - * - * @example - * // All the files in the previous commit - * let files = await git.listFiles({ fs, dir: '/tutorial', ref: 'HEAD' }) - * console.log(files) - * // All the files in the current staging area - * files = await git.listFiles({ fs, dir: '/tutorial' }) - * console.log(files) - * - */ -export function listFiles({ fs, dir, gitdir, ref, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref?: string; - cache?: any; -}): Promise<string[]>; -/** - * List all the object notes - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - The notes ref to look under - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Array<{target: string, note: string}>>} Resolves successfully with an array of entries containing SHA-1 object ids of the note and the object the note targets - */ -export function listNotes({ fs, dir, gitdir, ref, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref?: string; - cache?: any; -}): Promise<{ - target: string; - note: string; -}[]>; -/** - * List remotes - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * - * @returns {Promise<Array<{remote: string, url: string}>>} Resolves successfully with an array of `{remote, url}` objects - * - * @example - * let remotes = await git.listRemotes({ fs, dir: '/tutorial' }) - * console.log(remotes) - * - */ -export function listRemotes({ fs, dir, gitdir }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; -}): Promise<{ - remote: string; - url: string; -}[]>; -/** - * Fetch a list of refs (branches, tags, etc) from a server. - * - * This is a rare command that doesn't require an `fs`, `dir`, or even `gitdir` argument. - * It just requires an `http` argument. - * - * ### About `protocolVersion` - * - * There's a rather fun trade-off between Git Protocol Version 1 and Git Protocol Version 2. - * Version 2 actually requires 2 HTTP requests instead of 1, making it similar to fetch or push in that regard. - * However, version 2 supports server-side filtering by prefix, whereas that filtering is done client-side in version 1. - * Which protocol is most efficient therefore depends on the number of refs on the remote, the latency of the server, and speed of the network connection. - * For an small repos (or fast Internet connections), the requirement to make two trips to the server makes protocol 2 slower. - * But for large repos (or slow Internet connections), the decreased payload size of the second request makes up for the additional request. - * - * Hard numbers vary by situation, but here's some numbers from my machine: - * - * Using isomorphic-git in a browser, with a CORS proxy, listing only the branches (refs/heads) of https://github.com/isomorphic-git/isomorphic-git - * - Protocol Version 1 took ~300ms and transfered 84 KB. - * - Protocol Version 2 took ~500ms and transfered 4.1 KB. - * - * Using isomorphic-git in a browser, with a CORS proxy, listing only the branches (refs/heads) of https://gitlab.com/gitlab-org/gitlab - * - Protocol Version 1 took ~4900ms and transfered 9.41 MB. - * - Protocol Version 2 took ~1280ms and transfered 433 KB. - * - * Finally, there is a fun quirk regarding the `symrefs` parameter. - * Protocol Version 1 will generally only return the `HEAD` symref and not others. - * Historically, this meant that servers don't use symbolic refs except for `HEAD`, which is used to point at the "default branch". - * However Protocol Version 2 can return *all* the symbolic refs on the server. - * So if you are running your own git server, you could take advantage of that I guess. - * - * #### TL;DR - * If you are _not_ taking advantage of `prefix` I would recommend `protocolVersion: 1`. - * Otherwise, I recommend to use the default which is `protocolVersion: 2`. - * - * @param {object} args - * @param {HttpClient} args.http - an HTTP client - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.url - The URL of the remote repository. Will be gotten from gitconfig if absent. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.forPush = false] - By default, the command queries the 'fetch' capabilities. If true, it will ask for the 'push' capabilities. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {1 | 2} [args.protocolVersion = 2] - Which version of the Git Protocol to use. - * @param {string} [args.prefix] - Only list refs that start with this prefix - * @param {boolean} [args.symrefs = false] - Include symbolic ref targets - * @param {boolean} [args.peelTags = false] - Include annotated tag peeled targets - * - * @returns {Promise<ServerRef[]>} Resolves successfully with an array of ServerRef objects - * @see ServerRef - * - * @example - * // List all the branches on a repo - * let refs = await git.listServerRefs({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git", - * prefix: "refs/heads/", - * }); - * console.log(refs); - * - * @example - * // Get the default branch on a repo - * let refs = await git.listServerRefs({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git", - * prefix: "HEAD", - * symrefs: true, - * }); - * console.log(refs); - * - * @example - * // List all the tags on a repo - * let refs = await git.listServerRefs({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git", - * prefix: "refs/tags/", - * peelTags: true, - * }); - * console.log(refs); - * - * @example - * // List all the pull requests on a repo - * let refs = await git.listServerRefs({ - * http, - * corsProxy: "https://cors.isomorphic-git.org", - * url: "https://github.com/isomorphic-git/isomorphic-git.git", - * prefix: "refs/pull/", - * }); - * console.log(refs); - * - */ -export function listServerRefs({ http, onAuth, onAuthSuccess, onAuthFailure, corsProxy, url, headers, forPush, protocolVersion, prefix, symrefs, peelTags, }: { - http: HttpClient; - onAuth?: AuthCallback; - onAuthFailure?: AuthFailureCallback; - onAuthSuccess?: AuthSuccessCallback; - url: string; - corsProxy?: string; - forPush?: boolean; - headers?: { - [x: string]: string; - }; - protocolVersion?: 1 | 2; - prefix?: string; - symrefs?: boolean; - peelTags?: boolean; -}): Promise<ServerRef[]>; -/** - * List tags - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * - * @returns {Promise<Array<string>>} Resolves successfully with an array of tag names - * - * @example - * let tags = await git.listTags({ fs, dir: '/tutorial' }) - * console.log(tags) - * - */ -export function listTags({ fs, dir, gitdir }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; -}): Promise<string[]>; -/** - * Get commit descriptions from the git history - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref = 'HEAD'] - The commit to begin walking backwards through the history from - * @param {number} [args.depth] - Limit the number of commits returned. No limit by default. - * @param {Date} [args.since] - Return history newer than the given date. Can be combined with `depth` to get whichever is shorter. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Array<ReadCommitResult>>} Resolves to an array of ReadCommitResult objects - * @see ReadCommitResult - * @see CommitObject - * - * @example - * let commits = await git.log({ - * fs, - * dir: '/tutorial', - * depth: 5, - * ref: 'main' - * }) - * console.log(commits) - * - */ -export function log({ fs, dir, gitdir, ref, depth, since, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref?: string; - depth?: number; - since?: Date; - cache?: any; -}): Promise<ReadCommitResult[]>; -/** - * - * @typedef {Object} MergeResult - Returns an object with a schema like this: - * @property {string} [oid] - The SHA-1 object id that is now at the head of the branch. Absent only if `dryRun` was specified and `mergeCommit` is true. - * @property {boolean} [alreadyMerged] - True if the branch was already merged so no changes were made - * @property {boolean} [fastForward] - True if it was a fast-forward merge - * @property {boolean} [mergeCommit] - True if merge resulted in a merge commit - * @property {string} [tree] - The SHA-1 object id of the tree resulting from a merge commit - * - */ -/** - * Merge two branches - * - * ## Limitations - * - * Currently it does not support incomplete merges. That is, if there are merge conflicts it cannot solve - * with the built in diff3 algorithm it will not modify the working dir, and will throw a [`MergeNotSupportedError`](./errors.md#mergenotsupportedError) error. - * - * Currently it will fail if multiple candidate merge bases are found. (It doesn't yet implement the recursive merge strategy.) - * - * Currently it does not support selecting alternative merge strategies. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ours] - The branch receiving the merge. If undefined, defaults to the current branch. - * @param {string} args.theirs - The branch to be merged - * @param {boolean} [args.fastForwardOnly = false] - If true, then non-fast-forward merges will throw an Error instead of performing a merge. - * @param {boolean} [args.dryRun = false] - If true, simulates a merge so you can test whether it would succeed. - * @param {boolean} [args.noUpdateBranch = false] - If true, does not update the branch pointer after creating the commit. - * @param {string} [args.message] - Overrides the default auto-generated merge commit message - * @param {Object} [args.author] - passed to [commit](commit.md) when creating a merge commit - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer] - passed to [commit](commit.md) when creating a merge commit - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - passed to [commit](commit.md) when creating a merge commit - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<MergeResult>} Resolves to a description of the merge operation - * @see MergeResult - * - * @example - * let m = await git.merge({ - * fs, - * dir: '/tutorial', - * ours: 'main', - * theirs: 'remotes/origin/main' - * }) - * console.log(m) - * - */ -export function merge({ fs: _fs, onSign, dir, gitdir, ours, theirs, fastForwardOnly, dryRun, noUpdateBranch, message, author: _author, committer: _committer, signingKey, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - onSign?: SignCallback; - dir?: string; - gitdir?: string; - ours?: string; - theirs: string; - fastForwardOnly?: boolean; - dryRun?: boolean; - noUpdateBranch?: boolean; - message?: string; - author?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - committer?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - signingKey?: string; - cache?: any; -}): Promise<MergeResult>; -/** - * - * @typedef {Object} PackObjectsResult The packObjects command returns an object with two properties: - * @property {string} filename - The suggested filename for the packfile if you want to save it to disk somewhere. It includes the packfile SHA. - * @property {Uint8Array} [packfile] - The packfile contents. Not present if `write` parameter was true, in which case the packfile was written straight to disk. - */ -/** - * Create a packfile from an array of SHA-1 object ids - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string[]} args.oids - An array of SHA-1 object ids to be included in the packfile - * @param {boolean} [args.write = false] - Whether to save the packfile to disk or not - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<PackObjectsResult>} Resolves successfully when the packfile is ready with the filename and buffer - * @see PackObjectsResult - * - * @example - * // Create a packfile containing only an empty tree - * let { packfile } = await git.packObjects({ - * fs, - * dir: '/tutorial', - * oids: ['4b825dc642cb6eb9a060e54bf8d69288fbee4904'] - * }) - * console.log(packfile) - * - */ -export function packObjects({ fs, dir, gitdir, oids, write, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oids: string[]; - write?: boolean; - cache?: any; -}): Promise<PackObjectsResult>; -/** - * Fetch and merge commits from a remote repository - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - Which branch to merge into. By default this is the currently checked out branch. - * @param {string} [args.url] - (Added in 1.1.0) The URL of the remote repository. The default is the value set in the git config for that remote. - * @param {string} [args.remote] - (Added in 1.1.0) If URL is not specified, determines which remote to use. - * @param {string} [args.remoteRef] - (Added in 1.1.0) The name of the branch on the remote to fetch. By default this is the configured remote tracking branch. - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch. - * @param {boolean} [args.fastForwardOnly = false] - Only perform simple fast-forward merges. (Don't create merge commits.) - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {Object} [args.author] - The details about the author. - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer = author] - The details about the commit committer, in the same format as the author parameter. If not specified, the author details are used. - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - passed to [commit](commit.md) when creating a merge commit - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully when pull operation completes - * - * @example - * await git.pull({ - * fs, - * http, - * dir: '/tutorial', - * ref: 'main', - * singleBranch: true - * }) - * console.log('done') - * - */ -export function pull({ fs: _fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, url, remote, remoteRef, fastForwardOnly, corsProxy, singleBranch, headers, author: _author, committer: _committer, signingKey, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - http: HttpClient; - onProgress?: ProgressCallback; - onMessage?: MessageCallback; - onAuth?: AuthCallback; - onAuthFailure?: AuthFailureCallback; - onAuthSuccess?: AuthSuccessCallback; - dir: string; - gitdir?: string; - ref?: string; - url?: string; - remote?: string; - remoteRef?: string; - corsProxy?: string; - singleBranch?: boolean; - fastForwardOnly?: boolean; - headers?: { - [x: string]: string; - }; - author?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - committer?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - signingKey?: string; - cache?: any; -}): Promise<void>; -/** - * Push a branch or tag - * - * The push command returns an object that describes the result of the attempted push operation. - * *Notes:* If there were no errors, then there will be no `errors` property. There can be a mix of `ok` messages and `errors` messages. - * - * | param | type [= default] | description | - * | ------ | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | ok | Array\<string\> | The first item is "unpack" if the overall operation was successful. The remaining items are the names of refs that were updated successfully. | - * | errors | Array\<string\> | If the overall operation threw and error, the first item will be "unpack {Overall error message}". The remaining items are individual refs that failed to be updated in the format "{ref name} {error message}". | - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {HttpClient} args.http - an HTTP client - * @param {ProgressCallback} [args.onProgress] - optional progress event callback - * @param {MessageCallback} [args.onMessage] - optional message event callback - * @param {AuthCallback} [args.onAuth] - optional auth fill callback - * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback - * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - Which branch to push. By default this is the currently checked out branch. - * @param {string} [args.url] - The URL of the remote repository. The default is the value set in the git config for that remote. - * @param {string} [args.remote] - If URL is not specified, determines which remote to use. - * @param {string} [args.remoteRef] - The name of the receiving branch on the remote. By default this is the configured remote tracking branch. - * @param {boolean} [args.force = false] - If true, behaves the same as `git push --force` - * @param {boolean} [args.delete = false] - If true, delete the remote ref - * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config. - * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<PushResult>} Resolves successfully when push completes with a detailed description of the operation from the server. - * @see PushResult - * @see RefUpdateStatus - * - * @example - * let pushResult = await git.push({ - * fs, - * http, - * dir: '/tutorial', - * remote: 'origin', - * ref: 'main', - * onAuth: () => ({ username: process.env.GITHUB_TOKEN }), - * }) - * console.log(pushResult) - * - */ -export function push({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, remoteRef, remote, url, force, delete: _delete, corsProxy, headers, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - http: HttpClient; - onProgress?: ProgressCallback; - onMessage?: MessageCallback; - onAuth?: AuthCallback; - onAuthFailure?: AuthFailureCallback; - onAuthSuccess?: AuthSuccessCallback; - dir?: string; - gitdir?: string; - ref?: string; - url?: string; - remote?: string; - remoteRef?: string; - force?: boolean; - delete?: boolean; - corsProxy?: string; - headers?: { - [x: string]: string; - }; - cache?: any; -}): Promise<PushResult>; -/** - * - * @typedef {Object} ReadBlobResult - The object returned has the following schema: - * @property {string} oid - * @property {Uint8Array} blob - * - */ -/** - * Read a blob object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get. Annotated tags, commits, and trees are peeled. - * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the blob object at that filepath. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadBlobResult>} Resolves successfully with a blob object description - * @see ReadBlobResult - * - * @example - * // Get the contents of 'README.md' in the main branch. - * let commitOid = await git.resolveRef({ fs, dir: '/tutorial', ref: 'main' }) - * console.log(commitOid) - * let { blob } = await git.readBlob({ - * fs, - * dir: '/tutorial', - * oid: commitOid, - * filepath: 'README.md' - * }) - * console.log(Buffer.from(blob).toString('utf8')) - * - */ -export function readBlob({ fs, dir, gitdir, oid, filepath, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oid: string; - filepath?: string; - cache?: any; -}): Promise<ReadBlobResult>; -/** - * Read a commit object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get. Annotated tags are peeled. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadCommitResult>} Resolves successfully with a git commit object - * @see ReadCommitResult - * @see CommitObject - * - * @example - * // Read a commit object - * let sha = await git.resolveRef({ fs, dir: '/tutorial', ref: 'main' }) - * console.log(sha) - * let commit = await git.readCommit({ fs, dir: '/tutorial', oid: sha }) - * console.log(commit) - * - */ -export function readCommit({ fs, dir, gitdir, oid, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oid: string; - cache?: any; -}): Promise<ReadCommitResult>; -/** - * Read the contents of a note - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - The notes ref to look under - * @param {string} args.oid - The SHA-1 object id of the object to get the note for. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Uint8Array>} Resolves successfully with note contents as a Buffer. - */ -export function readNote({ fs, dir, gitdir, ref, oid, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref?: string; - oid: string; - cache?: any; -}): Promise<Uint8Array>; -/** - * - * @typedef {Object} DeflatedObject - * @property {string} oid - * @property {'deflated'} type - * @property {'deflated'} format - * @property {Uint8Array} object - * @property {string} [source] - * - */ -/** - * - * @typedef {Object} WrappedObject - * @property {string} oid - * @property {'wrapped'} type - * @property {'wrapped'} format - * @property {Uint8Array} object - * @property {string} [source] - * - */ -/** - * - * @typedef {Object} RawObject - * @property {string} oid - * @property {'blob'|'commit'|'tree'|'tag'} type - * @property {'content'} format - * @property {Uint8Array} object - * @property {string} [source] - * - */ -/** - * - * @typedef {Object} ParsedBlobObject - * @property {string} oid - * @property {'blob'} type - * @property {'parsed'} format - * @property {string} object - * @property {string} [source] - * - */ -/** - * - * @typedef {Object} ParsedCommitObject - * @property {string} oid - * @property {'commit'} type - * @property {'parsed'} format - * @property {CommitObject} object - * @property {string} [source] - * - */ -/** - * - * @typedef {Object} ParsedTreeObject - * @property {string} oid - * @property {'tree'} type - * @property {'parsed'} format - * @property {TreeObject} object - * @property {string} [source] - * - */ -/** - * - * @typedef {Object} ParsedTagObject - * @property {string} oid - * @property {'tag'} type - * @property {'parsed'} format - * @property {TagObject} object - * @property {string} [source] - * - */ -/** - * - * @typedef {ParsedBlobObject | ParsedCommitObject | ParsedTreeObject | ParsedTagObject} ParsedObject - */ -/** - * - * @typedef {DeflatedObject | WrappedObject | RawObject | ParsedObject } ReadObjectResult - */ -/** - * Read a git object directly by its SHA-1 object id - * - * Regarding `ReadObjectResult`: - * - * - `oid` will be the same as the `oid` argument unless the `filepath` argument is provided, in which case it will be the oid of the tree or blob being returned. - * - `type` of deflated objects is `'deflated'`, and `type` of wrapped objects is `'wrapped'` - * - `format` is usually, but not always, the format you requested. Packfiles do not store each object individually compressed so if you end up reading the object from a packfile it will be returned in format 'content' even if you requested 'deflated' or 'wrapped'. - * - `object` will be an actual Object if format is 'parsed' and the object is a commit, tree, or annotated tag. Blobs are still formatted as Buffers unless an encoding is provided in which case they'll be strings. If format is anything other than 'parsed', object will be a Buffer. - * - `source` is the name of the packfile or loose object file where the object was found. - * - * The `format` parameter can have the following values: - * - * | param | description | - * | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | 'deflated' | Return the raw deflate-compressed buffer for an object if possible. Useful for efficiently shuffling around loose objects when you don't care about the contents and can save time by not inflating them. | - * | 'wrapped' | Return the inflated object buffer wrapped in the git object header if possible. This is the raw data used when calculating the SHA-1 object id of a git object. | - * | 'content' | Return the object buffer without the git header. | - * | 'parsed' | Returns a parsed representation of the object. | - * - * The result will be in one of the following schemas: - * - * ## `'deflated'` format - * - * {@link DeflatedObject typedef} - * - * ## `'wrapped'` format - * - * {@link WrappedObject typedef} - * - * ## `'content'` format - * - * {@link RawObject typedef} - * - * ## `'parsed'` format - * - * ### parsed `'blob'` type - * - * {@link ParsedBlobObject typedef} - * - * ### parsed `'commit'` type - * - * {@link ParsedCommitObject typedef} - * {@link CommitObject typedef} - * - * ### parsed `'tree'` type - * - * {@link ParsedTreeObject typedef} - * {@link TreeObject typedef} - * {@link TreeEntry typedef} - * - * ### parsed `'tag'` type - * - * {@link ParsedTagObject typedef} - * {@link TagObject typedef} - * - * @deprecated - * > This command is overly complicated. - * > - * > If you know the type of object you are reading, use [`readBlob`](./readBlob.md), [`readCommit`](./readCommit.md), [`readTag`](./readTag.md), or [`readTree`](./readTree.md). - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get - * @param {'deflated' | 'wrapped' | 'content' | 'parsed'} [args.format = 'parsed'] - What format to return the object in. The choices are described in more detail below. - * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the object at that filepath. To return the root directory of a tree set filepath to `''` - * @param {string} [args.encoding] - A convenience argument that only affects blobs. Instead of returning `object` as a buffer, it returns a string parsed using the given encoding. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadObjectResult>} Resolves successfully with a git object description - * @see ReadObjectResult - * - * @example - * // Given a ransom SHA-1 object id, figure out what it is - * let { type, object } = await git.readObject({ - * fs, - * dir: '/tutorial', - * oid: '0698a781a02264a6f37ba3ff41d78067eaf0f075' - * }) - * switch (type) { - * case 'commit': { - * console.log(object) - * break - * } - * case 'tree': { - * console.log(object) - * break - * } - * case 'blob': { - * console.log(object) - * break - * } - * case 'tag': { - * console.log(object) - * break - * } - * } - * - */ -export function readObject({ fs: _fs, dir, gitdir, oid, format, filepath, encoding, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oid: string; - format?: "parsed" | "deflated" | "content" | "wrapped"; - filepath?: string; - encoding?: string; - cache?: any; -}): Promise<ParsedBlobObject | ParsedCommitObject | ParsedTreeObject | ParsedTagObject | DeflatedObject | WrappedObject | RawObject>; -/** - * - * @typedef {Object} ReadTagResult - The object returned has the following schema: - * @property {string} oid - SHA-1 object id of this tag - * @property {TagObject} tag - the parsed tag object - * @property {string} payload - PGP signing payload - */ -/** - * Read an annotated tag object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadTagResult>} Resolves successfully with a git object description - * @see ReadTagResult - * @see TagObject - * - */ -export function readTag({ fs, dir, gitdir, oid, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oid: string; - cache?: any; -}): Promise<ReadTagResult>; -/** - * - * @typedef {Object} ReadTreeResult - The object returned has the following schema: - * @property {string} oid - SHA-1 object id of this tree - * @property {TreeObject} tree - the parsed tree object - */ -/** - * Read a tree object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.oid - The SHA-1 object id to get. Annotated tags and commits are peeled. - * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the tree object at that filepath. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<ReadTreeResult>} Resolves successfully with a git tree object - * @see ReadTreeResult - * @see TreeObject - * @see TreeEntry - * - */ -export function readTree({ fs, dir, gitdir, oid, filepath, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - oid: string; - filepath?: string; - cache?: any; -}): Promise<ReadTreeResult>; -/** - * Remove a file from the git index (aka staging area) - * - * Note that this does NOT delete the file in the working directory. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the file to remove from the index - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully once the git index has been updated - * - * @example - * await git.remove({ fs, dir: '/tutorial', filepath: 'README.md' }) - * console.log('done') - * - */ -export function remove({ fs: _fs, dir, gitdir, filepath, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - filepath: string; - cache?: any; -}): Promise<void>; -/** - * Remove an object note - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {SignCallback} [args.onSign] - a PGP signing implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref] - The notes ref to look under - * @param {string} args.oid - The SHA-1 object id of the object to remove the note from. - * @param {Object} [args.author] - The details about the author. - * @param {string} [args.author.name] - Default is `user.name` config. - * @param {string} [args.author.email] - Default is `user.email` config. - * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {Object} [args.committer = author] - The details about the note committer, in the same format as the author parameter. If not specified, the author details are used. - * @param {string} [args.committer.name] - Default is `user.name` config. - * @param {string} [args.committer.email] - Default is `user.email` config. - * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00). - * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`. - * @param {string} [args.signingKey] - Sign the tag object using this private PGP key. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the commit object for the note removal. - */ -export function removeNote({ fs: _fs, onSign, dir, gitdir, ref, oid, author: _author, committer: _committer, signingKey, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - onSign?: SignCallback; - dir?: string; - gitdir?: string; - ref?: string; - oid: string; - author?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - committer?: { - name?: string; - email?: string; - timestamp?: number; - timezoneOffset?: number; - }; - signingKey?: string; - cache?: any; -}): Promise<string>; -/** - * Rename a branch - * - * @param {object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - What to name the branch - * @param {string} args.oldref - What the name of the branch was - * @param {boolean} [args.checkout = false] - Update `HEAD` to point at the newly created branch - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.renameBranch({ fs, dir: '/tutorial', ref: 'main', oldref: 'master' }) - * console.log('done') - * - */ -export function renameBranch({ fs, dir, gitdir, ref, oldref, checkout, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; - oldref: string; - checkout?: boolean; -}): Promise<void>; -/** - * Reset a file in the git index (aka staging area) - * - * Note that this does NOT modify the file in the working directory. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the file to reset in the index - * @param {string} [args.ref = 'HEAD'] - A ref to the commit to use - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<void>} Resolves successfully once the git index has been updated - * - * @example - * await git.resetIndex({ fs, dir: '/tutorial', filepath: 'README.md' }) - * console.log('done') - * - */ -export function resetIndex({ fs: _fs, dir, gitdir, filepath, ref, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - filepath: string; - ref?: string; - cache?: any; -}): Promise<void>; -/** - * Get the value of a symbolic ref or resolve a ref to its SHA-1 object id - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The ref to resolve - * @param {number} [args.depth = undefined] - How many symbolic references to follow before returning - * - * @returns {Promise<string>} Resolves successfully with a SHA-1 object id or the value of a symbolic ref - * - * @example - * let currentCommit = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD' }) - * console.log(currentCommit) - * let currentBranch = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD', depth: 2 }) - * console.log(currentBranch) - * - */ -export function resolveRef({ fs, dir, gitdir, ref, depth, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; - depth?: number; -}): Promise<string>; -/** - * Write an entry to the git config files. - * - * *Caveats:* - * - Currently only the local `$GIT_DIR/config` file can be read or written. However support for the global `~/.gitconfig` and system `$(prefix)/etc/gitconfig` will be added in the future. - * - The current parser does not support the more exotic features of the git-config file format such as `[include]` and `[includeIf]`. - * - * @param {Object} args - * @param {FsClient} args.fs - a file system implementation - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.path - The key of the git config entry - * @param {string | boolean | number | void} args.value - A value to store at that path. (Use `undefined` as the value to delete a config entry.) - * @param {boolean} [args.append = false] - If true, will append rather than replace when setting (use with multi-valued config options). - * - * @returns {Promise<void>} Resolves successfully when operation completed - * - * @example - * // Write config value - * await git.setConfig({ - * fs, - * dir: '/tutorial', - * path: 'user.name', - * value: 'Mr. Test' - * }) - * - * // Print out config file - * let file = await fs.promises.readFile('/tutorial/.git/config', 'utf8') - * console.log(file) - * - * // Delete a config entry - * await git.setConfig({ - * fs, - * dir: '/tutorial', - * path: 'user.name', - * value: undefined - * }) - * - * // Print out config file - * file = await fs.promises.readFile('/tutorial/.git/config', 'utf8') - * console.log(file) - */ -export function setConfig({ fs: _fs, dir, gitdir, path, value, append, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - path: string; - value: string | number | boolean | void; - append?: boolean; -}): Promise<void>; -/** - * Tell whether a file has been changed - * - * The possible resolve values are: - * - * | status | description | - * | --------------------- | ------------------------------------------------------------------------------------- | - * | `"ignored"` | file ignored by a .gitignore rule | - * | `"unmodified"` | file unchanged from HEAD commit | - * | `"*modified"` | file has modifications, not yet staged | - * | `"*deleted"` | file has been removed, but the removal is not yet staged | - * | `"*added"` | file is untracked, not yet staged | - * | `"absent"` | file not present in HEAD commit, staging area, or working dir | - * | `"modified"` | file has modifications, staged | - * | `"deleted"` | file has been removed, staged | - * | `"added"` | previously untracked file, staged | - * | `"*unmodified"` | working dir and HEAD commit match, but index differs | - * | `"*absent"` | file not present in working dir or HEAD commit, but present in the index | - * | `"*undeleted"` | file was deleted from the index, but is still in the working dir | - * | `"*undeletemodified"` | file was deleted from the index, but is present with modifications in the working dir | - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.filepath - The path to the file to query - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<'ignored'|'unmodified'|'*modified'|'*deleted'|'*added'|'absent'|'modified'|'deleted'|'added'|'*unmodified'|'*absent'|'*undeleted'|'*undeletemodified'>} Resolves successfully with the file's git status - * - * @example - * let status = await git.status({ fs, dir: '/tutorial', filepath: 'README.md' }) - * console.log(status) - * - */ -export function status({ fs: _fs, dir, gitdir, filepath, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir: string; - gitdir?: string; - filepath: string; - cache?: any; -}): Promise<"modified" | "ignored" | "unmodified" | "*modified" | "*deleted" | "*added" | "absent" | "deleted" | "added" | "*unmodified" | "*absent" | "*undeleted" | "*undeletemodified">; -/** - * Efficiently get the status of multiple files at once. - * - * The returned `StatusMatrix` is admittedly not the easiest format to read. - * However it conveys a large amount of information in dense format that should make it easy to create reports about the current state of the repository; - * without having to do multiple, time-consuming isomorphic-git calls. - * My hope is that the speed and flexibility of the function will make up for the learning curve of interpreting the return value. - * - * ```js live - * // get the status of all the files in 'src' - * let status = await git.statusMatrix({ - * fs, - * dir: '/tutorial', - * filter: f => f.startsWith('src/') - * }) - * console.log(status) - * ``` - * - * ```js live - * // get the status of all the JSON and Markdown files - * let status = await git.statusMatrix({ - * fs, - * dir: '/tutorial', - * filter: f => f.endsWith('.json') || f.endsWith('.md') - * }) - * console.log(status) - * ``` - * - * The result is returned as a 2D array. - * The outer array represents the files and/or blobs in the repo, in alphabetical order. - * The inner arrays describe the status of the file: - * the first value is the filepath, and the next three are integers - * representing the HEAD status, WORKDIR status, and STAGE status of the entry. - * - * ```js - * // example StatusMatrix - * [ - * ["a.txt", 0, 2, 0], // new, untracked - * ["b.txt", 0, 2, 2], // added, staged - * ["c.txt", 0, 2, 3], // added, staged, with unstaged changes - * ["d.txt", 1, 1, 1], // unmodified - * ["e.txt", 1, 2, 1], // modified, unstaged - * ["f.txt", 1, 2, 2], // modified, staged - * ["g.txt", 1, 2, 3], // modified, staged, with unstaged changes - * ["h.txt", 1, 0, 1], // deleted, unstaged - * ["i.txt", 1, 0, 0], // deleted, staged - * ] - * ``` - * - * - The HEAD status is either absent (0) or present (1). - * - The WORKDIR status is either absent (0), identical to HEAD (1), or different from HEAD (2). - * - The STAGE status is either absent (0), identical to HEAD (1), identical to WORKDIR (2), or different from WORKDIR (3). - * - * ```ts - * type Filename = string - * type HeadStatus = 0 | 1 - * type WorkdirStatus = 0 | 1 | 2 - * type StageStatus = 0 | 1 | 2 | 3 - * - * type StatusRow = [Filename, HeadStatus, WorkdirStatus, StageStatus] - * - * type StatusMatrix = StatusRow[] - * ``` - * - * > Think of the natural progression of file modifications as being from HEAD (previous) -> WORKDIR (current) -> STAGE (next). - * > Then HEAD is "version 1", WORKDIR is "version 2", and STAGE is "version 3". - * > Then, imagine a "version 0" which is before the file was created. - * > Then the status value in each column corresponds to the oldest version of the file it is identical to. - * > (For a file to be identical to "version 0" means the file is deleted.) - * - * Here are some examples of queries you can answer using the result: - * - * #### Q: What files have been deleted? - * ```js - * const FILE = 0, WORKDIR = 2 - * - * const filenames = (await statusMatrix({ dir })) - * .filter(row => row[WORKDIR] === 0) - * .map(row => row[FILE]) - * ``` - * - * #### Q: What files have unstaged changes? - * ```js - * const FILE = 0, WORKDIR = 2, STAGE = 3 - * - * const filenames = (await statusMatrix({ dir })) - * .filter(row => row[WORKDIR] !== row[STAGE]) - * .map(row => row[FILE]) - * ``` - * - * #### Q: What files have been modified since the last commit? - * ```js - * const FILE = 0, HEAD = 1, WORKDIR = 2 - * - * const filenames = (await statusMatrix({ dir })) - * .filter(row => row[HEAD] !== row[WORKDIR]) - * .map(row => row[FILE]) - * ``` - * - * #### Q: What files will NOT be changed if I commit right now? - * ```js - * const FILE = 0, HEAD = 1, STAGE = 3 - * - * const filenames = (await statusMatrix({ dir })) - * .filter(row => row[HEAD] === row[STAGE]) - * .map(row => row[FILE]) - * ``` - * - * For reference, here are all possible combinations: - * - * | HEAD | WORKDIR | STAGE | `git status --short` equivalent | - * | ---- | ------- | ----- | ------------------------------- | - * | 0 | 0 | 0 | `` | - * | 0 | 0 | 3 | `AD` | - * | 0 | 2 | 0 | `??` | - * | 0 | 2 | 2 | `A ` | - * | 0 | 2 | 3 | `AM` | - * | 1 | 0 | 0 | `D ` | - * | 1 | 0 | 1 | ` D` | - * | 1 | 0 | 3 | `MD` | - * | 1 | 1 | 0 | `D ` + `??` | - * | 1 | 1 | 1 | `` | - * | 1 | 1 | 3 | `MM` | - * | 1 | 2 | 0 | `D ` + `??` | - * | 1 | 2 | 1 | ` M` | - * | 1 | 2 | 2 | `M ` | - * | 1 | 2 | 3 | `MM` | - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} [args.ref = 'HEAD'] - Optionally specify a different commit to compare against the workdir and stage instead of the HEAD - * @param {string[]} [args.filepaths = ['.']] - Limit the query to the given files and directories - * @param {function(string): boolean} [args.filter] - Filter the results to only those whose filepath matches a function. - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<Array<StatusRow>>} Resolves with a status matrix, described below. - * @see StatusRow - */ -export function statusMatrix({ fs: _fs, dir, gitdir, ref, filepaths, filter, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir: string; - gitdir?: string; - ref?: string; - filepaths?: string[]; - filter?: (arg0: string) => boolean; - cache?: any; -}): Promise<[string, 0 | 1, 0 | 1 | 2, 0 | 1 | 2 | 3][]>; -/** - * Create a lightweight tag - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - What to name the tag - * @param {string} [args.object = 'HEAD'] - What oid the tag refers to. (Will resolve to oid if value is a ref.) By default, the commit object which is referred by the current `HEAD` is used. - * @param {boolean} [args.force = false] - Instead of throwing an error if a tag named `ref` already exists, overwrite the existing tag. - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.tag({ fs, dir: '/tutorial', ref: 'test-tag' }) - * console.log('done') - * - */ -export function tag({ fs: _fs, dir, gitdir, ref, object, force, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; - object?: string; - force?: boolean; -}): Promise<void>; -/** - * Return the version number of isomorphic-git - * - * I don't know why you might need this. I added it just so I could check that I was getting - * the correct version of the library and not a cached version. - * - * @returns {string} the version string taken from package.json at publication time - * - * @example - * console.log(git.version()) - * - */ -export function version(): string; -/** - * @callback WalkerMap - * @param {string} filename - * @param {Array<WalkerEntry | null>} entries - * @returns {Promise<any>} - */ -/** - * @callback WalkerReduce - * @param {any} parent - * @param {any[]} children - * @returns {Promise<any>} - */ -/** - * @callback WalkerIterateCallback - * @param {WalkerEntry[]} entries - * @returns {Promise<any[]>} - */ -/** - * @callback WalkerIterate - * @param {WalkerIterateCallback} walk - * @param {IterableIterator<WalkerEntry[]>} children - * @returns {Promise<any[]>} - */ -/** - * A powerful recursive tree-walking utility. - * - * The `walk` API simplifies gathering detailed information about a tree or comparing all the filepaths in two or more trees. - * Trees can be git commits, the working directory, or the or git index (staging area). - * As long as a file or directory is present in at least one of the trees, it will be traversed. - * Entries are traversed in alphabetical order. - * - * The arguments to `walk` are the `trees` you want to traverse, and 3 optional transform functions: - * `map`, `reduce`, and `iterate`. - * - * ## `TREE`, `WORKDIR`, and `STAGE` - * - * Tree walkers are represented by three separate functions that can be imported: - * - * ```js - * import { TREE, WORKDIR, STAGE } from 'isomorphic-git' - * ``` - * - * These functions return opaque handles called `Walker`s. - * The only thing that `Walker` objects are good for is passing into `walk`. - * Here are the three `Walker`s passed into `walk` by the `statusMatrix` command for example: - * - * ```js - * let ref = 'HEAD' - * - * let trees = [TREE({ ref }), WORKDIR(), STAGE()] - * ``` - * - * For the arguments, see the doc pages for [TREE](./TREE.md), [WORKDIR](./WORKDIR.md), and [STAGE](./STAGE.md). - * - * `map`, `reduce`, and `iterate` allow you control the recursive walk by pruning and transforming `WalkerEntry`s into the desired result. - * - * ## WalkerEntry - * - * {@link WalkerEntry typedef} - * - * `map` receives an array of `WalkerEntry[]` as its main argument, one `WalkerEntry` for each `Walker` in the `trees` argument. - * The methods are memoized per `WalkerEntry` so calling them multiple times in a `map` function does not adversely impact performance. - * By only computing these values if needed, you build can build lean, mean, efficient walking machines. - * - * ### WalkerEntry#type() - * - * Returns the kind as a string. This is normally either `tree` or `blob`. - * - * `TREE`, `STAGE`, and `WORKDIR` walkers all return a string. - * - * Possible values: - * - * - `'tree'` directory - * - `'blob'` file - * - `'special'` used by `WORKDIR` to represent irregular files like sockets and FIFOs - * - `'commit'` used by `TREE` to represent submodules - * - * ```js - * await entry.type() - * ``` - * - * ### WalkerEntry#mode() - * - * Returns the file mode as a number. Use this to distinguish between regular files, symlinks, and executable files. - * - * `TREE`, `STAGE`, and `WORKDIR` walkers all return a number for all `type`s of entries. - * - * It has been normalized to one of the 4 values that are allowed in git commits: - * - * - `0o40000` directory - * - `0o100644` file - * - `0o100755` file (executable) - * - `0o120000` symlink - * - * Tip: to make modes more readable, you can print them to octal using `.toString(8)`. - * - * ```js - * await entry.mode() - * ``` - * - * ### WalkerEntry#oid() - * - * Returns the SHA-1 object id for blobs and trees. - * - * `TREE` walkers return a string for `blob` and `tree` entries. - * - * `STAGE` and `WORKDIR` walkers return a string for `blob` entries and `undefined` for `tree` entries. - * - * ```js - * await entry.oid() - * ``` - * - * ### WalkerEntry#content() - * - * Returns the file contents as a Buffer. - * - * `TREE` and `WORKDIR` walkers return a Buffer for `blob` entries and `undefined` for `tree` entries. - * - * `STAGE` walkers always return `undefined` since the file contents are never stored in the stage. - * - * ```js - * await entry.content() - * ``` - * - * ### WalkerEntry#stat() - * - * Returns a normalized subset of filesystem Stat data. - * - * `WORKDIR` walkers return a `Stat` for `blob` and `tree` entries. - * - * `STAGE` walkers return a `Stat` for `blob` entries and `undefined` for `tree` entries. - * - * `TREE` walkers return `undefined` for all entry types. - * - * ```js - * await entry.stat() - * ``` - * - * {@link Stat typedef} - * - * ## map(string, Array<WalkerEntry|null>) => Promise<any> - * - * {@link WalkerMap typedef} - * - * This is the function that is called once per entry BEFORE visiting the children of that node. - * - * If you return `null` for a `tree` entry, then none of the children of that `tree` entry will be walked. - * - * This is a good place for query logic, such as examining the contents of a file. - * Ultimately, compare all the entries and return any values you are interested in. - * If you do not return a value (or return undefined) that entry will be filtered from the results. - * - * Example 1: Find all the files containing the word 'foo'. - * ```js - * async function map(filepath, [head, workdir]) { - * let content = (await workdir.content()).toString('utf8') - * if (content.contains('foo')) { - * return { - * filepath, - * content - * } - * } - * } - * ``` - * - * Example 2: Return the difference between the working directory and the HEAD commit - * ```js - * const diff = require('diff-lines') - * async function map(filepath, [head, workdir]) { - * return { - * filepath, - * oid: await head.oid(), - * diff: diff((await head.content()).toString('utf8'), (await workdir.content()).toString('utf8')) - * } - * } - * ``` - * - * Example 3: - * ```js - * let path = require('path') - * // Only examine files in the directory `cwd` - * let cwd = 'src/app' - * async function map (filepath, [head, workdir, stage]) { - * if ( - * // don't skip the root directory - * head.fullpath !== '.' && - * // return true for 'src' and 'src/app' - * !cwd.startsWith(filepath) && - * // return true for 'src/app/*' - * path.dirname(filepath) !== cwd - * ) { - * return null - * } else { - * return filepath - * } - * } - * ``` - * - * ## reduce(parent, children) - * - * {@link WalkerReduce typedef} - * - * This is the function that is called once per entry AFTER visiting the children of that node. - * - * Default: `async (parent, children) => parent === undefined ? children.flat() : [parent, children].flat()` - * - * The default implementation of this function returns all directories and children in a giant flat array. - * You can define a different accumulation method though. - * - * Example: Return a hierarchical structure - * ```js - * async function reduce (parent, children) { - * return Object.assign(parent, { children }) - * } - * ``` - * - * ## iterate(walk, children) - * - * {@link WalkerIterate typedef} - * - * {@link WalkerIterateCallback typedef} - * - * Default: `(walk, children) => Promise.all([...children].map(walk))` - * - * The default implementation recurses all children concurrently using Promise.all. - * However you could use a custom function to traverse children serially or use a global queue to throttle recursion. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {Walker[]} args.trees - The trees you want to traverse - * @param {WalkerMap} [args.map] - Transform `WalkerEntry`s into a result form - * @param {WalkerReduce} [args.reduce] - Control how mapped entries are combined with their parent result - * @param {WalkerIterate} [args.iterate] - Fine-tune how entries within a tree are iterated over - * @param {object} [args.cache] - a [cache](cache.md) object - * - * @returns {Promise<any>} The finished tree-walking result - */ -export function walk({ fs, dir, gitdir, trees, map, reduce, iterate, cache, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - trees: Walker[]; - map?: WalkerMap; - reduce?: WalkerReduce; - iterate?: WalkerIterate; - cache?: any; -}): Promise<any>; -/** - * Write a blob object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {Uint8Array} args.blob - The blob object to write - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object - * - * @example - * // Manually create a blob. - * let oid = await git.writeBlob({ - * fs, - * dir: '/tutorial', - * blob: new Uint8Array([]) - * }) - * - * console.log('oid', oid) // should be 'e69de29bb2d1d6434b8b29ae775ad8c2e48c5391' - * - */ -export function writeBlob({ fs, dir, gitdir, blob }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - blob: Uint8Array; -}): Promise<string>; -/** - * Write a commit object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {CommitObject} args.commit - The object to write - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object - * @see CommitObject - * - */ -export function writeCommit({ fs, dir, gitdir, commit, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - commit: CommitObject; -}): Promise<string>; -/** - * Write a git object directly - * - * `format` can have the following values: - * - * | param | description | - * | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | 'deflated' | Treat `object` as the raw deflate-compressed buffer for an object, meaning can be written to `.git/objects/**` as-is. | - * | 'wrapped' | Treat `object` as the inflated object buffer wrapped in the git object header. This is the raw buffer used when calculating the SHA-1 object id of a git object. | - * | 'content' | Treat `object` as the object buffer without the git header. | - * | 'parsed' | Treat `object` as a parsed representation of the object. | - * - * If `format` is `'parsed'`, then `object` must match one of the schemas for `CommitObject`, `TreeObject`, `TagObject`, or a `string` (for blobs). - * - * {@link CommitObject typedef} - * - * {@link TreeObject typedef} - * - * {@link TagObject typedef} - * - * If `format` is `'content'`, `'wrapped'`, or `'deflated'`, `object` should be a `Uint8Array`. - * - * @deprecated - * > This command is overly complicated. - * > - * > If you know the type of object you are writing, use [`writeBlob`](./writeBlob.md), [`writeCommit`](./writeCommit.md), [`writeTag`](./writeTag.md), or [`writeTree`](./writeTree.md). - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string | Uint8Array | CommitObject | TreeObject | TagObject} args.object - The object to write. - * @param {'blob'|'tree'|'commit'|'tag'} [args.type] - The kind of object to write. - * @param {'deflated' | 'wrapped' | 'content' | 'parsed'} [args.format = 'parsed'] - What format the object is in. The possible choices are listed below. - * @param {string} [args.oid] - If `format` is `'deflated'` then this param is required. Otherwise it is calculated. - * @param {string} [args.encoding] - If `type` is `'blob'` then `object` will be converted to a Uint8Array using `encoding`. - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object. - * - * @example - * // Manually create an annotated tag. - * let sha = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD' }) - * console.log('commit', sha) - * - * let oid = await git.writeObject({ - * fs, - * dir: '/tutorial', - * type: 'tag', - * object: { - * object: sha, - * type: 'commit', - * tag: 'my-tag', - * tagger: { - * name: 'your name', - * email: 'email@example.com', - * timestamp: Math.floor(Date.now()/1000), - * timezoneOffset: new Date().getTimezoneOffset() - * }, - * message: 'Optional message' - * } - * }) - * - * console.log('tag', oid) - * - */ -export function writeObject({ fs: _fs, dir, gitdir, type, object, format, oid, encoding, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - object: string | Uint8Array | TreeEntry[] | CommitObject | TagObject; - type?: "blob" | "tree" | "commit" | "tag"; - format?: "parsed" | "deflated" | "content" | "wrapped"; - oid?: string; - encoding?: string; -}): Promise<string>; -/** - * Write a ref which refers to the specified SHA-1 object id, or a symbolic ref which refers to the specified ref. - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {string} args.ref - The name of the ref to write - * @param {string} args.value - When `symbolic` is false, a ref or an SHA-1 object id. When true, a ref starting with `refs/`. - * @param {boolean} [args.force = false] - Instead of throwing an error if a ref named `ref` already exists, overwrite the existing ref. - * @param {boolean} [args.symbolic = false] - Whether the ref is symbolic or not. - * - * @returns {Promise<void>} Resolves successfully when filesystem operations are complete - * - * @example - * await git.writeRef({ - * fs, - * dir: '/tutorial', - * ref: 'refs/heads/another-branch', - * value: 'HEAD' - * }) - * await git.writeRef({ - * fs, - * dir: '/tutorial', - * ref: 'HEAD', - * value: 'refs/heads/another-branch', - * force: true, - * symbolic: true - * }) - * console.log('done') - * - */ -export function writeRef({ fs: _fs, dir, gitdir, ref, value, force, symbolic, }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - ref: string; - value: string; - force?: boolean; - symbolic?: boolean; -}): Promise<void>; -/** - * Write an annotated tag object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {TagObject} args.tag - The object to write - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object - * @see TagObject - * - * @example - * // Manually create an annotated tag. - * let sha = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD' }) - * console.log('commit', sha) - * - * let oid = await git.writeTag({ - * fs, - * dir: '/tutorial', - * tag: { - * object: sha, - * type: 'commit', - * tag: 'my-tag', - * tagger: { - * name: 'your name', - * email: 'email@example.com', - * timestamp: Math.floor(Date.now()/1000), - * timezoneOffset: new Date().getTimezoneOffset() - * }, - * message: 'Optional message' - * } - * }) - * - * console.log('tag', oid) - * - */ -export function writeTag({ fs, dir, gitdir, tag }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - tag: TagObject; -}): Promise<string>; -/** - * Write a tree object directly - * - * @param {object} args - * @param {FsClient} args.fs - a file system client - * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path - * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path - * @param {TreeObject} args.tree - The object to write - * - * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object. - * @see TreeObject - * @see TreeEntry - * - */ -export function writeTree({ fs, dir, gitdir, tree }: { - fs: CallbackFsClient | PromiseFsClient; - dir?: string; - gitdir?: string; - tree: TreeEntry[]; -}): Promise<string>; -declare class AlreadyExistsError extends BaseError { - /** - * @param {'note'|'remote'|'tag'|'branch'} noun - * @param {string} where - * @param {boolean} canForce - */ - constructor(noun: "tag" | "remote" | "note" | "branch", where: string, canForce?: boolean); - code: "AlreadyExistsError"; - name: "AlreadyExistsError"; - data: { - noun: "tag" | "remote" | "note" | "branch"; - where: string; - canForce: boolean; - }; -} -declare namespace AlreadyExistsError { - export const code: 'AlreadyExistsError'; -} -declare class AmbiguousError extends BaseError { - /** - * @param {'oids'|'refs'} nouns - * @param {string} short - * @param {string[]} matches - */ - constructor(nouns: "refs" | "oids", short: string, matches: string[]); - code: "AmbiguousError"; - name: "AmbiguousError"; - data: { - nouns: "refs" | "oids"; - short: string; - matches: string[]; - }; -} -declare namespace AmbiguousError { - const code_1: 'AmbiguousError'; - export { code_1 as code }; -} -declare class CheckoutConflictError extends BaseError { - /** - * @param {string[]} filepaths - */ - constructor(filepaths: string[]); - code: "CheckoutConflictError"; - name: "CheckoutConflictError"; - data: { - filepaths: string[]; - }; -} -declare namespace CheckoutConflictError { - const code_2: 'CheckoutConflictError'; - export { code_2 as code }; -} -declare class CommitNotFetchedError extends BaseError { - /** - * @param {string} ref - * @param {string} oid - */ - constructor(ref: string, oid: string); - code: "CommitNotFetchedError"; - name: "CommitNotFetchedError"; - data: { - ref: string; - oid: string; - }; -} -declare namespace CommitNotFetchedError { - const code_3: 'CommitNotFetchedError'; - export { code_3 as code }; -} -declare class EmptyServerResponseError extends BaseError { - code: "EmptyServerResponseError"; - name: "EmptyServerResponseError"; - data: {}; -} -declare namespace EmptyServerResponseError { - const code_4: 'EmptyServerResponseError'; - export { code_4 as code }; -} -declare class FastForwardError extends BaseError { - code: "FastForwardError"; - name: "FastForwardError"; - data: {}; -} -declare namespace FastForwardError { - const code_5: 'FastForwardError'; - export { code_5 as code }; -} -declare class GitPushError extends BaseError { - /** - * @param {string} prettyDetails - * @param {PushResult} result - */ - constructor(prettyDetails: string, result: PushResult); - code: "GitPushError"; - name: "GitPushError"; - data: { - prettyDetails: string; - result: PushResult; - }; -} -declare namespace GitPushError { - const code_6: 'GitPushError'; - export { code_6 as code }; -} -declare class HttpError extends BaseError { - /** - * @param {number} statusCode - * @param {string} statusMessage - * @param {string} response - */ - constructor(statusCode: number, statusMessage: string, response: string); - code: "HttpError"; - name: "HttpError"; - data: { - statusCode: number; - statusMessage: string; - response: string; - }; -} -declare namespace HttpError { - const code_7: 'HttpError'; - export { code_7 as code }; -} -declare class InternalError extends BaseError { - /** - * @param {string} message - */ - constructor(message: string); - code: "InternalError"; - name: "InternalError"; - data: { - message: string; - }; -} -declare namespace InternalError { - const code_8: 'InternalError'; - export { code_8 as code }; -} -declare class InvalidFilepathError extends BaseError { - /** - * @param {'leading-slash'|'trailing-slash'} [reason] - */ - constructor(reason?: "leading-slash" | "trailing-slash" | undefined); - code: "InvalidFilepathError"; - name: "InvalidFilepathError"; - data: { - reason: "leading-slash" | "trailing-slash" | undefined; - }; -} -declare namespace InvalidFilepathError { - const code_9: 'InvalidFilepathError'; - export { code_9 as code }; -} -declare class InvalidOidError extends BaseError { - /** - * @param {string} value - */ - constructor(value: string); - code: "InvalidOidError"; - name: "InvalidOidError"; - data: { - value: string; - }; -} -declare namespace InvalidOidError { - const code_10: 'InvalidOidError'; - export { code_10 as code }; -} -declare class InvalidRefNameError extends BaseError { - /** - * @param {string} ref - * @param {string} suggestion - * @param {boolean} canForce - */ - constructor(ref: string, suggestion: string); - code: "InvalidRefNameError"; - name: "InvalidRefNameError"; - data: { - ref: string; - suggestion: string; - }; -} -declare namespace InvalidRefNameError { - const code_11: 'InvalidRefNameError'; - export { code_11 as code }; -} -declare class MaxDepthError extends BaseError { - /** - * @param {number} depth - */ - constructor(depth: number); - code: "MaxDepthError"; - name: "MaxDepthError"; - data: { - depth: number; - }; -} -declare namespace MaxDepthError { - const code_12: 'MaxDepthError'; - export { code_12 as code }; -} -declare class MergeNotSupportedError extends BaseError { - code: "MergeNotSupportedError"; - name: "MergeNotSupportedError"; - data: {}; -} -declare namespace MergeNotSupportedError { - const code_13: 'MergeNotSupportedError'; - export { code_13 as code }; -} -declare class MissingNameError extends BaseError { - /** - * @param {'author'|'committer'|'tagger'} role - */ - constructor(role: "author" | "committer" | "tagger"); - code: "MissingNameError"; - name: "MissingNameError"; - data: { - role: "author" | "committer" | "tagger"; - }; -} -declare namespace MissingNameError { - const code_14: 'MissingNameError'; - export { code_14 as code }; -} -declare class MissingParameterError extends BaseError { - /** - * @param {string} parameter - */ - constructor(parameter: string); - code: "MissingParameterError"; - name: "MissingParameterError"; - data: { - parameter: string; - }; -} -declare namespace MissingParameterError { - const code_15: 'MissingParameterError'; - export { code_15 as code }; -} -declare class NoRefspecError extends BaseError { - /** - * @param {string} remote - */ - constructor(remote: string); - code: "NoRefspecError"; - name: "NoRefspecError"; - data: { - remote: string; - }; -} -declare namespace NoRefspecError { - const code_16: 'NoRefspecError'; - export { code_16 as code }; -} -declare class NotFoundError extends BaseError { - /** - * @param {string} what - */ - constructor(what: string); - code: "NotFoundError"; - name: "NotFoundError"; - data: { - what: string; - }; -} -declare namespace NotFoundError { - const code_17: 'NotFoundError'; - export { code_17 as code }; -} -declare class ObjectTypeError extends BaseError { - /** - * @param {string} oid - * @param {'blob'|'commit'|'tag'|'tree'} actual - * @param {'blob'|'commit'|'tag'|'tree'} expected - * @param {string} [filepath] - */ - constructor(oid: string, actual: "blob" | "tree" | "commit" | "tag", expected: "blob" | "tree" | "commit" | "tag", filepath?: string | undefined); - code: "ObjectTypeError"; - name: "ObjectTypeError"; - data: { - oid: string; - actual: "blob" | "tree" | "commit" | "tag"; - expected: "blob" | "tree" | "commit" | "tag"; - filepath: string | undefined; - }; -} -declare namespace ObjectTypeError { - const code_18: 'ObjectTypeError'; - export { code_18 as code }; -} -declare class ParseError extends BaseError { - /** - * @param {string} expected - * @param {string} actual - */ - constructor(expected: string, actual: string); - code: "ParseError"; - name: "ParseError"; - data: { - expected: string; - actual: string; - }; -} -declare namespace ParseError { - const code_19: 'ParseError'; - export { code_19 as code }; -} -declare class PushRejectedError extends BaseError { - /** - * @param {'not-fast-forward'|'tag-exists'} reason - */ - constructor(reason: "not-fast-forward" | "tag-exists"); - code: "PushRejectedError"; - name: "PushRejectedError"; - data: { - reason: "not-fast-forward" | "tag-exists"; - }; -} -declare namespace PushRejectedError { - const code_20: 'PushRejectedError'; - export { code_20 as code }; -} -declare class RemoteCapabilityError extends BaseError { - /** - * @param {'shallow'|'deepen-since'|'deepen-not'|'deepen-relative'} capability - * @param {'depth'|'since'|'exclude'|'relative'} parameter - */ - constructor(capability: "shallow" | "deepen-since" | "deepen-not" | "deepen-relative", parameter: "depth" | "since" | "exclude" | "relative"); - code: "RemoteCapabilityError"; - name: "RemoteCapabilityError"; - data: { - capability: "shallow" | "deepen-since" | "deepen-not" | "deepen-relative"; - parameter: "depth" | "since" | "exclude" | "relative"; - }; -} -declare namespace RemoteCapabilityError { - const code_21: 'RemoteCapabilityError'; - export { code_21 as code }; -} -declare class SmartHttpError extends BaseError { - /** - * @param {string} preview - * @param {string} response - */ - constructor(preview: string, response: string); - code: "SmartHttpError"; - name: "SmartHttpError"; - data: { - preview: string; - response: string; - }; -} -declare namespace SmartHttpError { - const code_22: 'SmartHttpError'; - export { code_22 as code }; -} -declare class UnknownTransportError extends BaseError { - /** - * @param {string} url - * @param {string} transport - * @param {string} suggestion - */ - constructor(url: string, transport: string, suggestion: string); - code: "UnknownTransportError"; - name: "UnknownTransportError"; - data: { - url: string; - transport: string; - suggestion: string; - }; -} -declare namespace UnknownTransportError { - const code_23: 'UnknownTransportError'; - export { code_23 as code }; -} -declare class UnsafeFilepathError extends BaseError { - /** - * @param {string} filepath - */ - constructor(filepath: string); - code: "UnsafeFilepathError"; - name: "UnsafeFilepathError"; - data: { - filepath: string; - }; -} -declare namespace UnsafeFilepathError { - const code_24: 'UnsafeFilepathError'; - export { code_24 as code }; -} -declare class UrlParseError extends BaseError { - /** - * @param {string} url - */ - constructor(url: string); - code: "UrlParseError"; - name: "UrlParseError"; - data: { - url: string; - }; -} -declare namespace UrlParseError { - const code_25: 'UrlParseError'; - export { code_25 as code }; -} -declare class UserCanceledError extends BaseError { - code: "UserCanceledError"; - name: "UserCanceledError"; - data: {}; -} -declare namespace UserCanceledError { - const code_26: 'UserCanceledError'; - export { code_26 as code }; -} -/** - * @typedef {Object} GitProgressEvent - * @property {string} phase - * @property {number} loaded - * @property {number} total - */ -/** - * @callback ProgressCallback - * @param {GitProgressEvent} progress - * @returns {void | Promise<void>} - */ -/** - * @typedef {Object} GitHttpRequest - * @property {string} url - The URL to request - * @property {string} [method='GET'] - The HTTP method to use - * @property {Object<string, string>} [headers={}] - Headers to include in the HTTP request - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of POST requests - * @property {ProgressCallback} [onProgress] - Reserved for future use (emitting `GitProgressEvent`s) - * @property {object} [signal] - Reserved for future use (canceling a request) - */ -/** - * @typedef {Object} GitHttpResponse - * @property {string} url - The final URL that was fetched after any redirects - * @property {string} [method] - The HTTP method that was used - * @property {Object<string, string>} [headers] - HTTP response headers - * @property {AsyncIterableIterator<Uint8Array>} [body] - An async iterator of Uint8Arrays that make up the body of the response - * @property {number} statusCode - The HTTP status code - * @property {string} statusMessage - The HTTP status message - */ -/** - * @callback HttpFetch - * @param {GitHttpRequest} request - * @returns {Promise<GitHttpResponse>} - */ -/** - * @typedef {Object} HttpClient - * @property {HttpFetch} request - */ -/** - * A git commit object. - * - * @typedef {Object} CommitObject - * @property {string} message Commit message - * @property {string} tree SHA-1 object id of corresponding file tree - * @property {string[]} parent an array of zero or more SHA-1 object ids - * @property {Object} author - * @property {string} author.name The author's name - * @property {string} author.email The author's email - * @property {number} author.timestamp UTC Unix timestamp in seconds - * @property {number} author.timezoneOffset Timezone difference from UTC in minutes - * @property {Object} committer - * @property {string} committer.name The committer's name - * @property {string} committer.email The committer's email - * @property {number} committer.timestamp UTC Unix timestamp in seconds - * @property {number} committer.timezoneOffset Timezone difference from UTC in minutes - * @property {string} [gpgsig] PGP signature (if present) - */ -/** - * An entry from a git tree object. Files are called 'blobs' and directories are called 'trees'. - * - * @typedef {Object} TreeEntry - * @property {string} mode the 6 digit hexadecimal mode - * @property {string} path the name of the file or directory - * @property {string} oid the SHA-1 object id of the blob or tree - * @property {'commit'|'blob'|'tree'} type the type of object - */ -/** - * A git tree object. Trees represent a directory snapshot. - * - * @typedef {TreeEntry[]} TreeObject - */ -/** - * A git annotated tag object. - * - * @typedef {Object} TagObject - * @property {string} object SHA-1 object id of object being tagged - * @property {'blob' | 'tree' | 'commit' | 'tag'} type the type of the object being tagged - * @property {string} tag the tag name - * @property {Object} tagger - * @property {string} tagger.name the tagger's name - * @property {string} tagger.email the tagger's email - * @property {number} tagger.timestamp UTC Unix timestamp in seconds - * @property {number} tagger.timezoneOffset timezone difference from UTC in minutes - * @property {string} message tag message - * @property {string} [gpgsig] PGP signature (if present) - */ -/** - * @typedef {Object} ReadCommitResult - * @property {string} oid - SHA-1 object id of this commit - * @property {CommitObject} commit - the parsed commit object - * @property {string} payload - PGP signing payload - */ -/** - * @typedef {Object} ServerRef - This object has the following schema: - * @property {string} ref - The name of the ref - * @property {string} oid - The SHA-1 object id the ref points to - * @property {string} [target] - The target ref pointed to by a symbolic ref - * @property {string} [peeled] - If the oid is the SHA-1 object id of an annotated tag, this is the SHA-1 object id that the annotated tag points to - */ -/** - * @typedef Walker - * @property {Symbol} Symbol('GitWalkerSymbol') - */ -/** - * Normalized subset of filesystem `stat` data: - * - * @typedef {Object} Stat - * @property {number} ctimeSeconds - * @property {number} ctimeNanoseconds - * @property {number} mtimeSeconds - * @property {number} mtimeNanoseconds - * @property {number} dev - * @property {number} ino - * @property {number} mode - * @property {number} uid - * @property {number} gid - * @property {number} size - */ -/** - * The `WalkerEntry` is an interface that abstracts computing many common tree / blob stats. - * - * @typedef {Object} WalkerEntry - * @property {function(): Promise<'tree'|'blob'|'special'|'commit'>} type - * @property {function(): Promise<number>} mode - * @property {function(): Promise<string>} oid - * @property {function(): Promise<Uint8Array|void>} content - * @property {function(): Promise<Stat>} stat - */ -/** - * @typedef {Object} CallbackFsClient - * @property {function} readFile - https://nodejs.org/api/fs.html#fs_fs_readfile_path_options_callback - * @property {function} writeFile - https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback - * @property {function} unlink - https://nodejs.org/api/fs.html#fs_fs_unlink_path_callback - * @property {function} readdir - https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback - * @property {function} mkdir - https://nodejs.org/api/fs.html#fs_fs_mkdir_path_mode_callback - * @property {function} rmdir - https://nodejs.org/api/fs.html#fs_fs_rmdir_path_callback - * @property {function} stat - https://nodejs.org/api/fs.html#fs_fs_stat_path_options_callback - * @property {function} lstat - https://nodejs.org/api/fs.html#fs_fs_lstat_path_options_callback - * @property {function} [readlink] - https://nodejs.org/api/fs.html#fs_fs_readlink_path_options_callback - * @property {function} [symlink] - https://nodejs.org/api/fs.html#fs_fs_symlink_target_path_type_callback - * @property {function} [chmod] - https://nodejs.org/api/fs.html#fs_fs_chmod_path_mode_callback - */ -/** - * @typedef {Object} PromiseFsClient - * @property {Object} promises - * @property {function} promises.readFile - https://nodejs.org/api/fs.html#fs_fspromises_readfile_path_options - * @property {function} promises.writeFile - https://nodejs.org/api/fs.html#fs_fspromises_writefile_file_data_options - * @property {function} promises.unlink - https://nodejs.org/api/fs.html#fs_fspromises_unlink_path - * @property {function} promises.readdir - https://nodejs.org/api/fs.html#fs_fspromises_readdir_path_options - * @property {function} promises.mkdir - https://nodejs.org/api/fs.html#fs_fspromises_mkdir_path_options - * @property {function} promises.rmdir - https://nodejs.org/api/fs.html#fs_fspromises_rmdir_path - * @property {function} promises.stat - https://nodejs.org/api/fs.html#fs_fspromises_stat_path_options - * @property {function} promises.lstat - https://nodejs.org/api/fs.html#fs_fspromises_lstat_path_options - * @property {function} [promises.readlink] - https://nodejs.org/api/fs.html#fs_fspromises_readlink_path_options - * @property {function} [promises.symlink] - https://nodejs.org/api/fs.html#fs_fspromises_symlink_target_path_type - * @property {function} [promises.chmod] - https://nodejs.org/api/fs.html#fs_fspromises_chmod_path_mode - */ -/** - * @typedef {CallbackFsClient | PromiseFsClient} FsClient - */ -/** - * @callback MessageCallback - * @param {string} message - * @returns {void | Promise<void>} - */ -/** - * @typedef {Object} GitAuth - * @property {string} [username] - * @property {string} [password] - * @property {Object<string, string>} [headers] - * @property {boolean} [cancel] Tells git to throw a `UserCanceledError` (instead of an `HttpError`). - */ -/** - * @callback AuthCallback - * @param {string} url - * @param {GitAuth} auth Might have some values if the URL itself originally contained a username or password. - * @returns {GitAuth | void | Promise<GitAuth | void>} - */ -/** - * @callback AuthFailureCallback - * @param {string} url - * @param {GitAuth} auth The credentials that failed - * @returns {GitAuth | void | Promise<GitAuth | void>} - */ -/** - * @callback AuthSuccessCallback - * @param {string} url - * @param {GitAuth} auth - * @returns {void | Promise<void>} - */ -/** - * @typedef {Object} SignParams - * @property {string} payload - a plaintext message - * @property {string} secretKey - an 'ASCII armor' encoded PGP key (technically can actually contain _multiple_ keys) - */ -/** - * @callback SignCallback - * @param {SignParams} args - * @return {{signature: string} | Promise<{signature: string}>} - an 'ASCII armor' encoded "detached" signature - */ -/** - * @callback WalkerMap - * @param {string} filename - * @param {WalkerEntry[]} entries - * @returns {Promise<any>} - */ -/** - * @callback WalkerReduce - * @param {any} parent - * @param {any[]} children - * @returns {Promise<any>} - */ -/** - * @callback WalkerIterateCallback - * @param {WalkerEntry[]} entries - * @returns {Promise<any[]>} - */ -/** - * @callback WalkerIterate - * @param {WalkerIterateCallback} walk - * @param {IterableIterator<WalkerEntry[]>} children - * @returns {Promise<any[]>} - */ -/** - * @typedef {Object} RefUpdateStatus - * @property {boolean} ok - * @property {string} error - */ -/** - * @typedef {Object} PushResult - * @property {boolean} ok - * @property {?string} error - * @property {Object<string, RefUpdateStatus>} refs - * @property {Object<string, string>} [headers] - */ -/** - * @typedef {0|1} HeadStatus - */ -/** - * @typedef {0|1|2} WorkdirStatus - */ -/** - * @typedef {0|1|2|3} StageStatus - */ -/** - * @typedef {[string, HeadStatus, WorkdirStatus, StageStatus]} StatusRow - */ -declare class BaseError extends Error { - constructor(message: any); - caller: string; - toJSON(): { - code: any; - data: any; - caller: string; - message: string; - stack: string | undefined; - }; - fromJSON(json: any): BaseError; - get isIsomorphicGitError(): boolean; -} diff --git a/node_modules/isomorphic-git/index.umd.min.js b/node_modules/isomorphic-git/index.umd.min.js deleted file mode 100644 index b686ff11..00000000 --- a/node_modules/isomorphic-git/index.umd.min.js +++ /dev/null @@ -1,9 +0,0 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.git=e():t.git=e()}(self,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=153)}([function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(24);function i(t,e){if(void 0===e)throw new n.a(t)}},function(t,e,r){"use strict";function n(t){return t.replace(/\/\.\//g,"/").replace(/\/{2,}/g,"/").replace(/^\/\.$/,"/").replace(/^\.\/$/,".").replace(/^\.\//,"").replace(/\/\.$/,"").replace(/(.+)\/$/,"$1").replace(/^$/,".")}function i(...t){return n(t.map(n).join("/"))}r.d(e,"a",(function(){return i}))},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return u}));var n=r(21),i=r.n(n),o=r(32),a=r(26);function s(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,c,"next",t)}function c(t){s(o,n,i,a,c,"throw",t)}a(void 0)}))}}class u{constructor(t){if(void 0!==t._original_unwrapped_fs)return t;const e=Object.getOwnPropertyDescriptor(t,"promises");e&&e.enumerable?(this._readFile=t.promises.readFile.bind(t.promises),this._writeFile=t.promises.writeFile.bind(t.promises),this._mkdir=t.promises.mkdir.bind(t.promises),this._rmdir=t.promises.rmdir.bind(t.promises),this._unlink=t.promises.unlink.bind(t.promises),this._stat=t.promises.stat.bind(t.promises),this._lstat=t.promises.lstat.bind(t.promises),this._readdir=t.promises.readdir.bind(t.promises),this._readlink=t.promises.readlink.bind(t.promises),this._symlink=t.promises.symlink.bind(t.promises)):(this._readFile=i()(t.readFile.bind(t)),this._writeFile=i()(t.writeFile.bind(t)),this._mkdir=i()(t.mkdir.bind(t)),this._rmdir=i()(t.rmdir.bind(t)),this._unlink=i()(t.unlink.bind(t)),this._stat=i()(t.stat.bind(t)),this._lstat=i()(t.lstat.bind(t)),this._readdir=i()(t.readdir.bind(t)),this._readlink=i()(t.readlink.bind(t)),this._symlink=i()(t.symlink.bind(t))),this._original_unwrapped_fs=t}exists(t,e={}){var r=this;return c((function*(){try{return yield r._stat(t),!0}catch(t){if("ENOENT"===t.code||"ENOTDIR"===t.code)return!1;throw console.log('Unhandled error in "FileSystem.exists()" function',t),t}}))()}read(e,r={}){var n=this;return c((function*(){try{let i=yield n._readFile(e,r);return"string"!=typeof i&&(i=t.from(i)),i}catch(t){return null}}))()}write(t,e,r={}){var n=this;return c((function*(){try{return void(yield n._writeFile(t,e,r))}catch(i){yield n.mkdir(Object(a.a)(t)),yield n._writeFile(t,e,r)}}))()}mkdir(t,e=!1){var r=this;return c((function*(){try{return void(yield r._mkdir(t))}catch(n){if(null===n)return;if("EEXIST"===n.code)return;if(e)throw n;if("ENOENT"===n.code){const e=Object(a.a)(t);if("."===e||"/"===e||e===t)throw n;yield r.mkdir(e),yield r.mkdir(t,!0)}}}))()}rm(t){var e=this;return c((function*(){try{yield e._unlink(t)}catch(t){if("ENOENT"!==t.code)throw t}}))()}rmdir(t){var e=this;return c((function*(){try{yield e._rmdir(t)}catch(t){if("ENOENT"!==t.code)throw t}}))()}readdir(t){var e=this;return c((function*(){try{const r=yield e._readdir(t);return r.sort(o.a),r}catch(t){return"ENOTDIR"===t.code?null:[]}}))()}readdirDeep(t){var e=this;return c((function*(){const r=yield e._readdir(t);return(yield Promise.all(r.map(function(){var r=c((function*(r){const n=t+"/"+r;return(yield e._stat(n)).isDirectory()?e.readdirDeep(n):n}));return function(t){return r.apply(this,arguments)}}()))).reduce((t,e)=>t.concat(e),[])}))()}lstat(t){var e=this;return c((function*(){try{return yield e._lstat(t)}catch(t){if("ENOENT"===t.code)return null;throw t}}))()}readlink(t,e={encoding:"buffer"}){var r=this;return c((function*(){try{return r._readlink(t,e)}catch(t){if("ENOENT"===t.code)return null;throw t}}))()}writelink(t,e){var r=this;return c((function*(){return r._symlink(e.toString("utf8"),t)}))()}}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";var n=r(28),i=r(60),o=r(9);class a{constructor(t){if(this.refs=new Map,this.parsedConfig=[],t){let e=null;this.parsedConfig=t.trim().split("\n").map(t=>{if(/^\s*#/.test(t))return{line:t,comment:!0};const r=t.indexOf(" ");if(t.startsWith("^")){const r=t.slice(1);return this.refs.set(e+"^{}",r),{line:t,ref:e,peeled:r}}{const n=t.slice(0,r);return e=t.slice(r+1),this.refs.set(e,n),{line:t,ref:e,oid:n}}})}return this}static from(t){return new a(t)}delete(t){this.parsedConfig=this.parsedConfig.filter(e=>e.ref!==t),this.refs.delete(t)}toString(){return this.parsedConfig.map(({line:t})=>t).join("\n")+"\n"}}var s=r(94);function c(t,e){const r=t.replace(/\^\{\}$/,""),n=e.replace(/\^\{\}$/,""),i=-(r<n)||+(r>n);return 0===i?t.endsWith("^{}")?1:-1:i}var u=r(1),f=r(13);function l(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function d(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){l(o,n,i,a,s,"next",t)}function s(t){l(o,n,i,a,s,"throw",t)}a(void 0)}))}}r.d(e,"a",(function(){return y}));const h=t=>[`${t}`,`refs/${t}`,`refs/tags/${t}`,`refs/heads/${t}`,`refs/remotes/${t}`,`refs/remotes/${t}/HEAD`],p=["config","description","index","shallow","commondir"];class y{static updateRemoteRefs({fs:t,gitdir:e,remote:r,refs:o,symrefs:a,tags:c,refspecs:l,prune:h=!1,pruneTags:p=!1}){return d((function*(){for(const t of o.values())if(!t.match(/[0-9a-f]{40}/))throw new n.a(t);const d=yield f.a.get({fs:t,gitdir:e});if(!l){if(0===(l=yield d.getall(`remote.${r}.fetch`)).length)throw new i.a(r);l.unshift(`+HEAD:refs/remotes/${r}/HEAD`)}const g=s.a.from(l),v=new Map;if(p){const r=yield y.listRefs({fs:t,gitdir:e,filepath:"refs/tags"});yield y.deleteRefs({fs:t,gitdir:e,refs:r.map(t=>`refs/tags/${t}`)})}if(c)for(const r of o.keys())if(r.startsWith("refs/tags")&&!r.endsWith("^{}")&&!(yield y.exists({fs:t,gitdir:e,ref:r}))){const t=o.get(r+"^{}")||o.get(r);v.set(r,t)}const m=g.translate([...o.keys()]);for(const[t,e]of m){const r=o.get(t);v.set(e,r)}const w=g.translate([...a.keys()]);for(const[t,e]of w){const r=a.get(t),n=g.translateOne(r);n&&v.set(e,`ref: ${n}`)}const b=[];if(h){for(const r of g.localNamespaces()){const n=(yield y.listRefs({fs:t,gitdir:e,filepath:r})).map(t=>`${r}/${t}`);for(const t of n)v.has(t)||b.push(t)}b.length>0&&(yield y.deleteRefs({fs:t,gitdir:e,refs:b}))}for(const[r,n]of v)yield t.write(Object(u.a)(e,r),`${n.trim()}\n`,"utf8");return{pruned:b}}))()}static writeRef({fs:t,gitdir:e,ref:r,value:i}){return d((function*(){if(!i.match(/[0-9a-f]{40}/))throw new n.a(i);yield t.write(Object(u.a)(e,r),`${i.trim()}\n`,"utf8")}))()}static writeSymbolicRef({fs:t,gitdir:e,ref:r,value:n}){return d((function*(){yield t.write(Object(u.a)(e,r),"ref: "+`${n.trim()}\n`,"utf8")}))()}static deleteRef({fs:t,gitdir:e,ref:r}){return d((function*(){return y.deleteRefs({fs:t,gitdir:e,refs:[r]})}))()}static deleteRefs({fs:t,gitdir:e,refs:r}){return d((function*(){yield Promise.all(r.map(r=>t.rm(Object(u.a)(e,r))));let n=yield t.read(`${e}/packed-refs`,{encoding:"utf8"});const i=a.from(n),o=i.refs.size;for(const t of r)i.refs.has(t)&&i.delete(t);i.refs.size<o&&(n=i.toString(),yield t.write(`${e}/packed-refs`,n,{encoding:"utf8"}))}))()}static resolve({fs:t,gitdir:e,ref:r,depth:n}){return d((function*(){if(void 0!==n&&-1===--n)return r;let i;if(r.startsWith("ref: "))return r=r.slice("ref: ".length),y.resolve({fs:t,gitdir:e,ref:r,depth:n});if(40===r.length&&/[0-9a-f]{40}/.test(r))return r;const a=yield y.packedRefs({fs:t,gitdir:e}),s=h(r).filter(t=>!p.includes(t));for(const r of s)if(i=(yield t.read(`${e}/${r}`,{encoding:"utf8"}))||a.get(r),i)return y.resolve({fs:t,gitdir:e,ref:i.trim(),depth:n});throw new o.a(r)}))()}static exists({fs:t,gitdir:e,ref:r}){return d((function*(){try{return yield y.expand({fs:t,gitdir:e,ref:r}),!0}catch(t){return!1}}))()}static expand({fs:t,gitdir:e,ref:r}){return d((function*(){if(40===r.length&&/[0-9a-f]{40}/.test(r))return r;const n=yield y.packedRefs({fs:t,gitdir:e}),i=h(r);for(const r of i){if(yield t.exists(`${e}/${r}`))return r;if(n.has(r))return r}throw new o.a(r)}))()}static expandAgainstMap({ref:t,map:e}){return d((function*(){const r=h(t);for(const t of r)if(yield e.has(t))return t;throw new o.a(t)}))()}static resolveAgainstMap({ref:t,fullref:e=t,depth:r,map:n}){if(void 0!==r&&-1===--r)return{fullref:e,oid:t};if(t.startsWith("ref: "))return t=t.slice("ref: ".length),y.resolveAgainstMap({ref:t,fullref:e,depth:r,map:n});if(40===t.length&&/[0-9a-f]{40}/.test(t))return{fullref:e,oid:t};const i=h(t);for(const t of i){const e=n.get(t);if(e)return y.resolveAgainstMap({ref:e.trim(),fullref:t,depth:r,map:n})}throw new o.a(t)}static packedRefs({fs:t,gitdir:e}){return d((function*(){const r=yield t.read(`${e}/packed-refs`,{encoding:"utf8"});return a.from(r).refs}))()}static listRefs({fs:t,gitdir:e,filepath:r}){return d((function*(){const n=y.packedRefs({fs:t,gitdir:e});let i=null;try{i=yield t.readdirDeep(`${e}/${r}`),i=i.map(t=>t.replace(`${e}/${r}/`,""))}catch(t){i=[]}for(let t of(yield n).keys())t.startsWith(r)&&(t=t.replace(r+"/",""),i.includes(t)||i.push(t));return i.sort(c),i}))()}static listBranches({fs:t,gitdir:e,remote:r}){return d((function*(){return r?y.listRefs({fs:t,gitdir:e,filepath:`refs/remotes/${r}`}):y.listRefs({fs:t,gitdir:e,filepath:"refs/heads"})}))()}static listTags({fs:t,gitdir:e}){return d((function*(){return(yield y.listRefs({fs:t,gitdir:e,filepath:"refs/tags"})).filter(t=>!t.endsWith("^{}"))}))()}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));class n extends Error{constructor(t){super(t),this.caller=""}toJSON(){return{code:this.code,data:this.data,caller:this.caller,message:this.message,stack:this.stack}}fromJSON(t){const e=new n(t.message);return e.code=t.code,e.data=t.data,e.caller=t.caller,e.stack=t.stack,e}get isIsomorphicGitError(){return!0}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t){super(`An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${t}`),this.code=this.name=i.code,this.data={message:t}}}i.code="InternalError"},,function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return d}));var n=r(5),i=r(9),o=r(23),a=r(117),s=r(118),c=r(73),u=r(16);function f(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){f(o,n,i,a,s,"next",t)}function s(t){f(o,n,i,a,s,"throw",t)}a(void 0)}))}}function d(t){return h.apply(this,arguments)}function h(){return(h=l((function*({fs:e,cache:r,gitdir:f,oid:l,format:h="content"}){const p=t=>d({fs:e,cache:r,gitdir:f,oid:t});let y;if("4b825dc642cb6eb9a060e54bf8d69288fbee4904"===l&&(y={format:"wrapped",object:t.from("tree 0\0")}),y||(y=yield Object(a.a)({fs:e,gitdir:f,oid:l})),y||(y=yield Object(s.a)({fs:e,cache:r,gitdir:f,oid:l,getExternalRefDelta:p})),!y)throw new i.a(l);if("deflated"===h)return y;if("deflated"===y.format&&(y.object=t.from(yield Object(c.a)(y.object)),y.format="wrapped"),"wrapped"===y.format){if("wrapped"===h&&"wrapped"===y.format)return y;const t=yield Object(u.a)(y.object);if(t!==l)throw new n.a(`SHA check failed! Expected ${l}, computed ${t}`);const{object:e,type:r}=o.a.unwrap(y.object);y.type=r,y.object=e,y.format="content"}if("content"===y.format)return"content"===h?y:void 0;throw new n.a(`invalid format "${y.format}"`)}))).apply(this,arguments)}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return a}));var n=r(72),i=r(42);function o(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}class a{static flush(){return t.from("0000","utf8")}static delim(){return t.from("0001","utf8")}static encode(e){"string"==typeof e&&(e=t.from(e));const r=e.length+4,n=Object(i.a)(4,r);return t.concat([t.from(n,"utf8"),e])}static streamReader(t){const e=new n.a(t);return(function(){var t,r=(t=function*(){try{let t=yield e.read(4);if(null==t)return!0;if(t=parseInt(t.toString("utf8"),16),0===t)return null;if(1===t)return null;const r=yield e.read(t-4);return null==r||r}catch(t){return console.log("error",t),!0}},function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function s(t){o(a,n,i,s,c,"next",t)}function c(t){o(a,n,i,s,c,"throw",t)}s(void 0)}))});return function(){return r.apply(this,arguments)}}())}}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t){super(`Could not find ${t}.`),this.code=this.name=i.code,this.data={what:t}}}i.code="NotFoundError"},function(t,e,r){"use strict";(function(t){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh <http://feross.org> - * @license MIT - */ -var n=r(132),i=r(133),o=r(134);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,r){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return u(this,t,e,r)}function u(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=d(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!c.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,r),i=(t=s(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(c.isBuffer(e)){var r=0|h(e.length);return 0===(t=s(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?s(t,0):d(t,e);if("Buffer"===e.type&&o(e.data))return d(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=s(t,e<0?0:0|h(e)),!c.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function d(t,e){var r=e.length<0?0:0|h(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function h(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return M(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(t).length;default:if(n)return M(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return E(this,e,r);case"latin1":case"binary":return A(this,e,r);case"base64":return P(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){var o,a=1,s=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,c/=2,r/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=r;o<s;o++)if(u(t,o)===u(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===c)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+c>s&&(r=s-c),o=r;o>=0;o--){for(var l=!0,d=0;d<c;d++)if(u(t,o+d)!==u(e,d)){l=!1;break}if(l)return o}return-1}function w(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function b(t,e,r,n){return H(M(e,t.length-r),t,r,n)}function _(t,e,r,n){return H(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function O(t,e,r,n){return _(t,e,r,n)}function x(t,e,r,n){return H(F(e),t,r,n)}function j(t,e,r,n){return H(function(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function P(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function k(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,s,c,u=t[i],f=null,l=u>239?4:u>223?3:u>191?2:1;if(i+l<=r)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(o=t[i+1]))&&(c=(31&u)<<6|63&o)>127&&(f=c);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(c=(15&u)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(f=c)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=c,e.SlowBuffer=function(t){+t!=t&&(t=0);return c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,r){return u(null,t,e,r)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,r){return function(t,e,r,n){return f(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}(null,t,e,r)},c.allocUnsafe=function(t){return l(null,t)},c.allocUnsafeSlow=function(t){return l(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).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!0;default:return!1}},c.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=c.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?k(this,0,t):y.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,r,n,i){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),u=this.slice(n,i),f=t.slice(e,r),l=0;l<s;++l)if(u[l]!==f[l]){o=u[l],a=f[l];break}return o<a?-1:a<o?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return O(this,t,e,r);case"base64":return x(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function E(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function A(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function S(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=N(t[o]);return i}function $(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function R(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function B(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function T(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function I(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function U(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(t,e,r,n,o){return o||U(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function z(t,e,r,n,o){return o||U(t,0,r,8),i.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=c.prototype;else{var i=e-t;r=new c(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},c.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},c.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUInt8=function(t,e){return e||R(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||R(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||R(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||R(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){e||R(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||B(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||B(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):T(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):I(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):I(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):T(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):I(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):I(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,r){return C(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return C(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return z(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return z(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var a=c.isBuffer(t)?t:M(new c(t,n).toString()),s=a.length;for(o=0;o<r-e;++o)this[o+e]=a[o%s]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function M(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function F(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(131))},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return u}));var n=r(5),i=r(38),o=r(50),a=r(116);function s(t){switch(t){case"040000":return"tree";case"100644":case"100755":case"120000":return"blob";case"160000":return"commit"}throw new n.a(`Unexpected GitTree entry mode: ${t}`)}function c(t){return!t.oid&&t.sha&&(t.oid=t.sha),t.mode=function(t){if("number"==typeof t&&(t=t.toString(8)),t.match(/^0?4.*/))return"040000";if(t.match(/^1006.*/))return"100644";if(t.match(/^1007.*/))return"100755";if(t.match(/^120.*/))return"120000";if(t.match(/^160.*/))return"160000";throw new n.a(`Could not understand file mode: ${t}`)}(t.mode),t.type||(t.type=s(t.mode)),t}class u{constructor(e){if(t.isBuffer(e))this._entries=function(t){const e=[];let r=0;for(;r<t.length;){const o=t.indexOf(32,r);if(-1===o)throw new n.a(`GitTree: Error parsing buffer at byte location ${r}: Could not find the next space character.`);const a=t.indexOf(0,r);if(-1===a)throw new n.a(`GitTree: Error parsing buffer at byte location ${r}: Could not find the next null character.`);let c=t.slice(r,o).toString("utf8");"40000"===c&&(c="040000");const u=s(c),f=t.slice(o+1,a).toString("utf8");if(f.includes("\\")||f.includes("/"))throw new i.a(f);const l=t.slice(a+1,a+21).toString("hex");r=a+21,e.push({mode:c,path:f,oid:l,type:u})}return e}(e);else{if(!Array.isArray(e))throw new n.a("invalid type passed to GitTree constructor");this._entries=e.map(c)}this._entries.sort(o.a)}static from(t){return new u(t)}render(){return this._entries.map(t=>`${t.mode} ${t.type} ${t.oid} ${t.path}`).join("\n")}toObject(){const e=[...this._entries];return e.sort(a.a),t.concat(e.map(e=>{const r=t.from(e.mode.replace(/^0/,"")),n=t.from(" "),i=t.from(e.path,"utf8"),o=t.from([0]),a=t.from(e.oid,"hex");return t.concat([r,n,i,o,a])}))}entries(){return this._entries}*[Symbol.iterator](){for(const t of this._entries)yield t}}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return f}));var n=r(5),i=r(56),o=r(78),a=r(20),s=r(122),c=r(43);function u(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}class f{constructor(e){if("string"==typeof e)this._commit=e;else if(t.isBuffer(e))this._commit=e.toString("utf8");else{if("object"!=typeof e)throw new n.a("invalid type passed to GitCommit constructor");this._commit=f.render(e)}}static fromPayloadSignature({payload:t,signature:e}){const r=f.justHeaders(t),n=f.justMessage(t),i=Object(a.a)(r+"\ngpgsig"+Object(o.a)(e)+"\n"+n);return new f(i)}static from(t){return new f(t)}toObject(){return t.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return f.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(t){return Object(a.a)(t.slice(t.indexOf("\n\n")+2))}static justHeaders(t){return t.slice(0,t.indexOf("\n\n"))}parseHeaders(){const t=f.justHeaders(this._commit).split("\n"),e=[];for(const r of t)" "===r[0]?e[e.length-1]+="\n"+r.slice(1):e.push(r);const r={parent:[]};for(const t of e){const e=t.slice(0,t.indexOf(" ")),n=t.slice(t.indexOf(" ")+1);Array.isArray(r[e])?r[e].push(n):r[e]=n}return r.author&&(r.author=Object(c.a)(r.author)),r.committer&&(r.committer=Object(c.a)(r.committer)),r}static renderHeaders(t){let e="";if(t.tree?e+=`tree ${t.tree}\n`:e+="tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n",t.parent){if(void 0===t.parent.length)throw new n.a("commit 'parent' property should be an array");for(const r of t.parent)e+=`parent ${r}\n`}const r=t.author;e+=`author ${Object(i.a)(r)}\n`;const a=t.committer||t.author;return e+=`committer ${Object(i.a)(a)}\n`,t.gpgsig&&(e+="gpgsig"+Object(o.a)(t.gpgsig)),e}static render(t){return f.renderHeaders(t)+"\n"+Object(a.a)(t.message)}render(){return this._commit}withoutSignature(){const t=Object(a.a)(this._commit);if(-1===t.indexOf("\ngpgsig"))return t;const e=t.slice(0,t.indexOf("\ngpgsig")),r=t.slice(t.indexOf("-----END PGP SIGNATURE-----\n")+"-----END PGP SIGNATURE-----\n".length);return Object(a.a)(e+"\n"+r)}isolateSignature(){const t=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+"-----END PGP SIGNATURE-----".length);return Object(s.a)(t)}static sign(t,e,r){return(n=function*(){const n=t.withoutSignature(),i=f.justMessage(t._commit);let{signature:s}=yield e({payload:n,secretKey:r});s=Object(a.a)(s);const c=f.justHeaders(t._commit)+"\ngpgsig"+Object(o.a)(s)+"\n"+i;return f.from(c)},function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){u(o,r,i,a,s,"next",t)}function s(t){u(o,r,i,a,s,"throw",t)}a(void 0)}))})();var n}}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(93);function i(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function s(t){i(a,n,o,s,c,"next",t)}function c(t){i(a,n,o,s,c,"throw",t)}s(void 0)}))}}class a{static get({fs:t,gitdir:e}){return o((function*(){const r=yield t.read(`${e}/config`,{encoding:"utf8"});return n.a.from(r)}))()}static save({fs:t,gitdir:e,config:r}){return o((function*(){yield t.write(`${e}/config`,r.toString(),{encoding:"utf8"})}))()}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t,e,r,n){super(`Object ${t} ${n?`at ${n}`:""}was anticipated to be a ${r} but it is a ${e}.`),this.code=this.name=i.code,this.data={oid:t,actual:e,expected:r,filepath:n}}}i.code="ObjectTypeError"},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return c}));var n=r(5),i=r(56),o=r(20),a=r(43);function s(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}class c{constructor(e){if("string"==typeof e)this._tag=e;else if(t.isBuffer(e))this._tag=e.toString("utf8");else{if("object"!=typeof e)throw new n.a("invalid type passed to GitAnnotatedTag constructor");this._tag=c.render(e)}}static from(t){return new c(t)}static render(t){return`object ${t.object}\ntype ${t.type}\ntag ${t.tag}\ntagger ${Object(i.a)(t.tagger)}\n\n${t.message}\n${t.gpgsig?t.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf("\n\n"))}message(){const t=this.withoutSignature();return t.slice(t.indexOf("\n\n")+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){const t=this.justHeaders().split("\n"),e=[];for(const r of t)" "===r[0]?e[e.length-1]+="\n"+r.slice(1):e.push(r);const r={};for(const t of e){const e=t.slice(0,t.indexOf(" ")),n=t.slice(t.indexOf(" ")+1);Array.isArray(r[e])?r[e].push(n):r[e]=n}return r.tagger&&(r.tagger=Object(a.a)(r.tagger)),r.committer&&(r.committer=Object(a.a)(r.committer)),r}withoutSignature(){const t=Object(o.a)(this._tag);return-1===t.indexOf("\n-----BEGIN PGP SIGNATURE-----")?t:t.slice(0,t.lastIndexOf("\n-----BEGIN PGP SIGNATURE-----"))}gpgsig(){if(-1===this._tag.indexOf("\n-----BEGIN PGP SIGNATURE-----"))return;const t=this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+"-----END PGP SIGNATURE-----".length);return Object(o.a)(t)}payload(){return this.withoutSignature()+"\n"}toObject(){return t.from(this._tag,"utf8")}static sign(t,e,r){return(n=function*(){const n=t.payload();let{signature:i}=yield e({payload:n,secretKey:r});i=Object(o.a)(i);const a=n+i;return c.from(a)},function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,c,"next",t)}function c(t){s(o,r,i,a,c,"throw",t)}a(void 0)}))})();var n}}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";var n=r(67),i=r.n(n);function o(t){let e="";for(const r of new Uint8Array(t))r<16&&(e+="0"),e+=r.toString(16);return e}function a(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,c,"next",t)}function c(t){a(o,n,i,s,c,"throw",t)}s(void 0)}))}}r.d(e,"a",(function(){return u}));let c=null;function u(t){return f.apply(this,arguments)}function f(){return(f=s((function*(t){return null===c&&(c=yield p()),c?d(t):l(t)}))).apply(this,arguments)}function l(t){return(new i.a).update(t).digest("hex")}function d(t){return h.apply(this,arguments)}function h(){return(h=s((function*(t){return o(yield crypto.subtle.digest("SHA-1",t))}))).apply(this,arguments)}function p(){return y.apply(this,arguments)}function y(){return(y=s((function*(){try{if("da39a3ee5e6b4b0d3255bfef95601890afd80709"===(yield d(new Uint8Array([]))))return!0}catch(t){}return!1}))).apply(this,arguments)}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return u}));var n=r(23),i=r(124),o=r(74),a=r(16);function s(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,c,"next",t)}function c(t){s(o,n,i,a,c,"throw",t)}a(void 0)}))}}function u(t){return f.apply(this,arguments)}function f(){return(f=c((function*({fs:e,gitdir:r,type:s,object:c,format:u="content",oid:f,dryRun:l=!1}){return"deflated"!==u&&("wrapped"!==u&&(c=n.a.wrap({type:s,object:c})),f=yield Object(a.a)(c),c=t.from(yield Object(o.a)(c))),l||(yield Object(i.a)({fs:e,gitdir:r,object:c,format:"deflated",oid:f})),f}))).apply(this,arguments)}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));class n{constructor(t){this.buffer=t,this._start=0}eof(){return this._start>=this.buffer.length}tell(){return this._start}seek(t){this._start=t}slice(t){const e=this.buffer.slice(this._start,this._start+t);return this._start+=t,e}toString(t,e){const r=this.buffer.toString(t,this._start,this._start+e);return this._start+=e,r}write(t,e,r){const n=this.buffer.write(t,this._start,e,r);return this._start+=e,n}copy(t,e,r){const n=t.copy(this.buffer,this._start,e,r);return this._start+=n,n}readUInt8(){const t=this.buffer.readUInt8(this._start);return this._start+=1,t}writeUInt8(t){const e=this.buffer.writeUInt8(t,this._start);return this._start+=1,e}readUInt16BE(){const t=this.buffer.readUInt16BE(this._start);return this._start+=2,t}writeUInt16BE(t){const e=this.buffer.writeUInt16BE(t,this._start);return this._start+=2,e}readUInt32BE(){const t=this.buffer.readUInt32BE(this._start);return this._start+=4,t}writeUInt32BE(t){const e=this.buffer.writeUInt32BE(t,this._start);return this._start+=4,e}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return h}));var n=r(55),i=r.n(n),o=r(91),a=r(69);function s(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,c,"next",t)}function c(t){s(o,n,i,a,c,"throw",t)}a(void 0)}))}}let u=null;const f=Symbol("IndexCache");function l(){return(l=c((function*(t,e,r){const n=yield t.lstat(e),i=yield t.read(e),a=yield o.a.from(i);r.map.set(e,a),r.stats.set(e,n)}))).apply(this,arguments)}function d(){return(d=c((function*(t,e,r){const n=r.stats.get(e);if(void 0===n)return!0;const i=yield t.lstat(e);return null!==n&&(null!==i&&Object(a.a)(n,i))}))).apply(this,arguments)}class h{static acquire({fs:t,gitdir:e,cache:r},n){return c((function*(){r[f]||(r[f]={map:new Map,stats:new Map});const o=`${e}/index`;let a;return null===u&&(u=new i.a({maxPending:1/0})),yield u.acquire(o,c((function*(){(yield function(t,e,r){return d.apply(this,arguments)}(t,o,r[f]))&&(yield function(t,e,r){return l.apply(this,arguments)}(t,o,r[f]));const e=r[f].map.get(o);if(a=yield n(e),e._dirty){const n=yield e.toObject();yield t.write(o,n),r[f].stats.set(o,yield t.lstat(o)),e._dirty=!1}}))),a}))()}}},function(t,e,r){"use strict";function n(t){return t=(t=(t=t.replace(/\r/g,"")).replace(/^\n+/,"")).replace(/\n+$/,"")+"\n"}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";const n=(t,e)=>function(...r){return new(0,e.promiseModule)((n,i)=>{e.multiArgs?r.push((...t)=>{e.errorFirst?t[0]?i(t):(t.shift(),n(t)):n(t)}):e.errorFirst?r.push((t,e)=>{t?i(t):n(e)}):r.push(n),t.apply(this,r)})};t.exports=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const r=typeof t;if(null===t||"object"!==r&&"function"!==r)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===t?"null":r}\``);const i=t=>{const r=e=>"string"==typeof e?t===e:e.test(t);return e.include?e.include.some(r):!e.exclude.some(r)};let o;o="function"===r?function(...r){return e.excludeMain?t(...r):n(t,e).apply(this,r)}:Object.create(Object.getPrototypeOf(t));for(const r in t){const a=t[r];o[r]="function"==typeof a&&i(r)?n(a,e):a}return o}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t){super(`No name was provided for ${t} in the argument or in the .git/config file.`),this.code=this.name=i.code,this.data={role:t}}}i.code="MissingNameError"},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return i}));var n=r(5);class i{static wrap({type:e,object:r}){return t.concat([t.from(`${e} ${r.byteLength.toString()}\0`),t.from(r)])}static unwrap(e){const r=e.indexOf(32),i=e.indexOf(0),o=e.slice(0,r).toString("utf8"),a=e.slice(r+1,i).toString("utf8"),s=e.length-(i+1);if(parseInt(a)!==s)throw new n.a(`Length mismatch: expected ${a} bytes but got ${s} instead.`);return{type:o,object:t.from(e.slice(i+1))}}}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t){super(`The function requires a "${t}" parameter but none was provided.`),this.code=this.name=i.code,this.data={parameter:t}}}i.code="MissingParameterError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t,e,r=!0){super(`Failed to create ${t} at ${e} because it already exists.${r?` (Hint: use 'force: true' parameter to overwrite existing ${t}.)`:""}`),this.code=this.name=i.code,this.data={noun:t,where:e,canForce:r}}}i.code="AlreadyExistsError"},function(t,e,r){"use strict";function n(t){const e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return-1===e?".":0===e?"/":t.slice(0,e)}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(t[n]=r[n])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var o={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){var e,r,n,i,o,a;for(n=0,e=0,r=t.length;e<r;e++)n+=t[e].length;for(a=new Uint8Array(n),i=0,e=0,r=t.length;e<r;e++)o=t[e],a.set(o,i),i+=o.length;return a}},a={arraySet:function(t,e,r,n,i){for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,o)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,a))},e.setTyped(n)},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t){super(`Expected a 40-char hex object id but saw "${t}".`),this.code=this.name=i.code,this.data={value:t}}}i.code="InvalidOidError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(68);function i(t,e,r,n){if(void 0!==t&&void 0!==e)return[t,e];void 0===r&&(r=n.valueOf());const i=Math.floor(r/1e3);return[i,1e6*(r-1e3*i)]}function o(t){const[e,r]=i(t.ctimeSeconds,t.ctimeNanoseconds,t.ctimeMs,t.ctime),[o,a]=i(t.mtimeSeconds,t.mtimeNanoseconds,t.mtimeMs,t.mtime);return{ctimeSeconds:e%2**32,ctimeNanoseconds:r%2**32,mtimeSeconds:o%2**32,mtimeNanoseconds:a%2**32,dev:t.dev%2**32,ino:t.ino%2**32,mode:Object(n.a)(t.mode%2**32),uid:t.uid%2**32,gid:t.gid%2**32,size:t.size>-1?t.size%2**32:0}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t,e){super(`Expected "${t}" but received "${e}".`),this.code=this.name=i.code,this.data={expected:t,actual:e}}}i.code="ParseError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));const n=Symbol("GitWalkSymbol")},function(t,e,r){"use strict";function n(t,e){return-(t<e)||+(t>e)}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(76);function i(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function s(t){i(a,n,o,s,c,"next",t)}function c(t){i(a,n,o,s,c,"throw",t)}s(void 0)}))}}function a(t,e){return s.apply(this,arguments)}function s(){return(s=o((function*(t,e){const r=Object(n.a)(t);for(;;){const{value:t,done:n}=yield r.next();if(t&&(yield e(t)),n)break}r.return&&r.return()}))).apply(this,arguments)}},function(t,e,r){"use strict";function n(t){const e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return e>-1&&(t=t.slice(e+1)),t}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t,e){super(`"${t}" would be an invalid git reference. (Hint: a valid alternative would be "${e}".)`),this.code=this.name=i.code,this.data={ref:t,suggestion:e}}}i.code="InvalidRefNameError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return u}));var n=r(55),i=r.n(n),o=r(1);function a(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,c,"next",t)}function c(t){a(o,n,i,s,c,"throw",t)}s(void 0)}))}}let c=null;class u{static read({fs:t,gitdir:e}){return s((function*(){null===c&&(c=new i.a);const r=Object(o.a)(e,"shallow"),n=new Set;return yield c.acquire(r,s((function*(){const e=yield t.read(r,{encoding:"utf8"});return null===e?n:""===e.trim()?n:void e.trim().split("\n").map(t=>n.add(t))}))),n}))()}static write({fs:t,gitdir:e,oids:r}){return s((function*(){null===c&&(c=new i.a);const n=Object(o.a)(e,"shallow");if(r.size>0){const e=[...r].join("\n")+"\n";yield c.acquire(n,s((function*(){yield t.write(n,e,{encoding:"utf8"})})))}else yield c.acquire(n,s((function*(){yield t.rm(n)})))}))()}}},function(t,e,r){"use strict";function n(t,e,r){return e=e instanceof RegExp?e:new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),t.replace(e,r)}var i={clean:function(t){if("string"!=typeof t)throw new Error("Expected a string, received: "+t);return t=n(t,"./","/"),t=n(t,"..","."),t=n(t," ","-"),t=n(t,/^[~^:?*\\\-]/g,""),t=n(t,/[~^:?*\\]/g,"-"),t=n(t,/[~^:?*\\\-]$/g,""),t=n(t,"@{","-"),t=n(t,/\.$/g,""),t=n(t,/\/$/g,""),t=n(t,/\.lock$/g,"")}};t.exports=i},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t){super(`The filepath "${t}" contains unsafe character sequences`),this.code=this.name=i.code,this.data={filepath:t}}}i.code="UnsafeFilepathError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(){super("Merges with conflicts are not supported yet."),this.code=this.name=i.code,this.data={}}}i.code="MergeNotSupportedError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));const n={name:"isomorphic-git",version:"1.8.10",agent:"git/isomorphic-git@1.8.10"}},function(t,e,r){"use strict";var n={};(0,r(27).assign)(n,r(137),r(140),r(109)),t.exports=n},function(t,e,r){"use strict";function n(t,e){const r=e.toString(16);return"0".repeat(t-r.length)+r}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";function n(t){const[,e,r,n,o]=t.match(/^(.*) <(.*)> (.*) (.*)$/);return{name:e,email:r,timestamp:Number(n),timezoneOffset:i(o)}}function i(t){let[,e,r,n]=t.match(/(\+|-)(\d\d)(\d\d)/);return n=("+"===e?1:-1)*(60*Number(r)+Number(n)),0===(i=n)?i:-i;var i}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";var n=r(9),i=r(14),o=r(3),a=r(11),s=r(7),c=r(1),u=r(68),f=r(51);function l(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function d(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){l(o,n,i,a,s,"next",t)}function s(t){l(o,n,i,a,s,"throw",t)}a(void 0)}))}}class h{constructor({fs:t,gitdir:e,ref:r,cache:i}){var a=this;this.fs=t,this.cache=i,this.gitdir=e,this.mapPromise=d((function*(){const i=new Map;let s;try{s=yield o.a.resolve({fs:t,gitdir:e,ref:r})}catch(t){t instanceof n.a&&(s="4b825dc642cb6eb9a060e54bf8d69288fbee4904")}const c=yield Object(f.a)({fs:t,cache:a.cache,gitdir:e,oid:s});return c.type="tree",c.mode="40000",i.set(".",c),i}))();const s=this;this.ConstructEntry=class{constructor(t){this._fullpath=t,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}type(){var t=this;return d((function*(){return s.type(t)}))()}mode(){var t=this;return d((function*(){return s.mode(t)}))()}stat(){var t=this;return d((function*(){return s.stat(t)}))()}content(){var t=this;return d((function*(){return s.content(t)}))()}oid(){var t=this;return d((function*(){return s.oid(t)}))()}}}readdir(t){var e=this;return d((function*(){const r=t._fullpath,{fs:n,cache:o,gitdir:u}=e,f=yield e.mapPromise,l=f.get(r);if(!l)throw new Error(`No obj for ${r}`);const d=l.oid;if(!d)throw new Error(`No oid for obj ${JSON.stringify(l)}`);if("tree"!==l.type)return null;const{type:h,object:p}=yield Object(s.a)({fs:n,cache:o,gitdir:u,oid:d});if(h!==l.type)throw new i.a(d,h,l.type);const y=a.a.from(p);for(const t of y)f.set(Object(c.a)(r,t.path),t);return y.entries().map(t=>Object(c.a)(r,t.path))}))()}type(t){var e=this;return d((function*(){if(!1===t._type){const r=yield e.mapPromise,{type:n}=r.get(t._fullpath);t._type=n}return t._type}))()}mode(t){var e=this;return d((function*(){if(!1===t._mode){const r=yield e.mapPromise,{mode:n}=r.get(t._fullpath);t._mode=Object(u.a)(parseInt(n,8))}return t._mode}))()}stat(t){return d((function*(){}))()}content(t){var e=this;return d((function*(){if(!1===t._content){const r=yield e.mapPromise,{fs:n,cache:i,gitdir:o}=e,a=r.get(t._fullpath).oid,{type:c,object:u}=yield Object(s.a)({fs:n,cache:i,gitdir:o,oid:a});t._content="blob"!==c?void 0:new Uint8Array(u)}return t._content}))()}oid(t){var e=this;return d((function*(){if(!1===t._oid){const r=(yield e.mapPromise).get(t._fullpath);t._oid=r.oid}return t._oid}))()}}var p=r(31);function y({ref:t="HEAD"}){const e=Object.create(null);return Object.defineProperty(e,p.a,{value:function({fs:e,gitdir:r,cache:n}){return new h({fs:e,gitdir:r,ref:t,cache:n})}}),Object.freeze(e),e}r.d(e,"a",(function(){return y}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(33);function i(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function s(t){i(a,n,o,s,c,"next",t)}function c(t){i(a,n,o,s,c,"throw",t)}s(void 0)}))}}function a(t){return s.apply(this,arguments)}function s(){return(s=o((function*(t){let e=0;const r=[];yield Object(n.a)(t,t=>{r.push(t),e+=t.byteLength});const i=new Uint8Array(e);let o=0;for(const t of r)i.set(t,o),o+=t.byteLength;return i}))).apply(this,arguments)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var n=r(82),i=r(51);function o(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function s(t){o(a,n,i,s,c,"next",t)}function c(t){o(a,n,i,s,c,"throw",t)}s(void 0)}))}}function s(t){return c.apply(this,arguments)}function c(){return(c=a((function*({fs:t,cache:e,gitdir:r,oid:o,filepath:a}){void 0!==a&&(o=yield Object(n.a)({fs:t,cache:e,gitdir:r,oid:o,filepath:a}));const{tree:s,oid:c}=yield Object(i.a)({fs:t,cache:e,gitdir:r,oid:o});return{oid:c,tree:s.entries()}}))).apply(this,arguments)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var n=r(3),i=r(99);function o(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function s(t){o(a,n,i,s,c,"next",t)}function c(t){o(a,n,i,s,c,"throw",t)}s(void 0)}))}}function s(t){return c.apply(this,arguments)}function c(){return(c=a((function*({fs:t,gitdir:e,fullname:r=!1,test:o=!1}){const a=yield n.a.resolve({fs:t,gitdir:e,ref:"HEAD",depth:2});if(o)try{yield n.a.resolve({fs:t,gitdir:e,ref:a})}catch(t){return}if(a.startsWith("refs/"))return r?a:Object(i.a)(a)}))).apply(this,arguments)}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return m}));var n=r(49),i=r(61),o=r(64),a=r(75),s=r(45),c=r(100),u=r(77);function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(r,!0).forEach((function(e){d(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function d(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function p(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){h(o,n,i,a,s,"next",t)}function s(t){h(o,n,i,a,s,"throw",t)}a(void 0)}))}}const y=(t,e)=>t.endsWith("?")?`${t}${e}`:`${t}/${e.replace(/^https?:\/\//,"")}`,g=(t,e)=>{(e.username||e.password)&&(t.Authorization=Object(a.a)(e)),e.headers&&Object.assign(t,e.headers)},v=function(){var e=p((function*(e){try{const r=t.from(yield Object(s.a)(e.body)),n=r.toString("utf8");return{preview:n.length<256?n:n.slice(0,256)+"...",response:n,data:r}}catch(t){return{}}}));return function(t){return e.apply(this,arguments)}}();class m{static capabilities(){return p((function*(){return["discover","connect"]}))()}static discover({http:t,onProgress:e,onAuth:r,onAuthSuccess:s,onAuthFailure:f,corsProxy:d,service:h,url:m,headers:w,protocolVersion:b}){return p((function*(){let{url:p,auth:_}=Object(c.a)(m);const O=d?y(d,p):p;let x,j;(_.username||_.password)&&(w.Authorization=Object(a.a)(_)),2===b&&(w["Git-Protocol"]="version=2");let P=!1;do{if(x=yield t.request({onProgress:e,method:"GET",url:`${O}/info/refs?service=${h}`,headers:w}),j=!1,401===x.statusCode||203===x.statusCode){const t=P?f:r;if(t){if(_=yield t(p,l({},_,{headers:l({},w)})),_&&_.cancel)throw new o.a;_&&(g(w,_),P=!0,j=!0)}}else 200===x.statusCode&&P&&s&&(yield s(p,_))}while(j);if(200!==x.statusCode){const{response:t}=yield v(x);throw new n.a(x.statusCode,x.statusMessage,t)}if(x.headers["content-type"]===`application/x-${h}-advertisement`){const t=yield Object(u.a)(x.body,{service:h});return t.auth=_,t}{const{preview:t,response:e,data:r}=yield v(x);try{const t=yield Object(u.a)([r],{service:h});return t.auth=_,t}catch(r){throw new i.a(t,e)}}}))()}static connect({http:t,onProgress:e,corsProxy:r,service:i,url:o,auth:a,body:s,headers:u}){return p((function*(){const f=Object(c.a)(o);f&&(o=f.url),r&&(o=y(r,o)),u["content-type"]=`application/x-${i}-request`,u.accept=`application/x-${i}-result`,g(u,a);const l=yield t.request({onProgress:e,method:"POST",url:`${o}/${i}`,body:s,headers:u});if(200!==l.statusCode){const{response:t}=v(l);throw new n.a(l.statusCode,l.statusMessage,t)}return l}))()}}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t,e,r){super(`HTTP Error: ${t} ${e}`),this.code=this.name=i.code,this.data={statusCode:t,statusMessage:e,response:r}}}i.code="HttpError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(32);function i(t,e){return Object(n.a)(t.path,e.path)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return f}));var n=r(14),i=r(15),o=r(12),a=r(11),s=r(7);function c(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){c(o,n,i,a,s,"next",t)}function s(t){c(o,n,i,a,s,"throw",t)}a(void 0)}))}}function f(t){return l.apply(this,arguments)}function l(){return(l=u((function*({fs:t,cache:e,gitdir:r,oid:c}){if("4b825dc642cb6eb9a060e54bf8d69288fbee4904"===c)return{tree:a.a.from([]),oid:c};const{type:u,object:l}=yield Object(s.a)({fs:t,cache:e,gitdir:r,oid:c});if("tag"===u)return f({fs:t,cache:e,gitdir:r,oid:c=i.a.from(l).parse().object});if("commit"===u)return f({fs:t,cache:e,gitdir:r,oid:c=o.a.from(l).parse().tree});if("tree"!==u)throw new n.a(c,u,"tree");return{tree:a.a.from(l),oid:c}}))).apply(this,arguments)}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return p}));var n=r(119),i=r.n(n),o=r(5),a=r(23),s=r(18),c=r(121),u=r(120),f=r(73),l=r(16);function d(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){d(o,n,i,a,s,"next",t)}function s(t){d(o,n,i,a,s,"throw",t)}a(void 0)}))}}class p{constructor(t){Object.assign(this,t),this.offsetCache={}}static fromIdx({idx:t,getExternalRefDelta:e}){return h((function*(){const r=new s.a(t);if("ff744f63"!==r.slice(4).toString("hex"))return;const n=r.readUInt32BE();if(2!==n)throw new o.a(`Unable to read version ${n} packfile IDX. (Only version 2 supported)`);if(t.byteLength>2147483648)throw new o.a("To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.");r.seek(r.tell()+1020);const i=r.readUInt32BE(),a=[];for(let t=0;t<i;t++){const e=r.slice(20).toString("hex");a[t]=e}r.seek(r.tell()+4*i);const c=new Map;for(let t=0;t<i;t++)c.set(a[t],r.readUInt32BE());const u=r.slice(20).toString("hex");return new p({hashes:a,crcs:{},offsets:c,packfileSha:u,getExternalRefDelta:e})}))()}static fromPack({pack:t,getExternalRefDelta:e,onProgress:r}){return h((function*(){const n={1:"commit",2:"tree",3:"blob",4:"tag",6:"ofs-delta",7:"ref-delta"},o={},s=t.slice(-20).toString("hex"),c=[],f={},d=new Map;let y=null,g=null;yield Object(u.a)([t],function(){var t=h((function*({data:t,type:e,reference:i,offset:a,num:s}){null===y&&(y=s);const c=Math.floor(100*(y-s)/y);c!==g&&r&&(yield r({phase:"Receiving objects",loaded:y-s,total:y})),g=c,["commit","tree","blob","tag"].includes(e=n[e])?o[a]={type:e,offset:a}:"ofs-delta"===e?o[a]={type:e,offset:a}:"ref-delta"===e&&(o[a]={type:e,offset:a})}));return function(e){return t.apply(this,arguments)}}());const v=Object.keys(o).map(Number);for(const[e,r]of v.entries()){const n=e+1===v.length?t.byteLength-20:v[e+1],a=o[r],s=i.a.buf(t.slice(r,n))>>>0;a.end=n,a.crc=s}const m=new p({pack:Promise.resolve(t),packfileSha:s,crcs:f,hashes:c,offsets:d,getExternalRefDelta:e});g=null;let w=0;const b=[0,0,0,0,0,0,0,0,0,0,0,0];for(let t in o){t=Number(t);const e=Math.floor(100*w++/y);e!==g&&r&&(yield r({phase:"Resolving deltas",loaded:w,total:y})),g=e;const n=o[t];if(!n.oid)try{m.readDepth=0,m.externalReadDepth=0;const{type:e,object:r}=yield m.readSlice({start:t});b[m.readDepth]+=1;const i=yield Object(l.a)(a.a.wrap({type:e,object:r}));n.oid=i,c.push(i),d.set(i,t),f[i]=n.crc}catch(t){continue}}return c.sort(),m}))()}toBuffer(){var e=this;return h((function*(){const r=[],n=(e,n)=>{r.push(t.from(e,n))};n("ff744f63","hex"),n("00000002","hex");const i=new s.a(t.alloc(1024));for(let t=0;t<256;t++){let r=0;for(const n of e.hashes)parseInt(n.slice(0,2),16)<=t&&r++;i.writeUInt32BE(r)}r.push(i.buffer);for(const t of e.hashes)n(t,"hex");const o=new s.a(t.alloc(4*e.hashes.length));for(const t of e.hashes)o.writeUInt32BE(e.crcs[t]);r.push(o.buffer);const a=new s.a(t.alloc(4*e.hashes.length));for(const t of e.hashes)a.writeUInt32BE(e.offsets.get(t));r.push(a.buffer),n(e.packfileSha,"hex");const c=t.concat(r),u=yield Object(l.a)(c),f=t.alloc(20);return f.write(u,"hex"),t.concat([c,f])}))()}load({pack:t}){var e=this;return h((function*(){e.pack=t}))()}unload(){var t=this;return h((function*(){t.pack=null}))()}read({oid:t}){var e=this;return h((function*(){if(!e.offsets.get(t)){if(e.getExternalRefDelta)return e.externalReadDepth++,e.getExternalRefDelta(t);throw new o.a(`Could not read object ${t} from packfile`)}const r=e.offsets.get(t);return e.readSlice({start:r})}))()}readSlice({start:e}){var r=this;return h((function*(){if(r.offsetCache[e])return Object.assign({},r.offsetCache[e]);r.readDepth++;if(!r.pack)throw new o.a("Tried to read from a GitPackIndex with no packfile loaded into memory");const n=(yield r.pack).slice(e),i=new s.a(n),a=i.readUInt8(),u=112&a;let l={16:"commit",32:"tree",48:"blob",64:"tag",96:"ofs_delta",112:"ref_delta"}[u];if(void 0===l)throw new o.a("Unrecognized type: 0b"+u.toString(2));const d=15&a;let h=d;128&a&&(h=function(t,e){let r=e,n=4,i=null;do{i=t.readUInt8(),r|=(127&i)<<n,n+=7}while(128&i);return r}(i,d));let p=null,y=null;if("ofs_delta"===l){const t=function(t){const e=[];let r=0,n=0;do{r=t.readUInt8();const i=127&r;e.push(i),n=128&r}while(n);return e.reduce((t,e)=>t+1<<7|e,-1)}(i),n=e-t;({object:p,type:l}=yield r.readSlice({start:n}))}if("ref_delta"===l){const t=i.slice(20).toString("hex");({object:p,type:l}=yield r.read({oid:t}))}const g=n.slice(i.tell());if(y=t.from(yield Object(f.a)(g)),y.byteLength!==h)throw new o.a(`Packfile told us object would have length ${h} but it had length ${y.byteLength}`);return p&&(y=t.from(Object(c.a)(y,p))),r.readDepth>3&&(r.offsetCache[e]={type:l,object:y}),{type:l,format:"content",object:y}}))()}}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";var n=r(62),i=r(63);var o=r(48);r.d(e,"a",(function(){return a}));class a{static getRemoteHelperFor({url:t}){const e=new Map;e.set("http",o.a),e.set("https",o.a);const r=function({url:t}){if(t.startsWith("git@"))return{transport:"ssh",address:t};const e=t.match(/(\w+)(:\/\/|::)(.*)/);return null!==e?"://"===e[2]?{transport:e[1],address:e[0]}:"::"===e[2]?{transport:e[1],address:e[3]}:void 0:void 0}({url:t});if(!r)throw new i.a(t);if(e.has(r.transport))return e.get(r.transport);throw new n.a(t,r.transport,"ssh"===r.transport?function(t){return t=(t=t.replace(/^git@([^:]+):/,"https://$1/")).replace(/^ssh:\/\//,"https://")}(t):void 0)}}},function(t,e,r){"use strict";function n(t,e){const r=e-t;return Array.from({length:r},(e,r)=>t+r)}var i=r(97),o=r(31);class a{constructor(){this.value=null}consider(t){null!=t&&(null===this.value?this.value=t:t<this.value&&(this.value=t))}reset(){this.value=null}}function*s(t){const e=new a;let r;const n=[],i=t.length;for(let r=0;r<i;r++)n[r]=t[r].next().value,void 0!==n[r]&&e.consider(n[r]);if(null!==e.value)for(;;){const o=[];r=e.value,e.reset();for(let a=0;a<i;a++)void 0!==n[a]&&n[a]===r?(o[a]=n[a],n[a]=t[a].next().value):o[a]=null,void 0!==n[a]&&e.consider(n[a]);if(yield o,null===e.value)return}}function c(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){c(o,n,i,a,s,"next",t)}function s(t){c(o,n,i,a,s,"throw",t)}a(void 0)}))}}function f(t){return l.apply(this,arguments)}function l(){return(l=u((function*({fs:t,cache:e,dir:r,gitdir:a,trees:c,map:f=function(){var t=u((function*(t,e){return e}));return function(e,r){return t.apply(this,arguments)}}(),reduce:l=function(){var t=u((function*(t,e){const r=Object(i.a)(e);return void 0!==t&&r.unshift(t),r}));return function(e,r){return t.apply(this,arguments)}}(),iterate:d=((t,e)=>Promise.all([...e].map(t)))}){const h=c.map(n=>n[o.a]({fs:t,dir:r,gitdir:a,cache:e})),p=new Array(h.length).fill("."),y=n(0,h.length),g=function(){var t=u((function*(t){y.map(e=>{t[e]=t[e]&&new h[e].ConstructEntry(t[e])});const e=(yield Promise.all(y.map(e=>t[e]?h[e].readdir(t[e]):[]))).map(t=>null===t?[]:t).map(t=>t[Symbol.iterator]());return{entries:t,children:s(e)}}));return function(e){return t.apply(this,arguments)}}(),v=function(){var t=u((function*(t){const{entries:e,children:r}=yield g(t),n=e.find(t=>t&&t._fullpath)._fullpath,i=yield f(n,e);if(null!==i){let t=yield d(v,r);return t=t.filter(t=>void 0!==t),l(i,t)}}));return function(e){return t.apply(this,arguments)}}();return v(p)}))).apply(this,arguments)}r.d(e,"a",(function(){return f}))},function(t,e,r){"use strict";t.exports=r(130)},function(t,e,r){"use strict";function n({name:t,email:e,timestamp:r,timezoneOffset:n}){return`${t} <${e}> ${r} ${n=function(t){const e=function(t){return Math.sign(t)||(Object.is(t,-0)?-1:1)}((r=t,0===r?r:-r));var r;t=Math.abs(t);const n=Math.floor(t/60);t-=60*n;let i=String(n),o=String(t);i.length<2&&(i="0"+i);o.length<2&&(o="0"+o);return(-1===e?"-":"+")+i+o}(n)}`}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";function n(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}r.d(e,"a",(function(){return i}));class i{constructor(){this._queue=[]}write(t){if(this._ended)throw Error("You cannot write to a FIFO that has already been ended!");if(this._waiting){const e=this._waiting;this._waiting=null,e({value:t})}else this._queue.push(t)}end(){if(this._ended=!0,this._waiting){const t=this._waiting;this._waiting=null,t({done:!0})}}destroy(t){this._ended=!0,this.error=t}next(){var t,e=this;return(t=function*(){if(e._queue.length>0)return{value:e._queue.shift()};if(e._ended)return{done:!0};if(e._waiting)throw Error("You cannot call read until the previous call to read has returned!");return new Promise(t=>{e._waiting=t})},function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function s(t){n(a,i,o,s,c,"next",t)}function c(t){n(a,i,o,s,c,"throw",t)}s(void 0)}))})()}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t,e){super(`Remote does not support the "${t}" so the "${e}" parameter cannot be used.`),this.code=this.name=i.code,this.data={capability:t,parameter:e}}}i.code="RemoteCapabilityError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(){super("Empty response from git server."),this.code=this.name=i.code,this.data={}}}i.code="EmptyServerResponseError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t){super(`Could not find a fetch refspec for remote "${t}". Make sure the config file has an entry like the following:\n[remote "${t}"]\n\tfetch = +refs/heads/*:refs/remotes/origin/*\n`),this.code=this.name=i.code,this.data={remote:t}}}i.code="NoRefspecError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t,e){super(`Remote did not reply using the "smart" HTTP protocol. Expected "001e# service=git-upload-pack" but received: ${t}`),this.code=this.name=i.code,this.data={preview:t,response:e}}}i.code="SmartHttpError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t,e,r){super(`Git remote "${t}" uses an unrecognized transport protocol: "${e}"`),this.code=this.name=i.code,this.data={url:t,transport:e,suggestion:r}}}i.code="UnknownTransportError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t){super(`Cannot parse remote URL: "${t}"`),this.code=this.name=i.code,this.data={url:t}}}i.code="UrlParseError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(){super("The operation was canceled."),this.code=this.name=i.code,this.data={}}}i.code="UserCanceledError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return u}));var n=r(123),i=r.n(n),o=r(34),a=r(26),s=r(1);function c(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}class u{static isIgnored({fs:t,dir:e,gitdir:r=Object(s.a)(e,".git"),filepath:n}){return(u=function*(){if(".git"===Object(o.a)(n))return!0;if("."===n)return!1;let c="";const u=Object(s.a)(r,"info","exclude");(yield t.exists(u))&&(c=yield t.read(u,"utf8"));const f=[{gitignore:Object(s.a)(e,".gitignore"),filepath:n}],l=n.split("/");for(let t=1;t<l.length;t++){const r=l.slice(0,t).join("/"),n=l.slice(t).join("/");f.push({gitignore:Object(s.a)(e,r,".gitignore"),filepath:n})}let d=!1;for(const e of f){let r;try{r=yield t.read(e.gitignore,"utf8")}catch(t){if("NOENT"===t.code)continue}const n=i()().add(c);n.add(r);const o=Object(a.a)(e.filepath);if("."!==o&&n.ignores(o))return!0;d=d?!n.test(e.filepath).unignored:n.test(e.filepath).ignored}return d},function(){var t=this,e=arguments;return new Promise((function(r,n){var i=u.apply(t,e);function o(t){c(i,r,n,o,a,"next",t)}function a(t){c(i,r,n,o,a,"throw",t)}o(void 0)}))})();var u}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(57),i=r(8);function o(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}class a{static demux(t){const e=i.a.streamReader(t),r=new n.a,a=new n.a,s=new n.a,c=function(){var t,n=(t=function*(){const t=yield e();if(null===t)return c();if(!0===t)return r.end(),s.end(),void a.end();switch(t[0]){case 1:a.write(t.slice(1));break;case 2:s.write(t.slice(1));break;case 3:{const e=t.slice(1);return s.write(e),void a.destroy(new Error(e.toString("utf8")))}default:r.write(t.slice(0))}c()},function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function s(t){o(a,n,i,s,c,"next",t)}function c(t){o(a,n,i,s,c,"throw",t)}s(void 0)}))});return function(){return n.apply(this,arguments)}}();return c(),{packetlines:r,packfile:a,progress:s}}}},function(t,e,r){var n=r(135),i=r(136),o=r(104).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function l(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,d=0;d<16;++d)r[d]=t.readInt32BE(4*d);for(;d<80;++d)r[d]=(e=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|e>>>31;for(var h=0;h<80;++h){var p=~~(h/20),y=u(n)+l(p,i,o,s)+c+r[h]+a[p]|0;c=s,s=o,o=f(i),i=n,n=y}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=c},function(t,e,r){"use strict";function n(t){let e=t>0?t>>12:0;4!==e&&8!==e&&10!==e&&14!==e&&(e=8);let r=511&t;return r=73&r?493:420,8!==e&&(r=0),(e<<12)+r}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(29);function i(t,e){const r=Object(n.a)(t),i=Object(n.a)(e);return r.mode!==i.mode||r.mtimeSeconds!==i.mtimeSeconds||r.ctimeSeconds!==i.ctimeSeconds||r.uid!==i.uid||r.gid!==i.gid||r.ino!==i.ino||r.size!==i.size}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(5);class i{constructor({remotePath:t,localPath:e,force:r,matchPrefix:n}){Object.assign(this,{remotePath:t,localPath:e,force:r,matchPrefix:n})}static from(t){const[e,r,o,a,s]=t.match(/^(\+?)(.*?)(\*?):(.*?)(\*?)$/).slice(1),c="+"===e,u="*"===o;if(u!==("*"===s))throw new n.a("Invalid refspec");return new i({remotePath:r,localPath:a,force:c,matchPrefix:u})}translate(t){if(this.matchPrefix){if(t.startsWith(this.remotePath))return this.localPath+t.replace(this.remotePath,"")}else if(t===this.remotePath)return this.localPath;return null}reverseTranslate(t){if(this.matchPrefix){if(t.startsWith(this.localPath))return this.remotePath+t.replace(this.localPath,"")}else if(t===this.localPath)return this.remotePath;return null}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r(52);function i(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function s(t){i(a,n,o,s,c,"next",t)}function c(t){i(a,n,o,s,c,"throw",t)}s(void 0)}))}}const a=Symbol("PackfileCache");function s(){return(s=o((function*({fs:t,filename:e,getExternalRefDelta:r,emitter:i,emitterPrefix:o}){const a=yield t.read(e);return n.a.fromIdx({idx:a,getExternalRefDelta:r})}))).apply(this,arguments)}function c({fs:t,cache:e,filename:r,getExternalRefDelta:n,emitter:i,emitterPrefix:o}){e[a]||(e[a]=new Map);let c=e[a].get(r);return c||(c=function(t){return s.apply(this,arguments)}({fs:t,filename:r,getExternalRefDelta:n,emitter:i,emitterPrefix:o}),e[a].set(r,c)),c}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return a}));var n=r(76);function i(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function s(t){i(a,n,o,s,c,"next",t)}function c(t){i(a,n,o,s,c,"throw",t)}s(void 0)}))}}class a{constructor(t){this.stream=Object(n.a)(t),this.buffer=null,this.cursor=0,this.undoCursor=0,this.started=!1,this._ended=!1,this._discardedBytes=0}eof(){return this._ended&&this.cursor===this.buffer.length}tell(){return this._discardedBytes+this.cursor}byte(){var t=this;return o((function*(){if(!t.eof()&&(t.started||(yield t._init()),t.cursor!==t.buffer.length||(yield t._loadnext(),!t._ended)))return t._moveCursor(1),t.buffer[t.undoCursor]}))()}chunk(){var t=this;return o((function*(){if(!t.eof()&&(t.started||(yield t._init()),t.cursor!==t.buffer.length||(yield t._loadnext(),!t._ended)))return t._moveCursor(t.buffer.length),t.buffer.slice(t.undoCursor,t.cursor)}))()}read(t){var e=this;return o((function*(){if(!e.eof())return e.started||(yield e._init()),e.cursor+t>e.buffer.length&&(e._trim(),yield e._accumulate(t)),e._moveCursor(t),e.buffer.slice(e.undoCursor,e.cursor)}))()}skip(t){var e=this;return o((function*(){e.eof()||(e.started||(yield e._init()),e.cursor+t>e.buffer.length&&(e._trim(),yield e._accumulate(t)),e._moveCursor(t))}))()}undo(){var t=this;return o((function*(){t.cursor=t.undoCursor}))()}_next(){var e=this;return o((function*(){e.started=!0;let{done:r,value:n}=yield e.stream.next();return r&&(e._ended=!0),n&&(n=t.from(n)),n}))()}_trim(){this.buffer=this.buffer.slice(this.undoCursor),this.cursor-=this.undoCursor,this._discardedBytes+=this.undoCursor,this.undoCursor=0}_moveCursor(t){this.undoCursor=this.cursor,this.cursor+=t,this.cursor>this.buffer.length&&(this.cursor=this.buffer.length)}_accumulate(e){var r=this;return o((function*(){if(r._ended)return;const n=[r.buffer];for(;r.cursor+e>s(n);){const t=yield r._next();if(r._ended)break;n.push(t)}r.buffer=t.concat(n)}))()}_loadnext(){var t=this;return o((function*(){t._discardedBytes+=t.buffer.length,t.undoCursor=0,t.cursor=0,t.buffer=yield t._next()}))()}_init(){var t=this;return o((function*(){t.buffer=yield t._next()}))()}}function s(t){return t.reduce((t,e)=>t+e.length,0)}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r(41),i=r.n(n);function o(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function s(t){o(a,n,i,s,c,"next",t)}function c(t){o(a,n,i,s,c,"throw",t)}s(void 0)}))}}let s=!1;function c(t){return u.apply(this,arguments)}function u(){return(u=a((function*(t){return null===s&&(s=d()),s?f(t):i.a.inflate(t)}))).apply(this,arguments)}function f(t){return l.apply(this,arguments)}function l(){return(l=a((function*(t){const e=new DecompressionStream("deflate"),r=new Blob([t]).stream().pipeThrough(e);return new Uint8Array(yield new Response(r).arrayBuffer())}))).apply(this,arguments)}function d(){try{if(new DecompressionStream("deflate"))return!0}catch(t){}return!1}},function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r(41),i=r.n(n);function o(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function s(t){o(a,n,i,s,c,"next",t)}function c(t){o(a,n,i,s,c,"throw",t)}s(void 0)}))}}let s=null;function c(t){return u.apply(this,arguments)}function u(){return(u=a((function*(t){return null===s&&(s=d()),s?f(t):i.a.deflate(t)}))).apply(this,arguments)}function f(t){return l.apply(this,arguments)}function l(){return(l=a((function*(t){const e=new CompressionStream("deflate"),r=new Blob([t]).stream().pipeThrough(e);return new Uint8Array(yield new Response(r).arrayBuffer())}))).apply(this,arguments)}function d(){try{const t=new CompressionStream("deflate");if(new Blob([]).stream(),t)return!0}catch(t){}return!1}},function(t,e,r){"use strict";(function(t){function n({username:e="",password:r=""}){return`Basic ${t.from(`${e}:${r}`).toString("base64")}`}r.d(e,"a",(function(){return n}))}).call(this,r(10).Buffer)},function(t,e,r){"use strict";function n(t){return t[Symbol.asyncIterator]?t[Symbol.asyncIterator]():t[Symbol.iterator]?t[Symbol.iterator]():t.next?t:function(t){let e=[t];return{next:()=>Promise.resolve({done:0===e.length,value:e.pop()}),return:()=>(e=[],{}),[Symbol.asyncIterator](){return this}}}(t)}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";var n=r(59),i=r(30),o=r(8);function a(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,c,"next",t)}function c(t){a(o,n,i,s,c,"throw",t)}s(void 0)}))}}function c(t){return u.apply(this,arguments)}function u(){return(u=s((function*(t){const e={};let r;for(;r=yield t(),!0!==r;){if(null===r)continue;r=r.toString("utf8").replace(/\n$/,"");const t=r.indexOf("=");if(t>-1){const n=r.slice(0,t),i=r.slice(t+1);e[n]=i}else e[r]=!0}return{protocolVersion:2,capabilities2:e}}))).apply(this,arguments)}function f(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){f(o,n,i,a,s,"next",t)}function s(t){f(o,n,i,a,s,"throw",t)}a(void 0)}))}}function d(t,e){return h.apply(this,arguments)}function h(){return(h=l((function*(t,{service:e}){const r=new Set,a=new Map,s=new Map,u=o.a.streamReader(t);let f=yield u();for(;null===f;)f=yield u();if(!0===f)throw new n.a;if(f.toString("utf8").replace(/\n$/,"")!==`# service=${e}`)throw new i.a(`# service=${e}\\n`,f.toString("utf8"));let l=yield u();for(;null===l;)l=yield u();if(!0===l)return{capabilities:r,refs:a,symrefs:s};if(l=l.toString("utf8"),l.includes("version 2"))return c(u);const[d,h]=p(l,"\0","\\x00");h.split(" ").map(t=>r.add(t));const[y,g]=p(d," "," ");for(a.set(g,y);;){const t=yield u();if(!0===t)break;if(null!==t){const[e,r]=p(t.toString("utf8")," "," ");a.set(r,e)}}for(const t of r)if(t.startsWith("symref=")){const e=t.match(/symref=([^:]+):(.*)/);3===e.length&&s.set(e[1],e[2])}return{protocolVersion:1,capabilities:r,refs:a,symrefs:s}}))).apply(this,arguments)}function p(t,e,r){const n=t.trim().split(e);if(2!==n.length)throw new i.a(`Two strings separated by '${r}'`,t.toString("utf8"));return n}r.d(e,"a",(function(){return d}))},function(t,e,r){"use strict";function n(t){return t.trim().split("\n").map(t=>" "+t).join("\n")+"\n"}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";r.r(e);var n=r(25);r.d(e,"AlreadyExistsError",(function(){return n.a}));var i=r(85);r.d(e,"AmbiguousError",(function(){return i.a}));var o=r(86);r.d(e,"CheckoutConflictError",(function(){return o.a}));var a=r(87);r.d(e,"CommitNotFetchedError",(function(){return a.a}));var s=r(59);r.d(e,"EmptyServerResponseError",(function(){return s.a}));var c=r(88);r.d(e,"FastForwardError",(function(){return c.a}));var u=r(89);r.d(e,"GitPushError",(function(){return u.a}));var f=r(49);r.d(e,"HttpError",(function(){return f.a}));var l=r(5);r.d(e,"InternalError",(function(){return l.a}));var d=r(80);r.d(e,"InvalidFilepathError",(function(){return d.a}));var h=r(28);r.d(e,"InvalidOidError",(function(){return h.a}));var p=r(35);r.d(e,"InvalidRefNameError",(function(){return p.a}));var y=r(90);r.d(e,"MaxDepthError",(function(){return y.a}));var g=r(39);r.d(e,"MergeNotSupportedError",(function(){return g.a}));var v=r(22);r.d(e,"MissingNameError",(function(){return v.a}));var m=r(24);r.d(e,"MissingParameterError",(function(){return m.a}));var w=r(60);r.d(e,"NoRefspecError",(function(){return w.a}));var b=r(9);r.d(e,"NotFoundError",(function(){return b.a}));var _=r(14);r.d(e,"ObjectTypeError",(function(){return _.a}));var O=r(30);r.d(e,"ParseError",(function(){return O.a}));var x=r(81);r.d(e,"PushRejectedError",(function(){return x.a}));var j=r(58);r.d(e,"RemoteCapabilityError",(function(){return j.a}));var P=r(61);r.d(e,"SmartHttpError",(function(){return P.a}));var k=r(62);r.d(e,"UnknownTransportError",(function(){return k.a}));var E=r(38);r.d(e,"UnsafeFilepathError",(function(){return E.a}));var A=r(63);r.d(e,"UrlParseError",(function(){return A.a}));var S=r(64);r.d(e,"UserCanceledError",(function(){return S.a}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t){let e="invalid filepath";"leading-slash"!==t&&"trailing-slash"!==t||(e='"filepath" parameter should not include leading or trailing directory separators because these can cause problems on some platforms.'),super(e),this.code=this.name=i.code,this.data={reason:t}}}i.code="InvalidFilepathError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t){let e="";"not-fast-forward"===t?e=" because it was not a simple fast-forward":"tag-exists"===t&&(e=" because tag already exists"),super(`Push rejected${e}. Use "force: true" to override.`),this.code=this.name=i.code,this.data={reason:t}}}i.code="PushRejectedError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return l}));var n=r(80),i=r(9),o=r(14),a=r(11),s=r(7),c=r(51);function u(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){u(o,n,i,a,s,"next",t)}function s(t){u(o,n,i,a,s,"throw",t)}a(void 0)}))}}function l(t){return d.apply(this,arguments)}function d(){return(d=f((function*({fs:t,cache:e,gitdir:r,oid:i,filepath:o}){if(o.startsWith("/"))throw new n.a("leading-slash");if(o.endsWith("/"))throw new n.a("trailing-slash");const a=i,s=yield Object(c.a)({fs:t,cache:e,gitdir:r,oid:i}),u=s.tree;if(""===o)i=s.oid;else{const n=o.split("/");i=yield h({fs:t,cache:e,gitdir:r,tree:u,pathArray:n,oid:a,filepath:o})}return i}))).apply(this,arguments)}function h(t){return p.apply(this,arguments)}function p(){return(p=f((function*({fs:t,cache:e,gitdir:r,tree:n,pathArray:c,oid:u,filepath:f}){const l=c.shift();for(const i of n)if(i.path===l){if(0===c.length)return i.oid;{const{type:l,object:d}=yield Object(s.a)({fs:t,cache:e,gitdir:r,oid:i.oid});if("tree"!==l)throw new o.a(u,l,"blob",f);return h({fs:t,cache:e,gitdir:r,tree:n=a.a.from(d),pathArray:c,oid:u,filepath:f})}}throw new i.a(`file or directory found at "${u}:${f}"`)}))).apply(this,arguments)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return l}));var n=r(19),i=r(3),o=r(12),a=r(11),s=r(17),c=r(92);function u(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){u(o,n,i,a,s,"next",t)}function s(t){u(o,n,i,a,s,"throw",t)}a(void 0)}))}}function l(t){return d.apply(this,arguments)}function d(){return(d=f((function*({fs:t,cache:e,onSign:r,gitdir:a,message:u,author:l,committer:d,signingKey:p,dryRun:y=!1,noUpdateBranch:g=!1,ref:v,parent:m,tree:w}){return v||(v=yield i.a.resolve({fs:t,gitdir:a,ref:"HEAD",depth:2})),n.a.acquire({fs:t,gitdir:a,cache:e},function(){var e=f((function*(e){const n=Object(c.a)(e.entries).get(".");if(w||(w=yield h({fs:t,gitdir:a,inode:n,dryRun:y})),!m)try{m=[yield i.a.resolve({fs:t,gitdir:a,ref:v})]}catch(t){m=[]}let f=o.a.from({tree:w,parent:m,author:l,committer:d,message:u});p&&(f=yield o.a.sign(f,r,p));const b=yield Object(s.a)({fs:t,gitdir:a,type:"commit",object:f.toObject(),dryRun:y});return g||y||(yield i.a.writeRef({fs:t,gitdir:a,ref:v,value:b})),b}));return function(t){return e.apply(this,arguments)}}())}))).apply(this,arguments)}function h(t){return p.apply(this,arguments)}function p(){return(p=f((function*({fs:t,gitdir:e,inode:r,dryRun:n}){const i=r.children;for(const r of i)"tree"===r.type&&(r.metadata.mode="040000",r.metadata.oid=yield h({fs:t,gitdir:e,inode:r,dryRun:n}));const o=i.map(t=>({mode:t.metadata.mode,path:t.basename,oid:t.metadata.oid,type:t.type})),c=a.a.from(o);return yield Object(s.a)({fs:t,gitdir:e,type:"tree",object:c.toObject(),dryRun:n})}))).apply(this,arguments)}},function(t,e,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t,e,r){super(`Found multiple ${t} matching "${e}" (${r.join(", ")}). Use a longer abbreviation length to disambiguate them.`),this.code=this.name=i.code,this.data={nouns:t,short:e,matches:r}}}i.code="AmbiguousError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t){super(`Your local changes to the following files would be overwritten by checkout: ${t.join(", ")}`),this.code=this.name=i.code,this.data={filepaths:t}}}i.code="CheckoutConflictError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t,e){super(`Failed to checkout "${t}" because commit ${e} is not available locally. Do a git fetch to make the branch available locally.`),this.code=this.name=i.code,this.data={ref:t,oid:e}}}i.code="CommitNotFetchedError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(){super("A simple fast-forward merge was not possible."),this.code=this.name=i.code,this.data={}}}i.code="FastForwardError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t,e){super(`One or more branches were not updated: ${t}`),this.code=this.name=i.code,this.data={prettyDetails:t,result:e}}}i.code="GitPushError"},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(4);class i extends n.a{constructor(t){super(`Maximum search depth of ${t} exceeded.`),this.code=this.name=i.code,this.data={depth:t}}}i.code="MaxDepthError"},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return l}));var n=r(5),i=r(38),o=r(18),a=r(50),s=r(29),c=r(16);function u(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){u(o,n,i,a,s,"next",t)}function s(t){u(o,n,i,a,s,"throw",t)}a(void 0)}))}}class l{constructor(t){this._dirty=!1,this._entries=t||new Map}static from(e){return f((function*(){if(t.isBuffer(e))return l.fromBuffer(e);if(null===e)return new l(null);throw new n.a("invalid type passed to GitIndex.from")}))()}static fromBuffer(t){return f((function*(){const e=yield Object(c.a)(t.slice(0,-20)),r=t.slice(-20).toString("hex");if(r!==e)throw new n.a(`Invalid checksum in GitIndex buffer: expected ${r} but saw ${e}`);const a=new o.a(t),s=new Map,u=a.toString("utf8",4);if("DIRC"!==u)throw new n.a(`Inavlid dircache magic file number: ${u}`);const f=a.readUInt32BE();if(2!==f)throw new n.a(`Unsupported dircache version: ${f}`);const d=a.readUInt32BE();let h=0;for(;!a.eof()&&h<d;){const e={};e.ctimeSeconds=a.readUInt32BE(),e.ctimeNanoseconds=a.readUInt32BE(),e.mtimeSeconds=a.readUInt32BE(),e.mtimeNanoseconds=a.readUInt32BE(),e.dev=a.readUInt32BE(),e.ino=a.readUInt32BE(),e.mode=a.readUInt32BE(),e.uid=a.readUInt32BE(),e.gid=a.readUInt32BE(),e.size=a.readUInt32BE(),e.oid=a.slice(20).toString("hex");const r=a.readUInt16BE();e.flags=(p=r,{assumeValid:Boolean(32768&p),extended:Boolean(16384&p),stage:(12288&p)>>12,nameLength:4095&p});const o=t.indexOf(0,a.tell()+1)-a.tell();if(o<1)throw new n.a(`Got a path length of: ${o}`);if(e.path=a.toString("utf8",o),e.path.includes("..\\")||e.path.includes("../"))throw new i.a(e.path);let c=8-(a.tell()-12)%8;for(0===c&&(c=8);c--;){const t=a.readUInt8();if(0!==t)throw new n.a(`Expected 1-8 null characters but got '${t}' after ${e.path}`);if(a.eof())throw new n.a("Unexpected end of file")}s.set(e.path,e),h++}var p;return new l(s)}))()}get entries(){return[...this._entries.values()].sort(a.a)}get entriesMap(){return this._entries}*[Symbol.iterator](){for(const t of this.entries)yield t}insert({filepath:e,stats:r,oid:n}){r=Object(s.a)(r);const i=t.from(e),o={ctimeSeconds:r.ctimeSeconds,ctimeNanoseconds:r.ctimeNanoseconds,mtimeSeconds:r.mtimeSeconds,mtimeNanoseconds:r.mtimeNanoseconds,dev:r.dev,ino:r.ino,mode:r.mode||33188,uid:r.uid,gid:r.gid,size:r.size,path:e,oid:n,flags:{assumeValid:!1,extended:!1,stage:0,nameLength:i.length<4095?i.length:4095}};this._entries.set(o.path,o),this._dirty=!0}delete({filepath:t}){if(this._entries.has(t))this._entries.delete(t);else for(const e of this._entries.keys())e.startsWith(t+"/")&&this._entries.delete(e);this._dirty=!0}clear(){this._entries.clear(),this._dirty=!0}render(){return this.entries.map(t=>`${t.mode.toString(8)} ${t.oid} ${t.path}`).join("\n")}toObject(){var e=this;return f((function*(){const r=t.alloc(12),n=new o.a(r);n.write("DIRC",4,"utf8"),n.writeUInt32BE(2),n.writeUInt32BE(e.entries.length);const i=t.concat(e.entries.map(e=>{const r=t.from(e.path),n=8*Math.ceil((62+r.length+1)/8),i=t.alloc(n),a=new o.a(i),c=Object(s.a)(e);return a.writeUInt32BE(c.ctimeSeconds),a.writeUInt32BE(c.ctimeNanoseconds),a.writeUInt32BE(c.mtimeSeconds),a.writeUInt32BE(c.mtimeNanoseconds),a.writeUInt32BE(c.dev),a.writeUInt32BE(c.ino),a.writeUInt32BE(c.mode),a.writeUInt32BE(c.uid),a.writeUInt32BE(c.gid),a.writeUInt32BE(c.size),a.write(e.oid,20,"hex"),a.writeUInt16BE(function(e){const r=e.flags;return r.extended=!1,r.nameLength=Math.min(t.from(e.path).length,4095),(r.assumeValid?32768:0)+(r.extended?16384:0)+((3&r.stage)<<12)+(4095&r.nameLength)}(e)),a.write(e.path,r.length,"utf8"),i})),a=t.concat([r,i]),u=yield Object(c.a)(a);return t.concat([a,t.from(u,"hex")])}))()}}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(34),i=r(26);function o(t){const e=new Map,r=function(t){if(!e.has(t)){const o={type:"tree",fullpath:t,basename:Object(n.a)(t),metadata:{},children:[]};e.set(t,o),o.parent=r(Object(i.a)(t)),o.parent&&o.parent!==o&&o.parent.children.push(o)}return e.get(t)},o=function(t,o){if(!e.has(t)){const a={type:"blob",fullpath:t,basename:Object(n.a)(t),metadata:o,parent:r(Object(i.a)(t)),children:[]};a.parent&&a.parent.children.push(a),e.set(t,a)}return e.get(t)};r(".");for(const e of t)o(e.path,e);return e}},function(t,e,r){"use strict";function n(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function s(t){n(a,i,o,s,c,"next",t)}function c(t){n(a,i,o,s,c,"throw",t)}s(void 0)}))}}r.d(e,"a",(function(){return v}));const o=t=>{if("true"===(t=t.trim().toLowerCase())||"yes"===t||"on"===t)return!0;if("false"===t||"no"===t||"off"===t)return!1;throw Error(`Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${t}`)},a={core:{filemode:o,bare:o,logallrefupdates:o,symlinks:o,ignorecase:o,bigFileThreshold:t=>{t=t.toLowerCase();let e=parseInt(t);return t.endsWith("k")&&(e*=1024),t.endsWith("m")&&(e*=1048576),t.endsWith("g")&&(e*=1073741824),e}}},s=/^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/,c=/^[A-Za-z0-9-.]+$/,u=/^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/,f=/^[A-Za-z][A-Za-z-]*$/,l=/^(.*?)( *[#;].*)$/,d=t=>{const e=l.exec(t);if(null==e)return t;const[r,n]=e.slice(1);return h(r)&&h(n)?`${r}${n}`:r},h=t=>(t.match(/(?:^|[^\\])"/g)||[]).length%2!=0,p=t=>t.split("").reduce((t,e,r,n)=>{const i='"'===e&&"\\"!==n[r-1],o="\\"===e&&'"'===n[r+1];return i||o?t:t+e},""),y=t=>null!=t?t.toLowerCase():null,g=(t,e,r)=>[y(t),e,y(r)].filter(t=>null!=t).join(".");class v{constructor(t){let e=null,r=null;this.parsedConfig=t.split("\n").map(t=>{let n=null,i=null;const o=t.trim(),a=(t=>{const e=s.exec(t);if(null!=e){const[t,r]=e.slice(1);return[t,r]}return null})(o),c=null!=a;if(c)[e,r]=a;else{const t=(t=>{const e=u.exec(t);if(null!=e){const[t,r="true"]=e.slice(1),n=d(r);return[t,p(n)]}return null})(o);null!=t&&([n,i]=t)}const f=g(e,r,n);return{line:t,isSection:c,section:e,subsection:r,name:n,value:i,path:f}})}static from(t){return new v(t)}get(t,e=!1){var r=this;return i((function*(){const n=r.parsedConfig.filter(e=>e.path===t.toLowerCase()).map(({section:t,name:e,value:r})=>{const n=a[t]&&a[t][e];return n?n(r):r});return e?n:n.pop()}))()}getall(t){var e=this;return i((function*(){return e.get(t,!0)}))()}getSubsections(t){var e=this;return i((function*(){return e.parsedConfig.filter(e=>e.section===t&&e.isSection).map(t=>t.subsection)}))()}deleteSection(t,e){var r=this;return i((function*(){r.parsedConfig=r.parsedConfig.filter(r=>!(r.section===t&&r.subsection===e))}))()}append(t,e){var r=this;return i((function*(){return r.set(t,e,!0)}))()}set(t,e,r=!1){var n=this;return i((function*(){const i=(o=n.parsedConfig,a=e=>e.path===t.toLowerCase(),o.reduce((t,e,r)=>a(e)?r:t,-1));var o,a;if(null==e)-1!==i&&n.parsedConfig.splice(i,1);else if(-1!==i){const t=n.parsedConfig[i],o=Object.assign({},t,{value:e,modified:!0});r?n.parsedConfig.splice(i+1,0,o):n.parsedConfig[i]=o}else{const r=t.split(".").slice(0,-1).join(".").toLowerCase(),i=n.parsedConfig.findIndex(t=>t.path===r),[o,a]=r.split("."),s=t.split(".").pop(),u={section:o,subsection:a,name:s,value:e,modified:!0,path:g(o,a,s)};if(c.test(o)&&f.test(s))if(i>=0)n.parsedConfig.splice(i+1,0,u);else{const t={section:o,subsection:a,modified:!0,path:g(o,a,null)};n.parsedConfig.push(t,u)}}}))()}toString(){return this.parsedConfig.map(({line:t,section:e,subsection:r,name:n,value:i,modified:o=!1})=>o?null!=n&&null!=i?`\t${n} = ${i}`:null!=r?`[${e} "${r}"]`:`[${e}]`:t).join("\n")}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(70);class i{constructor(t=[]){this.rules=t}static from(t){const e=[];for(const r of t)e.push(n.a.from(r));return new i(e)}add(t){const e=n.a.from(t);this.rules.push(e)}translate(t){const e=[];for(const r of this.rules)for(const n of t){const t=r.translate(n);t&&e.push([n,t])}return e}translateOne(t){let e=null;for(const r of this.rules){const n=r.translate(t);n&&(e=n)}return e}localNamespaces(){return this.rules.filter(t=>t.matchPrefix).map(t=>t.localPath.replace(/\/$/,""))}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(125),i=r.n(n);const o=/^.*(\r?\n|$)/gm;function a({ourContent:t,baseContent:e,theirContent:r,ourName:n="ours",baseName:a="base",theirName:s="theirs",format:c="diff",markerSize:u=7}){const f=t.match(o),l=e.match(o),d=r.match(o),h=i()(f,l,d);let p="",y=!0;for(const t of h)t.ok&&(p+=t.ok.join("")),t.conflict&&(y=!1,p+=`${"<".repeat(u)} ${n}\n`,p+=t.conflict.a.join(""),"diff3"===c&&(p+=`${"|".repeat(u)} ${a}\n`,p+=t.conflict.o.join("")),p+=`${"=".repeat(u)}\n`,p+=t.conflict.b.join(""),p+=`${">".repeat(u)} ${s}\n`);return{cleanMerge:y,mergedText:p}}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return d}));var n=r(67),i=r.n(n),o=r(126),a=r(7),s=r(74),c=r(1),u=r(42);function f(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){f(o,n,i,a,s,"next",t)}function s(t){f(o,n,i,a,s,"throw",t)}a(void 0)}))}}function d(t){return h.apply(this,arguments)}function h(){return(h=l((function*({fs:e,cache:r,dir:n,gitdir:f=Object(c.a)(n,".git"),oids:d}){const h=new i.a,p=[];function y(e,r){const n=t.from(e,r);p.push(n),h.update(n)}function g(t){return v.apply(this,arguments)}function v(){return(v=l((function*({stype:e,object:r}){const n=o.a[e];let i=r.length,a=i>15?128:0;const c=15&i;i>>>=4;let f=(a|n|c).toString(16);for(y(f,"hex");a;)a=i>127?128:0,f=a|127&i,y(Object(u.a)(2,f),"hex"),i>>>=7;y(t.from(yield Object(s.a)(r)))}))).apply(this,arguments)}y("PACK"),y("00000002","hex"),y(Object(u.a)(8,d.length),"hex");for(const t of d){const{type:n,object:i}=yield Object(a.a)({fs:e,cache:r,gitdir:f,oid:t});yield g({write:y,object:i,stype:n})}const m=h.digest();return p.push(m),p}))).apply(this,arguments)}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));const n=void 0===Array.prototype.flat?t=>t.reduce((t,e)=>t.concat(e),[]):t=>t.flat()},function(t,e,r){"use strict";r.d(e,"a",(function(){return f}));var n=r(15),i=r(12),o=r(11),a=r(7),s=r(1);function c(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){c(o,n,i,a,s,"next",t)}function s(t){c(o,n,i,a,s,"throw",t)}a(void 0)}))}}function f(t){return l.apply(this,arguments)}function l(){return(l=u((function*({fs:t,cache:e,dir:r,gitdir:c=Object(s.a)(r,".git"),oids:f}){const l=new Set;function d(t){return h.apply(this,arguments)}function h(){return(h=u((function*(r){if(l.has(r))return;l.add(r);const{type:s,object:u}=yield Object(a.a)({fs:t,cache:e,gitdir:c,oid:r});if("tag"===s){const t=n.a.from(u).headers().object;yield d(t)}else if("commit"===s){const t=i.a.from(u).headers().tree;yield d(t)}else if("tree"===s){const t=o.a.from(u);for(const e of t)"blob"===e.type&&l.add(e.oid),"tree"===e.type&&(yield d(e.oid))}}))).apply(this,arguments)}for(const t of f)yield d(t);return l}))).apply(this,arguments)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));const n=new RegExp("^refs/(heads/|tags/|remotes/)?(.*)");function i(t){const e=n.exec(t);return e?"remotes/"===e[1]&&t.endsWith("/HEAD")?e[2].slice(0,-5):e[2]:t}},function(t,e,r){"use strict";function n(t){let e=t.match(/^https?:\/\/([^/]+)@/);if(null==e)return{url:t,auth:{}};e=e[1];const[r,n]=e.split(":");return{url:t=t.replace(`${e}@`,""),auth:{username:r,password:n}}}r.d(e,"a",(function(){return n}))},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var c,u=[],f=!1,l=-1;function d(){f&&c&&(f=!1,c.length?u=c.concat(u):l=-1,u.length&&h())}function h(){if(!f){var t=s(d);f=!0;for(var e=u.length;e;){for(c=u,u=[];++l<e;)c&&c[l].run();l=-1,e=u.length}c=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function y(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new p(t,e)),1!==u.length||f||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var n=r(11),i=r(17);function o(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function s(t){o(a,n,i,s,c,"next",t)}function c(t){o(a,n,i,s,c,"throw",t)}s(void 0)}))}}function s(t){return c.apply(this,arguments)}function c(){return(c=a((function*({fs:t,gitdir:e,tree:r}){const o=n.a.from(r).toObject();return yield Object(i.a)({fs:t,gitdir:e,type:"tree",object:o,format:"content"})}))).apply(this,arguments)}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return k}));var n=r(47),i=r(24),o=r(58),a=r(13),s=r(3),c=r(53),u=r(36),f=r(12),l=r(52),d=r(148),h=r(7),p=r(99),y=r(45),g=r(150),v=r(127),m=r(33),w=r(1),b=r(40),_=r(128),O=r(111),x=r(110);function j(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function P(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){j(o,n,i,a,s,"next",t)}function s(t){j(o,n,i,a,s,"throw",t)}a(void 0)}))}}function k(t){return E.apply(this,arguments)}function E(){return(E=P((function*({fs:e,cache:r,http:j,onProgress:k,onMessage:E,onAuth:A,onAuthSuccess:S,onAuthFailure:$,gitdir:R,ref:B,remoteRef:T,remote:I,url:U,corsProxy:C,depth:z=null,since:D=null,exclude:N=[],relative:M=!1,tags:F=!1,singleBranch:H=!1,headers:L={},prune:Y=!1,pruneTags:G=!1}){const Z=B||(yield Object(n.a)({fs:e,gitdir:R,test:!0})),W=yield a.a.get({fs:e,gitdir:R}),q=I||Z&&(yield W.get(`branch.${Z}.remote`))||"origin",K=U||(yield W.get(`remote.${q}.url`));if(void 0===K)throw new i.a("remote OR url");const V=T||Z&&(yield W.get(`branch.${Z}.merge`))||B||"HEAD";void 0===C&&(C=yield W.get("http.corsProxy"));const X=c.a.getRemoteHelperFor({url:K}),J=yield X.discover({http:j,onAuth:A,onAuthSuccess:S,onAuthFailure:$,corsProxy:C,service:"git-upload-pack",url:K,headers:L,protocolVersion:1}),Q=J.auth,tt=J.refs;if(0===tt.size)return{defaultBranch:null,fetchHead:null,fetchHeadDescription:null};if(null!==z&&!J.capabilities.has("shallow"))throw new o.a("shallow","depth");if(null!==D&&!J.capabilities.has("deepen-since"))throw new o.a("deepen-since","since");if(N.length>0&&!J.capabilities.has("deepen-not"))throw new o.a("deepen-not","exclude");if(!0===M&&!J.capabilities.has("deepen-relative"))throw new o.a("deepen-relative","relative");const{oid:et,fullref:rt}=s.a.resolveAgainstMap({ref:V,map:tt});for(const t of tt.keys())t===rt||"HEAD"===t||t.startsWith("refs/heads/")||F&&t.startsWith("refs/tags/")||tt.delete(t);const nt=Object(v.a)([...J.capabilities],["multi_ack_detailed","no-done","side-band-64k","ofs-delta",`agent=${b.a.agent}`]);M&&nt.push("deepen-relative");const it=H?[et]:tt.values(),ot=H?[Z]:yield s.a.listRefs({fs:e,gitdir:R,filepath:"refs"});let at=[];for(let t of ot)try{t=yield s.a.expand({fs:e,gitdir:R,ref:t});const n=yield s.a.resolve({fs:e,gitdir:R,ref:t});(yield Object(d.a)({fs:e,cache:r,gitdir:R,oid:n}))&&at.push(n)}catch(t){}at=[...new Set(at)];const st=yield u.a.read({fs:e,gitdir:R}),ct=J.capabilities.has("shallow")?[...st]:[],ut=Object(x.a)({capabilities:nt,wants:it,haves:at,shallows:ct,depth:z,since:D,exclude:N}),ft=t.from(yield Object(y.a)(ut)),lt=yield X.connect({http:j,onProgress:k,corsProxy:C,service:"git-upload-pack",url:K,auth:Q,body:[ft],headers:L}),dt=yield Object(O.a)(lt.body);lt.headers&&(dt.headers=lt.headers);for(const t of dt.shallows)if(!st.has(t))try{const{object:n}=yield Object(h.a)({fs:e,cache:r,gitdir:R,oid:t}),i=new f.a(n),o=yield Promise.all(i.headers().parent.map(t=>Object(d.a)({fs:e,cache:r,gitdir:R,oid:t})));0===o.length||o.every(t=>t)||st.add(t)}catch(e){st.add(t)}for(const t of dt.unshallows)st.delete(t);if(yield u.a.write({fs:e,gitdir:R,oids:st}),H){const t=new Map([[rt,et]]),r=new Map;let n=10,i=rt;for(;n--;){const t=J.symrefs.get(i);if(void 0===t)break;r.set(i,t),i=t}const o=tt.get(i);o&&t.set(i,o);const{pruned:a}=yield s.a.updateRemoteRefs({fs:e,gitdir:R,remote:q,refs:t,symrefs:r,tags:F,prune:Y});Y&&(dt.pruned=a)}else{const{pruned:t}=yield s.a.updateRemoteRefs({fs:e,gitdir:R,remote:q,refs:tt,symrefs:J.symrefs,tags:F,prune:Y,pruneTags:G});Y&&(dt.pruned=t)}if(dt.HEAD=J.symrefs.get("HEAD"),void 0===dt.HEAD){const{oid:t}=s.a.resolveAgainstMap({ref:"HEAD",map:tt});for(const[e,r]of tt.entries())if("HEAD"!==e&&r===t){dt.HEAD=e;break}}const ht=rt.startsWith("refs/tags")?"tag":"branch";if(dt.FETCH_HEAD={oid:et,description:`${ht} '${Object(p.a)(rt)}' of ${K}`},k||E){const t=Object(_.a)(dt.progress);Object(m.a)(t,function(){var t=P((function*(t){if(E&&(yield E(t)),k){const e=t.match(/([^:]*).*\((\d+?)\/(\d+?)\)/);e&&(yield k({phase:e[1].trim(),loaded:parseInt(e[2],10),total:parseInt(e[3],10)}))}}));return function(e){return t.apply(this,arguments)}}())}const pt=t.from(yield Object(y.a)(dt.packfile)),yt=pt.slice(-20).toString("hex"),gt={defaultBranch:dt.HEAD,fetchHead:dt.FETCH_HEAD.oid,fetchHeadDescription:dt.FETCH_HEAD.description};if(dt.headers&&(gt.headers=dt.headers),Y&&(gt.pruned=dt.pruned),""!==yt&&!Object(g.a)(pt)){gt.packfile=`objects/pack/pack-${yt}.pack`;const t=Object(w.a)(R,gt.packfile);yield e.write(t,pt);const n=t=>Object(h.a)({fs:e,cache:r,gitdir:R,oid:t}),i=yield l.a.fromPack({pack:pt,getExternalRefDelta:n,onProgress:k});yield e.write(t.replace(/\.pack$/,".idx"),yield i.toBuffer())}return gt}))).apply(this,arguments)}}).call(this,r(10).Buffer)},function(t,e,r){var n=r(10),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=a),o(i,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";t.exports=function(t,e,r,n){for(var i=65535&t|0,o=t>>>16&65535|0,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(i=i+e[n++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}},function(t,e,r){"use strict";var n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,e,r,i){var o=n,a=i+r;t^=-1;for(var s=i;s<a;s++)t=t>>>8^o[255&(t^e[s])];return-1^t}},function(t,e,r){"use strict";var n=r(27),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var a=new n.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function c(t,e){if(e<65534&&(t.subarray&&o||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var r="",a=0;a<e;a++)r+=String.fromCharCode(t[a]);return r}a[254]=a[254]=1,e.string2buf=function(t){var e,r,i,o,a,s=t.length,c=0;for(o=0;o<s;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),c+=r<128?1:r<2048?2:r<65536?3:4;for(e=new n.Buf8(c),a=0,o=0;a<c;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),r<128?e[a++]=r:r<2048?(e[a++]=192|r>>>6,e[a++]=128|63&r):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e},e.buf2binstring=function(t){return c(t,t.length)},e.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r<i;r++)e[r]=t.charCodeAt(r);return e},e.buf2string=function(t,e){var r,n,i,o,s=e||t.length,u=new Array(2*s);for(n=0,r=0;r<s;)if((i=t[r++])<128)u[n++]=i;else if((o=a[i])>4)u[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r<s;)i=i<<6|63&t[r++],o--;o>1?u[n++]=65533:i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|1023&i)}return c(u,n)},e.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+a[t[r]]>e?r:e}},function(t,e,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(t,e,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(8);function i({capabilities:t=[],wants:e=[],haves:r=[],shallows:i=[],depth:o=null,since:a=null,exclude:s=[]}){const c=[];e=[...new Set(e)];let u=` ${t.join(" ")}`;for(const t of e)c.push(n.a.encode(`want ${t}${u}\n`)),u="";for(const t of i)c.push(n.a.encode(`shallow ${t}\n`));null!==o&&c.push(n.a.encode(`deepen ${o}\n`)),null!==a&&c.push(n.a.encode(`deepen-since ${Math.floor(a.valueOf()/1e3)}\n`));for(const t of s)c.push(n.a.encode(`deepen-not ${t}\n`));c.push(n.a.flush());for(const t of r)c.push(n.a.encode(`have ${t}\n`));return c.push(n.a.encode("done\n")),c}},function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r(28),i=r(66),o=r(33);function a(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,c,"next",t)}function c(t){a(o,n,i,s,c,"throw",t)}s(void 0)}))}}function c(t){return u.apply(this,arguments)}function u(){return(u=s((function*(t){const{packetlines:e,packfile:r,progress:a}=i.a.demux(t),s=[],c=[],u=[];let f=!1,l=!1;return new Promise((t,i)=>{Object(o.a)(e,e=>{const o=e.toString("utf8").trim();if(o.startsWith("shallow")){const t=o.slice(-41).trim();40!==t.length&&i(new n.a(t)),s.push(t)}else if(o.startsWith("unshallow")){const t=o.slice(-41).trim();40!==t.length&&i(new n.a(t)),c.push(t)}else if(o.startsWith("ACK")){const[,t,e]=o.split(" ");u.push({oid:t,status:e}),e||(l=!0)}else o.startsWith("NAK")&&(f=!0,l=!0);l&&t({shallows:s,unshallows:c,acks:u,nak:f,packfile:r,progress:a})})})}))).apply(this,arguments)}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return h}));var n=r(44),i=r(54),o=r(39),a=r(11),s=r(17),c=r(34),u=r(1),f=r(95);function l(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function d(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){l(o,n,i,a,s,"next",t)}function s(t){l(o,n,i,a,s,"throw",t)}a(void 0)}))}}function h(t){return p.apply(this,arguments)}function p(){return(p=d((function*({fs:t,cache:e,dir:r,gitdir:f=Object(u.a)(r,".git"),ourOid:l,baseOid:h,theirOid:p,ourName:g="ours",baseName:m="base",theirName:w="theirs",dryRun:b=!1}){const _=Object(n.a)({ref:l}),O=Object(n.a)({ref:h}),x=Object(n.a)({ref:p});var j,P;return(yield Object(i.a)({fs:t,cache:e,dir:r,gitdir:f,trees:[_,O,x],map:(P=d((function*(e,[r,n,i]){const a=Object(c.a)(e);switch(`${yield y(r,n)}-${yield y(i,n)}`){case"false-false":return{mode:yield n.mode(),path:a,oid:yield n.oid(),type:yield n.type()};case"false-true":return i?{mode:yield i.mode(),path:a,oid:yield i.oid(),type:yield i.type()}:void 0;case"true-false":return r?{mode:yield r.mode(),path:a,oid:yield r.oid(),type:yield r.type()}:void 0;case"true-true":if(r&&n&&i&&"blob"===(yield r.type())&&"blob"===(yield n.type())&&"blob"===(yield i.type()))return v({fs:t,gitdir:f,path:a,ours:r,base:n,theirs:i,ourName:g,baseName:m,theirName:w});throw new o.a}})),function(t,e){return P.apply(this,arguments)}),reduce:(j=d((function*(e,r){const n=r.filter(Boolean);if(e&&(!e||"tree"!==e.type||0!==n.length)){if(n.length>0){const r=new a.a(n).toObject(),i=yield Object(s.a)({fs:t,gitdir:f,type:"tree",object:r,dryRun:b});e.oid=i}return e}})),function(t,e){return j.apply(this,arguments)})})).oid}))).apply(this,arguments)}function y(t,e){return g.apply(this,arguments)}function g(){return(g=d((function*(t,e){return!(!t&&!e)&&(!(!t||e)||(!(t||!e)||("tree"!==(yield t.type())||"tree"!==(yield e.type()))&&((yield t.type())!==(yield e.type())||(yield t.mode())!==(yield e.mode())||(yield t.oid())!==(yield e.oid()))))}))).apply(this,arguments)}function v(t){return m.apply(this,arguments)}function m(){return(m=d((function*({fs:e,gitdir:r,path:n,ours:i,base:a,theirs:c,ourName:u,theirName:l,baseName:d,format:h,markerSize:p,dryRun:y}){const g=(yield a.mode())===(yield i.mode())?yield c.mode():yield i.mode();if((yield i.oid())===(yield c.oid()))return{mode:g,path:n,oid:yield i.oid(),type:"blob"};if((yield i.oid())===(yield a.oid()))return{mode:g,path:n,oid:yield c.oid(),type:"blob"};if((yield c.oid())===(yield a.oid()))return{mode:g,path:n,oid:yield i.oid(),type:"blob"};const{mergedText:v,cleanMerge:m}=Object(f.a)({ourContent:t.from(yield i.content()).toString("utf8"),baseContent:t.from(yield a.content()).toString("utf8"),theirContent:t.from(yield c.content()).toString("utf8"),ourName:u,theirName:l,baseName:d,format:h,markerSize:p});if(!m)throw new o.a;return{mode:g,path:n,oid:yield Object(s.a)({fs:e,gitdir:r,type:"blob",object:t.from(v,"utf8"),dryRun:y}),type:"blob"}}))).apply(this,arguments)}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return d}));var n=r(14),i=r(3),o=r(36),a=r(15),s=r(12),c=r(7),u=r(1);function f(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){f(o,n,i,a,s,"next",t)}function s(t){f(o,n,i,a,s,"throw",t)}a(void 0)}))}}function d(t){return h.apply(this,arguments)}function h(){return(h=l((function*({fs:t,cache:e,dir:r,gitdir:f=Object(u.a)(r,".git"),start:d,finish:h}){const p=yield o.a.read({fs:t,gitdir:f}),y=new Set,g=new Set;for(const e of d)y.add(yield i.a.resolve({fs:t,gitdir:f,ref:e}));for(const e of h)try{const r=yield i.a.resolve({fs:t,gitdir:f,ref:e});g.add(r)}catch(t){}const v=new Set;function m(t){return w.apply(this,arguments)}function w(){return(w=l((function*(r){v.add(r);const{type:i,object:o}=yield Object(c.a)({fs:t,cache:e,gitdir:f,oid:r});if("tag"===i){return m(a.a.from(o).headers().object)}if("commit"!==i)throw new n.a(r,i,"commit");if(!p.has(r)){const t=s.a.from(o).headers().parent;for(r of t)g.has(r)||v.has(r)||(yield m(r))}}))).apply(this,arguments)}for(const t of y)yield m(t);return v}))).apply(this,arguments)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(8);function i(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function s(t){i(a,n,o,s,c,"next",t)}function c(t){i(a,n,o,s,c,"throw",t)}s(void 0)}))}}function a(t){return s.apply(this,arguments)}function s(){return(s=o((function*({capabilities:t=[],triplets:e=[]}){const r=[];let i=`\0 ${t.join(" ")}`;for(const t of e)r.push(n.a.encode(`${t.oldoid} ${t.oid} ${t.fullRef}${i}\n`)),i="";return r.push(n.a.flush()),r}))).apply(this,arguments)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var n=r(30),i=r(8);function o(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function s(t){o(a,n,i,s,c,"next",t)}function c(t){o(a,n,i,s,c,"throw",t)}s(void 0)}))}}function s(t){return c.apply(this,arguments)}function c(){return(c=a((function*(t){const e={};let r="";const o=i.a.streamReader(t);let a=yield o();for(;!0!==a;)null!==a&&(r+=a.toString("utf8")+"\n"),a=yield o();const s=r.toString("utf8").split("\n");if(a=s.shift(),!a.startsWith("unpack "))throw new n.a('unpack ok" or "unpack [error message]',a);e.ok="unpack ok"===a,e.ok||(e.error=a.slice("unpack ".length)),e.refs={};for(const t of s){if(""===t.trim())continue;const r=t.slice(0,2),n=t.slice(3);let i=n.indexOf(" ");-1===i&&(i=n.length);const o=n.slice(0,i),a=n.slice(i+1);e.refs[o]={ok:"ok"===r,error:a}}return e}))).apply(this,arguments)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(32);function i(t,e){return Object(n.a)(o(t),o(e))}function o(t){return"040000"===t.mode?t.path+"/":t.path}},function(t,e,r){"use strict";function n(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function s(t){n(a,i,o,s,c,"next",t)}function c(t){n(a,i,o,s,c,"throw",t)}s(void 0)}))}}function o(t){return a.apply(this,arguments)}function a(){return(a=i((function*({fs:t,gitdir:e,oid:r}){const n=`objects/${r.slice(0,2)}/${r.slice(2)}`,i=yield t.read(`${e}/${n}`);return i?{object:i,format:"deflated",source:n}:null}))).apply(this,arguments)}r.d(e,"a",(function(){return o}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r(5),i=r(71),o=r(1);function a(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,c,"next",t)}function c(t){a(o,n,i,s,c,"throw",t)}s(void 0)}))}}function c(t){return u.apply(this,arguments)}function u(){return(u=s((function*({fs:t,cache:e,gitdir:r,oid:a,format:s="content",getExternalRefDelta:c}){let u=yield t.readdir(Object(o.a)(r,"objects/pack"));u=u.filter(t=>t.endsWith(".idx"));for(const o of u){const s=`${r}/objects/pack/${o}`,u=yield Object(i.a)({fs:t,cache:e,filename:s,getExternalRefDelta:c});if(u.error)throw new n.a(u.error);if(u.offsets.has(a)){if(!u.pack){const e=s.replace(/idx$/,"pack");u.pack=t.read(e)}const e=yield u.read({oid:a,getExternalRefDelta:c});return e.format="content",e.source=`objects/pack/${o.replace(/idx$/,"pack")}`,e}}return null}))).apply(this,arguments)}},function(t,e,r){var n;n=function(t){t.version="1.2.0";var e=function(){for(var t=0,e=new Array(256),r=0;256!=r;++r)t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=r)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1,e[r]=t;return"undefined"!=typeof Int32Array?new Int32Array(e):e}();t.table=e,t.bstr=function(t,r){for(var n=-1^r,i=t.length-1,o=0;o<i;)n=(n=n>>>8^e[255&(n^t.charCodeAt(o++))])>>>8^e[255&(n^t.charCodeAt(o++))];return o===i&&(n=n>>>8^e[255&(n^t.charCodeAt(o))]),-1^n},t.buf=function(t,r){if(t.length>1e4)return function(t,r){for(var n=-1^r,i=t.length-7,o=0;o<i;)n=(n=(n=(n=(n=(n=(n=(n=n>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])];for(;o<i+7;)n=n>>>8^e[255&(n^t[o++])];return-1^n}(t,r);for(var n=-1^r,i=t.length-3,o=0;o<i;)n=(n=(n=(n=n>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])];for(;o<i+3;)n=n>>>8^e[255&(n^t[o++])];return-1^n},t.str=function(t,r){for(var n,i,o=-1^r,a=0,s=t.length;a<s;)(n=t.charCodeAt(a++))<128?o=o>>>8^e[255&(o^n)]:n<2048?o=(o=o>>>8^e[255&(o^(192|n>>6&31))])>>>8^e[255&(o^(128|63&n))]:n>=55296&&n<57344?(n=64+(1023&n),i=1023&t.charCodeAt(a++),o=(o=(o=(o=o>>>8^e[255&(o^(240|n>>8&7))])>>>8^e[255&(o^(128|n>>2&63))])>>>8^e[255&(o^(128|i>>6&15|(3&n)<<4))])>>>8^e[255&(o^(128|63&i))]):o=(o=(o=o>>>8^e[255&(o^(224|n>>12&15))])>>>8^e[255&(o^(128|n>>6&63))])>>>8^e[255&(o^(128|63&n))];return-1^o}},"undefined"==typeof DO_NOT_EXPORT_CRC?n(e):n({})},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return u}));var n=r(41),i=r.n(n),o=r(5),a=r(72);function s(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,c,"next",t)}function c(t){s(o,n,i,a,c,"throw",t)}a(void 0)}))}}function u(t,e){return f.apply(this,arguments)}function f(){return(f=c((function*(t,e){const r=new a.a(t);let n=yield r.read(4);if(n=n.toString("utf8"),"PACK"!==n)throw new o.a(`Invalid PACK header '${n}'`);let s=yield r.read(4);if(s=s.readUInt32BE(0),2!==s)throw new o.a(`Invalid packfile version: ${s}`);let c=yield r.read(4);if(c=c.readUInt32BE(0),!(c<1))for(;!r.eof()&&c--;){const t=r.tell(),{type:n,length:a,ofs:s,reference:u}=yield l(r),f=new i.a.Inflate;for(;!f.result;){const i=yield r.chunk();if(r.ended)break;if(f.push(i,!1),f.err)throw new o.a(`Pako error: ${f.msg}`);if(f.result){if(f.result.length!==a)throw new o.a("Inflated object size is different from that stated in packfile.");yield r.undo(),yield r.read(i.length-f.strm.avail_in);const l=r.tell();yield e({data:f.result,type:n,num:c,offset:t,end:l,reference:u,ofs:s})}}}}))).apply(this,arguments)}function l(t){return d.apply(this,arguments)}function d(){return(d=c((function*(e){let r=yield e.byte();const n=r>>4&7;let i,o,a=15&r;if(128&r){let t=4;do{r=yield e.byte(),a|=(127&r)<<t,t+=7}while(128&r)}if(6===n){let n=0;i=0;const a=[];do{r=yield e.byte(),i|=(127&r)<<n,n+=7,a.push(r)}while(128&r);o=t.from(a)}if(7===n){o=yield e.read(20)}return{type:n,length:a,ofs:i,reference:o}}))).apply(this,arguments)}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return o}));var n=r(5),i=r(18);function o(e,r){const o=new i.a(e),s=a(o);if(s!==r.byteLength)throw new n.a(`applyDelta expected source buffer to be ${s} bytes but the provided buffer was ${r.length} bytes`);const u=a(o);let f;const l=c(o,r);if(l.byteLength===u)f=l;else{f=t.alloc(u);const e=new i.a(f);for(e.copy(l);!o.eof();)e.copy(c(o,r));const a=e.tell();if(u!==a)throw new n.a(`applyDelta expected target buffer to be ${u} bytes but the resulting buffer was ${a} bytes`)}return f}function a(t){let e=0,r=0,n=null;do{n=t.readUInt8(),e|=(127&n)<<r,r+=7}while(128&n);return e}function s(t,e,r){let n=0,i=0;for(;r--;)1&e&&(n|=t.readUInt8()<<i),e>>=1,i+=8;return n}function c(t,e){const r=t.readUInt8();if(128&r){const n=s(t,15&r,4);let i=s(t,(112&r)>>4,3);return 0===i&&(i=65536),e.slice(n,n+i)}return t.slice(r)}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";function n(t){return t.split("\n").map(t=>t.replace(/^ /,"")).join("\n")}r.d(e,"a",(function(){return n}))},function(t,e,r){(function(e){function r(t){return Array.isArray(t)?t:[t]}const n=/^\s+$/,i=/^\\!/,o=/^\\#/,a=/\r?\n/g,s=/^\.*\/|^\.+$/,c="undefined"!=typeof Symbol?Symbol.for("node-ignore"):"node-ignore",u=/([0-z])-([0-z])/g,f=[[/\\?\s+$/,t=>0===t.indexOf("\\")?" ":""],[/\\\s/g,()=>" "],[/[\\^$.|*+(){]/g,t=>`\\${t}`],[/\[([^\]/]*)($|\])/g,(t,e,r)=>{return"]"===r?`[${n=e,n.replace(u,(t,e,r)=>e.charCodeAt(0)<=r.charCodeAt(0)?t:"")}]`:`\\${t}`;var n}],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/(?:[^*])$/,t=>/\/$/.test(t)?`${t}$`:`${t}(?=$|\\/$)`],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(t,e,r)=>e+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)\\\*(?=.+)/g,(t,e)=>`${e}[^\\/]*`],[/(\^|\\\/)?\\\*$/,(t,e)=>`${e?`${e}[^/]+`:"[^/]*"}(?=$|\\/$)`],[/\\\\\\/g,()=>"\\"]],l=Object.create(null),d=t=>"string"==typeof t;class h{constructor(t,e,r,n){this.origin=t,this.pattern=e,this.negative=r,this.regex=n}}const p=(t,e)=>{const r=t;let n=!1;0===t.indexOf("!")&&(n=!0,t=t.substr(1));const a=((t,e,r)=>{const n=l[t];if(n)return n;const i=f.reduce((e,r)=>e.replace(r[0],r[1].bind(t)),t);return l[t]=r?new RegExp(i,"i"):new RegExp(i)})(t=t.replace(i,"!").replace(o,"#"),0,e);return new h(r,t,n,a)},y=(t,e)=>{throw new e(t)},g=(t,e,r)=>{if(!d(t))return r(`path must be a string, but got \`${e}\``,TypeError);if(!t)return r("path must not be empty",TypeError);if(g.isNotRelative(t)){return r(`path should be a ${"`path.relative()`d"} string, but got "${e}"`,RangeError)}return!0},v=t=>s.test(t);g.isNotRelative=v,g.convert=t=>t;class m{constructor({ignorecase:t=!0}={}){var e,r,n;this._rules=[],this._ignorecase=t,e=this,r=c,n=!0,Object.defineProperty(e,r,{value:n}),this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[c])return this._rules=this._rules.concat(t._rules),void(this._added=!0);if((t=>t&&d(t)&&!n.test(t)&&0!==t.indexOf("#"))(t)){const e=p(t,this._ignorecase);this._added=!0,this._rules.push(e)}}add(t){return this._added=!1,r(d(t)?(t=>t.split(a))(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,e){let r=!1,n=!1;return this._rules.forEach(i=>{const{negative:o}=i;n===o&&r!==n||o&&!r&&!n&&!e||i.regex.test(t)&&(r=!o,n=o)}),{ignored:r,unignored:n}}_test(t,e,r,n){const i=t&&g.convert(t);return g(i,t,y),this._t(i,e,r,n)}_t(t,e,r,n){if(t in e)return e[t];if(n||(n=t.split("/")),n.pop(),!n.length)return e[t]=this._testOne(t,r);const i=this._t(n.join("/")+"/",e,r,n);return e[t]=i.ignored?i:this._testOne(t,r)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return r(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}}const w=t=>new m(t),b=()=>!1;if(w.isPathValid=t=>g(t&&g.convert(t),t,b),w.default=w,t.exports=w,void 0!==e&&(e.env&&e.env.IGNORE_TEST_WIN32||"win32"===e.platform)){const t=t=>/^\\\\\?\\/.test(t)||/["<>|\u0000-\u001F]+/u.test(t)?t:t.replace(/\\/g,"/");g.convert=t;const e=/^[a-z]:\//i;g.isNotRelative=t=>e.test(t)||v(t)}}).call(this,r(101))},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(5);function i(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function s(t){i(a,n,o,s,c,"next",t)}function c(t){i(a,n,o,s,c,"throw",t)}s(void 0)}))}}function a(t){return s.apply(this,arguments)}function s(){return(s=o((function*({fs:t,gitdir:e,object:r,format:i,oid:o}){if("deflated"!==i)throw new n.a("GitObjectStoreLoose expects objects to write to be in deflated format");const a=`${e}/${`objects/${o.slice(0,2)}/${o.slice(2)}`}`;(yield t.exists(a))||(yield t.write(a,r))}))).apply(this,arguments)}},function(t,e,r){var n=r(145);function i(t,e){for(var r=[],i=t.length,o=e.length,a=function(t,e){var r=new n(t,e);r.compose();for(var i,o,a=r.getses(),s=t.length-1,c=e.length-1,u=a.length-1;u>=0;--u)a[u].t===r.SES_COMMON?(o?(o.chain={file1index:s,file2index:c,chain:null},o=o.chain):o=i={file1index:s,file2index:c,chain:null},s--,c--):a[u].t===r.SES_DELETE?s--:a[u].t===r.SES_ADD&&c--;var f={file1index:-1,file2index:-1,chain:null};return o?(o.chain=f,i):f}(t,e);null!==a;a=a.chain){var s=i-a.file1index-1,c=o-a.file2index-1;i=a.file1index,o=a.file2index,(s||c)&&r.push({file1:[i+1,s],file2:[o+1,c]})}return r.reverse(),r}t.exports=function(t,e,r){var n=[],o=[t,e,r],a=function(t,e,r){var n,o=i(e,t),a=i(e,r),s=[];function c(t,e){s.push([t.file1[0],e,t.file1[1],t.file2[0],t.file2[1]])}for(n=0;n<o.length;n++)c(o[n],0);for(n=0;n<a.length;n++)c(a[n],2);s.sort((function(t,e){return t[0]-e[0]}));var u=[],f=0;function l(t){t>f&&(u.push([1,f,t-f]),f=t)}for(var d=0;d<s.length;d++){for(var h=d,p=s[d],y=p[0],g=y+p[2];d<s.length-1;){var v=s[d+1],m=v[0];if(m>g)break;g=Math.max(g,m+v[2]),d++}if(l(y),h==d)p[4]>0&&u.push([p[1],p[3],p[4]]);else{var w={0:[t.length,-1,e.length,-1],2:[r.length,-1,e.length,-1]};for(n=h;n<=d;n++){var b=w[(p=s[n])[1]],_=p[0],O=_+p[2],x=p[3],j=x+p[4];b[0]=Math.min(x,b[0]),b[1]=Math.max(j,b[1]),b[2]=Math.min(_,b[2]),b[3]=Math.max(O,b[3])}var P=w[0][0]+(y-w[0][2]),k=w[0][1]+(g-w[0][3]),E=w[2][0]+(y-w[2][2]),A=w[2][1]+(g-w[2][3]);u.push([-1,P,k-P,y,g-y,E,A-E])}f=g}return l(e.length),u}(t,e,r),s=[];function c(){s.length&&n.push({ok:s}),s=[]}function u(t){for(var e=0;e<t.length;e++)s.push(t[e])}function f(e){if(e[2]!=e[6])return!0;for(var n=e[1],i=e[5],o=0;o<e[2];o++)if(t[o+n]!=r[o+i])return!0;return!1}for(var l=0;l<a.length;l++){var d=a[l],h=d[0];-1==h?f(d)?(c(),n.push({conflict:{a:t.slice(d[1],d[1]+d[2]),aIndex:d[1],o:e.slice(d[3],d[3]+d[4]),oIndex:d[3],b:r.slice(d[5],d[5]+d[6]),bIndex:d[5]}})):u(o[0].slice(d[1],d[1]+d[2])):u(o[h].slice(d[1],d[1]+d[2]))}return c(),n}},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));const n={commit:16,tree:32,blob:48,tag:64,ofs_delta:96,ref_delta:112}},function(t,e,r){"use strict";function n(t,e){const r=t.map(t=>t.split("=",1)[0]);return e.filter(t=>{const e=t.split("=",1)[0];return r.includes(e)})}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var n=r(57),i=r(33);function o(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function a(t){const e=t.indexOf("\r"),r=t.indexOf("\n");return-1===e&&-1===r?-1:-1===e?r+1:-1===r?e+1:r===e+1?r+1:Math.min(e,r)+1}function s(t){const e=new n.a;let r="";var s;return(s=function*(){yield Object(i.a)(t,t=>{for(t=t.toString("utf8"),r+=t;;){const t=a(r);if(-1===t)break;e.write(r.slice(0,t)),r=r.slice(t)}}),r.length>0&&e.write(r),e.end()},function(){var t=this,e=arguments;return new Promise((function(r,n){var i=s.apply(t,e);function a(t){o(i,r,n,a,c,"next",t)}function c(t){o(i,r,n,a,c,"throw",t)}a(void 0)}))})(),e}},,function(t,e,r){"use strict";(function(e){var r=function(t){t=t||{},this.Promise=t.Promise||Promise,this.queues={},this.domains={},this.domainReentrant=t.domainReentrant||!1,this.timeout=t.timeout||r.DEFAULT_TIMEOUT,this.maxPending=t.maxPending||r.DEFAULT_MAX_PENDING};r.DEFAULT_TIMEOUT=0,r.DEFAULT_MAX_PENDING=1e3,r.prototype.acquire=function(t,r,n,i){if(Array.isArray(t))return this._acquireBatch(t,r,n,i);if("function"!=typeof r)throw new Error("You must pass a function to execute");var o=null,a=null,s=null;"function"!=typeof n&&(i=n,n=null,s=new this.Promise((function(t,e){o=t,a=e}))),i=i||{};var c=!1,u=null,f=this,l=function(e,r,i){e&&(0===f.queues[t].length&&delete f.queues[t],delete f.domains[t]),c||(s?r?a(r):o(i):"function"==typeof n&&n(r,i),c=!0),e&&f.queues[t]&&f.queues[t].length>0&&f.queues[t].shift()()},d=function(n){if(c)return l(n);if(u&&(clearTimeout(u),u=null),n&&(f.domains[t]=e.domain),1===r.length){var i=!1;r((function(t,e){i||(i=!0,l(n,t,e))}))}else f._promiseTry((function(){return r()})).then((function(t){l(n,void 0,t)}),(function(t){l(n,t)}))};if(e.domain&&(d=e.domain.bind(d)),f.queues[t])if(f.domainReentrant&&e.domain&&e.domain===f.domains[t])d(!1);else if(f.queues[t].length>=f.maxPending)l(!1,new Error("Too much pending tasks"));else{var h=function(){d(!0)};i.skipQueue?f.queues[t].unshift(h):f.queues[t].push(h);var p=i.timeout||f.timeout;p&&(u=setTimeout((function(){u=null,l(!1,new Error("async-lock timed out"))}),p))}else f.queues[t]=[],d(!0);return s||void 0},r.prototype._acquireBatch=function(t,e,r,n){"function"!=typeof r&&(n=r,r=null);var i=this,o=e;if(t.reverse().forEach((function(t){o=function(t,e){return function(r){i.acquire(t,e,r,n)}}(t,o)})),"function"!=typeof r)return new this.Promise((function(t,e){1===o.length?o((function(r,n){r?e(r):t(n)})):t(o())}));o(r)},r.prototype.isBusy=function(t){return t?!!this.queues[t]:Object.keys(this.queues).length>0},r.prototype._promiseTry=function(t){try{return this.Promise.resolve(t())}catch(t){return this.Promise.reject(t)}},t.exports=r}).call(this,r(101))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=u(t),a=n[0],s=n[1],c=new o(function(t,e,r){return 3*(e+r)/4-r}(0,a,s)),f=0,l=s>0?a-4:a;for(r=0;r<l;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],c[f++]=e>>16&255,c[f++]=e>>8&255,c[f++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,c[f++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e);return c},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],a=0,s=r-i;a<s;a+=16383)o.push(f(t,a,a+16383>s?s:a+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s<c;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t,e,r){for(var i,o,a=[],s=e;s<r;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,c=(1<<s)-1,u=c>>1,f=-7,l=r?i-1:0,d=r?-1:1,h=t[e+l];for(l+=d,o=h&(1<<-f)-1,h>>=-f,f+=s;f>0;o=256*o+t[e+l],l+=d,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+t[e+l],l+=d,f-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=u}return(h?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,c,u=8*o-i-1,f=(1<<u)-1,l=f>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),(e+=a+l>=1?d/c:d*Math.pow(2,1-l))*c>=2&&(a++,c/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(e*c-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;t[r+h]=255&a,h+=p,a/=256,u-=8);t[r+h-p]|=128*y}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){var n=r(104).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,a=this._len,s=0;s<o;){for(var c=a%i,u=Math.min(o-s,i-c),f=0;f<u;f++)r[c+f]=t[s+f];s+=u,(a+=u)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,r){"use strict";var n=r(138),i=r(27),o=r(107),a=r(84),s=r(108),c=Object.prototype.toString;function u(t){if(!(this instanceof u))return new u(t);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==r)throw new Error(a[r]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var f;if(f="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===c.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(r=n.deflateSetDictionary(this.strm,f)))throw new Error(a[r]);this._dict_set=!0}}function f(t,e){var r=new u(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}u.prototype.push=function(t,e){var r,a,s=this.strm,u=this.options.chunkSize;if(this.ended)return!1;a=e===~~e?e:!0===e?4:0,"string"==typeof t?s.input=o.string2buf(t):"[object ArrayBuffer]"===c.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(u),s.next_out=0,s.avail_out=u),1!==(r=n.deflate(s,a))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==r);return 4===a?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==a||(this.onEnd(0),s.avail_out=0,!0)},u.prototype.onData=function(t){this.chunks.push(t)},u.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Deflate=u,e.deflate=f,e.deflateRaw=function(t,e){return(e=e||{}).raw=!0,f(t,e)},e.gzip=function(t,e){return(e=e||{}).gzip=!0,f(t,e)}},function(t,e,r){"use strict";var n,i=r(27),o=r(139),a=r(105),s=r(106),c=r(84);function u(t,e){return t.msg=c[e],e}function f(t){return(t<<1)-(t>4?9:0)}function l(t){for(var e=t.length;--e>=0;)t[e]=0}function d(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function h(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,d(t.strm)}function p(t,e){t.pending_buf[t.pending++]=e}function y(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function g(t,e){var r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,c=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,u=t.window,f=t.w_mask,l=t.prev,d=t.strstart+258,h=u[o+a-1],p=u[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(u[(r=e)+a]===p&&u[r+a-1]===h&&u[r]===u[o]&&u[++r]===u[o+1]){o+=2,r++;do{}while(u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&o<d);if(n=258-(d-o),o=d-258,n>a){if(t.match_start=e,a=n,n>=s)break;h=u[o+a-1],p=u[o+a]}}}while((e=l[e&f])>c&&0!=--i);return a<=t.lookahead?a:t.lookahead}function v(t){var e,r,n,o,c,u,f,l,d,h,p=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=p+(p-262)){i.arraySet(t.window,t.window,p,p,0),t.match_start-=p,t.strstart-=p,t.block_start-=p,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=p?n-p:0}while(--r);e=r=p;do{n=t.prev[--e],t.prev[e]=n>=p?n-p:0}while(--r);o+=p}if(0===t.strm.avail_in)break;if(u=t.strm,f=t.window,l=t.strstart+t.lookahead,d=o,h=void 0,(h=u.avail_in)>d&&(h=d),r=0===h?0:(u.avail_in-=h,i.arraySet(f,u.input,u.next_in,h,l),1===u.state.wrap?u.adler=a(u.adler,f,h,l):2===u.state.wrap&&(u.adler=s(u.adler,f,h,l)),u.next_in+=h,u.total_in+=h,h),t.lookahead+=r,t.lookahead+t.insert>=3)for(c=t.strstart-t.insert,t.ins_h=t.window[c],t.ins_h=(t.ins_h<<t.hash_shift^t.window[c+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[c+3-1])&t.hash_mask,t.prev[c&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=c,c++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)}function m(t,e){for(var r,n;;){if(t.lookahead<262){if(v(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-262&&(t.match_length=g(t,r)),t.match_length>=3)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(h(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(h(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(h(t,!1),0===t.strm.avail_out)?1:2}function w(t,e){for(var r,n,i;;){if(t.lookahead<262){if(v(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-262&&(t.match_length=g(t,r),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(h(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=o._tr_tally(t,0,t.window[t.strstart-1]))&&h(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(h(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(h(t,!1),0===t.strm.avail_out)?1:2}function b(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}function _(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),l(this.dyn_ltree),l(this.dyn_dtree),l(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),l(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),l(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function O(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=0,o._tr_init(e),0):u(t,-2)}function x(t){var e,r=O(t);return 0===r&&((e=t.state).window_size=2*e.w_size,l(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),r}function j(t,e,r,n,o,a){if(!t)return-2;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),o<1||o>9||8!==r||n<8||n>15||e<0||e>9||a<0||a>4)return u(t,-2);8===n&&(n=9);var c=new _;return t.state=c,c.strm=t,c.wrap=s,c.gzhead=null,c.w_bits=n,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=o+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+3-1)/3),c.window=new i.Buf8(2*c.w_size),c.head=new i.Buf16(c.hash_size),c.prev=new i.Buf16(c.w_size),c.lit_bufsize=1<<o+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new i.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=e,c.strategy=a,c.method=r,x(t)}n=[new b(0,0,0,0,(function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(v(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,h(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(h(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(h(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(h(t,!1),t.strm.avail_out),1)})),new b(4,4,8,4,m),new b(4,5,16,8,m),new b(4,6,32,32,m),new b(4,4,16,16,w),new b(8,16,32,32,w),new b(8,16,128,128,w),new b(8,32,128,256,w),new b(32,128,258,1024,w),new b(32,258,258,4096,w)],e.deflateInit=function(t,e){return j(t,e,8,15,8,0)},e.deflateInit2=j,e.deflateReset=x,e.deflateResetKeep=O,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?-2:(t.state.gzhead=e,0):-2},e.deflate=function(t,e){var r,i,a,c;if(!t||!t.state||e>5||e<0)return t?u(t,-2):-2;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&4!==e)return u(t,0===t.avail_out?-5:-2);if(i.strm=t,r=i.last_flush,i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,p(i,31),p(i,139),p(i,8),i.gzhead?(p(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),p(i,255&i.gzhead.time),p(i,i.gzhead.time>>8&255),p(i,i.gzhead.time>>16&255),p(i,i.gzhead.time>>24&255),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(p(i,255&i.gzhead.extra.length),p(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=s(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(p(i,0),p(i,0),p(i,0),p(i,0),p(i,0),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,3),i.status=113);else{var g=8+(i.w_bits-8<<4)<<8;g|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(g|=32),g+=31-g%31,i.status=113,y(i,g),0!==i.strstart&&(y(i,t.adler>>>16),y(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),d(t),a=i.pending,i.pending!==i.pending_buf_size));)p(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),d(t),a=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,p(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===c&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),d(t),a=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,p(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===c&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&d(t),i.pending+2<=i.pending_buf_size&&(p(i,255&t.adler),p(i,t.adler>>8&255),t.adler=0,i.status=113)):i.status=113),0!==i.pending){if(d(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&f(e)<=f(r)&&4!==e)return u(t,-5);if(666===i.status&&0!==t.avail_in)return u(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&666!==i.status){var m=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(v(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(h(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(h(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(h(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,a,s=t.window;;){if(t.lookahead<=258){if(v(t),t.lookahead<=258&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[i=t.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=t.strstart+258;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<a);t.match_length=258-(a-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(h(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(h(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(h(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==m&&4!==m||(i.status=666),1===m||3===m)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===m&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(l(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),d(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(p(i,255&t.adler),p(i,t.adler>>8&255),p(i,t.adler>>16&255),p(i,t.adler>>24&255),p(i,255&t.total_in),p(i,t.total_in>>8&255),p(i,t.total_in>>16&255),p(i,t.total_in>>24&255)):(y(i,t.adler>>>16),y(i,65535&t.adler)),d(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},e.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?u(t,-2):(t.state=null,113===e?u(t,-3):0):-2},e.deflateSetDictionary=function(t,e){var r,n,o,s,c,u,f,d,h=e.length;if(!t||!t.state)return-2;if(2===(s=(r=t.state).wrap)||1===s&&42!==r.status||r.lookahead)return-2;for(1===s&&(t.adler=a(t.adler,e,h,0)),r.wrap=0,h>=r.w_size&&(0===s&&(l(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new i.Buf8(r.w_size),i.arraySet(d,e,h-r.w_size,r.w_size,0),e=d,h=r.w_size),c=t.avail_in,u=t.next_in,f=t.input,t.avail_in=h,t.next_in=0,t.input=e,v(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--o);r.strstart=n,r.lookahead=2,v(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=u,t.input=f,t.avail_in=c,r.wrap=s,0},e.deflateInfo="pako deflate (from Nodeca project)"},function(t,e,r){"use strict";var n=r(27);function i(t){for(var e=t.length;--e>=0;)t[e]=0}var o=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],u=new Array(576);i(u);var f=new Array(60);i(f);var l=new Array(512);i(l);var d=new Array(256);i(d);var h=new Array(29);i(h);var p,y,g,v=new Array(30);function m(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function b(t){return t<256?l[t]:l[256+(t>>>7)]}function _(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function O(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,_(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function x(t,e,r){O(t,r[2*e],r[2*e+1])}function j(t,e){var r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1}function P(t,e,r){var n,i,o=new Array(16),a=0;for(n=1;n<=15;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=j(o[s]++,s))}}function k(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function E(t){t.bi_valid>8?_(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function A(t,e,r,n){var i=2*e,o=2*r;return t[i]<t[o]||t[i]===t[o]&&n[e]<=n[r]}function S(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&A(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!A(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function $(t,e,r){var n,i,s,c,u=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*u]<<8|t.pending_buf[t.d_buf+2*u+1],i=t.pending_buf[t.l_buf+u],u++,0===n?x(t,i,e):(x(t,(s=d[i])+256+1,e),0!==(c=o[s])&&O(t,i-=h[s],c),x(t,s=b(--n),r),0!==(c=a[s])&&O(t,n-=v[s],c))}while(u<t.last_lit);x(t,256,e)}function R(t,e){var r,n,i,o=e.dyn_tree,a=e.stat_desc.static_tree,s=e.stat_desc.has_stree,c=e.stat_desc.elems,u=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<c;r++)0!==o[2*r]?(t.heap[++t.heap_len]=u=r,t.depth[r]=0):o[2*r+1]=0;for(;t.heap_len<2;)o[2*(i=t.heap[++t.heap_len]=u<2?++u:0)]=1,t.depth[i]=0,t.opt_len--,s&&(t.static_len-=a[2*i+1]);for(e.max_code=u,r=t.heap_len>>1;r>=1;r--)S(t,o,r);i=c;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],S(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,o[2*i]=o[2*r]+o[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,o[2*r+1]=o[2*n+1]=i,t.heap[1]=i++,S(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,o,a,s,c=e.dyn_tree,u=e.max_code,f=e.stat_desc.static_tree,l=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,h=e.stat_desc.extra_base,p=e.stat_desc.max_length,y=0;for(o=0;o<=15;o++)t.bl_count[o]=0;for(c[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(o=c[2*c[2*(n=t.heap[r])+1]+1]+1)>p&&(o=p,y++),c[2*n+1]=o,n>u||(t.bl_count[o]++,a=0,n>=h&&(a=d[n-h]),s=c[2*n],t.opt_len+=s*(o+a),l&&(t.static_len+=s*(f[2*n+1]+a)));if(0!==y){do{for(o=p-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[p]--,y-=2}while(y>0);for(o=p;0!==o;o--)for(n=t.bl_count[o];0!==n;)(i=t.heap[--r])>u||(c[2*i+1]!==o&&(t.opt_len+=(o-c[2*i+1])*c[2*i],c[2*i+1]=o),n--)}}(t,e),P(o,u,t.bl_count)}function B(t,e,r){var n,i,o=-1,a=e[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++s<c&&i===a||(s<u?t.bl_tree[2*i]+=s:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,o=i,0===a?(c=138,u=3):i===a?(c=6,u=3):(c=7,u=4))}function T(t,e,r){var n,i,o=-1,a=e[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),n=0;n<=r;n++)if(i=a,a=e[2*(n+1)+1],!(++s<c&&i===a)){if(s<u)do{x(t,i,t.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(x(t,i,t.bl_tree),s--),x(t,16,t.bl_tree),O(t,s-3,2)):s<=10?(x(t,17,t.bl_tree),O(t,s-3,3)):(x(t,18,t.bl_tree),O(t,s-11,7));s=0,o=i,0===a?(c=138,u=3):i===a?(c=6,u=3):(c=7,u=4)}}i(v);var I=!1;function U(t,e,r,i){O(t,0+(i?1:0),3),function(t,e,r,i){E(t),i&&(_(t,r),_(t,~r)),n.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r,!0)}e._tr_init=function(t){I||(!function(){var t,e,r,n,i,c=new Array(16);for(r=0,n=0;n<28;n++)for(h[n]=r,t=0;t<1<<o[n];t++)d[r++]=n;for(d[r-1]=n,i=0,n=0;n<16;n++)for(v[n]=i,t=0;t<1<<a[n];t++)l[i++]=n;for(i>>=7;n<30;n++)for(v[n]=i<<7,t=0;t<1<<a[n]-7;t++)l[256+i++]=n;for(e=0;e<=15;e++)c[e]=0;for(t=0;t<=143;)u[2*t+1]=8,t++,c[8]++;for(;t<=255;)u[2*t+1]=9,t++,c[9]++;for(;t<=279;)u[2*t+1]=7,t++,c[7]++;for(;t<=287;)u[2*t+1]=8,t++,c[8]++;for(P(u,287,c),t=0;t<30;t++)f[2*t+1]=5,f[2*t]=j(t,5);p=new m(u,o,257,286,15),y=new m(f,a,0,30,15),g=new m(new Array(0),s,0,19,7)}(),I=!0),t.l_desc=new w(t.dyn_ltree,p),t.d_desc=new w(t.dyn_dtree,y),t.bl_desc=new w(t.bl_tree,g),t.bi_buf=0,t.bi_valid=0,k(t)},e._tr_stored_block=U,e._tr_flush_block=function(t,e,r,n){var i,o,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),R(t,t.l_desc),R(t,t.d_desc),a=function(t){var e;for(B(t,t.dyn_ltree,t.l_desc.max_code),B(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*c[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?U(t,e,r,n):4===t.strategy||o===i?(O(t,2+(n?1:0),3),$(t,u,f)):(O(t,4+(n?1:0),3),function(t,e,r,n){var i;for(O(t,e-257,5),O(t,r-1,5),O(t,n-4,4),i=0;i<n;i++)O(t,t.bl_tree[2*c[i]+1],3);T(t,t.dyn_ltree,e-1),T(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),$(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&E(t)},e._tr_tally=function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(d[r]+256+1)]++,t.dyn_dtree[2*b(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){O(t,2,3),x(t,256,u),function(t){16===t.bi_valid?(_(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},function(t,e,r){"use strict";var n=r(141),i=r(27),o=r(107),a=r(109),s=r(84),c=r(108),u=r(144),f=Object.prototype.toString;function l(t){if(!(this instanceof l))return new l(t);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==a.Z_OK)throw new Error(s[r]);if(this.header=new u,n.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=o.string2buf(e.dictionary):"[object ArrayBuffer]"===f.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=n.inflateSetDictionary(this.strm,e.dictionary))!==a.Z_OK))throw new Error(s[r])}function d(t,e){var r=new l(e);if(r.push(t,!0),r.err)throw r.msg||s[r.err];return r.result}l.prototype.push=function(t,e){var r,s,c,u,l,d=this.strm,h=this.options.chunkSize,p=this.options.dictionary,y=!1;if(this.ended)return!1;s=e===~~e?e:!0===e?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof t?d.input=o.binstring2buf(t):"[object ArrayBuffer]"===f.call(t)?d.input=new Uint8Array(t):d.input=t,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(h),d.next_out=0,d.avail_out=h),(r=n.inflate(d,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&p&&(r=n.inflateSetDictionary(this.strm,p)),r===a.Z_BUF_ERROR&&!0===y&&(r=a.Z_OK,y=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&r!==a.Z_STREAM_END&&(0!==d.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(c=o.utf8border(d.output,d.next_out),u=d.next_out-c,l=o.buf2string(d.output,c),d.next_out=u,d.avail_out=h-u,u&&i.arraySet(d.output,d.output,c,u,0),this.onData(l)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(y=!0)}while((d.avail_in>0||0===d.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),d.avail_out=0,!0)},l.prototype.onData=function(t){this.chunks.push(t)},l.prototype.onEnd=function(t){t===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=l,e.inflate=d,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,d(t,e)},e.ungzip=d},function(t,e,r){"use strict";var n=r(27),i=r(105),o=r(106),a=r(142),s=r(143);function c(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function u(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):-2}function l(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,f(t)):-2}function d(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?-2:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,l(t))):-2}function h(t,e){var r,n;return t?(n=new u,t.state=n,n.window=null,0!==(r=d(t,e))&&(t.state=null),r):-2}var p,y,g=!0;function v(t){if(g){var e;for(p=new n.Buf32(512),y=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(s(1,t.lens,0,288,p,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;s(2,t.lens,0,32,y,0,t.work,{bits:5}),g=!1}t.lencode=p,t.lenbits=9,t.distcode=y,t.distbits=5}function m(t,e,r,i){var o,a=t.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),i>=a.wsize?(n.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),n.arraySet(a.window,e,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,e,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}e.inflateReset=l,e.inflateReset2=d,e.inflateResetKeep=f,e.inflateInit=function(t){return h(t,15)},e.inflateInit2=h,e.inflate=function(t,e){var r,u,f,l,d,h,p,y,g,w,b,_,O,x,j,P,k,E,A,S,$,R,B,T,I=0,U=new n.Buf8(4),C=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return-2;12===(r=t.state).mode&&(r.mode=13),d=t.next_out,f=t.output,p=t.avail_out,l=t.next_in,u=t.input,h=t.avail_in,y=r.hold,g=r.bits,w=h,b=p,R=0;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;g<16;){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}if(2&r.wrap&&35615===y){r.check=0,U[0]=255&y,U[1]=y>>>8&255,r.check=o(r.check,U,2,0),y=0,g=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&y)<<8)+(y>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&y)){t.msg="unknown compression method",r.mode=30;break}if(g-=4,$=8+(15&(y>>>=4)),0===r.wbits)r.wbits=$;else if($>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<$,t.adler=r.check=1,r.mode=512&y?10:12,y=0,g=0;break;case 2:for(;g<16;){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}if(r.flags=y,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=y>>8&1),512&r.flags&&(U[0]=255&y,U[1]=y>>>8&255,r.check=o(r.check,U,2,0)),y=0,g=0,r.mode=3;case 3:for(;g<32;){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}r.head&&(r.head.time=y),512&r.flags&&(U[0]=255&y,U[1]=y>>>8&255,U[2]=y>>>16&255,U[3]=y>>>24&255,r.check=o(r.check,U,4,0)),y=0,g=0,r.mode=4;case 4:for(;g<16;){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}r.head&&(r.head.xflags=255&y,r.head.os=y>>8),512&r.flags&&(U[0]=255&y,U[1]=y>>>8&255,r.check=o(r.check,U,2,0)),y=0,g=0,r.mode=5;case 5:if(1024&r.flags){for(;g<16;){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}r.length=y,r.head&&(r.head.extra_len=y),512&r.flags&&(U[0]=255&y,U[1]=y>>>8&255,r.check=o(r.check,U,2,0)),y=0,g=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((_=r.length)>h&&(_=h),_&&(r.head&&($=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,u,l,_,$)),512&r.flags&&(r.check=o(r.check,u,_,l)),h-=_,l+=_,r.length-=_),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===h)break t;_=0;do{$=u[l+_++],r.head&&$&&r.length<65536&&(r.head.name+=String.fromCharCode($))}while($&&_<h);if(512&r.flags&&(r.check=o(r.check,u,_,l)),h-=_,l+=_,$)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===h)break t;_=0;do{$=u[l+_++],r.head&&$&&r.length<65536&&(r.head.comment+=String.fromCharCode($))}while($&&_<h);if(512&r.flags&&(r.check=o(r.check,u,_,l)),h-=_,l+=_,$)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;g<16;){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}if(y!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}y=0,g=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;g<32;){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}t.adler=r.check=c(y),y=0,g=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=d,t.avail_out=p,t.next_in=l,t.avail_in=h,r.hold=y,r.bits=g,2;t.adler=r.check=1,r.mode=12;case 12:if(5===e||6===e)break t;case 13:if(r.last){y>>>=7&g,g-=7&g,r.mode=27;break}for(;g<3;){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}switch(r.last=1&y,g-=1,3&(y>>>=1)){case 0:r.mode=14;break;case 1:if(v(r),r.mode=20,6===e){y>>>=2,g-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}y>>>=2,g-=2;break;case 14:for(y>>>=7&g,g-=7&g;g<32;){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}if((65535&y)!=(y>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&y,y=0,g=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(_=r.length){if(_>h&&(_=h),_>p&&(_=p),0===_)break t;n.arraySet(f,u,l,_,d),h-=_,l+=_,p-=_,d+=_,r.length-=_;break}r.mode=12;break;case 17:for(;g<14;){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}if(r.nlen=257+(31&y),y>>>=5,g-=5,r.ndist=1+(31&y),y>>>=5,g-=5,r.ncode=4+(15&y),y>>>=4,g-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;g<3;){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}r.lens[C[r.have++]]=7&y,y>>>=3,g-=3}for(;r.have<19;)r.lens[C[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,B={bits:r.lenbits},R=s(0,r.lens,0,19,r.lencode,0,r.work,B),r.lenbits=B.bits,R){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;P=(I=r.lencode[y&(1<<r.lenbits)-1])>>>16&255,k=65535&I,!((j=I>>>24)<=g);){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}if(k<16)y>>>=j,g-=j,r.lens[r.have++]=k;else{if(16===k){for(T=j+2;g<T;){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}if(y>>>=j,g-=j,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}$=r.lens[r.have-1],_=3+(3&y),y>>>=2,g-=2}else if(17===k){for(T=j+3;g<T;){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}g-=j,$=0,_=3+(7&(y>>>=j)),y>>>=3,g-=3}else{for(T=j+7;g<T;){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}g-=j,$=0,_=11+(127&(y>>>=j)),y>>>=7,g-=7}if(r.have+_>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;_--;)r.lens[r.have++]=$}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,B={bits:r.lenbits},R=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,B),r.lenbits=B.bits,R){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,B={bits:r.distbits},R=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,B),r.distbits=B.bits,R){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(h>=6&&p>=258){t.next_out=d,t.avail_out=p,t.next_in=l,t.avail_in=h,r.hold=y,r.bits=g,a(t,b),d=t.next_out,f=t.output,p=t.avail_out,l=t.next_in,u=t.input,h=t.avail_in,y=r.hold,g=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;P=(I=r.lencode[y&(1<<r.lenbits)-1])>>>16&255,k=65535&I,!((j=I>>>24)<=g);){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}if(P&&0==(240&P)){for(E=j,A=P,S=k;P=(I=r.lencode[S+((y&(1<<E+A)-1)>>E)])>>>16&255,k=65535&I,!(E+(j=I>>>24)<=g);){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}y>>>=E,g-=E,r.back+=E}if(y>>>=j,g-=j,r.back+=j,r.length=k,0===P){r.mode=26;break}if(32&P){r.back=-1,r.mode=12;break}if(64&P){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&P,r.mode=22;case 22:if(r.extra){for(T=r.extra;g<T;){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}r.length+=y&(1<<r.extra)-1,y>>>=r.extra,g-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;P=(I=r.distcode[y&(1<<r.distbits)-1])>>>16&255,k=65535&I,!((j=I>>>24)<=g);){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}if(0==(240&P)){for(E=j,A=P,S=k;P=(I=r.distcode[S+((y&(1<<E+A)-1)>>E)])>>>16&255,k=65535&I,!(E+(j=I>>>24)<=g);){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}y>>>=E,g-=E,r.back+=E}if(y>>>=j,g-=j,r.back+=j,64&P){t.msg="invalid distance code",r.mode=30;break}r.offset=k,r.extra=15&P,r.mode=24;case 24:if(r.extra){for(T=r.extra;g<T;){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}r.offset+=y&(1<<r.extra)-1,y>>>=r.extra,g-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===p)break t;if(_=b-p,r.offset>_){if((_=r.offset-_)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}_>r.wnext?(_-=r.wnext,O=r.wsize-_):O=r.wnext-_,_>r.length&&(_=r.length),x=r.window}else x=f,O=d-r.offset,_=r.length;_>p&&(_=p),p-=_,r.length-=_;do{f[d++]=x[O++]}while(--_);0===r.length&&(r.mode=21);break;case 26:if(0===p)break t;f[d++]=r.length,p--,r.mode=21;break;case 27:if(r.wrap){for(;g<32;){if(0===h)break t;h--,y|=u[l++]<<g,g+=8}if(b-=p,t.total_out+=b,r.total+=b,b&&(t.adler=r.check=r.flags?o(r.check,f,b,d-b):i(r.check,f,b,d-b)),b=p,(r.flags?y:c(y))!==r.check){t.msg="incorrect data check",r.mode=30;break}y=0,g=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;g<32;){if(0===h)break t;h--,y+=u[l++]<<g,g+=8}if(y!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}y=0,g=0}r.mode=29;case 29:R=1;break t;case 30:R=-3;break t;case 31:return-4;case 32:default:return-2}return t.next_out=d,t.avail_out=p,t.next_in=l,t.avail_in=h,r.hold=y,r.bits=g,(r.wsize||b!==t.avail_out&&r.mode<30&&(r.mode<27||4!==e))&&m(t,t.output,t.next_out,b-t.avail_out)?(r.mode=31,-4):(w-=t.avail_in,b-=t.avail_out,t.total_in+=w,t.total_out+=b,r.total+=b,r.wrap&&b&&(t.adler=r.check=r.flags?o(r.check,f,b,t.next_out-b):i(r.check,f,b,t.next_out-b)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0===w&&0===b||4===e)&&0===R&&(R=-5),R)},e.inflateEnd=function(t){if(!t||!t.state)return-2;var e=t.state;return e.window&&(e.window=null),t.state=null,0},e.inflateGetHeader=function(t,e){var r;return t&&t.state?0==(2&(r=t.state).wrap)?-2:(r.head=e,e.done=!1,0):-2},e.inflateSetDictionary=function(t,e){var r,n=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?-2:11===r.mode&&i(1,e,n,0)!==r.check?-3:m(t,e,n,n)?(r.mode=31,-4):(r.havedict=1,0):-2},e.inflateInfo="pako inflate (from Nodeca project)"},function(t,e,r){"use strict";t.exports=function(t,e){var r,n,i,o,a,s,c,u,f,l,d,h,p,y,g,v,m,w,b,_,O,x,j,P,k;r=t.state,n=t.next_in,P=t.input,i=n+(t.avail_in-5),o=t.next_out,k=t.output,a=o-(e-t.avail_out),s=o+(t.avail_out-257),c=r.dmax,u=r.wsize,f=r.whave,l=r.wnext,d=r.window,h=r.hold,p=r.bits,y=r.lencode,g=r.distcode,v=(1<<r.lenbits)-1,m=(1<<r.distbits)-1;t:do{p<15&&(h+=P[n++]<<p,p+=8,h+=P[n++]<<p,p+=8),w=y[h&v];e:for(;;){if(h>>>=b=w>>>24,p-=b,0===(b=w>>>16&255))k[o++]=65535&w;else{if(!(16&b)){if(0==(64&b)){w=y[(65535&w)+(h&(1<<b)-1)];continue e}if(32&b){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}_=65535&w,(b&=15)&&(p<b&&(h+=P[n++]<<p,p+=8),_+=h&(1<<b)-1,h>>>=b,p-=b),p<15&&(h+=P[n++]<<p,p+=8,h+=P[n++]<<p,p+=8),w=g[h&m];r:for(;;){if(h>>>=b=w>>>24,p-=b,!(16&(b=w>>>16&255))){if(0==(64&b)){w=g[(65535&w)+(h&(1<<b)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(O=65535&w,p<(b&=15)&&(h+=P[n++]<<p,(p+=8)<b&&(h+=P[n++]<<p,p+=8)),(O+=h&(1<<b)-1)>c){t.msg="invalid distance too far back",r.mode=30;break t}if(h>>>=b,p-=b,O>(b=o-a)){if((b=O-b)>f&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(x=0,j=d,0===l){if(x+=u-b,b<_){_-=b;do{k[o++]=d[x++]}while(--b);x=o-O,j=k}}else if(l<b){if(x+=u+l-b,(b-=l)<_){_-=b;do{k[o++]=d[x++]}while(--b);if(x=0,l<_){_-=b=l;do{k[o++]=d[x++]}while(--b);x=o-O,j=k}}}else if(x+=l-b,b<_){_-=b;do{k[o++]=d[x++]}while(--b);x=o-O,j=k}for(;_>2;)k[o++]=j[x++],k[o++]=j[x++],k[o++]=j[x++],_-=3;_&&(k[o++]=j[x++],_>1&&(k[o++]=j[x++]))}else{x=o-O;do{k[o++]=k[x++],k[o++]=k[x++],k[o++]=k[x++],_-=3}while(_>2);_&&(k[o++]=k[x++],_>1&&(k[o++]=k[x++]))}break}}break}}while(n<i&&o<s);n-=_=p>>3,h&=(1<<(p-=_<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n<i?i-n+5:5-(n-i),t.avail_out=o<s?s-o+257:257-(o-s),r.hold=h,r.bits=p}},function(t,e,r){"use strict";var n=r(27),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(t,e,r,c,u,f,l,d){var h,p,y,g,v,m,w,b,_,O=d.bits,x=0,j=0,P=0,k=0,E=0,A=0,S=0,$=0,R=0,B=0,T=null,I=0,U=new n.Buf16(16),C=new n.Buf16(16),z=null,D=0;for(x=0;x<=15;x++)U[x]=0;for(j=0;j<c;j++)U[e[r+j]]++;for(E=O,k=15;k>=1&&0===U[k];k--);if(E>k&&(E=k),0===k)return u[f++]=20971520,u[f++]=20971520,d.bits=1,0;for(P=1;P<k&&0===U[P];P++);for(E<P&&(E=P),$=1,x=1;x<=15;x++)if($<<=1,($-=U[x])<0)return-1;if($>0&&(0===t||1!==k))return-1;for(C[1]=0,x=1;x<15;x++)C[x+1]=C[x]+U[x];for(j=0;j<c;j++)0!==e[r+j]&&(l[C[e[r+j]]++]=j);if(0===t?(T=z=l,m=19):1===t?(T=i,I-=257,z=o,D-=257,m=256):(T=a,z=s,m=-1),B=0,j=0,x=P,v=f,A=E,S=0,y=-1,g=(R=1<<E)-1,1===t&&R>852||2===t&&R>592)return 1;for(;;){w=x-S,l[j]<m?(b=0,_=l[j]):l[j]>m?(b=z[D+l[j]],_=T[I+l[j]]):(b=96,_=0),h=1<<x-S,P=p=1<<A;do{u[v+(B>>S)+(p-=h)]=w<<24|b<<16|_|0}while(0!==p);for(h=1<<x-1;B&h;)h>>=1;if(0!==h?(B&=h-1,B+=h):B=0,j++,0==--U[x]){if(x===k)break;x=e[r+l[j]]}if(x>E&&(B&g)!==y){for(0===S&&(S=E),v+=P,$=1<<(A=x-S);A+S<k&&!(($-=U[A+S])<=0);)A++,$<<=1;if(R+=1<<A,1===t&&R>852||2===t&&R>592)return 1;u[y=B&g]=E<<24|A<<16|v-f|0}}return 0!==B&&(u[v+B]=x-S<<24|64<<16|0),d.bits=E,0}},function(t,e,r){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(t,e){t.exports=function(t,e){var r,n,i=t,o=e,a=i.length,s=o.length,c=!1,u=null,f=a+1,l=[],d=[],h=[],p="",y=function(t,e,r){return{x:t,y:e,k:r}},g=function(t,e){return{elem:t,t:e}},v=function(t,e,r){var n,c,u;for(n=e>r?l[t-1+f]:l[t+1+f],c=(u=Math.max(e,r))-t;c<a&&u<s&&i[c]===o[u];)++c,++u;return l[t+f]=d.length,d[d.length]=new y(c,u,n),u};return a>=s&&(r=i,n=a,i=o,o=r,a=s,s=n,c=!0,f=a+1),{SES_DELETE:-1,SES_COMMON:0,SES_ADD:1,editdistance:function(){return u},getlcs:function(){return p},getses:function(){return h},compose:function(){var t,e,r,n,m,w,b,_;for(t=s-a,e=a+s+3,r={},b=0;b<e;++b)r[b]=-1,l[b]=-1;n=-1;do{for(_=-++n;_<=t-1;++_)r[_+f]=v(_,r[_-1+f]+1,r[_+1+f]);for(_=t+n;_>=t+1;--_)r[_+f]=v(_,r[_-1+f]+1,r[_+1+f]);r[t+f]=v(t,r[t-1+f]+1,r[t+1+f])}while(r[t+f]!==s);for(u=t+2*n,m=l[t+f],w=[];-1!==m;)w[w.length]=new y(d[m].x,d[m].y,null),m=d[m].k;!function(t){var e,r,n;for(1,e=r=0,n=t.length-1;n>=0;--n)for(;e<t[n].x||r<t[n].y;)t[n].y-t[n].x>r-e?(h[h.length]=new g(o[r],c?-1:1),++r):t[n].y-t[n].x<r-e?(h[h.length]=new g(i[e],c?1:-1),++e):(h[h.length]=new g(i[e],0),p+=i[e],++e,++r)}(w)}}}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return s}));var n=r(151),i=r(0);function o(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function s(t){o(a,n,i,s,c,"next",t)}function c(t){o(a,n,i,s,c,"throw",t)}s(void 0)}))}}function s(t){return c.apply(this,arguments)}function c(){return(c=a((function*({object:e}){try{Object(i.a)("object",e),e="string"==typeof e?t.from(e,"utf8"):t.from(e);const r="blob",{oid:o,object:a}=yield Object(n.a)({type:"blob",format:"content",object:e});return{oid:o,type:r,object:new Uint8Array(a),format:"wrapped"}}catch(t){throw t.caller="git.hashBlob",t}}))).apply(this,arguments)}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return d}));var n=r(14),i=r(2),o=r(15),a=r(12),s=r(11),c=r(17),u=r(1);function f(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){f(o,n,i,a,s,"next",t)}function s(t){f(o,n,i,a,s,"throw",t)}a(void 0)}))}}function d(t){return h.apply(this,arguments)}function h(){return(h=l((function*({fs:e,dir:r,gitdir:f=Object(u.a)(r,".git"),type:l,object:d,format:h="parsed",oid:p,encoding:y}){try{const r=new i.a(e);if("parsed"===h){switch(l){case"commit":d=a.a.from(d).toObject();break;case"tree":d=s.a.from(d).toObject();break;case"blob":d=t.from(d,y);break;case"tag":d=o.a.from(d).toObject();break;default:throw new n.a(p||"",l,"blob|commit|tag|tree")}h="content"}return p=yield Object(c.a)({fs:r,gitdir:f,type:l,object:d,oid:p,format:h})}catch(t){throw t.caller="git.writeObject",t}}))).apply(this,arguments)}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";function n(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function s(t){n(a,i,o,s,c,"next",t)}function c(t){n(a,i,o,s,c,"throw",t)}s(void 0)}))}}function o(t){return a.apply(this,arguments)}function a(){return(a=i((function*({fs:t,gitdir:e,oid:r}){const n=`objects/${r.slice(0,2)}/${r.slice(2)}`;return t.exists(`${e}/${n}`)}))).apply(this,arguments)}var s=r(5),c=r(71),u=r(1);function f(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){f(o,n,i,a,s,"next",t)}function s(t){f(o,n,i,a,s,"throw",t)}a(void 0)}))}}function d(t){return h.apply(this,arguments)}function h(){return(h=l((function*({fs:t,cache:e,gitdir:r,oid:n,getExternalRefDelta:i}){let o=yield t.readdir(Object(u.a)(r,"objects/pack"));o=o.filter(t=>t.endsWith(".idx"));for(const a of o){const o=`${r}/objects/pack/${a}`,u=yield Object(c.a)({fs:t,cache:e,filename:o,getExternalRefDelta:i});if(u.error)throw new s.a(u.error);if(u.offsets.has(n))return!0}return!1}))).apply(this,arguments)}var p=r(7);function y(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function g(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){y(o,n,i,a,s,"next",t)}function s(t){y(o,n,i,a,s,"throw",t)}a(void 0)}))}}function v(t){return m.apply(this,arguments)}function m(){return(m=g((function*({fs:t,cache:e,gitdir:r,oid:n,format:i="content"}){const a=n=>Object(p.a)({fs:t,cache:e,gitdir:r,oid:n});let s=yield o({fs:t,gitdir:r,oid:n});return s||(s=yield d({fs:t,cache:e,gitdir:r,oid:n,getExternalRefDelta:a})),s}))).apply(this,arguments)}r.d(e,"a",(function(){return v}))},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return d}));var n=r(83),i=r(46),o=r(102),a=r(25),s=r(9),c=r(3),u=r(17);function f(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){f(o,n,i,a,s,"next",t)}function s(t){f(o,n,i,a,s,"throw",t)}a(void 0)}))}}function d(t){return h.apply(this,arguments)}function h(){return(h=l((function*({fs:e,cache:r,onSign:f,gitdir:l,ref:d,oid:h,note:p,force:y,author:g,committer:v,signingKey:m}){let w;try{w=yield c.a.resolve({gitdir:l,fs:e,ref:d})}catch(t){if(!(t instanceof s.a))throw t}let b=(yield Object(i.a)({fs:e,cache:r,gitdir:l,oid:w||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;if(y)b=b.filter(t=>t.path!==h);else for(const t of b)if(t.path===h)throw new a.a("note",h);"string"==typeof p&&(p=t.from(p,"utf8"));const _=yield Object(u.a)({fs:e,gitdir:l,type:"blob",object:p,format:"content"});b.push({mode:"100644",path:h,oid:_,type:"blob"});const O=yield Object(o.a)({fs:e,gitdir:l,tree:b});return yield Object(n.a)({fs:e,cache:r,onSign:f,gitdir:l,ref:d,tree:O,parent:w&&[w],message:"Note added by 'isomorphic-git addNote'\n",author:g,committer:v,signingKey:m})}))).apply(this,arguments)}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";function n(t){return"5041434b0000000200000000"===t.slice(0,12).toString("hex")}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var n=r(23),i=r(16);function o(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function s(t){o(a,n,i,s,c,"next",t)}function c(t){o(a,n,i,s,c,"throw",t)}s(void 0)}))}}function s(t){return c.apply(this,arguments)}function c(){return(c=a((function*({type:t,object:e,format:r="content",oid:o}){return"deflated"!==r&&("wrapped"!==r&&(e=n.a.wrap({type:t,object:e})),o=yield Object(i.a)(e)),{oid:o,object:e}}))).apply(this,arguments)}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return c}));var n=r(45),i=r(1),o=r(96);function a(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,c,"next",t)}function c(t){a(o,n,i,s,c,"throw",t)}s(void 0)}))}}function c(t){return u.apply(this,arguments)}function u(){return(u=s((function*({fs:e,cache:r,gitdir:a,oids:s,write:c}){const u=yield Object(o.a)({fs:e,cache:r,gitdir:a,oids:s}),f=t.from(yield Object(n.a)(u)),l=`pack-${f.slice(-20).toString("hex")}.pack`;return c?(yield e.write(Object(i.a)(a,`objects/pack/${l}`),f),{filename:l}):{filename:l,packfile:new Uint8Array(f)}}))).apply(this,arguments)}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";r.r(e);var n=r(19),i=r(32),o=r(92),a=r(5);var s=r(29);function c(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){c(o,n,i,a,s,"next",t)}function s(t){c(o,n,i,a,s,"throw",t)}a(void 0)}))}}class f{constructor({fs:t,gitdir:e,cache:r}){this.treePromise=n.a.acquire({fs:t,gitdir:e,cache:r},function(){var t=u((function*(t){return Object(o.a)(t.entries)}));return function(e){return t.apply(this,arguments)}}());const i=this;this.ConstructEntry=class{constructor(t){this._fullpath=t,this._type=!1,this._mode=!1,this._stat=!1,this._oid=!1}type(){var t=this;return u((function*(){return i.type(t)}))()}mode(){var t=this;return u((function*(){return i.mode(t)}))()}stat(){var t=this;return u((function*(){return i.stat(t)}))()}content(){var t=this;return u((function*(){return i.content(t)}))()}oid(){var t=this;return u((function*(){return i.oid(t)}))()}}}readdir(t){var e=this;return u((function*(){const r=t._fullpath,n=(yield e.treePromise).get(r);if(!n)return null;if("blob"===n.type)return null;if("tree"!==n.type)throw new Error(`ENOTDIR: not a directory, scandir '${r}'`);const o=n.children.map(t=>t.fullpath);return o.sort(i.a),o}))()}type(t){return u((function*(){return!1===t._type&&(yield t.stat()),t._type}))()}mode(t){return u((function*(){return!1===t._mode&&(yield t.stat()),t._mode}))()}stat(t){var e=this;return u((function*(){if(!1===t._stat){const r=(yield e.treePromise).get(t._fullpath);if(!r)throw new Error(`ENOENT: no such file or directory, lstat '${t._fullpath}'`);const n="tree"===r.type?{}:Object(s.a)(r.metadata);t._type="tree"===r.type?"tree":function(t){switch(t){case 16384:return"tree";case 33188:case 33261:case 40960:return"blob";case 57344:return"commit"}throw new a.a(`Unexpected GitTree entry mode: ${t.toString(8)}`)}(n.mode),t._mode=n.mode,"tree"===r.type?t._stat=void 0:t._stat=n}return t._stat}))()}content(t){return u((function*(){}))()}oid(t){var e=this;return u((function*(){if(!1===t._oid){const r=(yield e.treePromise).get(t._fullpath);t._oid=r.metadata.oid}return t._oid}))()}}var l=r(31);function d(){const t=Object.create(null);return Object.defineProperty(t,l.a,{value:function({fs:t,gitdir:e,cache:r}){return new f({fs:t,gitdir:e,cache:r})}}),Object.freeze(t),t}var h=r(44),p=r(69),y=r(1),g=r(16),v=r(23);function m(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function w(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){m(o,n,i,a,s,"next",t)}function s(t){m(o,n,i,a,s,"throw",t)}a(void 0)}))}}class b{constructor({fs:t,dir:e,gitdir:r,cache:n}){this.fs=t,this.cache=n,this.dir=e,this.gitdir=r;const i=this;this.ConstructEntry=class{constructor(t){this._fullpath=t,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}type(){var t=this;return w((function*(){return i.type(t)}))()}mode(){var t=this;return w((function*(){return i.mode(t)}))()}stat(){var t=this;return w((function*(){return i.stat(t)}))()}content(){var t=this;return w((function*(){return i.content(t)}))()}oid(){var t=this;return w((function*(){return i.oid(t)}))()}}}readdir(t){var e=this;return w((function*(){const r=t._fullpath,{fs:n,dir:i}=e,o=yield n.readdir(Object(y.a)(i,r));return null===o?null:o.map(t=>Object(y.a)(r,t))}))()}type(t){return w((function*(){return!1===t._type&&(yield t.stat()),t._type}))()}mode(t){return w((function*(){return!1===t._mode&&(yield t.stat()),t._mode}))()}stat(t){var e=this;return w((function*(){if(!1===t._stat){const{fs:r,dir:n}=e;let i=yield r.lstat(`${n}/${t._fullpath}`);if(!i)throw new Error(`ENOENT: no such file or directory, lstat '${t._fullpath}'`);let o=i.isDirectory()?"tree":"blob";"blob"!==o||i.isFile()||i.isSymbolicLink()||(o="special"),t._type=o,i=Object(s.a)(i),t._mode=i.mode,-1===i.size&&t._actualSize&&(i.size=t._actualSize),t._stat=i}return t._stat}))()}content(t){var e=this;return w((function*(){if(!1===t._content){const{fs:r,dir:n}=e;if("tree"===(yield t.type()))t._content=void 0;else{const e=yield r.read(`${n}/${t._fullpath}`);t._actualSize=e.length,t._stat&&-1===t._stat.size&&(t._stat.size=t._actualSize),t._content=new Uint8Array(e)}}return t._content}))()}oid(t){var e=this;return w((function*(){if(!1===t._oid){const{fs:r,gitdir:i,cache:o}=e;let a;yield n.a.acquire({fs:r,gitdir:i,cache:o},function(){var e=w((function*(e){const r=e.entriesMap.get(t._fullpath),n=yield t.stat();if(!r||Object(p.a)(n,r)){void 0===(yield t.content())?a=void 0:(a=yield Object(g.a)(v.a.wrap({type:"blob",object:yield t.content()})),r&&a===r.oid&&e.insert({filepath:t._fullpath,stats:n,oid:a}))}else a=r.oid}));return function(t){return e.apply(this,arguments)}}()),t._oid=a}return t._oid}))()}}function _(){const t=Object.create(null);return Object.defineProperty(t,l.a,{value:function({fs:t,dir:e,gitdir:r,cache:n}){return new b({fs:t,dir:e,gitdir:r,cache:n})}}),Object.freeze(t),t}var O=r(9),x=r(65),j=r(2),P=r(17),k=r(0);function E(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function A(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){E(o,n,i,a,s,"next",t)}function s(t){E(o,n,i,a,s,"throw",t)}a(void 0)}))}}function S(t){return $.apply(this,arguments)}function $(){return($=A((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),filepath:i,cache:o={}}){try{Object(k.a)("fs",t),Object(k.a)("dir",e),Object(k.a)("gitdir",r),Object(k.a)("filepath",i);const a=new j.a(t);yield n.a.acquire({fs:a,gitdir:r,cache:o},function(){var t=A((function*(t){yield R({dir:e,gitdir:r,fs:a,filepath:i,index:t})}));return function(e){return t.apply(this,arguments)}}())}catch(t){throw t.caller="git.add",t}}))).apply(this,arguments)}function R(t){return B.apply(this,arguments)}function B(){return(B=A((function*({dir:t,gitdir:e,fs:r,filepath:n,index:i}){if(yield x.a.isIgnored({fs:r,dir:t,gitdir:e,filepath:n}))return;const o=yield r.lstat(Object(y.a)(t,n));if(!o)throw new O.a(n);if(o.isDirectory()){const o=(yield r.readdir(Object(y.a)(t,n))).map(o=>R({dir:t,gitdir:e,fs:r,filepath:Object(y.a)(n,o),index:i}));yield Promise.all(o)}else{const a=o.isSymbolicLink()?yield r.readlink(Object(y.a)(t,n)):yield r.read(Object(y.a)(t,n));if(null===a)throw new O.a(n);const s=yield Object(P.a)({fs:r,gitdir:e,type:"blob",object:a});i.insert({filepath:n,stats:o,oid:s})}}))).apply(this,arguments)}var T=r(149),I=r(22),U=r(13);function C(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function z(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){C(o,n,i,a,s,"next",t)}function s(t){C(o,n,i,a,s,"throw",t)}a(void 0)}))}}function D(t){return N.apply(this,arguments)}function N(){return(N=z((function*({fs:t,gitdir:e,path:r}){return(yield U.a.get({fs:t,gitdir:e})).get(r)}))).apply(this,arguments)}function M(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function F(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){M(o,n,i,a,s,"next",t)}function s(t){M(o,n,i,a,s,"throw",t)}a(void 0)}))}}function H(t){return L.apply(this,arguments)}function L(){return(L=F((function*({fs:t,gitdir:e,author:r={}}){let{name:n,email:i,timestamp:o,timezoneOffset:a}=r;if(n=n||(yield D({fs:t,gitdir:e,path:"user.name"})),i=i||(yield D({fs:t,gitdir:e,path:"user.email"}))||"",void 0!==n)return o=null!=o?o:Math.floor(Date.now()/1e3),a=null!=a?a:new Date(1e3*o).getTimezoneOffset(),{name:n,email:i,timestamp:o,timezoneOffset:a}}))).apply(this,arguments)}function Y(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function G(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Y(o,n,i,a,s,"next",t)}function s(t){Y(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Z(t){return W.apply(this,arguments)}function W(){return(W=G((function*({fs:t,gitdir:e,author:r,committer:n}){return n=Object.assign({},n||r),r&&(n.timestamp=n.timestamp||r.timestamp,n.timezoneOffset=n.timezoneOffset||r.timezoneOffset),n=yield H({fs:t,gitdir:e,author:n})}))).apply(this,arguments)}function q(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function K(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){q(o,n,i,a,s,"next",t)}function s(t){q(o,n,i,a,s,"throw",t)}a(void 0)}))}}function V(t){return X.apply(this,arguments)}function X(){return(X=K((function*({fs:t,onSign:e,dir:r,gitdir:n=Object(y.a)(r,".git"),ref:i="refs/notes/commits",oid:o,note:a,force:s,author:c,committer:u,signingKey:f,cache:l={}}){try{Object(k.a)("fs",t),Object(k.a)("gitdir",n),Object(k.a)("oid",o),Object(k.a)("note",a),f&&Object(k.a)("onSign",e);const r=new j.a(t),d=yield H({fs:r,gitdir:n,author:c});if(!d)throw new I.a("author");const h=yield Z({fs:r,gitdir:n,author:d,committer:u});if(!h)throw new I.a("committer");return yield Object(T.a)({fs:new j.a(r),cache:l,onSign:e,gitdir:n,ref:i,oid:o,note:a,force:s,author:d,committer:h,signingKey:f})}catch(t){throw t.caller="git.addNote",t}}))).apply(this,arguments)}var J=r(37),Q=r.n(J),tt=r(25),et=r(35);function rt(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function nt(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){rt(o,n,i,a,s,"next",t)}function s(t){rt(o,n,i,a,s,"throw",t)}a(void 0)}))}}function it(t){return ot.apply(this,arguments)}function ot(){return(ot=nt((function*({fs:t,gitdir:e,remote:r,url:n,force:i}){if(r!==Q.a.clean(r))throw new et.a(r,Q.a.clean(r));const o=yield U.a.get({fs:t,gitdir:e});if(!i){if((yield o.getSubsections("remote")).includes(r)&&n!==(yield o.get(`remote.${r}.url`)))throw new tt.a("remote",r)}yield o.set(`remote.${r}.url`,n),yield o.set(`remote.${r}.fetch`,`+refs/heads/*:refs/remotes/${r}/*`),yield U.a.save({fs:t,gitdir:e,config:o})}))).apply(this,arguments)}function at(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function st(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){at(o,n,i,a,s,"next",t)}function s(t){at(o,n,i,a,s,"throw",t)}a(void 0)}))}}function ct(t){return ut.apply(this,arguments)}function ut(){return(ut=st((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),remote:n,url:i,force:o=!1}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("remote",n),Object(k.a)("url",i),yield it({fs:new j.a(t),gitdir:r,remote:n,url:i,force:o})}catch(t){throw t.caller="git.addRemote",t}}))).apply(this,arguments)}var ft=r(3),lt=r(15),dt=r(7);function ht(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function pt(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){ht(o,n,i,a,s,"next",t)}function s(t){ht(o,n,i,a,s,"throw",t)}a(void 0)}))}}function yt(t){return gt.apply(this,arguments)}function gt(){return(gt=pt((function*({fs:t,cache:e,onSign:r,gitdir:n,ref:i,tagger:o,message:a=i,gpgsig:s,object:c,signingKey:u,force:f=!1}){if(i=i.startsWith("refs/tags/")?i:`refs/tags/${i}`,!f&&(yield ft.a.exists({fs:t,gitdir:n,ref:i})))throw new tt.a("tag",i);const l=yield ft.a.resolve({fs:t,gitdir:n,ref:c||"HEAD"}),{type:d}=yield Object(dt.a)({fs:t,cache:e,gitdir:n,oid:l});let h=lt.a.from({object:l,type:d,tag:i.replace("refs/tags/",""),tagger:o,message:a,gpgsig:s});u&&(h=yield lt.a.sign(h,r,u));const p=yield Object(P.a)({fs:t,gitdir:n,type:"tag",object:h.toObject()});yield ft.a.writeRef({fs:t,gitdir:n,ref:i,value:p})}))).apply(this,arguments)}function vt(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function mt(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){vt(o,n,i,a,s,"next",t)}function s(t){vt(o,n,i,a,s,"throw",t)}a(void 0)}))}}function wt(t){return bt.apply(this,arguments)}function bt(){return(bt=mt((function*({fs:t,onSign:e,dir:r,gitdir:n=Object(y.a)(r,".git"),ref:i,tagger:o,message:a=i,gpgsig:s,object:c,signingKey:u,force:f=!1,cache:l={}}){try{Object(k.a)("fs",t),Object(k.a)("gitdir",n),Object(k.a)("ref",i),u&&Object(k.a)("onSign",e);const r=new j.a(t),d=yield H({fs:r,gitdir:n,author:o});if(!d)throw new I.a("tagger");return yield yt({fs:r,cache:l,onSign:e,gitdir:n,ref:i,tagger:d,message:a,gpgsig:s,object:c,signingKey:u,force:f})}catch(t){throw t.caller="git.annotatedTag",t}}))).apply(this,arguments)}function _t(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ot(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){_t(o,n,i,a,s,"next",t)}function s(t){_t(o,n,i,a,s,"throw",t)}a(void 0)}))}}function xt(t){return jt.apply(this,arguments)}function jt(){return(jt=Ot((function*({fs:t,gitdir:e,ref:r,checkout:n=!1}){if(r!==Q.a.clean(r))throw new et.a(r,Q.a.clean(r));const i=`refs/heads/${r}`;if(yield ft.a.exists({fs:t,gitdir:e,ref:i}))throw new tt.a("branch",r,!1);let o;try{o=yield ft.a.resolve({fs:t,gitdir:e,ref:"HEAD"})}catch(t){}o&&(yield ft.a.writeRef({fs:t,gitdir:e,ref:i,value:o})),n&&(yield ft.a.writeSymbolicRef({fs:t,gitdir:e,ref:"HEAD",value:i}))}))).apply(this,arguments)}function Pt(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function kt(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Pt(o,n,i,a,s,"next",t)}function s(t){Pt(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Et(t){return At.apply(this,arguments)}function At(){return(At=kt((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),ref:n,checkout:i=!1}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("ref",n),yield xt({fs:new j.a(t),gitdir:r,ref:n,checkout:i})}catch(t){throw t.caller="git.branch",t}}))).apply(this,arguments)}var St=r(54),$t=r(86),Rt=r(87),Bt=r(97);const Tt=(t,e)=>"."===t||null==e||0===e.length||"."===e||(e.length>=t.length?e.startsWith(t):t.startsWith(e));function It(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ut(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){It(o,n,i,a,s,"next",t)}function s(t){It(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Ct(t){return zt.apply(this,arguments)}function zt(){return(zt=Ut((function*({fs:t,cache:e,onProgress:r,dir:i,gitdir:o,remote:s,ref:c,filepaths:u,noCheckout:f,noUpdateHead:l,dryRun:d,force:h}){let p;try{p=yield ft.a.resolve({fs:t,gitdir:o,ref:c})}catch(e){if("HEAD"===c)throw e;const r=`${s}/${c}`;p=yield ft.a.resolve({fs:t,gitdir:o,ref:r});const n=yield U.a.get({fs:t,gitdir:o});yield n.set(`branch.${c}.remote`,s),yield n.set(`branch.${c}.merge`,`refs/heads/${c}`),yield U.a.save({fs:t,gitdir:o,config:n}),yield ft.a.writeRef({fs:t,gitdir:o,ref:`refs/heads/${c}`,value:p})}if(!f){let s;try{s=yield Dt({fs:t,cache:e,onProgress:r,dir:i,gitdir:o,ref:c,force:h,filepaths:u})}catch(t){throw t instanceof O.a&&t.data.what===p?new Rt.a(c,p):t}const f=s.filter(([t])=>"conflict"===t).map(([t,e])=>e);if(f.length>0)throw new $t.a(f);const l=s.filter(([t])=>"error"===t).map(([t,e])=>e);if(l.length>0)throw new a.a(l.join(", "));if(d)return;let y=0;const g=s.length;yield n.a.acquire({fs:t,gitdir:o,cache:e},function(){var e=Ut((function*(e){yield Promise.all(s.filter(([t])=>"delete"===t||"delete-index"===t).map(function(){var n=Ut((function*([n,o]){const a=`${i}/${o}`;"delete"===n&&(yield t.rm(a)),e.delete({filepath:o}),r&&(yield r({phase:"Updating workdir",loaded:++y,total:g}))}));return function(t){return n.apply(this,arguments)}}()))}));return function(t){return e.apply(this,arguments)}}()),yield n.a.acquire({fs:t,gitdir:o,cache:e},function(){var e=Ut((function*(e){for(const[n,o]of s)if("rmdir"===n||"rmdir-index"===n){const a=`${i}/${o}`;try{"rmdir-index"===n&&e.delete({filepath:o}),yield t.rmdir(a),r&&(yield r({phase:"Updating workdir",loaded:++y,total:g}))}catch(t){if("ENOTEMPTY"!==t.code)throw t;console.log(`Did not delete ${o} because directory is not empty`)}}}));return function(t){return e.apply(this,arguments)}}()),yield Promise.all(s.filter(([t])=>"mkdir"===t||"mkdir-index"===t).map(function(){var e=Ut((function*([e,n]){const o=`${i}/${n}`;yield t.mkdir(o),r&&(yield r({phase:"Updating workdir",loaded:++y,total:g}))}));return function(t){return e.apply(this,arguments)}}())),yield n.a.acquire({fs:t,gitdir:o,cache:e},function(){var n=Ut((function*(n){yield Promise.all(s.filter(([t])=>"create"===t||"create-index"===t||"update"===t||"mkdir-index"===t).map(function(){var s=Ut((function*([s,c,u,f,l]){const d=`${i}/${c}`;try{if("create-index"!==s&&"mkdir-index"!==s){const{object:r}=yield Object(dt.a)({fs:t,cache:e,gitdir:o,oid:u});if(l&&(yield t.rm(d)),33188===f)yield t.write(d,r);else if(33261===f)yield t.write(d,r,{mode:511});else{if(40960!==f)throw new a.a(`Invalid mode 0o${f.toString(8)} detected in blob ${u}`);yield t.writelink(d,r)}}const i=yield t.lstat(d);33261===f&&(i.mode=493),"mkdir-index"===s&&(i.mode=57344),n.insert({filepath:c,stats:i,oid:u}),r&&(yield r({phase:"Updating workdir",loaded:++y,total:g}))}catch(t){console.log(t)}}));return function(t){return s.apply(this,arguments)}}()))}));return function(t){return n.apply(this,arguments)}}())}if(!l){const e=yield ft.a.expand({fs:t,gitdir:o,ref:c});e.startsWith("refs/heads")?yield ft.a.writeSymbolicRef({fs:t,gitdir:o,ref:"HEAD",value:e}):yield ft.a.writeRef({fs:t,gitdir:o,ref:"HEAD",value:p})}}))).apply(this,arguments)}function Dt(t){return Nt.apply(this,arguments)}function Nt(){return(Nt=Ut((function*({fs:t,cache:e,onProgress:r,dir:n,gitdir:i,ref:o,force:a,filepaths:s}){let c=0;return Object(St.a)({fs:t,cache:e,dir:n,gitdir:i,trees:[Object(h.a)({ref:o}),_(),d()],map:(f=Ut((function*(t,[e,n,i]){if("."!==t){if(s&&!s.some(e=>Tt(t,e)))return null;switch(r&&(yield r({phase:"Analyzing workdir",loaded:++c})),[!!i,!!e,!!n].map(Number).join("")){case"000":return;case"001":return a&&s&&s.includes(t)?["delete",t]:void 0;case"010":switch(yield e.type()){case"tree":return["mkdir",t];case"blob":return["create",t,yield e.oid(),yield e.mode()];case"commit":return["mkdir-index",t,yield e.oid(),yield e.mode()];default:return["error",`new entry Unhandled type ${yield e.type()}`]}case"011":switch(`${yield e.type()}-${yield n.type()}`){case"tree-tree":return;case"tree-blob":case"blob-tree":return["conflict",t];case"blob-blob":return(yield e.oid())!==(yield n.oid())?a?["update",t,yield e.oid(),yield e.mode(),(yield e.mode())!==(yield n.mode())]:["conflict",t]:(yield e.mode())!==(yield n.mode())?a?["update",t,yield e.oid(),yield e.mode(),!0]:["conflict",t]:["create-index",t,yield e.oid(),yield e.mode()];case"commit-tree":return;case"commit-blob":return["conflict",t];default:return["error",`new entry Unhandled type ${e.type}`]}case"100":return["delete-index",t];case"101":switch(yield i.type()){case"tree":return["rmdir",t];case"blob":return(yield i.oid())!==(yield n.oid())?a?["delete",t]:["conflict",t]:["delete",t];case"commit":return["rmdir-index",t];default:return["error",`delete entry Unhandled type ${yield i.type()}`]}case"110":case"111":switch(`${yield i.type()}-${yield e.type()}`){case"tree-tree":return;case"blob-blob":if((yield i.oid())===(yield e.oid())&&(yield i.mode())===(yield e.mode())&&!a)return;if(n){if((yield n.oid())!==(yield i.oid())&&(yield n.oid())!==(yield e.oid()))return a?["update",t,yield e.oid(),yield e.mode(),(yield e.mode())!==(yield n.mode())]:["conflict",t]}else if(a)return["update",t,yield e.oid(),yield e.mode(),(yield e.mode())!==(yield i.mode())];return(yield e.mode())!==(yield i.mode())?["update",t,yield e.oid(),yield e.mode(),!0]:(yield e.oid())!==(yield i.oid())?["update",t,yield e.oid(),yield e.mode(),!1]:void 0;case"tree-blob":return["update-dir-to-blob",t,yield e.oid()];case"blob-tree":return["update-blob-to-tree",t];case"commit-commit":return["mkdir-index",t,yield e.oid(),yield e.mode()];default:return["error",`update entry Unhandled type ${yield i.type()}-${yield e.type()}`]}}}})),function(t,e){return f.apply(this,arguments)}),reduce:(u=Ut((function*(t,e){return e=Object(Bt.a)(e),t?t&&"rmdir"===t[0]?(e.push(t),e):(e.unshift(t),e):e})),function(t,e){return u.apply(this,arguments)})});var u,f}))).apply(this,arguments)}function Mt(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ft(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Mt(o,n,i,a,s,"next",t)}function s(t){Mt(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Ht(t){return Lt.apply(this,arguments)}function Lt(){return(Lt=Ft((function*({fs:t,onProgress:e,dir:r,gitdir:n=Object(y.a)(r,".git"),remote:i="origin",ref:o,filepaths:a,noCheckout:s=!1,noUpdateHead:c=void 0===o,dryRun:u=!1,force:f=!1,cache:l={}}){try{Object(k.a)("fs",t),Object(k.a)("dir",r),Object(k.a)("gitdir",n);const d=o||"HEAD";return yield Ct({fs:new j.a(t),cache:l,onProgress:e,dir:r,gitdir:n,remote:i,ref:d,filepaths:a,noCheckout:s,noUpdateHead:c,dryRun:u,force:f})}catch(t){throw t.caller="git.checkout",t}}))).apply(this,arguments)}var Yt=r(103);function Gt(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Zt(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Gt(o,n,i,a,s,"next",t)}function s(t){Gt(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Wt(t){return qt.apply(this,arguments)}function qt(){return(qt=Zt((function*({fs:t,bare:e=!1,dir:r,gitdir:n=(e?r:Object(y.a)(r,".git")),defaultBranch:i="master"}){if(yield t.exists(n+"/config"))return;let o=["hooks","info","objects/info","objects/pack","refs/heads","refs/tags"];o=o.map(t=>n+"/"+t);for(const e of o)yield t.mkdir(e);yield t.write(n+"/config","[core]\n\trepositoryformatversion = 0\n\tfilemode = false\n"+`\tbare = ${e}\n`+(e?"":"\tlogallrefupdates = true\n")+"\tsymlinks = false\n\tignorecase = true\n"),yield t.write(n+"/HEAD",`ref: refs/heads/${i}\n`)}))).apply(this,arguments)}function Kt(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Vt(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Kt(o,n,i,a,s,"next",t)}function s(t){Kt(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Xt(t){return Jt.apply(this,arguments)}function Jt(){return(Jt=Vt((function*({fs:t,dirname:e}){const r=[],n=[],i=[e];for(;i.length>0;){const e=i.pop();(yield t._stat(e)).isDirectory()?(n.push(e),i.push(...(yield t.readdir(e)).map(t=>Object(y.a)(e,t)))):r.push(e)}for(const e of r)yield t.rm(e);for(const e of n.reverse())yield t.rmdir(e)}))).apply(this,arguments)}function Qt(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function te(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Qt(o,n,i,a,s,"next",t)}function s(t){Qt(o,n,i,a,s,"throw",t)}a(void 0)}))}}function ee(t){return re.apply(this,arguments)}function re(){return(re=te((function*({fs:t,cache:e,http:r,onProgress:n,onMessage:i,onAuth:o,onAuthSuccess:a,onAuthFailure:s,dir:c,gitdir:u,url:f,corsProxy:l,ref:d,remote:h,depth:p,since:y,exclude:g,relative:v,singleBranch:m,noCheckout:w,noTags:b,headers:_}){try{if(yield Wt({fs:t,gitdir:u}),yield it({fs:t,gitdir:u,remote:h,url:f,force:!1}),l){const e=yield U.a.get({fs:t,gitdir:u});yield e.set("http.corsProxy",l),yield U.a.save({fs:t,gitdir:u,config:e})}const{defaultBranch:O,fetchHead:x}=yield Object(Yt.a)({fs:t,cache:e,http:r,onProgress:n,onMessage:i,onAuth:o,onAuthSuccess:a,onAuthFailure:s,gitdir:u,ref:d,remote:h,corsProxy:l,depth:p,since:y,exclude:g,relative:v,singleBranch:m,headers:_,tags:!b});if(null===x)return;d=(d=d||O).replace("refs/heads/",""),yield Ct({fs:t,cache:e,onProgress:n,dir:c,gitdir:u,ref:d,remote:h,noCheckout:w})}catch(e){try{yield Xt({fs:t,dirname:u})}catch(t){}throw e}}))).apply(this,arguments)}function ne(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function ie(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){ne(o,n,i,a,s,"next",t)}function s(t){ne(o,n,i,a,s,"throw",t)}a(void 0)}))}}function oe(t){return ae.apply(this,arguments)}function ae(){return(ae=ie((function*({fs:t,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:o,onAuthFailure:a,dir:s,gitdir:c=Object(y.a)(s,".git"),url:u,corsProxy:f,ref:l,remote:d="origin",depth:h,since:p,exclude:g=[],relative:v=!1,singleBranch:m=!1,noCheckout:w=!1,noTags:b=!1,headers:_={},cache:O={}}){try{return Object(k.a)("fs",t),Object(k.a)("http",e),Object(k.a)("gitdir",c),w||Object(k.a)("dir",s),Object(k.a)("url",u),yield ee({fs:new j.a(t),cache:O,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:o,onAuthFailure:a,dir:s,gitdir:c,url:u,corsProxy:f,ref:l,remote:d,depth:h,since:p,exclude:g,relative:v,singleBranch:m,noCheckout:w,noTags:b,headers:_})}catch(t){throw t.caller="git.clone",t}}))).apply(this,arguments)}var se=r(83);function ce(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function ue(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){ce(o,n,i,a,s,"next",t)}function s(t){ce(o,n,i,a,s,"throw",t)}a(void 0)}))}}function fe(t){return le.apply(this,arguments)}function le(){return(le=ue((function*({fs:t,onSign:e,dir:r,gitdir:n=Object(y.a)(r,".git"),message:i,author:o,committer:a,signingKey:s,dryRun:c=!1,noUpdateBranch:u=!1,ref:f,parent:l,tree:d,cache:h={}}){try{Object(k.a)("fs",t),Object(k.a)("message",i),s&&Object(k.a)("onSign",e);const r=new j.a(t),p=yield H({fs:r,gitdir:n,author:o});if(!p)throw new I.a("author");const y=yield Z({fs:r,gitdir:n,author:p,committer:a});if(!y)throw new I.a("committer");return yield Object(se.a)({fs:r,cache:h,onSign:e,gitdir:n,message:i,author:p,committer:y,signingKey:s,dryRun:c,noUpdateBranch:u,ref:f,parent:l,tree:d})}catch(t){throw t.caller="git.commit",t}}))).apply(this,arguments)}var de=r(47);function he(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function pe(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){he(o,n,i,a,s,"next",t)}function s(t){he(o,n,i,a,s,"throw",t)}a(void 0)}))}}function ye(t){return ge.apply(this,arguments)}function ge(){return(ge=pe((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),fullname:n=!1,test:i=!1}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),yield Object(de.a)({fs:new j.a(t),gitdir:r,fullname:n,test:i})}catch(t){throw t.caller="git.currentBranch",t}}))).apply(this,arguments)}function ve(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function me(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){ve(o,n,i,a,s,"next",t)}function s(t){ve(o,n,i,a,s,"throw",t)}a(void 0)}))}}function we(t){return be.apply(this,arguments)}function be(){return(be=me((function*({fs:t,gitdir:e,ref:r}){if(!(yield ft.a.exists({fs:t,gitdir:e,ref:r})))throw new O.a(r);const n=yield ft.a.expand({fs:t,gitdir:e,ref:r});if(n===(yield Object(de.a)({fs:t,gitdir:e,fullname:!0}))){const r=yield ft.a.resolve({fs:t,gitdir:e,ref:n});yield ft.a.writeRef({fs:t,gitdir:e,ref:"HEAD",value:r})}yield ft.a.deleteRef({fs:t,gitdir:e,ref:n})}))).apply(this,arguments)}function _e(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Oe(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){_e(o,n,i,a,s,"next",t)}function s(t){_e(o,n,i,a,s,"throw",t)}a(void 0)}))}}function xe(t){return je.apply(this,arguments)}function je(){return(je=Oe((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),ref:n}){try{return Object(k.a)("fs",t),Object(k.a)("ref",n),yield we({fs:new j.a(t),gitdir:r,ref:n})}catch(t){throw t.caller="git.deleteBranch",t}}))).apply(this,arguments)}function Pe(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function ke(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Pe(o,n,i,a,s,"next",t)}function s(t){Pe(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Ee(t){return Ae.apply(this,arguments)}function Ae(){return(Ae=ke((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),ref:n}){try{Object(k.a)("fs",t),Object(k.a)("ref",n),yield ft.a.deleteRef({fs:new j.a(t),gitdir:r,ref:n})}catch(t){throw t.caller="git.deleteRef",t}}))).apply(this,arguments)}function Se(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function $e(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Se(o,n,i,a,s,"next",t)}function s(t){Se(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Re(t){return Be.apply(this,arguments)}function Be(){return(Be=$e((function*({fs:t,gitdir:e,remote:r}){const n=yield U.a.get({fs:t,gitdir:e});yield n.deleteSection("remote",r),yield U.a.save({fs:t,gitdir:e,config:n})}))).apply(this,arguments)}function Te(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ie(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Te(o,n,i,a,s,"next",t)}function s(t){Te(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Ue(t){return Ce.apply(this,arguments)}function Ce(){return(Ce=Ie((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),remote:n}){try{return Object(k.a)("fs",t),Object(k.a)("remote",n),yield Re({fs:new j.a(t),gitdir:r,remote:n})}catch(t){throw t.caller="git.deleteRemote",t}}))).apply(this,arguments)}function ze(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function De(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){ze(o,n,i,a,s,"next",t)}function s(t){ze(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Ne(t){return Me.apply(this,arguments)}function Me(){return(Me=De((function*({fs:t,gitdir:e,ref:r}){r=r.startsWith("refs/tags/")?r:`refs/tags/${r}`,yield ft.a.deleteRef({fs:t,gitdir:e,ref:r})}))).apply(this,arguments)}function Fe(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function He(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Fe(o,n,i,a,s,"next",t)}function s(t){Fe(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Le(t){return Ye.apply(this,arguments)}function Ye(){return(Ye=He((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),ref:n}){try{return Object(k.a)("fs",t),Object(k.a)("ref",n),yield Ne({fs:new j.a(t),gitdir:r,ref:n})}catch(t){throw t.caller="git.deleteTag",t}}))).apply(this,arguments)}var Ge=r(85);function Ze(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function We(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Ze(o,n,i,a,s,"next",t)}function s(t){Ze(o,n,i,a,s,"throw",t)}a(void 0)}))}}function qe(t){return Ke.apply(this,arguments)}function Ke(){return(Ke=We((function*({fs:t,gitdir:e,oid:r}){const n=r.slice(0,2);return(yield t.readdir(`${e}/objects/${n}`)).map(t=>`${n}${t}`).filter(t=>t.startsWith(r))}))).apply(this,arguments)}var Ve=r(71);function Xe(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Je(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Xe(o,n,i,a,s,"next",t)}function s(t){Xe(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Qe(t){return tr.apply(this,arguments)}function tr(){return(tr=Je((function*({fs:t,cache:e,gitdir:r,oid:n,getExternalRefDelta:i}){const o=[];let s=yield t.readdir(Object(y.a)(r,"objects/pack"));s=s.filter(t=>t.endsWith(".idx"));for(const c of s){const s=`${r}/objects/pack/${c}`,u=yield Object(Ve.a)({fs:t,cache:e,filename:s,getExternalRefDelta:i});if(u.error)throw new a.a(u.error);for(const t of u.offsets.keys())t.startsWith(n)&&o.push(t)}return o}))).apply(this,arguments)}function er(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function rr(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){er(o,n,i,a,s,"next",t)}function s(t){er(o,n,i,a,s,"throw",t)}a(void 0)}))}}function nr(t){return ir.apply(this,arguments)}function ir(){return(ir=rr((function*({fs:t,cache:e,gitdir:r,oid:n}){const i=yield qe({fs:t,gitdir:r,oid:n}),o=yield Qe({fs:t,cache:e,gitdir:r,oid:n,getExternalRefDelta:n=>Object(dt.a)({fs:t,cache:e,gitdir:r,oid:n})}),a=i.concat(o);if(1===a.length)return a[0];if(a.length>1)throw new Ge.a("oids",n,a);throw new O.a(`an object matching "${n}"`)}))).apply(this,arguments)}function or(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function ar(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){or(o,n,i,a,s,"next",t)}function s(t){or(o,n,i,a,s,"throw",t)}a(void 0)}))}}function sr(t){return cr.apply(this,arguments)}function cr(){return(cr=ar((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),oid:n,cache:i={}}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("oid",n),yield nr({fs:new j.a(t),cache:i,gitdir:r,oid:n})}catch(t){throw t.caller="git.expandOid",t}}))).apply(this,arguments)}function ur(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function fr(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){ur(o,n,i,a,s,"next",t)}function s(t){ur(o,n,i,a,s,"throw",t)}a(void 0)}))}}function lr(t){return dr.apply(this,arguments)}function dr(){return(dr=fr((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),ref:n}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("ref",n),yield ft.a.expand({fs:new j.a(t),gitdir:r,ref:n})}catch(t){throw t.caller="git.expandRef",t}}))).apply(this,arguments)}var hr=r(12);function pr(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function yr(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){pr(o,n,i,a,s,"next",t)}function s(t){pr(o,n,i,a,s,"throw",t)}a(void 0)}))}}function gr(t){return vr.apply(this,arguments)}function vr(){return(vr=yr((function*({fs:t,cache:e,gitdir:r,oids:n}){const i={},o=n.length;let a=n.map((t,e)=>({index:e,oid:t}));for(;a.length;){const n=new Set;for(const t of a){const{oid:e,index:r}=t;i[e]||(i[e]=new Set),i[e].add(r),i[e].size===o&&n.add(e)}if(n.size>0)return[...n];const s=new Map;for(const n of a){const{oid:o,index:a}=n;try{const{object:n}=yield Object(dt.a)({fs:t,cache:e,gitdir:r,oid:o}),c=hr.a.from(n),{parent:u}=c.parseHeaders();for(const t of u)i[t]&&i[t].has(a)||s.set(t+":"+a,{oid:t,index:a})}catch(t){}}a=Array.from(s.values())}return[]}))).apply(this,arguments)}var mr=r(88),wr=r(39),br=r(99),_r=r(112);function Or(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function xr(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Or(o,n,i,a,s,"next",t)}function s(t){Or(o,n,i,a,s,"throw",t)}a(void 0)}))}}function jr(t){return Pr.apply(this,arguments)}function Pr(){return(Pr=xr((function*({fs:t,cache:e,gitdir:r,ours:n,theirs:i,fastForwardOnly:o=!1,dryRun:a=!1,noUpdateBranch:s=!1,message:c,author:u,committer:f,signingKey:l}){void 0===n&&(n=yield Object(de.a)({fs:t,gitdir:r,fullname:!0})),n=yield ft.a.expand({fs:t,gitdir:r,ref:n}),i=yield ft.a.expand({fs:t,gitdir:r,ref:i});const d=yield ft.a.resolve({fs:t,gitdir:r,ref:n}),h=yield ft.a.resolve({fs:t,gitdir:r,ref:i}),p=yield gr({fs:t,cache:e,gitdir:r,oids:[d,h]});if(1!==p.length)throw new wr.a;const y=p[0];if(y===h)return{oid:d,alreadyMerged:!0};if(y===d)return a||s||(yield ft.a.writeRef({fs:t,gitdir:r,ref:n,value:h})),{oid:h,fastForward:!0};{if(o)throw new mr.a;const p=yield Object(_r.a)({fs:t,cache:e,gitdir:r,ourOid:d,theirOid:h,baseOid:y,ourName:n,baseName:"base",theirName:i,dryRun:a});return c||(c=`Merge branch '${Object(br.a)(i)}' into ${Object(br.a)(n)}`),{oid:yield Object(se.a)({fs:t,cache:e,gitdir:r,message:c,ref:n,tree:p,parent:[d,h],author:u,committer:f,signingKey:l,dryRun:a,noUpdateBranch:s}),tree:p,mergeCommit:!0}}}))).apply(this,arguments)}var kr=r(24);function Er(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ar(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Er(o,n,i,a,s,"next",t)}function s(t){Er(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Sr(t){return $r.apply(this,arguments)}function $r(){return($r=Ar((function*({fs:t,cache:e,http:r,onProgress:n,onMessage:i,onAuth:o,onAuthSuccess:a,onAuthFailure:s,dir:c,gitdir:u,ref:f,url:l,remote:d,remoteRef:h,fastForwardOnly:p,corsProxy:y,singleBranch:g,headers:v,author:m,committer:w,signingKey:b}){try{if(!f){const e=yield Object(de.a)({fs:t,gitdir:u});if(!e)throw new kr.a("ref");f=e}const{fetchHead:_,fetchHeadDescription:O}=yield Object(Yt.a)({fs:t,cache:e,http:r,onProgress:n,onMessage:i,onAuth:o,onAuthSuccess:a,onAuthFailure:s,gitdir:u,corsProxy:y,ref:f,url:l,remote:d,remoteRef:h,singleBranch:g,headers:v});yield jr({fs:t,cache:e,gitdir:u,ours:f,theirs:_,fastForwardOnly:p,message:`Merge ${O}`,author:m,committer:w,signingKey:b,dryRun:!1,noUpdateBranch:!1}),yield Ct({fs:t,cache:e,onProgress:n,dir:c,gitdir:u,ref:f,remote:d,noCheckout:!1})}catch(t){throw t.caller="git.pull",t}}))).apply(this,arguments)}function Rr(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Br(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Rr(o,n,i,a,s,"next",t)}function s(t){Rr(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Tr(t){return Ir.apply(this,arguments)}function Ir(){return(Ir=Br((function*({fs:t,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:o,onAuthFailure:a,dir:s,gitdir:c=Object(y.a)(s,".git"),ref:u,url:f,remote:l,remoteRef:d,corsProxy:h,singleBranch:p,headers:g={},cache:v={}}){try{Object(k.a)("fs",t),Object(k.a)("http",e),Object(k.a)("gitdir",c);const y={name:"",email:"",timestamp:Date.now(),timezoneOffset:0};return yield Sr({fs:new j.a(t),cache:v,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:o,onAuthFailure:a,dir:s,gitdir:c,ref:u,url:f,remote:l,remoteRef:d,fastForwardOnly:!0,corsProxy:h,singleBranch:p,headers:g,author:y,committer:y})}catch(t){throw t.caller="git.fastForward",t}}))).apply(this,arguments)}function Ur(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Cr(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Ur(o,n,i,a,s,"next",t)}function s(t){Ur(o,n,i,a,s,"throw",t)}a(void 0)}))}}function zr(t){return Dr.apply(this,arguments)}function Dr(){return(Dr=Cr((function*({fs:t,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:o,onAuthFailure:a,dir:s,gitdir:c=Object(y.a)(s,".git"),ref:u,remote:f,remoteRef:l,url:d,corsProxy:h,depth:p=null,since:g=null,exclude:v=[],relative:m=!1,tags:w=!1,singleBranch:b=!1,headers:_={},prune:O=!1,pruneTags:x=!1,cache:P={}}){try{return Object(k.a)("fs",t),Object(k.a)("http",e),Object(k.a)("gitdir",c),yield Object(Yt.a)({fs:new j.a(t),cache:P,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:o,onAuthFailure:a,gitdir:c,ref:u,remote:f,remoteRef:l,url:d,corsProxy:h,depth:p,since:g,exclude:v,relative:m,tags:w,singleBranch:b,headers:_,prune:O,pruneTags:x})}catch(t){throw t.caller="git.fetch",t}}))).apply(this,arguments)}function Nr(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Mr(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Nr(o,n,i,a,s,"next",t)}function s(t){Nr(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Fr(t){return Hr.apply(this,arguments)}function Hr(){return(Hr=Mr((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),oids:n,cache:i={}}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("oids",n),yield gr({fs:new j.a(t),cache:i,gitdir:r,oids:n})}catch(t){throw t.caller="git.findMergeBase",t}}))).apply(this,arguments)}var Lr=r(26);function Yr(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Gr(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Yr(o,n,i,a,s,"next",t)}function s(t){Yr(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Zr(t){return Wr.apply(this,arguments)}function Wr(){return(Wr=Gr((function*({fs:t,filepath:e}){if(yield t.exists(Object(y.a)(e,".git")))return e;{const r=Object(Lr.a)(e);if(r===e)throw new O.a(`git root for ${e}`);return Zr({fs:t,filepath:r})}}))).apply(this,arguments)}function qr(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Kr(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){qr(o,n,i,a,s,"next",t)}function s(t){qr(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Vr(t){return Xr.apply(this,arguments)}function Xr(){return(Xr=Kr((function*({fs:t,filepath:e}){try{return Object(k.a)("fs",t),Object(k.a)("filepath",e),yield Zr({fs:new j.a(t),filepath:e})}catch(t){throw t.caller="git.findRoot",t}}))).apply(this,arguments)}function Jr(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Qr(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Jr(o,n,i,a,s,"next",t)}function s(t){Jr(o,n,i,a,s,"throw",t)}a(void 0)}))}}function tn(t){return en.apply(this,arguments)}function en(){return(en=Qr((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),path:n}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("path",n),yield D({fs:new j.a(t),gitdir:r,path:n})}catch(t){throw t.caller="git.getConfig",t}}))).apply(this,arguments)}function rn(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function nn(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){rn(o,n,i,a,s,"next",t)}function s(t){rn(o,n,i,a,s,"throw",t)}a(void 0)}))}}function on(t){return an.apply(this,arguments)}function an(){return(an=nn((function*({fs:t,gitdir:e,path:r}){return(yield U.a.get({fs:t,gitdir:e})).getall(r)}))).apply(this,arguments)}function sn(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function cn(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){sn(o,n,i,a,s,"next",t)}function s(t){sn(o,n,i,a,s,"throw",t)}a(void 0)}))}}function un(t){return fn.apply(this,arguments)}function fn(){return(fn=cn((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),path:n}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("path",n),yield on({fs:new j.a(t),gitdir:r,path:n})}catch(t){throw t.caller="git.getConfigAll",t}}))).apply(this,arguments)}var ln=r(53);function dn(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function hn(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){dn(o,n,i,a,s,"next",t)}function s(t){dn(o,n,i,a,s,"throw",t)}a(void 0)}))}}function pn(t){return yn.apply(this,arguments)}function yn(){return(yn=hn((function*({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:o,headers:a={},forPush:s=!1}){try{Object(k.a)("http",t),Object(k.a)("url",o);const c=ln.a.getRemoteHelperFor({url:o}),u=yield c.discover({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:s?"git-receive-pack":"git-upload-pack",url:o,headers:a,protocolVersion:1}),f={capabilities:[...u.capabilities]};for(const[t,e]of u.refs){const r=t.split("/"),n=r.pop();let i=f;for(const t of r)i[t]=i[t]||{},i=i[t];i[n]=e}for(const[t,e]of u.symrefs){const r=t.split("/"),n=r.pop();let i=f;for(const t of r)i[t]=i[t]||{},i=i[t];i[n]=e}return f}catch(t){throw t.caller="git.getRemoteInfo",t}}))).apply(this,arguments)}function gn(t,e,r,n){const i=[];for(const[o,a]of t.refs){if(e&&!o.startsWith(e))continue;if(o.endsWith("^{}")){if(n){const t=o.replace("^{}",""),e=i[i.length-1],r=e.ref===t?e:i.find(e=>e.ref===t);if(void 0===r)throw new Error("I did not expect this to happen");r.peeled=a}continue}const s={ref:o,oid:a};r&&t.symrefs.has(o)&&(s.target=t.symrefs.get(o)),i.push(s)}return i}function vn(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function mn(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){vn(o,n,i,a,s,"next",t)}function s(t){vn(o,n,i,a,s,"throw",t)}a(void 0)}))}}function wn(t){return bn.apply(this,arguments)}function bn(){return(bn=mn((function*({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:o,headers:a={},forPush:s=!1,protocolVersion:c=2}){try{Object(k.a)("http",t),Object(k.a)("url",o);const u=ln.a.getRemoteHelperFor({url:o}),f=yield u.discover({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:s?"git-receive-pack":"git-upload-pack",url:o,headers:a,protocolVersion:c});if(2===f.protocolVersion)return{protocolVersion:f.protocolVersion,capabilities:f.capabilities2};const l={};for(const t of f.capabilities){const[e,r]=t.split("=");l[e]=r||!0}return{protocolVersion:1,capabilities:l,refs:gn(f,void 0,!0,!0)}}catch(t){throw t.caller="git.getRemoteInfo2",t}}))).apply(this,arguments)}var _n=r(146),On=r(52);function xn(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function jn(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){xn(o,n,i,a,s,"next",t)}function s(t){xn(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Pn(t){return kn.apply(this,arguments)}function kn(){return(kn=jn((function*({fs:t,cache:e,onProgress:r,dir:n,gitdir:i,filepath:o}){try{o=Object(y.a)(n,o);const a=yield t.read(o),s=r=>Object(dt.a)({fs:t,cache:e,gitdir:i,oid:r}),c=yield On.a.fromPack({pack:a,getExternalRefDelta:s,onProgress:r});return yield t.write(o.replace(/\.pack$/,".idx"),yield c.toBuffer()),{oids:[...c.hashes]}}catch(t){throw t.caller="git.indexPack",t}}))).apply(this,arguments)}function En(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function An(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){En(o,n,i,a,s,"next",t)}function s(t){En(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Sn(t){return $n.apply(this,arguments)}function $n(){return($n=An((function*({fs:t,onProgress:e,dir:r,gitdir:n=Object(y.a)(r,".git"),filepath:i,cache:o={}}){try{return Object(k.a)("fs",t),Object(k.a)("dir",r),Object(k.a)("gitdir",r),Object(k.a)("filepath",i),yield Pn({fs:new j.a(t),cache:o,onProgress:e,dir:r,gitdir:n,filepath:i})}catch(t){throw t.caller="git.indexPack",t}}))).apply(this,arguments)}function Rn(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Bn(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Rn(o,n,i,a,s,"next",t)}function s(t){Rn(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Tn(t){return In.apply(this,arguments)}function In(){return(In=Bn((function*({fs:t,bare:e=!1,dir:r,gitdir:n=(e?r:Object(y.a)(r,".git")),defaultBranch:i="master"}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",n),e||Object(k.a)("dir",r),yield Wt({fs:new j.a(t),bare:e,dir:r,gitdir:n,defaultBranch:i})}catch(t){throw t.caller="git.init",t}}))).apply(this,arguments)}var Un=r(90),Cn=r(14),zn=r(36);function Dn(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Nn(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Dn(o,n,i,a,s,"next",t)}function s(t){Dn(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Mn(t){return Fn.apply(this,arguments)}function Fn(){return(Fn=Nn((function*({fs:t,cache:e,gitdir:r,oid:n,ancestor:i,depth:o}){const a=yield zn.a.read({fs:t,gitdir:r});if(!n)throw new kr.a("oid");if(!i)throw new kr.a("ancestor");if(n===i)return!1;const s=[n],c=new Set;let u=0;for(;s.length;){if(u++===o)throw new Un.a(o);const n=s.shift(),{type:f,object:l}=yield Object(dt.a)({fs:t,cache:e,gitdir:r,oid:n});if("commit"!==f)throw new Cn.a(n,f,"commit");const d=hr.a.from(l).parse();for(const t of d.parent)if(t===i)return!0;if(!a.has(n))for(const t of d.parent)c.has(t)||(s.push(t),c.add(t))}return!1}))).apply(this,arguments)}function Hn(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ln(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Hn(o,n,i,a,s,"next",t)}function s(t){Hn(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Yn(t){return Gn.apply(this,arguments)}function Gn(){return(Gn=Ln((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),oid:n,ancestor:i,depth:o=-1,cache:a={}}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("oid",n),Object(k.a)("ancestor",i),yield Mn({fs:new j.a(t),cache:a,gitdir:r,oid:n,ancestor:i,depth:o})}catch(t){throw t.caller="git.isDescendent",t}}))).apply(this,arguments)}function Zn(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Wn(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Zn(o,n,i,a,s,"next",t)}function s(t){Zn(o,n,i,a,s,"throw",t)}a(void 0)}))}}function qn(t){return Kn.apply(this,arguments)}function Kn(){return(Kn=Wn((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),remote:n}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),ft.a.listBranches({fs:new j.a(t),gitdir:r,remote:n})}catch(t){throw t.caller="git.listBranches",t}}))).apply(this,arguments)}var Vn=r(46);function Xn(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Jn(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Xn(o,n,i,a,s,"next",t)}function s(t){Xn(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Qn(t){return ti.apply(this,arguments)}function ti(){return(ti=Jn((function*({fs:t,gitdir:e,ref:r,cache:i}){if(r){const n=yield ft.a.resolve({gitdir:e,fs:t,ref:r}),o=[];return yield ei({fs:t,cache:i,gitdir:e,oid:n,filenames:o,prefix:""}),o}return n.a.acquire({fs:t,gitdir:e,cache:i},function(){var t=Jn((function*(t){return t.entries.map(t=>t.path)}));return function(e){return t.apply(this,arguments)}}())}))).apply(this,arguments)}function ei(t){return ri.apply(this,arguments)}function ri(){return(ri=Jn((function*({fs:t,cache:e,gitdir:r,oid:n,filenames:i,prefix:o}){const{tree:a}=yield Object(Vn.a)({fs:t,cache:e,gitdir:r,oid:n});for(const n of a)"tree"===n.type?yield ei({fs:t,cache:e,gitdir:r,oid:n.oid,filenames:i,prefix:Object(y.a)(o,n.path)}):i.push(Object(y.a)(o,n.path))}))).apply(this,arguments)}function ni(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function ii(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){ni(o,n,i,a,s,"next",t)}function s(t){ni(o,n,i,a,s,"throw",t)}a(void 0)}))}}function oi(t){return ai.apply(this,arguments)}function ai(){return(ai=ii((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),ref:n,cache:i={}}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),yield Qn({fs:new j.a(t),cache:i,gitdir:r,ref:n})}catch(t){throw t.caller="git.listFiles",t}}))).apply(this,arguments)}function si(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function ci(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){si(o,n,i,a,s,"next",t)}function s(t){si(o,n,i,a,s,"throw",t)}a(void 0)}))}}function ui(t){return fi.apply(this,arguments)}function fi(){return(fi=ci((function*({fs:t,cache:e,gitdir:r,ref:n}){let i;try{i=yield ft.a.resolve({gitdir:r,fs:t,ref:n})}catch(t){if(t instanceof O.a)return[]}return(yield Object(Vn.a)({fs:t,cache:e,gitdir:r,oid:i})).tree.map(t=>({target:t.path,note:t.oid}))}))).apply(this,arguments)}function li(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function di(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){li(o,n,i,a,s,"next",t)}function s(t){li(o,n,i,a,s,"throw",t)}a(void 0)}))}}function hi(t){return pi.apply(this,arguments)}function pi(){return(pi=di((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),ref:n="refs/notes/commits",cache:i={}}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("ref",n),yield ui({fs:new j.a(t),cache:i,gitdir:r,ref:n})}catch(t){throw t.caller="git.listNotes",t}}))).apply(this,arguments)}function yi(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function gi(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){yi(o,n,i,a,s,"next",t)}function s(t){yi(o,n,i,a,s,"throw",t)}a(void 0)}))}}function vi(t){return mi.apply(this,arguments)}function mi(){return(mi=gi((function*({fs:t,gitdir:e}){const r=yield U.a.get({fs:t,gitdir:e}),n=yield r.getSubsections("remote");return Promise.all(n.map(function(){var t=gi((function*(t){return{remote:t,url:yield r.get(`remote.${t}.url`)}}));return function(e){return t.apply(this,arguments)}}()))}))).apply(this,arguments)}function wi(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function bi(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){wi(o,n,i,a,s,"next",t)}function s(t){wi(o,n,i,a,s,"throw",t)}a(void 0)}))}}function _i(t){return Oi.apply(this,arguments)}function Oi(){return(Oi=bi((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git")}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),yield vi({fs:new j.a(t),gitdir:r})}catch(t){throw t.caller="git.listRemotes",t}}))).apply(this,arguments)}var xi=r(48),ji=r(8);function Pi(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function ki(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Pi(o,n,i,a,s,"next",t)}function s(t){Pi(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Ei(t){return Ai.apply(this,arguments)}function Ai(){return(Ai=ki((function*(t){const e=ji.a.streamReader(t),r=[];let n;for(;n=yield e(),!0!==n;){if(null===n)continue;n=n.toString("utf8").replace(/\n$/,"");const[t,e,...i]=n.split(" "),o={ref:e,oid:t};for(const t of i){const[e,r]=t.split(":");"symref-target"===e?o.target=r:"peeled"===e&&(o.peeled=r)}r.push(o)}return r}))).apply(this,arguments)}var Si=r(40);function $i(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ri(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){$i(o,n,i,a,s,"next",t)}function s(t){$i(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Bi(t){return Ti.apply(this,arguments)}function Ti(){return(Ti=Ri((function*({prefix:t,symrefs:e,peelTags:r}){const n=[];return n.push(ji.a.encode("command=ls-refs\n")),n.push(ji.a.encode(`agent=${Si.a.agent}\n`)),(r||e||t)&&n.push(ji.a.delim()),r&&n.push(ji.a.encode("peel")),e&&n.push(ji.a.encode("symrefs")),t&&n.push(ji.a.encode(`ref-prefix ${t}`)),n.push(ji.a.flush()),n}))).apply(this,arguments)}function Ii(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ui(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Ii(o,n,i,a,s,"next",t)}function s(t){Ii(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Ci(t){return zi.apply(this,arguments)}function zi(){return(zi=Ui((function*({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:o,headers:a={},forPush:s=!1,protocolVersion:c=2,prefix:u,symrefs:f,peelTags:l}){try{Object(k.a)("http",t),Object(k.a)("url",o);const d=yield xi.a.discover({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:s?"git-receive-pack":"git-upload-pack",url:o,headers:a,protocolVersion:c});if(1===d.protocolVersion)return gn(d,u,f,l);const h=yield Bi({prefix:u,symrefs:f,peelTags:l});return Ei((yield xi.a.connect({http:t,auth:d.auth,headers:a,corsProxy:i,service:s?"git-receive-pack":"git-upload-pack",url:o,body:h})).body)}catch(t){throw t.caller="git.listServerRefs",t}}))).apply(this,arguments)}function Di(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ni(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Di(o,n,i,a,s,"next",t)}function s(t){Di(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Mi(t){return Fi.apply(this,arguments)}function Fi(){return(Fi=Ni((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git")}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),ft.a.listTags({fs:new j.a(t),gitdir:r})}catch(t){throw t.caller="git.listTags",t}}))).apply(this,arguments)}function Hi(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Li(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Hi(o,n,i,a,s,"next",t)}function s(t){Hi(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Yi(t){return Gi.apply(this,arguments)}function Gi(){return(Gi=Li((function*({fs:t,cache:e,gitdir:r,oid:n}){const{type:i,object:o}=yield Object(dt.a)({fs:t,cache:e,gitdir:r,oid:n});if("tag"===i)return Yi({fs:t,cache:e,gitdir:r,oid:n=lt.a.from(o).parse().object});if("commit"!==i)throw new Cn.a(n,i,"commit");return{commit:hr.a.from(o),oid:n}}))).apply(this,arguments)}function Zi(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Wi(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Zi(o,n,i,a,s,"next",t)}function s(t){Zi(o,n,i,a,s,"throw",t)}a(void 0)}))}}function qi(t){return Ki.apply(this,arguments)}function Ki(){return(Ki=Wi((function*({fs:t,cache:e,gitdir:r,oid:n}){const{commit:i,oid:o}=yield Yi({fs:t,cache:e,gitdir:r,oid:n});return{oid:o,commit:i.parse(),payload:i.withoutSignature()}}))).apply(this,arguments)}function Vi(t,e){return t.committer.timestamp-e.committer.timestamp}function Xi(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ji(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Xi(o,n,i,a,s,"next",t)}function s(t){Xi(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Qi(t){return to.apply(this,arguments)}function to(){return(to=Ji((function*({fs:t,cache:e,gitdir:r,ref:n,depth:i,since:o}){const a=void 0===o?void 0:Math.floor(o.valueOf()/1e3),s=[],c=yield zn.a.read({fs:t,gitdir:r}),u=yield ft.a.resolve({fs:t,gitdir:r,ref:n}),f=[yield qi({fs:t,cache:e,gitdir:r,oid:u})];for(;f.length>0;){const n=f.pop();if(void 0!==a&&n.commit.committer.timestamp<=a)break;if(s.push(n),void 0!==i&&s.length===i)break;if(!c.has(n.oid))for(const i of n.commit.parent){const n=yield qi({fs:t,cache:e,gitdir:r,oid:i});f.map(t=>t.oid).includes(n.oid)||f.push(n)}f.sort((t,e)=>Vi(t.commit,e.commit))}return s}))).apply(this,arguments)}function eo(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function ro(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){eo(o,n,i,a,s,"next",t)}function s(t){eo(o,n,i,a,s,"throw",t)}a(void 0)}))}}function no(t){return io.apply(this,arguments)}function io(){return(io=ro((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),ref:n="HEAD",depth:i,since:o,cache:a={}}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("ref",n),yield Qi({fs:new j.a(t),cache:a,gitdir:r,ref:n,depth:i,since:o})}catch(t){throw t.caller="git.log",t}}))).apply(this,arguments)}function oo(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function ao(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){oo(o,n,i,a,s,"next",t)}function s(t){oo(o,n,i,a,s,"throw",t)}a(void 0)}))}}function so(t){return co.apply(this,arguments)}function co(){return(co=ao((function*({fs:t,onSign:e,dir:r,gitdir:n=Object(y.a)(r,".git"),ours:i,theirs:o,fastForwardOnly:a=!1,dryRun:s=!1,noUpdateBranch:c=!1,message:u,author:f,committer:l,signingKey:d,cache:h={}}){try{Object(k.a)("fs",t),d&&Object(k.a)("onSign",e);const r=new j.a(t),p=yield H({fs:r,gitdir:n,author:f});if(!p&&!a)throw new I.a("author");const y=yield Z({fs:r,gitdir:n,author:p,committer:l});if(!y&&!a)throw new I.a("committer");return yield jr({fs:r,cache:h,gitdir:n,ours:i,theirs:o,fastForwardOnly:a,dryRun:s,noUpdateBranch:c,message:u,author:p,committer:y,signingKey:d})}catch(t){throw t.caller="git.merge",t}}))).apply(this,arguments)}var uo=r(152);function fo(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function lo(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){fo(o,n,i,a,s,"next",t)}function s(t){fo(o,n,i,a,s,"throw",t)}a(void 0)}))}}function ho(t){return po.apply(this,arguments)}function po(){return(po=lo((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),oids:n,write:i=!1,cache:o={}}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("oids",n),yield Object(uo.a)({fs:new j.a(t),cache:o,gitdir:r,oids:n,write:i})}catch(t){throw t.caller="git.packObjects",t}}))).apply(this,arguments)}function yo(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function go(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){yo(o,n,i,a,s,"next",t)}function s(t){yo(o,n,i,a,s,"throw",t)}a(void 0)}))}}function vo(t){return mo.apply(this,arguments)}function mo(){return(mo=go((function*({fs:t,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:o,onAuthFailure:a,dir:s,gitdir:c=Object(y.a)(s,".git"),ref:u,url:f,remote:l,remoteRef:d,fastForwardOnly:h=!1,corsProxy:p,singleBranch:g,headers:v={},author:m,committer:w,signingKey:b,cache:_={}}){try{Object(k.a)("fs",t),Object(k.a)("gitdir",c);const y=new j.a(t),O=yield H({fs:y,gitdir:c,author:m});if(!O)throw new I.a("author");const x=yield Z({fs:y,gitdir:c,author:O,committer:w});if(!x)throw new I.a("committer");return yield Sr({fs:y,cache:_,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:o,onAuthFailure:a,dir:s,gitdir:c,ref:u,url:f,remote:l,remoteRef:d,fastForwardOnly:h,corsProxy:p,singleBranch:g,headers:v,author:O,committer:x,signingKey:b})}catch(t){throw t.caller="git.pull",t}}))).apply(this,arguments)}var wo=r(113),bo=r(98),_o=r(96),Oo=r(89),xo=r(81),jo=r(66),Po=r(127),ko=r(33),Eo=r(128),Ao=r(115),So=r(114);function $o(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ro(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){$o(o,n,i,a,s,"next",t)}function s(t){$o(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Bo(t){return To.apply(this,arguments)}function To(){return(To=Ro((function*({fs:t,cache:e,http:r,onProgress:n,onMessage:i,onAuth:o,onAuthSuccess:a,onAuthFailure:s,gitdir:c,ref:u,remoteRef:f,remote:l,url:d,force:h=!1,delete:p=!1,corsProxy:y,headers:g={}}){const v=u||(yield Object(de.a)({fs:t,gitdir:c}));if(void 0===v)throw new kr.a("ref");const m=yield U.a.get({fs:t,gitdir:c});l=l||(yield m.get(`branch.${v}.pushRemote`))||(yield m.get("remote.pushDefault"))||(yield m.get(`branch.${v}.remote`))||"origin";const w=d||(yield m.get(`remote.${l}.pushurl`))||(yield m.get(`remote.${l}.url`));if(void 0===w)throw new kr.a("remote OR url");const b=f||(yield m.get(`branch.${v}.merge`));if(void 0===w)throw new kr.a("remoteRef");void 0===y&&(y=yield m.get("http.corsProxy"));const _=yield ft.a.expand({fs:t,gitdir:c,ref:v}),x=p?"0000000000000000000000000000000000000000":yield ft.a.resolve({fs:t,gitdir:c,ref:_}),j=ln.a.getRemoteHelperFor({url:w}),P=yield j.discover({http:r,onAuth:o,onAuthSuccess:a,onAuthFailure:s,corsProxy:y,service:"git-receive-pack",url:w,headers:g,protocolVersion:1}),k=P.auth;let E;if(b)try{E=yield ft.a.expandAgainstMap({ref:b,map:P.refs})}catch(t){if(!(t instanceof O.a))throw t;E=b.startsWith("refs/")?b:`refs/heads/${b}`}else E=_;const A=P.refs.get(E)||"0000000000000000000000000000000000000000",S=!P.capabilities.has("no-thin");let $=new Set;if(!p){const r=[...P.refs.values()];let n=new Set;if("0000000000000000000000000000000000000000"!==A){const i=yield gr({fs:t,cache:e,gitdir:c,oids:[x,A]});for(const t of i)r.push(t);S&&(n=yield Object(bo.a)({fs:t,cache:e,gitdir:c,oids:i}))}if(!r.includes(x)){const n=yield Object(wo.a)({fs:t,cache:e,gitdir:c,start:[x],finish:r});$=yield Object(bo.a)({fs:t,cache:e,gitdir:c,oids:n})}if(S){try{const r=yield ft.a.resolve({fs:t,gitdir:c,ref:`refs/remotes/${l}/HEAD`,depth:2}),{oid:i}=yield ft.a.resolveAgainstMap({ref:r.replace(`refs/remotes/${l}/`,""),fullref:r,map:P.refs}),o=[i];for(const r of yield Object(bo.a)({fs:t,cache:e,gitdir:c,oids:o}))n.add(r)}catch(t){}for(const t of n)$.delete(t)}if(!h){if(_.startsWith("refs/tags")&&"0000000000000000000000000000000000000000"!==A)throw new xo.a("tag-exists");if("0000000000000000000000000000000000000000"!==x&&"0000000000000000000000000000000000000000"!==A&&!(yield Mn({fs:t,cache:e,gitdir:c,oid:x,ancestor:A,depth:-1})))throw new xo.a("not-fast-forward")}}const R=Object(Po.a)([...P.capabilities],["report-status","side-band-64k",`agent=${Si.a.agent}`]),B=yield Object(So.a)({capabilities:R,triplets:[{oldoid:A,oid:x,fullRef:E}]}),T=p?[]:yield Object(_o.a)({fs:t,cache:e,gitdir:c,oids:[...$]}),I=yield j.connect({http:r,onProgress:n,corsProxy:y,service:"git-receive-pack",url:w,auth:k,headers:g,body:[...B,...T]}),{packfile:C,progress:z}=yield jo.a.demux(I.body);if(i){const t=Object(Eo.a)(z);Object(ko.a)(t,function(){var t=Ro((function*(t){yield i(t)}));return function(e){return t.apply(this,arguments)}}())}const D=yield Object(Ao.a)(C);if(I.headers&&(D.headers=I.headers),l&&D.ok&&D.refs[E].ok){const e=`refs/remotes/${l}/${E.replace("refs/heads","")}`;p?yield ft.a.deleteRef({fs:t,gitdir:c,ref:e}):yield ft.a.writeRef({fs:t,gitdir:c,ref:e,value:x})}if(D.ok&&Object.values(D.refs).every(t=>t.ok))return D;{const t=Object.entries(D.refs).filter(([t,e])=>!e.ok).map(([t,e])=>`\n - ${t}: ${e.error}`).join("");throw new Oo.a(t,D)}}))).apply(this,arguments)}function Io(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Uo(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Io(o,n,i,a,s,"next",t)}function s(t){Io(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Co(t){return zo.apply(this,arguments)}function zo(){return(zo=Uo((function*({fs:t,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:o,onAuthFailure:a,dir:s,gitdir:c=Object(y.a)(s,".git"),ref:u,remoteRef:f,remote:l="origin",url:d,force:h=!1,delete:p=!1,corsProxy:g,headers:v={},cache:m={}}){try{return Object(k.a)("fs",t),Object(k.a)("http",e),Object(k.a)("gitdir",c),yield Bo({fs:new j.a(t),cache:m,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:o,onAuthFailure:a,gitdir:c,ref:u,remoteRef:f,remote:l,url:d,force:h,delete:p,corsProxy:g,headers:v})}catch(t){throw t.caller="git.push",t}}))).apply(this,arguments)}function Do(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function No(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Do(o,n,i,a,s,"next",t)}function s(t){Do(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Mo(t){return Fo.apply(this,arguments)}function Fo(){return(Fo=No((function*({fs:t,cache:e,gitdir:r,oid:n}){const{type:i,object:o}=yield Object(dt.a)({fs:t,cache:e,gitdir:r,oid:n});if("tag"===i)return Mo({fs:t,cache:e,gitdir:r,oid:n=lt.a.from(o).parse().object});if("blob"!==i)throw new Cn.a(n,i,"blob");return{oid:n,blob:new Uint8Array(o)}}))).apply(this,arguments)}var Ho=r(82);function Lo(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Yo(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Lo(o,n,i,a,s,"next",t)}function s(t){Lo(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Go(t){return Zo.apply(this,arguments)}function Zo(){return(Zo=Yo((function*({fs:t,cache:e,gitdir:r,oid:n,filepath:i}){return void 0!==i&&(n=yield Object(Ho.a)({fs:t,cache:e,gitdir:r,oid:n,filepath:i})),yield Mo({fs:t,cache:e,gitdir:r,oid:n})}))).apply(this,arguments)}function Wo(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function qo(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Wo(o,n,i,a,s,"next",t)}function s(t){Wo(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Ko(t){return Vo.apply(this,arguments)}function Vo(){return(Vo=qo((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),oid:n,filepath:i,cache:o={}}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("oid",n),yield Go({fs:new j.a(t),cache:o,gitdir:r,oid:n,filepath:i})}catch(t){throw t.caller="git.readBlob",t}}))).apply(this,arguments)}function Xo(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Jo(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Xo(o,n,i,a,s,"next",t)}function s(t){Xo(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Qo(t){return ta.apply(this,arguments)}function ta(){return(ta=Jo((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),oid:n,cache:i={}}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("oid",n),yield qi({fs:new j.a(t),cache:i,gitdir:r,oid:n})}catch(t){throw t.caller="git.readCommit",t}}))).apply(this,arguments)}function ea(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function ra(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){ea(o,n,i,a,s,"next",t)}function s(t){ea(o,n,i,a,s,"throw",t)}a(void 0)}))}}function na(t){return ia.apply(this,arguments)}function ia(){return(ia=ra((function*({fs:t,cache:e,gitdir:r,ref:n="refs/notes/commits",oid:i}){const o=yield ft.a.resolve({gitdir:r,fs:t,ref:n}),{blob:a}=yield Go({fs:t,cache:e,gitdir:r,oid:o,filepath:i});return a}))).apply(this,arguments)}function oa(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function aa(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){oa(o,n,i,a,s,"next",t)}function s(t){oa(o,n,i,a,s,"throw",t)}a(void 0)}))}}function sa(t){return ca.apply(this,arguments)}function ca(){return(ca=aa((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),ref:n="refs/notes/commits",oid:i,cache:o={}}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("ref",n),Object(k.a)("oid",i),yield na({fs:new j.a(t),cache:o,gitdir:r,ref:n,oid:i})}catch(t){throw t.caller="git.readNote",t}}))).apply(this,arguments)}var ua=r(11);function fa(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function la(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){fa(o,n,i,a,s,"next",t)}function s(t){fa(o,n,i,a,s,"throw",t)}a(void 0)}))}}function da(t){return ha.apply(this,arguments)}function ha(){return(ha=la((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),oid:n,format:i="parsed",filepath:o,encoding:a,cache:s={}}){try{Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("oid",n);const e=new j.a(t);void 0!==o&&(n=yield Object(Ho.a)({fs:e,cache:s,gitdir:r,oid:n,filepath:o}));const c="parsed"===i?"content":i,u=yield Object(dt.a)({fs:e,cache:s,gitdir:r,oid:n,format:c});if(u.oid=n,"parsed"===i)switch(u.format="parsed",u.type){case"commit":u.object=hr.a.from(u.object).parse();break;case"tree":u.object=ua.a.from(u.object).entries();break;case"blob":a?u.object=u.object.toString(a):(u.object=new Uint8Array(u.object),u.format="content");break;case"tag":u.object=lt.a.from(u.object).parse();break;default:throw new Cn.a(u.oid,u.type,"blob|commit|tag|tree")}else"deflated"!==u.format&&"wrapped"!==u.format||(u.type=u.format);return u}catch(t){throw t.caller="git.readObject",t}}))).apply(this,arguments)}function pa(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function ya(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){pa(o,n,i,a,s,"next",t)}function s(t){pa(o,n,i,a,s,"throw",t)}a(void 0)}))}}function ga(t){return va.apply(this,arguments)}function va(){return(va=ya((function*({fs:t,cache:e,gitdir:r,oid:n}){const{type:i,object:o}=yield Object(dt.a)({fs:t,cache:e,gitdir:r,oid:n,format:"content"});if("tag"!==i)throw new Cn.a(n,i,"tag");const a=lt.a.from(o);return{oid:n,tag:a.parse(),payload:a.payload()}}))).apply(this,arguments)}function ma(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function wa(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){ma(o,n,i,a,s,"next",t)}function s(t){ma(o,n,i,a,s,"throw",t)}a(void 0)}))}}function ba(t){return _a.apply(this,arguments)}function _a(){return(_a=wa((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),oid:n,cache:i={}}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("oid",n),yield ga({fs:new j.a(t),cache:i,gitdir:r,oid:n})}catch(t){throw t.caller="git.readTag",t}}))).apply(this,arguments)}function Oa(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function xa(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Oa(o,n,i,a,s,"next",t)}function s(t){Oa(o,n,i,a,s,"throw",t)}a(void 0)}))}}function ja(t){return Pa.apply(this,arguments)}function Pa(){return(Pa=xa((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),oid:n,filepath:i,cache:o={}}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("oid",n),yield Object(Vn.a)({fs:new j.a(t),cache:o,gitdir:r,oid:n,filepath:i})}catch(t){throw t.caller="git.readTree",t}}))).apply(this,arguments)}function ka(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ea(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){ka(o,n,i,a,s,"next",t)}function s(t){ka(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Aa(t){return Sa.apply(this,arguments)}function Sa(){return(Sa=Ea((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),filepath:i,cache:o={}}){try{Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("filepath",i),yield n.a.acquire({fs:new j.a(t),gitdir:r,cache:o},function(){var t=Ea((function*(t){t.delete({filepath:i})}));return function(e){return t.apply(this,arguments)}}())}catch(t){throw t.caller="git.remove",t}}))).apply(this,arguments)}var $a=r(102);function Ra(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ba(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Ra(o,n,i,a,s,"next",t)}function s(t){Ra(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Ta(t){return Ia.apply(this,arguments)}function Ia(){return(Ia=Ba((function*({fs:t,cache:e,onSign:r,gitdir:n,ref:i="refs/notes/commits",oid:o,author:a,committer:s,signingKey:c}){let u;try{u=yield ft.a.resolve({gitdir:n,fs:t,ref:i})}catch(t){if(!(t instanceof O.a))throw t}let f=(yield Object(Vn.a)({fs:t,gitdir:n,oid:u||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;f=f.filter(t=>t.path!==o);const l=yield Object($a.a)({fs:t,gitdir:n,tree:f});return yield Object(se.a)({fs:t,cache:e,onSign:r,gitdir:n,ref:i,tree:l,parent:u&&[u],message:"Note removed by 'isomorphic-git removeNote'\n",author:a,committer:s,signingKey:c})}))).apply(this,arguments)}function Ua(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ca(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Ua(o,n,i,a,s,"next",t)}function s(t){Ua(o,n,i,a,s,"throw",t)}a(void 0)}))}}function za(t){return Da.apply(this,arguments)}function Da(){return(Da=Ca((function*({fs:t,onSign:e,dir:r,gitdir:n=Object(y.a)(r,".git"),ref:i="refs/notes/commits",oid:o,author:a,committer:s,signingKey:c,cache:u={}}){try{Object(k.a)("fs",t),Object(k.a)("gitdir",n),Object(k.a)("oid",o);const r=new j.a(t),f=yield H({fs:r,gitdir:n,author:a});if(!f)throw new I.a("author");const l=yield Z({fs:r,gitdir:n,author:f,committer:s});if(!l)throw new I.a("committer");return yield Ta({fs:r,cache:u,onSign:e,gitdir:n,ref:i,oid:o,author:f,committer:l,signingKey:c})}catch(t){throw t.caller="git.removeNote",t}}))).apply(this,arguments)}function Na(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ma(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Na(o,n,i,a,s,"next",t)}function s(t){Na(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Fa(t){return Ha.apply(this,arguments)}function Ha(){return(Ha=Ma((function*({fs:t,gitdir:e,oldref:r,ref:n,checkout:i=!1}){if(n!==Q.a.clean(n))throw new et.a(n,Q.a.clean(n));if(r!==Q.a.clean(r))throw new et.a(r,Q.a.clean(r));const o=`refs/heads/${r}`,a=`refs/heads/${n}`;if(yield ft.a.exists({fs:t,gitdir:e,ref:a}))throw new tt.a("branch",n,!1);const s=yield ft.a.resolve({fs:t,gitdir:e,ref:o,depth:1});yield ft.a.writeRef({fs:t,gitdir:e,ref:a,value:s}),yield ft.a.deleteRef({fs:t,gitdir:e,ref:o}),i&&(yield ft.a.writeSymbolicRef({fs:t,gitdir:e,ref:"HEAD",value:a}))}))).apply(this,arguments)}function La(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ya(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){La(o,n,i,a,s,"next",t)}function s(t){La(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Ga(t){return Za.apply(this,arguments)}function Za(){return(Za=Ya((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),ref:n,oldref:i,checkout:o=!1}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("ref",n),Object(k.a)("oldref",i),yield Fa({fs:new j.a(t),gitdir:r,ref:n,oldref:i,checkout:o})}catch(t){throw t.caller="git.renameBranch",t}}))).apply(this,arguments)}function Wa(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function qa(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Wa(o,n,i,a,s,"next",t)}function s(t){Wa(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Ka(t){return Va.apply(this,arguments)}function Va(){return(Va=qa((function*({gitdir:t,type:e,object:r}){return Object(g.a)(v.a.wrap({type:e,object:r}))}))).apply(this,arguments)}function Xa(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ja(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Xa(o,n,i,a,s,"next",t)}function s(t){Xa(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Qa(t){return ts.apply(this,arguments)}function ts(){return(ts=Ja((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),filepath:i,ref:o="HEAD",cache:a={}}){try{Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("filepath",i),Object(k.a)("ref",o);const s=new j.a(t);let c,u=yield ft.a.resolve({fs:s,gitdir:r,ref:o});try{u=yield Object(Ho.a)({fs:s,cache:a,gitdir:r,oid:u,filepath:i})}catch(t){u=null}let f={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:0,uid:0,gid:0,size:0};const l=e&&(yield s.read(Object(y.a)(e,i)));l&&(c=yield Ka({gitdir:r,type:"blob",object:l}),u===c&&(f=yield s.lstat(Object(y.a)(e,i)))),yield n.a.acquire({fs:s,gitdir:r,cache:a},function(){var t=Ja((function*(t){t.delete({filepath:i}),u&&t.insert({filepath:i,stats:f,oid:u})}));return function(e){return t.apply(this,arguments)}}())}catch(t){throw t.caller="git.reset",t}}))).apply(this,arguments)}function es(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function rs(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){es(o,n,i,a,s,"next",t)}function s(t){es(o,n,i,a,s,"throw",t)}a(void 0)}))}}function ns(t){return is.apply(this,arguments)}function is(){return(is=rs((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),ref:n,depth:i}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("ref",n),yield ft.a.resolve({fs:new j.a(t),gitdir:r,ref:n,depth:i})}catch(t){throw t.caller="git.resolveRef",t}}))).apply(this,arguments)}function os(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function as(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){os(o,n,i,a,s,"next",t)}function s(t){os(o,n,i,a,s,"throw",t)}a(void 0)}))}}function ss(t){return cs.apply(this,arguments)}function cs(){return(cs=as((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),path:n,value:i,append:o=!1}){try{Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("path",n);const e=new j.a(t),a=yield U.a.get({fs:e,gitdir:r});o?yield a.append(n,i):yield a.set(n,i),yield U.a.save({fs:e,gitdir:r,config:a})}catch(t){throw t.caller="git.setConfig",t}}))).apply(this,arguments)}function us(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function fs(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){us(o,n,i,a,s,"next",t)}function s(t){us(o,n,i,a,s,"throw",t)}a(void 0)}))}}function ls(t){return ds.apply(this,arguments)}function ds(){return(ds=fs((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),filepath:i,cache:o={}}){try{Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("filepath",i);const a=new j.a(t);if(yield x.a.isIgnored({fs:a,gitdir:r,dir:e,filepath:i}))return"ignored";const s=yield ys({fs:a,cache:o,gitdir:r}),c=yield hs({fs:a,cache:o,gitdir:r,tree:s,path:i}),u=yield n.a.acquire({fs:a,gitdir:r,cache:o},function(){var t=fs((function*(t){for(const e of t)if(e.path===i)return e;return null}));return function(e){return t.apply(this,arguments)}}()),f=yield a.lstat(Object(y.a)(e,i)),l=null!==c,d=null!==u,h=null!==f,g=function(){var t=fs((function*(){if(d&&!Object(p.a)(u,f))return u.oid;{const t=yield a.read(Object(y.a)(e,i)),s=yield Ka({gitdir:r,type:"blob",object:t});return d&&u.oid===s&&-1!==f.size&&n.a.acquire({fs:a,gitdir:r,cache:o},function(){var t=fs((function*(t){t.insert({filepath:i,stats:f,oid:s})}));return function(e){return t.apply(this,arguments)}}()),s}}));return function(){return t.apply(this,arguments)}}();if(!l&&!h&&!d)return"absent";if(!l&&!h&&d)return"*absent";if(!l&&h&&!d)return"*added";if(!l&&h&&d){return(yield g())===u.oid?"added":"*added"}if(l&&!h&&!d)return"deleted";if(l&&!h&&d)return u.oid,"*deleted";if(l&&h&&!d){return(yield g())===c?"*undeleted":"*undeletemodified"}if(l&&h&&d){const t=yield g();return t===c?t===u.oid?"unmodified":"*unmodified":t===u.oid?"modified":"*modified"}}catch(t){throw t.caller="git.status",t}}))).apply(this,arguments)}function hs(t){return ps.apply(this,arguments)}function ps(){return(ps=fs((function*({fs:t,cache:e,gitdir:r,tree:n,path:i}){"string"==typeof i&&(i=i.split("/"));const o=i.shift();for(const a of n)if(a.path===o){if(0===i.length)return a.oid;const{type:n,object:o}=yield Object(dt.a)({fs:t,cache:e,gitdir:r,oid:a.oid});if("tree"===n){return hs({fs:t,cache:e,gitdir:r,tree:ua.a.from(o),path:i})}if("blob"===n)throw new Cn.a(a.oid,n,"blob",i.join("/"))}return null}))).apply(this,arguments)}function ys(t){return gs.apply(this,arguments)}function gs(){return(gs=fs((function*({fs:t,cache:e,gitdir:r}){let n;try{n=yield ft.a.resolve({fs:t,gitdir:r,ref:"HEAD"})}catch(t){if(t instanceof O.a)return[]}const{tree:i}=yield Object(Vn.a)({fs:t,cache:e,gitdir:r,oid:n});return i}))).apply(this,arguments)}function vs(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function ms(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){vs(o,n,i,a,s,"next",t)}function s(t){vs(o,n,i,a,s,"throw",t)}a(void 0)}))}}function ws(t){return bs.apply(this,arguments)}function bs(){return(bs=ms((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),ref:n="HEAD",filepaths:i=["."],filter:o,cache:a={}}){try{Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("ref",n);const c=new j.a(t);return yield Object(St.a)({fs:c,cache:a,dir:e,gitdir:r,trees:[Object(h.a)({ref:n}),_(),d()],map:(s=ms((function*(t,[r,n,a]){if(!r&&!a&&n&&(yield x.a.isIgnored({fs:c,dir:e,filepath:t})))return null;if(!i.some(e=>Tt(t,e)))return null;if(o&&!o(t))return;const s=r&&(yield r.type());if("tree"===s||"special"===s)return;if("commit"===s)return null;const u=n&&(yield n.type());if("tree"===u||"special"===u)return;const f=a&&(yield a.type());if("commit"===f)return null;if("tree"===f||"special"===f)return;const l=r?yield r.oid():void 0,d=a?yield a.oid():void 0;let h;r||!n||a?n&&(h=yield n.oid()):h="42";const p=[void 0,l,h,d],y=p.map(t=>p.indexOf(t));return y.shift(),[t,...y]})),function(t,e){return s.apply(this,arguments)})})}catch(t){throw t.caller="git.statusMatrix",t}var s}))).apply(this,arguments)}function _s(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Os(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){_s(o,n,i,a,s,"next",t)}function s(t){_s(o,n,i,a,s,"throw",t)}a(void 0)}))}}function xs(t){return js.apply(this,arguments)}function js(){return(js=Os((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),ref:n,object:i,force:o=!1}){try{Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("ref",n);const e=new j.a(t);if(void 0===n)throw new kr.a("ref");n=n.startsWith("refs/tags/")?n:`refs/tags/${n}`;const a=yield ft.a.resolve({fs:e,gitdir:r,ref:i||"HEAD"});if(!o&&(yield ft.a.exists({fs:e,gitdir:r,ref:n})))throw new tt.a("tag",n);yield ft.a.writeRef({fs:e,gitdir:r,ref:n,value:a})}catch(t){throw t.caller="git.tag",t}}))).apply(this,arguments)}function Ps(){try{return Si.a.version}catch(t){throw t.caller="git.version",t}}function ks(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Es(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){ks(o,n,i,a,s,"next",t)}function s(t){ks(o,n,i,a,s,"throw",t)}a(void 0)}))}}function As(t){return Ss.apply(this,arguments)}function Ss(){return(Ss=Es((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),trees:n,map:i,reduce:o,iterate:a,cache:s={}}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("trees",n),yield Object(St.a)({fs:new j.a(t),cache:s,dir:e,gitdir:r,trees:n,map:i,reduce:o,iterate:a})}catch(t){throw t.caller="git.walk",t}}))).apply(this,arguments)}function $s(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Rs(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){$s(o,n,i,a,s,"next",t)}function s(t){$s(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Bs(t){return Ts.apply(this,arguments)}function Ts(){return(Ts=Rs((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),blob:n}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("blob",n),yield Object(P.a)({fs:new j.a(t),gitdir:r,type:"blob",object:n,format:"content"})}catch(t){throw t.caller="git.writeBlob",t}}))).apply(this,arguments)}function Is(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Us(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Is(o,n,i,a,s,"next",t)}function s(t){Is(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Cs(t){return zs.apply(this,arguments)}function zs(){return(zs=Us((function*({fs:t,gitdir:e,commit:r}){const n=hr.a.from(r).toObject();return yield Object(P.a)({fs:t,gitdir:e,type:"commit",object:n,format:"content"})}))).apply(this,arguments)}function Ds(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ns(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Ds(o,n,i,a,s,"next",t)}function s(t){Ds(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Ms(t){return Fs.apply(this,arguments)}function Fs(){return(Fs=Ns((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),commit:n}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("commit",n),yield Cs({fs:new j.a(t),gitdir:r,commit:n})}catch(t){throw t.caller="git.writeCommit",t}}))).apply(this,arguments)}var Hs=r(147);function Ls(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Ys(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Ls(o,n,i,a,s,"next",t)}function s(t){Ls(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Gs(t){return Zs.apply(this,arguments)}function Zs(){return(Zs=Ys((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),ref:n,value:i,force:o=!1,symbolic:a=!1}){try{Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("ref",n),Object(k.a)("value",i);const e=new j.a(t);if(n!==Q.a.clean(n))throw new et.a(n,Q.a.clean(n));if(!o&&(yield ft.a.exists({fs:e,gitdir:r,ref:n})))throw new tt.a("ref",n);a?yield ft.a.writeSymbolicRef({fs:e,gitdir:r,ref:n,value:i}):(i=yield ft.a.resolve({fs:e,gitdir:r,ref:i}),yield ft.a.writeRef({fs:e,gitdir:r,ref:n,value:i}))}catch(t){throw t.caller="git.writeRef",t}}))).apply(this,arguments)}function Ws(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function qs(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Ws(o,n,i,a,s,"next",t)}function s(t){Ws(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Ks(t){return Vs.apply(this,arguments)}function Vs(){return(Vs=qs((function*({fs:t,gitdir:e,tag:r}){const n=lt.a.from(r).toObject();return yield Object(P.a)({fs:t,gitdir:e,type:"tag",object:n,format:"content"})}))).apply(this,arguments)}function Xs(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function Js(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Xs(o,n,i,a,s,"next",t)}function s(t){Xs(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Qs(t){return tc.apply(this,arguments)}function tc(){return(tc=Js((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),tag:n}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("tag",n),yield Ks({fs:new j.a(t),gitdir:r,tag:n})}catch(t){throw t.caller="git.writeTag",t}}))).apply(this,arguments)}function ec(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function rc(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){ec(o,n,i,a,s,"next",t)}function s(t){ec(o,n,i,a,s,"throw",t)}a(void 0)}))}}function nc(t){return ic.apply(this,arguments)}function ic(){return(ic=rc((function*({fs:t,dir:e,gitdir:r=Object(y.a)(e,".git"),tree:n}){try{return Object(k.a)("fs",t),Object(k.a)("gitdir",r),Object(k.a)("tree",n),yield Object($a.a)({fs:new j.a(t),gitdir:r,tree:n})}catch(t){throw t.caller="git.writeTree",t}}))).apply(this,arguments)}var oc=r(79);r.d(e,"Errors",(function(){return oc})),r.d(e,"STAGE",(function(){return d})),r.d(e,"TREE",(function(){return h.a})),r.d(e,"WORKDIR",(function(){return _})),r.d(e,"add",(function(){return S})),r.d(e,"addNote",(function(){return V})),r.d(e,"addRemote",(function(){return ct})),r.d(e,"annotatedTag",(function(){return wt})),r.d(e,"branch",(function(){return Et})),r.d(e,"checkout",(function(){return Ht})),r.d(e,"clone",(function(){return oe})),r.d(e,"commit",(function(){return fe})),r.d(e,"getConfig",(function(){return tn})),r.d(e,"getConfigAll",(function(){return un})),r.d(e,"setConfig",(function(){return ss})),r.d(e,"currentBranch",(function(){return ye})),r.d(e,"deleteBranch",(function(){return xe})),r.d(e,"deleteRef",(function(){return Ee})),r.d(e,"deleteRemote",(function(){return Ue})),r.d(e,"deleteTag",(function(){return Le})),r.d(e,"expandOid",(function(){return sr})),r.d(e,"expandRef",(function(){return lr})),r.d(e,"fastForward",(function(){return Tr})),r.d(e,"fetch",(function(){return zr})),r.d(e,"findMergeBase",(function(){return Fr})),r.d(e,"findRoot",(function(){return Vr})),r.d(e,"getRemoteInfo",(function(){return pn})),r.d(e,"getRemoteInfo2",(function(){return wn})),r.d(e,"hashBlob",(function(){return _n.a})),r.d(e,"indexPack",(function(){return Sn})),r.d(e,"init",(function(){return Tn})),r.d(e,"isDescendent",(function(){return Yn})),r.d(e,"listBranches",(function(){return qn})),r.d(e,"listFiles",(function(){return oi})),r.d(e,"listNotes",(function(){return hi})),r.d(e,"listRemotes",(function(){return _i})),r.d(e,"listServerRefs",(function(){return Ci})),r.d(e,"listTags",(function(){return Mi})),r.d(e,"log",(function(){return no})),r.d(e,"merge",(function(){return so})),r.d(e,"packObjects",(function(){return ho})),r.d(e,"pull",(function(){return vo})),r.d(e,"push",(function(){return Co})),r.d(e,"readBlob",(function(){return Ko})),r.d(e,"readCommit",(function(){return Qo})),r.d(e,"readNote",(function(){return sa})),r.d(e,"readObject",(function(){return da})),r.d(e,"readTag",(function(){return ba})),r.d(e,"readTree",(function(){return ja})),r.d(e,"remove",(function(){return Aa})),r.d(e,"removeNote",(function(){return za})),r.d(e,"renameBranch",(function(){return Ga})),r.d(e,"resetIndex",(function(){return Qa})),r.d(e,"resolveRef",(function(){return ns})),r.d(e,"status",(function(){return ls})),r.d(e,"statusMatrix",(function(){return ws})),r.d(e,"tag",(function(){return xs})),r.d(e,"version",(function(){return Ps})),r.d(e,"walk",(function(){return As})),r.d(e,"writeBlob",(function(){return Bs})),r.d(e,"writeCommit",(function(){return Ms})),r.d(e,"writeObject",(function(){return Hs.a})),r.d(e,"writeRef",(function(){return Gs})),r.d(e,"writeTag",(function(){return Qs})),r.d(e,"writeTree",(function(){return nc}));e.default={Errors:oc,STAGE:d,TREE:h.a,WORKDIR:_,add:S,addNote:V,addRemote:ct,annotatedTag:wt,branch:Et,checkout:Ht,clone:oe,commit:fe,getConfig:tn,getConfigAll:un,setConfig:ss,currentBranch:ye,deleteBranch:xe,deleteRef:Ee,deleteRemote:Ue,deleteTag:Le,expandOid:sr,expandRef:lr,fastForward:Tr,fetch:zr,findMergeBase:Fr,findRoot:Vr,getRemoteInfo:pn,getRemoteInfo2:wn,hashBlob:_n.a,indexPack:Sn,init:Tn,isDescendent:Yn,listBranches:qn,listFiles:oi,listNotes:hi,listRemotes:_i,listServerRefs:Ci,listTags:Mi,log:no,merge:so,packObjects:ho,pull:vo,push:Co,readBlob:Ko,readCommit:Qo,readNote:sa,readObject:da,readTag:ba,readTree:ja,remove:Aa,removeNote:za,renameBranch:Ga,resetIndex:Qa,resolveRef:ns,status:ls,statusMatrix:ws,tag:xs,version:Ps,walk:As,writeBlob:Bs,writeCommit:Ms,writeObject:Hs.a,writeRef:Gs,writeTag:Qs,writeTree:nc}}])})); -//# sourceMappingURL=index.umd.min.js.map \ No newline at end of file diff --git a/node_modules/isomorphic-git/index.umd.min.js.map b/node_modules/isomorphic-git/index.umd.min.js.map deleted file mode 100644 index 60e190fa..00000000 --- a/node_modules/isomorphic-git/index.umd.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack://git/webpack/universalModuleDefinition","webpack://git/webpack/bootstrap","webpack://git/./src/utils/assertParameter.js","webpack://git/./src/utils/normalizePath.js","webpack://git/./src/utils/join.js","webpack://git/./src/models/FileSystem.js","webpack://git/./src/models/GitPackedRefs.js","webpack://git/./src/utils/compareRefNames.js","webpack://git/./src/managers/GitRefManager.js","webpack://git/./src/errors/BaseError.js","webpack://git/./src/errors/InternalError.js","webpack://git/./src/storage/readObject.js","webpack://git/./src/models/GitPktLine.js","webpack://git/./src/errors/NotFoundError.js","webpack://git/./node_modules/node-libs-browser/node_modules/buffer/index.js","webpack://git/./src/models/GitTree.js","webpack://git/./src/models/GitCommit.js","webpack://git/./src/managers/GitConfigManager.js","webpack://git/./src/errors/ObjectTypeError.js","webpack://git/./src/models/GitAnnotatedTag.js","webpack://git/./src/utils/toHex.js","webpack://git/./src/utils/shasum.js","webpack://git/./src/storage/writeObject.js","webpack://git/./src/utils/BufferCursor.js","webpack://git/./src/managers/GitIndexManager.js","webpack://git/./src/utils/normalizeNewlines.js","webpack://git/./node_modules/pify/index.js","webpack://git/./src/errors/MissingNameError.js","webpack://git/./src/models/GitObject.js","webpack://git/./src/errors/MissingParameterError.js","webpack://git/./src/errors/AlreadyExistsError.js","webpack://git/./src/utils/dirname.js","webpack://git/./node_modules/pako/lib/utils/common.js","webpack://git/./src/errors/InvalidOidError.js","webpack://git/./src/utils/normalizeStats.js","webpack://git/./src/errors/ParseError.js","webpack://git/./src/utils/symbols.js","webpack://git/./src/utils/compareStrings.js","webpack://git/./src/utils/forAwait.js","webpack://git/./src/utils/basename.js","webpack://git/./src/errors/InvalidRefNameError.js","webpack://git/./src/managers/GitShallowManager.js","webpack://git/./node_modules/clean-git-ref/lib/index.js","webpack://git/./src/errors/UnsafeFilepathError.js","webpack://git/./src/errors/MergeNotSupportedError.js","webpack://git/./src/utils/pkg.js","webpack://git/./node_modules/pako/index.js","webpack://git/./src/utils/padHex.js","webpack://git/./src/utils/parseAuthor.js","webpack://git/./src/models/GitWalkerRepo.js","webpack://git/./src/commands/TREE.js","webpack://git/./src/utils/collect.js","webpack://git/./src/commands/readTree.js","webpack://git/./src/commands/currentBranch.js","webpack://git/./src/managers/GitRemoteHTTP.js","webpack://git/./src/errors/HttpError.js","webpack://git/./src/utils/comparePath.js","webpack://git/./src/utils/resolveTree.js","webpack://git/./src/models/GitPackIndex.js","webpack://git/./src/managers/GitRemoteManager.js","webpack://git/./src/utils/translateSSHtoHTTP.js","webpack://git/./src/utils/arrayRange.js","webpack://git/./src/models/RunningMinimum.js","webpack://git/./src/utils/unionOfIterators.js","webpack://git/./src/commands/walk.js","webpack://git/./node_modules/async-lock/index.js","webpack://git/./src/utils/formatAuthor.js","webpack://git/./src/utils/FIFO.js","webpack://git/./src/errors/RemoteCapabilityError.js","webpack://git/./src/errors/EmptyServerResponseError.js","webpack://git/./src/errors/NoRefspecError.js","webpack://git/./src/errors/SmartHttpError.js","webpack://git/./src/errors/UnknownTransportError.js","webpack://git/./src/errors/UrlParseError.js","webpack://git/./src/errors/UserCanceledError.js","webpack://git/./src/managers/GitIgnoreManager.js","webpack://git/./src/models/GitSideBand.js","webpack://git/./node_modules/sha.js/sha1.js","webpack://git/./src/utils/normalizeMode.js","webpack://git/./src/utils/compareStats.js","webpack://git/./src/models/GitRefSpec.js","webpack://git/./src/storage/readPackIndex.js","webpack://git/./src/utils/StreamReader.js","webpack://git/./src/utils/inflate.js","webpack://git/./src/utils/deflate.js","webpack://git/./src/utils/calculateBasicAuthHeader.js","webpack://git/./src/utils/getIterator.js","webpack://git/./src/utils/fromValue.js","webpack://git/./src/wire/parseCapabilitiesV2.js","webpack://git/./src/wire/parseRefsAdResponse.js","webpack://git/./src/utils/indent.js","webpack://git/./src/errors/index.js","webpack://git/./src/errors/InvalidFilepathError.js","webpack://git/./src/errors/PushRejectedError.js","webpack://git/./src/utils/resolveFilepath.js","webpack://git/./src/commands/commit.js","webpack://git/./node_modules/pako/lib/zlib/messages.js","webpack://git/./src/errors/AmbiguousError.js","webpack://git/./src/errors/CheckoutConflictError.js","webpack://git/./src/errors/CommitNotFetchedError.js","webpack://git/./src/errors/FastForwardError.js","webpack://git/./src/errors/GitPushError.js","webpack://git/./src/errors/MaxDepthError.js","webpack://git/./src/models/GitIndex.js","webpack://git/./src/utils/flatFileListToDirectoryStructure.js","webpack://git/./src/models/GitConfig.js","webpack://git/./src/models/GitRefSpecSet.js","webpack://git/./src/utils/mergeFile.js","webpack://git/./src/commands/pack.js","webpack://git/./src/utils/flat.js","webpack://git/./src/commands/listObjects.js","webpack://git/./src/utils/abbreviateRef.js","webpack://git/./src/utils/extractAuthFromUrl.js","webpack://git/./node_modules/process/browser.js","webpack://git/./src/commands/writeTree.js","webpack://git/./src/commands/fetch.js","webpack://git/./node_modules/safe-buffer/index.js","webpack://git/./node_modules/pako/lib/zlib/adler32.js","webpack://git/./node_modules/pako/lib/zlib/crc32.js","webpack://git/./node_modules/pako/lib/utils/strings.js","webpack://git/./node_modules/pako/lib/zlib/zstream.js","webpack://git/./node_modules/pako/lib/zlib/constants.js","webpack://git/./src/wire/writeUploadPackRequest.js","webpack://git/./src/wire/parseUploadPackResponse.js","webpack://git/./src/utils/mergeTree.js","webpack://git/./src/commands/listCommitsAndTags.js","webpack://git/./src/wire/writeReceivePackRequest.js","webpack://git/./src/wire/parseReceivePackResponse.js","webpack://git/./src/utils/compareTreeEntryPath.js","webpack://git/./src/storage/readObjectLoose.js","webpack://git/./src/storage/readObjectPacked.js","webpack://git/./node_modules/crc-32/crc32.js","webpack://git/./src/utils/git-list-pack.js","webpack://git/./src/utils/applyDelta.js","webpack://git/./src/utils/outdent.js","webpack://git/./node_modules/ignore/index.js","webpack://git/./src/storage/writeObjectLoose.js","webpack://git/./node_modules/diff3/diff3.js","webpack://git/./src/commands/types.js","webpack://git/./src/utils/filterCapabilities.js","webpack://git/./src/utils/splitLines.js","webpack://git/./node_modules/async-lock/lib/index.js","webpack://git/(webpack)/buildin/global.js","webpack://git/./node_modules/node-libs-browser/node_modules/base64-js/index.js","webpack://git/./node_modules/ieee754/index.js","webpack://git/./node_modules/isarray/index.js","webpack://git/./node_modules/inherits/inherits_browser.js","webpack://git/./node_modules/sha.js/hash.js","webpack://git/./node_modules/pako/lib/deflate.js","webpack://git/./node_modules/pako/lib/zlib/deflate.js","webpack://git/./node_modules/pako/lib/zlib/trees.js","webpack://git/./node_modules/pako/lib/inflate.js","webpack://git/./node_modules/pako/lib/zlib/inflate.js","webpack://git/./node_modules/pako/lib/zlib/inffast.js","webpack://git/./node_modules/pako/lib/zlib/inftrees.js","webpack://git/./node_modules/pako/lib/zlib/gzheader.js","webpack://git/./node_modules/diff3/onp.js","webpack://git/./src/api/hashBlob.js","webpack://git/./src/api/writeObject.js","webpack://git/./src/storage/hasObjectLoose.js","webpack://git/./src/storage/hasObjectPacked.js","webpack://git/./src/storage/hasObject.js","webpack://git/./src/commands/addNote.js","webpack://git/./src/utils/emptyPackfile.js","webpack://git/./src/storage/hashObject.js","webpack://git/./src/commands/packObjects.js","webpack://git/./src/models/GitWalkerIndex.js","webpack://git/./src/utils/mode2type.js","webpack://git/./src/commands/STAGE.js","webpack://git/./src/models/GitWalkerFs.js","webpack://git/./src/commands/WORKDIR.js","webpack://git/./src/api/add.js","webpack://git/./src/commands/getConfig.js","webpack://git/./src/utils/normalizeAuthorObject.js","webpack://git/./src/utils/normalizeCommitterObject.js","webpack://git/./src/api/addNote.js","webpack://git/./src/commands/addRemote.js","webpack://git/./src/api/addRemote.js","webpack://git/./src/commands/annotatedTag.js","webpack://git/./src/api/annotatedTag.js","webpack://git/./src/commands/branch.js","webpack://git/./src/api/branch.js","webpack://git/./src/utils/worthWalking.js","webpack://git/./src/commands/checkout.js","webpack://git/./src/api/checkout.js","webpack://git/./src/commands/init.js","webpack://git/./src/utils/deleteRecursively.js","webpack://git/./src/commands/clone.js","webpack://git/./src/api/clone.js","webpack://git/./src/api/commit.js","webpack://git/./src/api/currentBranch.js","webpack://git/./src/commands/deleteBranch.js","webpack://git/./src/api/deleteBranch.js","webpack://git/./src/api/deleteRef.js","webpack://git/./src/commands/deleteRemote.js","webpack://git/./src/api/deleteRemote.js","webpack://git/./src/commands/deleteTag.js","webpack://git/./src/api/deleteTag.js","webpack://git/./src/storage/expandOidLoose.js","webpack://git/./src/storage/expandOidPacked.js","webpack://git/./src/storage/expandOid.js","webpack://git/./src/api/expandOid.js","webpack://git/./src/api/expandRef.js","webpack://git/./src/commands/findMergeBase.js","webpack://git/./src/commands/merge.js","webpack://git/./src/commands/pull.js","webpack://git/./src/api/fastForward.js","webpack://git/./src/api/fetch.js","webpack://git/./src/api/findMergeBase.js","webpack://git/./src/commands/findRoot.js","webpack://git/./src/api/findRoot.js","webpack://git/./src/api/getConfig.js","webpack://git/./src/commands/getConfigAll.js","webpack://git/./src/api/getConfigAll.js","webpack://git/./src/api/getRemoteInfo.js","webpack://git/./src/utils/formatInfoRefs.js","webpack://git/./src/api/getRemoteInfo2.js","webpack://git/./src/commands/indexPack.js","webpack://git/./src/api/indexPack.js","webpack://git/./src/api/init.js","webpack://git/./src/commands/isDescendent.js","webpack://git/./src/api/isDescendent.js","webpack://git/./src/api/listBranches.js","webpack://git/./src/commands/listFiles.js","webpack://git/./src/api/listFiles.js","webpack://git/./src/commands/listNotes.js","webpack://git/./src/api/listNotes.js","webpack://git/./src/commands/listRemotes.js","webpack://git/./src/api/listRemotes.js","webpack://git/./src/wire/parseListRefsResponse.js","webpack://git/./src/wire/writeListRefsRequest.js","webpack://git/./src/api/listServerRefs.js","webpack://git/./src/api/listTags.js","webpack://git/./src/utils/resolveCommit.js","webpack://git/./src/commands/readCommit.js","webpack://git/./src/utils/compareAge.js","webpack://git/./src/commands/log.js","webpack://git/./src/api/log.js","webpack://git/./src/api/merge.js","webpack://git/./src/api/packObjects.js","webpack://git/./src/api/pull.js","webpack://git/./src/commands/push.js","webpack://git/./src/api/push.js","webpack://git/./src/utils/resolveBlob.js","webpack://git/./src/commands/readBlob.js","webpack://git/./src/api/readBlob.js","webpack://git/./src/api/readCommit.js","webpack://git/./src/commands/readNote.js","webpack://git/./src/api/readNote.js","webpack://git/./src/api/readObject.js","webpack://git/./src/commands/readTag.js","webpack://git/./src/api/readTag.js","webpack://git/./src/api/readTree.js","webpack://git/./src/api/remove.js","webpack://git/./src/commands/removeNote.js","webpack://git/./src/api/removeNote.js","webpack://git/./src/commands/renameBranch.js","webpack://git/./src/api/renameBranch.js","webpack://git/./src/utils/hashObject.js","webpack://git/./src/api/resetIndex.js","webpack://git/./src/api/resolveRef.js","webpack://git/./src/api/setConfig.js","webpack://git/./src/api/status.js","webpack://git/./src/api/statusMatrix.js","webpack://git/./src/api/tag.js","webpack://git/./src/api/version.js","webpack://git/./src/api/walk.js","webpack://git/./src/api/writeBlob.js","webpack://git/./src/commands/writeCommit.js","webpack://git/./src/api/writeCommit.js","webpack://git/./src/api/writeRef.js","webpack://git/./src/commands/writeTag.js","webpack://git/./src/api/writeTag.js","webpack://git/./src/api/writeTree.js","webpack://git/./src/index.js"],"names":["root","factory","exports","module","define","amd","self","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","assertParameter","undefined","MissingParameterError","normalizePath","path","replace","join","parts","map","FileSystem","constructor","fs","_original_unwrapped_fs","promises","getOwnPropertyDescriptor","this","_readFile","readFile","_writeFile","writeFile","_mkdir","mkdir","_rmdir","rmdir","_unlink","unlink","_stat","stat","_lstat","lstat","_readdir","readdir","_readlink","readlink","_symlink","symlink","pify","exists","filepath","options","err","code","console","log","read","buffer","Buffer","from","write","contents","dirname","_selfCall","parent","rm","names","sort","compareStrings","readdirDeep","dir","subdirs","Promise","all","subdir","res","isDirectory","reduce","a","f","concat","filename","opts","encoding","writelink","toString","GitPackedRefs","text","refs","Map","parsedConfig","trim","split","line","test","comment","indexOf","startsWith","slice","set","ref","peeled","oid","delete","filter","entry","compareRefNames","b","_a","_b","tmp","endsWith","refpaths","GIT_FILES","GitRefManager","gitdir","remote","symrefs","tags","refspecs","prune","pruneTags","values","match","InvalidOidError","config","GitConfigManager","getall","length","NoRefspecError","unshift","refspec","GitRefSpecSet","actualRefsToWrite","listRefs","deleteRefs","tag","serverRef","keys","refTranslations","translate","translatedRef","symrefTranslations","symtarget","translateOne","pruned","localNamespaces","file","has","push","packed","beforeSize","size","depth","sha","resolve","packedMap","packedRefs","allpaths","includes","NotFoundError","expand","fullref","resolveAgainstMap","files","x","BaseError","Error","message","super","caller","toJSON","data","stack","fromJSON","json","e","InternalError","_readObject","cache","format","getExternalRefDelta","result","readObjectLoose","readObjectPacked","inflate","shasum","type","GitObject","unwrap","GitPktLine","hexlength","padHex","stream","reader","StreamReader","parseInt","what","base64","ieee754","isArray","kMaxLength","TYPED_ARRAY_SUPPORT","createBuffer","that","RangeError","Uint8Array","__proto__","arg","encodingOrOffset","allocUnsafe","TypeError","ArrayBuffer","array","byteOffset","byteLength","fromArrayLike","fromArrayBuffer","string","isEncoding","actual","fromString","obj","isBuffer","len","checked","copy","val","fromObject","assertSize","isView","loweredCase","utf8ToBytes","base64ToBytes","toLowerCase","slowToString","start","end","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","bidirectionalIndexOf","isNaN","arrayIndexOf","lastIndexOf","arr","indexSize","arrLength","valLength","String","buf","readUInt16BE","foundIndex","found","j","hexWrite","offset","Number","remaining","strLen","parsed","substr","utf8Write","blitBuffer","asciiWrite","str","byteArray","charCodeAt","asciiToBytes","latin1Write","base64Write","ucs2Write","units","hi","lo","utf16leToBytes","fromByteArray","Math","min","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","codePoints","fromCharCode","apply","decodeCodePointsArray","SlowBuffer","alloc","INSPECT_MAX_BYTES","global","foo","subarray","typedArraySupport","poolSize","_augment","species","configurable","fill","allocUnsafeSlow","_isBuffer","compare","y","list","pos","swap16","swap32","swap64","arguments","equals","inspect","max","target","thisStart","thisEnd","thisCopy","targetCopy","isFinite","Array","_arr","ret","out","toHex","bytes","checkOffset","ext","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","writeDouble","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","floor","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","INVALID_BASE64_RE","Infinity","leadSurrogate","toByteArray","stringtrim","base64clean","src","dst","mode2type","nudgeIntoShape","limitModeToAllowed","GitTree","entries","_entries","cursor","space","nullchar","UnsafeFilepathError","parseBuffer","comparePath","tree","render","toObject","compareTreeEntryPath","iterator","GitCommit","commit","_commit","payload","signature","headers","justHeaders","justMessage","normalizeNewlines","indent","parseHeaders","parse","assign","hs","h","author","parseAuthor","committer","formatAuthor","gpgsig","renderHeaders","withoutSignature","isolateSignature","outdent","sign","secretKey","signedCommit","GitConfig","ObjectTypeError","expected","GitAnnotatedTag","_tag","tagger","signedTag","hex","byte","supportsSubtleSHA1","testSubtleSHA1","subtleSHA1","shasumSync","Hash","update","digest","crypto","subtle","_","_writeObject","dryRun","wrap","deflate","writeObjectLoose","BufferCursor","_start","eof","tell","seek","enc","source","lock","IndexCache","rawIndexFile","index","GitIndex","stats","savedStats","currStats","compareStats","GitIndexManager","closure","AsyncLock","maxPending","acquire","isIndexStale","updateCachedIndexFile","_dirty","processFn","fn","args","P","promiseModule","reject","multiArgs","errorFirst","shift","error","input","exclude","objType","pattern","include","some","excludeMain","getPrototypeOf","MissingNameError","role","actualLength","parameter","AlreadyExistsError","noun","where","canForce","last","TYPED_OK","Uint16Array","Int32Array","_has","sources","shrinkBuf","fnTyped","arraySet","dest","src_offs","dest_offs","flattenChunks","chunks","chunk","fnUntyped","setTyped","on","Buf8","Buf16","Buf32","SecondsNanoseconds","givenSeconds","givenNanoseconds","milliseconds","date","valueOf","seconds","normalizeStats","ctimeSeconds","ctimeNanoseconds","ctimeMs","ctime","mtimeSeconds","mtimeNanoseconds","mtimeMs","mtime","dev","ino","normalizeMode","uid","gid","ParseError","GitWalkSymbol","forAwait","iterable","cb","iter","getIterator","done","next","return","basename","InvalidRefNameError","suggestion","GitShallowManager","oids","Set","add","replaceAll","search","replacement","RegExp","CleanGitRef","clean","MergeNotSupportedError","pkg","version","agent","pako","repeat","email","timestamp","timezoneOffset","parseTimezoneOffset","hours","minutes","GitWalkerRepo","mapPromise","resolveTree","walker","ConstructEntry","fullpath","_fullpath","_type","_mode","_content","_oid","content","JSON","stringify","readObject","_entry","TREE","freeze","collect","buffers","nextIndex","_readTree","resolveFilepath","treeOid","_currentBranch","fullname","abbreviateRef","corsProxify","corsProxy","url","updateHeaders","auth","username","password","Authorization","calculateBasicAuthHeader","stringifyBody","body","response","preview","GitRemoteHTTP","http","onProgress","onAuth","onAuthSuccess","onAuthFailure","service","_origUrl","protocolVersion","extractAuthFromUrl","proxifiedURL","tryAgain","providedAuthBefore","request","method","statusCode","getAuth","cancel","UserCanceledError","HttpError","statusMessage","remoteHTTP","parseRefsAdResponse","SmartHttpError","urlAuth","accept","GitPackIndex","stuff","offsetCache","idx","hashes","hash","offsets","packfileSha","crcs","pack","listpackTypes","1","2","3","4","6","7","offsetToObject","totalObjectCount","lastPercent","listpack","reference","num","percent","phase","loaded","total","offsetArray","crc","crc32","count","objectsByDepth","readDepth","externalReadDepth","readSlice","toBuffer","fanoutBuffer","crcsBuffer","offsetsBuffer","totalBuffer","shaBuffer","load","unload","raw","btype","lastFour","startWith","otherVarIntDecode","base","multibyte","lastSeven","decodeVarInt","baseOffset","applyDelta","GitRemoteManager","remoteHelpers","transport","address","matches","parseRemoteUrl","UrlParseError","UnknownTransportError","translateSSHtoHTTP","arrayRange","RunningMinimum","consider","reset","unionOfIterators","sets","minimum","heads","numsets","_walk","trees","children","flatten","flat","iterate","walk","walkers","proxy","range","unionWalkerFromReaddir","iterators","find","walkedChildren","is","simpleSign","abs","strHours","strMinutes","formatTimezoneOffset","FIFO","_queue","_ended","_waiting","destroy","RemoteCapabilityError","capability","EmptyServerResponseError","GitIgnoreManager","excludes","excludesFile","pairs","gitignore","pieces","folder","ignoredStatus","ign","ignore","parentdir","ignores","unignored","ignored","GitSideBand","streamReader","packetlines","packfile","progress","nextBit","inherits","K","W","Sha1","init","_w","rotl5","rotl30","ft","_c","_d","_e","_update","M","_hash","H","permissions","GitRefSpec","remotePath","localPath","force","matchPrefix","forceMatch","remoteGlobMatch","localGlobMatch","remoteIsGlob","remoteBranch","reverseTranslate","localBranch","PackfileCache","emitter","emitterPrefix","fromIdx","readPackIndex","loadPackIndex","undoCursor","started","_discardedBytes","_init","_loadnext","_moveCursor","_trim","_accumulate","skip","undo","_next","lengthBuffers","nextbuffer","acc","supportsDecompressionStream","testDecompressionStream","browserInflate","ds","DecompressionStream","Blob","pipeThrough","Response","arrayBuffer","supportsCompressionStream","testCompressionStream","browserDeflate","cs","CompressionStream","asyncIterator","queue","pop","fromValue","parseCapabilitiesV2","capabilities2","capabilities","lineOne","lineTwo","firstRef","capabilitiesLine","splitAndAssert","cap","sep","InvalidFilepathError","reason","PushRejectedError","pathArray","_resolveFilepath","onSign","signingKey","noUpdateBranch","inode","flatFileListToDirectoryStructure","constructTree","comm","writeObject","writeRef","metadata","0","AmbiguousError","nouns","short","CheckoutConflictError","filepaths","CommitNotFetchedError","FastForwardError","GitPushError","prettyDetails","MaxDepthError","fromBuffer","shaComputed","shaClaimed","magic","numEntries","flags","bits","assumeValid","Boolean","extended","stage","nameLength","pathlength","padding","insert","bfilepath","clear","header","writer","bpath","ceil","written","renderCacheEntryFlags","main","sum","inodes","mkfile","bool","schema","core","filemode","bare","logallrefupdates","symlinks","ignorecase","bigFileThreshold","SECTION_LINE_REGEX","SECTION_REGEX","VARIABLE_LINE_REGEX","VARIABLE_NAME_REGEX","VARIABLE_VALUE_COMMENT_REGEX","removeComments","rawValue","commentMatches","exec","valueWithoutComment","hasOddNumberOfQuotes","removeQuotes","newText","isQuote","isEscapeForQuote","lower","getPath","section","subsection","trimmedLine","extractedSection","extractSectionLine","isSection","extractedVariable","valueWithoutComments","extractVariableLine","allValues","getSubsections","deleteSection","append","configIndex","callback","lastIndex","item","splice","modifiedConfig","modified","sectionPath","sectionIndex","findIndex","newConfig","newSection","rules","rule","remoteRefs","remoteRef","localRef","LINEBREAKS","mergeFile","ourContent","baseContent","theirContent","ourName","baseName","theirName","markerSize","ours","theirs","diff3Merge","mergedText","cleanMerge","ok","conflict","_pack","outputStream","buff","stype","types","listObjects","visited","abbreviateRx","userpass","cachedSetTimeout","cachedClearTimeout","process","defaultSetTimout","defaultClearTimeout","runTimeout","fun","setTimeout","clearTimeout","currentQueue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","run","marker","runClearTimeout","Item","noop","nextTick","title","browser","env","argv","versions","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","umask","_writeTree","_fetch","onMessage","_ref","_remoteRef","_remote","_url","since","relative","singleBranch","getRemoteHelperFor","discover","defaultBranch","fetchHead","fetchHeadDescription","filterCapabilities","wants","haveRefs","haves","hasObject","shallows","packstream","writeUploadPackRequest","packbuffer","connect","parseUploadPackResponse","hasParents","every","unshallows","bail","realRef","updateRemoteRefs","HEAD","FETCH_HEAD","description","lines","splitLines","emptyPackfile","fromPack","copyProps","SafeBuffer","adler","s1","s2","crcTable","table","k","makeTable","utils","STR_APPLY_OK","STR_APPLY_UIA_OK","__","_utf8len","q","buf2binstring","string2buf","c2","m_pos","str_len","buf_len","binstring2buf","buf2string","c_len","utf16buf","utf8border","next_in","avail_in","total_in","output","next_out","avail_out","total_out","msg","state","data_type","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_SYNC_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_BLOCK","Z_TREES","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_ERRNO","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","Z_NO_COMPRESSION","Z_BEST_SPEED","Z_BEST_COMPRESSION","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_RLE","Z_FIXED","Z_DEFAULT_STRATEGY","Z_BINARY","Z_TEXT","Z_UNKNOWN","Z_DEFLATED","firstLineCapabilities","encode","flush","demux","acks","nak","status","mergeTree","ourOid","baseOid","theirOid","ourTree","baseTree","theirTree","mergeBlobs","listCommitsAndTags","finish","startingSet","finishingSet","parents","writeReceivePackRequest","triplets","capsFirstLine","trip","oldoid","fullRef","parseReceivePackResponse","refAndMessage","appendSlashIfDir","indexFile","packFile","CRC32","T","signed_crc_table","bstr","seed","C","L","crc32_buf_8","DO_NOT_EXPORT_CRC","onData","PACK","numObjects","ofs","parseHeader","inflator","Inflate","ended","strm","delta","sourceSize","readVarIntLE","targetSize","firstOp","readOp","readCompactLE","makeArray","subject","REGEX_TEST_BLANK_LINE","REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION","REGEX_REPLACE_LEADING_EXCAPED_HASH","REGEX_SPLITALL_CRLF","REGEX_TEST_INVALID_PATH","KEY_IGNORE","for","REGEX_REGEXP_RANGE","REPLACERS","p1","p2","to","regexCache","isString","IgnoreRule","origin","negative","regex","createRule","prev","current","makeRegex","throwError","Ctor","checkPath","originalPath","doThrow","isNotRelative","convert","Ignore","_rules","_ignorecase","_initCache","_ignoreCache","_testCache","_added","checkPattern","splitPattern","forEach","_addPattern","checkUnignored","slices","_t","_testOne","_test","paths","createFilter","returnFalse","isPathValid","default","IGNORE_TEST_WIN32","platform","makePosix","REGIX_IS_WINDOWS_PATH_ABSOLUTE","onp","diffIndices","file1","file2","tail1","tail2","candidate","diff","compose","ses","getses","file1RevIdx","file2RevIdx","SES_COMMON","chain","file1index","file2index","SES_DELETE","SES_ADD","tail","longestCommonSubsequence","mismatchLength1","mismatchLength2","reverse","indices","m1","m2","hunks","addHunk","side","commonOffset","copyCommon","targetOffset","hunkIndex","firstHunkIndex","hunk","regionLhs","regionRhs","maybeOverlapping","maybeLhs","regions","oLhs","oRhs","abLhs","abRhs","aLhs","aRhs","bLhs","bRhs","diff3MergeIndices","okLines","flushOk","pushOk","xs","isTrueConflict","rec","aoff","boff","aIndex","oIndex","bIndex","blob","ofs_delta","ref_delta","server","client","serverNames","findSplit","queues","domains","domainReentrant","DEFAULT_TIMEOUT","DEFAULT_MAX_PENDING","_acquireBatch","deferredResolve","deferredReject","deferred","resolved","timer","locked","domain","called","_promiseTry","then","taskFn","skipQueue","fnx","getFn","isBusy","g","Function","window","b64","lens","getLens","validLen","placeHoldersLen","Arr","_byteLength","curByte","revLookup","uint8","extraBytes","len2","encodeChunk","lookup","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","NaN","rt","LN2","ctor","superCtor","super_","writable","TempCtor","blockSize","finalSize","_block","_finalSize","_blockSize","_len","block","accum","assigned","remainder","rem","lowBits","highBits","zlib_deflate","strings","ZStream","Deflate","level","chunkSize","windowBits","memLevel","strategy","opt","gzip","deflateInit2","deflateSetHeader","dictionary","dict","deflateSetDictionary","_dict_set","deflator","onEnd","deflateEnd","deflateRaw","configuration_table","adler32","errorCode","rank","zero","flush_pending","pending","pending_buf","pending_out","flush_block_only","_tr_flush_block","block_start","strstart","put_byte","putShortMSB","longest_match","cur_match","chain_length","max_chain_length","scan","best_len","prev_length","nice_match","w_size","_win","wmask","w_mask","strend","scan_end1","scan_end","good_match","lookahead","match_start","fill_window","more","_w_size","window_size","hash_size","head","ins_h","hash_shift","hash_mask","deflate_fast","hash_head","bflush","match_length","_tr_tally","max_lazy_match","MIN_MATCH","last_lit","deflate_slow","max_insert","prev_match","match_available","Config","good_length","max_lazy","nice_length","max_chain","func","DeflateState","pending_buf_size","gzhead","gzindex","last_flush","w_bits","hash_bits","dyn_ltree","HEAP_SIZE","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","bl_count","MAX_BITS","heap","heap_len","heap_max","l_buf","lit_bufsize","d_buf","opt_len","static_len","bi_buf","bi_valid","deflateResetKeep","_tr_init","deflateReset","max_block_size","max_start","deflateInit","old_flush","beg","hcrc","extra","time","os","bstate","deflate_huff","deflate_rle","_tr_align","_tr_stored_block","avail","tmpDict","dictLength","deflateInfo","extra_lbits","extra_dbits","extra_blbits","bl_order","static_ltree","static_dtree","D_CODES","_dist_code","_length_code","MAX_MATCH","base_length","static_l_desc","static_d_desc","static_bl_desc","base_dist","StaticTreeDesc","static_tree","extra_bits","extra_base","elems","max_length","has_stree","TreeDesc","dyn_tree","stat_desc","max_code","d_code","dist","put_short","w","send_bits","send_code","bi_reverse","gen_codes","next_code","init_block","LITERALS","END_BLOCK","bi_windup","smaller","_n2","_m2","pqdownheap","v","compress_block","ltree","dtree","lc","lx","build_tree","desc","node","stree","xbits","overflow","gen_bitlen","scan_tree","curlen","prevlen","nextlen","max_count","min_count","REP_3_6","REPZ_3_10","REPZ_11_138","send_tree","static_init_done","stored_len","copy_block","LENGTH_CODES","L_CODES","tr_static_init","opt_lenb","static_lenb","max_blindex","black_mask","detect_data_type","BL_CODES","build_bl_tree","lcodes","dcodes","blcodes","send_all_trees","STATIC_TREES","bi_flush","zlib_inflate","GZheader","inflateInit2","inflateGetHeader","inflateSetDictionary","next_out_utf8","utf8str","allowBufError","inflateEnd","inflateRaw","ungzip","inflate_fast","inflate_table","zswap32","InflateState","havedict","dmax","check","wbits","wsize","whave","wnext","hold","lencode","distcode","lenbits","distbits","ncode","nlen","ndist","have","work","lendyn","distdyn","sane","back","was","inflateResetKeep","inflateReset","inflateReset2","lenfix","distfix","virgin","fixedtables","sym","updatewindow","inflateInit","put","left","_in","_out","from_source","here_bits","here_op","here_val","last_bits","last_op","last_val","here","hbuf","order","inf_leave","xflags","extra_len","inflateInfo","s_window","lcode","dcode","lmask","dmask","op","top","dolen","dodist","lbase","lext","dbase","dext","lens_index","codes","table_index","incr","low","mask","curr","drop","used","huff","base_index","MAXBITS","offs","extra_index","a_","b_","tmp1","tmp2","ed","pathposi","lcs","seselem","elem","snake","pp","editdistance","getlcs","fp","epc","px_idx","py_idx","recordseq","hashBlob","_object","hashObject","_fs","hasObjectLoose","hasObjectPacked","_addNote","note","noteOid","pheader","_packObjects","GitWalkerIndex","treePromise","STAGE","GitWalkerFs","isFile","isSymbolicLink","_actualSize","entriesMap","WORKDIR","addToIndex","isIgnored","child","_getConfig","normalizeAuthorObject","Date","now","getTimezoneOffset","normalizeCommitterObject","addNote","_author","_committer","_addRemote","cleanGitRef","save","addRemote","_annotatedTag","tagObject","annotatedTag","_tagger","_branch","checkout","writeSymbolicRef","branch","worthWalking","_checkout","noCheckout","noUpdateHead","ops","analyze","conflicts","errors","chmod","workdir","folders","deleteRecursively","filesToDelete","directoriesToDelete","pathsToTraverse","subPath","_clone","noTags","clone","currentBranch","_deleteBranch","deleteRef","deleteBranch","_deleteRemote","deleteRemote","_deleteTag","deleteTag","expandOidLoose","prefix","suffix","expandOidPacked","results","_expandOid","results1","results2","expandOid","expandRef","_findMergeBase","visits","passes","newheads","_merge","fastForwardOnly","baseOids","alreadyMerged","fastForward","mergeCommit","_pull","thisWillNotBeUsed","fetch","findMergeBase","_findRoot","findRoot","getConfig","_getConfigAll","getConfigAll","getRemoteInfo","forPush","part","symref","formatInfoRefs","peelTags","_key","getRemoteInfo2","_indexPack","indexPack","_isDescendent","ancestor","searchdepth","isDescendent","listBranches","_listFiles","filenames","accumulateFilesFromOid","listFiles","_listNotes","listNotes","_listRemotes","remoteNames","listRemotes","parseListRefsResponse","attrs","attr","writeListRefsRequest","delim","listServerRefs","listTags","resolveCommit","_readCommit","commitOid","compareAge","_log","sinceTimestamp","commits","shallowCommits","tips","merge","packObjects","pull","_push","_delete","httpRemote","fullRemoteRef","expandAgainstMap","thinPack","objects","skipObjects","mergebase","packstream1","packstream2","resolveBlob","_readBlob","readBlob","readCommit","_readNote","readNote","_format","_readTag","readTag","readTree","remove","_removeNote","removeNote","_renameBranch","oldref","fulloldref","fullnewref","renameBranch","resetIndex","workdirOid","resolveRef","setConfig","headTree","getHeadTree","getOidAtPath","indexEntry","I","getWorkdirOid","statusMatrix","headType","workdirType","stageType","headOid","stageOid","writeBlob","_writeCommit","writeCommit","symbolic","_writeTag","writeTag","writeTree","Errors"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAa,IAAID,IAEjBD,EAAU,IAAIC,I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S,eACAI,SACAC,iBACAE,YACAI,iBACAO,kBACA3G,cACA6G,aACAlgC,QACAsgC,gBACAC,gBACAI,aACAE,aACAG,eACAM,kBACAC,YACAzuD,OACAmvD,SACAC,eACAC,QACAvpD,QACAqqD,YACAC,cACAE,YACApuC,cACAuuC,WACAC,YACAC,UACAE,cACAK,gBACAC,cACAE,cACAjuB,UACAyuB,gBACA5sD,OACAyb,WACA0J,QACA+nC,aACAE,eACA9/B,iBACAC,YACAggC,YACAC","file":"index.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"git\"] = factory();\n\telse\n\t\troot[\"git\"] = factory();\n})(self, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 153);\n","import { MissingParameterError } from '../errors/MissingParameterError.js'\n\nexport function assertParameter(name, value) {\n if (value === undefined) {\n throw new MissingParameterError(name)\n }\n}\n","export function normalizePath(path) {\n return path\n .replace(/\\/\\.\\//g, '/') // Replace '/./' with '/'\n .replace(/\\/{2,}/g, '/') // Replace consecutive '/'\n .replace(/^\\/\\.$/, '/') // if path === '/.' return '/'\n .replace(/^\\.\\/$/, '.') // if path === './' return '.'\n .replace(/^\\.\\//, '') // Remove leading './'\n .replace(/\\/\\.$/, '') // Remove trailing '/.'\n .replace(/(.+)\\/$/, '$1') // Remove trailing '/'\n .replace(/^$/, '.') // if path === '' return '.'\n}\n","// For some reason path.posix.join is undefined in webpack\n// Also, this is just much smaller\nimport { normalizePath } from './normalizePath.js'\n\nexport function join(...parts) {\n return normalizePath(parts.map(normalizePath).join('/'))\n}\n","import pify from 'pify'\n\nimport { compareStrings } from '../utils/compareStrings.js'\nimport { dirname } from '../utils/dirname.js'\n\n/**\n * This is just a collection of helper functions really. At least that's how it started.\n */\nexport class FileSystem {\n constructor(fs) {\n if (typeof fs._original_unwrapped_fs !== 'undefined') return fs\n\n const promises = Object.getOwnPropertyDescriptor(fs, 'promises')\n if (promises && promises.enumerable) {\n this._readFile = fs.promises.readFile.bind(fs.promises)\n this._writeFile = fs.promises.writeFile.bind(fs.promises)\n this._mkdir = fs.promises.mkdir.bind(fs.promises)\n this._rmdir = fs.promises.rmdir.bind(fs.promises)\n this._unlink = fs.promises.unlink.bind(fs.promises)\n this._stat = fs.promises.stat.bind(fs.promises)\n this._lstat = fs.promises.lstat.bind(fs.promises)\n this._readdir = fs.promises.readdir.bind(fs.promises)\n this._readlink = fs.promises.readlink.bind(fs.promises)\n this._symlink = fs.promises.symlink.bind(fs.promises)\n } else {\n this._readFile = pify(fs.readFile.bind(fs))\n this._writeFile = pify(fs.writeFile.bind(fs))\n this._mkdir = pify(fs.mkdir.bind(fs))\n this._rmdir = pify(fs.rmdir.bind(fs))\n this._unlink = pify(fs.unlink.bind(fs))\n this._stat = pify(fs.stat.bind(fs))\n this._lstat = pify(fs.lstat.bind(fs))\n this._readdir = pify(fs.readdir.bind(fs))\n this._readlink = pify(fs.readlink.bind(fs))\n this._symlink = pify(fs.symlink.bind(fs))\n }\n this._original_unwrapped_fs = fs\n }\n\n /**\n * Return true if a file exists, false if it doesn't exist.\n * Rethrows errors that aren't related to file existance.\n */\n async exists(filepath, options = {}) {\n try {\n await this._stat(filepath)\n return true\n } catch (err) {\n if (err.code === 'ENOENT' || err.code === 'ENOTDIR') {\n return false\n } else {\n console.log('Unhandled error in \"FileSystem.exists()\" function', err)\n throw err\n }\n }\n }\n\n /**\n * Return the contents of a file if it exists, otherwise returns null.\n *\n * @param {string} filepath\n * @param {object} [options]\n *\n * @returns {Promise<Buffer|string|null>}\n */\n async read(filepath, options = {}) {\n try {\n let buffer = await this._readFile(filepath, options)\n // Convert plain ArrayBuffers to Buffers\n if (typeof buffer !== 'string') {\n buffer = Buffer.from(buffer)\n }\n return buffer\n } catch (err) {\n return null\n }\n }\n\n /**\n * Write a file (creating missing directories if need be) without throwing errors.\n *\n * @param {string} filepath\n * @param {Buffer|Uint8Array|string} contents\n * @param {object|string} [options]\n */\n async write(filepath, contents, options = {}) {\n try {\n await this._writeFile(filepath, contents, options)\n return\n } catch (err) {\n // Hmm. Let's try mkdirp and try again.\n await this.mkdir(dirname(filepath))\n await this._writeFile(filepath, contents, options)\n }\n }\n\n /**\n * Make a directory (or series of nested directories) without throwing an error if it already exists.\n */\n async mkdir(filepath, _selfCall = false) {\n try {\n await this._mkdir(filepath)\n return\n } catch (err) {\n // If err is null then operation succeeded!\n if (err === null) return\n // If the directory already exists, that's OK!\n if (err.code === 'EEXIST') return\n // Avoid infinite loops of failure\n if (_selfCall) throw err\n // If we got a \"no such file or directory error\" backup and try again.\n if (err.code === 'ENOENT') {\n const parent = dirname(filepath)\n // Check to see if we've gone too far\n if (parent === '.' || parent === '/' || parent === filepath) throw err\n // Infinite recursion, what could go wrong?\n await this.mkdir(parent)\n await this.mkdir(filepath, true)\n }\n }\n }\n\n /**\n * Delete a file without throwing an error if it is already deleted.\n */\n async rm(filepath) {\n try {\n await this._unlink(filepath)\n } catch (err) {\n if (err.code !== 'ENOENT') throw err\n }\n }\n\n /**\n * Delete a directory without throwing an error if it is already deleted.\n */\n async rmdir(filepath) {\n try {\n await this._rmdir(filepath)\n } catch (err) {\n if (err.code !== 'ENOENT') throw err\n }\n }\n\n /**\n * Read a directory without throwing an error is the directory doesn't exist\n */\n async readdir(filepath) {\n try {\n const names = await this._readdir(filepath)\n // Ordering is not guaranteed, and system specific (Windows vs Unix)\n // so we must sort them ourselves.\n names.sort(compareStrings)\n return names\n } catch (err) {\n if (err.code === 'ENOTDIR') return null\n return []\n }\n }\n\n /**\n * Return a flast list of all the files nested inside a directory\n *\n * Based on an elegant concurrent recursive solution from SO\n * https://stackoverflow.com/a/45130990/2168416\n */\n async readdirDeep(dir) {\n const subdirs = await this._readdir(dir)\n const files = await Promise.all(\n subdirs.map(async subdir => {\n const res = dir + '/' + subdir\n return (await this._stat(res)).isDirectory()\n ? this.readdirDeep(res)\n : res\n })\n )\n return files.reduce((a, f) => a.concat(f), [])\n }\n\n /**\n * Return the Stats of a file/symlink if it exists, otherwise returns null.\n * Rethrows errors that aren't related to file existance.\n */\n async lstat(filename) {\n try {\n const stats = await this._lstat(filename)\n return stats\n } catch (err) {\n if (err.code === 'ENOENT') {\n return null\n }\n throw err\n }\n }\n\n /**\n * Reads the contents of a symlink if it exists, otherwise returns null.\n * Rethrows errors that aren't related to file existance.\n */\n async readlink(filename, opts = { encoding: 'buffer' }) {\n // Note: FileSystem.readlink returns a buffer by default\n // so we can dump it into GitObject.write just like any other file.\n try {\n return this._readlink(filename, opts)\n } catch (err) {\n if (err.code === 'ENOENT') {\n return null\n }\n throw err\n }\n }\n\n /**\n * Write the contents of buffer to a symlink.\n */\n async writelink(filename, buffer) {\n return this._symlink(buffer.toString('utf8'), filename)\n }\n}\n","export class GitPackedRefs {\n constructor(text) {\n this.refs = new Map()\n this.parsedConfig = []\n if (text) {\n let key = null\n this.parsedConfig = text\n .trim()\n .split('\\n')\n .map(line => {\n if (/^\\s*#/.test(line)) {\n return { line, comment: true }\n }\n const i = line.indexOf(' ')\n if (line.startsWith('^')) {\n // This is a oid for the commit associated with the annotated tag immediately preceding this line.\n // Trim off the '^'\n const value = line.slice(1)\n // The tagname^{} syntax is based on the output of `git show-ref --tags -d`\n this.refs.set(key + '^{}', value)\n return { line, ref: key, peeled: value }\n } else {\n // This is an oid followed by the ref name\n const value = line.slice(0, i)\n key = line.slice(i + 1)\n this.refs.set(key, value)\n return { line, ref: key, oid: value }\n }\n })\n }\n return this\n }\n\n static from(text) {\n return new GitPackedRefs(text)\n }\n\n delete(ref) {\n this.parsedConfig = this.parsedConfig.filter(entry => entry.ref !== ref)\n this.refs.delete(ref)\n }\n\n toString() {\n return this.parsedConfig.map(({ line }) => line).join('\\n') + '\\n'\n }\n}\n","export function compareRefNames(a, b) {\n // https://stackoverflow.com/a/40355107/2168416\n const _a = a.replace(/\\^\\{\\}$/, '')\n const _b = b.replace(/\\^\\{\\}$/, '')\n const tmp = -(_a < _b) || +(_a > _b)\n if (tmp === 0) {\n return a.endsWith('^{}') ? 1 : -1\n }\n return tmp\n}\n","// This is a convenience wrapper for reading and writing files in the 'refs' directory.\nimport { InvalidOidError } from '../errors/InvalidOidError.js'\nimport { NoRefspecError } from '../errors/NoRefspecError.js'\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { GitPackedRefs } from '../models/GitPackedRefs.js'\nimport { GitRefSpecSet } from '../models/GitRefSpecSet.js'\nimport { compareRefNames } from '../utils/compareRefNames.js'\nimport { join } from '../utils/join.js'\n\nimport { GitConfigManager } from './GitConfigManager'\n\n// @see https://git-scm.com/docs/git-rev-parse.html#_specifying_revisions\nconst refpaths = ref => [\n `${ref}`,\n `refs/${ref}`,\n `refs/tags/${ref}`,\n `refs/heads/${ref}`,\n `refs/remotes/${ref}`,\n `refs/remotes/${ref}/HEAD`,\n]\n\n// @see https://git-scm.com/docs/gitrepository-layout\nconst GIT_FILES = ['config', 'description', 'index', 'shallow', 'commondir']\n\nexport class GitRefManager {\n static async updateRemoteRefs({\n fs,\n gitdir,\n remote,\n refs,\n symrefs,\n tags,\n refspecs = undefined,\n prune = false,\n pruneTags = false,\n }) {\n // Validate input\n for (const value of refs.values()) {\n if (!value.match(/[0-9a-f]{40}/)) {\n throw new InvalidOidError(value)\n }\n }\n const config = await GitConfigManager.get({ fs, gitdir })\n if (!refspecs) {\n refspecs = await config.getall(`remote.${remote}.fetch`)\n if (refspecs.length === 0) {\n throw new NoRefspecError(remote)\n }\n // There's some interesting behavior with HEAD that doesn't follow the refspec.\n refspecs.unshift(`+HEAD:refs/remotes/${remote}/HEAD`)\n }\n const refspec = GitRefSpecSet.from(refspecs)\n const actualRefsToWrite = new Map()\n // Delete all current tags if the pruneTags argument is true.\n if (pruneTags) {\n const tags = await GitRefManager.listRefs({\n fs,\n gitdir,\n filepath: 'refs/tags',\n })\n await GitRefManager.deleteRefs({\n fs,\n gitdir,\n refs: tags.map(tag => `refs/tags/${tag}`),\n })\n }\n // Add all tags if the fetch tags argument is true.\n if (tags) {\n for (const serverRef of refs.keys()) {\n if (serverRef.startsWith('refs/tags') && !serverRef.endsWith('^{}')) {\n // Git's behavior is to only fetch tags that do not conflict with tags already present.\n if (!(await GitRefManager.exists({ fs, gitdir, ref: serverRef }))) {\n // If there is a dereferenced an annotated tag value available, prefer that.\n const oid = refs.get(serverRef + '^{}') || refs.get(serverRef)\n actualRefsToWrite.set(serverRef, oid)\n }\n }\n }\n }\n // Combine refs and symrefs giving symrefs priority\n const refTranslations = refspec.translate([...refs.keys()])\n for (const [serverRef, translatedRef] of refTranslations) {\n const value = refs.get(serverRef)\n actualRefsToWrite.set(translatedRef, value)\n }\n const symrefTranslations = refspec.translate([...symrefs.keys()])\n for (const [serverRef, translatedRef] of symrefTranslations) {\n const value = symrefs.get(serverRef)\n const symtarget = refspec.translateOne(value)\n if (symtarget) {\n actualRefsToWrite.set(translatedRef, `ref: ${symtarget}`)\n }\n }\n // If `prune` argument is true, clear out the existing local refspec roots\n const pruned = []\n if (prune) {\n for (const filepath of refspec.localNamespaces()) {\n const refs = (\n await GitRefManager.listRefs({\n fs,\n gitdir,\n filepath,\n })\n ).map(file => `${filepath}/${file}`)\n for (const ref of refs) {\n if (!actualRefsToWrite.has(ref)) {\n pruned.push(ref)\n }\n }\n }\n if (pruned.length > 0) {\n await GitRefManager.deleteRefs({ fs, gitdir, refs: pruned })\n }\n }\n // Update files\n // TODO: For large repos with a history of thousands of pull requests\n // (i.e. gitlab-ce) it would be vastly more efficient to write them\n // to .git/packed-refs.\n // The trick is to make sure we a) don't write a packed ref that is\n // already shadowed by a loose ref and b) don't loose any refs already\n // in packed-refs. Doing this efficiently may be difficult. A\n // solution that might work is\n // a) load the current packed-refs file\n // b) add actualRefsToWrite, overriding the existing values if present\n // c) enumerate all the loose refs currently in .git/refs/remotes/${remote}\n // d) overwrite their value with the new value.\n // Examples of refs we need to avoid writing in loose format for efficieny's sake\n // are .git/refs/remotes/origin/refs/remotes/remote_mirror_3059\n // and .git/refs/remotes/origin/refs/merge-requests\n for (const [key, value] of actualRefsToWrite) {\n await fs.write(join(gitdir, key), `${value.trim()}\\n`, 'utf8')\n }\n return { pruned }\n }\n\n // TODO: make this less crude?\n static async writeRef({ fs, gitdir, ref, value }) {\n // Validate input\n if (!value.match(/[0-9a-f]{40}/)) {\n throw new InvalidOidError(value)\n }\n await fs.write(join(gitdir, ref), `${value.trim()}\\n`, 'utf8')\n }\n\n static async writeSymbolicRef({ fs, gitdir, ref, value }) {\n await fs.write(join(gitdir, ref), 'ref: ' + `${value.trim()}\\n`, 'utf8')\n }\n\n static async deleteRef({ fs, gitdir, ref }) {\n return GitRefManager.deleteRefs({ fs, gitdir, refs: [ref] })\n }\n\n static async deleteRefs({ fs, gitdir, refs }) {\n // Delete regular ref\n await Promise.all(refs.map(ref => fs.rm(join(gitdir, ref))))\n // Delete any packed ref\n let text = await fs.read(`${gitdir}/packed-refs`, { encoding: 'utf8' })\n const packed = GitPackedRefs.from(text)\n const beforeSize = packed.refs.size\n for (const ref of refs) {\n if (packed.refs.has(ref)) {\n packed.delete(ref)\n }\n }\n if (packed.refs.size < beforeSize) {\n text = packed.toString()\n await fs.write(`${gitdir}/packed-refs`, text, { encoding: 'utf8' })\n }\n }\n\n /**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {string} args.ref\n * @param {number} [args.depth]\n * @returns {Promise<string>}\n */\n static async resolve({ fs, gitdir, ref, depth = undefined }) {\n if (depth !== undefined) {\n depth--\n if (depth === -1) {\n return ref\n }\n }\n let sha\n // Is it a ref pointer?\n if (ref.startsWith('ref: ')) {\n ref = ref.slice('ref: '.length)\n return GitRefManager.resolve({ fs, gitdir, ref, depth })\n }\n // Is it a complete and valid SHA?\n if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) {\n return ref\n }\n // We need to alternate between the file system and the packed-refs\n const packedMap = await GitRefManager.packedRefs({ fs, gitdir })\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref).filter(p => !GIT_FILES.includes(p)) // exclude git system files (#709)\n\n for (const ref of allpaths) {\n sha =\n (await fs.read(`${gitdir}/${ref}`, { encoding: 'utf8' })) ||\n packedMap.get(ref)\n if (sha) {\n return GitRefManager.resolve({ fs, gitdir, ref: sha.trim(), depth })\n }\n }\n // Do we give up?\n throw new NotFoundError(ref)\n }\n\n static async exists({ fs, gitdir, ref }) {\n try {\n await GitRefManager.expand({ fs, gitdir, ref })\n return true\n } catch (err) {\n return false\n }\n }\n\n static async expand({ fs, gitdir, ref }) {\n // Is it a complete and valid SHA?\n if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) {\n return ref\n }\n // We need to alternate between the file system and the packed-refs\n const packedMap = await GitRefManager.packedRefs({ fs, gitdir })\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref)\n for (const ref of allpaths) {\n if (await fs.exists(`${gitdir}/${ref}`)) return ref\n if (packedMap.has(ref)) return ref\n }\n // Do we give up?\n throw new NotFoundError(ref)\n }\n\n static async expandAgainstMap({ ref, map }) {\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref)\n for (const ref of allpaths) {\n if (await map.has(ref)) return ref\n }\n // Do we give up?\n throw new NotFoundError(ref)\n }\n\n static resolveAgainstMap({ ref, fullref = ref, depth = undefined, map }) {\n if (depth !== undefined) {\n depth--\n if (depth === -1) {\n return { fullref, oid: ref }\n }\n }\n // Is it a ref pointer?\n if (ref.startsWith('ref: ')) {\n ref = ref.slice('ref: '.length)\n return GitRefManager.resolveAgainstMap({ ref, fullref, depth, map })\n }\n // Is it a complete and valid SHA?\n if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) {\n return { fullref, oid: ref }\n }\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref)\n for (const ref of allpaths) {\n const sha = map.get(ref)\n if (sha) {\n return GitRefManager.resolveAgainstMap({\n ref: sha.trim(),\n fullref: ref,\n depth,\n map,\n })\n }\n }\n // Do we give up?\n throw new NotFoundError(ref)\n }\n\n static async packedRefs({ fs, gitdir }) {\n const text = await fs.read(`${gitdir}/packed-refs`, { encoding: 'utf8' })\n const packed = GitPackedRefs.from(text)\n return packed.refs\n }\n\n // List all the refs that match the `filepath` prefix\n static async listRefs({ fs, gitdir, filepath }) {\n const packedMap = GitRefManager.packedRefs({ fs, gitdir })\n let files = null\n try {\n files = await fs.readdirDeep(`${gitdir}/${filepath}`)\n files = files.map(x => x.replace(`${gitdir}/${filepath}/`, ''))\n } catch (err) {\n files = []\n }\n\n for (let key of (await packedMap).keys()) {\n // filter by prefix\n if (key.startsWith(filepath)) {\n // remove prefix\n key = key.replace(filepath + '/', '')\n // Don't include duplicates; the loose files have precedence anyway\n if (!files.includes(key)) {\n files.push(key)\n }\n }\n }\n // since we just appended things onto an array, we need to sort them now\n files.sort(compareRefNames)\n return files\n }\n\n static async listBranches({ fs, gitdir, remote }) {\n if (remote) {\n return GitRefManager.listRefs({\n fs,\n gitdir,\n filepath: `refs/remotes/${remote}`,\n })\n } else {\n return GitRefManager.listRefs({ fs, gitdir, filepath: `refs/heads` })\n }\n }\n\n static async listTags({ fs, gitdir }) {\n const tags = await GitRefManager.listRefs({\n fs,\n gitdir,\n filepath: `refs/tags`,\n })\n return tags.filter(x => !x.endsWith('^{}'))\n }\n}\n","export class BaseError extends Error {\n constructor(message) {\n super(message)\n // Setting this here allows TS to infer that all git errors have a `caller` property and\n // that its type is string.\n this.caller = ''\n }\n\n toJSON() {\n // Error objects aren't normally serializable. So we do something about that.\n return {\n code: this.code,\n data: this.data,\n caller: this.caller,\n message: this.message,\n stack: this.stack,\n }\n }\n\n fromJSON(json) {\n const e = new BaseError(json.message)\n e.code = json.code\n e.data = json.data\n e.caller = json.caller\n e.stack = json.stack\n return e\n }\n\n get isIsomorphicGitError() {\n return true\n }\n}\n","import { BaseError } from './BaseError.js'\n\nexport class InternalError extends BaseError {\n /**\n * @param {string} message\n */\n constructor(message) {\n super(\n `An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${message}`\n )\n this.code = this.name = InternalError.code\n this.data = { message }\n }\n}\n/** @type {'InternalError'} */\nInternalError.code = 'InternalError'\n","import { InternalError } from '../errors/InternalError.js'\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { GitObject } from '../models/GitObject.js'\nimport { readObjectLoose } from '../storage/readObjectLoose.js'\nimport { readObjectPacked } from '../storage/readObjectPacked.js'\nimport { inflate } from '../utils/inflate.js'\nimport { shasum } from '../utils/shasum.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} args.gitdir\n * @param {string} args.oid\n * @param {string} [args.format]\n */\nexport async function _readObject({\n fs,\n cache,\n gitdir,\n oid,\n format = 'content',\n}) {\n // Curry the current read method so that the packfile un-deltification\n // process can acquire external ref-deltas.\n const getExternalRefDelta = oid => _readObject({ fs, cache, gitdir, oid })\n\n let result\n // Empty tree - hard-coded so we can use it as a shorthand.\n // Note: I think the canonical git implementation must do this too because\n // `git cat-file -t 4b825dc642cb6eb9a060e54bf8d69288fbee4904` prints \"tree\" even in empty repos.\n if (oid === '4b825dc642cb6eb9a060e54bf8d69288fbee4904') {\n result = { format: 'wrapped', object: Buffer.from(`tree 0\\x00`) }\n }\n // Look for it in the loose object directory.\n if (!result) {\n result = await readObjectLoose({ fs, gitdir, oid })\n }\n // Check to see if it's in a packfile.\n if (!result) {\n result = await readObjectPacked({\n fs,\n cache,\n gitdir,\n oid,\n getExternalRefDelta,\n })\n }\n // Finally\n if (!result) {\n throw new NotFoundError(oid)\n }\n\n if (format === 'deflated') {\n return result\n }\n\n if (result.format === 'deflated') {\n result.object = Buffer.from(await inflate(result.object))\n result.format = 'wrapped'\n }\n\n if (result.format === 'wrapped') {\n if (format === 'wrapped' && result.format === 'wrapped') {\n return result\n }\n const sha = await shasum(result.object)\n if (sha !== oid) {\n throw new InternalError(\n `SHA check failed! Expected ${oid}, computed ${sha}`\n )\n }\n const { object, type } = GitObject.unwrap(result.object)\n result.type = type\n result.object = object\n result.format = 'content'\n }\n\n if (result.format === 'content') {\n if (format === 'content') return result\n return\n }\n\n throw new InternalError(`invalid format \"${result.format}\"`)\n}\n","/**\npkt-line Format\n---------------\n\nMuch (but not all) of the payload is described around pkt-lines.\n\nA pkt-line is a variable length binary string. The first four bytes\nof the line, the pkt-len, indicates the total length of the line,\nin hexadecimal. The pkt-len includes the 4 bytes used to contain\nthe length's hexadecimal representation.\n\nA pkt-line MAY contain binary data, so implementors MUST ensure\npkt-line parsing/formatting routines are 8-bit clean.\n\nA non-binary line SHOULD BE terminated by an LF, which if present\nMUST be included in the total length. Receivers MUST treat pkt-lines\nwith non-binary data the same whether or not they contain the trailing\nLF (stripping the LF if present, and not complaining when it is\nmissing).\n\nThe maximum length of a pkt-line's data component is 65516 bytes.\nImplementations MUST NOT send pkt-line whose length exceeds 65520\n(65516 bytes of payload + 4 bytes of length data).\n\nImplementations SHOULD NOT send an empty pkt-line (\"0004\").\n\nA pkt-line with a length field of 0 (\"0000\"), called a flush-pkt,\nis a special case and MUST be handled differently than an empty\npkt-line (\"0004\").\n\n----\n pkt-line = data-pkt / flush-pkt\n\n data-pkt = pkt-len pkt-payload\n pkt-len = 4*(HEXDIG)\n pkt-payload = (pkt-len - 4)*(OCTET)\n\n flush-pkt = \"0000\"\n----\n\nExamples (as C-style strings):\n\n----\n pkt-line actual value\n ---------------------------------\n \"0006a\\n\" \"a\\n\"\n \"0005a\" \"a\"\n \"000bfoobar\\n\" \"foobar\\n\"\n \"0004\" \"\"\n----\n*/\nimport { StreamReader } from '../utils/StreamReader.js'\nimport { padHex } from '../utils/padHex.js'\n\n// I'm really using this more as a namespace.\n// There's not a lot of \"state\" in a pkt-line\n\nexport class GitPktLine {\n static flush() {\n return Buffer.from('0000', 'utf8')\n }\n\n static delim() {\n return Buffer.from('0001', 'utf8')\n }\n\n static encode(line) {\n if (typeof line === 'string') {\n line = Buffer.from(line)\n }\n const length = line.length + 4\n const hexlength = padHex(4, length)\n return Buffer.concat([Buffer.from(hexlength, 'utf8'), line])\n }\n\n static streamReader(stream) {\n const reader = new StreamReader(stream)\n return async function read() {\n try {\n let length = await reader.read(4)\n if (length == null) return true\n length = parseInt(length.toString('utf8'), 16)\n if (length === 0) return null\n if (length === 1) return null // delim packets\n const buffer = await reader.read(length - 4)\n if (buffer == null) return true\n return buffer\n } catch (err) {\n console.log('error', err)\n return true\n }\n }\n }\n}\n","import { BaseError } from './BaseError.js'\n\nexport class NotFoundError extends BaseError {\n /**\n * @param {string} what\n */\n constructor(what) {\n super(`Could not find ${what}.`)\n this.code = this.name = NotFoundError.code\n this.data = { what }\n }\n}\n/** @type {'NotFoundError'} */\nNotFoundError.code = 'NotFoundError'\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <http://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { UnsafeFilepathError } from '../errors/UnsafeFilepathError.js'\nimport { comparePath } from '../utils/comparePath.js'\nimport { compareTreeEntryPath } from '../utils/compareTreeEntryPath.js'\n\n/**\n *\n * @typedef {Object} TreeEntry\n * @property {string} mode - the 6 digit hexadecimal mode\n * @property {string} path - the name of the file or directory\n * @property {string} oid - the SHA-1 object id of the blob or tree\n * @property {'commit'|'blob'|'tree'} type - the type of object\n */\n\nfunction mode2type(mode) {\n // prettier-ignore\n switch (mode) {\n case '040000': return 'tree'\n case '100644': return 'blob'\n case '100755': return 'blob'\n case '120000': return 'blob'\n case '160000': return 'commit'\n }\n throw new InternalError(`Unexpected GitTree entry mode: ${mode}`)\n}\n\nfunction parseBuffer(buffer) {\n const _entries = []\n let cursor = 0\n while (cursor < buffer.length) {\n const space = buffer.indexOf(32, cursor)\n if (space === -1) {\n throw new InternalError(\n `GitTree: Error parsing buffer at byte location ${cursor}: Could not find the next space character.`\n )\n }\n const nullchar = buffer.indexOf(0, cursor)\n if (nullchar === -1) {\n throw new InternalError(\n `GitTree: Error parsing buffer at byte location ${cursor}: Could not find the next null character.`\n )\n }\n let mode = buffer.slice(cursor, space).toString('utf8')\n if (mode === '40000') mode = '040000' // makes it line up neater in printed output\n const type = mode2type(mode)\n const path = buffer.slice(space + 1, nullchar).toString('utf8')\n\n // Prevent malicious git repos from writing to \"..\\foo\" on clone etc\n if (path.includes('\\\\') || path.includes('/')) {\n throw new UnsafeFilepathError(path)\n }\n\n const oid = buffer.slice(nullchar + 1, nullchar + 21).toString('hex')\n cursor = nullchar + 21\n _entries.push({ mode, path, oid, type })\n }\n return _entries\n}\n\nfunction limitModeToAllowed(mode) {\n if (typeof mode === 'number') {\n mode = mode.toString(8)\n }\n // tree\n if (mode.match(/^0?4.*/)) return '040000' // Directory\n if (mode.match(/^1006.*/)) return '100644' // Regular non-executable file\n if (mode.match(/^1007.*/)) return '100755' // Regular executable file\n if (mode.match(/^120.*/)) return '120000' // Symbolic link\n if (mode.match(/^160.*/)) return '160000' // Commit (git submodule reference)\n throw new InternalError(`Could not understand file mode: ${mode}`)\n}\n\nfunction nudgeIntoShape(entry) {\n if (!entry.oid && entry.sha) {\n entry.oid = entry.sha // Github\n }\n entry.mode = limitModeToAllowed(entry.mode) // index\n if (!entry.type) {\n entry.type = mode2type(entry.mode) // index\n }\n return entry\n}\n\nexport class GitTree {\n constructor(entries) {\n if (Buffer.isBuffer(entries)) {\n this._entries = parseBuffer(entries)\n } else if (Array.isArray(entries)) {\n this._entries = entries.map(nudgeIntoShape)\n } else {\n throw new InternalError('invalid type passed to GitTree constructor')\n }\n // Tree entries are not sorted alphabetically in the usual sense (see `compareTreeEntryPath`)\n // but it is important later on that these be sorted in the same order as they would be returned from readdir.\n this._entries.sort(comparePath)\n }\n\n static from(tree) {\n return new GitTree(tree)\n }\n\n render() {\n return this._entries\n .map(entry => `${entry.mode} ${entry.type} ${entry.oid} ${entry.path}`)\n .join('\\n')\n }\n\n toObject() {\n // Adjust the sort order to match git's\n const entries = [...this._entries]\n entries.sort(compareTreeEntryPath)\n return Buffer.concat(\n entries.map(entry => {\n const mode = Buffer.from(entry.mode.replace(/^0/, ''))\n const space = Buffer.from(' ')\n const path = Buffer.from(entry.path, 'utf8')\n const nullchar = Buffer.from([0])\n const oid = Buffer.from(entry.oid, 'hex')\n return Buffer.concat([mode, space, path, nullchar, oid])\n })\n )\n }\n\n /**\n * @returns {TreeEntry[]}\n */\n entries() {\n return this._entries\n }\n\n *[Symbol.iterator]() {\n for (const entry of this._entries) {\n yield entry\n }\n }\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { formatAuthor } from '../utils/formatAuthor.js'\nimport { indent } from '../utils/indent.js'\nimport { normalizeNewlines } from '../utils/normalizeNewlines.js'\nimport { outdent } from '../utils/outdent.js'\nimport { parseAuthor } from '../utils/parseAuthor.js'\n\nexport class GitCommit {\n constructor(commit) {\n if (typeof commit === 'string') {\n this._commit = commit\n } else if (Buffer.isBuffer(commit)) {\n this._commit = commit.toString('utf8')\n } else if (typeof commit === 'object') {\n this._commit = GitCommit.render(commit)\n } else {\n throw new InternalError('invalid type passed to GitCommit constructor')\n }\n }\n\n static fromPayloadSignature({ payload, signature }) {\n const headers = GitCommit.justHeaders(payload)\n const message = GitCommit.justMessage(payload)\n const commit = normalizeNewlines(\n headers + '\\ngpgsig' + indent(signature) + '\\n' + message\n )\n return new GitCommit(commit)\n }\n\n static from(commit) {\n return new GitCommit(commit)\n }\n\n toObject() {\n return Buffer.from(this._commit, 'utf8')\n }\n\n // Todo: allow setting the headers and message\n headers() {\n return this.parseHeaders()\n }\n\n // Todo: allow setting the headers and message\n message() {\n return GitCommit.justMessage(this._commit)\n }\n\n parse() {\n return Object.assign({ message: this.message() }, this.headers())\n }\n\n static justMessage(commit) {\n return normalizeNewlines(commit.slice(commit.indexOf('\\n\\n') + 2))\n }\n\n static justHeaders(commit) {\n return commit.slice(0, commit.indexOf('\\n\\n'))\n }\n\n parseHeaders() {\n const headers = GitCommit.justHeaders(this._commit).split('\\n')\n const hs = []\n for (const h of headers) {\n if (h[0] === ' ') {\n // combine with previous header (without space indent)\n hs[hs.length - 1] += '\\n' + h.slice(1)\n } else {\n hs.push(h)\n }\n }\n const obj = {\n parent: [],\n }\n for (const h of hs) {\n const key = h.slice(0, h.indexOf(' '))\n const value = h.slice(h.indexOf(' ') + 1)\n if (Array.isArray(obj[key])) {\n obj[key].push(value)\n } else {\n obj[key] = value\n }\n }\n if (obj.author) {\n obj.author = parseAuthor(obj.author)\n }\n if (obj.committer) {\n obj.committer = parseAuthor(obj.committer)\n }\n return obj\n }\n\n static renderHeaders(obj) {\n let headers = ''\n if (obj.tree) {\n headers += `tree ${obj.tree}\\n`\n } else {\n headers += `tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\\n` // the null tree\n }\n if (obj.parent) {\n if (obj.parent.length === undefined) {\n throw new InternalError(`commit 'parent' property should be an array`)\n }\n for (const p of obj.parent) {\n headers += `parent ${p}\\n`\n }\n }\n const author = obj.author\n headers += `author ${formatAuthor(author)}\\n`\n const committer = obj.committer || obj.author\n headers += `committer ${formatAuthor(committer)}\\n`\n if (obj.gpgsig) {\n headers += 'gpgsig' + indent(obj.gpgsig)\n }\n return headers\n }\n\n static render(obj) {\n return GitCommit.renderHeaders(obj) + '\\n' + normalizeNewlines(obj.message)\n }\n\n render() {\n return this._commit\n }\n\n withoutSignature() {\n const commit = normalizeNewlines(this._commit)\n if (commit.indexOf('\\ngpgsig') === -1) return commit\n const headers = commit.slice(0, commit.indexOf('\\ngpgsig'))\n const message = commit.slice(\n commit.indexOf('-----END PGP SIGNATURE-----\\n') +\n '-----END PGP SIGNATURE-----\\n'.length\n )\n return normalizeNewlines(headers + '\\n' + message)\n }\n\n isolateSignature() {\n const signature = this._commit.slice(\n this._commit.indexOf('-----BEGIN PGP SIGNATURE-----'),\n this._commit.indexOf('-----END PGP SIGNATURE-----') +\n '-----END PGP SIGNATURE-----'.length\n )\n return outdent(signature)\n }\n\n static async sign(commit, sign, secretKey) {\n const payload = commit.withoutSignature()\n const message = GitCommit.justMessage(commit._commit)\n let { signature } = await sign({ payload, secretKey })\n // renormalize the line endings to the one true line-ending\n signature = normalizeNewlines(signature)\n const headers = GitCommit.justHeaders(commit._commit)\n const signedCommit =\n headers + '\\n' + 'gpgsig' + indent(signature) + '\\n' + message\n // return a new commit object\n return GitCommit.from(signedCommit)\n }\n}\n","import { GitConfig } from '../models/GitConfig.js'\n\nexport class GitConfigManager {\n static async get({ fs, gitdir }) {\n // We can improve efficiency later if needed.\n // TODO: read from full list of git config files\n const text = await fs.read(`${gitdir}/config`, { encoding: 'utf8' })\n return GitConfig.from(text)\n }\n\n static async save({ fs, gitdir, config }) {\n // We can improve efficiency later if needed.\n // TODO: handle saving to the correct global/user/repo location\n await fs.write(`${gitdir}/config`, config.toString(), {\n encoding: 'utf8',\n })\n }\n}\n","import { BaseError } from './BaseError.js'\n\nexport class ObjectTypeError extends BaseError {\n /**\n * @param {string} oid\n * @param {'blob'|'commit'|'tag'|'tree'} actual\n * @param {'blob'|'commit'|'tag'|'tree'} expected\n * @param {string} [filepath]\n */\n constructor(oid, actual, expected, filepath) {\n super(\n `Object ${oid} ${\n filepath ? `at ${filepath}` : ''\n }was anticipated to be a ${expected} but it is a ${actual}.`\n )\n this.code = this.name = ObjectTypeError.code\n this.data = { oid, actual, expected, filepath }\n }\n}\n/** @type {'ObjectTypeError'} */\nObjectTypeError.code = 'ObjectTypeError'\n","import { InternalError } from '../errors/InternalError.js'\nimport { formatAuthor } from '../utils/formatAuthor.js'\nimport { normalizeNewlines } from '../utils/normalizeNewlines.js'\nimport { parseAuthor } from '../utils/parseAuthor.js'\n\nexport class GitAnnotatedTag {\n constructor(tag) {\n if (typeof tag === 'string') {\n this._tag = tag\n } else if (Buffer.isBuffer(tag)) {\n this._tag = tag.toString('utf8')\n } else if (typeof tag === 'object') {\n this._tag = GitAnnotatedTag.render(tag)\n } else {\n throw new InternalError(\n 'invalid type passed to GitAnnotatedTag constructor'\n )\n }\n }\n\n static from(tag) {\n return new GitAnnotatedTag(tag)\n }\n\n static render(obj) {\n return `object ${obj.object}\ntype ${obj.type}\ntag ${obj.tag}\ntagger ${formatAuthor(obj.tagger)}\n\n${obj.message}\n${obj.gpgsig ? obj.gpgsig : ''}`\n }\n\n justHeaders() {\n return this._tag.slice(0, this._tag.indexOf('\\n\\n'))\n }\n\n message() {\n const tag = this.withoutSignature()\n return tag.slice(tag.indexOf('\\n\\n') + 2)\n }\n\n parse() {\n return Object.assign(this.headers(), {\n message: this.message(),\n gpgsig: this.gpgsig(),\n })\n }\n\n render() {\n return this._tag\n }\n\n headers() {\n const headers = this.justHeaders().split('\\n')\n const hs = []\n for (const h of headers) {\n if (h[0] === ' ') {\n // combine with previous header (without space indent)\n hs[hs.length - 1] += '\\n' + h.slice(1)\n } else {\n hs.push(h)\n }\n }\n const obj = {}\n for (const h of hs) {\n const key = h.slice(0, h.indexOf(' '))\n const value = h.slice(h.indexOf(' ') + 1)\n if (Array.isArray(obj[key])) {\n obj[key].push(value)\n } else {\n obj[key] = value\n }\n }\n if (obj.tagger) {\n obj.tagger = parseAuthor(obj.tagger)\n }\n if (obj.committer) {\n obj.committer = parseAuthor(obj.committer)\n }\n return obj\n }\n\n withoutSignature() {\n const tag = normalizeNewlines(this._tag)\n if (tag.indexOf('\\n-----BEGIN PGP SIGNATURE-----') === -1) return tag\n return tag.slice(0, tag.lastIndexOf('\\n-----BEGIN PGP SIGNATURE-----'))\n }\n\n gpgsig() {\n if (this._tag.indexOf('\\n-----BEGIN PGP SIGNATURE-----') === -1) return\n const signature = this._tag.slice(\n this._tag.indexOf('-----BEGIN PGP SIGNATURE-----'),\n this._tag.indexOf('-----END PGP SIGNATURE-----') +\n '-----END PGP SIGNATURE-----'.length\n )\n return normalizeNewlines(signature)\n }\n\n payload() {\n return this.withoutSignature() + '\\n'\n }\n\n toObject() {\n return Buffer.from(this._tag, 'utf8')\n }\n\n static async sign(tag, sign, secretKey) {\n const payload = tag.payload()\n let { signature } = await sign({ payload, secretKey })\n // renormalize the line endings to the one true line-ending\n signature = normalizeNewlines(signature)\n const signedTag = payload + signature\n // return a new tag object\n return GitAnnotatedTag.from(signedTag)\n }\n}\n","export function toHex(buffer) {\n let hex = ''\n for (const byte of new Uint8Array(buffer)) {\n if (byte < 16) hex += '0'\n hex += byte.toString(16)\n }\n return hex\n}\n","/* eslint-env node, browser */\nimport Hash from 'sha.js/sha1.js'\n\nimport { toHex } from './toHex.js'\n\nlet supportsSubtleSHA1 = null\n\nexport async function shasum(buffer) {\n if (supportsSubtleSHA1 === null) {\n supportsSubtleSHA1 = await testSubtleSHA1()\n }\n return supportsSubtleSHA1 ? subtleSHA1(buffer) : shasumSync(buffer)\n}\n\n// This is modeled after @dominictarr's \"shasum\" module,\n// but without the 'json-stable-stringify' dependency and\n// extra type-casting features.\nfunction shasumSync(buffer) {\n return new Hash().update(buffer).digest('hex')\n}\n\nasync function subtleSHA1(buffer) {\n const hash = await crypto.subtle.digest('SHA-1', buffer)\n return toHex(hash)\n}\n\nasync function testSubtleSHA1() {\n // I'm using a rather crude method of progressive enhancement, because\n // some browsers that have crypto.subtle.digest don't actually implement SHA-1.\n try {\n const hash = await subtleSHA1(new Uint8Array([]))\n if (hash === 'da39a3ee5e6b4b0d3255bfef95601890afd80709') return true\n } catch (_) {\n // no bother\n }\n return false\n}\n","import { GitObject } from '../models/GitObject.js'\nimport { writeObjectLoose } from '../storage/writeObjectLoose.js'\nimport { deflate } from '../utils/deflate.js'\nimport { shasum } from '../utils/shasum.js'\n\nexport async function _writeObject({\n fs,\n gitdir,\n type,\n object,\n format = 'content',\n oid = undefined,\n dryRun = false,\n}) {\n if (format !== 'deflated') {\n if (format !== 'wrapped') {\n object = GitObject.wrap({ type, object })\n }\n oid = await shasum(object)\n object = Buffer.from(await deflate(object))\n }\n if (!dryRun) {\n await writeObjectLoose({ fs, gitdir, object, format: 'deflated', oid })\n }\n return oid\n}\n","// Modeled after https://github.com/tjfontaine/node-buffercursor\n// but with the goal of being much lighter weight.\nexport class BufferCursor {\n constructor(buffer) {\n this.buffer = buffer\n this._start = 0\n }\n\n eof() {\n return this._start >= this.buffer.length\n }\n\n tell() {\n return this._start\n }\n\n seek(n) {\n this._start = n\n }\n\n slice(n) {\n const r = this.buffer.slice(this._start, this._start + n)\n this._start += n\n return r\n }\n\n toString(enc, length) {\n const r = this.buffer.toString(enc, this._start, this._start + length)\n this._start += length\n return r\n }\n\n write(value, length, enc) {\n const r = this.buffer.write(value, this._start, length, enc)\n this._start += length\n return r\n }\n\n copy(source, start, end) {\n const r = source.copy(this.buffer, this._start, start, end)\n this._start += r\n return r\n }\n\n readUInt8() {\n const r = this.buffer.readUInt8(this._start)\n this._start += 1\n return r\n }\n\n writeUInt8(value) {\n const r = this.buffer.writeUInt8(value, this._start)\n this._start += 1\n return r\n }\n\n readUInt16BE() {\n const r = this.buffer.readUInt16BE(this._start)\n this._start += 2\n return r\n }\n\n writeUInt16BE(value) {\n const r = this.buffer.writeUInt16BE(value, this._start)\n this._start += 2\n return r\n }\n\n readUInt32BE() {\n const r = this.buffer.readUInt32BE(this._start)\n this._start += 4\n return r\n }\n\n writeUInt32BE(value) {\n const r = this.buffer.writeUInt32BE(value, this._start)\n this._start += 4\n return r\n }\n}\n","// import LockManager from 'travix-lock-manager'\nimport AsyncLock from 'async-lock'\n\nimport { GitIndex } from '../models/GitIndex.js'\nimport { compareStats } from '../utils/compareStats.js'\n\n// import Lock from '../utils.js'\n\n// const lm = new LockManager()\nlet lock = null\n\nconst IndexCache = Symbol('IndexCache')\n\nfunction createCache() {\n return {\n map: new Map(),\n stats: new Map(),\n }\n}\n\nasync function updateCachedIndexFile(fs, filepath, cache) {\n const stat = await fs.lstat(filepath)\n const rawIndexFile = await fs.read(filepath)\n const index = await GitIndex.from(rawIndexFile)\n // cache the GitIndex object so we don't need to re-read it every time.\n cache.map.set(filepath, index)\n // Save the stat data for the index so we know whether the cached file is stale (modified by an outside process).\n cache.stats.set(filepath, stat)\n}\n\n// Determine whether our copy of the index file is stale\nasync function isIndexStale(fs, filepath, cache) {\n const savedStats = cache.stats.get(filepath)\n if (savedStats === undefined) return true\n const currStats = await fs.lstat(filepath)\n if (savedStats === null) return false\n if (currStats === null) return false\n return compareStats(savedStats, currStats)\n}\n\nexport class GitIndexManager {\n /**\n *\n * @param {object} opts\n * @param {import('../models/FileSystem.js').FileSystem} opts.fs\n * @param {string} opts.gitdir\n * @param {object} opts.cache\n * @param {function(GitIndex): any} closure\n */\n static async acquire({ fs, gitdir, cache }, closure) {\n if (!cache[IndexCache]) cache[IndexCache] = createCache()\n\n const filepath = `${gitdir}/index`\n if (lock === null) lock = new AsyncLock({ maxPending: Infinity })\n let result\n await lock.acquire(filepath, async function() {\n // Acquire a file lock while we're reading the index\n // to make sure other processes aren't writing to it\n // simultaneously, which could result in a corrupted index.\n // const fileLock = await Lock(filepath)\n if (await isIndexStale(fs, filepath, cache[IndexCache])) {\n await updateCachedIndexFile(fs, filepath, cache[IndexCache])\n }\n const index = cache[IndexCache].map.get(filepath)\n result = await closure(index)\n if (index._dirty) {\n // Acquire a file lock while we're writing the index file\n // let fileLock = await Lock(filepath)\n const buffer = await index.toObject()\n await fs.write(filepath, buffer)\n // Update cached stat value\n cache[IndexCache].stats.set(filepath, await fs.lstat(filepath))\n index._dirty = false\n }\n })\n return result\n }\n}\n","export function normalizeNewlines(str) {\n // remove all <CR>\n str = str.replace(/\\r/g, '')\n // no extra newlines up front\n str = str.replace(/^\\n+/, '')\n // and a single newline at the end\n str = str.replace(/\\n+$/, '') + '\\n'\n return str\n}\n","'use strict';\n\nconst processFn = (fn, options) => function (...args) {\n\tconst P = options.promiseModule;\n\n\treturn new P((resolve, reject) => {\n\t\tif (options.multiArgs) {\n\t\t\targs.push((...result) => {\n\t\t\t\tif (options.errorFirst) {\n\t\t\t\t\tif (result[0]) {\n\t\t\t\t\t\treject(result);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult.shift();\n\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (options.errorFirst) {\n\t\t\targs.push((error, result) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\targs.push(resolve);\n\t\t}\n\n\t\tfn.apply(this, args);\n\t});\n};\n\nmodule.exports = (input, options) => {\n\toptions = Object.assign({\n\t\texclude: [/.+(Sync|Stream)$/],\n\t\terrorFirst: true,\n\t\tpromiseModule: Promise\n\t}, options);\n\n\tconst objType = typeof input;\n\tif (!(input !== null && (objType === 'object' || objType === 'function'))) {\n\t\tthrow new TypeError(`Expected \\`input\\` to be a \\`Function\\` or \\`Object\\`, got \\`${input === null ? 'null' : objType}\\``);\n\t}\n\n\tconst filter = key => {\n\t\tconst match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);\n\t\treturn options.include ? options.include.some(match) : !options.exclude.some(match);\n\t};\n\n\tlet ret;\n\tif (objType === 'function') {\n\t\tret = function (...args) {\n\t\t\treturn options.excludeMain ? input(...args) : processFn(input, options).apply(this, args);\n\t\t};\n\t} else {\n\t\tret = Object.create(Object.getPrototypeOf(input));\n\t}\n\n\tfor (const key in input) { // eslint-disable-line guard-for-in\n\t\tconst property = input[key];\n\t\tret[key] = typeof property === 'function' && filter(key) ? processFn(property, options) : property;\n\t}\n\n\treturn ret;\n};\n","import { BaseError } from './BaseError.js'\n\nexport class MissingNameError extends BaseError {\n /**\n * @param {'author'|'committer'|'tagger'} role\n */\n constructor(role) {\n super(\n `No name was provided for ${role} in the argument or in the .git/config file.`\n )\n this.code = this.name = MissingNameError.code\n this.data = { role }\n }\n}\n/** @type {'MissingNameError'} */\nMissingNameError.code = 'MissingNameError'\n","import { InternalError } from '../errors/InternalError.js'\n\nexport class GitObject {\n static wrap({ type, object }) {\n return Buffer.concat([\n Buffer.from(`${type} ${object.byteLength.toString()}\\x00`),\n Buffer.from(object),\n ])\n }\n\n static unwrap(buffer) {\n const s = buffer.indexOf(32) // first space\n const i = buffer.indexOf(0) // first null value\n const type = buffer.slice(0, s).toString('utf8') // get type of object\n const length = buffer.slice(s + 1, i).toString('utf8') // get type of object\n const actualLength = buffer.length - (i + 1)\n // verify length\n if (parseInt(length) !== actualLength) {\n throw new InternalError(\n `Length mismatch: expected ${length} bytes but got ${actualLength} instead.`\n )\n }\n return {\n type,\n object: Buffer.from(buffer.slice(i + 1)),\n }\n }\n}\n","import { BaseError } from './BaseError.js'\n\nexport class MissingParameterError extends BaseError {\n /**\n * @param {string} parameter\n */\n constructor(parameter) {\n super(\n `The function requires a \"${parameter}\" parameter but none was provided.`\n )\n this.code = this.name = MissingParameterError.code\n this.data = { parameter }\n }\n}\n/** @type {'MissingParameterError'} */\nMissingParameterError.code = 'MissingParameterError'\n","import { BaseError } from './BaseError.js'\n\nexport class AlreadyExistsError extends BaseError {\n /**\n * @param {'note'|'remote'|'tag'|'branch'} noun\n * @param {string} where\n * @param {boolean} canForce\n */\n constructor(noun, where, canForce = true) {\n super(\n `Failed to create ${noun} at ${where} because it already exists.${\n canForce\n ? ` (Hint: use 'force: true' parameter to overwrite existing ${noun}.)`\n : ''\n }`\n )\n this.code = this.name = AlreadyExistsError.code\n this.data = { noun, where, canForce }\n }\n}\n/** @type {'AlreadyExistsError'} */\nAlreadyExistsError.code = 'AlreadyExistsError'\n","export function dirname(path) {\n const last = Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\\\'))\n if (last === -1) return '.'\n if (last === 0) return '/'\n return path.slice(0, last)\n}\n","'use strict';\n\n\nvar TYPED_OK = (typeof Uint8Array !== 'undefined') &&\n (typeof Uint16Array !== 'undefined') &&\n (typeof Int32Array !== 'undefined');\n\nfunction _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (var p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n if (buf.length === size) { return buf; }\n if (buf.subarray) { return buf.subarray(0, size); }\n buf.length = size;\n return buf;\n};\n\n\nvar fnTyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n // Fallback to ordinary array\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n var i, l, len, pos, chunk, result;\n\n // calculate data length\n len = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n result = new Uint8Array(len);\n pos = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n }\n};\n\nvar fnUntyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n return [].concat.apply([], chunks);\n }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n if (on) {\n exports.Buf8 = Uint8Array;\n exports.Buf16 = Uint16Array;\n exports.Buf32 = Int32Array;\n exports.assign(exports, fnTyped);\n } else {\n exports.Buf8 = Array;\n exports.Buf16 = Array;\n exports.Buf32 = Array;\n exports.assign(exports, fnUntyped);\n }\n};\n\nexports.setTyped(TYPED_OK);\n","import { BaseError } from './BaseError.js'\n\nexport class InvalidOidError extends BaseError {\n /**\n * @param {string} value\n */\n constructor(value) {\n super(`Expected a 40-char hex object id but saw \"${value}\".`)\n this.code = this.name = InvalidOidError.code\n this.data = { value }\n }\n}\n/** @type {'InvalidOidError'} */\nInvalidOidError.code = 'InvalidOidError'\n","import { normalizeMode } from './normalizeMode'\n\nconst MAX_UINT32 = 2 ** 32\n\nfunction SecondsNanoseconds(\n givenSeconds,\n givenNanoseconds,\n milliseconds,\n date\n) {\n if (givenSeconds !== undefined && givenNanoseconds !== undefined) {\n return [givenSeconds, givenNanoseconds]\n }\n if (milliseconds === undefined) {\n milliseconds = date.valueOf()\n }\n const seconds = Math.floor(milliseconds / 1000)\n const nanoseconds = (milliseconds - seconds * 1000) * 1000000\n return [seconds, nanoseconds]\n}\n\nexport function normalizeStats(e) {\n const [ctimeSeconds, ctimeNanoseconds] = SecondsNanoseconds(\n e.ctimeSeconds,\n e.ctimeNanoseconds,\n e.ctimeMs,\n e.ctime\n )\n const [mtimeSeconds, mtimeNanoseconds] = SecondsNanoseconds(\n e.mtimeSeconds,\n e.mtimeNanoseconds,\n e.mtimeMs,\n e.mtime\n )\n\n return {\n ctimeSeconds: ctimeSeconds % MAX_UINT32,\n ctimeNanoseconds: ctimeNanoseconds % MAX_UINT32,\n mtimeSeconds: mtimeSeconds % MAX_UINT32,\n mtimeNanoseconds: mtimeNanoseconds % MAX_UINT32,\n dev: e.dev % MAX_UINT32,\n ino: e.ino % MAX_UINT32,\n mode: normalizeMode(e.mode % MAX_UINT32),\n uid: e.uid % MAX_UINT32,\n gid: e.gid % MAX_UINT32,\n // size of -1 happens over a BrowserFS HTTP Backend that doesn't serve Content-Length headers\n // (like the Karma webserver) because BrowserFS HTTP Backend uses HTTP HEAD requests to do fs.stat\n size: e.size > -1 ? e.size % MAX_UINT32 : 0,\n }\n}\n","import { BaseError } from './BaseError.js'\n\nexport class ParseError extends BaseError {\n /**\n * @param {string} expected\n * @param {string} actual\n */\n constructor(expected, actual) {\n super(`Expected \"${expected}\" but received \"${actual}\".`)\n this.code = this.name = ParseError.code\n this.data = { expected, actual }\n }\n}\n/** @type {'ParseError'} */\nParseError.code = 'ParseError'\n","// This is part of an elaborate system to facilitate code-splitting / tree-shaking.\n// commands/walk.js can depend on only this, and the actual Walker classes exported\n// can be opaque - only having a single property (this symbol) that is not enumerable,\n// and thus the constructor can be passed as an argument to walk while being \"unusable\"\n// outside of it.\nexport const GitWalkSymbol = Symbol('GitWalkSymbol')\n","export function compareStrings(a, b) {\n // https://stackoverflow.com/a/40355107/2168416\n return -(a < b) || +(a > b)\n}\n","import { getIterator } from './getIterator.js'\n\n// Currently 'for await' upsets my linters.\nexport async function forAwait(iterable, cb) {\n const iter = getIterator(iterable)\n while (true) {\n const { value, done } = await iter.next()\n if (value) await cb(value)\n if (done) break\n }\n if (iter.return) iter.return()\n}\n","export function basename(path) {\n const last = Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\\\'))\n if (last > -1) {\n path = path.slice(last + 1)\n }\n return path\n}\n","import { BaseError } from './BaseError.js'\n\nexport class InvalidRefNameError extends BaseError {\n /**\n * @param {string} ref\n * @param {string} suggestion\n * @param {boolean} canForce\n */\n constructor(ref, suggestion) {\n super(\n `\"${ref}\" would be an invalid git reference. (Hint: a valid alternative would be \"${suggestion}\".)`\n )\n this.code = this.name = InvalidRefNameError.code\n this.data = { ref, suggestion }\n }\n}\n/** @type {'InvalidRefNameError'} */\nInvalidRefNameError.code = 'InvalidRefNameError'\n","import AsyncLock from 'async-lock'\n\nimport { join } from '../utils/join.js'\n\nlet lock = null\n\nexport class GitShallowManager {\n static async read({ fs, gitdir }) {\n if (lock === null) lock = new AsyncLock()\n const filepath = join(gitdir, 'shallow')\n const oids = new Set()\n await lock.acquire(filepath, async function() {\n const text = await fs.read(filepath, { encoding: 'utf8' })\n if (text === null) return oids // no file\n if (text.trim() === '') return oids // empty file\n text\n .trim()\n .split('\\n')\n .map(oid => oids.add(oid))\n })\n return oids\n }\n\n static async write({ fs, gitdir, oids }) {\n if (lock === null) lock = new AsyncLock()\n const filepath = join(gitdir, 'shallow')\n if (oids.size > 0) {\n const text = [...oids].join('\\n') + '\\n'\n await lock.acquire(filepath, async function() {\n await fs.write(filepath, text, {\n encoding: 'utf8',\n })\n })\n } else {\n // No shallows\n await lock.acquire(filepath, async function() {\n await fs.rm(filepath)\n })\n }\n }\n}\n","'use strict';\n\nfunction escapeRegExp(string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'); // $& means the whole matched string\n}\n\nfunction replaceAll(str, search, replacement) {\n search = search instanceof RegExp ? search : new RegExp(escapeRegExp(search), 'g');\n\n return str.replace(search, replacement);\n}\n\nvar CleanGitRef = {\n clean: function clean(value) {\n if (typeof value !== 'string') {\n throw new Error('Expected a string, received: ' + value);\n }\n\n value = replaceAll(value, './', '/');\n value = replaceAll(value, '..', '.');\n value = replaceAll(value, ' ', '-');\n value = replaceAll(value, /^[~^:?*\\\\\\-]/g, '');\n value = replaceAll(value, /[~^:?*\\\\]/g, '-');\n value = replaceAll(value, /[~^:?*\\\\\\-]$/g, '');\n value = replaceAll(value, '@{', '-');\n value = replaceAll(value, /\\.$/g, '');\n value = replaceAll(value, /\\/$/g, '');\n value = replaceAll(value, /\\.lock$/g, '');\n return value;\n }\n};\n\nmodule.exports = CleanGitRef;","import { BaseError } from './BaseError.js'\n\nexport class UnsafeFilepathError extends BaseError {\n /**\n * @param {string} filepath\n */\n constructor(filepath) {\n super(`The filepath \"${filepath}\" contains unsafe character sequences`)\n this.code = this.name = UnsafeFilepathError.code\n this.data = { filepath }\n }\n}\n/** @type {'UnsafeFilepathError'} */\nUnsafeFilepathError.code = 'UnsafeFilepathError'\n","import { BaseError } from './BaseError.js'\n\nexport class MergeNotSupportedError extends BaseError {\n constructor() {\n super(`Merges with conflicts are not supported yet.`)\n this.code = this.name = MergeNotSupportedError.code\n this.data = {}\n }\n}\n/** @type {'MergeNotSupportedError'} */\nMergeNotSupportedError.code = 'MergeNotSupportedError'\n","export const pkg = {\n name: 'isomorphic-git',\n version: '1.8.10',\n agent: 'git/isomorphic-git@1.8.10',\n}\n","// Top level file is just a mixin of submodules & constants\n'use strict';\n\nvar assign = require('./lib/utils/common').assign;\n\nvar deflate = require('./lib/deflate');\nvar inflate = require('./lib/inflate');\nvar constants = require('./lib/zlib/constants');\n\nvar pako = {};\n\nassign(pako, deflate, inflate, constants);\n\nmodule.exports = pako;\n","export function padHex(b, n) {\n const s = n.toString(16)\n return '0'.repeat(b - s.length) + s\n}\n","export function parseAuthor(author) {\n const [, name, email, timestamp, offset] = author.match(\n /^(.*) <(.*)> (.*) (.*)$/\n )\n return {\n name: name,\n email: email,\n timestamp: Number(timestamp),\n timezoneOffset: parseTimezoneOffset(offset),\n }\n}\n\n// The amount of effort that went into crafting these cases to handle\n// -0 (just so we don't lose that information when parsing and reconstructing)\n// but can also default to +0 was extraordinary.\n\nfunction parseTimezoneOffset(offset) {\n let [, sign, hours, minutes] = offset.match(/(\\+|-)(\\d\\d)(\\d\\d)/)\n minutes = (sign === '+' ? 1 : -1) * (Number(hours) * 60 + Number(minutes))\n return negateExceptForZero(minutes)\n}\n\nfunction negateExceptForZero(n) {\n return n === 0 ? n : -n\n}\n","import { NotFoundError } from '../errors/NotFoundError.js'\nimport { ObjectTypeError } from '../errors/ObjectTypeError.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { GitTree } from '../models/GitTree.js'\nimport { _readObject as readObject } from '../storage/readObject.js'\nimport { join } from '../utils/join'\nimport { normalizeMode } from '../utils/normalizeMode.js'\nimport { resolveTree } from '../utils/resolveTree.js'\n\nexport class GitWalkerRepo {\n constructor({ fs, gitdir, ref, cache }) {\n this.fs = fs\n this.cache = cache\n this.gitdir = gitdir\n this.mapPromise = (async () => {\n const map = new Map()\n let oid\n try {\n oid = await GitRefManager.resolve({ fs, gitdir, ref })\n } catch (e) {\n if (e instanceof NotFoundError) {\n // Handle fresh branches with no commits\n oid = '4b825dc642cb6eb9a060e54bf8d69288fbee4904'\n }\n }\n const tree = await resolveTree({ fs, cache: this.cache, gitdir, oid })\n tree.type = 'tree'\n tree.mode = '40000'\n map.set('.', tree)\n return map\n })()\n const walker = this\n this.ConstructEntry = class TreeEntry {\n constructor(fullpath) {\n this._fullpath = fullpath\n this._type = false\n this._mode = false\n this._stat = false\n this._content = false\n this._oid = false\n }\n\n async type() {\n return walker.type(this)\n }\n\n async mode() {\n return walker.mode(this)\n }\n\n async stat() {\n return walker.stat(this)\n }\n\n async content() {\n return walker.content(this)\n }\n\n async oid() {\n return walker.oid(this)\n }\n }\n }\n\n async readdir(entry) {\n const filepath = entry._fullpath\n const { fs, cache, gitdir } = this\n const map = await this.mapPromise\n const obj = map.get(filepath)\n if (!obj) throw new Error(`No obj for ${filepath}`)\n const oid = obj.oid\n if (!oid) throw new Error(`No oid for obj ${JSON.stringify(obj)}`)\n if (obj.type !== 'tree') {\n // TODO: support submodules (type === 'commit')\n return null\n }\n const { type, object } = await readObject({ fs, cache, gitdir, oid })\n if (type !== obj.type) {\n throw new ObjectTypeError(oid, type, obj.type)\n }\n const tree = GitTree.from(object)\n // cache all entries\n for (const entry of tree) {\n map.set(join(filepath, entry.path), entry)\n }\n return tree.entries().map(entry => join(filepath, entry.path))\n }\n\n async type(entry) {\n if (entry._type === false) {\n const map = await this.mapPromise\n const { type } = map.get(entry._fullpath)\n entry._type = type\n }\n return entry._type\n }\n\n async mode(entry) {\n if (entry._mode === false) {\n const map = await this.mapPromise\n const { mode } = map.get(entry._fullpath)\n entry._mode = normalizeMode(parseInt(mode, 8))\n }\n return entry._mode\n }\n\n async stat(_entry) {}\n\n async content(entry) {\n if (entry._content === false) {\n const map = await this.mapPromise\n const { fs, cache, gitdir } = this\n const obj = map.get(entry._fullpath)\n const oid = obj.oid\n const { type, object } = await readObject({ fs, cache, gitdir, oid })\n if (type !== 'blob') {\n entry._content = undefined\n } else {\n entry._content = new Uint8Array(object)\n }\n }\n return entry._content\n }\n\n async oid(entry) {\n if (entry._oid === false) {\n const map = await this.mapPromise\n const obj = map.get(entry._fullpath)\n entry._oid = obj.oid\n }\n return entry._oid\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitWalkerRepo } from '../models/GitWalkerRepo.js'\nimport { GitWalkSymbol } from '../utils/symbols.js'\n\n/**\n * @param {object} args\n * @param {string} [args.ref='HEAD']\n * @returns {Walker}\n */\nexport function TREE({ ref = 'HEAD' }) {\n const o = Object.create(null)\n Object.defineProperty(o, GitWalkSymbol, {\n value: function({ fs, gitdir, cache }) {\n return new GitWalkerRepo({ fs, gitdir, ref, cache })\n },\n })\n Object.freeze(o)\n return o\n}\n","import { forAwait } from './forAwait.js'\n\nexport async function collect(iterable) {\n let size = 0\n const buffers = []\n // This will be easier once `for await ... of` loops are available.\n await forAwait(iterable, value => {\n buffers.push(value)\n size += value.byteLength\n })\n const result = new Uint8Array(size)\n let nextIndex = 0\n for (const buffer of buffers) {\n result.set(buffer, nextIndex)\n nextIndex += buffer.byteLength\n }\n return result\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { resolveFilepath } from '../utils/resolveFilepath.js'\nimport { resolveTree } from '../utils/resolveTree.js'\n\n/**\n *\n * @typedef {Object} ReadTreeResult - The object returned has the following schema:\n * @property {string} oid - SHA-1 object id of this tree\n * @property {TreeObject} tree - the parsed tree object\n */\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} args.gitdir\n * @param {string} args.oid\n * @param {string} [args.filepath]\n *\n * @returns {Promise<ReadTreeResult>}\n */\nexport async function _readTree({\n fs,\n cache,\n gitdir,\n oid,\n filepath = undefined,\n}) {\n if (filepath !== undefined) {\n oid = await resolveFilepath({ fs, cache, gitdir, oid, filepath })\n }\n const { tree, oid: treeOid } = await resolveTree({ fs, cache, gitdir, oid })\n const result = {\n oid: treeOid,\n tree: tree.entries(),\n }\n return result\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { abbreviateRef } from '../utils/abbreviateRef.js'\n\n/**\n * @param {Object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {boolean} [args.fullname = false] - Return the full path (e.g. \"refs/heads/main\") instead of the abbreviated form.\n * @param {boolean} [args.test = false] - If the current branch doesn't actually exist (such as right after git init) then return `undefined`.\n *\n * @returns {Promise<string|void>} The name of the current branch or undefined if the HEAD is detached.\n *\n */\nexport async function _currentBranch({\n fs,\n gitdir,\n fullname = false,\n test = false,\n}) {\n const ref = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: 'HEAD',\n depth: 2,\n })\n if (test) {\n try {\n await GitRefManager.resolve({ fs, gitdir, ref })\n } catch (_) {\n return\n }\n }\n // Return `undefined` for detached HEAD\n if (!ref.startsWith('refs/')) return\n return fullname ? ref : abbreviateRef(ref)\n}\n","import '../typedefs.js'\n\nimport { HttpError } from '../errors/HttpError.js'\nimport { SmartHttpError } from '../errors/SmartHttpError.js'\nimport { UserCanceledError } from '../errors/UserCanceledError.js'\nimport { calculateBasicAuthHeader } from '../utils/calculateBasicAuthHeader.js'\nimport { collect } from '../utils/collect.js'\nimport { extractAuthFromUrl } from '../utils/extractAuthFromUrl.js'\nimport { parseRefsAdResponse } from '../wire/parseRefsAdResponse.js'\n\n// Try to accomodate known CORS proxy implementations:\n// - https://jcubic.pl/proxy.php? <-- uses query string\n// - https://cors.isomorphic-git.org <-- uses path\nconst corsProxify = (corsProxy, url) =>\n corsProxy.endsWith('?')\n ? `${corsProxy}${url}`\n : `${corsProxy}/${url.replace(/^https?:\\/\\//, '')}`\n\nconst updateHeaders = (headers, auth) => {\n // Update the basic auth header\n if (auth.username || auth.password) {\n headers.Authorization = calculateBasicAuthHeader(auth)\n }\n // but any manually provided headers take precedence\n if (auth.headers) {\n Object.assign(headers, auth.headers)\n }\n}\n\n/**\n * @param {GitHttpResponse} res\n *\n * @returns {{ preview: string, response: string, data: Buffer }}\n */\nconst stringifyBody = async res => {\n try {\n // Some services provide a meaningful error message in the body of 403s like \"token lacks the scopes necessary to perform this action\"\n const data = Buffer.from(await collect(res.body))\n const response = data.toString('utf8')\n const preview =\n response.length < 256 ? response : response.slice(0, 256) + '...'\n return { preview, response, data }\n } catch (e) {\n return {}\n }\n}\n\nexport class GitRemoteHTTP {\n static async capabilities() {\n return ['discover', 'connect']\n }\n\n /**\n * @param {Object} args\n * @param {HttpClient} args.http\n * @param {ProgressCallback} [args.onProgress]\n * @param {AuthCallback} [args.onAuth]\n * @param {AuthFailureCallback} [args.onAuthFailure]\n * @param {AuthSuccessCallback} [args.onAuthSuccess]\n * @param {string} [args.corsProxy]\n * @param {string} args.service\n * @param {string} args.url\n * @param {Object<string, string>} args.headers\n * @param {1 | 2} args.protocolVersion - Git Protocol Version\n */\n static async discover({\n http,\n onProgress,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n corsProxy,\n service,\n url: _origUrl,\n headers,\n protocolVersion,\n }) {\n let { url, auth } = extractAuthFromUrl(_origUrl)\n const proxifiedURL = corsProxy ? corsProxify(corsProxy, url) : url\n if (auth.username || auth.password) {\n headers.Authorization = calculateBasicAuthHeader(auth)\n }\n if (protocolVersion === 2) {\n headers['Git-Protocol'] = 'version=2'\n }\n\n let res\n let tryAgain\n let providedAuthBefore = false\n do {\n res = await http.request({\n onProgress,\n method: 'GET',\n url: `${proxifiedURL}/info/refs?service=${service}`,\n headers,\n })\n\n // the default loop behavior\n tryAgain = false\n\n // 401 is the \"correct\" response for access denied. 203 is Non-Authoritative Information and comes from Azure DevOps, which\n // apparently doesn't realize this is a git request and is returning the HTML for the \"Azure DevOps Services | Sign In\" page.\n if (res.statusCode === 401 || res.statusCode === 203) {\n // On subsequent 401s, call `onAuthFailure` instead of `onAuth`.\n // This is so that naive `onAuth` callbacks that return a fixed value don't create an infinite loop of retrying.\n const getAuth = providedAuthBefore ? onAuthFailure : onAuth\n if (getAuth) {\n // Acquire credentials and try again\n // TODO: read `useHttpPath` value from git config and pass along?\n auth = await getAuth(url, {\n ...auth,\n headers: { ...headers },\n })\n if (auth && auth.cancel) {\n throw new UserCanceledError()\n } else if (auth) {\n updateHeaders(headers, auth)\n providedAuthBefore = true\n tryAgain = true\n }\n }\n } else if (\n res.statusCode === 200 &&\n providedAuthBefore &&\n onAuthSuccess\n ) {\n await onAuthSuccess(url, auth)\n }\n } while (tryAgain)\n\n if (res.statusCode !== 200) {\n const { response } = await stringifyBody(res)\n throw new HttpError(res.statusCode, res.statusMessage, response)\n }\n // Git \"smart\" HTTP servers should respond with the correct Content-Type header.\n if (\n res.headers['content-type'] === `application/x-${service}-advertisement`\n ) {\n const remoteHTTP = await parseRefsAdResponse(res.body, { service })\n remoteHTTP.auth = auth\n return remoteHTTP\n } else {\n // If they don't send the correct content-type header, that's a good indicator it is either a \"dumb\" HTTP\n // server, or the user specified an incorrect remote URL and the response is actually an HTML page.\n // In this case, we save the response as plain text so we can generate a better error message if needed.\n const { preview, response, data } = await stringifyBody(res)\n // For backwards compatibility, try to parse it anyway.\n // TODO: maybe just throw instead of trying?\n try {\n const remoteHTTP = await parseRefsAdResponse([data], { service })\n remoteHTTP.auth = auth\n return remoteHTTP\n } catch (e) {\n throw new SmartHttpError(preview, response)\n }\n }\n }\n\n /**\n * @param {Object} args\n * @param {HttpClient} args.http\n * @param {ProgressCallback} [args.onProgress]\n * @param {string} [args.corsProxy]\n * @param {string} args.service\n * @param {string} args.url\n * @param {Object<string, string>} [args.headers]\n * @param {any} args.body\n * @param {any} args.auth\n */\n static async connect({\n http,\n onProgress,\n corsProxy,\n service,\n url,\n auth,\n body,\n headers,\n }) {\n // We already have the \"correct\" auth value at this point, but\n // we need to strip out the username/password from the URL yet again.\n const urlAuth = extractAuthFromUrl(url)\n if (urlAuth) url = urlAuth.url\n\n if (corsProxy) url = corsProxify(corsProxy, url)\n\n headers['content-type'] = `application/x-${service}-request`\n headers.accept = `application/x-${service}-result`\n updateHeaders(headers, auth)\n\n const res = await http.request({\n onProgress,\n method: 'POST',\n url: `${url}/${service}`,\n body,\n headers,\n })\n if (res.statusCode !== 200) {\n const { response } = stringifyBody(res)\n throw new HttpError(res.statusCode, res.statusMessage, response)\n }\n return res\n }\n}\n","import { BaseError } from './BaseError.js'\n\nexport class HttpError extends BaseError {\n /**\n * @param {number} statusCode\n * @param {string} statusMessage\n * @param {string} response\n */\n constructor(statusCode, statusMessage, response) {\n super(`HTTP Error: ${statusCode} ${statusMessage}`)\n this.code = this.name = HttpError.code\n this.data = { statusCode, statusMessage, response }\n }\n}\n/** @type {'HttpError'} */\nHttpError.code = 'HttpError'\n","import { compareStrings } from './compareStrings'\n\nexport function comparePath(a, b) {\n // https://stackoverflow.com/a/40355107/2168416\n return compareStrings(a.path, b.path)\n}\n","import { ObjectTypeError } from '../errors/index.js'\nimport { GitAnnotatedTag } from '../models/GitAnnotatedTag.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { GitTree } from '../models/GitTree.js'\nimport { _readObject } from '../storage/readObject.js'\n\nexport async function resolveTree({ fs, cache, gitdir, oid }) {\n // Empty tree - bypass `readObject`\n if (oid === '4b825dc642cb6eb9a060e54bf8d69288fbee4904') {\n return { tree: GitTree.from([]), oid }\n }\n const { type, object } = await _readObject({ fs, cache, gitdir, oid })\n // Resolve annotated tag objects to whatever\n if (type === 'tag') {\n oid = GitAnnotatedTag.from(object).parse().object\n return resolveTree({ fs, cache, gitdir, oid })\n }\n // Resolve commits to trees\n if (type === 'commit') {\n oid = GitCommit.from(object).parse().tree\n return resolveTree({ fs, cache, gitdir, oid })\n }\n if (type !== 'tree') {\n throw new ObjectTypeError(oid, type, 'tree')\n }\n return { tree: GitTree.from(object), oid }\n}\n","import crc32 from 'crc-32'\n\nimport { InternalError } from '../errors/InternalError.js'\nimport { GitObject } from '../models/GitObject'\nimport { BufferCursor } from '../utils/BufferCursor.js'\nimport { applyDelta } from '../utils/applyDelta.js'\nimport { listpack } from '../utils/git-list-pack.js'\nimport { inflate } from '../utils/inflate.js'\nimport { shasum } from '../utils/shasum.js'\n\nfunction decodeVarInt(reader) {\n const bytes = []\n let byte = 0\n let multibyte = 0\n do {\n byte = reader.readUInt8()\n // We keep bits 6543210\n const lastSeven = byte & 0b01111111\n bytes.push(lastSeven)\n // Whether the next byte is part of the variable-length encoded number\n // is encoded in bit 7\n multibyte = byte & 0b10000000\n } while (multibyte)\n // Now that all the bytes are in big-endian order,\n // alternate shifting the bits left by 7 and OR-ing the next byte.\n // And... do a weird increment-by-one thing that I don't quite understand.\n return bytes.reduce((a, b) => ((a + 1) << 7) | b, -1)\n}\n\n// I'm pretty much copying this one from the git C source code,\n// because it makes no sense.\nfunction otherVarIntDecode(reader, startWith) {\n let result = startWith\n let shift = 4\n let byte = null\n do {\n byte = reader.readUInt8()\n result |= (byte & 0b01111111) << shift\n shift += 7\n } while (byte & 0b10000000)\n return result\n}\n\nexport class GitPackIndex {\n constructor(stuff) {\n Object.assign(this, stuff)\n this.offsetCache = {}\n }\n\n static async fromIdx({ idx, getExternalRefDelta }) {\n const reader = new BufferCursor(idx)\n const magic = reader.slice(4).toString('hex')\n // Check for IDX v2 magic number\n if (magic !== 'ff744f63') {\n return // undefined\n }\n const version = reader.readUInt32BE()\n if (version !== 2) {\n throw new InternalError(\n `Unable to read version ${version} packfile IDX. (Only version 2 supported)`\n )\n }\n if (idx.byteLength > 2048 * 1024 * 1024) {\n throw new InternalError(\n `To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.`\n )\n }\n // Skip over fanout table\n reader.seek(reader.tell() + 4 * 255)\n // Get hashes\n const size = reader.readUInt32BE()\n const hashes = []\n for (let i = 0; i < size; i++) {\n const hash = reader.slice(20).toString('hex')\n hashes[i] = hash\n }\n reader.seek(reader.tell() + 4 * size)\n // Skip over CRCs\n // Get offsets\n const offsets = new Map()\n for (let i = 0; i < size; i++) {\n offsets.set(hashes[i], reader.readUInt32BE())\n }\n const packfileSha = reader.slice(20).toString('hex')\n return new GitPackIndex({\n hashes,\n crcs: {},\n offsets,\n packfileSha,\n getExternalRefDelta,\n })\n }\n\n static async fromPack({ pack, getExternalRefDelta, onProgress }) {\n const listpackTypes = {\n 1: 'commit',\n 2: 'tree',\n 3: 'blob',\n 4: 'tag',\n 6: 'ofs-delta',\n 7: 'ref-delta',\n }\n const offsetToObject = {}\n\n // Older packfiles do NOT use the shasum of the pack itself,\n // so it is recommended to just use whatever bytes are in the trailer.\n // Source: https://github.com/git/git/commit/1190a1acf800acdcfd7569f87ac1560e2d077414\n const packfileSha = pack.slice(-20).toString('hex')\n\n const hashes = []\n const crcs = {}\n const offsets = new Map()\n let totalObjectCount = null\n let lastPercent = null\n\n await listpack([pack], async ({ data, type, reference, offset, num }) => {\n if (totalObjectCount === null) totalObjectCount = num\n const percent = Math.floor(\n ((totalObjectCount - num) * 100) / totalObjectCount\n )\n if (percent !== lastPercent) {\n if (onProgress) {\n await onProgress({\n phase: 'Receiving objects',\n loaded: totalObjectCount - num,\n total: totalObjectCount,\n })\n }\n }\n lastPercent = percent\n // Change type from a number to a meaningful string\n type = listpackTypes[type]\n\n if (['commit', 'tree', 'blob', 'tag'].includes(type)) {\n offsetToObject[offset] = {\n type,\n offset,\n }\n } else if (type === 'ofs-delta') {\n offsetToObject[offset] = {\n type,\n offset,\n }\n } else if (type === 'ref-delta') {\n offsetToObject[offset] = {\n type,\n offset,\n }\n }\n })\n\n // We need to know the lengths of the slices to compute the CRCs.\n const offsetArray = Object.keys(offsetToObject).map(Number)\n for (const [i, start] of offsetArray.entries()) {\n const end =\n i + 1 === offsetArray.length ? pack.byteLength - 20 : offsetArray[i + 1]\n const o = offsetToObject[start]\n const crc = crc32.buf(pack.slice(start, end)) >>> 0\n o.end = end\n o.crc = crc\n }\n\n // We don't have the hashes yet. But we can generate them using the .readSlice function!\n const p = new GitPackIndex({\n pack: Promise.resolve(pack),\n packfileSha,\n crcs,\n hashes,\n offsets,\n getExternalRefDelta,\n })\n\n // Resolve deltas and compute the oids\n lastPercent = null\n let count = 0\n const objectsByDepth = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n for (let offset in offsetToObject) {\n offset = Number(offset)\n const percent = Math.floor((count++ * 100) / totalObjectCount)\n if (percent !== lastPercent) {\n if (onProgress) {\n await onProgress({\n phase: 'Resolving deltas',\n loaded: count,\n total: totalObjectCount,\n })\n }\n }\n lastPercent = percent\n\n const o = offsetToObject[offset]\n if (o.oid) continue\n try {\n p.readDepth = 0\n p.externalReadDepth = 0\n const { type, object } = await p.readSlice({ start: offset })\n objectsByDepth[p.readDepth] += 1\n const oid = await shasum(GitObject.wrap({ type, object }))\n o.oid = oid\n hashes.push(oid)\n offsets.set(oid, offset)\n crcs[oid] = o.crc\n } catch (err) {\n continue\n }\n }\n\n hashes.sort()\n return p\n }\n\n async toBuffer() {\n const buffers = []\n const write = (str, encoding) => {\n buffers.push(Buffer.from(str, encoding))\n }\n // Write out IDX v2 magic number\n write('ff744f63', 'hex')\n // Write out version number 2\n write('00000002', 'hex')\n // Write fanout table\n const fanoutBuffer = new BufferCursor(Buffer.alloc(256 * 4))\n for (let i = 0; i < 256; i++) {\n let count = 0\n for (const hash of this.hashes) {\n if (parseInt(hash.slice(0, 2), 16) <= i) count++\n }\n fanoutBuffer.writeUInt32BE(count)\n }\n buffers.push(fanoutBuffer.buffer)\n // Write out hashes\n for (const hash of this.hashes) {\n write(hash, 'hex')\n }\n // Write out crcs\n const crcsBuffer = new BufferCursor(Buffer.alloc(this.hashes.length * 4))\n for (const hash of this.hashes) {\n crcsBuffer.writeUInt32BE(this.crcs[hash])\n }\n buffers.push(crcsBuffer.buffer)\n // Write out offsets\n const offsetsBuffer = new BufferCursor(Buffer.alloc(this.hashes.length * 4))\n for (const hash of this.hashes) {\n offsetsBuffer.writeUInt32BE(this.offsets.get(hash))\n }\n buffers.push(offsetsBuffer.buffer)\n // Write out packfile checksum\n write(this.packfileSha, 'hex')\n // Write out shasum\n const totalBuffer = Buffer.concat(buffers)\n const sha = await shasum(totalBuffer)\n const shaBuffer = Buffer.alloc(20)\n shaBuffer.write(sha, 'hex')\n return Buffer.concat([totalBuffer, shaBuffer])\n }\n\n async load({ pack }) {\n this.pack = pack\n }\n\n async unload() {\n this.pack = null\n }\n\n async read({ oid }) {\n if (!this.offsets.get(oid)) {\n if (this.getExternalRefDelta) {\n this.externalReadDepth++\n return this.getExternalRefDelta(oid)\n } else {\n throw new InternalError(`Could not read object ${oid} from packfile`)\n }\n }\n const start = this.offsets.get(oid)\n return this.readSlice({ start })\n }\n\n async readSlice({ start }) {\n if (this.offsetCache[start]) {\n return Object.assign({}, this.offsetCache[start])\n }\n this.readDepth++\n const types = {\n 0b0010000: 'commit',\n 0b0100000: 'tree',\n 0b0110000: 'blob',\n 0b1000000: 'tag',\n 0b1100000: 'ofs_delta',\n 0b1110000: 'ref_delta',\n }\n if (!this.pack) {\n throw new InternalError(\n 'Tried to read from a GitPackIndex with no packfile loaded into memory'\n )\n }\n const raw = (await this.pack).slice(start)\n const reader = new BufferCursor(raw)\n const byte = reader.readUInt8()\n // Object type is encoded in bits 654\n const btype = byte & 0b1110000\n let type = types[btype]\n if (type === undefined) {\n throw new InternalError('Unrecognized type: 0b' + btype.toString(2))\n }\n // The length encoding get complicated.\n // Last four bits of length is encoded in bits 3210\n const lastFour = byte & 0b1111\n let length = lastFour\n // Whether the next byte is part of the variable-length encoded number\n // is encoded in bit 7\n const multibyte = byte & 0b10000000\n if (multibyte) {\n length = otherVarIntDecode(reader, lastFour)\n }\n let base = null\n let object = null\n // Handle deltified objects\n if (type === 'ofs_delta') {\n const offset = decodeVarInt(reader)\n const baseOffset = start - offset\n ;({ object: base, type } = await this.readSlice({ start: baseOffset }))\n }\n if (type === 'ref_delta') {\n const oid = reader.slice(20).toString('hex')\n ;({ object: base, type } = await this.read({ oid }))\n }\n // Handle undeltified objects\n const buffer = raw.slice(reader.tell())\n object = Buffer.from(await inflate(buffer))\n // Assert that the object length is as expected.\n if (object.byteLength !== length) {\n throw new InternalError(\n `Packfile told us object would have length ${length} but it had length ${object.byteLength}`\n )\n }\n if (base) {\n object = Buffer.from(applyDelta(object, base))\n }\n // Cache the result based on depth.\n if (this.readDepth > 3) {\n // hand tuned for speed / memory usage tradeoff\n this.offsetCache[start] = { type, object }\n }\n return { type, format: 'content', object }\n }\n}\n","import { UnknownTransportError } from '../errors/UnknownTransportError.js'\nimport { UrlParseError } from '../errors/UrlParseError.js'\nimport { translateSSHtoHTTP } from '../utils/translateSSHtoHTTP.js'\n\nimport { GitRemoteHTTP } from './GitRemoteHTTP'\n\nfunction parseRemoteUrl({ url }) {\n // the stupid \"shorter scp-like syntax\"\n if (url.startsWith('git@')) {\n return {\n transport: 'ssh',\n address: url,\n }\n }\n const matches = url.match(/(\\w+)(:\\/\\/|::)(.*)/)\n if (matches === null) return\n /*\n * When git encounters a URL of the form <transport>://<address>, where <transport> is\n * a protocol that it cannot handle natively, it automatically invokes git remote-<transport>\n * with the full URL as the second argument.\n *\n * @see https://git-scm.com/docs/git-remote-helpers\n */\n if (matches[2] === '://') {\n return {\n transport: matches[1],\n address: matches[0],\n }\n }\n /*\n * A URL of the form <transport>::<address> explicitly instructs git to invoke\n * git remote-<transport> with <address> as the second argument.\n *\n * @see https://git-scm.com/docs/git-remote-helpers\n */\n if (matches[2] === '::') {\n return {\n transport: matches[1],\n address: matches[3],\n }\n }\n}\n\nexport class GitRemoteManager {\n static getRemoteHelperFor({ url }) {\n // TODO: clean up the remoteHelper API and move into PluginCore\n const remoteHelpers = new Map()\n remoteHelpers.set('http', GitRemoteHTTP)\n remoteHelpers.set('https', GitRemoteHTTP)\n\n const parts = parseRemoteUrl({ url })\n if (!parts) {\n throw new UrlParseError(url)\n }\n if (remoteHelpers.has(parts.transport)) {\n return remoteHelpers.get(parts.transport)\n }\n throw new UnknownTransportError(\n url,\n parts.transport,\n parts.transport === 'ssh' ? translateSSHtoHTTP(url) : undefined\n )\n }\n}\n","export function translateSSHtoHTTP(url) {\n // handle \"shorter scp-like syntax\"\n url = url.replace(/^git@([^:]+):/, 'https://$1/')\n // handle proper SSH URLs\n url = url.replace(/^ssh:\\/\\//, 'https://')\n return url\n}\n","// https://dev.to/namirsab/comment/2050\nexport function arrayRange(start, end) {\n const length = end - start\n return Array.from({ length }, (_, i) => start + i)\n}\n","// This is convenient for computing unions/joins of sorted lists.\nexport class RunningMinimum {\n constructor() {\n // Using a getter for 'value' would just bloat the code.\n // You know better than to set it directly right?\n this.value = null\n }\n\n consider(value) {\n if (value === null || value === undefined) return\n if (this.value === null) {\n this.value = value\n } else if (value < this.value) {\n this.value = value\n }\n }\n\n reset() {\n this.value = null\n }\n}\n","import { RunningMinimum } from '../models/RunningMinimum'\n\n// Take an array of length N of\n// iterators of length Q_n\n// of strings\n// and return an iterator of length max(Q_n) for all n\n// of arrays of length N\n// of string|null who all have the same string value\nexport function* unionOfIterators(sets) {\n /* NOTE: We can assume all arrays are sorted.\n * Indexes are sorted because they are defined that way:\n *\n * > Index entries are sorted in ascending order on the name field,\n * > interpreted as a string of unsigned bytes (i.e. memcmp() order, no\n * > localization, no special casing of directory separator '/'). Entries\n * > with the same name are sorted by their stage field.\n *\n * Trees should be sorted because they are created directly from indexes.\n * They definitely should be sorted, or else they wouldn't have a unique SHA1.\n * So that would be very naughty on the part of the tree-creator.\n *\n * Lastly, the working dir entries are sorted because I choose to sort them\n * in my FileSystem.readdir() implementation.\n */\n\n // Init\n const min = new RunningMinimum()\n let minimum\n const heads = []\n const numsets = sets.length\n for (let i = 0; i < numsets; i++) {\n // Abuse the fact that iterators continue to return 'undefined' for value\n // once they are done\n heads[i] = sets[i].next().value\n if (heads[i] !== undefined) {\n min.consider(heads[i])\n }\n }\n if (min.value === null) return\n // Iterate\n while (true) {\n const result = []\n minimum = min.value\n min.reset()\n for (let i = 0; i < numsets; i++) {\n if (heads[i] !== undefined && heads[i] === minimum) {\n result[i] = heads[i]\n heads[i] = sets[i].next().value\n } else {\n // A little hacky, but eh\n result[i] = null\n }\n if (heads[i] !== undefined) {\n min.consider(heads[i])\n }\n }\n yield result\n if (min.value === null) return\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { arrayRange } from '../utils/arrayRange.js'\nimport { flat } from '../utils/flat.js'\nimport { GitWalkSymbol } from '../utils/symbols.js'\nimport { unionOfIterators } from '../utils/unionOfIterators.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {object} args.cache\n * @param {string} [args.dir]\n * @param {string} [args.gitdir=join(dir,'.git')]\n * @param {Walker[]} args.trees\n * @param {WalkerMap} [args.map]\n * @param {WalkerReduce} [args.reduce]\n * @param {WalkerIterate} [args.iterate]\n *\n * @returns {Promise<any>} The finished tree-walking result\n *\n * @see {WalkerMap}\n *\n */\nexport async function _walk({\n fs,\n cache,\n dir,\n gitdir,\n trees,\n // @ts-ignore\n map = async (_, entry) => entry,\n // The default reducer is a flatmap that filters out undefineds.\n reduce = async (parent, children) => {\n const flatten = flat(children)\n if (parent !== undefined) flatten.unshift(parent)\n return flatten\n },\n // The default iterate function walks all children concurrently\n iterate = (walk, children) => Promise.all([...children].map(walk)),\n}) {\n const walkers = trees.map(proxy =>\n proxy[GitWalkSymbol]({ fs, dir, gitdir, cache })\n )\n\n const root = new Array(walkers.length).fill('.')\n const range = arrayRange(0, walkers.length)\n const unionWalkerFromReaddir = async entries => {\n range.map(i => {\n entries[i] = entries[i] && new walkers[i].ConstructEntry(entries[i])\n })\n const subdirs = await Promise.all(\n range.map(i => (entries[i] ? walkers[i].readdir(entries[i]) : []))\n )\n // Now process child directories\n const iterators = subdirs\n .map(array => (array === null ? [] : array))\n .map(array => array[Symbol.iterator]())\n return {\n entries,\n children: unionOfIterators(iterators),\n }\n }\n\n const walk = async root => {\n const { entries, children } = await unionWalkerFromReaddir(root)\n const fullpath = entries.find(entry => entry && entry._fullpath)._fullpath\n const parent = await map(fullpath, entries)\n if (parent !== null) {\n let walkedChildren = await iterate(walk, children)\n walkedChildren = walkedChildren.filter(x => x !== undefined)\n return reduce(parent, walkedChildren)\n }\n }\n return walk(root)\n}\n","'use strict';\nmodule.exports = require('./lib');\n","export function formatAuthor({ name, email, timestamp, timezoneOffset }) {\n timezoneOffset = formatTimezoneOffset(timezoneOffset)\n return `${name} <${email}> ${timestamp} ${timezoneOffset}`\n}\n\n// The amount of effort that went into crafting these cases to handle\n// -0 (just so we don't lose that information when parsing and reconstructing)\n// but can also default to +0 was extraordinary.\n\nfunction formatTimezoneOffset(minutes) {\n const sign = simpleSign(negateExceptForZero(minutes))\n minutes = Math.abs(minutes)\n const hours = Math.floor(minutes / 60)\n minutes -= hours * 60\n let strHours = String(hours)\n let strMinutes = String(minutes)\n if (strHours.length < 2) strHours = '0' + strHours\n if (strMinutes.length < 2) strMinutes = '0' + strMinutes\n return (sign === -1 ? '-' : '+') + strHours + strMinutes\n}\n\nfunction simpleSign(n) {\n return Math.sign(n) || (Object.is(n, -0) ? -1 : 1)\n}\n\nfunction negateExceptForZero(n) {\n return n === 0 ? n : -n\n}\n","export class FIFO {\n constructor() {\n this._queue = []\n }\n\n write(chunk) {\n if (this._ended) {\n throw Error('You cannot write to a FIFO that has already been ended!')\n }\n if (this._waiting) {\n const resolve = this._waiting\n this._waiting = null\n resolve({ value: chunk })\n } else {\n this._queue.push(chunk)\n }\n }\n\n end() {\n this._ended = true\n if (this._waiting) {\n const resolve = this._waiting\n this._waiting = null\n resolve({ done: true })\n }\n }\n\n destroy(err) {\n this._ended = true\n this.error = err\n }\n\n async next() {\n if (this._queue.length > 0) {\n return { value: this._queue.shift() }\n }\n if (this._ended) {\n return { done: true }\n }\n if (this._waiting) {\n throw Error(\n 'You cannot call read until the previous call to read has returned!'\n )\n }\n return new Promise(resolve => {\n this._waiting = resolve\n })\n }\n}\n","import { BaseError } from './BaseError.js'\n\nexport class RemoteCapabilityError extends BaseError {\n /**\n * @param {'shallow'|'deepen-since'|'deepen-not'|'deepen-relative'} capability\n * @param {'depth'|'since'|'exclude'|'relative'} parameter\n */\n constructor(capability, parameter) {\n super(\n `Remote does not support the \"${capability}\" so the \"${parameter}\" parameter cannot be used.`\n )\n this.code = this.name = RemoteCapabilityError.code\n this.data = { capability, parameter }\n }\n}\n/** @type {'RemoteCapabilityError'} */\nRemoteCapabilityError.code = 'RemoteCapabilityError'\n","import { BaseError } from './BaseError.js'\n\nexport class EmptyServerResponseError extends BaseError {\n constructor() {\n super(`Empty response from git server.`)\n this.code = this.name = EmptyServerResponseError.code\n this.data = {}\n }\n}\n/** @type {'EmptyServerResponseError'} */\nEmptyServerResponseError.code = 'EmptyServerResponseError'\n","import { BaseError } from './BaseError.js'\n\nexport class NoRefspecError extends BaseError {\n /**\n * @param {string} remote\n */\n constructor(remote) {\n super(`Could not find a fetch refspec for remote \"${remote}\". Make sure the config file has an entry like the following:\n[remote \"${remote}\"]\n\\tfetch = +refs/heads/*:refs/remotes/origin/*\n`)\n this.code = this.name = NoRefspecError.code\n this.data = { remote }\n }\n}\n/** @type {'NoRefspecError'} */\nNoRefspecError.code = 'NoRefspecError'\n","import { BaseError } from './BaseError.js'\n\nexport class SmartHttpError extends BaseError {\n /**\n * @param {string} preview\n * @param {string} response\n */\n constructor(preview, response) {\n super(\n `Remote did not reply using the \"smart\" HTTP protocol. Expected \"001e# service=git-upload-pack\" but received: ${preview}`\n )\n this.code = this.name = SmartHttpError.code\n this.data = { preview, response }\n }\n}\n/** @type {'SmartHttpError'} */\nSmartHttpError.code = 'SmartHttpError'\n","import { BaseError } from './BaseError.js'\n\nexport class UnknownTransportError extends BaseError {\n /**\n * @param {string} url\n * @param {string} transport\n * @param {string} suggestion\n */\n constructor(url, transport, suggestion) {\n super(\n `Git remote \"${url}\" uses an unrecognized transport protocol: \"${transport}\"`\n )\n this.code = this.name = UnknownTransportError.code\n this.data = { url, transport, suggestion }\n }\n}\n/** @type {'UnknownTransportError'} */\nUnknownTransportError.code = 'UnknownTransportError'\n","import { BaseError } from './BaseError.js'\n\nexport class UrlParseError extends BaseError {\n /**\n * @param {string} url\n */\n constructor(url) {\n super(`Cannot parse remote URL: \"${url}\"`)\n this.code = this.name = UrlParseError.code\n this.data = { url }\n }\n}\n/** @type {'UrlParseError'} */\nUrlParseError.code = 'UrlParseError'\n","import { BaseError } from './BaseError.js'\n\nexport class UserCanceledError extends BaseError {\n constructor() {\n super(`The operation was canceled.`)\n this.code = this.name = UserCanceledError.code\n this.data = {}\n }\n}\n/** @type {'UserCanceledError'} */\nUserCanceledError.code = 'UserCanceledError'\n","import ignore from 'ignore'\n\nimport { basename } from '../utils/basename.js'\nimport { dirname } from '../utils/dirname.js'\nimport { join } from '../utils/join.js'\n\n// I'm putting this in a Manager because I reckon it could benefit\n// from a LOT of cacheing.\nexport class GitIgnoreManager {\n static async isIgnored({ fs, dir, gitdir = join(dir, '.git'), filepath }) {\n // ALWAYS ignore \".git\" folders.\n if (basename(filepath) === '.git') return true\n // '.' is not a valid gitignore entry, so '.' is never ignored\n if (filepath === '.') return false\n // Check and load exclusion rules from project exclude file (.git/info/exclude)\n let excludes = ''\n const excludesFile = join(gitdir, 'info', 'exclude')\n if (await fs.exists(excludesFile)) {\n excludes = await fs.read(excludesFile, 'utf8')\n }\n // Find all the .gitignore files that could affect this file\n const pairs = [\n {\n gitignore: join(dir, '.gitignore'),\n filepath,\n },\n ]\n const pieces = filepath.split('/')\n for (let i = 1; i < pieces.length; i++) {\n const folder = pieces.slice(0, i).join('/')\n const file = pieces.slice(i).join('/')\n pairs.push({\n gitignore: join(dir, folder, '.gitignore'),\n filepath: file,\n })\n }\n let ignoredStatus = false\n for (const p of pairs) {\n let file\n try {\n file = await fs.read(p.gitignore, 'utf8')\n } catch (err) {\n if (err.code === 'NOENT') continue\n }\n const ign = ignore().add(excludes)\n ign.add(file)\n // If the parent directory is excluded, we are done.\n // \"It is not possible to re-include a file if a parent directory of that file is excluded. Git doesn’t list excluded directories for performance reasons, so any patterns on contained files have no effect, no matter where they are defined.\"\n // source: https://git-scm.com/docs/gitignore\n const parentdir = dirname(p.filepath)\n if (parentdir !== '.' && ign.ignores(parentdir)) return true\n // If the file is currently ignored, test for UNignoring.\n if (ignoredStatus) {\n ignoredStatus = !ign.test(p.filepath).unignored\n } else {\n ignoredStatus = ign.test(p.filepath).ignored\n }\n }\n return ignoredStatus\n }\n}\n","/*\nIf 'side-band' or 'side-band-64k' capabilities have been specified by\nthe client, the server will send the packfile data multiplexed.\n\nEach packet starting with the packet-line length of the amount of data\nthat follows, followed by a single byte specifying the sideband the\nfollowing data is coming in on.\n\nIn 'side-band' mode, it will send up to 999 data bytes plus 1 control\ncode, for a total of up to 1000 bytes in a pkt-line. In 'side-band-64k'\nmode it will send up to 65519 data bytes plus 1 control code, for a\ntotal of up to 65520 bytes in a pkt-line.\n\nThe sideband byte will be a '1', '2' or a '3'. Sideband '1' will contain\npackfile data, sideband '2' will be used for progress information that the\nclient will generally print to stderr and sideband '3' is used for error\ninformation.\n\nIf no 'side-band' capability was specified, the server will stream the\nentire packfile without multiplexing.\n*/\nimport { FIFO } from '../utils/FIFO.js'\n\nimport { GitPktLine } from './GitPktLine.js'\n\nexport class GitSideBand {\n static demux(input) {\n const read = GitPktLine.streamReader(input)\n // And now for the ridiculous side-band or side-band-64k protocol\n const packetlines = new FIFO()\n const packfile = new FIFO()\n const progress = new FIFO()\n // TODO: Use a proper through stream?\n const nextBit = async function() {\n const line = await read()\n // Skip over flush packets\n if (line === null) return nextBit()\n // A made up convention to signal there's no more to read.\n if (line === true) {\n packetlines.end()\n progress.end()\n packfile.end()\n return\n }\n // Examine first byte to determine which output \"stream\" to use\n switch (line[0]) {\n case 1: {\n // pack data\n packfile.write(line.slice(1))\n break\n }\n case 2: {\n // progress message\n progress.write(line.slice(1))\n break\n }\n case 3: {\n // fatal error message just before stream aborts\n const error = line.slice(1)\n progress.write(error)\n packfile.destroy(new Error(error.toString('utf8')))\n return\n }\n default: {\n // Not part of the side-band-64k protocol\n packetlines.write(line.slice(0))\n }\n }\n // Careful not to blow up the stack.\n // I think Promises in a tail-call position should be OK.\n nextBit()\n }\n nextBit()\n return {\n packetlines,\n packfile,\n progress,\n }\n }\n // static mux ({\n // protocol, // 'side-band' or 'side-band-64k'\n // packetlines,\n // packfile,\n // progress,\n // error\n // }) {\n // const MAX_PACKET_LENGTH = protocol === 'side-band-64k' ? 999 : 65519\n // let output = new PassThrough()\n // packetlines.on('data', data => {\n // if (data === null) {\n // output.write(GitPktLine.flush())\n // } else {\n // output.write(GitPktLine.encode(data))\n // }\n // })\n // let packfileWasEmpty = true\n // let packfileEnded = false\n // let progressEnded = false\n // let errorEnded = false\n // let goodbye = Buffer.concat([\n // GitPktLine.encode(Buffer.from('010A', 'hex')),\n // GitPktLine.flush()\n // ])\n // packfile\n // .on('data', data => {\n // packfileWasEmpty = false\n // const buffers = splitBuffer(data, MAX_PACKET_LENGTH)\n // for (const buffer of buffers) {\n // output.write(\n // GitPktLine.encode(Buffer.concat([Buffer.from('01', 'hex'), buffer]))\n // )\n // }\n // })\n // .on('end', () => {\n // packfileEnded = true\n // if (!packfileWasEmpty) output.write(goodbye)\n // if (progressEnded && errorEnded) output.end()\n // })\n // progress\n // .on('data', data => {\n // const buffers = splitBuffer(data, MAX_PACKET_LENGTH)\n // for (const buffer of buffers) {\n // output.write(\n // GitPktLine.encode(Buffer.concat([Buffer.from('02', 'hex'), buffer]))\n // )\n // }\n // })\n // .on('end', () => {\n // progressEnded = true\n // if (packfileEnded && errorEnded) output.end()\n // })\n // error\n // .on('data', data => {\n // const buffers = splitBuffer(data, MAX_PACKET_LENGTH)\n // for (const buffer of buffers) {\n // output.write(\n // GitPktLine.encode(Buffer.concat([Buffer.from('03', 'hex'), buffer]))\n // )\n // }\n // })\n // .on('end', () => {\n // errorEnded = true\n // if (progressEnded && packfileEnded) output.end()\n // })\n // return output\n // }\n}\n","/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined\n * in FIPS PUB 180-1\n * Version 2.1a Copyright Paul Johnston 2000 - 2002.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for details.\n */\n\nvar inherits = require('inherits')\nvar Hash = require('./hash')\nvar Buffer = require('safe-buffer').Buffer\n\nvar K = [\n 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n]\n\nvar W = new Array(80)\n\nfunction Sha1 () {\n this.init()\n this._w = W\n\n Hash.call(this, 64, 56)\n}\n\ninherits(Sha1, Hash)\n\nSha1.prototype.init = function () {\n this._a = 0x67452301\n this._b = 0xefcdab89\n this._c = 0x98badcfe\n this._d = 0x10325476\n this._e = 0xc3d2e1f0\n\n return this\n}\n\nfunction rotl1 (num) {\n return (num << 1) | (num >>> 31)\n}\n\nfunction rotl5 (num) {\n return (num << 5) | (num >>> 27)\n}\n\nfunction rotl30 (num) {\n return (num << 30) | (num >>> 2)\n}\n\nfunction ft (s, b, c, d) {\n if (s === 0) return (b & c) | ((~b) & d)\n if (s === 2) return (b & c) | (b & d) | (c & d)\n return b ^ c ^ d\n}\n\nSha1.prototype._update = function (M) {\n var W = this._w\n\n var a = this._a | 0\n var b = this._b | 0\n var c = this._c | 0\n var d = this._d | 0\n var e = this._e | 0\n\n for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)\n for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16])\n\n for (var j = 0; j < 80; ++j) {\n var s = ~~(j / 20)\n var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0\n\n e = d\n d = c\n c = rotl30(b)\n b = a\n a = t\n }\n\n this._a = (a + this._a) | 0\n this._b = (b + this._b) | 0\n this._c = (c + this._c) | 0\n this._d = (d + this._d) | 0\n this._e = (e + this._e) | 0\n}\n\nSha1.prototype._hash = function () {\n var H = Buffer.allocUnsafe(20)\n\n H.writeInt32BE(this._a | 0, 0)\n H.writeInt32BE(this._b | 0, 4)\n H.writeInt32BE(this._c | 0, 8)\n H.writeInt32BE(this._d | 0, 12)\n H.writeInt32BE(this._e | 0, 16)\n\n return H\n}\n\nmodule.exports = Sha1\n","/**\n * From https://github.com/git/git/blob/master/Documentation/technical/index-format.txt\n *\n * 32-bit mode, split into (high to low bits)\n *\n * 4-bit object type\n * valid values in binary are 1000 (regular file), 1010 (symbolic link)\n * and 1110 (gitlink)\n *\n * 3-bit unused\n *\n * 9-bit unix permission. Only 0755 and 0644 are valid for regular files.\n * Symbolic links and gitlinks have value 0 in this field.\n */\nexport function normalizeMode(mode) {\n // Note: BrowserFS will use -1 for \"unknown\"\n // I need to make it non-negative for these bitshifts to work.\n let type = mode > 0 ? mode >> 12 : 0\n // If it isn't valid, assume it as a \"regular file\"\n // 0100 = directory\n // 1000 = regular file\n // 1010 = symlink\n // 1110 = gitlink\n if (\n type !== 0b0100 &&\n type !== 0b1000 &&\n type !== 0b1010 &&\n type !== 0b1110\n ) {\n type = 0b1000\n }\n let permissions = mode & 0o777\n // Is the file executable? then 755. Else 644.\n if (permissions & 0b001001001) {\n permissions = 0o755\n } else {\n permissions = 0o644\n }\n // If it's not a regular file, scrub all permissions\n if (type !== 0b1000) permissions = 0\n return (type << 12) + permissions\n}\n","import { normalizeStats } from './normalizeStats.js'\n\nexport function compareStats(entry, stats) {\n // Comparison based on the description in Paragraph 4 of\n // https://www.kernel.org/pub/software/scm/git/docs/technical/racy-git.txt\n const e = normalizeStats(entry)\n const s = normalizeStats(stats)\n const staleness =\n e.mode !== s.mode ||\n e.mtimeSeconds !== s.mtimeSeconds ||\n e.ctimeSeconds !== s.ctimeSeconds ||\n e.uid !== s.uid ||\n e.gid !== s.gid ||\n e.ino !== s.ino ||\n e.size !== s.size\n return staleness\n}\n","import { InternalError } from '../errors/InternalError.js'\n\nexport class GitRefSpec {\n constructor({ remotePath, localPath, force, matchPrefix }) {\n Object.assign(this, {\n remotePath,\n localPath,\n force,\n matchPrefix,\n })\n }\n\n static from(refspec) {\n const [\n forceMatch,\n remotePath,\n remoteGlobMatch,\n localPath,\n localGlobMatch,\n ] = refspec.match(/^(\\+?)(.*?)(\\*?):(.*?)(\\*?)$/).slice(1)\n const force = forceMatch === '+'\n const remoteIsGlob = remoteGlobMatch === '*'\n const localIsGlob = localGlobMatch === '*'\n // validate\n // TODO: Make this check more nuanced, and depend on whether this is a fetch refspec or a push refspec\n if (remoteIsGlob !== localIsGlob) {\n throw new InternalError('Invalid refspec')\n }\n return new GitRefSpec({\n remotePath,\n localPath,\n force,\n matchPrefix: remoteIsGlob,\n })\n // TODO: We need to run resolveRef on both paths to expand them to their full name.\n }\n\n translate(remoteBranch) {\n if (this.matchPrefix) {\n if (remoteBranch.startsWith(this.remotePath)) {\n return this.localPath + remoteBranch.replace(this.remotePath, '')\n }\n } else {\n if (remoteBranch === this.remotePath) return this.localPath\n }\n return null\n }\n\n reverseTranslate(localBranch) {\n if (this.matchPrefix) {\n if (localBranch.startsWith(this.localPath)) {\n return this.remotePath + localBranch.replace(this.localPath, '')\n }\n } else {\n if (localBranch === this.localPath) return this.remotePath\n }\n return null\n }\n}\n","import { GitPackIndex } from '../models/GitPackIndex.js'\n\nconst PackfileCache = Symbol('PackfileCache')\n\nasync function loadPackIndex({\n fs,\n filename,\n getExternalRefDelta,\n emitter,\n emitterPrefix,\n}) {\n const idx = await fs.read(filename)\n return GitPackIndex.fromIdx({ idx, getExternalRefDelta })\n}\n\nexport function readPackIndex({\n fs,\n cache,\n filename,\n getExternalRefDelta,\n emitter,\n emitterPrefix,\n}) {\n // Try to get the packfile index from the in-memory cache\n if (!cache[PackfileCache]) cache[PackfileCache] = new Map()\n let p = cache[PackfileCache].get(filename)\n if (!p) {\n p = loadPackIndex({\n fs,\n filename,\n getExternalRefDelta,\n emitter,\n emitterPrefix,\n })\n cache[PackfileCache].set(filename, p)\n }\n return p\n}\n","import { getIterator } from './getIterator.js'\n\n// inspired by 'gartal' but lighter-weight and more battle-tested.\nexport class StreamReader {\n constructor(stream) {\n this.stream = getIterator(stream)\n this.buffer = null\n this.cursor = 0\n this.undoCursor = 0\n this.started = false\n this._ended = false\n this._discardedBytes = 0\n }\n\n eof() {\n return this._ended && this.cursor === this.buffer.length\n }\n\n tell() {\n return this._discardedBytes + this.cursor\n }\n\n async byte() {\n if (this.eof()) return\n if (!this.started) await this._init()\n if (this.cursor === this.buffer.length) {\n await this._loadnext()\n if (this._ended) return\n }\n this._moveCursor(1)\n return this.buffer[this.undoCursor]\n }\n\n async chunk() {\n if (this.eof()) return\n if (!this.started) await this._init()\n if (this.cursor === this.buffer.length) {\n await this._loadnext()\n if (this._ended) return\n }\n this._moveCursor(this.buffer.length)\n return this.buffer.slice(this.undoCursor, this.cursor)\n }\n\n async read(n) {\n if (this.eof()) return\n if (!this.started) await this._init()\n if (this.cursor + n > this.buffer.length) {\n this._trim()\n await this._accumulate(n)\n }\n this._moveCursor(n)\n return this.buffer.slice(this.undoCursor, this.cursor)\n }\n\n async skip(n) {\n if (this.eof()) return\n if (!this.started) await this._init()\n if (this.cursor + n > this.buffer.length) {\n this._trim()\n await this._accumulate(n)\n }\n this._moveCursor(n)\n }\n\n async undo() {\n this.cursor = this.undoCursor\n }\n\n async _next() {\n this.started = true\n let { done, value } = await this.stream.next()\n if (done) {\n this._ended = true\n }\n if (value) {\n value = Buffer.from(value)\n }\n return value\n }\n\n _trim() {\n // Throw away parts of the buffer we don't need anymore\n // assert(this.cursor <= this.buffer.length)\n this.buffer = this.buffer.slice(this.undoCursor)\n this.cursor -= this.undoCursor\n this._discardedBytes += this.undoCursor\n this.undoCursor = 0\n }\n\n _moveCursor(n) {\n this.undoCursor = this.cursor\n this.cursor += n\n if (this.cursor > this.buffer.length) {\n this.cursor = this.buffer.length\n }\n }\n\n async _accumulate(n) {\n if (this._ended) return\n // Expand the buffer until we have N bytes of data\n // or we've reached the end of the stream\n const buffers = [this.buffer]\n while (this.cursor + n > lengthBuffers(buffers)) {\n const nextbuffer = await this._next()\n if (this._ended) break\n buffers.push(nextbuffer)\n }\n this.buffer = Buffer.concat(buffers)\n }\n\n async _loadnext() {\n this._discardedBytes += this.buffer.length\n this.undoCursor = 0\n this.cursor = 0\n this.buffer = await this._next()\n }\n\n async _init() {\n this.buffer = await this._next()\n }\n}\n\n// This helper function helps us postpone concatenating buffers, which\n// would create intermediate buffer objects,\nfunction lengthBuffers(buffers) {\n return buffers.reduce((acc, buffer) => acc + buffer.length, 0)\n}\n","/* eslint-env node, browser */\n/* global DecompressionStream */\nimport pako from 'pako'\n\nlet supportsDecompressionStream = false\n\nexport async function inflate(buffer) {\n if (supportsDecompressionStream === null) {\n supportsDecompressionStream = testDecompressionStream()\n }\n return supportsDecompressionStream\n ? browserInflate(buffer)\n : pako.inflate(buffer)\n}\n\nasync function browserInflate(buffer) {\n const ds = new DecompressionStream('deflate')\n const d = new Blob([buffer]).stream().pipeThrough(ds)\n return new Uint8Array(await new Response(d).arrayBuffer())\n}\n\nfunction testDecompressionStream() {\n try {\n const ds = new DecompressionStream('deflate')\n if (ds) return true\n } catch (_) {\n // no bother\n }\n return false\n}\n","/* eslint-env node, browser */\n/* global CompressionStream */\nimport pako from 'pako'\n\nlet supportsCompressionStream = null\n\nexport async function deflate(buffer) {\n if (supportsCompressionStream === null) {\n supportsCompressionStream = testCompressionStream()\n }\n return supportsCompressionStream\n ? browserDeflate(buffer)\n : pako.deflate(buffer)\n}\n\nasync function browserDeflate(buffer) {\n const cs = new CompressionStream('deflate')\n const c = new Blob([buffer]).stream().pipeThrough(cs)\n return new Uint8Array(await new Response(c).arrayBuffer())\n}\n\nfunction testCompressionStream() {\n try {\n const cs = new CompressionStream('deflate')\n // Test if `Blob.stream` is present. React Native does not have the `stream` method\n new Blob([]).stream()\n if (cs) return true\n } catch (_) {\n // no bother\n }\n return false\n}\n","export function calculateBasicAuthHeader({ username = '', password = '' }) {\n return `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`\n}\n","import { fromValue } from '../utils/fromValue.js'\n\nexport function getIterator(iterable) {\n if (iterable[Symbol.asyncIterator]) {\n return iterable[Symbol.asyncIterator]()\n }\n if (iterable[Symbol.iterator]) {\n return iterable[Symbol.iterator]()\n }\n if (iterable.next) {\n return iterable\n }\n return fromValue(iterable)\n}\n","// Convert a value to an Async Iterator\n// This will be easier with async generator functions.\nexport function fromValue(value) {\n let queue = [value]\n return {\n next() {\n return Promise.resolve({ done: queue.length === 0, value: queue.pop() })\n },\n return() {\n queue = []\n return {}\n },\n [Symbol.asyncIterator]() {\n return this\n },\n }\n}\n","// @ts-check\n\n/**\n * @param {function} read\n */\nexport async function parseCapabilitiesV2(read) {\n /** @type {Object<string, string | true>} */\n const capabilities2 = {}\n\n let line\n while (true) {\n line = await read()\n if (line === true) break\n if (line === null) continue\n line = line.toString('utf8').replace(/\\n$/, '')\n const i = line.indexOf('=')\n if (i > -1) {\n const key = line.slice(0, i)\n const value = line.slice(i + 1)\n capabilities2[key] = value\n } else {\n capabilities2[line] = true\n }\n }\n return { protocolVersion: 2, capabilities2 }\n}\n","import { EmptyServerResponseError } from '../errors/EmptyServerResponseError.js'\nimport { ParseError } from '../errors/ParseError.js'\nimport { GitPktLine } from '../models/GitPktLine.js'\nimport { parseCapabilitiesV2 } from '../wire/parseCapabilitiesV2.js'\n\nexport async function parseRefsAdResponse(stream, { service }) {\n const capabilities = new Set()\n const refs = new Map()\n const symrefs = new Map()\n\n // There is probably a better way to do this, but for now\n // let's just throw the result parser inline here.\n const read = GitPktLine.streamReader(stream)\n let lineOne = await read()\n // skip past any flushes\n while (lineOne === null) lineOne = await read()\n if (lineOne === true) throw new EmptyServerResponseError()\n // Clients MUST ignore an LF at the end of the line.\n if (lineOne.toString('utf8').replace(/\\n$/, '') !== `# service=${service}`) {\n throw new ParseError(`# service=${service}\\\\n`, lineOne.toString('utf8'))\n }\n let lineTwo = await read()\n // skip past any flushes\n while (lineTwo === null) lineTwo = await read()\n // In the edge case of a brand new repo, zero refs (and zero capabilities)\n // are returned.\n if (lineTwo === true) return { capabilities, refs, symrefs }\n lineTwo = lineTwo.toString('utf8')\n // Handle protocol v2 responses\n if (lineTwo.includes('version 2')) {\n return parseCapabilitiesV2(read)\n }\n const [firstRef, capabilitiesLine] = splitAndAssert(lineTwo, '\\x00', '\\\\x00')\n capabilitiesLine.split(' ').map(x => capabilities.add(x))\n const [ref, name] = splitAndAssert(firstRef, ' ', ' ')\n refs.set(name, ref)\n while (true) {\n const line = await read()\n if (line === true) break\n if (line !== null) {\n const [ref, name] = splitAndAssert(line.toString('utf8'), ' ', ' ')\n refs.set(name, ref)\n }\n }\n // Symrefs are thrown into the \"capabilities\" unfortunately.\n for (const cap of capabilities) {\n if (cap.startsWith('symref=')) {\n const m = cap.match(/symref=([^:]+):(.*)/)\n if (m.length === 3) {\n symrefs.set(m[1], m[2])\n }\n }\n }\n return { protocolVersion: 1, capabilities, refs, symrefs }\n}\n\nfunction splitAndAssert(line, sep, expected) {\n const split = line.trim().split(sep)\n if (split.length !== 2) {\n throw new ParseError(\n `Two strings separated by '${expected}'`,\n line.toString('utf8')\n )\n }\n return split\n}\n","export function indent(str) {\n return (\n str\n .trim()\n .split('\\n')\n .map(x => ' ' + x)\n .join('\\n') + '\\n'\n )\n}\n","export * from './AlreadyExistsError.js'\nexport * from './AmbiguousError.js'\n// BaseError.js\nexport * from './CheckoutConflictError.js'\nexport * from './CommitNotFetchedError.js'\nexport * from './EmptyServerResponseError.js'\nexport * from './FastForwardError.js'\nexport * from './GitPushError.js'\nexport * from './HttpError.js'\n// index.js\nexport * from './InternalError.js'\nexport * from './InvalidFilepathError.js'\nexport * from './InvalidOidError.js'\nexport * from './InvalidRefNameError.js'\nexport * from './MaxDepthError.js'\nexport * from './MergeNotSupportedError.js'\nexport * from './MissingNameError.js'\nexport * from './MissingParameterError.js'\nexport * from './NoRefspecError.js'\nexport * from './NotFoundError.js'\nexport * from './ObjectTypeError.js'\nexport * from './ParseError.js'\nexport * from './PushRejectedError.js'\nexport * from './RemoteCapabilityError.js'\nexport * from './SmartHttpError.js'\nexport * from './UnknownTransportError.js'\nexport * from './UnsafeFilepathError.js'\nexport * from './UrlParseError.js'\nexport * from './UserCanceledError.js'\n","import { BaseError } from './BaseError.js'\n\nexport class InvalidFilepathError extends BaseError {\n /**\n * @param {'leading-slash'|'trailing-slash'} [reason]\n */\n constructor(reason) {\n let message = 'invalid filepath'\n if (reason === 'leading-slash' || reason === 'trailing-slash') {\n message = `\"filepath\" parameter should not include leading or trailing directory separators because these can cause problems on some platforms.`\n }\n super(message)\n this.code = this.name = InvalidFilepathError.code\n this.data = { reason }\n }\n}\n/** @type {'InvalidFilepathError'} */\nInvalidFilepathError.code = 'InvalidFilepathError'\n","import { BaseError } from './BaseError.js'\n\nexport class PushRejectedError extends BaseError {\n /**\n * @param {'not-fast-forward'|'tag-exists'} reason\n */\n constructor(reason) {\n let message = ''\n if (reason === 'not-fast-forward') {\n message = ' because it was not a simple fast-forward'\n } else if (reason === 'tag-exists') {\n message = ' because tag already exists'\n }\n super(`Push rejected${message}. Use \"force: true\" to override.`)\n this.code = this.name = PushRejectedError.code\n this.data = { reason }\n }\n}\n/** @type {'PushRejectedError'} */\nPushRejectedError.code = 'PushRejectedError'\n","// @ts-check\nimport { InvalidFilepathError } from '../errors/InvalidFilepathError.js'\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { ObjectTypeError } from '../errors/ObjectTypeError.js'\nimport { GitTree } from '../models/GitTree.js'\nimport { _readObject as readObject } from '../storage/readObject.js'\nimport { resolveTree } from '../utils/resolveTree.js'\n\nexport async function resolveFilepath({ fs, cache, gitdir, oid, filepath }) {\n // Ensure there are no leading or trailing directory separators.\n // I was going to do this automatically, but then found that the Git Terminal for Windows\n // auto-expands --filepath=/src/utils to --filepath=C:/Users/Will/AppData/Local/Programs/Git/src/utils\n // so I figured it would be wise to promote the behavior in the application layer not just the library layer.\n if (filepath.startsWith('/')) {\n throw new InvalidFilepathError('leading-slash')\n } else if (filepath.endsWith('/')) {\n throw new InvalidFilepathError('trailing-slash')\n }\n const _oid = oid\n const result = await resolveTree({ fs, cache, gitdir, oid })\n const tree = result.tree\n if (filepath === '') {\n oid = result.oid\n } else {\n const pathArray = filepath.split('/')\n oid = await _resolveFilepath({\n fs,\n cache,\n gitdir,\n tree,\n pathArray,\n oid: _oid,\n filepath,\n })\n }\n return oid\n}\n\nasync function _resolveFilepath({\n fs,\n cache,\n gitdir,\n tree,\n pathArray,\n oid,\n filepath,\n}) {\n const name = pathArray.shift()\n for (const entry of tree) {\n if (entry.path === name) {\n if (pathArray.length === 0) {\n return entry.oid\n } else {\n const { type, object } = await readObject({\n fs,\n cache,\n gitdir,\n oid: entry.oid,\n })\n if (type !== 'tree') {\n throw new ObjectTypeError(oid, type, 'blob', filepath)\n }\n tree = GitTree.from(object)\n return _resolveFilepath({\n fs,\n cache,\n gitdir,\n tree,\n pathArray,\n oid,\n filepath,\n })\n }\n }\n }\n throw new NotFoundError(`file or directory found at \"${oid}:${filepath}\"`)\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { GitTree } from '../models/GitTree.js'\nimport { _writeObject as writeObject } from '../storage/writeObject.js'\nimport { flatFileListToDirectoryStructure } from '../utils/flatFileListToDirectoryStructure.js'\n\n/**\n *\n * @param {Object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {object} args.cache\n * @param {SignCallback} [args.onSign]\n * @param {string} args.gitdir\n * @param {string} args.message\n * @param {Object} args.author\n * @param {string} args.author.name\n * @param {string} args.author.email\n * @param {number} args.author.timestamp\n * @param {number} args.author.timezoneOffset\n * @param {Object} args.committer\n * @param {string} args.committer.name\n * @param {string} args.committer.email\n * @param {number} args.committer.timestamp\n * @param {number} args.committer.timezoneOffset\n * @param {string} [args.signingKey]\n * @param {boolean} [args.dryRun = false]\n * @param {boolean} [args.noUpdateBranch = false]\n * @param {string} [args.ref]\n * @param {string[]} [args.parent]\n * @param {string} [args.tree]\n *\n * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly created commit.\n */\nexport async function _commit({\n fs,\n cache,\n onSign,\n gitdir,\n message,\n author,\n committer,\n signingKey,\n dryRun = false,\n noUpdateBranch = false,\n ref,\n parent,\n tree,\n}) {\n if (!ref) {\n ref = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: 'HEAD',\n depth: 2,\n })\n }\n\n return GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) {\n const inodes = flatFileListToDirectoryStructure(index.entries)\n const inode = inodes.get('.')\n if (!tree) {\n tree = await constructTree({ fs, gitdir, inode, dryRun })\n }\n if (!parent) {\n try {\n parent = [\n await GitRefManager.resolve({\n fs,\n gitdir,\n ref,\n }),\n ]\n } catch (err) {\n // Probably an initial commit\n parent = []\n }\n }\n let comm = GitCommit.from({\n tree,\n parent,\n author,\n committer,\n message,\n })\n if (signingKey) {\n comm = await GitCommit.sign(comm, onSign, signingKey)\n }\n const oid = await writeObject({\n fs,\n gitdir,\n type: 'commit',\n object: comm.toObject(),\n dryRun,\n })\n if (!noUpdateBranch && !dryRun) {\n // Update branch pointer\n await GitRefManager.writeRef({\n fs,\n gitdir,\n ref,\n value: oid,\n })\n }\n return oid\n })\n}\n\nasync function constructTree({ fs, gitdir, inode, dryRun }) {\n // use depth first traversal\n const children = inode.children\n for (const inode of children) {\n if (inode.type === 'tree') {\n inode.metadata.mode = '040000'\n inode.metadata.oid = await constructTree({ fs, gitdir, inode, dryRun })\n }\n }\n const entries = children.map(inode => ({\n mode: inode.metadata.mode,\n path: inode.basename,\n oid: inode.metadata.oid,\n type: inode.type,\n }))\n const tree = GitTree.from(entries)\n const oid = await writeObject({\n fs,\n gitdir,\n type: 'tree',\n object: tree.toObject(),\n dryRun,\n })\n return oid\n}\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n","import { BaseError } from './BaseError.js'\n\nexport class AmbiguousError extends BaseError {\n /**\n * @param {'oids'|'refs'} nouns\n * @param {string} short\n * @param {string[]} matches\n */\n constructor(nouns, short, matches) {\n super(\n `Found multiple ${nouns} matching \"${short}\" (${matches.join(\n ', '\n )}). Use a longer abbreviation length to disambiguate them.`\n )\n this.code = this.name = AmbiguousError.code\n this.data = { nouns, short, matches }\n }\n}\n/** @type {'AmbiguousError'} */\nAmbiguousError.code = 'AmbiguousError'\n","import { BaseError } from './BaseError.js'\n\nexport class CheckoutConflictError extends BaseError {\n /**\n * @param {string[]} filepaths\n */\n constructor(filepaths) {\n super(\n `Your local changes to the following files would be overwritten by checkout: ${filepaths.join(\n ', '\n )}`\n )\n this.code = this.name = CheckoutConflictError.code\n this.data = { filepaths }\n }\n}\n/** @type {'CheckoutConflictError'} */\nCheckoutConflictError.code = 'CheckoutConflictError'\n","import { BaseError } from './BaseError.js'\n\nexport class CommitNotFetchedError extends BaseError {\n /**\n * @param {string} ref\n * @param {string} oid\n */\n constructor(ref, oid) {\n super(\n `Failed to checkout \"${ref}\" because commit ${oid} is not available locally. Do a git fetch to make the branch available locally.`\n )\n this.code = this.name = CommitNotFetchedError.code\n this.data = { ref, oid }\n }\n}\n/** @type {'CommitNotFetchedError'} */\nCommitNotFetchedError.code = 'CommitNotFetchedError'\n","import { BaseError } from './BaseError.js'\n\nexport class FastForwardError extends BaseError {\n constructor() {\n super(`A simple fast-forward merge was not possible.`)\n this.code = this.name = FastForwardError.code\n this.data = {}\n }\n}\n/** @type {'FastForwardError'} */\nFastForwardError.code = 'FastForwardError'\n","import '../typedefs.js'\nimport { BaseError } from './BaseError.js'\n\nexport class GitPushError extends BaseError {\n /**\n * @param {string} prettyDetails\n * @param {PushResult} result\n */\n constructor(prettyDetails, result) {\n super(`One or more branches were not updated: ${prettyDetails}`)\n this.code = this.name = GitPushError.code\n this.data = { prettyDetails, result }\n }\n}\n/** @type {'GitPushError'} */\nGitPushError.code = 'GitPushError'\n","import { BaseError } from './BaseError.js'\n\nexport class MaxDepthError extends BaseError {\n /**\n * @param {number} depth\n */\n constructor(depth) {\n super(`Maximum search depth of ${depth} exceeded.`)\n this.code = this.name = MaxDepthError.code\n this.data = { depth }\n }\n}\n/** @type {'MaxDepthError'} */\nMaxDepthError.code = 'MaxDepthError'\n","import { InternalError } from '../errors/InternalError.js'\nimport { UnsafeFilepathError } from '../errors/UnsafeFilepathError.js'\nimport { BufferCursor } from '../utils/BufferCursor.js'\nimport { comparePath } from '../utils/comparePath.js'\nimport { normalizeStats } from '../utils/normalizeStats.js'\nimport { shasum } from '../utils/shasum.js'\n\n// Extract 1-bit assume-valid, 1-bit extended flag, 2-bit merge state flag, 12-bit path length flag\nfunction parseCacheEntryFlags(bits) {\n return {\n assumeValid: Boolean(bits & 0b1000000000000000),\n extended: Boolean(bits & 0b0100000000000000),\n stage: (bits & 0b0011000000000000) >> 12,\n nameLength: bits & 0b0000111111111111,\n }\n}\n\nfunction renderCacheEntryFlags(entry) {\n const flags = entry.flags\n // 1-bit extended flag (must be zero in version 2)\n flags.extended = false\n // 12-bit name length if the length is less than 0xFFF; otherwise 0xFFF\n // is stored in this field.\n flags.nameLength = Math.min(Buffer.from(entry.path).length, 0xfff)\n return (\n (flags.assumeValid ? 0b1000000000000000 : 0) +\n (flags.extended ? 0b0100000000000000 : 0) +\n ((flags.stage & 0b11) << 12) +\n (flags.nameLength & 0b111111111111)\n )\n}\n\nexport class GitIndex {\n /*::\n _entries: Map<string, CacheEntry>\n _dirty: boolean // Used to determine if index needs to be saved to filesystem\n */\n constructor(entries) {\n this._dirty = false\n this._entries = entries || new Map()\n }\n\n static async from(buffer) {\n if (Buffer.isBuffer(buffer)) {\n return GitIndex.fromBuffer(buffer)\n } else if (buffer === null) {\n return new GitIndex(null)\n } else {\n throw new InternalError('invalid type passed to GitIndex.from')\n }\n }\n\n static async fromBuffer(buffer) {\n // Verify shasum\n const shaComputed = await shasum(buffer.slice(0, -20))\n const shaClaimed = buffer.slice(-20).toString('hex')\n if (shaClaimed !== shaComputed) {\n throw new InternalError(\n `Invalid checksum in GitIndex buffer: expected ${shaClaimed} but saw ${shaComputed}`\n )\n }\n const reader = new BufferCursor(buffer)\n const _entries = new Map()\n const magic = reader.toString('utf8', 4)\n if (magic !== 'DIRC') {\n throw new InternalError(`Inavlid dircache magic file number: ${magic}`)\n }\n const version = reader.readUInt32BE()\n if (version !== 2) {\n throw new InternalError(`Unsupported dircache version: ${version}`)\n }\n const numEntries = reader.readUInt32BE()\n let i = 0\n while (!reader.eof() && i < numEntries) {\n const entry = {}\n entry.ctimeSeconds = reader.readUInt32BE()\n entry.ctimeNanoseconds = reader.readUInt32BE()\n entry.mtimeSeconds = reader.readUInt32BE()\n entry.mtimeNanoseconds = reader.readUInt32BE()\n entry.dev = reader.readUInt32BE()\n entry.ino = reader.readUInt32BE()\n entry.mode = reader.readUInt32BE()\n entry.uid = reader.readUInt32BE()\n entry.gid = reader.readUInt32BE()\n entry.size = reader.readUInt32BE()\n entry.oid = reader.slice(20).toString('hex')\n const flags = reader.readUInt16BE()\n entry.flags = parseCacheEntryFlags(flags)\n // TODO: handle if (version === 3 && entry.flags.extended)\n const pathlength = buffer.indexOf(0, reader.tell() + 1) - reader.tell()\n if (pathlength < 1) {\n throw new InternalError(`Got a path length of: ${pathlength}`)\n }\n // TODO: handle pathnames larger than 12 bits\n entry.path = reader.toString('utf8', pathlength)\n\n // Prevent malicious paths like \"..\\foo\"\n if (entry.path.includes('..\\\\') || entry.path.includes('../')) {\n throw new UnsafeFilepathError(entry.path)\n }\n\n // The next bit is awkward. We expect 1 to 8 null characters\n // such that the total size of the entry is a multiple of 8 bits.\n // (Hence subtract 12 bytes for the header.)\n let padding = 8 - ((reader.tell() - 12) % 8)\n if (padding === 0) padding = 8\n while (padding--) {\n const tmp = reader.readUInt8()\n if (tmp !== 0) {\n throw new InternalError(\n `Expected 1-8 null characters but got '${tmp}' after ${entry.path}`\n )\n } else if (reader.eof()) {\n throw new InternalError('Unexpected end of file')\n }\n }\n // end of awkward part\n _entries.set(entry.path, entry)\n i++\n }\n return new GitIndex(_entries)\n }\n\n get entries() {\n return [...this._entries.values()].sort(comparePath)\n }\n\n get entriesMap() {\n return this._entries\n }\n\n *[Symbol.iterator]() {\n for (const entry of this.entries) {\n yield entry\n }\n }\n\n insert({ filepath, stats, oid }) {\n stats = normalizeStats(stats)\n const bfilepath = Buffer.from(filepath)\n const entry = {\n ctimeSeconds: stats.ctimeSeconds,\n ctimeNanoseconds: stats.ctimeNanoseconds,\n mtimeSeconds: stats.mtimeSeconds,\n mtimeNanoseconds: stats.mtimeNanoseconds,\n dev: stats.dev,\n ino: stats.ino,\n // We provide a fallback value for `mode` here because not all fs\n // implementations assign it, but we use it in GitTree.\n // '100644' is for a \"regular non-executable file\"\n mode: stats.mode || 0o100644,\n uid: stats.uid,\n gid: stats.gid,\n size: stats.size,\n path: filepath,\n oid: oid,\n flags: {\n assumeValid: false,\n extended: false,\n stage: 0,\n nameLength: bfilepath.length < 0xfff ? bfilepath.length : 0xfff,\n },\n }\n this._entries.set(entry.path, entry)\n this._dirty = true\n }\n\n delete({ filepath }) {\n if (this._entries.has(filepath)) {\n this._entries.delete(filepath)\n } else {\n for (const key of this._entries.keys()) {\n if (key.startsWith(filepath + '/')) {\n this._entries.delete(key)\n }\n }\n }\n this._dirty = true\n }\n\n clear() {\n this._entries.clear()\n this._dirty = true\n }\n\n render() {\n return this.entries\n .map(entry => `${entry.mode.toString(8)} ${entry.oid} ${entry.path}`)\n .join('\\n')\n }\n\n async toObject() {\n const header = Buffer.alloc(12)\n const writer = new BufferCursor(header)\n writer.write('DIRC', 4, 'utf8')\n writer.writeUInt32BE(2)\n writer.writeUInt32BE(this.entries.length)\n const body = Buffer.concat(\n this.entries.map(entry => {\n const bpath = Buffer.from(entry.path)\n // the fixed length + the filename + at least one null char => align by 8\n const length = Math.ceil((62 + bpath.length + 1) / 8) * 8\n const written = Buffer.alloc(length)\n const writer = new BufferCursor(written)\n const stat = normalizeStats(entry)\n writer.writeUInt32BE(stat.ctimeSeconds)\n writer.writeUInt32BE(stat.ctimeNanoseconds)\n writer.writeUInt32BE(stat.mtimeSeconds)\n writer.writeUInt32BE(stat.mtimeNanoseconds)\n writer.writeUInt32BE(stat.dev)\n writer.writeUInt32BE(stat.ino)\n writer.writeUInt32BE(stat.mode)\n writer.writeUInt32BE(stat.uid)\n writer.writeUInt32BE(stat.gid)\n writer.writeUInt32BE(stat.size)\n writer.write(entry.oid, 20, 'hex')\n writer.writeUInt16BE(renderCacheEntryFlags(entry))\n writer.write(entry.path, bpath.length, 'utf8')\n return written\n })\n )\n const main = Buffer.concat([header, body])\n const sum = await shasum(main)\n return Buffer.concat([main, Buffer.from(sum, 'hex')])\n }\n}\n","import { basename } from '../utils/basename.js'\nimport { dirname } from '../utils/dirname.js'\n\n/*::\ntype Node = {\n type: string,\n fullpath: string,\n basename: string,\n metadata: Object, // mode, oid\n parent?: Node,\n children: Array<Node>\n}\n*/\n\nexport function flatFileListToDirectoryStructure(files) {\n const inodes = new Map()\n const mkdir = function(name) {\n if (!inodes.has(name)) {\n const dir = {\n type: 'tree',\n fullpath: name,\n basename: basename(name),\n metadata: {},\n children: [],\n }\n inodes.set(name, dir)\n // This recursively generates any missing parent folders.\n // We do it after we've added the inode to the set so that\n // we don't recurse infinitely trying to create the root '.' dirname.\n dir.parent = mkdir(dirname(name))\n if (dir.parent && dir.parent !== dir) dir.parent.children.push(dir)\n }\n return inodes.get(name)\n }\n\n const mkfile = function(name, metadata) {\n if (!inodes.has(name)) {\n const file = {\n type: 'blob',\n fullpath: name,\n basename: basename(name),\n metadata: metadata,\n // This recursively generates any missing parent folders.\n parent: mkdir(dirname(name)),\n children: [],\n }\n if (file.parent) file.parent.children.push(file)\n inodes.set(name, file)\n }\n return inodes.get(name)\n }\n\n mkdir('.')\n for (const file of files) {\n mkfile(file.path, file)\n }\n return inodes\n}\n","// This is straight from parse_unit_factor in config.c of canonical git\nconst num = val => {\n val = val.toLowerCase()\n let n = parseInt(val)\n if (val.endsWith('k')) n *= 1024\n if (val.endsWith('m')) n *= 1024 * 1024\n if (val.endsWith('g')) n *= 1024 * 1024 * 1024\n return n\n}\n\n// This is straight from git_parse_maybe_bool_text in config.c of canonical git\nconst bool = val => {\n val = val.trim().toLowerCase()\n if (val === 'true' || val === 'yes' || val === 'on') return true\n if (val === 'false' || val === 'no' || val === 'off') return false\n throw Error(\n `Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${val}`\n )\n}\n\nconst schema = {\n core: {\n filemode: bool,\n bare: bool,\n logallrefupdates: bool,\n symlinks: bool,\n ignorecase: bool,\n bigFileThreshold: num,\n },\n}\n\n// https://git-scm.com/docs/git-config#_syntax\n\n// section starts with [ and ends with ]\n// section is alphanumeric (ASCII) with - and .\n// section is case insensitive\n// subsection is optionnal\n// subsection is specified after section and one or more spaces\n// subsection is specified between double quotes\nconst SECTION_LINE_REGEX = /^\\[([A-Za-z0-9-.]+)(?: \"(.*)\")?\\]$/\nconst SECTION_REGEX = /^[A-Za-z0-9-.]+$/\n\n// variable lines contain a name, and equal sign and then a value\n// variable lines can also only contain a name (the implicit value is a boolean true)\n// variable name is alphanumeric (ASCII) with -\n// variable name starts with an alphabetic character\n// variable name is case insensitive\nconst VARIABLE_LINE_REGEX = /^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/\nconst VARIABLE_NAME_REGEX = /^[A-Za-z][A-Za-z-]*$/\n\nconst VARIABLE_VALUE_COMMENT_REGEX = /^(.*?)( *[#;].*)$/\n\nconst extractSectionLine = line => {\n const matches = SECTION_LINE_REGEX.exec(line)\n if (matches != null) {\n const [section, subsection] = matches.slice(1)\n return [section, subsection]\n }\n return null\n}\n\nconst extractVariableLine = line => {\n const matches = VARIABLE_LINE_REGEX.exec(line)\n if (matches != null) {\n const [name, rawValue = 'true'] = matches.slice(1)\n const valueWithoutComments = removeComments(rawValue)\n const valueWithoutQuotes = removeQuotes(valueWithoutComments)\n return [name, valueWithoutQuotes]\n }\n return null\n}\n\nconst removeComments = rawValue => {\n const commentMatches = VARIABLE_VALUE_COMMENT_REGEX.exec(rawValue)\n if (commentMatches == null) {\n return rawValue\n }\n const [valueWithoutComment, comment] = commentMatches.slice(1)\n // if odd number of quotes before and after comment => comment is escaped\n if (\n hasOddNumberOfQuotes(valueWithoutComment) &&\n hasOddNumberOfQuotes(comment)\n ) {\n return `${valueWithoutComment}${comment}`\n }\n return valueWithoutComment\n}\n\nconst hasOddNumberOfQuotes = text => {\n const numberOfQuotes = (text.match(/(?:^|[^\\\\])\"/g) || []).length\n return numberOfQuotes % 2 !== 0\n}\n\nconst removeQuotes = text => {\n return text.split('').reduce((newText, c, idx, text) => {\n const isQuote = c === '\"' && text[idx - 1] !== '\\\\'\n const isEscapeForQuote = c === '\\\\' && text[idx + 1] === '\"'\n if (isQuote || isEscapeForQuote) {\n return newText\n }\n return newText + c\n }, '')\n}\n\nconst lower = text => {\n return text != null ? text.toLowerCase() : null\n}\n\nconst getPath = (section, subsection, name) => {\n return [lower(section), subsection, lower(name)]\n .filter(a => a != null)\n .join('.')\n}\n\nconst findLastIndex = (array, callback) => {\n return array.reduce((lastIndex, item, index) => {\n return callback(item) ? index : lastIndex\n }, -1)\n}\n\n// Note: there are a LOT of edge cases that aren't covered (e.g. keys in sections that also\n// have subsections, [include] directives, etc.\nexport class GitConfig {\n constructor(text) {\n let section = null\n let subsection = null\n this.parsedConfig = text.split('\\n').map(line => {\n let name = null\n let value = null\n\n const trimmedLine = line.trim()\n const extractedSection = extractSectionLine(trimmedLine)\n const isSection = extractedSection != null\n if (isSection) {\n ;[section, subsection] = extractedSection\n } else {\n const extractedVariable = extractVariableLine(trimmedLine)\n const isVariable = extractedVariable != null\n if (isVariable) {\n ;[name, value] = extractedVariable\n }\n }\n\n const path = getPath(section, subsection, name)\n return { line, isSection, section, subsection, name, value, path }\n })\n }\n\n static from(text) {\n return new GitConfig(text)\n }\n\n async get(path, getall = false) {\n const allValues = this.parsedConfig\n .filter(config => config.path === path.toLowerCase())\n .map(({ section, name, value }) => {\n const fn = schema[section] && schema[section][name]\n return fn ? fn(value) : value\n })\n return getall ? allValues : allValues.pop()\n }\n\n async getall(path) {\n return this.get(path, true)\n }\n\n async getSubsections(section) {\n return this.parsedConfig\n .filter(config => config.section === section && config.isSection)\n .map(config => config.subsection)\n }\n\n async deleteSection(section, subsection) {\n this.parsedConfig = this.parsedConfig.filter(\n config =>\n !(config.section === section && config.subsection === subsection)\n )\n }\n\n async append(path, value) {\n return this.set(path, value, true)\n }\n\n async set(path, value, append = false) {\n const configIndex = findLastIndex(\n this.parsedConfig,\n config => config.path === path.toLowerCase()\n )\n if (value == null) {\n if (configIndex !== -1) {\n this.parsedConfig.splice(configIndex, 1)\n }\n } else {\n if (configIndex !== -1) {\n const config = this.parsedConfig[configIndex]\n const modifiedConfig = Object.assign({}, config, {\n value,\n modified: true,\n })\n if (append) {\n this.parsedConfig.splice(configIndex + 1, 0, modifiedConfig)\n } else {\n this.parsedConfig[configIndex] = modifiedConfig\n }\n } else {\n const sectionPath = path\n .split('.')\n .slice(0, -1)\n .join('.')\n .toLowerCase()\n const sectionIndex = this.parsedConfig.findIndex(\n config => config.path === sectionPath\n )\n const [section, subsection] = sectionPath.split('.')\n const name = path.split('.').pop()\n const newConfig = {\n section,\n subsection,\n name,\n value,\n modified: true,\n path: getPath(section, subsection, name),\n }\n if (SECTION_REGEX.test(section) && VARIABLE_NAME_REGEX.test(name)) {\n if (sectionIndex >= 0) {\n // Reuse existing section\n this.parsedConfig.splice(sectionIndex + 1, 0, newConfig)\n } else {\n // Add a new section\n const newSection = {\n section,\n subsection,\n modified: true,\n path: getPath(section, subsection, null),\n }\n this.parsedConfig.push(newSection, newConfig)\n }\n }\n }\n }\n }\n\n toString() {\n return this.parsedConfig\n .map(({ line, section, subsection, name, value, modified = false }) => {\n if (!modified) {\n return line\n }\n if (name != null && value != null) {\n return `\\t${name} = ${value}`\n }\n if (subsection != null) {\n return `[${section} \"${subsection}\"]`\n }\n return `[${section}]`\n })\n .join('\\n')\n }\n}\n","import { GitRefSpec } from './GitRefSpec'\n\nexport class GitRefSpecSet {\n constructor(rules = []) {\n this.rules = rules\n }\n\n static from(refspecs) {\n const rules = []\n for (const refspec of refspecs) {\n rules.push(GitRefSpec.from(refspec)) // might throw\n }\n return new GitRefSpecSet(rules)\n }\n\n add(refspec) {\n const rule = GitRefSpec.from(refspec) // might throw\n this.rules.push(rule)\n }\n\n translate(remoteRefs) {\n const result = []\n for (const rule of this.rules) {\n for (const remoteRef of remoteRefs) {\n const localRef = rule.translate(remoteRef)\n if (localRef) {\n result.push([remoteRef, localRef])\n }\n }\n }\n return result\n }\n\n translateOne(remoteRef) {\n let result = null\n for (const rule of this.rules) {\n const localRef = rule.translate(remoteRef)\n if (localRef) {\n result = localRef\n }\n }\n return result\n }\n\n localNamespaces() {\n return this.rules\n .filter(rule => rule.matchPrefix)\n .map(rule => rule.localPath.replace(/\\/$/, ''))\n }\n}\n","import diff3Merge from 'diff3'\n\nconst LINEBREAKS = /^.*(\\r?\\n|$)/gm\n\nexport function mergeFile({\n ourContent,\n baseContent,\n theirContent,\n ourName = 'ours',\n baseName = 'base',\n theirName = 'theirs',\n format = 'diff',\n markerSize = 7,\n}) {\n const ours = ourContent.match(LINEBREAKS)\n const base = baseContent.match(LINEBREAKS)\n const theirs = theirContent.match(LINEBREAKS)\n\n // Here we let the diff3 library do the heavy lifting.\n const result = diff3Merge(ours, base, theirs)\n\n // Here we note whether there are conflicts and format the results\n let mergedText = ''\n let cleanMerge = true\n for (const item of result) {\n if (item.ok) {\n mergedText += item.ok.join('')\n }\n if (item.conflict) {\n cleanMerge = false\n mergedText += `${'<'.repeat(markerSize)} ${ourName}\\n`\n mergedText += item.conflict.a.join('')\n if (format === 'diff3') {\n mergedText += `${'|'.repeat(markerSize)} ${baseName}\\n`\n mergedText += item.conflict.o.join('')\n }\n mergedText += `${'='.repeat(markerSize)}\\n`\n mergedText += item.conflict.b.join('')\n mergedText += `${'>'.repeat(markerSize)} ${theirName}\\n`\n }\n }\n return { cleanMerge, mergedText }\n}\n","import Hash from 'sha.js/sha1.js'\n\nimport { types } from '../commands/types.js'\nimport { _readObject as readObject } from '../storage/readObject.js'\nimport { deflate } from '../utils/deflate.js'\nimport { join } from '../utils/join.js'\nimport { padHex } from '../utils/padHex.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string[]} args.oids\n */\nexport async function _pack({\n fs,\n cache,\n dir,\n gitdir = join(dir, '.git'),\n oids,\n}) {\n const hash = new Hash()\n const outputStream = []\n function write(chunk, enc) {\n const buff = Buffer.from(chunk, enc)\n outputStream.push(buff)\n hash.update(buff)\n }\n async function writeObject({ stype, object }) {\n // Object type is encoded in bits 654\n const type = types[stype]\n // The length encoding gets complicated.\n let length = object.length\n // Whether the next byte is part of the variable-length encoded number\n // is encoded in bit 7\n let multibyte = length > 0b1111 ? 0b10000000 : 0b0\n // Last four bits of length is encoded in bits 3210\n const lastFour = length & 0b1111\n // Discard those bits\n length = length >>> 4\n // The first byte is then (1-bit multibyte?), (3-bit type), (4-bit least sig 4-bits of length)\n let byte = (multibyte | type | lastFour).toString(16)\n write(byte, 'hex')\n // Now we keep chopping away at length 7-bits at a time until its zero,\n // writing out the bytes in what amounts to little-endian order.\n while (multibyte) {\n multibyte = length > 0b01111111 ? 0b10000000 : 0b0\n byte = multibyte | (length & 0b01111111)\n write(padHex(2, byte), 'hex')\n length = length >>> 7\n }\n // Lastly, we can compress and write the object.\n write(Buffer.from(await deflate(object)))\n }\n write('PACK')\n write('00000002', 'hex')\n // Write a 4 byte (32-bit) int\n write(padHex(8, oids.length), 'hex')\n for (const oid of oids) {\n const { type, object } = await readObject({ fs, cache, gitdir, oid })\n await writeObject({ write, object, stype: type })\n }\n // Write SHA1 checksum\n const digest = hash.digest()\n outputStream.push(digest)\n return outputStream\n}\n","// TODO: Should I just polyfill Array.flat?\nexport const flat =\n typeof Array.prototype.flat === 'undefined'\n ? entries => entries.reduce((acc, x) => acc.concat(x), [])\n : entries => entries.flat()\n","import { GitAnnotatedTag } from '../models/GitAnnotatedTag.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { GitTree } from '../models/GitTree.js'\nimport { _readObject as readObject } from '../storage/readObject.js'\nimport { join } from '../utils/join.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} [args.dir]\n * @param {string} args.gitdir\n * @param {Iterable<string>} args.oids\n * @returns {Promise<Set<string>>}\n */\nexport async function listObjects({\n fs,\n cache,\n dir,\n gitdir = join(dir, '.git'),\n oids,\n}) {\n const visited = new Set()\n // We don't do the purest simplest recursion, because we can\n // avoid reading Blob objects entirely since the Tree objects\n // tell us which oids are Blobs and which are Trees.\n async function walk(oid) {\n if (visited.has(oid)) return\n visited.add(oid)\n const { type, object } = await readObject({ fs, cache, gitdir, oid })\n if (type === 'tag') {\n const tag = GitAnnotatedTag.from(object)\n const obj = tag.headers().object\n await walk(obj)\n } else if (type === 'commit') {\n const commit = GitCommit.from(object)\n const tree = commit.headers().tree\n await walk(tree)\n } else if (type === 'tree') {\n const tree = GitTree.from(object)\n for (const entry of tree) {\n // add blobs to the set\n // skip over submodules whose type is 'commit'\n if (entry.type === 'blob') {\n visited.add(entry.oid)\n }\n // recurse for trees\n if (entry.type === 'tree') {\n await walk(entry.oid)\n }\n }\n }\n }\n // Let's go walking!\n for (const oid of oids) {\n await walk(oid)\n }\n return visited\n}\n","// @see https://git-scm.com/docs/git-rev-parse.html#_specifying_revisions\nconst abbreviateRx = new RegExp('^refs/(heads/|tags/|remotes/)?(.*)')\n\nexport function abbreviateRef(ref) {\n const match = abbreviateRx.exec(ref)\n if (match) {\n if (match[1] === 'remotes/' && ref.endsWith('/HEAD')) {\n return match[2].slice(0, -5)\n } else {\n return match[2]\n }\n }\n return ref\n}\n","export function extractAuthFromUrl(url) {\n // For whatever reason, the `fetch` API does not convert credentials embedded in the URL\n // into Basic Authentication headers automatically. Instead it throws an error!\n // So we must manually parse the URL, rip out the user:password portion if it is present\n // and compute the Authorization header.\n // Note: I tried using new URL(url) but that throws a security exception in Edge. :rolleyes:\n let userpass = url.match(/^https?:\\/\\/([^/]+)@/)\n // No credentials, return the url unmodified and an empty auth object\n if (userpass == null) return { url, auth: {} }\n userpass = userpass[1]\n const [username, password] = userpass.split(':')\n // Remove credentials from URL\n url = url.replace(`${userpass}@`, '')\n // Has credentials, return the fetch-safe URL and the parsed credentials\n return { url, auth: { username, password } }\n}\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitTree } from '../models/GitTree.js'\nimport { _writeObject as writeObject } from '../storage/writeObject.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {TreeObject} args.tree\n *\n * @returns {Promise<string>}\n */\nexport async function _writeTree({ fs, gitdir, tree }) {\n // Convert object to buffer\n const object = GitTree.from(tree).toObject()\n const oid = await writeObject({\n fs,\n gitdir,\n type: 'tree',\n object,\n format: 'content',\n })\n return oid\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _currentBranch } from '../commands/currentBranch.js'\nimport { MissingParameterError } from '../errors/MissingParameterError.js'\nimport { RemoteCapabilityError } from '../errors/RemoteCapabilityError.js'\nimport { GitConfigManager } from '../managers/GitConfigManager.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { GitRemoteManager } from '../managers/GitRemoteManager.js'\nimport { GitShallowManager } from '../managers/GitShallowManager.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { GitPackIndex } from '../models/GitPackIndex.js'\nimport { hasObject } from '../storage/hasObject.js'\nimport { _readObject as readObject } from '../storage/readObject.js'\nimport { abbreviateRef } from '../utils/abbreviateRef.js'\nimport { collect } from '../utils/collect.js'\nimport { emptyPackfile } from '../utils/emptyPackfile.js'\nimport { filterCapabilities } from '../utils/filterCapabilities.js'\nimport { forAwait } from '../utils/forAwait.js'\nimport { join } from '../utils/join.js'\nimport { pkg } from '../utils/pkg.js'\nimport { splitLines } from '../utils/splitLines.js'\nimport { parseUploadPackResponse } from '../wire/parseUploadPackResponse.js'\nimport { writeUploadPackRequest } from '../wire/writeUploadPackRequest.js'\n\n/**\n *\n * @typedef {object} FetchResult - The object returned has the following schema:\n * @property {string | null} defaultBranch - The branch that is cloned if no branch is specified\n * @property {string | null} fetchHead - The SHA-1 object id of the fetched head commit\n * @property {string | null} fetchHeadDescription - a textual description of the branch that was fetched\n * @property {Object<string, string>} [headers] - The HTTP response headers returned by the git server\n * @property {string[]} [pruned] - A list of branches that were pruned, if you provided the `prune` parameter\n *\n */\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {HttpClient} args.http\n * @param {ProgressCallback} [args.onProgress]\n * @param {MessageCallback} [args.onMessage]\n * @param {AuthCallback} [args.onAuth]\n * @param {AuthFailureCallback} [args.onAuthFailure]\n * @param {AuthSuccessCallback} [args.onAuthSuccess]\n * @param {string} args.gitdir\n * @param {string|void} [args.url]\n * @param {string} [args.corsProxy]\n * @param {string} [args.ref]\n * @param {string} [args.remoteRef]\n * @param {string} [args.remote]\n * @param {boolean} [args.singleBranch = false]\n * @param {boolean} [args.tags = false]\n * @param {number} [args.depth]\n * @param {Date} [args.since]\n * @param {string[]} [args.exclude = []]\n * @param {boolean} [args.relative = false]\n * @param {Object<string, string>} [args.headers]\n * @param {boolean} [args.prune]\n * @param {boolean} [args.pruneTags]\n *\n * @returns {Promise<FetchResult>}\n * @see FetchResult\n */\nexport async function _fetch({\n fs,\n cache,\n http,\n onProgress,\n onMessage,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n gitdir,\n ref: _ref,\n remoteRef: _remoteRef,\n remote: _remote,\n url: _url,\n corsProxy,\n depth = null,\n since = null,\n exclude = [],\n relative = false,\n tags = false,\n singleBranch = false,\n headers = {},\n prune = false,\n pruneTags = false,\n}) {\n const ref = _ref || (await _currentBranch({ fs, gitdir, test: true }))\n const config = await GitConfigManager.get({ fs, gitdir })\n // Figure out what remote to use.\n const remote =\n _remote || (ref && (await config.get(`branch.${ref}.remote`))) || 'origin'\n // Lookup the URL for the given remote.\n const url = _url || (await config.get(`remote.${remote}.url`))\n if (typeof url === 'undefined') {\n throw new MissingParameterError('remote OR url')\n }\n // Figure out what remote ref to use.\n const remoteRef =\n _remoteRef ||\n (ref && (await config.get(`branch.${ref}.merge`))) ||\n _ref ||\n 'HEAD'\n\n if (corsProxy === undefined) {\n corsProxy = await config.get('http.corsProxy')\n }\n\n const GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url })\n const remoteHTTP = await GitRemoteHTTP.discover({\n http,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n corsProxy,\n service: 'git-upload-pack',\n url,\n headers,\n protocolVersion: 1,\n })\n const auth = remoteHTTP.auth // hack to get new credentials from CredentialManager API\n const remoteRefs = remoteHTTP.refs\n // For the special case of an empty repository with no refs, return null.\n if (remoteRefs.size === 0) {\n return {\n defaultBranch: null,\n fetchHead: null,\n fetchHeadDescription: null,\n }\n }\n // Check that the remote supports the requested features\n if (depth !== null && !remoteHTTP.capabilities.has('shallow')) {\n throw new RemoteCapabilityError('shallow', 'depth')\n }\n if (since !== null && !remoteHTTP.capabilities.has('deepen-since')) {\n throw new RemoteCapabilityError('deepen-since', 'since')\n }\n if (exclude.length > 0 && !remoteHTTP.capabilities.has('deepen-not')) {\n throw new RemoteCapabilityError('deepen-not', 'exclude')\n }\n if (relative === true && !remoteHTTP.capabilities.has('deepen-relative')) {\n throw new RemoteCapabilityError('deepen-relative', 'relative')\n }\n // Figure out the SHA for the requested ref\n const { oid, fullref } = GitRefManager.resolveAgainstMap({\n ref: remoteRef,\n map: remoteRefs,\n })\n // Filter out refs we want to ignore: only keep ref we're cloning, HEAD, branches, and tags (if we're keeping them)\n for (const remoteRef of remoteRefs.keys()) {\n if (\n remoteRef === fullref ||\n remoteRef === 'HEAD' ||\n remoteRef.startsWith('refs/heads/') ||\n (tags && remoteRef.startsWith('refs/tags/'))\n ) {\n continue\n }\n remoteRefs.delete(remoteRef)\n }\n // Assemble the application/x-git-upload-pack-request\n const capabilities = filterCapabilities(\n [...remoteHTTP.capabilities],\n [\n 'multi_ack_detailed',\n 'no-done',\n 'side-band-64k',\n // Note: I removed 'thin-pack' option since our code doesn't \"fatten\" packfiles,\n // which is necessary for compatibility with git. It was the cause of mysterious\n // 'fatal: pack has [x] unresolved deltas' errors that plagued us for some time.\n // isomorphic-git is perfectly happy with thin packfiles in .git/objects/pack but\n // canonical git it turns out is NOT.\n 'ofs-delta',\n `agent=${pkg.agent}`,\n ]\n )\n if (relative) capabilities.push('deepen-relative')\n // Start figuring out which oids from the remote we want to request\n const wants = singleBranch ? [oid] : remoteRefs.values()\n // Come up with a reasonable list of oids to tell the remote we already have\n // (preferably oids that are close ancestors of the branch heads we're fetching)\n const haveRefs = singleBranch\n ? [ref]\n : await GitRefManager.listRefs({\n fs,\n gitdir,\n filepath: `refs`,\n })\n let haves = []\n for (let ref of haveRefs) {\n try {\n ref = await GitRefManager.expand({ fs, gitdir, ref })\n const oid = await GitRefManager.resolve({ fs, gitdir, ref })\n if (await hasObject({ fs, cache, gitdir, oid })) {\n haves.push(oid)\n }\n } catch (err) {}\n }\n haves = [...new Set(haves)]\n const oids = await GitShallowManager.read({ fs, gitdir })\n const shallows = remoteHTTP.capabilities.has('shallow') ? [...oids] : []\n const packstream = writeUploadPackRequest({\n capabilities,\n wants,\n haves,\n shallows,\n depth,\n since,\n exclude,\n })\n // CodeCommit will hang up if we don't send a Content-Length header\n // so we can't stream the body.\n const packbuffer = Buffer.from(await collect(packstream))\n const raw = await GitRemoteHTTP.connect({\n http,\n onProgress,\n corsProxy,\n service: 'git-upload-pack',\n url,\n auth,\n body: [packbuffer],\n headers,\n })\n const response = await parseUploadPackResponse(raw.body)\n if (raw.headers) {\n response.headers = raw.headers\n }\n // Apply all the 'shallow' and 'unshallow' commands\n for (const oid of response.shallows) {\n if (!oids.has(oid)) {\n // this is in a try/catch mostly because my old test fixtures are missing objects\n try {\n // server says it's shallow, but do we have the parents?\n const { object } = await readObject({ fs, cache, gitdir, oid })\n const commit = new GitCommit(object)\n const hasParents = await Promise.all(\n commit\n .headers()\n .parent.map(oid => hasObject({ fs, cache, gitdir, oid }))\n )\n const haveAllParents =\n hasParents.length === 0 || hasParents.every(has => has)\n if (!haveAllParents) {\n oids.add(oid)\n }\n } catch (err) {\n oids.add(oid)\n }\n }\n }\n for (const oid of response.unshallows) {\n oids.delete(oid)\n }\n await GitShallowManager.write({ fs, gitdir, oids })\n // Update local remote refs\n if (singleBranch) {\n const refs = new Map([[fullref, oid]])\n // But wait, maybe it was a symref, like 'HEAD'!\n // We need to save all the refs in the symref chain (sigh).\n const symrefs = new Map()\n let bail = 10\n let key = fullref\n while (bail--) {\n const value = remoteHTTP.symrefs.get(key)\n if (value === undefined) break\n symrefs.set(key, value)\n key = value\n }\n // final value must not be a symref but a real ref\n const realRef = remoteRefs.get(key)\n // There may be no ref at all if we've fetched a specific commit hash\n if (realRef) {\n refs.set(key, realRef)\n }\n const { pruned } = await GitRefManager.updateRemoteRefs({\n fs,\n gitdir,\n remote,\n refs,\n symrefs,\n tags,\n prune,\n })\n if (prune) {\n response.pruned = pruned\n }\n } else {\n const { pruned } = await GitRefManager.updateRemoteRefs({\n fs,\n gitdir,\n remote,\n refs: remoteRefs,\n symrefs: remoteHTTP.symrefs,\n tags,\n prune,\n pruneTags,\n })\n if (prune) {\n response.pruned = pruned\n }\n }\n // We need this value later for the `clone` command.\n response.HEAD = remoteHTTP.symrefs.get('HEAD')\n // AWS CodeCommit doesn't list HEAD as a symref, but we can reverse engineer it\n // Find the SHA of the branch called HEAD\n if (response.HEAD === undefined) {\n const { oid } = GitRefManager.resolveAgainstMap({\n ref: 'HEAD',\n map: remoteRefs,\n })\n // Use the name of the first branch that's not called HEAD that has\n // the same SHA as the branch called HEAD.\n for (const [key, value] of remoteRefs.entries()) {\n if (key !== 'HEAD' && value === oid) {\n response.HEAD = key\n break\n }\n }\n }\n const noun = fullref.startsWith('refs/tags') ? 'tag' : 'branch'\n response.FETCH_HEAD = {\n oid,\n description: `${noun} '${abbreviateRef(fullref)}' of ${url}`,\n }\n\n if (onProgress || onMessage) {\n const lines = splitLines(response.progress)\n forAwait(lines, async line => {\n if (onMessage) await onMessage(line)\n if (onProgress) {\n const matches = line.match(/([^:]*).*\\((\\d+?)\\/(\\d+?)\\)/)\n if (matches) {\n await onProgress({\n phase: matches[1].trim(),\n loaded: parseInt(matches[2], 10),\n total: parseInt(matches[3], 10),\n })\n }\n }\n })\n }\n const packfile = Buffer.from(await collect(response.packfile))\n const packfileSha = packfile.slice(-20).toString('hex')\n const res = {\n defaultBranch: response.HEAD,\n fetchHead: response.FETCH_HEAD.oid,\n fetchHeadDescription: response.FETCH_HEAD.description,\n }\n if (response.headers) {\n res.headers = response.headers\n }\n if (prune) {\n res.pruned = response.pruned\n }\n // This is a quick fix for the empty .git/objects/pack/pack-.pack file error,\n // which due to the way `git-list-pack` works causes the program to hang when it tries to read it.\n // TODO: Longer term, we should actually:\n // a) NOT concatenate the entire packfile into memory (line 78),\n // b) compute the SHA of the stream except for the last 20 bytes, using the same library used in push.js, and\n // c) compare the computed SHA with the last 20 bytes of the stream before saving to disk, and throwing a \"packfile got corrupted during download\" error if the SHA doesn't match.\n if (packfileSha !== '' && !emptyPackfile(packfile)) {\n res.packfile = `objects/pack/pack-${packfileSha}.pack`\n const fullpath = join(gitdir, res.packfile)\n await fs.write(fullpath, packfile)\n const getExternalRefDelta = oid => readObject({ fs, cache, gitdir, oid })\n const idx = await GitPackIndex.fromPack({\n pack: packfile,\n getExternalRefDelta,\n onProgress,\n })\n await fs.write(fullpath.replace(/\\.pack$/, '.idx'), await idx.toBuffer())\n }\n return res\n}\n","/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction adler32(adler, buf, len, pos) {\n var s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n","'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable,\n end = pos + len;\n\n crc ^= -1;\n\n for (var i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n","// String encode/decode helpers\n'use strict';\n\n\nvar utils = require('./common');\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new utils.Buf8(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n }\n }\n\n var result = '';\n for (var i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function (buf) {\n return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function (str) {\n var buf = new utils.Buf8(str.length);\n for (var i = 0, len = buf.length; i < len; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n var i, out, c, c_len;\n var len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nexports.utf8border = function (buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nmodule.exports = ZStream;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n //Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n","import { GitPktLine } from '../models/GitPktLine.js'\n\nexport function writeUploadPackRequest({\n capabilities = [],\n wants = [],\n haves = [],\n shallows = [],\n depth = null,\n since = null,\n exclude = [],\n}) {\n const packstream = []\n wants = [...new Set(wants)] // remove duplicates\n let firstLineCapabilities = ` ${capabilities.join(' ')}`\n for (const oid of wants) {\n packstream.push(GitPktLine.encode(`want ${oid}${firstLineCapabilities}\\n`))\n firstLineCapabilities = ''\n }\n for (const oid of shallows) {\n packstream.push(GitPktLine.encode(`shallow ${oid}\\n`))\n }\n if (depth !== null) {\n packstream.push(GitPktLine.encode(`deepen ${depth}\\n`))\n }\n if (since !== null) {\n packstream.push(\n GitPktLine.encode(`deepen-since ${Math.floor(since.valueOf() / 1000)}\\n`)\n )\n }\n for (const oid of exclude) {\n packstream.push(GitPktLine.encode(`deepen-not ${oid}\\n`))\n }\n packstream.push(GitPktLine.flush())\n for (const oid of haves) {\n packstream.push(GitPktLine.encode(`have ${oid}\\n`))\n }\n packstream.push(GitPktLine.encode(`done\\n`))\n return packstream\n}\n","import { InvalidOidError } from '../errors/InvalidOidError.js'\nimport { GitSideBand } from '../models/GitSideBand.js'\nimport { forAwait } from '../utils/forAwait.js'\n\nexport async function parseUploadPackResponse(stream) {\n const { packetlines, packfile, progress } = GitSideBand.demux(stream)\n const shallows = []\n const unshallows = []\n const acks = []\n let nak = false\n let done = false\n return new Promise((resolve, reject) => {\n // Parse the response\n forAwait(packetlines, data => {\n const line = data.toString('utf8').trim()\n if (line.startsWith('shallow')) {\n const oid = line.slice(-41).trim()\n if (oid.length !== 40) {\n reject(new InvalidOidError(oid))\n }\n shallows.push(oid)\n } else if (line.startsWith('unshallow')) {\n const oid = line.slice(-41).trim()\n if (oid.length !== 40) {\n reject(new InvalidOidError(oid))\n }\n unshallows.push(oid)\n } else if (line.startsWith('ACK')) {\n const [, oid, status] = line.split(' ')\n acks.push({ oid, status })\n if (!status) done = true\n } else if (line.startsWith('NAK')) {\n nak = true\n done = true\n }\n if (done) {\n resolve({ shallows, unshallows, acks, nak, packfile, progress })\n }\n })\n })\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { TREE } from '../commands/TREE.js'\nimport { _walk } from '../commands/walk.js'\nimport { MergeNotSupportedError } from '../errors/MergeNotSupportedError.js'\nimport { GitTree } from '../models/GitTree.js'\nimport { _writeObject as writeObject } from '../storage/writeObject.js'\n\nimport { basename } from './basename.js'\nimport { join } from './join.js'\nimport { mergeFile } from './mergeFile.js'\n\n/**\n * Create a merged tree\n *\n * @param {Object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {object} args.cache\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ourOid - The SHA-1 object id of our tree\n * @param {string} args.baseOid - The SHA-1 object id of the base tree\n * @param {string} args.theirOid - The SHA-1 object id of their tree\n * @param {string} [args.ourName='ours'] - The name to use in conflicted files for our hunks\n * @param {string} [args.baseName='base'] - The name to use in conflicted files (in diff3 format) for the base hunks\n * @param {string} [args.theirName='theirs'] - The name to use in conflicted files for their hunks\n * @param {boolean} [args.dryRun=false]\n *\n * @returns {Promise<string>} - The SHA-1 object id of the merged tree\n *\n */\nexport async function mergeTree({\n fs,\n cache,\n dir,\n gitdir = join(dir, '.git'),\n ourOid,\n baseOid,\n theirOid,\n ourName = 'ours',\n baseName = 'base',\n theirName = 'theirs',\n dryRun = false,\n}) {\n const ourTree = TREE({ ref: ourOid })\n const baseTree = TREE({ ref: baseOid })\n const theirTree = TREE({ ref: theirOid })\n\n const results = await _walk({\n fs,\n cache,\n dir,\n gitdir,\n trees: [ourTree, baseTree, theirTree],\n map: async function(filepath, [ours, base, theirs]) {\n const path = basename(filepath)\n // What we did, what they did\n const ourChange = await modified(ours, base)\n const theirChange = await modified(theirs, base)\n switch (`${ourChange}-${theirChange}`) {\n case 'false-false': {\n return {\n mode: await base.mode(),\n path,\n oid: await base.oid(),\n type: await base.type(),\n }\n }\n case 'false-true': {\n return theirs\n ? {\n mode: await theirs.mode(),\n path,\n oid: await theirs.oid(),\n type: await theirs.type(),\n }\n : undefined\n }\n case 'true-false': {\n return ours\n ? {\n mode: await ours.mode(),\n path,\n oid: await ours.oid(),\n type: await ours.type(),\n }\n : undefined\n }\n case 'true-true': {\n // Modifications\n if (\n ours &&\n base &&\n theirs &&\n (await ours.type()) === 'blob' &&\n (await base.type()) === 'blob' &&\n (await theirs.type()) === 'blob'\n ) {\n return mergeBlobs({\n fs,\n gitdir,\n path,\n ours,\n base,\n theirs,\n ourName,\n baseName,\n theirName,\n })\n }\n // all other types of conflicts fail\n throw new MergeNotSupportedError()\n }\n }\n },\n /**\n * @param {TreeEntry} [parent]\n * @param {Array<TreeEntry>} children\n */\n reduce: async (parent, children) => {\n const entries = children.filter(Boolean) // remove undefineds\n\n // if the parent was deleted, the children have to go\n if (!parent) return\n\n // automatically delete directories if they have been emptied\n if (parent && parent.type === 'tree' && entries.length === 0) return\n\n if (entries.length > 0) {\n const tree = new GitTree(entries)\n const object = tree.toObject()\n const oid = await writeObject({\n fs,\n gitdir,\n type: 'tree',\n object,\n dryRun,\n })\n parent.oid = oid\n }\n return parent\n },\n })\n return results.oid\n}\n\n/**\n *\n * @param {WalkerEntry} entry\n * @param {WalkerEntry} base\n *\n */\nasync function modified(entry, base) {\n if (!entry && !base) return false\n if (entry && !base) return true\n if (!entry && base) return true\n if ((await entry.type()) === 'tree' && (await base.type()) === 'tree') {\n return false\n }\n if (\n (await entry.type()) === (await base.type()) &&\n (await entry.mode()) === (await base.mode()) &&\n (await entry.oid()) === (await base.oid())\n ) {\n return false\n }\n return true\n}\n\n/**\n *\n * @param {Object} args\n * @param {import('../models/FileSystem').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {string} args.path\n * @param {WalkerEntry} args.ours\n * @param {WalkerEntry} args.base\n * @param {WalkerEntry} args.theirs\n * @param {string} [args.ourName]\n * @param {string} [args.baseName]\n * @param {string} [args.theirName]\n * @param {string} [args.format]\n * @param {number} [args.markerSize]\n * @param {boolean} [args.dryRun = false]\n *\n */\nasync function mergeBlobs({\n fs,\n gitdir,\n path,\n ours,\n base,\n theirs,\n ourName,\n theirName,\n baseName,\n format,\n markerSize,\n dryRun,\n}) {\n const type = 'blob'\n // Compute the new mode.\n // Since there are ONLY two valid blob modes ('100755' and '100644') it boils down to this\n const mode =\n (await base.mode()) === (await ours.mode())\n ? await theirs.mode()\n : await ours.mode()\n // The trivial case: nothing to merge except maybe mode\n if ((await ours.oid()) === (await theirs.oid())) {\n return { mode, path, oid: await ours.oid(), type }\n }\n // if only one side made oid changes, return that side's oid\n if ((await ours.oid()) === (await base.oid())) {\n return { mode, path, oid: await theirs.oid(), type }\n }\n if ((await theirs.oid()) === (await base.oid())) {\n return { mode, path, oid: await ours.oid(), type }\n }\n // if both sides made changes do a merge\n const { mergedText, cleanMerge } = mergeFile({\n ourContent: Buffer.from(await ours.content()).toString('utf8'),\n baseContent: Buffer.from(await base.content()).toString('utf8'),\n theirContent: Buffer.from(await theirs.content()).toString('utf8'),\n ourName,\n theirName,\n baseName,\n format,\n markerSize,\n })\n if (!cleanMerge) {\n // all other types of conflicts fail\n throw new MergeNotSupportedError()\n }\n const oid = await writeObject({\n fs,\n gitdir,\n type: 'blob',\n object: Buffer.from(mergedText, 'utf8'),\n dryRun,\n })\n return { mode, path, oid, type }\n}\n","import { ObjectTypeError } from '../errors/ObjectTypeError.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { GitShallowManager } from '../managers/GitShallowManager.js'\nimport { GitAnnotatedTag } from '../models/GitAnnotatedTag.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { _readObject as readObject } from '../storage/readObject.js'\nimport { join } from '../utils/join.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} [args.dir]\n * @param {string} args.gitdir\n * @param {Iterable<string>} args.start\n * @param {Iterable<string>} args.finish\n * @returns {Promise<Set<string>>}\n */\nexport async function listCommitsAndTags({\n fs,\n cache,\n dir,\n gitdir = join(dir, '.git'),\n start,\n finish,\n}) {\n const shallows = await GitShallowManager.read({ fs, gitdir })\n const startingSet = new Set()\n const finishingSet = new Set()\n for (const ref of start) {\n startingSet.add(await GitRefManager.resolve({ fs, gitdir, ref }))\n }\n for (const ref of finish) {\n // We may not have these refs locally so we must try/catch\n try {\n const oid = await GitRefManager.resolve({ fs, gitdir, ref })\n finishingSet.add(oid)\n } catch (err) {}\n }\n const visited = new Set()\n // Because git commits are named by their hash, there is no\n // way to construct a cycle. Therefore we won't worry about\n // setting a default recursion limit.\n async function walk(oid) {\n visited.add(oid)\n const { type, object } = await readObject({ fs, cache, gitdir, oid })\n // Recursively resolve annotated tags\n if (type === 'tag') {\n const tag = GitAnnotatedTag.from(object)\n const commit = tag.headers().object\n return walk(commit)\n }\n if (type !== 'commit') {\n throw new ObjectTypeError(oid, type, 'commit')\n }\n if (!shallows.has(oid)) {\n const commit = GitCommit.from(object)\n const parents = commit.headers().parent\n for (oid of parents) {\n if (!finishingSet.has(oid) && !visited.has(oid)) {\n await walk(oid)\n }\n }\n }\n }\n // Let's go walking!\n for (const oid of startingSet) {\n await walk(oid)\n }\n return visited\n}\n","import { GitPktLine } from '../models/GitPktLine.js'\n\nexport async function writeReceivePackRequest({\n capabilities = [],\n triplets = [],\n}) {\n const packstream = []\n let capsFirstLine = `\\x00 ${capabilities.join(' ')}`\n for (const trip of triplets) {\n packstream.push(\n GitPktLine.encode(\n `${trip.oldoid} ${trip.oid} ${trip.fullRef}${capsFirstLine}\\n`\n )\n )\n capsFirstLine = ''\n }\n packstream.push(GitPktLine.flush())\n return packstream\n}\n","import '../typedefs.js'\n\nimport { ParseError } from '../errors/ParseError.js'\nimport { GitPktLine } from '../models/GitPktLine.js'\n\nexport async function parseReceivePackResponse(packfile) {\n /** @type PushResult */\n const result = {}\n let response = ''\n const read = GitPktLine.streamReader(packfile)\n let line = await read()\n while (line !== true) {\n if (line !== null) response += line.toString('utf8') + '\\n'\n line = await read()\n }\n\n const lines = response.toString('utf8').split('\\n')\n // We're expecting \"unpack {unpack-result}\"\n line = lines.shift()\n if (!line.startsWith('unpack ')) {\n throw new ParseError('unpack ok\" or \"unpack [error message]', line)\n }\n result.ok = line === 'unpack ok'\n if (!result.ok) {\n result.error = line.slice('unpack '.length)\n }\n result.refs = {}\n for (const line of lines) {\n if (line.trim() === '') continue\n const status = line.slice(0, 2)\n const refAndMessage = line.slice(3)\n let space = refAndMessage.indexOf(' ')\n if (space === -1) space = refAndMessage.length\n const ref = refAndMessage.slice(0, space)\n const error = refAndMessage.slice(space + 1)\n result.refs[ref] = {\n ok: status === 'ok',\n error,\n }\n }\n return result\n}\n","import { compareStrings } from './compareStrings'\n\nexport function compareTreeEntryPath(a, b) {\n // Git sorts tree entries as if there is a trailing slash on directory names.\n return compareStrings(appendSlashIfDir(a), appendSlashIfDir(b))\n}\n\nfunction appendSlashIfDir(entry) {\n return entry.mode === '040000' ? entry.path + '/' : entry.path\n}\n","export async function readObjectLoose({ fs, gitdir, oid }) {\n const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`\n const file = await fs.read(`${gitdir}/${source}`)\n if (!file) {\n return null\n }\n return { object: file, format: 'deflated', source }\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { readPackIndex } from '../storage/readPackIndex.js'\nimport { join } from '../utils/join.js'\n\nexport async function readObjectPacked({\n fs,\n cache,\n gitdir,\n oid,\n format = 'content',\n getExternalRefDelta,\n}) {\n // Check to see if it's in a packfile.\n // Iterate through all the .idx files\n let list = await fs.readdir(join(gitdir, 'objects/pack'))\n list = list.filter(x => x.endsWith('.idx'))\n for (const filename of list) {\n const indexFile = `${gitdir}/objects/pack/${filename}`\n const p = await readPackIndex({\n fs,\n cache,\n filename: indexFile,\n getExternalRefDelta,\n })\n if (p.error) throw new InternalError(p.error)\n // If the packfile DOES have the oid we're looking for...\n if (p.offsets.has(oid)) {\n // Get the resolved git object from the packfile\n if (!p.pack) {\n const packFile = indexFile.replace(/idx$/, 'pack')\n p.pack = fs.read(packFile)\n }\n const result = await p.read({ oid, getExternalRefDelta })\n result.format = 'content'\n result.source = `objects/pack/${filename.replace(/idx$/, 'pack')}`\n return result\n }\n }\n // Failed to find it\n return null\n}\n","/* crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */\n/* vim: set ts=2: */\n/*exported CRC32 */\nvar CRC32;\n(function (factory) {\n\t/*jshint ignore:start */\n\t/*eslint-disable */\n\tif(typeof DO_NOT_EXPORT_CRC === 'undefined') {\n\t\tif('object' === typeof exports) {\n\t\t\tfactory(exports);\n\t\t} else if ('function' === typeof define && define.amd) {\n\t\t\tdefine(function () {\n\t\t\t\tvar module = {};\n\t\t\t\tfactory(module);\n\t\t\t\treturn module;\n\t\t\t});\n\t\t} else {\n\t\t\tfactory(CRC32 = {});\n\t\t}\n\t} else {\n\t\tfactory(CRC32 = {});\n\t}\n\t/*eslint-enable */\n\t/*jshint ignore:end */\n}(function(CRC32) {\nCRC32.version = '1.2.0';\n/* see perf/crc32table.js */\n/*global Int32Array */\nfunction signed_crc_table() {\n\tvar c = 0, table = new Array(256);\n\n\tfor(var n =0; n != 256; ++n){\n\t\tc = n;\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\ttable[n] = c;\n\t}\n\n\treturn typeof Int32Array !== 'undefined' ? new Int32Array(table) : table;\n}\n\nvar T = signed_crc_table();\nfunction crc32_bstr(bstr, seed) {\n\tvar C = seed ^ -1, L = bstr.length - 1;\n\tfor(var i = 0; i < L;) {\n\t\tC = (C>>>8) ^ T[(C^bstr.charCodeAt(i++))&0xFF];\n\t\tC = (C>>>8) ^ T[(C^bstr.charCodeAt(i++))&0xFF];\n\t}\n\tif(i === L) C = (C>>>8) ^ T[(C ^ bstr.charCodeAt(i))&0xFF];\n\treturn C ^ -1;\n}\n\nfunction crc32_buf(buf, seed) {\n\tif(buf.length > 10000) return crc32_buf_8(buf, seed);\n\tvar C = seed ^ -1, L = buf.length - 3;\n\tfor(var i = 0; i < L;) {\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t}\n\twhile(i < L+3) C = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\treturn C ^ -1;\n}\n\nfunction crc32_buf_8(buf, seed) {\n\tvar C = seed ^ -1, L = buf.length - 7;\n\tfor(var i = 0; i < L;) {\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t}\n\twhile(i < L+7) C = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\treturn C ^ -1;\n}\n\nfunction crc32_str(str, seed) {\n\tvar C = seed ^ -1;\n\tfor(var i = 0, L=str.length, c, d; i < L;) {\n\t\tc = str.charCodeAt(i++);\n\t\tif(c < 0x80) {\n\t\t\tC = (C>>>8) ^ T[(C ^ c)&0xFF];\n\t\t} else if(c < 0x800) {\n\t\t\tC = (C>>>8) ^ T[(C ^ (192|((c>>6)&31)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|(c&63)))&0xFF];\n\t\t} else if(c >= 0xD800 && c < 0xE000) {\n\t\t\tc = (c&1023)+64; d = str.charCodeAt(i++)&1023;\n\t\t\tC = (C>>>8) ^ T[(C ^ (240|((c>>8)&7)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|((c>>2)&63)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|((d>>6)&15)|((c&3)<<4)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|(d&63)))&0xFF];\n\t\t} else {\n\t\t\tC = (C>>>8) ^ T[(C ^ (224|((c>>12)&15)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|((c>>6)&63)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|(c&63)))&0xFF];\n\t\t}\n\t}\n\treturn C ^ -1;\n}\nCRC32.table = T;\n// $FlowIgnore\nCRC32.bstr = crc32_bstr;\n// $FlowIgnore\nCRC32.buf = crc32_buf;\n// $FlowIgnore\nCRC32.str = crc32_str;\n}));\n","// My version of git-list-pack - roughly 15x faster than the original\n// It's used slightly differently - instead of returning a through stream it wraps a stream.\n// (I tried to make it API identical, but that ended up being 2x slower than this version.)\nimport pako from 'pako'\n\nimport { InternalError } from '../errors/InternalError.js'\nimport { StreamReader } from '../utils/StreamReader.js'\n\nexport async function listpack(stream, onData) {\n const reader = new StreamReader(stream)\n let PACK = await reader.read(4)\n PACK = PACK.toString('utf8')\n if (PACK !== 'PACK') {\n throw new InternalError(`Invalid PACK header '${PACK}'`)\n }\n\n let version = await reader.read(4)\n version = version.readUInt32BE(0)\n if (version !== 2) {\n throw new InternalError(`Invalid packfile version: ${version}`)\n }\n\n let numObjects = await reader.read(4)\n numObjects = numObjects.readUInt32BE(0)\n // If (for some godforsaken reason) this is an empty packfile, abort now.\n if (numObjects < 1) return\n\n while (!reader.eof() && numObjects--) {\n const offset = reader.tell()\n const { type, length, ofs, reference } = await parseHeader(reader)\n const inflator = new pako.Inflate()\n while (!inflator.result) {\n const chunk = await reader.chunk()\n if (reader.ended) break\n inflator.push(chunk, false)\n if (inflator.err) {\n throw new InternalError(`Pako error: ${inflator.msg}`)\n }\n if (inflator.result) {\n if (inflator.result.length !== length) {\n throw new InternalError(\n `Inflated object size is different from that stated in packfile.`\n )\n }\n\n // Backtrack parser to where deflated data ends\n await reader.undo()\n await reader.read(chunk.length - inflator.strm.avail_in)\n const end = reader.tell()\n await onData({\n data: inflator.result,\n type,\n num: numObjects,\n offset,\n end,\n reference,\n ofs,\n })\n }\n }\n }\n}\n\nasync function parseHeader(reader) {\n // Object type is encoded in bits 654\n let byte = await reader.byte()\n const type = (byte >> 4) & 0b111\n // The length encoding get complicated.\n // Last four bits of length is encoded in bits 3210\n let length = byte & 0b1111\n // Whether the next byte is part of the variable-length encoded number\n // is encoded in bit 7\n if (byte & 0b10000000) {\n let shift = 4\n do {\n byte = await reader.byte()\n length |= (byte & 0b01111111) << shift\n shift += 7\n } while (byte & 0b10000000)\n }\n // Handle deltified objects\n let ofs\n let reference\n if (type === 6) {\n let shift = 0\n ofs = 0\n const bytes = []\n do {\n byte = await reader.byte()\n ofs |= (byte & 0b01111111) << shift\n shift += 7\n bytes.push(byte)\n } while (byte & 0b10000000)\n reference = Buffer.from(bytes)\n }\n if (type === 7) {\n const buf = await reader.read(20)\n reference = buf\n }\n return { type, length, ofs, reference }\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { BufferCursor } from '../utils/BufferCursor.js'\n\n/**\n * @param {Buffer} delta\n * @param {Buffer} source\n * @returns {Buffer}\n */\nexport function applyDelta(delta, source) {\n const reader = new BufferCursor(delta)\n const sourceSize = readVarIntLE(reader)\n\n if (sourceSize !== source.byteLength) {\n throw new InternalError(\n `applyDelta expected source buffer to be ${sourceSize} bytes but the provided buffer was ${source.length} bytes`\n )\n }\n const targetSize = readVarIntLE(reader)\n let target\n\n const firstOp = readOp(reader, source)\n // Speed optimization - return raw buffer if it's just single simple copy\n if (firstOp.byteLength === targetSize) {\n target = firstOp\n } else {\n // Otherwise, allocate a fresh buffer and slices\n target = Buffer.alloc(targetSize)\n const writer = new BufferCursor(target)\n writer.copy(firstOp)\n\n while (!reader.eof()) {\n writer.copy(readOp(reader, source))\n }\n\n const tell = writer.tell()\n if (targetSize !== tell) {\n throw new InternalError(\n `applyDelta expected target buffer to be ${targetSize} bytes but the resulting buffer was ${tell} bytes`\n )\n }\n }\n return target\n}\n\nfunction readVarIntLE(reader) {\n let result = 0\n let shift = 0\n let byte = null\n do {\n byte = reader.readUInt8()\n result |= (byte & 0b01111111) << shift\n shift += 7\n } while (byte & 0b10000000)\n return result\n}\n\nfunction readCompactLE(reader, flags, size) {\n let result = 0\n let shift = 0\n while (size--) {\n if (flags & 0b00000001) {\n result |= reader.readUInt8() << shift\n }\n flags >>= 1\n shift += 8\n }\n return result\n}\n\nfunction readOp(reader, source) {\n /** @type {number} */\n const byte = reader.readUInt8()\n const COPY = 0b10000000\n const OFFS = 0b00001111\n const SIZE = 0b01110000\n if (byte & COPY) {\n // copy consists of 4 byte offset, 3 byte size (in LE order)\n const offset = readCompactLE(reader, byte & OFFS, 4)\n let size = readCompactLE(reader, (byte & SIZE) >> 4, 3)\n // Yup. They really did this optimization.\n if (size === 0) size = 0x10000\n return source.slice(offset, offset + size)\n } else {\n // insert\n return reader.slice(byte)\n }\n}\n","export function outdent(str) {\n return str\n .split('\\n')\n .map(x => x.replace(/^ /, ''))\n .join('\\n')\n}\n","// A simple implementation of make-array\nfunction makeArray (subject) {\n return Array.isArray(subject)\n ? subject\n : [subject]\n}\n\nconst REGEX_TEST_BLANK_LINE = /^\\s+$/\nconst REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\\\!/\nconst REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\\\#/\nconst REGEX_SPLITALL_CRLF = /\\r?\\n/g\n// /foo,\n// ./foo,\n// ../foo,\n// .\n// ..\nconst REGEX_TEST_INVALID_PATH = /^\\.*\\/|^\\.+$/\n\nconst SLASH = '/'\nconst KEY_IGNORE = typeof Symbol !== 'undefined'\n ? Symbol.for('node-ignore')\n /* istanbul ignore next */\n : 'node-ignore'\n\nconst define = (object, key, value) =>\n Object.defineProperty(object, key, {value})\n\nconst REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g\n\n// Sanitize the range of a regular expression\n// The cases are complicated, see test cases for details\nconst sanitizeRange = range => range.replace(\n REGEX_REGEXP_RANGE,\n (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0)\n ? match\n // Invalid range (out of order) which is ok for gitignore rules but\n // fatal for JavaScript regular expression, so eliminate it.\n : ''\n)\n\n// > If the pattern ends with a slash,\n// > it is removed for the purpose of the following description,\n// > but it would only find a match with a directory.\n// > In other words, foo/ will match a directory foo and paths underneath it,\n// > but will not match a regular file or a symbolic link foo\n// > (this is consistent with the way how pathspec works in general in Git).\n// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'\n// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call\n// you could use option `mark: true` with `glob`\n\n// '`foo/`' should not continue with the '`..`'\nconst REPLACERS = [\n\n // > Trailing spaces are ignored unless they are quoted with backslash (\"\\\")\n [\n // (a\\ ) -> (a )\n // (a ) -> (a)\n // (a \\ ) -> (a )\n /\\\\?\\s+$/,\n match => match.indexOf('\\\\') === 0\n ? ' '\n : ''\n ],\n\n // replace (\\ ) with ' '\n [\n /\\\\\\s/g,\n () => ' '\n ],\n\n // Escape metacharacters\n // which is written down by users but means special for regular expressions.\n\n // > There are 12 characters with special meanings:\n // > - the backslash \\,\n // > - the caret ^,\n // > - the dollar sign $,\n // > - the period or dot .,\n // > - the vertical bar or pipe symbol |,\n // > - the question mark ?,\n // > - the asterisk or star *,\n // > - the plus sign +,\n // > - the opening parenthesis (,\n // > - the closing parenthesis ),\n // > - and the opening square bracket [,\n // > - the opening curly brace {,\n // > These special characters are often called \"metacharacters\".\n [\n /[\\\\^$.|*+(){]/g,\n match => `\\\\${match}`\n ],\n\n [\n // > [abc] matches any character inside the brackets\n // > (in this case a, b, or c);\n /\\[([^\\]/]*)($|\\])/g,\n (match, p1, p2) => p2 === ']'\n ? `[${sanitizeRange(p1)}]`\n : `\\\\${match}`\n ],\n\n [\n // > a question mark (?) matches a single character\n /(?!\\\\)\\?/g,\n () => '[^/]'\n ],\n\n // leading slash\n [\n\n // > A leading slash matches the beginning of the pathname.\n // > For example, \"/*.c\" matches \"cat-file.c\" but not \"mozilla-sha1/sha1.c\".\n // A leading slash matches the beginning of the pathname\n /^\\//,\n () => '^'\n ],\n\n // replace special metacharacter slash after the leading slash\n [\n /\\//g,\n () => '\\\\/'\n ],\n\n [\n // > A leading \"**\" followed by a slash means match in all directories.\n // > For example, \"**/foo\" matches file or directory \"foo\" anywhere,\n // > the same as pattern \"foo\".\n // > \"**/foo/bar\" matches file or directory \"bar\" anywhere that is directly\n // > under directory \"foo\".\n // Notice that the '*'s have been replaced as '\\\\*'\n /^\\^*\\\\\\*\\\\\\*\\\\\\//,\n\n // '**/foo' <-> 'foo'\n () => '^(?:.*\\\\/)?'\n ],\n\n // ending\n [\n // 'js' will not match 'js.'\n // 'ab' will not match 'abc'\n /(?:[^*])$/,\n\n // WTF!\n // https://git-scm.com/docs/gitignore\n // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)\n // which re-fixes #24, #38\n\n // > If there is a separator at the end of the pattern then the pattern\n // > will only match directories, otherwise the pattern can match both\n // > files and directories.\n\n // 'js*' will not match 'a.js'\n // 'js/' will not match 'a.js'\n // 'js' will match 'a.js' and 'a.js/'\n match => /\\/$/.test(match)\n // foo/ will not match 'foo'\n ? `${match}$`\n // foo matches 'foo' and 'foo/'\n : `${match}(?=$|\\\\/$)`\n ],\n\n // starting\n [\n // there will be no leading '/'\n // (which has been replaced by section \"leading slash\")\n // If starts with '**', adding a '^' to the regular expression also works\n /^(?=[^^])/,\n function startingReplacer () {\n // If has a slash `/` at the beginning or middle\n return !/\\/(?!$)/.test(this)\n // > Prior to 2.22.1\n // > If the pattern does not contain a slash /,\n // > Git treats it as a shell glob pattern\n // Actually, if there is only a trailing slash,\n // git also treats it as a shell glob pattern\n\n // After 2.22.1 (compatible but clearer)\n // > If there is a separator at the beginning or middle (or both)\n // > of the pattern, then the pattern is relative to the directory\n // > level of the particular .gitignore file itself.\n // > Otherwise the pattern may also match at any level below\n // > the .gitignore level.\n ? '(?:^|\\\\/)'\n\n // > Otherwise, Git treats the pattern as a shell glob suitable for\n // > consumption by fnmatch(3)\n : '^'\n }\n ],\n\n // two globstars\n [\n // Use lookahead assertions so that we could match more than one `'/**'`\n /\\\\\\/\\\\\\*\\\\\\*(?=\\\\\\/|$)/g,\n\n // Zero, one or several directories\n // should not use '*', or it will be replaced by the next replacer\n\n // Check if it is not the last `'/**'`\n (_, index, str) => index + 6 < str.length\n\n // case: /**/\n // > A slash followed by two consecutive asterisks then a slash matches\n // > zero or more directories.\n // > For example, \"a/**/b\" matches \"a/b\", \"a/x/b\", \"a/x/y/b\" and so on.\n // '/**/'\n ? '(?:\\\\/[^\\\\/]+)*'\n\n // case: /**\n // > A trailing `\"/**\"` matches everything inside.\n\n // #21: everything inside but it should not include the current folder\n : '\\\\/.+'\n ],\n\n // intermediate wildcards\n [\n // Never replace escaped '*'\n // ignore rule '\\*' will match the path '*'\n\n // 'abc.*/' -> go\n // 'abc.*' -> skip this rule\n /(^|[^\\\\]+)\\\\\\*(?=.+)/g,\n\n // '*.js' matches '.js'\n // '*.js' doesn't match 'abc'\n (_, p1) => `${p1}[^\\\\/]*`\n ],\n\n // trailing wildcard\n [\n /(\\^|\\\\\\/)?\\\\\\*$/,\n (_, p1) => {\n const prefix = p1\n // '\\^':\n // '/*' does not match ''\n // '/*' does not match everything\n\n // '\\\\\\/':\n // 'abc/*' does not match 'abc/'\n ? `${p1}[^/]+`\n\n // 'a*' matches 'a'\n // 'a*' matches 'aa'\n : '[^/]*'\n\n return `${prefix}(?=$|\\\\/$)`\n }\n ],\n\n [\n // unescape\n /\\\\\\\\\\\\/g,\n () => '\\\\'\n ]\n]\n\n// A simple cache, because an ignore rule only has only one certain meaning\nconst regexCache = Object.create(null)\n\n// @param {pattern}\nconst makeRegex = (pattern, negative, ignorecase) => {\n const r = regexCache[pattern]\n if (r) {\n return r\n }\n\n // const replacers = negative\n // ? NEGATIVE_REPLACERS\n // : POSITIVE_REPLACERS\n\n const source = REPLACERS.reduce(\n (prev, current) => prev.replace(current[0], current[1].bind(pattern)),\n pattern\n )\n\n return regexCache[pattern] = ignorecase\n ? new RegExp(source, 'i')\n : new RegExp(source)\n}\n\nconst isString = subject => typeof subject === 'string'\n\n// > A blank line matches no files, so it can serve as a separator for readability.\nconst checkPattern = pattern => pattern\n && isString(pattern)\n && !REGEX_TEST_BLANK_LINE.test(pattern)\n\n // > A line starting with # serves as a comment.\n && pattern.indexOf('#') !== 0\n\nconst splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF)\n\nclass IgnoreRule {\n constructor (\n origin,\n pattern,\n negative,\n regex\n ) {\n this.origin = origin\n this.pattern = pattern\n this.negative = negative\n this.regex = regex\n }\n}\n\nconst createRule = (pattern, ignorecase) => {\n const origin = pattern\n let negative = false\n\n // > An optional prefix \"!\" which negates the pattern;\n if (pattern.indexOf('!') === 0) {\n negative = true\n pattern = pattern.substr(1)\n }\n\n pattern = pattern\n // > Put a backslash (\"\\\") in front of the first \"!\" for patterns that\n // > begin with a literal \"!\", for example, `\"\\!important!.txt\"`.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!')\n // > Put a backslash (\"\\\") in front of the first hash for patterns that\n // > begin with a hash.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#')\n\n const regex = makeRegex(pattern, negative, ignorecase)\n\n return new IgnoreRule(\n origin,\n pattern,\n negative,\n regex\n )\n}\n\nconst throwError = (message, Ctor) => {\n throw new Ctor(message)\n}\n\nconst checkPath = (path, originalPath, doThrow) => {\n if (!isString(path)) {\n return doThrow(\n `path must be a string, but got \\`${originalPath}\\``,\n TypeError\n )\n }\n\n // We don't know if we should ignore '', so throw\n if (!path) {\n return doThrow(`path must not be empty`, TypeError)\n }\n\n // Check if it is a relative path\n if (checkPath.isNotRelative(path)) {\n const r = '`path.relative()`d'\n return doThrow(\n `path should be a ${r} string, but got \"${originalPath}\"`,\n RangeError\n )\n }\n\n return true\n}\n\nconst isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path)\n\ncheckPath.isNotRelative = isNotRelative\ncheckPath.convert = p => p\n\nclass Ignore {\n constructor ({\n ignorecase = true\n } = {}) {\n this._rules = []\n this._ignorecase = ignorecase\n define(this, KEY_IGNORE, true)\n this._initCache()\n }\n\n _initCache () {\n this._ignoreCache = Object.create(null)\n this._testCache = Object.create(null)\n }\n\n _addPattern (pattern) {\n // #32\n if (pattern && pattern[KEY_IGNORE]) {\n this._rules = this._rules.concat(pattern._rules)\n this._added = true\n return\n }\n\n if (checkPattern(pattern)) {\n const rule = createRule(pattern, this._ignorecase)\n this._added = true\n this._rules.push(rule)\n }\n }\n\n // @param {Array<string> | string | Ignore} pattern\n add (pattern) {\n this._added = false\n\n makeArray(\n isString(pattern)\n ? splitPattern(pattern)\n : pattern\n ).forEach(this._addPattern, this)\n\n // Some rules have just added to the ignore,\n // making the behavior changed.\n if (this._added) {\n this._initCache()\n }\n\n return this\n }\n\n // legacy\n addPattern (pattern) {\n return this.add(pattern)\n }\n\n // | ignored : unignored\n // negative | 0:0 | 0:1 | 1:0 | 1:1\n // -------- | ------- | ------- | ------- | --------\n // 0 | TEST | TEST | SKIP | X\n // 1 | TESTIF | SKIP | TEST | X\n\n // - SKIP: always skip\n // - TEST: always test\n // - TESTIF: only test if checkUnignored\n // - X: that never happen\n\n // @param {boolean} whether should check if the path is unignored,\n // setting `checkUnignored` to `false` could reduce additional\n // path matching.\n\n // @returns {TestResult} true if a file is ignored\n _testOne (path, checkUnignored) {\n let ignored = false\n let unignored = false\n\n this._rules.forEach(rule => {\n const {negative} = rule\n if (\n unignored === negative && ignored !== unignored\n || negative && !ignored && !unignored && !checkUnignored\n ) {\n return\n }\n\n const matched = rule.regex.test(path)\n\n if (matched) {\n ignored = !negative\n unignored = negative\n }\n })\n\n return {\n ignored,\n unignored\n }\n }\n\n // @returns {TestResult}\n _test (originalPath, cache, checkUnignored, slices) {\n const path = originalPath\n // Supports nullable path\n && checkPath.convert(originalPath)\n\n checkPath(path, originalPath, throwError)\n\n return this._t(path, cache, checkUnignored, slices)\n }\n\n _t (path, cache, checkUnignored, slices) {\n if (path in cache) {\n return cache[path]\n }\n\n if (!slices) {\n // path/to/a.js\n // ['path', 'to', 'a.js']\n slices = path.split(SLASH)\n }\n\n slices.pop()\n\n // If the path has no parent directory, just test it\n if (!slices.length) {\n return cache[path] = this._testOne(path, checkUnignored)\n }\n\n const parent = this._t(\n slices.join(SLASH) + SLASH,\n cache,\n checkUnignored,\n slices\n )\n\n // If the path contains a parent directory, check the parent first\n return cache[path] = parent.ignored\n // > It is not possible to re-include a file if a parent directory of\n // > that file is excluded.\n ? parent\n : this._testOne(path, checkUnignored)\n }\n\n ignores (path) {\n return this._test(path, this._ignoreCache, false).ignored\n }\n\n createFilter () {\n return path => !this.ignores(path)\n }\n\n filter (paths) {\n return makeArray(paths).filter(this.createFilter())\n }\n\n // @returns {TestResult}\n test (path) {\n return this._test(path, this._testCache, true)\n }\n}\n\nconst factory = options => new Ignore(options)\n\nconst returnFalse = () => false\n\nconst isPathValid = path =>\n checkPath(path && checkPath.convert(path), path, returnFalse)\n\nfactory.isPathValid = isPathValid\n\n// Fixes typescript\nfactory.default = factory\n\nmodule.exports = factory\n\n// Windows\n// --------------------------------------------------------------\n/* istanbul ignore if */\nif (\n // Detect `process` so that it can run in browsers.\n typeof process !== 'undefined'\n && (\n process.env && process.env.IGNORE_TEST_WIN32\n || process.platform === 'win32'\n )\n) {\n /* eslint no-control-regex: \"off\" */\n const makePosix = str => /^\\\\\\\\\\?\\\\/.test(str)\n || /[\"<>|\\u0000-\\u001F]+/u.test(str)\n ? str\n : str.replace(/\\\\/g, '/')\n\n checkPath.convert = makePosix\n\n // 'C:\\\\foo' <- 'C:\\\\foo' has been converted to 'C:/'\n // 'd:\\\\foo'\n const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\\//i\n checkPath.isNotRelative = path =>\n REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path)\n || isNotRelative(path)\n}\n","import { InternalError } from '../errors/InternalError.js'\n\nexport async function writeObjectLoose({ fs, gitdir, object, format, oid }) {\n if (format !== 'deflated') {\n throw new InternalError(\n 'GitObjectStoreLoose expects objects to write to be in deflated format'\n )\n }\n const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`\n const filepath = `${gitdir}/${source}`\n // Don't overwrite existing git objects - this helps avoid EPERM errors.\n // Although I don't know how we'd fix corrupted objects then. Perhaps delete them\n // on read?\n if (!(await fs.exists(filepath))) await fs.write(filepath, object)\n}\n","// Copyright (c) 2006, 2008 Tony Garnock-Jones <tonyg@lshift.net>\n// Copyright (c) 2006, 2008 LShift Ltd. <query@lshift.net>\n//\n// Permission is hereby granted, free of charge, to any person\n// obtaining a copy of this software and associated documentation files\n// (the \"Software\"), to deal in the Software without restriction,\n// including without limitation the rights to use, copy, modify, merge,\n// publish, distribute, sublicense, and/or sell copies of the Software,\n// and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be\n// included in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\nvar onp = require('./onp');\n\nfunction longestCommonSubsequence(file1, file2) {\n var diff = new onp(file1, file2);\n diff.compose();\n var ses = diff.getses();\n\n var root;\n var prev;\n var file1RevIdx = file1.length - 1,\n file2RevIdx = file2.length - 1;\n for (var i = ses.length - 1; i >= 0; --i) {\n if (ses[i].t === diff.SES_COMMON) {\n if (prev) {\n prev.chain = {\n file1index: file1RevIdx,\n file2index: file2RevIdx,\n chain: null\n };\n prev = prev.chain;\n } else {\n root = {\n file1index: file1RevIdx,\n file2index: file2RevIdx,\n chain: null\n };\n prev = root;\n }\n file1RevIdx--;\n file2RevIdx--;\n } else if (ses[i].t === diff.SES_DELETE) {\n file1RevIdx--;\n } else if (ses[i].t === diff.SES_ADD) {\n file2RevIdx--;\n }\n }\n\n var tail = {\n file1index: -1,\n file2index: -1,\n chain: null\n };\n\n if (!prev) {\n return tail;\n }\n\n prev.chain = tail;\n\n return root;\n}\n\nfunction diffIndices(file1, file2) {\n // We apply the LCS to give a simple representation of the\n // offsets and lengths of mismatched chunks in the input\n // files. This is used by diff3_merge_indices below.\n\n var result = [];\n var tail1 = file1.length;\n var tail2 = file2.length;\n\n for (var candidate = longestCommonSubsequence(file1, file2); candidate !== null; candidate = candidate.chain) {\n var mismatchLength1 = tail1 - candidate.file1index - 1;\n var mismatchLength2 = tail2 - candidate.file2index - 1;\n tail1 = candidate.file1index;\n tail2 = candidate.file2index;\n\n if (mismatchLength1 || mismatchLength2) {\n result.push({\n file1: [tail1 + 1, mismatchLength1],\n file2: [tail2 + 1, mismatchLength2]\n });\n }\n }\n\n result.reverse();\n return result;\n}\n\nfunction diff3MergeIndices(a, o, b) {\n // Given three files, A, O, and B, where both A and B are\n // independently derived from O, returns a fairly complicated\n // internal representation of merge decisions it's taken. The\n // interested reader may wish to consult\n //\n // Sanjeev Khanna, Keshav Kunal, and Benjamin C. Pierce. \"A\n // Formal Investigation of Diff3.\" In Arvind and Prasad,\n // editors, Foundations of Software Technology and Theoretical\n // Computer Science (FSTTCS), December 2007.\n //\n // (http://www.cis.upenn.edu/~bcpierce/papers/diff3-short.pdf)\n var i;\n\n var m1 = diffIndices(o, a);\n var m2 = diffIndices(o, b);\n\n var hunks = [];\n\n function addHunk(h, side) {\n hunks.push([h.file1[0], side, h.file1[1], h.file2[0], h.file2[1]]);\n }\n for (i = 0; i < m1.length; i++) {\n addHunk(m1[i], 0);\n }\n for (i = 0; i < m2.length; i++) {\n addHunk(m2[i], 2);\n }\n hunks.sort(function(x, y) {\n return x[0] - y[0]\n });\n\n var result = [];\n var commonOffset = 0;\n\n function copyCommon(targetOffset) {\n if (targetOffset > commonOffset) {\n result.push([1, commonOffset, targetOffset - commonOffset]);\n commonOffset = targetOffset;\n }\n }\n\n for (var hunkIndex = 0; hunkIndex < hunks.length; hunkIndex++) {\n var firstHunkIndex = hunkIndex;\n var hunk = hunks[hunkIndex];\n var regionLhs = hunk[0];\n var regionRhs = regionLhs + hunk[2];\n while (hunkIndex < hunks.length - 1) {\n var maybeOverlapping = hunks[hunkIndex + 1];\n var maybeLhs = maybeOverlapping[0];\n if (maybeLhs > regionRhs) break;\n regionRhs = Math.max(regionRhs, maybeLhs + maybeOverlapping[2]);\n hunkIndex++;\n }\n\n copyCommon(regionLhs);\n if (firstHunkIndex == hunkIndex) {\n // The \"overlap\" was only one hunk long, meaning that\n // there's no conflict here. Either a and o were the\n // same, or b and o were the same.\n if (hunk[4] > 0) {\n result.push([hunk[1], hunk[3], hunk[4]]);\n }\n } else {\n // A proper conflict. Determine the extents of the\n // regions involved from a, o and b. Effectively merge\n // all the hunks on the left into one giant hunk, and\n // do the same for the right; then, correct for skew\n // in the regions of o that each side changed, and\n // report appropriate spans for the three sides.\n var regions = {\n 0: [a.length, -1, o.length, -1],\n 2: [b.length, -1, o.length, -1]\n };\n for (i = firstHunkIndex; i <= hunkIndex; i++) {\n hunk = hunks[i];\n var side = hunk[1];\n var r = regions[side];\n var oLhs = hunk[0];\n var oRhs = oLhs + hunk[2];\n var abLhs = hunk[3];\n var abRhs = abLhs + hunk[4];\n r[0] = Math.min(abLhs, r[0]);\n r[1] = Math.max(abRhs, r[1]);\n r[2] = Math.min(oLhs, r[2]);\n r[3] = Math.max(oRhs, r[3]);\n }\n var aLhs = regions[0][0] + (regionLhs - regions[0][2]);\n var aRhs = regions[0][1] + (regionRhs - regions[0][3]);\n var bLhs = regions[2][0] + (regionLhs - regions[2][2]);\n var bRhs = regions[2][1] + (regionRhs - regions[2][3]);\n result.push([-1,\n aLhs, aRhs - aLhs,\n regionLhs, regionRhs - regionLhs,\n bLhs, bRhs - bLhs\n ]);\n }\n commonOffset = regionRhs;\n }\n\n copyCommon(o.length);\n return result;\n}\n\nfunction diff3Merge(a, o, b) {\n // Applies the output of Diff.diff3_merge_indices to actually\n // construct the merged file; the returned result alternates\n // between \"ok\" and \"conflict\" blocks.\n\n var result = [];\n var files = [a, o, b];\n var indices = diff3MergeIndices(a, o, b);\n\n var okLines = [];\n\n function flushOk() {\n if (okLines.length) {\n result.push({\n ok: okLines\n });\n }\n okLines = [];\n }\n\n function pushOk(xs) {\n for (var j = 0; j < xs.length; j++) {\n okLines.push(xs[j]);\n }\n }\n\n function isTrueConflict(rec) {\n if (rec[2] != rec[6]) return true;\n var aoff = rec[1];\n var boff = rec[5];\n for (var j = 0; j < rec[2]; j++) {\n if (a[j + aoff] != b[j + boff]) return true;\n }\n return false;\n }\n\n for (var i = 0; i < indices.length; i++) {\n var x = indices[i];\n var side = x[0];\n if (side == -1) {\n if (!isTrueConflict(x)) {\n pushOk(files[0].slice(x[1], x[1] + x[2]));\n } else {\n flushOk();\n result.push({\n conflict: {\n a: a.slice(x[1], x[1] + x[2]),\n aIndex: x[1],\n o: o.slice(x[3], x[3] + x[4]),\n oIndex: x[3],\n b: b.slice(x[5], x[5] + x[6]),\n bIndex: x[5]\n }\n });\n }\n } else {\n pushOk(files[side].slice(x[1], x[1] + x[2]));\n }\n }\n\n flushOk();\n return result;\n}\n\nmodule.exports = diff3Merge;\n","/**\n * @enum {number}\n */\nexport const types = {\n commit: 0b0010000,\n tree: 0b0100000,\n blob: 0b0110000,\n tag: 0b1000000,\n ofs_delta: 0b1100000,\n ref_delta: 0b1110000,\n}\n","export function filterCapabilities(server, client) {\n const serverNames = server.map(cap => cap.split('=', 1)[0])\n return client.filter(cap => {\n const name = cap.split('=', 1)[0]\n return serverNames.includes(name)\n })\n}\n","import { FIFO } from './FIFO.js'\nimport { forAwait } from './forAwait.js'\n\n// Note: progress messages are designed to be written directly to the terminal,\n// so they are often sent with just a carriage return to overwrite the last line of output.\n// But there are also messages delimited with newlines.\n// I also include CRLF just in case.\nfunction findSplit(str) {\n const r = str.indexOf('\\r')\n const n = str.indexOf('\\n')\n if (r === -1 && n === -1) return -1\n if (r === -1) return n + 1 // \\n\n if (n === -1) return r + 1 // \\r\n if (n === r + 1) return n + 1 // \\r\\n\n return Math.min(r, n) + 1 // \\r or \\n\n}\n\nexport function splitLines(input) {\n const output = new FIFO()\n let tmp = ''\n ;(async () => {\n await forAwait(input, chunk => {\n chunk = chunk.toString('utf8')\n tmp += chunk\n while (true) {\n const i = findSplit(tmp)\n if (i === -1) break\n output.write(tmp.slice(0, i))\n tmp = tmp.slice(i)\n }\n })\n if (tmp.length > 0) {\n output.write(tmp)\n }\n output.end()\n })()\n return output\n}\n","'use strict';\n\nvar AsyncLock = function (opts) {\n\topts = opts || {};\n\n\tthis.Promise = opts.Promise || Promise;\n\n\t// format: {key : [fn, fn]}\n\t// queues[key] = null indicates no job running for key\n\tthis.queues = {};\n\n\t// domain of current running func {key : fn}\n\tthis.domains = {};\n\n\t// lock is reentrant for same domain\n\tthis.domainReentrant = opts.domainReentrant || false;\n\n\tthis.timeout = opts.timeout || AsyncLock.DEFAULT_TIMEOUT;\n\tthis.maxPending = opts.maxPending || AsyncLock.DEFAULT_MAX_PENDING;\n};\n\nAsyncLock.DEFAULT_TIMEOUT = 0; //Never\nAsyncLock.DEFAULT_MAX_PENDING = 1000;\n\n/**\n * Acquire Locks\n *\n * @param {String|Array} key \tresource key or keys to lock\n * @param {function} fn \tasync function\n * @param {function} cb \tcallback function, otherwise will return a promise\n * @param {Object} opts \toptions\n */\nAsyncLock.prototype.acquire = function (key, fn, cb, opts) {\n\tif (Array.isArray(key)) {\n\t\treturn this._acquireBatch(key, fn, cb, opts);\n\t}\n\n\tif (typeof (fn) !== 'function') {\n\t\tthrow new Error('You must pass a function to execute');\n\t}\n\n\t// faux-deferred promise using new Promise() (as Promise.defer is deprecated)\n\tvar deferredResolve = null;\n\tvar deferredReject = null;\n\tvar deferred = null;\n\n\tif (typeof (cb) !== 'function') {\n\t\topts = cb;\n\t\tcb = null;\n\n\t\t// will return a promise\n\t\tdeferred = new this.Promise(function(resolve, reject) {\n\t\t\tdeferredResolve = resolve;\n\t\t\tdeferredReject = reject;\n\t\t});\n\t}\n\n\topts = opts || {};\n\n\tvar resolved = false;\n\tvar timer = null;\n\tvar self = this;\n\n\tvar done = function (locked, err, ret) {\n\t\tif (locked) {\n\t\t\tif (self.queues[key].length === 0) {\n\t\t\t\tdelete self.queues[key];\n\t\t\t}\n\t\t\tdelete self.domains[key];\n\t\t}\n\n\t\tif (!resolved) {\n\t\t\tif (!deferred) {\n\t\t\t\tif (typeof (cb) === 'function') {\n\t\t\t\t\tcb(err, ret);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//promise mode\n\t\t\t\tif (err) {\n\t\t\t\t\tdeferredReject(err);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdeferredResolve(ret);\n\t\t\t\t}\n\t\t\t}\n\t\t\tresolved = true;\n\t\t}\n\n\t\tif (locked) {\n\t\t\t//run next func\n\t\t\tif (!!self.queues[key] && self.queues[key].length > 0) {\n\t\t\t\tself.queues[key].shift()();\n\t\t\t}\n\t\t}\n\t};\n\n\tvar exec = function (locked) {\n\t\tif (resolved) { // may due to timed out\n\t\t\treturn done(locked);\n\t\t}\n\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = null;\n\t\t}\n\n\t\tif (locked) {\n\t\t\tself.domains[key] = process.domain;\n\t\t}\n\n\t\t// Callback mode\n\t\tif (fn.length === 1) {\n\t\t\tvar called = false;\n\t\t\tfn(function (err, ret) {\n\t\t\t\tif (!called) {\n\t\t\t\t\tcalled = true;\n\t\t\t\t\tdone(locked, err, ret);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\t// Promise mode\n\t\t\tself._promiseTry(function () {\n\t\t\t\treturn fn();\n\t\t\t})\n\t\t\t.then(function(ret){\n\t\t\t\tdone(locked, undefined, ret);\n\t\t\t}, function(error){\n\t\t\t\tdone(locked, error);\n\t\t\t});\n\t\t}\n\t};\n\tif (!!process.domain) {\n\t\texec = process.domain.bind(exec);\n\t}\n\n\tif (!self.queues[key]) {\n\t\tself.queues[key] = [];\n\t\texec(true);\n\t}\n\telse if (self.domainReentrant && !!process.domain && process.domain === self.domains[key]) {\n\t\t// If code is in the same domain of current running task, run it directly\n\t\t// Since lock is re-enterable\n\t\texec(false);\n\t}\n\telse if (self.queues[key].length >= self.maxPending) {\n\t\tdone(false, new Error('Too much pending tasks'));\n\t}\n\telse {\n\t\tvar taskFn = function () {\n\t\t\texec(true);\n\t\t};\n\t\tif (opts.skipQueue) {\n\t\t\tself.queues[key].unshift(taskFn);\n\t\t} else {\n\t\t\tself.queues[key].push(taskFn);\n\t\t}\n\n\t\tvar timeout = opts.timeout || self.timeout;\n\t\tif (timeout) {\n\t\t\ttimer = setTimeout(function () {\n\t\t\t\ttimer = null;\n\t\t\t\tdone(false, new Error('async-lock timed out'));\n\t\t\t}, timeout);\n\t\t}\n\t}\n\n\tif (deferred) {\n\t\treturn deferred;\n\t}\n};\n\n/*\n * Below is how this function works:\n *\n * Equivalent code:\n * self.acquire(key1, function(cb){\n * self.acquire(key2, function(cb){\n * self.acquire(key3, fn, cb);\n * }, cb);\n * }, cb);\n *\n * Equivalent code:\n * var fn3 = getFn(key3, fn);\n * var fn2 = getFn(key2, fn3);\n * var fn1 = getFn(key1, fn2);\n * fn1(cb);\n */\nAsyncLock.prototype._acquireBatch = function (keys, fn, cb, opts) {\n\tif (typeof (cb) !== 'function') {\n\t\topts = cb;\n\t\tcb = null;\n\t}\n\n\tvar self = this;\n\tvar getFn = function (key, fn) {\n\t\treturn function (cb) {\n\t\t\tself.acquire(key, fn, cb, opts);\n\t\t};\n\t};\n\n\tvar fnx = fn;\n\tkeys.reverse().forEach(function (key) {\n\t\tfnx = getFn(key, fnx);\n\t});\n\n\tif (typeof (cb) === 'function') {\n\t\tfnx(cb);\n\t}\n\telse {\n\t\treturn new this.Promise(function (resolve, reject) {\n\t\t\t// check for promise mode in case keys is empty array\n\t\t\tif (fnx.length === 1) {\n\t\t\t\tfnx(function (err, ret) {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tresolve(ret);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tresolve(fnx());\n\t\t\t}\n\t\t});\n\t}\n};\n\n/*\n *\tWhether there is any running or pending asyncFunc\n *\n *\t@param {String} key\n */\nAsyncLock.prototype.isBusy = function (key) {\n\tif (!key) {\n\t\treturn Object.keys(this.queues).length > 0;\n\t}\n\telse {\n\t\treturn !!this.queues[key];\n\t}\n};\n\n/**\n * Promise.try() implementation to become independent of Q-specific methods\n */\nAsyncLock.prototype._promiseTry = function(fn) {\n\ttry {\n\t\treturn this.Promise.resolve(fn());\n\t} catch (e) {\n\t\treturn this.Promise.reject(e);\n\t}\n};\n\nmodule.exports = AsyncLock;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n","var Buffer = require('safe-buffer').Buffer\n\n// prototype class for hash functions\nfunction Hash (blockSize, finalSize) {\n this._block = Buffer.alloc(blockSize)\n this._finalSize = finalSize\n this._blockSize = blockSize\n this._len = 0\n}\n\nHash.prototype.update = function (data, enc) {\n if (typeof data === 'string') {\n enc = enc || 'utf8'\n data = Buffer.from(data, enc)\n }\n\n var block = this._block\n var blockSize = this._blockSize\n var length = data.length\n var accum = this._len\n\n for (var offset = 0; offset < length;) {\n var assigned = accum % blockSize\n var remainder = Math.min(length - offset, blockSize - assigned)\n\n for (var i = 0; i < remainder; i++) {\n block[assigned + i] = data[offset + i]\n }\n\n accum += remainder\n offset += remainder\n\n if ((accum % blockSize) === 0) {\n this._update(block)\n }\n }\n\n this._len += length\n return this\n}\n\nHash.prototype.digest = function (enc) {\n var rem = this._len % this._blockSize\n\n this._block[rem] = 0x80\n\n // zero (rem + 1) trailing bits, where (rem + 1) is the smallest\n // non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize\n this._block.fill(0, rem + 1)\n\n if (rem >= this._finalSize) {\n this._update(this._block)\n this._block.fill(0)\n }\n\n var bits = this._len * 8\n\n // uint32\n if (bits <= 0xffffffff) {\n this._block.writeUInt32BE(bits, this._blockSize - 4)\n\n // uint64\n } else {\n var lowBits = (bits & 0xffffffff) >>> 0\n var highBits = (bits - lowBits) / 0x100000000\n\n this._block.writeUInt32BE(highBits, this._blockSize - 8)\n this._block.writeUInt32BE(lowBits, this._blockSize - 4)\n }\n\n this._update(this._block)\n var hash = this._hash()\n\n return enc ? hash.toString(enc) : hash\n}\n\nHash.prototype._update = function () {\n throw new Error('_update must be implemented by subclass')\n}\n\nmodule.exports = Hash\n","'use strict';\n\n\nvar zlib_deflate = require('./zlib/deflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\n\nvar toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH = 0;\nvar Z_FINISH = 4;\n\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_SYNC_FLUSH = 2;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY = 0;\n\nvar Z_DEFLATED = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Deflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n if (!(this instanceof Deflate)) return new Deflate(options);\n\n this.options = utils.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_deflate.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n if (opt.header) {\n zlib_deflate.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n var dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the compression context.\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var status, _mode;\n\n if (this.ended) { return false; }\n\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n status = zlib_deflate.deflate(strm, _mode); /* no bad return value */\n\n if (status !== Z_STREAM_END && status !== Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {\n if (this.options.to === 'string') {\n this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n // Finalize on the last chunk.\n if (_mode === Z_FINISH) {\n status = zlib_deflate.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === Z_SYNC_FLUSH) {\n this.onEnd(Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n var deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate(input, options);\n}\n\n\nexports.Deflate = Deflate;\nexports.deflate = deflate;\nexports.deflateRaw = deflateRaw;\nexports.gzip = gzip;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar trees = require('./trees');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar msg = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\nvar Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\n//var Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\n//var Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\n//var Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION = 0;\n//var Z_BEST_SPEED = 1;\n//var Z_BEST_COMPRESSION = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED = 1;\nvar Z_HUFFMAN_ONLY = 2;\nvar Z_RLE = 3;\nvar Z_FIXED = 4;\nvar Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY = 0;\n//var Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES = 30;\n/* number of distance codes */\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}\n\nfunction rank(f) {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n var s = strm.state;\n\n //_tr_flush_bits(s);\n var len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n}\n\n\nfunction flush_block_only(s, last) {\n trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n// put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n utils.arraySet(buf, strm.input, strm.next_in, len, start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n var chain_length = s.max_chain_length; /* max hash chain length */\n var scan = s.strstart; /* current string */\n var match; /* matched string */\n var len; /* length of current match */\n var best_len = s.prev_length; /* best match length so far */\n var nice_match = s.nice_match; /* stop if match long enough */\n var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n var _win = s.window; // shortcut\n\n var wmask = s.w_mask;\n var prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n var strend = s.strstart + MAX_MATCH;\n var scan_end1 = _win[scan + best_len - 1];\n var scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nfunction fill_window(s) {\n var _w_size = s.w_size;\n var p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// var curr = s.strstart + s.lookahead;\n// var init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n var hash_head; /* head of hash chain */\n var bflush; /* set if current block must be flushed */\n\n var max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n var bflush; /* set if current block must be flushed */\n var prev; /* byte at distance one to match */\n var scan, strend; /* scan goes up to strend for length of run */\n\n var _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2);\n this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2);\n this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new utils.Buf16(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nfunction deflateResetKeep(strm) {\n var s;\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n trees._tr_init(s);\n return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n strm.state.gzhead = head;\n return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n var wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n var s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new utils.Buf8(s.w_size * 2);\n s.head = new utils.Buf16(s.hash_size);\n s.prev = new utils.Buf16(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new utils.Buf8(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n var old_flush, s;\n var beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n var level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n trees._tr_align(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n trees._tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n var status;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nfunction deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var s;\n var str, n;\n var wrap;\n var avail;\n var next;\n var input;\n var tmpDict;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n s = strm.state;\n wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n tmpDict = new utils.Buf8(s.w_size);\n utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n avail = strm.avail_in;\n next = strm.next_in;\n input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart;\n n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n}\n\n\nexports.deflateInit = deflateInit;\nexports.deflateInit2 = deflateInit2;\nexports.deflateReset = deflateReset;\nexports.deflateResetKeep = deflateResetKeep;\nexports.deflateSetHeader = deflateSetHeader;\nexports.deflate = deflate;\nexports.deflateEnd = deflateEnd;\nexports.deflateSetDictionary = deflateSetDictionary;\nexports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\nvar utils = require('../utils/common');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED = 1;\n//var Z_HUFFMAN_ONLY = 2;\n//var Z_RLE = 3;\nvar Z_FIXED = 4;\n//var Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY = 0;\nvar Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES = 30;\n/* number of distance codes */\n\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK = 256;\n/* end of block literal code */\n\nvar REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits = /* extra bits for each length code */\n [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];\n\nvar extra_dbits = /* extra bits for each distance code */\n [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];\n\nvar extra_blbits = /* extra bits for each bit length code */\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n}\n\n\nfunction send_code(s, c, tree) {\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n var res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nfunction gen_bitlen(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var max_code = desc.max_code;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var extra = desc.stat_desc.extra_bits;\n var base = desc.stat_desc.extra_base;\n var max_length = desc.stat_desc.max_length;\n var h; /* heap index */\n var n, m; /* iterate over the tree elements */\n var bits; /* bit length */\n var xbits; /* extra bits */\n var f; /* frequency */\n var overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n var code = 0; /* running code value */\n var bits; /* bit index */\n var n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n // \"inconsistent bit counts\");\n //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n for (n = 0; n <= max_code; n++) {\n var len = tree[n * 2 + 1]/*.Len*/;\n if (len === 0) { continue; }\n /* Now reverse the bits */\n tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n // n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n }\n}\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nfunction tr_static_init() {\n var n; /* iterates over tree elements */\n var bits; /* bit counter */\n var length; /* length value */\n var code; /* code value */\n var dist; /* distance index */\n var bl_count = new Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n // do check in _tr_init()\n //if (static_init_done) return;\n\n /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n static_l_desc.static_tree = static_ltree;\n static_l_desc.extra_bits = extra_lbits;\n static_d_desc.static_tree = static_dtree;\n static_d_desc.extra_bits = extra_dbits;\n static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n /* Initialize the mapping length (0..255) -> length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n var n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n var _n2 = n * 2;\n var _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n var dist; /* distance of matched string */\n var lc; /* match length or unmatched char (if dist == 0) */\n var lx = 0; /* running index in l_buf */\n var code; /* the code to send */\n var extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var elems = desc.stat_desc.elems;\n var n, m; /* iterate over heap elements */\n var max_code = -1; /* largest code with non zero frequency */\n var node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n var max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n var rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n var black_mask = 0xf3ffc07f;\n var n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n var opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n var max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}\n\nexports._tr_init = _tr_init;\nexports._tr_stored_block = _tr_stored_block;\nexports._tr_flush_block = _tr_flush_block;\nexports._tr_tally = _tr_tally;\nexports._tr_align = _tr_align;\n","'use strict';\n\n\nvar zlib_inflate = require('./zlib/inflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar c = require('./zlib/constants');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\nvar GZheader = require('./zlib/gzheader');\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n if (!(this instanceof Inflate)) return new Inflate(options);\n\n this.options = utils.assign({\n chunkSize: 16384,\n windowBits: 0,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new GZheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var dictionary = this.options.dictionary;\n var status, _mode;\n var next_out_utf8, tail, utf8str;\n\n // Flag to properly process Z_BUF_ERROR on testing inflate call\n // when we check that all output data was flushed.\n var allowBufError = false;\n\n if (this.ended) { return false; }\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // Only binary strings can be decompressed on practice\n strm.input = strings.binstring2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */\n\n if (status === c.Z_NEED_DICT && dictionary) {\n status = zlib_inflate.inflateSetDictionary(this.strm, dictionary);\n }\n\n if (status === c.Z_BUF_ERROR && allowBufError === true) {\n status = c.Z_OK;\n allowBufError = false;\n }\n\n if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n if (this.options.to === 'string') {\n\n next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n tail = strm.next_out - next_out_utf8;\n utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n this.onData(utf8str);\n\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n }\n\n // When no more input data, we should check that internal inflate buffers\n // are flushed. The only way to do it when avail_out = 0 - run one more\n // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n // Here we set flag to process this error properly.\n //\n // NOTE. Deflate does not return error in this case and does not needs such\n // logic.\n if (strm.avail_in === 0 && strm.avail_out === 0) {\n allowBufError = true;\n }\n\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n if (status === c.Z_STREAM_END) {\n _mode = c.Z_FINISH;\n }\n\n // Finalize on the last chunk.\n if (_mode === c.Z_FINISH) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === c.Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === c.Z_SYNC_FLUSH) {\n this.onEnd(c.Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === c.Z_OK) {\n if (this.options.to === 'string') {\n // Glue & convert here, until we teach pako to send\n // utf8 aligned strings to onData\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n * , output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n var inflator = new Inflate(options);\n\n inflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip = inflate;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar inflate_fast = require('./inffast');\nvar inflate_table = require('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\n//var Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\nvar Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\nvar Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar HEAD = 1; /* i: waiting for magic header */\nvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\nvar TIME = 3; /* i: waiting for modification time (gzip) */\nvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nvar EXLEN = 5; /* i: waiting for extra length (gzip) */\nvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nvar NAME = 7; /* i: waiting for end of file name (gzip) */\nvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\nvar HCRC = 9; /* i: waiting for header crc (gzip) */\nvar DICTID = 10; /* i: waiting for dictionary check value */\nvar DICT = 11; /* waiting for inflateSetDictionary() call */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nvar STORED = 14; /* i: waiting for stored size (length and complement) */\nvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\nvar TABLE = 17; /* i: waiting for dynamic block table lengths */\nvar LENLENS = 18; /* i: waiting for code length code lengths */\nvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nvar LEN_ = 20; /* i: same as LEN below, but only first time in */\nvar LEN = 21; /* i: waiting for length/lit/eob code */\nvar LENEXT = 22; /* i: waiting for length extra bits */\nvar DIST = 23; /* i: waiting for distance code */\nvar DISTEXT = 24; /* i: waiting for distance extra bits */\nvar MATCH = 25; /* o: waiting for output space to copy string */\nvar LIT = 26; /* o: waiting for output space to write literal */\nvar CHECK = 27; /* i: waiting for 32-bit check value */\nvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nvar DONE = 29; /* finished check, done -- remain here until reset */\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\nvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n this.work = new utils.Buf16(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n}\n\nfunction inflateReset(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n var wrap;\n var state;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n var ret;\n var state;\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n}\n\nfunction inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n var sym;\n\n lenfix = new utils.Buf32(512);\n distfix = new utils.Buf32(32);\n\n /* literal/length table */\n sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}\n\nfunction inflate(strm, flush) {\n var state;\n var input, output; // input/output buffers\n var next; /* next input INDEX */\n var put; /* next output INDEX */\n var have, left; /* available input and output */\n var hold; /* bit buffer */\n var bits; /* bits in bit buffer */\n var _in, _out; /* save starting available input and output */\n var copy; /* number of stored or match bytes to copy */\n var from; /* where to copy match bytes from */\n var from_source;\n var here = 0; /* current decoding table entry */\n var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //var last; /* parent table entry */\n var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n var len; /* length to copy for repeats, bits to drop */\n var ret; /* return code */\n var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */\n var opts;\n\n var n; // temporary var for NEED_BITS\n\n var order = /* permutation of code lengths */\n [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n state.dmax = 1 << len;\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Array(state.head.extra_len);\n }\n utils.arraySet(\n state.head.extra,\n input,\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n copy,\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n utils.arraySet(output, input, next, copy, put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n}\n\nfunction inflateEnd(strm) {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR;\n }\n\n var state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n var state;\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var state;\n var dictid;\n var ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n}\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n var state;\n var _in; /* local strm.input */\n var last; /* have enough input while in < last */\n var _out; /* local strm.output */\n var beg; /* inflate()'s initial strm.output */\n var end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n var dmax; /* maximum distance from zlib header */\n//#endif\n var wsize; /* window size or zero if not using window */\n var whave; /* valid bytes in the window */\n var wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n var s_window; /* allocated sliding window, if wsize != 0 */\n var hold; /* local strm.hold */\n var bits; /* local strm.bits */\n var lcode; /* local strm.lencode */\n var dcode; /* local strm.distcode */\n var lmask; /* mask for first level of length codes */\n var dmask; /* mask for first level of distance codes */\n var here; /* retrieved table entry */\n var op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n var len; /* match length, unused bytes */\n var dist; /* match distance */\n var from; /* where to copy match from */\n var from_source;\n\n\n var input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n var bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n var len = 0; /* a code's length in bits */\n var sym = 0; /* index of code symbols */\n var min = 0, max = 0; /* minimum and maximum code lengths */\n var root = 0; /* number of index bits for root table */\n var curr = 0; /* number of index bits for current table */\n var drop = 0; /* code bits to drop for sub-table */\n var left = 0; /* number of prefix codes available */\n var used = 0; /* code entries in table used */\n var huff = 0; /* Huffman code */\n var incr; /* for incrementing code, index */\n var fill; /* index for replicating entries */\n var low; /* low bits for current root entry */\n var mask; /* mask for low root bits */\n var next; /* next available space in table */\n var base = null; /* base value table to use */\n var base_index = 0;\n// var shoextra; /* extra bits table to use */\n var end; /* use base and extra for symbol > end */\n var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n var extra = null;\n var extra_index = 0;\n\n var here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nmodule.exports = GZheader;\n","/*\n * URL: https://github.com/cubicdaiya/onp\n *\n * Copyright (c) 2013 Tatsuhiko Kubo <cubicdaiya@gmail.com>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * The algorithm implemented here is based on \"An O(NP) Sequence Comparison Algorithm\"\n * by described by Sun Wu, Udi Manber and Gene Myers\n*/\nmodule.exports = function (a_, b_) {\n var a = a_,\n b = b_,\n m = a.length,\n n = b.length,\n reverse = false,\n ed = null,\n offset = m + 1,\n path = [],\n pathposi = [],\n ses = [],\n lcs = \"\",\n SES_DELETE = -1,\n SES_COMMON = 0,\n SES_ADD = 1;\n\n var tmp1,\n tmp2;\n\n var init = function () {\n if (m >= n) {\n tmp1 = a;\n tmp2 = m;\n a = b;\n b = tmp1;\n m = n;\n n = tmp2;\n reverse = true;\n offset = m + 1;\n }\n };\n\n var P = function (x, y, k) {\n return {\n 'x' : x,\n 'y' : y,\n 'k' : k,\n };\n };\n\n var seselem = function (elem, t) {\n return {\n 'elem' : elem,\n 't' : t,\n };\n };\n\n var snake = function (k, p, pp) {\n var r, x, y;\n if (p > pp) {\n r = path[k-1+offset];\n } else {\n r = path[k+1+offset];\n }\n\n y = Math.max(p, pp);\n x = y - k;\n while (x < m && y < n && a[x] === b[y]) {\n ++x;\n ++y;\n }\n\n path[k+offset] = pathposi.length;\n pathposi[pathposi.length] = new P(x, y, r);\n return y;\n };\n\n var recordseq = function (epc) {\n var x_idx, y_idx, px_idx, py_idx, i;\n x_idx = y_idx = 1;\n px_idx = py_idx = 0;\n for (i=epc.length-1;i>=0;--i) {\n while(px_idx < epc[i].x || py_idx < epc[i].y) {\n if (epc[i].y - epc[i].x > py_idx - px_idx) {\n if (reverse) {\n ses[ses.length] = new seselem(b[py_idx], SES_DELETE);\n } else {\n ses[ses.length] = new seselem(b[py_idx], SES_ADD);\n }\n ++y_idx;\n ++py_idx;\n } else if (epc[i].y - epc[i].x < py_idx - px_idx) {\n if (reverse) {\n ses[ses.length] = new seselem(a[px_idx], SES_ADD);\n } else {\n ses[ses.length] = new seselem(a[px_idx], SES_DELETE);\n }\n ++x_idx;\n ++px_idx;\n } else {\n ses[ses.length] = new seselem(a[px_idx], SES_COMMON);\n lcs += a[px_idx];\n ++x_idx;\n ++y_idx;\n ++px_idx;\n ++py_idx;\n }\n }\n }\n };\n\n init();\n\n return {\n SES_DELETE : -1,\n SES_COMMON : 0,\n SES_ADD : 1,\n editdistance : function () {\n return ed;\n },\n getlcs : function () {\n return lcs;\n },\n getses : function () {\n return ses;\n },\n compose : function () {\n var delta, size, fp, p, r, epc, i, k;\n delta = n - m;\n size = m + n + 3;\n fp = {};\n for (i=0;i<size;++i) {\n fp[i] = -1;\n path[i] = -1;\n }\n p = -1;\n do {\n ++p;\n for (k=-p;k<=delta-1;++k) {\n fp[k+offset] = snake(k, fp[k-1+offset]+1, fp[k+1+offset]);\n }\n for (k=delta+p;k>=delta+1;--k) {\n fp[k+offset] = snake(k, fp[k-1+offset]+1, fp[k+1+offset]);\n }\n fp[delta+offset] = snake(delta, fp[delta-1+offset]+1, fp[delta+1+offset]);\n } while (fp[delta+offset] !== n);\n\n ed = delta + 2 * p;\n\n r = path[delta+offset];\n\n epc = [];\n while (r !== -1) {\n epc[epc.length] = new P(pathposi[r].x, pathposi[r].y, null);\n r = pathposi[r].k;\n }\n recordseq(epc);\n }\n };\n};\n","// @ts-check\nimport { hashObject } from '../storage/hashObject.js'\nimport { assertParameter } from '../utils/assertParameter.js'\n\n/**\n *\n * @typedef {object} HashBlobResult - The object returned has the following schema:\n * @property {string} oid - The SHA-1 object id\n * @property {'blob'} type - The type of the object\n * @property {Uint8Array} object - The wrapped git object (the thing that is hashed)\n * @property {'wrapped'} format - The format of the object\n *\n */\n\n/**\n * Compute what the SHA-1 object id of a file would be\n *\n * @param {object} args\n * @param {Uint8Array|string} args.object - The object to write. If `object` is a String then it will be converted to a Uint8Array using UTF-8 encoding.\n *\n * @returns {Promise<HashBlobResult>} Resolves successfully with the SHA-1 object id and the wrapped object Uint8Array.\n * @see HashBlobResult\n *\n * @example\n * let { oid, type, object, format } = await git.hashBlob({\n * object: 'Hello world!',\n * })\n *\n * console.log('oid', oid)\n * console.log('type', type)\n * console.log('object', object)\n * console.log('format', format)\n *\n */\nexport async function hashBlob({ object }) {\n try {\n assertParameter('object', object)\n\n // Convert object to buffer\n if (typeof object === 'string') {\n object = Buffer.from(object, 'utf8')\n } else {\n object = Buffer.from(object)\n }\n\n const type = 'blob'\n const { oid, object: _object } = await hashObject({\n type: 'blob',\n format: 'content',\n object,\n })\n return { oid, type, object: new Uint8Array(_object), format: 'wrapped' }\n } catch (err) {\n err.caller = 'git.hashBlob'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { ObjectTypeError } from '../errors/ObjectTypeError.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitAnnotatedTag } from '../models/GitAnnotatedTag.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { GitTree } from '../models/GitTree.js'\nimport { _writeObject } from '../storage/writeObject.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Write a git object directly\n *\n * `format` can have the following values:\n *\n * | param | description |\n * | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | 'deflated' | Treat `object` as the raw deflate-compressed buffer for an object, meaning can be written to `.git/objects/**` as-is. |\n * | 'wrapped' | Treat `object` as the inflated object buffer wrapped in the git object header. This is the raw buffer used when calculating the SHA-1 object id of a git object. |\n * | 'content' | Treat `object` as the object buffer without the git header. |\n * | 'parsed' | Treat `object` as a parsed representation of the object. |\n *\n * If `format` is `'parsed'`, then `object` must match one of the schemas for `CommitObject`, `TreeObject`, `TagObject`, or a `string` (for blobs).\n *\n * {@link CommitObject typedef}\n *\n * {@link TreeObject typedef}\n *\n * {@link TagObject typedef}\n *\n * If `format` is `'content'`, `'wrapped'`, or `'deflated'`, `object` should be a `Uint8Array`.\n *\n * @deprecated\n * > This command is overly complicated.\n * >\n * > If you know the type of object you are writing, use [`writeBlob`](./writeBlob.md), [`writeCommit`](./writeCommit.md), [`writeTag`](./writeTag.md), or [`writeTree`](./writeTree.md).\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string | Uint8Array | CommitObject | TreeObject | TagObject} args.object - The object to write.\n * @param {'blob'|'tree'|'commit'|'tag'} [args.type] - The kind of object to write.\n * @param {'deflated' | 'wrapped' | 'content' | 'parsed'} [args.format = 'parsed'] - What format the object is in. The possible choices are listed below.\n * @param {string} [args.oid] - If `format` is `'deflated'` then this param is required. Otherwise it is calculated.\n * @param {string} [args.encoding] - If `type` is `'blob'` then `object` will be converted to a Uint8Array using `encoding`.\n *\n * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object.\n *\n * @example\n * // Manually create an annotated tag.\n * let sha = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD' })\n * console.log('commit', sha)\n *\n * let oid = await git.writeObject({\n * fs,\n * dir: '/tutorial',\n * type: 'tag',\n * object: {\n * object: sha,\n * type: 'commit',\n * tag: 'my-tag',\n * tagger: {\n * name: 'your name',\n * email: 'email@example.com',\n * timestamp: Math.floor(Date.now()/1000),\n * timezoneOffset: new Date().getTimezoneOffset()\n * },\n * message: 'Optional message'\n * }\n * })\n *\n * console.log('tag', oid)\n *\n */\nexport async function writeObject({\n fs: _fs,\n dir,\n gitdir = join(dir, '.git'),\n type,\n object,\n format = 'parsed',\n oid,\n encoding = undefined,\n}) {\n try {\n const fs = new FileSystem(_fs)\n // Convert object to buffer\n if (format === 'parsed') {\n switch (type) {\n case 'commit':\n object = GitCommit.from(object).toObject()\n break\n case 'tree':\n object = GitTree.from(object).toObject()\n break\n case 'blob':\n object = Buffer.from(object, encoding)\n break\n case 'tag':\n object = GitAnnotatedTag.from(object).toObject()\n break\n default:\n throw new ObjectTypeError(oid || '', type, 'blob|commit|tag|tree')\n }\n // GitObjectManager does not know how to serialize content, so we tweak that parameter before passing it.\n format = 'content'\n }\n oid = await _writeObject({\n fs,\n gitdir,\n type,\n object,\n oid,\n format,\n })\n return oid\n } catch (err) {\n err.caller = 'git.writeObject'\n throw err\n }\n}\n","export async function hasObjectLoose({ fs, gitdir, oid }) {\n const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`\n return fs.exists(`${gitdir}/${source}`)\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { readPackIndex } from '../storage/readPackIndex.js'\nimport { join } from '../utils/join.js'\n\nexport async function hasObjectPacked({\n fs,\n cache,\n gitdir,\n oid,\n getExternalRefDelta,\n}) {\n // Check to see if it's in a packfile.\n // Iterate through all the .idx files\n let list = await fs.readdir(join(gitdir, 'objects/pack'))\n list = list.filter(x => x.endsWith('.idx'))\n for (const filename of list) {\n const indexFile = `${gitdir}/objects/pack/${filename}`\n const p = await readPackIndex({\n fs,\n cache,\n filename: indexFile,\n getExternalRefDelta,\n })\n if (p.error) throw new InternalError(p.error)\n // If the packfile DOES have the oid we're looking for...\n if (p.offsets.has(oid)) {\n return true\n }\n }\n // Failed to find it\n return false\n}\n","import { hasObjectLoose } from '../storage/hasObjectLoose.js'\nimport { hasObjectPacked } from '../storage/hasObjectPacked.js'\nimport { _readObject as readObject } from '../storage/readObject.js'\n\nexport async function hasObject({\n fs,\n cache,\n gitdir,\n oid,\n format = 'content',\n}) {\n // Curry the current read method so that the packfile un-deltification\n // process can acquire external ref-deltas.\n const getExternalRefDelta = oid => readObject({ fs, cache, gitdir, oid })\n\n // Look for it in the loose object directory.\n let result = await hasObjectLoose({ fs, gitdir, oid })\n // Check to see if it's in a packfile.\n if (!result) {\n result = await hasObjectPacked({\n fs,\n cache,\n gitdir,\n oid,\n getExternalRefDelta,\n })\n }\n // Finally\n return result\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _commit } from '../commands/commit.js'\nimport { _readTree } from '../commands/readTree.js'\nimport { _writeTree } from '../commands/writeTree.js'\nimport { AlreadyExistsError } from '../errors/AlreadyExistsError.js'\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { _writeObject as writeObject } from '../storage/writeObject.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {object} args.cache\n * @param {SignCallback} [args.onSign]\n * @param {string} args.gitdir\n * @param {string} args.ref\n * @param {string} args.oid\n * @param {string|Uint8Array} args.note\n * @param {boolean} [args.force]\n * @param {Object} args.author\n * @param {string} args.author.name\n * @param {string} args.author.email\n * @param {number} args.author.timestamp\n * @param {number} args.author.timezoneOffset\n * @param {Object} args.committer\n * @param {string} args.committer.name\n * @param {string} args.committer.email\n * @param {number} args.committer.timestamp\n * @param {number} args.committer.timezoneOffset\n * @param {string} [args.signingKey]\n *\n * @returns {Promise<string>}\n */\n\nexport async function _addNote({\n fs,\n cache,\n onSign,\n gitdir,\n ref,\n oid,\n note,\n force,\n author,\n committer,\n signingKey,\n}) {\n // Get the current note commit\n let parent\n try {\n parent = await GitRefManager.resolve({ gitdir, fs, ref })\n } catch (err) {\n if (!(err instanceof NotFoundError)) {\n throw err\n }\n }\n\n // I'm using the \"empty tree\" magic number here for brevity\n const result = await _readTree({\n fs,\n cache,\n gitdir,\n oid: parent || '4b825dc642cb6eb9a060e54bf8d69288fbee4904',\n })\n let tree = result.tree\n\n // Handle the case where a note already exists\n if (force) {\n tree = tree.filter(entry => entry.path !== oid)\n } else {\n for (const entry of tree) {\n if (entry.path === oid) {\n throw new AlreadyExistsError('note', oid)\n }\n }\n }\n\n // Create the note blob\n if (typeof note === 'string') {\n note = Buffer.from(note, 'utf8')\n }\n const noteOid = await writeObject({\n fs,\n gitdir,\n type: 'blob',\n object: note,\n format: 'content',\n })\n\n // Create the new note tree\n tree.push({ mode: '100644', path: oid, oid: noteOid, type: 'blob' })\n const treeOid = await _writeTree({\n fs,\n gitdir,\n tree,\n })\n\n // Create the new note commit\n const commitOid = await _commit({\n fs,\n cache,\n onSign,\n gitdir,\n ref,\n tree: treeOid,\n parent: parent && [parent],\n message: `Note added by 'isomorphic-git addNote'\\n`,\n author,\n committer,\n signingKey,\n })\n\n return commitOid\n}\n","// TODO: make a function that just returns obCount. then emptyPackfile = () => sizePack(pack) === 0\nexport function emptyPackfile(pack) {\n const pheader = '5041434b'\n const version = '00000002'\n const obCount = '00000000'\n const header = pheader + version + obCount\n return pack.slice(0, 12).toString('hex') === header\n}\n","import { GitObject } from '../models/GitObject.js'\nimport { shasum } from '../utils/shasum.js'\n\nexport async function hashObject({\n type,\n object,\n format = 'content',\n oid = undefined,\n}) {\n if (format !== 'deflated') {\n if (format !== 'wrapped') {\n object = GitObject.wrap({ type, object })\n }\n oid = await shasum(object)\n }\n return { oid, object }\n}\n","// @ts-check\nimport { collect } from '../utils/collect.js'\nimport { join } from '../utils/join.js'\n\nimport { _pack } from './pack'\n\n/**\n *\n * @typedef {Object} PackObjectsResult The packObjects command returns an object with two properties:\n * @property {string} filename - The suggested filename for the packfile if you want to save it to disk somewhere. It includes the packfile SHA.\n * @property {Uint8Array} [packfile] - The packfile contents. Not present if `write` parameter was true, in which case the packfile was written straight to disk.\n */\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} args.gitdir\n * @param {string[]} args.oids\n * @param {boolean} args.write\n *\n * @returns {Promise<PackObjectsResult>}\n * @see PackObjectsResult\n */\nexport async function _packObjects({ fs, cache, gitdir, oids, write }) {\n const buffers = await _pack({ fs, cache, gitdir, oids })\n const packfile = Buffer.from(await collect(buffers))\n const packfileSha = packfile.slice(-20).toString('hex')\n const filename = `pack-${packfileSha}.pack`\n if (write) {\n await fs.write(join(gitdir, `objects/pack/${filename}`), packfile)\n return { filename }\n }\n return {\n filename,\n packfile: new Uint8Array(packfile),\n }\n}\n","import { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { compareStrings } from '../utils/compareStrings.js'\nimport { flatFileListToDirectoryStructure } from '../utils/flatFileListToDirectoryStructure.js'\nimport { mode2type } from '../utils/mode2type'\nimport { normalizeStats } from '../utils/normalizeStats'\n\nexport class GitWalkerIndex {\n constructor({ fs, gitdir, cache }) {\n this.treePromise = GitIndexManager.acquire(\n { fs, gitdir, cache },\n async function(index) {\n return flatFileListToDirectoryStructure(index.entries)\n }\n )\n const walker = this\n this.ConstructEntry = class StageEntry {\n constructor(fullpath) {\n this._fullpath = fullpath\n this._type = false\n this._mode = false\n this._stat = false\n this._oid = false\n }\n\n async type() {\n return walker.type(this)\n }\n\n async mode() {\n return walker.mode(this)\n }\n\n async stat() {\n return walker.stat(this)\n }\n\n async content() {\n return walker.content(this)\n }\n\n async oid() {\n return walker.oid(this)\n }\n }\n }\n\n async readdir(entry) {\n const filepath = entry._fullpath\n const tree = await this.treePromise\n const inode = tree.get(filepath)\n if (!inode) return null\n if (inode.type === 'blob') return null\n if (inode.type !== 'tree') {\n throw new Error(`ENOTDIR: not a directory, scandir '${filepath}'`)\n }\n const names = inode.children.map(inode => inode.fullpath)\n names.sort(compareStrings)\n return names\n }\n\n async type(entry) {\n if (entry._type === false) {\n await entry.stat()\n }\n return entry._type\n }\n\n async mode(entry) {\n if (entry._mode === false) {\n await entry.stat()\n }\n return entry._mode\n }\n\n async stat(entry) {\n if (entry._stat === false) {\n const tree = await this.treePromise\n const inode = tree.get(entry._fullpath)\n if (!inode) {\n throw new Error(\n `ENOENT: no such file or directory, lstat '${entry._fullpath}'`\n )\n }\n const stats = inode.type === 'tree' ? {} : normalizeStats(inode.metadata)\n entry._type = inode.type === 'tree' ? 'tree' : mode2type(stats.mode)\n entry._mode = stats.mode\n if (inode.type === 'tree') {\n entry._stat = undefined\n } else {\n entry._stat = stats\n }\n }\n return entry._stat\n }\n\n async content(_entry) {\n // Cannot get content for an index entry\n }\n\n async oid(entry) {\n if (entry._oid === false) {\n const tree = await this.treePromise\n const inode = tree.get(entry._fullpath)\n entry._oid = inode.metadata.oid\n }\n return entry._oid\n }\n}\n","import { InternalError } from '../errors/InternalError.js'\n\n/**\n *\n * @param {number} mode\n */\nexport function mode2type(mode) {\n // prettier-ignore\n switch (mode) {\n case 0o040000: return 'tree'\n case 0o100644: return 'blob'\n case 0o100755: return 'blob'\n case 0o120000: return 'blob'\n case 0o160000: return 'commit'\n }\n throw new InternalError(`Unexpected GitTree entry mode: ${mode.toString(8)}`)\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitWalkerIndex } from '../models/GitWalkerIndex.js'\nimport { GitWalkSymbol } from '../utils/symbols.js'\n\n/**\n * @returns {Walker}\n */\nexport function STAGE() {\n const o = Object.create(null)\n Object.defineProperty(o, GitWalkSymbol, {\n value: function({ fs, gitdir, cache }) {\n return new GitWalkerIndex({ fs, gitdir, cache })\n },\n })\n Object.freeze(o)\n return o\n}\n","import { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { compareStats } from '../utils/compareStats.js'\nimport { join } from '../utils/join'\nimport { normalizeStats } from '../utils/normalizeStats.js'\nimport { shasum } from '../utils/shasum.js'\n\nimport { GitObject } from './GitObject.js'\n\nexport class GitWalkerFs {\n constructor({ fs, dir, gitdir, cache }) {\n this.fs = fs\n this.cache = cache\n this.dir = dir\n this.gitdir = gitdir\n const walker = this\n this.ConstructEntry = class WorkdirEntry {\n constructor(fullpath) {\n this._fullpath = fullpath\n this._type = false\n this._mode = false\n this._stat = false\n this._content = false\n this._oid = false\n }\n\n async type() {\n return walker.type(this)\n }\n\n async mode() {\n return walker.mode(this)\n }\n\n async stat() {\n return walker.stat(this)\n }\n\n async content() {\n return walker.content(this)\n }\n\n async oid() {\n return walker.oid(this)\n }\n }\n }\n\n async readdir(entry) {\n const filepath = entry._fullpath\n const { fs, dir } = this\n const names = await fs.readdir(join(dir, filepath))\n if (names === null) return null\n return names.map(name => join(filepath, name))\n }\n\n async type(entry) {\n if (entry._type === false) {\n await entry.stat()\n }\n return entry._type\n }\n\n async mode(entry) {\n if (entry._mode === false) {\n await entry.stat()\n }\n return entry._mode\n }\n\n async stat(entry) {\n if (entry._stat === false) {\n const { fs, dir } = this\n let stat = await fs.lstat(`${dir}/${entry._fullpath}`)\n if (!stat) {\n throw new Error(\n `ENOENT: no such file or directory, lstat '${entry._fullpath}'`\n )\n }\n let type = stat.isDirectory() ? 'tree' : 'blob'\n if (type === 'blob' && !stat.isFile() && !stat.isSymbolicLink()) {\n type = 'special'\n }\n entry._type = type\n stat = normalizeStats(stat)\n entry._mode = stat.mode\n // workaround for a BrowserFS edge case\n if (stat.size === -1 && entry._actualSize) {\n stat.size = entry._actualSize\n }\n entry._stat = stat\n }\n return entry._stat\n }\n\n async content(entry) {\n if (entry._content === false) {\n const { fs, dir } = this\n if ((await entry.type()) === 'tree') {\n entry._content = undefined\n } else {\n const content = await fs.read(`${dir}/${entry._fullpath}`)\n // workaround for a BrowserFS edge case\n entry._actualSize = content.length\n if (entry._stat && entry._stat.size === -1) {\n entry._stat.size = entry._actualSize\n }\n entry._content = new Uint8Array(content)\n }\n }\n return entry._content\n }\n\n async oid(entry) {\n if (entry._oid === false) {\n const { fs, gitdir, cache } = this\n let oid\n // See if we can use the SHA1 hash in the index.\n await GitIndexManager.acquire({ fs, gitdir, cache }, async function(\n index\n ) {\n const stage = index.entriesMap.get(entry._fullpath)\n const stats = await entry.stat()\n if (!stage || compareStats(stats, stage)) {\n const content = await entry.content()\n if (content === undefined) {\n oid = undefined\n } else {\n oid = await shasum(\n GitObject.wrap({ type: 'blob', object: await entry.content() })\n )\n if (stage && oid === stage.oid) {\n index.insert({\n filepath: entry._fullpath,\n stats,\n oid: oid,\n })\n }\n }\n } else {\n // Use the index SHA1 rather than compute it\n oid = stage.oid\n }\n })\n entry._oid = oid\n }\n return entry._oid\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitWalkerFs } from '../models/GitWalkerFs.js'\nimport { GitWalkSymbol } from '../utils/symbols.js'\n\n/**\n * @returns {Walker}\n */\nexport function WORKDIR() {\n const o = Object.create(null)\n Object.defineProperty(o, GitWalkSymbol, {\n value: function({ fs, dir, gitdir, cache }) {\n return new GitWalkerFs({ fs, dir, gitdir, cache })\n },\n })\n Object.freeze(o)\n return o\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { GitIgnoreManager } from '../managers/GitIgnoreManager.js'\nimport { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { _writeObject } from '../storage/writeObject.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Add a file to the git index (aka staging area)\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.filepath - The path to the file to add to the index\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<void>} Resolves successfully once the git index has been updated\n *\n * @example\n * await fs.promises.writeFile('/tutorial/README.md', `# TEST`)\n * await git.add({ fs, dir: '/tutorial', filepath: 'README.md' })\n * console.log('done')\n *\n */\nexport async function add({\n fs: _fs,\n dir,\n gitdir = join(dir, '.git'),\n filepath,\n cache = {},\n}) {\n try {\n assertParameter('fs', _fs)\n assertParameter('dir', dir)\n assertParameter('gitdir', gitdir)\n assertParameter('filepath', filepath)\n\n const fs = new FileSystem(_fs)\n await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) {\n await addToIndex({ dir, gitdir, fs, filepath, index })\n })\n } catch (err) {\n err.caller = 'git.add'\n throw err\n }\n}\n\nasync function addToIndex({ dir, gitdir, fs, filepath, index }) {\n // TODO: Should ignore UNLESS it's already in the index.\n const ignored = await GitIgnoreManager.isIgnored({\n fs,\n dir,\n gitdir,\n filepath,\n })\n if (ignored) return\n const stats = await fs.lstat(join(dir, filepath))\n if (!stats) throw new NotFoundError(filepath)\n if (stats.isDirectory()) {\n const children = await fs.readdir(join(dir, filepath))\n const promises = children.map(child =>\n addToIndex({ dir, gitdir, fs, filepath: join(filepath, child), index })\n )\n await Promise.all(promises)\n } else {\n const object = stats.isSymbolicLink()\n ? await fs.readlink(join(dir, filepath))\n : await fs.read(join(dir, filepath))\n if (object === null) throw new NotFoundError(filepath)\n const oid = await _writeObject({ fs, gitdir, type: 'blob', object })\n index.insert({ filepath, stats, oid })\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitConfigManager } from '../managers/GitConfigManager.js'\n\n/**\n * @param {Object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {string} args.path\n *\n * @returns {Promise<any>} Resolves with the config value\n *\n * @example\n * // Read config value\n * let value = await git.getConfig({\n * dir: '$input((/))',\n * path: '$input((user.name))'\n * })\n * console.log(value)\n *\n */\nexport async function _getConfig({ fs, gitdir, path }) {\n const config = await GitConfigManager.get({ fs, gitdir })\n return config.get(path)\n}\n","import { _getConfig } from '../commands/getConfig'\n\n/**\n *\n * @returns {Promise<void | {name: string, email: string, date: Date, timestamp: number, timezoneOffset: number }>}\n */\nexport async function normalizeAuthorObject({ fs, gitdir, author = {} }) {\n let { name, email, timestamp, timezoneOffset } = author\n name = name || (await _getConfig({ fs, gitdir, path: 'user.name' }))\n email = email || (await _getConfig({ fs, gitdir, path: 'user.email' })) || ''\n\n if (name === undefined) {\n return undefined\n }\n\n timestamp = timestamp != null ? timestamp : Math.floor(Date.now() / 1000)\n timezoneOffset =\n timezoneOffset != null\n ? timezoneOffset\n : new Date(timestamp * 1000).getTimezoneOffset()\n\n return { name, email, timestamp, timezoneOffset }\n}\n","import { normalizeAuthorObject } from '../utils/normalizeAuthorObject.js'\n\n/**\n *\n * @returns {Promise<void | {name: string, email: string, timestamp: number, timezoneOffset: number }>}\n */\nexport async function normalizeCommitterObject({\n fs,\n gitdir,\n author,\n committer,\n}) {\n committer = Object.assign({}, committer || author)\n // Match committer's date to author's one, if omitted\n if (author) {\n committer.timestamp = committer.timestamp || author.timestamp\n committer.timezoneOffset = committer.timezoneOffset || author.timezoneOffset\n }\n committer = await normalizeAuthorObject({ fs, gitdir, author: committer })\n return committer\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _addNote } from '../commands/addNote.js'\nimport { MissingNameError } from '../errors/MissingNameError.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join'\nimport { normalizeAuthorObject } from '../utils/normalizeAuthorObject.js'\nimport { normalizeCommitterObject } from '../utils/normalizeCommitterObject.js'\n\n/**\n * Add or update an object note\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {SignCallback} [args.onSign] - a PGP signing implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ref] - The notes ref to look under\n * @param {string} args.oid - The SHA-1 object id of the object to add the note to.\n * @param {string|Uint8Array} args.note - The note to add\n * @param {boolean} [args.force] - Over-write note if it already exists.\n * @param {Object} [args.author] - The details about the author.\n * @param {string} [args.author.name] - Default is `user.name` config.\n * @param {string} [args.author.email] - Default is `user.email` config.\n * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00).\n * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`.\n * @param {Object} [args.committer = author] - The details about the note committer, in the same format as the author parameter. If not specified, the author details are used.\n * @param {string} [args.committer.name] - Default is `user.name` config.\n * @param {string} [args.committer.email] - Default is `user.email` config.\n * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00).\n * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`.\n * @param {string} [args.signingKey] - Sign the note commit using this private PGP key.\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the commit object for the added note.\n */\n\nexport async function addNote({\n fs: _fs,\n onSign,\n dir,\n gitdir = join(dir, '.git'),\n ref = 'refs/notes/commits',\n oid,\n note,\n force,\n author: _author,\n committer: _committer,\n signingKey,\n cache = {},\n}) {\n try {\n assertParameter('fs', _fs)\n assertParameter('gitdir', gitdir)\n assertParameter('oid', oid)\n assertParameter('note', note)\n if (signingKey) {\n assertParameter('onSign', onSign)\n }\n const fs = new FileSystem(_fs)\n\n const author = await normalizeAuthorObject({ fs, gitdir, author: _author })\n if (!author) throw new MissingNameError('author')\n\n const committer = await normalizeCommitterObject({\n fs,\n gitdir,\n author,\n committer: _committer,\n })\n if (!committer) throw new MissingNameError('committer')\n\n return await _addNote({\n fs: new FileSystem(fs),\n cache,\n onSign,\n gitdir,\n ref,\n oid,\n note,\n force,\n author,\n committer,\n signingKey,\n })\n } catch (err) {\n err.caller = 'git.addNote'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport cleanGitRef from 'clean-git-ref'\n\nimport { AlreadyExistsError } from '../errors/AlreadyExistsError.js'\nimport { InvalidRefNameError } from '../errors/InvalidRefNameError.js'\nimport { GitConfigManager } from '../managers/GitConfigManager.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {string} args.remote\n * @param {string} args.url\n * @param {boolean} args.force\n *\n * @returns {Promise<void>}\n *\n */\nexport async function _addRemote({ fs, gitdir, remote, url, force }) {\n if (remote !== cleanGitRef.clean(remote)) {\n throw new InvalidRefNameError(remote, cleanGitRef.clean(remote))\n }\n const config = await GitConfigManager.get({ fs, gitdir })\n if (!force) {\n // Check that setting it wouldn't overwrite.\n const remoteNames = await config.getSubsections('remote')\n if (remoteNames.includes(remote)) {\n // Throw an error if it would overwrite an existing remote,\n // but not if it's simply setting the same value again.\n if (url !== (await config.get(`remote.${remote}.url`))) {\n throw new AlreadyExistsError('remote', remote)\n }\n }\n }\n await config.set(`remote.${remote}.url`, url)\n await config.set(\n `remote.${remote}.fetch`,\n `+refs/heads/*:refs/remotes/${remote}/*`\n )\n await GitConfigManager.save({ fs, gitdir, config })\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _addRemote } from '../commands/addRemote.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Add or update a remote\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.remote - The name of the remote\n * @param {string} args.url - The URL of the remote\n * @param {boolean} [args.force = false] - Instead of throwing an error if a remote named `remote` already exists, overwrite the existing remote.\n *\n * @returns {Promise<void>} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.addRemote({\n * fs,\n * dir: '/tutorial',\n * remote: 'upstream',\n * url: 'https://github.com/isomorphic-git/isomorphic-git'\n * })\n * console.log('done')\n *\n */\nexport async function addRemote({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n remote,\n url,\n force = false,\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('remote', remote)\n assertParameter('url', url)\n return await _addRemote({\n fs: new FileSystem(fs),\n gitdir,\n remote,\n url,\n force,\n })\n } catch (err) {\n err.caller = 'git.addRemote'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { AlreadyExistsError } from '../errors/AlreadyExistsError.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { GitAnnotatedTag } from '../models/GitAnnotatedTag'\nimport { _readObject as readObject } from '../storage/readObject.js'\nimport { _writeObject as writeObject } from '../storage/writeObject.js'\n\n/**\n * Create an annotated tag.\n *\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {SignCallback} [args.onSign]\n * @param {string} args.gitdir\n * @param {string} args.ref\n * @param {string} [args.message = ref]\n * @param {string} [args.object = 'HEAD']\n * @param {object} [args.tagger]\n * @param {string} args.tagger.name\n * @param {string} args.tagger.email\n * @param {number} args.tagger.timestamp\n * @param {number} args.tagger.timezoneOffset\n * @param {string} [args.gpgsig]\n * @param {string} [args.signingKey]\n * @param {boolean} [args.force = false]\n *\n * @returns {Promise<void>} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.annotatedTag({\n * dir: '$input((/))',\n * ref: '$input((test-tag))',\n * message: '$input((This commit is awesome))',\n * tagger: {\n * name: '$input((Mr. Test))',\n * email: '$input((mrtest@example.com))'\n * }\n * })\n * console.log('done')\n *\n */\nexport async function _annotatedTag({\n fs,\n cache,\n onSign,\n gitdir,\n ref,\n tagger,\n message = ref,\n gpgsig,\n object,\n signingKey,\n force = false,\n}) {\n ref = ref.startsWith('refs/tags/') ? ref : `refs/tags/${ref}`\n\n if (!force && (await GitRefManager.exists({ fs, gitdir, ref }))) {\n throw new AlreadyExistsError('tag', ref)\n }\n\n // Resolve passed value\n const oid = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: object || 'HEAD',\n })\n\n const { type } = await readObject({ fs, cache, gitdir, oid })\n let tagObject = GitAnnotatedTag.from({\n object: oid,\n type,\n tag: ref.replace('refs/tags/', ''),\n tagger,\n message,\n gpgsig,\n })\n if (signingKey) {\n tagObject = await GitAnnotatedTag.sign(tagObject, onSign, signingKey)\n }\n const value = await writeObject({\n fs,\n gitdir,\n type: 'tag',\n object: tagObject.toObject(),\n })\n\n await GitRefManager.writeRef({ fs, gitdir, ref, value })\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _annotatedTag } from '../commands/annotatedTag.js'\nimport { MissingNameError } from '../errors/MissingNameError.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\nimport { normalizeAuthorObject } from '../utils/normalizeAuthorObject.js'\n\n/**\n * Create an annotated tag.\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {SignCallback} [args.onSign] - a PGP signing implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - What to name the tag\n * @param {string} [args.message = ref] - The tag message to use.\n * @param {string} [args.object = 'HEAD'] - The SHA-1 object id the tag points to. (Will resolve to a SHA-1 object id if value is a ref.) By default, the commit object which is referred by the current `HEAD` is used.\n * @param {object} [args.tagger] - The details about the tagger.\n * @param {string} [args.tagger.name] - Default is `user.name` config.\n * @param {string} [args.tagger.email] - Default is `user.email` config.\n * @param {number} [args.tagger.timestamp=Math.floor(Date.now()/1000)] - Set the tagger timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00).\n * @param {number} [args.tagger.timezoneOffset] - Set the tagger timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`.\n * @param {string} [args.gpgsig] - The gpgsig attatched to the tag object. (Mutually exclusive with the `signingKey` option.)\n * @param {string} [args.signingKey] - Sign the tag object using this private PGP key. (Mutually exclusive with the `gpgsig` option.)\n * @param {boolean} [args.force = false] - Instead of throwing an error if a tag named `ref` already exists, overwrite the existing tag. Note that this option does not modify the original tag object itself.\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<void>} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.annotatedTag({\n * fs,\n * dir: '/tutorial',\n * ref: 'test-tag',\n * message: 'This commit is awesome',\n * tagger: {\n * name: 'Mr. Test',\n * email: 'mrtest@example.com'\n * }\n * })\n * console.log('done')\n *\n */\nexport async function annotatedTag({\n fs: _fs,\n onSign,\n dir,\n gitdir = join(dir, '.git'),\n ref,\n tagger: _tagger,\n message = ref,\n gpgsig,\n object,\n signingKey,\n force = false,\n cache = {},\n}) {\n try {\n assertParameter('fs', _fs)\n assertParameter('gitdir', gitdir)\n assertParameter('ref', ref)\n if (signingKey) {\n assertParameter('onSign', onSign)\n }\n const fs = new FileSystem(_fs)\n\n // Fill in missing arguments with default values\n const tagger = await normalizeAuthorObject({ fs, gitdir, author: _tagger })\n if (!tagger) throw new MissingNameError('tagger')\n\n return await _annotatedTag({\n fs,\n cache,\n onSign,\n gitdir,\n ref,\n tagger,\n message,\n gpgsig,\n object,\n signingKey,\n force,\n })\n } catch (err) {\n err.caller = 'git.annotatedTag'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport cleanGitRef from 'clean-git-ref'\n\nimport { AlreadyExistsError } from '../errors/AlreadyExistsError.js'\nimport { InvalidRefNameError } from '../errors/InvalidRefNameError.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\n\n/**\n * Create a branch\n *\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {string} args.ref\n * @param {boolean} [args.checkout = false]\n *\n * @returns {Promise<void>} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.branch({ dir: '$input((/))', ref: '$input((develop))' })\n * console.log('done')\n *\n */\nexport async function _branch({ fs, gitdir, ref, checkout = false }) {\n if (ref !== cleanGitRef.clean(ref)) {\n throw new InvalidRefNameError(ref, cleanGitRef.clean(ref))\n }\n\n const fullref = `refs/heads/${ref}`\n\n const exist = await GitRefManager.exists({ fs, gitdir, ref: fullref })\n if (exist) {\n throw new AlreadyExistsError('branch', ref, false)\n }\n\n // Get current HEAD tree oid\n let oid\n try {\n oid = await GitRefManager.resolve({ fs, gitdir, ref: 'HEAD' })\n } catch (e) {\n // Probably an empty repo\n }\n\n // Create a new ref that points at the current commit\n if (oid) {\n await GitRefManager.writeRef({ fs, gitdir, ref: fullref, value: oid })\n }\n\n if (checkout) {\n // Update HEAD\n await GitRefManager.writeSymbolicRef({\n fs,\n gitdir,\n ref: 'HEAD',\n value: fullref,\n })\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _branch } from '../commands/branch.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Create a branch\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - What to name the branch\n * @param {boolean} [args.checkout = false] - Update `HEAD` to point at the newly created branch\n *\n * @returns {Promise<void>} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.branch({ fs, dir: '/tutorial', ref: 'develop' })\n * console.log('done')\n *\n */\nexport async function branch({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n ref,\n checkout = false,\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('ref', ref)\n return await _branch({\n fs: new FileSystem(fs),\n gitdir,\n ref,\n checkout,\n })\n } catch (err) {\n err.caller = 'git.branch'\n throw err\n }\n}\n","export const worthWalking = (filepath, root) => {\n if (filepath === '.' || root == null || root.length === 0 || root === '.') {\n return true\n }\n if (root.length >= filepath.length) {\n return root.startsWith(filepath)\n } else {\n return filepath.startsWith(root)\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { STAGE } from '../commands/STAGE.js'\nimport { TREE } from '../commands/TREE.js'\nimport { WORKDIR } from '../commands/WORKDIR.js'\nimport { _walk } from '../commands/walk.js'\nimport { CheckoutConflictError } from '../errors/CheckoutConflictError.js'\nimport { CommitNotFetchedError } from '../errors/CommitNotFetchedError.js'\nimport { InternalError } from '../errors/InternalError.js'\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { GitConfigManager } from '../managers/GitConfigManager.js'\nimport { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { _readObject as readObject } from '../storage/readObject.js'\nimport { flat } from '../utils/flat.js'\nimport { worthWalking } from '../utils/worthWalking.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {ProgressCallback} [args.onProgress]\n * @param {string} args.dir\n * @param {string} args.gitdir\n * @param {string} args.ref\n * @param {string[]} [args.filepaths]\n * @param {string} args.remote\n * @param {boolean} args.noCheckout\n * @param {boolean} [args.noUpdateHead]\n * @param {boolean} [args.dryRun]\n * @param {boolean} [args.force]\n *\n * @returns {Promise<void>} Resolves successfully when filesystem operations are complete\n *\n */\nexport async function _checkout({\n fs,\n cache,\n onProgress,\n dir,\n gitdir,\n remote,\n ref,\n filepaths,\n noCheckout,\n noUpdateHead,\n dryRun,\n force,\n}) {\n // Get tree oid\n let oid\n try {\n oid = await GitRefManager.resolve({ fs, gitdir, ref })\n // TODO: Figure out what to do if both 'ref' and 'remote' are specified, ref already exists,\n // and is configured to track a different remote.\n } catch (err) {\n if (ref === 'HEAD') throw err\n // If `ref` doesn't exist, create a new remote tracking branch\n // Figure out the commit to checkout\n const remoteRef = `${remote}/${ref}`\n oid = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: remoteRef,\n })\n // Set up remote tracking branch\n const config = await GitConfigManager.get({ fs, gitdir })\n await config.set(`branch.${ref}.remote`, remote)\n await config.set(`branch.${ref}.merge`, `refs/heads/${ref}`)\n await GitConfigManager.save({ fs, gitdir, config })\n // Create a new branch that points at that same commit\n await GitRefManager.writeRef({\n fs,\n gitdir,\n ref: `refs/heads/${ref}`,\n value: oid,\n })\n }\n\n // Update working dir\n if (!noCheckout) {\n let ops\n // First pass - just analyze files (not directories) and figure out what needs to be done\n try {\n ops = await analyze({\n fs,\n cache,\n onProgress,\n dir,\n gitdir,\n ref,\n force,\n filepaths,\n })\n } catch (err) {\n // Throw a more helpful error message for this common mistake.\n if (err instanceof NotFoundError && err.data.what === oid) {\n throw new CommitNotFetchedError(ref, oid)\n } else {\n throw err\n }\n }\n\n // Report conflicts\n const conflicts = ops\n .filter(([method]) => method === 'conflict')\n .map(([method, fullpath]) => fullpath)\n if (conflicts.length > 0) {\n throw new CheckoutConflictError(conflicts)\n }\n\n // Collect errors\n const errors = ops\n .filter(([method]) => method === 'error')\n .map(([method, fullpath]) => fullpath)\n if (errors.length > 0) {\n throw new InternalError(errors.join(', '))\n }\n\n if (dryRun) {\n // Since the format of 'ops' is in flux, I really would rather folk besides myself not start relying on it\n // return ops\n return\n }\n\n // Second pass - execute planned changes\n // The cheapest semi-parallel solution without computing a full dependency graph will be\n // to just do ops in 4 dumb phases: delete files, delete dirs, create dirs, write files\n\n let count = 0\n const total = ops.length\n await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) {\n await Promise.all(\n ops\n .filter(\n ([method]) => method === 'delete' || method === 'delete-index'\n )\n .map(async function([method, fullpath]) {\n const filepath = `${dir}/${fullpath}`\n if (method === 'delete') {\n await fs.rm(filepath)\n }\n index.delete({ filepath: fullpath })\n if (onProgress) {\n await onProgress({\n phase: 'Updating workdir',\n loaded: ++count,\n total,\n })\n }\n })\n )\n })\n\n // Note: this is cannot be done naively in parallel\n await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) {\n for (const [method, fullpath] of ops) {\n if (method === 'rmdir' || method === 'rmdir-index') {\n const filepath = `${dir}/${fullpath}`\n try {\n if (method === 'rmdir-index') {\n index.delete({ filepath: fullpath })\n }\n await fs.rmdir(filepath)\n if (onProgress) {\n await onProgress({\n phase: 'Updating workdir',\n loaded: ++count,\n total,\n })\n }\n } catch (e) {\n if (e.code === 'ENOTEMPTY') {\n console.log(\n `Did not delete ${fullpath} because directory is not empty`\n )\n } else {\n throw e\n }\n }\n }\n }\n })\n\n await Promise.all(\n ops\n .filter(([method]) => method === 'mkdir' || method === 'mkdir-index')\n .map(async function([_, fullpath]) {\n const filepath = `${dir}/${fullpath}`\n await fs.mkdir(filepath)\n if (onProgress) {\n await onProgress({\n phase: 'Updating workdir',\n loaded: ++count,\n total,\n })\n }\n })\n )\n\n await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) {\n await Promise.all(\n ops\n .filter(\n ([method]) =>\n method === 'create' ||\n method === 'create-index' ||\n method === 'update' ||\n method === 'mkdir-index'\n )\n .map(async function([method, fullpath, oid, mode, chmod]) {\n const filepath = `${dir}/${fullpath}`\n try {\n if (method !== 'create-index' && method !== 'mkdir-index') {\n const { object } = await readObject({ fs, cache, gitdir, oid })\n if (chmod) {\n // Note: the mode option of fs.write only works when creating files,\n // not updating them. Since the `fs` plugin doesn't expose `chmod` this\n // is our only option.\n await fs.rm(filepath)\n }\n if (mode === 0o100644) {\n // regular file\n await fs.write(filepath, object)\n } else if (mode === 0o100755) {\n // executable file\n await fs.write(filepath, object, { mode: 0o777 })\n } else if (mode === 0o120000) {\n // symlink\n await fs.writelink(filepath, object)\n } else {\n throw new InternalError(\n `Invalid mode 0o${mode.toString(8)} detected in blob ${oid}`\n )\n }\n }\n\n const stats = await fs.lstat(filepath)\n // We can't trust the executable bit returned by lstat on Windows,\n // so we need to preserve this value from the TREE.\n // TODO: Figure out how git handles this internally.\n if (mode === 0o100755) {\n stats.mode = 0o755\n }\n // Submodules are present in the git index but use a unique mode different from trees\n if (method === 'mkdir-index') {\n stats.mode = 0o160000\n }\n index.insert({\n filepath: fullpath,\n stats,\n oid,\n })\n if (onProgress) {\n await onProgress({\n phase: 'Updating workdir',\n loaded: ++count,\n total,\n })\n }\n } catch (e) {\n console.log(e)\n }\n })\n )\n })\n }\n\n // Update HEAD\n if (!noUpdateHead) {\n const fullRef = await GitRefManager.expand({ fs, gitdir, ref })\n if (fullRef.startsWith('refs/heads')) {\n await GitRefManager.writeSymbolicRef({\n fs,\n gitdir,\n ref: 'HEAD',\n value: fullRef,\n })\n } else {\n // detached head\n await GitRefManager.writeRef({ fs, gitdir, ref: 'HEAD', value: oid })\n }\n }\n}\n\nasync function analyze({\n fs,\n cache,\n onProgress,\n dir,\n gitdir,\n ref,\n force,\n filepaths,\n}) {\n let count = 0\n return _walk({\n fs,\n cache,\n dir,\n gitdir,\n trees: [TREE({ ref }), WORKDIR(), STAGE()],\n map: async function(fullpath, [commit, workdir, stage]) {\n if (fullpath === '.') return\n // match against base paths\n if (filepaths && !filepaths.some(base => worthWalking(fullpath, base))) {\n return null\n }\n // Emit progress event\n if (onProgress) {\n await onProgress({ phase: 'Analyzing workdir', loaded: ++count })\n }\n\n // This is a kind of silly pattern but it worked so well for me in the past\n // and it makes intuitively demonstrating exhaustiveness so *easy*.\n // This checks for the presense and/or absense of each of the 3 entries,\n // converts that to a 3-bit binary representation, and then handles\n // every possible combination (2^3 or 8 cases) with a lookup table.\n const key = [!!stage, !!commit, !!workdir].map(Number).join('')\n switch (key) {\n // Impossible case.\n case '000':\n return\n // Ignore workdir files that are not tracked and not part of the new commit.\n case '001':\n // OK, make an exception for explicitly named files.\n if (force && filepaths && filepaths.includes(fullpath)) {\n return ['delete', fullpath]\n }\n return\n // New entries\n case '010': {\n switch (await commit.type()) {\n case 'tree': {\n return ['mkdir', fullpath]\n }\n case 'blob': {\n return [\n 'create',\n fullpath,\n await commit.oid(),\n await commit.mode(),\n ]\n }\n case 'commit': {\n return [\n 'mkdir-index',\n fullpath,\n await commit.oid(),\n await commit.mode(),\n ]\n }\n default: {\n return [\n 'error',\n `new entry Unhandled type ${await commit.type()}`,\n ]\n }\n }\n }\n // New entries but there is already something in the workdir there.\n case '011': {\n switch (`${await commit.type()}-${await workdir.type()}`) {\n case 'tree-tree': {\n return // noop\n }\n case 'tree-blob':\n case 'blob-tree': {\n return ['conflict', fullpath]\n }\n case 'blob-blob': {\n // Is the incoming file different?\n if ((await commit.oid()) !== (await workdir.oid())) {\n if (force) {\n return [\n 'update',\n fullpath,\n await commit.oid(),\n await commit.mode(),\n (await commit.mode()) !== (await workdir.mode()),\n ]\n } else {\n return ['conflict', fullpath]\n }\n } else {\n // Is the incoming file a different mode?\n if ((await commit.mode()) !== (await workdir.mode())) {\n if (force) {\n return [\n 'update',\n fullpath,\n await commit.oid(),\n await commit.mode(),\n true,\n ]\n } else {\n return ['conflict', fullpath]\n }\n } else {\n return [\n 'create-index',\n fullpath,\n await commit.oid(),\n await commit.mode(),\n ]\n }\n }\n }\n case 'commit-tree': {\n // TODO: submodule\n // We'll ignore submodule directories for now.\n // Users prefer we not throw an error for lack of submodule support.\n // gitlinks\n return\n }\n case 'commit-blob': {\n // TODO: submodule\n // But... we'll complain if there is a *file* where we would\n // put a submodule if we had submodule support.\n return ['conflict', fullpath]\n }\n default: {\n return ['error', `new entry Unhandled type ${commit.type}`]\n }\n }\n }\n // Something in stage but not in the commit OR the workdir.\n // Note: I verified this behavior against canonical git.\n case '100': {\n return ['delete-index', fullpath]\n }\n // Deleted entries\n // TODO: How to handle if stage type and workdir type mismatch?\n case '101': {\n switch (await stage.type()) {\n case 'tree': {\n return ['rmdir', fullpath]\n }\n case 'blob': {\n // Git checks that the workdir.oid === stage.oid before deleting file\n if ((await stage.oid()) !== (await workdir.oid())) {\n if (force) {\n return ['delete', fullpath]\n } else {\n return ['conflict', fullpath]\n }\n } else {\n return ['delete', fullpath]\n }\n }\n case 'commit': {\n return ['rmdir-index', fullpath]\n }\n default: {\n return [\n 'error',\n `delete entry Unhandled type ${await stage.type()}`,\n ]\n }\n }\n }\n /* eslint-disable no-fallthrough */\n // File missing from workdir\n case '110':\n // Possibly modified entries\n case '111': {\n /* eslint-enable no-fallthrough */\n switch (`${await stage.type()}-${await commit.type()}`) {\n case 'tree-tree': {\n return\n }\n case 'blob-blob': {\n // If the file hasn't changed, there is no need to do anything.\n // Existing file modifications in the workdir can be be left as is.\n if (\n (await stage.oid()) === (await commit.oid()) &&\n (await stage.mode()) === (await commit.mode()) &&\n !force\n ) {\n return\n }\n\n // Check for local changes that would be lost\n if (workdir) {\n // Note: canonical git only compares with the stage. But we're smart enough\n // to compare to the stage AND the incoming commit.\n if (\n (await workdir.oid()) !== (await stage.oid()) &&\n (await workdir.oid()) !== (await commit.oid())\n ) {\n if (force) {\n return [\n 'update',\n fullpath,\n await commit.oid(),\n await commit.mode(),\n (await commit.mode()) !== (await workdir.mode()),\n ]\n } else {\n return ['conflict', fullpath]\n }\n }\n } else if (force) {\n return [\n 'update',\n fullpath,\n await commit.oid(),\n await commit.mode(),\n (await commit.mode()) !== (await stage.mode()),\n ]\n }\n // Has file mode changed?\n if ((await commit.mode()) !== (await stage.mode())) {\n return [\n 'update',\n fullpath,\n await commit.oid(),\n await commit.mode(),\n true,\n ]\n }\n // TODO: HANDLE SYMLINKS\n // Has the file content changed?\n if ((await commit.oid()) !== (await stage.oid())) {\n return [\n 'update',\n fullpath,\n await commit.oid(),\n await commit.mode(),\n false,\n ]\n } else {\n return\n }\n }\n case 'tree-blob': {\n return ['update-dir-to-blob', fullpath, await commit.oid()]\n }\n case 'blob-tree': {\n return ['update-blob-to-tree', fullpath]\n }\n case 'commit-commit': {\n return [\n 'mkdir-index',\n fullpath,\n await commit.oid(),\n await commit.mode(),\n ]\n }\n default: {\n return [\n 'error',\n `update entry Unhandled type ${await stage.type()}-${await commit.type()}`,\n ]\n }\n }\n }\n }\n },\n // Modify the default flat mapping\n reduce: async function(parent, children) {\n children = flat(children)\n if (!parent) {\n return children\n } else if (parent && parent[0] === 'rmdir') {\n children.push(parent)\n return children\n } else {\n children.unshift(parent)\n return children\n }\n },\n })\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _checkout } from '../commands/checkout.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Checkout a branch\n *\n * If the branch already exists it will check out that branch. Otherwise, it will create a new remote tracking branch set to track the remote branch of that name.\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {ProgressCallback} [args.onProgress] - optional progress event callback\n * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ref = 'HEAD'] - Source to checkout files from\n * @param {string[]} [args.filepaths] - Limit the checkout to the given files and directories\n * @param {string} [args.remote = 'origin'] - Which remote repository to use\n * @param {boolean} [args.noCheckout = false] - If true, will update HEAD but won't update the working directory\n * @param {boolean} [args.noUpdateHead] - If true, will update the working directory but won't update HEAD. Defaults to `false` when `ref` is provided, and `true` if `ref` is not provided.\n * @param {boolean} [args.dryRun = false] - If true, simulates a checkout so you can test whether it would succeed.\n * @param {boolean} [args.force = false] - If true, conflicts will be ignored and files will be overwritten regardless of local changes.\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<void>} Resolves successfully when filesystem operations are complete\n *\n * @example\n * // switch to the main branch\n * await git.checkout({\n * fs,\n * dir: '/tutorial',\n * ref: 'main'\n * })\n * console.log('done')\n *\n * @example\n * // restore the 'docs' and 'src/docs' folders to the way they were, overwriting any changes\n * await git.checkout({\n * fs,\n * dir: '/tutorial',\n * force: true,\n * filepaths: ['docs', 'src/docs']\n * })\n * console.log('done')\n *\n * @example\n * // restore the 'docs' and 'src/docs' folders to the way they are in the 'develop' branch, overwriting any changes\n * await git.checkout({\n * fs,\n * dir: '/tutorial',\n * ref: 'develop',\n * noUpdateHead: true,\n * force: true,\n * filepaths: ['docs', 'src/docs']\n * })\n * console.log('done')\n */\nexport async function checkout({\n fs,\n onProgress,\n dir,\n gitdir = join(dir, '.git'),\n remote = 'origin',\n ref: _ref,\n filepaths,\n noCheckout = false,\n noUpdateHead = _ref === undefined,\n dryRun = false,\n force = false,\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('dir', dir)\n assertParameter('gitdir', gitdir)\n\n const ref = _ref || 'HEAD'\n return await _checkout({\n fs: new FileSystem(fs),\n cache,\n onProgress,\n dir,\n gitdir,\n remote,\n ref,\n filepaths,\n noCheckout,\n noUpdateHead,\n dryRun,\n force,\n })\n } catch (err) {\n err.caller = 'git.checkout'\n throw err\n }\n}\n","// @ts-check\nimport { join } from '../utils/join.js'\n\n/**\n * Initialize a new repository\n *\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} [args.dir]\n * @param {string} [args.gitdir]\n * @param {boolean} [args.bare = false]\n * @param {string} [args.defaultBranch = 'master']\n * @returns {Promise<void>}\n */\nexport async function _init({\n fs,\n bare = false,\n dir,\n gitdir = bare ? dir : join(dir, '.git'),\n defaultBranch = 'master',\n}) {\n // Don't overwrite an existing config\n if (await fs.exists(gitdir + '/config')) return\n\n let folders = [\n 'hooks',\n 'info',\n 'objects/info',\n 'objects/pack',\n 'refs/heads',\n 'refs/tags',\n ]\n folders = folders.map(dir => gitdir + '/' + dir)\n for (const folder of folders) {\n await fs.mkdir(folder)\n }\n\n await fs.write(\n gitdir + '/config',\n '[core]\\n' +\n '\\trepositoryformatversion = 0\\n' +\n '\\tfilemode = false\\n' +\n `\\tbare = ${bare}\\n` +\n (bare ? '' : '\\tlogallrefupdates = true\\n') +\n '\\tsymlinks = false\\n' +\n '\\tignorecase = true\\n'\n )\n await fs.write(gitdir + '/HEAD', `ref: refs/heads/${defaultBranch}\\n`)\n}\n","import { join } from './join'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.dirname\n */\nexport async function deleteRecursively({ fs, dirname }) {\n const filesToDelete = []\n const directoriesToDelete = []\n const pathsToTraverse = [dirname]\n\n while (pathsToTraverse.length > 0) {\n const path = pathsToTraverse.pop()\n\n if ((await fs._stat(path)).isDirectory()) {\n directoriesToDelete.push(path)\n pathsToTraverse.push(\n ...(await fs.readdir(path)).map(subPath => join(path, subPath))\n )\n } else {\n filesToDelete.push(path)\n }\n }\n\n for (const path of filesToDelete) {\n await fs.rm(path)\n }\n for (const path of directoriesToDelete.reverse()) {\n await fs.rmdir(path)\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _addRemote } from '../commands/addRemote.js'\nimport { _checkout } from '../commands/checkout.js'\nimport { _fetch } from '../commands/fetch.js'\nimport { _init } from '../commands/init.js'\nimport { GitConfigManager } from '../managers/GitConfigManager.js'\nimport { deleteRecursively } from '../utils/deleteRecursively.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {object} args.cache\n * @param {HttpClient} args.http\n * @param {ProgressCallback} [args.onProgress]\n * @param {MessageCallback} [args.onMessage]\n * @param {AuthCallback} [args.onAuth]\n * @param {AuthFailureCallback} [args.onAuthFailure]\n * @param {AuthSuccessCallback} [args.onAuthSuccess]\n * @param {string} [args.dir]\n * @param {string} args.gitdir\n * @param {string} args.url\n * @param {string} args.corsProxy\n * @param {string} args.ref\n * @param {boolean} args.singleBranch\n * @param {boolean} args.noCheckout\n * @param {boolean} args.noTags\n * @param {string} args.remote\n * @param {number} args.depth\n * @param {Date} args.since\n * @param {string[]} args.exclude\n * @param {boolean} args.relative\n * @param {Object<string, string>} args.headers\n *\n * @returns {Promise<void>} Resolves successfully when clone completes\n *\n */\nexport async function _clone({\n fs,\n cache,\n http,\n onProgress,\n onMessage,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n dir,\n gitdir,\n url,\n corsProxy,\n ref,\n remote,\n depth,\n since,\n exclude,\n relative,\n singleBranch,\n noCheckout,\n noTags,\n headers,\n}) {\n try {\n await _init({ fs, gitdir })\n await _addRemote({ fs, gitdir, remote, url, force: false })\n if (corsProxy) {\n const config = await GitConfigManager.get({ fs, gitdir })\n await config.set(`http.corsProxy`, corsProxy)\n await GitConfigManager.save({ fs, gitdir, config })\n }\n const { defaultBranch, fetchHead } = await _fetch({\n fs,\n cache,\n http,\n onProgress,\n onMessage,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n gitdir,\n ref,\n remote,\n corsProxy,\n depth,\n since,\n exclude,\n relative,\n singleBranch,\n headers,\n tags: !noTags,\n })\n if (fetchHead === null) return\n ref = ref || defaultBranch\n ref = ref.replace('refs/heads/', '')\n // Checkout that branch\n await _checkout({\n fs,\n cache,\n onProgress,\n dir,\n gitdir,\n ref,\n remote,\n noCheckout,\n })\n } catch (err) {\n // Remove partial local repository, see #1283\n try {\n await deleteRecursively({ fs, dirname: gitdir })\n } catch (err) {\n // Ignore this error, we are already failing.\n // This try-catch is necessary so the original error is\n // not masked by potential errors in deleteRecursively.\n }\n\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _clone } from '../commands/clone.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Clone a repository\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {HttpClient} args.http - an HTTP client\n * @param {ProgressCallback} [args.onProgress] - optional progress event callback\n * @param {MessageCallback} [args.onMessage] - optional message event callback\n * @param {AuthCallback} [args.onAuth] - optional auth fill callback\n * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback\n * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback\n * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.url - The URL of the remote repository\n * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Value is stored in the git config file for that repo.\n * @param {string} [args.ref] - Which branch to checkout. By default this is the designated \"main branch\" of the repository.\n * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch.\n * @param {boolean} [args.noCheckout = false] - If true, clone will only fetch the repo, not check out a branch. Skipping checkout can save a lot of time normally spent writing files to disk.\n * @param {boolean} [args.noTags = false] - By default clone will fetch all tags. `noTags` disables that behavior.\n * @param {string} [args.remote = 'origin'] - What to name the remote that is created.\n * @param {number} [args.depth] - Integer. Determines how much of the git repository's history to retrieve\n * @param {Date} [args.since] - Only fetch commits created after the given date. Mutually exclusive with `depth`.\n * @param {string[]} [args.exclude = []] - A list of branches or tags. Instructs the remote server not to send us any commits reachable from these refs.\n * @param {boolean} [args.relative = false] - Changes the meaning of `depth` to be measured from the current shallow depth rather than from the branch tip.\n * @param {Object<string, string>} [args.headers = {}] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<void>} Resolves successfully when clone completes\n *\n * @example\n * await git.clone({\n * fs,\n * http,\n * dir: '/tutorial',\n * corsProxy: 'https://cors.isomorphic-git.org',\n * url: 'https://github.com/isomorphic-git/isomorphic-git',\n * singleBranch: true,\n * depth: 1\n * })\n * console.log('done')\n *\n */\nexport async function clone({\n fs,\n http,\n onProgress,\n onMessage,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n dir,\n gitdir = join(dir, '.git'),\n url,\n corsProxy = undefined,\n ref = undefined,\n remote = 'origin',\n depth = undefined,\n since = undefined,\n exclude = [],\n relative = false,\n singleBranch = false,\n noCheckout = false,\n noTags = false,\n headers = {},\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('http', http)\n assertParameter('gitdir', gitdir)\n if (!noCheckout) {\n assertParameter('dir', dir)\n }\n assertParameter('url', url)\n\n return await _clone({\n fs: new FileSystem(fs),\n cache,\n http,\n onProgress,\n onMessage,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n dir,\n gitdir,\n url,\n corsProxy,\n ref,\n remote,\n depth,\n since,\n exclude,\n relative,\n singleBranch,\n noCheckout,\n noTags,\n headers,\n })\n } catch (err) {\n err.caller = 'git.clone'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _commit } from '../commands/commit.js'\nimport { MissingNameError } from '../errors/MissingNameError.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\nimport { normalizeAuthorObject } from '../utils/normalizeAuthorObject.js'\nimport { normalizeCommitterObject } from '../utils/normalizeCommitterObject.js'\n\n/**\n * Create a new commit\n *\n * @param {Object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {SignCallback} [args.onSign] - a PGP signing implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.message - The commit message to use.\n * @param {Object} [args.author] - The details about the author.\n * @param {string} [args.author.name] - Default is `user.name` config.\n * @param {string} [args.author.email] - Default is `user.email` config.\n * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00).\n * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`.\n * @param {Object} [args.committer = author] - The details about the commit committer, in the same format as the author parameter. If not specified, the author details are used.\n * @param {string} [args.committer.name] - Default is `user.name` config.\n * @param {string} [args.committer.email] - Default is `user.email` config.\n * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00).\n * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`.\n * @param {string} [args.signingKey] - Sign the tag object using this private PGP key.\n * @param {boolean} [args.dryRun = false] - If true, simulates making a commit so you can test whether it would succeed. Implies `noUpdateBranch`.\n * @param {boolean} [args.noUpdateBranch = false] - If true, does not update the branch pointer after creating the commit.\n * @param {string} [args.ref] - The fully expanded name of the branch to commit to. Default is the current branch pointed to by HEAD. (TODO: fix it so it can expand branch names without throwing if the branch doesn't exist yet.)\n * @param {string[]} [args.parent] - The SHA-1 object ids of the commits to use as parents. If not specified, the commit pointed to by `ref` is used.\n * @param {string} [args.tree] - The SHA-1 object id of the tree to use. If not specified, a new tree object is created from the current git index.\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly created commit.\n *\n * @example\n * let sha = await git.commit({\n * fs,\n * dir: '/tutorial',\n * author: {\n * name: 'Mr. Test',\n * email: 'mrtest@example.com',\n * },\n * message: 'Added the a.txt file'\n * })\n * console.log(sha)\n *\n */\nexport async function commit({\n fs: _fs,\n onSign,\n dir,\n gitdir = join(dir, '.git'),\n message,\n author: _author,\n committer: _committer,\n signingKey,\n dryRun = false,\n noUpdateBranch = false,\n ref,\n parent,\n tree,\n cache = {},\n}) {\n try {\n assertParameter('fs', _fs)\n assertParameter('message', message)\n if (signingKey) {\n assertParameter('onSign', onSign)\n }\n const fs = new FileSystem(_fs)\n\n const author = await normalizeAuthorObject({ fs, gitdir, author: _author })\n if (!author) throw new MissingNameError('author')\n\n const committer = await normalizeCommitterObject({\n fs,\n gitdir,\n author,\n committer: _committer,\n })\n if (!committer) throw new MissingNameError('committer')\n\n return await _commit({\n fs,\n cache,\n onSign,\n gitdir,\n message,\n author,\n committer,\n signingKey,\n dryRun,\n noUpdateBranch,\n ref,\n parent,\n tree,\n })\n } catch (err) {\n err.caller = 'git.commit'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _currentBranch } from '../commands/currentBranch.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Get the name of the branch currently pointed to by .git/HEAD\n *\n * @param {Object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {boolean} [args.fullname = false] - Return the full path (e.g. \"refs/heads/main\") instead of the abbreviated form.\n * @param {boolean} [args.test = false] - If the current branch doesn't actually exist (such as right after git init) then return `undefined`.\n *\n * @returns {Promise<string|void>} The name of the current branch or undefined if the HEAD is detached.\n *\n * @example\n * // Get the current branch name\n * let branch = await git.currentBranch({\n * fs,\n * dir: '/tutorial',\n * fullname: false\n * })\n * console.log(branch)\n *\n */\nexport async function currentBranch({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n fullname = false,\n test = false,\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n return await _currentBranch({\n fs: new FileSystem(fs),\n gitdir,\n fullname,\n test,\n })\n } catch (err) {\n err.caller = 'git.currentBranch'\n throw err\n }\n}\n","// @ts-check\nimport { _currentBranch } from '../commands/currentBranch'\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\n\n/**\n * @param {Object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {string} args.ref\n *\n * @returns {Promise<void>}\n */\nexport async function _deleteBranch({ fs, gitdir, ref }) {\n const exist = await GitRefManager.exists({ fs, gitdir, ref })\n if (!exist) {\n throw new NotFoundError(ref)\n }\n\n const fullRef = await GitRefManager.expand({ fs, gitdir, ref })\n const currentRef = await _currentBranch({ fs, gitdir, fullname: true })\n if (fullRef === currentRef) {\n // detach HEAD\n const value = await GitRefManager.resolve({ fs, gitdir, ref: fullRef })\n await GitRefManager.writeRef({ fs, gitdir, ref: 'HEAD', value })\n }\n\n // Delete a specified branch\n await GitRefManager.deleteRef({ fs, gitdir, ref: fullRef })\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _deleteBranch } from '../commands/deleteBranch.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Delete a local branch\n *\n * > Note: This only deletes loose branches - it should be fixed in the future to delete packed branches as well.\n *\n * @param {Object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The branch to delete\n *\n * @returns {Promise<void>} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.deleteBranch({ fs, dir: '/tutorial', ref: 'local-branch' })\n * console.log('done')\n *\n */\nexport async function deleteBranch({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n ref,\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('ref', ref)\n return await _deleteBranch({\n fs: new FileSystem(fs),\n gitdir,\n ref,\n })\n } catch (err) {\n err.caller = 'git.deleteBranch'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Delete a local ref\n *\n * @param {Object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to delete\n *\n * @returns {Promise<void>} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.deleteRef({ fs, dir: '/tutorial', ref: 'refs/tags/test-tag' })\n * console.log('done')\n *\n */\nexport async function deleteRef({ fs, dir, gitdir = join(dir, '.git'), ref }) {\n try {\n assertParameter('fs', fs)\n assertParameter('ref', ref)\n await GitRefManager.deleteRef({ fs: new FileSystem(fs), gitdir, ref })\n } catch (err) {\n err.caller = 'git.deleteRef'\n throw err\n }\n}\n","// @ts-check\nimport { GitConfigManager } from '../managers/GitConfigManager.js'\n\n/**\n * @param {Object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {string} args.remote\n *\n * @returns {Promise<void>}\n */\nexport async function _deleteRemote({ fs, gitdir, remote }) {\n const config = await GitConfigManager.get({ fs, gitdir })\n await config.deleteSection('remote', remote)\n await GitConfigManager.save({ fs, gitdir, config })\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _deleteRemote } from '../commands/deleteRemote.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Removes the local config entry for a given remote\n *\n * @param {Object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.remote - The name of the remote to delete\n *\n * @returns {Promise<void>} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.deleteRemote({ fs, dir: '/tutorial', remote: 'upstream' })\n * console.log('done')\n *\n */\nexport async function deleteRemote({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n remote,\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('remote', remote)\n return await _deleteRemote({\n fs: new FileSystem(fs),\n gitdir,\n remote,\n })\n } catch (err) {\n err.caller = 'git.deleteRemote'\n throw err\n }\n}\n","// @ts-check\nimport { GitRefManager } from '../managers/GitRefManager.js'\n\n/**\n * Delete a local tag ref\n *\n * @param {Object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {string} args.ref - The tag to delete\n *\n * @returns {Promise<void>} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.deleteTag({ dir: '$input((/))', ref: '$input((test-tag))' })\n * console.log('done')\n *\n */\nexport async function _deleteTag({ fs, gitdir, ref }) {\n ref = ref.startsWith('refs/tags/') ? ref : `refs/tags/${ref}`\n await GitRefManager.deleteRef({ fs, gitdir, ref })\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _deleteTag } from '../commands/deleteTag.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Delete a local tag ref\n *\n * @param {Object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The tag to delete\n *\n * @returns {Promise<void>} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.deleteTag({ fs, dir: '/tutorial', ref: 'test-tag' })\n * console.log('done')\n *\n */\nexport async function deleteTag({ fs, dir, gitdir = join(dir, '.git'), ref }) {\n try {\n assertParameter('fs', fs)\n assertParameter('ref', ref)\n return await _deleteTag({\n fs: new FileSystem(fs),\n gitdir,\n ref,\n })\n } catch (err) {\n err.caller = 'git.deleteTag'\n throw err\n }\n}\n","export async function expandOidLoose({ fs, gitdir, oid: short }) {\n const prefix = short.slice(0, 2)\n const objectsSuffixes = await fs.readdir(`${gitdir}/objects/${prefix}`)\n return objectsSuffixes\n .map(suffix => `${prefix}${suffix}`)\n .filter(_oid => _oid.startsWith(short))\n}\n","import { InternalError } from '../errors/InternalError.js'\nimport { readPackIndex } from '../storage/readPackIndex.js'\nimport { join } from '../utils/join.js'\n\nexport async function expandOidPacked({\n fs,\n cache,\n gitdir,\n oid: short,\n getExternalRefDelta,\n}) {\n // Iterate through all the .pack files\n const results = []\n let list = await fs.readdir(join(gitdir, 'objects/pack'))\n list = list.filter(x => x.endsWith('.idx'))\n for (const filename of list) {\n const indexFile = `${gitdir}/objects/pack/${filename}`\n const p = await readPackIndex({\n fs,\n cache,\n filename: indexFile,\n getExternalRefDelta,\n })\n if (p.error) throw new InternalError(p.error)\n // Search through the list of oids in the packfile\n for (const oid of p.offsets.keys()) {\n if (oid.startsWith(short)) results.push(oid)\n }\n }\n return results\n}\n","import { AmbiguousError } from '../errors/AmbiguousError.js'\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { expandOidLoose } from '../storage/expandOidLoose.js'\nimport { expandOidPacked } from '../storage/expandOidPacked.js'\nimport { _readObject as readObject } from '../storage/readObject.js'\n\nexport async function _expandOid({ fs, cache, gitdir, oid: short }) {\n // Curry the current read method so that the packfile un-deltification\n // process can acquire external ref-deltas.\n const getExternalRefDelta = oid => readObject({ fs, cache, gitdir, oid })\n\n const results1 = await expandOidLoose({ fs, gitdir, oid: short })\n const results2 = await expandOidPacked({\n fs,\n cache,\n gitdir,\n oid: short,\n getExternalRefDelta,\n })\n const results = results1.concat(results2)\n\n if (results.length === 1) {\n return results[0]\n }\n if (results.length > 1) {\n throw new AmbiguousError('oids', short, results)\n }\n throw new NotFoundError(`an object matching \"${short}\"`)\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { FileSystem } from '../models/FileSystem.js'\nimport { _expandOid } from '../storage/expandOid.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Expand and resolve a short oid into a full oid\n *\n * @param {Object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.oid - The shortened oid prefix to expand (like \"0414d2a\")\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<string>} Resolves successfully with the full oid (like \"0414d2a286d7bbc7a4a326a61c1f9f888a8ab87f\")\n *\n * @example\n * let oid = await git.expandOid({ fs, dir: '/tutorial', oid: '0414d2a'})\n * console.log(oid)\n *\n */\nexport async function expandOid({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n oid,\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('oid', oid)\n return await _expandOid({\n fs: new FileSystem(fs),\n cache,\n gitdir,\n oid,\n })\n } catch (err) {\n err.caller = 'git.expandOid'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Expand an abbreviated ref to its full name\n *\n * @param {Object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to expand (like \"v1.0.0\")\n *\n * @returns {Promise<string>} Resolves successfully with a full ref name (\"refs/tags/v1.0.0\")\n *\n * @example\n * let fullRef = await git.expandRef({ fs, dir: '/tutorial', ref: 'main'})\n * console.log(fullRef)\n *\n */\nexport async function expandRef({ fs, dir, gitdir = join(dir, '.git'), ref }) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('ref', ref)\n return await GitRefManager.expand({\n fs: new FileSystem(fs),\n gitdir,\n ref,\n })\n } catch (err) {\n err.caller = 'git.expandRef'\n throw err\n }\n}\n","// @ts-check\nimport { GitCommit } from '../models/GitCommit.js'\nimport { _readObject as readObject } from '../storage/readObject.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} args.gitdir\n * @param {string[]} args.oids\n *\n */\nexport async function _findMergeBase({ fs, cache, gitdir, oids }) {\n // Note: right now, the tests are geared so that the output should match that of\n // `git merge-base --all --octopus`\n // because without the --octopus flag, git's output seems to depend on the ORDER of the oids,\n // and computing virtual merge bases is just too much for me to fathom right now.\n\n // If we start N independent walkers, one at each of the given `oids`, and walk backwards\n // through ancestors, eventually we'll discover a commit where each one of these N walkers\n // has passed through. So we just need to keep track of which walkers have visited each commit\n // until we find a commit that N distinct walkers has visited.\n const visits = {}\n const passes = oids.length\n let heads = oids.map((oid, index) => ({ index, oid }))\n while (heads.length) {\n // Count how many times we've passed each commit\n const result = new Set()\n for (const { oid, index } of heads) {\n if (!visits[oid]) visits[oid] = new Set()\n visits[oid].add(index)\n if (visits[oid].size === passes) {\n result.add(oid)\n }\n }\n if (result.size > 0) {\n return [...result]\n }\n // We haven't found a common ancestor yet\n const newheads = new Map()\n for (const { oid, index } of heads) {\n try {\n const { object } = await readObject({ fs, cache, gitdir, oid })\n const commit = GitCommit.from(object)\n const { parent } = commit.parseHeaders()\n for (const oid of parent) {\n if (!visits[oid] || !visits[oid].has(index)) {\n newheads.set(oid + ':' + index, { oid, index })\n }\n }\n } catch (err) {\n // do nothing\n }\n }\n heads = Array.from(newheads.values())\n }\n return []\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _commit } from '../commands/commit'\nimport { _currentBranch } from '../commands/currentBranch.js'\nimport { _findMergeBase } from '../commands/findMergeBase.js'\nimport { FastForwardError } from '../errors/FastForwardError.js'\nimport { MergeNotSupportedError } from '../errors/MergeNotSupportedError.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { abbreviateRef } from '../utils/abbreviateRef.js'\nimport { mergeTree } from '../utils/mergeTree.js'\n\n// import diff3 from 'node-diff3'\n/**\n *\n * @typedef {Object} MergeResult - Returns an object with a schema like this:\n * @property {string} [oid] - The SHA-1 object id that is now at the head of the branch. Absent only if `dryRun` was specified and `mergeCommit` is true.\n * @property {boolean} [alreadyMerged] - True if the branch was already merged so no changes were made\n * @property {boolean} [fastForward] - True if it was a fast-forward merge\n * @property {boolean} [mergeCommit] - True if merge resulted in a merge commit\n * @property {string} [tree] - The SHA-1 object id of the tree resulting from a merge commit\n *\n */\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {object} args.cache\n * @param {string} args.gitdir\n * @param {string} [args.ours]\n * @param {string} args.theirs\n * @param {boolean} args.fastForwardOnly\n * @param {boolean} args.dryRun\n * @param {boolean} args.noUpdateBranch\n * @param {string} [args.message]\n * @param {Object} args.author\n * @param {string} args.author.name\n * @param {string} args.author.email\n * @param {number} args.author.timestamp\n * @param {number} args.author.timezoneOffset\n * @param {Object} args.committer\n * @param {string} args.committer.name\n * @param {string} args.committer.email\n * @param {number} args.committer.timestamp\n * @param {number} args.committer.timezoneOffset\n * @param {string} [args.signingKey]\n *\n * @returns {Promise<MergeResult>} Resolves to a description of the merge operation\n *\n */\nexport async function _merge({\n fs,\n cache,\n gitdir,\n ours,\n theirs,\n fastForwardOnly = false,\n dryRun = false,\n noUpdateBranch = false,\n message,\n author,\n committer,\n signingKey,\n}) {\n if (ours === undefined) {\n ours = await _currentBranch({ fs, gitdir, fullname: true })\n }\n ours = await GitRefManager.expand({\n fs,\n gitdir,\n ref: ours,\n })\n theirs = await GitRefManager.expand({\n fs,\n gitdir,\n ref: theirs,\n })\n const ourOid = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: ours,\n })\n const theirOid = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: theirs,\n })\n // find most recent common ancestor of ref a and ref b\n const baseOids = await _findMergeBase({\n fs,\n cache,\n gitdir,\n oids: [ourOid, theirOid],\n })\n if (baseOids.length !== 1) {\n throw new MergeNotSupportedError()\n }\n const baseOid = baseOids[0]\n // handle fast-forward case\n if (baseOid === theirOid) {\n return {\n oid: ourOid,\n alreadyMerged: true,\n }\n }\n if (baseOid === ourOid) {\n if (!dryRun && !noUpdateBranch) {\n await GitRefManager.writeRef({ fs, gitdir, ref: ours, value: theirOid })\n }\n return {\n oid: theirOid,\n fastForward: true,\n }\n } else {\n // not a simple fast-forward\n if (fastForwardOnly) {\n throw new FastForwardError()\n }\n // try a fancier merge\n const tree = await mergeTree({\n fs,\n cache,\n gitdir,\n ourOid,\n theirOid,\n baseOid,\n ourName: ours,\n baseName: 'base',\n theirName: theirs,\n dryRun,\n })\n if (!message) {\n message = `Merge branch '${abbreviateRef(theirs)}' into ${abbreviateRef(\n ours\n )}`\n }\n const oid = await _commit({\n fs,\n cache,\n gitdir,\n message,\n ref: ours,\n tree,\n parent: [ourOid, theirOid],\n author,\n committer,\n signingKey,\n dryRun,\n noUpdateBranch,\n })\n return {\n oid,\n tree,\n mergeCommit: true,\n }\n }\n}\n","// @ts-check\n\nimport { _checkout } from '../commands/checkout.js'\nimport { _currentBranch } from '../commands/currentBranch.js'\nimport { _fetch } from '../commands/fetch.js'\nimport { _merge } from '../commands/merge.js'\nimport { MissingParameterError } from '../errors/MissingParameterError.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {object} args.cache\n * @param {HttpClient} args.http\n * @param {ProgressCallback} [args.onProgress]\n * @param {MessageCallback} [args.onMessage]\n * @param {AuthCallback} [args.onAuth]\n * @param {AuthFailureCallback} [args.onAuthFailure]\n * @param {AuthSuccessCallback} [args.onAuthSuccess]\n * @param {string} args.dir\n * @param {string} args.gitdir\n * @param {string} args.ref\n * @param {string} [args.url]\n * @param {string} [args.remote]\n * @param {string} [args.remoteRef]\n * @param {string} [args.corsProxy]\n * @param {boolean} args.singleBranch\n * @param {boolean} args.fastForwardOnly\n * @param {Object<string, string>} [args.headers]\n * @param {Object} args.author\n * @param {string} args.author.name\n * @param {string} args.author.email\n * @param {number} args.author.timestamp\n * @param {number} args.author.timezoneOffset\n * @param {Object} args.committer\n * @param {string} args.committer.name\n * @param {string} args.committer.email\n * @param {number} args.committer.timestamp\n * @param {number} args.committer.timezoneOffset\n * @param {string} [args.signingKey]\n *\n * @returns {Promise<void>} Resolves successfully when pull operation completes\n *\n */\nexport async function _pull({\n fs,\n cache,\n http,\n onProgress,\n onMessage,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n dir,\n gitdir,\n ref,\n url,\n remote,\n remoteRef,\n fastForwardOnly,\n corsProxy,\n singleBranch,\n headers,\n author,\n committer,\n signingKey,\n}) {\n try {\n // If ref is undefined, use 'HEAD'\n if (!ref) {\n const head = await _currentBranch({ fs, gitdir })\n // TODO: use a better error.\n if (!head) {\n throw new MissingParameterError('ref')\n }\n ref = head\n }\n\n const { fetchHead, fetchHeadDescription } = await _fetch({\n fs,\n cache,\n http,\n onProgress,\n onMessage,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n gitdir,\n corsProxy,\n ref,\n url,\n remote,\n remoteRef,\n singleBranch,\n headers,\n })\n // Merge the remote tracking branch into the local one.\n await _merge({\n fs,\n cache,\n gitdir,\n ours: ref,\n theirs: fetchHead,\n fastForwardOnly,\n message: `Merge ${fetchHeadDescription}`,\n author,\n committer,\n signingKey,\n dryRun: false,\n noUpdateBranch: false,\n })\n await _checkout({\n fs,\n cache,\n onProgress,\n dir,\n gitdir,\n ref,\n remote,\n noCheckout: false,\n })\n } catch (err) {\n err.caller = 'git.pull'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _pull } from '../commands/pull.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Like `pull`, but hard-coded with `fastForward: true` so there is no need for an `author` parameter.\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {HttpClient} args.http - an HTTP client\n * @param {ProgressCallback} [args.onProgress] - optional progress event callback\n * @param {MessageCallback} [args.onMessage] - optional message event callback\n * @param {AuthCallback} [args.onAuth] - optional auth fill callback\n * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback\n * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback\n * @param {string} args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ref] - Which branch to merge into. By default this is the currently checked out branch.\n * @param {string} [args.url] - (Added in 1.1.0) The URL of the remote repository. The default is the value set in the git config for that remote.\n * @param {string} [args.remote] - (Added in 1.1.0) If URL is not specified, determines which remote to use.\n * @param {string} [args.remoteRef] - (Added in 1.1.0) The name of the branch on the remote to fetch. By default this is the configured remote tracking branch.\n * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config.\n * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch.\n * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<void>} Resolves successfully when pull operation completes\n *\n * @example\n * await git.fastForward({\n * fs,\n * http,\n * dir: '/tutorial',\n * ref: 'main',\n * singleBranch: true\n * })\n * console.log('done')\n *\n */\nexport async function fastForward({\n fs,\n http,\n onProgress,\n onMessage,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n dir,\n gitdir = join(dir, '.git'),\n ref,\n url,\n remote,\n remoteRef,\n corsProxy,\n singleBranch,\n headers = {},\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('http', http)\n assertParameter('gitdir', gitdir)\n\n const thisWillNotBeUsed = {\n name: '',\n email: '',\n timestamp: Date.now(),\n timezoneOffset: 0,\n }\n\n return await _pull({\n fs: new FileSystem(fs),\n cache,\n http,\n onProgress,\n onMessage,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n dir,\n gitdir,\n ref,\n url,\n remote,\n remoteRef,\n fastForwardOnly: true,\n corsProxy,\n singleBranch,\n headers,\n author: thisWillNotBeUsed,\n committer: thisWillNotBeUsed,\n })\n } catch (err) {\n err.caller = 'git.fastForward'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _fetch } from '../commands/fetch.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n *\n * @typedef {object} FetchResult - The object returned has the following schema:\n * @property {string | null} defaultBranch - The branch that is cloned if no branch is specified\n * @property {string | null} fetchHead - The SHA-1 object id of the fetched head commit\n * @property {string | null} fetchHeadDescription - a textual description of the branch that was fetched\n * @property {Object<string, string>} [headers] - The HTTP response headers returned by the git server\n * @property {string[]} [pruned] - A list of branches that were pruned, if you provided the `prune` parameter\n *\n */\n\n/**\n * Fetch commits from a remote repository\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {HttpClient} args.http - an HTTP client\n * @param {ProgressCallback} [args.onProgress] - optional progress event callback\n * @param {MessageCallback} [args.onMessage] - optional message event callback\n * @param {AuthCallback} [args.onAuth] - optional auth fill callback\n * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback\n * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.url] - The URL of the remote repository. The default is the value set in the git config for that remote.\n * @param {string} [args.remote] - If URL is not specified, determines which remote to use.\n * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch.\n * @param {string} [args.ref] - Which branch to fetch if `singleBranch` is true. By default this is the current branch or the remote's default branch.\n * @param {string} [args.remoteRef] - The name of the branch on the remote to fetch if `singleBranch` is true. By default this is the configured remote tracking branch.\n * @param {boolean} [args.tags = false] - Also fetch tags\n * @param {number} [args.depth] - Integer. Determines how much of the git repository's history to retrieve\n * @param {boolean} [args.relative = false] - Changes the meaning of `depth` to be measured from the current shallow depth rather than from the branch tip.\n * @param {Date} [args.since] - Only fetch commits created after the given date. Mutually exclusive with `depth`.\n * @param {string[]} [args.exclude = []] - A list of branches or tags. Instructs the remote server not to send us any commits reachable from these refs.\n * @param {boolean} [args.prune] - Delete local remote-tracking branches that are not present on the remote\n * @param {boolean} [args.pruneTags] - Prune local tags that don’t exist on the remote, and force-update those tags that differ\n * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config.\n * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<FetchResult>} Resolves successfully when fetch completes\n * @see FetchResult\n *\n * @example\n * let result = await git.fetch({\n * fs,\n * http,\n * dir: '/tutorial',\n * corsProxy: 'https://cors.isomorphic-git.org',\n * url: 'https://github.com/isomorphic-git/isomorphic-git',\n * ref: 'main',\n * depth: 1,\n * singleBranch: true,\n * tags: false\n * })\n * console.log(result)\n *\n */\nexport async function fetch({\n fs,\n http,\n onProgress,\n onMessage,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n dir,\n gitdir = join(dir, '.git'),\n ref,\n remote,\n remoteRef,\n url,\n corsProxy,\n depth = null,\n since = null,\n exclude = [],\n relative = false,\n tags = false,\n singleBranch = false,\n headers = {},\n prune = false,\n pruneTags = false,\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('http', http)\n assertParameter('gitdir', gitdir)\n\n return await _fetch({\n fs: new FileSystem(fs),\n cache,\n http,\n onProgress,\n onMessage,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n gitdir,\n ref,\n remote,\n remoteRef,\n url,\n corsProxy,\n depth,\n since,\n exclude,\n relative,\n tags,\n singleBranch,\n headers,\n prune,\n pruneTags,\n })\n } catch (err) {\n err.caller = 'git.fetch'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _findMergeBase } from '../commands/findMergeBase.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Find the merge base for a set of commits\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string[]} args.oids - Which commits\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n */\nexport async function findMergeBase({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n oids,\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('oids', oids)\n\n return await _findMergeBase({\n fs: new FileSystem(fs),\n cache,\n gitdir,\n oids,\n })\n } catch (err) {\n err.caller = 'git.findMergeBase'\n throw err\n }\n}\n","// @ts-check\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { dirname } from '../utils/dirname.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Find the root git directory\n *\n * Starting at `filepath`, walks upward until it finds a directory that contains a subdirectory called '.git'.\n *\n * @param {Object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.filepath\n *\n * @returns {Promise<string>} Resolves successfully with a root git directory path\n */\nexport async function _findRoot({ fs, filepath }) {\n if (await fs.exists(join(filepath, '.git'))) {\n return filepath\n } else {\n const parent = dirname(filepath)\n if (parent === filepath) {\n throw new NotFoundError(`git root for ${filepath}`)\n }\n return _findRoot({ fs, filepath: parent })\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _findRoot } from '../commands/findRoot.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\n\n/**\n * Find the root git directory\n *\n * Starting at `filepath`, walks upward until it finds a directory that contains a subdirectory called '.git'.\n *\n * @param {Object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} args.filepath - The file directory to start searching in.\n *\n * @returns {Promise<string>} Resolves successfully with a root git directory path\n * @throws {NotFoundError}\n *\n * @example\n * let gitroot = await git.findRoot({\n * fs,\n * filepath: '/tutorial/src/utils'\n * })\n * console.log(gitroot)\n *\n */\nexport async function findRoot({ fs, filepath }) {\n try {\n assertParameter('fs', fs)\n assertParameter('filepath', filepath)\n\n return await _findRoot({ fs: new FileSystem(fs), filepath })\n } catch (err) {\n err.caller = 'git.findRoot'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _getConfig } from '../commands/getConfig.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Read an entry from the git config files.\n *\n * *Caveats:*\n * - Currently only the local `$GIT_DIR/config` file can be read or written. However support for the global `~/.gitconfig` and system `$(prefix)/etc/gitconfig` will be added in the future.\n * - The current parser does not support the more exotic features of the git-config file format such as `[include]` and `[includeIf]`.\n *\n * @param {Object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.path - The key of the git config entry\n *\n * @returns {Promise<any>} Resolves with the config value\n *\n * @example\n * // Read config value\n * let value = await git.getConfig({\n * fs,\n * dir: '/tutorial',\n * path: 'remote.origin.url'\n * })\n * console.log(value)\n *\n */\nexport async function getConfig({ fs, dir, gitdir = join(dir, '.git'), path }) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('path', path)\n\n return await _getConfig({\n fs: new FileSystem(fs),\n gitdir,\n path,\n })\n } catch (err) {\n err.caller = 'git.getConfig'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitConfigManager } from '../managers/GitConfigManager.js'\n\n/**\n * @param {Object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {string} args.path\n *\n * @returns {Promise<Array<any>>} Resolves with an array of the config value\n *\n */\nexport async function _getConfigAll({ fs, gitdir, path }) {\n const config = await GitConfigManager.get({ fs, gitdir })\n return config.getall(path)\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _getConfigAll } from '../commands/getConfigAll.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Read a multi-valued entry from the git config files.\n *\n * *Caveats:*\n * - Currently only the local `$GIT_DIR/config` file can be read or written. However support for the global `~/.gitconfig` and system `$(prefix)/etc/gitconfig` will be added in the future.\n * - The current parser does not support the more exotic features of the git-config file format such as `[include]` and `[includeIf]`.\n *\n * @param {Object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.path - The key of the git config entry\n *\n * @returns {Promise<Array<any>>} Resolves with the config value\n *\n */\nexport async function getConfigAll({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n path,\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('path', path)\n\n return await _getConfigAll({\n fs: new FileSystem(fs),\n gitdir,\n path,\n })\n } catch (err) {\n err.caller = 'git.getConfigAll'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitRemoteManager } from '../managers/GitRemoteManager.js'\nimport { assertParameter } from '../utils/assertParameter.js'\n\n/**\n *\n * @typedef {Object} GetRemoteInfoResult - The object returned has the following schema:\n * @property {string[]} capabilities - The list of capabilities returned by the server (part of the Git protocol)\n * @property {Object} [refs]\n * @property {string} [HEAD] - The default branch of the remote\n * @property {Object<string, string>} [refs.heads] - The branches on the remote\n * @property {Object<string, string>} [refs.pull] - The special branches representing pull requests (non-standard)\n * @property {Object<string, string>} [refs.tags] - The tags on the remote\n *\n */\n\n/**\n * List a remote servers branches, tags, and capabilities.\n *\n * This is a rare command that doesn't require an `fs`, `dir`, or even `gitdir` argument.\n * It just communicates to a remote git server, using the first step of the `git-upload-pack` handshake, but stopping short of fetching the packfile.\n *\n * @param {object} args\n * @param {HttpClient} args.http - an HTTP client\n * @param {AuthCallback} [args.onAuth] - optional auth fill callback\n * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback\n * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback\n * @param {string} args.url - The URL of the remote repository. Will be gotten from gitconfig if absent.\n * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config.\n * @param {boolean} [args.forPush = false] - By default, the command queries the 'fetch' capabilities. If true, it will ask for the 'push' capabilities.\n * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config\n *\n * @returns {Promise<GetRemoteInfoResult>} Resolves successfully with an object listing the branches, tags, and capabilities of the remote.\n * @see GetRemoteInfoResult\n *\n * @example\n * let info = await git.getRemoteInfo({\n * http,\n * url:\n * \"https://cors.isomorphic-git.org/github.com/isomorphic-git/isomorphic-git.git\"\n * });\n * console.log(info);\n *\n */\nexport async function getRemoteInfo({\n http,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n corsProxy,\n url,\n headers = {},\n forPush = false,\n}) {\n try {\n assertParameter('http', http)\n assertParameter('url', url)\n\n const GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url })\n const remote = await GitRemoteHTTP.discover({\n http,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n corsProxy,\n service: forPush ? 'git-receive-pack' : 'git-upload-pack',\n url,\n headers,\n protocolVersion: 1,\n })\n\n // Note: remote.capabilities, remote.refs, and remote.symrefs are Set and Map objects,\n // but one of the objectives of the public API is to always return JSON-compatible objects\n // so we must JSONify them.\n const result = {\n capabilities: [...remote.capabilities],\n }\n // Convert the flat list into an object tree, because I figure 99% of the time\n // that will be easier to use.\n for (const [ref, oid] of remote.refs) {\n const parts = ref.split('/')\n const last = parts.pop()\n let o = result\n for (const part of parts) {\n o[part] = o[part] || {}\n o = o[part]\n }\n o[last] = oid\n }\n // Merge symrefs on top of refs to more closely match actual git repo layouts\n for (const [symref, ref] of remote.symrefs) {\n const parts = symref.split('/')\n const last = parts.pop()\n let o = result\n for (const part of parts) {\n o[part] = o[part] || {}\n o = o[part]\n }\n o[last] = ref\n }\n return result\n } catch (err) {\n err.caller = 'git.getRemoteInfo'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\n/**\n * @param {any} remote\n * @param {string} prefix\n * @param {boolean} symrefs\n * @param {boolean} peelTags\n * @returns {ServerRef[]}\n */\nexport function formatInfoRefs(remote, prefix, symrefs, peelTags) {\n const refs = []\n for (const [key, value] of remote.refs) {\n if (prefix && !key.startsWith(prefix)) continue\n\n if (key.endsWith('^{}')) {\n if (peelTags) {\n const _key = key.replace('^{}', '')\n // Peeled tags are almost always listed immediately after the original tag\n const last = refs[refs.length - 1]\n const r = last.ref === _key ? last : refs.find(x => x.ref === _key)\n if (r === undefined) {\n throw new Error('I did not expect this to happen')\n }\n r.peeled = value\n }\n continue\n }\n /** @type ServerRef */\n const ref = { ref: key, oid: value }\n if (symrefs) {\n if (remote.symrefs.has(key)) {\n ref.target = remote.symrefs.get(key)\n }\n }\n refs.push(ref)\n }\n return refs\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitRemoteManager } from '../managers/GitRemoteManager.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { formatInfoRefs } from '../utils/formatInfoRefs.js'\n\n/**\n * @typedef {Object} GetRemoteInfo2Result - This object has the following schema:\n * @property {1 | 2} protocolVersion - Git protocol version the server supports\n * @property {Object<string, string | true>} capabilities - An object of capabilities represented as keys and values\n * @property {ServerRef[]} [refs] - Server refs (they get returned by protocol version 1 whether you want them or not)\n */\n\n/**\n * List a remote server's capabilities.\n *\n * This is a rare command that doesn't require an `fs`, `dir`, or even `gitdir` argument.\n * It just communicates to a remote git server, determining what protocol version, commands, and features it supports.\n *\n * > The successor to [`getRemoteInfo`](./getRemoteInfo.md), this command supports Git Wire Protocol Version 2.\n * > Therefore its return type is more complicated as either:\n * >\n * > - v1 capabilities (and refs) or\n * > - v2 capabilities (and no refs)\n * >\n * > are returned.\n * > If you just care about refs, use [`listServerRefs`](./listServerRefs.md)\n *\n * @param {object} args\n * @param {HttpClient} args.http - an HTTP client\n * @param {AuthCallback} [args.onAuth] - optional auth fill callback\n * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback\n * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback\n * @param {string} args.url - The URL of the remote repository. Will be gotten from gitconfig if absent.\n * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config.\n * @param {boolean} [args.forPush = false] - By default, the command queries the 'fetch' capabilities. If true, it will ask for the 'push' capabilities.\n * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config\n * @param {1 | 2} [args.protocolVersion = 2] - Which version of the Git Protocol to use.\n *\n * @returns {Promise<GetRemoteInfo2Result>} Resolves successfully with an object listing the capabilities of the remote.\n * @see GetRemoteInfo2Result\n * @see ServerRef\n *\n * @example\n * let info = await git.getRemoteInfo2({\n * http,\n * corsProxy: \"https://cors.isomorphic-git.org\",\n * url: \"https://github.com/isomorphic-git/isomorphic-git.git\"\n * });\n * console.log(info);\n *\n */\nexport async function getRemoteInfo2({\n http,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n corsProxy,\n url,\n headers = {},\n forPush = false,\n protocolVersion = 2,\n}) {\n try {\n assertParameter('http', http)\n assertParameter('url', url)\n\n const GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url })\n const remote = await GitRemoteHTTP.discover({\n http,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n corsProxy,\n service: forPush ? 'git-receive-pack' : 'git-upload-pack',\n url,\n headers,\n protocolVersion,\n })\n\n if (remote.protocolVersion === 2) {\n /** @type GetRemoteInfo2Result */\n return {\n protocolVersion: remote.protocolVersion,\n capabilities: remote.capabilities2,\n }\n }\n\n // Note: remote.capabilities, remote.refs, and remote.symrefs are Set and Map objects,\n // but one of the objectives of the public API is to always return JSON-compatible objects\n // so we must JSONify them.\n /** @type Object<string, true> */\n const capabilities = {}\n for (const cap of remote.capabilities) {\n const [key, value] = cap.split('=')\n if (value) {\n capabilities[key] = value\n } else {\n capabilities[key] = true\n }\n }\n /** @type GetRemoteInfo2Result */\n return {\n protocolVersion: 1,\n capabilities,\n refs: formatInfoRefs(remote, undefined, true, true),\n }\n } catch (err) {\n err.caller = 'git.getRemoteInfo2'\n throw err\n }\n}\n","// @ts-check\nimport { GitPackIndex } from '../models/GitPackIndex.js'\nimport { _readObject as readObject } from '../storage/readObject.js'\nimport { join } from '../utils/join.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {ProgressCallback} [args.onProgress]\n * @param {string} args.dir\n * @param {string} args.gitdir\n * @param {string} args.filepath\n *\n * @returns {Promise<{oids: string[]}>}\n */\nexport async function _indexPack({\n fs,\n cache,\n onProgress,\n dir,\n gitdir,\n filepath,\n}) {\n try {\n filepath = join(dir, filepath)\n const pack = await fs.read(filepath)\n const getExternalRefDelta = oid => readObject({ fs, cache, gitdir, oid })\n const idx = await GitPackIndex.fromPack({\n pack,\n getExternalRefDelta,\n onProgress,\n })\n await fs.write(filepath.replace(/\\.pack$/, '.idx'), await idx.toBuffer())\n return {\n oids: [...idx.hashes],\n }\n } catch (err) {\n err.caller = 'git.indexPack'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _indexPack } from '../commands/indexPack.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Create the .idx file for a given .pack file\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {ProgressCallback} [args.onProgress] - optional progress event callback\n * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.filepath - The path to the .pack file to index\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<{oids: string[]}>} Resolves with a list of the SHA-1 object ids contained in the packfile\n *\n * @example\n * let packfiles = await fs.promises.readdir('/tutorial/.git/objects/pack')\n * packfiles = packfiles.filter(name => name.endsWith('.pack'))\n * console.log('packfiles', packfiles)\n *\n * const { oids } = await git.indexPack({\n * fs,\n * dir: '/tutorial',\n * filepath: `.git/objects/pack/${packfiles[0]}`,\n * async onProgress (evt) {\n * console.log(`${evt.phase}: ${evt.loaded} / ${evt.total}`)\n * }\n * })\n * console.log(oids)\n *\n */\nexport async function indexPack({\n fs,\n onProgress,\n dir,\n gitdir = join(dir, '.git'),\n filepath,\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('dir', dir)\n assertParameter('gitdir', dir)\n assertParameter('filepath', filepath)\n\n return await _indexPack({\n fs: new FileSystem(fs),\n cache,\n onProgress,\n dir,\n gitdir,\n filepath,\n })\n } catch (err) {\n err.caller = 'git.indexPack'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _init } from '../commands/init.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Initialize a new repository\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {boolean} [args.bare = false] - Initialize a bare repository\n * @param {string} [args.defaultBranch = 'master'] - The name of the default branch (might be changed to a required argument in 2.0.0)\n * @returns {Promise<void>} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.init({ fs, dir: '/tutorial' })\n * console.log('done')\n *\n */\nexport async function init({\n fs,\n bare = false,\n dir,\n gitdir = bare ? dir : join(dir, '.git'),\n defaultBranch = 'master',\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n if (!bare) {\n assertParameter('dir', dir)\n }\n\n return await _init({\n fs: new FileSystem(fs),\n bare,\n dir,\n gitdir,\n defaultBranch,\n })\n } catch (err) {\n err.caller = 'git.init'\n throw err\n }\n}\n","// @ts-check\nimport { MaxDepthError } from '../errors/MaxDepthError.js'\nimport { MissingParameterError } from '../errors/MissingParameterError.js'\nimport { ObjectTypeError } from '../errors/ObjectTypeError.js'\nimport { GitShallowManager } from '../managers/GitShallowManager.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { _readObject } from '../storage/readObject.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} args.gitdir\n * @param {string} args.oid\n * @param {string} args.ancestor\n * @param {number} args.depth - Maximum depth to search before giving up. -1 means no maximum depth.\n *\n * @returns {Promise<boolean>}\n */\nexport async function _isDescendent({\n fs,\n cache,\n gitdir,\n oid,\n ancestor,\n depth,\n}) {\n const shallows = await GitShallowManager.read({ fs, gitdir })\n if (!oid) {\n throw new MissingParameterError('oid')\n }\n if (!ancestor) {\n throw new MissingParameterError('ancestor')\n }\n // If you don't like this behavior, add your own check.\n // Edge cases are hard to define a perfect solution.\n if (oid === ancestor) return false\n // We do not use recursion here, because that would lead to depth-first traversal,\n // and we want to maintain a breadth-first traversal to avoid hitting shallow clone depth cutoffs.\n const queue = [oid]\n const visited = new Set()\n let searchdepth = 0\n while (queue.length) {\n if (searchdepth++ === depth) {\n throw new MaxDepthError(depth)\n }\n const oid = queue.shift()\n const { type, object } = await _readObject({\n fs,\n cache,\n gitdir,\n oid,\n })\n if (type !== 'commit') {\n throw new ObjectTypeError(oid, type, 'commit')\n }\n const commit = GitCommit.from(object).parse()\n // Are any of the parents the sought-after ancestor?\n for (const parent of commit.parent) {\n if (parent === ancestor) return true\n }\n // If not, add them to heads (unless we know this is a shallow commit)\n if (!shallows.has(oid)) {\n for (const parent of commit.parent) {\n if (!visited.has(parent)) {\n queue.push(parent)\n visited.add(parent)\n }\n }\n }\n // Eventually, we'll travel entire tree to the roots where all the parents are empty arrays,\n // or hit the shallow depth and throw an error. Excluding the possibility of grafts, or\n // different branches cloned to different depths, you would hit this error at the same time\n // for all parents, so trying to continue is futile.\n }\n return false\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _isDescendent } from '../commands/isDescendent.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Check whether a git commit is descended from another\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.oid - The descendent commit\n * @param {string} args.ancestor - The (proposed) ancestor commit\n * @param {number} [args.depth = -1] - Maximum depth to search before giving up. -1 means no maximum depth.\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<boolean>} Resolves to true if `oid` is a descendent of `ancestor`\n *\n * @example\n * let oid = await git.resolveRef({ fs, dir: '/tutorial', ref: 'main' })\n * let ancestor = await git.resolveRef({ fs, dir: '/tutorial', ref: 'v0.20.0' })\n * console.log(oid, ancestor)\n * await git.isDescendent({ fs, dir: '/tutorial', oid, ancestor, depth: -1 })\n *\n */\nexport async function isDescendent({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n oid,\n ancestor,\n depth = -1,\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('oid', oid)\n assertParameter('ancestor', ancestor)\n\n return await _isDescendent({\n fs: new FileSystem(fs),\n cache,\n gitdir,\n oid,\n ancestor,\n depth,\n })\n } catch (err) {\n err.caller = 'git.isDescendent'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * List branches\n *\n * By default it lists local branches. If a 'remote' is specified, it lists the remote's branches. When listing remote branches, the HEAD branch is not filtered out, so it may be included in the list of results.\n *\n * Note that specifying a remote does not actually contact the server and update the list of branches.\n * If you want an up-to-date list, first do a `fetch` to that remote.\n * (Which branch you fetch doesn't matter - the list of branches available on the remote is updated during the fetch handshake.)\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.remote] - Instead of the branches in `refs/heads`, list the branches in `refs/remotes/${remote}`.\n *\n * @returns {Promise<Array<string>>} Resolves successfully with an array of branch names\n *\n * @example\n * let branches = await git.listBranches({ fs, dir: '/tutorial' })\n * console.log(branches)\n * let remoteBranches = await git.listBranches({ fs, dir: '/tutorial', remote: 'origin' })\n * console.log(remoteBranches)\n *\n */\nexport async function listBranches({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n remote,\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n\n return GitRefManager.listBranches({\n fs: new FileSystem(fs),\n gitdir,\n remote,\n })\n } catch (err) {\n err.caller = 'git.listBranches'\n throw err\n }\n}\n","// @ts-check\nimport { _readTree } from '../commands/readTree'\nimport { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { join } from '../utils/join'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {object} args.cache\n * @param {string} args.gitdir\n * @param {string} [args.ref]\n *\n * @returns {Promise<Array<string>>}\n */\nexport async function _listFiles({ fs, gitdir, ref, cache }) {\n if (ref) {\n const oid = await GitRefManager.resolve({ gitdir, fs, ref })\n const filenames = []\n await accumulateFilesFromOid({\n fs,\n cache,\n gitdir,\n oid,\n filenames,\n prefix: '',\n })\n return filenames\n } else {\n return GitIndexManager.acquire({ fs, gitdir, cache }, async function(\n index\n ) {\n return index.entries.map(x => x.path)\n })\n }\n}\n\nasync function accumulateFilesFromOid({\n fs,\n cache,\n gitdir,\n oid,\n filenames,\n prefix,\n}) {\n const { tree } = await _readTree({ fs, cache, gitdir, oid })\n // TODO: Use `walk` to do this. Should be faster.\n for (const entry of tree) {\n if (entry.type === 'tree') {\n await accumulateFilesFromOid({\n fs,\n cache,\n gitdir,\n oid: entry.oid,\n filenames,\n prefix: join(prefix, entry.path),\n })\n } else {\n filenames.push(join(prefix, entry.path))\n }\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _listFiles } from '../commands/listFiles'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join'\n\n/**\n * List all the files in the git index or a commit\n *\n * > Note: This function is efficient for listing the files in the staging area, but listing all the files in a commit requires recursively walking through the git object store.\n * > If you do not require a complete list of every file, better performance can be achieved by using [walk](./walk) and ignoring subdirectories you don't care about.\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ref] - Return a list of all the files in the commit at `ref` instead of the files currently in the git index (aka staging area)\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<Array<string>>} Resolves successfully with an array of filepaths\n *\n * @example\n * // All the files in the previous commit\n * let files = await git.listFiles({ fs, dir: '/tutorial', ref: 'HEAD' })\n * console.log(files)\n * // All the files in the current staging area\n * files = await git.listFiles({ fs, dir: '/tutorial' })\n * console.log(files)\n *\n */\nexport async function listFiles({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n ref,\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n\n return await _listFiles({\n fs: new FileSystem(fs),\n cache,\n gitdir,\n ref,\n })\n } catch (err) {\n err.caller = 'git.listFiles'\n throw err\n }\n}\n","// @ts-check\nimport { _readTree } from '../commands/readTree'\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\n\n/**\n * List all the object notes\n *\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} args.gitdir\n * @param {string} args.ref\n *\n * @returns {Promise<Array<{target: string, note: string}>>}\n */\n\nexport async function _listNotes({ fs, cache, gitdir, ref }) {\n // Get the current note commit\n let parent\n try {\n parent = await GitRefManager.resolve({ gitdir, fs, ref })\n } catch (err) {\n if (err instanceof NotFoundError) {\n return []\n }\n }\n\n // Create the current note tree\n const result = await _readTree({\n fs,\n cache,\n gitdir,\n oid: parent,\n })\n\n // Format the tree entries\n const notes = result.tree.map(entry => ({\n target: entry.path,\n note: entry.oid,\n }))\n return notes\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _listNotes } from '../commands/listNotes.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join'\n\n/**\n * List all the object notes\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ref] - The notes ref to look under\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<Array<{target: string, note: string}>>} Resolves successfully with an array of entries containing SHA-1 object ids of the note and the object the note targets\n */\n\nexport async function listNotes({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n ref = 'refs/notes/commits',\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('ref', ref)\n\n return await _listNotes({\n fs: new FileSystem(fs),\n cache,\n gitdir,\n ref,\n })\n } catch (err) {\n err.caller = 'git.listNotes'\n throw err\n }\n}\n","// @ts-check\nimport { GitConfigManager } from '../managers/GitConfigManager.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n *\n * @returns {Promise<Array<{remote: string, url: string}>>}\n */\nexport async function _listRemotes({ fs, gitdir }) {\n const config = await GitConfigManager.get({ fs, gitdir })\n const remoteNames = await config.getSubsections('remote')\n const remotes = Promise.all(\n remoteNames.map(async remote => {\n const url = await config.get(`remote.${remote}.url`)\n return { remote, url }\n })\n )\n return remotes\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _listRemotes } from '../commands/listRemotes.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * List remotes\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n *\n * @returns {Promise<Array<{remote: string, url: string}>>} Resolves successfully with an array of `{remote, url}` objects\n *\n * @example\n * let remotes = await git.listRemotes({ fs, dir: '/tutorial' })\n * console.log(remotes)\n *\n */\nexport async function listRemotes({ fs, dir, gitdir = join(dir, '.git') }) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n\n return await _listRemotes({\n fs: new FileSystem(fs),\n gitdir,\n })\n } catch (err) {\n err.caller = 'git.listRemotes'\n throw err\n }\n}\n","import { GitPktLine } from '../models/GitPktLine.js'\n\n/**\n * @typedef {Object} ServerRef - This object has the following schema:\n * @property {string} ref - The name of the ref\n * @property {string} oid - The SHA-1 object id the ref points to\n * @property {string} [target] - The target ref pointed to by a symbolic ref\n * @property {string} [peeled] - If the oid is the SHA-1 object id of an annotated tag, this is the SHA-1 object id that the annotated tag points to\n */\n\nexport async function parseListRefsResponse(stream) {\n const read = GitPktLine.streamReader(stream)\n\n // TODO: when we re-write everything to minimize memory usage,\n // we could make this a generator\n const refs = []\n\n let line\n while (true) {\n line = await read()\n if (line === true) break\n if (line === null) continue\n line = line.toString('utf8').replace(/\\n$/, '')\n const [oid, ref, ...attrs] = line.split(' ')\n const r = { ref, oid }\n for (const attr of attrs) {\n const [name, value] = attr.split(':')\n if (name === 'symref-target') {\n r.target = value\n } else if (name === 'peeled') {\n r.peeled = value\n }\n }\n refs.push(r)\n }\n\n return refs\n}\n","import { GitPktLine } from '../models/GitPktLine.js'\nimport { pkg } from '../utils/pkg.js'\n\n/**\n * @param {object} args\n * @param {string} [args.prefix] - Only list refs that start with this prefix\n * @param {boolean} [args.symrefs = false] - Include symbolic ref targets\n * @param {boolean} [args.peelTags = false] - Include peeled tags values\n * @returns {Uint8Array[]}\n */\nexport async function writeListRefsRequest({ prefix, symrefs, peelTags }) {\n const packstream = []\n // command\n packstream.push(GitPktLine.encode('command=ls-refs\\n'))\n // capability-list\n packstream.push(GitPktLine.encode(`agent=${pkg.agent}\\n`))\n // [command-args]\n if (peelTags || symrefs || prefix) {\n packstream.push(GitPktLine.delim())\n }\n if (peelTags) packstream.push(GitPktLine.encode('peel'))\n if (symrefs) packstream.push(GitPktLine.encode('symrefs'))\n if (prefix) packstream.push(GitPktLine.encode(`ref-prefix ${prefix}`))\n packstream.push(GitPktLine.flush())\n return packstream\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitRemoteHTTP } from '../managers/GitRemoteHTTP.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { formatInfoRefs } from '../utils/formatInfoRefs.js'\nimport { parseListRefsResponse } from '../wire/parseListRefsResponse.js'\nimport { writeListRefsRequest } from '../wire/writeListRefsRequest.js'\n\n/**\n * Fetch a list of refs (branches, tags, etc) from a server.\n *\n * This is a rare command that doesn't require an `fs`, `dir`, or even `gitdir` argument.\n * It just requires an `http` argument.\n *\n * ### About `protocolVersion`\n *\n * There's a rather fun trade-off between Git Protocol Version 1 and Git Protocol Version 2.\n * Version 2 actually requires 2 HTTP requests instead of 1, making it similar to fetch or push in that regard.\n * However, version 2 supports server-side filtering by prefix, whereas that filtering is done client-side in version 1.\n * Which protocol is most efficient therefore depends on the number of refs on the remote, the latency of the server, and speed of the network connection.\n * For an small repos (or fast Internet connections), the requirement to make two trips to the server makes protocol 2 slower.\n * But for large repos (or slow Internet connections), the decreased payload size of the second request makes up for the additional request.\n *\n * Hard numbers vary by situation, but here's some numbers from my machine:\n *\n * Using isomorphic-git in a browser, with a CORS proxy, listing only the branches (refs/heads) of https://github.com/isomorphic-git/isomorphic-git\n * - Protocol Version 1 took ~300ms and transfered 84 KB.\n * - Protocol Version 2 took ~500ms and transfered 4.1 KB.\n *\n * Using isomorphic-git in a browser, with a CORS proxy, listing only the branches (refs/heads) of https://gitlab.com/gitlab-org/gitlab\n * - Protocol Version 1 took ~4900ms and transfered 9.41 MB.\n * - Protocol Version 2 took ~1280ms and transfered 433 KB.\n *\n * Finally, there is a fun quirk regarding the `symrefs` parameter.\n * Protocol Version 1 will generally only return the `HEAD` symref and not others.\n * Historically, this meant that servers don't use symbolic refs except for `HEAD`, which is used to point at the \"default branch\".\n * However Protocol Version 2 can return *all* the symbolic refs on the server.\n * So if you are running your own git server, you could take advantage of that I guess.\n *\n * #### TL;DR\n * If you are _not_ taking advantage of `prefix` I would recommend `protocolVersion: 1`.\n * Otherwise, I recommend to use the default which is `protocolVersion: 2`.\n *\n * @param {object} args\n * @param {HttpClient} args.http - an HTTP client\n * @param {AuthCallback} [args.onAuth] - optional auth fill callback\n * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback\n * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback\n * @param {string} args.url - The URL of the remote repository. Will be gotten from gitconfig if absent.\n * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config.\n * @param {boolean} [args.forPush = false] - By default, the command queries the 'fetch' capabilities. If true, it will ask for the 'push' capabilities.\n * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config\n * @param {1 | 2} [args.protocolVersion = 2] - Which version of the Git Protocol to use.\n * @param {string} [args.prefix] - Only list refs that start with this prefix\n * @param {boolean} [args.symrefs = false] - Include symbolic ref targets\n * @param {boolean} [args.peelTags = false] - Include annotated tag peeled targets\n *\n * @returns {Promise<ServerRef[]>} Resolves successfully with an array of ServerRef objects\n * @see ServerRef\n *\n * @example\n * // List all the branches on a repo\n * let refs = await git.listServerRefs({\n * http,\n * corsProxy: \"https://cors.isomorphic-git.org\",\n * url: \"https://github.com/isomorphic-git/isomorphic-git.git\",\n * prefix: \"refs/heads/\",\n * });\n * console.log(refs);\n *\n * @example\n * // Get the default branch on a repo\n * let refs = await git.listServerRefs({\n * http,\n * corsProxy: \"https://cors.isomorphic-git.org\",\n * url: \"https://github.com/isomorphic-git/isomorphic-git.git\",\n * prefix: \"HEAD\",\n * symrefs: true,\n * });\n * console.log(refs);\n *\n * @example\n * // List all the tags on a repo\n * let refs = await git.listServerRefs({\n * http,\n * corsProxy: \"https://cors.isomorphic-git.org\",\n * url: \"https://github.com/isomorphic-git/isomorphic-git.git\",\n * prefix: \"refs/tags/\",\n * peelTags: true,\n * });\n * console.log(refs);\n *\n * @example\n * // List all the pull requests on a repo\n * let refs = await git.listServerRefs({\n * http,\n * corsProxy: \"https://cors.isomorphic-git.org\",\n * url: \"https://github.com/isomorphic-git/isomorphic-git.git\",\n * prefix: \"refs/pull/\",\n * });\n * console.log(refs);\n *\n */\nexport async function listServerRefs({\n http,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n corsProxy,\n url,\n headers = {},\n forPush = false,\n protocolVersion = 2,\n prefix,\n symrefs,\n peelTags,\n}) {\n try {\n assertParameter('http', http)\n assertParameter('url', url)\n\n const remote = await GitRemoteHTTP.discover({\n http,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n corsProxy,\n service: forPush ? 'git-receive-pack' : 'git-upload-pack',\n url,\n headers,\n protocolVersion,\n })\n\n if (remote.protocolVersion === 1) {\n return formatInfoRefs(remote, prefix, symrefs, peelTags)\n }\n\n // Protocol Version 2\n const body = await writeListRefsRequest({ prefix, symrefs, peelTags })\n\n const res = await GitRemoteHTTP.connect({\n http,\n auth: remote.auth,\n headers,\n corsProxy,\n service: forPush ? 'git-receive-pack' : 'git-upload-pack',\n url,\n body,\n })\n\n return parseListRefsResponse(res.body)\n } catch (err) {\n err.caller = 'git.listServerRefs'\n throw err\n }\n}\n","// @ts-check\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * List tags\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n *\n * @returns {Promise<Array<string>>} Resolves successfully with an array of tag names\n *\n * @example\n * let tags = await git.listTags({ fs, dir: '/tutorial' })\n * console.log(tags)\n *\n */\nexport async function listTags({ fs, dir, gitdir = join(dir, '.git') }) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n return GitRefManager.listTags({ fs: new FileSystem(fs), gitdir })\n } catch (err) {\n err.caller = 'git.listTags'\n throw err\n }\n}\n","import { ObjectTypeError } from '../errors/ObjectTypeError.js'\nimport { GitAnnotatedTag } from '../models/GitAnnotatedTag.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { _readObject as readObject } from '../storage/readObject.js'\n\nexport async function resolveCommit({ fs, cache, gitdir, oid }) {\n const { type, object } = await readObject({ fs, cache, gitdir, oid })\n // Resolve annotated tag objects to whatever\n if (type === 'tag') {\n oid = GitAnnotatedTag.from(object).parse().object\n return resolveCommit({ fs, cache, gitdir, oid })\n }\n if (type !== 'commit') {\n throw new ObjectTypeError(oid, type, 'commit')\n }\n return { commit: GitCommit.from(object), oid }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { resolveCommit } from '../utils/resolveCommit.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} args.gitdir\n * @param {string} args.oid\n *\n * @returns {Promise<ReadCommitResult>} Resolves successfully with a git commit object\n * @see ReadCommitResult\n * @see CommitObject\n *\n */\nexport async function _readCommit({ fs, cache, gitdir, oid }) {\n const { commit, oid: commitOid } = await resolveCommit({\n fs,\n cache,\n gitdir,\n oid,\n })\n const result = {\n oid: commitOid,\n commit: commit.parse(),\n payload: commit.withoutSignature(),\n }\n // @ts-ignore\n return result\n}\n","export function compareAge(a, b) {\n return a.committer.timestamp - b.committer.timestamp\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _readCommit } from '../commands/readCommit.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { GitShallowManager } from '../managers/GitShallowManager.js'\nimport { compareAge } from '../utils/compareAge.js'\n\n/**\n * Get commit descriptions from the git history\n *\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} args.gitdir\n * @param {string} args.ref\n * @param {number|void} args.depth\n * @param {Date|void} args.since\n *\n * @returns {Promise<Array<ReadCommitResult>>}\n */\nexport async function _log({ fs, cache, gitdir, ref, depth, since }) {\n const sinceTimestamp =\n typeof since === 'undefined'\n ? undefined\n : Math.floor(since.valueOf() / 1000)\n // TODO: In the future, we may want to have an API where we return a\n // async iterator that emits commits.\n const commits = []\n const shallowCommits = await GitShallowManager.read({ fs, gitdir })\n const oid = await GitRefManager.resolve({ fs, gitdir, ref })\n const tips = [await _readCommit({ fs, cache, gitdir, oid })]\n\n while (tips.length > 0) {\n const commit = tips.pop()\n\n // Stop the log if we've hit the age limit\n if (\n sinceTimestamp !== undefined &&\n commit.commit.committer.timestamp <= sinceTimestamp\n ) {\n break\n }\n\n commits.push(commit)\n\n // Stop the loop if we have enough commits now.\n if (depth !== undefined && commits.length === depth) break\n\n // If this is not a shallow commit...\n if (!shallowCommits.has(commit.oid)) {\n // Add the parents of this commit to the queue\n // Note: for the case of a commit with no parents, it will concat an empty array, having no net effect.\n for (const oid of commit.commit.parent) {\n const commit = await _readCommit({ fs, cache, gitdir, oid })\n if (!tips.map(commit => commit.oid).includes(commit.oid)) {\n tips.push(commit)\n }\n }\n }\n\n // Process tips in order by age\n tips.sort((a, b) => compareAge(a.commit, b.commit))\n }\n return commits\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _log } from '../commands/log.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Get commit descriptions from the git history\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ref = 'HEAD'] - The commit to begin walking backwards through the history from\n * @param {number} [args.depth] - Limit the number of commits returned. No limit by default.\n * @param {Date} [args.since] - Return history newer than the given date. Can be combined with `depth` to get whichever is shorter.\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<Array<ReadCommitResult>>} Resolves to an array of ReadCommitResult objects\n * @see ReadCommitResult\n * @see CommitObject\n *\n * @example\n * let commits = await git.log({\n * fs,\n * dir: '/tutorial',\n * depth: 5,\n * ref: 'main'\n * })\n * console.log(commits)\n *\n */\nexport async function log({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n ref = 'HEAD',\n depth,\n since, // Date\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('ref', ref)\n\n return await _log({\n fs: new FileSystem(fs),\n cache,\n gitdir,\n ref,\n depth,\n since,\n })\n } catch (err) {\n err.caller = 'git.log'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _merge } from '../commands/merge.js'\nimport { MissingNameError } from '../errors/MissingNameError.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\nimport { normalizeAuthorObject } from '../utils/normalizeAuthorObject.js'\nimport { normalizeCommitterObject } from '../utils/normalizeCommitterObject.js'\n\n/**\n *\n * @typedef {Object} MergeResult - Returns an object with a schema like this:\n * @property {string} [oid] - The SHA-1 object id that is now at the head of the branch. Absent only if `dryRun` was specified and `mergeCommit` is true.\n * @property {boolean} [alreadyMerged] - True if the branch was already merged so no changes were made\n * @property {boolean} [fastForward] - True if it was a fast-forward merge\n * @property {boolean} [mergeCommit] - True if merge resulted in a merge commit\n * @property {string} [tree] - The SHA-1 object id of the tree resulting from a merge commit\n *\n */\n\n/**\n * Merge two branches\n *\n * ## Limitations\n *\n * Currently it does not support incomplete merges. That is, if there are merge conflicts it cannot solve\n * with the built in diff3 algorithm it will not modify the working dir, and will throw a [`MergeNotSupportedError`](./errors.md#mergenotsupportedError) error.\n *\n * Currently it will fail if multiple candidate merge bases are found. (It doesn't yet implement the recursive merge strategy.)\n *\n * Currently it does not support selecting alternative merge strategies.\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {SignCallback} [args.onSign] - a PGP signing implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ours] - The branch receiving the merge. If undefined, defaults to the current branch.\n * @param {string} args.theirs - The branch to be merged\n * @param {boolean} [args.fastForwardOnly = false] - If true, then non-fast-forward merges will throw an Error instead of performing a merge.\n * @param {boolean} [args.dryRun = false] - If true, simulates a merge so you can test whether it would succeed.\n * @param {boolean} [args.noUpdateBranch = false] - If true, does not update the branch pointer after creating the commit.\n * @param {string} [args.message] - Overrides the default auto-generated merge commit message\n * @param {Object} [args.author] - passed to [commit](commit.md) when creating a merge commit\n * @param {string} [args.author.name] - Default is `user.name` config.\n * @param {string} [args.author.email] - Default is `user.email` config.\n * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00).\n * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`.\n * @param {Object} [args.committer] - passed to [commit](commit.md) when creating a merge commit\n * @param {string} [args.committer.name] - Default is `user.name` config.\n * @param {string} [args.committer.email] - Default is `user.email` config.\n * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00).\n * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`.\n * @param {string} [args.signingKey] - passed to [commit](commit.md) when creating a merge commit\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<MergeResult>} Resolves to a description of the merge operation\n * @see MergeResult\n *\n * @example\n * let m = await git.merge({\n * fs,\n * dir: '/tutorial',\n * ours: 'main',\n * theirs: 'remotes/origin/main'\n * })\n * console.log(m)\n *\n */\nexport async function merge({\n fs: _fs,\n onSign,\n dir,\n gitdir = join(dir, '.git'),\n ours,\n theirs,\n fastForwardOnly = false,\n dryRun = false,\n noUpdateBranch = false,\n message,\n author: _author,\n committer: _committer,\n signingKey,\n cache = {},\n}) {\n try {\n assertParameter('fs', _fs)\n if (signingKey) {\n assertParameter('onSign', onSign)\n }\n const fs = new FileSystem(_fs)\n\n const author = await normalizeAuthorObject({ fs, gitdir, author: _author })\n if (!author && !fastForwardOnly) throw new MissingNameError('author')\n\n const committer = await normalizeCommitterObject({\n fs,\n gitdir,\n author,\n committer: _committer,\n })\n if (!committer && !fastForwardOnly) {\n throw new MissingNameError('committer')\n }\n\n return await _merge({\n fs,\n cache,\n gitdir,\n ours,\n theirs,\n fastForwardOnly,\n dryRun,\n noUpdateBranch,\n message,\n author,\n committer,\n signingKey,\n })\n } catch (err) {\n err.caller = 'git.merge'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _packObjects } from '../commands/packObjects.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n *\n * @typedef {Object} PackObjectsResult The packObjects command returns an object with two properties:\n * @property {string} filename - The suggested filename for the packfile if you want to save it to disk somewhere. It includes the packfile SHA.\n * @property {Uint8Array} [packfile] - The packfile contents. Not present if `write` parameter was true, in which case the packfile was written straight to disk.\n */\n\n/**\n * Create a packfile from an array of SHA-1 object ids\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string[]} args.oids - An array of SHA-1 object ids to be included in the packfile\n * @param {boolean} [args.write = false] - Whether to save the packfile to disk or not\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<PackObjectsResult>} Resolves successfully when the packfile is ready with the filename and buffer\n * @see PackObjectsResult\n *\n * @example\n * // Create a packfile containing only an empty tree\n * let { packfile } = await git.packObjects({\n * fs,\n * dir: '/tutorial',\n * oids: ['4b825dc642cb6eb9a060e54bf8d69288fbee4904']\n * })\n * console.log(packfile)\n *\n */\nexport async function packObjects({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n oids,\n write = false,\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('oids', oids)\n\n return await _packObjects({\n fs: new FileSystem(fs),\n cache,\n gitdir,\n oids,\n write,\n })\n } catch (err) {\n err.caller = 'git.packObjects'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _pull } from '../commands/pull.js'\nimport { MissingNameError } from '../errors/MissingNameError.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\nimport { normalizeAuthorObject } from '../utils/normalizeAuthorObject.js'\nimport { normalizeCommitterObject } from '../utils/normalizeCommitterObject.js'\n\n/**\n * Fetch and merge commits from a remote repository\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {HttpClient} args.http - an HTTP client\n * @param {ProgressCallback} [args.onProgress] - optional progress event callback\n * @param {MessageCallback} [args.onMessage] - optional message event callback\n * @param {AuthCallback} [args.onAuth] - optional auth fill callback\n * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback\n * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback\n * @param {string} args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ref] - Which branch to merge into. By default this is the currently checked out branch.\n * @param {string} [args.url] - (Added in 1.1.0) The URL of the remote repository. The default is the value set in the git config for that remote.\n * @param {string} [args.remote] - (Added in 1.1.0) If URL is not specified, determines which remote to use.\n * @param {string} [args.remoteRef] - (Added in 1.1.0) The name of the branch on the remote to fetch. By default this is the configured remote tracking branch.\n * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config.\n * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch.\n * @param {boolean} [args.fastForwardOnly = false] - Only perform simple fast-forward merges. (Don't create merge commits.)\n * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config\n * @param {Object} [args.author] - The details about the author.\n * @param {string} [args.author.name] - Default is `user.name` config.\n * @param {string} [args.author.email] - Default is `user.email` config.\n * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00).\n * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`.\n * @param {Object} [args.committer = author] - The details about the commit committer, in the same format as the author parameter. If not specified, the author details are used.\n * @param {string} [args.committer.name] - Default is `user.name` config.\n * @param {string} [args.committer.email] - Default is `user.email` config.\n * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00).\n * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`.\n * @param {string} [args.signingKey] - passed to [commit](commit.md) when creating a merge commit\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<void>} Resolves successfully when pull operation completes\n *\n * @example\n * await git.pull({\n * fs,\n * http,\n * dir: '/tutorial',\n * ref: 'main',\n * singleBranch: true\n * })\n * console.log('done')\n *\n */\nexport async function pull({\n fs: _fs,\n http,\n onProgress,\n onMessage,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n dir,\n gitdir = join(dir, '.git'),\n ref,\n url,\n remote,\n remoteRef,\n fastForwardOnly = false,\n corsProxy,\n singleBranch,\n headers = {},\n author: _author,\n committer: _committer,\n signingKey,\n cache = {},\n}) {\n try {\n assertParameter('fs', _fs)\n assertParameter('gitdir', gitdir)\n\n const fs = new FileSystem(_fs)\n\n const author = await normalizeAuthorObject({ fs, gitdir, author: _author })\n if (!author) throw new MissingNameError('author')\n\n const committer = await normalizeCommitterObject({\n fs,\n gitdir,\n author,\n committer: _committer,\n })\n if (!committer) throw new MissingNameError('committer')\n\n return await _pull({\n fs,\n cache,\n http,\n onProgress,\n onMessage,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n dir,\n gitdir,\n ref,\n url,\n remote,\n remoteRef,\n fastForwardOnly,\n corsProxy,\n singleBranch,\n headers,\n author,\n committer,\n signingKey,\n })\n } catch (err) {\n err.caller = 'git.pull'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _currentBranch } from '../commands/currentBranch.js'\nimport { _findMergeBase } from '../commands/findMergeBase.js'\nimport { _isDescendent } from '../commands/isDescendent.js'\nimport { listCommitsAndTags } from '../commands/listCommitsAndTags.js'\nimport { listObjects } from '../commands/listObjects.js'\nimport { _pack } from '../commands/pack.js'\nimport { GitPushError } from '../errors/GitPushError.js'\nimport { MissingParameterError } from '../errors/MissingParameterError.js'\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { PushRejectedError } from '../errors/PushRejectedError.js'\nimport { GitConfigManager } from '../managers/GitConfigManager.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { GitRemoteManager } from '../managers/GitRemoteManager.js'\nimport { GitSideBand } from '../models/GitSideBand.js'\nimport { filterCapabilities } from '../utils/filterCapabilities.js'\nimport { forAwait } from '../utils/forAwait.js'\nimport { pkg } from '../utils/pkg.js'\nimport { splitLines } from '../utils/splitLines.js'\nimport { parseReceivePackResponse } from '../wire/parseReceivePackResponse.js'\nimport { writeReceivePackRequest } from '../wire/writeReceivePackRequest.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {HttpClient} args.http\n * @param {ProgressCallback} [args.onProgress]\n * @param {MessageCallback} [args.onMessage]\n * @param {AuthCallback} [args.onAuth]\n * @param {AuthFailureCallback} [args.onAuthFailure]\n * @param {AuthSuccessCallback} [args.onAuthSuccess]\n * @param {string} args.gitdir\n * @param {string} [args.ref]\n * @param {string} [args.remoteRef]\n * @param {string} [args.remote]\n * @param {boolean} [args.force = false]\n * @param {boolean} [args.delete = false]\n * @param {string} [args.url]\n * @param {string} [args.corsProxy]\n * @param {Object<string, string>} [args.headers]\n *\n * @returns {Promise<PushResult>}\n */\nexport async function _push({\n fs,\n cache,\n http,\n onProgress,\n onMessage,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n gitdir,\n ref: _ref,\n remoteRef: _remoteRef,\n remote,\n url: _url,\n force = false,\n delete: _delete = false,\n corsProxy,\n headers = {},\n}) {\n const ref = _ref || (await _currentBranch({ fs, gitdir }))\n if (typeof ref === 'undefined') {\n throw new MissingParameterError('ref')\n }\n const config = await GitConfigManager.get({ fs, gitdir })\n // Figure out what remote to use.\n remote =\n remote ||\n (await config.get(`branch.${ref}.pushRemote`)) ||\n (await config.get('remote.pushDefault')) ||\n (await config.get(`branch.${ref}.remote`)) ||\n 'origin'\n // Lookup the URL for the given remote.\n const url =\n _url ||\n (await config.get(`remote.${remote}.pushurl`)) ||\n (await config.get(`remote.${remote}.url`))\n if (typeof url === 'undefined') {\n throw new MissingParameterError('remote OR url')\n }\n // Figure out what remote ref to use.\n const remoteRef = _remoteRef || (await config.get(`branch.${ref}.merge`))\n if (typeof url === 'undefined') {\n throw new MissingParameterError('remoteRef')\n }\n\n if (corsProxy === undefined) {\n corsProxy = await config.get('http.corsProxy')\n }\n\n const fullRef = await GitRefManager.expand({ fs, gitdir, ref })\n const oid = _delete\n ? '0000000000000000000000000000000000000000'\n : await GitRefManager.resolve({ fs, gitdir, ref: fullRef })\n\n /** @type typeof import(\"../managers/GitRemoteHTTP\").GitRemoteHTTP */\n const GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url })\n const httpRemote = await GitRemoteHTTP.discover({\n http,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n corsProxy,\n service: 'git-receive-pack',\n url,\n headers,\n protocolVersion: 1,\n })\n const auth = httpRemote.auth // hack to get new credentials from CredentialManager API\n let fullRemoteRef\n if (!remoteRef) {\n fullRemoteRef = fullRef\n } else {\n try {\n fullRemoteRef = await GitRefManager.expandAgainstMap({\n ref: remoteRef,\n map: httpRemote.refs,\n })\n } catch (err) {\n if (err instanceof NotFoundError) {\n // The remote reference doesn't exist yet.\n // If it is fully specified, use that value. Otherwise, treat it as a branch.\n fullRemoteRef = remoteRef.startsWith('refs/')\n ? remoteRef\n : `refs/heads/${remoteRef}`\n } else {\n throw err\n }\n }\n }\n const oldoid =\n httpRemote.refs.get(fullRemoteRef) ||\n '0000000000000000000000000000000000000000'\n\n // Remotes can always accept thin-packs UNLESS they specify the 'no-thin' capability\n const thinPack = !httpRemote.capabilities.has('no-thin')\n\n let objects = new Set()\n if (!_delete) {\n const finish = [...httpRemote.refs.values()]\n let skipObjects = new Set()\n\n // If remote branch is present, look for a common merge base.\n if (oldoid !== '0000000000000000000000000000000000000000') {\n // trick to speed up common force push scenarios\n const mergebase = await _findMergeBase({\n fs,\n cache,\n gitdir,\n oids: [oid, oldoid],\n })\n for (const oid of mergebase) finish.push(oid)\n if (thinPack) {\n skipObjects = await listObjects({ fs, cache, gitdir, oids: mergebase })\n }\n }\n\n // If remote does not have the commit, figure out the objects to send\n if (!finish.includes(oid)) {\n const commits = await listCommitsAndTags({\n fs,\n cache,\n gitdir,\n start: [oid],\n finish,\n })\n objects = await listObjects({ fs, cache, gitdir, oids: commits })\n }\n\n if (thinPack) {\n // If there's a default branch for the remote lets skip those objects too.\n // Since this is an optional optimization, we just catch and continue if there is\n // an error (because we can't find a default branch, or can't find a commit, etc)\n try {\n // Sadly, the discovery phase with 'forPush' doesn't return symrefs, so we have to\n // rely on existing ones.\n const ref = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: `refs/remotes/${remote}/HEAD`,\n depth: 2,\n })\n const { oid } = await GitRefManager.resolveAgainstMap({\n ref: ref.replace(`refs/remotes/${remote}/`, ''),\n fullref: ref,\n map: httpRemote.refs,\n })\n const oids = [oid]\n for (const oid of await listObjects({ fs, cache, gitdir, oids })) {\n skipObjects.add(oid)\n }\n } catch (e) {}\n\n // Remove objects that we know the remote already has\n for (const oid of skipObjects) {\n objects.delete(oid)\n }\n }\n\n if (!force) {\n // Is it a tag that already exists?\n if (\n fullRef.startsWith('refs/tags') &&\n oldoid !== '0000000000000000000000000000000000000000'\n ) {\n throw new PushRejectedError('tag-exists')\n }\n // Is it a non-fast-forward commit?\n if (\n oid !== '0000000000000000000000000000000000000000' &&\n oldoid !== '0000000000000000000000000000000000000000' &&\n !(await _isDescendent({\n fs,\n cache,\n gitdir,\n oid,\n ancestor: oldoid,\n depth: -1,\n }))\n ) {\n throw new PushRejectedError('not-fast-forward')\n }\n }\n }\n // We can only safely use capabilities that the server also understands.\n // For instance, AWS CodeCommit aborts a push if you include the `agent`!!!\n const capabilities = filterCapabilities(\n [...httpRemote.capabilities],\n ['report-status', 'side-band-64k', `agent=${pkg.agent}`]\n )\n const packstream1 = await writeReceivePackRequest({\n capabilities,\n triplets: [{ oldoid, oid, fullRef: fullRemoteRef }],\n })\n const packstream2 = _delete\n ? []\n : await _pack({\n fs,\n cache,\n gitdir,\n oids: [...objects],\n })\n const res = await GitRemoteHTTP.connect({\n http,\n onProgress,\n corsProxy,\n service: 'git-receive-pack',\n url,\n auth,\n headers,\n body: [...packstream1, ...packstream2],\n })\n const { packfile, progress } = await GitSideBand.demux(res.body)\n if (onMessage) {\n const lines = splitLines(progress)\n forAwait(lines, async line => {\n await onMessage(line)\n })\n }\n // Parse the response!\n const result = await parseReceivePackResponse(packfile)\n if (res.headers) {\n result.headers = res.headers\n }\n\n // Update the local copy of the remote ref\n if (remote && result.ok && result.refs[fullRemoteRef].ok) {\n // TODO: I think this should actually be using a refspec transform rather than assuming 'refs/remotes/{remote}'\n const ref = `refs/remotes/${remote}/${fullRemoteRef.replace(\n 'refs/heads',\n ''\n )}`\n if (_delete) {\n await GitRefManager.deleteRef({ fs, gitdir, ref })\n } else {\n await GitRefManager.writeRef({ fs, gitdir, ref, value: oid })\n }\n }\n if (result.ok && Object.values(result.refs).every(result => result.ok)) {\n return result\n } else {\n const prettyDetails = Object.entries(result.refs)\n .filter(([k, v]) => !v.ok)\n .map(([k, v]) => `\\n - ${k}: ${v.error}`)\n .join('')\n throw new GitPushError(prettyDetails, result)\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _push } from '../commands/push.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Push a branch or tag\n *\n * The push command returns an object that describes the result of the attempted push operation.\n * *Notes:* If there were no errors, then there will be no `errors` property. There can be a mix of `ok` messages and `errors` messages.\n *\n * | param | type [= default] | description |\n * | ------ | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | ok | Array\\<string\\> | The first item is \"unpack\" if the overall operation was successful. The remaining items are the names of refs that were updated successfully. |\n * | errors | Array\\<string\\> | If the overall operation threw and error, the first item will be \"unpack {Overall error message}\". The remaining items are individual refs that failed to be updated in the format \"{ref name} {error message}\". |\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {HttpClient} args.http - an HTTP client\n * @param {ProgressCallback} [args.onProgress] - optional progress event callback\n * @param {MessageCallback} [args.onMessage] - optional message event callback\n * @param {AuthCallback} [args.onAuth] - optional auth fill callback\n * @param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback\n * @param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ref] - Which branch to push. By default this is the currently checked out branch.\n * @param {string} [args.url] - The URL of the remote repository. The default is the value set in the git config for that remote.\n * @param {string} [args.remote] - If URL is not specified, determines which remote to use.\n * @param {string} [args.remoteRef] - The name of the receiving branch on the remote. By default this is the configured remote tracking branch.\n * @param {boolean} [args.force = false] - If true, behaves the same as `git push --force`\n * @param {boolean} [args.delete = false] - If true, delete the remote ref\n * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config.\n * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<PushResult>} Resolves successfully when push completes with a detailed description of the operation from the server.\n * @see PushResult\n * @see RefUpdateStatus\n *\n * @example\n * let pushResult = await git.push({\n * fs,\n * http,\n * dir: '/tutorial',\n * remote: 'origin',\n * ref: 'main',\n * onAuth: () => ({ username: process.env.GITHUB_TOKEN }),\n * })\n * console.log(pushResult)\n *\n */\nexport async function push({\n fs,\n http,\n onProgress,\n onMessage,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n dir,\n gitdir = join(dir, '.git'),\n ref,\n remoteRef,\n remote = 'origin',\n url,\n force = false,\n delete: _delete = false,\n corsProxy,\n headers = {},\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('http', http)\n assertParameter('gitdir', gitdir)\n\n return await _push({\n fs: new FileSystem(fs),\n cache,\n http,\n onProgress,\n onMessage,\n onAuth,\n onAuthSuccess,\n onAuthFailure,\n gitdir,\n ref,\n remoteRef,\n remote,\n url,\n force,\n delete: _delete,\n corsProxy,\n headers,\n })\n } catch (err) {\n err.caller = 'git.push'\n throw err\n }\n}\n","import { ObjectTypeError } from '../errors/ObjectTypeError.js'\nimport { GitAnnotatedTag } from '../models/GitAnnotatedTag.js'\nimport { _readObject as readObject } from '../storage/readObject.js'\n\nexport async function resolveBlob({ fs, cache, gitdir, oid }) {\n const { type, object } = await readObject({ fs, cache, gitdir, oid })\n // Resolve annotated tag objects to whatever\n if (type === 'tag') {\n oid = GitAnnotatedTag.from(object).parse().object\n return resolveBlob({ fs, cache, gitdir, oid })\n }\n if (type !== 'blob') {\n throw new ObjectTypeError(oid, type, 'blob')\n }\n return { oid, blob: new Uint8Array(object) }\n}\n","// @ts-check\nimport { resolveBlob } from '../utils/resolveBlob.js'\nimport { resolveFilepath } from '../utils/resolveFilepath.js'\n\n/**\n *\n * @typedef {Object} ReadBlobResult - The object returned has the following schema:\n * @property {string} oid\n * @property {Uint8Array} blob\n *\n */\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} args.gitdir\n * @param {string} args.oid\n * @param {string} [args.filepath]\n *\n * @returns {Promise<ReadBlobResult>} Resolves successfully with a blob object description\n * @see ReadBlobResult\n */\nexport async function _readBlob({\n fs,\n cache,\n gitdir,\n oid,\n filepath = undefined,\n}) {\n if (filepath !== undefined) {\n oid = await resolveFilepath({ fs, cache, gitdir, oid, filepath })\n }\n const blob = await resolveBlob({\n fs,\n cache,\n gitdir,\n oid,\n })\n return blob\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _readBlob } from '../commands/readBlob.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n *\n * @typedef {Object} ReadBlobResult - The object returned has the following schema:\n * @property {string} oid\n * @property {Uint8Array} blob\n *\n */\n\n/**\n * Read a blob object directly\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.oid - The SHA-1 object id to get. Annotated tags, commits, and trees are peeled.\n * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the blob object at that filepath.\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<ReadBlobResult>} Resolves successfully with a blob object description\n * @see ReadBlobResult\n *\n * @example\n * // Get the contents of 'README.md' in the main branch.\n * let commitOid = await git.resolveRef({ fs, dir: '/tutorial', ref: 'main' })\n * console.log(commitOid)\n * let { blob } = await git.readBlob({\n * fs,\n * dir: '/tutorial',\n * oid: commitOid,\n * filepath: 'README.md'\n * })\n * console.log(Buffer.from(blob).toString('utf8'))\n *\n */\nexport async function readBlob({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n oid,\n filepath,\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('oid', oid)\n\n return await _readBlob({\n fs: new FileSystem(fs),\n cache,\n gitdir,\n oid,\n filepath,\n })\n } catch (err) {\n err.caller = 'git.readBlob'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _readCommit } from '../commands/readCommit.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Read a commit object directly\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.oid - The SHA-1 object id to get. Annotated tags are peeled.\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<ReadCommitResult>} Resolves successfully with a git commit object\n * @see ReadCommitResult\n * @see CommitObject\n *\n * @example\n * // Read a commit object\n * let sha = await git.resolveRef({ fs, dir: '/tutorial', ref: 'main' })\n * console.log(sha)\n * let commit = await git.readCommit({ fs, dir: '/tutorial', oid: sha })\n * console.log(commit)\n *\n */\nexport async function readCommit({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n oid,\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('oid', oid)\n\n return await _readCommit({\n fs: new FileSystem(fs),\n cache,\n gitdir,\n oid,\n })\n } catch (err) {\n err.caller = 'git.readCommit'\n throw err\n }\n}\n","// @ts-check\nimport { GitRefManager } from '../managers/GitRefManager.js'\n\nimport { _readBlob } from './readBlob'\n\n/**\n * Read the contents of a note\n *\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} args.gitdir\n * @param {string} [args.ref] - The notes ref to look under\n * @param {string} args.oid\n *\n * @returns {Promise<Uint8Array>} Resolves successfully with note contents as a Buffer.\n */\n\nexport async function _readNote({\n fs,\n cache,\n gitdir,\n ref = 'refs/notes/commits',\n oid,\n}) {\n const parent = await GitRefManager.resolve({ gitdir, fs, ref })\n const { blob } = await _readBlob({\n fs,\n cache,\n gitdir,\n oid: parent,\n filepath: oid,\n })\n\n return blob\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _readNote } from '../commands/readNote.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Read the contents of a note\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ref] - The notes ref to look under\n * @param {string} args.oid - The SHA-1 object id of the object to get the note for.\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<Uint8Array>} Resolves successfully with note contents as a Buffer.\n */\n\nexport async function readNote({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n ref = 'refs/notes/commits',\n oid,\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('ref', ref)\n assertParameter('oid', oid)\n\n return await _readNote({\n fs: new FileSystem(fs),\n cache,\n gitdir,\n ref,\n oid,\n })\n } catch (err) {\n err.caller = 'git.readNote'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { ObjectTypeError } from '../errors/ObjectTypeError.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitAnnotatedTag } from '../models/GitAnnotatedTag.js'\nimport { GitCommit } from '../models/GitCommit.js'\nimport { GitTree } from '../models/GitTree.js'\nimport { _readObject } from '../storage/readObject.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\nimport { resolveFilepath } from '../utils/resolveFilepath.js'\n\n/**\n *\n * @typedef {Object} DeflatedObject\n * @property {string} oid\n * @property {'deflated'} type\n * @property {'deflated'} format\n * @property {Uint8Array} object\n * @property {string} [source]\n *\n */\n\n/**\n *\n * @typedef {Object} WrappedObject\n * @property {string} oid\n * @property {'wrapped'} type\n * @property {'wrapped'} format\n * @property {Uint8Array} object\n * @property {string} [source]\n *\n */\n\n/**\n *\n * @typedef {Object} RawObject\n * @property {string} oid\n * @property {'blob'|'commit'|'tree'|'tag'} type\n * @property {'content'} format\n * @property {Uint8Array} object\n * @property {string} [source]\n *\n */\n\n/**\n *\n * @typedef {Object} ParsedBlobObject\n * @property {string} oid\n * @property {'blob'} type\n * @property {'parsed'} format\n * @property {string} object\n * @property {string} [source]\n *\n */\n\n/**\n *\n * @typedef {Object} ParsedCommitObject\n * @property {string} oid\n * @property {'commit'} type\n * @property {'parsed'} format\n * @property {CommitObject} object\n * @property {string} [source]\n *\n */\n\n/**\n *\n * @typedef {Object} ParsedTreeObject\n * @property {string} oid\n * @property {'tree'} type\n * @property {'parsed'} format\n * @property {TreeObject} object\n * @property {string} [source]\n *\n */\n\n/**\n *\n * @typedef {Object} ParsedTagObject\n * @property {string} oid\n * @property {'tag'} type\n * @property {'parsed'} format\n * @property {TagObject} object\n * @property {string} [source]\n *\n */\n\n/**\n *\n * @typedef {ParsedBlobObject | ParsedCommitObject | ParsedTreeObject | ParsedTagObject} ParsedObject\n */\n\n/**\n *\n * @typedef {DeflatedObject | WrappedObject | RawObject | ParsedObject } ReadObjectResult\n */\n\n/**\n * Read a git object directly by its SHA-1 object id\n *\n * Regarding `ReadObjectResult`:\n *\n * - `oid` will be the same as the `oid` argument unless the `filepath` argument is provided, in which case it will be the oid of the tree or blob being returned.\n * - `type` of deflated objects is `'deflated'`, and `type` of wrapped objects is `'wrapped'`\n * - `format` is usually, but not always, the format you requested. Packfiles do not store each object individually compressed so if you end up reading the object from a packfile it will be returned in format 'content' even if you requested 'deflated' or 'wrapped'.\n * - `object` will be an actual Object if format is 'parsed' and the object is a commit, tree, or annotated tag. Blobs are still formatted as Buffers unless an encoding is provided in which case they'll be strings. If format is anything other than 'parsed', object will be a Buffer.\n * - `source` is the name of the packfile or loose object file where the object was found.\n *\n * The `format` parameter can have the following values:\n *\n * | param | description |\n * | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n * | 'deflated' | Return the raw deflate-compressed buffer for an object if possible. Useful for efficiently shuffling around loose objects when you don't care about the contents and can save time by not inflating them. |\n * | 'wrapped' | Return the inflated object buffer wrapped in the git object header if possible. This is the raw data used when calculating the SHA-1 object id of a git object. |\n * | 'content' | Return the object buffer without the git header. |\n * | 'parsed' | Returns a parsed representation of the object. |\n *\n * The result will be in one of the following schemas:\n *\n * ## `'deflated'` format\n *\n * {@link DeflatedObject typedef}\n *\n * ## `'wrapped'` format\n *\n * {@link WrappedObject typedef}\n *\n * ## `'content'` format\n *\n * {@link RawObject typedef}\n *\n * ## `'parsed'` format\n *\n * ### parsed `'blob'` type\n *\n * {@link ParsedBlobObject typedef}\n *\n * ### parsed `'commit'` type\n *\n * {@link ParsedCommitObject typedef}\n * {@link CommitObject typedef}\n *\n * ### parsed `'tree'` type\n *\n * {@link ParsedTreeObject typedef}\n * {@link TreeObject typedef}\n * {@link TreeEntry typedef}\n *\n * ### parsed `'tag'` type\n *\n * {@link ParsedTagObject typedef}\n * {@link TagObject typedef}\n *\n * @deprecated\n * > This command is overly complicated.\n * >\n * > If you know the type of object you are reading, use [`readBlob`](./readBlob.md), [`readCommit`](./readCommit.md), [`readTag`](./readTag.md), or [`readTree`](./readTree.md).\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.oid - The SHA-1 object id to get\n * @param {'deflated' | 'wrapped' | 'content' | 'parsed'} [args.format = 'parsed'] - What format to return the object in. The choices are described in more detail below.\n * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the object at that filepath. To return the root directory of a tree set filepath to `''`\n * @param {string} [args.encoding] - A convenience argument that only affects blobs. Instead of returning `object` as a buffer, it returns a string parsed using the given encoding.\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<ReadObjectResult>} Resolves successfully with a git object description\n * @see ReadObjectResult\n *\n * @example\n * // Given a ransom SHA-1 object id, figure out what it is\n * let { type, object } = await git.readObject({\n * fs,\n * dir: '/tutorial',\n * oid: '0698a781a02264a6f37ba3ff41d78067eaf0f075'\n * })\n * switch (type) {\n * case 'commit': {\n * console.log(object)\n * break\n * }\n * case 'tree': {\n * console.log(object)\n * break\n * }\n * case 'blob': {\n * console.log(object)\n * break\n * }\n * case 'tag': {\n * console.log(object)\n * break\n * }\n * }\n *\n */\nexport async function readObject({\n fs: _fs,\n dir,\n gitdir = join(dir, '.git'),\n oid,\n format = 'parsed',\n filepath = undefined,\n encoding = undefined,\n cache = {},\n}) {\n try {\n assertParameter('fs', _fs)\n assertParameter('gitdir', gitdir)\n assertParameter('oid', oid)\n\n const fs = new FileSystem(_fs)\n if (filepath !== undefined) {\n oid = await resolveFilepath({\n fs,\n cache,\n gitdir,\n oid,\n filepath,\n })\n }\n // GitObjectManager does not know how to parse content, so we tweak that parameter before passing it.\n const _format = format === 'parsed' ? 'content' : format\n const result = await _readObject({\n fs,\n cache,\n gitdir,\n oid,\n format: _format,\n })\n result.oid = oid\n if (format === 'parsed') {\n result.format = 'parsed'\n switch (result.type) {\n case 'commit':\n result.object = GitCommit.from(result.object).parse()\n break\n case 'tree':\n result.object = GitTree.from(result.object).entries()\n break\n case 'blob':\n // Here we consider returning a raw Buffer as the 'content' format\n // and returning a string as the 'parsed' format\n if (encoding) {\n result.object = result.object.toString(encoding)\n } else {\n result.object = new Uint8Array(result.object)\n result.format = 'content'\n }\n break\n case 'tag':\n result.object = GitAnnotatedTag.from(result.object).parse()\n break\n default:\n throw new ObjectTypeError(\n result.oid,\n result.type,\n 'blob|commit|tag|tree'\n )\n }\n } else if (result.format === 'deflated' || result.format === 'wrapped') {\n result.type = result.format\n }\n return result\n } catch (err) {\n err.caller = 'git.readObject'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { ObjectTypeError } from '../errors/ObjectTypeError.js'\nimport { GitAnnotatedTag } from '../models/GitAnnotatedTag.js'\nimport { _readObject as readObject } from '../storage/readObject.js'\n\n/**\n *\n * @typedef {Object} ReadTagResult - The object returned has the following schema:\n * @property {string} oid - SHA-1 object id of this tag\n * @property {TagObject} tag - the parsed tag object\n * @property {string} payload - PGP signing payload\n */\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {any} args.cache\n * @param {string} args.gitdir\n * @param {string} args.oid\n *\n * @returns {Promise<ReadTagResult>}\n */\nexport async function _readTag({ fs, cache, gitdir, oid }) {\n const { type, object } = await readObject({\n fs,\n cache,\n gitdir,\n oid,\n format: 'content',\n })\n if (type !== 'tag') {\n throw new ObjectTypeError(oid, type, 'tag')\n }\n const tag = GitAnnotatedTag.from(object)\n const result = {\n oid,\n tag: tag.parse(),\n payload: tag.payload(),\n }\n // @ts-ignore\n return result\n}\n","import '../typedefs.js'\n\nimport { _readTag } from '../commands/readTag.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n *\n * @typedef {Object} ReadTagResult - The object returned has the following schema:\n * @property {string} oid - SHA-1 object id of this tag\n * @property {TagObject} tag - the parsed tag object\n * @property {string} payload - PGP signing payload\n */\n\n/**\n * Read an annotated tag object directly\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.oid - The SHA-1 object id to get\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<ReadTagResult>} Resolves successfully with a git object description\n * @see ReadTagResult\n * @see TagObject\n *\n */\nexport async function readTag({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n oid,\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('oid', oid)\n\n return await _readTag({\n fs: new FileSystem(fs),\n cache,\n gitdir,\n oid,\n })\n } catch (err) {\n err.caller = 'git.readTag'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _readTree } from '../commands/readTree.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n *\n * @typedef {Object} ReadTreeResult - The object returned has the following schema:\n * @property {string} oid - SHA-1 object id of this tree\n * @property {TreeObject} tree - the parsed tree object\n */\n\n/**\n * Read a tree object directly\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.oid - The SHA-1 object id to get. Annotated tags and commits are peeled.\n * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the tree object at that filepath.\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<ReadTreeResult>} Resolves successfully with a git tree object\n * @see ReadTreeResult\n * @see TreeObject\n * @see TreeEntry\n *\n */\nexport async function readTree({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n oid,\n filepath = undefined,\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('oid', oid)\n\n return await _readTree({\n fs: new FileSystem(fs),\n cache,\n gitdir,\n oid,\n filepath,\n })\n } catch (err) {\n err.caller = 'git.readTree'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Remove a file from the git index (aka staging area)\n *\n * Note that this does NOT delete the file in the working directory.\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.filepath - The path to the file to remove from the index\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<void>} Resolves successfully once the git index has been updated\n *\n * @example\n * await git.remove({ fs, dir: '/tutorial', filepath: 'README.md' })\n * console.log('done')\n *\n */\nexport async function remove({\n fs: _fs,\n dir,\n gitdir = join(dir, '.git'),\n filepath,\n cache = {},\n}) {\n try {\n assertParameter('fs', _fs)\n assertParameter('gitdir', gitdir)\n assertParameter('filepath', filepath)\n\n await GitIndexManager.acquire(\n { fs: new FileSystem(_fs), gitdir, cache },\n async function(index) {\n index.delete({ filepath })\n }\n )\n } catch (err) {\n err.caller = 'git.remove'\n throw err\n }\n}\n","// @ts-check\nimport { _commit } from '../commands/commit.js'\nimport { _readTree } from '../commands/readTree.js'\nimport { _writeTree } from '../commands/writeTree.js'\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {object} args.cache\n * @param {SignCallback} [args.onSign]\n * @param {string} [args.dir]\n * @param {string} [args.gitdir=join(dir,'.git')]\n * @param {string} [args.ref]\n * @param {string} args.oid\n * @param {Object} args.author\n * @param {string} args.author.name\n * @param {string} args.author.email\n * @param {number} args.author.timestamp\n * @param {number} args.author.timezoneOffset\n * @param {Object} args.committer\n * @param {string} args.committer.name\n * @param {string} args.committer.email\n * @param {number} args.committer.timestamp\n * @param {number} args.committer.timezoneOffset\n * @param {string} [args.signingKey]\n *\n * @returns {Promise<string>}\n */\n\nexport async function _removeNote({\n fs,\n cache,\n onSign,\n gitdir,\n ref = 'refs/notes/commits',\n oid,\n author,\n committer,\n signingKey,\n}) {\n // Get the current note commit\n let parent\n try {\n parent = await GitRefManager.resolve({ gitdir, fs, ref })\n } catch (err) {\n if (!(err instanceof NotFoundError)) {\n throw err\n }\n }\n\n // I'm using the \"empty tree\" magic number here for brevity\n const result = await _readTree({\n fs,\n gitdir,\n oid: parent || '4b825dc642cb6eb9a060e54bf8d69288fbee4904',\n })\n let tree = result.tree\n\n // Remove the note blob entry from the tree\n tree = tree.filter(entry => entry.path !== oid)\n\n // Create the new note tree\n const treeOid = await _writeTree({\n fs,\n gitdir,\n tree,\n })\n\n // Create the new note commit\n const commitOid = await _commit({\n fs,\n cache,\n onSign,\n gitdir,\n ref,\n tree: treeOid,\n parent: parent && [parent],\n message: `Note removed by 'isomorphic-git removeNote'\\n`,\n author,\n committer,\n signingKey,\n })\n\n return commitOid\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _removeNote } from '../commands/removeNote.js'\nimport { MissingNameError } from '../errors/MissingNameError.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\nimport { normalizeAuthorObject } from '../utils/normalizeAuthorObject.js'\nimport { normalizeCommitterObject } from '../utils/normalizeCommitterObject.js'\n\n/**\n * Remove an object note\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {SignCallback} [args.onSign] - a PGP signing implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ref] - The notes ref to look under\n * @param {string} args.oid - The SHA-1 object id of the object to remove the note from.\n * @param {Object} [args.author] - The details about the author.\n * @param {string} [args.author.name] - Default is `user.name` config.\n * @param {string} [args.author.email] - Default is `user.email` config.\n * @param {number} [args.author.timestamp=Math.floor(Date.now()/1000)] - Set the author timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00).\n * @param {number} [args.author.timezoneOffset] - Set the author timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`.\n * @param {Object} [args.committer = author] - The details about the note committer, in the same format as the author parameter. If not specified, the author details are used.\n * @param {string} [args.committer.name] - Default is `user.name` config.\n * @param {string} [args.committer.email] - Default is `user.email` config.\n * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00).\n * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`.\n * @param {string} [args.signingKey] - Sign the tag object using this private PGP key.\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the commit object for the note removal.\n */\n\nexport async function removeNote({\n fs: _fs,\n onSign,\n dir,\n gitdir = join(dir, '.git'),\n ref = 'refs/notes/commits',\n oid,\n author: _author,\n committer: _committer,\n signingKey,\n cache = {},\n}) {\n try {\n assertParameter('fs', _fs)\n assertParameter('gitdir', gitdir)\n assertParameter('oid', oid)\n\n const fs = new FileSystem(_fs)\n\n const author = await normalizeAuthorObject({ fs, gitdir, author: _author })\n if (!author) throw new MissingNameError('author')\n\n const committer = await normalizeCommitterObject({\n fs,\n gitdir,\n author,\n committer: _committer,\n })\n if (!committer) throw new MissingNameError('committer')\n\n return await _removeNote({\n fs,\n cache,\n onSign,\n gitdir,\n ref,\n oid,\n author,\n committer,\n signingKey,\n })\n } catch (err) {\n err.caller = 'git.removeNote'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport cleanGitRef from 'clean-git-ref'\n\nimport { AlreadyExistsError } from '../errors/AlreadyExistsError.js'\nimport { InvalidRefNameError } from '../errors/InvalidRefNameError.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\n\n/**\n * Rename a branch\n *\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {string} args.ref - The name of the new branch\n * @param {string} args.oldref - The name of the old branch\n * @param {boolean} [args.checkout = false]\n *\n * @returns {Promise<void>} Resolves successfully when filesystem operations are complete\n */\nexport async function _renameBranch({\n fs,\n gitdir,\n oldref,\n ref,\n checkout = false,\n}) {\n if (ref !== cleanGitRef.clean(ref)) {\n throw new InvalidRefNameError(ref, cleanGitRef.clean(ref))\n }\n\n if (oldref !== cleanGitRef.clean(oldref)) {\n throw new InvalidRefNameError(oldref, cleanGitRef.clean(oldref))\n }\n\n const fulloldref = `refs/heads/${oldref}`\n const fullnewref = `refs/heads/${ref}`\n\n const newexist = await GitRefManager.exists({ fs, gitdir, ref: fullnewref })\n\n if (newexist) {\n throw new AlreadyExistsError('branch', ref, false)\n }\n\n const value = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: fulloldref,\n depth: 1,\n })\n\n await GitRefManager.writeRef({ fs, gitdir, ref: fullnewref, value })\n await GitRefManager.deleteRef({ fs, gitdir, ref: fulloldref })\n\n if (checkout) {\n // Update HEAD\n await GitRefManager.writeSymbolicRef({\n fs,\n gitdir,\n ref: 'HEAD',\n value: fullnewref,\n })\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _renameBranch } from '../commands/renameBranch.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Rename a branch\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - What to name the branch\n * @param {string} args.oldref - What the name of the branch was\n * @param {boolean} [args.checkout = false] - Update `HEAD` to point at the newly created branch\n *\n * @returns {Promise<void>} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.renameBranch({ fs, dir: '/tutorial', ref: 'main', oldref: 'master' })\n * console.log('done')\n *\n */\nexport async function renameBranch({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n ref,\n oldref,\n checkout = false,\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('ref', ref)\n assertParameter('oldref', oldref)\n return await _renameBranch({\n fs: new FileSystem(fs),\n gitdir,\n ref,\n oldref,\n checkout,\n })\n } catch (err) {\n err.caller = 'git.renameBranch'\n throw err\n }\n}\n","import { GitObject } from '../models/GitObject.js'\nimport { shasum } from '../utils/shasum.js'\n\nexport async function hashObject({ gitdir, type, object }) {\n return shasum(GitObject.wrap({ type, object }))\n}\n","// @ts-check\nimport { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { hashObject } from '../utils/hashObject.js'\nimport { join } from '../utils/join.js'\nimport { resolveFilepath } from '../utils/resolveFilepath.js'\n\n/**\n * Reset a file in the git index (aka staging area)\n *\n * Note that this does NOT modify the file in the working directory.\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.filepath - The path to the file to reset in the index\n * @param {string} [args.ref = 'HEAD'] - A ref to the commit to use\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<void>} Resolves successfully once the git index has been updated\n *\n * @example\n * await git.resetIndex({ fs, dir: '/tutorial', filepath: 'README.md' })\n * console.log('done')\n *\n */\nexport async function resetIndex({\n fs: _fs,\n dir,\n gitdir = join(dir, '.git'),\n filepath,\n ref = 'HEAD',\n cache = {},\n}) {\n try {\n assertParameter('fs', _fs)\n assertParameter('gitdir', gitdir)\n assertParameter('filepath', filepath)\n assertParameter('ref', ref)\n\n const fs = new FileSystem(_fs)\n // Resolve commit\n let oid = await GitRefManager.resolve({ fs, gitdir, ref })\n let workdirOid\n try {\n // Resolve blob\n oid = await resolveFilepath({\n fs,\n cache,\n gitdir,\n oid,\n filepath,\n })\n } catch (e) {\n // This means we're resetting the file to a \"deleted\" state\n oid = null\n }\n // For files that aren't in the workdir use zeros\n let stats = {\n ctime: new Date(0),\n mtime: new Date(0),\n dev: 0,\n ino: 0,\n mode: 0,\n uid: 0,\n gid: 0,\n size: 0,\n }\n // If the file exists in the workdir...\n const object = dir && (await fs.read(join(dir, filepath)))\n if (object) {\n // ... and has the same hash as the desired state...\n workdirOid = await hashObject({\n gitdir,\n type: 'blob',\n object,\n })\n if (oid === workdirOid) {\n // ... use the workdir Stats object\n stats = await fs.lstat(join(dir, filepath))\n }\n }\n await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) {\n index.delete({ filepath })\n if (oid) {\n index.insert({ filepath, stats, oid })\n }\n })\n } catch (err) {\n err.caller = 'git.reset'\n throw err\n }\n}\n","// @ts-check\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Get the value of a symbolic ref or resolve a ref to its SHA-1 object id\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The ref to resolve\n * @param {number} [args.depth = undefined] - How many symbolic references to follow before returning\n *\n * @returns {Promise<string>} Resolves successfully with a SHA-1 object id or the value of a symbolic ref\n *\n * @example\n * let currentCommit = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD' })\n * console.log(currentCommit)\n * let currentBranch = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD', depth: 2 })\n * console.log(currentBranch)\n *\n */\nexport async function resolveRef({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n ref,\n depth,\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('ref', ref)\n\n const oid = await GitRefManager.resolve({\n fs: new FileSystem(fs),\n gitdir,\n ref,\n depth,\n })\n return oid\n } catch (err) {\n err.caller = 'git.resolveRef'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitConfigManager } from '../managers/GitConfigManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Write an entry to the git config files.\n *\n * *Caveats:*\n * - Currently only the local `$GIT_DIR/config` file can be read or written. However support for the global `~/.gitconfig` and system `$(prefix)/etc/gitconfig` will be added in the future.\n * - The current parser does not support the more exotic features of the git-config file format such as `[include]` and `[includeIf]`.\n *\n * @param {Object} args\n * @param {FsClient} args.fs - a file system implementation\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.path - The key of the git config entry\n * @param {string | boolean | number | void} args.value - A value to store at that path. (Use `undefined` as the value to delete a config entry.)\n * @param {boolean} [args.append = false] - If true, will append rather than replace when setting (use with multi-valued config options).\n *\n * @returns {Promise<void>} Resolves successfully when operation completed\n *\n * @example\n * // Write config value\n * await git.setConfig({\n * fs,\n * dir: '/tutorial',\n * path: 'user.name',\n * value: 'Mr. Test'\n * })\n *\n * // Print out config file\n * let file = await fs.promises.readFile('/tutorial/.git/config', 'utf8')\n * console.log(file)\n *\n * // Delete a config entry\n * await git.setConfig({\n * fs,\n * dir: '/tutorial',\n * path: 'user.name',\n * value: undefined\n * })\n *\n * // Print out config file\n * file = await fs.promises.readFile('/tutorial/.git/config', 'utf8')\n * console.log(file)\n */\nexport async function setConfig({\n fs: _fs,\n dir,\n gitdir = join(dir, '.git'),\n path,\n value,\n append = false,\n}) {\n try {\n assertParameter('fs', _fs)\n assertParameter('gitdir', gitdir)\n assertParameter('path', path)\n // assertParameter('value', value) // We actually allow 'undefined' as a value to unset/delete\n\n const fs = new FileSystem(_fs)\n const config = await GitConfigManager.get({ fs, gitdir })\n if (append) {\n await config.append(path, value)\n } else {\n await config.set(path, value)\n }\n await GitConfigManager.save({ fs, gitdir, config })\n } catch (err) {\n err.caller = 'git.setConfig'\n throw err\n }\n}\n","// @ts-check\nimport { _readTree } from '../commands/readTree.js'\nimport { NotFoundError } from '../errors/NotFoundError.js'\nimport { ObjectTypeError } from '../errors/ObjectTypeError'\nimport { GitIgnoreManager } from '../managers/GitIgnoreManager.js'\nimport { GitIndexManager } from '../managers/GitIndexManager.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { GitTree } from '../models/GitTree.js'\nimport { _readObject } from '../storage/readObject.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { compareStats } from '../utils/compareStats.js'\nimport { hashObject } from '../utils/hashObject.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Tell whether a file has been changed\n *\n * The possible resolve values are:\n *\n * | status | description |\n * | --------------------- | ------------------------------------------------------------------------------------- |\n * | `\"ignored\"` | file ignored by a .gitignore rule |\n * | `\"unmodified\"` | file unchanged from HEAD commit |\n * | `\"*modified\"` | file has modifications, not yet staged |\n * | `\"*deleted\"` | file has been removed, but the removal is not yet staged |\n * | `\"*added\"` | file is untracked, not yet staged |\n * | `\"absent\"` | file not present in HEAD commit, staging area, or working dir |\n * | `\"modified\"` | file has modifications, staged |\n * | `\"deleted\"` | file has been removed, staged |\n * | `\"added\"` | previously untracked file, staged |\n * | `\"*unmodified\"` | working dir and HEAD commit match, but index differs |\n * | `\"*absent\"` | file not present in working dir or HEAD commit, but present in the index |\n * | `\"*undeleted\"` | file was deleted from the index, but is still in the working dir |\n * | `\"*undeletemodified\"` | file was deleted from the index, but is present with modifications in the working dir |\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.filepath - The path to the file to query\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<'ignored'|'unmodified'|'*modified'|'*deleted'|'*added'|'absent'|'modified'|'deleted'|'added'|'*unmodified'|'*absent'|'*undeleted'|'*undeletemodified'>} Resolves successfully with the file's git status\n *\n * @example\n * let status = await git.status({ fs, dir: '/tutorial', filepath: 'README.md' })\n * console.log(status)\n *\n */\nexport async function status({\n fs: _fs,\n dir,\n gitdir = join(dir, '.git'),\n filepath,\n cache = {},\n}) {\n try {\n assertParameter('fs', _fs)\n assertParameter('gitdir', gitdir)\n assertParameter('filepath', filepath)\n\n const fs = new FileSystem(_fs)\n const ignored = await GitIgnoreManager.isIgnored({\n fs,\n gitdir,\n dir,\n filepath,\n })\n if (ignored) {\n return 'ignored'\n }\n const headTree = await getHeadTree({ fs, cache, gitdir })\n const treeOid = await getOidAtPath({\n fs,\n cache,\n gitdir,\n tree: headTree,\n path: filepath,\n })\n const indexEntry = await GitIndexManager.acquire(\n { fs, gitdir, cache },\n async function(index) {\n for (const entry of index) {\n if (entry.path === filepath) return entry\n }\n return null\n }\n )\n const stats = await fs.lstat(join(dir, filepath))\n\n const H = treeOid !== null // head\n const I = indexEntry !== null // index\n const W = stats !== null // working dir\n\n const getWorkdirOid = async () => {\n if (I && !compareStats(indexEntry, stats)) {\n return indexEntry.oid\n } else {\n const object = await fs.read(join(dir, filepath))\n const workdirOid = await hashObject({\n gitdir,\n type: 'blob',\n object,\n })\n // If the oid in the index === working dir oid but stats differed update cache\n if (I && indexEntry.oid === workdirOid) {\n // and as long as our fs.stats aren't bad.\n // size of -1 happens over a BrowserFS HTTP Backend that doesn't serve Content-Length headers\n // (like the Karma webserver) because BrowserFS HTTP Backend uses HTTP HEAD requests to do fs.stat\n if (stats.size !== -1) {\n // We don't await this so we can return faster for one-off cases.\n GitIndexManager.acquire({ fs, gitdir, cache }, async function(\n index\n ) {\n index.insert({ filepath, stats, oid: workdirOid })\n })\n }\n }\n return workdirOid\n }\n }\n\n if (!H && !W && !I) return 'absent' // ---\n if (!H && !W && I) return '*absent' // -A-\n if (!H && W && !I) return '*added' // --A\n if (!H && W && I) {\n const workdirOid = await getWorkdirOid()\n // @ts-ignore\n return workdirOid === indexEntry.oid ? 'added' : '*added' // -AA : -AB\n }\n if (H && !W && !I) return 'deleted' // A--\n if (H && !W && I) {\n // @ts-ignore\n return treeOid === indexEntry.oid ? '*deleted' : '*deleted' // AA- : AB-\n }\n if (H && W && !I) {\n const workdirOid = await getWorkdirOid()\n return workdirOid === treeOid ? '*undeleted' : '*undeletemodified' // A-A : A-B\n }\n if (H && W && I) {\n const workdirOid = await getWorkdirOid()\n if (workdirOid === treeOid) {\n // @ts-ignore\n return workdirOid === indexEntry.oid ? 'unmodified' : '*unmodified' // AAA : ABA\n } else {\n // @ts-ignore\n return workdirOid === indexEntry.oid ? 'modified' : '*modified' // ABB : AAB\n }\n }\n /*\n ---\n -A-\n --A\n -AA\n -AB\n A--\n AA-\n AB-\n A-A\n A-B\n AAA\n ABA\n ABB\n AAB\n */\n } catch (err) {\n err.caller = 'git.status'\n throw err\n }\n}\n\nasync function getOidAtPath({ fs, cache, gitdir, tree, path }) {\n if (typeof path === 'string') path = path.split('/')\n const dirname = path.shift()\n for (const entry of tree) {\n if (entry.path === dirname) {\n if (path.length === 0) {\n return entry.oid\n }\n const { type, object } = await _readObject({\n fs,\n cache,\n gitdir,\n oid: entry.oid,\n })\n if (type === 'tree') {\n const tree = GitTree.from(object)\n return getOidAtPath({ fs, cache, gitdir, tree, path })\n }\n if (type === 'blob') {\n throw new ObjectTypeError(entry.oid, type, 'blob', path.join('/'))\n }\n }\n }\n return null\n}\n\nasync function getHeadTree({ fs, cache, gitdir }) {\n // Get the tree from the HEAD commit.\n let oid\n try {\n oid = await GitRefManager.resolve({ fs, gitdir, ref: 'HEAD' })\n } catch (e) {\n // Handle fresh branches with no commits\n if (e instanceof NotFoundError) {\n return []\n }\n }\n const { tree } = await _readTree({ fs, cache, gitdir, oid })\n return tree\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { STAGE } from '../commands/STAGE.js'\nimport { TREE } from '../commands/TREE.js'\nimport { WORKDIR } from '../commands/WORKDIR.js'\nimport { _walk } from '../commands/walk.js'\nimport { GitIgnoreManager } from '../managers/GitIgnoreManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\nimport { worthWalking } from '../utils/worthWalking.js'\n\n/**\n * Efficiently get the status of multiple files at once.\n *\n * The returned `StatusMatrix` is admittedly not the easiest format to read.\n * However it conveys a large amount of information in dense format that should make it easy to create reports about the current state of the repository;\n * without having to do multiple, time-consuming isomorphic-git calls.\n * My hope is that the speed and flexibility of the function will make up for the learning curve of interpreting the return value.\n *\n * ```js live\n * // get the status of all the files in 'src'\n * let status = await git.statusMatrix({\n * fs,\n * dir: '/tutorial',\n * filter: f => f.startsWith('src/')\n * })\n * console.log(status)\n * ```\n *\n * ```js live\n * // get the status of all the JSON and Markdown files\n * let status = await git.statusMatrix({\n * fs,\n * dir: '/tutorial',\n * filter: f => f.endsWith('.json') || f.endsWith('.md')\n * })\n * console.log(status)\n * ```\n *\n * The result is returned as a 2D array.\n * The outer array represents the files and/or blobs in the repo, in alphabetical order.\n * The inner arrays describe the status of the file:\n * the first value is the filepath, and the next three are integers\n * representing the HEAD status, WORKDIR status, and STAGE status of the entry.\n *\n * ```js\n * // example StatusMatrix\n * [\n * [\"a.txt\", 0, 2, 0], // new, untracked\n * [\"b.txt\", 0, 2, 2], // added, staged\n * [\"c.txt\", 0, 2, 3], // added, staged, with unstaged changes\n * [\"d.txt\", 1, 1, 1], // unmodified\n * [\"e.txt\", 1, 2, 1], // modified, unstaged\n * [\"f.txt\", 1, 2, 2], // modified, staged\n * [\"g.txt\", 1, 2, 3], // modified, staged, with unstaged changes\n * [\"h.txt\", 1, 0, 1], // deleted, unstaged\n * [\"i.txt\", 1, 0, 0], // deleted, staged\n * ]\n * ```\n *\n * - The HEAD status is either absent (0) or present (1).\n * - The WORKDIR status is either absent (0), identical to HEAD (1), or different from HEAD (2).\n * - The STAGE status is either absent (0), identical to HEAD (1), identical to WORKDIR (2), or different from WORKDIR (3).\n *\n * ```ts\n * type Filename = string\n * type HeadStatus = 0 | 1\n * type WorkdirStatus = 0 | 1 | 2\n * type StageStatus = 0 | 1 | 2 | 3\n *\n * type StatusRow = [Filename, HeadStatus, WorkdirStatus, StageStatus]\n *\n * type StatusMatrix = StatusRow[]\n * ```\n *\n * > Think of the natural progression of file modifications as being from HEAD (previous) -> WORKDIR (current) -> STAGE (next).\n * > Then HEAD is \"version 1\", WORKDIR is \"version 2\", and STAGE is \"version 3\".\n * > Then, imagine a \"version 0\" which is before the file was created.\n * > Then the status value in each column corresponds to the oldest version of the file it is identical to.\n * > (For a file to be identical to \"version 0\" means the file is deleted.)\n *\n * Here are some examples of queries you can answer using the result:\n *\n * #### Q: What files have been deleted?\n * ```js\n * const FILE = 0, WORKDIR = 2\n *\n * const filenames = (await statusMatrix({ dir }))\n * .filter(row => row[WORKDIR] === 0)\n * .map(row => row[FILE])\n * ```\n *\n * #### Q: What files have unstaged changes?\n * ```js\n * const FILE = 0, WORKDIR = 2, STAGE = 3\n *\n * const filenames = (await statusMatrix({ dir }))\n * .filter(row => row[WORKDIR] !== row[STAGE])\n * .map(row => row[FILE])\n * ```\n *\n * #### Q: What files have been modified since the last commit?\n * ```js\n * const FILE = 0, HEAD = 1, WORKDIR = 2\n *\n * const filenames = (await statusMatrix({ dir }))\n * .filter(row => row[HEAD] !== row[WORKDIR])\n * .map(row => row[FILE])\n * ```\n *\n * #### Q: What files will NOT be changed if I commit right now?\n * ```js\n * const FILE = 0, HEAD = 1, STAGE = 3\n *\n * const filenames = (await statusMatrix({ dir }))\n * .filter(row => row[HEAD] === row[STAGE])\n * .map(row => row[FILE])\n * ```\n *\n * For reference, here are all possible combinations:\n *\n * | HEAD | WORKDIR | STAGE | `git status --short` equivalent |\n * | ---- | ------- | ----- | ------------------------------- |\n * | 0 | 0 | 0 | `` |\n * | 0 | 0 | 3 | `AD` |\n * | 0 | 2 | 0 | `??` |\n * | 0 | 2 | 2 | `A ` |\n * | 0 | 2 | 3 | `AM` |\n * | 1 | 0 | 0 | `D ` |\n * | 1 | 0 | 1 | ` D` |\n * | 1 | 0 | 3 | `MD` |\n * | 1 | 1 | 0 | `D ` + `??` |\n * | 1 | 1 | 1 | `` |\n * | 1 | 1 | 3 | `MM` |\n * | 1 | 2 | 0 | `D ` + `??` |\n * | 1 | 2 | 1 | ` M` |\n * | 1 | 2 | 2 | `M ` |\n * | 1 | 2 | 3 | `MM` |\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} [args.ref = 'HEAD'] - Optionally specify a different commit to compare against the workdir and stage instead of the HEAD\n * @param {string[]} [args.filepaths = ['.']] - Limit the query to the given files and directories\n * @param {function(string): boolean} [args.filter] - Filter the results to only those whose filepath matches a function.\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<Array<StatusRow>>} Resolves with a status matrix, described below.\n * @see StatusRow\n */\nexport async function statusMatrix({\n fs: _fs,\n dir,\n gitdir = join(dir, '.git'),\n ref = 'HEAD',\n filepaths = ['.'],\n filter,\n cache = {},\n}) {\n try {\n assertParameter('fs', _fs)\n assertParameter('gitdir', gitdir)\n assertParameter('ref', ref)\n\n const fs = new FileSystem(_fs)\n return await _walk({\n fs,\n cache,\n dir,\n gitdir,\n trees: [TREE({ ref }), WORKDIR(), STAGE()],\n map: async function(filepath, [head, workdir, stage]) {\n // Ignore ignored files, but only if they are not already tracked.\n if (!head && !stage && workdir) {\n if (\n await GitIgnoreManager.isIgnored({\n fs,\n dir,\n filepath,\n })\n ) {\n return null\n }\n }\n // match against base paths\n if (!filepaths.some(base => worthWalking(filepath, base))) {\n return null\n }\n // Late filter against file names\n if (filter) {\n if (!filter(filepath)) return\n }\n\n // For now, just bail on directories\n const headType = head && (await head.type())\n if (headType === 'tree' || headType === 'special') return\n if (headType === 'commit') return null\n\n const workdirType = workdir && (await workdir.type())\n if (workdirType === 'tree' || workdirType === 'special') return\n\n const stageType = stage && (await stage.type())\n if (stageType === 'commit') return null\n if (stageType === 'tree' || stageType === 'special') return\n\n // Figure out the oids, using the staged oid for the working dir oid if the stats match.\n const headOid = head ? await head.oid() : undefined\n const stageOid = stage ? await stage.oid() : undefined\n let workdirOid\n if (!head && workdir && !stage) {\n // We don't actually NEED the sha. Any sha will do\n // TODO: update this logic to handle N trees instead of just 3.\n workdirOid = '42'\n } else if (workdir) {\n workdirOid = await workdir.oid()\n }\n const entry = [undefined, headOid, workdirOid, stageOid]\n const result = entry.map(value => entry.indexOf(value))\n result.shift() // remove leading undefined entry\n return [filepath, ...result]\n },\n })\n } catch (err) {\n err.caller = 'git.statusMatrix'\n throw err\n }\n}\n","// @ts-check\nimport { AlreadyExistsError } from '../errors/AlreadyExistsError.js'\nimport { MissingParameterError } from '../errors/MissingParameterError.js'\nimport { GitRefManager } from '../managers/GitRefManager'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter'\nimport { join } from '../utils/join.js'\n\n/**\n * Create a lightweight tag\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - What to name the tag\n * @param {string} [args.object = 'HEAD'] - What oid the tag refers to. (Will resolve to oid if value is a ref.) By default, the commit object which is referred by the current `HEAD` is used.\n * @param {boolean} [args.force = false] - Instead of throwing an error if a tag named `ref` already exists, overwrite the existing tag.\n *\n * @returns {Promise<void>} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.tag({ fs, dir: '/tutorial', ref: 'test-tag' })\n * console.log('done')\n *\n */\nexport async function tag({\n fs: _fs,\n dir,\n gitdir = join(dir, '.git'),\n ref,\n object,\n force = false,\n}) {\n try {\n assertParameter('fs', _fs)\n assertParameter('gitdir', gitdir)\n assertParameter('ref', ref)\n\n const fs = new FileSystem(_fs)\n\n if (ref === undefined) {\n throw new MissingParameterError('ref')\n }\n\n ref = ref.startsWith('refs/tags/') ? ref : `refs/tags/${ref}`\n\n // Resolve passed object\n const value = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: object || 'HEAD',\n })\n\n if (!force && (await GitRefManager.exists({ fs, gitdir, ref }))) {\n throw new AlreadyExistsError('tag', ref)\n }\n\n await GitRefManager.writeRef({ fs, gitdir, ref, value })\n } catch (err) {\n err.caller = 'git.tag'\n throw err\n }\n}\n","// @ts-check\nimport { pkg } from '../utils/pkg.js'\n\n/**\n * Return the version number of isomorphic-git\n *\n * I don't know why you might need this. I added it just so I could check that I was getting\n * the correct version of the library and not a cached version.\n *\n * @returns {string} the version string taken from package.json at publication time\n *\n * @example\n * console.log(git.version())\n *\n */\nexport function version() {\n try {\n return pkg.version\n } catch (err) {\n err.caller = 'git.version'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _walk } from '../commands/walk.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * @callback WalkerMap\n * @param {string} filename\n * @param {Array<WalkerEntry | null>} entries\n * @returns {Promise<any>}\n */\n\n/**\n * @callback WalkerReduce\n * @param {any} parent\n * @param {any[]} children\n * @returns {Promise<any>}\n */\n\n/**\n * @callback WalkerIterateCallback\n * @param {WalkerEntry[]} entries\n * @returns {Promise<any[]>}\n */\n\n/**\n * @callback WalkerIterate\n * @param {WalkerIterateCallback} walk\n * @param {IterableIterator<WalkerEntry[]>} children\n * @returns {Promise<any[]>}\n */\n\n/**\n * A powerful recursive tree-walking utility.\n *\n * The `walk` API simplifies gathering detailed information about a tree or comparing all the filepaths in two or more trees.\n * Trees can be git commits, the working directory, or the or git index (staging area).\n * As long as a file or directory is present in at least one of the trees, it will be traversed.\n * Entries are traversed in alphabetical order.\n *\n * The arguments to `walk` are the `trees` you want to traverse, and 3 optional transform functions:\n * `map`, `reduce`, and `iterate`.\n *\n * ## `TREE`, `WORKDIR`, and `STAGE`\n *\n * Tree walkers are represented by three separate functions that can be imported:\n *\n * ```js\n * import { TREE, WORKDIR, STAGE } from 'isomorphic-git'\n * ```\n *\n * These functions return opaque handles called `Walker`s.\n * The only thing that `Walker` objects are good for is passing into `walk`.\n * Here are the three `Walker`s passed into `walk` by the `statusMatrix` command for example:\n *\n * ```js\n * let ref = 'HEAD'\n *\n * let trees = [TREE({ ref }), WORKDIR(), STAGE()]\n * ```\n *\n * For the arguments, see the doc pages for [TREE](./TREE.md), [WORKDIR](./WORKDIR.md), and [STAGE](./STAGE.md).\n *\n * `map`, `reduce`, and `iterate` allow you control the recursive walk by pruning and transforming `WalkerEntry`s into the desired result.\n *\n * ## WalkerEntry\n *\n * {@link WalkerEntry typedef}\n *\n * `map` receives an array of `WalkerEntry[]` as its main argument, one `WalkerEntry` for each `Walker` in the `trees` argument.\n * The methods are memoized per `WalkerEntry` so calling them multiple times in a `map` function does not adversely impact performance.\n * By only computing these values if needed, you build can build lean, mean, efficient walking machines.\n *\n * ### WalkerEntry#type()\n *\n * Returns the kind as a string. This is normally either `tree` or `blob`.\n *\n * `TREE`, `STAGE`, and `WORKDIR` walkers all return a string.\n *\n * Possible values:\n *\n * - `'tree'` directory\n * - `'blob'` file\n * - `'special'` used by `WORKDIR` to represent irregular files like sockets and FIFOs\n * - `'commit'` used by `TREE` to represent submodules\n *\n * ```js\n * await entry.type()\n * ```\n *\n * ### WalkerEntry#mode()\n *\n * Returns the file mode as a number. Use this to distinguish between regular files, symlinks, and executable files.\n *\n * `TREE`, `STAGE`, and `WORKDIR` walkers all return a number for all `type`s of entries.\n *\n * It has been normalized to one of the 4 values that are allowed in git commits:\n *\n * - `0o40000` directory\n * - `0o100644` file\n * - `0o100755` file (executable)\n * - `0o120000` symlink\n *\n * Tip: to make modes more readable, you can print them to octal using `.toString(8)`.\n *\n * ```js\n * await entry.mode()\n * ```\n *\n * ### WalkerEntry#oid()\n *\n * Returns the SHA-1 object id for blobs and trees.\n *\n * `TREE` walkers return a string for `blob` and `tree` entries.\n *\n * `STAGE` and `WORKDIR` walkers return a string for `blob` entries and `undefined` for `tree` entries.\n *\n * ```js\n * await entry.oid()\n * ```\n *\n * ### WalkerEntry#content()\n *\n * Returns the file contents as a Buffer.\n *\n * `TREE` and `WORKDIR` walkers return a Buffer for `blob` entries and `undefined` for `tree` entries.\n *\n * `STAGE` walkers always return `undefined` since the file contents are never stored in the stage.\n *\n * ```js\n * await entry.content()\n * ```\n *\n * ### WalkerEntry#stat()\n *\n * Returns a normalized subset of filesystem Stat data.\n *\n * `WORKDIR` walkers return a `Stat` for `blob` and `tree` entries.\n *\n * `STAGE` walkers return a `Stat` for `blob` entries and `undefined` for `tree` entries.\n *\n * `TREE` walkers return `undefined` for all entry types.\n *\n * ```js\n * await entry.stat()\n * ```\n *\n * {@link Stat typedef}\n *\n * ## map(string, Array<WalkerEntry|null>) => Promise<any>\n *\n * {@link WalkerMap typedef}\n *\n * This is the function that is called once per entry BEFORE visiting the children of that node.\n *\n * If you return `null` for a `tree` entry, then none of the children of that `tree` entry will be walked.\n *\n * This is a good place for query logic, such as examining the contents of a file.\n * Ultimately, compare all the entries and return any values you are interested in.\n * If you do not return a value (or return undefined) that entry will be filtered from the results.\n *\n * Example 1: Find all the files containing the word 'foo'.\n * ```js\n * async function map(filepath, [head, workdir]) {\n * let content = (await workdir.content()).toString('utf8')\n * if (content.contains('foo')) {\n * return {\n * filepath,\n * content\n * }\n * }\n * }\n * ```\n *\n * Example 2: Return the difference between the working directory and the HEAD commit\n * ```js\n * const diff = require('diff-lines')\n * async function map(filepath, [head, workdir]) {\n * return {\n * filepath,\n * oid: await head.oid(),\n * diff: diff((await head.content()).toString('utf8'), (await workdir.content()).toString('utf8'))\n * }\n * }\n * ```\n *\n * Example 3:\n * ```js\n * let path = require('path')\n * // Only examine files in the directory `cwd`\n * let cwd = 'src/app'\n * async function map (filepath, [head, workdir, stage]) {\n * if (\n * // don't skip the root directory\n * head.fullpath !== '.' &&\n * // return true for 'src' and 'src/app'\n * !cwd.startsWith(filepath) &&\n * // return true for 'src/app/*'\n * path.dirname(filepath) !== cwd\n * ) {\n * return null\n * } else {\n * return filepath\n * }\n * }\n * ```\n *\n * ## reduce(parent, children)\n *\n * {@link WalkerReduce typedef}\n *\n * This is the function that is called once per entry AFTER visiting the children of that node.\n *\n * Default: `async (parent, children) => parent === undefined ? children.flat() : [parent, children].flat()`\n *\n * The default implementation of this function returns all directories and children in a giant flat array.\n * You can define a different accumulation method though.\n *\n * Example: Return a hierarchical structure\n * ```js\n * async function reduce (parent, children) {\n * return Object.assign(parent, { children })\n * }\n * ```\n *\n * ## iterate(walk, children)\n *\n * {@link WalkerIterate typedef}\n *\n * {@link WalkerIterateCallback typedef}\n *\n * Default: `(walk, children) => Promise.all([...children].map(walk))`\n *\n * The default implementation recurses all children concurrently using Promise.all.\n * However you could use a custom function to traverse children serially or use a global queue to throttle recursion.\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {Walker[]} args.trees - The trees you want to traverse\n * @param {WalkerMap} [args.map] - Transform `WalkerEntry`s into a result form\n * @param {WalkerReduce} [args.reduce] - Control how mapped entries are combined with their parent result\n * @param {WalkerIterate} [args.iterate] - Fine-tune how entries within a tree are iterated over\n * @param {object} [args.cache] - a [cache](cache.md) object\n *\n * @returns {Promise<any>} The finished tree-walking result\n */\nexport async function walk({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n trees,\n map,\n reduce,\n iterate,\n cache = {},\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('trees', trees)\n\n return await _walk({\n fs: new FileSystem(fs),\n cache,\n dir,\n gitdir,\n trees,\n map,\n reduce,\n iterate,\n })\n } catch (err) {\n err.caller = 'git.walk'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { FileSystem } from '../models/FileSystem.js'\nimport { _writeObject } from '../storage/writeObject'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Write a blob object directly\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {Uint8Array} args.blob - The blob object to write\n *\n * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object\n *\n * @example\n * // Manually create a blob.\n * let oid = await git.writeBlob({\n * fs,\n * dir: '/tutorial',\n * blob: new Uint8Array([])\n * })\n *\n * console.log('oid', oid) // should be 'e69de29bb2d1d6434b8b29ae775ad8c2e48c5391'\n *\n */\nexport async function writeBlob({ fs, dir, gitdir = join(dir, '.git'), blob }) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('blob', blob)\n\n return await _writeObject({\n fs: new FileSystem(fs),\n gitdir,\n type: 'blob',\n object: blob,\n format: 'content',\n })\n } catch (err) {\n err.caller = 'git.writeBlob'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitCommit } from '../models/GitCommit.js'\nimport { _writeObject as writeObject } from '../storage/writeObject.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {CommitObject} args.commit\n *\n * @returns {Promise<string>}\n * @see CommitObject\n *\n */\nexport async function _writeCommit({ fs, gitdir, commit }) {\n // Convert object to buffer\n const object = GitCommit.from(commit).toObject()\n const oid = await writeObject({\n fs,\n gitdir,\n type: 'commit',\n object,\n format: 'content',\n })\n return oid\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _writeCommit } from '../commands/writeCommit.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Write a commit object directly\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {CommitObject} args.commit - The object to write\n *\n * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object\n * @see CommitObject\n *\n */\nexport async function writeCommit({\n fs,\n dir,\n gitdir = join(dir, '.git'),\n commit,\n}) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('commit', commit)\n\n return await _writeCommit({\n fs: new FileSystem(fs),\n gitdir,\n commit,\n })\n } catch (err) {\n err.caller = 'git.writeCommit'\n throw err\n }\n}\n","// @ts-check\nimport cleanGitRef from 'clean-git-ref'\n\nimport { AlreadyExistsError } from '../errors/AlreadyExistsError.js'\nimport { InvalidRefNameError } from '../errors/InvalidRefNameError.js'\nimport { GitRefManager } from '../managers/GitRefManager.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Write a ref which refers to the specified SHA-1 object id, or a symbolic ref which refers to the specified ref.\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {string} args.ref - The name of the ref to write\n * @param {string} args.value - When `symbolic` is false, a ref or an SHA-1 object id. When true, a ref starting with `refs/`.\n * @param {boolean} [args.force = false] - Instead of throwing an error if a ref named `ref` already exists, overwrite the existing ref.\n * @param {boolean} [args.symbolic = false] - Whether the ref is symbolic or not.\n *\n * @returns {Promise<void>} Resolves successfully when filesystem operations are complete\n *\n * @example\n * await git.writeRef({\n * fs,\n * dir: '/tutorial',\n * ref: 'refs/heads/another-branch',\n * value: 'HEAD'\n * })\n * await git.writeRef({\n * fs,\n * dir: '/tutorial',\n * ref: 'HEAD',\n * value: 'refs/heads/another-branch',\n * force: true,\n * symbolic: true\n * })\n * console.log('done')\n *\n */\nexport async function writeRef({\n fs: _fs,\n dir,\n gitdir = join(dir, '.git'),\n ref,\n value,\n force = false,\n symbolic = false,\n}) {\n try {\n assertParameter('fs', _fs)\n assertParameter('gitdir', gitdir)\n assertParameter('ref', ref)\n assertParameter('value', value)\n\n const fs = new FileSystem(_fs)\n\n if (ref !== cleanGitRef.clean(ref)) {\n throw new InvalidRefNameError(ref, cleanGitRef.clean(ref))\n }\n\n if (!force && (await GitRefManager.exists({ fs, gitdir, ref }))) {\n throw new AlreadyExistsError('ref', ref)\n }\n\n if (symbolic) {\n await GitRefManager.writeSymbolicRef({\n fs,\n gitdir,\n ref,\n value,\n })\n } else {\n value = await GitRefManager.resolve({\n fs,\n gitdir,\n ref: value,\n })\n await GitRefManager.writeRef({\n fs,\n gitdir,\n ref,\n value,\n })\n }\n } catch (err) {\n err.caller = 'git.writeRef'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { GitAnnotatedTag } from '../models/GitAnnotatedTag.js'\nimport { _writeObject as writeObject } from '../storage/writeObject.js'\n\n/**\n * @param {object} args\n * @param {import('../models/FileSystem.js').FileSystem} args.fs\n * @param {string} args.gitdir\n * @param {TagObject} args.tag\n *\n * @returns {Promise<string>}\n */\nexport async function _writeTag({ fs, gitdir, tag }) {\n // Convert object to buffer\n const object = GitAnnotatedTag.from(tag).toObject()\n const oid = await writeObject({\n fs,\n gitdir,\n type: 'tag',\n object,\n format: 'content',\n })\n return oid\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _writeTag } from '../commands/writeTag.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Write an annotated tag object directly\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {TagObject} args.tag - The object to write\n *\n * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object\n * @see TagObject\n *\n * @example\n * // Manually create an annotated tag.\n * let sha = await git.resolveRef({ fs, dir: '/tutorial', ref: 'HEAD' })\n * console.log('commit', sha)\n *\n * let oid = await git.writeTag({\n * fs,\n * dir: '/tutorial',\n * tag: {\n * object: sha,\n * type: 'commit',\n * tag: 'my-tag',\n * tagger: {\n * name: 'your name',\n * email: 'email@example.com',\n * timestamp: Math.floor(Date.now()/1000),\n * timezoneOffset: new Date().getTimezoneOffset()\n * },\n * message: 'Optional message'\n * }\n * })\n *\n * console.log('tag', oid)\n *\n */\nexport async function writeTag({ fs, dir, gitdir = join(dir, '.git'), tag }) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('tag', tag)\n\n return await _writeTag({\n fs: new FileSystem(fs),\n gitdir,\n tag,\n })\n } catch (err) {\n err.caller = 'git.writeTag'\n throw err\n }\n}\n","// @ts-check\nimport '../typedefs.js'\n\nimport { _writeTree } from '../commands/writeTree.js'\nimport { FileSystem } from '../models/FileSystem.js'\nimport { assertParameter } from '../utils/assertParameter.js'\nimport { join } from '../utils/join.js'\n\n/**\n * Write a tree object directly\n *\n * @param {object} args\n * @param {FsClient} args.fs - a file system client\n * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path\n * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path\n * @param {TreeObject} args.tree - The object to write\n *\n * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly written object.\n * @see TreeObject\n * @see TreeEntry\n *\n */\nexport async function writeTree({ fs, dir, gitdir = join(dir, '.git'), tree }) {\n try {\n assertParameter('fs', fs)\n assertParameter('gitdir', gitdir)\n assertParameter('tree', tree)\n\n return await _writeTree({\n fs: new FileSystem(fs),\n gitdir,\n tree,\n })\n } catch (err) {\n err.caller = 'git.writeTree'\n throw err\n }\n}\n","import './typedefs.js'\n\nimport { STAGE } from './api/STAGE.js'\nimport { TREE } from './api/TREE.js'\nimport { WORKDIR } from './api/WORKDIR.js'\nimport { add } from './api/add.js'\nimport { addNote } from './api/addNote.js'\nimport { addRemote } from './api/addRemote.js'\nimport { annotatedTag } from './api/annotatedTag.js'\nimport { branch } from './api/branch.js'\nimport { checkout } from './api/checkout.js'\nimport { clone } from './api/clone.js'\nimport { commit } from './api/commit.js'\nimport { currentBranch } from './api/currentBranch.js'\nimport { deleteBranch } from './api/deleteBranch.js'\nimport { deleteRef } from './api/deleteRef.js'\nimport { deleteRemote } from './api/deleteRemote.js'\nimport { deleteTag } from './api/deleteTag.js'\nimport { expandOid } from './api/expandOid.js'\nimport { expandRef } from './api/expandRef.js'\nimport { fastForward } from './api/fastForward.js'\nimport { fetch } from './api/fetch.js'\nimport { findMergeBase } from './api/findMergeBase.js'\nimport { findRoot } from './api/findRoot.js'\nimport { getConfig } from './api/getConfig.js'\nimport { getConfigAll } from './api/getConfigAll.js'\nimport { getRemoteInfo } from './api/getRemoteInfo.js'\nimport { getRemoteInfo2 } from './api/getRemoteInfo2.js'\nimport { hashBlob } from './api/hashBlob.js'\nimport { indexPack } from './api/indexPack.js'\nimport { init } from './api/init.js'\nimport { isDescendent } from './api/isDescendent.js'\nimport { listBranches } from './api/listBranches.js'\nimport { listFiles } from './api/listFiles.js'\nimport { listNotes } from './api/listNotes.js'\nimport { listRemotes } from './api/listRemotes.js'\nimport { listServerRefs } from './api/listServerRefs.js'\nimport { listTags } from './api/listTags.js'\nimport { log } from './api/log.js'\nimport { merge } from './api/merge.js'\nimport { packObjects } from './api/packObjects.js'\nimport { pull } from './api/pull.js'\nimport { push } from './api/push.js'\nimport { readBlob } from './api/readBlob.js'\nimport { readCommit } from './api/readCommit.js'\nimport { readNote } from './api/readNote.js'\nimport { readObject } from './api/readObject.js'\nimport { readTag } from './api/readTag.js'\nimport { readTree } from './api/readTree.js'\nimport { remove } from './api/remove.js'\nimport { removeNote } from './api/removeNote.js'\nimport { renameBranch } from './api/renameBranch.js'\nimport { resetIndex } from './api/resetIndex.js'\nimport { resolveRef } from './api/resolveRef.js'\nimport { setConfig } from './api/setConfig.js'\nimport { status } from './api/status.js'\nimport { statusMatrix } from './api/statusMatrix.js'\nimport { tag } from './api/tag.js'\nimport { version } from './api/version.js'\nimport { walk } from './api/walk.js'\nimport { writeBlob } from './api/writeBlob.js'\nimport { writeCommit } from './api/writeCommit.js'\nimport { writeObject } from './api/writeObject.js'\nimport { writeRef } from './api/writeRef.js'\nimport { writeTag } from './api/writeTag.js'\nimport { writeTree } from './api/writeTree.js'\nimport * as Errors from './errors/index.js'\n\n// named exports\nexport {\n Errors,\n STAGE,\n TREE,\n WORKDIR,\n add,\n addNote,\n addRemote,\n annotatedTag,\n branch,\n checkout,\n clone,\n commit,\n getConfig,\n getConfigAll,\n setConfig,\n currentBranch,\n deleteBranch,\n deleteRef,\n deleteRemote,\n deleteTag,\n expandOid,\n expandRef,\n fastForward,\n fetch,\n findMergeBase,\n findRoot,\n getRemoteInfo,\n getRemoteInfo2,\n hashBlob,\n indexPack,\n init,\n isDescendent,\n listBranches,\n listFiles,\n listNotes,\n listRemotes,\n listServerRefs,\n listTags,\n log,\n merge,\n packObjects,\n pull,\n push,\n readBlob,\n readCommit,\n readNote,\n readObject,\n readTag,\n readTree,\n remove,\n removeNote,\n renameBranch,\n resetIndex,\n resolveRef,\n status,\n statusMatrix,\n tag,\n version,\n walk,\n writeBlob,\n writeCommit,\n writeObject,\n writeRef,\n writeTag,\n writeTree,\n}\n\n// default export\nexport default {\n Errors,\n STAGE,\n TREE,\n WORKDIR,\n add,\n addNote,\n addRemote,\n annotatedTag,\n branch,\n checkout,\n clone,\n commit,\n getConfig,\n getConfigAll,\n setConfig,\n currentBranch,\n deleteBranch,\n deleteRef,\n deleteRemote,\n deleteTag,\n expandOid,\n expandRef,\n fastForward,\n fetch,\n findMergeBase,\n findRoot,\n getRemoteInfo,\n getRemoteInfo2,\n hashBlob,\n indexPack,\n init,\n isDescendent,\n listBranches,\n listFiles,\n listNotes,\n listRemotes,\n listServerRefs,\n listTags,\n log,\n merge,\n packObjects,\n pull,\n push,\n readBlob,\n readCommit,\n readNote,\n readObject,\n readTag,\n readTree,\n remove,\n removeNote,\n renameBranch,\n resetIndex,\n resolveRef,\n status,\n statusMatrix,\n tag,\n version,\n walk,\n writeBlob,\n writeCommit,\n writeObject,\n writeRef,\n writeTag,\n writeTree,\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/isomorphic-git/node_modules/simple-get/LICENSE b/node_modules/isomorphic-git/node_modules/simple-get/LICENSE deleted file mode 100644 index c7e68527..00000000 --- a/node_modules/isomorphic-git/node_modules/simple-get/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/isomorphic-git/node_modules/simple-get/README.md b/node_modules/isomorphic-git/node_modules/simple-get/README.md deleted file mode 100644 index 0fecf371..00000000 --- a/node_modules/isomorphic-git/node_modules/simple-get/README.md +++ /dev/null @@ -1,319 +0,0 @@ -# simple-get [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/simple-get/master.svg -[travis-url]: https://travis-ci.org/feross/simple-get -[npm-image]: https://img.shields.io/npm/v/simple-get.svg -[npm-url]: https://npmjs.org/package/simple-get -[downloads-image]: https://img.shields.io/npm/dm/simple-get.svg -[downloads-url]: https://npmjs.org/package/simple-get -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -### Simplest way to make http get requests - -## features - -This module is the lightest possible wrapper on top of node.js `http`, but supporting these essential features: - -- follows redirects -- automatically handles gzip/deflate responses -- supports HTTPS -- supports specifying a timeout -- supports convenience `url` key so there's no need to use `url.parse` on the url when specifying options -- composes well with npm packages for features like cookies, proxies, form data, & OAuth - -All this in < 100 lines of code. - -## install - -``` -npm install simple-get -``` - -## usage - -Note, all these examples also work in the browser with [browserify](http://browserify.org/). - -### simple GET request - -Doesn't get easier than this: - -```js -const get = require('simple-get') - -get('http://example.com', function (err, res) { - if (err) throw err - console.log(res.statusCode) // 200 - res.pipe(process.stdout) // `res` is a stream -}) -``` - -### even simpler GET request - -If you just want the data, and don't want to deal with streams: - -```js -const get = require('simple-get') - -get.concat('http://example.com', function (err, res, data) { - if (err) throw err - console.log(res.statusCode) // 200 - console.log(data) // Buffer('this is the server response') -}) -``` - -### POST, PUT, PATCH, HEAD, DELETE support - -For `POST`, call `get.post` or use option `{ method: 'POST' }`. - -```js -const get = require('simple-get') - -const opts = { - url: 'http://example.com', - body: 'this is the POST body' -} -get.post(opts, function (err, res) { - if (err) throw err - res.pipe(process.stdout) // `res` is a stream -}) -``` - -#### A more complex example: - -```js -const get = require('simple-get') - -get({ - url: 'http://example.com', - method: 'POST', - body: 'this is the POST body', - - // simple-get accepts all options that node.js `http` accepts - // See: http://nodejs.org/api/http.html#http_http_request_options_callback - headers: { - 'user-agent': 'my cool app' - } -}, function (err, res) { - if (err) throw err - - // All properties/methods from http.IncomingResponse are available, - // even if a gunzip/inflate transform stream was returned. - // See: http://nodejs.org/api/http.html#http_http_incomingmessage - res.setTimeout(10000) - console.log(res.headers) - - res.on('data', function (chunk) { - // `chunk` is the decoded response, after it's been gunzipped or inflated - // (if applicable) - console.log('got a chunk of the response: ' + chunk) - })) - -}) -``` - -### JSON - -You can serialize/deserialize request and response with JSON: - -```js -const get = require('simple-get') - -const opts = { - method: 'POST', - url: 'http://example.com', - body: { - key: 'value' - }, - json: true -} -get.concat(opts, function (err, res, data) { - if (err) throw err - console.log(data.key) // `data` is an object -}) -``` - -### Timeout - -You can set a timeout (in milliseconds) on the request with the `timeout` option. -If the request takes longer than `timeout` to complete, then the entire request -will fail with an `Error`. - -```js -const get = require('simple-get') - -const opts = { - url: 'http://example.com', - timeout: 2000 // 2 second timeout -} - -get(opts, function (err, res) {}) -``` - -### One Quick Tip - -It's a good idea to set the `'user-agent'` header so the provider can more easily -see how their resource is used. - -```js -const get = require('simple-get') -const pkg = require('./package.json') - -get('http://example.com', { - headers: { - 'user-agent': `my-module/${pkg.version} (https://github.com/username/my-module)` - } -}) -``` - -### Proxies - -You can use the [`tunnel`](https://github.com/koichik/node-tunnel) module with the -`agent` option to work with proxies: - -```js -const get = require('simple-get') -const tunnel = require('tunnel') - -const opts = { - url: 'http://example.com', - agent: tunnel.httpOverHttp({ - proxy: { - host: 'localhost' - } - }) -} - -get(opts, function (err, res) {}) -``` - -### Cookies - -You can use the [`cookie`](https://github.com/jshttp/cookie) module to include -cookies in a request: - -```js -const get = require('simple-get') -const cookie = require('cookie') - -const opts = { - url: 'http://example.com', - headers: { - cookie: cookie.serialize('foo', 'bar') - } -} - -get(opts, function (err, res) {}) -``` - -### Form data - -You can use the [`form-data`](https://github.com/form-data/form-data) module to -create POST request with form data: - -```js -const fs = require('fs') -const get = require('simple-get') -const FormData = require('form-data') -const form = new FormData() - -form.append('my_file', fs.createReadStream('/foo/bar.jpg')) - -const opts = { - url: 'http://example.com', - body: form -} - -get.post(opts, function (err, res) {}) -``` - -#### Or, include `application/x-www-form-urlencoded` form data manually: - -```js -const get = require('simple-get') - -const opts = { - url: 'http://example.com', - form: { - key: 'value' - } -} -get.post(opts, function (err, res) {}) -``` - -### Specifically disallowing redirects - -```js -const get = require('simple-get') - -const opts = { - url: 'http://example.com/will-redirect-elsewhere', - followRedirects: false -} -// res.statusCode will be 301, no error thrown -get(opts, function (err, res) {}) -``` - -### OAuth - -You can use the [`oauth-1.0a`](https://github.com/ddo/oauth-1.0a) module to create -a signed OAuth request: - -```js -const get = require('simple-get') -const crypto = require('crypto') -const OAuth = require('oauth-1.0a') - -const oauth = OAuth({ - consumer: { - key: process.env.CONSUMER_KEY, - secret: process.env.CONSUMER_SECRET - }, - signature_method: 'HMAC-SHA1', - hash_function: (baseString, key) => crypto.createHmac('sha1', key).update(baseString).digest('base64') -}) - -const token = { - key: process.env.ACCESS_TOKEN, - secret: process.env.ACCESS_TOKEN_SECRET -} - -const url = 'https://api.twitter.com/1.1/statuses/home_timeline.json' - -const opts = { - url: url, - headers: oauth.toHeader(oauth.authorize({url, method: 'GET'}, token)), - json: true -} - -get(opts, function (err, res) {}) -``` - -### Throttle requests - -You can use [limiter](https://github.com/jhurliman/node-rate-limiter) to throttle requests. This is useful when calling an API that is rate limited. - -```js -const simpleGet = require('simple-get') -const RateLimiter = require('limiter').RateLimiter -const limiter = new RateLimiter(1, 'second') - -const get = (opts, cb) => limiter.removeTokens(1, () => simpleGet(opts, cb)) -get.concat = (opts, cb) => limiter.removeTokens(1, () => simpleGet.concat(opts, cb)) - -var opts = { - url: 'http://example.com' -} - -get.concat(opts, processResult) -get.concat(opts, processResult) - -function processResult (err, res, data) { - if (err) throw err - console.log(data.toString()) -} -``` - -## license - -MIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org). diff --git a/node_modules/isomorphic-git/node_modules/simple-get/index.js b/node_modules/isomorphic-git/node_modules/simple-get/index.js deleted file mode 100644 index a054837b..00000000 --- a/node_modules/isomorphic-git/node_modules/simple-get/index.js +++ /dev/null @@ -1,99 +0,0 @@ -module.exports = simpleGet - -const concat = require('simple-concat') -const decompressResponse = require('decompress-response') // excluded from browser build -const http = require('http') -const https = require('https') -const once = require('once') -const querystring = require('querystring') -const url = require('url') - -const isStream = o => o !== null && typeof o === 'object' && typeof o.pipe === 'function' - -function simpleGet (opts, cb) { - opts = Object.assign({ maxRedirects: 10 }, typeof opts === 'string' ? { url: opts } : opts) - cb = once(cb) - - if (opts.url) { - const { hostname, port, protocol, auth, path } = url.parse(opts.url) // eslint-disable-line node/no-deprecated-api - delete opts.url - if (!hostname && !port && !protocol && !auth) opts.path = path // Relative redirect - else Object.assign(opts, { hostname, port, protocol, auth, path }) // Absolute redirect - } - - const headers = { 'accept-encoding': 'gzip, deflate' } - if (opts.headers) Object.keys(opts.headers).forEach(k => (headers[k.toLowerCase()] = opts.headers[k])) - opts.headers = headers - - let body - if (opts.body) { - body = opts.json && !isStream(opts.body) ? JSON.stringify(opts.body) : opts.body - } else if (opts.form) { - body = typeof opts.form === 'string' ? opts.form : querystring.stringify(opts.form) - opts.headers['content-type'] = 'application/x-www-form-urlencoded' - } - - if (body) { - if (!opts.method) opts.method = 'POST' - if (!isStream(body)) opts.headers['content-length'] = Buffer.byteLength(body) - if (opts.json && !opts.form) opts.headers['content-type'] = 'application/json' - } - delete opts.body; delete opts.form - - if (opts.json) opts.headers.accept = 'application/json' - if (opts.method) opts.method = opts.method.toUpperCase() - - const protocol = opts.protocol === 'https:' ? https : http // Support http/https urls - const req = protocol.request(opts, res => { - if (opts.followRedirects !== false && res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) { - opts.url = res.headers.location // Follow 3xx redirects - delete opts.headers.host // Discard `host` header on redirect (see #32) - res.resume() // Discard response - - if (opts.method === 'POST' && [301, 302].includes(res.statusCode)) { - opts.method = 'GET' // On 301/302 redirect, change POST to GET (see #35) - delete opts.headers['content-length']; delete opts.headers['content-type'] - } - - if (opts.maxRedirects-- === 0) return cb(new Error('too many redirects')) - else return simpleGet(opts, cb) - } - - const tryUnzip = typeof decompressResponse === 'function' && opts.method !== 'HEAD' - cb(null, tryUnzip ? decompressResponse(res) : res) - }) - req.on('timeout', () => { - req.abort() - cb(new Error('Request timed out')) - }) - req.on('error', cb) - - if (isStream(body)) body.on('error', cb).pipe(req) - else req.end(body) - - return req -} - -simpleGet.concat = (opts, cb) => { - return simpleGet(opts, (err, res) => { - if (err) return cb(err) - concat(res, (err, data) => { - if (err) return cb(err) - if (opts.json) { - try { - data = JSON.parse(data.toString()) - } catch (err) { - return cb(err, res, data) - } - } - cb(null, res, data) - }) - }) -} - -;['get', 'post', 'put', 'patch', 'head', 'delete'].forEach(method => { - simpleGet[method] = (opts, cb) => { - if (typeof opts === 'string') opts = { url: opts } - return simpleGet(Object.assign({ method: method.toUpperCase() }, opts), cb) - } -}) diff --git a/node_modules/isomorphic-git/node_modules/simple-get/package.json b/node_modules/isomorphic-git/node_modules/simple-get/package.json deleted file mode 100644 index 9129f046..00000000 --- a/node_modules/isomorphic-git/node_modules/simple-get/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_from": "simple-get@^3.0.2", - "_id": "simple-get@3.1.0", - "_inBundle": false, - "_integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", - "_location": "/isomorphic-git/simple-get", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "simple-get@^3.0.2", - "name": "simple-get", - "escapedName": "simple-get", - "rawSpec": "^3.0.2", - "saveSpec": null, - "fetchSpec": "^3.0.2" - }, - "_requiredBy": [ - "/isomorphic-git" - ], - "_resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", - "_shasum": "b45be062435e50d159540b576202ceec40b9c6b3", - "_spec": "simple-get@^3.0.2", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/isomorphic-git", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org/" - }, - "browser": { - "decompress-response": false - }, - "bugs": { - "url": "https://github.com/feross/simple-get/issues" - }, - "bundleDependencies": false, - "dependencies": { - "decompress-response": "^4.2.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - }, - "deprecated": false, - "description": "Simplest way to make http get requests. Supports HTTPS, redirects, gzip/deflate, streams in < 100 lines.", - "devDependencies": { - "self-signed-https": "^1.0.5", - "standard": "*", - "string-to-stream": "^3.0.0", - "tape": "^4.0.0" - }, - "homepage": "https://github.com/feross/simple-get", - "keywords": [ - "request", - "http", - "GET", - "get request", - "http.get", - "redirects", - "follow redirects", - "gzip", - "deflate", - "https", - "http-https", - "stream", - "simple request", - "simple get" - ], - "license": "MIT", - "main": "index.js", - "name": "simple-get", - "repository": { - "type": "git", - "url": "git://github.com/feross/simple-get.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "version": "3.1.0" -} diff --git a/node_modules/isomorphic-git/package.json b/node_modules/isomorphic-git/package.json deleted file mode 100644 index 4bcfa4bd..00000000 --- a/node_modules/isomorphic-git/package.json +++ /dev/null @@ -1,187 +0,0 @@ -{ - "_from": "isomorphic-git@~1.8", - "_id": "isomorphic-git@1.8.10", - "_inBundle": false, - "_integrity": "sha512-QRAYMDYSi2gULLsVTT+xxiQ5t5iNSybmLl2pYKNHaPIO/sHLhLrfSKAlOqQohGEFKmcO68ah4j8OwGtvDbI14Q==", - "_location": "/isomorphic-git", - "_phantomChildren": { - "decompress-response": "4.2.1", - "once": "1.4.0", - "simple-concat": "1.0.1" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "isomorphic-git@~1.8", - "name": "isomorphic-git", - "escapedName": "isomorphic-git", - "rawSpec": "~1.8", - "saveSpec": null, - "fetchSpec": "~1.8" - }, - "_requiredBy": [ - "/@antora/content-aggregator" - ], - "_resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.8.10.tgz", - "_shasum": "30d1598f9c9fcfeb73f93734ecee4c4075474d7d", - "_spec": "isomorphic-git@~1.8", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/content-aggregator", - "author": { - "name": "William Hilton", - "email": "wmhilton@gmail.com" - }, - "bin": { - "isogit": "cli.cjs" - }, - "bugs": { - "url": "https://github.com/isomorphic-git/isomorphic-git/issues" - }, - "bundleDependencies": false, - "bundlewatch": { - "files": [ - { - "path": "./index.umd.min.js", - "maxSize": "100kb" - } - ], - "ci": { - "trackBranches": [ - "main" - ] - } - }, - "collective": { - "type": "opencollective", - "url": "https://opencollective.com/isomorphic-git", - "logo": "https://opencollective.com/isomorphic-git/logo.txt" - }, - "dependencies": { - "async-lock": "^1.1.0", - "clean-git-ref": "^2.0.1", - "crc-32": "^1.2.0", - "diff3": "0.0.3", - "ignore": "^5.1.4", - "minimisted": "^2.0.0", - "pako": "^1.0.10", - "pify": "^4.0.1", - "readable-stream": "^3.4.0", - "sha.js": "^2.4.9", - "simple-get": "^3.0.2" - }, - "deprecated": false, - "description": "A pure JavaScript reimplementation of git for node and browsers", - "devDependencies": { - "@babel/core": "7.6.0", - "@babel/plugin-transform-async-to-generator": "7.5.0", - "@babel/preset-env": "7.5.5", - "@babel/runtime": "7.5.5", - "@isomorphic-git/cors-proxy": "2.7.0", - "@isomorphic-git/lightning-fs": "^3.3.0", - "@isomorphic-git/pgp-plugin": "0.0.7", - "@semantic-release/exec": "3.3.6", - "@types/jest": "24.0.18", - "@types/node": "12.7.2", - "@wmhilton/jest-fixtures": "0.6.1", - "agadoo": "2.0.0", - "all-contributors-cli": "6.20.0", - "babel-core": "7.0.0-bridge.0", - "babel-loader": "8.0.6", - "browserfs": "2.0.0", - "bundlewatch": "^0.3.2", - "cross-env": "6.0.0", - "decompress": "^4.2.0", - "diff-lines": "1.1.1", - "duplicate-package-checker-webpack-plugin": "3.0.0", - "envify": "4.1.0", - "eslint": "^6.8.0", - "eslint-config-prettier": "^6.10.0", - "eslint-config-prettier-standard": "^3.0.1", - "eslint-config-standard": "^14.1.0", - "eslint-plugin-import": "^2.20.1", - "eslint-plugin-node": "^11.0.0", - "eslint-plugin-prettier": "^3.1.2", - "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-standard": "^4.0.1", - "git-http-mock-server": "2.0.0", - "github-comment": "1.0.1", - "inquirer": "^7.0.0", - "jasmine-core": "3.4.0", - "jest": "24.9.0", - "jest-junit": "7.0.0", - "jsdoc-api": "5.0.3", - "karma": "2.0.5", - "karma-browserstack-launcher": "^1.5.1", - "karma-chrome-launcher": "3.1.0", - "karma-edge-launcher": "0.4.2", - "karma-fail-fast-reporter": "1.0.5", - "karma-firefox-launcher": "1.2.0", - "karma-ie-launcher": "1.0.0", - "karma-jasmine": "2.0.1", - "karma-junit-reporter": "1.2.0", - "karma-safari-launcher": "1.0.0", - "karma-sauce-launcher": "1.2.0", - "karma-verbose-reporter": "0.0.6", - "karma-webpack": "4.0.2", - "markdown-table": "1.1.3", - "nps": "^5.10.0", - "nps-utils": "1.7.0", - "prettier": "1.19.1", - "prettier-config-standard": "^1.0.1", - "pretty-format": "24.9.0", - "puppeteer": "2.0.0", - "replace-in-file": "4.1.3", - "rollup": "1.29.1", - "rollup-plugin-node-resolve": "5.2.0", - "semantic-release": "16.0.3", - "standard": "13.1.0", - "timeout-cli": "0.3.2", - "tweet-tweet": "1.0.4", - "typescript": "3.9.0-dev.20200223", - "webpack": "4.41.5", - "webpack-bundle-analyzer": "3.4.1", - "webpack-cli": "3.3.7" - }, - "engines": { - "node": ">=10" - }, - "files": [ - "cli.cjs", - "browser-tests.json", - "http/*", - "index.cjs", - "index.d.ts", - "index.js", - "index.umd.min.js", - "index.umd.min.d.ts", - "index.umd.min.js.map", - "size_report.html" - ], - "homepage": "https://isomorphic-git.org/", - "keywords": [ - "git", - "isomorphic" - ], - "license": "MIT", - "main": "./index.cjs", - "module": "./index.js", - "name": "isomorphic-git", - "repository": { - "type": "git", - "url": "git+https://github.com/isomorphic-git/isomorphic-git.git" - }, - "scripts": { - "add-contributor": "nps contributors.add", - "build": "nps build", - "format": "nps format", - "prepublishOnly": "nps prepublish", - "publish-website": "nps website", - "semantic-release": "semantic-release", - "start": "nps", - "test": "nps test" - }, - "sideEffects": false, - "type": "module", - "typings": "./index.d.ts", - "unpkg": "./index.umd.min.js", - "version": "1.8.10" -} diff --git a/node_modules/isomorphic-git/size_report.html b/node_modules/isomorphic-git/size_report.html deleted file mode 100644 index 65e9f5b4..00000000 --- a/node_modules/isomorphic-git/size_report.html +++ /dev/null @@ -1,64 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="UTF-8"/> - <meta name="viewport" content="width=device-width, initial-scale=1"/> - <title>Webpack Bundle Analyzer - - - - - - - - - -
    - - - diff --git a/node_modules/jmespath/.eslintrc b/node_modules/jmespath/.eslintrc deleted file mode 100644 index 93c71901..00000000 --- a/node_modules/jmespath/.eslintrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "env": { - "browser": true, - "node": true - }, - "globals": { - "toString": true, - "hasOwnProperty": true - } -} diff --git a/node_modules/jmespath/.npmignore b/node_modules/jmespath/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/jmespath/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/jmespath/.travis.yml b/node_modules/jmespath/.travis.yml deleted file mode 100644 index 97bcceab..00000000 --- a/node_modules/jmespath/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.12" - - "0.11" - - "0.10" - - "iojs" diff --git a/node_modules/jmespath/BASELINE b/node_modules/jmespath/BASELINE deleted file mode 100644 index ff799737..00000000 --- a/node_modules/jmespath/BASELINE +++ /dev/null @@ -1,15 +0,0 @@ -master: - -Mean time: 0.002530msec Parser#single_expr x 395,306 ops/sec ±1.89% (79 runs sampled) -Mean time: 0.005492msec Parser#single_subexpr x 182,084 ops/sec ±1.99% (84 runs sampled) -Mean time: 0.126803msec Parser#deeply_nested_50 x 7,886 ops/sec ±2.44% (80 runs sampled) -Mean time: 0.166790msec Parser#deeply_nested_50_index x 5,996 ops/sec ±5.08% (75 runs sampled) -Mean time: 0.008347msec Parser#basic_list_projection x 119,798 ops/sec ±2.33% (79 runs sampled) - - - -Mean time: 0.002779msec Parser#single_expr x 359,839 ops/sec ±4.15% (80 runs sampled) -Mean time: 0.005235msec Parser#single_subexpr x 191,026 ops/sec ±2.62% (78 runs sampled) -Mean time: 0.104357msec Parser#deeply_nested_50 x 9,582 ops/sec ±4.34% (72 runs sampled) -Mean time: 0.178837msec Parser#deeply_nested_50_index x 5,592 ops/sec ±3.35% (77 runs sampled) -Mean time: 0.009614msec Parser#basic_list_projection x 104,012 ops/sec ±2.97% (79 runs sampled) diff --git a/node_modules/jmespath/Gruntfile.js b/node_modules/jmespath/Gruntfile.js deleted file mode 100644 index 614a61b7..00000000 --- a/node_modules/jmespath/Gruntfile.js +++ /dev/null @@ -1,36 +0,0 @@ -module.exports = function(grunt) { - - // Project configuration. - grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - uglify: { - options: { - banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n', - mangleProperties: {regex: /^_/} - }, - build: { - src: '<%= pkg.name %>.js', - dest: 'artifacts/<%= pkg.name %>.min.js' - } - }, - jshint: { - ignore_warning: { - options: { - '-W083': true - }, - src: ['jmespath.js', 'test/*.js', 'Gruntfile.js'] - } - }, - eslint: { - target: ['jmespath.js'] - } - }); - - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-eslint'); - - // Default task(s). - grunt.registerTask('default', ['uglify', 'jshint', 'eslint']); - -}; diff --git a/node_modules/jmespath/LICENSE b/node_modules/jmespath/LICENSE deleted file mode 100644 index c1d496ba..00000000 --- a/node_modules/jmespath/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2014 James Saryerwinnie - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/node_modules/jmespath/README.md b/node_modules/jmespath/README.md deleted file mode 100644 index b1110c2b..00000000 --- a/node_modules/jmespath/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# jmespath.js - -[![Build Status](https://travis-ci.org/jmespath/jmespath.js.png?branch=master)](https://travis-ci.org/jmespath/jmespath.js) - -jmespath.js is a javascript implementation of JMESPath, -which is a query language for JSON. It will take a JSON -document and transform it into another JSON document -through a JMESPath expression. - -Using jmespath.js is really easy. There's a single function -you use, `jmespath.search`: - - -``` -> var jmespath = require('jmespath'); -> jmespath.search({foo: {bar: {baz: [0, 1, 2, 3, 4]}}}, "foo.bar.baz[2]") -2 -``` - -In the example we gave the ``search`` function input data of -`{foo: {bar: {baz: [0, 1, 2, 3, 4]}}}` as well as the JMESPath -expression `foo.bar.baz[2]`, and the `search` function evaluated -the expression against the input data to produce the result ``2``. - -The JMESPath language can do a lot more than select an element -from a list. Here are a few more examples: - -``` -> jmespath.search({foo: {bar: {baz: [0, 1, 2, 3, 4]}}}, "foo.bar") -{ baz: [ 0, 1, 2, 3, 4 ] } - -> jmespath.search({"foo": [{"first": "a", "last": "b"}, - {"first": "c", "last": "d"}]}, - "foo[*].first") -[ 'a', 'c' ] - -> jmespath.search({"foo": [{"age": 20}, {"age": 25}, - {"age": 30}, {"age": 35}, - {"age": 40}]}, - "foo[?age > `30`]") -[ { age: 35 }, { age: 40 } ] -``` - -## More Resources - -The example above only show a small amount of what -a JMESPath expression can do. If you want to take a -tour of the language, the *best* place to go is the -[JMESPath Tutorial](http://jmespath.org/tutorial.html). - -One of the best things about JMESPath is that it is -implemented in many different programming languages including -python, ruby, php, lua, etc. To see a complete list of libraries, -check out the [JMESPath libraries page](http://jmespath.org/libraries.html). - -And finally, the full JMESPath specification can be found -on the [JMESPath site](http://jmespath.org/specification.html). diff --git a/node_modules/jmespath/artifacts/jmespath.min.js b/node_modules/jmespath/artifacts/jmespath.min.js deleted file mode 100644 index ae76a6df..00000000 --- a/node_modules/jmespath/artifacts/jmespath.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jmespath 2016-03-22 */ -!function(a){"use strict";function b(a){return null!==a?"[object Array]"===Object.prototype.toString.call(a):!1}function c(a){return null!==a?"[object Object]"===Object.prototype.toString.call(a):!1}function d(a,e){if(a===e)return!0;var f=Object.prototype.toString.call(a);if(f!==Object.prototype.toString.call(e))return!1;if(b(a)===!0){if(a.length!==e.length)return!1;for(var g=0;g="a"&&"z">=a||a>="A"&&"Z">=a||"_"===a}function h(a){return a>="0"&&"9">=a||"-"===a}function i(a){return a>="a"&&"z">=a||a>="A"&&"Z">=a||a>="0"&&"9">=a||"_"===a}function j(){}function k(){}function l(a){this.runtime=a}function m(a){this.a=a,this.functionTable={abs:{b:this.c,d:[{types:[r]}]},avg:{b:this.e,d:[{types:[z]}]},ceil:{b:this.f,d:[{types:[r]}]},contains:{b:this.g,d:[{types:[t,u]},{types:[s]}]},ends_with:{b:this.h,d:[{types:[t]},{types:[t]}]},floor:{b:this.i,d:[{types:[r]}]},length:{b:this.j,d:[{types:[t,u,v]}]},map:{b:this.k,d:[{types:[x]},{types:[u]}]},max:{b:this.l,d:[{types:[z,A]}]},merge:{b:this.m,d:[{types:[v],variadic:!0}]},max_by:{b:this.n,d:[{types:[u]},{types:[x]}]},sum:{b:this.o,d:[{types:[z]}]},starts_with:{b:this.p,d:[{types:[t]},{types:[t]}]},min:{b:this.q,d:[{types:[z,A]}]},min_by:{b:this.r,d:[{types:[u]},{types:[x]}]},type:{b:this.s,d:[{types:[s]}]},keys:{b:this.t,d:[{types:[v]}]},values:{b:this.u,d:[{types:[v]}]},sort:{b:this.v,d:[{types:[A,z]}]},sort_by:{b:this.w,d:[{types:[u]},{types:[x]}]},join:{b:this.x,d:[{types:[t]},{types:[A]}]},reverse:{b:this.y,d:[{types:[t,u]}]},to_array:{b:this.z,d:[{types:[s]}]},to_string:{b:this.A,d:[{types:[s]}]},to_number:{b:this.B,d:[{types:[s]}]},not_null:{b:this.C,d:[{types:[s],variadic:!0}]}}}function n(a){var b=new k,c=b.parse(a);return c}function o(a){var b=new j;return b.tokenize(a)}function p(a,b){var c=new k,d=new m,e=new l(d);d.a=e;var f=c.parse(b);return e.search(f,a)}var q;q="function"==typeof String.prototype.trimLeft?function(a){return a.trimLeft()}:function(a){return a.match(/^\s*(.*)/)[1]};var r=0,s=1,t=2,u=3,v=4,w=5,x=6,y=7,z=8,A=9,B="EOF",C="UnquotedIdentifier",D="QuotedIdentifier",E="Rbracket",F="Rparen",G="Comma",H="Colon",I="Rbrace",J="Number",K="Current",L="Expref",M="Pipe",N="Or",O="And",P="EQ",Q="GT",R="LT",S="GTE",T="LTE",U="NE",V="Flatten",W="Star",X="Filter",Y="Dot",Z="Not",$="Lbrace",_="Lbracket",aa="Lparen",ba="Literal",ca={".":Y,"*":W,",":G,":":H,"{":$,"}":I,"]":E,"(":aa,")":F,"@":K},da={"<":!0,">":!0,"=":!0,"!":!0},ea={" ":!0," ":!0,"\n":!0};j.prototype={tokenize:function(a){var b=[];this.D=0;for(var c,d,e;this.D"===c?"="===a[this.D]?(this.D++,{type:S,value:">=",start:b}):{type:Q,value:">",start:b}:"="===c&&"="===a[this.D]?(this.D++,{type:P,value:"==",start:b}):void 0},J:function(a){this.D++;for(var b,c=this.D,d=a.length;"`"!==a[this.D]&&this.D=0)return!0;if(c.indexOf(a)>=0)return!0;if(!(d.indexOf(a[0])>=0))return!1;try{return JSON.parse(a),!0}catch(e){return!1}}};var fa={};fa[B]=0,fa[C]=0,fa[D]=0,fa[E]=0,fa[F]=0,fa[G]=0,fa[I]=0,fa[J]=0,fa[K]=0,fa[L]=0,fa[M]=1,fa[N]=2,fa[O]=3,fa[P]=5,fa[Q]=5,fa[R]=5,fa[S]=5,fa[T]=5,fa[U]=5,fa[V]=9,fa[W]=20,fa[X]=21,fa[Y]=40,fa[Z]=45,fa[$]=50,fa[_]=55,fa[aa]=60,k.prototype={parse:function(a){this.M(a),this.index=0;var b=this.expression(0);if(this.N(0)!==B){var c=this.O(0),d=new Error("Unexpected token type: "+c.type+", value: "+c.value);throw d.name="ParserError",d}return b},M:function(a){var b=new j,c=b.tokenize(a);c.push({type:B,value:"",start:a.length}),this.tokens=c},expression:function(a){var b=this.O(0);this.P();for(var c=this.nud(b),d=this.N(0);ab;){if(c===H)b++,this.P();else{if(c!==J){var d=this.N(0),e=new Error("Syntax error, unexpected token: "+d.value+"("+d.type+")");throw e.name="Parsererror",e}a[b]=this.O(0).value,this.P()}c=this.N(0)}return this.V(E),{type:"Slice",children:a}},Y:function(a,b){var c=this.expression(fa[b]);return{type:"Comparator",name:b,children:[a,c]}},X:function(a){var b=this.N(0),c=[C,D,W];return c.indexOf(b)>=0?this.expression(a):b===_?(this.V(_),this.U()):b===$?(this.V($),this.R()):void 0},Q:function(a){var b;if(fa[this.N(0)]<10)b={type:"Identity"};else if(this.N(0)===_)b=this.expression(a);else if(this.N(0)===X)b=this.expression(a);else{if(this.N(0)!==Y){var c=this.O(0),d=new Error("Sytanx error, unexpected token: "+c.value+"("+c.type+")");throw d.name="ParserError",d}this.V(Y),b=this.X(a)}return b},U:function(){for(var a=[];this.N(0)!==E;){var b=this.expression(0);if(a.push(b),this.N(0)===G&&(this.V(G),this.N(0)===E))throw new Error("Unexpected token Rbracket")}return this.V(E),{type:"MultiSelectList",children:a}},R:function(){for(var a,b,c,d,e=[],f=[C,D];;){if(a=this.O(0),f.indexOf(a.type)<0)throw new Error("Expecting an identifier token, got: "+a.type);if(b=a.value,this.P(),this.V(H),c=this.expression(0),d={type:"KeyValuePair",name:b,value:c},e.push(d),this.N(0)===G)this.V(G);else if(this.N(0)===I){this.V(I);break}}return{type:"MultiSelectHash",children:e}}},l.prototype={search:function(a,b){return this.visit(a,b)},visit:function(a,g){var h,i,j,k,l,m,n,o,p,q;switch(a.type){case"Field":return null===g?null:c(g)?(m=g[a.name],void 0===m?null:m):null;case"Subexpression":for(j=this.visit(a.children[0],g),q=1;qr&&(r=g.length+r),j=g[r],void 0===j&&(j=null),j;case"Slice":if(!b(g))return null;var s=a.children.slice(0),t=this.computeSliceParams(g.length,s),u=t[0],v=t[1],w=t[2];if(j=[],w>0)for(q=u;v>q;q+=w)j.push(g[q]);else for(q=u;q>v;q+=w)j.push(g[q]);return j;case"Projection":var x=this.visit(a.children[0],g);if(!b(x))return null;for(p=[],q=0;ql;break;case S:j=k>=l;break;case R:j=l>k;break;case T:j=l>=k;break;default:throw new Error("Unknown comparator: "+a.name)}return j;case V:var C=this.visit(a.children[0],g);if(!b(C))return null;var D=[];for(q=0;qe?!0:!1;return c=null===c?h?a-1:0:this.capSliceRange(a,c,e),d=null===d?h?-1:a:this.capSliceRange(a,d,e),f[0]=c,f[1]=d,f[2]=e,f},capSliceRange:function(a,b,c){return 0>b?(b+=a,0>b&&(b=0>c?-1:0)):b>=a&&(b=0>c?a-1:a),b}},m.prototype={callFunction:function(a,b){var c=this.functionTable[a];if(void 0===c)throw new Error("Unknown function: "+a+"()");return this.$(a,b,c.d),c.b.call(this,b)},$:function(a,b,c){var d;if(c[c.length-1].variadic){if(b.length=0;e--)d+=c[e];return d}var f=a[0].slice(0);return f.reverse(),f},c:function(a){return Math.abs(a[0])},f:function(a){return Math.ceil(a[0])},e:function(a){for(var b=0,c=a[0],d=0;d=0},i:function(a){return Math.floor(a[0])},j:function(a){return c(a[0])?Object.keys(a[0]).length:a[0].length},k:function(a){for(var b=[],c=this.a,d=a[0],e=a[1],f=0;f0){var b=this._(a[0][0]);if(b===r)return Math.max.apply(Math,a[0]);for(var c=a[0],d=c[0],e=1;e0){var b=this._(a[0][0]);if(b===r)return Math.min.apply(Math,a[0]);for(var c=a[0],d=c[0],e=1;eh?1:h>g?-1:a[0]-b[0]});for(var i=0;ig&&(g=c,b=e[h]);return b},r:function(a){for(var b,c,d=a[1],e=a[0],f=this.createKeyFunction(d,[r,t]),g=1/0,h=0;hc&&(g=c,b=e[h]);return b},createKeyFunction:function(a,b){var c=this,d=this.a,e=function(e){var f=d.visit(a,e);if(b.indexOf(c._(f))<0){var g="TypeError: expected one of "+b+", received "+c._(f);throw new Error(g)}return f};return e}},a.tokenize=o,a.compile=n,a.search=p,a.strictDeepEqual=d}("undefined"==typeof exports?this.jmespath={}:exports); \ No newline at end of file diff --git a/node_modules/jmespath/bower.json b/node_modules/jmespath/bower.json deleted file mode 100644 index f0f626c0..00000000 --- a/node_modules/jmespath/bower.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "jmespath.js", - "main": "jmespath.js", - "version": "0.11.0", - "homepage": "https://github.com/jmespath/jmespath.js", - "authors": [ - "James Saryerwinnie " - ], - "description": "JMESPath implementation in javascript", - "moduleType": [ - "node" - ], - "keywords": [ - "jmespath" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ] -} diff --git a/node_modules/jmespath/g.sh b/node_modules/jmespath/g.sh deleted file mode 100755 index 53580003..00000000 --- a/node_modules/jmespath/g.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -grunt -uglifyjs artifacts/jmespath.min.js -b -o /tmp/jmespath.min.js -uglifyjs artifacts/jmespath.min.js -b -o ~/Source/jmespath.site/docs/_build/html/_static/js/jmespath.min.js -#cp artifacts/jmespath.min.js ~/Source/jmespath.site/docs/_build/html/_static/js/ diff --git a/node_modules/jmespath/index.html b/node_modules/jmespath/index.html deleted file mode 100644 index 5806e1e4..00000000 --- a/node_modules/jmespath/index.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - JMESPath Demo - - - - - -
    -
    -

    JSONPath Online Evaluator

    -
    -

    Author: Kazuki Hamasaki [ashphy@ashphy.com]

    -

    This evaluator uses JSONPath - XPath for JSON

    -
    -
    -
    -
    -

    Inputs

    -
    - - - Example '$.phoneNumbers[*].type' See also JSONPath expressions - - -
    -
    -
    -

    Evaluation Results

    -
    false
    -
    -
    -
    - - - - - - - - - - - - diff --git a/node_modules/jmespath/james.html b/node_modules/jmespath/james.html deleted file mode 100644 index be8d3ab9..00000000 --- a/node_modules/jmespath/james.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/node_modules/jmespath/jmespath.js b/node_modules/jmespath/jmespath.js deleted file mode 100644 index f59e8e4b..00000000 --- a/node_modules/jmespath/jmespath.js +++ /dev/null @@ -1,1667 +0,0 @@ -(function(exports) { - "use strict"; - - function isArray(obj) { - if (obj !== null) { - return Object.prototype.toString.call(obj) === "[object Array]"; - } else { - return false; - } - } - - function isObject(obj) { - if (obj !== null) { - return Object.prototype.toString.call(obj) === "[object Object]"; - } else { - return false; - } - } - - function strictDeepEqual(first, second) { - // Check the scalar case first. - if (first === second) { - return true; - } - - // Check if they are the same type. - var firstType = Object.prototype.toString.call(first); - if (firstType !== Object.prototype.toString.call(second)) { - return false; - } - // We know that first and second have the same type so we can just check the - // first type from now on. - if (isArray(first) === true) { - // Short circuit if they're not the same length; - if (first.length !== second.length) { - return false; - } - for (var i = 0; i < first.length; i++) { - if (strictDeepEqual(first[i], second[i]) === false) { - return false; - } - } - return true; - } - if (isObject(first) === true) { - // An object is equal if it has the same key/value pairs. - var keysSeen = {}; - for (var key in first) { - if (hasOwnProperty.call(first, key)) { - if (strictDeepEqual(first[key], second[key]) === false) { - return false; - } - keysSeen[key] = true; - } - } - // Now check that there aren't any keys in second that weren't - // in first. - for (var key2 in second) { - if (hasOwnProperty.call(second, key2)) { - if (keysSeen[key2] !== true) { - return false; - } - } - } - return true; - } - return false; - } - - function isFalse(obj) { - // From the spec: - // A false value corresponds to the following values: - // Empty list - // Empty object - // Empty string - // False boolean - // null value - - // First check the scalar values. - if (obj === "" || obj === false || obj === null) { - return true; - } else if (isArray(obj) && obj.length === 0) { - // Check for an empty array. - return true; - } else if (isObject(obj)) { - // Check for an empty object. - for (var key in obj) { - // If there are any keys, then - // the object is not empty so the object - // is not false. - if (obj.hasOwnProperty(key)) { - return false; - } - } - return true; - } else { - return false; - } - } - - function objValues(obj) { - var keys = Object.keys(obj); - var values = []; - for (var i = 0; i < keys.length; i++) { - values.push(obj[keys[i]]); - } - return values; - } - - function merge(a, b) { - var merged = {}; - for (var key in a) { - merged[key] = a[key]; - } - for (var key2 in b) { - merged[key2] = b[key2]; - } - return merged; - } - - var trimLeft; - if (typeof String.prototype.trimLeft === "function") { - trimLeft = function(str) { - return str.trimLeft(); - }; - } else { - trimLeft = function(str) { - return str.match(/^\s*(.*)/)[1]; - }; - } - - // Type constants used to define functions. - var TYPE_NUMBER = 0; - var TYPE_ANY = 1; - var TYPE_STRING = 2; - var TYPE_ARRAY = 3; - var TYPE_OBJECT = 4; - var TYPE_BOOLEAN = 5; - var TYPE_EXPREF = 6; - var TYPE_NULL = 7; - var TYPE_ARRAY_NUMBER = 8; - var TYPE_ARRAY_STRING = 9; - - var TOK_EOF = "EOF"; - var TOK_UNQUOTEDIDENTIFIER = "UnquotedIdentifier"; - var TOK_QUOTEDIDENTIFIER = "QuotedIdentifier"; - var TOK_RBRACKET = "Rbracket"; - var TOK_RPAREN = "Rparen"; - var TOK_COMMA = "Comma"; - var TOK_COLON = "Colon"; - var TOK_RBRACE = "Rbrace"; - var TOK_NUMBER = "Number"; - var TOK_CURRENT = "Current"; - var TOK_EXPREF = "Expref"; - var TOK_PIPE = "Pipe"; - var TOK_OR = "Or"; - var TOK_AND = "And"; - var TOK_EQ = "EQ"; - var TOK_GT = "GT"; - var TOK_LT = "LT"; - var TOK_GTE = "GTE"; - var TOK_LTE = "LTE"; - var TOK_NE = "NE"; - var TOK_FLATTEN = "Flatten"; - var TOK_STAR = "Star"; - var TOK_FILTER = "Filter"; - var TOK_DOT = "Dot"; - var TOK_NOT = "Not"; - var TOK_LBRACE = "Lbrace"; - var TOK_LBRACKET = "Lbracket"; - var TOK_LPAREN= "Lparen"; - var TOK_LITERAL= "Literal"; - - // The "&", "[", "<", ">" tokens - // are not in basicToken because - // there are two token variants - // ("&&", "[?", "<=", ">="). This is specially handled - // below. - - var basicTokens = { - ".": TOK_DOT, - "*": TOK_STAR, - ",": TOK_COMMA, - ":": TOK_COLON, - "{": TOK_LBRACE, - "}": TOK_RBRACE, - "]": TOK_RBRACKET, - "(": TOK_LPAREN, - ")": TOK_RPAREN, - "@": TOK_CURRENT - }; - - var operatorStartToken = { - "<": true, - ">": true, - "=": true, - "!": true - }; - - var skipChars = { - " ": true, - "\t": true, - "\n": true - }; - - - function isAlpha(ch) { - return (ch >= "a" && ch <= "z") || - (ch >= "A" && ch <= "Z") || - ch === "_"; - } - - function isNum(ch) { - return (ch >= "0" && ch <= "9") || - ch === "-"; - } - function isAlphaNum(ch) { - return (ch >= "a" && ch <= "z") || - (ch >= "A" && ch <= "Z") || - (ch >= "0" && ch <= "9") || - ch === "_"; - } - - function Lexer() { - } - Lexer.prototype = { - tokenize: function(stream) { - var tokens = []; - this._current = 0; - var start; - var identifier; - var token; - while (this._current < stream.length) { - if (isAlpha(stream[this._current])) { - start = this._current; - identifier = this._consumeUnquotedIdentifier(stream); - tokens.push({type: TOK_UNQUOTEDIDENTIFIER, - value: identifier, - start: start}); - } else if (basicTokens[stream[this._current]] !== undefined) { - tokens.push({type: basicTokens[stream[this._current]], - value: stream[this._current], - start: this._current}); - this._current++; - } else if (isNum(stream[this._current])) { - token = this._consumeNumber(stream); - tokens.push(token); - } else if (stream[this._current] === "[") { - // No need to increment this._current. This happens - // in _consumeLBracket - token = this._consumeLBracket(stream); - tokens.push(token); - } else if (stream[this._current] === "\"") { - start = this._current; - identifier = this._consumeQuotedIdentifier(stream); - tokens.push({type: TOK_QUOTEDIDENTIFIER, - value: identifier, - start: start}); - } else if (stream[this._current] === "'") { - start = this._current; - identifier = this._consumeRawStringLiteral(stream); - tokens.push({type: TOK_LITERAL, - value: identifier, - start: start}); - } else if (stream[this._current] === "`") { - start = this._current; - var literal = this._consumeLiteral(stream); - tokens.push({type: TOK_LITERAL, - value: literal, - start: start}); - } else if (operatorStartToken[stream[this._current]] !== undefined) { - tokens.push(this._consumeOperator(stream)); - } else if (skipChars[stream[this._current]] !== undefined) { - // Ignore whitespace. - this._current++; - } else if (stream[this._current] === "&") { - start = this._current; - this._current++; - if (stream[this._current] === "&") { - this._current++; - tokens.push({type: TOK_AND, value: "&&", start: start}); - } else { - tokens.push({type: TOK_EXPREF, value: "&", start: start}); - } - } else if (stream[this._current] === "|") { - start = this._current; - this._current++; - if (stream[this._current] === "|") { - this._current++; - tokens.push({type: TOK_OR, value: "||", start: start}); - } else { - tokens.push({type: TOK_PIPE, value: "|", start: start}); - } - } else { - var error = new Error("Unknown character:" + stream[this._current]); - error.name = "LexerError"; - throw error; - } - } - return tokens; - }, - - _consumeUnquotedIdentifier: function(stream) { - var start = this._current; - this._current++; - while (this._current < stream.length && isAlphaNum(stream[this._current])) { - this._current++; - } - return stream.slice(start, this._current); - }, - - _consumeQuotedIdentifier: function(stream) { - var start = this._current; - this._current++; - var maxLength = stream.length; - while (stream[this._current] !== "\"" && this._current < maxLength) { - // You can escape a double quote and you can escape an escape. - var current = this._current; - if (stream[current] === "\\" && (stream[current + 1] === "\\" || - stream[current + 1] === "\"")) { - current += 2; - } else { - current++; - } - this._current = current; - } - this._current++; - return JSON.parse(stream.slice(start, this._current)); - }, - - _consumeRawStringLiteral: function(stream) { - var start = this._current; - this._current++; - var maxLength = stream.length; - while (stream[this._current] !== "'" && this._current < maxLength) { - // You can escape a single quote and you can escape an escape. - var current = this._current; - if (stream[current] === "\\" && (stream[current + 1] === "\\" || - stream[current + 1] === "'")) { - current += 2; - } else { - current++; - } - this._current = current; - } - this._current++; - var literal = stream.slice(start + 1, this._current - 1); - return literal.replace("\\'", "'"); - }, - - _consumeNumber: function(stream) { - var start = this._current; - this._current++; - var maxLength = stream.length; - while (isNum(stream[this._current]) && this._current < maxLength) { - this._current++; - } - var value = parseInt(stream.slice(start, this._current)); - return {type: TOK_NUMBER, value: value, start: start}; - }, - - _consumeLBracket: function(stream) { - var start = this._current; - this._current++; - if (stream[this._current] === "?") { - this._current++; - return {type: TOK_FILTER, value: "[?", start: start}; - } else if (stream[this._current] === "]") { - this._current++; - return {type: TOK_FLATTEN, value: "[]", start: start}; - } else { - return {type: TOK_LBRACKET, value: "[", start: start}; - } - }, - - _consumeOperator: function(stream) { - var start = this._current; - var startingChar = stream[start]; - this._current++; - if (startingChar === "!") { - if (stream[this._current] === "=") { - this._current++; - return {type: TOK_NE, value: "!=", start: start}; - } else { - return {type: TOK_NOT, value: "!", start: start}; - } - } else if (startingChar === "<") { - if (stream[this._current] === "=") { - this._current++; - return {type: TOK_LTE, value: "<=", start: start}; - } else { - return {type: TOK_LT, value: "<", start: start}; - } - } else if (startingChar === ">") { - if (stream[this._current] === "=") { - this._current++; - return {type: TOK_GTE, value: ">=", start: start}; - } else { - return {type: TOK_GT, value: ">", start: start}; - } - } else if (startingChar === "=") { - if (stream[this._current] === "=") { - this._current++; - return {type: TOK_EQ, value: "==", start: start}; - } - } - }, - - _consumeLiteral: function(stream) { - this._current++; - var start = this._current; - var maxLength = stream.length; - var literal; - while(stream[this._current] !== "`" && this._current < maxLength) { - // You can escape a literal char or you can escape the escape. - var current = this._current; - if (stream[current] === "\\" && (stream[current + 1] === "\\" || - stream[current + 1] === "`")) { - current += 2; - } else { - current++; - } - this._current = current; - } - var literalString = trimLeft(stream.slice(start, this._current)); - literalString = literalString.replace("\\`", "`"); - if (this._looksLikeJSON(literalString)) { - literal = JSON.parse(literalString); - } else { - // Try to JSON parse it as "" - literal = JSON.parse("\"" + literalString + "\""); - } - // +1 gets us to the ending "`", +1 to move on to the next char. - this._current++; - return literal; - }, - - _looksLikeJSON: function(literalString) { - var startingChars = "[{\""; - var jsonLiterals = ["true", "false", "null"]; - var numberLooking = "-0123456789"; - - if (literalString === "") { - return false; - } else if (startingChars.indexOf(literalString[0]) >= 0) { - return true; - } else if (jsonLiterals.indexOf(literalString) >= 0) { - return true; - } else if (numberLooking.indexOf(literalString[0]) >= 0) { - try { - JSON.parse(literalString); - return true; - } catch (ex) { - return false; - } - } else { - return false; - } - } - }; - - var bindingPower = {}; - bindingPower[TOK_EOF] = 0; - bindingPower[TOK_UNQUOTEDIDENTIFIER] = 0; - bindingPower[TOK_QUOTEDIDENTIFIER] = 0; - bindingPower[TOK_RBRACKET] = 0; - bindingPower[TOK_RPAREN] = 0; - bindingPower[TOK_COMMA] = 0; - bindingPower[TOK_RBRACE] = 0; - bindingPower[TOK_NUMBER] = 0; - bindingPower[TOK_CURRENT] = 0; - bindingPower[TOK_EXPREF] = 0; - bindingPower[TOK_PIPE] = 1; - bindingPower[TOK_OR] = 2; - bindingPower[TOK_AND] = 3; - bindingPower[TOK_EQ] = 5; - bindingPower[TOK_GT] = 5; - bindingPower[TOK_LT] = 5; - bindingPower[TOK_GTE] = 5; - bindingPower[TOK_LTE] = 5; - bindingPower[TOK_NE] = 5; - bindingPower[TOK_FLATTEN] = 9; - bindingPower[TOK_STAR] = 20; - bindingPower[TOK_FILTER] = 21; - bindingPower[TOK_DOT] = 40; - bindingPower[TOK_NOT] = 45; - bindingPower[TOK_LBRACE] = 50; - bindingPower[TOK_LBRACKET] = 55; - bindingPower[TOK_LPAREN] = 60; - - function Parser() { - } - - Parser.prototype = { - parse: function(expression) { - this._loadTokens(expression); - this.index = 0; - var ast = this.expression(0); - if (this._lookahead(0) !== TOK_EOF) { - var t = this._lookaheadToken(0); - var error = new Error( - "Unexpected token type: " + t.type + ", value: " + t.value); - error.name = "ParserError"; - throw error; - } - return ast; - }, - - _loadTokens: function(expression) { - var lexer = new Lexer(); - var tokens = lexer.tokenize(expression); - tokens.push({type: TOK_EOF, value: "", start: expression.length}); - this.tokens = tokens; - }, - - expression: function(rbp) { - var leftToken = this._lookaheadToken(0); - this._advance(); - var left = this.nud(leftToken); - var currentToken = this._lookahead(0); - while (rbp < bindingPower[currentToken]) { - this._advance(); - left = this.led(currentToken, left); - currentToken = this._lookahead(0); - } - return left; - }, - - _lookahead: function(number) { - return this.tokens[this.index + number].type; - }, - - _lookaheadToken: function(number) { - return this.tokens[this.index + number]; - }, - - _advance: function() { - this.index++; - }, - - nud: function(token) { - var left; - var right; - var expression; - switch (token.type) { - case TOK_LITERAL: - return {type: "Literal", value: token.value}; - case TOK_UNQUOTEDIDENTIFIER: - return {type: "Field", name: token.value}; - case TOK_QUOTEDIDENTIFIER: - var node = {type: "Field", name: token.value}; - if (this._lookahead(0) === TOK_LPAREN) { - throw new Error("Quoted identifier not allowed for function names."); - } else { - return node; - } - break; - case TOK_NOT: - right = this.expression(bindingPower.Not); - return {type: "NotExpression", children: [right]}; - case TOK_STAR: - left = {type: "Identity"}; - right = null; - if (this._lookahead(0) === TOK_RBRACKET) { - // This can happen in a multiselect, - // [a, b, *] - right = {type: "Identity"}; - } else { - right = this._parseProjectionRHS(bindingPower.Star); - } - return {type: "ValueProjection", children: [left, right]}; - case TOK_FILTER: - return this.led(token.type, {type: "Identity"}); - case TOK_LBRACE: - return this._parseMultiselectHash(); - case TOK_FLATTEN: - left = {type: TOK_FLATTEN, children: [{type: "Identity"}]}; - right = this._parseProjectionRHS(bindingPower.Flatten); - return {type: "Projection", children: [left, right]}; - case TOK_LBRACKET: - if (this._lookahead(0) === TOK_NUMBER || this._lookahead(0) === TOK_COLON) { - right = this._parseIndexExpression(); - return this._projectIfSlice({type: "Identity"}, right); - } else if (this._lookahead(0) === TOK_STAR && - this._lookahead(1) === TOK_RBRACKET) { - this._advance(); - this._advance(); - right = this._parseProjectionRHS(bindingPower.Star); - return {type: "Projection", - children: [{type: "Identity"}, right]}; - } else { - return this._parseMultiselectList(); - } - break; - case TOK_CURRENT: - return {type: TOK_CURRENT}; - case TOK_EXPREF: - expression = this.expression(bindingPower.Expref); - return {type: "ExpressionReference", children: [expression]}; - case TOK_LPAREN: - var args = []; - while (this._lookahead(0) !== TOK_RPAREN) { - if (this._lookahead(0) === TOK_CURRENT) { - expression = {type: TOK_CURRENT}; - this._advance(); - } else { - expression = this.expression(0); - } - args.push(expression); - } - this._match(TOK_RPAREN); - return args[0]; - default: - this._errorToken(token); - } - }, - - led: function(tokenName, left) { - var right; - switch(tokenName) { - case TOK_DOT: - var rbp = bindingPower.Dot; - if (this._lookahead(0) !== TOK_STAR) { - right = this._parseDotRHS(rbp); - return {type: "Subexpression", children: [left, right]}; - } else { - // Creating a projection. - this._advance(); - right = this._parseProjectionRHS(rbp); - return {type: "ValueProjection", children: [left, right]}; - } - break; - case TOK_PIPE: - right = this.expression(bindingPower.Pipe); - return {type: TOK_PIPE, children: [left, right]}; - case TOK_OR: - right = this.expression(bindingPower.Or); - return {type: "OrExpression", children: [left, right]}; - case TOK_AND: - right = this.expression(bindingPower.And); - return {type: "AndExpression", children: [left, right]}; - case TOK_LPAREN: - var name = left.name; - var args = []; - var expression, node; - while (this._lookahead(0) !== TOK_RPAREN) { - if (this._lookahead(0) === TOK_CURRENT) { - expression = {type: TOK_CURRENT}; - this._advance(); - } else { - expression = this.expression(0); - } - if (this._lookahead(0) === TOK_COMMA) { - this._match(TOK_COMMA); - } - args.push(expression); - } - this._match(TOK_RPAREN); - node = {type: "Function", name: name, children: args}; - return node; - case TOK_FILTER: - var condition = this.expression(0); - this._match(TOK_RBRACKET); - if (this._lookahead(0) === TOK_FLATTEN) { - right = {type: "Identity"}; - } else { - right = this._parseProjectionRHS(bindingPower.Filter); - } - return {type: "FilterProjection", children: [left, right, condition]}; - case TOK_FLATTEN: - var leftNode = {type: TOK_FLATTEN, children: [left]}; - var rightNode = this._parseProjectionRHS(bindingPower.Flatten); - return {type: "Projection", children: [leftNode, rightNode]}; - case TOK_EQ: - case TOK_NE: - case TOK_GT: - case TOK_GTE: - case TOK_LT: - case TOK_LTE: - return this._parseComparator(left, tokenName); - case TOK_LBRACKET: - var token = this._lookaheadToken(0); - if (token.type === TOK_NUMBER || token.type === TOK_COLON) { - right = this._parseIndexExpression(); - return this._projectIfSlice(left, right); - } else { - this._match(TOK_STAR); - this._match(TOK_RBRACKET); - right = this._parseProjectionRHS(bindingPower.Star); - return {type: "Projection", children: [left, right]}; - } - break; - default: - this._errorToken(this._lookaheadToken(0)); - } - }, - - _match: function(tokenType) { - if (this._lookahead(0) === tokenType) { - this._advance(); - } else { - var t = this._lookaheadToken(0); - var error = new Error("Expected " + tokenType + ", got: " + t.type); - error.name = "ParserError"; - throw error; - } - }, - - _errorToken: function(token) { - var error = new Error("Invalid token (" + - token.type + "): \"" + - token.value + "\""); - error.name = "ParserError"; - throw error; - }, - - - _parseIndexExpression: function() { - if (this._lookahead(0) === TOK_COLON || this._lookahead(1) === TOK_COLON) { - return this._parseSliceExpression(); - } else { - var node = { - type: "Index", - value: this._lookaheadToken(0).value}; - this._advance(); - this._match(TOK_RBRACKET); - return node; - } - }, - - _projectIfSlice: function(left, right) { - var indexExpr = {type: "IndexExpression", children: [left, right]}; - if (right.type === "Slice") { - return { - type: "Projection", - children: [indexExpr, this._parseProjectionRHS(bindingPower.Star)] - }; - } else { - return indexExpr; - } - }, - - _parseSliceExpression: function() { - // [start:end:step] where each part is optional, as well as the last - // colon. - var parts = [null, null, null]; - var index = 0; - var currentToken = this._lookahead(0); - while (currentToken !== TOK_RBRACKET && index < 3) { - if (currentToken === TOK_COLON) { - index++; - this._advance(); - } else if (currentToken === TOK_NUMBER) { - parts[index] = this._lookaheadToken(0).value; - this._advance(); - } else { - var t = this._lookahead(0); - var error = new Error("Syntax error, unexpected token: " + - t.value + "(" + t.type + ")"); - error.name = "Parsererror"; - throw error; - } - currentToken = this._lookahead(0); - } - this._match(TOK_RBRACKET); - return { - type: "Slice", - children: parts - }; - }, - - _parseComparator: function(left, comparator) { - var right = this.expression(bindingPower[comparator]); - return {type: "Comparator", name: comparator, children: [left, right]}; - }, - - _parseDotRHS: function(rbp) { - var lookahead = this._lookahead(0); - var exprTokens = [TOK_UNQUOTEDIDENTIFIER, TOK_QUOTEDIDENTIFIER, TOK_STAR]; - if (exprTokens.indexOf(lookahead) >= 0) { - return this.expression(rbp); - } else if (lookahead === TOK_LBRACKET) { - this._match(TOK_LBRACKET); - return this._parseMultiselectList(); - } else if (lookahead === TOK_LBRACE) { - this._match(TOK_LBRACE); - return this._parseMultiselectHash(); - } - }, - - _parseProjectionRHS: function(rbp) { - var right; - if (bindingPower[this._lookahead(0)] < 10) { - right = {type: "Identity"}; - } else if (this._lookahead(0) === TOK_LBRACKET) { - right = this.expression(rbp); - } else if (this._lookahead(0) === TOK_FILTER) { - right = this.expression(rbp); - } else if (this._lookahead(0) === TOK_DOT) { - this._match(TOK_DOT); - right = this._parseDotRHS(rbp); - } else { - var t = this._lookaheadToken(0); - var error = new Error("Sytanx error, unexpected token: " + - t.value + "(" + t.type + ")"); - error.name = "ParserError"; - throw error; - } - return right; - }, - - _parseMultiselectList: function() { - var expressions = []; - while (this._lookahead(0) !== TOK_RBRACKET) { - var expression = this.expression(0); - expressions.push(expression); - if (this._lookahead(0) === TOK_COMMA) { - this._match(TOK_COMMA); - if (this._lookahead(0) === TOK_RBRACKET) { - throw new Error("Unexpected token Rbracket"); - } - } - } - this._match(TOK_RBRACKET); - return {type: "MultiSelectList", children: expressions}; - }, - - _parseMultiselectHash: function() { - var pairs = []; - var identifierTypes = [TOK_UNQUOTEDIDENTIFIER, TOK_QUOTEDIDENTIFIER]; - var keyToken, keyName, value, node; - for (;;) { - keyToken = this._lookaheadToken(0); - if (identifierTypes.indexOf(keyToken.type) < 0) { - throw new Error("Expecting an identifier token, got: " + - keyToken.type); - } - keyName = keyToken.value; - this._advance(); - this._match(TOK_COLON); - value = this.expression(0); - node = {type: "KeyValuePair", name: keyName, value: value}; - pairs.push(node); - if (this._lookahead(0) === TOK_COMMA) { - this._match(TOK_COMMA); - } else if (this._lookahead(0) === TOK_RBRACE) { - this._match(TOK_RBRACE); - break; - } - } - return {type: "MultiSelectHash", children: pairs}; - } - }; - - - function TreeInterpreter(runtime) { - this.runtime = runtime; - } - - TreeInterpreter.prototype = { - search: function(node, value) { - return this.visit(node, value); - }, - - visit: function(node, value) { - var matched, current, result, first, second, field, left, right, collected, i; - switch (node.type) { - case "Field": - if (value === null ) { - return null; - } else if (isObject(value)) { - field = value[node.name]; - if (field === undefined) { - return null; - } else { - return field; - } - } else { - return null; - } - break; - case "Subexpression": - result = this.visit(node.children[0], value); - for (i = 1; i < node.children.length; i++) { - result = this.visit(node.children[1], result); - if (result === null) { - return null; - } - } - return result; - case "IndexExpression": - left = this.visit(node.children[0], value); - right = this.visit(node.children[1], left); - return right; - case "Index": - if (!isArray(value)) { - return null; - } - var index = node.value; - if (index < 0) { - index = value.length + index; - } - result = value[index]; - if (result === undefined) { - result = null; - } - return result; - case "Slice": - if (!isArray(value)) { - return null; - } - var sliceParams = node.children.slice(0); - var computed = this.computeSliceParams(value.length, sliceParams); - var start = computed[0]; - var stop = computed[1]; - var step = computed[2]; - result = []; - if (step > 0) { - for (i = start; i < stop; i += step) { - result.push(value[i]); - } - } else { - for (i = start; i > stop; i += step) { - result.push(value[i]); - } - } - return result; - case "Projection": - // Evaluate left child. - var base = this.visit(node.children[0], value); - if (!isArray(base)) { - return null; - } - collected = []; - for (i = 0; i < base.length; i++) { - current = this.visit(node.children[1], base[i]); - if (current !== null) { - collected.push(current); - } - } - return collected; - case "ValueProjection": - // Evaluate left child. - base = this.visit(node.children[0], value); - if (!isObject(base)) { - return null; - } - collected = []; - var values = objValues(base); - for (i = 0; i < values.length; i++) { - current = this.visit(node.children[1], values[i]); - if (current !== null) { - collected.push(current); - } - } - return collected; - case "FilterProjection": - base = this.visit(node.children[0], value); - if (!isArray(base)) { - return null; - } - var filtered = []; - var finalResults = []; - for (i = 0; i < base.length; i++) { - matched = this.visit(node.children[2], base[i]); - if (!isFalse(matched)) { - filtered.push(base[i]); - } - } - for (var j = 0; j < filtered.length; j++) { - current = this.visit(node.children[1], filtered[j]); - if (current !== null) { - finalResults.push(current); - } - } - return finalResults; - case "Comparator": - first = this.visit(node.children[0], value); - second = this.visit(node.children[1], value); - switch(node.name) { - case TOK_EQ: - result = strictDeepEqual(first, second); - break; - case TOK_NE: - result = !strictDeepEqual(first, second); - break; - case TOK_GT: - result = first > second; - break; - case TOK_GTE: - result = first >= second; - break; - case TOK_LT: - result = first < second; - break; - case TOK_LTE: - result = first <= second; - break; - default: - throw new Error("Unknown comparator: " + node.name); - } - return result; - case TOK_FLATTEN: - var original = this.visit(node.children[0], value); - if (!isArray(original)) { - return null; - } - var merged = []; - for (i = 0; i < original.length; i++) { - current = original[i]; - if (isArray(current)) { - merged.push.apply(merged, current); - } else { - merged.push(current); - } - } - return merged; - case "Identity": - return value; - case "MultiSelectList": - if (value === null) { - return null; - } - collected = []; - for (i = 0; i < node.children.length; i++) { - collected.push(this.visit(node.children[i], value)); - } - return collected; - case "MultiSelectHash": - if (value === null) { - return null; - } - collected = {}; - var child; - for (i = 0; i < node.children.length; i++) { - child = node.children[i]; - collected[child.name] = this.visit(child.value, value); - } - return collected; - case "OrExpression": - matched = this.visit(node.children[0], value); - if (isFalse(matched)) { - matched = this.visit(node.children[1], value); - } - return matched; - case "AndExpression": - first = this.visit(node.children[0], value); - - if (isFalse(first) === true) { - return first; - } - return this.visit(node.children[1], value); - case "NotExpression": - first = this.visit(node.children[0], value); - return isFalse(first); - case "Literal": - return node.value; - case TOK_PIPE: - left = this.visit(node.children[0], value); - return this.visit(node.children[1], left); - case TOK_CURRENT: - return value; - case "Function": - var resolvedArgs = []; - for (i = 0; i < node.children.length; i++) { - resolvedArgs.push(this.visit(node.children[i], value)); - } - return this.runtime.callFunction(node.name, resolvedArgs); - case "ExpressionReference": - var refNode = node.children[0]; - // Tag the node with a specific attribute so the type - // checker verify the type. - refNode.jmespathType = TOK_EXPREF; - return refNode; - default: - throw new Error("Unknown node type: " + node.type); - } - }, - - computeSliceParams: function(arrayLength, sliceParams) { - var start = sliceParams[0]; - var stop = sliceParams[1]; - var step = sliceParams[2]; - var computed = [null, null, null]; - if (step === null) { - step = 1; - } else if (step === 0) { - var error = new Error("Invalid slice, step cannot be 0"); - error.name = "RuntimeError"; - throw error; - } - var stepValueNegative = step < 0 ? true : false; - - if (start === null) { - start = stepValueNegative ? arrayLength - 1 : 0; - } else { - start = this.capSliceRange(arrayLength, start, step); - } - - if (stop === null) { - stop = stepValueNegative ? -1 : arrayLength; - } else { - stop = this.capSliceRange(arrayLength, stop, step); - } - computed[0] = start; - computed[1] = stop; - computed[2] = step; - return computed; - }, - - capSliceRange: function(arrayLength, actualValue, step) { - if (actualValue < 0) { - actualValue += arrayLength; - if (actualValue < 0) { - actualValue = step < 0 ? -1 : 0; - } - } else if (actualValue >= arrayLength) { - actualValue = step < 0 ? arrayLength - 1 : arrayLength; - } - return actualValue; - } - - }; - - function Runtime(interpreter) { - this._interpreter = interpreter; - this.functionTable = { - // name: [function, ] - // The can be: - // - // { - // args: [[type1, type2], [type1, type2]], - // variadic: true|false - // } - // - // Each arg in the arg list is a list of valid types - // (if the function is overloaded and supports multiple - // types. If the type is "any" then no type checking - // occurs on the argument. Variadic is optional - // and if not provided is assumed to be false. - abs: {_func: this._functionAbs, _signature: [{types: [TYPE_NUMBER]}]}, - avg: {_func: this._functionAvg, _signature: [{types: [TYPE_ARRAY_NUMBER]}]}, - ceil: {_func: this._functionCeil, _signature: [{types: [TYPE_NUMBER]}]}, - contains: { - _func: this._functionContains, - _signature: [{types: [TYPE_STRING, TYPE_ARRAY]}, - {types: [TYPE_ANY]}]}, - "ends_with": { - _func: this._functionEndsWith, - _signature: [{types: [TYPE_STRING]}, {types: [TYPE_STRING]}]}, - floor: {_func: this._functionFloor, _signature: [{types: [TYPE_NUMBER]}]}, - length: { - _func: this._functionLength, - _signature: [{types: [TYPE_STRING, TYPE_ARRAY, TYPE_OBJECT]}]}, - map: { - _func: this._functionMap, - _signature: [{types: [TYPE_EXPREF]}, {types: [TYPE_ARRAY]}]}, - max: { - _func: this._functionMax, - _signature: [{types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING]}]}, - "merge": { - _func: this._functionMerge, - _signature: [{types: [TYPE_OBJECT], variadic: true}] - }, - "max_by": { - _func: this._functionMaxBy, - _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}] - }, - sum: {_func: this._functionSum, _signature: [{types: [TYPE_ARRAY_NUMBER]}]}, - "starts_with": { - _func: this._functionStartsWith, - _signature: [{types: [TYPE_STRING]}, {types: [TYPE_STRING]}]}, - min: { - _func: this._functionMin, - _signature: [{types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING]}]}, - "min_by": { - _func: this._functionMinBy, - _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}] - }, - type: {_func: this._functionType, _signature: [{types: [TYPE_ANY]}]}, - keys: {_func: this._functionKeys, _signature: [{types: [TYPE_OBJECT]}]}, - values: {_func: this._functionValues, _signature: [{types: [TYPE_OBJECT]}]}, - sort: {_func: this._functionSort, _signature: [{types: [TYPE_ARRAY_STRING, TYPE_ARRAY_NUMBER]}]}, - "sort_by": { - _func: this._functionSortBy, - _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}] - }, - join: { - _func: this._functionJoin, - _signature: [ - {types: [TYPE_STRING]}, - {types: [TYPE_ARRAY_STRING]} - ] - }, - reverse: { - _func: this._functionReverse, - _signature: [{types: [TYPE_STRING, TYPE_ARRAY]}]}, - "to_array": {_func: this._functionToArray, _signature: [{types: [TYPE_ANY]}]}, - "to_string": {_func: this._functionToString, _signature: [{types: [TYPE_ANY]}]}, - "to_number": {_func: this._functionToNumber, _signature: [{types: [TYPE_ANY]}]}, - "not_null": { - _func: this._functionNotNull, - _signature: [{types: [TYPE_ANY], variadic: true}] - } - }; - } - - Runtime.prototype = { - callFunction: function(name, resolvedArgs) { - var functionEntry = this.functionTable[name]; - if (functionEntry === undefined) { - throw new Error("Unknown function: " + name + "()"); - } - this._validateArgs(name, resolvedArgs, functionEntry._signature); - return functionEntry._func.call(this, resolvedArgs); - }, - - _validateArgs: function(name, args, signature) { - // Validating the args requires validating - // the correct arity and the correct type of each arg. - // If the last argument is declared as variadic, then we need - // a minimum number of args to be required. Otherwise it has to - // be an exact amount. - var pluralized; - if (signature[signature.length - 1].variadic) { - if (args.length < signature.length) { - pluralized = signature.length === 1 ? " argument" : " arguments"; - throw new Error("ArgumentError: " + name + "() " + - "takes at least" + signature.length + pluralized + - " but received " + args.length); - } - } else if (args.length !== signature.length) { - pluralized = signature.length === 1 ? " argument" : " arguments"; - throw new Error("ArgumentError: " + name + "() " + - "takes " + signature.length + pluralized + - " but received " + args.length); - } - var currentSpec; - var actualType; - var typeMatched; - for (var i = 0; i < signature.length; i++) { - typeMatched = false; - currentSpec = signature[i].types; - actualType = this._getTypeName(args[i]); - for (var j = 0; j < currentSpec.length; j++) { - if (this._typeMatches(actualType, currentSpec[j], args[i])) { - typeMatched = true; - break; - } - } - if (!typeMatched) { - throw new Error("TypeError: " + name + "() " + - "expected argument " + (i + 1) + - " to be type " + currentSpec + - " but received type " + actualType + - " instead."); - } - } - }, - - _typeMatches: function(actual, expected, argValue) { - if (expected === TYPE_ANY) { - return true; - } - if (expected === TYPE_ARRAY_STRING || - expected === TYPE_ARRAY_NUMBER || - expected === TYPE_ARRAY) { - // The expected type can either just be array, - // or it can require a specific subtype (array of numbers). - // - // The simplest case is if "array" with no subtype is specified. - if (expected === TYPE_ARRAY) { - return actual === TYPE_ARRAY; - } else if (actual === TYPE_ARRAY) { - // Otherwise we need to check subtypes. - // I think this has potential to be improved. - var subtype; - if (expected === TYPE_ARRAY_NUMBER) { - subtype = TYPE_NUMBER; - } else if (expected === TYPE_ARRAY_STRING) { - subtype = TYPE_STRING; - } - for (var i = 0; i < argValue.length; i++) { - if (!this._typeMatches( - this._getTypeName(argValue[i]), subtype, - argValue[i])) { - return false; - } - } - return true; - } - } else { - return actual === expected; - } - }, - _getTypeName: function(obj) { - switch (Object.prototype.toString.call(obj)) { - case "[object String]": - return TYPE_STRING; - case "[object Number]": - return TYPE_NUMBER; - case "[object Array]": - return TYPE_ARRAY; - case "[object Boolean]": - return TYPE_BOOLEAN; - case "[object Null]": - return TYPE_NULL; - case "[object Object]": - // Check if it's an expref. If it has, it's been - // tagged with a jmespathType attr of 'Expref'; - if (obj.jmespathType === TOK_EXPREF) { - return TYPE_EXPREF; - } else { - return TYPE_OBJECT; - } - } - }, - - _functionStartsWith: function(resolvedArgs) { - return resolvedArgs[0].lastIndexOf(resolvedArgs[1]) === 0; - }, - - _functionEndsWith: function(resolvedArgs) { - var searchStr = resolvedArgs[0]; - var suffix = resolvedArgs[1]; - return searchStr.indexOf(suffix, searchStr.length - suffix.length) !== -1; - }, - - _functionReverse: function(resolvedArgs) { - var typeName = this._getTypeName(resolvedArgs[0]); - if (typeName === TYPE_STRING) { - var originalStr = resolvedArgs[0]; - var reversedStr = ""; - for (var i = originalStr.length - 1; i >= 0; i--) { - reversedStr += originalStr[i]; - } - return reversedStr; - } else { - var reversedArray = resolvedArgs[0].slice(0); - reversedArray.reverse(); - return reversedArray; - } - }, - - _functionAbs: function(resolvedArgs) { - return Math.abs(resolvedArgs[0]); - }, - - _functionCeil: function(resolvedArgs) { - return Math.ceil(resolvedArgs[0]); - }, - - _functionAvg: function(resolvedArgs) { - var sum = 0; - var inputArray = resolvedArgs[0]; - for (var i = 0; i < inputArray.length; i++) { - sum += inputArray[i]; - } - return sum / inputArray.length; - }, - - _functionContains: function(resolvedArgs) { - return resolvedArgs[0].indexOf(resolvedArgs[1]) >= 0; - }, - - _functionFloor: function(resolvedArgs) { - return Math.floor(resolvedArgs[0]); - }, - - _functionLength: function(resolvedArgs) { - if (!isObject(resolvedArgs[0])) { - return resolvedArgs[0].length; - } else { - // As far as I can tell, there's no way to get the length - // of an object without O(n) iteration through the object. - return Object.keys(resolvedArgs[0]).length; - } - }, - - _functionMap: function(resolvedArgs) { - var mapped = []; - var interpreter = this._interpreter; - var exprefNode = resolvedArgs[0]; - var elements = resolvedArgs[1]; - for (var i = 0; i < elements.length; i++) { - mapped.push(interpreter.visit(exprefNode, elements[i])); - } - return mapped; - }, - - _functionMerge: function(resolvedArgs) { - var merged = {}; - for (var i = 0; i < resolvedArgs.length; i++) { - var current = resolvedArgs[i]; - for (var key in current) { - merged[key] = current[key]; - } - } - return merged; - }, - - _functionMax: function(resolvedArgs) { - if (resolvedArgs[0].length > 0) { - var typeName = this._getTypeName(resolvedArgs[0][0]); - if (typeName === TYPE_NUMBER) { - return Math.max.apply(Math, resolvedArgs[0]); - } else { - var elements = resolvedArgs[0]; - var maxElement = elements[0]; - for (var i = 1; i < elements.length; i++) { - if (maxElement.localeCompare(elements[i]) < 0) { - maxElement = elements[i]; - } - } - return maxElement; - } - } else { - return null; - } - }, - - _functionMin: function(resolvedArgs) { - if (resolvedArgs[0].length > 0) { - var typeName = this._getTypeName(resolvedArgs[0][0]); - if (typeName === TYPE_NUMBER) { - return Math.min.apply(Math, resolvedArgs[0]); - } else { - var elements = resolvedArgs[0]; - var minElement = elements[0]; - for (var i = 1; i < elements.length; i++) { - if (elements[i].localeCompare(minElement) < 0) { - minElement = elements[i]; - } - } - return minElement; - } - } else { - return null; - } - }, - - _functionSum: function(resolvedArgs) { - var sum = 0; - var listToSum = resolvedArgs[0]; - for (var i = 0; i < listToSum.length; i++) { - sum += listToSum[i]; - } - return sum; - }, - - _functionType: function(resolvedArgs) { - switch (this._getTypeName(resolvedArgs[0])) { - case TYPE_NUMBER: - return "number"; - case TYPE_STRING: - return "string"; - case TYPE_ARRAY: - return "array"; - case TYPE_OBJECT: - return "object"; - case TYPE_BOOLEAN: - return "boolean"; - case TYPE_EXPREF: - return "expref"; - case TYPE_NULL: - return "null"; - } - }, - - _functionKeys: function(resolvedArgs) { - return Object.keys(resolvedArgs[0]); - }, - - _functionValues: function(resolvedArgs) { - var obj = resolvedArgs[0]; - var keys = Object.keys(obj); - var values = []; - for (var i = 0; i < keys.length; i++) { - values.push(obj[keys[i]]); - } - return values; - }, - - _functionJoin: function(resolvedArgs) { - var joinChar = resolvedArgs[0]; - var listJoin = resolvedArgs[1]; - return listJoin.join(joinChar); - }, - - _functionToArray: function(resolvedArgs) { - if (this._getTypeName(resolvedArgs[0]) === TYPE_ARRAY) { - return resolvedArgs[0]; - } else { - return [resolvedArgs[0]]; - } - }, - - _functionToString: function(resolvedArgs) { - if (this._getTypeName(resolvedArgs[0]) === TYPE_STRING) { - return resolvedArgs[0]; - } else { - return JSON.stringify(resolvedArgs[0]); - } - }, - - _functionToNumber: function(resolvedArgs) { - var typeName = this._getTypeName(resolvedArgs[0]); - var convertedValue; - if (typeName === TYPE_NUMBER) { - return resolvedArgs[0]; - } else if (typeName === TYPE_STRING) { - convertedValue = +resolvedArgs[0]; - if (!isNaN(convertedValue)) { - return convertedValue; - } - } - return null; - }, - - _functionNotNull: function(resolvedArgs) { - for (var i = 0; i < resolvedArgs.length; i++) { - if (this._getTypeName(resolvedArgs[i]) !== TYPE_NULL) { - return resolvedArgs[i]; - } - } - return null; - }, - - _functionSort: function(resolvedArgs) { - var sortedArray = resolvedArgs[0].slice(0); - sortedArray.sort(); - return sortedArray; - }, - - _functionSortBy: function(resolvedArgs) { - var sortedArray = resolvedArgs[0].slice(0); - if (sortedArray.length === 0) { - return sortedArray; - } - var interpreter = this._interpreter; - var exprefNode = resolvedArgs[1]; - var requiredType = this._getTypeName( - interpreter.visit(exprefNode, sortedArray[0])); - if ([TYPE_NUMBER, TYPE_STRING].indexOf(requiredType) < 0) { - throw new Error("TypeError"); - } - var that = this; - // In order to get a stable sort out of an unstable - // sort algorithm, we decorate/sort/undecorate (DSU) - // by creating a new list of [index, element] pairs. - // In the cmp function, if the evaluated elements are - // equal, then the index will be used as the tiebreaker. - // After the decorated list has been sorted, it will be - // undecorated to extract the original elements. - var decorated = []; - for (var i = 0; i < sortedArray.length; i++) { - decorated.push([i, sortedArray[i]]); - } - decorated.sort(function(a, b) { - var exprA = interpreter.visit(exprefNode, a[1]); - var exprB = interpreter.visit(exprefNode, b[1]); - if (that._getTypeName(exprA) !== requiredType) { - throw new Error( - "TypeError: expected " + requiredType + ", received " + - that._getTypeName(exprA)); - } else if (that._getTypeName(exprB) !== requiredType) { - throw new Error( - "TypeError: expected " + requiredType + ", received " + - that._getTypeName(exprB)); - } - if (exprA > exprB) { - return 1; - } else if (exprA < exprB) { - return -1; - } else { - // If they're equal compare the items by their - // order to maintain relative order of equal keys - // (i.e. to get a stable sort). - return a[0] - b[0]; - } - }); - // Undecorate: extract out the original list elements. - for (var j = 0; j < decorated.length; j++) { - sortedArray[j] = decorated[j][1]; - } - return sortedArray; - }, - - _functionMaxBy: function(resolvedArgs) { - var exprefNode = resolvedArgs[1]; - var resolvedArray = resolvedArgs[0]; - var keyFunction = this.createKeyFunction(exprefNode, [TYPE_NUMBER, TYPE_STRING]); - var maxNumber = -Infinity; - var maxRecord; - var current; - for (var i = 0; i < resolvedArray.length; i++) { - current = keyFunction(resolvedArray[i]); - if (current > maxNumber) { - maxNumber = current; - maxRecord = resolvedArray[i]; - } - } - return maxRecord; - }, - - _functionMinBy: function(resolvedArgs) { - var exprefNode = resolvedArgs[1]; - var resolvedArray = resolvedArgs[0]; - var keyFunction = this.createKeyFunction(exprefNode, [TYPE_NUMBER, TYPE_STRING]); - var minNumber = Infinity; - var minRecord; - var current; - for (var i = 0; i < resolvedArray.length; i++) { - current = keyFunction(resolvedArray[i]); - if (current < minNumber) { - minNumber = current; - minRecord = resolvedArray[i]; - } - } - return minRecord; - }, - - createKeyFunction: function(exprefNode, allowedTypes) { - var that = this; - var interpreter = this._interpreter; - var keyFunc = function(x) { - var current = interpreter.visit(exprefNode, x); - if (allowedTypes.indexOf(that._getTypeName(current)) < 0) { - var msg = "TypeError: expected one of " + allowedTypes + - ", received " + that._getTypeName(current); - throw new Error(msg); - } - return current; - }; - return keyFunc; - } - - }; - - function compile(stream) { - var parser = new Parser(); - var ast = parser.parse(stream); - return ast; - } - - function tokenize(stream) { - var lexer = new Lexer(); - return lexer.tokenize(stream); - } - - function search(data, expression) { - var parser = new Parser(); - // This needs to be improved. Both the interpreter and runtime depend on - // each other. The runtime needs the interpreter to support exprefs. - // There's likely a clean way to avoid the cyclic dependency. - var runtime = new Runtime(); - var interpreter = new TreeInterpreter(runtime); - runtime._interpreter = interpreter; - var node = parser.parse(expression); - return interpreter.search(node, data); - } - - exports.tokenize = tokenize; - exports.compile = compile; - exports.search = search; - exports.strictDeepEqual = strictDeepEqual; -})(typeof exports === "undefined" ? this.jmespath = {} : exports); diff --git a/node_modules/jmespath/jp.js b/node_modules/jmespath/jp.js deleted file mode 100755 index c1521080..00000000 --- a/node_modules/jmespath/jp.js +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env node -jmespath = require('./jmespath'); - -process.stdin.setEncoding('utf-8'); - - -if (process.argv.length < 2) { - console.log("Must provide a jmespath expression."); - process.exit(1); -} -var inputJSON = ""; - -process.stdin.on('readable', function() { - var chunk = process.stdin.read(); - if (chunk !== null) { - inputJSON += chunk; - } -}); - -process.stdin.on('end', function() { - var parsedInput = JSON.parse(inputJSON); - console.log(JSON.stringify(jmespath.search(parsedInput, process.argv[2]))); -}); diff --git a/node_modules/jmespath/l.js b/node_modules/jmespath/l.js deleted file mode 100644 index 27bf6dd2..00000000 --- a/node_modules/jmespath/l.js +++ /dev/null @@ -1,189 +0,0 @@ -'use strict'; - -var Lexer = exports.Lexer = function() { - this.pos = 0; - this.buf = null; - this.buflen = 0; - - // Operator table, mapping operator -> token name - this.optable = { - '+': 'PLUS', - '-': 'MINUS', - '*': 'MULTIPLY', - '.': 'PERIOD', - '\\': 'BACKSLASH', - ':': 'COLON', - '%': 'PERCENT', - '|': 'PIPE', - '!': 'EXCLAMATION', - '?': 'QUESTION', - '#': 'POUND', - '&': 'AMPERSAND', - ';': 'SEMI', - ',': 'COMMA', - '(': 'L_PAREN', - ')': 'R_PAREN', - '<': 'L_ANG', - '>': 'R_ANG', - '{': 'L_BRACE', - '}': 'R_BRACE', - '[': 'L_BRACKET', - ']': 'R_BRACKET', - '=': 'EQUALS' - }; -} - -// Initialize the Lexer's buffer. This resets the lexer's internal -// state and subsequent tokens will be returned starting with the -// beginning of the new buffer. -Lexer.prototype.input = function(buf) { - this.pos = 0; - this.buf = buf; - this.buflen = buf.length; -} - -// Get the next token from the current buffer. A token is an object with -// the following properties: -// - name: name of the pattern that this token matched (taken from rules). -// - value: actual string value of the token. -// - pos: offset in the current buffer where the token starts. -// -// If there are no more tokens in the buffer, returns null. In case of -// an error throws Error. -Lexer.prototype.token = function() { - this._skipnontokens(); - if (this.pos >= this.buflen) { - return null; - } - - // The char at this.pos is part of a real token. Figure out which. - var c = this.buf.charAt(this.pos); - - // '/' is treated specially, because it starts a comment if followed by - // another '/'. If not followed by another '/', it's the DIVIDE - // operator. - if (c === '/') { - var next_c = this.buf.charAt(this.pos + 1); - if (next_c === '/') { - return this._process_comment(); - } else { - return {name: 'DIVIDE', value: '/', pos: this.pos++}; - } - } else { - // Look it up in the table of operators - var op = this.optable[c]; - if (op !== undefined) { - return {name: op, value: c, pos: this.pos++}; - } else { - // Not an operator - so it's the beginning of another token. - if (Lexer._isalpha(c)) { - return this._process_identifier(); - } else if (Lexer._isdigit(c)) { - return this._process_number(); - } else if (c === '"') { - return this._process_quote(); - } else { - throw Error('Token error at ' + this.pos); - } - } - } -} - -Lexer._isnewline = function(c) { - return c === '\r' || c === '\n'; -} - -Lexer._isdigit = function(c) { - return c >= '0' && c <= '9'; -} - -Lexer._isalpha = function(c) { - return (c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || - c === '_' || c === '$'; -} - -Lexer._isalphanum = function(c) { - return (c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || - (c >= '0' && c <= '9') || - c === '_' || c === '$'; -} - -Lexer.prototype._process_number = function() { - var endpos = this.pos + 1; - while (endpos < this.buflen && - Lexer._isdigit(this.buf.charAt(endpos))) { - endpos++; - } - - var tok = { - name: 'NUMBER', - value: this.buf.substring(this.pos, endpos), - pos: this.pos - }; - this.pos = endpos; - return tok; -} - -Lexer.prototype._process_comment = function() { - var endpos = this.pos + 2; - // Skip until the end of the line - var c = this.buf.charAt(this.pos + 2); - while (endpos < this.buflen && - !Lexer._isnewline(this.buf.charAt(endpos))) { - endpos++; - } - - var tok = { - name: 'COMMENT', - value: this.buf.substring(this.pos, endpos), - pos: this.pos - }; - this.pos = endpos + 1; - return tok; -} - -Lexer.prototype._process_identifier = function() { - var endpos = this.pos + 1; - while (endpos < this.buflen && - Lexer._isalphanum(this.buf.charAt(endpos))) { - endpos++; - } - - var tok = { - name: 'IDENTIFIER', - value: this.buf.substring(this.pos, endpos), - pos: this.pos - }; - this.pos = endpos; - return tok; -} - -Lexer.prototype._process_quote = function() { - // this.pos points at the opening quote. Find the ending quote. - var end_index = this.buf.indexOf('"', this.pos + 1); - - if (end_index === -1) { - throw Error('Unterminated quote at ' + this.pos); - } else { - var tok = { - name: 'QUOTE', - value: this.buf.substring(this.pos, end_index + 1), - pos: this.pos - }; - this.pos = end_index + 1; - return tok; - } -} - -Lexer.prototype._skipnontokens = function() { - while (this.pos < this.buflen) { - var c = this.buf.charAt(this.pos); - if (c == ' ' || c == '\t' || c == '\r' || c == '\n') { - this.pos++; - } else { - break; - } - } -} diff --git a/node_modules/jmespath/package.json b/node_modules/jmespath/package.json deleted file mode 100644 index a2683add..00000000 --- a/node_modules/jmespath/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "jmespath@^0.15.0", - "_id": "jmespath@0.15.0", - "_inBundle": false, - "_integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=", - "_location": "/jmespath", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "jmespath@^0.15.0", - "name": "jmespath", - "escapedName": "jmespath", - "rawSpec": "^0.15.0", - "saveSpec": null, - "fetchSpec": "^0.15.0" - }, - "_requiredBy": [ - "/pino-pretty" - ], - "_resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", - "_shasum": "a3f222a9aae9f966f5d27c796510e28091764217", - "_spec": "jmespath@^0.15.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pino-pretty", - "author": { - "name": "James Saryerwinnie", - "email": "js@jamesls.com", - "url": "http://jamesls.com/" - }, - "bugs": { - "url": "http://github.com/jmespath/jmespath.js/issues" - }, - "bundleDependencies": false, - "contributors": [], - "dependencies": {}, - "deprecated": false, - "description": "JMESPath implementation in javascript", - "devDependencies": { - "grunt": "^0.4.5", - "grunt-contrib-jshint": "^0.11.0", - "grunt-contrib-uglify": "^0.11.1", - "grunt-eslint": "^17.3.1", - "mocha": "^2.1.0" - }, - "directories": { - "test": "test" - }, - "engines": { - "node": ">= 0.6.0" - }, - "homepage": "https://github.com/jmespath/jmespath.js", - "keywords": [ - "jmespath", - "jsonpath", - "json", - "xpath" - ], - "licenses": [ - { - "type": "Apache 2.0", - "url": "http://github.com/jmespath/jmespath.js/raw/master/LICENSE" - } - ], - "main": "jmespath.js", - "name": "jmespath", - "repository": { - "type": "git", - "url": "git://github.com/jmespath/jmespath.js.git" - }, - "scripts": { - "test": "mocha test/" - }, - "version": "0.15.0" -} diff --git a/node_modules/jmespath/perf.js b/node_modules/jmespath/perf.js deleted file mode 100644 index 58794ecd..00000000 --- a/node_modules/jmespath/perf.js +++ /dev/null @@ -1,33 +0,0 @@ -var jmespath = require('./jmespath') -var Benchmark = require('benchmark'); -var suite = new Benchmark.Suite; - -// add tests -suite.add('Parser#single_expr', function() { - jmespath.compile("foo"); -}) -.add('Parser#single_subexpr', function() { - jmespath.compile("foo.bar"); -}) -.add('Parser#deeply_nested_50', function() { - jmespath.compile("j49.j48.j47.j46.j45.j44.j43.j42.j41.j40.j39.j38.j37.j36.j35.j34.j33.j32.j31.j30.j29.j28.j27.j26.j25.j24.j23.j22.j21.j20.j19.j18.j17.j16.j15.j14.j13.j12.j11.j10.j9.j8.j7.j6.j5.j4.j3.j2.j1.j0"); - -}) -.add('Parser#deeply_nested_50_index', function() { - jmespath.compile("[49][48][47][46][45][44][43][42][41][40][39][38][37][36][35][34][33][32][31][30][29][28][27][26][25][24][23][22][21][20][19][18][17][16][15][14][13][12][11][10][9][8][7][6][5][4][3][2][1][0]"); -}) -.add('Parser#basic_list_projection', function() { - jmespath.compile("foo[*].bar"); -}) -.on('cycle', function(event) { - var bench = event.target; - var mean = bench.stats.mean * 1000; - var variance = bench.stats.variance * 1000000; - var result = 'Mean time: ' + mean.toFixed(6) + 'msec '; - result += event.target.toString(); - console.log(result); -}) -.on('complete', function() { -}) -// run async -.run({ 'async': false }); diff --git a/node_modules/jmespath/reservedWords.json b/node_modules/jmespath/reservedWords.json deleted file mode 100644 index 433cd35e..00000000 --- a/node_modules/jmespath/reservedWords.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "vars": [ "define", "require", "exports"], - "props": ["compile", "search", "tokenize", "jmespath", "parse", "stringify", "prototype", "length"] -} diff --git a/node_modules/jmespath/test/compliance.js b/node_modules/jmespath/test/compliance.js deleted file mode 100644 index 6298e9e1..00000000 --- a/node_modules/jmespath/test/compliance.js +++ /dev/null @@ -1,56 +0,0 @@ -var fs = require('fs'); -var path = require('path'); -var assert = require('assert'); -var jmespath = require('../jmespath'); -var search = jmespath.search; - -// Compliance tests that aren't supported yet. -var notImplementedYet = []; - -function endsWith(str, suffix) { - return str.indexOf(suffix, str.length - suffix.length) !== -1; -} - -var listing = fs.readdirSync('test/compliance'); -for (var i = 0; i < listing.length; i++) { - var filename = 'test/compliance/' + listing[i]; - if (fs.statSync(filename).isFile() && endsWith(filename, '.json') && - notImplementedYet.indexOf(path.basename(filename)) === -1) { - addTestSuitesFromFile(filename); - } -} -function addTestSuitesFromFile(filename) { - describe(filename, function() { - var spec = JSON.parse(fs.readFileSync(filename, 'utf-8')); - var errorMsg; - for (var i = 0; i < spec.length; i++) { - var msg = "suite " + i + " for filename " + filename; - describe(msg, function() { - var given = spec[i].given; - var cases = spec[i].cases; - for (var j = 0; j < cases.length; j++) { - var testcase = cases[j]; - if (testcase.error !== undefined) { - // For now just verify that an error is thrown - // for error tests. - (function(testcase, given) { - it('should throw error for test ' + j, function() { - assert.throws( - function() { - search(given, testcase.expression); - }, Error, testcase.expression); - }); - })(testcase, given); - } else { - (function(testcase, given) { - it('should pass test ' + j + " expression: " + testcase.expression, function() { - assert.deepEqual(search(given, testcase.expression), - testcase.result); - }); - })(testcase, given); - } - } - }); - } - }); -} diff --git a/node_modules/jmespath/test/compliance/basic.json b/node_modules/jmespath/test/compliance/basic.json deleted file mode 100644 index d550e969..00000000 --- a/node_modules/jmespath/test/compliance/basic.json +++ /dev/null @@ -1,96 +0,0 @@ -[{ - "given": - {"foo": {"bar": {"baz": "correct"}}}, - "cases": [ - { - "expression": "foo", - "result": {"bar": {"baz": "correct"}} - }, - { - "expression": "foo.bar", - "result": {"baz": "correct"} - }, - { - "expression": "foo.bar.baz", - "result": "correct" - }, - { - "expression": "foo\n.\nbar\n.baz", - "result": "correct" - }, - { - "expression": "foo.bar.baz.bad", - "result": null - }, - { - "expression": "foo.bar.bad", - "result": null - }, - { - "expression": "foo.bad", - "result": null - }, - { - "expression": "bad", - "result": null - }, - { - "expression": "bad.morebad.morebad", - "result": null - } - ] -}, -{ - "given": - {"foo": {"bar": ["one", "two", "three"]}}, - "cases": [ - { - "expression": "foo", - "result": {"bar": ["one", "two", "three"]} - }, - { - "expression": "foo.bar", - "result": ["one", "two", "three"] - } - ] -}, -{ - "given": ["one", "two", "three"], - "cases": [ - { - "expression": "one", - "result": null - }, - { - "expression": "two", - "result": null - }, - { - "expression": "three", - "result": null - }, - { - "expression": "one.two", - "result": null - } - ] -}, -{ - "given": - {"foo": {"1": ["one", "two", "three"], "-1": "bar"}}, - "cases": [ - { - "expression": "foo.\"1\"", - "result": ["one", "two", "three"] - }, - { - "expression": "foo.\"1\"[0]", - "result": "one" - }, - { - "expression": "foo.\"-1\"", - "result": "bar" - } - ] -} -] diff --git a/node_modules/jmespath/test/compliance/boolean.json b/node_modules/jmespath/test/compliance/boolean.json deleted file mode 100644 index e3fa196b..00000000 --- a/node_modules/jmespath/test/compliance/boolean.json +++ /dev/null @@ -1,257 +0,0 @@ -[ - { - "given": { - "outer": { - "foo": "foo", - "bar": "bar", - "baz": "baz" - } - }, - "cases": [ - { - "expression": "outer.foo || outer.bar", - "result": "foo" - }, - { - "expression": "outer.foo||outer.bar", - "result": "foo" - }, - { - "expression": "outer.bar || outer.baz", - "result": "bar" - }, - { - "expression": "outer.bar||outer.baz", - "result": "bar" - }, - { - "expression": "outer.bad || outer.foo", - "result": "foo" - }, - { - "expression": "outer.bad||outer.foo", - "result": "foo" - }, - { - "expression": "outer.foo || outer.bad", - "result": "foo" - }, - { - "expression": "outer.foo||outer.bad", - "result": "foo" - }, - { - "expression": "outer.bad || outer.alsobad", - "result": null - }, - { - "expression": "outer.bad||outer.alsobad", - "result": null - } - ] - }, - { - "given": { - "outer": { - "foo": "foo", - "bool": false, - "empty_list": [], - "empty_string": "" - } - }, - "cases": [ - { - "expression": "outer.empty_string || outer.foo", - "result": "foo" - }, - { - "expression": "outer.nokey || outer.bool || outer.empty_list || outer.empty_string || outer.foo", - "result": "foo" - } - ] - }, - { - "given": { - "True": true, - "False": false, - "Number": 5, - "EmptyList": [], - "Zero": 0 - }, - "cases": [ - { - "expression": "True && False", - "result": false - }, - { - "expression": "False && True", - "result": false - }, - { - "expression": "True && True", - "result": true - }, - { - "expression": "False && False", - "result": false - }, - { - "expression": "True && Number", - "result": 5 - }, - { - "expression": "Number && True", - "result": true - }, - { - "expression": "Number && False", - "result": false - }, - { - "expression": "Number && EmptyList", - "result": [] - }, - { - "expression": "Number && True", - "result": true - }, - { - "expression": "EmptyList && True", - "result": [] - }, - { - "expression": "EmptyList && False", - "result": [] - }, - { - "expression": "True || False", - "result": true - }, - { - "expression": "True || True", - "result": true - }, - { - "expression": "False || True", - "result": true - }, - { - "expression": "False || False", - "result": false - }, - { - "expression": "Number || EmptyList", - "result": 5 - }, - { - "expression": "Number || True", - "result": 5 - }, - { - "expression": "Number || True && False", - "result": 5 - }, - { - "expression": "(Number || True) && False", - "result": false - }, - { - "expression": "Number || (True && False)", - "result": 5 - }, - { - "expression": "!True", - "result": false - }, - { - "expression": "!False", - "result": true - }, - { - "expression": "!Number", - "result": false - }, - { - "expression": "!EmptyList", - "result": true - }, - { - "expression": "True && !False", - "result": true - }, - { - "expression": "True && !EmptyList", - "result": true - }, - { - "expression": "!False && !EmptyList", - "result": true - }, - { - "expression": "!(True && False)", - "result": true - }, - { - "expression": "!Zero", - "result": false - }, - { - "expression": "!!Zero", - "result": true - } - ] - }, - { - "given": { - "one": 1, - "two": 2, - "three": 3 - }, - "cases": [ - { - "expression": "one < two", - "result": true - }, - { - "expression": "one <= two", - "result": true - }, - { - "expression": "one == one", - "result": true - }, - { - "expression": "one == two", - "result": false - }, - { - "expression": "one > two", - "result": false - }, - { - "expression": "one >= two", - "result": false - }, - { - "expression": "one != two", - "result": true - }, - { - "expression": "one < two && three > one", - "result": true - }, - { - "expression": "one < two || three > one", - "result": true - }, - { - "expression": "one < two || three < one", - "result": true - }, - { - "expression": "two < one || three < one", - "result": false - } - ] - } -] diff --git a/node_modules/jmespath/test/compliance/current.json b/node_modules/jmespath/test/compliance/current.json deleted file mode 100644 index 0c26248d..00000000 --- a/node_modules/jmespath/test/compliance/current.json +++ /dev/null @@ -1,25 +0,0 @@ -[ - { - "given": { - "foo": [{"name": "a"}, {"name": "b"}], - "bar": {"baz": "qux"} - }, - "cases": [ - { - "expression": "@", - "result": { - "foo": [{"name": "a"}, {"name": "b"}], - "bar": {"baz": "qux"} - } - }, - { - "expression": "@.bar", - "result": {"baz": "qux"} - }, - { - "expression": "@.foo[0]", - "result": {"name": "a"} - } - ] - } -] diff --git a/node_modules/jmespath/test/compliance/escape.json b/node_modules/jmespath/test/compliance/escape.json deleted file mode 100644 index 4a62d951..00000000 --- a/node_modules/jmespath/test/compliance/escape.json +++ /dev/null @@ -1,46 +0,0 @@ -[{ - "given": { - "foo.bar": "dot", - "foo bar": "space", - "foo\nbar": "newline", - "foo\"bar": "doublequote", - "c:\\\\windows\\path": "windows", - "/unix/path": "unix", - "\"\"\"": "threequotes", - "bar": {"baz": "qux"} - }, - "cases": [ - { - "expression": "\"foo.bar\"", - "result": "dot" - }, - { - "expression": "\"foo bar\"", - "result": "space" - }, - { - "expression": "\"foo\\nbar\"", - "result": "newline" - }, - { - "expression": "\"foo\\\"bar\"", - "result": "doublequote" - }, - { - "expression": "\"c:\\\\\\\\windows\\\\path\"", - "result": "windows" - }, - { - "expression": "\"/unix/path\"", - "result": "unix" - }, - { - "expression": "\"\\\"\\\"\\\"\"", - "result": "threequotes" - }, - { - "expression": "\"bar\".\"baz\"", - "result": "qux" - } - ] -}] diff --git a/node_modules/jmespath/test/compliance/filters.json b/node_modules/jmespath/test/compliance/filters.json deleted file mode 100644 index 5b9f52b1..00000000 --- a/node_modules/jmespath/test/compliance/filters.json +++ /dev/null @@ -1,468 +0,0 @@ -[ - { - "given": {"foo": [{"name": "a"}, {"name": "b"}]}, - "cases": [ - { - "comment": "Matching a literal", - "expression": "foo[?name == 'a']", - "result": [{"name": "a"}] - } - ] - }, - { - "given": {"foo": [0, 1], "bar": [2, 3]}, - "cases": [ - { - "comment": "Matching a literal", - "expression": "*[?[0] == `0`]", - "result": [[], []] - } - ] - }, - { - "given": {"foo": [{"first": "foo", "last": "bar"}, - {"first": "foo", "last": "foo"}, - {"first": "foo", "last": "baz"}]}, - "cases": [ - { - "comment": "Matching an expression", - "expression": "foo[?first == last]", - "result": [{"first": "foo", "last": "foo"}] - }, - { - "comment": "Verify projection created from filter", - "expression": "foo[?first == last].first", - "result": ["foo"] - } - ] - }, - { - "given": {"foo": [{"age": 20}, - {"age": 25}, - {"age": 30}]}, - "cases": [ - { - "comment": "Greater than with a number", - "expression": "foo[?age > `25`]", - "result": [{"age": 30}] - }, - { - "expression": "foo[?age >= `25`]", - "result": [{"age": 25}, {"age": 30}] - }, - { - "comment": "Greater than with a number", - "expression": "foo[?age > `30`]", - "result": [] - }, - { - "comment": "Greater than with a number", - "expression": "foo[?age < `25`]", - "result": [{"age": 20}] - }, - { - "comment": "Greater than with a number", - "expression": "foo[?age <= `25`]", - "result": [{"age": 20}, {"age": 25}] - }, - { - "comment": "Greater than with a number", - "expression": "foo[?age < `20`]", - "result": [] - }, - { - "expression": "foo[?age == `20`]", - "result": [{"age": 20}] - }, - { - "expression": "foo[?age != `20`]", - "result": [{"age": 25}, {"age": 30}] - } - ] - }, - { - "given": {"foo": [{"top": {"name": "a"}}, - {"top": {"name": "b"}}]}, - "cases": [ - { - "comment": "Filter with subexpression", - "expression": "foo[?top.name == 'a']", - "result": [{"top": {"name": "a"}}] - } - ] - }, - { - "given": {"foo": [{"top": {"first": "foo", "last": "bar"}}, - {"top": {"first": "foo", "last": "foo"}}, - {"top": {"first": "foo", "last": "baz"}}]}, - "cases": [ - { - "comment": "Matching an expression", - "expression": "foo[?top.first == top.last]", - "result": [{"top": {"first": "foo", "last": "foo"}}] - }, - { - "comment": "Matching a JSON array", - "expression": "foo[?top == `{\"first\": \"foo\", \"last\": \"bar\"}`]", - "result": [{"top": {"first": "foo", "last": "bar"}}] - } - ] - }, - { - "given": {"foo": [ - {"key": true}, - {"key": false}, - {"key": 0}, - {"key": 1}, - {"key": [0]}, - {"key": {"bar": [0]}}, - {"key": null}, - {"key": [1]}, - {"key": {"a":2}} - ]}, - "cases": [ - { - "expression": "foo[?key == `true`]", - "result": [{"key": true}] - }, - { - "expression": "foo[?key == `false`]", - "result": [{"key": false}] - }, - { - "expression": "foo[?key == `0`]", - "result": [{"key": 0}] - }, - { - "expression": "foo[?key == `1`]", - "result": [{"key": 1}] - }, - { - "expression": "foo[?key == `[0]`]", - "result": [{"key": [0]}] - }, - { - "expression": "foo[?key == `{\"bar\": [0]}`]", - "result": [{"key": {"bar": [0]}}] - }, - { - "expression": "foo[?key == `null`]", - "result": [{"key": null}] - }, - { - "expression": "foo[?key == `[1]`]", - "result": [{"key": [1]}] - }, - { - "expression": "foo[?key == `{\"a\":2}`]", - "result": [{"key": {"a":2}}] - }, - { - "expression": "foo[?`true` == key]", - "result": [{"key": true}] - }, - { - "expression": "foo[?`false` == key]", - "result": [{"key": false}] - }, - { - "expression": "foo[?`0` == key]", - "result": [{"key": 0}] - }, - { - "expression": "foo[?`1` == key]", - "result": [{"key": 1}] - }, - { - "expression": "foo[?`[0]` == key]", - "result": [{"key": [0]}] - }, - { - "expression": "foo[?`{\"bar\": [0]}` == key]", - "result": [{"key": {"bar": [0]}}] - }, - { - "expression": "foo[?`null` == key]", - "result": [{"key": null}] - }, - { - "expression": "foo[?`[1]` == key]", - "result": [{"key": [1]}] - }, - { - "expression": "foo[?`{\"a\":2}` == key]", - "result": [{"key": {"a":2}}] - }, - { - "expression": "foo[?key != `true`]", - "result": [{"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?key != `false`]", - "result": [{"key": true}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?key != `0`]", - "result": [{"key": true}, {"key": false}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?key != `1`]", - "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?key != `null`]", - "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?key != `[1]`]", - "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": {"a":2}}] - }, - { - "expression": "foo[?key != `{\"a\":2}`]", - "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}] - }, - { - "expression": "foo[?`true` != key]", - "result": [{"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?`false` != key]", - "result": [{"key": true}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?`0` != key]", - "result": [{"key": true}, {"key": false}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?`1` != key]", - "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?`null` != key]", - "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": [1]}, {"key": {"a":2}}] - }, - { - "expression": "foo[?`[1]` != key]", - "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": {"a":2}}] - }, - { - "expression": "foo[?`{\"a\":2}` != key]", - "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]}, - {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}] - } - ] - }, - { - "given": {"reservations": [ - {"instances": [ - {"foo": 1, "bar": 2}, {"foo": 1, "bar": 3}, - {"foo": 1, "bar": 2}, {"foo": 2, "bar": 1}]}]}, - "cases": [ - { - "expression": "reservations[].instances[?bar==`1`]", - "result": [[{"foo": 2, "bar": 1}]] - }, - { - "expression": "reservations[*].instances[?bar==`1`]", - "result": [[{"foo": 2, "bar": 1}]] - }, - { - "expression": "reservations[].instances[?bar==`1`][]", - "result": [{"foo": 2, "bar": 1}] - } - ] - }, - { - "given": { - "baz": "other", - "foo": [ - {"bar": 1}, {"bar": 2}, {"bar": 3}, {"bar": 4}, {"bar": 1, "baz": 2} - ] - }, - "cases": [ - { - "expression": "foo[?bar==`1`].bar[0]", - "result": [] - } - ] - }, - { - "given": { - "foo": [ - {"a": 1, "b": {"c": "x"}}, - {"a": 1, "b": {"c": "y"}}, - {"a": 1, "b": {"c": "z"}}, - {"a": 2, "b": {"c": "z"}}, - {"a": 1, "baz": 2} - ] - }, - "cases": [ - { - "expression": "foo[?a==`1`].b.c", - "result": ["x", "y", "z"] - } - ] - }, - { - "given": {"foo": [{"name": "a"}, {"name": "b"}, {"name": "c"}]}, - "cases": [ - { - "comment": "Filter with or expression", - "expression": "foo[?name == 'a' || name == 'b']", - "result": [{"name": "a"}, {"name": "b"}] - }, - { - "expression": "foo[?name == 'a' || name == 'e']", - "result": [{"name": "a"}] - }, - { - "expression": "foo[?name == 'a' || name == 'b' || name == 'c']", - "result": [{"name": "a"}, {"name": "b"}, {"name": "c"}] - } - ] - }, - { - "given": {"foo": [{"a": 1, "b": 2}, {"a": 1, "b": 3}]}, - "cases": [ - { - "comment": "Filter with and expression", - "expression": "foo[?a == `1` && b == `2`]", - "result": [{"a": 1, "b": 2}] - }, - { - "expression": "foo[?a == `1` && b == `4`]", - "result": [] - } - ] - }, - { - "given": {"foo": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]}, - "cases": [ - { - "comment": "Filter with Or and And expressions", - "expression": "foo[?c == `3` || a == `1` && b == `4`]", - "result": [{"a": 1, "b": 2, "c": 3}] - }, - { - "expression": "foo[?b == `2` || a == `3` && b == `4`]", - "result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}] - }, - { - "expression": "foo[?a == `3` && b == `4` || b == `2`]", - "result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}] - }, - { - "expression": "foo[?(a == `3` && b == `4`) || b == `2`]", - "result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}] - }, - { - "expression": "foo[?((a == `3` && b == `4`)) || b == `2`]", - "result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}] - }, - { - "expression": "foo[?a == `3` && (b == `4` || b == `2`)]", - "result": [{"a": 3, "b": 4}] - }, - { - "expression": "foo[?a == `3` && ((b == `4` || b == `2`))]", - "result": [{"a": 3, "b": 4}] - } - ] - }, - { - "given": {"foo": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]}, - "cases": [ - { - "comment": "Verify precedence of or/and expressions", - "expression": "foo[?a == `1` || b ==`2` && c == `5`]", - "result": [{"a": 1, "b": 2, "c": 3}] - }, - { - "comment": "Parentheses can alter precedence", - "expression": "foo[?(a == `1` || b ==`2`) && c == `5`]", - "result": [] - }, - { - "comment": "Not expressions combined with and/or", - "expression": "foo[?!(a == `1` || b ==`2`)]", - "result": [{"a": 3, "b": 4}] - } - ] - }, - { - "given": { - "foo": [ - {"key": true}, - {"key": false}, - {"key": []}, - {"key": {}}, - {"key": [0]}, - {"key": {"a": "b"}}, - {"key": 0}, - {"key": 1}, - {"key": null}, - {"notkey": true} - ] - }, - "cases": [ - { - "comment": "Unary filter expression", - "expression": "foo[?key]", - "result": [ - {"key": true}, {"key": [0]}, {"key": {"a": "b"}}, - {"key": 0}, {"key": 1} - ] - }, - { - "comment": "Unary not filter expression", - "expression": "foo[?!key]", - "result": [ - {"key": false}, {"key": []}, {"key": {}}, - {"key": null}, {"notkey": true} - ] - }, - { - "comment": "Equality with null RHS", - "expression": "foo[?key == `null`]", - "result": [ - {"key": null}, {"notkey": true} - ] - } - ] - }, - { - "given": { - "foo": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - "cases": [ - { - "comment": "Using @ in a filter expression", - "expression": "foo[?@ < `5`]", - "result": [0, 1, 2, 3, 4] - }, - { - "comment": "Using @ in a filter expression", - "expression": "foo[?`5` > @]", - "result": [0, 1, 2, 3, 4] - }, - { - "comment": "Using @ in a filter expression", - "expression": "foo[?@ == @]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - } - ] - } -] diff --git a/node_modules/jmespath/test/compliance/functions.json b/node_modules/jmespath/test/compliance/functions.json deleted file mode 100644 index 8b8db363..00000000 --- a/node_modules/jmespath/test/compliance/functions.json +++ /dev/null @@ -1,825 +0,0 @@ -[{ - "given": - { - "foo": -1, - "zero": 0, - "numbers": [-1, 3, 4, 5], - "array": [-1, 3, 4, 5, "a", "100"], - "strings": ["a", "b", "c"], - "decimals": [1.01, 1.2, -1.5], - "str": "Str", - "false": false, - "empty_list": [], - "empty_hash": {}, - "objects": {"foo": "bar", "bar": "baz"}, - "null_key": null - }, - "cases": [ - { - "expression": "abs(foo)", - "result": 1 - }, - { - "expression": "abs(foo)", - "result": 1 - }, - { - "expression": "abs(str)", - "error": "invalid-type" - }, - { - "expression": "abs(array[1])", - "result": 3 - }, - { - "expression": "abs(array[1])", - "result": 3 - }, - { - "expression": "abs(`false`)", - "error": "invalid-type" - }, - { - "expression": "abs(`-24`)", - "result": 24 - }, - { - "expression": "abs(`-24`)", - "result": 24 - }, - { - "expression": "abs(`1`, `2`)", - "error": "invalid-arity" - }, - { - "expression": "abs()", - "error": "invalid-arity" - }, - { - "expression": "unknown_function(`1`, `2`)", - "error": "unknown-function" - }, - { - "expression": "avg(numbers)", - "result": 2.75 - }, - { - "expression": "avg(array)", - "error": "invalid-type" - }, - { - "expression": "avg('abc')", - "error": "invalid-type" - }, - { - "expression": "avg(foo)", - "error": "invalid-type" - }, - { - "expression": "avg(@)", - "error": "invalid-type" - }, - { - "expression": "avg(strings)", - "error": "invalid-type" - }, - { - "expression": "ceil(`1.2`)", - "result": 2 - }, - { - "expression": "ceil(decimals[0])", - "result": 2 - }, - { - "expression": "ceil(decimals[1])", - "result": 2 - }, - { - "expression": "ceil(decimals[2])", - "result": -1 - }, - { - "expression": "ceil('string')", - "error": "invalid-type" - }, - { - "expression": "contains('abc', 'a')", - "result": true - }, - { - "expression": "contains('abc', 'd')", - "result": false - }, - { - "expression": "contains(`false`, 'd')", - "error": "invalid-type" - }, - { - "expression": "contains(strings, 'a')", - "result": true - }, - { - "expression": "contains(decimals, `1.2`)", - "result": true - }, - { - "expression": "contains(decimals, `false`)", - "result": false - }, - { - "expression": "ends_with(str, 'r')", - "result": true - }, - { - "expression": "ends_with(str, 'tr')", - "result": true - }, - { - "expression": "ends_with(str, 'Str')", - "result": true - }, - { - "expression": "ends_with(str, 'SStr')", - "result": false - }, - { - "expression": "ends_with(str, 'foo')", - "result": false - }, - { - "expression": "ends_with(str, `0`)", - "error": "invalid-type" - }, - { - "expression": "floor(`1.2`)", - "result": 1 - }, - { - "expression": "floor('string')", - "error": "invalid-type" - }, - { - "expression": "floor(decimals[0])", - "result": 1 - }, - { - "expression": "floor(foo)", - "result": -1 - }, - { - "expression": "floor(str)", - "error": "invalid-type" - }, - { - "expression": "length('abc')", - "result": 3 - }, - { - "expression": "length('✓foo')", - "result": 4 - }, - { - "expression": "length('')", - "result": 0 - }, - { - "expression": "length(@)", - "result": 12 - }, - { - "expression": "length(strings[0])", - "result": 1 - }, - { - "expression": "length(str)", - "result": 3 - }, - { - "expression": "length(array)", - "result": 6 - }, - { - "expression": "length(objects)", - "result": 2 - }, - { - "expression": "length(`false`)", - "error": "invalid-type" - }, - { - "expression": "length(foo)", - "error": "invalid-type" - }, - { - "expression": "length(strings[0])", - "result": 1 - }, - { - "expression": "max(numbers)", - "result": 5 - }, - { - "expression": "max(decimals)", - "result": 1.2 - }, - { - "expression": "max(strings)", - "result": "c" - }, - { - "expression": "max(abc)", - "error": "invalid-type" - }, - { - "expression": "max(array)", - "error": "invalid-type" - }, - { - "expression": "max(decimals)", - "result": 1.2 - }, - { - "expression": "max(empty_list)", - "result": null - }, - { - "expression": "merge(`{}`)", - "result": {} - }, - { - "expression": "merge(`{}`, `{}`)", - "result": {} - }, - { - "expression": "merge(`{\"a\": 1}`, `{\"b\": 2}`)", - "result": {"a": 1, "b": 2} - }, - { - "expression": "merge(`{\"a\": 1}`, `{\"a\": 2}`)", - "result": {"a": 2} - }, - { - "expression": "merge(`{\"a\": 1, \"b\": 2}`, `{\"a\": 2, \"c\": 3}`, `{\"d\": 4}`)", - "result": {"a": 2, "b": 2, "c": 3, "d": 4} - }, - { - "expression": "min(numbers)", - "result": -1 - }, - { - "expression": "min(decimals)", - "result": -1.5 - }, - { - "expression": "min(abc)", - "error": "invalid-type" - }, - { - "expression": "min(array)", - "error": "invalid-type" - }, - { - "expression": "min(empty_list)", - "result": null - }, - { - "expression": "min(decimals)", - "result": -1.5 - }, - { - "expression": "min(strings)", - "result": "a" - }, - { - "expression": "type('abc')", - "result": "string" - }, - { - "expression": "type(`1.0`)", - "result": "number" - }, - { - "expression": "type(`2`)", - "result": "number" - }, - { - "expression": "type(`true`)", - "result": "boolean" - }, - { - "expression": "type(`false`)", - "result": "boolean" - }, - { - "expression": "type(`null`)", - "result": "null" - }, - { - "expression": "type(`[0]`)", - "result": "array" - }, - { - "expression": "type(`{\"a\": \"b\"}`)", - "result": "object" - }, - { - "expression": "type(@)", - "result": "object" - }, - { - "expression": "sort(keys(objects))", - "result": ["bar", "foo"] - }, - { - "expression": "keys(foo)", - "error": "invalid-type" - }, - { - "expression": "keys(strings)", - "error": "invalid-type" - }, - { - "expression": "keys(`false`)", - "error": "invalid-type" - }, - { - "expression": "sort(values(objects))", - "result": ["bar", "baz"] - }, - { - "expression": "keys(empty_hash)", - "result": [] - }, - { - "expression": "values(foo)", - "error": "invalid-type" - }, - { - "expression": "join(', ', strings)", - "result": "a, b, c" - }, - { - "expression": "join(', ', strings)", - "result": "a, b, c" - }, - { - "expression": "join(',', `[\"a\", \"b\"]`)", - "result": "a,b" - }, - { - "expression": "join(',', `[\"a\", 0]`)", - "error": "invalid-type" - }, - { - "expression": "join(', ', str)", - "error": "invalid-type" - }, - { - "expression": "join('|', strings)", - "result": "a|b|c" - }, - { - "expression": "join(`2`, strings)", - "error": "invalid-type" - }, - { - "expression": "join('|', decimals)", - "error": "invalid-type" - }, - { - "expression": "join('|', decimals[].to_string(@))", - "result": "1.01|1.2|-1.5" - }, - { - "expression": "join('|', empty_list)", - "result": "" - }, - { - "expression": "reverse(numbers)", - "result": [5, 4, 3, -1] - }, - { - "expression": "reverse(array)", - "result": ["100", "a", 5, 4, 3, -1] - }, - { - "expression": "reverse(`[]`)", - "result": [] - }, - { - "expression": "reverse('')", - "result": "" - }, - { - "expression": "reverse('hello world')", - "result": "dlrow olleh" - }, - { - "expression": "starts_with(str, 'S')", - "result": true - }, - { - "expression": "starts_with(str, 'St')", - "result": true - }, - { - "expression": "starts_with(str, 'Str')", - "result": true - }, - { - "expression": "starts_with(str, 'String')", - "result": false - }, - { - "expression": "starts_with(str, `0`)", - "error": "invalid-type" - }, - { - "expression": "sum(numbers)", - "result": 11 - }, - { - "expression": "sum(decimals)", - "result": 0.71 - }, - { - "expression": "sum(array)", - "error": "invalid-type" - }, - { - "expression": "sum(array[].to_number(@))", - "result": 111 - }, - { - "expression": "sum(`[]`)", - "result": 0 - }, - { - "expression": "to_array('foo')", - "result": ["foo"] - }, - { - "expression": "to_array(`0`)", - "result": [0] - }, - { - "expression": "to_array(objects)", - "result": [{"foo": "bar", "bar": "baz"}] - }, - { - "expression": "to_array(`[1, 2, 3]`)", - "result": [1, 2, 3] - }, - { - "expression": "to_array(false)", - "result": [false] - }, - { - "expression": "to_string('foo')", - "result": "foo" - }, - { - "expression": "to_string(`1.2`)", - "result": "1.2" - }, - { - "expression": "to_string(`[0, 1]`)", - "result": "[0,1]" - }, - { - "expression": "to_number('1.0')", - "result": 1.0 - }, - { - "expression": "to_number('1.1')", - "result": 1.1 - }, - { - "expression": "to_number('4')", - "result": 4 - }, - { - "expression": "to_number('notanumber')", - "result": null - }, - { - "expression": "to_number(`false`)", - "result": null - }, - { - "expression": "to_number(`null`)", - "result": null - }, - { - "expression": "to_number(`[0]`)", - "result": null - }, - { - "expression": "to_number(`{\"foo\": 0}`)", - "result": null - }, - { - "expression": "\"to_string\"(`1.0`)", - "error": "syntax" - }, - { - "expression": "sort(numbers)", - "result": [-1, 3, 4, 5] - }, - { - "expression": "sort(strings)", - "result": ["a", "b", "c"] - }, - { - "expression": "sort(decimals)", - "result": [-1.5, 1.01, 1.2] - }, - { - "expression": "sort(array)", - "error": "invalid-type" - }, - { - "expression": "sort(abc)", - "error": "invalid-type" - }, - { - "expression": "sort(empty_list)", - "result": [] - }, - { - "expression": "sort(@)", - "error": "invalid-type" - }, - { - "expression": "not_null(unknown_key, str)", - "result": "Str" - }, - { - "expression": "not_null(unknown_key, foo.bar, empty_list, str)", - "result": [] - }, - { - "expression": "not_null(unknown_key, null_key, empty_list, str)", - "result": [] - }, - { - "expression": "not_null(all, expressions, are_null)", - "result": null - }, - { - "expression": "not_null()", - "error": "invalid-arity" - }, - { - "description": "function projection on single arg function", - "expression": "numbers[].to_string(@)", - "result": ["-1", "3", "4", "5"] - }, - { - "description": "function projection on single arg function", - "expression": "array[].to_number(@)", - "result": [-1, 3, 4, 5, 100] - } - ] -}, { - "given": - { - "foo": [ - {"b": "b", "a": "a"}, - {"c": "c", "b": "b"}, - {"d": "d", "c": "c"}, - {"e": "e", "d": "d"}, - {"f": "f", "e": "e"} - ] - }, - "cases": [ - { - "description": "function projection on variadic function", - "expression": "foo[].not_null(f, e, d, c, b, a)", - "result": ["b", "c", "d", "e", "f"] - } - ] -}, { - "given": - { - "people": [ - {"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"}, - {"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"}, - {"age": 30, "age_str": "30", "bool": true, "name": "c"}, - {"age": 50, "age_str": "50", "bool": false, "name": "d"}, - {"age": 10, "age_str": "10", "bool": true, "name": 3} - ] - }, - "cases": [ - { - "description": "sort by field expression", - "expression": "sort_by(people, &age)", - "result": [ - {"age": 10, "age_str": "10", "bool": true, "name": 3}, - {"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"}, - {"age": 30, "age_str": "30", "bool": true, "name": "c"}, - {"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"}, - {"age": 50, "age_str": "50", "bool": false, "name": "d"} - ] - }, - { - "expression": "sort_by(people, &age_str)", - "result": [ - {"age": 10, "age_str": "10", "bool": true, "name": 3}, - {"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"}, - {"age": 30, "age_str": "30", "bool": true, "name": "c"}, - {"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"}, - {"age": 50, "age_str": "50", "bool": false, "name": "d"} - ] - }, - { - "description": "sort by function expression", - "expression": "sort_by(people, &to_number(age_str))", - "result": [ - {"age": 10, "age_str": "10", "bool": true, "name": 3}, - {"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"}, - {"age": 30, "age_str": "30", "bool": true, "name": "c"}, - {"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"}, - {"age": 50, "age_str": "50", "bool": false, "name": "d"} - ] - }, - { - "description": "function projection on sort_by function", - "expression": "sort_by(people, &age)[].name", - "result": [3, "a", "c", "b", "d"] - }, - { - "expression": "sort_by(people, &extra)", - "error": "invalid-type" - }, - { - "expression": "sort_by(people, &bool)", - "error": "invalid-type" - }, - { - "expression": "sort_by(people, &name)", - "error": "invalid-type" - }, - { - "expression": "sort_by(people, name)", - "error": "invalid-type" - }, - { - "expression": "sort_by(people, &age)[].extra", - "result": ["foo", "bar"] - }, - { - "expression": "sort_by(`[]`, &age)", - "result": [] - }, - { - "expression": "max_by(people, &age)", - "result": {"age": 50, "age_str": "50", "bool": false, "name": "d"} - }, - { - "expression": "max_by(people, &age_str)", - "result": {"age": 50, "age_str": "50", "bool": false, "name": "d"} - }, - { - "expression": "max_by(people, &bool)", - "error": "invalid-type" - }, - { - "expression": "max_by(people, &extra)", - "error": "invalid-type" - }, - { - "expression": "max_by(people, &to_number(age_str))", - "result": {"age": 50, "age_str": "50", "bool": false, "name": "d"} - }, - { - "expression": "min_by(people, &age)", - "result": {"age": 10, "age_str": "10", "bool": true, "name": 3} - }, - { - "expression": "min_by(people, &age_str)", - "result": {"age": 10, "age_str": "10", "bool": true, "name": 3} - }, - { - "expression": "min_by(people, &bool)", - "error": "invalid-type" - }, - { - "expression": "min_by(people, &extra)", - "error": "invalid-type" - }, - { - "expression": "min_by(people, &to_number(age_str))", - "result": {"age": 10, "age_str": "10", "bool": true, "name": 3} - } - ] -}, { - "given": - { - "people": [ - {"age": 10, "order": "1"}, - {"age": 10, "order": "2"}, - {"age": 10, "order": "3"}, - {"age": 10, "order": "4"}, - {"age": 10, "order": "5"}, - {"age": 10, "order": "6"}, - {"age": 10, "order": "7"}, - {"age": 10, "order": "8"}, - {"age": 10, "order": "9"}, - {"age": 10, "order": "10"}, - {"age": 10, "order": "11"} - ] - }, - "cases": [ - { - "description": "stable sort order", - "expression": "sort_by(people, &age)", - "result": [ - {"age": 10, "order": "1"}, - {"age": 10, "order": "2"}, - {"age": 10, "order": "3"}, - {"age": 10, "order": "4"}, - {"age": 10, "order": "5"}, - {"age": 10, "order": "6"}, - {"age": 10, "order": "7"}, - {"age": 10, "order": "8"}, - {"age": 10, "order": "9"}, - {"age": 10, "order": "10"}, - {"age": 10, "order": "11"} - ] - } - ] -}, { - "given": - { - "people": [ - {"a": 10, "b": 1, "c": "z"}, - {"a": 10, "b": 2, "c": null}, - {"a": 10, "b": 3}, - {"a": 10, "b": 4, "c": "z"}, - {"a": 10, "b": 5, "c": null}, - {"a": 10, "b": 6}, - {"a": 10, "b": 7, "c": "z"}, - {"a": 10, "b": 8, "c": null}, - {"a": 10, "b": 9} - ], - "empty": [] - }, - "cases": [ - { - "expression": "map(&a, people)", - "result": [10, 10, 10, 10, 10, 10, 10, 10, 10] - }, - { - "expression": "map(&c, people)", - "result": ["z", null, null, "z", null, null, "z", null, null] - }, - { - "expression": "map(&a, badkey)", - "error": "invalid-type" - }, - { - "expression": "map(&foo, empty)", - "result": [] - } - ] -}, { - "given": { - "array": [ - { - "foo": {"bar": "yes1"} - }, - { - "foo": {"bar": "yes2"} - }, - { - "foo1": {"bar": "no"} - } - ]}, - "cases": [ - { - "expression": "map(&foo.bar, array)", - "result": ["yes1", "yes2", null] - }, - { - "expression": "map(&foo1.bar, array)", - "result": [null, null, "no"] - }, - { - "expression": "map(&foo.bar.baz, array)", - "result": [null, null, null] - } - ] -}, { - "given": { - "array": [[1, 2, 3, [4]], [5, 6, 7, [8, 9]]] - }, - "cases": [ - { - "expression": "map(&[], array)", - "result": [[1, 2, 3, 4], [5, 6, 7, 8, 9]] - } - ] -} -] diff --git a/node_modules/jmespath/test/compliance/identifiers.json b/node_modules/jmespath/test/compliance/identifiers.json deleted file mode 100644 index 7998a41a..00000000 --- a/node_modules/jmespath/test/compliance/identifiers.json +++ /dev/null @@ -1,1377 +0,0 @@ -[ - { - "given": { - "__L": true - }, - "cases": [ - { - "expression": "__L", - "result": true - } - ] - }, - { - "given": { - "!\r": true - }, - "cases": [ - { - "expression": "\"!\\r\"", - "result": true - } - ] - }, - { - "given": { - "Y_1623": true - }, - "cases": [ - { - "expression": "Y_1623", - "result": true - } - ] - }, - { - "given": { - "x": true - }, - "cases": [ - { - "expression": "x", - "result": true - } - ] - }, - { - "given": { - "\tF\uCebb": true - }, - "cases": [ - { - "expression": "\"\\tF\\uCebb\"", - "result": true - } - ] - }, - { - "given": { - " \t": true - }, - "cases": [ - { - "expression": "\" \\t\"", - "result": true - } - ] - }, - { - "given": { - " ": true - }, - "cases": [ - { - "expression": "\" \"", - "result": true - } - ] - }, - { - "given": { - "v2": true - }, - "cases": [ - { - "expression": "v2", - "result": true - } - ] - }, - { - "given": { - "\t": true - }, - "cases": [ - { - "expression": "\"\\t\"", - "result": true - } - ] - }, - { - "given": { - "_X": true - }, - "cases": [ - { - "expression": "_X", - "result": true - } - ] - }, - { - "given": { - "\t4\ud9da\udd15": true - }, - "cases": [ - { - "expression": "\"\\t4\\ud9da\\udd15\"", - "result": true - } - ] - }, - { - "given": { - "v24_W": true - }, - "cases": [ - { - "expression": "v24_W", - "result": true - } - ] - }, - { - "given": { - "H": true - }, - "cases": [ - { - "expression": "\"H\"", - "result": true - } - ] - }, - { - "given": { - "\f": true - }, - "cases": [ - { - "expression": "\"\\f\"", - "result": true - } - ] - }, - { - "given": { - "E4": true - }, - "cases": [ - { - "expression": "\"E4\"", - "result": true - } - ] - }, - { - "given": { - "!": true - }, - "cases": [ - { - "expression": "\"!\"", - "result": true - } - ] - }, - { - "given": { - "tM": true - }, - "cases": [ - { - "expression": "tM", - "result": true - } - ] - }, - { - "given": { - " [": true - }, - "cases": [ - { - "expression": "\" [\"", - "result": true - } - ] - }, - { - "given": { - "R!": true - }, - "cases": [ - { - "expression": "\"R!\"", - "result": true - } - ] - }, - { - "given": { - "_6W": true - }, - "cases": [ - { - "expression": "_6W", - "result": true - } - ] - }, - { - "given": { - "\uaBA1\r": true - }, - "cases": [ - { - "expression": "\"\\uaBA1\\r\"", - "result": true - } - ] - }, - { - "given": { - "tL7": true - }, - "cases": [ - { - "expression": "tL7", - "result": true - } - ] - }, - { - "given": { - "<": true - }, - "cases": [ - { - "expression": "\">\"", - "result": true - } - ] - }, - { - "given": { - "hvu": true - }, - "cases": [ - { - "expression": "hvu", - "result": true - } - ] - }, - { - "given": { - "; !": true - }, - "cases": [ - { - "expression": "\"; !\"", - "result": true - } - ] - }, - { - "given": { - "hU": true - }, - "cases": [ - { - "expression": "hU", - "result": true - } - ] - }, - { - "given": { - "!I\n\/": true - }, - "cases": [ - { - "expression": "\"!I\\n\\/\"", - "result": true - } - ] - }, - { - "given": { - "\uEEbF": true - }, - "cases": [ - { - "expression": "\"\\uEEbF\"", - "result": true - } - ] - }, - { - "given": { - "U)\t": true - }, - "cases": [ - { - "expression": "\"U)\\t\"", - "result": true - } - ] - }, - { - "given": { - "fa0_9": true - }, - "cases": [ - { - "expression": "fa0_9", - "result": true - } - ] - }, - { - "given": { - "/": true - }, - "cases": [ - { - "expression": "\"/\"", - "result": true - } - ] - }, - { - "given": { - "Gy": true - }, - "cases": [ - { - "expression": "Gy", - "result": true - } - ] - }, - { - "given": { - "\b": true - }, - "cases": [ - { - "expression": "\"\\b\"", - "result": true - } - ] - }, - { - "given": { - "<": true - }, - "cases": [ - { - "expression": "\"<\"", - "result": true - } - ] - }, - { - "given": { - "\t": true - }, - "cases": [ - { - "expression": "\"\\t\"", - "result": true - } - ] - }, - { - "given": { - "\t&\\\r": true - }, - "cases": [ - { - "expression": "\"\\t&\\\\\\r\"", - "result": true - } - ] - }, - { - "given": { - "#": true - }, - "cases": [ - { - "expression": "\"#\"", - "result": true - } - ] - }, - { - "given": { - "B__": true - }, - "cases": [ - { - "expression": "B__", - "result": true - } - ] - }, - { - "given": { - "\nS \n": true - }, - "cases": [ - { - "expression": "\"\\nS \\n\"", - "result": true - } - ] - }, - { - "given": { - "Bp": true - }, - "cases": [ - { - "expression": "Bp", - "result": true - } - ] - }, - { - "given": { - ",\t;": true - }, - "cases": [ - { - "expression": "\",\\t;\"", - "result": true - } - ] - }, - { - "given": { - "B_q": true - }, - "cases": [ - { - "expression": "B_q", - "result": true - } - ] - }, - { - "given": { - "\/+\t\n\b!Z": true - }, - "cases": [ - { - "expression": "\"\\/+\\t\\n\\b!Z\"", - "result": true - } - ] - }, - { - "given": { - "\udadd\udfc7\\ueFAc": true - }, - "cases": [ - { - "expression": "\"\udadd\udfc7\\\\ueFAc\"", - "result": true - } - ] - }, - { - "given": { - ":\f": true - }, - "cases": [ - { - "expression": "\":\\f\"", - "result": true - } - ] - }, - { - "given": { - "\/": true - }, - "cases": [ - { - "expression": "\"\\/\"", - "result": true - } - ] - }, - { - "given": { - "_BW_6Hg_Gl": true - }, - "cases": [ - { - "expression": "_BW_6Hg_Gl", - "result": true - } - ] - }, - { - "given": { - "\udbcf\udc02": true - }, - "cases": [ - { - "expression": "\"\udbcf\udc02\"", - "result": true - } - ] - }, - { - "given": { - "zs1DC": true - }, - "cases": [ - { - "expression": "zs1DC", - "result": true - } - ] - }, - { - "given": { - "__434": true - }, - "cases": [ - { - "expression": "__434", - "result": true - } - ] - }, - { - "given": { - "\udb94\udd41": true - }, - "cases": [ - { - "expression": "\"\udb94\udd41\"", - "result": true - } - ] - }, - { - "given": { - "Z_5": true - }, - "cases": [ - { - "expression": "Z_5", - "result": true - } - ] - }, - { - "given": { - "z_M_": true - }, - "cases": [ - { - "expression": "z_M_", - "result": true - } - ] - }, - { - "given": { - "YU_2": true - }, - "cases": [ - { - "expression": "YU_2", - "result": true - } - ] - }, - { - "given": { - "_0": true - }, - "cases": [ - { - "expression": "_0", - "result": true - } - ] - }, - { - "given": { - "\b+": true - }, - "cases": [ - { - "expression": "\"\\b+\"", - "result": true - } - ] - }, - { - "given": { - "\"": true - }, - "cases": [ - { - "expression": "\"\\\"\"", - "result": true - } - ] - }, - { - "given": { - "D7": true - }, - "cases": [ - { - "expression": "D7", - "result": true - } - ] - }, - { - "given": { - "_62L": true - }, - "cases": [ - { - "expression": "_62L", - "result": true - } - ] - }, - { - "given": { - "\tK\t": true - }, - "cases": [ - { - "expression": "\"\\tK\\t\"", - "result": true - } - ] - }, - { - "given": { - "\n\\\f": true - }, - "cases": [ - { - "expression": "\"\\n\\\\\\f\"", - "result": true - } - ] - }, - { - "given": { - "I_": true - }, - "cases": [ - { - "expression": "I_", - "result": true - } - ] - }, - { - "given": { - "W_a0_": true - }, - "cases": [ - { - "expression": "W_a0_", - "result": true - } - ] - }, - { - "given": { - "BQ": true - }, - "cases": [ - { - "expression": "BQ", - "result": true - } - ] - }, - { - "given": { - "\tX$\uABBb": true - }, - "cases": [ - { - "expression": "\"\\tX$\\uABBb\"", - "result": true - } - ] - }, - { - "given": { - "Z9": true - }, - "cases": [ - { - "expression": "Z9", - "result": true - } - ] - }, - { - "given": { - "\b%\"\uda38\udd0f": true - }, - "cases": [ - { - "expression": "\"\\b%\\\"\uda38\udd0f\"", - "result": true - } - ] - }, - { - "given": { - "_F": true - }, - "cases": [ - { - "expression": "_F", - "result": true - } - ] - }, - { - "given": { - "!,": true - }, - "cases": [ - { - "expression": "\"!,\"", - "result": true - } - ] - }, - { - "given": { - "\"!": true - }, - "cases": [ - { - "expression": "\"\\\"!\"", - "result": true - } - ] - }, - { - "given": { - "Hh": true - }, - "cases": [ - { - "expression": "Hh", - "result": true - } - ] - }, - { - "given": { - "&": true - }, - "cases": [ - { - "expression": "\"&\"", - "result": true - } - ] - }, - { - "given": { - "9\r\\R": true - }, - "cases": [ - { - "expression": "\"9\\r\\\\R\"", - "result": true - } - ] - }, - { - "given": { - "M_k": true - }, - "cases": [ - { - "expression": "M_k", - "result": true - } - ] - }, - { - "given": { - "!\b\n\udb06\ude52\"\"": true - }, - "cases": [ - { - "expression": "\"!\\b\\n\udb06\ude52\\\"\\\"\"", - "result": true - } - ] - }, - { - "given": { - "6": true - }, - "cases": [ - { - "expression": "\"6\"", - "result": true - } - ] - }, - { - "given": { - "_7": true - }, - "cases": [ - { - "expression": "_7", - "result": true - } - ] - }, - { - "given": { - "0": true - }, - "cases": [ - { - "expression": "\"0\"", - "result": true - } - ] - }, - { - "given": { - "\\8\\": true - }, - "cases": [ - { - "expression": "\"\\\\8\\\\\"", - "result": true - } - ] - }, - { - "given": { - "b7eo": true - }, - "cases": [ - { - "expression": "b7eo", - "result": true - } - ] - }, - { - "given": { - "xIUo9": true - }, - "cases": [ - { - "expression": "xIUo9", - "result": true - } - ] - }, - { - "given": { - "5": true - }, - "cases": [ - { - "expression": "\"5\"", - "result": true - } - ] - }, - { - "given": { - "?": true - }, - "cases": [ - { - "expression": "\"?\"", - "result": true - } - ] - }, - { - "given": { - "sU": true - }, - "cases": [ - { - "expression": "sU", - "result": true - } - ] - }, - { - "given": { - "VH2&H\\\/": true - }, - "cases": [ - { - "expression": "\"VH2&H\\\\\\/\"", - "result": true - } - ] - }, - { - "given": { - "_C": true - }, - "cases": [ - { - "expression": "_C", - "result": true - } - ] - }, - { - "given": { - "_": true - }, - "cases": [ - { - "expression": "_", - "result": true - } - ] - }, - { - "given": { - "<\t": true - }, - "cases": [ - { - "expression": "\"<\\t\"", - "result": true - } - ] - }, - { - "given": { - "\uD834\uDD1E": true - }, - "cases": [ - { - "expression": "\"\\uD834\\uDD1E\"", - "result": true - } - ] - } -] diff --git a/node_modules/jmespath/test/compliance/indices.json b/node_modules/jmespath/test/compliance/indices.json deleted file mode 100644 index aa03b35d..00000000 --- a/node_modules/jmespath/test/compliance/indices.json +++ /dev/null @@ -1,346 +0,0 @@ -[{ - "given": - {"foo": {"bar": ["zero", "one", "two"]}}, - "cases": [ - { - "expression": "foo.bar[0]", - "result": "zero" - }, - { - "expression": "foo.bar[1]", - "result": "one" - }, - { - "expression": "foo.bar[2]", - "result": "two" - }, - { - "expression": "foo.bar[3]", - "result": null - }, - { - "expression": "foo.bar[-1]", - "result": "two" - }, - { - "expression": "foo.bar[-2]", - "result": "one" - }, - { - "expression": "foo.bar[-3]", - "result": "zero" - }, - { - "expression": "foo.bar[-4]", - "result": null - } - ] -}, -{ - "given": - {"foo": [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}]}, - "cases": [ - { - "expression": "foo.bar", - "result": null - }, - { - "expression": "foo[0].bar", - "result": "one" - }, - { - "expression": "foo[1].bar", - "result": "two" - }, - { - "expression": "foo[2].bar", - "result": "three" - }, - { - "expression": "foo[3].notbar", - "result": "four" - }, - { - "expression": "foo[3].bar", - "result": null - }, - { - "expression": "foo[0]", - "result": {"bar": "one"} - }, - { - "expression": "foo[1]", - "result": {"bar": "two"} - }, - { - "expression": "foo[2]", - "result": {"bar": "three"} - }, - { - "expression": "foo[3]", - "result": {"notbar": "four"} - }, - { - "expression": "foo[4]", - "result": null - } - ] -}, -{ - "given": [ - "one", "two", "three" - ], - "cases": [ - { - "expression": "[0]", - "result": "one" - }, - { - "expression": "[1]", - "result": "two" - }, - { - "expression": "[2]", - "result": "three" - }, - { - "expression": "[-1]", - "result": "three" - }, - { - "expression": "[-2]", - "result": "two" - }, - { - "expression": "[-3]", - "result": "one" - } - ] -}, -{ - "given": {"reservations": [ - {"instances": [{"foo": 1}, {"foo": 2}]} - ]}, - "cases": [ - { - "expression": "reservations[].instances[].foo", - "result": [1, 2] - }, - { - "expression": "reservations[].instances[].bar", - "result": [] - }, - { - "expression": "reservations[].notinstances[].foo", - "result": [] - }, - { - "expression": "reservations[].notinstances[].foo", - "result": [] - } - ] -}, -{ - "given": {"reservations": [{ - "instances": [ - {"foo": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]}, - {"foo": [{"bar": 5}, {"bar": 6}, {"notbar": [7]}, {"bar": 8}]}, - {"foo": "bar"}, - {"notfoo": [{"bar": 20}, {"bar": 21}, {"notbar": [7]}, {"bar": 22}]}, - {"bar": [{"baz": [1]}, {"baz": [2]}, {"baz": [3]}, {"baz": [4]}]}, - {"baz": [{"baz": [1, 2]}, {"baz": []}, {"baz": []}, {"baz": [3, 4]}]}, - {"qux": [{"baz": []}, {"baz": [1, 2, 3]}, {"baz": [4]}, {"baz": []}]} - ], - "otherkey": {"foo": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]} - }, { - "instances": [ - {"a": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]}, - {"b": [{"bar": 5}, {"bar": 6}, {"notbar": [7]}, {"bar": 8}]}, - {"c": "bar"}, - {"notfoo": [{"bar": 23}, {"bar": 24}, {"notbar": [7]}, {"bar": 25}]}, - {"qux": [{"baz": []}, {"baz": [1, 2, 3]}, {"baz": [4]}, {"baz": []}]} - ], - "otherkey": {"foo": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]} - } - ]}, - "cases": [ - { - "expression": "reservations[].instances[].foo[].bar", - "result": [1, 2, 4, 5, 6, 8] - }, - { - "expression": "reservations[].instances[].foo[].baz", - "result": [] - }, - { - "expression": "reservations[].instances[].notfoo[].bar", - "result": [20, 21, 22, 23, 24, 25] - }, - { - "expression": "reservations[].instances[].notfoo[].notbar", - "result": [[7], [7]] - }, - { - "expression": "reservations[].notinstances[].foo", - "result": [] - }, - { - "expression": "reservations[].instances[].foo[].notbar", - "result": [3, [7]] - }, - { - "expression": "reservations[].instances[].bar[].baz", - "result": [[1], [2], [3], [4]] - }, - { - "expression": "reservations[].instances[].baz[].baz", - "result": [[1, 2], [], [], [3, 4]] - }, - { - "expression": "reservations[].instances[].qux[].baz", - "result": [[], [1, 2, 3], [4], [], [], [1, 2, 3], [4], []] - }, - { - "expression": "reservations[].instances[].qux[].baz[]", - "result": [1, 2, 3, 4, 1, 2, 3, 4] - } - ] -}, -{ - "given": { - "foo": [ - [["one", "two"], ["three", "four"]], - [["five", "six"], ["seven", "eight"]], - [["nine"], ["ten"]] - ] - }, - "cases": [ - { - "expression": "foo[]", - "result": [["one", "two"], ["three", "four"], ["five", "six"], - ["seven", "eight"], ["nine"], ["ten"]] - }, - { - "expression": "foo[][0]", - "result": ["one", "three", "five", "seven", "nine", "ten"] - }, - { - "expression": "foo[][1]", - "result": ["two", "four", "six", "eight"] - }, - { - "expression": "foo[][0][0]", - "result": [] - }, - { - "expression": "foo[][2][2]", - "result": [] - }, - { - "expression": "foo[][0][0][100]", - "result": [] - } - ] -}, -{ - "given": { - "foo": [{ - "bar": [ - { - "qux": 2, - "baz": 1 - }, - { - "qux": 4, - "baz": 3 - } - ] - }, - { - "bar": [ - { - "qux": 6, - "baz": 5 - }, - { - "qux": 8, - "baz": 7 - } - ] - } - ] - }, - "cases": [ - { - "expression": "foo", - "result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]}, - {"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}] - }, - { - "expression": "foo[]", - "result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]}, - {"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}] - }, - { - "expression": "foo[].bar", - "result": [[{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}], - [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]] - }, - { - "expression": "foo[].bar[]", - "result": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}, - {"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}] - }, - { - "expression": "foo[].bar[].baz", - "result": [1, 3, 5, 7] - } - ] -}, -{ - "given": { - "string": "string", - "hash": {"foo": "bar", "bar": "baz"}, - "number": 23, - "nullvalue": null - }, - "cases": [ - { - "expression": "string[]", - "result": null - }, - { - "expression": "hash[]", - "result": null - }, - { - "expression": "number[]", - "result": null - }, - { - "expression": "nullvalue[]", - "result": null - }, - { - "expression": "string[].foo", - "result": null - }, - { - "expression": "hash[].foo", - "result": null - }, - { - "expression": "number[].foo", - "result": null - }, - { - "expression": "nullvalue[].foo", - "result": null - }, - { - "expression": "nullvalue[].foo[].bar", - "result": null - } - ] -} -] diff --git a/node_modules/jmespath/test/compliance/literal.json b/node_modules/jmespath/test/compliance/literal.json deleted file mode 100644 index b796d36d..00000000 --- a/node_modules/jmespath/test/compliance/literal.json +++ /dev/null @@ -1,190 +0,0 @@ -[ - { - "given": { - "foo": [{"name": "a"}, {"name": "b"}], - "bar": {"baz": "qux"} - }, - "cases": [ - { - "expression": "`\"foo\"`", - "result": "foo" - }, - { - "comment": "Interpret escaped unicode.", - "expression": "`\"\\u03a6\"`", - "result": "Φ" - }, - { - "expression": "`\"✓\"`", - "result": "✓" - }, - { - "expression": "`[1, 2, 3]`", - "result": [1, 2, 3] - }, - { - "expression": "`{\"a\": \"b\"}`", - "result": {"a": "b"} - }, - { - "expression": "`true`", - "result": true - }, - { - "expression": "`false`", - "result": false - }, - { - "expression": "`null`", - "result": null - }, - { - "expression": "`0`", - "result": 0 - }, - { - "expression": "`1`", - "result": 1 - }, - { - "expression": "`2`", - "result": 2 - }, - { - "expression": "`3`", - "result": 3 - }, - { - "expression": "`4`", - "result": 4 - }, - { - "expression": "`5`", - "result": 5 - }, - { - "expression": "`6`", - "result": 6 - }, - { - "expression": "`7`", - "result": 7 - }, - { - "expression": "`8`", - "result": 8 - }, - { - "expression": "`9`", - "result": 9 - }, - { - "comment": "Escaping a backtick in quotes", - "expression": "`\"foo\\`bar\"`", - "result": "foo`bar" - }, - { - "comment": "Double quote in literal", - "expression": "`\"foo\\\"bar\"`", - "result": "foo\"bar" - }, - { - "expression": "`\"1\\`\"`", - "result": "1`" - }, - { - "comment": "Multiple literal expressions with escapes", - "expression": "`\"\\\\\"`.{a:`\"b\"`}", - "result": {"a": "b"} - }, - { - "comment": "literal . identifier", - "expression": "`{\"a\": \"b\"}`.a", - "result": "b" - }, - { - "comment": "literal . identifier . identifier", - "expression": "`{\"a\": {\"b\": \"c\"}}`.a.b", - "result": "c" - }, - { - "comment": "literal . identifier bracket-expr", - "expression": "`[0, 1, 2]`[1]", - "result": 1 - } - ] - }, - { - "comment": "Literals", - "given": {"type": "object"}, - "cases": [ - { - "comment": "Literal with leading whitespace", - "expression": "` {\"foo\": true}`", - "result": {"foo": true} - }, - { - "comment": "Literal with trailing whitespace", - "expression": "`{\"foo\": true} `", - "result": {"foo": true} - }, - { - "comment": "Literal on RHS of subexpr not allowed", - "expression": "foo.`\"bar\"`", - "error": "syntax" - } - ] - }, - { - "comment": "Raw String Literals", - "given": {}, - "cases": [ - { - "expression": "'foo'", - "result": "foo" - }, - { - "expression": "' foo '", - "result": " foo " - }, - { - "expression": "'0'", - "result": "0" - }, - { - "expression": "'newline\n'", - "result": "newline\n" - }, - { - "expression": "'\n'", - "result": "\n" - }, - { - "expression": "'✓'", - "result": "✓" - }, - { - "expression": "'𝄞'", - "result": "𝄞" - }, - { - "expression": "' [foo] '", - "result": " [foo] " - }, - { - "expression": "'[foo]'", - "result": "[foo]" - }, - { - "comment": "Do not interpret escaped unicode.", - "expression": "'\\u03a6'", - "result": "\\u03a6" - }, - { - "comment": "Can escape the single quote", - "expression": "'foo\\'bar'", - "result": "foo'bar" - } - ] - } -] diff --git a/node_modules/jmespath/test/compliance/multiselect.json b/node_modules/jmespath/test/compliance/multiselect.json deleted file mode 100644 index 8f2a481e..00000000 --- a/node_modules/jmespath/test/compliance/multiselect.json +++ /dev/null @@ -1,393 +0,0 @@ -[{ - "given": { - "foo": { - "bar": "bar", - "baz": "baz", - "qux": "qux", - "nested": { - "one": { - "a": "first", - "b": "second", - "c": "third" - }, - "two": { - "a": "first", - "b": "second", - "c": "third" - }, - "three": { - "a": "first", - "b": "second", - "c": {"inner": "third"} - } - } - }, - "bar": 1, - "baz": 2, - "qux\"": 3 - }, - "cases": [ - { - "expression": "foo.{bar: bar}", - "result": {"bar": "bar"} - }, - { - "expression": "foo.{\"bar\": bar}", - "result": {"bar": "bar"} - }, - { - "expression": "foo.{\"foo.bar\": bar}", - "result": {"foo.bar": "bar"} - }, - { - "expression": "foo.{bar: bar, baz: baz}", - "result": {"bar": "bar", "baz": "baz"} - }, - { - "expression": "foo.{\"bar\": bar, \"baz\": baz}", - "result": {"bar": "bar", "baz": "baz"} - }, - { - "expression": "{\"baz\": baz, \"qux\\\"\": \"qux\\\"\"}", - "result": {"baz": 2, "qux\"": 3} - }, - { - "expression": "foo.{bar:bar,baz:baz}", - "result": {"bar": "bar", "baz": "baz"} - }, - { - "expression": "foo.{bar: bar,qux: qux}", - "result": {"bar": "bar", "qux": "qux"} - }, - { - "expression": "foo.{bar: bar, noexist: noexist}", - "result": {"bar": "bar", "noexist": null} - }, - { - "expression": "foo.{noexist: noexist, alsonoexist: alsonoexist}", - "result": {"noexist": null, "alsonoexist": null} - }, - { - "expression": "foo.badkey.{nokey: nokey, alsonokey: alsonokey}", - "result": null - }, - { - "expression": "foo.nested.*.{a: a,b: b}", - "result": [{"a": "first", "b": "second"}, - {"a": "first", "b": "second"}, - {"a": "first", "b": "second"}] - }, - { - "expression": "foo.nested.three.{a: a, cinner: c.inner}", - "result": {"a": "first", "cinner": "third"} - }, - { - "expression": "foo.nested.three.{a: a, c: c.inner.bad.key}", - "result": {"a": "first", "c": null} - }, - { - "expression": "foo.{a: nested.one.a, b: nested.two.b}", - "result": {"a": "first", "b": "second"} - }, - { - "expression": "{bar: bar, baz: baz}", - "result": {"bar": 1, "baz": 2} - }, - { - "expression": "{bar: bar}", - "result": {"bar": 1} - }, - { - "expression": "{otherkey: bar}", - "result": {"otherkey": 1} - }, - { - "expression": "{no: no, exist: exist}", - "result": {"no": null, "exist": null} - }, - { - "expression": "foo.[bar]", - "result": ["bar"] - }, - { - "expression": "foo.[bar,baz]", - "result": ["bar", "baz"] - }, - { - "expression": "foo.[bar,qux]", - "result": ["bar", "qux"] - }, - { - "expression": "foo.[bar,noexist]", - "result": ["bar", null] - }, - { - "expression": "foo.[noexist,alsonoexist]", - "result": [null, null] - } - ] -}, { - "given": { - "foo": {"bar": 1, "baz": [2, 3, 4]} - }, - "cases": [ - { - "expression": "foo.{bar:bar,baz:baz}", - "result": {"bar": 1, "baz": [2, 3, 4]} - }, - { - "expression": "foo.[bar,baz[0]]", - "result": [1, 2] - }, - { - "expression": "foo.[bar,baz[1]]", - "result": [1, 3] - }, - { - "expression": "foo.[bar,baz[2]]", - "result": [1, 4] - }, - { - "expression": "foo.[bar,baz[3]]", - "result": [1, null] - }, - { - "expression": "foo.[bar[0],baz[3]]", - "result": [null, null] - } - ] -}, { - "given": { - "foo": {"bar": 1, "baz": 2} - }, - "cases": [ - { - "expression": "foo.{bar: bar, baz: baz}", - "result": {"bar": 1, "baz": 2} - }, - { - "expression": "foo.[bar,baz]", - "result": [1, 2] - } - ] -}, { - "given": { - "foo": { - "bar": {"baz": [{"common": "first", "one": 1}, - {"common": "second", "two": 2}]}, - "ignoreme": 1, - "includeme": true - } - }, - "cases": [ - { - "expression": "foo.{bar: bar.baz[1],includeme: includeme}", - "result": {"bar": {"common": "second", "two": 2}, "includeme": true} - }, - { - "expression": "foo.{\"bar.baz.two\": bar.baz[1].two, includeme: includeme}", - "result": {"bar.baz.two": 2, "includeme": true} - }, - { - "expression": "foo.[includeme, bar.baz[*].common]", - "result": [true, ["first", "second"]] - }, - { - "expression": "foo.[includeme, bar.baz[*].none]", - "result": [true, []] - }, - { - "expression": "foo.[includeme, bar.baz[].common]", - "result": [true, ["first", "second"]] - } - ] -}, { - "given": { - "reservations": [{ - "instances": [ - {"id": "id1", - "name": "first"}, - {"id": "id2", - "name": "second"} - ]}, { - "instances": [ - {"id": "id3", - "name": "third"}, - {"id": "id4", - "name": "fourth"} - ]} - ]}, - "cases": [ - { - "expression": "reservations[*].instances[*].{id: id, name: name}", - "result": [[{"id": "id1", "name": "first"}, {"id": "id2", "name": "second"}], - [{"id": "id3", "name": "third"}, {"id": "id4", "name": "fourth"}]] - }, - { - "expression": "reservations[].instances[].{id: id, name: name}", - "result": [{"id": "id1", "name": "first"}, - {"id": "id2", "name": "second"}, - {"id": "id3", "name": "third"}, - {"id": "id4", "name": "fourth"}] - }, - { - "expression": "reservations[].instances[].[id, name]", - "result": [["id1", "first"], - ["id2", "second"], - ["id3", "third"], - ["id4", "fourth"]] - } - ] -}, -{ - "given": { - "foo": [{ - "bar": [ - { - "qux": 2, - "baz": 1 - }, - { - "qux": 4, - "baz": 3 - } - ] - }, - { - "bar": [ - { - "qux": 6, - "baz": 5 - }, - { - "qux": 8, - "baz": 7 - } - ] - } - ] - }, - "cases": [ - { - "expression": "foo", - "result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]}, - {"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}] - }, - { - "expression": "foo[]", - "result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]}, - {"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}] - }, - { - "expression": "foo[].bar", - "result": [[{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}], - [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]] - }, - { - "expression": "foo[].bar[]", - "result": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}, - {"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}] - }, - { - "expression": "foo[].bar[].[baz, qux]", - "result": [[1, 2], [3, 4], [5, 6], [7, 8]] - }, - { - "expression": "foo[].bar[].[baz]", - "result": [[1], [3], [5], [7]] - }, - { - "expression": "foo[].bar[].[baz, qux][]", - "result": [1, 2, 3, 4, 5, 6, 7, 8] - } - ] -}, -{ - "given": { - "foo": { - "baz": [ - { - "bar": "abc" - }, { - "bar": "def" - } - ], - "qux": ["zero"] - } - }, - "cases": [ - { - "expression": "foo.[baz[*].bar, qux[0]]", - "result": [["abc", "def"], "zero"] - } - ] -}, -{ - "given": { - "foo": { - "baz": [ - { - "bar": "a", - "bam": "b", - "boo": "c" - }, { - "bar": "d", - "bam": "e", - "boo": "f" - } - ], - "qux": ["zero"] - } - }, - "cases": [ - { - "expression": "foo.[baz[*].[bar, boo], qux[0]]", - "result": [[["a", "c" ], ["d", "f" ]], "zero"] - } - ] -}, -{ - "given": { - "foo": { - "baz": [ - { - "bar": "a", - "bam": "b", - "boo": "c" - }, { - "bar": "d", - "bam": "e", - "boo": "f" - } - ], - "qux": ["zero"] - } - }, - "cases": [ - { - "expression": "foo.[baz[*].not_there || baz[*].bar, qux[0]]", - "result": [["a", "d"], "zero"] - } - ] -}, -{ - "given": {"type": "object"}, - "cases": [ - { - "comment": "Nested multiselect", - "expression": "[[*],*]", - "result": [null, ["object"]] - } - ] -}, -{ - "given": [], - "cases": [ - { - "comment": "Nested multiselect", - "expression": "[[*]]", - "result": [[]] - } - ] -} -] diff --git a/node_modules/jmespath/test/compliance/pipe.json b/node_modules/jmespath/test/compliance/pipe.json deleted file mode 100644 index b10c0a49..00000000 --- a/node_modules/jmespath/test/compliance/pipe.json +++ /dev/null @@ -1,131 +0,0 @@ -[{ - "given": { - "foo": { - "bar": { - "baz": "subkey" - }, - "other": { - "baz": "subkey" - }, - "other2": { - "baz": "subkey" - }, - "other3": { - "notbaz": ["a", "b", "c"] - }, - "other4": { - "notbaz": ["a", "b", "c"] - } - } - }, - "cases": [ - { - "expression": "foo.*.baz | [0]", - "result": "subkey" - }, - { - "expression": "foo.*.baz | [1]", - "result": "subkey" - }, - { - "expression": "foo.*.baz | [2]", - "result": "subkey" - }, - { - "expression": "foo.bar.* | [0]", - "result": "subkey" - }, - { - "expression": "foo.*.notbaz | [*]", - "result": [["a", "b", "c"], ["a", "b", "c"]] - }, - { - "expression": "{\"a\": foo.bar, \"b\": foo.other} | *.baz", - "result": ["subkey", "subkey"] - } - ] -}, { - "given": { - "foo": { - "bar": { - "baz": "one" - }, - "other": { - "baz": "two" - }, - "other2": { - "baz": "three" - }, - "other3": { - "notbaz": ["a", "b", "c"] - }, - "other4": { - "notbaz": ["d", "e", "f"] - } - } - }, - "cases": [ - { - "expression": "foo | bar", - "result": {"baz": "one"} - }, - { - "expression": "foo | bar | baz", - "result": "one" - }, - { - "expression": "foo|bar| baz", - "result": "one" - }, - { - "expression": "not_there | [0]", - "result": null - }, - { - "expression": "not_there | [0]", - "result": null - }, - { - "expression": "[foo.bar, foo.other] | [0]", - "result": {"baz": "one"} - }, - { - "expression": "{\"a\": foo.bar, \"b\": foo.other} | a", - "result": {"baz": "one"} - }, - { - "expression": "{\"a\": foo.bar, \"b\": foo.other} | b", - "result": {"baz": "two"} - }, - { - "expression": "foo.bam || foo.bar | baz", - "result": "one" - }, - { - "expression": "foo | not_there || bar", - "result": {"baz": "one"} - } - ] -}, { - "given": { - "foo": [{ - "bar": [{ - "baz": "one" - }, { - "baz": "two" - }] - }, { - "bar": [{ - "baz": "three" - }, { - "baz": "four" - }] - }] - }, - "cases": [ - { - "expression": "foo[*].bar[*] | [0][0]", - "result": {"baz": "one"} - } - ] -}] diff --git a/node_modules/jmespath/test/compliance/slice.json b/node_modules/jmespath/test/compliance/slice.json deleted file mode 100644 index 35947727..00000000 --- a/node_modules/jmespath/test/compliance/slice.json +++ /dev/null @@ -1,187 +0,0 @@ -[{ - "given": { - "foo": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], - "bar": { - "baz": 1 - } - }, - "cases": [ - { - "expression": "bar[0:10]", - "result": null - }, - { - "expression": "foo[0:10:1]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[0:10]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[0:10:]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[0::1]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[0::]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[0:]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[:10:1]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[::1]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[:10:]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[::]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[:]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[1:9]", - "result": [1, 2, 3, 4, 5, 6, 7, 8] - }, - { - "expression": "foo[0:10:2]", - "result": [0, 2, 4, 6, 8] - }, - { - "expression": "foo[5:]", - "result": [5, 6, 7, 8, 9] - }, - { - "expression": "foo[5::2]", - "result": [5, 7, 9] - }, - { - "expression": "foo[::2]", - "result": [0, 2, 4, 6, 8] - }, - { - "expression": "foo[::-1]", - "result": [9, 8, 7, 6, 5, 4, 3, 2, 1, 0] - }, - { - "expression": "foo[1::2]", - "result": [1, 3, 5, 7, 9] - }, - { - "expression": "foo[10:0:-1]", - "result": [9, 8, 7, 6, 5, 4, 3, 2, 1] - }, - { - "expression": "foo[10:5:-1]", - "result": [9, 8, 7, 6] - }, - { - "expression": "foo[8:2:-2]", - "result": [8, 6, 4] - }, - { - "expression": "foo[0:20]", - "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - }, - { - "expression": "foo[10:-20:-1]", - "result": [9, 8, 7, 6, 5, 4, 3, 2, 1, 0] - }, - { - "expression": "foo[10:-20]", - "result": [] - }, - { - "expression": "foo[-4:-1]", - "result": [6, 7, 8] - }, - { - "expression": "foo[:-5:-1]", - "result": [9, 8, 7, 6] - }, - { - "expression": "foo[8:2:0]", - "error": "invalid-value" - }, - { - "expression": "foo[8:2:0:1]", - "error": "syntax" - }, - { - "expression": "foo[8:2&]", - "error": "syntax" - }, - { - "expression": "foo[2:a:3]", - "error": "syntax" - } - ] -}, { - "given": { - "foo": [{"a": 1}, {"a": 2}, {"a": 3}], - "bar": [{"a": {"b": 1}}, {"a": {"b": 2}}, - {"a": {"b": 3}}], - "baz": 50 - }, - "cases": [ - { - "expression": "foo[:2].a", - "result": [1, 2] - }, - { - "expression": "foo[:2].b", - "result": [] - }, - { - "expression": "foo[:2].a.b", - "result": [] - }, - { - "expression": "bar[::-1].a.b", - "result": [3, 2, 1] - }, - { - "expression": "bar[:2].a.b", - "result": [1, 2] - }, - { - "expression": "baz[:2].a", - "result": null - } - ] -}, { - "given": [{"a": 1}, {"a": 2}, {"a": 3}], - "cases": [ - { - "expression": "[:]", - "result": [{"a": 1}, {"a": 2}, {"a": 3}] - }, - { - "expression": "[:2].a", - "result": [1, 2] - }, - { - "expression": "[::-1].a", - "result": [3, 2, 1] - }, - { - "expression": "[:2].b", - "result": [] - } - ] -}] diff --git a/node_modules/jmespath/test/compliance/syntax.json b/node_modules/jmespath/test/compliance/syntax.json deleted file mode 100644 index 003c2945..00000000 --- a/node_modules/jmespath/test/compliance/syntax.json +++ /dev/null @@ -1,616 +0,0 @@ -[{ - "comment": "Dot syntax", - "given": {"type": "object"}, - "cases": [ - { - "expression": "foo.bar", - "result": null - }, - { - "expression": "foo.1", - "error": "syntax" - }, - { - "expression": "foo.-11", - "error": "syntax" - }, - { - "expression": "foo", - "result": null - }, - { - "expression": "foo.", - "error": "syntax" - }, - { - "expression": "foo.", - "error": "syntax" - }, - { - "expression": ".foo", - "error": "syntax" - }, - { - "expression": "foo..bar", - "error": "syntax" - }, - { - "expression": "foo.bar.", - "error": "syntax" - }, - { - "expression": "foo[.]", - "error": "syntax" - } - ] -}, - { - "comment": "Simple token errors", - "given": {"type": "object"}, - "cases": [ - { - "expression": ".", - "error": "syntax" - }, - { - "expression": ":", - "error": "syntax" - }, - { - "expression": ",", - "error": "syntax" - }, - { - "expression": "]", - "error": "syntax" - }, - { - "expression": "[", - "error": "syntax" - }, - { - "expression": "}", - "error": "syntax" - }, - { - "expression": "{", - "error": "syntax" - }, - { - "expression": ")", - "error": "syntax" - }, - { - "expression": "(", - "error": "syntax" - }, - { - "expression": "((&", - "error": "syntax" - }, - { - "expression": "a[", - "error": "syntax" - }, - { - "expression": "a]", - "error": "syntax" - }, - { - "expression": "a][", - "error": "syntax" - }, - { - "expression": "!", - "error": "syntax" - } - ] - }, - { - "comment": "Boolean syntax errors", - "given": {"type": "object"}, - "cases": [ - { - "expression": "![!(!", - "error": "syntax" - } - ] - }, - { - "comment": "Wildcard syntax", - "given": {"type": "object"}, - "cases": [ - { - "expression": "*", - "result": ["object"] - }, - { - "expression": "*.*", - "result": [] - }, - { - "expression": "*.foo", - "result": [] - }, - { - "expression": "*[0]", - "result": [] - }, - { - "expression": ".*", - "error": "syntax" - }, - { - "expression": "*foo", - "error": "syntax" - }, - { - "expression": "*0", - "error": "syntax" - }, - { - "expression": "foo[*]bar", - "error": "syntax" - }, - { - "expression": "foo[*]*", - "error": "syntax" - } - ] - }, - { - "comment": "Flatten syntax", - "given": {"type": "object"}, - "cases": [ - { - "expression": "[]", - "result": null - } - ] - }, - { - "comment": "Simple bracket syntax", - "given": {"type": "object"}, - "cases": [ - { - "expression": "[0]", - "result": null - }, - { - "expression": "[*]", - "result": null - }, - { - "expression": "*.[0]", - "error": "syntax" - }, - { - "expression": "*.[\"0\"]", - "result": [[null]] - }, - { - "expression": "[*].bar", - "result": null - }, - { - "expression": "[*][0]", - "result": null - }, - { - "expression": "foo[#]", - "error": "syntax" - } - ] - }, - { - "comment": "Multi-select list syntax", - "given": {"type": "object"}, - "cases": [ - { - "expression": "foo[0]", - "result": null - }, - { - "comment": "Valid multi-select of a list", - "expression": "foo[0, 1]", - "error": "syntax" - }, - { - "expression": "foo.[0]", - "error": "syntax" - }, - { - "expression": "foo.[*]", - "result": null - }, - { - "comment": "Multi-select of a list with trailing comma", - "expression": "foo[0, ]", - "error": "syntax" - }, - { - "comment": "Multi-select of a list with trailing comma and no close", - "expression": "foo[0,", - "error": "syntax" - }, - { - "comment": "Multi-select of a list with trailing comma and no close", - "expression": "foo.[a", - "error": "syntax" - }, - { - "comment": "Multi-select of a list with extra comma", - "expression": "foo[0,, 1]", - "error": "syntax" - }, - { - "comment": "Multi-select of a list using an identifier index", - "expression": "foo[abc]", - "error": "syntax" - }, - { - "comment": "Multi-select of a list using identifier indices", - "expression": "foo[abc, def]", - "error": "syntax" - }, - { - "comment": "Multi-select of a list using an identifier index", - "expression": "foo[abc, 1]", - "error": "syntax" - }, - { - "comment": "Multi-select of a list using an identifier index with trailing comma", - "expression": "foo[abc, ]", - "error": "syntax" - }, - { - "comment": "Valid multi-select of a hash using an identifier index", - "expression": "foo.[abc]", - "result": null - }, - { - "comment": "Valid multi-select of a hash", - "expression": "foo.[abc, def]", - "result": null - }, - { - "comment": "Multi-select of a hash using a numeric index", - "expression": "foo.[abc, 1]", - "error": "syntax" - }, - { - "comment": "Multi-select of a hash with a trailing comma", - "expression": "foo.[abc, ]", - "error": "syntax" - }, - { - "comment": "Multi-select of a hash with extra commas", - "expression": "foo.[abc,, def]", - "error": "syntax" - }, - { - "comment": "Multi-select of a hash using number indices", - "expression": "foo.[0, 1]", - "error": "syntax" - } - ] - }, - { - "comment": "Multi-select hash syntax", - "given": {"type": "object"}, - "cases": [ - { - "comment": "No key or value", - "expression": "a{}", - "error": "syntax" - }, - { - "comment": "No closing token", - "expression": "a{", - "error": "syntax" - }, - { - "comment": "Not a key value pair", - "expression": "a{foo}", - "error": "syntax" - }, - { - "comment": "Missing value and closing character", - "expression": "a{foo:", - "error": "syntax" - }, - { - "comment": "Missing closing character", - "expression": "a{foo: 0", - "error": "syntax" - }, - { - "comment": "Missing value", - "expression": "a{foo:}", - "error": "syntax" - }, - { - "comment": "Trailing comma and no closing character", - "expression": "a{foo: 0, ", - "error": "syntax" - }, - { - "comment": "Missing value with trailing comma", - "expression": "a{foo: ,}", - "error": "syntax" - }, - { - "comment": "Accessing Array using an identifier", - "expression": "a{foo: bar}", - "error": "syntax" - }, - { - "expression": "a{foo: 0}", - "error": "syntax" - }, - { - "comment": "Missing key-value pair", - "expression": "a.{}", - "error": "syntax" - }, - { - "comment": "Not a key-value pair", - "expression": "a.{foo}", - "error": "syntax" - }, - { - "comment": "Missing value", - "expression": "a.{foo:}", - "error": "syntax" - }, - { - "comment": "Missing value with trailing comma", - "expression": "a.{foo: ,}", - "error": "syntax" - }, - { - "comment": "Valid multi-select hash extraction", - "expression": "a.{foo: bar}", - "result": null - }, - { - "comment": "Valid multi-select hash extraction", - "expression": "a.{foo: bar, baz: bam}", - "result": null - }, - { - "comment": "Trailing comma", - "expression": "a.{foo: bar, }", - "error": "syntax" - }, - { - "comment": "Missing key in second key-value pair", - "expression": "a.{foo: bar, baz}", - "error": "syntax" - }, - { - "comment": "Missing value in second key-value pair", - "expression": "a.{foo: bar, baz:}", - "error": "syntax" - }, - { - "comment": "Trailing comma", - "expression": "a.{foo: bar, baz: bam, }", - "error": "syntax" - }, - { - "comment": "Nested multi select", - "expression": "{\"\\\\\":{\" \":*}}", - "result": {"\\": {" ": ["object"]}} - } - ] - }, - { - "comment": "Or expressions", - "given": {"type": "object"}, - "cases": [ - { - "expression": "foo || bar", - "result": null - }, - { - "expression": "foo ||", - "error": "syntax" - }, - { - "expression": "foo.|| bar", - "error": "syntax" - }, - { - "expression": " || foo", - "error": "syntax" - }, - { - "expression": "foo || || foo", - "error": "syntax" - }, - { - "expression": "foo.[a || b]", - "result": null - }, - { - "expression": "foo.[a ||]", - "error": "syntax" - }, - { - "expression": "\"foo", - "error": "syntax" - } - ] - }, - { - "comment": "Filter expressions", - "given": {"type": "object"}, - "cases": [ - { - "expression": "foo[?bar==`\"baz\"`]", - "result": null - }, - { - "expression": "foo[? bar == `\"baz\"` ]", - "result": null - }, - { - "expression": "foo[ ?bar==`\"baz\"`]", - "error": "syntax" - }, - { - "expression": "foo[?bar==]", - "error": "syntax" - }, - { - "expression": "foo[?==]", - "error": "syntax" - }, - { - "expression": "foo[?==bar]", - "error": "syntax" - }, - { - "expression": "foo[?bar==baz?]", - "error": "syntax" - }, - { - "expression": "foo[?a.b.c==d.e.f]", - "result": null - }, - { - "expression": "foo[?bar==`[0, 1, 2]`]", - "result": null - }, - { - "expression": "foo[?bar==`[\"a\", \"b\", \"c\"]`]", - "result": null - }, - { - "comment": "Literal char not escaped", - "expression": "foo[?bar==`[\"foo`bar\"]`]", - "error": "syntax" - }, - { - "comment": "Literal char escaped", - "expression": "foo[?bar==`[\"foo\\`bar\"]`]", - "result": null - }, - { - "comment": "Unknown comparator", - "expression": "foo[?bar<>baz]", - "error": "syntax" - }, - { - "comment": "Unknown comparator", - "expression": "foo[?bar^baz]", - "error": "syntax" - }, - { - "expression": "foo[bar==baz]", - "error": "syntax" - }, - { - "comment": "Quoted identifier in filter expression no spaces", - "expression": "[?\"\\\\\">`\"foo\"`]", - "result": null - }, - { - "comment": "Quoted identifier in filter expression with spaces", - "expression": "[?\"\\\\\" > `\"foo\"`]", - "result": null - } - ] - }, - { - "comment": "Filter expression errors", - "given": {"type": "object"}, - "cases": [ - { - "expression": "bar.`\"anything\"`", - "error": "syntax" - }, - { - "expression": "bar.baz.noexists.`\"literal\"`", - "error": "syntax" - }, - { - "comment": "Literal wildcard projection", - "expression": "foo[*].`\"literal\"`", - "error": "syntax" - }, - { - "expression": "foo[*].name.`\"literal\"`", - "error": "syntax" - }, - { - "expression": "foo[].name.`\"literal\"`", - "error": "syntax" - }, - { - "expression": "foo[].name.`\"literal\"`.`\"subliteral\"`", - "error": "syntax" - }, - { - "comment": "Projecting a literal onto an empty list", - "expression": "foo[*].name.noexist.`\"literal\"`", - "error": "syntax" - }, - { - "expression": "foo[].name.noexist.`\"literal\"`", - "error": "syntax" - }, - { - "expression": "twolen[*].`\"foo\"`", - "error": "syntax" - }, - { - "comment": "Two level projection of a literal", - "expression": "twolen[*].threelen[*].`\"bar\"`", - "error": "syntax" - }, - { - "comment": "Two level flattened projection of a literal", - "expression": "twolen[].threelen[].`\"bar\"`", - "error": "syntax" - } - ] - }, - { - "comment": "Identifiers", - "given": {"type": "object"}, - "cases": [ - { - "expression": "foo", - "result": null - }, - { - "expression": "\"foo\"", - "result": null - }, - { - "expression": "\"\\\\\"", - "result": null - } - ] - }, - { - "comment": "Combined syntax", - "given": [], - "cases": [ - { - "expression": "*||*|*|*", - "result": null - }, - { - "expression": "*[]||[*]", - "result": [] - }, - { - "expression": "[*.*]", - "result": [null] - } - ] - } -] diff --git a/node_modules/jmespath/test/compliance/unicode.json b/node_modules/jmespath/test/compliance/unicode.json deleted file mode 100644 index 6b07b0b6..00000000 --- a/node_modules/jmespath/test/compliance/unicode.json +++ /dev/null @@ -1,38 +0,0 @@ -[ - { - "given": {"foo": [{"✓": "✓"}, {"✓": "✗"}]}, - "cases": [ - { - "expression": "foo[].\"✓\"", - "result": ["✓", "✗"] - } - ] - }, - { - "given": {"☯": true}, - "cases": [ - { - "expression": "\"☯\"", - "result": true - } - ] - }, - { - "given": {"♪♫•*¨*•.¸¸❤¸¸.•*¨*•♫♪": true}, - "cases": [ - { - "expression": "\"♪♫•*¨*•.¸¸❤¸¸.•*¨*•♫♪\"", - "result": true - } - ] - }, - { - "given": {"☃": true}, - "cases": [ - { - "expression": "\"☃\"", - "result": true - } - ] - } -] diff --git a/node_modules/jmespath/test/compliance/wildcard.json b/node_modules/jmespath/test/compliance/wildcard.json deleted file mode 100644 index 3bcec302..00000000 --- a/node_modules/jmespath/test/compliance/wildcard.json +++ /dev/null @@ -1,460 +0,0 @@ -[{ - "given": { - "foo": { - "bar": { - "baz": "val" - }, - "other": { - "baz": "val" - }, - "other2": { - "baz": "val" - }, - "other3": { - "notbaz": ["a", "b", "c"] - }, - "other4": { - "notbaz": ["a", "b", "c"] - }, - "other5": { - "other": { - "a": 1, - "b": 1, - "c": 1 - } - } - } - }, - "cases": [ - { - "expression": "foo.*.baz", - "result": ["val", "val", "val"] - }, - { - "expression": "foo.bar.*", - "result": ["val"] - }, - { - "expression": "foo.*.notbaz", - "result": [["a", "b", "c"], ["a", "b", "c"]] - }, - { - "expression": "foo.*.notbaz[0]", - "result": ["a", "a"] - }, - { - "expression": "foo.*.notbaz[-1]", - "result": ["c", "c"] - } - ] -}, { - "given": { - "foo": { - "first-1": { - "second-1": "val" - }, - "first-2": { - "second-1": "val" - }, - "first-3": { - "second-1": "val" - } - } - }, - "cases": [ - { - "expression": "foo.*", - "result": [{"second-1": "val"}, {"second-1": "val"}, - {"second-1": "val"}] - }, - { - "expression": "foo.*.*", - "result": [["val"], ["val"], ["val"]] - }, - { - "expression": "foo.*.*.*", - "result": [[], [], []] - }, - { - "expression": "foo.*.*.*.*", - "result": [[], [], []] - } - ] -}, { - "given": { - "foo": { - "bar": "one" - }, - "other": { - "bar": "one" - }, - "nomatch": { - "notbar": "three" - } - }, - "cases": [ - { - "expression": "*.bar", - "result": ["one", "one"] - } - ] -}, { - "given": { - "top1": { - "sub1": {"foo": "one"} - }, - "top2": { - "sub1": {"foo": "one"} - } - }, - "cases": [ - { - "expression": "*", - "result": [{"sub1": {"foo": "one"}}, - {"sub1": {"foo": "one"}}] - }, - { - "expression": "*.sub1", - "result": [{"foo": "one"}, - {"foo": "one"}] - }, - { - "expression": "*.*", - "result": [[{"foo": "one"}], - [{"foo": "one"}]] - }, - { - "expression": "*.*.foo[]", - "result": ["one", "one"] - }, - { - "expression": "*.sub1.foo", - "result": ["one", "one"] - } - ] -}, -{ - "given": - {"foo": [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}]}, - "cases": [ - { - "expression": "foo[*].bar", - "result": ["one", "two", "three"] - }, - { - "expression": "foo[*].notbar", - "result": ["four"] - } - ] -}, -{ - "given": - [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}], - "cases": [ - { - "expression": "[*]", - "result": [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}] - }, - { - "expression": "[*].bar", - "result": ["one", "two", "three"] - }, - { - "expression": "[*].notbar", - "result": ["four"] - } - ] -}, -{ - "given": { - "foo": { - "bar": [ - {"baz": ["one", "two", "three"]}, - {"baz": ["four", "five", "six"]}, - {"baz": ["seven", "eight", "nine"]} - ] - } - }, - "cases": [ - { - "expression": "foo.bar[*].baz", - "result": [["one", "two", "three"], ["four", "five", "six"], ["seven", "eight", "nine"]] - }, - { - "expression": "foo.bar[*].baz[0]", - "result": ["one", "four", "seven"] - }, - { - "expression": "foo.bar[*].baz[1]", - "result": ["two", "five", "eight"] - }, - { - "expression": "foo.bar[*].baz[2]", - "result": ["three", "six", "nine"] - }, - { - "expression": "foo.bar[*].baz[3]", - "result": [] - } - ] -}, -{ - "given": { - "foo": { - "bar": [["one", "two"], ["three", "four"]] - } - }, - "cases": [ - { - "expression": "foo.bar[*]", - "result": [["one", "two"], ["three", "four"]] - }, - { - "expression": "foo.bar[0]", - "result": ["one", "two"] - }, - { - "expression": "foo.bar[0][0]", - "result": "one" - }, - { - "expression": "foo.bar[0][0][0]", - "result": null - }, - { - "expression": "foo.bar[0][0][0][0]", - "result": null - }, - { - "expression": "foo[0][0]", - "result": null - } - ] -}, -{ - "given": { - "foo": [ - {"bar": [{"kind": "basic"}, {"kind": "intermediate"}]}, - {"bar": [{"kind": "advanced"}, {"kind": "expert"}]}, - {"bar": "string"} - ] - - }, - "cases": [ - { - "expression": "foo[*].bar[*].kind", - "result": [["basic", "intermediate"], ["advanced", "expert"]] - }, - { - "expression": "foo[*].bar[0].kind", - "result": ["basic", "advanced"] - } - ] -}, -{ - "given": { - "foo": [ - {"bar": {"kind": "basic"}}, - {"bar": {"kind": "intermediate"}}, - {"bar": {"kind": "advanced"}}, - {"bar": {"kind": "expert"}}, - {"bar": "string"} - ] - }, - "cases": [ - { - "expression": "foo[*].bar.kind", - "result": ["basic", "intermediate", "advanced", "expert"] - } - ] -}, -{ - "given": { - "foo": [{"bar": ["one", "two"]}, {"bar": ["three", "four"]}, {"bar": ["five"]}] - }, - "cases": [ - { - "expression": "foo[*].bar[0]", - "result": ["one", "three", "five"] - }, - { - "expression": "foo[*].bar[1]", - "result": ["two", "four"] - }, - { - "expression": "foo[*].bar[2]", - "result": [] - } - ] -}, -{ - "given": { - "foo": [{"bar": []}, {"bar": []}, {"bar": []}] - }, - "cases": [ - { - "expression": "foo[*].bar[0]", - "result": [] - } - ] -}, -{ - "given": { - "foo": [["one", "two"], ["three", "four"], ["five"]] - }, - "cases": [ - { - "expression": "foo[*][0]", - "result": ["one", "three", "five"] - }, - { - "expression": "foo[*][1]", - "result": ["two", "four"] - } - ] -}, -{ - "given": { - "foo": [ - [ - ["one", "two"], ["three", "four"] - ], [ - ["five", "six"], ["seven", "eight"] - ], [ - ["nine"], ["ten"] - ] - ] - }, - "cases": [ - { - "expression": "foo[*][0]", - "result": [["one", "two"], ["five", "six"], ["nine"]] - }, - { - "expression": "foo[*][1]", - "result": [["three", "four"], ["seven", "eight"], ["ten"]] - }, - { - "expression": "foo[*][0][0]", - "result": ["one", "five", "nine"] - }, - { - "expression": "foo[*][1][0]", - "result": ["three", "seven", "ten"] - }, - { - "expression": "foo[*][0][1]", - "result": ["two", "six"] - }, - { - "expression": "foo[*][1][1]", - "result": ["four", "eight"] - }, - { - "expression": "foo[*][2]", - "result": [] - }, - { - "expression": "foo[*][2][2]", - "result": [] - }, - { - "expression": "bar[*]", - "result": null - }, - { - "expression": "bar[*].baz[*]", - "result": null - } - ] -}, -{ - "given": { - "string": "string", - "hash": {"foo": "bar", "bar": "baz"}, - "number": 23, - "nullvalue": null - }, - "cases": [ - { - "expression": "string[*]", - "result": null - }, - { - "expression": "hash[*]", - "result": null - }, - { - "expression": "number[*]", - "result": null - }, - { - "expression": "nullvalue[*]", - "result": null - }, - { - "expression": "string[*].foo", - "result": null - }, - { - "expression": "hash[*].foo", - "result": null - }, - { - "expression": "number[*].foo", - "result": null - }, - { - "expression": "nullvalue[*].foo", - "result": null - }, - { - "expression": "nullvalue[*].foo[*].bar", - "result": null - } - ] -}, -{ - "given": { - "string": "string", - "hash": {"foo": "val", "bar": "val"}, - "number": 23, - "array": [1, 2, 3], - "nullvalue": null - }, - "cases": [ - { - "expression": "string.*", - "result": null - }, - { - "expression": "hash.*", - "result": ["val", "val"] - }, - { - "expression": "number.*", - "result": null - }, - { - "expression": "array.*", - "result": null - }, - { - "expression": "nullvalue.*", - "result": null - } - ] -}, -{ - "given": { - "a": [0, 1, 2], - "b": [0, 1, 2] - }, - "cases": [ - { - "expression": "*[0]", - "result": [0, 0] - } - ] -} -] diff --git a/node_modules/jmespath/test/jmespath.js b/node_modules/jmespath/test/jmespath.js deleted file mode 100644 index 15f61c14..00000000 --- a/node_modules/jmespath/test/jmespath.js +++ /dev/null @@ -1,217 +0,0 @@ -var assert = require('assert'); -var jmespath = require('../jmespath'); -var tokenize = jmespath.tokenize; -var compile = jmespath.compile; -var strictDeepEqual = jmespath.strictDeepEqual; - - -describe('tokenize', function() { - it('should tokenize unquoted identifier', function() { - assert.deepEqual(tokenize('foo'), - [{type: "UnquotedIdentifier", - value: "foo", - start: 0}]); - }); - it('should tokenize unquoted identifier with underscore', function() { - assert.deepEqual(tokenize('_underscore'), - [{type: "UnquotedIdentifier", - value: "_underscore", - start: 0}]); - }); - it('should tokenize unquoted identifier with numbers', function() { - assert.deepEqual(tokenize('foo123'), - [{type: "UnquotedIdentifier", - value: "foo123", - start: 0}]); - }); - it('should tokenize dotted lookups', function() { - assert.deepEqual( - tokenize('foo.bar'), - [{type: "UnquotedIdentifier", value: "foo", start: 0}, - {type: "Dot", value: ".", start: 3}, - {type: "UnquotedIdentifier", value: "bar", start: 4}, - ]); - }); - it('should tokenize numbers', function() { - assert.deepEqual( - tokenize('foo[0]'), - [{type: "UnquotedIdentifier", value: "foo", start: 0}, - {type: "Lbracket", value: "[", start: 3}, - {type: "Number", value: 0, start: 4}, - {type: "Rbracket", value: "]", start: 5}, - ]); - }); - it('should tokenize numbers with multiple digits', function() { - assert.deepEqual( - tokenize("12345"), - [{type: "Number", value: 12345, start: 0}]); - }); - it('should tokenize negative numbers', function() { - assert.deepEqual( - tokenize("-12345"), - [{type: "Number", value: -12345, start: 0}]); - }); - it('should tokenize quoted identifier', function() { - assert.deepEqual(tokenize('"foo"'), - [{type: "QuotedIdentifier", - value: "foo", - start: 0}]); - }); - it('should tokenize quoted identifier with unicode escape', function() { - assert.deepEqual(tokenize('"\\u2713"'), - [{type: "QuotedIdentifier", - value: "✓", - start: 0}]); - }); - it('should tokenize literal lists', function() { - assert.deepEqual(tokenize("`[0, 1]`"), - [{type: "Literal", - value: [0, 1], - start: 0}]); - }); - it('should tokenize literal dict', function() { - assert.deepEqual(tokenize("`{\"foo\": \"bar\"}`"), - [{type: "Literal", - value: {"foo": "bar"}, - start: 0}]); - }); - it('should tokenize literal strings', function() { - assert.deepEqual(tokenize("`\"foo\"`"), - [{type: "Literal", - value: "foo", - start: 0}]); - }); - it('should tokenize json literals', function() { - assert.deepEqual(tokenize("`true`"), - [{type: "Literal", - value: true, - start: 0}]); - }); - it('should not requiring surrounding quotes for strings', function() { - assert.deepEqual(tokenize("`foo`"), - [{type: "Literal", - value: "foo", - start: 0}]); - }); - it('should not requiring surrounding quotes for numbers', function() { - assert.deepEqual(tokenize("`20`"), - [{type: "Literal", - value: 20, - start: 0}]); - }); - it('should tokenize literal lists with chars afterwards', function() { - assert.deepEqual( - tokenize("`[0, 1]`[0]"), [ - {type: "Literal", value: [0, 1], start: 0}, - {type: "Lbracket", value: "[", start: 8}, - {type: "Number", value: 0, start: 9}, - {type: "Rbracket", value: "]", start: 10} - ]); - }); - it('should tokenize two char tokens with shared prefix', function() { - assert.deepEqual( - tokenize("[?foo]"), - [{type: "Filter", value: "[?", start: 0}, - {type: "UnquotedIdentifier", value: "foo", start: 2}, - {type: "Rbracket", value: "]", start: 5}] - ); - }); - it('should tokenize flatten operator', function() { - assert.deepEqual( - tokenize("[]"), - [{type: "Flatten", value: "[]", start: 0}]); - }); - it('should tokenize comparators', function() { - assert.deepEqual(tokenize("<"), - [{type: "LT", - value: "<", - start: 0}]); - }); - it('should tokenize two char tokens without shared prefix', function() { - assert.deepEqual( - tokenize("=="), - [{type: "EQ", value: "==", start: 0}] - ); - }); - it('should tokenize not equals', function() { - assert.deepEqual( - tokenize("!="), - [{type: "NE", value: "!=", start: 0}] - ); - }); - it('should tokenize the OR token', function() { - assert.deepEqual( - tokenize("a||b"), - [ - {type: "UnquotedIdentifier", value: "a", start: 0}, - {type: "Or", value: "||", start: 1}, - {type: "UnquotedIdentifier", value: "b", start: 3} - ] - ); - }); - it('should tokenize function calls', function() { - assert.deepEqual( - tokenize("abs(@)"), - [ - {type: "UnquotedIdentifier", value: "abs", start: 0}, - {type: "Lparen", value: "(", start: 3}, - {type: "Current", value: "@", start: 4}, - {type: "Rparen", value: ")", start: 5} - ] - ); - }); -}); - - -describe('parsing', function() { - it('should parse field node', function() { - assert.deepEqual(compile('foo'), - {type: 'Field', name: 'foo'}); - }); -}); - -describe('strictDeepEqual', function() { - it('should compare scalars', function() { - assert.strictEqual(strictDeepEqual('a', 'a'), true); - }); - it('should be false for different types', function() { - assert.strictEqual(strictDeepEqual('a', 2), false); - }); - it('should be false for arrays of different lengths', function() { - assert.strictEqual(strictDeepEqual([0, 1], [1, 2, 3]), false); - }); - it('should be true for identical arrays', function() { - assert.strictEqual(strictDeepEqual([0, 1], [0, 1]), true); - }); - it('should be true for nested arrays', function() { - assert.strictEqual( - strictDeepEqual([[0, 1], [2, 3]], [[0, 1], [2, 3]]), true); - }); - it('should be true for nested arrays of strings', function() { - assert.strictEqual( - strictDeepEqual([["a", "b"], ["c", "d"]], - [["a", "b"], ["c", "d"]]), true); - }); - it('should be false for different arrays of the same length', function() { - assert.strictEqual(strictDeepEqual([0, 1], [1, 2]), false); - }); - it('should handle object literals', function() { - assert.strictEqual(strictDeepEqual({a: 1, b: 2}, {a: 1, b: 2}), true); - }); - it('should handle keys in first not in second', function() { - assert.strictEqual(strictDeepEqual({a: 1, b: 2}, {a: 1}), false); - }); - it('should handle keys in second not in first', function() { - assert.strictEqual(strictDeepEqual({a: 1}, {a: 1, b: 2}), false); - }); - it('should handle nested objects', function() { - assert.strictEqual( - strictDeepEqual({a: {b: [1, 2]}}, - {a: {b: [1, 2]}}), true); - }); - it('should handle nested objects that are not equal', function() { - assert.strictEqual( - strictDeepEqual({a: {b: [1, 2]}}, - {a: {b: [1, 4]}}), false); - }); -}); diff --git a/node_modules/joycon/LICENSE b/node_modules/joycon/LICENSE deleted file mode 100644 index 510cc073..00000000 --- a/node_modules/joycon/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) egoist <0x142857@gmail.com> (https://github.com/egoist) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/joycon/README.md b/node_modules/joycon/README.md deleted file mode 100644 index 25375913..00000000 --- a/node_modules/joycon/README.md +++ /dev/null @@ -1,133 +0,0 @@ - -# joycon - -[![NPM version](https://img.shields.io/npm/v/joycon.svg?style=flat)](https://npmjs.com/package/joycon) [![NPM downloads](https://img.shields.io/npm/dm/joycon.svg?style=flat)](https://npmjs.com/package/joycon) [![install size](https://packagephobia.now.sh/badge?p=joycon@2.0.0)](https://packagephobia.now.sh/result?p=joycon@2.0.0) [![CircleCI](https://circleci.com/gh/egoist/joycon/tree/master.svg?style=shield)](https://circleci.com/gh/egoist/joycon/tree/master) [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/egoist/donate) [![chat](https://img.shields.io/badge/chat-on%20discord-7289DA.svg?style=flat)](https://chat.egoist.moe) - -## Differences with [cosmiconfig](https://github.com/davidtheclark/cosmiconfig)? - -JoyCon is zero-dependency but feature-complete. - -## Install - -```bash -yarn add joycon -``` - -## Usage - -```js -const JoyCon = require('joycon') - -const joycon = new JoyCon() - -joycon.load(['package-lock.json', 'yarn.lock']) -.then(result => { - // result is {} when files do not exist - // otherwise { path, data } -}) -``` - -By default only `.js` and `.json` file are parsed, otherwise raw data will be returned, so you can add custom loader to parse them: - -```js -const joycon = new JoyCon() - -joycon.addLoader({ - test: /\.toml$/, - load(filepath) { - return require('toml').parse(filepath) - } -}) - -joycon.load(['cargo.toml']) -``` - -## API - -### constructor([options]) - -#### options - -##### files - -- Type: `string[]` - -The files to search. - -##### cwd - -The directory to search files. - -##### stopDir - -The directory to stop searching. - -##### packageKey - -You can load config from certain property in a `package.json` file. For example, when you set `packageKey: 'babel'`, it will load the `babel` property in `package.json` instead of the entire data. - -##### parseJSON - -- Type: `(str: string) => any` -- Default: `JSON.parse` - -The function used to parse JSON string. - -### resolve([files], [cwd], [stopDir]) -### resolve([options]) - -`files` defaults to `options.files`. - -`cwd` defaults to `options.cwd`. - -`stopDir` defaults to `options.stopDir` then `path.parse(cwd).root`. - -If using a single object `options`, it will be the same as constructor options. - -Search files and resolve the path of the file we found. - -There's also `.resolveSync` method. - -### load(...args) - -The signature is the same as [resolve](#resolvefiles-cwd-stopdir). - -Search files and resolve `{ path, data }` of the file we found. - -There's also `.loadSync` method. - -### addLoader(Loader) - -```typescript -interface Loader { - name?: string - test: RegExp - load(filepath: string)?: Promise - loadSync(filepath: string)?: any -} -``` - -At least one of `load` and `loadSync` is required, depending on whether you're calling the synchonous methods or not. - -### removeLoader(name) - -Remove loaders by loader name. - -### clearCache() - -Each JoyCon instance uses its own cache. - -## Contributing - -1. Fork it! -2. Create your feature branch: `git checkout -b my-new-feature` -3. Commit your changes: `git commit -am 'Add some feature'` -4. Push to the branch: `git push origin my-new-feature` -5. Submit a pull request :D - -## Author - -**joycon** © [egoist](https://github.com/egoist), Released under the [MIT](./LICENSE) License.
    -Authored and maintained by egoist with help from contributors ([list](https://github.com/egoist/joycon/contributors)). - -> [github.com/egoist](https://github.com/egoist) · GitHub [@egoist](https://github.com/egoist) · Twitter [@_egoistlily](https://twitter.com/_egoistlily) diff --git a/node_modules/joycon/lib/index.js b/node_modules/joycon/lib/index.js deleted file mode 100644 index bf9ab5a4..00000000 --- a/node_modules/joycon/lib/index.js +++ /dev/null @@ -1,294 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _fs = _interopRequireDefault(require("fs")); - -var _path = _interopRequireDefault(require("path")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const readFileSync = fp => { - return _fs.default.readFileSync(fp, 'utf8'); -}; - -const pathExists = fp => new Promise(resolve => { - _fs.default.access(fp, err => { - resolve(!err); - }); -}); - -const pathExistsSync = _fs.default.existsSync; - -class JoyCon { - constructor({ - files, - cwd = process.cwd(), - stopDir, - packageKey, - parseJSON = JSON.parse - } = {}) { - this.options = { - files, - cwd, - stopDir, - packageKey, - parseJSON - }; - this.existsCache = new Map(); - this.loaders = new Set(); - this.packageJsonCache = new Map(); - this.loadCache = new Map(); - } - - addLoader(loader) { - this.loaders.add(loader); - return this; - } - - removeLoader(name) { - for (const loader of this.loaders) { - if (name && loader.name === name) { - this.loaders.delete(loader); - } - } - - return this; - } - - async recusivelyResolve(options) { - if (options.cwd === options.stopDir || _path.default.basename(options.cwd) === 'node_modules') { - return null; - } - - for (const filename of options.files) { - const file = _path.default.resolve(options.cwd, filename); - - const exists = process.env.NODE_ENV !== 'test' && this.existsCache.has(file) ? this.existsCache.get(file) : await pathExists(file); - this.existsCache.set(file, exists); - - if (exists) { - if (!options.packageKey || _path.default.basename(file) !== 'package.json') { - return file; - } - - const data = require(file); - - delete require.cache[file]; - const hasPackageKey = Object.prototype.hasOwnProperty.call(data, options.packageKey); - - if (hasPackageKey) { - this.packageJsonCache.set(file, data); - return file; - } - } - - continue; - } - - return this.recusivelyResolve(Object.assign({}, options, { - cwd: _path.default.dirname(options.cwd) - })); - } - - recusivelyResolveSync(options) { - if (options.cwd === options.stopDir || _path.default.basename(options.cwd) === 'node_modules') { - return null; - } - - for (const filename of options.files) { - const file = _path.default.resolve(options.cwd, filename); - - const exists = process.env.NODE_ENV !== 'test' && this.existsCache.has(file) ? this.existsCache.get(file) : pathExistsSync(file); - this.existsCache.set(file, exists); - - if (exists) { - if (!options.packageKey || _path.default.basename(file) !== 'package.json') { - return file; - } - - const data = require(file); - - delete require.cache[file]; - const hasPackageKey = Object.prototype.hasOwnProperty.call(data, options.packageKey); - - if (hasPackageKey) { - this.packageJsonCache.set(file, data); - return file; - } - } - - continue; - } - - return this.recusivelyResolveSync(Object.assign({}, options, { - cwd: _path.default.dirname(options.cwd) - })); - } - - async resolve(...args) { - const options = this.normalizeOptions(args); - return this.recusivelyResolve(options); - } - - resolveSync(...args) { - const options = this.normalizeOptions(args); - return this.recusivelyResolveSync(options); - } - - runLoaderSync(loader, filepath) { - return loader.loadSync(filepath); - } - - runLoader(loader, filepath) { - if (!loader.load) return loader.loadSync(filepath); - return loader.load(filepath); - } - - async load(...args) { - const options = this.normalizeOptions(args); - const filepath = await this.recusivelyResolve(options); - - if (filepath) { - const defaultLoader = { - test: /\.+/, - loadSync: filepath => { - const extname = _path.default.extname(filepath).slice(1); - - if (extname === 'js') { - delete require.cache[filepath]; - return require(filepath); - } - - if (extname === 'json') { - if (this.packageJsonCache.has(filepath)) { - return this.packageJsonCache.get(filepath)[options.packageKey]; - } - - const data = this.options.parseJSON(readFileSync(filepath)); - return data; - } - - return readFileSync(filepath); - } - }; - const loader = this.findLoader(filepath) || defaultLoader; - let data; - - if (this.loadCache.has(filepath)) { - data = this.loadCache.get(filepath); - } else { - data = await this.runLoader(loader, filepath); - this.loadCache.set(filepath, data); - } - - return { - path: filepath, - data - }; - } - - return {}; - } - - loadSync(...args) { - const options = this.normalizeOptions(args); - const filepath = this.recusivelyResolveSync(options); - - if (filepath) { - const defaultLoader = { - test: /\.+/, - loadSync: filepath => { - const extname = _path.default.extname(filepath).slice(1); - - if (extname === 'js') { - delete require.cache[filepath]; - return require(filepath); - } - - if (extname === 'json') { - if (this.packageJsonCache.has(filepath)) { - return this.packageJsonCache.get(filepath)[options.packageKey]; - } - - const data = this.options.parseJSON(readFileSync(filepath)); - return data; - } - - return readFileSync(filepath); - } - }; - const loader = this.findLoader(filepath) || defaultLoader; - let data; - - if (this.loadCache.has(filepath)) { - data = this.loadCache.get(filepath); - } else { - data = this.runLoaderSync(loader, filepath); - this.loadCache.set(filepath, data); - } - - return { - path: filepath, - data - }; - } - - return {}; - } - - findLoader(filepath) { - for (const loader of this.loaders) { - if (loader.test && loader.test.test(filepath)) { - return loader; - } - } - - return null; - } - - clearCache() { - this.existsCache.clear(); - this.packageJsonCache.clear(); - this.loadCache.clear(); - return this; - } - - normalizeOptions(args) { - const options = Object.assign({}, this.options); - - if (Object.prototype.toString.call(args[0]) === '[object Object]') { - Object.assign(options, args[0]); - } else { - if (args[0]) { - options.files = args[0]; - } - - if (args[1]) { - options.cwd = args[1]; - } - - if (args[2]) { - options.stopDir = args[2]; - } - } - - options.cwd = _path.default.resolve(options.cwd); - options.stopDir = options.stopDir ? _path.default.resolve(options.stopDir) : _path.default.parse(options.cwd).root; - - if (!options.files || options.files.length === 0) { - throw new Error('[joycon] files must be an non-empty array!'); - } - - options.__normalized__ = true; - return options; - } - -} - -exports.default = JoyCon; -module.exports = JoyCon; -module.exports.default = JoyCon; \ No newline at end of file diff --git a/node_modules/joycon/package.json b/node_modules/joycon/package.json deleted file mode 100644 index 0cf3baef..00000000 --- a/node_modules/joycon/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_from": "joycon@^3.0.0", - "_id": "joycon@3.0.1", - "_inBundle": false, - "_integrity": "sha512-SJcJNBg32dGgxhPtM0wQqxqV0ax9k/9TaUskGDSJkSFSQOEWWvQ3zzWdGQRIUry2j1zA5+ReH13t0Mf3StuVZA==", - "_location": "/joycon", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "joycon@^3.0.0", - "name": "joycon", - "escapedName": "joycon", - "rawSpec": "^3.0.0", - "saveSpec": null, - "fetchSpec": "^3.0.0" - }, - "_requiredBy": [ - "/pino-pretty" - ], - "_resolved": "https://registry.npmjs.org/joycon/-/joycon-3.0.1.tgz", - "_shasum": "9074c9b08ccf37a6726ff74a18485f85efcaddaf", - "_spec": "joycon@^3.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pino-pretty", - "author": { - "name": "egoist", - "email": "0x142857@gmail.com" - }, - "bugs": { - "url": "https://github.com/egoist/joycon/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Load config with ease.", - "devDependencies": { - "@babel/cli": "^7.13.10", - "@babel/core": "^7.13.10", - "@babel/preset-env": "^7.13.10", - "@egoist/prettier-config": "^0.1.0", - "@types/node": "^14.14.33", - "babel-jest": "^26.6.3", - "babel-plugin-sync": "^0.1.0", - "jest-cli": "^26.6.3", - "prettier": "^2.2.1" - }, - "engines": { - "node": ">=10" - }, - "files": [ - "lib", - "types/index.d.ts" - ], - "homepage": "https://github.com/egoist/joycon#readme", - "jest": { - "testEnvironment": "node" - }, - "license": "MIT", - "main": "lib/index.js", - "name": "joycon", - "repository": { - "url": "git+https://github.com/egoist/joycon.git", - "type": "git" - }, - "scripts": { - "build": "babel src -d lib --no-comments", - "prepublishOnly": "npm run build", - "test": "jest --testPathPattern tests" - }, - "types": "types/index.d.ts", - "version": "3.0.1" -} diff --git a/node_modules/joycon/types/index.d.ts b/node_modules/joycon/types/index.d.ts deleted file mode 100644 index fe6af285..00000000 --- a/node_modules/joycon/types/index.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -export interface Options { - /* a list of files to search */ - files?: string[] - /* the directory to search from */ - cwd?: string - /* the directory to stop searching */ - stopDir?: string - /* the key in package.json to read data at */ - packageKey?: string - /* the function used to parse json */ - parseJSON?: (str: string) => any -} - -export interface LoadResult { - /* file path */ - path?: string - /* file data */ - data?: any -} - -export interface AsyncLoader { - /** Optional loader name */ - name?: string - test: RegExp - load(filepath: string): Promise -} - -export interface SyncLoader { - /** Optional loader name */ - name?: string - test: RegExp - loadSync(filepath: string): any -} - -export interface MultiLoader { - /** Optional loader name */ - name?: string - test: RegExp - load(filepath: string): Promise - loadSync(filepath: string): any -} - -declare class JoyCon { - constructor(options?: Options) - - options: Options - - resolve(files?: string[] | Options, cwd?: string, stopDir?: string): Promise - resolveSync(files?: string[] | Options, cwd?: string, stopDir?: string): string | null - - load(files?: string[] | Options, cwd?: string, stopDir?: string): Promise - loadSync(files?: string[] | Options, cwd?: string, stopDir?: string): LoadResult - - addLoader(loader: AsyncLoader | SyncLoader | MultiLoader): this - removeLoader(name: string): this - - /** Clear internal cache */ - clearCache(): this -} - - -export default JoyCon diff --git a/node_modules/js-yaml/CHANGELOG.md b/node_modules/js-yaml/CHANGELOG.md deleted file mode 100644 index ff2375e0..00000000 --- a/node_modules/js-yaml/CHANGELOG.md +++ /dev/null @@ -1,616 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - - -## [4.1.0] - 2021-04-15 -### Added -- Types are now exported as `yaml.types.XXX`. -- Every type now has `options` property with original arguments kept as they were - (see `yaml.types.int.options` as an example). - -### Changed -- `Schema.extend()` now keeps old type order in case of conflicts - (e.g. Schema.extend([ a, b, c ]).extend([ b, a, d ]) is now ordered as `abcd` instead of `cbad`). - - -## [4.0.0] - 2021-01-03 -### Changed -- Check [migration guide](migrate_v3_to_v4.md) to see details for all breaking changes. -- Breaking: "unsafe" tags `!!js/function`, `!!js/regexp`, `!!js/undefined` are - moved to [js-yaml-js-types](https://github.com/nodeca/js-yaml-js-types) package. -- Breaking: removed `safe*` functions. Use `load`, `loadAll`, `dump` - instead which are all now safe by default. -- `yaml.DEFAULT_SAFE_SCHEMA` and `yaml.DEFAULT_FULL_SCHEMA` are removed, use - `yaml.DEFAULT_SCHEMA` instead. -- `yaml.Schema.create(schema, tags)` is removed, use `schema.extend(tags)` instead. -- `!!binary` now always mapped to `Uint8Array` on load. -- Reduced nesting of `/lib` folder. -- Parse numbers according to YAML 1.2 instead of YAML 1.1 (`01234` is now decimal, - `0o1234` is octal, `1:23` is parsed as string instead of base60). -- `dump()` no longer quotes `:`, `[`, `]`, `(`, `)` except when necessary, #470, #557. -- Line and column in exceptions are now formatted as `(X:Y)` instead of - `at line X, column Y` (also present in compact format), #332. -- Code snippet created in exceptions now contains multiple lines with line numbers. -- `dump()` now serializes `undefined` as `null` in collections and removes keys with - `undefined` in mappings, #571. -- `dump()` with `skipInvalid=true` now serializes invalid items in collections as null. -- Custom tags starting with `!` are now dumped as `!tag` instead of `!`, #576. -- Custom tags starting with `tag:yaml.org,2002:` are now shorthanded using `!!`, #258. - -### Added -- Added `.mjs` (es modules) support. -- Added `quotingType` and `forceQuotes` options for dumper to configure - string literal style, #290, #529. -- Added `styles: { '!!null': 'empty' }` option for dumper - (serializes `{ foo: null }` as "`foo: `"), #570. -- Added `replacer` option (similar to option in JSON.stringify), #339. -- Custom `Tag` can now handle all tags or multiple tags with the same prefix, #385. - -### Fixed -- Astral characters are no longer encoded by `dump()`, #587. -- "duplicate mapping key" exception now points at the correct column, #452. -- Extra commas in flow collections (e.g. `[foo,,bar]`) now throw an exception - instead of producing null, #321. -- `__proto__` key no longer overrides object prototype, #164. -- Removed `bower.json`. -- Tags are now url-decoded in `load()` and url-encoded in `dump()` - (previously usage of custom non-ascii tags may have led to invalid YAML that can't be parsed). -- Anchors now work correctly with empty nodes, #301. -- Fix incorrect parsing of invalid block mapping syntax, #418. -- Throw an error if block sequence/mapping indent contains a tab, #80. - - -## [3.14.1] - 2020-12-07 -### Security -- Fix possible code execution in (already unsafe) `.load()` (in &anchor). - - -## [3.14.0] - 2020-05-22 -### Changed -- Support `safe/loadAll(input, options)` variant of call. -- CI: drop outdated nodejs versions. -- Dev deps bump. - -### Fixed -- Quote `=` in plain scalars #519. -- Check the node type for `!` tag in case user manually specifies it. -- Verify that there are no null-bytes in input. -- Fix wrong quote position when writing condensed flow, #526. - - -## [3.13.1] - 2019-04-05 -### Security -- Fix possible code execution in (already unsafe) `.load()`, #480. - - -## [3.13.0] - 2019-03-20 -### Security -- Security fix: `safeLoad()` can hang when arrays with nested refs - used as key. Now throws exception for nested arrays. #475. - - -## [3.12.2] - 2019-02-26 -### Fixed -- Fix `noArrayIndent` option for root level, #468. - - -## [3.12.1] - 2019-01-05 -### Added -- Added `noArrayIndent` option, #432. - - -## [3.12.0] - 2018-06-02 -### Changed -- Support arrow functions without a block statement, #421. - - -## [3.11.0] - 2018-03-05 -### Added -- Add arrow functions suport for `!!js/function`. - -### Fixed -- Fix dump in bin/octal/hex formats for negative integers, #399. - - -## [3.10.0] - 2017-09-10 -### Fixed -- Fix `condenseFlow` output (quote keys for sure, instead of spaces), #371, #370. -- Dump astrals as codepoints instead of surrogate pair, #368. - - -## [3.9.1] - 2017-07-08 -### Fixed -- Ensure stack is present for custom errors in node 7.+, #351. - - -## [3.9.0] - 2017-07-08 -### Added -- Add `condenseFlow` option (to create pretty URL query params), #346. - -### Fixed -- Support array return from safeLoadAll/loadAll, #350. - - -## [3.8.4] - 2017-05-08 -### Fixed -- Dumper: prevent space after dash for arrays that wrap, #343. - - -## [3.8.3] - 2017-04-05 -### Fixed -- Should not allow numbers to begin and end with underscore, #335. - - -## [3.8.2] - 2017-03-02 -### Fixed -- Fix `!!float 123` (integers) parse, #333. -- Don't allow leading zeros in floats (except 0, 0.xxx). -- Allow positive exponent without sign in floats. - - -## [3.8.1] - 2017-02-07 -### Changed -- Maintenance: update browserified build. - - -## [3.8.0] - 2017-02-07 -### Fixed -- Fix reported position for `duplicated mapping key` errors. - Now points to block start instead of block end. - (#243, thanks to @shockey). - - -## [3.7.0] - 2016-11-12 -### Added -- Support polymorphism for tags (#300, thanks to @monken). - -### Fixed -- Fix parsing of quotes followed by newlines (#304, thanks to @dplepage). - - -## [3.6.1] - 2016-05-11 -### Fixed -- Fix output cut on a pipe, #286. - - -## [3.6.0] - 2016-04-16 -### Fixed -- Dumper rewrite, fix multiple bugs with trailing `\n`. - Big thanks to @aepsilon! -- Loader: fix leading/trailing newlines in block scalars, @aepsilon. - - -## [3.5.5] - 2016-03-17 -### Fixed -- Date parse fix: don't allow dates with on digit in month and day, #268. - - -## [3.5.4] - 2016-03-09 -### Added -- `noCompatMode` for dumper, to disable quoting YAML 1.1 values. - - -## [3.5.3] - 2016-02-11 -### Changed -- Maintenance release. - - -## [3.5.2] - 2016-01-11 -### Changed -- Maintenance: missed comma in bower config. - - -## [3.5.1] - 2016-01-11 -### Changed -- Removed `inherit` dependency, #239. -- Better browserify workaround for esprima load. -- Demo rewrite. - - -## [3.5.0] - 2016-01-10 -### Fixed -- Dumper. Fold strings only, #217. -- Dumper. `norefs` option, to clone linked objects, #229. -- Loader. Throw a warning for duplicate keys, #166. -- Improved browserify support (mark `esprima` & `Buffer` excluded). - - -## [3.4.6] - 2015-11-26 -### Changed -- Use standalone `inherit` to keep browserified files clear. - - -## [3.4.5] - 2015-11-23 -### Added -- Added `lineWidth` option to dumper. - - -## [3.4.4] - 2015-11-21 -### Fixed -- Fixed floats dump (missed dot for scientific format), #220. -- Allow non-printable characters inside quoted scalars, #192. - - -## [3.4.3] - 2015-10-10 -### Changed -- Maintenance release - deps bump (esprima, argparse). - - -## [3.4.2] - 2015-09-09 -### Fixed -- Fixed serialization of duplicated entries in sequences, #205. - Thanks to @vogelsgesang. - - -## [3.4.1] - 2015-09-05 -### Fixed -- Fixed stacktrace handling in generated errors, for browsers (FF/IE). - - -## [3.4.0] - 2015-08-23 -### Changed -- Don't throw on warnings anymore. Use `onWarning` option to catch. -- Throw error on unknown tags (was warning before). -- Reworked internals of error class. - -### Fixed -- Fixed multiline keys dump, #197. Thanks to @tcr. -- Fixed heading line breaks in some scalars (regression). - - -## [3.3.1] - 2015-05-13 -### Added -- Added `.sortKeys` dumper option, thanks to @rjmunro. - -### Fixed -- Fixed astral characters support, #191. - - -## [3.3.0] - 2015-04-26 -### Changed -- Significantly improved long strings formatting in dumper, thanks to @isaacs. -- Strip BOM if exists. - - -## [3.2.7] - 2015-02-19 -### Changed -- Maintenance release. -- Updated dependencies. -- HISTORY.md -> CHANGELOG.md - - -## [3.2.6] - 2015-02-07 -### Fixed -- Fixed encoding of UTF-16 surrogate pairs. (e.g. "\U0001F431" CAT FACE). -- Fixed demo dates dump (#113, thanks to @Hypercubed). - - -## [3.2.5] - 2014-12-28 -### Fixed -- Fixed resolving of all built-in types on empty nodes. -- Fixed invalid warning on empty lines within quoted scalars and flow collections. -- Fixed bug: Tag on an empty node didn't resolve in some cases. - - -## [3.2.4] - 2014-12-19 -### Fixed -- Fixed resolving of !!null tag on an empty node. - - -## [3.2.3] - 2014-11-08 -### Fixed -- Implemented dumping of objects with circular and cross references. -- Partially fixed aliasing of constructed objects. (see issue #141 for details) - - -## [3.2.2] - 2014-09-07 -### Fixed -- Fixed infinite loop on unindented block scalars. -- Rewritten base64 encode/decode in binary type, to keep code licence clear. - - -## [3.2.1] - 2014-08-24 -### Fixed -- Nothig new. Just fix npm publish error. - - -## [3.2.0] - 2014-08-24 -### Added -- Added input piping support to CLI. - -### Fixed -- Fixed typo, that could cause hand on initial indent (#139). - - -## [3.1.0] - 2014-07-07 -### Changed -- 1.5x-2x speed boost. -- Removed deprecated `require('xxx.yml')` support. -- Significant code cleanup and refactoring. -- Internal API changed. If you used custom types - see updated examples. - Others are not affected. -- Even if the input string has no trailing line break character, - it will be parsed as if it has one. -- Added benchmark scripts. -- Moved bower files to /dist folder -- Bugfixes. - - -## [3.0.2] - 2014-02-27 -### Fixed -- Fixed bug: "constructor" string parsed as `null`. - - -## [3.0.1] - 2013-12-22 -### Fixed -- Fixed parsing of literal scalars. (issue #108) -- Prevented adding unnecessary spaces in object dumps. (issue #68) -- Fixed dumping of objects with very long (> 1024 in length) keys. - - -## [3.0.0] - 2013-12-16 -### Changed -- Refactored code. Changed API for custom types. -- Removed output colors in CLI, dump json by default. -- Removed big dependencies from browser version (esprima, buffer). Load `esprima` manually, if `!!js/function` needed. `!!bin` now returns Array in browser -- AMD support. -- Don't quote dumped strings because of `-` & `?` (if not first char). -- __Deprecated__ loading yaml files via `require()`, as not recommended - behaviour for node. - - -## [2.1.3] - 2013-10-16 -### Fixed -- Fix wrong loading of empty block scalars. - - -## [2.1.2] - 2013-10-07 -### Fixed -- Fix unwanted line breaks in folded scalars. - - -## [2.1.1] - 2013-10-02 -### Fixed -- Dumper now respects deprecated booleans syntax from YAML 1.0/1.1 -- Fixed reader bug in JSON-like sequences/mappings. - - -## [2.1.0] - 2013-06-05 -### Added -- Add standard YAML schemas: Failsafe (`FAILSAFE_SCHEMA`), - JSON (`JSON_SCHEMA`) and Core (`CORE_SCHEMA`). -- Add `skipInvalid` dumper option. - -### Changed -- Rename `DEFAULT_SCHEMA` to `DEFAULT_FULL_SCHEMA` - and `SAFE_SCHEMA` to `DEFAULT_SAFE_SCHEMA`. -- Use `safeLoad` for `require` extension. - -### Fixed -- Bug fix: export `NIL` constant from the public interface. - - -## [2.0.5] - 2013-04-26 -### Security -- Close security issue in !!js/function constructor. - Big thanks to @nealpoole for security audit. - - -## [2.0.4] - 2013-04-08 -### Changed -- Updated .npmignore to reduce package size - - -## [2.0.3] - 2013-02-26 -### Fixed -- Fixed dumping of empty arrays ans objects. ([] and {} instead of null) - - -## [2.0.2] - 2013-02-15 -### Fixed -- Fixed input validation: tabs are printable characters. - - -## [2.0.1] - 2013-02-09 -### Fixed -- Fixed error, when options not passed to function cass - - -## [2.0.0] - 2013-02-09 -### Changed -- Full rewrite. New architecture. Fast one-stage parsing. -- Changed custom types API. -- Added YAML dumper. - - -## [1.0.3] - 2012-11-05 -### Fixed -- Fixed utf-8 files loading. - - -## [1.0.2] - 2012-08-02 -### Fixed -- Pull out hand-written shims. Use ES5-Shims for old browsers support. See #44. -- Fix timstamps incorectly parsed in local time when no time part specified. - - -## [1.0.1] - 2012-07-07 -### Fixed -- Fixes `TypeError: 'undefined' is not an object` under Safari. Thanks Phuong. -- Fix timestamps incorrectly parsed in local time. Thanks @caolan. Closes #46. - - -## [1.0.0] - 2012-07-01 -### Changed -- `y`, `yes`, `n`, `no`, `on`, `off` are not converted to Booleans anymore. - Fixes #42. -- `require(filename)` now returns a single document and throws an Error if - file contains more than one document. -- CLI was merged back from js-yaml.bin - - -## [0.3.7] - 2012-02-28 -### Fixed -- Fix export of `addConstructor()`. Closes #39. - - -## [0.3.6] - 2012-02-22 -### Changed -- Removed AMD parts - too buggy to use. Need help to rewrite from scratch - -### Fixed -- Removed YUI compressor warning (renamed `double` variable). Closes #40. - - -## [0.3.5] - 2012-01-10 -### Fixed -- Workagound for .npmignore fuckup under windows. Thanks to airportyh. - - -## [0.3.4] - 2011-12-24 -### Fixed -- Fixes str[] for oldIEs support. -- Adds better has change support for browserified demo. -- improves compact output of Error. Closes #33. - - -## [0.3.3] - 2011-12-20 -### Added -- adds `compact` stringification of Errors. - -### Changed -- jsyaml executable moved to separate module. - - -## [0.3.2] - 2011-12-16 -### Added -- Added jsyaml executable. -- Added !!js/function support. Closes #12. - -### Fixed -- Fixes ug with block style scalars. Closes #26. -- All sources are passing JSLint now. -- Fixes bug in Safari. Closes #28. -- Fixes bug in Opers. Closes #29. -- Improves browser support. Closes #20. - - -## [0.3.1] - 2011-11-18 -### Added -- Added AMD support for browserified version. -- Added permalinks for online demo YAML snippets. Now we have YPaste service, lol. -- Added !!js/regexp and !!js/undefined types. Partially solves #12. - -### Changed -- Wrapped browserified js-yaml into closure. - -### Fixed -- Fixed the resolvement of non-specific tags. Closes #17. -- Fixed !!set mapping. -- Fixed month parse in dates. Closes #19. - - -## [0.3.0] - 2011-11-09 -### Added -- Added browserified version. Closes #13. -- Added live demo of browserified version. -- Ported some of the PyYAML tests. See #14. - -### Fixed -- Removed JS.Class dependency. Closes #3. -- Fixed timestamp bug when fraction was given. - - -## [0.2.2] - 2011-11-06 -### Fixed -- Fixed crash on docs without ---. Closes #8. -- Fixed multiline string parse -- Fixed tests/comments for using array as key - - -## [0.2.1] - 2011-11-02 -### Fixed -- Fixed short file read (<4k). Closes #9. - - -## [0.2.0] - 2011-11-02 -### Changed -- First public release - - -[4.1.0]: https://github.com/nodeca/js-yaml/compare/4.0.0...4.1.0 -[4.0.0]: https://github.com/nodeca/js-yaml/compare/3.14.0...4.0.0 -[3.14.0]: https://github.com/nodeca/js-yaml/compare/3.13.1...3.14.0 -[3.13.1]: https://github.com/nodeca/js-yaml/compare/3.13.0...3.13.1 -[3.13.0]: https://github.com/nodeca/js-yaml/compare/3.12.2...3.13.0 -[3.12.2]: https://github.com/nodeca/js-yaml/compare/3.12.1...3.12.2 -[3.12.1]: https://github.com/nodeca/js-yaml/compare/3.12.0...3.12.1 -[3.12.0]: https://github.com/nodeca/js-yaml/compare/3.11.0...3.12.0 -[3.11.0]: https://github.com/nodeca/js-yaml/compare/3.10.0...3.11.0 -[3.10.0]: https://github.com/nodeca/js-yaml/compare/3.9.1...3.10.0 -[3.9.1]: https://github.com/nodeca/js-yaml/compare/3.9.0...3.9.1 -[3.9.0]: https://github.com/nodeca/js-yaml/compare/3.8.4...3.9.0 -[3.8.4]: https://github.com/nodeca/js-yaml/compare/3.8.3...3.8.4 -[3.8.3]: https://github.com/nodeca/js-yaml/compare/3.8.2...3.8.3 -[3.8.2]: https://github.com/nodeca/js-yaml/compare/3.8.1...3.8.2 -[3.8.1]: https://github.com/nodeca/js-yaml/compare/3.8.0...3.8.1 -[3.8.0]: https://github.com/nodeca/js-yaml/compare/3.7.0...3.8.0 -[3.7.0]: https://github.com/nodeca/js-yaml/compare/3.6.1...3.7.0 -[3.6.1]: https://github.com/nodeca/js-yaml/compare/3.6.0...3.6.1 -[3.6.0]: https://github.com/nodeca/js-yaml/compare/3.5.5...3.6.0 -[3.5.5]: https://github.com/nodeca/js-yaml/compare/3.5.4...3.5.5 -[3.5.4]: https://github.com/nodeca/js-yaml/compare/3.5.3...3.5.4 -[3.5.3]: https://github.com/nodeca/js-yaml/compare/3.5.2...3.5.3 -[3.5.2]: https://github.com/nodeca/js-yaml/compare/3.5.1...3.5.2 -[3.5.1]: https://github.com/nodeca/js-yaml/compare/3.5.0...3.5.1 -[3.5.0]: https://github.com/nodeca/js-yaml/compare/3.4.6...3.5.0 -[3.4.6]: https://github.com/nodeca/js-yaml/compare/3.4.5...3.4.6 -[3.4.5]: https://github.com/nodeca/js-yaml/compare/3.4.4...3.4.5 -[3.4.4]: https://github.com/nodeca/js-yaml/compare/3.4.3...3.4.4 -[3.4.3]: https://github.com/nodeca/js-yaml/compare/3.4.2...3.4.3 -[3.4.2]: https://github.com/nodeca/js-yaml/compare/3.4.1...3.4.2 -[3.4.1]: https://github.com/nodeca/js-yaml/compare/3.4.0...3.4.1 -[3.4.0]: https://github.com/nodeca/js-yaml/compare/3.3.1...3.4.0 -[3.3.1]: https://github.com/nodeca/js-yaml/compare/3.3.0...3.3.1 -[3.3.0]: https://github.com/nodeca/js-yaml/compare/3.2.7...3.3.0 -[3.2.7]: https://github.com/nodeca/js-yaml/compare/3.2.6...3.2.7 -[3.2.6]: https://github.com/nodeca/js-yaml/compare/3.2.5...3.2.6 -[3.2.5]: https://github.com/nodeca/js-yaml/compare/3.2.4...3.2.5 -[3.2.4]: https://github.com/nodeca/js-yaml/compare/3.2.3...3.2.4 -[3.2.3]: https://github.com/nodeca/js-yaml/compare/3.2.2...3.2.3 -[3.2.2]: https://github.com/nodeca/js-yaml/compare/3.2.1...3.2.2 -[3.2.1]: https://github.com/nodeca/js-yaml/compare/3.2.0...3.2.1 -[3.2.0]: https://github.com/nodeca/js-yaml/compare/3.1.0...3.2.0 -[3.1.0]: https://github.com/nodeca/js-yaml/compare/3.0.2...3.1.0 -[3.0.2]: https://github.com/nodeca/js-yaml/compare/3.0.1...3.0.2 -[3.0.1]: https://github.com/nodeca/js-yaml/compare/3.0.0...3.0.1 -[3.0.0]: https://github.com/nodeca/js-yaml/compare/2.1.3...3.0.0 -[2.1.3]: https://github.com/nodeca/js-yaml/compare/2.1.2...2.1.3 -[2.1.2]: https://github.com/nodeca/js-yaml/compare/2.1.1...2.1.2 -[2.1.1]: https://github.com/nodeca/js-yaml/compare/2.1.0...2.1.1 -[2.1.0]: https://github.com/nodeca/js-yaml/compare/2.0.5...2.1.0 -[2.0.5]: https://github.com/nodeca/js-yaml/compare/2.0.4...2.0.5 -[2.0.4]: https://github.com/nodeca/js-yaml/compare/2.0.3...2.0.4 -[2.0.3]: https://github.com/nodeca/js-yaml/compare/2.0.2...2.0.3 -[2.0.2]: https://github.com/nodeca/js-yaml/compare/2.0.1...2.0.2 -[2.0.1]: https://github.com/nodeca/js-yaml/compare/2.0.0...2.0.1 -[2.0.0]: https://github.com/nodeca/js-yaml/compare/1.0.3...2.0.0 -[1.0.3]: https://github.com/nodeca/js-yaml/compare/1.0.2...1.0.3 -[1.0.2]: https://github.com/nodeca/js-yaml/compare/1.0.1...1.0.2 -[1.0.1]: https://github.com/nodeca/js-yaml/compare/1.0.0...1.0.1 -[1.0.0]: https://github.com/nodeca/js-yaml/compare/0.3.7...1.0.0 -[0.3.7]: https://github.com/nodeca/js-yaml/compare/0.3.6...0.3.7 -[0.3.6]: https://github.com/nodeca/js-yaml/compare/0.3.5...0.3.6 -[0.3.5]: https://github.com/nodeca/js-yaml/compare/0.3.4...0.3.5 -[0.3.4]: https://github.com/nodeca/js-yaml/compare/0.3.3...0.3.4 -[0.3.3]: https://github.com/nodeca/js-yaml/compare/0.3.2...0.3.3 -[0.3.2]: https://github.com/nodeca/js-yaml/compare/0.3.1...0.3.2 -[0.3.1]: https://github.com/nodeca/js-yaml/compare/0.3.0...0.3.1 -[0.3.0]: https://github.com/nodeca/js-yaml/compare/0.2.2...0.3.0 -[0.2.2]: https://github.com/nodeca/js-yaml/compare/0.2.1...0.2.2 -[0.2.1]: https://github.com/nodeca/js-yaml/compare/0.2.0...0.2.1 -[0.2.0]: https://github.com/nodeca/js-yaml/releases/tag/0.2.0 diff --git a/node_modules/js-yaml/LICENSE b/node_modules/js-yaml/LICENSE deleted file mode 100644 index 09d3a29e..00000000 --- a/node_modules/js-yaml/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -(The MIT License) - -Copyright (C) 2011-2015 by Vitaly Puzrin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/js-yaml/README.md b/node_modules/js-yaml/README.md deleted file mode 100644 index 3cbc4bd2..00000000 --- a/node_modules/js-yaml/README.md +++ /dev/null @@ -1,246 +0,0 @@ -JS-YAML - YAML 1.2 parser / writer for JavaScript -================================================= - -[![CI](https://github.com/nodeca/js-yaml/workflows/CI/badge.svg?branch=master)](https://github.com/nodeca/js-yaml/actions) -[![NPM version](https://img.shields.io/npm/v/js-yaml.svg)](https://www.npmjs.org/package/js-yaml) - -__[Online Demo](http://nodeca.github.com/js-yaml/)__ - - -This is an implementation of [YAML](http://yaml.org/), a human-friendly data -serialization language. Started as [PyYAML](http://pyyaml.org/) port, it was -completely rewritten from scratch. Now it's very fast, and supports 1.2 spec. - - -Installation ------------- - -### YAML module for node.js - -``` -npm install js-yaml -``` - - -### CLI executable - -If you want to inspect your YAML files from CLI, install js-yaml globally: - -``` -npm install -g js-yaml -``` - -#### Usage - -``` -usage: js-yaml [-h] [-v] [-c] [-t] file - -Positional arguments: - file File with YAML document(s) - -Optional arguments: - -h, --help Show this help message and exit. - -v, --version Show program's version number and exit. - -c, --compact Display errors in compact mode - -t, --trace Show stack trace on error -``` - - -API ---- - -Here we cover the most 'useful' methods. If you need advanced details (creating -your own tags), see [examples](https://github.com/nodeca/js-yaml/tree/master/examples) -for more info. - -``` javascript -const yaml = require('js-yaml'); -const fs = require('fs'); - -// Get document, or throw exception on error -try { - const doc = yaml.load(fs.readFileSync('/home/ixti/example.yml', 'utf8')); - console.log(doc); -} catch (e) { - console.log(e); -} -``` - - -### load (string [ , options ]) - -Parses `string` as single YAML document. Returns either a -plain object, a string, a number, `null` or `undefined`, or throws `YAMLException` on error. By default, does -not support regexps, functions and undefined. - -options: - -- `filename` _(default: null)_ - string to be used as a file path in - error/warning messages. -- `onWarning` _(default: null)_ - function to call on warning messages. - Loader will call this function with an instance of `YAMLException` for each warning. -- `schema` _(default: `DEFAULT_SCHEMA`)_ - specifies a schema to use. - - `FAILSAFE_SCHEMA` - only strings, arrays and plain objects: - http://www.yaml.org/spec/1.2/spec.html#id2802346 - - `JSON_SCHEMA` - all JSON-supported types: - http://www.yaml.org/spec/1.2/spec.html#id2803231 - - `CORE_SCHEMA` - same as `JSON_SCHEMA`: - http://www.yaml.org/spec/1.2/spec.html#id2804923 - - `DEFAULT_SCHEMA` - all supported YAML types. -- `json` _(default: false)_ - compatibility with JSON.parse behaviour. If true, then duplicate keys in a mapping will override values rather than throwing an error. - -NOTE: This function **does not** understand multi-document sources, it throws -exception on those. - -NOTE: JS-YAML **does not** support schema-specific tag resolution restrictions. -So, the JSON schema is not as strictly defined in the YAML specification. -It allows numbers in any notation, use `Null` and `NULL` as `null`, etc. -The core schema also has no such restrictions. It allows binary notation for integers. - - -### loadAll (string [, iterator] [, options ]) - -Same as `load()`, but understands multi-document sources. Applies -`iterator` to each document if specified, or returns array of documents. - -``` javascript -const yaml = require('js-yaml'); - -yaml.loadAll(data, function (doc) { - console.log(doc); -}); -``` - - -### dump (object [ , options ]) - -Serializes `object` as a YAML document. Uses `DEFAULT_SCHEMA`, so it will -throw an exception if you try to dump regexps or functions. However, you can -disable exceptions by setting the `skipInvalid` option to `true`. - -options: - -- `indent` _(default: 2)_ - indentation width to use (in spaces). -- `noArrayIndent` _(default: false)_ - when true, will not add an indentation level to array elements -- `skipInvalid` _(default: false)_ - do not throw on invalid types (like function - in the safe schema) and skip pairs and single values with such types. -- `flowLevel` _(default: -1)_ - specifies level of nesting, when to switch from - block to flow style for collections. -1 means block style everwhere -- `styles` - "tag" => "style" map. Each tag may have own set of styles. -- `schema` _(default: `DEFAULT_SCHEMA`)_ specifies a schema to use. -- `sortKeys` _(default: `false`)_ - if `true`, sort keys when dumping YAML. If a - function, use the function to sort the keys. -- `lineWidth` _(default: `80`)_ - set max line width. Set `-1` for unlimited width. -- `noRefs` _(default: `false`)_ - if `true`, don't convert duplicate objects into references -- `noCompatMode` _(default: `false`)_ - if `true` don't try to be compatible with older - yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1 -- `condenseFlow` _(default: `false`)_ - if `true` flow sequences will be condensed, omitting the space between `a, b`. Eg. `'[a,b]'`, and omitting the space between `key: value` and quoting the key. Eg. `'{"a":b}'` Can be useful when using yaml for pretty URL query params as spaces are %-encoded. -- `quotingType` _(`'` or `"`, default: `'`)_ - strings will be quoted using this quoting style. If you specify single quotes, double quotes will still be used for non-printable characters. -- `forceQuotes` _(default: `false`)_ - if `true`, all non-key strings will be quoted even if they normally don't need to. -- `replacer` - callback `function (key, value)` called recursively on each key/value in source object (see `replacer` docs for `JSON.stringify`). - -The following table show availlable styles (e.g. "canonical", -"binary"...) available for each tag (.e.g. !!null, !!int ...). Yaml -output is shown on the right side after `=>` (default setting) or `->`: - -``` none -!!null - "canonical" -> "~" - "lowercase" => "null" - "uppercase" -> "NULL" - "camelcase" -> "Null" - -!!int - "binary" -> "0b1", "0b101010", "0b1110001111010" - "octal" -> "0o1", "0o52", "0o16172" - "decimal" => "1", "42", "7290" - "hexadecimal" -> "0x1", "0x2A", "0x1C7A" - -!!bool - "lowercase" => "true", "false" - "uppercase" -> "TRUE", "FALSE" - "camelcase" -> "True", "False" - -!!float - "lowercase" => ".nan", '.inf' - "uppercase" -> ".NAN", '.INF' - "camelcase" -> ".NaN", '.Inf' -``` - -Example: - -``` javascript -dump(object, { - 'styles': { - '!!null': 'canonical' // dump null as ~ - }, - 'sortKeys': true // sort object keys -}); -``` - -Supported YAML types --------------------- - -The list of standard YAML tags and corresponding JavaScript types. See also -[YAML tag discussion](http://pyyaml.org/wiki/YAMLTagDiscussion) and -[YAML types repository](http://yaml.org/type/). - -``` -!!null '' # null -!!bool 'yes' # bool -!!int '3...' # number -!!float '3.14...' # number -!!binary '...base64...' # buffer -!!timestamp 'YYYY-...' # date -!!omap [ ... ] # array of key-value pairs -!!pairs [ ... ] # array or array pairs -!!set { ... } # array of objects with given keys and null values -!!str '...' # string -!!seq [ ... ] # array -!!map { ... } # object -``` - -**JavaScript-specific tags** - -See [js-yaml-js-types](https://github.com/nodeca/js-yaml-js-types) for -extra types. - - -Caveats -------- - -Note, that you use arrays or objects as key in JS-YAML. JS does not allow objects -or arrays as keys, and stringifies (by calling `toString()` method) them at the -moment of adding them. - -``` yaml ---- -? [ foo, bar ] -: - baz -? { foo: bar } -: - baz - - baz -``` - -``` javascript -{ "foo,bar": ["baz"], "[object Object]": ["baz", "baz"] } -``` - -Also, reading of properties on implicit block mapping keys is not supported yet. -So, the following YAML document cannot be loaded. - -``` yaml -&anchor foo: - foo: bar - *anchor: duplicate key - baz: bat - *anchor: duplicate key -``` - - -js-yaml for enterprise ----------------------- - -Available as part of the Tidelift Subscription - -The maintainers of js-yaml and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-js-yaml?utm_source=npm-js-yaml&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/js-yaml/bin/js-yaml.js b/node_modules/js-yaml/bin/js-yaml.js deleted file mode 100755 index a182f1af..00000000 --- a/node_modules/js-yaml/bin/js-yaml.js +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env node - - -'use strict'; - -/*eslint-disable no-console*/ - - -var fs = require('fs'); -var argparse = require('argparse'); -var yaml = require('..'); - - -//////////////////////////////////////////////////////////////////////////////// - - -var cli = new argparse.ArgumentParser({ - prog: 'js-yaml', - add_help: true -}); - -cli.add_argument('-v', '--version', { - action: 'version', - version: require('../package.json').version -}); - -cli.add_argument('-c', '--compact', { - help: 'Display errors in compact mode', - action: 'store_true' -}); - -// deprecated (not needed after we removed output colors) -// option suppressed, but not completely removed for compatibility -cli.add_argument('-j', '--to-json', { - help: argparse.SUPPRESS, - dest: 'json', - action: 'store_true' -}); - -cli.add_argument('-t', '--trace', { - help: 'Show stack trace on error', - action: 'store_true' -}); - -cli.add_argument('file', { - help: 'File to read, utf-8 encoded without BOM', - nargs: '?', - default: '-' -}); - - -//////////////////////////////////////////////////////////////////////////////// - - -var options = cli.parse_args(); - - -//////////////////////////////////////////////////////////////////////////////// - -function readFile(filename, encoding, callback) { - if (options.file === '-') { - // read from stdin - - var chunks = []; - - process.stdin.on('data', function (chunk) { - chunks.push(chunk); - }); - - process.stdin.on('end', function () { - return callback(null, Buffer.concat(chunks).toString(encoding)); - }); - } else { - fs.readFile(filename, encoding, callback); - } -} - -readFile(options.file, 'utf8', function (error, input) { - var output, isYaml; - - if (error) { - if (error.code === 'ENOENT') { - console.error('File not found: ' + options.file); - process.exit(2); - } - - console.error( - options.trace && error.stack || - error.message || - String(error)); - - process.exit(1); - } - - try { - output = JSON.parse(input); - isYaml = false; - } catch (err) { - if (err instanceof SyntaxError) { - try { - output = []; - yaml.loadAll(input, function (doc) { output.push(doc); }, {}); - isYaml = true; - - if (output.length === 0) output = null; - else if (output.length === 1) output = output[0]; - - } catch (e) { - if (options.trace && err.stack) console.error(e.stack); - else console.error(e.toString(options.compact)); - - process.exit(1); - } - } else { - console.error( - options.trace && err.stack || - err.message || - String(err)); - - process.exit(1); - } - } - - if (isYaml) console.log(JSON.stringify(output, null, ' ')); - else console.log(yaml.dump(output)); -}); diff --git a/node_modules/js-yaml/dist/js-yaml.js b/node_modules/js-yaml/dist/js-yaml.js deleted file mode 100644 index 4cc0ddf6..00000000 --- a/node_modules/js-yaml/dist/js-yaml.js +++ /dev/null @@ -1,3874 +0,0 @@ - -/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jsyaml = {})); -}(this, (function (exports) { 'use strict'; - - function isNothing(subject) { - return (typeof subject === 'undefined') || (subject === null); - } - - - function isObject(subject) { - return (typeof subject === 'object') && (subject !== null); - } - - - function toArray(sequence) { - if (Array.isArray(sequence)) return sequence; - else if (isNothing(sequence)) return []; - - return [ sequence ]; - } - - - function extend(target, source) { - var index, length, key, sourceKeys; - - if (source) { - sourceKeys = Object.keys(source); - - for (index = 0, length = sourceKeys.length; index < length; index += 1) { - key = sourceKeys[index]; - target[key] = source[key]; - } - } - - return target; - } - - - function repeat(string, count) { - var result = '', cycle; - - for (cycle = 0; cycle < count; cycle += 1) { - result += string; - } - - return result; - } - - - function isNegativeZero(number) { - return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); - } - - - var isNothing_1 = isNothing; - var isObject_1 = isObject; - var toArray_1 = toArray; - var repeat_1 = repeat; - var isNegativeZero_1 = isNegativeZero; - var extend_1 = extend; - - var common = { - isNothing: isNothing_1, - isObject: isObject_1, - toArray: toArray_1, - repeat: repeat_1, - isNegativeZero: isNegativeZero_1, - extend: extend_1 - }; - - // YAML error class. http://stackoverflow.com/questions/8458984 - - - function formatError(exception, compact) { - var where = '', message = exception.reason || '(unknown reason)'; - - if (!exception.mark) return message; - - if (exception.mark.name) { - where += 'in "' + exception.mark.name + '" '; - } - - where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')'; - - if (!compact && exception.mark.snippet) { - where += '\n\n' + exception.mark.snippet; - } - - return message + ' ' + where; - } - - - function YAMLException$1(reason, mark) { - // Super constructor - Error.call(this); - - this.name = 'YAMLException'; - this.reason = reason; - this.mark = mark; - this.message = formatError(this, false); - - // Include stack trace in error object - if (Error.captureStackTrace) { - // Chrome and NodeJS - Error.captureStackTrace(this, this.constructor); - } else { - // FF, IE 10+ and Safari 6+. Fallback for others - this.stack = (new Error()).stack || ''; - } - } - - - // Inherit from Error - YAMLException$1.prototype = Object.create(Error.prototype); - YAMLException$1.prototype.constructor = YAMLException$1; - - - YAMLException$1.prototype.toString = function toString(compact) { - return this.name + ': ' + formatError(this, compact); - }; - - - var exception = YAMLException$1; - - // get snippet for a single line, respecting maxLength - function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { - var head = ''; - var tail = ''; - var maxHalfLength = Math.floor(maxLineLength / 2) - 1; - - if (position - lineStart > maxHalfLength) { - head = ' ... '; - lineStart = position - maxHalfLength + head.length; - } - - if (lineEnd - position > maxHalfLength) { - tail = ' ...'; - lineEnd = position + maxHalfLength - tail.length; - } - - return { - str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, - pos: position - lineStart + head.length // relative position - }; - } - - - function padStart(string, max) { - return common.repeat(' ', max - string.length) + string; - } - - - function makeSnippet(mark, options) { - options = Object.create(options || null); - - if (!mark.buffer) return null; - - if (!options.maxLength) options.maxLength = 79; - if (typeof options.indent !== 'number') options.indent = 1; - if (typeof options.linesBefore !== 'number') options.linesBefore = 3; - if (typeof options.linesAfter !== 'number') options.linesAfter = 2; - - var re = /\r?\n|\r|\0/g; - var lineStarts = [ 0 ]; - var lineEnds = []; - var match; - var foundLineNo = -1; - - while ((match = re.exec(mark.buffer))) { - lineEnds.push(match.index); - lineStarts.push(match.index + match[0].length); - - if (mark.position <= match.index && foundLineNo < 0) { - foundLineNo = lineStarts.length - 2; - } - } - - if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; - - var result = '', i, line; - var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; - var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); - - for (i = 1; i <= options.linesBefore; i++) { - if (foundLineNo - i < 0) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo - i], - lineEnds[foundLineNo - i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), - maxLineLength - ); - result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n' + result; - } - - line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); - result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n'; - result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'; - - for (i = 1; i <= options.linesAfter; i++) { - if (foundLineNo + i >= lineEnds.length) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo + i], - lineEnds[foundLineNo + i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), - maxLineLength - ); - result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n'; - } - - return result.replace(/\n$/, ''); - } - - - var snippet = makeSnippet; - - var TYPE_CONSTRUCTOR_OPTIONS = [ - 'kind', - 'multi', - 'resolve', - 'construct', - 'instanceOf', - 'predicate', - 'represent', - 'representName', - 'defaultStyle', - 'styleAliases' - ]; - - var YAML_NODE_KINDS = [ - 'scalar', - 'sequence', - 'mapping' - ]; - - function compileStyleAliases(map) { - var result = {}; - - if (map !== null) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style; - }); - }); - } - - return result; - } - - function Type$1(tag, options) { - options = options || {}; - - Object.keys(options).forEach(function (name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); - } - }); - - // TODO: Add tag format check. - this.options = options; // keep original options in case user wants to extend this type later - this.tag = tag; - this.kind = options['kind'] || null; - this.resolve = options['resolve'] || function () { return true; }; - this.construct = options['construct'] || function (data) { return data; }; - this.instanceOf = options['instanceOf'] || null; - this.predicate = options['predicate'] || null; - this.represent = options['represent'] || null; - this.representName = options['representName'] || null; - this.defaultStyle = options['defaultStyle'] || null; - this.multi = options['multi'] || false; - this.styleAliases = compileStyleAliases(options['styleAliases'] || null); - - if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { - throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } - } - - var type = Type$1; - - /*eslint-disable max-len*/ - - - - - - function compileList(schema, name) { - var result = []; - - schema[name].forEach(function (currentType) { - var newIndex = result.length; - - result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag && - previousType.kind === currentType.kind && - previousType.multi === currentType.multi) { - - newIndex = previousIndex; - } - }); - - result[newIndex] = currentType; - }); - - return result; - } - - - function compileMap(/* lists... */) { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] - } - }, index, length; - - function collectType(type) { - if (type.multi) { - result.multi[type.kind].push(type); - result.multi['fallback'].push(type); - } else { - result[type.kind][type.tag] = result['fallback'][type.tag] = type; - } - } - - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); - } - return result; - } - - - function Schema$1(definition) { - return this.extend(definition); - } - - - Schema$1.prototype.extend = function extend(definition) { - var implicit = []; - var explicit = []; - - if (definition instanceof type) { - // Schema.extend(type) - explicit.push(definition); - - } else if (Array.isArray(definition)) { - // Schema.extend([ type1, type2, ... ]) - explicit = explicit.concat(definition); - - } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { - // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) - if (definition.implicit) implicit = implicit.concat(definition.implicit); - if (definition.explicit) explicit = explicit.concat(definition.explicit); - - } else { - throw new exception('Schema.extend argument should be a Type, [ Type ], ' + - 'or a schema definition ({ implicit: [...], explicit: [...] })'); - } - - implicit.forEach(function (type$1) { - if (!(type$1 instanceof type)) { - throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - - if (type$1.loadKind && type$1.loadKind !== 'scalar') { - throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); - } - - if (type$1.multi) { - throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.'); - } - }); - - explicit.forEach(function (type$1) { - if (!(type$1 instanceof type)) { - throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - }); - - var result = Object.create(Schema$1.prototype); - - result.implicit = (this.implicit || []).concat(implicit); - result.explicit = (this.explicit || []).concat(explicit); - - result.compiledImplicit = compileList(result, 'implicit'); - result.compiledExplicit = compileList(result, 'explicit'); - result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); - - return result; - }; - - - var schema = Schema$1; - - var str = new type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return data !== null ? data : ''; } - }); - - var seq = new type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return data !== null ? data : []; } - }); - - var map = new type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return data !== null ? data : {}; } - }); - - var failsafe = new schema({ - explicit: [ - str, - seq, - map - ] - }); - - function resolveYamlNull(data) { - if (data === null) return true; - - var max = data.length; - - return (max === 1 && data === '~') || - (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); - } - - function constructYamlNull() { - return null; - } - - function isNull(object) { - return object === null; - } - - var _null = new type('tag:yaml.org,2002:null', { - kind: 'scalar', - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function () { return '~'; }, - lowercase: function () { return 'null'; }, - uppercase: function () { return 'NULL'; }, - camelcase: function () { return 'Null'; }, - empty: function () { return ''; } - }, - defaultStyle: 'lowercase' - }); - - function resolveYamlBoolean(data) { - if (data === null) return false; - - var max = data.length; - - return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || - (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); - } - - function constructYamlBoolean(data) { - return data === 'true' || - data === 'True' || - data === 'TRUE'; - } - - function isBoolean(object) { - return Object.prototype.toString.call(object) === '[object Boolean]'; - } - - var bool = new type('tag:yaml.org,2002:bool', { - kind: 'scalar', - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: function (object) { return object ? 'true' : 'false'; }, - uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, - camelcase: function (object) { return object ? 'True' : 'False'; } - }, - defaultStyle: 'lowercase' - }); - - function isHexCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || - ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || - ((0x61/* a */ <= c) && (c <= 0x66/* f */)); - } - - function isOctCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); - } - - function isDecCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); - } - - function resolveYamlInteger(data) { - if (data === null) return false; - - var max = data.length, - index = 0, - hasDigits = false, - ch; - - if (!max) return false; - - ch = data[index]; - - // sign - if (ch === '-' || ch === '+') { - ch = data[++index]; - } - - if (ch === '0') { - // 0 - if (index + 1 === max) return true; - ch = data[++index]; - - // base 2, base 8, base 16 - - if (ch === 'b') { - // base 2 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (ch !== '0' && ch !== '1') return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - - if (ch === 'x') { - // base 16 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isHexCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - - if (ch === 'o') { - // base 8 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isOctCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - } - - // base 10 (except 0) - - // value should not start with `_`; - if (ch === '_') return false; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isDecCode(data.charCodeAt(index))) { - return false; - } - hasDigits = true; - } - - // Should have digits and should not end with `_` - if (!hasDigits || ch === '_') return false; - - return true; - } - - function constructYamlInteger(data) { - var value = data, sign = 1, ch; - - if (value.indexOf('_') !== -1) { - value = value.replace(/_/g, ''); - } - - ch = value[0]; - - if (ch === '-' || ch === '+') { - if (ch === '-') sign = -1; - value = value.slice(1); - ch = value[0]; - } - - if (value === '0') return 0; - - if (ch === '0') { - if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); - if (value[1] === 'x') return sign * parseInt(value.slice(2), 16); - if (value[1] === 'o') return sign * parseInt(value.slice(2), 8); - } - - return sign * parseInt(value, 10); - } - - function isInteger(object) { - return (Object.prototype.toString.call(object)) === '[object Number]' && - (object % 1 === 0 && !common.isNegativeZero(object)); - } - - var int = new type('tag:yaml.org,2002:int', { - kind: 'scalar', - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, - octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); }, - decimal: function (obj) { return obj.toString(10); }, - /* eslint-disable max-len */ - hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } - }, - defaultStyle: 'decimal', - styleAliases: { - binary: [ 2, 'bin' ], - octal: [ 8, 'oct' ], - decimal: [ 10, 'dec' ], - hexadecimal: [ 16, 'hex' ] - } - }); - - var YAML_FLOAT_PATTERN = new RegExp( - // 2.5e4, 2.5 and integers - '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + - // .2e4, .2 - // special case, seems not from spec - '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + - // .inf - '|[-+]?\\.(?:inf|Inf|INF)' + - // .nan - '|\\.(?:nan|NaN|NAN))$'); - - function resolveYamlFloat(data) { - if (data === null) return false; - - if (!YAML_FLOAT_PATTERN.test(data) || - // Quick hack to not allow integers end with `_` - // Probably should update regexp & check speed - data[data.length - 1] === '_') { - return false; - } - - return true; - } - - function constructYamlFloat(data) { - var value, sign; - - value = data.replace(/_/g, '').toLowerCase(); - sign = value[0] === '-' ? -1 : 1; - - if ('+-'.indexOf(value[0]) >= 0) { - value = value.slice(1); - } - - if (value === '.inf') { - return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; - - } else if (value === '.nan') { - return NaN; - } - return sign * parseFloat(value, 10); - } - - - var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; - - function representYamlFloat(object, style) { - var res; - - if (isNaN(object)) { - switch (style) { - case 'lowercase': return '.nan'; - case 'uppercase': return '.NAN'; - case 'camelcase': return '.NaN'; - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '.inf'; - case 'uppercase': return '.INF'; - case 'camelcase': return '.Inf'; - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '-.inf'; - case 'uppercase': return '-.INF'; - case 'camelcase': return '-.Inf'; - } - } else if (common.isNegativeZero(object)) { - return '-0.0'; - } - - res = object.toString(10); - - // JS stringifier can build scientific format without dots: 5e-100, - // while YAML requres dot: 5.e-100. Fix it with simple hack - - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; - } - - function isFloat(object) { - return (Object.prototype.toString.call(object) === '[object Number]') && - (object % 1 !== 0 || common.isNegativeZero(object)); - } - - var float = new type('tag:yaml.org,2002:float', { - kind: 'scalar', - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: 'lowercase' - }); - - var json = failsafe.extend({ - implicit: [ - _null, - bool, - int, - float - ] - }); - - var core = json; - - var YAML_DATE_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9])' + // [2] month - '-([0-9][0-9])$'); // [3] day - - var YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour - '(?::([0-9][0-9]))?))?$'); // [11] tz_minute - - function resolveYamlTimestamp(data) { - if (data === null) return false; - if (YAML_DATE_REGEXP.exec(data) !== null) return true; - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; - return false; - } - - function constructYamlTimestamp(data) { - var match, year, month, day, hour, minute, second, fraction = 0, - delta = null, tz_hour, tz_minute, date; - - match = YAML_DATE_REGEXP.exec(data); - if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); - - if (match === null) throw new Error('Date resolve error'); - - // match: [1] year [2] month [3] day - - year = +(match[1]); - month = +(match[2]) - 1; // JS month starts with 0 - day = +(match[3]); - - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)); - } - - // match: [4] hour [5] minute [6] second [7] fraction - - hour = +(match[4]); - minute = +(match[5]); - second = +(match[6]); - - if (match[7]) { - fraction = match[7].slice(0, 3); - while (fraction.length < 3) { // milli-seconds - fraction += '0'; - } - fraction = +fraction; - } - - // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute - - if (match[9]) { - tz_hour = +(match[10]); - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds - if (match[9] === '-') delta = -delta; - } - - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - - if (delta) date.setTime(date.getTime() - delta); - - return date; - } - - function representYamlTimestamp(object /*, style*/) { - return object.toISOString(); - } - - var timestamp = new type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp - }); - - function resolveYamlMerge(data) { - return data === '<<' || data === null; - } - - var merge = new type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge - }); - - /*eslint-disable no-bitwise*/ - - - - - - // [ 64, 65, 66 ] -> [ padding, CR, LF ] - var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; - - - function resolveYamlBinary(data) { - if (data === null) return false; - - var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; - - // Convert one by one. - for (idx = 0; idx < max; idx++) { - code = map.indexOf(data.charAt(idx)); - - // Skip CR/LF - if (code > 64) continue; - - // Fail on illegal characters - if (code < 0) return false; - - bitlen += 6; - } - - // If there are any bits left, source was corrupted - return (bitlen % 8) === 0; - } - - function constructYamlBinary(data) { - var idx, tailbits, - input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan - max = input.length, - map = BASE64_MAP, - bits = 0, - result = []; - - // Collect by 6*4 bits (3 bytes) - - for (idx = 0; idx < max; idx++) { - if ((idx % 4 === 0) && idx) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } - - bits = (bits << 6) | map.indexOf(input.charAt(idx)); - } - - // Dump tail - - tailbits = (max % 4) * 6; - - if (tailbits === 0) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } else if (tailbits === 18) { - result.push((bits >> 10) & 0xFF); - result.push((bits >> 2) & 0xFF); - } else if (tailbits === 12) { - result.push((bits >> 4) & 0xFF); - } - - return new Uint8Array(result); - } - - function representYamlBinary(object /*, style*/) { - var result = '', bits = 0, idx, tail, - max = object.length, - map = BASE64_MAP; - - // Convert every three bytes to 4 ASCII characters. - - for (idx = 0; idx < max; idx++) { - if ((idx % 3 === 0) && idx) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } - - bits = (bits << 8) + object[idx]; - } - - // Dump tail - - tail = max % 3; - - if (tail === 0) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } else if (tail === 2) { - result += map[(bits >> 10) & 0x3F]; - result += map[(bits >> 4) & 0x3F]; - result += map[(bits << 2) & 0x3F]; - result += map[64]; - } else if (tail === 1) { - result += map[(bits >> 2) & 0x3F]; - result += map[(bits << 4) & 0x3F]; - result += map[64]; - result += map[64]; - } - - return result; - } - - function isBinary(obj) { - return Object.prototype.toString.call(obj) === '[object Uint8Array]'; - } - - var binary = new type('tag:yaml.org,2002:binary', { - kind: 'scalar', - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary - }); - - var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; - var _toString$2 = Object.prototype.toString; - - function resolveYamlOmap(data) { - if (data === null) return true; - - var objectKeys = [], index, length, pair, pairKey, pairHasKey, - object = data; - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - pairHasKey = false; - - if (_toString$2.call(pair) !== '[object Object]') return false; - - for (pairKey in pair) { - if (_hasOwnProperty$3.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true; - else return false; - } - } - - if (!pairHasKey) return false; - - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); - else return false; - } - - return true; - } - - function constructYamlOmap(data) { - return data !== null ? data : []; - } - - var omap = new type('tag:yaml.org,2002:omap', { - kind: 'sequence', - resolve: resolveYamlOmap, - construct: constructYamlOmap - }); - - var _toString$1 = Object.prototype.toString; - - function resolveYamlPairs(data) { - if (data === null) return true; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - if (_toString$1.call(pair) !== '[object Object]') return false; - - keys = Object.keys(pair); - - if (keys.length !== 1) return false; - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return true; - } - - function constructYamlPairs(data) { - if (data === null) return []; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - keys = Object.keys(pair); - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return result; - } - - var pairs = new type('tag:yaml.org,2002:pairs', { - kind: 'sequence', - resolve: resolveYamlPairs, - construct: constructYamlPairs - }); - - var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; - - function resolveYamlSet(data) { - if (data === null) return true; - - var key, object = data; - - for (key in object) { - if (_hasOwnProperty$2.call(object, key)) { - if (object[key] !== null) return false; - } - } - - return true; - } - - function constructYamlSet(data) { - return data !== null ? data : {}; - } - - var set = new type('tag:yaml.org,2002:set', { - kind: 'mapping', - resolve: resolveYamlSet, - construct: constructYamlSet - }); - - var _default = core.extend({ - implicit: [ - timestamp, - merge - ], - explicit: [ - binary, - omap, - pairs, - set - ] - }); - - /*eslint-disable max-len,no-use-before-define*/ - - - - - - - - var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; - - - var CONTEXT_FLOW_IN = 1; - var CONTEXT_FLOW_OUT = 2; - var CONTEXT_BLOCK_IN = 3; - var CONTEXT_BLOCK_OUT = 4; - - - var CHOMPING_CLIP = 1; - var CHOMPING_STRIP = 2; - var CHOMPING_KEEP = 3; - - - var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; - var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; - var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; - var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; - var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; - - - function _class(obj) { return Object.prototype.toString.call(obj); } - - function is_EOL(c) { - return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); - } - - function is_WHITE_SPACE(c) { - return (c === 0x09/* Tab */) || (c === 0x20/* Space */); - } - - function is_WS_OR_EOL(c) { - return (c === 0x09/* Tab */) || - (c === 0x20/* Space */) || - (c === 0x0A/* LF */) || - (c === 0x0D/* CR */); - } - - function is_FLOW_INDICATOR(c) { - return c === 0x2C/* , */ || - c === 0x5B/* [ */ || - c === 0x5D/* ] */ || - c === 0x7B/* { */ || - c === 0x7D/* } */; - } - - function fromHexCode(c) { - var lc; - - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - /*eslint-disable no-bitwise*/ - lc = c | 0x20; - - if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { - return lc - 0x61 + 10; - } - - return -1; - } - - function escapedHexLen(c) { - if (c === 0x78/* x */) { return 2; } - if (c === 0x75/* u */) { return 4; } - if (c === 0x55/* U */) { return 8; } - return 0; - } - - function fromDecimalCode(c) { - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - return -1; - } - - function simpleEscapeSequence(c) { - /* eslint-disable indent */ - return (c === 0x30/* 0 */) ? '\x00' : - (c === 0x61/* a */) ? '\x07' : - (c === 0x62/* b */) ? '\x08' : - (c === 0x74/* t */) ? '\x09' : - (c === 0x09/* Tab */) ? '\x09' : - (c === 0x6E/* n */) ? '\x0A' : - (c === 0x76/* v */) ? '\x0B' : - (c === 0x66/* f */) ? '\x0C' : - (c === 0x72/* r */) ? '\x0D' : - (c === 0x65/* e */) ? '\x1B' : - (c === 0x20/* Space */) ? ' ' : - (c === 0x22/* " */) ? '\x22' : - (c === 0x2F/* / */) ? '/' : - (c === 0x5C/* \ */) ? '\x5C' : - (c === 0x4E/* N */) ? '\x85' : - (c === 0x5F/* _ */) ? '\xA0' : - (c === 0x4C/* L */) ? '\u2028' : - (c === 0x50/* P */) ? '\u2029' : ''; - } - - function charFromCodepoint(c) { - if (c <= 0xFFFF) { - return String.fromCharCode(c); - } - // Encode UTF-16 surrogate pair - // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF - return String.fromCharCode( - ((c - 0x010000) >> 10) + 0xD800, - ((c - 0x010000) & 0x03FF) + 0xDC00 - ); - } - - var simpleEscapeCheck = new Array(256); // integer, for fast access - var simpleEscapeMap = new Array(256); - for (var i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; - simpleEscapeMap[i] = simpleEscapeSequence(i); - } - - - function State$1(input, options) { - this.input = input; - - this.filename = options['filename'] || null; - this.schema = options['schema'] || _default; - this.onWarning = options['onWarning'] || null; - // (Hidden) Remove? makes the loader to expect YAML 1.1 documents - // if such documents have no explicit %YAML directive - this.legacy = options['legacy'] || false; - - this.json = options['json'] || false; - this.listener = options['listener'] || null; - - this.implicitTypes = this.schema.compiledImplicit; - this.typeMap = this.schema.compiledTypeMap; - - this.length = input.length; - this.position = 0; - this.line = 0; - this.lineStart = 0; - this.lineIndent = 0; - - // position of first leading tab in the current line, - // used to make sure there are no tabs in the indentation - this.firstTabInLine = -1; - - this.documents = []; - - /* - this.version; - this.checkLineBreaks; - this.tagMap; - this.anchorMap; - this.tag; - this.anchor; - this.kind; - this.result;*/ - - } - - - function generateError(state, message) { - var mark = { - name: state.filename, - buffer: state.input.slice(0, -1), // omit trailing \0 - position: state.position, - line: state.line, - column: state.position - state.lineStart - }; - - mark.snippet = snippet(mark); - - return new exception(message, mark); - } - - function throwError(state, message) { - throw generateError(state, message); - } - - function throwWarning(state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)); - } - } - - - var directiveHandlers = { - - YAML: function handleYamlDirective(state, name, args) { - - var match, major, minor; - - if (state.version !== null) { - throwError(state, 'duplication of %YAML directive'); - } - - if (args.length !== 1) { - throwError(state, 'YAML directive accepts exactly one argument'); - } - - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - - if (match === null) { - throwError(state, 'ill-formed argument of the YAML directive'); - } - - major = parseInt(match[1], 10); - minor = parseInt(match[2], 10); - - if (major !== 1) { - throwError(state, 'unacceptable YAML version of the document'); - } - - state.version = args[0]; - state.checkLineBreaks = (minor < 2); - - if (minor !== 1 && minor !== 2) { - throwWarning(state, 'unsupported YAML version of the document'); - } - }, - - TAG: function handleTagDirective(state, name, args) { - - var handle, prefix; - - if (args.length !== 2) { - throwError(state, 'TAG directive accepts exactly two arguments'); - } - - handle = args[0]; - prefix = args[1]; - - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); - } - - if (_hasOwnProperty$1.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } - - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); - } - - try { - prefix = decodeURIComponent(prefix); - } catch (err) { - throwError(state, 'tag prefix is malformed: ' + prefix); - } - - state.tagMap[handle] = prefix; - } - }; - - - function captureSegment(state, start, end, checkJson) { - var _position, _length, _character, _result; - - if (start < end) { - _result = state.input.slice(start, end); - - if (checkJson) { - for (_position = 0, _length = _result.length; _position < _length; _position += 1) { - _character = _result.charCodeAt(_position); - if (!(_character === 0x09 || - (0x20 <= _character && _character <= 0x10FFFF))) { - throwError(state, 'expected valid JSON character'); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, 'the stream contains non-printable characters'); - } - - state.result += _result; - } - } - - function mergeMappings(state, destination, source, overridableKeys) { - var sourceKeys, key, index, quantity; - - if (!common.isObject(source)) { - throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); - } - - sourceKeys = Object.keys(source); - - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - - if (!_hasOwnProperty$1.call(destination, key)) { - destination[key] = source[key]; - overridableKeys[key] = true; - } - } - } - - function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, - startLine, startLineStart, startPos) { - - var index, quantity; - - // The output is a plain object here, so keys can only be strings. - // We need to convert keyNode to a string, but doing so can hang the process - // (deeply nested arrays that explode exponentially using aliases). - if (Array.isArray(keyNode)) { - keyNode = Array.prototype.slice.call(keyNode); - - for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { - if (Array.isArray(keyNode[index])) { - throwError(state, 'nested arrays are not supported inside keys'); - } - - if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { - keyNode[index] = '[object Object]'; - } - } - } - - // Avoid code execution in load() via toString property - // (still use its own toString for arrays, timestamps, - // and whatever user schema extensions happen to have @@toStringTag) - if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { - keyNode = '[object Object]'; - } - - - keyNode = String(keyNode); - - if (_result === null) { - _result = {}; - } - - if (keyTag === 'tag:yaml.org,2002:merge') { - if (Array.isArray(valueNode)) { - for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { - mergeMappings(state, _result, valueNode[index], overridableKeys); - } - } else { - mergeMappings(state, _result, valueNode, overridableKeys); - } - } else { - if (!state.json && - !_hasOwnProperty$1.call(overridableKeys, keyNode) && - _hasOwnProperty$1.call(_result, keyNode)) { - state.line = startLine || state.line; - state.lineStart = startLineStart || state.lineStart; - state.position = startPos || state.position; - throwError(state, 'duplicated mapping key'); - } - - // used for this specific key only because Object.defineProperty is slow - if (keyNode === '__proto__') { - Object.defineProperty(_result, keyNode, { - configurable: true, - enumerable: true, - writable: true, - value: valueNode - }); - } else { - _result[keyNode] = valueNode; - } - delete overridableKeys[keyNode]; - } - - return _result; - } - - function readLineBreak(state) { - var ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x0A/* LF */) { - state.position++; - } else if (ch === 0x0D/* CR */) { - state.position++; - if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { - state.position++; - } - } else { - throwError(state, 'a line break is expected'); - } - - state.line += 1; - state.lineStart = state.position; - state.firstTabInLine = -1; - } - - function skipSeparationSpace(state, allowComments, checkIndent) { - var lineBreaks = 0, - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { - state.firstTabInLine = state.position; - } - ch = state.input.charCodeAt(++state.position); - } - - if (allowComments && ch === 0x23/* # */) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); - } - - if (is_EOL(ch)) { - readLineBreak(state); - - ch = state.input.charCodeAt(state.position); - lineBreaks++; - state.lineIndent = 0; - - while (ch === 0x20/* Space */) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - } else { - break; - } - } - - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, 'deficient indentation'); - } - - return lineBreaks; - } - - function testDocumentSeparator(state) { - var _position = state.position, - ch; - - ch = state.input.charCodeAt(_position); - - // Condition state.position === state.lineStart is tested - // in parent on each call, for efficiency. No needs to test here again. - if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && - ch === state.input.charCodeAt(_position + 1) && - ch === state.input.charCodeAt(_position + 2)) { - - _position += 3; - - ch = state.input.charCodeAt(_position); - - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; - } - } - - return false; - } - - function writeFoldedLines(state, count) { - if (count === 1) { - state.result += ' '; - } else if (count > 1) { - state.result += common.repeat('\n', count - 1); - } - } - - - function readPlainScalar(state, nodeIndent, withinFlowCollection) { - var preceding, - following, - captureStart, - captureEnd, - hasPendingContent, - _line, - _lineStart, - _lineIndent, - _kind = state.kind, - _result = state.result, - ch; - - ch = state.input.charCodeAt(state.position); - - if (is_WS_OR_EOL(ch) || - is_FLOW_INDICATOR(ch) || - ch === 0x23/* # */ || - ch === 0x26/* & */ || - ch === 0x2A/* * */ || - ch === 0x21/* ! */ || - ch === 0x7C/* | */ || - ch === 0x3E/* > */ || - ch === 0x27/* ' */ || - ch === 0x22/* " */ || - ch === 0x25/* % */ || - ch === 0x40/* @ */ || - ch === 0x60/* ` */) { - return false; - } - - if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; - } - } - - state.kind = 'scalar'; - state.result = ''; - captureStart = captureEnd = state.position; - hasPendingContent = false; - - while (ch !== 0) { - if (ch === 0x3A/* : */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; - } - - } else if (ch === 0x23/* # */) { - preceding = state.input.charCodeAt(state.position - 1); - - if (is_WS_OR_EOL(preceding)) { - break; - } - - } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || - withinFlowCollection && is_FLOW_INDICATOR(ch)) { - break; - - } else if (is_EOL(ch)) { - _line = state.line; - _lineStart = state.lineStart; - _lineIndent = state.lineIndent; - skipSeparationSpace(state, false, -1); - - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state.input.charCodeAt(state.position); - continue; - } else { - state.position = captureEnd; - state.line = _line; - state.lineStart = _lineStart; - state.lineIndent = _lineIndent; - break; - } - } - - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false); - writeFoldedLines(state, state.line - _line); - captureStart = captureEnd = state.position; - hasPendingContent = false; - } - - if (!is_WHITE_SPACE(ch)) { - captureEnd = state.position + 1; - } - - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, captureEnd, false); - - if (state.result) { - return true; - } - - state.kind = _kind; - state.result = _result; - return false; - } - - function readSingleQuotedScalar(state, nodeIndent) { - var ch, - captureStart, captureEnd; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x27/* ' */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x27/* ' */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x27/* ' */) { - captureStart = state.position; - state.position++; - captureEnd = state.position; - } else { - return true; - } - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a single quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a single quoted scalar'); - } - - function readDoubleQuotedScalar(state, nodeIndent) { - var captureStart, - captureEnd, - hexLength, - hexResult, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x22/* " */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x22/* " */) { - captureSegment(state, captureStart, state.position, true); - state.position++; - return true; - - } else if (ch === 0x5C/* \ */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (is_EOL(ch)) { - skipSeparationSpace(state, false, nodeIndent); - - // TODO: rework to inline fn with no type cast? - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch]; - state.position++; - - } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; - - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position); - - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; - - } else { - throwError(state, 'expected hexadecimal character'); - } - } - - state.result += charFromCodepoint(hexResult); - - state.position++; - - } else { - throwError(state, 'unknown escape sequence'); - } - - captureStart = captureEnd = state.position; - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a double quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a double quoted scalar'); - } - - function readFlowCollection(state, nodeIndent) { - var readNext = true, - _line, - _lineStart, - _pos, - _tag = state.tag, - _result, - _anchor = state.anchor, - following, - terminator, - isPair, - isExplicitPair, - isMapping, - overridableKeys = Object.create(null), - keyNode, - keyTag, - valueNode, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x5B/* [ */) { - terminator = 0x5D;/* ] */ - isMapping = false; - _result = []; - } else if (ch === 0x7B/* { */) { - terminator = 0x7D;/* } */ - isMapping = true; - _result = {}; - } else { - return false; - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(++state.position); - - while (ch !== 0) { - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === terminator) { - state.position++; - state.tag = _tag; - state.anchor = _anchor; - state.kind = isMapping ? 'mapping' : 'sequence'; - state.result = _result; - return true; - } else if (!readNext) { - throwError(state, 'missed comma between flow collection entries'); - } else if (ch === 0x2C/* , */) { - // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 - throwError(state, "expected the node content, but found ','"); - } - - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - - if (ch === 0x3F/* ? */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; - state.position++; - skipSeparationSpace(state, true, nodeIndent); - } - } - - _line = state.line; // Save the current line. - _lineStart = state.lineStart; - _pos = state.position; - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state.tag; - keyNode = state.result; - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { - isPair = true; - ch = state.input.charCodeAt(++state.position); - skipSeparationSpace(state, true, nodeIndent); - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state.result; - } - - if (isMapping) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); - } else if (isPair) { - _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); - } else { - _result.push(keyNode); - } - - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x2C/* , */) { - readNext = true; - ch = state.input.charCodeAt(++state.position); - } else { - readNext = false; - } - } - - throwError(state, 'unexpected end of the stream within a flow collection'); - } - - function readBlockScalar(state, nodeIndent) { - var captureStart, - folding, - chomping = CHOMPING_CLIP, - didReadContent = false, - detectedIndent = false, - textIndent = nodeIndent, - emptyLines = 0, - atMoreIndented = false, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x7C/* | */) { - folding = false; - } else if (ch === 0x3E/* > */) { - folding = true; - } else { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - - while (ch !== 0) { - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { - if (CHOMPING_CLIP === chomping) { - chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state, 'repeat of a chomping mode identifier'); - } - - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1; - detectedIndent = true; - } else { - throwError(state, 'repeat of an indentation width identifier'); - } - - } else { - break; - } - } - - if (is_WHITE_SPACE(ch)) { - do { ch = state.input.charCodeAt(++state.position); } - while (is_WHITE_SPACE(ch)); - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (!is_EOL(ch) && (ch !== 0)); - } - } - - while (ch !== 0) { - readLineBreak(state); - state.lineIndent = 0; - - ch = state.input.charCodeAt(state.position); - - while ((!detectedIndent || state.lineIndent < textIndent) && - (ch === 0x20/* Space */)) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent; - } - - if (is_EOL(ch)) { - emptyLines++; - continue; - } - - // End of the scalar. - if (state.lineIndent < textIndent) { - - // Perform the chomping. - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { // i.e. only if the scalar is not empty. - state.result += '\n'; - } - } - - // Break this `while` cycle and go to the funciton's epilogue. - break; - } - - // Folded style: use fancy rules to handle line breaks. - if (folding) { - - // Lines starting with white space characters (more-indented lines) are not folded. - if (is_WHITE_SPACE(ch)) { - atMoreIndented = true; - // except for the first content line (cf. Example 8.1) - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - - // End of more-indented block. - } else if (atMoreIndented) { - atMoreIndented = false; - state.result += common.repeat('\n', emptyLines + 1); - - // Just one line break - perceive as the same line. - } else if (emptyLines === 0) { - if (didReadContent) { // i.e. only if we have already read some scalar content. - state.result += ' '; - } - - // Several line breaks - perceive as different lines. - } else { - state.result += common.repeat('\n', emptyLines); - } - - // Literal style: just add exact number of line breaks between content lines. - } else { - // Keep all line breaks except the header line break. - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } - - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state.position; - - while (!is_EOL(ch) && (ch !== 0)) { - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, state.position, false); - } - - return true; - } - - function readBlockSequence(state, nodeIndent) { - var _line, - _tag = state.tag, - _anchor = state.anchor, - _result = [], - following, - detected = false, - ch; - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - if (state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, 'tab characters must not be used in indentation'); - } - - if (ch !== 0x2D/* - */) { - break; - } - - following = state.input.charCodeAt(state.position + 1); - - if (!is_WS_OR_EOL(following)) { - break; - } - - detected = true; - state.position++; - - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null); - ch = state.input.charCodeAt(state.position); - continue; - } - } - - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state.result); - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a sequence entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'sequence'; - state.result = _result; - return true; - } - return false; - } - - function readBlockMapping(state, nodeIndent, flowIndent) { - var following, - allowCompact, - _line, - _keyLine, - _keyLineStart, - _keyPos, - _tag = state.tag, - _anchor = state.anchor, - _result = {}, - overridableKeys = Object.create(null), - keyTag = null, - keyNode = null, - valueNode = null, - atExplicitKey = false, - detected = false, - ch; - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - if (!atExplicitKey && state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, 'tab characters must not be used in indentation'); - } - - following = state.input.charCodeAt(state.position + 1); - _line = state.line; // Save the current line. - - // - // Explicit notation case. There are two separate blocks: - // first for the key (denoted by "?") and second for the value (denoted by ":") - // - if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { - - if (ch === 0x3F/* ? */) { - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = true; - allowCompact = true; - - } else if (atExplicitKey) { - // i.e. 0x3A/* : */ === character after the explicit key. - atExplicitKey = false; - allowCompact = true; - - } else { - throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); - } - - state.position += 1; - ch = following; - - // - // Implicit notation case. Flow-style node as the key first, then ":", and the value. - // - } else { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - - if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - // Neither implicit nor explicit notation. - // Reading is done. Go to the epilogue. - break; - } - - if (state.line === _line) { - ch = state.input.charCodeAt(state.position); - - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x3A/* : */) { - ch = state.input.charCodeAt(++state.position); - - if (!is_WS_OR_EOL(ch)) { - throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); - } - - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = false; - allowCompact = false; - keyTag = state.tag; - keyNode = state.result; - - } else if (detected) { - throwError(state, 'can not read an implicit mapping pair; a colon is missed'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - - } else if (detected) { - throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - } - - // - // Common reading code for both explicit and implicit notations. - // - if (state.line === _line || state.lineIndent > nodeIndent) { - if (atExplicitKey) { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - } - - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result; - } else { - valueNode = state.result; - } - } - - if (!atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - } - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a mapping entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - // - // Epilogue. - // - - // Special case: last mapping's node contains only the key in explicit notation. - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - } - - // Expose the resulting mapping. - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'mapping'; - state.result = _result; - } - - return detected; - } - - function readTagProperty(state) { - var _position, - isVerbatim = false, - isNamed = false, - tagHandle, - tagName, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x21/* ! */) return false; - - if (state.tag !== null) { - throwError(state, 'duplication of a tag property'); - } - - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x3C/* < */) { - isVerbatim = true; - ch = state.input.charCodeAt(++state.position); - - } else if (ch === 0x21/* ! */) { - isNamed = true; - tagHandle = '!!'; - ch = state.input.charCodeAt(++state.position); - - } else { - tagHandle = '!'; - } - - _position = state.position; - - if (isVerbatim) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && ch !== 0x3E/* > */); - - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position); - ch = state.input.charCodeAt(++state.position); - } else { - throwError(state, 'unexpected end of the stream within a verbatim tag'); - } - } else { - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - - if (ch === 0x21/* ! */) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1); - - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, 'named tag handle cannot contain such characters'); - } - - isNamed = true; - _position = state.position + 1; - } else { - throwError(state, 'tag suffix cannot contain exclamation marks'); - } - } - - ch = state.input.charCodeAt(++state.position); - } - - tagName = state.input.slice(_position, state.position); - - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, 'tag suffix cannot contain flow indicator characters'); - } - } - - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, 'tag name cannot contain such characters: ' + tagName); - } - - try { - tagName = decodeURIComponent(tagName); - } catch (err) { - throwError(state, 'tag name is malformed: ' + tagName); - } - - if (isVerbatim) { - state.tag = tagName; - - } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName; - - } else if (tagHandle === '!') { - state.tag = '!' + tagName; - - } else if (tagHandle === '!!') { - state.tag = 'tag:yaml.org,2002:' + tagName; - - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"'); - } - - return true; - } - - function readAnchorProperty(state) { - var _position, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x26/* & */) return false; - - if (state.anchor !== null) { - throwError(state, 'duplication of an anchor property'); - } - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an anchor node must contain at least one character'); - } - - state.anchor = state.input.slice(_position, state.position); - return true; - } - - function readAlias(state) { - var _position, alias, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x2A/* * */) return false; - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an alias node must contain at least one character'); - } - - alias = state.input.slice(_position, state.position); - - if (!_hasOwnProperty$1.call(state.anchorMap, alias)) { - throwError(state, 'unidentified alias "' + alias + '"'); - } - - state.result = state.anchorMap[alias]; - skipSeparationSpace(state, true, -1); - return true; - } - - function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, - allowBlockScalars, - allowBlockCollections, - indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } - } - - if (indentStatus === 1) { - while (readTagProperty(state) || readAnchorProperty(state)) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true; - allowBlockCollections = allowBlockStyles; - - if (state.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } else { - allowBlockCollections = false; - } - } - } - - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } - - blockIndent = state.position - state.lineStart; - - if (indentStatus === 1) { - if (allowBlockCollections && - (readBlockSequence(state, blockIndent) || - readBlockMapping(state, blockIndent, flowIndent)) || - readFlowCollection(state, flowIndent)) { - hasContent = true; - } else { - if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || - readSingleQuotedScalar(state, flowIndent) || - readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true; - - } else if (readAlias(state)) { - hasContent = true; - - if (state.tag !== null || state.anchor !== null) { - throwError(state, 'alias node should not have any properties'); - } - - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true; - - if (state.tag === null) { - state.tag = '?'; - } - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } else if (indentStatus === 0) { - // Special case: block sequences are allowed to have same indentation level as the parent. - // http://www.yaml.org/spec/1.2/spec.html#id2799784 - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); - } - } - - if (state.tag === null) { - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - - } else if (state.tag === '?') { - // Implicit resolving is not allowed for non-scalar types, and '?' - // non-specific tag is only automatically assigned to plain scalars. - // - // We only need to check kind conformity in case user explicitly assigns '?' - // tag, for example like this: "! [0]" - // - if (state.result !== null && state.kind !== 'scalar') { - throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); - } - - for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type = state.implicitTypes[typeIndex]; - - if (type.resolve(state.result)) { // `state.result` updated in resolver if matched - state.result = type.construct(state.result); - state.tag = type.tag; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - break; - } - } - } else if (state.tag !== '!') { - if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) { - type = state.typeMap[state.kind || 'fallback'][state.tag]; - } else { - // looking for multi type - type = null; - typeList = state.typeMap.multi[state.kind || 'fallback']; - - for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { - if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { - type = typeList[typeIndex]; - break; - } - } - } - - if (!type) { - throwError(state, 'unknown tag !<' + state.tag + '>'); - } - - if (state.result !== null && type.kind !== state.kind) { - throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); - } - - if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched - throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); - } else { - state.result = type.construct(state.result, state.tag); - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } - - if (state.listener !== null) { - state.listener('close', state); - } - return state.tag !== null || state.anchor !== null || hasContent; - } - - function readDocument(state) { - var documentStart = state.position, - _position, - directiveName, - directiveArgs, - hasDirectives = false, - ch; - - state.version = null; - state.checkLineBreaks = state.legacy; - state.tagMap = Object.create(null); - state.anchorMap = Object.create(null); - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if (state.lineIndent > 0 || ch !== 0x25/* % */) { - break; - } - - hasDirectives = true; - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveName = state.input.slice(_position, state.position); - directiveArgs = []; - - if (directiveName.length < 1) { - throwError(state, 'directive name must not be less than one character in length'); - } - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && !is_EOL(ch)); - break; - } - - if (is_EOL(ch)) break; - - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveArgs.push(state.input.slice(_position, state.position)); - } - - if (ch !== 0) readLineBreak(state); - - if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs); - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"'); - } - } - - skipSeparationSpace(state, true, -1); - - if (state.lineIndent === 0 && - state.input.charCodeAt(state.position) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - - } else if (hasDirectives) { - throwError(state, 'directives end mark is expected'); - } - - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state, true, -1); - - if (state.checkLineBreaks && - PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, 'non-ASCII line breaks are interpreted as content'); - } - - state.documents.push(state.result); - - if (state.position === state.lineStart && testDocumentSeparator(state)) { - - if (state.input.charCodeAt(state.position) === 0x2E/* . */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - } - return; - } - - if (state.position < (state.length - 1)) { - throwError(state, 'end of the stream or a document separator is expected'); - } else { - return; - } - } - - - function loadDocuments(input, options) { - input = String(input); - options = options || {}; - - if (input.length !== 0) { - - // Add tailing `\n` if not exists - if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && - input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { - input += '\n'; - } - - // Strip BOM - if (input.charCodeAt(0) === 0xFEFF) { - input = input.slice(1); - } - } - - var state = new State$1(input, options); - - var nullpos = input.indexOf('\0'); - - if (nullpos !== -1) { - state.position = nullpos; - throwError(state, 'null byte is not allowed in input'); - } - - // Use 0 as string terminator. That significantly simplifies bounds check. - state.input += '\0'; - - while (state.input.charCodeAt(state.position) === 0x20/* Space */) { - state.lineIndent += 1; - state.position += 1; - } - - while (state.position < (state.length - 1)) { - readDocument(state); - } - - return state.documents; - } - - - function loadAll$1(input, iterator, options) { - if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { - options = iterator; - iterator = null; - } - - var documents = loadDocuments(input, options); - - if (typeof iterator !== 'function') { - return documents; - } - - for (var index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]); - } - } - - - function load$1(input, options) { - var documents = loadDocuments(input, options); - - if (documents.length === 0) { - /*eslint-disable no-undefined*/ - return undefined; - } else if (documents.length === 1) { - return documents[0]; - } - throw new exception('expected a single document in the stream, but found more'); - } - - - var loadAll_1 = loadAll$1; - var load_1 = load$1; - - var loader = { - loadAll: loadAll_1, - load: load_1 - }; - - /*eslint-disable no-use-before-define*/ - - - - - - var _toString = Object.prototype.toString; - var _hasOwnProperty = Object.prototype.hasOwnProperty; - - var CHAR_BOM = 0xFEFF; - var CHAR_TAB = 0x09; /* Tab */ - var CHAR_LINE_FEED = 0x0A; /* LF */ - var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ - var CHAR_SPACE = 0x20; /* Space */ - var CHAR_EXCLAMATION = 0x21; /* ! */ - var CHAR_DOUBLE_QUOTE = 0x22; /* " */ - var CHAR_SHARP = 0x23; /* # */ - var CHAR_PERCENT = 0x25; /* % */ - var CHAR_AMPERSAND = 0x26; /* & */ - var CHAR_SINGLE_QUOTE = 0x27; /* ' */ - var CHAR_ASTERISK = 0x2A; /* * */ - var CHAR_COMMA = 0x2C; /* , */ - var CHAR_MINUS = 0x2D; /* - */ - var CHAR_COLON = 0x3A; /* : */ - var CHAR_EQUALS = 0x3D; /* = */ - var CHAR_GREATER_THAN = 0x3E; /* > */ - var CHAR_QUESTION = 0x3F; /* ? */ - var CHAR_COMMERCIAL_AT = 0x40; /* @ */ - var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ - var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ - var CHAR_GRAVE_ACCENT = 0x60; /* ` */ - var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ - var CHAR_VERTICAL_LINE = 0x7C; /* | */ - var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ - - var ESCAPE_SEQUENCES = {}; - - ESCAPE_SEQUENCES[0x00] = '\\0'; - ESCAPE_SEQUENCES[0x07] = '\\a'; - ESCAPE_SEQUENCES[0x08] = '\\b'; - ESCAPE_SEQUENCES[0x09] = '\\t'; - ESCAPE_SEQUENCES[0x0A] = '\\n'; - ESCAPE_SEQUENCES[0x0B] = '\\v'; - ESCAPE_SEQUENCES[0x0C] = '\\f'; - ESCAPE_SEQUENCES[0x0D] = '\\r'; - ESCAPE_SEQUENCES[0x1B] = '\\e'; - ESCAPE_SEQUENCES[0x22] = '\\"'; - ESCAPE_SEQUENCES[0x5C] = '\\\\'; - ESCAPE_SEQUENCES[0x85] = '\\N'; - ESCAPE_SEQUENCES[0xA0] = '\\_'; - ESCAPE_SEQUENCES[0x2028] = '\\L'; - ESCAPE_SEQUENCES[0x2029] = '\\P'; - - var DEPRECATED_BOOLEANS_SYNTAX = [ - 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', - 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' - ]; - - var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; - - function compileStyleMap(schema, map) { - var result, keys, index, length, tag, style, type; - - if (map === null) return {}; - - result = {}; - keys = Object.keys(map); - - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map[tag]); - - if (tag.slice(0, 2) === '!!') { - tag = 'tag:yaml.org,2002:' + tag.slice(2); - } - type = schema.compiledTypeMap['fallback'][tag]; - - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style]; - } - - result[tag] = style; - } - - return result; - } - - function encodeHex(character) { - var string, handle, length; - - string = character.toString(16).toUpperCase(); - - if (character <= 0xFF) { - handle = 'x'; - length = 2; - } else if (character <= 0xFFFF) { - handle = 'u'; - length = 4; - } else if (character <= 0xFFFFFFFF) { - handle = 'U'; - length = 8; - } else { - throw new exception('code point within a string may not be greater than 0xFFFFFFFF'); - } - - return '\\' + handle + common.repeat('0', length - string.length) + string; - } - - - var QUOTING_TYPE_SINGLE = 1, - QUOTING_TYPE_DOUBLE = 2; - - function State(options) { - this.schema = options['schema'] || _default; - this.indent = Math.max(1, (options['indent'] || 2)); - this.noArrayIndent = options['noArrayIndent'] || false; - this.skipInvalid = options['skipInvalid'] || false; - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); - this.styleMap = compileStyleMap(this.schema, options['styles'] || null); - this.sortKeys = options['sortKeys'] || false; - this.lineWidth = options['lineWidth'] || 80; - this.noRefs = options['noRefs'] || false; - this.noCompatMode = options['noCompatMode'] || false; - this.condenseFlow = options['condenseFlow'] || false; - this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; - this.forceQuotes = options['forceQuotes'] || false; - this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null; - - this.implicitTypes = this.schema.compiledImplicit; - this.explicitTypes = this.schema.compiledExplicit; - - this.tag = null; - this.result = ''; - - this.duplicates = []; - this.usedDuplicates = null; - } - - // Indents every line in a string. Empty lines (\n only) are not indented. - function indentString(string, spaces) { - var ind = common.repeat(' ', spaces), - position = 0, - next = -1, - result = '', - line, - length = string.length; - - while (position < length) { - next = string.indexOf('\n', position); - if (next === -1) { - line = string.slice(position); - position = length; - } else { - line = string.slice(position, next + 1); - position = next + 1; - } - - if (line.length && line !== '\n') result += ind; - - result += line; - } - - return result; - } - - function generateNextLine(state, level) { - return '\n' + common.repeat(' ', state.indent * level); - } - - function testImplicitResolving(state, str) { - var index, length, type; - - for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { - type = state.implicitTypes[index]; - - if (type.resolve(str)) { - return true; - } - } - - return false; - } - - // [33] s-white ::= s-space | s-tab - function isWhitespace(c) { - return c === CHAR_SPACE || c === CHAR_TAB; - } - - // Returns true if the character can be printed without escaping. - // From YAML 1.2: "any allowed characters known to be non-printable - // should also be escaped. [However,] This isn’t mandatory" - // Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. - function isPrintable(c) { - return (0x00020 <= c && c <= 0x00007E) - || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) - || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM) - || (0x10000 <= c && c <= 0x10FFFF); - } - - // [34] ns-char ::= nb-char - s-white - // [27] nb-char ::= c-printable - b-char - c-byte-order-mark - // [26] b-char ::= b-line-feed | b-carriage-return - // Including s-white (for some reason, examples doesn't match specs in this aspect) - // ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark - function isNsCharOrWhitespace(c) { - return isPrintable(c) - && c !== CHAR_BOM - // - b-char - && c !== CHAR_CARRIAGE_RETURN - && c !== CHAR_LINE_FEED; - } - - // [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out - // c = flow-in ⇒ ns-plain-safe-in - // c = block-key ⇒ ns-plain-safe-out - // c = flow-key ⇒ ns-plain-safe-in - // [128] ns-plain-safe-out ::= ns-char - // [129] ns-plain-safe-in ::= ns-char - c-flow-indicator - // [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) - // | ( /* An ns-char preceding */ “#” ) - // | ( “:” /* Followed by an ns-plain-safe(c) */ ) - function isPlainSafe(c, prev, inblock) { - var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); - var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); - return ( - // ns-plain-safe - inblock ? // c = flow-in - cIsNsCharOrWhitespace - : cIsNsCharOrWhitespace - // - c-flow-indicator - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - ) - // ns-plain-char - && c !== CHAR_SHARP // false on '#' - && !(prev === CHAR_COLON && !cIsNsChar) // false on ': ' - || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#' - || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]' - } - - // Simplified test for values allowed as the first character in plain style. - function isPlainSafeFirst(c) { - // Uses a subset of ns-char - c-indicator - // where ns-char = nb-char - s-white. - // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part - return isPrintable(c) && c !== CHAR_BOM - && !isWhitespace(c) // - s-white - // - (c-indicator ::= - // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” - && c !== CHAR_MINUS - && c !== CHAR_QUESTION - && c !== CHAR_COLON - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” - && c !== CHAR_SHARP - && c !== CHAR_AMPERSAND - && c !== CHAR_ASTERISK - && c !== CHAR_EXCLAMATION - && c !== CHAR_VERTICAL_LINE - && c !== CHAR_EQUALS - && c !== CHAR_GREATER_THAN - && c !== CHAR_SINGLE_QUOTE - && c !== CHAR_DOUBLE_QUOTE - // | “%” | “@” | “`”) - && c !== CHAR_PERCENT - && c !== CHAR_COMMERCIAL_AT - && c !== CHAR_GRAVE_ACCENT; - } - - // Simplified test for values allowed as the last character in plain style. - function isPlainSafeLast(c) { - // just not whitespace or colon, it will be checked to be plain character later - return !isWhitespace(c) && c !== CHAR_COLON; - } - - // Same as 'string'.codePointAt(pos), but works in older browsers. - function codePointAt(string, pos) { - var first = string.charCodeAt(pos), second; - if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { - second = string.charCodeAt(pos + 1); - if (second >= 0xDC00 && second <= 0xDFFF) { - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; - } - } - return first; - } - - // Determines whether block indentation indicator is required. - function needIndentIndicator(string) { - var leadingSpaceRe = /^\n* /; - return leadingSpaceRe.test(string); - } - - var STYLE_PLAIN = 1, - STYLE_SINGLE = 2, - STYLE_LITERAL = 3, - STYLE_FOLDED = 4, - STYLE_DOUBLE = 5; - - // Determines which scalar styles are possible and returns the preferred style. - // lineWidth = -1 => no limit. - // Pre-conditions: str.length > 0. - // Post-conditions: - // STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. - // STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). - // STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). - function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, - testAmbiguousType, quotingType, forceQuotes, inblock) { - - var i; - var char = 0; - var prevChar = null; - var hasLineBreak = false; - var hasFoldableLine = false; // only checked if shouldTrackWidth - var shouldTrackWidth = lineWidth !== -1; - var previousLineBreak = -1; // count the first line correctly - var plain = isPlainSafeFirst(codePointAt(string, 0)) - && isPlainSafeLast(codePointAt(string, string.length - 1)); - - if (singleLineOnly || forceQuotes) { - // Case: no block styles. - // Check for disallowed characters to rule out plain and single. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - } else { - // Case: block styles permitted. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - if (char === CHAR_LINE_FEED) { - hasLineBreak = true; - // Check if any line can be folded. - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || - // Foldable line = too long, and not more-indented. - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' '); - previousLineBreak = i; - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - // in case the end is missing a \n - hasFoldableLine = hasFoldableLine || (shouldTrackWidth && - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ')); - } - // Although every style can represent \n without escaping, prefer block styles - // for multiline, since they're more readable and they don't add empty lines. - // Also prefer folding a super-long line. - if (!hasLineBreak && !hasFoldableLine) { - // Strings interpretable as another type have to be quoted; - // e.g. the string 'true' vs. the boolean true. - if (plain && !forceQuotes && !testAmbiguousType(string)) { - return STYLE_PLAIN; - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; - } - // Edge case: block indentation indicator can only have one digit. - if (indentPerLevel > 9 && needIndentIndicator(string)) { - return STYLE_DOUBLE; - } - // At this point we know block styles are valid. - // Prefer literal style unless we want to fold. - if (!forceQuotes) { - return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; - } - - // Note: line breaking/folding is implemented for only the folded style. - // NB. We drop the last trailing newline (if any) of a returned block scalar - // since the dumper adds its own newline. This always works: - // • No ending newline => unaffected; already using strip "-" chomping. - // • Ending newline => removed then restored. - // Importantly, this keeps the "+" chomp indicator from gaining an extra line. - function writeScalar(state, string, level, iskey, inblock) { - state.dump = (function () { - if (string.length === 0) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; - } - if (!state.noCompatMode) { - if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'"); - } - } - - var indent = state.indent * Math.max(1, level); // no 0-indent scalars - // As indentation gets deeper, let the width decrease monotonically - // to the lower bound min(state.lineWidth, 40). - // Note that this implies - // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. - // state.lineWidth > 40 + state.indent: width decreases until the lower bound. - // This behaves better than a constant minimum width which disallows narrower options, - // or an indent threshold which causes the width to suddenly increase. - var lineWidth = state.lineWidth === -1 - ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); - - // Without knowing if keys are implicit/explicit, assume implicit for safety. - var singleLineOnly = iskey - // No block styles in flow mode. - || (state.flowLevel > -1 && level >= state.flowLevel); - function testAmbiguity(string) { - return testImplicitResolving(state, string); - } - - switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, - testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { - - case STYLE_PLAIN: - return string; - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'"; - case STYLE_LITERAL: - return '|' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(string, indent)); - case STYLE_FOLDED: - return '>' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); - case STYLE_DOUBLE: - return '"' + escapeString(string) + '"'; - default: - throw new exception('impossible error: invalid scalar style'); - } - }()); - } - - // Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. - function blockHeader(string, indentPerLevel) { - var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; - - // note the special case: the string '\n' counts as a "trailing" empty line. - var clip = string[string.length - 1] === '\n'; - var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); - var chomp = keep ? '+' : (clip ? '' : '-'); - - return indentIndicator + chomp + '\n'; - } - - // (See the note for writeScalar.) - function dropEndingNewline(string) { - return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; - } - - // Note: a long line without a suitable break point will exceed the width limit. - // Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. - function foldString(string, width) { - // In folded style, $k$ consecutive newlines output as $k+1$ newlines— - // unless they're before or after a more-indented line, or at the very - // beginning or end, in which case $k$ maps to $k$. - // Therefore, parse each chunk as newline(s) followed by a content line. - var lineRe = /(\n+)([^\n]*)/g; - - // first line (possibly an empty line) - var result = (function () { - var nextLF = string.indexOf('\n'); - nextLF = nextLF !== -1 ? nextLF : string.length; - lineRe.lastIndex = nextLF; - return foldLine(string.slice(0, nextLF), width); - }()); - // If we haven't reached the first content line yet, don't add an extra \n. - var prevMoreIndented = string[0] === '\n' || string[0] === ' '; - var moreIndented; - - // rest of the lines - var match; - while ((match = lineRe.exec(string))) { - var prefix = match[1], line = match[2]; - moreIndented = (line[0] === ' '); - result += prefix - + (!prevMoreIndented && !moreIndented && line !== '' - ? '\n' : '') - + foldLine(line, width); - prevMoreIndented = moreIndented; - } - - return result; - } - - // Greedy line breaking. - // Picks the longest line under the limit each time, - // otherwise settles for the shortest line over the limit. - // NB. More-indented lines *cannot* be folded, as that would add an extra \n. - function foldLine(line, width) { - if (line === '' || line[0] === ' ') return line; - - // Since a more-indented line adds a \n, breaks can't be followed by a space. - var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. - var match; - // start is an inclusive index. end, curr, and next are exclusive. - var start = 0, end, curr = 0, next = 0; - var result = ''; - - // Invariants: 0 <= start <= length-1. - // 0 <= curr <= next <= max(0, length-2). curr - start <= width. - // Inside the loop: - // A match implies length >= 2, so curr and next are <= length-2. - while ((match = breakRe.exec(line))) { - next = match.index; - // maintain invariant: curr - start <= width - if (next - start > width) { - end = (curr > start) ? curr : next; // derive end <= length-2 - result += '\n' + line.slice(start, end); - // skip the space that was output as \n - start = end + 1; // derive start <= length-1 - } - curr = next; - } - - // By the invariants, start <= length-1, so there is something left over. - // It is either the whole string or a part starting from non-whitespace. - result += '\n'; - // Insert a break if the remainder is too long and there is a break available. - if (line.length - start > width && curr > start) { - result += line.slice(start, curr) + '\n' + line.slice(curr + 1); - } else { - result += line.slice(start); - } - - return result.slice(1); // drop extra \n joiner - } - - // Escapes a double-quoted string. - function escapeString(string) { - var result = ''; - var char = 0; - var escapeSeq; - - for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - escapeSeq = ESCAPE_SEQUENCES[char]; - - if (!escapeSeq && isPrintable(char)) { - result += string[i]; - if (char >= 0x10000) result += string[i + 1]; - } else { - result += escapeSeq || encodeHex(char); - } - } - - return result; - } - - function writeFlowSequence(state, level, object) { - var _result = '', - _tag = state.tag, - index, - length, - value; - - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - - if (state.replacer) { - value = state.replacer.call(object, String(index), value); - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level, value, false, false) || - (typeof value === 'undefined' && - writeNode(state, level, null, false, false))) { - - if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : ''); - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = '[' + _result + ']'; - } - - function writeBlockSequence(state, level, object, compact) { - var _result = '', - _tag = state.tag, - index, - length, - value; - - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - - if (state.replacer) { - value = state.replacer.call(object, String(index), value); - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level + 1, value, true, true, false, true) || - (typeof value === 'undefined' && - writeNode(state, level + 1, null, true, true, false, true))) { - - if (!compact || _result !== '') { - _result += generateNextLine(state, level); - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - _result += '-'; - } else { - _result += '- '; - } - - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = _result || '[]'; // Empty sequence if no valid values. - } - - function writeFlowMapping(state, level, object) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - pairBuffer; - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - - pairBuffer = ''; - if (_result !== '') pairBuffer += ', '; - - if (state.condenseFlow) pairBuffer += '"'; - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue); - } - - if (!writeNode(state, level, objectKey, false, false)) { - continue; // Skip this pair because of invalid key; - } - - if (state.dump.length > 1024) pairBuffer += '? '; - - pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); - - if (!writeNode(state, level, objectValue, false, false)) { - continue; // Skip this pair because of invalid value. - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = '{' + _result + '}'; - } - - function writeBlockMapping(state, level, object, compact) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - explicitPair, - pairBuffer; - - // Allow sorting keys so that the output file is deterministic - if (state.sortKeys === true) { - // Default sorting - objectKeyList.sort(); - } else if (typeof state.sortKeys === 'function') { - // Custom sort function - objectKeyList.sort(state.sortKeys); - } else if (state.sortKeys) { - // Something is wrong - throw new exception('sortKeys must be a boolean or a function'); - } - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ''; - - if (!compact || _result !== '') { - pairBuffer += generateNextLine(state, level); - } - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue); - } - - if (!writeNode(state, level + 1, objectKey, true, true, true)) { - continue; // Skip this pair because of invalid key. - } - - explicitPair = (state.tag !== null && state.tag !== '?') || - (state.dump && state.dump.length > 1024); - - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += '?'; - } else { - pairBuffer += '? '; - } - } - - pairBuffer += state.dump; - - if (explicitPair) { - pairBuffer += generateNextLine(state, level); - } - - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue; // Skip this pair because of invalid value. - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ':'; - } else { - pairBuffer += ': '; - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = _result || '{}'; // Empty mapping if no valid pairs. - } - - function detectType(state, object, explicit) { - var _result, typeList, index, length, type, style; - - typeList = explicit ? state.explicitTypes : state.implicitTypes; - - for (index = 0, length = typeList.length; index < length; index += 1) { - type = typeList[index]; - - if ((type.instanceOf || type.predicate) && - (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && - (!type.predicate || type.predicate(object))) { - - if (explicit) { - if (type.multi && type.representName) { - state.tag = type.representName(object); - } else { - state.tag = type.tag; - } - } else { - state.tag = '?'; - } - - if (type.represent) { - style = state.styleMap[type.tag] || type.defaultStyle; - - if (_toString.call(type.represent) === '[object Function]') { - _result = type.represent(object, style); - } else if (_hasOwnProperty.call(type.represent, style)) { - _result = type.represent[style](object, style); - } else { - throw new exception('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); - } - - state.dump = _result; - } - - return true; - } - } - - return false; - } - - // Serializes `object` and writes it to global `result`. - // Returns true on success, or false on invalid object. - // - function writeNode(state, level, object, block, compact, iskey, isblockseq) { - state.tag = null; - state.dump = object; - - if (!detectType(state, object, false)) { - detectType(state, object, true); - } - - var type = _toString.call(state.dump); - var inblock = block; - var tagStr; - - if (block) { - block = (state.flowLevel < 0 || state.flowLevel > level); - } - - var objectOrArray = type === '[object Object]' || type === '[object Array]', - duplicateIndex, - duplicate; - - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; - } - - if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { - compact = false; - } - - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = '*ref_' + duplicateIndex; - } else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true; - } - if (type === '[object Object]') { - if (block && (Object.keys(state.dump).length !== 0)) { - writeBlockMapping(state, level, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowMapping(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object Array]') { - if (block && (state.dump.length !== 0)) { - if (state.noArrayIndent && !isblockseq && level > 0) { - writeBlockSequence(state, level - 1, state.dump, compact); - } else { - writeBlockSequence(state, level, state.dump, compact); - } - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowSequence(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object String]') { - if (state.tag !== '?') { - writeScalar(state, state.dump, level, iskey, inblock); - } - } else if (type === '[object Undefined]') { - return false; - } else { - if (state.skipInvalid) return false; - throw new exception('unacceptable kind of an object to dump ' + type); - } - - if (state.tag !== null && state.tag !== '?') { - // Need to encode all characters except those allowed by the spec: - // - // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ - // [36] ns-hex-digit ::= ns-dec-digit - // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ - // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ - // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” - // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” - // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” - // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” - // - // Also need to encode '!' because it has special meaning (end of tag prefix). - // - tagStr = encodeURI( - state.tag[0] === '!' ? state.tag.slice(1) : state.tag - ).replace(/!/g, '%21'); - - if (state.tag[0] === '!') { - tagStr = '!' + tagStr; - } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { - tagStr = '!!' + tagStr.slice(18); - } else { - tagStr = '!<' + tagStr + '>'; - } - - state.dump = tagStr + ' ' + state.dump; - } - } - - return true; - } - - function getDuplicateReferences(object, state) { - var objects = [], - duplicatesIndexes = [], - index, - length; - - inspectNode(object, objects, duplicatesIndexes); - - for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { - state.duplicates.push(objects[duplicatesIndexes[index]]); - } - state.usedDuplicates = new Array(length); - } - - function inspectNode(object, objects, duplicatesIndexes) { - var objectKeyList, - index, - length; - - if (object !== null && typeof object === 'object') { - index = objects.indexOf(object); - if (index !== -1) { - if (duplicatesIndexes.indexOf(index) === -1) { - duplicatesIndexes.push(index); - } - } else { - objects.push(object); - - if (Array.isArray(object)) { - for (index = 0, length = object.length; index < length; index += 1) { - inspectNode(object[index], objects, duplicatesIndexes); - } - } else { - objectKeyList = Object.keys(object); - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); - } - } - } - } - } - - function dump$1(input, options) { - options = options || {}; - - var state = new State(options); - - if (!state.noRefs) getDuplicateReferences(input, state); - - var value = input; - - if (state.replacer) { - value = state.replacer.call({ '': value }, '', value); - } - - if (writeNode(state, 0, value, true, true)) return state.dump + '\n'; - - return ''; - } - - var dump_1 = dump$1; - - var dumper = { - dump: dump_1 - }; - - function renamed(from, to) { - return function () { - throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + - 'Use yaml.' + to + ' instead, which is now safe by default.'); - }; - } - - - var Type = type; - var Schema = schema; - var FAILSAFE_SCHEMA = failsafe; - var JSON_SCHEMA = json; - var CORE_SCHEMA = core; - var DEFAULT_SCHEMA = _default; - var load = loader.load; - var loadAll = loader.loadAll; - var dump = dumper.dump; - var YAMLException = exception; - - // Re-export all types in case user wants to create custom schema - var types = { - binary: binary, - float: float, - map: map, - null: _null, - pairs: pairs, - set: set, - timestamp: timestamp, - bool: bool, - int: int, - merge: merge, - omap: omap, - seq: seq, - str: str - }; - - // Removed functions from JS-YAML 3.0.x - var safeLoad = renamed('safeLoad', 'load'); - var safeLoadAll = renamed('safeLoadAll', 'loadAll'); - var safeDump = renamed('safeDump', 'dump'); - - var jsYaml = { - Type: Type, - Schema: Schema, - FAILSAFE_SCHEMA: FAILSAFE_SCHEMA, - JSON_SCHEMA: JSON_SCHEMA, - CORE_SCHEMA: CORE_SCHEMA, - DEFAULT_SCHEMA: DEFAULT_SCHEMA, - load: load, - loadAll: loadAll, - dump: dump, - YAMLException: YAMLException, - types: types, - safeLoad: safeLoad, - safeLoadAll: safeLoadAll, - safeDump: safeDump - }; - - exports.CORE_SCHEMA = CORE_SCHEMA; - exports.DEFAULT_SCHEMA = DEFAULT_SCHEMA; - exports.FAILSAFE_SCHEMA = FAILSAFE_SCHEMA; - exports.JSON_SCHEMA = JSON_SCHEMA; - exports.Schema = Schema; - exports.Type = Type; - exports.YAMLException = YAMLException; - exports.default = jsYaml; - exports.dump = dump; - exports.load = load; - exports.loadAll = loadAll; - exports.safeDump = safeDump; - exports.safeLoad = safeLoad; - exports.safeLoadAll = safeLoadAll; - exports.types = types; - - Object.defineProperty(exports, '__esModule', { value: true }); - -}))); diff --git a/node_modules/js-yaml/dist/js-yaml.min.js b/node_modules/js-yaml/dist/js-yaml.min.js deleted file mode 100644 index bdd8eef5..00000000 --- a/node_modules/js-yaml/dist/js-yaml.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).jsyaml={})}(this,(function(e){"use strict";function t(e){return null==e}var n={isNothing:t,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:t(e)?[]:[e]},repeat:function(e,t){var n,i="";for(n=0;nl&&(t=i-l+(o=" ... ").length),n-i>l&&(n=i+l-(a=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:i-t+o.length}}function l(e,t){return n.repeat(" ",t-e.length)+e}var c=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var i,r=/\r?\n|\r|\0/g,o=[0],c=[],s=-1;i=r.exec(e.buffer);)c.push(i.index),o.push(i.index+i[0].length),e.position<=i.index&&s<0&&(s=o.length-2);s<0&&(s=o.length-1);var u,p,f="",d=Math.min(e.line+t.linesAfter,c.length).toString().length,h=t.maxLength-(t.indent+d+3);for(u=1;u<=t.linesBefore&&!(s-u<0);u++)p=a(e.buffer,o[s-u],c[s-u],e.position-(o[s]-o[s-u]),h),f=n.repeat(" ",t.indent)+l((e.line-u+1).toString(),d)+" | "+p.str+"\n"+f;for(p=a(e.buffer,o[s],c[s],e.position,h),f+=n.repeat(" ",t.indent)+l((e.line+1).toString(),d)+" | "+p.str+"\n",f+=n.repeat("-",t.indent+d+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(s+u>=c.length);u++)p=a(e.buffer,o[s+u],c[s+u],e.position-(o[s]-o[s+u]),h),f+=n.repeat(" ",t.indent)+l((e.line+u+1).toString(),d)+" | "+p.str+"\n";return f.replace(/\n$/,"")},s=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],u=["scalar","sequence","mapping"];var p=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===s.indexOf(t))throw new o('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===u.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function f(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,i){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=i)})),n[t]=e})),n}function d(e){return this.extend(e)}d.prototype.extend=function(e){var t=[],n=[];if(e instanceof p)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new o("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new o("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(d.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=f(i,"implicit"),i.compiledExplicit=f(i,"explicit"),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),x=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var I=/^[-+]?[0-9]+e/;var S=new p("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!x.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||n.isNegativeZero(e))},represent:function(e,t){var i;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(n.isNegativeZero(e))return"-0.0";return i=e.toString(10),I.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),O=b.extend({implicit:[A,v,C,S]}),j=O,T=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),N=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var F=new p("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==T.exec(e)||null!==N.exec(e))},construct:function(e){var t,n,i,r,o,a,l,c,s=0,u=null;if(null===(t=T.exec(e))&&(t=N.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r));if(o=+t[4],a=+t[5],l=+t[6],t[7]){for(s=t[7].slice(0,3);s.length<3;)s+="0";s=+s}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),c=new Date(Date.UTC(n,i,r,o,a,l,s)),u&&c.setTime(c.getTime()-u),c},instanceOf:Date,represent:function(e){return e.toISOString()}});var E=new p("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var L=new p("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,r=e.length,o=M;for(n=0;n64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=M,a=0,l=[];for(t=0;t>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|o.indexOf(i.charAt(t));return 0===(n=r%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",r=0,o=e.length,a=M;for(t=0;t>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t];return 0===(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}}),_=Object.prototype.hasOwnProperty,D=Object.prototype.toString;var U=new p("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,r,o,a=[],l=e;for(t=0,n=l.length;t>10),56320+(e-65536&1023))}for(var ie=new Array(256),re=new Array(256),oe=0;oe<256;oe++)ie[oe]=te(oe)?1:0,re[oe]=te(oe);function ae(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||K,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function le(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=c(n),new o(t,n)}function ce(e,t){throw le(e,t)}function se(e,t){e.onWarning&&e.onWarning.call(null,le(e,t))}var ue={YAML:function(e,t,n){var i,r,o;null!==e.version&&ce(e,"duplication of %YAML directive"),1!==n.length&&ce(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&ce(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&ce(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&se(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&ce(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],G.test(i)||ce(e,"ill-formed tag handle (first argument) of the TAG directive"),P.call(e.tagMap,i)&&ce(e,'there is a previously declared suffix for "'+i+'" tag handle'),V.test(r)||ce(e,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(t){ce(e,"tag prefix is malformed: "+r)}e.tagMap[i]=r}};function pe(e,t,n,i){var r,o,a,l;if(t1&&(e.result+=n.repeat("\n",t-1))}function be(e,t){var n,i,r=e.tag,o=e.anchor,a=[],l=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,ce(e,"tab characters must not be used in indentation")),45===i)&&z(e.input.charCodeAt(e.position+1));)if(l=!0,e.position++,ge(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,we(e,t,3,!1,!0),a.push(e.result),ge(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)ce(e,"bad indentation of a sequence entry");else if(e.lineIndentt?g=1:e.lineIndent===t?g=0:e.lineIndentt?g=1:e.lineIndent===t?g=0:e.lineIndentt)&&(y&&(a=e.line,l=e.lineStart,c=e.position),we(e,t,4,!0,r)&&(y?g=e.result:m=e.result),y||(de(e,f,d,h,g,m,a,l,c),h=g=m=null),ge(e,!0,-1),s=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==s)ce(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?ce(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?ce(e,"repeat of an indentation width identifier"):(p=t+o-1,u=!0)}if(Q(a)){do{a=e.input.charCodeAt(++e.position)}while(Q(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!J(a)&&0!==a)}for(;0!==a;){for(he(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!u||e.lineIndentp&&(p=e.lineIndent),J(a))f++;else{if(e.lineIndent0){for(r=a,o=0;r>0;r--)(a=ee(l=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:ce(e,"expected hexadecimal character");e.result+=ne(o),e.position++}else ce(e,"unknown escape sequence");n=i=e.position}else J(l)?(pe(e,n,i,!0),ye(e,ge(e,!1,t)),n=i=e.position):e.position===e.lineStart&&me(e)?ce(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}ce(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?y=!0:!function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!z(i)&&!X(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&ce(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),P.call(e.anchorMap,n)||ce(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],ge(e,!0,-1),!0}(e)?function(e,t,n){var i,r,o,a,l,c,s,u,p=e.kind,f=e.result;if(z(u=e.input.charCodeAt(e.position))||X(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(z(i=e.input.charCodeAt(e.position+1))||n&&X(i)))return!1;for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==u;){if(58===u){if(z(i=e.input.charCodeAt(e.position+1))||n&&X(i))break}else if(35===u){if(z(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&me(e)||n&&X(u))break;if(J(u)){if(l=e.line,c=e.lineStart,s=e.lineIndent,ge(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=o,e.line=l,e.lineStart=c,e.lineIndent=s;break}}a&&(pe(e,r,o,!1),ye(e,e.line-l),r=o=e.position,a=!1),Q(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return pe(e,r,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,d,1===i)&&(y=!0,null===e.tag&&(e.tag="?")):(y=!0,null===e.tag&&null===e.anchor||ce(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===g&&(y=c&&be(e,h))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&ce(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),s=0,u=e.implicitTypes.length;s"),null!==e.result&&f.kind!==e.kind&&ce(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):ce(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function ke(e){var t,n,i,r,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(r=e.input.charCodeAt(e.position))&&(ge(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!z(r);)r=e.input.charCodeAt(++e.position);for(i=[],(n=e.input.slice(t,e.position)).length<1&&ce(e,"directive name must not be less than one character in length");0!==r;){for(;Q(r);)r=e.input.charCodeAt(++e.position);if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!J(r));break}if(J(r))break;for(t=e.position;0!==r&&!z(r);)r=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==r&&he(e),P.call(ue,n)?ue[n](e,n,i):se(e,'unknown document directive "'+n+'"')}ge(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,ge(e,!0,-1)):a&&ce(e,"directives end mark is expected"),we(e,e.lineIndent-1,4,!1,!0),ge(e,!0,-1),e.checkLineBreaks&&H.test(e.input.slice(o,e.position))&&se(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&me(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,ge(e,!0,-1)):e.position=55296&&i<=56319&&t+1=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function Re(e){return/^\n* /.test(e)}function Be(e,t,n,i,r,o,a,l){var c,s,u=0,p=null,f=!1,d=!1,h=-1!==i,g=-1,m=De(s=Ye(e,0))&&s!==Oe&&!_e(s)&&45!==s&&63!==s&&58!==s&&44!==s&&91!==s&&93!==s&&123!==s&&125!==s&&35!==s&&38!==s&&42!==s&&33!==s&&124!==s&&61!==s&&62!==s&&39!==s&&34!==s&&37!==s&&64!==s&&96!==s&&function(e){return!_e(e)&&58!==e}(Ye(e,e.length-1));if(t||a)for(c=0;c=65536?c+=2:c++){if(!De(u=Ye(e,c)))return 5;m=m&&qe(u,p,l),p=u}else{for(c=0;c=65536?c+=2:c++){if(10===(u=Ye(e,c)))f=!0,h&&(d=d||c-g-1>i&&" "!==e[g+1],g=c);else if(!De(u))return 5;m=m&&qe(u,p,l),p=u}d=d||h&&c-g-1>i&&" "!==e[g+1]}return f||d?n>9&&Re(e)?5:a?2===o?5:2:d?4:3:!m||a||r(e)?2===o?5:2:1}function Ke(e,t,n,i,r){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Te.indexOf(t)||Ne.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,n),l=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),c=i||e.flowLevel>-1&&n>=e.flowLevel;switch(Be(t,c,e.indent,l,(function(t){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n"+Pe(t,e.indent)+We(Me(function(e,t){var n,i,r=/(\n+)([^\n]*)/g,o=(l=e.indexOf("\n"),l=-1!==l?l:e.length,r.lastIndex=l,He(e.slice(0,l),t)),a="\n"===e[0]||" "===e[0];var l;for(;i=r.exec(e);){var c=i[1],s=i[2];n=" "===s[0],o+=c+(a||n||""===s?"":"\n")+He(s,t),a=n}return o}(t,l),a));case 5:return'"'+function(e){for(var t,n="",i=0,r=0;r=65536?r+=2:r++)i=Ye(e,r),!(t=je[i])&&De(i)?(n+=e[r],i>=65536&&(n+=e[r+1])):n+=t||Fe(i);return n}(t)+'"';default:throw new o("impossible error: invalid scalar style")}}()}function Pe(e,t){var n=Re(e)?String(t):"",i="\n"===e[e.length-1];return n+(i&&("\n"===e[e.length-2]||"\n"===e)?"+":i?"":"-")+"\n"}function We(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function He(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,a=0,l=0,c="";n=r.exec(e);)(l=n.index)-o>t&&(i=a>o?a:l,c+="\n"+e.slice(o,i),o=i+1),a=l;return c+="\n",e.length-o>t&&a>o?c+=e.slice(o,a)+"\n"+e.slice(a+1):c+=e.slice(o),c.slice(1)}function $e(e,t,n,i){var r,o,a,l="",c=e.tag;for(r=0,o=n.length;r tag resolver accepts not "'+s+'" style');i=c.represent[s](t,s)}e.dump=i}return!0}return!1}function Ve(e,t,n,i,r,a,l){e.tag=null,e.dump=n,Ge(e,n,!1)||Ge(e,n,!0);var c,s=Ie.call(e.dump),u=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var p,f,d="[object Object]"===s||"[object Array]"===s;if(d&&(f=-1!==(p=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(r=!1),f&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(d&&f&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===s)i&&0!==Object.keys(e.dump).length?(!function(e,t,n,i){var r,a,l,c,s,u,p="",f=e.tag,d=Object.keys(n);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new o("sortKeys must be a boolean or a function");for(r=0,a=d.length;r1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,s&&(u+=Le(e,t)),Ve(e,t+1,c,!0,s)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=e.dump));e.tag=f,e.dump=p||"{}"}(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a,l,c="",s=e.tag,u=Object.keys(n);for(i=0,r=u.length;i1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ve(e,t,a,!1,!1)&&(c+=l+=e.dump));e.tag=s,e.dump="{"+c+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump));else if("[object Array]"===s)i&&0!==e.dump.length?(e.noArrayIndent&&!l&&t>0?$e(e,t-1,e.dump,r):$e(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a="",l=e.tag;for(i=0,r=n.length;i",e.dump=c+" "+e.dump)}return!0}function Ze(e,t){var n,i,r=[],o=[];for(Je(e,r,o),n=0,i=o.length;n maxHalfLength) { - head = ' ... '; - lineStart = position - maxHalfLength + head.length; - } - - if (lineEnd - position > maxHalfLength) { - tail = ' ...'; - lineEnd = position + maxHalfLength - tail.length; - } - - return { - str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, - pos: position - lineStart + head.length // relative position - }; -} - - -function padStart(string, max) { - return common.repeat(' ', max - string.length) + string; -} - - -function makeSnippet(mark, options) { - options = Object.create(options || null); - - if (!mark.buffer) return null; - - if (!options.maxLength) options.maxLength = 79; - if (typeof options.indent !== 'number') options.indent = 1; - if (typeof options.linesBefore !== 'number') options.linesBefore = 3; - if (typeof options.linesAfter !== 'number') options.linesAfter = 2; - - var re = /\r?\n|\r|\0/g; - var lineStarts = [ 0 ]; - var lineEnds = []; - var match; - var foundLineNo = -1; - - while ((match = re.exec(mark.buffer))) { - lineEnds.push(match.index); - lineStarts.push(match.index + match[0].length); - - if (mark.position <= match.index && foundLineNo < 0) { - foundLineNo = lineStarts.length - 2; - } - } - - if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; - - var result = '', i, line; - var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; - var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); - - for (i = 1; i <= options.linesBefore; i++) { - if (foundLineNo - i < 0) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo - i], - lineEnds[foundLineNo - i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), - maxLineLength - ); - result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n' + result; - } - - line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); - result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n'; - result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'; - - for (i = 1; i <= options.linesAfter; i++) { - if (foundLineNo + i >= lineEnds.length) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo + i], - lineEnds[foundLineNo + i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), - maxLineLength - ); - result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n'; - } - - return result.replace(/\n$/, ''); -} - - -var snippet = makeSnippet; - -var TYPE_CONSTRUCTOR_OPTIONS = [ - 'kind', - 'multi', - 'resolve', - 'construct', - 'instanceOf', - 'predicate', - 'represent', - 'representName', - 'defaultStyle', - 'styleAliases' -]; - -var YAML_NODE_KINDS = [ - 'scalar', - 'sequence', - 'mapping' -]; - -function compileStyleAliases(map) { - var result = {}; - - if (map !== null) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style; - }); - }); - } - - return result; -} - -function Type$1(tag, options) { - options = options || {}; - - Object.keys(options).forEach(function (name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); - } - }); - - // TODO: Add tag format check. - this.options = options; // keep original options in case user wants to extend this type later - this.tag = tag; - this.kind = options['kind'] || null; - this.resolve = options['resolve'] || function () { return true; }; - this.construct = options['construct'] || function (data) { return data; }; - this.instanceOf = options['instanceOf'] || null; - this.predicate = options['predicate'] || null; - this.represent = options['represent'] || null; - this.representName = options['representName'] || null; - this.defaultStyle = options['defaultStyle'] || null; - this.multi = options['multi'] || false; - this.styleAliases = compileStyleAliases(options['styleAliases'] || null); - - if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { - throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } -} - -var type = Type$1; - -/*eslint-disable max-len*/ - - - - - -function compileList(schema, name) { - var result = []; - - schema[name].forEach(function (currentType) { - var newIndex = result.length; - - result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag && - previousType.kind === currentType.kind && - previousType.multi === currentType.multi) { - - newIndex = previousIndex; - } - }); - - result[newIndex] = currentType; - }); - - return result; -} - - -function compileMap(/* lists... */) { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] - } - }, index, length; - - function collectType(type) { - if (type.multi) { - result.multi[type.kind].push(type); - result.multi['fallback'].push(type); - } else { - result[type.kind][type.tag] = result['fallback'][type.tag] = type; - } - } - - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); - } - return result; -} - - -function Schema$1(definition) { - return this.extend(definition); -} - - -Schema$1.prototype.extend = function extend(definition) { - var implicit = []; - var explicit = []; - - if (definition instanceof type) { - // Schema.extend(type) - explicit.push(definition); - - } else if (Array.isArray(definition)) { - // Schema.extend([ type1, type2, ... ]) - explicit = explicit.concat(definition); - - } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { - // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) - if (definition.implicit) implicit = implicit.concat(definition.implicit); - if (definition.explicit) explicit = explicit.concat(definition.explicit); - - } else { - throw new exception('Schema.extend argument should be a Type, [ Type ], ' + - 'or a schema definition ({ implicit: [...], explicit: [...] })'); - } - - implicit.forEach(function (type$1) { - if (!(type$1 instanceof type)) { - throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - - if (type$1.loadKind && type$1.loadKind !== 'scalar') { - throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); - } - - if (type$1.multi) { - throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.'); - } - }); - - explicit.forEach(function (type$1) { - if (!(type$1 instanceof type)) { - throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - }); - - var result = Object.create(Schema$1.prototype); - - result.implicit = (this.implicit || []).concat(implicit); - result.explicit = (this.explicit || []).concat(explicit); - - result.compiledImplicit = compileList(result, 'implicit'); - result.compiledExplicit = compileList(result, 'explicit'); - result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); - - return result; -}; - - -var schema = Schema$1; - -var str = new type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return data !== null ? data : ''; } -}); - -var seq = new type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return data !== null ? data : []; } -}); - -var map = new type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return data !== null ? data : {}; } -}); - -var failsafe = new schema({ - explicit: [ - str, - seq, - map - ] -}); - -function resolveYamlNull(data) { - if (data === null) return true; - - var max = data.length; - - return (max === 1 && data === '~') || - (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); -} - -function constructYamlNull() { - return null; -} - -function isNull(object) { - return object === null; -} - -var _null = new type('tag:yaml.org,2002:null', { - kind: 'scalar', - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function () { return '~'; }, - lowercase: function () { return 'null'; }, - uppercase: function () { return 'NULL'; }, - camelcase: function () { return 'Null'; }, - empty: function () { return ''; } - }, - defaultStyle: 'lowercase' -}); - -function resolveYamlBoolean(data) { - if (data === null) return false; - - var max = data.length; - - return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || - (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); -} - -function constructYamlBoolean(data) { - return data === 'true' || - data === 'True' || - data === 'TRUE'; -} - -function isBoolean(object) { - return Object.prototype.toString.call(object) === '[object Boolean]'; -} - -var bool = new type('tag:yaml.org,2002:bool', { - kind: 'scalar', - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: function (object) { return object ? 'true' : 'false'; }, - uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, - camelcase: function (object) { return object ? 'True' : 'False'; } - }, - defaultStyle: 'lowercase' -}); - -function isHexCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || - ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || - ((0x61/* a */ <= c) && (c <= 0x66/* f */)); -} - -function isOctCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); -} - -function isDecCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); -} - -function resolveYamlInteger(data) { - if (data === null) return false; - - var max = data.length, - index = 0, - hasDigits = false, - ch; - - if (!max) return false; - - ch = data[index]; - - // sign - if (ch === '-' || ch === '+') { - ch = data[++index]; - } - - if (ch === '0') { - // 0 - if (index + 1 === max) return true; - ch = data[++index]; - - // base 2, base 8, base 16 - - if (ch === 'b') { - // base 2 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (ch !== '0' && ch !== '1') return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - - if (ch === 'x') { - // base 16 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isHexCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - - if (ch === 'o') { - // base 8 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isOctCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - } - - // base 10 (except 0) - - // value should not start with `_`; - if (ch === '_') return false; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isDecCode(data.charCodeAt(index))) { - return false; - } - hasDigits = true; - } - - // Should have digits and should not end with `_` - if (!hasDigits || ch === '_') return false; - - return true; -} - -function constructYamlInteger(data) { - var value = data, sign = 1, ch; - - if (value.indexOf('_') !== -1) { - value = value.replace(/_/g, ''); - } - - ch = value[0]; - - if (ch === '-' || ch === '+') { - if (ch === '-') sign = -1; - value = value.slice(1); - ch = value[0]; - } - - if (value === '0') return 0; - - if (ch === '0') { - if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); - if (value[1] === 'x') return sign * parseInt(value.slice(2), 16); - if (value[1] === 'o') return sign * parseInt(value.slice(2), 8); - } - - return sign * parseInt(value, 10); -} - -function isInteger(object) { - return (Object.prototype.toString.call(object)) === '[object Number]' && - (object % 1 === 0 && !common.isNegativeZero(object)); -} - -var int = new type('tag:yaml.org,2002:int', { - kind: 'scalar', - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, - octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); }, - decimal: function (obj) { return obj.toString(10); }, - /* eslint-disable max-len */ - hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } - }, - defaultStyle: 'decimal', - styleAliases: { - binary: [ 2, 'bin' ], - octal: [ 8, 'oct' ], - decimal: [ 10, 'dec' ], - hexadecimal: [ 16, 'hex' ] - } -}); - -var YAML_FLOAT_PATTERN = new RegExp( - // 2.5e4, 2.5 and integers - '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + - // .2e4, .2 - // special case, seems not from spec - '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + - // .inf - '|[-+]?\\.(?:inf|Inf|INF)' + - // .nan - '|\\.(?:nan|NaN|NAN))$'); - -function resolveYamlFloat(data) { - if (data === null) return false; - - if (!YAML_FLOAT_PATTERN.test(data) || - // Quick hack to not allow integers end with `_` - // Probably should update regexp & check speed - data[data.length - 1] === '_') { - return false; - } - - return true; -} - -function constructYamlFloat(data) { - var value, sign; - - value = data.replace(/_/g, '').toLowerCase(); - sign = value[0] === '-' ? -1 : 1; - - if ('+-'.indexOf(value[0]) >= 0) { - value = value.slice(1); - } - - if (value === '.inf') { - return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; - - } else if (value === '.nan') { - return NaN; - } - return sign * parseFloat(value, 10); -} - - -var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; - -function representYamlFloat(object, style) { - var res; - - if (isNaN(object)) { - switch (style) { - case 'lowercase': return '.nan'; - case 'uppercase': return '.NAN'; - case 'camelcase': return '.NaN'; - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '.inf'; - case 'uppercase': return '.INF'; - case 'camelcase': return '.Inf'; - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '-.inf'; - case 'uppercase': return '-.INF'; - case 'camelcase': return '-.Inf'; - } - } else if (common.isNegativeZero(object)) { - return '-0.0'; - } - - res = object.toString(10); - - // JS stringifier can build scientific format without dots: 5e-100, - // while YAML requres dot: 5.e-100. Fix it with simple hack - - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; -} - -function isFloat(object) { - return (Object.prototype.toString.call(object) === '[object Number]') && - (object % 1 !== 0 || common.isNegativeZero(object)); -} - -var float = new type('tag:yaml.org,2002:float', { - kind: 'scalar', - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: 'lowercase' -}); - -var json = failsafe.extend({ - implicit: [ - _null, - bool, - int, - float - ] -}); - -var core = json; - -var YAML_DATE_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9])' + // [2] month - '-([0-9][0-9])$'); // [3] day - -var YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour - '(?::([0-9][0-9]))?))?$'); // [11] tz_minute - -function resolveYamlTimestamp(data) { - if (data === null) return false; - if (YAML_DATE_REGEXP.exec(data) !== null) return true; - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; - return false; -} - -function constructYamlTimestamp(data) { - var match, year, month, day, hour, minute, second, fraction = 0, - delta = null, tz_hour, tz_minute, date; - - match = YAML_DATE_REGEXP.exec(data); - if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); - - if (match === null) throw new Error('Date resolve error'); - - // match: [1] year [2] month [3] day - - year = +(match[1]); - month = +(match[2]) - 1; // JS month starts with 0 - day = +(match[3]); - - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)); - } - - // match: [4] hour [5] minute [6] second [7] fraction - - hour = +(match[4]); - minute = +(match[5]); - second = +(match[6]); - - if (match[7]) { - fraction = match[7].slice(0, 3); - while (fraction.length < 3) { // milli-seconds - fraction += '0'; - } - fraction = +fraction; - } - - // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute - - if (match[9]) { - tz_hour = +(match[10]); - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds - if (match[9] === '-') delta = -delta; - } - - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - - if (delta) date.setTime(date.getTime() - delta); - - return date; -} - -function representYamlTimestamp(object /*, style*/) { - return object.toISOString(); -} - -var timestamp = new type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}); - -function resolveYamlMerge(data) { - return data === '<<' || data === null; -} - -var merge = new type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge -}); - -/*eslint-disable no-bitwise*/ - - - - - -// [ 64, 65, 66 ] -> [ padding, CR, LF ] -var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; - - -function resolveYamlBinary(data) { - if (data === null) return false; - - var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; - - // Convert one by one. - for (idx = 0; idx < max; idx++) { - code = map.indexOf(data.charAt(idx)); - - // Skip CR/LF - if (code > 64) continue; - - // Fail on illegal characters - if (code < 0) return false; - - bitlen += 6; - } - - // If there are any bits left, source was corrupted - return (bitlen % 8) === 0; -} - -function constructYamlBinary(data) { - var idx, tailbits, - input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan - max = input.length, - map = BASE64_MAP, - bits = 0, - result = []; - - // Collect by 6*4 bits (3 bytes) - - for (idx = 0; idx < max; idx++) { - if ((idx % 4 === 0) && idx) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } - - bits = (bits << 6) | map.indexOf(input.charAt(idx)); - } - - // Dump tail - - tailbits = (max % 4) * 6; - - if (tailbits === 0) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } else if (tailbits === 18) { - result.push((bits >> 10) & 0xFF); - result.push((bits >> 2) & 0xFF); - } else if (tailbits === 12) { - result.push((bits >> 4) & 0xFF); - } - - return new Uint8Array(result); -} - -function representYamlBinary(object /*, style*/) { - var result = '', bits = 0, idx, tail, - max = object.length, - map = BASE64_MAP; - - // Convert every three bytes to 4 ASCII characters. - - for (idx = 0; idx < max; idx++) { - if ((idx % 3 === 0) && idx) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } - - bits = (bits << 8) + object[idx]; - } - - // Dump tail - - tail = max % 3; - - if (tail === 0) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } else if (tail === 2) { - result += map[(bits >> 10) & 0x3F]; - result += map[(bits >> 4) & 0x3F]; - result += map[(bits << 2) & 0x3F]; - result += map[64]; - } else if (tail === 1) { - result += map[(bits >> 2) & 0x3F]; - result += map[(bits << 4) & 0x3F]; - result += map[64]; - result += map[64]; - } - - return result; -} - -function isBinary(obj) { - return Object.prototype.toString.call(obj) === '[object Uint8Array]'; -} - -var binary = new type('tag:yaml.org,2002:binary', { - kind: 'scalar', - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}); - -var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; -var _toString$2 = Object.prototype.toString; - -function resolveYamlOmap(data) { - if (data === null) return true; - - var objectKeys = [], index, length, pair, pairKey, pairHasKey, - object = data; - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - pairHasKey = false; - - if (_toString$2.call(pair) !== '[object Object]') return false; - - for (pairKey in pair) { - if (_hasOwnProperty$3.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true; - else return false; - } - } - - if (!pairHasKey) return false; - - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); - else return false; - } - - return true; -} - -function constructYamlOmap(data) { - return data !== null ? data : []; -} - -var omap = new type('tag:yaml.org,2002:omap', { - kind: 'sequence', - resolve: resolveYamlOmap, - construct: constructYamlOmap -}); - -var _toString$1 = Object.prototype.toString; - -function resolveYamlPairs(data) { - if (data === null) return true; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - if (_toString$1.call(pair) !== '[object Object]') return false; - - keys = Object.keys(pair); - - if (keys.length !== 1) return false; - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return true; -} - -function constructYamlPairs(data) { - if (data === null) return []; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - keys = Object.keys(pair); - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return result; -} - -var pairs = new type('tag:yaml.org,2002:pairs', { - kind: 'sequence', - resolve: resolveYamlPairs, - construct: constructYamlPairs -}); - -var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; - -function resolveYamlSet(data) { - if (data === null) return true; - - var key, object = data; - - for (key in object) { - if (_hasOwnProperty$2.call(object, key)) { - if (object[key] !== null) return false; - } - } - - return true; -} - -function constructYamlSet(data) { - return data !== null ? data : {}; -} - -var set = new type('tag:yaml.org,2002:set', { - kind: 'mapping', - resolve: resolveYamlSet, - construct: constructYamlSet -}); - -var _default = core.extend({ - implicit: [ - timestamp, - merge - ], - explicit: [ - binary, - omap, - pairs, - set - ] -}); - -/*eslint-disable max-len,no-use-before-define*/ - - - - - - - -var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; - - -var CONTEXT_FLOW_IN = 1; -var CONTEXT_FLOW_OUT = 2; -var CONTEXT_BLOCK_IN = 3; -var CONTEXT_BLOCK_OUT = 4; - - -var CHOMPING_CLIP = 1; -var CHOMPING_STRIP = 2; -var CHOMPING_KEEP = 3; - - -var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; -var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; -var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; -var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; -var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; - - -function _class(obj) { return Object.prototype.toString.call(obj); } - -function is_EOL(c) { - return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); -} - -function is_WHITE_SPACE(c) { - return (c === 0x09/* Tab */) || (c === 0x20/* Space */); -} - -function is_WS_OR_EOL(c) { - return (c === 0x09/* Tab */) || - (c === 0x20/* Space */) || - (c === 0x0A/* LF */) || - (c === 0x0D/* CR */); -} - -function is_FLOW_INDICATOR(c) { - return c === 0x2C/* , */ || - c === 0x5B/* [ */ || - c === 0x5D/* ] */ || - c === 0x7B/* { */ || - c === 0x7D/* } */; -} - -function fromHexCode(c) { - var lc; - - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - /*eslint-disable no-bitwise*/ - lc = c | 0x20; - - if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { - return lc - 0x61 + 10; - } - - return -1; -} - -function escapedHexLen(c) { - if (c === 0x78/* x */) { return 2; } - if (c === 0x75/* u */) { return 4; } - if (c === 0x55/* U */) { return 8; } - return 0; -} - -function fromDecimalCode(c) { - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - return -1; -} - -function simpleEscapeSequence(c) { - /* eslint-disable indent */ - return (c === 0x30/* 0 */) ? '\x00' : - (c === 0x61/* a */) ? '\x07' : - (c === 0x62/* b */) ? '\x08' : - (c === 0x74/* t */) ? '\x09' : - (c === 0x09/* Tab */) ? '\x09' : - (c === 0x6E/* n */) ? '\x0A' : - (c === 0x76/* v */) ? '\x0B' : - (c === 0x66/* f */) ? '\x0C' : - (c === 0x72/* r */) ? '\x0D' : - (c === 0x65/* e */) ? '\x1B' : - (c === 0x20/* Space */) ? ' ' : - (c === 0x22/* " */) ? '\x22' : - (c === 0x2F/* / */) ? '/' : - (c === 0x5C/* \ */) ? '\x5C' : - (c === 0x4E/* N */) ? '\x85' : - (c === 0x5F/* _ */) ? '\xA0' : - (c === 0x4C/* L */) ? '\u2028' : - (c === 0x50/* P */) ? '\u2029' : ''; -} - -function charFromCodepoint(c) { - if (c <= 0xFFFF) { - return String.fromCharCode(c); - } - // Encode UTF-16 surrogate pair - // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF - return String.fromCharCode( - ((c - 0x010000) >> 10) + 0xD800, - ((c - 0x010000) & 0x03FF) + 0xDC00 - ); -} - -var simpleEscapeCheck = new Array(256); // integer, for fast access -var simpleEscapeMap = new Array(256); -for (var i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; - simpleEscapeMap[i] = simpleEscapeSequence(i); -} - - -function State$1(input, options) { - this.input = input; - - this.filename = options['filename'] || null; - this.schema = options['schema'] || _default; - this.onWarning = options['onWarning'] || null; - // (Hidden) Remove? makes the loader to expect YAML 1.1 documents - // if such documents have no explicit %YAML directive - this.legacy = options['legacy'] || false; - - this.json = options['json'] || false; - this.listener = options['listener'] || null; - - this.implicitTypes = this.schema.compiledImplicit; - this.typeMap = this.schema.compiledTypeMap; - - this.length = input.length; - this.position = 0; - this.line = 0; - this.lineStart = 0; - this.lineIndent = 0; - - // position of first leading tab in the current line, - // used to make sure there are no tabs in the indentation - this.firstTabInLine = -1; - - this.documents = []; - - /* - this.version; - this.checkLineBreaks; - this.tagMap; - this.anchorMap; - this.tag; - this.anchor; - this.kind; - this.result;*/ - -} - - -function generateError(state, message) { - var mark = { - name: state.filename, - buffer: state.input.slice(0, -1), // omit trailing \0 - position: state.position, - line: state.line, - column: state.position - state.lineStart - }; - - mark.snippet = snippet(mark); - - return new exception(message, mark); -} - -function throwError(state, message) { - throw generateError(state, message); -} - -function throwWarning(state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)); - } -} - - -var directiveHandlers = { - - YAML: function handleYamlDirective(state, name, args) { - - var match, major, minor; - - if (state.version !== null) { - throwError(state, 'duplication of %YAML directive'); - } - - if (args.length !== 1) { - throwError(state, 'YAML directive accepts exactly one argument'); - } - - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - - if (match === null) { - throwError(state, 'ill-formed argument of the YAML directive'); - } - - major = parseInt(match[1], 10); - minor = parseInt(match[2], 10); - - if (major !== 1) { - throwError(state, 'unacceptable YAML version of the document'); - } - - state.version = args[0]; - state.checkLineBreaks = (minor < 2); - - if (minor !== 1 && minor !== 2) { - throwWarning(state, 'unsupported YAML version of the document'); - } - }, - - TAG: function handleTagDirective(state, name, args) { - - var handle, prefix; - - if (args.length !== 2) { - throwError(state, 'TAG directive accepts exactly two arguments'); - } - - handle = args[0]; - prefix = args[1]; - - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); - } - - if (_hasOwnProperty$1.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } - - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); - } - - try { - prefix = decodeURIComponent(prefix); - } catch (err) { - throwError(state, 'tag prefix is malformed: ' + prefix); - } - - state.tagMap[handle] = prefix; - } -}; - - -function captureSegment(state, start, end, checkJson) { - var _position, _length, _character, _result; - - if (start < end) { - _result = state.input.slice(start, end); - - if (checkJson) { - for (_position = 0, _length = _result.length; _position < _length; _position += 1) { - _character = _result.charCodeAt(_position); - if (!(_character === 0x09 || - (0x20 <= _character && _character <= 0x10FFFF))) { - throwError(state, 'expected valid JSON character'); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, 'the stream contains non-printable characters'); - } - - state.result += _result; - } -} - -function mergeMappings(state, destination, source, overridableKeys) { - var sourceKeys, key, index, quantity; - - if (!common.isObject(source)) { - throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); - } - - sourceKeys = Object.keys(source); - - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - - if (!_hasOwnProperty$1.call(destination, key)) { - destination[key] = source[key]; - overridableKeys[key] = true; - } - } -} - -function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, - startLine, startLineStart, startPos) { - - var index, quantity; - - // The output is a plain object here, so keys can only be strings. - // We need to convert keyNode to a string, but doing so can hang the process - // (deeply nested arrays that explode exponentially using aliases). - if (Array.isArray(keyNode)) { - keyNode = Array.prototype.slice.call(keyNode); - - for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { - if (Array.isArray(keyNode[index])) { - throwError(state, 'nested arrays are not supported inside keys'); - } - - if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { - keyNode[index] = '[object Object]'; - } - } - } - - // Avoid code execution in load() via toString property - // (still use its own toString for arrays, timestamps, - // and whatever user schema extensions happen to have @@toStringTag) - if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { - keyNode = '[object Object]'; - } - - - keyNode = String(keyNode); - - if (_result === null) { - _result = {}; - } - - if (keyTag === 'tag:yaml.org,2002:merge') { - if (Array.isArray(valueNode)) { - for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { - mergeMappings(state, _result, valueNode[index], overridableKeys); - } - } else { - mergeMappings(state, _result, valueNode, overridableKeys); - } - } else { - if (!state.json && - !_hasOwnProperty$1.call(overridableKeys, keyNode) && - _hasOwnProperty$1.call(_result, keyNode)) { - state.line = startLine || state.line; - state.lineStart = startLineStart || state.lineStart; - state.position = startPos || state.position; - throwError(state, 'duplicated mapping key'); - } - - // used for this specific key only because Object.defineProperty is slow - if (keyNode === '__proto__') { - Object.defineProperty(_result, keyNode, { - configurable: true, - enumerable: true, - writable: true, - value: valueNode - }); - } else { - _result[keyNode] = valueNode; - } - delete overridableKeys[keyNode]; - } - - return _result; -} - -function readLineBreak(state) { - var ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x0A/* LF */) { - state.position++; - } else if (ch === 0x0D/* CR */) { - state.position++; - if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { - state.position++; - } - } else { - throwError(state, 'a line break is expected'); - } - - state.line += 1; - state.lineStart = state.position; - state.firstTabInLine = -1; -} - -function skipSeparationSpace(state, allowComments, checkIndent) { - var lineBreaks = 0, - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { - state.firstTabInLine = state.position; - } - ch = state.input.charCodeAt(++state.position); - } - - if (allowComments && ch === 0x23/* # */) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); - } - - if (is_EOL(ch)) { - readLineBreak(state); - - ch = state.input.charCodeAt(state.position); - lineBreaks++; - state.lineIndent = 0; - - while (ch === 0x20/* Space */) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - } else { - break; - } - } - - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, 'deficient indentation'); - } - - return lineBreaks; -} - -function testDocumentSeparator(state) { - var _position = state.position, - ch; - - ch = state.input.charCodeAt(_position); - - // Condition state.position === state.lineStart is tested - // in parent on each call, for efficiency. No needs to test here again. - if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && - ch === state.input.charCodeAt(_position + 1) && - ch === state.input.charCodeAt(_position + 2)) { - - _position += 3; - - ch = state.input.charCodeAt(_position); - - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; - } - } - - return false; -} - -function writeFoldedLines(state, count) { - if (count === 1) { - state.result += ' '; - } else if (count > 1) { - state.result += common.repeat('\n', count - 1); - } -} - - -function readPlainScalar(state, nodeIndent, withinFlowCollection) { - var preceding, - following, - captureStart, - captureEnd, - hasPendingContent, - _line, - _lineStart, - _lineIndent, - _kind = state.kind, - _result = state.result, - ch; - - ch = state.input.charCodeAt(state.position); - - if (is_WS_OR_EOL(ch) || - is_FLOW_INDICATOR(ch) || - ch === 0x23/* # */ || - ch === 0x26/* & */ || - ch === 0x2A/* * */ || - ch === 0x21/* ! */ || - ch === 0x7C/* | */ || - ch === 0x3E/* > */ || - ch === 0x27/* ' */ || - ch === 0x22/* " */ || - ch === 0x25/* % */ || - ch === 0x40/* @ */ || - ch === 0x60/* ` */) { - return false; - } - - if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; - } - } - - state.kind = 'scalar'; - state.result = ''; - captureStart = captureEnd = state.position; - hasPendingContent = false; - - while (ch !== 0) { - if (ch === 0x3A/* : */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; - } - - } else if (ch === 0x23/* # */) { - preceding = state.input.charCodeAt(state.position - 1); - - if (is_WS_OR_EOL(preceding)) { - break; - } - - } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || - withinFlowCollection && is_FLOW_INDICATOR(ch)) { - break; - - } else if (is_EOL(ch)) { - _line = state.line; - _lineStart = state.lineStart; - _lineIndent = state.lineIndent; - skipSeparationSpace(state, false, -1); - - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state.input.charCodeAt(state.position); - continue; - } else { - state.position = captureEnd; - state.line = _line; - state.lineStart = _lineStart; - state.lineIndent = _lineIndent; - break; - } - } - - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false); - writeFoldedLines(state, state.line - _line); - captureStart = captureEnd = state.position; - hasPendingContent = false; - } - - if (!is_WHITE_SPACE(ch)) { - captureEnd = state.position + 1; - } - - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, captureEnd, false); - - if (state.result) { - return true; - } - - state.kind = _kind; - state.result = _result; - return false; -} - -function readSingleQuotedScalar(state, nodeIndent) { - var ch, - captureStart, captureEnd; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x27/* ' */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x27/* ' */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x27/* ' */) { - captureStart = state.position; - state.position++; - captureEnd = state.position; - } else { - return true; - } - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a single quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a single quoted scalar'); -} - -function readDoubleQuotedScalar(state, nodeIndent) { - var captureStart, - captureEnd, - hexLength, - hexResult, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x22/* " */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x22/* " */) { - captureSegment(state, captureStart, state.position, true); - state.position++; - return true; - - } else if (ch === 0x5C/* \ */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (is_EOL(ch)) { - skipSeparationSpace(state, false, nodeIndent); - - // TODO: rework to inline fn with no type cast? - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch]; - state.position++; - - } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; - - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position); - - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; - - } else { - throwError(state, 'expected hexadecimal character'); - } - } - - state.result += charFromCodepoint(hexResult); - - state.position++; - - } else { - throwError(state, 'unknown escape sequence'); - } - - captureStart = captureEnd = state.position; - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a double quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a double quoted scalar'); -} - -function readFlowCollection(state, nodeIndent) { - var readNext = true, - _line, - _lineStart, - _pos, - _tag = state.tag, - _result, - _anchor = state.anchor, - following, - terminator, - isPair, - isExplicitPair, - isMapping, - overridableKeys = Object.create(null), - keyNode, - keyTag, - valueNode, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x5B/* [ */) { - terminator = 0x5D;/* ] */ - isMapping = false; - _result = []; - } else if (ch === 0x7B/* { */) { - terminator = 0x7D;/* } */ - isMapping = true; - _result = {}; - } else { - return false; - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(++state.position); - - while (ch !== 0) { - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === terminator) { - state.position++; - state.tag = _tag; - state.anchor = _anchor; - state.kind = isMapping ? 'mapping' : 'sequence'; - state.result = _result; - return true; - } else if (!readNext) { - throwError(state, 'missed comma between flow collection entries'); - } else if (ch === 0x2C/* , */) { - // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 - throwError(state, "expected the node content, but found ','"); - } - - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - - if (ch === 0x3F/* ? */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; - state.position++; - skipSeparationSpace(state, true, nodeIndent); - } - } - - _line = state.line; // Save the current line. - _lineStart = state.lineStart; - _pos = state.position; - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state.tag; - keyNode = state.result; - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { - isPair = true; - ch = state.input.charCodeAt(++state.position); - skipSeparationSpace(state, true, nodeIndent); - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state.result; - } - - if (isMapping) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); - } else if (isPair) { - _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); - } else { - _result.push(keyNode); - } - - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x2C/* , */) { - readNext = true; - ch = state.input.charCodeAt(++state.position); - } else { - readNext = false; - } - } - - throwError(state, 'unexpected end of the stream within a flow collection'); -} - -function readBlockScalar(state, nodeIndent) { - var captureStart, - folding, - chomping = CHOMPING_CLIP, - didReadContent = false, - detectedIndent = false, - textIndent = nodeIndent, - emptyLines = 0, - atMoreIndented = false, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x7C/* | */) { - folding = false; - } else if (ch === 0x3E/* > */) { - folding = true; - } else { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - - while (ch !== 0) { - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { - if (CHOMPING_CLIP === chomping) { - chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state, 'repeat of a chomping mode identifier'); - } - - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1; - detectedIndent = true; - } else { - throwError(state, 'repeat of an indentation width identifier'); - } - - } else { - break; - } - } - - if (is_WHITE_SPACE(ch)) { - do { ch = state.input.charCodeAt(++state.position); } - while (is_WHITE_SPACE(ch)); - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (!is_EOL(ch) && (ch !== 0)); - } - } - - while (ch !== 0) { - readLineBreak(state); - state.lineIndent = 0; - - ch = state.input.charCodeAt(state.position); - - while ((!detectedIndent || state.lineIndent < textIndent) && - (ch === 0x20/* Space */)) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent; - } - - if (is_EOL(ch)) { - emptyLines++; - continue; - } - - // End of the scalar. - if (state.lineIndent < textIndent) { - - // Perform the chomping. - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { // i.e. only if the scalar is not empty. - state.result += '\n'; - } - } - - // Break this `while` cycle and go to the funciton's epilogue. - break; - } - - // Folded style: use fancy rules to handle line breaks. - if (folding) { - - // Lines starting with white space characters (more-indented lines) are not folded. - if (is_WHITE_SPACE(ch)) { - atMoreIndented = true; - // except for the first content line (cf. Example 8.1) - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - - // End of more-indented block. - } else if (atMoreIndented) { - atMoreIndented = false; - state.result += common.repeat('\n', emptyLines + 1); - - // Just one line break - perceive as the same line. - } else if (emptyLines === 0) { - if (didReadContent) { // i.e. only if we have already read some scalar content. - state.result += ' '; - } - - // Several line breaks - perceive as different lines. - } else { - state.result += common.repeat('\n', emptyLines); - } - - // Literal style: just add exact number of line breaks between content lines. - } else { - // Keep all line breaks except the header line break. - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } - - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state.position; - - while (!is_EOL(ch) && (ch !== 0)) { - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, state.position, false); - } - - return true; -} - -function readBlockSequence(state, nodeIndent) { - var _line, - _tag = state.tag, - _anchor = state.anchor, - _result = [], - following, - detected = false, - ch; - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - if (state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, 'tab characters must not be used in indentation'); - } - - if (ch !== 0x2D/* - */) { - break; - } - - following = state.input.charCodeAt(state.position + 1); - - if (!is_WS_OR_EOL(following)) { - break; - } - - detected = true; - state.position++; - - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null); - ch = state.input.charCodeAt(state.position); - continue; - } - } - - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state.result); - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a sequence entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'sequence'; - state.result = _result; - return true; - } - return false; -} - -function readBlockMapping(state, nodeIndent, flowIndent) { - var following, - allowCompact, - _line, - _keyLine, - _keyLineStart, - _keyPos, - _tag = state.tag, - _anchor = state.anchor, - _result = {}, - overridableKeys = Object.create(null), - keyTag = null, - keyNode = null, - valueNode = null, - atExplicitKey = false, - detected = false, - ch; - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - if (!atExplicitKey && state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, 'tab characters must not be used in indentation'); - } - - following = state.input.charCodeAt(state.position + 1); - _line = state.line; // Save the current line. - - // - // Explicit notation case. There are two separate blocks: - // first for the key (denoted by "?") and second for the value (denoted by ":") - // - if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { - - if (ch === 0x3F/* ? */) { - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = true; - allowCompact = true; - - } else if (atExplicitKey) { - // i.e. 0x3A/* : */ === character after the explicit key. - atExplicitKey = false; - allowCompact = true; - - } else { - throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); - } - - state.position += 1; - ch = following; - - // - // Implicit notation case. Flow-style node as the key first, then ":", and the value. - // - } else { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - - if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - // Neither implicit nor explicit notation. - // Reading is done. Go to the epilogue. - break; - } - - if (state.line === _line) { - ch = state.input.charCodeAt(state.position); - - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x3A/* : */) { - ch = state.input.charCodeAt(++state.position); - - if (!is_WS_OR_EOL(ch)) { - throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); - } - - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = false; - allowCompact = false; - keyTag = state.tag; - keyNode = state.result; - - } else if (detected) { - throwError(state, 'can not read an implicit mapping pair; a colon is missed'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - - } else if (detected) { - throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - } - - // - // Common reading code for both explicit and implicit notations. - // - if (state.line === _line || state.lineIndent > nodeIndent) { - if (atExplicitKey) { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - } - - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result; - } else { - valueNode = state.result; - } - } - - if (!atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - } - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a mapping entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - // - // Epilogue. - // - - // Special case: last mapping's node contains only the key in explicit notation. - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - } - - // Expose the resulting mapping. - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'mapping'; - state.result = _result; - } - - return detected; -} - -function readTagProperty(state) { - var _position, - isVerbatim = false, - isNamed = false, - tagHandle, - tagName, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x21/* ! */) return false; - - if (state.tag !== null) { - throwError(state, 'duplication of a tag property'); - } - - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x3C/* < */) { - isVerbatim = true; - ch = state.input.charCodeAt(++state.position); - - } else if (ch === 0x21/* ! */) { - isNamed = true; - tagHandle = '!!'; - ch = state.input.charCodeAt(++state.position); - - } else { - tagHandle = '!'; - } - - _position = state.position; - - if (isVerbatim) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && ch !== 0x3E/* > */); - - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position); - ch = state.input.charCodeAt(++state.position); - } else { - throwError(state, 'unexpected end of the stream within a verbatim tag'); - } - } else { - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - - if (ch === 0x21/* ! */) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1); - - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, 'named tag handle cannot contain such characters'); - } - - isNamed = true; - _position = state.position + 1; - } else { - throwError(state, 'tag suffix cannot contain exclamation marks'); - } - } - - ch = state.input.charCodeAt(++state.position); - } - - tagName = state.input.slice(_position, state.position); - - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, 'tag suffix cannot contain flow indicator characters'); - } - } - - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, 'tag name cannot contain such characters: ' + tagName); - } - - try { - tagName = decodeURIComponent(tagName); - } catch (err) { - throwError(state, 'tag name is malformed: ' + tagName); - } - - if (isVerbatim) { - state.tag = tagName; - - } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName; - - } else if (tagHandle === '!') { - state.tag = '!' + tagName; - - } else if (tagHandle === '!!') { - state.tag = 'tag:yaml.org,2002:' + tagName; - - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"'); - } - - return true; -} - -function readAnchorProperty(state) { - var _position, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x26/* & */) return false; - - if (state.anchor !== null) { - throwError(state, 'duplication of an anchor property'); - } - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an anchor node must contain at least one character'); - } - - state.anchor = state.input.slice(_position, state.position); - return true; -} - -function readAlias(state) { - var _position, alias, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x2A/* * */) return false; - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an alias node must contain at least one character'); - } - - alias = state.input.slice(_position, state.position); - - if (!_hasOwnProperty$1.call(state.anchorMap, alias)) { - throwError(state, 'unidentified alias "' + alias + '"'); - } - - state.result = state.anchorMap[alias]; - skipSeparationSpace(state, true, -1); - return true; -} - -function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, - allowBlockScalars, - allowBlockCollections, - indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } - } - - if (indentStatus === 1) { - while (readTagProperty(state) || readAnchorProperty(state)) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true; - allowBlockCollections = allowBlockStyles; - - if (state.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } else { - allowBlockCollections = false; - } - } - } - - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } - - blockIndent = state.position - state.lineStart; - - if (indentStatus === 1) { - if (allowBlockCollections && - (readBlockSequence(state, blockIndent) || - readBlockMapping(state, blockIndent, flowIndent)) || - readFlowCollection(state, flowIndent)) { - hasContent = true; - } else { - if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || - readSingleQuotedScalar(state, flowIndent) || - readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true; - - } else if (readAlias(state)) { - hasContent = true; - - if (state.tag !== null || state.anchor !== null) { - throwError(state, 'alias node should not have any properties'); - } - - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true; - - if (state.tag === null) { - state.tag = '?'; - } - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } else if (indentStatus === 0) { - // Special case: block sequences are allowed to have same indentation level as the parent. - // http://www.yaml.org/spec/1.2/spec.html#id2799784 - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); - } - } - - if (state.tag === null) { - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - - } else if (state.tag === '?') { - // Implicit resolving is not allowed for non-scalar types, and '?' - // non-specific tag is only automatically assigned to plain scalars. - // - // We only need to check kind conformity in case user explicitly assigns '?' - // tag, for example like this: "! [0]" - // - if (state.result !== null && state.kind !== 'scalar') { - throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); - } - - for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type = state.implicitTypes[typeIndex]; - - if (type.resolve(state.result)) { // `state.result` updated in resolver if matched - state.result = type.construct(state.result); - state.tag = type.tag; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - break; - } - } - } else if (state.tag !== '!') { - if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) { - type = state.typeMap[state.kind || 'fallback'][state.tag]; - } else { - // looking for multi type - type = null; - typeList = state.typeMap.multi[state.kind || 'fallback']; - - for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { - if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { - type = typeList[typeIndex]; - break; - } - } - } - - if (!type) { - throwError(state, 'unknown tag !<' + state.tag + '>'); - } - - if (state.result !== null && type.kind !== state.kind) { - throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); - } - - if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched - throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); - } else { - state.result = type.construct(state.result, state.tag); - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } - - if (state.listener !== null) { - state.listener('close', state); - } - return state.tag !== null || state.anchor !== null || hasContent; -} - -function readDocument(state) { - var documentStart = state.position, - _position, - directiveName, - directiveArgs, - hasDirectives = false, - ch; - - state.version = null; - state.checkLineBreaks = state.legacy; - state.tagMap = Object.create(null); - state.anchorMap = Object.create(null); - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if (state.lineIndent > 0 || ch !== 0x25/* % */) { - break; - } - - hasDirectives = true; - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveName = state.input.slice(_position, state.position); - directiveArgs = []; - - if (directiveName.length < 1) { - throwError(state, 'directive name must not be less than one character in length'); - } - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && !is_EOL(ch)); - break; - } - - if (is_EOL(ch)) break; - - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveArgs.push(state.input.slice(_position, state.position)); - } - - if (ch !== 0) readLineBreak(state); - - if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs); - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"'); - } - } - - skipSeparationSpace(state, true, -1); - - if (state.lineIndent === 0 && - state.input.charCodeAt(state.position) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - - } else if (hasDirectives) { - throwError(state, 'directives end mark is expected'); - } - - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state, true, -1); - - if (state.checkLineBreaks && - PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, 'non-ASCII line breaks are interpreted as content'); - } - - state.documents.push(state.result); - - if (state.position === state.lineStart && testDocumentSeparator(state)) { - - if (state.input.charCodeAt(state.position) === 0x2E/* . */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - } - return; - } - - if (state.position < (state.length - 1)) { - throwError(state, 'end of the stream or a document separator is expected'); - } else { - return; - } -} - - -function loadDocuments(input, options) { - input = String(input); - options = options || {}; - - if (input.length !== 0) { - - // Add tailing `\n` if not exists - if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && - input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { - input += '\n'; - } - - // Strip BOM - if (input.charCodeAt(0) === 0xFEFF) { - input = input.slice(1); - } - } - - var state = new State$1(input, options); - - var nullpos = input.indexOf('\0'); - - if (nullpos !== -1) { - state.position = nullpos; - throwError(state, 'null byte is not allowed in input'); - } - - // Use 0 as string terminator. That significantly simplifies bounds check. - state.input += '\0'; - - while (state.input.charCodeAt(state.position) === 0x20/* Space */) { - state.lineIndent += 1; - state.position += 1; - } - - while (state.position < (state.length - 1)) { - readDocument(state); - } - - return state.documents; -} - - -function loadAll$1(input, iterator, options) { - if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { - options = iterator; - iterator = null; - } - - var documents = loadDocuments(input, options); - - if (typeof iterator !== 'function') { - return documents; - } - - for (var index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]); - } -} - - -function load$1(input, options) { - var documents = loadDocuments(input, options); - - if (documents.length === 0) { - /*eslint-disable no-undefined*/ - return undefined; - } else if (documents.length === 1) { - return documents[0]; - } - throw new exception('expected a single document in the stream, but found more'); -} - - -var loadAll_1 = loadAll$1; -var load_1 = load$1; - -var loader = { - loadAll: loadAll_1, - load: load_1 -}; - -/*eslint-disable no-use-before-define*/ - - - - - -var _toString = Object.prototype.toString; -var _hasOwnProperty = Object.prototype.hasOwnProperty; - -var CHAR_BOM = 0xFEFF; -var CHAR_TAB = 0x09; /* Tab */ -var CHAR_LINE_FEED = 0x0A; /* LF */ -var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ -var CHAR_SPACE = 0x20; /* Space */ -var CHAR_EXCLAMATION = 0x21; /* ! */ -var CHAR_DOUBLE_QUOTE = 0x22; /* " */ -var CHAR_SHARP = 0x23; /* # */ -var CHAR_PERCENT = 0x25; /* % */ -var CHAR_AMPERSAND = 0x26; /* & */ -var CHAR_SINGLE_QUOTE = 0x27; /* ' */ -var CHAR_ASTERISK = 0x2A; /* * */ -var CHAR_COMMA = 0x2C; /* , */ -var CHAR_MINUS = 0x2D; /* - */ -var CHAR_COLON = 0x3A; /* : */ -var CHAR_EQUALS = 0x3D; /* = */ -var CHAR_GREATER_THAN = 0x3E; /* > */ -var CHAR_QUESTION = 0x3F; /* ? */ -var CHAR_COMMERCIAL_AT = 0x40; /* @ */ -var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ -var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ -var CHAR_GRAVE_ACCENT = 0x60; /* ` */ -var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ -var CHAR_VERTICAL_LINE = 0x7C; /* | */ -var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ - -var ESCAPE_SEQUENCES = {}; - -ESCAPE_SEQUENCES[0x00] = '\\0'; -ESCAPE_SEQUENCES[0x07] = '\\a'; -ESCAPE_SEQUENCES[0x08] = '\\b'; -ESCAPE_SEQUENCES[0x09] = '\\t'; -ESCAPE_SEQUENCES[0x0A] = '\\n'; -ESCAPE_SEQUENCES[0x0B] = '\\v'; -ESCAPE_SEQUENCES[0x0C] = '\\f'; -ESCAPE_SEQUENCES[0x0D] = '\\r'; -ESCAPE_SEQUENCES[0x1B] = '\\e'; -ESCAPE_SEQUENCES[0x22] = '\\"'; -ESCAPE_SEQUENCES[0x5C] = '\\\\'; -ESCAPE_SEQUENCES[0x85] = '\\N'; -ESCAPE_SEQUENCES[0xA0] = '\\_'; -ESCAPE_SEQUENCES[0x2028] = '\\L'; -ESCAPE_SEQUENCES[0x2029] = '\\P'; - -var DEPRECATED_BOOLEANS_SYNTAX = [ - 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', - 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' -]; - -var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; - -function compileStyleMap(schema, map) { - var result, keys, index, length, tag, style, type; - - if (map === null) return {}; - - result = {}; - keys = Object.keys(map); - - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map[tag]); - - if (tag.slice(0, 2) === '!!') { - tag = 'tag:yaml.org,2002:' + tag.slice(2); - } - type = schema.compiledTypeMap['fallback'][tag]; - - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style]; - } - - result[tag] = style; - } - - return result; -} - -function encodeHex(character) { - var string, handle, length; - - string = character.toString(16).toUpperCase(); - - if (character <= 0xFF) { - handle = 'x'; - length = 2; - } else if (character <= 0xFFFF) { - handle = 'u'; - length = 4; - } else if (character <= 0xFFFFFFFF) { - handle = 'U'; - length = 8; - } else { - throw new exception('code point within a string may not be greater than 0xFFFFFFFF'); - } - - return '\\' + handle + common.repeat('0', length - string.length) + string; -} - - -var QUOTING_TYPE_SINGLE = 1, - QUOTING_TYPE_DOUBLE = 2; - -function State(options) { - this.schema = options['schema'] || _default; - this.indent = Math.max(1, (options['indent'] || 2)); - this.noArrayIndent = options['noArrayIndent'] || false; - this.skipInvalid = options['skipInvalid'] || false; - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); - this.styleMap = compileStyleMap(this.schema, options['styles'] || null); - this.sortKeys = options['sortKeys'] || false; - this.lineWidth = options['lineWidth'] || 80; - this.noRefs = options['noRefs'] || false; - this.noCompatMode = options['noCompatMode'] || false; - this.condenseFlow = options['condenseFlow'] || false; - this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; - this.forceQuotes = options['forceQuotes'] || false; - this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null; - - this.implicitTypes = this.schema.compiledImplicit; - this.explicitTypes = this.schema.compiledExplicit; - - this.tag = null; - this.result = ''; - - this.duplicates = []; - this.usedDuplicates = null; -} - -// Indents every line in a string. Empty lines (\n only) are not indented. -function indentString(string, spaces) { - var ind = common.repeat(' ', spaces), - position = 0, - next = -1, - result = '', - line, - length = string.length; - - while (position < length) { - next = string.indexOf('\n', position); - if (next === -1) { - line = string.slice(position); - position = length; - } else { - line = string.slice(position, next + 1); - position = next + 1; - } - - if (line.length && line !== '\n') result += ind; - - result += line; - } - - return result; -} - -function generateNextLine(state, level) { - return '\n' + common.repeat(' ', state.indent * level); -} - -function testImplicitResolving(state, str) { - var index, length, type; - - for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { - type = state.implicitTypes[index]; - - if (type.resolve(str)) { - return true; - } - } - - return false; -} - -// [33] s-white ::= s-space | s-tab -function isWhitespace(c) { - return c === CHAR_SPACE || c === CHAR_TAB; -} - -// Returns true if the character can be printed without escaping. -// From YAML 1.2: "any allowed characters known to be non-printable -// should also be escaped. [However,] This isn’t mandatory" -// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. -function isPrintable(c) { - return (0x00020 <= c && c <= 0x00007E) - || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) - || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM) - || (0x10000 <= c && c <= 0x10FFFF); -} - -// [34] ns-char ::= nb-char - s-white -// [27] nb-char ::= c-printable - b-char - c-byte-order-mark -// [26] b-char ::= b-line-feed | b-carriage-return -// Including s-white (for some reason, examples doesn't match specs in this aspect) -// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark -function isNsCharOrWhitespace(c) { - return isPrintable(c) - && c !== CHAR_BOM - // - b-char - && c !== CHAR_CARRIAGE_RETURN - && c !== CHAR_LINE_FEED; -} - -// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out -// c = flow-in ⇒ ns-plain-safe-in -// c = block-key ⇒ ns-plain-safe-out -// c = flow-key ⇒ ns-plain-safe-in -// [128] ns-plain-safe-out ::= ns-char -// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator -// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) -// | ( /* An ns-char preceding */ “#” ) -// | ( “:” /* Followed by an ns-plain-safe(c) */ ) -function isPlainSafe(c, prev, inblock) { - var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); - var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); - return ( - // ns-plain-safe - inblock ? // c = flow-in - cIsNsCharOrWhitespace - : cIsNsCharOrWhitespace - // - c-flow-indicator - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - ) - // ns-plain-char - && c !== CHAR_SHARP // false on '#' - && !(prev === CHAR_COLON && !cIsNsChar) // false on ': ' - || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#' - || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]' -} - -// Simplified test for values allowed as the first character in plain style. -function isPlainSafeFirst(c) { - // Uses a subset of ns-char - c-indicator - // where ns-char = nb-char - s-white. - // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part - return isPrintable(c) && c !== CHAR_BOM - && !isWhitespace(c) // - s-white - // - (c-indicator ::= - // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” - && c !== CHAR_MINUS - && c !== CHAR_QUESTION - && c !== CHAR_COLON - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” - && c !== CHAR_SHARP - && c !== CHAR_AMPERSAND - && c !== CHAR_ASTERISK - && c !== CHAR_EXCLAMATION - && c !== CHAR_VERTICAL_LINE - && c !== CHAR_EQUALS - && c !== CHAR_GREATER_THAN - && c !== CHAR_SINGLE_QUOTE - && c !== CHAR_DOUBLE_QUOTE - // | “%” | “@” | “`”) - && c !== CHAR_PERCENT - && c !== CHAR_COMMERCIAL_AT - && c !== CHAR_GRAVE_ACCENT; -} - -// Simplified test for values allowed as the last character in plain style. -function isPlainSafeLast(c) { - // just not whitespace or colon, it will be checked to be plain character later - return !isWhitespace(c) && c !== CHAR_COLON; -} - -// Same as 'string'.codePointAt(pos), but works in older browsers. -function codePointAt(string, pos) { - var first = string.charCodeAt(pos), second; - if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { - second = string.charCodeAt(pos + 1); - if (second >= 0xDC00 && second <= 0xDFFF) { - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; - } - } - return first; -} - -// Determines whether block indentation indicator is required. -function needIndentIndicator(string) { - var leadingSpaceRe = /^\n* /; - return leadingSpaceRe.test(string); -} - -var STYLE_PLAIN = 1, - STYLE_SINGLE = 2, - STYLE_LITERAL = 3, - STYLE_FOLDED = 4, - STYLE_DOUBLE = 5; - -// Determines which scalar styles are possible and returns the preferred style. -// lineWidth = -1 => no limit. -// Pre-conditions: str.length > 0. -// Post-conditions: -// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. -// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). -// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). -function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, - testAmbiguousType, quotingType, forceQuotes, inblock) { - - var i; - var char = 0; - var prevChar = null; - var hasLineBreak = false; - var hasFoldableLine = false; // only checked if shouldTrackWidth - var shouldTrackWidth = lineWidth !== -1; - var previousLineBreak = -1; // count the first line correctly - var plain = isPlainSafeFirst(codePointAt(string, 0)) - && isPlainSafeLast(codePointAt(string, string.length - 1)); - - if (singleLineOnly || forceQuotes) { - // Case: no block styles. - // Check for disallowed characters to rule out plain and single. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - } else { - // Case: block styles permitted. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - if (char === CHAR_LINE_FEED) { - hasLineBreak = true; - // Check if any line can be folded. - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || - // Foldable line = too long, and not more-indented. - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' '); - previousLineBreak = i; - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - // in case the end is missing a \n - hasFoldableLine = hasFoldableLine || (shouldTrackWidth && - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ')); - } - // Although every style can represent \n without escaping, prefer block styles - // for multiline, since they're more readable and they don't add empty lines. - // Also prefer folding a super-long line. - if (!hasLineBreak && !hasFoldableLine) { - // Strings interpretable as another type have to be quoted; - // e.g. the string 'true' vs. the boolean true. - if (plain && !forceQuotes && !testAmbiguousType(string)) { - return STYLE_PLAIN; - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; - } - // Edge case: block indentation indicator can only have one digit. - if (indentPerLevel > 9 && needIndentIndicator(string)) { - return STYLE_DOUBLE; - } - // At this point we know block styles are valid. - // Prefer literal style unless we want to fold. - if (!forceQuotes) { - return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; -} - -// Note: line breaking/folding is implemented for only the folded style. -// NB. We drop the last trailing newline (if any) of a returned block scalar -// since the dumper adds its own newline. This always works: -// • No ending newline => unaffected; already using strip "-" chomping. -// • Ending newline => removed then restored. -// Importantly, this keeps the "+" chomp indicator from gaining an extra line. -function writeScalar(state, string, level, iskey, inblock) { - state.dump = (function () { - if (string.length === 0) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; - } - if (!state.noCompatMode) { - if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'"); - } - } - - var indent = state.indent * Math.max(1, level); // no 0-indent scalars - // As indentation gets deeper, let the width decrease monotonically - // to the lower bound min(state.lineWidth, 40). - // Note that this implies - // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. - // state.lineWidth > 40 + state.indent: width decreases until the lower bound. - // This behaves better than a constant minimum width which disallows narrower options, - // or an indent threshold which causes the width to suddenly increase. - var lineWidth = state.lineWidth === -1 - ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); - - // Without knowing if keys are implicit/explicit, assume implicit for safety. - var singleLineOnly = iskey - // No block styles in flow mode. - || (state.flowLevel > -1 && level >= state.flowLevel); - function testAmbiguity(string) { - return testImplicitResolving(state, string); - } - - switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, - testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { - - case STYLE_PLAIN: - return string; - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'"; - case STYLE_LITERAL: - return '|' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(string, indent)); - case STYLE_FOLDED: - return '>' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); - case STYLE_DOUBLE: - return '"' + escapeString(string) + '"'; - default: - throw new exception('impossible error: invalid scalar style'); - } - }()); -} - -// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. -function blockHeader(string, indentPerLevel) { - var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; - - // note the special case: the string '\n' counts as a "trailing" empty line. - var clip = string[string.length - 1] === '\n'; - var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); - var chomp = keep ? '+' : (clip ? '' : '-'); - - return indentIndicator + chomp + '\n'; -} - -// (See the note for writeScalar.) -function dropEndingNewline(string) { - return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; -} - -// Note: a long line without a suitable break point will exceed the width limit. -// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. -function foldString(string, width) { - // In folded style, $k$ consecutive newlines output as $k+1$ newlines— - // unless they're before or after a more-indented line, or at the very - // beginning or end, in which case $k$ maps to $k$. - // Therefore, parse each chunk as newline(s) followed by a content line. - var lineRe = /(\n+)([^\n]*)/g; - - // first line (possibly an empty line) - var result = (function () { - var nextLF = string.indexOf('\n'); - nextLF = nextLF !== -1 ? nextLF : string.length; - lineRe.lastIndex = nextLF; - return foldLine(string.slice(0, nextLF), width); - }()); - // If we haven't reached the first content line yet, don't add an extra \n. - var prevMoreIndented = string[0] === '\n' || string[0] === ' '; - var moreIndented; - - // rest of the lines - var match; - while ((match = lineRe.exec(string))) { - var prefix = match[1], line = match[2]; - moreIndented = (line[0] === ' '); - result += prefix - + (!prevMoreIndented && !moreIndented && line !== '' - ? '\n' : '') - + foldLine(line, width); - prevMoreIndented = moreIndented; - } - - return result; -} - -// Greedy line breaking. -// Picks the longest line under the limit each time, -// otherwise settles for the shortest line over the limit. -// NB. More-indented lines *cannot* be folded, as that would add an extra \n. -function foldLine(line, width) { - if (line === '' || line[0] === ' ') return line; - - // Since a more-indented line adds a \n, breaks can't be followed by a space. - var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. - var match; - // start is an inclusive index. end, curr, and next are exclusive. - var start = 0, end, curr = 0, next = 0; - var result = ''; - - // Invariants: 0 <= start <= length-1. - // 0 <= curr <= next <= max(0, length-2). curr - start <= width. - // Inside the loop: - // A match implies length >= 2, so curr and next are <= length-2. - while ((match = breakRe.exec(line))) { - next = match.index; - // maintain invariant: curr - start <= width - if (next - start > width) { - end = (curr > start) ? curr : next; // derive end <= length-2 - result += '\n' + line.slice(start, end); - // skip the space that was output as \n - start = end + 1; // derive start <= length-1 - } - curr = next; - } - - // By the invariants, start <= length-1, so there is something left over. - // It is either the whole string or a part starting from non-whitespace. - result += '\n'; - // Insert a break if the remainder is too long and there is a break available. - if (line.length - start > width && curr > start) { - result += line.slice(start, curr) + '\n' + line.slice(curr + 1); - } else { - result += line.slice(start); - } - - return result.slice(1); // drop extra \n joiner -} - -// Escapes a double-quoted string. -function escapeString(string) { - var result = ''; - var char = 0; - var escapeSeq; - - for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - escapeSeq = ESCAPE_SEQUENCES[char]; - - if (!escapeSeq && isPrintable(char)) { - result += string[i]; - if (char >= 0x10000) result += string[i + 1]; - } else { - result += escapeSeq || encodeHex(char); - } - } - - return result; -} - -function writeFlowSequence(state, level, object) { - var _result = '', - _tag = state.tag, - index, - length, - value; - - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - - if (state.replacer) { - value = state.replacer.call(object, String(index), value); - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level, value, false, false) || - (typeof value === 'undefined' && - writeNode(state, level, null, false, false))) { - - if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : ''); - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = '[' + _result + ']'; -} - -function writeBlockSequence(state, level, object, compact) { - var _result = '', - _tag = state.tag, - index, - length, - value; - - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - - if (state.replacer) { - value = state.replacer.call(object, String(index), value); - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level + 1, value, true, true, false, true) || - (typeof value === 'undefined' && - writeNode(state, level + 1, null, true, true, false, true))) { - - if (!compact || _result !== '') { - _result += generateNextLine(state, level); - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - _result += '-'; - } else { - _result += '- '; - } - - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = _result || '[]'; // Empty sequence if no valid values. -} - -function writeFlowMapping(state, level, object) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - pairBuffer; - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - - pairBuffer = ''; - if (_result !== '') pairBuffer += ', '; - - if (state.condenseFlow) pairBuffer += '"'; - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue); - } - - if (!writeNode(state, level, objectKey, false, false)) { - continue; // Skip this pair because of invalid key; - } - - if (state.dump.length > 1024) pairBuffer += '? '; - - pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); - - if (!writeNode(state, level, objectValue, false, false)) { - continue; // Skip this pair because of invalid value. - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = '{' + _result + '}'; -} - -function writeBlockMapping(state, level, object, compact) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - explicitPair, - pairBuffer; - - // Allow sorting keys so that the output file is deterministic - if (state.sortKeys === true) { - // Default sorting - objectKeyList.sort(); - } else if (typeof state.sortKeys === 'function') { - // Custom sort function - objectKeyList.sort(state.sortKeys); - } else if (state.sortKeys) { - // Something is wrong - throw new exception('sortKeys must be a boolean or a function'); - } - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ''; - - if (!compact || _result !== '') { - pairBuffer += generateNextLine(state, level); - } - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue); - } - - if (!writeNode(state, level + 1, objectKey, true, true, true)) { - continue; // Skip this pair because of invalid key. - } - - explicitPair = (state.tag !== null && state.tag !== '?') || - (state.dump && state.dump.length > 1024); - - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += '?'; - } else { - pairBuffer += '? '; - } - } - - pairBuffer += state.dump; - - if (explicitPair) { - pairBuffer += generateNextLine(state, level); - } - - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue; // Skip this pair because of invalid value. - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ':'; - } else { - pairBuffer += ': '; - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = _result || '{}'; // Empty mapping if no valid pairs. -} - -function detectType(state, object, explicit) { - var _result, typeList, index, length, type, style; - - typeList = explicit ? state.explicitTypes : state.implicitTypes; - - for (index = 0, length = typeList.length; index < length; index += 1) { - type = typeList[index]; - - if ((type.instanceOf || type.predicate) && - (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && - (!type.predicate || type.predicate(object))) { - - if (explicit) { - if (type.multi && type.representName) { - state.tag = type.representName(object); - } else { - state.tag = type.tag; - } - } else { - state.tag = '?'; - } - - if (type.represent) { - style = state.styleMap[type.tag] || type.defaultStyle; - - if (_toString.call(type.represent) === '[object Function]') { - _result = type.represent(object, style); - } else if (_hasOwnProperty.call(type.represent, style)) { - _result = type.represent[style](object, style); - } else { - throw new exception('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); - } - - state.dump = _result; - } - - return true; - } - } - - return false; -} - -// Serializes `object` and writes it to global `result`. -// Returns true on success, or false on invalid object. -// -function writeNode(state, level, object, block, compact, iskey, isblockseq) { - state.tag = null; - state.dump = object; - - if (!detectType(state, object, false)) { - detectType(state, object, true); - } - - var type = _toString.call(state.dump); - var inblock = block; - var tagStr; - - if (block) { - block = (state.flowLevel < 0 || state.flowLevel > level); - } - - var objectOrArray = type === '[object Object]' || type === '[object Array]', - duplicateIndex, - duplicate; - - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; - } - - if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { - compact = false; - } - - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = '*ref_' + duplicateIndex; - } else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true; - } - if (type === '[object Object]') { - if (block && (Object.keys(state.dump).length !== 0)) { - writeBlockMapping(state, level, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowMapping(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object Array]') { - if (block && (state.dump.length !== 0)) { - if (state.noArrayIndent && !isblockseq && level > 0) { - writeBlockSequence(state, level - 1, state.dump, compact); - } else { - writeBlockSequence(state, level, state.dump, compact); - } - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowSequence(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object String]') { - if (state.tag !== '?') { - writeScalar(state, state.dump, level, iskey, inblock); - } - } else if (type === '[object Undefined]') { - return false; - } else { - if (state.skipInvalid) return false; - throw new exception('unacceptable kind of an object to dump ' + type); - } - - if (state.tag !== null && state.tag !== '?') { - // Need to encode all characters except those allowed by the spec: - // - // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ - // [36] ns-hex-digit ::= ns-dec-digit - // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ - // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ - // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” - // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” - // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” - // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” - // - // Also need to encode '!' because it has special meaning (end of tag prefix). - // - tagStr = encodeURI( - state.tag[0] === '!' ? state.tag.slice(1) : state.tag - ).replace(/!/g, '%21'); - - if (state.tag[0] === '!') { - tagStr = '!' + tagStr; - } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { - tagStr = '!!' + tagStr.slice(18); - } else { - tagStr = '!<' + tagStr + '>'; - } - - state.dump = tagStr + ' ' + state.dump; - } - } - - return true; -} - -function getDuplicateReferences(object, state) { - var objects = [], - duplicatesIndexes = [], - index, - length; - - inspectNode(object, objects, duplicatesIndexes); - - for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { - state.duplicates.push(objects[duplicatesIndexes[index]]); - } - state.usedDuplicates = new Array(length); -} - -function inspectNode(object, objects, duplicatesIndexes) { - var objectKeyList, - index, - length; - - if (object !== null && typeof object === 'object') { - index = objects.indexOf(object); - if (index !== -1) { - if (duplicatesIndexes.indexOf(index) === -1) { - duplicatesIndexes.push(index); - } - } else { - objects.push(object); - - if (Array.isArray(object)) { - for (index = 0, length = object.length; index < length; index += 1) { - inspectNode(object[index], objects, duplicatesIndexes); - } - } else { - objectKeyList = Object.keys(object); - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); - } - } - } - } -} - -function dump$1(input, options) { - options = options || {}; - - var state = new State(options); - - if (!state.noRefs) getDuplicateReferences(input, state); - - var value = input; - - if (state.replacer) { - value = state.replacer.call({ '': value }, '', value); - } - - if (writeNode(state, 0, value, true, true)) return state.dump + '\n'; - - return ''; -} - -var dump_1 = dump$1; - -var dumper = { - dump: dump_1 -}; - -function renamed(from, to) { - return function () { - throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + - 'Use yaml.' + to + ' instead, which is now safe by default.'); - }; -} - - -var Type = type; -var Schema = schema; -var FAILSAFE_SCHEMA = failsafe; -var JSON_SCHEMA = json; -var CORE_SCHEMA = core; -var DEFAULT_SCHEMA = _default; -var load = loader.load; -var loadAll = loader.loadAll; -var dump = dumper.dump; -var YAMLException = exception; - -// Re-export all types in case user wants to create custom schema -var types = { - binary: binary, - float: float, - map: map, - null: _null, - pairs: pairs, - set: set, - timestamp: timestamp, - bool: bool, - int: int, - merge: merge, - omap: omap, - seq: seq, - str: str -}; - -// Removed functions from JS-YAML 3.0.x -var safeLoad = renamed('safeLoad', 'load'); -var safeLoadAll = renamed('safeLoadAll', 'loadAll'); -var safeDump = renamed('safeDump', 'dump'); - -var jsYaml = { - Type: Type, - Schema: Schema, - FAILSAFE_SCHEMA: FAILSAFE_SCHEMA, - JSON_SCHEMA: JSON_SCHEMA, - CORE_SCHEMA: CORE_SCHEMA, - DEFAULT_SCHEMA: DEFAULT_SCHEMA, - load: load, - loadAll: loadAll, - dump: dump, - YAMLException: YAMLException, - types: types, - safeLoad: safeLoad, - safeLoadAll: safeLoadAll, - safeDump: safeDump -}; - -export default jsYaml; -export { CORE_SCHEMA, DEFAULT_SCHEMA, FAILSAFE_SCHEMA, JSON_SCHEMA, Schema, Type, YAMLException, dump, load, loadAll, safeDump, safeLoad, safeLoadAll, types }; diff --git a/node_modules/js-yaml/index.js b/node_modules/js-yaml/index.js deleted file mode 100644 index bcb7eba7..00000000 --- a/node_modules/js-yaml/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - - -var loader = require('./lib/loader'); -var dumper = require('./lib/dumper'); - - -function renamed(from, to) { - return function () { - throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + - 'Use yaml.' + to + ' instead, which is now safe by default.'); - }; -} - - -module.exports.Type = require('./lib/type'); -module.exports.Schema = require('./lib/schema'); -module.exports.FAILSAFE_SCHEMA = require('./lib/schema/failsafe'); -module.exports.JSON_SCHEMA = require('./lib/schema/json'); -module.exports.CORE_SCHEMA = require('./lib/schema/core'); -module.exports.DEFAULT_SCHEMA = require('./lib/schema/default'); -module.exports.load = loader.load; -module.exports.loadAll = loader.loadAll; -module.exports.dump = dumper.dump; -module.exports.YAMLException = require('./lib/exception'); - -// Re-export all types in case user wants to create custom schema -module.exports.types = { - binary: require('./lib/type/binary'), - float: require('./lib/type/float'), - map: require('./lib/type/map'), - null: require('./lib/type/null'), - pairs: require('./lib/type/pairs'), - set: require('./lib/type/set'), - timestamp: require('./lib/type/timestamp'), - bool: require('./lib/type/bool'), - int: require('./lib/type/int'), - merge: require('./lib/type/merge'), - omap: require('./lib/type/omap'), - seq: require('./lib/type/seq'), - str: require('./lib/type/str') -}; - -// Removed functions from JS-YAML 3.0.x -module.exports.safeLoad = renamed('safeLoad', 'load'); -module.exports.safeLoadAll = renamed('safeLoadAll', 'loadAll'); -module.exports.safeDump = renamed('safeDump', 'dump'); diff --git a/node_modules/js-yaml/lib/common.js b/node_modules/js-yaml/lib/common.js deleted file mode 100644 index 25ef7d8e..00000000 --- a/node_modules/js-yaml/lib/common.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; - - -function isNothing(subject) { - return (typeof subject === 'undefined') || (subject === null); -} - - -function isObject(subject) { - return (typeof subject === 'object') && (subject !== null); -} - - -function toArray(sequence) { - if (Array.isArray(sequence)) return sequence; - else if (isNothing(sequence)) return []; - - return [ sequence ]; -} - - -function extend(target, source) { - var index, length, key, sourceKeys; - - if (source) { - sourceKeys = Object.keys(source); - - for (index = 0, length = sourceKeys.length; index < length; index += 1) { - key = sourceKeys[index]; - target[key] = source[key]; - } - } - - return target; -} - - -function repeat(string, count) { - var result = '', cycle; - - for (cycle = 0; cycle < count; cycle += 1) { - result += string; - } - - return result; -} - - -function isNegativeZero(number) { - return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); -} - - -module.exports.isNothing = isNothing; -module.exports.isObject = isObject; -module.exports.toArray = toArray; -module.exports.repeat = repeat; -module.exports.isNegativeZero = isNegativeZero; -module.exports.extend = extend; diff --git a/node_modules/js-yaml/lib/dumper.js b/node_modules/js-yaml/lib/dumper.js deleted file mode 100644 index f357a6ae..00000000 --- a/node_modules/js-yaml/lib/dumper.js +++ /dev/null @@ -1,965 +0,0 @@ -'use strict'; - -/*eslint-disable no-use-before-define*/ - -var common = require('./common'); -var YAMLException = require('./exception'); -var DEFAULT_SCHEMA = require('./schema/default'); - -var _toString = Object.prototype.toString; -var _hasOwnProperty = Object.prototype.hasOwnProperty; - -var CHAR_BOM = 0xFEFF; -var CHAR_TAB = 0x09; /* Tab */ -var CHAR_LINE_FEED = 0x0A; /* LF */ -var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ -var CHAR_SPACE = 0x20; /* Space */ -var CHAR_EXCLAMATION = 0x21; /* ! */ -var CHAR_DOUBLE_QUOTE = 0x22; /* " */ -var CHAR_SHARP = 0x23; /* # */ -var CHAR_PERCENT = 0x25; /* % */ -var CHAR_AMPERSAND = 0x26; /* & */ -var CHAR_SINGLE_QUOTE = 0x27; /* ' */ -var CHAR_ASTERISK = 0x2A; /* * */ -var CHAR_COMMA = 0x2C; /* , */ -var CHAR_MINUS = 0x2D; /* - */ -var CHAR_COLON = 0x3A; /* : */ -var CHAR_EQUALS = 0x3D; /* = */ -var CHAR_GREATER_THAN = 0x3E; /* > */ -var CHAR_QUESTION = 0x3F; /* ? */ -var CHAR_COMMERCIAL_AT = 0x40; /* @ */ -var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ -var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ -var CHAR_GRAVE_ACCENT = 0x60; /* ` */ -var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ -var CHAR_VERTICAL_LINE = 0x7C; /* | */ -var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ - -var ESCAPE_SEQUENCES = {}; - -ESCAPE_SEQUENCES[0x00] = '\\0'; -ESCAPE_SEQUENCES[0x07] = '\\a'; -ESCAPE_SEQUENCES[0x08] = '\\b'; -ESCAPE_SEQUENCES[0x09] = '\\t'; -ESCAPE_SEQUENCES[0x0A] = '\\n'; -ESCAPE_SEQUENCES[0x0B] = '\\v'; -ESCAPE_SEQUENCES[0x0C] = '\\f'; -ESCAPE_SEQUENCES[0x0D] = '\\r'; -ESCAPE_SEQUENCES[0x1B] = '\\e'; -ESCAPE_SEQUENCES[0x22] = '\\"'; -ESCAPE_SEQUENCES[0x5C] = '\\\\'; -ESCAPE_SEQUENCES[0x85] = '\\N'; -ESCAPE_SEQUENCES[0xA0] = '\\_'; -ESCAPE_SEQUENCES[0x2028] = '\\L'; -ESCAPE_SEQUENCES[0x2029] = '\\P'; - -var DEPRECATED_BOOLEANS_SYNTAX = [ - 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', - 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' -]; - -var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; - -function compileStyleMap(schema, map) { - var result, keys, index, length, tag, style, type; - - if (map === null) return {}; - - result = {}; - keys = Object.keys(map); - - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map[tag]); - - if (tag.slice(0, 2) === '!!') { - tag = 'tag:yaml.org,2002:' + tag.slice(2); - } - type = schema.compiledTypeMap['fallback'][tag]; - - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style]; - } - - result[tag] = style; - } - - return result; -} - -function encodeHex(character) { - var string, handle, length; - - string = character.toString(16).toUpperCase(); - - if (character <= 0xFF) { - handle = 'x'; - length = 2; - } else if (character <= 0xFFFF) { - handle = 'u'; - length = 4; - } else if (character <= 0xFFFFFFFF) { - handle = 'U'; - length = 8; - } else { - throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); - } - - return '\\' + handle + common.repeat('0', length - string.length) + string; -} - - -var QUOTING_TYPE_SINGLE = 1, - QUOTING_TYPE_DOUBLE = 2; - -function State(options) { - this.schema = options['schema'] || DEFAULT_SCHEMA; - this.indent = Math.max(1, (options['indent'] || 2)); - this.noArrayIndent = options['noArrayIndent'] || false; - this.skipInvalid = options['skipInvalid'] || false; - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); - this.styleMap = compileStyleMap(this.schema, options['styles'] || null); - this.sortKeys = options['sortKeys'] || false; - this.lineWidth = options['lineWidth'] || 80; - this.noRefs = options['noRefs'] || false; - this.noCompatMode = options['noCompatMode'] || false; - this.condenseFlow = options['condenseFlow'] || false; - this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; - this.forceQuotes = options['forceQuotes'] || false; - this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null; - - this.implicitTypes = this.schema.compiledImplicit; - this.explicitTypes = this.schema.compiledExplicit; - - this.tag = null; - this.result = ''; - - this.duplicates = []; - this.usedDuplicates = null; -} - -// Indents every line in a string. Empty lines (\n only) are not indented. -function indentString(string, spaces) { - var ind = common.repeat(' ', spaces), - position = 0, - next = -1, - result = '', - line, - length = string.length; - - while (position < length) { - next = string.indexOf('\n', position); - if (next === -1) { - line = string.slice(position); - position = length; - } else { - line = string.slice(position, next + 1); - position = next + 1; - } - - if (line.length && line !== '\n') result += ind; - - result += line; - } - - return result; -} - -function generateNextLine(state, level) { - return '\n' + common.repeat(' ', state.indent * level); -} - -function testImplicitResolving(state, str) { - var index, length, type; - - for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { - type = state.implicitTypes[index]; - - if (type.resolve(str)) { - return true; - } - } - - return false; -} - -// [33] s-white ::= s-space | s-tab -function isWhitespace(c) { - return c === CHAR_SPACE || c === CHAR_TAB; -} - -// Returns true if the character can be printed without escaping. -// From YAML 1.2: "any allowed characters known to be non-printable -// should also be escaped. [However,] This isn’t mandatory" -// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. -function isPrintable(c) { - return (0x00020 <= c && c <= 0x00007E) - || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) - || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM) - || (0x10000 <= c && c <= 0x10FFFF); -} - -// [34] ns-char ::= nb-char - s-white -// [27] nb-char ::= c-printable - b-char - c-byte-order-mark -// [26] b-char ::= b-line-feed | b-carriage-return -// Including s-white (for some reason, examples doesn't match specs in this aspect) -// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark -function isNsCharOrWhitespace(c) { - return isPrintable(c) - && c !== CHAR_BOM - // - b-char - && c !== CHAR_CARRIAGE_RETURN - && c !== CHAR_LINE_FEED; -} - -// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out -// c = flow-in ⇒ ns-plain-safe-in -// c = block-key ⇒ ns-plain-safe-out -// c = flow-key ⇒ ns-plain-safe-in -// [128] ns-plain-safe-out ::= ns-char -// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator -// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) -// | ( /* An ns-char preceding */ “#” ) -// | ( “:” /* Followed by an ns-plain-safe(c) */ ) -function isPlainSafe(c, prev, inblock) { - var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); - var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); - return ( - // ns-plain-safe - inblock ? // c = flow-in - cIsNsCharOrWhitespace - : cIsNsCharOrWhitespace - // - c-flow-indicator - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - ) - // ns-plain-char - && c !== CHAR_SHARP // false on '#' - && !(prev === CHAR_COLON && !cIsNsChar) // false on ': ' - || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#' - || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]' -} - -// Simplified test for values allowed as the first character in plain style. -function isPlainSafeFirst(c) { - // Uses a subset of ns-char - c-indicator - // where ns-char = nb-char - s-white. - // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part - return isPrintable(c) && c !== CHAR_BOM - && !isWhitespace(c) // - s-white - // - (c-indicator ::= - // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” - && c !== CHAR_MINUS - && c !== CHAR_QUESTION - && c !== CHAR_COLON - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” - && c !== CHAR_SHARP - && c !== CHAR_AMPERSAND - && c !== CHAR_ASTERISK - && c !== CHAR_EXCLAMATION - && c !== CHAR_VERTICAL_LINE - && c !== CHAR_EQUALS - && c !== CHAR_GREATER_THAN - && c !== CHAR_SINGLE_QUOTE - && c !== CHAR_DOUBLE_QUOTE - // | “%” | “@” | “`”) - && c !== CHAR_PERCENT - && c !== CHAR_COMMERCIAL_AT - && c !== CHAR_GRAVE_ACCENT; -} - -// Simplified test for values allowed as the last character in plain style. -function isPlainSafeLast(c) { - // just not whitespace or colon, it will be checked to be plain character later - return !isWhitespace(c) && c !== CHAR_COLON; -} - -// Same as 'string'.codePointAt(pos), but works in older browsers. -function codePointAt(string, pos) { - var first = string.charCodeAt(pos), second; - if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { - second = string.charCodeAt(pos + 1); - if (second >= 0xDC00 && second <= 0xDFFF) { - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; - } - } - return first; -} - -// Determines whether block indentation indicator is required. -function needIndentIndicator(string) { - var leadingSpaceRe = /^\n* /; - return leadingSpaceRe.test(string); -} - -var STYLE_PLAIN = 1, - STYLE_SINGLE = 2, - STYLE_LITERAL = 3, - STYLE_FOLDED = 4, - STYLE_DOUBLE = 5; - -// Determines which scalar styles are possible and returns the preferred style. -// lineWidth = -1 => no limit. -// Pre-conditions: str.length > 0. -// Post-conditions: -// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. -// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). -// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). -function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, - testAmbiguousType, quotingType, forceQuotes, inblock) { - - var i; - var char = 0; - var prevChar = null; - var hasLineBreak = false; - var hasFoldableLine = false; // only checked if shouldTrackWidth - var shouldTrackWidth = lineWidth !== -1; - var previousLineBreak = -1; // count the first line correctly - var plain = isPlainSafeFirst(codePointAt(string, 0)) - && isPlainSafeLast(codePointAt(string, string.length - 1)); - - if (singleLineOnly || forceQuotes) { - // Case: no block styles. - // Check for disallowed characters to rule out plain and single. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - } else { - // Case: block styles permitted. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - if (char === CHAR_LINE_FEED) { - hasLineBreak = true; - // Check if any line can be folded. - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || - // Foldable line = too long, and not more-indented. - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' '); - previousLineBreak = i; - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - // in case the end is missing a \n - hasFoldableLine = hasFoldableLine || (shouldTrackWidth && - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ')); - } - // Although every style can represent \n without escaping, prefer block styles - // for multiline, since they're more readable and they don't add empty lines. - // Also prefer folding a super-long line. - if (!hasLineBreak && !hasFoldableLine) { - // Strings interpretable as another type have to be quoted; - // e.g. the string 'true' vs. the boolean true. - if (plain && !forceQuotes && !testAmbiguousType(string)) { - return STYLE_PLAIN; - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; - } - // Edge case: block indentation indicator can only have one digit. - if (indentPerLevel > 9 && needIndentIndicator(string)) { - return STYLE_DOUBLE; - } - // At this point we know block styles are valid. - // Prefer literal style unless we want to fold. - if (!forceQuotes) { - return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; -} - -// Note: line breaking/folding is implemented for only the folded style. -// NB. We drop the last trailing newline (if any) of a returned block scalar -// since the dumper adds its own newline. This always works: -// • No ending newline => unaffected; already using strip "-" chomping. -// • Ending newline => removed then restored. -// Importantly, this keeps the "+" chomp indicator from gaining an extra line. -function writeScalar(state, string, level, iskey, inblock) { - state.dump = (function () { - if (string.length === 0) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; - } - if (!state.noCompatMode) { - if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'"); - } - } - - var indent = state.indent * Math.max(1, level); // no 0-indent scalars - // As indentation gets deeper, let the width decrease monotonically - // to the lower bound min(state.lineWidth, 40). - // Note that this implies - // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. - // state.lineWidth > 40 + state.indent: width decreases until the lower bound. - // This behaves better than a constant minimum width which disallows narrower options, - // or an indent threshold which causes the width to suddenly increase. - var lineWidth = state.lineWidth === -1 - ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); - - // Without knowing if keys are implicit/explicit, assume implicit for safety. - var singleLineOnly = iskey - // No block styles in flow mode. - || (state.flowLevel > -1 && level >= state.flowLevel); - function testAmbiguity(string) { - return testImplicitResolving(state, string); - } - - switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, - testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { - - case STYLE_PLAIN: - return string; - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'"; - case STYLE_LITERAL: - return '|' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(string, indent)); - case STYLE_FOLDED: - return '>' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); - case STYLE_DOUBLE: - return '"' + escapeString(string, lineWidth) + '"'; - default: - throw new YAMLException('impossible error: invalid scalar style'); - } - }()); -} - -// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. -function blockHeader(string, indentPerLevel) { - var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; - - // note the special case: the string '\n' counts as a "trailing" empty line. - var clip = string[string.length - 1] === '\n'; - var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); - var chomp = keep ? '+' : (clip ? '' : '-'); - - return indentIndicator + chomp + '\n'; -} - -// (See the note for writeScalar.) -function dropEndingNewline(string) { - return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; -} - -// Note: a long line without a suitable break point will exceed the width limit. -// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. -function foldString(string, width) { - // In folded style, $k$ consecutive newlines output as $k+1$ newlines— - // unless they're before or after a more-indented line, or at the very - // beginning or end, in which case $k$ maps to $k$. - // Therefore, parse each chunk as newline(s) followed by a content line. - var lineRe = /(\n+)([^\n]*)/g; - - // first line (possibly an empty line) - var result = (function () { - var nextLF = string.indexOf('\n'); - nextLF = nextLF !== -1 ? nextLF : string.length; - lineRe.lastIndex = nextLF; - return foldLine(string.slice(0, nextLF), width); - }()); - // If we haven't reached the first content line yet, don't add an extra \n. - var prevMoreIndented = string[0] === '\n' || string[0] === ' '; - var moreIndented; - - // rest of the lines - var match; - while ((match = lineRe.exec(string))) { - var prefix = match[1], line = match[2]; - moreIndented = (line[0] === ' '); - result += prefix - + (!prevMoreIndented && !moreIndented && line !== '' - ? '\n' : '') - + foldLine(line, width); - prevMoreIndented = moreIndented; - } - - return result; -} - -// Greedy line breaking. -// Picks the longest line under the limit each time, -// otherwise settles for the shortest line over the limit. -// NB. More-indented lines *cannot* be folded, as that would add an extra \n. -function foldLine(line, width) { - if (line === '' || line[0] === ' ') return line; - - // Since a more-indented line adds a \n, breaks can't be followed by a space. - var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. - var match; - // start is an inclusive index. end, curr, and next are exclusive. - var start = 0, end, curr = 0, next = 0; - var result = ''; - - // Invariants: 0 <= start <= length-1. - // 0 <= curr <= next <= max(0, length-2). curr - start <= width. - // Inside the loop: - // A match implies length >= 2, so curr and next are <= length-2. - while ((match = breakRe.exec(line))) { - next = match.index; - // maintain invariant: curr - start <= width - if (next - start > width) { - end = (curr > start) ? curr : next; // derive end <= length-2 - result += '\n' + line.slice(start, end); - // skip the space that was output as \n - start = end + 1; // derive start <= length-1 - } - curr = next; - } - - // By the invariants, start <= length-1, so there is something left over. - // It is either the whole string or a part starting from non-whitespace. - result += '\n'; - // Insert a break if the remainder is too long and there is a break available. - if (line.length - start > width && curr > start) { - result += line.slice(start, curr) + '\n' + line.slice(curr + 1); - } else { - result += line.slice(start); - } - - return result.slice(1); // drop extra \n joiner -} - -// Escapes a double-quoted string. -function escapeString(string) { - var result = ''; - var char = 0; - var escapeSeq; - - for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - escapeSeq = ESCAPE_SEQUENCES[char]; - - if (!escapeSeq && isPrintable(char)) { - result += string[i]; - if (char >= 0x10000) result += string[i + 1]; - } else { - result += escapeSeq || encodeHex(char); - } - } - - return result; -} - -function writeFlowSequence(state, level, object) { - var _result = '', - _tag = state.tag, - index, - length, - value; - - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - - if (state.replacer) { - value = state.replacer.call(object, String(index), value); - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level, value, false, false) || - (typeof value === 'undefined' && - writeNode(state, level, null, false, false))) { - - if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : ''); - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = '[' + _result + ']'; -} - -function writeBlockSequence(state, level, object, compact) { - var _result = '', - _tag = state.tag, - index, - length, - value; - - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - - if (state.replacer) { - value = state.replacer.call(object, String(index), value); - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level + 1, value, true, true, false, true) || - (typeof value === 'undefined' && - writeNode(state, level + 1, null, true, true, false, true))) { - - if (!compact || _result !== '') { - _result += generateNextLine(state, level); - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - _result += '-'; - } else { - _result += '- '; - } - - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = _result || '[]'; // Empty sequence if no valid values. -} - -function writeFlowMapping(state, level, object) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - pairBuffer; - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - - pairBuffer = ''; - if (_result !== '') pairBuffer += ', '; - - if (state.condenseFlow) pairBuffer += '"'; - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue); - } - - if (!writeNode(state, level, objectKey, false, false)) { - continue; // Skip this pair because of invalid key; - } - - if (state.dump.length > 1024) pairBuffer += '? '; - - pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); - - if (!writeNode(state, level, objectValue, false, false)) { - continue; // Skip this pair because of invalid value. - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = '{' + _result + '}'; -} - -function writeBlockMapping(state, level, object, compact) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - explicitPair, - pairBuffer; - - // Allow sorting keys so that the output file is deterministic - if (state.sortKeys === true) { - // Default sorting - objectKeyList.sort(); - } else if (typeof state.sortKeys === 'function') { - // Custom sort function - objectKeyList.sort(state.sortKeys); - } else if (state.sortKeys) { - // Something is wrong - throw new YAMLException('sortKeys must be a boolean or a function'); - } - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ''; - - if (!compact || _result !== '') { - pairBuffer += generateNextLine(state, level); - } - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue); - } - - if (!writeNode(state, level + 1, objectKey, true, true, true)) { - continue; // Skip this pair because of invalid key. - } - - explicitPair = (state.tag !== null && state.tag !== '?') || - (state.dump && state.dump.length > 1024); - - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += '?'; - } else { - pairBuffer += '? '; - } - } - - pairBuffer += state.dump; - - if (explicitPair) { - pairBuffer += generateNextLine(state, level); - } - - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue; // Skip this pair because of invalid value. - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ':'; - } else { - pairBuffer += ': '; - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = _result || '{}'; // Empty mapping if no valid pairs. -} - -function detectType(state, object, explicit) { - var _result, typeList, index, length, type, style; - - typeList = explicit ? state.explicitTypes : state.implicitTypes; - - for (index = 0, length = typeList.length; index < length; index += 1) { - type = typeList[index]; - - if ((type.instanceOf || type.predicate) && - (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && - (!type.predicate || type.predicate(object))) { - - if (explicit) { - if (type.multi && type.representName) { - state.tag = type.representName(object); - } else { - state.tag = type.tag; - } - } else { - state.tag = '?'; - } - - if (type.represent) { - style = state.styleMap[type.tag] || type.defaultStyle; - - if (_toString.call(type.represent) === '[object Function]') { - _result = type.represent(object, style); - } else if (_hasOwnProperty.call(type.represent, style)) { - _result = type.represent[style](object, style); - } else { - throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); - } - - state.dump = _result; - } - - return true; - } - } - - return false; -} - -// Serializes `object` and writes it to global `result`. -// Returns true on success, or false on invalid object. -// -function writeNode(state, level, object, block, compact, iskey, isblockseq) { - state.tag = null; - state.dump = object; - - if (!detectType(state, object, false)) { - detectType(state, object, true); - } - - var type = _toString.call(state.dump); - var inblock = block; - var tagStr; - - if (block) { - block = (state.flowLevel < 0 || state.flowLevel > level); - } - - var objectOrArray = type === '[object Object]' || type === '[object Array]', - duplicateIndex, - duplicate; - - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; - } - - if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { - compact = false; - } - - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = '*ref_' + duplicateIndex; - } else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true; - } - if (type === '[object Object]') { - if (block && (Object.keys(state.dump).length !== 0)) { - writeBlockMapping(state, level, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowMapping(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object Array]') { - if (block && (state.dump.length !== 0)) { - if (state.noArrayIndent && !isblockseq && level > 0) { - writeBlockSequence(state, level - 1, state.dump, compact); - } else { - writeBlockSequence(state, level, state.dump, compact); - } - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowSequence(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object String]') { - if (state.tag !== '?') { - writeScalar(state, state.dump, level, iskey, inblock); - } - } else if (type === '[object Undefined]') { - return false; - } else { - if (state.skipInvalid) return false; - throw new YAMLException('unacceptable kind of an object to dump ' + type); - } - - if (state.tag !== null && state.tag !== '?') { - // Need to encode all characters except those allowed by the spec: - // - // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ - // [36] ns-hex-digit ::= ns-dec-digit - // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ - // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ - // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” - // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” - // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” - // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” - // - // Also need to encode '!' because it has special meaning (end of tag prefix). - // - tagStr = encodeURI( - state.tag[0] === '!' ? state.tag.slice(1) : state.tag - ).replace(/!/g, '%21'); - - if (state.tag[0] === '!') { - tagStr = '!' + tagStr; - } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { - tagStr = '!!' + tagStr.slice(18); - } else { - tagStr = '!<' + tagStr + '>'; - } - - state.dump = tagStr + ' ' + state.dump; - } - } - - return true; -} - -function getDuplicateReferences(object, state) { - var objects = [], - duplicatesIndexes = [], - index, - length; - - inspectNode(object, objects, duplicatesIndexes); - - for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { - state.duplicates.push(objects[duplicatesIndexes[index]]); - } - state.usedDuplicates = new Array(length); -} - -function inspectNode(object, objects, duplicatesIndexes) { - var objectKeyList, - index, - length; - - if (object !== null && typeof object === 'object') { - index = objects.indexOf(object); - if (index !== -1) { - if (duplicatesIndexes.indexOf(index) === -1) { - duplicatesIndexes.push(index); - } - } else { - objects.push(object); - - if (Array.isArray(object)) { - for (index = 0, length = object.length; index < length; index += 1) { - inspectNode(object[index], objects, duplicatesIndexes); - } - } else { - objectKeyList = Object.keys(object); - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); - } - } - } - } -} - -function dump(input, options) { - options = options || {}; - - var state = new State(options); - - if (!state.noRefs) getDuplicateReferences(input, state); - - var value = input; - - if (state.replacer) { - value = state.replacer.call({ '': value }, '', value); - } - - if (writeNode(state, 0, value, true, true)) return state.dump + '\n'; - - return ''; -} - -module.exports.dump = dump; diff --git a/node_modules/js-yaml/lib/exception.js b/node_modules/js-yaml/lib/exception.js deleted file mode 100644 index 7f62daae..00000000 --- a/node_modules/js-yaml/lib/exception.js +++ /dev/null @@ -1,55 +0,0 @@ -// YAML error class. http://stackoverflow.com/questions/8458984 -// -'use strict'; - - -function formatError(exception, compact) { - var where = '', message = exception.reason || '(unknown reason)'; - - if (!exception.mark) return message; - - if (exception.mark.name) { - where += 'in "' + exception.mark.name + '" '; - } - - where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')'; - - if (!compact && exception.mark.snippet) { - where += '\n\n' + exception.mark.snippet; - } - - return message + ' ' + where; -} - - -function YAMLException(reason, mark) { - // Super constructor - Error.call(this); - - this.name = 'YAMLException'; - this.reason = reason; - this.mark = mark; - this.message = formatError(this, false); - - // Include stack trace in error object - if (Error.captureStackTrace) { - // Chrome and NodeJS - Error.captureStackTrace(this, this.constructor); - } else { - // FF, IE 10+ and Safari 6+. Fallback for others - this.stack = (new Error()).stack || ''; - } -} - - -// Inherit from Error -YAMLException.prototype = Object.create(Error.prototype); -YAMLException.prototype.constructor = YAMLException; - - -YAMLException.prototype.toString = function toString(compact) { - return this.name + ': ' + formatError(this, compact); -}; - - -module.exports = YAMLException; diff --git a/node_modules/js-yaml/lib/loader.js b/node_modules/js-yaml/lib/loader.js deleted file mode 100644 index 39f13f56..00000000 --- a/node_modules/js-yaml/lib/loader.js +++ /dev/null @@ -1,1727 +0,0 @@ -'use strict'; - -/*eslint-disable max-len,no-use-before-define*/ - -var common = require('./common'); -var YAMLException = require('./exception'); -var makeSnippet = require('./snippet'); -var DEFAULT_SCHEMA = require('./schema/default'); - - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - - -var CONTEXT_FLOW_IN = 1; -var CONTEXT_FLOW_OUT = 2; -var CONTEXT_BLOCK_IN = 3; -var CONTEXT_BLOCK_OUT = 4; - - -var CHOMPING_CLIP = 1; -var CHOMPING_STRIP = 2; -var CHOMPING_KEEP = 3; - - -var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; -var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; -var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; -var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; -var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; - - -function _class(obj) { return Object.prototype.toString.call(obj); } - -function is_EOL(c) { - return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); -} - -function is_WHITE_SPACE(c) { - return (c === 0x09/* Tab */) || (c === 0x20/* Space */); -} - -function is_WS_OR_EOL(c) { - return (c === 0x09/* Tab */) || - (c === 0x20/* Space */) || - (c === 0x0A/* LF */) || - (c === 0x0D/* CR */); -} - -function is_FLOW_INDICATOR(c) { - return c === 0x2C/* , */ || - c === 0x5B/* [ */ || - c === 0x5D/* ] */ || - c === 0x7B/* { */ || - c === 0x7D/* } */; -} - -function fromHexCode(c) { - var lc; - - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - /*eslint-disable no-bitwise*/ - lc = c | 0x20; - - if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { - return lc - 0x61 + 10; - } - - return -1; -} - -function escapedHexLen(c) { - if (c === 0x78/* x */) { return 2; } - if (c === 0x75/* u */) { return 4; } - if (c === 0x55/* U */) { return 8; } - return 0; -} - -function fromDecimalCode(c) { - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - return -1; -} - -function simpleEscapeSequence(c) { - /* eslint-disable indent */ - return (c === 0x30/* 0 */) ? '\x00' : - (c === 0x61/* a */) ? '\x07' : - (c === 0x62/* b */) ? '\x08' : - (c === 0x74/* t */) ? '\x09' : - (c === 0x09/* Tab */) ? '\x09' : - (c === 0x6E/* n */) ? '\x0A' : - (c === 0x76/* v */) ? '\x0B' : - (c === 0x66/* f */) ? '\x0C' : - (c === 0x72/* r */) ? '\x0D' : - (c === 0x65/* e */) ? '\x1B' : - (c === 0x20/* Space */) ? ' ' : - (c === 0x22/* " */) ? '\x22' : - (c === 0x2F/* / */) ? '/' : - (c === 0x5C/* \ */) ? '\x5C' : - (c === 0x4E/* N */) ? '\x85' : - (c === 0x5F/* _ */) ? '\xA0' : - (c === 0x4C/* L */) ? '\u2028' : - (c === 0x50/* P */) ? '\u2029' : ''; -} - -function charFromCodepoint(c) { - if (c <= 0xFFFF) { - return String.fromCharCode(c); - } - // Encode UTF-16 surrogate pair - // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF - return String.fromCharCode( - ((c - 0x010000) >> 10) + 0xD800, - ((c - 0x010000) & 0x03FF) + 0xDC00 - ); -} - -var simpleEscapeCheck = new Array(256); // integer, for fast access -var simpleEscapeMap = new Array(256); -for (var i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; - simpleEscapeMap[i] = simpleEscapeSequence(i); -} - - -function State(input, options) { - this.input = input; - - this.filename = options['filename'] || null; - this.schema = options['schema'] || DEFAULT_SCHEMA; - this.onWarning = options['onWarning'] || null; - // (Hidden) Remove? makes the loader to expect YAML 1.1 documents - // if such documents have no explicit %YAML directive - this.legacy = options['legacy'] || false; - - this.json = options['json'] || false; - this.listener = options['listener'] || null; - - this.implicitTypes = this.schema.compiledImplicit; - this.typeMap = this.schema.compiledTypeMap; - - this.length = input.length; - this.position = 0; - this.line = 0; - this.lineStart = 0; - this.lineIndent = 0; - - // position of first leading tab in the current line, - // used to make sure there are no tabs in the indentation - this.firstTabInLine = -1; - - this.documents = []; - - /* - this.version; - this.checkLineBreaks; - this.tagMap; - this.anchorMap; - this.tag; - this.anchor; - this.kind; - this.result;*/ - -} - - -function generateError(state, message) { - var mark = { - name: state.filename, - buffer: state.input.slice(0, -1), // omit trailing \0 - position: state.position, - line: state.line, - column: state.position - state.lineStart - }; - - mark.snippet = makeSnippet(mark); - - return new YAMLException(message, mark); -} - -function throwError(state, message) { - throw generateError(state, message); -} - -function throwWarning(state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)); - } -} - - -var directiveHandlers = { - - YAML: function handleYamlDirective(state, name, args) { - - var match, major, minor; - - if (state.version !== null) { - throwError(state, 'duplication of %YAML directive'); - } - - if (args.length !== 1) { - throwError(state, 'YAML directive accepts exactly one argument'); - } - - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - - if (match === null) { - throwError(state, 'ill-formed argument of the YAML directive'); - } - - major = parseInt(match[1], 10); - minor = parseInt(match[2], 10); - - if (major !== 1) { - throwError(state, 'unacceptable YAML version of the document'); - } - - state.version = args[0]; - state.checkLineBreaks = (minor < 2); - - if (minor !== 1 && minor !== 2) { - throwWarning(state, 'unsupported YAML version of the document'); - } - }, - - TAG: function handleTagDirective(state, name, args) { - - var handle, prefix; - - if (args.length !== 2) { - throwError(state, 'TAG directive accepts exactly two arguments'); - } - - handle = args[0]; - prefix = args[1]; - - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); - } - - if (_hasOwnProperty.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } - - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); - } - - try { - prefix = decodeURIComponent(prefix); - } catch (err) { - throwError(state, 'tag prefix is malformed: ' + prefix); - } - - state.tagMap[handle] = prefix; - } -}; - - -function captureSegment(state, start, end, checkJson) { - var _position, _length, _character, _result; - - if (start < end) { - _result = state.input.slice(start, end); - - if (checkJson) { - for (_position = 0, _length = _result.length; _position < _length; _position += 1) { - _character = _result.charCodeAt(_position); - if (!(_character === 0x09 || - (0x20 <= _character && _character <= 0x10FFFF))) { - throwError(state, 'expected valid JSON character'); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, 'the stream contains non-printable characters'); - } - - state.result += _result; - } -} - -function mergeMappings(state, destination, source, overridableKeys) { - var sourceKeys, key, index, quantity; - - if (!common.isObject(source)) { - throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); - } - - sourceKeys = Object.keys(source); - - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - - if (!_hasOwnProperty.call(destination, key)) { - destination[key] = source[key]; - overridableKeys[key] = true; - } - } -} - -function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, - startLine, startLineStart, startPos) { - - var index, quantity; - - // The output is a plain object here, so keys can only be strings. - // We need to convert keyNode to a string, but doing so can hang the process - // (deeply nested arrays that explode exponentially using aliases). - if (Array.isArray(keyNode)) { - keyNode = Array.prototype.slice.call(keyNode); - - for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { - if (Array.isArray(keyNode[index])) { - throwError(state, 'nested arrays are not supported inside keys'); - } - - if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { - keyNode[index] = '[object Object]'; - } - } - } - - // Avoid code execution in load() via toString property - // (still use its own toString for arrays, timestamps, - // and whatever user schema extensions happen to have @@toStringTag) - if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { - keyNode = '[object Object]'; - } - - - keyNode = String(keyNode); - - if (_result === null) { - _result = {}; - } - - if (keyTag === 'tag:yaml.org,2002:merge') { - if (Array.isArray(valueNode)) { - for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { - mergeMappings(state, _result, valueNode[index], overridableKeys); - } - } else { - mergeMappings(state, _result, valueNode, overridableKeys); - } - } else { - if (!state.json && - !_hasOwnProperty.call(overridableKeys, keyNode) && - _hasOwnProperty.call(_result, keyNode)) { - state.line = startLine || state.line; - state.lineStart = startLineStart || state.lineStart; - state.position = startPos || state.position; - throwError(state, 'duplicated mapping key'); - } - - // used for this specific key only because Object.defineProperty is slow - if (keyNode === '__proto__') { - Object.defineProperty(_result, keyNode, { - configurable: true, - enumerable: true, - writable: true, - value: valueNode - }); - } else { - _result[keyNode] = valueNode; - } - delete overridableKeys[keyNode]; - } - - return _result; -} - -function readLineBreak(state) { - var ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x0A/* LF */) { - state.position++; - } else if (ch === 0x0D/* CR */) { - state.position++; - if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { - state.position++; - } - } else { - throwError(state, 'a line break is expected'); - } - - state.line += 1; - state.lineStart = state.position; - state.firstTabInLine = -1; -} - -function skipSeparationSpace(state, allowComments, checkIndent) { - var lineBreaks = 0, - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { - state.firstTabInLine = state.position; - } - ch = state.input.charCodeAt(++state.position); - } - - if (allowComments && ch === 0x23/* # */) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); - } - - if (is_EOL(ch)) { - readLineBreak(state); - - ch = state.input.charCodeAt(state.position); - lineBreaks++; - state.lineIndent = 0; - - while (ch === 0x20/* Space */) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - } else { - break; - } - } - - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, 'deficient indentation'); - } - - return lineBreaks; -} - -function testDocumentSeparator(state) { - var _position = state.position, - ch; - - ch = state.input.charCodeAt(_position); - - // Condition state.position === state.lineStart is tested - // in parent on each call, for efficiency. No needs to test here again. - if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && - ch === state.input.charCodeAt(_position + 1) && - ch === state.input.charCodeAt(_position + 2)) { - - _position += 3; - - ch = state.input.charCodeAt(_position); - - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; - } - } - - return false; -} - -function writeFoldedLines(state, count) { - if (count === 1) { - state.result += ' '; - } else if (count > 1) { - state.result += common.repeat('\n', count - 1); - } -} - - -function readPlainScalar(state, nodeIndent, withinFlowCollection) { - var preceding, - following, - captureStart, - captureEnd, - hasPendingContent, - _line, - _lineStart, - _lineIndent, - _kind = state.kind, - _result = state.result, - ch; - - ch = state.input.charCodeAt(state.position); - - if (is_WS_OR_EOL(ch) || - is_FLOW_INDICATOR(ch) || - ch === 0x23/* # */ || - ch === 0x26/* & */ || - ch === 0x2A/* * */ || - ch === 0x21/* ! */ || - ch === 0x7C/* | */ || - ch === 0x3E/* > */ || - ch === 0x27/* ' */ || - ch === 0x22/* " */ || - ch === 0x25/* % */ || - ch === 0x40/* @ */ || - ch === 0x60/* ` */) { - return false; - } - - if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; - } - } - - state.kind = 'scalar'; - state.result = ''; - captureStart = captureEnd = state.position; - hasPendingContent = false; - - while (ch !== 0) { - if (ch === 0x3A/* : */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; - } - - } else if (ch === 0x23/* # */) { - preceding = state.input.charCodeAt(state.position - 1); - - if (is_WS_OR_EOL(preceding)) { - break; - } - - } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || - withinFlowCollection && is_FLOW_INDICATOR(ch)) { - break; - - } else if (is_EOL(ch)) { - _line = state.line; - _lineStart = state.lineStart; - _lineIndent = state.lineIndent; - skipSeparationSpace(state, false, -1); - - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state.input.charCodeAt(state.position); - continue; - } else { - state.position = captureEnd; - state.line = _line; - state.lineStart = _lineStart; - state.lineIndent = _lineIndent; - break; - } - } - - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false); - writeFoldedLines(state, state.line - _line); - captureStart = captureEnd = state.position; - hasPendingContent = false; - } - - if (!is_WHITE_SPACE(ch)) { - captureEnd = state.position + 1; - } - - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, captureEnd, false); - - if (state.result) { - return true; - } - - state.kind = _kind; - state.result = _result; - return false; -} - -function readSingleQuotedScalar(state, nodeIndent) { - var ch, - captureStart, captureEnd; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x27/* ' */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x27/* ' */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x27/* ' */) { - captureStart = state.position; - state.position++; - captureEnd = state.position; - } else { - return true; - } - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a single quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a single quoted scalar'); -} - -function readDoubleQuotedScalar(state, nodeIndent) { - var captureStart, - captureEnd, - hexLength, - hexResult, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x22/* " */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x22/* " */) { - captureSegment(state, captureStart, state.position, true); - state.position++; - return true; - - } else if (ch === 0x5C/* \ */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (is_EOL(ch)) { - skipSeparationSpace(state, false, nodeIndent); - - // TODO: rework to inline fn with no type cast? - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch]; - state.position++; - - } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; - - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position); - - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; - - } else { - throwError(state, 'expected hexadecimal character'); - } - } - - state.result += charFromCodepoint(hexResult); - - state.position++; - - } else { - throwError(state, 'unknown escape sequence'); - } - - captureStart = captureEnd = state.position; - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a double quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a double quoted scalar'); -} - -function readFlowCollection(state, nodeIndent) { - var readNext = true, - _line, - _lineStart, - _pos, - _tag = state.tag, - _result, - _anchor = state.anchor, - following, - terminator, - isPair, - isExplicitPair, - isMapping, - overridableKeys = Object.create(null), - keyNode, - keyTag, - valueNode, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x5B/* [ */) { - terminator = 0x5D;/* ] */ - isMapping = false; - _result = []; - } else if (ch === 0x7B/* { */) { - terminator = 0x7D;/* } */ - isMapping = true; - _result = {}; - } else { - return false; - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(++state.position); - - while (ch !== 0) { - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === terminator) { - state.position++; - state.tag = _tag; - state.anchor = _anchor; - state.kind = isMapping ? 'mapping' : 'sequence'; - state.result = _result; - return true; - } else if (!readNext) { - throwError(state, 'missed comma between flow collection entries'); - } else if (ch === 0x2C/* , */) { - // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 - throwError(state, "expected the node content, but found ','"); - } - - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - - if (ch === 0x3F/* ? */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; - state.position++; - skipSeparationSpace(state, true, nodeIndent); - } - } - - _line = state.line; // Save the current line. - _lineStart = state.lineStart; - _pos = state.position; - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state.tag; - keyNode = state.result; - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { - isPair = true; - ch = state.input.charCodeAt(++state.position); - skipSeparationSpace(state, true, nodeIndent); - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state.result; - } - - if (isMapping) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); - } else if (isPair) { - _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); - } else { - _result.push(keyNode); - } - - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x2C/* , */) { - readNext = true; - ch = state.input.charCodeAt(++state.position); - } else { - readNext = false; - } - } - - throwError(state, 'unexpected end of the stream within a flow collection'); -} - -function readBlockScalar(state, nodeIndent) { - var captureStart, - folding, - chomping = CHOMPING_CLIP, - didReadContent = false, - detectedIndent = false, - textIndent = nodeIndent, - emptyLines = 0, - atMoreIndented = false, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x7C/* | */) { - folding = false; - } else if (ch === 0x3E/* > */) { - folding = true; - } else { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - - while (ch !== 0) { - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { - if (CHOMPING_CLIP === chomping) { - chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state, 'repeat of a chomping mode identifier'); - } - - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1; - detectedIndent = true; - } else { - throwError(state, 'repeat of an indentation width identifier'); - } - - } else { - break; - } - } - - if (is_WHITE_SPACE(ch)) { - do { ch = state.input.charCodeAt(++state.position); } - while (is_WHITE_SPACE(ch)); - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (!is_EOL(ch) && (ch !== 0)); - } - } - - while (ch !== 0) { - readLineBreak(state); - state.lineIndent = 0; - - ch = state.input.charCodeAt(state.position); - - while ((!detectedIndent || state.lineIndent < textIndent) && - (ch === 0x20/* Space */)) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent; - } - - if (is_EOL(ch)) { - emptyLines++; - continue; - } - - // End of the scalar. - if (state.lineIndent < textIndent) { - - // Perform the chomping. - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { // i.e. only if the scalar is not empty. - state.result += '\n'; - } - } - - // Break this `while` cycle and go to the funciton's epilogue. - break; - } - - // Folded style: use fancy rules to handle line breaks. - if (folding) { - - // Lines starting with white space characters (more-indented lines) are not folded. - if (is_WHITE_SPACE(ch)) { - atMoreIndented = true; - // except for the first content line (cf. Example 8.1) - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - - // End of more-indented block. - } else if (atMoreIndented) { - atMoreIndented = false; - state.result += common.repeat('\n', emptyLines + 1); - - // Just one line break - perceive as the same line. - } else if (emptyLines === 0) { - if (didReadContent) { // i.e. only if we have already read some scalar content. - state.result += ' '; - } - - // Several line breaks - perceive as different lines. - } else { - state.result += common.repeat('\n', emptyLines); - } - - // Literal style: just add exact number of line breaks between content lines. - } else { - // Keep all line breaks except the header line break. - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } - - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state.position; - - while (!is_EOL(ch) && (ch !== 0)) { - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, state.position, false); - } - - return true; -} - -function readBlockSequence(state, nodeIndent) { - var _line, - _tag = state.tag, - _anchor = state.anchor, - _result = [], - following, - detected = false, - ch; - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - if (state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, 'tab characters must not be used in indentation'); - } - - if (ch !== 0x2D/* - */) { - break; - } - - following = state.input.charCodeAt(state.position + 1); - - if (!is_WS_OR_EOL(following)) { - break; - } - - detected = true; - state.position++; - - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null); - ch = state.input.charCodeAt(state.position); - continue; - } - } - - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state.result); - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a sequence entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'sequence'; - state.result = _result; - return true; - } - return false; -} - -function readBlockMapping(state, nodeIndent, flowIndent) { - var following, - allowCompact, - _line, - _keyLine, - _keyLineStart, - _keyPos, - _tag = state.tag, - _anchor = state.anchor, - _result = {}, - overridableKeys = Object.create(null), - keyTag = null, - keyNode = null, - valueNode = null, - atExplicitKey = false, - detected = false, - ch; - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - if (!atExplicitKey && state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, 'tab characters must not be used in indentation'); - } - - following = state.input.charCodeAt(state.position + 1); - _line = state.line; // Save the current line. - - // - // Explicit notation case. There are two separate blocks: - // first for the key (denoted by "?") and second for the value (denoted by ":") - // - if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { - - if (ch === 0x3F/* ? */) { - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = true; - allowCompact = true; - - } else if (atExplicitKey) { - // i.e. 0x3A/* : */ === character after the explicit key. - atExplicitKey = false; - allowCompact = true; - - } else { - throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); - } - - state.position += 1; - ch = following; - - // - // Implicit notation case. Flow-style node as the key first, then ":", and the value. - // - } else { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - - if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - // Neither implicit nor explicit notation. - // Reading is done. Go to the epilogue. - break; - } - - if (state.line === _line) { - ch = state.input.charCodeAt(state.position); - - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x3A/* : */) { - ch = state.input.charCodeAt(++state.position); - - if (!is_WS_OR_EOL(ch)) { - throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); - } - - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = false; - allowCompact = false; - keyTag = state.tag; - keyNode = state.result; - - } else if (detected) { - throwError(state, 'can not read an implicit mapping pair; a colon is missed'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - - } else if (detected) { - throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - } - - // - // Common reading code for both explicit and implicit notations. - // - if (state.line === _line || state.lineIndent > nodeIndent) { - if (atExplicitKey) { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - } - - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result; - } else { - valueNode = state.result; - } - } - - if (!atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - } - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a mapping entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - // - // Epilogue. - // - - // Special case: last mapping's node contains only the key in explicit notation. - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - } - - // Expose the resulting mapping. - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'mapping'; - state.result = _result; - } - - return detected; -} - -function readTagProperty(state) { - var _position, - isVerbatim = false, - isNamed = false, - tagHandle, - tagName, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x21/* ! */) return false; - - if (state.tag !== null) { - throwError(state, 'duplication of a tag property'); - } - - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x3C/* < */) { - isVerbatim = true; - ch = state.input.charCodeAt(++state.position); - - } else if (ch === 0x21/* ! */) { - isNamed = true; - tagHandle = '!!'; - ch = state.input.charCodeAt(++state.position); - - } else { - tagHandle = '!'; - } - - _position = state.position; - - if (isVerbatim) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && ch !== 0x3E/* > */); - - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position); - ch = state.input.charCodeAt(++state.position); - } else { - throwError(state, 'unexpected end of the stream within a verbatim tag'); - } - } else { - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - - if (ch === 0x21/* ! */) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1); - - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, 'named tag handle cannot contain such characters'); - } - - isNamed = true; - _position = state.position + 1; - } else { - throwError(state, 'tag suffix cannot contain exclamation marks'); - } - } - - ch = state.input.charCodeAt(++state.position); - } - - tagName = state.input.slice(_position, state.position); - - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, 'tag suffix cannot contain flow indicator characters'); - } - } - - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, 'tag name cannot contain such characters: ' + tagName); - } - - try { - tagName = decodeURIComponent(tagName); - } catch (err) { - throwError(state, 'tag name is malformed: ' + tagName); - } - - if (isVerbatim) { - state.tag = tagName; - - } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName; - - } else if (tagHandle === '!') { - state.tag = '!' + tagName; - - } else if (tagHandle === '!!') { - state.tag = 'tag:yaml.org,2002:' + tagName; - - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"'); - } - - return true; -} - -function readAnchorProperty(state) { - var _position, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x26/* & */) return false; - - if (state.anchor !== null) { - throwError(state, 'duplication of an anchor property'); - } - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an anchor node must contain at least one character'); - } - - state.anchor = state.input.slice(_position, state.position); - return true; -} - -function readAlias(state) { - var _position, alias, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x2A/* * */) return false; - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an alias node must contain at least one character'); - } - - alias = state.input.slice(_position, state.position); - - if (!_hasOwnProperty.call(state.anchorMap, alias)) { - throwError(state, 'unidentified alias "' + alias + '"'); - } - - state.result = state.anchorMap[alias]; - skipSeparationSpace(state, true, -1); - return true; -} - -function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, - allowBlockScalars, - allowBlockCollections, - indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } - } - - if (indentStatus === 1) { - while (readTagProperty(state) || readAnchorProperty(state)) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true; - allowBlockCollections = allowBlockStyles; - - if (state.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } else { - allowBlockCollections = false; - } - } - } - - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } - - blockIndent = state.position - state.lineStart; - - if (indentStatus === 1) { - if (allowBlockCollections && - (readBlockSequence(state, blockIndent) || - readBlockMapping(state, blockIndent, flowIndent)) || - readFlowCollection(state, flowIndent)) { - hasContent = true; - } else { - if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || - readSingleQuotedScalar(state, flowIndent) || - readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true; - - } else if (readAlias(state)) { - hasContent = true; - - if (state.tag !== null || state.anchor !== null) { - throwError(state, 'alias node should not have any properties'); - } - - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true; - - if (state.tag === null) { - state.tag = '?'; - } - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } else if (indentStatus === 0) { - // Special case: block sequences are allowed to have same indentation level as the parent. - // http://www.yaml.org/spec/1.2/spec.html#id2799784 - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); - } - } - - if (state.tag === null) { - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - - } else if (state.tag === '?') { - // Implicit resolving is not allowed for non-scalar types, and '?' - // non-specific tag is only automatically assigned to plain scalars. - // - // We only need to check kind conformity in case user explicitly assigns '?' - // tag, for example like this: "! [0]" - // - if (state.result !== null && state.kind !== 'scalar') { - throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); - } - - for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type = state.implicitTypes[typeIndex]; - - if (type.resolve(state.result)) { // `state.result` updated in resolver if matched - state.result = type.construct(state.result); - state.tag = type.tag; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - break; - } - } - } else if (state.tag !== '!') { - if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { - type = state.typeMap[state.kind || 'fallback'][state.tag]; - } else { - // looking for multi type - type = null; - typeList = state.typeMap.multi[state.kind || 'fallback']; - - for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { - if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { - type = typeList[typeIndex]; - break; - } - } - } - - if (!type) { - throwError(state, 'unknown tag !<' + state.tag + '>'); - } - - if (state.result !== null && type.kind !== state.kind) { - throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); - } - - if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched - throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); - } else { - state.result = type.construct(state.result, state.tag); - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } - - if (state.listener !== null) { - state.listener('close', state); - } - return state.tag !== null || state.anchor !== null || hasContent; -} - -function readDocument(state) { - var documentStart = state.position, - _position, - directiveName, - directiveArgs, - hasDirectives = false, - ch; - - state.version = null; - state.checkLineBreaks = state.legacy; - state.tagMap = Object.create(null); - state.anchorMap = Object.create(null); - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if (state.lineIndent > 0 || ch !== 0x25/* % */) { - break; - } - - hasDirectives = true; - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveName = state.input.slice(_position, state.position); - directiveArgs = []; - - if (directiveName.length < 1) { - throwError(state, 'directive name must not be less than one character in length'); - } - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && !is_EOL(ch)); - break; - } - - if (is_EOL(ch)) break; - - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveArgs.push(state.input.slice(_position, state.position)); - } - - if (ch !== 0) readLineBreak(state); - - if (_hasOwnProperty.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs); - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"'); - } - } - - skipSeparationSpace(state, true, -1); - - if (state.lineIndent === 0 && - state.input.charCodeAt(state.position) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - - } else if (hasDirectives) { - throwError(state, 'directives end mark is expected'); - } - - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state, true, -1); - - if (state.checkLineBreaks && - PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, 'non-ASCII line breaks are interpreted as content'); - } - - state.documents.push(state.result); - - if (state.position === state.lineStart && testDocumentSeparator(state)) { - - if (state.input.charCodeAt(state.position) === 0x2E/* . */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - } - return; - } - - if (state.position < (state.length - 1)) { - throwError(state, 'end of the stream or a document separator is expected'); - } else { - return; - } -} - - -function loadDocuments(input, options) { - input = String(input); - options = options || {}; - - if (input.length !== 0) { - - // Add tailing `\n` if not exists - if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && - input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { - input += '\n'; - } - - // Strip BOM - if (input.charCodeAt(0) === 0xFEFF) { - input = input.slice(1); - } - } - - var state = new State(input, options); - - var nullpos = input.indexOf('\0'); - - if (nullpos !== -1) { - state.position = nullpos; - throwError(state, 'null byte is not allowed in input'); - } - - // Use 0 as string terminator. That significantly simplifies bounds check. - state.input += '\0'; - - while (state.input.charCodeAt(state.position) === 0x20/* Space */) { - state.lineIndent += 1; - state.position += 1; - } - - while (state.position < (state.length - 1)) { - readDocument(state); - } - - return state.documents; -} - - -function loadAll(input, iterator, options) { - if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { - options = iterator; - iterator = null; - } - - var documents = loadDocuments(input, options); - - if (typeof iterator !== 'function') { - return documents; - } - - for (var index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]); - } -} - - -function load(input, options) { - var documents = loadDocuments(input, options); - - if (documents.length === 0) { - /*eslint-disable no-undefined*/ - return undefined; - } else if (documents.length === 1) { - return documents[0]; - } - throw new YAMLException('expected a single document in the stream, but found more'); -} - - -module.exports.loadAll = loadAll; -module.exports.load = load; diff --git a/node_modules/js-yaml/lib/schema.js b/node_modules/js-yaml/lib/schema.js deleted file mode 100644 index 65b41f40..00000000 --- a/node_modules/js-yaml/lib/schema.js +++ /dev/null @@ -1,121 +0,0 @@ -'use strict'; - -/*eslint-disable max-len*/ - -var YAMLException = require('./exception'); -var Type = require('./type'); - - -function compileList(schema, name) { - var result = []; - - schema[name].forEach(function (currentType) { - var newIndex = result.length; - - result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag && - previousType.kind === currentType.kind && - previousType.multi === currentType.multi) { - - newIndex = previousIndex; - } - }); - - result[newIndex] = currentType; - }); - - return result; -} - - -function compileMap(/* lists... */) { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] - } - }, index, length; - - function collectType(type) { - if (type.multi) { - result.multi[type.kind].push(type); - result.multi['fallback'].push(type); - } else { - result[type.kind][type.tag] = result['fallback'][type.tag] = type; - } - } - - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); - } - return result; -} - - -function Schema(definition) { - return this.extend(definition); -} - - -Schema.prototype.extend = function extend(definition) { - var implicit = []; - var explicit = []; - - if (definition instanceof Type) { - // Schema.extend(type) - explicit.push(definition); - - } else if (Array.isArray(definition)) { - // Schema.extend([ type1, type2, ... ]) - explicit = explicit.concat(definition); - - } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { - // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) - if (definition.implicit) implicit = implicit.concat(definition.implicit); - if (definition.explicit) explicit = explicit.concat(definition.explicit); - - } else { - throw new YAMLException('Schema.extend argument should be a Type, [ Type ], ' + - 'or a schema definition ({ implicit: [...], explicit: [...] })'); - } - - implicit.forEach(function (type) { - if (!(type instanceof Type)) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - - if (type.loadKind && type.loadKind !== 'scalar') { - throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); - } - - if (type.multi) { - throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.'); - } - }); - - explicit.forEach(function (type) { - if (!(type instanceof Type)) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - }); - - var result = Object.create(Schema.prototype); - - result.implicit = (this.implicit || []).concat(implicit); - result.explicit = (this.explicit || []).concat(explicit); - - result.compiledImplicit = compileList(result, 'implicit'); - result.compiledExplicit = compileList(result, 'explicit'); - result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); - - return result; -}; - - -module.exports = Schema; diff --git a/node_modules/js-yaml/lib/schema/core.js b/node_modules/js-yaml/lib/schema/core.js deleted file mode 100644 index 608b26de..00000000 --- a/node_modules/js-yaml/lib/schema/core.js +++ /dev/null @@ -1,11 +0,0 @@ -// Standard YAML's Core schema. -// http://www.yaml.org/spec/1.2/spec.html#id2804923 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, Core schema has no distinctions from JSON schema is JS-YAML. - - -'use strict'; - - -module.exports = require('./json'); diff --git a/node_modules/js-yaml/lib/schema/default.js b/node_modules/js-yaml/lib/schema/default.js deleted file mode 100644 index 3af0520d..00000000 --- a/node_modules/js-yaml/lib/schema/default.js +++ /dev/null @@ -1,22 +0,0 @@ -// JS-YAML's default schema for `safeLoad` function. -// It is not described in the YAML specification. -// -// This schema is based on standard YAML's Core schema and includes most of -// extra types described at YAML tag repository. (http://yaml.org/type/) - - -'use strict'; - - -module.exports = require('./core').extend({ - implicit: [ - require('../type/timestamp'), - require('../type/merge') - ], - explicit: [ - require('../type/binary'), - require('../type/omap'), - require('../type/pairs'), - require('../type/set') - ] -}); diff --git a/node_modules/js-yaml/lib/schema/failsafe.js b/node_modules/js-yaml/lib/schema/failsafe.js deleted file mode 100644 index b7a33eb7..00000000 --- a/node_modules/js-yaml/lib/schema/failsafe.js +++ /dev/null @@ -1,17 +0,0 @@ -// Standard YAML's Failsafe schema. -// http://www.yaml.org/spec/1.2/spec.html#id2802346 - - -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = new Schema({ - explicit: [ - require('../type/str'), - require('../type/seq'), - require('../type/map') - ] -}); diff --git a/node_modules/js-yaml/lib/schema/json.js b/node_modules/js-yaml/lib/schema/json.js deleted file mode 100644 index b73df78e..00000000 --- a/node_modules/js-yaml/lib/schema/json.js +++ /dev/null @@ -1,19 +0,0 @@ -// Standard YAML's JSON schema. -// http://www.yaml.org/spec/1.2/spec.html#id2803231 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, this schema is not such strict as defined in the YAML specification. -// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. - - -'use strict'; - - -module.exports = require('./failsafe').extend({ - implicit: [ - require('../type/null'), - require('../type/bool'), - require('../type/int'), - require('../type/float') - ] -}); diff --git a/node_modules/js-yaml/lib/snippet.js b/node_modules/js-yaml/lib/snippet.js deleted file mode 100644 index 00e2133c..00000000 --- a/node_modules/js-yaml/lib/snippet.js +++ /dev/null @@ -1,101 +0,0 @@ -'use strict'; - - -var common = require('./common'); - - -// get snippet for a single line, respecting maxLength -function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { - var head = ''; - var tail = ''; - var maxHalfLength = Math.floor(maxLineLength / 2) - 1; - - if (position - lineStart > maxHalfLength) { - head = ' ... '; - lineStart = position - maxHalfLength + head.length; - } - - if (lineEnd - position > maxHalfLength) { - tail = ' ...'; - lineEnd = position + maxHalfLength - tail.length; - } - - return { - str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, - pos: position - lineStart + head.length // relative position - }; -} - - -function padStart(string, max) { - return common.repeat(' ', max - string.length) + string; -} - - -function makeSnippet(mark, options) { - options = Object.create(options || null); - - if (!mark.buffer) return null; - - if (!options.maxLength) options.maxLength = 79; - if (typeof options.indent !== 'number') options.indent = 1; - if (typeof options.linesBefore !== 'number') options.linesBefore = 3; - if (typeof options.linesAfter !== 'number') options.linesAfter = 2; - - var re = /\r?\n|\r|\0/g; - var lineStarts = [ 0 ]; - var lineEnds = []; - var match; - var foundLineNo = -1; - - while ((match = re.exec(mark.buffer))) { - lineEnds.push(match.index); - lineStarts.push(match.index + match[0].length); - - if (mark.position <= match.index && foundLineNo < 0) { - foundLineNo = lineStarts.length - 2; - } - } - - if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; - - var result = '', i, line; - var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; - var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); - - for (i = 1; i <= options.linesBefore; i++) { - if (foundLineNo - i < 0) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo - i], - lineEnds[foundLineNo - i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), - maxLineLength - ); - result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n' + result; - } - - line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); - result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n'; - result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'; - - for (i = 1; i <= options.linesAfter; i++) { - if (foundLineNo + i >= lineEnds.length) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo + i], - lineEnds[foundLineNo + i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), - maxLineLength - ); - result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n'; - } - - return result.replace(/\n$/, ''); -} - - -module.exports = makeSnippet; diff --git a/node_modules/js-yaml/lib/type.js b/node_modules/js-yaml/lib/type.js deleted file mode 100644 index 5e57877f..00000000 --- a/node_modules/js-yaml/lib/type.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -var YAMLException = require('./exception'); - -var TYPE_CONSTRUCTOR_OPTIONS = [ - 'kind', - 'multi', - 'resolve', - 'construct', - 'instanceOf', - 'predicate', - 'represent', - 'representName', - 'defaultStyle', - 'styleAliases' -]; - -var YAML_NODE_KINDS = [ - 'scalar', - 'sequence', - 'mapping' -]; - -function compileStyleAliases(map) { - var result = {}; - - if (map !== null) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style; - }); - }); - } - - return result; -} - -function Type(tag, options) { - options = options || {}; - - Object.keys(options).forEach(function (name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); - } - }); - - // TODO: Add tag format check. - this.options = options; // keep original options in case user wants to extend this type later - this.tag = tag; - this.kind = options['kind'] || null; - this.resolve = options['resolve'] || function () { return true; }; - this.construct = options['construct'] || function (data) { return data; }; - this.instanceOf = options['instanceOf'] || null; - this.predicate = options['predicate'] || null; - this.represent = options['represent'] || null; - this.representName = options['representName'] || null; - this.defaultStyle = options['defaultStyle'] || null; - this.multi = options['multi'] || false; - this.styleAliases = compileStyleAliases(options['styleAliases'] || null); - - if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { - throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } -} - -module.exports = Type; diff --git a/node_modules/js-yaml/lib/type/binary.js b/node_modules/js-yaml/lib/type/binary.js deleted file mode 100644 index e1523513..00000000 --- a/node_modules/js-yaml/lib/type/binary.js +++ /dev/null @@ -1,125 +0,0 @@ -'use strict'; - -/*eslint-disable no-bitwise*/ - - -var Type = require('../type'); - - -// [ 64, 65, 66 ] -> [ padding, CR, LF ] -var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; - - -function resolveYamlBinary(data) { - if (data === null) return false; - - var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; - - // Convert one by one. - for (idx = 0; idx < max; idx++) { - code = map.indexOf(data.charAt(idx)); - - // Skip CR/LF - if (code > 64) continue; - - // Fail on illegal characters - if (code < 0) return false; - - bitlen += 6; - } - - // If there are any bits left, source was corrupted - return (bitlen % 8) === 0; -} - -function constructYamlBinary(data) { - var idx, tailbits, - input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan - max = input.length, - map = BASE64_MAP, - bits = 0, - result = []; - - // Collect by 6*4 bits (3 bytes) - - for (idx = 0; idx < max; idx++) { - if ((idx % 4 === 0) && idx) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } - - bits = (bits << 6) | map.indexOf(input.charAt(idx)); - } - - // Dump tail - - tailbits = (max % 4) * 6; - - if (tailbits === 0) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } else if (tailbits === 18) { - result.push((bits >> 10) & 0xFF); - result.push((bits >> 2) & 0xFF); - } else if (tailbits === 12) { - result.push((bits >> 4) & 0xFF); - } - - return new Uint8Array(result); -} - -function representYamlBinary(object /*, style*/) { - var result = '', bits = 0, idx, tail, - max = object.length, - map = BASE64_MAP; - - // Convert every three bytes to 4 ASCII characters. - - for (idx = 0; idx < max; idx++) { - if ((idx % 3 === 0) && idx) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } - - bits = (bits << 8) + object[idx]; - } - - // Dump tail - - tail = max % 3; - - if (tail === 0) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } else if (tail === 2) { - result += map[(bits >> 10) & 0x3F]; - result += map[(bits >> 4) & 0x3F]; - result += map[(bits << 2) & 0x3F]; - result += map[64]; - } else if (tail === 1) { - result += map[(bits >> 2) & 0x3F]; - result += map[(bits << 4) & 0x3F]; - result += map[64]; - result += map[64]; - } - - return result; -} - -function isBinary(obj) { - return Object.prototype.toString.call(obj) === '[object Uint8Array]'; -} - -module.exports = new Type('tag:yaml.org,2002:binary', { - kind: 'scalar', - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}); diff --git a/node_modules/js-yaml/lib/type/bool.js b/node_modules/js-yaml/lib/type/bool.js deleted file mode 100644 index cb774593..00000000 --- a/node_modules/js-yaml/lib/type/bool.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -function resolveYamlBoolean(data) { - if (data === null) return false; - - var max = data.length; - - return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || - (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); -} - -function constructYamlBoolean(data) { - return data === 'true' || - data === 'True' || - data === 'TRUE'; -} - -function isBoolean(object) { - return Object.prototype.toString.call(object) === '[object Boolean]'; -} - -module.exports = new Type('tag:yaml.org,2002:bool', { - kind: 'scalar', - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: function (object) { return object ? 'true' : 'false'; }, - uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, - camelcase: function (object) { return object ? 'True' : 'False'; } - }, - defaultStyle: 'lowercase' -}); diff --git a/node_modules/js-yaml/lib/type/float.js b/node_modules/js-yaml/lib/type/float.js deleted file mode 100644 index 74d77ec2..00000000 --- a/node_modules/js-yaml/lib/type/float.js +++ /dev/null @@ -1,97 +0,0 @@ -'use strict'; - -var common = require('../common'); -var Type = require('../type'); - -var YAML_FLOAT_PATTERN = new RegExp( - // 2.5e4, 2.5 and integers - '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + - // .2e4, .2 - // special case, seems not from spec - '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + - // .inf - '|[-+]?\\.(?:inf|Inf|INF)' + - // .nan - '|\\.(?:nan|NaN|NAN))$'); - -function resolveYamlFloat(data) { - if (data === null) return false; - - if (!YAML_FLOAT_PATTERN.test(data) || - // Quick hack to not allow integers end with `_` - // Probably should update regexp & check speed - data[data.length - 1] === '_') { - return false; - } - - return true; -} - -function constructYamlFloat(data) { - var value, sign; - - value = data.replace(/_/g, '').toLowerCase(); - sign = value[0] === '-' ? -1 : 1; - - if ('+-'.indexOf(value[0]) >= 0) { - value = value.slice(1); - } - - if (value === '.inf') { - return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; - - } else if (value === '.nan') { - return NaN; - } - return sign * parseFloat(value, 10); -} - - -var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; - -function representYamlFloat(object, style) { - var res; - - if (isNaN(object)) { - switch (style) { - case 'lowercase': return '.nan'; - case 'uppercase': return '.NAN'; - case 'camelcase': return '.NaN'; - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '.inf'; - case 'uppercase': return '.INF'; - case 'camelcase': return '.Inf'; - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '-.inf'; - case 'uppercase': return '-.INF'; - case 'camelcase': return '-.Inf'; - } - } else if (common.isNegativeZero(object)) { - return '-0.0'; - } - - res = object.toString(10); - - // JS stringifier can build scientific format without dots: 5e-100, - // while YAML requres dot: 5.e-100. Fix it with simple hack - - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; -} - -function isFloat(object) { - return (Object.prototype.toString.call(object) === '[object Number]') && - (object % 1 !== 0 || common.isNegativeZero(object)); -} - -module.exports = new Type('tag:yaml.org,2002:float', { - kind: 'scalar', - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: 'lowercase' -}); diff --git a/node_modules/js-yaml/lib/type/int.js b/node_modules/js-yaml/lib/type/int.js deleted file mode 100644 index 3fe3a443..00000000 --- a/node_modules/js-yaml/lib/type/int.js +++ /dev/null @@ -1,156 +0,0 @@ -'use strict'; - -var common = require('../common'); -var Type = require('../type'); - -function isHexCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || - ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || - ((0x61/* a */ <= c) && (c <= 0x66/* f */)); -} - -function isOctCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); -} - -function isDecCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); -} - -function resolveYamlInteger(data) { - if (data === null) return false; - - var max = data.length, - index = 0, - hasDigits = false, - ch; - - if (!max) return false; - - ch = data[index]; - - // sign - if (ch === '-' || ch === '+') { - ch = data[++index]; - } - - if (ch === '0') { - // 0 - if (index + 1 === max) return true; - ch = data[++index]; - - // base 2, base 8, base 16 - - if (ch === 'b') { - // base 2 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (ch !== '0' && ch !== '1') return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - - if (ch === 'x') { - // base 16 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isHexCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - - if (ch === 'o') { - // base 8 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isOctCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - } - - // base 10 (except 0) - - // value should not start with `_`; - if (ch === '_') return false; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isDecCode(data.charCodeAt(index))) { - return false; - } - hasDigits = true; - } - - // Should have digits and should not end with `_` - if (!hasDigits || ch === '_') return false; - - return true; -} - -function constructYamlInteger(data) { - var value = data, sign = 1, ch; - - if (value.indexOf('_') !== -1) { - value = value.replace(/_/g, ''); - } - - ch = value[0]; - - if (ch === '-' || ch === '+') { - if (ch === '-') sign = -1; - value = value.slice(1); - ch = value[0]; - } - - if (value === '0') return 0; - - if (ch === '0') { - if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); - if (value[1] === 'x') return sign * parseInt(value.slice(2), 16); - if (value[1] === 'o') return sign * parseInt(value.slice(2), 8); - } - - return sign * parseInt(value, 10); -} - -function isInteger(object) { - return (Object.prototype.toString.call(object)) === '[object Number]' && - (object % 1 === 0 && !common.isNegativeZero(object)); -} - -module.exports = new Type('tag:yaml.org,2002:int', { - kind: 'scalar', - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, - octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); }, - decimal: function (obj) { return obj.toString(10); }, - /* eslint-disable max-len */ - hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } - }, - defaultStyle: 'decimal', - styleAliases: { - binary: [ 2, 'bin' ], - octal: [ 8, 'oct' ], - decimal: [ 10, 'dec' ], - hexadecimal: [ 16, 'hex' ] - } -}); diff --git a/node_modules/js-yaml/lib/type/map.js b/node_modules/js-yaml/lib/type/map.js deleted file mode 100644 index f327beeb..00000000 --- a/node_modules/js-yaml/lib/type/map.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -module.exports = new Type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return data !== null ? data : {}; } -}); diff --git a/node_modules/js-yaml/lib/type/merge.js b/node_modules/js-yaml/lib/type/merge.js deleted file mode 100644 index ae08a864..00000000 --- a/node_modules/js-yaml/lib/type/merge.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -function resolveYamlMerge(data) { - return data === '<<' || data === null; -} - -module.exports = new Type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge -}); diff --git a/node_modules/js-yaml/lib/type/null.js b/node_modules/js-yaml/lib/type/null.js deleted file mode 100644 index 315ca4e2..00000000 --- a/node_modules/js-yaml/lib/type/null.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -function resolveYamlNull(data) { - if (data === null) return true; - - var max = data.length; - - return (max === 1 && data === '~') || - (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); -} - -function constructYamlNull() { - return null; -} - -function isNull(object) { - return object === null; -} - -module.exports = new Type('tag:yaml.org,2002:null', { - kind: 'scalar', - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function () { return '~'; }, - lowercase: function () { return 'null'; }, - uppercase: function () { return 'NULL'; }, - camelcase: function () { return 'Null'; }, - empty: function () { return ''; } - }, - defaultStyle: 'lowercase' -}); diff --git a/node_modules/js-yaml/lib/type/omap.js b/node_modules/js-yaml/lib/type/omap.js deleted file mode 100644 index b2b5323b..00000000 --- a/node_modules/js-yaml/lib/type/omap.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -var _hasOwnProperty = Object.prototype.hasOwnProperty; -var _toString = Object.prototype.toString; - -function resolveYamlOmap(data) { - if (data === null) return true; - - var objectKeys = [], index, length, pair, pairKey, pairHasKey, - object = data; - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - pairHasKey = false; - - if (_toString.call(pair) !== '[object Object]') return false; - - for (pairKey in pair) { - if (_hasOwnProperty.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true; - else return false; - } - } - - if (!pairHasKey) return false; - - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); - else return false; - } - - return true; -} - -function constructYamlOmap(data) { - return data !== null ? data : []; -} - -module.exports = new Type('tag:yaml.org,2002:omap', { - kind: 'sequence', - resolve: resolveYamlOmap, - construct: constructYamlOmap -}); diff --git a/node_modules/js-yaml/lib/type/pairs.js b/node_modules/js-yaml/lib/type/pairs.js deleted file mode 100644 index 74b52403..00000000 --- a/node_modules/js-yaml/lib/type/pairs.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -var _toString = Object.prototype.toString; - -function resolveYamlPairs(data) { - if (data === null) return true; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - if (_toString.call(pair) !== '[object Object]') return false; - - keys = Object.keys(pair); - - if (keys.length !== 1) return false; - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return true; -} - -function constructYamlPairs(data) { - if (data === null) return []; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - keys = Object.keys(pair); - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return result; -} - -module.exports = new Type('tag:yaml.org,2002:pairs', { - kind: 'sequence', - resolve: resolveYamlPairs, - construct: constructYamlPairs -}); diff --git a/node_modules/js-yaml/lib/type/seq.js b/node_modules/js-yaml/lib/type/seq.js deleted file mode 100644 index be8f77f2..00000000 --- a/node_modules/js-yaml/lib/type/seq.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -module.exports = new Type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return data !== null ? data : []; } -}); diff --git a/node_modules/js-yaml/lib/type/set.js b/node_modules/js-yaml/lib/type/set.js deleted file mode 100644 index f885a329..00000000 --- a/node_modules/js-yaml/lib/type/set.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - -function resolveYamlSet(data) { - if (data === null) return true; - - var key, object = data; - - for (key in object) { - if (_hasOwnProperty.call(object, key)) { - if (object[key] !== null) return false; - } - } - - return true; -} - -function constructYamlSet(data) { - return data !== null ? data : {}; -} - -module.exports = new Type('tag:yaml.org,2002:set', { - kind: 'mapping', - resolve: resolveYamlSet, - construct: constructYamlSet -}); diff --git a/node_modules/js-yaml/lib/type/str.js b/node_modules/js-yaml/lib/type/str.js deleted file mode 100644 index 27acc106..00000000 --- a/node_modules/js-yaml/lib/type/str.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -module.exports = new Type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return data !== null ? data : ''; } -}); diff --git a/node_modules/js-yaml/lib/type/timestamp.js b/node_modules/js-yaml/lib/type/timestamp.js deleted file mode 100644 index 8fa9c586..00000000 --- a/node_modules/js-yaml/lib/type/timestamp.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -var YAML_DATE_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9])' + // [2] month - '-([0-9][0-9])$'); // [3] day - -var YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour - '(?::([0-9][0-9]))?))?$'); // [11] tz_minute - -function resolveYamlTimestamp(data) { - if (data === null) return false; - if (YAML_DATE_REGEXP.exec(data) !== null) return true; - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; - return false; -} - -function constructYamlTimestamp(data) { - var match, year, month, day, hour, minute, second, fraction = 0, - delta = null, tz_hour, tz_minute, date; - - match = YAML_DATE_REGEXP.exec(data); - if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); - - if (match === null) throw new Error('Date resolve error'); - - // match: [1] year [2] month [3] day - - year = +(match[1]); - month = +(match[2]) - 1; // JS month starts with 0 - day = +(match[3]); - - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)); - } - - // match: [4] hour [5] minute [6] second [7] fraction - - hour = +(match[4]); - minute = +(match[5]); - second = +(match[6]); - - if (match[7]) { - fraction = match[7].slice(0, 3); - while (fraction.length < 3) { // milli-seconds - fraction += '0'; - } - fraction = +fraction; - } - - // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute - - if (match[9]) { - tz_hour = +(match[10]); - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds - if (match[9] === '-') delta = -delta; - } - - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - - if (delta) date.setTime(date.getTime() - delta); - - return date; -} - -function representYamlTimestamp(object /*, style*/) { - return object.toISOString(); -} - -module.exports = new Type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}); diff --git a/node_modules/js-yaml/package.json b/node_modules/js-yaml/package.json deleted file mode 100644 index fd73991e..00000000 --- a/node_modules/js-yaml/package.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "_from": "js-yaml@~4.1", - "_id": "js-yaml@4.1.0", - "_inBundle": false, - "_integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "_location": "/js-yaml", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "js-yaml@~4.1", - "name": "js-yaml", - "escapedName": "js-yaml", - "rawSpec": "~4.1", - "saveSpec": null, - "fetchSpec": "~4.1" - }, - "_requiredBy": [ - "/@antora/content-aggregator", - "/@antora/playbook-builder", - "/@antora/ui-loader" - ], - "_resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "_shasum": "c1fb65f8f5017901cdd2c951864ba18458a10602", - "_spec": "js-yaml@~4.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/playbook-builder", - "author": { - "name": "Vladimir Zapparov", - "email": "dervus.grim@gmail.com" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - }, - "bugs": { - "url": "https://github.com/nodeca/js-yaml/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Aleksey V Zapparov", - "email": "ixti@member.fsf.org", - "url": "http://www.ixti.net/" - }, - { - "name": "Vitaly Puzrin", - "email": "vitaly@rcdesign.ru", - "url": "https://github.com/puzrin" - }, - { - "name": "Martin Grenfell", - "email": "martin.grenfell@gmail.com", - "url": "http://got-ravings.blogspot.com" - } - ], - "dependencies": { - "argparse": "^2.0.1" - }, - "deprecated": false, - "description": "YAML 1.2 parser and serializer", - "devDependencies": { - "@rollup/plugin-commonjs": "^17.0.0", - "@rollup/plugin-node-resolve": "^11.0.0", - "ansi": "^0.3.1", - "benchmark": "^2.1.4", - "codemirror": "^5.13.4", - "eslint": "^7.0.0", - "fast-check": "^2.8.0", - "gh-pages": "^3.1.0", - "mocha": "^8.2.1", - "nyc": "^15.1.0", - "rollup": "^2.34.1", - "rollup-plugin-node-polyfills": "^0.2.1", - "rollup-plugin-terser": "^7.0.2", - "shelljs": "^0.8.4" - }, - "exports": { - ".": { - "import": "./dist/js-yaml.mjs", - "require": "./index.js" - }, - "./package.json": "./package.json" - }, - "files": [ - "index.js", - "lib/", - "bin/", - "dist/" - ], - "homepage": "https://github.com/nodeca/js-yaml#readme", - "jsdelivr": "dist/js-yaml.min.js", - "keywords": [ - "yaml", - "parser", - "serializer", - "pyyaml" - ], - "license": "MIT", - "module": "./dist/js-yaml.mjs", - "name": "js-yaml", - "repository": { - "type": "git", - "url": "git+https://github.com/nodeca/js-yaml.git" - }, - "scripts": { - "browserify": "rollup -c support/rollup.config.js", - "coverage": "npm run lint && nyc mocha && nyc report --reporter html", - "demo": "npm run lint && node support/build_demo.js", - "gh-demo": "npm run demo && gh-pages -d demo -f", - "lint": "eslint .", - "prepublishOnly": "npm run gh-demo", - "test": "npm run lint && mocha" - }, - "unpkg": "dist/js-yaml.min.js", - "version": "4.1.0" -} diff --git a/node_modules/json-stable-stringify-without-jsonify/.npmignore b/node_modules/json-stable-stringify-without-jsonify/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/json-stable-stringify-without-jsonify/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/json-stable-stringify-without-jsonify/.travis.yml b/node_modules/json-stable-stringify-without-jsonify/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/json-stable-stringify-without-jsonify/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/json-stable-stringify-without-jsonify/LICENSE b/node_modules/json-stable-stringify-without-jsonify/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/json-stable-stringify-without-jsonify/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js b/node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js deleted file mode 100644 index d5f66752..00000000 --- a/node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js +++ /dev/null @@ -1,7 +0,0 @@ -var stringify = require('../'); - -var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; -var s = stringify(obj, function (a, b) { - return a.key < b.key ? 1 : -1; -}); -console.log(s); diff --git a/node_modules/json-stable-stringify-without-jsonify/example/nested.js b/node_modules/json-stable-stringify-without-jsonify/example/nested.js deleted file mode 100644 index 9a672fc6..00000000 --- a/node_modules/json-stable-stringify-without-jsonify/example/nested.js +++ /dev/null @@ -1,3 +0,0 @@ -var stringify = require('../'); -var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; -console.log(stringify(obj)); diff --git a/node_modules/json-stable-stringify-without-jsonify/example/str.js b/node_modules/json-stable-stringify-without-jsonify/example/str.js deleted file mode 100644 index 9b4b3cd2..00000000 --- a/node_modules/json-stable-stringify-without-jsonify/example/str.js +++ /dev/null @@ -1,3 +0,0 @@ -var stringify = require('../'); -var obj = { c: 6, b: [4,5], a: 3 }; -console.log(stringify(obj)); diff --git a/node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js b/node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js deleted file mode 100644 index 09f1c5f7..00000000 --- a/node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js +++ /dev/null @@ -1,7 +0,0 @@ -var stringify = require('../'); - -var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 }; -var s = stringify(obj, function (a, b) { - return a.value < b.value ? 1 : -1; -}); -console.log(s); diff --git a/node_modules/json-stable-stringify-without-jsonify/index.js b/node_modules/json-stable-stringify-without-jsonify/index.js deleted file mode 100644 index a6f40c7b..00000000 --- a/node_modules/json-stable-stringify-without-jsonify/index.js +++ /dev/null @@ -1,82 +0,0 @@ -module.exports = function (obj, opts) { - if (!opts) opts = {}; - if (typeof opts === 'function') opts = { cmp: opts }; - var space = opts.space || ''; - if (typeof space === 'number') space = Array(space+1).join(' '); - var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; - var replacer = opts.replacer || function(key, value) { return value; }; - - var cmp = opts.cmp && (function (f) { - return function (node) { - return function (a, b) { - var aobj = { key: a, value: node[a] }; - var bobj = { key: b, value: node[b] }; - return f(aobj, bobj); - }; - }; - })(opts.cmp); - - var seen = []; - return (function stringify (parent, key, node, level) { - var indent = space ? ('\n' + new Array(level + 1).join(space)) : ''; - var colonSeparator = space ? ': ' : ':'; - - if (node && node.toJSON && typeof node.toJSON === 'function') { - node = node.toJSON(); - } - - node = replacer.call(parent, key, node); - - if (node === undefined) { - return; - } - if (typeof node !== 'object' || node === null) { - return JSON.stringify(node); - } - if (isArray(node)) { - var out = []; - for (var i = 0; i < node.length; i++) { - var item = stringify(node, i, node[i], level+1) || JSON.stringify(null); - out.push(indent + space + item); - } - return '[' + out.join(',') + indent + ']'; - } - else { - if (seen.indexOf(node) !== -1) { - if (cycles) return JSON.stringify('__cycle__'); - throw new TypeError('Converting circular structure to JSON'); - } - else seen.push(node); - - var keys = objectKeys(node).sort(cmp && cmp(node)); - var out = []; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = stringify(node, key, node[key], level+1); - - if(!value) continue; - - var keyValue = JSON.stringify(key) - + colonSeparator - + value; - ; - out.push(indent + space + keyValue); - } - seen.splice(seen.indexOf(node), 1); - return '{' + out.join(',') + indent + '}'; - } - })({ '': obj }, '', obj, 0); -}; - -var isArray = Array.isArray || function (x) { - return {}.toString.call(x) === '[object Array]'; -}; - -var objectKeys = Object.keys || function (obj) { - var has = Object.prototype.hasOwnProperty || function () { return true }; - var keys = []; - for (var key in obj) { - if (has.call(obj, key)) keys.push(key); - } - return keys; -}; diff --git a/node_modules/json-stable-stringify-without-jsonify/package.json b/node_modules/json-stable-stringify-without-jsonify/package.json deleted file mode 100644 index 604b7db8..00000000 --- a/node_modules/json-stable-stringify-without-jsonify/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "_from": "json-stable-stringify-without-jsonify@^1.0.1", - "_id": "json-stable-stringify-without-jsonify@1.0.1", - "_inBundle": false, - "_integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "_location": "/json-stable-stringify-without-jsonify", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "json-stable-stringify-without-jsonify@^1.0.1", - "name": "json-stable-stringify-without-jsonify", - "escapedName": "json-stable-stringify-without-jsonify", - "rawSpec": "^1.0.1", - "saveSpec": null, - "fetchSpec": "^1.0.1" - }, - "_requiredBy": [ - "/unique-stream" - ], - "_resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "_shasum": "9db7b59496ad3f3cfef30a75142d2d930ad72651", - "_spec": "json-stable-stringify-without-jsonify@^1.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/unique-stream", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/samn/json-stable-stringify/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results, with no public domain dependencies", - "devDependencies": { - "tape": "~1.0.4" - }, - "homepage": "https://github.com/samn/json-stable-stringify", - "keywords": [ - "json", - "stringify", - "deterministic", - "hash", - "sort", - "stable" - ], - "license": "MIT", - "main": "index.js", - "name": "json-stable-stringify-without-jsonify", - "repository": { - "type": "git", - "url": "git://github.com/samn/json-stable-stringify.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "ff/5", - "ff/latest", - "chrome/15", - "chrome/latest", - "safari/latest", - "opera/latest" - ] - }, - "version": "1.0.1" -} diff --git a/node_modules/json-stable-stringify-without-jsonify/readme.markdown b/node_modules/json-stable-stringify-without-jsonify/readme.markdown deleted file mode 100644 index e95b468a..00000000 --- a/node_modules/json-stable-stringify-without-jsonify/readme.markdown +++ /dev/null @@ -1,132 +0,0 @@ -# json-stable-stringify - -This is the same as https://github.com/substack/json-stable-stringify but it doesn't depend on libraries without licenses (jsonify). - -deterministic version of `JSON.stringify()` so you can get a consistent hash -from stringified results - -You can also pass in a custom comparison function. - -[![browser support](https://ci.testling.com/substack/json-stable-stringify.png)](https://ci.testling.com/substack/json-stable-stringify) - -[![build status](https://secure.travis-ci.org/substack/json-stable-stringify.png)](http://travis-ci.org/substack/json-stable-stringify) - -# example - -``` js -var stringify = require('json-stable-stringify'); -var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; -console.log(stringify(obj)); -``` - -output: - -``` -{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8} -``` - -# methods - -``` js -var stringify = require('json-stable-stringify') -``` - -## var str = stringify(obj, opts) - -Return a deterministic stringified string `str` from the object `obj`. - -## options - -### cmp - -If `opts` is given, you can supply an `opts.cmp` to have a custom comparison -function for object keys. Your function `opts.cmp` is called with these -parameters: - -``` js -opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue }) -``` - -For example, to sort on the object key names in reverse order you could write: - -``` js -var stringify = require('json-stable-stringify'); - -var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; -var s = stringify(obj, function (a, b) { - return a.key < b.key ? 1 : -1; -}); -console.log(s); -``` - -which results in the output string: - -``` -{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3} -``` - -Or if you wanted to sort on the object values in reverse order, you could write: - -``` -var stringify = require('json-stable-stringify'); - -var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 }; -var s = stringify(obj, function (a, b) { - return a.value < b.value ? 1 : -1; -}); -console.log(s); -``` - -which outputs: - -``` -{"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10} -``` - -### space - -If you specify `opts.space`, it will indent the output for pretty-printing. -Valid values are strings (e.g. `{space: \t}`) or a number of spaces -(`{space: 3}`). - -For example: - -```js -var obj = { b: 1, a: { foo: 'bar', and: [1, 2, 3] } }; -var s = stringify(obj, { space: ' ' }); -console.log(s); -``` - -which outputs: - -``` -{ - "a": { - "and": [ - 1, - 2, - 3 - ], - "foo": "bar" - }, - "b": 1 -} -``` - -### replacer - -The replacer parameter is a function `opts.replacer(key, value)` that behaves -the same as the replacer -[from the core JSON object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_native_JSON#The_replacer_parameter). - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install json-stable-stringify -``` - -# license - -MIT diff --git a/node_modules/json-stable-stringify-without-jsonify/test/cmp.js b/node_modules/json-stable-stringify-without-jsonify/test/cmp.js deleted file mode 100644 index 2dbb3935..00000000 --- a/node_modules/json-stable-stringify-without-jsonify/test/cmp.js +++ /dev/null @@ -1,11 +0,0 @@ -var test = require('tape'); -var stringify = require('../'); - -test('custom comparison function', function (t) { - t.plan(1); - var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; - var s = stringify(obj, function (a, b) { - return a.key < b.key ? 1 : -1; - }); - t.equal(s, '{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}'); -}); diff --git a/node_modules/json-stable-stringify-without-jsonify/test/nested.js b/node_modules/json-stable-stringify-without-jsonify/test/nested.js deleted file mode 100644 index 052c7d64..00000000 --- a/node_modules/json-stable-stringify-without-jsonify/test/nested.js +++ /dev/null @@ -1,42 +0,0 @@ -var test = require('tape'); -var stringify = require('../'); - -test('nested', function (t) { - t.plan(1); - var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; - t.equal(stringify(obj), '{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}'); -}); - -test('cyclic (default)', function (t) { - t.plan(1); - var one = { a: 1 }; - var two = { a: 2, one: one }; - one.two = two; - try { - stringify(one); - } catch (ex) { - t.equal(ex.toString(), 'TypeError: Converting circular structure to JSON'); - } -}); - -test('cyclic (specifically allowed)', function (t) { - t.plan(1); - var one = { a: 1 }; - var two = { a: 2, one: one }; - one.two = two; - t.equal(stringify(one, {cycles:true}), '{"a":1,"two":{"a":2,"one":"__cycle__"}}'); -}); - -test('repeated non-cyclic value', function(t) { - t.plan(1); - var one = { x: 1 }; - var two = { a: one, b: one }; - t.equal(stringify(two), '{"a":{"x":1},"b":{"x":1}}'); -}); - -test('acyclic but with reused obj-property pointers', function (t) { - t.plan(1); - var x = { a: 1 } - var y = { b: x, c: x } - t.equal(stringify(y), '{"b":{"a":1},"c":{"a":1}}'); -}); diff --git a/node_modules/json-stable-stringify-without-jsonify/test/replacer.js b/node_modules/json-stable-stringify-without-jsonify/test/replacer.js deleted file mode 100644 index 98802a72..00000000 --- a/node_modules/json-stable-stringify-without-jsonify/test/replacer.js +++ /dev/null @@ -1,74 +0,0 @@ -var test = require('tape'); -var stringify = require('../'); - -test('replace root', function (t) { - t.plan(1); - - var obj = { a: 1, b: 2, c: false }; - var replacer = function(key, value) { return 'one'; }; - - t.equal(stringify(obj, { replacer: replacer }), '"one"'); -}); - -test('replace numbers', function (t) { - t.plan(1); - - var obj = { a: 1, b: 2, c: false }; - var replacer = function(key, value) { - if(value === 1) return 'one'; - if(value === 2) return 'two'; - return value; - }; - - t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":"two","c":false}'); -}); - -test('replace with object', function (t) { - t.plan(1); - - var obj = { a: 1, b: 2, c: false }; - var replacer = function(key, value) { - if(key === 'b') return { d: 1 }; - if(value === 1) return 'one'; - return value; - }; - - t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":{"d":"one"},"c":false}'); -}); - -test('replace with undefined', function (t) { - t.plan(1); - - var obj = { a: 1, b: 2, c: false }; - var replacer = function(key, value) { - if(value === false) return; - return value; - }; - - t.equal(stringify(obj, { replacer: replacer }), '{"a":1,"b":2}'); -}); - -test('replace with array', function (t) { - t.plan(1); - - var obj = { a: 1, b: 2, c: false }; - var replacer = function(key, value) { - if(key === 'b') return ['one', 'two']; - return value; - }; - - t.equal(stringify(obj, { replacer: replacer }), '{"a":1,"b":["one","two"],"c":false}'); -}); - -test('replace array item', function (t) { - t.plan(1); - - var obj = { a: 1, b: 2, c: [1,2] }; - var replacer = function(key, value) { - if(value === 1) return 'one'; - if(value === 2) return 'two'; - return value; - }; - - t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":"two","c":["one","two"]}'); -}); diff --git a/node_modules/json-stable-stringify-without-jsonify/test/space.js b/node_modules/json-stable-stringify-without-jsonify/test/space.js deleted file mode 100644 index 2621122a..00000000 --- a/node_modules/json-stable-stringify-without-jsonify/test/space.js +++ /dev/null @@ -1,59 +0,0 @@ -var test = require('tape'); -var stringify = require('../'); - -test('space parameter', function (t) { - t.plan(1); - var obj = { one: 1, two: 2 }; - t.equal(stringify(obj, {space: ' '}), '' - + '{\n' - + ' "one": 1,\n' - + ' "two": 2\n' - + '}' - ); -}); - -test('space parameter (with tabs)', function (t) { - t.plan(1); - var obj = { one: 1, two: 2 }; - t.equal(stringify(obj, {space: '\t'}), '' - + '{\n' - + '\t"one": 1,\n' - + '\t"two": 2\n' - + '}' - ); -}); - -test('space parameter (with a number)', function (t) { - t.plan(1); - var obj = { one: 1, two: 2 }; - t.equal(stringify(obj, {space: 3}), '' - + '{\n' - + ' "one": 1,\n' - + ' "two": 2\n' - + '}' - ); -}); - -test('space parameter (nested objects)', function (t) { - t.plan(1); - var obj = { one: 1, two: { b: 4, a: [2,3] } }; - t.equal(stringify(obj, {space: ' '}), '' - + '{\n' - + ' "one": 1,\n' - + ' "two": {\n' - + ' "a": [\n' - + ' 2,\n' - + ' 3\n' - + ' ],\n' - + ' "b": 4\n' - + ' }\n' - + '}' - ); -}); - -test('space parameter (same as native)', function (t) { - t.plan(1); - // for this test, properties need to be in alphabetical order - var obj = { one: 1, two: { a: [2,3], b: 4 } }; - t.equal(stringify(obj, {space: ' '}), JSON.stringify(obj, null, ' ')); -}); diff --git a/node_modules/json-stable-stringify-without-jsonify/test/str.js b/node_modules/json-stable-stringify-without-jsonify/test/str.js deleted file mode 100644 index 67426b99..00000000 --- a/node_modules/json-stable-stringify-without-jsonify/test/str.js +++ /dev/null @@ -1,32 +0,0 @@ -var test = require('tape'); -var stringify = require('../'); - -test('simple object', function (t) { - t.plan(1); - var obj = { c: 6, b: [4,5], a: 3, z: null }; - t.equal(stringify(obj), '{"a":3,"b":[4,5],"c":6,"z":null}'); -}); - -test('object with undefined', function (t) { - t.plan(1); - var obj = { a: 3, z: undefined }; - t.equal(stringify(obj), '{"a":3}'); -}); - -test('array with undefined', function (t) { - t.plan(1); - var obj = [4, undefined, 6]; - t.equal(stringify(obj), '[4,null,6]'); -}); - -test('object with empty string', function (t) { - t.plan(1); - var obj = { a: 3, z: '' }; - t.equal(stringify(obj), '{"a":3,"z":""}'); -}); - -test('array with empty string', function (t) { - t.plan(1); - var obj = [4, '', 6]; - t.equal(stringify(obj), '[4,"",6]'); -}); diff --git a/node_modules/json-stable-stringify-without-jsonify/test/to-json.js b/node_modules/json-stable-stringify-without-jsonify/test/to-json.js deleted file mode 100644 index ef9a9809..00000000 --- a/node_modules/json-stable-stringify-without-jsonify/test/to-json.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tape'); -var stringify = require('../'); - -test('toJSON function', function (t) { - t.plan(1); - var obj = { one: 1, two: 2, toJSON: function() { return { one: 1 }; } }; - t.equal(stringify(obj), '{"one":1}' ); -}); - -test('toJSON returns string', function (t) { - t.plan(1); - var obj = { one: 1, two: 2, toJSON: function() { return 'one'; } }; - t.equal(stringify(obj), '"one"'); -}); - -test('toJSON returns array', function (t) { - t.plan(1); - var obj = { one: 1, two: 2, toJSON: function() { return ['one']; } }; - t.equal(stringify(obj), '["one"]'); -}); diff --git a/node_modules/json5/CHANGELOG.md b/node_modules/json5/CHANGELOG.md deleted file mode 100644 index 5b9aa0d2..00000000 --- a/node_modules/json5/CHANGELOG.md +++ /dev/null @@ -1,362 +0,0 @@ -### Unreleased [[code][c-unreleased], [diff][d-unreleased]] - -[c-unreleased]: https://github.com/json5/json5/tree/master -[d-unreleased]: https://github.com/json5/json5/compare/v2.2.0...HEAD - -### v2.2.0 [[code][c2.2.0], [diff][d2.2.0]] - -[c2.2.0]: https://github.com/json5/json5/tree/v2.2.0 -[d2.2.0]: https://github.com/json5/json5/compare/v2.1.3...v2.2.0 - -- New: Accurate and documented TypeScript declarations are now included. There - is no need to install `@types/json5`. ([#236], [#244]) - -### v2.1.3 [[code][c2.1.3], [diff][d2.1.3]] - -[c2.1.3]: https://github.com/json5/json5/tree/v2.1.3 -[d2.1.3]: https://github.com/json5/json5/compare/v2.1.2...v2.1.3 - -- Fix: An out of memory bug when parsing numbers has been fixed. ([#228], - [#229]) - -### v2.1.2 [[code][c2.1.2], [diff][d2.1.2]] - -[c2.1.2]: https://github.com/json5/json5/tree/v2.1.2 -[d2.1.2]: https://github.com/json5/json5/compare/v2.1.1...v2.1.2 - -- Fix: Bump `minimist` to `v1.2.5`. ([#222]) - -### v2.1.1 [[code][c2.1.1], [diff][d2.1.1]] - -[c2.1.1]: https://github.com/json5/json5/tree/v2.1.1 -[d2.1.1]: https://github.com/json5/json5/compare/v2.0.1...v2.1.1 - -- New: `package.json` and `package.json5` include a `module` property so - bundlers like webpack, rollup and parcel can take advantage of the ES Module - build. ([#208]) -- Fix: `stringify` outputs `\0` as `\\x00` when followed by a digit. ([#210]) -- Fix: Spelling mistakes have been fixed. ([#196]) - -### v2.1.0 [[code][c2.1.0], [diff][d2.1.0]] - -[c2.1.0]: https://github.com/json5/json5/tree/v2.1.0 -[d2.1.0]: https://github.com/json5/json5/compare/v2.0.1...v2.1.0 - -- New: The `index.mjs` and `index.min.mjs` browser builds in the `dist` - directory support ES6 modules. ([#187]) - -### v2.0.1 [[code][c2.0.1], [diff][d2.0.1]] - -[c2.0.1]: https://github.com/json5/json5/tree/v2.0.1 -[d2.0.1]: https://github.com/json5/json5/compare/v2.0.0...v2.0.1 - -- Fix: The browser builds in the `dist` directory support ES5. ([#182]) - -### v2.0.0 [[code][c2.0.0], [diff][d2.0.0]] - -[c2.0.0]: https://github.com/json5/json5/tree/v2.0.0 -[d2.0.0]: https://github.com/json5/json5/compare/v1.0.1...v2.0.0 - -- **Major**: JSON5 officially supports Node.js v6 and later. Support for Node.js - v4 has been dropped. Since Node.js v6 supports ES5 features, the code has been - rewritten in native ES5, and the dependence on Babel has been eliminated. - -- New: Support for Unicode 10 has been added. - -- New: The test framework has been migrated from Mocha to Tap. - -- New: The browser build at `dist/index.js` is no longer minified by default. A - minified version is available at `dist/index.min.js`. ([#181]) - -- Fix: The warning has been made clearer when line and paragraph separators are - used in strings. - -- Fix: `package.json5` has been restored, and it is automatically generated and - committed when the version is bumped. A new `build-package` NPM script has - been added to facilitate this. - -### v1.0.1 [[code][c1.0.1], [diff][d1.0.1]] - -[c1.0.1]: https://github.com/json5/json5/tree/v1.0.1 -[d1.0.1]: https://github.com/json5/json5/compare/v1.0.0...v1.0.1 - -This release includes a bug fix and minor change. - -- Fix: `parse` throws on unclosed objects and arrays. - -- New: `package.json5` has been removed until an easier way to keep it in sync - with `package.json` is found. - - -### v1.0.0 [[code][c1.0.0], [diff][d1.0.0]] - -[c1.0.0]: https://github.com/json5/json5/tree/v1.0.0 -[d1.0.0]: https://github.com/json5/json5/compare/v0.5.1...v1.0.0 - -This release includes major internal changes and public API enhancements. - -- **Major**: JSON5 officially supports Node.js v4 and later. Support for Node.js - v0.10 and v0.12 have been dropped. - -- New: Unicode property names and Unicode escapes in property names are - supported. ([#1]) - -- New: `stringify` outputs trailing commas in objects and arrays when a `space` - option is provided. ([#66]) - -- New: JSON5 allows line and paragraph separator characters (U+2028 and U+2029) - in strings in order to be compatible with JSON. However, ES5 does not allow - these characters in strings, so JSON5 gives a warning when they are parsed and - escapes them when they are stringified. ([#70]) - -- New: `stringify` accepts an options object as its second argument. The - supported options are `replacer`, `space`, and a new `quote` option that - specifies the quote character used in strings. ([#71]) - -- New: The CLI supports STDIN and STDOUT and adds `--out-file`, `--space`, and - `--validate` options. See `json5 --help` for more information. ([#72], [#84], - and [#108]) - -- New: In addition to the white space characters space `\t`, `\v`, `\f`, `\n`, - `\r`, and `\xA0`, the additional white space characters `\u2028`, `\u2029`, - and all other characters in the Space Separator Unicode category are allowed. - -- New: In addition to the character escapes `\'`, `\"`, `\\`, `\b`, `\f`, `\n`, - `\r`, and `\t`, the additional character escapes `\v` and `\0`, hexadecimal - escapes like `\x0F`, and unnecessary escapes like `\a` are allowed in string - values and string property names. - -- New: `stringify` outputs strings with single quotes by default but - intelligently uses double quotes if there are more single quotes than double - quotes inside the string. (i.e. `stringify('Stay here.')` outputs - `'Stay here.'` while `stringify('Let\'s go.')` outputs `"Let's go."`) - -- New: When a character is not allowed in a string, `stringify` outputs a - character escape like `\t` when available, a hexadecimal escape like `\x0F` - when the Unicode code point is less than 256, or a Unicode character escape - like `\u01FF`, in that order. - -- New: `stringify` checks for a `toJSON5` method on objects and, if it exists, - stringifies its return value instead of the object. `toJSON5` overrides - `toJSON` if they both exist. - -- New: To `require` or `import` JSON5 files, use `require('json5/lib/register')` - or `import 'json5/lib/register'`. Previous versions used `json5/lib/require`, - which still exists for backward compatibility but is deprecated and will give - a warning. - -- New: To use JSON5 in browsers, use the file at `dist/index.js` or - `https://unpkg.com/json5@^1.0.0`. - -- Fix: `stringify` properly outputs `Infinity` and `NaN`. ([#67]) - -- Fix: `isWord` no longer becomes a property of `JSON5` after calling - `stringify`. ([#68] and [#89]) - -- Fix: `stringify` no longer throws when an object does not have a `prototype`. - ([#154]) - -- Fix: `stringify` properly handles the `key` argument of `toJSON(key)` methods. - `toJSON5(key)` follows this pattern. - -- Fix: `stringify` accepts `Number` and `String` objects as its `space` - argument. - -- Fix: In addition to a function, `stringify` also accepts an array of keys to - include in the output as its `replacer` argument. Numbers, `Number` objects, - and `String` objects will be converted to a string if they are given as array - values. - - -### v0.5.1 [[code][c0.5.1], [diff][d0.5.1]] - -[c0.5.1]: https://github.com/json5/json5/tree/v0.5.1 -[d0.5.1]: https://github.com/json5/json5/compare/v0.5.0...v0.5.1 - -This release includes a minor fix for indentations when stringifying empty -arrays. - -- Fix: Indents no longer appear in empty arrays when stringified. ([#134]) - - -### v0.5.0 [[code][c0.5.0], [diff][d0.5.0]] - -[c0.5.0]: https://github.com/json5/json5/tree/v0.5.0 -[d0.5.0]: https://github.com/json5/json5/compare/v0.4.0...v0.5.0 - -This release includes major internal changes and public API enhancements. - -- **Major:** JSON5 officially supports Node.js v4 LTS and v5. Support for - Node.js v0.6 and v0.8 have been dropped, while support for v0.10 and v0.12 - remain. - -- Fix: YUI Compressor no longer fails when compressing json5.js. ([#97]) - -- New: `parse` and the CLI provide line and column numbers when displaying error - messages. ([#101]; awesome work by [@amb26].) - - -### v0.4.0 [[code][c0.4.0], [diff][d0.4.0]] - -[c0.4.0]: https://github.com/json5/json5/tree/v0.4.0 -[d0.4.0]: https://github.com/json5/json5/compare/v0.2.0...v0.4.0 - -Note that v0.3.0 was tagged, but never published to npm, so this v0.4.0 -changelog entry includes v0.3.0 features. - -This is a massive release that adds `stringify` support, among other things. - -- **Major:** `JSON5.stringify()` now exists! - This method is analogous to the native `JSON.stringify()`; - it just avoids quoting keys where possible. - See the [usage documentation](./README.md#usage) for more. - ([#32]; huge thanks and props [@aeisenberg]!) - -- New: `NaN` and `-NaN` are now allowed number literals. - ([#30]; thanks [@rowanhill].) - -- New: Duplicate object keys are now allowed; the last value is used. - This is the same behavior as JSON. ([#57]; thanks [@jordanbtucker].) - -- Fix: Properly handle various whitespace and newline cases now. - E.g. JSON5 now properly supports escaped CR and CRLF newlines in strings, - and JSON5 now accepts the same whitespace as JSON (stricter than ES5). - ([#58], [#60], and [#63]; thanks [@jordanbtucker].) - -- New: Negative hexadecimal numbers (e.g. `-0xC8`) are allowed again. - (They were disallowed in v0.2.0; see below.) - It turns out they *are* valid in ES5, so JSON5 supports them now too. - ([#36]; thanks [@jordanbtucker]!) - - -### v0.2.0 [[code][c0.2.0], [diff][d0.2.0]] - -[c0.2.0]: https://github.com/json5/json5/tree/v0.2.0 -[d0.2.0]: https://github.com/json5/json5/compare/v0.1.0...v0.2.0 - -This release fixes some bugs and adds some more utility features to help you -express data more easily: - -- **Breaking:** Negative hexadecimal numbers (e.g. `-0xC8`) are rejected now. - While V8 (e.g. Chrome and Node) supported them, it turns out they're invalid - in ES5. This has been [fixed in V8][v8-hex-fix] (and by extension, Chrome - and Node), so JSON5 officially rejects them now, too. ([#36]) - -- New: Trailing decimal points in decimal numbers are allowed again. - (They were disallowed in v0.1.0; see below.) - They're allowed by ES5, and differentiating between integers and floats may - make sense on some platforms. ([#16]; thanks [@Midar].) - -- New: `Infinity` and `-Infinity` are now allowed number literals. - ([#30]; thanks [@pepkin88].) - -- New: Plus signs (`+`) in front of numbers are now allowed, since it can - be helpful in some contexts to explicitly mark numbers as positive. - (E.g. when a property represents changes or deltas.) - -- Fix: unescaped newlines in strings are rejected now. - ([#24]; thanks [@Midar].) - - -### v0.1.0 [[code][c0.1.0], [diff][d0.1.0]] - -[c0.1.0]: https://github.com/json5/json5/tree/v0.1.0 -[d0.1.0]: https://github.com/json5/json5/compare/v0.0.1...v0.1.0 - -This release tightens JSON5 support and adds helpful utility features: - -- New: Support hexadecimal numbers. (Thanks [@MaxNanasy].) - -- Fix: Reject octal numbers properly now. Previously, they were accepted but - improperly parsed as base-10 numbers. (Thanks [@MaxNanasy].) - -- **Breaking:** Reject "noctal" numbers now (base-10 numbers that begin with a - leading zero). These are disallowed by both JSON5 and JSON, as well as by - ES5's strict mode. (Thanks [@MaxNanasy].) - -- New: Support leading decimal points in decimal numbers. - (Thanks [@MaxNanasy].) - -- **Breaking:** Reject trailing decimal points in decimal numbers now. These - are disallowed by both JSON5 and JSON. (Thanks [@MaxNanasy].) - -- **Breaking:** Reject omitted elements in arrays now. These are disallowed by - both JSON5 and JSON. - -- Fix: Throw proper `SyntaxError` instances on errors now. - -- New: Add Node.js `require()` hook. Register via `json5/lib/require`. - -- New: Add Node.js `json5` executable to compile JSON5 files to JSON. - - -### v0.0.1 [[code][c0.0.1], [diff][d0.0.1]] - -[c0.0.1]: https://github.com/json5/json5/tree/v0.0.1 -[d0.0.1]: https://github.com/json5/json5/compare/v0.0.0...v0.0.1 - -This was the first implementation of this JSON5 parser. - -- Support unquoted object keys, including reserved words. Unicode characters - and escape sequences sequences aren't yet supported. - -- Support single-quoted strings. - -- Support multi-line strings. - -- Support trailing commas in arrays and objects. - -- Support comments, both inline and block. - - -### v0.0.0 [[code](https://github.com/json5/json5/tree/v0.0.0)] - -Let's consider this to be Douglas Crockford's original [json_parse.js] — a -parser for the regular JSON format. - - -[json_parse.js]: https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js -[v8-hex-fix]: http://code.google.com/p/v8/issues/detail?id=2240 - -[@MaxNanasy]: https://github.com/MaxNanasy -[@Midar]: https://github.com/Midar -[@pepkin88]: https://github.com/pepkin88 -[@rowanhill]: https://github.com/rowanhill -[@aeisenberg]: https://github.com/aeisenberg -[@jordanbtucker]: https://github.com/jordanbtucker -[@amb26]: https://github.com/amb26 - -[#1]: https://github.com/json5/json5/issues/1 -[#16]: https://github.com/json5/json5/issues/16 -[#24]: https://github.com/json5/json5/issues/24 -[#30]: https://github.com/json5/json5/issues/30 -[#32]: https://github.com/json5/json5/issues/32 -[#36]: https://github.com/json5/json5/issues/36 -[#57]: https://github.com/json5/json5/issues/57 -[#58]: https://github.com/json5/json5/pull/58 -[#60]: https://github.com/json5/json5/pull/60 -[#63]: https://github.com/json5/json5/pull/63 -[#66]: https://github.com/json5/json5/issues/66 -[#67]: https://github.com/json5/json5/issues/67 -[#68]: https://github.com/json5/json5/issues/68 -[#70]: https://github.com/json5/json5/issues/70 -[#71]: https://github.com/json5/json5/issues/71 -[#72]: https://github.com/json5/json5/issues/72 -[#84]: https://github.com/json5/json5/pull/84 -[#89]: https://github.com/json5/json5/pull/89 -[#97]: https://github.com/json5/json5/pull/97 -[#101]: https://github.com/json5/json5/pull/101 -[#108]: https://github.com/json5/json5/pull/108 -[#134]: https://github.com/json5/json5/pull/134 -[#154]: https://github.com/json5/json5/issues/154 -[#181]: https://github.com/json5/json5/issues/181 -[#182]: https://github.com/json5/json5/issues/182 -[#187]: https://github.com/json5/json5/issues/187 -[#196]: https://github.com/json5/json5/issues/196 -[#208]: https://github.com/json5/json5/issues/208 -[#210]: https://github.com/json5/json5/issues/210 -[#222]: https://github.com/json5/json5/issues/222 -[#228]: https://github.com/json5/json5/issues/228 -[#229]: https://github.com/json5/json5/issues/229 -[#236]: https://github.com/json5/json5/issues/236 -[#244]: https://github.com/json5/json5/issues/244 diff --git a/node_modules/json5/LICENSE.md b/node_modules/json5/LICENSE.md deleted file mode 100644 index 2171aca5..00000000 --- a/node_modules/json5/LICENSE.md +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -Copyright (c) 2012-2018 Aseem Kishore, and [others]. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -[others]: https://github.com/json5/json5/contributors diff --git a/node_modules/json5/README.md b/node_modules/json5/README.md deleted file mode 100644 index 6049d02c..00000000 --- a/node_modules/json5/README.md +++ /dev/null @@ -1,234 +0,0 @@ -# JSON5 – JSON for Humans - -[![Build Status](https://travis-ci.com/json5/json5.svg)][Build Status] -[![Coverage -Status](https://coveralls.io/repos/github/json5/json5/badge.svg)][Coverage -Status] - -The JSON5 Data Interchange Format (JSON5) is a superset of [JSON] that aims to -alleviate some of the limitations of JSON by expanding its syntax to include -some productions from [ECMAScript 5.1]. - -This JavaScript library is the official reference implementation for JSON5 -parsing and serialization libraries. - -[Build Status]: https://travis-ci.com/json5/json5 - -[Coverage Status]: https://coveralls.io/github/json5/json5 - -[JSON]: https://tools.ietf.org/html/rfc7159 - -[ECMAScript 5.1]: https://www.ecma-international.org/ecma-262/5.1/ - -## Summary of Features -The following ECMAScript 5.1 features, which are not supported in JSON, have -been extended to JSON5. - -### Objects -- Object keys may be an ECMAScript 5.1 _[IdentifierName]_. -- Objects may have a single trailing comma. - -### Arrays -- Arrays may have a single trailing comma. - -### Strings -- Strings may be single quoted. -- Strings may span multiple lines by escaping new line characters. -- Strings may include character escapes. - -### Numbers -- Numbers may be hexadecimal. -- Numbers may have a leading or trailing decimal point. -- Numbers may be [IEEE 754] positive infinity, negative infinity, and NaN. -- Numbers may begin with an explicit plus sign. - -### Comments -- Single and multi-line comments are allowed. - -### White Space -- Additional white space characters are allowed. - -[IdentifierName]: https://www.ecma-international.org/ecma-262/5.1/#sec-7.6 - -[IEEE 754]: http://ieeexplore.ieee.org/servlet/opac?punumber=4610933 - -## Short Example -```js -{ - // comments - unquoted: 'and you can quote me on that', - singleQuotes: 'I can use "double quotes" here', - lineBreaks: "Look, Mom! \ -No \\n's!", - hexadecimal: 0xdecaf, - leadingDecimalPoint: .8675309, andTrailing: 8675309., - positiveSign: +1, - trailingComma: 'in objects', andIn: ['arrays',], - "backwardsCompatible": "with JSON", -} -``` - -## Specification -For a detailed explanation of the JSON5 format, please read the [official -specification](https://json5.github.io/json5-spec/). - -## Installation -### Node.js -```sh -npm install json5 -``` - -```js -const JSON5 = require('json5') -``` - -### Browsers -```html - -``` - -This will create a global `JSON5` variable. - -## API -The JSON5 API is compatible with the [JSON API]. - -[JSON API]: -https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON - -### JSON5.parse() -Parses a JSON5 string, constructing the JavaScript value or object described by -the string. An optional reviver function can be provided to perform a -transformation on the resulting object before it is returned. - -#### Syntax - JSON5.parse(text[, reviver]) - -#### Parameters -- `text`: The string to parse as JSON5. -- `reviver`: If a function, this prescribes how the value originally produced by - parsing is transformed, before being returned. - -#### Return value -The object corresponding to the given JSON5 text. - -### JSON5.stringify() -Converts a JavaScript value to a JSON5 string, optionally replacing values if a -replacer function is specified, or optionally including only the specified -properties if a replacer array is specified. - -#### Syntax - JSON5.stringify(value[, replacer[, space]]) - JSON5.stringify(value[, options]) - -#### Parameters -- `value`: The value to convert to a JSON5 string. -- `replacer`: A function that alters the behavior of the stringification - process, or an array of String and Number objects that serve as a whitelist - for selecting/filtering the properties of the value object to be included in - the JSON5 string. If this value is null or not provided, all properties of the - object are included in the resulting JSON5 string. -- `space`: A String or Number object that's used to insert white space into the - output JSON5 string for readability purposes. If this is a Number, it - indicates the number of space characters to use as white space; this number is - capped at 10 (if it is greater, the value is just 10). Values less than 1 - indicate that no space should be used. If this is a String, the string (or the - first 10 characters of the string, if it's longer than that) is used as white - space. If this parameter is not provided (or is null), no white space is used. - If white space is used, trailing commas will be used in objects and arrays. -- `options`: An object with the following properties: - - `replacer`: Same as the `replacer` parameter. - - `space`: Same as the `space` parameter. - - `quote`: A String representing the quote character to use when serializing - strings. - -#### Return value -A JSON5 string representing the value. - -### Node.js `require()` JSON5 files -When using Node.js, you can `require()` JSON5 files by adding the following -statement. - -```js -require('json5/lib/register') -``` - -Then you can load a JSON5 file with a Node.js `require()` statement. For -example: - -```js -const config = require('./config.json5') -``` - -## CLI -Since JSON is more widely used than JSON5, this package includes a CLI for -converting JSON5 to JSON and for validating the syntax of JSON5 documents. - -### Installation -```sh -npm install --global json5 -``` - -### Usage -```sh -json5 [options] -``` - -If `` is not provided, then STDIN is used. - -#### Options: -- `-s`, `--space`: The number of spaces to indent or `t` for tabs -- `-o`, `--out-file [file]`: Output to the specified file, otherwise STDOUT -- `-v`, `--validate`: Validate JSON5 but do not output JSON -- `-V`, `--version`: Output the version number -- `-h`, `--help`: Output usage information - -## Contributing -### Development -```sh -git clone https://github.com/json5/json5 -cd json5 -npm install -``` - -When contributing code, please write relevant tests and run `npm test` and `npm -run lint` before submitting pull requests. Please use an editor that supports -[EditorConfig](http://editorconfig.org/). - -### Issues -To report bugs or request features regarding the JSON5 data format, please -submit an issue to the [official specification -repository](https://github.com/json5/json5-spec). - -To report bugs or request features regarding the JavaScript implementation of -JSON5, please submit an issue to this repository. - -## License -MIT. See [LICENSE.md](./LICENSE.md) for details. - -## Credits -[Assem Kishore](https://github.com/aseemk) founded this project. - -[Michael Bolin](http://bolinfest.com/) independently arrived at and published -some of these same ideas with awesome explanations and detail. Recommended -reading: [Suggested Improvements to JSON](http://bolinfest.com/essays/json.html) - -[Douglas Crockford](http://www.crockford.com/) of course designed and built -JSON, but his state machine diagrams on the [JSON website](http://json.org/), as -cheesy as it may sound, gave us motivation and confidence that building a new -parser to implement these ideas was within reach! The original -implementation of JSON5 was also modeled directly off of Doug’s open-source -[json_parse.js] parser. We’re grateful for that clean and well-documented -code. - -[json_parse.js]: -https://github.com/douglascrockford/JSON-js/blob/03157639c7a7cddd2e9f032537f346f1a87c0f6d/json_parse.js - -[Max Nanasy](https://github.com/MaxNanasy) has been an early and prolific -supporter, contributing multiple patches and ideas. - -[Andrew Eisenberg](https://github.com/aeisenberg) contributed the original -`stringify` method. - -[Jordan Tucker](https://github.com/jordanbtucker) has aligned JSON5 more closely -with ES5, wrote the official JSON5 specification, completely rewrote the -codebase from the ground up, and is actively maintaining this project. diff --git a/node_modules/json5/dist/index.js b/node_modules/json5/dist/index.js deleted file mode 100644 index 9f98eb39..00000000 --- a/node_modules/json5/dist/index.js +++ /dev/null @@ -1,1710 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global.JSON5 = factory()); -}(this, (function () { 'use strict'; - - function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; - } - - var _global = createCommonjsModule(function (module) { - // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 - var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); - if (typeof __g == 'number') { __g = global; } // eslint-disable-line no-undef - }); - - var _core = createCommonjsModule(function (module) { - var core = module.exports = { version: '2.6.5' }; - if (typeof __e == 'number') { __e = core; } // eslint-disable-line no-undef - }); - var _core_1 = _core.version; - - var _isObject = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; - }; - - var _anObject = function (it) { - if (!_isObject(it)) { throw TypeError(it + ' is not an object!'); } - return it; - }; - - var _fails = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } - }; - - // Thank's IE8 for his funny defineProperty - var _descriptors = !_fails(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; - }); - - var document = _global.document; - // typeof document.createElement is 'object' in old IE - var is = _isObject(document) && _isObject(document.createElement); - var _domCreate = function (it) { - return is ? document.createElement(it) : {}; - }; - - var _ie8DomDefine = !_descriptors && !_fails(function () { - return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7; - }); - - // 7.1.1 ToPrimitive(input [, PreferredType]) - - // instead of the ES6 spec version, we didn't implement @@toPrimitive case - // and the second argument - flag - preferred type is a string - var _toPrimitive = function (it, S) { - if (!_isObject(it)) { return it; } - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) { return val; } - if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) { return val; } - if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) { return val; } - throw TypeError("Can't convert object to primitive value"); - }; - - var dP = Object.defineProperty; - - var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) { - _anObject(O); - P = _toPrimitive(P, true); - _anObject(Attributes); - if (_ie8DomDefine) { try { - return dP(O, P, Attributes); - } catch (e) { /* empty */ } } - if ('get' in Attributes || 'set' in Attributes) { throw TypeError('Accessors not supported!'); } - if ('value' in Attributes) { O[P] = Attributes.value; } - return O; - }; - - var _objectDp = { - f: f - }; - - var _propertyDesc = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; - }; - - var _hide = _descriptors ? function (object, key, value) { - return _objectDp.f(object, key, _propertyDesc(1, value)); - } : function (object, key, value) { - object[key] = value; - return object; - }; - - var hasOwnProperty = {}.hasOwnProperty; - var _has = function (it, key) { - return hasOwnProperty.call(it, key); - }; - - var id = 0; - var px = Math.random(); - var _uid = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); - }; - - var _library = false; - - var _shared = createCommonjsModule(function (module) { - var SHARED = '__core-js_shared__'; - var store = _global[SHARED] || (_global[SHARED] = {}); - - (module.exports = function (key, value) { - return store[key] || (store[key] = value !== undefined ? value : {}); - })('versions', []).push({ - version: _core.version, - mode: _library ? 'pure' : 'global', - copyright: '© 2019 Denis Pushkarev (zloirock.ru)' - }); - }); - - var _functionToString = _shared('native-function-to-string', Function.toString); - - var _redefine = createCommonjsModule(function (module) { - var SRC = _uid('src'); - - var TO_STRING = 'toString'; - var TPL = ('' + _functionToString).split(TO_STRING); - - _core.inspectSource = function (it) { - return _functionToString.call(it); - }; - - (module.exports = function (O, key, val, safe) { - var isFunction = typeof val == 'function'; - if (isFunction) { _has(val, 'name') || _hide(val, 'name', key); } - if (O[key] === val) { return; } - if (isFunction) { _has(val, SRC) || _hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); } - if (O === _global) { - O[key] = val; - } else if (!safe) { - delete O[key]; - _hide(O, key, val); - } else if (O[key]) { - O[key] = val; - } else { - _hide(O, key, val); - } - // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative - })(Function.prototype, TO_STRING, function toString() { - return typeof this == 'function' && this[SRC] || _functionToString.call(this); - }); - }); - - var _aFunction = function (it) { - if (typeof it != 'function') { throw TypeError(it + ' is not a function!'); } - return it; - }; - - // optional / simple context binding - - var _ctx = function (fn, that, length) { - _aFunction(fn); - if (that === undefined) { return fn; } - switch (length) { - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; - }; - - var PROTOTYPE = 'prototype'; - - var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] || (_global[name] = {}) : (_global[name] || {})[PROTOTYPE]; - var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {}); - var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); - var key, own, out, exp; - if (IS_GLOBAL) { source = name; } - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - // export native or passed - out = (own ? target : source)[key]; - // bind timers to global for call from export context - exp = IS_BIND && own ? _ctx(out, _global) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out; - // extend global - if (target) { _redefine(target, key, out, type & $export.U); } - // export - if (exports[key] != out) { _hide(exports, key, exp); } - if (IS_PROTO && expProto[key] != out) { expProto[key] = out; } - } - }; - _global.core = _core; - // type bitmap - $export.F = 1; // forced - $export.G = 2; // global - $export.S = 4; // static - $export.P = 8; // proto - $export.B = 16; // bind - $export.W = 32; // wrap - $export.U = 64; // safe - $export.R = 128; // real proto method for `library` - var _export = $export; - - // 7.1.4 ToInteger - var ceil = Math.ceil; - var floor = Math.floor; - var _toInteger = function (it) { - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); - }; - - // 7.2.1 RequireObjectCoercible(argument) - var _defined = function (it) { - if (it == undefined) { throw TypeError("Can't call method on " + it); } - return it; - }; - - // true -> String#at - // false -> String#codePointAt - var _stringAt = function (TO_STRING) { - return function (that, pos) { - var s = String(_defined(that)); - var i = _toInteger(pos); - var l = s.length; - var a, b; - if (i < 0 || i >= l) { return TO_STRING ? '' : undefined; } - a = s.charCodeAt(i); - return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff - ? TO_STRING ? s.charAt(i) : a - : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; - }; - }; - - var $at = _stringAt(false); - _export(_export.P, 'String', { - // 21.1.3.3 String.prototype.codePointAt(pos) - codePointAt: function codePointAt(pos) { - return $at(this, pos); - } - }); - - var codePointAt = _core.String.codePointAt; - - var max = Math.max; - var min = Math.min; - var _toAbsoluteIndex = function (index, length) { - index = _toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); - }; - - var fromCharCode = String.fromCharCode; - var $fromCodePoint = String.fromCodePoint; - - // length should be 1, old FF problem - _export(_export.S + _export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { - // 21.1.2.2 String.fromCodePoint(...codePoints) - fromCodePoint: function fromCodePoint(x) { - var arguments$1 = arguments; - // eslint-disable-line no-unused-vars - var res = []; - var aLen = arguments.length; - var i = 0; - var code; - while (aLen > i) { - code = +arguments$1[i++]; - if (_toAbsoluteIndex(code, 0x10ffff) !== code) { throw RangeError(code + ' is not a valid code point'); } - res.push(code < 0x10000 - ? fromCharCode(code) - : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) - ); - } return res.join(''); - } - }); - - var fromCodePoint = _core.String.fromCodePoint; - - // This is a generated file. Do not edit. - var Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/; - var ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAA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\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/; - var ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8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\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uF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D34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\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DE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/; - - var unicode = { - Space_Separator: Space_Separator, - ID_Start: ID_Start, - ID_Continue: ID_Continue - }; - - var util = { - isSpaceSeparator: function isSpaceSeparator (c) { - return typeof c === 'string' && unicode.Space_Separator.test(c) - }, - - isIdStartChar: function isIdStartChar (c) { - return typeof c === 'string' && ( - (c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || - (c === '$') || (c === '_') || - unicode.ID_Start.test(c) - ) - }, - - isIdContinueChar: function isIdContinueChar (c) { - return typeof c === 'string' && ( - (c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || - (c >= '0' && c <= '9') || - (c === '$') || (c === '_') || - (c === '\u200C') || (c === '\u200D') || - unicode.ID_Continue.test(c) - ) - }, - - isDigit: function isDigit (c) { - return typeof c === 'string' && /[0-9]/.test(c) - }, - - isHexDigit: function isHexDigit (c) { - return typeof c === 'string' && /[0-9A-Fa-f]/.test(c) - }, - }; - - var source; - var parseState; - var stack; - var pos; - var line; - var column; - var token; - var key; - var root; - - var parse = function parse (text, reviver) { - source = String(text); - parseState = 'start'; - stack = []; - pos = 0; - line = 1; - column = 0; - token = undefined; - key = undefined; - root = undefined; - - do { - token = lex(); - - // This code is unreachable. - // if (!parseStates[parseState]) { - // throw invalidParseState() - // } - - parseStates[parseState](); - } while (token.type !== 'eof') - - if (typeof reviver === 'function') { - return internalize({'': root}, '', reviver) - } - - return root - }; - - function internalize (holder, name, reviver) { - var value = holder[name]; - if (value != null && typeof value === 'object') { - for (var key in value) { - var replacement = internalize(value, key, reviver); - if (replacement === undefined) { - delete value[key]; - } else { - value[key] = replacement; - } - } - } - - return reviver.call(holder, name, value) - } - - var lexState; - var buffer; - var doubleQuote; - var sign; - var c; - - function lex () { - lexState = 'default'; - buffer = ''; - doubleQuote = false; - sign = 1; - - for (;;) { - c = peek(); - - // This code is unreachable. - // if (!lexStates[lexState]) { - // throw invalidLexState(lexState) - // } - - var token = lexStates[lexState](); - if (token) { - return token - } - } - } - - function peek () { - if (source[pos]) { - return String.fromCodePoint(source.codePointAt(pos)) - } - } - - function read () { - var c = peek(); - - if (c === '\n') { - line++; - column = 0; - } else if (c) { - column += c.length; - } else { - column++; - } - - if (c) { - pos += c.length; - } - - return c - } - - var lexStates = { - default: function default$1 () { - switch (c) { - case '\t': - case '\v': - case '\f': - case ' ': - case '\u00A0': - case '\uFEFF': - case '\n': - case '\r': - case '\u2028': - case '\u2029': - read(); - return - - case '/': - read(); - lexState = 'comment'; - return - - case undefined: - read(); - return newToken('eof') - } - - if (util.isSpaceSeparator(c)) { - read(); - return - } - - // This code is unreachable. - // if (!lexStates[parseState]) { - // throw invalidLexState(parseState) - // } - - return lexStates[parseState]() - }, - - comment: function comment () { - switch (c) { - case '*': - read(); - lexState = 'multiLineComment'; - return - - case '/': - read(); - lexState = 'singleLineComment'; - return - } - - throw invalidChar(read()) - }, - - multiLineComment: function multiLineComment () { - switch (c) { - case '*': - read(); - lexState = 'multiLineCommentAsterisk'; - return - - case undefined: - throw invalidChar(read()) - } - - read(); - }, - - multiLineCommentAsterisk: function multiLineCommentAsterisk () { - switch (c) { - case '*': - read(); - return - - case '/': - read(); - lexState = 'default'; - return - - case undefined: - throw invalidChar(read()) - } - - read(); - lexState = 'multiLineComment'; - }, - - singleLineComment: function singleLineComment () { - switch (c) { - case '\n': - case '\r': - case '\u2028': - case '\u2029': - read(); - lexState = 'default'; - return - - case undefined: - read(); - return newToken('eof') - } - - read(); - }, - - value: function value () { - switch (c) { - case '{': - case '[': - return newToken('punctuator', read()) - - case 'n': - read(); - literal('ull'); - return newToken('null', null) - - case 't': - read(); - literal('rue'); - return newToken('boolean', true) - - case 'f': - read(); - literal('alse'); - return newToken('boolean', false) - - case '-': - case '+': - if (read() === '-') { - sign = -1; - } - - lexState = 'sign'; - return - - case '.': - buffer = read(); - lexState = 'decimalPointLeading'; - return - - case '0': - buffer = read(); - lexState = 'zero'; - return - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - buffer = read(); - lexState = 'decimalInteger'; - return - - case 'I': - read(); - literal('nfinity'); - return newToken('numeric', Infinity) - - case 'N': - read(); - literal('aN'); - return newToken('numeric', NaN) - - case '"': - case "'": - doubleQuote = (read() === '"'); - buffer = ''; - lexState = 'string'; - return - } - - throw invalidChar(read()) - }, - - identifierNameStartEscape: function identifierNameStartEscape () { - if (c !== 'u') { - throw invalidChar(read()) - } - - read(); - var u = unicodeEscape(); - switch (u) { - case '$': - case '_': - break - - default: - if (!util.isIdStartChar(u)) { - throw invalidIdentifier() - } - - break - } - - buffer += u; - lexState = 'identifierName'; - }, - - identifierName: function identifierName () { - switch (c) { - case '$': - case '_': - case '\u200C': - case '\u200D': - buffer += read(); - return - - case '\\': - read(); - lexState = 'identifierNameEscape'; - return - } - - if (util.isIdContinueChar(c)) { - buffer += read(); - return - } - - return newToken('identifier', buffer) - }, - - identifierNameEscape: function identifierNameEscape () { - if (c !== 'u') { - throw invalidChar(read()) - } - - read(); - var u = unicodeEscape(); - switch (u) { - case '$': - case '_': - case '\u200C': - case '\u200D': - break - - default: - if (!util.isIdContinueChar(u)) { - throw invalidIdentifier() - } - - break - } - - buffer += u; - lexState = 'identifierName'; - }, - - sign: function sign$1 () { - switch (c) { - case '.': - buffer = read(); - lexState = 'decimalPointLeading'; - return - - case '0': - buffer = read(); - lexState = 'zero'; - return - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - buffer = read(); - lexState = 'decimalInteger'; - return - - case 'I': - read(); - literal('nfinity'); - return newToken('numeric', sign * Infinity) - - case 'N': - read(); - literal('aN'); - return newToken('numeric', NaN) - } - - throw invalidChar(read()) - }, - - zero: function zero () { - switch (c) { - case '.': - buffer += read(); - lexState = 'decimalPoint'; - return - - case 'e': - case 'E': - buffer += read(); - lexState = 'decimalExponent'; - return - - case 'x': - case 'X': - buffer += read(); - lexState = 'hexadecimal'; - return - } - - return newToken('numeric', sign * 0) - }, - - decimalInteger: function decimalInteger () { - switch (c) { - case '.': - buffer += read(); - lexState = 'decimalPoint'; - return - - case 'e': - case 'E': - buffer += read(); - lexState = 'decimalExponent'; - return - } - - if (util.isDigit(c)) { - buffer += read(); - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalPointLeading: function decimalPointLeading () { - if (util.isDigit(c)) { - buffer += read(); - lexState = 'decimalFraction'; - return - } - - throw invalidChar(read()) - }, - - decimalPoint: function decimalPoint () { - switch (c) { - case 'e': - case 'E': - buffer += read(); - lexState = 'decimalExponent'; - return - } - - if (util.isDigit(c)) { - buffer += read(); - lexState = 'decimalFraction'; - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalFraction: function decimalFraction () { - switch (c) { - case 'e': - case 'E': - buffer += read(); - lexState = 'decimalExponent'; - return - } - - if (util.isDigit(c)) { - buffer += read(); - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalExponent: function decimalExponent () { - switch (c) { - case '+': - case '-': - buffer += read(); - lexState = 'decimalExponentSign'; - return - } - - if (util.isDigit(c)) { - buffer += read(); - lexState = 'decimalExponentInteger'; - return - } - - throw invalidChar(read()) - }, - - decimalExponentSign: function decimalExponentSign () { - if (util.isDigit(c)) { - buffer += read(); - lexState = 'decimalExponentInteger'; - return - } - - throw invalidChar(read()) - }, - - decimalExponentInteger: function decimalExponentInteger () { - if (util.isDigit(c)) { - buffer += read(); - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - hexadecimal: function hexadecimal () { - if (util.isHexDigit(c)) { - buffer += read(); - lexState = 'hexadecimalInteger'; - return - } - - throw invalidChar(read()) - }, - - hexadecimalInteger: function hexadecimalInteger () { - if (util.isHexDigit(c)) { - buffer += read(); - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - string: function string () { - switch (c) { - case '\\': - read(); - buffer += escape(); - return - - case '"': - if (doubleQuote) { - read(); - return newToken('string', buffer) - } - - buffer += read(); - return - - case "'": - if (!doubleQuote) { - read(); - return newToken('string', buffer) - } - - buffer += read(); - return - - case '\n': - case '\r': - throw invalidChar(read()) - - case '\u2028': - case '\u2029': - separatorChar(c); - break - - case undefined: - throw invalidChar(read()) - } - - buffer += read(); - }, - - start: function start () { - switch (c) { - case '{': - case '[': - return newToken('punctuator', read()) - - // This code is unreachable since the default lexState handles eof. - // case undefined: - // return newToken('eof') - } - - lexState = 'value'; - }, - - beforePropertyName: function beforePropertyName () { - switch (c) { - case '$': - case '_': - buffer = read(); - lexState = 'identifierName'; - return - - case '\\': - read(); - lexState = 'identifierNameStartEscape'; - return - - case '}': - return newToken('punctuator', read()) - - case '"': - case "'": - doubleQuote = (read() === '"'); - lexState = 'string'; - return - } - - if (util.isIdStartChar(c)) { - buffer += read(); - lexState = 'identifierName'; - return - } - - throw invalidChar(read()) - }, - - afterPropertyName: function afterPropertyName () { - if (c === ':') { - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - beforePropertyValue: function beforePropertyValue () { - lexState = 'value'; - }, - - afterPropertyValue: function afterPropertyValue () { - switch (c) { - case ',': - case '}': - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - beforeArrayValue: function beforeArrayValue () { - if (c === ']') { - return newToken('punctuator', read()) - } - - lexState = 'value'; - }, - - afterArrayValue: function afterArrayValue () { - switch (c) { - case ',': - case ']': - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - end: function end () { - // This code is unreachable since it's handled by the default lexState. - // if (c === undefined) { - // read() - // return newToken('eof') - // } - - throw invalidChar(read()) - }, - }; - - function newToken (type, value) { - return { - type: type, - value: value, - line: line, - column: column, - } - } - - function literal (s) { - for (var i = 0, list = s; i < list.length; i += 1) { - var c = list[i]; - - var p = peek(); - - if (p !== c) { - throw invalidChar(read()) - } - - read(); - } - } - - function escape () { - var c = peek(); - switch (c) { - case 'b': - read(); - return '\b' - - case 'f': - read(); - return '\f' - - case 'n': - read(); - return '\n' - - case 'r': - read(); - return '\r' - - case 't': - read(); - return '\t' - - case 'v': - read(); - return '\v' - - case '0': - read(); - if (util.isDigit(peek())) { - throw invalidChar(read()) - } - - return '\0' - - case 'x': - read(); - return hexEscape() - - case 'u': - read(); - return unicodeEscape() - - case '\n': - case '\u2028': - case '\u2029': - read(); - return '' - - case '\r': - read(); - if (peek() === '\n') { - read(); - } - - return '' - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - throw invalidChar(read()) - - case undefined: - throw invalidChar(read()) - } - - return read() - } - - function hexEscape () { - var buffer = ''; - var c = peek(); - - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read(); - - c = peek(); - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read(); - - return String.fromCodePoint(parseInt(buffer, 16)) - } - - function unicodeEscape () { - var buffer = ''; - var count = 4; - - while (count-- > 0) { - var c = peek(); - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read(); - } - - return String.fromCodePoint(parseInt(buffer, 16)) - } - - var parseStates = { - start: function start () { - if (token.type === 'eof') { - throw invalidEOF() - } - - push(); - }, - - beforePropertyName: function beforePropertyName () { - switch (token.type) { - case 'identifier': - case 'string': - key = token.value; - parseState = 'afterPropertyName'; - return - - case 'punctuator': - // This code is unreachable since it's handled by the lexState. - // if (token.value !== '}') { - // throw invalidToken() - // } - - pop(); - return - - case 'eof': - throw invalidEOF() - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - afterPropertyName: function afterPropertyName () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator' || token.value !== ':') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - parseState = 'beforePropertyValue'; - }, - - beforePropertyValue: function beforePropertyValue () { - if (token.type === 'eof') { - throw invalidEOF() - } - - push(); - }, - - beforeArrayValue: function beforeArrayValue () { - if (token.type === 'eof') { - throw invalidEOF() - } - - if (token.type === 'punctuator' && token.value === ']') { - pop(); - return - } - - push(); - }, - - afterPropertyValue: function afterPropertyValue () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - switch (token.value) { - case ',': - parseState = 'beforePropertyName'; - return - - case '}': - pop(); - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - afterArrayValue: function afterArrayValue () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - switch (token.value) { - case ',': - parseState = 'beforeArrayValue'; - return - - case ']': - pop(); - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - end: function end () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'eof') { - // throw invalidToken() - // } - }, - }; - - function push () { - var value; - - switch (token.type) { - case 'punctuator': - switch (token.value) { - case '{': - value = {}; - break - - case '[': - value = []; - break - } - - break - - case 'null': - case 'boolean': - case 'numeric': - case 'string': - value = token.value; - break - - // This code is unreachable. - // default: - // throw invalidToken() - } - - if (root === undefined) { - root = value; - } else { - var parent = stack[stack.length - 1]; - if (Array.isArray(parent)) { - parent.push(value); - } else { - parent[key] = value; - } - } - - if (value !== null && typeof value === 'object') { - stack.push(value); - - if (Array.isArray(value)) { - parseState = 'beforeArrayValue'; - } else { - parseState = 'beforePropertyName'; - } - } else { - var current = stack[stack.length - 1]; - if (current == null) { - parseState = 'end'; - } else if (Array.isArray(current)) { - parseState = 'afterArrayValue'; - } else { - parseState = 'afterPropertyValue'; - } - } - } - - function pop () { - stack.pop(); - - var current = stack[stack.length - 1]; - if (current == null) { - parseState = 'end'; - } else if (Array.isArray(current)) { - parseState = 'afterArrayValue'; - } else { - parseState = 'afterPropertyValue'; - } - } - - // This code is unreachable. - // function invalidParseState () { - // return new Error(`JSON5: invalid parse state '${parseState}'`) - // } - - // This code is unreachable. - // function invalidLexState (state) { - // return new Error(`JSON5: invalid lex state '${state}'`) - // } - - function invalidChar (c) { - if (c === undefined) { - return syntaxError(("JSON5: invalid end of input at " + line + ":" + column)) - } - - return syntaxError(("JSON5: invalid character '" + (formatChar(c)) + "' at " + line + ":" + column)) - } - - function invalidEOF () { - return syntaxError(("JSON5: invalid end of input at " + line + ":" + column)) - } - - // This code is unreachable. - // function invalidToken () { - // if (token.type === 'eof') { - // return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) - // } - - // const c = String.fromCodePoint(token.value.codePointAt(0)) - // return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) - // } - - function invalidIdentifier () { - column -= 5; - return syntaxError(("JSON5: invalid identifier character at " + line + ":" + column)) - } - - function separatorChar (c) { - console.warn(("JSON5: '" + (formatChar(c)) + "' in strings is not valid ECMAScript; consider escaping")); - } - - function formatChar (c) { - var replacements = { - "'": "\\'", - '"': '\\"', - '\\': '\\\\', - '\b': '\\b', - '\f': '\\f', - '\n': '\\n', - '\r': '\\r', - '\t': '\\t', - '\v': '\\v', - '\0': '\\0', - '\u2028': '\\u2028', - '\u2029': '\\u2029', - }; - - if (replacements[c]) { - return replacements[c] - } - - if (c < ' ') { - var hexString = c.charCodeAt(0).toString(16); - return '\\x' + ('00' + hexString).substring(hexString.length) - } - - return c - } - - function syntaxError (message) { - var err = new SyntaxError(message); - err.lineNumber = line; - err.columnNumber = column; - return err - } - - var stringify = function stringify (value, replacer, space) { - var stack = []; - var indent = ''; - var propertyList; - var replacerFunc; - var gap = ''; - var quote; - - if ( - replacer != null && - typeof replacer === 'object' && - !Array.isArray(replacer) - ) { - space = replacer.space; - quote = replacer.quote; - replacer = replacer.replacer; - } - - if (typeof replacer === 'function') { - replacerFunc = replacer; - } else if (Array.isArray(replacer)) { - propertyList = []; - for (var i = 0, list = replacer; i < list.length; i += 1) { - var v = list[i]; - - var item = (void 0); - - if (typeof v === 'string') { - item = v; - } else if ( - typeof v === 'number' || - v instanceof String || - v instanceof Number - ) { - item = String(v); - } - - if (item !== undefined && propertyList.indexOf(item) < 0) { - propertyList.push(item); - } - } - } - - if (space instanceof Number) { - space = Number(space); - } else if (space instanceof String) { - space = String(space); - } - - if (typeof space === 'number') { - if (space > 0) { - space = Math.min(10, Math.floor(space)); - gap = ' '.substr(0, space); - } - } else if (typeof space === 'string') { - gap = space.substr(0, 10); - } - - return serializeProperty('', {'': value}) - - function serializeProperty (key, holder) { - var value = holder[key]; - if (value != null) { - if (typeof value.toJSON5 === 'function') { - value = value.toJSON5(key); - } else if (typeof value.toJSON === 'function') { - value = value.toJSON(key); - } - } - - if (replacerFunc) { - value = replacerFunc.call(holder, key, value); - } - - if (value instanceof Number) { - value = Number(value); - } else if (value instanceof String) { - value = String(value); - } else if (value instanceof Boolean) { - value = value.valueOf(); - } - - switch (value) { - case null: return 'null' - case true: return 'true' - case false: return 'false' - } - - if (typeof value === 'string') { - return quoteString(value, false) - } - - if (typeof value === 'number') { - return String(value) - } - - if (typeof value === 'object') { - return Array.isArray(value) ? serializeArray(value) : serializeObject(value) - } - - return undefined - } - - function quoteString (value) { - var quotes = { - "'": 0.1, - '"': 0.2, - }; - - var replacements = { - "'": "\\'", - '"': '\\"', - '\\': '\\\\', - '\b': '\\b', - '\f': '\\f', - '\n': '\\n', - '\r': '\\r', - '\t': '\\t', - '\v': '\\v', - '\0': '\\0', - '\u2028': '\\u2028', - '\u2029': '\\u2029', - }; - - var product = ''; - - for (var i = 0; i < value.length; i++) { - var c = value[i]; - switch (c) { - case "'": - case '"': - quotes[c]++; - product += c; - continue - - case '\0': - if (util.isDigit(value[i + 1])) { - product += '\\x00'; - continue - } - } - - if (replacements[c]) { - product += replacements[c]; - continue - } - - if (c < ' ') { - var hexString = c.charCodeAt(0).toString(16); - product += '\\x' + ('00' + hexString).substring(hexString.length); - continue - } - - product += c; - } - - var quoteChar = quote || Object.keys(quotes).reduce(function (a, b) { return (quotes[a] < quotes[b]) ? a : b; }); - - product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]); - - return quoteChar + product + quoteChar - } - - function serializeObject (value) { - if (stack.indexOf(value) >= 0) { - throw TypeError('Converting circular structure to JSON5') - } - - stack.push(value); - - var stepback = indent; - indent = indent + gap; - - var keys = propertyList || Object.keys(value); - var partial = []; - for (var i = 0, list = keys; i < list.length; i += 1) { - var key = list[i]; - - var propertyString = serializeProperty(key, value); - if (propertyString !== undefined) { - var member = serializeKey(key) + ':'; - if (gap !== '') { - member += ' '; - } - member += propertyString; - partial.push(member); - } - } - - var final; - if (partial.length === 0) { - final = '{}'; - } else { - var properties; - if (gap === '') { - properties = partial.join(','); - final = '{' + properties + '}'; - } else { - var separator = ',\n' + indent; - properties = partial.join(separator); - final = '{\n' + indent + properties + ',\n' + stepback + '}'; - } - } - - stack.pop(); - indent = stepback; - return final - } - - function serializeKey (key) { - if (key.length === 0) { - return quoteString(key, true) - } - - var firstChar = String.fromCodePoint(key.codePointAt(0)); - if (!util.isIdStartChar(firstChar)) { - return quoteString(key, true) - } - - for (var i = firstChar.length; i < key.length; i++) { - if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { - return quoteString(key, true) - } - } - - return key - } - - function serializeArray (value) { - if (stack.indexOf(value) >= 0) { - throw TypeError('Converting circular structure to JSON5') - } - - stack.push(value); - - var stepback = indent; - indent = indent + gap; - - var partial = []; - for (var i = 0; i < value.length; i++) { - var propertyString = serializeProperty(String(i), value); - partial.push((propertyString !== undefined) ? propertyString : 'null'); - } - - var final; - if (partial.length === 0) { - final = '[]'; - } else { - if (gap === '') { - var properties = partial.join(','); - final = '[' + properties + ']'; - } else { - var separator = ',\n' + indent; - var properties$1 = partial.join(separator); - final = '[\n' + indent + properties$1 + ',\n' + stepback + ']'; - } - } - - stack.pop(); - indent = stepback; - return final - } - }; - - var JSON5 = { - parse: parse, - stringify: stringify, - }; - - var lib = JSON5; - - var es5 = lib; - - return es5; - -}))); diff --git a/node_modules/json5/dist/index.min.js b/node_modules/json5/dist/index.min.js deleted file mode 100644 index da63a9da..00000000 --- a/node_modules/json5/dist/index.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(u,D){"object"==typeof exports&&"undefined"!=typeof module?module.exports=D():"function"==typeof define&&define.amd?define(D):u.JSON5=D()}(this,function(){"use strict";function u(u,D){return u(D={exports:{}},D.exports),D.exports}var D=u(function(u){var D=u.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=D)}),e=u(function(u){var D=u.exports={version:"2.6.5"};"number"==typeof __e&&(__e=D)}),t=(e.version,function(u){return"object"==typeof u?null!==u:"function"==typeof u}),r=function(u){if(!t(u))throw TypeError(u+" is not an object!");return u},F=function(u){try{return!!u()}catch(u){return!0}},n=!F(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),C=D.document,A=t(C)&&t(C.createElement),i=!n&&!F(function(){return 7!=Object.defineProperty((u="div",A?C.createElement(u):{}),"a",{get:function(){return 7}}).a;var u}),E=Object.defineProperty,o={f:n?Object.defineProperty:function(u,D,e){if(r(u),D=function(u,D){if(!t(u))return u;var e,r;if(D&&"function"==typeof(e=u.toString)&&!t(r=e.call(u)))return r;if("function"==typeof(e=u.valueOf)&&!t(r=e.call(u)))return r;if(!D&&"function"==typeof(e=u.toString)&&!t(r=e.call(u)))return r;throw TypeError("Can't convert object to primitive value")}(D,!0),r(e),i)try{return E(u,D,e)}catch(u){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(u[D]=e.value),u}},a=n?function(u,D,e){return o.f(u,D,function(u,D){return{enumerable:!(1&u),configurable:!(2&u),writable:!(4&u),value:D}}(1,e))}:function(u,D,e){return u[D]=e,u},c={}.hasOwnProperty,B=function(u,D){return c.call(u,D)},s=0,f=Math.random(),l=u(function(u){var t=D["__core-js_shared__"]||(D["__core-js_shared__"]={});(u.exports=function(u,D){return t[u]||(t[u]=void 0!==D?D:{})})("versions",[]).push({version:e.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})("native-function-to-string",Function.toString),d=u(function(u){var t,r="Symbol(".concat(void 0===(t="src")?"":t,")_",(++s+f).toString(36)),F=(""+l).split("toString");e.inspectSource=function(u){return l.call(u)},(u.exports=function(u,e,t,n){var C="function"==typeof t;C&&(B(t,"name")||a(t,"name",e)),u[e]!==t&&(C&&(B(t,r)||a(t,r,u[e]?""+u[e]:F.join(String(e)))),u===D?u[e]=t:n?u[e]?u[e]=t:a(u,e,t):(delete u[e],a(u,e,t)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[r]||l.call(this)})}),v=function(u,D,e){if(function(u){if("function"!=typeof u)throw TypeError(u+" is not a function!")}(u),void 0===D)return u;switch(e){case 1:return function(e){return u.call(D,e)};case 2:return function(e,t){return u.call(D,e,t)};case 3:return function(e,t,r){return u.call(D,e,t,r)}}return function(){return u.apply(D,arguments)}},p=function(u,t,r){var F,n,C,A,i=u&p.F,E=u&p.G,o=u&p.S,c=u&p.P,B=u&p.B,s=E?D:o?D[t]||(D[t]={}):(D[t]||{}).prototype,f=E?e:e[t]||(e[t]={}),l=f.prototype||(f.prototype={});for(F in E&&(r=t),r)C=((n=!i&&s&&void 0!==s[F])?s:r)[F],A=B&&n?v(C,D):c&&"function"==typeof C?v(Function.call,C):C,s&&d(s,F,C,u&p.U),f[F]!=C&&a(f,F,A),c&&l[F]!=C&&(l[F]=C)};D.core=e,p.F=1,p.G=2,p.S=4,p.P=8,p.B=16,p.W=32,p.U=64,p.R=128;var h,m=p,g=Math.ceil,y=Math.floor,w=function(u){return isNaN(u=+u)?0:(u>0?y:g)(u)},S=(h=!1,function(u,D){var e,t,r=String(function(u){if(null==u)throw TypeError("Can't call method on "+u);return u}(u)),F=w(D),n=r.length;return F<0||F>=n?h?"":void 0:(e=r.charCodeAt(F))<55296||e>56319||F+1===n||(t=r.charCodeAt(F+1))<56320||t>57343?h?r.charAt(F):e:h?r.slice(F,F+2):t-56320+(e-55296<<10)+65536});m(m.P,"String",{codePointAt:function(u){return S(this,u)}});e.String.codePointAt;var b=Math.max,x=Math.min,N=String.fromCharCode,P=String.fromCodePoint;m(m.S+m.F*(!!P&&1!=P.length),"String",{fromCodePoint:function(u){for(var D,e,t,r=arguments,F=[],n=arguments.length,C=0;n>C;){if(D=+r[C++],t=1114111,((e=w(e=D))<0?b(e+t,0):x(e,t))!==D)throw RangeError(D+" is not a valid code point");F.push(D<65536?N(D):N(55296+((D-=65536)>>10),D%1024+56320))}return F.join("")}});e.String.fromCodePoint;var _,I,O,j,V,J,M,k,L,T,z,H,$,R,G={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B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F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-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uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\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DF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},U={isSpaceSeparator:function(u){return"string"==typeof u&&G.Space_Separator.test(u)},isIdStartChar:function(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||G.ID_Start.test(u))},isIdContinueChar:function(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||G.ID_Continue.test(u))},isDigit:function(u){return"string"==typeof u&&/[0-9]/.test(u)},isHexDigit:function(u){return"string"==typeof u&&/[0-9A-Fa-f]/.test(u)}};function Z(){for(T="default",z="",H=!1,$=1;;){R=q();var u=X[T]();if(u)return u}}function q(){if(_[j])return String.fromCodePoint(_.codePointAt(j))}function W(){var u=q();return"\n"===u?(V++,J=0):u?J+=u.length:J++,u&&(j+=u.length),u}var X={default:function(){switch(R){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void W();case"/":return W(),void(T="comment");case void 0:return W(),K("eof")}if(!U.isSpaceSeparator(R))return X[I]();W()},comment:function(){switch(R){case"*":return W(),void(T="multiLineComment");case"/":return W(),void(T="singleLineComment")}throw tu(W())},multiLineComment:function(){switch(R){case"*":return W(),void(T="multiLineCommentAsterisk");case void 0:throw tu(W())}W()},multiLineCommentAsterisk:function(){switch(R){case"*":return void W();case"/":return W(),void(T="default");case void 0:throw tu(W())}W(),T="multiLineComment"},singleLineComment:function(){switch(R){case"\n":case"\r":case"\u2028":case"\u2029":return W(),void(T="default");case void 0:return W(),K("eof")}W()},value:function(){switch(R){case"{":case"[":return K("punctuator",W());case"n":return W(),Q("ull"),K("null",null);case"t":return W(),Q("rue"),K("boolean",!0);case"f":return W(),Q("alse"),K("boolean",!1);case"-":case"+":return"-"===W()&&($=-1),void(T="sign");case".":return z=W(),void(T="decimalPointLeading");case"0":return z=W(),void(T="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return z=W(),void(T="decimalInteger");case"I":return W(),Q("nfinity"),K("numeric",1/0);case"N":return W(),Q("aN"),K("numeric",NaN);case'"':case"'":return H='"'===W(),z="",void(T="string")}throw tu(W())},identifierNameStartEscape:function(){if("u"!==R)throw tu(W());W();var u=Y();switch(u){case"$":case"_":break;default:if(!U.isIdStartChar(u))throw Fu()}z+=u,T="identifierName"},identifierName:function(){switch(R){case"$":case"_":case"‌":case"‍":return void(z+=W());case"\\":return W(),void(T="identifierNameEscape")}if(!U.isIdContinueChar(R))return K("identifier",z);z+=W()},identifierNameEscape:function(){if("u"!==R)throw tu(W());W();var u=Y();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!U.isIdContinueChar(u))throw Fu()}z+=u,T="identifierName"},sign:function(){switch(R){case".":return z=W(),void(T="decimalPointLeading");case"0":return z=W(),void(T="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return z=W(),void(T="decimalInteger");case"I":return W(),Q("nfinity"),K("numeric",$*(1/0));case"N":return W(),Q("aN"),K("numeric",NaN)}throw tu(W())},zero:function(){switch(R){case".":return z+=W(),void(T="decimalPoint");case"e":case"E":return z+=W(),void(T="decimalExponent");case"x":case"X":return z+=W(),void(T="hexadecimal")}return K("numeric",0*$)},decimalInteger:function(){switch(R){case".":return z+=W(),void(T="decimalPoint");case"e":case"E":return z+=W(),void(T="decimalExponent")}if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},decimalPointLeading:function(){if(U.isDigit(R))return z+=W(),void(T="decimalFraction");throw tu(W())},decimalPoint:function(){switch(R){case"e":case"E":return z+=W(),void(T="decimalExponent")}return U.isDigit(R)?(z+=W(),void(T="decimalFraction")):K("numeric",$*Number(z))},decimalFraction:function(){switch(R){case"e":case"E":return z+=W(),void(T="decimalExponent")}if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},decimalExponent:function(){switch(R){case"+":case"-":return z+=W(),void(T="decimalExponentSign")}if(U.isDigit(R))return z+=W(),void(T="decimalExponentInteger");throw tu(W())},decimalExponentSign:function(){if(U.isDigit(R))return z+=W(),void(T="decimalExponentInteger");throw tu(W())},decimalExponentInteger:function(){if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},hexadecimal:function(){if(U.isHexDigit(R))return z+=W(),void(T="hexadecimalInteger");throw tu(W())},hexadecimalInteger:function(){if(!U.isHexDigit(R))return K("numeric",$*Number(z));z+=W()},string:function(){switch(R){case"\\":return W(),void(z+=function(){switch(q()){case"b":return W(),"\b";case"f":return W(),"\f";case"n":return W(),"\n";case"r":return W(),"\r";case"t":return W(),"\t";case"v":return W(),"\v";case"0":if(W(),U.isDigit(q()))throw tu(W());return"\0";case"x":return W(),function(){var u="",D=q();if(!U.isHexDigit(D))throw tu(W());if(u+=W(),D=q(),!U.isHexDigit(D))throw tu(W());return u+=W(),String.fromCodePoint(parseInt(u,16))}();case"u":return W(),Y();case"\n":case"\u2028":case"\u2029":return W(),"";case"\r":return W(),"\n"===q()&&W(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw tu(W())}return W()}());case'"':return H?(W(),K("string",z)):void(z+=W());case"'":return H?void(z+=W()):(W(),K("string",z));case"\n":case"\r":throw tu(W());case"\u2028":case"\u2029":!function(u){console.warn("JSON5: '"+nu(u)+"' in strings is not valid ECMAScript; consider escaping")}(R);break;case void 0:throw tu(W())}z+=W()},start:function(){switch(R){case"{":case"[":return K("punctuator",W())}T="value"},beforePropertyName:function(){switch(R){case"$":case"_":return z=W(),void(T="identifierName");case"\\":return W(),void(T="identifierNameStartEscape");case"}":return K("punctuator",W());case'"':case"'":return H='"'===W(),void(T="string")}if(U.isIdStartChar(R))return z+=W(),void(T="identifierName");throw tu(W())},afterPropertyName:function(){if(":"===R)return K("punctuator",W());throw tu(W())},beforePropertyValue:function(){T="value"},afterPropertyValue:function(){switch(R){case",":case"}":return K("punctuator",W())}throw tu(W())},beforeArrayValue:function(){if("]"===R)return K("punctuator",W());T="value"},afterArrayValue:function(){switch(R){case",":case"]":return K("punctuator",W())}throw tu(W())},end:function(){throw tu(W())}};function K(u,D){return{type:u,value:D,line:V,column:J}}function Q(u){for(var D=0,e=u;D0;){var e=q();if(!U.isHexDigit(e))throw tu(W());u+=W()}return String.fromCodePoint(parseInt(u,16))}var uu={start:function(){if("eof"===M.type)throw ru();Du()},beforePropertyName:function(){switch(M.type){case"identifier":case"string":return k=M.value,void(I="afterPropertyName");case"punctuator":return void eu();case"eof":throw ru()}},afterPropertyName:function(){if("eof"===M.type)throw ru();I="beforePropertyValue"},beforePropertyValue:function(){if("eof"===M.type)throw ru();Du()},beforeArrayValue:function(){if("eof"===M.type)throw ru();"punctuator"!==M.type||"]"!==M.value?Du():eu()},afterPropertyValue:function(){if("eof"===M.type)throw ru();switch(M.value){case",":return void(I="beforePropertyName");case"}":eu()}},afterArrayValue:function(){if("eof"===M.type)throw ru();switch(M.value){case",":return void(I="beforeArrayValue");case"]":eu()}},end:function(){}};function Du(){var u;switch(M.type){case"punctuator":switch(M.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=M.value}if(void 0===L)L=u;else{var D=O[O.length-1];Array.isArray(D)?D.push(u):D[k]=u}if(null!==u&&"object"==typeof u)O.push(u),I=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{var e=O[O.length-1];I=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}}function eu(){O.pop();var u=O[O.length-1];I=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function tu(u){return Cu(void 0===u?"JSON5: invalid end of input at "+V+":"+J:"JSON5: invalid character '"+nu(u)+"' at "+V+":"+J)}function ru(){return Cu("JSON5: invalid end of input at "+V+":"+J)}function Fu(){return Cu("JSON5: invalid identifier character at "+V+":"+(J-=5))}function nu(u){var D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){var e=u.charCodeAt(0).toString(16);return"\\x"+("00"+e).substring(e.length)}return u}function Cu(u){var D=new SyntaxError(u);return D.lineNumber=V,D.columnNumber=J,D}return{parse:function(u,D){_=String(u),I="start",O=[],j=0,V=1,J=0,M=void 0,k=void 0,L=void 0;do{M=Z(),uu[I]()}while("eof"!==M.type);return"function"==typeof D?function u(D,e,t){var r=D[e];if(null!=r&&"object"==typeof r)for(var F in r){var n=u(r,F,t);void 0===n?delete r[F]:r[F]=n}return t.call(D,e,r)}({"":L},"",D):L},stringify:function(u,D,e){var t,r,F,n=[],C="",A="";if(null==D||"object"!=typeof D||Array.isArray(D)||(e=D.space,F=D.quote,D=D.replacer),"function"==typeof D)r=D;else if(Array.isArray(D)){t=[];for(var i=0,E=D;i0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),c("",{"":u});function c(u,D){var e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),r&&(e=r.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?B(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(n.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");n.push(u);var D=C;C+=A;for(var e,t=[],r=0;r=0)throw TypeError("Converting circular structure to JSON5");n.push(u);var D=C;C+=A;for(var e,r,F=t||Object.keys(u),i=[],E=0,o=F;E"string"==typeof u&&unicode.Space_Separator.test(u),isIdStartChar:u=>"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||unicode.ID_Start.test(u)),isIdContinueChar:u=>"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||unicode.ID_Continue.test(u)),isDigit:u=>"string"==typeof u&&/[0-9]/.test(u),isHexDigit:u=>"string"==typeof u&&/[0-9A-Fa-f]/.test(u)};let source,parseState,stack,pos,line,column,token,key,root;var parse=function(u,D){source=String(u),parseState="start",stack=[],pos=0,line=1,column=0,token=void 0,key=void 0,root=void 0;do{token=lex(),parseStates[parseState]()}while("eof"!==token.type);return"function"==typeof D?internalize({"":root},"",D):root};function internalize(u,D,e){const r=u[D];if(null!=r&&"object"==typeof r)for(const u in r){const D=internalize(r,u,e);void 0===D?delete r[u]:r[u]=D}return e.call(u,D,r)}let lexState,buffer,doubleQuote,sign,c;function lex(){for(lexState="default",buffer="",doubleQuote=!1,sign=1;;){c=peek();const u=lexStates[lexState]();if(u)return u}}function peek(){if(source[pos])return String.fromCodePoint(source.codePointAt(pos))}function read(){const u=peek();return"\n"===u?(line++,column=0):u?column+=u.length:column++,u&&(pos+=u.length),u}const lexStates={default(){switch(c){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void read();case"/":return read(),void(lexState="comment");case void 0:return read(),newToken("eof")}if(!util.isSpaceSeparator(c))return lexStates[parseState]();read()},comment(){switch(c){case"*":return read(),void(lexState="multiLineComment");case"/":return read(),void(lexState="singleLineComment")}throw invalidChar(read())},multiLineComment(){switch(c){case"*":return read(),void(lexState="multiLineCommentAsterisk");case void 0:throw invalidChar(read())}read()},multiLineCommentAsterisk(){switch(c){case"*":return void read();case"/":return read(),void(lexState="default");case void 0:throw invalidChar(read())}read(),lexState="multiLineComment"},singleLineComment(){switch(c){case"\n":case"\r":case"\u2028":case"\u2029":return read(),void(lexState="default");case void 0:return read(),newToken("eof")}read()},value(){switch(c){case"{":case"[":return newToken("punctuator",read());case"n":return read(),literal("ull"),newToken("null",null);case"t":return read(),literal("rue"),newToken("boolean",!0);case"f":return read(),literal("alse"),newToken("boolean",!1);case"-":case"+":return"-"===read()&&(sign=-1),void(lexState="sign");case".":return buffer=read(),void(lexState="decimalPointLeading");case"0":return buffer=read(),void(lexState="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return buffer=read(),void(lexState="decimalInteger");case"I":return read(),literal("nfinity"),newToken("numeric",1/0);case"N":return read(),literal("aN"),newToken("numeric",NaN);case'"':case"'":return doubleQuote='"'===read(),buffer="",void(lexState="string")}throw invalidChar(read())},identifierNameStartEscape(){if("u"!==c)throw invalidChar(read());read();const u=unicodeEscape();switch(u){case"$":case"_":break;default:if(!util.isIdStartChar(u))throw invalidIdentifier()}buffer+=u,lexState="identifierName"},identifierName(){switch(c){case"$":case"_":case"‌":case"‍":return void(buffer+=read());case"\\":return read(),void(lexState="identifierNameEscape")}if(!util.isIdContinueChar(c))return newToken("identifier",buffer);buffer+=read()},identifierNameEscape(){if("u"!==c)throw invalidChar(read());read();const u=unicodeEscape();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!util.isIdContinueChar(u))throw invalidIdentifier()}buffer+=u,lexState="identifierName"},sign(){switch(c){case".":return buffer=read(),void(lexState="decimalPointLeading");case"0":return buffer=read(),void(lexState="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return buffer=read(),void(lexState="decimalInteger");case"I":return read(),literal("nfinity"),newToken("numeric",sign*(1/0));case"N":return read(),literal("aN"),newToken("numeric",NaN)}throw invalidChar(read())},zero(){switch(c){case".":return buffer+=read(),void(lexState="decimalPoint");case"e":case"E":return buffer+=read(),void(lexState="decimalExponent");case"x":case"X":return buffer+=read(),void(lexState="hexadecimal")}return newToken("numeric",0*sign)},decimalInteger(){switch(c){case".":return buffer+=read(),void(lexState="decimalPoint");case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},decimalPointLeading(){if(util.isDigit(c))return buffer+=read(),void(lexState="decimalFraction");throw invalidChar(read())},decimalPoint(){switch(c){case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}return util.isDigit(c)?(buffer+=read(),void(lexState="decimalFraction")):newToken("numeric",sign*Number(buffer))},decimalFraction(){switch(c){case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},decimalExponent(){switch(c){case"+":case"-":return buffer+=read(),void(lexState="decimalExponentSign")}if(util.isDigit(c))return buffer+=read(),void(lexState="decimalExponentInteger");throw invalidChar(read())},decimalExponentSign(){if(util.isDigit(c))return buffer+=read(),void(lexState="decimalExponentInteger");throw invalidChar(read())},decimalExponentInteger(){if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},hexadecimal(){if(util.isHexDigit(c))return buffer+=read(),void(lexState="hexadecimalInteger");throw invalidChar(read())},hexadecimalInteger(){if(!util.isHexDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},string(){switch(c){case"\\":return read(),void(buffer+=escape());case'"':return doubleQuote?(read(),newToken("string",buffer)):void(buffer+=read());case"'":return doubleQuote?void(buffer+=read()):(read(),newToken("string",buffer));case"\n":case"\r":throw invalidChar(read());case"\u2028":case"\u2029":separatorChar(c);break;case void 0:throw invalidChar(read())}buffer+=read()},start(){switch(c){case"{":case"[":return newToken("punctuator",read())}lexState="value"},beforePropertyName(){switch(c){case"$":case"_":return buffer=read(),void(lexState="identifierName");case"\\":return read(),void(lexState="identifierNameStartEscape");case"}":return newToken("punctuator",read());case'"':case"'":return doubleQuote='"'===read(),void(lexState="string")}if(util.isIdStartChar(c))return buffer+=read(),void(lexState="identifierName");throw invalidChar(read())},afterPropertyName(){if(":"===c)return newToken("punctuator",read());throw invalidChar(read())},beforePropertyValue(){lexState="value"},afterPropertyValue(){switch(c){case",":case"}":return newToken("punctuator",read())}throw invalidChar(read())},beforeArrayValue(){if("]"===c)return newToken("punctuator",read());lexState="value"},afterArrayValue(){switch(c){case",":case"]":return newToken("punctuator",read())}throw invalidChar(read())},end(){throw invalidChar(read())}};function newToken(u,D){return{type:u,value:D,line:line,column:column}}function literal(u){for(const D of u){if(peek()!==D)throw invalidChar(read());read()}}function escape(){switch(peek()){case"b":return read(),"\b";case"f":return read(),"\f";case"n":return read(),"\n";case"r":return read(),"\r";case"t":return read(),"\t";case"v":return read(),"\v";case"0":if(read(),util.isDigit(peek()))throw invalidChar(read());return"\0";case"x":return read(),hexEscape();case"u":return read(),unicodeEscape();case"\n":case"\u2028":case"\u2029":return read(),"";case"\r":return read(),"\n"===peek()&&read(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw invalidChar(read())}return read()}function hexEscape(){let u="",D=peek();if(!util.isHexDigit(D))throw invalidChar(read());if(u+=read(),D=peek(),!util.isHexDigit(D))throw invalidChar(read());return u+=read(),String.fromCodePoint(parseInt(u,16))}function unicodeEscape(){let u="",D=4;for(;D-- >0;){const D=peek();if(!util.isHexDigit(D))throw invalidChar(read());u+=read()}return String.fromCodePoint(parseInt(u,16))}const parseStates={start(){if("eof"===token.type)throw invalidEOF();push()},beforePropertyName(){switch(token.type){case"identifier":case"string":return key=token.value,void(parseState="afterPropertyName");case"punctuator":return void pop();case"eof":throw invalidEOF()}},afterPropertyName(){if("eof"===token.type)throw invalidEOF();parseState="beforePropertyValue"},beforePropertyValue(){if("eof"===token.type)throw invalidEOF();push()},beforeArrayValue(){if("eof"===token.type)throw invalidEOF();"punctuator"!==token.type||"]"!==token.value?push():pop()},afterPropertyValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforePropertyName");case"}":pop()}},afterArrayValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforeArrayValue");case"]":pop()}},end(){}};function push(){let u;switch(token.type){case"punctuator":switch(token.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=token.value}if(void 0===root)root=u;else{const D=stack[stack.length-1];Array.isArray(D)?D.push(u):D[key]=u}if(null!==u&&"object"==typeof u)stack.push(u),parseState=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}}function pop(){stack.pop();const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function invalidChar(u){return syntaxError(void 0===u?`JSON5: invalid end of input at ${line}:${column}`:`JSON5: invalid character '${formatChar(u)}' at ${line}:${column}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)}function invalidIdentifier(){return syntaxError(`JSON5: invalid identifier character at ${line}:${column-=5}`)}function separatorChar(u){console.warn(`JSON5: '${formatChar(u)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return"\\x"+("00"+D).substring(D.length)}return u}function syntaxError(u){const D=new SyntaxError(u);return D.lineNumber=line,D.columnNumber=column,D}var stringify=function(u,D,e){const r=[];let t,F,C,a="",A="";if(null==D||"object"!=typeof D||Array.isArray(D)||(e=D.space,C=D.quote,D=D.replacer),"function"==typeof D)F=D;else if(Array.isArray(D)){t=[];for(const u of D){let D;"string"==typeof u?D=u:("number"==typeof u||u instanceof String||u instanceof Number)&&(D=String(u)),void 0!==D&&t.indexOf(D)<0&&t.push(D)}}return e instanceof Number?e=Number(e):e instanceof String&&(e=String(e)),"number"==typeof e?e>0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),E("",{"":u});function E(u,D){let e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),F&&(e=F.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?n(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(r.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,t=[];for(let D=0;D=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,F=t||Object.keys(u),C=[];for(const D of F){const e=E(D,u);if(void 0!==e){let u=i(D)+":";""!==A&&(u+=" "),u+=e,C.push(u)}}if(0===C.length)e="{}";else{let u;if(""===A)u=C.join(","),e="{"+u+"}";else{let r=",\n"+a;u=C.join(r),e="{\n"+a+u+",\n"+D+"}"}}return r.pop(),a=D,e}(e):void 0}function n(u){const D={"'":.1,'"':.2},e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let r="";for(let t=0;tD[u]= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || - (c === '$') || (c === '_') || - unicode.ID_Start.test(c) - ) - }, - - isIdContinueChar (c) { - return typeof c === 'string' && ( - (c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || - (c >= '0' && c <= '9') || - (c === '$') || (c === '_') || - (c === '\u200C') || (c === '\u200D') || - unicode.ID_Continue.test(c) - ) - }, - - isDigit (c) { - return typeof c === 'string' && /[0-9]/.test(c) - }, - - isHexDigit (c) { - return typeof c === 'string' && /[0-9A-Fa-f]/.test(c) - }, -}; - -let source; -let parseState; -let stack; -let pos; -let line; -let column; -let token; -let key; -let root; - -var parse = function parse (text, reviver) { - source = String(text); - parseState = 'start'; - stack = []; - pos = 0; - line = 1; - column = 0; - token = undefined; - key = undefined; - root = undefined; - - do { - token = lex(); - - // This code is unreachable. - // if (!parseStates[parseState]) { - // throw invalidParseState() - // } - - parseStates[parseState](); - } while (token.type !== 'eof') - - if (typeof reviver === 'function') { - return internalize({'': root}, '', reviver) - } - - return root -}; - -function internalize (holder, name, reviver) { - const value = holder[name]; - if (value != null && typeof value === 'object') { - for (const key in value) { - const replacement = internalize(value, key, reviver); - if (replacement === undefined) { - delete value[key]; - } else { - value[key] = replacement; - } - } - } - - return reviver.call(holder, name, value) -} - -let lexState; -let buffer; -let doubleQuote; -let sign; -let c; - -function lex () { - lexState = 'default'; - buffer = ''; - doubleQuote = false; - sign = 1; - - for (;;) { - c = peek(); - - // This code is unreachable. - // if (!lexStates[lexState]) { - // throw invalidLexState(lexState) - // } - - const token = lexStates[lexState](); - if (token) { - return token - } - } -} - -function peek () { - if (source[pos]) { - return String.fromCodePoint(source.codePointAt(pos)) - } -} - -function read () { - const c = peek(); - - if (c === '\n') { - line++; - column = 0; - } else if (c) { - column += c.length; - } else { - column++; - } - - if (c) { - pos += c.length; - } - - return c -} - -const lexStates = { - default () { - switch (c) { - case '\t': - case '\v': - case '\f': - case ' ': - case '\u00A0': - case '\uFEFF': - case '\n': - case '\r': - case '\u2028': - case '\u2029': - read(); - return - - case '/': - read(); - lexState = 'comment'; - return - - case undefined: - read(); - return newToken('eof') - } - - if (util.isSpaceSeparator(c)) { - read(); - return - } - - // This code is unreachable. - // if (!lexStates[parseState]) { - // throw invalidLexState(parseState) - // } - - return lexStates[parseState]() - }, - - comment () { - switch (c) { - case '*': - read(); - lexState = 'multiLineComment'; - return - - case '/': - read(); - lexState = 'singleLineComment'; - return - } - - throw invalidChar(read()) - }, - - multiLineComment () { - switch (c) { - case '*': - read(); - lexState = 'multiLineCommentAsterisk'; - return - - case undefined: - throw invalidChar(read()) - } - - read(); - }, - - multiLineCommentAsterisk () { - switch (c) { - case '*': - read(); - return - - case '/': - read(); - lexState = 'default'; - return - - case undefined: - throw invalidChar(read()) - } - - read(); - lexState = 'multiLineComment'; - }, - - singleLineComment () { - switch (c) { - case '\n': - case '\r': - case '\u2028': - case '\u2029': - read(); - lexState = 'default'; - return - - case undefined: - read(); - return newToken('eof') - } - - read(); - }, - - value () { - switch (c) { - case '{': - case '[': - return newToken('punctuator', read()) - - case 'n': - read(); - literal('ull'); - return newToken('null', null) - - case 't': - read(); - literal('rue'); - return newToken('boolean', true) - - case 'f': - read(); - literal('alse'); - return newToken('boolean', false) - - case '-': - case '+': - if (read() === '-') { - sign = -1; - } - - lexState = 'sign'; - return - - case '.': - buffer = read(); - lexState = 'decimalPointLeading'; - return - - case '0': - buffer = read(); - lexState = 'zero'; - return - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - buffer = read(); - lexState = 'decimalInteger'; - return - - case 'I': - read(); - literal('nfinity'); - return newToken('numeric', Infinity) - - case 'N': - read(); - literal('aN'); - return newToken('numeric', NaN) - - case '"': - case "'": - doubleQuote = (read() === '"'); - buffer = ''; - lexState = 'string'; - return - } - - throw invalidChar(read()) - }, - - identifierNameStartEscape () { - if (c !== 'u') { - throw invalidChar(read()) - } - - read(); - const u = unicodeEscape(); - switch (u) { - case '$': - case '_': - break - - default: - if (!util.isIdStartChar(u)) { - throw invalidIdentifier() - } - - break - } - - buffer += u; - lexState = 'identifierName'; - }, - - identifierName () { - switch (c) { - case '$': - case '_': - case '\u200C': - case '\u200D': - buffer += read(); - return - - case '\\': - read(); - lexState = 'identifierNameEscape'; - return - } - - if (util.isIdContinueChar(c)) { - buffer += read(); - return - } - - return newToken('identifier', buffer) - }, - - identifierNameEscape () { - if (c !== 'u') { - throw invalidChar(read()) - } - - read(); - const u = unicodeEscape(); - switch (u) { - case '$': - case '_': - case '\u200C': - case '\u200D': - break - - default: - if (!util.isIdContinueChar(u)) { - throw invalidIdentifier() - } - - break - } - - buffer += u; - lexState = 'identifierName'; - }, - - sign () { - switch (c) { - case '.': - buffer = read(); - lexState = 'decimalPointLeading'; - return - - case '0': - buffer = read(); - lexState = 'zero'; - return - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - buffer = read(); - lexState = 'decimalInteger'; - return - - case 'I': - read(); - literal('nfinity'); - return newToken('numeric', sign * Infinity) - - case 'N': - read(); - literal('aN'); - return newToken('numeric', NaN) - } - - throw invalidChar(read()) - }, - - zero () { - switch (c) { - case '.': - buffer += read(); - lexState = 'decimalPoint'; - return - - case 'e': - case 'E': - buffer += read(); - lexState = 'decimalExponent'; - return - - case 'x': - case 'X': - buffer += read(); - lexState = 'hexadecimal'; - return - } - - return newToken('numeric', sign * 0) - }, - - decimalInteger () { - switch (c) { - case '.': - buffer += read(); - lexState = 'decimalPoint'; - return - - case 'e': - case 'E': - buffer += read(); - lexState = 'decimalExponent'; - return - } - - if (util.isDigit(c)) { - buffer += read(); - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalPointLeading () { - if (util.isDigit(c)) { - buffer += read(); - lexState = 'decimalFraction'; - return - } - - throw invalidChar(read()) - }, - - decimalPoint () { - switch (c) { - case 'e': - case 'E': - buffer += read(); - lexState = 'decimalExponent'; - return - } - - if (util.isDigit(c)) { - buffer += read(); - lexState = 'decimalFraction'; - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalFraction () { - switch (c) { - case 'e': - case 'E': - buffer += read(); - lexState = 'decimalExponent'; - return - } - - if (util.isDigit(c)) { - buffer += read(); - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalExponent () { - switch (c) { - case '+': - case '-': - buffer += read(); - lexState = 'decimalExponentSign'; - return - } - - if (util.isDigit(c)) { - buffer += read(); - lexState = 'decimalExponentInteger'; - return - } - - throw invalidChar(read()) - }, - - decimalExponentSign () { - if (util.isDigit(c)) { - buffer += read(); - lexState = 'decimalExponentInteger'; - return - } - - throw invalidChar(read()) - }, - - decimalExponentInteger () { - if (util.isDigit(c)) { - buffer += read(); - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - hexadecimal () { - if (util.isHexDigit(c)) { - buffer += read(); - lexState = 'hexadecimalInteger'; - return - } - - throw invalidChar(read()) - }, - - hexadecimalInteger () { - if (util.isHexDigit(c)) { - buffer += read(); - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - string () { - switch (c) { - case '\\': - read(); - buffer += escape(); - return - - case '"': - if (doubleQuote) { - read(); - return newToken('string', buffer) - } - - buffer += read(); - return - - case "'": - if (!doubleQuote) { - read(); - return newToken('string', buffer) - } - - buffer += read(); - return - - case '\n': - case '\r': - throw invalidChar(read()) - - case '\u2028': - case '\u2029': - separatorChar(c); - break - - case undefined: - throw invalidChar(read()) - } - - buffer += read(); - }, - - start () { - switch (c) { - case '{': - case '[': - return newToken('punctuator', read()) - - // This code is unreachable since the default lexState handles eof. - // case undefined: - // return newToken('eof') - } - - lexState = 'value'; - }, - - beforePropertyName () { - switch (c) { - case '$': - case '_': - buffer = read(); - lexState = 'identifierName'; - return - - case '\\': - read(); - lexState = 'identifierNameStartEscape'; - return - - case '}': - return newToken('punctuator', read()) - - case '"': - case "'": - doubleQuote = (read() === '"'); - lexState = 'string'; - return - } - - if (util.isIdStartChar(c)) { - buffer += read(); - lexState = 'identifierName'; - return - } - - throw invalidChar(read()) - }, - - afterPropertyName () { - if (c === ':') { - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - beforePropertyValue () { - lexState = 'value'; - }, - - afterPropertyValue () { - switch (c) { - case ',': - case '}': - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - beforeArrayValue () { - if (c === ']') { - return newToken('punctuator', read()) - } - - lexState = 'value'; - }, - - afterArrayValue () { - switch (c) { - case ',': - case ']': - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - end () { - // This code is unreachable since it's handled by the default lexState. - // if (c === undefined) { - // read() - // return newToken('eof') - // } - - throw invalidChar(read()) - }, -}; - -function newToken (type, value) { - return { - type, - value, - line, - column, - } -} - -function literal (s) { - for (const c of s) { - const p = peek(); - - if (p !== c) { - throw invalidChar(read()) - } - - read(); - } -} - -function escape () { - const c = peek(); - switch (c) { - case 'b': - read(); - return '\b' - - case 'f': - read(); - return '\f' - - case 'n': - read(); - return '\n' - - case 'r': - read(); - return '\r' - - case 't': - read(); - return '\t' - - case 'v': - read(); - return '\v' - - case '0': - read(); - if (util.isDigit(peek())) { - throw invalidChar(read()) - } - - return '\0' - - case 'x': - read(); - return hexEscape() - - case 'u': - read(); - return unicodeEscape() - - case '\n': - case '\u2028': - case '\u2029': - read(); - return '' - - case '\r': - read(); - if (peek() === '\n') { - read(); - } - - return '' - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - throw invalidChar(read()) - - case undefined: - throw invalidChar(read()) - } - - return read() -} - -function hexEscape () { - let buffer = ''; - let c = peek(); - - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read(); - - c = peek(); - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read(); - - return String.fromCodePoint(parseInt(buffer, 16)) -} - -function unicodeEscape () { - let buffer = ''; - let count = 4; - - while (count-- > 0) { - const c = peek(); - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read(); - } - - return String.fromCodePoint(parseInt(buffer, 16)) -} - -const parseStates = { - start () { - if (token.type === 'eof') { - throw invalidEOF() - } - - push(); - }, - - beforePropertyName () { - switch (token.type) { - case 'identifier': - case 'string': - key = token.value; - parseState = 'afterPropertyName'; - return - - case 'punctuator': - // This code is unreachable since it's handled by the lexState. - // if (token.value !== '}') { - // throw invalidToken() - // } - - pop(); - return - - case 'eof': - throw invalidEOF() - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - afterPropertyName () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator' || token.value !== ':') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - parseState = 'beforePropertyValue'; - }, - - beforePropertyValue () { - if (token.type === 'eof') { - throw invalidEOF() - } - - push(); - }, - - beforeArrayValue () { - if (token.type === 'eof') { - throw invalidEOF() - } - - if (token.type === 'punctuator' && token.value === ']') { - pop(); - return - } - - push(); - }, - - afterPropertyValue () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - switch (token.value) { - case ',': - parseState = 'beforePropertyName'; - return - - case '}': - pop(); - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - afterArrayValue () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - switch (token.value) { - case ',': - parseState = 'beforeArrayValue'; - return - - case ']': - pop(); - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - end () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'eof') { - // throw invalidToken() - // } - }, -}; - -function push () { - let value; - - switch (token.type) { - case 'punctuator': - switch (token.value) { - case '{': - value = {}; - break - - case '[': - value = []; - break - } - - break - - case 'null': - case 'boolean': - case 'numeric': - case 'string': - value = token.value; - break - - // This code is unreachable. - // default: - // throw invalidToken() - } - - if (root === undefined) { - root = value; - } else { - const parent = stack[stack.length - 1]; - if (Array.isArray(parent)) { - parent.push(value); - } else { - parent[key] = value; - } - } - - if (value !== null && typeof value === 'object') { - stack.push(value); - - if (Array.isArray(value)) { - parseState = 'beforeArrayValue'; - } else { - parseState = 'beforePropertyName'; - } - } else { - const current = stack[stack.length - 1]; - if (current == null) { - parseState = 'end'; - } else if (Array.isArray(current)) { - parseState = 'afterArrayValue'; - } else { - parseState = 'afterPropertyValue'; - } - } -} - -function pop () { - stack.pop(); - - const current = stack[stack.length - 1]; - if (current == null) { - parseState = 'end'; - } else if (Array.isArray(current)) { - parseState = 'afterArrayValue'; - } else { - parseState = 'afterPropertyValue'; - } -} - -// This code is unreachable. -// function invalidParseState () { -// return new Error(`JSON5: invalid parse state '${parseState}'`) -// } - -// This code is unreachable. -// function invalidLexState (state) { -// return new Error(`JSON5: invalid lex state '${state}'`) -// } - -function invalidChar (c) { - if (c === undefined) { - return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) - } - - return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) -} - -function invalidEOF () { - return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) -} - -// This code is unreachable. -// function invalidToken () { -// if (token.type === 'eof') { -// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) -// } - -// const c = String.fromCodePoint(token.value.codePointAt(0)) -// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) -// } - -function invalidIdentifier () { - column -= 5; - return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`) -} - -function separatorChar (c) { - console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`); -} - -function formatChar (c) { - const replacements = { - "'": "\\'", - '"': '\\"', - '\\': '\\\\', - '\b': '\\b', - '\f': '\\f', - '\n': '\\n', - '\r': '\\r', - '\t': '\\t', - '\v': '\\v', - '\0': '\\0', - '\u2028': '\\u2028', - '\u2029': '\\u2029', - }; - - if (replacements[c]) { - return replacements[c] - } - - if (c < ' ') { - const hexString = c.charCodeAt(0).toString(16); - return '\\x' + ('00' + hexString).substring(hexString.length) - } - - return c -} - -function syntaxError (message) { - const err = new SyntaxError(message); - err.lineNumber = line; - err.columnNumber = column; - return err -} - -var stringify = function stringify (value, replacer, space) { - const stack = []; - let indent = ''; - let propertyList; - let replacerFunc; - let gap = ''; - let quote; - - if ( - replacer != null && - typeof replacer === 'object' && - !Array.isArray(replacer) - ) { - space = replacer.space; - quote = replacer.quote; - replacer = replacer.replacer; - } - - if (typeof replacer === 'function') { - replacerFunc = replacer; - } else if (Array.isArray(replacer)) { - propertyList = []; - for (const v of replacer) { - let item; - - if (typeof v === 'string') { - item = v; - } else if ( - typeof v === 'number' || - v instanceof String || - v instanceof Number - ) { - item = String(v); - } - - if (item !== undefined && propertyList.indexOf(item) < 0) { - propertyList.push(item); - } - } - } - - if (space instanceof Number) { - space = Number(space); - } else if (space instanceof String) { - space = String(space); - } - - if (typeof space === 'number') { - if (space > 0) { - space = Math.min(10, Math.floor(space)); - gap = ' '.substr(0, space); - } - } else if (typeof space === 'string') { - gap = space.substr(0, 10); - } - - return serializeProperty('', {'': value}) - - function serializeProperty (key, holder) { - let value = holder[key]; - if (value != null) { - if (typeof value.toJSON5 === 'function') { - value = value.toJSON5(key); - } else if (typeof value.toJSON === 'function') { - value = value.toJSON(key); - } - } - - if (replacerFunc) { - value = replacerFunc.call(holder, key, value); - } - - if (value instanceof Number) { - value = Number(value); - } else if (value instanceof String) { - value = String(value); - } else if (value instanceof Boolean) { - value = value.valueOf(); - } - - switch (value) { - case null: return 'null' - case true: return 'true' - case false: return 'false' - } - - if (typeof value === 'string') { - return quoteString(value, false) - } - - if (typeof value === 'number') { - return String(value) - } - - if (typeof value === 'object') { - return Array.isArray(value) ? serializeArray(value) : serializeObject(value) - } - - return undefined - } - - function quoteString (value) { - const quotes = { - "'": 0.1, - '"': 0.2, - }; - - const replacements = { - "'": "\\'", - '"': '\\"', - '\\': '\\\\', - '\b': '\\b', - '\f': '\\f', - '\n': '\\n', - '\r': '\\r', - '\t': '\\t', - '\v': '\\v', - '\0': '\\0', - '\u2028': '\\u2028', - '\u2029': '\\u2029', - }; - - let product = ''; - - for (let i = 0; i < value.length; i++) { - const c = value[i]; - switch (c) { - case "'": - case '"': - quotes[c]++; - product += c; - continue - - case '\0': - if (util.isDigit(value[i + 1])) { - product += '\\x00'; - continue - } - } - - if (replacements[c]) { - product += replacements[c]; - continue - } - - if (c < ' ') { - let hexString = c.charCodeAt(0).toString(16); - product += '\\x' + ('00' + hexString).substring(hexString.length); - continue - } - - product += c; - } - - const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b); - - product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]); - - return quoteChar + product + quoteChar - } - - function serializeObject (value) { - if (stack.indexOf(value) >= 0) { - throw TypeError('Converting circular structure to JSON5') - } - - stack.push(value); - - let stepback = indent; - indent = indent + gap; - - let keys = propertyList || Object.keys(value); - let partial = []; - for (const key of keys) { - const propertyString = serializeProperty(key, value); - if (propertyString !== undefined) { - let member = serializeKey(key) + ':'; - if (gap !== '') { - member += ' '; - } - member += propertyString; - partial.push(member); - } - } - - let final; - if (partial.length === 0) { - final = '{}'; - } else { - let properties; - if (gap === '') { - properties = partial.join(','); - final = '{' + properties + '}'; - } else { - let separator = ',\n' + indent; - properties = partial.join(separator); - final = '{\n' + indent + properties + ',\n' + stepback + '}'; - } - } - - stack.pop(); - indent = stepback; - return final - } - - function serializeKey (key) { - if (key.length === 0) { - return quoteString(key, true) - } - - const firstChar = String.fromCodePoint(key.codePointAt(0)); - if (!util.isIdStartChar(firstChar)) { - return quoteString(key, true) - } - - for (let i = firstChar.length; i < key.length; i++) { - if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { - return quoteString(key, true) - } - } - - return key - } - - function serializeArray (value) { - if (stack.indexOf(value) >= 0) { - throw TypeError('Converting circular structure to JSON5') - } - - stack.push(value); - - let stepback = indent; - indent = indent + gap; - - let partial = []; - for (let i = 0; i < value.length; i++) { - const propertyString = serializeProperty(String(i), value); - partial.push((propertyString !== undefined) ? propertyString : 'null'); - } - - let final; - if (partial.length === 0) { - final = '[]'; - } else { - if (gap === '') { - let properties = partial.join(','); - final = '[' + properties + ']'; - } else { - let separator = ',\n' + indent; - let properties = partial.join(separator); - final = '[\n' + indent + properties + ',\n' + stepback + ']'; - } - } - - stack.pop(); - indent = stepback; - return final - } -}; - -const JSON5 = { - parse, - stringify, -}; - -var lib = JSON5; - -export default lib; diff --git a/node_modules/json5/lib/cli.js b/node_modules/json5/lib/cli.js deleted file mode 100755 index de852f15..00000000 --- a/node_modules/json5/lib/cli.js +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/env node - -const fs = require('fs') -const path = require('path') -const minimist = require('minimist') -const pkg = require('../package.json') -const JSON5 = require('./') - -const argv = minimist(process.argv.slice(2), { - alias: { - 'convert': 'c', - 'space': 's', - 'validate': 'v', - 'out-file': 'o', - 'version': 'V', - 'help': 'h', - }, - boolean: [ - 'convert', - 'validate', - 'version', - 'help', - ], - string: [ - 'space', - 'out-file', - ], -}) - -if (argv.version) { - version() -} else if (argv.help) { - usage() -} else { - const inFilename = argv._[0] - - let readStream - if (inFilename) { - readStream = fs.createReadStream(inFilename) - } else { - readStream = process.stdin - } - - let json5 = '' - readStream.on('data', data => { - json5 += data - }) - - readStream.on('end', () => { - let space - if (argv.space === 't' || argv.space === 'tab') { - space = '\t' - } else { - space = Number(argv.space) - } - - let value - try { - value = JSON5.parse(json5) - if (!argv.validate) { - const json = JSON.stringify(value, null, space) - - let writeStream - - // --convert is for backward compatibility with v0.5.1. If - // specified with and not --out-file, then a file with - // the same name but with a .json extension will be written. - if (argv.convert && inFilename && !argv.o) { - const parsedFilename = path.parse(inFilename) - const outFilename = path.format( - Object.assign( - parsedFilename, - {base: path.basename(parsedFilename.base, parsedFilename.ext) + '.json'} - ) - ) - - writeStream = fs.createWriteStream(outFilename) - } else if (argv.o) { - writeStream = fs.createWriteStream(argv.o) - } else { - writeStream = process.stdout - } - - writeStream.write(json) - } - } catch (err) { - console.error(err.message) - process.exit(1) - } - }) -} - -function version () { - console.log(pkg.version) -} - -function usage () { - console.log( - ` - Usage: json5 [options] - - If is not provided, then STDIN is used. - - Options: - - -s, --space The number of spaces to indent or 't' for tabs - -o, --out-file [file] Output to the specified file, otherwise STDOUT - -v, --validate Validate JSON5 but do not output JSON - -V, --version Output the version number - -h, --help Output usage information` - ) -} diff --git a/node_modules/json5/lib/index.d.ts b/node_modules/json5/lib/index.d.ts deleted file mode 100644 index 1c45bca5..00000000 --- a/node_modules/json5/lib/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import parse = require('./parse') -import stringify = require('./stringify') - -export {parse, stringify} diff --git a/node_modules/json5/lib/index.js b/node_modules/json5/lib/index.js deleted file mode 100644 index 36796388..00000000 --- a/node_modules/json5/lib/index.js +++ /dev/null @@ -1,9 +0,0 @@ -const parse = require('./parse') -const stringify = require('./stringify') - -const JSON5 = { - parse, - stringify, -} - -module.exports = JSON5 diff --git a/node_modules/json5/lib/parse.d.ts b/node_modules/json5/lib/parse.d.ts deleted file mode 100644 index 8c8d883a..00000000 --- a/node_modules/json5/lib/parse.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Parses a JSON5 string, constructing the JavaScript value or object described - * by the string. - * @template T The type of the return value. - * @param text The string to parse as JSON5. - * @param reviver A function that prescribes how the value originally produced - * by parsing is transformed before being returned. - * @returns The JavaScript value converted from the JSON5 string. - */ -declare function parse( - text: string, - reviver?: ((this: any, key: string, value: any) => any) | null, -): T - -export = parse diff --git a/node_modules/json5/lib/parse.js b/node_modules/json5/lib/parse.js deleted file mode 100644 index c01646fc..00000000 --- a/node_modules/json5/lib/parse.js +++ /dev/null @@ -1,1087 +0,0 @@ -const util = require('./util') - -let source -let parseState -let stack -let pos -let line -let column -let token -let key -let root - -module.exports = function parse (text, reviver) { - source = String(text) - parseState = 'start' - stack = [] - pos = 0 - line = 1 - column = 0 - token = undefined - key = undefined - root = undefined - - do { - token = lex() - - // This code is unreachable. - // if (!parseStates[parseState]) { - // throw invalidParseState() - // } - - parseStates[parseState]() - } while (token.type !== 'eof') - - if (typeof reviver === 'function') { - return internalize({'': root}, '', reviver) - } - - return root -} - -function internalize (holder, name, reviver) { - const value = holder[name] - if (value != null && typeof value === 'object') { - for (const key in value) { - const replacement = internalize(value, key, reviver) - if (replacement === undefined) { - delete value[key] - } else { - value[key] = replacement - } - } - } - - return reviver.call(holder, name, value) -} - -let lexState -let buffer -let doubleQuote -let sign -let c - -function lex () { - lexState = 'default' - buffer = '' - doubleQuote = false - sign = 1 - - for (;;) { - c = peek() - - // This code is unreachable. - // if (!lexStates[lexState]) { - // throw invalidLexState(lexState) - // } - - const token = lexStates[lexState]() - if (token) { - return token - } - } -} - -function peek () { - if (source[pos]) { - return String.fromCodePoint(source.codePointAt(pos)) - } -} - -function read () { - const c = peek() - - if (c === '\n') { - line++ - column = 0 - } else if (c) { - column += c.length - } else { - column++ - } - - if (c) { - pos += c.length - } - - return c -} - -const lexStates = { - default () { - switch (c) { - case '\t': - case '\v': - case '\f': - case ' ': - case '\u00A0': - case '\uFEFF': - case '\n': - case '\r': - case '\u2028': - case '\u2029': - read() - return - - case '/': - read() - lexState = 'comment' - return - - case undefined: - read() - return newToken('eof') - } - - if (util.isSpaceSeparator(c)) { - read() - return - } - - // This code is unreachable. - // if (!lexStates[parseState]) { - // throw invalidLexState(parseState) - // } - - return lexStates[parseState]() - }, - - comment () { - switch (c) { - case '*': - read() - lexState = 'multiLineComment' - return - - case '/': - read() - lexState = 'singleLineComment' - return - } - - throw invalidChar(read()) - }, - - multiLineComment () { - switch (c) { - case '*': - read() - lexState = 'multiLineCommentAsterisk' - return - - case undefined: - throw invalidChar(read()) - } - - read() - }, - - multiLineCommentAsterisk () { - switch (c) { - case '*': - read() - return - - case '/': - read() - lexState = 'default' - return - - case undefined: - throw invalidChar(read()) - } - - read() - lexState = 'multiLineComment' - }, - - singleLineComment () { - switch (c) { - case '\n': - case '\r': - case '\u2028': - case '\u2029': - read() - lexState = 'default' - return - - case undefined: - read() - return newToken('eof') - } - - read() - }, - - value () { - switch (c) { - case '{': - case '[': - return newToken('punctuator', read()) - - case 'n': - read() - literal('ull') - return newToken('null', null) - - case 't': - read() - literal('rue') - return newToken('boolean', true) - - case 'f': - read() - literal('alse') - return newToken('boolean', false) - - case '-': - case '+': - if (read() === '-') { - sign = -1 - } - - lexState = 'sign' - return - - case '.': - buffer = read() - lexState = 'decimalPointLeading' - return - - case '0': - buffer = read() - lexState = 'zero' - return - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - buffer = read() - lexState = 'decimalInteger' - return - - case 'I': - read() - literal('nfinity') - return newToken('numeric', Infinity) - - case 'N': - read() - literal('aN') - return newToken('numeric', NaN) - - case '"': - case "'": - doubleQuote = (read() === '"') - buffer = '' - lexState = 'string' - return - } - - throw invalidChar(read()) - }, - - identifierNameStartEscape () { - if (c !== 'u') { - throw invalidChar(read()) - } - - read() - const u = unicodeEscape() - switch (u) { - case '$': - case '_': - break - - default: - if (!util.isIdStartChar(u)) { - throw invalidIdentifier() - } - - break - } - - buffer += u - lexState = 'identifierName' - }, - - identifierName () { - switch (c) { - case '$': - case '_': - case '\u200C': - case '\u200D': - buffer += read() - return - - case '\\': - read() - lexState = 'identifierNameEscape' - return - } - - if (util.isIdContinueChar(c)) { - buffer += read() - return - } - - return newToken('identifier', buffer) - }, - - identifierNameEscape () { - if (c !== 'u') { - throw invalidChar(read()) - } - - read() - const u = unicodeEscape() - switch (u) { - case '$': - case '_': - case '\u200C': - case '\u200D': - break - - default: - if (!util.isIdContinueChar(u)) { - throw invalidIdentifier() - } - - break - } - - buffer += u - lexState = 'identifierName' - }, - - sign () { - switch (c) { - case '.': - buffer = read() - lexState = 'decimalPointLeading' - return - - case '0': - buffer = read() - lexState = 'zero' - return - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - buffer = read() - lexState = 'decimalInteger' - return - - case 'I': - read() - literal('nfinity') - return newToken('numeric', sign * Infinity) - - case 'N': - read() - literal('aN') - return newToken('numeric', NaN) - } - - throw invalidChar(read()) - }, - - zero () { - switch (c) { - case '.': - buffer += read() - lexState = 'decimalPoint' - return - - case 'e': - case 'E': - buffer += read() - lexState = 'decimalExponent' - return - - case 'x': - case 'X': - buffer += read() - lexState = 'hexadecimal' - return - } - - return newToken('numeric', sign * 0) - }, - - decimalInteger () { - switch (c) { - case '.': - buffer += read() - lexState = 'decimalPoint' - return - - case 'e': - case 'E': - buffer += read() - lexState = 'decimalExponent' - return - } - - if (util.isDigit(c)) { - buffer += read() - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalPointLeading () { - if (util.isDigit(c)) { - buffer += read() - lexState = 'decimalFraction' - return - } - - throw invalidChar(read()) - }, - - decimalPoint () { - switch (c) { - case 'e': - case 'E': - buffer += read() - lexState = 'decimalExponent' - return - } - - if (util.isDigit(c)) { - buffer += read() - lexState = 'decimalFraction' - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalFraction () { - switch (c) { - case 'e': - case 'E': - buffer += read() - lexState = 'decimalExponent' - return - } - - if (util.isDigit(c)) { - buffer += read() - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalExponent () { - switch (c) { - case '+': - case '-': - buffer += read() - lexState = 'decimalExponentSign' - return - } - - if (util.isDigit(c)) { - buffer += read() - lexState = 'decimalExponentInteger' - return - } - - throw invalidChar(read()) - }, - - decimalExponentSign () { - if (util.isDigit(c)) { - buffer += read() - lexState = 'decimalExponentInteger' - return - } - - throw invalidChar(read()) - }, - - decimalExponentInteger () { - if (util.isDigit(c)) { - buffer += read() - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - hexadecimal () { - if (util.isHexDigit(c)) { - buffer += read() - lexState = 'hexadecimalInteger' - return - } - - throw invalidChar(read()) - }, - - hexadecimalInteger () { - if (util.isHexDigit(c)) { - buffer += read() - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - string () { - switch (c) { - case '\\': - read() - buffer += escape() - return - - case '"': - if (doubleQuote) { - read() - return newToken('string', buffer) - } - - buffer += read() - return - - case "'": - if (!doubleQuote) { - read() - return newToken('string', buffer) - } - - buffer += read() - return - - case '\n': - case '\r': - throw invalidChar(read()) - - case '\u2028': - case '\u2029': - separatorChar(c) - break - - case undefined: - throw invalidChar(read()) - } - - buffer += read() - }, - - start () { - switch (c) { - case '{': - case '[': - return newToken('punctuator', read()) - - // This code is unreachable since the default lexState handles eof. - // case undefined: - // return newToken('eof') - } - - lexState = 'value' - }, - - beforePropertyName () { - switch (c) { - case '$': - case '_': - buffer = read() - lexState = 'identifierName' - return - - case '\\': - read() - lexState = 'identifierNameStartEscape' - return - - case '}': - return newToken('punctuator', read()) - - case '"': - case "'": - doubleQuote = (read() === '"') - lexState = 'string' - return - } - - if (util.isIdStartChar(c)) { - buffer += read() - lexState = 'identifierName' - return - } - - throw invalidChar(read()) - }, - - afterPropertyName () { - if (c === ':') { - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - beforePropertyValue () { - lexState = 'value' - }, - - afterPropertyValue () { - switch (c) { - case ',': - case '}': - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - beforeArrayValue () { - if (c === ']') { - return newToken('punctuator', read()) - } - - lexState = 'value' - }, - - afterArrayValue () { - switch (c) { - case ',': - case ']': - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - end () { - // This code is unreachable since it's handled by the default lexState. - // if (c === undefined) { - // read() - // return newToken('eof') - // } - - throw invalidChar(read()) - }, -} - -function newToken (type, value) { - return { - type, - value, - line, - column, - } -} - -function literal (s) { - for (const c of s) { - const p = peek() - - if (p !== c) { - throw invalidChar(read()) - } - - read() - } -} - -function escape () { - const c = peek() - switch (c) { - case 'b': - read() - return '\b' - - case 'f': - read() - return '\f' - - case 'n': - read() - return '\n' - - case 'r': - read() - return '\r' - - case 't': - read() - return '\t' - - case 'v': - read() - return '\v' - - case '0': - read() - if (util.isDigit(peek())) { - throw invalidChar(read()) - } - - return '\0' - - case 'x': - read() - return hexEscape() - - case 'u': - read() - return unicodeEscape() - - case '\n': - case '\u2028': - case '\u2029': - read() - return '' - - case '\r': - read() - if (peek() === '\n') { - read() - } - - return '' - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - throw invalidChar(read()) - - case undefined: - throw invalidChar(read()) - } - - return read() -} - -function hexEscape () { - let buffer = '' - let c = peek() - - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read() - - c = peek() - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read() - - return String.fromCodePoint(parseInt(buffer, 16)) -} - -function unicodeEscape () { - let buffer = '' - let count = 4 - - while (count-- > 0) { - const c = peek() - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read() - } - - return String.fromCodePoint(parseInt(buffer, 16)) -} - -const parseStates = { - start () { - if (token.type === 'eof') { - throw invalidEOF() - } - - push() - }, - - beforePropertyName () { - switch (token.type) { - case 'identifier': - case 'string': - key = token.value - parseState = 'afterPropertyName' - return - - case 'punctuator': - // This code is unreachable since it's handled by the lexState. - // if (token.value !== '}') { - // throw invalidToken() - // } - - pop() - return - - case 'eof': - throw invalidEOF() - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - afterPropertyName () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator' || token.value !== ':') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - parseState = 'beforePropertyValue' - }, - - beforePropertyValue () { - if (token.type === 'eof') { - throw invalidEOF() - } - - push() - }, - - beforeArrayValue () { - if (token.type === 'eof') { - throw invalidEOF() - } - - if (token.type === 'punctuator' && token.value === ']') { - pop() - return - } - - push() - }, - - afterPropertyValue () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - switch (token.value) { - case ',': - parseState = 'beforePropertyName' - return - - case '}': - pop() - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - afterArrayValue () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - switch (token.value) { - case ',': - parseState = 'beforeArrayValue' - return - - case ']': - pop() - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - end () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'eof') { - // throw invalidToken() - // } - }, -} - -function push () { - let value - - switch (token.type) { - case 'punctuator': - switch (token.value) { - case '{': - value = {} - break - - case '[': - value = [] - break - } - - break - - case 'null': - case 'boolean': - case 'numeric': - case 'string': - value = token.value - break - - // This code is unreachable. - // default: - // throw invalidToken() - } - - if (root === undefined) { - root = value - } else { - const parent = stack[stack.length - 1] - if (Array.isArray(parent)) { - parent.push(value) - } else { - parent[key] = value - } - } - - if (value !== null && typeof value === 'object') { - stack.push(value) - - if (Array.isArray(value)) { - parseState = 'beforeArrayValue' - } else { - parseState = 'beforePropertyName' - } - } else { - const current = stack[stack.length - 1] - if (current == null) { - parseState = 'end' - } else if (Array.isArray(current)) { - parseState = 'afterArrayValue' - } else { - parseState = 'afterPropertyValue' - } - } -} - -function pop () { - stack.pop() - - const current = stack[stack.length - 1] - if (current == null) { - parseState = 'end' - } else if (Array.isArray(current)) { - parseState = 'afterArrayValue' - } else { - parseState = 'afterPropertyValue' - } -} - -// This code is unreachable. -// function invalidParseState () { -// return new Error(`JSON5: invalid parse state '${parseState}'`) -// } - -// This code is unreachable. -// function invalidLexState (state) { -// return new Error(`JSON5: invalid lex state '${state}'`) -// } - -function invalidChar (c) { - if (c === undefined) { - return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) - } - - return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) -} - -function invalidEOF () { - return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) -} - -// This code is unreachable. -// function invalidToken () { -// if (token.type === 'eof') { -// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) -// } - -// const c = String.fromCodePoint(token.value.codePointAt(0)) -// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) -// } - -function invalidIdentifier () { - column -= 5 - return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`) -} - -function separatorChar (c) { - console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`) -} - -function formatChar (c) { - const replacements = { - "'": "\\'", - '"': '\\"', - '\\': '\\\\', - '\b': '\\b', - '\f': '\\f', - '\n': '\\n', - '\r': '\\r', - '\t': '\\t', - '\v': '\\v', - '\0': '\\0', - '\u2028': '\\u2028', - '\u2029': '\\u2029', - } - - if (replacements[c]) { - return replacements[c] - } - - if (c < ' ') { - const hexString = c.charCodeAt(0).toString(16) - return '\\x' + ('00' + hexString).substring(hexString.length) - } - - return c -} - -function syntaxError (message) { - const err = new SyntaxError(message) - err.lineNumber = line - err.columnNumber = column - return err -} diff --git a/node_modules/json5/lib/register.js b/node_modules/json5/lib/register.js deleted file mode 100644 index 935cdbaf..00000000 --- a/node_modules/json5/lib/register.js +++ /dev/null @@ -1,13 +0,0 @@ -const fs = require('fs') -const JSON5 = require('./') - -// eslint-disable-next-line node/no-deprecated-api -require.extensions['.json5'] = function (module, filename) { - const content = fs.readFileSync(filename, 'utf8') - try { - module.exports = JSON5.parse(content) - } catch (err) { - err.message = filename + ': ' + err.message - throw err - } -} diff --git a/node_modules/json5/lib/require.js b/node_modules/json5/lib/require.js deleted file mode 100644 index 3aa29bee..00000000 --- a/node_modules/json5/lib/require.js +++ /dev/null @@ -1,4 +0,0 @@ -// This file is for backward compatibility with v0.5.1. -require('./register') - -console.warn("'json5/require' is deprecated. Please use 'json5/register' instead.") diff --git a/node_modules/json5/lib/stringify.d.ts b/node_modules/json5/lib/stringify.d.ts deleted file mode 100644 index 3c348389..00000000 --- a/node_modules/json5/lib/stringify.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -declare type StringifyOptions = { - /** - * A function that alters the behavior of the stringification process, or an - * array of String and Number objects that serve as a allowlist for - * selecting/filtering the properties of the value object to be included in - * the JSON5 string. If this value is null or not provided, all properties - * of the object are included in the resulting JSON5 string. - */ - replacer?: - | ((this: any, key: string, value: any) => any) - | (string | number)[] - | null - - /** - * A String or Number object that's used to insert white space into the - * output JSON5 string for readability purposes. If this is a Number, it - * indicates the number of space characters to use as white space; this - * number is capped at 10 (if it is greater, the value is just 10). Values - * less than 1 indicate that no space should be used. If this is a String, - * the string (or the first 10 characters of the string, if it's longer than - * that) is used as white space. If this parameter is not provided (or is - * null), no white space is used. If white space is used, trailing commas - * will be used in objects and arrays. - */ - space?: string | number | null - - /** - * A String representing the quote character to use when serializing - * strings. - */ - quote?: string | null -} - -/** - * Converts a JavaScript value to a JSON5 string. - * @param value The value to convert to a JSON5 string. - * @param replacer A function that alters the behavior of the stringification - * process. If this value is null or not provided, all properties of the object - * are included in the resulting JSON5 string. - * @param space A String or Number object that's used to insert white space into - * the output JSON5 string for readability purposes. If this is a Number, it - * indicates the number of space characters to use as white space; this number - * is capped at 10 (if it is greater, the value is just 10). Values less than 1 - * indicate that no space should be used. If this is a String, the string (or - * the first 10 characters of the string, if it's longer than that) is used as - * white space. If this parameter is not provided (or is null), no white space - * is used. If white space is used, trailing commas will be used in objects and - * arrays. - * @returns The JSON5 string converted from the JavaScript value. - */ -declare function stringify( - value: any, - replacer?: ((this: any, key: string, value: any) => any) | null, - space?: string | number | null, -): string - -/** - * Converts a JavaScript value to a JSON5 string. - * @param value The value to convert to a JSON5 string. - * @param replacer An array of String and Number objects that serve as a - * allowlist for selecting/filtering the properties of the value object to be - * included in the JSON5 string. If this value is null or not provided, all - * properties of the object are included in the resulting JSON5 string. - * @param space A String or Number object that's used to insert white space into - * the output JSON5 string for readability purposes. If this is a Number, it - * indicates the number of space characters to use as white space; this number - * is capped at 10 (if it is greater, the value is just 10). Values less than 1 - * indicate that no space should be used. If this is a String, the string (or - * the first 10 characters of the string, if it's longer than that) is used as - * white space. If this parameter is not provided (or is null), no white space - * is used. If white space is used, trailing commas will be used in objects and - * arrays. - * @returns The JSON5 string converted from the JavaScript value. - */ -declare function stringify( - value: any, - replacer: (string | number)[], - space?: string | number | null, -): string - -/** - * Converts a JavaScript value to a JSON5 string. - * @param value The value to convert to a JSON5 string. - * @param options An object specifying options. - * @returns The JSON5 string converted from the JavaScript value. - */ -declare function stringify(value: any, options: StringifyOptions): string - -export = stringify diff --git a/node_modules/json5/lib/stringify.js b/node_modules/json5/lib/stringify.js deleted file mode 100644 index 7cb3b0e1..00000000 --- a/node_modules/json5/lib/stringify.js +++ /dev/null @@ -1,261 +0,0 @@ -const util = require('./util') - -module.exports = function stringify (value, replacer, space) { - const stack = [] - let indent = '' - let propertyList - let replacerFunc - let gap = '' - let quote - - if ( - replacer != null && - typeof replacer === 'object' && - !Array.isArray(replacer) - ) { - space = replacer.space - quote = replacer.quote - replacer = replacer.replacer - } - - if (typeof replacer === 'function') { - replacerFunc = replacer - } else if (Array.isArray(replacer)) { - propertyList = [] - for (const v of replacer) { - let item - - if (typeof v === 'string') { - item = v - } else if ( - typeof v === 'number' || - v instanceof String || - v instanceof Number - ) { - item = String(v) - } - - if (item !== undefined && propertyList.indexOf(item) < 0) { - propertyList.push(item) - } - } - } - - if (space instanceof Number) { - space = Number(space) - } else if (space instanceof String) { - space = String(space) - } - - if (typeof space === 'number') { - if (space > 0) { - space = Math.min(10, Math.floor(space)) - gap = ' '.substr(0, space) - } - } else if (typeof space === 'string') { - gap = space.substr(0, 10) - } - - return serializeProperty('', {'': value}) - - function serializeProperty (key, holder) { - let value = holder[key] - if (value != null) { - if (typeof value.toJSON5 === 'function') { - value = value.toJSON5(key) - } else if (typeof value.toJSON === 'function') { - value = value.toJSON(key) - } - } - - if (replacerFunc) { - value = replacerFunc.call(holder, key, value) - } - - if (value instanceof Number) { - value = Number(value) - } else if (value instanceof String) { - value = String(value) - } else if (value instanceof Boolean) { - value = value.valueOf() - } - - switch (value) { - case null: return 'null' - case true: return 'true' - case false: return 'false' - } - - if (typeof value === 'string') { - return quoteString(value, false) - } - - if (typeof value === 'number') { - return String(value) - } - - if (typeof value === 'object') { - return Array.isArray(value) ? serializeArray(value) : serializeObject(value) - } - - return undefined - } - - function quoteString (value) { - const quotes = { - "'": 0.1, - '"': 0.2, - } - - const replacements = { - "'": "\\'", - '"': '\\"', - '\\': '\\\\', - '\b': '\\b', - '\f': '\\f', - '\n': '\\n', - '\r': '\\r', - '\t': '\\t', - '\v': '\\v', - '\0': '\\0', - '\u2028': '\\u2028', - '\u2029': '\\u2029', - } - - let product = '' - - for (let i = 0; i < value.length; i++) { - const c = value[i] - switch (c) { - case "'": - case '"': - quotes[c]++ - product += c - continue - - case '\0': - if (util.isDigit(value[i + 1])) { - product += '\\x00' - continue - } - } - - if (replacements[c]) { - product += replacements[c] - continue - } - - if (c < ' ') { - let hexString = c.charCodeAt(0).toString(16) - product += '\\x' + ('00' + hexString).substring(hexString.length) - continue - } - - product += c - } - - const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b) - - product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]) - - return quoteChar + product + quoteChar - } - - function serializeObject (value) { - if (stack.indexOf(value) >= 0) { - throw TypeError('Converting circular structure to JSON5') - } - - stack.push(value) - - let stepback = indent - indent = indent + gap - - let keys = propertyList || Object.keys(value) - let partial = [] - for (const key of keys) { - const propertyString = serializeProperty(key, value) - if (propertyString !== undefined) { - let member = serializeKey(key) + ':' - if (gap !== '') { - member += ' ' - } - member += propertyString - partial.push(member) - } - } - - let final - if (partial.length === 0) { - final = '{}' - } else { - let properties - if (gap === '') { - properties = partial.join(',') - final = '{' + properties + '}' - } else { - let separator = ',\n' + indent - properties = partial.join(separator) - final = '{\n' + indent + properties + ',\n' + stepback + '}' - } - } - - stack.pop() - indent = stepback - return final - } - - function serializeKey (key) { - if (key.length === 0) { - return quoteString(key, true) - } - - const firstChar = String.fromCodePoint(key.codePointAt(0)) - if (!util.isIdStartChar(firstChar)) { - return quoteString(key, true) - } - - for (let i = firstChar.length; i < key.length; i++) { - if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { - return quoteString(key, true) - } - } - - return key - } - - function serializeArray (value) { - if (stack.indexOf(value) >= 0) { - throw TypeError('Converting circular structure to JSON5') - } - - stack.push(value) - - let stepback = indent - indent = indent + gap - - let partial = [] - for (let i = 0; i < value.length; i++) { - const propertyString = serializeProperty(String(i), value) - partial.push((propertyString !== undefined) ? propertyString : 'null') - } - - let final - if (partial.length === 0) { - final = '[]' - } else { - if (gap === '') { - let properties = partial.join(',') - final = '[' + properties + ']' - } else { - let separator = ',\n' + indent - let properties = partial.join(separator) - final = '[\n' + indent + properties + ',\n' + stepback + ']' - } - } - - stack.pop() - indent = stepback - return final - } -} diff --git a/node_modules/json5/lib/unicode.d.ts b/node_modules/json5/lib/unicode.d.ts deleted file mode 100644 index 610f8057..00000000 --- a/node_modules/json5/lib/unicode.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const Space_Separator: RegExp -export declare const ID_Start: RegExp -export declare const ID_Continue: RegExp diff --git a/node_modules/json5/lib/unicode.js b/node_modules/json5/lib/unicode.js deleted file mode 100644 index 215ccd84..00000000 --- a/node_modules/json5/lib/unicode.js +++ /dev/null @@ -1,4 +0,0 @@ -// This is a generated file. Do not edit. -module.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/ -module.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/ -module.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36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\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\u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]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ diff --git a/node_modules/json5/lib/util.d.ts b/node_modules/json5/lib/util.d.ts deleted file mode 100644 index a940cead..00000000 --- a/node_modules/json5/lib/util.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare function isSpaceSeparator(c?: string): boolean -export declare function isIdStartChar(c?: string): boolean -export declare function isIdContinueChar(c?: string): boolean -export declare function isDigit(c?: string): boolean -export declare function isHexDigit(c?: string): boolean diff --git a/node_modules/json5/lib/util.js b/node_modules/json5/lib/util.js deleted file mode 100644 index 40bfe2fa..00000000 --- a/node_modules/json5/lib/util.js +++ /dev/null @@ -1,35 +0,0 @@ -const unicode = require('../lib/unicode') - -module.exports = { - isSpaceSeparator (c) { - return typeof c === 'string' && unicode.Space_Separator.test(c) - }, - - isIdStartChar (c) { - return typeof c === 'string' && ( - (c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || - (c === '$') || (c === '_') || - unicode.ID_Start.test(c) - ) - }, - - isIdContinueChar (c) { - return typeof c === 'string' && ( - (c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || - (c >= '0' && c <= '9') || - (c === '$') || (c === '_') || - (c === '\u200C') || (c === '\u200D') || - unicode.ID_Continue.test(c) - ) - }, - - isDigit (c) { - return typeof c === 'string' && /[0-9]/.test(c) - }, - - isHexDigit (c) { - return typeof c === 'string' && /[0-9A-Fa-f]/.test(c) - }, -} diff --git a/node_modules/json5/package.json b/node_modules/json5/package.json deleted file mode 100644 index 97af4084..00000000 --- a/node_modules/json5/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "_from": "json5@~2.2", - "_id": "json5@2.2.0", - "_inBundle": false, - "_integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "_location": "/json5", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "json5@~2.2", - "name": "json5", - "escapedName": "json5", - "rawSpec": "~2.2", - "saveSpec": null, - "fetchSpec": "~2.2" - }, - "_requiredBy": [ - "/@antora/playbook-builder" - ], - "_resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "_shasum": "2dfefe720c6ba525d9ebd909950f0515316c89a3", - "_spec": "json5@~2.2", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/playbook-builder", - "author": { - "name": "Aseem Kishore", - "email": "aseem.kishore@gmail.com" - }, - "bin": { - "json5": "lib/cli.js" - }, - "browser": "dist/index.js", - "bugs": { - "url": "https://github.com/json5/json5/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Max Nanasy", - "email": "max.nanasy@gmail.com" - }, - { - "name": "Andrew Eisenberg", - "email": "andrew@eisenberg.as" - }, - { - "name": "Jordan Tucker", - "email": "jordanbtucker@gmail.com" - } - ], - "dependencies": { - "minimist": "^1.2.5" - }, - "deprecated": false, - "description": "JSON for humans.", - "devDependencies": { - "core-js": "^2.6.5", - "eslint": "^5.15.3", - "eslint-config-standard": "^12.0.0", - "eslint-plugin-import": "^2.16.0", - "eslint-plugin-node": "^8.0.1", - "eslint-plugin-promise": "^4.0.1", - "eslint-plugin-standard": "^4.0.0", - "regenerate": "^1.4.0", - "rollup": "^0.64.1", - "rollup-plugin-buble": "^0.19.6", - "rollup-plugin-commonjs": "^9.2.1", - "rollup-plugin-node-resolve": "^3.4.0", - "rollup-plugin-terser": "^1.0.1", - "sinon": "^6.3.5", - "tap": "^12.6.0", - "unicode-10.0.0": "^0.7.5" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "lib/", - "dist/" - ], - "homepage": "http://json5.org/", - "keywords": [ - "json", - "json5", - "es5", - "es2015", - "ecmascript" - ], - "license": "MIT", - "main": "lib/index.js", - "module": "dist/index.mjs", - "name": "json5", - "repository": { - "type": "git", - "url": "git+https://github.com/json5/json5.git" - }, - "scripts": { - "build": "rollup -c", - "build-package": "node build/package.js", - "build-unicode": "node build/unicode.js", - "coverage": "tap --coverage-report html test", - "lint": "eslint --fix .", - "prepublishOnly": "npm run production", - "preversion": "npm run production", - "production": "npm run lint && npm test && npm run build", - "test": "tap -Rspec --100 test", - "version": "npm run build-package && git add package.json5" - }, - "types": "lib/index.d.ts", - "version": "2.2.0" -} diff --git a/node_modules/lazystream/.npmignore b/node_modules/lazystream/.npmignore deleted file mode 100644 index baccd1c9..00000000 --- a/node_modules/lazystream/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -.DS_Store -npm-debug.log -node_modules/ -test/tmp/ diff --git a/node_modules/lazystream/.travis.yml b/node_modules/lazystream/.travis.yml deleted file mode 100644 index 01987d45..00000000 --- a/node_modules/lazystream/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -sudo: false -language: node_js -node_js: - - "5.2" - - "4.2" - - "0.12" - - "0.10" -# - "0.8" -# - "0.6" diff --git a/node_modules/lazystream/LICENSE-MIT b/node_modules/lazystream/LICENSE-MIT deleted file mode 100644 index 982db139..00000000 --- a/node_modules/lazystream/LICENSE-MIT +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2013 J. Pommerening, contributors. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/lazystream/README.md b/node_modules/lazystream/README.md deleted file mode 100644 index f42fbac7..00000000 --- a/node_modules/lazystream/README.md +++ /dev/null @@ -1,110 +0,0 @@ -# Lazy Streams - -> *Create streams lazily when they are read from or written to.* -> `lazystream: 1.0.0` [![Build Status](https://travis-ci.org/jpommerening/node-lazystream.png?branch=master)](https://travis-ci.org/jpommerening/node-lazystream) - -## Why? - -Sometimes you feel the itch to open *all the files* at once. You want to pass a bunch of streams around, so the consumer does not need to worry where the data comes from. -From a software design point-of-view this sounds entirely reasonable. Then there is that neat little function `fs.createReadStream()` that opens a file and gives you a nice `fs.ReadStream` to pass around, so you use what the mighty creator deities of node bestowed upon you. - -> `Error: EMFILE, too many open files` -> ─ *node* - -This package provides two classes based on the node's Streams3 API (courtesy of `readable-stream` to ensure a stable version). - -## Class: lazystream.Readable - -A wrapper for readable streams. Extends [`stream.PassThrough`](http://nodejs.org/api/stream.html#stream_class_stream_passthrough). - -### new lazystream.Readable(fn [, options]) - -* `fn` *{Function}* - The function that the lazy stream will call to obtain the stream to actually read from. -* `options` *{Object}* - Options for the underlying `PassThrough` stream, accessible by `fn`. - -Creates a new readable stream. Once the stream is accessed (for example when you call its `read()` method, or attach a `data`-event listener) the `fn` function is called with the outer `lazystream.Readable` instance bound to `this`. - -If you pass an `options` object to the constuctor, you can access it in your `fn` function. - -```javascript -new lazystream.Readable(function (options) { - return fs.createReadStream('/dev/urandom'); -}); -``` - -## Class: lazystream.Writable - -A wrapper for writable streams. Extends [`stream.PassThrough`](http://nodejs.org/api/stream.html#stream_class_stream_passthrough). - -### new lazystream.Writable(fn [, options]) - -* `fn` *{Function}* - The function that the lazy stream will call to obtain the stream to actually write to. -* `options` *{Object}* - Options for the underlying `PassThrough` stream, accessible by `fn`. - -Creates a new writable stream. Just like the one above but for writable streams. - -```javascript -new lazystream.Writable(function () { - return fs.createWriteStream('/dev/null'); -}); -``` - -## Install - -```console -$ npm install lazystream --save -lazystream@1.0.0 node_modules/lazystream -└── readable-stream@2.0.5 -``` - -## Changelog - -### v1.0.0 - -- [#2](https://github.com/jpommerening/node-lazystream/pull/2): [unconditionally](https://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html) use `readable-stream` _2.x_. - -### v0.2.0 - -- [#1](https://github.com/jpommerening/node-lazystream/pull/1): error events are now propagated - -### v0.1.0 - -- _(this was the first release)_ - -## Contributing - -Fork it, branch it, send me a pull request. We'll work out the rest together. - -## Credits - -[Chris Talkington](https://github.com/ctalkington) and his [node-archiver](https://github.com/ctalkington/node-archiver) for providing a use-case. - -## [License](LICENSE-MIT) - -Copyright (c) 2013 J. Pommerening, contributors. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/lazystream/lib/lazystream.js b/node_modules/lazystream/lib/lazystream.js deleted file mode 100644 index d9f61709..00000000 --- a/node_modules/lazystream/lib/lazystream.js +++ /dev/null @@ -1,54 +0,0 @@ -var util = require('util'); -var PassThrough = require('readable-stream/passthrough'); - -module.exports = { - Readable: Readable, - Writable: Writable -}; - -util.inherits(Readable, PassThrough); -util.inherits(Writable, PassThrough); - -// Patch the given method of instance so that the callback -// is executed once, before the actual method is called the -// first time. -function beforeFirstCall(instance, method, callback) { - instance[method] = function() { - delete instance[method]; - callback.apply(this, arguments); - return this[method].apply(this, arguments); - }; -} - -function Readable(fn, options) { - if (!(this instanceof Readable)) - return new Readable(fn, options); - - PassThrough.call(this, options); - - beforeFirstCall(this, '_read', function() { - var source = fn.call(this, options); - var emit = this.emit.bind(this, 'error'); - source.on('error', emit); - source.pipe(this); - }); - - this.emit('readable'); -} - -function Writable(fn, options) { - if (!(this instanceof Writable)) - return new Writable(fn, options); - - PassThrough.call(this, options); - - beforeFirstCall(this, '_write', function() { - var destination = fn.call(this, options); - var emit = this.emit.bind(this, 'error'); - destination.on('error', emit); - this.pipe(destination); - }); - - this.emit('writable'); -} - diff --git a/node_modules/lazystream/node_modules/readable-stream/.travis.yml b/node_modules/lazystream/node_modules/readable-stream/.travis.yml deleted file mode 100644 index f62cdac0..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -sudo: false -language: node_js -before_install: - - (test $NPM_LEGACY && npm install -g npm@2 && npm install -g npm@3) || true -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: NPM_LEGACY=true - - node_js: '0.10' - env: NPM_LEGACY=true - - node_js: '0.11' - env: NPM_LEGACY=true - - node_js: '0.12' - env: NPM_LEGACY=true - - node_js: 1 - env: NPM_LEGACY=true - - node_js: 2 - env: NPM_LEGACY=true - - node_js: 3 - env: NPM_LEGACY=true - - node_js: 4 - - node_js: 5 - - node_js: 6 - - node_js: 7 - - node_js: 8 - - node_js: 9 -script: "npm run test" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/node_modules/lazystream/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/lazystream/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58d..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/lazystream/node_modules/readable-stream/GOVERNANCE.md b/node_modules/lazystream/node_modules/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93f..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### Streams Working Group - -The Node.js Streams is jointly governed by a Working Group -(WG) -that is responsible for high-level guidance of the project. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Conduct guidelines -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project -[README.md](./README.md#current-project-team-members). - -### Collaborators - -The readable-stream GitHub repository is -maintained by the WG and additional Collaborators who are added by the -WG on an ongoing basis. - -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the WG and their addition as -Collaborators is discussed during the WG meeting. - -_Note:_ If you make a significant contribution and are not considered -for commit-access log an issue or contact a WG member directly and it -will be brought up in the next WG meeting. - -Modifications of the contents of the readable-stream repository are -made on -a collaborative basis. Anybody with a GitHub account may propose a -modification via pull request and it will be considered by the project -Collaborators. All pull requests must be reviewed and accepted by a -Collaborator with sufficient expertise who is able to take full -responsibility for the change. In the case of pull requests proposed -by an existing Collaborator, an additional Collaborator is required -for sign-off. Consensus should be sought if additional Collaborators -participate and there is disagreement around a particular -modification. See _Consensus Seeking Process_ below for further detail -on the consensus model used for governance. - -Collaborators may opt to elevate significant or controversial -modifications, or modifications that have not found consensus to the -WG for discussion by assigning the ***WG-agenda*** tag to a pull -request or issue. The WG should serve as the final arbiter where -required. - -For the current list of Collaborators, see the project -[README.md](./README.md#members). - -### WG Membership - -WG seats are not time-limited. There is no fixed size of the WG. -However, the expected target is between 6 and 12, to ensure adequate -coverage of important areas of expertise, balanced with the ability to -make decisions efficiently. - -There is no specific set of requirements or qualifications for WG -membership beyond these rules. - -The WG may add additional members to the WG by unanimous consensus. - -A WG member may be removed from the WG by voluntary resignation, or by -unanimous consensus of all other WG members. - -Changes to WG membership should be posted in the agenda, and may be -suggested as any other agenda item (see "WG Meetings" below). - -If an addition or removal is proposed during a meeting, and the full -WG is not in attendance to participate, then the addition or removal -is added to the agenda for the subsequent meeting. This is to ensure -that all members are given the opportunity to participate in all -membership decisions. If a WG member is unable to attend a meeting -where a planned membership decision is being made, then their consent -is assumed. - -No more than 1/3 of the WG members may be affiliated with the same -employer. If removal or resignation of a WG member, or a change of -employment by a WG member, creates a situation where more than 1/3 of -the WG membership shares an employer, then the situation must be -immediately remedied by the resignation or removal of one or more WG -members affiliated with the over-represented employer(s). - -### WG Meetings - -The WG meets occasionally on a Google Hangout On Air. A designated moderator -approved by the WG runs the meeting. Each meeting should be -published to YouTube. - -Items are added to the WG agenda that are considered contentious or -are modifications of governance, contribution policy, WG membership, -or release process. - -The intention of the agenda is not to approve or review all patches; -that should happen continuously on GitHub and be handled by the larger -group of Collaborators. - -Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, -WG member or the moderator can add the item to the agenda by adding -the ***WG-agenda*** tag to the issue. - -Prior to each WG meeting the moderator will share the Agenda with -members of the WG. WG members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the WG -cannot veto or remove items. - -The WG may invite persons or representatives from certain projects to -participate in a non-voting capacity. - -The moderator is responsible for summarizing the discussion of each -agenda item and sends it as a pull request after the meeting. - -### Consensus Seeking Process - -The WG follows a -[Consensus -Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) -decision-making model. - -When an agenda item has appeared to reach a consensus the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. - -If an agenda item cannot reach a consensus a WG member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be seconded by a majority of the WG -or else the discussion will continue. Simple majority wins. - -Note that changes to WG membership require a majority consensus. See -"WG Membership" above. diff --git a/node_modules/lazystream/node_modules/readable-stream/LICENSE b/node_modules/lazystream/node_modules/readable-stream/LICENSE deleted file mode 100644 index 2873b3b2..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" diff --git a/node_modules/lazystream/node_modules/readable-stream/README.md b/node_modules/lazystream/node_modules/readable-stream/README.md deleted file mode 100644 index 23fe3f3e..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# readable-stream - -***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - - -## Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E -* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/node_modules/lazystream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/lazystream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index 83275f19..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,60 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section - - diff --git a/node_modules/lazystream/node_modules/readable-stream/duplex-browser.js b/node_modules/lazystream/node_modules/readable-stream/duplex-browser.js deleted file mode 100644 index f8b2db83..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/duplex-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_duplex.js'); diff --git a/node_modules/lazystream/node_modules/readable-stream/duplex.js b/node_modules/lazystream/node_modules/readable-stream/duplex.js deleted file mode 100644 index 46924cbf..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Duplex diff --git a/node_modules/lazystream/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/lazystream/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 57003c32..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -{ - // avoid scope creep, the keys array can then be collected - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - pna.nextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -Object.defineProperty(Duplex.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); - -Duplex.prototype._destroy = function (err, cb) { - this.push(null); - this.end(); - - pna.nextTick(cb, err); -}; \ No newline at end of file diff --git a/node_modules/lazystream/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/lazystream/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 612edb4d..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/node_modules/lazystream/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/lazystream/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 0f807646..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1019 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - -/**/ -var Duplex; -/**/ - -Readable.ReadableState = ReadableState; - -/**/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var BufferList = require('./internal/streams/BufferList'); -var destroyImpl = require('./internal/streams/destroy'); -var StringDecoder; - -util.inherits(Readable, Stream); - -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); - - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var readableHwm = options.readableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} - -Object.defineProperty(Readable.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); - -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - this.push(null); - cb(err); -}; - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); - } else if (state.ended) { - stream.emit('error', new Error('stream.push() after EOF')); - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - } - } - - return needMoreData(state); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } else { - state.length -= n; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - pna.nextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('_read() is not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - // If the user pushes more data while we're writing to dest then we'll end up - // in ondata again. However, we only want to increase awaitDrain once because - // dest will only emit one 'drain' event for the multiple writes. - // => Introduce a guard on increasing awaitDrain. - var increasedAwaitDrain = false; - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - increasedAwaitDrain = false; - var ret = dest.write(chunk); - if (false === ret && !increasedAwaitDrain) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - increasedAwaitDrain = true; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { hasUnpiped: false }; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, unpipeInfo); - }return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this, unpipeInfo); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data') { - // Start flowing on next tick if stream isn't explicitly paused - if (this._readableState.flowing !== false) this.resume(); - } else if (ev === 'readable') { - var state = this._readableState; - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.emittedReadable = false; - if (!state.reading) { - pna.nextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - pna.nextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - state.awaitDrain = 0; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null) {} -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var _this = this; - - var state = this._readableState; - var paused = false; - - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - - _this.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return this; -}; - -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._readableState.highWaterMark; - } -}); - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = fromListPartial(n, state.buffer, state.decoder); - } - - return ret; -} - -// Extracts only enough buffered data to satisfy the amount requested. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromListPartial(n, list, hasStrings) { - var ret; - if (n < list.head.data.length) { - // slice is the same for buffers and strings - ret = list.head.data.slice(0, n); - list.head.data = list.head.data.slice(n); - } else if (n === list.head.data.length) { - // first chunk is a perfect match - ret = list.shift(); - } else { - // result spans more than one buffer - ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); - } - return ret; -} - -// Copies a specified amount of characters from the list of buffered data -// chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBufferString(n, list) { - var p = list.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -// Copies a specified amount of bytes from the list of buffered data chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBuffer(n, list) { - var ret = Buffer.allocUnsafe(n); - var p = list.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - pna.nextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/node_modules/lazystream/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/lazystream/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index fcfc105a..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) { - return this.emit('error', new Error('write callback called multiple times')); - } - - ts.writechunk = null; - ts.writecb = null; - - if (data != null) // single equals check for both `null` and `undefined` - this.push(data); - - cb(er); - - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); -} - -function prefinish() { - var _this = this; - - if (typeof this._flush === 'function') { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('_transform() is not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -Transform.prototype._destroy = function (err, cb) { - var _this2 = this; - - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - _this2.emit('close'); - }); -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - - if (data != null) // single equals check for both `null` and `undefined` - stream.push(data); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); - - if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/node_modules/lazystream/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/lazystream/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index b0b02200..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,687 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Writable; - -/* */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; -/**/ - -/**/ -var Duplex; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -var destroyImpl = require('./internal/streams/destroy'); - -util.inherits(Writable, Stream); - -function nop() {} - -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var writableHwm = options.writableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // if _final has been called - this.finalCalled = false; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // has it been destroyed - this.destroyed = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function (object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function (object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { - return new Writable(options); - } - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - pna.nextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - pna.nextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} - -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - pna.nextTick(cb, er); - // this can emit finish, and it will always happen - // after error - pna.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('_write() is not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - stream.emit('error', err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function') { - state.pendingcb++; - state.finalCalled = true; - pna.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = corkReq; - } else { - state.corkedRequestsFree = corkReq; - } -} - -Object.defineProperty(Writable.prototype, 'destroyed', { - get: function () { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); - -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - this.end(); - cb(err); -}; \ No newline at end of file diff --git a/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/BufferList.js deleted file mode 100644 index aefc68bd..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/BufferList.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Buffer = require('safe-buffer').Buffer; -var util = require('util'); - -function copyBuffer(src, target, offset) { - src.copy(target, offset); -} - -module.exports = function () { - function BufferList() { - _classCallCheck(this, BufferList); - - this.head = null; - this.tail = null; - this.length = 0; - } - - BufferList.prototype.push = function push(v) { - var entry = { data: v, next: null }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - }; - - BufferList.prototype.unshift = function unshift(v) { - var entry = { data: v, next: this.head }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - }; - - BufferList.prototype.shift = function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - }; - - BufferList.prototype.clear = function clear() { - this.head = this.tail = null; - this.length = 0; - }; - - BufferList.prototype.join = function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) { - ret += s + p.data; - }return ret; - }; - - BufferList.prototype.concat = function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - if (this.length === 1) return this.head.data; - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; - }; - - return BufferList; -}(); - -if (util && util.inspect && util.inspect.custom) { - module.exports.prototype[util.inspect.custom] = function () { - var obj = util.inspect({ length: this.length }); - return this.constructor.name + ' ' + obj; - }; -} \ No newline at end of file diff --git a/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index 5a0a0d88..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { - pna.nextTick(emitErrorNT, this, err); - } - return this; - } - - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; - } - - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - pna.nextTick(emitErrorNT, _this, err); - if (_this._writableState) { - _this._writableState.errorEmitted = true; - } - } else if (cb) { - cb(err); - } - }); - - return this; -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy -}; \ No newline at end of file diff --git a/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3fd..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b6..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/node_modules/lazystream/node_modules/readable-stream/package.json b/node_modules/lazystream/node_modules/readable-stream/package.json deleted file mode 100644 index f55cb6a4..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "readable-stream@^2.0.5", - "_id": "readable-stream@2.3.7", - "_inBundle": false, - "_integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "_location": "/lazystream/readable-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "readable-stream@^2.0.5", - "name": "readable-stream", - "escapedName": "readable-stream", - "rawSpec": "^2.0.5", - "saveSpec": null, - "fetchSpec": "^2.0.5" - }, - "_requiredBy": [ - "/lazystream" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "_shasum": "1eca1cf711aef814c04f62252a36a62f6cb23b57", - "_spec": "readable-stream@^2.0.5", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/lazystream", - "browser": { - "util": false, - "./readable.js": "./readable-browser.js", - "./writable.js": "./writable-browser.js", - "./duplex.js": "./duplex-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "deprecated": false, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "assert": "^1.4.0", - "babel-polyfill": "^6.9.1", - "buffer": "^4.9.0", - "lolex": "^2.3.2", - "nyc": "^6.4.0", - "tap": "^0.7.0", - "tape": "^4.8.0" - }, - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "name": "readable-stream", - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov", - "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js" - }, - "version": "2.3.7" -} diff --git a/node_modules/lazystream/node_modules/readable-stream/passthrough.js b/node_modules/lazystream/node_modules/readable-stream/passthrough.js deleted file mode 100644 index ffd791d7..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').PassThrough diff --git a/node_modules/lazystream/node_modules/readable-stream/readable-browser.js b/node_modules/lazystream/node_modules/readable-stream/readable-browser.js deleted file mode 100644 index e5037259..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/readable-browser.js +++ /dev/null @@ -1,7 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/lazystream/node_modules/readable-stream/readable.js b/node_modules/lazystream/node_modules/readable-stream/readable.js deleted file mode 100644 index ec89ec53..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,19 +0,0 @@ -var Stream = require('stream'); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; - exports = module.exports = Stream.Readable; - exports.Readable = Stream.Readable; - exports.Writable = Stream.Writable; - exports.Duplex = Stream.Duplex; - exports.Transform = Stream.Transform; - exports.PassThrough = Stream.PassThrough; - exports.Stream = Stream; -} else { - exports = module.exports = require('./lib/_stream_readable.js'); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = require('./lib/_stream_writable.js'); - exports.Duplex = require('./lib/_stream_duplex.js'); - exports.Transform = require('./lib/_stream_transform.js'); - exports.PassThrough = require('./lib/_stream_passthrough.js'); -} diff --git a/node_modules/lazystream/node_modules/readable-stream/transform.js b/node_modules/lazystream/node_modules/readable-stream/transform.js deleted file mode 100644 index b1baba26..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Transform diff --git a/node_modules/lazystream/node_modules/readable-stream/writable-browser.js b/node_modules/lazystream/node_modules/readable-stream/writable-browser.js deleted file mode 100644 index ebdde6a8..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/writable-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_writable.js'); diff --git a/node_modules/lazystream/node_modules/readable-stream/writable.js b/node_modules/lazystream/node_modules/readable-stream/writable.js deleted file mode 100644 index 3211a6f8..00000000 --- a/node_modules/lazystream/node_modules/readable-stream/writable.js +++ /dev/null @@ -1,8 +0,0 @@ -var Stream = require("stream") -var Writable = require("./lib/_stream_writable.js") - -if (process.env.READABLE_STREAM === 'disable') { - module.exports = Stream && Stream.Writable || Writable -} else { - module.exports = Writable -} diff --git a/node_modules/lazystream/node_modules/safe-buffer/LICENSE b/node_modules/lazystream/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068cee..00000000 --- a/node_modules/lazystream/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/lazystream/node_modules/safe-buffer/README.md b/node_modules/lazystream/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81afd..00000000 --- a/node_modules/lazystream/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) - - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) - - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) - - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) - - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) - - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/node_modules/lazystream/node_modules/safe-buffer/index.d.ts b/node_modules/lazystream/node_modules/safe-buffer/index.d.ts deleted file mode 100644 index e9fed809..00000000 --- a/node_modules/lazystream/node_modules/safe-buffer/index.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "safe-buffer" { - export class Buffer { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - } -} \ No newline at end of file diff --git a/node_modules/lazystream/node_modules/safe-buffer/index.js b/node_modules/lazystream/node_modules/safe-buffer/index.js deleted file mode 100644 index 22438dab..00000000 --- a/node_modules/lazystream/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/node_modules/lazystream/node_modules/safe-buffer/package.json b/node_modules/lazystream/node_modules/safe-buffer/package.json deleted file mode 100644 index c0ece4d8..00000000 --- a/node_modules/lazystream/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "safe-buffer@~5.1.1", - "_id": "safe-buffer@5.1.2", - "_inBundle": false, - "_integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "_location": "/lazystream/safe-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "safe-buffer@~5.1.1", - "name": "safe-buffer", - "escapedName": "safe-buffer", - "rawSpec": "~5.1.1", - "saveSpec": null, - "fetchSpec": "~5.1.1" - }, - "_requiredBy": [ - "/lazystream/readable-stream", - "/lazystream/string_decoder" - ], - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "_shasum": "991ec69d296e0313747d59bdfd2b745c35f8828d", - "_spec": "safe-buffer@~5.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/lazystream/node_modules/readable-stream", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Safer Node.js Buffer API", - "devDependencies": { - "standard": "*", - "tape": "^4.0.0" - }, - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "name": "safe-buffer", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "types": "index.d.ts", - "version": "5.1.2" -} diff --git a/node_modules/lazystream/node_modules/string_decoder/.travis.yml b/node_modules/lazystream/node_modules/string_decoder/.travis.yml deleted file mode 100644 index 3347a725..00000000 --- a/node_modules/lazystream/node_modules/string_decoder/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test diff --git a/node_modules/lazystream/node_modules/string_decoder/LICENSE b/node_modules/lazystream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 778edb20..00000000 --- a/node_modules/lazystream/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - diff --git a/node_modules/lazystream/node_modules/string_decoder/README.md b/node_modules/lazystream/node_modules/string_decoder/README.md deleted file mode 100644 index 5fd58315..00000000 --- a/node_modules/lazystream/node_modules/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# string_decoder - -***Node-core v8.9.4 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. - -## Streams Working Group - -`string_decoder` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -See [readable-stream](https://github.com/nodejs/readable-stream) for -more details. diff --git a/node_modules/lazystream/node_modules/string_decoder/lib/string_decoder.js b/node_modules/lazystream/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63f..00000000 --- a/node_modules/lazystream/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var Buffer = require('safe-buffer').Buffer; -/**/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/node_modules/lazystream/node_modules/string_decoder/package.json b/node_modules/lazystream/node_modules/string_decoder/package.json deleted file mode 100644 index 1829a26d..00000000 --- a/node_modules/lazystream/node_modules/string_decoder/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "string_decoder@~1.1.1", - "_id": "string_decoder@1.1.1", - "_inBundle": false, - "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "_location": "/lazystream/string_decoder", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "string_decoder@~1.1.1", - "name": "string_decoder", - "escapedName": "string_decoder", - "rawSpec": "~1.1.1", - "saveSpec": null, - "fetchSpec": "~1.1.1" - }, - "_requiredBy": [ - "/lazystream/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8", - "_spec": "string_decoder@~1.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/lazystream/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/nodejs/string_decoder/issues" - }, - "bundleDependencies": false, - "dependencies": { - "safe-buffer": "~5.1.0" - }, - "deprecated": false, - "description": "The string_decoder module from Node core", - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "lib/string_decoder.js", - "name": "string_decoder", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "test": "tap test/parallel/*.js && node test/verify-dependencies" - }, - "version": "1.1.1" -} diff --git a/node_modules/lazystream/package.json b/node_modules/lazystream/package.json deleted file mode 100644 index 8bad37a4..00000000 --- a/node_modules/lazystream/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_from": "lazystream@^1.0.0", - "_id": "lazystream@1.0.0", - "_inBundle": false, - "_integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", - "_location": "/lazystream", - "_phantomChildren": { - "core-util-is": "1.0.2", - "inherits": "2.0.4", - "isarray": "1.0.0", - "process-nextick-args": "2.0.1", - "util-deprecate": "1.0.2" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "lazystream@^1.0.0", - "name": "lazystream", - "escapedName": "lazystream", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "_shasum": "f6995fe0f820392f61396be89462407bb77168e4", - "_spec": "lazystream@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs", - "author": { - "name": "Jonas Pommerening", - "email": "jonas.pommerening@gmail.com", - "url": "https://npmjs.org/~jpommerening" - }, - "bugs": { - "url": "https://github.com/jpommerening/node-lazystream/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Mario Casciaro", - "email": "mariocasciaro@gmail.com" - } - ], - "dependencies": { - "readable-stream": "^2.0.5" - }, - "deprecated": false, - "description": "Open Node Streams on demand.", - "devDependencies": { - "nodeunit": "^0.9.1" - }, - "engines": { - "node": ">= 0.6.3" - }, - "homepage": "https://github.com/jpommerening/node-lazystream", - "keywords": [ - "emfile", - "lazy", - "streams", - "stream" - ], - "license": "MIT", - "main": "lib/lazystream.js", - "name": "lazystream", - "repository": { - "type": "git", - "url": "git+https://github.com/jpommerening/node-lazystream.git" - }, - "scripts": { - "test": "nodeunit test/readable_test.js test/writable_test.js test/pipe_test.js test/fs_test.js" - }, - "version": "1.0.0" -} diff --git a/node_modules/lazystream/secret b/node_modules/lazystream/secret deleted file mode 100644 index 4ff77514..00000000 --- a/node_modules/lazystream/secret +++ /dev/null @@ -1,59 +0,0 @@ ------BEGIN PGP PRIVATE KEY BLOCK----- -Version: GnuPG v1 - -lQO+BFRFUBsBCACycWpDBPLAf7Pfk3SjZPmFrV/uVJRKoetYDVWgMvmjlm5u/RQH -CI7uMujKLLcWeVxwqRcsc65iqyfgGp/TpGpPg3N7ss9NJN7f5xou2KtZUWN2PTKa -A09tnaBaKACyursPLRqHFRl565/ETiZ2/VpHFYuEw8fXlvo5L5rQFgh4oiSdwWHk -yyCcUJuDa70rkfgmWF/3ZUkX3U57e8rrGQ2xezLk5cI5ijA8VCrXY+EPWT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G1EvNiO5sAJnCJAk8VGDnIB+sc= -=EeYS ------END PGP PRIVATE KEY BLOCK----- diff --git a/node_modules/lazystream/test/data.md b/node_modules/lazystream/test/data.md deleted file mode 100644 index fc482220..00000000 --- a/node_modules/lazystream/test/data.md +++ /dev/null @@ -1,13 +0,0 @@ -> Never mind, hey, this is really exciting, so much to find out about, so much to -> look forward to, I'm quite dizzy with anticipation . . . Or is it the wind? -> -> There really is a lot of that now, isn't there? And wow! Hey! What's this thing -> suddenly coming toward me very fast? Very, very fast. So big and flat and round, -> it needs a big wide-sounding name like . . . ow . . . ound . . . round . . . -> ground! That's it! That's a good name- ground! -> -> I wonder if it will be friends with me? -> -> Hello Ground! - -And the rest, after a sudden wet thud, was silence. diff --git a/node_modules/lazystream/test/fs_test.js b/node_modules/lazystream/test/fs_test.js deleted file mode 100644 index 149b1c4a..00000000 --- a/node_modules/lazystream/test/fs_test.js +++ /dev/null @@ -1,69 +0,0 @@ - -var stream = require('../lib/lazystream'); -var fs = require('fs'); -var tmpDir = 'test/tmp/'; -var readFile = 'test/data.md'; -var writeFile = tmpDir + 'data.md'; - -exports.fs = { - readwrite: function(test) { - var readfd, writefd; - - var readable = new stream.Readable(function() { - return fs.createReadStream(readFile) - .on('open', function(fd) { - readfd = fd; - }) - .on('close', function() { - readfd = undefined; - step(); - }); - }); - - var writable = new stream.Writable(function() { - return fs.createWriteStream(writeFile) - .on('open', function(fd) { - writefd = fd; - }) - .on('close', function() { - writefd = undefined; - step(); - }); - }); - - test.expect(3); - - test.equal(readfd, undefined, 'Input file should not be opened until read'); - test.equal(writefd, undefined, 'Output file should not be opened until write'); - - if (!fs.existsSync(tmpDir)) { - fs.mkdirSync(tmpDir); - } - if (fs.existsSync(writeFile)) { - fs.unlinkSync(writeFile); - } - - readable.on('end', function() { step(); }); - writable.on('end', function() { step(); }); - - var steps = 0; - function step() { - steps += 1; - if (steps == 4) { - var input = fs.readFileSync(readFile); - var output = fs.readFileSync(writeFile); - - test.ok(input >= output && input <= output, 'Should be equal'); - - fs.unlinkSync(writeFile); - fs.rmdirSync(tmpDir); - - test.done(); - } - }; - - readable.pipe(writable); - } -}; - - diff --git a/node_modules/lazystream/test/helper.js b/node_modules/lazystream/test/helper.js deleted file mode 100644 index 9d41191d..00000000 --- a/node_modules/lazystream/test/helper.js +++ /dev/null @@ -1,39 +0,0 @@ - -var _Readable = require('readable-stream/readable'); -var _Writable = require('readable-stream/writable'); -var util = require('util'); - -module.exports = { - DummyReadable: DummyReadable, - DummyWritable: DummyWritable -}; - -function DummyReadable(strings) { - _Readable.call(this); - this.strings = strings; - this.emit('readable'); -} - -util.inherits(DummyReadable, _Readable); - -DummyReadable.prototype._read = function _read(n) { - if (this.strings.length) { - this.push(new Buffer(this.strings.shift())); - } else { - this.push(null); - } -}; - -function DummyWritable(strings) { - _Writable.call(this); - this.strings = strings; - this.emit('writable'); -} - -util.inherits(DummyWritable, _Writable); - -DummyWritable.prototype._write = function _write(chunk, encoding, callback) { - this.strings.push(chunk.toString()); - if (callback) callback(); -}; - diff --git a/node_modules/lazystream/test/pipe_test.js b/node_modules/lazystream/test/pipe_test.js deleted file mode 100644 index 7129e359..00000000 --- a/node_modules/lazystream/test/pipe_test.js +++ /dev/null @@ -1,36 +0,0 @@ - -var stream = require('../lib/lazystream'); -var helper = require('./helper'); - -exports.pipe = { - readwrite: function(test) { - var expected = [ 'line1\n', 'line2\n' ]; - var actual = []; - var readableInstantiated = false; - var writableInstantiated = false; - - test.expect(3); - - var readable = new stream.Readable(function() { - readableInstantiated = true; - return new helper.DummyReadable([].concat(expected)); - }); - - var writable = new stream.Writable(function() { - writableInstantiated = true; - return new helper.DummyWritable(actual); - }); - - test.equal(readableInstantiated, false, 'DummyReadable should only be instantiated when it is needed'); - test.equal(writableInstantiated, false, 'DummyWritable should only be instantiated when it is needed'); - - writable.on('end', function() { - test.equal(actual.join(''), expected.join(''), 'Piping on demand streams should keep data intact'); - test.done(); - }); - - readable.pipe(writable); - } -}; - - diff --git a/node_modules/lazystream/test/readable_test.js b/node_modules/lazystream/test/readable_test.js deleted file mode 100644 index 9ae06368..00000000 --- a/node_modules/lazystream/test/readable_test.js +++ /dev/null @@ -1,90 +0,0 @@ - -var Readable = require('../lib/lazystream').Readable; -var DummyReadable = require('./helper').DummyReadable; - -exports.readable = { - dummy: function(test) { - var expected = [ 'line1\n', 'line2\n' ]; - var actual = []; - - test.expect(1); - - new DummyReadable([].concat(expected)) - .on('data', function(chunk) { - actual.push(chunk.toString()); - }) - .on('end', function() { - test.equal(actual.join(''), expected.join(''), 'DummyReadable should produce the data it was created with'); - test.done(); - }); - }, - options: function(test) { - test.expect(3); - - var readable = new Readable(function(options) { - test.ok(this instanceof Readable, "Readable should bind itself to callback's this"); - test.equal(options.encoding, "utf-8", "Readable should make options accessible to callback"); - this.ok = true; - return new DummyReadable(["test"]); - }, {encoding: "utf-8"}); - - readable.read(4); - - test.ok(readable.ok); - - test.done(); - }, - streams2: function(test) { - var expected = [ 'line1\n', 'line2\n' ]; - var actual = []; - var instantiated = false; - - test.expect(2); - - var readable = new Readable(function() { - instantiated = true; - return new DummyReadable([].concat(expected)); - }); - - test.equal(instantiated, false, 'DummyReadable should only be instantiated when it is needed'); - - readable.on('readable', function() { - var chunk; - while ((chunk = readable.read())) { - actual.push(chunk.toString()); - } - }); - readable.on('end', function() { - test.equal(actual.join(''), expected.join(''), 'Readable should not change the data of the underlying stream'); - test.done(); - }); - - readable.read(0); - }, - resume: function(test) { - var expected = [ 'line1\n', 'line2\n' ]; - var actual = []; - var instantiated = false; - - test.expect(2); - - var readable = new Readable(function() { - instantiated = true; - return new DummyReadable([].concat(expected)); - }); - - readable.pause(); - - readable.on('data', function(chunk) { - actual.push(chunk.toString()); - }); - readable.on('end', function() { - test.equal(actual.join(''), expected.join(''), 'Readable should not change the data of the underlying stream'); - test.done(); - }); - - test.equal(instantiated, false, 'DummyReadable should only be instantiated when it is needed'); - - readable.resume(); - } -}; diff --git a/node_modules/lazystream/test/writable_test.js b/node_modules/lazystream/test/writable_test.js deleted file mode 100644 index a6638456..00000000 --- a/node_modules/lazystream/test/writable_test.js +++ /dev/null @@ -1,59 +0,0 @@ - -var Writable = require('../lib/lazystream').Writable; -var DummyWritable = require('./helper').DummyWritable; - -exports.writable = { - options: function(test) { - test.expect(3); - - var writable = new Writable(function(options) { - test.ok(this instanceof Writable, "Writable should bind itself to callback's this"); - test.equal(options.encoding, "utf-8", "Writable should make options accessible to callback"); - this.ok = true; - return new DummyWritable([]); - }, {encoding: "utf-8"}); - - writable.write("test"); - - test.ok(writable.ok); - - test.done(); - }, - dummy: function(test) { - var expected = [ 'line1\n', 'line2\n' ]; - var actual = []; - - test.expect(0); - - var dummy = new DummyWritable(actual); - - expected.forEach(function(item) { - dummy.write(new Buffer(item)); - }); - test.done(); - }, - streams2: function(test) { - var expected = [ 'line1\n', 'line2\n' ]; - var actual = []; - var instantiated = false; - - test.expect(2); - - var writable = new Writable(function() { - instantiated = true; - return new DummyWritable(actual); - }); - - test.equal(instantiated, false, 'DummyWritable should only be instantiated when it is needed'); - - writable.on('end', function() { - test.equal(actual.join(''), expected.join(''), 'Writable should not change the data of the underlying stream'); - test.done(); - }); - - expected.forEach(function(item) { - writable.write(new Buffer(item)); - }); - writable.end(); - } -}; diff --git a/node_modules/lead/LICENSE b/node_modules/lead/LICENSE deleted file mode 100644 index b8fc7433..00000000 --- a/node_modules/lead/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Blaine Bublitz , Eric Schoffstall and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/lead/README.md b/node_modules/lead/README.md deleted file mode 100644 index 759b9918..00000000 --- a/node_modules/lead/README.md +++ /dev/null @@ -1,55 +0,0 @@ -

    - - - -

    - -# lead - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] - -Sink your streams. - -## Usage - -```js -var from = require('from2'); -var through = require('through2'); -var sink = require('lead'); - -// Might be used as a Transform or Writeable -var maybeThrough = through(function(chunk, enc, cb) { - // processing - cb(null, chunk); -}); - -from(['hello', 'world']) - // Sink it to behave like a Writeable - .pipe(sink(maybeThrough)) -``` - -## API - -### `sink(stream)` - -Takes a `stream` to sink and returns the same stream. Sets up event listeners to infer if the stream is being used as a `Transform` or `Writeable` stream and sinks it on `nextTick` if necessary. If the stream is being used as a `Transform` stream but becomes unpiped, it will be sunk. Respects `pipe`, `on('data')` and `on('readable')` handlers. - -## License - -MIT - -[downloads-image]: http://img.shields.io/npm/dm/lead.svg -[npm-url]: https://npmjs.com/package/lead -[npm-image]: http://img.shields.io/npm/v/lead.svg - -[travis-url]: https://travis-ci.org/gulpjs/lead -[travis-image]: http://img.shields.io/travis/gulpjs/lead.svg?label=travis-ci - -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/lead -[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/lead.svg?label=appveyor - -[coveralls-url]: https://coveralls.io/r/gulpjs/lead -[coveralls-image]: http://img.shields.io/coveralls/gulpjs/lead/master.svg - -[gitter-url]: https://gitter.im/gulpjs/gulp -[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png diff --git a/node_modules/lead/index.js b/node_modules/lead/index.js deleted file mode 100644 index 8e3df6a9..00000000 --- a/node_modules/lead/index.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -var Writable = require('flush-write-stream'); - -function listenerCount(stream, evt) { - return stream.listeners(evt).length; -} - -function hasListeners(stream) { - return !!(listenerCount(stream, 'readable') || listenerCount(stream, 'data')); -} - -function sinker(file, enc, callback) { - callback(); -} - -function sink(stream) { - var sinkAdded = false; - - var sinkOptions = { - objectMode: stream._readableState.objectMode, - }; - - var sinkStream = new Writable(sinkOptions, sinker); - - function addSink() { - if (sinkAdded) { - return; - } - - if (hasListeners(stream)) { - return; - } - - sinkAdded = true; - stream.pipe(sinkStream); - } - - function removeSink(evt) { - if (evt !== 'readable' && evt !== 'data') { - return; - } - - if (hasListeners(stream)) { - sinkAdded = false; - stream.unpipe(sinkStream); - } - } - - stream.on('newListener', removeSink); - stream.on('removeListener', removeSink); - stream.on('removeListener', addSink); - - // Sink the stream to start flowing - // Do this on nextTick, it will flow at slowest speed of piped streams - process.nextTick(addSink); - - return stream; -} - -module.exports = sink; diff --git a/node_modules/lead/package.json b/node_modules/lead/package.json deleted file mode 100644 index 95011c3a..00000000 --- a/node_modules/lead/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_from": "lead@^1.0.0", - "_id": "lead@1.0.0", - "_inBundle": false, - "_integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", - "_location": "/lead", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "lead@^1.0.0", - "name": "lead", - "escapedName": "lead", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", - "_shasum": "6f14f99a37be3a9dd784f5495690e5903466ee42", - "_spec": "lead@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs", - "author": { - "name": "Gulp Team", - "email": "team@gulpjs.com", - "url": "http://gulpjs.com/" - }, - "bugs": { - "url": "https://github.com/gulpjs/lead/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com" - } - ], - "dependencies": { - "flush-write-stream": "^1.0.2" - }, - "deprecated": false, - "description": "Sink your streams.", - "devDependencies": { - "eslint": "^1.10.3", - "eslint-config-gulp": "^2.0.0", - "expect": "^1.20.2", - "istanbul": "^0.4.3", - "istanbul-coveralls": "^1.0.3", - "jscs": "^2.4.0", - "jscs-preset-gulp": "^1.0.0", - "mississippi": "^1.3.0", - "mocha": "^3.2.0" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "LICENSE", - "index.js" - ], - "homepage": "https://github.com/gulpjs/lead#readme", - "keywords": [ - "streams", - "sink", - "through", - "writeable" - ], - "license": "MIT", - "main": "index.js", - "name": "lead", - "repository": { - "type": "git", - "url": "git+https://github.com/gulpjs/lead.git" - }, - "scripts": { - "cover": "istanbul cover _mocha --report lcovonly", - "coveralls": "npm run cover && istanbul-coveralls", - "lint": "eslint index.js test/ && jscs index.js test/", - "pretest": "npm run lint", - "test": "mocha --async-only" - }, - "version": "1.0.0" -} diff --git a/node_modules/leven/index.js b/node_modules/leven/index.js deleted file mode 100644 index bb44b791..00000000 --- a/node_modules/leven/index.js +++ /dev/null @@ -1,85 +0,0 @@ -/* eslint-disable no-nested-ternary */ -'use strict'; -var arr = []; -var charCodeCache = []; - -module.exports = function (a, b) { - if (a === b) { - return 0; - } - - var swap = a; - - // Swapping the strings if `a` is longer than `b` so we know which one is the - // shortest & which one is the longest - if (a.length > b.length) { - a = b; - b = swap; - } - - var aLen = a.length; - var bLen = b.length; - - if (aLen === 0) { - return bLen; - } - - if (bLen === 0) { - return aLen; - } - - // Performing suffix trimming: - // We can linearly drop suffix common to both strings since they - // don't increase distance at all - // Note: `~-` is the bitwise way to perform a `- 1` operation - while (aLen > 0 && (a.charCodeAt(~-aLen) === b.charCodeAt(~-bLen))) { - aLen--; - bLen--; - } - - if (aLen === 0) { - return bLen; - } - - // Performing prefix trimming - // We can linearly drop prefix common to both strings since they - // don't increase distance at all - var start = 0; - - while (start < aLen && (a.charCodeAt(start) === b.charCodeAt(start))) { - start++; - } - - aLen -= start; - bLen -= start; - - if (aLen === 0) { - return bLen; - } - - var bCharCode; - var ret; - var tmp; - var tmp2; - var i = 0; - var j = 0; - - while (i < aLen) { - charCodeCache[start + i] = a.charCodeAt(start + i); - arr[i] = ++i; - } - - while (j < bLen) { - bCharCode = b.charCodeAt(start + j); - tmp = j++; - ret = j; - - for (i = 0; i < aLen; i++) { - tmp2 = bCharCode === charCodeCache[start + i] ? tmp : tmp + 1; - tmp = arr[i]; - ret = arr[i] = tmp > ret ? tmp2 > ret ? ret + 1 : tmp2 : tmp2 > tmp ? tmp + 1 : tmp2; - } - } - - return ret; -}; diff --git a/node_modules/leven/license b/node_modules/leven/license deleted file mode 100644 index 654d0bfe..00000000 --- a/node_modules/leven/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/leven/package.json b/node_modules/leven/package.json deleted file mode 100644 index d3a043c2..00000000 --- a/node_modules/leven/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "_from": "leven@2.1.0", - "_id": "leven@2.1.0", - "_inBundle": false, - "_integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", - "_location": "/leven", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "leven@2.1.0", - "name": "leven", - "escapedName": "leven", - "rawSpec": "2.1.0", - "saveSpec": null, - "fetchSpec": "2.1.0" - }, - "_requiredBy": [ - "/args" - ], - "_resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", - "_shasum": "c2e7a9f772094dee9d34202ae8acce4687875580", - "_spec": "leven@2.1.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/args", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/leven/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Measure the difference between two strings using the fastest JS implementation of the Levenshtein distance algorithm", - "devDependencies": { - "ava": "^0.17.0", - "fast-levenshtein": "^2.0.5", - "ld": "^0.1.0", - "levdist": "^2.0.0", - "levenshtein": "^1.0.4", - "levenshtein-component": "0.0.1", - "levenshtein-edit-distance": "^2.0.0", - "matcha": "^0.7.0", - "natural": "^0.4.0", - "talisman": "^0.18.0", - "xo": "^0.16.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/leven#readme", - "keywords": [ - "leven", - "levenshtein", - "distance", - "algorithm", - "algo", - "string", - "difference", - "diff", - "fast", - "fuzzy", - "similar", - "similarity", - "compare", - "comparison", - "edit", - "text", - "match", - "matching" - ], - "license": "MIT", - "name": "leven", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/leven.git" - }, - "scripts": { - "bench": "matcha bench.js", - "test": "xo && ava" - }, - "version": "2.1.0" -} diff --git a/node_modules/leven/readme.md b/node_modules/leven/readme.md deleted file mode 100644 index 9493c9f3..00000000 --- a/node_modules/leven/readme.md +++ /dev/null @@ -1,50 +0,0 @@ -# leven [![Build Status](https://travis-ci.org/sindresorhus/leven.svg?branch=master)](https://travis-ci.org/sindresorhus/leven) - -> Measure the difference between two strings
    -> The fastest JS implementation of the [Levenshtein distance](http://en.wikipedia.org/wiki/Levenshtein_distance) algorithm - - -## Install - -``` -$ npm install --save leven -``` - - -## Usage - -```js -const leven = require('leven'); - -leven('cat', 'cow'); -//=> 2 -``` - - -## Benchmark - -``` -$ npm run bench -``` - -``` - 401,487 op/s » leven - 371,707 op/s » talisman - 264,191 op/s » levenshtein-edit-distance - 152,923 op/s » fast-levenshtein - 57,267 op/s » levenshtein-component - 19,915 op/s » levdist - 21,802 op/s » ld - 18,079 op/s » natural - 11,761 op/s » levenshtein -``` - - -## Related - -- [leven-cli](https://github.com/sindresorhus/leven-cli) - CLI for this module - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/lodash.clonedeep/LICENSE b/node_modules/lodash.clonedeep/LICENSE deleted file mode 100644 index e0c69d56..00000000 --- a/node_modules/lodash.clonedeep/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/node_modules/lodash.clonedeep/README.md b/node_modules/lodash.clonedeep/README.md deleted file mode 100644 index fee48e47..00000000 --- a/node_modules/lodash.clonedeep/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.clonedeep v4.5.0 - -The [lodash](https://lodash.com/) method `_.cloneDeep` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.clonedeep -``` - -In Node.js: -```js -var cloneDeep = require('lodash.clonedeep'); -``` - -See the [documentation](https://lodash.com/docs#cloneDeep) or [package source](https://github.com/lodash/lodash/blob/4.5.0-npm-packages/lodash.clonedeep) for more details. diff --git a/node_modules/lodash.clonedeep/index.js b/node_modules/lodash.clonedeep/index.js deleted file mode 100644 index 1b0e5029..00000000 --- a/node_modules/lodash.clonedeep/index.js +++ /dev/null @@ -1,1748 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = -cloneableTags[boolTag] = cloneableTags[dateTag] = -cloneableTags[float32Tag] = cloneableTags[float64Tag] = -cloneableTags[int8Tag] = cloneableTags[int16Tag] = -cloneableTags[int32Tag] = cloneableTags[mapTag] = -cloneableTags[numberTag] = cloneableTags[objectTag] = -cloneableTags[regexpTag] = cloneableTags[setTag] = -cloneableTags[stringTag] = cloneableTags[symbolTag] = -cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = -cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** - * Adds the key-value `pair` to `map`. - * - * @private - * @param {Object} map The map to modify. - * @param {Array} pair The key-value pair to add. - * @returns {Object} Returns `map`. - */ -function addMapEntry(map, pair) { - // Don't return `map.set` because it's not chainable in IE 11. - map.set(pair[0], pair[1]); - return map; -} - -/** - * Adds `value` to `set`. - * - * @private - * @param {Object} set The set to modify. - * @param {*} value The value to add. - * @returns {Object} Returns `set`. - */ -function addSetEntry(set, value) { - // Don't return `set.add` because it's not chainable in IE 11. - set.add(value); - return set; -} - -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array ? array.length : 0; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array ? array.length : 0; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} - -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} - -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue(object, key) { - return object == null ? undefined : object[key]; -} - -/** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ -function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; -} - -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} - -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - -/** Used for built-in method references. */ -var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; - -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined, - Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - getPrototype = overArg(Object.getPrototypeOf, Object), - objectCreate = Object.create, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols, - nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, - nativeKeys = overArg(Object.keys, Object); - -/* Built-in method references that are verified to be native. */ -var DataView = getNative(root, 'DataView'), - Map = getNative(root, 'Map'), - Promise = getNative(root, 'Promise'), - Set = getNative(root, 'Set'), - WeakMap = getNative(root, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); - -/** Used to detect maps, sets, and weakmaps. */ -var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Hash(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; -} - -/** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function hashDelete(key) { - return this.has(key) && delete this.__data__[key]; -} - -/** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; -} - -/** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function hashHas(key) { - var data = this.__data__; - return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); -} - -/** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ -function hashSet(key, value) { - var data = this.__data__; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; -} - -// Add methods to `Hash`. -Hash.prototype.clear = hashClear; -Hash.prototype['delete'] = hashDelete; -Hash.prototype.get = hashGet; -Hash.prototype.has = hashHas; -Hash.prototype.set = hashSet; - -/** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function ListCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; -} - -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - return true; -} - -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; -} - -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; -} - -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} - -// Add methods to `ListCache`. -ListCache.prototype.clear = listCacheClear; -ListCache.prototype['delete'] = listCacheDelete; -ListCache.prototype.get = listCacheGet; -ListCache.prototype.has = listCacheHas; -ListCache.prototype.set = listCacheSet; - -/** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function MapCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ -function mapCacheClear() { - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; -} - -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapCacheDelete(key) { - return getMapData(this, key)['delete'](key); -} - -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapCacheGet(key) { - return getMapData(this, key).get(key); -} - -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapCacheHas(key) { - return getMapData(this, key).has(key); -} - -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapCacheSet(key, value) { - getMapData(this, key).set(key, value); - return this; -} - -// Add methods to `MapCache`. -MapCache.prototype.clear = mapCacheClear; -MapCache.prototype['delete'] = mapCacheDelete; -MapCache.prototype.get = mapCacheGet; -MapCache.prototype.has = mapCacheHas; -MapCache.prototype.set = mapCacheSet; - -/** - * Creates a stack cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Stack(entries) { - this.__data__ = new ListCache(entries); -} - -/** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack - */ -function stackClear() { - this.__data__ = new ListCache; -} - -/** - * Removes `key` and its value from the stack. - * - * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function stackDelete(key) { - return this.__data__['delete'](key); -} - -/** - * Gets the stack value for `key`. - * - * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function stackGet(key) { - return this.__data__.get(key); -} - -/** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function stackHas(key) { - return this.__data__.has(key); -} - -/** - * Sets the stack `key` to `value`. - * - * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. - */ -function stackSet(key, value) { - var cache = this.__data__; - if (cache instanceof ListCache) { - var pairs = cache.__data__; - if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - return this; - } - cache = this.__data__ = new MapCache(pairs); - } - cache.set(key, value); - return this; -} - -// Add methods to `Stack`. -Stack.prototype.clear = stackClear; -Stack.prototype['delete'] = stackDelete; -Stack.prototype.get = stackGet; -Stack.prototype.has = stackHas; -Stack.prototype.set = stackSet; - -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - // Safari 9 makes `arguments.length` enumerable in strict mode. - var result = (isArray(value) || isArguments(value)) - ? baseTimes(value.length, String) - : []; - - var length = result.length, - skipIndexes = !!length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && (key == 'length' || isIndex(key, length)))) { - result.push(key); - } - } - return result; -} - -/** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - object[key] = value; - } -} - -/** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; -} - -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); -} - -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @param {boolean} [isFull] Specify a clone including symbols. - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, isDeep, isFull, customizer, key, object, stack) { - var result; - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result); - } - } else { - var tag = getTag(value), - isFunc = tag == funcTag || tag == genTag; - - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - if (isHostObject(value)) { - return object ? value : {}; - } - result = initCloneObject(isFunc ? {} : value); - if (!isDeep) { - return copySymbols(value, baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = initCloneByTag(value, tag, baseClone, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (!isArr) { - var props = isFull ? getAllKeys(value) : keys(value); - } - arrayEach(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); - }); - return result; -} - -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. - */ -function baseCreate(proto) { - return isObject(proto) ? objectCreate(proto) : {}; -} - -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); -} - -/** - * The base implementation of `getTag`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - return objectToString.call(value); -} - -/** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); -} - -/** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; -} - -/** - * Creates a clone of `buffer`. - * - * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. - */ -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var result = new buffer.constructor(buffer.length); - buffer.copy(result); - return result; -} - -/** - * Creates a clone of `arrayBuffer`. - * - * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ -function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); - return result; -} - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} - -/** - * Creates a clone of `map`. - * - * @private - * @param {Object} map The map to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned map. - */ -function cloneMap(map, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); - return arrayReduce(array, addMapEntry, new map.constructor); -} - -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} - -/** - * Creates a clone of `set`. - * - * @private - * @param {Object} set The set to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned set. - */ -function cloneSet(set, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); - return arrayReduce(array, addSetEntry, new set.constructor); -} - -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} - -/** - * Creates a clone of `typedArray`. - * - * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. - */ -function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); -} - -/** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ -function copyArray(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; -} - -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ -function copyObject(source, props, object, customizer) { - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - assignValue(object, key, newValue === undefined ? source[key] : newValue); - } - return object; -} - -/** - * Copies own symbol properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); -} - -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); -} - -/** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; -} - -/** - * Creates an array of the own enumerable symbol properties of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; - -/** - * Gets the `toStringTag` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -var getTag = baseGetTag; - -// Fallback for data views, maps, sets, and weak maps in IE 11, -// for data views in Edge < 14, and promises in Node.js. -if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || - (Map && getTag(new Map) != mapTag) || - (Promise && getTag(Promise.resolve()) != promiseTag) || - (Set && getTag(new Set) != setTag) || - (WeakMap && getTag(new WeakMap) != weakMapTag)) { - getTag = function(value) { - var result = objectToString.call(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : undefined; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; - } - } - return result; - }; -} - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} - -/** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneObject(object) { - return (typeof object.constructor == 'function' && !isPrototype(object)) - ? baseCreate(getPrototype(object)) - : {}; -} - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, cloneFunc, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return cloneArrayBuffer(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return cloneTypedArray(object, isDeep); - - case mapTag: - return cloneMap(object, isDeep, cloneFunc); - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return cloneRegExp(object); - - case setTag: - return cloneSet(object, isDeep, cloneFunc); - - case symbolTag: - return cloneSymbol(object); - } -} - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); -} - -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} - -/** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); -} - -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; -} - -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to process. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; -} - -/** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ -function cloneDeep(value) { - return baseClone(value, true, true); -} - -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); -} - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} - -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} - -/** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ -var isBuffer = nativeIsBuffer || stubFalse; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); -} - -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} - -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; -} - -module.exports = cloneDeep; diff --git a/node_modules/lodash.clonedeep/package.json b/node_modules/lodash.clonedeep/package.json deleted file mode 100644 index 2395e22d..00000000 --- a/node_modules/lodash.clonedeep/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "lodash.clonedeep@^4.5.0", - "_id": "lodash.clonedeep@4.5.0", - "_inBundle": false, - "_integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "_location": "/lodash.clonedeep", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "lodash.clonedeep@^4.5.0", - "name": "lodash.clonedeep", - "escapedName": "lodash.clonedeep", - "rawSpec": "^4.5.0", - "saveSpec": null, - "fetchSpec": "^4.5.0" - }, - "_requiredBy": [ - "/convict" - ], - "_resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "_shasum": "e23f3f9c4f8fbdde872529c1071857a086e5ccef", - "_spec": "lodash.clonedeep@^4.5.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/convict", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "deprecated": false, - "description": "The lodash method `_.cloneDeep` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "clonedeep" - ], - "license": "MIT", - "name": "lodash.clonedeep", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.5.0" -} diff --git a/node_modules/map-obj/index.d.ts b/node_modules/map-obj/index.d.ts deleted file mode 100644 index d3945109..00000000 --- a/node_modules/map-obj/index.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -declare namespace mapObject { - type Mapper< - SourceObjectType extends {[key: string]: any}, - MappedObjectKeyType extends string, - MappedObjectValueType - > = ( - sourceKey: keyof SourceObjectType, - sourceValue: SourceObjectType[keyof SourceObjectType], - source: SourceObjectType - ) => [ - targetKey: MappedObjectKeyType, - targetValue: MappedObjectValueType, - mapperOptions?: mapObject.MapperOptions - ]; - - interface Options { - /** - Recurse nested objects and objects in arrays. - - @default false - */ - deep?: boolean; - - /** - Target object to map properties on to. - - @default {} - */ - target?: {[key: string]: any}; - } - - interface DeepOptions extends Options { - deep: true; - } - - interface TargetOptions extends Options { - target: TargetObjectType; - } - - interface MapperOptions { - /** - Whether `targetValue` should be recursed. Requires `deep: true`. - - @default true - */ - shouldRecurse?: boolean; - } -} - -/** -Map object keys and values into a new object. - -@param source - Source object to copy properties from. -@param mapper - Mapping function. - -@example -``` -import mapObject = require('map-obj'); - -const newObject = mapObject({foo: 'bar'}, (key, value) => [value, key]); -//=> {bar: 'foo'} - -const newObject = mapObject({FOO: true, bAr: {bAz: true}}, (key, value) => [key.toLowerCase(), value]); -//=> {foo: true, bar: {bAz: true}} - -const newObject = mapObject({FOO: true, bAr: {bAz: true}}, (key, value) => [key.toLowerCase(), value], {deep: true}); -//=> {foo: true, bar: {baz: true}} -``` -*/ -declare function mapObject< - SourceObjectType extends object, - TargetObjectType extends {[key: string]: any}, - MappedObjectKeyType extends string, - MappedObjectValueType ->( - source: SourceObjectType, - mapper: mapObject.Mapper< - SourceObjectType, - MappedObjectKeyType, - MappedObjectValueType - >, - options: mapObject.DeepOptions & mapObject.TargetOptions -): TargetObjectType & {[key: string]: unknown}; -declare function mapObject< - SourceObjectType extends object, - MappedObjectKeyType extends string, - MappedObjectValueType ->( - source: SourceObjectType, - mapper: mapObject.Mapper< - SourceObjectType, - MappedObjectKeyType, - MappedObjectValueType - >, - options: mapObject.DeepOptions -): {[key: string]: unknown}; -declare function mapObject< - SourceObjectType extends {[key: string]: any}, - TargetObjectType extends {[key: string]: any}, - MappedObjectKeyType extends string, - MappedObjectValueType ->( - source: SourceObjectType, - mapper: mapObject.Mapper< - SourceObjectType, - MappedObjectKeyType, - MappedObjectValueType - >, - options: mapObject.TargetOptions -): TargetObjectType & {[K in MappedObjectKeyType]: MappedObjectValueType}; -declare function mapObject< - SourceObjectType extends {[key: string]: any}, - MappedObjectKeyType extends string, - MappedObjectValueType ->( - source: SourceObjectType, - mapper: mapObject.Mapper< - SourceObjectType, - MappedObjectKeyType, - MappedObjectValueType - >, - options?: mapObject.Options -): {[K in MappedObjectKeyType]: MappedObjectValueType}; - -export = mapObject; diff --git a/node_modules/map-obj/index.js b/node_modules/map-obj/index.js deleted file mode 100644 index 9bc6a4c8..00000000 --- a/node_modules/map-obj/index.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; - -const isObject = value => typeof value === 'object' && value !== null; - -// Customized for this use-case -const isObjectCustom = value => - isObject(value) && - !(value instanceof RegExp) && - !(value instanceof Error) && - !(value instanceof Date); - -const mapObject = (object, mapper, options, isSeen = new WeakMap()) => { - options = { - deep: false, - target: {}, - ...options - }; - - if (isSeen.has(object)) { - return isSeen.get(object); - } - - isSeen.set(object, options.target); - - const {target} = options; - delete options.target; - - const mapArray = array => array.map(element => isObjectCustom(element) ? mapObject(element, mapper, options, isSeen) : element); - if (Array.isArray(object)) { - return mapArray(object); - } - - for (const [key, value] of Object.entries(object)) { - let [newKey, newValue, {shouldRecurse = true} = {}] = mapper(key, value, object); - - // Drop `__proto__` keys. - if (newKey === '__proto__') { - continue; - } - - if (options.deep && shouldRecurse && isObjectCustom(newValue)) { - newValue = Array.isArray(newValue) ? - mapArray(newValue) : - mapObject(newValue, mapper, options, isSeen); - } - - target[newKey] = newValue; - } - - return target; -}; - -module.exports = (object, mapper, options) => { - if (!isObject(object)) { - throw new TypeError(`Expected an object, got \`${object}\` (${typeof object})`); - } - - return mapObject(object, mapper, options); -}; diff --git a/node_modules/map-obj/license b/node_modules/map-obj/license deleted file mode 100644 index fa7ceba3..00000000 --- a/node_modules/map-obj/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/map-obj/package.json b/node_modules/map-obj/package.json deleted file mode 100644 index 49aaf8f5..00000000 --- a/node_modules/map-obj/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_from": "map-obj@^4.0.0", - "_id": "map-obj@4.2.1", - "_inBundle": false, - "_integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", - "_location": "/map-obj", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "map-obj@^4.0.0", - "name": "map-obj", - "escapedName": "map-obj", - "rawSpec": "^4.0.0", - "saveSpec": null, - "fetchSpec": "^4.0.0" - }, - "_requiredBy": [ - "/camelcase-keys" - ], - "_resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", - "_shasum": "e4ea399dbc979ae735c83c863dd31bdf364277b7", - "_spec": "map-obj@^4.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/camelcase-keys", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/map-obj/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Map object keys and values into a new object", - "devDependencies": { - "ava": "^2.0.0", - "tsd": "^0.14.0", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "funding": "https://github.com/sponsors/sindresorhus", - "homepage": "https://github.com/sindresorhus/map-obj#readme", - "keywords": [ - "map", - "object", - "key", - "keys", - "value", - "values", - "iterate", - "iterator", - "rename", - "modify", - "deep", - "recurse", - "recursive" - ], - "license": "MIT", - "name": "map-obj", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/map-obj.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "4.2.1" -} diff --git a/node_modules/map-obj/readme.md b/node_modules/map-obj/readme.md deleted file mode 100644 index 145509a8..00000000 --- a/node_modules/map-obj/readme.md +++ /dev/null @@ -1,83 +0,0 @@ -# map-obj - -> Map object keys and values into a new object - -## Install - -``` -$ npm install map-obj -``` - -## Usage - -```js -const mapObject = require('map-obj'); - -const newObject = mapObject({foo: 'bar'}, (key, value) => [value, key]); -//=> {bar: 'foo'} - -const newObject = mapObject({FOO: true, bAr: {bAz: true}}, (key, value) => [key.toLowerCase(), value]); -//=> {foo: true, bar: {bAz: true}} - -const newObject = mapObject({FOO: true, bAr: {bAz: true}}, (key, value) => [key.toLowerCase(), value], {deep: true}); -//=> {foo: true, bar: {baz: true}} -``` - -## API - -### mapObject(source, mapper, options?) - -#### source - -Type: `object` - -Source object to copy properties from. - -#### mapper - -Type: `(sourceKey, sourceValue, source) => [targetKey, targetValue, mapperOptions?]` - -Mapping function. - -##### mapperOptions - -###### shouldRecurse - -Type: `boolean`\ -Default: `true` - -Whether `targetValue` should be recursed. Requires `deep: true`. - -#### options - -Type: `object` - -##### deep - -Type: `boolean`\ -Default: `false` - -Recurse nested objects and objects in arrays. - -##### target - -Type: `object`\ -Default: `{}` - -Target object to map properties on to. - -## Related - -- [filter-obj](https://github.com/sindresorhus/filter-obj) - Filter object keys and values into a new object - ---- - -
    - - Get professional support for this package with a Tidelift subscription - -
    - - Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. -
    -
    diff --git a/node_modules/matcher/index.d.ts b/node_modules/matcher/index.d.ts deleted file mode 100644 index 82920069..00000000 --- a/node_modules/matcher/index.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -declare namespace matcher { - interface Options { - /** - Treat uppercase and lowercase characters as being the same. - - Ensure you use this correctly. For example, files and directories should be matched case-insensitively, while most often, object keys should be matched case-sensitively. - - @default false - */ - readonly caseSensitive?: boolean; - } -} - -declare const matcher: { - /** - It matches even across newlines. For example, `foo*r` will match `foo\nbar`. - - @param inputs - String or array of strings to match. - @param patterns - String or array of string patterns. Use `*` to match zero or more characters. A pattern starting with `!` will be negated. - @returns Whether any given `input` matches every given `pattern`. - - @example - ``` - import matcher = require('matcher'); - - matcher.isMatch('unicorn', 'uni*'); - //=> true - - matcher.isMatch('unicorn', '*corn'); - //=> true - - matcher.isMatch('unicorn', 'un*rn'); - //=> true - - matcher.isMatch('rainbow', '!unicorn'); - //=> true - - matcher.isMatch('foo bar baz', 'foo b* b*'); - //=> true - - matcher.isMatch('unicorn', 'uni\\*'); - //=> false - - matcher.isMatch('UNICORN', 'UNI*', {caseSensitive: true}); - //=> true - - matcher.isMatch('UNICORN', 'unicorn', {caseSensitive: true}); - //=> false - - matcher.isMatch(['foo', 'bar'], 'f*'); - //=> true - - matcher.isMatch(['foo', 'bar'], ['a*', 'b*']); - //=> true - - matcher.isMatch('unicorn', ['tri*', 'UNI*'], {caseSensitive: true}); - //=> false - - matcher.isMatch('unicorn', ['']); - //=> false - - matcher.isMatch('unicorn', []); - //=> false - - matcher.isMatch([], 'bar'); - //=> false - - matcher.isMatch([], []); - //=> false - - matcher.isMatch([''], ['']); - //=> true - ``` - */ - isMatch: (inputs: string | readonly string[], patterns: string | readonly string[], options?: matcher.Options) => boolean; - - /** - Simple [wildcard](https://en.wikipedia.org/wiki/Wildcard_character) matching. - - It matches even across newlines. For example, `foo*r` will match `foo\nbar`. - - @param inputs - String or array of strings to match. - @param patterns - String or array of string patterns. Use `*` to match zero or more characters. A pattern starting with `!` will be negated. - @returns The `inputs` filtered based on the `patterns`. - - @example - ``` - import matcher = require('matcher'); - - matcher(['foo', 'bar', 'moo'], ['*oo', '!foo']); - //=> ['moo'] - - matcher(['foo', 'bar', 'moo'], ['!*oo']); - //=> ['bar'] - - matcher('moo', ['']); - //=> [] - - matcher('moo', []); - //=> [] - - matcher([''], ['']); - //=> [''] - ``` - */ - (inputs: string | readonly string[], patterns: string | readonly string[], options?: matcher.Options): string[]; -}; - -export = matcher; diff --git a/node_modules/matcher/index.js b/node_modules/matcher/index.js deleted file mode 100644 index fae25884..00000000 --- a/node_modules/matcher/index.js +++ /dev/null @@ -1,107 +0,0 @@ -'use strict'; -const escapeStringRegexp = require('escape-string-regexp'); - -const regexpCache = new Map(); - -function sanitizeArray(input, inputName) { - if (!Array.isArray(input)) { - switch (typeof input) { - case 'string': - input = [input]; - break; - case 'undefined': - input = []; - break; - default: - throw new TypeError(`Expected '${inputName}' to be a string or an array, but got a type of '${typeof input}'`); - } - } - - return input.filter(string => { - if (typeof string !== 'string') { - if (typeof string === 'undefined') { - return false; - } - - throw new TypeError(`Expected '${inputName}' to be an array of strings, but found a type of '${typeof string}' in the array`); - } - - return true; - }); -} - -function makeRegexp(pattern, options) { - options = { - caseSensitive: false, - ...options - }; - - const cacheKey = pattern + JSON.stringify(options); - - if (regexpCache.has(cacheKey)) { - return regexpCache.get(cacheKey); - } - - const negated = pattern[0] === '!'; - - if (negated) { - pattern = pattern.slice(1); - } - - pattern = escapeStringRegexp(pattern).replace(/\\\*/g, '[\\s\\S]*'); - - const regexp = new RegExp(`^${pattern}$`, options.caseSensitive ? '' : 'i'); - regexp.negated = negated; - regexpCache.set(cacheKey, regexp); - - return regexp; -} - -module.exports = (inputs, patterns, options) => { - inputs = sanitizeArray(inputs, 'inputs'); - patterns = sanitizeArray(patterns, 'patterns'); - - if (patterns.length === 0) { - return []; - } - - const isFirstPatternNegated = patterns[0][0] === '!'; - - patterns = patterns.map(pattern => makeRegexp(pattern, options)); - - const result = []; - - for (const input of inputs) { - // If first pattern is negated we include everything to match user expectation. - let matches = isFirstPatternNegated; - - for (const pattern of patterns) { - if (pattern.test(input)) { - matches = !pattern.negated; - } - } - - if (matches) { - result.push(input); - } - } - - return result; -}; - -module.exports.isMatch = (inputs, patterns, options) => { - inputs = sanitizeArray(inputs, 'inputs'); - patterns = sanitizeArray(patterns, 'patterns'); - - if (patterns.length === 0) { - return false; - } - - return inputs.some(input => { - return patterns.every(pattern => { - const regexp = makeRegexp(pattern, options); - const matches = regexp.test(input); - return regexp.negated ? !matches : matches; - }); - }); -}; diff --git a/node_modules/matcher/license b/node_modules/matcher/license deleted file mode 100644 index fa7ceba3..00000000 --- a/node_modules/matcher/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/matcher/node_modules/escape-string-regexp/index.d.ts b/node_modules/matcher/node_modules/escape-string-regexp/index.d.ts deleted file mode 100644 index 7d34edc7..00000000 --- a/node_modules/matcher/node_modules/escape-string-regexp/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** -Escape RegExp special characters. - -You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class. - -@example -``` -import escapeStringRegexp = require('escape-string-regexp'); - -const escapedString = escapeStringRegexp('How much $ for a 🦄?'); -//=> 'How much \\$ for a 🦄\\?' - -new RegExp(escapedString); -``` -*/ -declare const escapeStringRegexp: (string: string) => string; - -export = escapeStringRegexp; diff --git a/node_modules/matcher/node_modules/escape-string-regexp/index.js b/node_modules/matcher/node_modules/escape-string-regexp/index.js deleted file mode 100644 index 387c5615..00000000 --- a/node_modules/matcher/node_modules/escape-string-regexp/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -module.exports = string => { - if (typeof string !== 'string') { - throw new TypeError('Expected a string'); - } - - // Escape characters with special meaning either inside or outside character sets. - // Use a simple backslash escape when it’s always valid, and a \unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar. - return string - .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&') - .replace(/-/g, '\\x2d'); -}; diff --git a/node_modules/matcher/node_modules/escape-string-regexp/license b/node_modules/matcher/node_modules/escape-string-regexp/license deleted file mode 100644 index fa7ceba3..00000000 --- a/node_modules/matcher/node_modules/escape-string-regexp/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/matcher/node_modules/escape-string-regexp/package.json b/node_modules/matcher/node_modules/escape-string-regexp/package.json deleted file mode 100644 index d9199b53..00000000 --- a/node_modules/matcher/node_modules/escape-string-regexp/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "escape-string-regexp@^4.0.0", - "_id": "escape-string-regexp@4.0.0", - "_inBundle": false, - "_integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "_location": "/matcher/escape-string-regexp", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "escape-string-regexp@^4.0.0", - "name": "escape-string-regexp", - "escapedName": "escape-string-regexp", - "rawSpec": "^4.0.0", - "saveSpec": null, - "fetchSpec": "^4.0.0" - }, - "_requiredBy": [ - "/matcher" - ], - "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "_shasum": "14ba83a5d373e3d311e5afca29cf5bfad965bf34", - "_spec": "escape-string-regexp@^4.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/matcher", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/escape-string-regexp/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Escape RegExp special characters", - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.11.0", - "xo": "^0.28.3" - }, - "engines": { - "node": ">=10" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "funding": "https://github.com/sponsors/sindresorhus", - "homepage": "https://github.com/sindresorhus/escape-string-regexp#readme", - "keywords": [ - "escape", - "regex", - "regexp", - "regular", - "expression", - "string", - "special", - "characters" - ], - "license": "MIT", - "name": "escape-string-regexp", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/escape-string-regexp.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "4.0.0" -} diff --git a/node_modules/matcher/node_modules/escape-string-regexp/readme.md b/node_modules/matcher/node_modules/escape-string-regexp/readme.md deleted file mode 100644 index 2945dfcb..00000000 --- a/node_modules/matcher/node_modules/escape-string-regexp/readme.md +++ /dev/null @@ -1,34 +0,0 @@ -# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp) - -> Escape RegExp special characters - -## Install - -``` -$ npm install escape-string-regexp -``` - -## Usage - -```js -const escapeStringRegexp = require('escape-string-regexp'); - -const escapedString = escapeStringRegexp('How much $ for a 🦄?'); -//=> 'How much \\$ for a 🦄\\?' - -new RegExp(escapedString); -``` - -You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class. - ---- - -
    - - Get professional support for this package with a Tidelift subscription - -
    - - Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. -
    -
    diff --git a/node_modules/matcher/package.json b/node_modules/matcher/package.json deleted file mode 100644 index c6735f0b..00000000 --- a/node_modules/matcher/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_from": "matcher@~4.0", - "_id": "matcher@4.0.0", - "_inBundle": false, - "_integrity": "sha512-S6x5wmcDmsDRRU/c2dkccDwQPXoFczc5+HpQ2lON8pnvHlnvHAHj5WlLVvw6n6vNyHuVugYrFohYxbS+pvFpKQ==", - "_location": "/matcher", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "matcher@~4.0", - "name": "matcher", - "escapedName": "matcher", - "rawSpec": "~4.0", - "saveSpec": null, - "fetchSpec": "~4.0" - }, - "_requiredBy": [ - "/@antora/content-aggregator" - ], - "_resolved": "https://registry.npmjs.org/matcher/-/matcher-4.0.0.tgz", - "_shasum": "a42a05a09aaed92e2d241eb91fddac689461ea51", - "_spec": "matcher@~4.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/content-aggregator", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/matcher/issues" - }, - "bundleDependencies": false, - "dependencies": { - "escape-string-regexp": "^4.0.0" - }, - "deprecated": false, - "description": "Simple wildcard matching", - "devDependencies": { - "ava": "^2.4.0", - "matcha": "^0.7.0", - "tsd": "^0.14.0", - "xo": "^0.38.2" - }, - "engines": { - "node": ">=10" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "funding": "https://github.com/sponsors/sindresorhus", - "homepage": "https://github.com/sindresorhus/matcher#readme", - "keywords": [ - "matcher", - "matching", - "match", - "regex", - "regexp", - "regular", - "expression", - "wildcard", - "pattern", - "string", - "filter", - "glob", - "globber", - "globbing", - "minimatch" - ], - "license": "MIT", - "name": "matcher", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/matcher.git" - }, - "scripts": { - "bench": "matcha bench.js", - "test": "xo && ava && tsd" - }, - "version": "4.0.0" -} diff --git a/node_modules/matcher/readme.md b/node_modules/matcher/readme.md deleted file mode 100644 index e169bb37..00000000 --- a/node_modules/matcher/readme.md +++ /dev/null @@ -1,144 +0,0 @@ -# matcher - -> Simple [wildcard](https://en.wikipedia.org/wiki/Wildcard_character) matching - -Useful when you want to accept loose string input and regexes/globs are too convoluted. - -## Install - -``` -$ npm install matcher -``` - -## Usage - -```js -const matcher = require('matcher'); - -matcher(['foo', 'bar', 'moo'], ['*oo', '!foo']); -//=> ['moo'] - -matcher(['foo', 'bar', 'moo'], ['!*oo']); -//=> ['bar'] - -matcher('moo', ['']); -//=> [] - -matcher('moo', []); -//=> [] - -matcher([''], ['']); -//=> [''] - -matcher.isMatch('unicorn', 'uni*'); -//=> true - -matcher.isMatch('unicorn', '*corn'); -//=> true - -matcher.isMatch('unicorn', 'un*rn'); -//=> true - -matcher.isMatch('rainbow', '!unicorn'); -//=> true - -matcher.isMatch('foo bar baz', 'foo b* b*'); -//=> true - -matcher.isMatch('unicorn', 'uni\\*'); -//=> false - -matcher.isMatch('UNICORN', 'UNI*', {caseSensitive: true}); -//=> true - -matcher.isMatch('UNICORN', 'unicorn', {caseSensitive: true}); -//=> false - -matcher.isMatch(['foo', 'bar'], 'f*'); -//=> true - -matcher.isMatch(['foo', 'bar'], ['a*', 'b*']); -//=> true - -matcher.isMatch('unicorn', ['tri*', 'UNI*'], {caseSensitive: true}); -//=> false - -matcher.isMatch('unicorn', ['']); -//=> false - -matcher.isMatch('unicorn', []); -//=> false - -matcher.isMatch([], 'bar'); -//=> false - -matcher.isMatch([], []); -//=> false - -matcher.isMatch('', ''); -//=> true -``` - -## API - -It matches even across newlines. For example, `foo*r` will match `foo\nbar`. - -### matcher(inputs, patterns, options?) - -Accepts a string or an array of strings for both `inputs` and `patterns`. - -Returns an array of `inputs` filtered based on the `patterns`. - -### matcher.isMatch(input, pattern, options?) - -Accepts a string or an array of strings for both `inputs` and `patterns`. - -Returns a `boolean` of whether any given `input` matches every given `pattern`. - -#### input - -Type: `string | string[]` - -String or array of strings to match. - -#### options - -Type: `object` - -##### caseSensitive - -Type: `boolean`\ -Default: `false` - -Treat uppercase and lowercase characters as being the same. - -Ensure you use this correctly. For example, files and directories should be matched case-insensitively, while most often, object keys should be matched case-sensitively. - -#### pattern - -Type: `string | string[]` - -Use `*` to match zero or more characters. A pattern starting with `!` will be negated. - -## Benchmark - -``` -$ npm run bench -``` - -## Related - -- [matcher-cli](https://github.com/sindresorhus/matcher-cli) - CLI for this module -- [multimatch](https://github.com/sindresorhus/multimatch) - Extends `minimatch.match()` with support for multiple patterns - ---- - -
    - - Get professional support for this package with a Tidelift subscription - -
    - - Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. -
    -
    diff --git a/node_modules/mime-db/HISTORY.md b/node_modules/mime-db/HISTORY.md deleted file mode 100644 index ff9438ee..00000000 --- a/node_modules/mime-db/HISTORY.md +++ /dev/null @@ -1,480 +0,0 @@ -1.48.0 / 2021-05-30 -=================== - - * Add extension `.mvt` to `application/vnd.mapbox-vector-tile` - * Add new upstream MIME types - * Mark `text/yaml` as compressible - -1.47.0 / 2021-04-01 -=================== - - * Add new upstream MIME types - * Remove ambigious extensions from IANA for `application/*+xml` types - * Update primary extension to `.es` for `application/ecmascript` - -1.46.0 / 2021-02-13 -=================== - - * Add extension `.amr` to `audio/amr` - * Add extension `.m4s` to `video/iso.segment` - * Add extension `.opus` to `audio/ogg` - * Add new upstream MIME types - -1.45.0 / 2020-09-22 -=================== - - * Add `application/ubjson` with extension `.ubj` - * Add `image/avif` with extension `.avif` - * Add `image/ktx2` with extension `.ktx2` - * Add extension `.dbf` to `application/vnd.dbf` - * Add extension `.rar` to `application/vnd.rar` - * Add extension `.td` to `application/urc-targetdesc+xml` - * Add new upstream MIME types - * Fix extension of `application/vnd.apple.keynote` to be `.key` - -1.44.0 / 2020-04-22 -=================== - - * Add charsets from IANA - * Add extension `.cjs` to `application/node` - * Add new upstream MIME types - -1.43.0 / 2020-01-05 -=================== - - * Add `application/x-keepass2` with extension `.kdbx` - * Add extension `.mxmf` to `audio/mobile-xmf` - * Add extensions from IANA for `application/*+xml` types - * Add new upstream MIME types - -1.42.0 / 2019-09-25 -=================== - - * Add `image/vnd.ms-dds` with extension `.dds` - * Add new upstream MIME types - * Remove compressible from `multipart/mixed` - -1.41.0 / 2019-08-30 -=================== - - * Add new upstream MIME types - * Add `application/toml` with extension `.toml` - * Mark `font/ttf` as compressible - -1.40.0 / 2019-04-20 -=================== - - * Add extensions from IANA for `model/*` types - * Add `text/mdx` with extension `.mdx` - -1.39.0 / 2019-04-04 -=================== - - * Add extensions `.siv` and `.sieve` to `application/sieve` - * Add new upstream MIME types - -1.38.0 / 2019-02-04 -=================== - - * Add extension `.nq` to `application/n-quads` - * Add extension `.nt` to `application/n-triples` - * Add new upstream MIME types - * Mark `text/less` as compressible - -1.37.0 / 2018-10-19 -=================== - - * Add extensions to HEIC image types - * Add new upstream MIME types - -1.36.0 / 2018-08-20 -=================== - - * Add Apple file extensions from IANA - * Add extensions from IANA for `image/*` types - * Add new upstream MIME types - -1.35.0 / 2018-07-15 -=================== - - * Add extension `.owl` to `application/rdf+xml` - * Add new upstream MIME types - - Removes extension `.woff` from `application/font-woff` - -1.34.0 / 2018-06-03 -=================== - - * Add extension `.csl` to `application/vnd.citationstyles.style+xml` - * Add extension `.es` to `application/ecmascript` - * Add new upstream MIME types - * Add `UTF-8` as default charset for `text/turtle` - * Mark all XML-derived types as compressible - -1.33.0 / 2018-02-15 -=================== - - * Add extensions from IANA for `message/*` types - * Add new upstream MIME types - * Fix some incorrect OOXML types - * Remove `application/font-woff2` - -1.32.0 / 2017-11-29 -=================== - - * Add new upstream MIME types - * Update `text/hjson` to registered `application/hjson` - * Add `text/shex` with extension `.shex` - -1.31.0 / 2017-10-25 -=================== - - * Add `application/raml+yaml` with extension `.raml` - * Add `application/wasm` with extension `.wasm` - * Add new `font` type from IANA - * Add new upstream font extensions - * Add new upstream MIME types - * Add extensions for JPEG-2000 images - -1.30.0 / 2017-08-27 -=================== - - * Add `application/vnd.ms-outlook` - * Add `application/x-arj` - * Add extension `.mjs` to `application/javascript` - * Add glTF types and extensions - * Add new upstream MIME types - * Add `text/x-org` - * Add VirtualBox MIME types - * Fix `source` records for `video/*` types that are IANA - * Update `font/opentype` to registered `font/otf` - -1.29.0 / 2017-07-10 -=================== - - * Add `application/fido.trusted-apps+json` - * Add extension `.wadl` to `application/vnd.sun.wadl+xml` - * Add new upstream MIME types - * Add `UTF-8` as default charset for `text/css` - -1.28.0 / 2017-05-14 -=================== - - * Add new upstream MIME types - * Add extension `.gz` to `application/gzip` - * Update extensions `.md` and `.markdown` to be `text/markdown` - -1.27.0 / 2017-03-16 -=================== - - * Add new upstream MIME types - * Add `image/apng` with extension `.apng` - -1.26.0 / 2017-01-14 -=================== - - * Add new upstream MIME types - * Add extension `.geojson` to `application/geo+json` - -1.25.0 / 2016-11-11 -=================== - - * Add new upstream MIME types - -1.24.0 / 2016-09-18 -=================== - - * Add `audio/mp3` - * Add new upstream MIME types - -1.23.0 / 2016-05-01 -=================== - - * Add new upstream MIME types - * Add extension `.3gpp` to `audio/3gpp` - -1.22.0 / 2016-02-15 -=================== - - * Add `text/slim` - * Add extension `.rng` to `application/xml` - * Add new upstream MIME types - * Fix extension of `application/dash+xml` to be `.mpd` - * Update primary extension to `.m4a` for `audio/mp4` - -1.21.0 / 2016-01-06 -=================== - - * Add Google document types - * Add new upstream MIME types - -1.20.0 / 2015-11-10 -=================== - - * Add `text/x-suse-ymp` - * Add new upstream MIME types - -1.19.0 / 2015-09-17 -=================== - - * Add `application/vnd.apple.pkpass` - * Add new upstream MIME types - -1.18.0 / 2015-09-03 -=================== - - * Add new upstream MIME types - -1.17.0 / 2015-08-13 -=================== - - * Add `application/x-msdos-program` - * Add `audio/g711-0` - * Add `image/vnd.mozilla.apng` - * Add extension `.exe` to `application/x-msdos-program` - -1.16.0 / 2015-07-29 -=================== - - * Add `application/vnd.uri-map` - -1.15.0 / 2015-07-13 -=================== - - * Add `application/x-httpd-php` - -1.14.0 / 2015-06-25 -=================== - - * Add `application/scim+json` - * Add `application/vnd.3gpp.ussd+xml` - * Add `application/vnd.biopax.rdf+xml` - * Add `text/x-processing` - -1.13.0 / 2015-06-07 -=================== - - * Add nginx as a source - * Add `application/x-cocoa` - * Add `application/x-java-archive-diff` - * Add `application/x-makeself` - * Add `application/x-perl` - * Add `application/x-pilot` - * Add `application/x-redhat-package-manager` - * Add `application/x-sea` - * Add `audio/x-m4a` - * Add `audio/x-realaudio` - * Add `image/x-jng` - * Add `text/mathml` - -1.12.0 / 2015-06-05 -=================== - - * Add `application/bdoc` - * Add `application/vnd.hyperdrive+json` - * Add `application/x-bdoc` - * Add extension `.rtf` to `text/rtf` - -1.11.0 / 2015-05-31 -=================== - - * Add `audio/wav` - * Add `audio/wave` - * Add extension `.litcoffee` to `text/coffeescript` - * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data` - * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install` - -1.10.0 / 2015-05-19 -=================== - - * Add `application/vnd.balsamiq.bmpr` - * Add `application/vnd.microsoft.portable-executable` - * Add `application/x-ns-proxy-autoconfig` - -1.9.1 / 2015-04-19 -================== - - * Remove `.json` extension from `application/manifest+json` - - This is causing bugs downstream - -1.9.0 / 2015-04-19 -================== - - * Add `application/manifest+json` - * Add `application/vnd.micro+json` - * Add `image/vnd.zbrush.pcx` - * Add `image/x-ms-bmp` - -1.8.0 / 2015-03-13 -================== - - * Add `application/vnd.citationstyles.style+xml` - * Add `application/vnd.fastcopy-disk-image` - * Add `application/vnd.gov.sk.xmldatacontainer+xml` - * Add extension `.jsonld` to `application/ld+json` - -1.7.0 / 2015-02-08 -================== - - * Add `application/vnd.gerber` - * Add `application/vnd.msa-disk-image` - -1.6.1 / 2015-02-05 -================== - - * Community extensions ownership transferred from `node-mime` - -1.6.0 / 2015-01-29 -================== - - * Add `application/jose` - * Add `application/jose+json` - * Add `application/json-seq` - * Add `application/jwk+json` - * Add `application/jwk-set+json` - * Add `application/jwt` - * Add `application/rdap+json` - * Add `application/vnd.gov.sk.e-form+xml` - * Add `application/vnd.ims.imsccv1p3` - -1.5.0 / 2014-12-30 -================== - - * Add `application/vnd.oracle.resource+json` - * Fix various invalid MIME type entries - - `application/mbox+xml` - - `application/oscp-response` - - `application/vwg-multiplexed` - - `audio/g721` - -1.4.0 / 2014-12-21 -================== - - * Add `application/vnd.ims.imsccv1p2` - * Fix various invalid MIME type entries - - `application/vnd-acucobol` - - `application/vnd-curl` - - `application/vnd-dart` - - `application/vnd-dxr` - - `application/vnd-fdf` - - `application/vnd-mif` - - `application/vnd-sema` - - `application/vnd-wap-wmlc` - - `application/vnd.adobe.flash-movie` - - `application/vnd.dece-zip` - - `application/vnd.dvb_service` - - `application/vnd.micrografx-igx` - - `application/vnd.sealed-doc` - - `application/vnd.sealed-eml` - - `application/vnd.sealed-mht` - - `application/vnd.sealed-ppt` - - `application/vnd.sealed-tiff` - - `application/vnd.sealed-xls` - - `application/vnd.sealedmedia.softseal-html` - - `application/vnd.sealedmedia.softseal-pdf` - - `application/vnd.wap-slc` - - `application/vnd.wap-wbxml` - - `audio/vnd.sealedmedia.softseal-mpeg` - - `image/vnd-djvu` - - `image/vnd-svf` - - `image/vnd-wap-wbmp` - - `image/vnd.sealed-png` - - `image/vnd.sealedmedia.softseal-gif` - - `image/vnd.sealedmedia.softseal-jpg` - - `model/vnd-dwf` - - `model/vnd.parasolid.transmit-binary` - - `model/vnd.parasolid.transmit-text` - - `text/vnd-a` - - `text/vnd-curl` - - `text/vnd.wap-wml` - * Remove example template MIME types - - `application/example` - - `audio/example` - - `image/example` - - `message/example` - - `model/example` - - `multipart/example` - - `text/example` - - `video/example` - -1.3.1 / 2014-12-16 -================== - - * Fix missing extensions - - `application/json5` - - `text/hjson` - -1.3.0 / 2014-12-07 -================== - - * Add `application/a2l` - * Add `application/aml` - * Add `application/atfx` - * Add `application/atxml` - * Add `application/cdfx+xml` - * Add `application/dii` - * Add `application/json5` - * Add `application/lxf` - * Add `application/mf4` - * Add `application/vnd.apache.thrift.compact` - * Add `application/vnd.apache.thrift.json` - * Add `application/vnd.coffeescript` - * Add `application/vnd.enphase.envoy` - * Add `application/vnd.ims.imsccv1p1` - * Add `text/csv-schema` - * Add `text/hjson` - * Add `text/markdown` - * Add `text/yaml` - -1.2.0 / 2014-11-09 -================== - - * Add `application/cea` - * Add `application/dit` - * Add `application/vnd.gov.sk.e-form+zip` - * Add `application/vnd.tmd.mediaflex.api+xml` - * Type `application/epub+zip` is now IANA-registered - -1.1.2 / 2014-10-23 -================== - - * Rebuild database for `application/x-www-form-urlencoded` change - -1.1.1 / 2014-10-20 -================== - - * Mark `application/x-www-form-urlencoded` as compressible. - -1.1.0 / 2014-09-28 -================== - - * Add `application/font-woff2` - -1.0.3 / 2014-09-25 -================== - - * Fix engine requirement in package - -1.0.2 / 2014-09-25 -================== - - * Add `application/coap-group+json` - * Add `application/dcd` - * Add `application/vnd.apache.thrift.binary` - * Add `image/vnd.tencent.tap` - * Mark all JSON-derived types as compressible - * Update `text/vtt` data - -1.0.1 / 2014-08-30 -================== - - * Fix extension ordering - -1.0.0 / 2014-08-30 -================== - - * Add `application/atf` - * Add `application/merge-patch+json` - * Add `multipart/x-mixed-replace` - * Add `source: 'apache'` metadata - * Add `source: 'iana'` metadata - * Remove badly-assumed charset data diff --git a/node_modules/mime-db/LICENSE b/node_modules/mime-db/LICENSE deleted file mode 100644 index a7ae8ee9..00000000 --- a/node_modules/mime-db/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong me@jongleberry.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/mime-db/README.md b/node_modules/mime-db/README.md deleted file mode 100644 index 41c696a3..00000000 --- a/node_modules/mime-db/README.md +++ /dev/null @@ -1,100 +0,0 @@ -# mime-db - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][ci-image]][ci-url] -[![Coverage Status][coveralls-image]][coveralls-url] - -This is a database of all mime types. -It consists of a single, public JSON file and does not include any logic, -allowing it to remain as un-opinionated as possible with an API. -It aggregates data from the following sources: - -- http://www.iana.org/assignments/media-types/media-types.xhtml -- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types -- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types - -## Installation - -```bash -npm install mime-db -``` - -### Database Download - -If you're crazy enough to use this in the browser, you can just grab the -JSON file using [jsDelivr](https://www.jsdelivr.com/). It is recommended to -replace `master` with [a release tag](https://github.com/jshttp/mime-db/tags) -as the JSON format may change in the future. - -``` -https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json -``` - -## Usage - -```js -var db = require('mime-db') - -// grab data on .js files -var data = db['application/javascript'] -``` - -## Data Structure - -The JSON file is a map lookup for lowercased mime types. -Each mime type has the following properties: - -- `.source` - where the mime type is defined. - If not set, it's probably a custom media type. - - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) - - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml) - - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types) -- `.extensions[]` - known extensions associated with this mime type. -- `.compressible` - whether a file of this type can be gzipped. -- `.charset` - the default charset associated with this type, if any. - -If unknown, every property could be `undefined`. - -## Contributing - -To edit the database, only make PRs against `src/custom-types.json` or -`src/custom-suffix.json`. - -The `src/custom-types.json` file is a JSON object with the MIME type as the -keys and the values being an object with the following keys: - -- `compressible` - leave out if you don't know, otherwise `true`/`false` to - indicate whether the data represented by the type is typically compressible. -- `extensions` - include an array of file extensions that are associated with - the type. -- `notes` - human-readable notes about the type, typically what the type is. -- `sources` - include an array of URLs of where the MIME type and the associated - extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source); - links to type aggregating sites and Wikipedia are _not acceptable_. - -To update the build, run `npm run build`. - -### Adding Custom Media Types - -The best way to get new media types included in this library is to register -them with the IANA. The community registration procedure is outlined in -[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types -registered with the IANA are automatically pulled into this library. - -If that is not possible / feasible, they can be added directly here as a -"custom" type. To do this, it is required to have a primary source that -definitively lists the media type. If an extension is going to be listed as -associateed with this media type, the source must definitively link the -media type and extension as well. - -[ci-image]: https://badgen.net/github/checks/jshttp/mime-db/master?label=ci -[ci-url]: https://github.com/jshttp/mime-db/actions?query=workflow%3Aci -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-db/master -[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master -[node-image]: https://badgen.net/npm/node/mime-db -[node-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/mime-db -[npm-url]: https://npmjs.org/package/mime-db -[npm-version-image]: https://badgen.net/npm/v/mime-db diff --git a/node_modules/mime-db/db.json b/node_modules/mime-db/db.json deleted file mode 100644 index 067e0ce8..00000000 --- a/node_modules/mime-db/db.json +++ /dev/null @@ -1,8379 +0,0 @@ -{ - "application/1d-interleaved-parityfec": { - "source": "iana" - }, - "application/3gpdash-qoe-report+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/3gpp-ims+xml": { - "source": "iana", - "compressible": true - }, - "application/3gpphal+json": { - "source": "iana", - "compressible": true - }, - "application/3gpphalforms+json": { - "source": "iana", - "compressible": true - }, - "application/a2l": { - "source": "iana" - }, - "application/activemessage": { - "source": "iana" - }, - "application/activity+json": { - "source": "iana", - "compressible": true - }, - "application/alto-costmap+json": { - "source": "iana", - "compressible": true - }, - "application/alto-costmapfilter+json": { - "source": "iana", - "compressible": true - }, - "application/alto-directory+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointcost+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointcostparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointprop+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointpropparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-error+json": { - "source": "iana", - "compressible": true - }, - "application/alto-networkmap+json": { - "source": "iana", - "compressible": true - }, - "application/alto-networkmapfilter+json": { - "source": "iana", - "compressible": true - }, - "application/alto-updatestreamcontrol+json": { - "source": "iana", - "compressible": true - }, - "application/alto-updatestreamparams+json": { - "source": "iana", - "compressible": true - }, - "application/aml": { - "source": "iana" - }, - "application/andrew-inset": { - "source": "iana", - "extensions": ["ez"] - }, - "application/applefile": { - "source": "iana" - }, - "application/applixware": { - "source": "apache", - "extensions": ["aw"] - }, - "application/atf": { - "source": "iana" - }, - "application/atfx": { - "source": "iana" - }, - "application/atom+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atom"] - }, - "application/atomcat+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atomcat"] - }, - "application/atomdeleted+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atomdeleted"] - }, - "application/atomicmail": { - "source": "iana" - }, - "application/atomsvc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atomsvc"] - }, - "application/atsc-dwd+xml": { - "source": "iana", - "compressible": true, - "extensions": ["dwd"] - }, - "application/atsc-dynamic-event-message": { - "source": "iana" - }, - "application/atsc-held+xml": { - "source": "iana", - "compressible": true, - "extensions": ["held"] - }, - "application/atsc-rdt+json": { - "source": "iana", - "compressible": true - }, - "application/atsc-rsat+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rsat"] - }, - "application/atxml": { - "source": "iana" - }, - "application/auth-policy+xml": { - "source": "iana", - "compressible": true - }, - "application/bacnet-xdd+zip": { - "source": "iana", - "compressible": false - }, - "application/batch-smtp": { - "source": "iana" - }, - "application/bdoc": { - "compressible": false, - "extensions": ["bdoc"] - }, - "application/beep+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/calendar+json": { - "source": "iana", - "compressible": true - }, - "application/calendar+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xcs"] - }, - "application/call-completion": { - "source": "iana" - }, - "application/cals-1840": { - "source": "iana" - }, - "application/captive+json": { - "source": "iana", - "compressible": true - }, - "application/cbor": { - "source": "iana" - }, - "application/cbor-seq": { - "source": "iana" - }, - "application/cccex": { - "source": "iana" - }, - "application/ccmp+xml": { - "source": "iana", - "compressible": true - }, - "application/ccxml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ccxml"] - }, - "application/cdfx+xml": { - "source": "iana", - "compressible": true, - "extensions": ["cdfx"] - }, - "application/cdmi-capability": { - "source": "iana", - "extensions": ["cdmia"] - }, - "application/cdmi-container": { - "source": "iana", - "extensions": ["cdmic"] - }, - "application/cdmi-domain": { - "source": "iana", - "extensions": ["cdmid"] - }, - "application/cdmi-object": { - "source": "iana", - "extensions": ["cdmio"] - }, - "application/cdmi-queue": { - "source": "iana", - "extensions": ["cdmiq"] - }, - "application/cdni": { - "source": "iana" - }, - "application/cea": { - "source": "iana" - }, - "application/cea-2018+xml": { - "source": "iana", - "compressible": true - }, - "application/cellml+xml": { - "source": "iana", - "compressible": true - }, - "application/cfw": { - "source": "iana" - }, - "application/clr": { - "source": "iana" - }, - "application/clue+xml": { - "source": "iana", - "compressible": true - }, - "application/clue_info+xml": { - "source": "iana", - "compressible": true - }, - "application/cms": { - "source": "iana" - }, - "application/cnrp+xml": { - "source": "iana", - "compressible": true - }, - "application/coap-group+json": { - "source": "iana", - "compressible": true - }, - "application/coap-payload": { - "source": "iana" - }, - "application/commonground": { - "source": "iana" - }, - "application/conference-info+xml": { - "source": "iana", - "compressible": true - }, - "application/cose": { - "source": "iana" - }, - "application/cose-key": { - "source": "iana" - }, - "application/cose-key-set": { - "source": "iana" - }, - "application/cpl+xml": { - "source": "iana", - "compressible": true - }, - "application/csrattrs": { - "source": "iana" - }, - "application/csta+xml": { - "source": "iana", - "compressible": true - }, - "application/cstadata+xml": { - "source": "iana", - "compressible": true - }, - "application/csvm+json": { - "source": "iana", - "compressible": true - }, - "application/cu-seeme": { - "source": "apache", - "extensions": ["cu"] - }, - "application/cwt": { - "source": "iana" - }, - "application/cybercash": { - "source": "iana" - }, - "application/dart": { - "compressible": true - }, - "application/dash+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mpd"] - }, - "application/dashdelta": { - "source": "iana" - }, - "application/davmount+xml": { - "source": "iana", - "compressible": true, - "extensions": ["davmount"] - }, - "application/dca-rft": { - "source": "iana" - }, - "application/dcd": { - "source": "iana" - }, - "application/dec-dx": { - "source": "iana" - }, - "application/dialog-info+xml": { - "source": "iana", - "compressible": true - }, - "application/dicom": { - "source": "iana" - }, - "application/dicom+json": { - "source": "iana", - "compressible": true - }, - "application/dicom+xml": { - "source": "iana", - "compressible": true - }, - "application/dii": { - "source": "iana" - }, - "application/dit": { - "source": "iana" - }, - "application/dns": { - "source": "iana" - }, - "application/dns+json": { - "source": "iana", - "compressible": true - }, - "application/dns-message": { - "source": "iana" - }, - "application/docbook+xml": { - "source": "apache", - "compressible": true, - "extensions": ["dbk"] - }, - "application/dots+cbor": { - "source": "iana" - }, - "application/dskpp+xml": { - "source": "iana", - "compressible": true - }, - "application/dssc+der": { - "source": "iana", - "extensions": ["dssc"] - }, - "application/dssc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xdssc"] - }, - "application/dvcs": { - "source": "iana" - }, - "application/ecmascript": { - "source": "iana", - "compressible": true, - "extensions": ["es","ecma"] - }, - "application/edi-consent": { - "source": "iana" - }, - "application/edi-x12": { - "source": "iana", - "compressible": false - }, - "application/edifact": { - "source": "iana", - "compressible": false - }, - "application/efi": { - "source": "iana" - }, - "application/elm+json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/elm+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.cap+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/emergencycalldata.comment+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.control+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.deviceinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.ecall.msd": { - "source": "iana" - }, - "application/emergencycalldata.providerinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.serviceinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.subscriberinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.veds+xml": { - "source": "iana", - "compressible": true - }, - "application/emma+xml": { - "source": "iana", - "compressible": true, - "extensions": ["emma"] - }, - "application/emotionml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["emotionml"] - }, - "application/encaprtp": { - "source": "iana" - }, - "application/epp+xml": { - "source": "iana", - "compressible": true - }, - "application/epub+zip": { - "source": "iana", - "compressible": false, - "extensions": ["epub"] - }, - "application/eshop": { - "source": "iana" - }, - "application/exi": { - "source": "iana", - "extensions": ["exi"] - }, - "application/expect-ct-report+json": { - "source": "iana", - "compressible": true - }, - "application/fastinfoset": { - "source": "iana" - }, - "application/fastsoap": { - "source": "iana" - }, - "application/fdt+xml": { - "source": "iana", - "compressible": true, - "extensions": ["fdt"] - }, - "application/fhir+json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/fhir+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/fido.trusted-apps+json": { - "compressible": true - }, - "application/fits": { - "source": "iana" - }, - "application/flexfec": { - "source": "iana" - }, - "application/font-sfnt": { - "source": "iana" - }, - "application/font-tdpfr": { - "source": "iana", - "extensions": ["pfr"] - }, - "application/font-woff": { - "source": "iana", - "compressible": false - }, - "application/framework-attributes+xml": { - "source": "iana", - "compressible": true - }, - "application/geo+json": { - "source": "iana", - "compressible": true, - "extensions": ["geojson"] - }, - "application/geo+json-seq": { - "source": "iana" - }, - "application/geopackage+sqlite3": { - "source": "iana" - }, - "application/geoxacml+xml": { - "source": "iana", - "compressible": true - }, - "application/gltf-buffer": { - "source": "iana" - }, - "application/gml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["gml"] - }, - "application/gpx+xml": { - "source": "apache", - "compressible": true, - "extensions": ["gpx"] - }, - "application/gxf": { - "source": "apache", - "extensions": ["gxf"] - }, - "application/gzip": { - "source": "iana", - "compressible": false, - "extensions": ["gz"] - }, - "application/h224": { - "source": "iana" - }, - "application/held+xml": { - "source": "iana", - "compressible": true - }, - "application/hjson": { - "extensions": ["hjson"] - }, - "application/http": { - "source": "iana" - }, - "application/hyperstudio": { - "source": "iana", - "extensions": ["stk"] - }, - "application/ibe-key-request+xml": { - "source": "iana", - "compressible": true - }, - "application/ibe-pkg-reply+xml": { - "source": "iana", - "compressible": true - }, - "application/ibe-pp-data": { - "source": "iana" - }, - "application/iges": { - "source": "iana" - }, - "application/im-iscomposing+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/index": { - "source": "iana" - }, - "application/index.cmd": { - "source": "iana" - }, - "application/index.obj": { - "source": "iana" - }, - "application/index.response": { - "source": "iana" - }, - "application/index.vnd": { - "source": "iana" - }, - "application/inkml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ink","inkml"] - }, - "application/iotp": { - "source": "iana" - }, - "application/ipfix": { - "source": "iana", - "extensions": ["ipfix"] - }, - "application/ipp": { - "source": "iana" - }, - "application/isup": { - "source": "iana" - }, - "application/its+xml": { - "source": "iana", - "compressible": true, - "extensions": ["its"] - }, - "application/java-archive": { - "source": "apache", - "compressible": false, - "extensions": ["jar","war","ear"] - }, - "application/java-serialized-object": { - "source": "apache", - "compressible": false, - "extensions": ["ser"] - }, - "application/java-vm": { - "source": "apache", - "compressible": false, - "extensions": ["class"] - }, - "application/javascript": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["js","mjs"] - }, - "application/jf2feed+json": { - "source": "iana", - "compressible": true - }, - "application/jose": { - "source": "iana" - }, - "application/jose+json": { - "source": "iana", - "compressible": true - }, - "application/jrd+json": { - "source": "iana", - "compressible": true - }, - "application/jscalendar+json": { - "source": "iana", - "compressible": true - }, - "application/json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["json","map"] - }, - "application/json-patch+json": { - "source": "iana", - "compressible": true - }, - "application/json-seq": { - "source": "iana" - }, - "application/json5": { - "extensions": ["json5"] - }, - "application/jsonml+json": { - "source": "apache", - "compressible": true, - "extensions": ["jsonml"] - }, - "application/jwk+json": { - "source": "iana", - "compressible": true - }, - "application/jwk-set+json": { - "source": "iana", - "compressible": true - }, - "application/jwt": { - "source": "iana" - }, - "application/kpml-request+xml": { - "source": "iana", - "compressible": true - }, - "application/kpml-response+xml": { - "source": "iana", - "compressible": true - }, - "application/ld+json": { - "source": "iana", - "compressible": true, - "extensions": ["jsonld"] - }, - "application/lgr+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lgr"] - }, - "application/link-format": { - "source": "iana" - }, - "application/load-control+xml": { - "source": "iana", - "compressible": true - }, - "application/lost+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lostxml"] - }, - "application/lostsync+xml": { - "source": "iana", - "compressible": true - }, - "application/lpf+zip": { - "source": "iana", - "compressible": false - }, - "application/lxf": { - "source": "iana" - }, - "application/mac-binhex40": { - "source": "iana", - "extensions": ["hqx"] - }, - "application/mac-compactpro": { - "source": "apache", - "extensions": ["cpt"] - }, - "application/macwriteii": { - "source": "iana" - }, - "application/mads+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mads"] - }, - "application/manifest+json": { - "charset": "UTF-8", - "compressible": true, - "extensions": ["webmanifest"] - }, - "application/marc": { - "source": "iana", - "extensions": ["mrc"] - }, - "application/marcxml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mrcx"] - }, - "application/mathematica": { - "source": "iana", - "extensions": ["ma","nb","mb"] - }, - "application/mathml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mathml"] - }, - "application/mathml-content+xml": { - "source": "iana", - "compressible": true - }, - "application/mathml-presentation+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-associated-procedure-description+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-deregister+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-envelope+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-msk+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-msk-response+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-protection-description+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-reception-report+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-register+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-register-response+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-schedule+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-user-service-description+xml": { - "source": "iana", - "compressible": true - }, - "application/mbox": { - "source": "iana", - "extensions": ["mbox"] - }, - "application/media-policy-dataset+xml": { - "source": "iana", - "compressible": true - }, - "application/media_control+xml": { - "source": "iana", - "compressible": true - }, - "application/mediaservercontrol+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mscml"] - }, - "application/merge-patch+json": { - "source": "iana", - "compressible": true - }, - "application/metalink+xml": { - "source": "apache", - "compressible": true, - "extensions": ["metalink"] - }, - "application/metalink4+xml": { - "source": "iana", - "compressible": true, - "extensions": ["meta4"] - }, - "application/mets+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mets"] - }, - "application/mf4": { - "source": "iana" - }, - "application/mikey": { - "source": "iana" - }, - "application/mipc": { - "source": "iana" - }, - "application/mmt-aei+xml": { - "source": "iana", - "compressible": true, - "extensions": ["maei"] - }, - "application/mmt-usd+xml": { - "source": "iana", - "compressible": true, - "extensions": ["musd"] - }, - "application/mods+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mods"] - }, - "application/moss-keys": { - "source": "iana" - }, - "application/moss-signature": { - "source": "iana" - }, - "application/mosskey-data": { - "source": "iana" - }, - "application/mosskey-request": { - "source": "iana" - }, - "application/mp21": { - "source": "iana", - "extensions": ["m21","mp21"] - }, - "application/mp4": { - "source": "iana", - "extensions": ["mp4s","m4p"] - }, - "application/mpeg4-generic": { - "source": "iana" - }, - "application/mpeg4-iod": { - "source": "iana" - }, - "application/mpeg4-iod-xmt": { - "source": "iana" - }, - "application/mrb-consumer+xml": { - "source": "iana", - "compressible": true - }, - "application/mrb-publish+xml": { - "source": "iana", - "compressible": true - }, - "application/msc-ivr+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/msc-mixer+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/msword": { - "source": "iana", - "compressible": false, - "extensions": ["doc","dot"] - }, - "application/mud+json": { - "source": "iana", - "compressible": true - }, - "application/multipart-core": { - "source": "iana" - }, - "application/mxf": { - "source": "iana", - "extensions": ["mxf"] - }, - "application/n-quads": { - "source": "iana", - "extensions": ["nq"] - }, - "application/n-triples": { - "source": "iana", - "extensions": ["nt"] - }, - "application/nasdata": { - "source": "iana" - }, - "application/news-checkgroups": { - "source": "iana", - "charset": "US-ASCII" - }, - "application/news-groupinfo": { - "source": "iana", - "charset": "US-ASCII" - }, - "application/news-transmission": { - "source": "iana" - }, - "application/nlsml+xml": { - "source": "iana", - "compressible": true - }, - "application/node": { - "source": "iana", - "extensions": ["cjs"] - }, - "application/nss": { - "source": "iana" - }, - "application/oauth-authz-req+jwt": { - "source": "iana" - }, - "application/ocsp-request": { - "source": "iana" - }, - "application/ocsp-response": { - "source": "iana" - }, - "application/octet-stream": { - "source": "iana", - "compressible": false, - "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"] - }, - "application/oda": { - "source": "iana", - "extensions": ["oda"] - }, - "application/odm+xml": { - "source": "iana", - "compressible": true - }, - "application/odx": { - "source": "iana" - }, - "application/oebps-package+xml": { - "source": "iana", - "compressible": true, - "extensions": ["opf"] - }, - "application/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["ogx"] - }, - "application/omdoc+xml": { - "source": "apache", - "compressible": true, - "extensions": ["omdoc"] - }, - "application/onenote": { - "source": "apache", - "extensions": ["onetoc","onetoc2","onetmp","onepkg"] - }, - "application/opc-nodeset+xml": { - "source": "iana", - "compressible": true - }, - "application/oscore": { - "source": "iana" - }, - "application/oxps": { - "source": "iana", - "extensions": ["oxps"] - }, - "application/p2p-overlay+xml": { - "source": "iana", - "compressible": true, - "extensions": ["relo"] - }, - "application/parityfec": { - "source": "iana" - }, - "application/passport": { - "source": "iana" - }, - "application/patch-ops-error+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xer"] - }, - "application/pdf": { - "source": "iana", - "compressible": false, - "extensions": ["pdf"] - }, - "application/pdx": { - "source": "iana" - }, - "application/pem-certificate-chain": { - "source": "iana" - }, - "application/pgp-encrypted": { - "source": "iana", - "compressible": false, - "extensions": ["pgp"] - }, - "application/pgp-keys": { - "source": "iana" - }, - "application/pgp-signature": { - "source": "iana", - "extensions": ["asc","sig"] - }, - "application/pics-rules": { - "source": "apache", - "extensions": ["prf"] - }, - "application/pidf+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/pidf-diff+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/pkcs10": { - "source": "iana", - "extensions": ["p10"] - }, - "application/pkcs12": { - "source": "iana" - }, - "application/pkcs7-mime": { - "source": "iana", - "extensions": ["p7m","p7c"] - }, - "application/pkcs7-signature": { - "source": "iana", - "extensions": ["p7s"] - }, - "application/pkcs8": { - "source": "iana", - "extensions": ["p8"] - }, - "application/pkcs8-encrypted": { - "source": "iana" - }, - "application/pkix-attr-cert": { - "source": "iana", - "extensions": ["ac"] - }, - "application/pkix-cert": { - "source": "iana", - "extensions": ["cer"] - }, - "application/pkix-crl": { - "source": "iana", - "extensions": ["crl"] - }, - "application/pkix-pkipath": { - "source": "iana", - "extensions": ["pkipath"] - }, - "application/pkixcmp": { - "source": "iana", - "extensions": ["pki"] - }, - "application/pls+xml": { - "source": "iana", - "compressible": true, - "extensions": ["pls"] - }, - "application/poc-settings+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/postscript": { - "source": "iana", - "compressible": true, - "extensions": ["ai","eps","ps"] - }, - "application/ppsp-tracker+json": { - "source": "iana", - "compressible": true - }, - "application/problem+json": { - "source": "iana", - "compressible": true - }, - "application/problem+xml": { - "source": "iana", - "compressible": true - }, - "application/provenance+xml": { - "source": "iana", - "compressible": true, - "extensions": ["provx"] - }, - "application/prs.alvestrand.titrax-sheet": { - "source": "iana" - }, - "application/prs.cww": { - "source": "iana", - "extensions": ["cww"] - }, - "application/prs.cyn": { - "source": "iana", - "charset": "7-BIT" - }, - "application/prs.hpub+zip": { - "source": "iana", - "compressible": false - }, - "application/prs.nprend": { - "source": "iana" - }, - "application/prs.plucker": { - "source": "iana" - }, - "application/prs.rdf-xml-crypt": { - "source": "iana" - }, - "application/prs.xsf+xml": { - "source": "iana", - "compressible": true - }, - "application/pskc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["pskcxml"] - }, - "application/pvd+json": { - "source": "iana", - "compressible": true - }, - "application/qsig": { - "source": "iana" - }, - "application/raml+yaml": { - "compressible": true, - "extensions": ["raml"] - }, - "application/raptorfec": { - "source": "iana" - }, - "application/rdap+json": { - "source": "iana", - "compressible": true - }, - "application/rdf+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rdf","owl"] - }, - "application/reginfo+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rif"] - }, - "application/relax-ng-compact-syntax": { - "source": "iana", - "extensions": ["rnc"] - }, - "application/remote-printing": { - "source": "iana" - }, - "application/reputon+json": { - "source": "iana", - "compressible": true - }, - "application/resource-lists+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rl"] - }, - "application/resource-lists-diff+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rld"] - }, - "application/rfc+xml": { - "source": "iana", - "compressible": true - }, - "application/riscos": { - "source": "iana" - }, - "application/rlmi+xml": { - "source": "iana", - "compressible": true - }, - "application/rls-services+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rs"] - }, - "application/route-apd+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rapd"] - }, - "application/route-s-tsid+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sls"] - }, - "application/route-usd+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rusd"] - }, - "application/rpki-ghostbusters": { - "source": "iana", - "extensions": ["gbr"] - }, - "application/rpki-manifest": { - "source": "iana", - "extensions": ["mft"] - }, - "application/rpki-publication": { - "source": "iana" - }, - "application/rpki-roa": { - "source": "iana", - "extensions": ["roa"] - }, - "application/rpki-updown": { - "source": "iana" - }, - "application/rsd+xml": { - "source": "apache", - "compressible": true, - "extensions": ["rsd"] - }, - "application/rss+xml": { - "source": "apache", - "compressible": true, - "extensions": ["rss"] - }, - "application/rtf": { - "source": "iana", - "compressible": true, - "extensions": ["rtf"] - }, - "application/rtploopback": { - "source": "iana" - }, - "application/rtx": { - "source": "iana" - }, - "application/samlassertion+xml": { - "source": "iana", - "compressible": true - }, - "application/samlmetadata+xml": { - "source": "iana", - "compressible": true - }, - "application/sarif+json": { - "source": "iana", - "compressible": true - }, - "application/sarif-external-properties+json": { - "source": "iana", - "compressible": true - }, - "application/sbe": { - "source": "iana" - }, - "application/sbml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sbml"] - }, - "application/scaip+xml": { - "source": "iana", - "compressible": true - }, - "application/scim+json": { - "source": "iana", - "compressible": true - }, - "application/scvp-cv-request": { - "source": "iana", - "extensions": ["scq"] - }, - "application/scvp-cv-response": { - "source": "iana", - "extensions": ["scs"] - }, - "application/scvp-vp-request": { - "source": "iana", - "extensions": ["spq"] - }, - "application/scvp-vp-response": { - "source": "iana", - "extensions": ["spp"] - }, - "application/sdp": { - "source": "iana", - "extensions": ["sdp"] - }, - "application/secevent+jwt": { - "source": "iana" - }, - "application/senml+cbor": { - "source": "iana" - }, - "application/senml+json": { - "source": "iana", - "compressible": true - }, - "application/senml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["senmlx"] - }, - "application/senml-etch+cbor": { - "source": "iana" - }, - "application/senml-etch+json": { - "source": "iana", - "compressible": true - }, - "application/senml-exi": { - "source": "iana" - }, - "application/sensml+cbor": { - "source": "iana" - }, - "application/sensml+json": { - "source": "iana", - "compressible": true - }, - "application/sensml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sensmlx"] - }, - "application/sensml-exi": { - "source": "iana" - }, - "application/sep+xml": { - "source": "iana", - "compressible": true - }, - "application/sep-exi": { - "source": "iana" - }, - "application/session-info": { - "source": "iana" - }, - "application/set-payment": { - "source": "iana" - }, - "application/set-payment-initiation": { - "source": "iana", - "extensions": ["setpay"] - }, - "application/set-registration": { - "source": "iana" - }, - "application/set-registration-initiation": { - "source": "iana", - "extensions": ["setreg"] - }, - "application/sgml": { - "source": "iana" - }, - "application/sgml-open-catalog": { - "source": "iana" - }, - "application/shf+xml": { - "source": "iana", - "compressible": true, - "extensions": ["shf"] - }, - "application/sieve": { - "source": "iana", - "extensions": ["siv","sieve"] - }, - "application/simple-filter+xml": { - "source": "iana", - "compressible": true - }, - "application/simple-message-summary": { - "source": "iana" - }, - "application/simplesymbolcontainer": { - "source": "iana" - }, - "application/sipc": { - "source": "iana" - }, - "application/slate": { - "source": "iana" - }, - "application/smil": { - "source": "iana" - }, - "application/smil+xml": { - "source": "iana", - "compressible": true, - "extensions": ["smi","smil"] - }, - "application/smpte336m": { - "source": "iana" - }, - "application/soap+fastinfoset": { - "source": "iana" - }, - "application/soap+xml": { - "source": "iana", - "compressible": true - }, - "application/sparql-query": { - "source": "iana", - "extensions": ["rq"] - }, - "application/sparql-results+xml": { - "source": "iana", - "compressible": true, - "extensions": ["srx"] - }, - "application/spirits-event+xml": { - "source": "iana", - "compressible": true - }, - "application/sql": { - "source": "iana" - }, - "application/srgs": { - "source": "iana", - "extensions": ["gram"] - }, - "application/srgs+xml": { - "source": "iana", - "compressible": true, - "extensions": ["grxml"] - }, - "application/sru+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sru"] - }, - "application/ssdl+xml": { - "source": "apache", - "compressible": true, - "extensions": ["ssdl"] - }, - "application/ssml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ssml"] - }, - "application/stix+json": { - "source": "iana", - "compressible": true - }, - "application/swid+xml": { - "source": "iana", - "compressible": true, - "extensions": ["swidtag"] - }, - "application/tamp-apex-update": { - "source": "iana" - }, - "application/tamp-apex-update-confirm": { - "source": "iana" - }, - "application/tamp-community-update": { - "source": "iana" - }, - "application/tamp-community-update-confirm": { - "source": "iana" - }, - "application/tamp-error": { - "source": "iana" - }, - "application/tamp-sequence-adjust": { - "source": "iana" - }, - "application/tamp-sequence-adjust-confirm": { - "source": "iana" - }, - "application/tamp-status-query": { - "source": "iana" - }, - "application/tamp-status-response": { - "source": "iana" - }, - "application/tamp-update": { - "source": "iana" - }, - "application/tamp-update-confirm": { - "source": "iana" - }, - "application/tar": { - "compressible": true - }, - "application/taxii+json": { - "source": "iana", - "compressible": true - }, - "application/td+json": { - "source": "iana", - "compressible": true - }, - "application/tei+xml": { - "source": "iana", - "compressible": true, - "extensions": ["tei","teicorpus"] - }, - "application/tetra_isi": { - "source": "iana" - }, - "application/thraud+xml": { - "source": "iana", - "compressible": true, - "extensions": ["tfi"] - }, - "application/timestamp-query": { - "source": "iana" - }, - "application/timestamp-reply": { - "source": "iana" - }, - "application/timestamped-data": { - "source": "iana", - "extensions": ["tsd"] - }, - "application/tlsrpt+gzip": { - "source": "iana" - }, - "application/tlsrpt+json": { - "source": "iana", - "compressible": true - }, - "application/tnauthlist": { - "source": "iana" - }, - "application/toml": { - "compressible": true, - "extensions": ["toml"] - }, - "application/trickle-ice-sdpfrag": { - "source": "iana" - }, - "application/trig": { - "source": "iana" - }, - "application/ttml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ttml"] - }, - "application/tve-trigger": { - "source": "iana" - }, - "application/tzif": { - "source": "iana" - }, - "application/tzif-leap": { - "source": "iana" - }, - "application/ubjson": { - "compressible": false, - "extensions": ["ubj"] - }, - "application/ulpfec": { - "source": "iana" - }, - "application/urc-grpsheet+xml": { - "source": "iana", - "compressible": true - }, - "application/urc-ressheet+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rsheet"] - }, - "application/urc-targetdesc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["td"] - }, - "application/urc-uisocketdesc+xml": { - "source": "iana", - "compressible": true - }, - "application/vcard+json": { - "source": "iana", - "compressible": true - }, - "application/vcard+xml": { - "source": "iana", - "compressible": true - }, - "application/vemmi": { - "source": "iana" - }, - "application/vividence.scriptfile": { - "source": "apache" - }, - "application/vnd.1000minds.decision-model+xml": { - "source": "iana", - "compressible": true, - "extensions": ["1km"] - }, - "application/vnd.3gpp-prose+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp-prose-pc3ch+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp-v2x-local-service-information": { - "source": "iana" - }, - "application/vnd.3gpp.5gnas": { - "source": "iana" - }, - "application/vnd.3gpp.access-transfer-events+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.bsf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.gmop+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.gtpc": { - "source": "iana" - }, - "application/vnd.3gpp.interworking-data": { - "source": "iana" - }, - "application/vnd.3gpp.lpp": { - "source": "iana" - }, - "application/vnd.3gpp.mc-signalling-ear": { - "source": "iana" - }, - "application/vnd.3gpp.mcdata-affiliation-command+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-payload": { - "source": "iana" - }, - "application/vnd.3gpp.mcdata-service-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-signalling": { - "source": "iana" - }, - "application/vnd.3gpp.mcdata-ue-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-user-profile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-affiliation-command+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-floor-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-location-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-service-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-signed+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-ue-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-ue-init-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-user-profile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-affiliation-command+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-affiliation-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-location-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-service-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-transmission-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-ue-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-user-profile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mid-call+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.ngap": { - "source": "iana" - }, - "application/vnd.3gpp.pfcp": { - "source": "iana" - }, - "application/vnd.3gpp.pic-bw-large": { - "source": "iana", - "extensions": ["plb"] - }, - "application/vnd.3gpp.pic-bw-small": { - "source": "iana", - "extensions": ["psb"] - }, - "application/vnd.3gpp.pic-bw-var": { - "source": "iana", - "extensions": ["pvb"] - }, - "application/vnd.3gpp.s1ap": { - "source": "iana" - }, - "application/vnd.3gpp.sms": { - "source": "iana" - }, - "application/vnd.3gpp.sms+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.srvcc-ext+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.srvcc-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.state-and-event-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.ussd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp2.bcmcsinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp2.sms": { - "source": "iana" - }, - "application/vnd.3gpp2.tcap": { - "source": "iana", - "extensions": ["tcap"] - }, - "application/vnd.3lightssoftware.imagescal": { - "source": "iana" - }, - "application/vnd.3m.post-it-notes": { - "source": "iana", - "extensions": ["pwn"] - }, - "application/vnd.accpac.simply.aso": { - "source": "iana", - "extensions": ["aso"] - }, - "application/vnd.accpac.simply.imp": { - "source": "iana", - "extensions": ["imp"] - }, - "application/vnd.acucobol": { - "source": "iana", - "extensions": ["acu"] - }, - "application/vnd.acucorp": { - "source": "iana", - "extensions": ["atc","acutc"] - }, - "application/vnd.adobe.air-application-installer-package+zip": { - "source": "apache", - "compressible": false, - "extensions": ["air"] - }, - "application/vnd.adobe.flash.movie": { - "source": "iana" - }, - "application/vnd.adobe.formscentral.fcdt": { - "source": "iana", - "extensions": ["fcdt"] - }, - "application/vnd.adobe.fxp": { - "source": "iana", - "extensions": ["fxp","fxpl"] - }, - "application/vnd.adobe.partial-upload": { - "source": "iana" - }, - "application/vnd.adobe.xdp+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xdp"] - }, - "application/vnd.adobe.xfdf": { - "source": "iana", - "extensions": ["xfdf"] - }, - "application/vnd.aether.imp": { - "source": "iana" - }, - "application/vnd.afpc.afplinedata": { - "source": "iana" - }, - "application/vnd.afpc.afplinedata-pagedef": { - "source": "iana" - }, - "application/vnd.afpc.cmoca-cmresource": { - "source": "iana" - }, - "application/vnd.afpc.foca-charset": { - "source": "iana" - }, - "application/vnd.afpc.foca-codedfont": { - "source": "iana" - }, - "application/vnd.afpc.foca-codepage": { - "source": "iana" - }, - "application/vnd.afpc.modca": { - "source": "iana" - }, - "application/vnd.afpc.modca-cmtable": { - "source": "iana" - }, - "application/vnd.afpc.modca-formdef": { - "source": "iana" - }, - "application/vnd.afpc.modca-mediummap": { - "source": "iana" - }, - "application/vnd.afpc.modca-objectcontainer": { - "source": "iana" - }, - "application/vnd.afpc.modca-overlay": { - "source": "iana" - }, - "application/vnd.afpc.modca-pagesegment": { - "source": "iana" - }, - "application/vnd.ah-barcode": { - "source": "iana" - }, - "application/vnd.ahead.space": { - "source": "iana", - "extensions": ["ahead"] - }, - "application/vnd.airzip.filesecure.azf": { - "source": "iana", - "extensions": ["azf"] - }, - "application/vnd.airzip.filesecure.azs": { - "source": "iana", - "extensions": ["azs"] - }, - "application/vnd.amadeus+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.amazon.ebook": { - "source": "apache", - "extensions": ["azw"] - }, - "application/vnd.amazon.mobi8-ebook": { - "source": "iana" - }, - "application/vnd.americandynamics.acc": { - "source": "iana", - "extensions": ["acc"] - }, - "application/vnd.amiga.ami": { - "source": "iana", - "extensions": ["ami"] - }, - "application/vnd.amundsen.maze+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.android.ota": { - "source": "iana" - }, - "application/vnd.android.package-archive": { - "source": "apache", - "compressible": false, - "extensions": ["apk"] - }, - "application/vnd.anki": { - "source": "iana" - }, - "application/vnd.anser-web-certificate-issue-initiation": { - "source": "iana", - "extensions": ["cii"] - }, - "application/vnd.anser-web-funds-transfer-initiation": { - "source": "apache", - "extensions": ["fti"] - }, - "application/vnd.antix.game-component": { - "source": "iana", - "extensions": ["atx"] - }, - "application/vnd.apache.thrift.binary": { - "source": "iana" - }, - "application/vnd.apache.thrift.compact": { - "source": "iana" - }, - "application/vnd.apache.thrift.json": { - "source": "iana" - }, - "application/vnd.api+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.aplextor.warrp+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.apothekende.reservation+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.apple.installer+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mpkg"] - }, - "application/vnd.apple.keynote": { - "source": "iana", - "extensions": ["key"] - }, - "application/vnd.apple.mpegurl": { - "source": "iana", - "extensions": ["m3u8"] - }, - "application/vnd.apple.numbers": { - "source": "iana", - "extensions": ["numbers"] - }, - "application/vnd.apple.pages": { - "source": "iana", - "extensions": ["pages"] - }, - "application/vnd.apple.pkpass": { - "compressible": false, - "extensions": ["pkpass"] - }, - "application/vnd.arastra.swi": { - "source": "iana" - }, - "application/vnd.aristanetworks.swi": { - "source": "iana", - "extensions": ["swi"] - }, - "application/vnd.artisan+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.artsquare": { - "source": "iana" - }, - "application/vnd.astraea-software.iota": { - "source": "iana", - "extensions": ["iota"] - }, - "application/vnd.audiograph": { - "source": "iana", - "extensions": ["aep"] - }, - "application/vnd.autopackage": { - "source": "iana" - }, - "application/vnd.avalon+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.avistar+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.balsamiq.bmml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["bmml"] - }, - "application/vnd.balsamiq.bmpr": { - "source": "iana" - }, - "application/vnd.banana-accounting": { - "source": "iana" - }, - "application/vnd.bbf.usp.error": { - "source": "iana" - }, - "application/vnd.bbf.usp.msg": { - "source": "iana" - }, - "application/vnd.bbf.usp.msg+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.bekitzur-stech+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.bint.med-content": { - "source": "iana" - }, - "application/vnd.biopax.rdf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.blink-idb-value-wrapper": { - "source": "iana" - }, - "application/vnd.blueice.multipass": { - "source": "iana", - "extensions": ["mpm"] - }, - "application/vnd.bluetooth.ep.oob": { - "source": "iana" - }, - "application/vnd.bluetooth.le.oob": { - "source": "iana" - }, - "application/vnd.bmi": { - "source": "iana", - "extensions": ["bmi"] - }, - "application/vnd.bpf": { - "source": "iana" - }, - "application/vnd.bpf3": { - "source": "iana" - }, - "application/vnd.businessobjects": { - "source": "iana", - "extensions": ["rep"] - }, - "application/vnd.byu.uapi+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cab-jscript": { - "source": "iana" - }, - "application/vnd.canon-cpdl": { - "source": "iana" - }, - "application/vnd.canon-lips": { - "source": "iana" - }, - "application/vnd.capasystems-pg+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cendio.thinlinc.clientconf": { - "source": "iana" - }, - "application/vnd.century-systems.tcp_stream": { - "source": "iana" - }, - "application/vnd.chemdraw+xml": { - "source": "iana", - "compressible": true, - "extensions": ["cdxml"] - }, - "application/vnd.chess-pgn": { - "source": "iana" - }, - "application/vnd.chipnuts.karaoke-mmd": { - "source": "iana", - "extensions": ["mmd"] - }, - "application/vnd.ciedi": { - "source": "iana" - }, - "application/vnd.cinderella": { - "source": "iana", - "extensions": ["cdy"] - }, - "application/vnd.cirpack.isdn-ext": { - "source": "iana" - }, - "application/vnd.citationstyles.style+xml": { - "source": "iana", - "compressible": true, - "extensions": ["csl"] - }, - "application/vnd.claymore": { - "source": "iana", - "extensions": ["cla"] - }, - "application/vnd.cloanto.rp9": { - "source": "iana", - "extensions": ["rp9"] - }, - "application/vnd.clonk.c4group": { - "source": "iana", - "extensions": ["c4g","c4d","c4f","c4p","c4u"] - }, - "application/vnd.cluetrust.cartomobile-config": { - "source": "iana", - "extensions": ["c11amc"] - }, - "application/vnd.cluetrust.cartomobile-config-pkg": { - "source": "iana", - "extensions": ["c11amz"] - }, - "application/vnd.coffeescript": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.document": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.document-template": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.presentation": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.presentation-template": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.spreadsheet": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.spreadsheet-template": { - "source": "iana" - }, - "application/vnd.collection+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.collection.doc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.collection.next+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.comicbook+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.comicbook-rar": { - "source": "iana" - }, - "application/vnd.commerce-battelle": { - "source": "iana" - }, - "application/vnd.commonspace": { - "source": "iana", - "extensions": ["csp"] - }, - "application/vnd.contact.cmsg": { - "source": "iana", - "extensions": ["cdbcmsg"] - }, - "application/vnd.coreos.ignition+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cosmocaller": { - "source": "iana", - "extensions": ["cmc"] - }, - "application/vnd.crick.clicker": { - "source": "iana", - "extensions": ["clkx"] - }, - "application/vnd.crick.clicker.keyboard": { - "source": "iana", - "extensions": ["clkk"] - }, - "application/vnd.crick.clicker.palette": { - "source": "iana", - "extensions": ["clkp"] - }, - "application/vnd.crick.clicker.template": { - "source": "iana", - "extensions": ["clkt"] - }, - "application/vnd.crick.clicker.wordbank": { - "source": "iana", - "extensions": ["clkw"] - }, - "application/vnd.criticaltools.wbs+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wbs"] - }, - "application/vnd.cryptii.pipe+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.crypto-shade-file": { - "source": "iana" - }, - "application/vnd.cryptomator.encrypted": { - "source": "iana" - }, - "application/vnd.cryptomator.vault": { - "source": "iana" - }, - "application/vnd.ctc-posml": { - "source": "iana", - "extensions": ["pml"] - }, - "application/vnd.ctct.ws+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.cups-pdf": { - "source": "iana" - }, - "application/vnd.cups-postscript": { - "source": "iana" - }, - "application/vnd.cups-ppd": { - "source": "iana", - "extensions": ["ppd"] - }, - "application/vnd.cups-raster": { - "source": "iana" - }, - "application/vnd.cups-raw": { - "source": "iana" - }, - "application/vnd.curl": { - "source": "iana" - }, - "application/vnd.curl.car": { - "source": "apache", - "extensions": ["car"] - }, - "application/vnd.curl.pcurl": { - "source": "apache", - "extensions": ["pcurl"] - }, - "application/vnd.cyan.dean.root+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.cybank": { - "source": "iana" - }, - "application/vnd.cyclonedx+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cyclonedx+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.d2l.coursepackage1p0+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.d3m-dataset": { - "source": "iana" - }, - "application/vnd.d3m-problem": { - "source": "iana" - }, - "application/vnd.dart": { - "source": "iana", - "compressible": true, - "extensions": ["dart"] - }, - "application/vnd.data-vision.rdz": { - "source": "iana", - "extensions": ["rdz"] - }, - "application/vnd.datapackage+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.dataresource+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.dbf": { - "source": "iana", - "extensions": ["dbf"] - }, - "application/vnd.debian.binary-package": { - "source": "iana" - }, - "application/vnd.dece.data": { - "source": "iana", - "extensions": ["uvf","uvvf","uvd","uvvd"] - }, - "application/vnd.dece.ttml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["uvt","uvvt"] - }, - "application/vnd.dece.unspecified": { - "source": "iana", - "extensions": ["uvx","uvvx"] - }, - "application/vnd.dece.zip": { - "source": "iana", - "extensions": ["uvz","uvvz"] - }, - "application/vnd.denovo.fcselayout-link": { - "source": "iana", - "extensions": ["fe_launch"] - }, - "application/vnd.desmume.movie": { - "source": "iana" - }, - "application/vnd.dir-bi.plate-dl-nosuffix": { - "source": "iana" - }, - "application/vnd.dm.delegation+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dna": { - "source": "iana", - "extensions": ["dna"] - }, - "application/vnd.document+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.dolby.mlp": { - "source": "apache", - "extensions": ["mlp"] - }, - "application/vnd.dolby.mobile.1": { - "source": "iana" - }, - "application/vnd.dolby.mobile.2": { - "source": "iana" - }, - "application/vnd.doremir.scorecloud-binary-document": { - "source": "iana" - }, - "application/vnd.dpgraph": { - "source": "iana", - "extensions": ["dpg"] - }, - "application/vnd.dreamfactory": { - "source": "iana", - "extensions": ["dfac"] - }, - "application/vnd.drive+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ds-keypoint": { - "source": "apache", - "extensions": ["kpxx"] - }, - "application/vnd.dtg.local": { - "source": "iana" - }, - "application/vnd.dtg.local.flash": { - "source": "iana" - }, - "application/vnd.dtg.local.html": { - "source": "iana" - }, - "application/vnd.dvb.ait": { - "source": "iana", - "extensions": ["ait"] - }, - "application/vnd.dvb.dvbisl+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.dvbj": { - "source": "iana" - }, - "application/vnd.dvb.esgcontainer": { - "source": "iana" - }, - "application/vnd.dvb.ipdcdftnotifaccess": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgaccess": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgaccess2": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgpdd": { - "source": "iana" - }, - "application/vnd.dvb.ipdcroaming": { - "source": "iana" - }, - "application/vnd.dvb.iptv.alfec-base": { - "source": "iana" - }, - "application/vnd.dvb.iptv.alfec-enhancement": { - "source": "iana" - }, - "application/vnd.dvb.notif-aggregate-root+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-container+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-generic+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-ia-msglist+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-ia-registration-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-ia-registration-response+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-init+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.pfr": { - "source": "iana" - }, - "application/vnd.dvb.service": { - "source": "iana", - "extensions": ["svc"] - }, - "application/vnd.dxr": { - "source": "iana" - }, - "application/vnd.dynageo": { - "source": "iana", - "extensions": ["geo"] - }, - "application/vnd.dzr": { - "source": "iana" - }, - "application/vnd.easykaraoke.cdgdownload": { - "source": "iana" - }, - "application/vnd.ecdis-update": { - "source": "iana" - }, - "application/vnd.ecip.rlp": { - "source": "iana" - }, - "application/vnd.ecowin.chart": { - "source": "iana", - "extensions": ["mag"] - }, - "application/vnd.ecowin.filerequest": { - "source": "iana" - }, - "application/vnd.ecowin.fileupdate": { - "source": "iana" - }, - "application/vnd.ecowin.series": { - "source": "iana" - }, - "application/vnd.ecowin.seriesrequest": { - "source": "iana" - }, - "application/vnd.ecowin.seriesupdate": { - "source": "iana" - }, - "application/vnd.efi.img": { - "source": "iana" - }, - "application/vnd.efi.iso": { - "source": "iana" - }, - "application/vnd.emclient.accessrequest+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.enliven": { - "source": "iana", - "extensions": ["nml"] - }, - "application/vnd.enphase.envoy": { - "source": "iana" - }, - "application/vnd.eprints.data+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.epson.esf": { - "source": "iana", - "extensions": ["esf"] - }, - "application/vnd.epson.msf": { - "source": "iana", - "extensions": ["msf"] - }, - "application/vnd.epson.quickanime": { - "source": "iana", - "extensions": ["qam"] - }, - "application/vnd.epson.salt": { - "source": "iana", - "extensions": ["slt"] - }, - "application/vnd.epson.ssf": { - "source": "iana", - "extensions": ["ssf"] - }, - "application/vnd.ericsson.quickcall": { - "source": "iana" - }, - "application/vnd.espass-espass+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.eszigno3+xml": { - "source": "iana", - "compressible": true, - "extensions": ["es3","et3"] - }, - "application/vnd.etsi.aoc+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.asic-e+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.etsi.asic-s+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.etsi.cug+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvcommand+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvdiscovery+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsad-bc+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsad-cod+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsad-npvr+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvservice+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsync+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvueprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.mcid+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.mheg5": { - "source": "iana" - }, - "application/vnd.etsi.overload-control-policy-dataset+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.pstn+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.sci+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.simservs+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.timestamp-token": { - "source": "iana" - }, - "application/vnd.etsi.tsl+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.tsl.der": { - "source": "iana" - }, - "application/vnd.eudora.data": { - "source": "iana" - }, - "application/vnd.evolv.ecig.profile": { - "source": "iana" - }, - "application/vnd.evolv.ecig.settings": { - "source": "iana" - }, - "application/vnd.evolv.ecig.theme": { - "source": "iana" - }, - "application/vnd.exstream-empower+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.exstream-package": { - "source": "iana" - }, - "application/vnd.ezpix-album": { - "source": "iana", - "extensions": ["ez2"] - }, - "application/vnd.ezpix-package": { - "source": "iana", - "extensions": ["ez3"] - }, - "application/vnd.f-secure.mobile": { - "source": "iana" - }, - "application/vnd.fastcopy-disk-image": { - "source": "iana" - }, - "application/vnd.fdf": { - "source": "iana", - "extensions": ["fdf"] - }, - "application/vnd.fdsn.mseed": { - "source": "iana", - "extensions": ["mseed"] - }, - "application/vnd.fdsn.seed": { - "source": "iana", - "extensions": ["seed","dataless"] - }, - "application/vnd.ffsns": { - "source": "iana" - }, - "application/vnd.ficlab.flb+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.filmit.zfc": { - "source": "iana" - }, - "application/vnd.fints": { - "source": "iana" - }, - "application/vnd.firemonkeys.cloudcell": { - "source": "iana" - }, - "application/vnd.flographit": { - "source": "iana", - "extensions": ["gph"] - }, - "application/vnd.fluxtime.clip": { - "source": "iana", - "extensions": ["ftc"] - }, - "application/vnd.font-fontforge-sfd": { - "source": "iana" - }, - "application/vnd.framemaker": { - "source": "iana", - "extensions": ["fm","frame","maker","book"] - }, - "application/vnd.frogans.fnc": { - "source": "iana", - "extensions": ["fnc"] - }, - "application/vnd.frogans.ltf": { - "source": "iana", - "extensions": ["ltf"] - }, - "application/vnd.fsc.weblaunch": { - "source": "iana", - "extensions": ["fsc"] - }, - "application/vnd.fujifilm.fb.docuworks": { - "source": "iana" - }, - "application/vnd.fujifilm.fb.docuworks.binder": { - "source": "iana" - }, - "application/vnd.fujifilm.fb.docuworks.container": { - "source": "iana" - }, - "application/vnd.fujifilm.fb.jfi+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.fujitsu.oasys": { - "source": "iana", - "extensions": ["oas"] - }, - "application/vnd.fujitsu.oasys2": { - "source": "iana", - "extensions": ["oa2"] - }, - "application/vnd.fujitsu.oasys3": { - "source": "iana", - "extensions": ["oa3"] - }, - "application/vnd.fujitsu.oasysgp": { - "source": "iana", - "extensions": ["fg5"] - }, - "application/vnd.fujitsu.oasysprs": { - "source": "iana", - "extensions": ["bh2"] - }, - "application/vnd.fujixerox.art-ex": { - "source": "iana" - }, - "application/vnd.fujixerox.art4": { - "source": "iana" - }, - "application/vnd.fujixerox.ddd": { - "source": "iana", - "extensions": ["ddd"] - }, - "application/vnd.fujixerox.docuworks": { - "source": "iana", - "extensions": ["xdw"] - }, - "application/vnd.fujixerox.docuworks.binder": { - "source": "iana", - "extensions": ["xbd"] - }, - "application/vnd.fujixerox.docuworks.container": { - "source": "iana" - }, - "application/vnd.fujixerox.hbpl": { - "source": "iana" - }, - "application/vnd.fut-misnet": { - "source": "iana" - }, - "application/vnd.futoin+cbor": { - "source": "iana" - }, - "application/vnd.futoin+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.fuzzysheet": { - "source": "iana", - "extensions": ["fzs"] - }, - "application/vnd.genomatix.tuxedo": { - "source": "iana", - "extensions": ["txd"] - }, - "application/vnd.gentics.grd+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.geo+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.geocube+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.geogebra.file": { - "source": "iana", - "extensions": ["ggb"] - }, - "application/vnd.geogebra.slides": { - "source": "iana" - }, - "application/vnd.geogebra.tool": { - "source": "iana", - "extensions": ["ggt"] - }, - "application/vnd.geometry-explorer": { - "source": "iana", - "extensions": ["gex","gre"] - }, - "application/vnd.geonext": { - "source": "iana", - "extensions": ["gxt"] - }, - "application/vnd.geoplan": { - "source": "iana", - "extensions": ["g2w"] - }, - "application/vnd.geospace": { - "source": "iana", - "extensions": ["g3w"] - }, - "application/vnd.gerber": { - "source": "iana" - }, - "application/vnd.globalplatform.card-content-mgt": { - "source": "iana" - }, - "application/vnd.globalplatform.card-content-mgt-response": { - "source": "iana" - }, - "application/vnd.gmx": { - "source": "iana", - "extensions": ["gmx"] - }, - "application/vnd.google-apps.document": { - "compressible": false, - "extensions": ["gdoc"] - }, - "application/vnd.google-apps.presentation": { - "compressible": false, - "extensions": ["gslides"] - }, - "application/vnd.google-apps.spreadsheet": { - "compressible": false, - "extensions": ["gsheet"] - }, - "application/vnd.google-earth.kml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["kml"] - }, - "application/vnd.google-earth.kmz": { - "source": "iana", - "compressible": false, - "extensions": ["kmz"] - }, - "application/vnd.gov.sk.e-form+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.gov.sk.e-form+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.gov.sk.xmldatacontainer+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.grafeq": { - "source": "iana", - "extensions": ["gqf","gqs"] - }, - "application/vnd.gridmp": { - "source": "iana" - }, - "application/vnd.groove-account": { - "source": "iana", - "extensions": ["gac"] - }, - "application/vnd.groove-help": { - "source": "iana", - "extensions": ["ghf"] - }, - "application/vnd.groove-identity-message": { - "source": "iana", - "extensions": ["gim"] - }, - "application/vnd.groove-injector": { - "source": "iana", - "extensions": ["grv"] - }, - "application/vnd.groove-tool-message": { - "source": "iana", - "extensions": ["gtm"] - }, - "application/vnd.groove-tool-template": { - "source": "iana", - "extensions": ["tpl"] - }, - "application/vnd.groove-vcard": { - "source": "iana", - "extensions": ["vcg"] - }, - "application/vnd.hal+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hal+xml": { - "source": "iana", - "compressible": true, - "extensions": ["hal"] - }, - "application/vnd.handheld-entertainment+xml": { - "source": "iana", - "compressible": true, - "extensions": ["zmm"] - }, - "application/vnd.hbci": { - "source": "iana", - "extensions": ["hbci"] - }, - "application/vnd.hc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hcl-bireports": { - "source": "iana" - }, - "application/vnd.hdt": { - "source": "iana" - }, - "application/vnd.heroku+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hhe.lesson-player": { - "source": "iana", - "extensions": ["les"] - }, - "application/vnd.hp-hpgl": { - "source": "iana", - "extensions": ["hpgl"] - }, - "application/vnd.hp-hpid": { - "source": "iana", - "extensions": ["hpid"] - }, - "application/vnd.hp-hps": { - "source": "iana", - "extensions": ["hps"] - }, - "application/vnd.hp-jlyt": { - "source": "iana", - "extensions": ["jlt"] - }, - "application/vnd.hp-pcl": { - "source": "iana", - "extensions": ["pcl"] - }, - "application/vnd.hp-pclxl": { - "source": "iana", - "extensions": ["pclxl"] - }, - "application/vnd.httphone": { - "source": "iana" - }, - "application/vnd.hydrostatix.sof-data": { - "source": "iana", - "extensions": ["sfd-hdstx"] - }, - "application/vnd.hyper+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hyper-item+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hyperdrive+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hzn-3d-crossword": { - "source": "iana" - }, - "application/vnd.ibm.afplinedata": { - "source": "iana" - }, - "application/vnd.ibm.electronic-media": { - "source": "iana" - }, - "application/vnd.ibm.minipay": { - "source": "iana", - "extensions": ["mpy"] - }, - "application/vnd.ibm.modcap": { - "source": "iana", - "extensions": ["afp","listafp","list3820"] - }, - "application/vnd.ibm.rights-management": { - "source": "iana", - "extensions": ["irm"] - }, - "application/vnd.ibm.secure-container": { - "source": "iana", - "extensions": ["sc"] - }, - "application/vnd.iccprofile": { - "source": "iana", - "extensions": ["icc","icm"] - }, - "application/vnd.ieee.1905": { - "source": "iana" - }, - "application/vnd.igloader": { - "source": "iana", - "extensions": ["igl"] - }, - "application/vnd.imagemeter.folder+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.imagemeter.image+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.immervision-ivp": { - "source": "iana", - "extensions": ["ivp"] - }, - "application/vnd.immervision-ivu": { - "source": "iana", - "extensions": ["ivu"] - }, - "application/vnd.ims.imsccv1p1": { - "source": "iana" - }, - "application/vnd.ims.imsccv1p2": { - "source": "iana" - }, - "application/vnd.ims.imsccv1p3": { - "source": "iana" - }, - "application/vnd.ims.lis.v2.result+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolconsumerprofile+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolproxy+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolproxy.id+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolsettings+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolsettings.simple+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.informedcontrol.rms+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.informix-visionary": { - "source": "iana" - }, - "application/vnd.infotech.project": { - "source": "iana" - }, - "application/vnd.infotech.project+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.innopath.wamp.notification": { - "source": "iana" - }, - "application/vnd.insors.igm": { - "source": "iana", - "extensions": ["igm"] - }, - "application/vnd.intercon.formnet": { - "source": "iana", - "extensions": ["xpw","xpx"] - }, - "application/vnd.intergeo": { - "source": "iana", - "extensions": ["i2g"] - }, - "application/vnd.intertrust.digibox": { - "source": "iana" - }, - "application/vnd.intertrust.nncp": { - "source": "iana" - }, - "application/vnd.intu.qbo": { - "source": "iana", - "extensions": ["qbo"] - }, - "application/vnd.intu.qfx": { - "source": "iana", - "extensions": ["qfx"] - }, - "application/vnd.iptc.g2.catalogitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.conceptitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.knowledgeitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.newsitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.newsmessage+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.packageitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.planningitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ipunplugged.rcprofile": { - "source": "iana", - "extensions": ["rcprofile"] - }, - "application/vnd.irepository.package+xml": { - "source": "iana", - "compressible": true, - "extensions": ["irp"] - }, - "application/vnd.is-xpr": { - "source": "iana", - "extensions": ["xpr"] - }, - "application/vnd.isac.fcs": { - "source": "iana", - "extensions": ["fcs"] - }, - "application/vnd.iso11783-10+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.jam": { - "source": "iana", - "extensions": ["jam"] - }, - "application/vnd.japannet-directory-service": { - "source": "iana" - }, - "application/vnd.japannet-jpnstore-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-payment-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-registration": { - "source": "iana" - }, - "application/vnd.japannet-registration-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-setstore-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-verification": { - "source": "iana" - }, - "application/vnd.japannet-verification-wakeup": { - "source": "iana" - }, - "application/vnd.jcp.javame.midlet-rms": { - "source": "iana", - "extensions": ["rms"] - }, - "application/vnd.jisp": { - "source": "iana", - "extensions": ["jisp"] - }, - "application/vnd.joost.joda-archive": { - "source": "iana", - "extensions": ["joda"] - }, - "application/vnd.jsk.isdn-ngn": { - "source": "iana" - }, - "application/vnd.kahootz": { - "source": "iana", - "extensions": ["ktz","ktr"] - }, - "application/vnd.kde.karbon": { - "source": "iana", - "extensions": ["karbon"] - }, - "application/vnd.kde.kchart": { - "source": "iana", - "extensions": ["chrt"] - }, - "application/vnd.kde.kformula": { - "source": "iana", - "extensions": ["kfo"] - }, - "application/vnd.kde.kivio": { - "source": "iana", - "extensions": ["flw"] - }, - "application/vnd.kde.kontour": { - "source": "iana", - "extensions": ["kon"] - }, - "application/vnd.kde.kpresenter": { - "source": "iana", - "extensions": ["kpr","kpt"] - }, - "application/vnd.kde.kspread": { - "source": "iana", - "extensions": ["ksp"] - }, - "application/vnd.kde.kword": { - "source": "iana", - "extensions": ["kwd","kwt"] - }, - "application/vnd.kenameaapp": { - "source": "iana", - "extensions": ["htke"] - }, - "application/vnd.kidspiration": { - "source": "iana", - "extensions": ["kia"] - }, - "application/vnd.kinar": { - "source": "iana", - "extensions": ["kne","knp"] - }, - "application/vnd.koan": { - "source": "iana", - "extensions": ["skp","skd","skt","skm"] - }, - "application/vnd.kodak-descriptor": { - "source": "iana", - "extensions": ["sse"] - }, - "application/vnd.las": { - "source": "iana" - }, - "application/vnd.las.las+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.las.las+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lasxml"] - }, - "application/vnd.laszip": { - "source": "iana" - }, - "application/vnd.leap+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.liberty-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.llamagraphics.life-balance.desktop": { - "source": "iana", - "extensions": ["lbd"] - }, - "application/vnd.llamagraphics.life-balance.exchange+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lbe"] - }, - "application/vnd.logipipe.circuit+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.loom": { - "source": "iana" - }, - "application/vnd.lotus-1-2-3": { - "source": "iana", - "extensions": ["123"] - }, - "application/vnd.lotus-approach": { - "source": "iana", - "extensions": ["apr"] - }, - "application/vnd.lotus-freelance": { - "source": "iana", - "extensions": ["pre"] - }, - "application/vnd.lotus-notes": { - "source": "iana", - "extensions": ["nsf"] - }, - "application/vnd.lotus-organizer": { - "source": "iana", - "extensions": ["org"] - }, - "application/vnd.lotus-screencam": { - "source": "iana", - "extensions": ["scm"] - }, - "application/vnd.lotus-wordpro": { - "source": "iana", - "extensions": ["lwp"] - }, - "application/vnd.macports.portpkg": { - "source": "iana", - "extensions": ["portpkg"] - }, - "application/vnd.mapbox-vector-tile": { - "source": "iana", - "extensions": ["mvt"] - }, - "application/vnd.marlin.drm.actiontoken+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.marlin.drm.conftoken+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.marlin.drm.license+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.marlin.drm.mdcf": { - "source": "iana" - }, - "application/vnd.mason+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.maxmind.maxmind-db": { - "source": "iana" - }, - "application/vnd.mcd": { - "source": "iana", - "extensions": ["mcd"] - }, - "application/vnd.medcalcdata": { - "source": "iana", - "extensions": ["mc1"] - }, - "application/vnd.mediastation.cdkey": { - "source": "iana", - "extensions": ["cdkey"] - }, - "application/vnd.meridian-slingshot": { - "source": "iana" - }, - "application/vnd.mfer": { - "source": "iana", - "extensions": ["mwf"] - }, - "application/vnd.mfmp": { - "source": "iana", - "extensions": ["mfm"] - }, - "application/vnd.micro+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.micrografx.flo": { - "source": "iana", - "extensions": ["flo"] - }, - "application/vnd.micrografx.igx": { - "source": "iana", - "extensions": ["igx"] - }, - "application/vnd.microsoft.portable-executable": { - "source": "iana" - }, - "application/vnd.microsoft.windows.thumbnail-cache": { - "source": "iana" - }, - "application/vnd.miele+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.mif": { - "source": "iana", - "extensions": ["mif"] - }, - "application/vnd.minisoft-hp3000-save": { - "source": "iana" - }, - "application/vnd.mitsubishi.misty-guard.trustweb": { - "source": "iana" - }, - "application/vnd.mobius.daf": { - "source": "iana", - "extensions": ["daf"] - }, - "application/vnd.mobius.dis": { - "source": "iana", - "extensions": ["dis"] - }, - "application/vnd.mobius.mbk": { - "source": "iana", - "extensions": ["mbk"] - }, - "application/vnd.mobius.mqy": { - "source": "iana", - "extensions": ["mqy"] - }, - "application/vnd.mobius.msl": { - "source": "iana", - "extensions": ["msl"] - }, - "application/vnd.mobius.plc": { - "source": "iana", - "extensions": ["plc"] - }, - "application/vnd.mobius.txf": { - "source": "iana", - "extensions": ["txf"] - }, - "application/vnd.mophun.application": { - "source": "iana", - "extensions": ["mpn"] - }, - "application/vnd.mophun.certificate": { - "source": "iana", - "extensions": ["mpc"] - }, - "application/vnd.motorola.flexsuite": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.adsi": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.fis": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.gotap": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.kmr": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.ttc": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.wem": { - "source": "iana" - }, - "application/vnd.motorola.iprm": { - "source": "iana" - }, - "application/vnd.mozilla.xul+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xul"] - }, - "application/vnd.ms-3mfdocument": { - "source": "iana" - }, - "application/vnd.ms-artgalry": { - "source": "iana", - "extensions": ["cil"] - }, - "application/vnd.ms-asf": { - "source": "iana" - }, - "application/vnd.ms-cab-compressed": { - "source": "iana", - "extensions": ["cab"] - }, - "application/vnd.ms-color.iccprofile": { - "source": "apache" - }, - "application/vnd.ms-excel": { - "source": "iana", - "compressible": false, - "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] - }, - "application/vnd.ms-excel.addin.macroenabled.12": { - "source": "iana", - "extensions": ["xlam"] - }, - "application/vnd.ms-excel.sheet.binary.macroenabled.12": { - "source": "iana", - "extensions": ["xlsb"] - }, - "application/vnd.ms-excel.sheet.macroenabled.12": { - "source": "iana", - "extensions": ["xlsm"] - }, - "application/vnd.ms-excel.template.macroenabled.12": { - "source": "iana", - "extensions": ["xltm"] - }, - "application/vnd.ms-fontobject": { - "source": "iana", - "compressible": true, - "extensions": ["eot"] - }, - "application/vnd.ms-htmlhelp": { - "source": "iana", - "extensions": ["chm"] - }, - "application/vnd.ms-ims": { - "source": "iana", - "extensions": ["ims"] - }, - "application/vnd.ms-lrm": { - "source": "iana", - "extensions": ["lrm"] - }, - "application/vnd.ms-office.activex+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-officetheme": { - "source": "iana", - "extensions": ["thmx"] - }, - "application/vnd.ms-opentype": { - "source": "apache", - "compressible": true - }, - "application/vnd.ms-outlook": { - "compressible": false, - "extensions": ["msg"] - }, - "application/vnd.ms-package.obfuscated-opentype": { - "source": "apache" - }, - "application/vnd.ms-pki.seccat": { - "source": "apache", - "extensions": ["cat"] - }, - "application/vnd.ms-pki.stl": { - "source": "apache", - "extensions": ["stl"] - }, - "application/vnd.ms-playready.initiator+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-powerpoint": { - "source": "iana", - "compressible": false, - "extensions": ["ppt","pps","pot"] - }, - "application/vnd.ms-powerpoint.addin.macroenabled.12": { - "source": "iana", - "extensions": ["ppam"] - }, - "application/vnd.ms-powerpoint.presentation.macroenabled.12": { - "source": "iana", - "extensions": ["pptm"] - }, - "application/vnd.ms-powerpoint.slide.macroenabled.12": { - "source": "iana", - "extensions": ["sldm"] - }, - "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { - "source": "iana", - "extensions": ["ppsm"] - }, - "application/vnd.ms-powerpoint.template.macroenabled.12": { - "source": "iana", - "extensions": ["potm"] - }, - "application/vnd.ms-printdevicecapabilities+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-printing.printticket+xml": { - "source": "apache", - "compressible": true - }, - "application/vnd.ms-printschematicket+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-project": { - "source": "iana", - "extensions": ["mpp","mpt"] - }, - "application/vnd.ms-tnef": { - "source": "iana" - }, - "application/vnd.ms-windows.devicepairing": { - "source": "iana" - }, - "application/vnd.ms-windows.nwprinting.oob": { - "source": "iana" - }, - "application/vnd.ms-windows.printerpairing": { - "source": "iana" - }, - "application/vnd.ms-windows.wsd.oob": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.lic-chlg-req": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.lic-resp": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.meter-chlg-req": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.meter-resp": { - "source": "iana" - }, - "application/vnd.ms-word.document.macroenabled.12": { - "source": "iana", - "extensions": ["docm"] - }, - "application/vnd.ms-word.template.macroenabled.12": { - "source": "iana", - "extensions": ["dotm"] - }, - "application/vnd.ms-works": { - "source": "iana", - "extensions": ["wps","wks","wcm","wdb"] - }, - "application/vnd.ms-wpl": { - "source": "iana", - "extensions": ["wpl"] - }, - "application/vnd.ms-xpsdocument": { - "source": "iana", - "compressible": false, - "extensions": ["xps"] - }, - "application/vnd.msa-disk-image": { - "source": "iana" - }, - "application/vnd.mseq": { - "source": "iana", - "extensions": ["mseq"] - }, - "application/vnd.msign": { - "source": "iana" - }, - "application/vnd.multiad.creator": { - "source": "iana" - }, - "application/vnd.multiad.creator.cif": { - "source": "iana" - }, - "application/vnd.music-niff": { - "source": "iana" - }, - "application/vnd.musician": { - "source": "iana", - "extensions": ["mus"] - }, - "application/vnd.muvee.style": { - "source": "iana", - "extensions": ["msty"] - }, - "application/vnd.mynfc": { - "source": "iana", - "extensions": ["taglet"] - }, - "application/vnd.ncd.control": { - "source": "iana" - }, - "application/vnd.ncd.reference": { - "source": "iana" - }, - "application/vnd.nearst.inv+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.nebumind.line": { - "source": "iana" - }, - "application/vnd.nervana": { - "source": "iana" - }, - "application/vnd.netfpx": { - "source": "iana" - }, - "application/vnd.neurolanguage.nlu": { - "source": "iana", - "extensions": ["nlu"] - }, - "application/vnd.nimn": { - "source": "iana" - }, - "application/vnd.nintendo.nitro.rom": { - "source": "iana" - }, - "application/vnd.nintendo.snes.rom": { - "source": "iana" - }, - "application/vnd.nitf": { - "source": "iana", - "extensions": ["ntf","nitf"] - }, - "application/vnd.noblenet-directory": { - "source": "iana", - "extensions": ["nnd"] - }, - "application/vnd.noblenet-sealer": { - "source": "iana", - "extensions": ["nns"] - }, - "application/vnd.noblenet-web": { - "source": "iana", - "extensions": ["nnw"] - }, - "application/vnd.nokia.catalogs": { - "source": "iana" - }, - "application/vnd.nokia.conml+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.conml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.iptv.config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.isds-radio-presets": { - "source": "iana" - }, - "application/vnd.nokia.landmark+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.landmark+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.landmarkcollection+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.n-gage.ac+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ac"] - }, - "application/vnd.nokia.n-gage.data": { - "source": "iana", - "extensions": ["ngdat"] - }, - "application/vnd.nokia.n-gage.symbian.install": { - "source": "iana", - "extensions": ["n-gage"] - }, - "application/vnd.nokia.ncd": { - "source": "iana" - }, - "application/vnd.nokia.pcd+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.pcd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.radio-preset": { - "source": "iana", - "extensions": ["rpst"] - }, - "application/vnd.nokia.radio-presets": { - "source": "iana", - "extensions": ["rpss"] - }, - "application/vnd.novadigm.edm": { - "source": "iana", - "extensions": ["edm"] - }, - "application/vnd.novadigm.edx": { - "source": "iana", - "extensions": ["edx"] - }, - "application/vnd.novadigm.ext": { - "source": "iana", - "extensions": ["ext"] - }, - "application/vnd.ntt-local.content-share": { - "source": "iana" - }, - "application/vnd.ntt-local.file-transfer": { - "source": "iana" - }, - "application/vnd.ntt-local.ogw_remote-access": { - "source": "iana" - }, - "application/vnd.ntt-local.sip-ta_remote": { - "source": "iana" - }, - "application/vnd.ntt-local.sip-ta_tcp_stream": { - "source": "iana" - }, - "application/vnd.oasis.opendocument.chart": { - "source": "iana", - "extensions": ["odc"] - }, - "application/vnd.oasis.opendocument.chart-template": { - "source": "iana", - "extensions": ["otc"] - }, - "application/vnd.oasis.opendocument.database": { - "source": "iana", - "extensions": ["odb"] - }, - "application/vnd.oasis.opendocument.formula": { - "source": "iana", - "extensions": ["odf"] - }, - "application/vnd.oasis.opendocument.formula-template": { - "source": "iana", - "extensions": ["odft"] - }, - "application/vnd.oasis.opendocument.graphics": { - "source": "iana", - "compressible": false, - "extensions": ["odg"] - }, - "application/vnd.oasis.opendocument.graphics-template": { - "source": "iana", - "extensions": ["otg"] - }, - "application/vnd.oasis.opendocument.image": { - "source": "iana", - "extensions": ["odi"] - }, - "application/vnd.oasis.opendocument.image-template": { - "source": "iana", - "extensions": ["oti"] - }, - "application/vnd.oasis.opendocument.presentation": { - "source": "iana", - "compressible": false, - "extensions": ["odp"] - }, - "application/vnd.oasis.opendocument.presentation-template": { - "source": "iana", - "extensions": ["otp"] - }, - "application/vnd.oasis.opendocument.spreadsheet": { - "source": "iana", - "compressible": false, - "extensions": ["ods"] - }, - "application/vnd.oasis.opendocument.spreadsheet-template": { - "source": "iana", - "extensions": ["ots"] - }, - "application/vnd.oasis.opendocument.text": { - "source": "iana", - "compressible": false, - "extensions": ["odt"] - }, - "application/vnd.oasis.opendocument.text-master": { - "source": "iana", - "extensions": ["odm"] - }, - "application/vnd.oasis.opendocument.text-template": { - "source": "iana", - "extensions": ["ott"] - }, - "application/vnd.oasis.opendocument.text-web": { - "source": "iana", - "extensions": ["oth"] - }, - "application/vnd.obn": { - "source": "iana" - }, - "application/vnd.ocf+cbor": { - "source": "iana" - }, - "application/vnd.oci.image.manifest.v1+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oftn.l10n+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.contentaccessdownload+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.contentaccessstreaming+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.cspg-hexbinary": { - "source": "iana" - }, - "application/vnd.oipf.dae.svg+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.dae.xhtml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.mippvcontrolmessage+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.pae.gem": { - "source": "iana" - }, - "application/vnd.oipf.spdiscovery+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.spdlist+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.ueprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.userprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.olpc-sugar": { - "source": "iana", - "extensions": ["xo"] - }, - "application/vnd.oma-scws-config": { - "source": "iana" - }, - "application/vnd.oma-scws-http-request": { - "source": "iana" - }, - "application/vnd.oma-scws-http-response": { - "source": "iana" - }, - "application/vnd.oma.bcast.associated-procedure-parameter+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.drm-trigger+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.imd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.ltkm": { - "source": "iana" - }, - "application/vnd.oma.bcast.notification+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.provisioningtrigger": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgboot": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgdd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.sgdu": { - "source": "iana" - }, - "application/vnd.oma.bcast.simple-symbol-container": { - "source": "iana" - }, - "application/vnd.oma.bcast.smartcard-trigger+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.sprov+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.stkm": { - "source": "iana" - }, - "application/vnd.oma.cab-address-book+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-feature-handler+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-pcc+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-subs-invite+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-user-prefs+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.dcd": { - "source": "iana" - }, - "application/vnd.oma.dcdc": { - "source": "iana" - }, - "application/vnd.oma.dd2+xml": { - "source": "iana", - "compressible": true, - "extensions": ["dd2"] - }, - "application/vnd.oma.drm.risd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.group-usage-list+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.lwm2m+cbor": { - "source": "iana" - }, - "application/vnd.oma.lwm2m+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.lwm2m+tlv": { - "source": "iana" - }, - "application/vnd.oma.pal+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.detailed-progress-report+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.final-report+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.groups+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.invocation-descriptor+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.optimized-progress-report+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.push": { - "source": "iana" - }, - "application/vnd.oma.scidm.messages+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.xcap-directory+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.omads-email+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.omads-file+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.omads-folder+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.omaloc-supl-init": { - "source": "iana" - }, - "application/vnd.onepager": { - "source": "iana" - }, - "application/vnd.onepagertamp": { - "source": "iana" - }, - "application/vnd.onepagertamx": { - "source": "iana" - }, - "application/vnd.onepagertat": { - "source": "iana" - }, - "application/vnd.onepagertatp": { - "source": "iana" - }, - "application/vnd.onepagertatx": { - "source": "iana" - }, - "application/vnd.openblox.game+xml": { - "source": "iana", - "compressible": true, - "extensions": ["obgx"] - }, - "application/vnd.openblox.game-binary": { - "source": "iana" - }, - "application/vnd.openeye.oeb": { - "source": "iana" - }, - "application/vnd.openofficeorg.extension": { - "source": "apache", - "extensions": ["oxt"] - }, - "application/vnd.openstreetmap.data+xml": { - "source": "iana", - "compressible": true, - "extensions": ["osm"] - }, - "application/vnd.openxmlformats-officedocument.custom-properties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawing+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.extended-properties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.presentation": { - "source": "iana", - "compressible": false, - "extensions": ["pptx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slide": { - "source": "iana", - "extensions": ["sldx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { - "source": "iana", - "extensions": ["ppsx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.template": { - "source": "iana", - "extensions": ["potx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { - "source": "iana", - "compressible": false, - "extensions": ["xlsx"] - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { - "source": "iana", - "extensions": ["xltx"] - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.theme+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.themeoverride+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.vmldrawing": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { - "source": "iana", - "compressible": false, - "extensions": ["docx"] - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { - "source": "iana", - "extensions": ["dotx"] - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-package.core-properties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-package.relationships+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oracle.resource+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.orange.indata": { - "source": "iana" - }, - "application/vnd.osa.netdeploy": { - "source": "iana" - }, - "application/vnd.osgeo.mapguide.package": { - "source": "iana", - "extensions": ["mgp"] - }, - "application/vnd.osgi.bundle": { - "source": "iana" - }, - "application/vnd.osgi.dp": { - "source": "iana", - "extensions": ["dp"] - }, - "application/vnd.osgi.subsystem": { - "source": "iana", - "extensions": ["esa"] - }, - "application/vnd.otps.ct-kip+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oxli.countgraph": { - "source": "iana" - }, - "application/vnd.pagerduty+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.palm": { - "source": "iana", - "extensions": ["pdb","pqa","oprc"] - }, - "application/vnd.panoply": { - "source": "iana" - }, - "application/vnd.paos.xml": { - "source": "iana" - }, - "application/vnd.patentdive": { - "source": "iana" - }, - "application/vnd.patientecommsdoc": { - "source": "iana" - }, - "application/vnd.pawaafile": { - "source": "iana", - "extensions": ["paw"] - }, - "application/vnd.pcos": { - "source": "iana" - }, - "application/vnd.pg.format": { - "source": "iana", - "extensions": ["str"] - }, - "application/vnd.pg.osasli": { - "source": "iana", - "extensions": ["ei6"] - }, - "application/vnd.piaccess.application-licence": { - "source": "iana" - }, - "application/vnd.picsel": { - "source": "iana", - "extensions": ["efif"] - }, - "application/vnd.pmi.widget": { - "source": "iana", - "extensions": ["wg"] - }, - "application/vnd.poc.group-advertisement+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.pocketlearn": { - "source": "iana", - "extensions": ["plf"] - }, - "application/vnd.powerbuilder6": { - "source": "iana", - "extensions": ["pbd"] - }, - "application/vnd.powerbuilder6-s": { - "source": "iana" - }, - "application/vnd.powerbuilder7": { - "source": "iana" - }, - "application/vnd.powerbuilder7-s": { - "source": "iana" - }, - "application/vnd.powerbuilder75": { - "source": "iana" - }, - "application/vnd.powerbuilder75-s": { - "source": "iana" - }, - "application/vnd.preminet": { - "source": "iana" - }, - "application/vnd.previewsystems.box": { - "source": "iana", - "extensions": ["box"] - }, - "application/vnd.proteus.magazine": { - "source": "iana", - "extensions": ["mgz"] - }, - "application/vnd.psfs": { - "source": "iana" - }, - "application/vnd.publishare-delta-tree": { - "source": "iana", - "extensions": ["qps"] - }, - "application/vnd.pvi.ptid1": { - "source": "iana", - "extensions": ["ptid"] - }, - "application/vnd.pwg-multiplexed": { - "source": "iana" - }, - "application/vnd.pwg-xhtml-print+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.qualcomm.brew-app-res": { - "source": "iana" - }, - "application/vnd.quarantainenet": { - "source": "iana" - }, - "application/vnd.quark.quarkxpress": { - "source": "iana", - "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] - }, - "application/vnd.quobject-quoxdocument": { - "source": "iana" - }, - "application/vnd.radisys.moml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-conf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-conn+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-dialog+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-stream+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-conf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-base+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-fax-detect+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-group+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-speech+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-transform+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.rainstor.data": { - "source": "iana" - }, - "application/vnd.rapid": { - "source": "iana" - }, - "application/vnd.rar": { - "source": "iana", - "extensions": ["rar"] - }, - "application/vnd.realvnc.bed": { - "source": "iana", - "extensions": ["bed"] - }, - "application/vnd.recordare.musicxml": { - "source": "iana", - "extensions": ["mxl"] - }, - "application/vnd.recordare.musicxml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["musicxml"] - }, - "application/vnd.renlearn.rlprint": { - "source": "iana" - }, - "application/vnd.restful+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.rig.cryptonote": { - "source": "iana", - "extensions": ["cryptonote"] - }, - "application/vnd.rim.cod": { - "source": "apache", - "extensions": ["cod"] - }, - "application/vnd.rn-realmedia": { - "source": "apache", - "extensions": ["rm"] - }, - "application/vnd.rn-realmedia-vbr": { - "source": "apache", - "extensions": ["rmvb"] - }, - "application/vnd.route66.link66+xml": { - "source": "iana", - "compressible": true, - "extensions": ["link66"] - }, - "application/vnd.rs-274x": { - "source": "iana" - }, - "application/vnd.ruckus.download": { - "source": "iana" - }, - "application/vnd.s3sms": { - "source": "iana" - }, - "application/vnd.sailingtracker.track": { - "source": "iana", - "extensions": ["st"] - }, - "application/vnd.sar": { - "source": "iana" - }, - "application/vnd.sbm.cid": { - "source": "iana" - }, - "application/vnd.sbm.mid2": { - "source": "iana" - }, - "application/vnd.scribus": { - "source": "iana" - }, - "application/vnd.sealed.3df": { - "source": "iana" - }, - "application/vnd.sealed.csf": { - "source": "iana" - }, - "application/vnd.sealed.doc": { - "source": "iana" - }, - "application/vnd.sealed.eml": { - "source": "iana" - }, - "application/vnd.sealed.mht": { - "source": "iana" - }, - "application/vnd.sealed.net": { - "source": "iana" - }, - "application/vnd.sealed.ppt": { - "source": "iana" - }, - "application/vnd.sealed.tiff": { - "source": "iana" - }, - "application/vnd.sealed.xls": { - "source": "iana" - }, - "application/vnd.sealedmedia.softseal.html": { - "source": "iana" - }, - "application/vnd.sealedmedia.softseal.pdf": { - "source": "iana" - }, - "application/vnd.seemail": { - "source": "iana", - "extensions": ["see"] - }, - "application/vnd.seis+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.sema": { - "source": "iana", - "extensions": ["sema"] - }, - "application/vnd.semd": { - "source": "iana", - "extensions": ["semd"] - }, - "application/vnd.semf": { - "source": "iana", - "extensions": ["semf"] - }, - "application/vnd.shade-save-file": { - "source": "iana" - }, - "application/vnd.shana.informed.formdata": { - "source": "iana", - "extensions": ["ifm"] - }, - "application/vnd.shana.informed.formtemplate": { - "source": "iana", - "extensions": ["itp"] - }, - "application/vnd.shana.informed.interchange": { - "source": "iana", - "extensions": ["iif"] - }, - "application/vnd.shana.informed.package": { - "source": "iana", - "extensions": ["ipk"] - }, - "application/vnd.shootproof+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.shopkick+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.shp": { - "source": "iana" - }, - "application/vnd.shx": { - "source": "iana" - }, - "application/vnd.sigrok.session": { - "source": "iana" - }, - "application/vnd.simtech-mindmapper": { - "source": "iana", - "extensions": ["twd","twds"] - }, - "application/vnd.siren+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.smaf": { - "source": "iana", - "extensions": ["mmf"] - }, - "application/vnd.smart.notebook": { - "source": "iana" - }, - "application/vnd.smart.teacher": { - "source": "iana", - "extensions": ["teacher"] - }, - "application/vnd.snesdev-page-table": { - "source": "iana" - }, - "application/vnd.software602.filler.form+xml": { - "source": "iana", - "compressible": true, - "extensions": ["fo"] - }, - "application/vnd.software602.filler.form-xml-zip": { - "source": "iana" - }, - "application/vnd.solent.sdkm+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sdkm","sdkd"] - }, - "application/vnd.spotfire.dxp": { - "source": "iana", - "extensions": ["dxp"] - }, - "application/vnd.spotfire.sfs": { - "source": "iana", - "extensions": ["sfs"] - }, - "application/vnd.sqlite3": { - "source": "iana" - }, - "application/vnd.sss-cod": { - "source": "iana" - }, - "application/vnd.sss-dtf": { - "source": "iana" - }, - "application/vnd.sss-ntf": { - "source": "iana" - }, - "application/vnd.stardivision.calc": { - "source": "apache", - "extensions": ["sdc"] - }, - "application/vnd.stardivision.draw": { - "source": "apache", - "extensions": ["sda"] - }, - "application/vnd.stardivision.impress": { - "source": "apache", - "extensions": ["sdd"] - }, - "application/vnd.stardivision.math": { - "source": "apache", - "extensions": ["smf"] - }, - "application/vnd.stardivision.writer": { - "source": "apache", - "extensions": ["sdw","vor"] - }, - "application/vnd.stardivision.writer-global": { - "source": "apache", - "extensions": ["sgl"] - }, - "application/vnd.stepmania.package": { - "source": "iana", - "extensions": ["smzip"] - }, - "application/vnd.stepmania.stepchart": { - "source": "iana", - "extensions": ["sm"] - }, - "application/vnd.street-stream": { - "source": "iana" - }, - "application/vnd.sun.wadl+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wadl"] - }, - "application/vnd.sun.xml.calc": { - "source": "apache", - "extensions": ["sxc"] - }, - "application/vnd.sun.xml.calc.template": { - "source": "apache", - "extensions": ["stc"] - }, - "application/vnd.sun.xml.draw": { - "source": "apache", - "extensions": ["sxd"] - }, - "application/vnd.sun.xml.draw.template": { - "source": "apache", - "extensions": ["std"] - }, - "application/vnd.sun.xml.impress": { - "source": "apache", - "extensions": ["sxi"] - }, - "application/vnd.sun.xml.impress.template": { - "source": "apache", - "extensions": ["sti"] - }, - "application/vnd.sun.xml.math": { - "source": "apache", - "extensions": ["sxm"] - }, - "application/vnd.sun.xml.writer": { - "source": "apache", - "extensions": ["sxw"] - }, - "application/vnd.sun.xml.writer.global": { - "source": "apache", - "extensions": ["sxg"] - }, - "application/vnd.sun.xml.writer.template": { - "source": "apache", - "extensions": ["stw"] - }, - "application/vnd.sus-calendar": { - "source": "iana", - "extensions": ["sus","susp"] - }, - "application/vnd.svd": { - "source": "iana", - "extensions": ["svd"] - }, - "application/vnd.swiftview-ics": { - "source": "iana" - }, - "application/vnd.sycle+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.symbian.install": { - "source": "apache", - "extensions": ["sis","sisx"] - }, - "application/vnd.syncml+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["xsm"] - }, - "application/vnd.syncml.dm+wbxml": { - "source": "iana", - "charset": "UTF-8", - "extensions": ["bdm"] - }, - "application/vnd.syncml.dm+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["xdm"] - }, - "application/vnd.syncml.dm.notification": { - "source": "iana" - }, - "application/vnd.syncml.dmddf+wbxml": { - "source": "iana" - }, - "application/vnd.syncml.dmddf+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["ddf"] - }, - "application/vnd.syncml.dmtnds+wbxml": { - "source": "iana" - }, - "application/vnd.syncml.dmtnds+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.syncml.ds.notification": { - "source": "iana" - }, - "application/vnd.tableschema+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.tao.intent-module-archive": { - "source": "iana", - "extensions": ["tao"] - }, - "application/vnd.tcpdump.pcap": { - "source": "iana", - "extensions": ["pcap","cap","dmp"] - }, - "application/vnd.think-cell.ppttc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.tmd.mediaflex.api+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.tml": { - "source": "iana" - }, - "application/vnd.tmobile-livetv": { - "source": "iana", - "extensions": ["tmo"] - }, - "application/vnd.tri.onesource": { - "source": "iana" - }, - "application/vnd.trid.tpt": { - "source": "iana", - "extensions": ["tpt"] - }, - "application/vnd.triscape.mxs": { - "source": "iana", - "extensions": ["mxs"] - }, - "application/vnd.trueapp": { - "source": "iana", - "extensions": ["tra"] - }, - "application/vnd.truedoc": { - "source": "iana" - }, - "application/vnd.ubisoft.webplayer": { - "source": "iana" - }, - "application/vnd.ufdl": { - "source": "iana", - "extensions": ["ufd","ufdl"] - }, - "application/vnd.uiq.theme": { - "source": "iana", - "extensions": ["utz"] - }, - "application/vnd.umajin": { - "source": "iana", - "extensions": ["umj"] - }, - "application/vnd.unity": { - "source": "iana", - "extensions": ["unityweb"] - }, - "application/vnd.uoml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["uoml"] - }, - "application/vnd.uplanet.alert": { - "source": "iana" - }, - "application/vnd.uplanet.alert-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.bearer-choice": { - "source": "iana" - }, - "application/vnd.uplanet.bearer-choice-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.cacheop": { - "source": "iana" - }, - "application/vnd.uplanet.cacheop-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.channel": { - "source": "iana" - }, - "application/vnd.uplanet.channel-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.list": { - "source": "iana" - }, - "application/vnd.uplanet.list-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.listcmd": { - "source": "iana" - }, - "application/vnd.uplanet.listcmd-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.signal": { - "source": "iana" - }, - "application/vnd.uri-map": { - "source": "iana" - }, - "application/vnd.valve.source.material": { - "source": "iana" - }, - "application/vnd.vcx": { - "source": "iana", - "extensions": ["vcx"] - }, - "application/vnd.vd-study": { - "source": "iana" - }, - "application/vnd.vectorworks": { - "source": "iana" - }, - "application/vnd.vel+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.verimatrix.vcas": { - "source": "iana" - }, - "application/vnd.veryant.thin": { - "source": "iana" - }, - "application/vnd.ves.encrypted": { - "source": "iana" - }, - "application/vnd.vidsoft.vidconference": { - "source": "iana" - }, - "application/vnd.visio": { - "source": "iana", - "extensions": ["vsd","vst","vss","vsw"] - }, - "application/vnd.visionary": { - "source": "iana", - "extensions": ["vis"] - }, - "application/vnd.vividence.scriptfile": { - "source": "iana" - }, - "application/vnd.vsf": { - "source": "iana", - "extensions": ["vsf"] - }, - "application/vnd.wap.sic": { - "source": "iana" - }, - "application/vnd.wap.slc": { - "source": "iana" - }, - "application/vnd.wap.wbxml": { - "source": "iana", - "charset": "UTF-8", - "extensions": ["wbxml"] - }, - "application/vnd.wap.wmlc": { - "source": "iana", - "extensions": ["wmlc"] - }, - "application/vnd.wap.wmlscriptc": { - "source": "iana", - "extensions": ["wmlsc"] - }, - "application/vnd.webturbo": { - "source": "iana", - "extensions": ["wtb"] - }, - "application/vnd.wfa.dpp": { - "source": "iana" - }, - "application/vnd.wfa.p2p": { - "source": "iana" - }, - "application/vnd.wfa.wsc": { - "source": "iana" - }, - "application/vnd.windows.devicepairing": { - "source": "iana" - }, - "application/vnd.wmc": { - "source": "iana" - }, - "application/vnd.wmf.bootstrap": { - "source": "iana" - }, - "application/vnd.wolfram.mathematica": { - "source": "iana" - }, - "application/vnd.wolfram.mathematica.package": { - "source": "iana" - }, - "application/vnd.wolfram.player": { - "source": "iana", - "extensions": ["nbp"] - }, - "application/vnd.wordperfect": { - "source": "iana", - "extensions": ["wpd"] - }, - "application/vnd.wqd": { - "source": "iana", - "extensions": ["wqd"] - }, - "application/vnd.wrq-hp3000-labelled": { - "source": "iana" - }, - "application/vnd.wt.stf": { - "source": "iana", - "extensions": ["stf"] - }, - "application/vnd.wv.csp+wbxml": { - "source": "iana" - }, - "application/vnd.wv.csp+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.wv.ssp+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.xacml+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.xara": { - "source": "iana", - "extensions": ["xar"] - }, - "application/vnd.xfdl": { - "source": "iana", - "extensions": ["xfdl"] - }, - "application/vnd.xfdl.webform": { - "source": "iana" - }, - "application/vnd.xmi+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.xmpie.cpkg": { - "source": "iana" - }, - "application/vnd.xmpie.dpkg": { - "source": "iana" - }, - "application/vnd.xmpie.plan": { - "source": "iana" - }, - "application/vnd.xmpie.ppkg": { - "source": "iana" - }, - "application/vnd.xmpie.xlim": { - "source": "iana" - }, - "application/vnd.yamaha.hv-dic": { - "source": "iana", - "extensions": ["hvd"] - }, - "application/vnd.yamaha.hv-script": { - "source": "iana", - "extensions": ["hvs"] - }, - "application/vnd.yamaha.hv-voice": { - "source": "iana", - "extensions": ["hvp"] - }, - "application/vnd.yamaha.openscoreformat": { - "source": "iana", - "extensions": ["osf"] - }, - "application/vnd.yamaha.openscoreformat.osfpvg+xml": { - "source": "iana", - "compressible": true, - "extensions": ["osfpvg"] - }, - "application/vnd.yamaha.remote-setup": { - "source": "iana" - }, - "application/vnd.yamaha.smaf-audio": { - "source": "iana", - "extensions": ["saf"] - }, - "application/vnd.yamaha.smaf-phrase": { - "source": "iana", - "extensions": ["spf"] - }, - "application/vnd.yamaha.through-ngn": { - "source": "iana" - }, - "application/vnd.yamaha.tunnel-udpencap": { - "source": "iana" - }, - "application/vnd.yaoweme": { - "source": "iana" - }, - "application/vnd.yellowriver-custom-menu": { - "source": "iana", - "extensions": ["cmp"] - }, - "application/vnd.youtube.yt": { - "source": "iana" - }, - "application/vnd.zul": { - "source": "iana", - "extensions": ["zir","zirz"] - }, - "application/vnd.zzazz.deck+xml": { - "source": "iana", - "compressible": true, - "extensions": ["zaz"] - }, - "application/voicexml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["vxml"] - }, - "application/voucher-cms+json": { - "source": "iana", - "compressible": true - }, - "application/vq-rtcpxr": { - "source": "iana" - }, - "application/wasm": { - "source": "iana", - "compressible": true, - "extensions": ["wasm"] - }, - "application/watcherinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/webpush-options+json": { - "source": "iana", - "compressible": true - }, - "application/whoispp-query": { - "source": "iana" - }, - "application/whoispp-response": { - "source": "iana" - }, - "application/widget": { - "source": "iana", - "extensions": ["wgt"] - }, - "application/winhlp": { - "source": "apache", - "extensions": ["hlp"] - }, - "application/wita": { - "source": "iana" - }, - "application/wordperfect5.1": { - "source": "iana" - }, - "application/wsdl+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wsdl"] - }, - "application/wspolicy+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wspolicy"] - }, - "application/x-7z-compressed": { - "source": "apache", - "compressible": false, - "extensions": ["7z"] - }, - "application/x-abiword": { - "source": "apache", - "extensions": ["abw"] - }, - "application/x-ace-compressed": { - "source": "apache", - "extensions": ["ace"] - }, - "application/x-amf": { - "source": "apache" - }, - "application/x-apple-diskimage": { - "source": "apache", - "extensions": ["dmg"] - }, - "application/x-arj": { - "compressible": false, - "extensions": ["arj"] - }, - "application/x-authorware-bin": { - "source": "apache", - "extensions": ["aab","x32","u32","vox"] - }, - "application/x-authorware-map": { - "source": "apache", - "extensions": ["aam"] - }, - "application/x-authorware-seg": { - "source": "apache", - "extensions": ["aas"] - }, - "application/x-bcpio": { - "source": "apache", - "extensions": ["bcpio"] - }, - "application/x-bdoc": { - "compressible": false, - "extensions": ["bdoc"] - }, - "application/x-bittorrent": { - "source": "apache", - "extensions": ["torrent"] - }, - "application/x-blorb": { - "source": "apache", - "extensions": ["blb","blorb"] - }, - "application/x-bzip": { - "source": "apache", - "compressible": false, - "extensions": ["bz"] - }, - "application/x-bzip2": { - "source": "apache", - "compressible": false, - "extensions": ["bz2","boz"] - }, - "application/x-cbr": { - "source": "apache", - "extensions": ["cbr","cba","cbt","cbz","cb7"] - }, - "application/x-cdlink": { - "source": "apache", - "extensions": ["vcd"] - }, - "application/x-cfs-compressed": { - "source": "apache", - "extensions": ["cfs"] - }, - "application/x-chat": { - "source": "apache", - "extensions": ["chat"] - }, - "application/x-chess-pgn": { - "source": "apache", - "extensions": ["pgn"] - }, - "application/x-chrome-extension": { - "extensions": ["crx"] - }, - "application/x-cocoa": { - "source": "nginx", - "extensions": ["cco"] - }, - "application/x-compress": { - "source": "apache" - }, - "application/x-conference": { - "source": "apache", - "extensions": ["nsc"] - }, - "application/x-cpio": { - "source": "apache", - "extensions": ["cpio"] - }, - "application/x-csh": { - "source": "apache", - "extensions": ["csh"] - }, - "application/x-deb": { - "compressible": false - }, - "application/x-debian-package": { - "source": "apache", - "extensions": ["deb","udeb"] - }, - "application/x-dgc-compressed": { - "source": "apache", - "extensions": ["dgc"] - }, - "application/x-director": { - "source": "apache", - "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] - }, - "application/x-doom": { - "source": "apache", - "extensions": ["wad"] - }, - "application/x-dtbncx+xml": { - "source": "apache", - "compressible": true, - "extensions": ["ncx"] - }, - "application/x-dtbook+xml": { - "source": "apache", - "compressible": true, - "extensions": ["dtb"] - }, - "application/x-dtbresource+xml": { - "source": "apache", - "compressible": true, - "extensions": ["res"] - }, - "application/x-dvi": { - "source": "apache", - "compressible": false, - "extensions": ["dvi"] - }, - "application/x-envoy": { - "source": "apache", - "extensions": ["evy"] - }, - "application/x-eva": { - "source": "apache", - "extensions": ["eva"] - }, - "application/x-font-bdf": { - "source": "apache", - "extensions": ["bdf"] - }, - "application/x-font-dos": { - "source": "apache" - }, - "application/x-font-framemaker": { - "source": "apache" - }, - "application/x-font-ghostscript": { - "source": "apache", - "extensions": ["gsf"] - }, - "application/x-font-libgrx": { - "source": "apache" - }, - "application/x-font-linux-psf": { - "source": "apache", - "extensions": ["psf"] - }, - "application/x-font-pcf": { - "source": "apache", - "extensions": ["pcf"] - }, - "application/x-font-snf": { - "source": "apache", - "extensions": ["snf"] - }, - "application/x-font-speedo": { - "source": "apache" - }, - "application/x-font-sunos-news": { - "source": "apache" - }, - "application/x-font-type1": { - "source": "apache", - "extensions": ["pfa","pfb","pfm","afm"] - }, - "application/x-font-vfont": { - "source": "apache" - }, - "application/x-freearc": { - "source": "apache", - "extensions": ["arc"] - }, - "application/x-futuresplash": { - "source": "apache", - "extensions": ["spl"] - }, - "application/x-gca-compressed": { - "source": "apache", - "extensions": ["gca"] - }, - "application/x-glulx": { - "source": "apache", - "extensions": ["ulx"] - }, - "application/x-gnumeric": { - "source": "apache", - "extensions": ["gnumeric"] - }, - "application/x-gramps-xml": { - "source": "apache", - "extensions": ["gramps"] - }, - "application/x-gtar": { - "source": "apache", - "extensions": ["gtar"] - }, - "application/x-gzip": { - "source": "apache" - }, - "application/x-hdf": { - "source": "apache", - "extensions": ["hdf"] - }, - "application/x-httpd-php": { - "compressible": true, - "extensions": ["php"] - }, - "application/x-install-instructions": { - "source": "apache", - "extensions": ["install"] - }, - "application/x-iso9660-image": { - "source": "apache", - "extensions": ["iso"] - }, - "application/x-java-archive-diff": { - "source": "nginx", - "extensions": ["jardiff"] - }, - "application/x-java-jnlp-file": { - "source": "apache", - "compressible": false, - "extensions": ["jnlp"] - }, - "application/x-javascript": { - "compressible": true - }, - "application/x-keepass2": { - "extensions": ["kdbx"] - }, - "application/x-latex": { - "source": "apache", - "compressible": false, - "extensions": ["latex"] - }, - "application/x-lua-bytecode": { - "extensions": ["luac"] - }, - "application/x-lzh-compressed": { - "source": "apache", - "extensions": ["lzh","lha"] - }, - "application/x-makeself": { - "source": "nginx", - "extensions": ["run"] - }, - "application/x-mie": { - "source": "apache", - "extensions": ["mie"] - }, - "application/x-mobipocket-ebook": { - "source": "apache", - "extensions": ["prc","mobi"] - }, - "application/x-mpegurl": { - "compressible": false - }, - "application/x-ms-application": { - "source": "apache", - "extensions": ["application"] - }, - "application/x-ms-shortcut": { - "source": "apache", - "extensions": ["lnk"] - }, - "application/x-ms-wmd": { - "source": "apache", - "extensions": ["wmd"] - }, - "application/x-ms-wmz": { - "source": "apache", - "extensions": ["wmz"] - }, - "application/x-ms-xbap": { - "source": "apache", - "extensions": ["xbap"] - }, - "application/x-msaccess": { - "source": "apache", - "extensions": ["mdb"] - }, - "application/x-msbinder": { - "source": "apache", - "extensions": ["obd"] - }, - "application/x-mscardfile": { - "source": "apache", - "extensions": ["crd"] - }, - "application/x-msclip": { - "source": "apache", - "extensions": ["clp"] - }, - "application/x-msdos-program": { - "extensions": ["exe"] - }, - "application/x-msdownload": { - "source": "apache", - "extensions": ["exe","dll","com","bat","msi"] - }, - "application/x-msmediaview": { - "source": "apache", - "extensions": ["mvb","m13","m14"] - }, - "application/x-msmetafile": { - "source": "apache", - "extensions": ["wmf","wmz","emf","emz"] - }, - "application/x-msmoney": { - "source": "apache", - "extensions": ["mny"] - }, - "application/x-mspublisher": { - "source": "apache", - "extensions": ["pub"] - }, - "application/x-msschedule": { - "source": "apache", - "extensions": ["scd"] - }, - "application/x-msterminal": { - "source": "apache", - "extensions": ["trm"] - }, - "application/x-mswrite": { - "source": "apache", - "extensions": ["wri"] - }, - "application/x-netcdf": { - "source": "apache", - "extensions": ["nc","cdf"] - }, - "application/x-ns-proxy-autoconfig": { - "compressible": true, - "extensions": ["pac"] - }, - "application/x-nzb": { - "source": "apache", - "extensions": ["nzb"] - }, - "application/x-perl": { - "source": "nginx", - "extensions": ["pl","pm"] - }, - "application/x-pilot": { - "source": "nginx", - "extensions": ["prc","pdb"] - }, - "application/x-pkcs12": { - "source": "apache", - "compressible": false, - "extensions": ["p12","pfx"] - }, - "application/x-pkcs7-certificates": { - "source": "apache", - "extensions": ["p7b","spc"] - }, - "application/x-pkcs7-certreqresp": { - "source": "apache", - "extensions": ["p7r"] - }, - "application/x-pki-message": { - "source": "iana" - }, - "application/x-rar-compressed": { - "source": "apache", - "compressible": false, - "extensions": ["rar"] - }, - "application/x-redhat-package-manager": { - "source": "nginx", - "extensions": ["rpm"] - }, - "application/x-research-info-systems": { - "source": "apache", - "extensions": ["ris"] - }, - "application/x-sea": { - "source": "nginx", - "extensions": ["sea"] - }, - "application/x-sh": { - "source": "apache", - "compressible": true, - "extensions": ["sh"] - }, - "application/x-shar": { - "source": "apache", - "extensions": ["shar"] - }, - "application/x-shockwave-flash": { - "source": "apache", - "compressible": false, - "extensions": ["swf"] - }, - "application/x-silverlight-app": { - "source": "apache", - "extensions": ["xap"] - }, - "application/x-sql": { - "source": "apache", - "extensions": ["sql"] - }, - "application/x-stuffit": { - "source": "apache", - "compressible": false, - "extensions": ["sit"] - }, - "application/x-stuffitx": { - "source": "apache", - "extensions": ["sitx"] - }, - "application/x-subrip": { - "source": "apache", - "extensions": ["srt"] - }, - "application/x-sv4cpio": { - "source": "apache", - "extensions": ["sv4cpio"] - }, - "application/x-sv4crc": { - "source": "apache", - "extensions": ["sv4crc"] - }, - "application/x-t3vm-image": { - "source": "apache", - "extensions": ["t3"] - }, - "application/x-tads": { - "source": "apache", - "extensions": ["gam"] - }, - "application/x-tar": { - "source": "apache", - "compressible": true, - "extensions": ["tar"] - }, - "application/x-tcl": { - "source": "apache", - "extensions": ["tcl","tk"] - }, - "application/x-tex": { - "source": "apache", - "extensions": ["tex"] - }, - "application/x-tex-tfm": { - "source": "apache", - "extensions": ["tfm"] - }, - "application/x-texinfo": { - "source": "apache", - "extensions": ["texinfo","texi"] - }, - "application/x-tgif": { - "source": "apache", - "extensions": ["obj"] - }, - "application/x-ustar": { - "source": "apache", - "extensions": ["ustar"] - }, - "application/x-virtualbox-hdd": { - "compressible": true, - "extensions": ["hdd"] - }, - "application/x-virtualbox-ova": { - "compressible": true, - "extensions": ["ova"] - }, - "application/x-virtualbox-ovf": { - "compressible": true, - "extensions": ["ovf"] - }, - "application/x-virtualbox-vbox": { - "compressible": true, - "extensions": ["vbox"] - }, - "application/x-virtualbox-vbox-extpack": { - "compressible": false, - "extensions": ["vbox-extpack"] - }, - "application/x-virtualbox-vdi": { - "compressible": true, - "extensions": ["vdi"] - }, - "application/x-virtualbox-vhd": { - "compressible": true, - "extensions": ["vhd"] - }, - "application/x-virtualbox-vmdk": { - "compressible": true, - "extensions": ["vmdk"] - }, - "application/x-wais-source": { - "source": "apache", - "extensions": ["src"] - }, - "application/x-web-app-manifest+json": { - "compressible": true, - "extensions": ["webapp"] - }, - "application/x-www-form-urlencoded": { - "source": "iana", - "compressible": true - }, - "application/x-x509-ca-cert": { - "source": "iana", - "extensions": ["der","crt","pem"] - }, - "application/x-x509-ca-ra-cert": { - "source": "iana" - }, - "application/x-x509-next-ca-cert": { - "source": "iana" - }, - "application/x-xfig": { - "source": "apache", - "extensions": ["fig"] - }, - "application/x-xliff+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xlf"] - }, - "application/x-xpinstall": { - "source": "apache", - "compressible": false, - "extensions": ["xpi"] - }, - "application/x-xz": { - "source": "apache", - "extensions": ["xz"] - }, - "application/x-zmachine": { - "source": "apache", - "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] - }, - "application/x400-bp": { - "source": "iana" - }, - "application/xacml+xml": { - "source": "iana", - "compressible": true - }, - "application/xaml+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xaml"] - }, - "application/xcap-att+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xav"] - }, - "application/xcap-caps+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xca"] - }, - "application/xcap-diff+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xdf"] - }, - "application/xcap-el+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xel"] - }, - "application/xcap-error+xml": { - "source": "iana", - "compressible": true - }, - "application/xcap-ns+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xns"] - }, - "application/xcon-conference-info+xml": { - "source": "iana", - "compressible": true - }, - "application/xcon-conference-info-diff+xml": { - "source": "iana", - "compressible": true - }, - "application/xenc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xenc"] - }, - "application/xhtml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xhtml","xht"] - }, - "application/xhtml-voice+xml": { - "source": "apache", - "compressible": true - }, - "application/xliff+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xlf"] - }, - "application/xml": { - "source": "iana", - "compressible": true, - "extensions": ["xml","xsl","xsd","rng"] - }, - "application/xml-dtd": { - "source": "iana", - "compressible": true, - "extensions": ["dtd"] - }, - "application/xml-external-parsed-entity": { - "source": "iana" - }, - "application/xml-patch+xml": { - "source": "iana", - "compressible": true - }, - "application/xmpp+xml": { - "source": "iana", - "compressible": true - }, - "application/xop+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xop"] - }, - "application/xproc+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xpl"] - }, - "application/xslt+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xsl","xslt"] - }, - "application/xspf+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xspf"] - }, - "application/xv+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mxml","xhvml","xvml","xvm"] - }, - "application/yang": { - "source": "iana", - "extensions": ["yang"] - }, - "application/yang-data+json": { - "source": "iana", - "compressible": true - }, - "application/yang-data+xml": { - "source": "iana", - "compressible": true - }, - "application/yang-patch+json": { - "source": "iana", - "compressible": true - }, - "application/yang-patch+xml": { - "source": "iana", - "compressible": true - }, - "application/yin+xml": { - "source": "iana", - "compressible": true, - "extensions": ["yin"] - }, - "application/zip": { - "source": "iana", - "compressible": false, - "extensions": ["zip"] - }, - "application/zlib": { - "source": "iana" - }, - "application/zstd": { - "source": "iana" - }, - "audio/1d-interleaved-parityfec": { - "source": "iana" - }, - "audio/32kadpcm": { - "source": "iana" - }, - "audio/3gpp": { - "source": "iana", - "compressible": false, - "extensions": ["3gpp"] - }, - "audio/3gpp2": { - "source": "iana" - }, - "audio/aac": { - "source": "iana" - }, - "audio/ac3": { - "source": "iana" - }, - "audio/adpcm": { - "source": "apache", - "extensions": ["adp"] - }, - "audio/amr": { - "source": "iana", - "extensions": ["amr"] - }, - "audio/amr-wb": { - "source": "iana" - }, - "audio/amr-wb+": { - "source": "iana" - }, - "audio/aptx": { - "source": "iana" - }, - "audio/asc": { - "source": "iana" - }, - "audio/atrac-advanced-lossless": { - "source": "iana" - }, - "audio/atrac-x": { - "source": "iana" - }, - "audio/atrac3": { - "source": "iana" - }, - "audio/basic": { - "source": "iana", - "compressible": false, - "extensions": ["au","snd"] - }, - "audio/bv16": { - "source": "iana" - }, - "audio/bv32": { - "source": "iana" - }, - "audio/clearmode": { - "source": "iana" - }, - "audio/cn": { - "source": "iana" - }, - "audio/dat12": { - "source": "iana" - }, - "audio/dls": { - "source": "iana" - }, - "audio/dsr-es201108": { - "source": "iana" - }, - "audio/dsr-es202050": { - "source": "iana" - }, - "audio/dsr-es202211": { - "source": "iana" - }, - "audio/dsr-es202212": { - "source": "iana" - }, - "audio/dv": { - "source": "iana" - }, - "audio/dvi4": { - "source": "iana" - }, - "audio/eac3": { - "source": "iana" - }, - "audio/encaprtp": { - "source": "iana" - }, - "audio/evrc": { - "source": "iana" - }, - "audio/evrc-qcp": { - "source": "iana" - }, - "audio/evrc0": { - "source": "iana" - }, - "audio/evrc1": { - "source": "iana" - }, - "audio/evrcb": { - "source": "iana" - }, - "audio/evrcb0": { - "source": "iana" - }, - "audio/evrcb1": { - "source": "iana" - }, - "audio/evrcnw": { - "source": "iana" - }, - "audio/evrcnw0": { - "source": "iana" - }, - "audio/evrcnw1": { - "source": "iana" - }, - "audio/evrcwb": { - "source": "iana" - }, - "audio/evrcwb0": { - "source": "iana" - }, - "audio/evrcwb1": { - "source": "iana" - }, - "audio/evs": { - "source": "iana" - }, - "audio/flexfec": { - "source": "iana" - }, - "audio/fwdred": { - "source": "iana" - }, - "audio/g711-0": { - "source": "iana" - }, - "audio/g719": { - "source": "iana" - }, - "audio/g722": { - "source": "iana" - }, - "audio/g7221": { - "source": "iana" - }, - "audio/g723": { - "source": "iana" - }, - "audio/g726-16": { - "source": "iana" - }, - "audio/g726-24": { - "source": "iana" - }, - "audio/g726-32": { - "source": "iana" - }, - "audio/g726-40": { - "source": "iana" - }, - "audio/g728": { - "source": "iana" - }, - "audio/g729": { - "source": "iana" - }, - "audio/g7291": { - "source": "iana" - }, - "audio/g729d": { - "source": "iana" - }, - "audio/g729e": { - "source": "iana" - }, - "audio/gsm": { - "source": "iana" - }, - "audio/gsm-efr": { - "source": "iana" - }, - "audio/gsm-hr-08": { - "source": "iana" - }, - "audio/ilbc": { - "source": "iana" - }, - "audio/ip-mr_v2.5": { - "source": "iana" - }, - "audio/isac": { - "source": "apache" - }, - "audio/l16": { - "source": "iana" - }, - "audio/l20": { - "source": "iana" - }, - "audio/l24": { - "source": "iana", - "compressible": false - }, - "audio/l8": { - "source": "iana" - }, - "audio/lpc": { - "source": "iana" - }, - "audio/melp": { - "source": "iana" - }, - "audio/melp1200": { - "source": "iana" - }, - "audio/melp2400": { - "source": "iana" - }, - "audio/melp600": { - "source": "iana" - }, - "audio/mhas": { - "source": "iana" - }, - "audio/midi": { - "source": "apache", - "extensions": ["mid","midi","kar","rmi"] - }, - "audio/mobile-xmf": { - "source": "iana", - "extensions": ["mxmf"] - }, - "audio/mp3": { - "compressible": false, - "extensions": ["mp3"] - }, - "audio/mp4": { - "source": "iana", - "compressible": false, - "extensions": ["m4a","mp4a"] - }, - "audio/mp4a-latm": { - "source": "iana" - }, - "audio/mpa": { - "source": "iana" - }, - "audio/mpa-robust": { - "source": "iana" - }, - "audio/mpeg": { - "source": "iana", - "compressible": false, - "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] - }, - "audio/mpeg4-generic": { - "source": "iana" - }, - "audio/musepack": { - "source": "apache" - }, - "audio/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["oga","ogg","spx","opus"] - }, - "audio/opus": { - "source": "iana" - }, - "audio/parityfec": { - "source": "iana" - }, - "audio/pcma": { - "source": "iana" - }, - "audio/pcma-wb": { - "source": "iana" - }, - "audio/pcmu": { - "source": "iana" - }, - "audio/pcmu-wb": { - "source": "iana" - }, - "audio/prs.sid": { - "source": "iana" - }, - "audio/qcelp": { - "source": "iana" - }, - "audio/raptorfec": { - "source": "iana" - }, - "audio/red": { - "source": "iana" - }, - "audio/rtp-enc-aescm128": { - "source": "iana" - }, - "audio/rtp-midi": { - "source": "iana" - }, - "audio/rtploopback": { - "source": "iana" - }, - "audio/rtx": { - "source": "iana" - }, - "audio/s3m": { - "source": "apache", - "extensions": ["s3m"] - }, - "audio/scip": { - "source": "iana" - }, - "audio/silk": { - "source": "apache", - "extensions": ["sil"] - }, - "audio/smv": { - "source": "iana" - }, - "audio/smv-qcp": { - "source": "iana" - }, - "audio/smv0": { - "source": "iana" - }, - "audio/sofa": { - "source": "iana" - }, - "audio/sp-midi": { - "source": "iana" - }, - "audio/speex": { - "source": "iana" - }, - "audio/t140c": { - "source": "iana" - }, - "audio/t38": { - "source": "iana" - }, - "audio/telephone-event": { - "source": "iana" - }, - "audio/tetra_acelp": { - "source": "iana" - }, - "audio/tetra_acelp_bb": { - "source": "iana" - }, - "audio/tone": { - "source": "iana" - }, - "audio/tsvcis": { - "source": "iana" - }, - "audio/uemclip": { - "source": "iana" - }, - "audio/ulpfec": { - "source": "iana" - }, - "audio/usac": { - "source": "iana" - }, - "audio/vdvi": { - "source": "iana" - }, - "audio/vmr-wb": { - "source": "iana" - }, - "audio/vnd.3gpp.iufp": { - "source": "iana" - }, - "audio/vnd.4sb": { - "source": "iana" - }, - "audio/vnd.audiokoz": { - "source": "iana" - }, - "audio/vnd.celp": { - "source": "iana" - }, - "audio/vnd.cisco.nse": { - "source": "iana" - }, - "audio/vnd.cmles.radio-events": { - "source": "iana" - }, - "audio/vnd.cns.anp1": { - "source": "iana" - }, - "audio/vnd.cns.inf1": { - "source": "iana" - }, - "audio/vnd.dece.audio": { - "source": "iana", - "extensions": ["uva","uvva"] - }, - "audio/vnd.digital-winds": { - "source": "iana", - "extensions": ["eol"] - }, - "audio/vnd.dlna.adts": { - "source": "iana" - }, - "audio/vnd.dolby.heaac.1": { - "source": "iana" - }, - "audio/vnd.dolby.heaac.2": { - "source": "iana" - }, - "audio/vnd.dolby.mlp": { - "source": "iana" - }, - "audio/vnd.dolby.mps": { - "source": "iana" - }, - "audio/vnd.dolby.pl2": { - "source": "iana" - }, - "audio/vnd.dolby.pl2x": { - "source": "iana" - }, - "audio/vnd.dolby.pl2z": { - "source": "iana" - }, - "audio/vnd.dolby.pulse.1": { - "source": "iana" - }, - "audio/vnd.dra": { - "source": "iana", - "extensions": ["dra"] - }, - "audio/vnd.dts": { - "source": "iana", - "extensions": ["dts"] - }, - "audio/vnd.dts.hd": { - "source": "iana", - "extensions": ["dtshd"] - }, - "audio/vnd.dts.uhd": { - "source": "iana" - }, - "audio/vnd.dvb.file": { - "source": "iana" - }, - "audio/vnd.everad.plj": { - "source": "iana" - }, - "audio/vnd.hns.audio": { - "source": "iana" - }, - "audio/vnd.lucent.voice": { - "source": "iana", - "extensions": ["lvp"] - }, - "audio/vnd.ms-playready.media.pya": { - "source": "iana", - "extensions": ["pya"] - }, - "audio/vnd.nokia.mobile-xmf": { - "source": "iana" - }, - "audio/vnd.nortel.vbk": { - "source": "iana" - }, - "audio/vnd.nuera.ecelp4800": { - "source": "iana", - "extensions": ["ecelp4800"] - }, - "audio/vnd.nuera.ecelp7470": { - "source": "iana", - "extensions": ["ecelp7470"] - }, - "audio/vnd.nuera.ecelp9600": { - "source": "iana", - "extensions": ["ecelp9600"] - }, - "audio/vnd.octel.sbc": { - "source": "iana" - }, - "audio/vnd.presonus.multitrack": { - "source": "iana" - }, - "audio/vnd.qcelp": { - "source": "iana" - }, - "audio/vnd.rhetorex.32kadpcm": { - "source": "iana" - }, - "audio/vnd.rip": { - "source": "iana", - "extensions": ["rip"] - }, - "audio/vnd.rn-realaudio": { - "compressible": false - }, - "audio/vnd.sealedmedia.softseal.mpeg": { - "source": "iana" - }, - "audio/vnd.vmx.cvsd": { - "source": "iana" - }, - "audio/vnd.wave": { - "compressible": false - }, - "audio/vorbis": { - "source": "iana", - "compressible": false - }, - "audio/vorbis-config": { - "source": "iana" - }, - "audio/wav": { - "compressible": false, - "extensions": ["wav"] - }, - "audio/wave": { - "compressible": false, - "extensions": ["wav"] - }, - "audio/webm": { - "source": "apache", - "compressible": false, - "extensions": ["weba"] - }, - "audio/x-aac": { - "source": "apache", - "compressible": false, - "extensions": ["aac"] - }, - "audio/x-aiff": { - "source": "apache", - "extensions": ["aif","aiff","aifc"] - }, - "audio/x-caf": { - "source": "apache", - "compressible": false, - "extensions": ["caf"] - }, - "audio/x-flac": { - "source": "apache", - "extensions": ["flac"] - }, - "audio/x-m4a": { - "source": "nginx", - "extensions": ["m4a"] - }, - "audio/x-matroska": { - "source": "apache", - "extensions": ["mka"] - }, - "audio/x-mpegurl": { - "source": "apache", - "extensions": ["m3u"] - }, - "audio/x-ms-wax": { - "source": "apache", - "extensions": ["wax"] - }, - "audio/x-ms-wma": { - "source": "apache", - "extensions": ["wma"] - }, - "audio/x-pn-realaudio": { - "source": "apache", - "extensions": ["ram","ra"] - }, - "audio/x-pn-realaudio-plugin": { - "source": "apache", - "extensions": ["rmp"] - }, - "audio/x-realaudio": { - "source": "nginx", - "extensions": ["ra"] - }, - "audio/x-tta": { - "source": "apache" - }, - "audio/x-wav": { - "source": "apache", - "extensions": ["wav"] - }, - "audio/xm": { - "source": "apache", - "extensions": ["xm"] - }, - "chemical/x-cdx": { - "source": "apache", - "extensions": ["cdx"] - }, - "chemical/x-cif": { - "source": "apache", - "extensions": ["cif"] - }, - "chemical/x-cmdf": { - "source": "apache", - "extensions": ["cmdf"] - }, - "chemical/x-cml": { - "source": "apache", - "extensions": ["cml"] - }, - "chemical/x-csml": { - "source": "apache", - "extensions": ["csml"] - }, - "chemical/x-pdb": { - "source": "apache" - }, - "chemical/x-xyz": { - "source": "apache", - "extensions": ["xyz"] - }, - "font/collection": { - "source": "iana", - "extensions": ["ttc"] - }, - "font/otf": { - "source": "iana", - "compressible": true, - "extensions": ["otf"] - }, - "font/sfnt": { - "source": "iana" - }, - "font/ttf": { - "source": "iana", - "compressible": true, - "extensions": ["ttf"] - }, - "font/woff": { - "source": "iana", - "extensions": ["woff"] - }, - "font/woff2": { - "source": "iana", - "extensions": ["woff2"] - }, - "image/aces": { - "source": "iana", - "extensions": ["exr"] - }, - "image/apng": { - "compressible": false, - "extensions": ["apng"] - }, - "image/avci": { - "source": "iana" - }, - "image/avcs": { - "source": "iana" - }, - "image/avif": { - "source": "iana", - "compressible": false, - "extensions": ["avif"] - }, - "image/bmp": { - "source": "iana", - "compressible": true, - "extensions": ["bmp"] - }, - "image/cgm": { - "source": "iana", - "extensions": ["cgm"] - }, - "image/dicom-rle": { - "source": "iana", - "extensions": ["drle"] - }, - "image/emf": { - "source": "iana", - "extensions": ["emf"] - }, - "image/fits": { - "source": "iana", - "extensions": ["fits"] - }, - "image/g3fax": { - "source": "iana", - "extensions": ["g3"] - }, - "image/gif": { - "source": "iana", - "compressible": false, - "extensions": ["gif"] - }, - "image/heic": { - "source": "iana", - "extensions": ["heic"] - }, - "image/heic-sequence": { - "source": "iana", - "extensions": ["heics"] - }, - "image/heif": { - "source": "iana", - "extensions": ["heif"] - }, - "image/heif-sequence": { - "source": "iana", - "extensions": ["heifs"] - }, - "image/hej2k": { - "source": "iana", - "extensions": ["hej2"] - }, - "image/hsj2": { - "source": "iana", - "extensions": ["hsj2"] - }, - "image/ief": { - "source": "iana", - "extensions": ["ief"] - }, - "image/jls": { - "source": "iana", - "extensions": ["jls"] - }, - "image/jp2": { - "source": "iana", - "compressible": false, - "extensions": ["jp2","jpg2"] - }, - "image/jpeg": { - "source": "iana", - "compressible": false, - "extensions": ["jpeg","jpg","jpe"] - }, - "image/jph": { - "source": "iana", - "extensions": ["jph"] - }, - "image/jphc": { - "source": "iana", - "extensions": ["jhc"] - }, - "image/jpm": { - "source": "iana", - "compressible": false, - "extensions": ["jpm"] - }, - "image/jpx": { - "source": "iana", - "compressible": false, - "extensions": ["jpx","jpf"] - }, - "image/jxr": { - "source": "iana", - "extensions": ["jxr"] - }, - "image/jxra": { - "source": "iana", - "extensions": ["jxra"] - }, - "image/jxrs": { - "source": "iana", - "extensions": ["jxrs"] - }, - "image/jxs": { - "source": "iana", - "extensions": ["jxs"] - }, - "image/jxsc": { - "source": "iana", - "extensions": ["jxsc"] - }, - "image/jxsi": { - "source": "iana", - "extensions": ["jxsi"] - }, - "image/jxss": { - "source": "iana", - "extensions": ["jxss"] - }, - "image/ktx": { - "source": "iana", - "extensions": ["ktx"] - }, - "image/ktx2": { - "source": "iana", - "extensions": ["ktx2"] - }, - "image/naplps": { - "source": "iana" - }, - "image/pjpeg": { - "compressible": false - }, - "image/png": { - "source": "iana", - "compressible": false, - "extensions": ["png"] - }, - "image/prs.btif": { - "source": "iana", - "extensions": ["btif"] - }, - "image/prs.pti": { - "source": "iana", - "extensions": ["pti"] - }, - "image/pwg-raster": { - "source": "iana" - }, - "image/sgi": { - "source": "apache", - "extensions": ["sgi"] - }, - "image/svg+xml": { - "source": "iana", - "compressible": true, - "extensions": ["svg","svgz"] - }, - "image/t38": { - "source": "iana", - "extensions": ["t38"] - }, - "image/tiff": { - "source": "iana", - "compressible": false, - "extensions": ["tif","tiff"] - }, - "image/tiff-fx": { - "source": "iana", - "extensions": ["tfx"] - }, - "image/vnd.adobe.photoshop": { - "source": "iana", - "compressible": true, - "extensions": ["psd"] - }, - "image/vnd.airzip.accelerator.azv": { - "source": "iana", - "extensions": ["azv"] - }, - "image/vnd.cns.inf2": { - "source": "iana" - }, - "image/vnd.dece.graphic": { - "source": "iana", - "extensions": ["uvi","uvvi","uvg","uvvg"] - }, - "image/vnd.djvu": { - "source": "iana", - "extensions": ["djvu","djv"] - }, - "image/vnd.dvb.subtitle": { - "source": "iana", - "extensions": ["sub"] - }, - "image/vnd.dwg": { - "source": "iana", - "extensions": ["dwg"] - }, - "image/vnd.dxf": { - "source": "iana", - "extensions": ["dxf"] - }, - "image/vnd.fastbidsheet": { - "source": "iana", - "extensions": ["fbs"] - }, - "image/vnd.fpx": { - "source": "iana", - "extensions": ["fpx"] - }, - "image/vnd.fst": { - "source": "iana", - "extensions": ["fst"] - }, - "image/vnd.fujixerox.edmics-mmr": { - "source": "iana", - "extensions": ["mmr"] - }, - "image/vnd.fujixerox.edmics-rlc": { - "source": "iana", - "extensions": ["rlc"] - }, - "image/vnd.globalgraphics.pgb": { - "source": "iana" - }, - "image/vnd.microsoft.icon": { - "source": "iana", - "extensions": ["ico"] - }, - "image/vnd.mix": { - "source": "iana" - }, - "image/vnd.mozilla.apng": { - "source": "iana" - }, - "image/vnd.ms-dds": { - "extensions": ["dds"] - }, - "image/vnd.ms-modi": { - "source": "iana", - "extensions": ["mdi"] - }, - "image/vnd.ms-photo": { - "source": "apache", - "extensions": ["wdp"] - }, - "image/vnd.net-fpx": { - "source": "iana", - "extensions": ["npx"] - }, - "image/vnd.pco.b16": { - "source": "iana", - "extensions": ["b16"] - }, - "image/vnd.radiance": { - "source": "iana" - }, - "image/vnd.sealed.png": { - "source": "iana" - }, - "image/vnd.sealedmedia.softseal.gif": { - "source": "iana" - }, - "image/vnd.sealedmedia.softseal.jpg": { - "source": "iana" - }, - "image/vnd.svf": { - "source": "iana" - }, - "image/vnd.tencent.tap": { - "source": "iana", - "extensions": ["tap"] - }, - "image/vnd.valve.source.texture": { - "source": "iana", - "extensions": ["vtf"] - }, - "image/vnd.wap.wbmp": { - "source": "iana", - "extensions": ["wbmp"] - }, - "image/vnd.xiff": { - "source": "iana", - "extensions": ["xif"] - }, - "image/vnd.zbrush.pcx": { - "source": "iana", - "extensions": ["pcx"] - }, - "image/webp": { - "source": "apache", - "extensions": ["webp"] - }, - "image/wmf": { - "source": "iana", - "extensions": ["wmf"] - }, - "image/x-3ds": { - "source": "apache", - "extensions": ["3ds"] - }, - "image/x-cmu-raster": { - "source": "apache", - "extensions": ["ras"] - }, - "image/x-cmx": { - "source": "apache", - "extensions": ["cmx"] - }, - "image/x-freehand": { - "source": "apache", - "extensions": ["fh","fhc","fh4","fh5","fh7"] - }, - "image/x-icon": { - "source": "apache", - "compressible": true, - "extensions": ["ico"] - }, - "image/x-jng": { - "source": "nginx", - "extensions": ["jng"] - }, - "image/x-mrsid-image": { - "source": "apache", - "extensions": ["sid"] - }, - "image/x-ms-bmp": { - "source": "nginx", - "compressible": true, - "extensions": ["bmp"] - }, - "image/x-pcx": { - "source": "apache", - "extensions": ["pcx"] - }, - "image/x-pict": { - "source": "apache", - "extensions": ["pic","pct"] - }, - "image/x-portable-anymap": { - "source": "apache", - "extensions": ["pnm"] - }, - "image/x-portable-bitmap": { - "source": "apache", - "extensions": ["pbm"] - }, - "image/x-portable-graymap": { - "source": "apache", - "extensions": ["pgm"] - }, - "image/x-portable-pixmap": { - "source": "apache", - "extensions": ["ppm"] - }, - "image/x-rgb": { - "source": "apache", - "extensions": ["rgb"] - }, - "image/x-tga": { - "source": "apache", - "extensions": ["tga"] - }, - "image/x-xbitmap": { - "source": "apache", - "extensions": ["xbm"] - }, - "image/x-xcf": { - "compressible": false - }, - "image/x-xpixmap": { - "source": "apache", - "extensions": ["xpm"] - }, - "image/x-xwindowdump": { - "source": "apache", - "extensions": ["xwd"] - }, - "message/cpim": { - "source": "iana" - }, - "message/delivery-status": { - "source": "iana" - }, - "message/disposition-notification": { - "source": "iana", - "extensions": [ - "disposition-notification" - ] - }, - "message/external-body": { - "source": "iana" - }, - "message/feedback-report": { - "source": "iana" - }, - "message/global": { - "source": "iana", - "extensions": ["u8msg"] - }, - "message/global-delivery-status": { - "source": "iana", - "extensions": ["u8dsn"] - }, - "message/global-disposition-notification": { - "source": "iana", - "extensions": ["u8mdn"] - }, - "message/global-headers": { - "source": "iana", - "extensions": ["u8hdr"] - }, - "message/http": { - "source": "iana", - "compressible": false - }, - "message/imdn+xml": { - "source": "iana", - "compressible": true - }, - "message/news": { - "source": "iana" - }, - "message/partial": { - "source": "iana", - "compressible": false - }, - "message/rfc822": { - "source": "iana", - "compressible": true, - "extensions": ["eml","mime"] - }, - "message/s-http": { - "source": "iana" - }, - "message/sip": { - "source": "iana" - }, - "message/sipfrag": { - "source": "iana" - }, - "message/tracking-status": { - "source": "iana" - }, - "message/vnd.si.simp": { - "source": "iana" - }, - "message/vnd.wfa.wsc": { - "source": "iana", - "extensions": ["wsc"] - }, - "model/3mf": { - "source": "iana", - "extensions": ["3mf"] - }, - "model/e57": { - "source": "iana" - }, - "model/gltf+json": { - "source": "iana", - "compressible": true, - "extensions": ["gltf"] - }, - "model/gltf-binary": { - "source": "iana", - "compressible": true, - "extensions": ["glb"] - }, - "model/iges": { - "source": "iana", - "compressible": false, - "extensions": ["igs","iges"] - }, - "model/mesh": { - "source": "iana", - "compressible": false, - "extensions": ["msh","mesh","silo"] - }, - "model/mtl": { - "source": "iana", - "extensions": ["mtl"] - }, - "model/obj": { - "source": "iana", - "extensions": ["obj"] - }, - "model/stl": { - "source": "iana", - "extensions": ["stl"] - }, - "model/vnd.collada+xml": { - "source": "iana", - "compressible": true, - "extensions": ["dae"] - }, - "model/vnd.dwf": { - "source": "iana", - "extensions": ["dwf"] - }, - "model/vnd.flatland.3dml": { - "source": "iana" - }, - "model/vnd.gdl": { - "source": "iana", - "extensions": ["gdl"] - }, - "model/vnd.gs-gdl": { - "source": "apache" - }, - "model/vnd.gs.gdl": { - "source": "iana" - }, - "model/vnd.gtw": { - "source": "iana", - "extensions": ["gtw"] - }, - "model/vnd.moml+xml": { - "source": "iana", - "compressible": true - }, - "model/vnd.mts": { - "source": "iana", - "extensions": ["mts"] - }, - "model/vnd.opengex": { - "source": "iana", - "extensions": ["ogex"] - }, - "model/vnd.parasolid.transmit.binary": { - "source": "iana", - "extensions": ["x_b"] - }, - "model/vnd.parasolid.transmit.text": { - "source": "iana", - "extensions": ["x_t"] - }, - "model/vnd.pytha.pyox": { - "source": "iana" - }, - "model/vnd.rosette.annotated-data-model": { - "source": "iana" - }, - "model/vnd.sap.vds": { - "source": "iana", - "extensions": ["vds"] - }, - "model/vnd.usdz+zip": { - "source": "iana", - "compressible": false, - "extensions": ["usdz"] - }, - "model/vnd.valve.source.compiled-map": { - "source": "iana", - "extensions": ["bsp"] - }, - "model/vnd.vtu": { - "source": "iana", - "extensions": ["vtu"] - }, - "model/vrml": { - "source": "iana", - "compressible": false, - "extensions": ["wrl","vrml"] - }, - "model/x3d+binary": { - "source": "apache", - "compressible": false, - "extensions": ["x3db","x3dbz"] - }, - "model/x3d+fastinfoset": { - "source": "iana", - "extensions": ["x3db"] - }, - "model/x3d+vrml": { - "source": "apache", - "compressible": false, - "extensions": ["x3dv","x3dvz"] - }, - "model/x3d+xml": { - "source": "iana", - "compressible": true, - "extensions": ["x3d","x3dz"] - }, - "model/x3d-vrml": { - "source": "iana", - "extensions": ["x3dv"] - }, - "multipart/alternative": { - "source": "iana", - "compressible": false - }, - "multipart/appledouble": { - "source": "iana" - }, - "multipart/byteranges": { - "source": "iana" - }, - "multipart/digest": { - "source": "iana" - }, - "multipart/encrypted": { - "source": "iana", - "compressible": false - }, - "multipart/form-data": { - "source": "iana", - "compressible": false - }, - "multipart/header-set": { - "source": "iana" - }, - "multipart/mixed": { - "source": "iana" - }, - "multipart/multilingual": { - "source": "iana" - }, - "multipart/parallel": { - "source": "iana" - }, - "multipart/related": { - "source": "iana", - "compressible": false - }, - "multipart/report": { - "source": "iana" - }, - "multipart/signed": { - "source": "iana", - "compressible": false - }, - "multipart/vnd.bint.med-plus": { - "source": "iana" - }, - "multipart/voice-message": { - "source": "iana" - }, - "multipart/x-mixed-replace": { - "source": "iana" - }, - "text/1d-interleaved-parityfec": { - "source": "iana" - }, - "text/cache-manifest": { - "source": "iana", - "compressible": true, - "extensions": ["appcache","manifest"] - }, - "text/calendar": { - "source": "iana", - "extensions": ["ics","ifb"] - }, - "text/calender": { - "compressible": true - }, - "text/cmd": { - "compressible": true - }, - "text/coffeescript": { - "extensions": ["coffee","litcoffee"] - }, - "text/cql": { - "source": "iana" - }, - "text/cql-expression": { - "source": "iana" - }, - "text/cql-identifier": { - "source": "iana" - }, - "text/css": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["css"] - }, - "text/csv": { - "source": "iana", - "compressible": true, - "extensions": ["csv"] - }, - "text/csv-schema": { - "source": "iana" - }, - "text/directory": { - "source": "iana" - }, - "text/dns": { - "source": "iana" - }, - "text/ecmascript": { - "source": "iana" - }, - "text/encaprtp": { - "source": "iana" - }, - "text/enriched": { - "source": "iana" - }, - "text/fhirpath": { - "source": "iana" - }, - "text/flexfec": { - "source": "iana" - }, - "text/fwdred": { - "source": "iana" - }, - "text/gff3": { - "source": "iana" - }, - "text/grammar-ref-list": { - "source": "iana" - }, - "text/html": { - "source": "iana", - "compressible": true, - "extensions": ["html","htm","shtml"] - }, - "text/jade": { - "extensions": ["jade"] - }, - "text/javascript": { - "source": "iana", - "compressible": true - }, - "text/jcr-cnd": { - "source": "iana" - }, - "text/jsx": { - "compressible": true, - "extensions": ["jsx"] - }, - "text/less": { - "compressible": true, - "extensions": ["less"] - }, - "text/markdown": { - "source": "iana", - "compressible": true, - "extensions": ["markdown","md"] - }, - "text/mathml": { - "source": "nginx", - "extensions": ["mml"] - }, - "text/mdx": { - "compressible": true, - "extensions": ["mdx"] - }, - "text/mizar": { - "source": "iana" - }, - "text/n3": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["n3"] - }, - "text/parameters": { - "source": "iana", - "charset": "UTF-8" - }, - "text/parityfec": { - "source": "iana" - }, - "text/plain": { - "source": "iana", - "compressible": true, - "extensions": ["txt","text","conf","def","list","log","in","ini"] - }, - "text/provenance-notation": { - "source": "iana", - "charset": "UTF-8" - }, - "text/prs.fallenstein.rst": { - "source": "iana" - }, - "text/prs.lines.tag": { - "source": "iana", - "extensions": ["dsc"] - }, - "text/prs.prop.logic": { - "source": "iana" - }, - "text/raptorfec": { - "source": "iana" - }, - "text/red": { - "source": "iana" - }, - "text/rfc822-headers": { - "source": "iana" - }, - "text/richtext": { - "source": "iana", - "compressible": true, - "extensions": ["rtx"] - }, - "text/rtf": { - "source": "iana", - "compressible": true, - "extensions": ["rtf"] - }, - "text/rtp-enc-aescm128": { - "source": "iana" - }, - "text/rtploopback": { - "source": "iana" - }, - "text/rtx": { - "source": "iana" - }, - "text/sgml": { - "source": "iana", - "extensions": ["sgml","sgm"] - }, - "text/shaclc": { - "source": "iana" - }, - "text/shex": { - "source": "iana", - "extensions": ["shex"] - }, - "text/slim": { - "extensions": ["slim","slm"] - }, - "text/spdx": { - "source": "iana", - "extensions": ["spdx"] - }, - "text/strings": { - "source": "iana" - }, - "text/stylus": { - "extensions": ["stylus","styl"] - }, - "text/t140": { - "source": "iana" - }, - "text/tab-separated-values": { - "source": "iana", - "compressible": true, - "extensions": ["tsv"] - }, - "text/troff": { - "source": "iana", - "extensions": ["t","tr","roff","man","me","ms"] - }, - "text/turtle": { - "source": "iana", - "charset": "UTF-8", - "extensions": ["ttl"] - }, - "text/ulpfec": { - "source": "iana" - }, - "text/uri-list": { - "source": "iana", - "compressible": true, - "extensions": ["uri","uris","urls"] - }, - "text/vcard": { - "source": "iana", - "compressible": true, - "extensions": ["vcard"] - }, - "text/vnd.a": { - "source": "iana" - }, - "text/vnd.abc": { - "source": "iana" - }, - "text/vnd.ascii-art": { - "source": "iana" - }, - "text/vnd.curl": { - "source": "iana", - "extensions": ["curl"] - }, - "text/vnd.curl.dcurl": { - "source": "apache", - "extensions": ["dcurl"] - }, - "text/vnd.curl.mcurl": { - "source": "apache", - "extensions": ["mcurl"] - }, - "text/vnd.curl.scurl": { - "source": "apache", - "extensions": ["scurl"] - }, - "text/vnd.debian.copyright": { - "source": "iana", - "charset": "UTF-8" - }, - "text/vnd.dmclientscript": { - "source": "iana" - }, - "text/vnd.dvb.subtitle": { - "source": "iana", - "extensions": ["sub"] - }, - "text/vnd.esmertec.theme-descriptor": { - "source": "iana", - "charset": "UTF-8" - }, - "text/vnd.ficlab.flt": { - "source": "iana" - }, - "text/vnd.fly": { - "source": "iana", - "extensions": ["fly"] - }, - "text/vnd.fmi.flexstor": { - "source": "iana", - "extensions": ["flx"] - }, - "text/vnd.gml": { - "source": "iana" - }, - "text/vnd.graphviz": { - "source": "iana", - "extensions": ["gv"] - }, - "text/vnd.hans": { - "source": "iana" - }, - "text/vnd.hgl": { - "source": "iana" - }, - "text/vnd.in3d.3dml": { - "source": "iana", - "extensions": ["3dml"] - }, - "text/vnd.in3d.spot": { - "source": "iana", - "extensions": ["spot"] - }, - "text/vnd.iptc.newsml": { - "source": "iana" - }, - "text/vnd.iptc.nitf": { - "source": "iana" - }, - "text/vnd.latex-z": { - "source": "iana" - }, - "text/vnd.motorola.reflex": { - "source": "iana" - }, - "text/vnd.ms-mediapackage": { - "source": "iana" - }, - "text/vnd.net2phone.commcenter.command": { - "source": "iana" - }, - "text/vnd.radisys.msml-basic-layout": { - "source": "iana" - }, - "text/vnd.senx.warpscript": { - "source": "iana" - }, - "text/vnd.si.uricatalogue": { - "source": "iana" - }, - "text/vnd.sosi": { - "source": "iana" - }, - "text/vnd.sun.j2me.app-descriptor": { - "source": "iana", - "charset": "UTF-8", - "extensions": ["jad"] - }, - "text/vnd.trolltech.linguist": { - "source": "iana", - "charset": "UTF-8" - }, - "text/vnd.wap.si": { - "source": "iana" - }, - "text/vnd.wap.sl": { - "source": "iana" - }, - "text/vnd.wap.wml": { - "source": "iana", - "extensions": ["wml"] - }, - "text/vnd.wap.wmlscript": { - "source": "iana", - "extensions": ["wmls"] - }, - "text/vtt": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["vtt"] - }, - "text/x-asm": { - "source": "apache", - "extensions": ["s","asm"] - }, - "text/x-c": { - "source": "apache", - "extensions": ["c","cc","cxx","cpp","h","hh","dic"] - }, - "text/x-component": { - "source": "nginx", - "extensions": ["htc"] - }, - "text/x-fortran": { - "source": "apache", - "extensions": ["f","for","f77","f90"] - }, - "text/x-gwt-rpc": { - "compressible": true - }, - "text/x-handlebars-template": { - "extensions": ["hbs"] - }, - "text/x-java-source": { - "source": "apache", - "extensions": ["java"] - }, - "text/x-jquery-tmpl": { - "compressible": true - }, - "text/x-lua": { - "extensions": ["lua"] - }, - "text/x-markdown": { - "compressible": true, - "extensions": ["mkd"] - }, - "text/x-nfo": { - "source": "apache", - "extensions": ["nfo"] - }, - "text/x-opml": { - "source": "apache", - "extensions": ["opml"] - }, - "text/x-org": { - "compressible": true, - "extensions": ["org"] - }, - "text/x-pascal": { - "source": "apache", - "extensions": ["p","pas"] - }, - "text/x-processing": { - "compressible": true, - "extensions": ["pde"] - }, - "text/x-sass": { - "extensions": ["sass"] - }, - "text/x-scss": { - "extensions": ["scss"] - }, - "text/x-setext": { - "source": "apache", - "extensions": ["etx"] - }, - "text/x-sfv": { - "source": "apache", - "extensions": ["sfv"] - }, - "text/x-suse-ymp": { - "compressible": true, - "extensions": ["ymp"] - }, - "text/x-uuencode": { - "source": "apache", - "extensions": ["uu"] - }, - "text/x-vcalendar": { - "source": "apache", - "extensions": ["vcs"] - }, - "text/x-vcard": { - "source": "apache", - "extensions": ["vcf"] - }, - "text/xml": { - "source": "iana", - "compressible": true, - "extensions": ["xml"] - }, - "text/xml-external-parsed-entity": { - "source": "iana" - }, - "text/yaml": { - "compressible": true, - "extensions": ["yaml","yml"] - }, - "video/1d-interleaved-parityfec": { - "source": "iana" - }, - "video/3gpp": { - "source": "iana", - "extensions": ["3gp","3gpp"] - }, - "video/3gpp-tt": { - "source": "iana" - }, - "video/3gpp2": { - "source": "iana", - "extensions": ["3g2"] - }, - "video/av1": { - "source": "iana" - }, - "video/bmpeg": { - "source": "iana" - }, - "video/bt656": { - "source": "iana" - }, - "video/celb": { - "source": "iana" - }, - "video/dv": { - "source": "iana" - }, - "video/encaprtp": { - "source": "iana" - }, - "video/ffv1": { - "source": "iana" - }, - "video/flexfec": { - "source": "iana" - }, - "video/h261": { - "source": "iana", - "extensions": ["h261"] - }, - "video/h263": { - "source": "iana", - "extensions": ["h263"] - }, - "video/h263-1998": { - "source": "iana" - }, - "video/h263-2000": { - "source": "iana" - }, - "video/h264": { - "source": "iana", - "extensions": ["h264"] - }, - "video/h264-rcdo": { - "source": "iana" - }, - "video/h264-svc": { - "source": "iana" - }, - "video/h265": { - "source": "iana" - }, - "video/iso.segment": { - "source": "iana", - "extensions": ["m4s"] - }, - "video/jpeg": { - "source": "iana", - "extensions": ["jpgv"] - }, - "video/jpeg2000": { - "source": "iana" - }, - "video/jpm": { - "source": "apache", - "extensions": ["jpm","jpgm"] - }, - "video/mj2": { - "source": "iana", - "extensions": ["mj2","mjp2"] - }, - "video/mp1s": { - "source": "iana" - }, - "video/mp2p": { - "source": "iana" - }, - "video/mp2t": { - "source": "iana", - "extensions": ["ts"] - }, - "video/mp4": { - "source": "iana", - "compressible": false, - "extensions": ["mp4","mp4v","mpg4"] - }, - "video/mp4v-es": { - "source": "iana" - }, - "video/mpeg": { - "source": "iana", - "compressible": false, - "extensions": ["mpeg","mpg","mpe","m1v","m2v"] - }, - "video/mpeg4-generic": { - "source": "iana" - }, - "video/mpv": { - "source": "iana" - }, - "video/nv": { - "source": "iana" - }, - "video/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["ogv"] - }, - "video/parityfec": { - "source": "iana" - }, - "video/pointer": { - "source": "iana" - }, - "video/quicktime": { - "source": "iana", - "compressible": false, - "extensions": ["qt","mov"] - }, - "video/raptorfec": { - "source": "iana" - }, - "video/raw": { - "source": "iana" - }, - "video/rtp-enc-aescm128": { - "source": "iana" - }, - "video/rtploopback": { - "source": "iana" - }, - "video/rtx": { - "source": "iana" - }, - "video/scip": { - "source": "iana" - }, - "video/smpte291": { - "source": "iana" - }, - "video/smpte292m": { - "source": "iana" - }, - "video/ulpfec": { - "source": "iana" - }, - "video/vc1": { - "source": "iana" - }, - "video/vc2": { - "source": "iana" - }, - "video/vnd.cctv": { - "source": "iana" - }, - "video/vnd.dece.hd": { - "source": "iana", - "extensions": ["uvh","uvvh"] - }, - "video/vnd.dece.mobile": { - "source": "iana", - "extensions": ["uvm","uvvm"] - }, - "video/vnd.dece.mp4": { - "source": "iana" - }, - "video/vnd.dece.pd": { - "source": "iana", - "extensions": ["uvp","uvvp"] - }, - "video/vnd.dece.sd": { - "source": "iana", - "extensions": ["uvs","uvvs"] - }, - "video/vnd.dece.video": { - "source": "iana", - "extensions": ["uvv","uvvv"] - }, - "video/vnd.directv.mpeg": { - "source": "iana" - }, - "video/vnd.directv.mpeg-tts": { - "source": "iana" - }, - "video/vnd.dlna.mpeg-tts": { - "source": "iana" - }, - "video/vnd.dvb.file": { - "source": "iana", - "extensions": ["dvb"] - }, - "video/vnd.fvt": { - "source": "iana", - "extensions": ["fvt"] - }, - "video/vnd.hns.video": { - "source": "iana" - }, - "video/vnd.iptvforum.1dparityfec-1010": { - "source": "iana" - }, - "video/vnd.iptvforum.1dparityfec-2005": { - "source": "iana" - }, - "video/vnd.iptvforum.2dparityfec-1010": { - "source": "iana" - }, - "video/vnd.iptvforum.2dparityfec-2005": { - "source": "iana" - }, - "video/vnd.iptvforum.ttsavc": { - "source": "iana" - }, - "video/vnd.iptvforum.ttsmpeg2": { - "source": "iana" - }, - "video/vnd.motorola.video": { - "source": "iana" - }, - "video/vnd.motorola.videop": { - "source": "iana" - }, - "video/vnd.mpegurl": { - "source": "iana", - "extensions": ["mxu","m4u"] - }, - "video/vnd.ms-playready.media.pyv": { - "source": "iana", - "extensions": ["pyv"] - }, - "video/vnd.nokia.interleaved-multimedia": { - "source": "iana" - }, - "video/vnd.nokia.mp4vr": { - "source": "iana" - }, - "video/vnd.nokia.videovoip": { - "source": "iana" - }, - "video/vnd.objectvideo": { - "source": "iana" - }, - "video/vnd.radgamettools.bink": { - "source": "iana" - }, - "video/vnd.radgamettools.smacker": { - "source": "iana" - }, - "video/vnd.sealed.mpeg1": { - "source": "iana" - }, - "video/vnd.sealed.mpeg4": { - "source": "iana" - }, - "video/vnd.sealed.swf": { - "source": "iana" - }, - "video/vnd.sealedmedia.softseal.mov": { - "source": "iana" - }, - "video/vnd.uvvu.mp4": { - "source": "iana", - "extensions": ["uvu","uvvu"] - }, - "video/vnd.vivo": { - "source": "iana", - "extensions": ["viv"] - }, - "video/vnd.youtube.yt": { - "source": "iana" - }, - "video/vp8": { - "source": "iana" - }, - "video/webm": { - "source": "apache", - "compressible": false, - "extensions": ["webm"] - }, - "video/x-f4v": { - "source": "apache", - "extensions": ["f4v"] - }, - "video/x-fli": { - "source": "apache", - "extensions": ["fli"] - }, - "video/x-flv": { - "source": "apache", - "compressible": false, - "extensions": ["flv"] - }, - "video/x-m4v": { - "source": "apache", - "extensions": ["m4v"] - }, - "video/x-matroska": { - "source": "apache", - "compressible": false, - "extensions": ["mkv","mk3d","mks"] - }, - "video/x-mng": { - "source": "apache", - "extensions": ["mng"] - }, - "video/x-ms-asf": { - "source": "apache", - "extensions": ["asf","asx"] - }, - "video/x-ms-vob": { - "source": "apache", - "extensions": ["vob"] - }, - "video/x-ms-wm": { - "source": "apache", - "extensions": ["wm"] - }, - "video/x-ms-wmv": { - "source": "apache", - "compressible": false, - "extensions": ["wmv"] - }, - "video/x-ms-wmx": { - "source": "apache", - "extensions": ["wmx"] - }, - "video/x-ms-wvx": { - "source": "apache", - "extensions": ["wvx"] - }, - "video/x-msvideo": { - "source": "apache", - "extensions": ["avi"] - }, - "video/x-sgi-movie": { - "source": "apache", - "extensions": ["movie"] - }, - "video/x-smv": { - "source": "apache", - "extensions": ["smv"] - }, - "x-conference/x-cooltalk": { - "source": "apache", - "extensions": ["ice"] - }, - "x-shader/x-fragment": { - "compressible": true - }, - "x-shader/x-vertex": { - "compressible": true - } -} diff --git a/node_modules/mime-db/index.js b/node_modules/mime-db/index.js deleted file mode 100644 index 551031f6..00000000 --- a/node_modules/mime-db/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = require('./db.json') diff --git a/node_modules/mime-db/package.json b/node_modules/mime-db/package.json deleted file mode 100644 index 2a1a1ba5..00000000 --- a/node_modules/mime-db/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "_from": "mime-db@1.48.0", - "_id": "mime-db@1.48.0", - "_inBundle": false, - "_integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==", - "_location": "/mime-db", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "mime-db@1.48.0", - "name": "mime-db", - "escapedName": "mime-db", - "rawSpec": "1.48.0", - "saveSpec": null, - "fetchSpec": "1.48.0" - }, - "_requiredBy": [ - "/mime-types" - ], - "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", - "_shasum": "e35b31045dd7eada3aaad537ed88a33afbef2d1d", - "_spec": "mime-db@1.48.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/mime-types", - "bugs": { - "url": "https://github.com/jshttp/mime-db/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - }, - { - "name": "Robert Kieffer", - "email": "robert@broofa.com", - "url": "http://github.com/broofa" - } - ], - "deprecated": false, - "description": "Media Type Database", - "devDependencies": { - "bluebird": "3.7.2", - "co": "4.6.0", - "cogent": "1.0.1", - "csv-parse": "4.15.4", - "eslint": "7.27.0", - "eslint-config-standard": "15.0.1", - "eslint-plugin-import": "2.23.4", - "eslint-plugin-markdown": "2.2.0", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.1.0", - "eslint-plugin-standard": "4.1.0", - "gnode": "0.1.2", - "mocha": "8.4.0", - "nyc": "15.1.0", - "raw-body": "2.4.1", - "stream-to-array": "2.3.0" - }, - "engines": { - "node": ">= 0.6" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "README.md", - "db.json", - "index.js" - ], - "homepage": "https://github.com/jshttp/mime-db#readme", - "keywords": [ - "mime", - "db", - "type", - "types", - "database", - "charset", - "charsets" - ], - "license": "MIT", - "name": "mime-db", - "repository": { - "type": "git", - "url": "git+https://github.com/jshttp/mime-db.git" - }, - "scripts": { - "build": "node scripts/build", - "fetch": "node scripts/fetch-apache && gnode scripts/fetch-iana && node scripts/fetch-nginx", - "lint": "eslint .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "update": "npm run fetch && npm run build", - "version": "node scripts/version-history.js && git add HISTORY.md" - }, - "version": "1.48.0" -} diff --git a/node_modules/mime-types/HISTORY.md b/node_modules/mime-types/HISTORY.md deleted file mode 100644 index 19e45a15..00000000 --- a/node_modules/mime-types/HISTORY.md +++ /dev/null @@ -1,371 +0,0 @@ -2.1.31 / 2021-06-01 -=================== - - * deps: mime-db@1.48.0 - - Add extension `.mvt` to `application/vnd.mapbox-vector-tile` - - Add new upstream MIME types - - Mark `text/yaml` as compressible - -2.1.30 / 2021-04-02 -=================== - - * deps: mime-db@1.47.0 - - Add extension `.amr` to `audio/amr` - - Remove ambigious extensions from IANA for `application/*+xml` types - - Update primary extension to `.es` for `application/ecmascript` - -2.1.29 / 2021-02-17 -=================== - - * deps: mime-db@1.46.0 - - Add extension `.amr` to `audio/amr` - - Add extension `.m4s` to `video/iso.segment` - - Add extension `.opus` to `audio/ogg` - - Add new upstream MIME types - -2.1.28 / 2021-01-01 -=================== - - * deps: mime-db@1.45.0 - - Add `application/ubjson` with extension `.ubj` - - Add `image/avif` with extension `.avif` - - Add `image/ktx2` with extension `.ktx2` - - Add extension `.dbf` to `application/vnd.dbf` - - Add extension `.rar` to `application/vnd.rar` - - Add extension `.td` to `application/urc-targetdesc+xml` - - Add new upstream MIME types - - Fix extension of `application/vnd.apple.keynote` to be `.key` - -2.1.27 / 2020-04-23 -=================== - - * deps: mime-db@1.44.0 - - Add charsets from IANA - - Add extension `.cjs` to `application/node` - - Add new upstream MIME types - -2.1.26 / 2020-01-05 -=================== - - * deps: mime-db@1.43.0 - - Add `application/x-keepass2` with extension `.kdbx` - - Add extension `.mxmf` to `audio/mobile-xmf` - - Add extensions from IANA for `application/*+xml` types - - Add new upstream MIME types - -2.1.25 / 2019-11-12 -=================== - - * deps: mime-db@1.42.0 - - Add new upstream MIME types - - Add `application/toml` with extension `.toml` - - Add `image/vnd.ms-dds` with extension `.dds` - -2.1.24 / 2019-04-20 -=================== - - * deps: mime-db@1.40.0 - - Add extensions from IANA for `model/*` types - - Add `text/mdx` with extension `.mdx` - -2.1.23 / 2019-04-17 -=================== - - * deps: mime-db@~1.39.0 - - Add extensions `.siv` and `.sieve` to `application/sieve` - - Add new upstream MIME types - -2.1.22 / 2019-02-14 -=================== - - * deps: mime-db@~1.38.0 - - Add extension `.nq` to `application/n-quads` - - Add extension `.nt` to `application/n-triples` - - Add new upstream MIME types - - Mark `text/less` as compressible - -2.1.21 / 2018-10-19 -=================== - - * deps: mime-db@~1.37.0 - - Add extensions to HEIC image types - - Add new upstream MIME types - -2.1.20 / 2018-08-26 -=================== - - * deps: mime-db@~1.36.0 - - Add Apple file extensions from IANA - - Add extensions from IANA for `image/*` types - - Add new upstream MIME types - -2.1.19 / 2018-07-17 -=================== - - * deps: mime-db@~1.35.0 - - Add extension `.csl` to `application/vnd.citationstyles.style+xml` - - Add extension `.es` to `application/ecmascript` - - Add extension `.owl` to `application/rdf+xml` - - Add new upstream MIME types - - Add UTF-8 as default charset for `text/turtle` - -2.1.18 / 2018-02-16 -=================== - - * deps: mime-db@~1.33.0 - - Add `application/raml+yaml` with extension `.raml` - - Add `application/wasm` with extension `.wasm` - - Add `text/shex` with extension `.shex` - - Add extensions for JPEG-2000 images - - Add extensions from IANA for `message/*` types - - Add new upstream MIME types - - Update font MIME types - - Update `text/hjson` to registered `application/hjson` - -2.1.17 / 2017-09-01 -=================== - - * deps: mime-db@~1.30.0 - - Add `application/vnd.ms-outlook` - - Add `application/x-arj` - - Add extension `.mjs` to `application/javascript` - - Add glTF types and extensions - - Add new upstream MIME types - - Add `text/x-org` - - Add VirtualBox MIME types - - Fix `source` records for `video/*` types that are IANA - - Update `font/opentype` to registered `font/otf` - -2.1.16 / 2017-07-24 -=================== - - * deps: mime-db@~1.29.0 - - Add `application/fido.trusted-apps+json` - - Add extension `.wadl` to `application/vnd.sun.wadl+xml` - - Add extension `.gz` to `application/gzip` - - Add new upstream MIME types - - Update extensions `.md` and `.markdown` to be `text/markdown` - -2.1.15 / 2017-03-23 -=================== - - * deps: mime-db@~1.27.0 - - Add new mime types - - Add `image/apng` - -2.1.14 / 2017-01-14 -=================== - - * deps: mime-db@~1.26.0 - - Add new mime types - -2.1.13 / 2016-11-18 -=================== - - * deps: mime-db@~1.25.0 - - Add new mime types - -2.1.12 / 2016-09-18 -=================== - - * deps: mime-db@~1.24.0 - - Add new mime types - - Add `audio/mp3` - -2.1.11 / 2016-05-01 -=================== - - * deps: mime-db@~1.23.0 - - Add new mime types - -2.1.10 / 2016-02-15 -=================== - - * deps: mime-db@~1.22.0 - - Add new mime types - - Fix extension of `application/dash+xml` - - Update primary extension for `audio/mp4` - -2.1.9 / 2016-01-06 -================== - - * deps: mime-db@~1.21.0 - - Add new mime types - -2.1.8 / 2015-11-30 -================== - - * deps: mime-db@~1.20.0 - - Add new mime types - -2.1.7 / 2015-09-20 -================== - - * deps: mime-db@~1.19.0 - - Add new mime types - -2.1.6 / 2015-09-03 -================== - - * deps: mime-db@~1.18.0 - - Add new mime types - -2.1.5 / 2015-08-20 -================== - - * deps: mime-db@~1.17.0 - - Add new mime types - -2.1.4 / 2015-07-30 -================== - - * deps: mime-db@~1.16.0 - - Add new mime types - -2.1.3 / 2015-07-13 -================== - - * deps: mime-db@~1.15.0 - - Add new mime types - -2.1.2 / 2015-06-25 -================== - - * deps: mime-db@~1.14.0 - - Add new mime types - -2.1.1 / 2015-06-08 -================== - - * perf: fix deopt during mapping - -2.1.0 / 2015-06-07 -================== - - * Fix incorrectly treating extension-less file name as extension - - i.e. `'path/to/json'` will no longer return `application/json` - * Fix `.charset(type)` to accept parameters - * Fix `.charset(type)` to match case-insensitive - * Improve generation of extension to MIME mapping - * Refactor internals for readability and no argument reassignment - * Prefer `application/*` MIME types from the same source - * Prefer any type over `application/octet-stream` - * deps: mime-db@~1.13.0 - - Add nginx as a source - - Add new mime types - -2.0.14 / 2015-06-06 -=================== - - * deps: mime-db@~1.12.0 - - Add new mime types - -2.0.13 / 2015-05-31 -=================== - - * deps: mime-db@~1.11.0 - - Add new mime types - -2.0.12 / 2015-05-19 -=================== - - * deps: mime-db@~1.10.0 - - Add new mime types - -2.0.11 / 2015-05-05 -=================== - - * deps: mime-db@~1.9.1 - - Add new mime types - -2.0.10 / 2015-03-13 -=================== - - * deps: mime-db@~1.8.0 - - Add new mime types - -2.0.9 / 2015-02-09 -================== - - * deps: mime-db@~1.7.0 - - Add new mime types - - Community extensions ownership transferred from `node-mime` - -2.0.8 / 2015-01-29 -================== - - * deps: mime-db@~1.6.0 - - Add new mime types - -2.0.7 / 2014-12-30 -================== - - * deps: mime-db@~1.5.0 - - Add new mime types - - Fix various invalid MIME type entries - -2.0.6 / 2014-12-30 -================== - - * deps: mime-db@~1.4.0 - - Add new mime types - - Fix various invalid MIME type entries - - Remove example template MIME types - -2.0.5 / 2014-12-29 -================== - - * deps: mime-db@~1.3.1 - - Fix missing extensions - -2.0.4 / 2014-12-10 -================== - - * deps: mime-db@~1.3.0 - - Add new mime types - -2.0.3 / 2014-11-09 -================== - - * deps: mime-db@~1.2.0 - - Add new mime types - -2.0.2 / 2014-09-28 -================== - - * deps: mime-db@~1.1.0 - - Add new mime types - - Add additional compressible - - Update charsets - -2.0.1 / 2014-09-07 -================== - - * Support Node.js 0.6 - -2.0.0 / 2014-09-02 -================== - - * Use `mime-db` - * Remove `.define()` - -1.0.2 / 2014-08-04 -================== - - * Set charset=utf-8 for `text/javascript` - -1.0.1 / 2014-06-24 -================== - - * Add `text/jsx` type - -1.0.0 / 2014-05-12 -================== - - * Return `false` for unknown types - * Set charset=utf-8 for `application/json` - -0.1.0 / 2014-05-02 -================== - - * Initial release diff --git a/node_modules/mime-types/LICENSE b/node_modules/mime-types/LICENSE deleted file mode 100644 index 06166077..00000000 --- a/node_modules/mime-types/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mime-types/README.md b/node_modules/mime-types/README.md deleted file mode 100644 index c978ac27..00000000 --- a/node_modules/mime-types/README.md +++ /dev/null @@ -1,113 +0,0 @@ -# mime-types - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -The ultimate javascript content-type utility. - -Similar to [the `mime@1.x` module](https://www.npmjs.com/package/mime), except: - -- __No fallbacks.__ Instead of naively returning the first available type, - `mime-types` simply returns `false`, so do - `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. -- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. -- No `.define()` functionality -- Bug fixes for `.lookup(path)` - -Otherwise, the API is compatible with `mime` 1.x. - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install mime-types -``` - -## Adding Types - -All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db), -so open a PR there if you'd like to add mime types. - -## API - -```js -var mime = require('mime-types') -``` - -All functions return `false` if input is invalid or not found. - -### mime.lookup(path) - -Lookup the content-type associated with a file. - -```js -mime.lookup('json') // 'application/json' -mime.lookup('.md') // 'text/markdown' -mime.lookup('file.html') // 'text/html' -mime.lookup('folder/file.js') // 'application/javascript' -mime.lookup('folder/.htaccess') // false - -mime.lookup('cats') // false -``` - -### mime.contentType(type) - -Create a full content-type header given a content-type or extension. -When given an extension, `mime.lookup` is used to get the matching -content-type, otherwise the given content-type is used. Then if the -content-type does not already have a `charset` parameter, `mime.charset` -is used to get the default charset and add to the returned content-type. - -```js -mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' -mime.contentType('file.json') // 'application/json; charset=utf-8' -mime.contentType('text/html') // 'text/html; charset=utf-8' -mime.contentType('text/html; charset=iso-8859-1') // 'text/html; charset=iso-8859-1' - -// from a full path -mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8' -``` - -### mime.extension(type) - -Get the default extension for a content-type. - -```js -mime.extension('application/octet-stream') // 'bin' -``` - -### mime.charset(type) - -Lookup the implied default charset of a content-type. - -```js -mime.charset('text/markdown') // 'UTF-8' -``` - -### var type = mime.types[extension] - -A map of content-types by extension. - -### [extensions...] = mime.extensions[type] - -A map of extensions by content-type. - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/mime-types/master?label=ci -[ci-url]: https://github.com/jshttp/mime-types/actions?query=workflow%3Aci -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-types/master -[coveralls-url]: https://coveralls.io/r/jshttp/mime-types?branch=master -[node-version-image]: https://badgen.net/npm/node/mime-types -[node-version-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/mime-types -[npm-url]: https://npmjs.org/package/mime-types -[npm-version-image]: https://badgen.net/npm/v/mime-types diff --git a/node_modules/mime-types/index.js b/node_modules/mime-types/index.js deleted file mode 100644 index b9f34d59..00000000 --- a/node_modules/mime-types/index.js +++ /dev/null @@ -1,188 +0,0 @@ -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var db = require('mime-db') -var extname = require('path').extname - -/** - * Module variables. - * @private - */ - -var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ -var TEXT_TYPE_REGEXP = /^text\//i - -/** - * Module exports. - * @public - */ - -exports.charset = charset -exports.charsets = { lookup: charset } -exports.contentType = contentType -exports.extension = extension -exports.extensions = Object.create(null) -exports.lookup = lookup -exports.types = Object.create(null) - -// Populate the extensions/types maps -populateMaps(exports.extensions, exports.types) - -/** - * Get the default charset for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function charset (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - var mime = match && db[match[1].toLowerCase()] - - if (mime && mime.charset) { - return mime.charset - } - - // default text/* to utf-8 - if (match && TEXT_TYPE_REGEXP.test(match[1])) { - return 'UTF-8' - } - - return false -} - -/** - * Create a full Content-Type header given a MIME type or extension. - * - * @param {string} str - * @return {boolean|string} - */ - -function contentType (str) { - // TODO: should this even be in this module? - if (!str || typeof str !== 'string') { - return false - } - - var mime = str.indexOf('/') === -1 - ? exports.lookup(str) - : str - - if (!mime) { - return false - } - - // TODO: use content-type or other module - if (mime.indexOf('charset') === -1) { - var charset = exports.charset(mime) - if (charset) mime += '; charset=' + charset.toLowerCase() - } - - return mime -} - -/** - * Get the default extension for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function extension (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - - // get extensions - var exts = match && exports.extensions[match[1].toLowerCase()] - - if (!exts || !exts.length) { - return false - } - - return exts[0] -} - -/** - * Lookup the MIME type for a file path/extension. - * - * @param {string} path - * @return {boolean|string} - */ - -function lookup (path) { - if (!path || typeof path !== 'string') { - return false - } - - // get the extension ("ext" or ".ext" or full path) - var extension = extname('x.' + path) - .toLowerCase() - .substr(1) - - if (!extension) { - return false - } - - return exports.types[extension] || false -} - -/** - * Populate the extensions and types maps. - * @private - */ - -function populateMaps (extensions, types) { - // source preference (least -> most) - var preference = ['nginx', 'apache', undefined, 'iana'] - - Object.keys(db).forEach(function forEachMimeType (type) { - var mime = db[type] - var exts = mime.extensions - - if (!exts || !exts.length) { - return - } - - // mime -> extensions - extensions[type] = exts - - // extension -> mime - for (var i = 0; i < exts.length; i++) { - var extension = exts[i] - - if (types[extension]) { - var from = preference.indexOf(db[types[extension]].source) - var to = preference.indexOf(mime.source) - - if (types[extension] !== 'application/octet-stream' && - (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { - // skip the remapping - continue - } - } - - // set the extension -> mime - types[extension] = type - } - }) -} diff --git a/node_modules/mime-types/package.json b/node_modules/mime-types/package.json deleted file mode 100644 index 900df07e..00000000 --- a/node_modules/mime-types/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "_from": "mime-types@~2.1", - "_id": "mime-types@2.1.31", - "_inBundle": false, - "_integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", - "_location": "/mime-types", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "mime-types@~2.1", - "name": "mime-types", - "escapedName": "mime-types", - "rawSpec": "~2.1", - "saveSpec": null, - "fetchSpec": "~2.1" - }, - "_requiredBy": [ - "/@antora/content-classifier" - ], - "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", - "_shasum": "a00d76b74317c61f9c2db2218b8e9f8e9c5c9e6b", - "_spec": "mime-types@~2.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/content-classifier", - "bugs": { - "url": "https://github.com/jshttp/mime-types/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Douglas Christopher Wilson", - "email": "doug@somethingdoug.com" - }, - { - "name": "Jeremiah Senkpiel", - "email": "fishrock123@rocketmail.com", - "url": "https://searchbeam.jit.su" - }, - { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - } - ], - "dependencies": { - "mime-db": "1.48.0" - }, - "deprecated": false, - "description": "The ultimate javascript content-type utility.", - "devDependencies": { - "eslint": "7.27.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.23.4", - "eslint-plugin-markdown": "2.2.0", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.1.0", - "eslint-plugin-standard": "4.1.0", - "mocha": "8.4.0", - "nyc": "15.1.0" - }, - "engines": { - "node": ">= 0.6" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "homepage": "https://github.com/jshttp/mime-types#readme", - "keywords": [ - "mime", - "types" - ], - "license": "MIT", - "name": "mime-types", - "repository": { - "type": "git", - "url": "git+https://github.com/jshttp/mime-types.git" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec test/test.js", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - }, - "version": "2.1.31" -} diff --git a/node_modules/mimic-response/index.d.ts b/node_modules/mimic-response/index.d.ts deleted file mode 100644 index 8ff98e22..00000000 --- a/node_modules/mimic-response/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import {IncomingMessage} from 'http'; - -/** -Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage) - -Makes `toStream` include the properties from `fromStream`. - -@param fromStream - The stream to copy the properties from. -@param toStream - The stream to copy the properties to. -@return The same object as `toStream`. -*/ -declare function mimicResponse( - fromStream: IncomingMessage, - toStream: T, -): IncomingMessage & T; - -export = mimicResponse; diff --git a/node_modules/mimic-response/index.js b/node_modules/mimic-response/index.js deleted file mode 100644 index edd0fafa..00000000 --- a/node_modules/mimic-response/index.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -// We define these manually to ensure they're always copied -// even if they would move up the prototype chain -// https://nodejs.org/api/http.html#http_class_http_incomingmessage -const knownProperties = [ - 'aborted', - 'complete', - 'destroy', - 'headers', - 'httpVersion', - 'httpVersionMinor', - 'httpVersionMajor', - 'method', - 'rawHeaders', - 'rawTrailers', - 'setTimeout', - 'socket', - 'statusCode', - 'statusMessage', - 'trailers', - 'url' -]; - -module.exports = (fromStream, toStream) => { - const fromProperties = new Set(Object.keys(fromStream).concat(knownProperties)); - - for (const property of fromProperties) { - // Don't overwrite existing properties. - if (property in toStream) { - continue; - } - - toStream[property] = typeof fromStream[property] === 'function' ? fromStream[property].bind(fromStream) : fromStream[property]; - } - - return toStream; -}; diff --git a/node_modules/mimic-response/license b/node_modules/mimic-response/license deleted file mode 100644 index fa7ceba3..00000000 --- a/node_modules/mimic-response/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mimic-response/package.json b/node_modules/mimic-response/package.json deleted file mode 100644 index 647c553f..00000000 --- a/node_modules/mimic-response/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "mimic-response@^2.0.0", - "_id": "mimic-response@2.1.0", - "_inBundle": false, - "_integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", - "_location": "/mimic-response", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "mimic-response@^2.0.0", - "name": "mimic-response", - "escapedName": "mimic-response", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/decompress-response" - ], - "_resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", - "_shasum": "d13763d35f613d09ec37ebb30bac0469c0ee8f43", - "_spec": "mimic-response@^2.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/decompress-response", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/mimic-response/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Mimic a Node.js HTTP response stream", - "devDependencies": { - "@sindresorhus/tsconfig": "^0.3.0", - "@types/node": "^12.0.0", - "ava": "^1.1.0", - "create-test-server": "^2.4.0", - "pify": "^4.0.1", - "tsd": "^0.7.3", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.d.ts", - "index.js" - ], - "funding": "https://github.com/sponsors/sindresorhus", - "homepage": "https://github.com/sindresorhus/mimic-response#readme", - "keywords": [ - "mimic", - "response", - "stream", - "http", - "https", - "request", - "get", - "core" - ], - "license": "MIT", - "name": "mimic-response", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/mimic-response.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "2.1.0" -} diff --git a/node_modules/mimic-response/readme.md b/node_modules/mimic-response/readme.md deleted file mode 100644 index b7d1ec97..00000000 --- a/node_modules/mimic-response/readme.md +++ /dev/null @@ -1,57 +0,0 @@ -# mimic-response [![Build Status](https://travis-ci.org/sindresorhus/mimic-response.svg?branch=master)](https://travis-ci.org/sindresorhus/mimic-response) - -> Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage) - -## Install - -``` -$ npm install mimic-response -``` - -## Usage - -```js -const stream = require('stream'); -const mimicResponse = require('mimic-response'); - -const responseStream = getHttpResponseStream(); -const myStream = new stream.PassThrough(); - -mimicResponse(responseStream, myStream); - -console.log(myStream.statusCode); -//=> 200 -``` - -## API - -### mimicResponse(from, to) - -#### from - -Type: `Stream` - -[Node.js HTTP response stream.](https://nodejs.org/api/http.html#http_class_http_incomingmessage) - -#### to - -Type: `Stream` - -Any stream. - -## Related - -- [mimic-fn](https://github.com/sindresorhus/mimic-fn) - Make a function mimic another one -- [clone-response](https://github.com/lukechilds/clone-response) - Clone a Node.js response stream - ---- - -
    - - Get professional support for this package with a Tidelift subscription - -
    - - Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. -
    -
    diff --git a/node_modules/minimatch-all/.editorconfig b/node_modules/minimatch-all/.editorconfig deleted file mode 100644 index b5217a1a..00000000 --- a/node_modules/minimatch-all/.editorconfig +++ /dev/null @@ -1,10 +0,0 @@ -# editorconfig.org -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -charset = utf-8 -insert_final_newline = true -trim_trailing_whitespace = true diff --git a/node_modules/minimatch-all/.npmignore b/node_modules/minimatch-all/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/minimatch-all/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/minimatch-all/.travis.yml b/node_modules/minimatch-all/.travis.yml deleted file mode 100644 index 20fd86b6..00000000 --- a/node_modules/minimatch-all/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.10 diff --git a/node_modules/minimatch-all/LICENSE b/node_modules/minimatch-all/LICENSE deleted file mode 100644 index 3d49f812..00000000 --- a/node_modules/minimatch-all/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Josh Johnston - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/node_modules/minimatch-all/README.md b/node_modules/minimatch-all/README.md deleted file mode 100644 index 6f339131..00000000 --- a/node_modules/minimatch-all/README.md +++ /dev/null @@ -1,43 +0,0 @@ -minimatch-all -==== - -[![Build Status](https://secure.travis-ci.org/joshwnj/minimatch-all.png)](http://travis-ci.org/joshwnj/minimatch-all) - -`minimatch` a path against multiple patterns. - -Install ----- - -`npm install minimatch-all` - -Usage ----- - -```js -var minimatchAll = require('minimatch-all'); - -// minimatch options (see for details) -var opts = {}; - -var patterns = [ - // match all js files - '**/*.js', - - // except for js files in the foo/ directory - '!foo/*.js', - - // unless it's foo/bar.js - 'foo/bar.js', -]; - -minimatchAll('foo/foo.js', patterns, opts); -// false - -minimatchAll('foo/bar.js', patterns, opts); -// true -``` - -License ----- - -MIT diff --git a/node_modules/minimatch-all/index.js b/node_modules/minimatch-all/index.js deleted file mode 100644 index 38dea6a1..00000000 --- a/node_modules/minimatch-all/index.js +++ /dev/null @@ -1,16 +0,0 @@ -var minimatch = require('minimatch'); - -module.exports = function minimatchAll (path, patterns, opts) { - var match = false; - - patterns.forEach(function (pattern) { - var isExclusion = pattern[0] === '!'; - - // If we've got a match, only re-test for exclusions. - // if we don't have a match, only re-test for inclusions. - if (match !== isExclusion) { return; } - - match = minimatch(path, pattern, opts); - }); - return match; -}; diff --git a/node_modules/minimatch-all/package.json b/node_modules/minimatch-all/package.json deleted file mode 100644 index 06879269..00000000 --- a/node_modules/minimatch-all/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "_from": "minimatch-all@~1.1", - "_id": "minimatch-all@1.1.0", - "_inBundle": false, - "_integrity": "sha1-QMSWonouEo0Zv3WOdrsBoMcUV4c=", - "_location": "/minimatch-all", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "minimatch-all@~1.1", - "name": "minimatch-all", - "escapedName": "minimatch-all", - "rawSpec": "~1.1", - "saveSpec": null, - "fetchSpec": "~1.1" - }, - "_requiredBy": [ - "/@antora/ui-loader" - ], - "_resolved": "https://registry.npmjs.org/minimatch-all/-/minimatch-all-1.1.0.tgz", - "_shasum": "40c496a27a2e128d19bf758e76bb01a0c7145787", - "_spec": "minimatch-all@~1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/ui-loader", - "author": { - "name": "joshwnj" - }, - "bugs": { - "url": "https://github.com/joshwnj/minimatch-all/issues" - }, - "bundleDependencies": false, - "dependencies": { - "minimatch": "^3.0.2" - }, - "deprecated": false, - "description": "Match a path against multiple patterns", - "devDependencies": { - "tape": "^3.0.0" - }, - "homepage": "https://github.com/joshwnj/minimatch-all", - "keywords": [ - "minimatch" - ], - "license": "MIT", - "main": "index.js", - "name": "minimatch-all", - "repository": { - "type": "git", - "url": "git+https://github.com/joshwnj/minimatch-all.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.1.0" -} diff --git a/node_modules/minimatch-all/test.js b/node_modules/minimatch-all/test.js deleted file mode 100644 index 2027e105..00000000 --- a/node_modules/minimatch-all/test.js +++ /dev/null @@ -1,62 +0,0 @@ -var tape = require('tape'); -var minimatchAll = require('./'); - -tape('Match', function (t) { - var patterns = [ - // match all js files - '**/*.js', - - // except for files in the foo/ directory - '!foo/**', - - // unless it's foo/bar.js - 'foo/bar.js', - ]; - - t.equals( - minimatchAll('foo.js', patterns), - true, - 'Match .js files'); - - t.equals( - minimatchAll('foo/foo.js', patterns), - false, - 'Files in the foo/ directory should be excluded'); - - t.equals( - minimatchAll('foo/bar.js', patterns), - true, - 'foo/bar.js is an exception to the rule'); - - t.end(); -}); - -tape('Multiple exclusions', function (t) { - var patterns = [ - // match all files - '**/*', - - // exclude everything in foo/ - '!**/foo/**', - - // and also exclude everything in bar/ - '!**/bar/**' - ]; - - t.equals( - minimatchAll('important.exe', patterns), - true, - 'Match all files'); - - t.equals( - minimatchAll('foo/one.js', patterns), - false, - 'But exclude files in foo/'); - - t.equals( - minimatchAll('bar/two.js', patterns), - false, - 'And exlude files in bar/ as well'); - - t.end(); -}); diff --git a/node_modules/minimatch/LICENSE b/node_modules/minimatch/LICENSE deleted file mode 100644 index 19129e31..00000000 --- a/node_modules/minimatch/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/minimatch/README.md b/node_modules/minimatch/README.md deleted file mode 100644 index ad72b813..00000000 --- a/node_modules/minimatch/README.md +++ /dev/null @@ -1,209 +0,0 @@ -# minimatch - -A minimal matching utility. - -[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch) - - -This is the matching library used internally by npm. - -It works by converting glob expressions into JavaScript `RegExp` -objects. - -## Usage - -```javascript -var minimatch = require("minimatch") - -minimatch("bar.foo", "*.foo") // true! -minimatch("bar.foo", "*.bar") // false! -minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! -``` - -## Features - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` - -## Minimatch Class - -Create a minimatch object by instantiating the `minimatch.Minimatch` class. - -```javascript -var Minimatch = require("minimatch").Minimatch -var mm = new Minimatch(pattern, options) -``` - -### Properties - -* `pattern` The original pattern the minimatch object represents. -* `options` The options supplied to the constructor. -* `set` A 2-dimensional array of regexp or string expressions. - Each row in the - array corresponds to a brace-expanded pattern. Each item in the row - corresponds to a single path-part. For example, the pattern - `{a,b/c}/d` would expand to a set of patterns like: - - [ [ a, d ] - , [ b, c, d ] ] - - If a portion of the pattern doesn't have any "magic" in it - (that is, it's something like `"foo"` rather than `fo*o?`), then it - will be left as a string rather than converted to a regular - expression. - -* `regexp` Created by the `makeRe` method. A single regular expression - expressing the entire pattern. This is useful in cases where you wish - to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. -* `negate` True if the pattern is negated. -* `comment` True if the pattern is a comment. -* `empty` True if the pattern is `""`. - -### Methods - -* `makeRe` Generate the `regexp` member if necessary, and return it. - Will return `false` if the pattern is invalid. -* `match(fname)` Return true if the filename matches the pattern, or - false otherwise. -* `matchOne(fileArray, patternArray, partial)` Take a `/`-split - filename, and match it against a single row in the `regExpSet`. This - method is mainly for internal use, but is exposed so that it can be - used by a glob-walker that needs to avoid excessive filesystem calls. - -All other methods are internal, and will be called as necessary. - -### minimatch(path, pattern, options) - -Main export. Tests a path against the pattern using the options. - -```javascript -var isJS = minimatch(file, "*.js", { matchBase: true }) -``` - -### minimatch.filter(pattern, options) - -Returns a function that tests its -supplied argument, suitable for use with `Array.filter`. Example: - -```javascript -var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) -``` - -### minimatch.match(list, pattern, options) - -Match against the list of -files, in the style of fnmatch or glob. If nothing is matched, and -options.nonull is set, then return a list containing the pattern itself. - -```javascript -var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) -``` - -### minimatch.makeRe(pattern, options) - -Make a regular expression object from the pattern. - -## Options - -All options are `false` by default. - -### debug - -Dump a ton of stuff to stderr. - -### nobrace - -Do not expand `{a,b}` and `{1..3}` brace sets. - -### noglobstar - -Disable `**` matching against multiple folder names. - -### dot - -Allow patterns to match filenames starting with a period, even if -the pattern does not explicitly have a period in that spot. - -Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` -is set. - -### noext - -Disable "extglob" style patterns like `+(a|b)`. - -### nocase - -Perform a case-insensitive match. - -### nonull - -When a match is not found by `minimatch.match`, return a list containing -the pattern itself if this option is set. When not set, an empty list -is returned if there are no matches. - -### matchBase - -If set, then patterns without slashes will be matched -against the basename of the path if it contains slashes. For example, -`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. - -### nocomment - -Suppress the behavior of treating `#` at the start of a pattern as a -comment. - -### nonegate - -Suppress the behavior of treating a leading `!` character as negation. - -### flipNegate - -Returns from negate expressions the same as if they were not negated. -(Ie, true on a hit, false on a miss.) - - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between minimatch and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then minimatch.match returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. diff --git a/node_modules/minimatch/minimatch.js b/node_modules/minimatch/minimatch.js deleted file mode 100644 index 5b5f8cf4..00000000 --- a/node_modules/minimatch/minimatch.js +++ /dev/null @@ -1,923 +0,0 @@ -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = { sep: '/' } -try { - path = require('path') -} catch (er) {} - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = require('brace-expansion') - -var plTypes = { - '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, - '?': { open: '(?:', close: ')?' }, - '+': { open: '(?:', close: ')+' }, - '*': { open: '(?:', close: ')*' }, - '@': { open: '(?:', close: ')' } -} - -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' - -// * => any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - // "" only matches "" - if (pattern.trim() === '') return p === '' - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - if (typeof pattern === 'undefined') { - throw new TypeError('undefined pattern') - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - if (pattern.length > 1024 * 64) { - throw new TypeError('pattern is too long') - } - - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - case '/': - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - var pl = patternListStack.pop() - // negation is (?:(?!js)[^/]*) - // The others are (?:) - re += pl.close - if (pl.type === '!') { - negativeLists.push(pl) - } - pl.reEnd = re.length - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length) - this.debug('setting tail', re, pl) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail, pl, re) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - try { - var regExp = new RegExp('^' + re + '$', flags) - } catch (er) { - // If it was an invalid regular expression, then it can't match - // anything. This trick looks for a character after the end of - // the string, which is of course impossible, except in multi-line - // mode, but it's not a /m regex. - return new RegExp('$.') - } - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd - } - - // should be unreachable. - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json deleted file mode 100644 index edd65b2a..00000000 --- a/node_modules/minimatch/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "minimatch@^3.0.4", - "_id": "minimatch@3.0.4", - "_inBundle": false, - "_integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "_location": "/minimatch", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "minimatch@^3.0.4", - "name": "minimatch", - "escapedName": "minimatch", - "rawSpec": "^3.0.4", - "saveSpec": null, - "fetchSpec": "^3.0.4" - }, - "_requiredBy": [ - "/glob", - "/minimatch-all" - ], - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "_shasum": "5166e286457f03306064be5497e8dbb0c3d32083", - "_spec": "minimatch@^3.0.4", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/glob", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "bugs": { - "url": "https://github.com/isaacs/minimatch/issues" - }, - "bundleDependencies": false, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "deprecated": false, - "description": "a glob matcher in javascript", - "devDependencies": { - "tap": "^10.3.2" - }, - "engines": { - "node": "*" - }, - "files": [ - "minimatch.js" - ], - "homepage": "https://github.com/isaacs/minimatch#readme", - "license": "ISC", - "main": "minimatch.js", - "name": "minimatch", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "scripts": { - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap test/*.js --cov" - }, - "version": "3.0.4" -} diff --git a/node_modules/minimist/.travis.yml b/node_modules/minimist/.travis.yml deleted file mode 100644 index 74c57bf1..00000000 --- a/node_modules/minimist/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.12" - - "iojs" -before_install: - - npm install -g npm@~1.4.6 diff --git a/node_modules/minimist/LICENSE b/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/minimist/example/parse.js b/node_modules/minimist/example/parse.js deleted file mode 100644 index f7c8d498..00000000 --- a/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,2 +0,0 @@ -var argv = require('../')(process.argv.slice(2)); -console.log(argv); diff --git a/node_modules/minimist/index.js b/node_modules/minimist/index.js deleted file mode 100644 index d2afe5e4..00000000 --- a/node_modules/minimist/index.js +++ /dev/null @@ -1,245 +0,0 @@ -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {}, unknownFn: null }; - - if (typeof opts['unknown'] === 'function') { - flags.unknownFn = opts['unknown']; - } - - if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { - flags.allBools = true; - } else { - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - } - - var aliases = {}; - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - if (aliases[key]) { - flags.strings[aliases[key]] = true; - } - }); - - var defaults = opts['default'] || {}; - - var argv = { _ : [] }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--')+1); - args = args.slice(0, args.indexOf('--')); - } - - function argDefined(key, arg) { - return (flags.allBools && /^--[^=]+$/.test(arg)) || - flags.strings[key] || flags.bools[key] || aliases[key]; - } - - function setArg (key, val, arg) { - if (arg && flags.unknownFn && !argDefined(key, arg)) { - if (flags.unknownFn(arg) === false) return; - } - - var value = !flags.strings[key] && isNumber(val) - ? Number(val) : val - ; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - function setKey (obj, keys, value) { - var o = obj; - for (var i = 0; i < keys.length-1; i++) { - var key = keys[i]; - if (key === '__proto__') return; - if (o[key] === undefined) o[key] = {}; - if (o[key] === Object.prototype || o[key] === Number.prototype - || o[key] === String.prototype) o[key] = {}; - if (o[key] === Array.prototype) o[key] = []; - o = o[key]; - } - - var key = keys[keys.length - 1]; - if (key === '__proto__') return; - if (o === Object.prototype || o === Number.prototype - || o === String.prototype) o = {}; - if (o === Array.prototype) o = []; - if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } - } - - function aliasIsBoolean(key) { - return aliases[key].some(function (x) { - return flags.bools[x]; - }); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (/^--.+=/.test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - var key = m[1]; - var value = m[2]; - if (flags.bools[key]) { - value = value !== 'false'; - } - setArg(key, value, arg); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false, arg); - } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && !flags.allBools - && (aliases[key] ? !aliasIsBoolean(key) : true)) { - setArg(key, next, arg); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true', arg); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } - else if (/^-[^-]+/.test(arg)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - var next = arg.slice(j+2); - - if (next === '-') { - setArg(letters[j], next, arg) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) { - setArg(letters[j], next.split('=')[1], arg); - broken = true; - break; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next, arg); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2), arg); - broken = true; - break; - } - else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); - } - } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !aliasIsBoolean(key) : true)) { - setArg(key, args[i+1], arg); - i++; - } - else if (args[i+1] && /^(true|false)$/.test(args[i+1])) { - setArg(key, args[i+1] === 'true', arg); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } - } - else { - if (!flags.unknownFn || flags.unknownFn(arg) !== false) { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - if (opts.stopEarly) { - argv._.push.apply(argv._, args.slice(i + 1)); - break; - } - } - } - - Object.keys(defaults).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) { - setKey(argv, key.split('.'), defaults[key]); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[key]); - }); - } - }); - - if (opts['--']) { - argv['--'] = new Array(); - notFlags.forEach(function(key) { - argv['--'].push(key); - }); - } - else { - notFlags.forEach(function(key) { - argv._.push(key); - }); - } - - return argv; -}; - -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function isNumber (x) { - if (typeof x === 'number') return true; - if (/^0x[0-9a-f]+$/i.test(x)) return true; - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - diff --git a/node_modules/minimist/package.json b/node_modules/minimist/package.json deleted file mode 100644 index dff4e1b7..00000000 --- a/node_modules/minimist/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_from": "minimist@^1.2.5", - "_id": "minimist@1.2.5", - "_inBundle": false, - "_integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "_location": "/minimist", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "minimist@^1.2.5", - "name": "minimist", - "escapedName": "minimist", - "rawSpec": "^1.2.5", - "saveSpec": null, - "fetchSpec": "^1.2.5" - }, - "_requiredBy": [ - "/handlebars", - "/json5", - "/minimisted" - ], - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "_shasum": "67d66014b66a6a8aaa0c083c5fd58df4e4e97602", - "_spec": "minimist@^1.2.5", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/json5", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "parse argument options", - "devDependencies": { - "covert": "^1.0.0", - "tap": "~0.4.0", - "tape": "^3.5.0" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "license": "MIT", - "main": "index.js", - "name": "minimist", - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "test": "tap test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "version": "1.2.5" -} diff --git a/node_modules/minimist/readme.markdown b/node_modules/minimist/readme.markdown deleted file mode 100644 index 5fd97ab1..00000000 --- a/node_modules/minimist/readme.markdown +++ /dev/null @@ -1,95 +0,0 @@ -# minimist - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.log(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ _: [ 'foo', 'bar', 'baz' ], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' } -``` - -# security - -Previous versions had a prototype pollution bug that could cause privilege -escalation in some circumstances when handling untrusted user input. - -Please use version 1.2.3 or later: https://snyk.io/vuln/SNYK-JS-MINIMIST-559764 - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a boolean, string or array of strings to always treat as -booleans. if `true` will treat all double hyphenated arguments without equal signs -as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values -* `opts.stopEarly` - when true, populate `argv._` with everything after the -first non-option -* `opts['--']` - when true, populate `argv._` with everything before the `--` -and `argv['--']` with everything after the `--`. Here's an example: - - ``` - > require('./')('one two three -- four five --six'.split(' '), { '--': true }) - { _: [ 'one', 'two', 'three' ], - '--': [ 'four', 'five', '--six' ] } - ``` - - Note that with `opts['--']` set, parsing for arguments still stops after the - `--`. - -* `opts.unknown` - a function which is invoked with a command line parameter not -defined in the `opts` configuration object. If the function returns `false`, the -unknown option is not added to `argv`. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT diff --git a/node_modules/minimist/test/all_bool.js b/node_modules/minimist/test/all_bool.js deleted file mode 100644 index ac835483..00000000 --- a/node_modules/minimist/test/all_bool.js +++ /dev/null @@ -1,32 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('flag boolean true (default all --args to boolean)', function (t) { - var argv = parse(['moo', '--honk', 'cow'], { - boolean: true - }); - - t.deepEqual(argv, { - honk: true, - _: ['moo', 'cow'] - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); -}); - -test('flag boolean true only affects double hyphen arguments without equals signs', function (t) { - var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { - boolean: true - }); - - t.deepEqual(argv, { - honk: true, - tacos: 'good', - p: 55, - _: ['moo', 'cow'] - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); -}); diff --git a/node_modules/minimist/test/bool.js b/node_modules/minimist/test/bool.js deleted file mode 100644 index 5f7dbde1..00000000 --- a/node_modules/minimist/test/bool.js +++ /dev/null @@ -1,178 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false } - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { - boolean: ['x','y','z'] - }); - - t.deepEqual(argv, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ] - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - alias: { 'h': 'herp' }, - boolean: 'herp' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias array with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var alt = [ '--harp', 'derp' ]; - var opts = { - alias: { 'h': ['herp', 'harp'] }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var altPropertyArgv = parse(alt, opts); - var expected = { - harp: true, - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.same(altPropertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); - -test('boolean --boool=true', function (t) { - var parsed = parse(['--boool=true'], { - default: { - boool: false - }, - boolean: ['boool'] - }); - - t.same(parsed.boool, true); - t.end(); -}); - -test('boolean --boool=false', function (t) { - var parsed = parse(['--boool=false'], { - default: { - boool: true - }, - boolean: ['boool'] - }); - - t.same(parsed.boool, false); - t.end(); -}); - -test('boolean using something similar to true', function (t) { - var opts = { boolean: 'h' }; - var result = parse(['-h', 'true.txt'], opts); - var expected = { - h: true, - '_': ['true.txt'] - }; - - t.same(result, expected); - t.end(); -}); \ No newline at end of file diff --git a/node_modules/minimist/test/dash.js b/node_modules/minimist/test/dash.js deleted file mode 100644 index 5a4fa5be..00000000 --- a/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,31 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(5); - t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); - t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); - t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); - t.deepEqual( - parse([ '-b', '-' ], { boolean: 'b' }), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - parse([ '-s', '-' ], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(3); - t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); -}); - -test('move arguments after the -- into their own `--` array', function(t) { - t.plan(1); - t.deepEqual( - parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }), - { name: 'John', _: [ 'before' ], '--': [ 'after' ] }); -}); diff --git a/node_modules/minimist/test/default_bool.js b/node_modules/minimist/test/default_bool.js deleted file mode 100644 index 780a3112..00000000 --- a/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,35 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true } - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false } - }); - t.equal(argv.somefalse, false); - t.end(); -}); - -test('boolean default to null', function (t) { - var argv = parse([], { - boolean: 'maybe', - default: { maybe: null } - }); - t.equal(argv.maybe, null); - var argv = parse(['--maybe'], { - boolean: 'maybe', - default: { maybe: null } - }); - t.equal(argv.maybe, true); - t.end(); - -}) diff --git a/node_modules/minimist/test/dotted.js b/node_modules/minimist/test/dotted.js deleted file mode 100644 index d8b3e856..00000000 --- a/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,22 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); - -test('dotted default with no alias', function (t) { - var argv = parse('', {default: {'a.b': 11}}); - t.equal(argv.a.b, 11); - t.end(); -}); diff --git a/node_modules/minimist/test/kv_short.js b/node_modules/minimist/test/kv_short.js deleted file mode 100644 index f813b305..00000000 --- a/node_modules/minimist/test/kv_short.js +++ /dev/null @@ -1,16 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('short -k=v' , function (t) { - t.plan(1); - - var argv = parse([ '-b=123' ]); - t.deepEqual(argv, { b: 123, _: [] }); -}); - -test('multi short -k=v' , function (t) { - t.plan(1); - - var argv = parse([ '-a=whatever', '-b=robots' ]); - t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] }); -}); diff --git a/node_modules/minimist/test/long.js b/node_modules/minimist/test/long.js deleted file mode 100644 index 5d3a1e09..00000000 --- a/node_modules/minimist/test/long.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse([ '--bool' ]), - { bool : true, _ : [] }, - 'long boolean' - ); - t.deepEqual( - parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture sp' - ); - t.deepEqual( - parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture eq' - ); - t.deepEqual( - parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures sp' - ); - t.deepEqual( - parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/node_modules/minimist/test/num.js b/node_modules/minimist/test/num.js deleted file mode 100644 index 2cc77f4d..00000000 --- a/node_modules/minimist/test/num.js +++ /dev/null @@ -1,36 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789' - ]); - t.deepEqual(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ] - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - -test('already a number', function (t) { - var argv = parse([ '-x', 1234, 789 ]); - t.deepEqual(argv, { x : 1234, _ : [ 789 ] }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); diff --git a/node_modules/minimist/test/parse.js b/node_modules/minimist/test/parse.js deleted file mode 100644 index 7b4a2a17..00000000 --- a/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,197 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse([ '--no-moo' ]), - { moo : false, _ : [] }, - 'no' - ); - t.deepEqual( - parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ] - } - ); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse([ '-t', 'moo' ], { boolean: 't' }); - t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: [ 't', 'verbose' ], - default: { verbose: true } - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = parse([ '-s', "X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse([ "--s=X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - t.end(); -}); - -test('strings' , function (t) { - var s = parse([ '-s', '0001234' ], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse([ '-x', '56' ], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([ ' ', ' ' ], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('empty strings', function(t) { - var s = parse([ '-s' ], { string: 's' }).s; - t.equal(s, ''); - t.equal(typeof s, 'string'); - - var str = parse([ '--str' ], { string: 'str' }).str; - t.equal(str, ''); - t.equal(typeof str, 'string'); - - var letters = parse([ '-art' ], { - string: [ 'a', 't' ] - }); - - t.equal(letters.a, ''); - t.equal(letters.r, true); - t.equal(letters.t, ''); - - t.end(); -}); - - -test('string and alias', function(t) { - var x = parse([ '--str', '000123' ], { - string: 's', - alias: { s: 'str' } - }); - - t.equal(x.str, '000123'); - t.equal(typeof x.str, 'string'); - t.equal(x.s, '000123'); - t.equal(typeof x.s, 'string'); - - var y = parse([ '-s', '000123' ], { - string: 'str', - alias: { str: 's' } - }); - - t.equal(y.str, '000123'); - t.equal(typeof y.str, 'string'); - t.equal(y.s, '000123'); - t.equal(typeof y.s, 'string'); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [] } - ); - t.same( - parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: 'zoom' } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: [ 'zm', 'zoom' ] } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]); - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - } - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); diff --git a/node_modules/minimist/test/parse_modified.js b/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index ab620dc5..00000000 --- a/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,9 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: [123] }); -}); diff --git a/node_modules/minimist/test/proto.js b/node_modules/minimist/test/proto.js deleted file mode 100644 index 8649107e..00000000 --- a/node_modules/minimist/test/proto.js +++ /dev/null @@ -1,44 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('proto pollution', function (t) { - var argv = parse(['--__proto__.x','123']); - t.equal({}.x, undefined); - t.equal(argv.__proto__.x, undefined); - t.equal(argv.x, undefined); - t.end(); -}); - -test('proto pollution (array)', function (t) { - var argv = parse(['--x','4','--x','5','--x.__proto__.z','789']); - t.equal({}.z, undefined); - t.deepEqual(argv.x, [4,5]); - t.equal(argv.x.z, undefined); - t.equal(argv.x.__proto__.z, undefined); - t.end(); -}); - -test('proto pollution (number)', function (t) { - var argv = parse(['--x','5','--x.__proto__.z','100']); - t.equal({}.z, undefined); - t.equal((4).z, undefined); - t.equal(argv.x, 5); - t.equal(argv.x.z, undefined); - t.end(); -}); - -test('proto pollution (string)', function (t) { - var argv = parse(['--x','abc','--x.__proto__.z','def']); - t.equal({}.z, undefined); - t.equal('...'.z, undefined); - t.equal(argv.x, 'abc'); - t.equal(argv.x.z, undefined); - t.end(); -}); - -test('proto pollution (constructor)', function (t) { - var argv = parse(['--constructor.prototype.y','123']); - t.equal({}.y, undefined); - t.equal(argv.y, undefined); - t.end(); -}); diff --git a/node_modules/minimist/test/short.js b/node_modules/minimist/test/short.js deleted file mode 100644 index d513a1c2..00000000 --- a/node_modules/minimist/test/short.js +++ /dev/null @@ -1,67 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); - t.deepEqual( - parse([ '-123', '456' ]), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse([ '-b' ]), - { b : true, _ : [] }, - 'short boolean' - ); - t.deepEqual( - parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ] }, - 'bare' - ); - t.deepEqual( - parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [] }, - 'group' - ); - t.deepEqual( - parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [] }, - 'short group next' - ); - t.deepEqual( - parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [] }, - 'short capture' - ); - t.deepEqual( - parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); diff --git a/node_modules/minimist/test/stop_early.js b/node_modules/minimist/test/stop_early.js deleted file mode 100644 index bdf9fbcb..00000000 --- a/node_modules/minimist/test/stop_early.js +++ /dev/null @@ -1,15 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('stops parsing on the first non-option when stopEarly is set', function (t) { - var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { - stopEarly: true - }); - - t.deepEqual(argv, { - aaa: 'bbb', - _: ['ccc', '--ddd'] - }); - - t.end(); -}); diff --git a/node_modules/minimist/test/unknown.js b/node_modules/minimist/test/unknown.js deleted file mode 100644 index 462a36bd..00000000 --- a/node_modules/minimist/test/unknown.js +++ /dev/null @@ -1,102 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('boolean and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'true', '--derp', 'true' ]; - var regular = [ '--herp', 'true', '-d', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h', - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - - t.same(unknown, ['--derp', '-d']); - t.end(); -}); - -test('flag boolean true any double hyphen argument is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { - boolean: true, - unknown: unknownFn - }); - t.same(unknown, ['--tacos=good', 'cow', '-p']); - t.same(argv, { - honk: true, - _: [] - }); - t.end(); -}); - -test('string and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'hello', '--derp', 'goodbye' ]; - var regular = [ '--herp', 'hello', '-d', 'moon' ]; - var opts = { - alias: { h: 'herp' }, - string: 'h', - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - - t.same(unknown, ['--derp', '-d']); - t.end(); -}); - -test('default and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'hello' ]; - var regular = [ '--herp', 'hello' ]; - var opts = { - default: { 'h': 'bar' }, - alias: { 'h': 'herp' }, - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - - t.same(unknown, []); - t.end(); - unknownFn(); // exercise fn for 100% coverage -}); - -test('value following -- is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '--bad', '--', 'good', 'arg' ]; - var opts = { - '--': true, - unknown: unknownFn - }; - var argv = parse(aliased, opts); - - t.same(unknown, ['--bad']); - t.same(argv, { - '--': ['good', 'arg'], - '_': [] - }) - t.end(); -}); diff --git a/node_modules/minimist/test/whitespace.js b/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 8a52a58c..00000000 --- a/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/node_modules/minimisted/.bmp.yml b/node_modules/minimisted/.bmp.yml deleted file mode 100644 index 6797786a..00000000 --- a/node_modules/minimisted/.bmp.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -version: 2.0.1 -commit: ":up: chore(version): bmp to v%.%.%" -files: - README.md: v%.%.% - package.json: '"version": "%.%.%"' diff --git a/node_modules/minimisted/.editorconfig b/node_modules/minimisted/.editorconfig deleted file mode 100644 index fab4d419..00000000 --- a/node_modules/minimisted/.editorconfig +++ /dev/null @@ -1,6 +0,0 @@ -root=true -[*] -indent_style=space -indent_size=2 -trim_trailing_whitespace=true -insert_final_newline=true diff --git a/node_modules/minimisted/.github/workflows/ci.yml b/node_modules/minimisted/.github/workflows/ci.yml deleted file mode 100644 index 874b889c..00000000 --- a/node_modules/minimisted/.github/workflows/ci.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: CI -on: [push, pull_request] -jobs: - ci: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: '12' - - run: yarn - - run: yarn cov - - uses: codecov/codecov-action@v1 diff --git a/node_modules/minimisted/README.md b/node_modules/minimisted/README.md deleted file mode 100644 index 7deabf4f..00000000 --- a/node_modules/minimisted/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# minimisted v2.0.1 - -![CI](https://github.com/kt3k/minimisted/workflows/CI/badge.svg) -[![codecov](https://codecov.io/gh/kt3k/minimisted/branch/master/graph/badge.svg)](https://codecov.io/gh/kt3k/minimisted) -[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/) - -> A handy wrapper of `minimist` - -# Install - - npm install minimisted - -# Usage - -You can write your cli like the following: - -```js -// Your cli's entry point -const main = (argv) => { -} - -require('minimisted')(main) -``` - -where `argv` is the command line options parsed by `minimist` i.e. `minimist(process.argv.slice(2))`. - -Using object destructuring syntax, you can write it like the following: - -```js -/** - * @param {boolean} help Shows help message if true - * @param {boolean} version Shows the version if true - * ... - * @param {string[]} _ The parameters - */ -const main = ({ help, version, _ }) => { -} - -require('minimisted')(main) -``` - -# API - -```js -const minimisted = require('minimisted') -``` - -## minimisted(main[, opts[, argv]]) - -- @param {Function} main The main function -- @param {Object} opts The option which is passed to minimist's 2rd arguments -- @param {string} argv The command line arguments. Default is `process.argv.slice(2)`. - -This calls `main` with command line options parsed by the minimist with the given options. - -# License - -MIT diff --git a/node_modules/minimisted/index.js b/node_modules/minimisted/index.js deleted file mode 100644 index aab5aa0b..00000000 --- a/node_modules/minimisted/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict' - -/** - * Calls the given function with the minimist-parsed command line options and exit the process with the returned number of the main function. - * @param {Function} main The main function of the cli - * @param {Object} opts The options - * @param {string[]} argv The command line arguments. Default is process.argv.slice(2). - */ -module.exports = (main, opts, argv) => { - argv = argv || process.argv.slice(2) - - return main(require('minimist')(argv, opts)) -} diff --git a/node_modules/minimisted/package.json b/node_modules/minimisted/package.json deleted file mode 100644 index 302a61b3..00000000 --- a/node_modules/minimisted/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_from": "minimisted@^2.0.0", - "_id": "minimisted@2.0.1", - "_inBundle": false, - "_integrity": "sha512-1oPjfuLQa2caorJUM8HV8lGgWCc0qqAO1MNv/k05G4qslmsndV/5WdNZrqCiyqiz3wohia2Ij2B7w2Dr7/IyrA==", - "_location": "/minimisted", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "minimisted@^2.0.0", - "name": "minimisted", - "escapedName": "minimisted", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/isomorphic-git" - ], - "_resolved": "https://registry.npmjs.org/minimisted/-/minimisted-2.0.1.tgz", - "_shasum": "d059fb905beecf0774bc3b308468699709805cb1", - "_spec": "minimisted@^2.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/isomorphic-git", - "author": { - "name": "Yoshiya Hinosawa", - "email": "stibium121@gmail.com", - "url": "https://twitter.com/kt3k" - }, - "bugs": { - "url": "https://github.com/kt3k/minimisted/issues" - }, - "bundleDependencies": false, - "dependencies": { - "minimist": "^1.2.5" - }, - "deprecated": false, - "description": "Handy wrapper of `minimist`", - "devDependencies": { - "nyc": "^11.0.1", - "standard": "^10.0.0" - }, - "homepage": "https://github.com/kt3k/minimisted#readme", - "keywords": [ - "minimist", - "cli" - ], - "license": "MIT", - "main": "index.js", - "name": "minimisted", - "repository": { - "type": "git", - "url": "git+https://github.com/kt3k/minimisted.git" - }, - "scripts": { - "cov": "nyc --reporter=lcov npm test", - "lint": "standard", - "test": "node test.js" - }, - "version": "2.0.1" -} diff --git a/node_modules/minimisted/test.js b/node_modules/minimisted/test.js deleted file mode 100644 index ef39aa57..00000000 --- a/node_modules/minimisted/test.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict' - -const assert = require('assert') - -const result = require('./')(argv => { - assert.strictEqual(argv.foo, '1') - assert.strictEqual(argv.bar, 'baz') - assert.strictEqual(argv.qux, true) - assert.deepStrictEqual(argv._, ['quux']) - - return 123 -}, { string: ['foo'], boolean: ['qux'] }, ['--foo', '1', '--bar', 'baz', '--qux', 'quux']) - -assert.strictEqual(result, 123) - -console.log('test ok!') diff --git a/node_modules/mri/lib/index.js b/node_modules/mri/lib/index.js deleted file mode 100644 index 3a9e1c68..00000000 --- a/node_modules/mri/lib/index.js +++ /dev/null @@ -1,111 +0,0 @@ -function toArr(any) { - return any == null ? [] : Array.isArray(any) ? any : [any]; -} - -function toVal(out, key, val, opts) { - var x, old=out[key], nxt=( - !!~opts.string.indexOf(key) ? (val == null || val === true ? '' : String(val)) - : typeof val === 'boolean' ? val - : !!~opts.boolean.indexOf(key) ? (val === 'false' ? false : val === 'true' || (out._.push((x = +val,x * 0 === 0) ? x : val),!!val)) - : (x = +val,x * 0 === 0) ? x : val - ); - out[key] = old == null ? nxt : (Array.isArray(old) ? old.concat(nxt) : [old, nxt]); -} - -module.exports = function (args, opts) { - args = args || []; - opts = opts || {}; - - var k, arr, arg, name, val, out={ _:[] }; - var i=0, j=0, idx=0, len=args.length; - - const alibi = opts.alias !== void 0; - const strict = opts.unknown !== void 0; - const defaults = opts.default !== void 0; - - opts.alias = opts.alias || {}; - opts.string = toArr(opts.string); - opts.boolean = toArr(opts.boolean); - - if (alibi) { - for (k in opts.alias) { - arr = opts.alias[k] = toArr(opts.alias[k]); - for (i=0; i < arr.length; i++) { - (opts.alias[arr[i]] = arr.concat(k)).splice(i, 1); - } - } - } - - opts.boolean.forEach(key => { - opts.boolean = opts.boolean.concat(opts.alias[key] = opts.alias[key] || []); - }); - - opts.string.forEach(key => { - opts.string = opts.string.concat(opts.alias[key] = opts.alias[key] || []); - }); - - if (defaults) { - for (k in opts.default) { - opts.alias[k] = opts.alias[k] || []; - (opts[typeof opts.default[k]] || []).push(k); - } - } - - const keys = strict ? Object.keys(opts.alias) : []; - - for (i=0; i < len; i++) { - arg = args[i]; - - if (arg === '--') { - out._ = out._.concat(args.slice(++i)); - break; - } - - for (j=0; j < arg.length; j++) { - if (arg.charCodeAt(j) !== 45) break; // "-" - } - - if (j === 0) { - out._.push(arg); - } else if (arg.substring(j, j + 3) === 'no-') { - name = arg.substring(j + 3); - if (strict && !~keys.indexOf(name)) { - return opts.unknown(arg); - } - out[name] = false; - } else { - for (idx=j+1; idx < arg.length; idx++) { - if (arg.charCodeAt(idx) === 61) break; // "=" - } - - name = arg.substring(j, idx); - val = arg.substring(++idx) || (i+1 === len || (''+args[i+1]).charCodeAt(0) === 45 || args[++i]); - arr = (j === 2 ? [name] : name); - - for (idx=0; idx < arr.length; idx++) { - name = arr[idx]; - if (strict && !~keys.indexOf(name)) return opts.unknown('-'.repeat(j) + name); - toVal(out, name, (idx + 1 < arr.length) || val, opts); - } - } - } - - if (defaults) { - for (k in opts.default) { - if (out[k] === void 0) { - out[k] = opts.default[k]; - } - } - } - - if (alibi) { - for (k in out) { - arr = opts.alias[k] || []; - while (arr.length > 0) { - out[arr.shift()] = out[k]; - } - } - } - - return out; -} diff --git a/node_modules/mri/license.md b/node_modules/mri/license.md deleted file mode 100644 index a3f96f82..00000000 --- a/node_modules/mri/license.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Luke Edwards (lukeed.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/mri/package.json b/node_modules/mri/package.json deleted file mode 100644 index 261858fc..00000000 --- a/node_modules/mri/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "mri@1.1.4", - "_id": "mri@1.1.4", - "_inBundle": false, - "_integrity": "sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==", - "_location": "/mri", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "mri@1.1.4", - "name": "mri", - "escapedName": "mri", - "rawSpec": "1.1.4", - "saveSpec": null, - "fetchSpec": "1.1.4" - }, - "_requiredBy": [ - "/args" - ], - "_resolved": "https://registry.npmjs.org/mri/-/mri-1.1.4.tgz", - "_shasum": "7cb1dd1b9b40905f1fac053abe25b6720f44744a", - "_spec": "mri@1.1.4", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/args", - "author": { - "name": "Luke Edwards", - "email": "luke.edwards05@gmail.com", - "url": "lukeed.com" - }, - "bugs": { - "url": "https://github.com/lukeed/mri/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Quickly scan for CLI flags and arguments", - "devDependencies": { - "tap-spec": "^4.1.1", - "tape": "^4.6.3" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/lukeed/mri#readme", - "keywords": [ - "argv", - "arguments", - "cli", - "minimist", - "options", - "optimist", - "parser", - "args" - ], - "license": "MIT", - "main": "lib/index.js", - "name": "mri", - "repository": { - "type": "git", - "url": "git+https://github.com/lukeed/mri.git" - }, - "scripts": { - "bench": "node bench", - "test": "tape test/*.js | tap-spec" - }, - "version": "1.1.4" -} diff --git a/node_modules/mri/readme.md b/node_modules/mri/readme.md deleted file mode 100644 index d9cccb64..00000000 --- a/node_modules/mri/readme.md +++ /dev/null @@ -1,159 +0,0 @@ -# mri [![Build Status](https://travis-ci.org/lukeed/mri.svg?branch=master)](https://travis-ci.org/lukeed/mri) - -> Quickly scan for CLI flags and arguments - -This is a [fast](#benchmarks) and lightweight alternative to [`minimist`](https://github.com/substack/minimist) and [`yargs-parser`](https://github.com/yargs/yargs-parser). - -It only exists because I find that I usually don't need most of what `minimist` and `yargs-parser` have to offer. However, `mri` is similar _enough_ that it might function as a "drop-in replacement" for you, too! - -See [Comparisons](#comparisons) for more info. - -## Install - -```sh -$ npm install --save mri -``` - -## Usage - -```sh -$ demo-cli --foo --bar=baz -mtv -- hello world -``` - -```js -const mri = require('mri'); - -const argv = process.argv.slice(2); - -mri(argv); -//=> { _: ['hello', 'world'], foo:true, bar:'baz', m:true, t:true, v:true } - -mri(argv, { boolean:['bar'] }); -//=> { _: ['baz', 'hello', 'world'], foo:true, bar:true, m:true, t:true, v:true } - -mri(argv, { - alias: { - b: 'bar', - foo: ['f', 'fuz'] - } -}); -//=> { _: ['hello', 'world'], foo:true, f:true, fuz:true, b:'baz', bar:'baz', m:true, t:true, v:true } -``` - -## API - -### mri(args, options) -Return: `Object` - -#### args -Type: `Array`
    -Default: `[]` - -An array of arguments to parse. For CLI usage, send `process.argv.slice(2)`. See [`process.argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) for info. - -#### options.alias -Type: `Object`
    -Default: `{}` - -An object of keys whose values are `String`s or `Array` of aliases. These will be added to the parsed output with matching values. - -#### options.boolean -Type: `Array|String`
    -Default: `[]` - -A single key (or array of keys) that should be parsed as `Boolean`s. - -#### options.default -Type: `Object`
    -Default: `{}` - -An `key:value` object of defaults. If a default is provided for a key, its type (`typeof`) will be used to cast parsed arguments. - -```js -mri(['--foo', 'bar']); -//=> { _:[], foo:'bar' } - -mri(['--foo', 'bar'], { - default: { foo:true, baz:'hello', bat:42 } -}); -//=> { _:['bar'], foo:true, baz:'hello', bat:42 } -``` - -> **Note:** Because `--foo` has a default of `true`, its output is cast to a Boolean. This means that `foo=true`, making `'bar'` an extra argument (`_` key). - -#### options.string -Type: `Array|String`
    -Default: `[]` - -A single key (or array of keys) that should be parsed as `String`s. - -#### options.unknown -Type: `Function`
    -Default: `undefined` - -Callback that is run when a parsed flag has not been defined as a known key or alias. Its only parameter is the unknown flag itself; eg `--foobar` or `-f`. - -Once an unknown flag is encountered, parsing will terminate, regardless of your return value. - -> **Note:** `mri` _only_ checks for unknown flags if `options.unknown` **and** `options.alias` are populated. Otherwise, everything will be accepted. - - -## Comparisons - -#### minimist - -- `mri` is 5x faster (see [benchmarks](#benchmarks)) -- Numerical values are cast as `Number`s when possible - - A key (and its aliases) will always honor `opts.boolean` or `opts.string` -- Short flag groups are treated as `Boolean`s by default: - ```js - minimist(['-abc', 'hello']); - //=> { _:[], a:'', b:'', c:'hello' } - - mri(['-abc', 'hello']); - //=> { _:[], a:true, b:true, c:'hello' } - ``` -- The `opts.unknown` behaves differently: - - Unlike `minimist`, `mri` will not continue continue parsing after encountering an unknown flag -- Missing `options`: - - `opts.stopEarly` - - `opts['--']` -- Ignores newlines (`\n`) within args (see [test](https://github.com/substack/minimist/blob/master/test/parse.js#L69-L80)) -- Ignores slashBreaks within args (see [test](https://github.com/substack/minimist/blob/master/test/parse.js#L147-L157)) -- Ignores dot-nested flags (see [test](https://github.com/substack/minimist/blob/master/test/parse.js#L180-L197)) - -#### yargs-parser - -- `mri` is 40x faster (see [benchmarks](#benchmarks)) -- Numerical values are cast as `Number`s when possible - - A key (and its aliases) will always honor `opts.boolean` or `opts.string` -- Missing `options`: - - `opts.array` - - `opts.config` - - `opts.coerce` - - `opts.count` - - `opts.envPrefix` - - `opts.narg` - - `opts.normalize` - - `opts.configuration` - - `opts.number` - - `opts['--']` -- Missing [`parser.detailed()`](https://github.com/yargs/yargs-parser#requireyargs-parserdetailedargs-opts) method -- No [additional configuration](https://github.com/yargs/yargs-parser#configuration) object -- Added [`options.unknown`](#optionsunknown) feature - - -## Benchmarks - -``` -# Node v10.13.0 - -minimist x 324,469 ops/sec ±1.20% (96 runs sampled) -mri x 1,611,167 ops/sec ±0.22% (96 runs sampled) -nopt x 920,029 ops/sec ±1.13% (97 runs sampled) -yargs-parser x 39,542 ops/sec ±1.14% (95 runs sampled) -``` - -## License - -MIT © [Luke Edwards](https://lukeed.com) diff --git a/node_modules/multi-progress/.gitattributes b/node_modules/multi-progress/.gitattributes deleted file mode 100644 index bdb0cabc..00000000 --- a/node_modules/multi-progress/.gitattributes +++ /dev/null @@ -1,17 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto - -# Custom for Visual Studio -*.cs diff=csharp - -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain diff --git a/node_modules/multi-progress/CHANGELOG.md b/node_modules/multi-progress/CHANGELOG.md deleted file mode 100644 index 4fecb3d4..00000000 --- a/node_modules/multi-progress/CHANGELOG.md +++ /dev/null @@ -1,56 +0,0 @@ - - -## Version 4.0.0 (2020-10-14) - -API changed back to work like v1/v2, no longer having the user pass in Progress to a builder. - -Progress is still a peer dependency like with v3, so that users can pick the exact version of progress they wish to use. - -## Version 3.0.0 (2020-06-08) - -Changed to work by passing through Progress like so: - -```js -var Progress = require('progress'); -var MultiProgrss = require('multi-progress')(Progress); - -// spawn an instance with the optional stream to write to -var multi = new Multiprogress(process.stderr); - -// create a progress bar -var bar = multi.newBar(' downloading [:bar] :percent :etas', { - complete: '=', - incomplete: ' ', - width: 30, - total: size -}); - -// `bar` is an instance of ProgressBar -// Use the progressbar API with it -``` - -`progress@2` is now a peer dependency. - -## Version 2.0.0 (2016-06) - -Do nothing if input stream is not a TTY console. - -## Version 1.0.0 (2015-08) - -Initial release \ No newline at end of file diff --git a/node_modules/multi-progress/LICENSE.txt b/node_modules/multi-progress/LICENSE.txt deleted file mode 100644 index 9781d1fc..00000000 --- a/node_modules/multi-progress/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Everton Ribeiro and Peter Jaszkowiak - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/multi-progress/multi-progress.js b/node_modules/multi-progress/multi-progress.js deleted file mode 100644 index 3d142e14..00000000 --- a/node_modules/multi-progress/multi-progress.js +++ /dev/null @@ -1,98 +0,0 @@ -// from https://gist.github.com/nuxlli/b425344b92ac1ff99c74 -// with some modifications & additions - -const Progress = require('progress'); - -const mockBar = { - tick() {}, - terminate() {}, - update() {}, - render() {}, -}; - -const mockInstance = { - newBar() { - return mockBar; - }, - terminate() {}, - move() {}, - tick() {}, - update() {}, - isTTY: false, -}; - -module.exports = class MultiProgress { - constructor(stream) { - this.stream = stream || process.stderr; - this.isTTY = this.stream.isTTY; - - if (!this.isTTY) { - return mockInstance; - } - - this.cursor = 0; - this.bars = []; - this.terminates = 0; - - return this; - } - - newBar(schema, options) { - options.stream = this.stream; - var bar = new Progress(schema, options); - this.bars.push(bar); - var index = this.bars.length - 1; - - // alloc line - this.move(index); - this.stream.write('\n'); - this.cursor += 1; - - // replace original - var self = this; - bar.otick = bar.tick; - bar.oterminate = bar.terminate; - bar.oupdate = bar.update; - bar.tick = function(value, options) { - self.tick(index, value, options); - }; - bar.terminate = function() { - self.terminates += 1; - if (self.terminates === self.bars.length) { - self.terminate(); - } - }; - bar.update = function(value, options){ - self.update(index, value, options); - }; - - return bar; - } - - terminate() { - this.move(this.bars.length); - this.stream.clearLine(); - this.stream.cursorTo(0); - } - - move(index) { - this.stream.moveCursor(0, index - this.cursor); - this.cursor = index; - } - - tick(index, value, options) { - const bar = this.bars[index]; - if (bar) { - this.move(index); - bar.otick(value, options); - } - } - - update(index, value, options) { - const bar = this.bars[index]; - if (bar) { - this.move(index); - bar.oupdate(value, options); - } - } -} diff --git a/node_modules/multi-progress/package.json b/node_modules/multi-progress/package.json deleted file mode 100644 index 9f6ddcce..00000000 --- a/node_modules/multi-progress/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "_from": "multi-progress@~4.0", - "_id": "multi-progress@4.0.0", - "_inBundle": false, - "_integrity": "sha512-9zcjyOou3FFCKPXsmkbC3ethv51SFPoA4dJD6TscIp2pUmy26kBDZW6h9XofPELrzseSkuD7r0V+emGEeo39Pg==", - "_location": "/multi-progress", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "multi-progress@~4.0", - "name": "multi-progress", - "escapedName": "multi-progress", - "rawSpec": "~4.0", - "saveSpec": null, - "fetchSpec": "~4.0" - }, - "_requiredBy": [ - "/@antora/content-aggregator" - ], - "_resolved": "https://registry.npmjs.org/multi-progress/-/multi-progress-4.0.0.tgz", - "_shasum": "a14dd4e4da14f6a7cc2e1a5c0abd8b005dd23923", - "_spec": "multi-progress@~4.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/content-aggregator", - "author": { - "name": "PitaJ" - }, - "bugs": { - "url": "https://github.com/pitaj/multi-progress/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Multiple progress bars based on the \"progress\" package", - "homepage": "https://github.com/pitaj/multi-progress", - "keywords": [ - "multi", - "multiple", - "progress", - "bar" - ], - "license": "MIT", - "main": "multi-progress.js", - "name": "multi-progress", - "peerDependencies": { - "progress": "^2.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/pitaj/multi-progress.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "4.0.0" -} diff --git a/node_modules/multi-progress/readme.md b/node_modules/multi-progress/readme.md deleted file mode 100644 index e761de88..00000000 --- a/node_modules/multi-progress/readme.md +++ /dev/null @@ -1,33 +0,0 @@ -# multi-progress - -This module adds a layer on top of the API of [progress](https://github.com/tj/node-progress) that allows for multiple progress bars. - -### Usage - -Install with npm: `npm install multi-progress` - -`multi-progress@4` requires `progress@2` as a peer dependency. -If you don't already have `progress@2` as a dependency, add it like so: `npm install progress@2`. - -```js -// require the library -var Multiprogress = require('multi-progress'); - -// spawn an instance with the optional stream to write to -var multi = new Multiprogress(process.stderr); - -// create a progress bar -var bar = multi.newBar(' downloading [:bar] :percent :etas', { - complete: '=', - incomplete: ' ', - width: 30, - total: size -}); - -// `bar` is an instance of ProgressBar -// Use the progressbar API with it -``` - -More detailed usage examples are available in the following projects: - -- [rslashimg](https://github.com/pitaj/rslashimg/blob/master/library.js#L14-L58) diff --git a/node_modules/neo-async/LICENSE b/node_modules/neo-async/LICENSE deleted file mode 100644 index 4ec13d1f..00000000 --- a/node_modules/neo-async/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-2018 Suguru Motegi -Based on Async.js, Copyright Caolan McMahon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/neo-async/README.md b/node_modules/neo-async/README.md deleted file mode 100644 index d49e93cf..00000000 --- a/node_modules/neo-async/README.md +++ /dev/null @@ -1,273 +0,0 @@ -

    Neo-Async

    - -

    - -

    - -

    - npm - Travis Status - Coverage Status - download - Code Quality: Javascript - Total Alerts - FOSSA -

    - -Neo-Async is thought to be used as a drop-in replacement for [Async](https://github.com/caolan/async), it almost fully covers its functionality and runs [faster](#benchmark). - -Benchmark is [here](#benchmark)! - -Bluebird's benchmark is [here](https://github.com/suguru03/bluebird/tree/aigle/benchmark)! - -## Code Coverage -![coverage](https://raw.githubusercontent.com/wiki/suguru03/neo-async/images/coverage.png) - -## Installation - -### In a browser -```html - -``` - -### In an AMD loader -```js -require(['async'], function(async) {}); -``` - -### Promise and async/await - -I recommend to use [`Aigle`](https://github.com/suguru03/aigle). - -It is optimized for Promise handling and has almost the same functionality as `neo-async`. - -### Node.js - -#### standard - -```bash -$ npm install neo-async -``` -```js -var async = require('neo-async'); -``` - -#### replacement -```bash -$ npm install neo-async -$ ln -s ./node_modules/neo-async ./node_modules/async -``` -```js -var async = require('async'); -``` - -### Bower - -```bash -bower install neo-async -``` - -## Feature - -[JSDoc](http://suguru03.github.io/neo-async/doc/async.html) - -\* not in Async - -### Collections - -- [`each`](http://suguru03.github.io/neo-async/doc/async.each.html) -- [`eachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -- [`eachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -- [`forEach`](http://suguru03.github.io/neo-async/doc/async.each.html) -> [`each`](http://suguru03.github.io/neo-async/doc/async.each.html) -- [`forEachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -> [`eachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -- [`forEachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -> [`eachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -- [`eachOf`](http://suguru03.github.io/neo-async/doc/async.each.html) -> [`each`](http://suguru03.github.io/neo-async/doc/async.each.html) -- [`eachOfSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -> [`eachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -- [`eachOfLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -> [`eachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -- [`forEachOf`](http://suguru03.github.io/neo-async/doc/async.each.html) -> [`each`](http://suguru03.github.io/neo-async/doc/async.each.html) -- [`forEachOfSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -> [`eachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -- [`eachOfLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -> [`forEachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -- [`map`](http://suguru03.github.io/neo-async/doc/async.map.html) -- [`mapSeries`](http://suguru03.github.io/neo-async/doc/async.mapSeries.html) -- [`mapLimit`](http://suguru03.github.io/neo-async/doc/async.mapLimit.html) -- [`mapValues`](http://suguru03.github.io/neo-async/doc/async.mapValues.html) -- [`mapValuesSeries`](http://suguru03.github.io/neo-async/doc/async.mapValuesSeries.html) -- [`mapValuesLimit`](http://suguru03.github.io/neo-async/doc/async.mapValuesLimit.html) -- [`filter`](http://suguru03.github.io/neo-async/doc/async.filter.html) -- [`filterSeries`](http://suguru03.github.io/neo-async/doc/async.filterSeries.html) -- [`filterLimit`](http://suguru03.github.io/neo-async/doc/async.filterLimit.html) -- [`select`](http://suguru03.github.io/neo-async/doc/async.filter.html) -> [`filter`](http://suguru03.github.io/neo-async/doc/async.filter.html) -- [`selectSeries`](http://suguru03.github.io/neo-async/doc/async.filterSeries.html) -> [`filterSeries`](http://suguru03.github.io/neo-async/doc/async.filterSeries.html) -- [`selectLimit`](http://suguru03.github.io/neo-async/doc/async.filterLimit.html) -> [`filterLimit`](http://suguru03.github.io/neo-async/doc/async.filterLimit.html) -- [`reject`](http://suguru03.github.io/neo-async/doc/async.reject.html) -- [`rejectSeries`](http://suguru03.github.io/neo-async/doc/async.rejectSeries.html) -- [`rejectLimit`](http://suguru03.github.io/neo-async/doc/async.rejectLimit.html) -- [`detect`](http://suguru03.github.io/neo-async/doc/async.detect.html) -- [`detectSeries`](http://suguru03.github.io/neo-async/doc/async.detectSeries.html) -- [`detectLimit`](http://suguru03.github.io/neo-async/doc/async.detectLimit.html) -- [`find`](http://suguru03.github.io/neo-async/doc/async.detect.html) -> [`detect`](http://suguru03.github.io/neo-async/doc/async.detect.html) -- [`findSeries`](http://suguru03.github.io/neo-async/doc/async.detectSeries.html) -> [`detectSeries`](http://suguru03.github.io/neo-async/doc/async.detectSeries.html) -- [`findLimit`](http://suguru03.github.io/neo-async/doc/async.detectLimit.html) -> [`detectLimit`](http://suguru03.github.io/neo-async/doc/async.detectLimit.html) -- [`pick`](http://suguru03.github.io/neo-async/doc/async.pick.html) * -- [`pickSeries`](http://suguru03.github.io/neo-async/doc/async.pickSeries.html) * -- [`pickLimit`](http://suguru03.github.io/neo-async/doc/async.pickLimit.html) * -- [`omit`](http://suguru03.github.io/neo-async/doc/async.omit.html) * -- [`omitSeries`](http://suguru03.github.io/neo-async/doc/async.omitSeries.html) * -- [`omitLimit`](http://suguru03.github.io/neo-async/doc/async.omitLimit.html) * -- [`reduce`](http://suguru03.github.io/neo-async/doc/async.reduce.html) -- [`inject`](http://suguru03.github.io/neo-async/doc/async.reduce.html) -> [`reduce`](http://suguru03.github.io/neo-async/doc/async.reduce.html) -- [`foldl`](http://suguru03.github.io/neo-async/doc/async.reduce.html) -> [`reduce`](http://suguru03.github.io/neo-async/doc/async.reduce.html) -- [`reduceRight`](http://suguru03.github.io/neo-async/doc/async.reduceRight.html) -- [`foldr`](http://suguru03.github.io/neo-async/doc/async.reduceRight.html) -> [`reduceRight`](http://suguru03.github.io/neo-async/doc/async.reduceRight.html) -- [`transform`](http://suguru03.github.io/neo-async/doc/async.transform.html) -- [`transformSeries`](http://suguru03.github.io/neo-async/doc/async.transformSeries.html) * -- [`transformLimit`](http://suguru03.github.io/neo-async/doc/async.transformLimit.html) * -- [`sortBy`](http://suguru03.github.io/neo-async/doc/async.sortBy.html) -- [`sortBySeries`](http://suguru03.github.io/neo-async/doc/async.sortBySeries.html) * -- [`sortByLimit`](http://suguru03.github.io/neo-async/doc/async.sortByLimit.html) * -- [`some`](http://suguru03.github.io/neo-async/doc/async.some.html) -- [`someSeries`](http://suguru03.github.io/neo-async/doc/async.someSeries.html) -- [`someLimit`](http://suguru03.github.io/neo-async/doc/async.someLimit.html) -- [`any`](http://suguru03.github.io/neo-async/doc/async.some.html) -> [`some`](http://suguru03.github.io/neo-async/doc/async.some.html) -- [`anySeries`](http://suguru03.github.io/neo-async/doc/async.someSeries.html) -> [`someSeries`](http://suguru03.github.io/neo-async/doc/async.someSeries.html) -- [`anyLimit`](http://suguru03.github.io/neo-async/doc/async.someLimit.html) -> [`someLimit`](http://suguru03.github.io/neo-async/doc/async.someLimit.html) -- [`every`](http://suguru03.github.io/neo-async/doc/async.every.html) -- [`everySeries`](http://suguru03.github.io/neo-async/doc/async.everySeries.html) -- [`everyLimit`](http://suguru03.github.io/neo-async/doc/async.everyLimit.html) -- [`all`](http://suguru03.github.io/neo-async/doc/async.every.html) -> [`every`](http://suguru03.github.io/neo-async/doc/async.every.html) -- [`allSeries`](http://suguru03.github.io/neo-async/doc/async.everySeries.html) -> [`every`](http://suguru03.github.io/neo-async/doc/async.everySeries.html) -- [`allLimit`](http://suguru03.github.io/neo-async/doc/async.everyLimit.html) -> [`every`](http://suguru03.github.io/neo-async/doc/async.everyLimit.html) -- [`concat`](http://suguru03.github.io/neo-async/doc/async.concat.html) -- [`concatSeries`](http://suguru03.github.io/neo-async/doc/async.concatSeries.html) -- [`concatLimit`](http://suguru03.github.io/neo-async/doc/async.concatLimit.html) * - -### Control Flow - -- [`parallel`](http://suguru03.github.io/neo-async/doc/async.parallel.html) -- [`series`](http://suguru03.github.io/neo-async/doc/async.series.html) -- [`parallelLimit`](http://suguru03.github.io/neo-async/doc/async.series.html) -- [`tryEach`](http://suguru03.github.io/neo-async/doc/async.tryEach.html) -- [`waterfall`](http://suguru03.github.io/neo-async/doc/async.waterfall.html) -- [`angelFall`](http://suguru03.github.io/neo-async/doc/async.angelFall.html) * -- [`angelfall`](http://suguru03.github.io/neo-async/doc/async.angelFall.html) -> [`angelFall`](http://suguru03.github.io/neo-async/doc/async.angelFall.html) * -- [`whilst`](#whilst) -- [`doWhilst`](#doWhilst) -- [`until`](#until) -- [`doUntil`](#doUntil) -- [`during`](#during) -- [`doDuring`](#doDuring) -- [`forever`](#forever) -- [`compose`](#compose) -- [`seq`](#seq) -- [`applyEach`](#applyEach) -- [`applyEachSeries`](#applyEachSeries) -- [`queue`](#queue) -- [`priorityQueue`](#priorityQueue) -- [`cargo`](#cargo) -- [`auto`](#auto) -- [`autoInject`](#autoInject) -- [`retry`](#retry) -- [`retryable`](#retryable) -- [`iterator`](#iterator) -- [`times`](http://suguru03.github.io/neo-async/doc/async.times.html) -- [`timesSeries`](http://suguru03.github.io/neo-async/doc/async.timesSeries.html) -- [`timesLimit`](http://suguru03.github.io/neo-async/doc/async.timesLimit.html) -- [`race`](#race) - -### Utils -- [`apply`](#apply) -- [`setImmediate`](#setImmediate) -- [`nextTick`](#nextTick) -- [`memoize`](#memoize) -- [`unmemoize`](#unmemoize) -- [`ensureAsync`](#ensureAsync) -- [`constant`](#constant) -- [`asyncify`](#asyncify) -- [`wrapSync`](#asyncify) -> [`asyncify`](#asyncify) -- [`log`](#log) -- [`dir`](#dir) -- [`timeout`](http://suguru03.github.io/neo-async/doc/async.timeout.html) -- [`reflect`](#reflect) -- [`reflectAll`](#reflectAll) -- [`createLogger`](#createLogger) - -## Mode -- [`safe`](#safe) * -- [`fast`](#fast) * - -## Benchmark - -[Benchmark: Async vs Neo-Async](http://suguru03.hatenablog.com/entry/2016/06/10/135559) - -### How to check - -```bash -$ node perf -``` - -### Environment - -* Darwin 17.3.0 x64 -* Node.js v8.9.4 -* async v2.6.0 -* neo-async v2.5.0 -* benchmark v2.1.4 - -### Result - -The value is the ratio (Neo-Async/Async) of the average speed. - -#### Collections -|function|benchmark| -|---|--:| -|each/forEach|2.43| -|eachSeries/forEachSeries|1.75| -|eachLimit/forEachLimit|1.68| -|eachOf|3.29| -|eachOfSeries|1.50| -|eachOfLimit|1.59| -|map|3.95| -|mapSeries|1.81| -|mapLimit|1.27| -|mapValues|2.73| -|mapValuesSeries|1.59| -|mapValuesLimit|1.23| -|filter|3.00| -|filterSeries|1.74| -|filterLimit|1.17| -|reject|4.59| -|rejectSeries|2.31| -|rejectLimit|1.58| -|detect|4.30| -|detectSeries|1.86| -|detectLimit|1.32| -|reduce|1.82| -|transform|2.46| -|sortBy|4.08| -|some|2.19| -|someSeries|1.83| -|someLimit|1.32| -|every|2.09| -|everySeries|1.84| -|everyLimit|1.35| -|concat|3.79| -|concatSeries|4.45| - -#### Control Flow -|funciton|benchmark| -|---|--:| -|parallel|2.93| -|series|1.96| -|waterfall|1.29| -|whilst|1.00| -|doWhilst|1.12| -|until|1.12| -|doUntil|1.12| -|during|1.18| -|doDuring|2.42| -|times|4.25| -|auto|1.97| - - -## License -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsuguru03%2Fneo-async.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsuguru03%2Fneo-async?ref=badge_large) diff --git a/node_modules/neo-async/all.js b/node_modules/neo-async/all.js deleted file mode 100644 index dad54e7f..00000000 --- a/node_modules/neo-async/all.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').all; diff --git a/node_modules/neo-async/allLimit.js b/node_modules/neo-async/allLimit.js deleted file mode 100644 index d9d7aaa1..00000000 --- a/node_modules/neo-async/allLimit.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').allLimit; diff --git a/node_modules/neo-async/allSeries.js b/node_modules/neo-async/allSeries.js deleted file mode 100644 index 2a7a8ba8..00000000 --- a/node_modules/neo-async/allSeries.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').allSeries; diff --git a/node_modules/neo-async/angelFall.js b/node_modules/neo-async/angelFall.js deleted file mode 100644 index 476c23ec..00000000 --- a/node_modules/neo-async/angelFall.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').angelfall; diff --git a/node_modules/neo-async/any.js b/node_modules/neo-async/any.js deleted file mode 100644 index d6b07bb5..00000000 --- a/node_modules/neo-async/any.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').any; diff --git a/node_modules/neo-async/anyLimit.js b/node_modules/neo-async/anyLimit.js deleted file mode 100644 index 34114f88..00000000 --- a/node_modules/neo-async/anyLimit.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').anyLimit; diff --git a/node_modules/neo-async/anySeries.js b/node_modules/neo-async/anySeries.js deleted file mode 100644 index bb3781fd..00000000 --- a/node_modules/neo-async/anySeries.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').anySeries; diff --git a/node_modules/neo-async/apply.js b/node_modules/neo-async/apply.js deleted file mode 100644 index 41135e21..00000000 --- a/node_modules/neo-async/apply.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').apply; diff --git a/node_modules/neo-async/applyEach.js b/node_modules/neo-async/applyEach.js deleted file mode 100644 index 292bd1c0..00000000 --- a/node_modules/neo-async/applyEach.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').applyEach; diff --git a/node_modules/neo-async/applyEachSeries.js b/node_modules/neo-async/applyEachSeries.js deleted file mode 100644 index 0aece7cd..00000000 --- a/node_modules/neo-async/applyEachSeries.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./async').applyEachSeries; diff --git a/node_modules/neo-async/async.js b/node_modules/neo-async/async.js deleted file mode 100644 index e78eb168..00000000 --- a/node_modules/neo-async/async.js +++ /dev/null @@ -1,9184 +0,0 @@ -(function(global, factory) { - /*jshint -W030 */ - 'use strict'; - typeof exports === 'object' && typeof module !== 'undefined' - ? factory(exports) - : typeof define === 'function' && define.amd - ? define(['exports'], factory) - : global.async - ? factory((global.neo_async = global.neo_async || {})) - : factory((global.async = global.async || {})); -})(this, function(exports) { - 'use strict'; - - var noop = function noop() {}; - var throwError = function throwError() { - throw new Error('Callback was already called.'); - }; - - var DEFAULT_TIMES = 5; - var DEFAULT_INTERVAL = 0; - - var obj = 'object'; - var func = 'function'; - var isArray = Array.isArray; - var nativeKeys = Object.keys; - var nativePush = Array.prototype.push; - var iteratorSymbol = typeof Symbol === func && Symbol.iterator; - - var nextTick, asyncNextTick, asyncSetImmediate; - createImmediate(); - - /** - * @memberof async - * @namespace each - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.each(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(); - * }, num * 10); - * }; - * async.each(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.each(object, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(); - * }, num * 10); - * }; - * async.each(object, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - * @example - * - * // break - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num !== 2); - * }, num * 10); - * }; - * async.each(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 2] - * }); - * - */ - var each = createEach(arrayEach, baseEach, symbolEach); - - /** - * @memberof async - * @namespace map - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.map(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.map(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.map(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.map(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var map = createMap(arrayEachIndex, baseEachIndex, symbolEachIndex, true); - - /** - * @memberof async - * @namespace mapValues - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValues(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2 } - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValues(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2 } - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValues(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2 } - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValues(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2 } - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var mapValues = createMap(arrayEachIndex, baseEachKey, symbolEachKey, false); - - /** - * @memberof async - * @namespace filter - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filter(array, iterator, function(err, res) { - * console.log(res); // [1, 3]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filter(array, iterator, function(err, res) { - * console.log(res); // [1, 3]; - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filter(object, iterator, function(err, res) { - * console.log(res); // [1, 3]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filter(object, iterator, function(err, res) { - * console.log(res); // [1, 3]; - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var filter = createFilter(arrayEachIndexValue, baseEachIndexValue, symbolEachIndexValue, true); - - /** - * @memberof async - * @namespace filterSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3] - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3] - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3] - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - var filterSeries = createFilterSeries(true); - - /** - * @memberof async - * @namespace filterLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3] - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.filterLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3] - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - var filterLimit = createFilterLimit(true); - - /** - * @memberof async - * @namespace reject - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.reject(array, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.reject(array, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.reject(object, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.reject(object, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var reject = createFilter(arrayEachIndexValue, baseEachIndexValue, symbolEachIndexValue, false); - - /** - * @memberof async - * @namespace rejectSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectSeries(array, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectSeries(object, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectSeries(object, iterator, function(err, res) { - * console.log(res); // [2]; - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - var rejectSeries = createFilterSeries(false); - - /** - * @memberof async - * @namespace rejectLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [4, 2] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [4, 2] - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [4, 2] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.rejectLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [4, 2] - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - var rejectLimit = createFilterLimit(false); - - /** - * @memberof async - * @namespace detect - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detect(array, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detect(array, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detect(object, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detect(object, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 'a']] - * }); - * - */ - var detect = createDetect(arrayEachValue, baseEachValue, symbolEachValue, true); - - /** - * @memberof async - * @namespace detectSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectSeries(array, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectSeries(array, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectSeries(object, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectSeries(object, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 'a']] - * }); - * - */ - var detectSeries = createDetectSeries(true); - - /** - * @memberof async - * @namespace detectLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectLimit(array, 2, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectLimit(array, 2, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectLimit(object, 2, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.detectLimit(object, 2, iterator, function(err, res) { - * console.log(res); // 1 - * console.log(order); // [[1, 'a']] - * }); - * - */ - var detectLimit = createDetectLimit(true); - - /** - * @memberof async - * @namespace every - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.every(array, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.every(array, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 0], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.every(object, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.every(object, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 'a'], [2, 'c']] - * }); - * - */ - var every = createEvery(arrayEachValue, baseEachValue, symbolEachValue); - - /** - * @memberof async - * @namespace everySeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everySeries(array, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everySeries(array, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everySeries(object, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everySeries(object, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 'a'], [3, 'b'] [2, 'c']] - * }); - * - */ - var everySeries = createEverySeries(); - - /** - * @memberof async - * @namespace everyLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everyLimit(array, 2, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 3, 5, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everyLimit(array, 2, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everyLimit(object, 2, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [1, 3, 5, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.everyLimit(object, 2, iterator, function(err, res) { - * console.log(res); // false - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e']] - * }); - * - */ - var everyLimit = createEveryLimit(); - - /** - * @memberof async - * @namespace pick - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pick(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3 } - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pick(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3 } - * console.log(order); // [[0, 1], [2, 2], [3, 1], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pick(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3 } - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pick(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3 } - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b'], [4, 'd']] - * }); - * - */ - var pick = createPick(arrayEachIndexValue, baseEachKeyValue, symbolEachKeyValue, true); - - /** - * @memberof async - * @namespace pickSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickSeries(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3 } - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickSeries(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3 } - * console.log(order); // [[0, 1], [3, 1], [2, 2], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickSeries(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3 } - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickSeries(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3 } - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c'], [4, 'd']] - * }); - * - */ - var pickSeries = createPickSeries(true); - - /** - * @memberof async - * @namespace pickLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 5, '2': 3 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 5, '2': 3 } - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 5, c: 3 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.pickLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 5, c: 3 } - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - var pickLimit = createPickLimit(true); - - /** - * @memberof async - * @namespace omit - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omit(array, iterator, function(err, res) { - * console.log(res); // { '2': 2, '3': 4 } - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omit(array, iterator, function(err, res) { - * console.log(res); // { '2': 2, '3': 4 } - * console.log(order); // [[0, 1], [2, 2], [3, 1], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omit(object, iterator, function(err, res) { - * console.log(res); // { c: 2, d: 4 } - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omit(object, iterator, function(err, res) { - * console.log(res); // { c: 2, d: 4 } - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b'], [4, 'd']] - * }); - * - */ - var omit = createPick(arrayEachIndexValue, baseEachKeyValue, symbolEachKeyValue, false); - - /** - * @memberof async - * @namespace omitSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitSeries(array, iterator, function(err, res) { - * console.log(res); // { '2': 2, '3': 4 } - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2, 4]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitSeries(array, iterator, function(err, res) { - * console.log(res); // { '2': 2, '3': 4 } - * console.log(order); // [[0, 1], [3, 1], [2, 2], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitSeries(object, iterator, function(err, res) { - * console.log(res); // { c: 2, d: 4 } - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitSeries(object, iterator, function(err, res) { - * console.log(res); // { c: 2, d: 4 } - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c'], [4, 'd']] - * }); - * - */ - var omitSeries = createPickSeries(false); - - /** - * @memberof async - * @namespace omitLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '3': 4, '4': 2 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '3': 4, '4': 2 } - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { d: 4, e: 2 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.omitLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { d: 4, e: 2 } - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - var omitLimit = createPickLimit(false); - - /** - * @memberof async - * @namespace transform - * @param {Array|Object} collection - * @param {Array|Object|Function} [accumulator] - * @param {Function} [iterator] - * @param {Function} [callback] - * @example - * - * // array - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num) - * done(); - * }, num * 10); - * }; - * async.transform(collection, iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4] - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // array with index and accumulator - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * result[index] = num; - * done(); - * }, num * 10); - * }; - * async.transform(collection, {}, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2, '3': 4 } - * console.log(order); // [[1, 0], [2, 2], [3, 1], [4, 3]] - * }); - * - * @example - * - * // object with accumulator - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num); - * done(); - * }, num * 10); - * }; - * async.transform(collection, [], iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4] - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * result[key] = num; - * done(); - * }, num * 10); - * }; - * async.transform(collection, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2, d: 4 } - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b'], [4, 'd']] - * }); - * - */ - var transform = createTransform(arrayEachResult, baseEachResult, symbolEachResult); - - /** - * @memberof async - * @namespace sortBy - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortBy(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.sortBy(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortBy(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.sortBy(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var sortBy = createSortBy(arrayEachIndexValue, baseEachIndexValue, symbolEachIndexValue); - - /** - * @memberof async - * @namespace concat - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concat(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3]; - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, [num]); - * }, num * 10); - * }; - * async.concat(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 0], [2, 2], [3, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concat(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [1, 2, 3] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, [num]); - * }, num * 10); - * }; - * async.concat(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 'a'], [2, 'c'], [3, 'b']] - * }); - * - */ - var concat = createConcat(arrayEachIndex, baseEachIndex, symbolEachIndex); - - /** - * @memberof async - * @namespace groupBy - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [4.2, 6.4, 6.1]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBy(array, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.1, 6.4] } - * console.log(order); // [4.2, 6.1, 6.4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [4.2, 6.4, 6.1]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBy(array, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.1, 6.4] } - * console.log(order); // [[4.2, 0], [6.1, 2], [6.4, 1]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 4.2, b: 6.4, c: 6.1 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBy(object, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.1, 6.4] } - * console.log(order); // [4.2, 6.1, 6.4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 4.2, b: 6.4, c: 6.1 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBy(object, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.1, 6.4] } - * console.log(order); // [[4.2, 'a'], [6.1, 'c'], [6.4, 'b']] - * }); - * - */ - var groupBy = createGroupBy(arrayEachValue, baseEachValue, symbolEachValue); - - /** - * @memberof async - * @namespace parallel - * @param {Array|Object} tasks - functions - * @param {Function} callback - * @example - * - * var order = []; - * var tasks = [ - * function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 30); - * }, - * function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 40); - * }, - * function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 20); - * } - * ]; - * async.parallel(tasks, function(err, res) { - * console.log(res); // [1, 2, 3, 4]; - * console.log(order); // [1, 4, 2, 3] - * }); - * - * @example - * - * var order = []; - * var tasks = { - * 'a': function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * 'b': function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 30); - * }, - * 'c': function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 40); - * }, - * 'd': function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 20); - * } - * }; - * async.parallel(tasks, function(err, res) { - * console.log(res); // { a: 1, b: 2, c: 3, d:4 } - * console.log(order); // [1, 4, 2, 3] - * }); - * - */ - var parallel = createParallel(arrayEachFunc, baseEachFunc); - - /** - * @memberof async - * @namespace applyEach - */ - var applyEach = createApplyEach(map); - - /** - * @memberof async - * @namespace applyEachSeries - */ - var applyEachSeries = createApplyEach(mapSeries); - - /** - * @memberof async - * @namespace log - */ - var log = createLogger('log'); - - /** - * @memberof async - * @namespace dir - */ - var dir = createLogger('dir'); - - /** - * @version 2.6.2 - * @namespace async - */ - var index = { - VERSION: '2.6.2', - - // Collections - each: each, - eachSeries: eachSeries, - eachLimit: eachLimit, - forEach: each, - forEachSeries: eachSeries, - forEachLimit: eachLimit, - eachOf: each, - eachOfSeries: eachSeries, - eachOfLimit: eachLimit, - forEachOf: each, - forEachOfSeries: eachSeries, - forEachOfLimit: eachLimit, - map: map, - mapSeries: mapSeries, - mapLimit: mapLimit, - mapValues: mapValues, - mapValuesSeries: mapValuesSeries, - mapValuesLimit: mapValuesLimit, - filter: filter, - filterSeries: filterSeries, - filterLimit: filterLimit, - select: filter, - selectSeries: filterSeries, - selectLimit: filterLimit, - reject: reject, - rejectSeries: rejectSeries, - rejectLimit: rejectLimit, - detect: detect, - detectSeries: detectSeries, - detectLimit: detectLimit, - find: detect, - findSeries: detectSeries, - findLimit: detectLimit, - pick: pick, - pickSeries: pickSeries, - pickLimit: pickLimit, - omit: omit, - omitSeries: omitSeries, - omitLimit: omitLimit, - reduce: reduce, - inject: reduce, - foldl: reduce, - reduceRight: reduceRight, - foldr: reduceRight, - transform: transform, - transformSeries: transformSeries, - transformLimit: transformLimit, - sortBy: sortBy, - sortBySeries: sortBySeries, - sortByLimit: sortByLimit, - some: some, - someSeries: someSeries, - someLimit: someLimit, - any: some, - anySeries: someSeries, - anyLimit: someLimit, - every: every, - everySeries: everySeries, - everyLimit: everyLimit, - all: every, - allSeries: everySeries, - allLimit: everyLimit, - concat: concat, - concatSeries: concatSeries, - concatLimit: concatLimit, - groupBy: groupBy, - groupBySeries: groupBySeries, - groupByLimit: groupByLimit, - - // Control Flow - parallel: parallel, - series: series, - parallelLimit: parallelLimit, - tryEach: tryEach, - waterfall: waterfall, - angelFall: angelFall, - angelfall: angelFall, - whilst: whilst, - doWhilst: doWhilst, - until: until, - doUntil: doUntil, - during: during, - doDuring: doDuring, - forever: forever, - compose: compose, - seq: seq, - applyEach: applyEach, - applyEachSeries: applyEachSeries, - queue: queue, - priorityQueue: priorityQueue, - cargo: cargo, - auto: auto, - autoInject: autoInject, - retry: retry, - retryable: retryable, - iterator: iterator, - times: times, - timesSeries: timesSeries, - timesLimit: timesLimit, - race: race, - - // Utils - apply: apply, - nextTick: asyncNextTick, - setImmediate: asyncSetImmediate, - memoize: memoize, - unmemoize: unmemoize, - ensureAsync: ensureAsync, - constant: constant, - asyncify: asyncify, - wrapSync: asyncify, - log: log, - dir: dir, - reflect: reflect, - reflectAll: reflectAll, - timeout: timeout, - createLogger: createLogger, - - // Mode - safe: safe, - fast: fast - }; - - exports['default'] = index; - baseEachSync( - index, - function(func, key) { - exports[key] = func; - }, - nativeKeys(index) - ); - - /** - * @private - */ - function createImmediate(safeMode) { - var delay = function delay(fn) { - var args = slice(arguments, 1); - setTimeout(function() { - fn.apply(null, args); - }); - }; - asyncSetImmediate = typeof setImmediate === func ? setImmediate : delay; - if (typeof process === obj && typeof process.nextTick === func) { - nextTick = /^v0.10/.test(process.version) ? asyncSetImmediate : process.nextTick; - asyncNextTick = /^v0/.test(process.version) ? asyncSetImmediate : process.nextTick; - } else { - asyncNextTick = nextTick = asyncSetImmediate; - } - if (safeMode === false) { - nextTick = function(cb) { - cb(); - }; - } - } - - /* sync functions based on lodash */ - - /** - * Converts `arguments` to an array. - * - * @private - * @param {Array} array = The array to slice. - */ - function createArray(array) { - var index = -1; - var size = array.length; - var result = Array(size); - - while (++index < size) { - result[index] = array[index]; - } - return result; - } - - /** - * Create an array from `start` - * - * @private - * @param {Array} array - The array to slice. - * @param {number} start - The start position. - */ - function slice(array, start) { - var end = array.length; - var index = -1; - var size = end - start; - if (size <= 0) { - return []; - } - var result = Array(size); - - while (++index < size) { - result[index] = array[index + start]; - } - return result; - } - - /** - * @private - * @param {Object} object - */ - function objectClone(object) { - var keys = nativeKeys(object); - var size = keys.length; - var index = -1; - var result = {}; - - while (++index < size) { - var key = keys[index]; - result[key] = object[key]; - } - return result; - } - - /** - * Create an array with all falsey values removed. - * - * @private - * @param {Array} array - The array to compact. - */ - function compact(array) { - var index = -1; - var size = array.length; - var result = []; - - while (++index < size) { - var value = array[index]; - if (value) { - result[result.length] = value; - } - } - return result; - } - - /** - * Create an array of reverse sequence. - * - * @private - * @param {Array} array - The array to reverse. - */ - function reverse(array) { - var index = -1; - var size = array.length; - var result = Array(size); - var resIndex = size; - - while (++index < size) { - result[--resIndex] = array[index]; - } - return result; - } - - /** - * Checks if key exists in object property. - * - * @private - * @param {Object} object - The object to inspect. - * @param {string} key - The key to check. - */ - function has(object, key) { - return object.hasOwnProperty(key); - } - - /** - * Check if target exists in array. - * @private - * @param {Array} array - * @param {*} target - */ - function notInclude(array, target) { - var index = -1; - var size = array.length; - - while (++index < size) { - if (array[index] === target) { - return false; - } - } - return true; - } - - /** - * @private - * @param {Array} array - The array to iterate over. - * @param {Function} iterator - The function invoked per iteration. - */ - function arrayEachSync(array, iterator) { - var index = -1; - var size = array.length; - - while (++index < size) { - iterator(array[index], index); - } - return array; - } - - /** - * @private - * @param {Object} object - The object to iterate over. - * @param {Function} iterator - The function invoked per iteration. - * @param {Array} keys - */ - function baseEachSync(object, iterator, keys) { - var index = -1; - var size = keys.length; - - while (++index < size) { - var key = keys[index]; - iterator(object[key], key); - } - return object; - } - - /** - * @private - * @param {number} n - * @param {Function} iterator - */ - function timesSync(n, iterator) { - var index = -1; - while (++index < n) { - iterator(index); - } - } - - /** - * @private - * @param {Array} array - * @param {number[]} criteria - */ - function sortByCriteria(array, criteria) { - var l = array.length; - var indices = Array(l); - var i; - for (i = 0; i < l; i++) { - indices[i] = i; - } - quickSort(criteria, 0, l - 1, indices); - var result = Array(l); - for (var n = 0; n < l; n++) { - i = indices[n]; - result[n] = i === undefined ? array[n] : array[i]; - } - return result; - } - - function partition(array, i, j, mid, indices) { - var l = i; - var r = j; - while (l <= r) { - i = l; - while (l < r && array[l] < mid) { - l++; - } - while (r >= i && array[r] >= mid) { - r--; - } - if (l > r) { - break; - } - swap(array, indices, l++, r--); - } - return l; - } - - function swap(array, indices, l, r) { - var n = array[l]; - array[l] = array[r]; - array[r] = n; - var i = indices[l]; - indices[l] = indices[r]; - indices[r] = i; - } - - function quickSort(array, i, j, indices) { - if (i === j) { - return; - } - var k = i; - while (++k <= j && array[i] === array[k]) { - var l = k - 1; - if (indices[l] > indices[k]) { - var index = indices[l]; - indices[l] = indices[k]; - indices[k] = index; - } - } - if (k > j) { - return; - } - var p = array[i] > array[k] ? i : k; - k = partition(array, i, j, array[p], indices); - quickSort(array, i, k - 1, indices); - quickSort(array, k, j, indices); - } - - /** - * @Private - */ - function makeConcatResult(array) { - var result = []; - arrayEachSync(array, function(value) { - if (value === noop) { - return; - } - if (isArray(value)) { - nativePush.apply(result, value); - } else { - result.push(value); - } - }); - return result; - } - - /* async functions */ - - /** - * @private - */ - function arrayEach(array, iterator, callback) { - var index = -1; - var size = array.length; - - if (iterator.length === 3) { - while (++index < size) { - iterator(array[index], index, onlyOnce(callback)); - } - } else { - while (++index < size) { - iterator(array[index], onlyOnce(callback)); - } - } - } - - /** - * @private - */ - function baseEach(object, iterator, callback, keys) { - var key; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - iterator(object[key], key, onlyOnce(callback)); - } - } else { - while (++index < size) { - iterator(object[keys[index]], onlyOnce(callback)); - } - } - } - - /** - * @private - */ - function symbolEach(collection, iterator, callback) { - var iter = collection[iteratorSymbol](); - var index = 0; - var item; - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - iterator(item.value, index++, onlyOnce(callback)); - } - } else { - while ((item = iter.next()).done === false) { - index++; - iterator(item.value, onlyOnce(callback)); - } - } - return index; - } - - /** - * @private - */ - function arrayEachResult(array, result, iterator, callback) { - var index = -1; - var size = array.length; - - if (iterator.length === 4) { - while (++index < size) { - iterator(result, array[index], index, onlyOnce(callback)); - } - } else { - while (++index < size) { - iterator(result, array[index], onlyOnce(callback)); - } - } - } - - /** - * @private - */ - function baseEachResult(object, result, iterator, callback, keys) { - var key; - var index = -1; - var size = keys.length; - - if (iterator.length === 4) { - while (++index < size) { - key = keys[index]; - iterator(result, object[key], key, onlyOnce(callback)); - } - } else { - while (++index < size) { - iterator(result, object[keys[index]], onlyOnce(callback)); - } - } - } - - /** - * @private - */ - function symbolEachResult(collection, result, iterator, callback) { - var item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 4) { - while ((item = iter.next()).done === false) { - iterator(result, item.value, index++, onlyOnce(callback)); - } - } else { - while ((item = iter.next()).done === false) { - index++; - iterator(result, item.value, onlyOnce(callback)); - } - } - return index; - } - - /** - * @private - */ - function arrayEachFunc(array, createCallback) { - var index = -1; - var size = array.length; - - while (++index < size) { - array[index](createCallback(index)); - } - } - - /** - * @private - */ - function baseEachFunc(object, createCallback, keys) { - var key; - var index = -1; - var size = keys.length; - - while (++index < size) { - key = keys[index]; - object[key](createCallback(key)); - } - } - - /** - * @private - */ - function arrayEachIndex(array, iterator, createCallback) { - var index = -1; - var size = array.length; - - if (iterator.length === 3) { - while (++index < size) { - iterator(array[index], index, createCallback(index)); - } - } else { - while (++index < size) { - iterator(array[index], createCallback(index)); - } - } - } - - /** - * @private - */ - function baseEachIndex(object, iterator, createCallback, keys) { - var key; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - iterator(object[key], key, createCallback(index)); - } - } else { - while (++index < size) { - iterator(object[keys[index]], createCallback(index)); - } - } - } - - /** - * @private - */ - function symbolEachIndex(collection, iterator, createCallback) { - var item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - iterator(item.value, index, createCallback(index++)); - } - } else { - while ((item = iter.next()).done === false) { - iterator(item.value, createCallback(index++)); - } - } - return index; - } - - /** - * @private - */ - function baseEachKey(object, iterator, createCallback, keys) { - var key; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - iterator(object[key], key, createCallback(key)); - } - } else { - while (++index < size) { - key = keys[index]; - iterator(object[key], createCallback(key)); - } - } - } - - /** - * @private - */ - function symbolEachKey(collection, iterator, createCallback) { - var item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - iterator(item.value, index, createCallback(index++)); - } - } else { - while ((item = iter.next()).done === false) { - iterator(item.value, createCallback(index++)); - } - } - return index; - } - - /** - * @private - */ - function arrayEachValue(array, iterator, createCallback) { - var value; - var index = -1; - var size = array.length; - - if (iterator.length === 3) { - while (++index < size) { - value = array[index]; - iterator(value, index, createCallback(value)); - } - } else { - while (++index < size) { - value = array[index]; - iterator(value, createCallback(value)); - } - } - } - - /** - * @private - */ - function baseEachValue(object, iterator, createCallback, keys) { - var key, value; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - value = object[key]; - iterator(value, key, createCallback(value)); - } - } else { - while (++index < size) { - value = object[keys[index]]; - iterator(value, createCallback(value)); - } - } - } - - /** - * @private - */ - function symbolEachValue(collection, iterator, createCallback) { - var value, item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - value = item.value; - iterator(value, index++, createCallback(value)); - } - } else { - while ((item = iter.next()).done === false) { - index++; - value = item.value; - iterator(value, createCallback(value)); - } - } - return index; - } - - /** - * @private - */ - function arrayEachIndexValue(array, iterator, createCallback) { - var value; - var index = -1; - var size = array.length; - - if (iterator.length === 3) { - while (++index < size) { - value = array[index]; - iterator(value, index, createCallback(index, value)); - } - } else { - while (++index < size) { - value = array[index]; - iterator(value, createCallback(index, value)); - } - } - } - - /** - * @private - */ - function baseEachIndexValue(object, iterator, createCallback, keys) { - var key, value; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - value = object[key]; - iterator(value, key, createCallback(index, value)); - } - } else { - while (++index < size) { - value = object[keys[index]]; - iterator(value, createCallback(index, value)); - } - } - } - - /** - * @private - */ - function symbolEachIndexValue(collection, iterator, createCallback) { - var value, item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - value = item.value; - iterator(value, index, createCallback(index++, value)); - } - } else { - while ((item = iter.next()).done === false) { - value = item.value; - iterator(value, createCallback(index++, value)); - } - } - return index; - } - - /** - * @private - */ - function baseEachKeyValue(object, iterator, createCallback, keys) { - var key, value; - var index = -1; - var size = keys.length; - - if (iterator.length === 3) { - while (++index < size) { - key = keys[index]; - value = object[key]; - iterator(value, key, createCallback(key, value)); - } - } else { - while (++index < size) { - key = keys[index]; - value = object[key]; - iterator(value, createCallback(key, value)); - } - } - } - - /** - * @private - */ - function symbolEachKeyValue(collection, iterator, createCallback) { - var value, item; - var index = 0; - var iter = collection[iteratorSymbol](); - - if (iterator.length === 3) { - while ((item = iter.next()).done === false) { - value = item.value; - iterator(value, index, createCallback(index++, value)); - } - } else { - while ((item = iter.next()).done === false) { - value = item.value; - iterator(value, createCallback(index++, value)); - } - } - return index; - } - - /** - * @private - * @param {Function} func - */ - function onlyOnce(func) { - return function(err, res) { - var fn = func; - func = throwError; - fn(err, res); - }; - } - - /** - * @private - * @param {Function} func - */ - function once(func) { - return function(err, res) { - var fn = func; - func = noop; - fn(err, res); - }; - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - */ - function createEach(arrayEach, baseEach, symbolEach) { - return function each(collection, iterator, callback) { - callback = once(callback || noop); - var size, keys; - var completed = 0; - if (isArray(collection)) { - size = collection.length; - arrayEach(collection, iterator, done); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = symbolEach(collection, iterator, done); - size && size === completed && callback(null); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - baseEach(collection, iterator, done, keys); - } - if (!size) { - callback(null); - } - - function done(err, bool) { - if (err) { - callback = once(callback); - callback(err); - } else if (++completed === size) { - callback(null); - } else if (bool === false) { - callback = once(callback); - callback(null); - } - } - }; - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - */ - function createMap(arrayEach, baseEach, symbolEach, useArray) { - var init, clone; - if (useArray) { - init = Array; - clone = createArray; - } else { - init = function() { - return {}; - }; - clone = objectClone; - } - - return function(collection, iterator, callback) { - callback = callback || noop; - var size, keys, result; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = init(size); - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - // TODO: size could be changed - result = init(0); - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, result); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - result = init(size); - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - callback(null, init()); - } - - function createCallback(key) { - return function done(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - callback = once(callback); - callback(err, clone(result)); - return; - } - result[key] = res; - key = null; - if (++completed === size) { - callback(null, result); - } - }; - } - }; - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - * @param {boolean} bool - */ - function createFilter(arrayEach, baseEach, symbolEach, bool) { - return function(collection, iterator, callback) { - callback = callback || noop; - var size, keys, result; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = Array(size); - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - result = []; - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, compact(result)); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - result = Array(size); - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - return callback(null, []); - } - - function createCallback(index, value) { - return function done(err, res) { - if (index === null) { - throwError(); - } - if (err) { - index = null; - callback = once(callback); - callback(err); - return; - } - if (!!res === bool) { - result[index] = value; - } - index = null; - if (++completed === size) { - callback(null, compact(result)); - } - }; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createFilterSeries(bool) { - return function(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, value, keys, iter, item, iterate; - var sync = false; - var completed = 0; - var result = []; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, []); - } - iterate(); - - function arrayIterator() { - value = collection[completed]; - iterator(value, done); - } - - function arrayIteratorWithIndex() { - value = collection[completed]; - iterator(value, completed, done); - } - - function symbolIterator() { - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, completed, done); - } - - function objectIterator() { - key = keys[completed]; - value = collection[key]; - iterator(value, done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - value = collection[key]; - iterator(value, key, done); - } - - function done(err, res) { - if (err) { - callback(err); - return; - } - if (!!res === bool) { - result[result.length] = value; - } - if (++completed === size) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createFilterLimit(bool) { - return function(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, value, keys, iter, item, iterate, result; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - result = []; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, []); - } - result = result || Array(size); - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, createCallback(value, index)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, index, createCallback(value, index)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, compact(result)); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, started, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, compact(result)); - } - } - - function objectIterator() { - index = started++; - if (index < size) { - value = collection[keys[index]]; - iterator(value, createCallback(value, index)); - } - } - - function objectIteratorWithKey() { - index = started++; - if (index < size) { - key = keys[index]; - value = collection[key]; - iterator(value, key, createCallback(value, index)); - } - } - - function createCallback(value, index) { - return function(err, res) { - if (index === null) { - throwError(); - } - if (err) { - index = null; - iterate = noop; - callback = once(callback); - callback(err); - return; - } - if (!!res === bool) { - result[index] = value; - } - index = null; - if (++completed === size) { - callback = onlyOnce(callback); - callback(null, compact(result)); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - }; - } - - /** - * @memberof async - * @namespace eachSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.eachSeries(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(); - * }, num * 10); - * }; - * async.eachSeries(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.eachSeries(object, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(); - * }, num * 10); - * }; - * async.eachSeries(object, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'b']] - * }); - * - * @example - * - * // break - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num !== 3); - * }, num * 10); - * }; - * async.eachSeries(array, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3] - * }); - */ - function eachSeries(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, keys, iter, item, iterate; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null); - } - iterate(); - - function arrayIterator() { - iterator(collection[completed], done); - } - - function arrayIteratorWithIndex() { - iterator(collection[completed], completed, done); - } - - function symbolIterator() { - item = iter.next(); - item.done ? callback(null) : iterator(item.value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - item.done ? callback(null) : iterator(item.value, completed, done); - } - - function objectIterator() { - iterator(collection[keys[completed]], done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - iterator(collection[key], key, done); - } - - function done(err, bool) { - if (err) { - callback(err); - } else if (++completed === size || bool === false) { - iterate = throwError; - callback(null); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace eachLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.eachLimit(array, 2, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(); - * }, num * 10); - * }; - * async.eachLimit(array, 2, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(); - * }, num * 10); - * }; - * async.eachLimit(object, 2, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(); - * }, num * 10); - * }; - * async.eachLimit(object, 2, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - * @example - * - * // break - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num !== 5); - * }, num * 10); - * }; - * async.eachLimit(array, 2, iterator, function(err, res) { - * console.log(res); // undefined - * console.log(order); // [1, 3, 5] - * }); - * - */ - function eachLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, keys, iter, item, iterate; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } else { - return callback(null); - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - if (started < size) { - iterator(collection[started++], done); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - iterator(collection[index], index, done); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - started++; - iterator(item.value, done); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, started++, done); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null); - } - } - - function objectIterator() { - if (started < size) { - iterator(collection[keys[started++]], done); - } - } - - function objectIteratorWithKey() { - index = started++; - if (index < size) { - key = keys[index]; - iterator(collection[key], key, done); - } - } - - function done(err, bool) { - if (err || bool === false) { - iterate = noop; - callback = once(callback); - callback(err); - } else if (++completed === size) { - iterator = noop; - iterate = throwError; - callback = onlyOnce(callback); - callback(null); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace mapSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.mapSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.mapSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - function mapSeries(collection, iterator, callback) { - callback = callback || noop; - var size, key, keys, iter, item, result, iterate; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - result = []; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, []); - } - result = result || Array(size); - iterate(); - - function arrayIterator() { - iterator(collection[completed], done); - } - - function arrayIteratorWithIndex() { - iterator(collection[completed], completed, done); - } - - function symbolIterator() { - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, completed, done); - } - - function objectIterator() { - iterator(collection[keys[completed]], done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - iterator(collection[key], key, done); - } - - function done(err, res) { - if (err) { - iterate = throwError; - callback = onlyOnce(callback); - callback(err, createArray(result)); - return; - } - result[completed] = res; - if (++completed === size) { - iterate = throwError; - callback(null, result); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace mapLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3, 4, 2] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.mapLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3, 4, 2] - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3, 4, 2] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.mapLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 5, 3, 4, 2] - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - function mapLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, keys, iter, item, result, iterate; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - result = []; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, []); - } - result = result || Array(size); - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - iterator(collection[index], createCallback(index)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - iterator(collection[index], index, createCallback(index)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, started, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function objectIterator() { - index = started++; - if (index < size) { - iterator(collection[keys[index]], createCallback(index)); - } - } - - function objectIteratorWithKey() { - index = started++; - if (index < size) { - key = keys[index]; - iterator(collection[key], key, createCallback(index)); - } - } - - function createCallback(index) { - return function(err, res) { - if (index === null) { - throwError(); - } - if (err) { - index = null; - iterate = noop; - callback = once(callback); - callback(err, createArray(result)); - return; - } - result[index] = res; - index = null; - if (++completed === size) { - iterate = throwError; - callback(null, result); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @memberof async - * @namespace mapValuesSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesSeries(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2 } - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesSeries(array, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2 } - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesSeries(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2 } - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesSeries(object, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2 } - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - function mapValuesSeries(collection, iterator, callback) { - callback = callback || noop; - var size, key, keys, iter, item, iterate; - var sync = false; - var result = {}; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, result); - } - iterate(); - - function arrayIterator() { - key = completed; - iterator(collection[completed], done); - } - - function arrayIteratorWithIndex() { - key = completed; - iterator(collection[completed], completed, done); - } - - function symbolIterator() { - key = completed; - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, done); - } - - function symbolIteratorWithKey() { - key = completed; - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, completed, done); - } - - function objectIterator() { - key = keys[completed]; - iterator(collection[key], done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - iterator(collection[key], key, done); - } - - function done(err, res) { - if (err) { - iterate = throwError; - callback = onlyOnce(callback); - callback(err, objectClone(result)); - return; - } - result[key] = res; - if (++completed === size) { - iterate = throwError; - callback(null, result); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace mapValuesLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 5, '2': 3, '3': 4, '4': 2 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 5, '2': 3, '3': 4, '4': 2 } - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 5, c: 3, d: 4, e: 2 } - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.mapValuesLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 5, c: 3, d: 4, e: 2 } - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - function mapValuesLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, keys, iter, item, iterate; - var sync = false; - var result = {}; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, result); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - iterator(collection[index], createCallback(index)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - iterator(collection[index], index, createCallback(index)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, started, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function objectIterator() { - index = started++; - if (index < size) { - key = keys[index]; - iterator(collection[key], createCallback(key)); - } - } - - function objectIteratorWithKey() { - index = started++; - if (index < size) { - key = keys[index]; - iterator(collection[key], key, createCallback(key)); - } - } - - function createCallback(key) { - return function(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - iterate = noop; - callback = once(callback); - callback(err, objectClone(result)); - return; - } - result[key] = res; - key = null; - if (++completed === size) { - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - * @param {boolean} bool - */ - function createDetect(arrayEach, baseEach, symbolEach, bool) { - return function(collection, iterator, callback) { - callback = callback || noop; - var size, keys; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - callback(null); - } - - function createCallback(value) { - var called = false; - return function done(err, res) { - if (called) { - throwError(); - } - called = true; - if (err) { - callback = once(callback); - callback(err); - } else if (!!res === bool) { - callback = once(callback); - callback(null, value); - } else if (++completed === size) { - callback(null); - } - }; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createDetectSeries(bool) { - return function(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, value, keys, iter, item, iterate; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null); - } - iterate(); - - function arrayIterator() { - value = collection[completed]; - iterator(value, done); - } - - function arrayIteratorWithIndex() { - value = collection[completed]; - iterator(value, completed, done); - } - - function symbolIterator() { - item = iter.next(); - value = item.value; - item.done ? callback(null) : iterator(value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - value = item.value; - item.done ? callback(null) : iterator(value, completed, done); - } - - function objectIterator() { - value = collection[keys[completed]]; - iterator(value, done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - value = collection[key]; - iterator(value, key, done); - } - - function done(err, res) { - if (err) { - callback(err); - } else if (!!res === bool) { - iterate = throwError; - callback(null, value); - } else if (++completed === size) { - iterate = throwError; - callback(null); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createDetectLimit(bool) { - return function(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, value, keys, iter, item, iterate; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, createCallback(value)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, index, createCallback(value)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - started++; - value = item.value; - iterator(value, createCallback(value)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, started++, createCallback(value)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null); - } - } - - function objectIterator() { - index = started++; - if (index < size) { - value = collection[keys[index]]; - iterator(value, createCallback(value)); - } - } - - function objectIteratorWithKey() { - if (started < size) { - key = keys[started++]; - value = collection[key]; - iterator(value, key, createCallback(value)); - } - } - - function createCallback(value) { - var called = false; - return function(err, res) { - if (called) { - throwError(); - } - called = true; - if (err) { - iterate = noop; - callback = once(callback); - callback(err); - } else if (!!res === bool) { - iterate = noop; - callback = once(callback); - callback(null, value); - } else if (++completed === size) { - callback(null); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - }; - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - * @param {boolean} bool - */ - function createPick(arrayEach, baseEach, symbolEach, bool) { - return function(collection, iterator, callback) { - callback = callback || noop; - var size, keys; - var completed = 0; - var result = {}; - - if (isArray(collection)) { - size = collection.length; - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, result); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - return callback(null, {}); - } - - function createCallback(key, value) { - return function done(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - callback = once(callback); - callback(err, objectClone(result)); - return; - } - if (!!res === bool) { - result[key] = value; - } - key = null; - if (++completed === size) { - callback(null, result); - } - }; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createPickSeries(bool) { - return function(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, value, keys, iter, item, iterate; - var sync = false; - var result = {}; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, {}); - } - iterate(); - - function arrayIterator() { - key = completed; - value = collection[completed]; - iterator(value, done); - } - - function arrayIteratorWithIndex() { - key = completed; - value = collection[completed]; - iterator(value, completed, done); - } - - function symbolIterator() { - key = completed; - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, done); - } - - function symbolIteratorWithKey() { - key = completed; - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, key, done); - } - - function objectIterator() { - key = keys[completed]; - value = collection[key]; - iterator(value, done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - value = collection[key]; - iterator(value, key, done); - } - - function done(err, res) { - if (err) { - callback(err, result); - return; - } - if (!!res === bool) { - result[key] = value; - } - if (++completed === size) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - }; - } - - /** - * @private - * @param {boolean} bool - */ - function createPickLimit(bool) { - return function(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, value, keys, iter, item, iterate; - var sync = false; - var result = {}; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, {}); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, createCallback(value, index)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, index, createCallback(value, index)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, started, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function objectIterator() { - if (started < size) { - key = keys[started++]; - value = collection[key]; - iterator(value, createCallback(value, key)); - } - } - - function objectIteratorWithKey() { - if (started < size) { - key = keys[started++]; - value = collection[key]; - iterator(value, key, createCallback(value, key)); - } - } - - function createCallback(value, key) { - return function(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - iterate = noop; - callback = once(callback); - callback(err, objectClone(result)); - return; - } - if (!!res === bool) { - result[key] = value; - } - key = null; - if (++completed === size) { - iterate = throwError; - callback = onlyOnce(callback); - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - }; - } - - /** - * @memberof async - * @namespace reduce - * @param {Array|Object} collection - * @param {*} result - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduce(collection, 0, iterator, function(err, res) { - * console.log(res); // 10 - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduce(collection, '', iterator, function(err, res) { - * console.log(res); // '1324' - * console.log(order); // [[1, 0], [3, 1], [2, 2], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduce(collection, '', iterator, function(err, res) { - * console.log(res); // '1324' - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduce(collection, 0, iterator, function(err, res) { - * console.log(res); // 10 - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'b'], [4, 'd']] - * }); - * - */ - function reduce(collection, result, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, keys, iter, item, iterate; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 4 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 4 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 4 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, result); - } - iterate(result); - - function arrayIterator(result) { - iterator(result, collection[completed], done); - } - - function arrayIteratorWithIndex(result) { - iterator(result, collection[completed], completed, done); - } - - function symbolIterator(result) { - item = iter.next(); - item.done ? callback(null, result) : iterator(result, item.value, done); - } - - function symbolIteratorWithKey(result) { - item = iter.next(); - item.done ? callback(null, result) : iterator(result, item.value, completed, done); - } - - function objectIterator(result) { - iterator(result, collection[keys[completed]], done); - } - - function objectIteratorWithKey(result) { - key = keys[completed]; - iterator(result, collection[key], key, done); - } - - function done(err, result) { - if (err) { - callback(err, result); - } else if (++completed === size) { - iterator = throwError; - callback(null, result); - } else if (sync) { - nextTick(function() { - iterate(result); - }); - } else { - sync = true; - iterate(result); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace reduceRight - * @param {Array|Object} collection - * @param {*} result - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduceRight(collection, 0, iterator, function(err, res) { - * console.log(res); // 10 - * console.log(order); // [4, 2, 3, 1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduceRight(collection, '', iterator, function(err, res) { - * console.log(res); // '4231' - * console.log(order); // [[4, 3], [2, 2], [3, 1], [1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduceRight(collection, '', iterator, function(err, res) { - * console.log(res); // '4231' - * console.log(order); // [4, 2, 3, 1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, result + num); - * }, num * 10); - * }; - * async.reduceRight(collection, 0, iterator, function(err, res) { - * console.log(res); // 10 - * console.log(order); // [[4, 3], [2, 2], [3, 1], [1, 0]] - * }); - * - */ - function reduceRight(collection, result, iterator, callback) { - callback = onlyOnce(callback || noop); - var resIndex, index, key, keys, iter, item, col, iterate; - var sync = false; - - if (isArray(collection)) { - resIndex = collection.length; - iterate = iterator.length === 4 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - col = []; - iter = collection[iteratorSymbol](); - index = -1; - while ((item = iter.next()).done === false) { - col[++index] = item.value; - } - collection = col; - resIndex = col.length; - iterate = iterator.length === 4 ? arrayIteratorWithIndex : arrayIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - resIndex = keys.length; - iterate = iterator.length === 4 ? objectIteratorWithKey : objectIterator; - } - if (!resIndex) { - return callback(null, result); - } - iterate(result); - - function arrayIterator(result) { - iterator(result, collection[--resIndex], done); - } - - function arrayIteratorWithIndex(result) { - iterator(result, collection[--resIndex], resIndex, done); - } - - function objectIterator(result) { - iterator(result, collection[keys[--resIndex]], done); - } - - function objectIteratorWithKey(result) { - key = keys[--resIndex]; - iterator(result, collection[key], key, done); - } - - function done(err, result) { - if (err) { - callback(err, result); - } else if (resIndex === 0) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(function() { - iterate(result); - }); - } else { - sync = true; - iterate(result); - } - sync = false; - } - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - */ - function createTransform(arrayEach, baseEach, symbolEach) { - return function transform(collection, accumulator, iterator, callback) { - if (arguments.length === 3) { - callback = iterator; - iterator = accumulator; - accumulator = undefined; - } - callback = callback || noop; - var size, keys, result; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = accumulator !== undefined ? accumulator : []; - arrayEach(collection, result, iterator, done); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - result = accumulator !== undefined ? accumulator : {}; - size = symbolEach(collection, result, iterator, done); - size && size === completed && callback(null, result); - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - result = accumulator !== undefined ? accumulator : {}; - baseEach(collection, result, iterator, done, keys); - } - if (!size) { - callback(null, accumulator !== undefined ? accumulator : result || {}); - } - - function done(err, bool) { - if (err) { - callback = once(callback); - callback(err, isArray(result) ? createArray(result) : objectClone(result)); - } else if (++completed === size) { - callback(null, result); - } else if (bool === false) { - callback = once(callback); - callback(null, isArray(result) ? createArray(result) : objectClone(result)); - } - } - }; - } - - /** - * @memberof async - * @namespace transformSeries - * @param {Array|Object} collection - * @param {Array|Object|Function} [accumulator] - * @param {Function} [iterator] - * @param {Function} [callback] - * @example - * - * // array - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num) - * done(); - * }, num * 10); - * }; - * async.transformSeries(collection, iterator, function(err, res) { - * console.log(res); // [1, 3, 2, 4] - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // array with index and accumulator - * var order = []; - * var collection = [1, 3, 2, 4]; - * var iterator = function(result, num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * result[index] = num; - * done(); - * }, num * 10); - * }; - * async.transformSeries(collection, {}, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 3, '2': 2, '3': 4 } - * console.log(order); // [[1, 0], [3, 1], [2, 2], [4, 3]] - * }); - * - * @example - * - * // object with accumulator - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num); - * done(); - * }, num * 10); - * }; - * async.transformSeries(collection, [], iterator, function(err, res) { - * console.log(res); // [1, 3, 2, 4] - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2, d: 4 }; - * var iterator = function(result, num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * result[key] = num; - * done(); - * }, num * 10); - * }; - * async.transformSeries(collection, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 3, c: 2, d: 4 } - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'b'], [4, 'd']] - * }); - * - */ - function transformSeries(collection, accumulator, iterator, callback) { - if (arguments.length === 3) { - callback = iterator; - iterator = accumulator; - accumulator = undefined; - } - callback = onlyOnce(callback || noop); - var size, key, keys, iter, item, iterate, result; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = accumulator !== undefined ? accumulator : []; - iterate = iterator.length === 4 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - result = accumulator !== undefined ? accumulator : {}; - iterate = iterator.length === 4 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - result = accumulator !== undefined ? accumulator : {}; - iterate = iterator.length === 4 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, accumulator !== undefined ? accumulator : result || {}); - } - iterate(); - - function arrayIterator() { - iterator(result, collection[completed], done); - } - - function arrayIteratorWithIndex() { - iterator(result, collection[completed], completed, done); - } - - function symbolIterator() { - item = iter.next(); - item.done ? callback(null, result) : iterator(result, item.value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - item.done ? callback(null, result) : iterator(result, item.value, completed, done); - } - - function objectIterator() { - iterator(result, collection[keys[completed]], done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - iterator(result, collection[key], key, done); - } - - function done(err, bool) { - if (err) { - callback(err, result); - } else if (++completed === size || bool === false) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace transformLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Array|Object|Function} [accumulator] - * @param {Function} [iterator] - * @param {Function} [callback] - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num); - * done(); - * }, num * 10); - * }; - * async.transformLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index and accumulator - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(result, num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * result[index] = key; - * done(); - * }, num * 10); - * }; - * async.transformLimit(array, 2, {}, iterator, function(err, res) { - * console.log(res); // { '0': 1, '1': 5, '2': 3, '3': 4, '4': 2 } - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object with accumulator - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(result, num, done) { - * setTimeout(function() { - * order.push(num); - * result.push(num); - * done(); - * }, num * 10); - * }; - * async.transformLimit(object, 2, [], iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(result, num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * result[key] = num; - * done(); - * }, num * 10); - * }; - * async.transformLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - function transformLimit(collection, limit, accumulator, iterator, callback) { - if (arguments.length === 4) { - callback = iterator; - iterator = accumulator; - accumulator = undefined; - } - callback = callback || noop; - var size, index, key, keys, iter, item, iterate, result; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = accumulator !== undefined ? accumulator : []; - iterate = iterator.length === 4 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - result = accumulator !== undefined ? accumulator : {}; - iterate = iterator.length === 4 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - result = accumulator !== undefined ? accumulator : {}; - iterate = iterator.length === 4 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, accumulator !== undefined ? accumulator : result || {}); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - iterator(result, collection[index], onlyOnce(done)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - iterator(result, collection[index], index, onlyOnce(done)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - started++; - iterator(result, item.value, onlyOnce(done)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - iterator(result, item.value, started++, onlyOnce(done)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function objectIterator() { - index = started++; - if (index < size) { - iterator(result, collection[keys[index]], onlyOnce(done)); - } - } - - function objectIteratorWithKey() { - index = started++; - if (index < size) { - key = keys[index]; - iterator(result, collection[key], key, onlyOnce(done)); - } - } - - function done(err, bool) { - if (err || bool === false) { - iterate = noop; - callback(err || null, isArray(result) ? createArray(result) : objectClone(result)); - callback = noop; - } else if (++completed === size) { - iterator = noop; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @private - * @param {function} arrayEach - * @param {function} baseEach - * @param {function} symbolEach - */ - function createSortBy(arrayEach, baseEach, symbolEach) { - return function sortBy(collection, iterator, callback) { - callback = callback || noop; - var size, array, criteria; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - array = Array(size); - criteria = Array(size); - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - array = []; - criteria = []; - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, sortByCriteria(array, criteria)); - } else if (typeof collection === obj) { - var keys = nativeKeys(collection); - size = keys.length; - array = Array(size); - criteria = Array(size); - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - callback(null, []); - } - - function createCallback(index, value) { - var called = false; - array[index] = value; - return function done(err, criterion) { - if (called) { - throwError(); - } - called = true; - criteria[index] = criterion; - if (err) { - callback = once(callback); - callback(err); - } else if (++completed === size) { - callback(null, sortByCriteria(array, criteria)); - } - }; - } - }; - } - - /** - * @memberof async - * @namespace sortBySeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortBySeries(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.sortBySeries(array, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortBySeries(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.sortBySeries(object, iterator, function(err, res) { - * console.log(res); // [1, 2, 3] - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - function sortBySeries(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, value, keys, iter, item, array, criteria, iterate; - var sync = false; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - array = collection; - criteria = Array(size); - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - array = []; - criteria = []; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - array = Array(size); - criteria = Array(size); - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, []); - } - iterate(); - - function arrayIterator() { - value = collection[completed]; - iterator(value, done); - } - - function arrayIteratorWithIndex() { - value = collection[completed]; - iterator(value, completed, done); - } - - function symbolIterator() { - item = iter.next(); - if (item.done) { - return callback(null, sortByCriteria(array, criteria)); - } - value = item.value; - array[completed] = value; - iterator(value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done) { - return callback(null, sortByCriteria(array, criteria)); - } - value = item.value; - array[completed] = value; - iterator(value, completed, done); - } - - function objectIterator() { - value = collection[keys[completed]]; - array[completed] = value; - iterator(value, done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - value = collection[key]; - array[completed] = value; - iterator(value, key, done); - } - - function done(err, criterion) { - criteria[completed] = criterion; - if (err) { - callback(err); - } else if (++completed === size) { - iterate = throwError; - callback(null, sortByCriteria(array, criteria)); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace sortByLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortByLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4, 5] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num); - * }, num * 10); - * }; - * async.sortByLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4, 5] - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num); - * }, num * 10); - * }; - * async.sortByLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4, 5] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.sortByLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 2, 3, 4, 5] - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - function sortByLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, value, array, keys, iter, item, criteria, iterate; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - array = collection; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - array = []; - criteria = []; - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - array = Array(size); - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, []); - } - criteria = criteria || Array(size); - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - if (started < size) { - value = collection[started]; - iterator(value, createCallback(value, started++)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, index, createCallback(value, index)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - value = item.value; - array[started] = value; - iterator(value, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, sortByCriteria(array, criteria)); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - value = item.value; - array[started] = value; - iterator(value, started, createCallback(value, started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, sortByCriteria(array, criteria)); - } - } - - function objectIterator() { - if (started < size) { - value = collection[keys[started]]; - array[started] = value; - iterator(value, createCallback(value, started++)); - } - } - - function objectIteratorWithKey() { - if (started < size) { - key = keys[started]; - value = collection[key]; - array[started] = value; - iterator(value, key, createCallback(value, started++)); - } - } - - function createCallback(value, index) { - var called = false; - return function(err, criterion) { - if (called) { - throwError(); - } - called = true; - criteria[index] = criterion; - if (err) { - iterate = noop; - callback(err); - callback = noop; - } else if (++completed === size) { - callback(null, sortByCriteria(array, criteria)); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @memberof async - * @namespace some - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.some(array, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.some(array, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.some(object, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.some(object, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 'a']] - * }); - * - */ - function some(collection, iterator, callback) { - callback = callback || noop; - detect(collection, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !!res); - } - } - - /** - * @memberof async - * @namespace someSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someSeries(array, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someSeries(array, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someSeries(object, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someSeries(object, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 'a']] - * }); - * - */ - function someSeries(collection, iterator, callback) { - callback = callback || noop; - detectSeries(collection, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !!res); - } - } - - /** - * @memberof async - * @namespace someLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someLimit(array, 2, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someLimit(array, 2, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 0]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someLimit(object, 2, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num % 2); - * }, num * 10); - * }; - * async.someLimit(object, 2, iterator, function(err, res) { - * console.log(res); // true - * console.log(order); // [[1, 'a']] - * }); - * - */ - function someLimit(collection, limit, iterator, callback) { - callback = callback || noop; - detectLimit(collection, limit, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !!res); - } - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - */ - function createEvery(arrayEach, baseEach, symbolEach) { - var deny = createDetect(arrayEach, baseEach, symbolEach, false); - - return function every(collection, iterator, callback) { - callback = callback || noop; - deny(collection, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !res); - } - }; - } - - /** - * @private - */ - function createEverySeries() { - var denySeries = createDetectSeries(false); - - return function everySeries(collection, iterator, callback) { - callback = callback || noop; - denySeries(collection, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !res); - } - }; - } - - /** - * @private - */ - function createEveryLimit() { - var denyLimit = createDetectLimit(false); - - return function everyLimit(collection, limit, iterator, callback) { - callback = callback || noop; - denyLimit(collection, limit, iterator, done); - - function done(err, res) { - if (err) { - return callback(err); - } - callback(null, !res); - } - }; - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - */ - function createConcat(arrayEach, baseEach, symbolEach) { - return function concat(collection, iterator, callback) { - callback = callback || noop; - var size, result; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - result = Array(size); - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - result = []; - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, result); - } else if (typeof collection === obj) { - var keys = nativeKeys(collection); - size = keys.length; - result = Array(size); - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - callback(null, []); - } - - function createCallback(index) { - return function done(err, res) { - if (index === null) { - throwError(); - } - if (err) { - index = null; - callback = once(callback); - arrayEachSync(result, function(array, index) { - if (array === undefined) { - result[index] = noop; - } - }); - callback(err, makeConcatResult(result)); - return; - } - switch (arguments.length) { - case 0: - case 1: - result[index] = noop; - break; - case 2: - result[index] = res; - break; - default: - result[index] = slice(arguments, 1); - break; - } - index = null; - if (++completed === size) { - callback(null, makeConcatResult(result)); - } - }; - } - }; - } - - /** - * @memberof async - * @namespace concatSeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2]; - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 3, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatSeries(array, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 0], [3, 1], [2, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [1, 3, 2] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 3, c: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatSeries(object, iterator, function(err, res) { - * console.log(res); // [1, 3, 2] - * console.log(order); // [[1, 'a'], [3, 'b'], [2, 'c']] - * }); - * - */ - function concatSeries(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, keys, iter, item, iterate; - var sync = false; - var result = []; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, result); - } - iterate(); - - function arrayIterator() { - iterator(collection[completed], done); - } - - function arrayIteratorWithIndex() { - iterator(collection[completed], completed, done); - } - - function symbolIterator() { - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - item.done ? callback(null, result) : iterator(item.value, completed, done); - } - - function objectIterator() { - iterator(collection[keys[completed]], done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - iterator(collection[key], key, done); - } - - function done(err, array) { - if (isArray(array)) { - nativePush.apply(result, array); - } else if (arguments.length >= 2) { - nativePush.apply(result, slice(arguments, 1)); - } - if (err) { - callback(err, result); - } else if (++completed === size) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace concatLimit - * @param {Array|Object} collection - * @param {number} limit - limit >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1, 5, 3, 4, 2]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, [num]); - * }, num * 10); - * }; - * async.cocnatLimit(array, 2, iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [[1, 0], [3, 2], [5, 1], [2, 4], [4, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, [num]); - * }, num * 10); - * }; - * async.concatLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [1, 3, 5, 2, 4] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1, b: 5, c: 3, d: 4, e: 2 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, num); - * }, num * 10); - * }; - * async.cocnatLimit(object, 2, iterator, function(err, res) { - * console.log(res); // [1, 3, 5, 2, 4] - * console.log(order); // [[1, 'a'], [3, 'c'], [5, 'b'], [2, 'e'], [4, 'd']] - * }); - * - */ - function concatLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, key, iter, item, iterate, result; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - result = []; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - var keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, []); - } - result = result || Array(size); - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - if (started < size) { - iterator(collection[started], createCallback(started++)); - } - } - - function arrayIteratorWithIndex() { - if (started < size) { - iterator(collection[started], started, createCallback(started++)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, makeConcatResult(result)); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - iterator(item.value, started, createCallback(started++)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, makeConcatResult(result)); - } - } - - function objectIterator() { - if (started < size) { - iterator(collection[keys[started]], createCallback(started++)); - } - } - - function objectIteratorWithKey() { - if (started < size) { - key = keys[started]; - iterator(collection[key], key, createCallback(started++)); - } - } - - function createCallback(index) { - return function(err, res) { - if (index === null) { - throwError(); - } - if (err) { - index = null; - iterate = noop; - callback = once(callback); - arrayEachSync(result, function(array, index) { - if (array === undefined) { - result[index] = noop; - } - }); - callback(err, makeConcatResult(result)); - return; - } - switch (arguments.length) { - case 0: - case 1: - result[index] = noop; - break; - case 2: - result[index] = res; - break; - default: - result[index] = slice(arguments, 1); - break; - } - index = null; - if (++completed === size) { - iterate = throwError; - callback(null, makeConcatResult(result)); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - * @param {Function} symbolEach - */ - function createGroupBy(arrayEach, baseEach, symbolEach) { - return function groupBy(collection, iterator, callback) { - callback = callback || noop; - var size; - var completed = 0; - var result = {}; - - if (isArray(collection)) { - size = collection.length; - arrayEach(collection, iterator, createCallback); - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = symbolEach(collection, iterator, createCallback); - size && size === completed && callback(null, result); - } else if (typeof collection === obj) { - var keys = nativeKeys(collection); - size = keys.length; - baseEach(collection, iterator, createCallback, keys); - } - if (!size) { - callback(null, {}); - } - - function createCallback(value) { - var called = false; - return function done(err, key) { - if (called) { - throwError(); - } - called = true; - if (err) { - callback = once(callback); - callback(err, objectClone(result)); - return; - } - var array = result[key]; - if (!array) { - result[key] = [value]; - } else { - array.push(value); - } - if (++completed === size) { - callback(null, result); - } - }; - } - }; - } - - /** - * @memberof async - * @namespace groupBySeries - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [4.2, 6.4, 6.1]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBySeries(array, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.4, 6.1] } - * console.log(order); // [4.2, 6.4, 6.1] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [4.2, 6.4, 6.1]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBySeries(array, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.4, 6.1] } - * console.log(order); // [[4.2, 0], [6.4, 1], [6.1, 2]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 4.2, b: 6.4, c: 6.1 }; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBySeries(object, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.4, 6.1] } - * console.log(order); // [4.2, 6.4, 6.1] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 4.2, b: 6.4, c: 6.1 }; - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupBySeries(object, iterator, function(err, res) { - * console.log(res); // { '4': [4.2], '6': [6.4, 6.1] } - * console.log(order); // [[4.2, 'a'], [6.4, 'b'], [6.1, 'c']] - * }); - * - */ - function groupBySeries(collection, iterator, callback) { - callback = onlyOnce(callback || noop); - var size, key, value, keys, iter, item, iterate; - var sync = false; - var completed = 0; - var result = {}; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size) { - return callback(null, result); - } - iterate(); - - function arrayIterator() { - value = collection[completed]; - iterator(value, done); - } - - function arrayIteratorWithIndex() { - value = collection[completed]; - iterator(value, completed, done); - } - - function symbolIterator() { - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, done); - } - - function symbolIteratorWithKey() { - item = iter.next(); - value = item.value; - item.done ? callback(null, result) : iterator(value, completed, done); - } - - function objectIterator() { - value = collection[keys[completed]]; - iterator(value, done); - } - - function objectIteratorWithKey() { - key = keys[completed]; - value = collection[key]; - iterator(value, key, done); - } - - function done(err, key) { - if (err) { - iterate = throwError; - callback = onlyOnce(callback); - callback(err, objectClone(result)); - return; - } - var array = result[key]; - if (!array) { - result[key] = [value]; - } else { - array.push(value); - } - if (++completed === size) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace groupByLimit - * @param {Array|Object} collection - * @param {Function} iterator - * @param {Function} callback - * @example - * - * // array - * var order = []; - * var array = [1.1, 5.9, 3.2, 3.9, 2.1]; - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupByLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '1': [1.1], '3': [3.2, 3.9], '5': [5.9], '2': [2.1] } - * console.log(order); // [1.1, 3.2, 5.9, 2.1, 3.9] - * }); - * - * @example - * - * // array with index - * var order = []; - * var array = [1.1, 5.9, 3.2, 3.9, 2.1]; - * var iterator = function(num, index, done) { - * setTimeout(function() { - * order.push([num, index]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupByLimit(array, 2, iterator, function(err, res) { - * console.log(res); // { '1': [1.1], '3': [3.2, 3.9], '5': [5.9], '2': [2.1] } - * console.log(order); // [[1.1, 0], [3.2, 2], [5.9, 1], [2.1, 4], [3.9, 3]] - * }); - * - * @example - * - * // object - * var order = []; - * var object = { a: 1.1, b: 5.9, c: 3.2, d: 3.9, e: 2.1 } - * var iterator = function(num, done) { - * setTimeout(function() { - * order.push(num); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupByLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { '1': [1.1], '3': [3.2, 3.9], '5': [5.9], '2': [2.1] } - * console.log(order); // [1.1, 3.2, 5.9, 2.1, 3.9] - * }); - * - * @example - * - * // object with key - * var order = []; - * var object = { a: 1.1, b: 5.9, c: 3.2, d: 3.9, e: 2.1 } - * var iterator = function(num, key, done) { - * setTimeout(function() { - * order.push([num, key]); - * done(null, Math.floor(num)); - * }, num * 10); - * }; - * async.groupByLimit(object, 2, iterator, function(err, res) { - * console.log(res); // { '1': [1.1], '3': [3.2, 3.9], '5': [5.9], '2': [2.1] } - * console.log(order); // [[1.1, 'a'], [3.2, 'c'], [5.9, 'b'], [2.1, 'e'], [3.9, 'd']] - * }); - * - */ - function groupByLimit(collection, limit, iterator, callback) { - callback = callback || noop; - var size, index, key, value, keys, iter, item, iterate; - var sync = false; - var started = 0; - var completed = 0; - var result = {}; - - if (isArray(collection)) { - size = collection.length; - iterate = iterator.length === 3 ? arrayIteratorWithIndex : arrayIterator; - } else if (!collection) { - } else if (iteratorSymbol && collection[iteratorSymbol]) { - size = Infinity; - iter = collection[iteratorSymbol](); - iterate = iterator.length === 3 ? symbolIteratorWithKey : symbolIterator; - } else if (typeof collection === obj) { - keys = nativeKeys(collection); - size = keys.length; - iterate = iterator.length === 3 ? objectIteratorWithKey : objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, result); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - if (started < size) { - value = collection[started++]; - iterator(value, createCallback(value)); - } - } - - function arrayIteratorWithIndex() { - index = started++; - if (index < size) { - value = collection[index]; - iterator(value, index, createCallback(value)); - } - } - - function symbolIterator() { - item = iter.next(); - if (item.done === false) { - started++; - value = item.value; - iterator(value, createCallback(value)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function symbolIteratorWithKey() { - item = iter.next(); - if (item.done === false) { - value = item.value; - iterator(value, started++, createCallback(value)); - } else if (completed === started && iterator !== noop) { - iterator = noop; - callback(null, result); - } - } - - function objectIterator() { - if (started < size) { - value = collection[keys[started++]]; - iterator(value, createCallback(value)); - } - } - - function objectIteratorWithKey() { - if (started < size) { - key = keys[started++]; - value = collection[key]; - iterator(value, key, createCallback(value)); - } - } - - function createCallback(value) { - var called = false; - return function(err, key) { - if (called) { - throwError(); - } - called = true; - if (err) { - iterate = noop; - callback = once(callback); - callback(err, objectClone(result)); - return; - } - var array = result[key]; - if (!array) { - result[key] = [value]; - } else { - array.push(value); - } - if (++completed === size) { - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @private - * @param {Function} arrayEach - * @param {Function} baseEach - */ - function createParallel(arrayEach, baseEach) { - return function parallel(tasks, callback) { - callback = callback || noop; - var size, keys, result; - var completed = 0; - - if (isArray(tasks)) { - size = tasks.length; - result = Array(size); - arrayEach(tasks, createCallback); - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - size = keys.length; - result = {}; - baseEach(tasks, createCallback, keys); - } - if (!size) { - callback(null, result); - } - - function createCallback(key) { - return function(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - callback = once(callback); - callback(err, result); - return; - } - result[key] = arguments.length <= 2 ? res : slice(arguments, 1); - key = null; - if (++completed === size) { - callback(null, result); - } - }; - } - }; - } - - /** - * @memberof async - * @namespace series - * @param {Array|Object} tasks - functions - * @param {Function} callback - * @example - * - * var order = []; - * var tasks = [ - * function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 30); - * }, - * function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 40); - * }, - * function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 20); - * } - * ]; - * async.series(tasks, function(err, res) { - * console.log(res); // [1, 2, 3, 4]; - * console.log(order); // [1, 2, 3, 4] - * }); - * - * @example - * - * var order = []; - * var tasks = { - * 'a': function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * 'b': function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 30); - * }, - * 'c': function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 40); - * }, - * 'd': function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 20); - * } - * }; - * async.series(tasks, function(err, res) { - * console.log(res); // { a: 1, b: 2, c: 3, d:4 } - * console.log(order); // [1, 4, 2, 3] - * }); - * - */ - function series(tasks, callback) { - callback = callback || noop; - var size, key, keys, result, iterate; - var sync = false; - var completed = 0; - - if (isArray(tasks)) { - size = tasks.length; - result = Array(size); - iterate = arrayIterator; - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - size = keys.length; - result = {}; - iterate = objectIterator; - } else { - return callback(null); - } - if (!size) { - return callback(null, result); - } - iterate(); - - function arrayIterator() { - key = completed; - tasks[completed](done); - } - - function objectIterator() { - key = keys[completed]; - tasks[key](done); - } - - function done(err, res) { - if (err) { - iterate = throwError; - callback = onlyOnce(callback); - callback(err, result); - return; - } - result[key] = arguments.length <= 2 ? res : slice(arguments, 1); - if (++completed === size) { - iterate = throwError; - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace parallelLimit - * @param {Array|Object} tasks - functions - * @param {number} limit - limit >= 1 - * @param {Function} callback - * @example - * - * var order = []; - * var tasks = [ - * function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 50); - * }, - * function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 30); - * }, - * function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 40); - * } - * ]; - * async.parallelLimit(tasks, 2, function(err, res) { - * console.log(res); // [1, 2, 3, 4]; - * console.log(order); // [1, 3, 2, 4] - * }); - * - * @example - * - * var order = []; - * var tasks = { - * 'a': function(done) { - * setTimeout(function() { - * order.push(1); - * done(null, 1); - * }, 10); - * }, - * 'b': function(done) { - * setTimeout(function() { - * order.push(2); - * done(null, 2); - * }, 50); - * }, - * 'c': function(done) { - * setTimeout(function() { - * order.push(3); - * done(null, 3); - * }, 20); - * }, - * 'd': function(done) { - * setTimeout(function() { - * order.push(4); - * done(null, 4); - * }, 40); - * } - * }; - * async.parallelLimit(tasks, 2, function(err, res) { - * console.log(res); // { a: 1, b: 2, c: 3, d:4 } - * console.log(order); // [1, 3, 2, 4] - * }); - * - */ - function parallelLimit(tasks, limit, callback) { - callback = callback || noop; - var size, index, key, keys, result, iterate; - var sync = false; - var started = 0; - var completed = 0; - - if (isArray(tasks)) { - size = tasks.length; - result = Array(size); - iterate = arrayIterator; - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - size = keys.length; - result = {}; - iterate = objectIterator; - } - if (!size || isNaN(limit) || limit < 1) { - return callback(null, result); - } - timesSync(limit > size ? size : limit, iterate); - - function arrayIterator() { - index = started++; - if (index < size) { - tasks[index](createCallback(index)); - } - } - - function objectIterator() { - if (started < size) { - key = keys[started++]; - tasks[key](createCallback(key)); - } - } - - function createCallback(key) { - return function(err, res) { - if (key === null) { - throwError(); - } - if (err) { - key = null; - iterate = noop; - callback = once(callback); - callback(err, result); - return; - } - result[key] = arguments.length <= 2 ? res : slice(arguments, 1); - key = null; - if (++completed === size) { - callback(null, result); - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @memberof async - * @namespace tryEach - * @param {Array|Object} tasks - functions - * @param {Function} callback - * @example - * - * var tasks = [ - * function(done) { - * setTimeout(function() { - * done(new Error('error')); - * }, 10); - * }, - * function(done) { - * setTimeout(function() { - * done(null, 2); - * }, 10); - * } - * ]; - * async.tryEach(tasks, function(err, res) { - * console.log(res); // 2 - * }); - * - * @example - * - * var tasks = [ - * function(done) { - * setTimeout(function() { - * done(new Error('error1')); - * }, 10); - * }, - * function(done) { - * setTimeout(function() { - * done(new Error('error2'); - * }, 10); - * } - * ]; - * async.tryEach(tasks, function(err, res) { - * console.log(err); // error2 - * console.log(res); // undefined - * }); - * - */ - function tryEach(tasks, callback) { - callback = callback || noop; - var size, keys, iterate; - var sync = false; - var completed = 0; - - if (isArray(tasks)) { - size = tasks.length; - iterate = arrayIterator; - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - size = keys.length; - iterate = objectIterator; - } - if (!size) { - return callback(null); - } - iterate(); - - function arrayIterator() { - tasks[completed](done); - } - - function objectIterator() { - tasks[keys[completed]](done); - } - - function done(err, res) { - if (!err) { - if (arguments.length <= 2) { - callback(null, res); - } else { - callback(null, slice(arguments, 1)); - } - } else if (++completed === size) { - callback(err); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * check for waterfall tasks - * @private - * @param {Array} tasks - * @param {Function} callback - * @return {boolean} - */ - function checkWaterfallTasks(tasks, callback) { - if (!isArray(tasks)) { - callback(new Error('First argument to waterfall must be an array of functions')); - return false; - } - if (tasks.length === 0) { - callback(null); - return false; - } - return true; - } - - /** - * check for waterfall tasks - * @private - * @param {function} func - * @param {Array|Object} args - arguments - * @return {function} next - */ - function waterfallIterator(func, args, next) { - switch (args.length) { - case 0: - case 1: - return func(next); - case 2: - return func(args[1], next); - case 3: - return func(args[1], args[2], next); - case 4: - return func(args[1], args[2], args[3], next); - case 5: - return func(args[1], args[2], args[3], args[4], next); - case 6: - return func(args[1], args[2], args[3], args[4], args[5], next); - default: - args = slice(args, 1); - args.push(next); - return func.apply(null, args); - } - } - - /** - * @memberof async - * @namespace waterfall - * @param {Array} tasks - functions - * @param {Function} callback - * @example - * - * var order = []; - * var tasks = [ - * function(next) { - * setTimeout(function() { - * order.push(1); - * next(null, 1); - * }, 10); - * }, - * function(arg1, next) { - * setTimeout(function() { - * order.push(2); - * next(null, 1, 2); - * }, 30); - * }, - * function(arg1, arg2, next) { - * setTimeout(function() { - * order.push(3); - * next(null, 3); - * }, 20); - * }, - * function(arg1, next) { - * setTimeout(function() { - * order.push(4); - * next(null, 1, 2, 3, 4); - * }, 40); - * } - * ]; - * async.waterfall(tasks, function(err, arg1, arg2, arg3, arg4) { - * console.log(arg1, arg2, arg3, arg4); // 1 2 3 4 - * }); - * - */ - function waterfall(tasks, callback) { - callback = callback || noop; - if (!checkWaterfallTasks(tasks, callback)) { - return; - } - var func, args, done, sync; - var completed = 0; - var size = tasks.length; - waterfallIterator(tasks[0], [], createCallback(0)); - - function iterate() { - waterfallIterator(func, args, createCallback(func)); - } - - function createCallback(index) { - return function next(err, res) { - if (index === undefined) { - callback = noop; - throwError(); - } - index = undefined; - if (err) { - done = callback; - callback = throwError; - done(err); - return; - } - if (++completed === size) { - done = callback; - callback = throwError; - if (arguments.length <= 2) { - done(err, res); - } else { - done.apply(null, createArray(arguments)); - } - return; - } - if (sync) { - args = arguments; - func = tasks[completed] || throwError; - nextTick(iterate); - } else { - sync = true; - waterfallIterator(tasks[completed] || throwError, arguments, createCallback(completed)); - } - sync = false; - }; - } - } - - /** - * `angelFall` is like `waterfall` and inject callback to last argument of next task. - * - * @memberof async - * @namespace angelFall - * @param {Array} tasks - functions - * @param {Function} callback - * @example - * - * var order = []; - * var tasks = [ - * function(next) { - * setTimeout(function() { - * order.push(1); - * next(null, 1); - * }, 10); - * }, - * function(arg1, empty, next) { - * setTimeout(function() { - * order.push(2); - * next(null, 1, 2); - * }, 30); - * }, - * function(next) { - * setTimeout(function() { - * order.push(3); - * next(null, 3); - * }, 20); - * }, - * function(arg1, empty1, empty2, empty3, next) { - * setTimeout(function() { - * order.push(4); - * next(null, 1, 2, 3, 4); - * }, 40); - * } - * ]; - * async.angelFall(tasks, function(err, arg1, arg2, arg3, arg4) { - * console.log(arg1, arg2, arg3, arg4); // 1 2 3 4 - * }); - * - */ - function angelFall(tasks, callback) { - callback = callback || noop; - if (!checkWaterfallTasks(tasks, callback)) { - return; - } - var completed = 0; - var sync = false; - var size = tasks.length; - var func = tasks[completed]; - var args = []; - var iterate = function() { - switch (func.length) { - case 0: - try { - next(null, func()); - } catch (e) { - next(e); - } - return; - case 1: - return func(next); - case 2: - return func(args[1], next); - case 3: - return func(args[1], args[2], next); - case 4: - return func(args[1], args[2], args[3], next); - case 5: - return func(args[1], args[2], args[3], args[4], next); - default: - args = slice(args, 1); - args[func.length - 1] = next; - return func.apply(null, args); - } - }; - iterate(); - - function next(err, res) { - if (err) { - iterate = throwError; - callback = onlyOnce(callback); - callback(err); - return; - } - if (++completed === size) { - iterate = throwError; - var done = callback; - callback = throwError; - if (arguments.length === 2) { - done(err, res); - } else { - done.apply(null, createArray(arguments)); - } - return; - } - func = tasks[completed]; - args = arguments; - if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace whilst - * @param {Function} test - * @param {Function} iterator - * @param {Function} callback - */ - function whilst(test, iterator, callback) { - callback = callback || noop; - var sync = false; - if (test()) { - iterate(); - } else { - callback(null); - } - - function iterate() { - if (sync) { - nextTick(next); - } else { - sync = true; - iterator(done); - } - sync = false; - } - - function next() { - iterator(done); - } - - function done(err, arg) { - if (err) { - return callback(err); - } - if (arguments.length <= 2) { - if (test(arg)) { - iterate(); - } else { - callback(null, arg); - } - return; - } - arg = slice(arguments, 1); - if (test.apply(null, arg)) { - iterate(); - } else { - callback.apply(null, [null].concat(arg)); - } - } - } - - /** - * @memberof async - * @namespace doWhilst - * @param {Function} iterator - * @param {Function} test - * @param {Function} callback - */ - function doWhilst(iterator, test, callback) { - callback = callback || noop; - var sync = false; - next(); - - function iterate() { - if (sync) { - nextTick(next); - } else { - sync = true; - iterator(done); - } - sync = false; - } - - function next() { - iterator(done); - } - - function done(err, arg) { - if (err) { - return callback(err); - } - if (arguments.length <= 2) { - if (test(arg)) { - iterate(); - } else { - callback(null, arg); - } - return; - } - arg = slice(arguments, 1); - if (test.apply(null, arg)) { - iterate(); - } else { - callback.apply(null, [null].concat(arg)); - } - } - } - - /** - * @memberof async - * @namespace until - * @param {Function} test - * @param {Function} iterator - * @param {Function} callback - */ - function until(test, iterator, callback) { - callback = callback || noop; - var sync = false; - if (!test()) { - iterate(); - } else { - callback(null); - } - - function iterate() { - if (sync) { - nextTick(next); - } else { - sync = true; - iterator(done); - } - sync = false; - } - - function next() { - iterator(done); - } - - function done(err, arg) { - if (err) { - return callback(err); - } - if (arguments.length <= 2) { - if (!test(arg)) { - iterate(); - } else { - callback(null, arg); - } - return; - } - arg = slice(arguments, 1); - if (!test.apply(null, arg)) { - iterate(); - } else { - callback.apply(null, [null].concat(arg)); - } - } - } - - /** - * @memberof async - * @namespace doUntil - * @param {Function} iterator - * @param {Function} test - * @param {Function} callback - */ - function doUntil(iterator, test, callback) { - callback = callback || noop; - var sync = false; - next(); - - function iterate() { - if (sync) { - nextTick(next); - } else { - sync = true; - iterator(done); - } - sync = false; - } - - function next() { - iterator(done); - } - - function done(err, arg) { - if (err) { - return callback(err); - } - if (arguments.length <= 2) { - if (!test(arg)) { - iterate(); - } else { - callback(null, arg); - } - return; - } - arg = slice(arguments, 1); - if (!test.apply(null, arg)) { - iterate(); - } else { - callback.apply(null, [null].concat(arg)); - } - } - } - - /** - * @memberof async - * @namespace during - * @param {Function} test - * @param {Function} iterator - * @param {Function} callback - */ - function during(test, iterator, callback) { - callback = callback || noop; - _test(); - - function _test() { - test(iterate); - } - - function iterate(err, truth) { - if (err) { - return callback(err); - } - if (truth) { - iterator(done); - } else { - callback(null); - } - } - - function done(err) { - if (err) { - return callback(err); - } - _test(); - } - } - - /** - * @memberof async - * @namespace doDuring - * @param {Function} test - * @param {Function} iterator - * @param {Function} callback - */ - function doDuring(iterator, test, callback) { - callback = callback || noop; - iterate(null, true); - - function iterate(err, truth) { - if (err) { - return callback(err); - } - if (truth) { - iterator(done); - } else { - callback(null); - } - } - - function done(err, res) { - if (err) { - return callback(err); - } - switch (arguments.length) { - case 0: - case 1: - test(iterate); - break; - case 2: - test(res, iterate); - break; - default: - var args = slice(arguments, 1); - args.push(iterate); - test.apply(null, args); - break; - } - } - } - - /** - * @memberof async - * @namespace forever - */ - function forever(iterator, callback) { - var sync = false; - iterate(); - - function iterate() { - iterator(next); - } - - function next(err) { - if (err) { - if (callback) { - return callback(err); - } - throw err; - } - if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace compose - */ - function compose() { - return seq.apply(null, reverse(arguments)); - } - - /** - * @memberof async - * @namespace seq - */ - function seq(/* functions... */) { - var fns = createArray(arguments); - - return function() { - var self = this; - var args = createArray(arguments); - var callback = args[args.length - 1]; - if (typeof callback === func) { - args.pop(); - } else { - callback = noop; - } - reduce(fns, args, iterator, done); - - function iterator(newargs, fn, callback) { - var func = function(err) { - var nextargs = slice(arguments, 1); - callback(err, nextargs); - }; - newargs.push(func); - fn.apply(self, newargs); - } - - function done(err, res) { - res = isArray(res) ? res : [res]; - res.unshift(err); - callback.apply(self, res); - } - }; - } - - function createApplyEach(func) { - return function applyEach(fns /* arguments */) { - var go = function() { - var self = this; - var args = createArray(arguments); - var callback = args.pop() || noop; - return func(fns, iterator, callback); - - function iterator(fn, done) { - fn.apply(self, args.concat([done])); - } - }; - if (arguments.length > 1) { - var args = slice(arguments, 1); - return go.apply(this, args); - } else { - return go; - } - }; - } - - /** - * @see https://github.com/caolan/async/blob/master/lib/internal/DoublyLinkedList.js - */ - function DLL() { - this.head = null; - this.tail = null; - this.length = 0; - } - - DLL.prototype._removeLink = function(node) { - var prev = node.prev; - var next = node.next; - if (prev) { - prev.next = next; - } else { - this.head = next; - } - if (next) { - next.prev = prev; - } else { - this.tail = prev; - } - node.prev = null; - node.next = null; - this.length--; - return node; - }; - - DLL.prototype.empty = DLL; - - DLL.prototype._setInitial = function(node) { - this.length = 1; - this.head = this.tail = node; - }; - - DLL.prototype.insertBefore = function(node, newNode) { - newNode.prev = node.prev; - newNode.next = node; - if (node.prev) { - node.prev.next = newNode; - } else { - this.head = newNode; - } - node.prev = newNode; - this.length++; - }; - - DLL.prototype.unshift = function(node) { - if (this.head) { - this.insertBefore(this.head, node); - } else { - this._setInitial(node); - } - }; - - DLL.prototype.push = function(node) { - var tail = this.tail; - if (tail) { - node.prev = tail; - node.next = tail.next; - this.tail = node; - tail.next = node; - this.length++; - } else { - this._setInitial(node); - } - }; - - DLL.prototype.shift = function() { - return this.head && this._removeLink(this.head); - }; - - DLL.prototype.splice = function(end) { - var task; - var tasks = []; - while (end-- && (task = this.shift())) { - tasks.push(task); - } - return tasks; - }; - - DLL.prototype.remove = function(test) { - var node = this.head; - while (node) { - if (test(node)) { - this._removeLink(node); - } - node = node.next; - } - return this; - }; - - /** - * @private - */ - function baseQueue(isQueue, worker, concurrency, payload) { - if (concurrency === undefined) { - concurrency = 1; - } else if (isNaN(concurrency) || concurrency < 1) { - throw new Error('Concurrency must not be zero'); - } - - var workers = 0; - var workersList = []; - var _callback, _unshift; - - var q = { - _tasks: new DLL(), - concurrency: concurrency, - payload: payload, - saturated: noop, - unsaturated: noop, - buffer: concurrency / 4, - empty: noop, - drain: noop, - error: noop, - started: false, - paused: false, - push: push, - kill: kill, - unshift: unshift, - remove: remove, - process: isQueue ? runQueue : runCargo, - length: getLength, - running: running, - workersList: getWorkersList, - idle: idle, - pause: pause, - resume: resume, - _worker: worker - }; - return q; - - function push(tasks, callback) { - _insert(tasks, callback); - } - - function unshift(tasks, callback) { - _insert(tasks, callback, true); - } - - function _exec(task) { - var item = { - data: task, - callback: _callback - }; - if (_unshift) { - q._tasks.unshift(item); - } else { - q._tasks.push(item); - } - nextTick(q.process); - } - - function _insert(tasks, callback, unshift) { - if (callback == null) { - callback = noop; - } else if (typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - var _tasks = isArray(tasks) ? tasks : [tasks]; - - if (tasks === undefined || !_tasks.length) { - if (q.idle()) { - nextTick(q.drain); - } - return; - } - - _unshift = unshift; - _callback = callback; - arrayEachSync(_tasks, _exec); - // Avoid leaking the callback - _callback = undefined; - } - - function kill() { - q.drain = noop; - q._tasks.empty(); - } - - function _next(q, tasks) { - var called = false; - return function done(err, res) { - if (called) { - throwError(); - } - called = true; - - workers--; - var task; - var index = -1; - var size = workersList.length; - var taskIndex = -1; - var taskSize = tasks.length; - var useApply = arguments.length > 2; - var args = useApply && createArray(arguments); - while (++taskIndex < taskSize) { - task = tasks[taskIndex]; - while (++index < size) { - if (workersList[index] === task) { - if (index === 0) { - workersList.shift(); - } else { - workersList.splice(index, 1); - } - index = size; - size--; - } - } - index = -1; - if (useApply) { - task.callback.apply(task, args); - } else { - task.callback(err, res); - } - if (err) { - q.error(err, task.data); - } - } - - if (workers <= q.concurrency - q.buffer) { - q.unsaturated(); - } - - if (q._tasks.length + workers === 0) { - q.drain(); - } - q.process(); - }; - } - - function runQueue() { - while (!q.paused && workers < q.concurrency && q._tasks.length) { - var task = q._tasks.shift(); - workers++; - workersList.push(task); - if (q._tasks.length === 0) { - q.empty(); - } - if (workers === q.concurrency) { - q.saturated(); - } - var done = _next(q, [task]); - worker(task.data, done); - } - } - - function runCargo() { - while (!q.paused && workers < q.concurrency && q._tasks.length) { - var tasks = q._tasks.splice(q.payload || q._tasks.length); - var index = -1; - var size = tasks.length; - var data = Array(size); - while (++index < size) { - data[index] = tasks[index].data; - } - workers++; - nativePush.apply(workersList, tasks); - if (q._tasks.length === 0) { - q.empty(); - } - if (workers === q.concurrency) { - q.saturated(); - } - var done = _next(q, tasks); - worker(data, done); - } - } - - function getLength() { - return q._tasks.length; - } - - function running() { - return workers; - } - - function getWorkersList() { - return workersList; - } - - function idle() { - return q.length() + workers === 0; - } - - function pause() { - q.paused = true; - } - - function _resume() { - nextTick(q.process); - } - - function resume() { - if (q.paused === false) { - return; - } - q.paused = false; - var count = q.concurrency < q._tasks.length ? q.concurrency : q._tasks.length; - timesSync(count, _resume); - } - - /** - * @param {Function} test - */ - function remove(test) { - q._tasks.remove(test); - } - } - - /** - * @memberof async - * @namespace queue - */ - function queue(worker, concurrency) { - return baseQueue(true, worker, concurrency); - } - - /** - * @memberof async - * @namespace priorityQueue - */ - function priorityQueue(worker, concurrency) { - var q = baseQueue(true, worker, concurrency); - q.push = push; - delete q.unshift; - return q; - - function push(tasks, priority, callback) { - q.started = true; - priority = priority || 0; - var _tasks = isArray(tasks) ? tasks : [tasks]; - var taskSize = _tasks.length; - - if (tasks === undefined || taskSize === 0) { - if (q.idle()) { - nextTick(q.drain); - } - return; - } - - callback = typeof callback === func ? callback : noop; - var nextNode = q._tasks.head; - while (nextNode && priority >= nextNode.priority) { - nextNode = nextNode.next; - } - while (taskSize--) { - var item = { - data: _tasks[taskSize], - priority: priority, - callback: callback - }; - if (nextNode) { - q._tasks.insertBefore(nextNode, item); - } else { - q._tasks.push(item); - } - nextTick(q.process); - } - } - } - - /** - * @memberof async - * @namespace cargo - */ - function cargo(worker, payload) { - return baseQueue(false, worker, 1, payload); - } - - /** - * @memberof async - * @namespace auto - * @param {Object} tasks - * @param {number} [concurrency] - * @param {Function} [callback] - */ - function auto(tasks, concurrency, callback) { - if (typeof concurrency === func) { - callback = concurrency; - concurrency = null; - } - var keys = nativeKeys(tasks); - var rest = keys.length; - var results = {}; - if (rest === 0) { - return callback(null, results); - } - var runningTasks = 0; - var readyTasks = new DLL(); - var listeners = Object.create(null); - callback = onlyOnce(callback || noop); - concurrency = concurrency || rest; - - baseEachSync(tasks, iterator, keys); - proceedQueue(); - - function iterator(task, key) { - // no dependencies - var _task, _taskSize; - if (!isArray(task)) { - _task = task; - _taskSize = 0; - readyTasks.push([_task, _taskSize, done]); - return; - } - var dependencySize = task.length - 1; - _task = task[dependencySize]; - _taskSize = dependencySize; - if (dependencySize === 0) { - readyTasks.push([_task, _taskSize, done]); - return; - } - // dependencies - var index = -1; - while (++index < dependencySize) { - var dependencyName = task[index]; - if (notInclude(keys, dependencyName)) { - var msg = - 'async.auto task `' + - key + - '` has non-existent dependency `' + - dependencyName + - '` in ' + - task.join(', '); - throw new Error(msg); - } - var taskListeners = listeners[dependencyName]; - if (!taskListeners) { - taskListeners = listeners[dependencyName] = []; - } - taskListeners.push(taskListener); - } - - function done(err, arg) { - if (key === null) { - throwError(); - } - arg = arguments.length <= 2 ? arg : slice(arguments, 1); - if (err) { - rest = 0; - runningTasks = 0; - readyTasks.length = 0; - var safeResults = objectClone(results); - safeResults[key] = arg; - key = null; - var _callback = callback; - callback = noop; - _callback(err, safeResults); - return; - } - runningTasks--; - rest--; - results[key] = arg; - taskComplete(key); - key = null; - } - - function taskListener() { - if (--dependencySize === 0) { - readyTasks.push([_task, _taskSize, done]); - } - } - } - - function proceedQueue() { - if (readyTasks.length === 0 && runningTasks === 0) { - if (rest !== 0) { - throw new Error('async.auto task has cyclic dependencies'); - } - return callback(null, results); - } - while (readyTasks.length && runningTasks < concurrency && callback !== noop) { - runningTasks++; - var array = readyTasks.shift(); - if (array[1] === 0) { - array[0](array[2]); - } else { - array[0](results, array[2]); - } - } - } - - function taskComplete(key) { - var taskListeners = listeners[key] || []; - arrayEachSync(taskListeners, function(task) { - task(); - }); - proceedQueue(); - } - } - - var FN_ARGS = /^(function)?\s*[^\(]*\(\s*([^\)]*)\)/m; - var FN_ARG_SPLIT = /,/; - var FN_ARG = /(=.+)?(\s*)$/; - var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm; - - /** - * parse function arguments for `autoInject` - * - * @private - */ - function parseParams(func) { - func = func.toString().replace(STRIP_COMMENTS, ''); - func = func.match(FN_ARGS)[2].replace(' ', ''); - func = func ? func.split(FN_ARG_SPLIT) : []; - func = func.map(function(arg) { - return arg.replace(FN_ARG, '').trim(); - }); - return func; - } - - /** - * @memberof async - * @namespace autoInject - * @param {Object} tasks - * @param {number} [concurrency] - * @param {Function} [callback] - */ - function autoInject(tasks, concurrency, callback) { - var newTasks = {}; - baseEachSync(tasks, iterator, nativeKeys(tasks)); - auto(newTasks, concurrency, callback); - - function iterator(task, key) { - var params; - var taskLength = task.length; - - if (isArray(task)) { - if (taskLength === 0) { - throw new Error('autoInject task functions require explicit parameters.'); - } - params = createArray(task); - taskLength = params.length - 1; - task = params[taskLength]; - if (taskLength === 0) { - newTasks[key] = task; - return; - } - } else if (taskLength === 1) { - newTasks[key] = task; - return; - } else { - params = parseParams(task); - if (taskLength === 0 && params.length === 0) { - throw new Error('autoInject task functions require explicit parameters.'); - } - taskLength = params.length - 1; - } - params[taskLength] = newTask; - newTasks[key] = params; - - function newTask(results, done) { - switch (taskLength) { - case 1: - task(results[params[0]], done); - break; - case 2: - task(results[params[0]], results[params[1]], done); - break; - case 3: - task(results[params[0]], results[params[1]], results[params[2]], done); - break; - default: - var i = -1; - while (++i < taskLength) { - params[i] = results[params[i]]; - } - params[i] = done; - task.apply(null, params); - break; - } - } - } - } - - /** - * @memberof async - * @namespace retry - * @param {integer|Object|Function} opts - * @param {Function} [task] - * @param {Function} [callback] - */ - function retry(opts, task, callback) { - var times, intervalFunc, errorFilter; - var count = 0; - if (arguments.length < 3 && typeof opts === func) { - callback = task || noop; - task = opts; - opts = null; - times = DEFAULT_TIMES; - } else { - callback = callback || noop; - switch (typeof opts) { - case 'object': - if (typeof opts.errorFilter === func) { - errorFilter = opts.errorFilter; - } - var interval = opts.interval; - switch (typeof interval) { - case func: - intervalFunc = interval; - break; - case 'string': - case 'number': - interval = +interval; - intervalFunc = interval - ? function() { - return interval; - } - : function() { - return DEFAULT_INTERVAL; - }; - break; - } - times = +opts.times || DEFAULT_TIMES; - break; - case 'number': - times = opts || DEFAULT_TIMES; - break; - case 'string': - times = +opts || DEFAULT_TIMES; - break; - default: - throw new Error('Invalid arguments for async.retry'); - } - } - if (typeof task !== 'function') { - throw new Error('Invalid arguments for async.retry'); - } - - if (intervalFunc) { - task(intervalCallback); - } else { - task(simpleCallback); - } - - function simpleIterator() { - task(simpleCallback); - } - - function simpleCallback(err, res) { - if (++count === times || !err || (errorFilter && !errorFilter(err))) { - if (arguments.length <= 2) { - return callback(err, res); - } - var args = createArray(arguments); - return callback.apply(null, args); - } - simpleIterator(); - } - - function intervalIterator() { - task(intervalCallback); - } - - function intervalCallback(err, res) { - if (++count === times || !err || (errorFilter && !errorFilter(err))) { - if (arguments.length <= 2) { - return callback(err, res); - } - var args = createArray(arguments); - return callback.apply(null, args); - } - setTimeout(intervalIterator, intervalFunc(count)); - } - } - - function retryable(opts, task) { - if (!task) { - task = opts; - opts = null; - } - return done; - - function done() { - var taskFn; - var args = createArray(arguments); - var lastIndex = args.length - 1; - var callback = args[lastIndex]; - switch (task.length) { - case 1: - taskFn = task1; - break; - case 2: - taskFn = task2; - break; - case 3: - taskFn = task3; - break; - default: - taskFn = task4; - } - if (opts) { - retry(opts, taskFn, callback); - } else { - retry(taskFn, callback); - } - - function task1(done) { - task(done); - } - - function task2(done) { - task(args[0], done); - } - - function task3(done) { - task(args[0], args[1], done); - } - - function task4(callback) { - args[lastIndex] = callback; - task.apply(null, args); - } - } - } - - /** - * @memberof async - * @namespace iterator - */ - function iterator(tasks) { - var size = 0; - var keys = []; - if (isArray(tasks)) { - size = tasks.length; - } else { - keys = nativeKeys(tasks); - size = keys.length; - } - return makeCallback(0); - - function makeCallback(index) { - var fn = function() { - if (size) { - var key = keys[index] || index; - tasks[key].apply(null, createArray(arguments)); - } - return fn.next(); - }; - fn.next = function() { - return index < size - 1 ? makeCallback(index + 1) : null; - }; - return fn; - } - } - - /** - * @memberof async - * @namespace apply - */ - function apply(func) { - switch (arguments.length) { - case 0: - case 1: - return func; - case 2: - return func.bind(null, arguments[1]); - case 3: - return func.bind(null, arguments[1], arguments[2]); - case 4: - return func.bind(null, arguments[1], arguments[2], arguments[3]); - case 5: - return func.bind(null, arguments[1], arguments[2], arguments[3], arguments[4]); - default: - var size = arguments.length; - var index = 0; - var args = Array(size); - args[index] = null; - while (++index < size) { - args[index] = arguments[index]; - } - return func.bind.apply(func, args); - } - } - - /** - * @memberof async - * @namespace timeout - * @param {Function} func - * @param {number} millisec - * @param {*} info - */ - function timeout(func, millisec, info) { - var callback, timer; - return wrappedFunc; - - function wrappedFunc() { - timer = setTimeout(timeoutCallback, millisec); - var args = createArray(arguments); - var lastIndex = args.length - 1; - callback = args[lastIndex]; - args[lastIndex] = injectedCallback; - simpleApply(func, args); - } - - function timeoutCallback() { - var name = func.name || 'anonymous'; - var err = new Error('Callback function "' + name + '" timed out.'); - err.code = 'ETIMEDOUT'; - if (info) { - err.info = info; - } - timer = null; - callback(err); - } - - function injectedCallback() { - if (timer !== null) { - simpleApply(callback, createArray(arguments)); - clearTimeout(timer); - } - } - - function simpleApply(func, args) { - switch (args.length) { - case 0: - func(); - break; - case 1: - func(args[0]); - break; - case 2: - func(args[0], args[1]); - break; - default: - func.apply(null, args); - break; - } - } - } - - /** - * @memberof async - * @namespace times - * @param {number} n - n >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * var iterator = function(n, done) { - * done(null, n); - * }; - * async.times(4, iterator, function(err, res) { - * console.log(res); // [0, 1, 2, 3]; - * }); - * - */ - function times(n, iterator, callback) { - callback = callback || noop; - n = +n; - if (isNaN(n) || n < 1) { - return callback(null, []); - } - var result = Array(n); - timesSync(n, iterate); - - function iterate(num) { - iterator(num, createCallback(num)); - } - - function createCallback(index) { - return function(err, res) { - if (index === null) { - throwError(); - } - result[index] = res; - index = null; - if (err) { - callback(err); - callback = noop; - } else if (--n === 0) { - callback(null, result); - } - }; - } - } - - /** - * @memberof async - * @namespace timesSeries - * @param {number} n - n >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * var iterator = function(n, done) { - * done(null, n); - * }; - * async.timesSeries(4, iterator, function(err, res) { - * console.log(res); // [0, 1, 2, 3]; - * }); - * - */ - function timesSeries(n, iterator, callback) { - callback = callback || noop; - n = +n; - if (isNaN(n) || n < 1) { - return callback(null, []); - } - var result = Array(n); - var sync = false; - var completed = 0; - iterate(); - - function iterate() { - iterator(completed, done); - } - - function done(err, res) { - result[completed] = res; - if (err) { - callback(err); - callback = throwError; - } else if (++completed >= n) { - callback(null, result); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - } - } - - /** - * @memberof async - * @namespace timesLimit - * @param {number} n - n >= 1 - * @param {number} limit - n >= 1 - * @param {Function} iterator - * @param {Function} callback - * @example - * - * var iterator = function(n, done) { - * done(null, n); - * }; - * async.timesLimit(4, 2, iterator, function(err, res) { - * console.log(res); // [0, 1, 2, 3]; - * }); - * - */ - function timesLimit(n, limit, iterator, callback) { - callback = callback || noop; - n = +n; - if (isNaN(n) || n < 1 || isNaN(limit) || limit < 1) { - return callback(null, []); - } - var result = Array(n); - var sync = false; - var started = 0; - var completed = 0; - timesSync(limit > n ? n : limit, iterate); - - function iterate() { - var index = started++; - if (index < n) { - iterator(index, createCallback(index)); - } - } - - function createCallback(index) { - return function(err, res) { - if (index === null) { - throwError(); - } - result[index] = res; - index = null; - if (err) { - callback(err); - callback = noop; - } else if (++completed >= n) { - callback(null, result); - callback = throwError; - } else if (sync) { - nextTick(iterate); - } else { - sync = true; - iterate(); - } - sync = false; - }; - } - } - - /** - * @memberof async - * @namespace race - * @param {Array|Object} tasks - functions - * @param {Function} callback - * @example - * - * // array - * var called = 0; - * var tasks = [ - * function(done) { - * setTimeout(function() { - * called++; - * done(null, '1'); - * }, 30); - * }, - * function(done) { - * setTimeout(function() { - * called++; - * done(null, '2'); - * }, 20); - * }, - * function(done) { - * setTimeout(function() { - * called++; - * done(null, '3'); - * }, 10); - * } - * ]; - * async.race(tasks, function(err, res) { - * console.log(res); // '3' - * console.log(called); // 1 - * setTimeout(function() { - * console.log(called); // 3 - * }, 50); - * }); - * - * @example - * - * // object - * var called = 0; - * var tasks = { - * 'test1': function(done) { - * setTimeout(function() { - * called++; - * done(null, '1'); - * }, 30); - * }, - * 'test2': function(done) { - * setTimeout(function() { - * called++; - * done(null, '2'); - * }, 20); - * }, - * 'test3': function(done) { - * setTimeout(function() { - * called++; - * done(null, '3'); - * }, 10); - * } - * }; - * async.race(tasks, function(err, res) { - * console.log(res); // '3' - * console.log(called); // 1 - * setTimeout(function() { - * console.log(called); // 3 - * done(); - * }, 50); - * }); - * - */ - function race(tasks, callback) { - callback = once(callback || noop); - var size, keys; - var index = -1; - if (isArray(tasks)) { - size = tasks.length; - while (++index < size) { - tasks[index](callback); - } - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - size = keys.length; - while (++index < size) { - tasks[keys[index]](callback); - } - } else { - return callback(new TypeError('First argument to race must be a collection of functions')); - } - if (!size) { - callback(null); - } - } - - /** - * @memberof async - * @namespace memoize - */ - function memoize(fn, hasher) { - hasher = - hasher || - function(hash) { - return hash; - }; - - var memo = {}; - var queues = {}; - var memoized = function() { - var args = createArray(arguments); - var callback = args.pop(); - var key = hasher.apply(null, args); - if (has(memo, key)) { - nextTick(function() { - callback.apply(null, memo[key]); - }); - return; - } - if (has(queues, key)) { - return queues[key].push(callback); - } - - queues[key] = [callback]; - args.push(done); - fn.apply(null, args); - - function done(err) { - var args = createArray(arguments); - if (!err) { - memo[key] = args; - } - var q = queues[key]; - delete queues[key]; - - var i = -1; - var size = q.length; - while (++i < size) { - q[i].apply(null, args); - } - } - }; - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; - } - - /** - * @memberof async - * @namespace unmemoize - */ - function unmemoize(fn) { - return function() { - return (fn.unmemoized || fn).apply(null, arguments); - }; - } - - /** - * @memberof async - * @namespace ensureAsync - */ - function ensureAsync(fn) { - return function(/* ...args, callback */) { - var args = createArray(arguments); - var lastIndex = args.length - 1; - var callback = args[lastIndex]; - var sync = true; - args[lastIndex] = done; - fn.apply(this, args); - sync = false; - - function done() { - var innerArgs = createArray(arguments); - if (sync) { - nextTick(function() { - callback.apply(null, innerArgs); - }); - } else { - callback.apply(null, innerArgs); - } - } - }; - } - - /** - * @memberof async - * @namespace constant - */ - function constant(/* values... */) { - var args = [null].concat(createArray(arguments)); - return function(callback) { - callback = arguments[arguments.length - 1]; - callback.apply(this, args); - }; - } - - function asyncify(fn) { - return function(/* args..., callback */) { - var args = createArray(arguments); - var callback = args.pop(); - var result; - try { - result = fn.apply(this, args); - } catch (e) { - return callback(e); - } - if (result && typeof result.then === func) { - result.then( - function(value) { - invokeCallback(callback, null, value); - }, - function(err) { - invokeCallback(callback, err && err.message ? err : new Error(err)); - } - ); - } else { - callback(null, result); - } - }; - } - - function invokeCallback(callback, err, value) { - try { - callback(err, value); - } catch (e) { - nextTick(rethrow, e); - } - } - - function rethrow(error) { - throw error; - } - - /** - * @memberof async - * @namespace reflect - * @param {Function} func - * @return {Function} - */ - function reflect(func) { - return function(/* args..., callback */) { - var callback; - switch (arguments.length) { - case 1: - callback = arguments[0]; - return func(done); - case 2: - callback = arguments[1]; - return func(arguments[0], done); - default: - var args = createArray(arguments); - var lastIndex = args.length - 1; - callback = args[lastIndex]; - args[lastIndex] = done; - func.apply(this, args); - } - - function done(err, res) { - if (err) { - return callback(null, { - error: err - }); - } - if (arguments.length > 2) { - res = slice(arguments, 1); - } - callback(null, { - value: res - }); - } - }; - } - - /** - * @memberof async - * @namespace reflectAll - * @param {Array[]|Object} tasks - * @return {Function} - */ - function reflectAll(tasks) { - var newTasks, keys; - if (isArray(tasks)) { - newTasks = Array(tasks.length); - arrayEachSync(tasks, iterate); - } else if (tasks && typeof tasks === obj) { - keys = nativeKeys(tasks); - newTasks = {}; - baseEachSync(tasks, iterate, keys); - } - return newTasks; - - function iterate(func, key) { - newTasks[key] = reflect(func); - } - } - - /** - * @memberof async - * @namespace createLogger - */ - function createLogger(name) { - return function(fn) { - var args = slice(arguments, 1); - args.push(done); - fn.apply(null, args); - }; - - function done(err) { - if (typeof console === obj) { - if (err) { - if (console.error) { - console.error(err); - } - return; - } - if (console[name]) { - var args = slice(arguments, 1); - arrayEachSync(args, function(arg) { - console[name](arg); - }); - } - } - } - } - - /** - * @memberof async - * @namespace safe - */ - function safe() { - createImmediate(); - return exports; - } - - /** - * @memberof async - * @namespace fast - */ - function fast() { - createImmediate(false); - return exports; - } -}); diff --git a/node_modules/neo-async/async.min.js b/node_modules/neo-async/async.min.js deleted file mode 100644 index 4161a3f6..00000000 --- a/node_modules/neo-async/async.min.js +++ /dev/null @@ -1,80 +0,0 @@ -(function(N,O){"object"===typeof exports&&"undefined"!==typeof module?O(exports):"function"===typeof define&&define.amd?define(["exports"],O):N.async?O(N.neo_async=N.neo_async||{}):O(N.async=N.async||{})})(this,function(N){function O(a){var c=function(a){var d=J(arguments,1);setTimeout(function(){a.apply(null,d)})};T="function"===typeof setImmediate?setImmediate:c;"object"===typeof process&&"function"===typeof process.nextTick?(D=/^v0.10/.test(process.version)?T:process.nextTick,ba=/^v0/.test(process.version)? -T:process.nextTick):ba=D=T;!1===a&&(D=function(a){a()})}function H(a){for(var c=-1,b=a.length,d=Array(b);++c=d)return[];for(var e=Array(d);++bd[e]){var g=d[f]; -d[f]=d[e];d[e]=g}}if(!(e>b)){for(var l,e=a[a[c]>a[e]?c:e],f=c,g=b;f<=g;){for(l=f;f=l&&a[g]>=e;)g--;if(f>g)break;var q=a;l=d;var s=f++,h=g--,k=q[s];q[s]=q[h];q[h]=k;q=l[s];l[s]=l[h];l[h]=q}e=f;ca(a,c,e-1,d);ca(a,e,b,d)}}}function S(a){var c=[];Q(a,function(a){a!==w&&(C(a)?X.apply(c,a):c.push(a))});return c}function da(a,c,b){var d=-1,e=a.length;if(3===c.length)for(;++db)return e(null,[]);y=y||Array(m);K(b>m?m:b,x)}}function Y(a,c,b){function d(){c(a[v],s)}function e(){c(a[v],v,s)}function f(){n=r.next();n.done?b(null):c(n.value,s)}function g(){n=r.next();n.done?b(null):c(n.value,v,s)}function l(){c(a[m[v]],s)}function q(){k=m[v];c(a[k],k,s)}function s(a,d){a?b(a):++v===h||!1===d?(p=A,b(null)):u?D(p): -(u=!0,p());u=!1}b=E(b||w);var h,k,m,r,n,p,u=!1,v=0;C(a)?(h=a.length,p=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,r=a[z](),p=3===c.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,p=3===c.length?q:l));if(!h)return b(null);p()}function Z(a,c,b,d){function e(){xc)return d(null);K(c>k?k:c,v)}function za(a,c,b){function d(){c(a[t],s)}function e(){c(a[t],t,s)}function f(){n=r.next(); -n.done?b(null,p):c(n.value,s)}function g(){n=r.next();n.done?b(null,p):c(n.value,t,s)}function l(){c(a[m[t]],s)}function q(){k=m[t];c(a[k],k,s)}function s(a,d){a?(u=A,b=E(b),b(a,H(p))):(p[t]=d,++t===h?(u=A,b(null,p),b=A):v?D(u):(v=!0,u()),v=!1)}b=b||w;var h,k,m,r,n,p,u,v=!1,t=0;C(a)?(h=a.length,u=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,p=[],r=a[z](),u=3===c.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,u=3===c.length?q:l));if(!h)return b(null,[]);p=p||Array(h);u()}function Aa(a,c,b,d){return function(e, -f,g){function l(a){var b=!1;return function(c,e){b&&A();b=!0;c?(g=I(g),g(c)):!!e===d?(g=I(g),g(null,a)):++h===q&&g(null)}}g=g||w;var q,s,h=0;C(e)?(q=e.length,a(e,f,l)):e&&(z&&e[z]?(q=b(e,f,l))&&q===h&&g(null):"object"===typeof e&&(s=F(e),q=s.length,c(e,f,l,s)));q||g(null)}}function Ba(a){return function(c,b,d){function e(){r=c[x];b(r,h)}function f(){r=c[x];b(r,x,h)}function g(){u=p.next();r=u.value;u.done?d(null):b(r,h)}function l(){u=p.next();r=u.value;u.done?d(null):b(r,x,h)}function q(){r=c[n[x]]; -b(r,h)}function s(){m=n[x];r=c[m];b(r,m,h)}function h(b,c){b?d(b):!!c===a?(v=A,d(null,r)):++x===k?(v=A,d(null)):t?D(v):(t=!0,v());t=!1}d=E(d||w);var k,m,r,n,p,u,v,t=!1,x=0;C(c)?(k=c.length,v=3===b.length?f:e):c&&(z&&c[z]?(k=Infinity,p=c[z](),v=3===b.length?l:g):"object"===typeof c&&(n=F(c),k=n.length,v=3===b.length?s:q));if(!k)return d(null);v()}}function Ca(a){return function(c,b,d,e){function f(){r=G++;rb)return e(null);K(b>m?m:b,x)}}function Da(a,c,b,d){return function(e,f,g){function l(a,b){return function(c,e){null===a&&A();c?(a=null,g=I(g),g(c,L(k))):(!!e===d&&(k[a]=b),a=null,++h===q&&g(null,k))}}g=g||w;var q,s,h=0,k={};C(e)?(q=e.length,a(e,f,l)):e&&(z&&e[z]?(q=b(e,f,l))&&q===h&&g(null,k):"object"===typeof e&&(s=F(e),q=s.length,c(e,f,l,s)));if(!q)return g(null,{})}}function Ea(a){return function(c, -b,d){function e(){m=y;r=c[y];b(r,h)}function f(){m=y;r=c[y];b(r,y,h)}function g(){m=y;u=p.next();r=u.value;u.done?d(null,x):b(r,h)}function l(){m=y;u=p.next();r=u.value;u.done?d(null,x):b(r,m,h)}function q(){m=n[y];r=c[m];b(r,h)}function s(){m=n[y];r=c[m];b(r,m,h)}function h(b,c){b?d(b,x):(!!c===a&&(x[m]=r),++y===k?(v=A,d(null,x)):t?D(v):(t=!0,v()),t=!1)}d=E(d||w);var k,m,r,n,p,u,v,t=!1,x={},y=0;C(c)?(k=c.length,v=3===b.length?f:e):c&&(z&&c[z]?(k=Infinity,p=c[z](),v=3===b.length?l:g):"object"===typeof c&& -(n=F(c),k=n.length,v=3===b.length?s:q));if(!k)return d(null,{});v()}}function Fa(a){return function(c,b,d,e){function f(){r=B++;rb)return e(null,{});K(b>m?m:b,x)}}function $(a,c,b,d){function e(d){b(d,a[t],h)}function f(d){b(d,a[t],t,h)}function g(a){p=n.next();p.done?d(null,a):b(a,p.value, -h)}function l(a){p=n.next();p.done?d(null,a):b(a,p.value,t,h)}function q(d){b(d,a[r[t]],h)}function s(d){m=r[t];b(d,a[m],m,h)}function h(a,c){a?d(a,c):++t===k?(b=A,d(null,c)):v?D(function(){u(c)}):(v=!0,u(c));v=!1}d=E(d||w);var k,m,r,n,p,u,v=!1,t=0;C(a)?(k=a.length,u=4===b.length?f:e):a&&(z&&a[z]?(k=Infinity,n=a[z](),u=4===b.length?l:g):"object"===typeof a&&(r=F(a),k=r.length,u=4===b.length?s:q));if(!k)return d(null,c);u(c)}function Ga(a,c,b,d){function e(d){b(d,a[--s],q)}function f(d){b(d,a[--s], -s,q)}function g(d){b(d,a[m[--s]],q)}function l(d){k=m[--s];b(d,a[k],k,q)}function q(a,b){a?d(a,b):0===s?(u=A,d(null,b)):v?D(function(){u(b)}):(v=!0,u(b));v=!1}d=E(d||w);var s,h,k,m,r,n,p,u,v=!1;if(C(a))s=a.length,u=4===b.length?f:e;else if(a)if(z&&a[z]){p=[];r=a[z]();for(h=-1;!1===(n=r.next()).done;)p[++h]=n.value;a=p;s=p.length;u=4===b.length?f:e}else"object"===typeof a&&(m=F(a),s=m.length,u=4===b.length?l:g);if(!s)return d(null,c);u(c)}function Ha(a,c,b){b=b||w;ja(a,c,function(a,c){if(a)return b(a); -b(null,!!c)})}function Ia(a,c,b){b=b||w;ka(a,c,function(a,c){if(a)return b(a);b(null,!!c)})}function Ja(a,c,b,d){d=d||w;la(a,c,b,function(a,b){if(a)return d(a);d(null,!!b)})}function Ka(a,c){return C(a)?0===a.length?(c(null),!1):!0:(c(Error("First argument to waterfall must be an array of functions")),!1)}function ma(a,c,b){switch(c.length){case 0:case 1:return a(b);case 2:return a(c[1],b);case 3:return a(c[1],c[2],b);case 4:return a(c[1],c[2],c[3],b);case 5:return a(c[1],c[2],c[3],c[4],b);case 6:return a(c[1], -c[2],c[3],c[4],c[5],b);default:return c=J(c,1),c.push(b),a.apply(null,c)}}function La(a,c){function b(b,h){if(b)q=A,c=E(c),c(b);else if(++d===f){q=A;var k=c;c=A;2===arguments.length?k(b,h):k.apply(null,H(arguments))}else g=a[d],l=arguments,e?D(q):(e=!0,q()),e=!1}c=c||w;if(Ka(a,c)){var d=0,e=!1,f=a.length,g=a[d],l=[],q=function(){switch(g.length){case 0:try{b(null,g())}catch(a){b(a)}break;case 1:return g(b);case 2:return g(l[1],b);case 3:return g(l[1],l[2],b);case 4:return g(l[1],l[2],l[3],b);case 5:return g(l[1], -l[2],l[3],l[4],b);default:return l=J(l,1),l[g.length-1]=b,g.apply(null,l)}};q()}}function Ma(){var a=H(arguments);return function(){var c=this,b=H(arguments),d=b[b.length-1];"function"===typeof d?b.pop():d=w;$(a,b,function(a,b,d){a.push(function(a){var b=J(arguments,1);d(a,b)});b.apply(c,a)},function(a,b){b=C(b)?b:[b];b.unshift(a);d.apply(c,b)})}}function Na(a){return function(c){var b=function(){var b=this,d=H(arguments),g=d.pop()||w;return a(c,function(a,c){a.apply(b,d.concat([c]))},g)};if(1b)throw Error("Concurrency must not be zero");var h=0,k=[],m,r,n={_tasks:new M,concurrency:b,payload:d,saturated:w,unsaturated:w,buffer:b/4,empty:w,drain:w,error:w,started:!1,paused:!1,push:function(a, -b){f(a,b)},kill:function(){n.drain=w;n._tasks.empty()},unshift:function(a,b){f(a,b,!0)},remove:function(a){n._tasks.remove(a)},process:a?l:q,length:function(){return n._tasks.length},running:function(){return h},workersList:function(){return k},idle:function(){return 0===n.length()+h},pause:function(){n.paused=!0},resume:function(){!1!==n.paused&&(n.paused=!1,K(n.concurrency=arguments.length?f:J(arguments,1);if(a){q=g=0;s.length=0;var k=L(l);k[d]=f;d=null;var h= -b;b=w;h(a,k)}else q--,g--,l[d]=f,e(d),d=null}function n(){0===--v&&s.push([p,u,c])}var p,u;if(C(a)){var v=a.length-1;p=a[v];u=v;if(0===v)s.push([p,u,c]);else for(var t=-1;++t=arguments.length)return b(a,e);var f=H(arguments);return b.apply(null,f)}c(d)}function e(){c(f)}function f(a,d){if(++s===g||!a||q&&!q(a)){if(2>=arguments.length)return b(a,d);var c=H(arguments);return b.apply(null,c)}setTimeout(e,l(s))}var g,l,q,s=0;if(3>arguments.length&&"function"===typeof a)b=c||w,c=a,a=null,g=5;else switch(b=b||w,typeof a){case "object":"function"===typeof a.errorFilter&&(q=a.errorFilter);var h=a.interval; -switch(typeof h){case "function":l=h;break;case "string":case "number":l=(h=+h)?function(){return h}:function(){return 0}}g=+a.times||5;break;case "number":g=a||5;break;case "string":g=+a||5;break;default:throw Error("Invalid arguments for async.retry");}if("function"!==typeof c)throw Error("Invalid arguments for async.retry");l?c(f):c(d)}function Pa(a){return function(){var c=H(arguments),b=c.pop(),d;try{d=a.apply(this,c)}catch(e){return b(e)}d&&"function"===typeof d.then?d.then(function(a){try{b(null, -a)}catch(d){D(Qa,d)}},function(a){a=a&&a.message?a:Error(a);try{b(a,void 0)}catch(d){D(Qa,d)}}):b(null,d)}}function Qa(a){throw a;}function Ra(a){return function(){function c(a,d){if(a)return b(null,{error:a});2=arguments.length?c:J(arguments,1),a=null,++q===f&&d(null,l))}}d=d||w;var f,g,l,q=0;C(b)?(f=b.length,l=Array(f),a(b,e)):b&&"object"===typeof b&&(g=F(b),f=g.length,l={},c(b,e,g));f||d(null,l)}}(function(a,c){for(var b=-1,d=a.length;++bc)return d(null,[]);v=v||Array(k);K(c>k?k:c,t)},mapValues:fb,mapValuesSeries:function(a,c,b){function d(){k=t;c(a[t], -s)}function e(){k=t;c(a[t],t,s)}function f(){k=t;n=r.next();n.done?b(null,v):c(n.value,s)}function g(){k=t;n=r.next();n.done?b(null,v):c(n.value,t,s)}function l(){k=m[t];c(a[k],s)}function q(){k=m[t];c(a[k],k,s)}function s(a,d){a?(p=A,b=E(b),b(a,L(v))):(v[k]=d,++t===h?(p=A,b(null,v),b=A):u?D(p):(u=!0,p()),u=!1)}b=b||w;var h,k,m,r,n,p,u=!1,v={},t=0;C(a)?(h=a.length,p=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,r=a[z](),p=3===c.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,p=3===c.length?q:l)); -if(!h)return b(null,v);p()},mapValuesLimit:function(a,c,b,d){function e(){m=y++;mc)return d(null,x);K(c>k?k:c,v)},filter:Ta,filterSeries:Ua,filterLimit:Va,select:Ta,selectSeries:Ua,selectLimit:Va,reject:gb,rejectSeries:hb,rejectLimit:ib,detect:ja,detectSeries:ka,detectLimit:la,find:ja,findSeries:ka,findLimit:la,pick:jb,pickSeries:kb, -pickLimit:lb,omit:mb,omitSeries:nb,omitLimit:ob,reduce:$,inject:$,foldl:$,reduceRight:Ga,foldr:Ga,transform:pb,transformSeries:function(a,c,b,d){function e(){b(v,a[x],h)}function f(){b(v,a[x],x,h)}function g(){p=n.next();p.done?d(null,v):b(v,p.value,h)}function l(){p=n.next();p.done?d(null,v):b(v,p.value,x,h)}function q(){b(v,a[r[x]],h)}function s(){m=r[x];b(v,a[m],m,h)}function h(a,b){a?d(a,v):++x===k||!1===b?(u=A,d(null,v)):t?D(u):(t=!0,u());t=!1}3===arguments.length&&(d=b,b=c,c=void 0);d=E(d|| -w);var k,m,r,n,p,u,v,t=!1,x=0;C(a)?(k=a.length,v=void 0!==c?c:[],u=4===b.length?f:e):a&&(z&&a[z]?(k=Infinity,n=a[z](),v=void 0!==c?c:{},u=4===b.length?l:g):"object"===typeof a&&(r=F(a),k=r.length,v=void 0!==c?c:{},u=4===b.length?s:q));if(!k)return d(null,void 0!==c?c:v||{});u()},transformLimit:function(a,c,b,d,e){function f(){r=A++;rc)return e(null,void 0!==b?b:x||{});K(c>m?m:c,t)},sortBy:qb,sortBySeries:function(a,c,b){function d(){m=a[y];c(m,s)}function e(){m=a[y];c(m,y,s)}function f(){p=n.next();if(p.done)return b(null,P(u,v));m=p.value;u[y]=m;c(m,s)}function g(){p=n.next();if(p.done)return b(null,P(u,v));m=p.value;u[y]=m;c(m,y,s)}function l(){m=a[r[y]];u[y]=m;c(m,s)}function q(){k=r[y];m=a[k];u[y]=m;c(m,k,s)}function s(a,d){v[y]=d;a?b(a):++y===h?(t=A,b(null, -P(u,v))):x?D(t):(x=!0,t());x=!1}b=E(b||w);var h,k,m,r,n,p,u,v,t,x=!1,y=0;C(a)?(h=a.length,u=a,v=Array(h),t=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,u=[],v=[],n=a[z](),t=3===c.length?g:f):"object"===typeof a&&(r=F(a),h=r.length,u=Array(h),v=Array(h),t=3===c.length?q:l));if(!h)return b(null,[]);t()},sortByLimit:function(a,c,b,d){function e(){Bc)return d(null,[]);x=x||Array(k);K(c>k?k:c,y)},some:Ha,someSeries:Ia,someLimit:Ja,any:Ha,anySeries:Ia,anyLimit:Ja,every:Wa,everySeries:Xa,everyLimit:Ya,all:Wa,allSeries:Xa,allLimit:Ya,concat:rb,concatSeries:function(a,c,b){function d(){c(a[t],s)}function e(){c(a[t],t,s)}function f(){n=r.next();n.done?b(null,v):c(n.value,s)}function g(){n=r.next();n.done?b(null,v):c(n.value,t,s)}function l(){c(a[m[t]], -s)}function q(){k=m[t];c(a[k],k,s)}function s(a,d){C(d)?X.apply(v,d):2<=arguments.length&&X.apply(v,J(arguments,1));a?b(a,v):++t===h?(p=A,b(null,v)):u?D(p):(u=!0,p());u=!1}b=E(b||w);var h,k,m,r,n,p,u=!1,v=[],t=0;C(a)?(h=a.length,p=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,r=a[z](),p=3===c.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,p=3===c.length?q:l));if(!h)return b(null,v);p()},concatLimit:function(a,c,b,d){function e(){tc)return d(null,[]);u=u||Array(k);K(c>k?k:c,p)},groupBy:sb,groupBySeries:function(a,c,b){function d(){m=a[t];c(m,s)}function e(){m=a[t];c(m,t,s)}function f(){p=n.next();m=p.value;p.done?b(null,x):c(m,s)}function g(){p=n.next();m=p.value;p.done? -b(null,x):c(m,t,s)}function l(){m=a[r[t]];c(m,s)}function q(){k=r[t];m=a[k];c(m,k,s)}function s(a,d){if(a)u=A,b=E(b),b(a,L(x));else{var c=x[d];c?c.push(m):x[d]=[m];++t===h?(u=A,b(null,x)):v?D(u):(v=!0,u());v=!1}}b=E(b||w);var h,k,m,r,n,p,u,v=!1,t=0,x={};C(a)?(h=a.length,u=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,n=a[z](),u=3===c.length?g:f):"object"===typeof a&&(r=F(a),h=r.length,u=3===c.length?q:l));if(!h)return b(null,x);u()},groupByLimit:function(a,c,b,d){function e(){yc)return d(null,B);K(c>k?k:c,t)},parallel:tb,series:function(a,c){function b(){g=k;a[k](e)}function d(){g=l[k];a[g](e)}function e(a,b){a?(s=A,c=E(c),c(a,q)):(q[g]=2>=arguments.length?b:J(arguments,1),++k===f?(s=A,c(null,q)):h?D(s):(h=!0,s()),h=!1)}c=c||w;var f,g,l,q,s,h=!1,k=0;if(C(a))f=a.length,q=Array(f), -s=b;else if(a&&"object"===typeof a)l=F(a),f=l.length,q={},s=d;else return c(null);if(!f)return c(null,q);s()},parallelLimit:function(a,c,b){function d(){l=r++;if(l=arguments.length?c:J(arguments,1),a=null,++n===g?b(null,h):m?D(k):(m=!0,k()),m=!1)}}b=b||w;var g,l,q,s,h,k,m=!1,r=0,n=0;C(a)?(g=a.length,h=Array(g),k=d):a&&"object"===typeof a&&(s=F(a),g=s.length,h= -{},k=e);if(!g||isNaN(c)||1>c)return b(null,h);K(c>g?g:c,k)},tryEach:function(a,c){function b(){a[q](e)}function d(){a[g[q]](e)}function e(a,b){a?++q===f?c(a):l():2>=arguments.length?c(null,b):c(null,J(arguments,1))}c=c||w;var f,g,l,q=0;C(a)?(f=a.length,l=b):a&&"object"===typeof a&&(g=F(a),f=g.length,l=d);if(!f)return c(null);l()},waterfall:function(a,c){function b(){ma(e,f,d(e))}function d(h){return function(k,m){void 0===h&&(c=w,A());h=void 0;k?(g=c,c=A,g(k)):++q===s?(g=c,c=A,2>=arguments.length? -g(k,m):g.apply(null,H(arguments))):(l?(f=arguments,e=a[q]||A,D(b)):(l=!0,ma(a[q]||A,arguments,d(q))),l=!1)}}c=c||w;if(Ka(a,c)){var e,f,g,l,q=0,s=a.length;ma(a[0],[],d(0))}},angelFall:La,angelfall:La,whilst:function(a,c,b){function d(){g?D(e):(g=!0,c(f));g=!1}function e(){c(f)}function f(c,e){if(c)return b(c);2>=arguments.length?a(e)?d():b(null,e):(e=J(arguments,1),a.apply(null,e)?d():b.apply(null,[null].concat(e)))}b=b||w;var g=!1;a()?d():b(null)},doWhilst:function(a,c,b){function d(){g?D(e):(g=!0, -a(f));g=!1}function e(){a(f)}function f(a,e){if(a)return b(a);2>=arguments.length?c(e)?d():b(null,e):(e=J(arguments,1),c.apply(null,e)?d():b.apply(null,[null].concat(e)))}b=b||w;var g=!1;e()},until:function(a,c,b){function d(){g?D(e):(g=!0,c(f));g=!1}function e(){c(f)}function f(c,e){if(c)return b(c);2>=arguments.length?a(e)?b(null,e):d():(e=J(arguments,1),a.apply(null,e)?b.apply(null,[null].concat(e)):d())}b=b||w;var g=!1;a()?b(null):d()},doUntil:function(a,c,b){function d(){g?D(e):(g=!0,a(f));g= -!1}function e(){a(f)}function f(a,e){if(a)return b(a);2>=arguments.length?c(e)?b(null,e):d():(e=J(arguments,1),c.apply(null,e)?b.apply(null,[null].concat(e)):d())}b=b||w;var g=!1;e()},during:function(a,c,b){function d(a,d){if(a)return b(a);d?c(e):b(null)}function e(c){if(c)return b(c);a(d)}b=b||w;a(d)},doDuring:function(a,c,b){function d(d,c){if(d)return b(d);c?a(e):b(null)}function e(a,e){if(a)return b(a);switch(arguments.length){case 0:case 1:c(d);break;case 2:c(e,d);break;default:var l=J(arguments, -1);l.push(d);c.apply(null,l)}}b=b||w;d(null,!0)},forever:function(a,c){function b(){a(d)}function d(a){if(a){if(c)return c(a);throw a;}e?D(b):(e=!0,b());e=!1}var e=!1;b()},compose:function(){return Ma.apply(null,Za(arguments))},seq:Ma,applyEach:ub,applyEachSeries:vb,queue:function(a,c){return na(!0,a,c)},priorityQueue:function(a,c){var b=na(!0,a,c);b.push=function(a,c,f){b.started=!0;c=c||0;var g=C(a)?a:[a],l=g.length;if(void 0===a||0===l)b.idle()&&D(b.drain);else{f="function"===typeof f?f:w;for(a= -b._tasks.head;a&&c>=a.priority;)a=a.next;for(;l--;){var q={data:g[l],priority:c,callback:f};a?b._tasks.insertBefore(a,q):b._tasks.push(q);D(b.process)}}};delete b.unshift;return b},cargo:function(a,c){return na(!1,a,1,c)},auto:Oa,autoInject:function(a,c,b){var d={};W(a,function(a,b){var c,l=a.length;if(C(a)){if(0===l)throw Error("autoInject task functions require explicit parameters.");c=H(a);l=c.length-1;a=c[l];if(0===l){d[b]=a;return}}else{if(1===l){d[b]=a;return}c=ab(a);if(0===l&&0===c.length)throw Error("autoInject task functions require explicit parameters."); -l=c.length-1}c[l]=function(b,d){switch(l){case 1:a(b[c[0]],d);break;case 2:a(b[c[0]],b[c[1]],d);break;case 3:a(b[c[0]],b[c[1]],b[c[2]],d);break;default:for(var f=-1;++fa)return b(null,[]);var e=Array(a);K(a,function(a){c(a,d(a))})},timesSeries:function(a,c,b){function d(){c(l, -e)}function e(c,e){f[l]=e;c?(b(c),b=A):++l>=a?(b(null,f),b=A):g?D(d):(g=!0,d());g=!1}b=b||w;a=+a;if(isNaN(a)||1>a)return b(null,[]);var f=Array(a),g=!1,l=0;d()},timesLimit:function(a,c,b,d){function e(){var c=q++;c=a?(d(null,g),d=A):l?D(e):(l=!0,e());l=!1}}d=d||w;a=+a;if(isNaN(a)||1>a||isNaN(c)||1>c)return d(null,[]);var g=Array(a),l=!1,q=0,s=0;K(c>a?a:c,e)},race:function(a,c){c=I(c||w);var b,d,e=-1;if(C(a))for(b= -a.length;++e Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes unless disabled. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save normalize-path -``` - -## Usage - -```js -var normalize = require('normalize-path'); - -normalize('\\foo\\bar\\baz\\'); -//=> '/foo/bar/baz' - -normalize('./foo/bar/baz/'); -//=> './foo/bar/baz' -``` - -Pass `false` as the last argument to **keep** trailing slashes: - -```js -normalize('./foo/bar/baz/', false); -//=> './foo/bar/baz/' - -normalize('foo\\bar\\baz\\', false); -//=> 'foo/bar/baz/' -``` - -## About - -### Related projects - -* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.") -* [ends-with](https://www.npmjs.com/package/ends-with): Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for… [more](https://github.com/jonschlinkert/ends-with) | [homepage](https://github.com/jonschlinkert/ends-with "Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for comparisons.") -* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute "Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute.") -* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") -* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath "Pollyfill for node.js `path.parse`, parses a filepath into an object.") -* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with "Return `true` if a file path ends with the given string/suffix.") -* [path-segments](https://www.npmjs.com/package/path-segments): Get n specific segments of a file path, e.g. first 2, last 3, etc. | [homepage](https://github.com/jonschlinkert/path-segments "Get n specific segments of a file path, e.g. first 2, last 3, etc.") -* [rewrite-ext](https://www.npmjs.com/package/rewrite-ext): Automatically re-write the destination extension of a filepath based on the source extension. e.g… [more](https://github.com/jonschlinkert/rewrite-ext) | [homepage](https://github.com/jonschlinkert/rewrite-ext "Automatically re-write the destination extension of a filepath based on the source extension. e.g `.coffee` => `.js`. This will only rename the ext, no other path parts are modified.") -* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify "Convert Windows file paths to unix paths.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 31 | [jonschlinkert](https://github.com/jonschlinkert) | -| 1 | [phated](https://github.com/phated) | - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 29, 2017._ \ No newline at end of file diff --git a/node_modules/normalize-path/index.js b/node_modules/normalize-path/index.js deleted file mode 100644 index 4a4f8ccd..00000000 --- a/node_modules/normalize-path/index.js +++ /dev/null @@ -1,19 +0,0 @@ -/*! - * normalize-path - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -var removeTrailingSeparator = require('remove-trailing-separator'); - -module.exports = function normalizePath(str, stripTrailing) { - if (typeof str !== 'string') { - throw new TypeError('expected a string'); - } - str = str.replace(/[\\\/]+/g, '/'); - if (stripTrailing !== false) { - str = removeTrailingSeparator(str); - } - return str; -}; diff --git a/node_modules/normalize-path/package.json b/node_modules/normalize-path/package.json deleted file mode 100644 index 0b7ea90e..00000000 --- a/node_modules/normalize-path/package.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "_from": "normalize-path@^2.1.1", - "_id": "normalize-path@2.1.1", - "_inBundle": false, - "_integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "_location": "/normalize-path", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "normalize-path@^2.1.1", - "name": "normalize-path", - "escapedName": "normalize-path", - "rawSpec": "^2.1.1", - "saveSpec": null, - "fetchSpec": "^2.1.1" - }, - "_requiredBy": [ - "/vinyl-sourcemap" - ], - "_resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "_shasum": "1ab28b556e198363a8c1a6f7e6fa20137fe6aed9", - "_spec": "normalize-path@^2.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-sourcemap", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/normalize-path/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://twitter.com/BlaineBublitz" - }, - { - "name": "Jon Schlinkert", - "email": "jon.schlinkert@sellside.com", - "url": "http://twitter.com/jonschlinkert" - } - ], - "dependencies": { - "remove-trailing-separator": "^1.0.1" - }, - "deprecated": false, - "description": "Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes unless disabled.", - "devDependencies": { - "benchmarked": "^0.1.1", - "gulp-format-md": "^0.1.11", - "minimist": "^1.2.0", - "mocha": "*" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/normalize-path", - "keywords": [ - "backslash", - "file", - "filepath", - "fix", - "forward", - "fp", - "fs", - "normalize", - "path", - "slash", - "slashes", - "trailing", - "unix", - "urix" - ], - "license": "MIT", - "main": "index.js", - "name": "normalize-path", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/normalize-path.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "contains-path", - "ends-with", - "is-absolute", - "is-relative", - "parse-filepath", - "path-ends-with", - "path-segments", - "rewrite-ext", - "unixify" - ], - "description": "Other useful libraries for working with paths in node.js:" - }, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - } - }, - "version": "2.1.1" -} diff --git a/node_modules/now-and-later/LICENSE b/node_modules/now-and-later/LICENSE deleted file mode 100644 index 0b2955ae..00000000 --- a/node_modules/now-and-later/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Blaine Bublitz, Eric Schoffstall and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/now-and-later/README.md b/node_modules/now-and-later/README.md deleted file mode 100644 index 15486a84..00000000 --- a/node_modules/now-and-later/README.md +++ /dev/null @@ -1,203 +0,0 @@ -

    - - - -

    - -# now-and-later - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] - -Map over an array or object of values in parallel or series, passing each through the async iterator, with optional lifecycle hooks. - -## Usage - -```js -var nal = require('now-and-later'); - -function iterator(value, key, cb){ - // called with each value in sequence - // also passes the key - cb(null, value * 2) -} - -function create(value, key){ - // called at the beginning of every iteration - // return a storage object to be passed to each lifecycle method - return { key: key, value: value }; -} - -function before(storage){ - // called before the iterator function of every iteration - // receives the storage returned from `create` -} - -function after(result, storage){ - // called after a success occurs in the iterator function of any iteration - // receives the `result` of the iterator and the storage returned from `create` -} - -function error(error, storage){ - // called after an error occurs in the iterator function of any iteration - // receives the `error` of the iterator and the storage returned from `create` -} - -function done(error, results) { - // called after all iterations complete or an error occurs in an iterator - // receives an `error` if one occurred and all results (or partial results upon error) of the iterators -} - -/* - Calling mapSeries with an object can't guarantee order - It uses Object.keys to get an order - It is better to use an array if order must be guaranteed - */ -nal.mapSeries([1, 2, 3], iterator, { - create: create, - before: before, - after: after, - error: error -}, done); - -nal.map({ - iter1: 1, - iter2: 2 -}, iterator, { - create: create, - before: before, - after: after, - error: error -}, done); -``` - -## API - -### `map(values, iterator[, extensions][, callback])` - -Takes an object or array of `values` and an `iterator` function to execute with each value. -Optionally, takes an `extensions` object and a `callback` function that is called upon completion of the iterations. - -All iterations run in parallel. - -#### `values` - -An array or object of values to iterate over. - -If `values` is an array, iterations are started in order by index. If `values` is an object, iterations are started in order by the order returned by `Object.keys` (order is not guaranteed). - -If `values` is an array, the results of each iteration will be mapped to an array. If `values` is an object, the results of each iteration will be mapped to an object with corresponding keys. - -#### `iterator(value, key, done)` - -An async function called per iteration. All iterations are run in parallel. - -The `iterator` function is called once with each `value`, `key` and a function (`done(error, result)`) to call when the async work is complete. - -If `done` is passed an error as the first argument, the iteration will fail and the sequence will be ended; however, any iterations in progress will still complete. If `done` is passed a `result` value as the second argument, it will be added to the final results array or object. - -#### `extensions` - -The `extensions` object is used for specifying functions that give insight into the lifecycle of each iteration. The possible extension points are `create`, `before`, `after` and `error`. If an extension point is not specified, it defaults to a no-op function. - -##### `extensions.create(value, key)` - -Called at the very beginning of each iteration with the `value` being iterated and the `key` from the array or object. If `create` returns a value (`storage`), it is passed to the `before`, `after` and `error` extension points. - -If a value is not returned, an empty object is used as `storage` for each other extension point. - -This is useful for tracking information across an iteration. - -##### `extensions.before(storage)` - -Called immediately before each iteration with the `storage` value returned from the `create` extension point. - -##### `extensions.after(result, storage)` - -Called immediately after each iteration with the `result` of the iteration and the `storage` value returned from the `create` extension point. - -##### `extensions.error(error, storage)` - -Called immediately after a failed iteration with the `error` of the iteration and the `storage` value returned from the `create` extension point. - -#### `callback(error, results)` - -A function that is called after all iterations have completed or one iteration has errored. - -If all iterations completed successfully, the `error` argument will be empty and the `results` will be a mapping of the `iterator` results. - -If an iteration errored, the `error` argument will be passed from that iteration and the `results` will be whatever partial results had completed successfully before the error occurred. - -### `mapSeries(values, iterator[, extensions][, callback])` - -Takes an object or array of `values` and an `iterator` function to execute with each value. -Optionally, takes an `extensions` object and a `callback` function that is called upon completion of the iterations. - -All iterations run in serial. - -#### `values` - -An array or object of values to iterate over. - -If `values` is an array, iterations are started in order by index. If `values` is an object, iterations are started in order by the order returned by `Object.keys` (order is not guaranteed). - -If `values` is an array, the results of each iteration will be mapped to an array. If `values` is an object, the results of each iteration will be mapped to an object with corresponding keys. - -#### `iterator(value, key, done)` - -An async function called per iteration. All iterations are run in serial. - -The `iterator` function is called once with each `value`, `key` and a function (`done(error, result)`) to call when the async work is complete. - -If `done` is passed an error as the first argument, the iteration will fail and the sequence will be ended without executing any more iterations. If `done` is passed a `result` value as the second argument, it will be added to the final results array or object. - -#### `extensions` - -The `extensions` object is used for specifying functions that give insight into the lifecycle of each iteration. The possible extension points are `create`, `before`, `after` and `error`. If an extension point is not specified, it defaults to a no-op function. - -##### `extensions.create(value, key)` - -Called at the very beginning of each iteration with the `value` being iterated and the `key` from the array or object. If `create` returns a value (`storage`), it is passed to the `before`, `after` and `error` extension points. - -If a value is not returned, an empty object is used as `storage` for each other extension point. - -This is useful for tracking information across an iteration. - -##### `extensions.before(storage)` - -Called immediately before each iteration with the `storage` value returned from the `create` extension point. - -##### `extensions.after(result, storage)` - -Called immediately after each iteration with the `result` of the iteration and the `storage` value returned from the `create` extension point. - -##### `extensions.error(error, storage)` - -Called immediately after a failed iteration with the `error` of the iteration and the `storage` value returned from the `create` extension point. - -#### `callback(error, results)` - -A function that is called after all iterations have completed or one iteration has errored. - -If all iterations completed successfully, the `error` argument will be empty and the `results` will be a mapping of the `iterator` results. - -If an iteration errored, the `error` argument will be passed from that iteration and the `results` will be whatever partial results had completed successfully before the error occurred. - -## License - -MIT - -[downloads-image]: http://img.shields.io/npm/dm/now-and-later.svg -[npm-url]: https://www.npmjs.com/package/now-and-later -[npm-image]: http://img.shields.io/npm/v/now-and-later.svg - -[travis-url]: https://travis-ci.org/gulpjs/now-and-later -[travis-image]: http://img.shields.io/travis/gulpjs/now-and-later.svg?label=travis-ci - -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/now-and-later -[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/now-and-later.svg?label=appveyor - -[coveralls-url]: https://coveralls.io/r/gulpjs/now-and-later -[coveralls-image]: http://img.shields.io/coveralls/gulpjs/now-and-later/master.svg - -[gitter-url]: https://gitter.im/gulpjs/gulp -[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/now-and-later/index.js b/node_modules/now-and-later/index.js deleted file mode 100644 index 692f0b72..00000000 --- a/node_modules/now-and-later/index.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = { - map: require('./lib/map'), - mapSeries: require('./lib/mapSeries'), -}; diff --git a/node_modules/now-and-later/lib/helpers.js b/node_modules/now-and-later/lib/helpers.js deleted file mode 100644 index b0e913cc..00000000 --- a/node_modules/now-and-later/lib/helpers.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -function noop() {} - -var defaultExts = { - create: noop, - before: noop, - after: noop, - error: noop, -}; - -function defaultExtensions(extensions) { - extensions = extensions || {}; - return { - create: extensions.create || defaultExts.create, - before: extensions.before || defaultExts.before, - after: extensions.after || defaultExts.after, - error: extensions.error || defaultExts.error, - }; -} - -function initializeResults(values) { - var keys = Object.keys(values); - var results = Array.isArray(values) ? [] : {}; - - var idx = 0; - var length = keys.length; - - for (idx = 0; idx < length; idx++) { - var key = keys[idx]; - results[key] = undefined; - } - - return results; -} - -module.exports = { - defaultExtensions: defaultExtensions, - noop: noop, - initializeResults: initializeResults, -}; diff --git a/node_modules/now-and-later/lib/map.js b/node_modules/now-and-later/lib/map.js deleted file mode 100644 index cd278fe0..00000000 --- a/node_modules/now-and-later/lib/map.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; - -var once = require('once'); - -var helpers = require('./helpers'); - -function map(values, iterator, extensions, done) { - // Allow for extensions to not be specified - if (typeof extensions === 'function') { - done = extensions; - extensions = {}; - } - - // Handle no callback case - if (typeof done !== 'function') { - done = helpers.noop; - } - - done = once(done); - - // Will throw if non-object - var keys = Object.keys(values); - var length = keys.length; - var count = length; - var idx = 0; - // Return the same type as passed in - var results = helpers.initializeResults(values); - - var exts = helpers.defaultExtensions(extensions); - - if (length === 0) { - return done(null, results); - } - - for (idx = 0; idx < length; idx++) { - var key = keys[idx]; - next(key); - } - - function next(key) { - var value = values[key]; - - var storage = exts.create(value, key) || {}; - - exts.before(storage); - iterator(value, key, once(handler)); - - function handler(err, result) { - if (err) { - exts.error(err, storage); - return done(err, results); - } - - exts.after(result, storage); - results[key] = result; - if (--count === 0) { - done(err, results); - } - } - } -} - -module.exports = map; diff --git a/node_modules/now-and-later/lib/mapSeries.js b/node_modules/now-and-later/lib/mapSeries.js deleted file mode 100644 index 02cce773..00000000 --- a/node_modules/now-and-later/lib/mapSeries.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; - -var once = require('once'); - -var helpers = require('./helpers'); - -function mapSeries(values, iterator, extensions, done) { - // Allow for extensions to not be specified - if (typeof extensions === 'function') { - done = extensions; - extensions = {}; - } - - // Handle no callback case - if (typeof done !== 'function') { - done = helpers.noop; - } - - done = once(done); - - // Will throw if non-object - var keys = Object.keys(values); - var length = keys.length; - var idx = 0; - // Return the same type as passed in - var results = helpers.initializeResults(values); - - var exts = helpers.defaultExtensions(extensions); - - if (length === 0) { - return done(null, results); - } - - var key = keys[idx]; - next(key); - - function next(key) { - var value = values[key]; - - var storage = exts.create(value, key) || {}; - - exts.before(storage); - iterator(value, key, once(handler)); - - function handler(err, result) { - if (err) { - exts.error(err, storage); - return done(err, results); - } - - exts.after(result, storage); - results[key] = result; - - if (++idx >= length) { - done(err, results); - } else { - next(keys[idx]); - } - } - } -} - -module.exports = mapSeries; diff --git a/node_modules/now-and-later/package.json b/node_modules/now-and-later/package.json deleted file mode 100644 index d959cc75..00000000 --- a/node_modules/now-and-later/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "_from": "now-and-later@^2.0.0", - "_id": "now-and-later@2.0.1", - "_inBundle": false, - "_integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", - "_location": "/now-and-later", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "now-and-later@^2.0.0", - "name": "now-and-later", - "escapedName": "now-and-later", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/vinyl-sourcemap" - ], - "_resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", - "_shasum": "8e579c8685764a7cc02cb680380e94f43ccb1f7c", - "_spec": "now-and-later@^2.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-sourcemap", - "author": { - "name": "Gulp Team", - "email": "team@gulpjs.com", - "url": "http://gulpjs.com/" - }, - "bugs": { - "url": "https://github.com/gulpjs/now-and-later/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com" - } - ], - "dependencies": { - "once": "^1.3.2" - }, - "deprecated": false, - "description": "Map over an array or object of values in parallel or series, passing each through the async iterator, with optional lifecycle hooks.", - "devDependencies": { - "eslint": "^1.7.3", - "eslint-config-gulp": "^2.0.0", - "expect": "^1.19.0", - "istanbul": "^0.4.3", - "istanbul-coveralls": "^1.0.3", - "jscs": "^2.3.5", - "jscs-preset-gulp": "^1.0.0", - "mocha": "^2.4.5" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "index.js", - "lib", - "LICENSE" - ], - "homepage": "https://github.com/gulpjs/now-and-later#readme", - "keywords": [ - "async", - "async.js", - "map", - "control", - "flow", - "extension", - "tracing", - "debug", - "aop", - "aspect", - "timing", - "tracing" - ], - "license": "MIT", - "main": "index.js", - "name": "now-and-later", - "repository": { - "type": "git", - "url": "git+https://github.com/gulpjs/now-and-later.git" - }, - "scripts": { - "cover": "istanbul cover _mocha --report lcovonly", - "coveralls": "npm run cover && istanbul-coveralls", - "lint": "eslint . && jscs index.js lib/ test/", - "pretest": "npm run lint", - "test": "mocha --async-only" - }, - "version": "2.0.1" -} diff --git a/node_modules/object-keys/.editorconfig b/node_modules/object-keys/.editorconfig deleted file mode 100644 index eaa21416..00000000 --- a/node_modules/object-keys/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -root = true - -[*] -indent_style = tab; -insert_final_newline = true; -quote_type = auto; -space_after_anonymous_functions = true; -space_after_control_statements = true; -spaces_around_operators = true; -trim_trailing_whitespace = true; -spaces_in_brackets = false; -end_of_line = lf; - diff --git a/node_modules/object-keys/.eslintrc b/node_modules/object-keys/.eslintrc deleted file mode 100644 index 9a8d5b0e..00000000 --- a/node_modules/object-keys/.eslintrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "complexity": [2, 23], - "id-length": [2, { "min": 1, "max": 40 }], - "max-params": [2, 3], - "max-statements": [2, 23], - "max-statements-per-line": [2, { "max": 2 }], - "no-extra-parens": [1], - "no-invalid-this": [1], - "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "LabeledStatement", "WithStatement"], - "operator-linebreak": [2, "after"] - } -} diff --git a/node_modules/object-keys/.travis.yml b/node_modules/object-keys/.travis.yml deleted file mode 100644 index 94a6ce42..00000000 --- a/node_modules/object-keys/.travis.yml +++ /dev/null @@ -1,277 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "11.8" - - "10.15" - - "9.11" - - "8.15" - - "7.10" - - "6.16" - - "5.12" - - "4.9" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.10" - - "0.8" -before_install: - - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' - - 'nvm install-latest-npm' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "lts/*" - env: PRETEST=true - - node_js: "lts/*" - env: POSTTEST=true - - node_js: "4" - env: COVERAGE=true - - node_js: "11.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "11.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.15" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.14" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true - - env: COVERAGE=true - - env: POSTTEST=true diff --git a/node_modules/object-keys/CHANGELOG.md b/node_modules/object-keys/CHANGELOG.md deleted file mode 100644 index b7d92df2..00000000 --- a/node_modules/object-keys/CHANGELOG.md +++ /dev/null @@ -1,232 +0,0 @@ -1.1.1 / 2019-04-06 -================= - * [Fix] exclude deprecated Firefox keys (#53) - -1.1.0 / 2019-02-10 -================= - * [New] [Refactor] move full implementation to `implementation` entry point - * [Refactor] only evaluate the implementation if `Object.keys` is not present - * [Tests] up to `node` `v11.8`, `v10.15`, `v8.15`, `v6.16` - * [Tests] remove jscs - * [Tests] switch to `npm audit` from `nsp` - -1.0.12 / 2018-06-18 -================= - * [Fix] avoid accessing `window.applicationCache`, to avoid issues with latest Chrome on HTTP (#46) - -1.0.11 / 2016-07-05 -================= - * [Fix] exclude keys regarding the style (eg. `pageYOffset`) on `window` to avoid reflow (#32) - -1.0.10 / 2016-07-04 -================= - * [Fix] exclude `height` and `width` keys on `window` to avoid reflow (#31) - * [Fix] In IE 6, `window.external` makes `Object.keys` throw - * [Tests] up to `node` `v6.2`, `v5.10`, `v4.4` - * [Tests] use pretest/posttest for linting/security - * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` - * [Dev Deps] remove unused eccheck script + dep - -1.0.9 / 2015-10-19 -================= - * [Fix] Blacklist 'frame' property on window (#16, #17) - * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` - -1.0.8 / 2015-10-14 -================= - * [Fix] wrap automation equality bug checking in try/catch, per [es5-shim#327](https://github.com/es-shims/es5-shim/issues/327) - * [Fix] Blacklist 'window.frameElement' per [es5-shim#322](https://github.com/es-shims/es5-shim/issues/322) - * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG - * [Tests] up to `io.js` `v3.3`, `node` `v4.2` - * [Dev Deps] update `eslint`, `tape`, `@ljharb/eslint-config`, `jscs` - -1.0.7 / 2015-07-18 -================= - * [Fix] A proper fix for 176f03335e90d5c8d0d8125a99f27819c9b9cdad / https://github.com/es-shims/es5-shim/issues/275 that doesn't break dontEnum/constructor fixes in IE 8. - * [Fix] Remove deprecation message in Chrome by touching deprecated window properties (#15) - * [Tests] Improve test output for automation equality bugfix - * [Tests] Test on `io.js` `v2.4` - -1.0.6 / 2015-07-09 -================= - * [Fix] Use an object lookup rather than ES5's `indexOf` (#14) - * [Tests] ES3 browsers don't have `Array.isArray` - * [Tests] Fix `no-shadow` rule, as well as an IE 8 bug caused by engine NFE shadowing bugs. - -1.0.5 / 2015-07-03 -================= - * [Fix] Fix a flabbergasting IE 8 bug where `localStorage.constructor.prototype === localStorage` throws - * [Tests] Test up to `io.js` `v2.3` - * [Dev Deps] Update `nsp`, `eslint` - -1.0.4 / 2015-05-23 -================= - * Fix a Safari 5.0 bug with `Object.keys` not working with `arguments` - * Test on latest `node` and `io.js` - * Update `jscs`, `tape`, `eslint`, `nsp`, `is`, `editorconfig-tools`, `covert` - -1.0.3 / 2015-01-06 -================= - * Revert "Make `object-keys` more robust against later environment tampering" to maintain ES3 compliance - -1.0.2 / 2014-12-28 -================= - * Update lots of dev dependencies - * Tweaks to README - * Make `object-keys` more robust against later environment tampering - -1.0.1 / 2014-09-03 -================= - * Update URLs and badges in README - -1.0.0 / 2014-08-26 -================= - * v1.0.0 - -0.6.1 / 2014-08-25 -================= - * v0.6.1 - * Updating dependencies (tape, covert, is) - * Update badges in readme - * Use separate var statements - -0.6.0 / 2014-04-23 -================= - * v0.6.0 - * Updating dependencies (tape, covert) - * Make sure boxed primitives, and arguments objects, work properly in ES3 browsers - * Improve test matrix: test all node versions, but only latest two stables are a failure - * Remove internal foreach shim. - -0.5.1 / 2014-03-09 -================= - * 0.5.1 - * Updating dependencies (tape, covert, is) - * Removing forEach from the module (but keeping it in tests) - -0.5.0 / 2014-01-30 -================= - * 0.5.0 - * Explicitly returning the shim, instead of returning native Object.keys when present - * Adding a changelog. - * Cleaning up IIFE wrapping - * Testing on node 0.4 through 0.11 - -0.4.0 / 2013-08-14 -================== - - * v0.4.0 - * In Chrome 4-10 and Safari 4, typeof (new RegExp) === 'function' - * If it's a string, make sure to use charAt instead of brackets. - * Only use Function#call if necessary. - * Making sure the context tests actually run. - * Better function detection - * Adding the android browser - * Fixing testling files - * Updating tape - * Removing the "is" dependency. - * Making an isArguments shim. - * Adding a local forEach shim and tests. - * Updating paths. - * Moving the shim test. - * v0.3.0 - -0.3.0 / 2013-05-18 -================== - - * README tweak. - * Fixing constructor enum issue. Fixes [#5](https://github.com/ljharb/object-keys/issues/5). - * Adding a test for [#5](https://github.com/ljharb/object-keys/issues/5) - * Updating readme. - * Updating dependencies. - * Giving credit to lodash. - * Make sure that a prototype's constructor property is not enumerable. Fixes [#3](https://github.com/ljharb/object-keys/issues/3). - * Adding additional tests to handle arguments objects, and to skip "prototype" in functions. Fixes [#2](https://github.com/ljharb/object-keys/issues/2). - * Fixing a typo on this test for [#3](https://github.com/ljharb/object-keys/issues/3). - * Adding node 0.10 to travis. - * Adding an IE < 9 test per [#3](https://github.com/ljharb/object-keys/issues/3) - * Adding an iOS 5 mobile Safari test per [#2](https://github.com/ljharb/object-keys/issues/2) - * Moving "indexof" and "is" to be dev dependencies. - * Making sure the shim works with functions. - * Flattening the tests. - -0.2.0 / 2013-05-10 -================== - - * v0.2.0 - * Object.keys should work with arrays. - -0.1.8 / 2013-05-10 -================== - - * v0.1.8 - * Upgrading dependencies. - * Using a simpler check. - * Fixing a bug in hasDontEnumBug browsers. - * Using the newest tape! - * Fixing this error test. - * "undefined" is probably a reserved word in ES3. - * Better test message. - -0.1.7 / 2013-04-17 -================== - - * Upgrading "is" once more. - * The key "null" is breaking some browsers. - -0.1.6 / 2013-04-17 -================== - - * v0.1.6 - * Upgrading "is" - -0.1.5 / 2013-04-14 -================== - - * Bumping version. - * Adding more testling browsers. - * Updating "is" - -0.1.4 / 2013-04-08 -================== - - * Using "is" instead of "is-extended". - -0.1.3 / 2013-04-07 -================== - - * Using "foreach" instead of my own shim. - * Removing "tap"; I'll just wait for "tape" to fix its node 0.10 bug. - -0.1.2 / 2013-04-03 -================== - - * Adding dependency status; moving links to an index at the bottom. - * Upgrading is-extended; version 0.1.2 - * Adding an npm version badge. - -0.1.1 / 2013-04-01 -================== - - * Adding Travis CI. - * Bumping the version. - * Adding indexOf since IE sucks. - * Adding a forEach shim since older browsers don't have Array#forEach. - * Upgrading tape - 0.3.2 uses Array#map - * Using explicit end instead of plan. - * Can't test with Array.isArray in older browsers. - * Using is-extended. - * Fixing testling files. - * JSHint/JSLint-ing. - * Removing an unused object. - * Using strict mode. - -0.1.0 / 2013-03-30 -================== - - * Changing the exports should have meant a higher version bump. - * Oops, fixing the repo URL. - * Adding more tests. - * 0.0.2 - * Merge branch 'export_one_thing'; closes [#1](https://github.com/ljharb/object-keys/issues/1) - * Move shim export to a separate file. diff --git a/node_modules/object-keys/LICENSE b/node_modules/object-keys/LICENSE deleted file mode 100644 index 28553fdd..00000000 --- a/node_modules/object-keys/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (C) 2013 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/object-keys/README.md b/node_modules/object-keys/README.md deleted file mode 100644 index ed4c2770..00000000 --- a/node_modules/object-keys/README.md +++ /dev/null @@ -1,76 +0,0 @@ -#object-keys [![Version Badge][npm-version-svg]][package-url] - -[![Build Status][travis-svg]][travis-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -[![browser support][testling-svg]][testling-url] - -An Object.keys shim. Invoke its "shim" method to shim Object.keys if it is unavailable. - -Most common usage: -```js -var keys = Object.keys || require('object-keys'); -``` - -## Example - -```js -var keys = require('object-keys'); -var assert = require('assert'); -var obj = { - a: true, - b: true, - c: true -}; - -assert.deepEqual(keys(obj), ['a', 'b', 'c']); -``` - -```js -var keys = require('object-keys'); -var assert = require('assert'); -/* when Object.keys is not present */ -delete Object.keys; -var shimmedKeys = keys.shim(); -assert.equal(shimmedKeys, keys); -assert.deepEqual(Object.keys(obj), keys(obj)); -``` - -```js -var keys = require('object-keys'); -var assert = require('assert'); -/* when Object.keys is present */ -var shimmedKeys = keys.shim(); -assert.equal(shimmedKeys, Object.keys); -assert.deepEqual(Object.keys(obj), keys(obj)); -``` - -## Source -Implementation taken directly from [es5-shim][es5-shim-url], with modifications, including from [lodash][lodash-url]. - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/object-keys -[npm-version-svg]: http://versionbadg.es/ljharb/object-keys.svg -[travis-svg]: https://travis-ci.org/ljharb/object-keys.svg -[travis-url]: https://travis-ci.org/ljharb/object-keys -[deps-svg]: https://david-dm.org/ljharb/object-keys.svg -[deps-url]: https://david-dm.org/ljharb/object-keys -[dev-deps-svg]: https://david-dm.org/ljharb/object-keys/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/object-keys#info=devDependencies -[testling-svg]: https://ci.testling.com/ljharb/object-keys.png -[testling-url]: https://ci.testling.com/ljharb/object-keys -[es5-shim-url]: https://github.com/es-shims/es5-shim/blob/master/es5-shim.js#L542-589 -[lodash-url]: https://github.com/lodash/lodash -[npm-badge-png]: https://nodei.co/npm/object-keys.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/object-keys.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/object-keys.svg -[downloads-url]: http://npm-stat.com/charts.html?package=object-keys - diff --git a/node_modules/object-keys/implementation.js b/node_modules/object-keys/implementation.js deleted file mode 100644 index 5b329861..00000000 --- a/node_modules/object-keys/implementation.js +++ /dev/null @@ -1,122 +0,0 @@ -'use strict'; - -var keysShim; -if (!Object.keys) { - // modified from https://github.com/es-shims/es5-shim - var has = Object.prototype.hasOwnProperty; - var toStr = Object.prototype.toString; - var isArgs = require('./isArguments'); // eslint-disable-line global-require - var isEnumerable = Object.prototype.propertyIsEnumerable; - var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); - var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); - var dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ]; - var equalsConstructorPrototype = function (o) { - var ctor = o.constructor; - return ctor && ctor.prototype === o; - }; - var excludedKeys = { - $applicationCache: true, - $console: true, - $external: true, - $frame: true, - $frameElement: true, - $frames: true, - $innerHeight: true, - $innerWidth: true, - $onmozfullscreenchange: true, - $onmozfullscreenerror: true, - $outerHeight: true, - $outerWidth: true, - $pageXOffset: true, - $pageYOffset: true, - $parent: true, - $scrollLeft: true, - $scrollTop: true, - $scrollX: true, - $scrollY: true, - $self: true, - $webkitIndexedDB: true, - $webkitStorageInfo: true, - $window: true - }; - var hasAutomationEqualityBug = (function () { - /* global window */ - if (typeof window === 'undefined') { return false; } - for (var k in window) { - try { - if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { - try { - equalsConstructorPrototype(window[k]); - } catch (e) { - return true; - } - } - } catch (e) { - return true; - } - } - return false; - }()); - var equalsConstructorPrototypeIfNotBuggy = function (o) { - /* global window */ - if (typeof window === 'undefined' || !hasAutomationEqualityBug) { - return equalsConstructorPrototype(o); - } - try { - return equalsConstructorPrototype(o); - } catch (e) { - return false; - } - }; - - keysShim = function keys(object) { - var isObject = object !== null && typeof object === 'object'; - var isFunction = toStr.call(object) === '[object Function]'; - var isArguments = isArgs(object); - var isString = isObject && toStr.call(object) === '[object String]'; - var theKeys = []; - - if (!isObject && !isFunction && !isArguments) { - throw new TypeError('Object.keys called on a non-object'); - } - - var skipProto = hasProtoEnumBug && isFunction; - if (isString && object.length > 0 && !has.call(object, 0)) { - for (var i = 0; i < object.length; ++i) { - theKeys.push(String(i)); - } - } - - if (isArguments && object.length > 0) { - for (var j = 0; j < object.length; ++j) { - theKeys.push(String(j)); - } - } else { - for (var name in object) { - if (!(skipProto && name === 'prototype') && has.call(object, name)) { - theKeys.push(String(name)); - } - } - } - - if (hasDontEnumBug) { - var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); - - for (var k = 0; k < dontEnums.length; ++k) { - if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { - theKeys.push(dontEnums[k]); - } - } - } - return theKeys; - }; -} -module.exports = keysShim; diff --git a/node_modules/object-keys/index.js b/node_modules/object-keys/index.js deleted file mode 100644 index a43807d2..00000000 --- a/node_modules/object-keys/index.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -var slice = Array.prototype.slice; -var isArgs = require('./isArguments'); - -var origKeys = Object.keys; -var keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation'); - -var originalKeys = Object.keys; - -keysShim.shim = function shimObjectKeys() { - if (Object.keys) { - var keysWorksWithArguments = (function () { - // Safari 5.0 bug - var args = Object.keys(arguments); - return args && args.length === arguments.length; - }(1, 2)); - if (!keysWorksWithArguments) { - Object.keys = function keys(object) { // eslint-disable-line func-name-matching - if (isArgs(object)) { - return originalKeys(slice.call(object)); - } - return originalKeys(object); - }; - } - } else { - Object.keys = keysShim; - } - return Object.keys || keysShim; -}; - -module.exports = keysShim; diff --git a/node_modules/object-keys/isArguments.js b/node_modules/object-keys/isArguments.js deleted file mode 100644 index f2a2a901..00000000 --- a/node_modules/object-keys/isArguments.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var toStr = Object.prototype.toString; - -module.exports = function isArguments(value) { - var str = toStr.call(value); - var isArgs = str === '[object Arguments]'; - if (!isArgs) { - isArgs = str !== '[object Array]' && - value !== null && - typeof value === 'object' && - typeof value.length === 'number' && - value.length >= 0 && - toStr.call(value.callee) === '[object Function]'; - } - return isArgs; -}; diff --git a/node_modules/object-keys/package.json b/node_modules/object-keys/package.json deleted file mode 100644 index 35711bd5..00000000 --- a/node_modules/object-keys/package.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "_from": "object-keys@^1.1.1", - "_id": "object-keys@1.1.1", - "_inBundle": false, - "_integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "_location": "/object-keys", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "object-keys@^1.1.1", - "name": "object-keys", - "escapedName": "object-keys", - "rawSpec": "^1.1.1", - "saveSpec": null, - "fetchSpec": "^1.1.1" - }, - "_requiredBy": [ - "/define-properties", - "/object.assign" - ], - "_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "_shasum": "1c47f272df277f3b1daf061677d9c82e2322c60e", - "_spec": "object-keys@^1.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/object.assign", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - }, - "bugs": { - "url": "https://github.com/ljharb/object-keys/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - }, - { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net" - }, - { - "name": "Ivan Starkov", - "email": "istarkov@gmail.com" - }, - { - "name": "Gary Katsevman", - "email": "git@gkatsev.com" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/es-shims/es5-shim", - "devDependencies": { - "@ljharb/eslint-config": "^13.1.1", - "covert": "^1.1.1", - "eslint": "^5.13.0", - "foreach": "^2.0.5", - "indexof": "^0.0.1", - "is": "^3.3.0", - "tape": "^4.9.2" - }, - "engines": { - "node": ">= 0.4" - }, - "homepage": "https://github.com/ljharb/object-keys#readme", - "keywords": [ - "Object.keys", - "keys", - "ES5", - "shim" - ], - "license": "MIT", - "main": "index.js", - "name": "object-keys", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/object-keys.git" - }, - "scripts": { - "audit": "npm audit", - "coverage": "covert test/*.js", - "coverage-quiet": "covert test/*.js --quiet", - "lint": "eslint .", - "postaudit": "rm package-lock.json", - "posttest": "npm run --silent audit", - "preaudit": "npm install --package-lock --package-lock-only", - "pretest": "npm run --silent lint", - "test": "npm run --silent tests-only", - "tests-only": "node test/index.js" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.1.1" -} diff --git a/node_modules/object-keys/test/index.js b/node_modules/object-keys/test/index.js deleted file mode 100644 index 5402465a..00000000 --- a/node_modules/object-keys/test/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -require('./isArguments'); - -require('./shim'); diff --git a/node_modules/object.assign/.editorconfig b/node_modules/object.assign/.editorconfig deleted file mode 100644 index bc228f82..00000000 --- a/node_modules/object.assign/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -root = true - -[*] -indent_style = tab -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 150 - -[CHANGELOG.md] -indent_style = space -indent_size = 2 - -[*.json] -max_line_length = off - -[Makefile] -max_line_length = off diff --git a/node_modules/object.assign/.eslintignore b/node_modules/object.assign/.eslintignore deleted file mode 100644 index 849ddff3..00000000 --- a/node_modules/object.assign/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -dist/ diff --git a/node_modules/object.assign/.eslintrc b/node_modules/object.assign/.eslintrc deleted file mode 100644 index 6d4cafd9..00000000 --- a/node_modules/object.assign/.eslintrc +++ /dev/null @@ -1,26 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "complexity": [2, 19], - "id-length": [2, { "min": 1, "max": 30 }], - "max-statements": [2, 33], - "max-statements-per-line": [2, { "max": 2 }], - "no-magic-numbers": [1, { "ignore": [0] }], - "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"], - }, - - "overrides": [ - { - "files": "test/**", - "rules": { - "no-invalid-this": 1, - "max-lines-per-function": 0, - "max-statements-per-line": [2, { "max": 3 }], - "no-magic-numbers": 0, - }, - }, - ], -} diff --git a/node_modules/object.assign/.github/FUNDING.yml b/node_modules/object.assign/.github/FUNDING.yml deleted file mode 100644 index ef7fdbfa..00000000 --- a/node_modules/object.assign/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/object.assign -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/object.assign/.github/workflows/rebase.yml b/node_modules/object.assign/.github/workflows/rebase.yml deleted file mode 100644 index 0c2ad39b..00000000 --- a/node_modules/object.assign/.github/workflows/rebase.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Automatic Rebase - -on: [pull_request_target] - -jobs: - _: - name: "Automatic Rebase" - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - uses: ljharb/rebase@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/node_modules/object.assign/.github/workflows/require-allow-edits.yml b/node_modules/object.assign/.github/workflows/require-allow-edits.yml deleted file mode 100644 index aac42d3e..00000000 --- a/node_modules/object.assign/.github/workflows/require-allow-edits.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Require “Allow Edits” - -on: [pull_request_target] - -jobs: - _: - name: "Require “Allow Edits”" - - runs-on: ubuntu-latest - - steps: - - uses: ljharb/require-allow-edits@main - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/node_modules/object.assign/.nycrc b/node_modules/object.assign/.nycrc deleted file mode 100644 index d316b4db..00000000 --- a/node_modules/object.assign/.nycrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "operations", - "test" - ] -} diff --git a/node_modules/object.assign/CHANGELOG.md b/node_modules/object.assign/CHANGELOG.md deleted file mode 100644 index ac543d52..00000000 --- a/node_modules/object.assign/CHANGELOG.md +++ /dev/null @@ -1,201 +0,0 @@ -4.1.2 / 2020-10-30 -================== - * [Refactor] use extracted `call-bind` instead of full `es-abstract` - * [Dev Deps] update `eslint`, `ses`, `browserify` - * [Tests] run tests in SES - * [Tests] ses-compat: show error stacks - -4.1.1 / 2020-09-11 -================== - * [Fix] avoid mutating `Object.assign` in modern engines - * [Refactor] use `callBind` from `es-abstract` instead of `function-bind` - * [Deps] update `has-symbols`, `object-keys`, `define-properties` - * [meta] add `funding` field, FUNDING.yml - * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `browserify`, `covert`, `for-each`, `is`, `tape`, `functions-have-names`; add `aud`, `safe-publish-latest`; remove `jscs` - * [actions] add Require Allow Edits workflow - * [actions] add automatic rebasing / merge commit blocking - * [Tests] ses-compat - add test to ensure package initializes correctly after ses lockdown (#77) - * [Tests] Add passing test for a source of `window.location` (#68) - * [Tests] use shared travis-ci config - * [Tests] use `npx aud` instead of `npm audit` with hoops or `nsp` - * [Tests] use `functions-have-names` - -4.1.0 / 2017-12-21 -================== - * [New] add `auto` entry point (#52) - * [Refactor] Use `has-symbols` module - * [Deps] update `function-bind`, `object-keys` - * [Dev Deps] update `@es-shims/api`, `browserify`, `nsp`, `eslint`, `@ljharb/eslint-config`, `is` - * [Tests] up to `node` `v9.3`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS - -4.0.4 / 2016-07-04 -================== - * [Fix] Cache original `getOwnPropertySymbols`, and use that when `Object.getOwnPropertySymbols` is unavailable - * [Deps] update `object-keys` - * [Dev Deps] update `eslint`, `get-own-property-symbols`, `core-js`, `jscs`, `nsp`, `browserify`, `@ljharb/eslint-config`, `tape`, `@es-shims/api` - * [Tests] up to `node` `v6.2`, `v5.10`, `v4.4` - * [Tests] run sham tests on node 0.10 - * [Tests] use pretest/posttest for linting/security - -4.0.3 / 2015-10-21 -================== - * [Fix] Support core-js's Symbol sham (#17) - * [Fix] Ensure that properties removed or made non-enumerable during enumeration are not assigned (#16) - * [Fix] Avoid looking up keys and values more than once - * [Tests] Avoid using `reduce` so `npm run test:shams:corejs` passes in `node` `v0.8` ([core-js#122](https://github.com/zloirock/core-js/issues/122)) - * [Tests] Refactor to use my conventional structure that separates shimmed, implementation, and common tests - * [Tests] Create `npm run test:shams` and better organize tests for symbol shams - * [Tests] Remove `nsp` in favor of `requiresafe` - -4.0.2 / 2015-10-20 -================== - * [Fix] Ensure correct property enumeration order, particularly in v8 (#15) - * [Deps] update `object-keys`, `define-properties` - * [Dev Deps] update `browserify`, `is`, `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` - * [Tests] up to `io.js` `v3.3`, `node` `v4.2` - -4.0.1 / 2015-08-16 -================== - * [Docs] Add `Symbol` note to readme - -4.0.0 / 2015-08-15 -================== - * [Breaking] Implement the [es-shim API](es-shims/api). - * [Robustness] Make implementation robust against later modification of environment methods. - * [Refactor] Move implementation to `implementation.js` - * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG - * [Deps] update `object-keys`, `define-properties` - * [Dev Deps] update `browserify`, `tape`, `eslint`, `jscs`, `browserify` - * [Tests] Add `npm run tests-only` - * [Tests] use my personal shared `eslint` config. - * [Tests] up to `io.js` `v3.0` - -3.0.1 / 2015-06-28 -================== - * Cache `Object` and `Array#push` to make the shim more robust. - * [Fix] Remove use of `Array#filter`, which isn't in ES3. - * [Deps] Update `object-keys`, `define-properties` - * [Dev Deps] Update `get-own-property-symbols`, `browserify`, `eslint`, `nsp` - * [Tests] Test up to `io.js` `v2.3` - * [Tests] Adding `Object.assign` tests for non-object targets, per https://github.com/paulmillr/es6-shim/issues/348 - -3.0.0 / 2015-05-20 -================== - * Attempt to feature-detect Symbols, even if `typeof Symbol() !== 'symbol'` (#12) - * Make a separate `hasSymbols` internal module - * Update `browserify`, `eslint` - -2.0.3 / 2015-06-28 -================== - * Cache `Object` and `Array#push` to make the shim more robust. - * [Fix] Remove use of `Array#filter`, which isn't in ES3 - * [Deps] Update `object-keys`, `define-properties` - * [Dev Deps] Update `browserify`, `nsp`, `eslint` - * [Tests] Test up to `io.js` `v2.3` - -2.0.2 / 2015-05-20 -================== - * Make sure `.shim` is non-enumerable. - * Refactor `.shim` implementation to use `define-properties` predicates, rather than `delete`ing the original. - * Update docs to match spec/implementation. (#11) - * Add `npm run eslint` - * Test up to `io.js` `v2.0` - * Update `jscs`, `browserify`, `covert` - -2.0.1 / 2015-04-12 -================== - * Make sure non-enumerable Symbols are excluded. - -2.0.0 / 2015-04-12 -================== - * Make sure the shim function overwrites a broken implementation with pending exceptions. - * Ensure shim is not enumerable using `define-properties` - * Ensure `Object.assign` includes symbols. - * All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. - * Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. - * Add `npm run security` via `nsp` - * Update `browserify`, `jscs`, `tape`, `object-keys`, `is` - -1.1.1 / 2014-12-14 -================== - * Actually include the browser build in `npm` - -1.1.0 / 2014-12-14 -================== - * Add `npm run build`, and build an automatic-shimming browser distribution as part of the npm publish process. - * Update `is`, `jscs` - -1.0.3 / 2014-11-29 -================== - * Revert "optimize --production installs" - -1.0.2 / 2014-11-27 -================== - * Update `jscs`, `is`, `object-keys`, `tape` - * Add badges to README - * Name URLs in README - * Lock `covert` to `v1.0.0` - * Optimize --production installs - -1.0.1 / 2014-08-26 -================== - * Update `is`, `covert` - -1.0.0 / 2014-08-07 -================== - * Update `object-keys`, `tape` - -0.5.0 / 2014-07-31 -================== - * Object.assign no longer throws on null or undefined sources, per https://bugs.ecmascript.org/show_bug.cgi?id=3096 - -0.4.3 / 2014-07-30 -================== - * Don’t modify vars in the function signature, since it deoptimizes v8 - -0.4.2 / 2014-07-30 -================== - * Fixing the version number: v0.4.2 - -0.4.1 / 2014-07-19 -================== - * Revert "Use the native Object.keys if it’s available." - -0.4.0 / 2014-07-19 -================== - * Use the native Object.keys if it’s available. - * Fixes [#2](https://github.com/ljharb/object.assign/issues/2). - * Adding failing tests for [#2](https://github.com/ljharb/object.assign/issues/2). - * Fix indentation. - * Adding `npm run lint` - * Update `tape`, `covert` - * README: Use SVG badge for Travis [#1](https://github.com/ljharb/object.assign/issues/1) from mathiasbynens/patch-1 - -0.3.1 / 2014-04-10 -================== - * Object.assign does partially modify objects if it throws, per https://twitter.com/awbjs/status/454320863093862400 - -0.3.0 / 2014-04-10 -================== - * Update with newest ES6 behavior - Object.assign now takes a variable number of source objects. - * Update `tape` - * Make sure old and unstable nodes don’t fail Travis - -0.2.1 / 2014-03-16 -================== - * Let object-keys handle the fallback - * Update dependency badges - * Adding bower.json - -0.2.0 / 2014-03-16 -================== - * Use a for loop, because ES3 browsers don’t have "reduce" - -0.1.1 / 2014-03-14 -================== - * Updating readme - -0.1.0 / 2014-03-14 -================== - * Initial release. - diff --git a/node_modules/object.assign/LICENSE b/node_modules/object.assign/LICENSE deleted file mode 100644 index ab29cbd6..00000000 --- a/node_modules/object.assign/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/node_modules/object.assign/README.md b/node_modules/object.assign/README.md deleted file mode 100644 index 70b6ac44..00000000 --- a/node_modules/object.assign/README.md +++ /dev/null @@ -1,135 +0,0 @@ -#object.assign [![Version Badge][npm-version-svg]][npm-url] - -[![Build Status][travis-svg]][travis-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][npm-url] - -[![browser support][testling-png]][testling-url] - -An Object.assign shim. Invoke its "shim" method to shim Object.assign if it is unavailable. - -This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s. - -Takes a minimum of 2 arguments: `target` and `source`. -Takes a variable sized list of source arguments - at least 1, as many as you want. -Throws a TypeError if the `target` argument is `null` or `undefined`. - -Most common usage: -```js -var assign = require('object.assign').getPolyfill(); // returns native method if compliant - /* or */ -var assign = require('object.assign/polyfill')(); // returns native method if compliant -``` - -## Example - -```js -var assert = require('assert'); - -// Multiple sources! -var target = { a: true }; -var source1 = { b: true }; -var source2 = { c: true }; -var sourceN = { n: true }; - -var expected = { - a: true, - b: true, - c: true, - n: true -}; - -assign(target, source1, source2, sourceN); -assert.deepEqual(target, expected); // AWESOME! -``` - -```js -var target = { - a: true, - b: true, - c: true -}; -var source1 = { - c: false, - d: false -}; -var sourceN = { - e: false -}; - -var assigned = assign(target, source1, sourceN); -assert.equal(target, assigned); // returns the target object -assert.deepEqual(assigned, { - a: true, - b: true, - c: false, - d: false, - e: false -}); -``` - -```js -/* when Object.assign is not present */ -delete Object.assign; -var shimmedAssign = require('object.assign').shim(); - /* or */ -var shimmedAssign = require('object.assign/shim')(); - -assert.equal(shimmedAssign, assign); - -var target = { - a: true, - b: true, - c: true -}; -var source = { - c: false, - d: false, - e: false -}; - -var assigned = assign(target, source); -assert.deepEqual(Object.assign(target, source), assign(target, source)); -``` - -```js -/* when Object.assign is present */ -var shimmedAssign = require('object.assign').shim(); -assert.equal(shimmedAssign, Object.assign); - -var target = { - a: true, - b: true, - c: true -}; -var source = { - c: false, - d: false, - e: false -}; - -assert.deepEqual(Object.assign(target, source), assign(target, source)); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[npm-url]: https://npmjs.org/package/object.assign -[npm-version-svg]: http://versionbadg.es/ljharb/object.assign.svg -[travis-svg]: https://travis-ci.org/ljharb/object.assign.svg -[travis-url]: https://travis-ci.org/ljharb/object.assign -[deps-svg]: https://david-dm.org/ljharb/object.assign.svg?theme=shields.io -[deps-url]: https://david-dm.org/ljharb/object.assign -[dev-deps-svg]: https://david-dm.org/ljharb/object.assign/dev-status.svg?theme=shields.io -[dev-deps-url]: https://david-dm.org/ljharb/object.assign#info=devDependencies -[testling-png]: https://ci.testling.com/ljharb/object.assign.png -[testling-url]: https://ci.testling.com/ljharb/object.assign -[npm-badge-png]: https://nodei.co/npm/object.assign.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/object.assign.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/object.assign.svg -[downloads-url]: http://npm-stat.com/charts.html?package=object.assign diff --git a/node_modules/object.assign/auto.js b/node_modules/object.assign/auto.js deleted file mode 100644 index 8ebf606c..00000000 --- a/node_modules/object.assign/auto.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -require('./shim')(); diff --git a/node_modules/object.assign/dist/browser.js b/node_modules/object.assign/dist/browser.js deleted file mode 100644 index 15f0e20a..00000000 --- a/node_modules/object.assign/dist/browser.js +++ /dev/null @@ -1,865 +0,0 @@ -(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i -1) { - return callBind(intrinsic); - } - return intrinsic; -}; - -},{"./":5,"get-intrinsic":9}],5:[function(require,module,exports){ -'use strict'; - -var bind = require('function-bind'); -var GetIntrinsic = require('get-intrinsic'); - -var $apply = GetIntrinsic('%Function.prototype.apply%'); -var $call = GetIntrinsic('%Function.prototype.call%'); -var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); - -var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); - -if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - } catch (e) { - // IE 8 has a broken defineProperty - $defineProperty = null; - } -} - -module.exports = function callBind() { - return $reflectApply(bind, $call, arguments); -}; - -var applyBind = function applyBind() { - return $reflectApply(bind, $apply, arguments); -}; - -if ($defineProperty) { - $defineProperty(module.exports, 'apply', { value: applyBind }); -} else { - module.exports.apply = applyBind; -} - -},{"function-bind":8,"get-intrinsic":9}],6:[function(require,module,exports){ -'use strict'; - -var keys = require('object-keys'); -var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; - -var toStr = Object.prototype.toString; -var concat = Array.prototype.concat; -var origDefineProperty = Object.defineProperty; - -var isFunction = function (fn) { - return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; -}; - -var arePropertyDescriptorsSupported = function () { - var obj = {}; - try { - origDefineProperty(obj, 'x', { enumerable: false, value: obj }); - // eslint-disable-next-line no-unused-vars, no-restricted-syntax - for (var _ in obj) { // jscs:ignore disallowUnusedVariables - return false; - } - return obj.x === obj; - } catch (e) { /* this is IE 8. */ - return false; - } -}; -var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); - -var defineProperty = function (object, name, value, predicate) { - if (name in object && (!isFunction(predicate) || !predicate())) { - return; - } - if (supportsDescriptors) { - origDefineProperty(object, name, { - configurable: true, - enumerable: false, - value: value, - writable: true - }); - } else { - object[name] = value; - } -}; - -var defineProperties = function (object, map) { - var predicates = arguments.length > 2 ? arguments[2] : {}; - var props = keys(map); - if (hasSymbols) { - props = concat.call(props, Object.getOwnPropertySymbols(map)); - } - for (var i = 0; i < props.length; i += 1) { - defineProperty(object, props[i], map[props[i]], predicates[props[i]]); - } -}; - -defineProperties.supportsDescriptors = !!supportsDescriptors; - -module.exports = defineProperties; - -},{"object-keys":14}],7:[function(require,module,exports){ -'use strict'; - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var slice = Array.prototype.slice; -var toStr = Object.prototype.toString; -var funcType = '[object Function]'; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.call(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slice.call(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - args.concat(slice.call(arguments)) - ); - if (Object(result) === result) { - return result; - } - return this; - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); - } - }; - - var boundLength = Math.max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs.push('$' + i); - } - - bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; - -},{}],8:[function(require,module,exports){ -'use strict'; - -var implementation = require('./implementation'); - -module.exports = Function.prototype.bind || implementation; - -},{"./implementation":7}],9:[function(require,module,exports){ -'use strict'; - -/* globals - AggregateError, - Atomics, - FinalizationRegistry, - SharedArrayBuffer, - WeakRef, -*/ - -var undefined; - -var $SyntaxError = SyntaxError; -var $Function = Function; -var $TypeError = TypeError; - -// eslint-disable-next-line consistent-return -var getEvalledConstructor = function (expressionSyntax) { - try { - // eslint-disable-next-line no-new-func - return Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); - } catch (e) {} -}; - -var $gOPD = Object.getOwnPropertyDescriptor; -if ($gOPD) { - try { - $gOPD({}, ''); - } catch (e) { - $gOPD = null; // this is IE 8, which has a broken gOPD - } -} - -var throwTypeError = function () { - throw new $TypeError(); -}; -var ThrowTypeError = $gOPD - ? (function () { - try { - // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties - arguments.callee; // IE 8 does not throw here - return throwTypeError; - } catch (calleeThrows) { - try { - // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') - return $gOPD(arguments, 'callee').get; - } catch (gOPDthrows) { - return throwTypeError; - } - } - }()) - : throwTypeError; - -var hasSymbols = require('has-symbols')(); - -var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto - -var asyncGenFunction = getEvalledConstructor('async function* () {}'); -var asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined; -var asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined; - -var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); - -var INTRINSICS = { - '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, - '%Array%': Array, - '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, - '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': getEvalledConstructor('async function () {}'), - '%AsyncGenerator%': asyncGenFunctionPrototype, - '%AsyncGeneratorFunction%': asyncGenFunction, - '%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined, - '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, - '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, - '%Boolean%': Boolean, - '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, - '%Date%': Date, - '%decodeURI%': decodeURI, - '%decodeURIComponent%': decodeURIComponent, - '%encodeURI%': encodeURI, - '%encodeURIComponent%': encodeURIComponent, - '%Error%': Error, - '%eval%': eval, // eslint-disable-line no-eval - '%EvalError%': EvalError, - '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, - '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, - '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, - '%Function%': $Function, - '%GeneratorFunction%': getEvalledConstructor('function* () {}'), - '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, - '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, - '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, - '%isFinite%': isFinite, - '%isNaN%': isNaN, - '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, - '%JSON%': typeof JSON === 'object' ? JSON : undefined, - '%Map%': typeof Map === 'undefined' ? undefined : Map, - '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), - '%Math%': Math, - '%Number%': Number, - '%Object%': Object, - '%parseFloat%': parseFloat, - '%parseInt%': parseInt, - '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, - '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, - '%RangeError%': RangeError, - '%ReferenceError%': ReferenceError, - '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, - '%RegExp%': RegExp, - '%Set%': typeof Set === 'undefined' ? undefined : Set, - '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), - '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, - '%String%': String, - '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, - '%Symbol%': hasSymbols ? Symbol : undefined, - '%SyntaxError%': $SyntaxError, - '%ThrowTypeError%': ThrowTypeError, - '%TypedArray%': TypedArray, - '%TypeError%': $TypeError, - '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, - '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, - '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, - '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, - '%URIError%': URIError, - '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, - '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, - '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet -}; - -var LEGACY_ALIASES = { - '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], - '%ArrayPrototype%': ['Array', 'prototype'], - '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], - '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], - '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], - '%ArrayProto_values%': ['Array', 'prototype', 'values'], - '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], - '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], - '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], - '%BooleanPrototype%': ['Boolean', 'prototype'], - '%DataViewPrototype%': ['DataView', 'prototype'], - '%DatePrototype%': ['Date', 'prototype'], - '%ErrorPrototype%': ['Error', 'prototype'], - '%EvalErrorPrototype%': ['EvalError', 'prototype'], - '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], - '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], - '%FunctionPrototype%': ['Function', 'prototype'], - '%Generator%': ['GeneratorFunction', 'prototype'], - '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], - '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], - '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], - '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], - '%JSONParse%': ['JSON', 'parse'], - '%JSONStringify%': ['JSON', 'stringify'], - '%MapPrototype%': ['Map', 'prototype'], - '%NumberPrototype%': ['Number', 'prototype'], - '%ObjectPrototype%': ['Object', 'prototype'], - '%ObjProto_toString%': ['Object', 'prototype', 'toString'], - '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], - '%PromisePrototype%': ['Promise', 'prototype'], - '%PromiseProto_then%': ['Promise', 'prototype', 'then'], - '%Promise_all%': ['Promise', 'all'], - '%Promise_reject%': ['Promise', 'reject'], - '%Promise_resolve%': ['Promise', 'resolve'], - '%RangeErrorPrototype%': ['RangeError', 'prototype'], - '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], - '%RegExpPrototype%': ['RegExp', 'prototype'], - '%SetPrototype%': ['Set', 'prototype'], - '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], - '%StringPrototype%': ['String', 'prototype'], - '%SymbolPrototype%': ['Symbol', 'prototype'], - '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], - '%TypedArrayPrototype%': ['TypedArray', 'prototype'], - '%TypeErrorPrototype%': ['TypeError', 'prototype'], - '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], - '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], - '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], - '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], - '%URIErrorPrototype%': ['URIError', 'prototype'], - '%WeakMapPrototype%': ['WeakMap', 'prototype'], - '%WeakSetPrototype%': ['WeakSet', 'prototype'] -}; - -var bind = require('function-bind'); -var hasOwn = require('has'); -var $concat = bind.call(Function.call, Array.prototype.concat); -var $spliceApply = bind.call(Function.apply, Array.prototype.splice); -var $replace = bind.call(Function.call, String.prototype.replace); - -/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ -var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ -var stringToPath = function stringToPath(string) { - var result = []; - $replace(string, rePropName, function (match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; - }); - return result; -}; -/* end adaptation */ - -var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { - var intrinsicName = name; - var alias; - if (hasOwn(LEGACY_ALIASES, intrinsicName)) { - alias = LEGACY_ALIASES[intrinsicName]; - intrinsicName = '%' + alias[0] + '%'; - } - - if (hasOwn(INTRINSICS, intrinsicName)) { - var value = INTRINSICS[intrinsicName]; - if (typeof value === 'undefined' && !allowMissing) { - throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); - } - - return { - alias: alias, - name: intrinsicName, - value: value - }; - } - - throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); -}; - -module.exports = function GetIntrinsic(name, allowMissing) { - if (typeof name !== 'string' || name.length === 0) { - throw new $TypeError('intrinsic name must be a non-empty string'); - } - if (arguments.length > 1 && typeof allowMissing !== 'boolean') { - throw new $TypeError('"allowMissing" argument must be a boolean'); - } - - var parts = stringToPath(name); - var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; - - var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); - var intrinsicRealName = intrinsic.name; - var value = intrinsic.value; - var skipFurtherCaching = false; - - var alias = intrinsic.alias; - if (alias) { - intrinsicBaseName = alias[0]; - $spliceApply(parts, $concat([0, 1], alias)); - } - - for (var i = 1, isOwn = true; i < parts.length; i += 1) { - var part = parts[i]; - if (part === 'constructor' || !isOwn) { - skipFurtherCaching = true; - } - - intrinsicBaseName += '.' + part; - intrinsicRealName = '%' + intrinsicBaseName + '%'; - - if (hasOwn(INTRINSICS, intrinsicRealName)) { - value = INTRINSICS[intrinsicRealName]; - } else if (value != null) { - if ($gOPD && (i + 1) >= parts.length) { - var desc = $gOPD(value, part); - isOwn = !!desc; - - if (!allowMissing && !(part in value)) { - throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); - } - // By convention, when a data property is converted to an accessor - // property to emulate a data property that does not suffer from - // the override mistake, that accessor's getter is marked with - // an `originalValue` property. Here, when we detect this, we - // uphold the illusion by pretending to see that original data - // property, i.e., returning the value rather than the getter - // itself. - if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { - value = desc.get; - } else { - value = value[part]; - } - } else { - isOwn = hasOwn(value, part); - value = value[part]; - } - - if (isOwn && !skipFurtherCaching) { - INTRINSICS[intrinsicRealName] = value; - } - } - } - return value; -}; - -},{"function-bind":8,"has":12,"has-symbols":10}],10:[function(require,module,exports){ -(function (global){(function (){ -'use strict'; - -var origSymbol = global.Symbol; -var hasSymbolSham = require('./shams'); - -module.exports = function hasNativeSymbols() { - if (typeof origSymbol !== 'function') { return false; } - if (typeof Symbol !== 'function') { return false; } - if (typeof origSymbol('foo') !== 'symbol') { return false; } - if (typeof Symbol('bar') !== 'symbol') { return false; } - - return hasSymbolSham(); -}; - -}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./shams":11}],11:[function(require,module,exports){ -'use strict'; - -/* eslint complexity: [2, 18], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; - -},{}],12:[function(require,module,exports){ -'use strict'; - -var bind = require('function-bind'); - -module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); - -},{"function-bind":8}],13:[function(require,module,exports){ -'use strict'; - -var keysShim; -if (!Object.keys) { - // modified from https://github.com/es-shims/es5-shim - var has = Object.prototype.hasOwnProperty; - var toStr = Object.prototype.toString; - var isArgs = require('./isArguments'); // eslint-disable-line global-require - var isEnumerable = Object.prototype.propertyIsEnumerable; - var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); - var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); - var dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ]; - var equalsConstructorPrototype = function (o) { - var ctor = o.constructor; - return ctor && ctor.prototype === o; - }; - var excludedKeys = { - $applicationCache: true, - $console: true, - $external: true, - $frame: true, - $frameElement: true, - $frames: true, - $innerHeight: true, - $innerWidth: true, - $onmozfullscreenchange: true, - $onmozfullscreenerror: true, - $outerHeight: true, - $outerWidth: true, - $pageXOffset: true, - $pageYOffset: true, - $parent: true, - $scrollLeft: true, - $scrollTop: true, - $scrollX: true, - $scrollY: true, - $self: true, - $webkitIndexedDB: true, - $webkitStorageInfo: true, - $window: true - }; - var hasAutomationEqualityBug = (function () { - /* global window */ - if (typeof window === 'undefined') { return false; } - for (var k in window) { - try { - if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { - try { - equalsConstructorPrototype(window[k]); - } catch (e) { - return true; - } - } - } catch (e) { - return true; - } - } - return false; - }()); - var equalsConstructorPrototypeIfNotBuggy = function (o) { - /* global window */ - if (typeof window === 'undefined' || !hasAutomationEqualityBug) { - return equalsConstructorPrototype(o); - } - try { - return equalsConstructorPrototype(o); - } catch (e) { - return false; - } - }; - - keysShim = function keys(object) { - var isObject = object !== null && typeof object === 'object'; - var isFunction = toStr.call(object) === '[object Function]'; - var isArguments = isArgs(object); - var isString = isObject && toStr.call(object) === '[object String]'; - var theKeys = []; - - if (!isObject && !isFunction && !isArguments) { - throw new TypeError('Object.keys called on a non-object'); - } - - var skipProto = hasProtoEnumBug && isFunction; - if (isString && object.length > 0 && !has.call(object, 0)) { - for (var i = 0; i < object.length; ++i) { - theKeys.push(String(i)); - } - } - - if (isArguments && object.length > 0) { - for (var j = 0; j < object.length; ++j) { - theKeys.push(String(j)); - } - } else { - for (var name in object) { - if (!(skipProto && name === 'prototype') && has.call(object, name)) { - theKeys.push(String(name)); - } - } - } - - if (hasDontEnumBug) { - var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); - - for (var k = 0; k < dontEnums.length; ++k) { - if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { - theKeys.push(dontEnums[k]); - } - } - } - return theKeys; - }; -} -module.exports = keysShim; - -},{"./isArguments":15}],14:[function(require,module,exports){ -'use strict'; - -var slice = Array.prototype.slice; -var isArgs = require('./isArguments'); - -var origKeys = Object.keys; -var keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation'); - -var originalKeys = Object.keys; - -keysShim.shim = function shimObjectKeys() { - if (Object.keys) { - var keysWorksWithArguments = (function () { - // Safari 5.0 bug - var args = Object.keys(arguments); - return args && args.length === arguments.length; - }(1, 2)); - if (!keysWorksWithArguments) { - Object.keys = function keys(object) { // eslint-disable-line func-name-matching - if (isArgs(object)) { - return originalKeys(slice.call(object)); - } - return originalKeys(object); - }; - } - } else { - Object.keys = keysShim; - } - return Object.keys || keysShim; -}; - -module.exports = keysShim; - -},{"./implementation":13,"./isArguments":15}],15:[function(require,module,exports){ -'use strict'; - -var toStr = Object.prototype.toString; - -module.exports = function isArguments(value) { - var str = toStr.call(value); - var isArgs = str === '[object Arguments]'; - if (!isArgs) { - isArgs = str !== '[object Array]' && - value !== null && - typeof value === 'object' && - typeof value.length === 'number' && - value.length >= 0 && - toStr.call(value.callee) === '[object Function]'; - } - return isArgs; -}; - -},{}],16:[function(require,module,exports){ -'use strict'; - -var implementation = require('./implementation'); - -var lacksProperEnumerationOrder = function () { - if (!Object.assign) { - return false; - } - /* - * v8, specifically in node 4.x, has a bug with incorrect property enumeration order - * note: this does not detect the bug unless there's 20 characters - */ - var str = 'abcdefghijklmnopqrst'; - var letters = str.split(''); - var map = {}; - for (var i = 0; i < letters.length; ++i) { - map[letters[i]] = letters[i]; - } - var obj = Object.assign({}, map); - var actual = ''; - for (var k in obj) { - actual += k; - } - return str !== actual; -}; - -var assignHasPendingExceptions = function () { - if (!Object.assign || !Object.preventExtensions) { - return false; - } - /* - * Firefox 37 still has "pending exception" logic in its Object.assign implementation, - * which is 72% slower than our shim, and Firefox 40's native implementation. - */ - var thrower = Object.preventExtensions({ 1: 2 }); - try { - Object.assign(thrower, 'xy'); - } catch (e) { - return thrower[1] === 'y'; - } - return false; -}; - -module.exports = function getPolyfill() { - if (!Object.assign) { - return implementation; - } - if (lacksProperEnumerationOrder()) { - return implementation; - } - if (assignHasPendingExceptions()) { - return implementation; - } - return Object.assign; -}; - -},{"./implementation":2}],17:[function(require,module,exports){ -'use strict'; - -var define = require('define-properties'); -var getPolyfill = require('./polyfill'); - -module.exports = function shimAssign() { - var polyfill = getPolyfill(); - define( - Object, - { assign: polyfill }, - { assign: function () { return Object.assign !== polyfill; } } - ); - return polyfill; -}; - -},{"./polyfill":16,"define-properties":6}]},{},[1]); diff --git a/node_modules/object.assign/hasSymbols.js b/node_modules/object.assign/hasSymbols.js deleted file mode 100644 index 34841e01..00000000 --- a/node_modules/object.assign/hasSymbols.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -var keys = require('object-keys'); - -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - /* - * temp disabled per https://github.com/ljharb/object.assign/issues/17 - * if (sym instanceof Symbol) { return false; } - * temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - * if (!(symObj instanceof Symbol)) { return false; } - */ - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { return false; } // eslint-disable-line no-unreachable-loop - if (keys(obj).length !== 0) { return false; } - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; diff --git a/node_modules/object.assign/implementation.js b/node_modules/object.assign/implementation.js deleted file mode 100644 index 567efe90..00000000 --- a/node_modules/object.assign/implementation.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -// modified from https://github.com/es-shims/es6-shim -var keys = require('object-keys'); -var canBeObject = function (obj) { - return typeof obj !== 'undefined' && obj !== null; -}; -var hasSymbols = require('has-symbols/shams')(); -var callBound = require('call-bind/callBound'); -var toObject = Object; -var $push = callBound('Array.prototype.push'); -var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable'); -var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null; - -// eslint-disable-next-line no-unused-vars -module.exports = function assign(target, source1) { - if (!canBeObject(target)) { throw new TypeError('target must be an object'); } - var objTarget = toObject(target); - var s, source, i, props, syms, value, key; - for (s = 1; s < arguments.length; ++s) { - source = toObject(arguments[s]); - props = keys(source); - var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols); - if (getSymbols) { - syms = getSymbols(source); - for (i = 0; i < syms.length; ++i) { - key = syms[i]; - if ($propIsEnumerable(source, key)) { - $push(props, key); - } - } - } - for (i = 0; i < props.length; ++i) { - key = props[i]; - value = source[key]; - if ($propIsEnumerable(source, key)) { - objTarget[key] = value; - } - } - } - return objTarget; -}; diff --git a/node_modules/object.assign/index.js b/node_modules/object.assign/index.js deleted file mode 100644 index 9b506037..00000000 --- a/node_modules/object.assign/index.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -var defineProperties = require('define-properties'); -var callBind = require('call-bind'); - -var implementation = require('./implementation'); -var getPolyfill = require('./polyfill'); -var shim = require('./shim'); - -var polyfill = callBind.apply(getPolyfill()); -// eslint-disable-next-line no-unused-vars -var bound = function assign(target, source1) { - return polyfill(Object, arguments); -}; - -defineProperties(bound, { - getPolyfill: getPolyfill, - implementation: implementation, - shim: shim -}); - -module.exports = bound; diff --git a/node_modules/object.assign/package.json b/node_modules/object.assign/package.json deleted file mode 100644 index 6870b2d3..00000000 --- a/node_modules/object.assign/package.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "_from": "object.assign@^4.0.4", - "_id": "object.assign@4.1.2", - "_inBundle": false, - "_integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "_location": "/object.assign", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "object.assign@^4.0.4", - "name": "object.assign", - "escapedName": "object.assign", - "rawSpec": "^4.0.4", - "saveSpec": null, - "fetchSpec": "^4.0.4" - }, - "_requiredBy": [ - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "_shasum": "0ed54a342eceb37b38ff76eb831a0e788cb63940", - "_spec": "object.assign@^4.0.4", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs", - "author": { - "name": "Jordan Harband" - }, - "bugs": { - "url": "https://github.com/ljharb/object.assign/issues" - }, - "bundleDependencies": false, - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - }, - "deprecated": false, - "description": "ES6 spec-compliant Object.assign shim. From https://github.com/es-shims/es6-shim", - "devDependencies": { - "@es-shims/api": "^2.1.2", - "@ljharb/eslint-config": "^17.2.0", - "aud": "^1.1.2", - "browserify": "^16.5.2", - "eslint": "^7.12.1", - "for-each": "^0.3.3", - "functions-have-names": "^1.2.1", - "has": "^1.0.3", - "is": "^3.3.0", - "nyc": "^10.3.2", - "safe-publish-latest": "^1.1.4", - "ses": "^0.10.4", - "tape": "^5.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "homepage": "https://github.com/ljharb/object.assign#readme", - "keywords": [ - "Object.assign", - "assign", - "ES6", - "extend", - "$.extend", - "jQuery", - "_.extend", - "Underscore", - "es-shim API", - "polyfill", - "shim" - ], - "license": "MIT", - "main": "index.js", - "name": "object.assign", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/object.assign.git" - }, - "scripts": { - "build": "mkdir -p dist && browserify browserShim.js > dist/browser.js", - "lint": "eslint .", - "posttest": "aud --production", - "prepublish": "safe-publish-latest && npm run build", - "pretest": "npm run lint && es-shim-api --bound", - "test": "npm run tests-only && npm run test:ses", - "test:implementation": "nyc node test", - "test:native": "nyc node test/native", - "test:ses": "node test/ses-compat", - "test:shim": "nyc node test/shimmed", - "tests-only": "npm run test:implementation && npm run test:shim" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "4.1.2" -} diff --git a/node_modules/object.assign/polyfill.js b/node_modules/object.assign/polyfill.js deleted file mode 100644 index ca94aea9..00000000 --- a/node_modules/object.assign/polyfill.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -var implementation = require('./implementation'); - -var lacksProperEnumerationOrder = function () { - if (!Object.assign) { - return false; - } - /* - * v8, specifically in node 4.x, has a bug with incorrect property enumeration order - * note: this does not detect the bug unless there's 20 characters - */ - var str = 'abcdefghijklmnopqrst'; - var letters = str.split(''); - var map = {}; - for (var i = 0; i < letters.length; ++i) { - map[letters[i]] = letters[i]; - } - var obj = Object.assign({}, map); - var actual = ''; - for (var k in obj) { - actual += k; - } - return str !== actual; -}; - -var assignHasPendingExceptions = function () { - if (!Object.assign || !Object.preventExtensions) { - return false; - } - /* - * Firefox 37 still has "pending exception" logic in its Object.assign implementation, - * which is 72% slower than our shim, and Firefox 40's native implementation. - */ - var thrower = Object.preventExtensions({ 1: 2 }); - try { - Object.assign(thrower, 'xy'); - } catch (e) { - return thrower[1] === 'y'; - } - return false; -}; - -module.exports = function getPolyfill() { - if (!Object.assign) { - return implementation; - } - if (lacksProperEnumerationOrder()) { - return implementation; - } - if (assignHasPendingExceptions()) { - return implementation; - } - return Object.assign; -}; diff --git a/node_modules/object.assign/shim.js b/node_modules/object.assign/shim.js deleted file mode 100644 index 9f896ae3..00000000 --- a/node_modules/object.assign/shim.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -var define = require('define-properties'); -var getPolyfill = require('./polyfill'); - -module.exports = function shimAssign() { - var polyfill = getPolyfill(); - define( - Object, - { assign: polyfill }, - { assign: function () { return Object.assign !== polyfill; } } - ); - return polyfill; -}; diff --git a/node_modules/object.assign/test/index.js b/node_modules/object.assign/test/index.js deleted file mode 100644 index 776b2b33..00000000 --- a/node_modules/object.assign/test/index.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var assign = require('../'); -var test = require('tape'); -var runTests = require('./tests'); - -test('as a function', function (t) { - t.test('bad array/this value', function (st) { - st['throws'](function () { assign(undefined); }, TypeError, 'undefined is not an object'); - st['throws'](function () { assign(null); }, TypeError, 'null is not an object'); - st.end(); - }); - - runTests(assign, t); - - t.end(); -}); diff --git a/node_modules/object.assign/test/native.js b/node_modules/object.assign/test/native.js deleted file mode 100644 index 49a70f79..00000000 --- a/node_modules/object.assign/test/native.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -var test = require('tape'); -var defineProperties = require('define-properties'); -var isEnumerable = Object.prototype.propertyIsEnumerable; -var functionsHaveNames = require('functions-have-names')(); - -var runTests = require('./tests'); - -test('native', function (t) { - t.equal(Object.assign.length, 2, 'Object.assign has a length of 2'); - t.test('Function name', { skip: !functionsHaveNames }, function (st) { - st.equal(Object.assign.name, 'assign', 'Object.assign has name "assign"'); - st.end(); - }); - - t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { - et.equal(false, isEnumerable.call(Object, 'assign'), 'Object.assign is not enumerable'); - et.end(); - }); - - var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); - - t.test('bad object value', { skip: !supportsStrictMode }, function (st) { - st['throws'](function () { return Object.assign(undefined); }, TypeError, 'undefined is not an object'); - st['throws'](function () { return Object.assign(null); }, TypeError, 'null is not an object'); - st.end(); - }); - - // v8 in node 0.8 and 0.10 have non-enumerable string properties - var stringCharsAreEnumerable = isEnumerable.call('xy', 0); - t.test('when Object.assign is present and has pending exceptions', { skip: !stringCharsAreEnumerable || !Object.preventExtensions }, function (st) { - /* - * Firefox 37 still has "pending exception" logic in its Object.assign implementation, - * which is 72% slower than our shim, and Firefox 40's native implementation. - */ - var thrower = Object.preventExtensions({ 1: '2' }); - var error; - try { Object.assign(thrower, 'xy'); } catch (e) { error = e; } - st.equal(error instanceof TypeError, true, 'error is TypeError'); - st.equal(thrower[1], '2', 'thrower[1] === "2"'); - - st.end(); - }); - - runTests(Object.assign, t); - - t.end(); -}); diff --git a/node_modules/object.assign/test/ses-compat.js b/node_modules/object.assign/test/ses-compat.js deleted file mode 100644 index 9669eb9a..00000000 --- a/node_modules/object.assign/test/ses-compat.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -/* globals lockdown */ - -// requiring ses exposes "lockdown" on the global -require('ses'); - -// lockdown freezes the primordials -lockdown({ errorTaming: 'unsafe' }); - -// initialize the module -require('./'); diff --git a/node_modules/object.assign/test/shimmed.js b/node_modules/object.assign/test/shimmed.js deleted file mode 100644 index ee577587..00000000 --- a/node_modules/object.assign/test/shimmed.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -var assign = require('../'); -assign.shim(); - -var test = require('tape'); -var defineProperties = require('define-properties'); -var isEnumerable = Object.prototype.propertyIsEnumerable; -var functionsHaveNames = require('functions-have-names')(); - -var runTests = require('./tests'); - -test('shimmed', function (t) { - t.equal(Object.assign.length, 2, 'Object.assign has a length of 2'); - t.test('Function name', { skip: !functionsHaveNames }, function (st) { - st.equal(Object.assign.name, 'assign', 'Object.assign has name "assign"'); - st.end(); - }); - - t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { - et.equal(false, isEnumerable.call(Object, 'assign'), 'Object.assign is not enumerable'); - et.end(); - }); - - var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); - - t.test('bad object value', { skip: !supportsStrictMode }, function (st) { - st['throws'](function () { return Object.assign(undefined); }, TypeError, 'undefined is not an object'); - st['throws'](function () { return Object.assign(null); }, TypeError, 'null is not an object'); - st.end(); - }); - - // v8 in node 0.8 and 0.10 have non-enumerable string properties - var stringCharsAreEnumerable = isEnumerable.call('xy', 0); - t.test('when Object.assign is present and has pending exceptions', { skip: !stringCharsAreEnumerable || !Object.preventExtensions }, function (st) { - /* - * Firefox 37 still has "pending exception" logic in its Object.assign implementation, - * which is 72% slower than our shim, and Firefox 40's native implementation. - */ - var thrower = Object.preventExtensions({ 1: '2' }); - var error; - try { Object.assign(thrower, 'xy'); } catch (e) { error = e; } - st.equal(error instanceof TypeError, true, 'error is TypeError'); - st.equal(thrower[1], '2', 'thrower[1] === "2"'); - - st.end(); - }); - - runTests(Object.assign, t); - - t.end(); -}); diff --git a/node_modules/object.assign/test/tests.js b/node_modules/object.assign/test/tests.js deleted file mode 100644 index 81b13263..00000000 --- a/node_modules/object.assign/test/tests.js +++ /dev/null @@ -1,237 +0,0 @@ -'use strict'; - -var hasSymbols = require('has-symbols/shams')(); -var forEach = require('for-each'); -var has = require('has'); - -module.exports = function (assign, t) { - t.test('error cases', function (st) { - st['throws'](function () { assign(null); }, TypeError, 'target must be an object'); - st['throws'](function () { assign(undefined); }, TypeError, 'target must be an object'); - st['throws'](function () { assign(null, {}); }, TypeError, 'target must be an object'); - st['throws'](function () { assign(undefined, {}); }, TypeError, 'target must be an object'); - st.end(); - }); - - t.test('non-object target, no sources', function (st) { - var bool = assign(true); - st.equal(typeof bool, 'object', 'bool is object'); - st.equal(Boolean.prototype.valueOf.call(bool), true, 'bool coerces to `true`'); - - var number = assign(1); - st.equal(typeof number, 'object', 'number is object'); - st.equal(Number.prototype.valueOf.call(number), 1, 'number coerces to `1`'); - - var string = assign('1'); - st.equal(typeof string, 'object', 'number is object'); - st.equal(String.prototype.valueOf.call(string), '1', 'number coerces to `"1"`'); - - st.end(); - }); - - t.test('non-object target, with sources', function (st) { - var signal = {}; - - st.test('boolean', function (st2) { - var bool = assign(true, { a: signal }); - st2.equal(typeof bool, 'object', 'bool is object'); - st2.equal(Boolean.prototype.valueOf.call(bool), true, 'bool coerces to `true`'); - st2.equal(bool.a, signal, 'source properties copied'); - st2.end(); - }); - - st.test('number', function (st2) { - var number = assign(1, { a: signal }); - st2.equal(typeof number, 'object', 'number is object'); - st2.equal(Number.prototype.valueOf.call(number), 1, 'number coerces to `1`'); - st2.equal(number.a, signal, 'source properties copied'); - st2.end(); - }); - - st.test('string', function (st2) { - var string = assign('1', { a: signal }); - st2.equal(typeof string, 'object', 'number is object'); - st2.equal(String.prototype.valueOf.call(string), '1', 'number coerces to `"1"`'); - st2.equal(string.a, signal, 'source properties copied'); - st2.end(); - }); - - st.end(); - }); - - t.test('non-object sources', function (st) { - st.deepEqual(assign({ a: 1 }, null, { b: 2 }), { a: 1, b: 2 }, 'ignores null source'); - st.deepEqual(assign({ a: 1 }, { b: 2 }, undefined), { a: 1, b: 2 }, 'ignores undefined source'); - st.end(); - }); - - t.test('returns the modified target object', function (st) { - var target = {}; - var returned = assign(target, { a: 1 }); - st.equal(returned, target, 'returned object is the same reference as the target object'); - st.end(); - }); - - t.test('has the right length', function (st) { - st.equal(assign.length, 2, 'length is 2 => 2 required arguments'); - st.end(); - }); - - t.test('merge two objects', function (st) { - var target = { a: 1 }; - var returned = assign(target, { b: 2 }); - st.deepEqual(returned, { a: 1, b: 2 }, 'returned object has properties from both'); - st.end(); - }); - - t.test('works with functions', function (st) { - var target = function () {}; - target.a = 1; - var returned = assign(target, { b: 2 }); - st.equal(target, returned, 'returned object is target'); - st.equal(returned.a, 1); - st.equal(returned.b, 2); - st.end(); - }); - - t.test('works with primitives', function (st) { - var target = 2; - var source = { b: 42 }; - var returned = assign(target, source); - st.equal(Object.prototype.toString.call(returned), '[object Number]', 'returned is object form of number primitive'); - st.equal(Number(returned), target, 'returned and target have same valueOf'); - st.equal(returned.b, source.b); - st.end(); - }); - - /* globals window */ - t.test('works with window.location', { skip: typeof window === 'undefined' }, function (st) { - var target = {}; - assign(target, window.location); - for (var prop in window.location) { - if (has(window.location, prop)) { - st.deepEqual(target[prop], window.location[prop], prop + ' is copied'); - } - } - st.end(); - }); - - t.test('merge N objects', function (st) { - var target = { a: 1 }; - var source1 = { b: 2 }; - var source2 = { c: 3 }; - var returned = assign(target, source1, source2); - st.deepEqual(returned, { a: 1, b: 2, c: 3 }, 'returned object has properties from all sources'); - st.end(); - }); - - t.test('only iterates over own keys', function (st) { - var Foo = function () {}; - Foo.prototype.bar = true; - var foo = new Foo(); - foo.baz = true; - var target = { a: 1 }; - var returned = assign(target, foo); - st.equal(returned, target, 'returned object is the same reference as the target object'); - st.deepEqual(target, { a: 1, baz: true }, 'returned object has only own properties from both'); - st.end(); - }); - - t.test('includes enumerable symbols, after keys', { skip: !hasSymbols }, function (st) { - var visited = []; - var obj = {}; - Object.defineProperty(obj, 'a', { enumerable: true, get: function () { visited.push('a'); return 42; } }); - var symbol = Symbol('enumerable'); - Object.defineProperty(obj, symbol, { - enumerable: true, - get: function () { visited.push(symbol); return Infinity; } - }); - var nonEnumSymbol = Symbol('non-enumerable'); - Object.defineProperty(obj, nonEnumSymbol, { - enumerable: false, - get: function () { visited.push(nonEnumSymbol); return -Infinity; } - }); - var target = assign({}, obj); - st.deepEqual(visited, ['a', symbol], 'key is visited first, then symbol'); - st.equal(target.a, 42, 'target.a is 42'); - st.equal(target[symbol], Infinity, 'target[symbol] is Infinity'); - st.notEqual(target[nonEnumSymbol], -Infinity, 'target[nonEnumSymbol] is not -Infinity'); - st.end(); - }); - - t.test('does not fail when symbols are not present', { skip: !Object.isFrozen || Object.isFrozen(Object) }, function (st) { - var getSyms; - if (hasSymbols) { - getSyms = Object.getOwnPropertySymbols; - delete Object.getOwnPropertySymbols; - } - - var visited = []; - var obj = {}; - Object.defineProperty(obj, 'a', { enumerable: true, get: function () { visited.push('a'); return 42; } }); - var keys = ['a']; - if (hasSymbols) { - var symbol = Symbol('sym'); - Object.defineProperty(obj, symbol, { - enumerable: true, - get: function () { visited.push(symbol); return Infinity; } - }); - keys.push(symbol); - } - var target = assign({}, obj); - st.deepEqual(visited, keys, 'assign visits expected keys'); - st.equal(target.a, 42, 'target.a is 42'); - - if (hasSymbols) { - st.equal(target[symbol], Infinity); - - Object.getOwnPropertySymbols = getSyms; - } - st.end(); - }); - - t.test('preserves correct property enumeration order', function (st) { - var str = 'abcdefghijklmnopqrst'; - var letters = {}; - forEach(str.split(''), function (letter) { - letters[letter] = letter; - }); - - var n = 5; - st.comment('run the next test ' + n + ' times'); - var object = assign({}, letters); - var actual = ''; - for (var k in object) { - actual += k; - } - for (var i = 0; i < n; ++i) { - st.equal(actual, str, 'property enumeration order should be followed'); - } - st.end(); - }); - - t.test('checks enumerability and existence, in case of modification during [[Get]]', { skip: !Object.defineProperty }, function (st) { - var targetBvalue = {}; - var targetCvalue = {}; - var target = { b: targetBvalue, c: targetCvalue }; - var source = {}; - Object.defineProperty(source, 'a', { - enumerable: true, - get: function () { - delete this.b; - Object.defineProperty(this, 'c', { enumerable: false }); - return 'a'; - } - }); - var sourceBvalue = {}; - var sourceCvalue = {}; - source.b = sourceBvalue; - source.c = sourceCvalue; - var result = assign(target, source); - st.equal(result, target, 'sanity check: result is === target'); - st.equal(result.b, targetBvalue, 'target key not overwritten by deleted source key'); - st.equal(result.c, targetCvalue, 'target key not overwritten by non-enumerable source key'); - - st.end(); - }); -}; diff --git a/node_modules/once/LICENSE b/node_modules/once/LICENSE deleted file mode 100644 index 19129e31..00000000 --- a/node_modules/once/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/once/README.md b/node_modules/once/README.md deleted file mode 100644 index 1f1ffca9..00000000 --- a/node_modules/once/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# once - -Only call a function once. - -## usage - -```javascript -var once = require('once') - -function load (file, cb) { - cb = once(cb) - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Or add to the Function.prototype in a responsible way: - -```javascript -// only has to be done once -require('once').proto() - -function load (file, cb) { - cb = cb.once() - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Ironically, the prototype feature makes this module twice as -complicated as necessary. - -To check whether you function has been called, use `fn.called`. Once the -function is called for the first time the return value of the original -function is saved in `fn.value` and subsequent calls will continue to -return this value. - -```javascript -var once = require('once') - -function load (cb) { - cb = once(cb) - var stream = createStream() - stream.once('data', cb) - stream.once('end', function () { - if (!cb.called) cb(new Error('not found')) - }) -} -``` - -## `once.strict(func)` - -Throw an error if the function is called twice. - -Some functions are expected to be called only once. Using `once` for them would -potentially hide logical errors. - -In the example below, the `greet` function has to call the callback only once: - -```javascript -function greet (name, cb) { - // return is missing from the if statement - // when no name is passed, the callback is called twice - if (!name) cb('Hello anonymous') - cb('Hello ' + name) -} - -function log (msg) { - console.log(msg) -} - -// this will print 'Hello anonymous' but the logical error will be missed -greet(null, once(msg)) - -// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time -greet(null, once.strict(msg)) -``` diff --git a/node_modules/once/once.js b/node_modules/once/once.js deleted file mode 100644 index 23540673..00000000 --- a/node_modules/once/once.js +++ /dev/null @@ -1,42 +0,0 @@ -var wrappy = require('wrappy') -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) - - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f -} - -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) - } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f -} diff --git a/node_modules/once/package.json b/node_modules/once/package.json deleted file mode 100644 index 4f91a5ed..00000000 --- a/node_modules/once/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_from": "once@^1.3.1", - "_id": "once@1.4.0", - "_inBundle": false, - "_integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "_location": "/once", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "once@^1.3.1", - "name": "once", - "escapedName": "once", - "rawSpec": "^1.3.1", - "saveSpec": null, - "fetchSpec": "^1.3.1" - }, - "_requiredBy": [ - "/end-of-stream", - "/glob", - "/inflight", - "/isomorphic-git/simple-get", - "/now-and-later", - "/pump", - "/pumpify/pump", - "/simple-get" - ], - "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "_shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1", - "_spec": "once@^1.3.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pump", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/once/issues" - }, - "bundleDependencies": false, - "dependencies": { - "wrappy": "1" - }, - "deprecated": false, - "description": "Run a function exactly one time", - "devDependencies": { - "tap": "^7.0.1" - }, - "directories": { - "test": "test" - }, - "files": [ - "once.js" - ], - "homepage": "https://github.com/isaacs/once#readme", - "keywords": [ - "once", - "function", - "one", - "single" - ], - "license": "ISC", - "main": "once.js", - "name": "once", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/once.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "1.4.0" -} diff --git a/node_modules/ordered-read-streams/LICENSE b/node_modules/ordered-read-streams/LICENSE deleted file mode 100644 index 16fd4281..00000000 --- a/node_modules/ordered-read-streams/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Artem Medeusheyev - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/ordered-read-streams/README.md b/node_modules/ordered-read-streams/README.md deleted file mode 100644 index 2fa24899..00000000 --- a/node_modules/ordered-read-streams/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# ordered-read-streams [![NPM version](https://img.shields.io/npm/v/ordered-read-streams.svg)](http://badge.fury.io/js/ordered-read-streams) [![Build Status](https://travis-ci.org/armed/ordered-read-streams.svg?branch=master)](https://travis-ci.org/armed/ordered-read-streams) - -Combines array of streams into one read stream in strict order. - -## Installation - -`npm install ordered-read-streams` - -## Overview - -`ordered-read-streams` handles all data/errors from input streams in parallel, but emits data/errors in strict order in which streams are passed to constructor. This is `objectMode = true` stream. - -## Example - -```js -var through = require('through2'); -var Ordered = require('ordered-read-streams'); - -var s1 = through.obj(function (data, enc, next) { - var self = this; - setTimeout(function () { - self.push(data); - next(); - }, 200) -}); -var s2 = through.obj(function (data, enc, next) { - var self = this; - setTimeout(function () { - self.push(data); - next(); - }, 30) -}); -var s3 = through.obj(function (data, enc, next) { - var self = this; - setTimeout(function () { - self.push(data); - next(); - }, 100) -}); - -var streams = new Ordered([s1, s2, s3]); -streams.on('data', function (data) { - console.log(data); -}) - -s1.write('stream 1'); -s1.end(); - -s2.write('stream 2'); -s2.end(); - -s3.write('stream 3'); -s3.end(); -``` -Ouput will be: - -``` -stream 1 -stream 2 -stream 3 -``` - -## Licence - -MIT diff --git a/node_modules/ordered-read-streams/index.js b/node_modules/ordered-read-streams/index.js deleted file mode 100644 index 61f38865..00000000 --- a/node_modules/ordered-read-streams/index.js +++ /dev/null @@ -1,99 +0,0 @@ -var Readable = require('readable-stream/readable'); -var util = require('util'); - -function isReadable(stream) { - if (typeof stream.pipe !== 'function') { - return false; - } - - if (!stream.readable) { - return false; - } - - if (typeof stream._read !== 'function') { - return false; - } - - if (!stream._readableState) { - return false; - } - - return true; -} - -function addStream (streams, stream) { - if (!isReadable(stream)) { - throw new Error('All input streams must be readable'); - } - - var self = this; - - stream._buffer = []; - - stream.on('readable', function () { - var chunk = stream.read(); - while (chunk) { - if (this === streams[0]) { - self.push(chunk); - } else { - this._buffer.push(chunk); - } - chunk = stream.read(); - } - }); - - stream.on('end', function () { - for (var stream = streams[0]; - stream && stream._readableState.ended; - stream = streams[0]) { - while (stream._buffer.length) { - self.push(stream._buffer.shift()); - } - - streams.shift(); - } - - if (!streams.length) { - self.push(null); - } - }); - - stream.on('error', this.emit.bind(this, 'error')); - - streams.push(stream); -} - -function OrderedStreams (streams, options) { - if (!(this instanceof(OrderedStreams))) { - return new OrderedStreams(streams, options); - } - - streams = streams || []; - options = options || {}; - - options.objectMode = true; - - Readable.call(this, options); - - if (!Array.isArray(streams)) { - streams = [streams]; - } - if (!streams.length) { - return this.push(null); // no streams, close - } - - var addStreamBinded = addStream.bind(this, []); - - streams.forEach(function (item) { - if (Array.isArray(item)) { - item.forEach(addStreamBinded); - } else { - addStreamBinded(item); - } - }); -} -util.inherits(OrderedStreams, Readable); - -OrderedStreams.prototype._read = function () {}; - -module.exports = OrderedStreams; diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/.travis.yml b/node_modules/ordered-read-streams/node_modules/readable-stream/.travis.yml deleted file mode 100644 index f62cdac0..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -sudo: false -language: node_js -before_install: - - (test $NPM_LEGACY && npm install -g npm@2 && npm install -g npm@3) || true -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: NPM_LEGACY=true - - node_js: '0.10' - env: NPM_LEGACY=true - - node_js: '0.11' - env: NPM_LEGACY=true - - node_js: '0.12' - env: NPM_LEGACY=true - - node_js: 1 - env: NPM_LEGACY=true - - node_js: 2 - env: NPM_LEGACY=true - - node_js: 3 - env: NPM_LEGACY=true - - node_js: 4 - - node_js: 5 - - node_js: 6 - - node_js: 7 - - node_js: 8 - - node_js: 9 -script: "npm run test" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/ordered-read-streams/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58d..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/GOVERNANCE.md b/node_modules/ordered-read-streams/node_modules/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93f..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### Streams Working Group - -The Node.js Streams is jointly governed by a Working Group -(WG) -that is responsible for high-level guidance of the project. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Conduct guidelines -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project -[README.md](./README.md#current-project-team-members). - -### Collaborators - -The readable-stream GitHub repository is -maintained by the WG and additional Collaborators who are added by the -WG on an ongoing basis. - -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the WG and their addition as -Collaborators is discussed during the WG meeting. - -_Note:_ If you make a significant contribution and are not considered -for commit-access log an issue or contact a WG member directly and it -will be brought up in the next WG meeting. - -Modifications of the contents of the readable-stream repository are -made on -a collaborative basis. Anybody with a GitHub account may propose a -modification via pull request and it will be considered by the project -Collaborators. All pull requests must be reviewed and accepted by a -Collaborator with sufficient expertise who is able to take full -responsibility for the change. In the case of pull requests proposed -by an existing Collaborator, an additional Collaborator is required -for sign-off. Consensus should be sought if additional Collaborators -participate and there is disagreement around a particular -modification. See _Consensus Seeking Process_ below for further detail -on the consensus model used for governance. - -Collaborators may opt to elevate significant or controversial -modifications, or modifications that have not found consensus to the -WG for discussion by assigning the ***WG-agenda*** tag to a pull -request or issue. The WG should serve as the final arbiter where -required. - -For the current list of Collaborators, see the project -[README.md](./README.md#members). - -### WG Membership - -WG seats are not time-limited. There is no fixed size of the WG. -However, the expected target is between 6 and 12, to ensure adequate -coverage of important areas of expertise, balanced with the ability to -make decisions efficiently. - -There is no specific set of requirements or qualifications for WG -membership beyond these rules. - -The WG may add additional members to the WG by unanimous consensus. - -A WG member may be removed from the WG by voluntary resignation, or by -unanimous consensus of all other WG members. - -Changes to WG membership should be posted in the agenda, and may be -suggested as any other agenda item (see "WG Meetings" below). - -If an addition or removal is proposed during a meeting, and the full -WG is not in attendance to participate, then the addition or removal -is added to the agenda for the subsequent meeting. This is to ensure -that all members are given the opportunity to participate in all -membership decisions. If a WG member is unable to attend a meeting -where a planned membership decision is being made, then their consent -is assumed. - -No more than 1/3 of the WG members may be affiliated with the same -employer. If removal or resignation of a WG member, or a change of -employment by a WG member, creates a situation where more than 1/3 of -the WG membership shares an employer, then the situation must be -immediately remedied by the resignation or removal of one or more WG -members affiliated with the over-represented employer(s). - -### WG Meetings - -The WG meets occasionally on a Google Hangout On Air. A designated moderator -approved by the WG runs the meeting. Each meeting should be -published to YouTube. - -Items are added to the WG agenda that are considered contentious or -are modifications of governance, contribution policy, WG membership, -or release process. - -The intention of the agenda is not to approve or review all patches; -that should happen continuously on GitHub and be handled by the larger -group of Collaborators. - -Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, -WG member or the moderator can add the item to the agenda by adding -the ***WG-agenda*** tag to the issue. - -Prior to each WG meeting the moderator will share the Agenda with -members of the WG. WG members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the WG -cannot veto or remove items. - -The WG may invite persons or representatives from certain projects to -participate in a non-voting capacity. - -The moderator is responsible for summarizing the discussion of each -agenda item and sends it as a pull request after the meeting. - -### Consensus Seeking Process - -The WG follows a -[Consensus -Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) -decision-making model. - -When an agenda item has appeared to reach a consensus the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. - -If an agenda item cannot reach a consensus a WG member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be seconded by a majority of the WG -or else the discussion will continue. Simple majority wins. - -Note that changes to WG membership require a majority consensus. See -"WG Membership" above. diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/LICENSE b/node_modules/ordered-read-streams/node_modules/readable-stream/LICENSE deleted file mode 100644 index 2873b3b2..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/README.md b/node_modules/ordered-read-streams/node_modules/readable-stream/README.md deleted file mode 100644 index 23fe3f3e..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# readable-stream - -***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - - -## Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E -* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/ordered-read-streams/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index 83275f19..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,60 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section - - diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/duplex-browser.js b/node_modules/ordered-read-streams/node_modules/readable-stream/duplex-browser.js deleted file mode 100644 index f8b2db83..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/duplex-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_duplex.js'); diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/duplex.js b/node_modules/ordered-read-streams/node_modules/readable-stream/duplex.js deleted file mode 100644 index 46924cbf..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Duplex diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/ordered-read-streams/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 57003c32..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -{ - // avoid scope creep, the keys array can then be collected - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - pna.nextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -Object.defineProperty(Duplex.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); - -Duplex.prototype._destroy = function (err, cb) { - this.push(null); - this.end(); - - pna.nextTick(cb, err); -}; \ No newline at end of file diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/ordered-read-streams/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 612edb4d..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/ordered-read-streams/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 0f807646..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1019 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - -/**/ -var Duplex; -/**/ - -Readable.ReadableState = ReadableState; - -/**/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var BufferList = require('./internal/streams/BufferList'); -var destroyImpl = require('./internal/streams/destroy'); -var StringDecoder; - -util.inherits(Readable, Stream); - -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); - - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var readableHwm = options.readableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} - -Object.defineProperty(Readable.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); - -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - this.push(null); - cb(err); -}; - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); - } else if (state.ended) { - stream.emit('error', new Error('stream.push() after EOF')); - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - } - } - - return needMoreData(state); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } else { - state.length -= n; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - pna.nextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('_read() is not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - // If the user pushes more data while we're writing to dest then we'll end up - // in ondata again. However, we only want to increase awaitDrain once because - // dest will only emit one 'drain' event for the multiple writes. - // => Introduce a guard on increasing awaitDrain. - var increasedAwaitDrain = false; - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - increasedAwaitDrain = false; - var ret = dest.write(chunk); - if (false === ret && !increasedAwaitDrain) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - increasedAwaitDrain = true; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { hasUnpiped: false }; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, unpipeInfo); - }return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this, unpipeInfo); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data') { - // Start flowing on next tick if stream isn't explicitly paused - if (this._readableState.flowing !== false) this.resume(); - } else if (ev === 'readable') { - var state = this._readableState; - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.emittedReadable = false; - if (!state.reading) { - pna.nextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - pna.nextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - state.awaitDrain = 0; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null) {} -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var _this = this; - - var state = this._readableState; - var paused = false; - - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - - _this.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return this; -}; - -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._readableState.highWaterMark; - } -}); - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = fromListPartial(n, state.buffer, state.decoder); - } - - return ret; -} - -// Extracts only enough buffered data to satisfy the amount requested. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromListPartial(n, list, hasStrings) { - var ret; - if (n < list.head.data.length) { - // slice is the same for buffers and strings - ret = list.head.data.slice(0, n); - list.head.data = list.head.data.slice(n); - } else if (n === list.head.data.length) { - // first chunk is a perfect match - ret = list.shift(); - } else { - // result spans more than one buffer - ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); - } - return ret; -} - -// Copies a specified amount of characters from the list of buffered data -// chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBufferString(n, list) { - var p = list.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -// Copies a specified amount of bytes from the list of buffered data chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBuffer(n, list) { - var ret = Buffer.allocUnsafe(n); - var p = list.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - pna.nextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/ordered-read-streams/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index fcfc105a..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) { - return this.emit('error', new Error('write callback called multiple times')); - } - - ts.writechunk = null; - ts.writecb = null; - - if (data != null) // single equals check for both `null` and `undefined` - this.push(data); - - cb(er); - - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); -} - -function prefinish() { - var _this = this; - - if (typeof this._flush === 'function') { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('_transform() is not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -Transform.prototype._destroy = function (err, cb) { - var _this2 = this; - - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - _this2.emit('close'); - }); -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - - if (data != null) // single equals check for both `null` and `undefined` - stream.push(data); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); - - if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/ordered-read-streams/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index b0b02200..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,687 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Writable; - -/* */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; -/**/ - -/**/ -var Duplex; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -var destroyImpl = require('./internal/streams/destroy'); - -util.inherits(Writable, Stream); - -function nop() {} - -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var writableHwm = options.writableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // if _final has been called - this.finalCalled = false; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // has it been destroyed - this.destroyed = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function (object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function (object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { - return new Writable(options); - } - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - pna.nextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - pna.nextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} - -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - pna.nextTick(cb, er); - // this can emit finish, and it will always happen - // after error - pna.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('_write() is not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - stream.emit('error', err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function') { - state.pendingcb++; - state.finalCalled = true; - pna.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = corkReq; - } else { - state.corkedRequestsFree = corkReq; - } -} - -Object.defineProperty(Writable.prototype, 'destroyed', { - get: function () { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); - -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - this.end(); - cb(err); -}; \ No newline at end of file diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/ordered-read-streams/node_modules/readable-stream/lib/internal/streams/BufferList.js deleted file mode 100644 index aefc68bd..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/internal/streams/BufferList.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Buffer = require('safe-buffer').Buffer; -var util = require('util'); - -function copyBuffer(src, target, offset) { - src.copy(target, offset); -} - -module.exports = function () { - function BufferList() { - _classCallCheck(this, BufferList); - - this.head = null; - this.tail = null; - this.length = 0; - } - - BufferList.prototype.push = function push(v) { - var entry = { data: v, next: null }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - }; - - BufferList.prototype.unshift = function unshift(v) { - var entry = { data: v, next: this.head }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - }; - - BufferList.prototype.shift = function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - }; - - BufferList.prototype.clear = function clear() { - this.head = this.tail = null; - this.length = 0; - }; - - BufferList.prototype.join = function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) { - ret += s + p.data; - }return ret; - }; - - BufferList.prototype.concat = function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - if (this.length === 1) return this.head.data; - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; - }; - - return BufferList; -}(); - -if (util && util.inspect && util.inspect.custom) { - module.exports.prototype[util.inspect.custom] = function () { - var obj = util.inspect({ length: this.length }); - return this.constructor.name + ' ' + obj; - }; -} \ No newline at end of file diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/ordered-read-streams/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index 5a0a0d88..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { - pna.nextTick(emitErrorNT, this, err); - } - return this; - } - - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; - } - - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - pna.nextTick(emitErrorNT, _this, err); - if (_this._writableState) { - _this._writableState.errorEmitted = true; - } - } else if (cb) { - cb(err); - } - }); - - return this; -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy -}; \ No newline at end of file diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/ordered-read-streams/node_modules/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3fd..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/ordered-read-streams/node_modules/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b6..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/package.json b/node_modules/ordered-read-streams/node_modules/readable-stream/package.json deleted file mode 100644 index 79be4167..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "readable-stream@^2.0.1", - "_id": "readable-stream@2.3.7", - "_inBundle": false, - "_integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "_location": "/ordered-read-streams/readable-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "readable-stream@^2.0.1", - "name": "readable-stream", - "escapedName": "readable-stream", - "rawSpec": "^2.0.1", - "saveSpec": null, - "fetchSpec": "^2.0.1" - }, - "_requiredBy": [ - "/ordered-read-streams" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "_shasum": "1eca1cf711aef814c04f62252a36a62f6cb23b57", - "_spec": "readable-stream@^2.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/ordered-read-streams", - "browser": { - "util": false, - "./readable.js": "./readable-browser.js", - "./writable.js": "./writable-browser.js", - "./duplex.js": "./duplex-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "deprecated": false, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "assert": "^1.4.0", - "babel-polyfill": "^6.9.1", - "buffer": "^4.9.0", - "lolex": "^2.3.2", - "nyc": "^6.4.0", - "tap": "^0.7.0", - "tape": "^4.8.0" - }, - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "name": "readable-stream", - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov", - "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js" - }, - "version": "2.3.7" -} diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/passthrough.js b/node_modules/ordered-read-streams/node_modules/readable-stream/passthrough.js deleted file mode 100644 index ffd791d7..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').PassThrough diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/readable-browser.js b/node_modules/ordered-read-streams/node_modules/readable-stream/readable-browser.js deleted file mode 100644 index e5037259..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/readable-browser.js +++ /dev/null @@ -1,7 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/readable.js b/node_modules/ordered-read-streams/node_modules/readable-stream/readable.js deleted file mode 100644 index ec89ec53..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,19 +0,0 @@ -var Stream = require('stream'); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; - exports = module.exports = Stream.Readable; - exports.Readable = Stream.Readable; - exports.Writable = Stream.Writable; - exports.Duplex = Stream.Duplex; - exports.Transform = Stream.Transform; - exports.PassThrough = Stream.PassThrough; - exports.Stream = Stream; -} else { - exports = module.exports = require('./lib/_stream_readable.js'); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = require('./lib/_stream_writable.js'); - exports.Duplex = require('./lib/_stream_duplex.js'); - exports.Transform = require('./lib/_stream_transform.js'); - exports.PassThrough = require('./lib/_stream_passthrough.js'); -} diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/transform.js b/node_modules/ordered-read-streams/node_modules/readable-stream/transform.js deleted file mode 100644 index b1baba26..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Transform diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/writable-browser.js b/node_modules/ordered-read-streams/node_modules/readable-stream/writable-browser.js deleted file mode 100644 index ebdde6a8..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/writable-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_writable.js'); diff --git a/node_modules/ordered-read-streams/node_modules/readable-stream/writable.js b/node_modules/ordered-read-streams/node_modules/readable-stream/writable.js deleted file mode 100644 index 3211a6f8..00000000 --- a/node_modules/ordered-read-streams/node_modules/readable-stream/writable.js +++ /dev/null @@ -1,8 +0,0 @@ -var Stream = require("stream") -var Writable = require("./lib/_stream_writable.js") - -if (process.env.READABLE_STREAM === 'disable') { - module.exports = Stream && Stream.Writable || Writable -} else { - module.exports = Writable -} diff --git a/node_modules/ordered-read-streams/node_modules/safe-buffer/LICENSE b/node_modules/ordered-read-streams/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068cee..00000000 --- a/node_modules/ordered-read-streams/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/ordered-read-streams/node_modules/safe-buffer/README.md b/node_modules/ordered-read-streams/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81afd..00000000 --- a/node_modules/ordered-read-streams/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) - - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) - - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) - - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) - - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) - - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/node_modules/ordered-read-streams/node_modules/safe-buffer/index.d.ts b/node_modules/ordered-read-streams/node_modules/safe-buffer/index.d.ts deleted file mode 100644 index e9fed809..00000000 --- a/node_modules/ordered-read-streams/node_modules/safe-buffer/index.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "safe-buffer" { - export class Buffer { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - } -} \ No newline at end of file diff --git a/node_modules/ordered-read-streams/node_modules/safe-buffer/index.js b/node_modules/ordered-read-streams/node_modules/safe-buffer/index.js deleted file mode 100644 index 22438dab..00000000 --- a/node_modules/ordered-read-streams/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/node_modules/ordered-read-streams/node_modules/safe-buffer/package.json b/node_modules/ordered-read-streams/node_modules/safe-buffer/package.json deleted file mode 100644 index ac31f134..00000000 --- a/node_modules/ordered-read-streams/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "safe-buffer@~5.1.1", - "_id": "safe-buffer@5.1.2", - "_inBundle": false, - "_integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "_location": "/ordered-read-streams/safe-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "safe-buffer@~5.1.1", - "name": "safe-buffer", - "escapedName": "safe-buffer", - "rawSpec": "~5.1.1", - "saveSpec": null, - "fetchSpec": "~5.1.1" - }, - "_requiredBy": [ - "/ordered-read-streams/readable-stream", - "/ordered-read-streams/string_decoder" - ], - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "_shasum": "991ec69d296e0313747d59bdfd2b745c35f8828d", - "_spec": "safe-buffer@~5.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/ordered-read-streams/node_modules/readable-stream", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Safer Node.js Buffer API", - "devDependencies": { - "standard": "*", - "tape": "^4.0.0" - }, - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "name": "safe-buffer", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "types": "index.d.ts", - "version": "5.1.2" -} diff --git a/node_modules/ordered-read-streams/node_modules/string_decoder/.travis.yml b/node_modules/ordered-read-streams/node_modules/string_decoder/.travis.yml deleted file mode 100644 index 3347a725..00000000 --- a/node_modules/ordered-read-streams/node_modules/string_decoder/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test diff --git a/node_modules/ordered-read-streams/node_modules/string_decoder/LICENSE b/node_modules/ordered-read-streams/node_modules/string_decoder/LICENSE deleted file mode 100644 index 778edb20..00000000 --- a/node_modules/ordered-read-streams/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - diff --git a/node_modules/ordered-read-streams/node_modules/string_decoder/README.md b/node_modules/ordered-read-streams/node_modules/string_decoder/README.md deleted file mode 100644 index 5fd58315..00000000 --- a/node_modules/ordered-read-streams/node_modules/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# string_decoder - -***Node-core v8.9.4 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. - -## Streams Working Group - -`string_decoder` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -See [readable-stream](https://github.com/nodejs/readable-stream) for -more details. diff --git a/node_modules/ordered-read-streams/node_modules/string_decoder/lib/string_decoder.js b/node_modules/ordered-read-streams/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63f..00000000 --- a/node_modules/ordered-read-streams/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var Buffer = require('safe-buffer').Buffer; -/**/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/node_modules/ordered-read-streams/node_modules/string_decoder/package.json b/node_modules/ordered-read-streams/node_modules/string_decoder/package.json deleted file mode 100644 index f770ef16..00000000 --- a/node_modules/ordered-read-streams/node_modules/string_decoder/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "string_decoder@~1.1.1", - "_id": "string_decoder@1.1.1", - "_inBundle": false, - "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "_location": "/ordered-read-streams/string_decoder", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "string_decoder@~1.1.1", - "name": "string_decoder", - "escapedName": "string_decoder", - "rawSpec": "~1.1.1", - "saveSpec": null, - "fetchSpec": "~1.1.1" - }, - "_requiredBy": [ - "/ordered-read-streams/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8", - "_spec": "string_decoder@~1.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/ordered-read-streams/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/nodejs/string_decoder/issues" - }, - "bundleDependencies": false, - "dependencies": { - "safe-buffer": "~5.1.0" - }, - "deprecated": false, - "description": "The string_decoder module from Node core", - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "lib/string_decoder.js", - "name": "string_decoder", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "test": "tap test/parallel/*.js && node test/verify-dependencies" - }, - "version": "1.1.1" -} diff --git a/node_modules/ordered-read-streams/package.json b/node_modules/ordered-read-streams/package.json deleted file mode 100644 index 43ba8715..00000000 --- a/node_modules/ordered-read-streams/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_from": "ordered-read-streams@^1.0.0", - "_id": "ordered-read-streams@1.0.1", - "_inBundle": false, - "_integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", - "_location": "/ordered-read-streams", - "_phantomChildren": { - "core-util-is": "1.0.2", - "inherits": "2.0.4", - "isarray": "1.0.0", - "process-nextick-args": "2.0.1", - "util-deprecate": "1.0.2" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "ordered-read-streams@^1.0.0", - "name": "ordered-read-streams", - "escapedName": "ordered-read-streams", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/glob-stream" - ], - "_resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", - "_shasum": "77c0cb37c41525d64166d990ffad7ec6a0e1363e", - "_spec": "ordered-read-streams@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/glob-stream", - "author": { - "name": "Artem Medeusheyev", - "email": "artem.medeusheyev@gmail.com" - }, - "bugs": { - "url": "https://github.com/armed/ordered-read-streams/issues" - }, - "bundleDependencies": false, - "dependencies": { - "readable-stream": "^2.0.1" - }, - "deprecated": false, - "description": "Combines array of streams into one read stream in strict order", - "devDependencies": { - "expect": "^1.20.2", - "jscs": "^1.13.1", - "jshint": "^2.8.0", - "mississippi": "^1.3.0", - "mocha": "^2.2.5", - "pre-commit": "^1.0.10", - "through2": "^2.0.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/armed/ordered-read-streams#readme", - "license": "MIT", - "name": "ordered-read-streams", - "repository": { - "type": "git", - "url": "git+https://github.com/armed/ordered-read-streams.git" - }, - "scripts": { - "test": "jscs *.js test/*js && jshint *.js test/*.js && mocha" - }, - "version": "1.0.1" -} diff --git a/node_modules/pako/CHANGELOG.md b/node_modules/pako/CHANGELOG.md deleted file mode 100644 index a861326b..00000000 --- a/node_modules/pako/CHANGELOG.md +++ /dev/null @@ -1,164 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - - -## [1.0.11] - 2020-01-29 -### Fixed -- Fix tests in node.js v12+, #179. - - -## [1.0.10] - 2019-02-28 -### Fixed -- Fix minified version, #161. - - -## [1.0.9] - 2019-02-28 -### Fixed -- Fix `new Buffer()` warning, #154. - - -## [1.0.8] - 2019-01-14 -### Fixed -- Fix raw inflate with dictionary, #155. - - -## [1.0.7] - 2018-11-29 -### Fixed -- Fixed RangeError in Crome 72, #150. - - -## [1.0.6] - 2017-09-14 -### Changed -- Improve @std/esm compatibility. - - -## [1.0.5] - 2017-03-17 -### Changed -- Maintenance. More formal `zlib` attribution and related - changes, #93. Thanks to @bastien-roucaries for the help. - - -## [1.0.4] - 2016-12-15 -### Changed -- Bump dev dependencies. - -### Fixed -- Make sure `err.message` is filled on throw. - -### Added -- Code examples for utf-16 string encoding & object compression. - - -## [1.0.3] - 2016-07-25 -### Fixed -- Maintenance: re-release to properly display latest version in npm registry - and badges. Because `npm publish` timestamp used instead of versions. - - -## [1.0.2] - 2016-07-21 -### Fixed -- Fixed nasty bug in deflate (wrong `d_buf` offset), which could cause - broken data in some rare cases. -- Also released as 0.2.9 to give chance to old dependents, not updated to 1.x - version. - - -## [1.0.1] - 2016-04-01 -### Added -- Added dictionary support. Thanks to @dignifiedquire. - - -## [1.0.0] - 2016-02-17 -### Changed -- Maintenance release (semver, coding style). - - -## [0.2.8] - 2015-09-14 -### Fixed -- Fixed regression after 0.2.4 for edge conditions in inflate wrapper (#65). - Added more tests to cover possible cases. - - -## [0.2.7] - 2015-06-09 -### Added -- Added Z_SYNC_FLUSH support. Thanks to @TinoLange. - - -## [0.2.6] - 2015-03-24 -### Added -- Allow ArrayBuffer input. - - -## [0.2.5] - 2014-07-19 -### Fixed -- Workaround for Chrome 38.0.2096.0 script parser bug, #30. - - -## [0.2.4] - 2014-07-07 -### Fixed -- Fixed bug in inflate wrapper, #29 - - -## [0.2.3] - 2014-06-09 -### Changed -- Maintenance release, dependencies update. - - -## [0.2.2] - 2014-06-04 -### Fixed -- Fixed iOS 5.1 Safari issue with `apply(typed_array)`, #26. - - -## [0.2.1] - 2014-05-01 -### Fixed -- Fixed collision on switch dynamic/fixed tables. - - -## [0.2.0] - 2014-04-18 -### Added -- Added custom gzip headers support. -- Added strings support. -- More coverage tests. - -### Fixed -- Improved memory allocations for small chunks. -- ZStream properties rename/cleanup. - - -## [0.1.1] - 2014-03-20 -### Fixed -- Bugfixes for inflate/deflate. - - -## [0.1.0] - 2014-03-15 -### Added -- First release. - - -[1.0.10]: https://github.com/nodeca/pako/compare/1.0.10...1.0.11 -[1.0.10]: https://github.com/nodeca/pako/compare/1.0.9...1.0.10 -[1.0.9]: https://github.com/nodeca/pako/compare/1.0.8...1.0.9 -[1.0.8]: https://github.com/nodeca/pako/compare/1.0.7...1.0.8 -[1.0.7]: https://github.com/nodeca/pako/compare/1.0.6...1.0.7 -[1.0.6]: https://github.com/nodeca/pako/compare/1.0.5...1.0.6 -[1.0.5]: https://github.com/nodeca/pako/compare/1.0.4...1.0.5 -[1.0.4]: https://github.com/nodeca/pako/compare/1.0.3...1.0.4 -[1.0.3]: https://github.com/nodeca/pako/compare/1.0.2...1.0.3 -[1.0.2]: https://github.com/nodeca/pako/compare/1.0.1...1.0.2 -[1.0.1]: https://github.com/nodeca/pako/compare/1.0.0...1.0.1 -[1.0.0]: https://github.com/nodeca/pako/compare/0.2.8...1.0.0 -[0.2.8]: https://github.com/nodeca/pako/compare/0.2.7...0.2.8 -[0.2.7]: https://github.com/nodeca/pako/compare/0.2.6...0.2.7 -[0.2.6]: https://github.com/nodeca/pako/compare/0.2.5...0.2.6 -[0.2.5]: https://github.com/nodeca/pako/compare/0.2.4...0.2.5 -[0.2.4]: https://github.com/nodeca/pako/compare/0.2.3...0.2.4 -[0.2.3]: https://github.com/nodeca/pako/compare/0.2.2...0.2.3 -[0.2.2]: https://github.com/nodeca/pako/compare/0.2.1...0.2.2 -[0.2.1]: https://github.com/nodeca/pako/compare/0.2.0...0.2.1 -[0.2.0]: https://github.com/nodeca/pako/compare/0.1.1...0.2.0 -[0.1.1]: https://github.com/nodeca/pako/compare/0.1.0...0.1.1 -[0.1.0]: https://github.com/nodeca/pako/releases/tag/0.1.0 diff --git a/node_modules/pako/LICENSE b/node_modules/pako/LICENSE deleted file mode 100644 index a934ef8d..00000000 --- a/node_modules/pako/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -(The MIT License) - -Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/pako/README.md b/node_modules/pako/README.md deleted file mode 100644 index e952992c..00000000 --- a/node_modules/pako/README.md +++ /dev/null @@ -1,191 +0,0 @@ -pako -========================================== - -[![Build Status](https://travis-ci.org/nodeca/pako.svg?branch=master)](https://travis-ci.org/nodeca/pako) -[![NPM version](https://img.shields.io/npm/v/pako.svg)](https://www.npmjs.org/package/pako) - -> zlib port to javascript, very fast! - -__Why pako is cool:__ - -- Almost as fast in modern JS engines as C implementation (see benchmarks). -- Works in browsers, you can browserify any separate component. -- Chunking support for big blobs. -- Results are binary equal to well known [zlib](http://www.zlib.net/) (now contains ported zlib v1.2.8). - -This project was done to understand how fast JS can be and is it necessary to -develop native C modules for CPU-intensive tasks. Enjoy the result! - - -__Famous projects, using pako:__ - -- [browserify](http://browserify.org/) (via [browserify-zlib](https://github.com/devongovett/browserify-zlib)) -- [JSZip](http://stuk.github.io/jszip/) -- [mincer](https://github.com/nodeca/mincer) -- [JS-Git](https://github.com/creationix/js-git) and - [Tedit](https://chrome.google.com/webstore/detail/tedit-development-environ/ooekdijbnbbjdfjocaiflnjgoohnblgf) - by [@creationix](https://github.com/creationix) - - -__Benchmarks:__ - -``` -node v0.10.26, 1mb sample: - - deflate-dankogai x 4.73 ops/sec ±0.82% (15 runs sampled) - deflate-gildas x 4.58 ops/sec ±2.33% (15 runs sampled) - deflate-imaya x 3.22 ops/sec ±3.95% (12 runs sampled) - ! deflate-pako x 6.99 ops/sec ±0.51% (21 runs sampled) - deflate-pako-string x 5.89 ops/sec ±0.77% (18 runs sampled) - deflate-pako-untyped x 4.39 ops/sec ±1.58% (14 runs sampled) - * deflate-zlib x 14.71 ops/sec ±4.23% (59 runs sampled) - inflate-dankogai x 32.16 ops/sec ±0.13% (56 runs sampled) - inflate-imaya x 30.35 ops/sec ±0.92% (53 runs sampled) - ! inflate-pako x 69.89 ops/sec ±1.46% (71 runs sampled) - inflate-pako-string x 19.22 ops/sec ±1.86% (49 runs sampled) - inflate-pako-untyped x 17.19 ops/sec ±0.85% (32 runs sampled) - * inflate-zlib x 70.03 ops/sec ±1.64% (81 runs sampled) - -node v0.11.12, 1mb sample: - - deflate-dankogai x 5.60 ops/sec ±0.49% (17 runs sampled) - deflate-gildas x 5.06 ops/sec ±6.00% (16 runs sampled) - deflate-imaya x 3.52 ops/sec ±3.71% (13 runs sampled) - ! deflate-pako x 11.52 ops/sec ±0.22% (32 runs sampled) - deflate-pako-string x 9.53 ops/sec ±1.12% (27 runs sampled) - deflate-pako-untyped x 5.44 ops/sec ±0.72% (17 runs sampled) - * deflate-zlib x 14.05 ops/sec ±3.34% (63 runs sampled) - inflate-dankogai x 42.19 ops/sec ±0.09% (56 runs sampled) - inflate-imaya x 79.68 ops/sec ±1.07% (68 runs sampled) - ! inflate-pako x 97.52 ops/sec ±0.83% (80 runs sampled) - inflate-pako-string x 45.19 ops/sec ±1.69% (57 runs sampled) - inflate-pako-untyped x 24.35 ops/sec ±2.59% (40 runs sampled) - * inflate-zlib x 60.32 ops/sec ±1.36% (69 runs sampled) -``` - -zlib's test is partially affected by marshalling (that make sense for inflate only). -You can change deflate level to 0 in benchmark source, to investigate details. -For deflate level 6 results can be considered as correct. - -__Install:__ - -node.js: - -``` -npm install pako -``` - -browser: - -``` -bower install pako -``` - - -Example & API -------------- - -Full docs - http://nodeca.github.io/pako/ - -```javascript -var pako = require('pako'); - -// Deflate -// -var input = new Uint8Array(); -//... fill input data here -var output = pako.deflate(input); - -// Inflate (simple wrapper can throw exception on broken stream) -// -var compressed = new Uint8Array(); -//... fill data to uncompress here -try { - var result = pako.inflate(compressed); -} catch (err) { - console.log(err); -} - -// -// Alternate interface for chunking & without exceptions -// - -var inflator = new pako.Inflate(); - -inflator.push(chunk1, false); -inflator.push(chunk2, false); -... -inflator.push(chunkN, true); // true -> last chunk - -if (inflator.err) { - console.log(inflator.msg); -} - -var output = inflator.result; - -``` - -Sometime you can wish to work with strings. For example, to send -big objects as json to server. Pako detects input data type. You can -force output to be string with option `{ to: 'string' }`. - -```javascript -var pako = require('pako'); - -var test = { my: 'super', puper: [456, 567], awesome: 'pako' }; - -var binaryString = pako.deflate(JSON.stringify(test), { to: 'string' }); - -// -// Here you can do base64 encode, make xhr requests and so on. -// - -var restored = JSON.parse(pako.inflate(binaryString, { to: 'string' })); -``` - - -Notes ------ - -Pako does not contain some specific zlib functions: - -- __deflate__ - methods `deflateCopy`, `deflateBound`, `deflateParams`, - `deflatePending`, `deflatePrime`, `deflateTune`. -- __inflate__ - methods `inflateCopy`, `inflateMark`, - `inflatePrime`, `inflateGetDictionary`, `inflateSync`, `inflateSyncPoint`, `inflateUndermine`. -- High level inflate/deflate wrappers (classes) may not support some flush - modes. Those should work: Z_NO_FLUSH, Z_FINISH, Z_SYNC_FLUSH. - - -pako for enterprise -------------------- - -Available as part of the Tidelift Subscription - -The maintainers of pako and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-pako?utm_source=npm-pako&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - - -Authors -------- - -- Andrey Tupitsin [@anrd83](https://github.com/andr83) -- Vitaly Puzrin [@puzrin](https://github.com/puzrin) - -Personal thanks to: - -- Vyacheslav Egorov ([@mraleph](https://github.com/mraleph)) for his awesome - tutorials about optimising JS code for v8, [IRHydra](http://mrale.ph/irhydra/) - tool and his advices. -- David Duponchel ([@dduponchel](https://github.com/dduponchel)) for help with - testing. - -Original implementation (in C): - -- [zlib](http://zlib.net/) by Jean-loup Gailly and Mark Adler. - - -License -------- - -- MIT - all files, except `/lib/zlib` folder -- ZLIB - `/lib/zlib` content diff --git a/node_modules/pako/dist/pako.js b/node_modules/pako/dist/pako.js deleted file mode 100644 index 9ab7c686..00000000 --- a/node_modules/pako/dist/pako.js +++ /dev/null @@ -1,6818 +0,0 @@ -/* pako 1.0.11 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i Array - * - * Chunks of output data, if [[Deflate#onData]] not overridden. - **/ - -/** - * Deflate.result -> Uint8Array|Array - * - * Compressed result, generated by default [[Deflate#onData]] - * and [[Deflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Deflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Deflate.err -> Number - * - * Error code after deflate finished. 0 (Z_OK) on success. - * You will not need it in real life, because deflate errors - * are possible only on wrong options or bad `onData` / `onEnd` - * custom handlers. - **/ - -/** - * Deflate.msg -> String - * - * Error message, if [[Deflate.err]] != 0 - **/ - - -/** - * new Deflate(options) - * - options (Object): zlib deflate options. - * - * Creates new deflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `level` - * - `windowBits` - * - `memLevel` - * - `strategy` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw deflate - * - `gzip` (Boolean) - create gzip wrapper - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - `header` (Object) - custom header for gzip - * - `text` (Boolean) - true if compressed data believed to be text - * - `time` (Number) - modification time, unix timestamp - * - `os` (Number) - operation system code - * - `extra` (Array) - array of bytes with extra data (max 65536) - * - `name` (String) - file name (binary string) - * - `comment` (String) - comment (binary string) - * - `hcrc` (Boolean) - true if header crc should be added - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var deflate = new pako.Deflate({ level: 3}); - * - * deflate.push(chunk1, false); - * deflate.push(chunk2, true); // true -> last chunk - * - * if (deflate.err) { throw new Error(deflate.err); } - * - * console.log(deflate.result); - * ``` - **/ -function Deflate(options) { - if (!(this instanceof Deflate)) return new Deflate(options); - - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: '' - }, options || {}); - - var opt = this.options; - - if (opt.raw && (opt.windowBits > 0)) { - opt.windowBits = -opt.windowBits; - } - - else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { - opt.windowBits += 16; - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } - - if (opt.dictionary) { - var dict; - // Convert data if needed - if (typeof opt.dictionary === 'string') { - // If we need to compress text, change encoding to utf8. - dict = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(opt.dictionary); - } else { - dict = opt.dictionary; - } - - status = zlib_deflate.deflateSetDictionary(this.strm, dict); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - this._dict_set = true; - } -} - -/** - * Deflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be - * converted to utf8 byte sequence. - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. - * - * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with - * new compressed chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the compression context. - * - * On fail call [[Deflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * array format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Deflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - - if (this.ended) { return false; } - - _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // If we need to compress text, change encoding to utf8. - strm.input = strings.string2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ - - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { - if (this.options.to === 'string') { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - - // Finalize on the last chunk. - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === Z_SYNC_FLUSH) { - this.onEnd(Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Deflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): output data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Deflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Deflate#onEnd(status) -> Void - * - status (Number): deflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell deflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Deflate.prototype.onEnd = function (status) { - // On success - join - if (status === Z_OK) { - if (this.options.to === 'string') { - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * deflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * Compress `data` with deflate algorithm and `options`. - * - * Supported options are: - * - * - level - * - windowBits - * - memLevel - * - strategy - * - dictionary - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); - * - * console.log(pako.deflate(data)); - * ``` - **/ -function deflate(input, options) { - var deflator = new Deflate(options); - - deflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (deflator.err) { throw deflator.msg || msg[deflator.err]; } - - return deflator.result; -} - - -/** - * deflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); -} - - -/** - * gzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but create gzip wrapper instead of - * deflate one. - **/ -function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); -} - - -exports.Deflate = Deflate; -exports.deflate = deflate; -exports.deflateRaw = deflateRaw; -exports.gzip = gzip; - -},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(require,module,exports){ -'use strict'; - - -var zlib_inflate = require('./zlib/inflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var c = require('./zlib/constants'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); -var GZheader = require('./zlib/gzheader'); - -var toString = Object.prototype.toString; - -/** - * class Inflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] - * and [[inflateRaw]]. - **/ - -/* internal - * inflate.chunks -> Array - * - * Chunks of output data, if [[Inflate#onData]] not overridden. - **/ - -/** - * Inflate.result -> Uint8Array|Array|String - * - * Uncompressed result, generated by default [[Inflate#onData]] - * and [[Inflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Inflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Inflate.err -> Number - * - * Error code after inflate finished. 0 (Z_OK) on success. - * Should be checked if broken data possible. - **/ - -/** - * Inflate.msg -> String - * - * Error message, if [[Inflate.err]] != 0 - **/ - - -/** - * new Inflate(options) - * - options (Object): zlib inflate options. - * - * Creates new inflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `windowBits` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw inflate - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * By default, when no options set, autodetect deflate/gzip data format via - * wrapper header. - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var inflate = new pako.Inflate({ level: 3}); - * - * inflate.push(chunk1, false); - * inflate.push(chunk2, true); // true -> last chunk - * - * if (inflate.err) { throw new Error(inflate.err); } - * - * console.log(inflate.result); - * ``` - **/ -function Inflate(options) { - if (!(this instanceof Inflate)) return new Inflate(options); - - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: '' - }, options || {}); - - var opt = this.options; - - // Force window size for `raw` data, if not set directly, - // because we have no header for autodetect. - if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { opt.windowBits = -15; } - } - - // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate - if ((opt.windowBits >= 0) && (opt.windowBits < 16) && - !(options && options.windowBits)) { - opt.windowBits += 32; - } - - // Gzip header has no info about windows size, we can do autodetect only - // for deflate. So, if window size not set, force it to max when gzip possible - if ((opt.windowBits > 15) && (opt.windowBits < 48)) { - // bit 3 (16) -> gzipped data - // bit 4 (32) -> autodetect gzip/deflate - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - - this.header = new GZheader(); - - zlib_inflate.inflateGetHeader(this.strm, this.header); - - // Setup dictionary - if (opt.dictionary) { - // Convert data if needed - if (typeof opt.dictionary === 'string') { - opt.dictionary = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - opt.dictionary = new Uint8Array(opt.dictionary); - } - if (opt.raw) { //In raw mode we need to set the dictionary early - status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary); - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - } - } -} - -/** - * Inflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. - * - * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with - * new output chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the decompression context. - * - * On fail call [[Inflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Inflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var dictionary = this.options.dictionary; - var status, _mode; - var next_out_utf8, tail, utf8str; - - // Flag to properly process Z_BUF_ERROR on testing inflate call - // when we check that all output data was flushed. - var allowBufError = false; - - if (this.ended) { return false; } - _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // Only binary strings can be decompressed on practice - strm.input = strings.binstring2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ - - if (status === c.Z_NEED_DICT && dictionary) { - status = zlib_inflate.inflateSetDictionary(this.strm, dictionary); - } - - if (status === c.Z_BUF_ERROR && allowBufError === true) { - status = c.Z_OK; - allowBufError = false; - } - - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { - - if (this.options.to === 'string') { - - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - - // move tail - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } - - this.onData(utf8str); - - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - - // When no more input data, we should check that internal inflate buffers - // are flushed. The only way to do it when avail_out = 0 - run one more - // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. - // Here we set flag to process this error properly. - // - // NOTE. Deflate does not return error in this case and does not needs such - // logic. - if (strm.avail_in === 0 && strm.avail_out === 0) { - allowBufError = true; - } - - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); - - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - - // Finalize on the last chunk. - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === c.Z_SYNC_FLUSH) { - this.onEnd(c.Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Inflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): output data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Inflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Inflate#onEnd(status) -> Void - * - status (Number): inflate status. 0 (Z_OK) on success, - * other if not. - * - * Called either after you tell inflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Inflate.prototype.onEnd = function (status) { - // On success - join - if (status === c.Z_OK) { - if (this.options.to === 'string') { - // Glue & convert here, until we teach pako to send - // utf8 aligned strings to onData - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * inflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Decompress `data` with inflate/ungzip and `options`. Autodetect - * format via wrapper header by default. That's why we don't provide - * separate `ungzip` method. - * - * Supported options are: - * - * - windowBits - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) - * , output; - * - * try { - * output = pako.inflate(input); - * } catch (err) - * console.log(err); - * } - * ``` - **/ -function inflate(input, options) { - var inflator = new Inflate(options); - - inflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (inflator.err) { throw inflator.msg || msg[inflator.err]; } - - return inflator.result; -} - - -/** - * inflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * The same as [[inflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); -} - - -/** - * ungzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Just shortcut to [[inflate]], because it autodetects format - * by header.content. Done for convenience. - **/ - - -exports.Inflate = Inflate; -exports.inflate = inflate; -exports.inflateRaw = inflateRaw; -exports.ungzip = inflate; - -},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(require,module,exports){ -'use strict'; - - -var TYPED_OK = (typeof Uint8Array !== 'undefined') && - (typeof Uint16Array !== 'undefined') && - (typeof Int32Array !== 'undefined'); - -function _has(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); -} - -exports.assign = function (obj /*from1, from2, from3, ...*/) { - var sources = Array.prototype.slice.call(arguments, 1); - while (sources.length) { - var source = sources.shift(); - if (!source) { continue; } - - if (typeof source !== 'object') { - throw new TypeError(source + 'must be non-object'); - } - - for (var p in source) { - if (_has(source, p)) { - obj[p] = source[p]; - } - } - } - - return obj; -}; - - -// reduce buffer size, avoiding mem copy -exports.shrinkBuf = function (buf, size) { - if (buf.length === size) { return buf; } - if (buf.subarray) { return buf.subarray(0, size); } - buf.length = size; - return buf; -}; - - -var fnTyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - if (src.subarray && dest.subarray) { - dest.set(src.subarray(src_offs, src_offs + len), dest_offs); - return; - } - // Fallback to ordinary array - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - var i, l, len, pos, chunk, result; - - // calculate data length - len = 0; - for (i = 0, l = chunks.length; i < l; i++) { - len += chunks[i].length; - } - - // join chunks - result = new Uint8Array(len); - pos = 0; - for (i = 0, l = chunks.length; i < l; i++) { - chunk = chunks[i]; - result.set(chunk, pos); - pos += chunk.length; - } - - return result; - } -}; - -var fnUntyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - return [].concat.apply([], chunks); - } -}; - - -// Enable/Disable typed arrays use, for testing -// -exports.setTyped = function (on) { - if (on) { - exports.Buf8 = Uint8Array; - exports.Buf16 = Uint16Array; - exports.Buf32 = Int32Array; - exports.assign(exports, fnTyped); - } else { - exports.Buf8 = Array; - exports.Buf16 = Array; - exports.Buf32 = Array; - exports.assign(exports, fnUntyped); - } -}; - -exports.setTyped(TYPED_OK); - -},{}],4:[function(require,module,exports){ -// String encode/decode helpers -'use strict'; - - -var utils = require('./common'); - - -// Quick check if we can use fast array to bin string conversion -// -// - apply(Array) can fail on Android 2.2 -// - apply(Uint8Array) can fail on iOS 5.1 Safari -// -var STR_APPLY_OK = true; -var STR_APPLY_UIA_OK = true; - -try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; } -try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; } - - -// Table with utf8 lengths (calculated by first byte of sequence) -// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, -// because max possible codepoint is 0x10ffff -var _utf8len = new utils.Buf8(256); -for (var q = 0; q < 256; q++) { - _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // On Chrome, the arguments in a function call that are allowed is `65534`. - // If the length of the buffer is smaller than that, we can use this optimization, - // otherwise we will take a slower path. - if (len < 65534) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function (buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function (str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len * 2); - - for (out = 0, i = 0; i < len;) { - c = buf[i++]; - // quick process ascii - if (c < 0x80) { utf16buf[out++] = c; continue; } - - c_len = _utf8len[c]; - // skip 5 & 6 byte codes - if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function (buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max - 1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means buffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -},{"./common":3}],5:[function(require,module,exports){ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It isn't worth it to make additional optimizations as in original. -// Small size is preferable. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; - -},{}],6:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -module.exports = { - - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - - - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type -}; - -},{}],7:[function(require,module,exports){ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc ^= -1; - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; - -},{}],8:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); -var trees = require('./trees'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var msg = require('./messages'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -var Z_NO_FLUSH = 0; -var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -//var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -//var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -//var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - - -/* compression levels */ -//var Z_NO_COMPRESSION = 0; -//var Z_BEST_SPEED = 1; -//var Z_BEST_COMPRESSION = 9; -var Z_DEFAULT_COMPRESSION = -1; - - -var Z_FILTERED = 1; -var Z_HUFFMAN_ONLY = 2; -var Z_RLE = 3; -var Z_FIXED = 4; -var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -//var Z_BINARY = 0; -//var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - - -/* The deflate compression method */ -var Z_DEFLATED = 8; - -/*============================================================================*/ - - -var MAX_MEM_LEVEL = 9; -/* Maximum value for memLevel in deflateInit2 */ -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_MEM_LEVEL = 8; - - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ -var LITERALS = 256; -/* number of literal bytes 0..255 */ -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -var PRESET_DICT = 0x20; - -var INIT_STATE = 42; -var EXTRA_STATE = 69; -var NAME_STATE = 73; -var COMMENT_STATE = 91; -var HCRC_STATE = 103; -var BUSY_STATE = 113; -var FINISH_STATE = 666; - -var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ -var BS_BLOCK_DONE = 2; /* block flush performed */ -var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ -var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ - -var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. - -function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; -} - -function rank(f) { - return ((f) << 1) - ((f) > 4 ? 9 : 0); -} - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->output buffer and copying into it. - * (See also read_buf()). - */ -function flush_pending(strm) { - var s = strm.state; - - //_tr_flush_bits(s); - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { return; } - - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } -} - - -function flush_block_only(s, last) { - trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); - s.block_start = s.strstart; - flush_pending(s.strm); -} - - -function put_byte(s, b) { - s.pending_buf[s.pending++] = b; -} - - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -function putShortMSB(s, b) { -// put_byte(s, (Byte)(b >> 8)); -// put_byte(s, (Byte)(b & 0xff)); - s.pending_buf[s.pending++] = (b >>> 8) & 0xff; - s.pending_buf[s.pending++] = b & 0xff; -} - - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->input buffer and copying from it. - * (See also flush_pending()). - */ -function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - - if (len > size) { len = size; } - if (len === 0) { return 0; } - - strm.avail_in -= len; - - // zmemcpy(buf, strm->next_in, len); - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } - - else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - - strm.next_in += len; - strm.total_in += len; - - return len; -} - - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; /* max hash chain length */ - var scan = s.strstart; /* current string */ - var match; /* matched string */ - var len; /* length of current match */ - var best_len = s.prev_length; /* best match length so far */ - var nice_match = s.nice_match; /* stop if match long enough */ - var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? - s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; - - var _win = s.window; // shortcut - - var wmask = s.w_mask; - var prev = s.prev; - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if (nice_match > s.lookahead) { nice_match = s.lookahead; } - - // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - // Assert(cur_match < s->strstart, "no future"); - match = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ - - if (_win[match + best_len] !== scan_end || - _win[match + best_len - 1] !== scan_end1 || - _win[match] !== _win[scan] || - _win[++match] !== _win[scan + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2; - match++; - // Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - /*jshint noempty:false*/ - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - scan < strend); - - // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; -} - - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - - //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = s.window_size - s.lookahead - s.strstart; - - // JS ints have 32 bit, block below not needed - /* Deal with !@#$% 64K limit: */ - //if (sizeof(int) <= 2) { - // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - // more = wsize; - // - // } else if (more == (unsigned)(-1)) { - // /* Very unlikely, but possible on 16 bit machine if - // * strstart == 0 && lookahead == 1 (input done a byte at time) - // */ - // more--; - // } - //} - - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - /* we now have strstart >= MAX_DIST */ - s.block_start -= _w_size; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= _w_size ? m - _w_size : 0); - } while (--n); - - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= _w_size ? m - _w_size : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); - - more += _w_size; - } - if (s.strm.avail_in === 0) { - break; - } - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - //Assert(more >= 2, "more < 2"); - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - - /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; -//#if MIN_MATCH != 3 -// Call update_hash() MIN_MATCH-3 more times -//#endif - while (s.insert) { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; - } - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ -// if (s.high_water < s.window_size) { -// var curr = s.strstart + s.lookahead; -// var init = 0; -// -// if (s.high_water < curr) { -// /* Previous high water mark below current data -- zero WIN_INIT -// * bytes or up to end of window, whichever is less. -// */ -// init = s.window_size - curr; -// if (init > WIN_INIT) -// init = WIN_INIT; -// zmemzero(s->window + curr, (unsigned)init); -// s->high_water = curr + init; -// } -// else if (s->high_water < (ulg)curr + WIN_INIT) { -// /* High water mark at or above current data, but below current data -// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up -// * to end of window, whichever is less. -// */ -// init = (ulg)curr + WIN_INIT - s->high_water; -// if (init > s->window_size - s->high_water) -// init = s->window_size - s->high_water; -// zmemzero(s->window + s->high_water, (unsigned)init); -// s->high_water += init; -// } -// } -// -// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, -// "not enough room for search"); -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -function deflate_stored(s, flush) { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - var max_block_size = 0xffff; - - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s.lookahead <= 1) { - - //Assert(s->strstart < s->w_size+MAX_DIST(s) || - // s->block_start >= (long)s->w_size, "slide too late"); -// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || -// s.block_start >= s.w_size)) { -// throw new Error("slide too late"); -// } - - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - - if (s.lookahead === 0) { - break; - } - /* flush the current block */ - } - //Assert(s->block_start >= 0L, "block gone"); -// if (s.block_start < 0) throw new Error("block gone"); - - s.strstart += s.lookahead; - s.lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - var max_start = s.block_start + max_block_size; - - if (s.strstart === 0 || s.strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - - - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - - s.insert = 0; - - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - - if (s.strstart > s.block_start) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_NEED_MORE; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -function deflate_fast(s, flush) { - var hash_head; /* head of the hash chain */ - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; /* flush the current block */ - } - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - } - if (s.match_length >= MIN_MATCH) { - // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only - - /*** _tr_tally_dist(s, s.strstart - s.match_start, - s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { - s.match_length--; /* string at strstart already in table */ - do { - s.strstart++; - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s.match_length !== 0); - s.strstart++; - } else - { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; - -//#if MIN_MATCH != 3 -// Call UPDATE_HASH() MIN_MATCH-3 more times -//#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s.window[s.strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -function deflate_slow(s, flush) { - var hash_head; /* head of hash chain */ - var bflush; /* set if current block must be flushed */ - - var max_insert; - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - */ - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH - 1; - - if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && - s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - - if (s.match_length <= 5 && - (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s.match_length = MIN_MATCH - 1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - //check_match(s, s.strstart-1, s.prev_match, s.prev_length); - - /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, - s.prev_length - MIN_MATCH, bflush);***/ - bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s.lookahead -= s.prev_length - 1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH - 1; - s.strstart++; - - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - } else if (s.match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - if (bflush) { - /*** FLUSH_BLOCK_ONLY(s, 0) ***/ - flush_block_only(s, false); - /***/ - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - //Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s.match_available) { - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_BLOCK_DONE; -} - - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -function deflate_rle(s, flush) { - var bflush; /* set if current block must be flushed */ - var prev; /* byte at distance one to match */ - var scan, strend; /* scan goes up to strend for length of run */ - - var _win = s.window; - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - /*jshint noempty:false*/ - } while (prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; - } - } - //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s.match_length >= MIN_MATCH) { - //check_match(s, s.strstart, s.strstart - 1, s.match_length); - - /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -function deflate_huff(s, flush) { - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s.match_length = 0; - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -function Config(good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; -} - -var configuration_table; - -configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), /* 3 */ - - new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ -]; - - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -function lm_init(s) { - s.window_size = 2 * s.w_size; - - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - - /* Set the default configuration parameters: - */ - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; -} - - -function DeflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.status = 0; /* as the name implies */ - this.pending_buf = null; /* output still pending */ - this.pending_buf_size = 0; /* size of pending_buf */ - this.pending_out = 0; /* next pending byte to output to the stream */ - this.pending = 0; /* nb of bytes in the pending buffer */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.gzhead = null; /* gzip header information to write */ - this.gzindex = 0; /* where in extra, name, or comment */ - this.method = Z_DEFLATED; /* can only be DEFLATED */ - this.last_flush = -1; /* value of flush param for previous deflate call */ - - this.w_size = 0; /* LZ77 window size (32K by default) */ - this.w_bits = 0; /* log2(w_size) (8..16) */ - this.w_mask = 0; /* w_size - 1 */ - - this.window = null; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. - */ - - this.window_size = 0; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - this.prev = null; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - this.head = null; /* Heads of the hash chains or NIL. */ - - this.ins_h = 0; /* hash index of string to be inserted */ - this.hash_size = 0; /* number of elements in hash table */ - this.hash_bits = 0; /* log2(hash_size) */ - this.hash_mask = 0; /* hash_size-1 */ - - this.hash_shift = 0; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - this.block_start = 0; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - this.match_length = 0; /* length of best match */ - this.prev_match = 0; /* previous match */ - this.match_available = 0; /* set if previous match exists */ - this.strstart = 0; /* start of string to insert */ - this.match_start = 0; /* start of matching string */ - this.lookahead = 0; /* number of valid bytes ahead in window */ - - this.prev_length = 0; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - this.max_chain_length = 0; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - this.max_lazy_match = 0; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ - // That's alias to max_lazy_match, don't use directly - //this.max_insert_length = 0; - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - this.level = 0; /* compression level (1..9) */ - this.strategy = 0; /* favor or force Huffman coding*/ - - this.good_match = 0; - /* Use a faster search when the previous match is longer than this */ - - this.nice_match = 0; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - - /* Didn't use ct_data typedef below to suppress compiler warning */ - - // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - // Use flat array of DOUBLE size, with interleaved fata, - // because JS does not support effective - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); - this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - - this.l_desc = null; /* desc. for literal tree */ - this.d_desc = null; /* desc. for distance tree */ - this.bl_desc = null; /* desc. for bit length tree */ - - //ush bl_count[MAX_BITS+1]; - this.bl_count = new utils.Buf16(MAX_BITS + 1); - /* number of codes at each bit length for an optimal tree */ - - //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ - zero(this.heap); - - this.heap_len = 0; /* number of elements in the heap */ - this.heap_max = 0; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; - zero(this.depth); - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - this.l_buf = 0; /* buffer index for literals or lengths */ - - this.lit_bufsize = 0; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - this.last_lit = 0; /* running index in l_buf */ - - this.d_buf = 0; - /* Buffer index for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - this.opt_len = 0; /* bit length of current block with optimal trees */ - this.static_len = 0; /* bit length of current block with static trees */ - this.matches = 0; /* number of string matches in current block */ - this.insert = 0; /* bytes at end of window left to insert */ - - - this.bi_buf = 0; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - this.bi_valid = 0; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - // Used for window memory init. We safely ignore it for JS. That makes - // sense only for pointers and memory check tools. - //this.high_water = 0; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ -} - - -function deflateResetKeep(strm) { - var s; - - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; - - s = strm.state; - s.pending = 0; - s.pending_out = 0; - - if (s.wrap < 0) { - s.wrap = -s.wrap; - /* was made negative by deflate(..., Z_FINISH); */ - } - s.status = (s.wrap ? INIT_STATE : BUSY_STATE); - strm.adler = (s.wrap === 2) ? - 0 // crc32(0, Z_NULL, 0) - : - 1; // adler32(0, Z_NULL, 0) - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; -} - - -function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; -} - - -function deflateSetHeader(strm, head) { - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } - strm.state.gzhead = head; - return Z_OK; -} - - -function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { // === Z_NULL - return Z_STREAM_ERROR; - } - var wrap = 1; - - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } - - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } - - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } - - - if (windowBits === 8) { - windowBits = 9; - } - /* until 256-byte window bug fixed */ - - var s = new DeflateState(); - - strm.state = s; - s.strm = strm; - - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); - - // Don't need mem init magic for JS. - //s.high_water = 0; /* nothing written to s->window yet */ - - s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - s.pending_buf_size = s.lit_bufsize * 4; - - //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); - //s->pending_buf = (uchf *) overlay; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - - // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) - //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); - s.d_buf = 1 * s.lit_bufsize; - - //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; - s.l_buf = (1 + 2) * s.lit_bufsize; - - s.level = level; - s.strategy = strategy; - s.method = method; - - return deflateReset(strm); -} - -function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -} - - -function deflate(strm, flush) { - var old_flush, s; - var beg, val; // for gzip header write only - - if (!strm || !strm.state || - flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } - - s = strm.state; - - if (!strm.output || - (!strm.input && strm.avail_in !== 0) || - (s.status === FINISH_STATE && flush !== Z_FINISH)) { - return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); - } - - s.strm = strm; /* just in case */ - old_flush = s.last_flush; - s.last_flush = flush; - - /* Write the header */ - if (s.status === INIT_STATE) { - - if (s.wrap === 2) { // GZIP header - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } - else // DEFLATE header - { - var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - var level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - - s.status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - } - } - -//#ifdef GZIP - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - - while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } - } - put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } - else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } - else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } - else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - } - } - else { - s.status = BUSY_STATE; - } - } -//#endif - - /* Flush as much pending output as possible */ - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s.last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && - flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm.avail_in !== 0 || s.lookahead !== 0 || - (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : - (s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush)); - - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } - else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - - trees._tr_stored_block(s, 0, 0, false); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush === Z_FULL_FLUSH) { - /*** CLEAR_HASH(s); ***/ /* forget history */ - zero(s.head); // Fill with NIL (= 0); - - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - //Assert(strm->avail_out > 0, "bug2"); - //if (strm.avail_out <= 0) { throw new Error("bug2");} - - if (flush !== Z_FINISH) { return Z_OK; } - if (s.wrap <= 0) { return Z_STREAM_END; } - - /* Write the trailer */ - if (s.wrap === 2) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - put_byte(s, (strm.adler >> 16) & 0xff); - put_byte(s, (strm.adler >> 24) & 0xff); - put_byte(s, strm.total_in & 0xff); - put_byte(s, (strm.total_in >> 8) & 0xff); - put_byte(s, (strm.total_in >> 16) & 0xff); - put_byte(s, (strm.total_in >> 24) & 0xff); - } - else - { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s.wrap > 0) { s.wrap = -s.wrap; } - /* write the trailer only once! */ - return s.pending !== 0 ? Z_OK : Z_STREAM_END; -} - -function deflateEnd(strm) { - var status; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - status = strm.state.status; - if (status !== INIT_STATE && - status !== EXTRA_STATE && - status !== NAME_STATE && - status !== COMMENT_STATE && - status !== HCRC_STATE && - status !== BUSY_STATE && - status !== FINISH_STATE - ) { - return err(strm, Z_STREAM_ERROR); - } - - strm.state = null; - - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; -} - - -/* ========================================================================= - * Initializes the compression dictionary from the given byte - * sequence without producing any compressed output. - */ -function deflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var s; - var str, n; - var wrap; - var avail; - var next; - var input; - var tmpDict; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - s = strm.state; - wrap = s.wrap; - - if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { - return Z_STREAM_ERROR; - } - - /* when using zlib wrappers, compute Adler-32 for provided dictionary */ - if (wrap === 1) { - /* adler32(strm->adler, dictionary, dictLength); */ - strm.adler = adler32(strm.adler, dictionary, dictLength, 0); - } - - s.wrap = 0; /* avoid computing Adler-32 in read_buf */ - - /* if dictionary would fill window, just replace the history */ - if (dictLength >= s.w_size) { - if (wrap === 0) { /* already empty otherwise */ - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - /* use the tail */ - // dictionary = dictionary.slice(dictLength - s.w_size); - tmpDict = new utils.Buf8(s.w_size); - utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); - dictionary = tmpDict; - dictLength = s.w_size; - } - /* insert dictionary into window and hash */ - avail = strm.avail_in; - next = strm.next_in; - input = strm.input; - strm.avail_in = dictLength; - strm.next_in = 0; - strm.input = dictionary; - fill_window(s); - while (s.lookahead >= MIN_MATCH) { - str = s.strstart; - n = s.lookahead - (MIN_MATCH - 1); - do { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - - s.head[s.ins_h] = str; - str++; - } while (--n); - s.strstart = str; - s.lookahead = MIN_MATCH - 1; - fill_window(s); - } - s.strstart += s.lookahead; - s.block_start = s.strstart; - s.insert = s.lookahead; - s.lookahead = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - strm.next_in = next; - strm.input = input; - strm.avail_in = avail; - s.wrap = wrap; - return Z_OK; -} - - -exports.deflateInit = deflateInit; -exports.deflateInit2 = deflateInit2; -exports.deflateReset = deflateReset; -exports.deflateResetKeep = deflateResetKeep; -exports.deflateSetHeader = deflateSetHeader; -exports.deflate = deflate; -exports.deflateEnd = deflateEnd; -exports.deflateSetDictionary = deflateSetDictionary; -exports.deflateInfo = 'pako deflate (from Nodeca project)'; - -/* Not implemented -exports.deflateBound = deflateBound; -exports.deflateCopy = deflateCopy; -exports.deflateParams = deflateParams; -exports.deflatePending = deflatePending; -exports.deflatePrime = deflatePrime; -exports.deflateTune = deflateTune; -*/ - -},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,"./trees":14}],9:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function GZheader() { - /* true if compressed data believed to be text */ - this.text = 0; - /* modification time */ - this.time = 0; - /* extra flags (not used when writing a gzip file) */ - this.xflags = 0; - /* operating system */ - this.os = 0; - /* pointer to extra field or Z_NULL if none */ - this.extra = null; - /* extra field length (valid if extra != Z_NULL) */ - this.extra_len = 0; // Actually, we don't need it in JS, - // but leave for few code modifications - - // - // Setup limits is not necessary because in js we should not preallocate memory - // for inflate use constant limit in 65536 bytes - // - - /* space at extra (only when reading header) */ - // this.extra_max = 0; - /* pointer to zero-terminated file name or Z_NULL */ - this.name = ''; - /* space at name (only when reading header) */ - // this.name_max = 0; - /* pointer to zero-terminated comment or Z_NULL */ - this.comment = ''; - /* space at comment (only when reading header) */ - // this.comm_max = 0; - /* true if there was or will be a header crc */ - this.hcrc = 0; - /* true when done reading gzip header (not used when writing a gzip file) */ - this.done = false; -} - -module.exports = GZheader; - -},{}],10:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -// See state defs from inflate.js -var BAD = 30; /* got a data error -- remain here until reset */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state.mode === LEN - strm.avail_in >= 6 - strm.avail_out >= 258 - start >= strm.avail_out - state.bits < 8 - - On return, state.mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm.avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm.avail_out >= 258 for each loop to avoid checking for - output space. - */ -module.exports = function inflate_fast(strm, start) { - var state; - var _in; /* local strm.input */ - var last; /* have enough input while in < last */ - var _out; /* local strm.output */ - var beg; /* inflate()'s initial strm.output */ - var end; /* while out < end, enough space available */ -//#ifdef INFLATE_STRICT - var dmax; /* maximum distance from zlib header */ -//#endif - var wsize; /* window size or zero if not using window */ - var whave; /* valid bytes in the window */ - var wnext; /* window write index */ - // Use `s_window` instead `window`, avoid conflict with instrumentation tools - var s_window; /* allocated sliding window, if wsize != 0 */ - var hold; /* local strm.hold */ - var bits; /* local strm.bits */ - var lcode; /* local strm.lencode */ - var dcode; /* local strm.distcode */ - var lmask; /* mask for first level of length codes */ - var dmask; /* mask for first level of distance codes */ - var here; /* retrieved table entry */ - var op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - var len; /* match length, unused bytes */ - var dist; /* match distance */ - var from; /* where to copy match from */ - var from_source; - - - var input, output; // JS specific, because we have no pointers - - /* copy state to local variables */ - state = strm.state; - //here = state.here; - _in = strm.next_in; - input = strm.input; - last = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); -//#ifdef INFLATE_STRICT - dmax = state.dmax; -//#endif - wsize = state.wsize; - whave = state.whave; - wnext = state.wnext; - s_window = state.window; - hold = state.hold; - bits = state.bits; - lcode = state.lencode; - dcode = state.distcode; - lmask = (1 << state.lenbits) - 1; - dmask = (1 << state.distbits) - 1; - - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - - here = lcode[hold & lmask]; - - dolen: - for (;;) { // Goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - if (op === 0) { /* literal */ - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - output[_out++] = here & 0xffff/*here.val*/; - } - else if (op & 16) { /* length base */ - len = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & ((1 << op) - 1); - hold >>>= op; - bits -= op; - } - //Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - - dodist: - for (;;) { // goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - - if (op & 16) { /* distance base */ - dist = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & ((1 << op) - 1); -//#ifdef INFLATE_STRICT - if (dist > dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -//#endif - hold >>>= op; - bits -= op; - //Tracevv((stderr, "inflate: distance %u\n", dist)); - op = _out - beg; /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } - -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// if (len <= op - whave) { -// do { -// output[_out++] = 0; -// } while (--len); -// continue top; -// } -// len -= op - whave; -// do { -// output[_out++] = 0; -// } while (--op > whave); -// if (op === 0) { -// from = _out - dist; -// do { -// output[_out++] = output[from++]; -// } while (--len); -// continue top; -// } -//#endif - } - from = 0; // window index - from_source = s_window; - if (wnext === 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = 0; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } - else { - from = _out - dist; /* copy direct from output */ - do { /* minimum length is three */ - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } - else if ((op & 64) === 0) { /* 2nd level distance code */ - here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dodist; - } - else { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } - else if ((op & 64) === 0) { /* 2nd level length code */ - here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dolen; - } - else if (op & 32) { /* end-of-block */ - //Tracevv((stderr, "inflate: end of block\n")); - state.mode = TYPE; - break top; - } - else { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } while (_in < last && _out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - - /* update state and return */ - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); - strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); - state.hold = hold; - state.bits = bits; - return; -}; - -},{}],11:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var inflate_fast = require('./inffast'); -var inflate_table = require('./inftrees'); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -//var Z_NO_FLUSH = 0; -//var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -//var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - -/* The deflate compression method */ -var Z_DEFLATED = 8; - - -/* STATES ====================================================================*/ -/* ===========================================================================*/ - - -var HEAD = 1; /* i: waiting for magic header */ -var FLAGS = 2; /* i: waiting for method and flags (gzip) */ -var TIME = 3; /* i: waiting for modification time (gzip) */ -var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ -var EXLEN = 5; /* i: waiting for extra length (gzip) */ -var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ -var NAME = 7; /* i: waiting for end of file name (gzip) */ -var COMMENT = 8; /* i: waiting for end of comment (gzip) */ -var HCRC = 9; /* i: waiting for header crc (gzip) */ -var DICTID = 10; /* i: waiting for dictionary check value */ -var DICT = 11; /* waiting for inflateSetDictionary() call */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ -var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ -var STORED = 14; /* i: waiting for stored size (length and complement) */ -var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ -var COPY = 16; /* i/o: waiting for input or output to copy stored block */ -var TABLE = 17; /* i: waiting for dynamic block table lengths */ -var LENLENS = 18; /* i: waiting for code length code lengths */ -var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ -var LEN_ = 20; /* i: same as LEN below, but only first time in */ -var LEN = 21; /* i: waiting for length/lit/eob code */ -var LENEXT = 22; /* i: waiting for length extra bits */ -var DIST = 23; /* i: waiting for distance code */ -var DISTEXT = 24; /* i: waiting for distance extra bits */ -var MATCH = 25; /* o: waiting for output space to copy string */ -var LIT = 26; /* o: waiting for output space to write literal */ -var CHECK = 27; /* i: waiting for 32-bit check value */ -var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ -var DONE = 29; /* finished check, done -- remain here until reset */ -var BAD = 30; /* got a data error -- remain here until reset */ -var MEM = 31; /* got an inflate() memory error -- remain here until reset */ -var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ - -/* ===========================================================================*/ - - - -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_WBITS = MAX_WBITS; - - -function zswap32(q) { - return (((q >>> 24) & 0xff) + - ((q >>> 8) & 0xff00) + - ((q & 0xff00) << 8) + - ((q & 0xff) << 24)); -} - - -function InflateState() { - this.mode = 0; /* current inflate mode */ - this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib) */ - this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ - this.check = 0; /* protected copy of check value */ - this.total = 0; /* protected copy of output count */ - // TODO: may be {} - this.head = null; /* where to save gzip header information */ - - /* sliding window */ - this.wbits = 0; /* log base 2 of requested window size */ - this.wsize = 0; /* window size or zero if not using window */ - this.whave = 0; /* valid bytes in the window */ - this.wnext = 0; /* window write index */ - this.window = null; /* allocated sliding window, if needed */ - - /* bit accumulator */ - this.hold = 0; /* input bit accumulator */ - this.bits = 0; /* number of bits in "in" */ - - /* for string and stored block copying */ - this.length = 0; /* literal or length of data to copy */ - this.offset = 0; /* distance back to copy string from */ - - /* for table and code decoding */ - this.extra = 0; /* extra bits needed */ - - /* fixed and dynamic code tables */ - this.lencode = null; /* starting table for length/literal codes */ - this.distcode = null; /* starting table for distance codes */ - this.lenbits = 0; /* index bits for lencode */ - this.distbits = 0; /* index bits for distcode */ - - /* dynamic table building */ - this.ncode = 0; /* number of code length code lengths */ - this.nlen = 0; /* number of length code lengths */ - this.ndist = 0; /* number of distance code lengths */ - this.have = 0; /* number of code lengths in lens[] */ - this.next = null; /* next available space in codes[] */ - - this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ - this.work = new utils.Buf16(288); /* work area for code table building */ - - /* - because we don't have pointers in js, we use lencode and distcode directly - as buffers so we don't need codes - */ - //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ - this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ - this.distdyn = null; /* dynamic table for distance codes (JS specific) */ - this.sane = 0; /* if false, allow invalid distance too far */ - this.back = 0; /* bits back of last unprocessed length/lit */ - this.was = 0; /* initial length of match */ -} - -function inflateResetKeep(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - strm.total_in = strm.total_out = state.total = 0; - strm.msg = ''; /*Z_NULL*/ - if (state.wrap) { /* to support ill-conceived Java test suite */ - strm.adler = state.wrap & 1; - } - state.mode = HEAD; - state.last = 0; - state.havedict = 0; - state.dmax = 32768; - state.head = null/*Z_NULL*/; - state.hold = 0; - state.bits = 0; - //state.lencode = state.distcode = state.next = state.codes; - state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); - state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); - - state.sane = 1; - state.back = -1; - //Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -function inflateReset(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - state.wsize = 0; - state.whave = 0; - state.wnext = 0; - return inflateResetKeep(strm); - -} - -function inflateReset2(strm, windowBits) { - var wrap; - var state; - - /* get the state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; - } - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state.window !== null && state.wbits !== windowBits) { - state.window = null; - } - - /* update state and reset the rest of it */ - state.wrap = wrap; - state.wbits = windowBits; - return inflateReset(strm); -} - -function inflateInit2(strm, windowBits) { - var ret; - var state; - - if (!strm) { return Z_STREAM_ERROR; } - //strm.msg = Z_NULL; /* in case we return an error */ - - state = new InflateState(); - - //if (state === Z_NULL) return Z_MEM_ERROR; - //Tracev((stderr, "inflate: allocated\n")); - strm.state = state; - state.window = null/*Z_NULL*/; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null/*Z_NULL*/; - } - return ret; -} - -function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); -} - - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -var virgin = true; - -var lenfix, distfix; // We have no pointers in JS, so keep tables separate - -function fixedtables(state) { - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - var sym; - - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - - /* literal/length table */ - sym = 0; - while (sym < 144) { state.lens[sym++] = 8; } - while (sym < 256) { state.lens[sym++] = 9; } - while (sym < 280) { state.lens[sym++] = 7; } - while (sym < 288) { state.lens[sym++] = 8; } - - inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); - - /* distance table */ - sym = 0; - while (sym < 32) { state.lens[sym++] = 5; } - - inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); - - /* do this just once */ - virgin = false; - } - - state.lencode = lenfix; - state.lenbits = 9; - state.distcode = distfix; - state.distbits = 5; -} - - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -function updatewindow(strm, src, end, copy) { - var dist; - var state = strm.state; - - /* if it hasn't been done already, allocate space for the window */ - if (state.window === null) { - state.wsize = 1 << state.wbits; - state.wnext = 0; - state.whave = 0; - - state.window = new utils.Buf8(state.wsize); - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state.wsize) { - utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); - state.wnext = 0; - state.whave = state.wsize; - } - else { - dist = state.wsize - state.wnext; - if (dist > copy) { - dist = copy; - } - //zmemcpy(state->window + state->wnext, end - copy, dist); - utils.arraySet(state.window, src, end - copy, dist, state.wnext); - copy -= dist; - if (copy) { - //zmemcpy(state->window, end - copy, copy); - utils.arraySet(state.window, src, end - copy, copy, 0); - state.wnext = copy; - state.whave = state.wsize; - } - else { - state.wnext += dist; - if (state.wnext === state.wsize) { state.wnext = 0; } - if (state.whave < state.wsize) { state.whave += dist; } - } - } - return 0; -} - -function inflate(strm, flush) { - var state; - var input, output; // input/output buffers - var next; /* next input INDEX */ - var put; /* next output INDEX */ - var have, left; /* available input and output */ - var hold; /* bit buffer */ - var bits; /* bits in bit buffer */ - var _in, _out; /* save starting available input and output */ - var copy; /* number of stored or match bytes to copy */ - var from; /* where to copy match bytes from */ - var from_source; - var here = 0; /* current decoding table entry */ - var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) - //var last; /* parent table entry */ - var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) - var len; /* length to copy for repeats, bits to drop */ - var ret; /* return code */ - var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ - var opts; - - var n; // temporary var for NEED_BITS - - var order = /* permutation of code lengths */ - [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; - - - if (!strm || !strm.state || !strm.output || - (!strm.input && strm.avail_in !== 0)) { - return Z_STREAM_ERROR; - } - - state = strm.state; - if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ - - - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - _in = have; - _out = left; - ret = Z_OK; - - inf_leave: // goto emulation - for (;;) { - switch (state.mode) { - case HEAD: - if (state.wrap === 0) { - state.mode = TYPEDO; - break; - } - //=== NEEDBITS(16); - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - state.check = 0/*crc32(0L, Z_NULL, 0)*/; - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = FLAGS; - break; - } - state.flags = 0; /* expect zlib header */ - if (state.head) { - state.head.done = false; - } - if (!(state.wrap & 1) || /* check if zlib header allowed */ - (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { - strm.msg = 'incorrect header check'; - state.mode = BAD; - break; - } - if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// - len = (hold & 0x0f)/*BITS(4)*/ + 8; - if (state.wbits === 0) { - state.wbits = len; - } - else if (len > state.wbits) { - strm.msg = 'invalid window size'; - state.mode = BAD; - break; - } - state.dmax = 1 << len; - //Tracev((stderr, "inflate: zlib header ok\n")); - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = hold & 0x200 ? DICTID : TYPE; - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - break; - case FLAGS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.flags = hold; - if ((state.flags & 0xff) !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - if (state.flags & 0xe000) { - strm.msg = 'unknown header flags set'; - state.mode = BAD; - break; - } - if (state.head) { - state.head.text = ((hold >> 8) & 1); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = TIME; - /* falls through */ - case TIME: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.time = hold; - } - if (state.flags & 0x0200) { - //=== CRC4(state.check, hold) - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - hbuf[2] = (hold >>> 16) & 0xff; - hbuf[3] = (hold >>> 24) & 0xff; - state.check = crc32(state.check, hbuf, 4, 0); - //=== - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = OS; - /* falls through */ - case OS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.xflags = (hold & 0xff); - state.head.os = (hold >> 8); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state.flags & 0x0400) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length = hold; - if (state.head) { - state.head.extra_len = hold; - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - else if (state.head) { - state.head.extra = null/*Z_NULL*/; - } - state.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state.flags & 0x0400) { - copy = state.length; - if (copy > have) { copy = have; } - if (copy) { - if (state.head) { - len = state.head.extra_len - state.length; - if (!state.head.extra) { - // Use untyped array for more convenient processing later - state.head.extra = new Array(state.head.extra_len); - } - utils.arraySet( - state.head.extra, - input, - next, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - //zmemcpy(state.head.extra + len, next, - // len + copy > state.head.extra_max ? - // state.head.extra_max - len : copy); - } - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - state.length -= copy; - } - if (state.length) { break inf_leave; } - } - state.length = 0; - state.mode = NAME; - /* falls through */ - case NAME: - if (state.flags & 0x0800) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - // TODO: 2 or 1 bytes? - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.name_max*/)) { - state.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.name = null; - } - state.length = 0; - state.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state.flags & 0x1000) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.comm_max*/)) { - state.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.comment = null; - } - state.mode = HCRC; - /* falls through */ - case HCRC: - if (state.flags & 0x0200) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.check & 0xffff)) { - strm.msg = 'header crc mismatch'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - if (state.head) { - state.head.hcrc = ((state.flags >> 9) & 1); - state.head.done = true; - } - strm.adler = state.check = 0; - state.mode = TYPE; - break; - case DICTID: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - strm.adler = state.check = zswap32(hold); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = DICT; - /* falls through */ - case DICT: - if (state.havedict === 0) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - return Z_NEED_DICT; - } - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } - /* falls through */ - case TYPEDO: - if (state.last) { - //--- BYTEBITS() ---// - hold >>>= bits & 7; - bits -= bits & 7; - //---// - state.mode = CHECK; - break; - } - //=== NEEDBITS(3); */ - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.last = (hold & 0x01)/*BITS(1)*/; - //--- DROPBITS(1) ---// - hold >>>= 1; - bits -= 1; - //---// - - switch ((hold & 0x03)/*BITS(2)*/) { - case 0: /* stored block */ - //Tracev((stderr, "inflate: stored block%s\n", - // state.last ? " (last)" : "")); - state.mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - //Tracev((stderr, "inflate: fixed codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = LEN_; /* decode codes */ - if (flush === Z_TREES) { - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break inf_leave; - } - break; - case 2: /* dynamic block */ - //Tracev((stderr, "inflate: dynamic codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = TABLE; - break; - case 3: - strm.msg = 'invalid block type'; - state.mode = BAD; - } - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break; - case STORED: - //--- BYTEBITS() ---// /* go to byte boundary */ - hold >>>= bits & 7; - bits -= bits & 7; - //---// - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { - strm.msg = 'invalid stored block lengths'; - state.mode = BAD; - break; - } - state.length = hold & 0xffff; - //Tracev((stderr, "inflate: stored length %u\n", - // state.length)); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = COPY_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case COPY_: - state.mode = COPY; - /* falls through */ - case COPY: - copy = state.length; - if (copy) { - if (copy > have) { copy = have; } - if (copy > left) { copy = left; } - if (copy === 0) { break inf_leave; } - //--- zmemcpy(put, next, copy); --- - utils.arraySet(output, input, next, copy, put); - //---// - have -= copy; - next += copy; - left -= copy; - put += copy; - state.length -= copy; - break; - } - //Tracev((stderr, "inflate: stored end\n")); - state.mode = TYPE; - break; - case TABLE: - //=== NEEDBITS(14); */ - while (bits < 14) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// -//#ifndef PKZIP_BUG_WORKAROUND - if (state.nlen > 286 || state.ndist > 30) { - strm.msg = 'too many length or distance symbols'; - state.mode = BAD; - break; - } -//#endif - //Tracev((stderr, "inflate: table sizes ok\n")); - state.have = 0; - state.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state.have < state.ncode) { - //=== NEEDBITS(3); - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - while (state.have < 19) { - state.lens[order[state.have++]] = 0; - } - // We have separate tables & no pointers. 2 commented lines below not needed. - //state.next = state.codes; - //state.lencode = state.next; - // Switch to use dynamic table - state.lencode = state.lendyn; - state.lenbits = 7; - - opts = { bits: state.lenbits }; - ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); - state.lenbits = opts.bits; - - if (ret) { - strm.msg = 'invalid code lengths set'; - state.mode = BAD; - break; - } - //Tracev((stderr, "inflate: code lengths ok\n")); - state.have = 0; - state.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state.have < state.nlen + state.ndist) { - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_val < 16) { - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.lens[state.have++] = here_val; - } - else { - if (here_val === 16) { - //=== NEEDBITS(here.bits + 2); - n = here_bits + 2; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - if (state.have === 0) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - len = state.lens[state.have - 1]; - copy = 3 + (hold & 0x03);//BITS(2); - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - } - else if (here_val === 17) { - //=== NEEDBITS(here.bits + 3); - n = here_bits + 3; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 3 + (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - else { - //=== NEEDBITS(here.bits + 7); - n = here_bits + 7; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 11 + (hold & 0x7f);//BITS(7); - //--- DROPBITS(7) ---// - hold >>>= 7; - bits -= 7; - //---// - } - if (state.have + copy > state.nlen + state.ndist) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - while (copy--) { - state.lens[state.have++] = len; - } - } - } - - /* handle error breaks in while */ - if (state.mode === BAD) { break; } - - /* check for end-of-block code (better have one) */ - if (state.lens[256] === 0) { - strm.msg = 'invalid code -- missing end-of-block'; - state.mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state.lenbits = 9; - - opts = { bits: state.lenbits }; - ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.lenbits = opts.bits; - // state.lencode = state.next; - - if (ret) { - strm.msg = 'invalid literal/lengths set'; - state.mode = BAD; - break; - } - - state.distbits = 6; - //state.distcode.copy(state.codes); - // Switch to use dynamic table - state.distcode = state.distdyn; - opts = { bits: state.distbits }; - ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.distbits = opts.bits; - // state.distcode = state.next; - - if (ret) { - strm.msg = 'invalid distances set'; - state.mode = BAD; - break; - } - //Tracev((stderr, 'inflate: codes ok\n')); - state.mode = LEN_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case LEN_: - state.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - inflate_fast(strm, _out); - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - if (state.mode === TYPE) { - state.back = -1; - } - break; - } - state.back = 0; - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if (here_bits <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_op && (here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.lencode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - state.length = here_val; - if (here_op === 0) { - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - state.mode = LIT; - break; - } - if (here_op & 32) { - //Tracevv((stderr, "inflate: end of block\n")); - state.back = -1; - state.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break; - } - state.extra = here_op & 15; - state.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } - //Tracevv((stderr, "inflate: length %u\n", state.length)); - state.was = state.length; - state.mode = DIST; - /* falls through */ - case DIST: - for (;;) { - here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if ((here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.distcode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - if (here_op & 64) { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break; - } - state.offset = here_val; - state.extra = (here_op) & 15; - state.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } -//#ifdef INFLATE_STRICT - if (state.offset > state.dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -//#endif - //Tracevv((stderr, "inflate: distance %u\n", state.offset)); - state.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { break inf_leave; } - copy = _out - left; - if (state.offset > copy) { /* copy from window */ - copy = state.offset - copy; - if (copy > state.whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// Trace((stderr, "inflate.c too far\n")); -// copy -= state.whave; -// if (copy > state.length) { copy = state.length; } -// if (copy > left) { copy = left; } -// left -= copy; -// state.length -= copy; -// do { -// output[put++] = 0; -// } while (--copy); -// if (state.length === 0) { state.mode = LEN; } -// break; -//#endif - } - if (copy > state.wnext) { - copy -= state.wnext; - from = state.wsize - copy; - } - else { - from = state.wnext - copy; - } - if (copy > state.length) { copy = state.length; } - from_source = state.window; - } - else { /* copy from output */ - from_source = output; - from = put - state.offset; - copy = state.length; - } - if (copy > left) { copy = left; } - left -= copy; - state.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state.length === 0) { state.mode = LEN; } - break; - case LIT: - if (left === 0) { break inf_leave; } - output[put++] = state.length; - left--; - state.mode = LEN; - break; - case CHECK: - if (state.wrap) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - // Use '|' instead of '+' to make sure that result is signed - hold |= input[next++] << bits; - bits += 8; - } - //===// - _out -= left; - strm.total_out += _out; - state.total += _out; - if (_out) { - strm.adler = state.check = - /*UPDATE(state.check, put - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); - - } - _out = left; - // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too - if ((state.flags ? hold : zswap32(hold)) !== state.check) { - strm.msg = 'incorrect data check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: check matches trailer\n")); - } - state.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state.wrap && state.flags) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.total & 0xffffffff)) { - strm.msg = 'incorrect length check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: length matches trailer\n")); - } - state.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; - } - } - - // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - - if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && - (state.mode < CHECK || flush !== Z_FINISH))) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state.mode = MEM; - return Z_MEM_ERROR; - } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state.total += _out; - if (state.wrap && _out) { - strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); - } - strm.data_type = state.bits + (state.last ? 64 : 0) + - (state.mode === TYPE ? 128 : 0) + - (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); - if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; -} - -function inflateEnd(strm) { - - if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { - return Z_STREAM_ERROR; - } - - var state = strm.state; - if (state.window) { - state.window = null; - } - strm.state = null; - return Z_OK; -} - -function inflateGetHeader(strm, head) { - var state; - - /* check state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } - - /* save header structure */ - state.head = head; - head.done = false; - return Z_OK; -} - -function inflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var state; - var dictid; - var ret; - - /* check state */ - if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } - state = strm.state; - - if (state.wrap !== 0 && state.mode !== DICT) { - return Z_STREAM_ERROR; - } - - /* check for correct dictionary identifier */ - if (state.mode === DICT) { - dictid = 1; /* adler32(0, null, 0)*/ - /* dictid = adler32(dictid, dictionary, dictLength); */ - dictid = adler32(dictid, dictionary, dictLength, 0); - if (dictid !== state.check) { - return Z_DATA_ERROR; - } - } - /* copy dictionary to window using updatewindow(), which will amend the - existing dictionary if appropriate */ - ret = updatewindow(strm, dictionary, dictLength, dictLength); - if (ret) { - state.mode = MEM; - return Z_MEM_ERROR; - } - state.havedict = 1; - // Tracev((stderr, "inflate: dictionary set\n")); - return Z_OK; -} - -exports.inflateReset = inflateReset; -exports.inflateReset2 = inflateReset2; -exports.inflateResetKeep = inflateResetKeep; -exports.inflateInit = inflateInit; -exports.inflateInit2 = inflateInit2; -exports.inflate = inflate; -exports.inflateEnd = inflateEnd; -exports.inflateGetHeader = inflateGetHeader; -exports.inflateSetDictionary = inflateSetDictionary; -exports.inflateInfo = 'pako inflate (from Nodeca project)'; - -/* Not implemented -exports.inflateCopy = inflateCopy; -exports.inflateGetDictionary = inflateGetDictionary; -exports.inflateMark = inflateMark; -exports.inflatePrime = inflatePrime; -exports.inflateSync = inflateSync; -exports.inflateSyncPoint = inflateSyncPoint; -exports.inflateUndermine = inflateUndermine; -*/ - -},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); - -var MAXBITS = 15; -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -var lbase = [ /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 -]; - -var lext = [ /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 -]; - -var dbase = [ /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0 -]; - -var dext = [ /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64 -]; - -module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) -{ - var bits = opts.bits; - //here = opts.here; /* table entry for duplication */ - - var len = 0; /* a code's length in bits */ - var sym = 0; /* index of code symbols */ - var min = 0, max = 0; /* minimum and maximum code lengths */ - var root = 0; /* number of index bits for root table */ - var curr = 0; /* number of index bits for current table */ - var drop = 0; /* code bits to drop for sub-table */ - var left = 0; /* number of prefix codes available */ - var used = 0; /* code entries in table used */ - var huff = 0; /* Huffman code */ - var incr; /* for incrementing code, index */ - var fill; /* index for replicating entries */ - var low; /* low bits for current root entry */ - var mask; /* mask for low root bits */ - var next; /* next available space in table */ - var base = null; /* base value table to use */ - var base_index = 0; -// var shoextra; /* extra bits table to use */ - var end; /* use base and extra for symbol > end */ - var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ - var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ - var extra = null; - var extra_index = 0; - - var here_bits, here_op, here_val; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } - - /* bound code lengths, force root to be within code lengths */ - root = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { break; } - } - if (root > max) { - root = max; - } - if (max === 0) { /* no symbols to code at all */ - //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ - //table.bits[opts.table_index] = 1; //here.bits = (var char)1; - //table.val[opts.table_index++] = 0; //here.val = (var short)0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - - //table.op[opts.table_index] = 64; - //table.bits[opts.table_index] = 1; - //table.val[opts.table_index++] = 0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - opts.bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { break; } - } - if (root < min) { - root = min; - } - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } /* over-subscribed */ - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; /* incomplete set */ - } - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; - } - } - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - // poor man optimization - use if-else instead of switch, - // to avoid deopts in old v8 - if (type === CODES) { - base = extra = work; /* dummy value--not used */ - end = 19; - - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - - } else { /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize opts for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = table_index; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = -1; /* trigger new sub-table when len > root */ - used = 1 << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* process all codes and make table entries */ - for (;;) { - /* create table entry */ - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } - else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; - } - else { - here_op = 32 + 64; /* end of block */ - here_val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1 << (len - drop); - fill = 1 << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; - } while (fill !== 0); - - /* backwards increment the len-bit code huff */ - incr = 1 << (len - 1); - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } - - /* go to next symbol, update count, len */ - sym++; - if (--count[len] === 0) { - if (len === max) { break; } - len = lens[lens_index + work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) !== low) { - /* if first time, transition to sub-tables */ - if (drop === 0) { - drop = root; - } - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { break; } - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1 << curr; - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* point entry in root table to sub-table */ - low = huff & mask; - /*table.op[low] = curr; - table.bits[low] = root; - table.val[low] = next - opts.table_index;*/ - table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff !== 0) { - //table.op[next + huff] = 64; /* invalid code marker */ - //table.bits[next + huff] = len - drop; - //table.val[next + huff] = 0; - table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; - } - - /* set return parameters */ - //opts.table_index += used; - opts.bits = root; - return 0; -}; - -},{"../utils/common":3}],13:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -module.exports = { - 2: 'need dictionary', /* Z_NEED_DICT 2 */ - 1: 'stream end', /* Z_STREAM_END 1 */ - 0: '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; - -},{}],14:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -/* eslint-disable space-unary-ops */ - -var utils = require('../utils/common'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -//var Z_FILTERED = 1; -//var Z_HUFFMAN_ONLY = 2; -//var Z_RLE = 3; -var Z_FIXED = 4; -//var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -var Z_BINARY = 0; -var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - -/*============================================================================*/ - - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - -// From zutil.h - -var STORED_BLOCK = 0; -var STATIC_TREES = 1; -var DYN_TREES = 2; -/* The three kinds of block type */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -/* The minimum and maximum match lengths */ - -// From deflate.h -/* =========================================================================== - * Internal compression state. - */ - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ - -var LITERALS = 256; -/* number of literal bytes 0..255 */ - -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ - -var D_CODES = 30; -/* number of distance codes */ - -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ - -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ - -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var Buf_size = 16; -/* size of bit buffer in bi_buf */ - - -/* =========================================================================== - * Constants - */ - -var MAX_BL_BITS = 7; -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -var END_BLOCK = 256; -/* end of block literal code */ - -var REP_3_6 = 16; -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -var REPZ_3_10 = 17; -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -var REPZ_11_138 = 18; -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -/* eslint-disable comma-spacing,array-bracket-spacing */ -var extra_lbits = /* extra bits for each length code */ - [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; - -var extra_dbits = /* extra bits for each distance code */ - [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; - -var extra_blbits = /* extra bits for each bit length code */ - [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; - -var bl_order = - [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; -/* eslint-enable comma-spacing,array-bracket-spacing */ - -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -// We pre-fill arrays with 0 to avoid uninitialized gaps - -var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ - -// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1 -var static_ltree = new Array((L_CODES + 2) * 2); -zero(static_ltree); -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -var static_dtree = new Array(D_CODES * 2); -zero(static_dtree); -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -var _dist_code = new Array(DIST_CODE_LEN); -zero(_dist_code); -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); -zero(_length_code); -/* length code for each normalized match length (0 == MIN_MATCH) */ - -var base_length = new Array(LENGTH_CODES); -zero(base_length); -/* First normalized length for each code (0 = MIN_MATCH) */ - -var base_dist = new Array(D_CODES); -zero(base_dist); -/* First normalized distance for each code (0 = distance of 1) */ - - -function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { - - this.static_tree = static_tree; /* static tree or NULL */ - this.extra_bits = extra_bits; /* extra bits for each code or NULL */ - this.extra_base = extra_base; /* base index for extra_bits */ - this.elems = elems; /* max number of elements in the tree */ - this.max_length = max_length; /* max bit length for the codes */ - - // show if `static_tree` has data or dummy - needed for monomorphic objects - this.has_stree = static_tree && static_tree.length; -} - - -var static_l_desc; -var static_d_desc; -var static_bl_desc; - - -function TreeDesc(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; /* the dynamic tree */ - this.max_code = 0; /* largest code with non zero frequency */ - this.stat_desc = stat_desc; /* the corresponding static tree */ -} - - - -function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; -} - - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -function put_short(s, w) { -// put_byte(s, (uch)((w) & 0xff)); -// put_byte(s, (uch)((ush)(w) >> 8)); - s.pending_buf[s.pending++] = (w) & 0xff; - s.pending_buf[s.pending++] = (w >>> 8) & 0xff; -} - - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -function send_bits(s, value, length) { - if (s.bi_valid > (Buf_size - length)) { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - put_short(s, s.bi_buf); - s.bi_buf = value >> (Buf_size - s.bi_valid); - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - s.bi_valid += length; - } -} - - -function send_code(s, c, tree) { - send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); -} - - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; -} - - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 0xff; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } -} - - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -function gen_bitlen(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; /* heap index */ - var n, m; /* iterate over the tree elements */ - var bits; /* bit length */ - var xbits; /* extra bits */ - var f; /* frequency */ - var overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ - - for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n * 2 + 1]/*.Len*/ = bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) { continue; } /* not a leaf node */ - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n - base]; - } - f = tree[n * 2]/*.Freq*/; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); - } - } - if (overflow === 0) { return; } - - // Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length - 1; - while (s.bl_count[bits] === 0) { bits--; } - s.bl_count[bits]--; /* move one leaf down the tree */ - s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ - s.bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { continue; } - if (tree[m * 2 + 1]/*.Len*/ !== bits) { - // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; - tree[m * 2 + 1]/*.Len*/ = bits; - } - n--; - } - } -} - - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -function gen_codes(tree, max_code, bl_count) -// ct_data *tree; /* the tree to decorate */ -// int max_code; /* largest code with non zero frequency */ -// ushf *bl_count; /* number of codes at each bit length */ -{ - var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ - var code = 0; /* running code value */ - var bits; /* bit index */ - var n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits - 1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES - 1; code++) { - base_length[code] = length; - for (n = 0; n < (1 << extra_lbits[code]); n++) { - _length_code[length++] = code; - } - } - //Assert (length == 256, "tr_static_init: length != 256"); - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - _length_code[length - 1] = code; - - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1 << extra_dbits[code]); n++) { - _dist_code[dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: dist != 256"); - dist >>= 7; /* from now on, all distances are divided by 128 */ - for (; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { - _dist_code[256 + dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } - - n = 0; - while (n <= 143) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n * 2 + 1]/*.Len*/ = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n * 2 + 1]/*.Len*/ = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes(static_ltree, L_CODES + 1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n * 2 + 1]/*.Len*/ = 5; - static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); - } - - // Now data ready and we can init static trees - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - - //static_init_done = true; -} - - -/* =========================================================================== - * Initialize a new block. - */ -function init_block(s) { - var n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } - - s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; -} - - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -function bi_windup(s) -{ - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - //put_byte(s, (Byte)s->bi_buf); - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -function copy_block(s, buf, len, header) -//DeflateState *s; -//charf *buf; /* the input data */ -//unsigned len; /* its length */ -//int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, len); - put_short(s, ~len); - } -// while (len--) { -// put_byte(s, *buf++); -// } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -function smaller(tree, n, m, depth) { - var _n2 = n * 2; - var _m2 = m * 2; - return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || - (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); -} - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -function pqdownheap(s, tree, k) -// deflate_state *s; -// ct_data *tree; /* the tree to restore */ -// int k; /* node to move down */ -{ - var v = s.heap[k]; - var j = k << 1; /* left son of k */ - while (j <= s.heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s.heap_len && - smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s.heap[j], s.depth)) { break; } - - /* Exchange v with the smallest son */ - s.heap[k] = s.heap[j]; - k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s.heap[k] = v; -} - - -// inlined manually -// var SMALLEST = 1; - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -function compress_block(s, ltree, dtree) -// deflate_state *s; -// const ct_data *ltree; /* literal tree */ -// const ct_data *dtree; /* distance tree */ -{ - var dist; /* distance of matched string */ - var lc; /* match length or unmatched char (if dist == 0) */ - var lx = 0; /* running index in l_buf */ - var code; /* the code to send */ - var extra; /* number of extra bits to send */ - - if (s.last_lit !== 0) { - do { - dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); - lc = s.pending_buf[s.l_buf + lx]; - lx++; - - if (dist === 0) { - send_code(s, lc, ltree); /* send a literal byte */ - //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code + LITERALS + 1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - //Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - // "pendingBuf overflow"); - - } while (lx < s.last_lit); - } - - send_code(s, END_BLOCK, ltree); -} - - -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -function build_tree(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; /* iterate over heap elements */ - var max_code = -1; /* largest code with non zero frequency */ - var node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s.heap_len = 0; - s.heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n * 2]/*.Freq*/ !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; - - } else { - tree[n * 2 + 1]/*.Len*/ = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); - tree[node * 2]/*.Freq*/ = 1; - s.depth[node] = 0; - s.opt_len--; - - if (has_stree) { - s.static_len -= stree[node * 2 + 1]/*.Len*/; - } - /* node is 0 or 1 so it does not have extra bits */ - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - //pqremove(s, tree, n); /* n = node of least frequency */ - /*** pqremove ***/ - n = s.heap[1/*SMALLEST*/]; - s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; - pqdownheap(s, tree, 1/*SMALLEST*/); - /***/ - - m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ - - s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ - s.heap[--s.heap_max] = m; - - /* Create a new node father of n and m */ - tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; - - /* and insert the new node in the heap */ - s.heap[1/*SMALLEST*/] = node++; - pqdownheap(s, tree, 1/*SMALLEST*/); - - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes(tree, max_code, s.bl_count); -} - - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -function scan_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - s.bl_tree[curlen * 2]/*.Freq*/ += count; - - } else if (curlen !== 0) { - - if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } - s.bl_tree[REP_3_6 * 2]/*.Freq*/++; - - } else if (count <= 10) { - s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; - - } else { - s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; - } - - count = 0; - prevlen = curlen; - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -function send_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); - - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - //Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count - 3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count - 3, 3); - - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count - 11, 7); - } - - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -function build_bl_tree(s) { - var max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, s.bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { - break; - } - } - /* Update opt_len to include the bit length tree and counts */ - s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - // s->opt_len, s->static_len)); - - return max_blindex; -} - - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -function send_all_trees(s, lcodes, dcodes, blcodes) -// deflate_state *s; -// int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - var rank; /* index in bl_order */ - - //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - // "too many codes"); - //Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes - 1, 5); - send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); - } - //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ - //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ - //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -function detect_data_type(s) { - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - var black_mask = 0xf3ffc07f; - var n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { - return Z_BINARY; - } - } - - /* Check for textual ("white-listed") bytes. */ - if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || - s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - } - - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - - -var static_init_done = false; - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -function _tr_init(s) -{ - - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - - s.bi_buf = 0; - s.bi_valid = 0; - - /* Initialize the first block of the first file: */ - init_block(s); -} - - -/* =========================================================================== - * Send a stored block - */ -function _tr_stored_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ - copy_block(s, buf, stored_len, true); /* with header */ -} - - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -function _tr_align(s) { - send_bits(s, STATIC_TREES << 1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); -} - - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ -function _tr_flush_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block, or NULL if too old */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - var max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s.level > 0) { - - /* Check if the file is binary or text */ - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - - /* Construct the literal and distance trees */ - build_tree(s, s.l_desc); - // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - - build_tree(s, s.d_desc); - // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s.opt_len + 3 + 7) >>> 3; - static_lenb = (s.static_len + 3 + 7) >>> 3; - - // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->last_lit)); - - if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } - - } else { - // Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - - if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { - /* 4: two words for the lengths */ - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { - - send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); - - } else { - send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); - } - // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - // s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -function _tr_tally(s, dist, lc) -// deflate_state *s; -// unsigned dist; /* distance of matched string */ -// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - //var out_length, in_length, dcode; - - s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; - - s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; - s.last_lit++; - - if (dist === 0) { - /* lc is the unmatched char */ - s.dyn_ltree[lc * 2]/*.Freq*/++; - } else { - s.matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - //Assert((ush)dist < (ush)MAX_DIST(s) && - // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; - s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; - } - -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility - -//#ifdef TRUNCATE_BLOCK -// /* Try to guess if it is profitable to stop the current block here */ -// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { -// /* Compute an upper bound for the compressed length */ -// out_length = s.last_lit*8; -// in_length = s.strstart - s.block_start; -// -// for (dcode = 0; dcode < D_CODES; dcode++) { -// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); -// } -// out_length >>>= 3; -// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", -// // s->last_lit, in_length, out_length, -// // 100L - out_length*100L/in_length)); -// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { -// return true; -// } -// } -//#endif - - return (s.last_lit === s.lit_bufsize - 1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -exports._tr_init = _tr_init; -exports._tr_stored_block = _tr_stored_block; -exports._tr_flush_block = _tr_flush_block; -exports._tr_tally = _tr_tally; -exports._tr_align = _tr_align; - -},{"../utils/common":3}],15:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; - -},{}],"/":[function(require,module,exports){ -// Top level file is just a mixin of submodules & constants -'use strict'; - -var assign = require('./lib/utils/common').assign; - -var deflate = require('./lib/deflate'); -var inflate = require('./lib/inflate'); -var constants = require('./lib/zlib/constants'); - -var pako = {}; - -assign(pako, deflate, inflate, constants); - -module.exports = pako; - -},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/") -}); diff --git a/node_modules/pako/dist/pako.min.js b/node_modules/pako/dist/pako.min.js deleted file mode 100644 index ba397319..00000000 --- a/node_modules/pako/dist/pako.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=t()}}(function(){return function r(s,o,l){function h(e,t){if(!o[e]){if(!s[e]){var a="function"==typeof require&&require;if(!t&&a)return a(e,!0);if(d)return d(e,!0);var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}var n=o[e]={exports:{}};s[e][0].call(n.exports,function(t){return h(s[e][1][t]||t)},n,n.exports,r,s,o,l)}return o[e].exports}for(var d="function"==typeof require&&require,t=0;t>>6:(a<65536?e[r++]=224|a>>>12:(e[r++]=240|a>>>18,e[r++]=128|a>>>12&63),e[r++]=128|a>>>6&63),e[r++]=128|63&a);return e},a.buf2binstring=function(t){return d(t,t.length)},a.binstring2buf=function(t){for(var e=new l.Buf8(t.length),a=0,i=e.length;a>10&1023,o[i++]=56320|1023&n)}return d(o,i)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;0<=a&&128==(192&t[a]);)a--;return a<0?e:0===a?e:a+h[t[a]]>e?a:e}},{"./common":3}],5:[function(t,e,a){"use strict";e.exports=function(t,e,a,i){for(var n=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){for(a-=s=2e3>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,i){var n=o,r=i+a;t^=-1;for(var s=i;s>>8^n[255&(t^e[s])];return-1^t}},{}],8:[function(t,e,a){"use strict";var l,_=t("../utils/common"),h=t("./trees"),u=t("./adler32"),c=t("./crc32"),i=t("./messages"),d=0,f=4,b=0,g=-2,m=-1,w=4,n=2,p=8,v=9,r=286,s=30,o=19,k=2*r+1,y=15,x=3,z=258,B=z+x+1,S=42,E=113,A=1,Z=2,R=3,C=4;function N(t,e){return t.msg=i[e],e}function O(t){return(t<<1)-(4t.avail_out&&(a=t.avail_out),0!==a&&(_.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function U(t,e){h._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,I(t.strm)}function T(t,e){t.pending_buf[t.pending++]=e}function F(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function L(t,e){var a,i,n=t.max_chain_length,r=t.strstart,s=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-B?t.strstart-(t.w_size-B):0,h=t.window,d=t.w_mask,f=t.prev,_=t.strstart+z,u=h[r+s-1],c=h[r+s];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(h[(a=e)+s]===c&&h[a+s-1]===u&&h[a]===h[r]&&h[++a]===h[r+1]){r+=2,a++;do{}while(h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&r<_);if(i=z-(_-r),r=_-z,sl&&0!=--n);return s<=t.lookahead?s:t.lookahead}function H(t){var e,a,i,n,r,s,o,l,h,d,f=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-B)){for(_.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=a=t.hash_size;i=t.head[--e],t.head[e]=f<=i?i-f:0,--a;);for(e=a=f;i=t.prev[--e],t.prev[e]=f<=i?i-f:0,--a;);n+=f}if(0===t.strm.avail_in)break;if(s=t.strm,o=t.window,l=t.strstart+t.lookahead,h=n,d=void 0,d=s.avail_in,h=x)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=(t.ins_h<=x&&(t.ins_h=(t.ins_h<=x)if(i=h._tr_tally(t,t.strstart-t.match_start,t.match_length-x),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=x){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=x&&(t.ins_h=(t.ins_h<=x&&t.match_length<=t.prev_length){for(n=t.strstart+t.lookahead-x,i=h._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-x),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=n&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(H(t),0===t.lookahead&&e===d)return A;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+a;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,U(t,!1),0===t.strm.avail_out))return A;if(t.strstart-t.block_start>=t.w_size-B&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):(t.strstart>t.block_start&&(U(t,!1),t.strm.avail_out),A)}),new M(4,4,8,4,j),new M(4,5,16,8,j),new M(4,6,32,32,j),new M(4,4,16,16,K),new M(8,16,32,32,K),new M(8,16,128,128,K),new M(8,32,128,256,K),new M(32,128,258,1024,K),new M(32,258,258,4096,K)],a.deflateInit=function(t,e){return G(t,e,p,15,8,0)},a.deflateInit2=G,a.deflateReset=q,a.deflateResetKeep=Y,a.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=e,b):g},a.deflate=function(t,e){var a,i,n,r;if(!t||!t.state||5>8&255),T(i,i.gzhead.time>>16&255),T(i,i.gzhead.time>>24&255),T(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),T(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(T(i,255&i.gzhead.extra.length),T(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=c(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(T(i,0),T(i,0),T(i,0),T(i,0),T(i,0),T(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),T(i,3),i.status=E);else{var s=p+(i.w_bits-8<<4)<<8;s|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(s|=32),s+=31-s%31,i.status=E,F(i,s),0!==i.strstart&&(F(i,t.adler>>>16),F(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending!==i.pending_buf_size));)T(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}T(i,r=i.gzindexn&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}T(i,r=i.gzindexn&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&I(t),i.pending+2<=i.pending_buf_size&&(T(i,255&t.adler),T(i,t.adler>>8&255),t.adler=0,i.status=E)):i.status=E),0!==i.pending){if(I(t),0===t.avail_out)return i.last_flush=-1,b}else if(0===t.avail_in&&O(e)<=O(a)&&e!==f)return N(t,-5);if(666===i.status&&0!==t.avail_in)return N(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==d&&666!==i.status){var o=2===i.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(H(t),0===t.lookahead)){if(e===d)return A;break}if(t.match_length=0,a=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}(i,e):3===i.strategy?function(t,e){for(var a,i,n,r,s=t.window;;){if(t.lookahead<=z){if(H(t),t.lookahead<=z&&e===d)return A;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=x&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=x?(a=h._tr_tally(t,1,t.match_length-x),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}(i,e):l[i.level].func(i,e);if(o!==R&&o!==C||(i.status=666),o===A||o===R)return 0===t.avail_out&&(i.last_flush=-1),b;if(o===Z&&(1===e?h._tr_align(i):5!==e&&(h._tr_stored_block(i,0,0,!1),3===e&&(D(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),I(t),0===t.avail_out))return i.last_flush=-1,b}return e!==f?b:i.wrap<=0?1:(2===i.wrap?(T(i,255&t.adler),T(i,t.adler>>8&255),T(i,t.adler>>16&255),T(i,t.adler>>24&255),T(i,255&t.total_in),T(i,t.total_in>>8&255),T(i,t.total_in>>16&255),T(i,t.total_in>>24&255)):(F(i,t.adler>>>16),F(i,65535&t.adler)),I(t),0=a.w_size&&(0===r&&(D(a.head),a.strstart=0,a.block_start=0,a.insert=0),h=new _.Buf8(a.w_size),_.arraySet(h,e,d-a.w_size,a.w_size,0),e=h,d=a.w_size),s=t.avail_in,o=t.next_in,l=t.input,t.avail_in=d,t.next_in=0,t.input=e,H(a);a.lookahead>=x;){for(i=a.strstart,n=a.lookahead-(x-1);a.ins_h=(a.ins_h<>>=v=p>>>24,c-=v,0===(v=p>>>16&255))S[r++]=65535&p;else{if(!(16&v)){if(0==(64&v)){p=b[(65535&p)+(u&(1<>>=v,c-=v),c<15&&(u+=B[i++]<>>=v=p>>>24,c-=v,!(16&(v=p>>>16&255))){if(0==(64&v)){p=g[(65535&p)+(u&(1<>>=v,c-=v,(v=r-s)>3,u&=(1<<(c-=k<<3))-1,t.next_in=i,t.next_out=r,t.avail_in=i>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function r(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Z.Buf16(320),this.work=new Z.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function s(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=F,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Z.Buf32(i),e.distcode=e.distdyn=new Z.Buf32(n),e.sane=1,e.back=-1,U):T}function o(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,s(t)):T}function l(t,e){var a,i;return t&&t.state?(i=t.state,e<0?(a=0,e=-e):(a=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=r.wsize?(Z.arraySet(r.window,e,a-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(i<(n=r.wsize-r.wnext)&&(n=i),Z.arraySet(r.window,e,a-i,n,r.wnext),(i-=n)?(Z.arraySet(r.window,e,a-i,i,0),r.wnext=i,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,a.check=C(a.check,E,2,0),d=h=0,a.mode=2;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=30;break}if(8!=(15&h)){t.msg="unknown compression method",a.mode=30;break}if(d-=4,y=8+(15&(h>>>=4)),0===a.wbits)a.wbits=y;else if(y>a.wbits){t.msg="invalid window size",a.mode=30;break}a.dmax=1<>8&1),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0)),d=h=0,a.mode=3;case 3:for(;d<32;){if(0===o)break t;o--,h+=i[r++]<>>8&255,E[2]=h>>>16&255,E[3]=h>>>24&255,a.check=C(a.check,E,4,0)),d=h=0,a.mode=4;case 4:for(;d<16;){if(0===o)break t;o--,h+=i[r++]<>8),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0)),d=h=0,a.mode=5;case 5:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[r++]<>>8&255,a.check=C(a.check,E,2,0)),d=h=0}else a.head&&(a.head.extra=null);a.mode=6;case 6:if(1024&a.flags&&(o<(u=a.length)&&(u=o),u&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),Z.arraySet(a.head.extra,i,r,u,y)),512&a.flags&&(a.check=C(a.check,i,u,r)),o-=u,r+=u,a.length-=u),a.length))break t;a.length=0,a.mode=7;case 7:if(2048&a.flags){if(0===o)break t;for(u=0;y=i[r+u++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y)),y&&u>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=12;break;case 10:for(;d<32;){if(0===o)break t;o--,h+=i[r++]<>>=7&d,d-=7&d,a.mode=27;break}for(;d<3;){if(0===o)break t;o--,h+=i[r++]<>>=1)){case 0:a.mode=14;break;case 1:if(H(a),a.mode=20,6!==e)break;h>>>=2,d-=2;break t;case 2:a.mode=17;break;case 3:t.msg="invalid block type",a.mode=30}h>>>=2,d-=2;break;case 14:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[r++]<>>16^65535)){t.msg="invalid stored block lengths",a.mode=30;break}if(a.length=65535&h,d=h=0,a.mode=15,6===e)break t;case 15:a.mode=16;case 16:if(u=a.length){if(o>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,286>>=3,d-=3}for(;a.have<19;)a.lens[A[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,z={bits:a.lenbits},x=O(0,a.lens,0,19,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid code lengths set",a.mode=30;break}a.have=0,a.mode=19;case 19:for(;a.have>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>>=g,d-=g,a.lens[a.have++]=w;else{if(16===w){for(B=g+2;d>>=g,d-=g,0===a.have){t.msg="invalid bit length repeat",a.mode=30;break}y=a.lens[a.have-1],u=3+(3&h),h>>>=2,d-=2}else if(17===w){for(B=g+3;d>>=g)),h>>>=3,d-=3}else{for(B=g+7;d>>=g)),h>>>=7,d-=7}if(a.have+u>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=30;break}for(;u--;)a.lens[a.have++]=y}}if(30===a.mode)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=30;break}if(a.lenbits=9,z={bits:a.lenbits},x=O(D,a.lens,0,a.nlen,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid literal/lengths set",a.mode=30;break}if(a.distbits=6,a.distcode=a.distdyn,z={bits:a.distbits},x=O(I,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,z),a.distbits=z.bits,x){t.msg="invalid distances set",a.mode=30;break}if(a.mode=20,6===e)break t;case 20:a.mode=21;case 21:if(6<=o&&258<=l){t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,N(t,_),s=t.next_out,n=t.output,l=t.avail_out,r=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,12===a.mode&&(a.back=-1);break}for(a.back=0;m=(S=a.lencode[h&(1<>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>p)])>>>16&255,w=65535&S,!(p+(g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>>=p,d-=p,a.back+=p}if(h>>>=g,d-=g,a.back+=g,a.length=w,0===m){a.mode=26;break}if(32&m){a.back=-1,a.mode=12;break}if(64&m){t.msg="invalid literal/length code",a.mode=30;break}a.extra=15&m,a.mode=22;case 22:if(a.extra){for(B=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=23;case 23:for(;m=(S=a.distcode[h&(1<>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>p)])>>>16&255,w=65535&S,!(p+(g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>>=p,d-=p,a.back+=p}if(h>>>=g,d-=g,a.back+=g,64&m){t.msg="invalid distance code",a.mode=30;break}a.offset=w,a.extra=15&m,a.mode=24;case 24:if(a.extra){for(B=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=30;break}a.mode=25;case 25:if(0===l)break t;if(u=_-l,a.offset>u){if((u=a.offset-u)>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=30;break}u>a.wnext?(u-=a.wnext,c=a.wsize-u):c=a.wnext-u,u>a.length&&(u=a.length),b=a.window}else b=n,c=s-a.offset,u=a.length;for(lu?(b=N[O+s[p]],g=A[Z+s[p]]):(b=96,g=0),l=1<>z)+(h-=l)]=c<<24|b<<16|g|0,0!==h;);for(l=1<>=1;if(0!==l?(E&=l-1,E+=l):E=0,p++,0==--R[w]){if(w===k)break;w=e[a+s[p]]}if(y>>7)]}function T(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function F(t,e,a){t.bi_valid>n-a?(t.bi_buf|=e<>n-t.bi_valid,t.bi_valid+=a-n):(t.bi_buf|=e<>>=1,a<<=1,0<--e;);return a>>>1}function j(t,e,a){var i,n,r=new Array(m+1),s=0;for(i=1;i<=m;i++)r[i]=s=s+a[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=H(r[o]++,o))}}function K(t){var e;for(e=0;e<_;e++)t.dyn_ltree[2*e]=0;for(e=0;e>1;1<=a;a--)Y(t,r,a);for(n=l;a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Y(t,r,1),i=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=i,r[2*n]=r[2*a]+r[2*i],t.depth[n]=(t.depth[a]>=t.depth[i]?t.depth[a]:t.depth[i])+1,r[2*a+1]=r[2*i+1]=n,t.heap[1]=n++,Y(t,r,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,i,n,r,s,o,l=e.dyn_tree,h=e.max_code,d=e.stat_desc.static_tree,f=e.stat_desc.has_stree,_=e.stat_desc.extra_bits,u=e.stat_desc.extra_base,c=e.stat_desc.max_length,b=0;for(r=0;r<=m;r++)t.bl_count[r]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a>=7;i>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return o;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return h;for(e=32;e>>3,(r=t.static_len+3+7>>>3)<=n&&(n=r)):n=r=a+5,a+4<=n&&-1!==e?Q(t,e,a,i):4===t.strategy||r===n?(F(t,2+(i?1:0),3),q(t,S,E)):(F(t,4+(i?1:0),3),function(t,e,a,i){var n;for(F(t,e-257,5),F(t,a-1,5),F(t,i-4,4),n=0;n>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(Z[a]+f+1)]++,t.dyn_dtree[2*U(e)]++),t.last_lit===t.lit_bufsize-1},a._tr_align=function(t){var e;F(t,2,3),L(t,w,S),16===(e=t).bi_valid?(T(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{"../utils/common":3}],15:[function(t,e,a){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/":[function(t,e,a){"use strict";var i={};(0,t("./lib/utils/common").assign)(i,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=i},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")}); diff --git a/node_modules/pako/dist/pako_deflate.js b/node_modules/pako/dist/pako_deflate.js deleted file mode 100644 index d6bbaa15..00000000 --- a/node_modules/pako/dist/pako_deflate.js +++ /dev/null @@ -1,3997 +0,0 @@ -/* pako 1.0.11 nodeca/pako */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // On Chrome, the arguments in a function call that are allowed is `65534`. - // If the length of the buffer is smaller than that, we can use this optimization, - // otherwise we will take a slower path. - if (len < 65534) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function (buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function (str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len * 2); - - for (out = 0, i = 0; i < len;) { - c = buf[i++]; - // quick process ascii - if (c < 0x80) { utf16buf[out++] = c; continue; } - - c_len = _utf8len[c]; - // skip 5 & 6 byte codes - if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function (buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max - 1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means buffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -},{"./common":1}],3:[function(require,module,exports){ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It isn't worth it to make additional optimizations as in original. -// Small size is preferable. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; - -},{}],4:[function(require,module,exports){ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc ^= -1; - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; - -},{}],5:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); -var trees = require('./trees'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var msg = require('./messages'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -var Z_NO_FLUSH = 0; -var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -//var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -//var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -//var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - - -/* compression levels */ -//var Z_NO_COMPRESSION = 0; -//var Z_BEST_SPEED = 1; -//var Z_BEST_COMPRESSION = 9; -var Z_DEFAULT_COMPRESSION = -1; - - -var Z_FILTERED = 1; -var Z_HUFFMAN_ONLY = 2; -var Z_RLE = 3; -var Z_FIXED = 4; -var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -//var Z_BINARY = 0; -//var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - - -/* The deflate compression method */ -var Z_DEFLATED = 8; - -/*============================================================================*/ - - -var MAX_MEM_LEVEL = 9; -/* Maximum value for memLevel in deflateInit2 */ -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_MEM_LEVEL = 8; - - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ -var LITERALS = 256; -/* number of literal bytes 0..255 */ -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -var PRESET_DICT = 0x20; - -var INIT_STATE = 42; -var EXTRA_STATE = 69; -var NAME_STATE = 73; -var COMMENT_STATE = 91; -var HCRC_STATE = 103; -var BUSY_STATE = 113; -var FINISH_STATE = 666; - -var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ -var BS_BLOCK_DONE = 2; /* block flush performed */ -var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ -var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ - -var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. - -function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; -} - -function rank(f) { - return ((f) << 1) - ((f) > 4 ? 9 : 0); -} - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->output buffer and copying into it. - * (See also read_buf()). - */ -function flush_pending(strm) { - var s = strm.state; - - //_tr_flush_bits(s); - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { return; } - - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } -} - - -function flush_block_only(s, last) { - trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); - s.block_start = s.strstart; - flush_pending(s.strm); -} - - -function put_byte(s, b) { - s.pending_buf[s.pending++] = b; -} - - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -function putShortMSB(s, b) { -// put_byte(s, (Byte)(b >> 8)); -// put_byte(s, (Byte)(b & 0xff)); - s.pending_buf[s.pending++] = (b >>> 8) & 0xff; - s.pending_buf[s.pending++] = b & 0xff; -} - - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->input buffer and copying from it. - * (See also flush_pending()). - */ -function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - - if (len > size) { len = size; } - if (len === 0) { return 0; } - - strm.avail_in -= len; - - // zmemcpy(buf, strm->next_in, len); - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } - - else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - - strm.next_in += len; - strm.total_in += len; - - return len; -} - - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; /* max hash chain length */ - var scan = s.strstart; /* current string */ - var match; /* matched string */ - var len; /* length of current match */ - var best_len = s.prev_length; /* best match length so far */ - var nice_match = s.nice_match; /* stop if match long enough */ - var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? - s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; - - var _win = s.window; // shortcut - - var wmask = s.w_mask; - var prev = s.prev; - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if (nice_match > s.lookahead) { nice_match = s.lookahead; } - - // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - // Assert(cur_match < s->strstart, "no future"); - match = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ - - if (_win[match + best_len] !== scan_end || - _win[match + best_len - 1] !== scan_end1 || - _win[match] !== _win[scan] || - _win[++match] !== _win[scan + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2; - match++; - // Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - /*jshint noempty:false*/ - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - scan < strend); - - // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; -} - - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - - //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = s.window_size - s.lookahead - s.strstart; - - // JS ints have 32 bit, block below not needed - /* Deal with !@#$% 64K limit: */ - //if (sizeof(int) <= 2) { - // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - // more = wsize; - // - // } else if (more == (unsigned)(-1)) { - // /* Very unlikely, but possible on 16 bit machine if - // * strstart == 0 && lookahead == 1 (input done a byte at time) - // */ - // more--; - // } - //} - - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - /* we now have strstart >= MAX_DIST */ - s.block_start -= _w_size; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= _w_size ? m - _w_size : 0); - } while (--n); - - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= _w_size ? m - _w_size : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); - - more += _w_size; - } - if (s.strm.avail_in === 0) { - break; - } - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - //Assert(more >= 2, "more < 2"); - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - - /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; -//#if MIN_MATCH != 3 -// Call update_hash() MIN_MATCH-3 more times -//#endif - while (s.insert) { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; - } - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ -// if (s.high_water < s.window_size) { -// var curr = s.strstart + s.lookahead; -// var init = 0; -// -// if (s.high_water < curr) { -// /* Previous high water mark below current data -- zero WIN_INIT -// * bytes or up to end of window, whichever is less. -// */ -// init = s.window_size - curr; -// if (init > WIN_INIT) -// init = WIN_INIT; -// zmemzero(s->window + curr, (unsigned)init); -// s->high_water = curr + init; -// } -// else if (s->high_water < (ulg)curr + WIN_INIT) { -// /* High water mark at or above current data, but below current data -// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up -// * to end of window, whichever is less. -// */ -// init = (ulg)curr + WIN_INIT - s->high_water; -// if (init > s->window_size - s->high_water) -// init = s->window_size - s->high_water; -// zmemzero(s->window + s->high_water, (unsigned)init); -// s->high_water += init; -// } -// } -// -// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, -// "not enough room for search"); -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -function deflate_stored(s, flush) { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - var max_block_size = 0xffff; - - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s.lookahead <= 1) { - - //Assert(s->strstart < s->w_size+MAX_DIST(s) || - // s->block_start >= (long)s->w_size, "slide too late"); -// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || -// s.block_start >= s.w_size)) { -// throw new Error("slide too late"); -// } - - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - - if (s.lookahead === 0) { - break; - } - /* flush the current block */ - } - //Assert(s->block_start >= 0L, "block gone"); -// if (s.block_start < 0) throw new Error("block gone"); - - s.strstart += s.lookahead; - s.lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - var max_start = s.block_start + max_block_size; - - if (s.strstart === 0 || s.strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - - - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - - s.insert = 0; - - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - - if (s.strstart > s.block_start) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_NEED_MORE; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -function deflate_fast(s, flush) { - var hash_head; /* head of the hash chain */ - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; /* flush the current block */ - } - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - } - if (s.match_length >= MIN_MATCH) { - // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only - - /*** _tr_tally_dist(s, s.strstart - s.match_start, - s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { - s.match_length--; /* string at strstart already in table */ - do { - s.strstart++; - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s.match_length !== 0); - s.strstart++; - } else - { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; - -//#if MIN_MATCH != 3 -// Call UPDATE_HASH() MIN_MATCH-3 more times -//#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s.window[s.strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -function deflate_slow(s, flush) { - var hash_head; /* head of hash chain */ - var bflush; /* set if current block must be flushed */ - - var max_insert; - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - */ - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH - 1; - - if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && - s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - - if (s.match_length <= 5 && - (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s.match_length = MIN_MATCH - 1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - //check_match(s, s.strstart-1, s.prev_match, s.prev_length); - - /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, - s.prev_length - MIN_MATCH, bflush);***/ - bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s.lookahead -= s.prev_length - 1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH - 1; - s.strstart++; - - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - } else if (s.match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - if (bflush) { - /*** FLUSH_BLOCK_ONLY(s, 0) ***/ - flush_block_only(s, false); - /***/ - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - //Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s.match_available) { - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_BLOCK_DONE; -} - - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -function deflate_rle(s, flush) { - var bflush; /* set if current block must be flushed */ - var prev; /* byte at distance one to match */ - var scan, strend; /* scan goes up to strend for length of run */ - - var _win = s.window; - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - /*jshint noempty:false*/ - } while (prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; - } - } - //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s.match_length >= MIN_MATCH) { - //check_match(s, s.strstart, s.strstart - 1, s.match_length); - - /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -function deflate_huff(s, flush) { - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s.match_length = 0; - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -function Config(good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; -} - -var configuration_table; - -configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), /* 3 */ - - new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ -]; - - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -function lm_init(s) { - s.window_size = 2 * s.w_size; - - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - - /* Set the default configuration parameters: - */ - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; -} - - -function DeflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.status = 0; /* as the name implies */ - this.pending_buf = null; /* output still pending */ - this.pending_buf_size = 0; /* size of pending_buf */ - this.pending_out = 0; /* next pending byte to output to the stream */ - this.pending = 0; /* nb of bytes in the pending buffer */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.gzhead = null; /* gzip header information to write */ - this.gzindex = 0; /* where in extra, name, or comment */ - this.method = Z_DEFLATED; /* can only be DEFLATED */ - this.last_flush = -1; /* value of flush param for previous deflate call */ - - this.w_size = 0; /* LZ77 window size (32K by default) */ - this.w_bits = 0; /* log2(w_size) (8..16) */ - this.w_mask = 0; /* w_size - 1 */ - - this.window = null; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. - */ - - this.window_size = 0; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - this.prev = null; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - this.head = null; /* Heads of the hash chains or NIL. */ - - this.ins_h = 0; /* hash index of string to be inserted */ - this.hash_size = 0; /* number of elements in hash table */ - this.hash_bits = 0; /* log2(hash_size) */ - this.hash_mask = 0; /* hash_size-1 */ - - this.hash_shift = 0; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - this.block_start = 0; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - this.match_length = 0; /* length of best match */ - this.prev_match = 0; /* previous match */ - this.match_available = 0; /* set if previous match exists */ - this.strstart = 0; /* start of string to insert */ - this.match_start = 0; /* start of matching string */ - this.lookahead = 0; /* number of valid bytes ahead in window */ - - this.prev_length = 0; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - this.max_chain_length = 0; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - this.max_lazy_match = 0; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ - // That's alias to max_lazy_match, don't use directly - //this.max_insert_length = 0; - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - this.level = 0; /* compression level (1..9) */ - this.strategy = 0; /* favor or force Huffman coding*/ - - this.good_match = 0; - /* Use a faster search when the previous match is longer than this */ - - this.nice_match = 0; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - - /* Didn't use ct_data typedef below to suppress compiler warning */ - - // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - // Use flat array of DOUBLE size, with interleaved fata, - // because JS does not support effective - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); - this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - - this.l_desc = null; /* desc. for literal tree */ - this.d_desc = null; /* desc. for distance tree */ - this.bl_desc = null; /* desc. for bit length tree */ - - //ush bl_count[MAX_BITS+1]; - this.bl_count = new utils.Buf16(MAX_BITS + 1); - /* number of codes at each bit length for an optimal tree */ - - //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ - zero(this.heap); - - this.heap_len = 0; /* number of elements in the heap */ - this.heap_max = 0; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; - zero(this.depth); - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - this.l_buf = 0; /* buffer index for literals or lengths */ - - this.lit_bufsize = 0; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - this.last_lit = 0; /* running index in l_buf */ - - this.d_buf = 0; - /* Buffer index for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - this.opt_len = 0; /* bit length of current block with optimal trees */ - this.static_len = 0; /* bit length of current block with static trees */ - this.matches = 0; /* number of string matches in current block */ - this.insert = 0; /* bytes at end of window left to insert */ - - - this.bi_buf = 0; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - this.bi_valid = 0; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - // Used for window memory init. We safely ignore it for JS. That makes - // sense only for pointers and memory check tools. - //this.high_water = 0; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ -} - - -function deflateResetKeep(strm) { - var s; - - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; - - s = strm.state; - s.pending = 0; - s.pending_out = 0; - - if (s.wrap < 0) { - s.wrap = -s.wrap; - /* was made negative by deflate(..., Z_FINISH); */ - } - s.status = (s.wrap ? INIT_STATE : BUSY_STATE); - strm.adler = (s.wrap === 2) ? - 0 // crc32(0, Z_NULL, 0) - : - 1; // adler32(0, Z_NULL, 0) - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; -} - - -function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; -} - - -function deflateSetHeader(strm, head) { - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } - strm.state.gzhead = head; - return Z_OK; -} - - -function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { // === Z_NULL - return Z_STREAM_ERROR; - } - var wrap = 1; - - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } - - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } - - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } - - - if (windowBits === 8) { - windowBits = 9; - } - /* until 256-byte window bug fixed */ - - var s = new DeflateState(); - - strm.state = s; - s.strm = strm; - - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); - - // Don't need mem init magic for JS. - //s.high_water = 0; /* nothing written to s->window yet */ - - s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - s.pending_buf_size = s.lit_bufsize * 4; - - //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); - //s->pending_buf = (uchf *) overlay; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - - // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) - //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); - s.d_buf = 1 * s.lit_bufsize; - - //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; - s.l_buf = (1 + 2) * s.lit_bufsize; - - s.level = level; - s.strategy = strategy; - s.method = method; - - return deflateReset(strm); -} - -function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -} - - -function deflate(strm, flush) { - var old_flush, s; - var beg, val; // for gzip header write only - - if (!strm || !strm.state || - flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } - - s = strm.state; - - if (!strm.output || - (!strm.input && strm.avail_in !== 0) || - (s.status === FINISH_STATE && flush !== Z_FINISH)) { - return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); - } - - s.strm = strm; /* just in case */ - old_flush = s.last_flush; - s.last_flush = flush; - - /* Write the header */ - if (s.status === INIT_STATE) { - - if (s.wrap === 2) { // GZIP header - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } - else // DEFLATE header - { - var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - var level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - - s.status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - } - } - -//#ifdef GZIP - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - - while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } - } - put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } - else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } - else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } - else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - } - } - else { - s.status = BUSY_STATE; - } - } -//#endif - - /* Flush as much pending output as possible */ - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s.last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && - flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm.avail_in !== 0 || s.lookahead !== 0 || - (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : - (s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush)); - - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } - else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - - trees._tr_stored_block(s, 0, 0, false); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush === Z_FULL_FLUSH) { - /*** CLEAR_HASH(s); ***/ /* forget history */ - zero(s.head); // Fill with NIL (= 0); - - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - //Assert(strm->avail_out > 0, "bug2"); - //if (strm.avail_out <= 0) { throw new Error("bug2");} - - if (flush !== Z_FINISH) { return Z_OK; } - if (s.wrap <= 0) { return Z_STREAM_END; } - - /* Write the trailer */ - if (s.wrap === 2) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - put_byte(s, (strm.adler >> 16) & 0xff); - put_byte(s, (strm.adler >> 24) & 0xff); - put_byte(s, strm.total_in & 0xff); - put_byte(s, (strm.total_in >> 8) & 0xff); - put_byte(s, (strm.total_in >> 16) & 0xff); - put_byte(s, (strm.total_in >> 24) & 0xff); - } - else - { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s.wrap > 0) { s.wrap = -s.wrap; } - /* write the trailer only once! */ - return s.pending !== 0 ? Z_OK : Z_STREAM_END; -} - -function deflateEnd(strm) { - var status; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - status = strm.state.status; - if (status !== INIT_STATE && - status !== EXTRA_STATE && - status !== NAME_STATE && - status !== COMMENT_STATE && - status !== HCRC_STATE && - status !== BUSY_STATE && - status !== FINISH_STATE - ) { - return err(strm, Z_STREAM_ERROR); - } - - strm.state = null; - - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; -} - - -/* ========================================================================= - * Initializes the compression dictionary from the given byte - * sequence without producing any compressed output. - */ -function deflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var s; - var str, n; - var wrap; - var avail; - var next; - var input; - var tmpDict; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - s = strm.state; - wrap = s.wrap; - - if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { - return Z_STREAM_ERROR; - } - - /* when using zlib wrappers, compute Adler-32 for provided dictionary */ - if (wrap === 1) { - /* adler32(strm->adler, dictionary, dictLength); */ - strm.adler = adler32(strm.adler, dictionary, dictLength, 0); - } - - s.wrap = 0; /* avoid computing Adler-32 in read_buf */ - - /* if dictionary would fill window, just replace the history */ - if (dictLength >= s.w_size) { - if (wrap === 0) { /* already empty otherwise */ - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - /* use the tail */ - // dictionary = dictionary.slice(dictLength - s.w_size); - tmpDict = new utils.Buf8(s.w_size); - utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); - dictionary = tmpDict; - dictLength = s.w_size; - } - /* insert dictionary into window and hash */ - avail = strm.avail_in; - next = strm.next_in; - input = strm.input; - strm.avail_in = dictLength; - strm.next_in = 0; - strm.input = dictionary; - fill_window(s); - while (s.lookahead >= MIN_MATCH) { - str = s.strstart; - n = s.lookahead - (MIN_MATCH - 1); - do { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - - s.head[s.ins_h] = str; - str++; - } while (--n); - s.strstart = str; - s.lookahead = MIN_MATCH - 1; - fill_window(s); - } - s.strstart += s.lookahead; - s.block_start = s.strstart; - s.insert = s.lookahead; - s.lookahead = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - strm.next_in = next; - strm.input = input; - strm.avail_in = avail; - s.wrap = wrap; - return Z_OK; -} - - -exports.deflateInit = deflateInit; -exports.deflateInit2 = deflateInit2; -exports.deflateReset = deflateReset; -exports.deflateResetKeep = deflateResetKeep; -exports.deflateSetHeader = deflateSetHeader; -exports.deflate = deflate; -exports.deflateEnd = deflateEnd; -exports.deflateSetDictionary = deflateSetDictionary; -exports.deflateInfo = 'pako deflate (from Nodeca project)'; - -/* Not implemented -exports.deflateBound = deflateBound; -exports.deflateCopy = deflateCopy; -exports.deflateParams = deflateParams; -exports.deflatePending = deflatePending; -exports.deflatePrime = deflatePrime; -exports.deflateTune = deflateTune; -*/ - -},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -module.exports = { - 2: 'need dictionary', /* Z_NEED_DICT 2 */ - 1: 'stream end', /* Z_STREAM_END 1 */ - 0: '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; - -},{}],7:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -/* eslint-disable space-unary-ops */ - -var utils = require('../utils/common'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -//var Z_FILTERED = 1; -//var Z_HUFFMAN_ONLY = 2; -//var Z_RLE = 3; -var Z_FIXED = 4; -//var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -var Z_BINARY = 0; -var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - -/*============================================================================*/ - - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - -// From zutil.h - -var STORED_BLOCK = 0; -var STATIC_TREES = 1; -var DYN_TREES = 2; -/* The three kinds of block type */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -/* The minimum and maximum match lengths */ - -// From deflate.h -/* =========================================================================== - * Internal compression state. - */ - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ - -var LITERALS = 256; -/* number of literal bytes 0..255 */ - -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ - -var D_CODES = 30; -/* number of distance codes */ - -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ - -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ - -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var Buf_size = 16; -/* size of bit buffer in bi_buf */ - - -/* =========================================================================== - * Constants - */ - -var MAX_BL_BITS = 7; -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -var END_BLOCK = 256; -/* end of block literal code */ - -var REP_3_6 = 16; -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -var REPZ_3_10 = 17; -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -var REPZ_11_138 = 18; -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -/* eslint-disable comma-spacing,array-bracket-spacing */ -var extra_lbits = /* extra bits for each length code */ - [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; - -var extra_dbits = /* extra bits for each distance code */ - [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; - -var extra_blbits = /* extra bits for each bit length code */ - [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; - -var bl_order = - [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; -/* eslint-enable comma-spacing,array-bracket-spacing */ - -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -// We pre-fill arrays with 0 to avoid uninitialized gaps - -var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ - -// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1 -var static_ltree = new Array((L_CODES + 2) * 2); -zero(static_ltree); -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -var static_dtree = new Array(D_CODES * 2); -zero(static_dtree); -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -var _dist_code = new Array(DIST_CODE_LEN); -zero(_dist_code); -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); -zero(_length_code); -/* length code for each normalized match length (0 == MIN_MATCH) */ - -var base_length = new Array(LENGTH_CODES); -zero(base_length); -/* First normalized length for each code (0 = MIN_MATCH) */ - -var base_dist = new Array(D_CODES); -zero(base_dist); -/* First normalized distance for each code (0 = distance of 1) */ - - -function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { - - this.static_tree = static_tree; /* static tree or NULL */ - this.extra_bits = extra_bits; /* extra bits for each code or NULL */ - this.extra_base = extra_base; /* base index for extra_bits */ - this.elems = elems; /* max number of elements in the tree */ - this.max_length = max_length; /* max bit length for the codes */ - - // show if `static_tree` has data or dummy - needed for monomorphic objects - this.has_stree = static_tree && static_tree.length; -} - - -var static_l_desc; -var static_d_desc; -var static_bl_desc; - - -function TreeDesc(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; /* the dynamic tree */ - this.max_code = 0; /* largest code with non zero frequency */ - this.stat_desc = stat_desc; /* the corresponding static tree */ -} - - - -function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; -} - - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -function put_short(s, w) { -// put_byte(s, (uch)((w) & 0xff)); -// put_byte(s, (uch)((ush)(w) >> 8)); - s.pending_buf[s.pending++] = (w) & 0xff; - s.pending_buf[s.pending++] = (w >>> 8) & 0xff; -} - - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -function send_bits(s, value, length) { - if (s.bi_valid > (Buf_size - length)) { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - put_short(s, s.bi_buf); - s.bi_buf = value >> (Buf_size - s.bi_valid); - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - s.bi_valid += length; - } -} - - -function send_code(s, c, tree) { - send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); -} - - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; -} - - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 0xff; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } -} - - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -function gen_bitlen(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; /* heap index */ - var n, m; /* iterate over the tree elements */ - var bits; /* bit length */ - var xbits; /* extra bits */ - var f; /* frequency */ - var overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ - - for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n * 2 + 1]/*.Len*/ = bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) { continue; } /* not a leaf node */ - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n - base]; - } - f = tree[n * 2]/*.Freq*/; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); - } - } - if (overflow === 0) { return; } - - // Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length - 1; - while (s.bl_count[bits] === 0) { bits--; } - s.bl_count[bits]--; /* move one leaf down the tree */ - s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ - s.bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { continue; } - if (tree[m * 2 + 1]/*.Len*/ !== bits) { - // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; - tree[m * 2 + 1]/*.Len*/ = bits; - } - n--; - } - } -} - - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -function gen_codes(tree, max_code, bl_count) -// ct_data *tree; /* the tree to decorate */ -// int max_code; /* largest code with non zero frequency */ -// ushf *bl_count; /* number of codes at each bit length */ -{ - var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ - var code = 0; /* running code value */ - var bits; /* bit index */ - var n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits - 1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES - 1; code++) { - base_length[code] = length; - for (n = 0; n < (1 << extra_lbits[code]); n++) { - _length_code[length++] = code; - } - } - //Assert (length == 256, "tr_static_init: length != 256"); - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - _length_code[length - 1] = code; - - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1 << extra_dbits[code]); n++) { - _dist_code[dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: dist != 256"); - dist >>= 7; /* from now on, all distances are divided by 128 */ - for (; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { - _dist_code[256 + dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } - - n = 0; - while (n <= 143) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n * 2 + 1]/*.Len*/ = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n * 2 + 1]/*.Len*/ = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes(static_ltree, L_CODES + 1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n * 2 + 1]/*.Len*/ = 5; - static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); - } - - // Now data ready and we can init static trees - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - - //static_init_done = true; -} - - -/* =========================================================================== - * Initialize a new block. - */ -function init_block(s) { - var n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } - - s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; -} - - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -function bi_windup(s) -{ - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - //put_byte(s, (Byte)s->bi_buf); - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -function copy_block(s, buf, len, header) -//DeflateState *s; -//charf *buf; /* the input data */ -//unsigned len; /* its length */ -//int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, len); - put_short(s, ~len); - } -// while (len--) { -// put_byte(s, *buf++); -// } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -function smaller(tree, n, m, depth) { - var _n2 = n * 2; - var _m2 = m * 2; - return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || - (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); -} - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -function pqdownheap(s, tree, k) -// deflate_state *s; -// ct_data *tree; /* the tree to restore */ -// int k; /* node to move down */ -{ - var v = s.heap[k]; - var j = k << 1; /* left son of k */ - while (j <= s.heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s.heap_len && - smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s.heap[j], s.depth)) { break; } - - /* Exchange v with the smallest son */ - s.heap[k] = s.heap[j]; - k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s.heap[k] = v; -} - - -// inlined manually -// var SMALLEST = 1; - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -function compress_block(s, ltree, dtree) -// deflate_state *s; -// const ct_data *ltree; /* literal tree */ -// const ct_data *dtree; /* distance tree */ -{ - var dist; /* distance of matched string */ - var lc; /* match length or unmatched char (if dist == 0) */ - var lx = 0; /* running index in l_buf */ - var code; /* the code to send */ - var extra; /* number of extra bits to send */ - - if (s.last_lit !== 0) { - do { - dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); - lc = s.pending_buf[s.l_buf + lx]; - lx++; - - if (dist === 0) { - send_code(s, lc, ltree); /* send a literal byte */ - //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code + LITERALS + 1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - //Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - // "pendingBuf overflow"); - - } while (lx < s.last_lit); - } - - send_code(s, END_BLOCK, ltree); -} - - -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -function build_tree(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; /* iterate over heap elements */ - var max_code = -1; /* largest code with non zero frequency */ - var node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s.heap_len = 0; - s.heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n * 2]/*.Freq*/ !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; - - } else { - tree[n * 2 + 1]/*.Len*/ = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); - tree[node * 2]/*.Freq*/ = 1; - s.depth[node] = 0; - s.opt_len--; - - if (has_stree) { - s.static_len -= stree[node * 2 + 1]/*.Len*/; - } - /* node is 0 or 1 so it does not have extra bits */ - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - //pqremove(s, tree, n); /* n = node of least frequency */ - /*** pqremove ***/ - n = s.heap[1/*SMALLEST*/]; - s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; - pqdownheap(s, tree, 1/*SMALLEST*/); - /***/ - - m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ - - s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ - s.heap[--s.heap_max] = m; - - /* Create a new node father of n and m */ - tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; - - /* and insert the new node in the heap */ - s.heap[1/*SMALLEST*/] = node++; - pqdownheap(s, tree, 1/*SMALLEST*/); - - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes(tree, max_code, s.bl_count); -} - - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -function scan_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - s.bl_tree[curlen * 2]/*.Freq*/ += count; - - } else if (curlen !== 0) { - - if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } - s.bl_tree[REP_3_6 * 2]/*.Freq*/++; - - } else if (count <= 10) { - s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; - - } else { - s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; - } - - count = 0; - prevlen = curlen; - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -function send_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); - - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - //Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count - 3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count - 3, 3); - - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count - 11, 7); - } - - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -function build_bl_tree(s) { - var max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, s.bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { - break; - } - } - /* Update opt_len to include the bit length tree and counts */ - s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - // s->opt_len, s->static_len)); - - return max_blindex; -} - - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -function send_all_trees(s, lcodes, dcodes, blcodes) -// deflate_state *s; -// int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - var rank; /* index in bl_order */ - - //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - // "too many codes"); - //Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes - 1, 5); - send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); - } - //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ - //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ - //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -function detect_data_type(s) { - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - var black_mask = 0xf3ffc07f; - var n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { - return Z_BINARY; - } - } - - /* Check for textual ("white-listed") bytes. */ - if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || - s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - } - - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - - -var static_init_done = false; - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -function _tr_init(s) -{ - - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - - s.bi_buf = 0; - s.bi_valid = 0; - - /* Initialize the first block of the first file: */ - init_block(s); -} - - -/* =========================================================================== - * Send a stored block - */ -function _tr_stored_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ - copy_block(s, buf, stored_len, true); /* with header */ -} - - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -function _tr_align(s) { - send_bits(s, STATIC_TREES << 1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); -} - - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ -function _tr_flush_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block, or NULL if too old */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - var max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s.level > 0) { - - /* Check if the file is binary or text */ - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - - /* Construct the literal and distance trees */ - build_tree(s, s.l_desc); - // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - - build_tree(s, s.d_desc); - // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s.opt_len + 3 + 7) >>> 3; - static_lenb = (s.static_len + 3 + 7) >>> 3; - - // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->last_lit)); - - if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } - - } else { - // Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - - if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { - /* 4: two words for the lengths */ - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { - - send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); - - } else { - send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); - } - // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - // s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -function _tr_tally(s, dist, lc) -// deflate_state *s; -// unsigned dist; /* distance of matched string */ -// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - //var out_length, in_length, dcode; - - s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; - - s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; - s.last_lit++; - - if (dist === 0) { - /* lc is the unmatched char */ - s.dyn_ltree[lc * 2]/*.Freq*/++; - } else { - s.matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - //Assert((ush)dist < (ush)MAX_DIST(s) && - // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; - s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; - } - -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility - -//#ifdef TRUNCATE_BLOCK -// /* Try to guess if it is profitable to stop the current block here */ -// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { -// /* Compute an upper bound for the compressed length */ -// out_length = s.last_lit*8; -// in_length = s.strstart - s.block_start; -// -// for (dcode = 0; dcode < D_CODES; dcode++) { -// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); -// } -// out_length >>>= 3; -// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", -// // s->last_lit, in_length, out_length, -// // 100L - out_length*100L/in_length)); -// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { -// return true; -// } -// } -//#endif - - return (s.last_lit === s.lit_bufsize - 1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -exports._tr_init = _tr_init; -exports._tr_stored_block = _tr_stored_block; -exports._tr_flush_block = _tr_flush_block; -exports._tr_tally = _tr_tally; -exports._tr_align = _tr_align; - -},{"../utils/common":1}],8:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; - -},{}],"/lib/deflate.js":[function(require,module,exports){ -'use strict'; - - -var zlib_deflate = require('./zlib/deflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); - -var toString = Object.prototype.toString; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - -var Z_NO_FLUSH = 0; -var Z_FINISH = 4; - -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_SYNC_FLUSH = 2; - -var Z_DEFAULT_COMPRESSION = -1; - -var Z_DEFAULT_STRATEGY = 0; - -var Z_DEFLATED = 8; - -/* ===========================================================================*/ - - -/** - * class Deflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[deflate]], - * [[deflateRaw]] and [[gzip]]. - **/ - -/* internal - * Deflate.chunks -> Array - * - * Chunks of output data, if [[Deflate#onData]] not overridden. - **/ - -/** - * Deflate.result -> Uint8Array|Array - * - * Compressed result, generated by default [[Deflate#onData]] - * and [[Deflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Deflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Deflate.err -> Number - * - * Error code after deflate finished. 0 (Z_OK) on success. - * You will not need it in real life, because deflate errors - * are possible only on wrong options or bad `onData` / `onEnd` - * custom handlers. - **/ - -/** - * Deflate.msg -> String - * - * Error message, if [[Deflate.err]] != 0 - **/ - - -/** - * new Deflate(options) - * - options (Object): zlib deflate options. - * - * Creates new deflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `level` - * - `windowBits` - * - `memLevel` - * - `strategy` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw deflate - * - `gzip` (Boolean) - create gzip wrapper - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - `header` (Object) - custom header for gzip - * - `text` (Boolean) - true if compressed data believed to be text - * - `time` (Number) - modification time, unix timestamp - * - `os` (Number) - operation system code - * - `extra` (Array) - array of bytes with extra data (max 65536) - * - `name` (String) - file name (binary string) - * - `comment` (String) - comment (binary string) - * - `hcrc` (Boolean) - true if header crc should be added - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var deflate = new pako.Deflate({ level: 3}); - * - * deflate.push(chunk1, false); - * deflate.push(chunk2, true); // true -> last chunk - * - * if (deflate.err) { throw new Error(deflate.err); } - * - * console.log(deflate.result); - * ``` - **/ -function Deflate(options) { - if (!(this instanceof Deflate)) return new Deflate(options); - - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: '' - }, options || {}); - - var opt = this.options; - - if (opt.raw && (opt.windowBits > 0)) { - opt.windowBits = -opt.windowBits; - } - - else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { - opt.windowBits += 16; - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } - - if (opt.dictionary) { - var dict; - // Convert data if needed - if (typeof opt.dictionary === 'string') { - // If we need to compress text, change encoding to utf8. - dict = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(opt.dictionary); - } else { - dict = opt.dictionary; - } - - status = zlib_deflate.deflateSetDictionary(this.strm, dict); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - this._dict_set = true; - } -} - -/** - * Deflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be - * converted to utf8 byte sequence. - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. - * - * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with - * new compressed chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the compression context. - * - * On fail call [[Deflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * array format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Deflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - - if (this.ended) { return false; } - - _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // If we need to compress text, change encoding to utf8. - strm.input = strings.string2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ - - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { - if (this.options.to === 'string') { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - - // Finalize on the last chunk. - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === Z_SYNC_FLUSH) { - this.onEnd(Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Deflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): output data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Deflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Deflate#onEnd(status) -> Void - * - status (Number): deflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell deflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Deflate.prototype.onEnd = function (status) { - // On success - join - if (status === Z_OK) { - if (this.options.to === 'string') { - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * deflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * Compress `data` with deflate algorithm and `options`. - * - * Supported options are: - * - * - level - * - windowBits - * - memLevel - * - strategy - * - dictionary - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); - * - * console.log(pako.deflate(data)); - * ``` - **/ -function deflate(input, options) { - var deflator = new Deflate(options); - - deflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (deflator.err) { throw deflator.msg || msg[deflator.err]; } - - return deflator.result; -} - - -/** - * deflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); -} - - -/** - * gzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but create gzip wrapper instead of - * deflate one. - **/ -function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); -} - - -exports.Deflate = Deflate; -exports.deflate = deflate; -exports.deflateRaw = deflateRaw; -exports.gzip = gzip; - -},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js") -}); diff --git a/node_modules/pako/dist/pako_deflate.min.js b/node_modules/pako/dist/pako_deflate.min.js deleted file mode 100644 index 77925534..00000000 --- a/node_modules/pako/dist/pako_deflate.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=t()}}(function(){return function i(s,h,l){function o(e,t){if(!h[e]){if(!s[e]){var a="function"==typeof require&&require;if(!t&&a)return a(e,!0);if(_)return _(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var r=h[e]={exports:{}};s[e][0].call(r.exports,function(t){return o(s[e][1][t]||t)},r,r.exports,i,s,h,l)}return h[e].exports}for(var _="function"==typeof require&&require,t=0;t>>6:(a<65536?e[i++]=224|a>>>12:(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63),e[i++]=128|a>>>6&63),e[i++]=128|63&a);return e},a.buf2binstring=function(t){return _(t,t.length)},a.binstring2buf=function(t){for(var e=new l.Buf8(t.length),a=0,n=e.length;a>10&1023,h[n++]=56320|1023&r)}return _(h,n)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;0<=a&&128==(192&t[a]);)a--;return a<0?e:0===a?e:a+o[t[a]]>e?a:e}},{"./common":1}],3:[function(t,e,a){"use strict";e.exports=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){for(a-=s=2e3>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,n){var r=h,i=n+a;t^=-1;for(var s=n;s>>8^r[255&(t^e[s])];return-1^t}},{}],5:[function(t,e,a){"use strict";var l,u=t("../utils/common"),o=t("./trees"),f=t("./adler32"),c=t("./crc32"),n=t("./messages"),_=0,d=4,p=0,g=-2,m=-1,b=4,r=2,v=8,w=9,i=286,s=30,h=19,y=2*i+1,k=15,z=3,x=258,B=x+z+1,A=42,C=113,S=1,j=2,E=3,U=4;function D(t,e){return t.msg=n[e],e}function I(t){return(t<<1)-(4t.avail_out&&(a=t.avail_out),0!==a&&(u.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function T(t,e){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,q(t.strm)}function L(t,e){t.pending_buf[t.pending++]=e}function N(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function R(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-B?t.strstart-(t.w_size-B):0,o=t.window,_=t.w_mask,d=t.prev,u=t.strstart+x,f=o[i+s-1],c=o[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(o[(a=e)+s]===c&&o[a+s-1]===f&&o[a]===o[i]&&o[++a]===o[i+1]){i+=2,a++;do{}while(o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&o[++i]===o[++a]&&il&&0!=--r);return s<=t.lookahead?s:t.lookahead}function H(t){var e,a,n,r,i,s,h,l,o,_,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-B)){for(u.arraySet(t.window,t.window,d,d,0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;n=t.head[--e],t.head[e]=d<=n?n-d:0,--a;);for(e=a=d;n=t.prev[--e],t.prev[e]=d<=n?n-d:0,--a;);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,h=t.window,l=t.strstart+t.lookahead,o=r,_=void 0,_=s.avail_in,o<_&&(_=o),a=0===_?0:(s.avail_in-=_,u.arraySet(h,s.input,s.next_in,_,l),1===s.state.wrap?s.adler=f(s.adler,h,_,l):2===s.state.wrap&&(s.adler=c(s.adler,h,_,l)),s.next_in+=_,s.total_in+=_,_),t.lookahead+=a,t.lookahead+t.insert>=z)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<=z&&(t.ins_h=(t.ins_h<=z)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-z),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=z){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=z&&(t.ins_h=(t.ins_h<=z&&t.match_length<=t.prev_length){for(r=t.strstart+t.lookahead-z,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-z),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=r&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(H(t),0===t.lookahead&&e===_)return S;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,T(t,!1),0===t.strm.avail_out))return S;if(t.strstart-t.block_start>=t.w_size-B&&(T(t,!1),0===t.strm.avail_out))return S}return t.insert=0,e===d?(T(t,!0),0===t.strm.avail_out?E:U):(t.strstart>t.block_start&&(T(t,!1),t.strm.avail_out),S)}),new M(4,4,8,4,F),new M(4,5,16,8,F),new M(4,6,32,32,F),new M(4,4,16,16,K),new M(8,16,32,32,K),new M(8,16,128,128,K),new M(8,32,128,256,K),new M(32,128,258,1024,K),new M(32,258,258,4096,K)],a.deflateInit=function(t,e){return Q(t,e,v,15,8,0)},a.deflateInit2=Q,a.deflateReset=J,a.deflateResetKeep=G,a.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=e,p):g},a.deflate=function(t,e){var a,n,r,i;if(!t||!t.state||5>8&255),L(n,n.gzhead.time>>16&255),L(n,n.gzhead.time>>24&255),L(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),L(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(L(n,255&n.gzhead.extra.length),L(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=c(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(L(n,0),L(n,0),L(n,0),L(n,0),L(n,0),L(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),L(n,3),n.status=C);else{var s=v+(n.w_bits-8<<4)<<8;s|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(s|=32),s+=31-s%31,n.status=C,N(n,s),0!==n.strstart&&(N(n,t.adler>>>16),N(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(r=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),q(t),r=n.pending,n.pending!==n.pending_buf_size));)L(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),q(t),r=n.pending,n.pending===n.pending_buf_size)){i=1;break}L(n,i=n.gzindexr&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),0===i&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),q(t),r=n.pending,n.pending===n.pending_buf_size)){i=1;break}L(n,i=n.gzindexr&&(t.adler=c(t.adler,n.pending_buf,n.pending-r,r)),0===i&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&q(t),n.pending+2<=n.pending_buf_size&&(L(n,255&t.adler),L(n,t.adler>>8&255),t.adler=0,n.status=C)):n.status=C),0!==n.pending){if(q(t),0===t.avail_out)return n.last_flush=-1,p}else if(0===t.avail_in&&I(e)<=I(a)&&e!==d)return D(t,-5);if(666===n.status&&0!==t.avail_in)return D(t,-5);if(0!==t.avail_in||0!==n.lookahead||e!==_&&666!==n.status){var h=2===n.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(H(t),0===t.lookahead)){if(e===_)return S;break}if(t.match_length=0,a=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(T(t,!1),0===t.strm.avail_out))return S}return t.insert=0,e===d?(T(t,!0),0===t.strm.avail_out?E:U):t.last_lit&&(T(t,!1),0===t.strm.avail_out)?S:j}(n,e):3===n.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=x){if(H(t),t.lookahead<=x&&e===_)return S;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=z&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=z?(a=o._tr_tally(t,1,t.match_length-z),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(T(t,!1),0===t.strm.avail_out))return S}return t.insert=0,e===d?(T(t,!0),0===t.strm.avail_out?E:U):t.last_lit&&(T(t,!1),0===t.strm.avail_out)?S:j}(n,e):l[n.level].func(n,e);if(h!==E&&h!==U||(n.status=666),h===S||h===E)return 0===t.avail_out&&(n.last_flush=-1),p;if(h===j&&(1===e?o._tr_align(n):5!==e&&(o._tr_stored_block(n,0,0,!1),3===e&&(O(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),q(t),0===t.avail_out))return n.last_flush=-1,p}return e!==d?p:n.wrap<=0?1:(2===n.wrap?(L(n,255&t.adler),L(n,t.adler>>8&255),L(n,t.adler>>16&255),L(n,t.adler>>24&255),L(n,255&t.total_in),L(n,t.total_in>>8&255),L(n,t.total_in>>16&255),L(n,t.total_in>>24&255)):(N(n,t.adler>>>16),N(n,65535&t.adler)),q(t),0=a.w_size&&(0===i&&(O(a.head),a.strstart=0,a.block_start=0,a.insert=0),o=new u.Buf8(a.w_size),u.arraySet(o,e,_-a.w_size,a.w_size,0),e=o,_=a.w_size),s=t.avail_in,h=t.next_in,l=t.input,t.avail_in=_,t.next_in=0,t.input=e,H(a);a.lookahead>=z;){for(n=a.strstart,r=a.lookahead-(z-1);a.ins_h=(a.ins_h<>>7)]}function L(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function N(t,e,a){t.bi_valid>r-a?(t.bi_buf|=e<>r-t.bi_valid,t.bi_valid+=a-r):(t.bi_buf|=e<>>=1,a<<=1,0<--e;);return a>>>1}function F(t,e,a){var n,r,i=new Array(m+1),s=0;for(n=1;n<=m;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=H(i[h]++,h))}}function K(t){var e;for(e=0;e>1;1<=a;a--)G(t,i,a);for(r=l;a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],G(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,G(t,i,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,o=e.max_code,_=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=m;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a>=7;n>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return h;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return o;for(e=32;e>>3,(i=t.static_len+3+7>>>3)<=r&&(r=i)):r=i=a+5,a+4<=r&&-1!==e?Y(t,e,a,n):4===t.strategy||i===r?(N(t,2+(n?1:0),3),J(t,A,C)):(N(t,4+(n?1:0),3),function(t,e,a,n){var r;for(N(t,e-257,5),N(t,a-1,5),N(t,n-4,4),r=0;r>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(j[a]+d+1)]++,t.dyn_dtree[2*T(e)]++),t.last_lit===t.lit_bufsize-1},a._tr_align=function(t){var e;N(t,2,3),R(t,b,A),16===(e=t).bi_valid?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{"../utils/common":1}],8:[function(t,e,a){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/deflate.js":[function(t,e,a){"use strict";var s=t("./zlib/deflate"),h=t("./utils/common"),l=t("./utils/strings"),r=t("./zlib/messages"),i=t("./zlib/zstream"),o=Object.prototype.toString,_=0,d=-1,u=0,f=8;function c(t){if(!(this instanceof c))return new c(t);this.options=h.assign({level:d,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},t||{});var e=this.options;e.raw&&0= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // On Chrome, the arguments in a function call that are allowed is `65534`. - // If the length of the buffer is smaller than that, we can use this optimization, - // otherwise we will take a slower path. - if (len < 65534) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function (buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function (str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len * 2); - - for (out = 0, i = 0; i < len;) { - c = buf[i++]; - // quick process ascii - if (c < 0x80) { utf16buf[out++] = c; continue; } - - c_len = _utf8len[c]; - // skip 5 & 6 byte codes - if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function (buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max - 1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means buffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -},{"./common":1}],3:[function(require,module,exports){ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It isn't worth it to make additional optimizations as in original. -// Small size is preferable. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; - -},{}],4:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -module.exports = { - - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - - - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type -}; - -},{}],5:[function(require,module,exports){ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc ^= -1; - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; - -},{}],6:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function GZheader() { - /* true if compressed data believed to be text */ - this.text = 0; - /* modification time */ - this.time = 0; - /* extra flags (not used when writing a gzip file) */ - this.xflags = 0; - /* operating system */ - this.os = 0; - /* pointer to extra field or Z_NULL if none */ - this.extra = null; - /* extra field length (valid if extra != Z_NULL) */ - this.extra_len = 0; // Actually, we don't need it in JS, - // but leave for few code modifications - - // - // Setup limits is not necessary because in js we should not preallocate memory - // for inflate use constant limit in 65536 bytes - // - - /* space at extra (only when reading header) */ - // this.extra_max = 0; - /* pointer to zero-terminated file name or Z_NULL */ - this.name = ''; - /* space at name (only when reading header) */ - // this.name_max = 0; - /* pointer to zero-terminated comment or Z_NULL */ - this.comment = ''; - /* space at comment (only when reading header) */ - // this.comm_max = 0; - /* true if there was or will be a header crc */ - this.hcrc = 0; - /* true when done reading gzip header (not used when writing a gzip file) */ - this.done = false; -} - -module.exports = GZheader; - -},{}],7:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -// See state defs from inflate.js -var BAD = 30; /* got a data error -- remain here until reset */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state.mode === LEN - strm.avail_in >= 6 - strm.avail_out >= 258 - start >= strm.avail_out - state.bits < 8 - - On return, state.mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm.avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm.avail_out >= 258 for each loop to avoid checking for - output space. - */ -module.exports = function inflate_fast(strm, start) { - var state; - var _in; /* local strm.input */ - var last; /* have enough input while in < last */ - var _out; /* local strm.output */ - var beg; /* inflate()'s initial strm.output */ - var end; /* while out < end, enough space available */ -//#ifdef INFLATE_STRICT - var dmax; /* maximum distance from zlib header */ -//#endif - var wsize; /* window size or zero if not using window */ - var whave; /* valid bytes in the window */ - var wnext; /* window write index */ - // Use `s_window` instead `window`, avoid conflict with instrumentation tools - var s_window; /* allocated sliding window, if wsize != 0 */ - var hold; /* local strm.hold */ - var bits; /* local strm.bits */ - var lcode; /* local strm.lencode */ - var dcode; /* local strm.distcode */ - var lmask; /* mask for first level of length codes */ - var dmask; /* mask for first level of distance codes */ - var here; /* retrieved table entry */ - var op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - var len; /* match length, unused bytes */ - var dist; /* match distance */ - var from; /* where to copy match from */ - var from_source; - - - var input, output; // JS specific, because we have no pointers - - /* copy state to local variables */ - state = strm.state; - //here = state.here; - _in = strm.next_in; - input = strm.input; - last = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); -//#ifdef INFLATE_STRICT - dmax = state.dmax; -//#endif - wsize = state.wsize; - whave = state.whave; - wnext = state.wnext; - s_window = state.window; - hold = state.hold; - bits = state.bits; - lcode = state.lencode; - dcode = state.distcode; - lmask = (1 << state.lenbits) - 1; - dmask = (1 << state.distbits) - 1; - - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - - here = lcode[hold & lmask]; - - dolen: - for (;;) { // Goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - if (op === 0) { /* literal */ - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - output[_out++] = here & 0xffff/*here.val*/; - } - else if (op & 16) { /* length base */ - len = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & ((1 << op) - 1); - hold >>>= op; - bits -= op; - } - //Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - - dodist: - for (;;) { // goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - - if (op & 16) { /* distance base */ - dist = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & ((1 << op) - 1); -//#ifdef INFLATE_STRICT - if (dist > dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -//#endif - hold >>>= op; - bits -= op; - //Tracevv((stderr, "inflate: distance %u\n", dist)); - op = _out - beg; /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } - -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// if (len <= op - whave) { -// do { -// output[_out++] = 0; -// } while (--len); -// continue top; -// } -// len -= op - whave; -// do { -// output[_out++] = 0; -// } while (--op > whave); -// if (op === 0) { -// from = _out - dist; -// do { -// output[_out++] = output[from++]; -// } while (--len); -// continue top; -// } -//#endif - } - from = 0; // window index - from_source = s_window; - if (wnext === 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = 0; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } - else { - from = _out - dist; /* copy direct from output */ - do { /* minimum length is three */ - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } - else if ((op & 64) === 0) { /* 2nd level distance code */ - here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dodist; - } - else { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } - else if ((op & 64) === 0) { /* 2nd level length code */ - here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dolen; - } - else if (op & 32) { /* end-of-block */ - //Tracevv((stderr, "inflate: end of block\n")); - state.mode = TYPE; - break top; - } - else { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } while (_in < last && _out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - - /* update state and return */ - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); - strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); - state.hold = hold; - state.bits = bits; - return; -}; - -},{}],8:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var inflate_fast = require('./inffast'); -var inflate_table = require('./inftrees'); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -//var Z_NO_FLUSH = 0; -//var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -//var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - -/* The deflate compression method */ -var Z_DEFLATED = 8; - - -/* STATES ====================================================================*/ -/* ===========================================================================*/ - - -var HEAD = 1; /* i: waiting for magic header */ -var FLAGS = 2; /* i: waiting for method and flags (gzip) */ -var TIME = 3; /* i: waiting for modification time (gzip) */ -var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ -var EXLEN = 5; /* i: waiting for extra length (gzip) */ -var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ -var NAME = 7; /* i: waiting for end of file name (gzip) */ -var COMMENT = 8; /* i: waiting for end of comment (gzip) */ -var HCRC = 9; /* i: waiting for header crc (gzip) */ -var DICTID = 10; /* i: waiting for dictionary check value */ -var DICT = 11; /* waiting for inflateSetDictionary() call */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ -var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ -var STORED = 14; /* i: waiting for stored size (length and complement) */ -var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ -var COPY = 16; /* i/o: waiting for input or output to copy stored block */ -var TABLE = 17; /* i: waiting for dynamic block table lengths */ -var LENLENS = 18; /* i: waiting for code length code lengths */ -var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ -var LEN_ = 20; /* i: same as LEN below, but only first time in */ -var LEN = 21; /* i: waiting for length/lit/eob code */ -var LENEXT = 22; /* i: waiting for length extra bits */ -var DIST = 23; /* i: waiting for distance code */ -var DISTEXT = 24; /* i: waiting for distance extra bits */ -var MATCH = 25; /* o: waiting for output space to copy string */ -var LIT = 26; /* o: waiting for output space to write literal */ -var CHECK = 27; /* i: waiting for 32-bit check value */ -var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ -var DONE = 29; /* finished check, done -- remain here until reset */ -var BAD = 30; /* got a data error -- remain here until reset */ -var MEM = 31; /* got an inflate() memory error -- remain here until reset */ -var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ - -/* ===========================================================================*/ - - - -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_WBITS = MAX_WBITS; - - -function zswap32(q) { - return (((q >>> 24) & 0xff) + - ((q >>> 8) & 0xff00) + - ((q & 0xff00) << 8) + - ((q & 0xff) << 24)); -} - - -function InflateState() { - this.mode = 0; /* current inflate mode */ - this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib) */ - this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ - this.check = 0; /* protected copy of check value */ - this.total = 0; /* protected copy of output count */ - // TODO: may be {} - this.head = null; /* where to save gzip header information */ - - /* sliding window */ - this.wbits = 0; /* log base 2 of requested window size */ - this.wsize = 0; /* window size or zero if not using window */ - this.whave = 0; /* valid bytes in the window */ - this.wnext = 0; /* window write index */ - this.window = null; /* allocated sliding window, if needed */ - - /* bit accumulator */ - this.hold = 0; /* input bit accumulator */ - this.bits = 0; /* number of bits in "in" */ - - /* for string and stored block copying */ - this.length = 0; /* literal or length of data to copy */ - this.offset = 0; /* distance back to copy string from */ - - /* for table and code decoding */ - this.extra = 0; /* extra bits needed */ - - /* fixed and dynamic code tables */ - this.lencode = null; /* starting table for length/literal codes */ - this.distcode = null; /* starting table for distance codes */ - this.lenbits = 0; /* index bits for lencode */ - this.distbits = 0; /* index bits for distcode */ - - /* dynamic table building */ - this.ncode = 0; /* number of code length code lengths */ - this.nlen = 0; /* number of length code lengths */ - this.ndist = 0; /* number of distance code lengths */ - this.have = 0; /* number of code lengths in lens[] */ - this.next = null; /* next available space in codes[] */ - - this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ - this.work = new utils.Buf16(288); /* work area for code table building */ - - /* - because we don't have pointers in js, we use lencode and distcode directly - as buffers so we don't need codes - */ - //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ - this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ - this.distdyn = null; /* dynamic table for distance codes (JS specific) */ - this.sane = 0; /* if false, allow invalid distance too far */ - this.back = 0; /* bits back of last unprocessed length/lit */ - this.was = 0; /* initial length of match */ -} - -function inflateResetKeep(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - strm.total_in = strm.total_out = state.total = 0; - strm.msg = ''; /*Z_NULL*/ - if (state.wrap) { /* to support ill-conceived Java test suite */ - strm.adler = state.wrap & 1; - } - state.mode = HEAD; - state.last = 0; - state.havedict = 0; - state.dmax = 32768; - state.head = null/*Z_NULL*/; - state.hold = 0; - state.bits = 0; - //state.lencode = state.distcode = state.next = state.codes; - state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); - state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); - - state.sane = 1; - state.back = -1; - //Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -function inflateReset(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - state.wsize = 0; - state.whave = 0; - state.wnext = 0; - return inflateResetKeep(strm); - -} - -function inflateReset2(strm, windowBits) { - var wrap; - var state; - - /* get the state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; - } - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state.window !== null && state.wbits !== windowBits) { - state.window = null; - } - - /* update state and reset the rest of it */ - state.wrap = wrap; - state.wbits = windowBits; - return inflateReset(strm); -} - -function inflateInit2(strm, windowBits) { - var ret; - var state; - - if (!strm) { return Z_STREAM_ERROR; } - //strm.msg = Z_NULL; /* in case we return an error */ - - state = new InflateState(); - - //if (state === Z_NULL) return Z_MEM_ERROR; - //Tracev((stderr, "inflate: allocated\n")); - strm.state = state; - state.window = null/*Z_NULL*/; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null/*Z_NULL*/; - } - return ret; -} - -function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); -} - - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -var virgin = true; - -var lenfix, distfix; // We have no pointers in JS, so keep tables separate - -function fixedtables(state) { - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - var sym; - - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - - /* literal/length table */ - sym = 0; - while (sym < 144) { state.lens[sym++] = 8; } - while (sym < 256) { state.lens[sym++] = 9; } - while (sym < 280) { state.lens[sym++] = 7; } - while (sym < 288) { state.lens[sym++] = 8; } - - inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); - - /* distance table */ - sym = 0; - while (sym < 32) { state.lens[sym++] = 5; } - - inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); - - /* do this just once */ - virgin = false; - } - - state.lencode = lenfix; - state.lenbits = 9; - state.distcode = distfix; - state.distbits = 5; -} - - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -function updatewindow(strm, src, end, copy) { - var dist; - var state = strm.state; - - /* if it hasn't been done already, allocate space for the window */ - if (state.window === null) { - state.wsize = 1 << state.wbits; - state.wnext = 0; - state.whave = 0; - - state.window = new utils.Buf8(state.wsize); - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state.wsize) { - utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); - state.wnext = 0; - state.whave = state.wsize; - } - else { - dist = state.wsize - state.wnext; - if (dist > copy) { - dist = copy; - } - //zmemcpy(state->window + state->wnext, end - copy, dist); - utils.arraySet(state.window, src, end - copy, dist, state.wnext); - copy -= dist; - if (copy) { - //zmemcpy(state->window, end - copy, copy); - utils.arraySet(state.window, src, end - copy, copy, 0); - state.wnext = copy; - state.whave = state.wsize; - } - else { - state.wnext += dist; - if (state.wnext === state.wsize) { state.wnext = 0; } - if (state.whave < state.wsize) { state.whave += dist; } - } - } - return 0; -} - -function inflate(strm, flush) { - var state; - var input, output; // input/output buffers - var next; /* next input INDEX */ - var put; /* next output INDEX */ - var have, left; /* available input and output */ - var hold; /* bit buffer */ - var bits; /* bits in bit buffer */ - var _in, _out; /* save starting available input and output */ - var copy; /* number of stored or match bytes to copy */ - var from; /* where to copy match bytes from */ - var from_source; - var here = 0; /* current decoding table entry */ - var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) - //var last; /* parent table entry */ - var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) - var len; /* length to copy for repeats, bits to drop */ - var ret; /* return code */ - var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ - var opts; - - var n; // temporary var for NEED_BITS - - var order = /* permutation of code lengths */ - [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; - - - if (!strm || !strm.state || !strm.output || - (!strm.input && strm.avail_in !== 0)) { - return Z_STREAM_ERROR; - } - - state = strm.state; - if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ - - - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - _in = have; - _out = left; - ret = Z_OK; - - inf_leave: // goto emulation - for (;;) { - switch (state.mode) { - case HEAD: - if (state.wrap === 0) { - state.mode = TYPEDO; - break; - } - //=== NEEDBITS(16); - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - state.check = 0/*crc32(0L, Z_NULL, 0)*/; - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = FLAGS; - break; - } - state.flags = 0; /* expect zlib header */ - if (state.head) { - state.head.done = false; - } - if (!(state.wrap & 1) || /* check if zlib header allowed */ - (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { - strm.msg = 'incorrect header check'; - state.mode = BAD; - break; - } - if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// - len = (hold & 0x0f)/*BITS(4)*/ + 8; - if (state.wbits === 0) { - state.wbits = len; - } - else if (len > state.wbits) { - strm.msg = 'invalid window size'; - state.mode = BAD; - break; - } - state.dmax = 1 << len; - //Tracev((stderr, "inflate: zlib header ok\n")); - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = hold & 0x200 ? DICTID : TYPE; - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - break; - case FLAGS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.flags = hold; - if ((state.flags & 0xff) !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - if (state.flags & 0xe000) { - strm.msg = 'unknown header flags set'; - state.mode = BAD; - break; - } - if (state.head) { - state.head.text = ((hold >> 8) & 1); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = TIME; - /* falls through */ - case TIME: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.time = hold; - } - if (state.flags & 0x0200) { - //=== CRC4(state.check, hold) - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - hbuf[2] = (hold >>> 16) & 0xff; - hbuf[3] = (hold >>> 24) & 0xff; - state.check = crc32(state.check, hbuf, 4, 0); - //=== - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = OS; - /* falls through */ - case OS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.xflags = (hold & 0xff); - state.head.os = (hold >> 8); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state.flags & 0x0400) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length = hold; - if (state.head) { - state.head.extra_len = hold; - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - else if (state.head) { - state.head.extra = null/*Z_NULL*/; - } - state.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state.flags & 0x0400) { - copy = state.length; - if (copy > have) { copy = have; } - if (copy) { - if (state.head) { - len = state.head.extra_len - state.length; - if (!state.head.extra) { - // Use untyped array for more convenient processing later - state.head.extra = new Array(state.head.extra_len); - } - utils.arraySet( - state.head.extra, - input, - next, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - //zmemcpy(state.head.extra + len, next, - // len + copy > state.head.extra_max ? - // state.head.extra_max - len : copy); - } - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - state.length -= copy; - } - if (state.length) { break inf_leave; } - } - state.length = 0; - state.mode = NAME; - /* falls through */ - case NAME: - if (state.flags & 0x0800) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - // TODO: 2 or 1 bytes? - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.name_max*/)) { - state.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.name = null; - } - state.length = 0; - state.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state.flags & 0x1000) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.comm_max*/)) { - state.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.comment = null; - } - state.mode = HCRC; - /* falls through */ - case HCRC: - if (state.flags & 0x0200) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.check & 0xffff)) { - strm.msg = 'header crc mismatch'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - if (state.head) { - state.head.hcrc = ((state.flags >> 9) & 1); - state.head.done = true; - } - strm.adler = state.check = 0; - state.mode = TYPE; - break; - case DICTID: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - strm.adler = state.check = zswap32(hold); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = DICT; - /* falls through */ - case DICT: - if (state.havedict === 0) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - return Z_NEED_DICT; - } - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } - /* falls through */ - case TYPEDO: - if (state.last) { - //--- BYTEBITS() ---// - hold >>>= bits & 7; - bits -= bits & 7; - //---// - state.mode = CHECK; - break; - } - //=== NEEDBITS(3); */ - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.last = (hold & 0x01)/*BITS(1)*/; - //--- DROPBITS(1) ---// - hold >>>= 1; - bits -= 1; - //---// - - switch ((hold & 0x03)/*BITS(2)*/) { - case 0: /* stored block */ - //Tracev((stderr, "inflate: stored block%s\n", - // state.last ? " (last)" : "")); - state.mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - //Tracev((stderr, "inflate: fixed codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = LEN_; /* decode codes */ - if (flush === Z_TREES) { - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break inf_leave; - } - break; - case 2: /* dynamic block */ - //Tracev((stderr, "inflate: dynamic codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = TABLE; - break; - case 3: - strm.msg = 'invalid block type'; - state.mode = BAD; - } - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break; - case STORED: - //--- BYTEBITS() ---// /* go to byte boundary */ - hold >>>= bits & 7; - bits -= bits & 7; - //---// - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { - strm.msg = 'invalid stored block lengths'; - state.mode = BAD; - break; - } - state.length = hold & 0xffff; - //Tracev((stderr, "inflate: stored length %u\n", - // state.length)); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = COPY_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case COPY_: - state.mode = COPY; - /* falls through */ - case COPY: - copy = state.length; - if (copy) { - if (copy > have) { copy = have; } - if (copy > left) { copy = left; } - if (copy === 0) { break inf_leave; } - //--- zmemcpy(put, next, copy); --- - utils.arraySet(output, input, next, copy, put); - //---// - have -= copy; - next += copy; - left -= copy; - put += copy; - state.length -= copy; - break; - } - //Tracev((stderr, "inflate: stored end\n")); - state.mode = TYPE; - break; - case TABLE: - //=== NEEDBITS(14); */ - while (bits < 14) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// -//#ifndef PKZIP_BUG_WORKAROUND - if (state.nlen > 286 || state.ndist > 30) { - strm.msg = 'too many length or distance symbols'; - state.mode = BAD; - break; - } -//#endif - //Tracev((stderr, "inflate: table sizes ok\n")); - state.have = 0; - state.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state.have < state.ncode) { - //=== NEEDBITS(3); - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - while (state.have < 19) { - state.lens[order[state.have++]] = 0; - } - // We have separate tables & no pointers. 2 commented lines below not needed. - //state.next = state.codes; - //state.lencode = state.next; - // Switch to use dynamic table - state.lencode = state.lendyn; - state.lenbits = 7; - - opts = { bits: state.lenbits }; - ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); - state.lenbits = opts.bits; - - if (ret) { - strm.msg = 'invalid code lengths set'; - state.mode = BAD; - break; - } - //Tracev((stderr, "inflate: code lengths ok\n")); - state.have = 0; - state.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state.have < state.nlen + state.ndist) { - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_val < 16) { - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.lens[state.have++] = here_val; - } - else { - if (here_val === 16) { - //=== NEEDBITS(here.bits + 2); - n = here_bits + 2; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - if (state.have === 0) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - len = state.lens[state.have - 1]; - copy = 3 + (hold & 0x03);//BITS(2); - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - } - else if (here_val === 17) { - //=== NEEDBITS(here.bits + 3); - n = here_bits + 3; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 3 + (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - else { - //=== NEEDBITS(here.bits + 7); - n = here_bits + 7; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 11 + (hold & 0x7f);//BITS(7); - //--- DROPBITS(7) ---// - hold >>>= 7; - bits -= 7; - //---// - } - if (state.have + copy > state.nlen + state.ndist) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - while (copy--) { - state.lens[state.have++] = len; - } - } - } - - /* handle error breaks in while */ - if (state.mode === BAD) { break; } - - /* check for end-of-block code (better have one) */ - if (state.lens[256] === 0) { - strm.msg = 'invalid code -- missing end-of-block'; - state.mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state.lenbits = 9; - - opts = { bits: state.lenbits }; - ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.lenbits = opts.bits; - // state.lencode = state.next; - - if (ret) { - strm.msg = 'invalid literal/lengths set'; - state.mode = BAD; - break; - } - - state.distbits = 6; - //state.distcode.copy(state.codes); - // Switch to use dynamic table - state.distcode = state.distdyn; - opts = { bits: state.distbits }; - ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.distbits = opts.bits; - // state.distcode = state.next; - - if (ret) { - strm.msg = 'invalid distances set'; - state.mode = BAD; - break; - } - //Tracev((stderr, 'inflate: codes ok\n')); - state.mode = LEN_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case LEN_: - state.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - inflate_fast(strm, _out); - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - if (state.mode === TYPE) { - state.back = -1; - } - break; - } - state.back = 0; - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if (here_bits <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_op && (here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.lencode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - state.length = here_val; - if (here_op === 0) { - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - state.mode = LIT; - break; - } - if (here_op & 32) { - //Tracevv((stderr, "inflate: end of block\n")); - state.back = -1; - state.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break; - } - state.extra = here_op & 15; - state.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } - //Tracevv((stderr, "inflate: length %u\n", state.length)); - state.was = state.length; - state.mode = DIST; - /* falls through */ - case DIST: - for (;;) { - here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if ((here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.distcode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - if (here_op & 64) { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break; - } - state.offset = here_val; - state.extra = (here_op) & 15; - state.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } -//#ifdef INFLATE_STRICT - if (state.offset > state.dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -//#endif - //Tracevv((stderr, "inflate: distance %u\n", state.offset)); - state.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { break inf_leave; } - copy = _out - left; - if (state.offset > copy) { /* copy from window */ - copy = state.offset - copy; - if (copy > state.whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// Trace((stderr, "inflate.c too far\n")); -// copy -= state.whave; -// if (copy > state.length) { copy = state.length; } -// if (copy > left) { copy = left; } -// left -= copy; -// state.length -= copy; -// do { -// output[put++] = 0; -// } while (--copy); -// if (state.length === 0) { state.mode = LEN; } -// break; -//#endif - } - if (copy > state.wnext) { - copy -= state.wnext; - from = state.wsize - copy; - } - else { - from = state.wnext - copy; - } - if (copy > state.length) { copy = state.length; } - from_source = state.window; - } - else { /* copy from output */ - from_source = output; - from = put - state.offset; - copy = state.length; - } - if (copy > left) { copy = left; } - left -= copy; - state.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state.length === 0) { state.mode = LEN; } - break; - case LIT: - if (left === 0) { break inf_leave; } - output[put++] = state.length; - left--; - state.mode = LEN; - break; - case CHECK: - if (state.wrap) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - // Use '|' instead of '+' to make sure that result is signed - hold |= input[next++] << bits; - bits += 8; - } - //===// - _out -= left; - strm.total_out += _out; - state.total += _out; - if (_out) { - strm.adler = state.check = - /*UPDATE(state.check, put - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); - - } - _out = left; - // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too - if ((state.flags ? hold : zswap32(hold)) !== state.check) { - strm.msg = 'incorrect data check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: check matches trailer\n")); - } - state.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state.wrap && state.flags) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.total & 0xffffffff)) { - strm.msg = 'incorrect length check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: length matches trailer\n")); - } - state.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; - } - } - - // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - - if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && - (state.mode < CHECK || flush !== Z_FINISH))) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state.mode = MEM; - return Z_MEM_ERROR; - } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state.total += _out; - if (state.wrap && _out) { - strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); - } - strm.data_type = state.bits + (state.last ? 64 : 0) + - (state.mode === TYPE ? 128 : 0) + - (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); - if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; -} - -function inflateEnd(strm) { - - if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { - return Z_STREAM_ERROR; - } - - var state = strm.state; - if (state.window) { - state.window = null; - } - strm.state = null; - return Z_OK; -} - -function inflateGetHeader(strm, head) { - var state; - - /* check state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } - - /* save header structure */ - state.head = head; - head.done = false; - return Z_OK; -} - -function inflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var state; - var dictid; - var ret; - - /* check state */ - if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } - state = strm.state; - - if (state.wrap !== 0 && state.mode !== DICT) { - return Z_STREAM_ERROR; - } - - /* check for correct dictionary identifier */ - if (state.mode === DICT) { - dictid = 1; /* adler32(0, null, 0)*/ - /* dictid = adler32(dictid, dictionary, dictLength); */ - dictid = adler32(dictid, dictionary, dictLength, 0); - if (dictid !== state.check) { - return Z_DATA_ERROR; - } - } - /* copy dictionary to window using updatewindow(), which will amend the - existing dictionary if appropriate */ - ret = updatewindow(strm, dictionary, dictLength, dictLength); - if (ret) { - state.mode = MEM; - return Z_MEM_ERROR; - } - state.havedict = 1; - // Tracev((stderr, "inflate: dictionary set\n")); - return Z_OK; -} - -exports.inflateReset = inflateReset; -exports.inflateReset2 = inflateReset2; -exports.inflateResetKeep = inflateResetKeep; -exports.inflateInit = inflateInit; -exports.inflateInit2 = inflateInit2; -exports.inflate = inflate; -exports.inflateEnd = inflateEnd; -exports.inflateGetHeader = inflateGetHeader; -exports.inflateSetDictionary = inflateSetDictionary; -exports.inflateInfo = 'pako inflate (from Nodeca project)'; - -/* Not implemented -exports.inflateCopy = inflateCopy; -exports.inflateGetDictionary = inflateGetDictionary; -exports.inflateMark = inflateMark; -exports.inflatePrime = inflatePrime; -exports.inflateSync = inflateSync; -exports.inflateSyncPoint = inflateSyncPoint; -exports.inflateUndermine = inflateUndermine; -*/ - -},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); - -var MAXBITS = 15; -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -var lbase = [ /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 -]; - -var lext = [ /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 -]; - -var dbase = [ /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0 -]; - -var dext = [ /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64 -]; - -module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) -{ - var bits = opts.bits; - //here = opts.here; /* table entry for duplication */ - - var len = 0; /* a code's length in bits */ - var sym = 0; /* index of code symbols */ - var min = 0, max = 0; /* minimum and maximum code lengths */ - var root = 0; /* number of index bits for root table */ - var curr = 0; /* number of index bits for current table */ - var drop = 0; /* code bits to drop for sub-table */ - var left = 0; /* number of prefix codes available */ - var used = 0; /* code entries in table used */ - var huff = 0; /* Huffman code */ - var incr; /* for incrementing code, index */ - var fill; /* index for replicating entries */ - var low; /* low bits for current root entry */ - var mask; /* mask for low root bits */ - var next; /* next available space in table */ - var base = null; /* base value table to use */ - var base_index = 0; -// var shoextra; /* extra bits table to use */ - var end; /* use base and extra for symbol > end */ - var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ - var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ - var extra = null; - var extra_index = 0; - - var here_bits, here_op, here_val; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } - - /* bound code lengths, force root to be within code lengths */ - root = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { break; } - } - if (root > max) { - root = max; - } - if (max === 0) { /* no symbols to code at all */ - //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ - //table.bits[opts.table_index] = 1; //here.bits = (var char)1; - //table.val[opts.table_index++] = 0; //here.val = (var short)0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - - //table.op[opts.table_index] = 64; - //table.bits[opts.table_index] = 1; - //table.val[opts.table_index++] = 0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - opts.bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { break; } - } - if (root < min) { - root = min; - } - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } /* over-subscribed */ - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; /* incomplete set */ - } - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; - } - } - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - // poor man optimization - use if-else instead of switch, - // to avoid deopts in old v8 - if (type === CODES) { - base = extra = work; /* dummy value--not used */ - end = 19; - - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - - } else { /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize opts for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = table_index; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = -1; /* trigger new sub-table when len > root */ - used = 1 << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* process all codes and make table entries */ - for (;;) { - /* create table entry */ - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } - else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; - } - else { - here_op = 32 + 64; /* end of block */ - here_val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1 << (len - drop); - fill = 1 << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; - } while (fill !== 0); - - /* backwards increment the len-bit code huff */ - incr = 1 << (len - 1); - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } - - /* go to next symbol, update count, len */ - sym++; - if (--count[len] === 0) { - if (len === max) { break; } - len = lens[lens_index + work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) !== low) { - /* if first time, transition to sub-tables */ - if (drop === 0) { - drop = root; - } - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { break; } - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1 << curr; - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* point entry in root table to sub-table */ - low = huff & mask; - /*table.op[low] = curr; - table.bits[low] = root; - table.val[low] = next - opts.table_index;*/ - table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff !== 0) { - //table.op[next + huff] = 64; /* invalid code marker */ - //table.bits[next + huff] = len - drop; - //table.val[next + huff] = 0; - table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; - } - - /* set return parameters */ - //opts.table_index += used; - opts.bits = root; - return 0; -}; - -},{"../utils/common":1}],10:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -module.exports = { - 2: 'need dictionary', /* Z_NEED_DICT 2 */ - 1: 'stream end', /* Z_STREAM_END 1 */ - 0: '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; - -},{}],11:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; - -},{}],"/lib/inflate.js":[function(require,module,exports){ -'use strict'; - - -var zlib_inflate = require('./zlib/inflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var c = require('./zlib/constants'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); -var GZheader = require('./zlib/gzheader'); - -var toString = Object.prototype.toString; - -/** - * class Inflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] - * and [[inflateRaw]]. - **/ - -/* internal - * inflate.chunks -> Array - * - * Chunks of output data, if [[Inflate#onData]] not overridden. - **/ - -/** - * Inflate.result -> Uint8Array|Array|String - * - * Uncompressed result, generated by default [[Inflate#onData]] - * and [[Inflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Inflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Inflate.err -> Number - * - * Error code after inflate finished. 0 (Z_OK) on success. - * Should be checked if broken data possible. - **/ - -/** - * Inflate.msg -> String - * - * Error message, if [[Inflate.err]] != 0 - **/ - - -/** - * new Inflate(options) - * - options (Object): zlib inflate options. - * - * Creates new inflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `windowBits` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw inflate - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * By default, when no options set, autodetect deflate/gzip data format via - * wrapper header. - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var inflate = new pako.Inflate({ level: 3}); - * - * inflate.push(chunk1, false); - * inflate.push(chunk2, true); // true -> last chunk - * - * if (inflate.err) { throw new Error(inflate.err); } - * - * console.log(inflate.result); - * ``` - **/ -function Inflate(options) { - if (!(this instanceof Inflate)) return new Inflate(options); - - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: '' - }, options || {}); - - var opt = this.options; - - // Force window size for `raw` data, if not set directly, - // because we have no header for autodetect. - if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { opt.windowBits = -15; } - } - - // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate - if ((opt.windowBits >= 0) && (opt.windowBits < 16) && - !(options && options.windowBits)) { - opt.windowBits += 32; - } - - // Gzip header has no info about windows size, we can do autodetect only - // for deflate. So, if window size not set, force it to max when gzip possible - if ((opt.windowBits > 15) && (opt.windowBits < 48)) { - // bit 3 (16) -> gzipped data - // bit 4 (32) -> autodetect gzip/deflate - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - - this.header = new GZheader(); - - zlib_inflate.inflateGetHeader(this.strm, this.header); - - // Setup dictionary - if (opt.dictionary) { - // Convert data if needed - if (typeof opt.dictionary === 'string') { - opt.dictionary = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - opt.dictionary = new Uint8Array(opt.dictionary); - } - if (opt.raw) { //In raw mode we need to set the dictionary early - status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary); - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - } - } -} - -/** - * Inflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. - * - * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with - * new output chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the decompression context. - * - * On fail call [[Inflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Inflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var dictionary = this.options.dictionary; - var status, _mode; - var next_out_utf8, tail, utf8str; - - // Flag to properly process Z_BUF_ERROR on testing inflate call - // when we check that all output data was flushed. - var allowBufError = false; - - if (this.ended) { return false; } - _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // Only binary strings can be decompressed on practice - strm.input = strings.binstring2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ - - if (status === c.Z_NEED_DICT && dictionary) { - status = zlib_inflate.inflateSetDictionary(this.strm, dictionary); - } - - if (status === c.Z_BUF_ERROR && allowBufError === true) { - status = c.Z_OK; - allowBufError = false; - } - - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { - - if (this.options.to === 'string') { - - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - - // move tail - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } - - this.onData(utf8str); - - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - - // When no more input data, we should check that internal inflate buffers - // are flushed. The only way to do it when avail_out = 0 - run one more - // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. - // Here we set flag to process this error properly. - // - // NOTE. Deflate does not return error in this case and does not needs such - // logic. - if (strm.avail_in === 0 && strm.avail_out === 0) { - allowBufError = true; - } - - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); - - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - - // Finalize on the last chunk. - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === c.Z_SYNC_FLUSH) { - this.onEnd(c.Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Inflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): output data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Inflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Inflate#onEnd(status) -> Void - * - status (Number): inflate status. 0 (Z_OK) on success, - * other if not. - * - * Called either after you tell inflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Inflate.prototype.onEnd = function (status) { - // On success - join - if (status === c.Z_OK) { - if (this.options.to === 'string') { - // Glue & convert here, until we teach pako to send - // utf8 aligned strings to onData - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * inflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Decompress `data` with inflate/ungzip and `options`. Autodetect - * format via wrapper header by default. That's why we don't provide - * separate `ungzip` method. - * - * Supported options are: - * - * - windowBits - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) - * , output; - * - * try { - * output = pako.inflate(input); - * } catch (err) - * console.log(err); - * } - * ``` - **/ -function inflate(input, options) { - var inflator = new Inflate(options); - - inflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (inflator.err) { throw inflator.msg || msg[inflator.err]; } - - return inflator.result; -} - - -/** - * inflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * The same as [[inflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); -} - - -/** - * ungzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Just shortcut to [[inflate]], because it autodetects format - * by header.content. Done for convenience. - **/ - - -exports.Inflate = Inflate; -exports.inflate = inflate; -exports.inflateRaw = inflateRaw; -exports.ungzip = inflate; - -},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js") -}); diff --git a/node_modules/pako/dist/pako_inflate.min.js b/node_modules/pako/dist/pako_inflate.min.js deleted file mode 100644 index a191a78a..00000000 --- a/node_modules/pako/dist/pako_inflate.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=e()}}(function(){return function r(o,s,f){function l(t,e){if(!s[t]){if(!o[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(d)return d(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var a=s[t]={exports:{}};o[t][0].call(a.exports,function(e){return l(o[t][1][e]||e)},a,a.exports,r,o,s,f)}return s[t].exports}for(var d="function"==typeof require&&require,e=0;e>>6:(i<65536?t[r++]=224|i>>>12:(t[r++]=240|i>>>18,t[r++]=128|i>>>12&63),t[r++]=128|i>>>6&63),t[r++]=128|63&i);return t},i.buf2binstring=function(e){return d(e,e.length)},i.binstring2buf=function(e){for(var t=new f.Buf8(e.length),i=0,n=t.length;i>10&1023,s[n++]=56320|1023&a)}return d(s,n)},i.utf8border=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;0<=i&&128==(192&e[i]);)i--;return i<0?t:0===i?t:i+l[e[i]]>t?i:t}},{"./common":1}],3:[function(e,t,i){"use strict";t.exports=function(e,t,i,n){for(var a=65535&e|0,r=e>>>16&65535|0,o=0;0!==i;){for(i-=o=2e3>>1:e>>>1;t[i]=e}return t}();t.exports=function(e,t,i,n){var a=s,r=n+i;e^=-1;for(var o=n;o>>8^a[255&(e^t[o])];return-1^e}},{}],6:[function(e,t,i){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,i){"use strict";t.exports=function(e,t){var i,n,a,r,o,s,f,l,d,c,u,h,b,m,w,k,_,g,v,p,x,y,S,E,Z;i=e.state,n=e.next_in,E=e.input,a=n+(e.avail_in-5),r=e.next_out,Z=e.output,o=r-(t-e.avail_out),s=r+(e.avail_out-257),f=i.dmax,l=i.wsize,d=i.whave,c=i.wnext,u=i.window,h=i.hold,b=i.bits,m=i.lencode,w=i.distcode,k=(1<>>=v=g>>>24,b-=v,0===(v=g>>>16&255))Z[r++]=65535&g;else{if(!(16&v)){if(0==(64&v)){g=m[(65535&g)+(h&(1<>>=v,b-=v),b<15&&(h+=E[n++]<>>=v=g>>>24,b-=v,!(16&(v=g>>>16&255))){if(0==(64&v)){g=w[(65535&g)+(h&(1<>>=v,b-=v,(v=r-o)>3,h&=(1<<(b-=p<<3))-1,e.next_in=n,e.next_out=r,e.avail_in=n>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function r(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new z.Buf16(320),this.work=new z.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=F,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new z.Buf32(n),t.distcode=t.distdyn=new z.Buf32(a),t.sane=1,t.back=-1,T):U}function s(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,o(e)):U}function f(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=r.wsize?(z.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(n<(a=r.wsize-r.wnext)&&(a=n),z.arraySet(r.window,t,i-n,a,r.wnext),(n-=a)?(z.arraySet(r.window,t,i-n,n,0),r.wnext=n,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,i.check=N(i.check,B,2,0),d=l=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",i.mode=30;break}if(8!=(15&l)){e.msg="unknown compression method",i.mode=30;break}if(d-=4,x=8+(15&(l>>>=4)),0===i.wbits)i.wbits=x;else if(x>i.wbits){e.msg="invalid window size",i.mode=30;break}i.dmax=1<>8&1),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0)),d=l=0,i.mode=3;case 3:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<>>8&255,B[2]=l>>>16&255,B[3]=l>>>24&255,i.check=N(i.check,B,4,0)),d=l=0,i.mode=4;case 4:for(;d<16;){if(0===s)break e;s--,l+=n[r++]<>8),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0)),d=l=0,i.mode=5;case 5:if(1024&i.flags){for(;d<16;){if(0===s)break e;s--,l+=n[r++]<>>8&255,i.check=N(i.check,B,2,0)),d=l=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(s<(h=i.length)&&(h=s),h&&(i.head&&(x=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),z.arraySet(i.head.extra,n,r,h,x)),512&i.flags&&(i.check=N(i.check,n,h,r)),s-=h,r+=h,i.length-=h),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===s)break e;for(h=0;x=n[r+h++],i.head&&x&&i.length<65536&&(i.head.name+=String.fromCharCode(x)),x&&h>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=12;break;case 10:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<>>=7&d,d-=7&d,i.mode=27;break}for(;d<3;){if(0===s)break e;s--,l+=n[r++]<>>=1)){case 0:i.mode=14;break;case 1:if(H(i),i.mode=20,6!==t)break;l>>>=2,d-=2;break e;case 2:i.mode=17;break;case 3:e.msg="invalid block type",i.mode=30}l>>>=2,d-=2;break;case 14:for(l>>>=7&d,d-=7&d;d<32;){if(0===s)break e;s--,l+=n[r++]<>>16^65535)){e.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&l,d=l=0,i.mode=15,6===t)break e;case 15:i.mode=16;case 16:if(h=i.length){if(s>>=5,d-=5,i.ndist=1+(31&l),l>>>=5,d-=5,i.ncode=4+(15&l),l>>>=4,d-=4,286>>=3,d-=3}for(;i.have<19;)i.lens[A[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,S={bits:i.lenbits},y=C(0,i.lens,0,19,i.lencode,0,i.work,S),i.lenbits=S.bits,y){e.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=w,d-=w,i.lens[i.have++]=_;else{if(16===_){for(E=w+2;d>>=w,d-=w,0===i.have){e.msg="invalid bit length repeat",i.mode=30;break}x=i.lens[i.have-1],h=3+(3&l),l>>>=2,d-=2}else if(17===_){for(E=w+3;d>>=w)),l>>>=3,d-=3}else{for(E=w+7;d>>=w)),l>>>=7,d-=7}if(i.have+h>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=30;break}for(;h--;)i.lens[i.have++]=x}}if(30===i.mode)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,S={bits:i.lenbits},y=C(I,i.lens,0,i.nlen,i.lencode,0,i.work,S),i.lenbits=S.bits,y){e.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,S={bits:i.distbits},y=C(D,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,S),i.distbits=S.bits,y){e.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===t)break e;case 20:i.mode=21;case 21:if(6<=s&&258<=f){e.next_out=o,e.avail_out=f,e.next_in=r,e.avail_in=s,i.hold=l,i.bits=d,O(e,u),o=e.next_out,a=e.output,f=e.avail_out,r=e.next_in,n=e.input,s=e.avail_in,l=i.hold,d=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;k=(Z=i.lencode[l&(1<>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=g,d-=g,i.back+=g}if(l>>>=w,d-=w,i.back+=w,i.length=_,0===k){i.mode=26;break}if(32&k){i.back=-1,i.mode=12;break}if(64&k){e.msg="invalid literal/length code",i.mode=30;break}i.extra=15&k,i.mode=22;case 22:if(i.extra){for(E=i.extra;d>>=i.extra,d-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;k=(Z=i.distcode[l&(1<>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=g,d-=g,i.back+=g}if(l>>>=w,d-=w,i.back+=w,64&k){e.msg="invalid distance code",i.mode=30;break}i.offset=_,i.extra=15&k,i.mode=24;case 24:if(i.extra){for(E=i.extra;d>>=i.extra,d-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===f)break e;if(h=u-f,i.offset>h){if((h=i.offset-h)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=30;break}h>i.wnext?(h-=i.wnext,b=i.wsize-h):b=i.wnext-h,h>i.length&&(h=i.length),m=i.window}else m=a,b=o-i.offset,h=i.length;for(fh?(m=O[C+o[g]],w=A[z+o[g]]):(m=96,w=0),f=1<<_-S,v=l=1<>S)+(l-=f)]=b<<24|m<<16|w|0,0!==l;);for(f=1<<_-1;B&f;)f>>=1;if(0!==f?(B&=f-1,B+=f):B=0,g++,0==--R[_]){if(_===p)break;_=t[i+o[g]]}if(x<_&&(B&c)!==d){for(0===S&&(S=x),u+=v,E=1<<(y=_-S);y+S Array - * - * Chunks of output data, if [[Deflate#onData]] not overridden. - **/ - -/** - * Deflate.result -> Uint8Array|Array - * - * Compressed result, generated by default [[Deflate#onData]] - * and [[Deflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Deflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Deflate.err -> Number - * - * Error code after deflate finished. 0 (Z_OK) on success. - * You will not need it in real life, because deflate errors - * are possible only on wrong options or bad `onData` / `onEnd` - * custom handlers. - **/ - -/** - * Deflate.msg -> String - * - * Error message, if [[Deflate.err]] != 0 - **/ - - -/** - * new Deflate(options) - * - options (Object): zlib deflate options. - * - * Creates new deflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `level` - * - `windowBits` - * - `memLevel` - * - `strategy` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw deflate - * - `gzip` (Boolean) - create gzip wrapper - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - `header` (Object) - custom header for gzip - * - `text` (Boolean) - true if compressed data believed to be text - * - `time` (Number) - modification time, unix timestamp - * - `os` (Number) - operation system code - * - `extra` (Array) - array of bytes with extra data (max 65536) - * - `name` (String) - file name (binary string) - * - `comment` (String) - comment (binary string) - * - `hcrc` (Boolean) - true if header crc should be added - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var deflate = new pako.Deflate({ level: 3}); - * - * deflate.push(chunk1, false); - * deflate.push(chunk2, true); // true -> last chunk - * - * if (deflate.err) { throw new Error(deflate.err); } - * - * console.log(deflate.result); - * ``` - **/ -function Deflate(options) { - if (!(this instanceof Deflate)) return new Deflate(options); - - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: '' - }, options || {}); - - var opt = this.options; - - if (opt.raw && (opt.windowBits > 0)) { - opt.windowBits = -opt.windowBits; - } - - else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { - opt.windowBits += 16; - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } - - if (opt.dictionary) { - var dict; - // Convert data if needed - if (typeof opt.dictionary === 'string') { - // If we need to compress text, change encoding to utf8. - dict = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(opt.dictionary); - } else { - dict = opt.dictionary; - } - - status = zlib_deflate.deflateSetDictionary(this.strm, dict); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - this._dict_set = true; - } -} - -/** - * Deflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be - * converted to utf8 byte sequence. - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. - * - * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with - * new compressed chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the compression context. - * - * On fail call [[Deflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * array format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Deflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - - if (this.ended) { return false; } - - _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // If we need to compress text, change encoding to utf8. - strm.input = strings.string2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ - - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { - if (this.options.to === 'string') { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - - // Finalize on the last chunk. - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === Z_SYNC_FLUSH) { - this.onEnd(Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Deflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): output data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Deflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Deflate#onEnd(status) -> Void - * - status (Number): deflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell deflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Deflate.prototype.onEnd = function (status) { - // On success - join - if (status === Z_OK) { - if (this.options.to === 'string') { - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * deflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * Compress `data` with deflate algorithm and `options`. - * - * Supported options are: - * - * - level - * - windowBits - * - memLevel - * - strategy - * - dictionary - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); - * - * console.log(pako.deflate(data)); - * ``` - **/ -function deflate(input, options) { - var deflator = new Deflate(options); - - deflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (deflator.err) { throw deflator.msg || msg[deflator.err]; } - - return deflator.result; -} - - -/** - * deflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); -} - - -/** - * gzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but create gzip wrapper instead of - * deflate one. - **/ -function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); -} - - -exports.Deflate = Deflate; -exports.deflate = deflate; -exports.deflateRaw = deflateRaw; -exports.gzip = gzip; diff --git a/node_modules/pako/lib/inflate.js b/node_modules/pako/lib/inflate.js deleted file mode 100644 index 7535d15a..00000000 --- a/node_modules/pako/lib/inflate.js +++ /dev/null @@ -1,423 +0,0 @@ -'use strict'; - - -var zlib_inflate = require('./zlib/inflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var c = require('./zlib/constants'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); -var GZheader = require('./zlib/gzheader'); - -var toString = Object.prototype.toString; - -/** - * class Inflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] - * and [[inflateRaw]]. - **/ - -/* internal - * inflate.chunks -> Array - * - * Chunks of output data, if [[Inflate#onData]] not overridden. - **/ - -/** - * Inflate.result -> Uint8Array|Array|String - * - * Uncompressed result, generated by default [[Inflate#onData]] - * and [[Inflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Inflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Inflate.err -> Number - * - * Error code after inflate finished. 0 (Z_OK) on success. - * Should be checked if broken data possible. - **/ - -/** - * Inflate.msg -> String - * - * Error message, if [[Inflate.err]] != 0 - **/ - - -/** - * new Inflate(options) - * - options (Object): zlib inflate options. - * - * Creates new inflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `windowBits` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw inflate - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * By default, when no options set, autodetect deflate/gzip data format via - * wrapper header. - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var inflate = new pako.Inflate({ level: 3}); - * - * inflate.push(chunk1, false); - * inflate.push(chunk2, true); // true -> last chunk - * - * if (inflate.err) { throw new Error(inflate.err); } - * - * console.log(inflate.result); - * ``` - **/ -function Inflate(options) { - if (!(this instanceof Inflate)) return new Inflate(options); - - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: '' - }, options || {}); - - var opt = this.options; - - // Force window size for `raw` data, if not set directly, - // because we have no header for autodetect. - if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { opt.windowBits = -15; } - } - - // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate - if ((opt.windowBits >= 0) && (opt.windowBits < 16) && - !(options && options.windowBits)) { - opt.windowBits += 32; - } - - // Gzip header has no info about windows size, we can do autodetect only - // for deflate. So, if window size not set, force it to max when gzip possible - if ((opt.windowBits > 15) && (opt.windowBits < 48)) { - // bit 3 (16) -> gzipped data - // bit 4 (32) -> autodetect gzip/deflate - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - - this.header = new GZheader(); - - zlib_inflate.inflateGetHeader(this.strm, this.header); - - // Setup dictionary - if (opt.dictionary) { - // Convert data if needed - if (typeof opt.dictionary === 'string') { - opt.dictionary = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - opt.dictionary = new Uint8Array(opt.dictionary); - } - if (opt.raw) { //In raw mode we need to set the dictionary early - status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary); - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - } - } -} - -/** - * Inflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. - * - * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with - * new output chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the decompression context. - * - * On fail call [[Inflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Inflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var dictionary = this.options.dictionary; - var status, _mode; - var next_out_utf8, tail, utf8str; - - // Flag to properly process Z_BUF_ERROR on testing inflate call - // when we check that all output data was flushed. - var allowBufError = false; - - if (this.ended) { return false; } - _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // Only binary strings can be decompressed on practice - strm.input = strings.binstring2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ - - if (status === c.Z_NEED_DICT && dictionary) { - status = zlib_inflate.inflateSetDictionary(this.strm, dictionary); - } - - if (status === c.Z_BUF_ERROR && allowBufError === true) { - status = c.Z_OK; - allowBufError = false; - } - - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { - - if (this.options.to === 'string') { - - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - - // move tail - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } - - this.onData(utf8str); - - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - - // When no more input data, we should check that internal inflate buffers - // are flushed. The only way to do it when avail_out = 0 - run one more - // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. - // Here we set flag to process this error properly. - // - // NOTE. Deflate does not return error in this case and does not needs such - // logic. - if (strm.avail_in === 0 && strm.avail_out === 0) { - allowBufError = true; - } - - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); - - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - - // Finalize on the last chunk. - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === c.Z_SYNC_FLUSH) { - this.onEnd(c.Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Inflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): output data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Inflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Inflate#onEnd(status) -> Void - * - status (Number): inflate status. 0 (Z_OK) on success, - * other if not. - * - * Called either after you tell inflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Inflate.prototype.onEnd = function (status) { - // On success - join - if (status === c.Z_OK) { - if (this.options.to === 'string') { - // Glue & convert here, until we teach pako to send - // utf8 aligned strings to onData - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * inflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Decompress `data` with inflate/ungzip and `options`. Autodetect - * format via wrapper header by default. That's why we don't provide - * separate `ungzip` method. - * - * Supported options are: - * - * - windowBits - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) - * , output; - * - * try { - * output = pako.inflate(input); - * } catch (err) - * console.log(err); - * } - * ``` - **/ -function inflate(input, options) { - var inflator = new Inflate(options); - - inflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (inflator.err) { throw inflator.msg || msg[inflator.err]; } - - return inflator.result; -} - - -/** - * inflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * The same as [[inflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); -} - - -/** - * ungzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Just shortcut to [[inflate]], because it autodetects format - * by header.content. Done for convenience. - **/ - - -exports.Inflate = Inflate; -exports.inflate = inflate; -exports.inflateRaw = inflateRaw; -exports.ungzip = inflate; diff --git a/node_modules/pako/lib/utils/common.js b/node_modules/pako/lib/utils/common.js deleted file mode 100644 index 58be4beb..00000000 --- a/node_modules/pako/lib/utils/common.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict'; - - -var TYPED_OK = (typeof Uint8Array !== 'undefined') && - (typeof Uint16Array !== 'undefined') && - (typeof Int32Array !== 'undefined'); - -function _has(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); -} - -exports.assign = function (obj /*from1, from2, from3, ...*/) { - var sources = Array.prototype.slice.call(arguments, 1); - while (sources.length) { - var source = sources.shift(); - if (!source) { continue; } - - if (typeof source !== 'object') { - throw new TypeError(source + 'must be non-object'); - } - - for (var p in source) { - if (_has(source, p)) { - obj[p] = source[p]; - } - } - } - - return obj; -}; - - -// reduce buffer size, avoiding mem copy -exports.shrinkBuf = function (buf, size) { - if (buf.length === size) { return buf; } - if (buf.subarray) { return buf.subarray(0, size); } - buf.length = size; - return buf; -}; - - -var fnTyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - if (src.subarray && dest.subarray) { - dest.set(src.subarray(src_offs, src_offs + len), dest_offs); - return; - } - // Fallback to ordinary array - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - var i, l, len, pos, chunk, result; - - // calculate data length - len = 0; - for (i = 0, l = chunks.length; i < l; i++) { - len += chunks[i].length; - } - - // join chunks - result = new Uint8Array(len); - pos = 0; - for (i = 0, l = chunks.length; i < l; i++) { - chunk = chunks[i]; - result.set(chunk, pos); - pos += chunk.length; - } - - return result; - } -}; - -var fnUntyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; - } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - return [].concat.apply([], chunks); - } -}; - - -// Enable/Disable typed arrays use, for testing -// -exports.setTyped = function (on) { - if (on) { - exports.Buf8 = Uint8Array; - exports.Buf16 = Uint16Array; - exports.Buf32 = Int32Array; - exports.assign(exports, fnTyped); - } else { - exports.Buf8 = Array; - exports.Buf16 = Array; - exports.Buf32 = Array; - exports.assign(exports, fnUntyped); - } -}; - -exports.setTyped(TYPED_OK); diff --git a/node_modules/pako/lib/utils/strings.js b/node_modules/pako/lib/utils/strings.js deleted file mode 100644 index b07a732d..00000000 --- a/node_modules/pako/lib/utils/strings.js +++ /dev/null @@ -1,187 +0,0 @@ -// String encode/decode helpers -'use strict'; - - -var utils = require('./common'); - - -// Quick check if we can use fast array to bin string conversion -// -// - apply(Array) can fail on Android 2.2 -// - apply(Uint8Array) can fail on iOS 5.1 Safari -// -var STR_APPLY_OK = true; -var STR_APPLY_UIA_OK = true; - -try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; } -try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; } - - -// Table with utf8 lengths (calculated by first byte of sequence) -// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, -// because max possible codepoint is 0x10ffff -var _utf8len = new utils.Buf8(256); -for (var q = 0; q < 256; q++) { - _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; -}; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // On Chrome, the arguments in a function call that are allowed is `65534`. - // If the length of the buffer is smaller than that, we can use this optimization, - // otherwise we will take a slower path. - if (len < 65534) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; -} - - -// Convert byte array to binary string -exports.buf2binstring = function (buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function (str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len * 2); - - for (out = 0, i = 0; i < len;) { - c = buf[i++]; - // quick process ascii - if (c < 0x80) { utf16buf[out++] = c; continue; } - - c_len = _utf8len[c]; - // skip 5 & 6 byte codes - if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function (buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max - 1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means buffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; diff --git a/node_modules/pako/lib/zlib/README b/node_modules/pako/lib/zlib/README deleted file mode 100644 index 88a87524..00000000 --- a/node_modules/pako/lib/zlib/README +++ /dev/null @@ -1,59 +0,0 @@ -Content of this folder follows zlib C sources as close as possible. -That's intended to simplify maintainability and guarantee equal API -and result. - -Key differences: - -- Everything is in JavaScript. -- No platform-dependent blocks. -- Some things like crc32 rewritten to keep size small and make JIT - work better. -- Some code is different due missed features in JS (macros, pointers, - structures, header files) -- Specific API methods are not implemented (see notes in root readme) - -This port is based on zlib 1.2.8. - -This port is under zlib license (see below) with contribution and addition of javascript -port under expat license (see LICENSE at root of project) - -Copyright: -(C) 1995-2013 Jean-loup Gailly and Mark Adler -(C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin - - -From zlib's README -============================================================================= - -Acknowledgments: - - The deflate format used by zlib was defined by Phil Katz. The deflate and - zlib specifications were written by L. Peter Deutsch. Thanks to all the - people who reported problems and suggested various improvements in zlib; they - are too numerous to cite here. - -Copyright notice: - - (C) 1995-2013 Jean-loup Gailly and Mark Adler - -Copyright (c) <''year''> <''copyright holders''> - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. - - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu diff --git a/node_modules/pako/lib/zlib/adler32.js b/node_modules/pako/lib/zlib/adler32.js deleted file mode 100644 index d440a981..00000000 --- a/node_modules/pako/lib/zlib/adler32.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It isn't worth it to make additional optimizations as in original. -// Small size is preferable. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; -} - - -module.exports = adler32; diff --git a/node_modules/pako/lib/zlib/constants.js b/node_modules/pako/lib/zlib/constants.js deleted file mode 100644 index 569b8724..00000000 --- a/node_modules/pako/lib/zlib/constants.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -module.exports = { - - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - - - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type -}; diff --git a/node_modules/pako/lib/zlib/crc32.js b/node_modules/pako/lib/zlib/crc32.js deleted file mode 100644 index 6a960924..00000000 --- a/node_modules/pako/lib/zlib/crc32.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; -} - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc ^= -1; - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; -} - - -module.exports = crc32; diff --git a/node_modules/pako/lib/zlib/deflate.js b/node_modules/pako/lib/zlib/deflate.js deleted file mode 100644 index 31456989..00000000 --- a/node_modules/pako/lib/zlib/deflate.js +++ /dev/null @@ -1,1874 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); -var trees = require('./trees'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var msg = require('./messages'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -var Z_NO_FLUSH = 0; -var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -//var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -//var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -//var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - - -/* compression levels */ -//var Z_NO_COMPRESSION = 0; -//var Z_BEST_SPEED = 1; -//var Z_BEST_COMPRESSION = 9; -var Z_DEFAULT_COMPRESSION = -1; - - -var Z_FILTERED = 1; -var Z_HUFFMAN_ONLY = 2; -var Z_RLE = 3; -var Z_FIXED = 4; -var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -//var Z_BINARY = 0; -//var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - - -/* The deflate compression method */ -var Z_DEFLATED = 8; - -/*============================================================================*/ - - -var MAX_MEM_LEVEL = 9; -/* Maximum value for memLevel in deflateInit2 */ -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_MEM_LEVEL = 8; - - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ -var LITERALS = 256; -/* number of literal bytes 0..255 */ -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -var PRESET_DICT = 0x20; - -var INIT_STATE = 42; -var EXTRA_STATE = 69; -var NAME_STATE = 73; -var COMMENT_STATE = 91; -var HCRC_STATE = 103; -var BUSY_STATE = 113; -var FINISH_STATE = 666; - -var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ -var BS_BLOCK_DONE = 2; /* block flush performed */ -var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ -var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ - -var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. - -function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; -} - -function rank(f) { - return ((f) << 1) - ((f) > 4 ? 9 : 0); -} - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->output buffer and copying into it. - * (See also read_buf()). - */ -function flush_pending(strm) { - var s = strm.state; - - //_tr_flush_bits(s); - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { return; } - - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } -} - - -function flush_block_only(s, last) { - trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); - s.block_start = s.strstart; - flush_pending(s.strm); -} - - -function put_byte(s, b) { - s.pending_buf[s.pending++] = b; -} - - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -function putShortMSB(s, b) { -// put_byte(s, (Byte)(b >> 8)); -// put_byte(s, (Byte)(b & 0xff)); - s.pending_buf[s.pending++] = (b >>> 8) & 0xff; - s.pending_buf[s.pending++] = b & 0xff; -} - - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->input buffer and copying from it. - * (See also flush_pending()). - */ -function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - - if (len > size) { len = size; } - if (len === 0) { return 0; } - - strm.avail_in -= len; - - // zmemcpy(buf, strm->next_in, len); - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } - - else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - - strm.next_in += len; - strm.total_in += len; - - return len; -} - - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; /* max hash chain length */ - var scan = s.strstart; /* current string */ - var match; /* matched string */ - var len; /* length of current match */ - var best_len = s.prev_length; /* best match length so far */ - var nice_match = s.nice_match; /* stop if match long enough */ - var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? - s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; - - var _win = s.window; // shortcut - - var wmask = s.w_mask; - var prev = s.prev; - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if (nice_match > s.lookahead) { nice_match = s.lookahead; } - - // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - // Assert(cur_match < s->strstart, "no future"); - match = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ - - if (_win[match + best_len] !== scan_end || - _win[match + best_len - 1] !== scan_end1 || - _win[match] !== _win[scan] || - _win[++match] !== _win[scan + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2; - match++; - // Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - /*jshint noempty:false*/ - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - scan < strend); - - // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; -} - - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - - //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = s.window_size - s.lookahead - s.strstart; - - // JS ints have 32 bit, block below not needed - /* Deal with !@#$% 64K limit: */ - //if (sizeof(int) <= 2) { - // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - // more = wsize; - // - // } else if (more == (unsigned)(-1)) { - // /* Very unlikely, but possible on 16 bit machine if - // * strstart == 0 && lookahead == 1 (input done a byte at time) - // */ - // more--; - // } - //} - - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - /* we now have strstart >= MAX_DIST */ - s.block_start -= _w_size; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= _w_size ? m - _w_size : 0); - } while (--n); - - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= _w_size ? m - _w_size : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); - - more += _w_size; - } - if (s.strm.avail_in === 0) { - break; - } - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - //Assert(more >= 2, "more < 2"); - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - - /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; -//#if MIN_MATCH != 3 -// Call update_hash() MIN_MATCH-3 more times -//#endif - while (s.insert) { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; - } - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ -// if (s.high_water < s.window_size) { -// var curr = s.strstart + s.lookahead; -// var init = 0; -// -// if (s.high_water < curr) { -// /* Previous high water mark below current data -- zero WIN_INIT -// * bytes or up to end of window, whichever is less. -// */ -// init = s.window_size - curr; -// if (init > WIN_INIT) -// init = WIN_INIT; -// zmemzero(s->window + curr, (unsigned)init); -// s->high_water = curr + init; -// } -// else if (s->high_water < (ulg)curr + WIN_INIT) { -// /* High water mark at or above current data, but below current data -// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up -// * to end of window, whichever is less. -// */ -// init = (ulg)curr + WIN_INIT - s->high_water; -// if (init > s->window_size - s->high_water) -// init = s->window_size - s->high_water; -// zmemzero(s->window + s->high_water, (unsigned)init); -// s->high_water += init; -// } -// } -// -// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, -// "not enough room for search"); -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -function deflate_stored(s, flush) { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - var max_block_size = 0xffff; - - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s.lookahead <= 1) { - - //Assert(s->strstart < s->w_size+MAX_DIST(s) || - // s->block_start >= (long)s->w_size, "slide too late"); -// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || -// s.block_start >= s.w_size)) { -// throw new Error("slide too late"); -// } - - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - - if (s.lookahead === 0) { - break; - } - /* flush the current block */ - } - //Assert(s->block_start >= 0L, "block gone"); -// if (s.block_start < 0) throw new Error("block gone"); - - s.strstart += s.lookahead; - s.lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - var max_start = s.block_start + max_block_size; - - if (s.strstart === 0 || s.strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - - - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - - s.insert = 0; - - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - - if (s.strstart > s.block_start) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_NEED_MORE; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -function deflate_fast(s, flush) { - var hash_head; /* head of the hash chain */ - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; /* flush the current block */ - } - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - } - if (s.match_length >= MIN_MATCH) { - // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only - - /*** _tr_tally_dist(s, s.strstart - s.match_start, - s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { - s.match_length--; /* string at strstart already in table */ - do { - s.strstart++; - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s.match_length !== 0); - s.strstart++; - } else - { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; - -//#if MIN_MATCH != 3 -// Call UPDATE_HASH() MIN_MATCH-3 more times -//#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s.window[s.strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -function deflate_slow(s, flush) { - var hash_head; /* head of hash chain */ - var bflush; /* set if current block must be flushed */ - - var max_insert; - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - - /* Find the longest match, discarding those <= prev_length. - */ - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH - 1; - - if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && - s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - - if (s.match_length <= 5 && - (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s.match_length = MIN_MATCH - 1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - //check_match(s, s.strstart-1, s.prev_match, s.prev_length); - - /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, - s.prev_length - MIN_MATCH, bflush);***/ - bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s.lookahead -= s.prev_length - 1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH - 1; - s.strstart++; - - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - } else if (s.match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - if (bflush) { - /*** FLUSH_BLOCK_ONLY(s, 0) ***/ - flush_block_only(s, false); - /***/ - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - //Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s.match_available) { - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - return BS_BLOCK_DONE; -} - - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -function deflate_rle(s, flush) { - var bflush; /* set if current block must be flushed */ - var prev; /* byte at distance one to match */ - var scan, strend; /* scan goes up to strend for length of run */ - - var _win = s.window; - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - /*jshint noempty:false*/ - } while (prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; - } - } - //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s.match_length >= MIN_MATCH) { - //check_match(s, s.strstart, s.strstart - 1, s.match_length); - - /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -function deflate_huff(s, flush) { - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s.match_length = 0; - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -function Config(good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; -} - -var configuration_table; - -configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), /* 3 */ - - new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ -]; - - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -function lm_init(s) { - s.window_size = 2 * s.w_size; - - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - - /* Set the default configuration parameters: - */ - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; -} - - -function DeflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.status = 0; /* as the name implies */ - this.pending_buf = null; /* output still pending */ - this.pending_buf_size = 0; /* size of pending_buf */ - this.pending_out = 0; /* next pending byte to output to the stream */ - this.pending = 0; /* nb of bytes in the pending buffer */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.gzhead = null; /* gzip header information to write */ - this.gzindex = 0; /* where in extra, name, or comment */ - this.method = Z_DEFLATED; /* can only be DEFLATED */ - this.last_flush = -1; /* value of flush param for previous deflate call */ - - this.w_size = 0; /* LZ77 window size (32K by default) */ - this.w_bits = 0; /* log2(w_size) (8..16) */ - this.w_mask = 0; /* w_size - 1 */ - - this.window = null; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. - */ - - this.window_size = 0; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - this.prev = null; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - this.head = null; /* Heads of the hash chains or NIL. */ - - this.ins_h = 0; /* hash index of string to be inserted */ - this.hash_size = 0; /* number of elements in hash table */ - this.hash_bits = 0; /* log2(hash_size) */ - this.hash_mask = 0; /* hash_size-1 */ - - this.hash_shift = 0; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - this.block_start = 0; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - this.match_length = 0; /* length of best match */ - this.prev_match = 0; /* previous match */ - this.match_available = 0; /* set if previous match exists */ - this.strstart = 0; /* start of string to insert */ - this.match_start = 0; /* start of matching string */ - this.lookahead = 0; /* number of valid bytes ahead in window */ - - this.prev_length = 0; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - this.max_chain_length = 0; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - this.max_lazy_match = 0; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ - // That's alias to max_lazy_match, don't use directly - //this.max_insert_length = 0; - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - this.level = 0; /* compression level (1..9) */ - this.strategy = 0; /* favor or force Huffman coding*/ - - this.good_match = 0; - /* Use a faster search when the previous match is longer than this */ - - this.nice_match = 0; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - - /* Didn't use ct_data typedef below to suppress compiler warning */ - - // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - // Use flat array of DOUBLE size, with interleaved fata, - // because JS does not support effective - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); - this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - - this.l_desc = null; /* desc. for literal tree */ - this.d_desc = null; /* desc. for distance tree */ - this.bl_desc = null; /* desc. for bit length tree */ - - //ush bl_count[MAX_BITS+1]; - this.bl_count = new utils.Buf16(MAX_BITS + 1); - /* number of codes at each bit length for an optimal tree */ - - //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ - zero(this.heap); - - this.heap_len = 0; /* number of elements in the heap */ - this.heap_max = 0; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; - zero(this.depth); - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - this.l_buf = 0; /* buffer index for literals or lengths */ - - this.lit_bufsize = 0; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - this.last_lit = 0; /* running index in l_buf */ - - this.d_buf = 0; - /* Buffer index for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - this.opt_len = 0; /* bit length of current block with optimal trees */ - this.static_len = 0; /* bit length of current block with static trees */ - this.matches = 0; /* number of string matches in current block */ - this.insert = 0; /* bytes at end of window left to insert */ - - - this.bi_buf = 0; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - this.bi_valid = 0; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - // Used for window memory init. We safely ignore it for JS. That makes - // sense only for pointers and memory check tools. - //this.high_water = 0; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ -} - - -function deflateResetKeep(strm) { - var s; - - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; - - s = strm.state; - s.pending = 0; - s.pending_out = 0; - - if (s.wrap < 0) { - s.wrap = -s.wrap; - /* was made negative by deflate(..., Z_FINISH); */ - } - s.status = (s.wrap ? INIT_STATE : BUSY_STATE); - strm.adler = (s.wrap === 2) ? - 0 // crc32(0, Z_NULL, 0) - : - 1; // adler32(0, Z_NULL, 0) - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; -} - - -function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; -} - - -function deflateSetHeader(strm, head) { - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } - strm.state.gzhead = head; - return Z_OK; -} - - -function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { // === Z_NULL - return Z_STREAM_ERROR; - } - var wrap = 1; - - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } - - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } - - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } - - - if (windowBits === 8) { - windowBits = 9; - } - /* until 256-byte window bug fixed */ - - var s = new DeflateState(); - - strm.state = s; - s.strm = strm; - - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); - - // Don't need mem init magic for JS. - //s.high_water = 0; /* nothing written to s->window yet */ - - s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - s.pending_buf_size = s.lit_bufsize * 4; - - //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); - //s->pending_buf = (uchf *) overlay; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - - // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) - //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); - s.d_buf = 1 * s.lit_bufsize; - - //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; - s.l_buf = (1 + 2) * s.lit_bufsize; - - s.level = level; - s.strategy = strategy; - s.method = method; - - return deflateReset(strm); -} - -function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -} - - -function deflate(strm, flush) { - var old_flush, s; - var beg, val; // for gzip header write only - - if (!strm || !strm.state || - flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } - - s = strm.state; - - if (!strm.output || - (!strm.input && strm.avail_in !== 0) || - (s.status === FINISH_STATE && flush !== Z_FINISH)) { - return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); - } - - s.strm = strm; /* just in case */ - old_flush = s.last_flush; - s.last_flush = flush; - - /* Write the header */ - if (s.status === INIT_STATE) { - - if (s.wrap === 2) { // GZIP header - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } - else // DEFLATE header - { - var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - var level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - - s.status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - } - } - -//#ifdef GZIP - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - - while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } - } - put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } - else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } - else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } - else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - } - } - else { - s.status = BUSY_STATE; - } - } -//#endif - - /* Flush as much pending output as possible */ - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s.last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && - flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm.avail_in !== 0 || s.lookahead !== 0 || - (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : - (s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush)); - - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } - else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - - trees._tr_stored_block(s, 0, 0, false); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush === Z_FULL_FLUSH) { - /*** CLEAR_HASH(s); ***/ /* forget history */ - zero(s.head); // Fill with NIL (= 0); - - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - //Assert(strm->avail_out > 0, "bug2"); - //if (strm.avail_out <= 0) { throw new Error("bug2");} - - if (flush !== Z_FINISH) { return Z_OK; } - if (s.wrap <= 0) { return Z_STREAM_END; } - - /* Write the trailer */ - if (s.wrap === 2) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - put_byte(s, (strm.adler >> 16) & 0xff); - put_byte(s, (strm.adler >> 24) & 0xff); - put_byte(s, strm.total_in & 0xff); - put_byte(s, (strm.total_in >> 8) & 0xff); - put_byte(s, (strm.total_in >> 16) & 0xff); - put_byte(s, (strm.total_in >> 24) & 0xff); - } - else - { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s.wrap > 0) { s.wrap = -s.wrap; } - /* write the trailer only once! */ - return s.pending !== 0 ? Z_OK : Z_STREAM_END; -} - -function deflateEnd(strm) { - var status; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - status = strm.state.status; - if (status !== INIT_STATE && - status !== EXTRA_STATE && - status !== NAME_STATE && - status !== COMMENT_STATE && - status !== HCRC_STATE && - status !== BUSY_STATE && - status !== FINISH_STATE - ) { - return err(strm, Z_STREAM_ERROR); - } - - strm.state = null; - - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; -} - - -/* ========================================================================= - * Initializes the compression dictionary from the given byte - * sequence without producing any compressed output. - */ -function deflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var s; - var str, n; - var wrap; - var avail; - var next; - var input; - var tmpDict; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - - s = strm.state; - wrap = s.wrap; - - if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { - return Z_STREAM_ERROR; - } - - /* when using zlib wrappers, compute Adler-32 for provided dictionary */ - if (wrap === 1) { - /* adler32(strm->adler, dictionary, dictLength); */ - strm.adler = adler32(strm.adler, dictionary, dictLength, 0); - } - - s.wrap = 0; /* avoid computing Adler-32 in read_buf */ - - /* if dictionary would fill window, just replace the history */ - if (dictLength >= s.w_size) { - if (wrap === 0) { /* already empty otherwise */ - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - /* use the tail */ - // dictionary = dictionary.slice(dictLength - s.w_size); - tmpDict = new utils.Buf8(s.w_size); - utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); - dictionary = tmpDict; - dictLength = s.w_size; - } - /* insert dictionary into window and hash */ - avail = strm.avail_in; - next = strm.next_in; - input = strm.input; - strm.avail_in = dictLength; - strm.next_in = 0; - strm.input = dictionary; - fill_window(s); - while (s.lookahead >= MIN_MATCH) { - str = s.strstart; - n = s.lookahead - (MIN_MATCH - 1); - do { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - - s.head[s.ins_h] = str; - str++; - } while (--n); - s.strstart = str; - s.lookahead = MIN_MATCH - 1; - fill_window(s); - } - s.strstart += s.lookahead; - s.block_start = s.strstart; - s.insert = s.lookahead; - s.lookahead = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - strm.next_in = next; - strm.input = input; - strm.avail_in = avail; - s.wrap = wrap; - return Z_OK; -} - - -exports.deflateInit = deflateInit; -exports.deflateInit2 = deflateInit2; -exports.deflateReset = deflateReset; -exports.deflateResetKeep = deflateResetKeep; -exports.deflateSetHeader = deflateSetHeader; -exports.deflate = deflate; -exports.deflateEnd = deflateEnd; -exports.deflateSetDictionary = deflateSetDictionary; -exports.deflateInfo = 'pako deflate (from Nodeca project)'; - -/* Not implemented -exports.deflateBound = deflateBound; -exports.deflateCopy = deflateCopy; -exports.deflateParams = deflateParams; -exports.deflatePending = deflatePending; -exports.deflatePrime = deflatePrime; -exports.deflateTune = deflateTune; -*/ diff --git a/node_modules/pako/lib/zlib/gzheader.js b/node_modules/pako/lib/zlib/gzheader.js deleted file mode 100644 index 9582cba6..00000000 --- a/node_modules/pako/lib/zlib/gzheader.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function GZheader() { - /* true if compressed data believed to be text */ - this.text = 0; - /* modification time */ - this.time = 0; - /* extra flags (not used when writing a gzip file) */ - this.xflags = 0; - /* operating system */ - this.os = 0; - /* pointer to extra field or Z_NULL if none */ - this.extra = null; - /* extra field length (valid if extra != Z_NULL) */ - this.extra_len = 0; // Actually, we don't need it in JS, - // but leave for few code modifications - - // - // Setup limits is not necessary because in js we should not preallocate memory - // for inflate use constant limit in 65536 bytes - // - - /* space at extra (only when reading header) */ - // this.extra_max = 0; - /* pointer to zero-terminated file name or Z_NULL */ - this.name = ''; - /* space at name (only when reading header) */ - // this.name_max = 0; - /* pointer to zero-terminated comment or Z_NULL */ - this.comment = ''; - /* space at comment (only when reading header) */ - // this.comm_max = 0; - /* true if there was or will be a header crc */ - this.hcrc = 0; - /* true when done reading gzip header (not used when writing a gzip file) */ - this.done = false; -} - -module.exports = GZheader; diff --git a/node_modules/pako/lib/zlib/inffast.js b/node_modules/pako/lib/zlib/inffast.js deleted file mode 100644 index 4cc958fe..00000000 --- a/node_modules/pako/lib/zlib/inffast.js +++ /dev/null @@ -1,345 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -// See state defs from inflate.js -var BAD = 30; /* got a data error -- remain here until reset */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state.mode === LEN - strm.avail_in >= 6 - strm.avail_out >= 258 - start >= strm.avail_out - state.bits < 8 - - On return, state.mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm.avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm.avail_out >= 258 for each loop to avoid checking for - output space. - */ -module.exports = function inflate_fast(strm, start) { - var state; - var _in; /* local strm.input */ - var last; /* have enough input while in < last */ - var _out; /* local strm.output */ - var beg; /* inflate()'s initial strm.output */ - var end; /* while out < end, enough space available */ -//#ifdef INFLATE_STRICT - var dmax; /* maximum distance from zlib header */ -//#endif - var wsize; /* window size or zero if not using window */ - var whave; /* valid bytes in the window */ - var wnext; /* window write index */ - // Use `s_window` instead `window`, avoid conflict with instrumentation tools - var s_window; /* allocated sliding window, if wsize != 0 */ - var hold; /* local strm.hold */ - var bits; /* local strm.bits */ - var lcode; /* local strm.lencode */ - var dcode; /* local strm.distcode */ - var lmask; /* mask for first level of length codes */ - var dmask; /* mask for first level of distance codes */ - var here; /* retrieved table entry */ - var op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - var len; /* match length, unused bytes */ - var dist; /* match distance */ - var from; /* where to copy match from */ - var from_source; - - - var input, output; // JS specific, because we have no pointers - - /* copy state to local variables */ - state = strm.state; - //here = state.here; - _in = strm.next_in; - input = strm.input; - last = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); -//#ifdef INFLATE_STRICT - dmax = state.dmax; -//#endif - wsize = state.wsize; - whave = state.whave; - wnext = state.wnext; - s_window = state.window; - hold = state.hold; - bits = state.bits; - lcode = state.lencode; - dcode = state.distcode; - lmask = (1 << state.lenbits) - 1; - dmask = (1 << state.distbits) - 1; - - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - - here = lcode[hold & lmask]; - - dolen: - for (;;) { // Goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - if (op === 0) { /* literal */ - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - output[_out++] = here & 0xffff/*here.val*/; - } - else if (op & 16) { /* length base */ - len = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & ((1 << op) - 1); - hold >>>= op; - bits -= op; - } - //Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - - dodist: - for (;;) { // goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - - if (op & 16) { /* distance base */ - dist = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & ((1 << op) - 1); -//#ifdef INFLATE_STRICT - if (dist > dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -//#endif - hold >>>= op; - bits -= op; - //Tracevv((stderr, "inflate: distance %u\n", dist)); - op = _out - beg; /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } - -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// if (len <= op - whave) { -// do { -// output[_out++] = 0; -// } while (--len); -// continue top; -// } -// len -= op - whave; -// do { -// output[_out++] = 0; -// } while (--op > whave); -// if (op === 0) { -// from = _out - dist; -// do { -// output[_out++] = output[from++]; -// } while (--len); -// continue top; -// } -//#endif - } - from = 0; // window index - from_source = s_window; - if (wnext === 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = 0; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } - else { - from = _out - dist; /* copy direct from output */ - do { /* minimum length is three */ - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } - else if ((op & 64) === 0) { /* 2nd level distance code */ - here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dodist; - } - else { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } - else if ((op & 64) === 0) { /* 2nd level length code */ - here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dolen; - } - else if (op & 32) { /* end-of-block */ - //Tracevv((stderr, "inflate: end of block\n")); - state.mode = TYPE; - break top; - } - else { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break top; - } - - break; // need to emulate goto via "continue" - } - } while (_in < last && _out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - - /* update state and return */ - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); - strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); - state.hold = hold; - state.bits = bits; - return; -}; diff --git a/node_modules/pako/lib/zlib/inflate.js b/node_modules/pako/lib/zlib/inflate.js deleted file mode 100644 index 63848448..00000000 --- a/node_modules/pako/lib/zlib/inflate.js +++ /dev/null @@ -1,1556 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var inflate_fast = require('./inffast'); -var inflate_table = require('./inftrees'); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -//var Z_NO_FLUSH = 0; -//var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -//var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - -/* The deflate compression method */ -var Z_DEFLATED = 8; - - -/* STATES ====================================================================*/ -/* ===========================================================================*/ - - -var HEAD = 1; /* i: waiting for magic header */ -var FLAGS = 2; /* i: waiting for method and flags (gzip) */ -var TIME = 3; /* i: waiting for modification time (gzip) */ -var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ -var EXLEN = 5; /* i: waiting for extra length (gzip) */ -var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ -var NAME = 7; /* i: waiting for end of file name (gzip) */ -var COMMENT = 8; /* i: waiting for end of comment (gzip) */ -var HCRC = 9; /* i: waiting for header crc (gzip) */ -var DICTID = 10; /* i: waiting for dictionary check value */ -var DICT = 11; /* waiting for inflateSetDictionary() call */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ -var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ -var STORED = 14; /* i: waiting for stored size (length and complement) */ -var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ -var COPY = 16; /* i/o: waiting for input or output to copy stored block */ -var TABLE = 17; /* i: waiting for dynamic block table lengths */ -var LENLENS = 18; /* i: waiting for code length code lengths */ -var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ -var LEN_ = 20; /* i: same as LEN below, but only first time in */ -var LEN = 21; /* i: waiting for length/lit/eob code */ -var LENEXT = 22; /* i: waiting for length extra bits */ -var DIST = 23; /* i: waiting for distance code */ -var DISTEXT = 24; /* i: waiting for distance extra bits */ -var MATCH = 25; /* o: waiting for output space to copy string */ -var LIT = 26; /* o: waiting for output space to write literal */ -var CHECK = 27; /* i: waiting for 32-bit check value */ -var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ -var DONE = 29; /* finished check, done -- remain here until reset */ -var BAD = 30; /* got a data error -- remain here until reset */ -var MEM = 31; /* got an inflate() memory error -- remain here until reset */ -var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ - -/* ===========================================================================*/ - - - -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_WBITS = MAX_WBITS; - - -function zswap32(q) { - return (((q >>> 24) & 0xff) + - ((q >>> 8) & 0xff00) + - ((q & 0xff00) << 8) + - ((q & 0xff) << 24)); -} - - -function InflateState() { - this.mode = 0; /* current inflate mode */ - this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib) */ - this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ - this.check = 0; /* protected copy of check value */ - this.total = 0; /* protected copy of output count */ - // TODO: may be {} - this.head = null; /* where to save gzip header information */ - - /* sliding window */ - this.wbits = 0; /* log base 2 of requested window size */ - this.wsize = 0; /* window size or zero if not using window */ - this.whave = 0; /* valid bytes in the window */ - this.wnext = 0; /* window write index */ - this.window = null; /* allocated sliding window, if needed */ - - /* bit accumulator */ - this.hold = 0; /* input bit accumulator */ - this.bits = 0; /* number of bits in "in" */ - - /* for string and stored block copying */ - this.length = 0; /* literal or length of data to copy */ - this.offset = 0; /* distance back to copy string from */ - - /* for table and code decoding */ - this.extra = 0; /* extra bits needed */ - - /* fixed and dynamic code tables */ - this.lencode = null; /* starting table for length/literal codes */ - this.distcode = null; /* starting table for distance codes */ - this.lenbits = 0; /* index bits for lencode */ - this.distbits = 0; /* index bits for distcode */ - - /* dynamic table building */ - this.ncode = 0; /* number of code length code lengths */ - this.nlen = 0; /* number of length code lengths */ - this.ndist = 0; /* number of distance code lengths */ - this.have = 0; /* number of code lengths in lens[] */ - this.next = null; /* next available space in codes[] */ - - this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ - this.work = new utils.Buf16(288); /* work area for code table building */ - - /* - because we don't have pointers in js, we use lencode and distcode directly - as buffers so we don't need codes - */ - //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ - this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ - this.distdyn = null; /* dynamic table for distance codes (JS specific) */ - this.sane = 0; /* if false, allow invalid distance too far */ - this.back = 0; /* bits back of last unprocessed length/lit */ - this.was = 0; /* initial length of match */ -} - -function inflateResetKeep(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - strm.total_in = strm.total_out = state.total = 0; - strm.msg = ''; /*Z_NULL*/ - if (state.wrap) { /* to support ill-conceived Java test suite */ - strm.adler = state.wrap & 1; - } - state.mode = HEAD; - state.last = 0; - state.havedict = 0; - state.dmax = 32768; - state.head = null/*Z_NULL*/; - state.hold = 0; - state.bits = 0; - //state.lencode = state.distcode = state.next = state.codes; - state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); - state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); - - state.sane = 1; - state.back = -1; - //Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -function inflateReset(strm) { - var state; - - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - state.wsize = 0; - state.whave = 0; - state.wnext = 0; - return inflateResetKeep(strm); - -} - -function inflateReset2(strm, windowBits) { - var wrap; - var state; - - /* get the state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; - } - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state.window !== null && state.wbits !== windowBits) { - state.window = null; - } - - /* update state and reset the rest of it */ - state.wrap = wrap; - state.wbits = windowBits; - return inflateReset(strm); -} - -function inflateInit2(strm, windowBits) { - var ret; - var state; - - if (!strm) { return Z_STREAM_ERROR; } - //strm.msg = Z_NULL; /* in case we return an error */ - - state = new InflateState(); - - //if (state === Z_NULL) return Z_MEM_ERROR; - //Tracev((stderr, "inflate: allocated\n")); - strm.state = state; - state.window = null/*Z_NULL*/; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null/*Z_NULL*/; - } - return ret; -} - -function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); -} - - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -var virgin = true; - -var lenfix, distfix; // We have no pointers in JS, so keep tables separate - -function fixedtables(state) { - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - var sym; - - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - - /* literal/length table */ - sym = 0; - while (sym < 144) { state.lens[sym++] = 8; } - while (sym < 256) { state.lens[sym++] = 9; } - while (sym < 280) { state.lens[sym++] = 7; } - while (sym < 288) { state.lens[sym++] = 8; } - - inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); - - /* distance table */ - sym = 0; - while (sym < 32) { state.lens[sym++] = 5; } - - inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); - - /* do this just once */ - virgin = false; - } - - state.lencode = lenfix; - state.lenbits = 9; - state.distcode = distfix; - state.distbits = 5; -} - - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -function updatewindow(strm, src, end, copy) { - var dist; - var state = strm.state; - - /* if it hasn't been done already, allocate space for the window */ - if (state.window === null) { - state.wsize = 1 << state.wbits; - state.wnext = 0; - state.whave = 0; - - state.window = new utils.Buf8(state.wsize); - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state.wsize) { - utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); - state.wnext = 0; - state.whave = state.wsize; - } - else { - dist = state.wsize - state.wnext; - if (dist > copy) { - dist = copy; - } - //zmemcpy(state->window + state->wnext, end - copy, dist); - utils.arraySet(state.window, src, end - copy, dist, state.wnext); - copy -= dist; - if (copy) { - //zmemcpy(state->window, end - copy, copy); - utils.arraySet(state.window, src, end - copy, copy, 0); - state.wnext = copy; - state.whave = state.wsize; - } - else { - state.wnext += dist; - if (state.wnext === state.wsize) { state.wnext = 0; } - if (state.whave < state.wsize) { state.whave += dist; } - } - } - return 0; -} - -function inflate(strm, flush) { - var state; - var input, output; // input/output buffers - var next; /* next input INDEX */ - var put; /* next output INDEX */ - var have, left; /* available input and output */ - var hold; /* bit buffer */ - var bits; /* bits in bit buffer */ - var _in, _out; /* save starting available input and output */ - var copy; /* number of stored or match bytes to copy */ - var from; /* where to copy match bytes from */ - var from_source; - var here = 0; /* current decoding table entry */ - var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) - //var last; /* parent table entry */ - var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) - var len; /* length to copy for repeats, bits to drop */ - var ret; /* return code */ - var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ - var opts; - - var n; // temporary var for NEED_BITS - - var order = /* permutation of code lengths */ - [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; - - - if (!strm || !strm.state || !strm.output || - (!strm.input && strm.avail_in !== 0)) { - return Z_STREAM_ERROR; - } - - state = strm.state; - if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ - - - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - _in = have; - _out = left; - ret = Z_OK; - - inf_leave: // goto emulation - for (;;) { - switch (state.mode) { - case HEAD: - if (state.wrap === 0) { - state.mode = TYPEDO; - break; - } - //=== NEEDBITS(16); - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - state.check = 0/*crc32(0L, Z_NULL, 0)*/; - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = FLAGS; - break; - } - state.flags = 0; /* expect zlib header */ - if (state.head) { - state.head.done = false; - } - if (!(state.wrap & 1) || /* check if zlib header allowed */ - (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { - strm.msg = 'incorrect header check'; - state.mode = BAD; - break; - } - if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// - len = (hold & 0x0f)/*BITS(4)*/ + 8; - if (state.wbits === 0) { - state.wbits = len; - } - else if (len > state.wbits) { - strm.msg = 'invalid window size'; - state.mode = BAD; - break; - } - state.dmax = 1 << len; - //Tracev((stderr, "inflate: zlib header ok\n")); - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = hold & 0x200 ? DICTID : TYPE; - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - break; - case FLAGS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.flags = hold; - if ((state.flags & 0xff) !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - if (state.flags & 0xe000) { - strm.msg = 'unknown header flags set'; - state.mode = BAD; - break; - } - if (state.head) { - state.head.text = ((hold >> 8) & 1); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = TIME; - /* falls through */ - case TIME: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.time = hold; - } - if (state.flags & 0x0200) { - //=== CRC4(state.check, hold) - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - hbuf[2] = (hold >>> 16) & 0xff; - hbuf[3] = (hold >>> 24) & 0xff; - state.check = crc32(state.check, hbuf, 4, 0); - //=== - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = OS; - /* falls through */ - case OS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.xflags = (hold & 0xff); - state.head.os = (hold >> 8); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state.flags & 0x0400) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length = hold; - if (state.head) { - state.head.extra_len = hold; - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - else if (state.head) { - state.head.extra = null/*Z_NULL*/; - } - state.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state.flags & 0x0400) { - copy = state.length; - if (copy > have) { copy = have; } - if (copy) { - if (state.head) { - len = state.head.extra_len - state.length; - if (!state.head.extra) { - // Use untyped array for more convenient processing later - state.head.extra = new Array(state.head.extra_len); - } - utils.arraySet( - state.head.extra, - input, - next, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - //zmemcpy(state.head.extra + len, next, - // len + copy > state.head.extra_max ? - // state.head.extra_max - len : copy); - } - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - state.length -= copy; - } - if (state.length) { break inf_leave; } - } - state.length = 0; - state.mode = NAME; - /* falls through */ - case NAME: - if (state.flags & 0x0800) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - // TODO: 2 or 1 bytes? - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.name_max*/)) { - state.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.name = null; - } - state.length = 0; - state.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state.flags & 0x1000) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.comm_max*/)) { - state.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.comment = null; - } - state.mode = HCRC; - /* falls through */ - case HCRC: - if (state.flags & 0x0200) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.check & 0xffff)) { - strm.msg = 'header crc mismatch'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - if (state.head) { - state.head.hcrc = ((state.flags >> 9) & 1); - state.head.done = true; - } - strm.adler = state.check = 0; - state.mode = TYPE; - break; - case DICTID: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - strm.adler = state.check = zswap32(hold); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = DICT; - /* falls through */ - case DICT: - if (state.havedict === 0) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - return Z_NEED_DICT; - } - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } - /* falls through */ - case TYPEDO: - if (state.last) { - //--- BYTEBITS() ---// - hold >>>= bits & 7; - bits -= bits & 7; - //---// - state.mode = CHECK; - break; - } - //=== NEEDBITS(3); */ - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.last = (hold & 0x01)/*BITS(1)*/; - //--- DROPBITS(1) ---// - hold >>>= 1; - bits -= 1; - //---// - - switch ((hold & 0x03)/*BITS(2)*/) { - case 0: /* stored block */ - //Tracev((stderr, "inflate: stored block%s\n", - // state.last ? " (last)" : "")); - state.mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - //Tracev((stderr, "inflate: fixed codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = LEN_; /* decode codes */ - if (flush === Z_TREES) { - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break inf_leave; - } - break; - case 2: /* dynamic block */ - //Tracev((stderr, "inflate: dynamic codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = TABLE; - break; - case 3: - strm.msg = 'invalid block type'; - state.mode = BAD; - } - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break; - case STORED: - //--- BYTEBITS() ---// /* go to byte boundary */ - hold >>>= bits & 7; - bits -= bits & 7; - //---// - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { - strm.msg = 'invalid stored block lengths'; - state.mode = BAD; - break; - } - state.length = hold & 0xffff; - //Tracev((stderr, "inflate: stored length %u\n", - // state.length)); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = COPY_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case COPY_: - state.mode = COPY; - /* falls through */ - case COPY: - copy = state.length; - if (copy) { - if (copy > have) { copy = have; } - if (copy > left) { copy = left; } - if (copy === 0) { break inf_leave; } - //--- zmemcpy(put, next, copy); --- - utils.arraySet(output, input, next, copy, put); - //---// - have -= copy; - next += copy; - left -= copy; - put += copy; - state.length -= copy; - break; - } - //Tracev((stderr, "inflate: stored end\n")); - state.mode = TYPE; - break; - case TABLE: - //=== NEEDBITS(14); */ - while (bits < 14) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// -//#ifndef PKZIP_BUG_WORKAROUND - if (state.nlen > 286 || state.ndist > 30) { - strm.msg = 'too many length or distance symbols'; - state.mode = BAD; - break; - } -//#endif - //Tracev((stderr, "inflate: table sizes ok\n")); - state.have = 0; - state.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state.have < state.ncode) { - //=== NEEDBITS(3); - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - while (state.have < 19) { - state.lens[order[state.have++]] = 0; - } - // We have separate tables & no pointers. 2 commented lines below not needed. - //state.next = state.codes; - //state.lencode = state.next; - // Switch to use dynamic table - state.lencode = state.lendyn; - state.lenbits = 7; - - opts = { bits: state.lenbits }; - ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); - state.lenbits = opts.bits; - - if (ret) { - strm.msg = 'invalid code lengths set'; - state.mode = BAD; - break; - } - //Tracev((stderr, "inflate: code lengths ok\n")); - state.have = 0; - state.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state.have < state.nlen + state.ndist) { - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_val < 16) { - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.lens[state.have++] = here_val; - } - else { - if (here_val === 16) { - //=== NEEDBITS(here.bits + 2); - n = here_bits + 2; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - if (state.have === 0) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - len = state.lens[state.have - 1]; - copy = 3 + (hold & 0x03);//BITS(2); - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - } - else if (here_val === 17) { - //=== NEEDBITS(here.bits + 3); - n = here_bits + 3; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 3 + (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - else { - //=== NEEDBITS(here.bits + 7); - n = here_bits + 7; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 11 + (hold & 0x7f);//BITS(7); - //--- DROPBITS(7) ---// - hold >>>= 7; - bits -= 7; - //---// - } - if (state.have + copy > state.nlen + state.ndist) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - while (copy--) { - state.lens[state.have++] = len; - } - } - } - - /* handle error breaks in while */ - if (state.mode === BAD) { break; } - - /* check for end-of-block code (better have one) */ - if (state.lens[256] === 0) { - strm.msg = 'invalid code -- missing end-of-block'; - state.mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state.lenbits = 9; - - opts = { bits: state.lenbits }; - ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.lenbits = opts.bits; - // state.lencode = state.next; - - if (ret) { - strm.msg = 'invalid literal/lengths set'; - state.mode = BAD; - break; - } - - state.distbits = 6; - //state.distcode.copy(state.codes); - // Switch to use dynamic table - state.distcode = state.distdyn; - opts = { bits: state.distbits }; - ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.distbits = opts.bits; - // state.distcode = state.next; - - if (ret) { - strm.msg = 'invalid distances set'; - state.mode = BAD; - break; - } - //Tracev((stderr, 'inflate: codes ok\n')); - state.mode = LEN_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case LEN_: - state.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - inflate_fast(strm, _out); - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - if (state.mode === TYPE) { - state.back = -1; - } - break; - } - state.back = 0; - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if (here_bits <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_op && (here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.lencode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - state.length = here_val; - if (here_op === 0) { - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - state.mode = LIT; - break; - } - if (here_op & 32) { - //Tracevv((stderr, "inflate: end of block\n")); - state.back = -1; - state.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break; - } - state.extra = here_op & 15; - state.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } - //Tracevv((stderr, "inflate: length %u\n", state.length)); - state.was = state.length; - state.mode = DIST; - /* falls through */ - case DIST: - for (;;) { - here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if ((here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.distcode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - if (here_op & 64) { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break; - } - state.offset = here_val; - state.extra = (here_op) & 15; - state.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } -//#ifdef INFLATE_STRICT - if (state.offset > state.dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -//#endif - //Tracevv((stderr, "inflate: distance %u\n", state.offset)); - state.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { break inf_leave; } - copy = _out - left; - if (state.offset > copy) { /* copy from window */ - copy = state.offset - copy; - if (copy > state.whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// Trace((stderr, "inflate.c too far\n")); -// copy -= state.whave; -// if (copy > state.length) { copy = state.length; } -// if (copy > left) { copy = left; } -// left -= copy; -// state.length -= copy; -// do { -// output[put++] = 0; -// } while (--copy); -// if (state.length === 0) { state.mode = LEN; } -// break; -//#endif - } - if (copy > state.wnext) { - copy -= state.wnext; - from = state.wsize - copy; - } - else { - from = state.wnext - copy; - } - if (copy > state.length) { copy = state.length; } - from_source = state.window; - } - else { /* copy from output */ - from_source = output; - from = put - state.offset; - copy = state.length; - } - if (copy > left) { copy = left; } - left -= copy; - state.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state.length === 0) { state.mode = LEN; } - break; - case LIT: - if (left === 0) { break inf_leave; } - output[put++] = state.length; - left--; - state.mode = LEN; - break; - case CHECK: - if (state.wrap) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - // Use '|' instead of '+' to make sure that result is signed - hold |= input[next++] << bits; - bits += 8; - } - //===// - _out -= left; - strm.total_out += _out; - state.total += _out; - if (_out) { - strm.adler = state.check = - /*UPDATE(state.check, put - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); - - } - _out = left; - // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too - if ((state.flags ? hold : zswap32(hold)) !== state.check) { - strm.msg = 'incorrect data check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: check matches trailer\n")); - } - state.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state.wrap && state.flags) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.total & 0xffffffff)) { - strm.msg = 'incorrect length check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: length matches trailer\n")); - } - state.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; - } - } - - // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - - if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && - (state.mode < CHECK || flush !== Z_FINISH))) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state.mode = MEM; - return Z_MEM_ERROR; - } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state.total += _out; - if (state.wrap && _out) { - strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); - } - strm.data_type = state.bits + (state.last ? 64 : 0) + - (state.mode === TYPE ? 128 : 0) + - (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); - if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; -} - -function inflateEnd(strm) { - - if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { - return Z_STREAM_ERROR; - } - - var state = strm.state; - if (state.window) { - state.window = null; - } - strm.state = null; - return Z_OK; -} - -function inflateGetHeader(strm, head) { - var state; - - /* check state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } - - /* save header structure */ - state.head = head; - head.done = false; - return Z_OK; -} - -function inflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var state; - var dictid; - var ret; - - /* check state */ - if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } - state = strm.state; - - if (state.wrap !== 0 && state.mode !== DICT) { - return Z_STREAM_ERROR; - } - - /* check for correct dictionary identifier */ - if (state.mode === DICT) { - dictid = 1; /* adler32(0, null, 0)*/ - /* dictid = adler32(dictid, dictionary, dictLength); */ - dictid = adler32(dictid, dictionary, dictLength, 0); - if (dictid !== state.check) { - return Z_DATA_ERROR; - } - } - /* copy dictionary to window using updatewindow(), which will amend the - existing dictionary if appropriate */ - ret = updatewindow(strm, dictionary, dictLength, dictLength); - if (ret) { - state.mode = MEM; - return Z_MEM_ERROR; - } - state.havedict = 1; - // Tracev((stderr, "inflate: dictionary set\n")); - return Z_OK; -} - -exports.inflateReset = inflateReset; -exports.inflateReset2 = inflateReset2; -exports.inflateResetKeep = inflateResetKeep; -exports.inflateInit = inflateInit; -exports.inflateInit2 = inflateInit2; -exports.inflate = inflate; -exports.inflateEnd = inflateEnd; -exports.inflateGetHeader = inflateGetHeader; -exports.inflateSetDictionary = inflateSetDictionary; -exports.inflateInfo = 'pako inflate (from Nodeca project)'; - -/* Not implemented -exports.inflateCopy = inflateCopy; -exports.inflateGetDictionary = inflateGetDictionary; -exports.inflateMark = inflateMark; -exports.inflatePrime = inflatePrime; -exports.inflateSync = inflateSync; -exports.inflateSyncPoint = inflateSyncPoint; -exports.inflateUndermine = inflateUndermine; -*/ diff --git a/node_modules/pako/lib/zlib/inftrees.js b/node_modules/pako/lib/zlib/inftrees.js deleted file mode 100644 index ec4e4e90..00000000 --- a/node_modules/pako/lib/zlib/inftrees.js +++ /dev/null @@ -1,343 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); - -var MAXBITS = 15; -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -var lbase = [ /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 -]; - -var lext = [ /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 -]; - -var dbase = [ /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0 -]; - -var dext = [ /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64 -]; - -module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) -{ - var bits = opts.bits; - //here = opts.here; /* table entry for duplication */ - - var len = 0; /* a code's length in bits */ - var sym = 0; /* index of code symbols */ - var min = 0, max = 0; /* minimum and maximum code lengths */ - var root = 0; /* number of index bits for root table */ - var curr = 0; /* number of index bits for current table */ - var drop = 0; /* code bits to drop for sub-table */ - var left = 0; /* number of prefix codes available */ - var used = 0; /* code entries in table used */ - var huff = 0; /* Huffman code */ - var incr; /* for incrementing code, index */ - var fill; /* index for replicating entries */ - var low; /* low bits for current root entry */ - var mask; /* mask for low root bits */ - var next; /* next available space in table */ - var base = null; /* base value table to use */ - var base_index = 0; -// var shoextra; /* extra bits table to use */ - var end; /* use base and extra for symbol > end */ - var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ - var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ - var extra = null; - var extra_index = 0; - - var here_bits, here_op, here_val; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } - - /* bound code lengths, force root to be within code lengths */ - root = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { break; } - } - if (root > max) { - root = max; - } - if (max === 0) { /* no symbols to code at all */ - //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ - //table.bits[opts.table_index] = 1; //here.bits = (var char)1; - //table.val[opts.table_index++] = 0; //here.val = (var short)0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - - //table.op[opts.table_index] = 64; - //table.bits[opts.table_index] = 1; - //table.val[opts.table_index++] = 0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; - - opts.bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { break; } - } - if (root < min) { - root = min; - } - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } /* over-subscribed */ - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; /* incomplete set */ - } - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; - } - } - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - // poor man optimization - use if-else instead of switch, - // to avoid deopts in old v8 - if (type === CODES) { - base = extra = work; /* dummy value--not used */ - end = 19; - - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - - } else { /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize opts for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = table_index; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = -1; /* trigger new sub-table when len > root */ - used = 1 << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* process all codes and make table entries */ - for (;;) { - /* create table entry */ - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } - else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; - } - else { - here_op = 32 + 64; /* end of block */ - here_val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1 << (len - drop); - fill = 1 << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; - } while (fill !== 0); - - /* backwards increment the len-bit code huff */ - incr = 1 << (len - 1); - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } - - /* go to next symbol, update count, len */ - sym++; - if (--count[len] === 0) { - if (len === max) { break; } - len = lens[lens_index + work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) !== low) { - /* if first time, transition to sub-tables */ - if (drop === 0) { - drop = root; - } - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { break; } - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1 << curr; - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - - /* point entry in root table to sub-table */ - low = huff & mask; - /*table.op[low] = curr; - table.bits[low] = root; - table.val[low] = next - opts.table_index;*/ - table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff !== 0) { - //table.op[next + huff] = 64; /* invalid code marker */ - //table.bits[next + huff] = len - drop; - //table.val[next + huff] = 0; - table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; - } - - /* set return parameters */ - //opts.table_index += used; - opts.bits = root; - return 0; -}; diff --git a/node_modules/pako/lib/zlib/messages.js b/node_modules/pako/lib/zlib/messages.js deleted file mode 100644 index 426daec6..00000000 --- a/node_modules/pako/lib/zlib/messages.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -module.exports = { - 2: 'need dictionary', /* Z_NEED_DICT 2 */ - 1: 'stream end', /* Z_STREAM_END 1 */ - 0: '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; diff --git a/node_modules/pako/lib/zlib/trees.js b/node_modules/pako/lib/zlib/trees.js deleted file mode 100644 index aaf15dba..00000000 --- a/node_modules/pako/lib/zlib/trees.js +++ /dev/null @@ -1,1222 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -/* eslint-disable space-unary-ops */ - -var utils = require('../utils/common'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -//var Z_FILTERED = 1; -//var Z_HUFFMAN_ONLY = 2; -//var Z_RLE = 3; -var Z_FIXED = 4; -//var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -var Z_BINARY = 0; -var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - -/*============================================================================*/ - - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - -// From zutil.h - -var STORED_BLOCK = 0; -var STATIC_TREES = 1; -var DYN_TREES = 2; -/* The three kinds of block type */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -/* The minimum and maximum match lengths */ - -// From deflate.h -/* =========================================================================== - * Internal compression state. - */ - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ - -var LITERALS = 256; -/* number of literal bytes 0..255 */ - -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ - -var D_CODES = 30; -/* number of distance codes */ - -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ - -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ - -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var Buf_size = 16; -/* size of bit buffer in bi_buf */ - - -/* =========================================================================== - * Constants - */ - -var MAX_BL_BITS = 7; -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -var END_BLOCK = 256; -/* end of block literal code */ - -var REP_3_6 = 16; -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -var REPZ_3_10 = 17; -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -var REPZ_11_138 = 18; -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -/* eslint-disable comma-spacing,array-bracket-spacing */ -var extra_lbits = /* extra bits for each length code */ - [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; - -var extra_dbits = /* extra bits for each distance code */ - [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; - -var extra_blbits = /* extra bits for each bit length code */ - [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; - -var bl_order = - [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; -/* eslint-enable comma-spacing,array-bracket-spacing */ - -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -// We pre-fill arrays with 0 to avoid uninitialized gaps - -var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ - -// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1 -var static_ltree = new Array((L_CODES + 2) * 2); -zero(static_ltree); -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -var static_dtree = new Array(D_CODES * 2); -zero(static_dtree); -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -var _dist_code = new Array(DIST_CODE_LEN); -zero(_dist_code); -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); -zero(_length_code); -/* length code for each normalized match length (0 == MIN_MATCH) */ - -var base_length = new Array(LENGTH_CODES); -zero(base_length); -/* First normalized length for each code (0 = MIN_MATCH) */ - -var base_dist = new Array(D_CODES); -zero(base_dist); -/* First normalized distance for each code (0 = distance of 1) */ - - -function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { - - this.static_tree = static_tree; /* static tree or NULL */ - this.extra_bits = extra_bits; /* extra bits for each code or NULL */ - this.extra_base = extra_base; /* base index for extra_bits */ - this.elems = elems; /* max number of elements in the tree */ - this.max_length = max_length; /* max bit length for the codes */ - - // show if `static_tree` has data or dummy - needed for monomorphic objects - this.has_stree = static_tree && static_tree.length; -} - - -var static_l_desc; -var static_d_desc; -var static_bl_desc; - - -function TreeDesc(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; /* the dynamic tree */ - this.max_code = 0; /* largest code with non zero frequency */ - this.stat_desc = stat_desc; /* the corresponding static tree */ -} - - - -function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; -} - - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -function put_short(s, w) { -// put_byte(s, (uch)((w) & 0xff)); -// put_byte(s, (uch)((ush)(w) >> 8)); - s.pending_buf[s.pending++] = (w) & 0xff; - s.pending_buf[s.pending++] = (w >>> 8) & 0xff; -} - - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -function send_bits(s, value, length) { - if (s.bi_valid > (Buf_size - length)) { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - put_short(s, s.bi_buf); - s.bi_buf = value >> (Buf_size - s.bi_valid); - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - s.bi_valid += length; - } -} - - -function send_code(s, c, tree) { - send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); -} - - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; -} - - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 0xff; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } -} - - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -function gen_bitlen(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; /* heap index */ - var n, m; /* iterate over the tree elements */ - var bits; /* bit length */ - var xbits; /* extra bits */ - var f; /* frequency */ - var overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ - - for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n * 2 + 1]/*.Len*/ = bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) { continue; } /* not a leaf node */ - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n - base]; - } - f = tree[n * 2]/*.Freq*/; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); - } - } - if (overflow === 0) { return; } - - // Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length - 1; - while (s.bl_count[bits] === 0) { bits--; } - s.bl_count[bits]--; /* move one leaf down the tree */ - s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ - s.bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { continue; } - if (tree[m * 2 + 1]/*.Len*/ !== bits) { - // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; - tree[m * 2 + 1]/*.Len*/ = bits; - } - n--; - } - } -} - - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -function gen_codes(tree, max_code, bl_count) -// ct_data *tree; /* the tree to decorate */ -// int max_code; /* largest code with non zero frequency */ -// ushf *bl_count; /* number of codes at each bit length */ -{ - var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ - var code = 0; /* running code value */ - var bits; /* bit index */ - var n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits - 1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES - 1; code++) { - base_length[code] = length; - for (n = 0; n < (1 << extra_lbits[code]); n++) { - _length_code[length++] = code; - } - } - //Assert (length == 256, "tr_static_init: length != 256"); - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - _length_code[length - 1] = code; - - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1 << extra_dbits[code]); n++) { - _dist_code[dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: dist != 256"); - dist >>= 7; /* from now on, all distances are divided by 128 */ - for (; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { - _dist_code[256 + dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } - - n = 0; - while (n <= 143) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n * 2 + 1]/*.Len*/ = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n * 2 + 1]/*.Len*/ = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes(static_ltree, L_CODES + 1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n * 2 + 1]/*.Len*/ = 5; - static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); - } - - // Now data ready and we can init static trees - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - - //static_init_done = true; -} - - -/* =========================================================================== - * Initialize a new block. - */ -function init_block(s) { - var n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } - - s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; -} - - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -function bi_windup(s) -{ - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - //put_byte(s, (Byte)s->bi_buf); - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -function copy_block(s, buf, len, header) -//DeflateState *s; -//charf *buf; /* the input data */ -//unsigned len; /* its length */ -//int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, len); - put_short(s, ~len); - } -// while (len--) { -// put_byte(s, *buf++); -// } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -function smaller(tree, n, m, depth) { - var _n2 = n * 2; - var _m2 = m * 2; - return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || - (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); -} - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -function pqdownheap(s, tree, k) -// deflate_state *s; -// ct_data *tree; /* the tree to restore */ -// int k; /* node to move down */ -{ - var v = s.heap[k]; - var j = k << 1; /* left son of k */ - while (j <= s.heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s.heap_len && - smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s.heap[j], s.depth)) { break; } - - /* Exchange v with the smallest son */ - s.heap[k] = s.heap[j]; - k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s.heap[k] = v; -} - - -// inlined manually -// var SMALLEST = 1; - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -function compress_block(s, ltree, dtree) -// deflate_state *s; -// const ct_data *ltree; /* literal tree */ -// const ct_data *dtree; /* distance tree */ -{ - var dist; /* distance of matched string */ - var lc; /* match length or unmatched char (if dist == 0) */ - var lx = 0; /* running index in l_buf */ - var code; /* the code to send */ - var extra; /* number of extra bits to send */ - - if (s.last_lit !== 0) { - do { - dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); - lc = s.pending_buf[s.l_buf + lx]; - lx++; - - if (dist === 0) { - send_code(s, lc, ltree); /* send a literal byte */ - //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code + LITERALS + 1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - //Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - // "pendingBuf overflow"); - - } while (lx < s.last_lit); - } - - send_code(s, END_BLOCK, ltree); -} - - -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -function build_tree(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; /* iterate over heap elements */ - var max_code = -1; /* largest code with non zero frequency */ - var node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s.heap_len = 0; - s.heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n * 2]/*.Freq*/ !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; - - } else { - tree[n * 2 + 1]/*.Len*/ = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); - tree[node * 2]/*.Freq*/ = 1; - s.depth[node] = 0; - s.opt_len--; - - if (has_stree) { - s.static_len -= stree[node * 2 + 1]/*.Len*/; - } - /* node is 0 or 1 so it does not have extra bits */ - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - //pqremove(s, tree, n); /* n = node of least frequency */ - /*** pqremove ***/ - n = s.heap[1/*SMALLEST*/]; - s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; - pqdownheap(s, tree, 1/*SMALLEST*/); - /***/ - - m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ - - s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ - s.heap[--s.heap_max] = m; - - /* Create a new node father of n and m */ - tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; - - /* and insert the new node in the heap */ - s.heap[1/*SMALLEST*/] = node++; - pqdownheap(s, tree, 1/*SMALLEST*/); - - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes(tree, max_code, s.bl_count); -} - - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -function scan_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - s.bl_tree[curlen * 2]/*.Freq*/ += count; - - } else if (curlen !== 0) { - - if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } - s.bl_tree[REP_3_6 * 2]/*.Freq*/++; - - } else if (count <= 10) { - s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; - - } else { - s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; - } - - count = 0; - prevlen = curlen; - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -function send_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); - - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - //Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count - 3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count - 3, 3); - - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count - 11, 7); - } - - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; - - } else { - max_count = 7; - min_count = 4; - } - } -} - - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -function build_bl_tree(s) { - var max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, s.bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { - break; - } - } - /* Update opt_len to include the bit length tree and counts */ - s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - // s->opt_len, s->static_len)); - - return max_blindex; -} - - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -function send_all_trees(s, lcodes, dcodes, blcodes) -// deflate_state *s; -// int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - var rank; /* index in bl_order */ - - //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - // "too many codes"); - //Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes - 1, 5); - send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); - } - //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ - //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ - //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -function detect_data_type(s) { - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - var black_mask = 0xf3ffc07f; - var n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { - return Z_BINARY; - } - } - - /* Check for textual ("white-listed") bytes. */ - if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || - s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - } - - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - - -var static_init_done = false; - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -function _tr_init(s) -{ - - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - - s.bi_buf = 0; - s.bi_valid = 0; - - /* Initialize the first block of the first file: */ - init_block(s); -} - - -/* =========================================================================== - * Send a stored block - */ -function _tr_stored_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ - copy_block(s, buf, stored_len, true); /* with header */ -} - - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -function _tr_align(s) { - send_bits(s, STATIC_TREES << 1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); -} - - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ -function _tr_flush_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block, or NULL if too old */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - var max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s.level > 0) { - - /* Check if the file is binary or text */ - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - - /* Construct the literal and distance trees */ - build_tree(s, s.l_desc); - // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - - build_tree(s, s.d_desc); - // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s.opt_len + 3 + 7) >>> 3; - static_lenb = (s.static_len + 3 + 7) >>> 3; - - // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->last_lit)); - - if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } - - } else { - // Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - - if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { - /* 4: two words for the lengths */ - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { - - send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); - - } else { - send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); - } - // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - // s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -function _tr_tally(s, dist, lc) -// deflate_state *s; -// unsigned dist; /* distance of matched string */ -// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - //var out_length, in_length, dcode; - - s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; - - s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; - s.last_lit++; - - if (dist === 0) { - /* lc is the unmatched char */ - s.dyn_ltree[lc * 2]/*.Freq*/++; - } else { - s.matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - //Assert((ush)dist < (ush)MAX_DIST(s) && - // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; - s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; - } - -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility - -//#ifdef TRUNCATE_BLOCK -// /* Try to guess if it is profitable to stop the current block here */ -// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { -// /* Compute an upper bound for the compressed length */ -// out_length = s.last_lit*8; -// in_length = s.strstart - s.block_start; -// -// for (dcode = 0; dcode < D_CODES; dcode++) { -// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); -// } -// out_length >>>= 3; -// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", -// // s->last_lit, in_length, out_length, -// // 100L - out_length*100L/in_length)); -// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { -// return true; -// } -// } -//#endif - - return (s.last_lit === s.lit_bufsize - 1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -exports._tr_init = _tr_init; -exports._tr_stored_block = _tr_stored_block; -exports._tr_flush_block = _tr_flush_block; -exports._tr_tally = _tr_tally; -exports._tr_align = _tr_align; diff --git a/node_modules/pako/lib/zlib/zstream.js b/node_modules/pako/lib/zlib/zstream.js deleted file mode 100644 index 122acfef..00000000 --- a/node_modules/pako/lib/zlib/zstream.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; -} - -module.exports = ZStream; diff --git a/node_modules/pako/package.json b/node_modules/pako/package.json deleted file mode 100644 index 8d914afd..00000000 --- a/node_modules/pako/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "_from": "pako@^1.0.10", - "_id": "pako@1.0.11", - "_inBundle": false, - "_integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "_location": "/pako", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "pako@^1.0.10", - "name": "pako", - "escapedName": "pako", - "rawSpec": "^1.0.10", - "saveSpec": null, - "fetchSpec": "^1.0.10" - }, - "_requiredBy": [ - "/isomorphic-git" - ], - "_resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "_shasum": "6c9599d340d54dfd3946380252a35705a6b992bf", - "_spec": "pako@^1.0.10", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/isomorphic-git", - "bugs": { - "url": "https://github.com/nodeca/pako/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Andrei Tuputcyn", - "url": "https://github.com/andr83" - }, - { - "name": "Vitaly Puzrin", - "url": "https://github.com/puzrin" - }, - { - "name": "Friedel Ziegelmayer", - "url": "https://github.com/dignifiedquire" - }, - { - "name": "Kirill Efimov", - "url": "https://github.com/Kirill89" - }, - { - "name": "Jean-loup Gailly" - }, - { - "name": "Mark Adler" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "zlib port to javascript - fast, modularized, with browser support", - "devDependencies": { - "ansi": "^0.3.1", - "benchmark": "^2.1.4", - "browserify": "^16.2.3", - "buffer-from": "^1.1.1", - "eslint": "^5.9.0", - "istanbul": "^0.4.5", - "mocha": "^5.2.0", - "multiparty": "^4.1.3", - "ndoc": "^5.0.1", - "uglify-js": "=3.4.8", - "zlibjs": "^0.3.1" - }, - "files": [ - "index.js", - "dist/", - "lib/" - ], - "homepage": "https://github.com/nodeca/pako", - "keywords": [ - "zlib", - "deflate", - "inflate", - "gzip" - ], - "license": "(MIT AND Zlib)", - "name": "pako", - "repository": { - "type": "git", - "url": "git+https://github.com/nodeca/pako.git" - }, - "scripts": { - "test": "make test" - }, - "version": "1.0.11" -} diff --git a/node_modules/path-dirname/index.js b/node_modules/path-dirname/index.js deleted file mode 100644 index ed67817a..00000000 --- a/node_modules/path-dirname/index.js +++ /dev/null @@ -1,143 +0,0 @@ -'use strict'; - -var path = require('path'); -var inspect = require('util').inspect; - -function assertPath(path) { - if (typeof path !== 'string') { - throw new TypeError('Path must be a string. Received ' + inspect(path)); - } -} - -function posix(path) { - assertPath(path); - if (path.length === 0) - return '.'; - var code = path.charCodeAt(0); - var hasRoot = (code === 47/*/*/); - var end = -1; - var matchedSlash = true; - for (var i = path.length - 1; i >= 1; --i) { - code = path.charCodeAt(i); - if (code === 47/*/*/) { - if (!matchedSlash) { - end = i; - break; - } - } else { - // We saw the first non-path separator - matchedSlash = false; - } - } - - if (end === -1) - return hasRoot ? '/' : '.'; - if (hasRoot && end === 1) - return '//'; - return path.slice(0, end); -} - -function win32(path) { - assertPath(path); - var len = path.length; - if (len === 0) - return '.'; - var rootEnd = -1; - var end = -1; - var matchedSlash = true; - var offset = 0; - var code = path.charCodeAt(0); - - // Try to match a root - if (len > 1) { - if (code === 47/*/*/ || code === 92/*\*/) { - // Possible UNC root - - rootEnd = offset = 1; - - code = path.charCodeAt(1); - if (code === 47/*/*/ || code === 92/*\*/) { - // Matched double path separator at beginning - var j = 2; - var last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - code = path.charCodeAt(j); - if (code === 47/*/*/ || code === 92/*\*/) - break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more path separators - for (; j < len; ++j) { - code = path.charCodeAt(j); - if (code !== 47/*/*/ && code !== 92/*\*/) - break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - code = path.charCodeAt(j); - if (code === 47/*/*/ || code === 92/*\*/) - break; - } - if (j === len) { - // We matched a UNC root only - return path; - } - if (j !== last) { - // We matched a UNC root with leftovers - - // Offset by 1 to include the separator after the UNC root to - // treat it as a "normal root" on top of a (UNC) root - rootEnd = offset = j + 1; - } - } - } - } - } else if ((code >= 65/*A*/ && code <= 90/*Z*/) || - (code >= 97/*a*/ && code <= 122/*z*/)) { - // Possible device root - - code = path.charCodeAt(1); - if (path.charCodeAt(1) === 58/*:*/) { - rootEnd = offset = 2; - if (len > 2) { - code = path.charCodeAt(2); - if (code === 47/*/*/ || code === 92/*\*/) - rootEnd = offset = 3; - } - } - } - } else if (code === 47/*/*/ || code === 92/*\*/) { - return path[0]; - } - - for (var i = len - 1; i >= offset; --i) { - code = path.charCodeAt(i); - if (code === 47/*/*/ || code === 92/*\*/) { - if (!matchedSlash) { - end = i; - break; - } - } else { - // We saw the first non-path separator - matchedSlash = false; - } - } - - if (end === -1) { - if (rootEnd === -1) - return '.'; - else - end = rootEnd; - } - return path.slice(0, end); -} - -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; diff --git a/node_modules/path-dirname/license b/node_modules/path-dirname/license deleted file mode 100644 index 1981663a..00000000 --- a/node_modules/path-dirname/license +++ /dev/null @@ -1,22 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) Elan Shanker and Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/path-dirname/package.json b/node_modules/path-dirname/package.json deleted file mode 100644 index 0d7c8ae1..00000000 --- a/node_modules/path-dirname/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "path-dirname@^1.0.0", - "_id": "path-dirname@1.0.2", - "_inBundle": false, - "_integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "_location": "/path-dirname", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "path-dirname@^1.0.0", - "name": "path-dirname", - "escapedName": "path-dirname", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/glob-parent" - ], - "_resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "_shasum": "cc33d24d525e099a5388c0336c6e32b9160609e0", - "_spec": "path-dirname@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/glob-parent", - "author": { - "name": "Elan Shanker" - }, - "bugs": { - "url": "https://github.com/es128/path-dirname/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Node.js path.dirname() ponyfill", - "files": [ - "index.js" - ], - "homepage": "https://github.com/es128/path-dirname#readme", - "keywords": [ - "dirname", - "dir", - "path", - "paths", - "file", - "built-in", - "util", - "utils", - "core", - "stdlib", - "ponyfill", - "polyfill", - "shim" - ], - "license": "MIT", - "name": "path-dirname", - "repository": { - "type": "git", - "url": "git+https://github.com/es128/path-dirname.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.2" -} diff --git a/node_modules/path-dirname/readme.md b/node_modules/path-dirname/readme.md deleted file mode 100644 index 652a5623..00000000 --- a/node_modules/path-dirname/readme.md +++ /dev/null @@ -1,53 +0,0 @@ -# path-dirname [![Build Status](https://travis-ci.org/es128/path-dirname.svg?branch=master)](https://travis-ci.org/es128/path-dirname) - -> Node.js [`path.dirname()`](https://nodejs.org/api/path.html#path_path_dirname_path) [ponyfill](https://ponyfill.com) - -This was needed in order to expose `path.posix.dirname()` on Node.js v0.10 - -## Install - -``` -$ npm install --save path-dirname -``` - - -## Usage - -```js -const pathDirname = require('path-dirname'); - -pathDirname('/home/foo'); -//=> '/home' -pathDirname('C:\\Users\\foo'); -//=> 'C:\\Users' -pathDirname('foo'); -//=> '.' -pathDirname('foo/bar'); -//=> 'foo' - -//Using posix version for consistent output when dealing with glob escape chars -pathDirname.win32('C:\\Users\\foo/\\*bar'); -//=> 'C:\\Users\\foo/' -pathDirname.posix('C:\\Users\\foo/\\*bar'); -//=> 'C:\\Users\\foo' -``` - - -## API - -See the [`path.dirname()` docs](https://nodejs.org/api/path.html#path_path_dirname_path). - -### pathDirname(path) - -### pathDirname.posix(path) - -POSIX specific version. - -### pathDirname.win32(path) - -Windows specific version. - - -## License - -MIT diff --git a/node_modules/path-is-absolute/index.js b/node_modules/path-is-absolute/index.js deleted file mode 100644 index 22aa6c35..00000000 --- a/node_modules/path-is-absolute/index.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -function posix(path) { - return path.charAt(0) === '/'; -} - -function win32(path) { - // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path); - var device = result[1] || ''; - var isUnc = Boolean(device && device.charAt(1) !== ':'); - - // UNC paths are always absolute - return Boolean(result[2] || isUnc); -} - -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; diff --git a/node_modules/path-is-absolute/license b/node_modules/path-is-absolute/license deleted file mode 100644 index 654d0bfe..00000000 --- a/node_modules/path-is-absolute/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/path-is-absolute/package.json b/node_modules/path-is-absolute/package.json deleted file mode 100644 index 24ec62ac..00000000 --- a/node_modules/path-is-absolute/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_from": "path-is-absolute@^1.0.0", - "_id": "path-is-absolute@1.0.1", - "_inBundle": false, - "_integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "_location": "/path-is-absolute", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "path-is-absolute@^1.0.0", - "name": "path-is-absolute", - "escapedName": "path-is-absolute", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/glob" - ], - "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "_shasum": "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f", - "_spec": "path-is-absolute@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/glob", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/path-is-absolute/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Node.js 0.12 path.isAbsolute() ponyfill", - "devDependencies": { - "xo": "^0.16.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/path-is-absolute#readme", - "keywords": [ - "path", - "paths", - "file", - "dir", - "absolute", - "isabsolute", - "is-absolute", - "built-in", - "util", - "utils", - "core", - "ponyfill", - "polyfill", - "shim", - "is", - "detect", - "check" - ], - "license": "MIT", - "name": "path-is-absolute", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/path-is-absolute.git" - }, - "scripts": { - "test": "xo && node test.js" - }, - "version": "1.0.1" -} diff --git a/node_modules/path-is-absolute/readme.md b/node_modules/path-is-absolute/readme.md deleted file mode 100644 index 8dbdf5fc..00000000 --- a/node_modules/path-is-absolute/readme.md +++ /dev/null @@ -1,59 +0,0 @@ -# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) - -> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com) - - -## Install - -``` -$ npm install --save path-is-absolute -``` - - -## Usage - -```js -const pathIsAbsolute = require('path-is-absolute'); - -// Running on Linux -pathIsAbsolute('/home/foo'); -//=> true -pathIsAbsolute('C:/Users/foo'); -//=> false - -// Running on Windows -pathIsAbsolute('C:/Users/foo'); -//=> true -pathIsAbsolute('/home/foo'); -//=> false - -// Running on any OS -pathIsAbsolute.posix('/home/foo'); -//=> true -pathIsAbsolute.posix('C:/Users/foo'); -//=> false -pathIsAbsolute.win32('C:/Users/foo'); -//=> true -pathIsAbsolute.win32('/home/foo'); -//=> false -``` - - -## API - -See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). - -### pathIsAbsolute(path) - -### pathIsAbsolute.posix(path) - -POSIX specific version. - -### pathIsAbsolute.win32(path) - -Windows specific version. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/pend/LICENSE b/node_modules/pend/LICENSE deleted file mode 100644 index 0bbb53ed..00000000 --- a/node_modules/pend/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (Expat) - -Copyright (c) 2014 Andrew Kelley - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation files -(the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/pend/README.md b/node_modules/pend/README.md deleted file mode 100644 index bb40a07c..00000000 --- a/node_modules/pend/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# Pend - -Dead-simple optimistic async helper. - -## Usage - -```js -var Pend = require('pend'); -var pend = new Pend(); -pend.max = 10; // defaults to Infinity -setTimeout(pend.hold(), 1000); // pend.wait will have to wait for this hold to finish -pend.go(function(cb) { - console.log("this function is immediately executed"); - setTimeout(function() { - console.log("calling cb 1"); - cb(); - }, 500); -}); -pend.go(function(cb) { - console.log("this function is also immediately executed"); - setTimeout(function() { - console.log("calling cb 2"); - cb(); - }, 1000); -}); -pend.wait(function(err) { - console.log("this is excuted when the first 2 have returned."); - console.log("err is a possible error in the standard callback style."); -}); -``` - -Output: - -``` -this function is immediately executed -this function is also immediately executed -calling cb 1 -calling cb 2 -this is excuted when the first 2 have returned. -err is a possible error in the standard callback style. -``` diff --git a/node_modules/pend/index.js b/node_modules/pend/index.js deleted file mode 100644 index 3bf485ed..00000000 --- a/node_modules/pend/index.js +++ /dev/null @@ -1,55 +0,0 @@ -module.exports = Pend; - -function Pend() { - this.pending = 0; - this.max = Infinity; - this.listeners = []; - this.waiting = []; - this.error = null; -} - -Pend.prototype.go = function(fn) { - if (this.pending < this.max) { - pendGo(this, fn); - } else { - this.waiting.push(fn); - } -}; - -Pend.prototype.wait = function(cb) { - if (this.pending === 0) { - cb(this.error); - } else { - this.listeners.push(cb); - } -}; - -Pend.prototype.hold = function() { - return pendHold(this); -}; - -function pendHold(self) { - self.pending += 1; - var called = false; - return onCb; - function onCb(err) { - if (called) throw new Error("callback called twice"); - called = true; - self.error = self.error || err; - self.pending -= 1; - if (self.waiting.length > 0 && self.pending < self.max) { - pendGo(self, self.waiting.shift()); - } else if (self.pending === 0) { - var listeners = self.listeners; - self.listeners = []; - listeners.forEach(cbListener); - } - } - function cbListener(listener) { - listener(self.error); - } -} - -function pendGo(self, fn) { - fn(pendHold(self)); -} diff --git a/node_modules/pend/package.json b/node_modules/pend/package.json deleted file mode 100644 index e807dc77..00000000 --- a/node_modules/pend/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "_from": "pend@~1.2.0", - "_id": "pend@1.2.0", - "_inBundle": false, - "_integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", - "_location": "/pend", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "pend@~1.2.0", - "name": "pend", - "escapedName": "pend", - "rawSpec": "~1.2.0", - "saveSpec": null, - "fetchSpec": "~1.2.0" - }, - "_requiredBy": [ - "/fd-slicer" - ], - "_resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "_shasum": "7a57eb550a6783f9115331fcf4663d5c8e007a50", - "_spec": "pend@~1.2.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/fd-slicer", - "author": { - "name": "Andrew Kelley", - "email": "superjoe30@gmail.com" - }, - "bugs": { - "url": "https://github.com/andrewrk/node-pend/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "dead-simple optimistic async helper", - "homepage": "https://github.com/andrewrk/node-pend#readme", - "license": "MIT", - "main": "index.js", - "name": "pend", - "repository": { - "type": "git", - "url": "git://github.com/andrewrk/node-pend.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.2.0" -} diff --git a/node_modules/pend/test.js b/node_modules/pend/test.js deleted file mode 100644 index 75c0f2ac..00000000 --- a/node_modules/pend/test.js +++ /dev/null @@ -1,137 +0,0 @@ -var assert = require('assert'); -var Pend = require('./'); - -var tests = [ - { - name: "basic", - fn: testBasic, - }, - { - name: "max", - fn: testWithMax, - }, - { - name: "callback twice", - fn: testCallbackTwice, - }, - { - name: "calling wait twice", - fn: testCallingWaitTwice, - }, - { - name: "hold()", - fn: testHoldFn, - }, -]; -var testCount = tests.length; - -doOneTest(); - -function doOneTest() { - var test = tests.shift(); - if (!test) { - console.log(testCount + " tests passed."); - return; - } - process.stdout.write(test.name + "..."); - test.fn(function() { - process.stdout.write("OK\n"); - doOneTest(); - }); -} - -function testBasic(cb) { - var pend = new Pend(); - var results = []; - pend.go(function(cb) { - results.push(1); - setTimeout(function() { - results.push(3); - cb(); - }, 500); - }); - pend.go(function(cb) { - results.push(2); - setTimeout(function() { - results.push(4); - cb(); - }, 1000); - }); - pend.wait(function(err) { - assert.deepEqual(results, [1,2,3,4]); - cb(); - }); - assert.deepEqual(results, [1, 2]); -} - -function testWithMax(cb) { - var pend = new Pend(); - var results = []; - pend.max = 2; - pend.go(function(cb) { - results.push('a'); - setTimeout(function() { - results.push(1); - cb(); - }, 500); - }); - pend.go(function(cb) { - results.push('b'); - setTimeout(function() { - results.push(1); - cb(); - }, 500); - }); - pend.go(function(cb) { - results.push('c'); - setTimeout(function() { - results.push(2); - cb(); - }, 100); - }); - pend.wait(function(err) { - assert.deepEqual(results, ['a', 'b', 1, 'c', 1, 2]); - cb(); - }); - assert.deepEqual(results, ['a', 'b']); -} - -function testCallbackTwice(cb) { - var pend = new Pend(); - pend.go(function(cb) { - setTimeout(cb, 100); - }); - pend.go(function(cb) { - cb(); - assert.throws(cb, /callback called twice/); - }); - pend.wait(cb); -} - -function testCallingWaitTwice(cb) { - var pend = new Pend(); - pend.go(function(cb) { - setTimeout(cb, 100); - }); - pend.wait(function() { - pend.go(function(cb) { - setTimeout(cb, 50); - }); - pend.go(function(cb) { - setTimeout(cb, 10); - }); - pend.go(function(cb) { - setTimeout(cb, 20); - }); - pend.wait(cb); - }); -} - -function testHoldFn(cb) { - var pend = new Pend(); - setTimeout(pend.hold(), 100); - pend.go(function(cb) { - cb(); - }); - pend.wait(cb); -} diff --git a/node_modules/picomatch/CHANGELOG.md b/node_modules/picomatch/CHANGELOG.md deleted file mode 100644 index b9b9554d..00000000 --- a/node_modules/picomatch/CHANGELOG.md +++ /dev/null @@ -1,126 +0,0 @@ -# Release history - -**All notable changes to this project will be documented in this file.** - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - -
    - Guiding Principles - -- Changelogs are for humans, not machines. -- There should be an entry for every single version. -- The same types of changes should be grouped. -- Versions and sections should be linkable. -- The latest version comes first. -- The release date of each versions is displayed. -- Mention whether you follow Semantic Versioning. - -
    - -
    - Types of changes - -Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): - -- `Added` for new features. -- `Changed` for changes in existing functionality. -- `Deprecated` for soon-to-be removed features. -- `Removed` for now removed features. -- `Fixed` for any bug fixes. -- `Security` in case of vulnerabilities. - -
    - -## 2.3.0 (2021-05-21) - -### Fixed - -* Fixes bug where file names with two dots were not being matched consistently with negation extglobs containing a star ([56083ef](https://github.com/micromatch/picomatch/commit/56083ef)) - -## 2.2.3 (2021-04-10) - -### Fixed - -* Do not skip pattern seperator for square brackets ([fb08a30](https://github.com/micromatch/picomatch/commit/fb08a30)). -* Set negatedExtGlob also if it does not span the whole pattern ([032e3f5](https://github.com/micromatch/picomatch/commit/032e3f5)). - -## 2.2.2 (2020-03-21) - -### Fixed - -* Correctly handle parts of the pattern after parentheses in the `scan` method ([e15b920](https://github.com/micromatch/picomatch/commit/e15b920)). - -## 2.2.1 (2020-01-04) - -* Fixes [#49](https://github.com/micromatch/picomatch/issues/49), so that braces with no sets or ranges are now propertly treated as literals. - -## 2.2.0 (2020-01-04) - -* Disable fastpaths mode for the parse method ([5b8d33f](https://github.com/micromatch/picomatch/commit/5b8d33f)) -* Add `tokens`, `slashes`, and `parts` to the object returned by `picomatch.scan()`. - -## 2.1.0 (2019-10-31) - -* add benchmarks for scan ([4793b92](https://github.com/micromatch/picomatch/commit/4793b92)) -* Add eslint object-curly-spacing rule ([707c650](https://github.com/micromatch/picomatch/commit/707c650)) -* Add prefer-const eslint rule ([5c7501c](https://github.com/micromatch/picomatch/commit/5c7501c)) -* Add support for nonegate in scan API ([275c9b9](https://github.com/micromatch/picomatch/commit/275c9b9)) -* Change lets to consts. Move root import up. ([4840625](https://github.com/micromatch/picomatch/commit/4840625)) -* closes https://github.com/micromatch/picomatch/issues/21 ([766bcb0](https://github.com/micromatch/picomatch/commit/766bcb0)) -* Fix "Extglobs" table in readme ([eb19da8](https://github.com/micromatch/picomatch/commit/eb19da8)) -* fixes https://github.com/micromatch/picomatch/issues/20 ([9caca07](https://github.com/micromatch/picomatch/commit/9caca07)) -* fixes https://github.com/micromatch/picomatch/issues/26 ([fa58f45](https://github.com/micromatch/picomatch/commit/fa58f45)) -* Lint test ([d433a34](https://github.com/micromatch/picomatch/commit/d433a34)) -* lint unit tests ([0159b55](https://github.com/micromatch/picomatch/commit/0159b55)) -* Make scan work with noext ([6c02e03](https://github.com/micromatch/picomatch/commit/6c02e03)) -* minor linting ([c2a2b87](https://github.com/micromatch/picomatch/commit/c2a2b87)) -* minor parser improvements ([197671d](https://github.com/micromatch/picomatch/commit/197671d)) -* remove eslint since it... ([07876fa](https://github.com/micromatch/picomatch/commit/07876fa)) -* remove funding file ([8ebe96d](https://github.com/micromatch/picomatch/commit/8ebe96d)) -* Remove unused funks ([cbc6d54](https://github.com/micromatch/picomatch/commit/cbc6d54)) -* Run eslint during pretest, fix existing eslint findings ([0682367](https://github.com/micromatch/picomatch/commit/0682367)) -* support `noparen` in scan ([3d37569](https://github.com/micromatch/picomatch/commit/3d37569)) -* update changelog ([7b34e77](https://github.com/micromatch/picomatch/commit/7b34e77)) -* update travis ([777f038](https://github.com/micromatch/picomatch/commit/777f038)) -* Use eslint-disable-next-line instead of eslint-disable ([4e7c1fd](https://github.com/micromatch/picomatch/commit/4e7c1fd)) - -## 2.0.7 (2019-05-14) - -* 2.0.7 ([9eb9a71](https://github.com/micromatch/picomatch/commit/9eb9a71)) -* supports lookbehinds ([1f63f7e](https://github.com/micromatch/picomatch/commit/1f63f7e)) -* update .verb.md file with typo change ([2741279](https://github.com/micromatch/picomatch/commit/2741279)) -* fix: typo in README ([0753e44](https://github.com/micromatch/picomatch/commit/0753e44)) - -## 2.0.4 (2019-04-10) - -### Fixed - -- Readme link [fixed](https://github.com/micromatch/picomatch/pull/13/commits/a96ab3aa2b11b6861c23289964613d85563b05df) by @danez. -- `options.capture` now works as expected when fastpaths are enabled. See https://github.com/micromatch/picomatch/pull/12/commits/26aefd71f1cfaf95c37f1c1fcab68a693b037304. Thanks to @DrPizza. - -## 2.0.0 (2019-04-10) - -### Added - -- Adds support for `options.onIgnore`. See the readme for details -- Adds support for `options.onResult`. See the readme for details - -### Breaking changes - -- The unixify option was renamed to `windows` -- caching and all related options and methods have been removed - -## 1.0.0 (2018-11-05) - -- adds `.onMatch` option -- improvements to `.scan` method -- numerous improvements and optimizations for matching and parsing -- better windows path handling - -## 0.1.0 - 2017-04-13 - -First release. - - -[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog diff --git a/node_modules/picomatch/LICENSE b/node_modules/picomatch/LICENSE deleted file mode 100644 index 3608dca2..00000000 --- a/node_modules/picomatch/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017-present, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/picomatch/README.md b/node_modules/picomatch/README.md deleted file mode 100644 index 54822d49..00000000 --- a/node_modules/picomatch/README.md +++ /dev/null @@ -1,707 +0,0 @@ -

    Picomatch

    - -

    - -version - - -test status - - -coverage status - - -downloads - -

    - -
    -
    - -

    -Blazing fast and accurate glob matcher written in JavaScript.
    -No dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions. -

    - -
    -
    - -## Why picomatch? - -* **Lightweight** - No dependencies -* **Minimal** - Tiny API surface. Main export is a function that takes a glob pattern and returns a matcher function. -* **Fast** - Loads in about 2ms (that's several times faster than a [single frame of a HD movie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps) -* **Performant** - Use the returned matcher function to speed up repeat matching (like when watching files) -* **Accurate matching** - Using wildcards (`*` and `?`), globstars (`**`) for nested directories, [advanced globbing](#advanced-globbing) with extglobs, braces, and POSIX brackets, and support for escaping special characters with `\` or quotes. -* **Well tested** - Thousands of unit tests - -See the [library comparison](#library-comparisons) to other libraries. - -
    -
    - -## Table of Contents - -
    Click to expand - -- [Install](#install) -- [Usage](#usage) -- [API](#api) - * [picomatch](#picomatch) - * [.test](#test) - * [.matchBase](#matchbase) - * [.isMatch](#ismatch) - * [.parse](#parse) - * [.scan](#scan) - * [.compileRe](#compilere) - * [.makeRe](#makere) - * [.toRegex](#toregex) -- [Options](#options) - * [Picomatch options](#picomatch-options) - * [Scan Options](#scan-options) - * [Options Examples](#options-examples) -- [Globbing features](#globbing-features) - * [Basic globbing](#basic-globbing) - * [Advanced globbing](#advanced-globbing) - * [Braces](#braces) - * [Matching special characters as literals](#matching-special-characters-as-literals) -- [Library Comparisons](#library-comparisons) -- [Benchmarks](#benchmarks) -- [Philosophies](#philosophies) -- [About](#about) - * [Author](#author) - * [License](#license) - -_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ - -
    - -
    -
    - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -npm install --save picomatch -``` - -
    - -## Usage - -The main export is a function that takes a glob pattern and an options object and returns a function for matching strings. - -```js -const pm = require('picomatch'); -const isMatch = pm('*.js'); - -console.log(isMatch('abcd')); //=> false -console.log(isMatch('a.js')); //=> true -console.log(isMatch('a.md')); //=> false -console.log(isMatch('a/b.js')); //=> false -``` - -
    - -## API - -### [picomatch](lib/picomatch.js#L32) - -Creates a matcher function from one or more glob patterns. The returned function takes a string to match as its first argument, and returns true if the string is a match. The returned matcher function also takes a boolean as the second argument that, when true, returns an object with additional information. - -**Params** - -* `globs` **{String|Array}**: One or more glob patterns. -* `options` **{Object=}** -* `returns` **{Function=}**: Returns a matcher function. - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch(glob[, options]); - -const isMatch = picomatch('*.!(*a)'); -console.log(isMatch('a.a')); //=> false -console.log(isMatch('a.b')); //=> true -``` - -### [.test](lib/picomatch.js#L117) - -Test `input` with the given `regex`. This is used by the main `picomatch()` function to test the input string. - -**Params** - -* `input` **{String}**: String to test. -* `regex` **{RegExp}** -* `returns` **{Object}**: Returns an object with matching info. - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch.test(input, regex[, options]); - -console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); -// { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } -``` - -### [.matchBase](lib/picomatch.js#L161) - -Match the basename of a filepath. - -**Params** - -* `input` **{String}**: String to test. -* `glob` **{RegExp|String}**: Glob pattern or regex created by [.makeRe](#makeRe). -* `returns` **{Boolean}** - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch.matchBase(input, glob[, options]); -console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true -``` - -### [.isMatch](lib/picomatch.js#L183) - -Returns true if **any** of the given glob `patterns` match the specified `string`. - -**Params** - -* **{String|Array}**: str The string to test. -* **{String|Array}**: patterns One or more glob patterns to use for matching. -* **{Object}**: See available [options](#options). -* `returns` **{Boolean}**: Returns true if any patterns match `str` - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch.isMatch(string, patterns[, options]); - -console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true -console.log(picomatch.isMatch('a.a', 'b.*')); //=> false -``` - -### [.parse](lib/picomatch.js#L199) - -Parse a glob pattern to create the source string for a regular expression. - -**Params** - -* `pattern` **{String}** -* `options` **{Object}** -* `returns` **{Object}**: Returns an object with useful properties and output to be used as a regex source string. - -**Example** - -```js -const picomatch = require('picomatch'); -const result = picomatch.parse(pattern[, options]); -``` - -### [.scan](lib/picomatch.js#L231) - -Scan a glob pattern to separate the pattern into segments. - -**Params** - -* `input` **{String}**: Glob pattern to scan. -* `options` **{Object}** -* `returns` **{Object}**: Returns an object with - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch.scan(input[, options]); - -const result = picomatch.scan('!./foo/*.js'); -console.log(result); -{ prefix: '!./', - input: '!./foo/*.js', - start: 3, - base: 'foo', - glob: '*.js', - isBrace: false, - isBracket: false, - isGlob: true, - isExtglob: false, - isGlobstar: false, - negated: true } -``` - -### [.compileRe](lib/picomatch.js#L245) - -Compile a regular expression from the `state` object returned by the -[parse()](#parse) method. - -**Params** - -* `state` **{Object}** -* `options` **{Object}** -* `returnOutput` **{Boolean}**: Intended for implementors, this argument allows you to return the raw output from the parser. -* `returnState` **{Boolean}**: Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. -* `returns` **{RegExp}** - -### [.makeRe](lib/picomatch.js#L286) - -Create a regular expression from a parsed glob pattern. - -**Params** - -* `state` **{String}**: The object returned from the `.parse` method. -* `options` **{Object}** -* `returnOutput` **{Boolean}**: Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. -* `returnState` **{Boolean}**: Implementors may use this argument to return the state from the parsed glob with the returned regular expression. -* `returns` **{RegExp}**: Returns a regex created from the given pattern. - -**Example** - -```js -const picomatch = require('picomatch'); -const state = picomatch.parse('*.js'); -// picomatch.compileRe(state[, options]); - -console.log(picomatch.compileRe(state)); -//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ -``` - -### [.toRegex](lib/picomatch.js#L321) - -Create a regular expression from the given regex source string. - -**Params** - -* `source` **{String}**: Regular expression source string. -* `options` **{Object}** -* `returns` **{RegExp}** - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch.toRegex(source[, options]); - -const { output } = picomatch.parse('*.js'); -console.log(picomatch.toRegex(output)); -//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ -``` - -
    - -## Options - -### Picomatch options - -The following options may be used with the main `picomatch()` function or any of the methods on the picomatch API. - -| **Option** | **Type** | **Default value** | **Description** | -| --- | --- | --- | --- | -| `basename` | `boolean` | `false` | If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. For example, `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. | -| `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). | -| `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. | -| `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). | -| `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` | -| `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. | -| `dot` | `boolean` | `false` | Enable dotfile matching. By default, dotfiles are ignored unless a `.` is explicitly defined in the pattern, or `options.dot` is true | -| `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. | -| `failglob` | `boolean` | `false` | Throws an error if no matches are found. Based on the bash option of the same name. | -| `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. | -| `flags` | `boolean` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. | -| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. | -| `ignore` | `array\|string` | `undefined` | One or more glob patterns for excluding strings that should not be matched from the result. | -| `keepQuotes` | `boolean` | `false` | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes. | -| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. | -| `lookbehinds` | `boolean` | `true` | Support regex positive and negative lookbehinds. Note that you must be using Node 8.1.10 or higher to enable regex lookbehinds. | -| `matchBase` | `boolean` | `false` | Alias for `basename` | -| `maxLength` | `boolean` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. | -| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. | -| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. | -| `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. | -| `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. | -| `noext` | `boolean` | `false` | Alias for `noextglob` | -| `noextglob` | `boolean` | `false` | Disable support for matching with extglobs (like `+(a\|b)`) | -| `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) | -| `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` | -| `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. | -| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. | -| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. | -| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. | -| `posix` | `boolean` | `false` | Support POSIX character classes ("posix brackets"). | -| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself | -| `prepend` | `boolean` | `undefined` | String to prepend to the generated regex used for matching. | -| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). | -| `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. | -| `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. | -| `unescape` | `boolean` | `undefined` | Remove backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained. | -| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatibility. | - -### Scan Options - -In addition to the main [picomatch options](#picomatch-options), the following options may also be used with the [.scan](#scan) method. - -| **Option** | **Type** | **Default value** | **Description** | -| --- | --- | --- | --- | -| `tokens` | `boolean` | `false` | When `true`, the returned object will include an array of tokens (objects), representing each path "segment" in the scanned glob pattern | -| `parts` | `boolean` | `false` | When `true`, the returned object will include an array of strings representing each path "segment" in the scanned glob pattern. This is automatically enabled when `options.tokens` is true | - -**Example** - -```js -const picomatch = require('picomatch'); -const result = picomatch.scan('!./foo/*.js', { tokens: true }); -console.log(result); -// { -// prefix: '!./', -// input: '!./foo/*.js', -// start: 3, -// base: 'foo', -// glob: '*.js', -// isBrace: false, -// isBracket: false, -// isGlob: true, -// isExtglob: false, -// isGlobstar: false, -// negated: true, -// maxDepth: 2, -// tokens: [ -// { value: '!./', depth: 0, isGlob: false, negated: true, isPrefix: true }, -// { value: 'foo', depth: 1, isGlob: false }, -// { value: '*.js', depth: 1, isGlob: true } -// ], -// slashes: [ 2, 6 ], -// parts: [ 'foo', '*.js' ] -// } -``` - -
    - -### Options Examples - -#### options.expandRange - -**Type**: `function` - -**Default**: `undefined` - -Custom function for expanding ranges in brace patterns. The [fill-range](https://github.com/jonschlinkert/fill-range) library is ideal for this purpose, or you can use custom code to do whatever you need. - -**Example** - -The following example shows how to create a glob that matches a folder - -```js -const fill = require('fill-range'); -const regex = pm.makeRe('foo/{01..25}/bar', { - expandRange(a, b) { - return `(${fill(a, b, { toRegex: true })})`; - } -}); - -console.log(regex); -//=> /^(?:foo\/((?:0[1-9]|1[0-9]|2[0-5]))\/bar)$/ - -console.log(regex.test('foo/00/bar')) // false -console.log(regex.test('foo/01/bar')) // true -console.log(regex.test('foo/10/bar')) // true -console.log(regex.test('foo/22/bar')) // true -console.log(regex.test('foo/25/bar')) // true -console.log(regex.test('foo/26/bar')) // false -``` - -#### options.format - -**Type**: `function` - -**Default**: `undefined` - -Custom function for formatting strings before they're matched. - -**Example** - -```js -// strip leading './' from strings -const format = str => str.replace(/^\.\//, ''); -const isMatch = picomatch('foo/*.js', { format }); -console.log(isMatch('./foo/bar.js')); //=> true -``` - -#### options.onMatch - -```js -const onMatch = ({ glob, regex, input, output }) => { - console.log({ glob, regex, input, output }); -}; - -const isMatch = picomatch('*', { onMatch }); -isMatch('foo'); -isMatch('bar'); -isMatch('baz'); -``` - -#### options.onIgnore - -```js -const onIgnore = ({ glob, regex, input, output }) => { - console.log({ glob, regex, input, output }); -}; - -const isMatch = picomatch('*', { onIgnore, ignore: 'f*' }); -isMatch('foo'); -isMatch('bar'); -isMatch('baz'); -``` - -#### options.onResult - -```js -const onResult = ({ glob, regex, input, output }) => { - console.log({ glob, regex, input, output }); -}; - -const isMatch = picomatch('*', { onResult, ignore: 'f*' }); -isMatch('foo'); -isMatch('bar'); -isMatch('baz'); -``` - -
    -
    - -## Globbing features - -* [Basic globbing](#basic-globbing) (Wildcard matching) -* [Advanced globbing](#advanced-globbing) (extglobs, posix brackets, brace matching) - -### Basic globbing - -| **Character** | **Description** | -| --- | --- | -| `*` | Matches any character zero or more times, excluding path separators. Does _not match_ path separators or hidden files or directories ("dotfiles"), unless explicitly enabled by setting the `dot` option to `true`. | -| `**` | Matches any character zero or more times, including path separators. Note that `**` will only match path separators (`/`, and `\\` on Windows) when they are the only characters in a path segment. Thus, `foo**/bar` is equivalent to `foo*/bar`, and `foo/a**b/bar` is equivalent to `foo/a*b/bar`, and _more than two_ consecutive stars in a glob path segment are regarded as _a single star_. Thus, `foo/***/bar` is equivalent to `foo/*/bar`. | -| `?` | Matches any character excluding path separators one time. Does _not match_ path separators or leading dots. | -| `[abc]` | Matches any characters inside the brackets. For example, `[abc]` would match the characters `a`, `b` or `c`, and nothing else. | - -#### Matching behavior vs. Bash - -Picomatch's matching features and expected results in unit tests are based on Bash's unit tests and the Bash 4.3 specification, with the following exceptions: - -* Bash will match `foo/bar/baz` with `*`. Picomatch only matches nested directories with `**`. -* Bash greedily matches with negated extglobs. For example, Bash 4.3 says that `!(foo)*` should match `foo` and `foobar`, since the trailing `*` bracktracks to match the preceding pattern. This is very memory-inefficient, and IMHO, also incorrect. Picomatch would return `false` for both `foo` and `foobar`. - -
    - -### Advanced globbing - -* [extglobs](#extglobs) -* [POSIX brackets](#posix-brackets) -* [Braces](#brace-expansion) - -#### Extglobs - -| **Pattern** | **Description** | -| --- | --- | -| `@(pattern)` | Match _only one_ consecutive occurrence of `pattern` | -| `*(pattern)` | Match _zero or more_ consecutive occurrences of `pattern` | -| `+(pattern)` | Match _one or more_ consecutive occurrences of `pattern` | -| `?(pattern)` | Match _zero or **one**_ consecutive occurrences of `pattern` | -| `!(pattern)` | Match _anything but_ `pattern` | - -**Examples** - -```js -const pm = require('picomatch'); - -// *(pattern) matches ZERO or more of "pattern" -console.log(pm.isMatch('a', 'a*(z)')); // true -console.log(pm.isMatch('az', 'a*(z)')); // true -console.log(pm.isMatch('azzz', 'a*(z)')); // true - -// +(pattern) matches ONE or more of "pattern" -console.log(pm.isMatch('a', 'a*(z)')); // true -console.log(pm.isMatch('az', 'a*(z)')); // true -console.log(pm.isMatch('azzz', 'a*(z)')); // true - -// supports multiple extglobs -console.log(pm.isMatch('foo.bar', '!(foo).!(bar)')); // false - -// supports nested extglobs -console.log(pm.isMatch('foo.bar', '!(!(foo)).!(!(bar))')); // true -``` - -#### POSIX brackets - -POSIX classes are disabled by default. Enable this feature by setting the `posix` option to true. - -**Enable POSIX bracket support** - -```js -console.log(pm.makeRe('[[:word:]]+', { posix: true })); -//=> /^(?:(?=.)[A-Za-z0-9_]+\/?)$/ -``` - -**Supported POSIX classes** - -The following named POSIX bracket expressions are supported: - -* `[:alnum:]` - Alphanumeric characters, equ `[a-zA-Z0-9]` -* `[:alpha:]` - Alphabetical characters, equivalent to `[a-zA-Z]`. -* `[:ascii:]` - ASCII characters, equivalent to `[\\x00-\\x7F]`. -* `[:blank:]` - Space and tab characters, equivalent to `[ \\t]`. -* `[:cntrl:]` - Control characters, equivalent to `[\\x00-\\x1F\\x7F]`. -* `[:digit:]` - Numerical digits, equivalent to `[0-9]`. -* `[:graph:]` - Graph characters, equivalent to `[\\x21-\\x7E]`. -* `[:lower:]` - Lowercase letters, equivalent to `[a-z]`. -* `[:print:]` - Print characters, equivalent to `[\\x20-\\x7E ]`. -* `[:punct:]` - Punctuation and symbols, equivalent to `[\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~]`. -* `[:space:]` - Extended space characters, equivalent to `[ \\t\\r\\n\\v\\f]`. -* `[:upper:]` - Uppercase letters, equivalent to `[A-Z]`. -* `[:word:]` - Word characters (letters, numbers and underscores), equivalent to `[A-Za-z0-9_]`. -* `[:xdigit:]` - Hexadecimal digits, equivalent to `[A-Fa-f0-9]`. - -See the [Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) for more information. - -### Braces - -Picomatch does not do brace expansion. For [brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) and advanced matching with braces, use [micromatch](https://github.com/micromatch/micromatch) instead. Picomatch has very basic support for braces. - -### Matching special characters as literals - -If you wish to match the following special characters in a filepath, and you want to use these characters in your glob pattern, they must be escaped with backslashes or quotes: - -**Special Characters** - -Some characters that are used for matching in regular expressions are also regarded as valid file path characters on some platforms. - -To match any of the following characters as literals: `$^*+?()[] - -Examples: - -```js -console.log(pm.makeRe('foo/bar \\(1\\)')); -console.log(pm.makeRe('foo/bar \\(1\\)')); -``` - -
    -
    - -## Library Comparisons - -The following table shows which features are supported by [minimatch](https://github.com/isaacs/minimatch), [micromatch](https://github.com/micromatch/micromatch), [picomatch](https://github.com/micromatch/picomatch), [nanomatch](https://github.com/micromatch/nanomatch), [extglob](https://github.com/micromatch/extglob), [braces](https://github.com/micromatch/braces), and [expand-brackets](https://github.com/micromatch/expand-brackets). - -| **Feature** | `minimatch` | `micromatch` | `picomatch` | `nanomatch` | `extglob` | `braces` | `expand-brackets` | -| --- | --- | --- | --- | --- | --- | --- | --- | -| Wildcard matching (`*?+`) | ✔ | ✔ | ✔ | ✔ | - | - | - | -| Advancing globbing | ✔ | ✔ | ✔ | - | - | - | - | -| Brace _matching_ | ✔ | ✔ | ✔ | - | - | ✔ | - | -| Brace _expansion_ | ✔ | ✔ | - | - | - | ✔ | - | -| Extglobs | partial | ✔ | ✔ | - | ✔ | - | - | -| Posix brackets | - | ✔ | ✔ | - | - | - | ✔ | -| Regular expression syntax | - | ✔ | ✔ | ✔ | ✔ | - | ✔ | -| File system operations | - | - | - | - | - | - | - | - -
    -
    - -## Benchmarks - -Performance comparison of picomatch and minimatch. - -``` -# .makeRe star - picomatch x 1,993,050 ops/sec ±0.51% (91 runs sampled) - minimatch x 627,206 ops/sec ±1.96% (87 runs sampled)) - -# .makeRe star; dot=true - picomatch x 1,436,640 ops/sec ±0.62% (91 runs sampled) - minimatch x 525,876 ops/sec ±0.60% (88 runs sampled) - -# .makeRe globstar - picomatch x 1,592,742 ops/sec ±0.42% (90 runs sampled) - minimatch x 962,043 ops/sec ±1.76% (91 runs sampled)d) - -# .makeRe globstars - picomatch x 1,615,199 ops/sec ±0.35% (94 runs sampled) - minimatch x 477,179 ops/sec ±1.33% (91 runs sampled) - -# .makeRe with leading star - picomatch x 1,220,856 ops/sec ±0.40% (92 runs sampled) - minimatch x 453,564 ops/sec ±1.43% (94 runs sampled) - -# .makeRe - basic braces - picomatch x 392,067 ops/sec ±0.70% (90 runs sampled) - minimatch x 99,532 ops/sec ±2.03% (87 runs sampled)) -``` - -
    -
    - -## Philosophies - -The goal of this library is to be blazing fast, without compromising on accuracy. - -**Accuracy** - -The number one of goal of this library is accuracy. However, it's not unusual for different glob implementations to have different rules for matching behavior, even with simple wildcard matching. It gets increasingly more complicated when combinations of different features are combined, like when extglobs are combined with globstars, braces, slashes, and so on: `!(**/{a,b,*/c})`. - -Thus, given that there is no canonical glob specification to use as a single source of truth when differences of opinion arise regarding behavior, sometimes we have to implement our best judgement and rely on feedback from users to make improvements. - -**Performance** - -Although this library performs well in benchmarks, and in most cases it's faster than other popular libraries we benchmarked against, we will always choose accuracy over performance. It's not helpful to anyone if our library is faster at returning the wrong answer. - -
    -
    - -## About - -
    -Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. - -
    - -
    -Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -npm install && npm test -``` - -
    - -
    -Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
    - -### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -### License - -Copyright © 2017-present, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). \ No newline at end of file diff --git a/node_modules/picomatch/index.js b/node_modules/picomatch/index.js deleted file mode 100644 index d2f2bc59..00000000 --- a/node_modules/picomatch/index.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./lib/picomatch'); diff --git a/node_modules/picomatch/lib/constants.js b/node_modules/picomatch/lib/constants.js deleted file mode 100644 index a62ef387..00000000 --- a/node_modules/picomatch/lib/constants.js +++ /dev/null @@ -1,179 +0,0 @@ -'use strict'; - -const path = require('path'); -const WIN_SLASH = '\\\\/'; -const WIN_NO_SLASH = `[^${WIN_SLASH}]`; - -/** - * Posix glob regex - */ - -const DOT_LITERAL = '\\.'; -const PLUS_LITERAL = '\\+'; -const QMARK_LITERAL = '\\?'; -const SLASH_LITERAL = '\\/'; -const ONE_CHAR = '(?=.)'; -const QMARK = '[^/]'; -const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; -const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; -const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; -const NO_DOT = `(?!${DOT_LITERAL})`; -const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; -const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; -const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; -const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; -const STAR = `${QMARK}*?`; - -const POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR -}; - -/** - * Windows glob regex - */ - -const WINDOWS_CHARS = { - ...POSIX_CHARS, - - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` -}; - -/** - * POSIX Bracket Regex - */ - -const POSIX_REGEX_SOURCE = { - alnum: 'a-zA-Z0-9', - alpha: 'a-zA-Z', - ascii: '\\x00-\\x7F', - blank: ' \\t', - cntrl: '\\x00-\\x1F\\x7F', - digit: '0-9', - graph: '\\x21-\\x7E', - lower: 'a-z', - print: '\\x20-\\x7E ', - punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', - space: ' \\t\\r\\n\\v\\f', - upper: 'A-Z', - word: 'A-Za-z0-9_', - xdigit: 'A-Fa-f0-9' -}; - -module.exports = { - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE, - - // regular expressions - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - - // Replace globs with equivalent patterns to reduce parsing time. - REPLACEMENTS: { - '***': '*', - '**/**': '**', - '**/**/**': '**' - }, - - // Digits - CHAR_0: 48, /* 0 */ - CHAR_9: 57, /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 65, /* A */ - CHAR_LOWERCASE_A: 97, /* a */ - CHAR_UPPERCASE_Z: 90, /* Z */ - CHAR_LOWERCASE_Z: 122, /* z */ - - CHAR_LEFT_PARENTHESES: 40, /* ( */ - CHAR_RIGHT_PARENTHESES: 41, /* ) */ - - CHAR_ASTERISK: 42, /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: 38, /* & */ - CHAR_AT: 64, /* @ */ - CHAR_BACKWARD_SLASH: 92, /* \ */ - CHAR_CARRIAGE_RETURN: 13, /* \r */ - CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ - CHAR_COLON: 58, /* : */ - CHAR_COMMA: 44, /* , */ - CHAR_DOT: 46, /* . */ - CHAR_DOUBLE_QUOTE: 34, /* " */ - CHAR_EQUAL: 61, /* = */ - CHAR_EXCLAMATION_MARK: 33, /* ! */ - CHAR_FORM_FEED: 12, /* \f */ - CHAR_FORWARD_SLASH: 47, /* / */ - CHAR_GRAVE_ACCENT: 96, /* ` */ - CHAR_HASH: 35, /* # */ - CHAR_HYPHEN_MINUS: 45, /* - */ - CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ - CHAR_LEFT_CURLY_BRACE: 123, /* { */ - CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ - CHAR_LINE_FEED: 10, /* \n */ - CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ - CHAR_PERCENT: 37, /* % */ - CHAR_PLUS: 43, /* + */ - CHAR_QUESTION_MARK: 63, /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ - CHAR_RIGHT_CURLY_BRACE: 125, /* } */ - CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ - CHAR_SEMICOLON: 59, /* ; */ - CHAR_SINGLE_QUOTE: 39, /* ' */ - CHAR_SPACE: 32, /* */ - CHAR_TAB: 9, /* \t */ - CHAR_UNDERSCORE: 95, /* _ */ - CHAR_VERTICAL_LINE: 124, /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - - SEP: path.sep, - - /** - * Create EXTGLOB_CHARS - */ - - extglobChars(chars) { - return { - '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, - '?': { type: 'qmark', open: '(?:', close: ')?' }, - '+': { type: 'plus', open: '(?:', close: ')+' }, - '*': { type: 'star', open: '(?:', close: ')*' }, - '@': { type: 'at', open: '(?:', close: ')' } - }; - }, - - /** - * Create GLOB_CHARS - */ - - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } -}; diff --git a/node_modules/picomatch/lib/parse.js b/node_modules/picomatch/lib/parse.js deleted file mode 100644 index c16d59d9..00000000 --- a/node_modules/picomatch/lib/parse.js +++ /dev/null @@ -1,1084 +0,0 @@ -'use strict'; - -const constants = require('./constants'); -const utils = require('./utils'); - -/** - * Constants - */ - -const { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS -} = constants; - -/** - * Helpers - */ - -const expandRange = (args, options) => { - if (typeof options.expandRange === 'function') { - return options.expandRange(...args, options); - } - - args.sort(); - const value = `[${args.join('-')}]`; - - try { - /* eslint-disable-next-line no-new */ - new RegExp(value); - } catch (ex) { - return args.map(v => utils.escapeRegex(v)).join('..'); - } - - return value; -}; - -/** - * Create the message for a syntax error - */ - -const syntaxError = (type, char) => { - return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; -}; - -/** - * Parse the given input string. - * @param {String} input - * @param {Object} options - * @return {Object} - */ - -const parse = (input, options) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - input = REPLACEMENTS[input] || input; - - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - const bos = { type: 'bos', value: '', output: opts.prepend || '' }; - const tokens = [bos]; - - const capture = opts.capture ? '' : '?:'; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - - const globstar = opts => { - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const nodot = opts.dot ? '' : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - // minimatch options support - if (typeof opts.noext === 'boolean') { - opts.noextglob = opts.noext; - } - - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: '', - output: '', - prefix: '', - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - - input = utils.removePrefix(input, state); - len = input.length; - - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - - /** - * Tokenizing helpers - */ - - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ''; - const remaining = () => input.slice(state.index + 1); - const consume = (value = '', num = 0) => { - state.consumed += value; - state.index += num; - }; - - const append = token => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - - const negate = () => { - let count = 1; - - while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { - advance(); - state.start++; - count++; - } - - if (count % 2 === 0) { - return false; - } - - state.negated = true; - state.start++; - return true; - }; - - const increment = type => { - state[type]++; - stack.push(type); - }; - - const decrement = type => { - state[type]--; - stack.pop(); - }; - - /** - * Push tokens onto the tokens array. This helper speeds up - * tokenizing by 1) helping us avoid backtracking as much as possible, - * and 2) helping us avoid creating extra tokens when consecutive - * characters are plain text. This improves performance and simplifies - * lookbehinds. - */ - - const push = tok => { - if (prev.type === 'globstar') { - const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); - const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); - - if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = 'star'; - prev.value = '*'; - prev.output = star; - state.output += prev.output; - } - } - - if (extglobs.length && tok.type !== 'paren') { - extglobs[extglobs.length - 1].inner += tok.value; - } - - if (tok.value || tok.output) append(tok); - if (prev && prev.type === 'text' && tok.type === 'text') { - prev.value += tok.value; - prev.output = (prev.output || '') + tok.value; - return; - } - - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - - const extglobOpen = (type, value) => { - const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; - - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - const output = (opts.capture ? '(' : '') + token.open; - - increment('parens'); - push({ type, value, output: state.output ? '' : ONE_CHAR }); - push({ type: 'paren', extglob: true, value: advance(), output }); - extglobs.push(token); - }; - - const extglobClose = token => { - let output = token.close + (opts.capture ? ')' : ''); - let rest; - - if (token.type === 'negate') { - let extglobStar = star; - - if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { - extglobStar = globstar(opts); - } - - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - - if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - output = token.close = `)${rest})${extglobStar})`; - } - - if (token.prev.type === 'bos') { - state.negatedExtglob = true; - } - } - - push({ type: 'paren', extglob: true, value, output }); - decrement('parens'); - }; - - /** - * Fast paths - */ - - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === '\\') { - backslashes = true; - return m; - } - - if (first === '?') { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ''); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); - } - return QMARK.repeat(chars.length); - } - - if (first === '.') { - return DOT_LITERAL.repeat(chars.length); - } - - if (first === '*') { - if (esc) { - return esc + first + (rest ? star : ''); - } - return star; - } - return esc ? m : `\\${m}`; - }); - - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ''); - } else { - output = output.replace(/\\+/g, m => { - return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); - }); - } - } - - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - - state.output = utils.wrapOutput(output, state, options); - return state; - } - - /** - * Tokenize input until we reach end-of-string - */ - - while (!eos()) { - value = advance(); - - if (value === '\u0000') { - continue; - } - - /** - * Escaped characters - */ - - if (value === '\\') { - const next = peek(); - - if (next === '/' && opts.bash !== true) { - continue; - } - - if (next === '.' || next === ';') { - continue; - } - - if (!next) { - value += '\\'; - push({ type: 'text', value }); - continue; - } - - // collapse slashes to reduce potential for exploits - const match = /^\\+/.exec(remaining()); - let slashes = 0; - - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += '\\'; - } - } - - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - - if (state.brackets === 0) { - push({ type: 'text', value }); - continue; - } - } - - /** - * If we're inside a regex character class, continue - * until we reach the closing bracket. - */ - - if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { - if (opts.posix !== false && value === ':') { - const inner = prev.value.slice(1); - if (inner.includes('[')) { - prev.posix = true; - - if (inner.includes(':')) { - const idx = prev.value.lastIndexOf('['); - const pre = prev.value.slice(0, idx); - const rest = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - - if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { - value = `\\${value}`; - } - - if (value === ']' && (prev.value === '[' || prev.value === '[^')) { - value = `\\${value}`; - } - - if (opts.posix === true && value === '!' && prev.value === '[') { - value = '^'; - } - - prev.value += value; - append({ value }); - continue; - } - - /** - * If we're inside a quoted string, continue - * until we reach the closing double quote. - */ - - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - - /** - * Double quotes - */ - - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: 'text', value }); - } - continue; - } - - /** - * Parentheses - */ - - if (value === '(') { - increment('parens'); - push({ type: 'paren', value }); - continue; - } - - if (value === ')') { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '(')); - } - - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - - push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); - decrement('parens'); - continue; - } - - /** - * Square brackets - */ - - if (value === '[') { - if (opts.nobracket === true || !remaining().includes(']')) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('closing', ']')); - } - - value = `\\${value}`; - } else { - increment('brackets'); - } - - push({ type: 'bracket', value }); - continue; - } - - if (value === ']') { - if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '[')); - } - - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - decrement('brackets'); - - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { - value = `/${value}`; - } - - prev.value += value; - append({ value }); - - // when literal brackets are explicitly disabled - // assume we should match with a regex character class - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - - // when literal brackets are explicitly enabled - // assume we should escape the brackets to match literal characters - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - - // when the user specifies nothing, try to match both - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - - /** - * Braces - */ - - if (value === '{' && opts.nobrace !== true) { - increment('braces'); - - const open = { - type: 'brace', - value, - output: '(', - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - - braces.push(open); - push(open); - continue; - } - - if (value === '}') { - const brace = braces[braces.length - 1]; - - if (opts.nobrace === true || !brace) { - push({ type: 'text', value, output: value }); - continue; - } - - let output = ')'; - - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === 'brace') { - break; - } - if (arr[i].type !== 'dots') { - range.unshift(arr[i].value); - } - } - - output = expandRange(range, opts); - state.backtrack = true; - } - - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = '\\{'; - value = output = '\\}'; - state.output = out; - for (const t of toks) { - state.output += (t.output || t.value); - } - } - - push({ type: 'brace', value, output }); - decrement('braces'); - braces.pop(); - continue; - } - - /** - * Pipes - */ - - if (value === '|') { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: 'text', value }); - continue; - } - - /** - * Commas - */ - - if (value === ',') { - let output = value; - - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === 'braces') { - brace.comma = true; - output = '|'; - } - - push({ type: 'comma', value, output }); - continue; - } - - /** - * Slashes - */ - - if (value === '/') { - // if the beginning of the glob is "./", advance the start - // to the current index, and don't add the "./" characters - // to the state. This greatly simplifies lookbehinds when - // checking for BOS characters like "!" and "." (not "./") - if (prev.type === 'dot' && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ''; - state.output = ''; - tokens.pop(); - prev = bos; // reset "prev" to the first token - continue; - } - - push({ type: 'slash', value, output: SLASH_LITERAL }); - continue; - } - - /** - * Dots - */ - - if (value === '.') { - if (state.braces > 0 && prev.type === 'dot') { - if (prev.value === '.') prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = 'dots'; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - - if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { - push({ type: 'text', value, output: DOT_LITERAL }); - continue; - } - - push({ type: 'dot', value, output: DOT_LITERAL }); - continue; - } - - /** - * Question marks - */ - - if (value === '?') { - const isGroup = prev && prev.value === '('; - if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('qmark', value); - continue; - } - - if (prev && prev.type === 'paren') { - const next = peek(); - let output = value; - - if (next === '<' && !utils.supportsLookbehinds()) { - throw new Error('Node.js v10 or higher is required for regex lookbehinds'); - } - - if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { - output = `\\${value}`; - } - - push({ type: 'text', value, output }); - continue; - } - - if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { - push({ type: 'qmark', value, output: QMARK_NO_DOT }); - continue; - } - - push({ type: 'qmark', value, output: QMARK }); - continue; - } - - /** - * Exclamation - */ - - if (value === '!') { - if (opts.noextglob !== true && peek() === '(') { - if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { - extglobOpen('negate', value); - continue; - } - } - - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - - /** - * Plus - */ - - if (value === '+') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('plus', value); - continue; - } - - if ((prev && prev.value === '(') || opts.regex === false) { - push({ type: 'plus', value, output: PLUS_LITERAL }); - continue; - } - - if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { - push({ type: 'plus', value }); - continue; - } - - push({ type: 'plus', value: PLUS_LITERAL }); - continue; - } - - /** - * Plain text - */ - - if (value === '@') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - push({ type: 'at', extglob: true, value, output: '' }); - continue; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Plain text - */ - - if (value !== '*') { - if (value === '$' || value === '^') { - value = `\\${value}`; - } - - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Stars - */ - - if (prev && (prev.type === 'globstar' || prev.star === true)) { - prev.type = 'star'; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen('star', value); - continue; - } - - if (prev.type === 'star') { - if (opts.noglobstar === true) { - consume(value); - continue; - } - - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === 'slash' || prior.type === 'bos'; - const afterStar = before && (before.type === 'star' || before.type === 'globstar'); - - if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { - push({ type: 'star', value, output: '' }); - continue; - } - - const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); - const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); - if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { - push({ type: 'star', value, output: '' }); - continue; - } - - // strip consecutive `/**/` - while (rest.slice(0, 3) === '/**') { - const after = input[state.index + 4]; - if (after && after !== '/') { - break; - } - rest = rest.slice(3); - consume('/**', 3); - } - - if (prior.type === 'bos' && eos()) { - prev.type = 'globstar'; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { - const end = rest[1] !== void 0 ? '|$' : ''; - - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - - state.output += prior.output + prev.output; - state.globstar = true; - - consume(value + advance()); - - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - if (prior.type === 'bos' && rest[0] === '/') { - prev.type = 'globstar'; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - // remove single star from output - state.output = state.output.slice(0, -prev.output.length); - - // reset previous token to globstar - prev.type = 'globstar'; - prev.output = globstar(opts); - prev.value += value; - - // reset output with globstar - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - - const token = { type: 'star', value, output: star }; - - if (opts.bash === true) { - token.output = '.*?'; - if (prev.type === 'bos' || prev.type === 'slash') { - token.output = nodot + token.output; - } - push(token); - continue; - } - - if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { - token.output = value; - push(token); - continue; - } - - if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { - if (prev.type === 'dot') { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - - } else { - state.output += nodot; - prev.output += nodot; - } - - if (peek() !== '*') { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - - push(token); - } - - while (state.brackets > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); - state.output = utils.escapeLast(state.output, '['); - decrement('brackets'); - } - - while (state.parens > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); - state.output = utils.escapeLast(state.output, '('); - decrement('parens'); - } - - while (state.braces > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); - state.output = utils.escapeLast(state.output, '{'); - decrement('braces'); - } - - if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { - push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); - } - - // rebuild the output if we had to backtrack at any point - if (state.backtrack === true) { - state.output = ''; - - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - - if (token.suffix) { - state.output += token.suffix; - } - } - } - - return state; -}; - -/** - * Fast paths for creating regular expressions for common glob patterns. - * This can significantly speed up processing and has very little downside - * impact when none of the fast paths match. - */ - -parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? '' : '?:'; - const state = { negated: false, prefix: '' }; - let star = opts.bash === true ? '.*?' : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - const globstar = opts => { - if (opts.noglobstar === true) return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const create = str => { - switch (str) { - case '*': - return `${nodot}${ONE_CHAR}${star}`; - - case '.*': - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*.*': - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*/*': - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - - case '**': - return nodot + globstar(opts); - - case '**/*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - - case '**/*.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '**/.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - - default: { - const match = /^(.*?)\.(\w+)$/.exec(str); - if (!match) return; - - const source = create(match[1]); - if (!source) return; - - return source + DOT_LITERAL + match[2]; - } - } - }; - - const output = utils.removePrefix(input, state); - let source = create(output); - - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - - return source; -}; - -module.exports = parse; diff --git a/node_modules/picomatch/lib/picomatch.js b/node_modules/picomatch/lib/picomatch.js deleted file mode 100644 index 782d8094..00000000 --- a/node_modules/picomatch/lib/picomatch.js +++ /dev/null @@ -1,342 +0,0 @@ -'use strict'; - -const path = require('path'); -const scan = require('./scan'); -const parse = require('./parse'); -const utils = require('./utils'); -const constants = require('./constants'); -const isObject = val => val && typeof val === 'object' && !Array.isArray(val); - -/** - * Creates a matcher function from one or more glob patterns. The - * returned function takes a string to match as its first argument, - * and returns true if the string is a match. The returned matcher - * function also takes a boolean as the second argument that, when true, - * returns an object with additional information. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch(glob[, options]); - * - * const isMatch = picomatch('*.!(*a)'); - * console.log(isMatch('a.a')); //=> false - * console.log(isMatch('a.b')); //=> true - * ``` - * @name picomatch - * @param {String|Array} `globs` One or more glob patterns. - * @param {Object=} `options` - * @return {Function=} Returns a matcher function. - * @api public - */ - -const picomatch = (glob, options, returnState = false) => { - if (Array.isArray(glob)) { - const fns = glob.map(input => picomatch(input, options, returnState)); - const arrayMatcher = str => { - for (const isMatch of fns) { - const state = isMatch(str); - if (state) return state; - } - return false; - }; - return arrayMatcher; - } - - const isState = isObject(glob) && glob.tokens && glob.input; - - if (glob === '' || (typeof glob !== 'string' && !isState)) { - throw new TypeError('Expected pattern to be a non-empty string'); - } - - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState - ? picomatch.compileRe(glob, options) - : picomatch.makeRe(glob, options, false, true); - - const state = regex.state; - delete regex.state; - - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); - } - - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); - const result = { glob, state, regex, posix, input, output, match, isMatch }; - - if (typeof opts.onResult === 'function') { - opts.onResult(result); - } - - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - - if (isIgnored(input)) { - if (typeof opts.onIgnore === 'function') { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - - if (typeof opts.onMatch === 'function') { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - - if (returnState) { - matcher.state = state; - } - - return matcher; -}; - -/** - * Test `input` with the given `regex`. This is used by the main - * `picomatch()` function to test the input string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.test(input, regex[, options]); - * - * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); - * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } - * ``` - * @param {String} `input` String to test. - * @param {RegExp} `regex` - * @return {Object} Returns an object with matching info. - * @api public - */ - -picomatch.test = (input, regex, options, { glob, posix } = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected input to be a string'); - } - - if (input === '') { - return { isMatch: false, output: '' }; - } - - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob; - let output = (match && format) ? format(input) : input; - - if (match === false) { - output = format ? format(input) : input; - match = output === glob; - } - - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - - return { isMatch: Boolean(match), match, output }; -}; - -/** - * Match the basename of a filepath. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.matchBase(input, glob[, options]); - * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true - * ``` - * @param {String} `input` String to test. - * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). - * @return {Boolean} - * @api public - */ - -picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { - const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); - return regex.test(path.basename(input)); -}; - -/** - * Returns true if **any** of the given glob `patterns` match the specified `string`. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.isMatch(string, patterns[, options]); - * - * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true - * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false - * ``` - * @param {String|Array} str The string to test. - * @param {String|Array} patterns One or more glob patterns to use for matching. - * @param {Object} [options] See available [options](#options). - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); - -/** - * Parse a glob pattern to create the source string for a regular - * expression. - * - * ```js - * const picomatch = require('picomatch'); - * const result = picomatch.parse(pattern[, options]); - * ``` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Object} Returns an object with useful properties and output to be used as a regex source string. - * @api public - */ - -picomatch.parse = (pattern, options) => { - if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options)); - return parse(pattern, { ...options, fastpaths: false }); -}; - -/** - * Scan a glob pattern to separate the pattern into segments. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.scan(input[, options]); - * - * const result = picomatch.scan('!./foo/*.js'); - * console.log(result); - * { prefix: '!./', - * input: '!./foo/*.js', - * start: 3, - * base: 'foo', - * glob: '*.js', - * isBrace: false, - * isBracket: false, - * isGlob: true, - * isExtglob: false, - * isGlobstar: false, - * negated: true } - * ``` - * @param {String} `input` Glob pattern to scan. - * @param {Object} `options` - * @return {Object} Returns an object with - * @api public - */ - -picomatch.scan = (input, options) => scan(input, options); - -/** - * Compile a regular expression from the `state` object returned by the - * [parse()](#parse) method. - * - * @param {Object} `state` - * @param {Object} `options` - * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. - * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. - * @return {RegExp} - * @api public - */ - -picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - - const opts = options || {}; - const prepend = opts.contains ? '' : '^'; - const append = opts.contains ? '' : '$'; - - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - - const regex = picomatch.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - - return regex; -}; - -/** - * Create a regular expression from a parsed glob pattern. - * - * ```js - * const picomatch = require('picomatch'); - * const state = picomatch.parse('*.js'); - * // picomatch.compileRe(state[, options]); - * - * console.log(picomatch.compileRe(state)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `state` The object returned from the `.parse` method. - * @param {Object} `options` - * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. - * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - -picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== 'string') { - throw new TypeError('Expected a non-empty string'); - } - - let parsed = { negated: false, fastpaths: true }; - - if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { - parsed.output = parse.fastpaths(input, options); - } - - if (!parsed.output) { - parsed = parse(input, options); - } - - return picomatch.compileRe(parsed, options, returnOutput, returnState); -}; - -/** - * Create a regular expression from the given regex source string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.toRegex(source[, options]); - * - * const { output } = picomatch.parse('*.js'); - * console.log(picomatch.toRegex(output)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `source` Regular expression source string. - * @param {Object} `options` - * @return {RegExp} - * @api public - */ - -picomatch.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); - } catch (err) { - if (options && options.debug === true) throw err; - return /$^/; - } -}; - -/** - * Picomatch constants. - * @return {Object} - */ - -picomatch.constants = constants; - -/** - * Expose "picomatch" - */ - -module.exports = picomatch; diff --git a/node_modules/picomatch/lib/scan.js b/node_modules/picomatch/lib/scan.js deleted file mode 100644 index e59cd7a1..00000000 --- a/node_modules/picomatch/lib/scan.js +++ /dev/null @@ -1,391 +0,0 @@ -'use strict'; - -const utils = require('./utils'); -const { - CHAR_ASTERISK, /* * */ - CHAR_AT, /* @ */ - CHAR_BACKWARD_SLASH, /* \ */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_EXCLAMATION_MARK, /* ! */ - CHAR_FORWARD_SLASH, /* / */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_PLUS, /* + */ - CHAR_QUESTION_MARK, /* ? */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_RIGHT_SQUARE_BRACKET /* ] */ -} = require('./constants'); - -const isPathSeparator = code => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; -}; - -const depth = token => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } -}; - -/** - * Quickly scans a glob pattern and returns an object with a handful of - * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), - * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not - * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). - * - * ```js - * const pm = require('picomatch'); - * console.log(pm.scan('foo/bar/*.js')); - * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {Object} Returns an object with tokens and regex source string. - * @api public - */ - -const scan = (input, options) => { - const opts = options || {}; - - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - - let str = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: '', depth: 0, isGlob: false }; - - const eos = () => index >= length; - const peek = () => str.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str.charCodeAt(++index); - }; - - while (index < length) { - code = advance(); - let next; - - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (braceEscaped !== true && code === CHAR_COMMA) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: '', depth: 0, isGlob: false }; - - if (finished === true) continue; - if (prev === CHAR_DOT && index === (start + 1)) { - start += 2; - continue; - } - - lastIndex = index + 1; - continue; - } - - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS - || code === CHAR_AT - || code === CHAR_ASTERISK - || code === CHAR_QUESTION_MARK - || code === CHAR_EXCLAMATION_MARK; - - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - - if (code === CHAR_ASTERISK) { - if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_LEFT_SQUARE_BRACKET) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - - if (isGlob === true) { - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - } - - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - - let base = str; - let prefix = ''; - let glob = ''; - - if (start > 0) { - prefix = str.slice(0, start); - str = str.slice(start); - lastIndex -= start; - } - - if (base && isGlob === true && lastIndex > 0) { - base = str.slice(0, lastIndex); - glob = str.slice(lastIndex); - } else if (isGlob === true) { - base = ''; - glob = str; - } else { - base = str; - } - - if (base && base !== '' && base !== '/' && base !== str) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - - if (opts.unescape === true) { - if (glob) glob = utils.removeBackslashes(glob); - - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - - const state = { - prefix, - input, - start, - base, - glob, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== '') { - parts.push(value); - } - prevIndex = i; - } - - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - - state.slashes = slashes; - state.parts = parts; - } - - return state; -}; - -module.exports = scan; diff --git a/node_modules/picomatch/lib/utils.js b/node_modules/picomatch/lib/utils.js deleted file mode 100644 index c3ca766a..00000000 --- a/node_modules/picomatch/lib/utils.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; - -const path = require('path'); -const win32 = process.platform === 'win32'; -const { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL -} = require('./constants'); - -exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); -exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); -exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); -exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); -exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); - -exports.removeBackslashes = str => { - return str.replace(REGEX_REMOVE_BACKSLASH, match => { - return match === '\\' ? '' : match; - }); -}; - -exports.supportsLookbehinds = () => { - const segs = process.version.slice(1).split('.').map(Number); - if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { - return true; - } - return false; -}; - -exports.isWindows = options => { - if (options && typeof options.windows === 'boolean') { - return options.windows; - } - return win32 === true || path.sep === '\\'; -}; - -exports.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) return input; - if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; -}; - -exports.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith('./')) { - output = output.slice(2); - state.prefix = './'; - } - return output; -}; - -exports.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? '' : '^'; - const append = options.contains ? '' : '$'; - - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; -}; diff --git a/node_modules/picomatch/package.json b/node_modules/picomatch/package.json deleted file mode 100644 index f54b1727..00000000 --- a/node_modules/picomatch/package.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "_from": "picomatch@~2.3", - "_id": "picomatch@2.3.0", - "_inBundle": false, - "_integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "_location": "/picomatch", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "picomatch@~2.3", - "name": "picomatch", - "escapedName": "picomatch", - "rawSpec": "~2.3", - "saveSpec": null, - "fetchSpec": "~2.3" - }, - "_requiredBy": [ - "/@antora/content-aggregator" - ], - "_resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "_shasum": "f1f061de8f6a4bf022892e2d128234fb98302972", - "_spec": "picomatch@~2.3", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/content-aggregator", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/micromatch/picomatch/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.", - "devDependencies": { - "eslint": "^6.8.0", - "fill-range": "^7.0.1", - "gulp-format-md": "^2.0.0", - "mocha": "^6.2.2", - "nyc": "^15.0.0", - "time-require": "github:jonschlinkert/time-require" - }, - "engines": { - "node": ">=8.6" - }, - "files": [ - "index.js", - "lib" - ], - "funding": "https://github.com/sponsors/jonschlinkert", - "homepage": "https://github.com/micromatch/picomatch", - "keywords": [ - "glob", - "match", - "picomatch" - ], - "license": "MIT", - "main": "index.js", - "name": "picomatch", - "nyc": { - "reporter": [ - "html", - "lcov", - "text-summary" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/micromatch/picomatch.git" - }, - "scripts": { - "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .", - "mocha": "mocha --reporter dot", - "test": "npm run lint && npm run mocha", - "test:ci": "npm run test:cover", - "test:cover": "nyc npm run mocha" - }, - "verb": { - "toc": { - "render": true, - "method": "preWrite", - "maxdepth": 3 - }, - "layout": "empty", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "related": { - "list": [ - "braces", - "micromatch" - ] - }, - "reflinks": [ - "braces", - "expand-brackets", - "extglob", - "fill-range", - "micromatch", - "minimatch", - "nanomatch", - "picomatch" - ] - }, - "version": "2.3.0" -} diff --git a/node_modules/pify/index.js b/node_modules/pify/index.js deleted file mode 100644 index df56221d..00000000 --- a/node_modules/pify/index.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -const processFn = (fn, options) => function (...args) { - const P = options.promiseModule; - - return new P((resolve, reject) => { - if (options.multiArgs) { - args.push((...result) => { - if (options.errorFirst) { - if (result[0]) { - reject(result); - } else { - result.shift(); - resolve(result); - } - } else { - resolve(result); - } - }); - } else if (options.errorFirst) { - args.push((error, result) => { - if (error) { - reject(error); - } else { - resolve(result); - } - }); - } else { - args.push(resolve); - } - - fn.apply(this, args); - }); -}; - -module.exports = (input, options) => { - options = Object.assign({ - exclude: [/.+(Sync|Stream)$/], - errorFirst: true, - promiseModule: Promise - }, options); - - const objType = typeof input; - if (!(input !== null && (objType === 'object' || objType === 'function'))) { - throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${input === null ? 'null' : objType}\``); - } - - const filter = key => { - const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key); - return options.include ? options.include.some(match) : !options.exclude.some(match); - }; - - let ret; - if (objType === 'function') { - ret = function (...args) { - return options.excludeMain ? input(...args) : processFn(input, options).apply(this, args); - }; - } else { - ret = Object.create(Object.getPrototypeOf(input)); - } - - for (const key in input) { // eslint-disable-line guard-for-in - const property = input[key]; - ret[key] = typeof property === 'function' && filter(key) ? processFn(property, options) : property; - } - - return ret; -}; diff --git a/node_modules/pify/license b/node_modules/pify/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/pify/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/pify/package.json b/node_modules/pify/package.json deleted file mode 100644 index 21975d2f..00000000 --- a/node_modules/pify/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_from": "pify@^4.0.1", - "_id": "pify@4.0.1", - "_inBundle": false, - "_integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "_location": "/pify", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "pify@^4.0.1", - "name": "pify", - "escapedName": "pify", - "rawSpec": "^4.0.1", - "saveSpec": null, - "fetchSpec": "^4.0.1" - }, - "_requiredBy": [ - "/isomorphic-git" - ], - "_resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "_shasum": "4b2cd25c50d598735c50292224fd8c6df41e3231", - "_spec": "pify@^4.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/isomorphic-git", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/pify/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Promisify a callback-style function", - "devDependencies": { - "ava": "^0.25.0", - "pinkie-promise": "^2.0.0", - "v8-natives": "^1.1.0", - "xo": "^0.23.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/pify#readme", - "keywords": [ - "promise", - "promises", - "promisify", - "all", - "denodify", - "denodeify", - "callback", - "cb", - "node", - "then", - "thenify", - "convert", - "transform", - "wrap", - "wrapper", - "bind", - "to", - "async", - "await", - "es2015", - "bluebird" - ], - "license": "MIT", - "name": "pify", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/pify.git" - }, - "scripts": { - "optimization-test": "node --allow-natives-syntax optimization-test.js", - "test": "xo && ava" - }, - "version": "4.0.1" -} diff --git a/node_modules/pify/readme.md b/node_modules/pify/readme.md deleted file mode 100644 index 7ae3f1c5..00000000 --- a/node_modules/pify/readme.md +++ /dev/null @@ -1,145 +0,0 @@ -# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify) - -> Promisify a callback-style function - ---- - -
    - - Get professional support for 'pify' with a Tidelift subscription - -
    - - Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. -
    -
    - ---- - - -## Install - -``` -$ npm install pify -``` - - -## Usage - -```js -const fs = require('fs'); -const pify = require('pify'); - -// Promisify a single function -pify(fs.readFile)('package.json', 'utf8').then(data => { - console.log(JSON.parse(data).name); - //=> 'pify' -}); - -// Promisify all methods in a module -pify(fs).readFile('package.json', 'utf8').then(data => { - console.log(JSON.parse(data).name); - //=> 'pify' -}); -``` - - -## API - -### pify(input, [options]) - -Returns a `Promise` wrapped version of the supplied function or module. - -#### input - -Type: `Function` `Object` - -Callback-style function or module whose methods you want to promisify. - -#### options - -##### multiArgs - -Type: `boolean`
    -Default: `false` - -By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument. This also applies to rejections, where it returns an array of all the callback arguments, including the error. - -```js -const request = require('request'); -const pify = require('pify'); - -pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => { - const [httpResponse, body] = result; -}); -``` - -##### include - -Type: `string[]` `RegExp[]` - -Methods in a module to promisify. Remaining methods will be left untouched. - -##### exclude - -Type: `string[]` `RegExp[]`
    -Default: `[/.+(Sync|Stream)$/]` - -Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default. - -##### excludeMain - -Type: `boolean`
    -Default: `false` - -If given module is a function itself, it will be promisified. Turn this option on if you want to promisify only methods of the module. - -```js -const pify = require('pify'); - -function fn() { - return true; -} - -fn.method = (data, callback) => { - setImmediate(() => { - callback(null, data); - }); -}; - -// Promisify methods but not `fn()` -const promiseFn = pify(fn, {excludeMain: true}); - -if (promiseFn()) { - promiseFn.method('hi').then(data => { - console.log(data); - }); -} -``` - -##### errorFirst - -Type: `boolean`
    -Default: `true` - -Whether the callback has an error as the first argument. You'll want to set this to `false` if you're dealing with an API that doesn't have an error as the first argument, like `fs.exists()`, some browser APIs, Chrome Extension APIs, etc. - -##### promiseModule - -Type: `Function` - -Custom promise module to use instead of the native one. - -Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill. - - -## Related - -- [p-event](https://github.com/sindresorhus/p-event) - Promisify an event by waiting for it to be emitted -- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/pino-pretty/.editorconfig b/node_modules/pino-pretty/.editorconfig deleted file mode 100644 index 3fec5c5b..00000000 --- a/node_modules/pino-pretty/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ - -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -indent_style = space -indent_size = 2 -trim_trailing_whitespace = true - -# [*.md] -# trim_trailing_whitespace = false diff --git a/node_modules/pino-pretty/.github/dependabot.yml b/node_modules/pino-pretty/.github/dependabot.yml deleted file mode 100644 index 47a54f35..00000000 --- a/node_modules/pino-pretty/.github/dependabot.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: 2 -updates: -- package-ecosystem: github-actions - directory: '/' - schedule: - interval: daily - open-pull-requests-limit: 10 -- package-ecosystem: npm - directory: '/' - schedule: - interval: daily - open-pull-requests-limit: 10 \ No newline at end of file diff --git a/node_modules/pino-pretty/.github/workflows/ci.yml b/node_modules/pino-pretty/.github/workflows/ci.yml deleted file mode 100644 index 4bae8e0a..00000000 --- a/node_modules/pino-pretty/.github/workflows/ci.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: CI - -on: - push: - paths-ignore: - - 'docs/**' - - '*.md' - pull_request: - paths-ignore: - - 'docs/**' - - '*.md' - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [10, 12, 13, 14, 16] - steps: - - name: Checkout - uses: actions/checkout@v2.3.4 - - - name: Use Node.js - uses: actions/setup-node@v2.2.0 - with: - node-version: ${{ matrix.node-version }} - - - name: Restore cached dependencies - uses: actions/cache@v2.1.6 - with: - path: node_modules - key: node-modules-${{ hashFiles('package.json') }} - - - name: Install dependencies - run: npm install - - - name: Run Tests - run: npm run ci - - - name: Coveralls Parallel - uses: coverallsapp/github-action@1.1.3 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - parallel: true - flag-name: run-${{ matrix.node-version }}-${{ matrix.os }} - - coverage: - needs: build - runs-on: ubuntu-latest - steps: - - name: Coveralls Finished - uses: coverallsapp/github-action@1.1.3 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - parallel-finished: true - - automerge: - needs: build - runs-on: ubuntu-latest - steps: - - uses: fastify/github-action-merge-dependabot@v2.2.0 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/node_modules/pino-pretty/.taprc b/node_modules/pino-pretty/.taprc deleted file mode 100644 index 2b99deb0..00000000 --- a/node_modules/pino-pretty/.taprc +++ /dev/null @@ -1,4 +0,0 @@ -ts: false -jsx: false -flow: false -jobs: 1 diff --git a/node_modules/pino-pretty/LICENSE b/node_modules/pino-pretty/LICENSE deleted file mode 100644 index e2793b59..00000000 --- a/node_modules/pino-pretty/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2019 the Pino team - -Pino team listed at https://github.com/pinojs/pino#the-team - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/pino-pretty/Readme.md b/node_modules/pino-pretty/Readme.md deleted file mode 100644 index fc8f8bf1..00000000 --- a/node_modules/pino-pretty/Readme.md +++ /dev/null @@ -1,194 +0,0 @@ - -# pino-pretty - -[![NPM Package Version](https://img.shields.io/npm/v/pino-pretty)](https://www.npmjs.com/package/pino-pretty) -[![Build Status](https://img.shields.io/github/workflow/status/pinojs/pino-pretty/CI)](https://github.com/pinojs/pino-pretty/actions?query=workflow%3ACI) -[![Known Vulnerabilities](https://snyk.io/test/github/pinojs/pino-pretty/badge.svg)](https://snyk.io/test/github/pinojs/pino-pretty) -[![Coverage Status](https://img.shields.io/coveralls/github/pinojs/pino-pretty)](https://coveralls.io/github/pinojs/pino-pretty?branch=master) -[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) - -This module provides a basic [ndjson](http://ndjson.org/) formatter. If an -incoming line looks like it could be a log line from an ndjson logger, in -particular the [Pino](https://getpino.io/) logging library, then it will apply -extra formatting by considering things like the log level and timestamp. - -A standard Pino log line like: - -``` -{"level":30,"time":1522431328992,"msg":"hello world","pid":42,"hostname":"foo","v":1} -``` - -Will format to: - -``` -[1522431328992] INFO (42 on foo): hello world -``` - - -## Example - -Using the [example script][exscript] from the Pino module, and specifying -that logs should be colored and the time translated, we can see what the -prettified logs will look like: - -![demo](demo.png) - -[exscript]: https://github.com/pinojs/pino/blob/fc4c83b/example.js - - -## Install - -```sh -$ npm install -g pino-pretty -``` - - -## Usage - -It is recommended to use `pino-pretty` with `pino` -by piping output to the CLI tool: - -```sh -node app.js | pino-pretty -``` - - -### CLI Arguments - -- `--colorize` (`-c`): Adds terminal color escape sequences to the output. -- `--crlf` (`-f`): Appends carriage return and line feed, instead of just a line - feed, to the formatted log line. -- `--errorProps` (`-e`): When formatting an error object, display this list - of properties. The list should be a comma-separated list of properties Default: `''`. -- `--levelFirst` (`-l`): Display the log level name before the logged date and time. -- `--errorLikeObjectKeys` (`-k`): Define the log keys that are associated with - error like objects. Default: `err,error`. -- `--messageKey` (`-m`): Define the key that contains the main log message. - Default: `msg`. -- `--levelKey` (`--levelKey`): Define the key that contains the level of the log. - Default: `level`. -- `--levelLabel` (`-b`): Output the log level using the specified label. - Default: `levelLabel`. -- `--messageFormat` (`-o`): Format output of message, e.g. `{levelLabel} - {pid} - url:{request.url}` will output message: `INFO - 1123 - url:localhost:3000/test` - Default: `false` -- `--timestampKey` (`-a`): Define the key that contains the log timestamp. - Default: `time`. -- `--translateTime` (`-t`): Translate the epoch time value into a human-readable - date and time string. This flag also can set the format string to apply when - translating the date to a human-readable format. For a list of available pattern - letters, see the [`dateformat` documentation](https://www.npmjs.com/package/dateformat). - - The default format is `yyyy-mm-dd HH:MM:ss.l o` in UTC. - - Require a `SYS:` prefix to translate time to the local system's time zone. A - shortcut `SYS:standard` to translate time to `yyyy-mm-dd HH:MM:ss.l o` in - system time zone. -- `--search` (`-s`): Specify a search pattern according to - [jmespath](http://jmespath.org/). -- `--ignore` (`-i`): Ignore one or several keys, nested keys are supported with each property delimited by a dot character (`.`), - keys may be escaped to target property names that contains the delimiter itself: - (`-i time,hostname,req.headers,log\\.domain\\.corp/foo`) -- `--hideObject` (`-H`): Hide objects from output (but not error object) -- `--singleLine` (`-S`): Print each log message on a single line (errors will still be multi-line) -- `--config`: Specify a path to a config file containing the pino-pretty options. pino-pretty will attempt to read from a `.pino-prettyrc` in your current directory (`process.cwd`) if not specified - - -## Programmatic Integration - -We recommend against using `pino-pretty` in production and highly -recommend installing `pino-pretty` as a development dependency. - -When installed, `pino-pretty` will be used by `pino` as the default -prettifier. - -Install `pino-pretty` alongside `pino` and set the -`prettyPrint` option to `true`: - -```js -const pino = require('pino') -const logger = pino({ - prettyPrint: true -}) - -logger.info('hi') -``` - -The `prettyPrint` option can also be an object containing `pretty-print` -options: - -```js -const pino = require('pino') -const logger = pino({ - prettyPrint: { colorize: true } -}) - -logger.info('hi') -``` - -See the [Options](#options) section for all possible options. - - -### Options - -`pino-pretty` exports a factory function that can be used to format log strings. -This factory function is used internally by Pino, and accepts an options argument -with keys corresponding to the options described in [CLI Arguments](#cliargs): - -```js -{ - colorize: chalk.supportsColor, // --colorize - crlf: false, // --crlf - errorLikeObjectKeys: ['err', 'error'], // --errorLikeObjectKeys - errorProps: '', // --errorProps - levelFirst: false, // --levelFirst - messageKey: 'msg', // --messageKey - levelKey: 'level', // --levelKey - messageFormat: false, // --messageFormat - timestampKey: 'time', // --timestampKey - translateTime: false, // --translateTime - search: 'foo == `bar`', // --search - ignore: 'pid,hostname', // --ignore - hideObject: false, // --hideObject - singleLine: false, // --singleLine - customPrettifiers: {} -} -``` - -The `colorize` default follows -[`chalk.supportsColor`](https://www.npmjs.com/package/chalk#chalksupportscolor). - -`customPrettifiers` option provides the ability to add a custom prettify function -for specific log properties. `customPrettifiers` is an object, where keys are -log properties that will be prettified and value is the prettify function itself. -For example, if a log line contains a `query` property, -you can specify a prettifier for it: -```js -{ - customPrettifiers: { - query: prettifyQuery - } -} -//... -const prettifyQuery = value => { - // do some prettify magic -} -``` - -`messageFormat` option allows you to customize the message output. A template `string` like this can define the format: -```js -{ - messageFormat: '{levelLabel} - {pid} - url:{request.url}' -} -``` -This option can also be defined as a `function` with this prototype: -```js -{ - messageFormat: (log, messageKey, levelLabel) => { - // do some log message customization - return customized_message; - } -} -``` - - -## License - -MIT License diff --git a/node_modules/pino-pretty/bin.js b/node_modules/pino-pretty/bin.js deleted file mode 100755 index 482b6073..00000000 --- a/node_modules/pino-pretty/bin.js +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env node - -const fs = require('fs') -const args = require('args') -const path = require('path') -const pump = require('pump') -const split = require('split2') -const { Transform } = require('readable-stream') -const prettyFactory = require('./') -const CONSTANTS = require('./lib/constants') -const { isObject } = require('./lib/utils') - -const bourne = require('@hapi/bourne') -const stripJsonComments = require('strip-json-comments') -const parseJSON = input => { - return bourne.parse(stripJsonComments(input), { protoAction: 'remove' }) -} - -const JoyCon = require('joycon') -const joycon = new JoyCon({ - parseJSON, - files: [ - 'pino-pretty.config.js', - '.pino-prettyrc', - '.pino-prettyrc.json' - ], - stopDir: path.dirname(process.cwd()) -}) -joycon.addLoader({ - test: /\.[^.]*rc$/, - loadSync: (path) => parseJSON(fs.readFileSync(path, 'utf-8')) -}) - -args - .option(['c', 'colorize'], 'Force adding color sequences to the output') - .option(['f', 'crlf'], 'Append CRLF instead of LF to formatted lines') - .option(['e', 'errorProps'], 'Comma separated list of properties on error objects to show (`*` for all properties) (defaults to ``)') - .option(['l', 'levelFirst'], 'Display the log level as the first output field') - .option(['k', 'errorLikeObjectKeys'], 'Define which keys contain error objects (`-k err,error`) (defaults to `err,error`)') - .option(['m', 'messageKey'], 'Highlight the message under the specified key', CONSTANTS.MESSAGE_KEY) - .option('levelKey', 'Detect the log level under the specified key', CONSTANTS.LEVEL_KEY) - .option(['b', 'levelLabel'], 'Output the log level using the specified label', CONSTANTS.LEVEL_LABEL) - .option(['o', 'messageFormat'], 'Format output of message') - .option(['a', 'timestampKey'], 'Display the timestamp from the specified key', CONSTANTS.TIMESTAMP_KEY) - .option(['t', 'translateTime'], 'Display epoch timestamps as UTC ISO format or according to an optional format string (default ISO 8601)') - .option(['s', 'search'], 'Specify a search pattern according to jmespath') - .option(['i', 'ignore'], 'Ignore one or several keys: (`-i time,hostname`)') - .option(['H', 'hideObject'], 'Hide objects from output (but not error object)') - .option(['S', 'singleLine'], 'Print all non-error objects on a single line') - .option('config', 'specify a path to a json file containing the pino-pretty options') - -args - .example('cat log | pino-pretty', 'To prettify logs, simply pipe a log file through') - .example('cat log | pino-pretty -m fooMessage', 'To highlight a string at a key other than \'msg\'') - .example('cat log | pino-pretty --levelKey fooLevel', 'To detect the log level at a key other than \'level\'') - .example('cat log | pino-pretty --levelLabel LVL -o "{LVL}"', 'To output the log level label using a key other than \'levelLabel\'') - .example('cat log | pino-pretty -a fooTimestamp', 'To display timestamp from a key other than \'time\'') - .example('cat log | pino-pretty -t', 'To convert Epoch timestamps to ISO timestamps use the -t option') - .example('cat log | pino-pretty -t "SYS:yyyy-mm-dd HH:MM:ss"', 'To convert Epoch timestamps to local timezone format use the -t option with "SYS:" prefixed format string') - .example('cat log | pino-pretty -l', 'To flip level and time/date in standard output use the -l option') - .example('cat log | pino-pretty -s "msg == \'hello world\'"', 'Only prints messages with msg equals to \'hello world\'') - .example('cat log | pino-pretty -i pid,hostname', 'Prettify logs but don\'t print pid and hostname') - .example('cat log | pino-pretty --config=/path/to/config.json', 'Loads options from a config file') - -const DEFAULT_VALUE = '\0default' - -let opts = args.parse(process.argv, { - mri: { - default: { - messageKey: DEFAULT_VALUE, - levelKey: DEFAULT_VALUE, - timestampKey: DEFAULT_VALUE - } - } -}) - -// Remove default values -opts = filter(opts, value => value !== DEFAULT_VALUE) -const config = loadConfig(opts.config) -// Override config with cli options -opts = Object.assign({}, config, opts) -// set defaults -opts.errorLikeObjectKeys = opts.errorLikeObjectKeys || 'err,error' -opts.errorProps = opts.errorProps || '' -const pretty = prettyFactory(opts) -const prettyTransport = new Transform({ - objectMode: true, - transform (chunk, enc, cb) { - const line = pretty(chunk.toString()) - if (line === undefined) return cb() - cb(null, line) - } -}) - -pump(process.stdin, split(), prettyTransport, process.stdout) - -// https://github.com/pinojs/pino/pull/358 -/* istanbul ignore next */ -if (!process.stdin.isTTY && !fs.fstatSync(process.stdin.fd).isFile()) { - process.once('SIGINT', function noOp () {}) -} - -function loadConfig (configPath) { - const files = configPath ? [path.resolve(configPath)] : undefined - const result = joycon.loadSync(files) - if (result.path && !isObject(result.data)) { - configPath = configPath || path.basename(result.path) - throw new Error(`Invalid runtime configuration file: ${configPath}`) - } - if (configPath && !result.data) { - throw new Error(`Failed to load runtime configuration file: ${configPath}`) - } - return result.data -} - -function filter (obj, cb) { - return Object.keys(obj).reduce((acc, key) => { - const value = obj[key] - if (cb(value, key)) { - acc[key] = value - } - return acc - }, {}) -} diff --git a/node_modules/pino-pretty/demo.png b/node_modules/pino-pretty/demo.png deleted file mode 100644 index d2d51ee0..00000000 Binary files a/node_modules/pino-pretty/demo.png and /dev/null differ diff --git a/node_modules/pino-pretty/docs/help.md b/node_modules/pino-pretty/docs/help.md deleted file mode 100644 index ad7231f9..00000000 --- a/node_modules/pino-pretty/docs/help.md +++ /dev/null @@ -1,24 +0,0 @@ - -## Systemd example - -If you run your Node.js process via [Systemd](https://www.freedesktop.org/wiki/Software/systemd/) and you examine your logs with [journalctl](https://www.freedesktop.org/software/systemd/man/journalctl.html) some data will be duplicated. You can use a combination of `journalctl` options and `pino-pretty` options to shape the output. - -For example viewing the prettified logs of a process named `monitor` with `journalctl -u monitor -f | pino-pretty`, might output something like this: - -``` -Apr 24 07:40:01 nanopi node[6080]: {"level":30,"time":1587706801902,"pid":6080,"hostname":"nanopi","msg":"TT -21","v":1} -``` -As you can see, the timestamp, hostname, and pid are duplicated. -If you just want the bare prettified Pino logs you can strip out the duplicate items from the `journalctl` output with the `-o cat` option of `journalctl`: -``` -journalctl -u monitor -f -o cat | pino-pretty -``` -the output now looks something like this: -``` -[1587706801902] INFO (6080 on nanopi): TT 21 -``` -Make the output even more human readable by using the pino-pretty options `-t` to format the timestamp and `-i pid, hostname` to filter out hostname and pid: -``` -[2020-04-24 05:42:24.836 +0000] INFO : TT 21 -``` diff --git a/node_modules/pino-pretty/index.d.ts b/node_modules/pino-pretty/index.d.ts deleted file mode 100644 index 2405990e..00000000 --- a/node_modules/pino-pretty/index.d.ts +++ /dev/null @@ -1,132 +0,0 @@ -// Type definitions for pino-pretty 4.7 -// Project: https://github.com/pinojs/pino-pretty#readme -// Definitions by: Adam Vigneaux -// Minimum TypeScript Version: 3.0 - -type LogDescriptor = Record; - -declare function PinoPretty(options: PrettyOptions_): PinoPretty.Prettifier; - -interface PrettyOptions_ { - /** - * Hide objects from output (but not error object). - * @default false - */ - hideObject?: boolean; - /** - * Translate the epoch time value into a human readable date and time string. This flag also can set the format - * string to apply when translating the date to human readable format. For a list of available pattern letters - * see the {@link https://www.npmjs.com/package/dateformat|dateformat documentation}. - * - The default format is `yyyy-mm-dd HH:MM:ss.l o` in UTC. - * - Requires a `SYS:` prefix to translate time to the local system's timezone. Use the shortcut `SYS:standard` - * to translate time to `yyyy-mm-dd HH:MM:ss.l o` in system timezone. - * @default false - */ - translateTime?: boolean | string; - /** - * If set to true, it will print the name of the log level as the first field in the log line. - * @default false - */ - levelFirst?: boolean; - /** - * Define the key that contains the level of the log. - * @default "level" - */ - levelKey?: string; - /** - * Output the log level using the specified label. - * @default "levelLabel" - */ - levelLabel?: string; - /** - * The key in the JSON object to use as the highlighted message. - * @default "msg" - */ - messageKey?: string; - /** - * Print each log message on a single line (errors will still be multi-line). - * @default false - */ - singleLine?: boolean; - /** - * The key in the JSON object to use for timestamp display. - * @default "time" - */ - timestampKey?: string; - /** - * Format output of message, e.g. {level} - {pid} will output message: INFO - 1123 - * @default false - * - * @example - * ```typescript - * { - * messageFormat: (log, messageKey) => { - * const message = log[messageKey]; - * if (log.requestId) return `[${log.requestId}] ${message}`; - * return message; - * } - * } - * ``` - */ - messageFormat?: false | string | PinoPretty.MessageFormatFunc; - /** - * If set to true, will add color information to the formatted output message. - * @default false - */ - colorize?: boolean; - /** - * Appends carriage return and line feed, instead of just a line feed, to the formatted log line. - * @default false - */ - crlf?: boolean; - /** - * Define the log keys that are associated with error like objects. - * @default ["err", "error"] - */ - errorLikeObjectKeys?: string[]; - /** - * When formatting an error object, display this list of properties. - * The list should be a comma separated list of properties. - * @default "" - */ - errorProps?: string; - /** - * Specify a search pattern according to {@link http://jmespath.org|jmespath} - */ - search?: string; - /** - * Ignore one or several keys. - * @example "time,hostname" - */ - ignore?: string; - /** - * Provides the ability to add a custom prettify function for specific log properties. - * `customPrettifiers` is an object, where keys are log properties that will be prettified - * and value is the prettify function itself. - * For example, if a log line contains a query property, you can specify a prettifier for it: - * @default {} - * - * @example - * ```typescript - * { - * customPrettifiers: { - * query: prettifyQuery - * } - * } - * //... - * const prettifyQuery = value => { - * // do some prettify magic - * } - * ``` - */ - customPrettifiers?: Record; -} - -declare namespace PinoPretty { - type Prettifier = (inputData: string | object) => string; - type MessageFormatFunc = (log: LogDescriptor, messageKey: string, levelLabel: string) => string; - type PrettyOptions = PrettyOptions_ -} - -export default PinoPretty; -export { PinoPretty, PrettyOptions_ as PrettyOptions } diff --git a/node_modules/pino-pretty/index.js b/node_modules/pino-pretty/index.js deleted file mode 100644 index 8b543bdb..00000000 --- a/node_modules/pino-pretty/index.js +++ /dev/null @@ -1,170 +0,0 @@ -'use strict' - -const chalk = require('chalk') -const jmespath = require('jmespath') -const colors = require('./lib/colors') -const { ERROR_LIKE_KEYS, MESSAGE_KEY, TIMESTAMP_KEY } = require('./lib/constants') -const { - isObject, - prettifyErrorLog, - prettifyLevel, - prettifyMessage, - prettifyMetadata, - prettifyObject, - prettifyTime, - filterLog -} = require('./lib/utils') - -const bourne = require('@hapi/bourne') -const jsonParser = input => { - try { - return { value: bourne.parse(input, { protoAction: 'remove' }) } - } catch (err) { - return { err } - } -} - -const defaultOptions = { - colorize: chalk.supportsColor, - crlf: false, - errorLikeObjectKeys: ERROR_LIKE_KEYS, - errorProps: '', - levelFirst: false, - messageKey: MESSAGE_KEY, - messageFormat: false, - timestampKey: TIMESTAMP_KEY, - translateTime: false, - useMetadata: false, - outputStream: process.stdout, - customPrettifiers: {}, - hideObject: false, - singleLine: false -} - -function prettyFactory (options) { - const opts = Object.assign({}, defaultOptions, options) - const EOL = opts.crlf ? '\r\n' : '\n' - const IDENT = ' ' - const messageKey = opts.messageKey - const levelKey = opts.levelKey - const levelLabel = opts.levelLabel - const messageFormat = opts.messageFormat - const timestampKey = opts.timestampKey - const errorLikeObjectKeys = opts.errorLikeObjectKeys - const errorProps = opts.errorProps.split(',') - const customPrettifiers = opts.customPrettifiers - const ignoreKeys = opts.ignore ? new Set(opts.ignore.split(',')) : undefined - const hideObject = opts.hideObject - const singleLine = opts.singleLine - - const colorizer = colors(opts.colorize) - const search = opts.search - - return pretty - - function pretty (inputData) { - let log - if (!isObject(inputData)) { - const parsed = jsonParser(inputData) - if (parsed.err || !isObject(parsed.value)) { - // pass through - return inputData + EOL - } - log = parsed.value - } else { - log = inputData - } - - if (search && !jmespath.search(log, search)) { - return - } - - const prettifiedMessage = prettifyMessage({ log, messageKey, colorizer, messageFormat, levelLabel }) - - if (ignoreKeys) { - log = filterLog(log, ignoreKeys) - } - - const prettifiedLevel = prettifyLevel({ log, colorizer, levelKey }) - const prettifiedMetadata = prettifyMetadata({ log }) - const prettifiedTime = prettifyTime({ log, translateFormat: opts.translateTime, timestampKey }) - - let line = '' - if (opts.levelFirst && prettifiedLevel) { - line = `${prettifiedLevel}` - } - - if (prettifiedTime && line === '') { - line = `${prettifiedTime}` - } else if (prettifiedTime) { - line = `${line} ${prettifiedTime}` - } - - if (!opts.levelFirst && prettifiedLevel) { - if (line.length > 0) { - line = `${line} ${prettifiedLevel}` - } else { - line = prettifiedLevel - } - } - - if (prettifiedMetadata) { - if (line.length > 0) { - line = `${line} ${prettifiedMetadata}:` - } else { - line = prettifiedMetadata - } - } - - if (line.endsWith(':') === false && line !== '') { - line += ':' - } - - if (prettifiedMessage) { - if (line.length > 0) { - line = `${line} ${prettifiedMessage}` - } else { - line = prettifiedMessage - } - } - - if (line.length > 0 && !singleLine) { - line += EOL - } - - if (log.type === 'Error' && log.stack) { - const prettifiedErrorLog = prettifyErrorLog({ - log, - errorLikeKeys: errorLikeObjectKeys, - errorProperties: errorProps, - ident: IDENT, - eol: EOL - }) - line += prettifiedErrorLog - } else if (!hideObject) { - const skipKeys = [messageKey, levelKey, timestampKey].filter(key => typeof log[key] === 'string' || typeof log[key] === 'number') - const prettifiedObject = prettifyObject({ - input: log, - skipKeys, - customPrettifiers, - errorLikeKeys: errorLikeObjectKeys, - eol: EOL, - ident: IDENT, - singleLine, - colorizer - }) - - // In single line mode, include a space only if prettified version isn't empty - if (singleLine && !/^\s$/.test(prettifiedObject)) { - line += ' ' - } - line += prettifiedObject - } - - return line - } -} - -prettyFactory.prettyFactory = prettyFactory -prettyFactory.default = prettyFactory -module.exports = prettyFactory diff --git a/node_modules/pino-pretty/lib/colors.js b/node_modules/pino-pretty/lib/colors.js deleted file mode 100644 index 41018d87..00000000 --- a/node_modules/pino-pretty/lib/colors.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict' - -const { LEVELS, LEVEL_NAMES } = require('./constants') - -const nocolor = input => input -const plain = { - default: nocolor, - 60: nocolor, - 50: nocolor, - 40: nocolor, - 30: nocolor, - 20: nocolor, - 10: nocolor, - message: nocolor, - greyMessage: nocolor -} - -const chalk = require('chalk') -const ctx = new chalk.Instance({ level: 3 }) -const colored = { - default: ctx.white, - 60: ctx.bgRed, - 50: ctx.red, - 40: ctx.yellow, - 30: ctx.green, - 20: ctx.blue, - 10: ctx.grey, - message: ctx.cyan, - greyMessage: ctx.grey -} - -function colorizeLevel (level, colorizer) { - if (Number.isInteger(+level)) { - return Object.prototype.hasOwnProperty.call(LEVELS, level) - ? colorizer[level](LEVELS[level]) - : colorizer.default(LEVELS.default) - } - const levelNum = LEVEL_NAMES[level.toLowerCase()] || 'default' - return colorizer[levelNum](LEVELS[levelNum]) -} - -function plainColorizer (level) { - return colorizeLevel(level, plain) -} -plainColorizer.message = plain.message -plainColorizer.greyMessage = plain.greyMessage - -function coloredColorizer (level) { - return colorizeLevel(level, colored) -} -coloredColorizer.message = colored.message -coloredColorizer.greyMessage = colored.greyMessage - -/** - * Factory function get a function to colorized levels. The returned function - * also includes a `.message(str)` method to colorize strings. - * - * @param {boolean} [useColors=false] When `true` a function that applies standard - * terminal colors is returned. - * - * @returns {function} `function (level) {}` has a `.message(str)` method to - * apply colorization to a string. The core function accepts either an integer - * `level` or a `string` level. The integer level will map to a known level - * string or to `USERLVL` if not known. The string `level` will map to the same - * colors as the integer `level` and will also default to `USERLVL` if the given - * string is not a recognized level name. - */ -module.exports = function getColorizer (useColors = false) { - return useColors ? coloredColorizer : plainColorizer -} diff --git a/node_modules/pino-pretty/lib/constants.js b/node_modules/pino-pretty/lib/constants.js deleted file mode 100644 index 509fba99..00000000 --- a/node_modules/pino-pretty/lib/constants.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict' - -module.exports = { - DATE_FORMAT: 'yyyy-mm-dd HH:MM:ss.l o', - - ERROR_LIKE_KEYS: ['err', 'error'], - - MESSAGE_KEY: 'msg', - - LEVEL_KEY: 'level', - - LEVEL_LABEL: 'levelLabel', - - TIMESTAMP_KEY: 'time', - - LEVELS: { - default: 'USERLVL', - 60: 'FATAL', - 50: 'ERROR', - 40: 'WARN', - 30: 'INFO', - 20: 'DEBUG', - 10: 'TRACE' - }, - - LEVEL_NAMES: { - fatal: 60, - error: 50, - warn: 40, - info: 30, - debug: 20, - trace: 10 - }, - - // Object keys that probably came from a logger like Pino or Bunyan. - LOGGER_KEYS: [ - 'pid', - 'hostname', - 'name', - 'level', - 'time', - 'timestamp', - 'caller' - ] -} diff --git a/node_modules/pino-pretty/lib/utils.js b/node_modules/pino-pretty/lib/utils.js deleted file mode 100644 index 0a54956b..00000000 --- a/node_modules/pino-pretty/lib/utils.js +++ /dev/null @@ -1,567 +0,0 @@ -'use strict' - -const clone = require('rfdc')({ circles: true }) -const dateformat = require('dateformat') -const stringifySafe = require('fast-safe-stringify') -const defaultColorizer = require('./colors')() -const { - DATE_FORMAT, - ERROR_LIKE_KEYS, - MESSAGE_KEY, - LEVEL_KEY, - LEVEL_LABEL, - TIMESTAMP_KEY, - LOGGER_KEYS, - LEVELS -} = require('./constants') - -module.exports = { - isObject, - prettifyErrorLog, - prettifyLevel, - prettifyMessage, - prettifyMetadata, - prettifyObject, - prettifyTime, - filterLog -} - -module.exports.internals = { - formatTime, - joinLinesWithIndentation, - prettifyError, - deleteLogProperty, - splitIgnoreKey, - createDate, - isValidDate -} - -/** - * Converts a given `epoch` to a desired display format. - * - * @param {number|string} epoch The time to convert. May be any value that is - * valid for `new Date()`. - * @param {boolean|string} [translateTime=false] When `false`, the given `epoch` - * will simply be returned. When `true`, the given `epoch` will be converted - * to a string at UTC using the `DATE_FORMAT` constant. If `translateTime` is - * a string, the following rules are available: - * - * - ``: The string is a literal format string. This format - * string will be used to interpret the `epoch` and return a display string - * at UTC. - * - `SYS:STANDARD`: The returned display string will follow the `DATE_FORMAT` - * constant at the system's local timezone. - * - `SYS:`: The returned display string will follow the given - * `` at the system's local timezone. - * - `UTC:`: The returned display string will follow the given - * `` at UTC. - * - * @returns {number|string} The formatted time. - */ -function formatTime (epoch, translateTime = false) { - if (translateTime === false) { - return epoch - } - - const instant = createDate(epoch) - - // If the Date is invalid, do not attempt to format - if (!isValidDate(instant)) { - return epoch - } - - if (translateTime === true) { - return dateformat(instant, 'UTC:' + DATE_FORMAT) - } - - const upperFormat = translateTime.toUpperCase() - if (upperFormat === 'SYS:STANDARD') { - return dateformat(instant, DATE_FORMAT) - } - - const prefix = upperFormat.substr(0, 4) - if (prefix === 'SYS:' || prefix === 'UTC:') { - if (prefix === 'UTC:') { - return dateformat(instant, translateTime) - } - return dateformat(instant, translateTime.slice(4)) - } - - return dateformat(instant, `UTC:${translateTime}`) -} - -/** - * Constructs a JS Date from a number or string. Accepts any single number - * or single string argument that is valid for the Date() constructor, - * or an epoch as a string. - * - * @param {string|number} epoch The representation of the Date. - * - * @returns {Date} The constructed Date. - */ -function createDate (epoch) { - // If epoch is already a valid argument, return the valid Date - let date = new Date(epoch) - if (isValidDate(date)) { - return date - } - - // Convert to a number to permit epoch as a string - date = new Date(+epoch) - return date -} - -/** - * Checks if the argument is a JS Date and not 'Invalid Date'. - * - * @param {Date} date The date to check. - * - * @returns {boolean} true if the argument is a JS Date and not 'Invalid Date'. - */ -function isValidDate (date) { - return date instanceof Date && !Number.isNaN(date.getTime()) -} - -function isObject (input) { - return Object.prototype.toString.apply(input) === '[object Object]' -} - -/** - * Given a string with line separators, either `\r\n` or `\n`, add indentation - * to all lines subsequent to the first line and rejoin the lines using an - * end of line sequence. - * - * @param {object} input - * @param {string} input.input The string to split and reformat. - * @param {string} [input.ident] The indentation string. Default: ` ` (4 spaces). - * @param {string} [input.eol] The end of line sequence to use when rejoining - * the lines. Default: `'\n'`. - * - * @returns {string} A string with lines subsequent to the first indented - * with the given indentation sequence. - */ -function joinLinesWithIndentation ({ input, ident = ' ', eol = '\n' }) { - const lines = input.split(/\r?\n/) - for (let i = 1; i < lines.length; i += 1) { - lines[i] = ident + lines[i] - } - return lines.join(eol) -} - -/** - * Given a log object that has a `type: 'Error'` key, prettify the object and - * return the result. In other - * - * @param {object} input - * @param {object} input.log The error log to prettify. - * @param {string} [input.messageKey] The name of the key that contains a - * general log message. This is not the error's message property but the logger - * messsage property. Default: `MESSAGE_KEY` constant. - * @param {string} [input.ident] The sequence to use for indentation. Default: `' '`. - * @param {string} [input.eol] The sequence to use for EOL. Default: `'\n'`. - * @param {string[]} [input.errorLikeKeys] A set of keys that should be considered - * to have error objects as values. Default: `ERROR_LIKE_KEYS` constant. - * @param {string[]} [input.errorProperties] A set of specific error object - * properties, that are not the value of `messageKey`, `type`, or `stack`, to - * include in the prettified result. The first entry in the list may be `'*'` - * to indicate that all sibiling properties should be prettified. Default: `[]`. - * - * @returns {string} A sring that represents the prettified error log. - */ -function prettifyErrorLog ({ - log, - messageKey = MESSAGE_KEY, - ident = ' ', - eol = '\n', - errorLikeKeys = ERROR_LIKE_KEYS, - errorProperties = [] -}) { - const stack = log.stack - const joinedLines = joinLinesWithIndentation({ input: stack, ident, eol }) - let result = `${ident}${joinedLines}${eol}` - - if (errorProperties.length > 0) { - const excludeProperties = LOGGER_KEYS.concat(messageKey, 'type', 'stack') - let propertiesToPrint - if (errorProperties[0] === '*') { - // Print all sibling properties except for the standard exclusions. - propertiesToPrint = Object.keys(log).filter(k => excludeProperties.includes(k) === false) - } else { - // Print only sepcified properties unless the property is a standard exclusion. - propertiesToPrint = errorProperties.filter(k => excludeProperties.includes(k) === false) - } - - for (let i = 0; i < propertiesToPrint.length; i += 1) { - const key = propertiesToPrint[i] - if (key in log === false) continue - if (isObject(log[key])) { - // The nested object may have "logger" type keys but since they are not - // at the root level of the object being processed, we want to print them. - // Thus, we invoke with `excludeLoggerKeys: false`. - const prettifiedObject = prettifyObject({ input: log[key], errorLikeKeys, excludeLoggerKeys: false, eol, ident }) - result = `${result}${key}: {${eol}${prettifiedObject}}${eol}` - continue - } - result = `${result}${key}: ${log[key]}${eol}` - } - } - - return result -} - -/** - * Checks if the passed in log has a `level` value and returns a prettified - * string for that level if so. - * - * @param {object} input - * @param {object} input.log The log object. - * @param {function} [input.colorizer] A colorizer function that accepts a level - * value and returns a colorized string. Default: a no-op colorizer. - * @param {string} [levelKey='level'] The key to find the level under. - * - * @returns {undefined|string} If `log` does not have a `level` property then - * `undefined` will be returned. Otherwise, a string from the specified - * `colorizer` is returned. - */ -function prettifyLevel ({ log, colorizer = defaultColorizer, levelKey = LEVEL_KEY }) { - if (levelKey in log === false) return undefined - return colorizer(log[levelKey]) -} - -/** - * Prettifies a message string if the given `log` has a message property. - * - * @param {object} input - * @param {object} input.log The log object with the message to colorize. - * @param {string} [input.messageKey='msg'] The property of the `log` that is the - * message to be prettified. - * @param {string|function} [input.messageFormat=undefined] A format string or function that defines how the - * logged message should be formatted, e.g. `'{level} - {pid}'`. - * @param {function} [input.colorizer] A colorizer function that has a - * `.message(str)` method attached to it. This function should return a colorized - * string which will be the "prettified" message. Default: a no-op colorizer. - * - * @returns {undefined|string} If the message key is not found, or the message - * key is not a string, then `undefined` will be returned. Otherwise, a string - * that is the prettified message. - */ -function prettifyMessage ({ log, messageFormat, messageKey = MESSAGE_KEY, colorizer = defaultColorizer, levelLabel = LEVEL_LABEL }) { - if (messageFormat && typeof messageFormat === 'string') { - const message = String(messageFormat).replace(/{([^{}]+)}/g, function (match, p1) { - // return log level as string instead of int - if (p1 === levelLabel && log[LEVEL_KEY]) { - return LEVELS[log[LEVEL_KEY]] - } - // Parse nested key access, e.g. `{keyA.subKeyB}`. - return p1.split('.').reduce(function (prev, curr) { - if (prev && prev[curr]) { - return prev[curr] - } - return '' - }, log) - }) - return colorizer.message(message) - } - if (messageFormat && typeof messageFormat === 'function') { - const msg = messageFormat(log, messageKey, levelLabel) - return colorizer.message(msg) - } - if (messageKey in log === false) return undefined - if (typeof log[messageKey] !== 'string') return undefined - return colorizer.message(log[messageKey]) -} - -/** - * Prettifies metadata that is usually present in a Pino log line. It looks for - * fields `name`, `pid`, `hostname`, and `caller` and returns a formatted string using - * the fields it finds. - * - * @param {object} input - * @param {object} input.log The log that may or may not contain metadata to - * be prettified. - * - * @returns {undefined|string} If no metadata is found then `undefined` is - * returned. Otherwise, a string of prettified metadata is returned. - */ -function prettifyMetadata ({ log }) { - let line = '' - - if (log.name || log.pid || log.hostname) { - line += '(' - - if (log.name) { - line += log.name - } - - if (log.name && log.pid) { - line += '/' + log.pid - } else if (log.pid) { - line += log.pid - } - - if (log.hostname) { - // If `pid` and `name` were in the ignore keys list then we don't need - // the leading space. - line += `${line === '(' ? 'on' : ' on'} ${log.hostname}` - } - - line += ')' - } - - if (log.caller) { - line += `${line === '' ? '' : ' '}<${log.caller}>` - } - - if (line === '') { - return undefined - } else { - return line - } -} - -/** - * Prettifies a standard object. Special care is taken when processing the object - * to handle child objects that are attached to keys known to contain error - * objects. - * - * @param {object} input - * @param {object} input.input The object to prettify. - * @param {string} [input.ident] The identation sequence to use. Default: `' '`. - * @param {string} [input.eol] The EOL sequence to use. Default: `'\n'`. - * @param {string[]} [input.skipKeys] A set of object keys to exclude from the - * prettified result. Default: `[]`. - * @param {Object} [input.customPrettifiers] Dictionary of - * custom prettifiers. Default: `{}`. - * @param {string[]} [input.errorLikeKeys] A set of object keys that contain - * error objects. Default: `ERROR_LIKE_KEYS` constant. - * @param {boolean} [input.excludeLoggerKeys] Indicates if known logger specific - * keys should be excluded from prettification. Default: `true`. - * @param {boolean} [input.singleLine] Should non-error keys all be formatted - * on a single line? This does NOT apply to errors, which will still be - * multi-line. Default: `false` - * - * @returns {string} The prettified string. This can be as little as `''` if - * there was nothing to prettify. - */ -function prettifyObject ({ - input, - ident = ' ', - eol = '\n', - skipKeys = [], - customPrettifiers = {}, - errorLikeKeys = ERROR_LIKE_KEYS, - excludeLoggerKeys = true, - singleLine = false, - colorizer = defaultColorizer -}) { - const keysToIgnore = [].concat(skipKeys) - - if (excludeLoggerKeys === true) Array.prototype.push.apply(keysToIgnore, LOGGER_KEYS) - - let result = '' - - // Split object keys into two categories: error and non-error - const { plain, errors } = Object.entries(input).reduce(({ plain, errors }, [k, v]) => { - if (keysToIgnore.includes(k) === false) { - // Pre-apply custom prettifiers, because all 3 cases below will need this - const pretty = typeof customPrettifiers[k] === 'function' - ? customPrettifiers[k](v, k, input) - : v - if (errorLikeKeys.includes(k)) { - errors[k] = pretty - } else { - plain[k] = pretty - } - } - return { plain, errors } - }, { plain: {}, errors: {} }) - - if (singleLine) { - // Stringify the entire object as a single JSON line - if (Object.keys(plain).length > 0) { - result += colorizer.greyMessage(stringifySafe(plain)) - } - result += eol - } else { - // Put each object entry on its own line - Object.entries(plain).forEach(([keyName, keyValue]) => { - // custom prettifiers are already applied above, so we can skip it now - const lines = typeof customPrettifiers[keyName] === 'function' - ? keyValue - : stringifySafe(keyValue, null, 2) - - if (lines === undefined) return - - const joinedLines = joinLinesWithIndentation({ input: lines, ident, eol }) - result += `${ident}${keyName}: ${joinedLines}${eol}` - }) - } - - // Errors - Object.entries(errors).forEach(([keyName, keyValue]) => { - // custom prettifiers are already applied above, so we can skip it now - const lines = typeof customPrettifiers[keyName] === 'function' - ? keyValue - : stringifySafe(keyValue, null, 2) - - if (lines === undefined) return - - result += prettifyError({ keyName, lines, eol, ident }) - }) - - return result -} - -/** - * Prettifies a timestamp if the given `log` has either `time`, `timestamp` or custom specified timestamp - * property. - * - * @param {object} input - * @param {object} input.log The log object with the timestamp to be prettified. - * @param {string} [input.timestampKey='time'] The log property that should be used to resolve timestamp value - * @param {boolean|string} [input.translateFormat=undefined] When `true` the - * timestamp will be prettified into a string at UTC using the default - * `DATE_FORMAT`. If a string, then `translateFormat` will be used as the format - * string to determine the output; see the `formatTime` function for details. - * - * @returns {undefined|string} If a timestamp property cannot be found then - * `undefined` is returned. Otherwise, the prettified time is returned as a - * string. - */ -function prettifyTime ({ log, timestampKey = TIMESTAMP_KEY, translateFormat = undefined }) { - let time = null - - if (timestampKey in log) { - time = log[timestampKey] - } else if ('timestamp' in log) { - time = log.timestamp - } - - if (time === null) return undefined - if (translateFormat) { - return '[' + formatTime(time, translateFormat) + ']' - } - - return `[${time}]` -} - -/** - * Prettifies an error string into a multi-line format. - * @param {object} input - * @param {string} input.keyName The key assigned to this error in the log object - * @param {string} input.lines The STRINGIFIED error. If the error field has a - * custom prettifier, that should be pre-applied as well - * @param {string} input.ident The indentation sequence to use - * @param {string} input.eol The EOL sequence to use - */ -function prettifyError ({ keyName, lines, eol, ident }) { - let result = '' - const joinedLines = joinLinesWithIndentation({ input: lines, ident, eol }) - const splitLines = `${ident}${keyName}: ${joinedLines}${eol}`.split(eol) - - for (let j = 0; j < splitLines.length; j += 1) { - if (j !== 0) result += eol - - const line = splitLines[j] - if (/^\s*"stack"/.test(line)) { - const matches = /^(\s*"stack":)\s*(".*"),?$/.exec(line) - /* istanbul ignore else */ - if (matches && matches.length === 3) { - const indentSize = /^\s*/.exec(line)[0].length + 4 - const indentation = ' '.repeat(indentSize) - const stackMessage = matches[2] - result += matches[1] + eol + indentation + JSON.parse(stackMessage).replace(/\n/g, eol + indentation) - } - } else { - result += line - } - } - - return result -} - -/** - * Splits the input key delimited by a dot character but not when it is preceded - * by a backslash. - * - * @param {string} key A string identifying the property. - * - * @returns {string[]} Returns a list of string containing each delimited property. - * e.g. `'prop2\.domain\.corp.prop2'` should return [ 'prop2.domain.com', 'prop2' ] - */ -function splitIgnoreKey (key) { - const result = [] - let backslash = false - let segment = '' - - for (let i = 0; i < key.length; i++) { - const c = key.charAt(i) - - if (c === '\\') { - backslash = true - continue - } - - if (backslash) { - backslash = false - segment += c - continue - } - - /* Non-escaped dot, push to result */ - if (c === '.') { - result.push(segment) - segment = '' - continue - } - - segment += c - } - - /* Push last entry to result */ - if (segment.length) { - result.push(segment) - } - - return result -} - -/** - * Deletes a specified property from a log object if it exists. - * This function mutates the passed in `log` object. - * - * @param {object} log The log object to be modified. - * @param {string} property A string identifying the property to be deleted from - * the log object. Accepts nested properties delimited by a `.` - * Delimiter can be escaped to preserve property names that contain the delimiter. - * e.g. `'prop1.prop2'` or `'prop2\.domain\.corp.prop2'` - */ -function deleteLogProperty (log, property) { - const props = splitIgnoreKey(property) - const propToDelete = props.pop() - - props.forEach((prop) => { - if (!Object.prototype.hasOwnProperty.call(log, prop)) { - return - } - log = log[prop] - }) - - delete log[propToDelete] -} - -/** - * Filter a log object by removing any ignored keys. - * - * @param {object} log The log object to be modified. - * @param {string} ignoreKeys An array of strings identifying the properties to be removed. - * - * @returns {object} A new `log` object instance that does not include the ignored keys. - */ -function filterLog (log, ignoreKeys) { - const logCopy = clone(log) - ignoreKeys.forEach((ignoreKey) => { - deleteLogProperty(logCopy, ignoreKey) - }) - return logCopy -} diff --git a/node_modules/pino-pretty/package.json b/node_modules/pino-pretty/package.json deleted file mode 100644 index 1e50cb7e..00000000 --- a/node_modules/pino-pretty/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "_from": "pino-pretty@~5.1", - "_id": "pino-pretty@5.1.2", - "_inBundle": false, - "_integrity": "sha512-20HWKSHFvF/pF/C4spBVW0RQdnBYptCj4Bwgb6pFkWY5FOYiElCGHkkPU1173iK8fsoiBMHMEvS0wB2loQZJ+Q==", - "_location": "/pino-pretty", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "pino-pretty@~5.1", - "name": "pino-pretty", - "escapedName": "pino-pretty", - "rawSpec": "~5.1", - "saveSpec": null, - "fetchSpec": "~5.1" - }, - "_requiredBy": [ - "/@antora/logger" - ], - "_resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-5.1.2.tgz", - "_shasum": "1c0e89cc86f7add87492edbe6c50ae4dd5982fa9", - "_spec": "pino-pretty@~5.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/logger", - "author": { - "name": "James Sumners", - "email": "james.sumners@gmail.com" - }, - "bin": { - "pino-pretty": "bin.js" - }, - "bugs": { - "url": "https://github.com/pinojs/pino-pretty/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@hapi/bourne": "^2.0.0", - "args": "^5.0.1", - "chalk": "^4.0.0", - "dateformat": "^4.5.1", - "fast-safe-stringify": "^2.0.7", - "jmespath": "^0.15.0", - "joycon": "^3.0.0", - "pump": "^3.0.0", - "readable-stream": "^3.6.0", - "rfdc": "^1.3.0", - "split2": "^3.1.1", - "strip-json-comments": "^3.1.1" - }, - "deprecated": false, - "description": "Prettifier for Pino log lines", - "devDependencies": { - "@types/node": "^16.0.0", - "pino": "^6.0.0", - "pre-commit": "^1.2.2", - "rimraf": "^3.0.2", - "snazzy": "^9.0.0", - "standard": "^16.0.3", - "tap": "^15.0.0", - "tsd": "^0.17.0", - "typescript": "^4.2.4" - }, - "homepage": "https://github.com/pinojs/pino-pretty#readme", - "keywords": [ - "pino" - ], - "license": "MIT", - "main": "index.js", - "name": "pino-pretty", - "precommit": [ - "lint", - "test" - ], - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/pinojs/pino-pretty.git" - }, - "scripts": { - "ci": "standard && tap 'test/**/*.test.js' --coverage-report=lcovonly && npm run test-types", - "lint": "standard | snazzy", - "test": "tap --100 'test/**/*.test.js'", - "test-types": "tsc && tsd" - }, - "tsd": { - "directory": "./test/types" - }, - "type": "commonjs", - "types": "index.d.ts", - "version": "5.1.2" -} diff --git a/node_modules/pino-pretty/test/basic.test.js b/node_modules/pino-pretty/test/basic.test.js deleted file mode 100644 index 56299b9b..00000000 --- a/node_modules/pino-pretty/test/basic.test.js +++ /dev/null @@ -1,732 +0,0 @@ -'use strict' - -const { Writable } = require('readable-stream') -const os = require('os') -const test = require('tap').test -const pino = require('pino') -const dateformat = require('dateformat') -const _prettyFactory = require('../') - -function prettyFactory (opts) { - if (!opts) { - opts = { colorize: false } - } else if (!Object.prototype.hasOwnProperty.call(opts, 'colorize')) { - opts.colorize = false - } - return _prettyFactory(opts) -} - -// All dates are computed from 'Fri, 30 Mar 2018 17:35:28 GMT' -const epoch = 1522431328992 -const pid = process.pid -const hostname = os.hostname() - -test('basic prettifier tests', (t) => { - t.beforeEach(() => { - Date.originalNow = Date.now - Date.now = () => epoch - }) - t.afterEach(() => { - Date.now = Date.originalNow - delete Date.originalNow - }) - - t.test('preserves output if not valid JSON', (t) => { - t.plan(1) - const pretty = prettyFactory() - const formatted = pretty('this is not json\nit\'s just regular output\n') - t.equal(formatted, 'this is not json\nit\'s just regular output\n\n') - }) - - t.test('formats a line without any extra options', (t) => { - t.plan(1) - const pretty = prettyFactory() - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.equal( - formatted, - `[${epoch}] INFO (${pid} on ${hostname}): foo\n` - ) - cb() - } - })) - log.info('foo') - }) - - t.test('will add color codes', (t) => { - t.plan(1) - const pretty = prettyFactory({ colorize: true }) - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.equal( - formatted, - `[${epoch}] \u001B[32mINFO\u001B[39m (${pid} on ${hostname}): \u001B[36mfoo\u001B[39m\n` - ) - cb() - } - })) - log.info('foo') - }) - - t.test('can swap date and level position', (t) => { - t.plan(1) - const pretty = prettyFactory({ levelFirst: true }) - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.equal( - formatted, - `INFO [${epoch}] (${pid} on ${hostname}): foo\n` - ) - cb() - } - })) - log.info('foo') - }) - - t.test('can use different message keys', (t) => { - t.plan(1) - const pretty = prettyFactory({ messageKey: 'bar' }) - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.equal( - formatted, - `[${epoch}] INFO (${pid} on ${hostname}): baz\n` - ) - cb() - } - })) - log.info({ bar: 'baz' }) - }) - - t.test('can use different level keys', (t) => { - t.plan(1) - const pretty = prettyFactory({ levelKey: 'bar' }) - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.equal( - formatted, - `[${epoch}] WARN (${pid} on ${hostname}): foo\n` - ) - cb() - } - })) - log.info({ msg: 'foo', bar: 'warn' }) - }) - - t.test('will format time to UTC', (t) => { - t.plan(1) - const pretty = prettyFactory({ translateTime: true }) - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.equal( - formatted, - `[2018-03-30 17:35:28.992 +0000] INFO (${pid} on ${hostname}): foo\n` - ) - cb() - } - })) - log.info('foo') - }) - - t.test('will format time to UTC in custom format', (t) => { - t.plan(1) - const pretty = prettyFactory({ translateTime: 'HH:MM:ss o' }) - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - const utcHour = dateformat(epoch, 'UTC:' + 'HH') - const offset = dateformat(epoch, 'UTC:' + 'o') - t.equal( - formatted, - `[${utcHour}:35:28 ${offset}] INFO (${pid} on ${hostname}): foo\n` - ) - cb() - } - })) - log.info('foo') - }) - - t.test('will format time to local systemzone in ISO 8601 format', (t) => { - t.plan(1) - const pretty = prettyFactory({ translateTime: 'sys:standard' }) - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - const localHour = dateformat(epoch, 'HH') - const localDate = dateformat(epoch, 'yyyy-mm-dd') - const offset = dateformat(epoch, 'o') - t.equal( - formatted, - `[${localDate} ${localHour}:35:28.992 ${offset}] INFO (${pid} on ${hostname}): foo\n` - ) - cb() - } - })) - log.info('foo') - }) - - t.test('will format time to local systemzone in custom format', (t) => { - t.plan(1) - const pretty = prettyFactory({ - translateTime: 'SYS:yyyy/mm/dd HH:MM:ss o' - }) - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - const localHour = dateformat(epoch, 'HH') - const localDate = dateformat(epoch, 'yyyy/mm/dd') - const offset = dateformat(epoch, 'o') - t.equal( - formatted, - `[${localDate} ${localHour}:35:28 ${offset}] INFO (${pid} on ${hostname}): foo\n` - ) - cb() - } - })) - log.info('foo') - }) - - // TODO: 2019-03-30 -- We don't really want the indentation in this case? Or at least some better formatting. - t.test('handles missing time', (t) => { - t.plan(1) - const pretty = prettyFactory() - const formatted = pretty('{"hello":"world"}') - t.equal(formatted, ' hello: "world"\n') - }) - - t.test('handles missing pid, hostname and name', (t) => { - t.plan(1) - const pretty = prettyFactory() - const log = pino({ base: null }, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.match(formatted, /\[.*\] INFO: hello world/) - cb() - } - })) - log.info('hello world') - }) - - t.test('handles missing pid', (t) => { - t.plan(1) - const pretty = prettyFactory() - const name = 'test' - const msg = 'hello world' - const regex = new RegExp('\\[.*\\] INFO \\(' + name + ' on ' + hostname + '\\): ' + msg) - - const opts = { - base: { - name: name, - hostname: hostname - } - } - const log = pino(opts, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.match(formatted, regex) - cb() - } - })) - - log.info(msg) - }) - - t.test('handles missing hostname', (t) => { - t.plan(1) - const pretty = prettyFactory() - const name = 'test' - const msg = 'hello world' - const regex = new RegExp('\\[.*\\] INFO \\(' + name + '/' + pid + '\\): ' + msg) - - const opts = { - base: { - name: name, - pid: process.pid - } - } - const log = pino(opts, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.match(formatted, regex) - cb() - } - })) - - log.info(msg) - }) - - t.test('handles missing name', (t) => { - t.plan(1) - const pretty = prettyFactory() - const msg = 'hello world' - const regex = new RegExp('\\[.*\\] INFO \\(' + process.pid + ' on ' + hostname + '\\): ' + msg) - - const opts = { - base: { - hostname: hostname, - pid: process.pid - } - } - const log = pino(opts, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.match(formatted, regex) - cb() - } - })) - - log.info(msg) - }) - - t.test('works without time', (t) => { - t.plan(1) - const pretty = prettyFactory() - const log = pino({ timestamp: null }, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.equal(formatted, `INFO (${pid} on ${hostname}): hello world\n`) - cb() - } - })) - log.info('hello world') - }) - - t.test('prettifies properties', (t) => { - t.plan(1) - const pretty = prettyFactory() - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.match(formatted, ' a: "b"') - cb() - } - })) - log.info({ a: 'b' }, 'hello world') - }) - - t.test('prettifies nested properties', (t) => { - t.plan(6) - const expectedLines = [ - ' a: {', - ' "b": {', - ' "c": "d"', - ' }', - ' }' - ] - const pretty = prettyFactory() - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - const lines = formatted.split('\n') - t.equal(lines.length, expectedLines.length + 2) - lines.shift(); lines.pop() - for (let i = 0; i < lines.length; i += 1) { - t.equal(lines[i], expectedLines[i]) - } - cb() - } - })) - log.info({ a: { b: { c: 'd' } } }, 'hello world') - }) - - t.test('treats the name with care', (t) => { - t.plan(1) - const pretty = prettyFactory() - const log = pino({ name: 'matteo' }, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.equal(formatted, `[${epoch}] INFO (matteo/${pid} on ${hostname}): hello world\n`) - cb() - } - })) - log.info('hello world') - }) - - t.test('handles spec allowed primitives', (t) => { - const pretty = prettyFactory() - let formatted = pretty(null) - t.equal(formatted, 'null\n') - - formatted = pretty(true) - t.equal(formatted, 'true\n') - - formatted = pretty(false) - t.equal(formatted, 'false\n') - - t.end() - }) - - t.test('handles numbers', (t) => { - const pretty = prettyFactory() - let formatted = pretty(2) - t.equal(formatted, '2\n') - - formatted = pretty(-2) - t.equal(formatted, '-2\n') - - formatted = pretty(0.2) - t.equal(formatted, '0.2\n') - - formatted = pretty(Infinity) - t.equal(formatted, 'Infinity\n') - - formatted = pretty(NaN) - t.equal(formatted, 'NaN\n') - - t.end() - }) - - t.test('handles `undefined` input', (t) => { - t.plan(1) - const pretty = prettyFactory() - const formatted = pretty(undefined) - t.equal(formatted, 'undefined\n') - }) - - t.test('handles customLogLevel', (t) => { - t.plan(1) - const pretty = prettyFactory() - const log = pino({ customLevels: { testCustom: 35 } }, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.match(formatted, /USERLVL/) - cb() - } - })) - log.testCustom('test message') - }) - - t.test('supports pino metadata API', (t) => { - t.plan(1) - const dest = new Writable({ - write (chunk, enc, cb) { - t.equal( - chunk.toString(), - `[${epoch}] INFO (${pid} on ${hostname}): foo\n` - ) - cb() - } - }) - const log = pino({ - prettifier: prettyFactory, - prettyPrint: true - }, dest) - log.info('foo') - }) - - t.test('can swap date and level position through meta stream', (t) => { - t.plan(1) - - const dest = new Writable({ - objectMode: true, - write (formatted, enc, cb) { - t.equal( - formatted, - `INFO [${epoch}] (${pid} on ${hostname}): foo\n` - ) - cb() - } - }) - const log = pino({ - prettifier: prettyFactory, - prettyPrint: { - levelFirst: true - } - }, dest) - log.info('foo') - }) - - t.test('filter some lines based on jmespath', (t) => { - t.plan(3) - const pretty = prettyFactory({ search: 'foo.bar' }) - const expected = [ - undefined, - undefined, - `[${epoch}] INFO (${pid} on ${hostname}): foo\n foo: {\n "bar": true\n }\n` - ] - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.equal( - formatted, - expected.shift() - ) - cb() - } - })) - log.info('foo') - log.info({ something: 'else' }, 'foo') - // only this line will be formatted - log.info({ foo: { bar: true } }, 'foo') - }) - - t.test('handles `undefined` return values', (t) => { - t.plan(2) - const pretty = prettyFactory({ search: 'msg == \'hello world\'' }) - let formatted = pretty(`{"msg":"nope", "time":${epoch}, "level":30}`) - t.equal(formatted, undefined) - formatted = pretty(`{"msg":"hello world", "time":${epoch}, "level":30}`) - t.equal(formatted, `[${epoch}] INFO: hello world\n`) - }) - - t.test('formats a line with an undefined field', (t) => { - t.plan(1) - const pretty = prettyFactory() - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const obj = JSON.parse(chunk.toString()) - // weird hack, but we should not crash - obj.a = undefined - const formatted = pretty(obj) - t.equal( - formatted, - `[${epoch}] INFO (${pid} on ${hostname}): foo\n` - ) - cb() - } - })) - log.info('foo') - }) - - t.test('prettifies msg object', (t) => { - t.plan(6) - const expectedLines = [ - ' msg: {', - ' "b": {', - ' "c": "d"', - ' }', - ' }' - ] - const pretty = prettyFactory() - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - const lines = formatted.split('\n') - t.equal(lines.length, expectedLines.length + 2) - lines.shift(); lines.pop() - for (let i = 0; i < lines.length; i += 1) { - t.equal(lines[i], expectedLines[i]) - } - cb() - } - })) - log.info({ msg: { b: { c: 'd' } } }) - }) - - t.test('prettifies msg object with circular references', (t) => { - t.plan(7) - const expectedLines = [ - ' msg: {', - ' "b": {', - ' "c": "d"', - ' },', - ' "a": "[Circular]"', - ' }' - ] - const pretty = prettyFactory() - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - const lines = formatted.split('\n') - t.equal(lines.length, expectedLines.length + 2) - lines.shift(); lines.pop() - for (let i = 0; i < lines.length; i += 1) { - t.equal(lines[i], expectedLines[i]) - } - cb() - } - })) - - const msg = { b: { c: 'd' } } - msg.a = msg - log.info({ msg }) - }) - - t.test('prettifies custom key', (t) => { - t.plan(1) - const pretty = prettyFactory({ - customPrettifiers: { - foo: val => `${val}_baz\nmultiline`, - cow: val => val.toUpperCase() - } - }) - const arst = pretty('{"msg":"hello world", "foo": "bar", "cow": "moo", "level":30}') - t.equal(arst, 'INFO: hello world\n foo: bar_baz\n multiline\n cow: MOO\n') - }) - - t.test('does not prettify custom key that does not exists', (t) => { - t.plan(1) - const pretty = prettyFactory({ - customPrettifiers: { - foo: val => `${val}_baz`, - cow: val => val.toUpperCase() - } - }) - const arst = pretty('{"msg":"hello world", "foo": "bar", "level":30}') - t.equal(arst, 'INFO: hello world\n foo: bar_baz\n') - }) - - t.test('prettifies object with some undefined values', (t) => { - t.plan(1) - const dest = new Writable({ - write (chunk, _, cb) { - t.equal( - chunk + '', - `[${epoch}] INFO (${pid} on ${hostname}):\n a: {\n "b": "c"\n }\n n: null\n` - ) - cb() - } - }) - const log = pino({ - prettifier: prettyFactory, - prettyPrint: true - }, dest) - log.info({ - a: { b: 'c' }, - s: Symbol.for('s'), - f: f => f, - c: class C {}, - n: null, - err: { toJSON () {} } - }) - }) - - t.test('ignores multiple keys', (t) => { - t.plan(1) - const pretty = prettyFactory({ ignore: 'pid,hostname' }) - const arst = pretty(`{"msg":"hello world", "pid":"${pid}", "hostname":"${hostname}", "time":${epoch}, "level":30}`) - t.equal(arst, `[${epoch}] INFO: hello world\n`) - }) - - t.test('ignores a single key', (t) => { - t.plan(1) - const pretty = prettyFactory({ ignore: 'pid' }) - const arst = pretty(`{"msg":"hello world", "pid":"${pid}", "hostname":"${hostname}", "time":${epoch}, "level":30}`) - t.equal(arst, `[${epoch}] INFO (on ${hostname}): hello world\n`) - }) - - t.test('ignores time', (t) => { - t.plan(1) - const pretty = prettyFactory({ ignore: 'time' }) - const arst = pretty(`{"msg":"hello world", "pid":"${pid}", "hostname":"${hostname}", "time":${epoch}, "level":30}`) - t.equal(arst, `INFO (${pid} on ${hostname}): hello world\n`) - }) - - t.test('ignores time and level', (t) => { - t.plan(1) - const pretty = prettyFactory({ ignore: 'time,level' }) - const arst = pretty(`{"msg":"hello world", "pid":"${pid}", "hostname":"${hostname}", "time":${epoch}, "level":30}`) - t.equal(arst, `(${pid} on ${hostname}): hello world\n`) - }) - - t.test('ignores all keys but message', (t) => { - t.plan(1) - const pretty = prettyFactory({ ignore: 'time,level,name,pid,hostname' }) - const arst = pretty(`{"msg":"hello world", "pid":"${pid}", "hostname":"${hostname}", "time":${epoch}, "level":30}`) - t.equal(arst, 'hello world\n') - }) - - t.test('prettifies trace caller', (t) => { - t.plan(1) - const traceCaller = (instance) => { - const { symbols: { asJsonSym } } = pino - const get = (target, name) => name === asJsonSym ? asJson : target[name] - - function asJson (...args) { - args[0] = args[0] || {} - args[0].caller = '/tmp/script.js' - return instance[asJsonSym].apply(this, args) - } - - return new Proxy(instance, { get }) - } - - const pretty = prettyFactory() - const log = traceCaller(pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.equal( - formatted, - `[${epoch}] INFO (${pid} on ${hostname}) : foo\n` - ) - cb() - } - }))) - log.info('foo') - }) - - t.test('handles specified timestampKey', (t) => { - t.plan(1) - const pretty = prettyFactory({ timestampKey: '@timestamp' }) - const arst = pretty(`{"msg":"hello world", "@timestamp":${epoch}, "level":30}`) - t.equal(arst, `[${epoch}] INFO: hello world\n`) - }) - - t.test('keeps "v" key in log', (t) => { - t.plan(1) - const pretty = prettyFactory({ ignore: 'time' }) - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.equal(formatted, `INFO (${pid} on ${hostname}):\n v: 1\n`) - cb() - } - })) - log.info({ v: 1 }) - }) - - t.test('Hide object `{ key: "value" }` from output when flag `hideObject` is set', (t) => { - t.plan(1) - const pretty = prettyFactory({ hideObject: true }) - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.equal(formatted, `[${epoch}] INFO (${pid} on ${hostname}): hello world\n`) - cb() - } - })) - log.info({ key: 'value' }, 'hello world') - }) - - t.test('Prints extra objects on one line with singleLine=true', (t) => { - t.plan(1) - const pretty = prettyFactory({ - singleLine: true, - colorize: false, - customPrettifiers: { - upper: val => val.toUpperCase(), - undef: () => undefined - } - }) - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.equal(formatted, `[${epoch}] INFO (${pid} on ${hostname}): message {"extra":{"foo":"bar","number":42},"upper":"FOOBAR"}\n`) - - cb() - } - })) - log.info({ msg: 'message', extra: { foo: 'bar', number: 42 }, upper: 'foobar', undef: 'this will not show up' }) - }) - - t.test('Does not print empty object with singleLine=true', (t) => { - t.plan(1) - const pretty = prettyFactory({ singleLine: true, colorize: false }) - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.equal(formatted, `[${epoch}] INFO (${pid} on ${hostname}): message\n`) - cb() - } - })) - log.info({ msg: 'message' }) - }) - - t.end() -}) diff --git a/node_modules/pino-pretty/test/cli-rc.test.js b/node_modules/pino-pretty/test/cli-rc.test.js deleted file mode 100644 index 8804dfe9..00000000 --- a/node_modules/pino-pretty/test/cli-rc.test.js +++ /dev/null @@ -1,197 +0,0 @@ -'use strict' - -const path = require('path') -const spawn = require('child_process').spawn -const test = require('tap').test -const fs = require('fs') -const rimraf = require('rimraf') - -const bin = require.resolve('../bin') -const logLine = '{"level":30,"time":1522431328992,"msg":"hello world","pid":42,"hostname":"foo"}\n' -const noop = () => {} - -test('cli', (t) => { - const tmpDir = path.join(__dirname, '.tmp_' + Date.now()) - fs.mkdirSync(tmpDir) - - t.teardown(() => rimraf(tmpDir, noop)) - - t.test('loads and applies default config file: pino-pretty.config.js', (t) => { - t.plan(1) - // Set translateTime: true on run configuration - const configFile = path.join(tmpDir, 'pino-pretty.config.js') - fs.writeFileSync(configFile, 'module.exports = { translateTime: true }') - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin], { env, cwd: tmpDir }) - // Validate that the time has been translated - child.on('error', t.threw) - child.stdout.on('data', (data) => { - t.equal(data.toString(), '[2018-03-30 17:35:28.992 +0000] INFO (42 on foo): hello world\n') - }) - child.stdin.write(logLine) - t.teardown(() => { - fs.unlinkSync(configFile) - child.kill() - }) - }) - - t.test('loads and applies default config file: .pino-prettyrc', (t) => { - t.plan(1) - // Set translateTime: true on run configuration - const configFile = path.join(tmpDir, '.pino-prettyrc') - fs.writeFileSync(configFile, JSON.stringify({ translateTime: true }, null, 4)) - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin], { env, cwd: tmpDir }) - // Validate that the time has been translated - child.on('error', t.threw) - child.stdout.on('data', (data) => { - t.equal(data.toString(), '[2018-03-30 17:35:28.992 +0000] INFO (42 on foo): hello world\n') - }) - child.stdin.write(logLine) - t.teardown(() => { - fs.unlinkSync(configFile) - child.kill() - }) - }) - - t.test('loads and applies default config file: .pino-prettyrc.json', (t) => { - t.plan(1) - // Set translateTime: true on run configuration - const configFile = path.join(tmpDir, '.pino-prettyrc.json') - fs.writeFileSync(configFile, JSON.stringify({ translateTime: true }, null, 4)) - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin], { env, cwd: tmpDir }) - // Validate that the time has been translated - child.on('error', t.threw) - child.stdout.on('data', (data) => { - t.equal(data.toString(), '[2018-03-30 17:35:28.992 +0000] INFO (42 on foo): hello world\n') - }) - child.stdin.write(logLine) - t.teardown(() => { - fs.unlinkSync(configFile) - child.kill() - }) - }) - - t.test('loads and applies custom config file: pino-pretty.config.test.json', (t) => { - t.plan(1) - // Set translateTime: true on run configuration - const configFile = path.join(tmpDir, 'pino-pretty.config.test.json') - fs.writeFileSync(configFile, JSON.stringify({ translateTime: true }, null, 4)) - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin, '--config', configFile], { env, cwd: tmpDir }) - // Validate that the time has been translated - child.on('error', t.threw) - child.stdout.on('data', (data) => { - t.equal(data.toString(), '[2018-03-30 17:35:28.992 +0000] INFO (42 on foo): hello world\n') - }) - child.stdin.write(logLine) - t.teardown(() => child.kill()) - }) - - t.test('loads and applies custom config file: pino-pretty.config.test.js', (t) => { - t.plan(1) - // Set translateTime: true on run configuration - const configFile = path.join(tmpDir, 'pino-pretty.config.test.js') - fs.writeFileSync(configFile, 'module.exports = { translateTime: true }') - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin, '--config', configFile], { env, cwd: tmpDir }) - // Validate that the time has been translated - child.on('error', t.threw) - child.stdout.on('data', (data) => { - t.equal(data.toString(), '[2018-03-30 17:35:28.992 +0000] INFO (42 on foo): hello world\n') - }) - child.stdin.write(logLine) - t.teardown(() => child.kill()) - }) - - t.test('cli options override config options', (t) => { - t.plan(1) - // Set translateTime: true on run configuration - const configFile = path.join(tmpDir, 'pino-pretty.config.js') - fs.writeFileSync(configFile, ` - module.exports = { - translateTime: true, - messageKey: 'custom_msg' - } - `.trim()) - // Set messageKey: 'new_msg' using command line option - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin, '--messageKey', 'new_msg'], { env, cwd: tmpDir }) - // Validate that the time has been translated and correct message key has been used - child.on('error', t.threw) - child.stdout.on('data', (data) => { - t.equal(data.toString(), '[2018-03-30 17:35:28.992 +0000] INFO (42 on foo): hello world\n') - }) - child.stdin.write(logLine.replace(/"msg"/, '"new_msg"')) - t.teardown(() => { - fs.unlinkSync(configFile) - child.kill() - }) - }) - - t.test('cli options with defaults can be overridden by config', (t) => { - t.plan(1) - // Set errorProps: '*' on run configuration - const configFile = path.join(tmpDir, 'pino-pretty.config.js') - fs.writeFileSync(configFile, ` - module.exports = { - errorProps: '*' - } - `.trim()) - // Set messageKey: 'new_msg' using command line option - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin], { env, cwd: tmpDir }) - // Validate that the time has been translated and correct message key has been used - child.on('error', t.threw) - child.stdout.on('data', (data) => { - t.equal(data.toString(), '[1594416696006] FATAL: There was an error starting the process.\n QueryError: Error during sql query: syntax error at or near SELECTT\n at /home/me/projects/example/sql.js\n at /home/me/projects/example/index.js\nquerySql: SELECTT * FROM "test" WHERE id = $1;\nqueryArgs: 12\n') - }) - child.stdin.write('{"level":60,"time":1594416696006,"msg":"There was an error starting the process.","type":"Error","stack":"QueryError: Error during sql query: syntax error at or near SELECTT\\n at /home/me/projects/example/sql.js\\n at /home/me/projects/example/index.js","querySql":"SELECTT * FROM \\"test\\" WHERE id = $1;","queryArgs":[12]}\n') - t.teardown(() => { - fs.unlinkSync(configFile) - child.kill() - }) - }) - - t.test('throws on missing config file', (t) => { - t.plan(2) - const args = [bin, '--config', 'pino-pretty.config.missing.json'] - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], args, { env, cwd: tmpDir }) - child.on('close', (code) => t.equal(code, 1)) - child.stderr.on('data', (data) => { - t.equal(data.indexOf('Error: Failed to load runtime configuration file: pino-pretty.config.missing.json') >= 0, true) - }) - t.teardown(() => child.kill()) - }) - - t.test('throws on invalid default config file', (t) => { - t.plan(2) - const configFile = path.join(tmpDir, 'pino-pretty.config.js') - fs.writeFileSync(configFile, 'module.exports = () => {}') - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin], { env, cwd: tmpDir }) - child.on('close', (code) => t.equal(code, 1)) - child.stderr.on('data', (data) => { - t.equal(data.indexOf('Error: Invalid runtime configuration file: pino-pretty.config.js') >= 0, true) - }) - t.teardown(() => child.kill()) - }) - - t.test('throws on invalid custom config file', (t) => { - t.plan(2) - const configFile = path.join(tmpDir, 'pino-pretty.config.invalid.js') - fs.writeFileSync(configFile, 'module.exports = () => {}') - const args = [bin, '--config', path.relative(tmpDir, configFile)] - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], args, { env, cwd: tmpDir }) - child.on('close', (code) => t.equal(code, 1)) - child.stderr.on('data', (data) => { - t.equal(data.indexOf('Error: Invalid runtime configuration file: pino-pretty.config.invalid.js') >= 0, true) - }) - t.teardown(() => child.kill()) - }) - - t.end() -}) diff --git a/node_modules/pino-pretty/test/cli.test.js b/node_modules/pino-pretty/test/cli.test.js deleted file mode 100644 index d9c7495e..00000000 --- a/node_modules/pino-pretty/test/cli.test.js +++ /dev/null @@ -1,173 +0,0 @@ -'use strict' - -const path = require('path') -const spawn = require('child_process').spawn -const test = require('tap').test - -const bin = require.resolve(path.join(__dirname, '..', 'bin.js')) -const epoch = 1522431328992 -const logLine = '{"level":30,"time":1522431328992,"msg":"hello world","pid":42,"hostname":"foo"}\n' - -test('cli', (t) => { - t.test('does basic reformatting', (t) => { - t.plan(1) - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin], { env }) - child.on('error', t.threw) - child.stdout.on('data', (data) => { - t.equal(data.toString(), `[${epoch}] INFO (42 on foo): hello world\n`) - }) - child.stdin.write(logLine) - t.teardown(() => child.kill()) - }) - - t.test('flips epoch and level', (t) => { - t.plan(1) - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin, '-l'], { env }) - child.on('error', t.threw) - child.stdout.on('data', (data) => { - t.equal(data.toString(), `INFO [${epoch}] (42 on foo): hello world\n`) - }) - child.stdin.write(logLine) - t.teardown(() => child.kill()) - }) - - t.test('translates time to default format', (t) => { - t.plan(1) - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin, '-t'], { env }) - child.on('error', t.threw) - child.stdout.on('data', (data) => { - t.equal(data.toString(), '[2018-03-30 17:35:28.992 +0000] INFO (42 on foo): hello world\n') - }) - child.stdin.write(logLine) - t.teardown(() => child.kill()) - }) - - t.test('does search', (t) => { - t.plan(1) - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin, '-s', 'msg == `hello world`'], { env }) - child.on('error', t.threw) - child.stdout.on('data', (data) => { - t.equal(data.toString(), `[${epoch}] INFO (42 on foo): hello world\n`) - }) - child.stdin.write(logLine) - t.teardown(() => child.kill()) - }) - - t.test('does search but finds only 1 out of 2', (t) => { - t.plan(1) - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin, '-s', 'msg == `hello world`'], { env }) - child.on('error', t.threw) - child.stdout.on('data', (data) => { - t.equal(data.toString(), `[${epoch}] INFO (42 on foo): hello world\n`) - }) - child.stdin.write(logLine.replace('hello world', 'hello universe')) - child.stdin.write(logLine) - t.teardown(() => child.kill()) - }) - - t.test('does ignore multiple keys', (t) => { - t.plan(1) - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin, '-i', 'pid,hostname'], { env }) - child.on('error', t.threw) - child.stdout.on('data', (data) => { - t.equal(data.toString(), '[1522431328992] INFO: hello world\n') - }) - child.stdin.write(logLine) - t.teardown(() => child.kill()) - }) - - t.test('does ignore escaped keys', (t) => { - t.plan(1) - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin, '-i', 'log\\.domain\\.corp/foo'], { env }) - child.on('error', t.threw) - child.stdout.on('data', (data) => { - t.equal(data.toString(), '[1522431328992] INFO: hello world\n') - }) - const logLine = '{"level":30,"time":1522431328992,"msg":"hello world","log.domain.corp/foo":"bar"}\n' - child.stdin.write(logLine) - t.teardown(() => child.kill()) - }) - - t.test('passes through stringified date as string', (t) => { - t.plan(1) - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin], { env }) - child.on('error', t.threw) - - const date = JSON.stringify(new Date(epoch)) - - child.stdout.on('data', (data) => { - t.equal(data.toString(), date + '\n') - }) - - child.stdin.write(date) - child.stdin.write('\n') - - t.teardown(() => child.kill()) - }) - - t.test('uses specified timestampKey', (t) => { - t.plan(1) - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin, '--timestampKey', '@timestamp'], { env }) - child.on('error', t.threw) - child.stdout.on('data', (data) => { - t.equal(data.toString(), '[1522431328992] INFO: hello world\n') - }) - const logLine = '{"level":30,"@timestamp":1522431328992,"msg":"hello world"}\n' - child.stdin.write(logLine) - t.teardown(() => child.kill()) - }) - - t.test('singleLine=true', (t) => { - t.plan(1) - - const logLineWithExtra = JSON.stringify(Object.assign(JSON.parse(logLine), { - extra: { - foo: 'bar', - number: 42 - } - })) + '\n' - - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin, '--singleLine'], { env }) - child.on('error', t.threw) - child.stdout.on('data', (data) => { - t.equal(data.toString(), `[${epoch}] INFO (42 on foo): hello world {"extra":{"foo":"bar","number":42}}\n`) - }) - child.stdin.write(logLineWithExtra) - t.teardown(() => child.kill()) - }) - - t.test('does ignore nested keys', (t) => { - t.plan(1) - - const logLineNested = JSON.stringify(Object.assign(JSON.parse(logLine), { - extra: { - foo: 'bar', - number: 42, - nested: { - foo2: 'bar2' - } - } - })) + '\n' - - const env = { TERM: 'dumb' } - const child = spawn(process.argv[0], [bin, '-S', '-i', 'extra.foo,extra.nested,extra.nested.miss'], { env }) - child.on('error', t.threw) - child.stdout.on('data', (data) => { - t.equal(data.toString(), `[${epoch}] INFO (42 on foo): hello world {"extra":{"number":42}}\n`) - }) - child.stdin.write(logLineNested) - t.teardown(() => child.kill()) - }) - - t.end() -}) diff --git a/node_modules/pino-pretty/test/crlf.test.js b/node_modules/pino-pretty/test/crlf.test.js deleted file mode 100644 index 46ee9135..00000000 --- a/node_modules/pino-pretty/test/crlf.test.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict' - -const test = require('tap').test -const _prettyFactory = require('../') - -function prettyFactory (opts) { - if (!opts) { - opts = { colorize: false } - } else if (!Object.prototype.hasOwnProperty.call(opts, 'colorize')) { - opts.colorize = false - } - return _prettyFactory(opts) -} - -const logLine = '{"level":30,"time":1522431328992,"msg":"hello world","pid":42,"hostname":"foo"}\n' - -test('crlf', (t) => { - t.test('uses LF by default', (t) => { - t.plan(1) - const pretty = prettyFactory() - const formatted = pretty(logLine) - t.equal(formatted.substr(-2), 'd\n') - }) - - t.test('can use CRLF', (t) => { - t.plan(1) - const pretty = prettyFactory({ crlf: true }) - const formatted = pretty(logLine) - t.equal(formatted.substr(-3), 'd\r\n') - }) - - t.end() -}) diff --git a/node_modules/pino-pretty/test/error-objects.test.js b/node_modules/pino-pretty/test/error-objects.test.js deleted file mode 100644 index e6a0caff..00000000 --- a/node_modules/pino-pretty/test/error-objects.test.js +++ /dev/null @@ -1,318 +0,0 @@ -'use strict' - -const Writable = require('stream').Writable -const os = require('os') -const test = require('tap').test -const pino = require('pino') -const serializers = pino.stdSerializers -const _prettyFactory = require('../') - -function prettyFactory (opts) { - if (!opts) { - opts = { colorize: false } - } else if (!Object.prototype.hasOwnProperty.call(opts, 'colorize')) { - opts.colorize = false - } - return _prettyFactory(opts) -} - -// All dates are computed from 'Fri, 30 Mar 2018 17:35:28 GMT' -const epoch = 1522431328992 -const pid = process.pid -const hostname = os.hostname() - -test('error like objects tests', (t) => { - t.beforeEach(() => { - Date.originalNow = Date.now - Date.now = () => epoch - }) - t.afterEach(() => { - Date.now = Date.originalNow - delete Date.originalNow - }) - - t.test('pino transform prettifies Error', (t) => { - t.plan(2) - const pretty = prettyFactory() - const err = Error('hello world') - const expected = err.stack.split('\n') - expected.unshift(err.message) - - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - const lines = formatted.split('\n') - t.equal(lines.length, expected.length + 1) - t.equal(lines[0], `[${epoch}] INFO (${pid} on ${hostname}): hello world`) - cb() - } - })) - - log.info(err) - }) - - t.test('errorProps recognizes user specified properties', (t) => { - t.plan(3) - const pretty = prettyFactory({ errorProps: 'statusCode,originalStack' }) - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.match(formatted, /\s{4}error stack/) - t.match(formatted, /statusCode: 500/) - t.match(formatted, /originalStack: original stack/) - cb() - } - })) - - const error = Error('error message') - error.stack = 'error stack' - error.statusCode = 500 - error.originalStack = 'original stack' - - log.error(error) - }) - - t.test('prettifies ignores undefined errorLikeObject', (t) => { - const pretty = prettyFactory() - pretty({ err: undefined }) - pretty({ error: undefined }) - t.end() - }) - - t.test('prettifies Error in property within errorLikeObjectKeys', (t) => { - t.plan(8) - const pretty = prettyFactory({ - errorLikeObjectKeys: ['err'] - }) - - const err = Error('hello world') - const expected = err.stack.split('\n') - expected.unshift(err.message) - - const log = pino({ serializers: { err: serializers.err } }, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - const lines = formatted.split('\n') - t.equal(lines.length, expected.length + 6) - t.equal(lines[0], `[${epoch}] INFO (${pid} on ${hostname}):`) - t.match(lines[1], /\s{4}err: {/) - t.match(lines[2], /\s{6}"type": "Error",/) - t.match(lines[3], /\s{6}"message": "hello world",/) - t.match(lines[4], /\s{6}"stack":/) - t.match(lines[5], /\s{6}Error: hello world/) - // Node 12 labels the test `` - t.match(lines[6], /\s{10}(at Test.t.test|at Test.)/) - cb() - } - })) - - log.info({ err }) - }) - - t.test('prettifies Error in property with singleLine=true', (t) => { - // singleLine=true doesn't apply to errors - t.plan(8) - const pretty = prettyFactory({ - singleLine: true, - errorLikeObjectKeys: ['err'] - }) - - const err = Error('hello world') - const expected = [ - '{"extra":{"a":1,"b":2}}', - err.message, - ...err.stack.split('\n') - ] - - const log = pino({ serializers: { err: serializers.err } }, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - const lines = formatted.split('\n') - t.equal(lines.length, expected.length + 5) - t.equal(lines[0], `[${epoch}] INFO (${pid} on ${hostname}): {"extra":{"a":1,"b":2}}`) - t.match(lines[1], /\s{4}err: {/) - t.match(lines[2], /\s{6}"type": "Error",/) - t.match(lines[3], /\s{6}"message": "hello world",/) - t.match(lines[4], /\s{6}"stack":/) - t.match(lines[5], /\s{6}Error: hello world/) - // Node 12 labels the test `` - t.match(lines[6], /\s{10}(at Test.t.test|at Test.)/) - cb() - } - })) - - log.info({ err, extra: { a: 1, b: 2 } }) - }) - - t.test('prettifies Error in property within errorLikeObjectKeys with custom function', (t) => { - t.plan(1) - const pretty = prettyFactory({ - errorLikeObjectKeys: ['err'], - customPrettifiers: { - err: val => `error is ${val.message}` - } - }) - - const err = Error('hello world') - err.stack = 'Error: hello world\n at anonymous (C:\\project\\node_modules\\example\\index.js)' - const expected = err.stack.split('\n') - expected.unshift(err.message) - - const log = pino({ serializers: { err: serializers.err } }, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.equal(formatted, `[${epoch}] INFO (${pid} on ${hostname}):\n err: error is hello world\n`) - cb() - } - })) - - log.info({ err }) - }) - - t.test('prettifies Error in property within errorLikeObjectKeys when stack has escaped characters', (t) => { - t.plan(8) - const pretty = prettyFactory({ - errorLikeObjectKeys: ['err'] - }) - - const err = Error('hello world') - err.stack = 'Error: hello world\n at anonymous (C:\\project\\node_modules\\example\\index.js)' - const expected = err.stack.split('\n') - expected.unshift(err.message) - - const log = pino({ serializers: { err: serializers.err } }, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - const lines = formatted.split('\n') - t.equal(lines.length, expected.length + 6) - t.equal(lines[0], `[${epoch}] INFO (${pid} on ${hostname}):`) - t.match(lines[1], /\s{4}err: {$/) - t.match(lines[2], /\s{6}"type": "Error",$/) - t.match(lines[3], /\s{6}"message": "hello world",$/) - t.match(lines[4], /\s{6}"stack":$/) - t.match(lines[5], /\s{10}Error: hello world$/) - t.match(lines[6], /\s{10}at anonymous \(C:\\project\\node_modules\\example\\index.js\)$/) - cb() - } - })) - - log.info({ err }) - }) - - t.test('prettifies Error in property within errorLikeObjectKeys when stack is not the last property', (t) => { - t.plan(9) - const pretty = prettyFactory({ - errorLikeObjectKeys: ['err'] - }) - - const err = Error('hello world') - err.anotherField = 'dummy value' - const expected = err.stack.split('\n') - expected.unshift(err.message) - - const log = pino({ serializers: { err: serializers.err } }, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - const lines = formatted.split('\n') - t.equal(lines.length, expected.length + 7) - t.equal(lines[0], `[${epoch}] INFO (${pid} on ${hostname}):`) - t.match(lines[1], /\s{4}err: {/) - t.match(lines[2], /\s{6}"type": "Error",/) - t.match(lines[3], /\s{6}"message": "hello world",/) - t.match(lines[4], /\s{6}"stack":/) - t.match(lines[5], /\s{6}Error: hello world/) - // Node 12 labels the test `` - t.match(lines[6], /\s{10}(at Test.t.test|at Test.)/) - t.match(lines[lines.length - 3], /\s{6}"anotherField": "dummy value"/) - cb() - } - })) - - log.info({ err }) - }) - - t.test('errorProps flag with "*" (print all nested props)', function (t) { - t.plan(9) - const pretty = prettyFactory({ errorProps: '*' }) - const expectedLines = [ - ' error stack', - 'statusCode: 500', - 'originalStack: original stack', - 'dataBaseSpecificError: {', - ' erroMessage: "some database error message"', - ' evenMoreSpecificStuff: {', - ' "someErrorRelatedObject": "error"', - ' }', - '}' - ] - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - const lines = formatted.split('\n') - lines.shift(); lines.pop() - for (let i = 0; i < lines.length; i += 1) { - t.equal(lines[i], expectedLines[i]) - } - cb() - } - })) - - const error = Error('error message') - error.stack = 'error stack' - error.statusCode = 500 - error.originalStack = 'original stack' - error.dataBaseSpecificError = { - erroMessage: 'some database error message', - evenMoreSpecificStuff: { - someErrorRelatedObject: 'error' - } - } - - log.error(error) - }) - - t.test('handles errors with a null stack', (t) => { - t.plan(2) - const pretty = prettyFactory() - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - t.match(formatted, /\s{4}message: "foo"/) - t.match(formatted, /\s{4}stack: null/) - cb() - } - })) - - const error = { message: 'foo', stack: null } - log.error(error) - }) - - t.test('handles errors with a null stack for Error object', (t) => { - t.plan(3) - const pretty = prettyFactory() - const expectedLines = [ - ' some: "property"', - ' stack: null', - ' type: "Error"' - ] - const log = pino({}, new Writable({ - write (chunk, enc, cb) { - const formatted = pretty(chunk.toString()) - const lines = formatted.split('\n') - lines.shift(); lines.pop() - for (let i = 0; i < lines.length; i += 1) { - t.ok(expectedLines.includes(lines[i])) - } - cb() - } - })) - - const error = Error('error message') - error.stack = null - error.some = 'property' - - log.error(error) - }) - - t.end() -}) diff --git a/node_modules/pino-pretty/test/lib/colors.test.js b/node_modules/pino-pretty/test/lib/colors.test.js deleted file mode 100644 index 02a693a4..00000000 --- a/node_modules/pino-pretty/test/lib/colors.test.js +++ /dev/null @@ -1,76 +0,0 @@ -'use strict' - -const { test } = require('tap') -const getColorizer = require('../../lib/colors') - -test('returns default colorizer', async t => { - const colorizer = getColorizer() - let colorized = colorizer(10) - t.equal(colorized, 'TRACE') - - colorized = colorizer(20) - t.equal(colorized, 'DEBUG') - - colorized = colorizer(30) - t.equal(colorized, 'INFO') - - colorized = colorizer(40) - t.equal(colorized, 'WARN') - - colorized = colorizer(50) - t.equal(colorized, 'ERROR') - - colorized = colorizer(60) - t.equal(colorized, 'FATAL') - - colorized = colorizer(900) - t.equal(colorized, 'USERLVL') - - colorized = colorizer('info') - t.equal(colorized, 'INFO') - - colorized = colorizer('use-default') - t.equal(colorized, 'USERLVL') - - colorized = colorizer.message('foo') - t.equal(colorized, 'foo') - - colorized = colorizer.greyMessage('foo') - t.equal(colorized, 'foo') -}) - -test('returns colorizing colorizer', async t => { - const colorizer = getColorizer(true) - let colorized = colorizer(10) - t.equal(colorized, '\u001B[90mTRACE\u001B[39m') - - colorized = colorizer(20) - t.equal(colorized, '\u001B[34mDEBUG\u001B[39m') - - colorized = colorizer(30) - t.equal(colorized, '\u001B[32mINFO\u001B[39m') - - colorized = colorizer(40) - t.equal(colorized, '\u001B[33mWARN\u001B[39m') - - colorized = colorizer(50) - t.equal(colorized, '\u001B[31mERROR\u001B[39m') - - colorized = colorizer(60) - t.equal(colorized, '\u001B[41mFATAL\u001B[49m') - - colorized = colorizer(900) - t.equal(colorized, '\u001B[37mUSERLVL\u001B[39m') - - colorized = colorizer('info') - t.equal(colorized, '\u001B[32mINFO\u001B[39m') - - colorized = colorizer('use-default') - t.equal(colorized, '\u001B[37mUSERLVL\u001B[39m') - - colorized = colorizer.message('foo') - t.equal(colorized, '\u001B[36mfoo\u001B[39m') - - colorized = colorizer.greyMessage('foo') - t.equal(colorized, '\u001B[90mfoo\u001B[39m') -}) diff --git a/node_modules/pino-pretty/test/lib/utils.internals.test.js b/node_modules/pino-pretty/test/lib/utils.internals.test.js deleted file mode 100644 index 41843f07..00000000 --- a/node_modules/pino-pretty/test/lib/utils.internals.test.js +++ /dev/null @@ -1,190 +0,0 @@ -'use strict' - -const tap = require('tap') -const clone = require('rfdc')() -const stringifySafe = require('fast-safe-stringify') -const { internals } = require('../../lib/utils') - -tap.test('#joinLinesWithIndentation', t => { - t.test('joinLinesWithIndentation adds indentation to beginning of subsequent lines', async t => { - const input = 'foo\nbar\nbaz' - const result = internals.joinLinesWithIndentation({ input }) - t.equal(result, 'foo\n bar\n baz') - }) - - t.test('joinLinesWithIndentation accepts custom indentation, line breaks, and eol', async t => { - const input = 'foo\nbar\r\nbaz' - const result = internals.joinLinesWithIndentation({ input, ident: ' ', eol: '^' }) - t.equal(result, 'foo^ bar^ baz') - }) - - t.end() -}) - -tap.test('#formatTime', t => { - const dateStr = '2019-04-06T13:30:00.000-04:00' - const epoch = new Date(dateStr) - const epochMS = epoch.getTime() - - t.test('passes through epoch if `translateTime` is `false`', async t => { - const formattedTime = internals.formatTime(epochMS) - t.equal(formattedTime, epochMS) - }) - - t.test('translates epoch milliseconds if `translateTime` is `true`', async t => { - const formattedTime = internals.formatTime(epochMS, true) - t.equal(formattedTime, '2019-04-06 17:30:00.000 +0000') - }) - - t.test('translates epoch milliseconds to UTC string given format', async t => { - const formattedTime = internals.formatTime(epochMS, 'd mmm yyyy H:MM') - t.equal(formattedTime, '6 Apr 2019 17:30') - }) - - t.test('translates epoch milliseconds to SYS:STANDARD', async t => { - const formattedTime = internals.formatTime(epochMS, 'SYS:STANDARD') - t.match(formattedTime, /\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3} [-+]?\d{4}/) - }) - - t.test('translates epoch milliseconds to SYS:', async t => { - const formattedTime = internals.formatTime(epochMS, 'SYS:d mmm yyyy H:MM') - t.match(formattedTime, /\d{1} \w{3} \d{4} \d{1,2}:\d{2}/) - }) - - t.test('passes through date string if `translateTime` is `false`', async t => { - const formattedTime = internals.formatTime(dateStr) - t.equal(formattedTime, dateStr) - }) - - t.test('translates date string if `translateTime` is `true`', async t => { - const formattedTime = internals.formatTime(dateStr, true) - t.equal(formattedTime, '2019-04-06 17:30:00.000 +0000') - }) - - t.test('translates date string to UTC string given format', async t => { - const formattedTime = internals.formatTime(dateStr, 'd mmm yyyy H:MM') - t.equal(formattedTime, '6 Apr 2019 17:30') - }) - - t.test('translates date string to SYS:STANDARD', async t => { - const formattedTime = internals.formatTime(dateStr, 'SYS:STANDARD') - t.match(formattedTime, /\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3} [-+]?\d{4}/) - }) - - t.test('translates date string to UTC:', async t => { - const formattedTime = internals.formatTime(dateStr, 'UTC:d mmm yyyy H:MM') - t.equal(formattedTime, '6 Apr 2019 17:30') - }) - - t.test('translates date string to SYS:', async t => { - const formattedTime = internals.formatTime(dateStr, 'SYS:d mmm yyyy H:MM') - t.match(formattedTime, /\d{1} \w{3} \d{4} \d{1,2}:\d{2}/) - }) - - t.end() -}) - -tap.test('#createDate', t => { - const wanted = 1624450038567 - - t.test('accepts arguments the Date constructor would accept', async t => { - t.plan(2) - t.same(internals.createDate(1624450038567).getTime(), wanted) - t.same(internals.createDate('2021-06-23T12:07:18.567Z').getTime(), wanted) - }) - - t.test('accepts epoch as a string', async t => { - // If Date() accepts this argument, the createDate function is not needed - // and can be replaced with Date() - t.plan(2) - t.notSame(new Date('16244500385-67').getTime(), wanted) - t.same(internals.createDate('1624450038567').getTime(), wanted) - }) - - t.end() -}) - -tap.test('#isValidDate', t => { - t.test('returns true for valid dates', async t => { - t.same(internals.isValidDate(new Date()), true) - }) - - t.test('returns false for non-dates and invalid dates', async t => { - t.plan(2) - t.same(internals.isValidDate('20210621'), false) - t.same(internals.isValidDate(new Date('2021-41-99')), false) - }) - - t.end() -}) - -tap.test('#prettifyError', t => { - t.test('prettifies error', t => { - const error = Error('Bad error!') - const lines = stringifySafe(error, Object.getOwnPropertyNames(error), 2) - - const prettyError = internals.prettifyError({ keyName: 'errorKey', lines, ident: ' ', eol: '\n' }) - t.match(prettyError, /\s*errorKey: {\n\s*"stack":[\s\S]*"message": "Bad error!"/) - t.end() - }) - - t.end() -}) - -tap.test('#deleteLogProperty', t => { - const logData = { - level: 30, - data1: { - data2: { 'data-3': 'bar' } - } - } - - t.test('deleteLogProperty deletes property of depth 1', async t => { - const log = clone(logData) - internals.deleteLogProperty(log, 'data1') - t.same(log, { level: 30 }) - }) - - t.test('deleteLogProperty deletes property of depth 2', async t => { - const log = clone(logData) - internals.deleteLogProperty(log, 'data1.data2') - t.same(log, { level: 30, data1: { } }) - }) - - t.test('deleteLogProperty deletes property of depth 3', async t => { - const log = clone(logData) - internals.deleteLogProperty(log, 'data1.data2.data-3') - t.same(log, { level: 30, data1: { data2: { } } }) - }) - - t.end() -}) - -tap.test('#splitIgnoreKey', t => { - t.test('splitIgnoreKey does not change key', async t => { - const result = internals.splitIgnoreKey('data1') - t.same(result, ['data1']) - }) - - t.test('splitIgnoreKey splits nested key', async t => { - const result = internals.splitIgnoreKey('data1.data2.data-3') - t.same(result, ['data1', 'data2', 'data-3']) - }) - - t.test('splitIgnoreKey splits nested keys ending with a dot', async t => { - const result = internals.splitIgnoreKey('data1.data2.data-3.') - t.same(result, ['data1', 'data2', 'data-3']) - }) - - t.test('splitIgnoreKey splits nested escaped key', async t => { - const result = internals.splitIgnoreKey('logging\\.domain\\.corp/operation.foo.bar-2') - t.same(result, ['logging.domain.corp/operation', 'foo', 'bar-2']) - }) - - t.test('splitIgnoreKey splits nested escaped key with special characters', async t => { - const result = internals.splitIgnoreKey('logging\\.domain\\.corp/operation.!\t@#$%^&*()_+=-<>.bar\\.2') - t.same(result, ['logging.domain.corp/operation', '!\t@#$%^&*()_+=-<>', 'bar.2']) - }) - - t.end() -}) diff --git a/node_modules/pino-pretty/test/lib/utils.public.test.js b/node_modules/pino-pretty/test/lib/utils.public.test.js deleted file mode 100644 index a781fe79..00000000 --- a/node_modules/pino-pretty/test/lib/utils.public.test.js +++ /dev/null @@ -1,425 +0,0 @@ -'use strict' - -const tap = require('tap') -const getColorizer = require('../../lib/colors') -const utils = require('../../lib/utils') - -tap.test('prettifyErrorLog', t => { - const { prettifyErrorLog } = utils - - t.test('returns string with default settings', async t => { - const err = Error('Something went wrong') - const str = prettifyErrorLog({ log: err }) - t.ok(str.startsWith(' Error: Something went wrong')) - }) - - t.test('returns string with custom ident', async t => { - const err = Error('Something went wrong') - const str = prettifyErrorLog({ log: err, ident: ' ' }) - t.ok(str.startsWith(' Error: Something went wrong')) - }) - - t.test('returns string with custom eol', async t => { - const err = Error('Something went wrong') - const str = prettifyErrorLog({ log: err, eol: '\r\n' }) - t.ok(str.startsWith(' Error: Something went wrong\r\n')) - }) - - t.end() -}) - -tap.test('prettifyLevel', t => { - const { prettifyLevel } = utils - - t.test('returns `undefined` for unknown level', async t => { - const colorized = prettifyLevel({ log: {} }) - t.equal(colorized, undefined) - }) - - t.test('returns non-colorized value for default colorizer', async t => { - const log = { - level: 30 - } - const colorized = prettifyLevel({ log }) - t.equal(colorized, 'INFO') - }) - - t.test('returns colorized value for color colorizer', async t => { - const log = { - level: 30 - } - const colorizer = getColorizer(true) - const colorized = prettifyLevel({ log, colorizer }) - t.equal(colorized, '\u001B[32mINFO\u001B[39m') - }) - - t.end() -}) - -tap.test('prettifyMessage', t => { - const { prettifyMessage } = utils - - t.test('returns `undefined` if `messageKey` not found', async t => { - const str = prettifyMessage({ log: {} }) - t.equal(str, undefined) - }) - - t.test('returns `undefined` if `messageKey` not string', async t => { - const str = prettifyMessage({ log: { msg: {} } }) - t.equal(str, undefined) - }) - - t.test('returns non-colorized value for default colorizer', async t => { - const str = prettifyMessage({ log: { msg: 'foo' } }) - t.equal(str, 'foo') - }) - - t.test('returns non-colorized value for alternate `messageKey`', async t => { - const str = prettifyMessage({ log: { message: 'foo' }, messageKey: 'message' }) - t.equal(str, 'foo') - }) - - t.test('returns colorized value for color colorizer', async t => { - const colorizer = getColorizer(true) - const str = prettifyMessage({ log: { msg: 'foo' }, colorizer }) - t.equal(str, '\u001B[36mfoo\u001B[39m') - }) - - t.test('returns colorized value for color colorizer for alternate `messageKey`', async t => { - const colorizer = getColorizer(true) - const str = prettifyMessage({ log: { message: 'foo' }, messageKey: 'message', colorizer }) - t.equal(str, '\u001B[36mfoo\u001B[39m') - }) - - t.test('returns message formatted by `messageFormat` option', async t => { - const str = prettifyMessage({ log: { msg: 'foo', context: 'appModule' }, messageFormat: '{context} - {msg}' }) - t.equal(str, 'appModule - foo') - }) - - t.test('returns message formatted by `messageFormat` option - missing prop', async t => { - const str = prettifyMessage({ log: { context: 'appModule' }, messageFormat: '{context} - {msg}' }) - t.equal(str, 'appModule - ') - }) - - t.test('returns message formatted by `messageFormat` option - levelLabel', async t => { - const str = prettifyMessage({ log: { msg: 'foo', context: 'appModule', level: 30 }, messageFormat: '[{level}] {levelLabel} {context} - {msg}' }) - t.equal(str, '[30] INFO appModule - foo') - }) - - t.test('`messageFormat` supports nested curly brackets', async t => { - const str = prettifyMessage({ log: { level: 30 }, messageFormat: '{{level}}-{level}-{{level}-{level}}' }) - t.equal(str, '{30}-30-{30-30}') - }) - - t.test('`messageFormat` supports nested object', async t => { - const str = prettifyMessage({ log: { level: 30, request: { url: 'localhost/test' }, msg: 'foo' }, messageFormat: '{request.url} - param: {request.params.process} - {msg}' }) - t.equal(str, 'localhost/test - param: - foo') - }) - - t.test('`messageFormat` supports function definition', async t => { - const str = prettifyMessage({ - log: { level: 30, request: { url: 'localhost/test' }, msg: 'incoming request' }, - messageFormat: (log, messageKey, levelLabel) => { - let msg = log[messageKey] - if (msg === 'incoming request') msg = `--> ${log.request.url}` - return msg - } - }) - t.equal(str, '--> localhost/test') - }) - - t.end() -}) - -tap.test('prettifyMetadata', t => { - const { prettifyMetadata } = utils - - t.test('returns `undefined` if no metadata present', async t => { - const str = prettifyMetadata({ log: {} }) - t.equal(str, undefined) - }) - - t.test('works with only `name` present', async t => { - const str = prettifyMetadata({ log: { name: 'foo' } }) - t.equal(str, '(foo)') - }) - - t.test('works with only `pid` present', async t => { - const str = prettifyMetadata({ log: { pid: '1234' } }) - t.equal(str, '(1234)') - }) - - t.test('works with only `hostname` present', async t => { - const str = prettifyMetadata({ log: { hostname: 'bar' } }) - t.equal(str, '(on bar)') - }) - - t.test('works with only `name` & `pid` present', async t => { - const str = prettifyMetadata({ log: { name: 'foo', pid: '1234' } }) - t.equal(str, '(foo/1234)') - }) - - t.test('works with only `name` & `hostname` present', async t => { - const str = prettifyMetadata({ log: { name: 'foo', hostname: 'bar' } }) - t.equal(str, '(foo on bar)') - }) - - t.test('works with only `pid` & `hostname` present', async t => { - const str = prettifyMetadata({ log: { pid: '1234', hostname: 'bar' } }) - t.equal(str, '(1234 on bar)') - }) - - t.test('works with only `name`, `pid`, & `hostname` present', async t => { - const str = prettifyMetadata({ log: { name: 'foo', pid: '1234', hostname: 'bar' } }) - t.equal(str, '(foo/1234 on bar)') - }) - - t.test('works with only `name` & `caller` present', async t => { - const str = prettifyMetadata({ log: { name: 'foo', caller: 'baz' } }) - t.equal(str, '(foo) ') - }) - - t.test('works with only `pid` & `caller` present', async t => { - const str = prettifyMetadata({ log: { pid: '1234', caller: 'baz' } }) - t.equal(str, '(1234) ') - }) - - t.test('works with only `hostname` & `caller` present', async t => { - const str = prettifyMetadata({ log: { hostname: 'bar', caller: 'baz' } }) - t.equal(str, '(on bar) ') - }) - - t.test('works with only `name`, `pid`, & `caller` present', async t => { - const str = prettifyMetadata({ log: { name: 'foo', pid: '1234', caller: 'baz' } }) - t.equal(str, '(foo/1234) ') - }) - - t.test('works with only `name`, `hostname`, & `caller` present', async t => { - const str = prettifyMetadata({ log: { name: 'foo', hostname: 'bar', caller: 'baz' } }) - t.equal(str, '(foo on bar) ') - }) - - t.test('works with only `caller` present', async t => { - const str = prettifyMetadata({ log: { caller: 'baz' } }) - t.equal(str, '') - }) - - t.test('works with only `pid`, `hostname`, & `caller` present', async t => { - const str = prettifyMetadata({ log: { pid: '1234', hostname: 'bar', caller: 'baz' } }) - t.equal(str, '(1234 on bar) ') - }) - - t.test('works with all four present', async t => { - const str = prettifyMetadata({ log: { name: 'foo', pid: '1234', hostname: 'bar', caller: 'baz' } }) - t.equal(str, '(foo/1234 on bar) ') - }) - - t.end() -}) - -tap.test('prettifyObject', t => { - const { prettifyObject } = utils - - t.test('returns empty string if no properties present', async t => { - const str = prettifyObject({ input: {} }) - t.equal(str, '') - }) - - t.test('works with single level properties', async t => { - const str = prettifyObject({ input: { foo: 'bar' } }) - t.equal(str, ' foo: "bar"\n') - }) - - t.test('works with multiple level properties', async t => { - const str = prettifyObject({ input: { foo: { bar: 'baz' } } }) - t.equal(str, ' foo: {\n "bar": "baz"\n }\n') - }) - - t.test('skips specified keys', async t => { - const str = prettifyObject({ input: { foo: 'bar', hello: 'world' }, skipKeys: ['foo'] }) - t.equal(str, ' hello: "world"\n') - }) - - t.test('ignores predefined keys', async t => { - const str = prettifyObject({ input: { foo: 'bar', pid: 12345 } }) - t.equal(str, ' foo: "bar"\n') - }) - - t.test('works with error props', async t => { - const err = Error('Something went wrong') - const serializedError = { - message: err.message, - stack: err.stack - } - const str = prettifyObject({ input: { error: serializedError } }) - t.ok(str.startsWith(' error:')) - t.ok(str.includes(' "message": "Something went wrong",')) - t.ok(str.includes(' Error: Something went wrong')) - }) - - t.end() -}) - -tap.test('prettifyTime', t => { - const { prettifyTime } = utils - - t.test('returns `undefined` if `time` or `timestamp` not in log', async t => { - const str = prettifyTime({ log: {} }) - t.equal(str, undefined) - }) - - t.test('returns prettified formatted time from custom field', async t => { - const log = { customtime: 1554642900000 } - let str = prettifyTime({ log, translateFormat: true, timestampKey: 'customtime' }) - t.equal(str, '[2019-04-07 13:15:00.000 +0000]') - - str = prettifyTime({ log, translateFormat: false, timestampKey: 'customtime' }) - t.equal(str, '[1554642900000]') - }) - - t.test('returns prettified formatted time', async t => { - let log = { time: 1554642900000 } - let str = prettifyTime({ log, translateFormat: true }) - t.equal(str, '[2019-04-07 13:15:00.000 +0000]') - - log = { timestamp: 1554642900000 } - str = prettifyTime({ log, translateFormat: true }) - t.equal(str, '[2019-04-07 13:15:00.000 +0000]') - - log = { time: '2019-04-07T09:15:00.000-04:00' } - str = prettifyTime({ log, translateFormat: true }) - t.equal(str, '[2019-04-07 13:15:00.000 +0000]') - - log = { timestamp: '2019-04-07T09:15:00.000-04:00' } - str = prettifyTime({ log, translateFormat: true }) - t.equal(str, '[2019-04-07 13:15:00.000 +0000]') - - log = { time: 1554642900000 } - str = prettifyTime({ log, translateFormat: 'd mmm yyyy H:MM' }) - t.equal(str, '[7 Apr 2019 13:15]') - - log = { timestamp: 1554642900000 } - str = prettifyTime({ log, translateFormat: 'd mmm yyyy H:MM' }) - t.equal(str, '[7 Apr 2019 13:15]') - - log = { time: '2019-04-07T09:15:00.000-04:00' } - str = prettifyTime({ log, translateFormat: 'd mmm yyyy H:MM' }) - t.equal(str, '[7 Apr 2019 13:15]') - - log = { timestamp: '2019-04-07T09:15:00.000-04:00' } - str = prettifyTime({ log, translateFormat: 'd mmm yyyy H:MM' }) - t.equal(str, '[7 Apr 2019 13:15]') - }) - - t.test('passes through value', async t => { - let log = { time: 1554642900000 } - let str = prettifyTime({ log }) - t.equal(str, '[1554642900000]') - - log = { timestamp: 1554642900000 } - str = prettifyTime({ log }) - t.equal(str, '[1554642900000]') - - log = { time: '2019-04-07T09:15:00.000-04:00' } - str = prettifyTime({ log }) - t.equal(str, '[2019-04-07T09:15:00.000-04:00]') - - log = { timestamp: '2019-04-07T09:15:00.000-04:00' } - str = prettifyTime({ log }) - t.equal(str, '[2019-04-07T09:15:00.000-04:00]') - }) - - t.test('handles the 0 timestamp', async t => { - let log = { time: 0 } - let str = prettifyTime({ log }) - t.equal(str, '[0]') - - log = { timestamp: 0 } - str = prettifyTime({ log }) - t.equal(str, '[0]') - }) - - t.test('works with epoch as a number or string', (t) => { - t.plan(3) - const epoch = 1522431328992 - const asNumber = prettifyTime({ - log: { time: epoch, msg: 'foo' }, - translateFormat: true - }) - const asString = prettifyTime({ - log: { time: `${epoch}`, msg: 'foo' }, - translateFormat: true - }) - const invalid = prettifyTime({ - log: { time: '2 days ago', msg: 'foo' }, - translateFormat: true - }) - t.same(asString, '[2018-03-30 17:35:28.992 +0000]') - t.same(asNumber, '[2018-03-30 17:35:28.992 +0000]') - t.same(invalid, '[2 days ago]') - }) - - t.end() -}) - -tap.test('#filterLog', t => { - const { filterLog } = utils - const logData = { - level: 30, - time: 1522431328992, - data1: { - data2: { 'data-3': 'bar' } - } - } - - t.test('filterLog removes single entry', async t => { - const result = filterLog(logData, ['data1.data2.data-3']) - t.same(result, { level: 30, time: 1522431328992, data1: { data2: { } } }) - }) - - t.test('filterLog removes multiple entries', async t => { - const result = filterLog(logData, ['time', 'data1']) - t.same(result, { level: 30 }) - }) - - const logData2 = Object.assign({ - 'logging.domain.corp/operation': { - id: 'foo', - producer: 'bar' - } - }, logData) - - t.test('filterLog removes entry with escape sequence', async t => { - const result = filterLog(logData2, ['data1', 'logging\\.domain\\.corp/operation']) - t.same(result, { level: 30, time: 1522431328992 }) - }) - - t.test('filterLog removes entry with escape sequence nested', async t => { - const result = filterLog(logData2, ['data1', 'logging\\.domain\\.corp/operation.producer']) - t.same(result, { level: 30, time: 1522431328992, 'logging.domain.corp/operation': { id: 'foo' } }) - }) - - t.end() -}) - -tap.test('#filterLog with circular references', t => { - const { filterLog } = utils - const logData = { - level: 30, - time: 1522431328992, - data1: 'test' - } - logData.circular = logData - - t.test('filterLog removes single entry', async t => { - const result = filterLog(logData, ['data1']) - - t.same(result.circular.level, result.level) - t.same(result.circular.time, result.time) - - delete result.circular - t.same(result, { level: 30, time: 1522431328992 }) - }) - - t.end() -}) diff --git a/node_modules/pino-pretty/test/types/pino-pretty.test-d.ts b/node_modules/pino-pretty/test/types/pino-pretty.test-d.ts deleted file mode 100644 index 902b80f1..00000000 --- a/node_modules/pino-pretty/test/types/pino-pretty.test-d.ts +++ /dev/null @@ -1,69 +0,0 @@ -import prettyFactory from "../../"; -import { expectType } from "tsd"; - -import PinoPretty, { PinoPretty as PinoPrettyNamed, PrettyOptions } from "../../"; -import PinoPrettyDefault from "../../"; -import * as PinoPrettyStar from "../../"; -import PinoPrettyCjsImport = require ("../../"); -import Prettifier = PinoPretty.Prettifier; -const PinoPrettyCjs = require("../../"); - -const options: PinoPretty.PrettyOptions = { - colorize: true, - crlf: false, - errorLikeObjectKeys: ["err", "error"], - errorProps: "", - hideObject: true, - levelKey: "level", - levelLabel: "foo", - messageFormat: false, - ignore: "", - levelFirst: false, - messageKey: "msg", - timestampKey: "timestamp", - translateTime: "UTC:h:MM:ss TT Z", - search: "foo == `bar`", - singleLine: false, - customPrettifiers: { - key: (value) => { - return value.toString().toUpperCase(); - } - } -}; - -const options2: PrettyOptions = { - colorize: true, - crlf: false, - errorLikeObjectKeys: ["err", "error"], - errorProps: "", - hideObject: true, - levelKey: "level", - levelLabel: "foo", - messageFormat: false, - ignore: "", - levelFirst: false, - messageKey: "msg", - timestampKey: "timestamp", - translateTime: "UTC:h:MM:ss TT Z", - search: "foo == `bar`", - singleLine: false, - customPrettifiers: { - key: (value) => { - return value.toString().toUpperCase(); - } - } -}; - -const pretty = prettyFactory(options); -expectType(pretty) - -expectType(PinoPrettyNamed(options)); -expectType(PinoPrettyDefault(options)); -expectType(PinoPrettyStar.PinoPretty(options)); -expectType(PinoPrettyStar.default(options)); -expectType(PinoPrettyCjsImport.PinoPretty(options)); -expectType(PinoPrettyCjsImport.default(options)); -expectType(PinoPrettyCjs(options)); - -expectType(pretty({ foo: "bar" })); -expectType(pretty('dummy')); diff --git a/node_modules/pino-pretty/tsconfig.json b/node_modules/pino-pretty/tsconfig.json deleted file mode 100644 index 67629602..00000000 --- a/node_modules/pino-pretty/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "compilerOptions": { - "target": "es6", - "lib": [ "es2015" ], - "module": "commonjs", - "noEmit": true, - "strict": true - }, - "include": [ - "./test/types/pino-pretty.test.d.ts", - "./index.d.ts" - ] -} diff --git a/node_modules/pino-std-serializers/.editorconfig b/node_modules/pino-std-serializers/.editorconfig deleted file mode 100644 index 3fec5c5b..00000000 --- a/node_modules/pino-std-serializers/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ - -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -indent_style = space -indent_size = 2 -trim_trailing_whitespace = true - -# [*.md] -# trim_trailing_whitespace = false diff --git a/node_modules/pino-std-serializers/.github/dependabot.yml b/node_modules/pino-std-serializers/.github/dependabot.yml deleted file mode 100644 index 4872c5af..00000000 --- a/node_modules/pino-std-serializers/.github/dependabot.yml +++ /dev/null @@ -1,7 +0,0 @@ -version: 2 -updates: -- package-ecosystem: npm - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 diff --git a/node_modules/pino-std-serializers/.github/workflows/ci.yml b/node_modules/pino-std-serializers/.github/workflows/ci.yml deleted file mode 100644 index 0d462d7e..00000000 --- a/node_modules/pino-std-serializers/.github/workflows/ci.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: CI - -on: [push, pull_request] - -jobs: - build-lint-test: - runs-on: [ubuntu-latest] - - strategy: - matrix: - node-version: [10.x, 12.x, 14.x, 15.x] - - steps: - - uses: actions/checkout@v2 - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: ${{matrix.node-version}} - - name: Install Dependencies - run: npm install - env: - NODE_ENV: development - - name: Lint-CI - run: npm run lint-ci - - name: Test-CI - run: npm run test-ci - - automerge: - needs: build-lint-test - runs-on: ubuntu-latest - steps: - - uses: fastify/github-action-merge-dependabot@v1 - if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }} - with: - github-token: ${{secrets.github_token}} diff --git a/node_modules/pino-std-serializers/LICENSE b/node_modules/pino-std-serializers/LICENSE deleted file mode 100644 index 69957c55..00000000 --- a/node_modules/pino-std-serializers/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ -Copyright Mateo Collina, David Mark Clements, James Sumners - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/pino-std-serializers/Readme.md b/node_modules/pino-std-serializers/Readme.md deleted file mode 100644 index f7716bf5..00000000 --- a/node_modules/pino-std-serializers/Readme.md +++ /dev/null @@ -1,107 +0,0 @@ -# pino-std-serializers  [![CI](https://github.com/pinojs/pino-std-serializers/workflows/CI/badge.svg)](https://github.com/pinojs/pino-std-serializers/actions?query=workflow%3ACI) - -This module provides a set of standard object serializers for the -[Pino](https://getpino.io) logger. - -## Serializers - -### `exports.err(error)` -Serializes an `Error` like object. Returns an object: - -```js -{ - type: 'string', // The name of the object's constructor. - message: 'string', // The supplied error message. - stack: 'string', // The stack when the error was generated. - raw: Error // Non-enumerable, i.e. will not be in the output, original - // Error object. This is available for subsequent serializers - // to use. -} -``` - -Any other extra properties, e.g. `statusCode`, that have been attached to the -object will also be present on the serialized object. - -### `exports.mapHttpResponse(response)` -Used internally by Pino for general response logging. Returns an object: - -```js -{ - res: {} -} -``` - -Where `res` is the `response` as serialized by the standard response serializer. - -### `exports.mapHttpRequest(request)` -Used internall by Pino for general request logging. Returns an object: - -```js -{ - req: {} -} -``` - -Where `req` is the `request` as serialized by the standard request serializer. - -### `exports.req(request)` -The default `request` serializer. Returns and object: - -```js -{ - id: 'string', // Defaults to `undefined`, unless there is an `id` property - // already attached to the `request` object or to the `request.info` - // object. Attach a synchronous function - // to the `request.id` that returns an identifier to have - // the value filled. - method: 'string', - url: 'string', // the request pathname (as per req.url in core HTTP) - headers: Object, // a reference to the `headers` object from the request - // (as per req.headers in core HTTP) - remoteAddress: 'string', - remotePort: Number, - raw: Object // Non-enumerable, i.e. will not be in the output, original - // request object. This is available for subsequent serializers - // to use. In cases where the `request` input already has - // a `raw` property this will replace the original `request.raw` - // property -} -``` - -### `exports.res(response)` -The default `response` serializer. Returns an object: - -```js -{ - statusCode: Number, - headers: Object, // The headers to be sent in the response. - raw: Object // Non-enumerable, i.e. will not be in the output, original - // response object. This is available for subsequent serializers - // to use. -} -``` - -### `exports.wrapErrorSerializer(customSerializer)` -A utility method for wrapping the default error serializer. This allows -custom serializers to work with the already serialized object. - -The `customSerializer` accepts one parameter — the newly serialized error -object — and returns the new (or updated) error object. - -### `exports.wrapRequestSerializer(customSerializer)` -A utility method for wrapping the default request serializer. This allows -custom serializers to work with the already serialized object. - -The `customSerializer` accepts one parameter — the newly serialized request -object — and returns the new (or updated) request object. - -### `exports.wrapResponseSerializer(customSerializer)` -A utility method for wrapping the default response serializer. This allows -custom serializers to work with the already serialized object. - -The `customSerializer` accepts one parameter — the newly serialized response -object — and returns the new (or updated) response object. - -## License - -MIT License diff --git a/node_modules/pino-std-serializers/index.js b/node_modules/pino-std-serializers/index.js deleted file mode 100644 index 88f60272..00000000 --- a/node_modules/pino-std-serializers/index.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict' - -const errSerializer = require('./lib/err') -const reqSerializers = require('./lib/req') -const resSerializers = require('./lib/res') - -module.exports = { - err: errSerializer, - mapHttpRequest: reqSerializers.mapHttpRequest, - mapHttpResponse: resSerializers.mapHttpResponse, - req: reqSerializers.reqSerializer, - res: resSerializers.resSerializer, - - wrapErrorSerializer: function wrapErrorSerializer (customSerializer) { - if (customSerializer === errSerializer) return customSerializer - return function wrapErrSerializer (err) { - return customSerializer(errSerializer(err)) - } - }, - - wrapRequestSerializer: function wrapRequestSerializer (customSerializer) { - if (customSerializer === reqSerializers.reqSerializer) return customSerializer - return function wrappedReqSerializer (req) { - return customSerializer(reqSerializers.reqSerializer(req)) - } - }, - - wrapResponseSerializer: function wrapResponseSerializer (customSerializer) { - if (customSerializer === resSerializers.resSerializer) return customSerializer - return function wrappedResSerializer (res) { - return customSerializer(resSerializers.resSerializer(res)) - } - } -} diff --git a/node_modules/pino-std-serializers/lib/err.js b/node_modules/pino-std-serializers/lib/err.js deleted file mode 100644 index 98570d54..00000000 --- a/node_modules/pino-std-serializers/lib/err.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict' - -module.exports = errSerializer - -const { toString } = Object.prototype -const seen = Symbol('circular-ref-tag') -const rawSymbol = Symbol('pino-raw-err-ref') -const pinoErrProto = Object.create({}, { - type: { - enumerable: true, - writable: true, - value: undefined - }, - message: { - enumerable: true, - writable: true, - value: undefined - }, - stack: { - enumerable: true, - writable: true, - value: undefined - }, - raw: { - enumerable: false, - get: function () { - return this[rawSymbol] - }, - set: function (val) { - this[rawSymbol] = val - } - } -}) -Object.defineProperty(pinoErrProto, rawSymbol, { - writable: true, - value: {} -}) - -function errSerializer (err) { - if (!(err instanceof Error)) { - return err - } - - err[seen] = undefined // tag to prevent re-looking at this - const _err = Object.create(pinoErrProto) - _err.type = toString.call(err.constructor) === '[object Function]' - ? err.constructor.name - : err.name - _err.message = err.message - _err.stack = err.stack - for (const key in err) { - if (_err[key] === undefined) { - const val = err[key] - if (val instanceof Error) { - /* eslint-disable no-prototype-builtins */ - if (!val.hasOwnProperty(seen)) { - _err[key] = errSerializer(val) - } - } else { - _err[key] = val - } - } - } - - delete err[seen] // clean up tag in case err is serialized again later - _err.raw = err - return _err -} diff --git a/node_modules/pino-std-serializers/lib/req.js b/node_modules/pino-std-serializers/lib/req.js deleted file mode 100644 index 85264d0c..00000000 --- a/node_modules/pino-std-serializers/lib/req.js +++ /dev/null @@ -1,92 +0,0 @@ -'use strict' - -module.exports = { - mapHttpRequest, - reqSerializer -} - -const rawSymbol = Symbol('pino-raw-req-ref') -const pinoReqProto = Object.create({}, { - id: { - enumerable: true, - writable: true, - value: '' - }, - method: { - enumerable: true, - writable: true, - value: '' - }, - url: { - enumerable: true, - writable: true, - value: '' - }, - query: { - enumerable: true, - writable: true, - value: '' - }, - params: { - enumerable: true, - writable: true, - value: '' - }, - headers: { - enumerable: true, - writable: true, - value: {} - }, - remoteAddress: { - enumerable: true, - writable: true, - value: '' - }, - remotePort: { - enumerable: true, - writable: true, - value: '' - }, - raw: { - enumerable: false, - get: function () { - return this[rawSymbol] - }, - set: function (val) { - this[rawSymbol] = val - } - } -}) -Object.defineProperty(pinoReqProto, rawSymbol, { - writable: true, - value: {} -}) - -function reqSerializer (req) { - // req.info is for hapi compat. - const connection = req.info || req.socket - const _req = Object.create(pinoReqProto) - _req.id = (typeof req.id === 'function' ? req.id() : (req.id || (req.info ? req.info.id : undefined))) - _req.method = req.method - // req.originalUrl is for expressjs compat. - if (req.originalUrl) { - _req.url = req.originalUrl - _req.query = req.query - _req.params = req.params - } else { - // req.url.path is for hapi compat. - _req.url = req.path || (req.url ? (req.url.path || req.url) : undefined) - } - _req.headers = req.headers - _req.remoteAddress = connection && connection.remoteAddress - _req.remotePort = connection && connection.remotePort - // req.raw is for hapi compat/equivalence - _req.raw = req.raw || req - return _req -} - -function mapHttpRequest (req) { - return { - req: reqSerializer(req) - } -} diff --git a/node_modules/pino-std-serializers/lib/res.js b/node_modules/pino-std-serializers/lib/res.js deleted file mode 100644 index a2bc4202..00000000 --- a/node_modules/pino-std-serializers/lib/res.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict' - -module.exports = { - mapHttpResponse, - resSerializer -} - -const rawSymbol = Symbol('pino-raw-res-ref') -const pinoResProto = Object.create({}, { - statusCode: { - enumerable: true, - writable: true, - value: 0 - }, - headers: { - enumerable: true, - writable: true, - value: '' - }, - raw: { - enumerable: false, - get: function () { - return this[rawSymbol] - }, - set: function (val) { - this[rawSymbol] = val - } - } -}) -Object.defineProperty(pinoResProto, rawSymbol, { - writable: true, - value: {} -}) - -function resSerializer (res) { - const _res = Object.create(pinoResProto) - _res.statusCode = res.statusCode - _res.headers = res.getHeaders ? res.getHeaders() : res._headers - _res.raw = res - return _res -} - -function mapHttpResponse (res) { - return { - res: resSerializer(res) - } -} diff --git a/node_modules/pino-std-serializers/package.json b/node_modules/pino-std-serializers/package.json deleted file mode 100644 index d0e0652a..00000000 --- a/node_modules/pino-std-serializers/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "pino-std-serializers@^3.1.0", - "_id": "pino-std-serializers@3.2.0", - "_inBundle": false, - "_integrity": "sha512-EqX4pwDPrt3MuOAAUBMU0Tk5kR/YcCM5fNPEzgCO2zJ5HfX0vbiH9HbJglnyeQsN96Kznae6MWD47pZB5avTrg==", - "_location": "/pino-std-serializers", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "pino-std-serializers@^3.1.0", - "name": "pino-std-serializers", - "escapedName": "pino-std-serializers", - "rawSpec": "^3.1.0", - "saveSpec": null, - "fetchSpec": "^3.1.0" - }, - "_requiredBy": [ - "/pino" - ], - "_resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-3.2.0.tgz", - "_shasum": "b56487c402d882eb96cd67c257868016b61ad671", - "_spec": "pino-std-serializers@^3.1.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pino", - "author": { - "name": "James Sumners", - "email": "james.sumners@gmail.com" - }, - "bugs": { - "url": "https://github.com/pinojs/pino-std-serializers/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A collection of standard object serializers for Pino", - "devDependencies": { - "pre-commit": "^1.2.2", - "snazzy": "^9.0.0", - "standard": "^16.0.0", - "tap": "^14.0.0" - }, - "homepage": "https://github.com/pinojs/pino-std-serializers#readme", - "keywords": [ - "pino", - "logging" - ], - "license": "MIT", - "main": "index.js", - "name": "pino-std-serializers", - "precommit": [ - "lint", - "test" - ], - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/pinojs/pino-std-serializers.git" - }, - "scripts": { - "lint": "standard | snazzy", - "lint-ci": "standard", - "test": "tap --no-cov 'test/**/*.test.js'", - "test-ci": "tap --cov --coverage-report=text 'test/**/*.test.js'" - }, - "version": "3.2.0" -} diff --git a/node_modules/pino-std-serializers/test/err.test.js b/node_modules/pino-std-serializers/test/err.test.js deleted file mode 100644 index 5acc7d89..00000000 --- a/node_modules/pino-std-serializers/test/err.test.js +++ /dev/null @@ -1,147 +0,0 @@ -'use strict' - -const test = require('tap').test -const serializer = require('../lib/err') -const wrapErrorSerializer = require('../').wrapErrorSerializer - -test('serializes Error objects', function (t) { - t.plan(3) - const serialized = serializer(Error('foo')) - t.is(serialized.type, 'Error') - t.is(serialized.message, 'foo') - t.match(serialized.stack, /err\.test\.js:/) -}) - -test('serializes Error objects with extra properties', function (t) { - t.plan(5) - const err = Error('foo') - err.statusCode = 500 - const serialized = serializer(err) - t.is(serialized.type, 'Error') - t.is(serialized.message, 'foo') - t.ok(serialized.statusCode) - t.is(serialized.statusCode, 500) - t.match(serialized.stack, /err\.test\.js:/) -}) - -test('serializes Error objects with subclass "type"', function (t) { - t.plan(1) - class MyError extends Error {} - const err = new MyError('foo') - const serialized = serializer(err) - t.is(serialized.type, 'MyError') -}) - -test('serializes nested errors', function (t) { - t.plan(7) - const err = Error('foo') - err.inner = Error('bar') - const serialized = serializer(err) - t.is(serialized.type, 'Error') - t.is(serialized.message, 'foo') - t.match(serialized.stack, /err\.test\.js:/) - t.is(serialized.inner.type, 'Error') - t.is(serialized.inner.message, 'bar') - t.match(serialized.inner.stack, /Error: bar/) - t.match(serialized.inner.stack, /err\.test\.js:/) -}) - -test('prevents infinite recursion', function (t) { - t.plan(4) - const err = Error('foo') - err.inner = err - const serialized = serializer(err) - t.is(serialized.type, 'Error') - t.is(serialized.message, 'foo') - t.match(serialized.stack, /err\.test\.js:/) - t.notOk(serialized.inner) -}) - -test('cleans up infinite recursion tracking', function (t) { - t.plan(8) - const err = Error('foo') - const bar = Error('bar') - err.inner = bar - bar.inner = err - - serializer(err) - const serialized = serializer(err) - - t.is(serialized.type, 'Error') - t.is(serialized.message, 'foo') - t.match(serialized.stack, /err\.test\.js:/) - t.ok(serialized.inner) - t.is(serialized.inner.type, 'Error') - t.is(serialized.inner.message, 'bar') - t.match(serialized.inner.stack, /Error: bar/) - t.notOk(serialized.inner.inner) -}) - -test('err.raw is available', function (t) { - t.plan(1) - const err = Error('foo') - const serialized = serializer(err) - t.equal(serialized.raw, err) -}) - -test('redefined err.constructor doesnt crash serializer', function (t) { - t.plan(10) - - function check (a, name) { - t.is(a.type, name) - t.is(a.message, 'foo') - } - - const err1 = TypeError('foo') - err1.constructor = '10' - - const err2 = TypeError('foo') - err2.constructor = undefined - - const err3 = Error('foo') - err3.constructor = null - - const err4 = Error('foo') - err4.constructor = 10 - - class MyError extends Error {} - const err5 = new MyError('foo') - err5.constructor = undefined - - check(serializer(err1), 'TypeError') - check(serializer(err2), 'TypeError') - check(serializer(err3), 'Error') - check(serializer(err4), 'Error') - // We do not expect 'MyError' because err5.constructor has been blown away. - // `err5.name` is 'Error' from the base class prototype. - check(serializer(err5), 'Error') -}) - -test('pass through anything that is not an Error', function (t) { - t.plan(3) - - function check (a) { - t.is(serializer(a), a) - } - - check('foo') - check({ hello: 'world' }) - check([1, 2]) -}) - -test('can wrap err serializers', function (t) { - t.plan(5) - const err = Error('foo') - err.foo = 'foo' - const serializer = wrapErrorSerializer(function (err) { - delete err.foo - err.bar = 'bar' - return err - }) - const serialized = serializer(err) - t.is(serialized.type, 'Error') - t.is(serialized.message, 'foo') - t.match(serialized.stack, /err\.test\.js:/) - t.notOk(serialized.foo) - t.is(serialized.bar, 'bar') -}) diff --git a/node_modules/pino-std-serializers/test/req.test.js b/node_modules/pino-std-serializers/test/req.test.js deleted file mode 100644 index bd97cd30..00000000 --- a/node_modules/pino-std-serializers/test/req.test.js +++ /dev/null @@ -1,394 +0,0 @@ -'use strict' - -const http = require('http') -const test = require('tap').test -const serializers = require('../lib/req') -const wrapRequestSerializer = require('../').wrapRequestSerializer - -test('maps request', function (t) { - t.plan(2) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - const serialized = serializers.mapHttpRequest(req) - t.ok(serialized.req) - t.ok(serialized.req.method) - t.end() - res.end() - } -}) - -test('does not return excessively long object', function (t) { - t.plan(1) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - const serialized = serializers.reqSerializer(req) - t.is(Object.keys(serialized).length, 6) - res.end() - } -}) - -test('req.raw is available', function (t) { - t.plan(2) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.foo = 'foo' - const serialized = serializers.reqSerializer(req) - t.ok(serialized.raw) - t.is(serialized.raw.foo, 'foo') - res.end() - } -}) - -test('req.raw will be obtained in from input request raw property if input request raw property is truthy', function (t) { - t.plan(2) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.raw = { req: { foo: 'foo' }, res: {} } - const serialized = serializers.reqSerializer(req) - t.ok(serialized.raw) - t.is(serialized.raw.req.foo, 'foo') - res.end() - } -}) - -test('req.id defaults to undefined', function (t) { - t.plan(1) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - const serialized = serializers.reqSerializer(req) - t.is(serialized.id, undefined) - res.end() - } -}) - -test('req.id has a non-function value', function (t) { - t.plan(1) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - const serialized = serializers.reqSerializer(req) - t.is(typeof serialized.id === 'function', false) - res.end() - } -}) - -test('req.id will be obtained from input request info.id when input request id does not exist', function (t) { - t.plan(1) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.info = { id: 'test' } - const serialized = serializers.reqSerializer(req) - t.is(serialized.id, 'test') - res.end() - } -}) - -test('req.id has a non-function value with custom id function', function (t) { - t.plan(2) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.id = function () { return 42 } - const serialized = serializers.reqSerializer(req) - t.is(typeof serialized.id === 'function', false) - t.is(serialized.id, 42) - res.end() - } -}) - -test('req.url will be obtained from input request req.path when input request url is an object', function (t) { - t.plan(1) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.path = '/test' - const serialized = serializers.reqSerializer(req) - t.is(serialized.url, '/test') - res.end() - } -}) - -test('req.url will be obtained from input request url.path when input request url is an object', function (t) { - t.plan(1) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.url = { path: '/test' } - const serialized = serializers.reqSerializer(req) - t.is(serialized.url, '/test') - res.end() - } -}) - -test('req.url will be obtained from input request url when input request url is not an object', function (t) { - t.plan(1) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.url = '/test' - const serialized = serializers.reqSerializer(req) - t.is(serialized.url, '/test') - res.end() - } -}) - -test('req.url will be empty when input request path and url are not defined', function (t) { - t.plan(1) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - const serialized = serializers.reqSerializer(req) - t.is(serialized.url, '/') - res.end() - } -}) - -test('req.url will be obtained from input request originalUrl when available', function (t) { - t.plan(1) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.originalUrl = '/test' - const serialized = serializers.reqSerializer(req) - t.is(serialized.url, '/test') - res.end() - } -}) - -test('can wrap request serializers', function (t) { - t.plan(3) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - const serailizer = wrapRequestSerializer(function (req) { - t.ok(req.method) - t.is(req.method, 'GET') - delete req.method - return req - }) - - function handler (req, res) { - const serialized = serailizer(req) - t.notOk(serialized.method) - res.end() - } -}) - -test('req.remoteAddress will be obtained from request socket.remoteAddress as fallback', function (t) { - t.plan(1) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.socket = { remoteAddress: 'http://localhost' } - const serialized = serializers.reqSerializer(req) - t.is(serialized.remoteAddress, 'http://localhost') - res.end() - } -}) - -test('req.remoteAddress will be obtained from request info.remoteAddress if available', function (t) { - t.plan(1) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.info = { remoteAddress: 'http://localhost' } - const serialized = serializers.reqSerializer(req) - t.is(serialized.remoteAddress, 'http://localhost') - res.end() - } -}) - -test('req.remotePort will be obtained from request socket.remotePort as fallback', function (t) { - t.plan(1) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.socket = { remotePort: 3000 } - const serialized = serializers.reqSerializer(req) - t.is(serialized.remotePort, 3000) - res.end() - } -}) - -test('req.remotePort will be obtained from request info.remotePort if available', function (t) { - t.plan(1) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.info = { remotePort: 3000 } - const serialized = serializers.reqSerializer(req) - t.is(serialized.remotePort, 3000) - res.end() - } -}) - -test('req.query is available', function (t) { - t.plan(1) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.originalUrl = '/test' - req.query = '/foo?bar=foobar&bar=foo' - const serialized = serializers.reqSerializer(req) - t.is(serialized.query, '/foo?bar=foobar&bar=foo') - res.end() - } -}) - -test('req.params is available', function (t) { - t.plan(1) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.originalUrl = '/test' - req.params = '/foo/bar' - const serialized = serializers.reqSerializer(req) - t.is(serialized.params, '/foo/bar') - res.end() - } -}) diff --git a/node_modules/pino-std-serializers/test/res.test.js b/node_modules/pino-std-serializers/test/res.test.js deleted file mode 100644 index a5ce6c99..00000000 --- a/node_modules/pino-std-serializers/test/res.test.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict' - -/* eslint-disable no-prototype-builtins */ - -const http = require('http') -const test = require('tap').test -const serializers = require('../lib/res') -const wrapResponseSerializer = require('../').wrapResponseSerializer - -test('res.raw is not enumerable', function (t) { - t.plan(1) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - const serialized = serializers.resSerializer(res) - t.is(serialized.propertyIsEnumerable('raw'), false) - res.end() - } -}) - -test('res.raw is available', function (t) { - t.plan(2) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - res.statusCode = 200 - const serialized = serializers.resSerializer(res) - t.ok(serialized.raw) - t.is(serialized.raw.statusCode, 200) - res.end() - } -}) - -test('can wrap response serializers', function (t) { - t.plan(3) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - const serializer = wrapResponseSerializer(function (res) { - t.ok(res.statusCode) - t.is(res.statusCode, 200) - delete res.statusCode - return res - }) - - function handler (req, res) { - res.statusCode = 200 - const serialized = serializer(res) - t.notOk(serialized.statusCode) - res.end() - } -}) - -test('res.headers is serialized', function (t) { - t.plan(1) - - const server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - res.setHeader('x-custom', 'y') - const serialized = serializers.resSerializer(res) - t.is(serialized.headers['x-custom'], 'y') - res.end() - } -}) diff --git a/node_modules/pino/LICENSE b/node_modules/pino/LICENSE deleted file mode 100644 index 5657fb41..00000000 --- a/node_modules/pino/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016-2019 Matteo Collina, David Mark Clements and the Pino contributors - -Pino contributors listed at https://github.com/pinojs/pino#the-team and in -the README file. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/pino/README.md b/node_modules/pino/README.md deleted file mode 100644 index 95e08527..00000000 --- a/node_modules/pino/README.md +++ /dev/null @@ -1,149 +0,0 @@ -![banner](pino-banner.png) - -# pino -[![npm version](https://img.shields.io/npm/v/pino)](https://www.npmjs.com/package/pino) -[![Build Status](https://img.shields.io/github/workflow/status/pinojs/pino/CI)](https://github.com/pinojs/pino/actions) -[![Known Vulnerabilities](https://snyk.io/test/github/pinojs/pino/badge.svg)](https://snyk.io/test/github/pinojs/pino) -[![Coverage Status](https://coveralls.io/repos/github/pinojs/pino/badge.svg?branch=master)](https://coveralls.io/github/pinojs/pino?branch=master) -[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) -[![TypeScript definitions on DefinitelyTyped](https://img.shields.io/badge/DefinitelyTyped-.d.ts-brightgreen.svg?style=flat)](https://definitelytyped.org) - -[Very low overhead](#low-overhead) Node.js logger. - -## Documentation - -* [Benchmarks ⇗](/docs/benchmarks.md) -* [API ⇗](/docs/api.md) -* [Browser API ⇗](/docs/browser.md) -* [Redaction ⇗](/docs/redaction.md) -* [Child Loggers ⇗](/docs/child-loggers.md) -* [Transports ⇗](/docs/transports.md) -* [Web Frameworks ⇗](/docs/web.md) -* [Pretty Printing ⇗](/docs/pretty.md) -* [Asynchronous Logging ⇗](/docs/asynchronous.md) -* [Ecosystem ⇗](/docs/ecosystem.md) -* [Legacy](/docs/legacy.md) -* [Help ⇗](/docs/help.md) -* [Long Term Support Policy ⇗](/docs/lts.md) - -## Install - -``` -$ npm install pino -``` - -## Usage - -```js -const logger = require('pino')() - -logger.info('hello world') - -const child = logger.child({ a: 'property' }) -child.info('hello child!') -``` - -This produces: - -``` -{"level":30,"time":1531171074631,"msg":"hello world","pid":657,"hostname":"Davids-MBP-3.fritz.box"} -{"level":30,"time":1531171082399,"msg":"hello child!","pid":657,"hostname":"Davids-MBP-3.fritz.box","a":"property"} -``` - -For using Pino with a web framework see: - -* [Pino with Fastify](docs/web.md#fastify) -* [Pino with Express](docs/web.md#express) -* [Pino with Hapi](docs/web.md#hapi) -* [Pino with Restify](docs/web.md#restify) -* [Pino with Koa](docs/web.md#koa) -* [Pino with Node core `http`](docs/web.md#http) -* [Pino with Nest](docs/web.md#nest) - - - -## Essentials - -### Development Formatting - -The [`pino-pretty`](https://github.com/pinojs/pino-pretty) module can be used to -format logs during development: - -![pretty demo](pretty-demo.png) - -### Transports & Log Processing - -Due to Node's single-threaded event-loop, it's highly recommended that sending, -alert triggering, reformatting and all forms of log processing -is conducted in a separate process. In Pino parlance we call all log processors -"transports", and recommend that the transports be run as separate -processes, piping the stdout of the application to the stdin of the transport. - -For more details see our [Transports⇗](docs/transports.md) document. - -### Low overhead - -Using minimum resources for logging is very important. Log messages -tend to get added over time and this can lead to a throttling effect -on applications – such as reduced requests per second. - -In many cases, Pino is over 5x faster than alternatives. - -See the [Benchmarks](docs/benchmarks.md) document for comparisons. - - -## The Team - -### Matteo Collina - - - - - - - -### David Mark Clements - - - - - - - -### James Sumners - - - - - - - -### Thomas Watson Steen - - - - - - - -## Contributing - -Pino is an **OPEN Open Source Project**. This means that: - -> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. - -See the [CONTRIBUTING.md](https://github.com/pinojs/pino/blob/master/CONTRIBUTING.md) file for more details. - - -## Acknowledgements - -This project was kindly sponsored by [nearForm](https://nearform.com). - -Logo and identity designed by Cosmic Fox Design: https://www.behance.net/cosmicfox. - -## License - -Licensed under [MIT](./LICENSE). - -[elasticsearch]: https://www.elastic.co/products/elasticsearch -[kibana]: https://www.elastic.co/products/kibana diff --git a/node_modules/pino/bin.js b/node_modules/pino/bin.js deleted file mode 100755 index 939b117b..00000000 --- a/node_modules/pino/bin.js +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env node -console.error( - '`pino` cli has been removed. Use `pino-pretty` cli instead.\n' + - '\nSee: https://github.com/pinojs/pino-pretty' -) -process.exit(1) diff --git a/node_modules/pino/browser.js b/node_modules/pino/browser.js deleted file mode 100644 index 26a2c094..00000000 --- a/node_modules/pino/browser.js +++ /dev/null @@ -1,354 +0,0 @@ -'use strict' - -const format = require('quick-format-unescaped') - -module.exports = pino - -const _console = pfGlobalThisOrFallback().console || {} -const stdSerializers = { - mapHttpRequest: mock, - mapHttpResponse: mock, - wrapRequestSerializer: passthrough, - wrapResponseSerializer: passthrough, - wrapErrorSerializer: passthrough, - req: mock, - res: mock, - err: asErrValue -} - -function shouldSerialize (serialize, serializers) { - if (Array.isArray(serialize)) { - const hasToFilter = serialize.filter(function (k) { - return k !== '!stdSerializers.err' - }) - return hasToFilter - } else if (serialize === true) { - return Object.keys(serializers) - } - - return false -} - -function pino (opts) { - opts = opts || {} - opts.browser = opts.browser || {} - - const transmit = opts.browser.transmit - if (transmit && typeof transmit.send !== 'function') { throw Error('pino: transmit option must have a send function') } - - const proto = opts.browser.write || _console - if (opts.browser.write) opts.browser.asObject = true - const serializers = opts.serializers || {} - const serialize = shouldSerialize(opts.browser.serialize, serializers) - let stdErrSerialize = opts.browser.serialize - - if ( - Array.isArray(opts.browser.serialize) && - opts.browser.serialize.indexOf('!stdSerializers.err') > -1 - ) stdErrSerialize = false - - const levels = ['error', 'fatal', 'warn', 'info', 'debug', 'trace'] - - if (typeof proto === 'function') { - proto.error = proto.fatal = proto.warn = - proto.info = proto.debug = proto.trace = proto - } - if (opts.enabled === false) opts.level = 'silent' - const level = opts.level || 'info' - const logger = Object.create(proto) - if (!logger.log) logger.log = noop - - Object.defineProperty(logger, 'levelVal', { - get: getLevelVal - }) - Object.defineProperty(logger, 'level', { - get: getLevel, - set: setLevel - }) - - const setOpts = { - transmit, - serialize, - asObject: opts.browser.asObject, - levels, - timestamp: getTimeFunction(opts) - } - logger.levels = pino.levels - logger.level = level - - logger.setMaxListeners = logger.getMaxListeners = - logger.emit = logger.addListener = logger.on = - logger.prependListener = logger.once = - logger.prependOnceListener = logger.removeListener = - logger.removeAllListeners = logger.listeners = - logger.listenerCount = logger.eventNames = - logger.write = logger.flush = noop - logger.serializers = serializers - logger._serialize = serialize - logger._stdErrSerialize = stdErrSerialize - logger.child = child - - if (transmit) logger._logEvent = createLogEventShape() - - function getLevelVal () { - return this.level === 'silent' - ? Infinity - : this.levels.values[this.level] - } - - function getLevel () { - return this._level - } - function setLevel (level) { - if (level !== 'silent' && !this.levels.values[level]) { - throw Error('unknown level ' + level) - } - this._level = level - - set(setOpts, logger, 'error', 'log') // <-- must stay first - set(setOpts, logger, 'fatal', 'error') - set(setOpts, logger, 'warn', 'error') - set(setOpts, logger, 'info', 'log') - set(setOpts, logger, 'debug', 'log') - set(setOpts, logger, 'trace', 'log') - } - - function child (bindings) { - if (!bindings) { - throw new Error('missing bindings for child Pino') - } - const bindingsSerializers = bindings.serializers - if (serialize && bindingsSerializers) { - var childSerializers = Object.assign({}, serializers, bindingsSerializers) - var childSerialize = opts.browser.serialize === true - ? Object.keys(childSerializers) - : serialize - delete bindings.serializers - applySerializers([bindings], childSerialize, childSerializers, this._stdErrSerialize) - } - function Child (parent) { - this._childLevel = (parent._childLevel | 0) + 1 - this.error = bind(parent, bindings, 'error') - this.fatal = bind(parent, bindings, 'fatal') - this.warn = bind(parent, bindings, 'warn') - this.info = bind(parent, bindings, 'info') - this.debug = bind(parent, bindings, 'debug') - this.trace = bind(parent, bindings, 'trace') - if (childSerializers) { - this.serializers = childSerializers - this._serialize = childSerialize - } - if (transmit) { - this._logEvent = createLogEventShape( - [].concat(parent._logEvent.bindings, bindings) - ) - } - } - Child.prototype = this - return new Child(this) - } - return logger -} - -pino.levels = { - values: { - fatal: 60, - error: 50, - warn: 40, - info: 30, - debug: 20, - trace: 10 - }, - labels: { - 10: 'trace', - 20: 'debug', - 30: 'info', - 40: 'warn', - 50: 'error', - 60: 'fatal' - } -} - -pino.stdSerializers = stdSerializers -pino.stdTimeFunctions = Object.assign({}, { nullTime, epochTime, unixTime, isoTime }) - -function set (opts, logger, level, fallback) { - const proto = Object.getPrototypeOf(logger) - logger[level] = logger.levelVal > logger.levels.values[level] - ? noop - : (proto[level] ? proto[level] : (_console[level] || _console[fallback] || noop)) - - wrap(opts, logger, level) -} - -function wrap (opts, logger, level) { - if (!opts.transmit && logger[level] === noop) return - - logger[level] = (function (write) { - return function LOG () { - const ts = opts.timestamp() - const args = new Array(arguments.length) - const proto = (Object.getPrototypeOf && Object.getPrototypeOf(this) === _console) ? _console : this - for (var i = 0; i < args.length; i++) args[i] = arguments[i] - - if (opts.serialize && !opts.asObject) { - applySerializers(args, this._serialize, this.serializers, this._stdErrSerialize) - } - if (opts.asObject) write.call(proto, asObject(this, level, args, ts)) - else write.apply(proto, args) - - if (opts.transmit) { - const transmitLevel = opts.transmit.level || logger.level - const transmitValue = pino.levels.values[transmitLevel] - const methodValue = pino.levels.values[level] - if (methodValue < transmitValue) return - transmit(this, { - ts, - methodLevel: level, - methodValue, - transmitLevel, - transmitValue: pino.levels.values[opts.transmit.level || logger.level], - send: opts.transmit.send, - val: logger.levelVal - }, args) - } - } - })(logger[level]) -} - -function asObject (logger, level, args, ts) { - if (logger._serialize) applySerializers(args, logger._serialize, logger.serializers, logger._stdErrSerialize) - const argsCloned = args.slice() - let msg = argsCloned[0] - const o = {} - if (ts) { - o.time = ts - } - o.level = pino.levels.values[level] - let lvl = (logger._childLevel | 0) + 1 - if (lvl < 1) lvl = 1 - // deliberate, catching objects, arrays - if (msg !== null && typeof msg === 'object') { - while (lvl-- && typeof argsCloned[0] === 'object') { - Object.assign(o, argsCloned.shift()) - } - msg = argsCloned.length ? format(argsCloned.shift(), argsCloned) : undefined - } else if (typeof msg === 'string') msg = format(argsCloned.shift(), argsCloned) - if (msg !== undefined) o.msg = msg - return o -} - -function applySerializers (args, serialize, serializers, stdErrSerialize) { - for (const i in args) { - if (stdErrSerialize && args[i] instanceof Error) { - args[i] = pino.stdSerializers.err(args[i]) - } else if (typeof args[i] === 'object' && !Array.isArray(args[i])) { - for (const k in args[i]) { - if (serialize && serialize.indexOf(k) > -1 && k in serializers) { - args[i][k] = serializers[k](args[i][k]) - } - } - } - } -} - -function bind (parent, bindings, level) { - return function () { - const args = new Array(1 + arguments.length) - args[0] = bindings - for (var i = 1; i < args.length; i++) { - args[i] = arguments[i - 1] - } - return parent[level].apply(this, args) - } -} - -function transmit (logger, opts, args) { - const send = opts.send - const ts = opts.ts - const methodLevel = opts.methodLevel - const methodValue = opts.methodValue - const val = opts.val - const bindings = logger._logEvent.bindings - - applySerializers( - args, - logger._serialize || Object.keys(logger.serializers), - logger.serializers, - logger._stdErrSerialize === undefined ? true : logger._stdErrSerialize - ) - logger._logEvent.ts = ts - logger._logEvent.messages = args.filter(function (arg) { - // bindings can only be objects, so reference equality check via indexOf is fine - return bindings.indexOf(arg) === -1 - }) - - logger._logEvent.level.label = methodLevel - logger._logEvent.level.value = methodValue - - send(methodLevel, logger._logEvent, val) - - logger._logEvent = createLogEventShape(bindings) -} - -function createLogEventShape (bindings) { - return { - ts: 0, - messages: [], - bindings: bindings || [], - level: { label: '', value: 0 } - } -} - -function asErrValue (err) { - const obj = { - type: err.constructor.name, - msg: err.message, - stack: err.stack - } - for (const key in err) { - if (obj[key] === undefined) { - obj[key] = err[key] - } - } - return obj -} - -function getTimeFunction (opts) { - if (typeof opts.timestamp === 'function') { - return opts.timestamp - } - if (opts.timestamp === false) { - return nullTime - } - return epochTime -} - -function mock () { return {} } -function passthrough (a) { return a } -function noop () {} - -function nullTime () { return false } -function epochTime () { return Date.now() } -function unixTime () { return Math.round(Date.now() / 1000.0) } -function isoTime () { return new Date(Date.now()).toISOString() } // using Date.now() for testability - -/* eslint-disable */ -/* istanbul ignore next */ -function pfGlobalThisOrFallback () { - function defd (o) { return typeof o !== 'undefined' && o } - try { - if (typeof globalThis !== 'undefined') return globalThis - Object.defineProperty(Object.prototype, 'globalThis', { - get: function () { - delete Object.prototype.globalThis - return (this.globalThis = this) - }, - configurable: true - }) - return globalThis - } catch (e) { - return defd(self) || defd(window) || defd(this) || {} - } -} -/* eslint-enable */ diff --git a/node_modules/pino/docs/api.md b/node_modules/pino/docs/api.md deleted file mode 100644 index 57bb33fa..00000000 --- a/node_modules/pino/docs/api.md +++ /dev/null @@ -1,971 +0,0 @@ -# API - -* [pino() => logger](#export) - * [options](#options) - * [destination](#destination) - * [destination\[Symbol.for('pino.metadata')\]](#metadata) -* [Logger Instance](#logger) - * [logger.trace()](#trace) - * [logger.debug()](#debug) - * [logger.info()](#info) - * [logger.warn()](#warn) - * [logger.error()](#error) - * [logger.fatal()](#fatal) - * [logger.silent()](#silent) - * [logger.child()](#child) - * [logger.bindings()](#bindings) - * [logger.flush()](#flush) - * [logger.level](#logger-level) - * [logger.isLevelEnabled()](#islevelenabled) - * [logger.levels](#levels) - * [logger\[Symbol.for('pino.serializers')\]](#serializers) - * [Event: 'level-change'](#level-change) - * [logger.version](#version) -* [Statics](#statics) - * [pino.destination()](#pino-destination) - * [pino.final()](#pino-final) - * [pino.stdSerializers](#pino-stdserializers) - * [pino.stdTimeFunctions](#pino-stdtimefunctions) - * [pino.symbols](#pino-symbols) - * [pino.version](#pino-version) - - -## `pino([options], [destination]) => logger` - -The exported `pino` function takes two optional arguments, -[`options`](#options) and [`destination`](#destination) and -returns a [logger instance](#logger). - - -### `options` (Object) - -#### `name` (String) - -Default: `undefined` - -The name of the logger. When set adds a `name` field to every JSON line logged. - -#### `level` (String) - -Default: `'info'` - -One of `'fatal'`, `'error'`, `'warn'`, `'info`', `'debug'`, `'trace'` or `'silent'`. - -Additional levels can be added to the instance via the `customLevels` option. - -* See [`customLevels` option](#opt-customlevels) - - -#### `customLevels` (Object) - -Default: `undefined` - -Use this option to define additional logging levels. -The keys of the object correspond the namespace of the log level, -and the values should be the numerical value of the level. - -```js -const logger = pino({ - customLevels: { - foo: 35 - } -}) -logger.foo('hi') -``` - - -#### `useOnlyCustomLevels` (Boolean) - -Default: `false` - -Use this option to only use defined `customLevels` and omit Pino's levels. -Logger's default `level` must be changed to a value in `customLevels` in order to use `useOnlyCustomLevels` -Warning: this option may not be supported by downstream transports. - -```js -const logger = pino({ - customLevels: { - foo: 35 - }, - useOnlyCustomLevels: true, - level: 'foo' -}) -logger.foo('hi') -logger.info('hello') // Will throw an error saying info in not found in logger object -``` - -#### `mixin` (Function): - -Default: `undefined` - -If provided, the `mixin` function is called each time one of the active -logging methods is called. The first and only parameter is the value `mergeObject` or an empty object. The function must synchronously return an -object. The properties of the returned object will be added to the -logged JSON. - -```js -let n = 0 -const logger = pino({ - mixin () { - return { line: ++n } - } -}) -logger.info('hello') -// {"level":30,"time":1573664685466,"pid":78742,"hostname":"x","line":1,"msg":"hello"} -logger.info('world') -// {"level":30,"time":1573664685469,"pid":78742,"hostname":"x","line":2,"msg":"world"} -``` - -The result of `mixin()` is supposed to be a _new_ object. For performance reason, the object returned by `mixin()` will be mutated by pino. -In the following example, passing `mergingObject` argument to the first `info` call will mutate the global `mixin` object: -```js -const mixin = { - appName: 'My app' -} - -const logger = pino({ - mixin() { - return mixin; - } -}) - -logger.info({ - description: 'Ok' -}, 'Message 1') -// {"level":30,"time":1591195061437,"pid":16012,"hostname":"x","appName":"My app","description":"Ok" "msg":"Message 1"} -logger.info('Message 2') -// {"level":30,"time":1591195061437,"pid":16012,"hostname":"x","appName":"My app","description":"Ok","msg":"Message 2"} -// Note: the second log contains "description":"Ok" text, even if it was not provided. -``` - -If the `mixin` feature is being used merely to add static metadata to each log message, -then a [child logger ⇗](/docs/child-loggers.md) should be used instead. - -#### `redact` (Array | Object): - -Default: `undefined` - -As an array, the `redact` option specifies paths that should -have their values redacted from any log output. - -Each path must be a string using a syntax which corresponds to JavaScript dot and bracket notation. - -If an object is supplied, three options can be specified: - * `paths` (array): Required. An array of paths. See [redaction - Path Syntax ⇗](/docs/redaction.md#paths) for specifics. - * `censor` (String|Function|Undefined): Optional. When supplied as a String the `censor` option will overwrite keys which are to be redacted. When set to `undefined` the key will be removed entirely from the object. - The `censor` option may also be a mapping function. The (synchronous) mapping function has the signature `(value, path) => redactedValue` and is called with the unredacted `value` and `path` to the key being redacted, as an array. For example given a redaction path of `a.b.c` the `path` argument would be `['a', 'b', 'c']`. The value returned from the mapping function becomes the applied censor value. Default: `'[Redacted]'` - value synchronously. - Default: `'[Redacted]'` - * `remove` (Boolean): Optional. Instead of censoring the value, remove both the key and the value. Default: `false` - -**WARNING**: Never allow user input to define redacted paths. - -* See the [redaction ⇗](/docs/redaction.md) documentation. -* See [fast-redact#caveat ⇗](https://github.com/davidmarkclements/fast-redact#caveat) - - -#### `hooks` (Object) - -An object mapping to hook functions. Hook functions allow for customizing -internal logger operations. Hook functions ***must*** be synchronous functions. - - -##### `logMethod` - -Allows for manipulating the parameters passed to logger methods. The signature -for this hook is `logMethod (args, method, level) {}`, where `args` is an array -of the arguments that were passed to the log method and `method` is the log -method itself, `level` is the log level itself. This hook ***must*** invoke the -`method` function by using apply, like so: `method.apply(this, newArgumentsArray)`. - -For example, Pino expects a binding object to be the first parameter with an -optional string message as the second parameter. Using this hook the parameters -can be flipped: - -```js -const hooks = { - logMethod (inputArgs, method, level) { - if (inputArgs.length >= 2) { - const arg1 = inputArgs.shift() - const arg2 = inputArgs.shift() - return method.apply(this, [arg2, arg1, ...inputArgs]) - } - return method.apply(this, inputArgs) - } -} -``` - - -#### `formatters` (Object) - -An object containing functions for formatting the shape of the log lines. -These functions should return a JSONifiable object and -should never throw. These functions allow for full customization of -the resulting log lines. For example, they can be used to change -the level key name or to enrich the default metadata. - -##### `level` - -Changes the shape of the log level. The default shape is `{ level: number }`. -The function takes two arguments, the label of the level (e.g. `'info'`) -and the numeric value (e.g. `30`). - -```js -const formatters = { - level (label, number) { - return { level: number } - } -} -``` - -##### `bindings` - -Changes the shape of the bindings. The default shape is `{ pid, hostname }`. -The function takes a single argument, the bindings object. It will -be called every time a child logger is created. - -```js -const formatters = { - bindings (bindings) { - return { pid: bindings.pid, hostname: bindings.hostname } - } -} -``` - -##### `log` - -Changes the shape of the log object. This function will be called every time -one of the log methods (such as `.info`) is called. All arguments passed to the -log method, except the message, will be pass to this function. By default it does -not change the shape of the log object. - -```js -const formatters = { - log (object) { - return object - } -} -``` - - -#### `serializers` (Object) - -Default: `{err: pino.stdSerializers.err}` - -An object containing functions for custom serialization of objects. -These functions should return an JSONifiable object and they -should never throw. When logging an object, each top-level property -matching the exact key of a serializer will be serialized using the defined serializer. - -* See [pino.stdSerializers](#pino-stdserializers) - -##### `serializers[Symbol.for('pino.*')]` (Function) - DEPRECATED - -Use `formatters.log` instead. - -#### `base` (Object) - -Default: `{pid: process.pid, hostname: os.hostname}` - -Key-value object added as child logger to each log line. - -Set to `null` to avoid adding `pid`, `hostname` and `name` properties to each log. - -#### `enabled` (Boolean) - -Default: `true` - -Set to `false` to disable logging. - -#### `crlf` (Boolean) - -Default: `false` - -Set to `true` to logs newline delimited JSON with `\r\n` instead of `\n`. - - -#### `timestamp` (Boolean | Function) - -Default: `true` - -Enables or disables the inclusion of a timestamp in the -log message. If a function is supplied, it must synchronously return a partial JSON string -representation of the time, e.g. `,"time":1493426328206` (which is the default). - -If set to `false`, no timestamp will be included in the output. - -See [stdTimeFunctions](#pino-stdtimefunctions) for a set of available functions -for passing in as a value for this option. - -Example: -```js -timestamp: () => `,"time":"${new Date(Date.now()).toISOString()}"` -// which is equivalent to: -// timestamp: stdTimeFunctions.isoTime -``` - -**Caution**: attempting to format time in-process will significantly impact logging performance. - - -#### `messageKey` (String) - -Default: `'msg'` - -The string key for the 'message' in the JSON object. - - -#### `nestedKey` (String) - -Default: `null` - -If there's a chance that objects being logged have properties that conflict with those from pino itself (`level`, `timestamp`, `pid`, etc) -and duplicate keys in your log records are undesirable, pino can be configured with a `nestedKey` option that causes any `object`s that are logged -to be placed under a key whose name is the value of `nestedKey`. - -This way, when searching something like Kibana for values, one can consistently search under the configured `nestedKey` value instead of the root log record keys. - -For example, -```js -const logger = require('pino')({ - nestedKey: 'payload' -}) - -const thing = { level: 'hi', time: 'never', foo: 'bar'} // has pino-conflicting properties! -logger.info(thing) - -// logs the following: -// {"level":30,"time":1578357790020,"pid":91736,"hostname":"x","payload":{"level":"hi","time":"never","foo":"bar"}} -``` -In this way, logged objects' properties don't conflict with pino's standard logging properties, -and searching for logged objects can start from a consistent path. - - -#### `prettyPrint` (Boolean | Object) - -Default: `false` - -Enables pretty printing log logs. This is intended for non-production -configurations. This may be set to a configuration object as outlined in the -[`pino-pretty` documentation](https://github.com/pinojs/pino-pretty). - -The options object may additionally contain a `prettifier` property to define -which prettifier module to use. When not present, `prettifier` defaults to -`'pino-pretty'`. Regardless of the value, the specified prettifier module -must be installed as a separate dependency: - -```sh -npm install pino-pretty -``` - - -#### `useLevelLabels` (Boolean) - DEPRECATED - -Use `formatters.level` instead. This will be removed in v7. - - -#### `changeLevelName` (String) - DEPRECATED -Use `formatters.level` instead. This will be removed in v7. - - -#### `levelKey` (String) - DEPRECATED - -Use `formatters.level` instead. This will be removed in v7. - -#### `browser` (Object) - -Browser only, may have `asObject` and `write` keys. This option is separately -documented in the [Browser API ⇗](/docs/browser.md) documentation. - -* See [Browser API ⇗](/docs/browser.md) - - -### `destination` (SonicBoom | WritableStream | String | Object) - -Default: `pino.destination(1)` (STDOUT) - -The `destination` parameter, at a minimum must be an object with a `write` method. -An ordinary Node.js `stream` can be passed as the destination (such as the result -of `fs.createWriteStream`) but for peak log writing performance it is strongly -recommended to use `pino.destination` to create the destination stream. - -```js -// pino.destination(1) by default -const stdoutLogger = require('pino')() - -// destination param may be in first position when no options: -const fileLogger = require('pino')( pino.destination('/log/path')) - -// use the stderr file handle to log to stderr: -const opts = {name: 'my-logger'} -const stderrLogger = require('pino')(opts, pino.destination(2)) - -// automatic wrapping in pino.destination -const fileLogger = require('pino')('/log/path') - -// Asynchronous logging -const fileLogger = pino(pino.destination({ dest: '/log/path', sync: false })) -``` - -However, there are some special instances where `pino.destination` is not used as the default: - -+ When something, e.g a process manager, has monkey-patched `process.stdout.write`. - -In these cases `process.stdout` is used instead. - -* See [`pino.destination`](#pino-destination) - - -#### `destination[Symbol.for('pino.metadata')]` - -Default: `false` - -Using the global symbol `Symbol.for('pino.metadata')` as a key on the `destination` parameter and -setting the key it to `true`, indicates that the following properties should be -set on the `destination` object after each log line is written: - -* the last logging level as `destination.lastLevel` -* the last logging message as `destination.lastMsg` -* the last logging object as `destination.lastObj` -* the last time as `destination.lastTime`, which will be the partial string returned - by the time function. -* the last logger instance as `destination.lastLogger` (to support child - loggers) - -For a full reference for using `Symbol.for('pino.metadata')`, see the [`pino-multi-stream` ⇗](https://github.com/pinojs/pino-multi-stream) -module. - -The following is a succinct usage example: - -```js -const dest = pino.destination('/dev/null') -dest[Symbol.for('pino.metadata')] = true -const logger = pino(dest) -logger.info({a: 1}, 'hi') -const { lastMsg, lastLevel, lastObj, lastTime} = dest -console.log( - 'Logged message "%s" at level %d with object %o at time %s', - lastMsg, lastLevel, lastObj, lastTime -) // Logged message "hi" at level 30 with object { a: 1 } at time 1531590545089 -``` - -* See [`pino-multi-stream` ⇗](https://github.com/pinojs/pino-multi-stream) - - -## Logger Instance - -The logger instance is the object returned by the main exported -[`pino`](#export) function. - -The primary purpose of the logger instance is to provide logging methods. - -The default logging methods are `trace`, `debug`, `info`, `warn`, `error`, and `fatal`. - -Each logging method has the following signature: -`([mergingObject], [message], [...interpolationValues])`. - -The parameters are explained below using the `logger.info` method but the same applies to all logging methods. - -### Logging Method Parameters - - -#### `mergingObject` (Object) - -An object can optionally be supplied as the first parameter. Each enumerable key and value -of the `mergingObject` is copied in to the JSON log line. - -```js -logger.info({MIX: {IN: true}}) -// {"level":30,"time":1531254555820,"pid":55956,"hostname":"x","MIX":{"IN":true}} -``` - - -#### `message` (String) - -A `message` string can optionally be supplied as the first parameter, or -as the second parameter after supplying a `mergingObject`. - -By default, the contents of the `message` parameter will be merged into the -JSON log line under the `msg` key: - -```js -logger.info('hello world') -// {"level":30,"time":1531257112193,"msg":"hello world","pid":55956,"hostname":"x"} -``` - -The `message` parameter takes precedence over the `mergedObject`. -That is, if a `mergedObject` contains a `msg` property, and a `message` parameter -is supplied in addition, the `msg` property in the output log will be the value of -the `message` parameter not the value of the `msg` property on the `mergedObject`. -See [Avoid Message Conflict](/docs/help.md#avoid-message-conflict) for information -on how to overcome this limitation. - -The `messageKey` option can be used at instantiation time to change the namespace -from `msg` to another string as preferred. - -The `message` string may contain a printf style string with support for -the following placeholders: - -* `%s` – string placeholder -* `%d` – digit placeholder -* `%O`, `%o` and `%j` – object placeholder - -Values supplied as additional arguments to the logger method will -then be interpolated accordingly. - -* See [`messageKey` pino option](#opt-messagekey) -* See [`...interpolationValues` log method parameter](#interpolationvalues) - - -#### `...interpolationValues` (Any) - -All arguments supplied after `message` are serialized and interpolated according -to any supplied printf-style placeholders (`%s`, `%d`, `%o`|`%O`|`%j`) to form -the final output `msg` value for the JSON log line. - -```js -logger.info('%o hello %s', {worldly: 1}, 'world') -// {"level":30,"time":1531257826880,"msg":"{\"worldly\":1} hello world","pid":55956,"hostname":"x"} -``` - -Since pino v6, we do not automatically concatenate and cast to string -consecutive parameters: - -```js -logger.info('hello', 'world') -// {"level":30,"time":1531257618044,"msg":"hello","pid":55956,"hostname":"x"} -// world is missing -``` - -However, it's possible to inject a hook to modify this behavior: - -```js -const pinoOptions = { - hooks: { logMethod } -} - -function logMethod (args, method) { - if (args.length === 2) { - args[0] = `${args[0]} %j` - } - method.apply(this, args) -} - -const logger = pino(pinoOptions) -``` - -* See [`message` log method parameter](#message) -* See [`logMethod` hook](#logmethod) - - -#### Errors - -Errors can be supplied as either the first parameter or if already using `mergingObject` then as the `err` property on the `mergingObject`. - -> ## Note -> This section describes the default configuration. The error serializer can be -> mapped to a different key using the [`serializers`](#opt-serializers) option. -```js -logger.info(new Error("test")) -// {"level":30,"time":1531257618044,"msg":"test","stack":"...","type":"Error","pid":55956,"hostname":"x"} - -logger.info({ err: new Error("test"), otherkey: 123 }, "some text") -// {"level":30,"time":1531257618044,"err":{"msg": "test", "stack":"...","type":"Error"},"msg":"some text","pid":55956,"hostname":"x","otherkey":123} -``` - - -### `logger.trace([mergingObject], [message], [...interpolationValues])` - -Write a `'trace'` level log, if the configured [`level`](#level) allows for it. - -* See [`mergingObject` log method parameter](#mergingobject) -* See [`message` log method parameter](#message) -* See [`...interpolationValues` log method parameter](#interpolationvalues) - - -### `logger.debug([mergingObject], [message], [...interpolationValues])` - -Write a `'debug'` level log, if the configured `level` allows for it. - -* See [`mergingObject` log method parameter](#mergingobject) -* See [`message` log method parameter](#message) -* See [`...interpolationValues` log method parameter](#interpolationvalues) - - -### `logger.info([mergingObject], [message], [...interpolationValues])` - -Write an `'info'` level log, if the configured `level` allows for it. - -* See [`mergingObject` log method parameter](#mergingobject) -* See [`message` log method parameter](#message) -* See [`...interpolationValues` log method parameter](#interpolationvalues) - - -### `logger.warn([mergingObject], [message], [...interpolationValues])` - -Write a `'warn'` level log, if the configured `level` allows for it. - -* See [`mergingObject` log method parameter](#mergingobject) -* See [`message` log method parameter](#message) -* See [`...interpolationValues` log method parameter](#interpolationvalues) - - -### `logger.error([mergingObject], [message], [...interpolationValues])` - -Write a `'error'` level log, if the configured `level` allows for it. - -* See [`mergingObject` log method parameter](#mergingobject) -* See [`message` log method parameter](#message) -* See [`...interpolationValues` log method parameter](#interpolationvalues) - - -### `logger.fatal([mergingObject], [message], [...interpolationValues])` - -Write a `'fatal'` level log, if the configured `level` allows for it. - -Since `'fatal'` level messages are intended to be logged just prior to the process exiting the `fatal` -method will always sync flush the destination. -Therefore it's important not to misuse `fatal` since -it will cause performance overhead if used for any -other purpose than writing final log messages before -the process crashes or exits. - -* See [`mergingObject` log method parameter](#mergingobject) -* See [`message` log method parameter](#message) -* See [`...interpolationValues` log method parameter](#interpolationvalues) - - -### `logger.silent()` - -Noop function. - - -### `logger.child(bindings) => logger` - -The `logger.child` method allows for the creation of stateful loggers, -where key-value pairs can be pinned to a logger causing them to be output -on every log line. - -Child loggers use the same output stream as the parent and inherit -the current log level of the parent at the time they are spawned. - -The log level of a child is mutable. It can be set independently -of the parent either by setting the [`level`](#level) accessor after creating -the child logger or using the reserved [`bindings.level`](#bindingslevel-string) key. - -#### `bindings` (Object) - -An object of key-value pairs to include in every log line output -via the returned child logger. - -```js -const child = logger.child({ MIX: {IN: 'always'} }) -child.info('hello') -// {"level":30,"time":1531258616689,"msg":"hello","pid":64849,"hostname":"x","MIX":{"IN":"always"}} -child.info('child!') -// {"level":30,"time":1531258617401,"msg":"child!","pid":64849,"hostname":"x","MIX":{"IN":"always"}} -``` - -The `bindings` object may contain any key except for reserved configuration keys `level` and `serializers`. - -##### `bindings.level` (String) - -If a `level` property is present in the `bindings` object passed to `logger.child` -it will override the child logger level. - -```js -const logger = pino() -logger.debug('nope') // will not log, since default level is info -const child = logger.child({foo: 'bar', level: 'debug'}) -child.debug('debug!') // will log as the `level` property set the level to debug -``` - -##### `bindings.serializers` (Object) - -Child loggers inherit the [serializers](#opt-serializers) from the parent logger. - -Setting the `serializers` key of the `bindings` object will override -any configured parent serializers. - -```js -const logger = require('pino')() -logger.info({test: 'will appear'}) -// {"level":30,"time":1531259759482,"pid":67930,"hostname":"x","test":"will appear"} -const child = logger.child({serializers: {test: () => `child-only serializer`}}) -child.info({test: 'will be overwritten'}) -// {"level":30,"time":1531259784008,"pid":67930,"hostname":"x","test":"child-only serializer"} -``` - -* See [`serializers` option](#opt-serializers) -* See [pino.stdSerializers](#pino-stdSerializers) - - -### `logger.bindings()` - -Returns an object containing all the current bindings, cloned from the ones passed in via `logger.child()`. -```js -const child = logger.child({ foo: 'bar' }) -console.log(child.bindings()) -// { foo: 'bar' } -const anotherChild = child.child({ MIX: { IN: 'always' } }) -console.log(anotherChild.bindings()) -// { foo: 'bar', MIX: { IN: 'always' } } -``` - - -### `logger.flush()` - -Flushes the content of the buffer when using `pino.destination({ -sync: false })`. - -This is an asynchronous, fire and forget, operation. - -The use case is primarily for asynchronous logging, which may buffer -log lines while others are being written. The `logger.flush` method can be -used to flush the logs -on a long interval, say ten seconds. Such a strategy can provide an -optimum balance between extremely efficient logging at high demand periods -and safer logging at low demand periods. - -* See [`destination` parameter](#destination) -* See [Asynchronous Logging ⇗](/docs/asynchronous.md) - - -### `logger.level` (String) [Getter/Setter] - -Set this property to the desired logging level. - -The core levels and their values are as follows: - -| | | | | | | | | -|:-----------|-------|-------|------|------|-------|-------|---------:| -| **Level:** | trace | debug | info | warn | error | fatal | silent | -| **Value:** | 10 | 20 | 30 | 40 | 50 | 60 | Infinity | - -The logging level is a *minimum* level based on the associated value of that level. - -For instance if `logger.level` is `info` *(30)* then `info` *(30)*, `warn` *(40)*, `error` *(50)* and `fatal` *(60)* log methods will be enabled but the `trace` *(10)* and `debug` *(20)* methods, being less than 30, will not. - -The `silent` logging level is a specialized level which will disable all logging, -the `silent` log method is a noop function. - - -### `logger.isLevelEnabled(level)` - -A utility method for determining if a given log level will write to the destination. - -#### `level` (String) - -The given level to check against: - -```js -if (logger.isLevelEnabled('debug')) logger.debug('conditional log') -``` - -#### `levelLabel` (String) - -Defines the method name of the new level. - -* See [`logger.level`](#level) - -#### `levelValue` (Number) - -Defines the associated minimum threshold value for the level, and -therefore where it sits in order of priority among other levels. - -* See [`logger.level`](#level) - - -### `logger.levelVal` (Number) - -Supplies the integer value for the current logging level. - -```js -if (logger.levelVal === 30) { - console.log('logger level is `info`') -} -``` - - -### `logger.levels` (Object) - -Levels are mapped to values to determine the minimum threshold that a -logging method should be enabled at (see [`logger.level`](#level)). - -The `logger.levels` property holds the mappings between levels and values, -and vice versa. - -```sh -$ node -p "require('pino')().levels" -``` - -```js -{ labels: - { '10': 'trace', - '20': 'debug', - '30': 'info', - '40': 'warn', - '50': 'error', - '60': 'fatal' }, - values: - { fatal: 60, error: 50, warn: 40, info: 30, debug: 20, trace: 10 } } -``` - -* See [`logger.level`](#level) - - -### logger\[Symbol.for('pino.serializers')\] - -Returns the serializers as applied to the current logger instance. If a child logger did not -register it's own serializer upon instantiation the serializers of the parent will be returned. - - -### Event: 'level-change' - -The logger instance is also an [`EventEmitter ⇗`](https://nodejs.org/dist/latest/docs/api/events.html#events_class_eventemitter) - -A listener function can be attached to a logger via the `level-change` event - -The listener is passed four arguments: - -* `levelLabel` – the new level string, e.g `trace` -* `levelValue` – the new level number, e.g `10` -* `previousLevelLabel` – the prior level string, e.g `info` -* `previousLevelValue` – the prior level numbebr, e.g `30` - -```js -const logger = require('pino')() -logger.on('level-change', (lvl, val, prevLvl, prevVal) => { - console.log('%s (%d) was changed to %s (%d)', prevLvl, prevVal, lvl, val) -}) -logger.level = 'trace' // trigger event -``` - - -### `logger.version` (String) - -Exposes the Pino package version. Also available on the exported `pino` function. - -* See [`pino.version`](#pino-version) - -## Statics - - -### `pino.destination([opts]) => SonicBoom` - -Create a Pino Destination instance: a stream-like object with -significantly more throughput (over 30%) than a standard Node.js stream. - -```js -const pino = require('pino') -const logger = pino(pino.destination('./my-file')) -const logger2 = pino(pino.destination()) -const logger3 = pino(pino.destination({ - dest: './my-file', - minLength: 4096, // Buffer before writing - sync: false // Asynchronous logging -})) -``` - -The `pino.destination` method may be passed a file path or a numerical file descriptor. -By default, `pino.destination` will use `process.stdout.fd` (1) as the file descriptor. - -`pino.destination` is implemented on [`sonic-boom` ⇗](https://github.com/mcollina/sonic-boom). - -A `pino.destination` instance can also be used to reopen closed files -(for example, for some log rotation scenarios), see [Reopening log files](/docs/help.md#reopening). - -* See [`destination` parameter](#destination) -* See [`sonic-boom` ⇗](https://github.com/mcollina/sonic-boom) -* See [Reopening log files](/docs/help.md#reopening) -* See [Asynchronous Logging ⇗](/docs/asynchronous.md) - - - -### `pino.final(logger, [handler]) => Function | FinalLogger` - -The `pino.final` method can be used to acquire a final logger instance -or create an exit listener function. - -The `finalLogger` is a specialist logger that synchronously flushes -on every write. This is important to guarantee final log writes, -when using `pino.destination({ sync: false })` target. - -Since final log writes cannot be guaranteed with normal Node.js streams, -if the `destination` parameter of the `logger` supplied to `pino.final` -is a Node.js stream `pino.final` will throw. - -The use of `pino.final` with `pino.destination` is not needed, as -`pino.destination` writes things synchronously. - -#### `pino.final(logger, handler) => Function` - -In this case the `pino.final` method supplies an exit listener function that can be -supplied to process exit events such as `exit`, `uncaughtException`, -`SIGHUP` and so on. - -The exit listener function will call the supplied `handler` function -with an error object (or else `null`), a `finalLogger` instance followed -by any additional arguments the `handler` may be called with. - -```js -process.on('uncaughtException', pino.final(logger, (err, finalLogger) => { - finalLogger.error(err, 'uncaughtException') - process.exit(1) -})) -``` - -#### `pino.final(logger) => FinalLogger` - -In this case the `pino.final` method returns a finalLogger instance. - -```js -var finalLogger = pino.final(logger) -finalLogger.info('exiting...') -``` - -* See [`destination` parameter](#destination) -* See [Exit logging help](/docs/help.md#exit-logging) -* See [Asynchronous logging ⇗](/docs/asynchronous.md) -* See [Log loss prevention ⇗](/docs/asynchronous.md#log-loss-prevention) - - -### `pino.stdSerializers` (Object) - -The `pino.stdSerializers` object provides functions for serializing objects common to many projects. The standard serializers are directly imported from [pino-std-serializers](https://github.com/pinojs/pino-std-serializers). - -* See [pino-std-serializers ⇗](https://github.com/pinojs/pino-std-serializers) - - -### `pino.stdTimeFunctions` (Object) - -The [`timestamp`](#opt-timestamp) option can accept a function which determines the -`timestamp` value in a log line. - -The `pino.stdTimeFunctions` object provides a very small set of common functions for generating the -`timestamp` property. These consist of the following - -* `pino.stdTimeFunctions.epochTime`: Milliseconds since Unix epoch (Default) -* `pino.stdTimeFunctions.unixTime`: Seconds since Unix epoch -* `pino.stdTimeFunctions.nullTime`: Clears timestamp property (Used when `timestamp: false`) -* `pino.stdTimeFunctions.isoTime`: ISO 8601-formatted time in UTC - -* See [`timestamp` option](#opt-timestamp) - - -### `pino.symbols` (Object) - -For integration purposes with ecosystem and third party libraries `pino.symbols` -exposes the symbols used to hold non-public state and methods on the logger instance. - -Access to the symbols allows logger state to be adjusted, and methods to be overridden or -proxied for performant integration where necessary. - -The `pino.symbols` object is intended for library implementers and shouldn't be utilized -for general use. - - -### `pino.version` (String) - -Exposes the Pino package version. Also available on the logger instance. - -* See [`logger.version`](#version) diff --git a/node_modules/pino/docs/asynchronous.md b/node_modules/pino/docs/asynchronous.md deleted file mode 100644 index fd6d935e..00000000 --- a/node_modules/pino/docs/asynchronous.md +++ /dev/null @@ -1,108 +0,0 @@ -# Asynchronous Logging - -In essence, asynchronous logging enables even faster performance by Pino. - -In Pino's standard mode of operation log messages are directly written to the -output stream as the messages are generated with a _blocking_ operation. -Asynchronous logging works by buffering -log messages and writing them in larger chunks. - -```js -const pino = require('pino') -const logger = pino(pino.destination({ - dest: './my-file', // omit for stdout - minLength: 4096, // Buffer before writing - sync: false // Asynchronous logging -})) -``` - -* See [`pino.destination`](/docs/api.md#pino-destination) -* `pino.destination` is implemented on [`sonic-boom` ⇗](https://github.com/mcollina/sonic-boom). - -## Caveats - -This has a couple of important caveats: - -* 4KB of spare RAM will be needed for logging -* As opposed to the default mode, there is not a one-to-one relationship between - calls to logging methods (e.g. `logger.info`) and writes to a log file -* There is a possibility of the most recently buffered log messages being lost - (up to 4KB of logs) - * For instance, a power cut will mean up to 4KB of buffered logs will be lost - -So in summary, use asynchronous logging only when performing an extreme amount of -logging, and it is acceptable to potentially lose the most recent logs. - -* Pino will register handlers for the following process events/signals so that - Pino can flush the asynchronous logger buffer: - - + `beforeExit` - + `exit` - + `uncaughtException` - + `SIGHUP` - + `SIGINT` - + `SIGQUIT` - + `SIGTERM` - - In all of these cases, except `SIGHUP`, the process is in a state that it - *must* terminate. Thus, if an `onTerminated` function isn't registered when - constructing a Pino instance (see [pino#constructor](api.md#constructor)), - then Pino will invoke `process.exit(0)` when no error has occurred, or - `process.exit(1)` otherwise. If an `onTerminated` function is supplied, it - is the responsibility of the `onTerminated` function to manually exit the process. - - In the case of `SIGHUP`, we will look to see if any other handlers are - registered for the event. If not, we will proceed as we do with all other - signals. If there are more handlers registered than just our own, we will - simply flush the asynchronous logging buffer. - -### AWS Lambda - -On AWS Lambda we recommend to call `dest.flushSync()` at the end -of each function execution to avoid losing data. - -## Usage - -The `pino.destination({ sync: false })` method will provide an asynchronous destination. - -```js -const pino = require('pino') -const dest = pino.destination({ sync: false }) // logs to stdout with no args -const logger = pino(dest) -``` - - -## Log loss prevention - -The following strategy can be used to minimize log loss: - -```js -const pino = require('pino') -const dest = pino.destination({ sync: false }) -const logger = pino(dest) - -// asynchronously flush every 10 seconds to keep the buffer empty -// in periods of low activity -setInterval(function () { - logger.flush() -}, 10000).unref() - -// use pino.final to create a special logger that -// guarantees final tick writes -const handler = pino.final(logger, (err, finalLogger, evt) => { - finalLogger.info(`${evt} caught`) - if (err) finalLogger.error(err, 'error caused exit') - process.exit(err ? 1 : 0) -}) -// catch all the ways node might exit -process.on('beforeExit', () => handler(null, 'beforeExit')) -process.on('exit', () => handler(null, 'exit')) -process.on('uncaughtException', (err) => handler(err, 'uncaughtException')) -process.on('SIGINT', () => handler(null, 'SIGINT')) -process.on('SIGQUIT', () => handler(null, 'SIGQUIT')) -process.on('SIGTERM', () => handler(null, 'SIGTERM')) -``` - -* See [`pino.destination` api](/docs/api.md#pino-destination) -* See [`pino.final` api](/docs/api.md#pino-final) -* See [`destination` parameter](/docs/api.md#destination) diff --git a/node_modules/pino/docs/benchmarks.md b/node_modules/pino/docs/benchmarks.md deleted file mode 100644 index 0ba1b2e5..00000000 --- a/node_modules/pino/docs/benchmarks.md +++ /dev/null @@ -1,58 +0,0 @@ -# Benchmarks - -The following values show the time spent to call each function 100000 times. - -`pino.info('hello world')`: - -``` -BASIC benchmark averages -Bunyan average: 662.904ms -Winston average: 564.752ms -Bole average: 301.894ms -Debug average: 361.052ms -LogLevel average: 330.394ms -Pino average: 246.336ms -PinoAsync average: 129.507ms -PinoNodeStream average: 276.479ms -``` - -`pino.info({'hello': 'world'})`: - -``` -OBJECT benchmark averages -BunyanObj average: 678.477ms -WinstonObj average: 563.154ms -BoleObj average: 364.748ms -LogLevelObject average: 627.196ms -PinoObj average: 237.543ms -PinoAsyncObj average: 125.532ms -PinoNodeStreamObj average: 310.614ms -``` - -`pino.info(aBigDeeplyNestedObject)`: - -``` -DEEPOBJECT benchmark averages -BunyanDeepObj average: 1838.970ms -WinstonDeepObj average: 3173.947ms -BoleDeepObj average: 2888.894ms -LogLevelDeepObj average: 7426.592ms -PinoDeepObj average: 3074.177ms -PinoAsyncDeepObj average: 2987.925ms -PinoNodeStreamDeepObj average: 3459.883ms -``` - -`pino.info('hello %s %j %d', 'world', {obj: true}, 4, {another: 'obj'})`: - -``` -BunyanInterpolateExtra average: 971.019ms -WinstonInterpolateExtra average: 535.009ms -BoleInterpolateExtra average: 575.668ms -PinoInterpolateExtra average: 332.099ms -PinoAsyncInterpolateExtra average: 209.552ms -PinoNodeStreamInterpolateExtra average: 413.195ms -``` - -For a fair comparison, [LogLevel](https://npm.im/loglevel) was extended -to include a timestamp and [bole](https://npm.im/bole) had -`fastTime` mode switched on. diff --git a/node_modules/pino/docs/browser.md b/node_modules/pino/docs/browser.md deleted file mode 100644 index cf8a6925..00000000 --- a/node_modules/pino/docs/browser.md +++ /dev/null @@ -1,199 +0,0 @@ -# Browser API - -Pino is compatible with [`browserify`](https://npm.im/browserify) for browser side usage: - -This can be useful with isomorphic/universal JavaScript code. - -By default, in the browser, -`pino` uses corresponding [Log4j](https://en.wikipedia.org/wiki/Log4j) `console` methods (`console.error`, `console.warn`, `console.info`, `console.debug`, `console.trace`) and uses `console.error` for any `fatal` level logs. - -## Options - -Pino can be passed a `browser` object in the options object, -which can have the following properties: - -### `asObject` (Boolean) - -```js -const pino = require('pino')({browser: {asObject: true}}) -``` - -The `asObject` option will create a pino-like log object instead of -passing all arguments to a console method, for instance: - -```js -pino.info('hi') // creates and logs {msg: 'hi', level: 30, time: } -``` - -When `write` is set, `asObject` will always be `true`. - -### `write` (Function | Object) - -Instead of passing log messages to `console.log` they can be passed to -a supplied function. - -If `write` is set to a single function, all logging objects are passed -to this function. - -```js -const pino = require('pino')({ - browser: { - write: (o) => { - // do something with o - } - } -}) -``` - -If `write` is an object, it can have methods that correspond to the -levels. When a message is logged at a given level, the corresponding -method is called. If a method isn't present, the logging falls back -to using the `console`. - - -```js -const pino = require('pino')({ - browser: { - write: { - info: function (o) { - //process info log object - }, - error: function (o) { - //process error log object - } - } - } -}) -``` - -### `serialize`: (Boolean | Array) - -The serializers provided to `pino` are ignored by default in the browser, including -the standard serializers provided with Pino. Since the default destination for log -messages is the console, values such as `Error` objects are enhanced for inspection, -which they otherwise wouldn't be if the Error serializer was enabled. - -We can turn all serializers on, - -```js -const pino = require('pino')({ - browser: { - serialize: true - } -}) -``` - -Or we can selectively enable them via an array: - -```js -const pino = require('pino')({ - serializers: { - custom: myCustomSerializer, - another: anotherSerializer - }, - browser: { - serialize: ['custom'] - } -}) -// following will apply myCustomSerializer to the custom property, -// but will not apply anotherSerializer to another key -pino.info({custom: 'a', another: 'b'}) -``` - -When `serialize` is `true` the standard error serializer is also enabled (see https://github.com/pinojs/pino/blob/master/docs/api.md#stdSerializers). -This is a global serializer which will apply to any `Error` objects passed to the logger methods. - -If `serialize` is an array the standard error serializer is also automatically enabled, it can -be explicitly disabled by including a string in the serialize array: `!stdSerializers.err`, like so: - -```js -const pino = require('pino')({ - serializers: { - custom: myCustomSerializer, - another: anotherSerializer - }, - browser: { - serialize: ['!stdSerializers.err', 'custom'] //will not serialize Errors, will serialize `custom` keys - } -}) -``` - -The `serialize` array also applies to any child logger serializers (see https://github.com/pinojs/pino/blob/master/docs/api.md#discussion-2 -for how to set child-bound serializers). - -Unlike server pino the serializers apply to every object passed to the logger method, -if the `asObject` option is `true`, this results in the serializers applying to the -first object (as in server pino). - -For more info on serializers see https://github.com/pinojs/pino/blob/master/docs/api.md#parameters. - -### `transmit` (Object) - -An object with `send` and `level` properties. - -The `transmit.level` property specifies the minimum level (inclusive) of when the `send` function -should be called, if not supplied the `send` function be called based on the main logging `level` -(set via `options.level`, defaulting to `info`). - -The `transmit` object must have a `send` function which will be called after -writing the log message. The `send` function is passed the level of the log -message and a `logEvent` object. - -The `logEvent` object is a data structure representing a log message, it represents -the arguments passed to a logger statement, the level -at which they were logged and the hierarchy of child bindings. - -The `logEvent` format is structured like so: - -```js -{ - ts = Number, - messages = Array, - bindings = Array, - level: { label = String, value = Number} -} -``` - -The `ts` property is a unix epoch timestamp in milliseconds, the time is taken from the moment the -logger method is called. - -The `messages` array is all arguments passed to logger method, (for instance `logger.info('a', 'b', 'c')` -would result in `messages` array `['a', 'b', 'c']`). - -The `bindings` array represents each child logger (if any), and the relevant bindings. -For instance given `logger.child({a: 1}).child({b: 2}).info({c: 3})`, the bindings array -would hold `[{a: 1}, {b: 2}]` and the `messages` array would be `[{c: 3}]`. The `bindings` -are ordered according to their position in the child logger hierarchy, with the lowest index -being the top of the hierarchy. - -By default serializers are not applied to log output in the browser, but they will *always* be -applied to `messages` and `bindings` in the `logEvent` object. This allows us to ensure a consistent -format for all values between server and client. - -The `level` holds the label (for instance `info`), and the corresponding numerical value -(for instance `30`). This could be important in cases where client side level values and -labels differ from server side. - -The point of the `send` function is to remotely record log messages: - -```js -const pino = require('pino')({ - browser: { - transmit: { - level: 'warn', - send: function (level, logEvent) { - if (level === 'warn') { - // maybe send the logEvent to a separate endpoint - // or maybe analyse the messages further before sending - } - // we could also use the `logEvent.level.value` property to determine - // numerical value - if (logEvent.level.value >= 50) { // covers error and fatal - - // send the logEvent somewhere - } - } - } - } -}) -``` diff --git a/node_modules/pino/docs/child-loggers.md b/node_modules/pino/docs/child-loggers.md deleted file mode 100644 index de9163f0..00000000 --- a/node_modules/pino/docs/child-loggers.md +++ /dev/null @@ -1,95 +0,0 @@ -# Child loggers - -Let's assume we want to have `"module":"foo"` added to every log within a -module `foo.js`. - -To accomplish this, simply use a child logger: - -```js -'use strict' -// imports a pino logger instance of `require('pino')()` -const parentLogger = require('./lib/logger') -const log = parentLogger.child({module: 'foo'}) - -function doSomething () { - log.info('doSomething invoked') -} - -module.exports = { - doSomething -} -``` - -## Cost of child logging - -Child logger creation is fast: - -``` -benchBunyanCreation*10000: 564.514ms -benchBoleCreation*10000: 283.276ms -benchPinoCreation*10000: 258.745ms -benchPinoExtremeCreation*10000: 150.506ms -``` - -Logging through a child logger has little performance penalty: - -``` -benchBunyanChild*10000: 556.275ms -benchBoleChild*10000: 288.124ms -benchPinoChild*10000: 231.695ms -benchPinoExtremeChild*10000: 122.117ms -``` - -Logging via the child logger of a child logger also has negligible overhead: - -``` -benchBunyanChildChild*10000: 559.082ms -benchPinoChildChild*10000: 229.264ms -benchPinoExtremeChildChild*10000: 127.753ms -``` - -## Duplicate keys caveat - -It's possible for naming conflicts to arise between child loggers and -children of child loggers. - -This isn't as bad as it sounds, even if the same keys between -parent and child loggers are used, Pino resolves the conflict in the sanest way. - -For example, consider the following: - -```js -const pino = require('pino') -pino(pino.destination('./my-log')) - .child({a: 'property'}) - .child({a: 'prop'}) - .info('howdy') -``` - -```sh -$ cat my-log -{"pid":95469,"hostname":"MacBook-Pro-3.home","level":30,"msg":"howdy","time":1459534114473,"a":"property","a":"prop"} -``` - -Notice how there's two key's named `a` in the JSON output. The sub-childs properties -appear after the parent child properties. - -At some point the logs will most likely be processed (for instance with a [transport](transports.md)), -and this generally involves parsing. `JSON.parse` will return an object where the conflicting -namespace holds the final value assigned to it: - -```sh -$ cat my-log | node -e "process.stdin.once('data', (line) => console.log(JSON.stringify(JSON.parse(line))))" -{"pid":95469,"hostname":"MacBook-Pro-3.home","level":30,"msg":"howdy","time":"2016-04-01T18:08:34.473Z","a":"prop"} -``` - -Ultimately the conflict is resolved by taking the last value, which aligns with Bunyans child logging -behavior. - -There may be cases where this edge case becomes problematic if a JSON parser with alternative behavior -is used to process the logs. It's recommended to be conscious of namespace conflicts with child loggers, -in light of an expected log processing approach. - -One of Pino's performance tricks is to avoid building objects and stringifying -them, so we're building strings instead. This is why duplicate keys between -parents and children will end up in log output. diff --git a/node_modules/pino/docs/ecosystem.md b/node_modules/pino/docs/ecosystem.md deleted file mode 100644 index 77b35462..00000000 --- a/node_modules/pino/docs/ecosystem.md +++ /dev/null @@ -1,73 +0,0 @@ -# Pino Ecosystem - -This is a list of ecosystem modules that integrate with `pino`. - -Modules listed under [Core](#core) are maintained by the Pino team. Modules -listed under [Community](#community) are maintained by independent community -members. - -Please send a PR to add new modules! - - -## Core - -+ [`express-pino-logger`](https://github.com/pinojs/express-pino-logger): use -Pino to log requests within [express](https://expressjs.com/). -+ [`koa-pino-logger`](https://github.com/pinojs/koa-pino-logger): use Pino to -log requests within [Koa](https://koajs.com/). -+ [`pino-arborsculpture`](https://github.com/pinojs/pino-arborsculpture): change -log levels at runtime. -+ [`pino-caller`](https://github.com/pinojs/pino-caller): add callsite to the log line. -+ [`pino-clf`](https://github.com/pinojs/pino-clf): reformat Pino logs into -Common Log Format. -+ [`pino-debug`](https://github.com/pinojs/pino-debug): use Pino to interpret -[`debug`](https://npm.im/debug) logs. -+ [`pino-elasticsearch`](https://github.com/pinojs/pino-elasticsearch): send -Pino logs to an Elasticsearch instance. -+ [`pino-eventhub`](https://github.com/pinojs/pino-eventhub): send Pino logs -to an [Event Hub](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-what-is-event-hubs). -+ [`pino-filter`](https://github.com/pinojs/pino-filter): filter Pino logs in -the same fashion as the [`debug`](https://npm.im/debug) module. -+ [`pino-gelf`](https://github.com/pinojs/pino-gelf): reformat Pino logs into -GELF format for Graylog. -+ [`pino-hapi`](https://github.com/pinojs/hapi-pino): use Pino as the logger -for [Hapi](https://hapijs.com/). -+ [`pino-http`](https://github.com/pinojs/pino-http): easily use Pino to log -requests with the core `http` module. -+ [`pino-http-print`](https://github.com/pinojs/pino-http-print): reformat Pino -logs into traditional [HTTPD](https://httpd.apache.org/) style request logs. -+ [`pino-multi-stream`](https://github.com/pinojs/pino-multi-stream): send -logs to multiple destination streams (slow!). -+ [`pino-mongodb`](https://github.com/pinojs/pino-mongodb): store Pino logs -in a MongoDB database. -+ [`pino-noir`](https://github.com/pinojs/pino-noir): redact sensitive information -in logs. -+ [`pino-pretty`](https://github.com/pinojs/pino-pretty): basic prettifier to -make log lines human readable. -+ [`pino-socket`](https://github.com/pinojs/pino-socket): send logs to TCP or UDP -destinations. -+ [`pino-std-serializers`](https://github.com/pinojs/pino-std-serializers): the -core object serializers used within Pino. -+ [`pino-syslog`](https://github.com/pinojs/pino-syslog): reformat Pino logs -to standard syslog format. -+ [`pino-tee`](https://github.com/pinojs/pino-tee): pipe Pino logs into files -based upon log levels. -+ [`pino-toke`](https://github.com/pinojs/pino-toke): reformat Pino logs -according to a given format string. -+ [`restify-pino-logger`](https://github.com/pinojs/restify-pino-logger): use -Pino to log requests within [restify](http://restify.com/). -+ [`rill-pino-logger`](https://github.com/pinojs/rill-pino-logger): use Pino as -the logger for the [Rill framework](https://rill.site/). - - -## Community - -+ [`pino-colada`](https://github.com/lrlna/pino-colada): cute ndjson formatter for pino. -+ [`pino-fluentd`](https://github.com/davidedantonio/pino-fluentd): send Pino logs to Elasticsearch, -MongoDB and many [others](https://www.fluentd.org/dataoutputs) via Fluentd. -+ [`pino-pretty-min`](https://github.com/unjello/pino-pretty-min): a minimal -prettifier inspired by the [logrus](https://github.com/sirupsen/logrus) logger. -+ [`pino-rotating-file`](https://github.com/homeaway/pino-rotating-file): a hapi-pino log transport for splitting logs into separate, automatically rotating files. -+ [`cls-proxify`](https://github.com/keenondrums/cls-proxify): integration of pino and [CLS](https://github.com/jeff-lewis/cls-hooked). Useful for creating dynamically configured child loggers (e.g. with added trace ID) for each request. -+ [`pino-tiny`](https://github.com/holmok/pino-tiny): a tiny (and exentsible?) little log formatter for pino. -+ [`pino-dev`](https://github.com/dnjstrom/pino-dev): simple prettifier for pino with built-in support for common ecosystem packages. diff --git a/node_modules/pino/docs/help.md b/node_modules/pino/docs/help.md deleted file mode 100644 index 2957b520..00000000 --- a/node_modules/pino/docs/help.md +++ /dev/null @@ -1,316 +0,0 @@ -# Help - -* [Exit logging](#exit-logging) -* [Log rotation](#rotate) -* [Reopening log files](#reopening) -* [Saving to multiple files](#multiple) -* [Log filtering](#filter-logs) -* [Transports and systemd](#transport-systemd) -* [Log to different streams](#multi-stream) -* [Duplicate keys](#dupe-keys) -* [Log levels as labels instead of numbers](#level-string) -* [Pino with `debug`](#debug) -* [Unicode and Windows terminal](#windows) -* [Mapping Pino Log Levels to Google Cloud Logging (Stackdriver) Serverity Levels](#stackdriver) -* [Avoid Message Conflict](#avoid-message-conflict) - - -## Exit logging - -When a Node process crashes from uncaught exception, exits due to a signal, -or exits of it's own accord we may want to write some final logs – particularly -in cases of error. - -Writing to a Node.js stream on exit is not necessarily guaranteed, and naively writing -to an asynchronous logger on exit will definitely lead to lost logs. - -To write logs in an exit handler, create the handler with [`pino.final`](/docs/api.md#pino-final): - -```js -process.on('uncaughtException', pino.final(logger, (err, finalLogger) => { - finalLogger.error(err, 'uncaughtException') - process.exit(1) -})) - -process.on('unhandledRejection', pino.final(logger, (err, finalLogger) => { - finalLogger.error(err, 'unhandledRejection') - process.exit(1) -})) -``` - -The `finalLogger` is a special logger instance that will synchronously and reliably -flush every log line. This is important in exit handlers, since no more asynchronous -activity may be scheduled. - - -## Log rotation - -Use a separate tool for log rotation: -We recommend [logrotate](https://github.com/logrotate/logrotate). -Consider we output our logs to `/var/log/myapp.log` like so: - -``` -$ node server.js > /var/log/myapp.log -``` - -We would rotate our log files with logrotate, by adding the following to `/etc/logrotate.d/myapp`: - -``` -/var/log/myapp.log { - su root - daily - rotate 7 - delaycompress - compress - notifempty - missingok - copytruncate -} -``` - -The `copytruncate` configuration has a very slight possibility of lost log lines due -to a gap between copying and truncating - the truncate may occur after additional lines -have been written. To perform log rotation without `copytruncate`, see the [Reopening log files](#reopening) -help. - - -## Reopening log files - -In cases where a log rotation tool doesn't offer a copy-truncate capabilities, -or where using them is deemed inappropriate, `pino.destination` -is able to reopen file paths after a file has been moved away. - -One way to use this is to set up a `SIGUSR2` or `SIGHUP` signal handler that -reopens the log file destination, making sure to write the process PID out -somewhere so the log rotation tool knows where to send the signal. - -```js -// write the process pid to a well known location for later -const fs = require('fs') -fs.writeFileSync('/var/run/myapp.pid', process.pid) - -const dest = pino.destination('/log/file') -const logger = require('pino')(dest) -process.on('SIGHUP', () => dest.reopen()) -``` - -The log rotation tool can then be configured to send this signal to the process -after a log rotation event has occurred. - -Given a similar scenario as in the [Log rotation](#rotate) section a basic -`logrotate` config that aligns with this strategy would look similar to the following: - -``` -/var/log/myapp.log { - su root - daily - rotate 7 - delaycompress - compress - notifempty - missingok - postrotate - kill -HUP `cat /var/run/myapp.pid` - endscript -} -``` - - -## Saving to multiple files - -Let's assume we want to store all error messages to a separate log file. - -Install [pino-tee](https://npm.im/pino-tee) with: - -```bash -npm i pino-tee -g -``` - -The following writes the log output of `app.js` to `./all-logs`, while -writing only warnings and errors to `./warn-log: - -```bash -node app.js | pino-tee warn ./warn-logs > ./all-logs -``` - - -## Log Filtering -The Pino philosophy advocates common, pre-existing, system utilities. - -Some recommendations in line with this philosophy are: - -1. Use [`grep`](https://linux.die.net/man/1/grep): - ```sh - $ # View all "INFO" level logs - $ node app.js | grep '"level":30' - ``` -1. Use [`jq`](https://stedolan.github.io/jq/): - ```sh - $ # View all "ERROR" level logs - $ node app.js | jq 'select(.level == 50)' - ``` - - -## Transports and systemd -`systemd` makes it complicated to use pipes in services. One method for overcoming -this challenge is to use a subshell: - -``` -ExecStart=/bin/sh -c '/path/to/node app.js | pino-transport' -``` - - -## Log to different streams - -Pino's default log destination is the singular destination of `stdout`. While -not recommended for performance reasons, multiple destinations can be targeted -by using [`pino-multi-stream`](https://github.com/pinojs/pino-multi-stream). - -In this example we use `stderr` for `error` level logs and `stdout` as default -for all other levels (e.g. `debug`, `info`, and `warn`). - -```js -const pino = require('pino') -const { multistream } = require('pino-multi-stream') -var streams = [ - {level: 'debug', stream: process.stdout}, - {level: 'error', stream: process.stderr}, - {level: 'fatal', stream: process.stderr} -] - -const logger = pino({ - name: 'my-app', - level: 'info', -}, multistream(streams)) -``` - - - -## How Pino handles duplicate keys - -Duplicate keys are possibly when a child logger logs an object with a key that -collides with a key in the child loggers bindings. - -See the [child logger duplicate keys caveat](/docs/child-loggers.md#duplicate-keys-caveat) -for information on this is handled. - - -## Log levels as labels instead of numbers -Pino log lines are meant to be parseable. Thus, Pino's default mode of operation -is to print the level value instead of the string name. However, while it is -possible to set the `useLevelLabels` option, we recommend using one of these -options instead if you are able: - -1. If the only change desired is the name then a transport can be used. One such -transport is [`pino-text-level-transport`](https://npm.im/pino-text-level-transport). -1. Use a prettifier like [`pino-pretty`](https://npm.im/pino-pretty) to make -the logs human friendly. - - -## Pino with `debug` - -The popular [`debug`](https://npm.im/debug) is used in many modules across the ecosystem. - -The [`pino-debug`](https://github.com/pinojs/pino-debug) module -can capture calls to `debug` loggers and run them -through `pino` instead. This results in a 10x (20x in asynchronous mode) -performance improvement - even though `pino-debug` is logging additional -data and wrapping it in JSON. - -To quickly enable this install [`pino-debug`](https://github.com/pinojs/pino-debug) -and preload it with the `-r` flag, enabling any `debug` logs with the -`DEBUG` environment variable: - -```sh -$ npm i pino-debug -$ DEBUG=* node -r pino-debug app.js -``` - -[`pino-debug`](https://github.com/pinojs/pino-debug) also offers fine grain control to map specific `debug` -namespaces to `pino` log levels. See [`pino-debug`](https://github.com/pinojs/pino-debug) -for more. - - -## Unicode and Windows terminal - -Pino uses [sonic-boom](https://github.com/mcollina/sonic-boom) to speed -up logging. Internally, it uses [`fs.write`](https://nodejs.org/dist/latest-v10.x/docs/api/fs.html#fs_fs_write_fd_string_position_encoding_callback) to write log lines directly to a file -descriptor. On Windows, unicode output is not handled properly in the -terminal (both `cmd.exe` and powershell), and as such the output could -be visualized incorrectly if the log lines include utf8 characters. It -is possible to configure the terminal to visualize those characters -correctly with the use of [`chcp`](https://ss64.com/nt/chcp.html) by -executing in the terminal `chcp 65001`. This is a known limitation of -Node.js. - - -## Mapping Pino Log Levels to Google Cloud Logging (Stackdriver) Serverity Levels - -Google Cloud Logging uses `severity` levels instead log levels. As a result, all logs may show as INFO -level logs while completely ignoring the level set in the pino log. Google Cloud Logging also prefers that -log data is present inside a `message` key instead of the default `msg` key that Pino uses. Use a technique -similar to the one below to retain log levels in Google Clould Logging - -```js -const pino = require('pino') - -// https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#logseverity -const PinoLevelToSeverityLookup = { - trace: 'DEBUG', - debug: 'DEBUG', - info: 'INFO', - warn: 'WARNING', - error: 'ERROR', - fatal: 'CRITICAL', -}; - -const defaultPinoConf = { - messageKey: 'message', - formatters: { - level(label, number) { - return { - severity: PinoLevelToSeverityLookup[label] || PinoLevelToSeverityLookup['info'], - level: number, - } - }, - log(message) { - return { message } - } - }, -} - -module.exports = function createLogger(options) { - return pino(Object.assign({}, options, defaultPinoConf)) -} -``` - - -## Avoid Message Conflict - -As described in the [`message` documentation](/docs/api.md#message), when a log -is written like `log.info({ msg: 'a message' }, 'another message')` then the -final output JSON will have `"msg":"another message"` and the `'a message'` -string will be lost. To overcome this, the [`logMethod` hook](/docs/api.md#logmethod) -can be used: - -```js -'use strict' - -const log = require('pino')({ - level: 'debug', - hooks: { - logMethod (inputArgs, method) { - if (inputArgs.length === 2 && inputArgs[0].msg) { - inputArgs[0].originalMsg = inputArgs[0].msg - } - return method.apply(this, inputArgs) - } - } -}) - -log.info('no original message') -log.info({ msg: 'mapped to originalMsg' }, 'a message') - -// {"level":30,"time":1596313323106,"pid":63739,"hostname":"foo","msg":"no original message"} -// {"level":30,"time":1596313323107,"pid":63739,"hostname":"foo","msg":"a message","originalMsg":"mapped to originalMsg"} -``` diff --git a/node_modules/pino/docs/legacy.md b/node_modules/pino/docs/legacy.md deleted file mode 100644 index 5848f696..00000000 --- a/node_modules/pino/docs/legacy.md +++ /dev/null @@ -1,167 +0,0 @@ -# Legacy - -## Legacy Node Support - -### Node v4 - -Node v4 is supported on the [Pino v4](#pino-v4-documentation) line. - -### Node v0.10-v0.12 - -Node v0.10 or Node v0.12 is supported on the [Pino v2](#pino-v2-documentation) line. - -## Documentation - -### Pino v4 Documentation - - - -### Pino v3 Documentation - - - -### Pino v2 Documentation - - - -## Migration - -### Pino v4 to Pino v5 - -#### Logging Destination - -In Pino v4 the destination could be set by passing a stream as the -second parameter to the exported `pino` function. This is still the -case in v5. However it's strongly recommended to use `pino.destination` -which will write logs ~30% faster. - -##### v4 - -```js -const stdoutLogger = require('pino')() -const stderrLogger = require('pino')(process.stderr) -const fileLogger = require('pino')(fs.createWriteStream('/log/path')) -``` - -##### v5 - -```js -const stdoutLogger = require('pino')() // pino.destination by default -const stderrLogger = require('pino')(pino.destination(2)) -const fileLogger = require('pino')(pino.destination('/log/path')) -``` - -Note: This is not a breaking change, `WritableStream` instances are still -supported, but are slower than `pino.destination` which -uses the high speed [`sonic-boom` ⇗](https://github.com/mcollina/sonic-boom) library. - -* See [`destination` parameter](/docs/api.md#destination) - -#### Extreme Mode - -The `extreme` setting does not exist as an option in Pino v5, instead use -a `pino.extreme` destination. - -##### v4 - -```js -const stdoutLogger = require('pino')({extreme: true}) -const stderrLogger = require('pino')({extreme: true}, process.stderr) -const fileLogger = require('pino')({extreme: true}, fs.createWriteStream('/log/path')) -``` - -##### v5 - -```js -const stdoutLogger = require('pino')(pino.extreme()) -const stderrLogger = require('pino')(pino.extreme(2)) -const fileLogger = require('pino')(pino.extreme('/log/path')) -``` - -* See [pino.extreme](/docs/api.md#pino-extreme) -* See [Extreme mode ⇗](/docs/extreme.md) - - -#### Pino CLI is now pino-pretty CLI - -The Pino CLI is provided with Pino v4 for basic log prettification. - -From Pino v5 the CLI is installed separately with `pino-pretty`. - -##### v4 -```sh -$ npm install -g pino -$ node app.js | pino -``` - -##### v5 -```sh -$ npm install -g pino-pretty -$ node app.js | pino-pretty -``` - -* See [Pretty Printing documentation](/docs/pretty.md) - -#### Programmatic Pretty Printing - -The [`pino.pretty()`](https://github.com/pinojs/pino/blob/v4.x.x/docs/API.md#prettyoptions) -method has also been removed from Pino v5. - -##### v4 - -```js -var pino = require('pino') -var pretty = pino.pretty() -pretty.pipe(process.stdout) -``` - -##### v5 - -Instead use the `prettyPrint` option (also available in v4): - -```js -const logger = require('pino')({ - prettyPrint: process.env.NODE_ENV !== 'production' -}) -``` - -In v5 the `pretty-print` module must be installed to use the `prettyPrint` option: - -```sh -npm install --save-dev pino-pretty -``` - -* See [prettyPrint option](/docs/api.md#prettyPrint) -* See [Pretty Printing documentation](/docs/pretty.md) - -#### Slowtime - -In Pino v4 a `slowtime` option was supplied, which allowed for full ISO dates -in the timestamps instead of milliseconds since the Epoch. In Pino v5 this -has been completely removed, along with the `pino.stdTimeFunctions.slowTime` -function. In order to achieve the equivalent in v5, a custom -time function should be supplied: - -##### v4 - -```js -const pino = require('pino') -const logger = pino({slowtime: true}) -// following avoids deprecation warning in v4: -const loggerAlt = pino({timestamp: pino.stdTimeFunctions.slowTime}) -``` - -##### v5 - -```js -const logger = require('pino')({ - timestamp: () => ',"time":"' + (new Date()).toISOString() + '"' -}) -``` - -The practice of creating ISO dates in-process for logging purposes is strongly -recommended against. Instead consider post-processing the logs or using a transport -to convert the timestamps. - - -* See [timestamp option](/docs/api.md#timestamp) diff --git a/node_modules/pino/docs/lts.md b/node_modules/pino/docs/lts.md deleted file mode 100644 index 18299d30..00000000 --- a/node_modules/pino/docs/lts.md +++ /dev/null @@ -1,14 +0,0 @@ -## Long Term Support - - -Pino's Long Term Support (LTS) is tied to the [Node.js LTS policy]. -Major versions of Pino, "X" releases in X.Y.Z of [semantic versioning] nomenclature, will -be issued as close as possible to the release of a new major LTS release of -Node.js (subject to the Pino maintainers's capacity). Pino makes no guarantees -as to the operability of the library on unsupported releases of Node.js. - -Pino will not remove support for a deprecated Node.js release via a minor, -or patch, release of Pino. - -[semantic versioning]: https://semver.org/ -[Node.js LTS policy]: https://github.com/nodejs/Release diff --git a/node_modules/pino/docs/pretty.md b/node_modules/pino/docs/pretty.md deleted file mode 100644 index 0770cab5..00000000 --- a/node_modules/pino/docs/pretty.md +++ /dev/null @@ -1,101 +0,0 @@ -# Pretty Printing - -By default, Pino log lines are newline delimited JSON (NDJSON). This is perfect -for production usage and long term storage. It's not so great for development -environments. Thus, Pino logs can be prettified by using a Pino prettifier -module like [`pino-pretty`][pp]: - -```sh -$ cat app.log | pino-pretty -``` - -For almost all situations, this is the recommended way to prettify logs. The -programmatic API, described in the next section, is primarily for integration -purposes with other CLI based prettifiers. - -## Prettifier API - -Pino prettifier modules are extra modules that provide a CLI for parsing NDJSON -log lines piped via `stdin` and expose an API which conforms to the Pino -[metadata streams](/docs/api.md#metadata) API. - -The API requires modules provide a factory function which returns a prettifier -function. This prettifier function must accept either a string of NDJSON or -a Pino log object. A pseudo-example of such a prettifier is: - -The uninitialized Pino instance is passed as `this` into prettifier factory function, -so it can be accessed via closure by the returned prettifier function. - -```js -module.exports = function myPrettifier (options) { - // `this` is bound to the pino instance - // Deal with whatever options are supplied. - return function prettifier (inputData) { - let logObject - if (typeof inputData === 'string') { - logObject = someJsonParser(inputData) - } else if (isObject(inputData)) { - logObject = inputData - } - if (!logObject) return inputData - // implement prettification - } - - function isObject (input) { - return Object.prototype.toString.apply(input) === '[object Object]' - } -} -``` - -The reference implementation of such a module is the [`pino-pretty`][pp] module. -To learn more about creating a custom prettifier module, refer to the -`pino-pretty` source code. - -Note: if the prettifier returns `undefined`, instead of a formatted line, nothing -will be written to the destination stream. - -### API Example - -> #### NOTE: -> For general usage, it is highly recommended that logs are piped into -> the prettifier instead. Prettified logs are not easily parsed and cannot -> be easily investigated at a later date. - -1. Install a prettifier module as a separate dependency, e.g. `npm install pino-pretty`. -1. Instantiate the logger with pretty printing enabled: - ```js - const pino = require('pino') - const log = pino({ - prettyPrint: { - levelFirst: true - }, - prettifier: require('pino-pretty') - }) - ``` - Note: the default prettifier module is `pino-pretty`, so the preceding - example could be: - ```js - const pino = require('pino') - const log = pino({ - prettyPrint: { - levelFirst: true - } - }) - ``` - See the [`pino-pretty` documentation][pp] for more information on the options - that can be passed via `prettyPrint`. - -The default prettifier write stream does not guarantee final log writes. -Correspondingly, a warning is written to logs on first synchronous flushing. -This warning may be suppressed by passing `suppressFlushSyncWarning : true` to -`prettyPrint`: - ```js - const pino = require('pino') - const log = pino({ - prettyPrint: { - suppressFlushSyncWarning: true - } - }) - ``` - - [pp]: https://github.com/pinojs/pino-pretty diff --git a/node_modules/pino/docs/redaction.md b/node_modules/pino/docs/redaction.md deleted file mode 100644 index cce21ab6..00000000 --- a/node_modules/pino/docs/redaction.md +++ /dev/null @@ -1,135 +0,0 @@ -# Redaction - -> Redaction is not supported in the browser [#670](https://github.com/pinojs/pino/issues/670) - -To redact sensitive information, supply paths to keys that hold sensitive data -using the `redact` option. Note that paths which contain hypens need to use -brackets in order to access the hyphenated property: - -```js -const logger = require('.')({ - redact: ['key', 'path.to.key', 'stuff.thats[*].secret', 'path["with-hyphen"]'] -}) - -logger.info({ - key: 'will be redacted', - path: { - to: {key: 'sensitive', another: 'thing'} - }, - stuff: { - thats: [ - {secret: 'will be redacted', logme: 'will be logged'}, - {secret: 'as will this', logme: 'as will this'} - ] - } -}) -``` - -This will output: - -```JSON -{"level":30,"time":1527777350011,"pid":3186,"hostname":"Davids-MacBook-Pro-3.local","key":"[Redacted]","path":{"to":{"key":"[Redacted]","another":"thing"}},"stuff":{"thats":[{"secret":"[Redacted]","logme":"will be logged"},{"secret":"[Redacted]","logme":"as will this"}]}} -``` - -The `redact` option can take an array (as shown in the above example) or -an object. This allows control over *how* information is redacted. - -For instance, setting the censor: - -```js -const logger = require('.')({ - redact: { - paths: ['key', 'path.to.key', 'stuff.thats[*].secret'], - censor: '**GDPR COMPLIANT**' - } -}) - -logger.info({ - key: 'will be redacted', - path: { - to: {key: 'sensitive', another: 'thing'} - }, - stuff: { - thats: [ - {secret: 'will be redacted', logme: 'will be logged'}, - {secret: 'as will this', logme: 'as will this'} - ] - } -}) -``` - -This will output: - -```JSON -{"level":30,"time":1527778563934,"pid":3847,"hostname":"Davids-MacBook-Pro-3.local","key":"**GDPR COMPLIANT**","path":{"to":{"key":"**GDPR COMPLIANT**","another":"thing"}},"stuff":{"thats":[{"secret":"**GDPR COMPLIANT**","logme":"will be logged"},{"secret":"**GDPR COMPLIANT**","logme":"as will this"}]}} -``` - -The `redact.remove` option also allows for the key and value to be removed from output: - -```js -const logger = require('.')({ - redact: { - paths: ['key', 'path.to.key', 'stuff.thats[*].secret'], - remove: true - } -}) - -logger.info({ - key: 'will be redacted', - path: { - to: {key: 'sensitive', another: 'thing'} - }, - stuff: { - thats: [ - {secret: 'will be redacted', logme: 'will be logged'}, - {secret: 'as will this', logme: 'as will this'} - ] - } -}) -``` - -This will output - -```JSON -{"level":30,"time":1527782356751,"pid":5758,"hostname":"Davids-MacBook-Pro-3.local","path":{"to":{"another":"thing"}},"stuff":{"thats":[{"logme":"will be logged"},{"logme":"as will this"}]}} -``` - -See [pino options in API](/docs/api.md#redact-array-object) for `redact` API details. - - -## Path Syntax - -The syntax for paths supplied to the `redact` option conform to the syntax in path lookups -in standard EcmaScript, with two additions: - -* paths may start with bracket notation -* paths may contain the asterisk `*` to denote a wildcard -* paths are **case sensitive** - -By way of example, the following are all valid paths: - -* `a.b.c` -* `a["b-c"].d` -* `["a-b"].c` -* `a.b.*` -* `a[*].b` - -## Overhead - -Pino's redaction functionality is built on top of [`fast-redact`](https://github.com/davidmarkclements/fast-redact) -which adds about 2% overhead to `JSON.stringify` when using paths without wildcards. - -When used with pino logger with a single redacted path, any overhead is within noise - -a way to deterministically measure it's effect has not been found. This is because its not a bottleneck. - -However, wildcard redaction does carry a non-trivial cost relative to explicitly declaring the keys -(50% in a case where four keys are redacted across two objects). See -the [`fast-redact` benchmarks](https://github.com/davidmarkclements/fast-redact#benchmarks) for details. - -## Safety - -The `redact` option is intended as an initialization time configuration option. -It's extremely important that path strings do not originate from user input. -The `fast-redact` module uses a VM context to syntax check the paths, user input -should never be combined with such an approach. See the [`fast-redact` Caveat](https://github.com/davidmarkclements/fast-redact#caveat) -and the [`fast-redact` Approach](https://github.com/davidmarkclements/fast-redact#approach) for in-depth information. diff --git a/node_modules/pino/docs/transports.md b/node_modules/pino/docs/transports.md deleted file mode 100644 index 13ca52c7..00000000 --- a/node_modules/pino/docs/transports.md +++ /dev/null @@ -1,455 +0,0 @@ -# Transports - -A "transport" for Pino is a supplementary tool which consumes Pino logs. - -Consider the following example: - -```js -const split = require('split2') -const pump = require('pump') -const through = require('through2') - -const myTransport = through.obj(function (chunk, enc, cb) { - // do the necessary - console.log(chunk) - cb() -}) - -pump(process.stdin, split(JSON.parse), myTransport) -``` - -The above defines our "transport" as the file `my-transport-process.js`. - -Logs can now be consumed using shell piping: - -```sh -node my-app-which-logs-stuff-to-stdout.js | node my-transport-process.js -``` - -Ideally, a transport should consume logs in a separate process to the application, -Using transports in the same process causes unnecessary load and slows down -Node's single threaded event loop. - -## In-process transports - -> **Pino *does not* natively support in-process transports.** - -Pino does not support in-process transports because Node processes are -single threaded processes (ignoring some technical details). Given this -restriction, one of the methods Pino employs to achieve its speed is to -purposefully offload the handling of logs, and their ultimate destination, to -external processes so that the threading capabilities of the OS can be -used (or other CPUs). - -One consequence of this methodology is that "error" logs do not get written to -`stderr`. However, since Pino logs are in a parsable format, it is possible to -use tools like [pino-tee][pino-tee] or [jq][jq] to work with the logs. For -example, to view only logs marked as "error" logs: - -``` -$ node an-app.js | jq 'select(.level == 50)' -``` - -In short, the way Pino generates logs: - -1. Reduces the impact of logging on an application to the absolute minimum. -2. Gives greater flexibility in how logs are processed and stored. - -Given all of the above, Pino recommends out-of-process log processing. - -However, it is possible to wrap Pino and perform processing in-process. -For an example of this, see [pino-multi-stream][pinoms]. - -[pino-tee]: https://npm.im/pino-tee -[jq]: https://stedolan.github.io/jq/ -[pinoms]: https://npm.im/pino-multi-stream - -## Known Transports - -PR's to this document are welcome for any new transports! - -+ [pino-applicationinsights](#pino-applicationinsights) -+ [pino-azuretable](#pino-azuretable) -+ [pino-cloudwatch](#pino-cloudwatch) -+ [pino-couch](#pino-couch) -+ [pino-datadog](#pino-datadog) -+ [pino-elasticsearch](#pino-elasticsearch) -+ [pino-gelf](#pino-gelf) -+ [pino-http-send](#pino-http-send) -+ [pino-kafka](#pino-kafka) -+ [pino-logdna](#pino-logdna) -+ [pino-logflare](#pino-logflare) -+ [pino-mq](#pino-mq) -+ [pino-mysql](#pino-mysql) -+ [pino-papertrail](#pino-papertrail) -+ [pino-pg](#pino-pg) -+ [pino-redis](#pino-redis) -+ [pino-sentry](#pino-sentry) -+ [pino-seq](#pino-seq) -+ [pino-socket](#pino-socket) -+ [pino-stackdriver](#pino-stackdriver) -+ [pino-syslog](#pino-syslog) -+ [pino-websocket](#pino-websocket) - - - - -### pino-applicationinsights -The [pino-applicationinsights](https://www.npmjs.com/package/pino-applicationinsights) module is a transport that will forward logs to [Azure Application Insights](https://docs.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview). - -Given an application `foo` that logs via pino, you would use `pino-applicationinsights` like so: - -``` sh -$ node foo | pino-applicationinsights --key blablabla -``` - -For full documentation of command line switches read [readme](https://github.com/ovhemert/pino-applicationinsights#readme) - - -### pino-azuretable -The [pino-azuretable](https://www.npmjs.com/package/pino-azuretable) module is a transport that will forward logs to the [Azure Table Storage](https://azure.microsoft.com/en-us/services/storage/tables/). - -Given an application `foo` that logs via pino, you would use `pino-azuretable` like so: - -``` sh -$ node foo | pino-azuretable --account storageaccount --key blablabla -``` - -For full documentation of command line switches read [readme](https://github.com/ovhemert/pino-azuretable#readme) - - -### pino-cloudwatch - -[pino-cloudwatch][pino-cloudwatch] is a transport that buffers and forwards logs to [Amazon CloudWatch][]. - -```sh -$ node app.js | pino-cloudwatch --group my-log-group -``` - -[pino-cloudwatch]: https://github.com/dbhowell/pino-cloudwatch -[Amazon CloudWatch]: https://aws.amazon.com/cloudwatch/ - - -### pino-couch - -[pino-couch][pino-couch] uploads each log line as a [CouchDB][CouchDB] document. - -```sh -$ node app.js | pino-couch -U https://couch-server -d mylogs -``` - -[pino-couch]: https://github.com/IBM/pino-couch -[CouchDB]: https://couchdb.apache.org - - -### pino-datadog -The [pino-datadog](https://www.npmjs.com/package/pino-datadog) module is a transport that will forward logs to [DataDog](https://www.datadoghq.com/) through it's API. - -Given an application `foo` that logs via pino, you would use `pino-datadog` like so: - -``` sh -$ node foo | pino-datadog --key blablabla -``` - -For full documentation of command line switches read [readme](https://github.com/ovhemert/pino-datadog#readme) - - -### pino-elasticsearch - -[pino-elasticsearch][pino-elasticsearch] uploads the log lines in bulk -to [Elasticsearch][elasticsearch], to be displayed in [Kibana][kibana]. - -It is extremely simple to use and setup - -```sh -$ node app.js | pino-elasticsearch -``` - -Assuming Elasticsearch is running on localhost. - -To connect to an external elasticsearch instance (recommended for production): - -* Check that `network.host` is defined in the `elasticsearch.yml` configuration file. See [elasticsearch Network Settings documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#common-network-settings) for more details. -* Launch: - -```sh -$ node app.js | pino-elasticsearch --node http://192.168.1.42:9200 -``` - -Assuming Elasticsearch is running on `192.168.1.42`. - -To connect to AWS Elasticsearch: - -```sh -$ node app.js | pino-elasticsearch --node https://es-url.us-east-1.es.amazonaws.com --es-version 6 -``` - -Then [create an index pattern](https://www.elastic.co/guide/en/kibana/current/setup.html) on `'pino'` (the default index key for `pino-elasticsearch`) on the Kibana instance. - -[pino-elasticsearch]: https://github.com/pinojs/pino-elasticsearch -[elasticsearch]: https://www.elastic.co/products/elasticsearch -[kibana]: https://www.elastic.co/products/kibana - - -### pino-gelf - -Pino GELF ([pino-gelf]) is a transport for the Pino logger. Pino GELF receives Pino logs from stdin and transforms them into [GELF format][gelf] before sending them to a remote [Graylog server][graylog] via UDP. - -```sh -$ node your-app.js | pino-gelf log -``` - -[pino-gelf]: https://github.com/pinojs/pino-gelf -[gelf]: https://docs.graylog.org/en/2.1/pages/gelf.html -[graylog]: https://www.graylog.org/ - - -### pino-http-send - -[pino-http-send](https://npmjs.com/package/pino-http-send) is a configurable and low overhead -transport that will batch logs and send to a specified URL. - -```console -$ node app.js | pino-http-send -u http://localhost:8080/logs -``` - - -### pino-kafka - -[pino-kafka](https://github.com/ayZagen/pino-kafka) transport to send logs to [Apache Kafka](https://kafka.apache.org/). - -```sh -$ node index.js | pino-kafka -b 10.10.10.5:9200 -d mytopic -``` - - -### pino-logdna - -[pino-logdna](https://github.com/logdna/pino-logdna) transport to send logs to [LogDNA](https://logdna.com). - -```sh -$ node index.js | pino-logdna --key YOUR_INGESTION_KEY -``` - -Tags and other metadata can be included using the available command line options. See the [pino-logdna readme](https://github.com/logdna/pino-logdna#options) for a full list. - - -### pino-logflare - -[pino-logflare](https://github.com/Logflare/pino-logflare) transport to send logs to a [Logflare](https://logflare.app) `source`. - -```sh -$ node index.js | pino-logflare --key YOUR_KEY --source YOUR_SOURCE -``` - - -### pino-mq - -The `pino-mq` transport will take all messages received on `process.stdin` and send them over a message bus using JSON serialization. - -This useful for: - -* moving backpressure from application to broker -* transforming messages pressure to another component - -``` -node app.js | pino-mq -u "amqp://guest:guest@localhost/" -q "pino-logs" -``` - -Alternatively a configuration file can be used: - -``` -node app.js | pino-mq -c pino-mq.json -``` - -A base configuration file can be initialized with: - -``` -pino-mq -g -``` - -For full documentation of command line switches and configuration see [the `pino-mq` readme](https://github.com/itavy/pino-mq#readme) - - -### pino-papertrail -pino-papertrail is a transport that will forward logs to the [papertrail](https://papertrailapp.com) log service through an UDPv4 socket. - -Given an application `foo` that logs via pino, and a papertrail destination that collects logs on port UDP `12345` on address `bar.papertrailapp.com`, you would use `pino-papertrail` -like so: - -``` -node yourapp.js | pino-papertrail --host bar.papertrailapp.com --port 12345 --appname foo -``` - - -for full documentation of command line switches read [readme](https://github.com/ovhemert/pino-papertrail#readme) - - -### pino-pg -[pino-pg](https://www.npmjs.com/package/pino-pg) stores logs into PostgreSQL. -Full documentation in the [readme](https://github.com/Xstoudi/pino-pg). - - -### pino-mysql - -[pino-mysql][pino-mysql] loads pino logs into [MySQL][MySQL] and [MariaDB][MariaDB]. - -```sh -$ node app.js | pino-mysql -c db-configuration.json -``` - -`pino-mysql` can extract and save log fields into corresponding database field -and/or save the entire log stream as a [JSON Data Type][JSONDT]. - -For full documentation and command line switches read the [readme][pino-mysql]. - -[pino-mysql]: https://www.npmjs.com/package/pino-mysql -[MySQL]: https://www.mysql.com/ -[MariaDB]: https://mariadb.org/ -[JSONDT]: https://dev.mysql.com/doc/refman/8.0/en/json.html - - -### pino-redis - -[pino-redis][pino-redis] loads pino logs into [Redis][Redis]. - -```sh -$ node app.js | pino-redis -U redis://username:password@localhost:6379 -``` - -[pino-redis]: https://github.com/buianhthang/pino-redis -[Redis]: https://redis.io/ - - -### pino-sentry - -[pino-sentry][pino-sentry] loads pino logs into [Sentry][Sentry]. - -```sh -$ node app.js | pino-sentry --dsn=https://******@sentry.io/12345 -``` - -For full documentation of command line switches see the [pino-sentry readme](https://github.com/aandrewww/pino-sentry/blob/master/README.md) - -[pino-sentry]: https://www.npmjs.com/package/pino-sentry -[Sentry]: https://sentry.io/ - - - -### pino-seq - -[pino-seq][pino-seq] supports both out-of-process and in-process log forwarding to [Seq][Seq]. - -```sh -$ node app.js | pino-seq --serverUrl http://localhost:5341 --apiKey 1234567890 --property applicationName=MyNodeApp -``` - -[pino-seq]: https://www.npmjs.com/package/pino-seq -[Seq]: https://datalust.co/seq - - -### pino-socket - -[pino-socket][pino-socket] is a transport that will forward logs to a IPv4 -UDP or TCP socket. - -As an example, use `socat` to fake a listener: - -```sh -$ socat -v udp4-recvfrom:6000,fork exec:'/bin/cat' -``` - -Then run an application that uses `pino` for logging: - -```sh -$ node app.js | pino-socket -p 6000 -``` - -Logs from the application should be observed on both consoles. - -[pino-socket]: https://www.npmjs.com/package/pino-socket - -#### Logstash - -The [pino-socket][pino-socket] module can also be used to upload logs to -[Logstash][logstash] via: - -``` -$ node app.js | pino-socket -a 127.0.0.1 -p 5000 -m tcp -``` - -Assuming logstash is running on the same host and configured as -follows: - -``` -input { - tcp { - port => 5000 - } -} - -filter { - json { - source => "message" - } -} - -output { - elasticsearch { - hosts => "127.0.0.1:9200" - } -} -``` - -See to learn -how to setup [Kibana][kibana]. - -For Docker users, see -https://github.com/deviantony/docker-elk to setup an ELK stack. - - -### pino-stackdriver -The [pino-stackdriver](https://www.npmjs.com/package/pino-stackdriver) module is a transport that will forward logs to the [Google Stackdriver](https://cloud.google.com/logging/) log service through it's API. - -Given an application `foo` that logs via pino, a stackdriver log project `bar` and credentials in the file `/credentials.json`, you would use `pino-stackdriver` -like so: - -``` sh -$ node foo | pino-stackdriver --project bar --credentials /credentials.json -``` - -For full documentation of command line switches read [readme](https://github.com/ovhemert/pino-stackdriver#readme) - - -### pino-syslog - -[pino-syslog][pino-syslog] is a transforming transport that converts -`pino` NDJSON logs to [RFC3164][rfc3164] compatible log messages. The `pino-syslog` module does not -forward the logs anywhere, it merely re-writes the messages to `stdout`. But -when used in combination with `pino-socket` the log messages can be relayed to a syslog server: - -```sh -$ node app.js | pino-syslog | pino-socket -a syslog.example.com -``` - -Example output for the "hello world" log: - -``` -<134>Apr 1 16:44:58 MacBook-Pro-3 none[94473]: {"pid":94473,"hostname":"MacBook-Pro-3","level":30,"msg":"hello world","time":1459529098958} -``` - -[pino-syslog]: https://www.npmjs.com/package/pino-syslog -[rfc3164]: https://tools.ietf.org/html/rfc3164 -[logstash]: https://www.elastic.co/products/logstash - - - -### pino-websocket - -[pino-websocket](https://www.npmjs.com/package/@abeai/pino-websocket) is a transport that will forward each log line to a websocket server. - -```sh -$ node app.js | pino-websocket -a my-websocket-server.example.com -p 3004 -``` - -For full documentation of command line switches read the [README](https://github.com/abeai/pino-websocket#readme). diff --git a/node_modules/pino/docs/web.md b/node_modules/pino/docs/web.md deleted file mode 100644 index 8881f8cd..00000000 --- a/node_modules/pino/docs/web.md +++ /dev/null @@ -1,229 +0,0 @@ -# Web Frameworks - -Since HTTP logging is a primary use case, Pino has first class support for the Node.js -web framework ecosystem. - -- [Web Frameworks](#web-frameworks) - - [Pino with Fastify](#pino-with-fastify) - - [Pino with Express](#pino-with-express) - - [Pino with Hapi](#pino-with-hapi) - - [Pino with Restify](#pino-with-restify) - - [Pino with Koa](#pino-with-koa) - - [Pino with Node core `http`](#pino-with-node-core-http) - - [Pino with Nest](#pino-with-nest) - - -## Pino with Fastify - -The Fastify web framework comes bundled with Pino by default, simply set Fastify's -`logger` option to `true` and use `request.log` or `reply.log` for log messages that correspond -to each individual request: - -```js -const fastify = require('fastify')({ - logger: true -}) -fastify.get('/', async (request, reply) => { - request.log.info('something') - return { hello: 'world' } -}) -``` - -The `logger` option can also be set to an object, which will be passed through directly -as the [`pino` options object](/docs/api.md#options-object). - -See the [fastify documentation](https://www.fastify.io/docs/latest/Logging/) for more information. - - -## Pino with Express - -```sh -npm install pino-http -``` - -```js -const app = require('express')() -const pino = require('pino-http')() - -app.use(pino) - -app.get('/', function (req, res) { - req.log.info('something') - res.send('hello world') -}) - -app.listen(3000) -``` - -See the [pino-http readme](https://npm.im/pino-http) for more info. - - -## Pino with Hapi - -```sh -npm install hapi-pino -``` - -```js -'use strict' - -require('make-promises-safe') - -const Hapi = require('hapi') - -async function start () { - // Create a server with a host and port - const server = Hapi.server({ - host: 'localhost', - port: 3000 - }) - - // Add the route - server.route({ - method: 'GET', - path: '/', - handler: async function (request, h) { - // request.log is HAPI standard way of logging - request.log(['a', 'b'], 'Request into hello world') - - // a pino instance can also be used, which will be faster - request.logger.info('In handler %s', request.path) - - return 'hello world' - } - }) - - await server.register({ - plugin: require('.'), - options: { - prettyPrint: process.env.NODE_ENV !== 'production' - } - }) - - // also as a decorated API - server.logger().info('another way for accessing it') - - // and through Hapi standard logging system - server.log(['subsystem'], 'third way for accessing it') - - await server.start() - - return server -} - -start().catch((err) => { - console.log(err) - process.exit(1) -}) -``` - -See the [hapi-pino readme](https://npm.im/hapi-pino) for more info. - - -## Pino with Restify - -```sh -npm install restify-pino-logger -``` - -```js -const server = require('restify').createServer({name: 'server'}) -const pino = require('restify-pino-logger')() - -server.use(pino) - -server.get('/', function (req, res) { - req.log.info('something') - res.send('hello world') -}) - -server.listen(3000) -``` - -See the [restify-pino-logger readme](https://npm.im/restify-pino-logger) for more info. - - -## Pino with Koa - -```sh -npm install koa-pino-logger -``` - -```js -const Koa = require('koa') -const app = new Koa() -const pino = require('koa-pino-logger')() - -app.use(pino) - -app.use((ctx) => { - ctx.log.info('something else') - ctx.body = 'hello world' -}) - -app.listen(3000) -``` - -See the [koa-pino-logger readme](https://github.com/pinojs/koa-pino-logger) for more info. - - -## Pino with Node core `http` - -```sh -npm install pino-http -``` - -```js -const http = require('http') -const server = http.createServer(handle) -const logger = require('pino-http')() - -function handle (req, res) { - logger(req, res) - req.log.info('something else') - res.end('hello world') -} - -server.listen(3000) -``` - -See the [pino-http readme](https://npm.im/pino-http) for more info. - - - -## Pino with Nest - -```sh -npm install nestjs-pino -``` - -```ts -import { NestFactory } from '@nestjs/core' -import { Controller, Get, Module } from '@nestjs/common' -import { LoggerModule, Logger } from 'nestjs-pino' - -@Controller() -export class AppController { - constructor(private readonly logger: Logger) {} - - @Get() - getHello() { - this.logger.log('something') - return `Hello world` - } -} - -@Module({ - controllers: [AppController], - imports: [LoggerModule.forRoot()] -}) -class MyModule {} - -async function bootstrap() { - const app = await NestFactory.create(MyModule) - await app.listen(3000) -} -bootstrap() -``` - -See the [nestjs-pino readme](https://npm.im/nestjs-pino) for more info. diff --git a/node_modules/pino/example.js b/node_modules/pino/example.js deleted file mode 100644 index 866338e1..00000000 --- a/node_modules/pino/example.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict' - -const pino = require('./')() - -pino.info('hello world') -pino.error('this is at error level') -pino.info('the answer is %d', 42) -pino.info({ obj: 42 }, 'hello world') -pino.info({ obj: 42, b: 2 }, 'hello world') -pino.info({ nested: { obj: 42 } }, 'nested') -setImmediate(() => { - pino.info('after setImmediate') -}) -pino.error(new Error('an error')) - -const child = pino.child({ a: 'property' }) -child.info('hello child!') - -const childsChild = child.child({ another: 'property' }) -childsChild.info('hello baby..') - -pino.debug('this should be mute') - -pino.level = 'trace' - -pino.debug('this is a debug statement') - -pino.child({ another: 'property' }).debug('this is a debug statement via child') -pino.trace('this is a trace statement') - -pino.debug('this is a "debug" statement with "') - -pino.info(new Error('kaboom')) -pino.info(null) - -pino.info(new Error('kaboom'), 'with', 'a', 'message') diff --git a/node_modules/pino/lib/levels.js b/node_modules/pino/lib/levels.js deleted file mode 100644 index df65e5e6..00000000 --- a/node_modules/pino/lib/levels.js +++ /dev/null @@ -1,193 +0,0 @@ -'use strict' -/* eslint no-prototype-builtins: 0 */ -const flatstr = require('flatstr') -const { - lsCacheSym, - levelValSym, - useOnlyCustomLevelsSym, - streamSym, - formattersSym, - hooksSym -} = require('./symbols') -const { noop, genLog } = require('./tools') - -const levels = { - trace: 10, - debug: 20, - info: 30, - warn: 40, - error: 50, - fatal: 60 -} -const levelMethods = { - fatal: (hook) => { - const logFatal = genLog(levels.fatal, hook) - return function (...args) { - const stream = this[streamSym] - logFatal.call(this, ...args) - if (typeof stream.flushSync === 'function') { - try { - stream.flushSync() - } catch (e) { - // https://github.com/pinojs/pino/pull/740#discussion_r346788313 - } - } - } - }, - error: (hook) => genLog(levels.error, hook), - warn: (hook) => genLog(levels.warn, hook), - info: (hook) => genLog(levels.info, hook), - debug: (hook) => genLog(levels.debug, hook), - trace: (hook) => genLog(levels.trace, hook) -} - -const nums = Object.keys(levels).reduce((o, k) => { - o[levels[k]] = k - return o -}, {}) - -const initialLsCache = Object.keys(nums).reduce((o, k) => { - o[k] = flatstr('{"level":' + Number(k)) - return o -}, {}) - -function genLsCache (instance) { - const formatter = instance[formattersSym].level - const { labels } = instance.levels - const cache = {} - for (const label in labels) { - const level = formatter(labels[label], Number(label)) - cache[label] = JSON.stringify(level).slice(0, -1) - } - instance[lsCacheSym] = cache - return instance -} - -function isStandardLevel (level, useOnlyCustomLevels) { - if (useOnlyCustomLevels) { - return false - } - - switch (level) { - case 'fatal': - case 'error': - case 'warn': - case 'info': - case 'debug': - case 'trace': - return true - default: - return false - } -} - -function setLevel (level) { - const { labels, values } = this.levels - if (typeof level === 'number') { - if (labels[level] === undefined) throw Error('unknown level value' + level) - level = labels[level] - } - if (values[level] === undefined) throw Error('unknown level ' + level) - const preLevelVal = this[levelValSym] - const levelVal = this[levelValSym] = values[level] - const useOnlyCustomLevelsVal = this[useOnlyCustomLevelsSym] - const hook = this[hooksSym].logMethod - - for (const key in values) { - if (levelVal > values[key]) { - this[key] = noop - continue - } - this[key] = isStandardLevel(key, useOnlyCustomLevelsVal) ? levelMethods[key](hook) : genLog(values[key], hook) - } - - this.emit( - 'level-change', - level, - levelVal, - labels[preLevelVal], - preLevelVal - ) -} - -function getLevel (level) { - const { levels, levelVal } = this - // protection against potential loss of Pino scope from serializers (edge case with circular refs - https://github.com/pinojs/pino/issues/833) - return (levels && levels.labels) ? levels.labels[levelVal] : '' -} - -function isLevelEnabled (logLevel) { - const { values } = this.levels - const logLevelVal = values[logLevel] - return logLevelVal !== undefined && (logLevelVal >= this[levelValSym]) -} - -function mappings (customLevels = null, useOnlyCustomLevels = false) { - const customNums = customLevels - /* eslint-disable */ - ? Object.keys(customLevels).reduce((o, k) => { - o[customLevels[k]] = k - return o - }, {}) - : null - /* eslint-enable */ - - const labels = Object.assign( - Object.create(Object.prototype, { Infinity: { value: 'silent' } }), - useOnlyCustomLevels ? null : nums, - customNums - ) - const values = Object.assign( - Object.create(Object.prototype, { silent: { value: Infinity } }), - useOnlyCustomLevels ? null : levels, - customLevels - ) - return { labels, values } -} - -function assertDefaultLevelFound (defaultLevel, customLevels, useOnlyCustomLevels) { - if (typeof defaultLevel === 'number') { - const values = [].concat( - Object.keys(customLevels || {}).map(key => customLevels[key]), - useOnlyCustomLevels ? [] : Object.keys(nums).map(level => +level), - Infinity - ) - if (!values.includes(defaultLevel)) { - throw Error(`default level:${defaultLevel} must be included in custom levels`) - } - return - } - - const labels = Object.assign( - Object.create(Object.prototype, { silent: { value: Infinity } }), - useOnlyCustomLevels ? null : levels, - customLevels - ) - if (!(defaultLevel in labels)) { - throw Error(`default level:${defaultLevel} must be included in custom levels`) - } -} - -function assertNoLevelCollisions (levels, customLevels) { - const { labels, values } = levels - for (const k in customLevels) { - if (k in values) { - throw Error('levels cannot be overridden') - } - if (customLevels[k] in labels) { - throw Error('pre-existing level values cannot be used for new levels') - } - } -} - -module.exports = { - initialLsCache, - genLsCache, - levelMethods, - getLevel, - setLevel, - isLevelEnabled, - mappings, - assertNoLevelCollisions, - assertDefaultLevelFound -} diff --git a/node_modules/pino/lib/meta.js b/node_modules/pino/lib/meta.js deleted file mode 100644 index 6195daad..00000000 --- a/node_modules/pino/lib/meta.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -const { version } = require('../package.json') - -module.exports = { version } diff --git a/node_modules/pino/lib/proto.js b/node_modules/pino/lib/proto.js deleted file mode 100644 index dc287385..00000000 --- a/node_modules/pino/lib/proto.js +++ /dev/null @@ -1,183 +0,0 @@ -'use strict' - -/* eslint no-prototype-builtins: 0 */ - -const { EventEmitter } = require('events') -const SonicBoom = require('sonic-boom') -const flatstr = require('flatstr') -const { - lsCacheSym, - levelValSym, - setLevelSym, - getLevelSym, - chindingsSym, - parsedChindingsSym, - mixinSym, - asJsonSym, - writeSym, - timeSym, - timeSliceIndexSym, - streamSym, - serializersSym, - formattersSym, - useOnlyCustomLevelsSym, - needsMetadataGsym -} = require('./symbols') -const { - getLevel, - setLevel, - isLevelEnabled, - mappings, - initialLsCache, - genLsCache, - assertNoLevelCollisions -} = require('./levels') -const { - asChindings, - asJson, - buildFormatters -} = require('./tools') -const { - version -} = require('./meta') - -// note: use of class is satirical -// https://github.com/pinojs/pino/pull/433#pullrequestreview-127703127 -const constructor = class Pino {} -const prototype = { - constructor, - child, - bindings, - setBindings, - flush, - isLevelEnabled, - version, - get level () { return this[getLevelSym]() }, - set level (lvl) { this[setLevelSym](lvl) }, - get levelVal () { return this[levelValSym] }, - set levelVal (n) { throw Error('levelVal is read-only') }, - [lsCacheSym]: initialLsCache, - [writeSym]: write, - [asJsonSym]: asJson, - [getLevelSym]: getLevel, - [setLevelSym]: setLevel -} - -Object.setPrototypeOf(prototype, EventEmitter.prototype) - -// exporting and consuming the prototype object using factory pattern fixes scoping issues with getters when serializing -module.exports = function () { - return Object.create(prototype) -} - -const resetChildingsFormatter = bindings => bindings -function child (bindings) { - if (!bindings) { - throw Error('missing bindings for child Pino') - } - const serializers = this[serializersSym] - const formatters = this[formattersSym] - const instance = Object.create(this) - if (bindings.hasOwnProperty('serializers') === true) { - instance[serializersSym] = Object.create(null) - - for (const k in serializers) { - instance[serializersSym][k] = serializers[k] - } - const parentSymbols = Object.getOwnPropertySymbols(serializers) - /* eslint no-var: off */ - for (var i = 0; i < parentSymbols.length; i++) { - const ks = parentSymbols[i] - instance[serializersSym][ks] = serializers[ks] - } - - for (const bk in bindings.serializers) { - instance[serializersSym][bk] = bindings.serializers[bk] - } - const bindingsSymbols = Object.getOwnPropertySymbols(bindings.serializers) - for (var bi = 0; bi < bindingsSymbols.length; bi++) { - const bks = bindingsSymbols[bi] - instance[serializersSym][bks] = bindings.serializers[bks] - } - } else instance[serializersSym] = serializers - if (bindings.hasOwnProperty('formatters')) { - const { level, bindings: chindings, log } = bindings.formatters - instance[formattersSym] = buildFormatters( - level || formatters.level, - chindings || resetChildingsFormatter, - log || formatters.log - ) - } else { - instance[formattersSym] = buildFormatters( - formatters.level, - resetChildingsFormatter, - formatters.log - ) - } - if (bindings.hasOwnProperty('customLevels') === true) { - assertNoLevelCollisions(this.levels, bindings.customLevels) - instance.levels = mappings(bindings.customLevels, instance[useOnlyCustomLevelsSym]) - genLsCache(instance) - } - instance[chindingsSym] = asChindings(instance, bindings) - const childLevel = bindings.level || this.level - instance[setLevelSym](childLevel) - - return instance -} - -function bindings () { - const chindings = this[chindingsSym] - const chindingsJson = `{${chindings.substr(1)}}` // at least contains ,"pid":7068,"hostname":"myMac" - const bindingsFromJson = JSON.parse(chindingsJson) - delete bindingsFromJson.pid - delete bindingsFromJson.hostname - return bindingsFromJson -} - -function setBindings (newBindings) { - const chindings = asChindings(this, newBindings) - this[chindingsSym] = chindings - delete this[parsedChindingsSym] -} - -function write (_obj, msg, num) { - const t = this[timeSym]() - const mixin = this[mixinSym] - const objError = _obj instanceof Error - let obj - - if (_obj === undefined || _obj === null) { - obj = mixin ? mixin({}) : {} - } else { - obj = Object.assign(mixin ? mixin(_obj) : {}, _obj) - if (!msg && objError) { - msg = _obj.message - } - - if (objError) { - obj.stack = _obj.stack - if (!obj.type) { - obj.type = 'Error' - } - } - } - - const s = this[asJsonSym](obj, msg, num, t) - - const stream = this[streamSym] - if (stream[needsMetadataGsym] === true) { - stream.lastLevel = num - stream.lastObj = obj - stream.lastMsg = msg - stream.lastTime = t.slice(this[timeSliceIndexSym]) - stream.lastLogger = this // for child loggers - } - if (stream instanceof SonicBoom) stream.write(s) - else stream.write(flatstr(s)) -} - -function flush () { - const stream = this[streamSym] - if ('flush' in stream) stream.flush() -} diff --git a/node_modules/pino/lib/redaction.js b/node_modules/pino/lib/redaction.js deleted file mode 100644 index c5d7d897..00000000 --- a/node_modules/pino/lib/redaction.js +++ /dev/null @@ -1,118 +0,0 @@ -'use strict' - -const fastRedact = require('fast-redact') -const { redactFmtSym, wildcardFirstSym } = require('./symbols') -const { rx, validator } = fastRedact - -const validate = validator({ - ERR_PATHS_MUST_BE_STRINGS: () => 'pino – redacted paths must be strings', - ERR_INVALID_PATH: (s) => `pino – redact paths array contains an invalid path (${s})` -}) - -const CENSOR = '[Redacted]' -const strict = false // TODO should this be configurable? - -function redaction (opts, serialize) { - const { paths, censor } = handle(opts) - - const shape = paths.reduce((o, str) => { - rx.lastIndex = 0 - const first = rx.exec(str) - const next = rx.exec(str) - - // ns is the top-level path segment, brackets + quoting removed. - let ns = first[1] !== undefined - ? first[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/, '$1') - : first[0] - - if (ns === '*') { - ns = wildcardFirstSym - } - - // top level key: - if (next === null) { - o[ns] = null - return o - } - - // path with at least two segments: - // if ns is already redacted at the top level, ignore lower level redactions - if (o[ns] === null) { - return o - } - - const { index } = next - const nextPath = `${str.substr(index, str.length - 1)}` - - o[ns] = o[ns] || [] - - // shape is a mix of paths beginning with literal values and wildcard - // paths [ "a.b.c", "*.b.z" ] should reduce to a shape of - // { "a": [ "b.c", "b.z" ], *: [ "b.z" ] } - // note: "b.z" is in both "a" and * arrays because "a" matches the wildcard. - // (* entry has wildcardFirstSym as key) - if (ns !== wildcardFirstSym && o[ns].length === 0) { - // first time ns's get all '*' redactions so far - o[ns].push(...(o[wildcardFirstSym] || [])) - } - - if (ns === wildcardFirstSym) { - // new * path gets added to all previously registered literal ns's. - Object.keys(o).forEach(function (k) { - if (o[k]) { - o[k].push(nextPath) - } - }) - } - - o[ns].push(nextPath) - return o - }, {}) - - // the redactor assigned to the format symbol key - // provides top level redaction for instances where - // an object is interpolated into the msg string - const result = { - [redactFmtSym]: fastRedact({ paths, censor, serialize, strict }) - } - - const topCensor = (...args) => { - return typeof censor === 'function' ? serialize(censor(...args)) : serialize(censor) - } - - return [...Object.keys(shape), ...Object.getOwnPropertySymbols(shape)].reduce((o, k) => { - // top level key: - if (shape[k] === null) { - o[k] = (value) => topCensor(value, [k]) - } else { - const wrappedCensor = typeof censor === 'function' - ? (value, path) => { - return censor(value, [k, ...path]) - } - : censor - o[k] = fastRedact({ - paths: shape[k], - censor: wrappedCensor, - serialize, - strict - }) - } - return o - }, result) -} - -function handle (opts) { - if (Array.isArray(opts)) { - opts = { paths: opts, censor: CENSOR } - validate(opts) - return opts - } - let { paths, censor = CENSOR, remove } = opts - if (Array.isArray(paths) === false) { throw Error('pino – redact must contain an array of strings') } - if (remove === true) censor = undefined - validate({ paths, censor }) - - return { paths, censor } -} - -module.exports = redaction diff --git a/node_modules/pino/lib/symbols.js b/node_modules/pino/lib/symbols.js deleted file mode 100644 index 880cee2e..00000000 --- a/node_modules/pino/lib/symbols.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict' - -const setLevelSym = Symbol('pino.setLevel') -const getLevelSym = Symbol('pino.getLevel') -const levelValSym = Symbol('pino.levelVal') -const useLevelLabelsSym = Symbol('pino.useLevelLabels') -const useOnlyCustomLevelsSym = Symbol('pino.useOnlyCustomLevels') -const mixinSym = Symbol('pino.mixin') - -const lsCacheSym = Symbol('pino.lsCache') -const chindingsSym = Symbol('pino.chindings') -const parsedChindingsSym = Symbol('pino.parsedChindings') - -const asJsonSym = Symbol('pino.asJson') -const writeSym = Symbol('pino.write') -const redactFmtSym = Symbol('pino.redactFmt') - -const timeSym = Symbol('pino.time') -const timeSliceIndexSym = Symbol('pino.timeSliceIndex') -const streamSym = Symbol('pino.stream') -const stringifySym = Symbol('pino.stringify') -const stringifiersSym = Symbol('pino.stringifiers') -const endSym = Symbol('pino.end') -const formatOptsSym = Symbol('pino.formatOpts') -const messageKeySym = Symbol('pino.messageKey') -const nestedKeySym = Symbol('pino.nestedKey') - -const wildcardFirstSym = Symbol('pino.wildcardFirst') - -// public symbols, no need to use the same pino -// version for these -const serializersSym = Symbol.for('pino.serializers') -const formattersSym = Symbol.for('pino.formatters') -const hooksSym = Symbol.for('pino.hooks') -const needsMetadataGsym = Symbol.for('pino.metadata') - -module.exports = { - setLevelSym, - getLevelSym, - levelValSym, - useLevelLabelsSym, - mixinSym, - lsCacheSym, - chindingsSym, - parsedChindingsSym, - asJsonSym, - writeSym, - serializersSym, - redactFmtSym, - timeSym, - timeSliceIndexSym, - streamSym, - stringifySym, - stringifiersSym, - endSym, - formatOptsSym, - messageKeySym, - nestedKeySym, - wildcardFirstSym, - needsMetadataGsym, - useOnlyCustomLevelsSym, - formattersSym, - hooksSym -} diff --git a/node_modules/pino/lib/time.js b/node_modules/pino/lib/time.js deleted file mode 100644 index 420a028f..00000000 --- a/node_modules/pino/lib/time.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -const nullTime = () => '' - -const epochTime = () => `,"time":${Date.now()}` - -const unixTime = () => `,"time":${Math.round(Date.now() / 1000.0)}` - -const isoTime = () => `,"time":"${new Date(Date.now()).toISOString()}"` // using Date.now() for testability - -module.exports = { nullTime, epochTime, unixTime, isoTime } diff --git a/node_modules/pino/lib/tools.js b/node_modules/pino/lib/tools.js deleted file mode 100644 index 57398a73..00000000 --- a/node_modules/pino/lib/tools.js +++ /dev/null @@ -1,437 +0,0 @@ -'use strict' - -/* eslint no-prototype-builtins: 0 */ - -const format = require('quick-format-unescaped') -const { mapHttpRequest, mapHttpResponse } = require('pino-std-serializers') -const SonicBoom = require('sonic-boom') -const stringifySafe = require('fast-safe-stringify') -const { - lsCacheSym, - chindingsSym, - parsedChindingsSym, - writeSym, - serializersSym, - formatOptsSym, - endSym, - stringifiersSym, - stringifySym, - wildcardFirstSym, - needsMetadataGsym, - redactFmtSym, - streamSym, - nestedKeySym, - formattersSym, - messageKeySym -} = require('./symbols') - -function noop () {} - -function genLog (level, hook) { - if (!hook) return LOG - - return function hookWrappedLog (...args) { - hook.call(this, args, LOG, level) - } - - function LOG (o, ...n) { - if (typeof o === 'object') { - let msg = o - if (o !== null) { - if (o.method && o.headers && o.socket) { - o = mapHttpRequest(o) - } else if (typeof o.setHeader === 'function') { - o = mapHttpResponse(o) - } - } - if (this[nestedKeySym]) o = { [this[nestedKeySym]]: o } - let formatParams - if (msg === null && n.length === 0) { - formatParams = [null] - } else { - msg = n.shift() - formatParams = n - } - this[writeSym](o, format(msg, formatParams, this[formatOptsSym]), level) - } else { - this[writeSym](null, format(o, n, this[formatOptsSym]), level) - } - } -} - -// magically escape strings for json -// relying on their charCodeAt -// everything below 32 needs JSON.stringify() -// 34 and 92 happens all the time, so we -// have a fast case for them -function asString (str) { - let result = '' - let last = 0 - let found = false - let point = 255 - const l = str.length - if (l > 100) { - return JSON.stringify(str) - } - for (var i = 0; i < l && point >= 32; i++) { - point = str.charCodeAt(i) - if (point === 34 || point === 92) { - result += str.slice(last, i) + '\\' - last = i - found = true - } - } - if (!found) { - result = str - } else { - result += str.slice(last) - } - return point < 32 ? JSON.stringify(str) : '"' + result + '"' -} - -function asJson (obj, msg, num, time) { - const stringify = this[stringifySym] - const stringifiers = this[stringifiersSym] - const end = this[endSym] - const chindings = this[chindingsSym] - const serializers = this[serializersSym] - const formatters = this[formattersSym] - const messageKey = this[messageKeySym] - let data = this[lsCacheSym][num] + time - - // we need the child bindings added to the output first so instance logged - // objects can take precedence when JSON.parse-ing the resulting log line - data = data + chindings - - let value - const notHasOwnProperty = obj.hasOwnProperty === undefined - if (formatters.log) { - obj = formatters.log(obj) - } - if (msg !== undefined) { - obj[messageKey] = msg - } - const wildcardStringifier = stringifiers[wildcardFirstSym] - for (const key in obj) { - value = obj[key] - if ((notHasOwnProperty || obj.hasOwnProperty(key)) && value !== undefined) { - value = serializers[key] ? serializers[key](value) : value - - const stringifier = stringifiers[key] || wildcardStringifier - - switch (typeof value) { - case 'undefined': - case 'function': - continue - case 'number': - /* eslint no-fallthrough: "off" */ - if (Number.isFinite(value) === false) { - value = null - } - // this case explicitly falls through to the next one - case 'boolean': - if (stringifier) value = stringifier(value) - break - case 'string': - value = (stringifier || asString)(value) - break - default: - value = (stringifier || stringify)(value) - } - if (value === undefined) continue - data += ',"' + key + '":' + value - } - } - - return data + end -} - -function asChindings (instance, bindings) { - let value - let data = instance[chindingsSym] - const stringify = instance[stringifySym] - const stringifiers = instance[stringifiersSym] - const wildcardStringifier = stringifiers[wildcardFirstSym] - const serializers = instance[serializersSym] - const formatter = instance[formattersSym].bindings - bindings = formatter(bindings) - - for (const key in bindings) { - value = bindings[key] - const valid = key !== 'level' && - key !== 'serializers' && - key !== 'formatters' && - key !== 'customLevels' && - bindings.hasOwnProperty(key) && - value !== undefined - if (valid === true) { - value = serializers[key] ? serializers[key](value) : value - value = (stringifiers[key] || wildcardStringifier || stringify)(value) - if (value === undefined) continue - data += ',"' + key + '":' + value - } - } - return data -} - -function getPrettyStream (opts, prettifier, dest, instance) { - if (prettifier && typeof prettifier === 'function') { - prettifier = prettifier.bind(instance) - return prettifierMetaWrapper(prettifier(opts), dest, opts) - } - try { - const prettyFactory = require('pino-pretty') - prettyFactory.asMetaWrapper = prettifierMetaWrapper - return prettifierMetaWrapper(prettyFactory(opts), dest, opts) - } catch (e) { - if (e.message.startsWith("Cannot find module 'pino-pretty'")) { - throw Error('Missing `pino-pretty` module: `pino-pretty` must be installed separately') - }; - throw e - } -} - -function prettifierMetaWrapper (pretty, dest, opts) { - opts = Object.assign({ suppressFlushSyncWarning: false }, opts) - let warned = false - return { - [needsMetadataGsym]: true, - lastLevel: 0, - lastMsg: null, - lastObj: null, - lastLogger: null, - flushSync () { - if (opts.suppressFlushSyncWarning || warned) { - return - } - warned = true - setMetadataProps(dest, this) - dest.write(pretty(Object.assign({ - level: 40, // warn - msg: 'pino.final with prettyPrint does not support flushing', - time: Date.now() - }, this.chindings()))) - }, - chindings () { - const lastLogger = this.lastLogger - let chindings = null - - // protection against flushSync being called before logging - // anything - if (!lastLogger) { - return null - } - - if (lastLogger.hasOwnProperty(parsedChindingsSym)) { - chindings = lastLogger[parsedChindingsSym] - } else { - chindings = JSON.parse('{' + lastLogger[chindingsSym].substr(1) + '}') - lastLogger[parsedChindingsSym] = chindings - } - - return chindings - }, - write (chunk) { - const lastLogger = this.lastLogger - const chindings = this.chindings() - - let time = this.lastTime - - if (time.match(/^\d+/)) { - time = parseInt(time) - } else { - time = time.slice(1, -1) - } - - const lastObj = this.lastObj - const lastMsg = this.lastMsg - const errorProps = null - - const formatters = lastLogger[formattersSym] - const formattedObj = formatters.log ? formatters.log(lastObj) : lastObj - - const messageKey = lastLogger[messageKeySym] - if (lastMsg && formattedObj && !formattedObj.hasOwnProperty(messageKey)) { - formattedObj[messageKey] = lastMsg - } - - const obj = Object.assign({ - level: this.lastLevel, - time - }, formattedObj, errorProps) - - const serializers = lastLogger[serializersSym] - const keys = Object.keys(serializers) - - for (var i = 0; i < keys.length; i++) { - const key = keys[i] - if (obj[key] !== undefined) { - obj[key] = serializers[key](obj[key]) - } - } - - for (const key in chindings) { - if (!obj.hasOwnProperty(key)) { - obj[key] = chindings[key] - } - } - - const stringifiers = lastLogger[stringifiersSym] - const redact = stringifiers[redactFmtSym] - - const formatted = pretty(typeof redact === 'function' ? redact(obj) : obj) - if (formatted === undefined) return - - setMetadataProps(dest, this) - dest.write(formatted) - } - } -} - -function hasBeenTampered (stream) { - return stream.write !== stream.constructor.prototype.write -} - -function buildSafeSonicBoom (opts) { - const stream = new SonicBoom(opts) - stream.on('error', filterBrokenPipe) - return stream - - function filterBrokenPipe (err) { - // TODO verify on Windows - if (err.code === 'EPIPE') { - // If we get EPIPE, we should stop logging here - // however we have no control to the consumer of - // SonicBoom, so we just overwrite the write method - stream.write = noop - stream.end = noop - stream.flushSync = noop - stream.destroy = noop - return - } - stream.removeListener('error', filterBrokenPipe) - stream.emit('error', err) - } -} - -function createArgsNormalizer (defaultOptions) { - return function normalizeArgs (instance, opts = {}, stream) { - // support stream as a string - if (typeof opts === 'string') { - stream = buildSafeSonicBoom({ dest: opts, sync: true }) - opts = {} - } else if (typeof stream === 'string') { - stream = buildSafeSonicBoom({ dest: stream, sync: true }) - } else if (opts instanceof SonicBoom || opts.writable || opts._writableState) { - stream = opts - opts = null - } - opts = Object.assign({}, defaultOptions, opts) - if ('extreme' in opts) { - throw Error('The extreme option has been removed, use pino.destination({ sync: false }) instead') - } - if ('onTerminated' in opts) { - throw Error('The onTerminated option has been removed, use pino.final instead') - } - if ('changeLevelName' in opts) { - process.emitWarning( - 'The changeLevelName option is deprecated and will be removed in v7. Use levelKey instead.', - { code: 'changeLevelName_deprecation' } - ) - opts.levelKey = opts.changeLevelName - delete opts.changeLevelName - } - const { enabled, prettyPrint, prettifier, messageKey } = opts - if (enabled === false) opts.level = 'silent' - stream = stream || process.stdout - if (stream === process.stdout && stream.fd >= 0 && !hasBeenTampered(stream)) { - stream = buildSafeSonicBoom({ fd: stream.fd, sync: true }) - } - if (prettyPrint) { - const prettyOpts = Object.assign({ messageKey }, prettyPrint) - stream = getPrettyStream(prettyOpts, prettifier, stream, instance) - } - return { opts, stream } - } -} - -function final (logger, handler) { - if (typeof logger === 'undefined' || typeof logger.child !== 'function') { - throw Error('expected a pino logger instance') - } - const hasHandler = (typeof handler !== 'undefined') - if (hasHandler && typeof handler !== 'function') { - throw Error('if supplied, the handler parameter should be a function') - } - const stream = logger[streamSym] - if (typeof stream.flushSync !== 'function') { - throw Error('final requires a stream that has a flushSync method, such as pino.destination') - } - - const finalLogger = new Proxy(logger, { - get: (logger, key) => { - if (key in logger.levels.values) { - return (...args) => { - logger[key](...args) - stream.flushSync() - } - } - return logger[key] - } - }) - - if (!hasHandler) { - return finalLogger - } - - return (err = null, ...args) => { - try { - stream.flushSync() - } catch (e) { - // it's too late to wait for the stream to be ready - // because this is a final tick scenario. - // in practice there shouldn't be a situation where it isn't - // however, swallow the error just in case (and for easier testing) - } - return handler(err, finalLogger, ...args) - } -} - -function stringify (obj) { - try { - return JSON.stringify(obj) - } catch (_) { - return stringifySafe(obj) - } -} - -function buildFormatters (level, bindings, log) { - return { - level, - bindings, - log - } -} - -function setMetadataProps (dest, that) { - if (dest[needsMetadataGsym] === true) { - dest.lastLevel = that.lastLevel - dest.lastMsg = that.lastMsg - dest.lastObj = that.lastObj - dest.lastTime = that.lastTime - dest.lastLogger = that.lastLogger - } -} - -module.exports = { - noop, - buildSafeSonicBoom, - getPrettyStream, - asChindings, - asJson, - genLog, - createArgsNormalizer, - final, - stringify, - buildFormatters -} diff --git a/node_modules/pino/package.json b/node_modules/pino/package.json deleted file mode 100644 index 3af7ddf0..00000000 --- a/node_modules/pino/package.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "_from": "pino@~6.11", - "_id": "pino@6.11.3", - "_inBundle": false, - "_integrity": "sha512-drPtqkkSf0ufx2gaea3TryFiBHdNIdXKf5LN0hTM82SXI4xVIve2wLwNg92e1MT6m3jASLu6VO7eGY6+mmGeyw==", - "_location": "/pino", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "pino@~6.11", - "name": "pino", - "escapedName": "pino", - "rawSpec": "~6.11", - "saveSpec": null, - "fetchSpec": "~6.11" - }, - "_requiredBy": [ - "/@antora/logger" - ], - "_resolved": "https://registry.npmjs.org/pino/-/pino-6.11.3.tgz", - "_shasum": "0c02eec6029d25e6794fdb6bbea367247d74bc29", - "_spec": "pino@~6.11", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/logger", - "author": { - "name": "Matteo Collina", - "email": "hello@matteocollina.com" - }, - "bin": { - "pino": "bin.js" - }, - "browser": "./browser.js", - "bugs": { - "url": "https://github.com/pinojs/pino/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "David Mark Clements", - "email": "huperekchuno@googlemail.com" - }, - { - "name": "James Sumners", - "email": "james.sumners@gmail.com" - }, - { - "name": "Thomas Watson Steen", - "email": "w@tson.dk", - "url": "https://twitter.com/wa7son" - } - ], - "dependencies": { - "fast-redact": "^3.0.0", - "fast-safe-stringify": "^2.0.7", - "flatstr": "^1.0.12", - "pino-std-serializers": "^3.1.0", - "quick-format-unescaped": "^4.0.3", - "sonic-boom": "^1.0.2" - }, - "deprecated": false, - "description": "super fast, all natural json logger", - "devDependencies": { - "airtap": "4.0.3", - "benchmark": "^2.1.4", - "bole": "^4.0.0", - "bunyan": "^1.8.14", - "docsify-cli": "^4.4.1", - "eslint": "^7.17.0", - "eslint-config-standard": "^16.0.2", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^4.2.1", - "execa": "^5.0.0", - "fastbench": "^1.0.1", - "flush-write-stream": "^2.0.0", - "import-fresh": "^3.2.1", - "log": "^6.0.0", - "loglevel": "^1.6.7", - "pino-pretty": "^4.1.0", - "pre-commit": "^1.2.2", - "proxyquire": "^2.1.3", - "pump": "^3.0.0", - "semver": "^7.0.0", - "split2": "^3.1.1", - "steed": "^1.1.3", - "strip-ansi": "^6.0.0", - "tap": "^15.0.1", - "tape": "^5.0.0", - "through2": "^4.0.0", - "winston": "^3.3.3" - }, - "files": [ - "pino.js", - "bin.js", - "browser.js", - "pretty.js", - "usage.txt", - "test", - "docs", - "example.js", - "lib" - ], - "homepage": "http://getpino.io", - "keywords": [ - "fast", - "logger", - "stream", - "json" - ], - "license": "MIT", - "main": "pino.js", - "name": "pino", - "precommit": "test", - "repository": { - "type": "git", - "url": "git+https://github.com/pinojs/pino.git" - }, - "scripts": { - "bench": "node benchmarks/utils/runbench all", - "bench-basic": "node benchmarks/utils/runbench basic", - "bench-child": "node benchmarks/utils/runbench child", - "bench-child-child": "node benchmarks/utils/runbench child-child", - "bench-child-creation": "node benchmarks/utils/runbench child-creation", - "bench-deep-object": "node benchmarks/utils/runbench deep-object", - "bench-formatters": "node benchmarks/utils/runbench formatters", - "bench-longs-tring": "node benchmarks/utils/runbench long-string", - "bench-multi-arg": "node benchmarks/utils/runbench multi-arg", - "bench-object": "node benchmarks/utils/runbench object", - "browser-test": "airtap --local 8080 test/browser*test.js", - "cov-ui": "tap --coverage-report=html test/*test.js test/*/*test.js", - "docs": "docsify serve", - "lint": "eslint .", - "test": "npm run lint && tap --100 test/*test.js test/*/*test.js", - "test-ci": "npm run lint && tap test/*test.js test/*/*test.js --coverage-report=lcovonly", - "update-bench-doc": "node benchmarks/utils/generate-benchmark-doc > docs/benchmarks.md" - }, - "version": "6.11.3" -} diff --git a/node_modules/pino/pino.js b/node_modules/pino/pino.js deleted file mode 100644 index 0d0e3e33..00000000 --- a/node_modules/pino/pino.js +++ /dev/null @@ -1,235 +0,0 @@ -'use strict' -/* eslint no-prototype-builtins: 0 */ -const os = require('os') -const stdSerializers = require('pino-std-serializers') -const redaction = require('./lib/redaction') -const time = require('./lib/time') -const proto = require('./lib/proto') -const symbols = require('./lib/symbols') -const { assertDefaultLevelFound, mappings, genLsCache } = require('./lib/levels') -const { - createArgsNormalizer, - asChindings, - final, - stringify, - buildSafeSonicBoom, - buildFormatters, - noop -} = require('./lib/tools') -const { version } = require('./lib/meta') -const { - chindingsSym, - redactFmtSym, - serializersSym, - timeSym, - timeSliceIndexSym, - streamSym, - stringifySym, - stringifiersSym, - setLevelSym, - endSym, - formatOptsSym, - messageKeySym, - nestedKeySym, - mixinSym, - useOnlyCustomLevelsSym, - formattersSym, - hooksSym -} = symbols -const { epochTime, nullTime } = time -const { pid } = process -const hostname = os.hostname() -const defaultErrorSerializer = stdSerializers.err -const defaultOptions = { - level: 'info', - messageKey: 'msg', - nestedKey: null, - enabled: true, - prettyPrint: false, - base: { pid, hostname }, - serializers: Object.assign(Object.create(null), { - err: defaultErrorSerializer - }), - formatters: Object.assign(Object.create(null), { - bindings (bindings) { - return bindings - }, - level (label, number) { - return { level: number } - } - }), - hooks: { - logMethod: undefined - }, - timestamp: epochTime, - name: undefined, - redact: null, - customLevels: null, - levelKey: undefined, - useOnlyCustomLevels: false -} - -const normalize = createArgsNormalizer(defaultOptions) - -const serializers = Object.assign(Object.create(null), stdSerializers) - -function pino (...args) { - const instance = {} - const { opts, stream } = normalize(instance, ...args) - const { - redact, - crlf, - serializers, - timestamp, - messageKey, - nestedKey, - base, - name, - level, - customLevels, - useLevelLabels, - changeLevelName, - levelKey, - mixin, - useOnlyCustomLevels, - formatters, - hooks - } = opts - - const allFormatters = buildFormatters( - formatters.level, - formatters.bindings, - formatters.log - ) - - if (useLevelLabels && !(changeLevelName || levelKey)) { - process.emitWarning('useLevelLabels is deprecated, use the formatters.level option instead', 'Warning', 'PINODEP001') - allFormatters.level = labelsFormatter - } else if ((changeLevelName || levelKey) && !useLevelLabels) { - process.emitWarning('changeLevelName and levelKey are deprecated, use the formatters.level option instead', 'Warning', 'PINODEP002') - allFormatters.level = levelNameFormatter(changeLevelName || levelKey) - } else if ((changeLevelName || levelKey) && useLevelLabels) { - process.emitWarning('useLevelLabels is deprecated, use the formatters.level option instead', 'Warning', 'PINODEP001') - process.emitWarning('changeLevelName and levelKey are deprecated, use the formatters.level option instead', 'Warning', 'PINODEP002') - allFormatters.level = levelNameLabelFormatter(changeLevelName || levelKey) - } - - if (serializers[Symbol.for('pino.*')]) { - process.emitWarning('The pino.* serializer is deprecated, use the formatters.log options instead', 'Warning', 'PINODEP003') - allFormatters.log = serializers[Symbol.for('pino.*')] - } - - if (!allFormatters.bindings) { - allFormatters.bindings = defaultOptions.formatters.bindings - } - if (!allFormatters.level) { - allFormatters.level = defaultOptions.formatters.level - } - - const stringifiers = redact ? redaction(redact, stringify) : {} - const formatOpts = redact - ? { stringify: stringifiers[redactFmtSym] } - : { stringify } - const end = '}' + (crlf ? '\r\n' : '\n') - const coreChindings = asChindings.bind(null, { - [chindingsSym]: '', - [serializersSym]: serializers, - [stringifiersSym]: stringifiers, - [stringifySym]: stringify, - [formattersSym]: allFormatters - }) - - let chindings = '' - if (base !== null) { - if (name === undefined) { - chindings = coreChindings(base) - } else { - chindings = coreChindings(Object.assign({}, base, { name })) - } - } - - const time = (timestamp instanceof Function) - ? timestamp - : (timestamp ? epochTime : nullTime) - const timeSliceIndex = time().indexOf(':') + 1 - - if (useOnlyCustomLevels && !customLevels) throw Error('customLevels is required if useOnlyCustomLevels is set true') - if (mixin && typeof mixin !== 'function') throw Error(`Unknown mixin type "${typeof mixin}" - expected "function"`) - - assertDefaultLevelFound(level, customLevels, useOnlyCustomLevels) - const levels = mappings(customLevels, useOnlyCustomLevels) - - Object.assign(instance, { - levels, - [useOnlyCustomLevelsSym]: useOnlyCustomLevels, - [streamSym]: stream, - [timeSym]: time, - [timeSliceIndexSym]: timeSliceIndex, - [stringifySym]: stringify, - [stringifiersSym]: stringifiers, - [endSym]: end, - [formatOptsSym]: formatOpts, - [messageKeySym]: messageKey, - [nestedKeySym]: nestedKey, - [serializersSym]: serializers, - [mixinSym]: mixin, - [chindingsSym]: chindings, - [formattersSym]: allFormatters, - [hooksSym]: hooks, - silent: noop - }) - - Object.setPrototypeOf(instance, proto()) - - genLsCache(instance) - - instance[setLevelSym](level) - - return instance -} - -function labelsFormatter (label, number) { - return { level: label } -} - -function levelNameFormatter (name) { - return function (label, number) { - return { [name]: number } - } -} - -function levelNameLabelFormatter (name) { - return function (label, number) { - return { [name]: label } - } -} - -module.exports = pino - -module.exports.extreme = (dest = process.stdout.fd) => { - process.emitWarning( - 'The pino.extreme() option is deprecated and will be removed in v7. Use pino.destination({ sync: false }) instead.', - { code: 'extreme_deprecation' } - ) - return buildSafeSonicBoom({ dest, minLength: 4096, sync: false }) -} - -module.exports.destination = (dest = process.stdout.fd) => { - if (typeof dest === 'object') { - dest.dest = dest.dest || process.stdout.fd - return buildSafeSonicBoom(dest) - } else { - return buildSafeSonicBoom({ dest, minLength: 0, sync: true }) - } -} - -module.exports.final = final -module.exports.levels = mappings() -module.exports.stdSerializers = serializers -module.exports.stdTimeFunctions = Object.assign({}, time) -module.exports.symbols = symbols -module.exports.version = version - -// Enables default and name export with TypeScript and Babel -module.exports.default = pino -module.exports.pino = pino diff --git a/node_modules/pino/test/basic.test.js b/node_modules/pino/test/basic.test.js deleted file mode 100644 index 52d5e5db..00000000 --- a/node_modules/pino/test/basic.test.js +++ /dev/null @@ -1,667 +0,0 @@ -'use strict' -const os = require('os') -const { join } = require('path') -const { readFileSync } = require('fs') -const { test } = require('tap') -const { sink, check, once, watchFileCreated } = require('./helper') -const pino = require('../') -const { version } = require('../package.json') -const { pid } = process -const hostname = os.hostname() - -test('pino version is exposed on export', async ({ equal }) => { - equal(pino.version, version) -}) - -test('pino version is exposed on instance', async ({ equal }) => { - const instance = pino() - equal(instance.version, version) -}) - -test('child instance exposes pino version', async ({ equal }) => { - const child = pino().child({ foo: 'bar' }) - equal(child.version, version) -}) - -test('bindings are exposed on every instance', async ({ same }) => { - const instance = pino() - same(instance.bindings(), {}) -}) - -test('bindings contain the name and the child bindings', async ({ same }) => { - const instance = pino({ name: 'basicTest', level: 'info' }).child({ foo: 'bar' }).child({ a: 2 }) - same(instance.bindings(), { name: 'basicTest', foo: 'bar', a: 2 }) -}) - -test('set bindings on instance', async ({ same }) => { - const instance = pino({ name: 'basicTest', level: 'info' }) - instance.setBindings({ foo: 'bar' }) - same(instance.bindings(), { name: 'basicTest', foo: 'bar' }) -}) - -test('newly set bindings overwrite old bindings', async ({ same }) => { - const instance = pino({ name: 'basicTest', level: 'info', base: { foo: 'bar' } }) - instance.setBindings({ foo: 'baz' }) - same(instance.bindings(), { name: 'basicTest', foo: 'baz' }) -}) - -test('set bindings on child instance', async ({ same }) => { - const child = pino({ name: 'basicTest', level: 'info' }).child({}) - child.setBindings({ foo: 'bar' }) - same(child.bindings(), { name: 'basicTest', foo: 'bar' }) -}) - -test('child should have bindings set by parent', async ({ same }) => { - const instance = pino({ name: 'basicTest', level: 'info' }) - instance.setBindings({ foo: 'bar' }) - const child = instance.child({}) - same(child.bindings(), { name: 'basicTest', foo: 'bar' }) -}) - -test('child should not share bindings of parent set after child creation', async ({ same }) => { - const instance = pino({ name: 'basicTest', level: 'info' }) - const child = instance.child({}) - instance.setBindings({ foo: 'bar' }) - same(instance.bindings(), { name: 'basicTest', foo: 'bar' }) - same(child.bindings(), { name: 'basicTest' }) -}) - -function levelTest (name, level) { - test(`${name} logs as ${level}`, async ({ equal }) => { - const stream = sink() - const instance = pino(stream) - instance.level = name - instance[name]('hello world') - check(equal, await once(stream, 'data'), level, 'hello world') - }) - - test(`passing objects at level ${name}`, async ({ equal, same }) => { - const stream = sink() - const instance = pino(stream) - instance.level = name - const obj = { hello: 'world' } - instance[name](obj) - - const result = await once(stream, 'data') - equal(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - equal(result.pid, pid) - equal(result.hostname, hostname) - equal(result.level, level) - equal(result.hello, 'world') - same(Object.keys(obj), ['hello']) - }) - - test(`passing an object and a string at level ${name}`, async ({ equal, same }) => { - const stream = sink() - const instance = pino(stream) - instance.level = name - const obj = { hello: 'world' } - instance[name](obj, 'a string') - const result = await once(stream, 'data') - equal(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level, - msg: 'a string', - hello: 'world' - }) - same(Object.keys(obj), ['hello']) - }) - - test(`overriding object key by string at level ${name}`, async ({ equal, same }) => { - const stream = sink() - const instance = pino(stream) - instance.level = name - instance[name]({ hello: 'world', msg: 'object' }, 'string') - const result = await once(stream, 'data') - equal(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level, - msg: 'string', - hello: 'world' - }) - }) - - test(`formatting logs as ${name}`, async ({ equal }) => { - const stream = sink() - const instance = pino(stream) - instance.level = name - instance[name]('hello %d', 42) - const result = await once(stream, 'data') - check(equal, result, level, 'hello 42') - }) - - test(`formatting a symbol at level ${name}`, async ({ equal }) => { - const stream = sink() - const instance = pino(stream) - instance.level = name - - const sym = Symbol('foo') - instance[name]('hello %s', sym) - - const result = await once(stream, 'data') - - check(equal, result, level, 'hello Symbol(foo)') - }) - - test(`passing error with a serializer at level ${name}`, async ({ equal, same }) => { - const stream = sink() - const err = new Error('myerror') - const instance = pino({ - serializers: { - err: pino.stdSerializers.err - } - }, stream) - instance.level = name - instance[name]({ err }) - const result = await once(stream, 'data') - equal(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level, - err: { - type: 'Error', - message: err.message, - stack: err.stack - } - }) - }) - - test(`child logger for level ${name}`, async ({ equal, same }) => { - const stream = sink() - const instance = pino(stream) - instance.level = name - const child = instance.child({ hello: 'world' }) - child[name]('hello world') - const result = await once(stream, 'data') - equal(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level, - msg: 'hello world', - hello: 'world' - }) - }) -} - -levelTest('fatal', 60) -levelTest('error', 50) -levelTest('warn', 40) -levelTest('info', 30) -levelTest('debug', 20) -levelTest('trace', 10) - -test('serializers can return undefined to strip field', async ({ equal }) => { - const stream = sink() - const instance = pino({ - serializers: { - test () { return undefined } - } - }, stream) - - instance.info({ test: 'sensitive info' }) - const result = await once(stream, 'data') - equal('test' in result, false) -}) - -test('does not explode with a circular ref', async ({ doesNotThrow }) => { - const stream = sink() - const instance = pino(stream) - const b = {} - const a = { - hello: b - } - b.a = a // circular ref - doesNotThrow(() => instance.info(a)) -}) - -test('set the name', async ({ equal, same }) => { - const stream = sink() - const instance = pino({ - name: 'hello' - }, stream) - instance.fatal('this is fatal') - const result = await once(stream, 'data') - equal(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level: 60, - name: 'hello', - msg: 'this is fatal' - }) -}) - -test('set the messageKey', async ({ equal, same }) => { - const stream = sink() - const message = 'hello world' - const messageKey = 'fooMessage' - const instance = pino({ - messageKey - }, stream) - instance.info(message) - const result = await once(stream, 'data') - equal(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level: 30, - fooMessage: message - }) -}) - -test('set the nestedKey', async ({ equal, same }) => { - const stream = sink() - const object = { hello: 'world' } - const nestedKey = 'stuff' - const instance = pino({ - nestedKey - }, stream) - instance.info(object) - const result = await once(stream, 'data') - equal(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level: 30, - stuff: object - }) -}) - -test('set undefined properties', async ({ equal, same }) => { - const stream = sink() - const instance = pino(stream) - instance.info({ hello: 'world', property: undefined }) - const result = await once(stream, 'data') - equal(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level: 30, - hello: 'world' - }) -}) - -test('prototype properties are not logged', async ({ equal }) => { - const stream = sink() - const instance = pino(stream) - instance.info(Object.create({ hello: 'world' })) - const { hello } = await once(stream, 'data') - equal(hello, undefined) -}) - -test('set the base', async ({ equal, same }) => { - const stream = sink() - const instance = pino({ - base: { - a: 'b' - } - }, stream) - - instance.fatal('this is fatal') - const result = await once(stream, 'data') - equal(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - a: 'b', - level: 60, - msg: 'this is fatal' - }) -}) - -test('set the base to null', async ({ equal, same }) => { - const stream = sink() - const instance = pino({ - base: null - }, stream) - instance.fatal('this is fatal') - const result = await once(stream, 'data') - equal(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - level: 60, - msg: 'this is fatal' - }) -}) - -test('set the base to null and use a formatter', async ({ equal, same }) => { - const stream = sink() - const instance = pino({ - base: null, - formatters: { - log (input) { - return Object.assign({}, input, { additionalMessage: 'using pino' }) - } - } - }, stream) - instance.fatal('this is fatal too') - const result = await once(stream, 'data') - equal(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - level: 60, - msg: 'this is fatal too', - additionalMessage: 'using pino' - }) -}) - -test('throw if creating child without bindings', async ({ equal, fail }) => { - const stream = sink() - const instance = pino(stream) - try { - instance.child() - fail('it should throw') - } catch (err) { - equal(err.message, 'missing bindings for child Pino') - } -}) - -test('correctly escapes msg strings with stray double quote at end', async ({ same }) => { - const stream = sink() - const instance = pino({ - name: 'hello' - }, stream) - - instance.fatal('this contains "') - const result = await once(stream, 'data') - delete result.time - same(result, { - pid, - hostname, - level: 60, - name: 'hello', - msg: 'this contains "' - }) -}) - -test('correctly escape msg strings with unclosed double quote', async ({ same }) => { - const stream = sink() - const instance = pino({ - name: 'hello' - }, stream) - instance.fatal('" this contains') - const result = await once(stream, 'data') - delete result.time - same(result, { - pid, - hostname, - level: 60, - name: 'hello', - msg: '" this contains' - }) -}) - -// https://github.com/pinojs/pino/issues/139 -test('object and format string', async ({ same }) => { - const stream = sink() - const instance = pino(stream) - instance.info({}, 'foo %s', 'bar') - - const result = await once(stream, 'data') - delete result.time - same(result, { - pid, - hostname, - level: 30, - msg: 'foo bar' - }) -}) - -test('object and format string property', async ({ same }) => { - const stream = sink() - const instance = pino(stream) - instance.info({ answer: 42 }, 'foo %s', 'bar') - const result = await once(stream, 'data') - delete result.time - same(result, { - pid, - hostname, - level: 30, - msg: 'foo bar', - answer: 42 - }) -}) - -test('correctly strip undefined when returned from toJSON', async ({ equal }) => { - const stream = sink() - const instance = pino({ - test: 'this' - }, stream) - instance.fatal({ test: { toJSON () { return undefined } } }) - const result = await once(stream, 'data') - equal('test' in result, false) -}) - -test('correctly supports stderr', async ({ same }) => { - // stderr inherits from Stream, rather than Writable - const dest = { - writable: true, - write (result) { - result = JSON.parse(result) - delete result.time - same(result, { - pid, - hostname, - level: 60, - msg: 'a message' - }) - } - } - const instance = pino(dest) - instance.fatal('a message') -}) - -test('normalize number to string', async ({ same }) => { - const stream = sink() - const instance = pino(stream) - instance.info(1) - const result = await once(stream, 'data') - delete result.time - same(result, { - pid, - hostname, - level: 30, - msg: '1' - }) -}) - -test('normalize number to string with an object', async ({ same }) => { - const stream = sink() - const instance = pino(stream) - instance.info({ answer: 42 }, 1) - const result = await once(stream, 'data') - delete result.time - same(result, { - pid, - hostname, - level: 30, - msg: '1', - answer: 42 - }) -}) - -test('handles objects with null prototype', async ({ same }) => { - const stream = sink() - const instance = pino(stream) - const o = Object.create(null) - o.test = 'test' - instance.info(o) - const result = await once(stream, 'data') - delete result.time - same(result, { - pid, - hostname, - level: 30, - test: 'test' - }) -}) - -test('pino.destination', async ({ same }) => { - const tmp = join( - os.tmpdir(), - '_' + Math.random().toString(36).substr(2, 9) - ) - const instance = pino(pino.destination(tmp)) - instance.info('hello') - await watchFileCreated(tmp) - const result = JSON.parse(readFileSync(tmp).toString()) - delete result.time - same(result, { - pid, - hostname, - level: 30, - msg: 'hello' - }) -}) - -test('auto pino.destination with a string', async ({ same }) => { - const tmp = join( - os.tmpdir(), - '_' + Math.random().toString(36).substr(2, 9) - ) - const instance = pino(tmp) - instance.info('hello') - await watchFileCreated(tmp) - const result = JSON.parse(readFileSync(tmp).toString()) - delete result.time - same(result, { - pid, - hostname, - level: 30, - msg: 'hello' - }) -}) - -test('auto pino.destination with a string as second argument', async ({ same }) => { - const tmp = join( - os.tmpdir(), - '_' + Math.random().toString(36).substr(2, 9) - ) - const instance = pino(null, tmp) - instance.info('hello') - await watchFileCreated(tmp) - const result = JSON.parse(readFileSync(tmp).toString()) - delete result.time - same(result, { - pid, - hostname, - level: 30, - msg: 'hello' - }) -}) - -test('does not override opts with a string as second argument', async ({ same }) => { - const tmp = join( - os.tmpdir(), - '_' + Math.random().toString(36).substr(2, 9) - ) - const instance = pino({ - timestamp: () => ',"time":"none"' - }, tmp) - instance.info('hello') - await watchFileCreated(tmp) - const result = JSON.parse(readFileSync(tmp).toString()) - same(result, { - pid, - hostname, - level: 30, - time: 'none', - msg: 'hello' - }) -}) - -// https://github.com/pinojs/pino/issues/222 -test('children with same names render in correct order', async ({ equal }) => { - const stream = sink() - const root = pino(stream) - root.child({ a: 1 }).child({ a: 2 }).info({ a: 3 }) - const { a } = await once(stream, 'data') - equal(a, 3, 'last logged object takes precedence') -}) - -// https://github.com/pinojs/pino/pull/251 - use this.stringify -test('use `fast-safe-stringify` to avoid circular dependencies', async ({ same }) => { - const stream = sink() - const root = pino(stream) - // circular depth - const obj = {} - obj.a = obj - root.info(obj) - const { a } = await once(stream, 'data') - same(a, { a: '[Circular]' }) -}) - -test('fast-safe-stringify must be used when interpolating', async (t) => { - const stream = sink() - const instance = pino(stream) - - const o = { a: { b: {} } } - o.a.b.c = o.a.b - instance.info('test %j', o) - - const { msg } = await once(stream, 'data') - t.equal(msg, 'test {"a":{"b":{"c":"[Circular]"}}}') -}) - -test('throws when setting useOnlyCustomLevels without customLevels', async ({ throws }) => { - throws(() => { - pino({ - useOnlyCustomLevels: true - }) - }, 'customLevels is required if useOnlyCustomLevels is set true') -}) - -test('correctly log Infinity', async (t) => { - const stream = sink() - const instance = pino(stream) - - const o = { num: Infinity } - instance.info(o) - - const { num } = await once(stream, 'data') - t.equal(num, null) -}) - -test('correctly log -Infinity', async (t) => { - const stream = sink() - const instance = pino(stream) - - const o = { num: -Infinity } - instance.info(o) - - const { num } = await once(stream, 'data') - t.equal(num, null) -}) - -test('correctly log NaN', async (t) => { - const stream = sink() - const instance = pino(stream) - - const o = { num: NaN } - instance.info(o) - - const { num } = await once(stream, 'data') - t.equal(num, null) -}) - -test('offers a .default() method to please typescript', async ({ equal }) => { - equal(pino.default, pino) - - const stream = sink() - const instance = pino.default(stream) - instance.info('hello world') - check(equal, await once(stream, 'data'), 30, 'hello world') -}) diff --git a/node_modules/pino/test/broken-pipe.test.js b/node_modules/pino/test/broken-pipe.test.js deleted file mode 100644 index bfb9deb3..00000000 --- a/node_modules/pino/test/broken-pipe.test.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict' - -const t = require('tap') -const { join } = require('path') -const { fork } = require('child_process') -const { once } = require('./helper') -const pino = require('..') - -function test (file) { - file = join('fixtures', 'broken-pipe', file) - t.test(file, { parallel: true }, async ({ equal }) => { - const child = fork(join(__dirname, file), { silent: true }) - child.stdout.destroy() - - child.stderr.pipe(process.stdout) - - const res = await once(child, 'close') - equal(res, 0) // process exits successfully - }) -} - -t.jobs = 42 - -test('basic.js') -test('destination.js') -test('syncfalse.js') - -t.test('let error pass through', ({ equal, plan }) => { - plan(3) - const stream = pino.destination() - - // side effect of the pino constructor is that it will set an - // event handler for error - pino(stream) - - process.nextTick(() => stream.emit('error', new Error('kaboom'))) - process.nextTick(() => stream.emit('error', new Error('kaboom'))) - - stream.on('error', (err) => { - equal(err.message, 'kaboom') - }) -}) diff --git a/node_modules/pino/test/browser-levels.test.js b/node_modules/pino/test/browser-levels.test.js deleted file mode 100644 index 6a2a9881..00000000 --- a/node_modules/pino/test/browser-levels.test.js +++ /dev/null @@ -1,218 +0,0 @@ -'use strict' -const test = require('tape') -const pino = require('../browser') - -test('set the level by string', ({ end, same, is }) => { - const expected = [ - { - level: 50, - msg: 'this is an error' - }, - { - level: 60, - msg: 'this is fatal' - } - ] - const instance = pino({ - browser: { - write (actual) { - checkLogObjects(is, same, actual, expected.shift()) - } - } - }) - - instance.level = 'error' - instance.info('hello world') - instance.error('this is an error') - instance.fatal('this is fatal') - - end() -}) - -test('set the level by string. init with silent', ({ end, same, is }) => { - const expected = [ - { - level: 50, - msg: 'this is an error' - }, - { - level: 60, - msg: 'this is fatal' - } - ] - const instance = pino({ - level: 'silent', - browser: { - write (actual) { - checkLogObjects(is, same, actual, expected.shift()) - } - } - }) - - instance.level = 'error' - instance.info('hello world') - instance.error('this is an error') - instance.fatal('this is fatal') - - end() -}) - -test('set the level by string. init with silent and transmit', ({ end, same, is }) => { - const expected = [ - { - level: 50, - msg: 'this is an error' - }, - { - level: 60, - msg: 'this is fatal' - } - ] - const instance = pino({ - level: 'silent', - browser: { - write (actual) { - checkLogObjects(is, same, actual, expected.shift()) - } - }, - transmit: { - send () {} - } - }) - - instance.level = 'error' - instance.info('hello world') - instance.error('this is an error') - instance.fatal('this is fatal') - - end() -}) - -test('set the level via constructor', ({ end, same, is }) => { - const expected = [ - { - level: 50, - msg: 'this is an error' - }, - { - level: 60, - msg: 'this is fatal' - } - ] - const instance = pino({ - level: 'error', - browser: { - write (actual) { - checkLogObjects(is, same, actual, expected.shift()) - } - } - }) - - instance.info('hello world') - instance.error('this is an error') - instance.fatal('this is fatal') - - end() -}) - -test('the wrong level throws', ({ end, throws }) => { - const instance = pino() - throws(() => { - instance.level = 'kaboom' - }) - end() -}) - -test('the wrong level by number throws', ({ end, throws }) => { - const instance = pino() - throws(() => { - instance.levelVal = 55 - }) - end() -}) - -test('exposes level string mappings', ({ end, is }) => { - is(pino.levels.values.error, 50) - end() -}) - -test('exposes level number mappings', ({ end, is }) => { - is(pino.levels.labels[50], 'error') - end() -}) - -test('returns level integer', ({ end, is }) => { - const instance = pino({ level: 'error' }) - is(instance.levelVal, 50) - end() -}) - -test('silent level via constructor', ({ end, fail }) => { - const instance = pino({ - level: 'silent', - browser: { - write () { - fail('no data should be logged') - } - } - }) - - Object.keys(pino.levels.values).forEach((level) => { - instance[level]('hello world') - }) - - end() -}) - -test('silent level by string', ({ end, fail }) => { - const instance = pino({ - browser: { - write () { - fail('no data should be logged') - } - } - }) - - instance.level = 'silent' - - Object.keys(pino.levels.values).forEach((level) => { - instance[level]('hello world') - }) - - end() -}) - -test('exposed levels', ({ end, same }) => { - same(Object.keys(pino.levels.values), [ - 'fatal', - 'error', - 'warn', - 'info', - 'debug', - 'trace' - ]) - end() -}) - -test('exposed labels', ({ end, same }) => { - same(Object.keys(pino.levels.labels), [ - '10', - '20', - '30', - '40', - '50', - '60' - ]) - end() -}) - -function checkLogObjects (is, same, actual, expected) { - is(actual.time <= Date.now(), true, 'time is greater than Date.now()') - - const actualCopy = Object.assign({}, actual) - const expectedCopy = Object.assign({}, expected) - delete actualCopy.time - delete expectedCopy.time - - same(actualCopy, expectedCopy) -} diff --git a/node_modules/pino/test/browser-serializers.test.js b/node_modules/pino/test/browser-serializers.test.js deleted file mode 100644 index 11d07ce0..00000000 --- a/node_modules/pino/test/browser-serializers.test.js +++ /dev/null @@ -1,327 +0,0 @@ -'use strict' -// eslint-disable-next-line -if (typeof $1 !== 'undefined') $1 = arguments.callee.caller.arguments[0] - -const test = require('tape') -const fresh = require('import-fresh') -const pino = require('../browser') - -const parentSerializers = { - test: () => 'parent' -} - -const childSerializers = { - test: () => 'child' -} - -test('serializers override values', ({ end, is }) => { - const parent = pino({ - serializers: parentSerializers, - browser: { - serialize: true, - write (o) { - is(o.test, 'parent') - end() - } - } - }) - - parent.fatal({ test: 'test' }) -}) - -test('without the serialize option, serializers do not override values', ({ end, is }) => { - const parent = pino({ - serializers: parentSerializers, - browser: { - write (o) { - is(o.test, 'test') - end() - } - } - }) - - parent.fatal({ test: 'test' }) -}) - -if (process.title !== 'browser') { - test('if serialize option is true, standard error serializer is auto enabled', ({ end, same }) => { - const err = Error('test') - err.code = 'test' - err.type = 'Error' // get that cov - const expect = pino.stdSerializers.err(err) - - const consoleError = console.error - console.error = function (err) { - same(err, expect) - } - - const logger = fresh('../browser')({ - browser: { serialize: true } - }) - - console.error = consoleError - - logger.fatal(err) - end() - }) - - test('if serialize option is array, standard error serializer is auto enabled', ({ end, same }) => { - const err = Error('test') - err.code = 'test' - const expect = pino.stdSerializers.err(err) - - const consoleError = console.error - console.error = function (err) { - same(err, expect) - } - - const logger = fresh('../browser', require)({ - browser: { serialize: [] } - }) - - console.error = consoleError - - logger.fatal(err) - end() - }) - - test('if serialize option is array containing !stdSerializers.err, standard error serializer is disabled', ({ end, is }) => { - const err = Error('test') - err.code = 'test' - const expect = err - - const consoleError = console.error - console.error = function (err) { - is(err, expect) - } - - const logger = fresh('../browser', require)({ - browser: { serialize: ['!stdSerializers.err'] } - }) - - console.error = consoleError - - logger.fatal(err) - end() - }) - - test('in browser, serializers apply to all objects', ({ end, is }) => { - const consoleError = console.error - console.error = function (test, test2, test3, test4, test5) { - is(test.key, 'serialized') - is(test2.key2, 'serialized2') - is(test5.key3, 'serialized3') - } - - const logger = fresh('../browser', require)({ - serializers: { - key: () => 'serialized', - key2: () => 'serialized2', - key3: () => 'serialized3' - }, - browser: { serialize: true } - }) - - console.error = consoleError - - logger.fatal({ key: 'test' }, { key2: 'test' }, 'str should skip', [{ foo: 'array should skip' }], { key3: 'test' }) - end() - }) - - test('serialize can be an array of selected serializers', ({ end, is }) => { - const consoleError = console.error - console.error = function (test, test2, test3, test4, test5) { - is(test.key, 'test') - is(test2.key2, 'serialized2') - is(test5.key3, 'test') - } - - const logger = fresh('../browser', require)({ - serializers: { - key: () => 'serialized', - key2: () => 'serialized2', - key3: () => 'serialized3' - }, - browser: { serialize: ['key2'] } - }) - - console.error = consoleError - - logger.fatal({ key: 'test' }, { key2: 'test' }, 'str should skip', [{ foo: 'array should skip' }], { key3: 'test' }) - end() - }) - - test('serialize filter applies to child loggers', ({ end, is }) => { - const consoleError = console.error - console.error = function (binding, test, test2, test3, test4, test5) { - is(test.key, 'test') - is(test2.key2, 'serialized2') - is(test5.key3, 'test') - } - - const logger = fresh('../browser', require)({ - browser: { serialize: ['key2'] } - }) - - console.error = consoleError - - logger.child({ - aBinding: 'test', - serializers: { - key: () => 'serialized', - key2: () => 'serialized2', - key3: () => 'serialized3' - } - }).fatal({ key: 'test' }, { key2: 'test' }, 'str should skip', [{ foo: 'array should skip' }], { key3: 'test' }) - end() - }) - - test('parent serializers apply to child bindings', ({ end, is }) => { - const consoleError = console.error - console.error = function (binding) { - is(binding.key, 'serialized') - } - - const logger = fresh('../browser', require)({ - serializers: { - key: () => 'serialized' - }, - browser: { serialize: true } - }) - - console.error = consoleError - - logger.child({ key: 'test' }).fatal({ test: 'test' }) - end() - }) - - test('child serializers apply to child bindings', ({ end, is }) => { - const consoleError = console.error - console.error = function (binding) { - is(binding.key, 'serialized') - } - - const logger = fresh('../browser', require)({ - browser: { serialize: true } - }) - - console.error = consoleError - - logger.child({ - key: 'test', - serializers: { - key: () => 'serialized' - } - }).fatal({ test: 'test' }) - end() - }) -} - -test('child does not overwrite parent serializers', ({ end, is }) => { - let c = 0 - const parent = pino({ - serializers: parentSerializers, - browser: { - serialize: true, - write (o) { - c++ - if (c === 1) is(o.test, 'parent') - if (c === 2) { - is(o.test, 'child') - end() - } - } - } - }) - const child = parent.child({ serializers: childSerializers }) - - parent.fatal({ test: 'test' }) - child.fatal({ test: 'test' }) -}) - -test('children inherit parent serializers', ({ end, is }) => { - const parent = pino({ - serializers: parentSerializers, - browser: { - serialize: true, - write (o) { - is(o.test, 'parent') - } - } - }) - - const child = parent.child({ a: 'property' }) - child.fatal({ test: 'test' }) - end() -}) - -test('children serializers get called', ({ end, is }) => { - const parent = pino({ - test: 'this', - browser: { - serialize: true, - write (o) { - is(o.test, 'child') - } - } - }) - - const child = parent.child({ a: 'property', serializers: childSerializers }) - - child.fatal({ test: 'test' }) - end() -}) - -test('children serializers get called when inherited from parent', ({ end, is }) => { - const parent = pino({ - test: 'this', - serializers: parentSerializers, - browser: { - serialize: true, - write: (o) => { - is(o.test, 'pass') - } - } - }) - - const child = parent.child({ serializers: { test: () => 'pass' } }) - - child.fatal({ test: 'fail' }) - end() -}) - -test('non overridden serializers are available in the children', ({ end, is }) => { - const pSerializers = { - onlyParent: () => 'parent', - shared: () => 'parent' - } - - const cSerializers = { - shared: () => 'child', - onlyChild: () => 'child' - } - - let c = 0 - - const parent = pino({ - serializers: pSerializers, - browser: { - serialize: true, - write (o) { - c++ - if (c === 1) is(o.shared, 'child') - if (c === 2) is(o.onlyParent, 'parent') - if (c === 3) is(o.onlyChild, 'child') - if (c === 4) is(o.onlyChild, 'test') - } - } - }) - - const child = parent.child({ serializers: cSerializers }) - - child.fatal({ shared: 'test' }) - child.fatal({ onlyParent: 'test' }) - child.fatal({ onlyChild: 'test' }) - parent.fatal({ onlyChild: 'test' }) - end() -}) diff --git a/node_modules/pino/test/browser-timestamp.test.js b/node_modules/pino/test/browser-timestamp.test.js deleted file mode 100644 index 994d8353..00000000 --- a/node_modules/pino/test/browser-timestamp.test.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict' -const test = require('tape') -const pino = require('../browser') - -Date.now = () => 1599400603614 - -test('null timestamp', ({ end, is }) => { - const instance = pino({ - timestamp: pino.stdTimeFunctions.nullTime, - browser: { - asObject: true, - write: function (o) { - is(o.time, undefined) - } - } - }) - instance.info('hello world') - end() -}) - -test('iso timestamp', ({ end, is }) => { - const instance = pino({ - timestamp: pino.stdTimeFunctions.isoTime, - browser: { - asObject: true, - write: function (o) { - is(o.time, '2020-09-06T13:56:43.614Z') - } - } - }) - instance.info('hello world') - end() -}) - -test('epoch timestamp', ({ end, is }) => { - const instance = pino({ - timestamp: pino.stdTimeFunctions.epochTime, - browser: { - asObject: true, - write: function (o) { - is(o.time, 1599400603614) - } - } - }) - instance.info('hello world') - end() -}) - -test('unix timestamp', ({ end, is }) => { - const instance = pino({ - timestamp: pino.stdTimeFunctions.unixTime, - browser: { - asObject: true, - write: function (o) { - is(o.time, Math.round(1599400603614 / 1000.0)) - } - } - }) - instance.info('hello world') - end() -}) - -test('epoch timestamp by default', ({ end, is }) => { - const instance = pino({ - browser: { - asObject: true, - write: function (o) { - is(o.time, 1599400603614) - } - } - }) - instance.info('hello world') - end() -}) - -test('not print timestamp if the option is false', ({ end, is }) => { - const instance = pino({ - timestamp: false, - browser: { - asObject: true, - write: function (o) { - is(o.time, undefined) - } - } - }) - instance.info('hello world') - end() -}) diff --git a/node_modules/pino/test/browser-transmit.test.js b/node_modules/pino/test/browser-transmit.test.js deleted file mode 100644 index fb090c23..00000000 --- a/node_modules/pino/test/browser-transmit.test.js +++ /dev/null @@ -1,349 +0,0 @@ -'use strict' -const test = require('tape') -const pino = require('../browser') - -function noop () {} - -test('throws if transmit object does not have send function', ({ end, throws }) => { - throws(() => { - pino({ browser: { transmit: {} } }) - }) - - throws(() => { - pino({ browser: { transmit: { send: 'not a func' } } }) - }) - - end() -}) - -test('calls send function after write', ({ end, is }) => { - let c = 0 - const logger = pino({ - browser: { - write: () => { - c++ - }, - transmit: { - send () { is(c, 1) } - } - } - }) - - logger.fatal({ test: 'test' }) - end() -}) - -test('passes send function the logged level', ({ end, is }) => { - const logger = pino({ - browser: { - write () {}, - transmit: { - send (level) { - is(level, 'fatal') - } - } - } - }) - - logger.fatal({ test: 'test' }) - end() -}) - -test('passes send function message strings in logEvent object when asObject is not set', ({ end, same, is }) => { - const logger = pino({ - browser: { - write: noop, - transmit: { - send (level, { messages }) { - is(messages[0], 'test') - is(messages[1], 'another test') - } - } - } - }) - - logger.fatal('test', 'another test') - - end() -}) - -test('passes send function message objects in logEvent object when asObject is not set', ({ end, same, is }) => { - const logger = pino({ - browser: { - write: noop, - transmit: { - send (level, { messages }) { - same(messages[0], { test: 'test' }) - is(messages[1], 'another test') - } - } - } - }) - - logger.fatal({ test: 'test' }, 'another test') - - end() -}) - -test('passes send function message strings in logEvent object when asObject is set', ({ end, same, is }) => { - const logger = pino({ - browser: { - asObject: true, - write: noop, - transmit: { - send (level, { messages }) { - is(messages[0], 'test') - is(messages[1], 'another test') - } - } - } - }) - - logger.fatal('test', 'another test') - - end() -}) - -test('passes send function message objects in logEvent object when asObject is set', ({ end, same, is }) => { - const logger = pino({ - browser: { - asObject: true, - write: noop, - transmit: { - send (level, { messages }) { - same(messages[0], { test: 'test' }) - is(messages[1], 'another test') - } - } - } - }) - - logger.fatal({ test: 'test' }, 'another test') - - end() -}) - -test('supplies a timestamp (ts) in logEvent object which is exactly the same as the `time` property in asObject mode', ({ end, is }) => { - let expected - const logger = pino({ - browser: { - asObject: true, // implicit because `write`, but just to be explicit - write (o) { - expected = o.time - }, - transmit: { - send (level, logEvent) { - is(logEvent.ts, expected) - } - } - } - }) - - logger.fatal('test') - end() -}) - -test('passes send function child bindings via logEvent object', ({ end, same, is }) => { - const logger = pino({ - browser: { - write: noop, - transmit: { - send (level, logEvent) { - const messages = logEvent.messages - const bindings = logEvent.bindings - same(bindings[0], { first: 'binding' }) - same(bindings[1], { second: 'binding2' }) - same(messages[0], { test: 'test' }) - is(messages[1], 'another test') - } - } - } - }) - - logger - .child({ first: 'binding' }) - .child({ second: 'binding2' }) - .fatal({ test: 'test' }, 'another test') - end() -}) - -test('passes send function level:{label, value} via logEvent object', ({ end, is }) => { - const logger = pino({ - browser: { - write: noop, - transmit: { - send (level, logEvent) { - const label = logEvent.level.label - const value = logEvent.level.value - - is(label, 'fatal') - is(value, 60) - } - } - } - }) - - logger.fatal({ test: 'test' }, 'another test') - end() -}) - -test('calls send function according to transmit.level', ({ end, is }) => { - let c = 0 - const logger = pino({ - browser: { - write: noop, - transmit: { - level: 'error', - send (level) { - c++ - if (c === 1) is(level, 'error') - if (c === 2) is(level, 'fatal') - } - } - } - }) - logger.warn('ignored') - logger.error('test') - logger.fatal('test') - end() -}) - -test('transmit.level defaults to logger level', ({ end, is }) => { - let c = 0 - const logger = pino({ - level: 'error', - browser: { - write: noop, - transmit: { - send (level) { - c++ - if (c === 1) is(level, 'error') - if (c === 2) is(level, 'fatal') - } - } - } - }) - logger.warn('ignored') - logger.error('test') - logger.fatal('test') - end() -}) - -test('transmit.level is effective even if lower than logger level', ({ end, is }) => { - let c = 0 - const logger = pino({ - level: 'error', - browser: { - write: noop, - transmit: { - level: 'info', - send (level) { - c++ - if (c === 1) is(level, 'warn') - if (c === 2) is(level, 'error') - if (c === 3) is(level, 'fatal') - } - } - } - }) - logger.warn('ignored') - logger.error('test') - logger.fatal('test') - end() -}) - -test('applies all serializers to messages and bindings (serialize:false - default)', ({ end, same, is }) => { - const logger = pino({ - serializers: { - first: () => 'first', - second: () => 'second', - test: () => 'serialize it' - }, - browser: { - write: noop, - transmit: { - send (level, logEvent) { - const messages = logEvent.messages - const bindings = logEvent.bindings - same(bindings[0], { first: 'first' }) - same(bindings[1], { second: 'second' }) - same(messages[0], { test: 'serialize it' }) - is(messages[1].type, 'Error') - } - } - } - }) - - logger - .child({ first: 'binding' }) - .child({ second: 'binding2' }) - .fatal({ test: 'test' }, Error()) - end() -}) - -test('applies all serializers to messages and bindings (serialize:true)', ({ end, same, is }) => { - const logger = pino({ - serializers: { - first: () => 'first', - second: () => 'second', - test: () => 'serialize it' - }, - browser: { - serialize: true, - write: noop, - transmit: { - send (level, logEvent) { - const messages = logEvent.messages - const bindings = logEvent.bindings - same(bindings[0], { first: 'first' }) - same(bindings[1], { second: 'second' }) - same(messages[0], { test: 'serialize it' }) - is(messages[1].type, 'Error') - } - } - } - }) - - logger - .child({ first: 'binding' }) - .child({ second: 'binding2' }) - .fatal({ test: 'test' }, Error()) - end() -}) - -test('extracts correct bindings and raw messages over multiple transmits', ({ end, same, is }) => { - let messages = null - let bindings = null - - const logger = pino({ - browser: { - write: noop, - transmit: { - send (level, logEvent) { - messages = logEvent.messages - bindings = logEvent.bindings - } - } - } - }) - - const child = logger.child({ child: true }) - const grandchild = child.child({ grandchild: true }) - - logger.fatal({ test: 'parent:test1' }) - logger.fatal({ test: 'parent:test2' }) - same([], bindings) - same([{ test: 'parent:test2' }], messages) - - child.fatal({ test: 'child:test1' }) - child.fatal({ test: 'child:test2' }) - same([{ child: true }], bindings) - same([{ test: 'child:test2' }], messages) - - grandchild.fatal({ test: 'grandchild:test1' }) - grandchild.fatal({ test: 'grandchild:test2' }) - same([{ child: true }, { grandchild: true }], bindings) - same([{ test: 'grandchild:test2' }], messages) - - end() -}) diff --git a/node_modules/pino/test/browser.test.js b/node_modules/pino/test/browser.test.js deleted file mode 100644 index 56053219..00000000 --- a/node_modules/pino/test/browser.test.js +++ /dev/null @@ -1,547 +0,0 @@ -'use strict' -const test = require('tape') -const fresh = require('import-fresh') -const pinoStdSerializers = require('pino-std-serializers') -const pino = require('../browser') - -levelTest('fatal') -levelTest('error') -levelTest('warn') -levelTest('info') -levelTest('debug') -levelTest('trace') - -test('silent level', ({ end, fail, pass }) => { - const instance = pino({ - level: 'silent', - browser: { write: fail } - }) - instance.info('test') - const child = instance.child({ test: 'test' }) - child.info('msg-test') - // use setTimeout because setImmediate isn't supported in most browsers - setTimeout(() => { - pass() - end() - }, 0) -}) - -test('enabled false', ({ end, fail, pass }) => { - const instance = pino({ - enabled: false, - browser: { write: fail } - }) - instance.info('test') - const child = instance.child({ test: 'test' }) - child.info('msg-test') - // use setTimeout because setImmediate isn't supported in most browsers - setTimeout(() => { - pass() - end() - }, 0) -}) - -test('throw if creating child without bindings', ({ end, throws }) => { - const instance = pino() - throws(() => instance.child()) - end() -}) - -test('stubs write, flush and ee methods on instance', ({ end, ok, is }) => { - const instance = pino() - - ok(isFunc(instance.setMaxListeners)) - ok(isFunc(instance.getMaxListeners)) - ok(isFunc(instance.emit)) - ok(isFunc(instance.addListener)) - ok(isFunc(instance.on)) - ok(isFunc(instance.prependListener)) - ok(isFunc(instance.once)) - ok(isFunc(instance.prependOnceListener)) - ok(isFunc(instance.removeListener)) - ok(isFunc(instance.removeAllListeners)) - ok(isFunc(instance.listeners)) - ok(isFunc(instance.listenerCount)) - ok(isFunc(instance.eventNames)) - ok(isFunc(instance.write)) - ok(isFunc(instance.flush)) - - is(instance.on(), undefined) - - end() -}) - -test('exposes levels object', ({ end, same }) => { - same(pino.levels, { - values: { - fatal: 60, - error: 50, - warn: 40, - info: 30, - debug: 20, - trace: 10 - }, - labels: { - 10: 'trace', - 20: 'debug', - 30: 'info', - 40: 'warn', - 50: 'error', - 60: 'fatal' - } - }) - - end() -}) - -test('exposes faux stdSerializers', ({ end, ok, same }) => { - ok(pino.stdSerializers) - // make sure faux stdSerializers match pino-std-serializers - for (const serializer in pinoStdSerializers) { - ok(pino.stdSerializers[serializer], `pino.stdSerializers.${serializer}`) - } - // confirm faux methods return empty objects - same(pino.stdSerializers.req(), {}) - same(pino.stdSerializers.mapHttpRequest(), {}) - same(pino.stdSerializers.mapHttpResponse(), {}) - same(pino.stdSerializers.res(), {}) - // confirm wrapping function is a passthrough - const noChange = { foo: 'bar', fuz: 42 } - same(pino.stdSerializers.wrapRequestSerializer(noChange), noChange) - same(pino.stdSerializers.wrapResponseSerializer(noChange), noChange) - end() -}) - -test('exposes err stdSerializer', ({ end, ok }) => { - ok(pino.stdSerializers.err) - ok(pino.stdSerializers.err(Error())) - end() -}) - -consoleMethodTest('error') -consoleMethodTest('fatal', 'error') -consoleMethodTest('warn') -consoleMethodTest('info') -consoleMethodTest('debug') -consoleMethodTest('trace') -absentConsoleMethodTest('error', 'log') -absentConsoleMethodTest('warn', 'error') -absentConsoleMethodTest('info', 'log') -absentConsoleMethodTest('debug', 'log') -absentConsoleMethodTest('trace', 'log') - -// do not run this with airtap -if (process.title !== 'browser') { - test('in absence of console, log methods become noops', ({ end, ok }) => { - const console = global.console - delete global.console - const instance = fresh('../browser')() - global.console = console - ok(fnName(instance.log).match(/noop/)) - ok(fnName(instance.fatal).match(/noop/)) - ok(fnName(instance.error).match(/noop/)) - ok(fnName(instance.warn).match(/noop/)) - ok(fnName(instance.info).match(/noop/)) - ok(fnName(instance.debug).match(/noop/)) - ok(fnName(instance.trace).match(/noop/)) - end() - }) -} - -test('opts.browser.asObject logs pino-like object to console', ({ end, ok, is }) => { - const info = console.info - console.info = function (o) { - is(o.level, 30) - is(o.msg, 'test') - ok(o.time) - console.info = info - } - const instance = require('../browser')({ - browser: { - asObject: true - } - }) - - instance.info('test') - end() -}) - -test('opts.browser.write func log single string', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write: function (o) { - is(o.level, 30) - is(o.msg, 'test') - ok(o.time) - } - } - }) - instance.info('test') - - end() -}) - -test('opts.browser.write func string joining', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write: function (o) { - is(o.level, 30) - is(o.msg, 'test test2 test3') - ok(o.time) - } - } - }) - instance.info('test %s %s', 'test2', 'test3') - - end() -}) - -test('opts.browser.write func string joining when asObject is true', ({ end, ok, is }) => { - const instance = pino({ - browser: { - asObject: true, - write: function (o) { - is(o.level, 30) - is(o.msg, 'test test2 test3') - ok(o.time) - } - } - }) - instance.info('test %s %s', 'test2', 'test3') - - end() -}) - -test('opts.browser.write func string joining when asObject is true', ({ end, ok, is }) => { - const instance = pino({ - browser: { - asObject: true, - write: function (o) { - is(o.level, 30) - is(o.msg, 'test test2 test3') - ok(o.time) - } - } - }) - instance.info('test %s %s', 'test2', 'test3') - - end() -}) - -test('opts.browser.write func string object joining', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write: function (o) { - is(o.level, 30) - is(o.msg, 'test {"test":"test2"} {"test":"test3"}') - ok(o.time) - } - } - }) - instance.info('test %j %j', { test: 'test2' }, { test: 'test3' }) - - end() -}) - -test('opts.browser.write func string object joining when asObject is true', ({ end, ok, is }) => { - const instance = pino({ - browser: { - asObject: true, - write: function (o) { - is(o.level, 30) - is(o.msg, 'test {"test":"test2"} {"test":"test3"}') - ok(o.time) - } - } - }) - instance.info('test %j %j', { test: 'test2' }, { test: 'test3' }) - - end() -}) - -test('opts.browser.write func string interpolation', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write: function (o) { - is(o.level, 30) - is(o.msg, 'test2 test ({"test":"test3"})') - ok(o.time) - } - } - }) - instance.info('%s test (%j)', 'test2', { test: 'test3' }) - - end() -}) - -test('opts.browser.write func number', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write: function (o) { - is(o.level, 30) - is(o.msg, 1) - ok(o.time) - } - } - }) - instance.info(1) - - end() -}) - -test('opts.browser.write func log single object', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write: function (o) { - is(o.level, 30) - is(o.test, 'test') - ok(o.time) - } - } - }) - instance.info({ test: 'test' }) - - end() -}) - -test('opts.browser.write obj writes to methods corresponding to level', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write: { - error: function (o) { - is(o.level, 50) - is(o.test, 'test') - ok(o.time) - } - } - } - }) - instance.error({ test: 'test' }) - - end() -}) - -test('opts.browser.asObject/write supports child loggers', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write (o) { - is(o.level, 30) - is(o.test, 'test') - is(o.msg, 'msg-test') - ok(o.time) - } - } - }) - const child = instance.child({ test: 'test' }) - child.info('msg-test') - - end() -}) - -test('opts.browser.asObject/write supports child child loggers', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write (o) { - is(o.level, 30) - is(o.test, 'test') - is(o.foo, 'bar') - is(o.msg, 'msg-test') - ok(o.time) - } - } - }) - const child = instance.child({ test: 'test' }).child({ foo: 'bar' }) - child.info('msg-test') - - end() -}) - -test('opts.browser.asObject/write supports child child child loggers', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write (o) { - is(o.level, 30) - is(o.test, 'test') - is(o.foo, 'bar') - is(o.baz, 'bop') - is(o.msg, 'msg-test') - ok(o.time) - } - } - }) - const child = instance.child({ test: 'test' }).child({ foo: 'bar' }).child({ baz: 'bop' }) - child.info('msg-test') - - end() -}) - -test('opts.browser.asObject defensively mitigates naughty numbers', ({ end, pass }) => { - const instance = pino({ - browser: { asObject: true, write: () => {} } - }) - const child = instance.child({ test: 'test' }) - child._childLevel = -10 - child.info('test') - pass() // if we reached here, there was no infinite loop, so, .. pass. - - end() -}) - -test('opts.browser.write obj falls back to console where a method is not supplied', ({ end, ok, is }) => { - const info = console.info - console.info = (o) => { - is(o.level, 30) - is(o.msg, 'test') - ok(o.time) - console.info = info - } - const instance = require('../browser')({ - browser: { - write: { - error (o) { - is(o.level, 50) - is(o.test, 'test') - ok(o.time) - } - } - } - }) - instance.error({ test: 'test' }) - instance.info('test') - - end() -}) - -function levelTest (name) { - test(name + ' logs', ({ end, is }) => { - const msg = 'hello world' - sink(name, (args) => { - is(args[0], msg) - end() - }) - pino({ level: name })[name](msg) - }) - - test('passing objects at level ' + name, ({ end, is }) => { - const msg = { hello: 'world' } - sink(name, (args) => { - is(args[0], msg) - end() - }) - pino({ level: name })[name](msg) - }) - - test('passing an object and a string at level ' + name, ({ end, is }) => { - const a = { hello: 'world' } - const b = 'a string' - sink(name, (args) => { - is(args[0], a) - is(args[1], b) - end() - }) - pino({ level: name })[name](a, b) - }) - - test('formatting logs as ' + name, ({ end, is }) => { - sink(name, (args) => { - is(args[0], 'hello %d') - is(args[1], 42) - end() - }) - pino({ level: name })[name]('hello %d', 42) - }) - - test('passing error at level ' + name, ({ end, is }) => { - const err = new Error('myerror') - sink(name, (args) => { - is(args[0], err) - end() - }) - pino({ level: name })[name](err) - }) - - test('passing error with a serializer at level ' + name, ({ end, is }) => { - // in browser - should have no effect (should not crash) - const err = new Error('myerror') - sink(name, (args) => { - is(args[0].err, err) - end() - }) - const instance = pino({ - level: name, - serializers: { - err: pino.stdSerializers.err - } - }) - instance[name]({ err }) - }) - - test('child logger for level ' + name, ({ end, is }) => { - const msg = 'hello world' - const parent = { hello: 'world' } - sink(name, (args) => { - is(args[0], parent) - is(args[1], msg) - end() - }) - const instance = pino({ level: name }) - const child = instance.child(parent) - child[name](msg) - }) - - test('child-child logger for level ' + name, ({ end, is }) => { - const msg = 'hello world' - const grandParent = { hello: 'world' } - const parent = { hello: 'you' } - sink(name, (args) => { - is(args[0], grandParent) - is(args[1], parent) - is(args[2], msg) - end() - }) - const instance = pino({ level: name }) - const child = instance.child(grandParent).child(parent) - child[name](msg) - }) -} - -function consoleMethodTest (level, method) { - if (!method) method = level - test('pino().' + level + ' uses console.' + method, ({ end, is }) => { - sink(method, (args) => { - is(args[0], 'test') - end() - }) - const instance = require('../browser')({ level }) - instance[level]('test') - }) -} - -function absentConsoleMethodTest (method, fallback) { - test('in absence of console.' + method + ', console.' + fallback + ' is used', ({ end, is }) => { - const fn = console[method] - console[method] = undefined - sink(fallback, function (args) { - is(args[0], 'test') - end() - console[method] = fn - }) - const instance = require('../browser')({ level: method }) - instance[method]('test') - }) -} - -function isFunc (fn) { return typeof fn === 'function' } -function fnName (fn) { - const rx = /^\s*function\s*([^(]*)/i - const match = rx.exec(fn) - return match && match[1] -} -function sink (method, fn) { - if (method === 'fatal') method = 'error' - const orig = console[method] - console[method] = function () { - console[method] = orig - fn(Array.prototype.slice.call(arguments)) - } -} diff --git a/node_modules/pino/test/crlf.test.js b/node_modules/pino/test/crlf.test.js deleted file mode 100644 index 8186fbec..00000000 --- a/node_modules/pino/test/crlf.test.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict' - -const { test } = require('tap') -const writer = require('flush-write-stream') -const pino = require('../') - -function capture () { - const ws = writer((chunk, enc, cb) => { - ws.data += chunk.toString() - cb() - }) - ws.data = '' - return ws -} - -test('pino uses LF by default', async ({ ok }) => { - const stream = capture() - const logger = pino(stream) - logger.info('foo') - logger.error('bar') - ok(/foo[^\r\n]+\n[^\r\n]+bar[^\r\n]+\n/.test(stream.data)) -}) - -test('pino can log CRLF', async ({ ok }) => { - const stream = capture() - const logger = pino({ - crlf: true - }, stream) - logger.info('foo') - logger.error('bar') - ok(/foo[^\n]+\r\n[^\n]+bar[^\n]+\r\n/.test(stream.data)) -}) diff --git a/node_modules/pino/test/custom-levels.test.js b/node_modules/pino/test/custom-levels.test.js deleted file mode 100644 index 194f857f..00000000 --- a/node_modules/pino/test/custom-levels.test.js +++ /dev/null @@ -1,292 +0,0 @@ -'use strict' - -/* eslint no-prototype-builtins: 0 */ - -const { test } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -// Silence all warnings for this test -process.removeAllListeners('warning') -process.on('warning', () => {}) - -test('adds additional levels', async ({ equal }) => { - const stream = sink() - const logger = pino({ - customLevels: { - foo: 35, - bar: 45 - } - }, stream) - - logger.foo('test') - const { level } = await once(stream, 'data') - equal(level, 35) -}) - -test('custom levels does not override default levels', async ({ equal }) => { - const stream = sink() - const logger = pino({ - customLevels: { - foo: 35 - } - }, stream) - - logger.info('test') - const { level } = await once(stream, 'data') - equal(level, 30) -}) - -test('default levels can be redefined using custom levels', async ({ equal }) => { - const stream = sink() - const logger = pino({ - customLevels: { - info: 35, - debug: 45 - }, - useOnlyCustomLevels: true - }, stream) - - equal(logger.hasOwnProperty('info'), true) - - logger.info('test') - const { level } = await once(stream, 'data') - equal(level, 35) -}) - -test('custom levels overrides default level label if use useOnlyCustomLevels', async ({ equal }) => { - const stream = sink() - const logger = pino({ - customLevels: { - foo: 35 - }, - useOnlyCustomLevels: true, - level: 'foo' - }, stream) - - equal(logger.hasOwnProperty('info'), false) -}) - -test('custom levels overrides default level value if use useOnlyCustomLevels', async ({ equal }) => { - const stream = sink() - const logger = pino({ - customLevels: { - foo: 35 - }, - useOnlyCustomLevels: true, - level: 35 - }, stream) - - equal(logger.hasOwnProperty('info'), false) -}) - -test('custom levels are inherited by children', async ({ equal }) => { - const stream = sink() - const logger = pino({ - customLevels: { - foo: 35 - } - }, stream) - - logger.child({ childMsg: 'ok' }).foo('test') - const { msg, childMsg, level } = await once(stream, 'data') - equal(level, 35) - equal(childMsg, 'ok') - equal(msg, 'test') -}) - -test('custom levels can be specified on child bindings', async ({ equal }) => { - const stream = sink() - const logger = pino(stream).child({ - customLevels: { - foo: 35 - }, - childMsg: 'ok' - }) - - logger.foo('test') - const { msg, childMsg, level } = await once(stream, 'data') - equal(level, 35) - equal(childMsg, 'ok') - equal(msg, 'test') -}) - -test('customLevels property child bindings does not get logged', async ({ equal }) => { - const stream = sink() - const logger = pino(stream).child({ - customLevels: { - foo: 35 - }, - childMsg: 'ok' - }) - - logger.foo('test') - const { customLevels } = await once(stream, 'data') - equal(customLevels, undefined) -}) - -test('throws when specifying pre-existing parent labels via child bindings', async ({ throws }) => { - const stream = sink() - throws(() => pino({ - customLevels: { - foo: 35 - } - }, stream).child({ - customLevels: { - foo: 45 - } - }), 'levels cannot be overridden') -}) - -test('throws when specifying pre-existing parent values via child bindings', async ({ throws }) => { - const stream = sink() - throws(() => pino({ - customLevels: { - foo: 35 - } - }, stream).child({ - customLevels: { - bar: 35 - } - }), 'pre-existing level values cannot be used for new levels') -}) - -test('throws when specifying core values via child bindings', async ({ throws }) => { - const stream = sink() - throws(() => pino(stream).child({ - customLevels: { - foo: 30 - } - }), 'pre-existing level values cannot be used for new levels') -}) - -test('throws when useOnlyCustomLevels is set true without customLevels', async ({ throws }) => { - const stream = sink() - throws(() => pino({ - useOnlyCustomLevels: true - }, stream), 'customLevels is required if useOnlyCustomLevels is set true') -}) - -test('custom level on one instance does not affect other instances', async ({ equal }) => { - pino({ - customLevels: { - foo: 37 - } - }) - equal(typeof pino().foo, 'undefined') -}) - -test('setting level below or at custom level will successfully log', async ({ equal }) => { - const stream = sink() - const instance = pino({ customLevels: { foo: 35 } }, stream) - instance.level = 'foo' - instance.info('nope') - instance.foo('bar') - const { msg } = await once(stream, 'data') - equal(msg, 'bar') -}) - -test('custom level below level threshold will not log', async ({ equal }) => { - const stream = sink() - const instance = pino({ customLevels: { foo: 15 } }, stream) - instance.level = 'info' - instance.info('bar') - instance.foo('nope') - const { msg } = await once(stream, 'data') - equal(msg, 'bar') -}) - -test('does not share custom level state across siblings', async ({ doesNotThrow }) => { - const stream = sink() - const logger = pino(stream) - logger.child({ - customLevels: { foo: 35 } - }) - doesNotThrow(() => { - logger.child({ - customLevels: { foo: 35 } - }) - }) -}) - -test('custom level does not affect the levels serializer', async ({ equal }) => { - const stream = sink() - const logger = pino({ - customLevels: { - foo: 35, - bar: 45 - }, - formatters: { - level (label, number) { - return { priority: number } - } - } - }, stream) - - logger.foo('test') - const { priority } = await once(stream, 'data') - equal(priority, 35) -}) - -test('When useOnlyCustomLevels is set to true, the level formatter should only get custom levels', async ({ equal }) => { - const stream = sink() - const logger = pino({ - customLevels: { - answer: 42 - }, - useOnlyCustomLevels: true, - level: 42, - formatters: { - level (label, number) { - equal(label, 'answer') - equal(number, 42) - return { level: number } - } - } - }, stream) - - logger.answer('test') - const { level } = await once(stream, 'data') - equal(level, 42) -}) - -test('custom levels accessible in prettifier function', async ({ plan, same }) => { - plan(1) - const logger = pino({ - prettyPrint: true, - prettifier: function prettifierFactory () { - const instance = this - return function () { - same(instance.levels, { - labels: { - 10: 'trace', - 20: 'debug', - 30: 'info', - 35: 'foo', - 40: 'warn', - 45: 'bar', - 50: 'error', - 60: 'fatal' - }, - values: { - trace: 10, - debug: 20, - info: 30, - warn: 40, - error: 50, - fatal: 60, - foo: 35, - bar: 45 - } - }) - } - }, - customLevels: { - foo: 35, - bar: 45 - }, - changeLevelName: 'priority' - }) - - logger.foo('test') -}) diff --git a/node_modules/pino/test/deprecations.test.js b/node_modules/pino/test/deprecations.test.js deleted file mode 100644 index 5b8cec13..00000000 --- a/node_modules/pino/test/deprecations.test.js +++ /dev/null @@ -1,101 +0,0 @@ -'use strict' -/* eslint no-prototype-builtins: 0 */ - -const { test } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -process.removeAllListeners('warning') - -test('useLevelLabels', async ({ match, equal }) => { - process.on('warning', onWarning) - function onWarning (warn) { - equal(warn.code, 'PINODEP001') - } - - const stream = sink() - const logger = pino({ - useLevelLabels: true - }, stream) - - const o = once(stream, 'data') - logger.info('hello world') - match(await o, { level: 'info' }) - process.removeListener('warning', onWarning) -}) - -test('changeLevelName', async ({ match, equal }) => { - process.on('warning', onWarning) - function onWarning (warn) { - equal(warn.code, 'PINODEP002') - } - - const stream = sink() - const logger = pino({ - changeLevelName: 'priority' - }, stream) - - const o = once(stream, 'data') - logger.info('hello world') - match(await o, { priority: 30 }) - process.removeListener('warning', onWarning) -}) - -test('levelKey', async ({ match, equal }) => { - process.on('warning', onWarning) - function onWarning (warn) { - equal(warn.code, 'PINODEP002') - } - - const stream = sink() - const logger = pino({ - levelKey: 'priority' - }, stream) - - const o = once(stream, 'data') - logger.info('hello world') - match(await o, { priority: 30 }) - process.removeListener('warning', onWarning) -}) - -test('useLevelLabels and changeLevelName', async ({ match, equal }) => { - let count = 0 - process.on('warning', onWarning) - function onWarning (warn) { - equal(warn.code, count === 0 ? 'PINODEP001' : 'PINODEP002') - count += 1 - } - - const stream = sink() - const logger = pino({ - changeLevelName: 'priority', - useLevelLabels: true - }, stream) - - const o = once(stream, 'data') - logger.info('hello world') - match(await o, { priority: 'info' }) - process.removeListener('warning', onWarning) -}) - -test('pino.* serializer', async ({ match, equal, pass }) => { - process.on('warning', onWarning) - function onWarning (warn) { - equal(warn.code, 'PINODEP003') - } - - const stream = sink() - const logger = pino({ - serializers: { - [Symbol.for('pino.*')] (log) { - pass('called') - return log - } - } - }, stream) - - const o = once(stream, 'data') - logger.info('hello world') - match(await o, { level: 30 }) - process.removeListener('warning', onWarning) -}) diff --git a/node_modules/pino/test/error.test.js b/node_modules/pino/test/error.test.js deleted file mode 100644 index 09b37dbf..00000000 --- a/node_modules/pino/test/error.test.js +++ /dev/null @@ -1,173 +0,0 @@ -'use strict' - -/* eslint no-prototype-builtins: 0 */ - -const os = require('os') -const { test } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -const { pid } = process -const hostname = os.hostname() -const level = 50 -const name = 'error' - -test('err is serialized with additional properties set on the Error object', async ({ ok, same }) => { - const stream = sink() - const err = Object.assign(new Error('myerror'), { foo: 'bar' }) - const instance = pino(stream) - instance.level = name - instance[name](err) - const result = await once(stream, 'data') - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level, - type: 'Error', - msg: err.message, - stack: err.stack, - foo: err.foo - }) -}) - -test('type should be retained, even if type is a property', async ({ ok, same }) => { - const stream = sink() - const err = Object.assign(new Error('myerror'), { type: 'bar' }) - const instance = pino(stream) - instance.level = name - instance[name](err) - const result = await once(stream, 'data') - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level, - type: 'bar', - msg: err.message, - stack: err.stack - }) -}) - -test('type, message and stack should be first level properties', async ({ ok, same }) => { - const stream = sink() - const err = Object.assign(new Error('foo'), { foo: 'bar' }) - const instance = pino(stream) - instance.level = name - instance[name](err) - - const result = await once(stream, 'data') - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level, - type: 'Error', - msg: err.message, - stack: err.stack, - foo: err.foo - }) -}) - -test('err serializer', async ({ ok, same }) => { - const stream = sink() - const err = Object.assign(new Error('myerror'), { foo: 'bar' }) - const instance = pino({ - serializers: { - err: pino.stdSerializers.err - } - }, stream) - - instance.level = name - instance[name]({ err }) - const result = await once(stream, 'data') - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level, - err: { - type: 'Error', - message: err.message, - stack: err.stack, - foo: err.foo - } - }) -}) - -test('an error with statusCode property is not confused for a http response', async ({ ok, same }) => { - const stream = sink() - const err = Object.assign(new Error('StatusCodeErr'), { statusCode: 500 }) - const instance = pino(stream) - - instance.level = name - instance[name](err) - const result = await once(stream, 'data') - - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level, - type: 'Error', - msg: err.message, - stack: err.stack, - statusCode: err.statusCode - }) -}) - -test('stack is omitted if it is not set on err', t => { - t.plan(2) - const err = new Error('myerror') - delete err.stack - const instance = pino(sink(function (chunk, enc, cb) { - t.ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()') - delete chunk.time - t.equal(chunk.hasOwnProperty('stack'), false) - cb() - })) - - instance.level = name - instance[name](err) -}) - -test('stack is rendered as any other property if it\'s not a string', t => { - t.plan(3) - const err = new Error('myerror') - err.stack = null - const instance = pino(sink(function (chunk, enc, cb) { - t.ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()') - delete chunk.time - t.equal(chunk.hasOwnProperty('stack'), true) - t.equal(chunk.stack, null) - cb() - })) - - instance.level = name - instance[name](err) -}) - -test('correctly ignores toString on errors', async ({ same }) => { - const err = new Error('myerror') - err.toString = () => undefined - const stream = sink() - const instance = pino({ - test: 'this' - }, stream) - instance.fatal(err) - const result = await once(stream, 'data') - delete result.time - same(result, { - pid, - hostname, - level: 60, - type: 'Error', - msg: err.message, - stack: err.stack - }) -}) diff --git a/node_modules/pino/test/escaping.test.js b/node_modules/pino/test/escaping.test.js deleted file mode 100644 index 1c80d83e..00000000 --- a/node_modules/pino/test/escaping.test.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict' - -const os = require('os') -const { test } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -const { pid } = process -const hostname = os.hostname() - -function testEscape (ch, key) { - test('correctly escape ' + ch, async ({ same }) => { - const stream = sink() - const instance = pino({ - name: 'hello' - }, stream) - instance.fatal('this contains ' + key) - const result = await once(stream, 'data') - delete result.time - same(result, { - pid, - hostname, - level: 60, - name: 'hello', - msg: 'this contains ' + key - }) - }) -} - -testEscape('\\n', '\n') -testEscape('\\/', '/') -testEscape('\\\\', '\\') -testEscape('\\r', '\r') -testEscape('\\t', '\t') -testEscape('\\b', '\b') - -const toEscape = [ - '\u0000', // NUL Null character - '\u0001', // SOH Start of Heading - '\u0002', // STX Start of Text - '\u0003', // ETX End-of-text character - '\u0004', // EOT End-of-transmission character - '\u0005', // ENQ Enquiry character - '\u0006', // ACK Acknowledge character - '\u0007', // BEL Bell character - '\u0008', // BS Backspace - '\u0009', // HT Horizontal tab - '\u000A', // LF Line feed - '\u000B', // VT Vertical tab - '\u000C', // FF Form feed - '\u000D', // CR Carriage return - '\u000E', // SO Shift Out - '\u000F', // SI Shift In - '\u0010', // DLE Data Link Escape - '\u0011', // DC1 Device Control 1 - '\u0012', // DC2 Device Control 2 - '\u0013', // DC3 Device Control 3 - '\u0014', // DC4 Device Control 4 - '\u0015', // NAK Negative-acknowledge character - '\u0016', // SYN Synchronous Idle - '\u0017', // ETB End of Transmission Block - '\u0018', // CAN Cancel character - '\u0019', // EM End of Medium - '\u001A', // SUB Substitute character - '\u001B', // ESC Escape character - '\u001C', // FS File Separator - '\u001D', // GS Group Separator - '\u001E', // RS Record Separator - '\u001F' // US Unit Separator -] - -toEscape.forEach((key) => { - testEscape(JSON.stringify(key), key) -}) - -test('correctly escape `hello \\u001F world \\n \\u0022`', async ({ same }) => { - const stream = sink() - const instance = pino({ - name: 'hello' - }, stream) - instance.fatal('hello \u001F world \n \u0022') - const result = await once(stream, 'data') - delete result.time - same(result, { - pid, - hostname, - level: 60, - name: 'hello', - msg: 'hello \u001F world \n \u0022' - }) -}) diff --git a/node_modules/pino/test/esm/esm.mjs b/node_modules/pino/test/esm/esm.mjs deleted file mode 100644 index 6523937c..00000000 --- a/node_modules/pino/test/esm/esm.mjs +++ /dev/null @@ -1,12 +0,0 @@ -import t from 'tap' -import pino from '../../pino.js' -import helper from '../helper.js' - -const { sink, check, once } = helper - -t.test('esm support', async ({ equal }) => { - const stream = sink() - const instance = pino(stream) - instance.info('hello world') - check(equal, await once(stream, 'data'), 30, 'hello world') -}) diff --git a/node_modules/pino/test/esm/index.test.js b/node_modules/pino/test/esm/index.test.js deleted file mode 100644 index 0d1a96cc..00000000 --- a/node_modules/pino/test/esm/index.test.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict' - -const t = require('tap') -const semver = require('semver') - -if (!semver.satisfies(process.versions.node, '^13.3.0 || ^12.10.0 || >= 14.0.0')) { - t.skip('Skip esm because not supported by Node') -} else { - // Node v8 throw a `SyntaxError: Unexpected token import` - // even if this branch is never touch in the code, - // by using `eval` we can avoid this issue. - // eslint-disable-next-line - new Function('module', 'return import(module)')('./esm.mjs').catch((err) => { - process.nextTick(() => { - throw err - }) - }) -} - -if (!semver.satisfies(process.versions.node, '>= 14.13.0 || ^12.20.0')) { - t.skip('Skip named exports because not supported by Node') -} else { - // Node v8 throw a `SyntaxError: Unexpected token import` - // even if this branch is never touch in the code, - // by using `eval` we can avoid this issue. - // eslint-disable-next-line - new Function('module', 'return import(module)')('./named-exports.mjs').catch((err) => { - process.nextTick(() => { - throw err - }) - }) -} diff --git a/node_modules/pino/test/esm/named-exports.mjs b/node_modules/pino/test/esm/named-exports.mjs deleted file mode 100644 index d7a00d2e..00000000 --- a/node_modules/pino/test/esm/named-exports.mjs +++ /dev/null @@ -1,31 +0,0 @@ -import { tmpdir, hostname } from 'os' -import t from 'tap' -import { sink, check, once, watchFileCreated } from '../helper.js' -import { pino, destination } from '../../pino.js' -import { join } from 'path' -import { readFileSync } from 'fs' - -t.test('named exports support', async ({ equal }) => { - const stream = sink() - const instance = pino(stream) - instance.info('hello world') - check(equal, await once(stream, 'data'), 30, 'hello world') -}) - -t.test('destination', async ({ same }) => { - const tmp = join( - tmpdir(), - '_' + Math.random().toString(36).substr(2, 9) - ) - const instance = pino(destination(tmp)) - instance.info('hello') - await watchFileCreated(tmp) - const result = JSON.parse(readFileSync(tmp).toString()) - delete result.time - same(result, { - pid: process.pid, - hostname, - level: 30, - msg: 'hello' - }) -}) diff --git a/node_modules/pino/test/exit.test.js b/node_modules/pino/test/exit.test.js deleted file mode 100644 index 26ca6dba..00000000 --- a/node_modules/pino/test/exit.test.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict' - -const { test } = require('tap') -const { join } = require('path') -const execa = require('execa') -const writer = require('flush-write-stream') -const { once } = require('./helper') - -// https://github.com/pinojs/pino/issues/542 -test('pino.destination log everything when calling process.exit(0)', async ({ not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'destination-exit.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - - await once(child, 'close') - - not(actual.match(/hello/), null) - not(actual.match(/world/), null) -}) - -test('pino with no args log everything when calling process.exit(0)', async ({ not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'default-exit.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - - await once(child, 'close') - - not(actual.match(/hello/), null) - not(actual.match(/world/), null) -}) - -test('sync false does not log everything when calling process.exit(0)', async ({ equal }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'syncfalse-exit.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - - await once(child, 'close') - - equal(actual.match(/hello/), null) - equal(actual.match(/world/), null) -}) - -test('sync false logs everything when calling flushSync', async ({ not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'syncfalse-flush-exit.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - - await once(child, 'close') - - not(actual.match(/hello/), null) - not(actual.match(/world/), null) -}) diff --git a/node_modules/pino/test/final.test.js b/node_modules/pino/test/final.test.js deleted file mode 100644 index 65d2f294..00000000 --- a/node_modules/pino/test/final.test.js +++ /dev/null @@ -1,182 +0,0 @@ -'use strict' -const pino = require('..') -const fs = require('fs') -const { test } = require('tap') -const { sleep, getPathToNull } = require('./helper') - -test('replaces onTerminated option', async ({ throws }) => { - throws(() => { - pino({ - onTerminated: () => {} - }) - }, Error('The onTerminated option has been removed, use pino.final instead')) -}) - -test('throws if not supplied a logger instance', async ({ throws }) => { - throws(() => { - pino.final() - }, Error('expected a pino logger instance')) -}) - -test('throws if the supplied handler is not a function', async ({ throws }) => { - throws(() => { - pino.final(pino(), 'dummy') - }, Error('if supplied, the handler parameter should be a function')) -}) - -test('throws if not supplied logger with pino.destination instance with sync false', async ({ throws, doesNotThrow }) => { - throws(() => { - pino.final(pino(fs.createWriteStream(getPathToNull())), () => {}) - }, Error('final requires a stream that has a flushSync method, such as pino.destination')) - - doesNotThrow(() => { - pino.final(pino(pino.destination({ sync: false })), () => {}) - }) - - doesNotThrow(() => { - pino.final(pino(pino.destination({ sync: false })), () => {}) - }) -}) - -test('returns an exit listener function', async ({ equal }) => { - equal(typeof pino.final(pino(pino.destination({ sync: false })), () => {}), 'function') -}) - -test('listener function immediately sync flushes when fired (sync false)', async ({ pass, fail }) => { - const dest = pino.destination({ dest: getPathToNull(), sync: false }) - let passed = false - dest.flushSync = () => { - passed = true - pass('flushSync called') - } - pino.final(pino(dest), () => {})() - await sleep(10) - if (passed === false) fail('flushSync not called') -}) - -test('listener function immediately sync flushes when fired (sync true)', async ({ pass, fail }) => { - const dest = pino.destination({ dest: getPathToNull(), sync: true }) - let passed = false - dest.flushSync = () => { - passed = true - pass('flushSync called') - } - pino.final(pino(dest), () => {})() - await sleep(10) - if (passed === false) fail('flushSync not called') -}) - -test('swallows the non-ready error', async ({ doesNotThrow }) => { - const dest = pino.destination({ dest: getPathToNull(), sync: false }) - doesNotThrow(() => { - pino.final(pino(dest), () => {})() - }) -}) - -test('listener function triggers handler function parameter', async ({ pass, fail }) => { - const dest = pino.destination({ dest: getPathToNull(), sync: false }) - let passed = false - pino.final(pino(dest), () => { - passed = true - pass('handler function triggered') - })() - await sleep(10) - if (passed === false) fail('handler function not triggered') -}) - -test('passes any error to the handler', async ({ equal }) => { - const dest = pino.destination({ dest: getPathToNull(), sync: false }) - pino.final(pino(dest), (err) => { - equal(err.message, 'test') - })(Error('test')) -}) - -test('passes a specialized final logger instance', async ({ equal, not, error }) => { - const dest = pino.destination({ dest: getPathToNull(), sync: false }) - const logger = pino(dest) - pino.final(logger, (err, finalLogger) => { - error(err) - equal(typeof finalLogger.trace, 'function') - equal(typeof finalLogger.debug, 'function') - equal(typeof finalLogger.info, 'function') - equal(typeof finalLogger.warn, 'function') - equal(typeof finalLogger.error, 'function') - equal(typeof finalLogger.fatal, 'function') - - not(finalLogger.trace, logger.trace) - not(finalLogger.debug, logger.debug) - not(finalLogger.info, logger.info) - not(finalLogger.warn, logger.warn) - not(finalLogger.error, logger.error) - not(finalLogger.fatal, logger.fatal) - - equal(finalLogger.child, logger.child) - equal(finalLogger.levels, logger.levels) - })() -}) - -test('returns a specialized final logger instance if no handler is passed', async ({ equal, not }) => { - const dest = pino.destination({ dest: getPathToNull(), sync: false }) - const logger = pino(dest) - const finalLogger = pino.final(logger) - equal(typeof finalLogger.trace, 'function') - equal(typeof finalLogger.debug, 'function') - equal(typeof finalLogger.info, 'function') - equal(typeof finalLogger.warn, 'function') - equal(typeof finalLogger.error, 'function') - equal(typeof finalLogger.fatal, 'function') - - not(finalLogger.trace, logger.trace) - not(finalLogger.debug, logger.debug) - not(finalLogger.info, logger.info) - not(finalLogger.warn, logger.warn) - not(finalLogger.error, logger.error) - not(finalLogger.fatal, logger.fatal) - - equal(finalLogger.child, logger.child) - equal(finalLogger.levels, logger.levels) -}) - -test('final logger instances synchronously flush after a log method call', async ({ pass, fail, error }) => { - const dest = pino.destination({ dest: getPathToNull(), sync: false }) - const logger = pino(dest) - let passed = false - let count = 0 - dest.flushSync = () => { - count++ - if (count === 2) { - passed = true - pass('flushSync called') - } - } - pino.final(logger, (err, finalLogger) => { - error(err) - finalLogger.info('hello') - })() - await sleep(10) - if (passed === false) fail('flushSync not called') -}) - -test('also instruments custom log methods', async ({ pass, fail, error }) => { - const dest = pino.destination({ dest: getPathToNull(), sync: false }) - const logger = pino({ - customLevels: { - foo: 35 - } - }, dest) - let passed = false - let count = 0 - dest.flushSync = () => { - count++ - if (count === 2) { - passed = true - pass('flushSync called') - } - } - pino.final(logger, (err, finalLogger) => { - error(err) - finalLogger.foo('hello') - })() - await sleep(10) - if (passed === false) fail('flushSync not called') -}) diff --git a/node_modules/pino/test/fixtures/broken-pipe/basic.js b/node_modules/pino/test/fixtures/broken-pipe/basic.js deleted file mode 100644 index def7cd0a..00000000 --- a/node_modules/pino/test/fixtures/broken-pipe/basic.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict' - -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } - -const pino = require('../../..')() - -pino.info('hello world') diff --git a/node_modules/pino/test/fixtures/broken-pipe/destination.js b/node_modules/pino/test/fixtures/broken-pipe/destination.js deleted file mode 100644 index 15a8102b..00000000 --- a/node_modules/pino/test/fixtures/broken-pipe/destination.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict' - -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } - -const pino = require('../../..') -const logger = pino(pino.destination()) - -logger.info('hello world') diff --git a/node_modules/pino/test/fixtures/broken-pipe/syncfalse.js b/node_modules/pino/test/fixtures/broken-pipe/syncfalse.js deleted file mode 100644 index 428f4ae2..00000000 --- a/node_modules/pino/test/fixtures/broken-pipe/syncfalse.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } - -const pino = require('../../..') -const logger = pino(pino.destination({ sync: false })) - -for (var i = 0; i < 1000; i++) { - logger.info('hello world') -} diff --git a/node_modules/pino/test/fixtures/default-exit.js b/node_modules/pino/test/fixtures/default-exit.js deleted file mode 100644 index a8a5aec5..00000000 --- a/node_modules/pino/test/fixtures/default-exit.js +++ /dev/null @@ -1,8 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../')) -const logger = pino() -logger.info('hello') -logger.info('world') -process.exit(0) diff --git a/node_modules/pino/test/fixtures/destination-exit.js b/node_modules/pino/test/fixtures/destination-exit.js deleted file mode 100644 index 5cfea744..00000000 --- a/node_modules/pino/test/fixtures/destination-exit.js +++ /dev/null @@ -1,8 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../')) -const logger = pino({}, pino.destination(1)) -logger.info('hello') -logger.info('world') -process.exit(0) diff --git a/node_modules/pino/test/fixtures/pretty/basic.js b/node_modules/pino/test/fixtures/pretty/basic.js deleted file mode 100644 index 1c0dbed9..00000000 --- a/node_modules/pino/test/fixtures/pretty/basic.js +++ /dev/null @@ -1,6 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ prettyPrint: true }) -log.info('h') diff --git a/node_modules/pino/test/fixtures/pretty/child-with-serializer.js b/node_modules/pino/test/fixtures/pretty/child-with-serializer.js deleted file mode 100644 index cb7df74c..00000000 --- a/node_modules/pino/test/fixtures/pretty/child-with-serializer.js +++ /dev/null @@ -1,17 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ - prettyPrint: true, - serializers: { - a (num) { - return num * 2 - } - } -}) -log.info({ a: 1 }, 'h') -const child = log.child({ a: 8 }) -child.info('h2') -child.child({ b: 2 }).info('h3') -child.info({ a: 21 }, 'h4') diff --git a/node_modules/pino/test/fixtures/pretty/child-with-updated-chindings.js b/node_modules/pino/test/fixtures/pretty/child-with-updated-chindings.js deleted file mode 100644 index d5608fbb..00000000 --- a/node_modules/pino/test/fixtures/pretty/child-with-updated-chindings.js +++ /dev/null @@ -1,8 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ prettyPrint: true }).child({ foo: 123 }) -log.info('before') -log.setBindings({ foo: 456, bar: 789 }) -log.info('after') diff --git a/node_modules/pino/test/fixtures/pretty/child.js b/node_modules/pino/test/fixtures/pretty/child.js deleted file mode 100644 index 2b31c512..00000000 --- a/node_modules/pino/test/fixtures/pretty/child.js +++ /dev/null @@ -1,8 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ prettyPrint: true }).child({ a: 1 }) -log.info('h') -log.child({ b: 2 }).info('h3') -setTimeout(() => log.info('h2'), 200) diff --git a/node_modules/pino/test/fixtures/pretty/custom-time-label.js b/node_modules/pino/test/fixtures/pretty/custom-time-label.js deleted file mode 100644 index b912809a..00000000 --- a/node_modules/pino/test/fixtures/pretty/custom-time-label.js +++ /dev/null @@ -1,9 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ - timestamp: () => ',"custom-time-label":"test"', - prettyPrint: true -}) -log.info('h') diff --git a/node_modules/pino/test/fixtures/pretty/custom-time.js b/node_modules/pino/test/fixtures/pretty/custom-time.js deleted file mode 100644 index 7cfce614..00000000 --- a/node_modules/pino/test/fixtures/pretty/custom-time.js +++ /dev/null @@ -1,9 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ - timestamp: () => ',"time":"test"', - prettyPrint: true -}) -log.info('h') diff --git a/node_modules/pino/test/fixtures/pretty/dateformat.js b/node_modules/pino/test/fixtures/pretty/dateformat.js deleted file mode 100644 index d9f912b6..00000000 --- a/node_modules/pino/test/fixtures/pretty/dateformat.js +++ /dev/null @@ -1,10 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ - prettyPrint: { - translateTime: true - } -}) -log.info('h') diff --git a/node_modules/pino/test/fixtures/pretty/error-props.js b/node_modules/pino/test/fixtures/pretty/error-props.js deleted file mode 100644 index 959592bf..00000000 --- a/node_modules/pino/test/fixtures/pretty/error-props.js +++ /dev/null @@ -1,9 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ - prettyPrint: { errorProps: 'code,errno' } -}) -const err = Object.assign(new Error('kaboom'), { code: 'ENOENT', errno: 1 }) -log.error(err) diff --git a/node_modules/pino/test/fixtures/pretty/error.js b/node_modules/pino/test/fixtures/pretty/error.js deleted file mode 100644 index 8aabc89d..00000000 --- a/node_modules/pino/test/fixtures/pretty/error.js +++ /dev/null @@ -1,7 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ prettyPrint: true }) -log.error(new Error('kaboom')) -log.error(new Error('kaboom'), 'with a message') diff --git a/node_modules/pino/test/fixtures/pretty/final-no-log-before.js b/node_modules/pino/test/fixtures/pretty/final-no-log-before.js deleted file mode 100644 index fafb674c..00000000 --- a/node_modules/pino/test/fixtures/pretty/final-no-log-before.js +++ /dev/null @@ -1,8 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ prettyPrint: true }) -process.once('beforeExit', pino.final(log, (_, logger) => { - logger.info('beforeExit') -})) diff --git a/node_modules/pino/test/fixtures/pretty/final-return.js b/node_modules/pino/test/fixtures/pretty/final-return.js deleted file mode 100644 index 7f15ce3e..00000000 --- a/node_modules/pino/test/fixtures/pretty/final-return.js +++ /dev/null @@ -1,7 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ prettyPrint: true }) -log.info('h') -pino.final(log).info('after') diff --git a/node_modules/pino/test/fixtures/pretty/final.js b/node_modules/pino/test/fixtures/pretty/final.js deleted file mode 100644 index 4024d670..00000000 --- a/node_modules/pino/test/fixtures/pretty/final.js +++ /dev/null @@ -1,9 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ prettyPrint: true }) -log.info('h') -process.once('beforeExit', pino.final(log, (_, logger) => { - logger.info('beforeExit') -})) diff --git a/node_modules/pino/test/fixtures/pretty/formatters.js b/node_modules/pino/test/fixtures/pretty/formatters.js deleted file mode 100644 index ac9c29de..00000000 --- a/node_modules/pino/test/fixtures/pretty/formatters.js +++ /dev/null @@ -1,13 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ - prettyPrint: true, - formatters: { - log (obj) { - return { foo: 'formatted_' + obj.foo } - } - } -}) -log.info({ foo: 'bar' }, 'h') diff --git a/node_modules/pino/test/fixtures/pretty/level-first.js b/node_modules/pino/test/fixtures/pretty/level-first.js deleted file mode 100644 index fde4f8d6..00000000 --- a/node_modules/pino/test/fixtures/pretty/level-first.js +++ /dev/null @@ -1,6 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ prettyPrint: { levelFirst: true } }) -log.info('h') diff --git a/node_modules/pino/test/fixtures/pretty/no-time.js b/node_modules/pino/test/fixtures/pretty/no-time.js deleted file mode 100644 index 03573af8..00000000 --- a/node_modules/pino/test/fixtures/pretty/no-time.js +++ /dev/null @@ -1,9 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ - timestamp: false, - prettyPrint: true -}) -log.info('h') diff --git a/node_modules/pino/test/fixtures/pretty/obj-msg-prop.js b/node_modules/pino/test/fixtures/pretty/obj-msg-prop.js deleted file mode 100644 index 172ae9a8..00000000 --- a/node_modules/pino/test/fixtures/pretty/obj-msg-prop.js +++ /dev/null @@ -1,6 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ prettyPrint: true }) -log.info({ msg: 'hello' }) diff --git a/node_modules/pino/test/fixtures/pretty/pretty-factory.js b/node_modules/pino/test/fixtures/pretty/pretty-factory.js deleted file mode 100644 index 5c09053f..00000000 --- a/node_modules/pino/test/fixtures/pretty/pretty-factory.js +++ /dev/null @@ -1,6 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ prettyPrint: { levelFirst: true }, prettifier: require('pino-pretty') }) -log.info('h') diff --git a/node_modules/pino/test/fixtures/pretty/redact.js b/node_modules/pino/test/fixtures/pretty/redact.js deleted file mode 100644 index de9aca12..00000000 --- a/node_modules/pino/test/fixtures/pretty/redact.js +++ /dev/null @@ -1,9 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ - prettyPrint: true, - redact: ['foo.an'] -}) -log.info({ foo: { an: 'object' } }, 'h') diff --git a/node_modules/pino/test/fixtures/pretty/serializers.js b/node_modules/pino/test/fixtures/pretty/serializers.js deleted file mode 100644 index 2e64d2f3..00000000 --- a/node_modules/pino/test/fixtures/pretty/serializers.js +++ /dev/null @@ -1,17 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ - prettyPrint: true, - serializers: { - foo (obj) { - if (obj.an !== 'object') { - throw new Error('kaboom') - } - - return 'bar' - } - } -}) -log.info({ foo: { an: 'object' } }, 'h') diff --git a/node_modules/pino/test/fixtures/pretty/skipped-output.js b/node_modules/pino/test/fixtures/pretty/skipped-output.js deleted file mode 100644 index 0ee5a513..00000000 --- a/node_modules/pino/test/fixtures/pretty/skipped-output.js +++ /dev/null @@ -1,13 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ - prettyPrint: true, - prettifier: function () { - return function () { - return undefined - } - } -}) -log.info('h') diff --git a/node_modules/pino/test/fixtures/pretty/suppress-flush-sync-warning.js b/node_modules/pino/test/fixtures/pretty/suppress-flush-sync-warning.js deleted file mode 100644 index 8bd46481..00000000 --- a/node_modules/pino/test/fixtures/pretty/suppress-flush-sync-warning.js +++ /dev/null @@ -1,7 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../../')) -const log = pino({ prettyPrint: { suppressFlushSyncWarning: true } }) -log.info('h') -log.fatal('h1') diff --git a/node_modules/pino/test/fixtures/stdout-hack-protection.js b/node_modules/pino/test/fixtures/stdout-hack-protection.js deleted file mode 100644 index edf45dfb..00000000 --- a/node_modules/pino/test/fixtures/stdout-hack-protection.js +++ /dev/null @@ -1,11 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } - -const write = process.stdout.write.bind(process.stdout) -process.stdout.write = function (chunk) { - write('hack ' + chunk) -} - -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('../../'))() -pino.info('me') diff --git a/node_modules/pino/test/fixtures/syncfalse-child.js b/node_modules/pino/test/fixtures/syncfalse-child.js deleted file mode 100644 index d7dcc455..00000000 --- a/node_modules/pino/test/fixtures/syncfalse-child.js +++ /dev/null @@ -1,6 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../')) -const asyncLogger = pino(pino.destination({ sync: false })).child({ hello: 'world' }) -pino.final(asyncLogger, (_, logger) => logger.info('h'))() diff --git a/node_modules/pino/test/fixtures/syncfalse-exit.js b/node_modules/pino/test/fixtures/syncfalse-exit.js deleted file mode 100644 index d93f9f23..00000000 --- a/node_modules/pino/test/fixtures/syncfalse-exit.js +++ /dev/null @@ -1,9 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../')) -const dest = pino.destination({ dest: 1, minLength: 4096, sync: false }) -const logger = pino({}, dest) -logger.info('hello') -logger.info('world') -process.exit(0) diff --git a/node_modules/pino/test/fixtures/syncfalse-flush-exit.js b/node_modules/pino/test/fixtures/syncfalse-flush-exit.js deleted file mode 100644 index 70a2f6d6..00000000 --- a/node_modules/pino/test/fixtures/syncfalse-flush-exit.js +++ /dev/null @@ -1,10 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../')) -const dest = pino.destination({ dest: 1, minLength: 4096, sync: false }) -const logger = pino({}, dest) -logger.info('hello') -logger.info('world') -dest.flushSync() -process.exit(0) diff --git a/node_modules/pino/test/fixtures/syncfalse.js b/node_modules/pino/test/fixtures/syncfalse.js deleted file mode 100644 index 00a5f5d8..00000000 --- a/node_modules/pino/test/fixtures/syncfalse.js +++ /dev/null @@ -1,6 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -const pino = require(require.resolve('./../../')) -const asyncLogger = pino(pino.destination({ minLength: 4096, sync: false })) -pino.final(asyncLogger, (_, logger) => logger.info('h'))() diff --git a/node_modules/pino/test/formatters.test.js b/node_modules/pino/test/formatters.test.js deleted file mode 100644 index e5afb4d1..00000000 --- a/node_modules/pino/test/formatters.test.js +++ /dev/null @@ -1,299 +0,0 @@ -'use strict' -/* eslint no-prototype-builtins: 0 */ - -const { hostname } = require('os') -const { test } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -test('level formatter', async ({ match }) => { - const stream = sink() - const logger = pino({ - formatters: { - level (label, number) { - return { - log: { - level: label - } - } - } - } - }, stream) - - const o = once(stream, 'data') - logger.info('hello world') - match(await o, { - log: { - level: 'info' - } - }) -}) - -test('bindings formatter', async ({ match }) => { - const stream = sink() - const logger = pino({ - formatters: { - bindings (bindings) { - return { - process: { - pid: bindings.pid - }, - host: { - name: bindings.hostname - } - } - } - } - }, stream) - - const o = once(stream, 'data') - logger.info('hello world') - match(await o, { - process: { - pid: process.pid - }, - host: { - name: hostname() - } - }) -}) - -test('no bindings formatter', async ({ match, notOk }) => { - const stream = sink() - const logger = pino({ - formatters: { - bindings (bindings) { - return null - } - } - }, stream) - - const o = once(stream, 'data') - logger.info('hello world') - const log = await o - notOk(log.hasOwnProperty('pid')) - notOk(log.hasOwnProperty('hostname')) - match(log, { msg: 'hello world' }) -}) - -test('log formatter', async ({ match, equal }) => { - const stream = sink() - const logger = pino({ - formatters: { - log (obj) { - equal(obj.hasOwnProperty('msg'), false) - return { hello: 'world', ...obj } - } - } - }, stream) - - const o = once(stream, 'data') - logger.info({ foo: 'bar', nested: { object: true } }, 'hello world') - match(await o, { - hello: 'world', - foo: 'bar', - nested: { object: true } - }) -}) - -test('Formatters combined', async ({ match }) => { - const stream = sink() - const logger = pino({ - formatters: { - level (label, number) { - return { - log: { - level: label - } - } - }, - bindings (bindings) { - return { - process: { - pid: bindings.pid - }, - host: { - name: bindings.hostname - } - } - }, - log (obj) { - return { hello: 'world', ...obj } - } - } - }, stream) - - const o = once(stream, 'data') - logger.info({ foo: 'bar', nested: { object: true } }, 'hello world') - match(await o, { - log: { - level: 'info' - }, - process: { - pid: process.pid - }, - host: { - name: hostname() - }, - hello: 'world', - foo: 'bar', - nested: { object: true } - }) -}) - -test('Formatters in child logger', async ({ match }) => { - const stream = sink() - const logger = pino({ - formatters: { - level (label, number) { - return { - log: { - level: label - } - } - }, - bindings (bindings) { - return { - process: { - pid: bindings.pid - }, - host: { - name: bindings.hostname - } - } - }, - log (obj) { - return { hello: 'world', ...obj } - } - } - }, stream) - - const child = logger.child({ - foo: 'bar', - nested: { object: true }, - formatters: { - bindings (bindings) { - return { ...bindings, faz: 'baz' } - } - } - }) - - const o = once(stream, 'data') - child.info('hello world') - match(await o, { - log: { - level: 'info' - }, - process: { - pid: process.pid - }, - host: { - name: hostname() - }, - hello: 'world', - foo: 'bar', - nested: { object: true }, - faz: 'baz' - }) -}) - -test('Formatters without bindings in child logger', async ({ match }) => { - const stream = sink() - const logger = pino({ - formatters: { - level (label, number) { - return { - log: { - level: label - } - } - }, - bindings (bindings) { - return { - process: { - pid: bindings.pid - }, - host: { - name: bindings.hostname - } - } - }, - log (obj) { - return { hello: 'world', ...obj } - } - } - }, stream) - - const child = logger.child({ - foo: 'bar', - nested: { object: true }, - formatters: { - log (obj) { - return { other: 'stuff', ...obj } - } - } - }) - - const o = once(stream, 'data') - child.info('hello world') - match(await o, { - log: { - level: 'info' - }, - process: { - pid: process.pid - }, - host: { - name: hostname() - }, - foo: 'bar', - other: 'stuff', - nested: { object: true } - }) -}) - -test('elastic common schema format', async ({ match, type }) => { - const stream = sink() - const ecs = { - formatters: { - level (label, number) { - return { - log: { - level: label, - logger: 'pino' - } - } - }, - bindings (bindings) { - return { - process: { - pid: bindings.pid - }, - host: { - name: bindings.hostname - } - } - }, - log (obj) { - return { ecs: { version: '1.4.0' }, ...obj } - } - }, - messageKey: 'message', - timestamp: () => `,"@timestamp":"${new Date(Date.now()).toISOString()}"` - } - - const logger = pino({ ...ecs }, stream) - - const o = once(stream, 'data') - logger.info({ foo: 'bar' }, 'hello world') - const log = await o - type(log['@timestamp'], 'string') - match(log, { - log: { level: 'info', logger: 'pino' }, - process: { pid: process.pid }, - host: { name: hostname() }, - ecs: { version: '1.4.0' }, - foo: 'bar', - message: 'hello world' - }) -}) diff --git a/node_modules/pino/test/helper.js b/node_modules/pino/test/helper.js deleted file mode 100644 index dd25d9df..00000000 --- a/node_modules/pino/test/helper.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict' - -const os = require('os') -const writer = require('flush-write-stream') -const split = require('split2') -const { existsSync, statSync } = require('fs') -const pid = process.pid -const hostname = os.hostname() - -const isWin = process.platform === 'win32' - -function getPathToNull () { - return isWin ? '\\\\.\\NUL' : '/dev/null' -} - -function once (emitter, name) { - return new Promise((resolve, reject) => { - if (name !== 'error') emitter.once('error', reject) - emitter.once(name, (...args) => { - emitter.removeListener('error', reject) - resolve(...args) - }) - }) -} - -function sink (func) { - const result = split((data) => { - try { - return JSON.parse(data) - } catch (err) { - console.log(err) - console.log(data) - } - }) - if (func) result.pipe(writer.obj(func)) - return result -} - -function check (is, chunk, level, msg) { - is(new Date(chunk.time) <= new Date(), true, 'time is greater than Date.now()') - delete chunk.time - is(chunk.pid, pid) - is(chunk.hostname, hostname) - is(chunk.level, level) - is(chunk.msg, msg) -} - -function sleep (ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms) - }) -} - -function watchFileCreated (filename) { - return new Promise((resolve, reject) => { - const TIMEOUT = 800 - const INTERVAL = 100 - const threshold = TIMEOUT / INTERVAL - let counter = 0 - const interval = setInterval(() => { - // On some CI runs file is created but not filled - if (existsSync(filename) && statSync(filename).size !== 0) { - clearInterval(interval) - resolve() - } else if (counter <= threshold) { - counter++ - } else { - clearInterval(interval) - reject(new Error(`${filename} was not created.`)) - } - }, INTERVAL) - }) -} - -module.exports = { getPathToNull, sink, check, once, sleep, watchFileCreated } diff --git a/node_modules/pino/test/hooks.test.js b/node_modules/pino/test/hooks.test.js deleted file mode 100644 index c5a67b6d..00000000 --- a/node_modules/pino/test/hooks.test.js +++ /dev/null @@ -1,97 +0,0 @@ -'use strict' - -const tap = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -tap.test('log method hook', t => { - t.test('gets invoked', async t => { - t.plan(8) - - const stream = sink() - const logger = pino({ - hooks: { - logMethod (args, method, level) { - t.type(args, Array) - t.type(level, 'number') - t.equal(args.length, 3) - t.equal(level, this.levels.values.info) - t.same(args, ['a', 'b', 'c']) - - t.type(method, Function) - t.equal(method.name, 'LOG') - - method.apply(this, [args.join('-')]) - } - } - }, stream) - - const o = once(stream, 'data') - logger.info('a', 'b', 'c') - t.match(await o, { msg: 'a-b-c' }) - }) - - t.test('fatal method invokes hook', async t => { - t.plan(2) - - const stream = sink() - const logger = pino({ - hooks: { - logMethod (args, method) { - t.pass() - method.apply(this, [args.join('-')]) - } - } - }, stream) - - const o = once(stream, 'data') - logger.fatal('a') - t.match(await o, { msg: 'a' }) - }) - - t.test('children get the hook', async t => { - t.plan(4) - - const stream = sink() - const root = pino({ - hooks: { - logMethod (args, method) { - t.pass() - method.apply(this, [args.join('-')]) - } - } - }, stream) - const child = root.child({ child: 'one' }) - const grandchild = child.child({ child: 'two' }) - - let o = once(stream, 'data') - child.info('a', 'b') - t.match(await o, { msg: 'a-b' }) - - o = once(stream, 'data') - grandchild.info('c', 'd') - t.match(await o, { msg: 'c-d' }) - }) - - t.test('get log level', async t => { - t.plan(3) - - const stream = sink() - const logger = pino({ - hooks: { - logMethod (args, method, level) { - t.type(level, 'number') - t.equal(level, this.levels.values.error) - - method.apply(this, [args.join('-')]) - } - } - }, stream) - - const o = once(stream, 'data') - logger.error('a') - t.match(await o, { msg: 'a' }) - }) - - t.end() -}) diff --git a/node_modules/pino/test/http.test.js b/node_modules/pino/test/http.test.js deleted file mode 100644 index d5e01b4a..00000000 --- a/node_modules/pino/test/http.test.js +++ /dev/null @@ -1,242 +0,0 @@ -'use strict' - -const http = require('http') -const os = require('os') -const semver = require('semver') -const { test, skip } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -const { pid } = process -const hostname = os.hostname() - -test('http request support', async ({ ok, same, error, teardown }) => { - let originalReq - const instance = pino(sink((chunk, enc) => { - ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()') - delete chunk.time - same(chunk, { - pid, - hostname, - level: 30, - msg: 'my request', - req: { - method: originalReq.method, - url: originalReq.url, - headers: originalReq.headers, - remoteAddress: originalReq.socket.remoteAddress, - remotePort: originalReq.socket.remotePort - } - }) - })) - - const server = http.createServer((req, res) => { - originalReq = req - instance.info(req, 'my request') - res.end('hello') - }) - server.unref() - server.listen() - const err = await once(server, 'listening') - error(err) - const res = await once(http.get('http://localhost:' + server.address().port), 'response') - res.resume() - server.close() -}) - -test('http request support via serializer', async ({ ok, same, error, teardown }) => { - let originalReq - const instance = pino({ - serializers: { - req: pino.stdSerializers.req - } - }, sink((chunk, enc) => { - ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()') - delete chunk.time - same(chunk, { - pid, - hostname, - level: 30, - msg: 'my request', - req: { - method: originalReq.method, - url: originalReq.url, - headers: originalReq.headers, - remoteAddress: originalReq.socket.remoteAddress, - remotePort: originalReq.socket.remotePort - } - }) - })) - - const server = http.createServer(function (req, res) { - originalReq = req - instance.info({ req }, 'my request') - res.end('hello') - }) - server.unref() - server.listen() - const err = await once(server, 'listening') - error(err) - - const res = await once(http.get('http://localhost:' + server.address().port), 'response') - res.resume() - server.close() -}) - -// skipped because request connection is deprecated since v13, and request socket is always available -skip('http request support via serializer without request connection', async ({ ok, same, error, teardown }) => { - let originalReq - const instance = pino({ - serializers: { - req: pino.stdSerializers.req - } - }, sink((chunk, enc) => { - ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()') - delete chunk.time - const expected = { - pid, - hostname, - level: 30, - msg: 'my request', - req: { - method: originalReq.method, - url: originalReq.url, - headers: originalReq.headers - } - } - if (semver.gte(process.version, '13.0.0')) { - expected.req.remoteAddress = originalReq.socket.remoteAddress - expected.req.remotePort = originalReq.socket.remotePort - } - same(chunk, expected) - })) - - const server = http.createServer(function (req, res) { - originalReq = req - delete req.connection - instance.info({ req }, 'my request') - res.end('hello') - }) - server.unref() - server.listen() - const err = await once(server, 'listening') - error(err) - - const res = await once(http.get('http://localhost:' + server.address().port), 'response') - res.resume() - server.close() -}) - -test('http response support', async ({ ok, same, error, teardown }) => { - let originalRes - const instance = pino(sink((chunk, enc) => { - ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()') - delete chunk.time - same(chunk, { - pid, - hostname, - level: 30, - msg: 'my response', - res: { - statusCode: originalRes.statusCode, - headers: originalRes.getHeaders() - } - }) - })) - - const server = http.createServer(function (req, res) { - originalRes = res - res.end('hello') - instance.info(res, 'my response') - }) - server.unref() - server.listen() - const err = await once(server, 'listening') - - error(err) - - const res = await once(http.get('http://localhost:' + server.address().port), 'response') - res.resume() - server.close() -}) - -test('http response support via a serializer', async ({ ok, same, error, teardown }) => { - const instance = pino({ - serializers: { - res: pino.stdSerializers.res - } - }, sink((chunk, enc) => { - ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()') - delete chunk.time - same(chunk, { - pid, - hostname, - level: 30, - msg: 'my response', - res: { - statusCode: 200, - headers: { - 'x-single': 'y', - 'x-multi': [1, 2] - } - } - }) - })) - - const server = http.createServer(function (req, res) { - res.setHeader('x-single', 'y') - res.setHeader('x-multi', [1, 2]) - res.end('hello') - instance.info({ res }, 'my response') - }) - - server.unref() - server.listen() - const err = await once(server, 'listening') - error(err) - - const res = await once(http.get('http://localhost:' + server.address().port), 'response') - res.resume() - server.close() -}) - -test('http request support via serializer in a child', async ({ ok, same, error, teardown }) => { - let originalReq - const instance = pino({ - serializers: { - req: pino.stdSerializers.req - } - }, sink((chunk, enc) => { - ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()') - delete chunk.time - same(chunk, { - pid, - hostname, - level: 30, - msg: 'my request', - req: { - method: originalReq.method, - url: originalReq.url, - headers: originalReq.headers, - remoteAddress: originalReq.socket.remoteAddress, - remotePort: originalReq.socket.remotePort - } - }) - })) - - const server = http.createServer(function (req, res) { - originalReq = req - const child = instance.child({ req }) - child.info('my request') - res.end('hello') - }) - - server.unref() - server.listen() - const err = await once(server, 'listening') - error(err) - - const res = await once(http.get('http://localhost:' + server.address().port), 'response') - res.resume() - server.close() -}) diff --git a/node_modules/pino/test/is-level-enabled.test.js b/node_modules/pino/test/is-level-enabled.test.js deleted file mode 100644 index dc5e119d..00000000 --- a/node_modules/pino/test/is-level-enabled.test.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict' - -const { test } = require('tap') -const pino = require('../') - -test('can check if current level enabled', async ({ equal }) => { - const log = pino({ level: 'debug' }) - equal(true, log.isLevelEnabled('debug')) -}) - -test('can check if level enabled after level set', async ({ equal }) => { - const log = pino() - equal(false, log.isLevelEnabled('debug')) - log.level = 'debug' - equal(true, log.isLevelEnabled('debug')) -}) - -test('can check if higher level enabled', async ({ equal }) => { - const log = pino({ level: 'debug' }) - equal(true, log.isLevelEnabled('error')) -}) - -test('can check if lower level is disabled', async ({ equal }) => { - const log = pino({ level: 'error' }) - equal(false, log.isLevelEnabled('trace')) -}) - -test('can check if child has current level enabled', async ({ equal }) => { - const log = pino().child({ level: 'debug' }) - equal(true, log.isLevelEnabled('debug')) - equal(true, log.isLevelEnabled('error')) - equal(false, log.isLevelEnabled('trace')) -}) - -test('can check if custom level is enabled', async ({ equal }) => { - const log = pino({ - customLevels: { foo: 35 }, - level: 'debug' - }) - equal(true, log.isLevelEnabled('foo')) - equal(true, log.isLevelEnabled('error')) - equal(false, log.isLevelEnabled('trace')) -}) diff --git a/node_modules/pino/test/levels.test.js b/node_modules/pino/test/levels.test.js deleted file mode 100644 index 071653d0..00000000 --- a/node_modules/pino/test/levels.test.js +++ /dev/null @@ -1,537 +0,0 @@ -'use strict' - -const { test } = require('tap') -const { sink, once, check } = require('./helper') -const pino = require('../') - -const levelsLib = require('../lib/levels') - -// Silence all warnings for this test -process.removeAllListeners('warning') -process.on('warning', () => {}) - -test('set the level by string', async ({ equal }) => { - const expected = [{ - level: 50, - msg: 'this is an error' - }, { - level: 60, - msg: 'this is fatal' - }] - const stream = sink() - const instance = pino(stream) - instance.level = 'error' - instance.info('hello world') - instance.error('this is an error') - instance.fatal('this is fatal') - const result = await once(stream, 'data') - const current = expected.shift() - check(equal, result, current.level, current.msg) -}) - -test('the wrong level throws', async ({ throws }) => { - const instance = pino() - throws(() => { - instance.level = 'kaboom' - }) -}) - -test('set the level by number', async ({ equal }) => { - const expected = [{ - level: 50, - msg: 'this is an error' - }, { - level: 60, - msg: 'this is fatal' - }] - const stream = sink() - const instance = pino(stream) - - instance.level = 50 - instance.info('hello world') - instance.error('this is an error') - instance.fatal('this is fatal') - const result = await once(stream, 'data') - const current = expected.shift() - check(equal, result, current.level, current.msg) -}) - -test('exposes level string mappings', async ({ equal }) => { - equal(pino.levels.values.error, 50) -}) - -test('exposes level number mappings', async ({ equal }) => { - equal(pino.levels.labels[50], 'error') -}) - -test('returns level integer', async ({ equal }) => { - const instance = pino({ level: 'error' }) - equal(instance.levelVal, 50) -}) - -test('child returns level integer', async ({ equal }) => { - const parent = pino({ level: 'error' }) - const child = parent.child({ foo: 'bar' }) - equal(child.levelVal, 50) -}) - -test('set the level via exported pino function', async ({ equal }) => { - const expected = [{ - level: 50, - msg: 'this is an error' - }, { - level: 60, - msg: 'this is fatal' - }] - const stream = sink() - const instance = pino({ level: 'error' }, stream) - - instance.info('hello world') - instance.error('this is an error') - instance.fatal('this is fatal') - const result = await once(stream, 'data') - const current = expected.shift() - check(equal, result, current.level, current.msg) -}) - -test('level-change event', async ({ equal }) => { - const instance = pino() - function handle (lvl, val, prevLvl, prevVal) { - equal(lvl, 'trace') - equal(val, 10) - equal(prevLvl, 'info') - equal(prevVal, 30) - } - instance.on('level-change', handle) - instance.level = 'trace' - instance.removeListener('level-change', handle) - instance.level = 'info' - - let count = 0 - - const l1 = () => count++ - const l2 = () => count++ - const l3 = () => count++ - instance.on('level-change', l1) - instance.on('level-change', l2) - instance.on('level-change', l3) - - instance.level = 'trace' - instance.removeListener('level-change', l3) - instance.level = 'fatal' - instance.removeListener('level-change', l1) - instance.level = 'debug' - instance.removeListener('level-change', l2) - instance.level = 'info' - - equal(count, 6) -}) - -test('enable', async ({ fail }) => { - const instance = pino({ - level: 'trace', - enabled: false - }, sink((result, enc) => { - fail('no data should be logged') - })) - - Object.keys(pino.levels.values).forEach((level) => { - instance[level]('hello world') - }) -}) - -test('silent level', async ({ fail }) => { - const instance = pino({ - level: 'silent' - }, sink((result, enc) => { - fail('no data should be logged') - })) - - Object.keys(pino.levels.values).forEach((level) => { - instance[level]('hello world') - }) -}) - -test('set silent via Infinity', async ({ fail }) => { - const instance = pino({ - level: Infinity - }, sink((result, enc) => { - fail('no data should be logged') - })) - - Object.keys(pino.levels.values).forEach((level) => { - instance[level]('hello world') - }) -}) - -test('exposed levels', async ({ same }) => { - same(Object.keys(pino.levels.values), [ - 'trace', - 'debug', - 'info', - 'warn', - 'error', - 'fatal' - ]) -}) - -test('exposed labels', async ({ same }) => { - same(Object.keys(pino.levels.labels), [ - '10', - '20', - '30', - '40', - '50', - '60' - ]) -}) - -test('setting level in child', async ({ equal }) => { - const expected = [{ - level: 50, - msg: 'this is an error' - }, { - level: 60, - msg: 'this is fatal' - }] - const instance = pino(sink((result, enc, cb) => { - const current = expected.shift() - check(equal, result, current.level, current.msg) - cb() - })).child({ level: 30 }) - - instance.level = 'error' - instance.info('hello world') - instance.error('this is an error') - instance.fatal('this is fatal') -}) - -test('setting level by assigning a number to level', async ({ equal }) => { - const instance = pino() - equal(instance.levelVal, 30) - equal(instance.level, 'info') - instance.level = 50 - equal(instance.levelVal, 50) - equal(instance.level, 'error') -}) - -test('setting level by number to unknown value results in a throw', async ({ throws }) => { - const instance = pino() - throws(() => { instance.level = 973 }) -}) - -test('setting level by assigning a known label to level', async ({ equal }) => { - const instance = pino() - equal(instance.levelVal, 30) - equal(instance.level, 'info') - instance.level = 'error' - equal(instance.levelVal, 50) - equal(instance.level, 'error') -}) - -test('levelVal is read only', async ({ throws }) => { - const instance = pino() - throws(() => { instance.levelVal = 20 }) -}) - -test('produces labels when told to', async ({ equal }) => { - const expected = [{ - level: 'info', - msg: 'hello world' - }] - const instance = pino({ - formatters: { - level (label, number) { - return { level: label } - } - } - }, sink((result, enc, cb) => { - const current = expected.shift() - check(equal, result, current.level, current.msg) - cb() - })) - - instance.info('hello world') -}) - -test('resets levels from labels to numbers', async ({ equal }) => { - const expected = [{ - level: 30, - msg: 'hello world' - }] - pino({ useLevelLabels: true }) - const instance = pino({ useLevelLabels: false }, sink((result, enc, cb) => { - const current = expected.shift() - check(equal, result, current.level, current.msg) - cb() - })) - - instance.info('hello world') -}) - -test('aliases changeLevelName to levelKey', async ({ equal }) => { - const instance = pino({ changeLevelName: 'priority' }, sink((result, enc, cb) => { - equal(result.priority, 30) - cb() - })) - - instance.info('hello world') -}) - -test('changes label naming when told to', async ({ equal }) => { - const expected = [{ - priority: 30, - msg: 'hello world' - }] - const instance = pino({ - formatters: { - level (label, number) { - return { priority: number } - } - } - }, sink((result, enc, cb) => { - const current = expected.shift() - equal(result.priority, current.priority) - equal(result.msg, current.msg) - cb() - })) - - instance.info('hello world') -}) - -test('children produce labels when told to', async ({ equal }) => { - const expected = [ - { - level: 'info', - msg: 'child 1' - }, - { - level: 'info', - msg: 'child 2' - } - ] - const instance = pino({ - formatters: { - level (label, number) { - return { level: label } - } - } - }, sink((result, enc, cb) => { - const current = expected.shift() - check(equal, result, current.level, current.msg) - cb() - })) - - const child1 = instance.child({ name: 'child1' }) - const child2 = child1.child({ name: 'child2' }) - - child1.info('child 1') - child2.info('child 2') -}) - -test('produces labels for custom levels', async ({ equal }) => { - const expected = [ - { - level: 'info', - msg: 'hello world' - }, - { - level: 'foo', - msg: 'foobar' - } - ] - const opts = { - formatters: { - level (label, number) { - return { level: label } - } - }, - customLevels: { - foo: 35 - } - } - const instance = pino(opts, sink((result, enc, cb) => { - const current = expected.shift() - check(equal, result, current.level, current.msg) - cb() - })) - - instance.info('hello world') - instance.foo('foobar') -}) - -test('setting levelKey does not affect labels when told to', async ({ equal }) => { - const instance = pino( - { - formatters: { - level (label, number) { - return { priority: label } - } - } - }, - sink((result, enc, cb) => { - equal(result.priority, 'info') - cb() - }) - ) - - instance.info('hello world') -}) - -test('throws when creating a default label that does not exist in logger levels', async ({ throws }) => { - const defaultLevel = 'foo' - throws(() => { - pino({ - customLevels: { - bar: 5 - }, - level: defaultLevel - }) - }, `default level:${defaultLevel} must be included in custom levels`) -}) - -test('throws when creating a default value that does not exist in logger levels', async ({ throws }) => { - const defaultLevel = 15 - throws(() => { - pino({ - customLevels: { - bar: 5 - }, - level: defaultLevel - }) - }, `default level:${defaultLevel} must be included in custom levels`) -}) - -test('throws when creating a default value that does not exist in logger levels', async ({ equal, throws }) => { - throws(() => { - pino({ - customLevels: { - foo: 5 - }, - useOnlyCustomLevels: true - }) - }, 'default level:info must be included in custom levels') -}) - -test('passes when creating a default value that exists in logger levels', async ({ equal, throws }) => { - pino({ - level: 30 - }) -}) - -test('log null value when message is null', async ({ equal }) => { - const expected = { - msg: null, - level: 30 - } - - const stream = sink() - const instance = pino(stream) - instance.level = 'info' - instance.info(null) - - const result = await once(stream, 'data') - check(equal, result, expected.level, expected.msg) -}) - -test('formats when base param is null', async ({ equal }) => { - const expected = { - msg: 'a string', - level: 30 - } - - const stream = sink() - const instance = pino(stream) - instance.level = 'info' - instance.info(null, 'a %s', 'string') - - const result = await once(stream, 'data') - check(equal, result, expected.level, expected.msg) -}) - -test('fatal method sync-flushes the destination if sync flushing is available', async ({ pass, doesNotThrow, plan }) => { - plan(2) - const stream = sink() - stream.flushSync = () => { - pass('destination flushed') - } - const instance = pino(stream) - instance.fatal('this is fatal') - await once(stream, 'data') - doesNotThrow(() => { - stream.flushSync = undefined - instance.fatal('this is fatal') - }) -}) - -test('fatal method should call async when sync-flushing fails', ({ equal, fail, doesNotThrow, plan }) => { - plan(2) - const messages = [ - 'this is fatal 1' - ] - const stream = sink((result) => equal(result.msg, messages.shift())) - stream.flushSync = () => { throw new Error('Error') } - stream.flush = () => fail('flush should be called') - - const instance = pino(stream) - doesNotThrow(() => instance.fatal(messages[0])) -}) - -test('calling silent method on logger instance', async ({ fail }) => { - const instance = pino({ level: 'silent' }, sink((result, enc) => { - fail('no data should be logged') - })) - instance.silent('hello world') -}) - -test('calling silent method on child logger', async ({ fail }) => { - const child = pino({ level: 'silent' }, sink((result, enc) => { - fail('no data should be logged') - })).child({}) - child.silent('hello world') -}) - -test('changing level from info to silent and back to info', async ({ equal }) => { - const expected = { - level: 30, - msg: 'hello world' - } - const stream = sink() - const instance = pino({ level: 'info' }, stream) - - instance.level = 'silent' - instance.info('hello world') - let result = stream.read() - equal(result, null) - - instance.level = 'info' - instance.info('hello world') - result = await once(stream, 'data') - check(equal, result, expected.level, expected.msg) -}) - -test('changing level from info to silent and back to info in child logger', async ({ equal }) => { - const expected = { - level: 30, - msg: 'hello world' - } - const stream = sink() - const child = pino({ level: 'info' }, stream).child({}) - - child.level = 'silent' - child.info('hello world') - let result = stream.read() - equal(result, null) - - child.level = 'info' - child.info('hello world') - result = await once(stream, 'data') - check(equal, result, expected.level, expected.msg) -}) - -// testing for potential loss of Pino constructor scope from serializers - an edge case with circular refs see: https://github.com/pinojs/pino/issues/833 -test('trying to get levels when `this` is no longer a Pino instance returns an empty string', async ({ equal }) => { - const notPinoInstance = { some: 'object', getLevel: levelsLib.getLevel } - const blankedLevelValue = notPinoInstance.getLevel() - equal(blankedLevelValue, '') -}) diff --git a/node_modules/pino/test/metadata.test.js b/node_modules/pino/test/metadata.test.js deleted file mode 100644 index 4ab770d9..00000000 --- a/node_modules/pino/test/metadata.test.js +++ /dev/null @@ -1,106 +0,0 @@ -'use strict' - -const os = require('os') -const { test } = require('tap') -const pino = require('../') - -const { pid } = process -const hostname = os.hostname() - -test('metadata works', async ({ ok, same, equal }) => { - const now = Date.now() - const instance = pino({}, { - [Symbol.for('pino.metadata')]: true, - write (chunk) { - equal(instance, this.lastLogger) - equal(30, this.lastLevel) - equal('a msg', this.lastMsg) - ok(Number(this.lastTime) >= now) - same(this.lastObj, { hello: 'world', msg: 'a msg' }) - const result = JSON.parse(chunk) - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level: 30, - hello: 'world', - msg: 'a msg' - }) - } - }) - - instance.info({ hello: 'world' }, 'a msg') -}) - -test('child loggers works', async ({ ok, same, equal }) => { - const instance = pino({}, { - [Symbol.for('pino.metadata')]: true, - write (chunk) { - equal(child, this.lastLogger) - equal(30, this.lastLevel) - equal('a msg', this.lastMsg) - same(this.lastObj, { from: 'child', msg: 'a msg' }) - const result = JSON.parse(chunk) - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level: 30, - hello: 'world', - from: 'child', - msg: 'a msg' - }) - } - }) - - const child = instance.child({ hello: 'world' }) - child.info({ from: 'child' }, 'a msg') -}) - -test('without object', async ({ ok, same, equal }) => { - const instance = pino({}, { - [Symbol.for('pino.metadata')]: true, - write (chunk) { - equal(instance, this.lastLogger) - equal(30, this.lastLevel) - equal('a msg', this.lastMsg) - same({ msg: 'a msg' }, this.lastObj) - const result = JSON.parse(chunk) - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level: 30, - msg: 'a msg' - }) - } - }) - - instance.info('a msg') -}) - -test('without msg', async ({ ok, same, equal }) => { - const instance = pino({}, { - [Symbol.for('pino.metadata')]: true, - write (chunk) { - equal(instance, this.lastLogger) - equal(30, this.lastLevel) - equal(undefined, this.lastMsg) - same({ hello: 'world' }, this.lastObj) - const result = JSON.parse(chunk) - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level: 30, - hello: 'world' - }) - } - }) - - instance.info({ hello: 'world' }) -}) diff --git a/node_modules/pino/test/mixin.test.js b/node_modules/pino/test/mixin.test.js deleted file mode 100644 index 94b521d0..00000000 --- a/node_modules/pino/test/mixin.test.js +++ /dev/null @@ -1,136 +0,0 @@ -'use strict' - -const os = require('os') -const { test } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -const { pid } = process -const hostname = os.hostname() -const level = 50 -const name = 'error' - -test('mixin object is included', async ({ ok, same }) => { - let n = 0 - const stream = sink() - const instance = pino({ - mixin () { - return { hello: ++n } - } - }, stream) - instance.level = name - instance[name]('test') - const result = await once(stream, 'data') - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level, - msg: 'test', - hello: 1 - }) -}) - -test('mixin object is new every time', async ({ plan, ok, same }) => { - plan(6) - - let n = 0 - const stream = sink() - const instance = pino({ - mixin () { - return { hello: n } - } - }, stream) - instance.level = name - - while (++n < 4) { - const msg = `test #${n}` - stream.pause() - instance[name](msg) - stream.resume() - const result = await once(stream, 'data') - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level, - msg, - hello: n - }) - } -}) - -test('mixin object is not called if below log level', async ({ ok }) => { - const stream = sink() - const instance = pino({ - mixin () { - ok(false, 'should not call mixin function') - } - }, stream) - instance.level = 'error' - instance.info('test') -}) - -test('mixin object + logged object', async ({ ok, same }) => { - const stream = sink() - const instance = pino({ - mixin () { - return { foo: 1, bar: 2 } - } - }, stream) - instance.level = name - instance[name]({ bar: 3, baz: 4 }) - const result = await once(stream, 'data') - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level, - foo: 1, - bar: 3, - baz: 4 - }) -}) - -test('mixin not a function', async ({ throws }) => { - const stream = sink() - throws(function () { - pino({ mixin: 'not a function' }, stream) - }) -}) - -test('mixin can use context', async ({ ok }) => { - const stream = sink() - const instance = pino({ - mixin (context) { - ok(context !== null && context !== undefined, 'context should be defined') - return Object.assign({ - error: context.message, - stack: context.stack - }) - } - }, stream) - instance.level = name - instance[name]({ - message: '123', - stack: 'stack' - }, 'test') -}) - -test('mixin works without context', async ({ ok }) => { - const stream = sink() - const instance = pino({ - mixin (context) { - ok(context !== null && context !== undefined, 'context is still defined w/o passing mergeObject') - - return { - something: true - } - } - }, stream) - instance.level = name - instance[name]('test') -}) diff --git a/node_modules/pino/test/pretty.test.js b/node_modules/pino/test/pretty.test.js deleted file mode 100644 index a3133cb7..00000000 --- a/node_modules/pino/test/pretty.test.js +++ /dev/null @@ -1,364 +0,0 @@ -'use strict' - -const { Writable } = require('stream') -const { test } = require('tap') -const { join } = require('path') -const execa = require('execa') -const writer = require('flush-write-stream') -const { once } = require('./helper') -const pino = require('../') -const strip = require('strip-ansi') - -test('can be enabled via exported pino function', async ({ not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'basic.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - not(strip(actual).match(/\(123456 on abcdefghijklmnopqr\): h/), null) -}) - -test('can be enabled via exported pino function with pretty configuration', async ({ not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'level-first.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - not(strip(actual).match(/^INFO.*h/), null) -}) - -test('can be enabled via exported pino function with prettifier', async ({ not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'pretty-factory.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - - await once(child, 'close') - not(strip(actual).match(/^INFO.*h/), null) -}) - -test('does not throw error when enabled with stream specified', async ({ doesNotThrow }) => { - doesNotThrow(() => pino({ prettyPrint: true }, process.stdout)) -}) - -test('throws when prettyPrint is true but pino-pretty module is not installed', async ({ throws }) => { - // pino pretty *is* installed, and probably also cached, so rather than - // messing with the filesystem the simplest way to generate a not found - // error is to simulate it: - const prettyFactory = require('pino-pretty') - require.cache[require.resolve('pino-pretty')].exports = () => { - throw Error('Cannot find module \'pino-pretty\'') - } - throws(() => pino({ prettyPrint: true }), 'Missing `pino-pretty` module: `pino-pretty` must be installed separately') - require.cache[require.resolve('pino-pretty')].exports = prettyFactory -}) - -test('throws when prettyPrint has invalid options', async ({ throws }) => { - throws(() => pino({ prettyPrint: { ignore: ['hostname'] } }), 'opts.ignore.split is not a function') -}) - -test('can send pretty print to custom stream', async ({ equal }) => { - const dest = new Writable({ - objectMode: true, - write (formatted, enc) { - equal(/^INFO.*foo\n$/.test(formatted), true) - } - }) - - const log = pino({ - prettifier: require('pino-pretty'), - prettyPrint: { - levelFirst: true, - colorize: false - } - }, dest) - log.info('foo') -}) - -test('ignores `undefined` from prettifier', async ({ equal }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'skipped-output.js')]) - - child.stdout.pipe(writer((s, enc) => { - actual += s - })) - - await once(child, 'close') - equal(actual, '') -}) - -test('parses and outputs chindings', async ({ equal, not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'child.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - not(strip(actual).match(/\(123456 on abcdefghijklmnopqr\): h/), null) - not(strip(actual).match(/\(123456 on abcdefghijklmnopqr\): h2/), null) - not(strip(actual).match(/a: 1/), null) - not(strip(actual).match(/b: 2/), null) - equal(strip(actual).match(/a: 1/g).length, 3) -}) - -test('applies updated chindings', async ({ not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'child-with-updated-chindings.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - not(strip(actual).match(/foo: 123/), null) - not(strip(actual).match(/foo: 456/), null) - not(strip(actual).match(/bar: 789/), null) -}) - -test('applies formatters', async ({ not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'formatters.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - not(strip(actual).match(/\(123456 on abcdefghijklmnopqr\): h/), null) - not(strip(actual).match(/foo: "formatted_bar"/), null) -}) - -test('parses and outputs chindings with serializer', async ({ equal, not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'child-with-serializer.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - not(strip(actual).match(/\(123456 on abcdefghijklmnopqr\): h/), null) - not(strip(actual).match(/\(123456 on abcdefghijklmnopqr\): h2/), null) - not(strip(actual).match(/\(123456 on abcdefghijklmnopqr\): h3/), null) - not(strip(actual).match(/\(123456 on abcdefghijklmnopqr\): h4/), null) - not(strip(actual).match(/a: 2/), null) - not(strip(actual).match(/a: 16/), null) - not(strip(actual).match(/a: 42/), null) - equal(strip(actual).match(/a: /g).length, 4) -}) - -test('applies serializers', async ({ not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'serializers.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - not(strip(actual).match(/\(123456 on abcdefghijklmnopqr\): h/), null) - not(strip(actual).match(/foo: "bar"/), null) -}) - -test('applies redaction rules', async ({ equal, not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'redact.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - not(strip(actual).match(/\(123456 on abcdefghijklmnopqr\): h/), null) - not(strip(actual).match(/\[Redacted\]/), null) - equal(strip(actual).match(/object/), null) -}) - -test('dateformat', async ({ not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'dateformat.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - not(strip(actual).match(/\(123456 on abcdefghijklmnopqr\): h/), null) -}) - -test('without timestamp', async ({ not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'no-time.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - not(strip(actual).slice(2), '[]') -}) - -test('with custom timestamp', async ({ equal }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'custom-time.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - equal(strip(actual).slice(0, 6), '[test]') -}) - -test('with custom timestamp label', async ({ equal }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'custom-time-label.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - equal(strip(actual).slice(0, 6), '[test]') -}) - -test('errors', async ({ not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'error.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - not(strip(actual).match(/\(123456 on abcdefghijklmnopqr\): kaboom/), null) - not(strip(actual).match(/\(123456 on abcdefghijklmnopqr\): with a message/), null) - not(strip(actual).match(/.*error\.js.*/), null) -}) - -test('errors with props', async ({ not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'error-props.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - not(strip(actual).match(/\(123456 on abcdefghijklmnopqr\): kaboom/), null) - not(strip(actual).match(/code: ENOENT/), null) - not(strip(actual).match(/errno: 1/), null) - not(strip(actual).match(/.*error-props\.js.*/), null) -}) - -test('final works with pretty', async ({ not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'final.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - not(strip(actual).match(/WARN\s+\(123456 on abcdefghijklmnopqr\): pino.final with prettyPrint does not support flushing/), null) - not(strip(actual).match(/INFO\s+\(123456 on abcdefghijklmnopqr\): beforeExit/), null) -}) - -test('final works when returning a logger', async ({ not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'final-return.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - not(strip(actual).match(/WARN\s+\(123456 on abcdefghijklmnopqr\): pino.final with prettyPrint does not support flushing/), null) - not(strip(actual).match(/INFO\s+\(123456 on abcdefghijklmnopqr\): after/), null) -}) - -test('final works without prior logging', async ({ not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'final-no-log-before.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - not(strip(actual).match(/WARN\s*: pino.final with prettyPrint does not support flushing/), null) - not(strip(actual).match(/INFO\s*\(123456 on abcdefghijklmnopqr\): beforeExit/), null) -}) - -test('suppress flush sync warning when corresponding option is specified', async ({ equal }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'suppress-flush-sync-warning.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - equal(strip(actual).match(/WARN\s+\(123456 on abcdefghijklmnopqr\): pino.final with prettyPrint does not support flushing/), null) -}) - -test('works as expected with an object with the msg prop', async ({ not }) => { - let actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'obj-msg-prop.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - not(strip(actual).match(/\(123456 on abcdefghijklmnopqr\): hello/), null) -}) - -test('should not lose stream metadata for streams with `needsMetadataGsym` flag', async ({ not }) => { - const dest = new Writable({ - objectMode: true, - write () { - not(typeof this.lastLevel === 'undefined', true) - not(typeof this.lastMsg === 'undefined', true) - not(typeof this.lastObj === 'undefined', true) - not(typeof this.lastTime === 'undefined', true) - not(typeof this.lastLogger === 'undefined', true) - } - }) - - dest[pino.symbols.needsMetadataGsym] = true - - const log = pino({ - prettyPrint: true - }, dest) - log.info('foo') -}) - -test('should not add stream metadata for streams without `needsMetadataGsym` flag', async ({ equal }) => { - const dest = new Writable({ - objectMode: true, - write () { - equal(typeof this.lastLevel === 'undefined', true) - equal(typeof this.lastMsg === 'undefined', true) - equal(typeof this.lastObj === 'undefined', true) - equal(typeof this.lastTime === 'undefined', true) - equal(typeof this.lastLogger === 'undefined', true) - } - }) - - const log = pino({ - prettyPrint: true - }, dest) - log.info('foo') -}) diff --git a/node_modules/pino/test/redact.test.js b/node_modules/pino/test/redact.test.js deleted file mode 100644 index 26a9895a..00000000 --- a/node_modules/pino/test/redact.test.js +++ /dev/null @@ -1,777 +0,0 @@ -'use strict' - -const { test } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -test('redact option – throws if not array', async ({ throws }) => { - throws(() => { - pino({ redact: 'req.headers.cookie' }) - }) -}) - -test('redact option – throws if array does not only contain strings', async ({ throws }) => { - throws(() => { - pino({ redact: ['req.headers.cookie', {}] }) - }) -}) - -test('redact option – throws if array contains an invalid path', async ({ throws }) => { - throws(() => { - pino({ redact: ['req,headers.cookie'] }) - }) -}) - -test('redact.paths option – throws if not array', async ({ throws }) => { - throws(() => { - pino({ redact: { paths: 'req.headers.cookie' } }) - }) -}) - -test('redact.paths option – throws if array does not only contain strings', async ({ throws }) => { - throws(() => { - pino({ redact: { paths: ['req.headers.cookie', {}] } }) - }) -}) - -test('redact.paths option – throws if array contains an invalid path', async ({ throws }) => { - throws(() => { - pino({ redact: { paths: ['req,headers.cookie'] } }) - }) -}) - -test('redact option – top level key', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['key'] }, stream) - instance.info({ - key: { redact: 'me' } - }) - const { key } = await once(stream, 'data') - equal(key, '[Redacted]') -}) - -test('redact option – top level key next level key', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['key', 'key.foo'] }, stream) - instance.info({ - key: { redact: 'me' } - }) - const { key } = await once(stream, 'data') - equal(key, '[Redacted]') -}) - -test('redact option – next level key then top level key', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['key.foo', 'key'] }, stream) - instance.info({ - key: { redact: 'me' } - }) - const { key } = await once(stream, 'data') - equal(key, '[Redacted]') -}) - -test('redact option – object', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['req.headers.cookie'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - equal(req.headers.cookie, '[Redacted]') -}) - -test('redact option – child object', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['req.headers.cookie'] }, stream) - instance.child({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }).info('message completed') - const { req } = await once(stream, 'data') - equal(req.headers.cookie, '[Redacted]') -}) - -test('redact option – interpolated object', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['req.headers.cookie'] }, stream) - - instance.info('test %j', { - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { msg } = await once(stream, 'data') - equal(JSON.parse(msg.replace(/test /, '')).req.headers.cookie, '[Redacted]') -}) - -test('redact.paths option – object', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['req.headers.cookie'] } }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - equal(req.headers.cookie, '[Redacted]') -}) - -test('redact.paths option – child object', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['req.headers.cookie'] } }, stream) - instance.child({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }).info('message completed') - const { req } = await once(stream, 'data') - equal(req.headers.cookie, '[Redacted]') -}) - -test('redact.paths option – interpolated object', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['req.headers.cookie'] } }, stream) - - instance.info('test %j', { - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { msg } = await once(stream, 'data') - equal(JSON.parse(msg.replace(/test /, '')).req.headers.cookie, '[Redacted]') -}) - -test('redact.censor option – sets the redact value', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['req.headers.cookie'], censor: 'test' } }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - equal(req.headers.cookie, 'test') -}) - -test('redact.censor option – can be a function that accepts value and path arguments', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['topLevel'], censor: (value, path) => value + ' ' + path.join('.') } }, stream) - instance.info({ - topLevel: 'test' - }) - const { topLevel } = await once(stream, 'data') - equal(topLevel, 'test topLevel') -}) - -test('redact.censor option – can be a function that accepts value and path arguments (nested path)', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['req.headers.cookie'], censor: (value, path) => value + ' ' + path.join('.') } }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - equal(req.headers.cookie, 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1; req.headers.cookie') -}) - -test('redact.remove option – removes both key and value', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['req.headers.cookie'], remove: true } }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - equal('cookie' in req.headers, false) -}) - -test('redact.remove – top level key - object value', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['key'], remove: true } }, stream) - instance.info({ - key: { redact: 'me' } - }) - const o = await once(stream, 'data') - equal('key' in o, false) -}) - -test('redact.remove – top level key - number value', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['key'], remove: true } }, stream) - instance.info({ - key: 1 - }) - const o = await once(stream, 'data') - equal('key' in o, false) -}) - -test('redact.remove – top level key - boolean value', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['key'], remove: true } }, stream) - instance.info({ - key: false - }) - const o = await once(stream, 'data') - equal('key' in o, false) -}) - -test('redact.remove – top level key in child logger', async ({ equal }) => { - const stream = sink() - const opts = { redact: { paths: ['key'], remove: true } } - const instance = pino(opts, stream).child({ key: { redact: 'me' } }) - instance.info('test') - const o = await once(stream, 'data') - equal('key' in o, false) -}) - -test('redact.paths preserves original object values after the log write', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['req.headers.cookie'] }, stream) - const obj = { - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - } - instance.info(obj) - const o = await once(stream, 'data') - equal(o.req.headers.cookie, '[Redacted]') - equal(obj.req.headers.cookie, 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;') -}) - -test('redact.paths preserves original object values after the log write', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['req.headers.cookie'] } }, stream) - const obj = { - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - } - instance.info(obj) - const o = await once(stream, 'data') - equal(o.req.headers.cookie, '[Redacted]') - equal(obj.req.headers.cookie, 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;') -}) - -test('redact.censor preserves original object values after the log write', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['req.headers.cookie'], censor: 'test' } }, stream) - const obj = { - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - } - instance.info(obj) - const o = await once(stream, 'data') - equal(o.req.headers.cookie, 'test') - equal(obj.req.headers.cookie, 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;') -}) - -test('redact.remove preserves original object values after the log write', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['req.headers.cookie'], remove: true } }, stream) - const obj = { - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - } - instance.info(obj) - const o = await once(stream, 'data') - equal('cookie' in o.req.headers, false) - equal('cookie' in obj.req.headers, true) -}) - -test('redact – supports last position wildcard paths', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['req.headers.*'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - equal(req.headers.cookie, '[Redacted]') - equal(req.headers.host, '[Redacted]') - equal(req.headers.connection, '[Redacted]') -}) - -test('redact – supports first position wildcard paths', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['*.headers'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - equal(req.headers, '[Redacted]') -}) - -test('redact – supports first position wildcards before other paths', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['*.headers.cookie', 'req.id'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - equal(req.headers.cookie, '[Redacted]') - equal(req.id, '[Redacted]') -}) - -test('redact – supports first position wildcards after other paths', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['req.id', '*.headers.cookie'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - equal(req.headers.cookie, '[Redacted]') - equal(req.id, '[Redacted]') -}) - -test('redact – supports first position wildcards after top level keys', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['key', '*.headers.cookie'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - equal(req.headers.cookie, '[Redacted]') -}) - -test('redact – supports top level wildcard', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['*'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - equal(req, '[Redacted]') -}) - -test('redact – supports top level wildcard with a censor function', async ({ equal }) => { - const stream = sink() - const instance = pino({ - redact: { - paths: ['*'], - censor: () => '[Redacted]' - } - }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - equal(req, '[Redacted]') -}) - -test('redact – supports top level wildcard and leading wildcard', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['*', '*.req'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - equal(req, '[Redacted]') -}) - -test('redact – supports intermediate wildcard paths', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['req.*.cookie'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - equal(req.headers.cookie, '[Redacted]') -}) - -test('redacts numbers at the top level', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['id'] }, stream) - const obj = { - id: 7915 - } - instance.info(obj) - const o = await once(stream, 'data') - equal(o.id, '[Redacted]') -}) - -test('redacts booleans at the top level', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['maybe'] }, stream) - const obj = { - maybe: true - } - instance.info(obj) - const o = await once(stream, 'data') - equal(o.maybe, '[Redacted]') -}) - -test('redacts strings at the top level', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['s'] }, stream) - const obj = { - s: 's' - } - instance.info(obj) - const o = await once(stream, 'data') - equal(o.s, '[Redacted]') -}) - -test('does not redact primitives if not objects', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['a.b'] }, stream) - const obj = { - a: 42 - } - instance.info(obj) - const o = await once(stream, 'data') - equal(o.a, 42) -}) - -test('redacts null at the top level', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['n'] }, stream) - const obj = { - n: null - } - instance.info(obj) - const o = await once(stream, 'data') - equal(o.n, '[Redacted]') -}) - -test('supports bracket notation', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['a["b.b"]'] }, stream) - const obj = { - a: { 'b.b': 'c' } - } - instance.info(obj) - const o = await once(stream, 'data') - equal(o.a['b.b'], '[Redacted]') -}) - -test('supports bracket notation with further nesting', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['a["b.b"].c'] }, stream) - const obj = { - a: { 'b.b': { c: 'd' } } - } - instance.info(obj) - const o = await once(stream, 'data') - equal(o.a['b.b'].c, '[Redacted]') -}) - -test('supports bracket notation with empty string as path segment', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['a[""].c'] }, stream) - const obj = { - a: { '': { c: 'd' } } - } - instance.info(obj) - const o = await once(stream, 'data') - equal(o.a[''].c, '[Redacted]') -}) - -test('supports leading bracket notation (single quote)', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['[\'a.a\'].b'] }, stream) - const obj = { - 'a.a': { b: 'c' } - } - instance.info(obj) - const o = await once(stream, 'data') - equal(o['a.a'].b, '[Redacted]') -}) - -test('supports leading bracket notation (double quote)', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['["a.a"].b'] }, stream) - const obj = { - 'a.a': { b: 'c' } - } - instance.info(obj) - const o = await once(stream, 'data') - equal(o['a.a'].b, '[Redacted]') -}) - -test('supports leading bracket notation (backtick quote)', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['[`a.a`].b'] }, stream) - const obj = { - 'a.a': { b: 'c' } - } - instance.info(obj) - const o = await once(stream, 'data') - equal(o['a.a'].b, '[Redacted]') -}) - -test('supports leading bracket notation (single-segment path)', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['[`a.a`]'] }, stream) - const obj = { - 'a.a': { b: 'c' } - } - instance.info(obj) - const o = await once(stream, 'data') - equal(o['a.a'], '[Redacted]') -}) - -test('supports leading bracket notation (single-segment path, wilcard)', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['[*]'] }, stream) - const obj = { - 'a.a': { b: 'c' } - } - instance.info(obj) - const o = await once(stream, 'data') - equal(o['a.a'], '[Redacted]') -}) - -test('child bindings are redacted using wildcard path', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['*.headers.cookie'] }, stream) - instance.child({ - req: { - method: 'GET', - url: '/', - headers: { - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - } - } - }).info('message completed') - const { req } = await once(stream, 'data') - equal(req.headers.cookie, '[Redacted]') -}) - -test('child bindings are redacted using wildcard and plain path keys', async ({ equal }) => { - const stream = sink() - const instance = pino({ redact: ['req.method', '*.headers.cookie'] }, stream) - instance.child({ - req: { - method: 'GET', - url: '/', - headers: { - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - } - } - }).info('message completed') - const { req } = await once(stream, 'data') - equal(req.headers.cookie, '[Redacted]') - equal(req.method, '[Redacted]') -}) diff --git a/node_modules/pino/test/serializers.test.js b/node_modules/pino/test/serializers.test.js deleted file mode 100644 index af12d3a3..00000000 --- a/node_modules/pino/test/serializers.test.js +++ /dev/null @@ -1,208 +0,0 @@ -'use strict' -const { test } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -const parentSerializers = { - test: () => 'parent' -} - -const childSerializers = { - test: () => 'child' -} - -test('default err namespace error serializer', async ({ equal }) => { - const stream = sink() - const parent = pino(stream) - - parent.info({ err: ReferenceError('test') }) - const o = await once(stream, 'data') - equal(typeof o.err, 'object') - equal(o.err.type, 'ReferenceError') - equal(o.err.message, 'test') - equal(typeof o.err.stack, 'string') -}) - -test('custom serializer overrides default err namespace error serializer', async ({ equal }) => { - const stream = sink() - const parent = pino({ - serializers: { - err: (e) => ({ - t: e.constructor.name, - m: e.message, - s: e.stack - }) - } - }, stream) - - parent.info({ err: ReferenceError('test') }) - const o = await once(stream, 'data') - equal(typeof o.err, 'object') - equal(o.err.t, 'ReferenceError') - equal(o.err.m, 'test') - equal(typeof o.err.s, 'string') -}) - -test('null overrides default err namespace error serializer', async ({ equal }) => { - const stream = sink() - const parent = pino({ serializers: { err: null } }, stream) - - parent.info({ err: ReferenceError('test') }) - const o = await once(stream, 'data') - equal(typeof o.err, 'object') - equal(typeof o.err.type, 'undefined') - equal(typeof o.err.message, 'undefined') - equal(typeof o.err.stack, 'undefined') -}) - -test('undefined overrides default err namespace error serializer', async ({ equal }) => { - const stream = sink() - const parent = pino({ serializers: { err: undefined } }, stream) - - parent.info({ err: ReferenceError('test') }) - const o = await once(stream, 'data') - equal(typeof o.err, 'object') - equal(typeof o.err.type, 'undefined') - equal(typeof o.err.message, 'undefined') - equal(typeof o.err.stack, 'undefined') -}) - -test('serializers override values', async ({ equal }) => { - const stream = sink() - const parent = pino({ serializers: parentSerializers }, stream) - parent.child({ serializers: childSerializers }) - - parent.fatal({ test: 'test' }) - const o = await once(stream, 'data') - equal(o.test, 'parent') -}) - -test('child does not overwrite parent serializers', async ({ equal }) => { - const stream = sink() - const parent = pino({ serializers: parentSerializers }, stream) - const child = parent.child({ serializers: childSerializers }) - - parent.fatal({ test: 'test' }) - - const o = once(stream, 'data') - equal((await o).test, 'parent') - const o2 = once(stream, 'data') - child.fatal({ test: 'test' }) - equal((await o2).test, 'child') -}) - -test('Symbol.for(\'pino.serializers\')', async ({ equal, not }) => { - const stream = sink() - const parent = pino({ serializers: parentSerializers }, stream) - const child = parent.child({ a: 'property' }) - - equal(parent[Symbol.for('pino.serializers')], parentSerializers) - equal(child[Symbol.for('pino.serializers')], parentSerializers) - - const child2 = parent.child({ - serializers: { - a - } - }) - - function a () { - return 'hello' - } - - not(child2[Symbol.for('pino.serializers')], parentSerializers) - equal(child2[Symbol.for('pino.serializers')].a, a) - equal(child2[Symbol.for('pino.serializers')].test, parentSerializers.test) -}) - -test('children inherit parent serializers', async ({ equal }) => { - const stream = sink() - const parent = pino({ serializers: parentSerializers }, stream) - - const child = parent.child({ a: 'property' }) - child.fatal({ test: 'test' }) - const o = await once(stream, 'data') - equal(o.test, 'parent') -}) - -test('children inherit parent Symbol serializers', async ({ equal, not }) => { - const stream = sink() - const symbolSerializers = { - [Symbol.for('pino.*')]: parentSerializers.test - } - const parent = pino({ serializers: symbolSerializers }, stream) - - equal(parent[Symbol.for('pino.serializers')], symbolSerializers) - - const child = parent.child({ - serializers: { - [Symbol.for('a')]: a, - a - } - }) - - function a () { - return 'hello' - } - - not(child[Symbol.for('pino.serializers')], symbolSerializers) - equal(child[Symbol.for('pino.serializers')].a, a) - equal(child[Symbol.for('pino.serializers')][Symbol.for('a')], a) - equal(child[Symbol.for('pino.serializers')][Symbol.for('pino.*')], parentSerializers.test) -}) - -test('children serializers get called', async ({ equal }) => { - const stream = sink() - const parent = pino({ - test: 'this' - }, stream) - - const child = parent.child({ a: 'property', serializers: childSerializers }) - - child.fatal({ test: 'test' }) - const o = await once(stream, 'data') - equal(o.test, 'child') -}) - -test('children serializers get called when inherited from parent', async ({ equal }) => { - const stream = sink() - const parent = pino({ - test: 'this', - serializers: parentSerializers - }, stream) - - const child = parent.child({ serializers: { test: function () { return 'pass' } } }) - - child.fatal({ test: 'fail' }) - const o = await once(stream, 'data') - equal(o.test, 'pass') -}) - -test('non-overridden serializers are available in the children', async ({ equal }) => { - const stream = sink() - const pSerializers = { - onlyParent: function () { return 'parent' }, - shared: function () { return 'parent' } - } - - const cSerializers = { - shared: function () { return 'child' }, - onlyChild: function () { return 'child' } - } - - const parent = pino({ serializers: pSerializers }, stream) - - const child = parent.child({ serializers: cSerializers }) - - const o = once(stream, 'data') - child.fatal({ shared: 'test' }) - equal((await o).shared, 'child') - const o2 = once(stream, 'data') - child.fatal({ onlyParent: 'test' }) - equal((await o2).onlyParent, 'parent') - const o3 = once(stream, 'data') - child.fatal({ onlyChild: 'test' }) - equal((await o3).onlyChild, 'child') - const o4 = once(stream, 'data') - parent.fatal({ onlyChild: 'test' }) - equal((await o4).onlyChild, 'test') -}) diff --git a/node_modules/pino/test/stdout-protection.test.js b/node_modules/pino/test/stdout-protection.test.js deleted file mode 100644 index 57a8516a..00000000 --- a/node_modules/pino/test/stdout-protection.test.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict' - -const { test } = require('tap') -const { join } = require('path') -const { fork } = require('child_process') -const { once } = require('./helper') -const writer = require('flush-write-stream') - -test('do not use SonicBoom is someone tampered with process.stdout.write', async ({ not }) => { - let actual = '' - const child = fork(join(__dirname, 'fixtures', 'stdout-hack-protection.js'), { silent: true }) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - not(actual.match(/^hack/), null) -}) diff --git a/node_modules/pino/test/syncfalse.test.js b/node_modules/pino/test/syncfalse.test.js deleted file mode 100644 index 8171c9b9..00000000 --- a/node_modules/pino/test/syncfalse.test.js +++ /dev/null @@ -1,142 +0,0 @@ -'use strict' - -const os = require('os') -const { createWriteStream } = require('fs') -const { join } = require('path') -const { test } = require('tap') -const { fork } = require('child_process') -const writer = require('flush-write-stream') -const { once, getPathToNull } = require('./helper') - -test('asynchronous logging', async ({ equal, teardown }) => { - const now = Date.now - const hostname = os.hostname - const proc = process - global.process = { - __proto__: process, - pid: 123456 - } - Date.now = () => 1459875739796 - os.hostname = () => 'abcdefghijklmnopqr' - delete require.cache[require.resolve('../')] - const pino = require('../') - let expected = '' - let actual = '' - const normal = pino(writer((s, enc, cb) => { - expected += s - cb() - })) - - const dest = createWriteStream(getPathToNull()) - dest.write = (s) => { - actual += s - } - const asyncLogger = pino(dest) - - let i = 44 - while (i--) { - normal.info('h') - asyncLogger.info('h') - } - - const expected2 = expected.split('\n')[0] - let actual2 = '' - - const child = fork(join(__dirname, '/fixtures/syncfalse.js'), { silent: true }) - child.stdout.pipe(writer((s, enc, cb) => { - actual2 += s - cb() - })) - await once(child, 'close') - equal(actual, expected) - equal(actual2.trim(), expected2) - - teardown(() => { - os.hostname = hostname - Date.now = now - global.process = proc - }) -}) - -test('sync false with child', async ({ equal, teardown }) => { - const now = Date.now - const hostname = os.hostname - const proc = process - global.process = { - __proto__: process, - pid: 123456 - } - Date.now = function () { - return 1459875739796 - } - os.hostname = function () { - return 'abcdefghijklmnopqr' - } - delete require.cache[require.resolve('../')] - const pino = require('../') - let expected = '' - let actual = '' - const normal = pino(writer((s, enc, cb) => { - expected += s - cb() - })).child({ hello: 'world' }) - - const dest = createWriteStream(getPathToNull()) - dest.write = function (s) { actual += s } - const asyncLogger = pino(dest).child({ hello: 'world' }) - - let i = 500 - while (i--) { - normal.info('h') - asyncLogger.info('h') - } - - asyncLogger.flush() - - const expected2 = expected.split('\n')[0] - let actual2 = '' - - const child = fork(join(__dirname, '/fixtures/syncfalse-child.js'), { silent: true }) - child.stdout.pipe(writer((s, enc, cb) => { - actual2 += s - cb() - })) - await once(child, 'close') - equal(actual, expected) - equal(actual2.trim(), expected2) - - teardown(() => { - os.hostname = hostname - Date.now = now - global.process = proc - }) -}) - -test('throw an error if extreme is passed', async ({ throws }) => { - const pino = require('..') - throws(() => { - pino({ extreme: true }) - }) -}) - -test('flush does nothing with sync true (default)', async () => { - const instance = require('..')() - instance.flush() -}) - -test('pino.extreme() emits a warning', async ({ equal }) => { - const pino = require('..') - process.removeAllListeners('warning') - process.nextTick(() => pino.extreme(0)) - const warning = await once(process, 'warning') - const expected = 'The pino.extreme() option is deprecated and will be removed in v7. Use pino.destination({ sync: false }) instead.' - equal(expected, warning.message) - equal('extreme_deprecation', warning.code) -}) - -test('pino.extreme() defaults to stdout', async ({ equal }) => { - const pino = require('..') - process.removeAllListeners('warning') - const dest = pino.extreme() - equal(dest.fd, process.stdout.fd) -}) diff --git a/node_modules/pino/test/timestamp.test.js b/node_modules/pino/test/timestamp.test.js deleted file mode 100644 index 4bf54721..00000000 --- a/node_modules/pino/test/timestamp.test.js +++ /dev/null @@ -1,121 +0,0 @@ -'use strict' - -/* eslint no-prototype-builtins: 0 */ - -const { test } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -test('pino exposes standard time functions', async ({ ok }) => { - ok(pino.stdTimeFunctions) - ok(pino.stdTimeFunctions.epochTime) - ok(pino.stdTimeFunctions.unixTime) - ok(pino.stdTimeFunctions.nullTime) - ok(pino.stdTimeFunctions.isoTime) -}) - -test('pino accepts external time functions', async ({ equal }) => { - const opts = { - timestamp: () => ',"time":"none"' - } - const stream = sink() - const instance = pino(opts, stream) - instance.info('foobar') - const result = await once(stream, 'data') - equal(result.hasOwnProperty('time'), true) - equal(result.time, 'none') -}) - -test('pino accepts external time functions with custom label', async ({ equal }) => { - const opts = { - timestamp: () => ',"custom-time-label":"none"' - } - const stream = sink() - const instance = pino(opts, stream) - instance.info('foobar') - const result = await once(stream, 'data') - equal(result.hasOwnProperty('custom-time-label'), true) - equal(result['custom-time-label'], 'none') -}) - -test('inserts timestamp by default', async ({ ok, equal }) => { - const stream = sink() - const instance = pino(stream) - instance.info('foobar') - const result = await once(stream, 'data') - equal(result.hasOwnProperty('time'), true) - ok(new Date(result.time) <= new Date(), 'time is greater than timestamp') - equal(result.msg, 'foobar') -}) - -test('omits timestamp when timestamp option is false', async ({ equal }) => { - const stream = sink() - const instance = pino({ timestamp: false }, stream) - instance.info('foobar') - const result = await once(stream, 'data') - equal(result.hasOwnProperty('time'), false) - equal(result.msg, 'foobar') -}) - -test('inserts timestamp when timestamp option is true', async ({ ok, equal }) => { - const stream = sink() - const instance = pino({ timestamp: true }, stream) - instance.info('foobar') - const result = await once(stream, 'data') - equal(result.hasOwnProperty('time'), true) - ok(new Date(result.time) <= new Date(), 'time is greater than timestamp') - equal(result.msg, 'foobar') -}) - -test('child inserts timestamp by default', async ({ ok, equal }) => { - const stream = sink() - const logger = pino(stream) - const instance = logger.child({ component: 'child' }) - instance.info('foobar') - const result = await once(stream, 'data') - equal(result.hasOwnProperty('time'), true) - ok(new Date(result.time) <= new Date(), 'time is greater than timestamp') - equal(result.msg, 'foobar') -}) - -test('child omits timestamp with option', async ({ equal }) => { - const stream = sink() - const logger = pino({ timestamp: false }, stream) - const instance = logger.child({ component: 'child' }) - instance.info('foobar') - const result = await once(stream, 'data') - equal(result.hasOwnProperty('time'), false) - equal(result.msg, 'foobar') -}) - -test('pino.stdTimeFunctions.unixTime returns seconds based timestamps', async ({ equal }) => { - const opts = { - timestamp: pino.stdTimeFunctions.unixTime - } - const stream = sink() - const instance = pino(opts, stream) - const now = Date.now - Date.now = () => 1531069919686 - instance.info('foobar') - const result = await once(stream, 'data') - equal(result.hasOwnProperty('time'), true) - equal(result.time, 1531069920) - Date.now = now -}) - -test('pino.stdTimeFunctions.isoTime returns ISO 8601 timestamps', async ({ equal }) => { - const opts = { - timestamp: pino.stdTimeFunctions.isoTime - } - const stream = sink() - const instance = pino(opts, stream) - const ms = 1531069919686 - const now = Date.now - Date.now = () => ms - const iso = new Date(ms).toISOString() - instance.info('foobar') - const result = await once(stream, 'data') - equal(result.hasOwnProperty('time'), true) - equal(result.time, iso) - Date.now = now -}) diff --git a/node_modules/printj/LICENSE b/node_modules/printj/LICENSE deleted file mode 100644 index de06dc2b..00000000 --- a/node_modules/printj/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (C) 2016-present SheetJS - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/node_modules/printj/README.md b/node_modules/printj/README.md deleted file mode 100644 index 53b9e881..00000000 --- a/node_modules/printj/README.md +++ /dev/null @@ -1,1003 +0,0 @@ -# printj - -Extended `sprintf` implementation (for the browser and nodejs). Emphasis on -compliance, performance and IE6+ support. - -```js -PRINTJ.sprintf("Hello %s!", "World"); -``` - -A self-contained specification of the printf format string is included below in [this README](#printf-format-string-specification), as well as a summary of the -[support against various printf implementations](#support-summary) - - -## Installation - -With [npm](https://www.npmjs.org/package/printj): - -```bash -$ npm install printj -``` - -In the browser: - -```html - -``` - -The browser exposes a variable `PRINTJ` - -When installed globally, npm installs a script `printj` that renders the format -string with the given arguments. Running the script with `-h` displays help. - -The script will manipulate `module.exports` if available (e.g. in a CommonJS -`require` context). This is not always desirable. To prevent the behavior, -define `DO_NOT_EXPORT_PRINTJ` - -## Usage - -In all cases, the relevant function takes a format and arguments to be rendered. - -The return value is a JS string. - -- `PRINTJ.sprintf(format, ...args)` assumes the arguments are passed directly - -- `PRINTJ.vsprintf(format, argv)` assumes the arguments are passed in an array - -For example: - -```js -> // var PRINTJ = require('printj'); // uncomment this line if in node -> var sprintf = PRINTJ.sprintf, vsprintf = PRINTJ.vsprintf; -> sprintf("Hello %s", "SheetJS") // 'Hello SheetJS' -> sprintf("%d + %d = %d", 2,3,2+3) // '2 + 3 = 5' -> vsprintf("%d + %d = %d", [2,3,5]) // '2 + 3 = 5' -> sprintf("%1$02hhx %1$u %1$i %1$o", -69) // 'bb 4294967227 -69 37777777673' -``` - -The command line script takes a format and arguments: - -``` -usage: printj [options] [args...] - -Options: - -h, --help output usage information - -d, --dump print debug information about format string - -Arguments are treated as strings unless prefaced by a type indicator: - n: call parseInt (ex. n:3 -> 3) - f: call parseFloat (ex. f:3.1 -> 3.1) - b: false when lowercase value is "FALSE" or "0", else true - s: interpret as string (ex. s:n:3 -> "n:3") - j: interpret as an object using JSON.parse - e: evaluate argument (ex. e:1+1 -> 2, e:"1"+1 -> "11") - -samples: - $ printj '|%02hhx%d|' n:50 e:0x7B # |32123| - $ printj '|%2$d + %3$d is %1$d|' e:1+2 n:1 n:2 # |1 + 2 is 3| - $ printj '|%s is %s|' s:1+2 e:1+2 # |1+2 is 3| - $ printj '|%c %c|' s:69 n:69 # |6 E| -``` - -## Testing - -`make test` will run the nodejs-based test. - -`make stress` will run a larger test encompassing every possible conversion. It -requires access to a C compiler. - -## License - -Please consult the attached LICENSE file for details. All rights not explicitly -granted by the Apache 2.0 license are reserved by the Original Author. - -## Badges - -[![Build Status](https://saucelabs.com/browser-matrix/printj.svg)](https://saucelabs.com/u/printj) - -[![Build Status](https://travis-ci.org/SheetJS/printj.svg?branch=master)](https://travis-ci.org/SheetJS/printj) - -[![Coverage Status](http://img.shields.io/coveralls/SheetJS/printj/master.svg)](https://coveralls.io/r/SheetJS/printj?branch=master) - -[![NPM Downloads](https://img.shields.io/npm/dt/printj.svg)](https://npmjs.org/package/printj) - -[![Dependencies Status](https://david-dm.org/sheetjs/printj/status.svg)](https://david-dm.org/sheetjs/printj) - -[![ghit.me](https://ghit.me/badge.svg?repo=sheetjs/printj)](https://ghit.me/repo/sheetjs/printj) - -[![Analytics](https://ga-beacon.appspot.com/UA-36810333-1/SheetJS/printj?pixel)](https://github.com/SheetJS/printj) - -# printf format string specification - -The `printf` family of functions attempt to generate and output a string of -characters from a series of arguments, following a user-supplied "format string" -specification. The format string contains normal characters that are written to -the output string as well as specifiers that describe which parameter to insert -and how to render the parameter. This specification describes how a conformant -implementation should process the format string and generate an output string. -Any discrepancies between this document and the reference implementation are -considered bugs in the implementation. - -### Original C Interface - -Every function in the `printf` family follows the same logic to generate strings -but have different interfaces reflecting different input and output behaviors. -Some functions have wide variants that use wide `wchar_t *` strings rather than -normal C `char *`. The following variants are required by the POSIX spec: - -| function | max length | output destination | vintage | wide ver | -|------------|------------|-----------------------|---------|------------| -| `printf` | unbounded | standard output | K&R | `wprintf` | -| `fprintf` | unbounded | stream (`FILE *`) | K&R | `fwprintf` | -| `sprintf` | unbounded | string (`char *`) | K&R | `swprintf` | -| `snprintf` | parameter | string (`char *`) | C99 | | -| `dprintf` | unbounded | POSIX file descriptor | POSIX | | - -Each function has a dual function, whose name begins with `v`, that accepts the -parameters as a `va_list` rather than formal parameters. In all cases, they -return the number of characters written or a negative value to indicate error: - -```C -int sprintf(char *ostr, const char *fmt, ...); -int vsprintf(char *ostr, const char *fmt, va_list arg_list); - -int swprintf(wchar_t *ostr, const wchar_t *fmt, ...); -int vswprintf(wchar_t *ostr, const wchar_t *fmt, va_list arg_list); -``` - -### JS and C strings - -C "strings" are really just arrays of numbers. An external code page (such as -ASCII) maps those numbers to characters. K&R defines two types of strings: -basic character set strings (`char *`) and extended character set strings -(`wchar_t *`). In contrast, JS has a true string value type. - -Unlike in C, JS strings do not treat the null character as an end-of-string -marker. As a result, characters beyond the first null character will be used. - -The JS equivalent of a C extended string would be an array of the individual -character codes. The C basic string equivalent would involve specifying a code -page and mapping back. The `codepage` JS library supports common codepages. - -While capturing the essence of C strings, using arrays of character codes is not -idiomatic JS. Few developers leverage this and the downsides far exceed the -benefits of a more direct translation. The effect can be feigned, as shown in -the `js2c` code sample at the end of the document. - -### JS Interface - -In the absence of a standard output or even a standard concept of a stream, the -non-string outputs are irrelevant. Similarly there is no JS analogue of wide -characters. While useful, lack of direct memory management obviates `snprintf`. -This implementation exports the remaining functions, `sprintf` and `vsprintf`. - -Instead of replicating the original C signature and `errno`, functions directly -return the output string and throw Errors: - -```typescript -function sprintf(fmt:string, ...args):string; -function vsprintf(fmt:string, args:Array):string; -``` - -The C functions return the number of characters written to the string, which is -directly accessible in JS via the `length` property. A direct replica of the -various string functions are included at the end of the document. - -## Specifier heritage and regular expression - -Note: The regular expressions follow perl `/x` style. Whitespace characters -outside of character classes are ignored. `#` is a comment character and every -character until the end of the line is ignored. To convert to a standard regex: - -```js -regex_string.replace(/#.*$/gm,"").replace(/^\s*/gm,"").replace(/\s*\n/gm,""); -``` - -Based on K&R, conversions originally followed the format: - - - required: leading `%` - - optional: `-` (POSIX refers to this as the "flags") - - optional: positive number or `*` (POSIX "width") - - optional: period followed by positive number or `*` (POSIX "precision") - - optional: an `h` or `l` to indicate size of data (POSIX "length") - - required: character describing output behavior (POSIX "conversion specifier") - -This is captured by the regular expression: - -```perl -/%(?: - ([-])? # flags (only minus sign) - (\d+|\*)? # width - (?:\.(\d+|\*))? # period + precision - ([hl])? # length - ([dioxXucsfeEgGp%]) # conversion specifier -)/x -``` - -Various implementations of `printf` have added different functionality. - -ANSI standards up through C99: - - - more flags `"+"` `" "` `"0"` `"#"` - - more lengths `"L"` `"hh"` `"ll"` `"j"` `"z"` `"t"` - - more conversions `"F"` `"a"` `"A"` `"n"` - -The POSIX specification of `printf` added: - - - positional parameters to identify argument indices - - more flags `"'"` - - more conversions `"C"` `"S"` - - clarifications regarding corner cases and "undefined behavior" - -BSD implementations added: - - - more lengths `"q"` - - more conversions `"D"` `"U"` `"O"` - -glibc (GNU) added: - - - more lengths `"Z"` - - more conversions `"m"` - -Windows C Runtime (CRT) added: - - - more lengths `"I"` `"I32"` `"I64"` `"w"` - -glibc and CRT both added `Z`. glibc uses `Z` for the length `size_t`. CRT uses -`Z` as a conversion for length-prefixed strings. This implementation takes the -former approach, handling `Z` in the same way as `z`. - -BSD and IBM C library both added `D`. BSD uses `D` as a conversion, namely as -an alias of `ld`. IBM uses `D` for the length for `_Decimal64`, a decimal -floating point type, in accordance with ISO/IEC TR 24732. This implementation -takes the former approach. - -This implementation also adds new conversions: - - - `"b"` and `"B"` for binary (base-2) integer renderings - - `"y"` and `"Y"` for true/false and yes/no Boolean conversions - - `"J"` for JSON - - `"T"` and `"V"` for JS typeof and valueOf inspection - -Combining the various extensions yields the following regular expression: - -```perl -/%(?: - %| # literal %% (flags etc prohibited) - ([1-9]\d*\$)? # positional parameter - ([-+ 0\x23\x27]*)? # flags - ([1-9]\d*|\*(?:[1-9]\d*\$)?)? # width - (?:\.(\d+|\*(?:[1-9]\d*\$)?))? # precision - (hh?|ll?|[LzjtqZIw])? # length - ([diouxXfFeEgGaAcCsSpnDUOmbByYJVT]) # conversion specifier -)/x -``` -This implementation explicitly does not support certain non-standard extensions: - - - AltiVec vector length extensions (`v` with `h`/`l`/`ll`): - - CRT fixed width lengths `I32` and `I64` - -## Conversion Specifier Quick Reference Table - -| C | Type | Summary | -|-----|:--------:|-------------------------------------------------------------| -| `a` | floating | base-2 exp form w/ hex mantissa and dec exponent, lowercase | -| `A` | floating | base-2 exp form w/ hex mantissa and dec exponent, uppercase | -| `b` | extended | cast to C `unsigned int`, standard form binary | -| `B` | extended | cast to C `unsigned long`, standard form binary | -| `c` | text | print `latin-1` char from number OR first char of string | -| `C` | text | print `UCS-2` char from number OR first char of string | -| `d` | integral | cast to C `int`, standard form decimal | -| `D` | integral | cast to C `long`, standard form decimal | -| `e` | floating | base-10 exp form w/dec mantissa and dec exponent, lowercase | -| `E` | floating | base-10 exp form w/dec mantissa and dec exponent, uppercase | -| `f` | floating | base-10 decimal form, lowercase extended values | -| `F` | floating | base-10 decimal form, uppercase extended values | -| `g` | floating | print using `e` or `f` conversion based on value/precision | -| `G` | floating | print using `E` or `F` conversion based on value/precision | -| `i` | integral | cast to C `int`, standard form decimal (alias of `d`) | -| `J` | extended | prints objects using JSON or `util.inspect` | -| `m` | misc | prints info about Error objects (JS equivalent of `errno`) | -| `n` | misc | do not print! stores number of chars written to arg `.len` | -| `o` | integral | cast to C `unsigned int`, standard form octal | -| `O` | integral | cast to C `unsigned long`, standard form octal | -| `p` | misc | print `"l"` field of object (fake pointer) | -| `s` | text | print string argument | -| `S` | text | print string argument (alias of `"s"`) | -| `T` | extended | print type information (`typeof` or `Object toString`) | -| `u` | integral | cast to C `unsigned int`, standard form decimal | -| `U` | integral | cast to C `unsigned long`, standard form decimal | -| `V` | extended | print primitive value (`valueOf`) | -| `x` | integral | cast to C `unsigned int`, standard form hex, lowercase | -| `X` | integral | cast to C `unsigned long`, standard form hex, uppercase | -| `y` | extended | prints `true`/`false` or `yes`/`no` based on Boolean value | -| `Y` | extended | prints `TRUE`/`FALSE` or `YES`/`NO` based on Boolean value | -| `%` | misc | print the literal `%` character | - -## Parameter Selection - -The default behavior is to consume arguments in order: - -```C -printf("Count to 3: %d %d %d", 1, 2, 3); // Count to 3: 1 2 3 -``` - -POSIX `printf` permits explicit argument selection, bypassing the standard -behavior of using the arguments in order. To select the `n`-th argument, use -`n$` immediately after the `%` token to select an argument for the conversion: - -```C -printf("%d %d %d", 1, 2, 3); // 1 2 3 (implicit order 1, 2, 3 ) -printf("%1$s %2$s %3$s", "a", "b", "c"); // a b c (explicit order 1, 2, 3 ) -printf("%1$s %3$s %2$s", "a", "b", "c"); // a c b (explicit order 1, 3, 2 ) -``` - -The POSIX standard asserts that mixing positional and non-positional conversions -is undefined behavior. This implementation handles mixing by tracking the index -for non-positional conversions: - -```C -printf("%s %4$s %s %5$s %s", "a", "b", "c", "d", "e"); // a d b e c -``` - -The POSIX standard requires that if an argument is used in the format, every -preceding argument must be used. This implementation relaxes that requirement: - -```C -printf("%3$s", "a", "b", "c"); // c (technically invalid since "a"/"b" unused) -``` - -## Dynamic Specifiers - -The width and precision specifiers may include the dynamic specifier `*` which -instructs the engine to read the next argument (assumed to be an integer). Just -as with the positional parameter, `idx$` immediately after the `*` token selects -the numeric argument. - -For example: - -```C -printf("|%5s|", "sheetjs"); // |sheetjs| (width = 5) -printf("|%*s|", 5, "sheetjs"); // |sheetjs| (width first argument) -printf("|%2$*1$s|", 5, "sheetjs", 10); // |sheetjs| (width is argument #1) - -printf("|%10s|", "sheetjs"); // | sheetjs| (width = 10) -printf("|%2$*3$s|", 5, "sheetjs", 10); // | sheetjs| (width is argument #3) -``` - -Arguments are generally consumed in order as presented in the format string: - -```C -printf("|%s|", val); -printf("|%*s|", width, val); -printf("|%.*s|", prec, val); -printf("|%*.*s|", width, prec, val); -printf("|%0*.*d|", 4, 2, 1); // | 01| width=4 prec=2 value=1 -``` - -Positional arguments can be applied to width and precision: - -```C -printf("|%*.*d|", width, prec, val); -printf("|%2$0*3$.*1$d|", prec, val, width); -printf("|%0*.*d|", 4, 2, 1); // | 01| width=4 prec=2 value=1 flags='0' -printf("|%1$0*3$.*2$d|", 1, 2, 4); // | 01| width=4 prec=2 value=1 flags='0' -``` - -A negative width is interpreted as the `-` flag with a positive width: - -```C -printf("|%*.*d|", 4, 2, 1); // | 01| width=4 prec=2 value=1 flags='' -printf("|%-*.*d|", 4, 2, 1); // |01 | width=4 prec=2 value=1 flags='-' -printf("|%*.*d|", -4, 2, 1); // |01 | width=4 prec=2 value=1 flags='-' -printf("|%-*.*d|", -4, 2, 1); // |01 | width=4 prec=2 value=1 flags='-' -``` - -A negative precision is discarded: - -```C -printf("|%*s|", 4, "sheetjs"); // |sheetjs| width=4 -printf("|%*.*s|", 4, 3, "sheetjs"); // | she| width=4 prec=3 -printf("|%*.*s|", 4, 2, "sheetjs"); // | sh| width=4 prec=2 -printf("|%*.*s|", 4, 1, "sheetjs"); // | s| width=4 prec=1 -printf("|%*.*s|", 4, 0, "sheetjs"); // | | width=4 prec=0 -printf("|%*.*s|", 4, -1, "sheetjs"); // |sheetjs| width=4 (prec ignored) -``` - - -# C Data Model - -JS has one numeric type `Number` which represents an IEEE754 double-precision -(64-bit) floating point number. C has a multitude of numeric types, including -floating point as well as integer types. The sizes of those data types are -implementation-dependent. A "C data model" specifies the sizes of the core C -data types. - -### Integer Types - -POSIX `printf` specification references 8 integer types in integer conversions: - -| C data type | fmt | unsigned type | fmt | signed type | fmt | -|-------------|------:|----------------------|------:|---------------|------:| -| `char` | | `unsigned char` | `hhu` | `signed char` | `hhd` | -| `short` | `hd` | `unsigned short` | `hu` | | | -| `int` | `d` | `unsigned int` | `u` | | | -| `long` | `ld` | `unsigned long` | `lu` | | | -| `long long` | `lld` | `unsigned long long` | `llu` | | | -| `size_t` | `zu` | | | `ssize_t` | `zd` | -| `intmax_t` | `jd` | `uintmax_t` | `ju` | | | -| `ptrdiff_t` | `td` | | | | | - -C99 does not officially define a signed `size_t` or unsigned `ptrdiff_t` type. -POSIX does define `ssize_t` but no equivalent `uptrdiff_t`. - -BSD additionally recognizes the types `quad_t` and `u_quad_t`, which this -implementation treats as `long long int` and `unsigned long long int`. - -### Character and String Types - -Two integer types are used in character and string conversions: - -| type | fmt | -|-------------|------:| -| `wchar_t` | `ls` | -| `wint_t` | `lc` | - -Both wide types `wchar_t` and `wint_t` can be signed or unsigned according to -C99. Both types are used only in character and string conversions. Based on -K&R "printable characters are always positive", the types are assumed unsigned. - -### Floating Point Number Types - -K&R recognizes 3 floating point types. C99 later tied it to IEC 60559: - -| C data type | precision | total bits | exponent | mantissa | fmt | -|:--------------|:----------|:----------:|:--------:|:--------:|------:| -| `float` | single | `32` | `8` | `23` | | -| `double` | double | `64` | `11` | `52` | `f` | -| `long double` | extended | `80` | `15` | `64` | `Lf` | - -## Implementation - -Numerous "C data models", specifying the bit/byte sizes of the various types, -have been and continue to be used. For example, OSX and other modern 64-bit -UNIX flavors use the "LP64" C data model. 64-bit Windows currently uses the -"LLP64" model. 32-bit systems generally use the "ILP32" model. The 8-bit byte -sizes for the various types under the various models are defined in ctypes.json -in the `Models` object as per the following table: - -| type | ctypes.json | LP64 | ILP32 | LLP64 | -|-------------|-------------|-----:|------:|------:| -| `char` | `char` | 1 | 1 | 1 | -| `short` | `short` | 2 | 2 | 2 | -| `int` | `int` | 4 | 4 | 4 | -| `long` | `long` | 8 | 4 | 4 | -| `long long` | `longlong` | 8 | 8 | 8 | -| `wchar_t` | `wchar_t` | 4 | 4 | 2 | -| `wint_t` | `wint_t` | 4 | 4 | 2 | -| `size_t` | `size_t` | 8 | 4 | 8 | -| `intmax_t` | `intmax_t` | 8 | 8 | 8 | -| `ptrdiff_t` | `ptrdiff_t` | 8 | 4 | 8 | - -By default the source assumes the LP64 data model. Other data models are -supported in the source tree, controlled by the JSFLAGS variable in the build -process. Set the `JS_MODEL` variable to the desired index as specified in the -`ModelNames` array in `bits/ctype.json`: - -```bash -$ >>`, all -operations act on signed integers. For example: - -```js -Math.pow(2,31) | 0; // -2147483648 == -Math.pow(2,31) -(Math.pow(2,32)-2) ^ 0; // -2 --1 >>> 0 // 4294967295 == Math.pow(2,32) - 1 -``` - -JS Number can exactly represent every integer in the range `-2^53 .. 2^53`. For -lengths exceeding 32 bits, `Math.round` is appropriate. - -| bits | unsigned | signed | -|------|---------------------------|-------------------------------------------| -| 8 | `V & 0xFF` | `V &= 0xFF; if(V > 0x7F) V-= 0x100` | -| 16 | `V & 0xFFFF` | `V &= 0xFFFF; if(V > 0x7FFF) V-= 0x10000` | -| 32 | `V >>> 0` | `V | 0` | -| 64 | `Math.abs(Math.round(V))` | `Math.round(V)` | - -## Length Specifiers for Integer Conversions - -When a length specifier implies a certain size (such as `hh` for a single-byte -integer), the number will be converted before rendering strings. For example: - -```C -printf("%1$02hhx %1$02hx %1$02lx %1$02llx", 256); // |00 100 100 100| -printf("%1$02hhx %1$02hx %1$02lx %1$02llx", 4096); // |00 1000 1000 1000| -printf("%1$02hhx %1$02hx %1$02lx %1$02llx", 65536); // |00 00 10000 10000| -``` - -Values are restricted by first limiting the result to a specified number of -bytes (appropriate bit-and) and then adding or subtracting to ensure the value -is signed or unsigned according to the conversion specifier. If a length is -specified, it overrides the implied length of the conversion. The following -table describes the behavior of this implementation: - -| implied C type | ctypes.json | length | conv default | -|:------------------------------------|:------------|:------:|:-------------| -| `int` or `unsigned int` | `int` | (none) | d i o u x X | -| `char` or `unsigned char` | `char` | hh | -| `short` or `unsigned short` | `short` | h | -| `long` or `unsigned long` | `long` | l | D U O | -| `long long` or `unsigned long long` | `longlong` | L ll q | -| `intmax_t` or `uintmax_t` | `intmax_t` | j | -| `size_t` or `ssize_t` | `size_t` | z Z | -| `ptrdiff_t` or unsigned variant | `ptrdiff_t` | t | - -## Rendering Unsigned Integers in Base 10 ("u" and "U" conversions) - -`num.toString(10)` produces the correct result for exact integers. - -`"u"` conversion restricts values to `int`; `"U"` restricts to `long`. - -## Rendering Unsigned Integers in Base 8 ("o" and "O" conversions) - -Even though `num.toString(8)` is implementation-dependent, all browser -implementations use standard form for integers in the exact range. - -The alternate form (`#`) prints a `"0"` prefix. - -`"o"` conversion restricts values to `int`; `"O"` restricts to `long`. - -## Rendering Unsigned Integers in Base 16 ("x" and "X" conversions) - -Even though `num.toString(16)` is implementation-dependent, all browser -implementations use standard form for integers in the exact range. - -The alternate form (`#`) prints a `"0x"` or `"0X"` prefix. - -Unlike `"U" "O" "D"`, `"X"` conversion uses `A-F` instead of `a-f` in hex. - -## Rendering Signed Integers in Base 10 ("d" "i" and "D" conversions) - -`num.toString(10)` produces the correct result for exact integers. The flags -`" +"` control prefixes for positive integers. - -`"di"` conversions restrict values to `int`; `"D"` restricts to `long`. - - -# Floating Point Conversions - -This section covers the conversions `fFeEgGaA`. - -Due to C variadic argument promotion rules, `float` types are always promoted to -`double`. None of the conversions or length specifiers signal that an argument -is to be interpreted as a `float`. There is no JS canonical representation of -an extended floating point number, so JS `Number` suffices. - -## Infinity, NaN, and Negative Zero - -JS recognizes a few special IEEE754 values, as described in the following table: - -| JS value | JS Expression | Description | -|------------:|:--------------|:-----------------------------------------------| -| `Infinity` | `1./0.` | Positive limiting value `lim{x->0+} 1/x` | -| `-Infinity` | `-1./0.` | Negative limiting value `lim{x->0+} -1/x` | -| `NaN` | `0./0.` | Placeholder for "not-a-number" e.g. `0./0.` | -| `-0.` | `-1/Infinity` | Negative limiting value `lim{x->0-} x` | - -JS `Number` methods render different strings from the POSIX spec: - -| JS value | POSIX string | JS string | -|------------:|:----------------------------------------------|--------------:| -| `Infinity` | `"inf" "INF"` or `"infinity" "INFINITY"` | `"Infinity"` | -| `-Infinity` | `"-inf" "-INF"` or `"-infinity" "-INFINITY"` | `"-Infinity"` | -| `NaN` | `"[-]nan" "[-]NAN"` w/opt parenthesized chars | `"NaN"` | -| `-0.` | uses negative sign (e.g. `"-0"` under `"%f"`) | same as `+0.` | - -This implementation performs the required adjustments. - -## Exponential Form ("e" and "E" conversions) - -Aside from the special cases discussed above, JS `num.toExponential(prec)` -differs from POSIX `printf("%1$.*2$e", num, prec)` in the exponent field: JS -writes exponents with the fewest digits (POSIX requires 2+ digits). This is -easily fixed by inspecting the output string and inserting a "0" when needed. - -The optional `#` flag forces the decimal point to appear when precision is 0. -This is also easily corrected by adding a decimal point just before the "e". - -## Standard Form ("f" and "F" conversions) - -The POSIX spec only requires that the number of digits after the decimal point -is equal to the precision. It does not specify how many digits appear before -the decimal point, nor does it specify how to handle numbers that cannot be -exactly represented. - -For values less than `1e21` the JS `num.toFixed(n)` generally matches `%f` with -the specified precision. However, for larger values `toFixed` defaults to the -exponential form. - -## Value-dependent Form ("g" and "G" conversions) - -The final form (exponential or standard) is determined based on the value. The -threshold is different from the JS `toString` / `toPrecision` thresholds and -depends on the specified precision as well as the base-10 exponent: - -| Value | `"%.3g"` | `toPrecision(3)` | -|----------:|:-----------|:-----------------| -| 1.2345e-4 | `0.000123` | `0.000123` | -| 1.2345e-5 | `1.23e-05` | `0.0000123` | -| 1.2345e-6 | `1.23e-06` | `0.00000123` | -| 1.2345e-7 | `1.23e-07` | `1.23e-7` | - -According to JS spec, `toPrecision` uses standard form when `precision > E` and -`E >= -6`. For printf standard form is used when `precision > E` and `E >= -4`. - -## Hex-Mantissa Decimal-Binary-Exponent Form ("a" and "A" conversions) - -A general exponential form involves 3 parameters: radix of the mantissa, base of -the exponent expression, and radix of the exponent expression. The standard -exponential form uses decimal for all three parts. For base 16, there are quite -a few reasonable combinations. Consider the value `1.234567e-80`: - -| Mant | Exp Base | Radix-10 (sigil `";"`) | Radix-16 (sigil `";"`) | -|:----:|:--------:|:-----------------------|:-----------------------| -| 10 | 10 | `1.234567;-80` | `1.234567;-50` | -| 16 | 10 | `1.3c0c9539b8887;-80` | `1.3c0c9539b8887;-50` | -| 16 | 16 | `5.daf8c8f5f4104;-67` | `5.daf8c8f5f4104;-43` | -| 16 | 4 | `1.76be323d7d041;-133` | `1.76be323d7d041;-85` | -| 16 | 2 | `1.76be323d7d041;-266` | `1.76be323d7d041;-10a` | - -POSIX `"%a"` uses a hex mantissa (16), decimal exponent radix (10), and binary -exponent base (2). The general normalized form requires that the integral part -of the mantissa to exceed 0 and not to exceed `exponent base - 1` except in the -special case of `0`. The sigil is `p` and exponent sign is always used. - -JS `num.toString(radix)` is implementation-dependent for valid non-10 radices -(`2-9, 11-36`). IE uses hex-mantissa decimal-hex-exponent form when the -absolute value of the base-2 exponent exceeds 60. Otherwise, IE uses an exact -standard hexadecimal form. Chrome, Safari and other browsers always use the -exact standard hexadecimal form. Both forms are easily converted to `"%a"` by -calculating and dividing by the appropriate power of 2. - -For each non-zero normal floating point value, there are 4 acceptable strings -that represent the value, derived by multiplying the normalized value by powers -of 2 and adjusting the exponent accordingly: - -| Value | Normalized | Alternate `*2` | Alternate `*4` | Alternate `*8` | -|:--------|:---------------|:---------------|:---------------|:---------------| -| `1` | `1p+0` | `2p-1` | `4p-2` | `8p-3` | -| `.2` | `1.9999999p-3` | `3.3333333p-4` | `6.6666666p-5` | `c.cccccccp-6` | -| `.69` | `1.6147ae1p-1` | `2.c28f5c2p-2` | `5.851eb85p-3` | `b.0a3d70ap-4` | -| `6.e20` | `1.043561p+69` | `2.086ac3p+68` | `4.10d586p+67` | `8.21ab0dp+66` | - -JS engines follow the glibc model: multiply by a suitable power of 16 so that -the mantissa is between 1 and 16, render left to right one digit at a time, then -fix the result at the end. FreeBSD and OSX always show the normalized form. -This implementation defaults to the normalized form. To switch to the glibc -form, define `DO_NOT_NORMALIZE` in the `JSFLAGS` variable when building: - -```bash -$ JSFLAGS=-DDO_NOT_NORMALIZE make -``` - -# Character Conversions - -This section covers the conversions `sScC`. - -## Rendering Strings ("s" and "S" conversions) - -JS has no concept of "wide strings" (`wchar_t *` in C), so the length modifiers -are ignored. `s` and `S` are treated as equivalent. - -Arguments are first interpreted as strings by calling the `String` function. -Implementing `toString` on the argument to be converted may lead to unexpected -results: - -```C -var O = {valueOf:function() {return 456;}, toString:function() {return "123"}}; -printf("%1$s %1$d", O); // "123 456" -``` - -If a positive precision is specified, up to that many characters will be taken -from the string. Otherwise the entire string will be used: - -```C -printf("|%s|", "sheetjs"); // '|sheetjs|' (no precision) -printf("|%.9s|", "sheetjs"); // '|sheetjs|' (string shorter than precision) -printf("|%.5s|", "sheetjs"); // '|sheet|' (string truncated) -``` - -Lengths are measured using the JS string length accessor. Since there is no -attempt to correct for multi-character sequences like combining marks, the -results may be unexpected: - -```C -printf("%.1s","ñ"); // 'n' not "ñ" -``` - -If the width is specified and is greater than the width of the string to be -rendered, padding will be applied. If the `"-"` flag is specified, then the -string will be right-padded, otherwise it will be left-padded. If the `"0"` -flag is specified, the final string is left-padded with zeroes. The `"-"` flag -takes precedence over `0`. - -```C -printf( "|%s|", "sheetjs"); // '|sheetjs|' (no width) -printf( "|%5s|", "sheetjs"); // '|sheetjs|' (string longer than width) -printf( "|%9s|", "sheetjs"); // '| sheetjs|' (no flag = left pad spaces) -printf( "|%09s|", "sheetjs"); // '|00sheetjs|' ("0" = left pad "0") -printf( "|%-9s|", "sheetjs"); // '|sheetjs |' ("-" = right pad space) -printf("|%-09s|", "sheetjs"); // '|sheetjs |' ("0" ignored) -``` - -## Rendering Characters ("c" and "C" conversions) - -JS has no concept of "wide characters" (`wchar_t` in C). The length modifier is -used in determining whether the number should be interpreted as one or two -16-bit character codes (when the "C" format or the "l" or "ll" specifiers are -used) or a single 8-bit char code. Precision and flags are ignored. - -# Non-Numeric Conversions - -## The literal "%" symbol ("%" conversion) - -All other parameters are ignored. - -## Interpreting and Rendering Pointers ("p" conversion) - -JS has no true concept of pointers. In array and typed array contexts, it is -common to associate a position object that stores the address relative to the -start of the array. This implementation reads the `l` key and interprets as a -32-bit or 52-bit unsigned integer depending on `size_t` in the data model. - -The normal output format is equivalent to `"%#x"` but the alternate form emits -using the `"%d"` format. When the pointer is invalid, `-1` is rendered. Only -the `"#"` flag is interpreted. - -```js -var x = {}, y = {l:3}; -printf("%1$p %1$#p", y); // 0x3 3 -printf("%1$p %1$#p", x); // 0xFFFFFFFF -1 -``` - -## Extracting length of a partial conversion ("n" conversion) - -C `printf` permits a special `n` conversion which interprets the argument as an -integral pointer (interpreted size controlled by the length specifier) and -writes the number of characters printed to that pointer. - -JS has no true concept of pointers in the C sense. The library works around -the limitation by interpreting the argument as an object and assigning to the -`len` key. The conversion does not write any characters to the output string: - -```js -var x = {}; -printf("%1$s %2$J%2$n abc", "foo", x); // "foo {} abc", also sets x.len = 6 -// |........| |......| (6 chars at that point) -``` - -This implementation mutates the object while processing: - -```js -var x = {}; -printf("%1$s %2$J%2$n %3$s %2$J", "foo", x, "bar"); // 'foo {} bar {"len":6}' -``` - -## Error messages ("m" conversion) - -glibc supports an `m` conversion that does not consume arguments. It renders -the string `strerror(errno)` where `strerror` is the libc function and `errno` -is the global error number. - -JS has no equivalent of `errno` and no standard JS runtime exposes a similar -global error variable, so `%m` will write the default message `"Success"`. A -positional parameter or `#` flag changes the behavior: - -| form | position | behavior | -|:------------:|:--------:|---------------------------------------| -| main | no | do not read argument, emit "Success" | -| alt (flag #) | no | read and process next argument | -| main or alt | yes | read and process specified argument | - -In all forms other than `"%m"`, an argument will be processed as follows: - -- If the argument is not an instance of an `Error`, emit "Success" -- If the `message` field is set, emit the error message. -- If the `errno` field is set, emit "Error number " followed by the errno -- Otherwise emit "Error " followed by the error interpreted as a String - -``` -var x = new Error("sheetjs"); -x.errno = 69; x.toString = function() { return "SHEETJS"; }; -printf("|%#m|", x); // |sheetjs| -delete x.message; -printf("|%#m|", x); // |Error number 69| -delete x.errno; -printf("|%#m|", x); // |Error SHEETJS| -``` - -# Extensions - -These additional conversions take advantage of unused format characters: - -## Rendering Boolean Values ("y" and "Y" conversions) - -Values are converted to Boolean and tested for truthiness. The `Y` rendering -is the uppercase version of the equivalent rendering with format `y`. - - -| form | truthy value `y` (`Y`) | falsy value `y` (`Y`) | -|:------------:|:-----------------------:|:---------------------:| -| main | `true` (`TRUE`) | `false` (`FALSE`) | -| alt (flag #) | `yes` (`YES`) | `no` (`NO`) | - -Width and precision are applied in the same manner as the `s` conversion. - -```js -printf("|%1$y|%2$Y|%1$#Y|%2$#y|%2$.1y|", 1, 0); // |true|FALSE|YES|no|f| -printf("|%05.2Y|%-5.2y|", 1, 0); // |000TR|fa | -``` - -## Rendering JSON ("J" conversion) - -The default rendering is the standard output from `JSON.stringify`. Alternate -form (`"#"` flag) renders using `util.inspect` if available. - -```js -var x = { - a: [1,[2,3,4],5,6,7], - b: { - c: { - d: { e:"f" }, - g:"h", - i:"j" - }, - k:"l", - m:"n", - o:"p"}, - q: "r" -}; -printf("%J", x) // '{"a":[1,[2,3,4],5,6,7],"b":{"c":{"d":{"e":"f"}, ..(ctnd).. -printf("%#J", x) // '{ a: [ 1, [ 2, 3, 4 ], 5, 6, 7 ],\n b: { c: { ..(ctnd).. -``` - -Width, precision and other flags are ignored. - -## JS typeof and valueOf ("T" and "V" conversion) - -Under the "T" conversion, the result of `typeof arg` is rendered. If the `#` -flag is specified, the type is derived from `Object.prototype.toString`: - -``` -printf("%1$T %1$#T", 1); // 'number Number' -printf("%1$T %1$#T", 'foo'); // 'string String' -printf("%1$T %1$#T", [1,2,3]); // 'object Array' -printf("%1$T %1$#T", null); // 'object Null' -printf("%1$T %1$#T", undefined); // 'undefined Undefined' -``` - -Under the "V" conversion, the result of `arg.valueOf()` is rendered: - -``` -var _f = function() { return "f"; }; -var _3 = function() { return 3; }; -printf("%1$d %1$s %1$V", {toString:_f}); // '0 f f' -printf("%1$d %1$s %1$V", {valueOf:_3}); // '3 [object Object] 3' -printf("%1$d %1$s %1$V", {valueOf:_3, toString:_f}); // '3 f 3' -``` - -## Rendering Unsigned Integers in Base 2 ("b" and "B" conversions) - -The implementation is similar to the octal `"o"` and `"O"` conversions, except -for the radix (2 for `"b"` and `"B"`) and the alternate-form prefix (`"0b"`) - -# Miscellaneous Notes - -## Format Characters - -For compatibility purposes, format characters must be printable ASCII characters -(ASCII codes `0x20 - 0x7E`). The 95 eligible characters are listed below: - -| C | Type | C | Type | C | Type | C | Type | -|-----|:----------:|-----|:----------:|-----|:----------:|-----|:----------:| -| `a` | conversion | `A` | conversion | ` ` | flag | `!` | | -| `b` | conversion | `B` | conversion | `"` | | `#` | flag | -| `c` | conversion | `C` | conversion | `$` | other | `%` | conversion | -| `d` | conversion | `D` | conversion | `&` | | `'` | flag | -| `e` | conversion | `E` | conversion | `(` | | `)` | | -| `f` | conversion | `F` | conversion | `*` | other | `+` | flag | -| `g` | conversion | `G` | conversion | `,` | | `-` | flag | -| `h` | length | `H` | | `.` | other | `/` | | -| `i` | conversion | `I` | length | `0` | digit | `1` | digit | -| `j` | length | `J` | conversion | `2` | digit | `3` | digit | -| `k` | | `K` | | `4` | digit | `5` | digit | -| `l` | length | `L` | length | `6` | digit | `7` | digit | -| `m` | conversion | `M` | | `8` | digit | `9` | digit | -| `n` | conversion | `N` | | `:` | | `;` | | -| `o` | conversion | `O` | conversion | `<` | | `=` | | -| `p` | conversion | `P` | | `>` | | `?` | | -| `q` | length | `Q` | | `@` | | `[` | | -| `r` | | `R` | | `\` | | `]` | | -| `s` | conversion | `S` | conversion | `^` | | `_` | | -| `t` | length | `T` | conversion | `~` | | `{` | | -| `u` | conversion | `U` | conversion | `|` | | `}` | | -| `v` | | `V` | conversion | `` ` `` | | -| `w` | length | `W` | | -| `x` | conversion | `X` | conversion | -| `y` | conversion | `Y` | conversion | -| `z` | length | `Z` | length | - -## JS and C strings - -C provides no guidance on the actual character set. According to K&R all valid -characters in source code must be in a character set that is a subset of the -7-bit ASCII set. This implementation falls back on the UTF-16 base required by -JS. When converting C literal strings, there are a few differences in escaping: - -| C escape sequence | Equivalent JS | Notes | -|:------------------|:--------------|:---------------------------------------| -| `"\a"` | `"\007"` | BEL character will not ring in browser | -| `"\?"` | `"?"` | JS does not handle trigraphs | -| `"\ooo"` (octal) | `"\ooo"` | JS uses Latin-1 for non-ASCII codes | -| `"\xhh"` (hex) | `"\xhh"` | JS uses Latin-1 for non-ASCII codes | - -## Browser Deviations - -Opera does not always include the last significant digit in base 16 rendering. -For example, `(-6.9e-11).toString(16)` is `"0.000000004bddc5fd160168"` in every -other browser but is `"0.000000004bddc5fd16017"` in Opera. The test suite skips -the `%a/%A` precision-less formats in Opera. - -`Object.prototype.toString.call` gives unexpected results in older browsers, and -no attempt is made to correct for them. The test suite ignores those cases: - -| value | `%#T` expected | `%#T` IE < 9 | `%#T` Android < 4.4 | -|:------------|:---------------|:-------------|:--------------------| -| `null` | `"Null"` | `"Object"` | `"global"` | -| `undefined` | `"Undefined"` | `"Object"` | `"global"` | - -## Support Summary - -- Full [POSIX](http://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html) conversion support with extensions! - [Conversion Specifier Table](#conversion-specifier-quick-reference-table) -- Full support for POSIX flags and positional parameters -- Emulation of BSD `quad_t` and `u_quad_t` conversion -- Parser accepts but does not emulate CRT wide and unicode character conversions -- glibc `Z` length conversion and extended `m` error support -- Parser fails on CRT `I32`/`I64` fixed lengths -- Default `LP64` data model but can be configured to support `ILP32` or `LLP64` - diff --git a/node_modules/printj/bin/printj.njs b/node_modules/printj/bin/printj.njs deleted file mode 100755 index 53fd52f8..00000000 --- a/node_modules/printj/bin/printj.njs +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env node -/* printj.js (C) 2016-present SheetJS -- http://sheetjs.com */ -/* eslint-env node */ -/* vim: set ts=2 ft=javascript: */ -/*jshint node:true, evil:true */ -var X = require("../"), argv = process.argv; - -function help() { -[ -"usage: printj [options] [args...]", -"", -"Options:", -" -h, --help output usage information", -" -d, --dump print debug information about format string", -"", -"Arguments are treated as strings unless prefaced by a type indicator:", -" n: call parseInt (ex. n:3 -> 3)", -" f: call parseFloat (ex. f:3.1 -> 3.1)", -' b: false when lowercase value is "FALSE" or "0", else true', -" s: interpret as string (ex. s:n:3 -> \"n:3\")", -" j: interpret as an object using JSON.parse", -" e: evaluate argument (ex. e:1+1 -> 2, e:\"1\"+1 -> \"11\")", -"", -"samples:", -" $ printj '|%02hhx%d|' n:50 e:0x7B # |32123|", -" $ printj '|%2$d + %3$d is %1$d|' e:1+2 n:1 n:2 # |1 + 2 is 3| ", -" $ printj '|%s is %s|' s:1+2 e:1+2 # |1+2 is 3|", -" $ printj '|%c %c|' s:69 n:69 # |6 E|", -"", -"Support email: dev@sheetjs.com", -"Web Demo: http://oss.sheetjs.com/printj/" -].forEach(function(l) { console.log(l); }); - return 0; -} - -function parse_arg(arg/*:string*/)/*:any*/ { - var m = arg.substr(2), p/*:number*/ = 0; - if(arg.charCodeAt(1) === 58) switch((p = arg.charCodeAt(0))) { - case /*n*/ 110: return parseInt(m, 10); - case /*f*/ 102: return parseFloat(m); - case /*b*/ 98: return !(m.toUpperCase() === "FALSE" || m === "0"); - case /*j*/ 106: return JSON.parse(m); - case /*e*/ 101: return eval(m); - case /*s*/ 115: return m; - } - void p; - return arg; -} - -var args/*:Array*/ = []; -var fmt = "", n = 0; -for(var i = 2; i < argv.length; ++i) switch(argv[i]) { - case "--help": case "-h": process.exit(help()); break; - case "--dump": case "-d": if(fmt.length===0) fmt = argv[++i]; process.exit(dump(fmt)); break; - default: if(n++ === 0) fmt = argv[i]; else args.push(parse_arg(argv[i])); -} - -console.log(X.vsprintf(fmt, args)); -process.exit(0); - -function dump(fmt/*:string*/)/*:number*/ { - if(!fmt) { console.error("printj: missing format argument"); return 1; } - X._tokenize(fmt).forEach(function(x){console.log(x);}); - return 0; -} diff --git a/node_modules/printj/dist/LICENSE b/node_modules/printj/dist/LICENSE deleted file mode 100644 index de06dc2b..00000000 --- a/node_modules/printj/dist/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (C) 2016-present SheetJS - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/node_modules/printj/dist/printj.js b/node_modules/printj/dist/printj.js deleted file mode 100644 index a2a38d6e..00000000 --- a/node_modules/printj/dist/printj.js +++ /dev/null @@ -1,605 +0,0 @@ -/* printj.js (C) 2016-present SheetJS -- http://sheetjs.com */ -/* vim: set ts=2: */ -/*jshint sub:true, eqnull:true */ -/*exported PRINTJ */ -var PRINTJ; -(function (factory) { - /*jshint ignore:start */ - /*eslint-disable */ - if(typeof DO_NOT_EXPORT_PRINTJ === 'undefined') { - if('object' === typeof exports) { - factory(exports); - } else if ('function' === typeof define && define.amd) { - define(function () { - var module = {}; - factory(module); - return module; - }); - } else { - factory(PRINTJ = {}); - } - } else { - factory(PRINTJ = {}); - } - /*eslint-enable */ - /*jshint ignore:end */ -}(function(PRINTJ) { - -PRINTJ.version = '1.1.2'; - -function tokenize(fmt) { - var out = []; - var start = 0; - - var i = 0; - var infmt = false; - var fmtparam = "", fmtflags = "", fmtwidth = "", fmtprec = "", fmtlen = ""; - - var c = 0; - - var L = fmt.length; - - for(; i < L; ++i) { - c = fmt.charCodeAt(i); - if(!infmt) { - - if(c !== 37) continue; - - if(start < i) out.push(["L", fmt.substring(start, i)]); - start = i; - infmt = true; - continue; - } - - if(c >= 48 && c < 58) { - if(fmtprec.length) fmtprec += String.fromCharCode(c); - else if(c == 48 && !fmtwidth.length) fmtflags += String.fromCharCode(c); - else fmtwidth += String.fromCharCode(c); - } else switch(c) { - /* positional */ - case 36: - if(fmtprec.length) fmtprec += "$"; - else if(fmtwidth.charAt(0) == "*") fmtwidth += "$"; - else { fmtparam = fmtwidth + "$"; fmtwidth = ""; } - break; - - /* flags */ - case 39: fmtflags += "'"; break; - case 45: fmtflags += "-"; break; - case 43: fmtflags += "+"; break; - case 32: fmtflags += " "; break; - case 35: fmtflags += "#"; break; - - /* width and precision */ - case 46: fmtprec = "."; break; - case 42: - if(fmtprec.charAt(0) == ".") fmtprec += "*"; - else fmtwidth += "*"; - break; - - /* length */ - case 104: - case 108: - if(fmtlen.length > 1) throw "bad length " + fmtlen + String(c); - fmtlen += String.fromCharCode(c); - break; - - case 76: - case 106: - case 122: - case 116: - case 113: - case 90: - case 119: - if(fmtlen !== "") throw "bad length " + fmtlen + String.fromCharCode(c); - fmtlen = String.fromCharCode(c); - break; - - case 73: - if(fmtlen !== "") throw "bad length " + fmtlen + 'I'; - fmtlen = 'I'; - break; - - /* conversion */ - case 100: - case 105: - case 111: - case 117: - case 120: - case 88: - case 102: - case 70: - case 101: - case 69: - case 103: - case 71: - case 97: - case 65: - case 99: - case 67: - case 115: - case 83: - case 112: - case 110: - case 68: - case 85: - case 79: - case 109: - case 98: - case 66: - case 121: - case 89: - case 74: - case 86: - case 84: - case 37: - infmt = false; - if(fmtprec.length > 1) fmtprec = fmtprec.substr(1); - out.push([String.fromCharCode(c), fmt.substring(start, i+1), fmtparam, fmtflags, fmtwidth, fmtprec, fmtlen]); - start = i+1; - fmtlen = fmtprec = fmtwidth = fmtflags = fmtparam = ""; - break; - default: - throw new Error("Invalid format string starting with |" + fmt.substring(start, i+1) + "|"); - } - - } - - if(start < fmt.length) out.push(["L", fmt.substring(start)]); - return out; -} - -//#define PAD_(x,c) (x >= 0 ? new Array(((x)|0) + 1).join((c)) : "") -var padstr = { - " ": " ", - "0": "000000000000000000000000000000000", - "7": "777777777777777777777777777777777", - "f": "fffffffffffffffffffffffffffffffff" -}; - -/*global process:true, util:true, require:true */ -if(typeof process !== 'undefined' && !!process.versions && !!process.versions.node) util=require("util"); -var u_inspect = (typeof util != 'undefined') ? util.inspect : JSON.stringify; - -function doit(t, args) { - var o = []; - var argidx = 0, idx = 0; - var Vnum = 0; - var pad = ""; - for(var i = 0; i < t.length; ++i) { - var m = t[i], c = (m[0]).charCodeAt(0); - /* m order: conv full param flags width prec length */ - - if(c === /*L*/ 76) { o.push(m[1]); continue; } - if(c === /*%*/ 37) { o.push("%"); continue; } - - var O = ""; - var isnum = 0, radix = 10, bytes = 4, sign = false; - - /* flags */ - var flags = m[3]||""; - var alt = flags.indexOf("#") > -1; - - /* position */ - if(m[2]) argidx = parseInt(m[2])-1; - /* %m special case */ - else if(c === /*m*/ 109 && !alt) { o.push("Success"); continue; } - - /* grab width */ - var width = 0; if(m[ 4] != null && m[ 4].length > 0) { if(m[ 4].charAt(0) !== '*') width = parseInt(m[ 4], 10); else if(m[ 4].length === 1) width = args[idx++]; else width = args[parseInt(m[ 4].substr(1), 10)-1]; } - - /* grab precision */ - var prec = -1; if(m[ 5] != null && m[ 5].length > 0) { if(m[ 5].charAt(0) !== '*') prec = parseInt(m[ 5], 10); else if(m[ 5].length === 1) prec = args[idx++]; else prec = args[parseInt(m[ 5].substr(1), 10)-1]; } - - /* position not specified */ - if(!m[2]) argidx = idx++; - - /* grab argument */ - var arg = args[argidx]; - - /* grab length */ - var len = m[6] || ""; - - switch(c) { - /* str cCsS */ - - case /*S*/ 83: - case /*s*/ 115: - /* only valid flag is "-" for left justification */ - O = String(arg); - if( prec >= 0) O = O.substr(0, prec); - if( width > O.length || - width > O.length) { if(( flags.indexOf("-") == -1 || width < 0) && flags.indexOf("0") != -1) { pad = ( width - O.length >= 0 ? padstr["0"].substr(0, width - O.length) : ""); O = pad + O; } else { pad = ( width - O.length >= 0 ? padstr[" "].substr(0, width - O.length) : ""); O = flags.indexOf("-") > -1 ? O + pad : pad + O; } } - break; - - /* first char of string or convert */ - case /*C*/ 67: - case /*c*/ 99: - switch(typeof arg) { - case "number": - var cc = arg; - if(c == 67 || len.charCodeAt(0) === /*l*/ 108) { cc &= 0xFFFFFFFF; O = String.fromCharCode( cc); } - else { cc &= 0xFF; O = String.fromCharCode( cc); } - break; - case "string": O = arg.charAt(0); break; - default: O = String(arg).charAt(0); - } - if( width > O.length || - width > O.length) { if(( flags.indexOf("-") == -1 || width < 0) && flags.indexOf("0") != -1) { pad = ( width - O.length >= 0 ? padstr["0"].substr(0, width - O.length) : ""); O = pad + O; } else { pad = ( width - O.length >= 0 ? padstr[" "].substr(0, width - O.length) : ""); O = flags.indexOf("-") > -1 ? O + pad : pad + O; } } - break; - - /* int diDuUoOxXbB */ - - /* signed integer */ - case /*D*/ 68: bytes = 8; - /* falls through */ - case /*d*/ 100: - case /*i*/ 105: isnum = -1; sign = true; break; - - /* unsigned integer */ - case /*U*/ 85: bytes = 8; - /* falls through */ - case /*u*/ 117: isnum = -1; break; - - /* unsigned octal */ - case /*O*/ 79: bytes = 8; - /* falls through */ - case /*o*/ 111: isnum = -1; radix = (8); break; - - /* unsigned hex */ - case /*x*/ 120: isnum = -1; radix = (-16); break; - case /*X*/ 88: isnum = -1; radix = (16); break; - - /* unsigned binary (extension) */ - case /*B*/ 66: bytes = 8; - /* falls through */ - case /*b*/ 98: isnum = -1; radix = (2); break; - - /* flt fegFEGaA */ - - /* floating point logic */ - case /*F*/ 70: - case /*f*/ 102: isnum = (1); break; - - case /*E*/ 69: - case /*e*/ 101: isnum = (2); break; - - case /*G*/ 71: - case /*g*/ 103: isnum = (3); break; - - /* floating hex */ - case /*A*/ 65: - case /*a*/ 97: isnum = (4); break; - - /* misc pnmJVTyY */ - - /* JS has no concept of pointers so interpret the `l` key as an address */ - case /*p*/ 112: - Vnum = typeof arg == "number" ? arg : arg ? Number(arg.l) : -1; - if(isNaN(Vnum)) Vnum = -1; - if(alt) O = Vnum.toString(10); - else { - Vnum = Math.abs(Vnum); - O = "0x" + Vnum.toString(16).toLowerCase(); - } - break; - - /* store length in the `len` key */ - case /*n*/ 110: - if(arg) { arg.len=0; for(var oo = 0; oo < o.length; ++oo) arg.len += o[oo].length; } - continue; - - /* process error */ - case /*m*/ 109: - if(!(arg instanceof Error)) O = "Success"; - else if(arg.message) O = arg.message; - else if(arg.errno) O = "Error number " + arg.errno; - else O = "Error " + String(arg); - break; - - /* JS-specific conversions (extension) */ - case /*J*/ 74: O = (alt ? u_inspect : JSON.stringify)(arg); break; - case /*V*/ 86: O = arg == null ? "null" : String(arg.valueOf()); break; - case /*T*/ 84: - if(alt) { /* from '[object %s]' extract %s */ - O = Object.prototype.toString.call(arg).substr(8); - O = O.substr(0, O.length - 1); - } else O = typeof arg; - break; - - /* boolean (extension) */ - case /*Y*/ 89: - case /*y*/ 121: - O = Boolean(arg) ? (alt ? "yes" : "true") : (alt ? "no" : "false"); - if(c == /*Y*/ 89) O = O.toUpperCase(); - if( prec >= 0) O = O.substr(0, prec); - if( width > O.length || - width > O.length) { if(( flags.indexOf("-") == -1 || width < 0) && flags.indexOf("0") != -1) { pad = ( width - O.length >= 0 ? padstr["0"].substr(0, width - O.length) : ""); O = pad + O; } else { pad = ( width - O.length >= 0 ? padstr[" "].substr(0, width - O.length) : ""); O = flags.indexOf("-") > -1 ? O + pad : pad + O; } } - break; - - } - - if(width < 0) { width = -width; flags += "-"; } - - if(isnum == -1) { - - Vnum = Number(arg); - - /* parse byte length field */ - - switch(len) { - /* char */ - case "hh": { bytes = 1; } break; - /* short */ - case "h": { bytes = 2; } break; - - /* long */ - case "l": { if(bytes == 4) bytes = 8; } break; - - /* long long */ - case "L": - case "q": - case "ll": { if(bytes == 4) bytes = 8; } break; - - /* intmax_t */ - case "j": { if(bytes == 4) bytes = 8; } break; - - /* ptrdiff_t */ - case "t": { if(bytes == 4) bytes = 8; } break; - - /* size_t */ - case "z": - case "Z": { if(bytes == 4) bytes = 8; } break; - - /* CRT size_t or ptrdiff_t */ - case "I": - - { if(bytes == 4) bytes = 8; } - - break; - - /* CRT wchar_t */ - case "w": break; - } - - /* restrict value */ - - switch(bytes) { - case 1: Vnum = (Vnum & 0xFF); if(sign && (Vnum > 0x7F)) Vnum -= (0xFF + 1); break; - case 2: Vnum = (Vnum & 0xFFFF); if(sign && (Vnum > 0x7FFF)) Vnum -= (0xFFFF + 1); break; - case 4: Vnum = sign ? (Vnum | 0) : (Vnum >>> 0); break; - default: Vnum = isNaN(Vnum) ? 0 : Math.round(Vnum); break; - } - - /* generate string */ - if(bytes > 4 && Vnum < 0 && !sign) { - if(radix == 16 || radix == -16) { - O = (Vnum>>>0).toString(16); - Vnum = Math.floor((Vnum - (Vnum >>> 0)) / Math.pow(2,32)); - O = (Vnum>>>0).toString(16) + (8 - O.length >= 0 ? padstr[ "0"].substr(0,8 - O.length) : "") + O; - O = (16 - O.length >= 0 ? padstr[ "f"].substr(0,16 - O.length) : "") + O; - if(radix == 16) O = O.toUpperCase(); - } else if(radix == 8) { - O = (Vnum>>>0).toString(8); - O = (10 - O.length >= 0 ? padstr[ "0"].substr(0,10 - O.length) : "") + O; - Vnum = Math.floor((Vnum - ((Vnum >>> 0)&0x3FFFFFFF)) / Math.pow(2,30)); - O = (Vnum>>>0).toString(8) + O.substr(O.length - 10); - O = O.substr(O.length - 20); - O = "1" + (21 - O.length >= 0 ? padstr[ "7"].substr(0,21 - O.length) : "") + O; - } else { - Vnum = (-Vnum) % 1e16; - var d1 = [1,8,4,4,6,7,4,4,0,7,3,7,0,9,5,5,1,6,1,6]; - var di = d1.length - 1; - while(Vnum > 0) { - if((d1[di] -= (Vnum % 10)) < 0) { d1[di] += 10; d1[di-1]--; } - --di; Vnum = Math.floor(Vnum / 10); - } - O = d1.join(""); - } - } else { - if(radix === -16) O = Vnum.toString(16).toLowerCase(); - else if(radix === 16) O = Vnum.toString(16).toUpperCase(); - else O = Vnum.toString(radix); - } - - /* apply precision */ - if(prec ===0 && O == "0" && !(radix == 8 && alt)) O = ""; /* bail out */ - else { - if(O.length < prec + (O.substr(0,1) == "-" ? 1 : 0)) { - if(O.substr(0,1) != "-") O = (prec - O.length >= 0 ? padstr[ "0"].substr(0,prec - O.length) : "") + O; - else O = O.substr(0,1) + (prec + 1 - O.length >= 0 ? padstr[ "0"].substr(0,prec + 1 - O.length) : "") + O.substr(1); - } - - /* add prefix for # form */ - if(!sign && alt && Vnum !== 0) switch(radix) { - case -16: O = "0x" + O; break; - case 16: O = "0X" + O; break; - case 8: if(O.charAt(0) != "0") O = "0" + O; break; - case 2: O = "0b" + O; break; - } - } - - /* add sign character */ - if(sign && O.charAt(0) != "-") { - if(flags.indexOf("+") > -1) O = "+" + O; - else if(flags.indexOf(" ") > -1) O = " " + O; - } - /* width */ - if(width > 0) { - if(O.length < width) { - if(flags.indexOf("-") > -1) { - O = O + ((width - O.length) >= 0 ? padstr[ " "].substr(0,(width - O.length)) : ""); - } else if(flags.indexOf("0") > -1 && prec < 0 && O.length > 0) { - if(prec > O.length) O = ((prec - O.length) >= 0 ? padstr[ "0"].substr(0,(prec - O.length)) : "") + O; - pad = ((width - O.length) >= 0 ? padstr[ (prec > 0 ? " " : "0")].substr(0,(width - O.length)) : ""); - if(O.charCodeAt(0) < 48) { - if(O.charAt(2).toLowerCase() == "x") O = O.substr(0,3) + pad + O.substring(3); - else O = O.substr(0,1) + pad + O.substring(1); - } - else if(O.charAt(1).toLowerCase() == "x") O = O.substr(0,2) + pad + O.substring(2); - else O = pad + O; - } else { - O = ((width - O.length) >= 0 ? padstr[ " "].substr(0,(width - O.length)) : "") + O; - } - } - } - - } else if(isnum > 0) { - - Vnum = Number(arg); - if(arg === null) Vnum = 0/0; - if(len == "L") bytes = 12; - var isf = isFinite(Vnum); - if(!isf) { /* Infinity or NaN */ - if(Vnum < 0) O = "-"; - else if(flags.indexOf("+") > -1) O = "+"; - else if(flags.indexOf(" ") > -1) O = " "; - O += (isNaN(Vnum)) ? "nan" : "inf"; - } else { - var E = 0; - - if(prec == -1 && isnum != 4) prec = 6; - - /* g/G conditional behavior */ - if(isnum == 3) { - O = Vnum.toExponential(1); - E = +O.substr(O.indexOf("e") + 1); - if(prec === 0) prec = 1; - if(prec > E && E >= -4) { isnum = (11); prec = prec -(E + 1); } - else { isnum = (12); prec = prec - 1; } - } - - /* sign: workaround for negative zero */ - var sg = (Vnum < 0 || 1/Vnum == -Infinity) ? "-" : ""; - if(Vnum < 0) Vnum = -Vnum; - - switch(isnum) { - /* f/F standard */ - case 1: case 11: - if(Vnum < 1e21) { - O = Vnum.toFixed(prec); - if(isnum == 1) { if(prec===0 &&alt&& O.indexOf(".")==-1) O+="."; } - else if(!alt) O=O.replace(/(\.\d*[1-9])0*$/,"$1").replace(/\.0*$/,""); - else if(O.indexOf(".") == -1) O+= "."; - break; - } - O = Vnum.toExponential(20); - E = +O.substr(O.indexOf("e")+1); - O = O.charAt(0) + O.substr(2,O.indexOf("e")-2); - O = O + (E - O.length + 1 >= 0 ? padstr[ "0"].substr(0,E - O.length + 1) : ""); - if(alt || (prec > 0 && isnum !== 11)) O = O + "." + (prec >= 0 ? padstr[ "0"].substr(0,prec) : ""); - break; - - /* e/E exponential */ - case 2: case 12: - O = Vnum.toExponential(prec); - E = O.indexOf("e"); - if(O.length - E === 3) O = O.substr(0, E+2) + "0" + O.substr(E+2); - if(alt && O.indexOf(".") == -1) O = O.substr(0,E) +"."+ O.substr(E); - else if(!alt && isnum == 12) O = O.replace(/\.0*e/, "e").replace(/\.(\d*[1-9])0*e/, ".$1e"); - break; - - /* a/A hex */ - case 4: - if(Vnum===0){O= "0x0"+((alt||prec>0)?"."+(prec >= 0 ? padstr["0"].substr(0,prec) : ""):"")+"p+0"; break;} - O = Vnum.toString(16); - /* First char 0-9 */ - var ac = O.charCodeAt(0); - if(ac == 48) { - ac = 2; E = -4; Vnum *= 16; - while(O.charCodeAt(ac++) == 48) { E -= 4; Vnum *= 16; } - O = Vnum.toString(16); - ac = O.charCodeAt(0); - } - - var ai = O.indexOf("."); - if(O.indexOf("(") > -1) { - /* IE exponential form */ - var am = O.match(/\(e(.*)\)/); - var ae = am ? (+am[1]) : 0; - E += 4 * ae; Vnum /= Math.pow(16, ae); - } else if(ai > 1) { - E += 4 * (ai - 1); Vnum /= Math.pow(16, ai - 1); - } else if(ai == -1) { - E += 4 * (O.length - 1); Vnum /= Math.pow(16, O.length - 1); - } - - /* at this point 1 <= Vnum < 16 */ - - if(bytes > 8) { - if(ac < 50) { E -= 3; Vnum *= 8; } - else if(ac < 52) { E -= 2; Vnum *= 4; } - else if(ac < 56) { E -= 1; Vnum *= 2; } - /* at this point 8 <= Vnum < 16 */ - } else { - if(ac >= 56) { E += 3; Vnum /= 8; } - else if(ac >= 52) { E += 2; Vnum /= 4; } - else if(ac >= 50) { E += 1; Vnum /= 2; } - /* at this point 1 <= Vnum < 2 */ - } - - O = Vnum.toString(16); - if(O.length > 1) { - if(O.length > prec+2 && O.charCodeAt(prec+2) >= 56) { - var _f = O.charCodeAt(0) == 102; - O = (Vnum + 8 * Math.pow(16, -prec-1)).toString(16); - if(_f && O.charCodeAt(0) == 49) E += 4; - } - if(prec > 0) { - O = O.substr(0, prec + 2); - if(O.length < prec + 2) { - if(O.charCodeAt(0) < 48) O = O.charAt(0) + ((prec + 2 - O.length) >= 0 ? padstr[ "0"].substr(0,(prec + 2 - O.length)) : "") + O.substr(1); - else O += ((prec + 2 - O.length) >= 0 ? padstr[ "0"].substr(0,(prec + 2 - O.length)) : ""); - } - } else if(prec === 0) O = O.charAt(0) + (alt ? "." : ""); - } else if(prec > 0) O = O + "." + (prec >= 0 ? padstr["0"].substr(0,prec) : ""); - else if(alt) O = O + "."; - O = "0x" + O + "p" + (E>=0 ? "+" + E : E); - break; - } - - if(sg === "") { - if(flags.indexOf("+") > -1) sg = "+"; - else if(flags.indexOf(" ") > -1) sg = " "; - } - - O = sg + O; - } - - /* width */ - if(width > O.length) { - if(flags.indexOf("-") > -1) { - O = O + ((width - O.length) >= 0 ? padstr[ " "].substr(0,(width - O.length)) : ""); - } else if(flags.indexOf("0") > -1 && O.length > 0 && isf) { - pad = ((width - O.length) >= 0 ? padstr[ "0"].substr(0,(width - O.length)) : ""); - if(O.charCodeAt(0) < 48) { - if(O.charAt(2).toLowerCase() == "x") O = O.substr(0,3) + pad + O.substring(3); - else O = O.substr(0,1) + pad + O.substring(1); - } - else if(O.charAt(1).toLowerCase() == "x") O = O.substr(0,2) + pad + O.substring(2); - else O = pad + O; - } else { - O = ((width - O.length) >= 0 ? padstr[ " "].substr(0,(width - O.length)) : "") + O; - } - } - if(c < 96) O = O.toUpperCase(); - - } - - o.push(O); - } - return o.join(""); -} - -function vsprintf(fmt, args) { return doit(tokenize(fmt), args); } - -function sprintf() { - var args = new Array(arguments.length - 1); - for(var i = 0; i < args.length; ++i) args[i] = arguments[i+1]; - return doit(tokenize(arguments[0]), args); -} - -PRINTJ.sprintf = sprintf; -PRINTJ.vsprintf = vsprintf; -PRINTJ._doit = doit; -PRINTJ._tokenize = tokenize; - -})); - diff --git a/node_modules/printj/dist/printj.min.js b/node_modules/printj/dist/printj.min.js deleted file mode 100644 index d5548661..00000000 --- a/node_modules/printj/dist/printj.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* printj.js (C) 2016-present SheetJS -- http://sheetjs.com */ -var PRINTJ;(function(factory){if(typeof DO_NOT_EXPORT_PRINTJ==="undefined"){if("object"===typeof exports){factory(exports)}else if("function"===typeof define&&define.amd){define(function(){var module={};factory(module);return module})}else{factory(PRINTJ={})}}else{factory(PRINTJ={})}})(function(PRINTJ){PRINTJ.version="1.1.2";function tokenize(fmt){var out=[];var start=0;var i=0;var infmt=false;var fmtparam="",fmtflags="",fmtwidth="",fmtprec="",fmtlen="";var c=0;var L=fmt.length;for(;i=48&&c<58){if(fmtprec.length)fmtprec+=String.fromCharCode(c);else if(c==48&&!fmtwidth.length)fmtflags+=String.fromCharCode(c);else fmtwidth+=String.fromCharCode(c)}else switch(c){case 36:if(fmtprec.length)fmtprec+="$";else if(fmtwidth.charAt(0)=="*")fmtwidth+="$";else{fmtparam=fmtwidth+"$";fmtwidth=""}break;case 39:fmtflags+="'";break;case 45:fmtflags+="-";break;case 43:fmtflags+="+";break;case 32:fmtflags+=" ";break;case 35:fmtflags+="#";break;case 46:fmtprec=".";break;case 42:if(fmtprec.charAt(0)==".")fmtprec+="*";else fmtwidth+="*";break;case 104:;case 108:if(fmtlen.length>1)throw"bad length "+fmtlen+String(c);fmtlen+=String.fromCharCode(c);break;case 76:;case 106:;case 122:;case 116:;case 113:;case 90:;case 119:if(fmtlen!=="")throw"bad length "+fmtlen+String.fromCharCode(c);fmtlen=String.fromCharCode(c);break;case 73:if(fmtlen!=="")throw"bad length "+fmtlen+"I";fmtlen="I";break;case 100:;case 105:;case 111:;case 117:;case 120:;case 88:;case 102:;case 70:;case 101:;case 69:;case 103:;case 71:;case 97:;case 65:;case 99:;case 67:;case 115:;case 83:;case 112:;case 110:;case 68:;case 85:;case 79:;case 109:;case 98:;case 66:;case 121:;case 89:;case 74:;case 86:;case 84:;case 37:infmt=false;if(fmtprec.length>1)fmtprec=fmtprec.substr(1);out.push([String.fromCharCode(c),fmt.substring(start,i+1),fmtparam,fmtflags,fmtwidth,fmtprec,fmtlen]);start=i+1;fmtlen=fmtprec=fmtwidth=fmtflags=fmtparam="";break;default:throw new Error("Invalid format string starting with |"+fmt.substring(start,i+1)+"|");}}if(start-1;if(m[2])argidx=parseInt(m[2])-1;else if(c===109&&!alt){o.push("Success");continue}var width=0;if(m[4]!=null&&m[4].length>0){if(m[4].charAt(0)!=="*")width=parseInt(m[4],10);else if(m[4].length===1)width=args[idx++];else width=args[parseInt(m[4].substr(1),10)-1]}var prec=-1;if(m[5]!=null&&m[5].length>0){if(m[5].charAt(0)!=="*")prec=parseInt(m[5],10);else if(m[5].length===1)prec=args[idx++];else prec=args[parseInt(m[5].substr(1),10)-1]}if(!m[2])argidx=idx++;var arg=args[argidx];var len=m[6]||"";switch(c){case 83:;case 115:O=String(arg);if(prec>=0)O=O.substr(0,prec);if(width>O.length||-width>O.length){if((flags.indexOf("-")==-1||width<0)&&flags.indexOf("0")!=-1){pad=width-O.length>=0?padstr["0"].substr(0,width-O.length):"";O=pad+O}else{pad=width-O.length>=0?padstr[" "].substr(0,width-O.length):"";O=flags.indexOf("-")>-1?O+pad:pad+O}}break;case 67:;case 99:switch(typeof arg){case"number":var cc=arg;if(c==67||len.charCodeAt(0)===108){cc&=4294967295;O=String.fromCharCode(cc)}else{cc&=255;O=String.fromCharCode(cc)}break;case"string":O=arg.charAt(0);break;default:O=String(arg).charAt(0);}if(width>O.length||-width>O.length){if((flags.indexOf("-")==-1||width<0)&&flags.indexOf("0")!=-1){pad=width-O.length>=0?padstr["0"].substr(0,width-O.length):"";O=pad+O}else{pad=width-O.length>=0?padstr[" "].substr(0,width-O.length):"";O=flags.indexOf("-")>-1?O+pad:pad+O}}break;case 68:bytes=8;case 100:;case 105:isnum=-1;sign=true;break;case 85:bytes=8;case 117:isnum=-1;break;case 79:bytes=8;case 111:isnum=-1;radix=8;break;case 120:isnum=-1;radix=-16;break;case 88:isnum=-1;radix=16;break;case 66:bytes=8;case 98:isnum=-1;radix=2;break;case 70:;case 102:isnum=1;break;case 69:;case 101:isnum=2;break;case 71:;case 103:isnum=3;break;case 65:;case 97:isnum=4;break;case 112:Vnum=typeof arg=="number"?arg:arg?Number(arg.l):-1;if(isNaN(Vnum))Vnum=-1;if(alt)O=Vnum.toString(10);else{Vnum=Math.abs(Vnum);O="0x"+Vnum.toString(16).toLowerCase()}break;case 110:if(arg){arg.len=0;for(var oo=0;oo=0)O=O.substr(0,prec);if(width>O.length||-width>O.length){if((flags.indexOf("-")==-1||width<0)&&flags.indexOf("0")!=-1){pad=width-O.length>=0?padstr["0"].substr(0,width-O.length):"";O=pad+O}else{pad=width-O.length>=0?padstr[" "].substr(0,width-O.length):"";O=flags.indexOf("-")>-1?O+pad:pad+O}}break;}if(width<0){width=-width;flags+="-"}if(isnum==-1){Vnum=Number(arg);switch(len){case"hh":{bytes=1}break;case"h":{bytes=2}break;case"l":{if(bytes==4)bytes=8}break;case"L":;case"q":;case"ll":{if(bytes==4)bytes=8}break;case"j":{if(bytes==4)bytes=8}break;case"t":{if(bytes==4)bytes=8}break;case"z":;case"Z":{if(bytes==4)bytes=8}break;case"I":{if(bytes==4)bytes=8}break;case"w":break;}switch(bytes){case 1:Vnum=Vnum&255;if(sign&&Vnum>127)Vnum-=255+1;break;case 2:Vnum=Vnum&65535;if(sign&&Vnum>32767)Vnum-=65535+1;break;case 4:Vnum=sign?Vnum|0:Vnum>>>0;break;default:Vnum=isNaN(Vnum)?0:Math.round(Vnum);break;}if(bytes>4&&Vnum<0&&!sign){if(radix==16||radix==-16){O=(Vnum>>>0).toString(16);Vnum=Math.floor((Vnum-(Vnum>>>0))/Math.pow(2,32));O=(Vnum>>>0).toString(16)+(8-O.length>=0?padstr["0"].substr(0,8-O.length):"")+O;O=(16-O.length>=0?padstr["f"].substr(0,16-O.length):"")+O;if(radix==16)O=O.toUpperCase()}else if(radix==8){O=(Vnum>>>0).toString(8);O=(10-O.length>=0?padstr["0"].substr(0,10-O.length):"")+O;Vnum=Math.floor((Vnum-(Vnum>>>0&1073741823))/Math.pow(2,30));O=(Vnum>>>0).toString(8)+O.substr(O.length-10);O=O.substr(O.length-20);O="1"+(21-O.length>=0?padstr["7"].substr(0,21-O.length):"")+O}else{Vnum=-Vnum%1e16;var d1=[1,8,4,4,6,7,4,4,0,7,3,7,0,9,5,5,1,6,1,6];var di=d1.length-1;while(Vnum>0){if((d1[di]-=Vnum%10)<0){d1[di]+=10;d1[di-1]--}--di;Vnum=Math.floor(Vnum/10)}O=d1.join("")}}else{if(radix===-16)O=Vnum.toString(16).toLowerCase();else if(radix===16)O=Vnum.toString(16).toUpperCase();else O=Vnum.toString(radix)}if(prec===0&&O=="0"&&!(radix==8&&alt))O="";else{if(O.length=0?padstr["0"].substr(0,prec-O.length):"")+O;else O=O.substr(0,1)+(prec+1-O.length>=0?padstr["0"].substr(0,prec+1-O.length):"")+O.substr(1)}if(!sign&&alt&&Vnum!==0)switch(radix){case-16:O="0x"+O;break;case 16:O="0X"+O;break;case 8:if(O.charAt(0)!="0")O="0"+O;break;case 2:O="0b"+O;break;}}if(sign&&O.charAt(0)!="-"){if(flags.indexOf("+")>-1)O="+"+O;else if(flags.indexOf(" ")>-1)O=" "+O}if(width>0){if(O.length-1){O=O+(width-O.length>=0?padstr[" "].substr(0,width-O.length):"")}else if(flags.indexOf("0")>-1&&prec<0&&O.length>0){if(prec>O.length)O=(prec-O.length>=0?padstr["0"].substr(0,prec-O.length):"")+O;pad=width-O.length>=0?padstr[prec>0?" ":"0"].substr(0,width-O.length):"";if(O.charCodeAt(0)<48){if(O.charAt(2).toLowerCase()=="x")O=O.substr(0,3)+pad+O.substring(3);else O=O.substr(0,1)+pad+O.substring(1)}else if(O.charAt(1).toLowerCase()=="x")O=O.substr(0,2)+pad+O.substring(2);else O=pad+O}else{O=(width-O.length>=0?padstr[" "].substr(0,width-O.length):"")+O}}}}else if(isnum>0){Vnum=Number(arg);if(arg===null)Vnum=0/0;if(len=="L")bytes=12;var isf=isFinite(Vnum);if(!isf){if(Vnum<0)O="-";else if(flags.indexOf("+")>-1)O="+";else if(flags.indexOf(" ")>-1)O=" ";O+=isNaN(Vnum)?"nan":"inf"}else{var E=0;if(prec==-1&&isnum!=4)prec=6;if(isnum==3){O=Vnum.toExponential(1);E=+O.substr(O.indexOf("e")+1);if(prec===0)prec=1;if(prec>E&&E>=-4){isnum=11;prec=prec-(E+1)}else{isnum=12;prec=prec-1}}var sg=Vnum<0||1/Vnum==-Infinity?"-":"";if(Vnum<0)Vnum=-Vnum;switch(isnum){case 1:;case 11:if(Vnum<1e21){O=Vnum.toFixed(prec);if(isnum==1){if(prec===0&&alt&&O.indexOf(".")==-1)O+="."}else if(!alt)O=O.replace(/(\.\d*[1-9])0*$/,"$1").replace(/\.0*$/,"");else if(O.indexOf(".")==-1)O+=".";break}O=Vnum.toExponential(20);E=+O.substr(O.indexOf("e")+1);O=O.charAt(0)+O.substr(2,O.indexOf("e")-2);O=O+(E-O.length+1>=0?padstr["0"].substr(0,E-O.length+1):"");if(alt||prec>0&&isnum!==11)O=O+"."+(prec>=0?padstr["0"].substr(0,prec):"");break;case 2:;case 12:O=Vnum.toExponential(prec);E=O.indexOf("e");if(O.length-E===3)O=O.substr(0,E+2)+"0"+O.substr(E+2);if(alt&&O.indexOf(".")==-1)O=O.substr(0,E)+"."+O.substr(E);else if(!alt&&isnum==12)O=O.replace(/\.0*e/,"e").replace(/\.(\d*[1-9])0*e/,".$1e");break;case 4:if(Vnum===0){O="0x0"+(alt||prec>0?"."+(prec>=0?padstr["0"].substr(0,prec):""):"")+"p+0";break}O=Vnum.toString(16);var ac=O.charCodeAt(0);if(ac==48){ac=2;E=-4;Vnum*=16;while(O.charCodeAt(ac++)==48){E-=4;Vnum*=16}O=Vnum.toString(16);ac=O.charCodeAt(0)}var ai=O.indexOf(".");if(O.indexOf("(")>-1){var am=O.match(/\(e(.*)\)/);var ae=am?+am[1]:0;E+=4*ae;Vnum/=Math.pow(16,ae)}else if(ai>1){E+=4*(ai-1);Vnum/=Math.pow(16,ai-1)}else if(ai==-1){E+=4*(O.length-1);Vnum/=Math.pow(16,O.length-1)}if(bytes>8){if(ac<50){E-=3;Vnum*=8}else if(ac<52){E-=2;Vnum*=4}else if(ac<56){E-=1;Vnum*=2}}else{if(ac>=56){E+=3;Vnum/=8}else if(ac>=52){E+=2;Vnum/=4}else if(ac>=50){E+=1;Vnum/=2}}O=Vnum.toString(16);if(O.length>1){if(O.length>prec+2&&O.charCodeAt(prec+2)>=56){var _f=O.charCodeAt(0)==102;O=(Vnum+8*Math.pow(16,-prec-1)).toString(16);if(_f&&O.charCodeAt(0)==49)E+=4}if(prec>0){O=O.substr(0,prec+2);if(O.length=0?padstr["0"].substr(0,prec+2-O.length):"")+O.substr(1);else O+=prec+2-O.length>=0?padstr["0"].substr(0,prec+2-O.length):""}}else if(prec===0)O=O.charAt(0)+(alt?".":"")}else if(prec>0)O=O+"."+(prec>=0?padstr["0"].substr(0,prec):"");else if(alt)O=O+".";O="0x"+O+"p"+(E>=0?"+"+E:E);break;}if(sg===""){if(flags.indexOf("+")>-1)sg="+";else if(flags.indexOf(" ")>-1)sg=" "}O=sg+O}if(width>O.length){if(flags.indexOf("-")>-1){O=O+(width-O.length>=0?padstr[" "].substr(0,width-O.length):"")}else if(flags.indexOf("0")>-1&&O.length>0&&isf){pad=width-O.length>=0?padstr["0"].substr(0,width-O.length):"";if(O.charCodeAt(0)<48){if(O.charAt(2).toLowerCase()=="x")O=O.substr(0,3)+pad+O.substring(3);else O=O.substr(0,1)+pad+O.substring(1)}else if(O.charAt(1).toLowerCase()=="x")O=O.substr(0,2)+pad+O.substring(2);else O=pad+O}else{O=(width-O.length>=0?padstr[" "].substr(0,width-O.length):"")+O}}if(c<96)O=O.toUpperCase()}o.push(O)}return o.join("")}function vsprintf(fmt,args){return doit(tokenize(fmt),args)}function sprintf(){var args=new Array(arguments.length-1);for(var i=0;i=0.8" - }, - "files": [ - "printj.js", - "bin/printj.njs", - "LICENSE", - "README.md", - "dist/*.js", - "dist/*.map", - "dist/LICENSE", - "types/index.d.ts", - "types/*.json" - ], - "homepage": "http://sheetjs.com/opensource", - "keywords": [ - "printf", - "sprintf", - "format", - "string" - ], - "license": "Apache-2.0", - "main": "./printj", - "name": "printj", - "repository": { - "type": "git", - "url": "git://github.com/SheetJS/printj.git" - }, - "scripts": { - "build": "make", - "dtslint": "dtslint types", - "lint": "make fullint", - "test": "make test" - }, - "types": "types", - "version": "1.1.2" -} diff --git a/node_modules/printj/printj.js b/node_modules/printj/printj.js deleted file mode 100644 index a2a38d6e..00000000 --- a/node_modules/printj/printj.js +++ /dev/null @@ -1,605 +0,0 @@ -/* printj.js (C) 2016-present SheetJS -- http://sheetjs.com */ -/* vim: set ts=2: */ -/*jshint sub:true, eqnull:true */ -/*exported PRINTJ */ -var PRINTJ; -(function (factory) { - /*jshint ignore:start */ - /*eslint-disable */ - if(typeof DO_NOT_EXPORT_PRINTJ === 'undefined') { - if('object' === typeof exports) { - factory(exports); - } else if ('function' === typeof define && define.amd) { - define(function () { - var module = {}; - factory(module); - return module; - }); - } else { - factory(PRINTJ = {}); - } - } else { - factory(PRINTJ = {}); - } - /*eslint-enable */ - /*jshint ignore:end */ -}(function(PRINTJ) { - -PRINTJ.version = '1.1.2'; - -function tokenize(fmt) { - var out = []; - var start = 0; - - var i = 0; - var infmt = false; - var fmtparam = "", fmtflags = "", fmtwidth = "", fmtprec = "", fmtlen = ""; - - var c = 0; - - var L = fmt.length; - - for(; i < L; ++i) { - c = fmt.charCodeAt(i); - if(!infmt) { - - if(c !== 37) continue; - - if(start < i) out.push(["L", fmt.substring(start, i)]); - start = i; - infmt = true; - continue; - } - - if(c >= 48 && c < 58) { - if(fmtprec.length) fmtprec += String.fromCharCode(c); - else if(c == 48 && !fmtwidth.length) fmtflags += String.fromCharCode(c); - else fmtwidth += String.fromCharCode(c); - } else switch(c) { - /* positional */ - case 36: - if(fmtprec.length) fmtprec += "$"; - else if(fmtwidth.charAt(0) == "*") fmtwidth += "$"; - else { fmtparam = fmtwidth + "$"; fmtwidth = ""; } - break; - - /* flags */ - case 39: fmtflags += "'"; break; - case 45: fmtflags += "-"; break; - case 43: fmtflags += "+"; break; - case 32: fmtflags += " "; break; - case 35: fmtflags += "#"; break; - - /* width and precision */ - case 46: fmtprec = "."; break; - case 42: - if(fmtprec.charAt(0) == ".") fmtprec += "*"; - else fmtwidth += "*"; - break; - - /* length */ - case 104: - case 108: - if(fmtlen.length > 1) throw "bad length " + fmtlen + String(c); - fmtlen += String.fromCharCode(c); - break; - - case 76: - case 106: - case 122: - case 116: - case 113: - case 90: - case 119: - if(fmtlen !== "") throw "bad length " + fmtlen + String.fromCharCode(c); - fmtlen = String.fromCharCode(c); - break; - - case 73: - if(fmtlen !== "") throw "bad length " + fmtlen + 'I'; - fmtlen = 'I'; - break; - - /* conversion */ - case 100: - case 105: - case 111: - case 117: - case 120: - case 88: - case 102: - case 70: - case 101: - case 69: - case 103: - case 71: - case 97: - case 65: - case 99: - case 67: - case 115: - case 83: - case 112: - case 110: - case 68: - case 85: - case 79: - case 109: - case 98: - case 66: - case 121: - case 89: - case 74: - case 86: - case 84: - case 37: - infmt = false; - if(fmtprec.length > 1) fmtprec = fmtprec.substr(1); - out.push([String.fromCharCode(c), fmt.substring(start, i+1), fmtparam, fmtflags, fmtwidth, fmtprec, fmtlen]); - start = i+1; - fmtlen = fmtprec = fmtwidth = fmtflags = fmtparam = ""; - break; - default: - throw new Error("Invalid format string starting with |" + fmt.substring(start, i+1) + "|"); - } - - } - - if(start < fmt.length) out.push(["L", fmt.substring(start)]); - return out; -} - -//#define PAD_(x,c) (x >= 0 ? new Array(((x)|0) + 1).join((c)) : "") -var padstr = { - " ": " ", - "0": "000000000000000000000000000000000", - "7": "777777777777777777777777777777777", - "f": "fffffffffffffffffffffffffffffffff" -}; - -/*global process:true, util:true, require:true */ -if(typeof process !== 'undefined' && !!process.versions && !!process.versions.node) util=require("util"); -var u_inspect = (typeof util != 'undefined') ? util.inspect : JSON.stringify; - -function doit(t, args) { - var o = []; - var argidx = 0, idx = 0; - var Vnum = 0; - var pad = ""; - for(var i = 0; i < t.length; ++i) { - var m = t[i], c = (m[0]).charCodeAt(0); - /* m order: conv full param flags width prec length */ - - if(c === /*L*/ 76) { o.push(m[1]); continue; } - if(c === /*%*/ 37) { o.push("%"); continue; } - - var O = ""; - var isnum = 0, radix = 10, bytes = 4, sign = false; - - /* flags */ - var flags = m[3]||""; - var alt = flags.indexOf("#") > -1; - - /* position */ - if(m[2]) argidx = parseInt(m[2])-1; - /* %m special case */ - else if(c === /*m*/ 109 && !alt) { o.push("Success"); continue; } - - /* grab width */ - var width = 0; if(m[ 4] != null && m[ 4].length > 0) { if(m[ 4].charAt(0) !== '*') width = parseInt(m[ 4], 10); else if(m[ 4].length === 1) width = args[idx++]; else width = args[parseInt(m[ 4].substr(1), 10)-1]; } - - /* grab precision */ - var prec = -1; if(m[ 5] != null && m[ 5].length > 0) { if(m[ 5].charAt(0) !== '*') prec = parseInt(m[ 5], 10); else if(m[ 5].length === 1) prec = args[idx++]; else prec = args[parseInt(m[ 5].substr(1), 10)-1]; } - - /* position not specified */ - if(!m[2]) argidx = idx++; - - /* grab argument */ - var arg = args[argidx]; - - /* grab length */ - var len = m[6] || ""; - - switch(c) { - /* str cCsS */ - - case /*S*/ 83: - case /*s*/ 115: - /* only valid flag is "-" for left justification */ - O = String(arg); - if( prec >= 0) O = O.substr(0, prec); - if( width > O.length || - width > O.length) { if(( flags.indexOf("-") == -1 || width < 0) && flags.indexOf("0") != -1) { pad = ( width - O.length >= 0 ? padstr["0"].substr(0, width - O.length) : ""); O = pad + O; } else { pad = ( width - O.length >= 0 ? padstr[" "].substr(0, width - O.length) : ""); O = flags.indexOf("-") > -1 ? O + pad : pad + O; } } - break; - - /* first char of string or convert */ - case /*C*/ 67: - case /*c*/ 99: - switch(typeof arg) { - case "number": - var cc = arg; - if(c == 67 || len.charCodeAt(0) === /*l*/ 108) { cc &= 0xFFFFFFFF; O = String.fromCharCode( cc); } - else { cc &= 0xFF; O = String.fromCharCode( cc); } - break; - case "string": O = arg.charAt(0); break; - default: O = String(arg).charAt(0); - } - if( width > O.length || - width > O.length) { if(( flags.indexOf("-") == -1 || width < 0) && flags.indexOf("0") != -1) { pad = ( width - O.length >= 0 ? padstr["0"].substr(0, width - O.length) : ""); O = pad + O; } else { pad = ( width - O.length >= 0 ? padstr[" "].substr(0, width - O.length) : ""); O = flags.indexOf("-") > -1 ? O + pad : pad + O; } } - break; - - /* int diDuUoOxXbB */ - - /* signed integer */ - case /*D*/ 68: bytes = 8; - /* falls through */ - case /*d*/ 100: - case /*i*/ 105: isnum = -1; sign = true; break; - - /* unsigned integer */ - case /*U*/ 85: bytes = 8; - /* falls through */ - case /*u*/ 117: isnum = -1; break; - - /* unsigned octal */ - case /*O*/ 79: bytes = 8; - /* falls through */ - case /*o*/ 111: isnum = -1; radix = (8); break; - - /* unsigned hex */ - case /*x*/ 120: isnum = -1; radix = (-16); break; - case /*X*/ 88: isnum = -1; radix = (16); break; - - /* unsigned binary (extension) */ - case /*B*/ 66: bytes = 8; - /* falls through */ - case /*b*/ 98: isnum = -1; radix = (2); break; - - /* flt fegFEGaA */ - - /* floating point logic */ - case /*F*/ 70: - case /*f*/ 102: isnum = (1); break; - - case /*E*/ 69: - case /*e*/ 101: isnum = (2); break; - - case /*G*/ 71: - case /*g*/ 103: isnum = (3); break; - - /* floating hex */ - case /*A*/ 65: - case /*a*/ 97: isnum = (4); break; - - /* misc pnmJVTyY */ - - /* JS has no concept of pointers so interpret the `l` key as an address */ - case /*p*/ 112: - Vnum = typeof arg == "number" ? arg : arg ? Number(arg.l) : -1; - if(isNaN(Vnum)) Vnum = -1; - if(alt) O = Vnum.toString(10); - else { - Vnum = Math.abs(Vnum); - O = "0x" + Vnum.toString(16).toLowerCase(); - } - break; - - /* store length in the `len` key */ - case /*n*/ 110: - if(arg) { arg.len=0; for(var oo = 0; oo < o.length; ++oo) arg.len += o[oo].length; } - continue; - - /* process error */ - case /*m*/ 109: - if(!(arg instanceof Error)) O = "Success"; - else if(arg.message) O = arg.message; - else if(arg.errno) O = "Error number " + arg.errno; - else O = "Error " + String(arg); - break; - - /* JS-specific conversions (extension) */ - case /*J*/ 74: O = (alt ? u_inspect : JSON.stringify)(arg); break; - case /*V*/ 86: O = arg == null ? "null" : String(arg.valueOf()); break; - case /*T*/ 84: - if(alt) { /* from '[object %s]' extract %s */ - O = Object.prototype.toString.call(arg).substr(8); - O = O.substr(0, O.length - 1); - } else O = typeof arg; - break; - - /* boolean (extension) */ - case /*Y*/ 89: - case /*y*/ 121: - O = Boolean(arg) ? (alt ? "yes" : "true") : (alt ? "no" : "false"); - if(c == /*Y*/ 89) O = O.toUpperCase(); - if( prec >= 0) O = O.substr(0, prec); - if( width > O.length || - width > O.length) { if(( flags.indexOf("-") == -1 || width < 0) && flags.indexOf("0") != -1) { pad = ( width - O.length >= 0 ? padstr["0"].substr(0, width - O.length) : ""); O = pad + O; } else { pad = ( width - O.length >= 0 ? padstr[" "].substr(0, width - O.length) : ""); O = flags.indexOf("-") > -1 ? O + pad : pad + O; } } - break; - - } - - if(width < 0) { width = -width; flags += "-"; } - - if(isnum == -1) { - - Vnum = Number(arg); - - /* parse byte length field */ - - switch(len) { - /* char */ - case "hh": { bytes = 1; } break; - /* short */ - case "h": { bytes = 2; } break; - - /* long */ - case "l": { if(bytes == 4) bytes = 8; } break; - - /* long long */ - case "L": - case "q": - case "ll": { if(bytes == 4) bytes = 8; } break; - - /* intmax_t */ - case "j": { if(bytes == 4) bytes = 8; } break; - - /* ptrdiff_t */ - case "t": { if(bytes == 4) bytes = 8; } break; - - /* size_t */ - case "z": - case "Z": { if(bytes == 4) bytes = 8; } break; - - /* CRT size_t or ptrdiff_t */ - case "I": - - { if(bytes == 4) bytes = 8; } - - break; - - /* CRT wchar_t */ - case "w": break; - } - - /* restrict value */ - - switch(bytes) { - case 1: Vnum = (Vnum & 0xFF); if(sign && (Vnum > 0x7F)) Vnum -= (0xFF + 1); break; - case 2: Vnum = (Vnum & 0xFFFF); if(sign && (Vnum > 0x7FFF)) Vnum -= (0xFFFF + 1); break; - case 4: Vnum = sign ? (Vnum | 0) : (Vnum >>> 0); break; - default: Vnum = isNaN(Vnum) ? 0 : Math.round(Vnum); break; - } - - /* generate string */ - if(bytes > 4 && Vnum < 0 && !sign) { - if(radix == 16 || radix == -16) { - O = (Vnum>>>0).toString(16); - Vnum = Math.floor((Vnum - (Vnum >>> 0)) / Math.pow(2,32)); - O = (Vnum>>>0).toString(16) + (8 - O.length >= 0 ? padstr[ "0"].substr(0,8 - O.length) : "") + O; - O = (16 - O.length >= 0 ? padstr[ "f"].substr(0,16 - O.length) : "") + O; - if(radix == 16) O = O.toUpperCase(); - } else if(radix == 8) { - O = (Vnum>>>0).toString(8); - O = (10 - O.length >= 0 ? padstr[ "0"].substr(0,10 - O.length) : "") + O; - Vnum = Math.floor((Vnum - ((Vnum >>> 0)&0x3FFFFFFF)) / Math.pow(2,30)); - O = (Vnum>>>0).toString(8) + O.substr(O.length - 10); - O = O.substr(O.length - 20); - O = "1" + (21 - O.length >= 0 ? padstr[ "7"].substr(0,21 - O.length) : "") + O; - } else { - Vnum = (-Vnum) % 1e16; - var d1 = [1,8,4,4,6,7,4,4,0,7,3,7,0,9,5,5,1,6,1,6]; - var di = d1.length - 1; - while(Vnum > 0) { - if((d1[di] -= (Vnum % 10)) < 0) { d1[di] += 10; d1[di-1]--; } - --di; Vnum = Math.floor(Vnum / 10); - } - O = d1.join(""); - } - } else { - if(radix === -16) O = Vnum.toString(16).toLowerCase(); - else if(radix === 16) O = Vnum.toString(16).toUpperCase(); - else O = Vnum.toString(radix); - } - - /* apply precision */ - if(prec ===0 && O == "0" && !(radix == 8 && alt)) O = ""; /* bail out */ - else { - if(O.length < prec + (O.substr(0,1) == "-" ? 1 : 0)) { - if(O.substr(0,1) != "-") O = (prec - O.length >= 0 ? padstr[ "0"].substr(0,prec - O.length) : "") + O; - else O = O.substr(0,1) + (prec + 1 - O.length >= 0 ? padstr[ "0"].substr(0,prec + 1 - O.length) : "") + O.substr(1); - } - - /* add prefix for # form */ - if(!sign && alt && Vnum !== 0) switch(radix) { - case -16: O = "0x" + O; break; - case 16: O = "0X" + O; break; - case 8: if(O.charAt(0) != "0") O = "0" + O; break; - case 2: O = "0b" + O; break; - } - } - - /* add sign character */ - if(sign && O.charAt(0) != "-") { - if(flags.indexOf("+") > -1) O = "+" + O; - else if(flags.indexOf(" ") > -1) O = " " + O; - } - /* width */ - if(width > 0) { - if(O.length < width) { - if(flags.indexOf("-") > -1) { - O = O + ((width - O.length) >= 0 ? padstr[ " "].substr(0,(width - O.length)) : ""); - } else if(flags.indexOf("0") > -1 && prec < 0 && O.length > 0) { - if(prec > O.length) O = ((prec - O.length) >= 0 ? padstr[ "0"].substr(0,(prec - O.length)) : "") + O; - pad = ((width - O.length) >= 0 ? padstr[ (prec > 0 ? " " : "0")].substr(0,(width - O.length)) : ""); - if(O.charCodeAt(0) < 48) { - if(O.charAt(2).toLowerCase() == "x") O = O.substr(0,3) + pad + O.substring(3); - else O = O.substr(0,1) + pad + O.substring(1); - } - else if(O.charAt(1).toLowerCase() == "x") O = O.substr(0,2) + pad + O.substring(2); - else O = pad + O; - } else { - O = ((width - O.length) >= 0 ? padstr[ " "].substr(0,(width - O.length)) : "") + O; - } - } - } - - } else if(isnum > 0) { - - Vnum = Number(arg); - if(arg === null) Vnum = 0/0; - if(len == "L") bytes = 12; - var isf = isFinite(Vnum); - if(!isf) { /* Infinity or NaN */ - if(Vnum < 0) O = "-"; - else if(flags.indexOf("+") > -1) O = "+"; - else if(flags.indexOf(" ") > -1) O = " "; - O += (isNaN(Vnum)) ? "nan" : "inf"; - } else { - var E = 0; - - if(prec == -1 && isnum != 4) prec = 6; - - /* g/G conditional behavior */ - if(isnum == 3) { - O = Vnum.toExponential(1); - E = +O.substr(O.indexOf("e") + 1); - if(prec === 0) prec = 1; - if(prec > E && E >= -4) { isnum = (11); prec = prec -(E + 1); } - else { isnum = (12); prec = prec - 1; } - } - - /* sign: workaround for negative zero */ - var sg = (Vnum < 0 || 1/Vnum == -Infinity) ? "-" : ""; - if(Vnum < 0) Vnum = -Vnum; - - switch(isnum) { - /* f/F standard */ - case 1: case 11: - if(Vnum < 1e21) { - O = Vnum.toFixed(prec); - if(isnum == 1) { if(prec===0 &&alt&& O.indexOf(".")==-1) O+="."; } - else if(!alt) O=O.replace(/(\.\d*[1-9])0*$/,"$1").replace(/\.0*$/,""); - else if(O.indexOf(".") == -1) O+= "."; - break; - } - O = Vnum.toExponential(20); - E = +O.substr(O.indexOf("e")+1); - O = O.charAt(0) + O.substr(2,O.indexOf("e")-2); - O = O + (E - O.length + 1 >= 0 ? padstr[ "0"].substr(0,E - O.length + 1) : ""); - if(alt || (prec > 0 && isnum !== 11)) O = O + "." + (prec >= 0 ? padstr[ "0"].substr(0,prec) : ""); - break; - - /* e/E exponential */ - case 2: case 12: - O = Vnum.toExponential(prec); - E = O.indexOf("e"); - if(O.length - E === 3) O = O.substr(0, E+2) + "0" + O.substr(E+2); - if(alt && O.indexOf(".") == -1) O = O.substr(0,E) +"."+ O.substr(E); - else if(!alt && isnum == 12) O = O.replace(/\.0*e/, "e").replace(/\.(\d*[1-9])0*e/, ".$1e"); - break; - - /* a/A hex */ - case 4: - if(Vnum===0){O= "0x0"+((alt||prec>0)?"."+(prec >= 0 ? padstr["0"].substr(0,prec) : ""):"")+"p+0"; break;} - O = Vnum.toString(16); - /* First char 0-9 */ - var ac = O.charCodeAt(0); - if(ac == 48) { - ac = 2; E = -4; Vnum *= 16; - while(O.charCodeAt(ac++) == 48) { E -= 4; Vnum *= 16; } - O = Vnum.toString(16); - ac = O.charCodeAt(0); - } - - var ai = O.indexOf("."); - if(O.indexOf("(") > -1) { - /* IE exponential form */ - var am = O.match(/\(e(.*)\)/); - var ae = am ? (+am[1]) : 0; - E += 4 * ae; Vnum /= Math.pow(16, ae); - } else if(ai > 1) { - E += 4 * (ai - 1); Vnum /= Math.pow(16, ai - 1); - } else if(ai == -1) { - E += 4 * (O.length - 1); Vnum /= Math.pow(16, O.length - 1); - } - - /* at this point 1 <= Vnum < 16 */ - - if(bytes > 8) { - if(ac < 50) { E -= 3; Vnum *= 8; } - else if(ac < 52) { E -= 2; Vnum *= 4; } - else if(ac < 56) { E -= 1; Vnum *= 2; } - /* at this point 8 <= Vnum < 16 */ - } else { - if(ac >= 56) { E += 3; Vnum /= 8; } - else if(ac >= 52) { E += 2; Vnum /= 4; } - else if(ac >= 50) { E += 1; Vnum /= 2; } - /* at this point 1 <= Vnum < 2 */ - } - - O = Vnum.toString(16); - if(O.length > 1) { - if(O.length > prec+2 && O.charCodeAt(prec+2) >= 56) { - var _f = O.charCodeAt(0) == 102; - O = (Vnum + 8 * Math.pow(16, -prec-1)).toString(16); - if(_f && O.charCodeAt(0) == 49) E += 4; - } - if(prec > 0) { - O = O.substr(0, prec + 2); - if(O.length < prec + 2) { - if(O.charCodeAt(0) < 48) O = O.charAt(0) + ((prec + 2 - O.length) >= 0 ? padstr[ "0"].substr(0,(prec + 2 - O.length)) : "") + O.substr(1); - else O += ((prec + 2 - O.length) >= 0 ? padstr[ "0"].substr(0,(prec + 2 - O.length)) : ""); - } - } else if(prec === 0) O = O.charAt(0) + (alt ? "." : ""); - } else if(prec > 0) O = O + "." + (prec >= 0 ? padstr["0"].substr(0,prec) : ""); - else if(alt) O = O + "."; - O = "0x" + O + "p" + (E>=0 ? "+" + E : E); - break; - } - - if(sg === "") { - if(flags.indexOf("+") > -1) sg = "+"; - else if(flags.indexOf(" ") > -1) sg = " "; - } - - O = sg + O; - } - - /* width */ - if(width > O.length) { - if(flags.indexOf("-") > -1) { - O = O + ((width - O.length) >= 0 ? padstr[ " "].substr(0,(width - O.length)) : ""); - } else if(flags.indexOf("0") > -1 && O.length > 0 && isf) { - pad = ((width - O.length) >= 0 ? padstr[ "0"].substr(0,(width - O.length)) : ""); - if(O.charCodeAt(0) < 48) { - if(O.charAt(2).toLowerCase() == "x") O = O.substr(0,3) + pad + O.substring(3); - else O = O.substr(0,1) + pad + O.substring(1); - } - else if(O.charAt(1).toLowerCase() == "x") O = O.substr(0,2) + pad + O.substring(2); - else O = pad + O; - } else { - O = ((width - O.length) >= 0 ? padstr[ " "].substr(0,(width - O.length)) : "") + O; - } - } - if(c < 96) O = O.toUpperCase(); - - } - - o.push(O); - } - return o.join(""); -} - -function vsprintf(fmt, args) { return doit(tokenize(fmt), args); } - -function sprintf() { - var args = new Array(arguments.length - 1); - for(var i = 0; i < args.length; ++i) args[i] = arguments[i+1]; - return doit(tokenize(arguments[0]), args); -} - -PRINTJ.sprintf = sprintf; -PRINTJ.vsprintf = vsprintf; -PRINTJ._doit = doit; -PRINTJ._tokenize = tokenize; - -})); - diff --git a/node_modules/printj/types/index.d.ts b/node_modules/printj/types/index.d.ts deleted file mode 100644 index 4434ac78..00000000 --- a/node_modules/printj/types/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* index.d.ts (C) 2015-present SheetJS */ -// TypeScript Version: 2.2 - -/** Version string */ -export const version: string; - -/** Generate formatted string from format and subsequent arguments */ -export function sprintf(fmt: string, ...args: any[]): string; - -/** Generate formatted string from format and array of variables */ -export function vsprintf(fmt: string, args: any[]): string; diff --git a/node_modules/printj/types/tsconfig.json b/node_modules/printj/types/tsconfig.json deleted file mode 100644 index 7a654292..00000000 --- a/node_modules/printj/types/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ "es5", "dom" ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "baseUrl": ".", - "paths": { "printj": ["."] }, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - } -} diff --git a/node_modules/printj/types/tslint.json b/node_modules/printj/types/tslint.json deleted file mode 100644 index d9401a97..00000000 --- a/node_modules/printj/types/tslint.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "dtslint/dtslint.json", - "rules": { - "whitespace": false, - "no-sparse-arrays": false, - "only-arrow-functions": false, - "no-consecutive-blank-lines": false, - "prefer-conditional-expression": false, - "one-variable-per-declaration": false - } -} diff --git a/node_modules/process-nextick-args/index.js b/node_modules/process-nextick-args/index.js deleted file mode 100644 index 3eecf114..00000000 --- a/node_modules/process-nextick-args/index.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -if (typeof process === 'undefined' || - !process.version || - process.version.indexOf('v0.') === 0 || - process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { - module.exports = { nextTick: nextTick }; -} else { - module.exports = process -} - -function nextTick(fn, arg1, arg2, arg3) { - if (typeof fn !== 'function') { - throw new TypeError('"callback" argument must be a function'); - } - var len = arguments.length; - var args, i; - switch (len) { - case 0: - case 1: - return process.nextTick(fn); - case 2: - return process.nextTick(function afterTickOne() { - fn.call(null, arg1); - }); - case 3: - return process.nextTick(function afterTickTwo() { - fn.call(null, arg1, arg2); - }); - case 4: - return process.nextTick(function afterTickThree() { - fn.call(null, arg1, arg2, arg3); - }); - default: - args = new Array(len - 1); - i = 0; - while (i < args.length) { - args[i++] = arguments[i]; - } - return process.nextTick(function afterTick() { - fn.apply(null, args); - }); - } -} - diff --git a/node_modules/process-nextick-args/license.md b/node_modules/process-nextick-args/license.md deleted file mode 100644 index c67e3532..00000000 --- a/node_modules/process-nextick-args/license.md +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2015 Calvin Metcalf - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.** diff --git a/node_modules/process-nextick-args/package.json b/node_modules/process-nextick-args/package.json deleted file mode 100644 index ae92e1b3..00000000 --- a/node_modules/process-nextick-args/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "_from": "process-nextick-args@^2.0.0", - "_id": "process-nextick-args@2.0.1", - "_inBundle": false, - "_integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "_location": "/process-nextick-args", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "process-nextick-args@^2.0.0", - "name": "process-nextick-args", - "escapedName": "process-nextick-args", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/cloneable-readable", - "/cloneable-readable/readable-stream", - "/duplexify/readable-stream", - "/flush-write-stream/readable-stream", - "/glob-stream/readable-stream", - "/lazystream/readable-stream", - "/ordered-read-streams/readable-stream", - "/through2/readable-stream", - "/vinyl-fs/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "_shasum": "7820d9b16120cc55ca9ae7792680ae7dba6d7fe2", - "_spec": "process-nextick-args@^2.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/cloneable-readable", - "author": "", - "bugs": { - "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "process.nextTick but always with args", - "devDependencies": { - "tap": "~0.2.6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/calvinmetcalf/process-nextick-args", - "license": "MIT", - "main": "index.js", - "name": "process-nextick-args", - "repository": { - "type": "git", - "url": "git+https://github.com/calvinmetcalf/process-nextick-args.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "2.0.1" -} diff --git a/node_modules/process-nextick-args/readme.md b/node_modules/process-nextick-args/readme.md deleted file mode 100644 index ecb432c9..00000000 --- a/node_modules/process-nextick-args/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -process-nextick-args -===== - -[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args) - -```bash -npm install --save process-nextick-args -``` - -Always be able to pass arguments to process.nextTick, no matter the platform - -```js -var pna = require('process-nextick-args'); - -pna.nextTick(function (a, b, c) { - console.log(a, b, c); -}, 'step', 3, 'profit'); -``` diff --git a/node_modules/progress/CHANGELOG.md b/node_modules/progress/CHANGELOG.md deleted file mode 100644 index d9be0aa1..00000000 --- a/node_modules/progress/CHANGELOG.md +++ /dev/null @@ -1,115 +0,0 @@ - -2.0.0 / 2017-04-04 -================== - - * Fix: check before using stream.clearLine to prevent crash in Docker - * Fix: fixed output multiline on windows cmd - * Fix: Bug with array length when window is too small - * Fix: Don't clear whole line every time; instead, clear everything after end of line - * Fix: Use `this.stream` instead of `console.log` when terminating a progress bar to ensure that, if a writable stream is provided, it uses that rather than process.stdout - * Fix: Bug causing potentially stale tokens on render - * Feature: configurable cursor - * Feature: feature to interrupt the bar and display a message - * Feature: Add rate reporting to progress bar - * Improvement: Add head option to specify head character - * Improvement: Rename tickTokens to tokens - * Improvement: Change default throttle time to 16ms - * Improvement: Rename renderDelay to renderThrottle - * Improvement: Add delay between render updates - * Docs: Add example and documentation for custom token usage - * Docs: Add head option to readme - * Docs: Updated README example for public use - * Docs: Add renderThrottle option to code documentation - -1.1.7 / 2014-06-30 -================== - - * fixed a bug that occurs when a progress bar attempts to draw itself - on a console with very few columns - -1.1.6 / 2014-06-16 -================== - - * now prevents progress bar from exceeding TTY width by limiting its width to - the with of the TTY - -1.1.5 / 2014-03-25 -================== - - * updated documentation and various other repo maintenance - * updated makefile to run examples with `make` - * removed dependency on readline module - -1.1.4 / 2014-03-14 -================== - - * now supports streams, for example output progress bar to stderr, while piping - stdout - * increases performance and flicker by remembering the last drawn progress bar - -1.1.3 / 2013-12-31 -================== - - * fixes a bug where bar would bug when initializing - * allows to pass updated tokens when ticking or updating the bar - * fixes a bug where the bar would throw if skipping to far - -1.1.2 / 2013-10-17 -================== - - * lets you pass an `fmt` and a `total` instead of an options object - -1.1.0 / 2013-09-18 -================== - - * eta and elapsed tokens default to 0.0 instead of ?.? - * better JSDocs - * added back and forth example - * added method to update the progress bar to a specific percentage - * added an option to hide the bar on completion - -1.0.1 / 2013-08-07 -================== - - * on os x readline now works, reverting the terminal hack - -1.0.0 / 2013-06-18 -================== - - * remove .version - * merge pull request #15 from davglass/readline-osx - * on OSX revert back to terminal hack to avoid a readline bug - -0.1.0 / 2012-09-19 -================== - - * fixed logic bug that caused bar to jump one extra space at the end [davglass] - * working with readline impl, even on Windows [davglass] - * using readline instead of the \r hack [davglass] - -0.0.5 / 2012-08-07 -================== - - * add ability to tick by zero chunks - tick(0) - * fix ETA. Closes #4 [lwille] - -0.0.4 / 2011-11-14 -================== - - * allow more recent versions of node - -0.0.3 / 2011-04-20 -================== - - * changed; erase the line when complete - -0.0.2 / 2011-04-20 -================== - - * added custom tokens support - * fixed; clear line before writing - -0.0.1 / 2010-01-03 -================== - - * initial release diff --git a/node_modules/progress/LICENSE b/node_modules/progress/LICENSE deleted file mode 100644 index 4608b394..00000000 --- a/node_modules/progress/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2017 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/progress/Makefile b/node_modules/progress/Makefile deleted file mode 100644 index f933be10..00000000 --- a/node_modules/progress/Makefile +++ /dev/null @@ -1,8 +0,0 @@ - -EXAMPLES = $(foreach EXAMPLE, $(wildcard examples/*.js), $(EXAMPLE)) - -.PHONY: test -test: $(EXAMPLES) - -.PHONY: $(EXAMPLES) -$(EXAMPLES): ; node $@ && echo diff --git a/node_modules/progress/Readme.md b/node_modules/progress/Readme.md deleted file mode 100644 index 6d4271ab..00000000 --- a/node_modules/progress/Readme.md +++ /dev/null @@ -1,146 +0,0 @@ -Flexible ascii progress bar. - -## Installation - -```bash -$ npm install progress -``` - -## Usage - -First we create a `ProgressBar`, giving it a format string -as well as the `total`, telling the progress bar when it will -be considered complete. After that all we need to do is `tick()` appropriately. - -```javascript -var ProgressBar = require('progress'); - -var bar = new ProgressBar(':bar', { total: 10 }); -var timer = setInterval(function () { - bar.tick(); - if (bar.complete) { - console.log('\ncomplete\n'); - clearInterval(timer); - } -}, 100); -``` - -### Options - -These are keys in the options object you can pass to the progress bar along with -`total` as seen in the example above. - -- `curr` current completed index -- `total` total number of ticks to complete -- `width` the displayed width of the progress bar defaulting to total -- `stream` the output stream defaulting to stderr -- `head` head character defaulting to complete character -- `complete` completion character defaulting to "=" -- `incomplete` incomplete character defaulting to "-" -- `renderThrottle` minimum time between updates in milliseconds defaulting to 16 -- `clear` option to clear the bar on completion defaulting to false -- `callback` optional function to call when the progress bar completes - -### Tokens - -These are tokens you can use in the format of your progress bar. - -- `:bar` the progress bar itself -- `:current` current tick number -- `:total` total ticks -- `:elapsed` time elapsed in seconds -- `:percent` completion percentage -- `:eta` estimated completion time in seconds -- `:rate` rate of ticks per second - -### Custom Tokens - -You can define custom tokens by adding a `{'name': value}` object parameter to your method (`tick()`, `update()`, etc.) calls. - -```javascript -var bar = new ProgressBar(':current: :token1 :token2', { total: 3 }) -bar.tick({ - 'token1': "Hello", - 'token2': "World!\n" -}) -bar.tick(2, { - 'token1': "Goodbye", - 'token2': "World!" -}) -``` -The above example would result in the output below. - -``` -1: Hello World! -3: Goodbye World! -``` - -## Examples - -### Download - -In our download example each tick has a variable influence, so we pass the chunk -length which adjusts the progress bar appropriately relative to the total -length. - -```javascript -var ProgressBar = require('progress'); -var https = require('https'); - -var req = https.request({ - host: 'download.github.com', - port: 443, - path: '/visionmedia-node-jscoverage-0d4608a.zip' -}); - -req.on('response', function(res){ - var len = parseInt(res.headers['content-length'], 10); - - console.log(); - var bar = new ProgressBar(' downloading [:bar] :rate/bps :percent :etas', { - complete: '=', - incomplete: ' ', - width: 20, - total: len - }); - - res.on('data', function (chunk) { - bar.tick(chunk.length); - }); - - res.on('end', function () { - console.log('\n'); - }); -}); - -req.end(); -``` - -The above example result in a progress bar like the one below. - -``` -downloading [===== ] 39/bps 29% 3.7s -``` - -### Interrupt - -To display a message during progress bar execution, use `interrupt()` -```javascript -var ProgressBar = require('progress'); - -var bar = new ProgressBar(':bar :current/:total', { total: 10 }); -var timer = setInterval(function () { - bar.tick(); - if (bar.complete) { - clearInterval(timer); - } else if (bar.curr === 5) { - bar.interrupt('this message appears above the progress bar\ncurrent progress is ' + bar.curr + '/' + bar.total); - } -}, 1000); -``` - -You can see more examples in the `examples` folder. - -## License - -MIT diff --git a/node_modules/progress/index.js b/node_modules/progress/index.js deleted file mode 100644 index 4449dd30..00000000 --- a/node_modules/progress/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/node-progress'); diff --git a/node_modules/progress/lib/node-progress.js b/node_modules/progress/lib/node-progress.js deleted file mode 100644 index 8eb0740a..00000000 --- a/node_modules/progress/lib/node-progress.js +++ /dev/null @@ -1,236 +0,0 @@ -/*! - * node-progress - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Expose `ProgressBar`. - */ - -exports = module.exports = ProgressBar; - -/** - * Initialize a `ProgressBar` with the given `fmt` string and `options` or - * `total`. - * - * Options: - * - * - `curr` current completed index - * - `total` total number of ticks to complete - * - `width` the displayed width of the progress bar defaulting to total - * - `stream` the output stream defaulting to stderr - * - `head` head character defaulting to complete character - * - `complete` completion character defaulting to "=" - * - `incomplete` incomplete character defaulting to "-" - * - `renderThrottle` minimum time between updates in milliseconds defaulting to 16 - * - `callback` optional function to call when the progress bar completes - * - `clear` will clear the progress bar upon termination - * - * Tokens: - * - * - `:bar` the progress bar itself - * - `:current` current tick number - * - `:total` total ticks - * - `:elapsed` time elapsed in seconds - * - `:percent` completion percentage - * - `:eta` eta in seconds - * - `:rate` rate of ticks per second - * - * @param {string} fmt - * @param {object|number} options or total - * @api public - */ - -function ProgressBar(fmt, options) { - this.stream = options.stream || process.stderr; - - if (typeof(options) == 'number') { - var total = options; - options = {}; - options.total = total; - } else { - options = options || {}; - if ('string' != typeof fmt) throw new Error('format required'); - if ('number' != typeof options.total) throw new Error('total required'); - } - - this.fmt = fmt; - this.curr = options.curr || 0; - this.total = options.total; - this.width = options.width || this.total; - this.clear = options.clear - this.chars = { - complete : options.complete || '=', - incomplete : options.incomplete || '-', - head : options.head || (options.complete || '=') - }; - this.renderThrottle = options.renderThrottle !== 0 ? (options.renderThrottle || 16) : 0; - this.lastRender = -Infinity; - this.callback = options.callback || function () {}; - this.tokens = {}; - this.lastDraw = ''; -} - -/** - * "tick" the progress bar with optional `len` and optional `tokens`. - * - * @param {number|object} len or tokens - * @param {object} tokens - * @api public - */ - -ProgressBar.prototype.tick = function(len, tokens){ - if (len !== 0) - len = len || 1; - - // swap tokens - if ('object' == typeof len) tokens = len, len = 1; - if (tokens) this.tokens = tokens; - - // start time for eta - if (0 == this.curr) this.start = new Date; - - this.curr += len - - // try to render - this.render(); - - // progress complete - if (this.curr >= this.total) { - this.render(undefined, true); - this.complete = true; - this.terminate(); - this.callback(this); - return; - } -}; - -/** - * Method to render the progress bar with optional `tokens` to place in the - * progress bar's `fmt` field. - * - * @param {object} tokens - * @api public - */ - -ProgressBar.prototype.render = function (tokens, force) { - force = force !== undefined ? force : false; - if (tokens) this.tokens = tokens; - - if (!this.stream.isTTY) return; - - var now = Date.now(); - var delta = now - this.lastRender; - if (!force && (delta < this.renderThrottle)) { - return; - } else { - this.lastRender = now; - } - - var ratio = this.curr / this.total; - ratio = Math.min(Math.max(ratio, 0), 1); - - var percent = Math.floor(ratio * 100); - var incomplete, complete, completeLength; - var elapsed = new Date - this.start; - var eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1); - var rate = this.curr / (elapsed / 1000); - - /* populate the bar template with percentages and timestamps */ - var str = this.fmt - .replace(':current', this.curr) - .replace(':total', this.total) - .replace(':elapsed', isNaN(elapsed) ? '0.0' : (elapsed / 1000).toFixed(1)) - .replace(':eta', (isNaN(eta) || !isFinite(eta)) ? '0.0' : (eta / 1000) - .toFixed(1)) - .replace(':percent', percent.toFixed(0) + '%') - .replace(':rate', Math.round(rate)); - - /* compute the available space (non-zero) for the bar */ - var availableSpace = Math.max(0, this.stream.columns - str.replace(':bar', '').length); - if(availableSpace && process.platform === 'win32'){ - availableSpace = availableSpace - 1; - } - - var width = Math.min(this.width, availableSpace); - - /* TODO: the following assumes the user has one ':bar' token */ - completeLength = Math.round(width * ratio); - complete = Array(Math.max(0, completeLength + 1)).join(this.chars.complete); - incomplete = Array(Math.max(0, width - completeLength + 1)).join(this.chars.incomplete); - - /* add head to the complete string */ - if(completeLength > 0) - complete = complete.slice(0, -1) + this.chars.head; - - /* fill in the actual progress bar */ - str = str.replace(':bar', complete + incomplete); - - /* replace the extra tokens */ - if (this.tokens) for (var key in this.tokens) str = str.replace(':' + key, this.tokens[key]); - - if (this.lastDraw !== str) { - this.stream.cursorTo(0); - this.stream.write(str); - this.stream.clearLine(1); - this.lastDraw = str; - } -}; - -/** - * "update" the progress bar to represent an exact percentage. - * The ratio (between 0 and 1) specified will be multiplied by `total` and - * floored, representing the closest available "tick." For example, if a - * progress bar has a length of 3 and `update(0.5)` is called, the progress - * will be set to 1. - * - * A ratio of 0.5 will attempt to set the progress to halfway. - * - * @param {number} ratio The ratio (between 0 and 1 inclusive) to set the - * overall completion to. - * @api public - */ - -ProgressBar.prototype.update = function (ratio, tokens) { - var goal = Math.floor(ratio * this.total); - var delta = goal - this.curr; - - this.tick(delta, tokens); -}; - -/** - * "interrupt" the progress bar and write a message above it. - * @param {string} message The message to write. - * @api public - */ - -ProgressBar.prototype.interrupt = function (message) { - // clear the current line - this.stream.clearLine(); - // move the cursor to the start of the line - this.stream.cursorTo(0); - // write the message text - this.stream.write(message); - // terminate the line after writing the message - this.stream.write('\n'); - // re-display the progress bar with its lastDraw - this.stream.write(this.lastDraw); -}; - -/** - * Terminates a progress bar. - * - * @api public - */ - -ProgressBar.prototype.terminate = function () { - if (this.clear) { - if (this.stream.clearLine) { - this.stream.clearLine(); - this.stream.cursorTo(0); - } - } else { - this.stream.write('\n'); - } -}; diff --git a/node_modules/progress/package.json b/node_modules/progress/package.json deleted file mode 100644 index 67dbbc12..00000000 --- a/node_modules/progress/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "progress@~2.0", - "_id": "progress@2.0.3", - "_inBundle": false, - "_integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "_location": "/progress", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "progress@~2.0", - "name": "progress", - "escapedName": "progress", - "rawSpec": "~2.0", - "saveSpec": null, - "fetchSpec": "~2.0" - }, - "_requiredBy": [ - "/@antora/content-aggregator" - ], - "_resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "_shasum": "7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8", - "_spec": "progress@~2.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/content-aggregator", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "bugs": { - "url": "https://github.com/visionmedia/node-progress/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Christoffer Hallas", - "email": "christoffer.hallas@gmail.com" - }, - { - "name": "Jordan Scales", - "email": "scalesjordan@gmail.com" - }, - { - "name": "Andrew Rhyne", - "email": "rhyneandrew@gmail.com" - }, - { - "name": "Marco Brack", - "email": "PapstDonB@Googlemail.com" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "Flexible ascii progress bar", - "engines": { - "node": ">=0.4.0" - }, - "homepage": "https://github.com/visionmedia/node-progress#readme", - "keywords": [ - "cli", - "progress" - ], - "license": "MIT", - "main": "./index.js", - "name": "progress", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/node-progress.git" - }, - "version": "2.0.3" -} diff --git a/node_modules/pump/.travis.yml b/node_modules/pump/.travis.yml deleted file mode 100644 index 17f94330..00000000 --- a/node_modules/pump/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - -script: "npm test" diff --git a/node_modules/pump/LICENSE b/node_modules/pump/LICENSE deleted file mode 100644 index 757562ec..00000000 --- a/node_modules/pump/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/pump/README.md b/node_modules/pump/README.md deleted file mode 100644 index 4c81471a..00000000 --- a/node_modules/pump/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# pump - -pump is a small node module that pipes streams together and destroys all of them if one of them closes. - -``` -npm install pump -``` - -[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump) - -## What problem does it solve? - -When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error. -You are also not able to provide a callback to tell when then pipe has finished. - -pump does these two things for you - -## Usage - -Simply pass the streams you want to pipe together to pump and add an optional callback - -``` js -var pump = require('pump') -var fs = require('fs') - -var source = fs.createReadStream('/dev/random') -var dest = fs.createWriteStream('/dev/null') - -pump(source, dest, function(err) { - console.log('pipe finished', err) -}) - -setTimeout(function() { - dest.destroy() // when dest is closed pump will destroy source -}, 1000) -``` - -You can use pump to pipe more than two streams together as well - -``` js -var transform = someTransformStream() - -pump(source, transform, anotherTransform, dest, function(err) { - console.log('pipe finished', err) -}) -``` - -If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed. - -Similarly to `stream.pipe()`, `pump()` returns the last stream passed in, so you can do: - -``` -return pump(s1, s2) // returns s2 -``` - -If you want to return a stream that combines *both* s1 and s2 to a single stream use -[pumpify](https://github.com/mafintosh/pumpify) instead. - -## License - -MIT - -## Related - -`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/pump/index.js b/node_modules/pump/index.js deleted file mode 100644 index c15059f1..00000000 --- a/node_modules/pump/index.js +++ /dev/null @@ -1,82 +0,0 @@ -var once = require('once') -var eos = require('end-of-stream') -var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes - -var noop = function () {} -var ancient = /^v?\.0/.test(process.version) - -var isFn = function (fn) { - return typeof fn === 'function' -} - -var isFS = function (stream) { - if (!ancient) return false // newer node version do not need to care about fs is a special way - if (!fs) return false // browser - return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) -} - -var isRequest = function (stream) { - return stream.setHeader && isFn(stream.abort) -} - -var destroyer = function (stream, reading, writing, callback) { - callback = once(callback) - - var closed = false - stream.on('close', function () { - closed = true - }) - - eos(stream, {readable: reading, writable: writing}, function (err) { - if (err) return callback(err) - closed = true - callback() - }) - - var destroyed = false - return function (err) { - if (closed) return - if (destroyed) return - destroyed = true - - if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks - if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want - - if (isFn(stream.destroy)) return stream.destroy() - - callback(err || new Error('stream was destroyed')) - } -} - -var call = function (fn) { - fn() -} - -var pipe = function (from, to) { - return from.pipe(to) -} - -var pump = function () { - var streams = Array.prototype.slice.call(arguments) - var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop - - if (Array.isArray(streams[0])) streams = streams[0] - if (streams.length < 2) throw new Error('pump requires two streams per minimum') - - var error - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1 - var writing = i > 0 - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err - if (err) destroys.forEach(call) - if (reading) return - destroys.forEach(call) - callback(error) - }) - }) - - return streams.reduce(pipe) -} - -module.exports = pump diff --git a/node_modules/pump/package.json b/node_modules/pump/package.json deleted file mode 100644 index 2fa39443..00000000 --- a/node_modules/pump/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "pump@^3.0.0", - "_id": "pump@3.0.0", - "_inBundle": false, - "_integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "_location": "/pump", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "pump@^3.0.0", - "name": "pump", - "escapedName": "pump", - "rawSpec": "^3.0.0", - "saveSpec": null, - "fetchSpec": "^3.0.0" - }, - "_requiredBy": [ - "/pino-pretty" - ], - "_resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "_shasum": "b4a2116815bde2f4e1ea602354e8c75565107a64", - "_spec": "pump@^3.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pino-pretty", - "author": { - "name": "Mathias Buus Madsen", - "email": "mathiasbuus@gmail.com" - }, - "browser": { - "fs": false - }, - "bugs": { - "url": "https://github.com/mafintosh/pump/issues" - }, - "bundleDependencies": false, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - }, - "deprecated": false, - "description": "pipe streams together and close all of them if one of them closes", - "homepage": "https://github.com/mafintosh/pump#readme", - "keywords": [ - "streams", - "pipe", - "destroy", - "callback" - ], - "license": "MIT", - "name": "pump", - "repository": { - "type": "git", - "url": "git://github.com/mafintosh/pump.git" - }, - "scripts": { - "test": "node test-browser.js && node test-node.js" - }, - "version": "3.0.0" -} diff --git a/node_modules/pump/test-browser.js b/node_modules/pump/test-browser.js deleted file mode 100644 index 9a06c8a4..00000000 --- a/node_modules/pump/test-browser.js +++ /dev/null @@ -1,66 +0,0 @@ -var stream = require('stream') -var pump = require('./index') - -var rs = new stream.Readable() -var ws = new stream.Writable() - -rs._read = function (size) { - this.push(Buffer(size).fill('abc')) -} - -ws._write = function (chunk, encoding, cb) { - setTimeout(function () { - cb() - }, 100) -} - -var toHex = function () { - var reverse = new (require('stream').Transform)() - - reverse._transform = function (chunk, enc, callback) { - reverse.push(chunk.toString('hex')) - callback() - } - - return reverse -} - -var wsClosed = false -var rsClosed = false -var callbackCalled = false - -var check = function () { - if (wsClosed && rsClosed && callbackCalled) { - console.log('test-browser.js passes') - clearTimeout(timeout) - } -} - -ws.on('finish', function () { - wsClosed = true - check() -}) - -rs.on('end', function () { - rsClosed = true - check() -}) - -var res = pump(rs, toHex(), toHex(), toHex(), ws, function () { - callbackCalled = true - check() -}) - -if (res !== ws) { - throw new Error('should return last stream') -} - -setTimeout(function () { - rs.push(null) - rs.emit('close') -}, 1000) - -var timeout = setTimeout(function () { - check() - throw new Error('timeout') -}, 5000) diff --git a/node_modules/pump/test-node.js b/node_modules/pump/test-node.js deleted file mode 100644 index 561251a0..00000000 --- a/node_modules/pump/test-node.js +++ /dev/null @@ -1,53 +0,0 @@ -var pump = require('./index') - -var rs = require('fs').createReadStream('/dev/random') -var ws = require('fs').createWriteStream('/dev/null') - -var toHex = function () { - var reverse = new (require('stream').Transform)() - - reverse._transform = function (chunk, enc, callback) { - reverse.push(chunk.toString('hex')) - callback() - } - - return reverse -} - -var wsClosed = false -var rsClosed = false -var callbackCalled = false - -var check = function () { - if (wsClosed && rsClosed && callbackCalled) { - console.log('test-node.js passes') - clearTimeout(timeout) - } -} - -ws.on('close', function () { - wsClosed = true - check() -}) - -rs.on('close', function () { - rsClosed = true - check() -}) - -var res = pump(rs, toHex(), toHex(), toHex(), ws, function () { - callbackCalled = true - check() -}) - -if (res !== ws) { - throw new Error('should return last stream') -} - -setTimeout(function () { - rs.destroy() -}, 1000) - -var timeout = setTimeout(function () { - throw new Error('timeout') -}, 5000) diff --git a/node_modules/pumpify/.travis.yml b/node_modules/pumpify/.travis.yml deleted file mode 100644 index 32e71a6b..00000000 --- a/node_modules/pumpify/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js - -node_js: - - "0.10" - - "4" - - "5" - -sudo: false diff --git a/node_modules/pumpify/LICENSE b/node_modules/pumpify/LICENSE deleted file mode 100644 index 757562ec..00000000 --- a/node_modules/pumpify/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/pumpify/README.md b/node_modules/pumpify/README.md deleted file mode 100644 index 4988f7b1..00000000 --- a/node_modules/pumpify/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# pumpify - -Combine an array of streams into a single duplex stream using [pump](https://github.com/mafintosh/pump) and [duplexify](https://github.com/mafintosh/duplexify). -If one of the streams closes/errors all streams in the pipeline will be destroyed. - -``` -npm install pumpify -``` - -[![build status](http://img.shields.io/travis/mafintosh/pumpify.svg?style=flat)](http://travis-ci.org/mafintosh/pumpify) - -## Usage - -Pass the streams you want to pipe together to pumpify `pipeline = pumpify(s1, s2, s3, ...)`. -`pipeline` is a duplex stream that writes to the first streams and reads from the last one. -Streams are piped together using [pump](https://github.com/mafintosh/pump) so if one of them closes -all streams will be destroyed. - -``` js -var pumpify = require('pumpify') -var tar = require('tar-fs') -var zlib = require('zlib') -var fs = require('fs') - -var untar = pumpify(zlib.createGunzip(), tar.extract('output-folder')) -// you can also pass an array instead -// var untar = pumpify([zlib.createGunzip(), tar.extract('output-folder')]) - -fs.createReadStream('some-gzipped-tarball.tgz').pipe(untar) -``` - -If you are pumping object streams together use `pipeline = pumpify.obj(s1, s2, ...)`. -Call `pipeline.destroy()` to destroy the pipeline (including the streams passed to pumpify). - -### Using `setPipeline(s1, s2, ...)` - -Similar to [duplexify](https://github.com/mafintosh/duplexify) you can also define the pipeline asynchronously using `setPipeline(s1, s2, ...)` - -``` js -var untar = pumpify() - -setTimeout(function() { - // will start draining the input now - untar.setPipeline(zlib.createGunzip(), tar.extract('output-folder')) -}, 1000) - -fs.createReadStream('some-gzipped-tarball.tgz').pipe(untar) -``` - -## License - -MIT - -## Related - -`pumpify` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/pumpify/index.js b/node_modules/pumpify/index.js deleted file mode 100644 index 473e2566..00000000 --- a/node_modules/pumpify/index.js +++ /dev/null @@ -1,60 +0,0 @@ -var pump = require('pump') -var inherits = require('inherits') -var Duplexify = require('duplexify') - -var toArray = function(args) { - if (!args.length) return [] - return Array.isArray(args[0]) ? args[0] : Array.prototype.slice.call(args) -} - -var define = function(opts) { - var Pumpify = function() { - var streams = toArray(arguments) - if (!(this instanceof Pumpify)) return new Pumpify(streams) - Duplexify.call(this, null, null, opts) - if (streams.length) this.setPipeline(streams) - } - - inherits(Pumpify, Duplexify) - - Pumpify.prototype.setPipeline = function() { - var streams = toArray(arguments) - var self = this - var ended = false - var w = streams[0] - var r = streams[streams.length-1] - - r = r.readable ? r : null - w = w.writable ? w : null - - var onclose = function() { - streams[0].emit('error', new Error('stream was destroyed')) - } - - this.on('close', onclose) - this.on('prefinish', function() { - if (!ended) self.cork() - }) - - pump(streams, function(err) { - self.removeListener('close', onclose) - if (err) return self.destroy(err.message === 'premature close' ? null : err) - ended = true - // pump ends after the last stream is not writable *but* - // pumpify still forwards the readable part so we need to catch errors - // still, so reenable autoDestroy in this case - if (self._autoDestroy === false) self._autoDestroy = true - self.uncork() - }) - - if (this.destroyed) return onclose() - this.setWritable(w) - this.setReadable(r) - } - - return Pumpify -} - -module.exports = define({autoDestroy:false, destroy:false}) -module.exports.obj = define({autoDestroy: false, destroy:false, objectMode:true, highWaterMark:16}) -module.exports.ctor = define diff --git a/node_modules/pumpify/node_modules/pump/.travis.yml b/node_modules/pumpify/node_modules/pump/.travis.yml deleted file mode 100644 index 17f94330..00000000 --- a/node_modules/pumpify/node_modules/pump/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - -script: "npm test" diff --git a/node_modules/pumpify/node_modules/pump/LICENSE b/node_modules/pumpify/node_modules/pump/LICENSE deleted file mode 100644 index 757562ec..00000000 --- a/node_modules/pumpify/node_modules/pump/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/pumpify/node_modules/pump/README.md b/node_modules/pumpify/node_modules/pump/README.md deleted file mode 100644 index 5029b27d..00000000 --- a/node_modules/pumpify/node_modules/pump/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# pump - -pump is a small node module that pipes streams together and destroys all of them if one of them closes. - -``` -npm install pump -``` - -[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump) - -## What problem does it solve? - -When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error. -You are also not able to provide a callback to tell when then pipe has finished. - -pump does these two things for you - -## Usage - -Simply pass the streams you want to pipe together to pump and add an optional callback - -``` js -var pump = require('pump') -var fs = require('fs') - -var source = fs.createReadStream('/dev/random') -var dest = fs.createWriteStream('/dev/null') - -pump(source, dest, function(err) { - console.log('pipe finished', err) -}) - -setTimeout(function() { - dest.destroy() // when dest is closed pump will destroy source -}, 1000) -``` - -You can use pump to pipe more than two streams together as well - -``` js -var transform = someTransformStream() - -pump(source, transform, anotherTransform, dest, function(err) { - console.log('pipe finished', err) -}) -``` - -If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed. - -## License - -MIT - -## Related - -`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/pumpify/node_modules/pump/index.js b/node_modules/pumpify/node_modules/pump/index.js deleted file mode 100644 index d9ca0335..00000000 --- a/node_modules/pumpify/node_modules/pump/index.js +++ /dev/null @@ -1,82 +0,0 @@ -var once = require('once') -var eos = require('end-of-stream') -var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes - -var noop = function () {} -var ancient = /^v?\.0/.test(process.version) - -var isFn = function (fn) { - return typeof fn === 'function' -} - -var isFS = function (stream) { - if (!ancient) return false // newer node version do not need to care about fs is a special way - if (!fs) return false // browser - return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) -} - -var isRequest = function (stream) { - return stream.setHeader && isFn(stream.abort) -} - -var destroyer = function (stream, reading, writing, callback) { - callback = once(callback) - - var closed = false - stream.on('close', function () { - closed = true - }) - - eos(stream, {readable: reading, writable: writing}, function (err) { - if (err) return callback(err) - closed = true - callback() - }) - - var destroyed = false - return function (err) { - if (closed) return - if (destroyed) return - destroyed = true - - if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks - if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want - - if (isFn(stream.destroy)) return stream.destroy() - - callback(err || new Error('stream was destroyed')) - } -} - -var call = function (fn) { - fn() -} - -var pipe = function (from, to) { - return from.pipe(to) -} - -var pump = function () { - var streams = Array.prototype.slice.call(arguments) - var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop - - if (Array.isArray(streams[0])) streams = streams[0] - if (streams.length < 2) throw new Error('pump requires two streams per minimum') - - var error - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1 - var writing = i > 0 - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err - if (err) destroys.forEach(call) - if (reading) return - destroys.forEach(call) - callback(error) - }) - }) - - streams.reduce(pipe) -} - -module.exports = pump diff --git a/node_modules/pumpify/node_modules/pump/package.json b/node_modules/pumpify/node_modules/pump/package.json deleted file mode 100644 index 47c21cc3..00000000 --- a/node_modules/pumpify/node_modules/pump/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "pump@^2.0.0", - "_id": "pump@2.0.1", - "_inBundle": false, - "_integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "_location": "/pumpify/pump", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "pump@^2.0.0", - "name": "pump", - "escapedName": "pump", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/pumpify" - ], - "_resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "_shasum": "12399add6e4cf7526d973cbc8b5ce2e2908b3909", - "_spec": "pump@^2.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pumpify", - "author": { - "name": "Mathias Buus Madsen", - "email": "mathiasbuus@gmail.com" - }, - "browser": { - "fs": false - }, - "bugs": { - "url": "https://github.com/mafintosh/pump/issues" - }, - "bundleDependencies": false, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - }, - "deprecated": false, - "description": "pipe streams together and close all of them if one of them closes", - "homepage": "https://github.com/mafintosh/pump#readme", - "keywords": [ - "streams", - "pipe", - "destroy", - "callback" - ], - "license": "MIT", - "name": "pump", - "repository": { - "type": "git", - "url": "git://github.com/mafintosh/pump.git" - }, - "scripts": { - "test": "node test-browser.js && node test-node.js" - }, - "version": "2.0.1" -} diff --git a/node_modules/pumpify/node_modules/pump/test-browser.js b/node_modules/pumpify/node_modules/pump/test-browser.js deleted file mode 100644 index 75ea4a29..00000000 --- a/node_modules/pumpify/node_modules/pump/test-browser.js +++ /dev/null @@ -1,62 +0,0 @@ -var stream = require('stream') -var pump = require('./index') - -var rs = new stream.Readable() -var ws = new stream.Writable() - -rs._read = function (size) { - this.push(Buffer(size).fill('abc')) -} - -ws._write = function (chunk, encoding, cb) { - setTimeout(function () { - cb() - }, 100) -} - -var toHex = function () { - var reverse = new (require('stream').Transform)() - - reverse._transform = function (chunk, enc, callback) { - reverse.push(chunk.toString('hex')) - callback() - } - - return reverse -} - -var wsClosed = false -var rsClosed = false -var callbackCalled = false - -var check = function () { - if (wsClosed && rsClosed && callbackCalled) { - console.log('test-browser.js passes') - clearTimeout(timeout) - } -} - -ws.on('finish', function () { - wsClosed = true - check() -}) - -rs.on('end', function () { - rsClosed = true - check() -}) - -pump(rs, toHex(), toHex(), toHex(), ws, function () { - callbackCalled = true - check() -}) - -setTimeout(function () { - rs.push(null) - rs.emit('close') -}, 1000) - -var timeout = setTimeout(function () { - check() - throw new Error('timeout') -}, 5000) diff --git a/node_modules/pumpify/node_modules/pump/test-node.js b/node_modules/pumpify/node_modules/pump/test-node.js deleted file mode 100644 index 034a6541..00000000 --- a/node_modules/pumpify/node_modules/pump/test-node.js +++ /dev/null @@ -1,53 +0,0 @@ -var pump = require('./index') - -var rs = require('fs').createReadStream('/dev/random') -var ws = require('fs').createWriteStream('/dev/null') - -var toHex = function () { - var reverse = new (require('stream').Transform)() - - reverse._transform = function (chunk, enc, callback) { - reverse.push(chunk.toString('hex')) - callback() - } - - return reverse -} - -var wsClosed = false -var rsClosed = false -var callbackCalled = false - -var check = function () { - if (wsClosed && rsClosed && callbackCalled) { - console.log('test-node.js passes') - clearTimeout(timeout) - } -} - -ws.on('close', function () { - wsClosed = true - check() -}) - -rs.on('close', function () { - rsClosed = true - check() -}) - -var res = pump(rs, toHex(), toHex(), toHex(), ws, function () { - callbackCalled = true - check() -}) - -if (res) { - process.exit(1) -} - -setTimeout(function () { - rs.destroy() -}, 1000) - -var timeout = setTimeout(function () { - throw new Error('timeout') -}, 5000) diff --git a/node_modules/pumpify/package.json b/node_modules/pumpify/package.json deleted file mode 100644 index 9a6983a6..00000000 --- a/node_modules/pumpify/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_from": "pumpify@^1.3.5", - "_id": "pumpify@1.5.1", - "_inBundle": false, - "_integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "_location": "/pumpify", - "_phantomChildren": { - "end-of-stream": "1.4.4", - "once": "1.4.0" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "pumpify@^1.3.5", - "name": "pumpify", - "escapedName": "pumpify", - "rawSpec": "^1.3.5", - "saveSpec": null, - "fetchSpec": "^1.3.5" - }, - "_requiredBy": [ - "/glob-stream", - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "_shasum": "36513be246ab27570b1a374a5ce278bfd74370ce", - "_spec": "pumpify@^1.3.5", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs", - "author": { - "name": "Mathias Buus" - }, - "bugs": { - "url": "https://github.com/mafintosh/pumpify/issues" - }, - "bundleDependencies": false, - "dependencies": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - }, - "deprecated": false, - "description": "Combine an array of streams into a single duplex stream using pump and duplexify", - "devDependencies": { - "tape": "^4.8.0", - "through2": "^2.0.3" - }, - "homepage": "https://github.com/mafintosh/pumpify", - "keywords": [ - "pump", - "duplexify", - "duplex", - "streams", - "stream", - "pipeline", - "combine" - ], - "license": "MIT", - "main": "index.js", - "name": "pumpify", - "repository": { - "type": "git", - "url": "git://github.com/mafintosh/pumpify.git" - }, - "scripts": { - "test": "tape test.js" - }, - "version": "1.5.1" -} diff --git a/node_modules/pumpify/test.js b/node_modules/pumpify/test.js deleted file mode 100644 index b603c4d8..00000000 --- a/node_modules/pumpify/test.js +++ /dev/null @@ -1,235 +0,0 @@ -var tape = require('tape') -var through = require('through2') -var pumpify = require('./') -var stream = require('stream') -var duplexify = require('duplexify') - -tape('basic', function(t) { - t.plan(3) - - var pipeline = pumpify( - through(function(data, enc, cb) { - t.same(data.toString(), 'hello') - cb(null, data.toString().toUpperCase()) - }), - through(function(data, enc, cb) { - t.same(data.toString(), 'HELLO') - cb(null, data.toString().toLowerCase()) - }) - ) - - pipeline.write('hello') - pipeline.on('data', function(data) { - t.same(data.toString(), 'hello') - t.end() - }) -}) - -tape('3 times', function(t) { - t.plan(4) - - var pipeline = pumpify( - through(function(data, enc, cb) { - t.same(data.toString(), 'hello') - cb(null, data.toString().toUpperCase()) - }), - through(function(data, enc, cb) { - t.same(data.toString(), 'HELLO') - cb(null, data.toString().toLowerCase()) - }), - through(function(data, enc, cb) { - t.same(data.toString(), 'hello') - cb(null, data.toString().toUpperCase()) - }) - ) - - pipeline.write('hello') - pipeline.on('data', function(data) { - t.same(data.toString(), 'HELLO') - t.end() - }) -}) - -tape('destroy', function(t) { - var test = through() - test.destroy = function() { - t.ok(true) - t.end() - } - - var pipeline = pumpify(through(), test) - - pipeline.destroy() -}) - -tape('close', function(t) { - var test = through() - var pipeline = pumpify(through(), test) - - pipeline.on('error', function(err) { - t.same(err.message, 'lol') - t.end() - }) - - test.emit('error', new Error('lol')) -}) - -tape('end waits for last one', function(t) { - var ran = false - - var a = through() - var b = through() - var c = through(function(data, enc, cb) { - setTimeout(function() { - ran = true - cb() - }, 100) - }) - - var pipeline = pumpify(a, b, c) - - pipeline.write('foo') - pipeline.end(function() { - t.ok(ran) - t.end() - }) - - t.ok(!ran) -}) - -tape('always wait for finish', function(t) { - var a = new stream.Readable() - a._read = function() {} - a.push('hello') - - var pipeline = pumpify(a, through(), through()) - var ran = false - - pipeline.on('finish', function() { - t.ok(ran) - t.end() - }) - - setTimeout(function() { - ran = true - a.push(null) - }, 100) -}) - -tape('async', function(t) { - var pipeline = pumpify() - - t.plan(4) - - pipeline.write('hello') - pipeline.on('data', function(data) { - t.same(data.toString(), 'HELLO') - t.end() - }) - - setTimeout(function() { - pipeline.setPipeline( - through(function(data, enc, cb) { - t.same(data.toString(), 'hello') - cb(null, data.toString().toUpperCase()) - }), - through(function(data, enc, cb) { - t.same(data.toString(), 'HELLO') - cb(null, data.toString().toLowerCase()) - }), - through(function(data, enc, cb) { - t.same(data.toString(), 'hello') - cb(null, data.toString().toUpperCase()) - }) - ) - }, 100) -}) - -tape('early destroy', function(t) { - var a = through() - var b = through() - var c = through() - - b.destroy = function() { - t.ok(true) - t.end() - } - - var pipeline = pumpify() - - pipeline.destroy() - setTimeout(function() { - pipeline.setPipeline(a, b, c) - }, 100) -}) - -tape('preserves error', function (t) { - var a = through() - var b = through(function (data, enc, cb) { - cb(new Error('stop')) - }) - var c = through() - var s = pumpify() - - s.on('error', function (err) { - t.same(err.message, 'stop') - t.end() - }) - - s.setPipeline(a, b, c) - s.resume() - s.write('hi') -}) - -tape('preserves error again', function (t) { - var ws = new stream.Writable() - var rs = new stream.Readable({highWaterMark: 16}) - - ws._write = function (data, enc, cb) { - cb(null) - } - - rs._read = function () { - process.nextTick(function () { - rs.push('hello world') - }) - } - - var pumpifyErr = pumpify( - through(), - through(function(chunk, _, cb) { - cb(new Error('test')) - }), - ws - ) - - rs.pipe(pumpifyErr) - .on('error', function (err) { - t.ok(err) - t.ok(err.message !== 'premature close', 'does not close with premature close') - t.end() - }) -}) - -tape('returns error from duplexify', function (t) { - var a = through() - var b = duplexify() - var s = pumpify() - - s.setPipeline(a, b) - - s.on('error', function (err) { - t.same(err.message, 'stop') - t.end() - }) - - s.write('data') - // Test passes if `.end()` is not called - s.end() - - b.setWritable(through()) - - setImmediate(function () { - b.destroy(new Error('stop')) - }) -}) diff --git a/node_modules/queue/.travis.yml b/node_modules/queue/.travis.yml deleted file mode 100644 index de0c4fac..00000000 --- a/node_modules/queue/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - "6" - - "node" -script: - - npm run travis - - npm run travis-ts \ No newline at end of file diff --git a/node_modules/queue/LICENSE b/node_modules/queue/LICENSE deleted file mode 100644 index 50e94609..00000000 --- a/node_modules/queue/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2014 Jesse Tane - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/queue/index.d.ts b/node_modules/queue/index.d.ts deleted file mode 100644 index 5437a3d2..00000000 --- a/node_modules/queue/index.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -// TypeScript definition for queue -// Provided by Hendrik 'Xendo' Meyer -// Licensed the same as the library itself -/* -Import via - - import {IQueue, IQueueWorker} from 'queue'; - var queue: IQueue = require('queue'); - - */ - -interface IQueue{ - (opts?:IQueueOptions): IQueue - push(...worker:IQueueWorker[]):number - start(callback?:(error?:Error) => void):void - stop():void - end(error?:Error):void - unshift(...worker:IQueueWorker[]):number - splice(index:number, deleteHowMany:number, ...worker:IQueueWorker[]):IQueue - pop():IQueueWorker|void - shift():IQueueWorker|void - slice(begin:number, end?:number):IQueue - reverse():IQueue - indexOf(searchElement:IQueueWorker, fromIndex?:number):number - lastIndexOf(searchElement:IQueueWorker, fromIndex?:number):number - concurrency:number - timeout:number - length:number - on(event:string, callback:IQueueEventCallback):void -} - -interface IQueueOptions { - concurrency?:number - timeout?:number - autostart?:boolean - results?:Array -} - -interface IQueueWorker { - (cb?:(err?:Error, data?:Object) => void):void -} - -interface IQueueEventCallback { - (data?:Object|Error|IQueueWorker, job?:IQueueWorker):void -} - -export {IQueue, IQueueEventCallback, IQueueOptions, IQueueWorker}; diff --git a/node_modules/queue/index.js b/node_modules/queue/index.js deleted file mode 100644 index 0c38dc88..00000000 --- a/node_modules/queue/index.js +++ /dev/null @@ -1,192 +0,0 @@ -var inherits = require('inherits') -var EventEmitter = require('events').EventEmitter - -module.exports = Queue - -function Queue (options) { - if (!(this instanceof Queue)) { - return new Queue(options) - } - - EventEmitter.call(this) - options = options || {} - this.concurrency = options.concurrency || Infinity - this.timeout = options.timeout || 0 - this.autostart = options.autostart || false - this.results = options.results || null - this.pending = 0 - this.session = 0 - this.running = false - this.jobs = [] - this.timers = {} -} -inherits(Queue, EventEmitter) - -var arrayMethods = [ - 'pop', - 'shift', - 'indexOf', - 'lastIndexOf' -] - -arrayMethods.forEach(function (method) { - Queue.prototype[method] = function () { - return Array.prototype[method].apply(this.jobs, arguments) - } -}) - -Queue.prototype.slice = function (begin, end) { - this.jobs = this.jobs.slice(begin, end) - return this -} - -Queue.prototype.reverse = function () { - this.jobs.reverse() - return this -} - -var arrayAddMethods = [ - 'push', - 'unshift', - 'splice' -] - -arrayAddMethods.forEach(function (method) { - Queue.prototype[method] = function () { - var methodResult = Array.prototype[method].apply(this.jobs, arguments) - if (this.autostart) { - this.start() - } - return methodResult - } -}) - -Object.defineProperty(Queue.prototype, 'length', { - get: function () { - return this.pending + this.jobs.length - } -}) - -Queue.prototype.start = function (cb) { - if (cb) { - callOnErrorOrEnd.call(this, cb) - } - - this.running = true - - if (this.pending >= this.concurrency) { - return - } - - if (this.jobs.length === 0) { - if (this.pending === 0) { - done.call(this) - } - return - } - - var self = this - var job = this.jobs.shift() - var once = true - var session = this.session - var timeoutId = null - var didTimeout = false - var resultIndex = null - - function next (err, result) { - if (once && self.session === session) { - once = false - self.pending-- - if (timeoutId !== null) { - delete self.timers[timeoutId] - clearTimeout(timeoutId) - } - - if (err) { - self.emit('error', err, job) - } else if (didTimeout === false) { - if (resultIndex !== null) { - self.results[resultIndex] = Array.prototype.slice.call(arguments, 1) - } - self.emit('success', result, job) - } - - if (self.session === session) { - if (self.pending === 0 && self.jobs.length === 0) { - done.call(self) - } else if (self.running) { - self.start() - } - } - } - } - - if (this.timeout) { - timeoutId = setTimeout(function () { - didTimeout = true - if (self.listeners('timeout').length > 0) { - self.emit('timeout', next, job) - } else { - next() - } - }, this.timeout) - this.timers[timeoutId] = timeoutId - } - - if (this.results) { - resultIndex = this.results.length - this.results[resultIndex] = null - } - - this.pending++ - var promise = job(next) - if (promise && promise.then && typeof promise.then === 'function') { - promise.then(function (result) { - return next(null, result) - }).catch(function (err) { - return next(err || true) - }) - } - - if (this.running && this.jobs.length > 0) { - this.start() - } -} - -Queue.prototype.stop = function () { - this.running = false -} - -Queue.prototype.end = function (err) { - clearTimers.call(this) - this.jobs.length = 0 - this.pending = 0 - done.call(this, err) -} - -function clearTimers () { - for (var key in this.timers) { - var timeoutId = this.timers[key] - delete this.timers[key] - clearTimeout(timeoutId) - } -} - -function callOnErrorOrEnd (cb) { - var self = this - this.on('error', onerror) - this.on('end', onend) - - function onerror (err) { self.end(err) } - function onend (err) { - self.removeListener('error', onerror) - self.removeListener('end', onend) - cb(err, this.results) - } -} - -function done (err) { - this.session++ - this.running = false - this.emit('end', err) -} diff --git a/node_modules/queue/package.json b/node_modules/queue/package.json deleted file mode 100644 index 289e8019..00000000 --- a/node_modules/queue/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "_from": "queue@^4.2.1", - "_id": "queue@4.5.1", - "_inBundle": false, - "_integrity": "sha512-AMD7w5hRXcFSb8s9u38acBZ+309u6GsiibP4/0YacJeaurRshogB7v/ZcVPxP5gD5+zIw6ixRHdutiYUJfwKHw==", - "_location": "/queue", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "queue@^4.2.1", - "name": "queue", - "escapedName": "queue", - "rawSpec": "^4.2.1", - "saveSpec": null, - "fetchSpec": "^4.2.1" - }, - "_requiredBy": [ - "/gulp-vinyl-zip" - ], - "_resolved": "https://registry.npmjs.org/queue/-/queue-4.5.1.tgz", - "_shasum": "6e4290a2d7e99dc75b34494431633fe5437b0dac", - "_spec": "queue@^4.2.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/gulp-vinyl-zip", - "author": { - "name": "Jesse Tane", - "email": "jesse.tane@gmail.com" - }, - "bugs": { - "url": "https://github.com/jessetane/queue/issues" - }, - "bundleDependencies": false, - "dependencies": { - "inherits": "~2.0.0" - }, - "deprecated": false, - "description": "asynchronous function queue with adjustable concurrency", - "devDependencies": { - "browserify": "^5.9.1", - "coveralls": "^2.11.2", - "istanbul": "^0.3.2", - "standard": "^8.6.0", - "tape": "^2.14.0", - "typescript": "^1.8.9" - }, - "homepage": "https://github.com/jessetane/queue#readme", - "keywords": [ - "queue", - "async", - "asynchronous", - "synchronous", - "job", - "task", - "concurrency", - "concurrent" - ], - "license": "MIT", - "name": "queue", - "repository": { - "type": "git", - "url": "git+https://github.com/jessetane/queue.git" - }, - "scripts": { - "example": "node example", - "lint": "standard", - "test": "standard && node test", - "test-browser": "standard && browserify test/index.js > test/bundle.js && echo \"open test/index.html in your browser\"", - "travis": "standard && istanbul cover test --report lcovonly && cat coverage/lcov.info | coveralls", - "travis-ts": "tsc test/typescript.ts --out /dev/null && echo 'TypeScript compilation passed.'" - }, - "version": "4.5.1" -} diff --git a/node_modules/queue/readme.md b/node_modules/queue/readme.md deleted file mode 100644 index d0ea8ac2..00000000 --- a/node_modules/queue/readme.md +++ /dev/null @@ -1,186 +0,0 @@ -``` - ____ __ _____ __ _____ - / __ `/ / / / _ \/ / / / _ \ - / /_/ / /_/ / __/ /_/ / __/ - \__, /\__,_/\___/\__,_/\___/ - /_/ -``` -Asynchronous function queue with adjustable concurrency. - -[![npm](http://img.shields.io/npm/v/queue.svg?style=flat-square)](http://www.npmjs.org/queue) -[![tests](https://img.shields.io/travis/jessetane/queue.svg?style=flat-square&branch=master)](https://travis-ci.org/jessetane/queue) -[![coverage](https://img.shields.io/coveralls/jessetane/queue.svg?style=flat-square&branch=master)](https://coveralls.io/r/jessetane/queue) - -This module exports a class `Queue` that implements most of the `Array` API. Pass async functions (ones that accept a callback or return a promise) to an instance's additive array methods. Processing begins when you call `q.start()`. - -## Example -`npm run example` -``` javascript -var queue = require('../') - -var q = queue() -var results = [] - -// add jobs using the familiar Array API -q.push(function (cb) { - results.push('two') - cb() -}) - -q.push( - function (cb) { - results.push('four') - cb() - }, - function (cb) { - results.push('five') - cb() - } -) - -// jobs can accept a callback or return a promise -q.push(function () { - return new Promise(function (resolve, reject) { - results.push('one') - resolve() - }) -}) - -q.unshift(function (cb) { - results.push('one') - cb() -}) - -q.splice(2, 0, function (cb) { - results.push('three') - cb() -}) - -// use the timeout feature to deal with jobs that -// take too long or forget to execute a callback -q.timeout = 100 - -q.on('timeout', function (next, job) { - console.log('job timed out:', job.toString().replace(/\n/g, '')) - next() -}) - -q.push(function (cb) { - setTimeout(function () { - console.log('slow job finished') - cb() - }, 200) -}) - -q.push(function (cb) { - console.log('forgot to execute callback') -}) - -// get notified when jobs complete -q.on('success', function (result, job) { - console.log('job finished processing:', job.toString().replace(/\n/g, '')) -}) - -// begin processing, get notified on end / failure -q.start(function (err) { - if (err) throw err - console.log('all done:', results) -}) -``` - -## Install -`npm install queue` - -## Test -`npm test` -`npm run test-browser` - -## API - -### `var q = queue([opts])` -Constructor. `opts` may contain inital values for: -* `q.concurrency` -* `q.timeout` -* `q.autostart` -* `q.results` - -## Instance methods -### `q.start([cb])` -cb, if passed, will be called when the queue empties or when an error occurs. - -### `q.stop()` -Stops the queue. can be resumed with `q.start()`. - -### `q.end([err])` -Stop and empty the queue immediately. - -## Instance methods mixed in from `Array` -Mozilla has docs on how these methods work [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array). Note that `slice` does not copy the queue. -### `q.push(element1, ..., elementN)` -### `q.unshift(element1, ..., elementN)` -### `q.splice(index , howMany[, element1[, ...[, elementN]]])` -### `q.pop()` -### `q.shift()` -### `q.slice(begin[, end])` -### `q.reverse()` -### `q.indexOf(searchElement[, fromIndex])` -### `q.lastIndexOf(searchElement[, fromIndex])` - -## Properties -### `q.concurrency` -Max number of jobs the queue should process concurrently, defaults to `Infinity`. - -### `q.timeout` -Milliseconds to wait for a job to execute its callback. - -### `q.autostart` -Ensures the queue is always running if jobs are available. Useful in situations where you are using a queue only for concurrency control. - -### `q.results` -An array to set job callback arguments on. - -### `q.length` -Jobs pending + jobs to process (readonly). - -## Events - -### `q.emit('success', result, job)` -After a job executes its callback. - -### `q.emit('error', err, job)` -After a job passes an error to its callback. - -### `q.emit('timeout', continue, job)` -After `q.timeout` milliseconds have elapsed and a job has not executed its callback. - -### `q.emit('end'[, err])` -After all jobs have been processed - -## Releases -The latest stable release is published to [npm](http://npmjs.org/queue). Abbreviated changelog below: -* [4.4](https://github.com/jessetane/queue/archive/4.4.0.tar.gz) - * Add results feature -* [4.3](https://github.com/jessetane/queue/archive/4.3.0.tar.gz) - * Add promise support (@kwolfy) -* [4.2](https://github.com/jessetane/queue/archive/4.2.0.tar.gz) - * Unref timers on end -* [4.1](https://github.com/jessetane/queue/archive/4.1.0.tar.gz) - * Add autostart feature -* [4.0](https://github.com/jessetane/queue/archive/4.0.0.tar.gz) - * Change license to MIT -* [3.1.x](https://github.com/jessetane/queue/archive/3.0.6.tar.gz) - * Add .npmignore -* [3.0.x](https://github.com/jessetane/queue/archive/3.0.6.tar.gz) - * Change the default concurrency to `Infinity` - * Allow `q.start()` to accept an optional callback executed on `q.emit('end')` -* [2.x](https://github.com/jessetane/queue/archive/2.2.0.tar.gz) - * Major api changes / not backwards compatible with 1.x -* [1.x](https://github.com/jessetane/queue/archive/1.0.2.tar.gz) - * Early prototype - -## License -Copyright © 2014 Jesse Tane - -This work is free. You can redistribute it and/or modify it under the -terms of the [MIT License](https://opensource.org/licenses/MIT). -See LICENSE for full details. diff --git a/node_modules/quick-format-unescaped/.github/workflows/ci.yml b/node_modules/quick-format-unescaped/.github/workflows/ci.yml deleted file mode 100644 index 7814959b..00000000 --- a/node_modules/quick-format-unescaped/.github/workflows/ci.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: CI Tests - -on: - - pull_request - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [10.x, 12.x, 13.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: npm i && npm test diff --git a/node_modules/quick-format-unescaped/LICENSE b/node_modules/quick-format-unescaped/LICENSE deleted file mode 100644 index fc6d3139..00000000 --- a/node_modules/quick-format-unescaped/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016-2019 David Mark Clements - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/quick-format-unescaped/benchmark.js b/node_modules/quick-format-unescaped/benchmark.js deleted file mode 100644 index 73e3b4b2..00000000 --- a/node_modules/quick-format-unescaped/benchmark.js +++ /dev/null @@ -1,24 +0,0 @@ -var bench = require('fastbench') -var utilFormat = require('util').format -var quickFormat = require('./') - -var run = bench([ - function util(cb) { - utilFormat('%s %j %d', 'a', {a: {x: 1}}, 1) - setImmediate(cb) - }, - function quick(cb) { - quickFormat('%s %j %d', 'a', [{a: {x: 1}}, 1], null) - setImmediate(cb) - }, - function utilWithTailObj(cb) { - utilFormat('hello %s %j %d', 'world', {obj: true}, 4, {another: 'obj'}) - setImmediate(cb) - }, - function quickWithTailObj(cb) { - quickFormat('hello %s %j %d', 'world', [{obj: true}, 4, {another: 'obj'}], null) - setImmediate(cb) - } -], 100000) - -run(run) diff --git a/node_modules/quick-format-unescaped/index.js b/node_modules/quick-format-unescaped/index.js deleted file mode 100644 index 119a894d..00000000 --- a/node_modules/quick-format-unescaped/index.js +++ /dev/null @@ -1,107 +0,0 @@ -'use strict' -function tryStringify (o) { - try { return JSON.stringify(o) } catch(e) { return '"[Circular]"' } -} - -module.exports = format - -function format(f, args, opts) { - var ss = (opts && opts.stringify) || tryStringify - var offset = 1 - if (typeof f === 'object' && f !== null) { - var len = args.length + offset - if (len === 1) return f - var objects = new Array(len) - objects[0] = ss(f) - for (var index = 1; index < len; index++) { - objects[index] = ss(args[index]) - } - return objects.join(' ') - } - if (typeof f !== 'string') { - return f - } - var argLen = args.length - if (argLen === 0) return f - var str = '' - var a = 1 - offset - var lastPos = -1 - var flen = (f && f.length) || 0 - for (var i = 0; i < flen;) { - if (f.charCodeAt(i) === 37 && i + 1 < flen) { - lastPos = lastPos > -1 ? lastPos : 0 - switch (f.charCodeAt(i + 1)) { - case 100: // 'd' - case 102: // 'f' - if (a >= argLen) - break - if (lastPos < i) - str += f.slice(lastPos, i) - if (args[a] == null) break - str += Number(args[a]) - lastPos = i = i + 2 - break - case 105: // 'i' - if (a >= argLen) - break - if (lastPos < i) - str += f.slice(lastPos, i) - if (args[a] == null) break - str += Math.floor(Number(args[a])) - lastPos = i = i + 2 - break - case 79: // 'O' - case 111: // 'o' - case 106: // 'j' - if (a >= argLen) - break - if (lastPos < i) - str += f.slice(lastPos, i) - if (args[a] === undefined) break - var type = typeof args[a] - if (type === 'string') { - str += '\'' + args[a] + '\'' - lastPos = i + 2 - i++ - break - } - if (type === 'function') { - str += args[a].name || '' - lastPos = i + 2 - i++ - break - } - str += ss(args[a]) - lastPos = i + 2 - i++ - break - case 115: // 's' - if (a >= argLen) - break - if (lastPos < i) - str += f.slice(lastPos, i) - str += String(args[a]) - lastPos = i + 2 - i++ - break - case 37: // '%' - if (lastPos < i) - str += f.slice(lastPos, i) - str += '%' - lastPos = i + 2 - i++ - a-- - break - } - ++a - } - ++i - } - if (lastPos === -1) - return f - else if (lastPos < flen) { - str += f.slice(lastPos) - } - - return str -} diff --git a/node_modules/quick-format-unescaped/package.json b/node_modules/quick-format-unescaped/package.json deleted file mode 100644 index c6ca6cf3..00000000 --- a/node_modules/quick-format-unescaped/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "_from": "quick-format-unescaped@^4.0.3", - "_id": "quick-format-unescaped@4.0.3", - "_inBundle": false, - "_integrity": "sha512-MaL/oqh02mhEo5m5J2rwsVL23Iw2PEaGVHgT2vFt8AAsr0lfvQA5dpXo9TPu0rz7tSBdUPgkbam0j/fj5ZM8yg==", - "_location": "/quick-format-unescaped", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "quick-format-unescaped@^4.0.3", - "name": "quick-format-unescaped", - "escapedName": "quick-format-unescaped", - "rawSpec": "^4.0.3", - "saveSpec": null, - "fetchSpec": "^4.0.3" - }, - "_requiredBy": [ - "/pino" - ], - "_resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.3.tgz", - "_shasum": "6d6b66b8207aa2b35eef12be1421bb24c428f652", - "_spec": "quick-format-unescaped@^4.0.3", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pino", - "author": { - "name": "David Mark Clements" - }, - "bugs": { - "url": "https://github.com/davidmarkclements/quick-format/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Solves a problem with util.format", - "devDependencies": { - "fastbench": "^1.0.1", - "nyc": "^15.0.0" - }, - "directories": { - "test": "test" - }, - "homepage": "https://github.com/davidmarkclements/quick-format#readme", - "keywords": [], - "license": "MIT", - "main": "index.js", - "name": "quick-format-unescaped", - "repository": { - "type": "git", - "url": "git+https://github.com/davidmarkclements/quick-format.git" - }, - "scripts": { - "test": "nyc -- node test", - "test:html": "nyc --reporter=html -- node test" - }, - "version": "4.0.3" -} diff --git a/node_modules/quick-format-unescaped/readme.md b/node_modules/quick-format-unescaped/readme.md deleted file mode 100644 index 653ddd19..00000000 --- a/node_modules/quick-format-unescaped/readme.md +++ /dev/null @@ -1,66 +0,0 @@ -# quick-format-unescaped - -## unescaped ? - -Sometimes you want to embed the results of quick-format into another string, -and then escape the whole string. - -## usage - -```js -var format = require('quick-format-unescaped') -format('hello %s %j %d', ['world', [{obj: true}, 4, {another: 'obj'}]]) -``` - -## format(fmt, parameters, [options]) - -### fmt - -A `printf`-like format string. Example: `'hello %s %j %d'` - -### parameters - -Array of values to be inserted into the `format` string. Example: `['world', {obj:true}]` - -### options.stringify - -Passing an options object as the third parameter with a `stringify` will mean -any objects will be passed to the supplied function instead of an the -internal `tryStringify` function. This can be useful when using augmented -capability serializers such as [`fast-safe-stringify`](http://github.com/davidmarkclements/fast-safe-stringify) or [`fast-redact`](http://github.com/davidmarkclements/fast-redact). - -## caveats - -By default `quick-format-unescaped` uses `JSON.stringify` instead of `util.inspect`, this means functions *will not be serialized*. - -## Benchmarks - -### Node 8.11.2 - -``` -util*100000: 350.325ms -quick*100000: 268.141ms -utilWithTailObj*100000: 586.387ms -quickWithTailObj*100000: 280.200ms -util*100000: 325.735ms -quick*100000: 270.251ms -utilWithTailObj*100000: 492.270ms -quickWithTailObj*100000: 261.797ms -``` - -### Node 10.4.0 - -``` -util*100000: 301.035ms -quick*100000: 217.005ms -utilWithTailObj*100000: 404.778ms -quickWithTailObj*100000: 236.176ms -util*100000: 286.349ms -quick*100000: 214.646ms -utilWithTailObj*100000: 388.574ms -quickWithTailObj*100000: 226.036ms -``` - -## Acknowledgements - -Sponsored by [nearForm](http://www.nearform.com) diff --git a/node_modules/quick-format-unescaped/test/index.js b/node_modules/quick-format-unescaped/test/index.js deleted file mode 100644 index b354aeb2..00000000 --- a/node_modules/quick-format-unescaped/test/index.js +++ /dev/null @@ -1,109 +0,0 @@ -'use strict'; -const assert = require('assert'); -const format = require('../'); - -// assert.equal(format([]), ''); -// assert.equal(format(['']), ''); -// assert.equal(format([[]]), '[]'); -// assert.equal(format([{}]), '{}'); -// assert.equal(format([null]), 'null'); -// assert.equal(format([true]), 'true'); -// assert.equal(format([false]), 'false'); -// assert.equal(format(['test']), 'test'); - -// // // CHECKME this is for console.log() compatibility - but is it *right*? -// assert.equal(format(['foo', 'bar', 'baz']), 'foo bar baz'); - -const emptyObj = {} -assert.equal(format(emptyObj, []), emptyObj) -assert.equal(format(emptyObj, ['a', 'b', 'c']), '{} "b" "c" ') -assert.equal(format('', ['a']), '') - -// ES6 Symbol handling -const symbol = Symbol('foo') -assert.equal(format(null, [symbol]), null); -assert.equal(format('foo', [symbol]), 'foo'); -assert.equal(format('%s', [symbol]), 'Symbol(foo)'); -assert.equal(format('%j', [symbol]), 'undefined'); -assert.throws(function() { - format('%d', [symbol]); -}, TypeError); - -assert.equal(format('%d', [42.0]), '42'); -assert.equal(format('%d', [42]), '42'); -assert.equal(format('%f', [42.99]), '42.99'); -assert.equal(format('%i', [42.99]), '42'); -assert.equal(format('%s', [42]), '42'); -assert.equal(format('%j', [42]), '42'); - -assert.equal(format('%d', [undefined]), '%d'); -assert.equal(format('%s', [undefined]), 'undefined'); -assert.equal(format('%j', [undefined]), '%j'); - - -assert.equal(format('%d', [null]), '%d'); -assert.equal(format('%i', [null]), '%i'); -assert.equal(format('%s', [null]), 'null'); -assert.equal(format('%j', [null]), 'null'); - - -assert.equal(format('%d', ['42.0']), '42'); -assert.equal(format('%d', ['42']), '42'); -assert.equal(format('%i', ['42']), '42'); -assert.equal(format('%i', ['42.99']), '42'); -assert.equal(format('%s %i', ['foo', 42.99]), 'foo 42'); -assert.equal(format('%d %d', ['42']), '42 %d'); -assert.equal(format('%i %i', ['42']), '42 %i'); -assert.equal(format('%i %i', ['42.99']), '42 %i'); -assert.equal(format('foo %d', ['42']), 'foo 42'); -assert.equal(format('%s', ['42']), '42'); -// assert.equal(format('%j', ['42']), '"42"'); - -// assert.equal(format('%%s%s', ['foo']), '%sfoo'); - -assert.equal(format('%s', []), '%s'); -assert.equal(format('%s', [undefined]), 'undefined'); -assert.equal(format('%s', ['foo']), 'foo'); -assert.equal(format('%s', ['\"quoted\"']), '\"quoted\"'); -assert.equal(format('%j', [{ s: '\"quoted\"' }]), '{\"s\":\"\\"quoted\\"\"}'); -assert.equal(format('%s:%s', []), '%s:%s'); -assert.equal(format('%s:%s', [undefined]), 'undefined:%s'); -assert.equal(format('%s:%s', ['foo']), 'foo:%s'); -assert.equal(format('%s:%s', ['foo', 'bar']), 'foo:bar'); -assert.equal(format('%s:%s', ['foo', 'bar', 'baz']), 'foo:bar'); -assert.equal(format('%s%s', []), '%s%s'); -assert.equal(format('%s%s', [undefined]), 'undefined%s'); -assert.equal(format('%s%s', ['foo']), 'foo%s'); -assert.equal(format('%s%s', ['foo', 'bar']), 'foobar'); -assert.equal(format('%s%s', ['foo', 'bar', 'baz']), 'foobar'); - -assert.equal(format('foo %s', ['foo']), 'foo foo') - -assert.equal(format('foo %o', [{foo: 'foo'}]), 'foo {"foo":"foo"}') -assert.equal(format('foo %O', [{foo: 'foo'}]), 'foo {"foo":"foo"}') -assert.equal(format('foo %j', [{foo: 'foo'}]), 'foo {"foo":"foo"}') -assert.equal(format('foo %j %j', [{foo: 'foo'}]), 'foo {"foo":"foo"} %j') -assert.equal(format('foo %j', ['foo']), 'foo \'foo\'') // TODO: isn't this wrong? -assert.equal(format('foo %j', [function foo () {}]), 'foo foo') -assert.equal(format('foo %j', [function () {}]), 'foo ') -assert.equal(format('foo %j', [{foo: 'foo'}, 'not-printed']), 'foo {"foo":"foo"}') -assert.equal( - format('foo %j', [{ foo: 'foo' }], { stringify () { return 'REPLACED' } }), - 'foo REPLACED' -) -const circularObject = {} -circularObject.foo = circularObject -assert.equal(format('foo %j', [circularObject]), 'foo "[Circular]"') - -// // assert.equal(format(['%%%s%%', 'hi']), '%hi%'); -// // assert.equal(format(['%%%s%%%%', 'hi']), '%hi%%'); - -// (function() { -// var o = {}; -// o.o = o; -// assert.equal(format(['%j', o]), '[Circular]'); -// })(); - -assert.equal(format('%%', ['foo']), '%') -assert.equal(format('foo %%', ['foo']), 'foo %') -assert.equal(format('foo %% %s', ['bar']), 'foo % bar') diff --git a/node_modules/quick-lru/index.d.ts b/node_modules/quick-lru/index.d.ts deleted file mode 100644 index c382e51b..00000000 --- a/node_modules/quick-lru/index.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -declare namespace QuickLRU { - interface Options { - /** - The maximum number of items before evicting the least recently used items. - */ - readonly maxSize: number; - } -} - -declare class QuickLRU - implements Iterable<[KeyType, ValueType]> { - /** - The stored item count. - */ - readonly size: number; - - /** - Simple ["Least Recently Used" (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29). - - The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop. - - @example - ``` - import QuickLRU = require('quick-lru'); - - const lru = new QuickLRU({maxSize: 1000}); - - lru.set('🦄', '🌈'); - - lru.has('🦄'); - //=> true - - lru.get('🦄'); - //=> '🌈' - ``` - */ - constructor(options: QuickLRU.Options); - - [Symbol.iterator](): IterableIterator<[KeyType, ValueType]>; - - /** - Set an item. - - @returns The list instance. - */ - set(key: KeyType, value: ValueType): this; - - /** - Get an item. - - @returns The stored item or `undefined`. - */ - get(key: KeyType): ValueType | undefined; - - /** - Check if an item exists. - */ - has(key: KeyType): boolean; - - /** - Get an item without marking it as recently used. - - @returns The stored item or `undefined`. - */ - peek(key: KeyType): ValueType | undefined; - - /** - Delete an item. - - @returns `true` if the item is removed or `false` if the item doesn't exist. - */ - delete(key: KeyType): boolean; - - /** - Delete all items. - */ - clear(): void; - - /** - Iterable for all the keys. - */ - keys(): IterableIterator; - - /** - Iterable for all the values. - */ - values(): IterableIterator; -} - -export = QuickLRU; diff --git a/node_modules/quick-lru/index.js b/node_modules/quick-lru/index.js deleted file mode 100644 index b7b17606..00000000 --- a/node_modules/quick-lru/index.js +++ /dev/null @@ -1,115 +0,0 @@ -'use strict'; - -class QuickLRU { - constructor(options = {}) { - if (!(options.maxSize && options.maxSize > 0)) { - throw new TypeError('`maxSize` must be a number greater than 0'); - } - - this.maxSize = options.maxSize; - this.cache = new Map(); - this.oldCache = new Map(); - this._size = 0; - } - - _set(key, value) { - this.cache.set(key, value); - this._size++; - - if (this._size >= this.maxSize) { - this._size = 0; - this.oldCache = this.cache; - this.cache = new Map(); - } - } - - get(key) { - if (this.cache.has(key)) { - return this.cache.get(key); - } - - if (this.oldCache.has(key)) { - const value = this.oldCache.get(key); - this.oldCache.delete(key); - this._set(key, value); - return value; - } - } - - set(key, value) { - if (this.cache.has(key)) { - this.cache.set(key, value); - } else { - this._set(key, value); - } - - return this; - } - - has(key) { - return this.cache.has(key) || this.oldCache.has(key); - } - - peek(key) { - if (this.cache.has(key)) { - return this.cache.get(key); - } - - if (this.oldCache.has(key)) { - return this.oldCache.get(key); - } - } - - delete(key) { - const deleted = this.cache.delete(key); - if (deleted) { - this._size--; - } - - return this.oldCache.delete(key) || deleted; - } - - clear() { - this.cache.clear(); - this.oldCache.clear(); - this._size = 0; - } - - * keys() { - for (const [key] of this) { - yield key; - } - } - - * values() { - for (const [, value] of this) { - yield value; - } - } - - * [Symbol.iterator]() { - for (const item of this.cache) { - yield item; - } - - for (const item of this.oldCache) { - const [key] = item; - if (!this.cache.has(key)) { - yield item; - } - } - } - - get size() { - let oldCacheSize = 0; - for (const key of this.oldCache.keys()) { - if (!this.cache.has(key)) { - oldCacheSize++; - } - } - - return this._size + oldCacheSize; - } -} - -module.exports = QuickLRU; diff --git a/node_modules/quick-lru/license b/node_modules/quick-lru/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/quick-lru/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/quick-lru/package.json b/node_modules/quick-lru/package.json deleted file mode 100644 index 726d1937..00000000 --- a/node_modules/quick-lru/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "quick-lru@^4.0.1", - "_id": "quick-lru@4.0.1", - "_inBundle": false, - "_integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", - "_location": "/quick-lru", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "quick-lru@^4.0.1", - "name": "quick-lru", - "escapedName": "quick-lru", - "rawSpec": "^4.0.1", - "saveSpec": null, - "fetchSpec": "^4.0.1" - }, - "_requiredBy": [ - "/camelcase-keys" - ], - "_resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "_shasum": "5b8878f113a58217848c6482026c73e1ba57727f", - "_spec": "quick-lru@^4.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/camelcase-keys", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/quick-lru/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Simple \"Least Recently Used\" (LRU) cache", - "devDependencies": { - "ava": "^1.4.1", - "coveralls": "^3.0.3", - "nyc": "^14.1.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/sindresorhus/quick-lru#readme", - "keywords": [ - "lru", - "quick", - "cache", - "caching", - "least", - "recently", - "used", - "fast", - "map", - "hash", - "buffer" - ], - "license": "MIT", - "name": "quick-lru", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/quick-lru.git" - }, - "scripts": { - "test": "xo && nyc ava && tsd" - }, - "version": "4.0.1" -} diff --git a/node_modules/quick-lru/readme.md b/node_modules/quick-lru/readme.md deleted file mode 100644 index 2b87001c..00000000 --- a/node_modules/quick-lru/readme.md +++ /dev/null @@ -1,93 +0,0 @@ -# quick-lru [![Build Status](https://travis-ci.org/sindresorhus/quick-lru.svg?branch=master)](https://travis-ci.org/sindresorhus/quick-lru) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/quick-lru/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/quick-lru?branch=master) - -> Simple ["Least Recently Used" (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29) - -Useful when you need to cache something and limit memory usage. - -Inspired by the [`hashlru` algorithm](https://github.com/dominictarr/hashlru#algorithm), but instead uses [`Map`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map) to support keys of any type, not just strings, and values can be `undefined`. - - -## Install - -``` -$ npm install quick-lru -``` - - -## Usage - -```js -const QuickLRU = require('quick-lru'); - -const lru = new QuickLRU({maxSize: 1000}); - -lru.set('🦄', '🌈'); - -lru.has('🦄'); -//=> true - -lru.get('🦄'); -//=> '🌈' -``` - - -## API - -### new QuickLRU(options?) - -Returns a new instance. - -### options - -Type: `object` - -#### maxSize - -*Required*
    -Type: `number` - -The maximum number of items before evicting the least recently used items. - -### Instance - -The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop. - -Both `key` and `value` can be of any type. - -#### .set(key, value) - -Set an item. Returns the instance. - -#### .get(key) - -Get an item. - -#### .has(key) - -Check if an item exists. - -#### .peek(key) - -Get an item without marking it as recently used. - -#### .delete(key) - -Delete an item. - -Returns `true` if the item is removed or `false` if the item doesn't exist. - -#### .clear() - -Delete all items. - -#### .keys() - -Iterable for all the keys. - -#### .values() - -Iterable for all the values. - -#### .size - -The stored item count. diff --git a/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58d..00000000 --- a/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/readable-stream/GOVERNANCE.md b/node_modules/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93f..00000000 --- a/node_modules/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### Streams Working Group - -The Node.js Streams is jointly governed by a Working Group -(WG) -that is responsible for high-level guidance of the project. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Conduct guidelines -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project -[README.md](./README.md#current-project-team-members). - -### Collaborators - -The readable-stream GitHub repository is -maintained by the WG and additional Collaborators who are added by the -WG on an ongoing basis. - -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the WG and their addition as -Collaborators is discussed during the WG meeting. - -_Note:_ If you make a significant contribution and are not considered -for commit-access log an issue or contact a WG member directly and it -will be brought up in the next WG meeting. - -Modifications of the contents of the readable-stream repository are -made on -a collaborative basis. Anybody with a GitHub account may propose a -modification via pull request and it will be considered by the project -Collaborators. All pull requests must be reviewed and accepted by a -Collaborator with sufficient expertise who is able to take full -responsibility for the change. In the case of pull requests proposed -by an existing Collaborator, an additional Collaborator is required -for sign-off. Consensus should be sought if additional Collaborators -participate and there is disagreement around a particular -modification. See _Consensus Seeking Process_ below for further detail -on the consensus model used for governance. - -Collaborators may opt to elevate significant or controversial -modifications, or modifications that have not found consensus to the -WG for discussion by assigning the ***WG-agenda*** tag to a pull -request or issue. The WG should serve as the final arbiter where -required. - -For the current list of Collaborators, see the project -[README.md](./README.md#members). - -### WG Membership - -WG seats are not time-limited. There is no fixed size of the WG. -However, the expected target is between 6 and 12, to ensure adequate -coverage of important areas of expertise, balanced with the ability to -make decisions efficiently. - -There is no specific set of requirements or qualifications for WG -membership beyond these rules. - -The WG may add additional members to the WG by unanimous consensus. - -A WG member may be removed from the WG by voluntary resignation, or by -unanimous consensus of all other WG members. - -Changes to WG membership should be posted in the agenda, and may be -suggested as any other agenda item (see "WG Meetings" below). - -If an addition or removal is proposed during a meeting, and the full -WG is not in attendance to participate, then the addition or removal -is added to the agenda for the subsequent meeting. This is to ensure -that all members are given the opportunity to participate in all -membership decisions. If a WG member is unable to attend a meeting -where a planned membership decision is being made, then their consent -is assumed. - -No more than 1/3 of the WG members may be affiliated with the same -employer. If removal or resignation of a WG member, or a change of -employment by a WG member, creates a situation where more than 1/3 of -the WG membership shares an employer, then the situation must be -immediately remedied by the resignation or removal of one or more WG -members affiliated with the over-represented employer(s). - -### WG Meetings - -The WG meets occasionally on a Google Hangout On Air. A designated moderator -approved by the WG runs the meeting. Each meeting should be -published to YouTube. - -Items are added to the WG agenda that are considered contentious or -are modifications of governance, contribution policy, WG membership, -or release process. - -The intention of the agenda is not to approve or review all patches; -that should happen continuously on GitHub and be handled by the larger -group of Collaborators. - -Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, -WG member or the moderator can add the item to the agenda by adding -the ***WG-agenda*** tag to the issue. - -Prior to each WG meeting the moderator will share the Agenda with -members of the WG. WG members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the WG -cannot veto or remove items. - -The WG may invite persons or representatives from certain projects to -participate in a non-voting capacity. - -The moderator is responsible for summarizing the discussion of each -agenda item and sends it as a pull request after the meeting. - -### Consensus Seeking Process - -The WG follows a -[Consensus -Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) -decision-making model. - -When an agenda item has appeared to reach a consensus the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. - -If an agenda item cannot reach a consensus a WG member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be seconded by a majority of the WG -or else the discussion will continue. Simple majority wins. - -Note that changes to WG membership require a majority consensus. See -"WG Membership" above. diff --git a/node_modules/readable-stream/LICENSE b/node_modules/readable-stream/LICENSE deleted file mode 100644 index 2873b3b2..00000000 --- a/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" diff --git a/node_modules/readable-stream/README.md b/node_modules/readable-stream/README.md deleted file mode 100644 index 6f035ab1..00000000 --- a/node_modules/readable-stream/README.md +++ /dev/null @@ -1,106 +0,0 @@ -# readable-stream - -***Node.js core streams for userland*** [![Build Status](https://travis-ci.com/nodejs/readable-stream.svg?branch=master)](https://travis-ci.com/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readabe-stream.svg)](https://saucelabs.com/u/readabe-stream) - -```bash -npm install --save readable-stream -``` - -This package is a mirror of the streams implementations in Node.js. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.19.0/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -## Version 3.x.x - -v3.x.x of `readable-stream` is a cut from Node 10. This version supports Node 6, 8, and 10, as well as evergreen browsers, IE 11 and latest Safari. The breaking changes introduced by v3 are composed by the combined breaking changes in [Node v9](https://nodejs.org/en/blog/release/v9.0.0/) and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows: - -1. Error codes: https://github.com/nodejs/node/pull/13310, - https://github.com/nodejs/node/pull/13291, - https://github.com/nodejs/node/pull/16589, - https://github.com/nodejs/node/pull/15042, - https://github.com/nodejs/node/pull/15665, - https://github.com/nodejs/readable-stream/pull/344 -2. 'readable' have precedence over flowing - https://github.com/nodejs/node/pull/18994 -3. make virtual methods errors consistent - https://github.com/nodejs/node/pull/18813 -4. updated streams error handling - https://github.com/nodejs/node/pull/18438 -5. writable.end should return this. - https://github.com/nodejs/node/pull/18780 -6. readable continues to read when push('') - https://github.com/nodejs/node/pull/18211 -7. add custom inspect to BufferList - https://github.com/nodejs/node/pull/17907 -8. always defer 'readable' with nextTick - https://github.com/nodejs/node/pull/17979 - -## Version 2.x.x -v2.x.x of `readable-stream` is a cut of the stream module from Node 8 (there have been no semver-major changes from Node 4 to 8). This version supports all Node.js versions from 0.8, as well as evergreen browsers and IE 10 & 11. - -### Big Thanks - -Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs][sauce] - -# Usage - -You can swap your `require('stream')` with `require('readable-stream')` -without any changes, if you are just using one of the main classes and -functions. - -```js -const { - Readable, - Writable, - Transform, - Duplex, - pipeline, - finished -} = require('readable-stream') -```` - -Note that `require('stream')` will return `Stream`, while -`require('readable-stream')` will return `Readable`. We discourage using -whatever is exported directly, but rather use one of the properties as -shown in the example above. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - - -## Team Members - -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E -* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> -* **Yoshua Wyuts** ([@yoshuawuyts](https://github.com/yoshuawuyts)) <yoshuawuyts@gmail.com> - -[sauce]: https://saucelabs.com diff --git a/node_modules/readable-stream/errors-browser.js b/node_modules/readable-stream/errors-browser.js deleted file mode 100644 index fb8e73e1..00000000 --- a/node_modules/readable-stream/errors-browser.js +++ /dev/null @@ -1,127 +0,0 @@ -'use strict'; - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } - -var codes = {}; - -function createErrorType(code, message, Base) { - if (!Base) { - Base = Error; - } - - function getMessage(arg1, arg2, arg3) { - if (typeof message === 'string') { - return message; - } else { - return message(arg1, arg2, arg3); - } - } - - var NodeError = - /*#__PURE__*/ - function (_Base) { - _inheritsLoose(NodeError, _Base); - - function NodeError(arg1, arg2, arg3) { - return _Base.call(this, getMessage(arg1, arg2, arg3)) || this; - } - - return NodeError; - }(Base); - - NodeError.prototype.name = Base.name; - NodeError.prototype.code = code; - codes[code] = NodeError; -} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js - - -function oneOf(expected, thing) { - if (Array.isArray(expected)) { - var len = expected.length; - expected = expected.map(function (i) { - return String(i); - }); - - if (len > 2) { - return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(', '), ", or ") + expected[len - 1]; - } else if (len === 2) { - return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]); - } else { - return "of ".concat(thing, " ").concat(expected[0]); - } - } else { - return "of ".concat(thing, " ").concat(String(expected)); - } -} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith - - -function startsWith(str, search, pos) { - return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; -} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith - - -function endsWith(str, search, this_len) { - if (this_len === undefined || this_len > str.length) { - this_len = str.length; - } - - return str.substring(this_len - search.length, this_len) === search; -} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes - - -function includes(str, search, start) { - if (typeof start !== 'number') { - start = 0; - } - - if (start + search.length > str.length) { - return false; - } else { - return str.indexOf(search, start) !== -1; - } -} - -createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { - return 'The value "' + value + '" is invalid for option "' + name + '"'; -}, TypeError); -createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { - // determiner: 'must be' or 'must not be' - var determiner; - - if (typeof expected === 'string' && startsWith(expected, 'not ')) { - determiner = 'must not be'; - expected = expected.replace(/^not /, ''); - } else { - determiner = 'must be'; - } - - var msg; - - if (endsWith(name, ' argument')) { - // For cases like 'first argument' - msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, 'type')); - } else { - var type = includes(name, '.') ? 'property' : 'argument'; - msg = "The \"".concat(name, "\" ").concat(type, " ").concat(determiner, " ").concat(oneOf(expected, 'type')); - } - - msg += ". Received type ".concat(typeof actual); - return msg; -}, TypeError); -createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); -createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { - return 'The ' + name + ' method is not implemented'; -}); -createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); -createErrorType('ERR_STREAM_DESTROYED', function (name) { - return 'Cannot call ' + name + ' after a stream was destroyed'; -}); -createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); -createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); -createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); -createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); -createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { - return 'Unknown encoding: ' + arg; -}, TypeError); -createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); -module.exports.codes = codes; diff --git a/node_modules/readable-stream/errors.js b/node_modules/readable-stream/errors.js deleted file mode 100644 index 8471526d..00000000 --- a/node_modules/readable-stream/errors.js +++ /dev/null @@ -1,116 +0,0 @@ -'use strict'; - -const codes = {}; - -function createErrorType(code, message, Base) { - if (!Base) { - Base = Error - } - - function getMessage (arg1, arg2, arg3) { - if (typeof message === 'string') { - return message - } else { - return message(arg1, arg2, arg3) - } - } - - class NodeError extends Base { - constructor (arg1, arg2, arg3) { - super(getMessage(arg1, arg2, arg3)); - } - } - - NodeError.prototype.name = Base.name; - NodeError.prototype.code = code; - - codes[code] = NodeError; -} - -// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js -function oneOf(expected, thing) { - if (Array.isArray(expected)) { - const len = expected.length; - expected = expected.map((i) => String(i)); - if (len > 2) { - return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` + - expected[len - 1]; - } else if (len === 2) { - return `one of ${thing} ${expected[0]} or ${expected[1]}`; - } else { - return `of ${thing} ${expected[0]}`; - } - } else { - return `of ${thing} ${String(expected)}`; - } -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith -function startsWith(str, search, pos) { - return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith -function endsWith(str, search, this_len) { - if (this_len === undefined || this_len > str.length) { - this_len = str.length; - } - return str.substring(this_len - search.length, this_len) === search; -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes -function includes(str, search, start) { - if (typeof start !== 'number') { - start = 0; - } - - if (start + search.length > str.length) { - return false; - } else { - return str.indexOf(search, start) !== -1; - } -} - -createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { - return 'The value "' + value + '" is invalid for option "' + name + '"' -}, TypeError); -createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { - // determiner: 'must be' or 'must not be' - let determiner; - if (typeof expected === 'string' && startsWith(expected, 'not ')) { - determiner = 'must not be'; - expected = expected.replace(/^not /, ''); - } else { - determiner = 'must be'; - } - - let msg; - if (endsWith(name, ' argument')) { - // For cases like 'first argument' - msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`; - } else { - const type = includes(name, '.') ? 'property' : 'argument'; - msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`; - } - - msg += `. Received type ${typeof actual}`; - return msg; -}, TypeError); -createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); -createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { - return 'The ' + name + ' method is not implemented' -}); -createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); -createErrorType('ERR_STREAM_DESTROYED', function (name) { - return 'Cannot call ' + name + ' after a stream was destroyed'; -}); -createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); -createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); -createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); -createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); -createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { - return 'Unknown encoding: ' + arg -}, TypeError); -createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); - -module.exports.codes = codes; diff --git a/node_modules/readable-stream/experimentalWarning.js b/node_modules/readable-stream/experimentalWarning.js deleted file mode 100644 index 78e84149..00000000 --- a/node_modules/readable-stream/experimentalWarning.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict' - -var experimentalWarnings = new Set(); - -function emitExperimentalWarning(feature) { - if (experimentalWarnings.has(feature)) return; - var msg = feature + ' is an experimental feature. This feature could ' + - 'change at any time'; - experimentalWarnings.add(feature); - process.emitWarning(msg, 'ExperimentalWarning'); -} - -function noop() {} - -module.exports.emitExperimentalWarning = process.emitWarning - ? emitExperimentalWarning - : noop; diff --git a/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 67525192..00000000 --- a/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. -'use strict'; -/**/ - -var objectKeys = Object.keys || function (obj) { - var keys = []; - - for (var key in obj) { - keys.push(key); - } - - return keys; -}; -/**/ - - -module.exports = Duplex; - -var Readable = require('./_stream_readable'); - -var Writable = require('./_stream_writable'); - -require('inherits')(Duplex, Readable); - -{ - // Allow the keys array to be GC'ed. - var keys = objectKeys(Writable.prototype); - - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - Readable.call(this, options); - Writable.call(this, options); - this.allowHalfOpen = true; - - if (options) { - if (options.readable === false) this.readable = false; - if (options.writable === false) this.writable = false; - - if (options.allowHalfOpen === false) { - this.allowHalfOpen = false; - this.once('end', onend); - } - } -} - -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.highWaterMark; - } -}); -Object.defineProperty(Duplex.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); - } -}); -Object.defineProperty(Duplex.prototype, 'writableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; - } -}); // the no-half-open enforcer - -function onend() { - // If the writable side ended, then we're ok. - if (this._writableState.ended) return; // no more data can be written. - // But allow more writes to happen in this tick. - - process.nextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -Object.defineProperty(Duplex.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } // backward compatibility, the user is explicitly - // managing destroyed - - - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 32e7414c..00000000 --- a/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -require('inherits')(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 192d4514..00000000 --- a/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1124 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -'use strict'; - -module.exports = Readable; -/**/ - -var Duplex; -/**/ - -Readable.ReadableState = ReadableState; -/**/ - -var EE = require('events').EventEmitter; - -var EElistenerCount = function EElistenerCount(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ - - -var Stream = require('./internal/streams/stream'); -/**/ - - -var Buffer = require('buffer').Buffer; - -var OurUint8Array = global.Uint8Array || function () {}; - -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} - -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} -/**/ - - -var debugUtil = require('util'); - -var debug; - -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function debug() {}; -} -/**/ - - -var BufferList = require('./internal/streams/buffer_list'); - -var destroyImpl = require('./internal/streams/destroy'); - -var _require = require('./internal/streams/state'), - getHighWaterMark = _require.getHighWaterMark; - -var _require$codes = require('../errors').codes, - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance. - - -var StringDecoder; -var createReadableStreamAsyncIterator; -var from; - -require('inherits')(Readable, Stream); - -var errorOrDestroy = destroyImpl.errorOrDestroy; -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -function ReadableState(options, stream, isDuplex) { - Duplex = Duplex || require('./_stream_duplex'); - options = options || {}; // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - - this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - - this.sync = true; // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - this.paused = true; // Should close be emitted on destroy. Defaults to true. - - this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish') - - this.autoDestroy = !!options.autoDestroy; // has it been destroyed - - this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - - this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s - - this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled - - this.readingMore = false; - this.decoder = null; - this.encoding = null; - - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - if (!(this instanceof Readable)) return new Readable(options); // Checking for a Stream.Duplex instance is faster here instead of inside - // the ReadableState constructor, at least with V8 6.5 - - var isDuplex = this instanceof Duplex; - this._readableState = new ReadableState(options, this, isDuplex); // legacy - - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} - -Object.defineProperty(Readable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._readableState === undefined) { - return false; - } - - return this._readableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } // backward compatibility, the user is explicitly - // managing destroyed - - - this._readableState.destroyed = value; - } -}); -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; - -Readable.prototype._destroy = function (err, cb) { - cb(err); -}; // Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. - - -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; // Unshift should *always* be something directly out of read() - - -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - debug('readableAddChunk', chunk); - var state = stream._readableState; - - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - - if (er) { - errorOrDestroy(stream, er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); - } else if (state.ended) { - errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); - } else if (state.destroyed) { - return false; - } else { - state.reading = false; - - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - maybeReadMore(stream, state); - } - } // We can push more data if we are below the highWaterMark. - // Also, if we have no data yet, we can stand some more bytes. - // This is to work around cases where hwm=0, such as the repl. - - - return !state.ended && (state.length < state.highWaterMark || state.length === 0); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - state.awaitDrain = 0; - stream.emit('data', chunk); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - if (state.needReadable) emitReadable(stream); - } - - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk); - } - - return er; -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; // backwards compatibility. - - -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - var decoder = new StringDecoder(enc); - this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8 - - this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers: - - var p = this._readableState.buffer.head; - var content = ''; - - while (p !== null) { - content += decoder.write(p.data); - p = p.next; - } - - this._readableState.buffer.clear(); - - if (content !== '') this._readableState.buffer.push(content); - this._readableState.length = content.length; - return this; -}; // Don't raise the hwm > 1GB - - -var MAX_HWM = 0x40000000; - -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE. - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - - return n; -} // This function is designed to be inlinable, so please take care when making -// changes to the function body. - - -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } // If we're asking for more than the current hwm, then raise the hwm. - - - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; // Don't have enough - - if (!state.ended) { - state.needReadable = true; - return 0; - } - - return state.length; -} // you can override either this method, or the async _read(n) below. - - -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - - if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up. - - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - // if we need a readable event, then we need to do some reading. - - - var doRead = state.needReadable; - debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some - - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - - - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; // if the length is currently zero, then we *need* a readable event. - - if (state.length === 0) state.needReadable = true; // call internal read method - - this._read(state.highWaterMark); - - state.sync = false; // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = state.length <= state.highWaterMark; - n = 0; - } else { - state.length -= n; - state.awaitDrain = 0; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick. - - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - return ret; -}; - -function onEofChunk(stream, state) { - debug('onEofChunk'); - if (state.ended) return; - - if (state.decoder) { - var chunk = state.decoder.end(); - - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - - state.ended = true; - - if (state.sync) { - // if we are sync, wait until next tick to emit the data. - // Otherwise we risk emitting data in the flow() - // the readable code triggers during a read() call - emitReadable(stream); - } else { - // emit 'readable' now to make sure it gets picked up. - state.needReadable = false; - - if (!state.emittedReadable) { - state.emittedReadable = true; - emitReadable_(stream); - } - } -} // Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. - - -function emitReadable(stream) { - var state = stream._readableState; - debug('emitReadable', state.needReadable, state.emittedReadable); - state.needReadable = false; - - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - process.nextTick(emitReadable_, stream); - } -} - -function emitReadable_(stream) { - var state = stream._readableState; - debug('emitReadable_', state.destroyed, state.length, state.ended); - - if (!state.destroyed && (state.length || state.ended)) { - stream.emit('readable'); - state.emittedReadable = false; - } // The stream needs another readable event if - // 1. It is not flowing, as the flow mechanism will take - // care of it. - // 2. It is not ended. - // 3. It is below the highWaterMark, so we can schedule - // another readable later. - - - state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; - flow(stream); -} // at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. - - -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - // Attempt to read more data if we should. - // - // The conditions for reading more data are (one of): - // - Not enough data buffered (state.length < state.highWaterMark). The loop - // is responsible for filling the buffer with enough data if such data - // is available. If highWaterMark is 0 and we are not in the flowing mode - // we should _not_ attempt to buffer any extra data. We'll get more data - // when the stream consumer calls read() instead. - // - No data in the buffer, and the stream is in flowing mode. In this mode - // the loop below is responsible for ensuring read() is called. Failing to - // call read here would abort the flow and there's no other mechanism for - // continuing the flow if the stream consumer has just subscribed to the - // 'data' event. - // - // In addition to the above conditions to keep reading data, the following - // conditions prevent the data from being read: - // - The stream has ended (state.ended). - // - There is already a pending 'read' operation (state.reading). This is a - // case where the the stream has called the implementation defined _read() - // method, but they are processing the call asynchronously and have _not_ - // called push() with new data. In this case we skip performing more - // read()s. The execution ends in this method again after the _read() ends - // up calling push() with more data. - while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { - var len = state.length; - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) // didn't get any data, stop spinning. - break; - } - - state.readingMore = false; -} // abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. - - -Readable.prototype._read = function (n) { - errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - - case 1: - state.pipes = [state.pipes, dest]; - break; - - default: - state.pipes.push(dest); - break; - } - - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn); - dest.on('unpipe', onunpipe); - - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - - function onend() { - debug('onend'); - dest.end(); - } // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - - - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - var cleanedUp = false; - - function cleanup() { - debug('cleanup'); // cleanup event handlers once the pipe is broken - - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - cleanedUp = true; // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - src.on('data', ondata); - - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - debug('dest.write', ret); - - if (ret === false) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', state.awaitDrain); - state.awaitDrain++; - } - - src.pause(); - } - } // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - - - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er); - } // Make sure our error handler is attached before userland ones. - - - prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once. - - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - - dest.once('close', onclose); - - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } // tell the dest that it's being piped to - - - dest.emit('pipe', src); // start the flow if it hasn't been started already. - - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function pipeOnDrainFunctionResult() { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { - hasUnpiped: false - }; // if we're not piping anywhere, then do nothing. - - if (state.pipesCount === 0) return this; // just one destination. most common case. - - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - if (!dest) dest = state.pipes; // got a match. - - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } // slow case. multiple pipe destinations. - - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, { - hasUnpiped: false - }); - } - - return this; - } // try to find the right one. - - - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - dest.emit('unpipe', this, unpipeInfo); - return this; -}; // set up data events if they are asked for -// Ensure readable listeners eventually get something - - -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - var state = this._readableState; - - if (ev === 'data') { - // update readableListening so that resume() may be a no-op - // a few lines down. This is needed to support once('readable'). - state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused - - if (state.flowing !== false) this.resume(); - } else if (ev === 'readable') { - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.flowing = false; - state.emittedReadable = false; - debug('on readable', state.length, state.reading); - - if (state.length) { - emitReadable(this); - } else if (!state.reading) { - process.nextTick(nReadingNextTick, this); - } - } - } - - return res; -}; - -Readable.prototype.addListener = Readable.prototype.on; - -Readable.prototype.removeListener = function (ev, fn) { - var res = Stream.prototype.removeListener.call(this, ev, fn); - - if (ev === 'readable') { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - - return res; -}; - -Readable.prototype.removeAllListeners = function (ev) { - var res = Stream.prototype.removeAllListeners.apply(this, arguments); - - if (ev === 'readable' || ev === undefined) { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - - return res; -}; - -function updateReadableListening(self) { - var state = self._readableState; - state.readableListening = self.listenerCount('readable') > 0; - - if (state.resumeScheduled && !state.paused) { - // flowing needs to be set to true now, otherwise - // the upcoming resume will not flow. - state.flowing = true; // crude way to check if we should resume - } else if (self.listenerCount('data') > 0) { - self.resume(); - } -} - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} // pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. - - -Readable.prototype.resume = function () { - var state = this._readableState; - - if (!state.flowing) { - debug('resume'); // we flow only if there is no one listening - // for readable, but we still have to call - // resume() - - state.flowing = !state.readableListening; - resume(this, state); - } - - state.paused = false; - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - process.nextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - debug('resume', state.reading); - - if (!state.reading) { - stream.read(0); - } - - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - - if (this._readableState.flowing !== false) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - - this._readableState.paused = true; - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - - while (state.flowing && stream.read() !== null) { - ; - } -} // wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. - - -Readable.prototype.wrap = function (stream) { - var _this = this; - - var state = this._readableState; - var paused = false; - stream.on('end', function () { - debug('wrapped end'); - - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - - _this.push(null); - }); - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode - - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = _this.push(chunk); - - if (!ret) { - paused = true; - stream.pause(); - } - }); // proxy all the other methods. - // important when wrapping filters and duplexes. - - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function methodWrap(method) { - return function methodWrapReturnFunction() { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } // proxy certain important events. - - - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } // when we try to consume some more bytes, simply unpause the - // underlying stream. - - - this._read = function (n) { - debug('wrapped _read', n); - - if (paused) { - paused = false; - stream.resume(); - } - }; - - return this; -}; - -if (typeof Symbol === 'function') { - Readable.prototype[Symbol.asyncIterator] = function () { - if (createReadableStreamAsyncIterator === undefined) { - createReadableStreamAsyncIterator = require('./internal/streams/async_iterator'); - } - - return createReadableStreamAsyncIterator(this); - }; -} - -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.highWaterMark; - } -}); -Object.defineProperty(Readable.prototype, 'readableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState && this._readableState.buffer; - } -}); -Object.defineProperty(Readable.prototype, 'readableFlowing', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.flowing; - }, - set: function set(state) { - if (this._readableState) { - this._readableState.flowing = state; - } - } -}); // exposed for testing purposes only. - -Readable._fromList = fromList; -Object.defineProperty(Readable.prototype, 'readableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.length; - } -}); // Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. - -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = state.buffer.consume(n, state.decoder); - } - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - debug('endReadable', state.endEmitted); - - if (!state.endEmitted) { - state.ended = true; - process.nextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift. - - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - - if (state.autoDestroy) { - // In case of duplex streams we need a way to detect - // if the writable side is ready for autoDestroy as well - var wState = stream._writableState; - - if (!wState || wState.autoDestroy && wState.finished) { - stream.destroy(); - } - } - } -} - -if (typeof Symbol === 'function') { - Readable.from = function (iterable, opts) { - if (from === undefined) { - from = require('./internal/streams/from'); - } - - return from(Readable, iterable, opts); - }; -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - - return -1; -} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 41a738c4..00000000 --- a/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. -'use strict'; - -module.exports = Transform; - -var _require$codes = require('../errors').codes, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, - ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; - -var Duplex = require('./_stream_duplex'); - -require('inherits')(Transform, Duplex); - -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - var cb = ts.writecb; - - if (cb === null) { - return this.emit('error', new ERR_MULTIPLE_CALLBACK()); - } - - ts.writechunk = null; - ts.writecb = null; - if (data != null) // single equals check for both `null` and `undefined` - this.push(data); - cb(er); - var rs = this._readableState; - rs.reading = false; - - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - Duplex.call(this, options); - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; // start out asking for a readable event once data is transformed. - - this._readableState.needReadable = true; // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - if (typeof options.flush === 'function') this._flush = options.flush; - } // When the writable side finishes, then flush out anything remaining. - - - this.on('prefinish', prefinish); -} - -function prefinish() { - var _this = this; - - if (typeof this._flush === 'function' && !this._readableState.destroyed) { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; // This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. - - -Transform.prototype._transform = function (chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()')); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; // Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. - - -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && !ts.transforming) { - ts.transforming = true; - - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -Transform.prototype._destroy = function (err, cb) { - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - }); -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - if (data != null) // single equals check for both `null` and `undefined` - stream.push(data); // TODO(BridgeAR): Write a test for these two error cases - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - - if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); - if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); - return stream.push(null); -} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index a2634d7c..00000000 --- a/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,697 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. -'use strict'; - -module.exports = Writable; -/* */ - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} // It seems a linked list but it is not -// there will be only 2 of these for each stream - - -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ - -/**/ - - -var Duplex; -/**/ - -Writable.WritableState = WritableState; -/**/ - -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ - -var Stream = require('./internal/streams/stream'); -/**/ - - -var Buffer = require('buffer').Buffer; - -var OurUint8Array = global.Uint8Array || function () {}; - -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} - -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -var destroyImpl = require('./internal/streams/destroy'); - -var _require = require('./internal/streams/state'), - getHighWaterMark = _require.getHighWaterMark; - -var _require$codes = require('../errors').codes, - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, - ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, - ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, - ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; - -var errorOrDestroy = destroyImpl.errorOrDestroy; - -require('inherits')(Writable, Stream); - -function nop() {} - -function WritableState(options, stream, isDuplex) { - Duplex = Duplex || require('./_stream_duplex'); - options = options || {}; // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream, - // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. - - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream - // contains buffers or objects. - - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - - this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called - - this.finalCalled = false; // drain event flag. - - this.needDrain = false; // at the start of calling end() - - this.ending = false; // when end() has been called, and returned - - this.ended = false; // when 'finish' is emitted - - this.finished = false; // has it been destroyed - - this.destroyed = false; // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - - this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - - this.length = 0; // a flag to see when we're in the middle of a write. - - this.writing = false; // when true all writes will be buffered until .uncork() call - - this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - - this.sync = true; // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - - this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb) - - this.onwrite = function (er) { - onwrite(stream, er); - }; // the callback that the user supplies to write(chunk,encoding,cb) - - - this.writecb = null; // the amount that is being written when _write is called. - - this.writelen = 0; - this.bufferedRequest = null; - this.lastBufferedRequest = null; // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - - this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - - this.prefinished = false; // True if the error was already emitted and should not be thrown again - - this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true. - - this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end') - - this.autoDestroy = !!options.autoDestroy; // count buffered requests - - this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - - while (current) { - out.push(current); - current = current.next; - } - - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function writableStateBufferGetter() { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); // Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. - - -var realHasInstance; - -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function value(object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function realHasInstance(object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - // Checking for a Stream.Duplex instance is faster here instead of inside - // the WritableState constructor, at least with V8 6.5 - - var isDuplex = this instanceof Duplex; - if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); - this._writableState = new WritableState(options, this, isDuplex); // legacy. - - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - if (typeof options.writev === 'function') this._writev = options.writev; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} // Otherwise people can pipe Writable streams, which is just wrong. - - -Writable.prototype.pipe = function () { - errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); -}; - -function writeAfterEnd(stream, cb) { - var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb - - errorOrDestroy(stream, er); - process.nextTick(cb, er); -} // Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. - - -function validChunk(stream, state, chunk, cb) { - var er; - - if (chunk === null) { - er = new ERR_STREAM_NULL_VALUES(); - } else if (typeof chunk !== 'string' && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk); - } - - if (er) { - errorOrDestroy(stream, er); - process.nextTick(cb, er); - return false; - } - - return true; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - var isBuf = !state.objectMode && _isUint8Array(chunk); - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - if (typeof cb !== 'function') cb = nop; - if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - return ret; -}; - -Writable.prototype.cork = function () { - this._writableState.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -Object.defineProperty(Writable.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); - } -}); - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - - return chunk; -} - -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.highWaterMark; - } -}); // if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. - -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - - var len = state.objectMode ? 1 : chunk.length; - state.length += len; - var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false. - - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - process.nextTick(cb, er); // this can emit finish, and it will always happen - // after error - - process.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - errorOrDestroy(stream, er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - errorOrDestroy(stream, er); // this can emit finish, but finish must - // always follow error - - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK(); - onwriteStateUpdate(state); - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state) || stream.destroyed; - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - process.nextTick(afterWrite, stream, state, finished, cb); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} // Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. - - -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} // if there's something in the buffer waiting, then process it - - -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - var count = 0; - var allBuffers = true; - - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - - buffer.allBuffers = allBuffers; - doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - - state.pendingcb++; - state.lastBufferedRequest = null; - - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks - - if (state.corked) { - state.corked = 1; - this.uncork(); - } // ignore unnecessary end() calls. - - - if (!state.ending) endWritable(this, state, cb); - return this; -}; - -Object.defineProperty(Writable.prototype, 'writableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; - } -}); - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} - -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - - if (err) { - errorOrDestroy(stream, err); - } - - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} - -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function' && !state.destroyed) { - state.pendingcb++; - state.finalCalled = true; - process.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - - if (need) { - prefinish(stream, state); - - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - - if (state.autoDestroy) { - // In case of duplex streams we need a way to detect - // if the readable side is ready for autoDestroy as well - var rState = stream._readableState; - - if (!rState || rState.autoDestroy && rState.endEmitted) { - stream.destroy(); - } - } - } - } - - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - - if (cb) { - if (state.finished) process.nextTick(cb);else stream.once('finish', cb); - } - - state.ended = true; - stream.writable = false; -} - -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } // reuse the free corkReq. - - - state.corkedRequestsFree.next = corkReq; -} - -Object.defineProperty(Writable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._writableState === undefined) { - return false; - } - - return this._writableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } // backward compatibility, the user is explicitly - // managing destroyed - - - this._writableState.destroyed = value; - } -}); -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; - -Writable.prototype._destroy = function (err, cb) { - cb(err); -}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/async_iterator.js b/node_modules/readable-stream/lib/internal/streams/async_iterator.js deleted file mode 100644 index 9fb615a2..00000000 --- a/node_modules/readable-stream/lib/internal/streams/async_iterator.js +++ /dev/null @@ -1,207 +0,0 @@ -'use strict'; - -var _Object$setPrototypeO; - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -var finished = require('./end-of-stream'); - -var kLastResolve = Symbol('lastResolve'); -var kLastReject = Symbol('lastReject'); -var kError = Symbol('error'); -var kEnded = Symbol('ended'); -var kLastPromise = Symbol('lastPromise'); -var kHandlePromise = Symbol('handlePromise'); -var kStream = Symbol('stream'); - -function createIterResult(value, done) { - return { - value: value, - done: done - }; -} - -function readAndResolve(iter) { - var resolve = iter[kLastResolve]; - - if (resolve !== null) { - var data = iter[kStream].read(); // we defer if data is null - // we can be expecting either 'end' or - // 'error' - - if (data !== null) { - iter[kLastPromise] = null; - iter[kLastResolve] = null; - iter[kLastReject] = null; - resolve(createIterResult(data, false)); - } - } -} - -function onReadable(iter) { - // we wait for the next tick, because it might - // emit an error with process.nextTick - process.nextTick(readAndResolve, iter); -} - -function wrapForNext(lastPromise, iter) { - return function (resolve, reject) { - lastPromise.then(function () { - if (iter[kEnded]) { - resolve(createIterResult(undefined, true)); - return; - } - - iter[kHandlePromise](resolve, reject); - }, reject); - }; -} - -var AsyncIteratorPrototype = Object.getPrototypeOf(function () {}); -var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { - get stream() { - return this[kStream]; - }, - - next: function next() { - var _this = this; - - // if we have detected an error in the meanwhile - // reject straight away - var error = this[kError]; - - if (error !== null) { - return Promise.reject(error); - } - - if (this[kEnded]) { - return Promise.resolve(createIterResult(undefined, true)); - } - - if (this[kStream].destroyed) { - // We need to defer via nextTick because if .destroy(err) is - // called, the error will be emitted via nextTick, and - // we cannot guarantee that there is no error lingering around - // waiting to be emitted. - return new Promise(function (resolve, reject) { - process.nextTick(function () { - if (_this[kError]) { - reject(_this[kError]); - } else { - resolve(createIterResult(undefined, true)); - } - }); - }); - } // if we have multiple next() calls - // we will wait for the previous Promise to finish - // this logic is optimized to support for await loops, - // where next() is only called once at a time - - - var lastPromise = this[kLastPromise]; - var promise; - - if (lastPromise) { - promise = new Promise(wrapForNext(lastPromise, this)); - } else { - // fast path needed to support multiple this.push() - // without triggering the next() queue - var data = this[kStream].read(); - - if (data !== null) { - return Promise.resolve(createIterResult(data, false)); - } - - promise = new Promise(this[kHandlePromise]); - } - - this[kLastPromise] = promise; - return promise; - } -}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () { - return this; -}), _defineProperty(_Object$setPrototypeO, "return", function _return() { - var _this2 = this; - - // destroy(err, cb) is a private API - // we can guarantee we have that here, because we control the - // Readable class this is attached to - return new Promise(function (resolve, reject) { - _this2[kStream].destroy(null, function (err) { - if (err) { - reject(err); - return; - } - - resolve(createIterResult(undefined, true)); - }); - }); -}), _Object$setPrototypeO), AsyncIteratorPrototype); - -var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) { - var _Object$create; - - var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { - value: stream, - writable: true - }), _defineProperty(_Object$create, kLastResolve, { - value: null, - writable: true - }), _defineProperty(_Object$create, kLastReject, { - value: null, - writable: true - }), _defineProperty(_Object$create, kError, { - value: null, - writable: true - }), _defineProperty(_Object$create, kEnded, { - value: stream._readableState.endEmitted, - writable: true - }), _defineProperty(_Object$create, kHandlePromise, { - value: function value(resolve, reject) { - var data = iterator[kStream].read(); - - if (data) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(data, false)); - } else { - iterator[kLastResolve] = resolve; - iterator[kLastReject] = reject; - } - }, - writable: true - }), _Object$create)); - iterator[kLastPromise] = null; - finished(stream, function (err) { - if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { - var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise - // returned by next() and store the error - - if (reject !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - reject(err); - } - - iterator[kError] = err; - return; - } - - var resolve = iterator[kLastResolve]; - - if (resolve !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(undefined, true)); - } - - iterator[kEnded] = true; - }); - stream.on('readable', onReadable.bind(null, iterator)); - return iterator; -}; - -module.exports = createReadableStreamAsyncIterator; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/buffer_list.js b/node_modules/readable-stream/lib/internal/streams/buffer_list.js deleted file mode 100644 index cdea425f..00000000 --- a/node_modules/readable-stream/lib/internal/streams/buffer_list.js +++ /dev/null @@ -1,210 +0,0 @@ -'use strict'; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -var _require = require('buffer'), - Buffer = _require.Buffer; - -var _require2 = require('util'), - inspect = _require2.inspect; - -var custom = inspect && inspect.custom || 'inspect'; - -function copyBuffer(src, target, offset) { - Buffer.prototype.copy.call(src, target, offset); -} - -module.exports = -/*#__PURE__*/ -function () { - function BufferList() { - _classCallCheck(this, BufferList); - - this.head = null; - this.tail = null; - this.length = 0; - } - - _createClass(BufferList, [{ - key: "push", - value: function push(v) { - var entry = { - data: v, - next: null - }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - } - }, { - key: "unshift", - value: function unshift(v) { - var entry = { - data: v, - next: this.head - }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - } - }, { - key: "shift", - value: function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - } - }, { - key: "clear", - value: function clear() { - this.head = this.tail = null; - this.length = 0; - } - }, { - key: "join", - value: function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - - while (p = p.next) { - ret += s + p.data; - } - - return ret; - } - }, { - key: "concat", - value: function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - - return ret; - } // Consumes a specified amount of bytes or characters from the buffered data. - - }, { - key: "consume", - value: function consume(n, hasStrings) { - var ret; - - if (n < this.head.data.length) { - // `slice` is the same for buffers and strings. - ret = this.head.data.slice(0, n); - this.head.data = this.head.data.slice(n); - } else if (n === this.head.data.length) { - // First chunk is a perfect match. - ret = this.shift(); - } else { - // Result spans more than one buffer. - ret = hasStrings ? this._getString(n) : this._getBuffer(n); - } - - return ret; - } - }, { - key: "first", - value: function first() { - return this.head.data; - } // Consumes a specified amount of characters from the buffered data. - - }, { - key: "_getString", - value: function _getString(n) { - var p = this.head; - var c = 1; - var ret = p.data; - n -= ret.length; - - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = str.slice(nb); - } - - break; - } - - ++c; - } - - this.length -= c; - return ret; - } // Consumes a specified amount of bytes from the buffered data. - - }, { - key: "_getBuffer", - value: function _getBuffer(n) { - var ret = Buffer.allocUnsafe(n); - var p = this.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = buf.slice(nb); - } - - break; - } - - ++c; - } - - this.length -= c; - return ret; - } // Make sure the linked list only shows the minimal necessary information. - - }, { - key: custom, - value: function value(_, options) { - return inspect(this, _objectSpread({}, options, { - // Only inspect one level. - depth: 0, - // It should not recurse. - customInspect: false - })); - } - }]); - - return BufferList; -}(); \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index 3268a16f..00000000 --- a/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict'; // undocumented cb() API, needed for core, not for public API - -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err) { - if (!this._writableState) { - process.nextTick(emitErrorNT, this, err); - } else if (!this._writableState.errorEmitted) { - this._writableState.errorEmitted = true; - process.nextTick(emitErrorNT, this, err); - } - } - - return this; - } // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - - if (this._readableState) { - this._readableState.destroyed = true; - } // if this is a duplex stream mark the writable part as destroyed as well - - - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - if (!_this._writableState) { - process.nextTick(emitErrorAndCloseNT, _this, err); - } else if (!_this._writableState.errorEmitted) { - _this._writableState.errorEmitted = true; - process.nextTick(emitErrorAndCloseNT, _this, err); - } else { - process.nextTick(emitCloseNT, _this); - } - } else if (cb) { - process.nextTick(emitCloseNT, _this); - cb(err); - } else { - process.nextTick(emitCloseNT, _this); - } - }); - - return this; -} - -function emitErrorAndCloseNT(self, err) { - emitErrorNT(self, err); - emitCloseNT(self); -} - -function emitCloseNT(self) { - if (self._writableState && !self._writableState.emitClose) return; - if (self._readableState && !self._readableState.emitClose) return; - self.emit('close'); -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finalCalled = false; - this._writableState.prefinished = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -function errorOrDestroy(stream, err) { - // We have tests that rely on errors being emitted - // in the same tick, so changing this is semver major. - // For now when you opt-in to autoDestroy we allow - // the error to be emitted nextTick. In a future - // semver major update we should change the default to this. - var rState = stream._readableState; - var wState = stream._writableState; - if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy, - errorOrDestroy: errorOrDestroy -}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/end-of-stream.js b/node_modules/readable-stream/lib/internal/streams/end-of-stream.js deleted file mode 100644 index 831f286d..00000000 --- a/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +++ /dev/null @@ -1,104 +0,0 @@ -// Ported from https://github.com/mafintosh/end-of-stream with -// permission from the author, Mathias Buus (@mafintosh). -'use strict'; - -var ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE; - -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - callback.apply(this, args); - }; -} - -function noop() {} - -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} - -function eos(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - callback = once(callback || noop); - var readable = opts.readable || opts.readable !== false && stream.readable; - var writable = opts.writable || opts.writable !== false && stream.writable; - - var onlegacyfinish = function onlegacyfinish() { - if (!stream.writable) onfinish(); - }; - - var writableEnded = stream._writableState && stream._writableState.finished; - - var onfinish = function onfinish() { - writable = false; - writableEnded = true; - if (!readable) callback.call(stream); - }; - - var readableEnded = stream._readableState && stream._readableState.endEmitted; - - var onend = function onend() { - readable = false; - readableEnded = true; - if (!writable) callback.call(stream); - }; - - var onerror = function onerror(err) { - callback.call(stream, err); - }; - - var onclose = function onclose() { - var err; - - if (readable && !readableEnded) { - if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - - if (writable && !writableEnded) { - if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - }; - - var onrequest = function onrequest() { - stream.req.on('finish', onfinish); - }; - - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest();else stream.on('request', onrequest); - } else if (writable && !stream._writableState) { - // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); - } - - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', onerror); - stream.on('close', onclose); - return function () { - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; -} - -module.exports = eos; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/from-browser.js b/node_modules/readable-stream/lib/internal/streams/from-browser.js deleted file mode 100644 index a4ce56f3..00000000 --- a/node_modules/readable-stream/lib/internal/streams/from-browser.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function () { - throw new Error('Readable.from is not available in the browser') -}; diff --git a/node_modules/readable-stream/lib/internal/streams/from.js b/node_modules/readable-stream/lib/internal/streams/from.js deleted file mode 100644 index 6c412844..00000000 --- a/node_modules/readable-stream/lib/internal/streams/from.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -var ERR_INVALID_ARG_TYPE = require('../../../errors').codes.ERR_INVALID_ARG_TYPE; - -function from(Readable, iterable, opts) { - var iterator; - - if (iterable && typeof iterable.next === 'function') { - iterator = iterable; - } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable); - - var readable = new Readable(_objectSpread({ - objectMode: true - }, opts)); // Reading boolean to protect against _read - // being called before last iteration completion. - - var reading = false; - - readable._read = function () { - if (!reading) { - reading = true; - next(); - } - }; - - function next() { - return _next2.apply(this, arguments); - } - - function _next2() { - _next2 = _asyncToGenerator(function* () { - try { - var _ref = yield iterator.next(), - value = _ref.value, - done = _ref.done; - - if (done) { - readable.push(null); - } else if (readable.push((yield value))) { - next(); - } else { - reading = false; - } - } catch (err) { - readable.destroy(err); - } - }); - return _next2.apply(this, arguments); - } - - return readable; -} - -module.exports = from; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/pipeline.js b/node_modules/readable-stream/lib/internal/streams/pipeline.js deleted file mode 100644 index 65899098..00000000 --- a/node_modules/readable-stream/lib/internal/streams/pipeline.js +++ /dev/null @@ -1,97 +0,0 @@ -// Ported from https://github.com/mafintosh/pump with -// permission from the author, Mathias Buus (@mafintosh). -'use strict'; - -var eos; - -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - callback.apply(void 0, arguments); - }; -} - -var _require$codes = require('../../../errors').codes, - ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; - -function noop(err) { - // Rethrow the error if it exists to avoid swallowing it - if (err) throw err; -} - -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} - -function destroyer(stream, reading, writing, callback) { - callback = once(callback); - var closed = false; - stream.on('close', function () { - closed = true; - }); - if (eos === undefined) eos = require('./end-of-stream'); - eos(stream, { - readable: reading, - writable: writing - }, function (err) { - if (err) return callback(err); - closed = true; - callback(); - }); - var destroyed = false; - return function (err) { - if (closed) return; - if (destroyed) return; - destroyed = true; // request.destroy just do .end - .abort is what we want - - if (isRequest(stream)) return stream.abort(); - if (typeof stream.destroy === 'function') return stream.destroy(); - callback(err || new ERR_STREAM_DESTROYED('pipe')); - }; -} - -function call(fn) { - fn(); -} - -function pipe(from, to) { - return from.pipe(to); -} - -function popCallback(streams) { - if (!streams.length) return noop; - if (typeof streams[streams.length - 1] !== 'function') return noop; - return streams.pop(); -} - -function pipeline() { - for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { - streams[_key] = arguments[_key]; - } - - var callback = popCallback(streams); - if (Array.isArray(streams[0])) streams = streams[0]; - - if (streams.length < 2) { - throw new ERR_MISSING_ARGS('streams'); - } - - var error; - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1; - var writing = i > 0; - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err; - if (err) destroys.forEach(call); - if (reading) return; - destroys.forEach(call); - callback(error); - }); - }); - return streams.reduce(pipe); -} - -module.exports = pipeline; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/state.js b/node_modules/readable-stream/lib/internal/streams/state.js deleted file mode 100644 index 19887eb8..00000000 --- a/node_modules/readable-stream/lib/internal/streams/state.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -var ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE; - -function highWaterMarkFrom(options, isDuplex, duplexKey) { - return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; -} - -function getHighWaterMark(state, options, duplexKey, isDuplex) { - var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); - - if (hwm != null) { - if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { - var name = isDuplex ? duplexKey : 'highWaterMark'; - throw new ERR_INVALID_OPT_VALUE(name, hwm); - } - - return Math.floor(hwm); - } // Default value - - - return state.objectMode ? 16 : 16 * 1024; -} - -module.exports = { - getHighWaterMark: getHighWaterMark -}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3fd..00000000 --- a/node_modules/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b6..00000000 --- a/node_modules/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json deleted file mode 100644 index c813798c..00000000 --- a/node_modules/readable-stream/package.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "_from": "readable-stream@^3.6.0", - "_id": "readable-stream@3.6.0", - "_inBundle": false, - "_integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "_location": "/readable-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "readable-stream@^3.6.0", - "name": "readable-stream", - "escapedName": "readable-stream", - "rawSpec": "^3.6.0", - "saveSpec": null, - "fetchSpec": "^3.6.0" - }, - "_requiredBy": [ - "/isomorphic-git", - "/pino-pretty", - "/split2" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "_shasum": "337bbda3adc0706bd3e024426a286d4b4b2c9198", - "_spec": "readable-stream@^3.6.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pino-pretty", - "browser": { - "util": false, - "worker_threads": false, - "./errors": "./errors-browser.js", - "./readable.js": "./readable-browser.js", - "./lib/internal/streams/from.js": "./lib/internal/streams/from-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "deprecated": false, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "@babel/cli": "^7.2.0", - "@babel/core": "^7.2.0", - "@babel/polyfill": "^7.0.0", - "@babel/preset-env": "^7.2.0", - "airtap": "0.0.9", - "assert": "^1.4.0", - "bl": "^2.0.0", - "deep-strict-equal": "^0.2.0", - "events.once": "^2.0.2", - "glob": "^7.1.2", - "gunzip-maybe": "^1.4.1", - "hyperquest": "^2.1.3", - "lolex": "^2.6.0", - "nyc": "^11.0.0", - "pump": "^3.0.0", - "rimraf": "^2.6.2", - "tap": "^12.0.0", - "tape": "^4.9.0", - "tar-fs": "^1.16.2", - "util-promisify": "^2.1.0" - }, - "engines": { - "node": ">= 6" - }, - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "name": "readable-stream", - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "ci": "TAP=1 tap --no-esm test/parallel/*.js test/ours/*.js | tee test.tap", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov", - "test": "tap -J --no-esm test/parallel/*.js test/ours/*.js", - "test-browser-local": "airtap --open --local -- test/browser.js", - "test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js", - "update-browser-errors": "babel -o errors-browser.js errors.js" - }, - "version": "3.6.0" -} diff --git a/node_modules/readable-stream/readable-browser.js b/node_modules/readable-stream/readable-browser.js deleted file mode 100644 index adbf60de..00000000 --- a/node_modules/readable-stream/readable-browser.js +++ /dev/null @@ -1,9 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); -exports.finished = require('./lib/internal/streams/end-of-stream.js'); -exports.pipeline = require('./lib/internal/streams/pipeline.js'); diff --git a/node_modules/readable-stream/readable.js b/node_modules/readable-stream/readable.js deleted file mode 100644 index 9e0ca120..00000000 --- a/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,16 +0,0 @@ -var Stream = require('stream'); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream.Readable; - Object.assign(module.exports, Stream); - module.exports.Stream = Stream; -} else { - exports = module.exports = require('./lib/_stream_readable.js'); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = require('./lib/_stream_writable.js'); - exports.Duplex = require('./lib/_stream_duplex.js'); - exports.Transform = require('./lib/_stream_transform.js'); - exports.PassThrough = require('./lib/_stream_passthrough.js'); - exports.finished = require('./lib/internal/streams/end-of-stream.js'); - exports.pipeline = require('./lib/internal/streams/pipeline.js'); -} diff --git a/node_modules/remove-bom-buffer/LICENSE b/node_modules/remove-bom-buffer/LICENSE deleted file mode 100644 index c0d7f136..00000000 --- a/node_modules/remove-bom-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2017, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/remove-bom-buffer/README.md b/node_modules/remove-bom-buffer/README.md deleted file mode 100644 index 8ed18a48..00000000 --- a/node_modules/remove-bom-buffer/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# remove-bom-buffer [![NPM version](https://img.shields.io/npm/v/remove-bom-buffer.svg?style=flat)](https://www.npmjs.com/package/remove-bom-buffer) [![NPM monthly downloads](https://img.shields.io/npm/dm/remove-bom-buffer.svg?style=flat)](https://npmjs.org/package/remove-bom-buffer) [![NPM total downloads](https://img.shields.io/npm/dt/remove-bom-buffer.svg?style=flat)](https://npmjs.org/package/remove-bom-buffer) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/remove-bom-buffer.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/remove-bom-buffer) - -> Remove a byte order mark (BOM) from a buffer. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save remove-bom-buffer -``` - -## Usage - -```js -var remove = require('remove-bom-buffer'); -remove(new Buffer('\ufefffoo')); -``` - -## About - -### Related projects - -* [cr](https://www.npmjs.com/package/cr): Strip windows carriage returns, or convert carriage returns to newlines. | [homepage](https://github.com/jonschlinkert/cr "Strip windows carriage returns, or convert carriage returns to newlines.") -* [has-bom](https://www.npmjs.com/package/has-bom): Returns true if a buffer or string has a byte order mark (BOM) | [homepage](https://github.com/jonschlinkert/has-bom "Returns true if a buffer or string has a byte order mark (BOM)") -* [read-file](https://www.npmjs.com/package/read-file): Thin wrapper around fs.readFile and fs.readFileSync that also strips byte order marks when `utf8` encoding… [more](https://github.com/jonschlinkert/read-file) | [homepage](https://github.com/jonschlinkert/read-file "Thin wrapper around fs.readFile and fs.readFileSync that also strips byte order marks when `utf8` encoding is chosen. Also optionally replaces windows newlines with unix newlines.") -* [strip-bom-string](https://www.npmjs.com/package/strip-bom-string): Strip a byte order mark (BOM) from a string. | [homepage](https://github.com/jonschlinkert/strip-bom-string "Strip a byte order mark (BOM) from a string.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 16, 2017._ \ No newline at end of file diff --git a/node_modules/remove-bom-buffer/index.js b/node_modules/remove-bom-buffer/index.js deleted file mode 100644 index 7a299ca3..00000000 --- a/node_modules/remove-bom-buffer/index.js +++ /dev/null @@ -1,27 +0,0 @@ -/*! - * remove-bom-buffer - * - * Copyright (c) 2015-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -var isUTF8 = require('is-utf8'); -var isBuffer = require('is-buffer'); - -function matchBOM(buf) { - return buf[0] === 0xEF && buf[1] === 0xBB && buf[2] === 0xBF; -} - -function maybeUTF8(buf) { - // Only "maybe" because we aren't sniffing the whole buffer - return isUTF8(buf.slice(3, 7)); -} - -module.exports = function(buf) { - if (isBuffer(buf) && matchBOM(buf) && maybeUTF8(buf)) { - return buf.slice(3); - } - return buf; -}; diff --git a/node_modules/remove-bom-buffer/package.json b/node_modules/remove-bom-buffer/package.json deleted file mode 100644 index e2015d04..00000000 --- a/node_modules/remove-bom-buffer/package.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "_from": "remove-bom-buffer@^3.0.0", - "_id": "remove-bom-buffer@3.0.0", - "_inBundle": false, - "_integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", - "_location": "/remove-bom-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "remove-bom-buffer@^3.0.0", - "name": "remove-bom-buffer", - "escapedName": "remove-bom-buffer", - "rawSpec": "^3.0.0", - "saveSpec": null, - "fetchSpec": "^3.0.0" - }, - "_requiredBy": [ - "/remove-bom-stream", - "/vinyl-fs", - "/vinyl-sourcemap" - ], - "_resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", - "_shasum": "c2bf1e377520d324f623892e33c10cac2c252b53", - "_spec": "remove-bom-buffer@^3.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/remove-bom-buffer/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Blaine Bublitz", - "url": "https://twitter.com/BlaineBublitz" - }, - { - "name": "Erik Kemperman", - "url": "https://github.com/erikkemperman" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - } - ], - "dependencies": { - "is-buffer": "^1.1.5", - "is-utf8": "^0.2.1" - }, - "deprecated": false, - "description": "Remove a byte order mark (BOM) from a buffer.", - "devDependencies": { - "gulp-format-md": "^0.1.11", - "mocha": "^3.2.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/remove-bom-buffer", - "keywords": [ - "bom", - "buffer", - "byte-order-mark", - "normalize", - "remove", - "strip", - "strip-bom", - "strip-bom-buffer", - "strip-bom-string" - ], - "license": "MIT", - "main": "index.js", - "name": "remove-bom-buffer", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/remove-bom-buffer.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "cr", - "has-bom", - "read-file", - "strip-bom-string" - ] - }, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - } - }, - "version": "3.0.0" -} diff --git a/node_modules/remove-bom-stream/LICENSE b/node_modules/remove-bom-stream/LICENSE deleted file mode 100644 index b8fc7433..00000000 --- a/node_modules/remove-bom-stream/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Blaine Bublitz , Eric Schoffstall and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/remove-bom-stream/README.md b/node_modules/remove-bom-stream/README.md deleted file mode 100644 index c4a05894..00000000 --- a/node_modules/remove-bom-stream/README.md +++ /dev/null @@ -1,51 +0,0 @@ -

    - - - -

    - -# remove-bom-stream - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] - -Remove a UTF8 BOM at the start of the stream. - -## Usage - -```js -var fs = require('fs'); -var concat = require('concat-stream'); -var removeBOM = require('remove-bom-stream'); - -fs.createReadStream('utf8-file-with-bom.txt') - .pipe(removeBOM()) - .pipe(concat(function(result) { - // result won't have a BOM - })); -``` - -## API - -### `removeBOM()` - -Returns a `through2` stream that will remove a BOM, given the data is a UTF8 Buffer with a BOM at the beginning. If the data is not UTF8 or does not have a BOM, the data is not changed and this becomes a normal passthrough stream. - -## License - -MIT - -[downloads-image]: http://img.shields.io/npm/dm/remove-bom-stream.svg -[npm-url]: https://npmjs.com/package/remove-bom-stream -[npm-image]: http://img.shields.io/npm/v/remove-bom-stream.svg - -[travis-url]: https://travis-ci.org/gulpjs/remove-bom-stream -[travis-image]: http://img.shields.io/travis/gulpjs/remove-bom-stream.svg?label=travis-ci - -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/remove-bom-stream -[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/remove-bom-stream.svg?label=appveyor - -[coveralls-url]: https://coveralls.io/r/gulpjs/remove-bom-stream -[coveralls-image]: http://img.shields.io/coveralls/gulpjs/remove-bom-stream/master.svg - -[gitter-url]: https://gitter.im/gulpjs/gulp -[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png diff --git a/node_modules/remove-bom-stream/index.js b/node_modules/remove-bom-stream/index.js deleted file mode 100644 index 93501f19..00000000 --- a/node_modules/remove-bom-stream/index.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -var through = require('through2'); -var removeBom = require('remove-bom-buffer'); -var SafeBuffer = require('safe-buffer').Buffer; - -function removeBomStream() { - var completed = false; - var buffer = SafeBuffer.alloc(0); - - return through(onChunk, onFlush); - - function removeAndCleanup(data) { - completed = true; - - buffer = null; - - return removeBom(data); - } - - function onChunk(data, enc, cb) { - if (completed) { - return cb(null, data); - } - - if (data.length >= 7) { - return cb(null, removeAndCleanup(data)); - } - - var bufferLength = buffer.length; - var chunkLength = data.length; - var totalLength = bufferLength + chunkLength; - - buffer = SafeBuffer.concat([buffer, data], totalLength); - - if (totalLength >= 7) { - return cb(null, removeAndCleanup(buffer)); - } - cb(); - } - - function onFlush(cb) { - if (completed || !buffer) { - return cb(); - } - - cb(null, removeAndCleanup(buffer)); - } -} - -module.exports = removeBomStream; diff --git a/node_modules/remove-bom-stream/package.json b/node_modules/remove-bom-stream/package.json deleted file mode 100644 index c2c50c74..00000000 --- a/node_modules/remove-bom-stream/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "_from": "remove-bom-stream@^1.2.0", - "_id": "remove-bom-stream@1.2.0", - "_inBundle": false, - "_integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", - "_location": "/remove-bom-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "remove-bom-stream@^1.2.0", - "name": "remove-bom-stream", - "escapedName": "remove-bom-stream", - "rawSpec": "^1.2.0", - "saveSpec": null, - "fetchSpec": "^1.2.0" - }, - "_requiredBy": [ - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", - "_shasum": "05f1a593f16e42e1fb90ebf59de8e569525f9523", - "_spec": "remove-bom-stream@^1.2.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs", - "author": { - "name": "Gulp Team", - "email": "team@gulpjs.com", - "url": "http://gulpjs.com/" - }, - "bugs": { - "url": "https://github.com/gulpjs/remove-bom-stream/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com" - } - ], - "dependencies": { - "remove-bom-buffer": "^3.0.0", - "safe-buffer": "^5.1.0", - "through2": "^2.0.3" - }, - "deprecated": false, - "description": "Remove a UTF8 BOM at the start of the stream.", - "devDependencies": { - "buffer-equal": "^1.0.0", - "eslint": "^1.10.3", - "eslint-config-gulp": "^2.0.0", - "expect": "^1.20.2", - "istanbul": "^0.4.3", - "istanbul-coveralls": "^1.0.3", - "jscs": "^2.4.0", - "jscs-preset-gulp": "^1.0.0", - "mississippi": "^1.3.0", - "mocha": "^3.2.0", - "stream-chunker": "^1.2.8" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "LICENSE", - "index.js" - ], - "homepage": "https://github.com/gulpjs/remove-bom-stream#readme", - "keywords": [ - "bom", - "remove", - "utf8", - "streaming", - "stream" - ], - "license": "MIT", - "main": "index.js", - "name": "remove-bom-stream", - "repository": { - "type": "git", - "url": "git+https://github.com/gulpjs/remove-bom-stream.git" - }, - "scripts": { - "cover": "istanbul cover _mocha", - "coveralls": "npm run cover && istanbul-coveralls", - "lint": "eslint index.js test/ && jscs index.js test/", - "pretest": "npm run lint", - "test": "mocha --async-only" - }, - "version": "1.2.0" -} diff --git a/node_modules/remove-trailing-separator/history.md b/node_modules/remove-trailing-separator/history.md deleted file mode 100644 index e15e8a46..00000000 --- a/node_modules/remove-trailing-separator/history.md +++ /dev/null @@ -1,17 +0,0 @@ -## History - -### 1.1.0 - 16th Aug 2017 - -- [f4576e3](https://github.com/darsain/remove-trailing-separator/commit/f4576e3638c39b794998b533fffb27854dcbee01) Implement faster slash slicing - -### 1.0.2 - 07th Jun 2017 - -- [8e13ecb](https://github.com/darsain/remove-trailing-separator/commit/8e13ecbfd7b9f5fdf97c5d5ff923e4718b874e31) ES5 compatibility - -### 1.0.1 - 25th Sep 2016 - -- [b78606d](https://github.com/darsain/remove-trailing-separator/commit/af90b4e153a4527894741af6c7005acaeb78606d) Remove backslash only on win32 systems - -### 1.0.0 - 24th Sep 2016 - -Initial release. diff --git a/node_modules/remove-trailing-separator/index.js b/node_modules/remove-trailing-separator/index.js deleted file mode 100644 index 512306b8..00000000 --- a/node_modules/remove-trailing-separator/index.js +++ /dev/null @@ -1,17 +0,0 @@ -var isWin = process.platform === 'win32'; - -module.exports = function (str) { - var i = str.length - 1; - if (i < 2) { - return str; - } - while (isSeparator(str, i)) { - i--; - } - return str.substr(0, i + 1); -}; - -function isSeparator(str, i) { - var char = str[i]; - return i > 0 && (char === '/' || (isWin && char === '\\')); -} diff --git a/node_modules/remove-trailing-separator/license b/node_modules/remove-trailing-separator/license deleted file mode 100644 index a169aff7..00000000 --- a/node_modules/remove-trailing-separator/license +++ /dev/null @@ -1,3 +0,0 @@ -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/node_modules/remove-trailing-separator/package.json b/node_modules/remove-trailing-separator/package.json deleted file mode 100644 index 48228e31..00000000 --- a/node_modules/remove-trailing-separator/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_from": "remove-trailing-separator@^1.0.1", - "_id": "remove-trailing-separator@1.1.0", - "_inBundle": false, - "_integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "_location": "/remove-trailing-separator", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "remove-trailing-separator@^1.0.1", - "name": "remove-trailing-separator", - "escapedName": "remove-trailing-separator", - "rawSpec": "^1.0.1", - "saveSpec": null, - "fetchSpec": "^1.0.1" - }, - "_requiredBy": [ - "/glob-stream", - "/normalize-path", - "/vinyl" - ], - "_resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "_shasum": "c24bce2a283adad5bc3f58e0d48249b92379d8ef", - "_spec": "remove-trailing-separator@^1.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl", - "author": { - "name": "darsain" - }, - "bugs": { - "url": "https://github.com/darsain/remove-trailing-separator/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Removes separators from the end of the string.", - "devDependencies": { - "ava": "^0.16.0", - "coveralls": "^2.11.14", - "nyc": "^8.3.0", - "xo": "^0.16.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/darsain/remove-trailing-separator#readme", - "keywords": [ - "remove", - "strip", - "trailing", - "separator" - ], - "license": "ISC", - "main": "index.js", - "name": "remove-trailing-separator", - "repository": { - "type": "git", - "url": "git+https://github.com/darsain/remove-trailing-separator.git" - }, - "scripts": { - "lint": "xo", - "pretest": "npm run lint", - "report": "nyc report --reporter=html", - "test": "nyc ava" - }, - "version": "1.1.0" -} diff --git a/node_modules/remove-trailing-separator/readme.md b/node_modules/remove-trailing-separator/readme.md deleted file mode 100644 index 747086af..00000000 --- a/node_modules/remove-trailing-separator/readme.md +++ /dev/null @@ -1,51 +0,0 @@ -# remove-trailing-separator - -[![NPM version][npm-img]][npm-url] [![Build Status: Linux][travis-img]][travis-url] [![Build Status: Windows][appveyor-img]][appveyor-url] [![Coverage Status][coveralls-img]][coveralls-url] - -Removes all separators from the end of a string. - -## Install - -``` -npm install remove-trailing-separator -``` - -## Examples - -```js -const removeTrailingSeparator = require('remove-trailing-separator'); - -removeTrailingSeparator('/foo/bar/') // '/foo/bar' -removeTrailingSeparator('/foo/bar///') // '/foo/bar' - -// leaves only/last separator -removeTrailingSeparator('/') // '/' -removeTrailingSeparator('///') // '/' - -// returns empty string -removeTrailingSeparator('') // '' -``` - -## Notable backslash, or win32 separator behavior - -`\` is considered a separator only on WIN32 systems. All POSIX compliant systems -see backslash as a valid file name character, so it would break POSIX compliance -to remove it there. - -In practice, this means that this code will return different things depending on -what system it runs on: - -```js -removeTrailingSeparator('\\foo\\') -// UNIX => '\\foo\\' -// WIN32 => '\\foo' -``` - -[npm-url]: https://npmjs.org/package/remove-trailing-separator -[npm-img]: https://badge.fury.io/js/remove-trailing-separator.svg -[travis-url]: https://travis-ci.org/darsain/remove-trailing-separator -[travis-img]: https://travis-ci.org/darsain/remove-trailing-separator.svg?branch=master -[appveyor-url]: https://ci.appveyor.com/project/darsain/remove-trailing-separator/branch/master -[appveyor-img]: https://ci.appveyor.com/api/projects/status/wvg9a93rrq95n2xl/branch/master?svg=true -[coveralls-url]: https://coveralls.io/github/darsain/remove-trailing-separator?branch=master -[coveralls-img]: https://coveralls.io/repos/github/darsain/remove-trailing-separator/badge.svg?branch=master diff --git a/node_modules/replace-ext/LICENSE b/node_modules/replace-ext/LICENSE deleted file mode 100644 index fd38d693..00000000 --- a/node_modules/replace-ext/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Blaine Bublitz , Eric Schoffstall and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/replace-ext/README.md b/node_modules/replace-ext/README.md deleted file mode 100644 index acfcfd0d..00000000 --- a/node_modules/replace-ext/README.md +++ /dev/null @@ -1,62 +0,0 @@ -

    - - - -

    - -# replace-ext - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] - -Replaces a file extension with another one. - -## Usage - -```js -var replaceExt = require('replace-ext'); - -var path = '/some/dir/file.js'; -var newPath = replaceExt(path, '.coffee'); - -console.log(newPath); // /some/dir/file.coffee -``` - -## API - -### `replaceExt(path, extension)` - -Replaces the extension from `path` with `extension` and returns the updated path string. - -Does not replace the extension if `path` is not a string or is empty. - - -## replace-ext for enterprise - -Available as part of the Tidelift Subscription - -The maintainers of replace-ext and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-replace-ext?utm_source=npm-replace-ext&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - - -## License - -MIT - -[downloads-image]: http://img.shields.io/npm/dm/replace-ext.svg -[npm-url]: https://www.npmjs.com/package/replace-ext -[npm-image]: http://img.shields.io/npm/v/replace-ext.svg - -[azure-pipelines-url]: https://dev.azure.com/gulpjs/replace-ext/_build/latest?branchName=master -[azure-pipelines-image]: https://dev.azure.com/gulpjs/replace-ext/_apis/build/status/replace-ext?branchName=master - -[travis-url]: https://travis-ci.org/gulpjs/replace-ext -[travis-image]: http://img.shields.io/travis/gulpjs/replace-ext.svg?label=travis-ci - -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/replace-ext -[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/replace-ext.svg?label=appveyor - -[coveralls-url]: https://coveralls.io/r/gulpjs/replace-ext -[coveralls-image]: http://img.shields.io/coveralls/gulpjs/replace-ext/master.svg - -[gitter-url]: https://gitter.im/gulpjs/gulp -[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg - diff --git a/node_modules/replace-ext/index.js b/node_modules/replace-ext/index.js deleted file mode 100644 index 7a782782..00000000 --- a/node_modules/replace-ext/index.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -var path = require('path'); - -function replaceExt(npath, ext) { - if (typeof npath !== 'string') { - return npath; - } - - if (npath.length === 0) { - return npath; - } - - var nFileName = path.basename(npath, path.extname(npath)) + ext; - var nFilepath = path.join(path.dirname(npath), nFileName); - - // Because `path.join` removes the head './' from the given path. - // This removal can cause a problem when passing the result to `require` or - // `import`. - if (startsWithSingleDot(npath)) { - return '.' + path.sep + nFilepath; - } - - return nFilepath; -} - -function startsWithSingleDot(fpath) { - var first2chars = fpath.slice(0, 2); - return (first2chars === '.' + path.sep) || - (first2chars === './'); -} - -module.exports = replaceExt; diff --git a/node_modules/replace-ext/package.json b/node_modules/replace-ext/package.json deleted file mode 100644 index 4736ec60..00000000 --- a/node_modules/replace-ext/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_from": "replace-ext@^1.0.0", - "_id": "replace-ext@1.0.1", - "_inBundle": false, - "_integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", - "_location": "/replace-ext", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "replace-ext@^1.0.0", - "name": "replace-ext", - "escapedName": "replace-ext", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/vinyl" - ], - "_resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", - "_shasum": "2d6d996d04a15855d967443631dd5f77825b016a", - "_spec": "replace-ext@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl", - "author": { - "name": "Gulp Team", - "email": "team@gulpjs.com", - "url": "http://gulpjs.com/" - }, - "bugs": { - "url": "https://github.com/gulpjs/replace-ext/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Eric Schoffstall", - "email": "yo@contra.io" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "Replaces a file extension with another one", - "devDependencies": { - "coveralls": "github:phated/node-coveralls#2.x", - "eslint": "^2.13.1", - "eslint-config-gulp": "^3.0.1", - "expect": "^1.20.2", - "mocha": "^3.0.0", - "nyc": "^10.3.2" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "LICENSE", - "index.js" - ], - "homepage": "https://github.com/gulpjs/replace-ext#readme", - "keywords": [ - "gulp", - "extensions", - "filepath", - "basename" - ], - "license": "MIT", - "main": "index.js", - "name": "replace-ext", - "repository": { - "type": "git", - "url": "git+https://github.com/gulpjs/replace-ext.git" - }, - "scripts": { - "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", - "cover": "nyc --reporter=lcov --reporter=text-summary npm test", - "coveralls": "nyc report --reporter=text-lcov | coveralls", - "lint": "eslint .", - "pretest": "npm run lint", - "test": "nyc mocha --async-only" - }, - "version": "1.0.1" -} diff --git a/node_modules/require-from-string/index.js b/node_modules/require-from-string/index.js deleted file mode 100644 index cb5595fd..00000000 --- a/node_modules/require-from-string/index.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -var Module = require('module'); -var path = require('path'); - -module.exports = function requireFromString(code, filename, opts) { - if (typeof filename === 'object') { - opts = filename; - filename = undefined; - } - - opts = opts || {}; - filename = filename || ''; - - opts.appendPaths = opts.appendPaths || []; - opts.prependPaths = opts.prependPaths || []; - - if (typeof code !== 'string') { - throw new Error('code must be a string, not ' + typeof code); - } - - var paths = Module._nodeModulePaths(path.dirname(filename)); - - var parent = module.parent; - var m = new Module(filename, parent); - m.filename = filename; - m.paths = [].concat(opts.prependPaths).concat(paths).concat(opts.appendPaths); - m._compile(code, filename); - - var exports = m.exports; - parent && parent.children && parent.children.splice(parent.children.indexOf(m), 1); - - return exports; -}; diff --git a/node_modules/require-from-string/license b/node_modules/require-from-string/license deleted file mode 100644 index 1aeb74fd..00000000 --- a/node_modules/require-from-string/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/require-from-string/package.json b/node_modules/require-from-string/package.json deleted file mode 100644 index f9fcb80a..00000000 --- a/node_modules/require-from-string/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "_from": "require-from-string@~2.0", - "_id": "require-from-string@2.0.2", - "_inBundle": false, - "_integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "_location": "/require-from-string", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "require-from-string@~2.0", - "name": "require-from-string", - "escapedName": "require-from-string", - "rawSpec": "~2.0", - "saveSpec": null, - "fetchSpec": "~2.0" - }, - "_requiredBy": [ - "/@antora/page-composer" - ], - "_resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "_shasum": "89a7fdd938261267318eafe14f9c32e598c36909", - "_spec": "require-from-string@~2.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/page-composer", - "author": { - "name": "Vsevolod Strukchinsky", - "email": "floatdrop@gmail.com", - "url": "github.com/floatdrop" - }, - "bugs": { - "url": "https://github.com/floatdrop/require-from-string/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Require module from string", - "devDependencies": { - "mocha": "*" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/floatdrop/require-from-string#readme", - "keywords": [], - "license": "MIT", - "name": "require-from-string", - "repository": { - "type": "git", - "url": "git+https://github.com/floatdrop/require-from-string.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "2.0.2" -} diff --git a/node_modules/require-from-string/readme.md b/node_modules/require-from-string/readme.md deleted file mode 100644 index 88b3236f..00000000 --- a/node_modules/require-from-string/readme.md +++ /dev/null @@ -1,56 +0,0 @@ -# require-from-string [![Build Status](https://travis-ci.org/floatdrop/require-from-string.svg?branch=master)](https://travis-ci.org/floatdrop/require-from-string) - -Load module from string in Node. - -## Install - -``` -$ npm install --save require-from-string -``` - - -## Usage - -```js -var requireFromString = require('require-from-string'); - -requireFromString('module.exports = 1'); -//=> 1 -``` - - -## API - -### requireFromString(code, [filename], [options]) - -#### code - -*Required* -Type: `string` - -Module code. - -#### filename -Type: `string` -Default: `''` - -Optional filename. - - -#### options -Type: `object` - -##### appendPaths -Type: `Array` - -List of `paths`, that will be appended to module `paths`. Useful, when you want -to be able require modules from these paths. - -##### prependPaths -Type: `Array` - -Same as `appendPaths`, but paths will be prepended. - -## License - -MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/node_modules/resolve-options/LICENSE b/node_modules/resolve-options/LICENSE deleted file mode 100644 index b8fc7433..00000000 --- a/node_modules/resolve-options/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Blaine Bublitz , Eric Schoffstall and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/resolve-options/README.md b/node_modules/resolve-options/README.md deleted file mode 100644 index 60efcb32..00000000 --- a/node_modules/resolve-options/README.md +++ /dev/null @@ -1,104 +0,0 @@ -

    - - - -

    - -# resolve-options - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] - -Resolve an options object based on configuration. - -## Usage - -```js -// This example assumes a Vinyl file - -var createResolver = require('resolve-options'); - -var config = { - cwd: { - type: 'string', - default: process.cwd - }, - sourcemaps: { - type: 'boolean', - default: false - }, - since: { - type: ['date', 'number'] - }, - read: { - type: 'boolean' - } -}; - -var options = { - sourcemaps: true, - since: Date.now(), - read: function(file) { - return (file.extname !== '.mp4'); - } -}; - -var resolver = createResolver(config, options); - -var cwd = resolver.resolve('cwd', file); -// cwd === process.cwd() - -var sourcemaps = resolver.resolve('sourcemaps', file); -// sourcemaps === true - -var read = resolver.resolve('read', file); -// Given .mp4, read === false -// Given .txt, read === true -``` - -## API - -### `createResolver([config,] [options])` - -Takes a `config` object that describes the options to accept/resolve and an `options` object (usually passed by a user) to resolve against the `config`. Returns a `resolver` that contains a `resolve` method for realtime resolution of options. - -The `config` object takes the following structure: -```graphql -config { - [optionKey] { - type // string, array or function - default // any value or function - } -} -``` - -Each option is represented by its `optionKey` in the `config` object. It must be an object with a `type` property. - -The `type` property must be a string, array or function which will be passed to the [`value-or-function`][value-or-function] module (functions will be bound to the resolver to allow for dependent options). - -A `default` property may also be specified as a fallback if the option isn't available or is invalid. The `default` value can be any value or a function (functions will be bound to the resolver to allow for dependent defaults). __Note:__ `default` values are not type-validated by the `value-or-function` module. - -### `resolver.resolve(optionKey, [...arguments])` - -Takes an `optionKey` string and any number of `arguments` to apply if an option is a function. Returns the resolved value for the `optionKey`. - -## License - -MIT - -[value-or-function]: https://github.com/gulpjs/value-or-function - -[downloads-image]: http://img.shields.io/npm/dm/resolve-options.svg -[npm-url]: https://npmjs.com/package/resolve-options -[npm-image]: http://img.shields.io/npm/v/resolve-options.svg - -[travis-url]: https://travis-ci.org/gulpjs/resolve-options -[travis-image]: http://img.shields.io/travis/gulpjs/resolve-options.svg?label=travis-ci - -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/resolve-options -[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/resolve-options.svg?label=appveyor - -[coveralls-url]: https://coveralls.io/r/gulpjs/resolve-options -[coveralls-image]: http://img.shields.io/coveralls/gulpjs/resolve-options/master.svg - -[gitter-url]: https://gitter.im/gulpjs/gulp -[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png diff --git a/node_modules/resolve-options/index.js b/node_modules/resolve-options/index.js deleted file mode 100644 index 21ef429d..00000000 --- a/node_modules/resolve-options/index.js +++ /dev/null @@ -1,111 +0,0 @@ -'use strict'; - -var normalize = require('value-or-function'); - -var slice = Array.prototype.slice; - -function createResolver(config, options) { - // TODO: should the config object be validated? - config = config || {}; - options = options || {}; - - var resolver = { - resolve: resolve, - }; - - - // Keep constants separately - var constants = {}; - - function resolveConstant(key) { - if (constants.hasOwnProperty(key)) { - return constants[key]; - } - - var definition = config[key]; - // Ignore options that are not defined - if (!definition) { - return; - } - - var option = options[key]; - - if (option != null) { - if (typeof option === 'function') { - return; - } - option = normalize.call(resolver, definition.type, option); - if (option != null) { - constants[key] = option; - return option; - } - } - - var fallback = definition.default; - if (option == null && typeof fallback !== 'function') { - constants[key] = fallback; - return fallback; - } - } - - - // Keep requested keys to detect (and disallow) recursive resolution - var stack = []; - - function resolve(key) { - var option = resolveConstant(key); - if (option != null) { - return option; - } - - var definition = config[key]; - // Ignore options that are not defined - if (!definition) { - return; - } - - if (stack.indexOf(key) >= 0) { - throw new Error('Recursive resolution denied.'); - } - - option = options[key]; - var fallback = definition.default; - var appliedArgs = slice.call(arguments, 1); - var args = [definition.type, option].concat(appliedArgs); - - function toResolve() { - stack.push(key); - var option = normalize.apply(resolver, args); - - if (option == null) { - option = fallback; - if (typeof option === 'function') { - option = option.apply(resolver, appliedArgs); - } - } - - return option; - } - - function onResolve() { - stack.pop(); - } - - return tryResolve(toResolve, onResolve); - } - - - return resolver; -} - - -function tryResolve(toResolve, onResolve) { - try { - return toResolve(); - } finally { - onResolve(); - } -} - - -module.exports = createResolver; diff --git a/node_modules/resolve-options/package.json b/node_modules/resolve-options/package.json deleted file mode 100644 index 516b2402..00000000 --- a/node_modules/resolve-options/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_from": "resolve-options@^1.1.0", - "_id": "resolve-options@1.1.0", - "_inBundle": false, - "_integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", - "_location": "/resolve-options", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "resolve-options@^1.1.0", - "name": "resolve-options", - "escapedName": "resolve-options", - "rawSpec": "^1.1.0", - "saveSpec": null, - "fetchSpec": "^1.1.0" - }, - "_requiredBy": [ - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", - "_shasum": "32bb9e39c06d67338dc9378c0d6d6074566ad131", - "_spec": "resolve-options@^1.1.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs", - "author": { - "name": "Gulp Team", - "email": "team@gulpjs.com", - "url": "http://gulpjs.com/" - }, - "bugs": { - "url": "https://github.com/gulpjs/resolve-options/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com" - } - ], - "dependencies": { - "value-or-function": "^3.0.0" - }, - "deprecated": false, - "description": "Resolve an options object based on configuration.", - "devDependencies": { - "eslint": "^1.10.3", - "eslint-config-gulp": "^2.0.0", - "expect": "^1.20.2", - "istanbul": "^0.4.3", - "istanbul-coveralls": "^1.0.3", - "jscs": "^2.4.0", - "jscs-preset-gulp": "^1.0.0", - "mocha": "^3.2.0" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "LICENSE", - "index.js" - ], - "homepage": "https://github.com/gulpjs/resolve-options#readme", - "keywords": [ - "options", - "functions", - "resolver", - "type", - "configuration", - "config", - "opts", - "opt", - "default" - ], - "license": "MIT", - "main": "index.js", - "name": "resolve-options", - "repository": { - "type": "git", - "url": "git+https://github.com/gulpjs/resolve-options.git" - }, - "scripts": { - "cover": "istanbul cover _mocha --report lcovonly", - "coveralls": "npm run cover && istanbul-coveralls", - "lint": "eslint index.js test/ && jscs index.js test/", - "pretest": "npm run lint", - "test": "mocha --async-only" - }, - "version": "1.1.0" -} diff --git a/node_modules/rfdc/.github/workflows/ci.yml b/node_modules/rfdc/.github/workflows/ci.yml deleted file mode 100644 index 3a1b17a1..00000000 --- a/node_modules/rfdc/.github/workflows/ci.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: CI - -on: [push, pull_request] - -jobs: - test: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - node-version: [8.x, 10.x, 12.x, 14.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: npm install - - run: npm run ci diff --git a/node_modules/rfdc/LICENSE b/node_modules/rfdc/LICENSE deleted file mode 100644 index d600e514..00000000 --- a/node_modules/rfdc/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -Copyright 2019 "David Mark Clements " - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and -to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF -CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/rfdc/default.js b/node_modules/rfdc/default.js deleted file mode 100644 index 51b108d3..00000000 --- a/node_modules/rfdc/default.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict' - -module.exports = require('./index.js')() diff --git a/node_modules/rfdc/index.d.ts b/node_modules/rfdc/index.d.ts deleted file mode 100644 index 2245b625..00000000 --- a/node_modules/rfdc/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -declare namespace rfdc { - interface Options { - proto?: boolean; - circles?: boolean; - } -} - -declare function rfdc(options?: rfdc.Options): (input: T) => T; - -export = rfdc; diff --git a/node_modules/rfdc/index.js b/node_modules/rfdc/index.js deleted file mode 100644 index 3b438a4b..00000000 --- a/node_modules/rfdc/index.js +++ /dev/null @@ -1,191 +0,0 @@ -'use strict' -module.exports = rfdc - -function copyBuffer (cur) { - if (cur instanceof Buffer) { - return Buffer.from(cur) - } - - return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length) -} - -function rfdc (opts) { - opts = opts || {} - - if (opts.circles) return rfdcCircles(opts) - return opts.proto ? cloneProto : clone - - function cloneArray (a, fn) { - var keys = Object.keys(a) - var a2 = new Array(keys.length) - for (var i = 0; i < keys.length; i++) { - var k = keys[i] - var cur = a[k] - if (typeof cur !== 'object' || cur === null) { - a2[k] = cur - } else if (cur instanceof Date) { - a2[k] = new Date(cur) - } else if (ArrayBuffer.isView(cur)) { - a2[k] = copyBuffer(cur) - } else { - a2[k] = fn(cur) - } - } - return a2 - } - - function clone (o) { - if (typeof o !== 'object' || o === null) return o - if (o instanceof Date) return new Date(o) - if (Array.isArray(o)) return cloneArray(o, clone) - if (o instanceof Map) return new Map(cloneArray(Array.from(o), clone)) - if (o instanceof Set) return new Set(cloneArray(Array.from(o), clone)) - var o2 = {} - for (var k in o) { - if (Object.hasOwnProperty.call(o, k) === false) continue - var cur = o[k] - if (typeof cur !== 'object' || cur === null) { - o2[k] = cur - } else if (cur instanceof Date) { - o2[k] = new Date(cur) - } else if (cur instanceof Map) { - o2[k] = new Map(cloneArray(Array.from(cur), clone)) - } else if (cur instanceof Set) { - o2[k] = new Set(cloneArray(Array.from(cur), clone)) - } else if (ArrayBuffer.isView(cur)) { - o2[k] = copyBuffer(cur) - } else { - o2[k] = clone(cur) - } - } - return o2 - } - - function cloneProto (o) { - if (typeof o !== 'object' || o === null) return o - if (o instanceof Date) return new Date(o) - if (Array.isArray(o)) return cloneArray(o, cloneProto) - if (o instanceof Map) return new Map(cloneArray(Array.from(o), cloneProto)) - if (o instanceof Set) return new Set(cloneArray(Array.from(o), cloneProto)) - var o2 = {} - for (var k in o) { - var cur = o[k] - if (typeof cur !== 'object' || cur === null) { - o2[k] = cur - } else if (cur instanceof Date) { - o2[k] = new Date(cur) - } else if (cur instanceof Map) { - o2[k] = new Map(cloneArray(Array.from(cur), cloneProto)) - } else if (cur instanceof Set) { - o2[k] = new Set(cloneArray(Array.from(cur), cloneProto)) - } else if (ArrayBuffer.isView(cur)) { - o2[k] = copyBuffer(cur) - } else { - o2[k] = cloneProto(cur) - } - } - return o2 - } -} - -function rfdcCircles (opts) { - var refs = [] - var refsNew = [] - - return opts.proto ? cloneProto : clone - - function cloneArray (a, fn) { - var keys = Object.keys(a) - var a2 = new Array(keys.length) - for (var i = 0; i < keys.length; i++) { - var k = keys[i] - var cur = a[k] - if (typeof cur !== 'object' || cur === null) { - a2[k] = cur - } else if (cur instanceof Date) { - a2[k] = new Date(cur) - } else if (ArrayBuffer.isView(cur)) { - a2[k] = copyBuffer(cur) - } else { - var index = refs.indexOf(cur) - if (index !== -1) { - a2[k] = refsNew[index] - } else { - a2[k] = fn(cur) - } - } - } - return a2 - } - - function clone (o) { - if (typeof o !== 'object' || o === null) return o - if (o instanceof Date) return new Date(o) - if (Array.isArray(o)) return cloneArray(o, clone) - if (o instanceof Map) return new Map(cloneArray(Array.from(o), clone)) - if (o instanceof Set) return new Set(cloneArray(Array.from(o), clone)) - var o2 = {} - refs.push(o) - refsNew.push(o2) - for (var k in o) { - if (Object.hasOwnProperty.call(o, k) === false) continue - var cur = o[k] - if (typeof cur !== 'object' || cur === null) { - o2[k] = cur - } else if (cur instanceof Date) { - o2[k] = new Date(cur) - } else if (cur instanceof Map) { - o2[k] = new Map(cloneArray(Array.from(cur), clone)) - } else if (cur instanceof Set) { - o2[k] = new Set(cloneArray(Array.from(cur), clone)) - } else if (ArrayBuffer.isView(cur)) { - o2[k] = copyBuffer(cur) - } else { - var i = refs.indexOf(cur) - if (i !== -1) { - o2[k] = refsNew[i] - } else { - o2[k] = clone(cur) - } - } - } - refs.pop() - refsNew.pop() - return o2 - } - - function cloneProto (o) { - if (typeof o !== 'object' || o === null) return o - if (o instanceof Date) return new Date(o) - if (Array.isArray(o)) return cloneArray(o, cloneProto) - if (o instanceof Map) return new Map(cloneArray(Array.from(o), cloneProto)) - if (o instanceof Set) return new Set(cloneArray(Array.from(o), cloneProto)) - var o2 = {} - refs.push(o) - refsNew.push(o2) - for (var k in o) { - var cur = o[k] - if (typeof cur !== 'object' || cur === null) { - o2[k] = cur - } else if (cur instanceof Date) { - o2[k] = new Date(cur) - } else if (cur instanceof Map) { - o2[k] = new Map(cloneArray(Array.from(cur), cloneProto)) - } else if (cur instanceof Set) { - o2[k] = new Set(cloneArray(Array.from(cur), cloneProto)) - } else if (ArrayBuffer.isView(cur)) { - o2[k] = copyBuffer(cur) - } else { - var i = refs.indexOf(cur) - if (i !== -1) { - o2[k] = refsNew[i] - } else { - o2[k] = cloneProto(cur) - } - } - } - refs.pop() - refsNew.pop() - return o2 - } -} diff --git a/node_modules/rfdc/index.test-d.ts b/node_modules/rfdc/index.test-d.ts deleted file mode 100644 index 765bc151..00000000 --- a/node_modules/rfdc/index.test-d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { expectType } from 'tsd'; -import rfdc = require('.'); - -const clone = rfdc(); - -expectType(clone(5)); -expectType<{ lorem: string }>(clone({ lorem: "ipsum" })); diff --git a/node_modules/rfdc/package.json b/node_modules/rfdc/package.json deleted file mode 100644 index a9553462..00000000 --- a/node_modules/rfdc/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_from": "rfdc@^1.3.0", - "_id": "rfdc@1.3.0", - "_inBundle": false, - "_integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", - "_location": "/rfdc", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "rfdc@^1.3.0", - "name": "rfdc", - "escapedName": "rfdc", - "rawSpec": "^1.3.0", - "saveSpec": null, - "fetchSpec": "^1.3.0" - }, - "_requiredBy": [ - "/pino-pretty" - ], - "_resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", - "_shasum": "d0b7c441ab2720d05dc4cf26e01c89631d9da08b", - "_spec": "rfdc@^1.3.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pino-pretty", - "author": { - "name": "David Mark Clements", - "email": "david.clements@nearform.com" - }, - "bugs": { - "url": "https://github.com/davidmarkclements/rfdc/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Really Fast Deep Clone", - "devDependencies": { - "clone-deep": "^4.0.1", - "codecov": "^3.4.0", - "deep-copy": "^1.4.2", - "fast-copy": "^1.2.1", - "fastbench": "^1.0.1", - "lodash.clonedeep": "^4.5.0", - "standard": "^11.0.1", - "tap": "^12.0.1", - "tsd": "^0.7.4" - }, - "directories": { - "test": "test" - }, - "exports": { - ".": "./index.js", - "./default": "./default.js" - }, - "homepage": "https://github.com/davidmarkclements/rfdc#readme", - "keywords": [ - "object", - "obj", - "properties", - "clone", - "copy", - "deep", - "recursive", - "key", - "keys", - "values", - "prop", - "deep-clone", - "deepclone", - "deep-copy", - "deepcopy", - "fast", - "performance", - "performant", - "fastclone", - "fastcopy", - "fast-clone", - "fast-deep-clone", - "fast-copy", - "fast-deep-copy" - ], - "license": "MIT", - "main": "index.js", - "name": "rfdc", - "repository": { - "type": "git", - "url": "git+https://github.com/davidmarkclements/rfdc.git" - }, - "scripts": { - "bench": "node benchmark", - "ci": "standard && tap --100 --coverage-report=text-lcov test | codecov --pipe", - "cov": "tap --100 test", - "cov-ui": "tap --coverage-report=html test", - "lint": "standard --fix", - "test": "tap -R min test && npm run lint && tsd" - }, - "version": "1.3.0" -} diff --git a/node_modules/rfdc/readme.md b/node_modules/rfdc/readme.md deleted file mode 100644 index 6110c1c0..00000000 --- a/node_modules/rfdc/readme.md +++ /dev/null @@ -1,143 +0,0 @@ -# rfdc - -Really Fast Deep Clone - - -[![build status](https://img.shields.io/travis/davidmarkclements/rfdc.svg)](https://travis-ci.org/davidmarkclements/rfdc) -[![coverage](https://img.shields.io/codecov/c/github/davidmarkclements/rfdc.svg)](https://codecov.io/gh/davidmarkclements/rfdc) -[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) - - -## Usage - -```js -const clone = require('rfdc')() -clone({a: 1, b: {c: 2}}) // => {a: 1, b: {c: 2}} -``` - -## API - -### `require('rfdc')(opts = { proto: false, circles: false }) => clone(obj) => obj2` - -#### `proto` option - -Copy prototype properties as well as own properties into the new object. - -It's marginally faster to allow enumerable properties on the prototype -to be copied into the cloned object (not onto it's prototype, directly onto the object). - -To explain by way of code: - -```js -require('rfdc')({ proto: false })(Object.create({a: 1})) // => {} -require('rfdc')({ proto: true })(Object.create({a: 1})) // => {a: 1} -``` - -Setting `proto` to `true` will provide an additional 2% performance boost. - -#### `circles` option - -Keeping track of circular references will slow down performance with an -additional 25% overhead. Even if an object doesn't have any circular references, -the tracking overhead is the cost. By default if an object with a circular -reference is passed to `rfdc`, it will throw (similar to how `JSON.stringify` \ -would throw). - -Use the `circles` option to detect and preserve circular references in the -object. If performance is important, try removing the circular reference from -the object (set to `undefined`) and then add it back manually after cloning -instead of using this option. - -### `default` import -It is also possible to directly import the clone function with all options set -to their default: - -```js -const clone = require("rfdc/default") -clone({a: 1, b: {c: 2}}) // => {a: 1, b: {c: 2}} -``` - -### Types - -`rfdc` clones all JSON types: - -* `Object` -* `Array` -* `Number` -* `String` -* `null` - -With additional support for: - -* `Date` (copied) -* `undefined` (copied) -* `Buffer` (copied) -* `TypedArray` (copied) -* `Map` (copied) -* `Set` (copied) -* `Function` (referenced) -* `AsyncFunction` (referenced) -* `GeneratorFunction` (referenced) -* `arguments` (copied to a normal object) - -All other types have output values that match the output -of `JSON.parse(JSON.stringify(o))`. - -For instance: - -```js -const rfdc = require('rfdc')() -const err = Error() -err.code = 1 -JSON.parse(JSON.stringify(e)) // {code: 1} -rfdc(e) // {code: 1} - -JSON.parse(JSON.stringify({rx: /foo/})) // {rx: {}} -rfdc({rx: /foo/}) // {rx: {}} -``` - -## Benchmarks - -```sh -npm run bench -``` - -``` -benchDeepCopy*100: 457.568ms -benchLodashCloneDeep*100: 1230.773ms -benchCloneDeep*100: 655.208ms -benchFastCopy*100: 747.017ms -benchRfdc*100: 281.018ms -benchRfdcProto*100: 277.265ms -benchRfdcCircles*100: 328.148ms -benchRfdcCirclesProto*100: 323.004ms -``` - -## Tests - -```sh -npm test -``` - -``` -169 passing (342.514ms) -``` - -### Coverage - -```sh -npm run cov -``` - -``` -----------|----------|----------|----------|----------|-------------------| -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | -----------|----------|----------|----------|----------|-------------------| -All files | 100 | 100 | 100 | 100 | | - index.js | 100 | 100 | 100 | 100 | | -----------|----------|----------|----------|----------|-------------------| -``` - -## License - -MIT diff --git a/node_modules/rfdc/test/index.js b/node_modules/rfdc/test/index.js deleted file mode 100644 index 458712f8..00000000 --- a/node_modules/rfdc/test/index.js +++ /dev/null @@ -1,288 +0,0 @@ -'use strict' - -const { test } = require('tap') -const rfdc = require('..') -const cloneDefault = require('../default') -const clone = rfdc() -const cloneProto = rfdc({ proto: true }) -const cloneCircles = rfdc({ circles: true }) -const cloneCirclesProto = rfdc({ circles: true, proto: true }) - -const rnd = (max) => Math.round(Math.random() * max) - -types(clone, 'default') -types(cloneProto, 'proto option') -types(cloneCircles, 'circles option') -types(cloneCirclesProto, 'circles and proto option') - -test('default – does not copy proto properties', async ({ is }) => { - is(clone(Object.create({ a: 1 })).a, undefined, 'value not copied') -}) -test('default – shorthand import', async ({ same }) => { - same( - clone(Object.create({ a: 1 })), - cloneDefault(Object.create({ a: 1 })), - 'import equals clone with default options' - ) -}) -test('proto option – copies enumerable proto properties', async ({ is }) => { - is(cloneProto(Object.create({ a: 1 })).a, 1, 'value copied') -}) -test('circles option - circular object', async ({ same, is, isNot }) => { - const o = { nest: { a: 1, b: 2 } } - o.circular = o - same(cloneCircles(o), o, 'same values') - isNot(cloneCircles(o), o, 'different objects') - isNot(cloneCircles(o).nest, o.nest, 'different nested objects') - const c = cloneCircles(o) - is(c.circular, c, 'circular references point to copied parent') - isNot(c.circular, o, 'circular references do not point to original parent') -}) -test('circles option – deep circular object', async ({ same, is, isNot }) => { - const o = { nest: { a: 1, b: 2 } } - o.nest.circular = o - same(cloneCircles(o), o, 'same values') - isNot(cloneCircles(o), o, 'different objects') - isNot(cloneCircles(o).nest, o.nest, 'different nested objects') - const c = cloneCircles(o) - is(c.nest.circular, c, 'circular references point to copied parent') - isNot( - c.nest.circular, - o, - 'circular references do not point to original parent' - ) -}) -test('circles option alone – does not copy proto properties', async ({ - is -}) => { - is(cloneCircles(Object.create({ a: 1 })).a, undefined, 'value not copied') -}) -test('circles and proto option – copies enumerable proto properties', async ({ - is -}) => { - is(cloneCirclesProto(Object.create({ a: 1 })).a, 1, 'value copied') -}) -test('circles and proto option - circular object', async ({ - same, - is, - isNot -}) => { - const o = { nest: { a: 1, b: 2 } } - o.circular = o - same(cloneCirclesProto(o), o, 'same values') - isNot(cloneCirclesProto(o), o, 'different objects') - isNot(cloneCirclesProto(o).nest, o.nest, 'different nested objects') - const c = cloneCirclesProto(o) - is(c.circular, c, 'circular references point to copied parent') - isNot(c.circular, o, 'circular references do not point to original parent') -}) -test('circles and proto option – deep circular object', async ({ - same, - is, - isNot -}) => { - const o = { nest: { a: 1, b: 2 } } - o.nest.circular = o - same(cloneCirclesProto(o), o, 'same values') - isNot(cloneCirclesProto(o), o, 'different objects') - isNot(cloneCirclesProto(o).nest, o.nest, 'different nested objects') - const c = cloneCirclesProto(o) - is(c.nest.circular, c, 'circular references point to copied parent') - isNot( - c.nest.circular, - o, - 'circular references do not point to original parent' - ) -}) -test('circles and proto option – deep circular array', async ({ - same, - is, - isNot -}) => { - const o = { nest: [1, 2] } - o.nest.push(o) - same(cloneCirclesProto(o), o, 'same values') - isNot(cloneCirclesProto(o), o, 'different objects') - isNot(cloneCirclesProto(o).nest, o.nest, 'different nested objects') - const c = cloneCirclesProto(o) - is(c.nest[2], c, 'circular references point to copied parent') - isNot(c.nest[2], o, 'circular references do not point to original parent') -}) - -function types (clone, label) { - test(label + ' – number', async ({ is }) => { - is(clone(42), 42, 'same value') - }) - test(label + ' – string', async ({ is }) => { - is(clone('str'), 'str', 'same value') - }) - test(label + ' – boolean', async ({ is }) => { - is(clone(true), true, 'same value') - }) - test(label + ' – function', async ({ is }) => { - const fn = () => {} - is(clone(fn), fn, 'same function') - }) - test(label + ' – async function', async ({ is }) => { - const fn = async () => {} - is(clone(fn), fn, 'same function') - }) - test(label + ' – generator function', async ({ is }) => { - const fn = function * () {} - is(clone(fn), fn, 'same function') - }) - test(label + ' – date', async ({ is, isNot }) => { - const date = new Date() - is(+clone(date), +date, 'same value') - isNot(clone(date), date, 'different object') - }) - test(label + ' – null', async ({ is }) => { - is(clone(null), null, 'same value') - }) - test(label + ' – shallow object', async ({ same, isNot }) => { - const o = { a: 1, b: 2 } - same(clone(o), o, 'same values') - isNot(clone(o), o, 'different object') - }) - test(label + ' – shallow array', async ({ same, isNot }) => { - const o = [1, 2] - same(clone(o), o, 'same values') - isNot(clone(o), o, 'different arrays') - }) - test(label + ' – deep object', async ({ same, isNot }) => { - const o = { nest: { a: 1, b: 2 } } - same(clone(o), o, 'same values') - isNot(clone(o), o, 'different objects') - isNot(clone(o).nest, o.nest, 'different nested objects') - }) - test(label + ' – deep array', async ({ same, isNot }) => { - const o = [{ a: 1, b: 2 }, [3]] - same(clone(o), o, 'same values') - isNot(clone(o), o, 'different arrays') - isNot(clone(o)[0], o[0], 'different array elements') - isNot(clone(o)[1], o[1], 'different array elements') - }) - test(label + ' – nested number', async ({ is }) => { - is(clone({ a: 1 }).a, 1, 'same value') - }) - test(label + ' – nested string', async ({ is }) => { - is(clone({ s: 'str' }).s, 'str', 'same value') - }) - test(label + ' – nested boolean', async ({ is }) => { - is(clone({ b: true }).b, true, 'same value') - }) - test(label + ' – nested function', async ({ is }) => { - const fn = () => {} - is(clone({ fn }).fn, fn, 'same function') - }) - test(label + ' – nested async function', async ({ is }) => { - const fn = async () => {} - is(clone({ fn }).fn, fn, 'same function') - }) - test(label + ' – nested generator function', async ({ is }) => { - const fn = function * () {} - is(clone({ fn }).fn, fn, 'same function') - }) - test(label + ' – nested date', async ({ is, isNot }) => { - const date = new Date() - is(+clone({ d: date }).d, +date, 'same value') - isNot(clone({ d: date }).d, date, 'different object') - }) - test(label + ' – nested date in array', async ({ is, isNot }) => { - const date = new Date() - is(+clone({ d: [date] }).d[0], +date, 'same value') - isNot(clone({ d: [date] }).d[0], date, 'different object') - is(+cloneCircles({ d: [date] }).d[0], +date, 'same value') - isNot(cloneCircles({ d: [date] }).d, date, 'different object') - }) - test(label + ' – nested null', async ({ is }) => { - is(clone({ n: null }).n, null, 'same value') - }) - test(label + ' – arguments', async ({ isNot, same }) => { - function fn (...args) { - same(clone(arguments), args, 'same values') - isNot(clone(arguments), arguments, 'different object') - } - fn(1, 2, 3) - }) - test(`${label} copies buffers from object correctly`, async ({ ok, is, isNot }) => { - const input = Date.now().toString(36) - const inputBuffer = Buffer.from(input) - const clonedBuffer = clone({ a: inputBuffer }).a - ok(Buffer.isBuffer(clonedBuffer), 'cloned value is buffer') - isNot(clonedBuffer, inputBuffer, 'cloned buffer is not same as input buffer') - is(clonedBuffer.toString(), input, 'cloned buffer content is correct') - }) - test(`${label} copies buffers from arrays correctly`, async ({ ok, is, isNot }) => { - const input = Date.now().toString(36) - const inputBuffer = Buffer.from(input) - const [clonedBuffer] = clone([inputBuffer]) - ok(Buffer.isBuffer(clonedBuffer), 'cloned value is buffer') - isNot(clonedBuffer, inputBuffer, 'cloned buffer is not same as input buffer') - is(clonedBuffer.toString(), input, 'cloned buffer content is correct') - }) - test(`${label} copies TypedArrays from object correctly`, async ({ ok, is, isNot }) => { - const [input1, input2] = [rnd(10), rnd(10)] - var buffer = new ArrayBuffer(8) - const int32View = new Int32Array(buffer) - int32View[0] = input1 - int32View[1] = input2 - const cloned = clone({ a: int32View }).a - ok(cloned instanceof Int32Array, 'cloned value is instance of class') - isNot(cloned, int32View, 'cloned value is not same as input value') - is(cloned[0], input1, 'cloned value content is correct') - is(cloned[1], input2, 'cloned value content is correct') - }) - test(`${label} copies TypedArrays from array correctly`, async ({ ok, is, isNot }) => { - const [input1, input2] = [rnd(10), rnd(10)] - var buffer = new ArrayBuffer(16) - const int32View = new Int32Array(buffer) - int32View[0] = input1 - int32View[1] = input2 - const [cloned] = clone([int32View]) - ok(cloned instanceof Int32Array, 'cloned value is instance of class') - isNot(cloned, int32View, 'cloned value is not same as input value') - is(cloned[0], input1, 'cloned value content is correct') - is(cloned[1], input2, 'cloned value content is correct') - }) - test(`${label} copies complex TypedArrays`, async ({ ok, deepEqual, is, isNot }) => { - const [input1, input2, input3] = [rnd(10), rnd(10), rnd(10)] - var buffer = new ArrayBuffer(4) - const view1 = new Int8Array(buffer, 0, 2) - const view2 = new Int8Array(buffer, 2, 2) - const view3 = new Int8Array(buffer) - view1[0] = input1 - view2[0] = input2 - view3[3] = input3 - const cloned = clone({ view1, view2, view3 }) - ok(cloned.view1 instanceof Int8Array, 'cloned value is instance of class') - ok(cloned.view2 instanceof Int8Array, 'cloned value is instance of class') - ok(cloned.view3 instanceof Int8Array, 'cloned value is instance of class') - isNot(cloned.view1, view1, 'cloned value is not same as input value') - isNot(cloned.view2, view2, 'cloned value is not same as input value') - isNot(cloned.view3, view3, 'cloned value is not same as input value') - deepEqual(Array.from(cloned.view1), [input1, 0], 'cloned value content is correct') - deepEqual(Array.from(cloned.view2), [input2, input3], 'cloned value content is correct') - deepEqual(Array.from(cloned.view3), [input1, 0, input2, input3], 'cloned value content is correct') - }) - test(`${label} - maps`, async ({ same, isNot }) => { - const map = new Map([['a', 1]]) - same(Array.from(clone(map)), [['a', 1]], 'same value') - isNot(clone(map), map, 'different object') - }) - test(`${label} - sets`, async ({ same, isNot }) => { - const set = new Set([1]) - same(Array.from(clone(set)), [1]) - isNot(clone(set), set, 'different object') - }) - test(`${label} - nested maps`, async ({ same, isNot }) => { - const data = { m: new Map([['a', 1]]) } - same(Array.from(clone(data).m), [['a', 1]], 'same value') - isNot(clone(data).m, data.m, 'different object') - }) - test(`${label} - nested sets`, async ({ same, isNot }) => { - const data = { s: new Set([1]) } - same(Array.from(clone(data).s), [1], 'same value') - isNot(clone(data).s, data.s, 'different object') - }) -} diff --git a/node_modules/safe-buffer/LICENSE b/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068cee..00000000 --- a/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/safe-buffer/README.md b/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81afd..00000000 --- a/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) - - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) - - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) - - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) - - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) - - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/node_modules/safe-buffer/index.d.ts b/node_modules/safe-buffer/index.d.ts deleted file mode 100644 index e9fed809..00000000 --- a/node_modules/safe-buffer/index.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "safe-buffer" { - export class Buffer { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - } -} \ No newline at end of file diff --git a/node_modules/safe-buffer/index.js b/node_modules/safe-buffer/index.js deleted file mode 100644 index f8d3ec98..00000000 --- a/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,65 +0,0 @@ -/*! safe-buffer. MIT License. Feross Aboukhadijeh */ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.prototype = Object.create(Buffer.prototype) - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/node_modules/safe-buffer/package.json b/node_modules/safe-buffer/package.json deleted file mode 100644 index 50c4cf39..00000000 --- a/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_from": "safe-buffer@~5.2.0", - "_id": "safe-buffer@5.2.1", - "_inBundle": false, - "_integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "_location": "/safe-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "safe-buffer@~5.2.0", - "name": "safe-buffer", - "escapedName": "safe-buffer", - "rawSpec": "~5.2.0", - "saveSpec": null, - "fetchSpec": "~5.2.0" - }, - "_requiredBy": [ - "/remove-bom-stream", - "/sha.js", - "/string_decoder" - ], - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "_shasum": "1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6", - "_spec": "safe-buffer@~5.2.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/string_decoder", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Safer Node.js Buffer API", - "devDependencies": { - "standard": "*", - "tape": "^5.0.0" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "name": "safe-buffer", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "types": "index.d.ts", - "version": "5.2.1" -} diff --git a/node_modules/sha.js/.travis.yml b/node_modules/sha.js/.travis.yml deleted file mode 100644 index 0b606eb5..00000000 --- a/node_modules/sha.js/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -sudo: false -os: - - linux -language: node_js -node_js: - - "4" - - "5" - - "6" - - "7" -env: - matrix: - - TEST_SUITE=unit -matrix: - include: - - node_js: "7" - env: TEST_SUITE=lint -script: npm run $TEST_SUITE diff --git a/node_modules/sha.js/LICENSE b/node_modules/sha.js/LICENSE deleted file mode 100644 index 11888c13..00000000 --- a/node_modules/sha.js/LICENSE +++ /dev/null @@ -1,49 +0,0 @@ -Copyright (c) 2013-2018 sha.js contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -Copyright (c) 1998 - 2009, Paul Johnston & Contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, this -list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. - -Neither the name of the author nor the names of its contributors may be used to -endorse or promote products derived from this software without specific prior -written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/node_modules/sha.js/README.md b/node_modules/sha.js/README.md deleted file mode 100644 index 1cc3db55..00000000 --- a/node_modules/sha.js/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# sha.js -[![NPM Package](https://img.shields.io/npm/v/sha.js.svg?style=flat-square)](https://www.npmjs.org/package/sha.js) -[![Build Status](https://img.shields.io/travis/crypto-browserify/sha.js.svg?branch=master&style=flat-square)](https://travis-ci.org/crypto-browserify/sha.js) -[![Dependency status](https://img.shields.io/david/crypto-browserify/sha.js.svg?style=flat-square)](https://david-dm.org/crypto-browserify/sha.js#info=dependencies) - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -Node style `SHA` on pure JavaScript. - -```js -var shajs = require('sha.js') - -console.log(shajs('sha256').update('42').digest('hex')) -// => 73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049 -console.log(new shajs.sha256().update('42').digest('hex')) -// => 73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049 - -var sha256stream = shajs('sha256') -sha256stream.end('42') -console.log(sha256stream.read().toString('hex')) -// => 73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049 -``` - -## supported hashes -`sha.js` currently implements: - - - SHA (SHA-0) -- **legacy, do not use in new systems** - - SHA-1 -- **legacy, do not use in new systems** - - SHA-224 - - SHA-256 - - SHA-384 - - SHA-512 - - -## Not an actual stream -Note, this doesn't actually implement a stream, but wrapping this in a stream is trivial. -It does update incrementally, so you can hash things larger than RAM, as it uses a constant amount of memory (except when using base64 or utf8 encoding, see code comments). - - -## Acknowledgements -This work is derived from Paul Johnston's [A JavaScript implementation of the Secure Hash Algorithm](http://pajhome.org.uk/crypt/md5/sha1.html). - - -## LICENSE [MIT](LICENSE) diff --git a/node_modules/sha.js/bin.js b/node_modules/sha.js/bin.js deleted file mode 100755 index 5a7ac83a..00000000 --- a/node_modules/sha.js/bin.js +++ /dev/null @@ -1,41 +0,0 @@ -#! /usr/bin/env node - -var createHash = require('./browserify') -var argv = process.argv.slice(2) - -function pipe (algorithm, s) { - var start = Date.now() - var hash = createHash(algorithm || 'sha1') - - s.on('data', function (data) { - hash.update(data) - }) - - s.on('end', function () { - if (process.env.DEBUG) { - return console.log(hash.digest('hex'), Date.now() - start) - } - - console.log(hash.digest('hex')) - }) -} - -function usage () { - console.error('sha.js [algorithm=sha1] [filename] # hash filename with algorithm') - console.error('input | sha.js [algorithm=sha1] # hash stdin with algorithm') - console.error('sha.js --help # display this message') -} - -if (!process.stdin.isTTY) { - pipe(argv[0], process.stdin) -} else if (argv.length) { - if (/--help|-h/.test(argv[0])) { - usage() - } else { - var filename = argv.pop() - var algorithm = argv.pop() - pipe(algorithm, require('fs').createReadStream(filename)) - } -} else { - usage() -} diff --git a/node_modules/sha.js/hash.js b/node_modules/sha.js/hash.js deleted file mode 100644 index 013537a9..00000000 --- a/node_modules/sha.js/hash.js +++ /dev/null @@ -1,81 +0,0 @@ -var Buffer = require('safe-buffer').Buffer - -// prototype class for hash functions -function Hash (blockSize, finalSize) { - this._block = Buffer.alloc(blockSize) - this._finalSize = finalSize - this._blockSize = blockSize - this._len = 0 -} - -Hash.prototype.update = function (data, enc) { - if (typeof data === 'string') { - enc = enc || 'utf8' - data = Buffer.from(data, enc) - } - - var block = this._block - var blockSize = this._blockSize - var length = data.length - var accum = this._len - - for (var offset = 0; offset < length;) { - var assigned = accum % blockSize - var remainder = Math.min(length - offset, blockSize - assigned) - - for (var i = 0; i < remainder; i++) { - block[assigned + i] = data[offset + i] - } - - accum += remainder - offset += remainder - - if ((accum % blockSize) === 0) { - this._update(block) - } - } - - this._len += length - return this -} - -Hash.prototype.digest = function (enc) { - var rem = this._len % this._blockSize - - this._block[rem] = 0x80 - - // zero (rem + 1) trailing bits, where (rem + 1) is the smallest - // non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize - this._block.fill(0, rem + 1) - - if (rem >= this._finalSize) { - this._update(this._block) - this._block.fill(0) - } - - var bits = this._len * 8 - - // uint32 - if (bits <= 0xffffffff) { - this._block.writeUInt32BE(bits, this._blockSize - 4) - - // uint64 - } else { - var lowBits = (bits & 0xffffffff) >>> 0 - var highBits = (bits - lowBits) / 0x100000000 - - this._block.writeUInt32BE(highBits, this._blockSize - 8) - this._block.writeUInt32BE(lowBits, this._blockSize - 4) - } - - this._update(this._block) - var hash = this._hash() - - return enc ? hash.toString(enc) : hash -} - -Hash.prototype._update = function () { - throw new Error('_update must be implemented by subclass') -} - -module.exports = Hash diff --git a/node_modules/sha.js/index.js b/node_modules/sha.js/index.js deleted file mode 100644 index 87cdf493..00000000 --- a/node_modules/sha.js/index.js +++ /dev/null @@ -1,15 +0,0 @@ -var exports = module.exports = function SHA (algorithm) { - algorithm = algorithm.toLowerCase() - - var Algorithm = exports[algorithm] - if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)') - - return new Algorithm() -} - -exports.sha = require('./sha') -exports.sha1 = require('./sha1') -exports.sha224 = require('./sha224') -exports.sha256 = require('./sha256') -exports.sha384 = require('./sha384') -exports.sha512 = require('./sha512') diff --git a/node_modules/sha.js/package.json b/node_modules/sha.js/package.json deleted file mode 100644 index b4162b81..00000000 --- a/node_modules/sha.js/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "sha.js@^2.4.9", - "_id": "sha.js@2.4.11", - "_inBundle": false, - "_integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "_location": "/sha.js", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "sha.js@^2.4.9", - "name": "sha.js", - "escapedName": "sha.js", - "rawSpec": "^2.4.9", - "saveSpec": null, - "fetchSpec": "^2.4.9" - }, - "_requiredBy": [ - "/isomorphic-git" - ], - "_resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "_shasum": "37a5cf0b81ecbc6943de109ba2960d1b26584ae7", - "_spec": "sha.js@^2.4.9", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/isomorphic-git", - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "dominictarr.com" - }, - "bin": { - "sha.js": "bin.js" - }, - "bugs": { - "url": "https://github.com/crypto-browserify/sha.js/issues" - }, - "bundleDependencies": false, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "deprecated": false, - "description": "Streamable SHA hashes in pure javascript", - "devDependencies": { - "buffer": "~2.3.2", - "hash-test-vectors": "^1.3.1", - "standard": "^10.0.2", - "tape": "~2.3.2", - "typedarray": "0.0.6" - }, - "homepage": "https://github.com/crypto-browserify/sha.js", - "license": "(MIT AND BSD-3-Clause)", - "name": "sha.js", - "repository": { - "type": "git", - "url": "git://github.com/crypto-browserify/sha.js.git" - }, - "scripts": { - "lint": "standard", - "prepublish": "npm ls && npm run unit", - "test": "npm run lint && npm run unit", - "unit": "set -e; for t in test/*.js; do node $t; done;" - }, - "version": "2.4.11" -} diff --git a/node_modules/sha.js/sha.js b/node_modules/sha.js/sha.js deleted file mode 100644 index 50c4fa80..00000000 --- a/node_modules/sha.js/sha.js +++ /dev/null @@ -1,94 +0,0 @@ -/* - * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined - * in FIPS PUB 180-1 - * This source code is derived from sha1.js of the same repository. - * The difference between SHA-0 and SHA-1 is just a bitwise rotate left - * operation was added. - */ - -var inherits = require('inherits') -var Hash = require('./hash') -var Buffer = require('safe-buffer').Buffer - -var K = [ - 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0 -] - -var W = new Array(80) - -function Sha () { - this.init() - this._w = W - - Hash.call(this, 64, 56) -} - -inherits(Sha, Hash) - -Sha.prototype.init = function () { - this._a = 0x67452301 - this._b = 0xefcdab89 - this._c = 0x98badcfe - this._d = 0x10325476 - this._e = 0xc3d2e1f0 - - return this -} - -function rotl5 (num) { - return (num << 5) | (num >>> 27) -} - -function rotl30 (num) { - return (num << 30) | (num >>> 2) -} - -function ft (s, b, c, d) { - if (s === 0) return (b & c) | ((~b) & d) - if (s === 2) return (b & c) | (b & d) | (c & d) - return b ^ c ^ d -} - -Sha.prototype._update = function (M) { - var W = this._w - - var a = this._a | 0 - var b = this._b | 0 - var c = this._c | 0 - var d = this._d | 0 - var e = this._e | 0 - - for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) - for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16] - - for (var j = 0; j < 80; ++j) { - var s = ~~(j / 20) - var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0 - - e = d - d = c - c = rotl30(b) - b = a - a = t - } - - this._a = (a + this._a) | 0 - this._b = (b + this._b) | 0 - this._c = (c + this._c) | 0 - this._d = (d + this._d) | 0 - this._e = (e + this._e) | 0 -} - -Sha.prototype._hash = function () { - var H = Buffer.allocUnsafe(20) - - H.writeInt32BE(this._a | 0, 0) - H.writeInt32BE(this._b | 0, 4) - H.writeInt32BE(this._c | 0, 8) - H.writeInt32BE(this._d | 0, 12) - H.writeInt32BE(this._e | 0, 16) - - return H -} - -module.exports = Sha diff --git a/node_modules/sha.js/sha1.js b/node_modules/sha.js/sha1.js deleted file mode 100644 index cabd747c..00000000 --- a/node_modules/sha.js/sha1.js +++ /dev/null @@ -1,99 +0,0 @@ -/* - * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined - * in FIPS PUB 180-1 - * Version 2.1a Copyright Paul Johnston 2000 - 2002. - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * Distributed under the BSD License - * See http://pajhome.org.uk/crypt/md5 for details. - */ - -var inherits = require('inherits') -var Hash = require('./hash') -var Buffer = require('safe-buffer').Buffer - -var K = [ - 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0 -] - -var W = new Array(80) - -function Sha1 () { - this.init() - this._w = W - - Hash.call(this, 64, 56) -} - -inherits(Sha1, Hash) - -Sha1.prototype.init = function () { - this._a = 0x67452301 - this._b = 0xefcdab89 - this._c = 0x98badcfe - this._d = 0x10325476 - this._e = 0xc3d2e1f0 - - return this -} - -function rotl1 (num) { - return (num << 1) | (num >>> 31) -} - -function rotl5 (num) { - return (num << 5) | (num >>> 27) -} - -function rotl30 (num) { - return (num << 30) | (num >>> 2) -} - -function ft (s, b, c, d) { - if (s === 0) return (b & c) | ((~b) & d) - if (s === 2) return (b & c) | (b & d) | (c & d) - return b ^ c ^ d -} - -Sha1.prototype._update = function (M) { - var W = this._w - - var a = this._a | 0 - var b = this._b | 0 - var c = this._c | 0 - var d = this._d | 0 - var e = this._e | 0 - - for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) - for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]) - - for (var j = 0; j < 80; ++j) { - var s = ~~(j / 20) - var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0 - - e = d - d = c - c = rotl30(b) - b = a - a = t - } - - this._a = (a + this._a) | 0 - this._b = (b + this._b) | 0 - this._c = (c + this._c) | 0 - this._d = (d + this._d) | 0 - this._e = (e + this._e) | 0 -} - -Sha1.prototype._hash = function () { - var H = Buffer.allocUnsafe(20) - - H.writeInt32BE(this._a | 0, 0) - H.writeInt32BE(this._b | 0, 4) - H.writeInt32BE(this._c | 0, 8) - H.writeInt32BE(this._d | 0, 12) - H.writeInt32BE(this._e | 0, 16) - - return H -} - -module.exports = Sha1 diff --git a/node_modules/sha.js/sha224.js b/node_modules/sha.js/sha224.js deleted file mode 100644 index 35541e57..00000000 --- a/node_modules/sha.js/sha224.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined - * in FIPS 180-2 - * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009. - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * - */ - -var inherits = require('inherits') -var Sha256 = require('./sha256') -var Hash = require('./hash') -var Buffer = require('safe-buffer').Buffer - -var W = new Array(64) - -function Sha224 () { - this.init() - - this._w = W // new Array(64) - - Hash.call(this, 64, 56) -} - -inherits(Sha224, Sha256) - -Sha224.prototype.init = function () { - this._a = 0xc1059ed8 - this._b = 0x367cd507 - this._c = 0x3070dd17 - this._d = 0xf70e5939 - this._e = 0xffc00b31 - this._f = 0x68581511 - this._g = 0x64f98fa7 - this._h = 0xbefa4fa4 - - return this -} - -Sha224.prototype._hash = function () { - var H = Buffer.allocUnsafe(28) - - H.writeInt32BE(this._a, 0) - H.writeInt32BE(this._b, 4) - H.writeInt32BE(this._c, 8) - H.writeInt32BE(this._d, 12) - H.writeInt32BE(this._e, 16) - H.writeInt32BE(this._f, 20) - H.writeInt32BE(this._g, 24) - - return H -} - -module.exports = Sha224 diff --git a/node_modules/sha.js/sha256.js b/node_modules/sha.js/sha256.js deleted file mode 100644 index 342e48ae..00000000 --- a/node_modules/sha.js/sha256.js +++ /dev/null @@ -1,135 +0,0 @@ -/** - * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined - * in FIPS 180-2 - * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009. - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * - */ - -var inherits = require('inherits') -var Hash = require('./hash') -var Buffer = require('safe-buffer').Buffer - -var K = [ - 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, - 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, - 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, - 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, - 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, - 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, - 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, - 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, - 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, - 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, - 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, - 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, - 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, - 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, - 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, - 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2 -] - -var W = new Array(64) - -function Sha256 () { - this.init() - - this._w = W // new Array(64) - - Hash.call(this, 64, 56) -} - -inherits(Sha256, Hash) - -Sha256.prototype.init = function () { - this._a = 0x6a09e667 - this._b = 0xbb67ae85 - this._c = 0x3c6ef372 - this._d = 0xa54ff53a - this._e = 0x510e527f - this._f = 0x9b05688c - this._g = 0x1f83d9ab - this._h = 0x5be0cd19 - - return this -} - -function ch (x, y, z) { - return z ^ (x & (y ^ z)) -} - -function maj (x, y, z) { - return (x & y) | (z & (x | y)) -} - -function sigma0 (x) { - return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10) -} - -function sigma1 (x) { - return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7) -} - -function gamma0 (x) { - return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3) -} - -function gamma1 (x) { - return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10) -} - -Sha256.prototype._update = function (M) { - var W = this._w - - var a = this._a | 0 - var b = this._b | 0 - var c = this._c | 0 - var d = this._d | 0 - var e = this._e | 0 - var f = this._f | 0 - var g = this._g | 0 - var h = this._h | 0 - - for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) - for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0 - - for (var j = 0; j < 64; ++j) { - var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0 - var T2 = (sigma0(a) + maj(a, b, c)) | 0 - - h = g - g = f - f = e - e = (d + T1) | 0 - d = c - c = b - b = a - a = (T1 + T2) | 0 - } - - this._a = (a + this._a) | 0 - this._b = (b + this._b) | 0 - this._c = (c + this._c) | 0 - this._d = (d + this._d) | 0 - this._e = (e + this._e) | 0 - this._f = (f + this._f) | 0 - this._g = (g + this._g) | 0 - this._h = (h + this._h) | 0 -} - -Sha256.prototype._hash = function () { - var H = Buffer.allocUnsafe(32) - - H.writeInt32BE(this._a, 0) - H.writeInt32BE(this._b, 4) - H.writeInt32BE(this._c, 8) - H.writeInt32BE(this._d, 12) - H.writeInt32BE(this._e, 16) - H.writeInt32BE(this._f, 20) - H.writeInt32BE(this._g, 24) - H.writeInt32BE(this._h, 28) - - return H -} - -module.exports = Sha256 diff --git a/node_modules/sha.js/sha384.js b/node_modules/sha.js/sha384.js deleted file mode 100644 index afc85e51..00000000 --- a/node_modules/sha.js/sha384.js +++ /dev/null @@ -1,57 +0,0 @@ -var inherits = require('inherits') -var SHA512 = require('./sha512') -var Hash = require('./hash') -var Buffer = require('safe-buffer').Buffer - -var W = new Array(160) - -function Sha384 () { - this.init() - this._w = W - - Hash.call(this, 128, 112) -} - -inherits(Sha384, SHA512) - -Sha384.prototype.init = function () { - this._ah = 0xcbbb9d5d - this._bh = 0x629a292a - this._ch = 0x9159015a - this._dh = 0x152fecd8 - this._eh = 0x67332667 - this._fh = 0x8eb44a87 - this._gh = 0xdb0c2e0d - this._hh = 0x47b5481d - - this._al = 0xc1059ed8 - this._bl = 0x367cd507 - this._cl = 0x3070dd17 - this._dl = 0xf70e5939 - this._el = 0xffc00b31 - this._fl = 0x68581511 - this._gl = 0x64f98fa7 - this._hl = 0xbefa4fa4 - - return this -} - -Sha384.prototype._hash = function () { - var H = Buffer.allocUnsafe(48) - - function writeInt64BE (h, l, offset) { - H.writeInt32BE(h, offset) - H.writeInt32BE(l, offset + 4) - } - - writeInt64BE(this._ah, this._al, 0) - writeInt64BE(this._bh, this._bl, 8) - writeInt64BE(this._ch, this._cl, 16) - writeInt64BE(this._dh, this._dl, 24) - writeInt64BE(this._eh, this._el, 32) - writeInt64BE(this._fh, this._fl, 40) - - return H -} - -module.exports = Sha384 diff --git a/node_modules/sha.js/sha512.js b/node_modules/sha.js/sha512.js deleted file mode 100644 index fb28f2f6..00000000 --- a/node_modules/sha.js/sha512.js +++ /dev/null @@ -1,260 +0,0 @@ -var inherits = require('inherits') -var Hash = require('./hash') -var Buffer = require('safe-buffer').Buffer - -var K = [ - 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, - 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, - 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, - 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, - 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, - 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, - 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, - 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, - 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, - 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, - 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, - 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, - 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, - 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, - 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, - 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, - 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, - 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, - 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, - 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, - 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, - 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, - 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, - 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, - 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, - 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, - 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, - 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, - 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, - 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, - 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, - 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, - 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, - 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, - 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, - 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, - 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, - 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, - 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, - 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 -] - -var W = new Array(160) - -function Sha512 () { - this.init() - this._w = W - - Hash.call(this, 128, 112) -} - -inherits(Sha512, Hash) - -Sha512.prototype.init = function () { - this._ah = 0x6a09e667 - this._bh = 0xbb67ae85 - this._ch = 0x3c6ef372 - this._dh = 0xa54ff53a - this._eh = 0x510e527f - this._fh = 0x9b05688c - this._gh = 0x1f83d9ab - this._hh = 0x5be0cd19 - - this._al = 0xf3bcc908 - this._bl = 0x84caa73b - this._cl = 0xfe94f82b - this._dl = 0x5f1d36f1 - this._el = 0xade682d1 - this._fl = 0x2b3e6c1f - this._gl = 0xfb41bd6b - this._hl = 0x137e2179 - - return this -} - -function Ch (x, y, z) { - return z ^ (x & (y ^ z)) -} - -function maj (x, y, z) { - return (x & y) | (z & (x | y)) -} - -function sigma0 (x, xl) { - return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25) -} - -function sigma1 (x, xl) { - return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23) -} - -function Gamma0 (x, xl) { - return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7) -} - -function Gamma0l (x, xl) { - return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7 | xl << 25) -} - -function Gamma1 (x, xl) { - return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6) -} - -function Gamma1l (x, xl) { - return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26) -} - -function getCarry (a, b) { - return (a >>> 0) < (b >>> 0) ? 1 : 0 -} - -Sha512.prototype._update = function (M) { - var W = this._w - - var ah = this._ah | 0 - var bh = this._bh | 0 - var ch = this._ch | 0 - var dh = this._dh | 0 - var eh = this._eh | 0 - var fh = this._fh | 0 - var gh = this._gh | 0 - var hh = this._hh | 0 - - var al = this._al | 0 - var bl = this._bl | 0 - var cl = this._cl | 0 - var dl = this._dl | 0 - var el = this._el | 0 - var fl = this._fl | 0 - var gl = this._gl | 0 - var hl = this._hl | 0 - - for (var i = 0; i < 32; i += 2) { - W[i] = M.readInt32BE(i * 4) - W[i + 1] = M.readInt32BE(i * 4 + 4) - } - for (; i < 160; i += 2) { - var xh = W[i - 15 * 2] - var xl = W[i - 15 * 2 + 1] - var gamma0 = Gamma0(xh, xl) - var gamma0l = Gamma0l(xl, xh) - - xh = W[i - 2 * 2] - xl = W[i - 2 * 2 + 1] - var gamma1 = Gamma1(xh, xl) - var gamma1l = Gamma1l(xl, xh) - - // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] - var Wi7h = W[i - 7 * 2] - var Wi7l = W[i - 7 * 2 + 1] - - var Wi16h = W[i - 16 * 2] - var Wi16l = W[i - 16 * 2 + 1] - - var Wil = (gamma0l + Wi7l) | 0 - var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0 - Wil = (Wil + gamma1l) | 0 - Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0 - Wil = (Wil + Wi16l) | 0 - Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0 - - W[i] = Wih - W[i + 1] = Wil - } - - for (var j = 0; j < 160; j += 2) { - Wih = W[j] - Wil = W[j + 1] - - var majh = maj(ah, bh, ch) - var majl = maj(al, bl, cl) - - var sigma0h = sigma0(ah, al) - var sigma0l = sigma0(al, ah) - var sigma1h = sigma1(eh, el) - var sigma1l = sigma1(el, eh) - - // t1 = h + sigma1 + ch + K[j] + W[j] - var Kih = K[j] - var Kil = K[j + 1] - - var chh = Ch(eh, fh, gh) - var chl = Ch(el, fl, gl) - - var t1l = (hl + sigma1l) | 0 - var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0 - t1l = (t1l + chl) | 0 - t1h = (t1h + chh + getCarry(t1l, chl)) | 0 - t1l = (t1l + Kil) | 0 - t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0 - t1l = (t1l + Wil) | 0 - t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0 - - // t2 = sigma0 + maj - var t2l = (sigma0l + majl) | 0 - var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0 - - hh = gh - hl = gl - gh = fh - gl = fl - fh = eh - fl = el - el = (dl + t1l) | 0 - eh = (dh + t1h + getCarry(el, dl)) | 0 - dh = ch - dl = cl - ch = bh - cl = bl - bh = ah - bl = al - al = (t1l + t2l) | 0 - ah = (t1h + t2h + getCarry(al, t1l)) | 0 - } - - this._al = (this._al + al) | 0 - this._bl = (this._bl + bl) | 0 - this._cl = (this._cl + cl) | 0 - this._dl = (this._dl + dl) | 0 - this._el = (this._el + el) | 0 - this._fl = (this._fl + fl) | 0 - this._gl = (this._gl + gl) | 0 - this._hl = (this._hl + hl) | 0 - - this._ah = (this._ah + ah + getCarry(this._al, al)) | 0 - this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0 - this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0 - this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0 - this._eh = (this._eh + eh + getCarry(this._el, el)) | 0 - this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0 - this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0 - this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0 -} - -Sha512.prototype._hash = function () { - var H = Buffer.allocUnsafe(64) - - function writeInt64BE (h, l, offset) { - H.writeInt32BE(h, offset) - H.writeInt32BE(l, offset + 4) - } - - writeInt64BE(this._ah, this._al, 0) - writeInt64BE(this._bh, this._bl, 8) - writeInt64BE(this._ch, this._cl, 16) - writeInt64BE(this._dh, this._dl, 24) - writeInt64BE(this._eh, this._el, 32) - writeInt64BE(this._fh, this._fl, 40) - writeInt64BE(this._gh, this._gl, 48) - writeInt64BE(this._hh, this._hl, 56) - - return H -} - -module.exports = Sha512 diff --git a/node_modules/sha.js/test/hash.js b/node_modules/sha.js/test/hash.js deleted file mode 100644 index 5fa000d5..00000000 --- a/node_modules/sha.js/test/hash.js +++ /dev/null @@ -1,75 +0,0 @@ -var tape = require('tape') -var Hash = require('../hash') -var hex = '0A1B2C3D4E5F6G7H' - -function equal (t, a, b) { - t.equal(a.length, b.length) - t.equal(a.toString('hex'), b.toString('hex')) -} - -var hexBuf = Buffer.from('0A1B2C3D4E5F6G7H', 'utf8') -var count16 = { - strings: ['0A1B2C3D4E5F6G7H'], - buffers: [ - hexBuf, - Buffer.from('80000000000000000000000000000080', 'hex') - ] -} - -var empty = { - strings: [''], - buffers: [ - Buffer.from('80000000000000000000000000000000', 'hex') - ] -} - -var multi = { - strings: ['abcd', 'efhijk', 'lmnopq'], - buffers: [ - Buffer.from('abcdefhijklmnopq', 'ascii'), - Buffer.from('80000000000000000000000000000080', 'hex') - ] -} - -var long = { - strings: [hex + hex], - buffers: [ - hexBuf, - hexBuf, - Buffer.from('80000000000000000000000000000100', 'hex') - ] -} - -function makeTest (name, data) { - tape(name, function (t) { - var h = new Hash(16, 8) - var hash = Buffer.alloc(20) - var n = 2 - var expected = data.buffers.slice() - // t.plan(expected.length + 1) - - h._update = function (block) { - var e = expected.shift() - equal(t, block, e) - - if (n < 0) { - throw new Error('expecting only 2 calls to _update') - } - } - h._hash = function () { - return hash - } - - data.strings.forEach(function (string) { - h.update(string, 'ascii') - }) - - equal(t, h.digest(), hash) - t.end() - }) -} - -makeTest('Hash#update 1 in 1', count16) -makeTest('empty Hash#update', empty) -makeTest('Hash#update 1 in 3', multi) -makeTest('Hash#update 2 in 1', long) diff --git a/node_modules/sha.js/test/test.js b/node_modules/sha.js/test/test.js deleted file mode 100644 index dac8580b..00000000 --- a/node_modules/sha.js/test/test.js +++ /dev/null @@ -1,100 +0,0 @@ -var crypto = require('crypto') -var tape = require('tape') -var Sha1 = require('../').sha1 - -var inputs = [ - ['', 'ascii'], - ['abc', 'ascii'], - ['123', 'ascii'], - ['123456789abcdef123456789abcdef123456789abcdef123456789abcdef', 'ascii'], - ['123456789abcdef123456789abcdef123456789abcdef123456789abc', 'ascii'], - ['123456789abcdef123456789abcdef123456789abcdef123456789ab', 'ascii'], - ['0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde', 'ascii'], - ['0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef', 'ascii'], - ['foobarbaz', 'ascii'] -] - -tape("hash is the same as node's crypto", function (t) { - inputs.forEach(function (v) { - var a = new Sha1().update(v[0], v[1]).digest('hex') - var e = crypto.createHash('sha1').update(v[0], v[1]).digest('hex') - console.log(a, '==', e) - t.equal(a, e) - }) - - t.end() -}) - -tape('call update multiple times', function (t) { - inputs.forEach(function (v) { - var hash = new Sha1() - var _hash = crypto.createHash('sha1') - - for (var i = 0; i < v[0].length; i = (i + 1) * 2) { - var s = v[0].substring(i, (i + 1) * 2) - hash.update(s, v[1]) - _hash.update(s, v[1]) - } - - var a = hash.digest('hex') - var e = _hash.digest('hex') - console.log(a, '==', e) - t.equal(a, e) - }) - t.end() -}) - -tape('call update twice', function (t) { - var _hash = crypto.createHash('sha1') - var hash = new Sha1() - - _hash.update('foo', 'ascii') - hash.update('foo', 'ascii') - - _hash.update('bar', 'ascii') - hash.update('bar', 'ascii') - - _hash.update('baz', 'ascii') - hash.update('baz', 'ascii') - - var a = hash.digest('hex') - var e = _hash.digest('hex') - - t.equal(a, e) - t.end() -}) - -tape('hex encoding', function (t) { - inputs.forEach(function (v) { - var hash = new Sha1() - var _hash = crypto.createHash('sha1') - - for (var i = 0; i < v[0].length; i = (i + 1) * 2) { - var s = v[0].substring(i, (i + 1) * 2) - hash.update(Buffer.from(s, 'ascii').toString('hex'), 'hex') - _hash.update(Buffer.from(s, 'ascii').toString('hex'), 'hex') - } - var a = hash.digest('hex') - var e = _hash.digest('hex') - - console.log(a, '==', e) - t.equal(a, e) - }) - - t.end() -}) - -tape('call digest for more than MAX_UINT32 bits of data', function (t) { - var _hash = crypto.createHash('sha1') - var hash = new Sha1() - var bigData = Buffer.alloc(0x1ffffffff / 8) - - hash.update(bigData) - _hash.update(bigData) - - var a = hash.digest('hex') - var e = _hash.digest('hex') - - t.equal(a, e) - t.end() -}) diff --git a/node_modules/sha.js/test/vectors.js b/node_modules/sha.js/test/vectors.js deleted file mode 100644 index 48a646ef..00000000 --- a/node_modules/sha.js/test/vectors.js +++ /dev/null @@ -1,72 +0,0 @@ -var tape = require('tape') -var vectors = require('hash-test-vectors') -// var from = require('bops/typedarray/from') -var Buffer = require('safe-buffer').Buffer - -var createHash = require('../') - -function makeTest (alg, i, verbose) { - var v = vectors[i] - - tape(alg + ': NIST vector ' + i, function (t) { - if (verbose) { - console.log(v) - console.log('VECTOR', i) - console.log('INPUT', v.input) - console.log(Buffer.from(v.input, 'base64').toString('hex')) - } - - var buf = Buffer.from(v.input, 'base64') - t.equal(createHash(alg).update(buf).digest('hex'), v[alg]) - - i = ~~(buf.length / 2) - var buf1 = buf.slice(0, i) - var buf2 = buf.slice(i, buf.length) - - console.log(buf1.length, buf2.length, buf.length) - console.log(createHash(alg)._block.length) - - t.equal( - createHash(alg) - .update(buf1) - .update(buf2) - .digest('hex'), - v[alg] - ) - - var j, buf3 - - i = ~~(buf.length / 3) - j = ~~(buf.length * 2 / 3) - buf1 = buf.slice(0, i) - buf2 = buf.slice(i, j) - buf3 = buf.slice(j, buf.length) - - t.equal( - createHash(alg) - .update(buf1) - .update(buf2) - .update(buf3) - .digest('hex'), - v[alg] - ) - - setTimeout(function () { - // avoid "too much recursion" errors in tape in firefox - t.end() - }) - }) -} - -if (process.argv[2]) { - makeTest(process.argv[2], parseInt(process.argv[3], 10), true) -} else { - vectors.forEach(function (v, i) { - makeTest('sha', i) - makeTest('sha1', i) - makeTest('sha224', i) - makeTest('sha256', i) - makeTest('sha384', i) - makeTest('sha512', i) - }) -} diff --git a/node_modules/should-proxy/.npmignore b/node_modules/should-proxy/.npmignore deleted file mode 100644 index c2658d7d..00000000 --- a/node_modules/should-proxy/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/node_modules/should-proxy/LICENSE b/node_modules/should-proxy/LICENSE deleted file mode 100644 index 8fe89346..00000000 --- a/node_modules/should-proxy/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015 John Andersen - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/should-proxy/README.md b/node_modules/should-proxy/README.md deleted file mode 100644 index 3af2725c..00000000 --- a/node_modules/should-proxy/README.md +++ /dev/null @@ -1,30 +0,0 @@ -#should-proxy - -should-proxy uses a no_proxy list formatted like so -`localhost,127.0.0.0/8,10.0.0.0/8,192.168.0.0/16,172.16.0.0/12,.internal.com` -To determine if a url should be proxied or not. - -should-proxy is a function that takes a url as well as options. -If no options are provided should-proxy uses the environment variable `no_proxy` - -Usage ---- - -```javascript -var shouldProxy = require('should-proxy'); - -var result = shouldProxy("http://something.google.com/", { - no_proxy: "google.com" -}); -// Should be false, because google.com is on the no_proxy list provided -console.log("http://something.google.com/", result); - -result = shouldProxy("http://localhost/", { - no_proxy: "" -}); -// Should be true, because localhost is not the no_proxy list provided -console.log("http://localhost/", result); - -// Omitting the options object will cause should-proxy -// to use process.env["no_proxy"] -``` diff --git a/node_modules/should-proxy/index.js b/node_modules/should-proxy/index.js deleted file mode 100644 index 9d3c5bbf..00000000 --- a/node_modules/should-proxy/index.js +++ /dev/null @@ -1,135 +0,0 @@ -var url = require('url'); - -function matchDomain(hostname, no_proxy) { - var hostnameArray = hostname.split("."); - // Remove any empty elements from the no_proxy - var no_proxyArrayWithBlanks = no_proxy.split("."); - var no_proxyArray = []; - // Get rid of the trailing 0's so we match the broadest subnet - for (var i = 0; i < no_proxyArrayWithBlanks.length; i++) { - if (no_proxyArrayWithBlanks[i] === "") { - continue; - } - no_proxyArray.push(no_proxyArrayWithBlanks[i]); - } - // Match in reverse order, all of the no_proxy should match - // So that subdomains work - // for example - // [ 'something', 'internal', 'com' ] [ '', 'interal', 'com' ] - // match - // [ 'something', 'external', 'com' ] [ '', 'interal', 'com' ] - // no match - // [ 'something', 'internal', 'com' ] [ 'other', 'interal', 'com' ] - // no match - var matchedAll = no_proxyArray.length; - var matches = 0; - // Where to start matching - var hostnameIndex = hostnameArray.length - 1; - // Where to start matching - var no_proxyIndex = no_proxyArray.length - 1; - // Count all the matched numbers - while (hostnameIndex > -1 && no_proxyIndex > -1) { - if (hostnameArray[hostnameIndex] === no_proxyArray[no_proxyIndex]) { - ++matches; - } - --hostnameIndex; - --no_proxyIndex; - } - // If its the amount we needed then yes it is in the network - if (matchedAll == matches) { - return true; - } - // Ips didnt match its not in the network - return false; -} - -function matchNetwork(ip, network) { - // This is lazy because we ignore whats after the slash - // But hey at least we have no_proxy now right - network = network.split("/")[0]; - // Make some arrays of numbers to match - var ipArray = ip.split("."); - var networkArrayWithZeros = network.split("."); - var networkArray = []; - // Get rid of the trailing 0's so we match the broadest subnet - for (var i = 0; i < networkArrayWithZeros.length; i++) { - if (networkArrayWithZeros[i] === "0") { - break; - } - networkArray.push(networkArrayWithZeros[i]); - } - // The length of the networkArray without zeros is the number - // of numbers that need to match, for example - // ip: [ '192', '168', '0', '1' ] network: [ '192', '168' ] - // match - // ip: [ '192', '169', '0', '1' ] network: [ '192', '168' ] - // no match - // ip: [ '127', '0', '0', '1' ] network: [ '127' ] - // match - var matchedAll = networkArray.length; - var matches = 0; - // Count all the matched numbers - for (var i = 0; i < ipArray.length && i < networkArray.length; i++) { - if (ipArray[i] === networkArray[i]) { - ++matches; - } - } - // If its the amount we needed then yes it is in the network - if (matchedAll == matches) { - return true; - } - // Ips didnt match its not in the network - return false; -} - -function getNoProxy(options) { - var no_proxy = ""; - if (typeof options !== "undefined") { - if (typeof options["no_proxy"] !== "undefined") { - no_proxy = options["no_proxy"]; - } - } else if (typeof process.env["no_proxy"] !== "undefined") { - no_proxy = process.env["no_proxy"]; - } - return no_proxy.split(","); -} - -function matchNoProxy(requestUrl, no_proxy) { - var parsedUrl = url.parse(requestUrl); - var hostname = parsedUrl.hostname; - // If the hostname is null then dont proxy, we cant check - if (hostname == null) { - return false; - // If the hostname is the no_proxy then its a match - } else if (hostname === no_proxy) { - return true; - // If the ip matches a no_proxy subnet - } else if (matchNetwork(hostname, no_proxy)) { - return true; - // If the host matches a domain / subdomain - } else if (matchDomain(hostname, no_proxy)) { - return true; - } - return false; -} - -function shouldProxy(requestUrl, options) { - // Get the no_proxy list - var no_proxy = getNoProxy(options); - // There is no no_proxy list so proxy everything - if (no_proxy.length < 1 || no_proxy[0].length < 1) { - return true; - } - // There is a no_proxy list so check if this should be proxied - for (var i = 0; i < no_proxy.length; i++) { - // If the requestUrl matches the no_proxy string return false - // meaning should not proxy - if (matchNoProxy(requestUrl, no_proxy[i])) { - return false; - } - } - // Url did not match no_proxy list so do proxy - return true; -} - -module.exports = shouldProxy; diff --git a/node_modules/should-proxy/package.json b/node_modules/should-proxy/package.json deleted file mode 100644 index 98078b7e..00000000 --- a/node_modules/should-proxy/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "_from": "should-proxy@~1.0", - "_id": "should-proxy@1.0.4", - "_inBundle": false, - "_integrity": "sha1-yAWlAav2lTlgBjSAnmL78ji6NeQ=", - "_location": "/should-proxy", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "should-proxy@~1.0", - "name": "should-proxy", - "escapedName": "should-proxy", - "rawSpec": "~1.0", - "saveSpec": null, - "fetchSpec": "~1.0" - }, - "_requiredBy": [ - "/@antora/content-aggregator", - "/@antora/ui-loader" - ], - "_resolved": "https://registry.npmjs.org/should-proxy/-/should-proxy-1.0.4.tgz", - "_shasum": "c805a501abf69539600634809e62fbf238ba35e4", - "_spec": "should-proxy@~1.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/content-aggregator", - "author": { - "name": "John Andersen" - }, - "bugs": { - "url": "https://github.com/pdxjohnny/should-proxy/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Checks if a url should be proxied", - "devDependencies": { - "expect.js": "~0.2.0" - }, - "homepage": "https://github.com/pdxjohnny/should-proxy#readme", - "keywords": [ - "proxy", - "no_proxy", - "no-proxy" - ], - "license": "MIT", - "main": "index.js", - "name": "should-proxy", - "repository": { - "type": "git", - "url": "git+https://github.com/pdxjohnny/should-proxy.git" - }, - "scripts": { - "format": "bash script/format", - "test": "node test/index.js" - }, - "version": "1.0.4" -} diff --git a/node_modules/should-proxy/script/format b/node_modules/should-proxy/script/format deleted file mode 100755 index d71d72ae..00000000 --- a/node_modules/should-proxy/script/format +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -find ./ -name "*.js" -exec js-beautify -rjn -s 2 {} \; diff --git a/node_modules/should-proxy/test/index.js b/node_modules/should-proxy/test/index.js deleted file mode 100644 index be45702b..00000000 --- a/node_modules/should-proxy/test/index.js +++ /dev/null @@ -1,94 +0,0 @@ -var expect = require('expect.js'); -var shouldProxy = require('..'); - -// Sets properties to true or false based on shouldProxy -function checkObject(urlList, options) { - console.log(); - console.log(urlList); - console.log(options); - for (var url in urlList) { - urlList[url] = shouldProxy(url, options); - console.log(url, urlList[url]); - } - return urlList; -} - -var tests = { - subdomain: function () { - var urlList = { - "http://google.com/": null, - "http://something.google.com/": null - }; - // First try with subdomain - var options = { - no_proxy: "localhost,127.0.0.0/8,.something.google.com" - }; - // Check the urls - urlList = checkObject(urlList, options); - // Expects - expect(urlList["http://google.com/"]).to.equal(true); - expect(urlList["http://something.google.com/"]).to.equal(false); - // Now try with only domain - options = { - no_proxy: "localhost,127.0.0.0/8,.google.com" - }; - // Check the urls - urlList = checkObject(urlList, options); - // Expects - expect(urlList["http://google.com/"]).to.equal(false); - expect(urlList["http://something.google.com/"]).to.equal(false); - }, - ip: function () { - var urlList = { - "http://127.0.0.1/": null, - "http://192.168.0.1/": null, - "http://192.100.0.1/": null - }; - // First try with subdomain - var options = { - no_proxy: "127.0.0.0/8,192.168.0.0/16" - }; - // Check the urls - urlList = checkObject(urlList, options); - // Expects - expect(urlList["http://127.0.0.1/"]).to.equal(false); - expect(urlList["http://192.168.0.1/"]).to.equal(false); - expect(urlList["http://192.100.0.1/"]).to.equal(true); - // Now try with only domain - options = { - no_proxy: "192.100.0.0/16" - }; - // Check the urls - urlList = checkObject(urlList, options); - // Expects - expect(urlList["http://127.0.0.1/"]).to.equal(true); - expect(urlList["http://192.168.0.1/"]).to.equal(true); - expect(urlList["http://192.100.0.1/"]).to.equal(false); - }, - hostname: function () { - var urlList = { - "http://localhost/": null - }; - // First try with subdomain - var options = { - no_proxy: "" - }; - // Check the urls - urlList = checkObject(urlList, options); - // Expects - expect(urlList["http://localhost/"]).to.equal(true); - // Now try with only domain - options = { - no_proxy: "localhost" - }; - // Check the urls - urlList = checkObject(urlList, options); - // Expects - expect(urlList["http://localhost/"]).to.equal(false); - }, -}; - -// Run all tests -for (var func in tests) { - tests[func](); -} diff --git a/node_modules/simple-concat/.travis.yml b/node_modules/simple-concat/.travis.yml deleted file mode 100644 index c159f6ac..00000000 --- a/node_modules/simple-concat/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - lts/* diff --git a/node_modules/simple-concat/LICENSE b/node_modules/simple-concat/LICENSE deleted file mode 100644 index c7e68527..00000000 --- a/node_modules/simple-concat/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/simple-concat/README.md b/node_modules/simple-concat/README.md deleted file mode 100644 index b7d39bde..00000000 --- a/node_modules/simple-concat/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# simple-concat [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/simple-concat/master.svg -[travis-url]: https://travis-ci.org/feross/simple-concat -[npm-image]: https://img.shields.io/npm/v/simple-concat.svg -[npm-url]: https://npmjs.org/package/simple-concat -[downloads-image]: https://img.shields.io/npm/dm/simple-concat.svg -[downloads-url]: https://npmjs.org/package/simple-concat -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -### Super-minimalist version of [`concat-stream`](https://github.com/maxogden/concat-stream). Less than 15 lines! - -## install - -``` -npm install simple-concat -``` - -## usage - -This example is longer than the implementation. - -```js -var s = new stream.PassThrough() -concat(s, function (err, buf) { - if (err) throw err - console.error(buf) -}) -s.write('abc') -setTimeout(function () { - s.write('123') -}, 10) -setTimeout(function () { - s.write('456') -}, 20) -setTimeout(function () { - s.end('789') -}, 30) -``` - -## license - -MIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org). diff --git a/node_modules/simple-concat/index.js b/node_modules/simple-concat/index.js deleted file mode 100644 index 59237fc6..00000000 --- a/node_modules/simple-concat/index.js +++ /dev/null @@ -1,15 +0,0 @@ -/*! simple-concat. MIT License. Feross Aboukhadijeh */ -module.exports = function (stream, cb) { - var chunks = [] - stream.on('data', function (chunk) { - chunks.push(chunk) - }) - stream.once('end', function () { - if (cb) cb(null, Buffer.concat(chunks)) - cb = null - }) - stream.once('error', function (err) { - if (cb) cb(err) - cb = null - }) -} diff --git a/node_modules/simple-concat/package.json b/node_modules/simple-concat/package.json deleted file mode 100644 index c35a8f7f..00000000 --- a/node_modules/simple-concat/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "simple-concat@^1.0.0", - "_id": "simple-concat@1.0.1", - "_inBundle": false, - "_integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "_location": "/simple-concat", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "simple-concat@^1.0.0", - "name": "simple-concat", - "escapedName": "simple-concat", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/@antora/ui-loader", - "/isomorphic-git/simple-get", - "/simple-get" - ], - "_resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "_shasum": "f46976082ba35c2263f1c8ab5edfe26c41c9552f", - "_spec": "simple-concat@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/isomorphic-git/node_modules/simple-get", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/simple-concat/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Super-minimalist version of `concat-stream`. Less than 15 lines!", - "devDependencies": { - "standard": "*", - "tape": "^5.0.1" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "homepage": "https://github.com/feross/simple-concat", - "keywords": [ - "concat", - "concat-stream", - "concat stream" - ], - "license": "MIT", - "main": "index.js", - "name": "simple-concat", - "repository": { - "type": "git", - "url": "git://github.com/feross/simple-concat.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "version": "1.0.1" -} diff --git a/node_modules/simple-concat/test/basic.js b/node_modules/simple-concat/test/basic.js deleted file mode 100644 index 4bf6f9c2..00000000 --- a/node_modules/simple-concat/test/basic.js +++ /dev/null @@ -1,41 +0,0 @@ -var concat = require('../') -var stream = require('stream') -var test = require('tape') - -test('basic', function (t) { - t.plan(2) - var s = new stream.PassThrough() - concat(s, function (err, buf) { - t.error(err) - t.deepEqual(buf, Buffer.from('abc123456789')) - }) - s.write('abc') - setTimeout(function () { - s.write('123') - }, 10) - setTimeout(function () { - s.write('456') - }, 20) - setTimeout(function () { - s.end('789') - }, 30) -}) - -test('error', function (t) { - t.plan(2) - var s = new stream.PassThrough() - concat(s, function (err, buf) { - t.ok(err, 'got expected error') - t.ok(!buf) - }) - s.write('abc') - setTimeout(function () { - s.write('123') - }, 10) - setTimeout(function () { - s.write('456') - }, 20) - setTimeout(function () { - s.emit('error', new Error('error')) - }, 30) -}) diff --git a/node_modules/simple-get/LICENSE b/node_modules/simple-get/LICENSE deleted file mode 100644 index c7e68527..00000000 --- a/node_modules/simple-get/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/simple-get/README.md b/node_modules/simple-get/README.md deleted file mode 100644 index 0fecf371..00000000 --- a/node_modules/simple-get/README.md +++ /dev/null @@ -1,319 +0,0 @@ -# simple-get [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/simple-get/master.svg -[travis-url]: https://travis-ci.org/feross/simple-get -[npm-image]: https://img.shields.io/npm/v/simple-get.svg -[npm-url]: https://npmjs.org/package/simple-get -[downloads-image]: https://img.shields.io/npm/dm/simple-get.svg -[downloads-url]: https://npmjs.org/package/simple-get -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -### Simplest way to make http get requests - -## features - -This module is the lightest possible wrapper on top of node.js `http`, but supporting these essential features: - -- follows redirects -- automatically handles gzip/deflate responses -- supports HTTPS -- supports specifying a timeout -- supports convenience `url` key so there's no need to use `url.parse` on the url when specifying options -- composes well with npm packages for features like cookies, proxies, form data, & OAuth - -All this in < 100 lines of code. - -## install - -``` -npm install simple-get -``` - -## usage - -Note, all these examples also work in the browser with [browserify](http://browserify.org/). - -### simple GET request - -Doesn't get easier than this: - -```js -const get = require('simple-get') - -get('http://example.com', function (err, res) { - if (err) throw err - console.log(res.statusCode) // 200 - res.pipe(process.stdout) // `res` is a stream -}) -``` - -### even simpler GET request - -If you just want the data, and don't want to deal with streams: - -```js -const get = require('simple-get') - -get.concat('http://example.com', function (err, res, data) { - if (err) throw err - console.log(res.statusCode) // 200 - console.log(data) // Buffer('this is the server response') -}) -``` - -### POST, PUT, PATCH, HEAD, DELETE support - -For `POST`, call `get.post` or use option `{ method: 'POST' }`. - -```js -const get = require('simple-get') - -const opts = { - url: 'http://example.com', - body: 'this is the POST body' -} -get.post(opts, function (err, res) { - if (err) throw err - res.pipe(process.stdout) // `res` is a stream -}) -``` - -#### A more complex example: - -```js -const get = require('simple-get') - -get({ - url: 'http://example.com', - method: 'POST', - body: 'this is the POST body', - - // simple-get accepts all options that node.js `http` accepts - // See: http://nodejs.org/api/http.html#http_http_request_options_callback - headers: { - 'user-agent': 'my cool app' - } -}, function (err, res) { - if (err) throw err - - // All properties/methods from http.IncomingResponse are available, - // even if a gunzip/inflate transform stream was returned. - // See: http://nodejs.org/api/http.html#http_http_incomingmessage - res.setTimeout(10000) - console.log(res.headers) - - res.on('data', function (chunk) { - // `chunk` is the decoded response, after it's been gunzipped or inflated - // (if applicable) - console.log('got a chunk of the response: ' + chunk) - })) - -}) -``` - -### JSON - -You can serialize/deserialize request and response with JSON: - -```js -const get = require('simple-get') - -const opts = { - method: 'POST', - url: 'http://example.com', - body: { - key: 'value' - }, - json: true -} -get.concat(opts, function (err, res, data) { - if (err) throw err - console.log(data.key) // `data` is an object -}) -``` - -### Timeout - -You can set a timeout (in milliseconds) on the request with the `timeout` option. -If the request takes longer than `timeout` to complete, then the entire request -will fail with an `Error`. - -```js -const get = require('simple-get') - -const opts = { - url: 'http://example.com', - timeout: 2000 // 2 second timeout -} - -get(opts, function (err, res) {}) -``` - -### One Quick Tip - -It's a good idea to set the `'user-agent'` header so the provider can more easily -see how their resource is used. - -```js -const get = require('simple-get') -const pkg = require('./package.json') - -get('http://example.com', { - headers: { - 'user-agent': `my-module/${pkg.version} (https://github.com/username/my-module)` - } -}) -``` - -### Proxies - -You can use the [`tunnel`](https://github.com/koichik/node-tunnel) module with the -`agent` option to work with proxies: - -```js -const get = require('simple-get') -const tunnel = require('tunnel') - -const opts = { - url: 'http://example.com', - agent: tunnel.httpOverHttp({ - proxy: { - host: 'localhost' - } - }) -} - -get(opts, function (err, res) {}) -``` - -### Cookies - -You can use the [`cookie`](https://github.com/jshttp/cookie) module to include -cookies in a request: - -```js -const get = require('simple-get') -const cookie = require('cookie') - -const opts = { - url: 'http://example.com', - headers: { - cookie: cookie.serialize('foo', 'bar') - } -} - -get(opts, function (err, res) {}) -``` - -### Form data - -You can use the [`form-data`](https://github.com/form-data/form-data) module to -create POST request with form data: - -```js -const fs = require('fs') -const get = require('simple-get') -const FormData = require('form-data') -const form = new FormData() - -form.append('my_file', fs.createReadStream('/foo/bar.jpg')) - -const opts = { - url: 'http://example.com', - body: form -} - -get.post(opts, function (err, res) {}) -``` - -#### Or, include `application/x-www-form-urlencoded` form data manually: - -```js -const get = require('simple-get') - -const opts = { - url: 'http://example.com', - form: { - key: 'value' - } -} -get.post(opts, function (err, res) {}) -``` - -### Specifically disallowing redirects - -```js -const get = require('simple-get') - -const opts = { - url: 'http://example.com/will-redirect-elsewhere', - followRedirects: false -} -// res.statusCode will be 301, no error thrown -get(opts, function (err, res) {}) -``` - -### OAuth - -You can use the [`oauth-1.0a`](https://github.com/ddo/oauth-1.0a) module to create -a signed OAuth request: - -```js -const get = require('simple-get') -const crypto = require('crypto') -const OAuth = require('oauth-1.0a') - -const oauth = OAuth({ - consumer: { - key: process.env.CONSUMER_KEY, - secret: process.env.CONSUMER_SECRET - }, - signature_method: 'HMAC-SHA1', - hash_function: (baseString, key) => crypto.createHmac('sha1', key).update(baseString).digest('base64') -}) - -const token = { - key: process.env.ACCESS_TOKEN, - secret: process.env.ACCESS_TOKEN_SECRET -} - -const url = 'https://api.twitter.com/1.1/statuses/home_timeline.json' - -const opts = { - url: url, - headers: oauth.toHeader(oauth.authorize({url, method: 'GET'}, token)), - json: true -} - -get(opts, function (err, res) {}) -``` - -### Throttle requests - -You can use [limiter](https://github.com/jhurliman/node-rate-limiter) to throttle requests. This is useful when calling an API that is rate limited. - -```js -const simpleGet = require('simple-get') -const RateLimiter = require('limiter').RateLimiter -const limiter = new RateLimiter(1, 'second') - -const get = (opts, cb) => limiter.removeTokens(1, () => simpleGet(opts, cb)) -get.concat = (opts, cb) => limiter.removeTokens(1, () => simpleGet.concat(opts, cb)) - -var opts = { - url: 'http://example.com' -} - -get.concat(opts, processResult) -get.concat(opts, processResult) - -function processResult (err, res, data) { - if (err) throw err - console.log(data.toString()) -} -``` - -## license - -MIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org). diff --git a/node_modules/simple-get/index.js b/node_modules/simple-get/index.js deleted file mode 100644 index 37590636..00000000 --- a/node_modules/simple-get/index.js +++ /dev/null @@ -1,100 +0,0 @@ -/*! simple-get. MIT License. Feross Aboukhadijeh */ -module.exports = simpleGet - -const concat = require('simple-concat') -const decompressResponse = require('decompress-response') // excluded from browser build -const http = require('http') -const https = require('https') -const once = require('once') -const querystring = require('querystring') -const url = require('url') - -const isStream = o => o !== null && typeof o === 'object' && typeof o.pipe === 'function' - -function simpleGet (opts, cb) { - opts = Object.assign({ maxRedirects: 10 }, typeof opts === 'string' ? { url: opts } : opts) - cb = once(cb) - - if (opts.url) { - const { hostname, port, protocol, auth, path } = url.parse(opts.url) // eslint-disable-line node/no-deprecated-api - delete opts.url - if (!hostname && !port && !protocol && !auth) opts.path = path // Relative redirect - else Object.assign(opts, { hostname, port, protocol, auth, path }) // Absolute redirect - } - - const headers = { 'accept-encoding': 'gzip, deflate' } - if (opts.headers) Object.keys(opts.headers).forEach(k => (headers[k.toLowerCase()] = opts.headers[k])) - opts.headers = headers - - let body - if (opts.body) { - body = opts.json && !isStream(opts.body) ? JSON.stringify(opts.body) : opts.body - } else if (opts.form) { - body = typeof opts.form === 'string' ? opts.form : querystring.stringify(opts.form) - opts.headers['content-type'] = 'application/x-www-form-urlencoded' - } - - if (body) { - if (!opts.method) opts.method = 'POST' - if (!isStream(body)) opts.headers['content-length'] = Buffer.byteLength(body) - if (opts.json && !opts.form) opts.headers['content-type'] = 'application/json' - } - delete opts.body; delete opts.form - - if (opts.json) opts.headers.accept = 'application/json' - if (opts.method) opts.method = opts.method.toUpperCase() - - const protocol = opts.protocol === 'https:' ? https : http // Support http/https urls - const req = protocol.request(opts, res => { - if (opts.followRedirects !== false && res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) { - opts.url = res.headers.location // Follow 3xx redirects - delete opts.headers.host // Discard `host` header on redirect (see #32) - res.resume() // Discard response - - if (opts.method === 'POST' && [301, 302].includes(res.statusCode)) { - opts.method = 'GET' // On 301/302 redirect, change POST to GET (see #35) - delete opts.headers['content-length']; delete opts.headers['content-type'] - } - - if (opts.maxRedirects-- === 0) return cb(new Error('too many redirects')) - else return simpleGet(opts, cb) - } - - const tryUnzip = typeof decompressResponse === 'function' && opts.method !== 'HEAD' - cb(null, tryUnzip ? decompressResponse(res) : res) - }) - req.on('timeout', () => { - req.abort() - cb(new Error('Request timed out')) - }) - req.on('error', cb) - - if (isStream(body)) body.on('error', cb).pipe(req) - else req.end(body) - - return req -} - -simpleGet.concat = (opts, cb) => { - return simpleGet(opts, (err, res) => { - if (err) return cb(err) - concat(res, (err, data) => { - if (err) return cb(err) - if (opts.json) { - try { - data = JSON.parse(data.toString()) - } catch (err) { - return cb(err, res, data) - } - } - cb(null, res, data) - }) - }) -} - -;['get', 'post', 'put', 'patch', 'head', 'delete'].forEach(method => { - simpleGet[method] = (opts, cb) => { - if (typeof opts === 'string') opts = { url: opts } - return simpleGet(Object.assign({ method: method.toUpperCase() }, opts), cb) - } -}) diff --git a/node_modules/simple-get/node_modules/decompress-response/index.d.ts b/node_modules/simple-get/node_modules/decompress-response/index.d.ts deleted file mode 100644 index c0be175f..00000000 --- a/node_modules/simple-get/node_modules/decompress-response/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/// -import {IncomingMessage} from 'http'; - -/** -Decompress a HTTP response if needed. - -@param response - The HTTP incoming stream with compressed data. -@returns The decompressed HTTP response stream. - -@example -``` -import {http} from 'http'; -import decompressResponse = require('decompress-response'); - -http.get('https://sindresorhus.com', response => { - response = decompressResponse(response); -}); -``` -*/ -declare function decompressResponse(response: IncomingMessage): IncomingMessage; - -export = decompressResponse; diff --git a/node_modules/simple-get/node_modules/decompress-response/index.js b/node_modules/simple-get/node_modules/decompress-response/index.js deleted file mode 100644 index c8610362..00000000 --- a/node_modules/simple-get/node_modules/decompress-response/index.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; -const {Transform, PassThrough} = require('stream'); -const zlib = require('zlib'); -const mimicResponse = require('mimic-response'); - -module.exports = response => { - const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase(); - - if (!['gzip', 'deflate', 'br'].includes(contentEncoding)) { - return response; - } - - // TODO: Remove this when targeting Node.js 12. - const isBrotli = contentEncoding === 'br'; - if (isBrotli && typeof zlib.createBrotliDecompress !== 'function') { - response.destroy(new Error('Brotli is not supported on Node.js < 12')); - return response; - } - - let isEmpty = true; - - const checker = new Transform({ - transform(data, _encoding, callback) { - isEmpty = false; - - callback(null, data); - }, - - flush(callback) { - callback(); - } - }); - - const finalStream = new PassThrough({ - autoDestroy: false, - destroy(error, callback) { - response.destroy(); - - callback(error); - } - }); - - const decompressStream = isBrotli ? zlib.createBrotliDecompress() : zlib.createUnzip(); - - decompressStream.once('error', error => { - if (isEmpty && !response.readable) { - finalStream.end(); - return; - } - - finalStream.destroy(error); - }); - - mimicResponse(response, finalStream); - response.pipe(checker).pipe(decompressStream).pipe(finalStream); - - return finalStream; -}; diff --git a/node_modules/simple-get/node_modules/decompress-response/license b/node_modules/simple-get/node_modules/decompress-response/license deleted file mode 100644 index fa7ceba3..00000000 --- a/node_modules/simple-get/node_modules/decompress-response/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/simple-get/node_modules/decompress-response/package.json b/node_modules/simple-get/node_modules/decompress-response/package.json deleted file mode 100644 index 5b4c96ae..00000000 --- a/node_modules/simple-get/node_modules/decompress-response/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "_from": "decompress-response@^6.0.0", - "_id": "decompress-response@6.0.0", - "_inBundle": false, - "_integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "_location": "/simple-get/decompress-response", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "decompress-response@^6.0.0", - "name": "decompress-response", - "escapedName": "decompress-response", - "rawSpec": "^6.0.0", - "saveSpec": null, - "fetchSpec": "^6.0.0" - }, - "_requiredBy": [ - "/simple-get" - ], - "_resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "_shasum": "ca387612ddb7e104bd16d85aab00d5ecf09c66fc", - "_spec": "decompress-response@^6.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/simple-get", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/decompress-response/issues" - }, - "bundleDependencies": false, - "dependencies": { - "mimic-response": "^3.1.0" - }, - "deprecated": false, - "description": "Decompress a HTTP response if needed", - "devDependencies": { - "@types/node": "^14.0.1", - "ava": "^2.2.0", - "get-stream": "^5.0.0", - "pify": "^5.0.0", - "tsd": "^0.11.0", - "xo": "^0.30.0" - }, - "engines": { - "node": ">=10" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "funding": "https://github.com/sponsors/sindresorhus", - "homepage": "https://github.com/sindresorhus/decompress-response#readme", - "keywords": [ - "decompress", - "response", - "http", - "https", - "zlib", - "gzip", - "zip", - "deflate", - "unzip", - "ungzip", - "incoming", - "message", - "stream", - "compressed", - "brotli" - ], - "license": "MIT", - "name": "decompress-response", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/decompress-response.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "6.0.0", - "xo": { - "rules": { - "@typescript-eslint/prefer-readonly-parameter-types": "off" - } - } -} diff --git a/node_modules/simple-get/node_modules/decompress-response/readme.md b/node_modules/simple-get/node_modules/decompress-response/readme.md deleted file mode 100644 index 58523ef3..00000000 --- a/node_modules/simple-get/node_modules/decompress-response/readme.md +++ /dev/null @@ -1,48 +0,0 @@ -# decompress-response [![Build Status](https://travis-ci.com/sindresorhus/decompress-response.svg?branch=master)](https://travis-ci.com/sindresorhus/decompress-response) - -> Decompress a HTTP response if needed - -Decompresses the [response](https://nodejs.org/api/http.html#http_class_http_incomingmessage) from [`http.request`](https://nodejs.org/api/http.html#http_http_request_options_callback) if it's gzipped, deflated or compressed with Brotli, otherwise just passes it through. - -Used by [`got`](https://github.com/sindresorhus/got). - -## Install - -``` -$ npm install decompress-response -``` - -## Usage - -```js -const http = require('http'); -const decompressResponse = require('decompress-response'); - -http.get('https://sindresorhus.com', response => { - response = decompressResponse(response); -}); -``` - -## API - -### decompressResponse(response) - -Returns the decompressed HTTP response stream. - -#### response - -Type: [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage) - -The HTTP incoming stream with compressed data. - ---- - -
    - - Get professional support for this package with a Tidelift subscription - -
    - - Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. -
    -
    diff --git a/node_modules/simple-get/node_modules/mimic-response/index.d.ts b/node_modules/simple-get/node_modules/mimic-response/index.d.ts deleted file mode 100644 index 65a51e98..00000000 --- a/node_modules/simple-get/node_modules/mimic-response/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import {IncomingMessage} from 'http'; - -/** -Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage) - -Makes `toStream` include the properties from `fromStream`. - -@param fromStream - The stream to copy the properties from. -@param toStream - The stream to copy the properties to. -@return The same object as `toStream`. -*/ -declare function mimicResponse( - fromStream: IncomingMessage, // eslint-disable-line @typescript-eslint/prefer-readonly-parameter-types - toStream: T, -): T & IncomingMessage; - -export = mimicResponse; diff --git a/node_modules/simple-get/node_modules/mimic-response/index.js b/node_modules/simple-get/node_modules/mimic-response/index.js deleted file mode 100644 index 404e1111..00000000 --- a/node_modules/simple-get/node_modules/mimic-response/index.js +++ /dev/null @@ -1,77 +0,0 @@ -'use strict'; - -// We define these manually to ensure they're always copied -// even if they would move up the prototype chain -// https://nodejs.org/api/http.html#http_class_http_incomingmessage -const knownProperties = [ - 'aborted', - 'complete', - 'headers', - 'httpVersion', - 'httpVersionMinor', - 'httpVersionMajor', - 'method', - 'rawHeaders', - 'rawTrailers', - 'setTimeout', - 'socket', - 'statusCode', - 'statusMessage', - 'trailers', - 'url' -]; - -module.exports = (fromStream, toStream) => { - if (toStream._readableState.autoDestroy) { - throw new Error('The second stream must have the `autoDestroy` option set to `false`'); - } - - const fromProperties = new Set(Object.keys(fromStream).concat(knownProperties)); - - const properties = {}; - - for (const property of fromProperties) { - // Don't overwrite existing properties. - if (property in toStream) { - continue; - } - - properties[property] = { - get() { - const value = fromStream[property]; - const isFunction = typeof value === 'function'; - - return isFunction ? value.bind(fromStream) : value; - }, - set(value) { - fromStream[property] = value; - }, - enumerable: true, - configurable: false - }; - } - - Object.defineProperties(toStream, properties); - - fromStream.once('aborted', () => { - toStream.destroy(); - - toStream.emit('aborted'); - }); - - fromStream.once('close', () => { - if (fromStream.complete) { - if (toStream.readable) { - toStream.once('end', () => { - toStream.emit('close'); - }); - } else { - toStream.emit('close'); - } - } else { - toStream.emit('close'); - } - }); - - return toStream; -}; diff --git a/node_modules/simple-get/node_modules/mimic-response/license b/node_modules/simple-get/node_modules/mimic-response/license deleted file mode 100644 index fa7ceba3..00000000 --- a/node_modules/simple-get/node_modules/mimic-response/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/simple-get/node_modules/mimic-response/package.json b/node_modules/simple-get/node_modules/mimic-response/package.json deleted file mode 100644 index a3b496e7..00000000 --- a/node_modules/simple-get/node_modules/mimic-response/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "mimic-response@^3.1.0", - "_id": "mimic-response@3.1.0", - "_inBundle": false, - "_integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "_location": "/simple-get/mimic-response", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "mimic-response@^3.1.0", - "name": "mimic-response", - "escapedName": "mimic-response", - "rawSpec": "^3.1.0", - "saveSpec": null, - "fetchSpec": "^3.1.0" - }, - "_requiredBy": [ - "/simple-get/decompress-response" - ], - "_resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "_shasum": "2d1d59af9c1b129815accc2c46a022a5ce1fa3c9", - "_spec": "mimic-response@^3.1.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/simple-get/node_modules/decompress-response", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/mimic-response/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Mimic a Node.js HTTP response stream", - "devDependencies": { - "@types/node": "^14.0.1", - "ava": "^2.4.0", - "create-test-server": "^2.4.0", - "p-event": "^4.1.0", - "pify": "^5.0.0", - "tsd": "^0.11.0", - "xo": "^0.30.0" - }, - "engines": { - "node": ">=10" - }, - "files": [ - "index.d.ts", - "index.js" - ], - "funding": "https://github.com/sponsors/sindresorhus", - "homepage": "https://github.com/sindresorhus/mimic-response#readme", - "keywords": [ - "mimic", - "response", - "stream", - "http", - "https", - "request", - "get", - "core" - ], - "license": "MIT", - "name": "mimic-response", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/mimic-response.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "3.1.0" -} diff --git a/node_modules/simple-get/node_modules/mimic-response/readme.md b/node_modules/simple-get/node_modules/mimic-response/readme.md deleted file mode 100644 index e968620a..00000000 --- a/node_modules/simple-get/node_modules/mimic-response/readme.md +++ /dev/null @@ -1,78 +0,0 @@ -# mimic-response [![Build Status](https://travis-ci.com/sindresorhus/mimic-response.svg?branch=master)](https://travis-ci.com/sindresorhus/mimic-response) - -> Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage) - -## Install - -``` -$ npm install mimic-response -``` - -## Usage - -```js -const stream = require('stream'); -const mimicResponse = require('mimic-response'); - -const responseStream = getHttpResponseStream(); -const myStream = new stream.PassThrough(); - -mimicResponse(responseStream, myStream); - -console.log(myStream.statusCode); -//=> 200 -``` - -## API - -### mimicResponse(from, to) - -**Note #1:** The `from.destroy(error)` function is not proxied. You have to call it manually: - -```js -const stream = require('stream'); -const mimicResponse = require('mimic-response'); - -const responseStream = getHttpResponseStream(); - -const myStream = new stream.PassThrough({ - destroy(error, callback) { - responseStream.destroy(); - - callback(error); - } -}); - -myStream.destroy(); -``` - -Please note that `myStream` and `responseStream` never throws. The error is passed to the request instead. - -#### from - -Type: `Stream` - -[Node.js HTTP response stream.](https://nodejs.org/api/http.html#http_class_http_incomingmessage) - -#### to - -Type: `Stream` - -Any stream. - -## Related - -- [mimic-fn](https://github.com/sindresorhus/mimic-fn) - Make a function mimic another one -- [clone-response](https://github.com/lukechilds/clone-response) - Clone a Node.js response stream - ---- - -
    - - Get professional support for this package with a Tidelift subscription - -
    - - Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. -
    -
    diff --git a/node_modules/simple-get/package.json b/node_modules/simple-get/package.json deleted file mode 100644 index f3d5d327..00000000 --- a/node_modules/simple-get/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "_from": "simple-get@~4.0", - "_id": "simple-get@4.0.0", - "_inBundle": false, - "_integrity": "sha512-ZalZGexYr3TA0SwySsr5HlgOOinS4Jsa8YB2GJ6lUNAazyAu4KG/VmzMTwAt2YVXzzVj8QmefmAonZIK2BSGcQ==", - "_location": "/simple-get", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "simple-get@~4.0", - "name": "simple-get", - "escapedName": "simple-get", - "rawSpec": "~4.0", - "saveSpec": null, - "fetchSpec": "~4.0" - }, - "_requiredBy": [ - "/@antora/content-aggregator", - "/@antora/ui-loader" - ], - "_resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.0.tgz", - "_shasum": "73fa628278d21de83dadd5512d2cc1f4872bd675", - "_spec": "simple-get@~4.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/content-aggregator", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "browser": { - "decompress-response": false - }, - "bugs": { - "url": "https://github.com/feross/simple-get/issues" - }, - "bundleDependencies": false, - "dependencies": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - }, - "deprecated": false, - "description": "Simplest way to make http get requests. Supports HTTPS, redirects, gzip/deflate, streams in < 100 lines.", - "devDependencies": { - "self-signed-https": "^1.0.5", - "standard": "*", - "string-to-stream": "^3.0.0", - "tape": "^5.0.0" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "homepage": "https://github.com/feross/simple-get", - "keywords": [ - "request", - "http", - "GET", - "get request", - "http.get", - "redirects", - "follow redirects", - "gzip", - "deflate", - "https", - "http-https", - "stream", - "simple request", - "simple get" - ], - "license": "MIT", - "main": "index.js", - "name": "simple-get", - "repository": { - "type": "git", - "url": "git://github.com/feross/simple-get.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "version": "4.0.0" -} diff --git a/node_modules/sonic-boom/.github/dependabot.yml b/node_modules/sonic-boom/.github/dependabot.yml deleted file mode 100644 index ae17f3da..00000000 --- a/node_modules/sonic-boom/.github/dependabot.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: 2 -updates: -- package-ecosystem: github-actions - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 -- package-ecosystem: npm - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 diff --git a/node_modules/sonic-boom/.github/workflows/nodejs.yml b/node_modules/sonic-boom/.github/workflows/nodejs.yml deleted file mode 100644 index 3e36db24..00000000 --- a/node_modules/sonic-boom/.github/workflows/nodejs.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Node.js CI - -on: [ push, pull_request ] - -jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - node-version: [10.x, 12.x, 13.x, 14.x, 15.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.1.5 - with: - node-version: ${{ matrix.node-version }} - - run: node --version - - run: npm --version - - run: npm install --ignore-scripts - - run: npm test - env: - CI: true - - test-legacy: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] - node-version: [11.x, 13.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.1.5 - with: - node-version: ${{ matrix.node-version }} - - run: node --version - - run: npm --version - - run: npm install --ignore-scripts - - run: npm run test-only - env: - CI: true diff --git a/node_modules/sonic-boom/.husky/pre-commit b/node_modules/sonic-boom/.husky/pre-commit deleted file mode 100755 index 449fcdee..00000000 --- a/node_modules/sonic-boom/.husky/pre-commit +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -npm test diff --git a/node_modules/sonic-boom/.taprc b/node_modules/sonic-boom/.taprc deleted file mode 100644 index bca12673..00000000 --- a/node_modules/sonic-boom/.taprc +++ /dev/null @@ -1,5 +0,0 @@ -flow: false -ts: false -jsx: false -timeout: 120 -check-coverage: false diff --git a/node_modules/sonic-boom/LICENSE b/node_modules/sonic-boom/LICENSE deleted file mode 100644 index eea791db..00000000 --- a/node_modules/sonic-boom/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Matteo Collina - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/sonic-boom/README.md b/node_modules/sonic-boom/README.md deleted file mode 100644 index 03026824..00000000 --- a/node_modules/sonic-boom/README.md +++ /dev/null @@ -1,101 +0,0 @@ -# sonic-boom  ![Node.js CI](https://github.com/mcollina/sonic-boom/workflows/Node.js%20CI/badge.svg) - -Extremely fast utf8-only stream implementation to write to files and -file descriptors. - -This implementation is partial, but support backpressure and `.pipe()` in is here. -However, it is 2-3x faster than Node Core `fs.createWriteStream()`: - -``` -benchSonic*1000: 1916.904ms -benchSonicSync*1000: 8605.265ms -benchSonic4k*1000: 1965.231ms -benchSonicSync4k*1000: 1588.224ms -benchCore*1000: 5851.959ms -benchConsole*1000: 7605.713ms -``` - -Note that sync mode without buffering is _slower_ than a Node Core WritableStream, however -this mode matches the expected behavior of `console.log()`. - -Note that if this is used to log to a windows terminal (`cmd.exe` or -powershell), it is needed to run `chcp 65001` in the terminal to -correctly display utf-8 characters, see -[chcp](https://ss64.com/nt/chcp.html) for more details. - -## Install - -``` -npm i sonic-boom -``` - -## Example - -```js -'use strict' - -const SonicBoom = require('sonic-boom') -const sonic = new SonicBoom({ fd: process.stdout.fd }) // or { dest: '/path/to/destination' } - -for (let i = 0; i < 10; i++) { - sonic.write('hello sonic\n') -} -``` - -## API - -### SonicBoom(opts) - -Creates a new instance of SonicBoom. - -The options are: - -* `fd`: a file descriptor, something that is returned by `fs.open` or - `fs.openSync`. -* `dest`: a string that is a path to a file to be written to (mode `'a'`). -* `minLength`: the minimum lenght of the internal buffer that is - required to be full before flushing. -* `sync`: perform writes synchronously (similar to `console.log`). - -For `sync:false` a `SonicBoom` instance will emit the `'ready'` event when a file descriptor is available. -For `sync:true` this is not relevant because the `'ready'` event will be fired when the `SonicBoom` instance is created, before it can be subscribed to. - - -### SonicBoom#write(string) - -Writes the string to the file. -It will return false to signal the producer to slow down. - -### SonicBoom#flush() - -Writes the current buffer to the file if a write was not in progress. -Do nothing if `minLength` is zero or if it is already writing. - -### SonicBoom#reopen([file]) - -Reopen the file in place, useful for log rotation. - -Example: - -```js -const stream = new SonicBoom('./my.log') -process.on('SIGUSR2', function () { - stream.reopen() -}) -``` - -### SonicBoom#flushSync() - -Flushes the buffered data synchronously. This is a costly operation. - -### SonicBoom#end() - -Closes the stream, the data will be flushed down asynchronously - -### SonicBoom#destroy() - -Closes the stream immediately, the data is not flushed. - -## License - -MIT diff --git a/node_modules/sonic-boom/bench.js b/node_modules/sonic-boom/bench.js deleted file mode 100644 index a08682fb..00000000 --- a/node_modules/sonic-boom/bench.js +++ /dev/null @@ -1,67 +0,0 @@ -'use strict' - -const bench = require('fastbench') -const SonicBoom = require('./') -const Console = require('console').Console -const fs = require('fs') - -const core = fs.createWriteStream('/dev/null') -const fd = fs.openSync('/dev/null', 'w') -const sonic = new SonicBoom({ fd }) -const sonic4k = new SonicBoom({ fd, minLength: 4096 }) -const sonicSync = new SonicBoom({ fd, sync: true }) -const sonicSync4k = new SonicBoom({ fd, minLength: 4096, sync: true }) -const dummyConsole = new Console(fs.createWriteStream('/dev/null')) - -const MAX = 10000 - -let str = '' - -for (let i = 0; i < 10; i++) { - str += 'hello' -} - -setTimeout(doBench, 100) - -const run = bench([ - function benchSonic (cb) { - sonic.once('drain', cb) - for (let i = 0; i < MAX; i++) { - sonic.write(str) - } - }, - function benchSonicSync (cb) { - sonicSync.once('drain', cb) - for (let i = 0; i < MAX; i++) { - sonicSync.write(str) - } - }, - function benchSonic4k (cb) { - sonic4k.once('drain', cb) - for (let i = 0; i < MAX; i++) { - sonic4k.write(str) - } - }, - function benchSonicSync4k (cb) { - sonicSync4k.once('drain', cb) - for (let i = 0; i < MAX; i++) { - sonicSync4k.write(str) - } - }, - function benchCore (cb) { - core.once('drain', cb) - for (let i = 0; i < MAX; i++) { - core.write(str) - } - }, - function benchConsole (cb) { - for (let i = 0; i < MAX; i++) { - dummyConsole.log(str) - } - setImmediate(cb) - } -], 1000) - -function doBench () { - run(run) -} diff --git a/node_modules/sonic-boom/check.js b/node_modules/sonic-boom/check.js deleted file mode 100644 index 509905e2..00000000 --- a/node_modules/sonic-boom/check.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict' - -const SonicBoom = require('.') -const sonic = new SonicBoom({ fd: process.stdout.fd }) - -let count = 0 -function scheduleWrites () { - for (let i = 0; i < 1000; i++) { - sonic.write('hello sonic\n') - console.log('hello console') - } - - if (++count < 10) { - setTimeout(scheduleWrites, 100) - } -} - -scheduleWrites() diff --git a/node_modules/sonic-boom/example.js b/node_modules/sonic-boom/example.js deleted file mode 100644 index 3f569cd6..00000000 --- a/node_modules/sonic-boom/example.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' - -const SonicBoom = require('.') -const sonic = new SonicBoom({ fd: process.stdout.fd }) // or 'destination' - -for (let i = 0; i < 10; i++) { - sonic.write('hello sonic\n') -} diff --git a/node_modules/sonic-boom/fixtures/firehose.js b/node_modules/sonic-boom/fixtures/firehose.js deleted file mode 100644 index 85a8f31c..00000000 --- a/node_modules/sonic-boom/fixtures/firehose.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict' - -const SonicBoom = require('..') - -const out = new SonicBoom({ fd: process.stdout.fd }) -const str = Buffer.alloc(1000).fill('a').toString() - -let i = 0 - -function write () { - if (i++ === 10) { - return - } - - if (out.write(str)) { - write() - } else { - out.once('drain', write) - } -} - -write() diff --git a/node_modules/sonic-boom/index.js b/node_modules/sonic-boom/index.js deleted file mode 100644 index a3eea4e5..00000000 --- a/node_modules/sonic-boom/index.js +++ /dev/null @@ -1,380 +0,0 @@ -'use strict' - -const fs = require('fs') -const EventEmitter = require('events') -const flatstr = require('flatstr') -const inherits = require('util').inherits - -const BUSY_WRITE_TIMEOUT = 100 - -const sleep = require('atomic-sleep') - -// 16 MB - magic number -// This constant ensures that SonicBoom only needs -// 32 MB of free memory to run. In case of having 1GB+ -// of data to write, this prevents an out of memory -// condition. -const MAX_WRITE = 16 * 1024 * 1024 - -function openFile (file, sonic) { - sonic._opening = true - sonic._writing = true - sonic._asyncDrainScheduled = false - - // NOTE: 'error' and 'ready' events emitted below only relevant when sonic.sync===false - // for sync mode, there is no way to add a listener that will receive these - - function fileOpened (err, fd) { - if (err) { - sonic._reopening = false - sonic._writing = false - sonic._opening = false - - if (sonic.sync) { - process.nextTick(() => { - if (sonic.listenerCount('error') > 0) { - sonic.emit('error', err) - } - }) - } else { - sonic.emit('error', err) - } - return - } - - sonic.fd = fd - sonic.file = file - sonic._reopening = false - sonic._opening = false - sonic._writing = false - - if (sonic.sync) { - process.nextTick(() => sonic.emit('ready')) - } else { - sonic.emit('ready') - } - - if (sonic._reopening) { - return - } - - // start - const len = sonic._buf.length - if (len > 0 && len > sonic.minLength && !sonic.destroyed) { - actualWrite(sonic) - } - } - - if (sonic.sync) { - try { - const fd = fs.openSync(file, 'a') - fileOpened(null, fd) - } catch (err) { - fileOpened(err) - throw err - } - } else { - fs.open(file, 'a', fileOpened) - } -} - -function SonicBoom (opts) { - if (!(this instanceof SonicBoom)) { - return new SonicBoom(opts) - } - - let { fd, dest, minLength, sync } = opts || {} - - fd = fd || dest - - this._buf = '' - this.fd = -1 - this._writing = false - this._writingBuf = '' - this._ending = false - this._reopening = false - this._asyncDrainScheduled = false - this.file = null - this.destroyed = false - this.sync = sync || false - - this.minLength = minLength || 0 - - if (typeof fd === 'number') { - this.fd = fd - process.nextTick(() => this.emit('ready')) - } else if (typeof fd === 'string') { - openFile(fd, this) - } else { - throw new Error('SonicBoom supports only file descriptors and files') - } - - this.release = (err, n) => { - if (err) { - if (err.code === 'EAGAIN') { - if (this.sync) { - // This error code should not happen in sync mode, because it is - // not using the underlining operating system asynchronous functions. - // However it happens, and so we handle it. - // Ref: https://github.com/pinojs/pino/issues/783 - try { - sleep(BUSY_WRITE_TIMEOUT) - this.release(undefined, 0) - } catch (err) { - this.release(err) - } - } else { - // Let's give the destination some time to process the chunk. - setTimeout(() => { - fs.write(this.fd, this._writingBuf, 'utf8', this.release) - }, BUSY_WRITE_TIMEOUT) - } - } else { - // The error maybe recoverable later, so just put data back to this._buf - this._buf = this._writingBuf + this._buf - this._writingBuf = '' - this._writing = false - - this.emit('error', err) - } - return - } - - if (this._writingBuf.length !== n) { - this._writingBuf = this._writingBuf.slice(n) - if (this.sync) { - try { - do { - n = fs.writeSync(this.fd, this._writingBuf, 'utf8') - this._writingBuf = this._writingBuf.slice(n) - } while (this._writingBuf.length !== 0) - } catch (err) { - this.release(err) - return - } - } else { - fs.write(this.fd, this._writingBuf, 'utf8', this.release) - return - } - } - - this._writingBuf = '' - - if (this.destroyed) { - return - } - - const len = this._buf.length - if (this._reopening) { - this._writing = false - this._reopening = false - this.reopen() - } else if (len > 0 && len > this.minLength) { - actualWrite(this) - } else if (this._ending) { - if (len > 0) { - actualWrite(this) - } else { - this._writing = false - actualClose(this) - } - } else { - this._writing = false - if (this.sync) { - if (!this._asyncDrainScheduled) { - this._asyncDrainScheduled = true - process.nextTick(emitDrain, this) - } - } else { - this.emit('drain') - } - } - } - - this.on('newListener', function (name) { - if (name === 'drain') { - this._asyncDrainScheduled = false - } - }) -} - -function emitDrain (sonic) { - const hasListeners = sonic.listenerCount('drain') > 0 - if (!hasListeners) return - sonic._asyncDrainScheduled = false - sonic.emit('drain') -} - -inherits(SonicBoom, EventEmitter) - -SonicBoom.prototype.write = function (data) { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - this._buf += data - const len = this._buf.length - if (!this._writing && len > this.minLength) { - actualWrite(this) - } - return len < 16384 -} - -SonicBoom.prototype.flush = function () { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - if (this._writing || this.minLength <= 0) { - return - } - - actualWrite(this) -} - -SonicBoom.prototype.reopen = function (file) { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - if (this._opening) { - this.once('ready', () => { - this.reopen(file) - }) - return - } - - if (this._ending) { - return - } - - if (!this.file) { - throw new Error('Unable to reopen a file descriptor, you must pass a file to SonicBoom') - } - - this._reopening = true - - if (this._writing) { - return - } - - const fd = this.fd - this.once('ready', () => { - if (fd !== this.fd) { - fs.close(fd, (err) => { - if (err) { - return this.emit('error', err) - } - }) - } - }) - - openFile(file || this.file, this) -} - -SonicBoom.prototype.end = function () { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - if (this._opening) { - this.once('ready', () => { - this.end() - }) - return - } - - if (this._ending) { - return - } - - this._ending = true - - if (!this._writing && this._buf.length > 0 && this.fd >= 0) { - actualWrite(this) - return - } - - if (this._writing) { - return - } - - actualClose(this) -} - -SonicBoom.prototype.flushSync = function () { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - if (this.fd < 0) { - throw new Error('sonic boom is not ready yet') - } - - while (this._buf.length > 0) { - try { - fs.writeSync(this.fd, this._buf, 'utf8') - this._buf = '' - } catch (err) { - if (err.code !== 'EAGAIN') { - throw err - } - - sleep(BUSY_WRITE_TIMEOUT) - } - } -} - -SonicBoom.prototype.destroy = function () { - if (this.destroyed) { - return - } - actualClose(this) -} - -function actualWrite (sonic) { - sonic._writing = true - let buf = sonic._buf - const release = sonic.release - if (buf.length > MAX_WRITE) { - buf = buf.slice(0, MAX_WRITE) - sonic._buf = sonic._buf.slice(MAX_WRITE) - } else { - sonic._buf = '' - } - flatstr(buf) - sonic._writingBuf = buf - if (sonic.sync) { - try { - const written = fs.writeSync(sonic.fd, buf, 'utf8') - release(null, written) - } catch (err) { - release(err) - } - } else { - fs.write(sonic.fd, buf, 'utf8', release) - } -} - -function actualClose (sonic) { - if (sonic.fd === -1) { - sonic.once('ready', actualClose.bind(null, sonic)) - return - } - // TODO write a test to check if we are not leaking fds - fs.close(sonic.fd, (err) => { - if (err) { - sonic.emit('error', err) - return - } - - if (sonic._ending && !sonic._writing) { - sonic.emit('finish') - } - sonic.emit('close') - }) - sonic.destroyed = true - sonic._buf = '' -} - -module.exports = SonicBoom diff --git a/node_modules/sonic-boom/package.json b/node_modules/sonic-boom/package.json deleted file mode 100644 index ac109a32..00000000 --- a/node_modules/sonic-boom/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "sonic-boom@^1.0.2", - "_id": "sonic-boom@1.4.1", - "_inBundle": false, - "_integrity": "sha512-LRHh/A8tpW7ru89lrlkU4AszXt1dbwSjVWguGrmlxE7tawVmDBlI1PILMkXAxJTwqhgsEeTHzj36D5CmHgQmNg==", - "_location": "/sonic-boom", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "sonic-boom@^1.0.2", - "name": "sonic-boom", - "escapedName": "sonic-boom", - "rawSpec": "^1.0.2", - "saveSpec": null, - "fetchSpec": "^1.0.2" - }, - "_requiredBy": [ - "/pino" - ], - "_resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-1.4.1.tgz", - "_shasum": "d35d6a74076624f12e6f917ade7b9d75e918f53e", - "_spec": "sonic-boom@^1.0.2", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pino", - "author": { - "name": "Matteo Collina", - "email": "hello@matteocollina.com" - }, - "bugs": { - "url": "https://github.com/mcollina/sonic-boom/issues" - }, - "bundleDependencies": false, - "dependencies": { - "atomic-sleep": "^1.0.0", - "flatstr": "^1.0.12" - }, - "deprecated": false, - "description": "Extremely fast utf8 only stream implementation", - "devDependencies": { - "fastbench": "^1.0.1", - "husky": "^6.0.0", - "proxyquire": "^2.1.0", - "standard": "^16.0.3", - "tap": "^15.0.1" - }, - "homepage": "https://github.com/mcollina/sonic-boom#readme", - "husky": { - "hooks": { - "pre-commit": "npm test" - } - }, - "keywords": [ - "stream", - "fs", - "net", - "fd", - "file", - "descriptor", - "fast" - ], - "license": "MIT", - "main": "index.js", - "name": "sonic-boom", - "repository": { - "type": "git", - "url": "git+https://github.com/mcollina/sonic-boom.git" - }, - "scripts": { - "prepare": "husky install", - "test": "standard && tap test.js", - "test-only": "tap test.js" - }, - "version": "1.4.1" -} diff --git a/node_modules/sonic-boom/test.js b/node_modules/sonic-boom/test.js deleted file mode 100644 index 8ca5b1f4..00000000 --- a/node_modules/sonic-boom/test.js +++ /dev/null @@ -1,946 +0,0 @@ -'use strict' - -const { test, teardown } = require('tap') -const { join } = require('path') -const { fork } = require('child_process') -const fs = require('fs') -const os = require('os') -const path = require('path') -const proxyquire = require('proxyquire') -const SonicBoom = require('.') - -const files = [] -let count = 0 - -function file () { - const file = path.join(os.tmpdir(), `sonic-boom-${process.pid}-${process.hrtime().toString()}-${count++}`) - files.push(file) - return file -} - -teardown(() => { - files.forEach((file) => { - try { - if (fs.existsSync(file)) { - fs.unlinkSync(file) - } - } catch (e) { - console.log(e) - } - }) -}) - -test('sync false', (t) => { - buildTests(t.test, false) - t.end() -}) - -test('sync true', (t) => { - buildTests(t.test, true) - t.end() -}) - -function buildTests (test, sync) { - test('write things to a file descriptor', (t) => { - t.plan(6) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom({ fd, sync }) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.end() - - stream.on('finish', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) - }) - - test('write things in a streaming fashion', (t) => { - t.plan(8) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom({ fd, sync }) - - stream.once('drain', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\n') - t.ok(stream.write('something else\n')) - }) - - stream.once('drain', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - stream.end() - }) - }) - }) - - t.ok(stream.write('hello world\n')) - - stream.on('finish', () => { - t.pass('finish emitted') - }) - stream.on('close', () => { - t.pass('close emitted') - }) - }) - - test('can be piped into', (t) => { - t.plan(4) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom({ fd, sync }) - const source = fs.createReadStream(__filename) - - source.pipe(stream) - - stream.on('finish', () => { - fs.readFile(__filename, 'utf8', (err, expected) => { - t.error(err) - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, expected) - }) - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) - }) - - test('write things to a file', (t) => { - t.plan(6) - - const dest = file() - const stream = new SonicBoom({ dest, sync }) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.end() - - stream.on('finish', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) - }) - - test('flushSync', (t) => { - t.plan(4) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom({ fd, minLength: 4096, sync }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.flushSync() - - // let the file system settle down things - setImmediate(function () { - stream.end() - const data = fs.readFileSync(dest, 'utf8') - t.equal(data, 'hello world\nsomething else\n') - - stream.on('close', () => { - t.pass('close emitted') - }) - }) - }) - - test('destroy', (t) => { - t.plan(5) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom({ fd, sync }) - - t.ok(stream.write('hello world\n')) - stream.destroy() - t.throws(() => { stream.write('hello world\n') }) - - fs.readFile(dest, 'utf8', function (err, data) { - t.error(err) - t.equal(data, 'hello world\n') - }) - - stream.on('finish', () => { - t.fail('finish emitted') - }) - - stream.on('close', () => { - t.pass('close emitted') - }) - }) - - test('destroy while opening', (t) => { - t.plan(1) - - const dest = file() - const stream = new SonicBoom({ dest }) - - stream.destroy() - stream.on('close', () => { - t.pass('close emitted') - }) - }) - - test('minLength', (t) => { - t.plan(8) - - const dest = file() - const stream = new SonicBoom({ dest, minLength: 4096, sync }) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - const fail = t.fail - stream.on('drain', fail) - - // bad use of timer - // TODO refactor - setTimeout(function () { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, '') - - stream.end() - - stream.on('finish', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - }) - }) - }) - }, 100) - - stream.on('close', () => { - t.pass('close emitted') - }) - }) - - test('flush', (t) => { - t.plan(5) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom({ fd, minLength: 4096, sync }) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.flush() - - stream.on('drain', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - stream.end() - }) - }) - }) - - test('reopen', (t) => { - t.plan(9) - - const dest = file() - const stream = new SonicBoom({ dest, sync }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - const after = dest + '-moved' - - stream.once('drain', () => { - t.pass('drain emitted') - - fs.renameSync(dest, after) - stream.reopen() - - stream.once('ready', () => { - t.pass('ready emitted') - t.ok(stream.write('after reopen\n')) - - stream.on('drain', () => { - fs.readFile(after, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'after reopen\n') - stream.end() - }) - }) - }) - }) - }) - }) - - test('reopen with buffer', (t) => { - t.plan(9) - - const dest = file() - const stream = new SonicBoom({ dest, minLength: 4096, sync }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - const after = dest + '-moved' - - stream.once('ready', () => { - t.pass('drain emitted') - - stream.flush() - fs.renameSync(dest, after) - stream.reopen() - - stream.once('ready', () => { - t.pass('ready emitted') - t.ok(stream.write('after reopen\n')) - stream.flush() - - stream.on('drain', () => { - fs.readFile(after, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'after reopen\n') - stream.end() - }) - }) - }) - }) - }) - }) - - test('reopen if not open', (t) => { - t.plan(3) - - const dest = file() - const stream = new SonicBoom({ dest, sync }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.reopen() - - stream.end() - stream.on('close', function () { - t.pass('ended') - }) - }) - - test('end after reopen', (t) => { - t.plan(4) - - const dest = file() - const stream = new SonicBoom({ dest, minLength: 4096, sync }) - - stream.once('ready', () => { - t.pass('ready emitted') - const after = dest + '-moved' - stream.reopen(after) - stream.write('after reopen\n') - stream.on('finish', () => { - t.pass('finish emitted') - fs.readFile(after, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'after reopen\n') - }) - }) - stream.end() - }) - }) - - test('end after 2x reopen', (t) => { - t.plan(4) - - const dest = file() - const stream = new SonicBoom({ dest, minLength: 4096, sync }) - - stream.once('ready', () => { - t.pass('ready emitted') - stream.reopen(dest + '-moved') - const after = dest + '-moved-moved' - stream.reopen(after) - stream.write('after reopen\n') - stream.on('finish', () => { - t.pass('finish emitted') - fs.readFile(after, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'after reopen\n') - }) - }) - stream.end() - }) - }) - - test('end if not ready', (t) => { - t.plan(3) - - const dest = file() - const stream = new SonicBoom({ dest, minLength: 4096, sync }) - const after = dest + '-moved' - stream.reopen(after) - stream.write('after reopen\n') - stream.on('finish', () => { - t.pass('finish emitted') - fs.readFile(after, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'after reopen\n') - }) - }) - stream.end() - }) - - test('reopen with file', (t) => { - t.plan(9) - - const dest = file() - const stream = new SonicBoom({ dest, minLength: 0, sync }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - const after = dest + '-new' - - stream.once('drain', () => { - t.pass('drain emitted') - - stream.reopen(after) - - stream.once('ready', () => { - t.pass('ready emitted') - t.ok(stream.write('after reopen\n')) - - stream.on('drain', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - fs.readFile(after, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'after reopen\n') - stream.end() - }) - }) - }) - }) - }) - }) - - test('chunk data accordingly', (t) => { - t.plan(2) - - const child = fork(join(__dirname, 'fixtures', 'firehose.js'), { silent: true }) - const str = Buffer.alloc(10000).fill('a').toString() - - let data = '' - - child.stdout.on('data', function (chunk) { - data += chunk.toString() - }) - - child.stdout.on('end', function () { - t.equal(data, str) - }) - - child.on('close', function (code) { - t.equal(code, 0) - }) - }) - - test('write later on recoverable error', (t) => { - t.plan(8) - - const fakeFs = Object.create(fs) - const SonicBoom = proxyquire('.', { - fs: fakeFs - }) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom({ fd, minLength: 0, sync }) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - stream.on('error', () => { - t.pass('error emitted') - }) - - if (sync) { - fakeFs.writeSync = function (fd, buf, enc) { - t.pass('fake fs.writeSync called') - throw new Error('recoverable error') - } - } else { - fakeFs.write = function (fd, buf, enc, cb) { - t.pass('fake fs.write called') - setTimeout(() => cb(new Error('recoverable error')), 0) - } - } - - t.ok(stream.write('hello world\n')) - - setTimeout(() => { - if (sync) { - fakeFs.writeSync = fs.writeSync - } else { - fakeFs.write = fs.write - } - - t.ok(stream.write('something else\n')) - - stream.end() - stream.on('finish', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) - }, 0) - }) - - test('reopen throws an error', (t) => { - t.plan(sync ? 10 : 9) - - const fakeFs = Object.create(fs) - const SonicBoom = proxyquire('.', { - fs: fakeFs - }) - - const dest = file() - const stream = new SonicBoom({ dest, sync }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - const after = dest + '-moved' - - stream.on('error', () => { - t.pass('error emitted') - }) - - stream.once('drain', () => { - t.pass('drain emitted') - - fs.renameSync(dest, after) - if (sync) { - fakeFs.openSync = function (file, flags) { - t.pass('fake fs.openSync called') - throw new Error('open error') - } - } else { - fakeFs.open = function (file, flags, cb) { - t.pass('fake fs.open called') - setTimeout(() => cb(new Error('open error')), 0) - } - } - - if (sync) { - try { - stream.reopen() - } catch (err) { - t.pass('reopen throwed') - } - } else { - stream.reopen() - } - - setTimeout(() => { - t.ok(stream.write('after reopen\n')) - - stream.end() - stream.on('finish', () => { - fs.readFile(after, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\nafter reopen\n') - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) - }, 0) - }) - }) -} - -test('retry on EAGAIN', (t) => { - t.plan(7) - - const fakeFs = Object.create(fs) - fakeFs.write = function (fd, buf, enc, cb) { - t.pass('fake fs.write called') - fakeFs.write = fs.write - const err = new Error('EAGAIN') - err.code = 'EAGAIN' - process.nextTick(cb, err) - } - const SonicBoom = proxyquire('.', { - fs: fakeFs - }) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom({ fd, sync: false, minLength: 0 }) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.end() - - stream.on('finish', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) -}) - -test('retry on EAGAIN (sync)', (t) => { - t.plan(7) - - const fakeFs = Object.create(fs) - fakeFs.writeSync = function (fd, buf, enc, cb) { - t.pass('fake fs.writeSync called') - fakeFs.writeSync = fs.writeSync - const err = new Error('EAGAIN') - err.code = 'EAGAIN' - throw err - } - const SonicBoom = proxyquire('.', { - fs: fakeFs - }) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom({ fd, minLength: 0, sync: true }) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.end() - - stream.on('finish', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) -}) - -test('retry in flushSync on EAGAIN', (t) => { - t.plan(7) - - const fakeFs = Object.create(fs) - const SonicBoom = proxyquire('.', { - fs: fakeFs - }) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom({ fd, sync: false, minLength: 0 }) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - - t.ok(stream.write('hello world\n')) - - fakeFs.writeSync = function (fd, buf, enc) { - t.pass('fake fs.write called') - fakeFs.writeSync = fs.writeSync - const err = new Error('EAGAIN') - err.code = 'EAGAIN' - throw err - } - - t.ok(stream.write('something else\n')) - - stream.flushSync() - stream.end() - - stream.on('finish', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) -}) - -test('write buffers that are not totally written', (t) => { - t.plan(9) - - const fakeFs = Object.create(fs) - fakeFs.write = function (fd, buf, enc, cb) { - t.pass('fake fs.write called') - fakeFs.write = function (fd, buf, enc, cb) { - t.pass('calling real fs.write, ' + buf) - fs.write(fd, buf, enc, cb) - } - process.nextTick(cb, null, 0) - } - const SonicBoom = proxyquire('.', { - fs: fakeFs - }) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom({ fd, minLength: 0, sync: false }) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.end() - - stream.on('finish', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) -}) - -test('write buffers that are not totally written with sync mode', (t) => { - t.plan(9) - - const fakeFs = Object.create(fs) - fakeFs.writeSync = function (fd, buf, enc) { - t.pass('fake fs.write called') - fakeFs.writeSync = (fd, buf, enc) => { - t.pass('calling real fs.writeSync, ' + buf) - return fs.writeSync(fd, buf, enc) - } - return 0 - } - const SonicBoom = proxyquire('.', { - fs: fakeFs - }) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom({ fd, minLength: 0, sync: true }) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.end() - - stream.on('finish', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) -}) - -test('sync writing is fully sync', (t) => { - t.plan(6) - - const fakeFs = Object.create(fs) - fakeFs.writeSync = function (fd, buf, enc, cb) { - t.pass('fake fs.write called') - return fs.writeSync(fd, buf, enc) - } - const SonicBoom = proxyquire('.', { - fs: fakeFs - }) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom({ fd, minLength: 0, sync: true }) - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - // 'drain' will be only emitted once, - // the number of assertions at the top check this. - stream.on('drain', () => { - t.pass('drain emitted') - }) - - const data = fs.readFileSync(dest, 'utf8') - t.equal(data, 'hello world\nsomething else\n') -}) - -// These they will fail on Node 6, as we cannot allocate a string this -// big. It's considered a won't fix on Node 6, as it's deprecated. -if (process.versions.node.indexOf('6.') !== 0) { - test('write enormously large buffers async', (t) => { - t.plan(3) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom({ fd, minLength: 0, sync: false }) - - const buf = Buffer.alloc(1024).fill('x').toString() // 1 MB - let length = 0 - - for (let i = 0; i < 1024 * 512; i++) { - length += buf.length - stream.write(buf) - } - - stream.end() - - stream.on('finish', () => { - fs.stat(dest, (err, stat) => { - t.error(err) - t.equal(stat.size, length) - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) - }) - - test('write enormously large buffers sync', (t) => { - t.plan(3) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom({ fd, minLength: 0, sync: true }) - - const buf = Buffer.alloc(1024).fill('x').toString() // 1 MB - let length = 0 - - for (let i = 0; i < 1024 * 512; i++) { - length += buf.length - stream.write(buf) - } - - stream.end() - - stream.on('finish', () => { - fs.stat(dest, (err, stat) => { - t.error(err) - t.equal(stat.size, length) - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) - }) -} - -test('write enormously large buffers sync with utf8 multi-byte split', (t) => { - t.plan(4) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom({ fd, minLength: 0, sync: true }) - - let buf = Buffer.alloc((1024 * 16) - 2).fill('x') // 16MB - 3B - const length = buf.length + 4 - buf = buf.toString() + '🌲' // 16 MB + 1B - - stream.write(buf) - - stream.end() - - stream.on('finish', () => { - fs.stat(dest, (err, stat) => { - t.error(err) - t.equal(stat.size, length) - const char = Buffer.alloc(4) - const fd = fs.openSync(dest, 'r') - fs.readSync(fd, char, 0, 4, length - 4) - t.equal(char.toString(), '🌲') - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) -}) - -// for context see this issue https://github.com/pinojs/pino/issues/871 -test('file specified by dest path available immediately when options.sync is true', (t) => { - t.plan(3) - const dest = file() - const stream = new SonicBoom({ dest, sync: true }) - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - stream.flushSync() - t.pass('file opened and written to without error') -}) - -test('sync error handling', (t) => { - t.plan(1) - try { - /* eslint no-new: off */ - new SonicBoom({ dest: '/path/to/nowwhere', sync: true }) - t.fail('must throw synchronously') - } catch (err) { - t.pass('an error happened') - } -}) diff --git a/node_modules/source-map/CHANGELOG.md b/node_modules/source-map/CHANGELOG.md deleted file mode 100644 index 3a8c066c..00000000 --- a/node_modules/source-map/CHANGELOG.md +++ /dev/null @@ -1,301 +0,0 @@ -# Change Log - -## 0.5.6 - -* Fix for regression when people were using numbers as names in source maps. See - #236. - -## 0.5.5 - -* Fix "regression" of unsupported, implementation behavior that half the world - happens to have come to depend on. See #235. - -* Fix regression involving function hoisting in SpiderMonkey. See #233. - -## 0.5.4 - -* Large performance improvements to source-map serialization. See #228 and #229. - -## 0.5.3 - -* Do not include unnecessary distribution files. See - commit ef7006f8d1647e0a83fdc60f04f5a7ca54886f86. - -## 0.5.2 - -* Include browser distributions of the library in package.json's `files`. See - issue #212. - -## 0.5.1 - -* Fix latent bugs in IndexedSourceMapConsumer.prototype._parseMappings. See - ff05274becc9e6e1295ed60f3ea090d31d843379. - -## 0.5.0 - -* Node 0.8 is no longer supported. - -* Use webpack instead of dryice for bundling. - -* Big speedups serializing source maps. See pull request #203. - -* Fix a bug with `SourceMapConsumer.prototype.sourceContentFor` and sources that - explicitly start with the source root. See issue #199. - -## 0.4.4 - -* Fix an issue where using a `SourceMapGenerator` after having created a - `SourceMapConsumer` from it via `SourceMapConsumer.fromSourceMap` failed. See - issue #191. - -* Fix an issue with where `SourceMapGenerator` would mistakenly consider - different mappings as duplicates of each other and avoid generating them. See - issue #192. - -## 0.4.3 - -* A very large number of performance improvements, particularly when parsing - source maps. Collectively about 75% of time shaved off of the source map - parsing benchmark! - -* Fix a bug in `SourceMapConsumer.prototype.allGeneratedPositionsFor` and fuzzy - searching in the presence of a column option. See issue #177. - -* Fix a bug with joining a source and its source root when the source is above - the root. See issue #182. - -* Add the `SourceMapConsumer.prototype.hasContentsOfAllSources` method to - determine when all sources' contents are inlined into the source map. See - issue #190. - -## 0.4.2 - -* Add an `.npmignore` file so that the benchmarks aren't pulled down by - dependent projects. Issue #169. - -* Add an optional `column` argument to - `SourceMapConsumer.prototype.allGeneratedPositionsFor` and better handle lines - with no mappings. Issues #172 and #173. - -## 0.4.1 - -* Fix accidentally defining a global variable. #170. - -## 0.4.0 - -* The default direction for fuzzy searching was changed back to its original - direction. See #164. - -* There is now a `bias` option you can supply to `SourceMapConsumer` to control - the fuzzy searching direction. See #167. - -* About an 8% speed up in parsing source maps. See #159. - -* Added a benchmark for parsing and generating source maps. - -## 0.3.0 - -* Change the default direction that searching for positions fuzzes when there is - not an exact match. See #154. - -* Support for environments using json2.js for JSON serialization. See #156. - -## 0.2.0 - -* Support for consuming "indexed" source maps which do not have any remote - sections. See pull request #127. This introduces a minor backwards - incompatibility if you are monkey patching `SourceMapConsumer.prototype` - methods. - -## 0.1.43 - -* Performance improvements for `SourceMapGenerator` and `SourceNode`. See issue - #148 for some discussion and issues #150, #151, and #152 for implementations. - -## 0.1.42 - -* Fix an issue where `SourceNode`s from different versions of the source-map - library couldn't be used in conjunction with each other. See issue #142. - -## 0.1.41 - -* Fix a bug with getting the source content of relative sources with a "./" - prefix. See issue #145 and [Bug 1090768](bugzil.la/1090768). - -* Add the `SourceMapConsumer.prototype.computeColumnSpans` method to compute the - column span of each mapping. - -* Add the `SourceMapConsumer.prototype.allGeneratedPositionsFor` method to find - all generated positions associated with a given original source and line. - -## 0.1.40 - -* Performance improvements for parsing source maps in SourceMapConsumer. - -## 0.1.39 - -* Fix a bug where setting a source's contents to null before any source content - had been set before threw a TypeError. See issue #131. - -## 0.1.38 - -* Fix a bug where finding relative paths from an empty path were creating - absolute paths. See issue #129. - -## 0.1.37 - -* Fix a bug where if the source root was an empty string, relative source paths - would turn into absolute source paths. Issue #124. - -## 0.1.36 - -* Allow the `names` mapping property to be an empty string. Issue #121. - -## 0.1.35 - -* A third optional parameter was added to `SourceNode.fromStringWithSourceMap` - to specify a path that relative sources in the second parameter should be - relative to. Issue #105. - -* If no file property is given to a `SourceMapGenerator`, then the resulting - source map will no longer have a `null` file property. The property will - simply not exist. Issue #104. - -* Fixed a bug where consecutive newlines were ignored in `SourceNode`s. - Issue #116. - -## 0.1.34 - -* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103. - -* Fix bug involving source contents and the - `SourceMapGenerator.prototype.applySourceMap`. Issue #100. - -## 0.1.33 - -* Fix some edge cases surrounding path joining and URL resolution. - -* Add a third parameter for relative path to - `SourceMapGenerator.prototype.applySourceMap`. - -* Fix issues with mappings and EOLs. - -## 0.1.32 - -* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns - (issue 92). - -* Fixed test runner to actually report number of failed tests as its process - exit code. - -* Fixed a typo when reporting bad mappings (issue 87). - -## 0.1.31 - -* Delay parsing the mappings in SourceMapConsumer until queried for a source - location. - -* Support Sass source maps (which at the time of writing deviate from the spec - in small ways) in SourceMapConsumer. - -## 0.1.30 - -* Do not join source root with a source, when the source is a data URI. - -* Extend the test runner to allow running single specific test files at a time. - -* Performance improvements in `SourceNode.prototype.walk` and - `SourceMapConsumer.prototype.eachMapping`. - -* Source map browser builds will now work inside Workers. - -* Better error messages when attempting to add an invalid mapping to a - `SourceMapGenerator`. - -## 0.1.29 - -* Allow duplicate entries in the `names` and `sources` arrays of source maps - (usually from TypeScript) we are parsing. Fixes github issue 72. - -## 0.1.28 - -* Skip duplicate mappings when creating source maps from SourceNode; github - issue 75. - -## 0.1.27 - -* Don't throw an error when the `file` property is missing in SourceMapConsumer, - we don't use it anyway. - -## 0.1.26 - -* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70. - -## 0.1.25 - -* Make compatible with browserify - -## 0.1.24 - -* Fix issue with absolute paths and `file://` URIs. See - https://bugzilla.mozilla.org/show_bug.cgi?id=885597 - -## 0.1.23 - -* Fix issue with absolute paths and sourcesContent, github issue 64. - -## 0.1.22 - -* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21. - -## 0.1.21 - -* Fixed handling of sources that start with a slash so that they are relative to - the source root's host. - -## 0.1.20 - -* Fixed github issue #43: absolute URLs aren't joined with the source root - anymore. - -## 0.1.19 - -* Using Travis CI to run tests. - -## 0.1.18 - -* Fixed a bug in the handling of sourceRoot. - -## 0.1.17 - -* Added SourceNode.fromStringWithSourceMap. - -## 0.1.16 - -* Added missing documentation. - -* Fixed the generating of empty mappings in SourceNode. - -## 0.1.15 - -* Added SourceMapGenerator.applySourceMap. - -## 0.1.14 - -* The sourceRoot is now handled consistently. - -## 0.1.13 - -* Added SourceMapGenerator.fromSourceMap. - -## 0.1.12 - -* SourceNode now generates empty mappings too. - -## 0.1.11 - -* Added name support to SourceNode. - -## 0.1.10 - -* Added sourcesContent support to the customer and generator. diff --git a/node_modules/source-map/LICENSE b/node_modules/source-map/LICENSE deleted file mode 100644 index ed1b7cf2..00000000 --- a/node_modules/source-map/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ - -Copyright (c) 2009-2011, Mozilla Foundation and contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the names of the Mozilla Foundation nor the names of project - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/source-map/README.md b/node_modules/source-map/README.md deleted file mode 100644 index fea4beb1..00000000 --- a/node_modules/source-map/README.md +++ /dev/null @@ -1,742 +0,0 @@ -# Source Map - -[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) - -[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map) - -This is a library to generate and consume the source map format -[described here][format]. - -[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit - -## Use with Node - - $ npm install source-map - -## Use on the Web - - - --------------------------------------------------------------------------------- - - - - - -## Table of Contents - -- [Examples](#examples) - - [Consuming a source map](#consuming-a-source-map) - - [Generating a source map](#generating-a-source-map) - - [With SourceNode (high level API)](#with-sourcenode-high-level-api) - - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) -- [API](#api) - - [SourceMapConsumer](#sourcemapconsumer) - - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) - - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) - - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) - - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) - - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) - - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) - - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) - - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) - - [SourceMapGenerator](#sourcemapgenerator) - - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) - - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) - - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) - - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) - - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) - - [SourceNode](#sourcenode) - - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) - - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) - - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) - - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) - - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) - - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) - - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) - - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) - - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) - - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) - - - -## Examples - -### Consuming a source map - -```js -var rawSourceMap = { - version: 3, - file: 'min.js', - names: ['bar', 'baz', 'n'], - sources: ['one.js', 'two.js'], - sourceRoot: 'http://example.com/www/js/', - mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' -}; - -var smc = new SourceMapConsumer(rawSourceMap); - -console.log(smc.sources); -// [ 'http://example.com/www/js/one.js', -// 'http://example.com/www/js/two.js' ] - -console.log(smc.originalPositionFor({ - line: 2, - column: 28 -})); -// { source: 'http://example.com/www/js/two.js', -// line: 2, -// column: 10, -// name: 'n' } - -console.log(smc.generatedPositionFor({ - source: 'http://example.com/www/js/two.js', - line: 2, - column: 10 -})); -// { line: 2, column: 28 } - -smc.eachMapping(function (m) { - // ... -}); -``` - -### Generating a source map - -In depth guide: -[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) - -#### With SourceNode (high level API) - -```js -function compile(ast) { - switch (ast.type) { - case 'BinaryExpression': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - [compile(ast.left), " + ", compile(ast.right)] - ); - case 'Literal': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - String(ast.value) - ); - // ... - default: - throw new Error("Bad AST"); - } -} - -var ast = parse("40 + 2", "add.js"); -console.log(compile(ast).toStringWithSourceMap({ - file: 'add.js' -})); -// { code: '40 + 2', -// map: [object SourceMapGenerator] } -``` - -#### With SourceMapGenerator (low level API) - -```js -var map = new SourceMapGenerator({ - file: "source-mapped.js" -}); - -map.addMapping({ - generated: { - line: 10, - column: 35 - }, - source: "foo.js", - original: { - line: 33, - column: 2 - }, - name: "christopher" -}); - -console.log(map.toString()); -// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' -``` - -## API - -Get a reference to the module: - -```js -// Node.js -var sourceMap = require('source-map'); - -// Browser builds -var sourceMap = window.sourceMap; - -// Inside Firefox -const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); -``` - -### SourceMapConsumer - -A SourceMapConsumer instance represents a parsed source map which we can query -for information about the original file positions by giving it a file position -in the generated source. - -#### new SourceMapConsumer(rawSourceMap) - -The only parameter is the raw source map (either as a string which can be -`JSON.parse`'d, or an object). According to the spec, source maps have the -following attributes: - -* `version`: Which version of the source map spec this map is following. - -* `sources`: An array of URLs to the original source files. - -* `names`: An array of identifiers which can be referenced by individual - mappings. - -* `sourceRoot`: Optional. The URL root from which all sources are relative. - -* `sourcesContent`: Optional. An array of contents of the original source files. - -* `mappings`: A string of base64 VLQs which contain the actual mappings. - -* `file`: Optional. The generated filename this source map is associated with. - -```js -var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); -``` - -#### SourceMapConsumer.prototype.computeColumnSpans() - -Compute the last column for each generated mapping. The last column is -inclusive. - -```js -// Before: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] - -consumer.computeColumnSpans(); - -// After: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1, -// lastColumn: 9 }, -// { line: 2, -// column: 10, -// lastColumn: 19 }, -// { line: 2, -// column: 20, -// lastColumn: Infinity } ] - -``` - -#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) - -Returns the original source, line, and column information for the generated -source's line and column positions provided. The only argument is an object with -the following properties: - -* `line`: The line number in the generated source. Line numbers in - this library are 1-based (note that the underlying source map - specification uses 0-based line numbers -- this library handles the - translation). - -* `column`: The column number in the generated source. Column numbers - in this library are 0-based. - -* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or - `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest - element that is smaller than or greater than the one we are searching for, - respectively, if the exact element cannot be found. Defaults to - `SourceMapConsumer.GREATEST_LOWER_BOUND`. - -and an object is returned with the following properties: - -* `source`: The original source file, or null if this information is not - available. - -* `line`: The line number in the original source, or null if this information is - not available. The line number is 1-based. - -* `column`: The column number in the original source, or null if this - information is not available. The column number is 0-based. - -* `name`: The original identifier, or null if this information is not available. - -```js -consumer.originalPositionFor({ line: 2, column: 10 }) -// { source: 'foo.coffee', -// line: 2, -// column: 2, -// name: null } - -consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) -// { source: null, -// line: null, -// column: null, -// name: null } -``` - -#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) - -Returns the generated line and column information for the original source, -line, and column positions provided. The only argument is an object with -the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. The line number is - 1-based. - -* `column`: The column number in the original source. The column - number is 0-based. - -and an object is returned with the following properties: - -* `line`: The line number in the generated source, or null. The line - number is 1-based. - -* `column`: The column number in the generated source, or null. The - column number is 0-based. - -```js -consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) -// { line: 1, -// column: 56 } -``` - -#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) - -Returns all generated line and column information for the original source, line, -and column provided. If no column is provided, returns all mappings -corresponding to a either the line we are searching for or the next closest line -that has any mappings. Otherwise, returns all mappings corresponding to the -given line and either the column we are searching for or the next closest column -that has any offsets. - -The only argument is an object with the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. The line number is - 1-based. - -* `column`: Optional. The column number in the original source. The - column number is 0-based. - -and an array of objects is returned, each with the following properties: - -* `line`: The line number in the generated source, or null. The line - number is 1-based. - -* `column`: The column number in the generated source, or null. The - column number is 0-based. - -```js -consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] -``` - -#### SourceMapConsumer.prototype.hasContentsOfAllSources() - -Return true if we have the embedded source content for every source listed in -the source map, false otherwise. - -In other words, if this method returns `true`, then -`consumer.sourceContentFor(s)` will succeed for every source `s` in -`consumer.sources`. - -```js -// ... -if (consumer.hasContentsOfAllSources()) { - consumerReadyCallback(consumer); -} else { - fetchSources(consumer, consumerReadyCallback); -} -// ... -``` - -#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) - -Returns the original source content for the source provided. The only -argument is the URL of the original source file. - -If the source content for the given source is not found, then an error is -thrown. Optionally, pass `true` as the second param to have `null` returned -instead. - -```js -consumer.sources -// [ "my-cool-lib.clj" ] - -consumer.sourceContentFor("my-cool-lib.clj") -// "..." - -consumer.sourceContentFor("this is not in the source map"); -// Error: "this is not in the source map" is not in the source map - -consumer.sourceContentFor("this is not in the source map", true); -// null -``` - -#### SourceMapConsumer.prototype.eachMapping(callback, context, order) - -Iterate over each mapping between an original source/line/column and a -generated line/column in this source map. - -* `callback`: The function that is called with each mapping. Mappings have the - form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, - name }` - -* `context`: Optional. If specified, this object will be the value of `this` - every time that `callback` is called. - -* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or - `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over - the mappings sorted by the generated file's line/column order or the - original's source/line/column order, respectively. Defaults to - `SourceMapConsumer.GENERATED_ORDER`. - -```js -consumer.eachMapping(function (m) { console.log(m); }) -// ... -// { source: 'illmatic.js', -// generatedLine: 1, -// generatedColumn: 0, -// originalLine: 1, -// originalColumn: 0, -// name: null } -// { source: 'illmatic.js', -// generatedLine: 2, -// generatedColumn: 0, -// originalLine: 2, -// originalColumn: 0, -// name: null } -// ... -``` -### SourceMapGenerator - -An instance of the SourceMapGenerator represents a source map which is being -built incrementally. - -#### new SourceMapGenerator([startOfSourceMap]) - -You may pass an object with the following properties: - -* `file`: The filename of the generated source that this source map is - associated with. - -* `sourceRoot`: A root for all relative URLs in this source map. - -* `skipValidation`: Optional. When `true`, disables validation of mappings as - they are added. This can improve performance but should be used with - discretion, as a last resort. Even then, one should avoid using this flag when - running tests, if possible. - -```js -var generator = new sourceMap.SourceMapGenerator({ - file: "my-generated-javascript-file.js", - sourceRoot: "http://example.com/app/js/" -}); -``` - -#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) - -Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. - -* `sourceMapConsumer` The SourceMap. - -```js -var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer); -``` - -#### SourceMapGenerator.prototype.addMapping(mapping) - -Add a single mapping from original source line and column to the generated -source's line and column for this source map being created. The mapping object -should have the following properties: - -* `generated`: An object with the generated line and column positions. - -* `original`: An object with the original line and column positions. - -* `source`: The original source file (relative to the sourceRoot). - -* `name`: An optional original token name for this mapping. - -```js -generator.addMapping({ - source: "module-one.scm", - original: { line: 128, column: 0 }, - generated: { line: 3, column: 456 } -}) -``` - -#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for an original source file. - -* `sourceFile` the URL of the original source file. - -* `sourceContent` the content of the source file. - -```js -generator.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) - -Applies a SourceMap for a source file to the SourceMap. -Each mapping to the supplied source file is rewritten using the -supplied SourceMap. Note: The resolution for the resulting mappings -is the minimum of this map and the supplied map. - -* `sourceMapConsumer`: The SourceMap to be applied. - -* `sourceFile`: Optional. The filename of the source file. - If omitted, sourceMapConsumer.file will be used, if it exists. - Otherwise an error will be thrown. - -* `sourceMapPath`: Optional. The dirname of the path to the SourceMap - to be applied. If relative, it is relative to the SourceMap. - - This parameter is needed when the two SourceMaps aren't in the same - directory, and the SourceMap to be applied contains relative source - paths. If so, those relative source paths need to be rewritten - relative to the SourceMap. - - If omitted, it is assumed that both SourceMaps are in the same directory, - thus not needing any rewriting. (Supplying `'.'` has the same effect.) - -#### SourceMapGenerator.prototype.toString() - -Renders the source map being generated to a string. - -```js -generator.toString() -// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' -``` - -### SourceNode - -SourceNodes provide a way to abstract over interpolating and/or concatenating -snippets of generated JavaScript source code, while maintaining the line and -column information associated between those snippets and the original source -code. This is useful as the final intermediate representation a compiler might -use before outputting the generated JS and source map. - -#### new SourceNode([line, column, source[, chunk[, name]]]) - -* `line`: The original line number associated with this source node, or null if - it isn't associated with an original line. The line number is 1-based. - -* `column`: The original column number associated with this source node, or null - if it isn't associated with an original column. The column number - is 0-based. - -* `source`: The original source's filename; null if no filename is provided. - -* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see - below. - -* `name`: Optional. The original identifier. - -```js -var node = new SourceNode(1, 2, "a.cpp", [ - new SourceNode(3, 4, "b.cpp", "extern int status;\n"), - new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), - new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), -]); -``` - -#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) - -Creates a SourceNode from generated code and a SourceMapConsumer. - -* `code`: The generated code - -* `sourceMapConsumer` The SourceMap for the generated code - -* `relativePath` The optional path that relative sources in `sourceMapConsumer` - should be relative to. - -```js -var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); -var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), - consumer); -``` - -#### SourceNode.prototype.add(chunk) - -Add a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.add(" + "); -node.add(otherNode); -node.add([leftHandOperandNode, " + ", rightHandOperandNode]); -``` - -#### SourceNode.prototype.prepend(chunk) - -Prepend a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.prepend("/** Build Id: f783haef86324gf **/\n\n"); -``` - -#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for a source file. This will be added to the -`SourceMap` in the `sourcesContent` field. - -* `sourceFile`: The filename of the source file - -* `sourceContent`: The content of the source file - -```js -node.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceNode.prototype.walk(fn) - -Walk over the tree of JS snippets in this node and its children. The walking -function is called once for each snippet of JS and is passed that snippet and -the its original associated source's line/column location. - -* `fn`: The traversal function. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.walk(function (code, loc) { console.log("WALK:", code, loc); }) -// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } -// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } -// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } -// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } -``` - -#### SourceNode.prototype.walkSourceContents(fn) - -Walk over the tree of SourceNodes. The walking function is called for each -source file content and is passed the filename and source content. - -* `fn`: The traversal function. - -```js -var a = new SourceNode(1, 2, "a.js", "generated from a"); -a.setSourceContent("a.js", "original a"); -var b = new SourceNode(1, 2, "b.js", "generated from b"); -b.setSourceContent("b.js", "original b"); -var c = new SourceNode(1, 2, "c.js", "generated from c"); -c.setSourceContent("c.js", "original c"); - -var node = new SourceNode(null, null, null, [a, b, c]); -node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) -// WALK: a.js : original a -// WALK: b.js : original b -// WALK: c.js : original c -``` - -#### SourceNode.prototype.join(sep) - -Like `Array.prototype.join` except for SourceNodes. Inserts the separator -between each of this source node's children. - -* `sep`: The separator. - -```js -var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); -var operand = new SourceNode(3, 4, "a.rs", "="); -var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); - -var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); -var joinedNode = node.join(" "); -``` - -#### SourceNode.prototype.replaceRight(pattern, replacement) - -Call `String.prototype.replace` on the very right-most source snippet. Useful -for trimming white space from the end of a source node, etc. - -* `pattern`: The pattern to replace. - -* `replacement`: The thing to replace the pattern with. - -```js -// Trim trailing white space. -node.replaceRight(/\s*$/, ""); -``` - -#### SourceNode.prototype.toString() - -Return the string representation of this source node. Walks over the tree and -concatenates all the various snippets together to one string. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toString() -// 'unodostresquatro' -``` - -#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) - -Returns the string representation of this tree of source nodes, plus a -SourceMapGenerator which contains all the mappings between the generated and -original sources. - -The arguments are the same as those to `new SourceMapGenerator`. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toStringWithSourceMap({ file: "my-output-file.js" }) -// { code: 'unodostresquatro', -// map: [object SourceMapGenerator] } -``` diff --git a/node_modules/source-map/dist/source-map.debug.js b/node_modules/source-map/dist/source-map.debug.js deleted file mode 100644 index aad0620d..00000000 --- a/node_modules/source-map/dist/source-map.debug.js +++ /dev/null @@ -1,3234 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var sourceRelative = sourceFile; - if (sourceRoot !== null) { - sourceRelative = util.relative(sourceRoot, sourceFile); - } - - if (!generator._sources.has(sourceRelative)) { - generator._sources.add(sourceRelative); - } - - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || urlRegexp.test(aPath); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 === null) { - return 1; // aStr2 !== null - } - - if (aStr2 === null) { - return -1; // aStr1 !== null - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - /** - * Strip any JSON XSSI avoidance prefix from the string (as documented - * in the source maps specification), and then parse the string as - * JSON. - */ - function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); - } - exports.parseSourceMapInput = parseSourceMapInput; - - /** - * Compute the URL of a source given the the source root, the source's - * URL, and the source map's URL. - */ - function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ''; - - if (sourceRoot) { - // This follows what Chrome does. - if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { - sourceRoot += '/'; - } - // The spec says: - // Line 4: An optional source root, useful for relocating source - // files on a server or removing repeated values in the - // “sources” entry. This value is prepended to the individual - // entries in the “source” field. - sourceURL = sourceRoot + sourceURL; - } - - // Historically, SourceMapConsumer did not take the sourceMapURL as - // a parameter. This mode is still somewhat supported, which is why - // this code block is conditional. However, it's preferable to pass - // the source map URL to SourceMapConsumer, so that this function - // can implement the source URL resolution algorithm as outlined in - // the spec. This block is basically the equivalent of: - // new URL(sourceURL, sourceMapURL).toString() - // ... except it avoids using URL, which wasn't available in the - // older releases of node still supported by this library. - // - // The spec says: - // If the sources are not absolute URLs after prepending of the - // “sourceRoot”, the sources are resolved relative to the - // SourceMap (like resolving script src in a html document). - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - // Strip the last path component, but keep the "/". - var index = parsed.path.lastIndexOf('/'); - if (index >= 0) { - parsed.path = parsed.path.substring(0, index + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } - - return normalize(sourceURL); - } - exports.computeSourceURL = computeSourceURL; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) - : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number is 1-based. - * - column: Optional. the column number in the original source. - * The column number is 0-based. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - needle.source = this._findSourceIndex(needle.source); - if (needle.source < 0) { - return []; - } - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The first parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - if (sourceRoot) { - sourceRoot = util.normalize(sourceRoot); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this._absoluteSources = this._sources.toArray().map(function (s) { - return util.computeSourceURL(sourceRoot, s, aSourceMapURL); - }); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this._sourceMapURL = aSourceMapURL; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Utility function to find the index of a source. Returns -1 if not - * found. - */ - BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - if (this._sources.has(relativeSource)) { - return this._sources.indexOf(relativeSource); - } - - // Maybe aSource is an absolute URL as returned by |sources|. In - // this case we can't simply undo the transform. - var i; - for (i = 0; i < this._absoluteSources.length; ++i) { - if (this._absoluteSources[i] == aSource) { - return i; - } - } - - return -1; - }; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @param String aSourceMapURL - * The URL at which the source map can be found (optional) - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - smc._sourceMapURL = aSourceMapURL; - smc._absoluteSources = smc._sources.toArray().map(function (s) { - return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); - }); - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._absoluteSources.slice(); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - var index = this._findSourceIndex(aSource); - if (index >= 0) { - return this.sourcesContent[index]; - } - - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + relativeSource)) { - return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + relativeSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - source = this._findSourceIndex(source); - if (source < 0) { - return { - line: null, - column: null, - lastColumn: null - }; - } - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The first parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = null; - if (mapping.name) { - name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - } - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex] || ''; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex] || ''; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCAxNjI0YzcyOTliODg3ZjdiZGY2NCIsIndlYnBhY2s6Ly8vLi9zb3VyY2UtbWFwLmpzIiwid2VicGFjazovLy8uL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LXZscS5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LmpzIiwid2VicGFjazovLy8uL2xpYi91dGlsLmpzIiwid2VicGFjazovLy8uL2xpYi9hcnJheS1zZXQuanMiLCJ3ZWJwYWNrOi8vLy4vbGliL21hcHBpbmctbGlzdC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmluYXJ5LXNlYXJjaC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvcXVpY2stc29ydC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW5vZGUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsQ0FBQztBQUNELE87QUNWQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO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FEuZW5jb2RlKHNvdXJjZUlkeCAtIHByZXZpb3VzU291cmNlKTtcbiAgICAgICAgcHJldmlvdXNTb3VyY2UgPSBzb3VyY2VJZHg7XG5cbiAgICAgICAgLy8gbGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkIGluIFNvdXJjZU1hcCBzcGVjIHZlcnNpb24gM1xuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUobWFwcGluZy5vcmlnaW5hbExpbmUgLSAxXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbExpbmUpO1xuICAgICAgICBwcmV2aW91c09yaWdpbmFsTGluZSA9IG1hcHBpbmcub3JpZ2luYWxMaW5lIC0gMTtcblxuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUobWFwcGluZy5vcmlnaW5hbENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIHByZXZpb3VzT3JpZ2luYWxDb2x1bW4pO1xuICAgICAgICBwcmV2aW91c09yaWdpbmFsQ29sdW1uID0gbWFwcGluZy5vcmlnaW5hbENvbHVtbjtcblxuICAgICAgICBpZiAobWFwcGluZy5uYW1lICE9IG51bGwpIHtcbiAgICAgICAgICBuYW1lSWR4ID0gdGhpcy5fbmFtZXMuaW5kZXhPZihtYXBwaW5nLm5hbWUpO1xuICAgICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShuYW1lSWR4IC0gcHJldmlvdXNOYW1lKTtcbiAgICAgICAgICBwcmV2aW91c05hbWUgPSBuYW1lSWR4O1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJlc3VsdCArPSBuZXh0O1xuICAgIH1cblxuICAgIHJldHVybiByZXN1bHQ7XG4gIH07XG5cblNvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUuX2dlbmVyYXRlU291cmNlc0NvbnRlbnQgPVxuICBmdW5jdGlvbiBTb3VyY2VNYX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aW9uIChzb3VyY2VGaWxlKSB7XG4gICAgICB2YXIgY29udGVudCA9IGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VDb250ZW50Rm9yKHNvdXJjZUZpbGUpO1xuICAgICAgaWYgKGNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgICBpZiAoYVJlbGF0aXZlUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBzb3VyY2VGaWxlKTtcbiAgICAgICAgfVxuICAgICAgICBub2RlLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gbm9kZTtcblxuICAgIGZ1bmN0aW9uIGFkZE1hcHBpbmdXaXRoQ29kZShtYXBwaW5nLCBjb2RlKSB7XG4gICAgICBpZiAobWFwcGluZyA9PT0gbnVsbCB8fCBtYXBwaW5nLnNvdXJjZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIG5vZGUuYWRkKGNvZGUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICA/IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICA6IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07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ZlID0gZmFsc2U7XG4gICAgfVxuICAgIGZvciAodmFyIGlkeCA9IDAsIGxlbmd0aCA9IGNodW5rLmxlbmd0aDsgaWR4IDwgbGVuZ3RoOyBpZHgrKykge1xuICAgICAgaWYgKGNodW5rLmNoYXJDb2RlQXQoaWR4KSA9PT0gTkVXTElORV9DT0RFKSB7XG4gICAgICAgIGdlbmVyYXRlZC5saW5lKys7XG4gICAgICAgIGdlbmVyYXRlZC5jb2x1bW4gPSAwO1xuICAgICAgICAvLyBNYXBwaW5ncyBlbmQgYXQgZW9sXG4gICAgICAgIGlmIChpZHggKyAxID09PSBsZW5ndGgpIHtcbiAgICAgICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBudWxsO1xuICAgICAgICAgIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgICAgICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgICAgc291cmNlOiBvcmlnaW5hbC5zb3VyY2UsXG4gICAgICAgICAgICBvcmlnaW5hbDoge1xuICAgICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcbiAgdGhpcy53YWxrU291cmNlQ29udGVudHMoZnVuY3Rpb24gKHNvdXJjZUZpbGUsIHNvdXJjZUNvbnRlbnQpIHtcbiAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHsgY29kZTogZ2VuZXJhdGVkLmNvZGUsIG1hcDogbWFwIH07XG59O1xuXG5leHBvcnRzLlNvdXJjZU5vZGUgPSBTb3VyY2VOb2RlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW5vZGUuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/node_modules/source-map/dist/source-map.js b/node_modules/source-map/dist/source-map.js deleted file mode 100644 index b4eb0874..00000000 --- a/node_modules/source-map/dist/source-map.js +++ /dev/null @@ -1,3233 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var sourceRelative = sourceFile; - if (sourceRoot !== null) { - sourceRelative = util.relative(sourceRoot, sourceFile); - } - - if (!generator._sources.has(sourceRelative)) { - generator._sources.add(sourceRelative); - } - - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || urlRegexp.test(aPath); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 === null) { - return 1; // aStr2 !== null - } - - if (aStr2 === null) { - return -1; // aStr1 !== null - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - /** - * Strip any JSON XSSI avoidance prefix from the string (as documented - * in the source maps specification), and then parse the string as - * JSON. - */ - function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); - } - exports.parseSourceMapInput = parseSourceMapInput; - - /** - * Compute the URL of a source given the the source root, the source's - * URL, and the source map's URL. - */ - function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ''; - - if (sourceRoot) { - // This follows what Chrome does. - if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { - sourceRoot += '/'; - } - // The spec says: - // Line 4: An optional source root, useful for relocating source - // files on a server or removing repeated values in the - // “sources” entry. This value is prepended to the individual - // entries in the “source” field. - sourceURL = sourceRoot + sourceURL; - } - - // Historically, SourceMapConsumer did not take the sourceMapURL as - // a parameter. This mode is still somewhat supported, which is why - // this code block is conditional. However, it's preferable to pass - // the source map URL to SourceMapConsumer, so that this function - // can implement the source URL resolution algorithm as outlined in - // the spec. This block is basically the equivalent of: - // new URL(sourceURL, sourceMapURL).toString() - // ... except it avoids using URL, which wasn't available in the - // older releases of node still supported by this library. - // - // The spec says: - // If the sources are not absolute URLs after prepending of the - // “sourceRoot”, the sources are resolved relative to the - // SourceMap (like resolving script src in a html document). - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - // Strip the last path component, but keep the "/". - var index = parsed.path.lastIndexOf('/'); - if (index >= 0) { - parsed.path = parsed.path.substring(0, index + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } - - return normalize(sourceURL); - } - exports.computeSourceURL = computeSourceURL; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) - : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number is 1-based. - * - column: Optional. the column number in the original source. - * The column number is 0-based. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - needle.source = this._findSourceIndex(needle.source); - if (needle.source < 0) { - return []; - } - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The first parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - if (sourceRoot) { - sourceRoot = util.normalize(sourceRoot); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this._absoluteSources = this._sources.toArray().map(function (s) { - return util.computeSourceURL(sourceRoot, s, aSourceMapURL); - }); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this._sourceMapURL = aSourceMapURL; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Utility function to find the index of a source. Returns -1 if not - * found. - */ - BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - if (this._sources.has(relativeSource)) { - return this._sources.indexOf(relativeSource); - } - - // Maybe aSource is an absolute URL as returned by |sources|. In - // this case we can't simply undo the transform. - var i; - for (i = 0; i < this._absoluteSources.length; ++i) { - if (this._absoluteSources[i] == aSource) { - return i; - } - } - - return -1; - }; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @param String aSourceMapURL - * The URL at which the source map can be found (optional) - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - smc._sourceMapURL = aSourceMapURL; - smc._absoluteSources = smc._sources.toArray().map(function (s) { - return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); - }); - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._absoluteSources.slice(); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - var index = this._findSourceIndex(aSource); - if (index >= 0) { - return this.sourcesContent[index]; - } - - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + relativeSource)) { - return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + relativeSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - source = this._findSourceIndex(source); - if (source < 0) { - return { - line: null, - column: null, - lastColumn: null - }; - } - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The first parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = null; - if (mapping.name) { - name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - } - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex] || ''; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex] || ''; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; \ No newline at end of file diff --git a/node_modules/source-map/dist/source-map.min.js b/node_modules/source-map/dist/source-map.min.js deleted file mode 100644 index c7c72dad..00000000 --- a/node_modules/source-map/dist/source-map.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(t){var o=t;null!==n&&(o=i.relative(n,t)),r._sources.has(o)||r._sources.add(o);var s=e.sourceContentFor(t);null!=s&&r.setSourceContent(t,s)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),f=0,d=h.length;f0){if(!i.compareByGeneratedPositionsInflated(n,h[f-1]))continue;e+=","}e+=o.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(t=this._sources.indexOf(n.source),e+=o.encode(t-g),g=t,e+=o.encode(n.originalLine-1-l),l=n.originalLine-1,e+=o.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(r=this._names.indexOf(n.name),e+=o.encode(r-c),c=r)),p+=e}return p},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return e<0?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(y))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return e}function l(e){return g(e)?"$"+e:e}function c(e){return g(e)?e.slice(1):e}function g(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,n,r){var t=f(e.source,n.source);return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:f(e.name,n.name)))))}function h(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=f(e.source,n.source),0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:f(e.name,n.name)))))}function f(e,n){return e===n?0:null===e?1:null===n?-1:e>n?1:-1}function d(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=f(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:f(e.name,n.name)))))}function m(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}function _(e,n,r){if(n=n||"",e&&("/"!==e[e.length-1]&&"/"!==n[0]&&(e+="/"),n=e+n),r){var a=t(r);if(!a)throw new Error("sourceMapURL could not be parsed");if(a.path){var u=a.path.lastIndexOf("/");u>=0&&(a.path=a.path.substring(0,u+1))}n=s(o(a),n)}return i(n)}n.getArg=r;var v=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,y=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||v.test(e)},n.relative=a;var C=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=C?u:l,n.fromSetString=C?u:c,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d,n.parseSourceMapInput=m,n.computeSourceURL=_},function(e,n,r){function t(){this._array=[],this._set=s?new Map:Object.create(null)}var o=r(4),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;o=0)return n}else{var r=o.toSetString(e);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&er||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e,n){var r=e;return"string"==typeof e&&(r=a.parseSourceMapInput(e)),null!=r.sections?new s(r,n):new o(r,n)}function o(e,n){var r=e;"string"==typeof e&&(r=a.parseSourceMapInput(e));var t=a.getArg(r,"version"),o=a.getArg(r,"sources"),i=a.getArg(r,"names",[]),s=a.getArg(r,"sourceRoot",null),u=a.getArg(r,"sourcesContent",null),c=a.getArg(r,"mappings"),g=a.getArg(r,"file",null);if(t!=this._version)throw new Error("Unsupported version: "+t);s&&(s=a.normalize(s)),o=o.map(String).map(a.normalize).map(function(e){return s&&a.isAbsolute(s)&&a.isAbsolute(e)?a.relative(s,e):e}),this._names=l.fromArray(i.map(String),!0),this._sources=l.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(e){return a.computeSourceURL(s,e,n)}),this.sourceRoot=s,this.sourcesContent=u,this._mappings=c,this._sourceMapURL=n,this.file=g}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e,n){var r=e;"string"==typeof e&&(r=a.parseSourceMapInput(e));var o=a.getArg(r,"version"),i=a.getArg(r,"sections");if(o!=this._version)throw new Error("Unsupported version: "+o);this._sources=new l,this._names=new l;var s={line:-1,column:0};this._sections=i.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var r=a.getArg(e,"offset"),o=a.getArg(r,"line"),i=a.getArg(r,"column");if(o=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.prototype._findSourceIndex=function(e){var n=e;if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);var r;for(r=0;r1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),A.push(r),"number"==typeof r.originalLine&&S.push(r)}g(A,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,g(S,a.compareByOriginalPositions),this.__originalMappings=S},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),i=a.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var t=e;null!=this.sourceRoot&&(t=a.relative(this.sourceRoot,t));var o;if(null!=this.sourceRoot&&(o=a.urlParse(this.sourceRoot))){var i=t.replace(/^file:\/\//,"");if("file"==o.scheme&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!o.path||"/"==o.path)&&this._sources.has("/"+t))return this.sourcesContent[this._sources.indexOf("/"+t)]}if(n)return null;throw new Error('"'+t+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(i=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;r0){for(n=[],r=0;r 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\n\t else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t };\n\t\n\t/**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\tSourceMapGenerator.prototype._serializeMappings =\n\t function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var next;\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = ''\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t next += ',';\n\t }\n\t }\n\t\n\t next += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t next += base64VLQ.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t\n\t // lines are stored 0-based in SourceMap spec version 3\n\t next += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t next += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t next += base64VLQ.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\t\n\t result += next;\n\t }\n\t\n\t return result;\n\t };\n\t\n\tSourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t/**\n\t * Externalize the source map.\n\t */\n\tSourceMapGenerator.prototype.toJSON =\n\t function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t/**\n\t * Render the source map being generated to a string.\n\t */\n\tSourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\texports.SourceMapGenerator = SourceMapGenerator;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t\n\tvar base64 = __webpack_require__(3);\n\t\n\t// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t// length quantities we use in the source map spec, the first bit is the sign,\n\t// the next four bits are the actual value, and the 6th bit is the\n\t// continuation bit. The continuation bit tells us whether there are more\n\t// digits in this value following this digit.\n\t//\n\t// Continuation\n\t// | Sign\n\t// | |\n\t// V V\n\t// 101011\n\t\n\tvar VLQ_BASE_SHIFT = 5;\n\t\n\t// binary: 100000\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t// binary: 011111\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t// binary: 100000\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t/**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t}\n\t\n\t/**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t}\n\t\n\t/**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\texports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t};\n\t\n\t/**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\texports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t/**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\texports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\t\n\t/**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\texports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t/**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\tfunction getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}\n\texports.getArg = getArg;\n\t\n\tvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\n\tvar dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\tfunction urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t}\n\texports.urlParse = urlParse;\n\t\n\tfunction urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t}\n\texports.urlGenerate = urlGenerate;\n\t\n\t/**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consecutive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\tfunction normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}\n\texports.normalize = normalize;\n\t\n\t/**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\tfunction join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t}\n\texports.join = join;\n\t\n\texports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || urlRegexp.test(aPath);\n\t};\n\t\n\t/**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\tfunction relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t}\n\texports.relative = relative;\n\t\n\tvar supportsNullProto = (function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t}());\n\t\n\tfunction identity (s) {\n\t return s;\n\t}\n\t\n\t/**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\tfunction toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\t\n\t return aStr;\n\t}\n\texports.toSetString = supportsNullProto ? identity : toSetString;\n\t\n\tfunction fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\t\n\t return aStr;\n\t}\n\texports.fromSetString = supportsNullProto ? identity : fromSetString;\n\t\n\tfunction isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\t\n\t var length = s.length;\n\t\n\t if (length < 9 /* \"__proto__\".length */) {\n\t return false;\n\t }\n\t\n\t if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n\t s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n\t s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n\t s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 9) !== 95 /* '_' */) {\n\t return false;\n\t }\n\t\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36 /* '$' */) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\tfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t/**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\tfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\tfunction strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 === null) {\n\t return 1; // aStr2 !== null\n\t }\n\t\n\t if (aStr2 === null) {\n\t return -1; // aStr1 !== null\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\tfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\t\n\t/**\n\t * Strip any JSON XSSI avoidance prefix from the string (as documented\n\t * in the source maps specification), and then parse the string as\n\t * JSON.\n\t */\n\tfunction parseSourceMapInput(str) {\n\t return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, ''));\n\t}\n\texports.parseSourceMapInput = parseSourceMapInput;\n\t\n\t/**\n\t * Compute the URL of a source given the the source root, the source's\n\t * URL, and the source map's URL.\n\t */\n\tfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n\t sourceURL = sourceURL || '';\n\t\n\t if (sourceRoot) {\n\t // This follows what Chrome does.\n\t if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {\n\t sourceRoot += '/';\n\t }\n\t // The spec says:\n\t // Line 4: An optional source root, useful for relocating source\n\t // files on a server or removing repeated values in the\n\t // “sources” entry. This value is prepended to the individual\n\t // entries in the “source” field.\n\t sourceURL = sourceRoot + sourceURL;\n\t }\n\t\n\t // Historically, SourceMapConsumer did not take the sourceMapURL as\n\t // a parameter. This mode is still somewhat supported, which is why\n\t // this code block is conditional. However, it's preferable to pass\n\t // the source map URL to SourceMapConsumer, so that this function\n\t // can implement the source URL resolution algorithm as outlined in\n\t // the spec. This block is basically the equivalent of:\n\t // new URL(sourceURL, sourceMapURL).toString()\n\t // ... except it avoids using URL, which wasn't available in the\n\t // older releases of node still supported by this library.\n\t //\n\t // The spec says:\n\t // If the sources are not absolute URLs after prepending of the\n\t // “sourceRoot”, the sources are resolved relative to the\n\t // SourceMap (like resolving script src in a html document).\n\t if (sourceMapURL) {\n\t var parsed = urlParse(sourceMapURL);\n\t if (!parsed) {\n\t throw new Error(\"sourceMapURL could not be parsed\");\n\t }\n\t if (parsed.path) {\n\t // Strip the last path component, but keep the \"/\".\n\t var index = parsed.path.lastIndexOf('/');\n\t if (index >= 0) {\n\t parsed.path = parsed.path.substring(0, index + 1);\n\t }\n\t }\n\t sourceURL = join(urlGenerate(parsed), sourceURL);\n\t }\n\t\n\t return normalize(sourceURL);\n\t}\n\texports.computeSourceURL = computeSourceURL;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\t\n\t/**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\tfunction ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\t\n\t/**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\tArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t};\n\t\n\t/**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\tArraySet.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\t\n\t/**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t if (hasNativeMap) {\n\t this._set.set(aStr, idx);\n\t } else {\n\t this._set[sStr] = idx;\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.has = function ArraySet_has(aStr) {\n\t if (hasNativeMap) {\n\t return this._set.has(aStr);\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t return has.call(this._set, sStr);\n\t }\n\t};\n\t\n\t/**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t if (has.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\t\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\t\n\t/**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\tArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\t\n\t/**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\tArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\t\n\texports.ArraySet = ArraySet;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\t\n\t/**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\t\n\t/**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\tfunction MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t}\n\t\n\t/**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\tMappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t/**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\tMappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t};\n\t\n\t/**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\tMappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t};\n\t\n\texports.MappingList = MappingList;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar binarySearch = __webpack_require__(8);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar base64VLQ = __webpack_require__(2);\n\tvar quickSort = __webpack_require__(9).quickSort;\n\t\n\tfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = util.parseSourceMapInput(aSourceMap);\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n\t : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n\t}\n\t\n\tSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n\t}\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tSourceMapConsumer.prototype._version = 3;\n\t\n\t// `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t// are lazily instantiated, accessed via the `_generatedMappings` and\n\t// `_originalMappings` getters respectively, and we only parse the mappings\n\t// and create these arrays once queried for a source location. We jump through\n\t// these hoops because there can be many thousands of mappings, and parsing\n\t// them is expensive, so we only want to do it if we must.\n\t//\n\t// Each object in the arrays is of the form:\n\t//\n\t// {\n\t// generatedLine: The line number in the generated code,\n\t// generatedColumn: The column number in the generated code,\n\t// source: The path to the original source file that generated this\n\t// chunk of code,\n\t// originalLine: The line number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// originalColumn: The column number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// name: The name of the original symbol which generated this chunk of\n\t// code.\n\t// }\n\t//\n\t// All properties except for `generatedLine` and `generatedColumn` can be\n\t// `null`.\n\t//\n\t// `_generatedMappings` is ordered by the generated positions.\n\t//\n\t// `_originalMappings` is ordered by the original positions.\n\t\n\tSourceMapConsumer.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t configurable: true,\n\t enumerable: true,\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t configurable: true,\n\t enumerable: true,\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\tSourceMapConsumer.GENERATED_ORDER = 1;\n\tSourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\tSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\tSourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t/**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source. The line number is 1-based.\n\t * - column: Optional. the column number in the original source.\n\t * The column number is 0-based.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the generated source, or null.\n\t * The column number is 0-based.\n\t */\n\tSourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t needle.source = this._findSourceIndex(needle.source);\n\t if (needle.source < 0) {\n\t return [];\n\t }\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\texports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t/**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The first parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * The second parameter, if given, is a string whose value is the URL\n\t * at which the source map was found. This URL is used to compute the\n\t * sources array.\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\tfunction BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = util.parseSourceMapInput(aSourceMap);\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t if (sourceRoot) {\n\t sourceRoot = util.normalize(sourceRoot);\n\t }\n\t\n\t sources = sources\n\t .map(String)\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this._absoluteSources = this._sources.toArray().map(function (s) {\n\t return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n\t });\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this._sourceMapURL = aSourceMapURL;\n\t this.file = file;\n\t}\n\t\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t/**\n\t * Utility function to find the index of a source. Returns -1 if not\n\t * found.\n\t */\n\tBasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {\n\t var relativeSource = aSource;\n\t if (this.sourceRoot != null) {\n\t relativeSource = util.relative(this.sourceRoot, relativeSource);\n\t }\n\t\n\t if (this._sources.has(relativeSource)) {\n\t return this._sources.indexOf(relativeSource);\n\t }\n\t\n\t // Maybe aSource is an absolute URL as returned by |sources|. In\n\t // this case we can't simply undo the transform.\n\t var i;\n\t for (i = 0; i < this._absoluteSources.length; ++i) {\n\t if (this._absoluteSources[i] == aSource) {\n\t return i;\n\t }\n\t }\n\t\n\t return -1;\n\t};\n\t\n\t/**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @param String aSourceMapURL\n\t * The URL at which the source map can be found (optional)\n\t * @returns BasicSourceMapConsumer\n\t */\n\tBasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t smc._sourceMapURL = aSourceMapURL;\n\t smc._absoluteSources = smc._sources.toArray().map(function (s) {\n\t return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);\n\t });\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tBasicSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._absoluteSources.slice();\n\t }\n\t});\n\t\n\t/**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tBasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t/**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\tBasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t/**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\tBasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source. The line number\n\t * is 1-based.\n\t * - column: The column number in the generated source. The column\n\t * number is 0-based.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the original source, or null. The\n\t * column number is 0-based.\n\t * - name: The original identifier, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tBasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t var index = this._findSourceIndex(aSource);\n\t if (index >= 0) {\n\t return this.sourcesContent[index];\n\t }\n\t\n\t var relativeSource = aSource;\n\t if (this.sourceRoot != null) {\n\t relativeSource = util.relative(this.sourceRoot, relativeSource);\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = relativeSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + relativeSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + relativeSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + relativeSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source. The line number\n\t * is 1-based.\n\t * - column: The column number in the original source. The column\n\t * number is 0-based.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the generated source, or null.\n\t * The column number is 0-based.\n\t */\n\tBasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t source = this._findSourceIndex(source);\n\t if (source < 0) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\texports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t/**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The first parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * The second parameter, if given, is a string whose value is the URL\n\t * at which the source map was found. This URL is used to compute the\n\t * sources array.\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\tfunction IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = util.parseSourceMapInput(aSourceMap);\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)\n\t }\n\t });\n\t}\n\t\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t});\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source. The line number\n\t * is 1-based.\n\t * - column: The column number in the generated source. The column\n\t * number is 0-based.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the original source, or null. The\n\t * column number is 0-based.\n\t * - name: The original identifier, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tIndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source. The line number\n\t * is 1-based.\n\t * - column: The column number in the original source. The column\n\t * number is 0-based.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null. The\n\t * line number is 1-based. \n\t * - column: The column number in the generated source, or null.\n\t * The column number is 0-based.\n\t */\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tIndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = null;\n\t if (mapping.name) {\n\t name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t }\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\texports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\texports.GREATEST_LOWER_BOUND = 1;\n\texports.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\tfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\texports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t// It turns out that some (most?) JavaScript engines don't self-host\n\t// `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t// faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t// custom comparator function, calling back and forth between the VM's C++ and\n\t// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t// worse generated code for the comparator function than would be optimal. In\n\t// fact, when sorting with a comparator, these costs outweigh the benefits of\n\t// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t// a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t/**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\t\n\t/**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t}\n\t\n\t/**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\t\n\t/**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\texports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\tvar util = __webpack_require__(4);\n\t\n\t// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t// operating systems these days (capturing the result).\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t// Newline character code for charCodeAt() comparisons\n\tvar NEWLINE_CODE = 10;\n\t\n\t// Private symbol for identifying `SourceNode`s when multiple versions of\n\t// the source-map library are loaded. This MUST NOT CHANGE across\n\t// versions!\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t/**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\tfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\t\n\t/**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\tSourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are accessed by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\t var shiftNextLine = function() {\n\t var lineContents = getNextLine();\n\t // The last line of a file might not have a newline.\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\t\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ?\n\t remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[remainingLinesIndex] || '';\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[remainingLinesIndex] || '';\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\tSourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\tSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\tSourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t/**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t/**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\tSourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\t\n\t/**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\tSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t};\n\t\n\texports.SourceNode = SourceNode;\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// source-map.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0fd5815da764db5fb9fe","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./source-map.js\n// module id = 0\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var sourceRelative = sourceFile;\n if (sourceRoot !== null) {\n sourceRelative = util.relative(sourceRoot, sourceFile);\n }\n\n if (!generator._sources.has(sourceRelative)) {\n generator._sources.add(sourceRelative);\n }\n\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-generator.js\n// module id = 1\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64-vlq.js\n// module id = 2\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64.js\n// module id = 3\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || urlRegexp.test(aPath);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 === null) {\n return 1; // aStr2 !== null\n }\n\n if (aStr2 === null) {\n return -1; // aStr1 !== null\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented\n * in the source maps specification), and then parse the string as\n * JSON.\n */\nfunction parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, ''));\n}\nexports.parseSourceMapInput = parseSourceMapInput;\n\n/**\n * Compute the URL of a source given the the source root, the source's\n * URL, and the source map's URL.\n */\nfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n sourceURL = sourceURL || '';\n\n if (sourceRoot) {\n // This follows what Chrome does.\n if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {\n sourceRoot += '/';\n }\n // The spec says:\n // Line 4: An optional source root, useful for relocating source\n // files on a server or removing repeated values in the\n // “sources” entry. This value is prepended to the individual\n // entries in the “source” field.\n sourceURL = sourceRoot + sourceURL;\n }\n\n // Historically, SourceMapConsumer did not take the sourceMapURL as\n // a parameter. This mode is still somewhat supported, which is why\n // this code block is conditional. However, it's preferable to pass\n // the source map URL to SourceMapConsumer, so that this function\n // can implement the source URL resolution algorithm as outlined in\n // the spec. This block is basically the equivalent of:\n // new URL(sourceURL, sourceMapURL).toString()\n // ... except it avoids using URL, which wasn't available in the\n // older releases of node still supported by this library.\n //\n // The spec says:\n // If the sources are not absolute URLs after prepending of the\n // “sourceRoot”, the sources are resolved relative to the\n // SourceMap (like resolving script src in a html document).\n if (sourceMapURL) {\n var parsed = urlParse(sourceMapURL);\n if (!parsed) {\n throw new Error(\"sourceMapURL could not be parsed\");\n }\n if (parsed.path) {\n // Strip the last path component, but keep the \"/\".\n var index = parsed.path.lastIndexOf('/');\n if (index >= 0) {\n parsed.path = parsed.path.substring(0, index + 1);\n }\n }\n sourceURL = join(urlGenerate(parsed), sourceURL);\n }\n\n return normalize(sourceURL);\n}\nexports.computeSourceURL = computeSourceURL;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/util.js\n// module id = 4\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/array-set.js\n// module id = 5\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/mapping-list.js\n// module id = 6\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number is 1-based.\n * - column: Optional. the column number in the original source.\n * The column number is 0-based.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n needle.source = this._findSourceIndex(needle.source);\n if (needle.source < 0) {\n return [];\n }\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The first parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n if (sourceRoot) {\n sourceRoot = util.normalize(sourceRoot);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this._absoluteSources = this._sources.toArray().map(function (s) {\n return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n });\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this._sourceMapURL = aSourceMapURL;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Utility function to find the index of a source. Returns -1 if not\n * found.\n */\nBasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n if (this._sources.has(relativeSource)) {\n return this._sources.indexOf(relativeSource);\n }\n\n // Maybe aSource is an absolute URL as returned by |sources|. In\n // this case we can't simply undo the transform.\n var i;\n for (i = 0; i < this._absoluteSources.length; ++i) {\n if (this._absoluteSources[i] == aSource) {\n return i;\n }\n }\n\n return -1;\n};\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @param String aSourceMapURL\n * The URL at which the source map can be found (optional)\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n smc._sourceMapURL = aSourceMapURL;\n smc._absoluteSources = smc._sources.toArray().map(function (s) {\n return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);\n });\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._absoluteSources.slice();\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n var index = this._findSourceIndex(aSource);\n if (index >= 0) {\n return this.sourcesContent[index];\n }\n\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = relativeSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + relativeSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + relativeSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + relativeSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n source = this._findSourceIndex(source);\n if (source < 0) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The first parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based. \n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = null;\n if (mapping.name) {\n name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n }\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-consumer.js\n// module id = 7\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/binary-search.js\n// module id = 8\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/quick-sort.js\n// module id = 9\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex] || '';\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex] || '';\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-node.js\n// module id = 10\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/source-map/lib/array-set.js b/node_modules/source-map/lib/array-set.js deleted file mode 100644 index fbd5c81c..00000000 --- a/node_modules/source-map/lib/array-set.js +++ /dev/null @@ -1,121 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var has = Object.prototype.hasOwnProperty; -var hasNativeMap = typeof Map !== "undefined"; - -/** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ -function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); -} - -/** - * Static method for creating ArraySet instances from an existing array. - */ -ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; -}; - -/** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ -ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; -}; - -/** - * Add the given string to this set. - * - * @param String aStr - */ -ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } -}; - -/** - * Is the given string a member of this set? - * - * @param String aStr - */ -ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } -}; - -/** - * What is the index of the given string in the array? - * - * @param String aStr - */ -ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); -}; - -/** - * What is the element at the given index? - * - * @param Number aIdx - */ -ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); -}; - -/** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ -ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); -}; - -exports.ArraySet = ArraySet; diff --git a/node_modules/source-map/lib/base64-vlq.js b/node_modules/source-map/lib/base64-vlq.js deleted file mode 100644 index 612b4040..00000000 --- a/node_modules/source-map/lib/base64-vlq.js +++ /dev/null @@ -1,140 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -var base64 = require('./base64'); - -// A single base 64 digit can contain 6 bits of data. For the base 64 variable -// length quantities we use in the source map spec, the first bit is the sign, -// the next four bits are the actual value, and the 6th bit is the -// continuation bit. The continuation bit tells us whether there are more -// digits in this value following this digit. -// -// Continuation -// | Sign -// | | -// V V -// 101011 - -var VLQ_BASE_SHIFT = 5; - -// binary: 100000 -var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - -// binary: 011111 -var VLQ_BASE_MASK = VLQ_BASE - 1; - -// binary: 100000 -var VLQ_CONTINUATION_BIT = VLQ_BASE; - -/** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ -function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; -} - -/** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ -function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; -} - -/** - * Returns the base 64 VLQ encoded value. - */ -exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; -}; - -/** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ -exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; -}; diff --git a/node_modules/source-map/lib/base64.js b/node_modules/source-map/lib/base64.js deleted file mode 100644 index 8aa86b30..00000000 --- a/node_modules/source-map/lib/base64.js +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - -/** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ -exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); -}; - -/** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ -exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; -}; diff --git a/node_modules/source-map/lib/binary-search.js b/node_modules/source-map/lib/binary-search.js deleted file mode 100644 index 010ac941..00000000 --- a/node_modules/source-map/lib/binary-search.js +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -exports.GREATEST_LOWER_BOUND = 1; -exports.LEAST_UPPER_BOUND = 2; - -/** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ -function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } -} - -/** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ -exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; -}; diff --git a/node_modules/source-map/lib/mapping-list.js b/node_modules/source-map/lib/mapping-list.js deleted file mode 100644 index 06d1274a..00000000 --- a/node_modules/source-map/lib/mapping-list.js +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); - -/** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ -function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; -} - -/** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ -function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; -} - -/** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ -MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - -/** - * Add the given source mapping. - * - * @param Object aMapping - */ -MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } -}; - -/** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ -MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; -}; - -exports.MappingList = MappingList; diff --git a/node_modules/source-map/lib/quick-sort.js b/node_modules/source-map/lib/quick-sort.js deleted file mode 100644 index 6a7caadb..00000000 --- a/node_modules/source-map/lib/quick-sort.js +++ /dev/null @@ -1,114 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -// It turns out that some (most?) JavaScript engines don't self-host -// `Array.prototype.sort`. This makes sense because C++ will likely remain -// faster than JS when doing raw CPU-intensive sorting. However, when using a -// custom comparator function, calling back and forth between the VM's C++ and -// JIT'd JS is rather slow *and* loses JIT type information, resulting in -// worse generated code for the comparator function than would be optimal. In -// fact, when sorting with a comparator, these costs outweigh the benefits of -// sorting in C++. By using our own JS-implemented Quick Sort (below), we get -// a ~3500ms mean speed-up in `bench/bench.html`. - -/** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ -function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; -} - -/** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ -function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); -} - -/** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ -function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } -} - -/** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ -exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); -}; diff --git a/node_modules/source-map/lib/source-map-consumer.js b/node_modules/source-map/lib/source-map-consumer.js deleted file mode 100644 index 7b99d1da..00000000 --- a/node_modules/source-map/lib/source-map-consumer.js +++ /dev/null @@ -1,1145 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var binarySearch = require('./binary-search'); -var ArraySet = require('./array-set').ArraySet; -var base64VLQ = require('./base64-vlq'); -var quickSort = require('./quick-sort').quickSort; - -function SourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) - : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); -} - -SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); -} - -/** - * The version of the source mapping spec that we are consuming. - */ -SourceMapConsumer.prototype._version = 3; - -// `__generatedMappings` and `__originalMappings` are arrays that hold the -// parsed mapping coordinates from the source map's "mappings" attribute. They -// are lazily instantiated, accessed via the `_generatedMappings` and -// `_originalMappings` getters respectively, and we only parse the mappings -// and create these arrays once queried for a source location. We jump through -// these hoops because there can be many thousands of mappings, and parsing -// them is expensive, so we only want to do it if we must. -// -// Each object in the arrays is of the form: -// -// { -// generatedLine: The line number in the generated code, -// generatedColumn: The column number in the generated code, -// source: The path to the original source file that generated this -// chunk of code, -// originalLine: The line number in the original source that -// corresponds to this chunk of generated code, -// originalColumn: The column number in the original source that -// corresponds to this chunk of generated code, -// name: The name of the original symbol which generated this chunk of -// code. -// } -// -// All properties except for `generatedLine` and `generatedColumn` can be -// `null`. -// -// `_generatedMappings` is ordered by the generated positions. -// -// `_originalMappings` is ordered by the original positions. - -SourceMapConsumer.prototype.__generatedMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } -}); - -SourceMapConsumer.prototype.__originalMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } -}); - -SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - -SourceMapConsumer.GENERATED_ORDER = 1; -SourceMapConsumer.ORIGINAL_ORDER = 2; - -SourceMapConsumer.GREATEST_LOWER_BOUND = 1; -SourceMapConsumer.LEAST_UPPER_BOUND = 2; - -/** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ -SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - -/** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number is 1-based. - * - column: Optional. the column number in the original source. - * The column number is 0-based. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ -SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - needle.source = this._findSourceIndex(needle.source); - if (needle.source < 0) { - return []; - } - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - -exports.SourceMapConsumer = SourceMapConsumer; - -/** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The first parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ -function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - if (sourceRoot) { - sourceRoot = util.normalize(sourceRoot); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this._absoluteSources = this._sources.toArray().map(function (s) { - return util.computeSourceURL(sourceRoot, s, aSourceMapURL); - }); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this._sourceMapURL = aSourceMapURL; - this.file = file; -} - -BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - -/** - * Utility function to find the index of a source. Returns -1 if not - * found. - */ -BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - if (this._sources.has(relativeSource)) { - return this._sources.indexOf(relativeSource); - } - - // Maybe aSource is an absolute URL as returned by |sources|. In - // this case we can't simply undo the transform. - var i; - for (i = 0; i < this._absoluteSources.length; ++i) { - if (this._absoluteSources[i] == aSource) { - return i; - } - } - - return -1; -}; - -/** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @param String aSourceMapURL - * The URL at which the source map can be found (optional) - * @returns BasicSourceMapConsumer - */ -BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - smc._sourceMapURL = aSourceMapURL; - smc._absoluteSources = smc._sources.toArray().map(function (s) { - return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); - }); - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - -/** - * The version of the source mapping spec that we are consuming. - */ -BasicSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._absoluteSources.slice(); - } -}); - -/** - * Provide the JIT with a nice shape / hidden class. - */ -function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; -} - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - -/** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ -BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - -/** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ -BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ -BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - var index = this._findSourceIndex(aSource); - if (index >= 0) { - return this.sourcesContent[index]; - } - - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + relativeSource)) { - return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + relativeSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ -BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - source = this._findSourceIndex(source); - if (source < 0) { - return { - line: null, - column: null, - lastColumn: null - }; - } - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - -exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - -/** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The first parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ -function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) - } - }); -} - -IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - -/** - * The version of the source mapping spec that we are consuming. - */ -IndexedSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } -}); - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ -IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ -IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = null; - if (mapping.name) { - name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - } - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - -exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/node_modules/source-map/lib/source-map-generator.js b/node_modules/source-map/lib/source-map-generator.js deleted file mode 100644 index 508bcfbb..00000000 --- a/node_modules/source-map/lib/source-map-generator.js +++ /dev/null @@ -1,425 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var base64VLQ = require('./base64-vlq'); -var util = require('./util'); -var ArraySet = require('./array-set').ArraySet; -var MappingList = require('./mapping-list').MappingList; - -/** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ -function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; -} - -SourceMapGenerator.prototype._version = 3; - -/** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ -SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var sourceRelative = sourceFile; - if (sourceRoot !== null) { - sourceRelative = util.relative(sourceRoot, sourceFile); - } - - if (!generator._sources.has(sourceRelative)) { - generator._sources.add(sourceRelative); - } - - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - -/** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ -SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - -/** - * Set the source content for a source file. - */ -SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - -/** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ -SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - -/** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ -SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - -/** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ -SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - -SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - -/** - * Externalize the source map. - */ -SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - -/** - * Render the source map being generated to a string. - */ -SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - -exports.SourceMapGenerator = SourceMapGenerator; diff --git a/node_modules/source-map/lib/source-node.js b/node_modules/source-map/lib/source-node.js deleted file mode 100644 index 8bcdbe38..00000000 --- a/node_modules/source-map/lib/source-node.js +++ /dev/null @@ -1,413 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; -var util = require('./util'); - -// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other -// operating systems these days (capturing the result). -var REGEX_NEWLINE = /(\r?\n)/; - -// Newline character code for charCodeAt() comparisons -var NEWLINE_CODE = 10; - -// Private symbol for identifying `SourceNode`s when multiple versions of -// the source-map library are loaded. This MUST NOT CHANGE across -// versions! -var isSourceNode = "$$$isSourceNode$$$"; - -/** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ -function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); -} - -/** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ -SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex] || ''; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex] || ''; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - -/** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } -}; - -/** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ -SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; -}; - -/** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ -SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; -}; - -/** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ -SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - -/** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - -/** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ -SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; -}; - -/** - * Returns the string representation of this source node along with a source - * map. - */ -SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; -}; - -exports.SourceNode = SourceNode; diff --git a/node_modules/source-map/lib/util.js b/node_modules/source-map/lib/util.js deleted file mode 100644 index 3ca92e56..00000000 --- a/node_modules/source-map/lib/util.js +++ /dev/null @@ -1,488 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ -function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } -} -exports.getArg = getArg; - -var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; -var dataUrlRegexp = /^data:.+\,.+$/; - -function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; -} -exports.urlParse = urlParse; - -function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; -} -exports.urlGenerate = urlGenerate; - -/** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ -function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; -} -exports.normalize = normalize; - -/** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ -function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; -} -exports.join = join; - -exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || urlRegexp.test(aPath); -}; - -/** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ -function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); -} -exports.relative = relative; - -var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); -}()); - -function identity (s) { - return s; -} - -/** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ -function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; -} -exports.toSetString = supportsNullProto ? identity : toSetString; - -function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; -} -exports.fromSetString = supportsNullProto ? identity : fromSetString; - -function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; -} - -/** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ -function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByOriginalPositions = compareByOriginalPositions; - -/** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ -function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - -function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 === null) { - return 1; // aStr2 !== null - } - - if (aStr2 === null) { - return -1; // aStr1 !== null - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; -} - -/** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ -function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - -/** - * Strip any JSON XSSI avoidance prefix from the string (as documented - * in the source maps specification), and then parse the string as - * JSON. - */ -function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); -} -exports.parseSourceMapInput = parseSourceMapInput; - -/** - * Compute the URL of a source given the the source root, the source's - * URL, and the source map's URL. - */ -function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ''; - - if (sourceRoot) { - // This follows what Chrome does. - if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { - sourceRoot += '/'; - } - // The spec says: - // Line 4: An optional source root, useful for relocating source - // files on a server or removing repeated values in the - // “sources” entry. This value is prepended to the individual - // entries in the “source” field. - sourceURL = sourceRoot + sourceURL; - } - - // Historically, SourceMapConsumer did not take the sourceMapURL as - // a parameter. This mode is still somewhat supported, which is why - // this code block is conditional. However, it's preferable to pass - // the source map URL to SourceMapConsumer, so that this function - // can implement the source URL resolution algorithm as outlined in - // the spec. This block is basically the equivalent of: - // new URL(sourceURL, sourceMapURL).toString() - // ... except it avoids using URL, which wasn't available in the - // older releases of node still supported by this library. - // - // The spec says: - // If the sources are not absolute URLs after prepending of the - // “sourceRoot”, the sources are resolved relative to the - // SourceMap (like resolving script src in a html document). - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - // Strip the last path component, but keep the "/". - var index = parsed.path.lastIndexOf('/'); - if (index >= 0) { - parsed.path = parsed.path.substring(0, index + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } - - return normalize(sourceURL); -} -exports.computeSourceURL = computeSourceURL; diff --git a/node_modules/source-map/package.json b/node_modules/source-map/package.json deleted file mode 100644 index f546f294..00000000 --- a/node_modules/source-map/package.json +++ /dev/null @@ -1,212 +0,0 @@ -{ - "_from": "source-map@^0.6.1", - "_id": "source-map@0.6.1", - "_inBundle": false, - "_integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "_location": "/source-map", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "source-map@^0.6.1", - "name": "source-map", - "escapedName": "source-map", - "rawSpec": "^0.6.1", - "saveSpec": null, - "fetchSpec": "^0.6.1" - }, - "_requiredBy": [ - "/handlebars" - ], - "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "_shasum": "74722af32e9614e9c287a8d0bbde48b5e2f1a263", - "_spec": "source-map@^0.6.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/handlebars", - "author": { - "name": "Nick Fitzgerald", - "email": "nfitzgerald@mozilla.com" - }, - "bugs": { - "url": "https://github.com/mozilla/source-map/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tobias Koppers", - "email": "tobias.koppers@googlemail.com" - }, - { - "name": "Duncan Beevers", - "email": "duncan@dweebd.com" - }, - { - "name": "Stephen Crane", - "email": "scrane@mozilla.com" - }, - { - "name": "Ryan Seddon", - "email": "seddon.ryan@gmail.com" - }, - { - "name": "Miles Elam", - "email": "miles.elam@deem.com" - }, - { - "name": "Mihai Bazon", - "email": "mihai.bazon@gmail.com" - }, - { - "name": "Michael Ficarra", - "email": "github.public.email@michael.ficarra.me" - }, - { - "name": "Todd Wolfson", - "email": "todd@twolfson.com" - }, - { - "name": "Alexander Solovyov", - "email": "alexander@solovyov.net" - }, - { - "name": "Felix Gnass", - "email": "fgnass@gmail.com" - }, - { - "name": "Conrad Irwin", - "email": "conrad.irwin@gmail.com" - }, - { - "name": "usrbincc", - "email": "usrbincc@yahoo.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Chase Douglas", - "email": "chase@newrelic.com" - }, - { - "name": "Evan Wallace", - "email": "evan.exe@gmail.com" - }, - { - "name": "Heather Arthur", - "email": "fayearthur@gmail.com" - }, - { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Simon Lydell", - "email": "simon.lydell@gmail.com" - }, - { - "name": "Jmeas Smith", - "email": "jellyes2@gmail.com" - }, - { - "name": "Michael Z Goddard", - "email": "mzgoddard@gmail.com" - }, - { - "name": "azu", - "email": "azu@users.noreply.github.com" - }, - { - "name": "John Gozde", - "email": "john@gozde.ca" - }, - { - "name": "Adam Kirkton", - "email": "akirkton@truefitinnovation.com" - }, - { - "name": "Chris Montgomery", - "email": "christopher.montgomery@dowjones.com" - }, - { - "name": "J. Ryan Stinnett", - "email": "jryans@gmail.com" - }, - { - "name": "Jack Herrington", - "email": "jherrington@walmartlabs.com" - }, - { - "name": "Chris Truter", - "email": "jeffpalentine@gmail.com" - }, - { - "name": "Daniel Espeset", - "email": "daniel@danielespeset.com" - }, - { - "name": "Jamie Wong", - "email": "jamie.lf.wong@gmail.com" - }, - { - "name": "Eddy Bruël", - "email": "ejpbruel@mozilla.com" - }, - { - "name": "Hawken Rives", - "email": "hawkrives@gmail.com" - }, - { - "name": "Gilad Peleg", - "email": "giladp007@gmail.com" - }, - { - "name": "djchie", - "email": "djchie.dev@gmail.com" - }, - { - "name": "Gary Ye", - "email": "garysye@gmail.com" - }, - { - "name": "Nicolas Lalevée", - "email": "nicolas.lalevee@hibnet.org" - } - ], - "deprecated": false, - "description": "Generates and consumes source maps", - "devDependencies": { - "doctoc": "^0.15.0", - "webpack": "^1.12.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "source-map.js", - "source-map.d.ts", - "lib/", - "dist/source-map.debug.js", - "dist/source-map.js", - "dist/source-map.min.js", - "dist/source-map.min.js.map" - ], - "homepage": "https://github.com/mozilla/source-map", - "license": "BSD-3-Clause", - "main": "./source-map.js", - "name": "source-map", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/mozilla/source-map.git" - }, - "scripts": { - "build": "webpack --color", - "test": "npm run build && node test/run-tests.js", - "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" - }, - "typings": "source-map", - "version": "0.6.1" -} diff --git a/node_modules/source-map/source-map.d.ts b/node_modules/source-map/source-map.d.ts deleted file mode 100644 index 8f972b0c..00000000 --- a/node_modules/source-map/source-map.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -export interface StartOfSourceMap { - file?: string; - sourceRoot?: string; -} - -export interface RawSourceMap extends StartOfSourceMap { - version: string; - sources: string[]; - names: string[]; - sourcesContent?: string[]; - mappings: string; -} - -export interface Position { - line: number; - column: number; -} - -export interface LineRange extends Position { - lastColumn: number; -} - -export interface FindPosition extends Position { - // SourceMapConsumer.GREATEST_LOWER_BOUND or SourceMapConsumer.LEAST_UPPER_BOUND - bias?: number; -} - -export interface SourceFindPosition extends FindPosition { - source: string; -} - -export interface MappedPosition extends Position { - source: string; - name?: string; -} - -export interface MappingItem { - source: string; - generatedLine: number; - generatedColumn: number; - originalLine: number; - originalColumn: number; - name: string; -} - -export class SourceMapConsumer { - static GENERATED_ORDER: number; - static ORIGINAL_ORDER: number; - - static GREATEST_LOWER_BOUND: number; - static LEAST_UPPER_BOUND: number; - - constructor(rawSourceMap: RawSourceMap); - computeColumnSpans(): void; - originalPositionFor(generatedPosition: FindPosition): MappedPosition; - generatedPositionFor(originalPosition: SourceFindPosition): LineRange; - allGeneratedPositionsFor(originalPosition: MappedPosition): Position[]; - hasContentsOfAllSources(): boolean; - sourceContentFor(source: string, returnNullOnMissing?: boolean): string; - eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void; -} - -export interface Mapping { - generated: Position; - original: Position; - source: string; - name?: string; -} - -export class SourceMapGenerator { - constructor(startOfSourceMap?: StartOfSourceMap); - static fromSourceMap(sourceMapConsumer: SourceMapConsumer): SourceMapGenerator; - addMapping(mapping: Mapping): void; - setSourceContent(sourceFile: string, sourceContent: string): void; - applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void; - toString(): string; -} - -export interface CodeWithSourceMap { - code: string; - map: SourceMapGenerator; -} - -export class SourceNode { - constructor(); - constructor(line: number, column: number, source: string); - constructor(line: number, column: number, source: string, chunk?: string, name?: string); - static fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode; - add(chunk: string): void; - prepend(chunk: string): void; - setSourceContent(sourceFile: string, sourceContent: string): void; - walk(fn: (chunk: string, mapping: MappedPosition) => void): void; - walkSourceContents(fn: (file: string, content: string) => void): void; - join(sep: string): SourceNode; - replaceRight(pattern: string, replacement: string): SourceNode; - toString(): string; - toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap; -} diff --git a/node_modules/source-map/source-map.js b/node_modules/source-map/source-map.js deleted file mode 100644 index bc88fe82..00000000 --- a/node_modules/source-map/source-map.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ -exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; -exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; -exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/node_modules/split2/LICENSE b/node_modules/split2/LICENSE deleted file mode 100644 index a91afe5b..00000000 --- a/node_modules/split2/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2014-2018, Matteo Collina - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/split2/README.md b/node_modules/split2/README.md deleted file mode 100644 index 00db2624..00000000 --- a/node_modules/split2/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# Split2(matcher, mapper, options) - -![ci](https://github.com/mcollina/split2/workflows/ci/badge.svg) - -Break up a stream and reassemble it so that each line is a chunk. -`split2` is inspired by [@dominictarr](https://github.com/dominictarr) [`split`](https://github.com/dominictarr/split) module, -and it is totally API compatible with it. -However, it is based on Node.js core [`Transform`](https://nodejs.org/api/stream.html#stream_new_stream_transform_options) via [`readable-stream`](https://github.com/nodejs/readable-stream) - -`matcher` may be a `String`, or a `RegExp`. Example, read every line in a file ... - -``` js - fs.createReadStream(file) - .pipe(split2()) - .on('data', function (line) { - //each chunk now is a separate line! - }) - -``` - -`split` takes the same arguments as `string.split` except it defaults to '/\r?\n/', and the optional `limit` paremeter is ignored. -[String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split) - -`split` takes an optional options object on it's third argument, which -is directly passed as a -[Transform](https://nodejs.org/api/stream.html#stream_new_stream_transform_options) -option. - -Additionally, the `.maxLength` and `.skipOverflow` options are implemented, which set limits on the internal -buffer size and the stream's behavior when the limit is exceeded. There is no limit unless `maxLength` is set. When -the internal buffer size exceeds `maxLength`, the stream emits an error by default. You may also set `skipOverflow` to -true to suppress the error and instead skip past any lines that cause the internal buffer to exceed `maxLength`. - -Calling `.destroy` will make the stream emit `close`. Use this to perform cleanup logic - -``` js -var splitFile = function(filename) { - var file = fs.createReadStream(filename) - - return file - .pipe(split2()) - .on('close', function() { - // destroy the file stream in case the split stream was destroyed - file.destroy() - }) -} - -var stream = splitFile('my-file.txt') - -stream.destroy() // will destroy the input file stream -``` - -# NDJ - Newline Delimited Json - -`split2` accepts a function which transforms each line. - -``` js -fs.createReadStream(file) - .pipe(split2(JSON.parse)) - .on('data', function (obj) { - //each chunk now is a js object - }) - .on("error", function(error) => { - //handling parsing errors - }) -``` - -However, in [@dominictarr](https://github.com/dominictarr) [`split`](https://github.com/dominictarr/split) the mapper -is wrapped in a try-catch, while here it is not: if your parsing logic can throw, wrap it yourself. Otherwise, you can also use the stream error handling when mapper function throw. - -# Benchmark - -```bash -$ node bench.js -benchSplit*10000: 1484.983ms -benchBinarySplit*10000: 1484.080ms -benchSplit*10000: 1407.334ms -benchBinarySplit*10000: 1500.281ms -``` - -Benchmark taken on Node 8.11.3, on a Macbook i5 2018. - -# License - -Copyright (c) 2014-2018, Matteo Collina - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/split2/bench.js b/node_modules/split2/bench.js deleted file mode 100644 index 7a3f9d51..00000000 --- a/node_modules/split2/bench.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict' - -var split = require('./') -var bench = require('fastbench') -var binarySplit = require('binary-split') -var fs = require('fs') - -function benchSplit (cb) { - fs.createReadStream('package.json') - .pipe(split()) - .on('end', cb) - .resume() -} - -function benchBinarySplit (cb) { - fs.createReadStream('package.json') - .pipe(binarySplit()) - .on('end', cb) - .resume() -} - -var run = bench([ - benchSplit, - benchBinarySplit -], 10000) - -run(run) diff --git a/node_modules/split2/index.js b/node_modules/split2/index.js deleted file mode 100644 index fc2007be..00000000 --- a/node_modules/split2/index.js +++ /dev/null @@ -1,132 +0,0 @@ -/* -Copyright (c) 2014-2018, Matteo Collina - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -'use strict' - -const { Transform } = require('readable-stream') -const { StringDecoder } = require('string_decoder') -const kLast = Symbol('last') -const kDecoder = Symbol('decoder') - -function transform (chunk, enc, cb) { - var list - if (this.overflow) { // Line buffer is full. Skip to start of next line. - var buf = this[kDecoder].write(chunk) - list = buf.split(this.matcher) - - if (list.length === 1) return cb() // Line ending not found. Discard entire chunk. - - // Line ending found. Discard trailing fragment of previous line and reset overflow state. - list.shift() - this.overflow = false - } else { - this[kLast] += this[kDecoder].write(chunk) - list = this[kLast].split(this.matcher) - } - - this[kLast] = list.pop() - - for (var i = 0; i < list.length; i++) { - try { - push(this, this.mapper(list[i])) - } catch (error) { - return cb(error) - } - } - - this.overflow = this[kLast].length > this.maxLength - if (this.overflow && !this.skipOverflow) return cb(new Error('maximum buffer reached')) - - cb() -} - -function flush (cb) { - // forward any gibberish left in there - this[kLast] += this[kDecoder].end() - - if (this[kLast]) { - try { - push(this, this.mapper(this[kLast])) - } catch (error) { - return cb(error) - } - } - - cb() -} - -function push (self, val) { - if (val !== undefined) { - self.push(val) - } -} - -function noop (incoming) { - return incoming -} - -function split (matcher, mapper, options) { - // Set defaults for any arguments not supplied. - matcher = matcher || /\r?\n/ - mapper = mapper || noop - options = options || {} - - // Test arguments explicitly. - switch (arguments.length) { - case 1: - // If mapper is only argument. - if (typeof matcher === 'function') { - mapper = matcher - matcher = /\r?\n/ - // If options is only argument. - } else if (typeof matcher === 'object' && !(matcher instanceof RegExp)) { - options = matcher - matcher = /\r?\n/ - } - break - - case 2: - // If mapper and options are arguments. - if (typeof matcher === 'function') { - options = mapper - mapper = matcher - matcher = /\r?\n/ - // If matcher and options are arguments. - } else if (typeof mapper === 'object') { - options = mapper - mapper = noop - } - } - - options = Object.assign({}, options) - options.transform = transform - options.flush = flush - options.readableObjectMode = true - - const stream = new Transform(options) - - stream[kLast] = '' - stream[kDecoder] = new StringDecoder('utf8') - stream.matcher = matcher - stream.mapper = mapper - stream.maxLength = options.maxLength - stream.skipOverflow = options.skipOverflow - stream.overflow = false - - return stream -} - -module.exports = split diff --git a/node_modules/split2/package.json b/node_modules/split2/package.json deleted file mode 100644 index e7d9bb7d..00000000 --- a/node_modules/split2/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "split2@^3.1.1", - "_id": "split2@3.2.2", - "_inBundle": false, - "_integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", - "_location": "/split2", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "split2@^3.1.1", - "name": "split2", - "escapedName": "split2", - "rawSpec": "^3.1.1", - "saveSpec": null, - "fetchSpec": "^3.1.1" - }, - "_requiredBy": [ - "/pino-pretty" - ], - "_resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", - "_shasum": "bf2cf2a37d838312c249c89206fd7a17dd12365f", - "_spec": "split2@^3.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pino-pretty", - "author": { - "name": "Matteo Collina", - "email": "hello@matteocollina.com" - }, - "bugs": { - "url": "http://github.com/mcollina/split2/issues" - }, - "bundleDependencies": false, - "dependencies": { - "readable-stream": "^3.0.0" - }, - "deprecated": false, - "description": "split a Text Stream into a Line Stream, using Stream 3", - "devDependencies": { - "binary-split": "^1.0.3", - "callback-stream": "^1.1.0", - "fastbench": "^1.0.0", - "nyc": "^15.0.1", - "pre-commit": "^1.1.2", - "safe-buffer": "^5.1.1", - "standard": "^14.0.0", - "tape": "^5.0.0" - }, - "homepage": "https://github.com/mcollina/split2#readme", - "license": "ISC", - "main": "index.js", - "name": "split2", - "pre-commit": [ - "test" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/mcollina/split2.git" - }, - "scripts": { - "coverage": "nyc --reporter=html --reporter=cobertura --reporter=text tape test/test.js", - "legacy": "tape test.js", - "lint": "standard --verbose", - "test": "npm run lint && npm run unit", - "test:report": "npm run lint && npm run unit:report", - "unit": "nyc --lines 100 --branches 100 --functions 100 --check-coverage --reporter=text tape test.js" - }, - "version": "3.2.2", - "website": "https://github.com/mcollina/split2" -} diff --git a/node_modules/split2/test.js b/node_modules/split2/test.js deleted file mode 100644 index e0357872..00000000 --- a/node_modules/split2/test.js +++ /dev/null @@ -1,392 +0,0 @@ -'use strict' - -var test = require('tape') -var split = require('./') -var callback = require('callback-stream') -var Buffer = require('safe-buffer').Buffer -var strcb = callback.bind(null, { decodeStrings: false }) -var objcb = callback.bind(null, { objectMode: true }) - -test('split two lines on end', function (t) { - t.plan(2) - - var input = split() - - input.pipe(strcb(function (err, list) { - t.error(err) - t.deepEqual(list, ['hello', 'world']) - })) - - input.end('hello\nworld') -}) - -test('split two lines on two writes', function (t) { - t.plan(2) - - var input = split() - - input.pipe(strcb(function (err, list) { - t.error(err) - t.deepEqual(list, ['hello', 'world']) - })) - - input.write('hello') - input.write('\nworld') - input.end() -}) - -test('split four lines on three writes', function (t) { - t.plan(2) - - var input = split() - - input.pipe(strcb(function (err, list) { - t.error(err) - t.deepEqual(list, ['hello', 'world', 'bye', 'world']) - })) - - input.write('hello\nwor') - input.write('ld\nbye\nwo') - input.write('rld') - input.end() -}) - -test('accumulate multiple writes', function (t) { - t.plan(2) - - var input = split() - - input.pipe(strcb(function (err, list) { - t.error(err) - t.deepEqual(list, ['helloworld']) - })) - - input.write('hello') - input.write('world') - input.end() -}) - -test('split using a custom string matcher', function (t) { - t.plan(2) - - var input = split('~') - - input.pipe(strcb(function (err, list) { - t.error(err) - t.deepEqual(list, ['hello', 'world']) - })) - - input.end('hello~world') -}) - -test('split using a custom regexp matcher', function (t) { - t.plan(2) - - var input = split(/~/) - - input.pipe(strcb(function (err, list) { - t.error(err) - t.deepEqual(list, ['hello', 'world']) - })) - - input.end('hello~world') -}) - -test('support an option argument', function (t) { - t.plan(2) - - var input = split({ highWaterMark: 2 }) - - input.pipe(strcb(function (err, list) { - t.error(err) - t.deepEqual(list, ['hello', 'world']) - })) - - input.end('hello\nworld') -}) - -test('support a mapper function', function (t) { - t.plan(2) - - var a = { a: '42' } - var b = { b: '24' } - - var input = split(JSON.parse) - - input.pipe(objcb(function (err, list) { - t.error(err) - t.deepEqual(list, [a, b]) - })) - - input.write(JSON.stringify(a)) - input.write('\n') - input.end(JSON.stringify(b)) -}) - -test('split lines windows-style', function (t) { - t.plan(2) - - var input = split() - - input.pipe(strcb(function (err, list) { - t.error(err) - t.deepEqual(list, ['hello', 'world']) - })) - - input.end('hello\r\nworld') -}) - -test('splits a buffer', function (t) { - t.plan(2) - - var input = split() - - input.pipe(strcb(function (err, list) { - t.error(err) - t.deepEqual(list, ['hello', 'world']) - })) - - input.end(Buffer.from('hello\nworld')) -}) - -test('do not end on undefined', function (t) { - t.plan(2) - - var input = split(function (line) { }) - - input.pipe(strcb(function (err, list) { - t.error(err) - t.deepEqual(list, []) - })) - - input.end(Buffer.from('hello\nworld')) -}) - -test('has destroy method', function (t) { - t.plan(1) - - var input = split(function (line) { }) - - input.on('close', function () { - t.ok(true, 'close emitted') - t.end() - }) - - input.destroy() -}) - -test('support custom matcher and mapper', function (t) { - t.plan(4) - - var a = { a: '42' } - var b = { b: '24' } - var input = split('~', JSON.parse) - - t.equal(input.matcher, '~') - t.equal(typeof input.mapper, 'function') - - input.pipe(objcb(function (err, list) { - t.notOk(err, 'no errors') - t.deepEqual(list, [a, b]) - })) - - input.write(JSON.stringify(a)) - input.write('~') - input.end(JSON.stringify(b)) -}) - -test('support custom matcher and options', function (t) { - t.plan(6) - - var input = split('~', { highWaterMark: 1024 }) - - t.equal(input.matcher, '~') - t.equal(typeof input.mapper, 'function') - t.equal(input._readableState.highWaterMark, 1024) - t.equal(input._writableState.highWaterMark, 1024) - - input.pipe(strcb(function (err, list) { - t.error(err) - t.deepEqual(list, ['hello', 'world']) - })) - - input.end('hello~world') -}) - -test('support mapper and options', function (t) { - t.plan(6) - - var a = { a: '42' } - var b = { b: '24' } - var input = split(JSON.parse, { highWaterMark: 1024 }) - - t.ok(input.matcher instanceof RegExp, 'matcher is RegExp') - t.equal(typeof input.mapper, 'function') - t.equal(input._readableState.highWaterMark, 1024) - t.equal(input._writableState.highWaterMark, 1024) - - input.pipe(objcb(function (err, list) { - t.error(err) - t.deepEqual(list, [a, b]) - })) - - input.write(JSON.stringify(a)) - input.write('\n') - input.end(JSON.stringify(b)) -}) - -test('split utf8 chars', function (t) { - t.plan(2) - - var input = split() - - input.pipe(strcb(function (err, list) { - t.error(err) - t.deepEqual(list, ['烫烫烫', '锟斤拷']) - })) - - var buf = Buffer.from('烫烫烫\r\n锟斤拷', 'utf8') - for (var i = 0; i < buf.length; ++i) { - input.write(buf.slice(i, i + 1)) - } - input.end() -}) - -test('split utf8 chars 2by2', function (t) { - t.plan(2) - - var input = split() - - input.pipe(strcb(function (err, list) { - t.error(err) - t.deepEqual(list, ['烫烫烫', '烫烫烫']) - })) - - var str = '烫烫烫\r\n烫烫烫' - var buf = Buffer.from(str, 'utf8') - for (var i = 0; i < buf.length; i += 2) { - input.write(buf.slice(i, i + 2)) - } - input.end() -}) - -test('split lines when the \n comes at the end of a chunk', function (t) { - t.plan(2) - - var input = split() - - input.pipe(strcb(function (err, list) { - t.error(err) - t.deepEqual(list, ['hello', 'world']) - })) - - input.write('hello\n') - input.end('world') -}) - -test('truncated utf-8 char', function (t) { - t.plan(2) - - var input = split() - - input.pipe(strcb(function (err, list) { - t.error(err) - t.deepEqual(list, ['烫' + Buffer.from('e7', 'hex').toString()]) - })) - - var str = '烫烫' - var buf = Buffer.from(str, 'utf8') - - input.write(buf.slice(0, 3)) - input.end(buf.slice(3, 4)) -}) - -test('maximum buffer limit', function (t) { - t.plan(1) - - var input = split({ maxLength: 2 }) - - input.pipe(strcb(function (err, list) { - t.ok(err) - })) - - input.write('hey') -}) - -test('readable highWaterMark', function (t) { - var input = split() - t.equal(input._readableState.highWaterMark, 16) - t.end() -}) - -test('maxLength < chunk size', function (t) { - t.plan(2) - - var input = split({ maxLength: 2 }) - - input.pipe(strcb(function (err, list) { - t.error(err) - t.deepEqual(list, ['a', 'b']) - })) - - input.end('a\nb') -}) - -test('maximum buffer limit w/skip', function (t) { - t.plan(2) - - var input = split({ maxLength: 2, skipOverflow: true }) - - input.pipe(strcb(function (err, list) { - t.error(err) - t.deepEqual(list, ['a', 'b', 'c']) - })) - - input.write('a\n123') - input.write('456') - input.write('789\nb\nc') - input.end() -}) - -test("don't modify the options object", function (t) { - t.plan(2) - - var options = {} - var input = split(options) - - input.pipe(strcb(function (err, list) { - t.error(err) - t.same(options, {}) - })) - - input.end() -}) - -test('mapper throws flush', function (t) { - t.plan(1) - var error = new Error() - var input = split(function () { - throw error - }) - - input.on('error', (err, list) => { - t.same(err, error) - }) - input.end('hello') -}) - -test('mapper throws on transform', function (t) { - t.plan(2) - - var error = new Error() - var input = split(function (l) { - throw error - }) - - input.on('error', (err) => { - t.same(err, error) - }) - input.write('a') - input.write('\n') - input.end('b') -}) diff --git a/node_modules/stream-shift/.travis.yml b/node_modules/stream-shift/.travis.yml deleted file mode 100644 index ecd4193f..00000000 --- a/node_modules/stream-shift/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.12" - - "4" - - "6" diff --git a/node_modules/stream-shift/LICENSE b/node_modules/stream-shift/LICENSE deleted file mode 100644 index bae9da7b..00000000 --- a/node_modules/stream-shift/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/stream-shift/README.md b/node_modules/stream-shift/README.md deleted file mode 100644 index d9cc2d94..00000000 --- a/node_modules/stream-shift/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# stream-shift - -Returns the next buffer/object in a stream's readable queue - -``` -npm install stream-shift -``` - -[![build status](http://img.shields.io/travis/mafintosh/stream-shift.svg?style=flat)](http://travis-ci.org/mafintosh/stream-shift) - -## Usage - -``` js -var shift = require('stream-shift') - -console.log(shift(someStream)) // first item in its buffer -``` - -## Credit - -Thanks [@dignifiedquire](https://github.com/dignifiedquire) for making this work on node 6 - -## License - -MIT diff --git a/node_modules/stream-shift/index.js b/node_modules/stream-shift/index.js deleted file mode 100644 index 33cc4d74..00000000 --- a/node_modules/stream-shift/index.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = shift - -function shift (stream) { - var rs = stream._readableState - if (!rs) return null - return (rs.objectMode || typeof stream._duplexState === 'number') ? stream.read() : stream.read(getStateLength(rs)) -} - -function getStateLength (state) { - if (state.buffer.length) { - // Since node 6.3.0 state.buffer is a BufferList not an array - if (state.buffer.head) { - return state.buffer.head.data.length - } - - return state.buffer[0].length - } - - return state.length -} diff --git a/node_modules/stream-shift/package.json b/node_modules/stream-shift/package.json deleted file mode 100644 index 7e51fc4c..00000000 --- a/node_modules/stream-shift/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "_from": "stream-shift@^1.0.0", - "_id": "stream-shift@1.0.1", - "_inBundle": false, - "_integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", - "_location": "/stream-shift", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "stream-shift@^1.0.0", - "name": "stream-shift", - "escapedName": "stream-shift", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/duplexify" - ], - "_resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", - "_shasum": "d7088281559ab2778424279b0877da3c392d5a3d", - "_spec": "stream-shift@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/duplexify", - "author": { - "name": "Mathias Buus", - "url": "@mafintosh" - }, - "bugs": { - "url": "https://github.com/mafintosh/stream-shift/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Returns the next buffer/object in a stream's readable queue", - "devDependencies": { - "standard": "^7.1.2", - "tape": "^4.6.0", - "through2": "^2.0.1" - }, - "homepage": "https://github.com/mafintosh/stream-shift", - "license": "MIT", - "main": "index.js", - "name": "stream-shift", - "repository": { - "type": "git", - "url": "git+https://github.com/mafintosh/stream-shift.git" - }, - "scripts": { - "test": "standard && tape test.js" - }, - "version": "1.0.1" -} diff --git a/node_modules/stream-shift/test.js b/node_modules/stream-shift/test.js deleted file mode 100644 index c0222c37..00000000 --- a/node_modules/stream-shift/test.js +++ /dev/null @@ -1,48 +0,0 @@ -var tape = require('tape') -var through = require('through2') -var stream = require('stream') -var shift = require('./') - -tape('shifts next', function (t) { - var passthrough = through() - - passthrough.write('hello') - passthrough.write('world') - - t.same(shift(passthrough), Buffer('hello')) - t.same(shift(passthrough), Buffer('world')) - t.end() -}) - -tape('shifts next with core', function (t) { - var passthrough = stream.PassThrough() - - passthrough.write('hello') - passthrough.write('world') - - t.same(shift(passthrough), Buffer('hello')) - t.same(shift(passthrough), Buffer('world')) - t.end() -}) - -tape('shifts next with object mode', function (t) { - var passthrough = through({objectMode: true}) - - passthrough.write({hello: 1}) - passthrough.write({world: 1}) - - t.same(shift(passthrough), {hello: 1}) - t.same(shift(passthrough), {world: 1}) - t.end() -}) - -tape('shifts next with object mode with core', function (t) { - var passthrough = stream.PassThrough({objectMode: true}) - - passthrough.write({hello: 1}) - passthrough.write({world: 1}) - - t.same(shift(passthrough), {hello: 1}) - t.same(shift(passthrough), {world: 1}) - t.end() -}) diff --git a/node_modules/string_decoder/LICENSE b/node_modules/string_decoder/LICENSE deleted file mode 100644 index 778edb20..00000000 --- a/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - diff --git a/node_modules/string_decoder/README.md b/node_modules/string_decoder/README.md deleted file mode 100644 index 5fd58315..00000000 --- a/node_modules/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# string_decoder - -***Node-core v8.9.4 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. - -## Streams Working Group - -`string_decoder` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -See [readable-stream](https://github.com/nodejs/readable-stream) for -more details. diff --git a/node_modules/string_decoder/lib/string_decoder.js b/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63f..00000000 --- a/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var Buffer = require('safe-buffer').Buffer; -/**/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/node_modules/string_decoder/package.json b/node_modules/string_decoder/package.json deleted file mode 100644 index 3d1ca525..00000000 --- a/node_modules/string_decoder/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_from": "string_decoder@^1.1.1", - "_id": "string_decoder@1.3.0", - "_inBundle": false, - "_integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "_location": "/string_decoder", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "string_decoder@^1.1.1", - "name": "string_decoder", - "escapedName": "string_decoder", - "rawSpec": "^1.1.1", - "saveSpec": null, - "fetchSpec": "^1.1.1" - }, - "_requiredBy": [ - "/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "_shasum": "42f114594a46cf1a8e30b0a84f56c78c3edac21e", - "_spec": "string_decoder@^1.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/nodejs/string_decoder/issues" - }, - "bundleDependencies": false, - "dependencies": { - "safe-buffer": "~5.2.0" - }, - "deprecated": false, - "description": "The string_decoder module from Node core", - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "lib/string_decoder.js", - "name": "string_decoder", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "test": "tap test/parallel/*.js && node test/verify-dependencies" - }, - "version": "1.3.0" -} diff --git a/node_modules/strip-json-comments/index.d.ts b/node_modules/strip-json-comments/index.d.ts deleted file mode 100644 index 28ba3c8a..00000000 --- a/node_modules/strip-json-comments/index.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -declare namespace stripJsonComments { - interface Options { - /** - Replace comments with whitespace instead of stripping them entirely. - - @default true - */ - readonly whitespace?: boolean; - } -} - -/** -Strip comments from JSON. Lets you use comments in your JSON files! - -It will replace single-line comments `//` and multi-line comments `/**\/` with whitespace. This allows JSON error positions to remain as close as possible to the original source. - -@param jsonString - Accepts a string with JSON. -@returns A JSON string without comments. - -@example -``` -const json = `{ - // Rainbows - "unicorn": "cake" -}`; - -JSON.parse(stripJsonComments(json)); -//=> {unicorn: 'cake'} -``` -*/ -declare function stripJsonComments( - jsonString: string, - options?: stripJsonComments.Options -): string; - -export = stripJsonComments; diff --git a/node_modules/strip-json-comments/index.js b/node_modules/strip-json-comments/index.js deleted file mode 100644 index bb00b38b..00000000 --- a/node_modules/strip-json-comments/index.js +++ /dev/null @@ -1,77 +0,0 @@ -'use strict'; -const singleComment = Symbol('singleComment'); -const multiComment = Symbol('multiComment'); -const stripWithoutWhitespace = () => ''; -const stripWithWhitespace = (string, start, end) => string.slice(start, end).replace(/\S/g, ' '); - -const isEscaped = (jsonString, quotePosition) => { - let index = quotePosition - 1; - let backslashCount = 0; - - while (jsonString[index] === '\\') { - index -= 1; - backslashCount += 1; - } - - return Boolean(backslashCount % 2); -}; - -module.exports = (jsonString, options = {}) => { - if (typeof jsonString !== 'string') { - throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof jsonString}\``); - } - - const strip = options.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace; - - let insideString = false; - let insideComment = false; - let offset = 0; - let result = ''; - - for (let i = 0; i < jsonString.length; i++) { - const currentCharacter = jsonString[i]; - const nextCharacter = jsonString[i + 1]; - - if (!insideComment && currentCharacter === '"') { - const escaped = isEscaped(jsonString, i); - if (!escaped) { - insideString = !insideString; - } - } - - if (insideString) { - continue; - } - - if (!insideComment && currentCharacter + nextCharacter === '//') { - result += jsonString.slice(offset, i); - offset = i; - insideComment = singleComment; - i++; - } else if (insideComment === singleComment && currentCharacter + nextCharacter === '\r\n') { - i++; - insideComment = false; - result += strip(jsonString, offset, i); - offset = i; - continue; - } else if (insideComment === singleComment && currentCharacter === '\n') { - insideComment = false; - result += strip(jsonString, offset, i); - offset = i; - } else if (!insideComment && currentCharacter + nextCharacter === '/*') { - result += jsonString.slice(offset, i); - offset = i; - insideComment = multiComment; - i++; - continue; - } else if (insideComment === multiComment && currentCharacter + nextCharacter === '*/') { - i++; - insideComment = false; - result += strip(jsonString, offset, i + 1); - offset = i + 1; - continue; - } - } - - return result + (insideComment ? strip(jsonString.slice(offset)) : jsonString.slice(offset)); -}; diff --git a/node_modules/strip-json-comments/license b/node_modules/strip-json-comments/license deleted file mode 100644 index fa7ceba3..00000000 --- a/node_modules/strip-json-comments/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/strip-json-comments/package.json b/node_modules/strip-json-comments/package.json deleted file mode 100644 index 7351a038..00000000 --- a/node_modules/strip-json-comments/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "_from": "strip-json-comments@^3.1.1", - "_id": "strip-json-comments@3.1.1", - "_inBundle": false, - "_integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "_location": "/strip-json-comments", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "strip-json-comments@^3.1.1", - "name": "strip-json-comments", - "escapedName": "strip-json-comments", - "rawSpec": "^3.1.1", - "saveSpec": null, - "fetchSpec": "^3.1.1" - }, - "_requiredBy": [ - "/pino-pretty" - ], - "_resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "_shasum": "31f1281b3832630434831c310c01cccda8cbe006", - "_spec": "strip-json-comments@^3.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/pino-pretty", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/strip-json-comments/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Strip comments from JSON. Lets you use comments in your JSON files!", - "devDependencies": { - "ava": "^1.4.1", - "matcha": "^0.7.0", - "tsd": "^0.7.2", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "funding": "https://github.com/sponsors/sindresorhus", - "homepage": "https://github.com/sindresorhus/strip-json-comments#readme", - "keywords": [ - "json", - "strip", - "comments", - "remove", - "delete", - "trim", - "multiline", - "parse", - "config", - "configuration", - "settings", - "util", - "env", - "environment", - "jsonc" - ], - "license": "MIT", - "name": "strip-json-comments", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/strip-json-comments.git" - }, - "scripts": { - "bench": "matcha benchmark.js", - "test": "xo && ava && tsd" - }, - "version": "3.1.1" -} diff --git a/node_modules/strip-json-comments/readme.md b/node_modules/strip-json-comments/readme.md deleted file mode 100644 index cc542e50..00000000 --- a/node_modules/strip-json-comments/readme.md +++ /dev/null @@ -1,78 +0,0 @@ -# strip-json-comments [![Build Status](https://travis-ci.com/sindresorhus/strip-json-comments.svg?branch=master)](https://travis-ci.com/github/sindresorhus/strip-json-comments) - -> Strip comments from JSON. Lets you use comments in your JSON files! - -This is now possible: - -```js -{ - // Rainbows - "unicorn": /* ❤ */ "cake" -} -``` - -It will replace single-line comments `//` and multi-line comments `/**/` with whitespace. This allows JSON error positions to remain as close as possible to the original source. - -Also available as a [Gulp](https://github.com/sindresorhus/gulp-strip-json-comments)/[Grunt](https://github.com/sindresorhus/grunt-strip-json-comments)/[Broccoli](https://github.com/sindresorhus/broccoli-strip-json-comments) plugin. - -## Install - -``` -$ npm install strip-json-comments -``` - -## Usage - -```js -const json = `{ - // Rainbows - "unicorn": /* ❤ */ "cake" -}`; - -JSON.parse(stripJsonComments(json)); -//=> {unicorn: 'cake'} -``` - -## API - -### stripJsonComments(jsonString, options?) - -#### jsonString - -Type: `string` - -Accepts a string with JSON and returns a string without comments. - -#### options - -Type: `object` - -##### whitespace - -Type: `boolean`\ -Default: `true` - -Replace comments with whitespace instead of stripping them entirely. - -## Benchmark - -``` -$ npm run bench -``` - -## Related - -- [strip-json-comments-cli](https://github.com/sindresorhus/strip-json-comments-cli) - CLI for this module -- [strip-css-comments](https://github.com/sindresorhus/strip-css-comments) - Strip comments from CSS - ---- - -
    - - Get professional support for this package with a Tidelift subscription - -
    - - Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. -
    -
    diff --git a/node_modules/supports-color/browser.js b/node_modules/supports-color/browser.js deleted file mode 100644 index 62afa3a7..00000000 --- a/node_modules/supports-color/browser.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; -module.exports = { - stdout: false, - stderr: false -}; diff --git a/node_modules/supports-color/index.js b/node_modules/supports-color/index.js deleted file mode 100644 index 1704131b..00000000 --- a/node_modules/supports-color/index.js +++ /dev/null @@ -1,131 +0,0 @@ -'use strict'; -const os = require('os'); -const hasFlag = require('has-flag'); - -const env = process.env; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false')) { - forceColor = false; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = true; -} -if ('FORCE_COLOR' in env) { - forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(stream) { - if (forceColor === false) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (stream && !stream.isTTY && forceColor !== true) { - return 0; - } - - const min = forceColor ? 1 : 0; - - if (process.platform === 'win32') { - // Node.js 7.5.0 is the first version of Node.js to include a patch to - // libuv that enables 256 color output on Windows. Anything earlier and it - // won't work. However, here we target Node.js 8 at minimum as it is an LTS - // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows - // release that supports 256 colors. Windows 10 build 14931 is the first release - // that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(process.versions.node.split('.')[0]) >= 8 && - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - - if (env.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - if (env.TERM === 'dumb') { - return min; - } - - return min; -} - -function getSupportLevel(stream) { - const level = supportsColor(stream); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr) -}; diff --git a/node_modules/supports-color/license b/node_modules/supports-color/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/supports-color/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/supports-color/package.json b/node_modules/supports-color/package.json deleted file mode 100644 index 87b550e8..00000000 --- a/node_modules/supports-color/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_from": "supports-color@^5.3.0", - "_id": "supports-color@5.5.0", - "_inBundle": false, - "_integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "_location": "/supports-color", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "supports-color@^5.3.0", - "name": "supports-color", - "escapedName": "supports-color", - "rawSpec": "^5.3.0", - "saveSpec": null, - "fetchSpec": "^5.3.0" - }, - "_requiredBy": [ - "/args/chalk" - ], - "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "_shasum": "e2e69a44ac8772f78a1ec0b35b689df6530efc8f", - "_spec": "supports-color@^5.3.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/args/node_modules/chalk", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/chalk/supports-color/issues" - }, - "bundleDependencies": false, - "dependencies": { - "has-flag": "^3.0.0" - }, - "deprecated": false, - "description": "Detect whether a terminal supports color", - "devDependencies": { - "ava": "^0.25.0", - "import-fresh": "^2.0.0", - "xo": "^0.20.0" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js", - "browser.js" - ], - "homepage": "https://github.com/chalk/supports-color#readme", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "supports", - "capability", - "detect", - "truecolor", - "16m" - ], - "license": "MIT", - "name": "supports-color", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/supports-color.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "5.5.0" -} diff --git a/node_modules/supports-color/readme.md b/node_modules/supports-color/readme.md deleted file mode 100644 index f6e40195..00000000 --- a/node_modules/supports-color/readme.md +++ /dev/null @@ -1,66 +0,0 @@ -# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) - -> Detect whether a terminal supports color - - -## Install - -``` -$ npm install supports-color -``` - - -## Usage - -```js -const supportsColor = require('supports-color'); - -if (supportsColor.stdout) { - console.log('Terminal stdout supports color'); -} - -if (supportsColor.stdout.has256) { - console.log('Terminal stdout supports 256 colors'); -} - -if (supportsColor.stderr.has16m) { - console.log('Terminal stderr supports 16 million colors (truecolor)'); -} -``` - - -## API - -Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported. - -The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag: - -- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors) -- `.level = 2` and `.has256 = true`: 256 color support -- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors) - - -## Info - -It obeys the `--color` and `--no-color` CLI flags. - -Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. - -Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. - - -## Related - -- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/through/.travis.yml b/node_modules/through/.travis.yml deleted file mode 100644 index c693a939..00000000 --- a/node_modules/through/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - "0.10" diff --git a/node_modules/through/LICENSE.APACHE2 b/node_modules/through/LICENSE.APACHE2 deleted file mode 100644 index 6366c047..00000000 --- a/node_modules/through/LICENSE.APACHE2 +++ /dev/null @@ -1,15 +0,0 @@ -Apache License, Version 2.0 - -Copyright (c) 2011 Dominic Tarr - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/node_modules/through/LICENSE.MIT b/node_modules/through/LICENSE.MIT deleted file mode 100644 index 6eafbd73..00000000 --- a/node_modules/through/LICENSE.MIT +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2011 Dominic Tarr - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/through/index.js b/node_modules/through/index.js deleted file mode 100644 index ca5fc590..00000000 --- a/node_modules/through/index.js +++ /dev/null @@ -1,108 +0,0 @@ -var Stream = require('stream') - -// through -// -// a stream that does nothing but re-emit the input. -// useful for aggregating a series of changing but not ending streams into one stream) - -exports = module.exports = through -through.through = through - -//create a readable writable stream. - -function through (write, end, opts) { - write = write || function (data) { this.queue(data) } - end = end || function () { this.queue(null) } - - var ended = false, destroyed = false, buffer = [], _ended = false - var stream = new Stream() - stream.readable = stream.writable = true - stream.paused = false - -// stream.autoPause = !(opts && opts.autoPause === false) - stream.autoDestroy = !(opts && opts.autoDestroy === false) - - stream.write = function (data) { - write.call(this, data) - return !stream.paused - } - - function drain() { - while(buffer.length && !stream.paused) { - var data = buffer.shift() - if(null === data) - return stream.emit('end') - else - stream.emit('data', data) - } - } - - stream.queue = stream.push = function (data) { -// console.error(ended) - if(_ended) return stream - if(data === null) _ended = true - buffer.push(data) - drain() - return stream - } - - //this will be registered as the first 'end' listener - //must call destroy next tick, to make sure we're after any - //stream piped from here. - //this is only a problem if end is not emitted synchronously. - //a nicer way to do this is to make sure this is the last listener for 'end' - - stream.on('end', function () { - stream.readable = false - if(!stream.writable && stream.autoDestroy) - process.nextTick(function () { - stream.destroy() - }) - }) - - function _end () { - stream.writable = false - end.call(stream) - if(!stream.readable && stream.autoDestroy) - stream.destroy() - } - - stream.end = function (data) { - if(ended) return - ended = true - if(arguments.length) stream.write(data) - _end() // will emit or queue - return stream - } - - stream.destroy = function () { - if(destroyed) return - destroyed = true - ended = true - buffer.length = 0 - stream.writable = stream.readable = false - stream.emit('close') - return stream - } - - stream.pause = function () { - if(stream.paused) return - stream.paused = true - return stream - } - - stream.resume = function () { - if(stream.paused) { - stream.paused = false - stream.emit('resume') - } - drain() - //may have become paused again, - //as drain emits 'data'. - if(!stream.paused) - stream.emit('drain') - return stream - } - return stream -} - diff --git a/node_modules/through/package.json b/node_modules/through/package.json deleted file mode 100644 index 43c6be04..00000000 --- a/node_modules/through/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_from": "through@^2.3.8", - "_id": "through@2.3.8", - "_inBundle": false, - "_integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "_location": "/through", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "through@^2.3.8", - "name": "through", - "escapedName": "through", - "rawSpec": "^2.3.8", - "saveSpec": null, - "fetchSpec": "^2.3.8" - }, - "_requiredBy": [ - "/gulp-vinyl-zip" - ], - "_resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "_shasum": "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", - "_spec": "through@^2.3.8", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/gulp-vinyl-zip", - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "dominictarr.com" - }, - "bugs": { - "url": "https://github.com/dominictarr/through/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "simplified stream construction", - "devDependencies": { - "from": "~0.1.3", - "stream-spec": "~0.3.5", - "tape": "~2.3.2" - }, - "homepage": "https://github.com/dominictarr/through", - "keywords": [ - "stream", - "streams", - "user-streams", - "pipe" - ], - "license": "MIT", - "main": "index.js", - "name": "through", - "repository": { - "type": "git", - "url": "git+https://github.com/dominictarr/through.git" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "testling": { - "browsers": [ - "ie/8..latest", - "ff/15..latest", - "chrome/20..latest", - "safari/5.1..latest" - ], - "files": "test/*.js" - }, - "version": "2.3.8" -} diff --git a/node_modules/through/readme.markdown b/node_modules/through/readme.markdown deleted file mode 100644 index cb34c813..00000000 --- a/node_modules/through/readme.markdown +++ /dev/null @@ -1,64 +0,0 @@ -#through - -[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through) -[![testling badge](https://ci.testling.com/dominictarr/through.png)](https://ci.testling.com/dominictarr/through) - -Easy way to create a `Stream` that is both `readable` and `writable`. - -* Pass in optional `write` and `end` methods. -* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`. -* Use `this.pause()` and `this.resume()` to manage flow. -* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`). - -This function is the basis for most of the synchronous streams in -[event-stream](http://github.com/dominictarr/event-stream). - -``` js -var through = require('through') - -through(function write(data) { - this.queue(data) //data *must* not be null - }, - function end () { //optional - this.queue(null) - }) -``` - -Or, can also be used _without_ buffering on pause, use `this.emit('data', data)`, -and this.emit('end') - -``` js -var through = require('through') - -through(function write(data) { - this.emit('data', data) - //this.pause() - }, - function end () { //optional - this.emit('end') - }) -``` - -## Extended Options - -You will probably not need these 99% of the time. - -### autoDestroy=false - -By default, `through` emits close when the writable -and readable side of the stream has ended. -If that is not desired, set `autoDestroy=false`. - -``` js -var through = require('through') - -//like this -var ts = through(write, end, {autoDestroy: false}) -//or like this -var ts = through(write, end) -ts.autoDestroy = false -``` - -## License - -MIT / Apache2 diff --git a/node_modules/through/test/async.js b/node_modules/through/test/async.js deleted file mode 100644 index 46bdbaeb..00000000 --- a/node_modules/through/test/async.js +++ /dev/null @@ -1,28 +0,0 @@ -var from = require('from') -var through = require('../') - -var tape = require('tape') - -tape('simple async example', function (t) { - - var n = 0, expected = [1,2,3,4,5], actual = [] - from(expected) - .pipe(through(function(data) { - this.pause() - n ++ - setTimeout(function(){ - console.log('pushing data', data) - this.push(data) - this.resume() - }.bind(this), 300) - })).pipe(through(function(data) { - console.log('pushing data second time', data); - this.push(data) - })).on('data', function (d) { - actual.push(d) - }).on('end', function() { - t.deepEqual(actual, expected) - t.end() - }) - -}) diff --git a/node_modules/through/test/auto-destroy.js b/node_modules/through/test/auto-destroy.js deleted file mode 100644 index 9a8fd000..00000000 --- a/node_modules/through/test/auto-destroy.js +++ /dev/null @@ -1,30 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('end before close', function (assert) { - var ts = through() - ts.autoDestroy = false - var ended = false, closed = false - - ts.on('end', function () { - assert.ok(!closed) - ended = true - }) - ts.on('close', function () { - assert.ok(ended) - closed = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.ok(ended) - assert.notOk(closed) - ts.destroy() - assert.ok(closed) - assert.end() -}) - diff --git a/node_modules/through/test/buffering.js b/node_modules/through/test/buffering.js deleted file mode 100644 index b0084bfc..00000000 --- a/node_modules/through/test/buffering.js +++ /dev/null @@ -1,71 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('buffering', function(assert) { - var ts = through(function (data) { - this.queue(data) - }, function () { - this.queue(null) - }) - - var ended = false, actual = [] - - ts.on('data', actual.push.bind(actual)) - ts.on('end', function () { - ended = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - assert.deepEqual(actual, [1, 2, 3]) - ts.pause() - ts.write(4) - ts.write(5) - ts.write(6) - assert.deepEqual(actual, [1, 2, 3]) - ts.resume() - assert.deepEqual(actual, [1, 2, 3, 4, 5, 6]) - ts.pause() - ts.end() - assert.ok(!ended) - ts.resume() - assert.ok(ended) - assert.end() -}) - -test('buffering has data in queue, when ends', function (assert) { - - /* - * If stream ends while paused with data in the queue, - * stream should still emit end after all data is written - * on resume. - */ - - var ts = through(function (data) { - this.queue(data) - }, function () { - this.queue(null) - }) - - var ended = false, actual = [] - - ts.on('data', actual.push.bind(actual)) - ts.on('end', function () { - ended = true - }) - - ts.pause() - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.deepEqual(actual, [], 'no data written yet, still paused') - assert.ok(!ended, 'end not emitted yet, still paused') - ts.resume() - assert.deepEqual(actual, [1, 2, 3], 'resumed, all data should be delivered') - assert.ok(ended, 'end should be emitted once all data was delivered') - assert.end(); -}) diff --git a/node_modules/through/test/end.js b/node_modules/through/test/end.js deleted file mode 100644 index fa113f58..00000000 --- a/node_modules/through/test/end.js +++ /dev/null @@ -1,45 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('end before close', function (assert) { - var ts = through() - var ended = false, closed = false - - ts.on('end', function () { - assert.ok(!closed) - ended = true - }) - ts.on('close', function () { - assert.ok(ended) - closed = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.ok(ended) - assert.ok(closed) - assert.end() -}) - -test('end only once', function (t) { - - var ts = through() - var ended = false, closed = false - - ts.on('end', function () { - t.equal(ended, false) - ended = true - }) - - ts.queue(null) - ts.queue(null) - ts.queue(null) - - ts.resume() - - t.end() -}) diff --git a/node_modules/through/test/index.js b/node_modules/through/test/index.js deleted file mode 100644 index 96da82f9..00000000 --- a/node_modules/through/test/index.js +++ /dev/null @@ -1,133 +0,0 @@ - -var test = require('tape') -var spec = require('stream-spec') -var through = require('../') - -/* - I'm using these two functions, and not streams and pipe - so there is less to break. if this test fails it must be - the implementation of _through_ -*/ - -function write(array, stream) { - array = array.slice() - function next() { - while(array.length) - if(stream.write(array.shift()) === false) - return stream.once('drain', next) - - stream.end() - } - - next() -} - -function read(stream, callback) { - var actual = [] - stream.on('data', function (data) { - actual.push(data) - }) - stream.once('end', function () { - callback(null, actual) - }) - stream.once('error', function (err) { - callback(err) - }) -} - -test('simple defaults', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l * Math.random()) - - var t = through() - var s = spec(t).through().pausable() - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected) - assert.end() - }) - - t.on('close', s.validate) - - write(expected, t) -}); - -test('simple functions', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l * Math.random()) - - var t = through(function (data) { - this.emit('data', data*2) - }) - var s = spec(t).through().pausable() - - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected.map(function (data) { - return data*2 - })) - assert.end() - }) - - t.on('close', s.validate) - - write(expected, t) -}) - -test('pauses', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l) //Math.random()) - - var t = through() - - var s = spec(t) - .through() - .pausable() - - t.on('data', function () { - if(Math.random() > 0.1) return - t.pause() - process.nextTick(function () { - t.resume() - }) - }) - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected) - }) - - t.on('close', function () { - s.validate() - assert.end() - }) - - write(expected, t) -}) - -test('does not soft-end on `undefined`', function(assert) { - var stream = through() - , count = 0 - - stream.on('data', function (data) { - count++ - }) - - stream.write(undefined) - stream.write(undefined) - - assert.equal(count, 2) - - assert.end() -}) diff --git a/node_modules/through2-filter/LICENSE b/node_modules/through2-filter/LICENSE deleted file mode 100644 index 540900f1..00000000 --- a/node_modules/through2-filter/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -(The MIT License) - -Copyright (c) Bryce B. Baril - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/through2-filter/README.md b/node_modules/through2-filter/README.md deleted file mode 100644 index 9ad00b92..00000000 --- a/node_modules/through2-filter/README.md +++ /dev/null @@ -1,79 +0,0 @@ -through2-filter -=============== - -[![NPM](https://nodei.co/npm/through2-filter.png)](https://nodei.co/npm/through2-filter/) - -This is a super thin wrapper around [through2](http://npm.im/through2) that works like `Array.prototype.filter` but for streams. - -For when through2 is just too verbose :wink: - -Note you will **NOT** be able to alter the content of the chunks. This is intended for filtering only. If you want to modify the stream content, use either `through2` or `through2-map`. - -```js -var filter = require("through2-filter") - -var skip = filter(function (chunk) { - // skip buffers longer than 100 - return chunk.length < 100 -}) - -// vs. with through2: -var skip = through2(function (chunk, encoding, callback) { - // skip buffers longer than 100 - if (chunk.length < 100) this.push(chunk) - return callback() -}) - -// Then use your filter: -source.pipe(skip).pipe(sink) - -// Additionally accepts `wantStrings` argument to conver buffers into strings -var alphanum = new RegExp("^[A-Za-z0-1]+$") -var scrub = filter({wantStrings: true}, function (str) { - return alphanum.exec(str) -}) - -// Works like `Array.prototype.filter` meaning you can specify a function that -// takes up to two* arguments: fn(element, index) -var skip10 = filter(function (element, index) { - return index > 10 -}) -``` - -*Differences from `Array.prototype.filter`: - * No third `array` callback argument. That would require realizing the entire stream, which is generally counter-productive to stream operations. - * `Array.prototype.filter` doesn't modify the source Array, which is somewhat nonsensical when applied to streams. - -API ---- - -`require("through2-filter")([options], fn)` ---- - -Create a `through2-filter` instance that will call `fn(chunk)`. If `fn(chunk)` returns "true" the chunk will be passed downstream. Otherwise it will be dropped. - -`require("through2-filter").ctor([options], fn)` ---- - -Create a `through2-filter` Type that can be instantiated via `new Type()` or `Type()` to create reusable spies. - -`require("through2-filter").obj([options], fn)` ---- - -Create a `through2-filter` that defaults to `objectMode = true`. - -`require("through2-filter").objCtor([options], fn)` ---- - -Create a `through2-filter` Type that defaults to `objectMode = true`. - -Options -------- - - * wantStrings: Automatically call chunk.toString() for the super lazy. - * all other through2 options - -LICENSE -======= - -MIT diff --git a/node_modules/through2-filter/index.js b/node_modules/through2-filter/index.js deleted file mode 100644 index 9026f6d5..00000000 --- a/node_modules/through2-filter/index.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; - -module.exports = make -module.exports.ctor = ctor -module.exports.objCtor = objCtor -module.exports.obj = obj - -var through2 = require("through2") -var xtend = require("xtend") - -function ctor(options, fn) { - if (typeof options == "function") { - fn = options - options = {} - } - - var Filter = through2.ctor(options, function (chunk, encoding, callback) { - if (this.options.wantStrings) chunk = chunk.toString() - try { - if (fn.call(this, chunk, this._index++)) this.push(chunk) - return callback() - } catch (e) { - return callback(e) - } - }) - Filter.prototype._index = 0 - return Filter -} - -function objCtor(options, fn) { - if (typeof options === "function") { - fn = options - options = {} - } - options = xtend({objectMode: true, highWaterMark: 16}, options) - return ctor(options, fn) -} - -function make(options, fn) { - return ctor(options, fn)() -} - -function obj(options, fn) { - if (typeof options === "function") { - fn = options - options = {} - } - options = xtend({objectMode: true, highWaterMark: 16}, options) - return make(options, fn) -} diff --git a/node_modules/through2-filter/package.json b/node_modules/through2-filter/package.json deleted file mode 100644 index 00946c68..00000000 --- a/node_modules/through2-filter/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "through2-filter@^3.0.0", - "_id": "through2-filter@3.0.0", - "_inBundle": false, - "_integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", - "_location": "/through2-filter", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "through2-filter@^3.0.0", - "name": "through2-filter", - "escapedName": "through2-filter", - "rawSpec": "^3.0.0", - "saveSpec": null, - "fetchSpec": "^3.0.0" - }, - "_requiredBy": [ - "/unique-stream" - ], - "_resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", - "_shasum": "700e786df2367c2c88cd8aa5be4cf9c1e7831254", - "_spec": "through2-filter@^3.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/unique-stream", - "author": { - "name": "Bryce B. Baril" - }, - "bugs": { - "url": "https://github.com/brycebaril/through2-filter/issues" - }, - "bundleDependencies": false, - "dependencies": { - "through2": "~2.0.0", - "xtend": "~4.0.0" - }, - "deprecated": false, - "description": "A through2 to create an Array.prototype.filter analog for streams.", - "devDependencies": { - "concat-stream": "^1.4.7", - "stream-spigot": "^3.0.5", - "tape": "^4.0.0" - }, - "directories": { - "test": "test" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/brycebaril/through2-filter#readme", - "jshintConfig": { - "asi": true, - "globalstrict": true, - "validthis": true, - "eqnull": true, - "node": true, - "loopfunc": true, - "newcap": false, - "eqeqeq": false - }, - "keywords": [ - "streams", - "through", - "through2", - "filter" - ], - "license": "MIT", - "name": "through2-filter", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/brycebaril/through2-filter.git" - }, - "scripts": { - "test": "node test/" - }, - "version": "3.0.0" -} diff --git a/node_modules/through2/LICENSE.md b/node_modules/through2/LICENSE.md deleted file mode 100644 index a2429b63..00000000 --- a/node_modules/through2/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -# The MIT License (MIT) - -**Copyright (c) Rod Vagg (the "Original Author") and additional contributors** - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/through2/README.md b/node_modules/through2/README.md deleted file mode 100644 index b5e44c7b..00000000 --- a/node_modules/through2/README.md +++ /dev/null @@ -1,134 +0,0 @@ -# through2 - -[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/) - -**A tiny wrapper around Node streams.Transform (Streams2/3) to avoid explicit subclassing noise** - -Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. - -Note: As 2.x.x this module starts using **Streams3** instead of Stream2. To continue using a Streams2 version use `npm install through2@0` to fetch the latest version of 0.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**. - -```js -fs.createReadStream('ex.txt') - .pipe(through2(function (chunk, enc, callback) { - for (var i = 0; i < chunk.length; i++) - if (chunk[i] == 97) - chunk[i] = 122 // swap 'a' for 'z' - - this.push(chunk) - - callback() - })) - .pipe(fs.createWriteStream('out.txt')) - .on('finish', () => doSomethingSpecial()) -``` - -Or object streams: - -```js -var all = [] - -fs.createReadStream('data.csv') - .pipe(csv2()) - .pipe(through2.obj(function (chunk, enc, callback) { - var data = { - name : chunk[0] - , address : chunk[3] - , phone : chunk[10] - } - this.push(data) - - callback() - })) - .on('data', (data) => { - all.push(data) - }) - .on('end', () => { - doSomethingSpecial(all) - }) -``` - -Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. - -## API - -through2([ options, ] [ transformFunction ] [, flushFunction ]) - -Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). - -### options - -The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). - -The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2({ objectMode: true, allowHalfOpen: false }, - (chunk, enc, cb) => { - cb(null, 'wut?') // note we can use the second argument on the callback - // to provide data as an alternative to this.push('wut?') - } - ) - .pipe(fs.createWriteStream('/tmp/wut.txt')) -``` - -### transformFunction - -The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. - -To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. - -Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error. - -If you **do not provide a `transformFunction`** then you will get a simple pass-through stream. - -### flushFunction - -The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2( - (chunk, enc, cb) => cb(null, chunk), // transform is a noop - function (cb) { // flush function - this.push('tacking on an extra buffer to the end'); - cb(); - } - )) - .pipe(fs.createWriteStream('/tmp/wut.txt')); -``` - -through2.ctor([ options, ] transformFunction[, flushFunction ]) - -Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. - -```js -var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { - if (record.temp != null && record.unit == "F") { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = "C" - } - this.push(record) - callback() -}) - -// Create instances of FToC like so: -var converter = new FToC() -// Or: -var converter = FToC() -// Or specify/override options when you instantiate, if you prefer: -var converter = FToC({objectMode: true}) -``` - -## See Also - - - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams. - - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams. - - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams. - - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies. - - the [mississippi stream utility collection](https://github.com/maxogden/mississippi) includes `through2` as well as many more useful stream modules similar to this one - -## License - -**through2** is Copyright (c) Rod Vagg [@rvagg](https://twitter.com/rvagg) and additional contributors and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/through2/node_modules/readable-stream/.travis.yml b/node_modules/through2/node_modules/readable-stream/.travis.yml deleted file mode 100644 index f62cdac0..00000000 --- a/node_modules/through2/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -sudo: false -language: node_js -before_install: - - (test $NPM_LEGACY && npm install -g npm@2 && npm install -g npm@3) || true -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: NPM_LEGACY=true - - node_js: '0.10' - env: NPM_LEGACY=true - - node_js: '0.11' - env: NPM_LEGACY=true - - node_js: '0.12' - env: NPM_LEGACY=true - - node_js: 1 - env: NPM_LEGACY=true - - node_js: 2 - env: NPM_LEGACY=true - - node_js: 3 - env: NPM_LEGACY=true - - node_js: 4 - - node_js: 5 - - node_js: 6 - - node_js: 7 - - node_js: 8 - - node_js: 9 -script: "npm run test" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/node_modules/through2/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/through2/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58d..00000000 --- a/node_modules/through2/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/through2/node_modules/readable-stream/GOVERNANCE.md b/node_modules/through2/node_modules/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93f..00000000 --- a/node_modules/through2/node_modules/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### Streams Working Group - -The Node.js Streams is jointly governed by a Working Group -(WG) -that is responsible for high-level guidance of the project. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Conduct guidelines -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project -[README.md](./README.md#current-project-team-members). - -### Collaborators - -The readable-stream GitHub repository is -maintained by the WG and additional Collaborators who are added by the -WG on an ongoing basis. - -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the WG and their addition as -Collaborators is discussed during the WG meeting. - -_Note:_ If you make a significant contribution and are not considered -for commit-access log an issue or contact a WG member directly and it -will be brought up in the next WG meeting. - -Modifications of the contents of the readable-stream repository are -made on -a collaborative basis. Anybody with a GitHub account may propose a -modification via pull request and it will be considered by the project -Collaborators. All pull requests must be reviewed and accepted by a -Collaborator with sufficient expertise who is able to take full -responsibility for the change. In the case of pull requests proposed -by an existing Collaborator, an additional Collaborator is required -for sign-off. Consensus should be sought if additional Collaborators -participate and there is disagreement around a particular -modification. See _Consensus Seeking Process_ below for further detail -on the consensus model used for governance. - -Collaborators may opt to elevate significant or controversial -modifications, or modifications that have not found consensus to the -WG for discussion by assigning the ***WG-agenda*** tag to a pull -request or issue. The WG should serve as the final arbiter where -required. - -For the current list of Collaborators, see the project -[README.md](./README.md#members). - -### WG Membership - -WG seats are not time-limited. There is no fixed size of the WG. -However, the expected target is between 6 and 12, to ensure adequate -coverage of important areas of expertise, balanced with the ability to -make decisions efficiently. - -There is no specific set of requirements or qualifications for WG -membership beyond these rules. - -The WG may add additional members to the WG by unanimous consensus. - -A WG member may be removed from the WG by voluntary resignation, or by -unanimous consensus of all other WG members. - -Changes to WG membership should be posted in the agenda, and may be -suggested as any other agenda item (see "WG Meetings" below). - -If an addition or removal is proposed during a meeting, and the full -WG is not in attendance to participate, then the addition or removal -is added to the agenda for the subsequent meeting. This is to ensure -that all members are given the opportunity to participate in all -membership decisions. If a WG member is unable to attend a meeting -where a planned membership decision is being made, then their consent -is assumed. - -No more than 1/3 of the WG members may be affiliated with the same -employer. If removal or resignation of a WG member, or a change of -employment by a WG member, creates a situation where more than 1/3 of -the WG membership shares an employer, then the situation must be -immediately remedied by the resignation or removal of one or more WG -members affiliated with the over-represented employer(s). - -### WG Meetings - -The WG meets occasionally on a Google Hangout On Air. A designated moderator -approved by the WG runs the meeting. Each meeting should be -published to YouTube. - -Items are added to the WG agenda that are considered contentious or -are modifications of governance, contribution policy, WG membership, -or release process. - -The intention of the agenda is not to approve or review all patches; -that should happen continuously on GitHub and be handled by the larger -group of Collaborators. - -Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, -WG member or the moderator can add the item to the agenda by adding -the ***WG-agenda*** tag to the issue. - -Prior to each WG meeting the moderator will share the Agenda with -members of the WG. WG members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the WG -cannot veto or remove items. - -The WG may invite persons or representatives from certain projects to -participate in a non-voting capacity. - -The moderator is responsible for summarizing the discussion of each -agenda item and sends it as a pull request after the meeting. - -### Consensus Seeking Process - -The WG follows a -[Consensus -Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) -decision-making model. - -When an agenda item has appeared to reach a consensus the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. - -If an agenda item cannot reach a consensus a WG member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be seconded by a majority of the WG -or else the discussion will continue. Simple majority wins. - -Note that changes to WG membership require a majority consensus. See -"WG Membership" above. diff --git a/node_modules/through2/node_modules/readable-stream/LICENSE b/node_modules/through2/node_modules/readable-stream/LICENSE deleted file mode 100644 index 2873b3b2..00000000 --- a/node_modules/through2/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" diff --git a/node_modules/through2/node_modules/readable-stream/README.md b/node_modules/through2/node_modules/readable-stream/README.md deleted file mode 100644 index 23fe3f3e..00000000 --- a/node_modules/through2/node_modules/readable-stream/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# readable-stream - -***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - - -## Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E -* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/node_modules/through2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/through2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index 83275f19..00000000 --- a/node_modules/through2/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,60 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section - - diff --git a/node_modules/through2/node_modules/readable-stream/duplex-browser.js b/node_modules/through2/node_modules/readable-stream/duplex-browser.js deleted file mode 100644 index f8b2db83..00000000 --- a/node_modules/through2/node_modules/readable-stream/duplex-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_duplex.js'); diff --git a/node_modules/through2/node_modules/readable-stream/duplex.js b/node_modules/through2/node_modules/readable-stream/duplex.js deleted file mode 100644 index 46924cbf..00000000 --- a/node_modules/through2/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Duplex diff --git a/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 57003c32..00000000 --- a/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -{ - // avoid scope creep, the keys array can then be collected - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - pna.nextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -Object.defineProperty(Duplex.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); - -Duplex.prototype._destroy = function (err, cb) { - this.push(null); - this.end(); - - pna.nextTick(cb, err); -}; \ No newline at end of file diff --git a/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 612edb4d..00000000 --- a/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 0f807646..00000000 --- a/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1019 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - -/**/ -var Duplex; -/**/ - -Readable.ReadableState = ReadableState; - -/**/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var BufferList = require('./internal/streams/BufferList'); -var destroyImpl = require('./internal/streams/destroy'); -var StringDecoder; - -util.inherits(Readable, Stream); - -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); - - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var readableHwm = options.readableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} - -Object.defineProperty(Readable.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); - -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - this.push(null); - cb(err); -}; - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); - } else if (state.ended) { - stream.emit('error', new Error('stream.push() after EOF')); - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - } - } - - return needMoreData(state); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } else { - state.length -= n; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - pna.nextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('_read() is not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - // If the user pushes more data while we're writing to dest then we'll end up - // in ondata again. However, we only want to increase awaitDrain once because - // dest will only emit one 'drain' event for the multiple writes. - // => Introduce a guard on increasing awaitDrain. - var increasedAwaitDrain = false; - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - increasedAwaitDrain = false; - var ret = dest.write(chunk); - if (false === ret && !increasedAwaitDrain) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - increasedAwaitDrain = true; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { hasUnpiped: false }; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, unpipeInfo); - }return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this, unpipeInfo); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data') { - // Start flowing on next tick if stream isn't explicitly paused - if (this._readableState.flowing !== false) this.resume(); - } else if (ev === 'readable') { - var state = this._readableState; - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.emittedReadable = false; - if (!state.reading) { - pna.nextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - pna.nextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - state.awaitDrain = 0; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null) {} -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var _this = this; - - var state = this._readableState; - var paused = false; - - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - - _this.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return this; -}; - -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._readableState.highWaterMark; - } -}); - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = fromListPartial(n, state.buffer, state.decoder); - } - - return ret; -} - -// Extracts only enough buffered data to satisfy the amount requested. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromListPartial(n, list, hasStrings) { - var ret; - if (n < list.head.data.length) { - // slice is the same for buffers and strings - ret = list.head.data.slice(0, n); - list.head.data = list.head.data.slice(n); - } else if (n === list.head.data.length) { - // first chunk is a perfect match - ret = list.shift(); - } else { - // result spans more than one buffer - ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); - } - return ret; -} - -// Copies a specified amount of characters from the list of buffered data -// chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBufferString(n, list) { - var p = list.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -// Copies a specified amount of bytes from the list of buffered data chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBuffer(n, list) { - var ret = Buffer.allocUnsafe(n); - var p = list.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - pna.nextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index fcfc105a..00000000 --- a/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) { - return this.emit('error', new Error('write callback called multiple times')); - } - - ts.writechunk = null; - ts.writecb = null; - - if (data != null) // single equals check for both `null` and `undefined` - this.push(data); - - cb(er); - - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); -} - -function prefinish() { - var _this = this; - - if (typeof this._flush === 'function') { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('_transform() is not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -Transform.prototype._destroy = function (err, cb) { - var _this2 = this; - - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - _this2.emit('close'); - }); -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - - if (data != null) // single equals check for both `null` and `undefined` - stream.push(data); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); - - if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index b0b02200..00000000 --- a/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,687 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Writable; - -/* */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; -/**/ - -/**/ -var Duplex; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -var destroyImpl = require('./internal/streams/destroy'); - -util.inherits(Writable, Stream); - -function nop() {} - -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var writableHwm = options.writableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // if _final has been called - this.finalCalled = false; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // has it been destroyed - this.destroyed = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function (object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function (object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { - return new Writable(options); - } - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - pna.nextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - pna.nextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} - -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - pna.nextTick(cb, er); - // this can emit finish, and it will always happen - // after error - pna.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('_write() is not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - stream.emit('error', err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function') { - state.pendingcb++; - state.finalCalled = true; - pna.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = corkReq; - } else { - state.corkedRequestsFree = corkReq; - } -} - -Object.defineProperty(Writable.prototype, 'destroyed', { - get: function () { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); - -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - this.end(); - cb(err); -}; \ No newline at end of file diff --git a/node_modules/through2/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/through2/node_modules/readable-stream/lib/internal/streams/BufferList.js deleted file mode 100644 index aefc68bd..00000000 --- a/node_modules/through2/node_modules/readable-stream/lib/internal/streams/BufferList.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Buffer = require('safe-buffer').Buffer; -var util = require('util'); - -function copyBuffer(src, target, offset) { - src.copy(target, offset); -} - -module.exports = function () { - function BufferList() { - _classCallCheck(this, BufferList); - - this.head = null; - this.tail = null; - this.length = 0; - } - - BufferList.prototype.push = function push(v) { - var entry = { data: v, next: null }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - }; - - BufferList.prototype.unshift = function unshift(v) { - var entry = { data: v, next: this.head }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - }; - - BufferList.prototype.shift = function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - }; - - BufferList.prototype.clear = function clear() { - this.head = this.tail = null; - this.length = 0; - }; - - BufferList.prototype.join = function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) { - ret += s + p.data; - }return ret; - }; - - BufferList.prototype.concat = function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - if (this.length === 1) return this.head.data; - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; - }; - - return BufferList; -}(); - -if (util && util.inspect && util.inspect.custom) { - module.exports.prototype[util.inspect.custom] = function () { - var obj = util.inspect({ length: this.length }); - return this.constructor.name + ' ' + obj; - }; -} \ No newline at end of file diff --git a/node_modules/through2/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/through2/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index 5a0a0d88..00000000 --- a/node_modules/through2/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { - pna.nextTick(emitErrorNT, this, err); - } - return this; - } - - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; - } - - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - pna.nextTick(emitErrorNT, _this, err); - if (_this._writableState) { - _this._writableState.errorEmitted = true; - } - } else if (cb) { - cb(err); - } - }); - - return this; -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy -}; \ No newline at end of file diff --git a/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3fd..00000000 --- a/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b6..00000000 --- a/node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/through2/node_modules/readable-stream/package.json deleted file mode 100644 index da0ad729..00000000 --- a/node_modules/through2/node_modules/readable-stream/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "readable-stream@~2.3.6", - "_id": "readable-stream@2.3.7", - "_inBundle": false, - "_integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "_location": "/through2/readable-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "readable-stream@~2.3.6", - "name": "readable-stream", - "escapedName": "readable-stream", - "rawSpec": "~2.3.6", - "saveSpec": null, - "fetchSpec": "~2.3.6" - }, - "_requiredBy": [ - "/through2" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "_shasum": "1eca1cf711aef814c04f62252a36a62f6cb23b57", - "_spec": "readable-stream@~2.3.6", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/through2", - "browser": { - "util": false, - "./readable.js": "./readable-browser.js", - "./writable.js": "./writable-browser.js", - "./duplex.js": "./duplex-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "deprecated": false, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "assert": "^1.4.0", - "babel-polyfill": "^6.9.1", - "buffer": "^4.9.0", - "lolex": "^2.3.2", - "nyc": "^6.4.0", - "tap": "^0.7.0", - "tape": "^4.8.0" - }, - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "name": "readable-stream", - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov", - "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js" - }, - "version": "2.3.7" -} diff --git a/node_modules/through2/node_modules/readable-stream/passthrough.js b/node_modules/through2/node_modules/readable-stream/passthrough.js deleted file mode 100644 index ffd791d7..00000000 --- a/node_modules/through2/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').PassThrough diff --git a/node_modules/through2/node_modules/readable-stream/readable-browser.js b/node_modules/through2/node_modules/readable-stream/readable-browser.js deleted file mode 100644 index e5037259..00000000 --- a/node_modules/through2/node_modules/readable-stream/readable-browser.js +++ /dev/null @@ -1,7 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/through2/node_modules/readable-stream/readable.js b/node_modules/through2/node_modules/readable-stream/readable.js deleted file mode 100644 index ec89ec53..00000000 --- a/node_modules/through2/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,19 +0,0 @@ -var Stream = require('stream'); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; - exports = module.exports = Stream.Readable; - exports.Readable = Stream.Readable; - exports.Writable = Stream.Writable; - exports.Duplex = Stream.Duplex; - exports.Transform = Stream.Transform; - exports.PassThrough = Stream.PassThrough; - exports.Stream = Stream; -} else { - exports = module.exports = require('./lib/_stream_readable.js'); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = require('./lib/_stream_writable.js'); - exports.Duplex = require('./lib/_stream_duplex.js'); - exports.Transform = require('./lib/_stream_transform.js'); - exports.PassThrough = require('./lib/_stream_passthrough.js'); -} diff --git a/node_modules/through2/node_modules/readable-stream/transform.js b/node_modules/through2/node_modules/readable-stream/transform.js deleted file mode 100644 index b1baba26..00000000 --- a/node_modules/through2/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Transform diff --git a/node_modules/through2/node_modules/readable-stream/writable-browser.js b/node_modules/through2/node_modules/readable-stream/writable-browser.js deleted file mode 100644 index ebdde6a8..00000000 --- a/node_modules/through2/node_modules/readable-stream/writable-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_writable.js'); diff --git a/node_modules/through2/node_modules/readable-stream/writable.js b/node_modules/through2/node_modules/readable-stream/writable.js deleted file mode 100644 index 3211a6f8..00000000 --- a/node_modules/through2/node_modules/readable-stream/writable.js +++ /dev/null @@ -1,8 +0,0 @@ -var Stream = require("stream") -var Writable = require("./lib/_stream_writable.js") - -if (process.env.READABLE_STREAM === 'disable') { - module.exports = Stream && Stream.Writable || Writable -} else { - module.exports = Writable -} diff --git a/node_modules/through2/node_modules/safe-buffer/LICENSE b/node_modules/through2/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068cee..00000000 --- a/node_modules/through2/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/through2/node_modules/safe-buffer/README.md b/node_modules/through2/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81afd..00000000 --- a/node_modules/through2/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) - - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) - - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) - - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) - - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) - - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/node_modules/through2/node_modules/safe-buffer/index.d.ts b/node_modules/through2/node_modules/safe-buffer/index.d.ts deleted file mode 100644 index e9fed809..00000000 --- a/node_modules/through2/node_modules/safe-buffer/index.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "safe-buffer" { - export class Buffer { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - } -} \ No newline at end of file diff --git a/node_modules/through2/node_modules/safe-buffer/index.js b/node_modules/through2/node_modules/safe-buffer/index.js deleted file mode 100644 index 22438dab..00000000 --- a/node_modules/through2/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/node_modules/through2/node_modules/safe-buffer/package.json b/node_modules/through2/node_modules/safe-buffer/package.json deleted file mode 100644 index 8a45e577..00000000 --- a/node_modules/through2/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "safe-buffer@~5.1.1", - "_id": "safe-buffer@5.1.2", - "_inBundle": false, - "_integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "_location": "/through2/safe-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "safe-buffer@~5.1.1", - "name": "safe-buffer", - "escapedName": "safe-buffer", - "rawSpec": "~5.1.1", - "saveSpec": null, - "fetchSpec": "~5.1.1" - }, - "_requiredBy": [ - "/through2/readable-stream", - "/through2/string_decoder" - ], - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "_shasum": "991ec69d296e0313747d59bdfd2b745c35f8828d", - "_spec": "safe-buffer@~5.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/through2/node_modules/readable-stream", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Safer Node.js Buffer API", - "devDependencies": { - "standard": "*", - "tape": "^4.0.0" - }, - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "name": "safe-buffer", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "types": "index.d.ts", - "version": "5.1.2" -} diff --git a/node_modules/through2/node_modules/string_decoder/.travis.yml b/node_modules/through2/node_modules/string_decoder/.travis.yml deleted file mode 100644 index 3347a725..00000000 --- a/node_modules/through2/node_modules/string_decoder/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test diff --git a/node_modules/through2/node_modules/string_decoder/LICENSE b/node_modules/through2/node_modules/string_decoder/LICENSE deleted file mode 100644 index 778edb20..00000000 --- a/node_modules/through2/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - diff --git a/node_modules/through2/node_modules/string_decoder/README.md b/node_modules/through2/node_modules/string_decoder/README.md deleted file mode 100644 index 5fd58315..00000000 --- a/node_modules/through2/node_modules/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# string_decoder - -***Node-core v8.9.4 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. - -## Streams Working Group - -`string_decoder` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -See [readable-stream](https://github.com/nodejs/readable-stream) for -more details. diff --git a/node_modules/through2/node_modules/string_decoder/lib/string_decoder.js b/node_modules/through2/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63f..00000000 --- a/node_modules/through2/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var Buffer = require('safe-buffer').Buffer; -/**/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/node_modules/through2/node_modules/string_decoder/package.json b/node_modules/through2/node_modules/string_decoder/package.json deleted file mode 100644 index 01f1a809..00000000 --- a/node_modules/through2/node_modules/string_decoder/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "string_decoder@~1.1.1", - "_id": "string_decoder@1.1.1", - "_inBundle": false, - "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "_location": "/through2/string_decoder", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "string_decoder@~1.1.1", - "name": "string_decoder", - "escapedName": "string_decoder", - "rawSpec": "~1.1.1", - "saveSpec": null, - "fetchSpec": "~1.1.1" - }, - "_requiredBy": [ - "/through2/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8", - "_spec": "string_decoder@~1.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/through2/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/nodejs/string_decoder/issues" - }, - "bundleDependencies": false, - "dependencies": { - "safe-buffer": "~5.1.0" - }, - "deprecated": false, - "description": "The string_decoder module from Node core", - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "lib/string_decoder.js", - "name": "string_decoder", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "test": "tap test/parallel/*.js && node test/verify-dependencies" - }, - "version": "1.1.1" -} diff --git a/node_modules/through2/package.json b/node_modules/through2/package.json deleted file mode 100644 index 88f0bc8e..00000000 --- a/node_modules/through2/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_from": "through2@^2.0.0", - "_id": "through2@2.0.5", - "_inBundle": false, - "_integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "_location": "/through2", - "_phantomChildren": { - "core-util-is": "1.0.2", - "inherits": "2.0.4", - "isarray": "1.0.0", - "process-nextick-args": "2.0.1", - "util-deprecate": "1.0.2" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "through2@^2.0.0", - "name": "through2", - "escapedName": "through2", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/fs-mkdirp-stream", - "/gulp-vinyl-zip", - "/remove-bom-stream", - "/through2-filter", - "/to-through", - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "_shasum": "01c1e39eb31d07cb7d03a96a70823260b23132cd", - "_spec": "through2@^2.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs", - "author": { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - "bugs": { - "url": "https://github.com/rvagg/through2/issues" - }, - "bundleDependencies": false, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - }, - "deprecated": false, - "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", - "devDependencies": { - "bl": "~2.0.1", - "faucet": "0.0.1", - "nyc": "~13.1.0", - "safe-buffer": "~5.1.2", - "stream-spigot": "~3.0.6", - "tape": "~4.9.1" - }, - "homepage": "https://github.com/rvagg/through2#readme", - "keywords": [ - "stream", - "streams2", - "through", - "transform" - ], - "license": "MIT", - "main": "through2.js", - "name": "through2", - "repository": { - "type": "git", - "url": "git+https://github.com/rvagg/through2.git" - }, - "scripts": { - "test": "node test/test.js | faucet" - }, - "version": "2.0.5" -} diff --git a/node_modules/through2/through2.js b/node_modules/through2/through2.js deleted file mode 100644 index 6baa6a1e..00000000 --- a/node_modules/through2/through2.js +++ /dev/null @@ -1,96 +0,0 @@ -var Transform = require('readable-stream').Transform - , inherits = require('util').inherits - , xtend = require('xtend') - -function DestroyableTransform(opts) { - Transform.call(this, opts) - this._destroyed = false -} - -inherits(DestroyableTransform, Transform) - -DestroyableTransform.prototype.destroy = function(err) { - if (this._destroyed) return - this._destroyed = true - - var self = this - process.nextTick(function() { - if (err) - self.emit('error', err) - self.emit('close') - }) -} - -// a noop _transform function -function noop (chunk, enc, callback) { - callback(null, chunk) -} - - -// create a new export function, used by both the main export and -// the .ctor export, contains common logic for dealing with arguments -function through2 (construct) { - return function (options, transform, flush) { - if (typeof options == 'function') { - flush = transform - transform = options - options = {} - } - - if (typeof transform != 'function') - transform = noop - - if (typeof flush != 'function') - flush = null - - return construct(options, transform, flush) - } -} - - -// main export, just make me a transform stream! -module.exports = through2(function (options, transform, flush) { - var t2 = new DestroyableTransform(options) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) - - -// make me a reusable prototype that I can `new`, or implicitly `new` -// with a constructor call -module.exports.ctor = through2(function (options, transform, flush) { - function Through2 (override) { - if (!(this instanceof Through2)) - return new Through2(override) - - this.options = xtend(options, override) - - DestroyableTransform.call(this, this.options) - } - - inherits(Through2, DestroyableTransform) - - Through2.prototype._transform = transform - - if (flush) - Through2.prototype._flush = flush - - return Through2 -}) - - -module.exports.obj = through2(function (options, transform, flush) { - var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) diff --git a/node_modules/to-absolute-glob/LICENSE b/node_modules/to-absolute-glob/LICENSE deleted file mode 100644 index 65251717..00000000 --- a/node_modules/to-absolute-glob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2016, Jon Schlinkert - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/to-absolute-glob/index.js b/node_modules/to-absolute-glob/index.js deleted file mode 100644 index 268fc478..00000000 --- a/node_modules/to-absolute-glob/index.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; - -var path = require('path'); -var isNegated = require('is-negated-glob'); -var isAbsolute = require('is-absolute'); - -module.exports = function(glob, options) { - // default options - var opts = options || {}; - - // ensure cwd is absolute - var cwd = path.resolve(opts.cwd ? opts.cwd : process.cwd()); - cwd = unixify(cwd); - - var rootDir = opts.root; - // if `options.root` is defined, ensure it's absolute - if (rootDir) { - rootDir = unixify(rootDir); - if (process.platform === 'win32' || !isAbsolute(rootDir)) { - rootDir = unixify(path.resolve(rootDir)); - } - } - - // trim starting ./ from glob patterns - if (glob.slice(0, 2) === './') { - glob = glob.slice(2); - } - - // when the glob pattern is only a . use an empty string - if (glob.length === 1 && glob === '.') { - glob = ''; - } - - // store last character before glob is modified - var suffix = glob.slice(-1); - - // check to see if glob is negated (and not a leading negated-extglob) - var ing = isNegated(glob); - glob = ing.pattern; - - // make glob absolute - if (rootDir && glob.charAt(0) === '/') { - glob = join(rootDir, glob); - } else if (!isAbsolute(glob) || glob.slice(0, 1) === '\\') { - glob = join(cwd, glob); - } - - // if glob had a trailing `/`, re-add it now in case it was removed - if (suffix === '/' && glob.slice(-1) !== '/') { - glob += '/'; - } - - // re-add leading `!` if it was removed - return ing.negated ? '!' + glob : glob; -}; - -function unixify(filepath) { - return filepath.replace(/\\/g, '/'); -} - -function join(dir, glob) { - if (dir.charAt(dir.length - 1) === '/') { - dir = dir.slice(0, -1); - } - if (glob.charAt(0) === '/') { - glob = glob.slice(1); - } - if (!glob) return dir; - return dir + '/' + glob; -} diff --git a/node_modules/to-absolute-glob/package.json b/node_modules/to-absolute-glob/package.json deleted file mode 100644 index 63602274..00000000 --- a/node_modules/to-absolute-glob/package.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "_from": "to-absolute-glob@^2.0.0", - "_id": "to-absolute-glob@2.0.2", - "_inBundle": false, - "_integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", - "_location": "/to-absolute-glob", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "to-absolute-glob@^2.0.0", - "name": "to-absolute-glob", - "escapedName": "to-absolute-glob", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/glob-stream" - ], - "_resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", - "_shasum": "1865f43d9e74b0822db9f145b78cff7d0f7c849b", - "_spec": "to-absolute-glob@^2.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/glob-stream", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/to-absolute-glob/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://twitter.com/BlaineBublitz" - }, - { - "name": "Brian Woodward", - "email": "brian.woodward@gmail.com", - "url": "https://github.com/doowb" - }, - { - "name": "Erik Kemperman", - "url": "https://github.com/erikkemperman" - }, - { - "name": "Jon Schlinkert", - "email": "jon.schlinkert@sellside.com", - "url": "http://twitter.com/jonschlinkert" - } - ], - "dependencies": { - "is-absolute": "^1.0.0", - "is-negated-glob": "^1.0.0" - }, - "deprecated": false, - "description": "Make a glob pattern absolute, ensuring that negative globs and patterns with trailing slashes are correctly handled.", - "devDependencies": { - "gulp-format-md": "^0.1.11", - "mocha": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/to-absolute-glob", - "keywords": [ - "absolute", - "file", - "filepath", - "glob", - "negate", - "negative", - "path", - "pattern", - "resolve", - "to" - ], - "license": "MIT", - "main": "index.js", - "name": "to-absolute-glob", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/to-absolute-glob.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "related": { - "list": [ - "has-glob", - "is-glob", - "is-valid-glob" - ] - }, - "reflinks": [ - "verb", - "verb-generate-readme" - ] - }, - "version": "2.0.2" -} diff --git a/node_modules/to-absolute-glob/readme.md b/node_modules/to-absolute-glob/readme.md deleted file mode 100644 index d93fbeda..00000000 --- a/node_modules/to-absolute-glob/readme.md +++ /dev/null @@ -1,155 +0,0 @@ -# to-absolute-glob [![NPM version](https://img.shields.io/npm/v/to-absolute-glob.svg?style=flat)](https://www.npmjs.com/package/to-absolute-glob) [![NPM downloads](https://img.shields.io/npm/dm/to-absolute-glob.svg?style=flat)](https://npmjs.org/package/to-absolute-glob) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/to-absolute-glob.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/to-absolute-glob) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/to-absolute-glob.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/to-absolute-glob) - -> Make a glob pattern absolute, ensuring that negative globs and patterns with trailing slashes are correctly handled. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save to-absolute-glob -``` - -## Usage - -```js -var toAbsGlob = require('to-absolute-glob'); -toAbsGlob('a/*.js'); -//=> '/dev/foo/a/*.js' -``` - -## Examples - -Given the current project folder (cwd) is `/dev/foo/`: - -**makes a path absolute** - -```js -toAbsGlob('a'); -//=> '/dev/foo/a' -``` - -**makes a glob absolute** - -```js -toAbsGlob('a/*.js'); -//=> '/dev/foo/a/*.js' -``` - -**retains trailing slashes** - -```js -toAbsGlob('a/*/'); -//=> '/dev/foo/a/*/' -``` - -**retains trailing slashes with cwd** - -```js -toAbsGlob('./fixtures/whatsgoingon/*/', {cwd: __dirname}); -//=> '/dev/foo/' -``` - -**makes a negative glob absolute** - -```js -toAbsGlob('!a/*.js'); -//=> '!/dev/foo/a/*.js' -``` - -**from a cwd** - -```js -toAbsGlob('a/*.js', {cwd: 'foo'}); -//=> '/dev/foo/foo/a/*.js' -``` - -**makes a negative glob absolute from a cwd** - -```js -toAbsGlob('!a/*.js', {cwd: 'foo'}); -//=> '!/dev/foo/foo/a/*.js' -``` - -**from a root path** - -```js -toAbsGlob('/a/*.js', {root: 'baz'}); -//=> '/dev/foo/baz/a/*.js' -``` - -**from a root slash** - -```js -toAbsGlob('/a/*.js', {root: '/'}); -//=> '/dev/foo/a/*.js' -``` - -**from a negative root path** - -```js -toAbsGlob('!/a/*.js', {root: 'baz'}); -//=> '!/dev/foo/baz/a/*.js' -``` - -**from a negative root slash** - -```js -toAbsGlob('!/a/*.js', {root: '/'}); -//=> '!/dev/foo/a/*.js' -``` - -## About - -### Related projects - -* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob "Returns `true` if an array has a glob pattern.") -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") -* [is-valid-glob](https://www.npmjs.com/package/is-valid-glob): Return true if a value is a valid glob pattern or patterns. | [homepage](https://github.com/jonschlinkert/is-valid-glob "Return true if a value is a valid glob pattern or patterns.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor**
    | -| --- | --- | -| 16 | [doowb](https://github.com/doowb) | -| 15 | [jonschlinkert](https://github.com/jonschlinkert) | -| 1 | [phated](https://github.com/phated) | -| 1 | [erikkemperman](https://github.com/erikkemperman) | - -### Building docs - -_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ - -To generate the readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install -g verb verb-generate-readme && verb -``` - -### Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -### License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/to-absolute-glob/blob/master/LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 17, 2016._ \ No newline at end of file diff --git a/node_modules/to-regex-range/LICENSE b/node_modules/to-regex-range/LICENSE deleted file mode 100644 index 7cccaf9e..00000000 --- a/node_modules/to-regex-range/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-present, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/to-regex-range/README.md b/node_modules/to-regex-range/README.md deleted file mode 100644 index 38887daf..00000000 --- a/node_modules/to-regex-range/README.md +++ /dev/null @@ -1,305 +0,0 @@ -# to-regex-range [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/to-regex-range.svg?style=flat)](https://www.npmjs.com/package/to-regex-range) [![NPM monthly downloads](https://img.shields.io/npm/dm/to-regex-range.svg?style=flat)](https://npmjs.org/package/to-regex-range) [![NPM total downloads](https://img.shields.io/npm/dt/to-regex-range.svg?style=flat)](https://npmjs.org/package/to-regex-range) [![Linux Build Status](https://img.shields.io/travis/micromatch/to-regex-range.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/to-regex-range) - -> Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save to-regex-range -``` - -
    -What does this do? - -
    - -This libary generates the `source` string to be passed to `new RegExp()` for matching a range of numbers. - -**Example** - -```js -const toRegexRange = require('to-regex-range'); -const regex = new RegExp(toRegexRange('15', '95')); -``` - -A string is returned so that you can do whatever you need with it before passing it to `new RegExp()` (like adding `^` or `$` boundaries, defining flags, or combining it another string). - -
    - -
    - -
    -Why use this library? - -
    - -### Convenience - -Creating regular expressions for matching numbers gets deceptively complicated pretty fast. - -For example, let's say you need a validation regex for matching part of a user-id, postal code, social security number, tax id, etc: - -* regex for matching `1` => `/1/` (easy enough) -* regex for matching `1` through `5` => `/[1-5]/` (not bad...) -* regex for matching `1` or `5` => `/(1|5)/` (still easy...) -* regex for matching `1` through `50` => `/([1-9]|[1-4][0-9]|50)/` (uh-oh...) -* regex for matching `1` through `55` => `/([1-9]|[1-4][0-9]|5[0-5])/` (no prob, I can do this...) -* regex for matching `1` through `555` => `/([1-9]|[1-9][0-9]|[1-4][0-9]{2}|5[0-4][0-9]|55[0-5])/` (maybe not...) -* regex for matching `0001` through `5555` => `/(0{3}[1-9]|0{2}[1-9][0-9]|0[1-9][0-9]{2}|[1-4][0-9]{3}|5[0-4][0-9]{2}|55[0-4][0-9]|555[0-5])/` (okay, I get the point!) - -The numbers are contrived, but they're also really basic. In the real world you might need to generate a regex on-the-fly for validation. - -**Learn more** - -If you're interested in learning more about [character classes](http://www.regular-expressions.info/charclass.html) and other regex features, I personally have always found [regular-expressions.info](http://www.regular-expressions.info/charclass.html) to be pretty useful. - -### Heavily tested - -As of April 07, 2019, this library runs [>1m test assertions](./test/test.js) against generated regex-ranges to provide brute-force verification that results are correct. - -Tests run in ~280ms on my MacBook Pro, 2.5 GHz Intel Core i7. - -### Optimized - -Generated regular expressions are optimized: - -* duplicate sequences and character classes are reduced using quantifiers -* smart enough to use `?` conditionals when number(s) or range(s) can be positive or negative -* uses fragment caching to avoid processing the same exact string more than once - -
    - -
    - -## Usage - -Add this library to your javascript application with the following line of code - -```js -const toRegexRange = require('to-regex-range'); -``` - -The main export is a function that takes two integers: the `min` value and `max` value (formatted as strings or numbers). - -```js -const source = toRegexRange('15', '95'); -//=> 1[5-9]|[2-8][0-9]|9[0-5] - -const regex = new RegExp(`^${source}$`); -console.log(regex.test('14')); //=> false -console.log(regex.test('50')); //=> true -console.log(regex.test('94')); //=> true -console.log(regex.test('96')); //=> false -``` - -## Options - -### options.capture - -**Type**: `boolean` - -**Deafault**: `undefined` - -Wrap the returned value in parentheses when there is more than one regex condition. Useful when you're dynamically generating ranges. - -```js -console.log(toRegexRange('-10', '10')); -//=> -[1-9]|-?10|[0-9] - -console.log(toRegexRange('-10', '10', { capture: true })); -//=> (-[1-9]|-?10|[0-9]) -``` - -### options.shorthand - -**Type**: `boolean` - -**Deafault**: `undefined` - -Use the regex shorthand for `[0-9]`: - -```js -console.log(toRegexRange('0', '999999')); -//=> [0-9]|[1-9][0-9]{1,5} - -console.log(toRegexRange('0', '999999', { shorthand: true })); -//=> \d|[1-9]\d{1,5} -``` - -### options.relaxZeros - -**Type**: `boolean` - -**Default**: `true` - -This option relaxes matching for leading zeros when when ranges are zero-padded. - -```js -const source = toRegexRange('-0010', '0010'); -const regex = new RegExp(`^${source}$`); -console.log(regex.test('-10')); //=> true -console.log(regex.test('-010')); //=> true -console.log(regex.test('-0010')); //=> true -console.log(regex.test('10')); //=> true -console.log(regex.test('010')); //=> true -console.log(regex.test('0010')); //=> true -``` - -When `relaxZeros` is false, matching is strict: - -```js -const source = toRegexRange('-0010', '0010', { relaxZeros: false }); -const regex = new RegExp(`^${source}$`); -console.log(regex.test('-10')); //=> false -console.log(regex.test('-010')); //=> false -console.log(regex.test('-0010')); //=> true -console.log(regex.test('10')); //=> false -console.log(regex.test('010')); //=> false -console.log(regex.test('0010')); //=> true -``` - -## Examples - -| **Range** | **Result** | **Compile time** | -| --- | --- | --- | -| `toRegexRange(-10, 10)` | `-[1-9]\|-?10\|[0-9]` | _132μs_ | -| `toRegexRange(-100, -10)` | `-1[0-9]\|-[2-9][0-9]\|-100` | _50μs_ | -| `toRegexRange(-100, 100)` | `-[1-9]\|-?[1-9][0-9]\|-?100\|[0-9]` | _42μs_ | -| `toRegexRange(001, 100)` | `0{0,2}[1-9]\|0?[1-9][0-9]\|100` | _109μs_ | -| `toRegexRange(001, 555)` | `0{0,2}[1-9]\|0?[1-9][0-9]\|[1-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _51μs_ | -| `toRegexRange(0010, 1000)` | `0{0,2}1[0-9]\|0{0,2}[2-9][0-9]\|0?[1-9][0-9]{2}\|1000` | _31μs_ | -| `toRegexRange(1, 50)` | `[1-9]\|[1-4][0-9]\|50` | _24μs_ | -| `toRegexRange(1, 55)` | `[1-9]\|[1-4][0-9]\|5[0-5]` | _23μs_ | -| `toRegexRange(1, 555)` | `[1-9]\|[1-9][0-9]\|[1-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _30μs_ | -| `toRegexRange(1, 5555)` | `[1-9]\|[1-9][0-9]{1,2}\|[1-4][0-9]{3}\|5[0-4][0-9]{2}\|55[0-4][0-9]\|555[0-5]` | _43μs_ | -| `toRegexRange(111, 555)` | `11[1-9]\|1[2-9][0-9]\|[2-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _38μs_ | -| `toRegexRange(29, 51)` | `29\|[34][0-9]\|5[01]` | _24μs_ | -| `toRegexRange(31, 877)` | `3[1-9]\|[4-9][0-9]\|[1-7][0-9]{2}\|8[0-6][0-9]\|87[0-7]` | _32μs_ | -| `toRegexRange(5, 5)` | `5` | _8μs_ | -| `toRegexRange(5, 6)` | `5\|6` | _11μs_ | -| `toRegexRange(1, 2)` | `1\|2` | _6μs_ | -| `toRegexRange(1, 5)` | `[1-5]` | _15μs_ | -| `toRegexRange(1, 10)` | `[1-9]\|10` | _22μs_ | -| `toRegexRange(1, 100)` | `[1-9]\|[1-9][0-9]\|100` | _25μs_ | -| `toRegexRange(1, 1000)` | `[1-9]\|[1-9][0-9]{1,2}\|1000` | _31μs_ | -| `toRegexRange(1, 10000)` | `[1-9]\|[1-9][0-9]{1,3}\|10000` | _34μs_ | -| `toRegexRange(1, 100000)` | `[1-9]\|[1-9][0-9]{1,4}\|100000` | _36μs_ | -| `toRegexRange(1, 1000000)` | `[1-9]\|[1-9][0-9]{1,5}\|1000000` | _42μs_ | -| `toRegexRange(1, 10000000)` | `[1-9]\|[1-9][0-9]{1,6}\|10000000` | _42μs_ | - -## Heads up! - -**Order of arguments** - -When the `min` is larger than the `max`, values will be flipped to create a valid range: - -```js -toRegexRange('51', '29'); -``` - -Is effectively flipped to: - -```js -toRegexRange('29', '51'); -//=> 29|[3-4][0-9]|5[0-1] -``` - -**Steps / increments** - -This library does not support steps (increments). A pr to add support would be welcome. - -## History - -### v2.0.0 - 2017-04-21 - -**New features** - -Adds support for zero-padding! - -### v1.0.0 - -**Optimizations** - -Repeating ranges are now grouped using quantifiers. rocessing time is roughly the same, but the generated regex is much smaller, which should result in faster matching. - -## Attribution - -Inspired by the python library [range-regex](https://github.com/dimka665/range-regex). - -## About - -
    -Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
    - -
    -Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
    - -
    -Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
    - -### Related projects - -You might also be interested in these projects: - -* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used by micromatch.") -* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") -* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") -* [repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element "Create an array by repeating the given value n times.") -* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 63 | [jonschlinkert](https://github.com/jonschlinkert) | -| 3 | [doowb](https://github.com/doowb) | -| 2 | [realityking](https://github.com/realityking) | - -### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -Please consider supporting me on Patreon, or [start your own Patreon page](https://patreon.com/invite/bxpbvm)! - - - - - -### License - -Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 07, 2019._ \ No newline at end of file diff --git a/node_modules/to-regex-range/index.js b/node_modules/to-regex-range/index.js deleted file mode 100644 index 77fbaced..00000000 --- a/node_modules/to-regex-range/index.js +++ /dev/null @@ -1,288 +0,0 @@ -/*! - * to-regex-range - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -const isNumber = require('is-number'); - -const toRegexRange = (min, max, options) => { - if (isNumber(min) === false) { - throw new TypeError('toRegexRange: expected the first argument to be a number'); - } - - if (max === void 0 || min === max) { - return String(min); - } - - if (isNumber(max) === false) { - throw new TypeError('toRegexRange: expected the second argument to be a number.'); - } - - let opts = { relaxZeros: true, ...options }; - if (typeof opts.strictZeros === 'boolean') { - opts.relaxZeros = opts.strictZeros === false; - } - - let relax = String(opts.relaxZeros); - let shorthand = String(opts.shorthand); - let capture = String(opts.capture); - let wrap = String(opts.wrap); - let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap; - - if (toRegexRange.cache.hasOwnProperty(cacheKey)) { - return toRegexRange.cache[cacheKey].result; - } - - let a = Math.min(min, max); - let b = Math.max(min, max); - - if (Math.abs(a - b) === 1) { - let result = min + '|' + max; - if (opts.capture) { - return `(${result})`; - } - if (opts.wrap === false) { - return result; - } - return `(?:${result})`; - } - - let isPadded = hasPadding(min) || hasPadding(max); - let state = { min, max, a, b }; - let positives = []; - let negatives = []; - - if (isPadded) { - state.isPadded = isPadded; - state.maxLen = String(state.max).length; - } - - if (a < 0) { - let newMin = b < 0 ? Math.abs(b) : 1; - negatives = splitToPatterns(newMin, Math.abs(a), state, opts); - a = state.a = 0; - } - - if (b >= 0) { - positives = splitToPatterns(a, b, state, opts); - } - - state.negatives = negatives; - state.positives = positives; - state.result = collatePatterns(negatives, positives, opts); - - if (opts.capture === true) { - state.result = `(${state.result})`; - } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) { - state.result = `(?:${state.result})`; - } - - toRegexRange.cache[cacheKey] = state; - return state.result; -}; - -function collatePatterns(neg, pos, options) { - let onlyNegative = filterPatterns(neg, pos, '-', false, options) || []; - let onlyPositive = filterPatterns(pos, neg, '', false, options) || []; - let intersected = filterPatterns(neg, pos, '-?', true, options) || []; - let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); - return subpatterns.join('|'); -} - -function splitToRanges(min, max) { - let nines = 1; - let zeros = 1; - - let stop = countNines(min, nines); - let stops = new Set([max]); - - while (min <= stop && stop <= max) { - stops.add(stop); - nines += 1; - stop = countNines(min, nines); - } - - stop = countZeros(max + 1, zeros) - 1; - - while (min < stop && stop <= max) { - stops.add(stop); - zeros += 1; - stop = countZeros(max + 1, zeros) - 1; - } - - stops = [...stops]; - stops.sort(compare); - return stops; -} - -/** - * Convert a range to a regex pattern - * @param {Number} `start` - * @param {Number} `stop` - * @return {String} - */ - -function rangeToPattern(start, stop, options) { - if (start === stop) { - return { pattern: start, count: [], digits: 0 }; - } - - let zipped = zip(start, stop); - let digits = zipped.length; - let pattern = ''; - let count = 0; - - for (let i = 0; i < digits; i++) { - let [startDigit, stopDigit] = zipped[i]; - - if (startDigit === stopDigit) { - pattern += startDigit; - - } else if (startDigit !== '0' || stopDigit !== '9') { - pattern += toCharacterClass(startDigit, stopDigit, options); - - } else { - count++; - } - } - - if (count) { - pattern += options.shorthand === true ? '\\d' : '[0-9]'; - } - - return { pattern, count: [count], digits }; -} - -function splitToPatterns(min, max, tok, options) { - let ranges = splitToRanges(min, max); - let tokens = []; - let start = min; - let prev; - - for (let i = 0; i < ranges.length; i++) { - let max = ranges[i]; - let obj = rangeToPattern(String(start), String(max), options); - let zeros = ''; - - if (!tok.isPadded && prev && prev.pattern === obj.pattern) { - if (prev.count.length > 1) { - prev.count.pop(); - } - - prev.count.push(obj.count[0]); - prev.string = prev.pattern + toQuantifier(prev.count); - start = max + 1; - continue; - } - - if (tok.isPadded) { - zeros = padZeros(max, tok, options); - } - - obj.string = zeros + obj.pattern + toQuantifier(obj.count); - tokens.push(obj); - start = max + 1; - prev = obj; - } - - return tokens; -} - -function filterPatterns(arr, comparison, prefix, intersection, options) { - let result = []; - - for (let ele of arr) { - let { string } = ele; - - // only push if _both_ are negative... - if (!intersection && !contains(comparison, 'string', string)) { - result.push(prefix + string); - } - - // or _both_ are positive - if (intersection && contains(comparison, 'string', string)) { - result.push(prefix + string); - } - } - return result; -} - -/** - * Zip strings - */ - -function zip(a, b) { - let arr = []; - for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); - return arr; -} - -function compare(a, b) { - return a > b ? 1 : b > a ? -1 : 0; -} - -function contains(arr, key, val) { - return arr.some(ele => ele[key] === val); -} - -function countNines(min, len) { - return Number(String(min).slice(0, -len) + '9'.repeat(len)); -} - -function countZeros(integer, zeros) { - return integer - (integer % Math.pow(10, zeros)); -} - -function toQuantifier(digits) { - let [start = 0, stop = ''] = digits; - if (stop || start > 1) { - return `{${start + (stop ? ',' + stop : '')}}`; - } - return ''; -} - -function toCharacterClass(a, b, options) { - return `[${a}${(b - a === 1) ? '' : '-'}${b}]`; -} - -function hasPadding(str) { - return /^-?(0+)\d/.test(str); -} - -function padZeros(value, tok, options) { - if (!tok.isPadded) { - return value; - } - - let diff = Math.abs(tok.maxLen - String(value).length); - let relax = options.relaxZeros !== false; - - switch (diff) { - case 0: - return ''; - case 1: - return relax ? '0?' : '0'; - case 2: - return relax ? '0{0,2}' : '00'; - default: { - return relax ? `0{0,${diff}}` : `0{${diff}}`; - } - } -} - -/** - * Cache - */ - -toRegexRange.cache = {}; -toRegexRange.clearCache = () => (toRegexRange.cache = {}); - -/** - * Expose `toRegexRange` - */ - -module.exports = toRegexRange; diff --git a/node_modules/to-regex-range/package.json b/node_modules/to-regex-range/package.json deleted file mode 100644 index afa9acca..00000000 --- a/node_modules/to-regex-range/package.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "_from": "to-regex-range@^5.0.1", - "_id": "to-regex-range@5.0.1", - "_inBundle": false, - "_integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "_location": "/to-regex-range", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "to-regex-range@^5.0.1", - "name": "to-regex-range", - "escapedName": "to-regex-range", - "rawSpec": "^5.0.1", - "saveSpec": null, - "fetchSpec": "^5.0.1" - }, - "_requiredBy": [ - "/fill-range" - ], - "_resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "_shasum": "1648c44aae7c8d988a326018ed72f5b4dd0392e4", - "_spec": "to-regex-range@^5.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/fill-range", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/micromatch/to-regex-range/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Rouven Weßling", - "url": "www.rouvenwessling.de" - } - ], - "dependencies": { - "is-number": "^7.0.0" - }, - "deprecated": false, - "description": "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.", - "devDependencies": { - "fill-range": "^6.0.0", - "gulp-format-md": "^2.0.0", - "mocha": "^6.0.2", - "text-table": "^0.2.0", - "time-diff": "^0.3.1" - }, - "engines": { - "node": ">=8.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/micromatch/to-regex-range", - "keywords": [ - "bash", - "date", - "expand", - "expansion", - "expression", - "glob", - "match", - "match date", - "match number", - "match numbers", - "match year", - "matches", - "matching", - "number", - "numbers", - "numerical", - "range", - "ranges", - "regex", - "regexp", - "regular", - "regular expression", - "sequence" - ], - "license": "MIT", - "main": "index.js", - "name": "to-regex-range", - "repository": { - "type": "git", - "url": "git+https://github.com/micromatch/to-regex-range.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "layout": "default", - "toc": false, - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "helpers": { - "examples": { - "displayName": "examples" - } - }, - "related": { - "list": [ - "expand-range", - "fill-range", - "micromatch", - "repeat-element", - "repeat-string" - ] - } - }, - "version": "5.0.1" -} diff --git a/node_modules/to-through/LICENSE b/node_modules/to-through/LICENSE deleted file mode 100644 index b8fc7433..00000000 --- a/node_modules/to-through/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Blaine Bublitz , Eric Schoffstall and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/to-through/README.md b/node_modules/to-through/README.md deleted file mode 100644 index 0c02b7cc..00000000 --- a/node_modules/to-through/README.md +++ /dev/null @@ -1,56 +0,0 @@ -

    - - - -

    - -# to-through - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] - -Wrap a ReadableStream in a TransformStream. - -## Usage - -```js -var from = require('from2'); -var concat = require('concat-stream'); -var toThrough = require('to-through'); - -var readable = from([' ', 'hello', ' ', 'world']); - -// Can be used as a Readable or Transform -var maybeTransform = toThrough(readable); - -from(['hi', ' ', 'there', ',']) - .pipe(maybeTransform) - .pipe(concat(function(result) { - // result.toString() === 'hi there, hello world' - })); -``` - -## API - -### `toThrough(readableStream)` - -Takes a `readableStream` as the only argument and returns a `through2` stream. If the returned stream is piped before `nextTick`, the wrapped `readableStream` will not flow until the upstream is flushed. If the stream is not piped before `nextTick`, it is ended and flushed (acting as a proper readable). - -## License - -MIT - -[downloads-image]: http://img.shields.io/npm/dm/to-through.svg -[npm-url]: https://npmjs.com/package/to-through -[npm-image]: http://img.shields.io/npm/v/to-through.svg - -[travis-url]: https://travis-ci.org/gulpjs/to-through -[travis-image]: http://img.shields.io/travis/gulpjs/to-through.svg?label=travis-ci - -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/to-through -[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/to-through.svg?label=appveyor - -[coveralls-url]: https://coveralls.io/r/gulpjs/to-through -[coveralls-image]: http://img.shields.io/coveralls/gulpjs/to-through/master.svg - -[gitter-url]: https://gitter.im/gulpjs/gulp -[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png diff --git a/node_modules/to-through/index.js b/node_modules/to-through/index.js deleted file mode 100644 index c71a6770..00000000 --- a/node_modules/to-through/index.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - -var through = require('through2'); - -function forward(chunk, enc, cb) { - cb(null, chunk); -} - -function toThrough(readable) { - - var opts = { - objectMode: readable._readableState.objectMode, - highWaterMark: readable._readableState.highWaterMark, - }; - - function flush(cb) { - var self = this; - - readable.on('readable', onReadable); - readable.on('end', cb); - - function onReadable() { - var chunk; - while (chunk = readable.read()) { - self.push(chunk); - } - } - } - - var wrapper = through(opts, forward, flush); - - var shouldFlow = true; - wrapper.once('pipe', onPipe); - wrapper.on('newListener', onListener); - readable.on('error', wrapper.emit.bind(wrapper, 'error')); - - function onListener(event) { - // Once we've seen the data or readable event, check if we need to flow - if (event === 'data' || event === 'readable') { - maybeFlow(); - this.removeListener('newListener', onListener); - } - } - - function onPipe() { - // If the wrapper is piped, disable flow - shouldFlow = false; - } - - function maybeFlow() { - // If we need to flow, end the stream which triggers flush - if (shouldFlow) { - wrapper.end(); - } - } - - return wrapper; -} - -module.exports = toThrough; diff --git a/node_modules/to-through/package.json b/node_modules/to-through/package.json deleted file mode 100644 index 153bcd6f..00000000 --- a/node_modules/to-through/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_from": "to-through@^2.0.0", - "_id": "to-through@2.0.0", - "_inBundle": false, - "_integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", - "_location": "/to-through", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "to-through@^2.0.0", - "name": "to-through", - "escapedName": "to-through", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", - "_shasum": "fc92adaba072647bc0b67d6b03664aa195093af6", - "_spec": "to-through@^2.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs", - "author": { - "name": "Gulp Team", - "email": "team@gulpjs.com", - "url": "http://gulpjs.com/" - }, - "bugs": { - "url": "https://github.com/gulpjs/to-through/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com" - } - ], - "dependencies": { - "through2": "^2.0.3" - }, - "deprecated": false, - "description": "Wrap a ReadableStream in a TransformStream.", - "devDependencies": { - "eslint": "^1.10.3", - "eslint-config-gulp": "^2.0.0", - "expect": "^1.20.2", - "istanbul": "^0.4.3", - "istanbul-coveralls": "^1.0.3", - "jscs": "^2.4.0", - "jscs-preset-gulp": "^1.0.0", - "mississippi": "^1.3.0", - "mocha": "^3.2.0" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "LICENSE", - "index.js" - ], - "homepage": "https://github.com/gulpjs/to-through#readme", - "keywords": [ - "transform", - "readable", - "through", - "wrap" - ], - "license": "MIT", - "main": "index.js", - "name": "to-through", - "repository": { - "type": "git", - "url": "git+https://github.com/gulpjs/to-through.git" - }, - "scripts": { - "cover": "istanbul cover _mocha --report lcovonly", - "coveralls": "npm run cover && istanbul-coveralls", - "lint": "eslint index.js test/ && jscs index.js test/", - "pretest": "npm run lint", - "test": "mocha --async-only" - }, - "version": "2.0.0" -} diff --git a/node_modules/uglify-js/LICENSE b/node_modules/uglify-js/LICENSE deleted file mode 100644 index 122e8fb9..00000000 --- a/node_modules/uglify-js/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -UglifyJS is released under the BSD license: - -Copyright 2012-2019 (c) Mihai Bazon - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, -OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR -TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF -THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. diff --git a/node_modules/uglify-js/README.md b/node_modules/uglify-js/README.md deleted file mode 100644 index 06b16551..00000000 --- a/node_modules/uglify-js/README.md +++ /dev/null @@ -1,1356 +0,0 @@ -UglifyJS 3 -========== - -UglifyJS is a JavaScript parser, minifier, compressor and beautifier toolkit. - -#### Note: -- `uglify-js` supports JavaScript and most language features in ECMAScript. -- For more exotic parts of ECMAScript, process your source file with transpilers - like [Babel](https://babeljs.io/) before passing onto `uglify-js`. -- `uglify-js@3` has a simplified [API](#api-reference) and [CLI](#command-line-usage) - that is not backwards compatible with [`uglify-js@2`](https://github.com/mishoo/UglifyJS/tree/v2.x). - -Install -------- - -First make sure you have installed the latest version of [node.js](http://nodejs.org/) -(You may need to restart your computer after this step). - -From NPM for use as a command line app: - - npm install uglify-js -g - -From NPM for programmatic use: - - npm install uglify-js - -# Command line usage - - uglifyjs [input files] [options] - -UglifyJS can take multiple input files. It's recommended that you pass the -input files first, then pass the options. UglifyJS will parse input files -in sequence and apply any compression options. The files are parsed in the -same global scope, that is, a reference from a file to some -variable/function declared in another file will be matched properly. - -If no input file is specified, UglifyJS will read from STDIN. - -If you wish to pass your options before the input files, separate the two with -a double dash to prevent input files being used as option arguments: - - uglifyjs --compress --mangle -- input.js - -### Command line options - -``` - -h, --help Print usage information. - `--help options` for details on available options. - -V, --version Print version number. - -p, --parse Specify parser options: - `acorn` Use Acorn for parsing. - `bare_returns` Allow return outside of functions. - Useful when minifying CommonJS - modules and Userscripts that may - be anonymous function wrapped (IIFE) - by the .user.js engine `caller`. - `expression` Parse a single expression, rather than - a program (for parsing JSON). - `spidermonkey` Assume input files are SpiderMonkey - AST format (as JSON). - -c, --compress [options] Enable compressor/specify compressor options: - `pure_funcs` List of functions that can be safely - removed when their return values are - not used. - -m, --mangle [options] Mangle names/specify mangler options: - `reserved` List of names that should not be mangled. - --mangle-props [options] Mangle properties/specify mangler options: - `builtins` Mangle property names that overlaps - with standard JavaScript globals. - `debug` Add debug prefix and suffix. - `domprops` Mangle property names that overlaps - with DOM properties. - `keep_quoted` Only mangle unquoted properties. - `regex` Only mangle matched property names. - `reserved` List of names that should not be mangled. - -b, --beautify [options] Beautify output/specify output options: - `beautify` Enabled with `--beautify` by default. - `preamble` Preamble to prepend to the output. You - can use this to insert a comment, for - example for licensing information. - This will not be parsed, but the source - map will adjust for its presence. - `quote_style` Quote style: - 0 - auto - 1 - single - 2 - double - 3 - original - `wrap_iife` Wrap IIFEs in parentheses. Note: you may - want to disable `negate_iife` under - compressor options. - -O, --output-opts [options] Specify output options (`beautify` disabled by default). - -o, --output Output file path (default STDOUT). Specify `ast` or - `spidermonkey` to write UglifyJS or SpiderMonkey AST - as JSON to STDOUT respectively. - --annotations Process and preserve comment annotations. - (`/*@__PURE__*/` or `/*#__PURE__*/`) - --no-annotations Ignore and discard comment annotations. - --comments [filter] Preserve copyright comments in the output. By - default this works like Google Closure, keeping - JSDoc-style comments that contain "@license" or - "@preserve". You can optionally pass one of the - following arguments to this flag: - - "all" to keep all comments - - a valid JS RegExp like `/foo/` or `/^!/` to - keep only matching comments. - Note that currently not *all* comments can be - kept when compression is on, because of dead - code removal or cascading statements into - sequences. - --config-file Read `minify()` options from JSON file. - -d, --define [=value] Global definitions. - -e, --enclose [arg[:value]] Embed everything in a big function, with configurable - argument(s) & value(s). - --ie8 Support non-standard Internet Explorer 8. - Equivalent to setting `ie8: true` in `minify()` - for `compress`, `mangle` and `output` options. - By default UglifyJS will not try to be IE-proof. - --keep-fnames Do not mangle/drop function names. Useful for - code relying on Function.prototype.name. - --name-cache File to hold mangled name mappings. - --self Build UglifyJS as a library (implies --wrap UglifyJS) - --source-map [options] Enable source map/specify source map options: - `base` Path to compute relative paths from input files. - `content` Input source map, useful if you're compressing - JS that was generated from some other original - code. Specify "inline" if the source map is - included within the sources. - `filename` Filename and/or location of the output source - (sets `file` attribute in source map). - `includeSources` Pass this flag if you want to include - the content of source files in the - source map as sourcesContent property. - `names` Include symbol names in the source map. - `root` Path to the original source to be included in - the source map. - `url` If specified, path to the source map to append in - `//# sourceMappingURL`. - --timings Display operations run time on STDERR. - --toplevel Compress and/or mangle variables in top level scope. - --v8 Support non-standard Chrome & Node.js - Equivalent to setting `v8: true` in `minify()` - for `mangle` and `output` options. - By default UglifyJS will not try to be v8-proof. - --verbose Print diagnostic messages. - --warn Print warning messages. - --webkit Support non-standard Safari/Webkit. - Equivalent to setting `webkit: true` in `minify()` - for `mangle` and `output` options. - By default UglifyJS will not try to be Safari-proof. - --wrap Embed everything in a big function, making the - “exports” and “global” variables available. You - need to pass an argument to this option to - specify the name that your module will take - when included in, say, a browser. -``` - -Specify `--output` (`-o`) to declare the output file. Otherwise the output -goes to STDOUT. - -## CLI source map options - -UglifyJS can generate a source map file, which is highly useful for -debugging your compressed JavaScript. To get a source map, pass -`--source-map --output output.js` (source map will be written out to -`output.js.map`). - -Additional options: - -- `--source-map "filename=''"` to specify the name of the source map. The value of - `filename` is only used to set `file` attribute (see [the spec][sm-spec]) - in source map file. - -- `--source-map "root=''"` to pass the URL where the original files can be found. - -- `--source-map "names=false"` to omit symbol names if you want to reduce size - of the source map file. - -- `--source-map "url=''"` to specify the URL where the source map can be found. - Otherwise UglifyJS assumes HTTP `X-SourceMap` is being used and will omit the - `//# sourceMappingURL=` directive. - -For example: - - uglifyjs js/file1.js js/file2.js \ - -o foo.min.js -c -m \ - --source-map "root='http://foo.com/src',url='foo.min.js.map'" - -The above will compress and mangle `file1.js` and `file2.js`, will drop the -output in `foo.min.js` and the source map in `foo.min.js.map`. The source -mapping will refer to `http://foo.com/src/js/file1.js` and -`http://foo.com/src/js/file2.js` (in fact it will list `http://foo.com/src` -as the source map root, and the original files as `js/file1.js` and -`js/file2.js`). - -### Composed source map - -When you're compressing JS code that was output by a compiler such as -CoffeeScript, mapping to the JS code won't be too helpful. Instead, you'd -like to map back to the original code (i.e. CoffeeScript). UglifyJS has an -option to take an input source map. Assuming you have a mapping from -CoffeeScript → compiled JS, UglifyJS can generate a map from CoffeeScript → -compressed JS by mapping every token in the compiled JS to its original -location. - -To use this feature pass `--source-map "content='/path/to/input/source.map'"` -or `--source-map "content=inline"` if the source map is included inline with -the sources. - -## CLI compress options - -You need to pass `--compress` (`-c`) to enable the compressor. Optionally -you can pass a comma-separated list of [compress options](#compress-options). - -Options are in the form `foo=bar`, or just `foo` (the latter implies -a boolean option that you want to set `true`; it's effectively a -shortcut for `foo=true`). - -Example: - - uglifyjs file.js -c toplevel,sequences=false - -## CLI mangle options - -To enable the mangler you need to pass `--mangle` (`-m`). The following -(comma-separated) options are supported: - -- `eval` (default: `false`) — mangle names visible in scopes where `eval` or - `with` are used. - -- `reserved` (default: `[]`) — when mangling is enabled but you want to - prevent certain names from being mangled, you can declare those names with - `--mangle reserved` — pass a comma-separated list of names. For example: - - uglifyjs ... -m reserved=['$','require','exports'] - - to prevent the `require`, `exports` and `$` names from being changed. - -### CLI mangling property names (`--mangle-props`) - -**Note:** THIS WILL PROBABLY BREAK YOUR CODE. Mangling property names -is a separate step, different from variable name mangling. Pass -`--mangle-props` to enable it. It will mangle all properties in the -input code with the exception of built in DOM properties and properties -in core JavaScript classes. For example: - -```javascript -// example.js -var x = { - baz_: 0, - foo_: 1, - calc: function() { - return this.foo_ + this.baz_; - } -}; -x.bar_ = 2; -x["baz_"] = 3; -console.log(x.calc()); -``` -Mangle all properties (except for JavaScript `builtins`): -```bash -$ uglifyjs example.js -c -m --mangle-props -``` -```javascript -var x={o:0,_:1,l:function(){return this._+this.o}};x.t=2,x.o=3,console.log(x.l()); -``` -Mangle all properties except for `reserved` properties: -```bash -$ uglifyjs example.js -c -m --mangle-props reserved=[foo_,bar_] -``` -```javascript -var x={o:0,foo_:1,_:function(){return this.foo_+this.o}};x.bar_=2,x.o=3,console.log(x._()); -``` -Mangle all properties matching a `regex`: -```bash -$ uglifyjs example.js -c -m --mangle-props regex=/_$/ -``` -```javascript -var x={o:0,_:1,calc:function(){return this._+this.o}};x.l=2,x.o=3,console.log(x.calc()); -``` - -Combining mangle properties options: -```bash -$ uglifyjs example.js -c -m --mangle-props regex=/_$/,reserved=[bar_] -``` -```javascript -var x={o:0,_:1,calc:function(){return this._+this.o}};x.bar_=2,x.o=3,console.log(x.calc()); -``` - -In order for this to be of any use, we avoid mangling standard JS names by -default (`--mangle-props builtins` to override). - -A default exclusion file is provided in `tools/domprops.json` which should -cover most standard JS and DOM properties defined in various browsers. Pass -`--mangle-props domprops` to disable this feature. - -A regular expression can be used to define which property names should be -mangled. For example, `--mangle-props regex=/^_/` will only mangle property -names that start with an underscore. - -When you compress multiple files using this option, in order for them to -work together in the end we need to ensure somehow that one property gets -mangled to the same name in all of them. For this, pass `--name-cache filename.json` -and UglifyJS will maintain these mappings in a file which can then be reused. -It should be initially empty. Example: - -```bash -$ rm -f /tmp/cache.json # start fresh -$ uglifyjs file1.js file2.js --mangle-props --name-cache /tmp/cache.json -o part1.js -$ uglifyjs file3.js file4.js --mangle-props --name-cache /tmp/cache.json -o part2.js -``` - -Now, `part1.js` and `part2.js` will be consistent with each other in terms -of mangled property names. - -Using the name cache is not necessary if you compress all your files in a -single call to UglifyJS. - -### Mangling unquoted names (`--mangle-props keep_quoted`) - -Using quoted property name (`o["foo"]`) reserves the property name (`foo`) -so that it is not mangled throughout the entire script even when used in an -unquoted style (`o.foo`). Example: - -```javascript -// stuff.js -var o = { - "foo": 1, - bar: 3 -}; -o.foo += o.bar; -console.log(o.foo); -``` -```bash -$ uglifyjs stuff.js --mangle-props keep_quoted -c -m -``` -```javascript -var o={foo:1,o:3};o.foo+=o.o,console.log(o.foo); -``` - -### Debugging property name mangling - -You can also pass `--mangle-props debug` in order to mangle property names -without completely obscuring them. For example the property `o.foo` -would mangle to `o._$foo$_` with this option. This allows property mangling -of a large codebase while still being able to debug the code and identify -where mangling is breaking things. - -```bash -$ uglifyjs stuff.js --mangle-props debug -c -m -``` -```javascript -var o={_$foo$_:1,_$bar$_:3};o._$foo$_+=o._$bar$_,console.log(o._$foo$_); -``` - -You can also pass a custom suffix using `--mangle-props debug=XYZ`. This would then -mangle `o.foo` to `o._$foo$XYZ_`. You can change this each time you compile a -script to identify how a property got mangled. One technique is to pass a -random number on every compile to simulate mangling changing with different -inputs (e.g. as you update the input script with new properties), and to help -identify mistakes like writing mangled keys to storage. - - -# API Reference - -Assuming installation via NPM, you can load UglifyJS in your application -like this: -```javascript -var UglifyJS = require("uglify-js"); -``` - -There is a single high level function, **`minify(code, options)`**, -which will perform all minification [phases](#minify-options) in a configurable -manner. By default `minify()` will enable the options [`compress`](#compress-options) -and [`mangle`](#mangle-options). Example: -```javascript -var code = "function add(first, second) { return first + second; }"; -var result = UglifyJS.minify(code); -console.log(result.error); // runtime error, or `undefined` if no error -console.log(result.code); // minified output: function add(n,d){return n+d} -``` - -You can `minify` more than one JavaScript file at a time by using an object -for the first argument where the keys are file names and the values are source -code: -```javascript -var code = { - "file1.js": "function add(first, second) { return first + second; }", - "file2.js": "console.log(add(1 + 2, 3 + 4));" -}; -var result = UglifyJS.minify(code); -console.log(result.code); -// function add(d,n){return d+n}console.log(add(3,7)); -``` - -The `toplevel` option: -```javascript -var code = { - "file1.js": "function add(first, second) { return first + second; }", - "file2.js": "console.log(add(1 + 2, 3 + 4));" -}; -var options = { toplevel: true }; -var result = UglifyJS.minify(code, options); -console.log(result.code); -// console.log(3+7); -``` - -The `nameCache` option: -```javascript -var options = { - mangle: { - toplevel: true, - }, - nameCache: {} -}; -var result1 = UglifyJS.minify({ - "file1.js": "function add(first, second) { return first + second; }" -}, options); -var result2 = UglifyJS.minify({ - "file2.js": "console.log(add(1 + 2, 3 + 4));" -}, options); -console.log(result1.code); -// function n(n,r){return n+r} -console.log(result2.code); -// console.log(n(3,7)); -``` - -You may persist the name cache to the file system in the following way: -```javascript -var cacheFileName = "/tmp/cache.json"; -var options = { - mangle: { - properties: true, - }, - nameCache: JSON.parse(fs.readFileSync(cacheFileName, "utf8")) -}; -fs.writeFileSync("part1.js", UglifyJS.minify({ - "file1.js": fs.readFileSync("file1.js", "utf8"), - "file2.js": fs.readFileSync("file2.js", "utf8") -}, options).code, "utf8"); -fs.writeFileSync("part2.js", UglifyJS.minify({ - "file3.js": fs.readFileSync("file3.js", "utf8"), - "file4.js": fs.readFileSync("file4.js", "utf8") -}, options).code, "utf8"); -fs.writeFileSync(cacheFileName, JSON.stringify(options.nameCache), "utf8"); -``` - -An example of a combination of `minify()` options: -```javascript -var code = { - "file1.js": "function add(first, second) { return first + second; }", - "file2.js": "console.log(add(1 + 2, 3 + 4));" -}; -var options = { - toplevel: true, - compress: { - global_defs: { - "@console.log": "alert" - }, - passes: 2 - }, - output: { - beautify: false, - preamble: "/* uglified */" - } -}; -var result = UglifyJS.minify(code, options); -console.log(result.code); -// /* uglified */ -// alert(10);" -``` - -To produce warnings: -```javascript -var code = "function f(){ var u; return 2 + 3; }"; -var options = { warnings: true }; -var result = UglifyJS.minify(code, options); -console.log(result.error); // runtime error, `undefined` in this case -console.log(result.warnings); // [ 'Dropping unused variable u [0:1,18]' ] -console.log(result.code); // function f(){return 5} -``` - -An error example: -```javascript -var result = UglifyJS.minify({"foo.js" : "if (0) else console.log(1);"}); -console.log(JSON.stringify(result.error)); -// {"message":"Unexpected token: keyword (else)","filename":"foo.js","line":1,"col":7,"pos":7} -``` -Note: unlike `uglify-js@2.x`, the `3.x` API does not throw errors. To -achieve a similar effect one could do the following: -```javascript -var result = UglifyJS.minify(code, options); -if (result.error) throw result.error; -``` - -## Minify options - -- `annotations` — pass `false` to ignore all comment annotations and elide them - from output. Useful when, for instance, external tools incorrectly applied - `/*@__PURE__*/` or `/*#__PURE__*/`. Pass `true` to both compress and retain - comment annotations in output to allow for further processing downstream. - -- `compress` (default: `{}`) — pass `false` to skip compressing entirely. - Pass an object to specify custom [compress options](#compress-options). - -- `ie8` (default: `false`) — set to `true` to support IE8. - -- `keep_fnames` (default: `false`) — pass `true` to prevent discarding or mangling - of function names. Useful for code relying on `Function.prototype.name`. - -- `mangle` (default: `true`) — pass `false` to skip mangling names, or pass - an object to specify [mangle options](#mangle-options) (see below). - - - `mangle.properties` (default: `false`) — a subcategory of the mangle option. - Pass an object to specify custom [mangle property options](#mangle-properties-options). - -- `nameCache` (default: `null`) — pass an empty object `{}` or a previously - used `nameCache` object if you wish to cache mangled variable and - property names across multiple invocations of `minify()`. Note: this is - a read/write property. `minify()` will read the name cache state of this - object and update it during minification so that it may be - reused or externally persisted by the user. - -- `output` (default: `null`) — pass an object if you wish to specify - additional [output options](#output-options). The defaults are optimized - for best compression. - -- `parse` (default: `{}`) — pass an object if you wish to specify some - additional [parse options](#parse-options). - -- `sourceMap` (default: `false`) — pass an object if you wish to specify - [source map options](#source-map-options). - -- `toplevel` (default: `false`) — set to `true` if you wish to enable top level - variable and function name mangling and to drop unused variables and functions. - -- `v8` (default: `false`) — enable workarounds for Chrome & Node.js bugs. - -- `warnings` (default: `false`) — pass `true` to return compressor warnings - in `result.warnings`. Use the value `"verbose"` for more detailed warnings. - -- `webkit` (default: `false`) — enable workarounds for Safari/WebKit bugs. - PhantomJS users should set this option to `true`. - -## Minify options structure - -```javascript -{ - parse: { - // parse options - }, - compress: { - // compress options - }, - mangle: { - // mangle options - - properties: { - // mangle property options - } - }, - output: { - // output options - }, - sourceMap: { - // source map options - }, - nameCache: null, // or specify a name cache object - toplevel: false, - ie8: false, - warnings: false, -} -``` - -### Source map options - -To generate a source map: -```javascript -var result = UglifyJS.minify({"file1.js": "var a = function() {};"}, { - sourceMap: { - filename: "out.js", - url: "out.js.map" - } -}); -console.log(result.code); // minified output -console.log(result.map); // source map -``` - -Note that the source map is not saved in a file, it's just returned in -`result.map`. The value passed for `sourceMap.url` is only used to set -`//# sourceMappingURL=out.js.map` in `result.code`. The value of -`filename` is only used to set `file` attribute (see [the spec][sm-spec]) -in source map file. - -You can set option `sourceMap.url` to be `"inline"` and source map will -be appended to code. - -You can also specify sourceRoot property to be included in source map: -```javascript -var result = UglifyJS.minify({"file1.js": "var a = function() {};"}, { - sourceMap: { - root: "http://example.com/src", - url: "out.js.map" - } -}); -``` - -If you're compressing compiled JavaScript and have a source map for it, you -can use `sourceMap.content`: -```javascript -var result = UglifyJS.minify({"compiled.js": "compiled code"}, { - sourceMap: { - content: "content from compiled.js.map", - url: "minified.js.map" - } -}); -// same as before, it returns `code` and `map` -``` - -If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.url`. - -If you wish to reduce file size of the source map, set option `sourceMap.names` -to be `false` and all symbol names will be omitted. - -## Parse options - -- `bare_returns` (default: `false`) — support top level `return` statements - -- `html5_comments` (default: `true`) - -- `shebang` (default: `true`) — support `#!command` as the first line - -## Compress options - -- `annotations` (default: `true`) — Pass `false` to disable potentially dropping - functions marked as "pure". A function call is marked as "pure" if a comment - annotation `/*@__PURE__*/` or `/*#__PURE__*/` immediately precedes the call. For - example: `/*@__PURE__*/foo();` - -- `arguments` (default: `true`) — replace `arguments[index]` with function - parameter name whenever possible. - -- `arrows` (default: `true`) — apply optimizations to arrow functions - -- `assignments` (default: `true`) — apply optimizations to assignment expressions - -- `awaits` (default: `true`) — apply optimizations to `await` expressions - -- `booleans` (default: `true`) — various optimizations for boolean context, - for example `!!a ? b : c → a ? b : c` - -- `collapse_vars` (default: `true`) — Collapse single-use non-constant variables, - side effects permitting. - -- `comparisons` (default: `true`) — apply certain optimizations to binary nodes, - e.g. `!(a <= b) → a > b`, attempts to negate binary nodes, e.g. - `a = !b && !c && !d && !e → a=!(b||c||d||e)` etc. - -- `conditionals` (default: `true`) — apply optimizations for `if`-s and conditional - expressions - -- `dead_code` (default: `true`) — remove unreachable code - -- `default_values` (default: `true`) — drop overshadowed default values - -- `directives` (default: `true`) — remove redundant or non-standard directives - -- `drop_console` (default: `false`) — Pass `true` to discard calls to - `console.*` functions. If you wish to drop a specific function call - such as `console.info` and/or retain side effects from function arguments - after dropping the function call then use `pure_funcs` instead. - -- `drop_debugger` (default: `true`) — remove `debugger;` statements - -- `evaluate` (default: `true`) — Evaluate expression for shorter constant - representation. Pass `"eager"` to always replace function calls whenever - possible, or a positive integer to specify an upper bound for each individual - evaluation in number of characters. - -- `expression` (default: `false`) — Pass `true` to preserve completion values - from terminal statements without `return`, e.g. in bookmarklets. - -- `functions` (default: `true`) — convert declarations from `var` to `function` - whenever possible. - -- `global_defs` (default: `{}`) — see [conditional compilation](#conditional-compilation) - -- `hoist_exports` (default: `true`) — hoist `export` statements to facilitate - various `compress` and `mangle` optimizations. - -- `hoist_funs` (default: `false`) — hoist function declarations - -- `hoist_props` (default: `true`) — hoist properties from constant object and - array literals into regular variables subject to a set of constraints. For example: - `var o={p:1, q:2}; f(o.p, o.q);` is converted to `f(1, 2);`. Note: `hoist_props` - works best with `toplevel` and `mangle` enabled, alongside with `compress` option - `passes` set to `2` or higher. - -- `hoist_vars` (default: `false`) — hoist `var` declarations (this is `false` - by default because it seems to increase the size of the output in general) - -- `if_return` (default: `true`) — optimizations for if/return and if/continue - -- `imports` (default: `true`) — drop unreferenced import symbols when used with `unused` - -- `inline` (default: `true`) — inline calls to function with simple/`return` statement: - - `false` — same as `0` - - `0` — disabled inlining - - `1` — inline simple functions - - `2` — inline functions with arguments - - `3` — inline functions with arguments and variables - - `true` — same as `3` - -- `join_vars` (default: `true`) — join consecutive `var` statements - -- `keep_fargs` (default: `false`) — discard unused function arguments except - when unsafe to do so, e.g. code which relies on `Function.prototype.length`. - Pass `true` to always retain function arguments. - -- `keep_infinity` (default: `false`) — Pass `true` to prevent `Infinity` from - being compressed into `1/0`, which may cause performance issues on Chrome. - -- `loops` (default: `true`) — optimizations for `do`, `while` and `for` loops - when we can statically determine the condition. - -- `merge_vars` (default: `true`) — combine and reuse variables. - -- `negate_iife` (default: `true`) — negate "Immediately-Called Function Expressions" - where the return value is discarded, to avoid the parens that the - code generator would insert. - -- `objects` (default: `true`) — compact duplicate keys in object literals. - -- `passes` (default: `1`) — The maximum number of times to run compress. - In some cases more than one pass leads to further compressed code. Keep in - mind more passes will take more time. - -- `properties` (default: `true`) — rewrite property access using the dot notation, for - example `foo["bar"] → foo.bar` - -- `pure_funcs` (default: `null`) — You can pass an array of names and - UglifyJS will assume that those functions do not produce side - effects. DANGER: will not check if the name is redefined in scope. - An example case here, for instance `var q = Math.floor(a/b)`. If - variable `q` is not used elsewhere, UglifyJS will drop it, but will - still keep the `Math.floor(a/b)`, not knowing what it does. You can - pass `pure_funcs: [ 'Math.floor' ]` to let it know that this - function won't produce any side effect, in which case the whole - statement would get discarded. The current implementation adds some - overhead (compression will be slower). Make sure symbols under `pure_funcs` - are also under `mangle.reserved` to avoid mangling. - -- `pure_getters` (default: `"strict"`) — If you pass `true` for - this, UglifyJS will assume that object property access - (e.g. `foo.bar` or `foo["bar"]`) doesn't have any side effects. - Specify `"strict"` to treat `foo.bar` as side-effect-free only when - `foo` is certain to not throw, i.e. not `null` or `undefined`. - -- `reduce_funcs` (default: `true`) — Allows single-use functions to be - inlined as function expressions when permissible allowing further - optimization. Enabled by default. Option depends on `reduce_vars` - being enabled. Some code runs faster in the Chrome V8 engine if this - option is disabled. Does not negatively impact other major browsers. - -- `reduce_vars` (default: `true`) — Improve optimization on variables assigned with and - used as constant values. - -- `rests` (default: `true`) — apply optimizations to rest parameters - -- `sequences` (default: `true`) — join consecutive simple statements using the - comma operator. May be set to a positive integer to specify the maximum number - of consecutive comma sequences that will be generated. If this option is set to - `true` then the default `sequences` limit is `200`. Set option to `false` or `0` - to disable. The smallest `sequences` length is `2`. A `sequences` value of `1` - is grandfathered to be equivalent to `true` and as such means `200`. On rare - occasions the default sequences limit leads to very slow compress times in which - case a value of `20` or less is recommended. - -- `side_effects` (default: `true`) — drop extraneous code which does not affect - outcome of runtime execution. - -- `spreads` (default: `true`) — flatten spread expressions. - -- `strings` (default: `true`) — compact string concatenations. - -- `switches` (default: `true`) — de-duplicate and remove unreachable `switch` branches - -- `templates` (default: `true`) — compact template literals by embedding expressions - and/or converting to string literals, e.g. `` `foo ${42}` → "foo 42"`` - -- `top_retain` (default: `null`) — prevent specific toplevel functions and - variables from `unused` removal (can be array, comma-separated, RegExp or - function. Implies `toplevel`) - -- `toplevel` (default: `false`) — drop unreferenced functions (`"funcs"`) and/or - variables (`"vars"`) in the top level scope (`false` by default, `true` to drop - both unreferenced functions and variables) - -- `typeofs` (default: `true`) — Transforms `typeof foo == "undefined"` into - `foo === void 0`. Note: recommend to set this value to `false` for IE10 and - earlier versions due to known issues. - -- `unsafe` (default: `false`) — apply "unsafe" transformations (discussion below) - -- `unsafe_comps` (default: `false`) — compress expressions like `a <= b` assuming - none of the operands can be (coerced to) `NaN`. - -- `unsafe_Function` (default: `false`) — compress and mangle `Function(args, code)` - when both `args` and `code` are string literals. - -- `unsafe_math` (default: `false`) — optimize numerical expressions like - `2 * x * 3` into `6 * x`, which may give imprecise floating point results. - -- `unsafe_proto` (default: `false`) — optimize expressions like - `Array.prototype.slice.call(a)` into `[].slice.call(a)` - -- `unsafe_regexp` (default: `false`) — enable substitutions of variables with - `RegExp` values the same way as if they are constants. - -- `unsafe_undefined` (default: `false`) — substitute `void 0` if there is a - variable named `undefined` in scope (variable name will be mangled, typically - reduced to a single character) - -- `unused` (default: `true`) — drop unreferenced functions and variables (simple - direct variable assignments do not count as references unless set to `"keep_assign"`) - -- `varify` (default: `true`) — convert block-scoped declaractions into `var` - whenever safe to do so - -- `yields` (default: `true`) — apply optimizations to `yield` expressions - -## Mangle options - -- `eval` (default: `false`) — Pass `true` to mangle names visible in scopes - where `eval` or `with` are used. - -- `reserved` (default: `[]`) — Pass an array of identifiers that should be - excluded from mangling. Example: `["foo", "bar"]`. - -- `toplevel` (default: `false`) — Pass `true` to mangle names declared in the - top level scope. - -Examples: - -```javascript -// test.js -var globalVar; -function funcName(firstLongName, anotherLongName) { - var myVariable = firstLongName + anotherLongName; -} -``` -```javascript -var code = fs.readFileSync("test.js", "utf8"); - -UglifyJS.minify(code).code; -// 'function funcName(a,n){}var globalVar;' - -UglifyJS.minify(code, { mangle: { reserved: ['firstLongName'] } }).code; -// 'function funcName(firstLongName,a){}var globalVar;' - -UglifyJS.minify(code, { mangle: { toplevel: true } }).code; -// 'function n(n,a){}var a;' -``` - -### Mangle properties options - -- `builtins` (default: `false`) — Use `true` to allow the mangling of builtin - DOM properties. Not recommended to override this setting. - -- `debug` (default: `false`) — Mangle names with the original name still present. - Pass an empty string `""` to enable, or a non-empty string to set the debug suffix. - -- `keep_quoted` (default: `false`) — Only mangle unquoted property names. - -- `regex` (default: `null`) — Pass a RegExp literal to only mangle property - names matching the regular expression. - -- `reserved` (default: `[]`) — Do not mangle property names listed in the - `reserved` array. - -## Output options - -The code generator tries to output shortest code possible by default. In -case you want beautified output, pass `--beautify` (`-b`). Optionally you -can pass additional arguments that control the code output: - -- `annotations` (default: `false`) — pass `true` to retain comment annotations - `/*@__PURE__*/` or `/*#__PURE__*/`, otherwise they will be discarded even if - `comments` is set. - -- `ascii_only` (default: `false`) — escape Unicode characters in strings and - regexps (affects directives with non-ascii characters becoming invalid) - -- `beautify` (default: `true`) — whether to actually beautify the output. - Passing `-b` will set this to true, but you might need to pass `-b` even - when you want to generate minified code, in order to specify additional - arguments, so you can use `-b beautify=false` to override it. - -- `braces` (default: `false`) — always insert braces in `if`, `for`, - `do`, `while` or `with` statements, even if their body is a single - statement. - -- `comments` (default: `false`) — pass `true` or `"all"` to preserve all - comments, `"some"` to preserve multi-line comments that contain `@cc_on`, - `@license`, or `@preserve` (case-insensitive), a regular expression string - (e.g. `/^!/`), or a function which returns `boolean`, e.g. - ```javascript - function(node, comment) { - return comment.value.indexOf("@type " + node.TYPE) >= 0; - } - ``` - -- `galio` (default: `false`) — enable workarounds for ANT Galio bugs - -- `indent_level` (default: `4`) - -- `indent_start` (default: `0`) — prefix all lines by that many spaces - -- `inline_script` (default: `true`) — escape HTML comments and the slash in - occurrences of `` in strings - -- `keep_quoted_props` (default: `false`) — when turned on, prevents stripping - quotes from property names in object literals. - -- `max_line_len` (default: `false`) — maximum line length (for uglified code) - -- `preamble` (default: `null`) — when passed it must be a string and - it will be prepended to the output literally. The source map will - adjust for this text. Can be used to insert a comment containing - licensing information, for example. - -- `preserve_line` (default: `false`) — pass `true` to retain line numbering on - a best effort basis. - -- `quote_keys` (default: `false`) — pass `true` to quote all keys in literal - objects - -- `quote_style` (default: `0`) — preferred quote style for strings (affects - quoted property names and directives as well): - - `0` — prefers double quotes, switches to single quotes when there are - more double quotes in the string itself. `0` is best for gzip size. - - `1` — always use single quotes - - `2` — always use double quotes - - `3` — always use the original quotes - -- `semicolons` (default: `true`) — separate statements with semicolons. If - you pass `false` then whenever possible we will use a newline instead of a - semicolon, leading to more readable output of uglified code (size before - gzip could be smaller; size after gzip insignificantly larger). - -- `shebang` (default: `true`) — preserve shebang `#!` in preamble (bash scripts) - -- `width` (default: `80`) — only takes effect when beautification is on, this - specifies an (orientative) line width that the beautifier will try to - obey. It refers to the width of the line text (excluding indentation). - It doesn't work very well currently, but it does make the code generated - by UglifyJS more readable. - -- `wrap_iife` (default: `false`) — pass `true` to wrap immediately invoked - function expressions. See - [#640](https://github.com/mishoo/UglifyJS/issues/640) for more details. - -# Miscellaneous - -### Keeping copyright notices or other comments - -You can pass `--comments` to retain certain comments in the output. By -default it will keep JSDoc-style comments that contain "@preserve", -"@license" or "@cc_on" (conditional compilation for IE). You can pass -`--comments all` to keep all the comments, or a valid JavaScript regexp to -keep only comments that match this regexp. For example `--comments /^!/` -will keep comments like `/*! Copyright Notice */`. - -Note, however, that there might be situations where comments are lost. For -example: -```javascript -function f() { - /** @preserve Foo Bar */ - function g() { - // this function is never called - } - return something(); -} -``` - -Even though it has "@preserve", the comment will be lost because the inner -function `g` (which is the AST node to which the comment is attached to) is -discarded by the compressor as not referenced. - -The safest comments where to place copyright information (or other info that -needs to be kept in the output) are comments attached to toplevel nodes. - -### The `unsafe` `compress` option - -It enables some transformations that *might* break code logic in certain -contrived cases, but should be fine for most code. You might want to try it -on your own code, it should reduce the minified size. Here's what happens -when this flag is on: - -- `new Array(1, 2, 3)` or `Array(1, 2, 3)` → `[ 1, 2, 3 ]` -- `new Object()` → `{}` -- `String(exp)` or `exp.toString()` → `"" + exp` -- `new Object/RegExp/Function/Error/Array (...)` → we discard the `new` - -### Conditional compilation - -You can use the `--define` (`-d`) switch in order to declare global -variables that UglifyJS will assume to be constants (unless defined in -scope). For example if you pass `--define DEBUG=false` then, coupled with -dead code removal UglifyJS will discard the following from the output: -```javascript -if (DEBUG) { - console.log("debug stuff"); -} -``` - -You can specify nested constants in the form of `--define env.DEBUG=false`. - -UglifyJS will warn about the condition being always false and about dropping -unreachable code; for now there is no option to turn off only this specific -warning, you can pass `warnings=false` to turn off *all* warnings. - -Another way of doing that is to declare your globals as constants in a -separate file and include it into the build. For example you can have a -`build/defines.js` file with the following: -```javascript -var DEBUG = false; -var PRODUCTION = true; -// etc. -``` - -and build your code like this: - - uglifyjs build/defines.js js/foo.js js/bar.js... -c - -UglifyJS will notice the constants and, since they cannot be altered, it -will evaluate references to them to the value itself and drop unreachable -code as usual. The build will contain the `const` declarations if you use -them. If you are targeting < ES6 environments which does not support `const`, -using `var` with `reduce_vars` (enabled by default) should suffice. - -### Conditional compilation API - -You can also use conditional compilation via the programmatic API. With the difference that the -property name is `global_defs` and is a compressor property: - -```javascript -var result = UglifyJS.minify(fs.readFileSync("input.js", "utf8"), { - compress: { - dead_code: true, - global_defs: { - DEBUG: false - } - } -}); -``` - -To replace an identifier with an arbitrary non-constant expression it is -necessary to prefix the `global_defs` key with `"@"` to instruct UglifyJS -to parse the value as an expression: -```javascript -UglifyJS.minify("alert('hello');", { - compress: { - global_defs: { - "@alert": "console.log" - } - } -}).code; -// returns: 'console.log("hello");' -``` - -Otherwise it would be replaced as string literal: -```javascript -UglifyJS.minify("alert('hello');", { - compress: { - global_defs: { - "alert": "console.log" - } - } -}).code; -// returns: '"console.log"("hello");' -``` - -### Using native Uglify AST with `minify()` -```javascript -// example: parse only, produce native Uglify AST - -var result = UglifyJS.minify(code, { - parse: {}, - compress: false, - mangle: false, - output: { - ast: true, - code: false // optional - faster if false - } -}); - -// result.ast contains native Uglify AST -``` -```javascript -// example: accept native Uglify AST input and then compress and mangle -// to produce both code and native AST. - -var result = UglifyJS.minify(ast, { - compress: {}, - mangle: {}, - output: { - ast: true, - code: true // optional - faster if false - } -}); - -// result.ast contains native Uglify AST -// result.code contains the minified code in string form. -``` - -### Working with Uglify AST - -Transversal and transformation of the native AST can be performed through -[`TreeWalker`](https://github.com/mishoo/UglifyJS/blob/master/lib/ast.js) and -[`TreeTransformer`](https://github.com/mishoo/UglifyJS/blob/master/lib/transform.js) -respectively. - -### ESTree / SpiderMonkey AST - -UglifyJS has its own abstract syntax tree format; for -[practical reasons](http://lisperator.net/blog/uglifyjs-why-not-switching-to-spidermonkey-ast/) -we can't easily change to using the SpiderMonkey AST internally. However, -UglifyJS now has a converter which can import a SpiderMonkey AST. - -For example [Acorn][acorn] is a super-fast parser that produces a -SpiderMonkey AST. It has a small CLI utility that parses one file and dumps -the AST in JSON on the standard output. To use UglifyJS to mangle and -compress that: - - acorn file.js | uglifyjs -p spidermonkey -m -c - -The `-p spidermonkey` option tells UglifyJS that all input files are not -JavaScript, but JS code described in SpiderMonkey AST in JSON. Therefore we -don't use our own parser in this case, but just transform that AST into our -internal AST. - -### Use Acorn for parsing - -More for fun, I added the `-p acorn` option which will use Acorn to do all -the parsing. If you pass this option, UglifyJS will `require("acorn")`. - -Acorn is really fast (e.g. 250ms instead of 380ms on some 650K code), but -converting the SpiderMonkey tree that Acorn produces takes another 150ms so -in total it's a bit more than just using UglifyJS's own parser. - -[acorn]: https://github.com/ternjs/acorn -[sm-spec]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k - -### Uglify Fast Minify Mode - -It's not well known, but whitespace removal and symbol mangling accounts -for 95% of the size reduction in minified code for most JavaScript - not -elaborate code transforms. One can simply disable `compress` to speed up -Uglify builds by 3 to 5 times. - -| d3.js | minify size | gzip size | minify time (seconds) | -| --- | ---: | ---: | ---: | -| original | 511,371 | 119,932 | - | -| uglify-js@3.13.0 mangle=false, compress=false | 363,988 | 95,695 | 0.56 | -| uglify-js@3.13.0 mangle=true, compress=false | 253,305 | 81,281 | 0.99 | -| uglify-js@3.13.0 mangle=true, compress=true | 244,436 | 79,854 | 5.30 | - -To enable fast minify mode from the CLI use: -``` -uglifyjs file.js -m -``` -To enable fast minify mode with the API use: -```javascript -UglifyJS.minify(code, { compress: false, mangle: true }); -``` - -### Source maps and debugging - -Various `compress` transforms that simplify, rearrange, inline and remove code -are known to have an adverse effect on debugging with source maps. This is -expected as code is optimized and mappings are often simply not possible as -some code no longer exists. For highest fidelity in source map debugging -disable the Uglify `compress` option and just use `mangle`. - -### Compiler assumptions - -To allow for better optimizations, the compiler makes various assumptions: - -- The code does not rely on preserving its runtime performance characteristics. - Typically uglified code will run faster due to less instructions and easier - inlining, but may be slower on rare occasions for a specific platform, e.g. - see [`reduce_funcs`](#compress-options). -- `.toString()` and `.valueOf()` don't have side effects, and for built-in - objects they have not been overridden. -- `undefined`, `NaN` and `Infinity` have not been externally redefined. -- `arguments.callee`, `arguments.caller` and `Function.prototype.caller` are not used. -- The code doesn't expect the contents of `Function.prototype.toString()` or - `Error.prototype.stack` to be anything in particular. -- Getting and setting properties on a plain object does not cause other side effects - (using `.watch()` or `Proxy`). -- Object properties can be added, removed and modified (not prevented with - `Object.defineProperty()`, `Object.defineProperties()`, `Object.freeze()`, - `Object.preventExtensions()` or `Object.seal()`). -- Earlier versions of JavaScript will throw `SyntaxError` with the following: - ```javascript - ({ - p: 42, - get p() {}, - }); - // SyntaxError: Object literal may not have data and accessor property with - // the same name - ``` - UglifyJS may modify the input which in turn may suppress those errors. -- Iteration order of keys over an object which contains spread syntax in later - versions of Chrome and Node.js may be altered. -- When `toplevel` is enabled, UglifyJS effectively assumes input code is wrapped - within `function(){ ... }`, thus forbids aliasing of declared global variables: - ```javascript - A = "FAIL"; - var B = "FAIL"; - // can be `global`, `self`, `window` etc. - var top = function() { - return this; - }(); - // "PASS" - top.A = "PASS"; - console.log(A); - // "FAIL" after compress and/or mangle - top.B = "PASS"; - console.log(B); - ``` -- Use of `arguments` alongside destructuring as function parameters, e.g. - `function({}, arguments) {}` will result in `SyntaxError` in earlier versions - of Chrome and Node.js - UglifyJS may modify the input which in turn may - suppress those errors. -- Earlier versions of Chrome and Node.js will throw `ReferenceError` with the - following: - ```javascript - var a; - try { - throw 42; - } catch ({ - [a]: b, - // ReferenceError: a is not defined - }) { - let a; - } - ``` - UglifyJS may modify the input which in turn may suppress those errors. -- Later versions of JavaScript will throw `SyntaxError` with the following: - ```javascript - a => { - let a; - }; - // SyntaxError: Identifier 'a' has already been declared - ``` - UglifyJS may modify the input which in turn may suppress those errors. -- Later versions of JavaScript will throw `SyntaxError` with the following: - ```javascript - try { - // ... - } catch ({ message: a }) { - var a; - } - // SyntaxError: Identifier 'a' has already been declared - ``` - UglifyJS may modify the input which in turn may suppress those errors. -- Some versions of Chrome and Node.js will throw `ReferenceError` with the - following: - ```javascript - console.log(((a, b = function() { - return a; - // ReferenceError: a is not defined - }()) => b)()); - ``` - UglifyJS may modify the input which in turn may suppress those errors. -- Some arithmetic operations with `BigInt` may throw `TypeError`: - ```javascript - 1n + 1; - // TypeError: can't convert BigInt to number - ``` - UglifyJS may modify the input which in turn may suppress those errors. -- Some versions of JavaScript will throw `SyntaxError` with the - following: - ```javascript - console.log(String.raw`\uFo`); - // SyntaxError: Invalid Unicode escape sequence - ``` - UglifyJS may modify the input which in turn may suppress those errors. -- Some versions of JavaScript will throw `SyntaxError` with the - following: - ```javascript - try {} catch (e) { - for (var e of []); - } - // SyntaxError: Identifier 'e' has already been declared - ``` - UglifyJS may modify the input which in turn may suppress those errors. -- Some versions of Chrome and Node.js will give incorrect results with the - following: - ```javascript - console.log({ - ...{ - set 42(v) {}, - 42: "PASS", - }, - }); - // Expected: { '42': 'PASS' } - // Actual: { '42': undefined } - ``` - UglifyJS may modify the input which in turn may suppress those errors. -- Later versions of JavaScript will throw `SyntaxError` with the following: - ```javascript - var await; - async function f() { - class A { - static p = await; - } - } - // SyntaxError: Unexpected reserved word - ``` - UglifyJS may modify the input which in turn may suppress those errors. -- Later versions of JavaScript will throw `SyntaxError` with the following: - ```javascript - var async; - for (async of []); - // SyntaxError: The left-hand side of a for-of loop may not be 'async'. - ``` - UglifyJS may modify the input which in turn may suppress those errors. -- Later versions of Chrome and Node.js will give incorrect results with the - following: - ```javascript - console.log({ - ...console, - get 42() { - return "FAIL"; - }, - [42]: "PASS", - }[42]); - // Expected: "PASS" - // Actual: "FAIL" - ``` - UglifyJS may modify the input which in turn may suppress those errors. -- Earlier versions of JavaScript will throw `TypeError` with the following: - ```javascript - (function() { - { - const a = "foo"; - } - { - const a = "bar"; - } - })(); - // TypeError: const 'a' has already been declared - ``` - UglifyJS may modify the input which in turn may suppress those errors. diff --git a/node_modules/uglify-js/bin/uglifyjs b/node_modules/uglify-js/bin/uglifyjs deleted file mode 100755 index 197e42bf..00000000 --- a/node_modules/uglify-js/bin/uglifyjs +++ /dev/null @@ -1,589 +0,0 @@ -#! /usr/bin/env node -// -*- js -*- - -"use strict"; - -require("../tools/tty"); - -var fs = require("fs"); -var info = require("../package.json"); -var path = require("path"); -var UglifyJS = require("../tools/node"); - -var skip_keys = [ "cname", "fixed", "inlined", "parent_scope", "scope", "uses_eval", "uses_with" ]; -var files = {}; -var options = {}; -var short_forms = { - b: "beautify", - c: "compress", - d: "define", - e: "enclose", - h: "help", - m: "mangle", - o: "output", - O: "output-opts", - p: "parse", - v: "version", - V: "version", -}; -var args = process.argv.slice(2); -var paths = []; -var output, nameCache; -var specified = {}; -while (args.length) { - var arg = args.shift(); - if (arg[0] != "-") { - paths.push(arg); - } else if (arg == "--") { - paths = paths.concat(args); - break; - } else if (arg[1] == "-") { - process_option(arg.slice(2)); - } else [].forEach.call(arg.slice(1), function(letter, index, arg) { - if (!(letter in short_forms)) fatal("invalid option -" + letter); - process_option(short_forms[letter], index + 1 < arg.length); - }); -} - -function process_option(name, no_value) { - specified[name] = true; - switch (name) { - case "help": - switch (read_value()) { - case "ast": - print(UglifyJS.describe_ast()); - break; - case "options": - var text = []; - var toplevels = []; - var padding = ""; - var defaults = UglifyJS.default_options(); - for (var name in defaults) { - var option = defaults[name]; - if (option && typeof option == "object") { - text.push("--" + ({ - output: "beautify", - sourceMap: "source-map", - }[name] || name) + " options:"); - text.push(format_object(option)); - text.push(""); - } else { - if (padding.length < name.length) padding = Array(name.length + 1).join(" "); - toplevels.push([ { - keep_fnames: "keep-fnames", - nameCache: "name-cache", - }[name] || name, option ]); - } - } - toplevels.forEach(function(tokens) { - text.push("--" + tokens[0] + padding.slice(tokens[0].length - 2) + tokens[1]); - }); - print(text.join("\n")); - break; - default: - print([ - "Usage: uglifyjs [files...] [options]", - "", - "Options:", - " -h, --help Print usage information.", - " `--help options` for details on available options.", - " -v, -V, --version Print version number.", - " -p, --parse Specify parser options.", - " -c, --compress [options] Enable compressor/specify compressor options.", - " -m, --mangle [options] Mangle names/specify mangler options.", - " --mangle-props [options] Mangle properties/specify mangler options.", - " -b, --beautify [options] Beautify output/specify output options.", - " -O, --output-opts Output options (beautify disabled).", - " -o, --output Output file (default STDOUT).", - " --annotations Process and preserve comment annotations.", - " --no-annotations Ignore and discard comment annotations.", - " --comments [filter] Preserve copyright comments in the output.", - " --config-file Read minify() options from JSON file.", - " -d, --define [=value] Global definitions.", - " -e, --enclose [arg[,...][:value[,...]]] Embed everything in a big function, with configurable argument(s) & value(s).", - " --ie8 Support non-standard Internet Explorer 8.", - " --keep-fnames Do not mangle/drop function names. Useful for code relying on Function.prototype.name.", - " --name-cache File to hold mangled name mappings.", - " --rename Force symbol expansion.", - " --no-rename Disable symbol expansion.", - " --self Build UglifyJS as a library (implies --wrap UglifyJS)", - " --source-map [options] Enable source map/specify source map options.", - " --timings Display operations run time on STDERR.", - " --toplevel Compress and/or mangle variables in toplevel scope.", - " --validate Perform validation during AST manipulations.", - " --verbose Print diagnostic messages.", - " --warn Print warning messages.", - " --webkit Support non-standard Safari/Webkit.", - " --wrap Embed everything as a function with “exports” corresponding to “name” globally.", - "", - "(internal debug use only)", - " --in-situ Warning: replaces original source files with minified output.", - " --reduce-test Reduce a standalone test case (assumes cloned repository).", - ].join("\n")); - } - process.exit(); - case "version": - print(info.name + " " + info.version); - process.exit(); - case "config-file": - var config = JSON.parse(read_file(read_value(true))); - if (config.mangle && config.mangle.properties && config.mangle.properties.regex) { - config.mangle.properties.regex = UglifyJS.parse(config.mangle.properties.regex, { - expression: true, - }).value; - } - for (var key in config) if (!(key in options)) options[key] = config[key]; - break; - case "compress": - case "mangle": - options[name] = parse_js(read_value(), options[name]); - break; - case "source-map": - options.sourceMap = parse_js(read_value(), options.sourceMap); - break; - case "enclose": - options[name] = read_value(); - break; - case "annotations": - case "ie8": - case "timings": - case "toplevel": - case "validate": - case "webkit": - options[name] = true; - break; - case "no-annotations": - options.annotations = false; - break; - case "keep-fnames": - options.keep_fnames = true; - break; - case "wrap": - options[name] = read_value(true); - break; - case "verbose": - options.warnings = "verbose"; - break; - case "warn": - if (!options.warnings) options.warnings = true; - break; - case "beautify": - options.output = parse_js(read_value(), options.output); - if (!("beautify" in options.output)) options.output.beautify = true; - break; - case "output-opts": - options.output = parse_js(read_value(true), options.output); - break; - case "comments": - if (typeof options.output != "object") options.output = {}; - options.output.comments = read_value(); - if (options.output.comments === true) options.output.comments = "some"; - break; - case "define": - if (typeof options.compress != "object") options.compress = {}; - options.compress.global_defs = parse_js(read_value(true), options.compress.global_defs, "define"); - break; - case "mangle-props": - if (typeof options.mangle != "object") options.mangle = {}; - options.mangle.properties = parse_js(read_value(), options.mangle.properties); - break; - case "name-cache": - nameCache = read_value(true); - options.nameCache = JSON.parse(read_file(nameCache, "{}")); - break; - case "output": - output = read_value(true); - break; - case "parse": - options.parse = parse_js(read_value(true), options.parse); - break; - case "rename": - options.rename = true; - break; - case "no-rename": - options.rename = false; - break; - case "in-situ": - case "reduce-test": - case "self": - break; - default: - fatal("invalid option --" + name); - } - - function read_value(required) { - if (no_value || !args.length || args[0][0] == "-") { - if (required) fatal("missing option argument for --" + name); - return true; - } - return args.shift(); - } -} -if (!output && options.sourceMap && options.sourceMap.url != "inline") fatal("cannot write source map to STDOUT"); -if (specified["beautify"] && specified["output-opts"]) fatal("--beautify cannot be used with --output-opts"); -[ "compress", "mangle" ].forEach(function(name) { - if (!(name in options)) options[name] = false; -}); -if (options.mangle && options.mangle.properties) { - if (options.mangle.properties.domprops) { - delete options.mangle.properties.domprops; - } else { - if (typeof options.mangle.properties != "object") options.mangle.properties = {}; - if (!Array.isArray(options.mangle.properties.reserved)) options.mangle.properties.reserved = []; - require("../tools/domprops").forEach(function(name) { - UglifyJS.push_uniq(options.mangle.properties.reserved, name); - }); - } -} -if (/^ast|spidermonkey$/.test(output)) { - if (typeof options.output != "object") options.output = {}; - options.output.ast = true; - options.output.code = false; -} -if (options.parse && (options.parse.acorn || options.parse.spidermonkey) - && options.sourceMap && options.sourceMap.content == "inline") { - fatal("inline source map only works with built-in parser"); -} -if (options.warnings) { - UglifyJS.AST_Node.log_function(print_error, options.warnings == "verbose"); - delete options.warnings; -} -var convert_path = function(name) { - return name; -}; -if (typeof options.sourceMap == "object" && "base" in options.sourceMap) { - convert_path = function() { - var base = options.sourceMap.base; - delete options.sourceMap.base; - return function(name) { - return path.relative(base, name); - }; - }(); -} -if (specified["self"]) { - if (paths.length) UglifyJS.AST_Node.warn("Ignoring input files since --self was passed"); - if (!options.wrap) options.wrap = "UglifyJS"; - paths = UglifyJS.FILES; -} -if (specified["in-situ"]) { - if (output && output != "spidermonkey" || specified["reduce-test"] || specified["self"]) { - fatal("incompatible options specified"); - } - paths.forEach(function(name) { - print(name); - if (/^ast|spidermonkey$/.test(name)) fatal("invalid file name specified"); - files = {}; - files[convert_path(name)] = read_file(name); - output = name; - run(); - }); -} else if (paths.length) { - simple_glob(paths).forEach(function(name) { - files[convert_path(name)] = read_file(name); - }); - run(); -} else { - var timerId = process.stdin.isTTY && process.argv.length < 3 && setTimeout(function() { - print_error("Waiting for input... (use `--help` to print usage information)"); - }, 1500); - var chunks = []; - process.stdin.setEncoding("utf8"); - process.stdin.once("data", function() { - clearTimeout(timerId); - }).on("data", function(chunk) { - chunks.push(chunk); - }).on("end", function() { - files = { STDIN: chunks.join("") }; - run(); - }); - process.stdin.resume(); -} - -function convert_ast(fn) { - return UglifyJS.AST_Node.from_mozilla_ast(Object.keys(files).reduce(fn, null)); -} - -function run() { - var content = options.sourceMap && options.sourceMap.content; - if (content && content != "inline") { - UglifyJS.AST_Node.info("Using input source map: {content}", { - content : content, - }); - options.sourceMap.content = read_file(content, content); - } - try { - if (options.parse) { - if (options.parse.acorn) { - var annotations = Object.create(null); - files = convert_ast(function(toplevel, name) { - var content = files[name]; - var list = annotations[name] = []; - var prev = -1; - return require("acorn").parse(content, { - allowHashBang: true, - ecmaVersion: "latest", - locations: true, - onComment: function(block, text, start, end) { - var match = /[@#]__PURE__/.exec(text); - if (!match) { - if (start != prev) return; - match = [ list[prev] ]; - } - while (/\s/.test(content[end])) end++; - list[end] = match[0]; - prev = end; - }, - preserveParens: true, - program: toplevel, - sourceFile: name, - sourceType: "module", - }); - }); - files.walk(new UglifyJS.TreeWalker(function(node) { - if (!(node instanceof UglifyJS.AST_Call)) return; - var list = annotations[node.start.file]; - var pure = list[node.start.pos]; - if (!pure) { - var tokens = node.start.parens; - if (tokens) for (var i = 0; !pure && i < tokens.length; i++) { - pure = list[tokens[i].pos]; - } - } - if (pure) node.pure = pure; - })); - } else if (options.parse.spidermonkey) { - files = convert_ast(function(toplevel, name) { - var obj = JSON.parse(files[name]); - if (!toplevel) return obj; - toplevel.body = toplevel.body.concat(obj.body); - return toplevel; - }); - } - } - } catch (ex) { - fatal(ex); - } - var result; - if (specified["reduce-test"]) { - // load on demand - assumes cloned repository - var reduce_test = require("../test/reduce"); - if (Object.keys(files).length != 1) fatal("can only test on a single file"); - result = reduce_test(files[Object.keys(files)[0]], options, { - log: print_error, - verbose: true, - }); - } else { - result = UglifyJS.minify(files, options); - } - if (result.error) { - var ex = result.error; - if (ex.name == "SyntaxError") { - print_error("Parse error at " + ex.filename + ":" + ex.line + "," + ex.col); - var file = files[ex.filename]; - if (file) { - var col = ex.col; - var lines = file.split(/\r?\n/); - var line = lines[ex.line - 1]; - if (!line && !col) { - line = lines[ex.line - 2]; - col = line.length; - } - if (line) { - var limit = 70; - if (col > limit) { - line = line.slice(col - limit); - col = limit; - } - print_error(line.slice(0, 80)); - print_error(line.slice(0, col).replace(/\S/g, " ") + "^"); - } - } - } else if (ex.defs) { - print_error("Supported options:"); - print_error(format_object(ex.defs)); - } - fatal(ex); - } else if (output == "ast") { - if (!options.compress && !options.mangle) { - var toplevel = result.ast; - if (!(toplevel instanceof UglifyJS.AST_Toplevel)) { - if (!(toplevel instanceof UglifyJS.AST_Statement)) toplevel = new UglifyJS.AST_SimpleStatement({ - body: toplevel, - }); - toplevel = new UglifyJS.AST_Toplevel({ - body: [ toplevel ], - }); - } - toplevel.figure_out_scope({}); - } - print(JSON.stringify(result.ast, function(key, value) { - if (value) switch (key) { - case "enclosed": - return value.length ? value.map(symdef) : undefined; - case "functions": - case "globals": - case "variables": - return value.size() ? value.map(symdef) : undefined; - case "thedef": - return symdef(value); - } - if (skip_key(key)) return; - if (value instanceof UglifyJS.AST_Token) return; - if (value instanceof UglifyJS.Dictionary) return; - if (value instanceof UglifyJS.AST_Node) { - var result = { - _class: "AST_" + value.TYPE - }; - value.CTOR.PROPS.forEach(function(prop) { - result[prop] = value[prop]; - }); - return result; - } - return value; - }, 2)); - } else if (output == "spidermonkey") { - print(JSON.stringify(result.ast.to_mozilla_ast(), null, 2)); - } else if (output) { - var code; - if (result.ast) { - var opts = {}; - for (var name in options.output) { - if (!/^ast|code$/.test(name)) opts[name] = options.output[name]; - } - code = UglifyJS.AST_Node.from_mozilla_ast(result.ast.to_mozilla_ast()).print_to_string(opts); - } else { - code = result.code; - } - fs.writeFileSync(output, code); - if (result.map) fs.writeFileSync(output + ".map", result.map); - } else { - print(result.code); - } - if (nameCache) fs.writeFileSync(nameCache, JSON.stringify(options.nameCache)); - if (result.timings) for (var phase in result.timings) { - print_error("- " + phase + ": " + result.timings[phase].toFixed(3) + "s"); - } -} - -function fatal(message) { - if (message instanceof Error) { - message = message.stack.replace(/^\S*?Error:/, "ERROR:") - } else { - message = "ERROR: " + message; - } - print_error(message); - process.exit(1); -} - -// A file glob function that only supports "*" and "?" wildcards in the basename. -// Example: "foo/bar/*baz??.*.js" -// Argument `glob` may be a string or an array of strings. -// Returns an array of strings. Garbage in, garbage out. -function simple_glob(glob) { - if (Array.isArray(glob)) { - return [].concat.apply([], glob.map(simple_glob)); - } - if (glob.match(/\*|\?/)) { - var dir = path.dirname(glob); - try { - var entries = fs.readdirSync(dir); - } catch (ex) {} - if (entries) { - var pattern = "^" + path.basename(glob) - .replace(/[.+^$[\]\\(){}]/g, "\\$&") - .replace(/\*/g, "[^/\\\\]*") - .replace(/\?/g, "[^/\\\\]") + "$"; - var mod = process.platform === "win32" ? "i" : ""; - var rx = new RegExp(pattern, mod); - var results = entries.sort().filter(function(name) { - return rx.test(name); - }).map(function(name) { - return path.join(dir, name); - }); - if (results.length) return results; - } - } - return [ glob ]; -} - -function read_file(path, default_value) { - try { - return fs.readFileSync(path, "utf8"); - } catch (ex) { - if (ex.code == "ENOENT" && default_value != null) return default_value; - fatal(ex); - } -} - -function parse_js(value, options, flag) { - if (!options || typeof options != "object") options = {}; - if (typeof value == "string") try { - UglifyJS.parse(value, { - expression: true - }).walk(new UglifyJS.TreeWalker(function(node) { - if (node instanceof UglifyJS.AST_Assign) { - var name = node.left.print_to_string(); - var value = node.right; - if (flag) { - options[name] = value; - } else if (value instanceof UglifyJS.AST_Array) { - options[name] = value.elements.map(to_string); - } else { - options[name] = to_string(value); - } - return true; - } - if (node instanceof UglifyJS.AST_Symbol || node instanceof UglifyJS.AST_PropAccess) { - var name = node.print_to_string(); - options[name] = true; - return true; - } - if (!(node instanceof UglifyJS.AST_Sequence)) throw node; - - function to_string(value) { - return value instanceof UglifyJS.AST_Constant ? value.value : value.print_to_string({ - quote_keys: true - }); - } - })); - } catch (ex) { - if (flag) { - fatal("cannot parse arguments for '" + flag + "': " + value); - } else { - options[value] = null; - } - } - return options; -} - -function skip_key(key) { - return skip_keys.indexOf(key) >= 0; -} - -function symdef(def) { - var ret = (1e6 + def.id) + " " + def.name; - if (def.mangled_name) ret += " " + def.mangled_name; - return ret; -} - -function format_object(obj) { - var lines = []; - var padding = ""; - Object.keys(obj).map(function(name) { - if (padding.length < name.length) padding = Array(name.length + 1).join(" "); - return [ name, JSON.stringify(obj[name]) ]; - }).forEach(function(tokens) { - lines.push(" " + tokens[0] + padding.slice(tokens[0].length - 2) + tokens[1]); - }); - return lines.join("\n"); -} - -function print_error(msg) { - process.stderr.write(msg); - process.stderr.write("\n"); -} - -function print(txt) { - process.stdout.write(txt); - process.stdout.write("\n"); -} diff --git a/node_modules/uglify-js/lib/ast.js b/node_modules/uglify-js/lib/ast.js deleted file mode 100644 index 28e437f7..00000000 --- a/node_modules/uglify-js/lib/ast.js +++ /dev/null @@ -1,2060 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -function DEFNODE(type, props, methods, base) { - if (typeof base === "undefined") base = AST_Node; - props = props ? props.split(/\s+/) : []; - var self_props = props; - if (base && base.PROPS) props = props.concat(base.PROPS); - var code = [ - "return function AST_", type, "(props){", - "if(props){", - ]; - props.forEach(function(prop) { - code.push("this.", prop, "=props.", prop, ";"); - }); - code.push("}"); - var proto = Object.create(base && base.prototype); - if (methods.initialize || proto.initialize) code.push("this.initialize();"); - code.push("};"); - var ctor = new Function(code.join(""))(); - ctor.prototype = proto; - ctor.prototype.CTOR = ctor; - ctor.prototype.TYPE = ctor.TYPE = type; - if (base) { - ctor.BASE = base; - base.SUBCLASSES.push(ctor); - } - ctor.DEFMETHOD = function(name, method) { - this.prototype[name] = method; - }; - ctor.PROPS = props; - ctor.SELF_PROPS = self_props; - ctor.SUBCLASSES = []; - for (var name in methods) if (HOP(methods, name)) { - if (/^\$/.test(name)) { - ctor[name.substr(1)] = methods[name]; - } else { - ctor.DEFMETHOD(name, methods[name]); - } - } - if (typeof exports !== "undefined") exports["AST_" + type] = ctor; - return ctor; -} - -var AST_Token = DEFNODE("Token", "type value line col pos endline endcol endpos nlb comments_before comments_after file raw", { -}, null); - -var AST_Node = DEFNODE("Node", "start end", { - _clone: function(deep) { - if (deep) { - var self = this.clone(); - return self.transform(new TreeTransformer(function(node) { - if (node !== self) { - return node.clone(true); - } - })); - } - return new this.CTOR(this); - }, - clone: function(deep) { - return this._clone(deep); - }, - $documentation: "Base class of all AST nodes", - $propdoc: { - start: "[AST_Token] The first token of this node", - end: "[AST_Token] The last token of this node" - }, - walk: function(visitor) { - visitor.visit(this); - }, - _validate: function() { - if (this.TYPE == "Node") throw new Error("should not instantiate AST_Node"); - }, - validate: function() { - var ctor = this.CTOR; - do { - ctor.prototype._validate.call(this); - } while (ctor = ctor.BASE); - }, - validate_ast: function() { - var marker = {}; - this.walk(new TreeWalker(function(node) { - if (node.validate_visited === marker) { - throw new Error(string_template("cannot reuse {type} from [{file}:{line},{col}]", { - type: "AST_" + node.TYPE, - file: node.start.file, - line: node.start.line, - col: node.start.col, - })); - } - node.validate_visited = marker; - })); - }, -}, null); - -(AST_Node.log_function = function(fn, verbose) { - if (typeof fn != "function") { - AST_Node.info = AST_Node.warn = noop; - return; - } - var printed = Object.create(null); - AST_Node.info = verbose ? function(text, props) { - log("INFO: " + string_template(text, props)); - } : noop; - AST_Node.warn = function(text, props) { - log("WARN: " + string_template(text, props)); - }; - - function log(msg) { - if (printed[msg]) return; - printed[msg] = true; - fn(msg); - } -})(); - -var restore_transforms = []; -AST_Node.enable_validation = function() { - AST_Node.disable_validation(); - (function validate_transform(ctor) { - ctor.SUBCLASSES.forEach(validate_transform); - if (!HOP(ctor.prototype, "transform")) return; - var transform = ctor.prototype.transform; - ctor.prototype.transform = function(tw, in_list) { - var node = transform.call(this, tw, in_list); - if (node instanceof AST_Node) { - node.validate(); - } else if (!(node === null || in_list && List.is_op(node))) { - throw new Error("invalid transformed value: " + node); - } - return node; - }; - restore_transforms.push(function() { - ctor.prototype.transform = transform; - }); - })(this); -}; - -AST_Node.disable_validation = function() { - var restore; - while (restore = restore_transforms.pop()) restore(); -}; - -/* -----[ statements ]----- */ - -var AST_Statement = DEFNODE("Statement", null, { - $documentation: "Base class of all statements", - _validate: function() { - if (this.TYPE == "Statement") throw new Error("should not instantiate AST_Statement"); - }, -}); - -var AST_Debugger = DEFNODE("Debugger", null, { - $documentation: "Represents a debugger statement", -}, AST_Statement); - -var AST_Directive = DEFNODE("Directive", "quote value", { - $documentation: "Represents a directive, like \"use strict\";", - $propdoc: { - quote: "[string?] the original quote character", - value: "[string] The value of this directive as a plain string (it's not an AST_String!)", - }, - _validate: function() { - if (this.quote != null) { - if (typeof this.quote != "string") throw new Error("quote must be string"); - if (!/^["']$/.test(this.quote)) throw new Error("invalid quote: " + this.quote); - } - if (typeof this.value != "string") throw new Error("value must be string"); - }, -}, AST_Statement); - -var AST_EmptyStatement = DEFNODE("EmptyStatement", null, { - $documentation: "The empty statement (empty block or simply a semicolon)" -}, AST_Statement); - -function is_statement(node) { - return node instanceof AST_Statement - && !(node instanceof AST_ClassExpression) - && !(node instanceof AST_LambdaExpression); -} - -function validate_expression(value, prop, multiple, allow_spread, allow_hole) { - multiple = multiple ? "contain" : "be"; - if (!(value instanceof AST_Node)) throw new Error(prop + " must " + multiple + " AST_Node"); - if (value instanceof AST_DefaultValue) throw new Error(prop + " cannot " + multiple + " AST_DefaultValue"); - if (value instanceof AST_Destructured) throw new Error(prop + " cannot " + multiple + " AST_Destructured"); - if (value instanceof AST_Hole && !allow_hole) throw new Error(prop + " cannot " + multiple + " AST_Hole"); - if (value instanceof AST_Spread && !allow_spread) throw new Error(prop + " cannot " + multiple + " AST_Spread"); - if (is_statement(value)) throw new Error(prop + " cannot " + multiple + " AST_Statement"); - if (value instanceof AST_SymbolDeclaration) { - throw new Error(prop + " cannot " + multiple + " AST_SymbolDeclaration"); - } -} - -function must_be_expression(node, prop) { - validate_expression(node[prop], prop); -} - -var AST_SimpleStatement = DEFNODE("SimpleStatement", "body", { - $documentation: "A statement consisting of an expression, i.e. a = 1 + 2", - $propdoc: { - body: "[AST_Node] an expression node (should not be instanceof AST_Statement)", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.body.walk(visitor); - }); - }, - _validate: function() { - must_be_expression(this, "body"); - }, -}, AST_Statement); - -var AST_BlockScope = DEFNODE("BlockScope", "enclosed functions make_def parent_scope variables", { - $documentation: "Base class for all statements introducing a lexical scope", - $propdoc: { - enclosed: "[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes", - functions: "[Dictionary/S] like `variables`, but only lists function declarations", - parent_scope: "[AST_Scope?/S] link to the parent scope", - variables: "[Dictionary/S] a map of name ---> SymbolDef for all variables/functions defined in this scope", - }, - clone: function(deep) { - var node = this._clone(deep); - if (this.enclosed) node.enclosed = this.enclosed.slice(); - if (this.functions) node.functions = this.functions.clone(); - if (this.variables) node.variables = this.variables.clone(); - return node; - }, - pinned: function() { - return this.resolve().pinned(); - }, - resolve: function() { - return this.parent_scope.resolve(); - }, - _validate: function() { - if (this.TYPE == "BlockScope") throw new Error("should not instantiate AST_BlockScope"); - if (this.parent_scope == null) return; - if (!(this.parent_scope instanceof AST_BlockScope)) throw new Error("parent_scope must be AST_BlockScope"); - if (!(this.resolve() instanceof AST_Scope)) throw new Error("must be contained within AST_Scope"); - }, -}, AST_Statement); - -function walk_body(node, visitor) { - node.body.forEach(function(node) { - node.walk(visitor); - }); -} - -var AST_Block = DEFNODE("Block", "body", { - $documentation: "A body of statements (usually braced)", - $propdoc: { - body: "[AST_Statement*] an array of statements" - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - walk_body(node, visitor); - }); - }, - _validate: function() { - if (this.TYPE == "Block") throw new Error("should not instantiate AST_Block"); - this.body.forEach(function(node) { - if (!is_statement(node)) throw new Error("body must contain AST_Statement"); - }); - }, -}, AST_BlockScope); - -var AST_BlockStatement = DEFNODE("BlockStatement", null, { - $documentation: "A block statement", -}, AST_Block); - -var AST_StatementWithBody = DEFNODE("StatementWithBody", "body", { - $documentation: "Base class for all statements that contain one nested body: `For`, `ForIn`, `Do`, `While`, `With`", - $propdoc: { - body: "[AST_Statement] the body; this should always be present, even if it's an AST_EmptyStatement" - }, - _validate: function() { - if (this.TYPE == "StatementWithBody") throw new Error("should not instantiate AST_StatementWithBody"); - if (!is_statement(this.body)) throw new Error("body must be AST_Statement"); - }, -}, AST_BlockScope); - -var AST_LabeledStatement = DEFNODE("LabeledStatement", "label", { - $documentation: "Statement with a label", - $propdoc: { - label: "[AST_Label] a label definition" - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.label.walk(visitor); - node.body.walk(visitor); - }); - }, - clone: function(deep) { - var node = this._clone(deep); - if (deep) { - var label = node.label; - var def = this.label; - node.walk(new TreeWalker(function(node) { - if (node instanceof AST_LoopControl) { - if (!node.label || node.label.thedef !== def) return; - node.label.thedef = label; - label.references.push(node); - return true; - } - if (node instanceof AST_Scope) return true; - })); - } - return node; - }, - _validate: function() { - if (!(this.label instanceof AST_Label)) throw new Error("label must be AST_Label"); - }, -}, AST_StatementWithBody); - -var AST_IterationStatement = DEFNODE("IterationStatement", null, { - $documentation: "Internal class. All loops inherit from it.", - _validate: function() { - if (this.TYPE == "IterationStatement") throw new Error("should not instantiate AST_IterationStatement"); - }, -}, AST_StatementWithBody); - -var AST_DWLoop = DEFNODE("DWLoop", "condition", { - $documentation: "Base class for do/while statements", - $propdoc: { - condition: "[AST_Node] the loop condition. Should not be instanceof AST_Statement" - }, - _validate: function() { - if (this.TYPE == "DWLoop") throw new Error("should not instantiate AST_DWLoop"); - must_be_expression(this, "condition"); - }, -}, AST_IterationStatement); - -var AST_Do = DEFNODE("Do", null, { - $documentation: "A `do` statement", - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.body.walk(visitor); - node.condition.walk(visitor); - }); - } -}, AST_DWLoop); - -var AST_While = DEFNODE("While", null, { - $documentation: "A `while` statement", - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.condition.walk(visitor); - node.body.walk(visitor); - }); - } -}, AST_DWLoop); - -var AST_For = DEFNODE("For", "init condition step", { - $documentation: "A `for` statement", - $propdoc: { - init: "[AST_Node?] the `for` initialization code, or null if empty", - condition: "[AST_Node?] the `for` termination clause, or null if empty", - step: "[AST_Node?] the `for` update clause, or null if empty" - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - if (node.init) node.init.walk(visitor); - if (node.condition) node.condition.walk(visitor); - if (node.step) node.step.walk(visitor); - node.body.walk(visitor); - }); - }, - _validate: function() { - if (this.init != null) { - if (!(this.init instanceof AST_Node)) throw new Error("init must be AST_Node"); - if (is_statement(this.init) && !(this.init instanceof AST_Definitions)) { - throw new Error("init cannot be AST_Statement"); - } - } - if (this.condition != null) must_be_expression(this, "condition"); - if (this.step != null) must_be_expression(this, "step"); - }, -}, AST_IterationStatement); - -var AST_ForEnumeration = DEFNODE("ForEnumeration", "init object", { - $documentation: "Base class for enumeration loops, i.e. `for ... in`, `for ... of` & `for await ... of`", - $propdoc: { - init: "[AST_Node] the assignment target during iteration", - object: "[AST_Node] the object to iterate over" - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.init.walk(visitor); - node.object.walk(visitor); - node.body.walk(visitor); - }); - }, - _validate: function() { - if (this.TYPE == "ForEnumeration") throw new Error("should not instantiate AST_ForEnumeration"); - if (this.init instanceof AST_Definitions) { - if (this.init.definitions.length != 1) throw new Error("init must have single declaration"); - } else { - validate_destructured(this.init, function(node) { - if (!(node instanceof AST_PropAccess || node instanceof AST_SymbolRef)) { - throw new Error("init must be assignable: " + node.TYPE); - } - }); - } - must_be_expression(this, "object"); - }, -}, AST_IterationStatement); - -var AST_ForIn = DEFNODE("ForIn", null, { - $documentation: "A `for ... in` statement", -}, AST_ForEnumeration); - -var AST_ForOf = DEFNODE("ForOf", null, { - $documentation: "A `for ... of` statement", -}, AST_ForEnumeration); - -var AST_ForAwaitOf = DEFNODE("ForAwaitOf", null, { - $documentation: "A `for await ... of` statement", -}, AST_ForOf); - -var AST_With = DEFNODE("With", "expression", { - $documentation: "A `with` statement", - $propdoc: { - expression: "[AST_Node] the `with` expression" - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.expression.walk(visitor); - node.body.walk(visitor); - }); - }, - _validate: function() { - must_be_expression(this, "expression"); - }, -}, AST_StatementWithBody); - -/* -----[ scope and functions ]----- */ - -var AST_Scope = DEFNODE("Scope", "uses_eval uses_with", { - $documentation: "Base class for all statements introducing a lexical scope", - $propdoc: { - uses_eval: "[boolean/S] tells whether this scope contains a direct call to the global `eval`", - uses_with: "[boolean/S] tells whether this scope uses the `with` statement", - }, - pinned: function() { - return this.uses_eval || this.uses_with; - }, - resolve: return_this, - _validate: function() { - if (this.TYPE == "Scope") throw new Error("should not instantiate AST_Scope"); - }, -}, AST_Block); - -var AST_Toplevel = DEFNODE("Toplevel", "globals", { - $documentation: "The toplevel scope", - $propdoc: { - globals: "[Dictionary/S] a map of name ---> SymbolDef for all undeclared names", - }, - wrap: function(name) { - var body = this.body; - return parse([ - "(function(exports){'$ORIG';})(typeof ", - name, - "=='undefined'?(", - name, - "={}):", - name, - ");" - ].join(""), { - filename: "wrap=" + JSON.stringify(name) - }).transform(new TreeTransformer(function(node) { - if (node instanceof AST_Directive && node.value == "$ORIG") { - return List.splice(body); - } - })); - }, - enclose: function(args_values) { - if (typeof args_values != "string") args_values = ""; - var index = args_values.indexOf(":"); - if (index < 0) index = args_values.length; - var body = this.body; - return parse([ - "(function(", - args_values.slice(0, index), - '){"$ORIG"})(', - args_values.slice(index + 1), - ")" - ].join(""), { - filename: "enclose=" + JSON.stringify(args_values) - }).transform(new TreeTransformer(function(node) { - if (node instanceof AST_Directive && node.value == "$ORIG") { - return List.splice(body); - } - })); - } -}, AST_Scope); - -var AST_Lambda = DEFNODE("Lambda", "argnames length_read rest uses_arguments", { - $documentation: "Base class for functions", - $propdoc: { - argnames: "[(AST_DefaultValue|AST_Destructured|AST_SymbolFunarg)*] array of function arguments and/or destructured literals", - length_read: "[boolean/S] whether length property of this function is accessed", - rest: "[(AST_Destructured|AST_SymbolFunarg)?] rest parameter, or null if absent", - uses_arguments: "[boolean/S] whether this function accesses the arguments array", - }, - each_argname: function(visit) { - var tw = new TreeWalker(function(node) { - if (node instanceof AST_DefaultValue) { - node.name.walk(tw); - return true; - } - if (node instanceof AST_DestructuredKeyVal) { - node.value.walk(tw); - return true; - } - if (node instanceof AST_SymbolFunarg) visit(node); - }); - this.argnames.forEach(function(argname) { - argname.walk(tw); - }); - if (this.rest) this.rest.walk(tw); - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - if (node.name) node.name.walk(visitor); - node.argnames.forEach(function(argname) { - argname.walk(visitor); - }); - if (node.rest) node.rest.walk(visitor); - walk_body(node, visitor); - }); - }, - _validate: function() { - if (this.TYPE == "Lambda") throw new Error("should not instantiate AST_Lambda"); - this.argnames.forEach(function(node) { - validate_destructured(node, function(node) { - if (!(node instanceof AST_SymbolFunarg)) throw new Error("argnames must be AST_SymbolFunarg[]"); - }, true); - }); - if (this.rest != null) validate_destructured(this.rest, function(node) { - if (!(node instanceof AST_SymbolFunarg)) throw new Error("rest must be AST_SymbolFunarg"); - }); - }, -}, AST_Scope); - -var AST_Accessor = DEFNODE("Accessor", null, { - $documentation: "A getter/setter function", - _validate: function() { - if (this.name != null) throw new Error("name must be null"); - }, -}, AST_Lambda); - -var AST_LambdaExpression = DEFNODE("LambdaExpression", "inlined", { - $documentation: "Base class for function expressions", - $propdoc: { - inlined: "[boolean/S] whether this function has been inlined", - }, - _validate: function() { - if (this.TYPE == "LambdaExpression") throw new Error("should not instantiate AST_LambdaExpression"); - }, -}, AST_Lambda); - -function is_arrow(node) { - return node instanceof AST_Arrow || node instanceof AST_AsyncArrow; -} - -function is_async(node) { - return node instanceof AST_AsyncArrow - || node instanceof AST_AsyncDefun - || node instanceof AST_AsyncFunction - || node instanceof AST_AsyncGeneratorDefun - || node instanceof AST_AsyncGeneratorFunction; -} - -function is_generator(node) { - return node instanceof AST_AsyncGeneratorDefun - || node instanceof AST_AsyncGeneratorFunction - || node instanceof AST_GeneratorDefun - || node instanceof AST_GeneratorFunction; -} - -function walk_lambda(node, tw) { - if (is_arrow(node) && node.value) { - node.value.walk(tw); - } else { - walk_body(node, tw); - } -} - -var AST_Arrow = DEFNODE("Arrow", "value", { - $documentation: "An arrow function expression", - $propdoc: { - value: "[AST_Node?] simple return expression, or null if using function body.", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.argnames.forEach(function(argname) { - argname.walk(visitor); - }); - if (node.rest) node.rest.walk(visitor); - if (node.value) { - node.value.walk(visitor); - } else { - walk_body(node, visitor); - } - }); - }, - _validate: function() { - if (this.name != null) throw new Error("name must be null"); - if (this.uses_arguments) throw new Error("uses_arguments must be false"); - if (this.value != null) { - must_be_expression(this, "value"); - if (this.body.length) throw new Error("body must be empty if value exists"); - } - }, -}, AST_LambdaExpression); - -var AST_AsyncArrow = DEFNODE("AsyncArrow", "value", { - $documentation: "An asynchronous arrow function expression", - $propdoc: { - value: "[AST_Node?] simple return expression, or null if using function body.", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.argnames.forEach(function(argname) { - argname.walk(visitor); - }); - if (node.rest) node.rest.walk(visitor); - if (node.value) { - node.value.walk(visitor); - } else { - walk_body(node, visitor); - } - }); - }, - _validate: function() { - if (this.name != null) throw new Error("name must be null"); - if (this.uses_arguments) throw new Error("uses_arguments must be false"); - if (this.value != null) { - must_be_expression(this, "value"); - if (this.body.length) throw new Error("body must be empty if value exists"); - } - }, -}, AST_LambdaExpression); - -var AST_AsyncFunction = DEFNODE("AsyncFunction", "name", { - $documentation: "An asynchronous function expression", - $propdoc: { - name: "[AST_SymbolLambda?] the name of this function, or null if not specified", - }, - _validate: function() { - if (this.name != null) { - if (!(this.name instanceof AST_SymbolLambda)) throw new Error("name must be AST_SymbolLambda"); - } - }, -}, AST_LambdaExpression); - -var AST_AsyncGeneratorFunction = DEFNODE("AsyncGeneratorFunction", "name", { - $documentation: "An asynchronous generator function expression", - $propdoc: { - name: "[AST_SymbolLambda?] the name of this function, or null if not specified", - }, - _validate: function() { - if (this.name != null) { - if (!(this.name instanceof AST_SymbolLambda)) throw new Error("name must be AST_SymbolLambda"); - } - }, -}, AST_LambdaExpression); - -var AST_Function = DEFNODE("Function", "name", { - $documentation: "A function expression", - $propdoc: { - name: "[AST_SymbolLambda?] the name of this function, or null if not specified", - }, - _validate: function() { - if (this.name != null) { - if (!(this.name instanceof AST_SymbolLambda)) throw new Error("name must be AST_SymbolLambda"); - } - }, -}, AST_LambdaExpression); - -var AST_GeneratorFunction = DEFNODE("GeneratorFunction", "name", { - $documentation: "A generator function expression", - $propdoc: { - name: "[AST_SymbolLambda?] the name of this function, or null if not specified", - }, - _validate: function() { - if (this.name != null) { - if (!(this.name instanceof AST_SymbolLambda)) throw new Error("name must be AST_SymbolLambda"); - } - }, -}, AST_LambdaExpression); - -var AST_LambdaDefinition = DEFNODE("LambdaDefinition", "inlined name", { - $documentation: "Base class for function definitions", - $propdoc: { - inlined: "[boolean/S] whether this function has been inlined", - name: "[AST_SymbolDefun] the name of this function", - }, - _validate: function() { - if (this.TYPE == "LambdaDefinition") throw new Error("should not instantiate AST_LambdaDefinition"); - if (!(this.name instanceof AST_SymbolDefun)) throw new Error("name must be AST_SymbolDefun"); - }, -}, AST_Lambda); - -var AST_AsyncDefun = DEFNODE("AsyncDefun", null, { - $documentation: "An asynchronous function definition", -}, AST_LambdaDefinition); - -var AST_AsyncGeneratorDefun = DEFNODE("AsyncGeneratorDefun", null, { - $documentation: "An asynchronous generator function definition", -}, AST_LambdaDefinition); - -var AST_Defun = DEFNODE("Defun", null, { - $documentation: "A function definition", -}, AST_LambdaDefinition); - -var AST_GeneratorDefun = DEFNODE("GeneratorDefun", null, { - $documentation: "A generator function definition", -}, AST_LambdaDefinition); - -/* -----[ classes ]----- */ - -var AST_Class = DEFNODE("Class", "extends name properties", { - $documentation: "Base class for class literals", - $propdoc: { - extends: "[AST_Node?] the super class, or null if not specified", - properties: "[AST_ClassProperty*] array of class properties", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - if (node.name) node.name.walk(visitor); - if (node.extends) node.extends.walk(visitor); - node.properties.forEach(function(prop) { - prop.walk(visitor); - }); - }); - }, - _validate: function() { - if (this.TYPE == "Class") throw new Error("should not instantiate AST_Class"); - if (this.extends != null) must_be_expression(this, "extends"); - this.properties.forEach(function(node) { - if (!(node instanceof AST_ClassProperty)) throw new Error("properties must contain AST_ClassProperty"); - }); - }, -}, AST_BlockScope); - -var AST_DefClass = DEFNODE("DefClass", null, { - $documentation: "A class definition", - $propdoc: { - name: "[AST_SymbolDefClass] the name of this class", - }, - _validate: function() { - if (!(this.name instanceof AST_SymbolDefClass)) throw new Error("name must be AST_SymbolDefClass"); - }, -}, AST_Class); - -var AST_ClassExpression = DEFNODE("ClassExpression", null, { - $documentation: "A class expression", - $propdoc: { - name: "[AST_SymbolClass?] the name of this class, or null if not specified", - }, - _validate: function() { - if (this.name != null) { - if (!(this.name instanceof AST_SymbolClass)) throw new Error("name must be AST_SymbolClass"); - } - }, -}, AST_Class); - -var AST_ClassProperty = DEFNODE("ClassProperty", "key private static value", { - $documentation: "Base class for `class` properties", - $propdoc: { - key: "[string|AST_Node] property name (AST_Node for computed property)", - private: "[boolean] whether this is a private property", - static: "[boolean] whether this is a static property", - value: "[AST_Node?] property value (AST_Accessor for getters/setters, AST_LambdaExpression for methods, null if not specified for fields)", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - if (node.key instanceof AST_Node) node.key.walk(visitor); - if (node.value) node.value.walk(visitor); - }); - }, - _validate: function() { - if (this.TYPE == "ClassProperty") throw new Error("should not instantiate AST_ClassProperty"); - if (typeof this.key != "string") { - if (!(this.key instanceof AST_Node)) throw new Error("key must be string or AST_Node"); - must_be_expression(this, "key"); - } - if(this.value != null) { - if (!(this.value instanceof AST_Node)) throw new Error("value must be AST_Node"); - } - }, -}); - -var AST_ClassField = DEFNODE("ClassField", null, { - $documentation: "A `class` field", - _validate: function() { - if(this.value != null) must_be_expression(this, "value"); - }, -}, AST_ClassProperty); - -var AST_ClassGetter = DEFNODE("ClassGetter", null, { - $documentation: "A `class` getter", - _validate: function() { - if (!(this.value instanceof AST_Accessor)) throw new Error("value must be AST_Accessor"); - }, -}, AST_ClassProperty); - -var AST_ClassSetter = DEFNODE("ClassSetter", null, { - $documentation: "A `class` setter", - _validate: function() { - if (!(this.value instanceof AST_Accessor)) throw new Error("value must be AST_Accessor"); - }, -}, AST_ClassProperty); - -var AST_ClassMethod = DEFNODE("ClassMethod", null, { - $documentation: "A `class` method", - _validate: function() { - if (!(this.value instanceof AST_LambdaExpression)) throw new Error("value must be AST_LambdaExpression"); - if (is_arrow(this.value)) throw new Error("value cannot be AST_Arrow or AST_AsyncArrow"); - if (this.value.name != null) throw new Error("name of class method's lambda must be null"); - }, -}, AST_ClassProperty); - -/* -----[ JUMPS ]----- */ - -var AST_Jump = DEFNODE("Jump", null, { - $documentation: "Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)", - _validate: function() { - if (this.TYPE == "Jump") throw new Error("should not instantiate AST_Jump"); - }, -}, AST_Statement); - -var AST_Exit = DEFNODE("Exit", "value", { - $documentation: "Base class for “exits” (`return` and `throw`)", - $propdoc: { - value: "[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return" - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - if (node.value) node.value.walk(visitor); - }); - }, - _validate: function() { - if (this.TYPE == "Exit") throw new Error("should not instantiate AST_Exit"); - }, -}, AST_Jump); - -var AST_Return = DEFNODE("Return", null, { - $documentation: "A `return` statement", - _validate: function() { - if (this.value != null) must_be_expression(this, "value"); - }, -}, AST_Exit); - -var AST_Throw = DEFNODE("Throw", null, { - $documentation: "A `throw` statement", - _validate: function() { - must_be_expression(this, "value"); - }, -}, AST_Exit); - -var AST_LoopControl = DEFNODE("LoopControl", "label", { - $documentation: "Base class for loop control statements (`break` and `continue`)", - $propdoc: { - label: "[AST_LabelRef?] the label, or null if none", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - if (node.label) node.label.walk(visitor); - }); - }, - _validate: function() { - if (this.TYPE == "LoopControl") throw new Error("should not instantiate AST_LoopControl"); - if (this.label != null) { - if (!(this.label instanceof AST_LabelRef)) throw new Error("label must be AST_LabelRef"); - } - }, -}, AST_Jump); - -var AST_Break = DEFNODE("Break", null, { - $documentation: "A `break` statement" -}, AST_LoopControl); - -var AST_Continue = DEFNODE("Continue", null, { - $documentation: "A `continue` statement" -}, AST_LoopControl); - -/* -----[ IF ]----- */ - -var AST_If = DEFNODE("If", "condition alternative", { - $documentation: "A `if` statement", - $propdoc: { - condition: "[AST_Node] the `if` condition", - alternative: "[AST_Statement?] the `else` part, or null if not present" - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.condition.walk(visitor); - node.body.walk(visitor); - if (node.alternative) node.alternative.walk(visitor); - }); - }, - _validate: function() { - must_be_expression(this, "condition"); - if (this.alternative != null) { - if (!is_statement(this.alternative)) throw new Error("alternative must be AST_Statement"); - } - }, -}, AST_StatementWithBody); - -/* -----[ SWITCH ]----- */ - -var AST_Switch = DEFNODE("Switch", "expression", { - $documentation: "A `switch` statement", - $propdoc: { - expression: "[AST_Node] the `switch` “discriminant”" - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.expression.walk(visitor); - walk_body(node, visitor); - }); - }, - _validate: function() { - must_be_expression(this, "expression"); - this.body.forEach(function(node) { - if (!(node instanceof AST_SwitchBranch)) throw new Error("body must be AST_SwitchBranch[]"); - }); - }, -}, AST_Block); - -var AST_SwitchBranch = DEFNODE("SwitchBranch", null, { - $documentation: "Base class for `switch` branches", - _validate: function() { - if (this.TYPE == "SwitchBranch") throw new Error("should not instantiate AST_SwitchBranch"); - }, -}, AST_Block); - -var AST_Default = DEFNODE("Default", null, { - $documentation: "A `default` switch branch", -}, AST_SwitchBranch); - -var AST_Case = DEFNODE("Case", "expression", { - $documentation: "A `case` switch branch", - $propdoc: { - expression: "[AST_Node] the `case` expression" - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.expression.walk(visitor); - walk_body(node, visitor); - }); - }, - _validate: function() { - must_be_expression(this, "expression"); - }, -}, AST_SwitchBranch); - -/* -----[ EXCEPTIONS ]----- */ - -var AST_Try = DEFNODE("Try", "bcatch bfinally", { - $documentation: "A `try` statement", - $propdoc: { - bcatch: "[AST_Catch?] the catch block, or null if not present", - bfinally: "[AST_Finally?] the finally block, or null if not present" - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - walk_body(node, visitor); - if (node.bcatch) node.bcatch.walk(visitor); - if (node.bfinally) node.bfinally.walk(visitor); - }); - }, - _validate: function() { - if (this.bcatch != null) { - if (!(this.bcatch instanceof AST_Catch)) throw new Error("bcatch must be AST_Catch"); - } - if (this.bfinally != null) { - if (!(this.bfinally instanceof AST_Finally)) throw new Error("bfinally must be AST_Finally"); - } - }, -}, AST_Block); - -var AST_Catch = DEFNODE("Catch", "argname", { - $documentation: "A `catch` node; only makes sense as part of a `try` statement", - $propdoc: { - argname: "[(AST_Destructured|AST_SymbolCatch)?] symbol for the exception, or null if not present", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - if (node.argname) node.argname.walk(visitor); - walk_body(node, visitor); - }); - }, - _validate: function() { - if (this.argname != null) validate_destructured(this.argname, function(node) { - if (!(node instanceof AST_SymbolCatch)) throw new Error("argname must be AST_SymbolCatch"); - }); - }, -}, AST_Block); - -var AST_Finally = DEFNODE("Finally", null, { - $documentation: "A `finally` node; only makes sense as part of a `try` statement" -}, AST_Block); - -/* -----[ VAR ]----- */ - -var AST_Definitions = DEFNODE("Definitions", "definitions", { - $documentation: "Base class for `var` nodes (variable declarations/initializations)", - $propdoc: { - definitions: "[AST_VarDef*] array of variable definitions" - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.definitions.forEach(function(defn) { - defn.walk(visitor); - }); - }); - }, - _validate: function() { - if (this.TYPE == "Definitions") throw new Error("should not instantiate AST_Definitions"); - if (this.definitions.length < 1) throw new Error("must have at least one definition"); - }, -}, AST_Statement); - -var AST_Const = DEFNODE("Const", null, { - $documentation: "A `const` statement", - _validate: function() { - this.definitions.forEach(function(node) { - if (!(node instanceof AST_VarDef)) throw new Error("definitions must be AST_VarDef[]"); - validate_destructured(node.name, function(node) { - if (!(node instanceof AST_SymbolConst)) throw new Error("name must be AST_SymbolConst"); - }); - }); - }, -}, AST_Definitions); - -var AST_Let = DEFNODE("Let", null, { - $documentation: "A `let` statement", - _validate: function() { - this.definitions.forEach(function(node) { - if (!(node instanceof AST_VarDef)) throw new Error("definitions must be AST_VarDef[]"); - validate_destructured(node.name, function(node) { - if (!(node instanceof AST_SymbolLet)) throw new Error("name must be AST_SymbolLet"); - }); - }); - }, -}, AST_Definitions); - -var AST_Var = DEFNODE("Var", null, { - $documentation: "A `var` statement", - _validate: function() { - this.definitions.forEach(function(node) { - if (!(node instanceof AST_VarDef)) throw new Error("definitions must be AST_VarDef[]"); - validate_destructured(node.name, function(node) { - if (!(node instanceof AST_SymbolVar)) throw new Error("name must be AST_SymbolVar"); - }); - }); - }, -}, AST_Definitions); - -var AST_VarDef = DEFNODE("VarDef", "name value", { - $documentation: "A variable declaration; only appears in a AST_Definitions node", - $propdoc: { - name: "[AST_Destructured|AST_SymbolVar] name of the variable", - value: "[AST_Node?] initializer, or null of there's no initializer", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.name.walk(visitor); - if (node.value) node.value.walk(visitor); - }); - }, - _validate: function() { - if (this.value != null) must_be_expression(this, "value"); - }, -}); - -/* -----[ OTHER ]----- */ - -var AST_ExportDeclaration = DEFNODE("ExportDeclaration", "body", { - $documentation: "An `export` statement", - $propdoc: { - body: "[AST_DefClass|AST_Definitions|AST_LambdaDefinition] the statement to export", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.body.walk(visitor); - }); - }, - _validate: function() { - if (!(this.body instanceof AST_DefClass - || this.body instanceof AST_Definitions - || this.body instanceof AST_LambdaDefinition)) { - throw new Error("body must be AST_DefClass, AST_Definitions or AST_LambdaDefinition"); - } - }, -}, AST_Statement); - -var AST_ExportDefault = DEFNODE("ExportDefault", "body", { - $documentation: "An `export default` statement", - $propdoc: { - body: "[AST_Node] the default export", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.body.walk(visitor); - }); - }, - _validate: function() { - if (!(this.body instanceof AST_DefClass || this.body instanceof AST_LambdaDefinition)) { - must_be_expression(this, "body"); - } - }, -}, AST_Statement); - -var AST_ExportForeign = DEFNODE("ExportForeign", "aliases keys path quote", { - $documentation: "An `export ... from '...'` statement", - $propdoc: { - aliases: "[string*] array of aliases to export", - keys: "[string*] array of keys to import", - path: "[string] the path to import module", - quote: "[string?] the original quote character", - }, - _validate: function() { - if (this.aliases.length != this.keys.length) { - throw new Error("aliases:key length mismatch: " + this.aliases.length + " != " + this.keys.length); - } - this.aliases.forEach(function(name) { - if (typeof name != "string") throw new Error("aliases must contain string"); - }); - this.keys.forEach(function(name) { - if (typeof name != "string") throw new Error("keys must contain string"); - }); - if (typeof this.path != "string") throw new Error("path must be string"); - if (this.quote != null) { - if (typeof this.quote != "string") throw new Error("quote must be string"); - if (!/^["']$/.test(this.quote)) throw new Error("invalid quote: " + this.quote); - } - }, -}, AST_Statement); - -var AST_ExportReferences = DEFNODE("ExportReferences", "properties", { - $documentation: "An `export { ... }` statement", - $propdoc: { - properties: "[AST_SymbolExport*] array of aliases to export", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.properties.forEach(function(prop) { - prop.walk(visitor); - }); - }); - }, - _validate: function() { - this.properties.forEach(function(prop) { - if (!(prop instanceof AST_SymbolExport)) throw new Error("properties must contain AST_SymbolExport"); - }); - }, -}, AST_Statement); - -var AST_Import = DEFNODE("Import", "all default path properties quote", { - $documentation: "An `import` statement", - $propdoc: { - all: "[AST_SymbolImport?] the imported namespace, or null if not specified", - default: "[AST_SymbolImport?] the alias for default `export`, or null if not specified", - path: "[string] the path to import module", - properties: "[(AST_SymbolImport*)?] array of aliases, or null if not specified", - quote: "[string?] the original quote character", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - if (node.all) node.all.walk(visitor); - if (node.default) node.default.walk(visitor); - if (node.properties) node.properties.forEach(function(prop) { - prop.walk(visitor); - }); - }); - }, - _validate: function() { - if (this.all != null) { - if (!(this.all instanceof AST_SymbolImport)) throw new Error("all must be AST_SymbolImport"); - if (this.properties != null) throw new Error("cannot import both * and {} in the same statement"); - } - if (this.default != null) { - if (!(this.default instanceof AST_SymbolImport)) throw new Error("default must be AST_SymbolImport"); - if (this.default.key !== "") throw new Error("invalid default key: " + this.default.key); - } - if (typeof this.path != "string") throw new Error("path must be string"); - if (this.properties != null) this.properties.forEach(function(node) { - if (!(node instanceof AST_SymbolImport)) throw new Error("properties must contain AST_SymbolImport"); - }); - if (this.quote != null) { - if (typeof this.quote != "string") throw new Error("quote must be string"); - if (!/^["']$/.test(this.quote)) throw new Error("invalid quote: " + this.quote); - } - }, -}, AST_Statement); - -var AST_DefaultValue = DEFNODE("DefaultValue", "name value", { - $documentation: "A default value declaration", - $propdoc: { - name: "[AST_Destructured|AST_SymbolDeclaration] name of the variable", - value: "[AST_Node] value to assign if variable is `undefined`", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.name.walk(visitor); - node.value.walk(visitor); - }); - }, - _validate: function() { - must_be_expression(this, "value"); - }, -}); - -function must_be_expressions(node, prop, allow_spread, allow_hole) { - node[prop].forEach(function(node) { - validate_expression(node, prop, true, allow_spread, allow_hole); - }); -} - -var AST_Call = DEFNODE("Call", "args expression optional pure", { - $documentation: "A function call expression", - $propdoc: { - args: "[AST_Node*] array of arguments", - expression: "[AST_Node] expression to invoke as function", - optional: "[boolean] whether the expression is optional chaining", - pure: "[string/S] marker for side-effect-free call expression", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.expression.walk(visitor); - node.args.forEach(function(arg) { - arg.walk(visitor); - }); - }); - }, - _validate: function() { - must_be_expression(this, "expression"); - must_be_expressions(this, "args", true); - }, -}); - -var AST_New = DEFNODE("New", null, { - $documentation: "An object instantiation. Derives from a function call since it has exactly the same properties", - _validate: function() { - if (this.optional) throw new Error("optional must be false"); - }, -}, AST_Call); - -var AST_Sequence = DEFNODE("Sequence", "expressions", { - $documentation: "A sequence expression (comma-separated expressions)", - $propdoc: { - expressions: "[AST_Node*] array of expressions (at least two)" - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.expressions.forEach(function(expr) { - expr.walk(visitor); - }); - }); - }, - _validate: function() { - if (this.expressions.length < 2) throw new Error("expressions must contain multiple elements"); - must_be_expressions(this, "expressions"); - }, -}); - -var AST_PropAccess = DEFNODE("PropAccess", "expression optional property", { - $documentation: "Base class for property access expressions, i.e. `a.foo` or `a[\"foo\"]`", - $propdoc: { - expression: "[AST_Node] the “container” expression", - optional: "[boolean] whether the expression is optional chaining", - property: "[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it's an arbitrary AST_Node", - }, - getProperty: function() { - var p = this.property; - if (p instanceof AST_Constant) { - return p.value; - } - if (p instanceof AST_UnaryPrefix - && p.operator == "void" - && p.expression instanceof AST_Constant) { - return; - } - return p; - }, - _validate: function() { - if (this.TYPE == "PropAccess") throw new Error("should not instantiate AST_PropAccess"); - must_be_expression(this, "expression"); - }, -}); - -var AST_Dot = DEFNODE("Dot", null, { - $documentation: "A dotted property access expression", - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.expression.walk(visitor); - }); - }, - _validate: function() { - if (typeof this.property != "string") throw new Error("property must be string"); - }, -}, AST_PropAccess); - -var AST_Sub = DEFNODE("Sub", null, { - $documentation: "Index-style property access, i.e. `a[\"foo\"]`", - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.expression.walk(visitor); - node.property.walk(visitor); - }); - }, - _validate: function() { - must_be_expression(this, "property"); - }, -}, AST_PropAccess); - -var AST_Spread = DEFNODE("Spread", "expression", { - $documentation: "Spread expression in array/object literals or function calls", - $propdoc: { - expression: "[AST_Node] expression to be expanded", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.expression.walk(visitor); - }); - }, - _validate: function() { - must_be_expression(this, "expression"); - }, -}); - -var AST_Unary = DEFNODE("Unary", "operator expression", { - $documentation: "Base class for unary expressions", - $propdoc: { - operator: "[string] the operator", - expression: "[AST_Node] expression that this unary operator applies to" - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.expression.walk(visitor); - }); - }, - _validate: function() { - if (this.TYPE == "Unary") throw new Error("should not instantiate AST_Unary"); - if (typeof this.operator != "string") throw new Error("operator must be string"); - must_be_expression(this, "expression"); - }, -}); - -var AST_UnaryPrefix = DEFNODE("UnaryPrefix", null, { - $documentation: "Unary prefix expression, i.e. `typeof i` or `++i`" -}, AST_Unary); - -var AST_UnaryPostfix = DEFNODE("UnaryPostfix", null, { - $documentation: "Unary postfix expression, i.e. `i++`" -}, AST_Unary); - -var AST_Binary = DEFNODE("Binary", "operator left right", { - $documentation: "Binary expression, i.e. `a + b`", - $propdoc: { - left: "[AST_Node] left-hand side expression", - operator: "[string] the operator", - right: "[AST_Node] right-hand side expression" - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.left.walk(visitor); - node.right.walk(visitor); - }); - }, - _validate: function() { - if (!(this instanceof AST_Assign)) must_be_expression(this, "left"); - if (typeof this.operator != "string") throw new Error("operator must be string"); - must_be_expression(this, "right"); - }, -}); - -var AST_Conditional = DEFNODE("Conditional", "condition consequent alternative", { - $documentation: "Conditional expression using the ternary operator, i.e. `a ? b : c`", - $propdoc: { - condition: "[AST_Node]", - consequent: "[AST_Node]", - alternative: "[AST_Node]" - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.condition.walk(visitor); - node.consequent.walk(visitor); - node.alternative.walk(visitor); - }); - }, - _validate: function() { - must_be_expression(this, "condition"); - must_be_expression(this, "consequent"); - must_be_expression(this, "alternative"); - }, -}); - -var AST_Assign = DEFNODE("Assign", null, { - $documentation: "An assignment expression — `a = b + 5`", - _validate: function() { - if (this.operator.indexOf("=") < 0) throw new Error('operator must contain "="'); - if (this.left instanceof AST_Destructured) { - if (this.operator != "=") throw new Error("invalid destructuring operator: " + this.operator); - validate_destructured(this.left, function(node) { - if (!(node instanceof AST_PropAccess || node instanceof AST_SymbolRef)) { - throw new Error("left must be assignable: " + node.TYPE); - } - }); - } - }, -}, AST_Binary); - -var AST_Await = DEFNODE("Await", "expression", { - $documentation: "An await expression", - $propdoc: { - expression: "[AST_Node] expression with Promise to resolve on", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.expression.walk(visitor); - }); - }, - _validate: function() { - must_be_expression(this, "expression"); - }, -}); - -var AST_Yield = DEFNODE("Yield", "expression nested", { - $documentation: "A yield expression", - $propdoc: { - expression: "[AST_Node?] return value for iterator, or null if undefined", - nested: "[boolean] whether to iterate over expression as generator", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - if (node.expression) node.expression.walk(visitor); - }); - }, - _validate: function() { - if (this.expression != null) { - must_be_expression(this, "expression"); - } else if (this.nested) { - throw new Error("yield* must contain expression"); - } - }, -}); - -/* -----[ LITERALS ]----- */ - -var AST_Array = DEFNODE("Array", "elements", { - $documentation: "An array literal", - $propdoc: { - elements: "[AST_Node*] array of elements" - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.elements.forEach(function(element) { - element.walk(visitor); - }); - }); - }, - _validate: function() { - must_be_expressions(this, "elements", true, true); - }, -}); - -var AST_Destructured = DEFNODE("Destructured", "rest", { - $documentation: "Base class for destructured literal", - $propdoc: { - rest: "[(AST_Destructured|AST_SymbolDeclaration|AST_SymbolRef)?] rest parameter, or null if absent", - }, - _validate: function() { - if (this.TYPE == "Destructured") throw new Error("should not instantiate AST_Destructured"); - }, -}); - -function validate_destructured(node, check, allow_default) { - if (node instanceof AST_DefaultValue && allow_default) return validate_destructured(node.name, check); - if (node instanceof AST_Destructured) { - if (node.rest != null) validate_destructured(node.rest, check); - if (node instanceof AST_DestructuredArray) return node.elements.forEach(function(node) { - if (!(node instanceof AST_Hole)) validate_destructured(node, check, true); - }); - if (node instanceof AST_DestructuredObject) return node.properties.forEach(function(prop) { - validate_destructured(prop.value, check, true); - }); - } - check(node); -} - -var AST_DestructuredArray = DEFNODE("DestructuredArray", "elements", { - $documentation: "A destructured array literal", - $propdoc: { - elements: "[(AST_DefaultValue|AST_Destructured|AST_SymbolDeclaration|AST_SymbolRef)*] array of elements", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.elements.forEach(function(element) { - element.walk(visitor); - }); - if (node.rest) node.rest.walk(visitor); - }); - }, -}, AST_Destructured); - -var AST_DestructuredKeyVal = DEFNODE("DestructuredKeyVal", "key value", { - $documentation: "A key: value destructured property", - $propdoc: { - key: "[string|AST_Node] property name. For computed property this is an AST_Node.", - value: "[AST_DefaultValue|AST_Destructured|AST_SymbolDeclaration|AST_SymbolRef] property value", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - if (node.key instanceof AST_Node) node.key.walk(visitor); - node.value.walk(visitor); - }); - }, - _validate: function() { - if (typeof this.key != "string") { - if (!(this.key instanceof AST_Node)) throw new Error("key must be string or AST_Node"); - must_be_expression(this, "key"); - } - if (!(this.value instanceof AST_Node)) throw new Error("value must be AST_Node"); - }, -}); - -var AST_DestructuredObject = DEFNODE("DestructuredObject", "properties", { - $documentation: "A destructured object literal", - $propdoc: { - properties: "[AST_DestructuredKeyVal*] array of properties", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.properties.forEach(function(prop) { - prop.walk(visitor); - }); - if (node.rest) node.rest.walk(visitor); - }); - }, - _validate: function() { - this.properties.forEach(function(node) { - if (!(node instanceof AST_DestructuredKeyVal)) throw new Error("properties must be AST_DestructuredKeyVal[]"); - }); - }, -}, AST_Destructured); - -var AST_Object = DEFNODE("Object", "properties", { - $documentation: "An object literal", - $propdoc: { - properties: "[(AST_ObjectProperty|AST_Spread)*] array of properties" - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - node.properties.forEach(function(prop) { - prop.walk(visitor); - }); - }); - }, - _validate: function() { - this.properties.forEach(function(node) { - if (!(node instanceof AST_ObjectProperty || node instanceof AST_Spread)) { - throw new Error("properties must contain AST_ObjectProperty and/or AST_Spread only"); - } - }); - }, -}); - -var AST_ObjectProperty = DEFNODE("ObjectProperty", "key value", { - $documentation: "Base class for literal object properties", - $propdoc: { - key: "[string|AST_Node] property name. For computed property this is an AST_Node.", - value: "[AST_Node] property value. For getters and setters this is an AST_Accessor.", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - if (node.key instanceof AST_Node) node.key.walk(visitor); - node.value.walk(visitor); - }); - }, - _validate: function() { - if (this.TYPE == "ObjectProperty") throw new Error("should not instantiate AST_ObjectProperty"); - if (typeof this.key != "string") { - if (!(this.key instanceof AST_Node)) throw new Error("key must be string or AST_Node"); - must_be_expression(this, "key"); - } - if (!(this.value instanceof AST_Node)) throw new Error("value must be AST_Node"); - }, -}); - -var AST_ObjectKeyVal = DEFNODE("ObjectKeyVal", null, { - $documentation: "A key: value object property", - _validate: function() { - must_be_expression(this, "value"); - }, -}, AST_ObjectProperty); - -var AST_ObjectMethod = DEFNODE("ObjectMethod", null, { - $documentation: "A key(){} object property", - _validate: function() { - if (!(this.value instanceof AST_LambdaExpression)) throw new Error("value must be AST_LambdaExpression"); - if (is_arrow(this.value)) throw new Error("value cannot be AST_Arrow or AST_AsyncArrow"); - if (this.value.name != null) throw new Error("name of object method's lambda must be null"); - }, -}, AST_ObjectKeyVal); - -var AST_ObjectSetter = DEFNODE("ObjectSetter", null, { - $documentation: "An object setter property", - _validate: function() { - if (!(this.value instanceof AST_Accessor)) throw new Error("value must be AST_Accessor"); - }, -}, AST_ObjectProperty); - -var AST_ObjectGetter = DEFNODE("ObjectGetter", null, { - $documentation: "An object getter property", - _validate: function() { - if (!(this.value instanceof AST_Accessor)) throw new Error("value must be AST_Accessor"); - }, -}, AST_ObjectProperty); - -var AST_Symbol = DEFNODE("Symbol", "scope name thedef", { - $documentation: "Base class for all symbols", - $propdoc: { - name: "[string] name of this symbol", - scope: "[AST_Scope/S] the current scope (not necessarily the definition scope)", - thedef: "[SymbolDef/S] the definition of this symbol" - }, - _validate: function() { - if (this.TYPE == "Symbol") throw new Error("should not instantiate AST_Symbol"); - if (typeof this.name != "string") throw new Error("name must be string"); - }, -}); - -var AST_SymbolDeclaration = DEFNODE("SymbolDeclaration", "init", { - $documentation: "A declaration symbol (symbol in var, function name or argument, symbol in catch)", -}, AST_Symbol); - -var AST_SymbolConst = DEFNODE("SymbolConst", null, { - $documentation: "Symbol defining a constant", -}, AST_SymbolDeclaration); - -var AST_SymbolImport = DEFNODE("SymbolImport", "key", { - $documentation: "Symbol defined by an `import` statement", - $propdoc: { - key: "[string] the original `export` name", - }, - _validate: function() { - if (typeof this.key != "string") throw new Error("key must be string"); - }, -}, AST_SymbolConst); - -var AST_SymbolLet = DEFNODE("SymbolLet", null, { - $documentation: "Symbol defining a lexical-scoped variable", -}, AST_SymbolDeclaration); - -var AST_SymbolVar = DEFNODE("SymbolVar", null, { - $documentation: "Symbol defining a variable", -}, AST_SymbolDeclaration); - -var AST_SymbolFunarg = DEFNODE("SymbolFunarg", null, { - $documentation: "Symbol naming a function argument", -}, AST_SymbolVar); - -var AST_SymbolDefun = DEFNODE("SymbolDefun", null, { - $documentation: "Symbol defining a function", -}, AST_SymbolDeclaration); - -var AST_SymbolLambda = DEFNODE("SymbolLambda", null, { - $documentation: "Symbol naming a function expression", -}, AST_SymbolDeclaration); - -var AST_SymbolDefClass = DEFNODE("SymbolDefClass", null, { - $documentation: "Symbol defining a class", -}, AST_SymbolLet); - -var AST_SymbolClass = DEFNODE("SymbolClass", null, { - $documentation: "Symbol naming a class expression", -}, AST_SymbolLet); - -var AST_SymbolCatch = DEFNODE("SymbolCatch", null, { - $documentation: "Symbol naming the exception in catch", -}, AST_SymbolDeclaration); - -var AST_Label = DEFNODE("Label", "references", { - $documentation: "Symbol naming a label (declaration)", - $propdoc: { - references: "[AST_LoopControl*] a list of nodes referring to this label" - }, - initialize: function() { - this.references = []; - this.thedef = this; - } -}, AST_Symbol); - -var AST_SymbolRef = DEFNODE("SymbolRef", "fixed in_arg redef", { - $documentation: "Reference to some symbol (not definition/declaration)", -}, AST_Symbol); - -var AST_SymbolExport = DEFNODE("SymbolExport", "alias", { - $documentation: "Reference in an `export` statement", - $propdoc: { - alias: "[string] the `export` alias", - }, - _validate: function() { - if (typeof this.alias != "string") throw new Error("alias must be string"); - }, -}, AST_SymbolRef); - -var AST_LabelRef = DEFNODE("LabelRef", null, { - $documentation: "Reference to a label symbol", -}, AST_Symbol); - -var AST_ObjectIdentity = DEFNODE("ObjectIdentity", null, { - $documentation: "Base class for `super` & `this`", - _validate: function() { - if (this.TYPE == "ObjectIdentity") throw new Error("should not instantiate AST_ObjectIdentity"); - }, -}, AST_Symbol); - -var AST_Super = DEFNODE("Super", null, { - $documentation: "The `super` symbol", - _validate: function() { - if (this.name !== "super") throw new Error('name must be "super"'); - }, -}, AST_ObjectIdentity); - -var AST_This = DEFNODE("This", null, { - $documentation: "The `this` symbol", - _validate: function() { - if (this.TYPE == "This" && this.name !== "this") throw new Error('name must be "this"'); - }, -}, AST_ObjectIdentity); - -var AST_NewTarget = DEFNODE("NewTarget", null, { - $documentation: "The `new.target` symbol", - initialize: function() { - this.name = "new.target"; - }, - _validate: function() { - if (this.name !== "new.target") throw new Error('name must be "new.target": ' + this.name); - }, -}, AST_This); - -var AST_Template = DEFNODE("Template", "expressions strings tag", { - $documentation: "A template literal, i.e. tag`str1${expr1}...strN${exprN}strN+1`", - $propdoc: { - expressions: "[AST_Node*] the placeholder expressions", - strings: "[string*] the raw text segments", - tag: "[AST_Node] tag function, or null if absent", - }, - walk: function(visitor) { - var node = this; - visitor.visit(node, function() { - if (node.tag) node.tag.walk(visitor); - node.expressions.forEach(function(expr) { - expr.walk(visitor); - }); - }); - }, - _validate: function() { - if (this.expressions.length + 1 != this.strings.length) { - throw new Error("malformed template with " + this.expressions.length + " placeholder(s) but " + this.strings.length + " text segment(s)"); - } - must_be_expressions(this, "expressions"); - this.strings.forEach(function(string) { - if (typeof string != "string") throw new Error("strings must contain string"); - }); - if (this.tag != null) must_be_expression(this, "tag"); - }, -}); - -var AST_Constant = DEFNODE("Constant", null, { - $documentation: "Base class for all constants", - _validate: function() { - if (this.TYPE == "Constant") throw new Error("should not instantiate AST_Constant"); - }, -}); - -var AST_String = DEFNODE("String", "quote value", { - $documentation: "A string literal", - $propdoc: { - quote: "[string?] the original quote character", - value: "[string] the contents of this string", - }, - _validate: function() { - if (this.quote != null) { - if (typeof this.quote != "string") throw new Error("quote must be string"); - if (!/^["']$/.test(this.quote)) throw new Error("invalid quote: " + this.quote); - } - if (typeof this.value != "string") throw new Error("value must be string"); - }, -}, AST_Constant); - -var AST_Number = DEFNODE("Number", "value", { - $documentation: "A number literal", - $propdoc: { - value: "[number] the numeric value", - }, - _validate: function() { - if (typeof this.value != "number") throw new Error("value must be number"); - if (!isFinite(this.value)) throw new Error("value must be finite"); - if (this.value < 0) throw new Error("value cannot be negative"); - }, -}, AST_Constant); - -var AST_BigInt = DEFNODE("BigInt", "value", { - $documentation: "A BigInt literal", - $propdoc: { - value: "[string] the numeric representation", - }, - _validate: function() { - if (typeof this.value != "string") throw new Error("value must be string"); - if (this.value[0] == "-") throw new Error("value cannot be negative"); - }, -}, AST_Constant); - -var AST_RegExp = DEFNODE("RegExp", "value", { - $documentation: "A regexp literal", - $propdoc: { - value: "[RegExp] the actual regexp" - }, - _validate: function() { - if (!(this.value instanceof RegExp)) throw new Error("value must be RegExp"); - }, -}, AST_Constant); - -var AST_Atom = DEFNODE("Atom", null, { - $documentation: "Base class for atoms", - _validate: function() { - if (this.TYPE == "Atom") throw new Error("should not instantiate AST_Atom"); - }, -}, AST_Constant); - -var AST_Null = DEFNODE("Null", null, { - $documentation: "The `null` atom", - value: null -}, AST_Atom); - -var AST_NaN = DEFNODE("NaN", null, { - $documentation: "The impossible value", - value: 0/0 -}, AST_Atom); - -var AST_Undefined = DEFNODE("Undefined", null, { - $documentation: "The `undefined` value", - value: function(){}() -}, AST_Atom); - -var AST_Hole = DEFNODE("Hole", null, { - $documentation: "A hole in an array", - value: function(){}() -}, AST_Atom); - -var AST_Infinity = DEFNODE("Infinity", null, { - $documentation: "The `Infinity` value", - value: 1/0 -}, AST_Atom); - -var AST_Boolean = DEFNODE("Boolean", null, { - $documentation: "Base class for booleans", - _validate: function() { - if (this.TYPE == "Boolean") throw new Error("should not instantiate AST_Boolean"); - }, -}, AST_Atom); - -var AST_False = DEFNODE("False", null, { - $documentation: "The `false` atom", - value: false -}, AST_Boolean); - -var AST_True = DEFNODE("True", null, { - $documentation: "The `true` atom", - value: true -}, AST_Boolean); - -/* -----[ TreeWalker ]----- */ - -function TreeWalker(callback) { - this.callback = callback; - this.directives = Object.create(null); - this.stack = []; -} -TreeWalker.prototype = { - visit: function(node, descend) { - this.push(node); - var done = this.callback(node, descend || noop); - if (!done && descend) descend(); - this.pop(); - }, - parent: function(n) { - return this.stack[this.stack.length - 2 - (n || 0)]; - }, - push: function(node) { - if (node instanceof AST_Lambda) { - this.directives = Object.create(this.directives); - } else if (node instanceof AST_Directive && !this.directives[node.value]) { - this.directives[node.value] = node; - } - this.stack.push(node); - }, - pop: function() { - var node = this.stack.pop(); - if (node instanceof AST_Lambda) { - this.directives = Object.getPrototypeOf(this.directives); - } - }, - self: function() { - return this.stack[this.stack.length - 1]; - }, - find_parent: function(type) { - var stack = this.stack; - for (var i = stack.length; --i >= 0;) { - var x = stack[i]; - if (x instanceof type) return x; - } - }, - has_directive: function(type) { - var dir = this.directives[type]; - if (dir) return dir; - var node = this.stack[this.stack.length - 1]; - if (node instanceof AST_Scope) { - for (var i = 0; i < node.body.length; ++i) { - var st = node.body[i]; - if (!(st instanceof AST_Directive)) break; - if (st.value == type) return st; - } - } - }, - loopcontrol_target: function(node) { - var stack = this.stack; - if (node.label) for (var i = stack.length; --i >= 0;) { - var x = stack[i]; - if (x instanceof AST_LabeledStatement && x.label.name == node.label.name) - return x.body; - } else for (var i = stack.length; --i >= 0;) { - var x = stack[i]; - if (x instanceof AST_IterationStatement - || node instanceof AST_Break && x instanceof AST_Switch) - return x; - } - }, - in_boolean_context: function() { - var self = this.self(); - for (var i = 0, p; p = this.parent(i); i++) { - if (p instanceof AST_Conditional && p.condition === self - || p instanceof AST_DWLoop && p.condition === self - || p instanceof AST_For && p.condition === self - || p instanceof AST_If && p.condition === self - || p instanceof AST_Return && p.in_bool - || p instanceof AST_Sequence && p.tail_node() !== self - || p instanceof AST_SimpleStatement - || p instanceof AST_UnaryPrefix && p.operator == "!" && p.expression === self) { - return true; - } - if (p instanceof AST_Binary && (p.operator == "&&" || p.operator == "||") - || p instanceof AST_Conditional - || p.tail_node() === self) { - self = p; - } else if (p instanceof AST_Return) { - for (var call, fn = p; call = this.parent(++i); fn = call) { - if (call.TYPE == "Call") { - if (!(fn instanceof AST_Lambda) || fn.name) return false; - } else if (fn instanceof AST_Lambda) { - return false; - } - } - } else { - return false; - } - } - } -}; diff --git a/node_modules/uglify-js/lib/compress.js b/node_modules/uglify-js/lib/compress.js deleted file mode 100644 index 0f9f0795..00000000 --- a/node_modules/uglify-js/lib/compress.js +++ /dev/null @@ -1,12191 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -function Compressor(options, false_by_default) { - if (!(this instanceof Compressor)) - return new Compressor(options, false_by_default); - TreeTransformer.call(this, this.before, this.after); - this.options = defaults(options, { - annotations : !false_by_default, - arguments : !false_by_default, - arrows : !false_by_default, - assignments : !false_by_default, - awaits : !false_by_default, - booleans : !false_by_default, - collapse_vars : !false_by_default, - comparisons : !false_by_default, - conditionals : !false_by_default, - dead_code : !false_by_default, - default_values : !false_by_default, - directives : !false_by_default, - drop_console : false, - drop_debugger : !false_by_default, - evaluate : !false_by_default, - expression : false, - functions : !false_by_default, - global_defs : false, - hoist_exports : !false_by_default, - hoist_funs : false, - hoist_props : !false_by_default, - hoist_vars : false, - ie8 : false, - if_return : !false_by_default, - imports : !false_by_default, - inline : !false_by_default, - join_vars : !false_by_default, - keep_fargs : false_by_default, - keep_fnames : false, - keep_infinity : false, - loops : !false_by_default, - merge_vars : !false_by_default, - negate_iife : !false_by_default, - objects : !false_by_default, - optional_chains : !false_by_default, - passes : 1, - properties : !false_by_default, - pure_funcs : null, - pure_getters : !false_by_default && "strict", - reduce_funcs : !false_by_default, - reduce_vars : !false_by_default, - rests : !false_by_default, - sequences : !false_by_default, - side_effects : !false_by_default, - spreads : !false_by_default, - strings : !false_by_default, - switches : !false_by_default, - templates : !false_by_default, - top_retain : null, - toplevel : !!(options && options["top_retain"]), - typeofs : !false_by_default, - unsafe : false, - unsafe_comps : false, - unsafe_Function : false, - unsafe_math : false, - unsafe_proto : false, - unsafe_regexp : false, - unsafe_undefined: false, - unused : !false_by_default, - varify : !false_by_default, - webkit : false, - yields : !false_by_default, - }, true); - var evaluate = this.options["evaluate"]; - this.eval_threshold = /eager/.test(evaluate) ? 1 / 0 : +evaluate; - var global_defs = this.options["global_defs"]; - if (typeof global_defs == "object") for (var key in global_defs) { - if (/^@/.test(key) && HOP(global_defs, key)) { - global_defs[key.slice(1)] = parse(global_defs[key], { - expression: true - }); - } - } - if (this.options["inline"] === true) this.options["inline"] = 3; - this.drop_fargs = this.options["keep_fargs"] ? return_false : function(lambda, parent) { - if (lambda.length_read) return false; - var name = lambda.name; - if (!name) return parent && parent.TYPE == "Call" && parent.expression === lambda; - if (name.fixed_value() !== lambda) return false; - var def = name.definition(); - if (def.direct_access) return false; - var escaped = def.escaped; - return escaped && escaped.depth != 1; - }; - var pure_funcs = this.options["pure_funcs"]; - if (typeof pure_funcs == "function") { - this.pure_funcs = pure_funcs; - } else if (typeof pure_funcs == "string") { - this.pure_funcs = function(node) { - var expr; - if (node instanceof AST_Call) { - expr = node.expression; - } else if (node instanceof AST_Template) { - expr = node.tag; - } - return !(expr && pure_funcs === expr.print_to_string()); - }; - } else if (Array.isArray(pure_funcs)) { - this.pure_funcs = function(node) { - var expr; - if (node instanceof AST_Call) { - expr = node.expression; - } else if (node instanceof AST_Template) { - expr = node.tag; - } - return !(expr && member(expr.print_to_string(), pure_funcs)); - }; - } else { - this.pure_funcs = return_true; - } - var sequences = this.options["sequences"]; - this.sequences_limit = sequences == 1 ? 800 : sequences | 0; - var top_retain = this.options["top_retain"]; - if (top_retain instanceof RegExp) { - this.top_retain = function(def) { - return top_retain.test(def.name); - }; - } else if (typeof top_retain == "function") { - this.top_retain = top_retain; - } else if (top_retain) { - if (typeof top_retain == "string") { - top_retain = top_retain.split(/,/); - } - this.top_retain = function(def) { - return member(def.name, top_retain); - }; - } - var toplevel = this.options["toplevel"]; - this.toplevel = typeof toplevel == "string" ? { - funcs: /funcs/.test(toplevel), - vars: /vars/.test(toplevel) - } : { - funcs: toplevel, - vars: toplevel - }; -} - -Compressor.prototype = new TreeTransformer; -merge(Compressor.prototype, { - option: function(key) { return this.options[key] }, - exposed: function(def) { - if (def.exported) return true; - if (def.undeclared) return true; - if (!(def.global || def.scope.resolve() instanceof AST_Toplevel)) return false; - var toplevel = this.toplevel; - return !all(def.orig, function(sym) { - return toplevel[sym instanceof AST_SymbolDefun ? "funcs" : "vars"]; - }); - }, - compress: function(node) { - node = node.resolve_defines(this); - node.hoist_exports(this); - if (this.option("expression")) { - node.process_expression(true); - } - var passes = +this.options.passes || 1; - var min_count = 1 / 0; - var stopping = false; - var mangle = { ie8: this.option("ie8") }; - for (var pass = 0; pass < passes; pass++) { - node.figure_out_scope(mangle); - if (pass > 0 || this.option("reduce_vars")) - node.reset_opt_flags(this); - node = node.transform(this); - if (passes > 1) { - var count = 0; - node.walk(new TreeWalker(function() { - count++; - })); - AST_Node.info("pass {pass}: last_count: {min_count}, count: {count}", { - pass: pass, - min_count: min_count, - count: count, - }); - if (count < min_count) { - min_count = count; - stopping = false; - } else if (stopping) { - break; - } else { - stopping = true; - } - } - } - if (this.option("expression")) { - node.process_expression(false); - } - return node; - }, - before: function(node, descend, in_list) { - if (node._squeezed) return node; - var is_scope = node instanceof AST_Scope; - if (is_scope) { - node.hoist_properties(this); - node.hoist_declarations(this); - node.process_boolean_returns(this); - } - // Before https://github.com/mishoo/UglifyJS/pull/1602 AST_Node.optimize() - // would call AST_Node.transform() if a different instance of AST_Node is - // produced after OPT(). - // This corrupts TreeWalker.stack, which cause AST look-ups to malfunction. - // Migrate and defer all children's AST_Node.transform() to below, which - // will now happen after this parent AST_Node has been properly substituted - // thus gives a consistent AST snapshot. - descend(node, this); - // Existing code relies on how AST_Node.optimize() worked, and omitting the - // following replacement call would result in degraded efficiency of both - // output and performance. - descend(node, this); - var opt = node.optimize(this); - if (is_scope && opt === node && !this.has_directive("use asm") && !opt.pinned()) { - opt.merge_variables(this); - opt.drop_unused(this); - descend(opt, this); - } - if (opt === node) opt._squeezed = true; - return opt; - } -}); - -(function(OPT) { - OPT(AST_Node, function(self, compressor) { - return self; - }); - - AST_Node.DEFMETHOD("equivalent_to", function(node) { - return this.TYPE == node.TYPE && this.print_to_string() == node.print_to_string(); - }); - - AST_Toplevel.DEFMETHOD("hoist_exports", function(compressor) { - if (!compressor.option("hoist_exports")) return; - var body = this.body, props = []; - for (var i = 0; i < body.length; i++) { - var stat = body[i]; - if (stat instanceof AST_ExportDeclaration) { - body[i] = stat = stat.body; - if (stat instanceof AST_Definitions) { - stat.definitions.forEach(function(defn) { - defn.name.match_symbol(export_symbol, true); - }); - } else { - export_symbol(stat.name); - } - } else if (stat instanceof AST_ExportReferences) { - body.splice(i--, 1); - [].push.apply(props, stat.properties); - } - } - if (props.length) body.push(make_node(AST_ExportReferences, this, { properties: props })); - - function export_symbol(sym) { - if (!(sym instanceof AST_SymbolDeclaration)) return; - var node = make_node(AST_SymbolExport, sym, sym); - node.alias = node.name; - props.push(node); - } - }); - - AST_Scope.DEFMETHOD("process_expression", function(insert, transform) { - var self = this; - var tt = new TreeTransformer(function(node) { - if (insert && node instanceof AST_SimpleStatement) { - return transform ? transform(node) : make_node(AST_Return, node, { value: node.body }); - } - if (!insert && node instanceof AST_Return) { - return transform ? transform(node) : make_node(AST_SimpleStatement, node, { - body: node.value || make_node(AST_UnaryPrefix, node, { - operator: "void", - expression: make_node(AST_Number, node, { value: 0 }), - }), - }); - } - if (node instanceof AST_Block) { - if (node instanceof AST_Lambda) { - if (node !== self) return node; - } else if (insert === "awaits" && node instanceof AST_Try) { - if (node.bfinally) return node; - } - for (var index = node.body.length; --index >= 0;) { - var stat = node.body[index]; - if (!is_declaration(stat, true)) { - node.body[index] = stat.transform(tt); - break; - } - } - } else if (node instanceof AST_If) { - node.body = node.body.transform(tt); - if (node.alternative) { - node.alternative = node.alternative.transform(tt); - } - } else if (node instanceof AST_With) { - node.body = node.body.transform(tt); - } - return node; - }); - self.transform(tt); - }); - - function read_property(obj, node) { - var key = node.getProperty(); - if (key instanceof AST_Node) return; - var value; - if (obj instanceof AST_Array) { - var elements = obj.elements; - if (key == "length") return make_node_from_constant(elements.length, obj); - if (typeof key == "number" && key in elements) value = elements[key]; - } else if (obj instanceof AST_Lambda) { - if (key == "length") { - obj.length_read = true; - return make_node_from_constant(obj.argnames.length, obj); - } - } else if (obj instanceof AST_Object) { - key = "" + key; - var props = obj.properties; - for (var i = props.length; --i >= 0;) { - var prop = props[i]; - if (!can_hoist_property(prop)) return; - if (!value && props[i].key === key) value = props[i].value; - } - } - return value instanceof AST_SymbolRef && value.fixed_value() || value; - } - - function is_read_only_fn(value, name) { - if (value instanceof AST_Boolean) return native_fns.Boolean[name]; - if (value instanceof AST_Number) return native_fns.Number[name]; - if (value instanceof AST_String) return native_fns.String[name]; - if (name == "valueOf") return false; - if (value instanceof AST_Array) return native_fns.Array[name]; - if (value instanceof AST_Lambda) return native_fns.Function[name]; - if (value instanceof AST_Object) return native_fns.Object[name]; - if (value instanceof AST_RegExp) return native_fns.RegExp[name] && !value.value.global; - } - - function is_modified(compressor, tw, node, value, level, immutable, recursive) { - var parent = tw.parent(level); - if (compressor.option("unsafe") && parent instanceof AST_Dot && is_read_only_fn(value, parent.property)) { - return; - } - var lhs = is_lhs(node, parent); - if (lhs) return lhs; - if (parent instanceof AST_Array) return is_modified(compressor, tw, parent, parent, level + 1); - if (parent instanceof AST_Binary) { - if (!lazy_op[parent.operator]) return; - return is_modified(compressor, tw, parent, parent, level + 1); - } - if (parent instanceof AST_Call) { - return !immutable - && parent.expression === node - && !parent.is_expr_pure(compressor) - && (!(value instanceof AST_LambdaExpression) || !(parent instanceof AST_New) && value.contains_this()); - } - if (parent instanceof AST_Conditional) { - if (parent.condition === node) return; - return is_modified(compressor, tw, parent, parent, level + 1); - } - if (parent instanceof AST_ForEnumeration) return parent.init === node; - if (parent instanceof AST_ObjectKeyVal) { - if (parent.value !== node) return; - var obj = tw.parent(level + 1); - return is_modified(compressor, tw, obj, obj, level + 2); - } - if (parent instanceof AST_PropAccess) { - if (parent.expression !== node) return; - var prop = read_property(value, parent); - return (!immutable || recursive) && is_modified(compressor, tw, parent, prop, level + 1); - } - if (parent instanceof AST_Sequence) { - if (parent.tail_node() !== node) return; - return is_modified(compressor, tw, parent, value, level + 1, immutable, recursive); - } - } - - function is_lambda(node) { - return node instanceof AST_Class || node instanceof AST_Lambda; - } - - function safe_for_extends(node) { - return node instanceof AST_Class || node instanceof AST_Defun || node instanceof AST_Function; - } - - function is_arguments(def) { - return def.name == "arguments" && def.scope.uses_arguments; - } - - function is_funarg(def) { - return def.orig[0] instanceof AST_SymbolFunarg || def.orig[1] instanceof AST_SymbolFunarg; - } - - function cross_scope(def, sym) { - do { - if (def === sym) return false; - if (sym instanceof AST_Scope) return true; - } while (sym = sym.parent_scope); - } - - function can_drop_symbol(ref, compressor, keep_lambda) { - var def = ref.definition(); - if (ref.in_arg && is_funarg(def)) return false; - return all(def.orig, function(sym) { - if (sym instanceof AST_SymbolConst || sym instanceof AST_SymbolLet) { - return compressor && can_varify(compressor, sym); - } - return !(keep_lambda && sym instanceof AST_SymbolLambda); - }); - } - - function has_escaped(d, scope, node, parent) { - if (parent instanceof AST_Assign) return parent.operator == "=" && parent.right === node; - if (parent instanceof AST_Call) return parent.expression !== node || parent instanceof AST_New; - if (parent instanceof AST_Exit) return parent.value === node && scope.resolve() !== d.scope.resolve(); - if (parent instanceof AST_VarDef) return parent.value === node; - } - - var RE_POSITIVE_INTEGER = /^(0|[1-9][0-9]*)$/; - (function(def) { - def(AST_Node, noop); - - function reset_def(tw, compressor, def) { - def.assignments = 0; - def.bool_fn = 0; - def.cross_loop = false; - def.direct_access = false; - def.escaped = []; - def.fixed = !def.const_redefs - && !def.scope.pinned() - && !compressor.exposed(def) - && !(def.init instanceof AST_LambdaExpression && def.init !== def.scope) - && def.init; - if (def.fixed instanceof AST_LambdaDefinition && !all(def.references, function(ref) { - var scope = ref.scope.resolve(); - do { - if (def.scope === scope) return true; - } while (scope instanceof AST_LambdaExpression && (scope = scope.parent_scope.resolve())); - })) { - tw.defun_ids[def.id] = false; - } - def.reassigned = 0; - def.recursive_refs = 0; - def.references = []; - def.should_replace = undefined; - def.single_use = undefined; - } - - function reset_variables(tw, compressor, scope) { - scope.variables.each(function(def) { - reset_def(tw, compressor, def); - if (def.fixed === null) { - def.safe_ids = tw.safe_ids; - mark(tw, def); - } else if (def.fixed) { - tw.loop_ids[def.id] = tw.in_loop; - mark(tw, def); - } - }); - scope.may_call_this = function() { - scope.may_call_this = noop; - if (!scope.contains_this()) return; - scope.functions.each(function(def) { - if (def.init instanceof AST_LambdaDefinition && !(def.id in tw.defun_ids)) { - tw.defun_ids[def.id] = false; - } - }); - }; - if (scope.uses_arguments) scope.each_argname(function(node) { - node.definition().last_ref = false; - }); - if (compressor.option("ie8")) scope.variables.each(function(def) { - var d = def.orig[0].definition(); - if (d !== def) d.fixed = false; - }); - } - - function mark_defun(tw, def) { - if (def.id in tw.defun_ids) { - var marker = tw.defun_ids[def.id]; - if (!marker) return; - var visited = tw.defun_visited[def.id]; - if (marker === tw.safe_ids) { - if (!visited) return def.fixed; - } else if (visited) { - def.init.enclosed.forEach(function(d) { - if (def.init.variables.get(d.name) === d) return; - if (!safe_to_read(tw, d)) d.fixed = false; - }); - } else { - tw.defun_ids[def.id] = false; - } - } else { - if (!tw.in_loop) { - tw.defun_ids[def.id] = tw.safe_ids; - return def.fixed; - } - tw.defun_ids[def.id] = false; - } - } - - function walk_defuns(tw, scope) { - scope.functions.each(function(def) { - if (def.init instanceof AST_LambdaDefinition && !tw.defun_visited[def.id]) { - tw.defun_ids[def.id] = tw.safe_ids; - def.init.walk(tw); - } - }); - } - - function push(tw) { - tw.safe_ids = Object.create(tw.safe_ids); - } - - function pop(tw) { - tw.safe_ids = Object.getPrototypeOf(tw.safe_ids); - } - - function mark(tw, def) { - tw.safe_ids[def.id] = {}; - } - - function push_ref(def, ref) { - def.references.push(ref); - if (def.last_ref !== false) def.last_ref = ref; - } - - function safe_to_read(tw, def) { - if (def.single_use == "m") return false; - var safe = tw.safe_ids[def.id]; - if (safe) { - if (!HOP(tw.safe_ids, def.id)) safe.read = safe.read && safe.read !== tw.safe_ids ? true : tw.safe_ids; - if (def.fixed == null) { - if (is_arguments(def)) return false; - if (def.global && def.name == "arguments") return false; - tw.loop_ids[def.id] = null; - def.fixed = make_node(AST_Undefined, def.orig[0]); - return true; - } - return !safe.assign || safe.assign === tw.safe_ids; - } - return def.fixed instanceof AST_LambdaDefinition; - } - - function safe_to_assign(tw, def, declare) { - if (!declare) { - if (is_funarg(def) && def.scope.uses_arguments && !tw.has_directive("use strict")) return false; - if (!all(def.orig, function(sym) { - return !(sym instanceof AST_SymbolConst); - })) return false; - } - if (def.fixed === undefined) return declare || all(def.orig, function(sym) { - return !(sym instanceof AST_SymbolLet); - }); - if (def.fixed === null && def.safe_ids) { - def.safe_ids[def.id] = false; - delete def.safe_ids; - return true; - } - if (def.fixed === false) return false; - var safe = tw.safe_ids[def.id]; - if (!HOP(tw.safe_ids, def.id)) { - if (!safe) return false; - if (safe.read) { - var scope = tw.find_parent(AST_BlockScope); - if (scope instanceof AST_Class) return false; - if (def.scope.resolve() !== scope.resolve()) return false; - } - safe.assign = safe.assign && safe.assign !== tw.safe_ids ? true : tw.safe_ids; - } - if (def.fixed != null && safe.read) { - if (safe.read !== tw.safe_ids) return false; - if (tw.loop_ids[def.id] !== tw.in_loop) return false; - } - return safe_to_read(tw, def) && all(def.orig, function(sym) { - return !(sym instanceof AST_SymbolLambda); - }); - } - - function make_ref(ref, fixed) { - var node = make_node(AST_SymbolRef, ref, ref); - node.fixed = fixed || make_node(AST_Undefined, ref); - return node; - } - - function ref_once(compressor, def) { - return compressor.option("unused") - && !def.scope.pinned() - && def.single_use !== false - && def.references.length - def.recursive_refs == 1 - && !(is_funarg(def) && def.scope.uses_arguments); - } - - function is_immutable(value) { - if (!value) return false; - if (value instanceof AST_Assign) { - var op = value.operator; - return op == "=" ? is_immutable(value.right) : !lazy_op[op.slice(0, -1)]; - } - if (value instanceof AST_Sequence) return is_immutable(value.tail_node()); - return value.is_constant() || is_lambda(value) || value instanceof AST_ObjectIdentity; - } - - function value_in_use(node, parent) { - if (parent instanceof AST_Array) return true; - if (parent instanceof AST_Binary) return lazy_op[parent.operator]; - if (parent instanceof AST_Conditional) return parent.condition !== node; - if (parent instanceof AST_Sequence) return parent.tail_node() === node; - if (parent instanceof AST_Spread) return true; - } - - function mark_escaped(tw, d, scope, node, value, level, depth) { - var parent = tw.parent(level); - if (value && value.is_constant()) return; - if (has_escaped(d, scope, node, parent)) { - d.escaped.push(parent); - if (depth > 1 && !(value && value.is_constant_expression(scope))) depth = 1; - if (!d.escaped.depth || d.escaped.depth > depth) d.escaped.depth = depth; - if (d.scope.resolve() !== scope.resolve()) d.escaped.cross_scope = true; - return; - } else if (value_in_use(node, parent)) { - mark_escaped(tw, d, scope, parent, parent, level + 1, depth); - } else if (parent instanceof AST_ObjectKeyVal && parent.value === node) { - var obj = tw.parent(level + 1); - mark_escaped(tw, d, scope, obj, obj, level + 2, depth); - } else if (parent instanceof AST_PropAccess && parent.expression === node) { - value = read_property(value, parent); - mark_escaped(tw, d, scope, parent, value, level + 1, depth + 1); - if (value) return; - } - if (level > 0) return; - if (parent instanceof AST_Call && parent.expression === node) return; - if (parent instanceof AST_Sequence && parent.tail_node() !== node) return; - if (parent instanceof AST_SimpleStatement) return; - if (parent instanceof AST_Unary && !unary_side_effects[parent.operator]) return; - d.direct_access = true; - } - - function mark_assignment_to_arguments(node) { - if (!(node instanceof AST_Sub)) return; - var expr = node.expression; - if (!(expr instanceof AST_SymbolRef)) return; - var def = expr.definition(); - if (!is_arguments(def)) return; - var key = node.property; - if (key.is_constant()) key = key.value; - if (!(key instanceof AST_Node) && !RE_POSITIVE_INTEGER.test(key)) return; - def.reassigned++; - (key instanceof AST_Node ? def.scope.argnames : [ def.scope.argnames[key] ]).forEach(function(argname) { - if (argname instanceof AST_SymbolFunarg) argname.definition().fixed = false; - }); - } - - function scan_declaration(tw, compressor, lhs, fixed, visit) { - var scanner = new TreeWalker(function(node) { - if (node instanceof AST_DefaultValue) { - reset_flags(node); - push(tw); - node.value.walk(tw); - pop(tw); - var save = fixed; - if (save) fixed = function() { - var value = save(); - return is_undefined(value) ? make_sequence(node, [ value, node.value ]) : node; - }; - node.name.walk(scanner); - fixed = save; - return true; - } - if (node instanceof AST_DestructuredArray) { - reset_flags(node); - var save = fixed; - node.elements.forEach(function(node, index) { - if (node instanceof AST_Hole) return reset_flags(node); - if (save) fixed = function() { - return make_node(AST_Sub, node, { - expression: save(), - property: make_node(AST_Number, node, { value: index }), - }); - }; - node.walk(scanner); - }); - if (node.rest) { - if (save) fixed = compressor.option("rests") && function() { - var value = save(); - return value instanceof AST_Array ? make_node(AST_Array, node, { - elements: value.elements.slice(node.elements.length), - }) : node; - }; - node.rest.walk(scanner); - } - fixed = save; - return true; - } - if (node instanceof AST_DestructuredObject) { - reset_flags(node); - var save = fixed; - node.properties.forEach(function(node) { - reset_flags(node); - if (node.key instanceof AST_Node) { - push(tw); - node.key.walk(tw); - pop(tw); - } - if (save) fixed = function() { - var key = node.key; - var type = AST_Sub; - if (typeof key == "string") { - if (is_identifier_string(key)) { - type = AST_Dot; - } else { - key = make_node_from_constant(key, node); - } - } - return make_node(type, node, { - expression: save(), - property: key - }); - }; - node.value.walk(scanner); - }); - if (node.rest) { - fixed = false; - node.rest.walk(scanner); - } - fixed = save; - return true; - } - visit(node, fixed, function() { - var save_len = tw.stack.length; - for (var i = 0, len = scanner.stack.length - 1; i < len; i++) { - tw.stack.push(scanner.stack[i]); - } - node.walk(tw); - tw.stack.length = save_len; - }); - return true; - }); - lhs.walk(scanner); - } - - function reduce_iife(tw, descend, compressor) { - var fn = this; - fn.inlined = false; - var iife = tw.parent(); - var hit = is_async(fn) || is_generator(fn); - var aborts = false; - fn.walk(new TreeWalker(function(node) { - if (hit) return aborts = true; - if (node instanceof AST_Return) return hit = true; - if (node instanceof AST_Scope && node !== fn) return true; - })); - if (aborts) push(tw); - reset_variables(tw, compressor, fn); - // Virtually turn IIFE parameters into variable definitions: - // (function(a,b) {...})(c,d) ---> (function() {var a=c,b=d; ...})() - // So existing transformation rules can work on them. - var safe = !fn.uses_arguments || tw.has_directive("use strict"); - fn.argnames.forEach(function(argname, i) { - var value = iife.args[i]; - scan_declaration(tw, compressor, argname, function() { - var j = fn.argnames.indexOf(argname); - var arg = j < 0 ? value : iife.args[j]; - if (arg instanceof AST_Sequence && arg.expressions.length < 2) arg = arg.expressions[0]; - return arg || make_node(AST_Undefined, iife); - }, visit); - }); - var rest = fn.rest; - if (rest) scan_declaration(tw, compressor, rest, compressor.option("rests") && function() { - return fn.rest === rest ? make_node(AST_Array, fn, { - elements: iife.args.slice(fn.argnames.length), - }) : rest; - }, visit); - walk_lambda(fn, tw); - var safe_ids = tw.safe_ids; - pop(tw); - walk_defuns(tw, fn); - if (!aborts) tw.safe_ids = safe_ids; - return true; - - function visit(node, fixed) { - var d = node.definition(); - if (fixed && safe && d.fixed === undefined) { - mark(tw, d); - tw.loop_ids[d.id] = tw.in_loop; - d.fixed = fixed; - d.fixed.assigns = [ node ]; - } else { - d.fixed = false; - } - } - } - - def(AST_Assign, function(tw, descend, compressor) { - var node = this; - var left = node.left; - var right = node.right; - var scan = left instanceof AST_Destructured || left instanceof AST_SymbolRef; - switch (node.operator) { - case "=": - if (left.equivalent_to(right) && !left.has_side_effects(compressor)) { - right.walk(tw); - walk_prop(left); - node.__drop = true; - return true; - } - if (scan) { - walk_assign(); - return true; - } - mark_assignment_to_arguments(left); - return; - case "&&=": - case "||=": - case "??=": - left.walk(tw); - push(tw); - if (scan) { - walk_assign(); - } else { - mark_assignment_to_arguments(left); - right.walk(tw); - } - pop(tw); - return true; - default: - if (!scan) { - mark_assignment_to_arguments(left); - return; - } - var d = left.definition(); - d.assignments++; - var fixed = d.fixed; - if (is_modified(compressor, tw, node, node, 0)) { - d.fixed = false; - return; - } - var safe = safe_to_read(tw, d); - right.walk(tw); - if (safe && !left.in_arg && safe_to_assign(tw, d)) { - push_ref(d, left); - mark(tw, d); - if (d.single_use) d.single_use = false; - left.fixed = d.fixed = function() { - return make_node(AST_Binary, node, { - operator: node.operator.slice(0, -1), - left: make_ref(left, fixed), - right: node.right, - }); - }; - left.fixed.assigns = !fixed || !fixed.assigns ? [] : fixed.assigns.slice(); - left.fixed.assigns.push(node); - } else { - left.walk(tw); - d.fixed = false; - } - return true; - } - - function walk_prop(lhs) { - if (lhs instanceof AST_Dot) { - walk_prop(lhs.expression); - } else if (lhs instanceof AST_Sub) { - walk_prop(lhs.expression); - lhs.property.walk(tw); - } else if (lhs instanceof AST_SymbolRef) { - var d = lhs.definition(); - push_ref(d, lhs); - if (d.fixed) { - lhs.fixed = d.fixed; - if (lhs.fixed.assigns) { - lhs.fixed.assigns.push(node); - } else { - lhs.fixed.assigns = [ node ]; - } - } - } else { - lhs.walk(tw); - } - } - - function walk_assign() { - right.walk(tw); - var modified = is_modified(compressor, tw, node, right, 0, is_immutable(right), recursive_ref(tw, d)); - scan_declaration(tw, compressor, left, function() { - return node.right; - }, function(sym, fixed, walk) { - if (!(sym instanceof AST_SymbolRef)) { - mark_assignment_to_arguments(sym); - walk(); - return; - } - var d = sym.definition(); - d.assignments++; - if (fixed && !modified && !sym.in_arg && safe_to_assign(tw, d)) { - push_ref(d, sym); - mark(tw, d); - if (d.single_use && left instanceof AST_Destructured) d.single_use = false; - tw.loop_ids[d.id] = tw.in_loop; - mark_escaped(tw, d, sym.scope, node, right, 0, 1); - sym.fixed = d.fixed = fixed; - sym.fixed.assigns = [ node ]; - } else { - walk(); - d.fixed = false; - } - }); - } - }); - def(AST_Binary, function(tw) { - if (!lazy_op[this.operator]) return; - this.left.walk(tw); - push(tw); - this.right.walk(tw); - pop(tw); - return true; - }); - def(AST_BlockScope, function(tw, descend, compressor) { - this.variables.each(function(def) { - reset_def(tw, compressor, def); - }); - }); - def(AST_Call, function(tw, descend) { - tw.find_parent(AST_Scope).may_call_this(); - var exp = this.expression; - if (exp instanceof AST_LambdaExpression) { - var iife = is_iife_single(this); - this.args.forEach(function(arg) { - arg.walk(tw); - if (arg instanceof AST_Spread) iife = false; - }); - if (iife) exp.reduce_vars = reduce_iife; - exp.walk(tw); - if (iife) delete exp.reduce_vars; - return true; - } - if (exp instanceof AST_SymbolRef) { - var def = exp.definition(); - if (this.TYPE == "Call" && tw.in_boolean_context()) def.bool_fn++; - if (def.fixed instanceof AST_LambdaDefinition) { - var defun = mark_defun(tw, def); - if (defun) { - descend(); - defun.walk(tw); - return true; - } - } - } else if (this.TYPE == "Call" - && exp instanceof AST_Assign - && exp.operator == "=" - && exp.left instanceof AST_SymbolRef - && tw.in_boolean_context()) { - exp.left.definition().bool_fn++; - } - if (!this.optional) return; - exp.walk(tw); - push(tw); - this.args.forEach(function(arg) { - arg.walk(tw); - }); - pop(tw); - return true; - }); - def(AST_Class, function(tw, descend, compressor) { - var node = this; - node.variables.each(function(def) { - reset_def(tw, compressor, def); - }); - if (node.extends) node.extends.walk(tw); - var props = node.properties.filter(function(prop) { - reset_flags(prop); - if (prop.key instanceof AST_Node) prop.key.walk(tw); - return prop.value; - }); - if (node.name) { - var d = node.name.definition(); - var parent = tw.parent(); - if (parent instanceof AST_ExportDeclaration || parent instanceof AST_ExportDefault) d.single_use = false; - if (safe_to_assign(tw, d, true)) { - mark(tw, d); - tw.loop_ids[d.id] = tw.in_loop; - d.fixed = function() { - return node; - }; - d.fixed.assigns = [ node ]; - if (!is_safe_lexical(d)) d.single_use = false; - } else { - d.fixed = false; - } - } - props.forEach(function(prop) { - if (!prop.static || prop instanceof AST_ClassField && prop.value.contains_this()) { - push(tw); - prop.value.walk(tw); - pop(tw); - } else { - prop.value.walk(tw); - } - }); - return true; - }); - def(AST_Conditional, function(tw) { - this.condition.walk(tw); - push(tw); - this.consequent.walk(tw); - pop(tw); - push(tw); - this.alternative.walk(tw); - pop(tw); - return true; - }); - def(AST_DefaultValue, function(tw) { - this.name.walk(tw); - push(tw); - this.value.walk(tw); - pop(tw); - return true; - }); - def(AST_Do, function(tw) { - var saved_loop = tw.in_loop; - tw.in_loop = this; - push(tw); - this.body.walk(tw); - if (has_loop_control(this, tw.parent())) { - pop(tw); - push(tw); - } - this.condition.walk(tw); - pop(tw); - tw.in_loop = saved_loop; - return true; - }); - def(AST_For, function(tw, descend, compressor) { - this.variables.each(function(def) { - reset_def(tw, compressor, def); - }); - if (this.init) this.init.walk(tw); - var saved_loop = tw.in_loop; - tw.in_loop = this; - push(tw); - if (this.condition) this.condition.walk(tw); - this.body.walk(tw); - if (this.step) { - if (has_loop_control(this, tw.parent())) { - pop(tw); - push(tw); - } - this.step.walk(tw); - } - pop(tw); - tw.in_loop = saved_loop; - return true; - }); - def(AST_ForEnumeration, function(tw, descend, compressor) { - this.variables.each(function(def) { - reset_def(tw, compressor, def); - }); - this.object.walk(tw); - var saved_loop = tw.in_loop; - tw.in_loop = this; - push(tw); - var init = this.init; - if (init instanceof AST_Definitions) { - init.definitions[0].name.mark_symbol(function(node) { - if (node instanceof AST_SymbolDeclaration) { - var def = node.definition(); - def.assignments++; - def.fixed = false; - } - }, tw); - } else if (init instanceof AST_Destructured || init instanceof AST_SymbolRef) { - init.mark_symbol(function(node) { - if (node instanceof AST_SymbolRef) { - var def = node.definition(); - push_ref(def, node); - def.assignments++; - if (!node.is_immutable()) def.fixed = false; - } - }, tw); - } else { - init.walk(tw); - } - this.body.walk(tw); - pop(tw); - tw.in_loop = saved_loop; - return true; - }); - def(AST_If, function(tw) { - this.condition.walk(tw); - push(tw); - this.body.walk(tw); - pop(tw); - if (this.alternative) { - push(tw); - this.alternative.walk(tw); - pop(tw); - } - return true; - }); - def(AST_LabeledStatement, function(tw) { - push(tw); - this.body.walk(tw); - pop(tw); - return true; - }); - def(AST_Lambda, function(tw, descend, compressor) { - var fn = this; - fn.inlined = false; - push(tw); - reset_variables(tw, compressor, fn); - descend(); - pop(tw); - if (fn.name) mark_escaped(tw, fn.name.definition(), fn, fn.name, fn, 0, 1); - walk_defuns(tw, fn); - return true; - }); - def(AST_LambdaDefinition, function(tw, descend, compressor) { - var fn = this; - var def = fn.name.definition(); - var parent = tw.parent(); - if (parent instanceof AST_ExportDeclaration || parent instanceof AST_ExportDefault) def.single_use = false; - if (tw.defun_visited[def.id]) return true; - if (def.init === fn && tw.defun_ids[def.id] !== tw.safe_ids) return true; - tw.defun_visited[def.id] = true; - fn.inlined = false; - push(tw); - reset_variables(tw, compressor, fn); - descend(); - pop(tw); - walk_defuns(tw, fn); - return true; - }); - def(AST_Sub, function(tw) { - if (!this.optional) return; - this.expression.walk(tw); - push(tw); - this.property.walk(tw); - pop(tw); - return true; - }); - def(AST_Switch, function(tw, descend, compressor) { - this.variables.each(function(def) { - reset_def(tw, compressor, def); - }); - this.expression.walk(tw); - var first = true; - this.body.forEach(function(branch) { - if (branch instanceof AST_Default) return; - branch.expression.walk(tw); - if (first) { - first = false; - push(tw); - } - }) - if (!first) pop(tw); - walk_body(this, tw); - return true; - }); - def(AST_SwitchBranch, function(tw) { - push(tw); - walk_body(this, tw); - pop(tw); - return true; - }); - def(AST_SymbolCatch, function() { - this.definition().fixed = false; - }); - def(AST_SymbolImport, function() { - this.definition().fixed = false; - }); - def(AST_SymbolRef, function(tw, descend, compressor) { - var d = this.definition(); - push_ref(d, this); - if (d.references.length == 1 && !d.fixed && d.orig[0] instanceof AST_SymbolDefun) { - tw.loop_ids[d.id] = tw.in_loop; - } - var recursive = recursive_ref(tw, d); - if (recursive) recursive.enclosed.forEach(function(def) { - if (d === def) return; - if (def.scope.resolve() === recursive) return; - var assigns = def.fixed && def.fixed.assigns; - if (!assigns) return; - if (assigns[assigns.length - 1] instanceof AST_VarDef) return; - var safe = tw.safe_ids[def.id]; - if (!safe) return; - safe.assign = true; - }); - if (d.fixed === false) { - var redef = d.redefined(); - if (redef && cross_scope(d.scope, this.scope)) redef.single_use = false; - } else if (d.fixed === undefined || !safe_to_read(tw, d)) { - d.fixed = false; - } else if (d.fixed) { - if (this.in_arg && d.orig[0] instanceof AST_SymbolLambda) this.fixed = d.scope; - var value = this.fixed_value(); - if (recursive) { - d.recursive_refs++; - } else if (value && ref_once(compressor, d)) { - d.in_loop = tw.loop_ids[d.id] !== tw.in_loop; - d.single_use = is_lambda(value) - && !value.pinned() - && (!d.in_loop || tw.parent() instanceof AST_Call) - || !d.in_loop - && d.scope === this.scope.resolve() - && value.is_constant_expression(); - } else { - d.single_use = false; - } - if (is_modified(compressor, tw, this, value, 0, is_immutable(value), recursive)) { - if (d.single_use) { - d.single_use = "m"; - } else { - d.fixed = false; - } - } - if (d.fixed && tw.loop_ids[d.id] !== tw.in_loop) d.cross_loop = true; - mark_escaped(tw, d, this.scope, this, value, 0, 1); - } - if (!this.fixed) this.fixed = d.fixed; - var parent; - if (d.fixed instanceof AST_LambdaDefinition - && !((parent = tw.parent()) instanceof AST_Call && parent.expression === this)) { - var defun = mark_defun(tw, d); - if (defun) defun.walk(tw); - } - }); - def(AST_Toplevel, function(tw, descend, compressor) { - this.globals.each(function(def) { - reset_def(tw, compressor, def); - }); - push(tw); - reset_variables(tw, compressor, this); - descend(); - pop(tw); - walk_defuns(tw, this); - return true; - }); - def(AST_Try, function(tw, descend, compressor) { - this.variables.each(function(def) { - reset_def(tw, compressor, def); - }); - push(tw); - walk_body(this, tw); - pop(tw); - if (this.bcatch) { - push(tw); - this.bcatch.walk(tw); - pop(tw); - } - if (this.bfinally) this.bfinally.walk(tw); - return true; - }); - def(AST_Unary, function(tw, descend) { - var node = this; - if (!UNARY_POSTFIX[node.operator]) return; - var exp = node.expression; - if (!(exp instanceof AST_SymbolRef)) { - mark_assignment_to_arguments(exp); - return; - } - var d = exp.definition(); - d.assignments++; - var fixed = d.fixed; - if (safe_to_read(tw, d) && !exp.in_arg && safe_to_assign(tw, d)) { - push_ref(d, exp); - mark(tw, d); - if (d.single_use) d.single_use = false; - d.fixed = function() { - return make_node(AST_Binary, node, { - operator: node.operator.slice(0, -1), - left: make_node(AST_UnaryPrefix, node, { - operator: "+", - expression: make_ref(exp, fixed) - }), - right: make_node(AST_Number, node, { - value: 1 - }) - }); - }; - d.fixed.assigns = fixed && fixed.assigns ? fixed.assigns.slice() : []; - d.fixed.assigns.push(node); - if (node instanceof AST_UnaryPrefix) { - exp.fixed = d.fixed; - } else { - exp.fixed = function() { - return make_node(AST_UnaryPrefix, node, { - operator: "+", - expression: make_ref(exp, fixed) - }); - }; - exp.fixed.assigns = fixed && fixed.assigns; - } - } else { - exp.walk(tw); - d.fixed = false; - } - return true; - }); - def(AST_VarDef, function(tw, descend, compressor) { - var node = this; - if (node.value) { - node.value.walk(tw); - } else if (!(tw.parent() instanceof AST_Let)) { - return; - } - scan_declaration(tw, compressor, node.name, function() { - return node.value || make_node(AST_Undefined, node); - }, function(name, fixed) { - var d = name.definition(); - if (fixed && safe_to_assign(tw, d, true)) { - mark(tw, d); - tw.loop_ids[d.id] = tw.in_loop; - d.fixed = fixed; - d.fixed.assigns = [ node ]; - if (name instanceof AST_SymbolConst && d.redefined() - || !(can_drop_symbol(name) || is_safe_lexical(d))) { - d.single_use = false; - } - } else { - d.fixed = false; - } - }); - return true; - }); - def(AST_While, function(tw, descend) { - var saved_loop = tw.in_loop; - tw.in_loop = this; - push(tw); - descend(); - pop(tw); - tw.in_loop = saved_loop; - return true; - }); - })(function(node, func) { - node.DEFMETHOD("reduce_vars", func); - }); - - function reset_flags(node) { - node._squeezed = false; - node._optimized = false; - delete node.fixed; - if (node instanceof AST_Scope) delete node._var_names; - } - - AST_Toplevel.DEFMETHOD("reset_opt_flags", function(compressor) { - var tw = new TreeWalker(compressor.option("reduce_vars") ? function(node, descend) { - reset_flags(node); - return node.reduce_vars(tw, descend, compressor); - } : reset_flags); - // Flow control for visiting `AST_Defun`s - tw.defun_ids = Object.create(null); - tw.defun_visited = Object.create(null); - // Record the loop body in which `AST_SymbolDeclaration` is first encountered - tw.in_loop = null; - tw.loop_ids = Object.create(null); - // Stack of look-up tables to keep track of whether a `SymbolDef` has been - // properly assigned before use: - // - `push()` & `pop()` when visiting conditional branches - // - backup & restore via `save_ids` when visiting out-of-order sections - tw.safe_ids = Object.create(null); - this.walk(tw); - }); - - AST_Symbol.DEFMETHOD("fixed_value", function() { - var fixed = this.definition().fixed; - if (!fixed) return fixed; - if (this.fixed) fixed = this.fixed; - return fixed instanceof AST_Node ? fixed : fixed(); - }); - - AST_SymbolRef.DEFMETHOD("is_immutable", function() { - var def = this.redef || this.definition(); - return def.orig.length == 1 && def.orig[0] instanceof AST_SymbolLambda; - }); - - AST_Node.DEFMETHOD("convert_symbol", noop); - function convert_destructured(type, process) { - return this.transform(new TreeTransformer(function(node, descend) { - if (node instanceof AST_DefaultValue) { - node = node.clone(); - node.name = node.name.transform(this); - return node; - } - if (node instanceof AST_Destructured) { - node = node.clone(); - descend(node, this); - return node; - } - if (node instanceof AST_DestructuredKeyVal) { - node = node.clone(); - node.value = node.value.transform(this); - return node; - } - return node.convert_symbol(type, process); - })); - } - AST_DefaultValue.DEFMETHOD("convert_symbol", convert_destructured); - AST_Destructured.DEFMETHOD("convert_symbol", convert_destructured); - function convert_symbol(type, process) { - var node = make_node(type, this, this); - process(node, this); - return node; - } - AST_SymbolDeclaration.DEFMETHOD("convert_symbol", convert_symbol); - AST_SymbolRef.DEFMETHOD("convert_symbol", convert_symbol); - - function mark_destructured(process, tw) { - var marker = new TreeWalker(function(node) { - if (node instanceof AST_DefaultValue) { - node.value.walk(tw); - node.name.walk(marker); - return true; - } - if (node instanceof AST_DestructuredKeyVal) { - if (node.key instanceof AST_Node) node.key.walk(tw); - node.value.walk(marker); - return true; - } - return process(node); - }); - this.walk(marker); - } - AST_DefaultValue.DEFMETHOD("mark_symbol", mark_destructured); - AST_Destructured.DEFMETHOD("mark_symbol", mark_destructured); - function mark_symbol(process) { - return process(this); - } - AST_SymbolDeclaration.DEFMETHOD("mark_symbol", mark_symbol); - AST_SymbolRef.DEFMETHOD("mark_symbol", mark_symbol); - - AST_Node.DEFMETHOD("match_symbol", function(predicate) { - return predicate(this); - }); - AST_Destructured.DEFMETHOD("match_symbol", function(predicate, ignore_side_effects) { - var found = false; - var tw = new TreeWalker(function(node) { - if (found) return true; - if (node instanceof AST_DefaultValue) { - if (!ignore_side_effects) return found = true; - node.name.walk(tw); - return true; - } - if (node instanceof AST_DestructuredKeyVal) { - if (!ignore_side_effects && node.key instanceof AST_Node) return found = true; - node.value.walk(tw); - return true; - } - if (predicate(node)) return found = true; - }); - this.walk(tw); - return found; - }); - - function in_async_generator(scope) { - return scope instanceof AST_AsyncGeneratorDefun || scope instanceof AST_AsyncGeneratorFunction; - } - - function find_scope(compressor) { - var level = 0, node; - while (node = compressor.parent(level++)) { - if (node.variables) return node; - } - } - - var identifier_atom = makePredicate("Infinity NaN undefined"); - function is_lhs_read_only(lhs, compressor) { - if (lhs instanceof AST_ObjectIdentity) return true; - if (lhs instanceof AST_PropAccess) { - if (lhs.property === "__proto__") return true; - lhs = lhs.expression; - if (lhs instanceof AST_SymbolRef) { - if (lhs.is_immutable()) return false; - lhs = lhs.fixed_value(); - } - if (!lhs) return true; - if (lhs.tail_node().is_constant()) return true; - return is_lhs_read_only(lhs, compressor); - } - if (lhs instanceof AST_SymbolRef) { - if (lhs.is_immutable()) return true; - var def = lhs.definition(); - return compressor.exposed(def) && identifier_atom[def.name]; - } - return false; - } - - function make_node(ctor, orig, props) { - if (!props) props = {}; - if (orig) { - if (!props.start) props.start = orig.start; - if (!props.end) props.end = orig.end; - } - return new ctor(props); - } - - function make_sequence(orig, expressions) { - if (expressions.length == 1) return expressions[0]; - return make_node(AST_Sequence, orig, { - expressions: expressions.reduce(merge_sequence, []) - }); - } - - function make_node_from_constant(val, orig) { - switch (typeof val) { - case "string": - return make_node(AST_String, orig, { - value: val - }); - case "number": - if (isNaN(val)) return make_node(AST_NaN, orig); - if (isFinite(val)) { - return 1 / val < 0 ? make_node(AST_UnaryPrefix, orig, { - operator: "-", - expression: make_node(AST_Number, orig, { value: -val }) - }) : make_node(AST_Number, orig, { value: val }); - } - return val < 0 ? make_node(AST_UnaryPrefix, orig, { - operator: "-", - expression: make_node(AST_Infinity, orig) - }) : make_node(AST_Infinity, orig); - case "boolean": - return make_node(val ? AST_True : AST_False, orig); - case "undefined": - return make_node(AST_Undefined, orig); - default: - if (val === null) { - return make_node(AST_Null, orig, { value: null }); - } - if (val instanceof RegExp) { - return make_node(AST_RegExp, orig, { value: val }); - } - throw new Error(string_template("Can't handle constant of type: {type}", { - type: typeof val - })); - } - } - - function needs_unbinding(compressor, val) { - return val instanceof AST_PropAccess - || is_undeclared_ref(val) && val.name == "eval"; - } - - // we shouldn't compress (1,func)(something) to - // func(something) because that changes the meaning of - // the func (becomes lexical instead of global). - function maintain_this_binding(compressor, parent, orig, val) { - var wrap = false; - if (parent.TYPE == "Call") { - wrap = parent.expression === orig && needs_unbinding(compressor, val); - } else if (parent instanceof AST_Template) { - wrap = parent.tag === orig && needs_unbinding(compressor, val); - } else if (parent instanceof AST_UnaryPrefix) { - wrap = parent.operator == "delete" - || parent.operator == "typeof" && is_undeclared_ref(val); - } - return wrap ? make_sequence(orig, [ make_node(AST_Number, orig, { value: 0 }), val ]) : val; - } - - function merge_sequence(array, node) { - if (node instanceof AST_Sequence) { - array.push.apply(array, node.expressions); - } else { - array.push(node); - } - return array; - } - - function is_lexical_definition(stat) { - return stat instanceof AST_Const || stat instanceof AST_DefClass || stat instanceof AST_Let; - } - - function safe_to_trim(stat) { - if (stat instanceof AST_LambdaDefinition) { - var def = stat.name.definition(); - var scope = stat.name.scope; - return def.scope === scope || all(def.references, function(ref) { - var s = ref.scope; - do { - if (s === scope) return true; - } while (s = s.parent_scope); - }); - } - return !is_lexical_definition(stat); - } - - function as_statement_array(thing) { - if (thing === null) return []; - if (thing instanceof AST_BlockStatement) return all(thing.body, safe_to_trim) ? thing.body : [ thing ]; - if (thing instanceof AST_EmptyStatement) return []; - if (is_statement(thing)) return [ thing ]; - throw new Error("Can't convert thing to statement array"); - } - - function is_empty(thing) { - if (thing === null) return true; - if (thing instanceof AST_EmptyStatement) return true; - if (thing instanceof AST_BlockStatement) return thing.body.length == 0; - return false; - } - - function has_declarations_only(block) { - return all(block.body, function(stat) { - return is_empty(stat) - || stat instanceof AST_Defun - || stat instanceof AST_Var && all(stat.definitions, function(var_def) { - return !var_def.value; - }); - }); - } - - function loop_body(x) { - if (x instanceof AST_IterationStatement) { - return x.body instanceof AST_BlockStatement ? x.body : x; - } - return x; - } - - function root_expr(prop) { - while (prop instanceof AST_PropAccess) prop = prop.expression; - return prop; - } - - function is_iife_call(node) { - if (node.TYPE != "Call") return false; - do { - node = node.expression; - } while (node instanceof AST_PropAccess); - return node instanceof AST_LambdaExpression ? !is_arrow(node) : is_iife_call(node); - } - - function is_iife_single(call) { - var exp = call.expression; - if (exp.name) return false; - if (!(call instanceof AST_New)) return true; - var found = false; - exp.walk(new TreeWalker(function(node) { - if (found) return true; - if (node instanceof AST_NewTarget) return found = true; - if (node instanceof AST_Scope && node !== exp) return true; - })); - return !found; - } - - function is_undeclared_ref(node) { - return node instanceof AST_SymbolRef && node.definition().undeclared; - } - - var global_names = makePredicate("Array Boolean clearInterval clearTimeout console Date decodeURI decodeURIComponent encodeURI encodeURIComponent Error escape eval EvalError Function isFinite isNaN JSON Map Math Number parseFloat parseInt RangeError ReferenceError RegExp Object Set setInterval setTimeout String SyntaxError TypeError unescape URIError WeakMap WeakSet"); - AST_SymbolRef.DEFMETHOD("is_declared", function(compressor) { - return this.defined - || !this.definition().undeclared - || compressor.option("unsafe") && global_names[this.name]; - }); - - function declarations_only(node) { - return all(node.definitions, function(var_def) { - return !var_def.value; - }); - } - - function is_declaration(stat, lexical) { - if (stat instanceof AST_DefClass) return lexical && !stat.extends && all(stat.properties, function(prop) { - if (prop.key instanceof AST_Node) return false; - if (prop instanceof AST_ClassField && prop.static && prop.value) return false; - return true; - }); - if (stat instanceof AST_Definitions) return (lexical || stat instanceof AST_Var) && declarations_only(stat); - if (stat instanceof AST_ExportDeclaration) return is_declaration(stat.body, lexical); - if (stat instanceof AST_ExportDefault) return is_declaration(stat.body, lexical); - return stat instanceof AST_LambdaDefinition; - } - - function is_last_statement(body, stat) { - var index = body.lastIndexOf(stat); - if (index < 0) return false; - while (++index < body.length) { - if (!is_declaration(body[index], true)) return false; - } - return true; - } - - function tighten_body(statements, compressor) { - var in_loop, in_try, scope; - find_loop_scope_try(); - var CHANGED, max_iter = 10; - do { - CHANGED = false; - eliminate_spurious_blocks(statements); - if (compressor.option("dead_code")) { - eliminate_dead_code(statements, compressor); - } - if (compressor.option("if_return")) { - handle_if_return(statements, compressor); - } - if (compressor.sequences_limit > 0) { - sequencesize(statements, compressor); - sequencesize_2(statements, compressor); - } - if (compressor.option("join_vars")) { - join_consecutive_vars(statements); - } - if (compressor.option("collapse_vars")) { - collapse(statements, compressor); - } - } while (CHANGED && max_iter-- > 0); - return statements; - - function find_loop_scope_try() { - var node = compressor.self(), level = 0; - do { - if (node instanceof AST_Catch) { - if (!compressor.parent(level).bfinally) level++; - } else if (node instanceof AST_Finally) { - level++; - } else if (node instanceof AST_IterationStatement) { - in_loop = true; - } else if (node instanceof AST_Scope) { - scope = node; - break; - } else if (node instanceof AST_Try) { - if (!in_try) in_try = node; - } - } while (node = compressor.parent(level++)); - } - - // Search from right to left for assignment-like expressions: - // - `var a = x;` - // - `a = x;` - // - `++a` - // For each candidate, scan from left to right for first usage, then try - // to fold assignment into the site for compression. - // Will not attempt to collapse assignments into or past code blocks - // which are not sequentially executed, e.g. loops and conditionals. - function collapse(statements, compressor) { - if (scope.pinned()) return statements; - var args; - var assignments = Object.create(null); - var candidates = []; - var declare_only = Object.create(null); - var force_single; - var stat_index = statements.length; - var scanner = new TreeTransformer(function(node, descend) { - if (abort) return node; - // Skip nodes before `candidate` as quickly as possible - if (!hit) { - if (node !== hit_stack[hit_index]) return node; - hit_index++; - if (hit_index < hit_stack.length) return handle_custom_scan_order(node, scanner); - hit = true; - stop_after = (value_def ? find_stop_value : find_stop)(node, 0); - if (stop_after === node) abort = true; - return node; - } - // Stop immediately if these node types are encountered - var parent = scanner.parent(); - if (should_stop(node, parent)) { - abort = true; - return node; - } - // Stop only if candidate is found within conditional branches - if (!stop_if_hit && in_conditional(node, parent)) { - stop_if_hit = parent; - } - // Skip transient nodes caused by single-use variable replacement - if (node.single_use && parent instanceof AST_VarDef && parent.value === node) return node; - // Replace variable with assignment when found - var hit_rhs; - if (!(node instanceof AST_SymbolDeclaration) - && (scan_lhs && lhs.equivalent_to(node) - || scan_rhs && (hit_rhs = scan_rhs(node, this)))) { - if (!can_replace || stop_if_hit && (hit_rhs || !lhs_local || !replace_all)) { - if (!hit_rhs && !value_def) abort = true; - return node; - } - if (is_lhs(node, parent)) { - if (value_def && !hit_rhs) assign_used = true; - return node; - } else if (value_def) { - if (stop_if_hit && assign_pos == 0) assign_pos = remaining - replaced; - if (!hit_rhs) replaced++; - return node; - } else { - replaced++; - } - CHANGED = abort = true; - AST_Node.info("Collapsing {node} [{file}:{line},{col}]", { - node: node, - file: node.start.file, - line: node.start.line, - col: node.start.col, - }); - if (candidate.TYPE == "Binary") return make_node(AST_Assign, candidate, { - operator: "=", - left: candidate.right.left, - right: make_node(AST_Conditional, candidate, { - condition: candidate.operator == "&&" ? candidate.left : candidate.left.negate(compressor), - consequent: candidate.right.right, - alternative: node, - }), - }); - if (candidate instanceof AST_UnaryPostfix) { - if (lhs instanceof AST_SymbolRef) lhs.definition().fixed = false; - return make_node(AST_UnaryPrefix, candidate, candidate); - } - if (candidate instanceof AST_VarDef) { - var def = candidate.name.definition(); - if (def.references.length - def.replaced == 1 && !compressor.exposed(def)) { - def.replaced++; - return maintain_this_binding(compressor, parent, node, candidate.value); - } - return make_node(AST_Assign, candidate, { - operator: "=", - left: make_node(AST_SymbolRef, candidate.name, candidate.name), - right: candidate.value, - }); - } - var assign = candidate; - while (assign.write_only) { - assign.write_only = false; - if (!(assign instanceof AST_Assign)) break; - assign = assign.right; - } - return candidate; - } - // These node types have child nodes that execute sequentially, - // but are otherwise not safe to scan into or beyond them. - if (is_last_node(node, parent) || may_throw(node)) { - stop_after = node; - if (node instanceof AST_Scope) abort = true; - } - // Scan but don't replace inside getter/setter - if (node instanceof AST_Accessor) { - var replace = can_replace; - can_replace = false; - descend(node, scanner); - can_replace = replace; - return signal_abort(node); - } - // Scan but don't replace inside destructuring expression - if (node instanceof AST_Destructured) { - var replace = can_replace; - can_replace = false; - descend(node, scanner); - can_replace = replace; - return signal_abort(node); - } - // Scan but don't replace inside default value - if (node instanceof AST_DefaultValue) { - node.name = node.name.transform(scanner); - var replace = can_replace; - can_replace = false; - node.value = node.value.transform(scanner); - can_replace = replace; - return signal_abort(node); - } - // Scan but don't replace inside block scope with colliding variable - if (node instanceof AST_BlockScope - && !(node instanceof AST_Scope) - && !(node.variables && node.variables.all(function(def) { - return !lvalues.has(def.name); - }))) { - var replace = can_replace; - can_replace = false; - if (!handle_custom_scan_order(node, scanner)) descend(node, scanner); - can_replace = replace; - return signal_abort(node); - } - return handle_custom_scan_order(node, scanner); - }, signal_abort); - var multi_replacer = new TreeTransformer(function(node) { - if (abort) return node; - // Skip nodes before `candidate` as quickly as possible - if (!hit) { - if (node !== hit_stack[hit_index]) return node; - hit_index++; - switch (hit_stack.length - hit_index) { - case 0: - hit = true; - if (assign_used) return node; - if (node !== candidate) return node; - if (node instanceof AST_VarDef) return node; - def.replaced++; - var parent = multi_replacer.parent(); - if (parent instanceof AST_Sequence && parent.tail_node() !== node) { - value_def.replaced++; - return List.skip; - } - return rvalue; - case 1: - if (!assign_used && node.body === candidate) { - hit = true; - def.replaced++; - value_def.replaced++; - return null; - } - default: - return handle_custom_scan_order(node, multi_replacer); - } - } - // Replace variable when found - if (node instanceof AST_SymbolRef && node.definition() === def) { - if (is_lhs(node, multi_replacer.parent())) return node; - if (!--replaced) abort = true; - var ref = rvalue.clone(); - ref.scope = node.scope; - ref.reference(); - if (replaced == assign_pos) { - abort = true; - return make_node(AST_Assign, candidate, { - operator: "=", - left: node, - right: ref, - }); - } - def.replaced++; - return ref; - } - // Skip (non-executed) functions and (leading) default case in switch statements - if (node instanceof AST_Default || node instanceof AST_Scope) return node; - }, patch_sequence); - while (--stat_index >= 0) { - // Treat parameters as collapsible in IIFE, i.e. - // function(a, b){ ... }(x()); - // would be translated into equivalent assignments: - // var a = x(), b = undefined; - if (stat_index == 0 && compressor.option("unused")) extract_args(); - // Find collapsible assignments - var hit_stack = []; - extract_candidates(statements[stat_index]); - while (candidates.length > 0) { - hit_stack = candidates.pop(); - var hit_index = 0; - var candidate = hit_stack[hit_stack.length - 1]; - var assign_pos = -1; - var assign_used = false; - var remaining; - var value_def = null; - var stop_after = null; - var stop_if_hit = null; - var lhs = get_lhs(candidate); - var side_effects = lhs && lhs.has_side_effects(compressor); - var scan_lhs = lhs && !side_effects && !is_lhs_read_only(lhs, compressor); - var scan_rhs = foldable(candidate); - if (!scan_lhs && !scan_rhs) continue; - var funarg = candidate.name instanceof AST_SymbolFunarg; - var may_throw = return_false; - if (candidate.may_throw(compressor)) { - if (funarg && is_async(scope)) continue; - may_throw = in_try ? function(node) { - return node.has_side_effects(compressor); - } : side_effects_external; - } - var read_toplevel = false; - var modify_toplevel = false; - // Locate symbols which may execute code outside of scanning range - var well_defined = true; - var lvalues = get_lvalues(candidate); - var lhs_local = is_lhs_local(lhs); - var rvalue = get_rvalue(candidate); - if (!side_effects) side_effects = value_has_side_effects(); - var check_destructured = in_try || !lhs_local ? function(node) { - return node instanceof AST_Destructured; - } : return_false; - var replace_all = replace_all_symbols(candidate); - var hit = funarg; - var abort = false; - var replaced = 0; - var can_replace = !args || !hit; - if (!can_replace) { - for (var j = candidate.arg_index + 1; !abort && j < args.length; j++) { - if (args[j]) args[j].transform(scanner); - } - can_replace = true; - } - for (var i = stat_index; !abort && i < statements.length; i++) { - statements[i].transform(scanner); - } - if (value_def) { - if (!replaced || remaining > replaced + assign_used) { - candidates.push(hit_stack); - force_single = true; - continue; - } - if (replaced == assign_pos) assign_used = true; - var def = lhs.definition(); - abort = false; - hit_index = 0; - hit = funarg; - for (var i = stat_index; !abort && i < statements.length; i++) { - if (!statements[i].transform(multi_replacer)) statements.splice(i--, 1); - } - replaced = candidate instanceof AST_VarDef - && candidate === hit_stack[hit_stack.length - 1] - && def.references.length == def.replaced - && !compressor.exposed(def); - value_def.last_ref = false; - value_def.single_use = false; - CHANGED = true; - } - if (replaced && !remove_candidate(candidate)) statements.splice(stat_index, 1); - } - } - - function signal_abort(node) { - if (abort) return node; - if (stop_after === node) abort = true; - if (stop_if_hit === node) stop_if_hit = null; - return node; - } - - function handle_custom_scan_order(node, tt) { - if (!(node instanceof AST_BlockScope)) { - if (!(node instanceof AST_ClassProperty && !node.static)) return; - // Skip non-static class property values - if (node.key instanceof AST_Node) node.key = node.key.transform(tt); - return node; - } - // Skip (non-executed) functions - if (node instanceof AST_Scope) return node; - // Scan object only in a for-in/of statement - if (node instanceof AST_ForEnumeration) { - node.object = node.object.transform(tt); - abort = true; - return node; - } - // Scan first case expression only in a switch statement - if (node instanceof AST_Switch) { - node.expression = node.expression.transform(tt); - for (var i = 0; !abort && i < node.body.length; i++) { - var branch = node.body[i]; - if (branch instanceof AST_Case) { - if (!hit) { - if (branch !== hit_stack[hit_index]) continue; - hit_index++; - } - branch.expression = branch.expression.transform(tt); - if (!replace_all) break; - scan_rhs = false; - } - } - abort = true; - return node; - } - } - - function is_direct_assignment(node, parent) { - if (parent instanceof AST_Assign) return parent.operator == "=" && parent.left === node; - if (parent instanceof AST_DefaultValue) return parent.name === node; - if (parent instanceof AST_DestructuredArray) return true; - if (parent instanceof AST_DestructuredKeyVal) return parent.value === node; - } - - function should_stop(node, parent) { - if (node === rvalue) return true; - if (parent instanceof AST_For) { - if (node !== parent.init) return true; - } - if (node instanceof AST_Assign) { - return node.operator != "=" && lhs.equivalent_to(node.left); - } - if (node instanceof AST_Call) { - if (!(lhs instanceof AST_PropAccess)) return false; - if (!lhs.equivalent_to(node.expression)) return false; - return !(rvalue instanceof AST_LambdaExpression && !rvalue.contains_this()); - } - if (node instanceof AST_Class) return !compressor.has_directive("use strict"); - if (node instanceof AST_Debugger) return true; - if (node instanceof AST_Defun) return funarg && lhs.name === node.name.name; - if (node instanceof AST_DestructuredKeyVal) return node.key instanceof AST_Node; - if (node instanceof AST_DWLoop) return true; - if (node instanceof AST_LoopControl) return true; - if (node instanceof AST_SymbolRef) { - if (node.is_declared(compressor)) { - if (node.fixed_value()) return false; - if (can_drop_symbol(node)) { - return !(parent instanceof AST_PropAccess && parent.expression === node) - && is_arguments(node.definition()); - } - } else if (is_direct_assignment(node, parent)) { - return false; - } - if (!replace_all) return true; - scan_rhs = false; - return false; - } - if (node instanceof AST_Try) return true; - if (node instanceof AST_With) return true; - return false; - } - - function in_conditional(node, parent) { - if (parent instanceof AST_Assign) return parent.left !== node && lazy_op[parent.operator.slice(0, -1)]; - if (parent instanceof AST_Binary) return parent.left !== node && lazy_op[parent.operator]; - if (parent instanceof AST_Call) return parent.optional && parent.expression !== node; - if (parent instanceof AST_Case) return parent.expression !== node; - if (parent instanceof AST_Conditional) return parent.condition !== node; - if (parent instanceof AST_If) return parent.condition !== node; - if (parent instanceof AST_Sub) return parent.optional && parent.expression !== node; - } - - function is_last_node(node, parent) { - if (node instanceof AST_Await) return true; - if (node.TYPE == "Binary") return node.operator == "in" && !is_object(node.right); - if (node instanceof AST_Call) { - var def, fn = node.expression; - if (fn instanceof AST_SymbolRef) { - def = fn.definition(); - fn = fn.fixed_value(); - } - if (!(fn instanceof AST_Lambda)) return !node.is_expr_pure(compressor); - if (def && recursive_ref(compressor, def)) return true; - if (fn.collapse_scanning) return false; - fn.collapse_scanning = true; - var replace = can_replace; - can_replace = false; - var after = stop_after; - var if_hit = stop_if_hit; - if (!all(fn.argnames, function(argname) { - if (argname instanceof AST_DefaultValue) { - argname.value.transform(scanner); - if (abort) return false; - argname = argname.name; - } - return !(argname instanceof AST_Destructured); - })) { - abort = true; - } else if (is_arrow(fn) && fn.value) { - fn.value.transform(scanner); - } else for (var i = 0; !abort && i < fn.body.length; i++) { - var stat = fn.body[i]; - if (stat instanceof AST_Return) { - if (stat.value) stat.value.transform(scanner); - break; - } - stat.transform(scanner); - } - stop_if_hit = if_hit; - stop_after = after; - can_replace = replace; - delete fn.collapse_scanning; - if (!abort) return false; - abort = false; - return true; - } - if (node instanceof AST_Exit) { - if (in_try) { - if (in_try.bfinally) return true; - if (in_try.bcatch && node instanceof AST_Throw) return true; - } - return side_effects || lhs instanceof AST_PropAccess || may_modify(lhs); - } - if (node instanceof AST_Function) { - return compressor.option("ie8") && node.name && lvalues.has(node.name.name); - } - if (node instanceof AST_ObjectIdentity) return symbol_in_lvalues(node, parent); - if (node instanceof AST_PropAccess) { - if (side_effects) return true; - var exp = node.expression; - if (exp instanceof AST_SymbolRef && is_arguments(exp.definition())) return true; - if (compressor.option("unsafe")) { - if (is_undeclared_ref(exp) && global_names[exp.name]) return false; - if (is_static_fn(exp)) return false; - } - if (!well_defined) return true; - if (value_def) return false; - if (!in_try && lhs_local) return false; - if (node.optional) return false; - return exp.may_throw_on_access(compressor); - } - if (node instanceof AST_Spread) return true; - if (node instanceof AST_SymbolRef) { - if (symbol_in_lvalues(node, parent)) return !is_direct_assignment(node, parent); - if (side_effects && may_modify(node)) return true; - var def = node.definition(); - return (in_try || def.scope.resolve() !== scope) && !can_drop_symbol(node); - } - if (node instanceof AST_Template) return !node.is_expr_pure(compressor); - if (node instanceof AST_VarDef) { - if (check_destructured(node.name)) return true; - return (node.value || parent instanceof AST_Let) && node.name.match_symbol(function(node) { - return node instanceof AST_SymbolDeclaration - && (lvalues.has(node.name) || side_effects && may_modify(node)); - }, true); - } - if (node instanceof AST_Yield) return true; - var sym = is_lhs(node.left, node); - if (!sym) return false; - if (sym instanceof AST_PropAccess) return true; - if (check_destructured(sym)) return true; - return sym.match_symbol(function(node) { - return node instanceof AST_SymbolRef - && (lvalues.has(node.name) || read_toplevel && compressor.exposed(node.definition())); - }, true); - } - - function may_throw_destructured(node, value) { - if (!value) return !(node instanceof AST_Symbol); - if (node instanceof AST_DefaultValue) { - return value.has_side_effects(compressor) - || node.value.has_side_effects(compressor) - || may_throw_destructured(node.name, is_undefined(value) && node.value); - } - if (node instanceof AST_Destructured) { - if (node.rest && may_throw_destructured(node.rest)) return true; - if (node instanceof AST_DestructuredArray) { - if (!(value instanceof AST_Array || value.is_string(compressor))) return true; - return !all(node.elements, function(element) { - return !may_throw_destructured(element); - }); - } - if (node instanceof AST_DestructuredObject) { - if (!value.is_defined(compressor)) return true; - return !all(node.properties, function(prop) { - if (prop instanceof AST_Node && prop.has_side_effects(compressor)) return false; - return !may_throw_destructured(prop.value); - }); - } - } - } - - function extract_args() { - var iife, fn = compressor.self(); - if (fn instanceof AST_LambdaExpression - && !is_generator(fn) - && !fn.uses_arguments - && !fn.pinned() - && (iife = compressor.parent()) instanceof AST_Call - && iife.expression === fn - && is_iife_single(iife) - && all(iife.args, function(arg) { - return !(arg instanceof AST_Spread); - })) { - var fn_strict = compressor.has_directive("use strict"); - if (fn_strict && !member(fn_strict, fn.body)) fn_strict = false; - var has_await = is_async(fn) ? function(node) { - return node instanceof AST_Symbol && node.name == "await"; - } : function(node) { - return node instanceof AST_Await && !tw.find_parent(AST_Scope); - }; - var arg_scope = null; - var tw = new TreeWalker(function(node, descend) { - if (!arg) return true; - if (has_await(node) || node instanceof AST_Yield) { - arg = null; - return true; - } - if (node instanceof AST_ObjectIdentity && (fn_strict || !arg_scope)) { - arg = null; - return true; - } - if (node instanceof AST_SymbolRef && fn.variables.has(node.name)) { - var s = node.definition().scope; - if (s !== scope) while (s = s.parent_scope) { - if (s === scope) return true; - } - arg = null; - } - if (node instanceof AST_Scope && !is_arrow(node)) { - var save_scope = arg_scope; - arg_scope = node; - descend(); - arg_scope = save_scope; - return true; - } - }); - args = iife.args.slice(); - var len = args.length; - var names = Object.create(null); - for (var i = fn.argnames.length; --i >= 0;) { - var sym = fn.argnames[i]; - var arg = args[i]; - var value; - if (sym instanceof AST_DefaultValue) { - value = sym.value; - sym = sym.name; - args[len + i] = value; - } - if (sym instanceof AST_Destructured) { - if (!may_throw_destructured(sym, arg)) continue; - candidates.length = 0; - break; - } - if (sym.name in names) continue; - names[sym.name] = true; - if (value) arg = !arg || is_undefined(arg) ? value : null; - if (!arg && !value) { - arg = make_node(AST_Undefined, sym).transform(compressor); - } else if (arg instanceof AST_Lambda && arg.pinned()) { - arg = null; - } else if (arg) { - arg.walk(tw); - } - if (!arg) continue; - var candidate = make_node(AST_VarDef, sym, { - name: sym, - value: arg, - }); - candidate.name_index = i; - candidate.arg_index = value ? len + i : i; - candidates.unshift([ candidate ]); - } - } - } - - function extract_candidates(expr, unused) { - hit_stack.push(expr); - if (expr instanceof AST_Array) { - expr.elements.forEach(function(node) { - extract_candidates(node, unused); - }); - } else if (expr instanceof AST_Assign) { - var lhs = expr.left; - if (!(lhs instanceof AST_Destructured)) candidates.push(hit_stack.slice()); - extract_candidates(lhs); - extract_candidates(expr.right); - if (lhs instanceof AST_SymbolRef && expr.operator == "=") { - assignments[lhs.name] = (assignments[lhs.name] || 0) + 1; - } - } else if (expr instanceof AST_Await) { - extract_candidates(expr.expression, unused); - } else if (expr instanceof AST_Binary) { - var lazy = lazy_op[expr.operator]; - if (unused - && lazy - && expr.operator != "??" - && expr.right instanceof AST_Assign - && expr.right.operator == "=" - && !(expr.right.left instanceof AST_Destructured)) { - candidates.push(hit_stack.slice()); - } - extract_candidates(expr.left, !lazy && unused); - extract_candidates(expr.right, unused); - } else if (expr instanceof AST_Call) { - extract_candidates(expr.expression); - expr.args.forEach(extract_candidates); - } else if (expr instanceof AST_Case) { - extract_candidates(expr.expression); - } else if (expr instanceof AST_Conditional) { - extract_candidates(expr.condition); - extract_candidates(expr.consequent, unused); - extract_candidates(expr.alternative, unused); - } else if (expr instanceof AST_Definitions) { - expr.definitions.forEach(extract_candidates); - } else if (expr instanceof AST_Dot) { - extract_candidates(expr.expression); - } else if (expr instanceof AST_DWLoop) { - extract_candidates(expr.condition); - if (!(expr.body instanceof AST_Block)) { - extract_candidates(expr.body); - } - } else if (expr instanceof AST_Exit) { - if (expr.value) extract_candidates(expr.value); - } else if (expr instanceof AST_For) { - if (expr.init) extract_candidates(expr.init, true); - if (expr.condition) extract_candidates(expr.condition); - if (expr.step) extract_candidates(expr.step, true); - if (!(expr.body instanceof AST_Block)) { - extract_candidates(expr.body); - } - } else if (expr instanceof AST_ForEnumeration) { - extract_candidates(expr.object); - if (!(expr.body instanceof AST_Block)) { - extract_candidates(expr.body); - } - } else if (expr instanceof AST_If) { - extract_candidates(expr.condition); - if (!(expr.body instanceof AST_Block)) { - extract_candidates(expr.body); - } - if (expr.alternative && !(expr.alternative instanceof AST_Block)) { - extract_candidates(expr.alternative); - } - } else if (expr instanceof AST_Object) { - expr.properties.forEach(function(prop) { - hit_stack.push(prop); - if (prop.key instanceof AST_Node) extract_candidates(prop.key); - if (prop instanceof AST_ObjectKeyVal) extract_candidates(prop.value, unused); - hit_stack.pop(); - }); - } else if (expr instanceof AST_Sequence) { - var end = expr.expressions.length - (unused ? 0 : 1); - expr.expressions.forEach(function(node, index) { - extract_candidates(node, index < end); - }); - } else if (expr instanceof AST_SimpleStatement) { - extract_candidates(expr.body, true); - } else if (expr instanceof AST_Spread) { - extract_candidates(expr.expression); - } else if (expr instanceof AST_Sub) { - extract_candidates(expr.expression); - extract_candidates(expr.property); - } else if (expr instanceof AST_Switch) { - extract_candidates(expr.expression); - expr.body.forEach(extract_candidates); - } else if (expr instanceof AST_Unary) { - if (UNARY_POSTFIX[expr.operator]) { - candidates.push(hit_stack.slice()); - } else { - extract_candidates(expr.expression); - } - } else if (expr instanceof AST_VarDef) { - if (expr.name instanceof AST_SymbolVar) { - if (expr.value) { - var def = expr.name.definition(); - if (def.references.length > def.replaced) { - candidates.push(hit_stack.slice()); - } - } else { - declare_only[expr.name.name] = (declare_only[expr.name.name] || 0) + 1; - } - } - if (expr.value) extract_candidates(expr.value); - } else if (expr instanceof AST_Yield) { - if (expr.expression) extract_candidates(expr.expression); - } - hit_stack.pop(); - } - - function find_stop(node, level) { - var parent = scanner.parent(level); - if (parent instanceof AST_Array) return node; - if (parent instanceof AST_Assign) return node; - if (parent instanceof AST_Await) return node; - if (parent instanceof AST_Binary) return node; - if (parent instanceof AST_Call) return node; - if (parent instanceof AST_Case) return node; - if (parent instanceof AST_Conditional) return node; - if (parent instanceof AST_Definitions) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Exit) return node; - if (parent instanceof AST_If) return node; - if (parent instanceof AST_IterationStatement) return node; - if (parent instanceof AST_ObjectProperty) return node; - if (parent instanceof AST_PropAccess) return node; - if (parent instanceof AST_Sequence) { - return (parent.tail_node() === node ? find_stop : find_stop_unused)(parent, level + 1); - } - if (parent instanceof AST_SimpleStatement) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Spread) return node; - if (parent instanceof AST_Switch) return node; - if (parent instanceof AST_Unary) return node; - if (parent instanceof AST_VarDef) return node; - if (parent instanceof AST_Yield) return node; - return null; - } - - function find_stop_logical(parent, op, level) { - var node; - do { - node = parent; - parent = scanner.parent(++level); - } while (parent instanceof AST_Assign && parent.operator.slice(0, -1) == op - || parent instanceof AST_Binary && parent.operator == op); - return node; - } - - function find_stop_expr(expr, cont, node, parent, level) { - var replace = can_replace; - can_replace = false; - var after = stop_after; - var if_hit = stop_if_hit; - var stack = scanner.stack; - scanner.stack = [ parent ]; - expr.transform(scanner); - scanner.stack = stack; - stop_if_hit = if_hit; - stop_after = after; - can_replace = replace; - if (abort) { - abort = false; - return node; - } - return cont(parent, level + 1); - } - - function find_stop_value(node, level) { - var parent = scanner.parent(level); - if (parent instanceof AST_Array) return find_stop_value(parent, level + 1); - if (parent instanceof AST_Assign) { - if (may_throw(parent)) return node; - if (parent.left.match_symbol(function(ref) { - return ref instanceof AST_SymbolRef && (lhs.name == ref.name || value_def.name == ref.name); - })) return node; - var op; - if (parent.left === node || !lazy_op[op = parent.operator.slice(0, -1)]) { - return find_stop_value(parent, level + 1); - } - return find_stop_logical(parent, op, level); - } - if (parent instanceof AST_Binary) { - var op; - if (parent.left === node || !lazy_op[op = parent.operator]) { - return find_stop_value(parent, level + 1); - } - return find_stop_logical(parent, op, level); - } - if (parent instanceof AST_Call) return parent; - if (parent instanceof AST_Case) { - if (parent.expression !== node) return node; - return find_stop_value(parent, level + 1); - } - if (parent instanceof AST_Conditional) { - if (parent.condition !== node) return node; - return find_stop_value(parent, level + 1); - } - if (parent instanceof AST_Definitions) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Do) return node; - if (parent instanceof AST_Exit) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_For) { - if (parent.init !== node && parent.condition !== node) return node; - return find_stop_value(parent, level + 1); - } - if (parent instanceof AST_ForEnumeration) { - if (parent.init !== node) return node; - return find_stop_value(parent, level + 1); - } - if (parent instanceof AST_If) { - if (parent.condition !== node) return node; - return find_stop_value(parent, level + 1); - } - if (parent instanceof AST_ObjectProperty) { - var obj = scanner.parent(level + 1); - return all(obj.properties, function(prop) { - return prop instanceof AST_ObjectKeyVal; - }) ? find_stop_value(obj, level + 2) : obj; - } - if (parent instanceof AST_PropAccess) { - var exp = parent.expression; - return exp === node ? find_stop_value(parent, level + 1) : node; - } - if (parent instanceof AST_Sequence) { - return (parent.tail_node() === node ? find_stop_value : find_stop_unused)(parent, level + 1); - } - if (parent instanceof AST_SimpleStatement) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Spread) return find_stop_value(parent, level + 1); - if (parent instanceof AST_Switch) { - if (parent.expression !== node) return node; - return find_stop_value(parent, level + 1); - } - if (parent instanceof AST_Unary) { - if (parent.operator == "delete") return node; - return find_stop_value(parent, level + 1); - } - if (parent instanceof AST_VarDef) return parent.name.match_symbol(function(sym) { - return sym instanceof AST_SymbolDeclaration && (lhs.name == sym.name || value_def.name == sym.name); - }) ? node : find_stop_value(parent, level + 1); - if (parent instanceof AST_While) { - if (parent.condition !== node) return node; - return find_stop_value(parent, level + 1); - } - if (parent instanceof AST_Yield) return find_stop_value(parent, level + 1); - return null; - } - - function find_stop_unused(node, level) { - var parent = scanner.parent(level); - if (is_last_node(node, parent)) return node; - if (in_conditional(node, parent)) return node; - if (parent instanceof AST_Array) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Assign) return check_assignment(parent.left); - if (parent instanceof AST_Await) return node; - if (parent instanceof AST_Binary) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Call) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Case) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Conditional) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Definitions) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Exit) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_If) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_IterationStatement) return node; - if (parent instanceof AST_ObjectProperty) { - var obj = scanner.parent(level + 1); - return all(obj.properties, function(prop) { - return prop instanceof AST_ObjectKeyVal; - }) ? find_stop_unused(obj, level + 2) : obj; - } - if (parent instanceof AST_PropAccess) { - var exp = parent.expression; - if (exp === node) return find_stop_unused(parent, level + 1); - return find_stop_expr(exp, find_stop_unused, node, parent, level); - } - if (parent instanceof AST_Sequence) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_SimpleStatement) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Spread) return node; - if (parent instanceof AST_Switch) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_Unary) return find_stop_unused(parent, level + 1); - if (parent instanceof AST_VarDef) return check_assignment(parent.name); - if (parent instanceof AST_Yield) return node; - return null; - - function check_assignment(lhs) { - if (may_throw(parent)) return node; - if (lhs !== node && lhs instanceof AST_Destructured) { - return find_stop_expr(lhs, find_stop_unused, node, parent, level); - } - return find_stop_unused(parent, level + 1); - } - } - - function mangleable_var(rhs) { - if (force_single) { - force_single = false; - return; - } - if (remaining < 1) return; - var value = rhs instanceof AST_Assign && rhs.operator == "=" ? rhs.left : rhs; - if (!(value instanceof AST_SymbolRef)) return; - var def = value.definition(); - if (def.undeclared) return; - if (is_arguments(def)) return; - if (value !== rhs) { - if (is_lhs_read_only(value, compressor)) return; - var referenced = def.references.length - def.replaced; - if (referenced < 2) return; - var expr = candidate.clone(); - expr[expr instanceof AST_Assign ? "right" : "value"] = value; - if (candidate.name_index >= 0) { - expr.name_index = candidate.name_index; - expr.arg_index = candidate.arg_index; - } - candidate = expr; - } - return value_def = def; - } - - function remaining_refs(def) { - return def.references.length - def.replaced - (assignments[def.name] || 0); - } - - function get_lhs(expr) { - if (expr instanceof AST_Assign) { - var lhs = expr.left; - if (expr.operator != "=") return lhs; - if (!(lhs instanceof AST_SymbolRef)) return lhs; - var def = lhs.definition(); - if (scope.uses_arguments && is_funarg(def)) return lhs; - if (compressor.exposed(def)) return lhs; - remaining = remaining_refs(def); - if (def.fixed && lhs.fixed) { - var matches = def.references.filter(function(ref) { - return ref.fixed === lhs.fixed; - }).length - 1; - if (matches < remaining) { - remaining = matches; - assign_pos = 0; - } - } - mangleable_var(expr.right); - return lhs; - } - if (expr instanceof AST_Binary) return expr.right.left; - if (expr instanceof AST_Unary) return expr.expression; - if (expr instanceof AST_VarDef) { - var lhs = expr.name; - var def = lhs.definition(); - if (def.const_redefs) return; - if (!member(lhs, def.orig)) return; - if (scope.uses_arguments && is_funarg(def)) return; - var declared = def.orig.length - def.eliminated - (declare_only[def.name] || 0); - remaining = remaining_refs(def); - if (def.fixed) remaining = Math.min(remaining, def.references.filter(function(ref) { - if (!ref.fixed) return true; - if (!ref.fixed.assigns) return true; - var assign = ref.fixed.assigns[0]; - return assign === lhs || get_rvalue(assign) === expr.value; - }).length); - if (declared > 1 && !(lhs instanceof AST_SymbolFunarg)) { - mangleable_var(expr.value); - return make_node(AST_SymbolRef, lhs, lhs); - } - if (mangleable_var(expr.value) || remaining == 1 && !compressor.exposed(def)) { - return make_node(AST_SymbolRef, lhs, lhs); - } - return; - } - } - - function get_rvalue(expr) { - if (expr instanceof AST_Assign) return expr.right; - if (expr instanceof AST_Binary) { - var node = expr.clone(); - node.right = expr.right.right; - return node; - } - if (expr instanceof AST_VarDef) return expr.value; - } - - function invariant(expr) { - if (expr instanceof AST_Array) return false; - if (expr instanceof AST_Binary && lazy_op[expr.operator]) { - return invariant(expr.left) && invariant(expr.right); - } - if (expr instanceof AST_Call) return false; - if (expr instanceof AST_Conditional) { - return invariant(expr.consequent) && invariant(expr.alternative); - } - if (expr instanceof AST_Object) return false; - return !expr.has_side_effects(compressor); - } - - function foldable(expr) { - if (expr instanceof AST_Assign && expr.right.single_use) return; - var lhs_ids = Object.create(null); - var marker = new TreeWalker(function(node) { - if (node instanceof AST_SymbolRef) lhs_ids[node.definition().id] = true; - }); - while (expr instanceof AST_Assign && expr.operator == "=") { - expr.left.walk(marker); - expr = expr.right; - } - if (expr instanceof AST_ObjectIdentity) return rhs_exact_match; - if (expr instanceof AST_SymbolRef) { - var value = expr.evaluate(compressor); - if (value === expr) return rhs_exact_match; - return rhs_fuzzy_match(value, rhs_exact_match); - } - if (expr.is_truthy()) return rhs_fuzzy_match(true, return_false); - if (expr.is_constant()) { - var ev = expr.evaluate(compressor); - if (!(ev instanceof AST_Node)) return rhs_fuzzy_match(ev, rhs_exact_match); - } - if (!(lhs instanceof AST_SymbolRef)) return false; - if (!invariant(expr)) return false; - var circular; - expr.walk(new TreeWalker(function(node) { - if (circular) return true; - if (node instanceof AST_SymbolRef && lhs_ids[node.definition().id]) circular = true; - })); - return !circular && rhs_exact_match; - - function rhs_exact_match(node) { - return expr.equivalent_to(node); - } - } - - function rhs_fuzzy_match(value, fallback) { - return function(node, tw) { - if (tw.in_boolean_context()) { - if (value && node.is_truthy() && !node.has_side_effects(compressor)) { - return true; - } - if (node.is_constant()) { - var ev = node.evaluate(compressor); - if (!(ev instanceof AST_Node)) return !ev == !value; - } - } - return fallback(node); - }; - } - - function may_be_global(node) { - if (node instanceof AST_SymbolRef) { - node = node.fixed_value(); - if (!node) return true; - } - if (node instanceof AST_Assign) return node.operator == "=" && may_be_global(node.right); - return node instanceof AST_PropAccess || node instanceof AST_ObjectIdentity; - } - - function get_lvalues(expr) { - var lvalues = new Dictionary(); - if (expr instanceof AST_VarDef) { - if (!expr.name.definition().fixed) well_defined = false; - lvalues.add(expr.name.name, lhs); - } - var find_arguments = scope.uses_arguments && !compressor.has_directive("use strict"); - var scan_toplevel = scope instanceof AST_Toplevel; - var tw = new TreeWalker(function(node) { - var value; - if (node instanceof AST_SymbolRef) { - value = node.fixed_value(); - if (!value) { - value = node; - var def = node.definition(); - if (!def.undeclared - && (def.assignments || !def.escaped || def.escaped.cross_scope) - && (has_escaped(def, node.scope, node, tw.parent()) || !same_scope(def))) { - well_defined = false; - } - } - } else if (node instanceof AST_ObjectIdentity) { - value = node; - } - if (value) lvalues.add(node.name, is_modified(compressor, tw, node, value, 0)); - if (find_arguments && node instanceof AST_Sub) { - scope.each_argname(function(argname) { - if (!compressor.option("reduce_vars") || argname.definition().assignments) { - if (!argname.definition().fixed) well_defined = false; - lvalues.add(argname.name, true); - } - }); - find_arguments = false; - } - if (!scan_toplevel) return; - if (node.TYPE == "Call") { - if (modify_toplevel) return; - var exp = node.expression; - if (exp instanceof AST_PropAccess) return; - if (exp instanceof AST_LambdaExpression && !exp.contains_this()) return; - modify_toplevel = true; - } else if (node instanceof AST_PropAccess && may_be_global(node.expression)) { - if (node === lhs && !(expr instanceof AST_Unary)) { - modify_toplevel = true; - } else { - read_toplevel = true; - } - } - }); - expr.walk(tw); - return lvalues; - } - - function remove_candidate(expr) { - var index = expr.name_index; - if (index >= 0) { - var argname = scope.argnames[index]; - if (argname instanceof AST_DefaultValue) { - argname.value = make_node(AST_Number, argname, { - value: 0 - }); - argname.name.definition().fixed = false; - } else { - var args = compressor.parent().args; - if (args[index]) { - args[index] = make_node(AST_Number, args[index], { - value: 0 - }); - argname.definition().fixed = false; - } - } - return true; - } - var end = hit_stack.length - 1; - if (hit_stack[end - 1].body === hit_stack[end]) end--; - var tt = new TreeTransformer(function(node, descend, in_list) { - if (hit) return node; - if (node !== hit_stack[hit_index]) return node; - hit_index++; - if (hit_index <= end) return handle_custom_scan_order(node, tt); - hit = true; - if (node instanceof AST_VarDef) { - declare_only[node.name.name] = (declare_only[node.name.name] || 0) + 1; - if (value_def) value_def.replaced++; - node = node.clone(); - node.value = null; - return node; - } - return in_list ? List.skip : null; - }, patch_sequence); - abort = false; - hit = false; - hit_index = 0; - return statements[stat_index].transform(tt); - } - - function patch_sequence(node) { - if (node instanceof AST_Sequence) switch (node.expressions.length) { - case 0: return null; - case 1: return maintain_this_binding(compressor, this.parent(), node, node.expressions[0]); - } - } - - function is_lhs_local(lhs) { - var sym = root_expr(lhs); - return sym instanceof AST_SymbolRef - && sym.definition().scope.resolve() === scope - && !(in_loop - && (lvalues.has(sym.name) && lvalues.get(sym.name)[0] !== lhs - || candidate instanceof AST_Unary - || candidate instanceof AST_Assign && candidate.operator != "=")); - } - - function value_has_side_effects() { - if (candidate instanceof AST_Unary) return false; - return rvalue.has_side_effects(compressor); - } - - function replace_all_symbols(expr) { - if (expr instanceof AST_Unary) return false; - if (side_effects) return false; - if (value_def) return true; - if (!(lhs instanceof AST_SymbolRef)) return false; - var referenced; - if (expr instanceof AST_VarDef) { - referenced = 1; - } else if (expr.operator == "=") { - referenced = 2; - } else { - return false; - } - var def = lhs.definition(); - return def.references.length - def.replaced == referenced; - } - - function symbol_in_lvalues(sym, parent) { - var lvalue = lvalues.get(sym.name); - if (!lvalue || all(lvalue, function(lhs) { - return !lhs; - })) return; - if (lvalue[0] !== lhs) return true; - scan_rhs = false; - } - - function may_modify(sym) { - var def = sym.definition(); - if (def.orig.length == 1 && def.orig[0] instanceof AST_SymbolDefun) return false; - if (def.scope.resolve() !== scope) return true; - if (modify_toplevel && compressor.exposed(def)) return true; - return !all(def.references, function(ref) { - return ref.scope.resolve() === scope; - }); - } - - function side_effects_external(node, lhs) { - if (node instanceof AST_Assign) return side_effects_external(node.left, true); - if (node instanceof AST_Unary) return side_effects_external(node.expression, true); - if (node instanceof AST_VarDef) return node.value && side_effects_external(node.value); - if (lhs) { - if (node instanceof AST_Dot) return side_effects_external(node.expression, true); - if (node instanceof AST_Sub) return side_effects_external(node.expression, true); - if (node instanceof AST_SymbolRef) return node.definition().scope.resolve() !== scope; - } - return false; - } - } - - function eliminate_spurious_blocks(statements) { - var seen_dirs = []; - for (var i = 0; i < statements.length;) { - var stat = statements[i]; - if (stat instanceof AST_BlockStatement) { - if (all(stat.body, safe_to_trim)) { - CHANGED = true; - eliminate_spurious_blocks(stat.body); - [].splice.apply(statements, [i, 1].concat(stat.body)); - i += stat.body.length; - continue; - } - } - if (stat instanceof AST_Directive) { - if (member(stat.value, seen_dirs)) { - CHANGED = true; - statements.splice(i, 1); - continue; - } - seen_dirs.push(stat.value); - } - if (stat instanceof AST_EmptyStatement) { - CHANGED = true; - statements.splice(i, 1); - continue; - } - i++; - } - } - - function handle_if_return(statements, compressor) { - var self = compressor.self(); - var parent = compressor.parent(); - var in_lambda = last_of(function(node) { - return node instanceof AST_Lambda; - }); - var in_iife = in_lambda && parent && parent.TYPE == "Call"; - var multiple_if_returns = has_multiple_if_returns(statements); - for (var i = statements.length; --i >= 0;) { - var stat = statements[i]; - var j = next_index(i); - var next = statements[j]; - - if (in_lambda && !next && stat instanceof AST_Return) { - if (!stat.value) { - CHANGED = true; - statements.splice(i, 1); - continue; - } - var tail = stat.value.tail_node(); - if (tail instanceof AST_UnaryPrefix && tail.operator == "void") { - CHANGED = true; - var body; - if (tail === stat.value) { - body = tail.expression; - } else { - body = stat.value.clone(); - body.expressions[body.length - 1] = tail.expression; - } - statements[i] = make_node(AST_SimpleStatement, stat, { - body: body, - }); - continue; - } - } - - if (stat instanceof AST_If) { - var ab = aborts(stat.body); - if (can_merge_flow(ab)) { - if (ab.label) remove(ab.label.thedef.references, ab); - CHANGED = true; - stat = stat.clone(); - stat.condition = stat.condition.negate(compressor); - var body = as_statement_array_with_return(stat.body, ab); - stat.body = make_node(AST_BlockStatement, stat, { - body: as_statement_array(stat.alternative).concat(extract_functions()) - }); - stat.alternative = make_node(AST_BlockStatement, stat, { - body: body - }); - statements[i] = stat; - statements[i] = stat.transform(compressor); - continue; - } - - if (ab && !stat.alternative && stat.body instanceof AST_BlockStatement && next instanceof AST_Jump) { - var negated = stat.condition.negate(compressor); - if (negated.print_to_string().length <= stat.condition.print_to_string().length) { - CHANGED = true; - stat = stat.clone(); - stat.condition = negated; - statements[j] = stat.body; - stat.body = next; - statements[i] = stat; - statements[i] = stat.transform(compressor); - continue; - } - } - - var alt = aborts(stat.alternative); - if (can_merge_flow(alt)) { - if (alt.label) remove(alt.label.thedef.references, alt); - CHANGED = true; - stat = stat.clone(); - stat.body = make_node(AST_BlockStatement, stat.body, { - body: as_statement_array(stat.body).concat(extract_functions()) - }); - var body = as_statement_array_with_return(stat.alternative, alt); - stat.alternative = make_node(AST_BlockStatement, stat.alternative, { - body: body - }); - statements[i] = stat; - statements[i] = stat.transform(compressor); - continue; - } - - if (compressor.option("typeofs")) { - if (ab && !alt) { - mark_locally_defined(stat.condition, null, make_node(AST_BlockStatement, self, { - body: statements.slice(i + 1) - })); - } - if (!ab && alt) { - mark_locally_defined(stat.condition, make_node(AST_BlockStatement, self, { - body: statements.slice(i + 1) - })); - } - } - } - - if (stat instanceof AST_If && stat.body instanceof AST_Return) { - var value = stat.body.value; - var in_bool = stat.body.in_bool || next instanceof AST_Return && next.in_bool; - //--- - // pretty silly case, but: - // if (foo()) return; return; ---> foo(); return; - if (!value && !stat.alternative - && (in_lambda && !next || next instanceof AST_Return && !next.value)) { - CHANGED = true; - statements[i] = make_node(AST_SimpleStatement, stat.condition, { - body: stat.condition - }); - continue; - } - //--- - // if (foo()) return x; return y; ---> return foo() ? x : y; - if (!stat.alternative && next instanceof AST_Return) { - CHANGED = true; - stat = stat.clone(); - stat.alternative = next; - statements.splice(i, 1, stat.transform(compressor)); - statements.splice(j, 1); - continue; - } - //--- - // if (foo()) return x; [ return ; ] ---> return foo() ? x : undefined; - if (!stat.alternative && !next && in_lambda && (in_bool || value && multiple_if_returns)) { - CHANGED = true; - stat = stat.clone(); - stat.alternative = make_node(AST_Return, stat, { - value: null - }); - statements.splice(i, 1, stat.transform(compressor)); - continue; - } - //--- - // if (a) return b; if (c) return d; e; ---> return a ? b : c ? d : void e; - // - // if sequences is not enabled, this can lead to an endless loop (issue #866). - // however, with sequences on this helps producing slightly better output for - // the example code. - var prev = statements[prev_index(i)]; - if (compressor.option("sequences") && in_lambda && !stat.alternative - && (!prev && in_iife || prev instanceof AST_If && prev.body instanceof AST_Return) - && next_index(j) == statements.length && next instanceof AST_SimpleStatement) { - CHANGED = true; - stat = stat.clone(); - stat.alternative = make_node(AST_BlockStatement, next, { - body: [ - next, - make_node(AST_Return, next, { - value: null - }) - ] - }); - statements.splice(i, 1, stat.transform(compressor)); - statements.splice(j, 1); - continue; - } - } - } - - function has_multiple_if_returns(statements) { - var n = 0; - for (var i = statements.length; --i >= 0;) { - var stat = statements[i]; - if (stat instanceof AST_If && stat.body instanceof AST_Return) { - if (++n > 1) return true; - } - } - return false; - } - - function is_return_void(value) { - return !value || value instanceof AST_UnaryPrefix && value.operator == "void"; - } - - function last_of(predicate) { - var block = self, stat, level = 0; - do { - do { - if (predicate(block)) return true; - block = compressor.parent(level++); - } while (block instanceof AST_If && (stat = block)); - } while ((block instanceof AST_BlockStatement || block instanceof AST_Scope) - && is_last_statement(block.body, stat)); - } - - function match_target(target) { - return last_of(function(node) { - return node === target; - }); - } - - function can_drop_abort(ab) { - if (ab instanceof AST_Return) return in_lambda && is_return_void(ab.value); - if (!(ab instanceof AST_LoopControl)) return false; - var lct = compressor.loopcontrol_target(ab); - if (ab instanceof AST_Continue) return match_target(loop_body(lct)); - if (lct instanceof AST_IterationStatement) return false; - return match_target(lct); - } - - function can_merge_flow(ab) { - if (!can_drop_abort(ab)) return false; - for (var j = statements.length; --j > i;) { - var stat = statements[j]; - if (stat instanceof AST_DefClass) { - if (stat.name.definition().preinit) return false; - } else if (stat instanceof AST_Const || stat instanceof AST_Let) { - if (!all(stat.definitions, function(defn) { - return !defn.name.match_symbol(function(node) { - return node instanceof AST_SymbolDeclaration && node.definition().preinit; - }); - })) return false; - } - } - return true; - } - - function extract_functions() { - var defuns = []; - var lexical = false; - var tail = statements.splice(i + 1).filter(function(stat) { - if (stat instanceof AST_LambdaDefinition) { - defuns.push(stat); - return false; - } - if (is_lexical_definition(stat)) lexical = true; - return true; - }); - [].push.apply(lexical ? tail : statements, defuns); - return tail; - } - - function as_statement_array_with_return(node, ab) { - var body = as_statement_array(node); - var block = body, last; - while ((last = block[block.length - 1]) !== ab) { - block = last.body; - } - block.pop(); - if (ab.value) block.push(make_node(AST_SimpleStatement, ab.value, { - body: ab.value.expression - })); - return body; - } - - function next_index(i) { - for (var j = i + 1; j < statements.length; j++) { - if (!is_declaration(statements[j])) break; - } - return j; - } - - function prev_index(i) { - for (var j = i; --j >= 0;) { - if (!is_declaration(statements[j])) break; - } - return j; - } - } - - function eliminate_dead_code(statements, compressor) { - var has_quit; - var self = compressor.self(); - for (var i = 0, n = 0, len = statements.length; i < len; i++) { - var stat = statements[i]; - if (stat instanceof AST_LoopControl) { - var lct = compressor.loopcontrol_target(stat); - if (stat instanceof AST_Break - && !(lct instanceof AST_IterationStatement) - && loop_body(lct) === self - || stat instanceof AST_Continue - && loop_body(lct) === self) { - if (stat.label) remove(stat.label.thedef.references, stat); - } else { - statements[n++] = stat; - } - } else { - statements[n++] = stat; - } - if (aborts(stat)) { - has_quit = statements.slice(i + 1); - break; - } - } - statements.length = n; - CHANGED = n != len; - if (has_quit) has_quit.forEach(function(stat) { - extract_declarations_from_unreachable_code(compressor, stat, statements); - }); - } - - function sequencesize(statements, compressor) { - if (statements.length < 2) return; - var seq = [], n = 0; - function push_seq() { - if (!seq.length) return; - var body = make_sequence(seq[0], seq); - statements[n++] = make_node(AST_SimpleStatement, body, { body: body }); - seq = []; - } - for (var i = 0, len = statements.length; i < len; i++) { - var stat = statements[i]; - if (stat instanceof AST_SimpleStatement) { - if (seq.length >= compressor.sequences_limit) push_seq(); - var body = stat.body; - if (seq.length > 0) body = body.drop_side_effect_free(compressor); - if (body) merge_sequence(seq, body); - } else if (is_declaration(stat)) { - statements[n++] = stat; - } else { - push_seq(); - statements[n++] = stat; - } - } - push_seq(); - statements.length = n; - if (n != len) CHANGED = true; - } - - function to_simple_statement(block, decls) { - if (!(block instanceof AST_BlockStatement)) return block; - var stat = null; - for (var i = 0; i < block.body.length; i++) { - var line = block.body[i]; - if (line instanceof AST_Var && declarations_only(line)) { - decls.push(line); - } else if (stat || is_lexical_definition(line)) { - return false; - } else { - stat = line; - } - } - return stat; - } - - function sequencesize_2(statements, compressor) { - function cons_seq(right) { - n--; - CHANGED = true; - var left = prev.body; - return make_sequence(left, [ left, right ]); - } - var n = 0, prev; - for (var i = 0; i < statements.length; i++) { - var stat = statements[i]; - if (prev) { - if (stat instanceof AST_Exit) { - if (stat.value || !in_async_generator(scope)) { - stat.value = cons_seq(stat.value || make_node(AST_Undefined, stat)).optimize(compressor); - } - } else if (stat instanceof AST_For) { - if (!(stat.init instanceof AST_Definitions)) { - var abort = false; - prev.body.walk(new TreeWalker(function(node) { - if (abort || node instanceof AST_Scope) return true; - if (node instanceof AST_Binary && node.operator == "in") { - abort = true; - return true; - } - })); - if (!abort) { - if (stat.init) stat.init = cons_seq(stat.init); - else { - stat.init = prev.body; - n--; - CHANGED = true; - } - } - } - } else if (stat instanceof AST_ForIn) { - if (!is_lexical_definition(stat.init)) stat.object = cons_seq(stat.object); - } else if (stat instanceof AST_If) { - stat.condition = cons_seq(stat.condition); - } else if (stat instanceof AST_Switch) { - stat.expression = cons_seq(stat.expression); - } else if (stat instanceof AST_With) { - stat.expression = cons_seq(stat.expression); - } - } - if (compressor.option("conditionals") && stat instanceof AST_If) { - var decls = []; - var body = to_simple_statement(stat.body, decls); - var alt = to_simple_statement(stat.alternative, decls); - if (body !== false && alt !== false && decls.length > 0) { - var len = decls.length; - decls.push(make_node(AST_If, stat, { - condition: stat.condition, - body: body || make_node(AST_EmptyStatement, stat.body), - alternative: alt - })); - decls.unshift(n, 1); - [].splice.apply(statements, decls); - i += len; - n += len + 1; - prev = null; - CHANGED = true; - continue; - } - } - statements[n++] = stat; - prev = stat instanceof AST_SimpleStatement ? stat : null; - } - statements.length = n; - } - - function extract_exprs(body) { - if (body instanceof AST_Assign) return [ body ]; - if (body instanceof AST_Sequence) return body.expressions.slice(); - } - - function join_assigns(defn, body, keep) { - var exprs = extract_exprs(body); - if (!exprs) return; - var trimmed = false; - for (var i = exprs.length - 1; --i >= 0;) { - var expr = exprs[i]; - if (!(expr instanceof AST_Assign)) continue; - if (expr.operator != "=") continue; - if (!(expr.left instanceof AST_SymbolRef)) continue; - var tail = exprs.slice(i + 1); - if (!trim_assigns(expr.left, expr.right, tail)) continue; - trimmed = true; - exprs = exprs.slice(0, i + 1).concat(tail); - } - if (defn instanceof AST_Definitions) { - keep = keep || 0; - for (var i = defn.definitions.length; --i >= 0;) { - var def = defn.definitions[i]; - if (!def.value) continue; - if (trim_assigns(def.name, def.value, exprs)) trimmed = true; - if (merge_conditional_assignments(def, exprs, keep)) trimmed = true; - break; - } - if (defn instanceof AST_Var && join_var_assign(defn.definitions, exprs, keep)) trimmed = true; - } - return trimmed && exprs; - } - - function merge_assigns(prev, defn) { - if (!(prev instanceof AST_SimpleStatement)) return; - if (declarations_only(defn)) return; - var exprs = extract_exprs(prev.body); - if (!exprs) return; - var definitions = []; - if (!join_var_assign(definitions, exprs.reverse(), 0)) return; - defn.definitions = definitions.reverse().concat(defn.definitions); - return exprs.reverse(); - } - - function merge_conditional_assignments(var_def, exprs, keep) { - if (!compressor.option("conditionals")) return; - if (var_def.name instanceof AST_Destructured) return; - var trimmed = false; - var def = var_def.name.definition(); - while (exprs.length > keep) { - var cond = to_conditional_assignment(compressor, def, var_def.value, exprs[0]); - if (!cond) break; - var_def.value = cond; - exprs.shift(); - trimmed = true; - } - return trimmed; - } - - function join_var_assign(definitions, exprs, keep) { - var trimmed = false; - while (exprs.length > keep) { - var expr = exprs[0]; - if (!(expr instanceof AST_Assign)) break; - if (expr.operator != "=") break; - var lhs = expr.left; - if (!(lhs instanceof AST_SymbolRef)) break; - if (is_undeclared_ref(lhs)) break; - if (lhs.scope.resolve() !== scope) break; - var def = lhs.definition(); - if (def.scope !== scope) break; - if (def.orig.length > def.eliminated + 1) break; - if (def.orig[0].TYPE != "SymbolVar") break; - var name = make_node(AST_SymbolVar, lhs, lhs); - definitions.push(make_node(AST_VarDef, expr, { - name: name, - value: expr.right - })); - def.orig.push(name); - def.replaced++; - exprs.shift(); - trimmed = true; - } - return trimmed; - } - - function trim_assigns(name, value, exprs) { - if (!(value instanceof AST_Object)) return; - var trimmed = false; - do { - var node = exprs[0]; - if (!(node instanceof AST_Assign)) break; - if (node.operator != "=") break; - if (!(node.left instanceof AST_PropAccess)) break; - var sym = node.left.expression; - if (!(sym instanceof AST_SymbolRef)) break; - if (name.name != sym.name) break; - if (!node.right.is_constant_expression(scope)) break; - var prop = node.left.property; - if (prop instanceof AST_Node) { - prop = prop.evaluate(compressor); - } - if (prop instanceof AST_Node) break; - prop = "" + prop; - var diff = prop == "__proto__" || compressor.has_directive("use strict") ? function(node) { - var key = node.key; - return typeof key == "string" && key != prop && key != "__proto__"; - } : function(node) { - var key = node.key; - if (node instanceof AST_ObjectGetter || node instanceof AST_ObjectSetter) { - return typeof key == "string" && key != prop; - } - return key !== "__proto__"; - }; - if (!all(value.properties, diff)) break; - value.properties.push(make_node(AST_ObjectKeyVal, node, { - key: prop, - value: node.right - })); - exprs.shift(); - trimmed = true; - } while (exprs.length); - return trimmed; - } - - function join_consecutive_vars(statements) { - var defs; - for (var i = 0, j = -1; i < statements.length; i++) { - var stat = statements[i]; - var prev = statements[j]; - if (stat instanceof AST_Definitions) { - if (prev && prev.TYPE == stat.TYPE) { - prev.definitions = prev.definitions.concat(stat.definitions); - CHANGED = true; - } else if (defs && defs.TYPE == stat.TYPE && declarations_only(stat)) { - defs.definitions = defs.definitions.concat(stat.definitions); - CHANGED = true; - } else if (stat instanceof AST_Var) { - var exprs = merge_assigns(prev, stat); - if (exprs) { - if (exprs.length) { - prev.body = make_sequence(prev, exprs); - j++; - } - CHANGED = true; - } else { - j++; - } - statements[j] = defs = stat; - } else { - statements[++j] = stat; - } - continue; - } else if (stat instanceof AST_Exit) { - stat.value = join_assigns_expr(stat.value); - } else if (stat instanceof AST_For) { - var exprs = join_assigns(prev, stat.init); - if (exprs) { - CHANGED = true; - stat.init = exprs.length ? make_sequence(stat.init, exprs) : null; - } else if (prev instanceof AST_Var && (!stat.init || stat.init.TYPE == prev.TYPE)) { - if (stat.init) { - prev.definitions = prev.definitions.concat(stat.init.definitions); - } - defs = stat.init = prev; - statements[j] = merge_defns(stat); - CHANGED = true; - continue; - } else if (defs && stat.init && defs.TYPE == stat.init.TYPE && declarations_only(stat.init)) { - defs.definitions = defs.definitions.concat(stat.init.definitions); - stat.init = null; - CHANGED = true; - } else if (stat.init instanceof AST_Var) { - defs = stat.init; - exprs = merge_assigns(prev, stat.init); - if (exprs) { - CHANGED = true; - if (exprs.length == 0) { - statements[j] = merge_defns(stat); - continue; - } - prev.body = make_sequence(prev, exprs); - } - } - } else if (stat instanceof AST_ForEnumeration) { - if (defs && defs.TYPE == stat.init.TYPE) { - var defns = defs.definitions.slice(); - stat.init = stat.init.definitions[0].name.convert_symbol(AST_SymbolRef, function(ref, name) { - defns.push(make_node(AST_VarDef, name, { - name: name, - value: null - })); - name.definition().references.push(ref); - }); - defs.definitions = defns; - CHANGED = true; - } - stat.object = join_assigns_expr(stat.object); - } else if (stat instanceof AST_If) { - stat.condition = join_assigns_expr(stat.condition); - } else if (stat instanceof AST_SimpleStatement) { - var exprs = join_assigns(prev, stat.body); - if (exprs) { - CHANGED = true; - if (!exprs.length) continue; - stat.body = make_sequence(stat.body, exprs); - } - } else if (stat instanceof AST_Switch) { - stat.expression = join_assigns_expr(stat.expression); - } else if (stat instanceof AST_With) { - stat.expression = join_assigns_expr(stat.expression); - } - statements[++j] = defs ? merge_defns(stat) : stat; - } - statements.length = j + 1; - - function join_assigns_expr(value) { - var exprs = join_assigns(prev, value, 1); - if (!exprs) return value; - CHANGED = true; - var tail = value.tail_node(); - if (exprs[exprs.length - 1] !== tail) exprs.push(tail.left); - return make_sequence(value, exprs); - } - - function merge_defns(stat) { - return stat.transform(new TreeTransformer(function(node, descend, in_list) { - if (node instanceof AST_Definitions) { - if (defs === node) return node; - if (defs.TYPE != node.TYPE) return node; - var parent = this.parent(); - if (parent instanceof AST_ForEnumeration && parent.init === node) return node; - if (!declarations_only(node)) return node; - defs.definitions = defs.definitions.concat(node.definitions); - CHANGED = true; - if (parent instanceof AST_For && parent.init === node) return null; - return in_list ? List.skip : make_node(AST_EmptyStatement, node); - } - if (node instanceof AST_ExportDeclaration) return node; - if (node instanceof AST_Scope) return node; - if (!is_statement(node)) return node; - })); - } - } - } - - function extract_declarations_from_unreachable_code(compressor, stat, target) { - if (!(stat instanceof AST_DefClass - || stat instanceof AST_Definitions - || stat instanceof AST_LambdaDefinition)) { - AST_Node.warn("Dropping unreachable code [{file}:{line},{col}]", stat.start); - } - var block; - stat.walk(new TreeWalker(function(node, descend) { - if (node instanceof AST_DefClass) { - node.extends = null; - node.properties = []; - push(node); - return true; - } - if (node instanceof AST_Definitions) { - var defns = []; - if (node.remove_initializers(compressor, defns)) { - AST_Node.warn("Dropping initialization in unreachable code [{file}:{line},{col}]", node.start); - } - if (defns.length > 0) { - node.definitions = defns; - push(node); - } - return true; - } - if (node instanceof AST_LambdaDefinition) { - push(node); - return true; - } - if (node instanceof AST_Scope) return true; - if (node instanceof AST_BlockScope) { - var save = block; - block = []; - descend(); - if (block.required) { - target.push(make_node(AST_BlockStatement, stat, { - body: block - })); - } else if (block.length) { - [].push.apply(target, block); - } - block = save; - return true; - } - })); - function push(node) { - if (block) { - block.push(node); - if (!safe_to_trim(node)) block.required = true; - } else { - target.push(node); - } - } - } - - function is_undefined(node, compressor) { - return node.is_undefined - || node instanceof AST_Undefined - || node instanceof AST_UnaryPrefix - && node.operator == "void" - && !(compressor && node.expression.has_side_effects(compressor)); - } - - // is_truthy() - // return true if `!!node === true` - (function(def) { - def(AST_Node, return_false); - def(AST_Array, return_true); - def(AST_Assign, function() { - return this.operator == "=" && this.right.is_truthy(); - }); - def(AST_Lambda, return_true); - def(AST_Object, return_true); - def(AST_RegExp, return_true); - def(AST_Sequence, function() { - return this.tail_node().is_truthy(); - }); - def(AST_SymbolRef, function() { - var fixed = this.fixed_value(); - if (!fixed) return false; - this.is_truthy = return_false; - var result = fixed.is_truthy(); - delete this.is_truthy; - return result; - }); - })(function(node, func) { - node.DEFMETHOD("is_truthy", func); - }); - - // is_negative_zero() - // return true if the node may represent -0 - (function(def) { - def(AST_Node, return_true); - def(AST_Array, return_false); - function binary(op, left, right) { - switch (op) { - case "-": - return left.is_negative_zero() - && (!(right instanceof AST_Constant) || right.value == 0); - case "&&": - case "||": - return left.is_negative_zero() || right.is_negative_zero(); - case "*": - case "/": - case "%": - case "**": - return true; - default: - return false; - } - } - def(AST_Assign, function() { - var op = this.operator; - if (op == "=") return this.right.is_negative_zero(); - return binary(op.slice(0, -1), this.left, this.right); - }); - def(AST_Binary, function() { - return binary(this.operator, this.left, this.right); - }); - def(AST_Constant, function() { - return this.value == 0 && 1 / this.value < 0; - }); - def(AST_Lambda, return_false); - def(AST_Object, return_false); - def(AST_RegExp, return_false); - def(AST_Sequence, function() { - return this.tail_node().is_negative_zero(); - }); - def(AST_SymbolRef, function() { - var fixed = this.fixed_value(); - if (!fixed) return true; - this.is_negative_zero = return_true; - var result = fixed.is_negative_zero(); - delete this.is_negative_zero; - return result; - }); - def(AST_UnaryPrefix, function() { - return this.operator == "+" && this.expression.is_negative_zero() - || this.operator == "-"; - }); - })(function(node, func) { - node.DEFMETHOD("is_negative_zero", func); - }); - - // may_throw_on_access() - // returns true if this node may be null, undefined or contain `AST_Accessor` - (function(def) { - AST_Node.DEFMETHOD("may_throw_on_access", function(compressor, force) { - return !compressor.option("pure_getters") || this._dot_throw(compressor, force); - }); - function is_strict(compressor, force) { - return force || /strict/.test(compressor.option("pure_getters")); - } - def(AST_Node, is_strict); - def(AST_Array, return_false); - def(AST_Assign, function(compressor) { - var op = this.operator; - var sym = this.left; - var rhs = this.right; - if (op != "=") { - return lazy_op[op.slice(0, -1)] && (sym._dot_throw(compressor) || rhs._dot_throw(compressor)); - } - if (!rhs._dot_throw(compressor)) return false; - if (!(sym instanceof AST_SymbolRef)) return true; - if (rhs instanceof AST_Binary && rhs.operator == "||" && sym.name == rhs.left.name) { - return rhs.right._dot_throw(compressor); - } - return true; - }); - def(AST_Binary, function(compressor) { - return lazy_op[this.operator] && (this.left._dot_throw(compressor) || this.right._dot_throw(compressor)); - }); - def(AST_Class, return_false); - def(AST_Conditional, function(compressor) { - return this.consequent._dot_throw(compressor) || this.alternative._dot_throw(compressor); - }); - def(AST_Constant, return_false); - def(AST_Dot, function(compressor, force) { - if (!is_strict(compressor, force)) return false; - var exp = this.expression; - if (exp instanceof AST_SymbolRef) exp = exp.fixed_value(); - return !(this.property == "prototype" && is_lambda(exp)); - }); - def(AST_Lambda, return_false); - def(AST_Null, return_true); - def(AST_Object, function(compressor, force) { - return is_strict(compressor, force) && !all(this.properties, function(prop) { - if (!(prop instanceof AST_ObjectKeyVal)) return false; - return !(prop.key === "__proto__" && prop.value._dot_throw(compressor, force)); - }); - }); - def(AST_ObjectIdentity, function(compressor, force) { - return is_strict(compressor, force) && !this.scope.resolve().new; - }); - def(AST_Sequence, function(compressor) { - return this.tail_node()._dot_throw(compressor); - }); - def(AST_SymbolRef, function(compressor, force) { - if (this.is_undefined) return true; - if (!is_strict(compressor, force)) return false; - if (is_undeclared_ref(this) && this.is_declared(compressor)) return false; - if (this.is_immutable()) return false; - var def = this.definition(); - if (is_arguments(def) && !def.scope.rest && all(def.scope.argnames, function(argname) { - return argname instanceof AST_SymbolFunarg; - })) return def.scope.uses_arguments > 2; - var fixed = this.fixed_value(); - if (!fixed) return true; - this._dot_throw = return_true; - if (fixed._dot_throw(compressor)) { - delete this._dot_throw; - return true; - } - this._dot_throw = return_false; - return false; - }); - def(AST_UnaryPrefix, function() { - return this.operator == "void"; - }); - def(AST_UnaryPostfix, return_false); - def(AST_Undefined, return_true); - })(function(node, func) { - node.DEFMETHOD("_dot_throw", func); - }); - - (function(def) { - def(AST_Node, return_false); - def(AST_Array, return_true); - function is_binary_defined(compressor, op, node) { - switch (op) { - case "&&": - return node.left.is_defined(compressor) && node.right.is_defined(compressor); - case "||": - return node.left.is_truthy() || node.right.is_defined(compressor); - case "??": - return node.left.is_defined(compressor) || node.right.is_defined(compressor); - default: - return true; - } - } - def(AST_Assign, function(compressor) { - var op = this.operator; - if (op == "=") return this.right.is_defined(compressor); - return is_binary_defined(compressor, op.slice(0, -1), this); - }); - def(AST_Binary, function(compressor) { - return is_binary_defined(compressor, this.operator, this); - }); - def(AST_Conditional, function(compressor) { - return this.consequent.is_defined(compressor) && this.alternative.is_defined(compressor); - }); - def(AST_Constant, return_true); - def(AST_Hole, return_false); - def(AST_Lambda, return_true); - def(AST_Object, return_true); - def(AST_Sequence, function(compressor) { - return this.tail_node().is_defined(compressor); - }); - def(AST_SymbolRef, function(compressor) { - if (this.is_undefined) return false; - if (is_undeclared_ref(this) && this.is_declared(compressor)) return true; - if (this.is_immutable()) return true; - var fixed = this.fixed_value(); - if (!fixed) return false; - this.is_defined = return_false; - var result = fixed.is_defined(compressor); - delete this.is_defined; - return result; - }); - def(AST_UnaryPrefix, function() { - return this.operator != "void"; - }); - def(AST_UnaryPostfix, return_true); - def(AST_Undefined, return_false); - })(function(node, func) { - node.DEFMETHOD("is_defined", func); - }); - - /* -----[ boolean/negation helpers ]----- */ - - // methods to determine whether an expression has a boolean result type - (function(def) { - def(AST_Node, return_false); - def(AST_Assign, function(compressor) { - return this.operator == "=" && this.right.is_boolean(compressor); - }); - var binary = makePredicate("in instanceof == != === !== < <= >= >"); - def(AST_Binary, function(compressor) { - return binary[this.operator] || lazy_op[this.operator] - && this.left.is_boolean(compressor) - && this.right.is_boolean(compressor); - }); - def(AST_Boolean, return_true); - var fn = makePredicate("every hasOwnProperty isPrototypeOf propertyIsEnumerable some"); - def(AST_Call, function(compressor) { - if (!compressor.option("unsafe")) return false; - var exp = this.expression; - return exp instanceof AST_Dot && (fn[exp.property] - || exp.property == "test" && exp.expression instanceof AST_RegExp); - }); - def(AST_Conditional, function(compressor) { - return this.consequent.is_boolean(compressor) && this.alternative.is_boolean(compressor); - }); - def(AST_New, return_false); - def(AST_Sequence, function(compressor) { - return this.tail_node().is_boolean(compressor); - }); - def(AST_SymbolRef, function(compressor) { - var fixed = this.fixed_value(); - if (!fixed) return false; - this.is_boolean = return_false; - var result = fixed.is_boolean(compressor); - delete this.is_boolean; - return result; - }); - var unary = makePredicate("! delete"); - def(AST_UnaryPrefix, function() { - return unary[this.operator]; - }); - })(function(node, func) { - node.DEFMETHOD("is_boolean", func); - }); - - // methods to determine if an expression has a numeric result type - (function(def) { - def(AST_Node, return_false); - var binary = makePredicate("- * / % ** & | ^ << >> >>>"); - def(AST_Assign, function(compressor) { - return binary[this.operator.slice(0, -1)] - || this.operator == "=" && this.right.is_number(compressor); - }); - def(AST_Binary, function(compressor) { - if (binary[this.operator]) return true; - if (this.operator != "+") return false; - return (this.left.is_boolean(compressor) || this.left.is_number(compressor)) - && (this.right.is_boolean(compressor) || this.right.is_number(compressor)); - }); - var fn = makePredicate([ - "charCodeAt", - "getDate", - "getDay", - "getFullYear", - "getHours", - "getMilliseconds", - "getMinutes", - "getMonth", - "getSeconds", - "getTime", - "getTimezoneOffset", - "getUTCDate", - "getUTCDay", - "getUTCFullYear", - "getUTCHours", - "getUTCMilliseconds", - "getUTCMinutes", - "getUTCMonth", - "getUTCSeconds", - "getYear", - "indexOf", - "lastIndexOf", - "localeCompare", - "push", - "search", - "setDate", - "setFullYear", - "setHours", - "setMilliseconds", - "setMinutes", - "setMonth", - "setSeconds", - "setTime", - "setUTCDate", - "setUTCFullYear", - "setUTCHours", - "setUTCMilliseconds", - "setUTCMinutes", - "setUTCMonth", - "setUTCSeconds", - "setYear", - "toExponential", - "toFixed", - "toPrecision", - ]); - def(AST_Call, function(compressor) { - if (!compressor.option("unsafe")) return false; - var exp = this.expression; - return exp instanceof AST_Dot && (fn[exp.property] - || is_undeclared_ref(exp.expression) && exp.expression.name == "Math"); - }); - def(AST_Conditional, function(compressor) { - return this.consequent.is_number(compressor) && this.alternative.is_number(compressor); - }); - def(AST_New, return_false); - def(AST_Number, return_true); - def(AST_Sequence, function(compressor) { - return this.tail_node().is_number(compressor); - }); - def(AST_SymbolRef, function(compressor) { - var fixed = this.fixed_value(); - if (!fixed) return false; - this.is_number = return_false; - var result = fixed.is_number(compressor); - delete this.is_number; - return result; - }); - var unary = makePredicate("+ - ~ ++ --"); - def(AST_Unary, function() { - return unary[this.operator]; - }); - })(function(node, func) { - node.DEFMETHOD("is_number", func); - }); - - // methods to determine if an expression has a string result type - (function(def) { - def(AST_Node, return_false); - def(AST_Assign, function(compressor) { - switch (this.operator) { - case "+=": - if (this.left.is_string(compressor)) return true; - case "=": - return this.right.is_string(compressor); - } - }); - def(AST_Binary, function(compressor) { - return this.operator == "+" && - (this.left.is_string(compressor) || this.right.is_string(compressor)); - }); - var fn = makePredicate([ - "charAt", - "substr", - "substring", - "toLowerCase", - "toString", - "toUpperCase", - "trim", - ]); - def(AST_Call, function(compressor) { - if (!compressor.option("unsafe")) return false; - var exp = this.expression; - return exp instanceof AST_Dot && fn[exp.property]; - }); - def(AST_Conditional, function(compressor) { - return this.consequent.is_string(compressor) && this.alternative.is_string(compressor); - }); - def(AST_Sequence, function(compressor) { - return this.tail_node().is_string(compressor); - }); - def(AST_String, return_true); - def(AST_SymbolRef, function(compressor) { - var fixed = this.fixed_value(); - if (!fixed) return false; - this.is_string = return_false; - var result = fixed.is_string(compressor); - delete this.is_string; - return result; - }); - def(AST_Template, function(compressor) { - return !this.tag || is_raw_tag(compressor, this.tag); - }); - def(AST_UnaryPrefix, function() { - return this.operator == "typeof"; - }); - })(function(node, func) { - node.DEFMETHOD("is_string", func); - }); - - var lazy_op = makePredicate("&& || ??"); - - (function(def) { - function to_node(value, orig) { - if (value instanceof AST_Node) return value.clone(true); - if (Array.isArray(value)) return make_node(AST_Array, orig, { - elements: value.map(function(value) { - return to_node(value, orig); - }) - }); - if (value && typeof value == "object") { - var props = []; - for (var key in value) if (HOP(value, key)) { - props.push(make_node(AST_ObjectKeyVal, orig, { - key: key, - value: to_node(value[key], orig) - })); - } - return make_node(AST_Object, orig, { - properties: props - }); - } - return make_node_from_constant(value, orig); - } - - function warn(node) { - AST_Node.warn("global_defs {node} redefined [{file}:{line},{col}]", { - node: node, - file: node.start.file, - line: node.start.line, - col: node.start.col, - }); - } - - AST_Toplevel.DEFMETHOD("resolve_defines", function(compressor) { - if (!compressor.option("global_defs")) return this; - this.figure_out_scope({ ie8: compressor.option("ie8") }); - return this.transform(new TreeTransformer(function(node) { - var def = node._find_defs(compressor, ""); - if (!def) return; - var level = 0, child = node, parent; - while (parent = this.parent(level++)) { - if (!(parent instanceof AST_PropAccess)) break; - if (parent.expression !== child) break; - child = parent; - } - if (is_lhs(child, parent)) { - warn(node); - return; - } - return def; - })); - }); - def(AST_Node, noop); - def(AST_Dot, function(compressor, suffix) { - return this.expression._find_defs(compressor, "." + this.property + suffix); - }); - def(AST_SymbolDeclaration, function(compressor) { - if (!this.definition().global) return; - if (HOP(compressor.option("global_defs"), this.name)) warn(this); - }); - def(AST_SymbolRef, function(compressor, suffix) { - if (!this.definition().global) return; - var defines = compressor.option("global_defs"); - var name = this.name + suffix; - if (HOP(defines, name)) return to_node(defines[name], this); - }); - })(function(node, func) { - node.DEFMETHOD("_find_defs", func); - }); - - function best_of_expression(ast1, ast2, threshold) { - var delta = ast2.print_to_string().length - ast1.print_to_string().length; - return delta < (threshold || 0) ? ast2 : ast1; - } - - function best_of_statement(ast1, ast2, threshold) { - return best_of_expression(make_node(AST_SimpleStatement, ast1, { - body: ast1 - }), make_node(AST_SimpleStatement, ast2, { - body: ast2 - }), threshold).body; - } - - function best_of(compressor, ast1, ast2, threshold) { - return (first_in_statement(compressor) ? best_of_statement : best_of_expression)(ast1, ast2, threshold); - } - - function convert_to_predicate(obj) { - var map = Object.create(null); - Object.keys(obj).forEach(function(key) { - map[key] = makePredicate(obj[key]); - }); - return map; - } - - function skip_directives(body) { - for (var i = 0; i < body.length; i++) { - var stat = body[i]; - if (!(stat instanceof AST_Directive)) return stat; - } - } - - function arrow_first_statement() { - if (this.value) return make_node(AST_Return, this.value, { - value: this.value - }); - return skip_directives(this.body); - } - AST_Arrow.DEFMETHOD("first_statement", arrow_first_statement); - AST_AsyncArrow.DEFMETHOD("first_statement", arrow_first_statement); - AST_Lambda.DEFMETHOD("first_statement", function() { - return skip_directives(this.body); - }); - - AST_Lambda.DEFMETHOD("length", function() { - var argnames = this.argnames; - for (var i = 0; i < argnames.length; i++) { - if (argnames[i] instanceof AST_DefaultValue) break; - } - return i; - }); - - function try_evaluate(compressor, node) { - var ev = node.evaluate(compressor); - if (ev === node) return node; - ev = make_node_from_constant(ev, node).optimize(compressor); - return best_of(compressor, node, ev, compressor.eval_threshold); - } - - var object_fns = [ - "constructor", - "toString", - "valueOf", - ]; - var native_fns = convert_to_predicate({ - Array: [ - "indexOf", - "join", - "lastIndexOf", - "slice", - ].concat(object_fns), - Boolean: object_fns, - Function: object_fns, - Number: [ - "toExponential", - "toFixed", - "toPrecision", - ].concat(object_fns), - Object: object_fns, - RegExp: [ - "exec", - "test", - ].concat(object_fns), - String: [ - "charAt", - "charCodeAt", - "concat", - "indexOf", - "italics", - "lastIndexOf", - "match", - "replace", - "search", - "slice", - "split", - "substr", - "substring", - "toLowerCase", - "toUpperCase", - "trim", - ].concat(object_fns), - }); - var static_fns = convert_to_predicate({ - Array: [ - "isArray", - ], - Math: [ - "abs", - "acos", - "asin", - "atan", - "ceil", - "cos", - "exp", - "floor", - "log", - "round", - "sin", - "sqrt", - "tan", - "atan2", - "pow", - "max", - "min", - ], - Number: [ - "isFinite", - "isNaN", - ], - Object: [ - "create", - "getOwnPropertyDescriptor", - "getOwnPropertyNames", - "getPrototypeOf", - "isExtensible", - "isFrozen", - "isSealed", - "keys", - ], - String: [ - "fromCharCode", - "raw", - ], - }); - - function is_static_fn(node) { - if (!(node instanceof AST_Dot)) return false; - var expr = node.expression; - if (!is_undeclared_ref(expr)) return false; - var static_fn = static_fns[expr.name]; - return static_fn && (static_fn[node.property] || expr.name == "Math" && node.property == "random"); - } - - // Accomodate when compress option evaluate=false - // as well as the common constant expressions !0 and -1 - (function(def) { - def(AST_Node, return_false); - def(AST_Constant, return_true); - def(AST_RegExp, return_false); - var unaryPrefix = makePredicate("! ~ - + void"); - def(AST_UnaryPrefix, function() { - return unaryPrefix[this.operator] && this.expression instanceof AST_Constant; - }); - })(function(node, func) { - node.DEFMETHOD("is_constant", func); - }); - - // methods to evaluate a constant expression - (function(def) { - // If the node has been successfully reduced to a constant, - // then its value is returned; otherwise the element itself - // is returned. - // - // They can be distinguished as constant value is never a - // descendant of AST_Node. - // - // When `ignore_side_effects` is `true`, inspect the constant value - // produced without worrying about any side effects caused by said - // expression. - AST_Node.DEFMETHOD("evaluate", function(compressor, ignore_side_effects) { - if (!compressor.option("evaluate")) return this; - var cached = []; - var val = this._eval(compressor, ignore_side_effects, cached, 1); - cached.forEach(function(node) { - delete node._eval; - }); - if (ignore_side_effects) return val; - if (!val || val instanceof RegExp) return val; - if (typeof val == "function" || typeof val == "object") return this; - return val; - }); - var scan_modified = new TreeWalker(function(node) { - if (node instanceof AST_Assign) modified(node.left); - if (node instanceof AST_Unary && UNARY_POSTFIX[node.operator]) modified(node.expression); - }); - function modified(node) { - if (node instanceof AST_DestructuredArray) { - node.elements.forEach(modified); - } else if (node instanceof AST_DestructuredObject) { - node.properties.forEach(function(prop) { - modified(prop.value); - }); - } else if (node instanceof AST_PropAccess) { - modified(node.expression); - } else if (node instanceof AST_SymbolRef) { - node.definition().references.forEach(function(ref) { - delete ref._eval; - }); - } - } - def(AST_Statement, function() { - throw new Error(string_template("Cannot evaluate a statement [{file}:{line},{col}]", this.start)); - }); - def(AST_Accessor, return_this); - def(AST_BigInt, return_this); - def(AST_Class, return_this); - def(AST_Node, return_this); - def(AST_Constant, function() { - return this.value; - }); - def(AST_Assign, function(compressor, ignore_side_effects, cached, depth) { - var lhs = this.left; - if (!ignore_side_effects) { - if (!(lhs instanceof AST_SymbolRef)) return this; - if (!HOP(lhs, "_eval")) { - if (!lhs.fixed) return this; - var def = lhs.definition(); - if (!def.fixed) return this; - if (def.undeclared) return this; - if (def.last_ref !== lhs) return this; - if (def.single_use == "m") return this; - } - } - var op = this.operator; - var node; - if (!HOP(lhs, "_eval") && lhs instanceof AST_SymbolRef && lhs.fixed && lhs.definition().fixed) { - node = lhs; - } else if (op == "=") { - node = this.right; - } else { - node = make_node(AST_Binary, this, { - operator: op.slice(0, -1), - left: lhs, - right: this.right, - }); - } - lhs.walk(scan_modified); - var value = node._eval(compressor, ignore_side_effects, cached, depth); - if (typeof value == "object") return this; - modified(lhs); - return value; - }); - def(AST_Sequence, function(compressor, ignore_side_effects, cached, depth) { - if (!ignore_side_effects) return this; - var exprs = this.expressions; - for (var i = 0, last = exprs.length - 1; i < last; i++) { - exprs[i].walk(scan_modified); - } - var tail = exprs[last]; - var value = tail._eval(compressor, ignore_side_effects, cached, depth); - return value === tail ? this : value; - }); - def(AST_Lambda, function(compressor) { - if (compressor.option("unsafe")) { - var fn = function() {}; - fn.node = this; - fn.toString = function() { - return "function(){}"; - }; - return fn; - } - return this; - }); - def(AST_Array, function(compressor, ignore_side_effects, cached, depth) { - if (compressor.option("unsafe")) { - var elements = []; - for (var i = 0; i < this.elements.length; i++) { - var element = this.elements[i]; - if (element instanceof AST_Hole) return this; - var value = element._eval(compressor, ignore_side_effects, cached, depth); - if (element === value) return this; - elements.push(value); - } - return elements; - } - return this; - }); - var nonsafe_props = makePredicate("__proto__ toString valueOf"); - def(AST_Object, function(compressor, ignore_side_effects, cached, depth) { - if (compressor.option("unsafe")) { - var val = {}; - for (var i = 0; i < this.properties.length; i++) { - var prop = this.properties[i]; - if (!(prop instanceof AST_ObjectKeyVal)) return this; - var key = prop.key; - if (key instanceof AST_Node) { - key = key._eval(compressor, ignore_side_effects, cached, depth); - if (key === prop.key) return this; - } - if (nonsafe_props[key]) return this; - val[key] = prop.value._eval(compressor, ignore_side_effects, cached, depth); - if (val[key] === prop.value) return this; - } - return val; - } - return this; - }); - var non_converting_unary = makePredicate("! typeof void"); - def(AST_UnaryPrefix, function(compressor, ignore_side_effects, cached, depth) { - var e = this.expression; - var op = this.operator; - // Function would be evaluated to an array and so typeof would - // incorrectly return "object". Hence making is a special case. - if (compressor.option("typeofs") - && op == "typeof" - && (e instanceof AST_Lambda - || e instanceof AST_SymbolRef - && e.fixed_value() instanceof AST_Lambda)) { - return typeof function(){}; - } - var def = e instanceof AST_SymbolRef && e.definition(); - if (!non_converting_unary[op] && !(def && def.fixed)) depth++; - e.walk(scan_modified); - var v = e._eval(compressor, ignore_side_effects, cached, depth); - if (v === e) { - if (ignore_side_effects && op == "void") return; - return this; - } - switch (op) { - case "!": return !v; - case "typeof": - // typeof returns "object" or "function" on different platforms - // so cannot evaluate reliably - if (v instanceof RegExp) return this; - return typeof v; - case "void": return; - case "~": return ~v; - case "-": return -v; - case "+": return +v; - case "++": - case "--": - if (!def) return this; - if (!ignore_side_effects) { - if (def.undeclared) return this; - if (def.last_ref !== e) return this; - } - if (HOP(e, "_eval")) v = +(op[0] + 1) + +v; - modified(e); - return v; - } - return this; - }); - def(AST_UnaryPostfix, function(compressor, ignore_side_effects, cached, depth) { - var e = this.expression; - if (!(e instanceof AST_SymbolRef)) { - if (!ignore_side_effects) return this; - } else if (!HOP(e, "_eval")) { - if (!e.fixed) return this; - if (!ignore_side_effects) { - var def = e.definition(); - if (!def.fixed) return this; - if (def.undeclared) return this; - if (def.last_ref !== e) return this; - } - } - if (!(e instanceof AST_SymbolRef && e.definition().fixed)) depth++; - e.walk(scan_modified); - var v = e._eval(compressor, ignore_side_effects, cached, depth); - if (v === e) return this; - modified(e); - return +v; - }); - var non_converting_binary = makePredicate("&& || === !=="); - def(AST_Binary, function(compressor, ignore_side_effects, cached, depth) { - if (!non_converting_binary[this.operator]) depth++; - var left = this.left._eval(compressor, ignore_side_effects, cached, depth); - if (left === this.left) return this; - if (this.operator == (left ? "||" : "&&")) return left; - var rhs_ignore_side_effects = ignore_side_effects && !(left && typeof left == "object"); - var right = this.right._eval(compressor, rhs_ignore_side_effects, cached, depth); - if (right === this.right) return this; - var result; - switch (this.operator) { - case "&&" : result = left && right; break; - case "||" : result = left || right; break; - case "??" : - result = left == null ? right : left; - break; - case "|" : result = left | right; break; - case "&" : result = left & right; break; - case "^" : result = left ^ right; break; - case "+" : result = left + right; break; - case "-" : result = left - right; break; - case "*" : result = left * right; break; - case "/" : result = left / right; break; - case "%" : result = left % right; break; - case "<<" : result = left << right; break; - case ">>" : result = left >> right; break; - case ">>>": result = left >>> right; break; - case "==" : result = left == right; break; - case "===": result = left === right; break; - case "!=" : result = left != right; break; - case "!==": result = left !== right; break; - case "<" : result = left < right; break; - case "<=" : result = left <= right; break; - case ">" : result = left > right; break; - case ">=" : result = left >= right; break; - case "**": - result = Math.pow(left, right); - break; - case "in": - if (right && typeof right == "object" && HOP(right, left)) { - result = true; - break; - } - default: - return this; - } - if (isNaN(result)) return compressor.find_parent(AST_With) ? this : result; - if (compressor.option("unsafe_math") - && !ignore_side_effects - && result - && typeof result == "number" - && (this.operator == "+" || this.operator == "-")) { - var digits = Math.max(0, decimals(left), decimals(right)); - // 53-bit significand ---> 15.95 decimal places - if (digits < 16) return +result.toFixed(digits); - } - return result; - - function decimals(operand) { - var match = /(\.[0-9]*)?(e.+)?$/.exec(+operand); - return (match[1] || ".").length - 1 - (match[2] || "").slice(1); - } - }); - def(AST_Conditional, function(compressor, ignore_side_effects, cached, depth) { - var condition = this.condition._eval(compressor, ignore_side_effects, cached, depth); - if (condition === this.condition) return this; - var node = condition ? this.consequent : this.alternative; - var value = node._eval(compressor, ignore_side_effects, cached, depth); - return value === node ? this : value; - }); - function verify_escaped(ref, depth) { - var escaped = ref.definition().escaped; - switch (escaped.length) { - case 0: - return true; - case 1: - var found = false; - escaped[0].walk(new TreeWalker(function(node) { - if (found) return true; - if (node === ref) return found = true; - if (node instanceof AST_Scope) return true; - })); - return found; - default: - return depth <= escaped.depth; - } - } - def(AST_SymbolRef, function(compressor, ignore_side_effects, cached, depth) { - var fixed = this.fixed_value(); - if (!fixed) return this; - var value; - if (HOP(fixed, "_eval")) { - value = fixed._eval(); - } else { - this._eval = return_this; - value = fixed._eval(compressor, ignore_side_effects, cached, depth); - delete this._eval; - if (value === fixed) return this; - fixed._eval = function() { - return value; - }; - cached.push(fixed); - } - return value && typeof value == "object" && !verify_escaped(this, depth) ? this : value; - }); - var global_objs = { - Array: Array, - Math: Math, - Number: Number, - Object: Object, - String: String, - }; - var static_values = convert_to_predicate({ - Math: [ - "E", - "LN10", - "LN2", - "LOG2E", - "LOG10E", - "PI", - "SQRT1_2", - "SQRT2", - ], - Number: [ - "MAX_VALUE", - "MIN_VALUE", - "NaN", - "NEGATIVE_INFINITY", - "POSITIVE_INFINITY", - ], - }); - var regexp_props = makePredicate("global ignoreCase multiline source"); - def(AST_PropAccess, function(compressor, ignore_side_effects, cached, depth) { - if (compressor.option("unsafe")) { - var val; - var exp = this.expression; - if (!is_undeclared_ref(exp)) { - val = exp._eval(compressor, ignore_side_effects, cached, depth + 1); - if (val == null || val === exp) return this; - } - var key = this.property; - if (key instanceof AST_Node) { - key = key._eval(compressor, ignore_side_effects, cached, depth); - if (key === this.property) return this; - } - if (val === undefined) { - var static_value = static_values[exp.name]; - if (!static_value || !static_value[key]) return this; - val = global_objs[exp.name]; - } else if (val instanceof RegExp) { - if (!regexp_props[key]) return this; - } else if (typeof val == "object") { - if (!HOP(val, key)) return this; - } else if (typeof val == "function") switch (key) { - case "name": - return val.node.name ? val.node.name.name : ""; - case "length": - return val.node.length(); - default: - return this; - } - return val[key]; - } - return this; - }); - function eval_all(nodes, compressor, ignore_side_effects, cached, depth) { - var values = []; - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - var value = node._eval(compressor, ignore_side_effects, cached, depth); - if (node === value) return; - values.push(value); - } - return values; - } - def(AST_Call, function(compressor, ignore_side_effects, cached, depth) { - var exp = this.expression; - var fn = exp instanceof AST_SymbolRef ? exp.fixed_value() : exp; - if (fn instanceof AST_Arrow || fn instanceof AST_Defun || fn instanceof AST_Function) { - if (fn.evaluating) return this; - if (fn.name && fn.name.definition().recursive_refs > 0) return this; - if (this.is_expr_pure(compressor)) return this; - var args = eval_all(this.args, compressor, ignore_side_effects, cached, depth); - if (!all(fn.argnames, function(sym, index) { - if (sym instanceof AST_DefaultValue) { - if (!args) return false; - if (args[index] !== undefined) return false; - var value = sym.value._eval(compressor, ignore_side_effects, cached, depth); - if (value === sym.value) return false; - args[index] = value; - sym = sym.name; - } - return !(sym instanceof AST_Destructured); - })) return this; - if (fn.rest instanceof AST_Destructured) return this; - if (!args && !ignore_side_effects) return this; - var stat = fn.first_statement(); - if (!(stat instanceof AST_Return)) { - if (ignore_side_effects) { - fn.walk(scan_modified); - var found = false; - fn.evaluating = true; - walk_body(fn, new TreeWalker(function(node) { - if (found) return true; - if (node instanceof AST_Return) { - if (node.value && node.value._eval(compressor, true, cached, depth) !== undefined) { - found = true; - } - return true; - } - if (node instanceof AST_Scope && node !== fn) return true; - })); - delete fn.evaluating; - if (!found) return; - } - return this; - } - var val = stat.value; - if (!val) return; - var cached_args = []; - if (!args || all(fn.argnames, function(sym, i) { - return assign(sym, args[i]); - }) && !(fn.rest && !assign(fn.rest, args.slice(fn.argnames.length))) || ignore_side_effects) { - fn.evaluating = true; - val = val._eval(compressor, ignore_side_effects, cached, depth); - delete fn.evaluating; - } - cached_args.forEach(function(node) { - delete node._eval; - }); - return val === stat.value ? this : val; - } else if (compressor.option("unsafe") && exp instanceof AST_PropAccess) { - var key = exp.property; - if (key instanceof AST_Node) { - key = key._eval(compressor, ignore_side_effects, cached, depth); - if (key === exp.property) return this; - } - var val; - var e = exp.expression; - if (is_undeclared_ref(e)) { - var static_fn = static_fns[e.name]; - if (!static_fn || !static_fn[key]) return this; - val = global_objs[e.name]; - } else { - val = e._eval(compressor, ignore_side_effects, cached, depth + 1); - if (val == null || val === e) return this; - var native_fn = native_fns[val.constructor.name]; - if (!native_fn || !native_fn[key]) return this; - if (val instanceof RegExp && val.global && !(e instanceof AST_RegExp)) return this; - } - var args = eval_all(this.args, compressor, ignore_side_effects, cached, depth); - if (!args) return this; - if (key == "replace" && typeof args[1] == "function") return this; - try { - return val[key].apply(val, args); - } catch (ex) { - AST_Node.warn("Error evaluating {code} [{file}:{line},{col}]", { - code: this, - file: this.start.file, - line: this.start.line, - col: this.start.col, - }); - } finally { - if (val instanceof RegExp) val.lastIndex = 0; - } - } - return this; - - function assign(sym, arg) { - if (sym instanceof AST_DefaultValue) sym = sym.name; - var def = sym.definition(); - if (def.orig[def.orig.length - 1] !== sym) return false; - var value = arg; - def.references.forEach(function(node) { - node._eval = function() { - return value; - }; - cached_args.push(node); - }); - return true; - } - }); - def(AST_New, return_this); - def(AST_Template, function(compressor, ignore_side_effects, cached, depth) { - if (!compressor.option("templates")) return this; - if (this.tag) { - if (!is_raw_tag(compressor, this.tag)) return this; - decode = function(str) { - return str; - }; - } - var exprs = eval_all(this.expressions, compressor, ignore_side_effects, cached, depth); - if (!exprs) return this; - var malformed = false; - var ret = decode(this.strings[0]); - for (var i = 0; i < exprs.length; i++) { - ret += exprs[i] + decode(this.strings[i + 1]); - } - if (!malformed) return ret; - this._eval = return_this; - return this; - - function decode(str) { - return str.replace(/\\(u\{[^}]*\}?|u[\s\S]{0,4}|x[\s\S]{0,2}|[0-9]+|[\s\S])/g, function(match, seq) { - var s = decode_escape_sequence(seq); - if (typeof s != "string") malformed = true; - return s; - }); - } - }); - })(function(node, func) { - node.DEFMETHOD("_eval", func); - }); - - // method to negate an expression - (function(def) { - function basic_negation(exp) { - return make_node(AST_UnaryPrefix, exp, { - operator: "!", - expression: exp - }); - } - function best(orig, alt, first_in_statement) { - var negated = basic_negation(orig); - if (first_in_statement) { - var stat = make_node(AST_SimpleStatement, alt, { - body: alt - }); - return best_of_expression(negated, stat) === stat ? alt : negated; - } - return best_of_expression(negated, alt); - } - def(AST_Node, function() { - return basic_negation(this); - }); - def(AST_Statement, function() { - throw new Error("Cannot negate a statement"); - }); - def(AST_Binary, function(compressor, first_in_statement) { - var self = this.clone(), op = this.operator; - if (compressor.option("unsafe_comps")) { - switch (op) { - case "<=" : self.operator = ">" ; return self; - case "<" : self.operator = ">=" ; return self; - case ">=" : self.operator = "<" ; return self; - case ">" : self.operator = "<=" ; return self; - } - } - switch (op) { - case "==" : self.operator = "!="; return self; - case "!=" : self.operator = "=="; return self; - case "===": self.operator = "!=="; return self; - case "!==": self.operator = "==="; return self; - case "&&": - self.operator = "||"; - self.left = self.left.negate(compressor, first_in_statement); - self.right = self.right.negate(compressor); - return best(this, self, first_in_statement); - case "||": - self.operator = "&&"; - self.left = self.left.negate(compressor, first_in_statement); - self.right = self.right.negate(compressor); - return best(this, self, first_in_statement); - } - return basic_negation(this); - }); - def(AST_ClassExpression, function() { - return basic_negation(this); - }); - def(AST_Conditional, function(compressor, first_in_statement) { - var self = this.clone(); - self.consequent = self.consequent.negate(compressor); - self.alternative = self.alternative.negate(compressor); - return best(this, self, first_in_statement); - }); - def(AST_LambdaExpression, function() { - return basic_negation(this); - }); - def(AST_Sequence, function(compressor) { - var expressions = this.expressions.slice(); - expressions.push(expressions.pop().negate(compressor)); - return make_sequence(this, expressions); - }); - def(AST_UnaryPrefix, function() { - if (this.operator == "!") - return this.expression; - return basic_negation(this); - }); - })(function(node, func) { - node.DEFMETHOD("negate", function(compressor, first_in_statement) { - return func.call(this, compressor, first_in_statement); - }); - }); - - var global_pure_fns = makePredicate("Boolean decodeURI decodeURIComponent Date encodeURI encodeURIComponent Error escape EvalError isFinite isNaN Number Object parseFloat parseInt RangeError ReferenceError String SyntaxError TypeError unescape URIError"); - var global_pure_constructors = makePredicate("Map Set WeakMap WeakSet"); - AST_Call.DEFMETHOD("is_expr_pure", function(compressor) { - if (compressor.option("unsafe")) { - var expr = this.expression; - if (is_undeclared_ref(expr)) { - if (global_pure_fns[expr.name]) return true; - if (this instanceof AST_New && global_pure_constructors[expr.name]) return true; - } - if (is_static_fn(expr)) return true; - } - return compressor.option("annotations") && this.pure || !compressor.pure_funcs(this); - }); - AST_Template.DEFMETHOD("is_expr_pure", function(compressor) { - var tag = this.tag; - if (!tag) return true; - if (compressor.option("unsafe")) { - if (is_undeclared_ref(tag) && global_pure_fns[tag.name]) return true; - if (tag instanceof AST_Dot && is_undeclared_ref(tag.expression)) { - var static_fn = static_fns[tag.expression.name]; - return static_fn && (static_fn[tag.property] - || tag.expression.name == "Math" && tag.property == "random"); - } - } - return !compressor.pure_funcs(this); - }); - AST_Node.DEFMETHOD("is_call_pure", return_false); - AST_Call.DEFMETHOD("is_call_pure", function(compressor) { - if (!compressor.option("unsafe")) return false; - var dot = this.expression; - if (!(dot instanceof AST_Dot)) return false; - var exp = dot.expression; - var map; - var prop = dot.property; - if (exp instanceof AST_Array) { - map = native_fns.Array; - } else if (exp.is_boolean(compressor)) { - map = native_fns.Boolean; - } else if (exp.is_number(compressor)) { - map = native_fns.Number; - } else if (exp instanceof AST_RegExp) { - map = native_fns.RegExp; - } else if (exp.is_string(compressor)) { - map = native_fns.String; - if (prop == "replace") { - var arg = this.args[1]; - if (arg && !arg.is_string(compressor)) return false; - } - } else if (!dot.may_throw_on_access(compressor)) { - map = native_fns.Object; - } - return map && map[prop]; - }); - - function spread_side_effects(exp) { - while ((exp = exp.tail_node()) instanceof AST_SymbolRef) { - exp = exp.fixed_value(); - if (!exp) return true; - } - return !(exp instanceof AST_Array - || exp.TYPE == "Binary" && !lazy_op[exp.operator] - || exp instanceof AST_Constant - || exp instanceof AST_Lambda - || exp instanceof AST_Object && all(exp.properties, function(prop) { - return !(prop instanceof AST_ObjectGetter || prop instanceof AST_Spread); - }) - || exp instanceof AST_ObjectIdentity - || exp instanceof AST_Unary); - } - - // determine if expression has side effects - (function(def) { - function any(list, compressor, spread) { - return !all(list, spread ? function(node) { - return node instanceof AST_Spread ? !spread(node, compressor) : !node.has_side_effects(compressor); - } : function(node) { - return !node.has_side_effects(compressor); - }); - } - function array_spread(node, compressor) { - return !node.expression.is_string(compressor) || node.expression.has_side_effects(compressor); - } - def(AST_Node, return_true); - def(AST_Array, function(compressor) { - return any(this.elements, compressor, array_spread); - }); - def(AST_Assign, function(compressor) { - var lhs = this.left; - if (!(lhs instanceof AST_PropAccess)) return true; - var node = lhs.expression; - return !(node instanceof AST_ObjectIdentity) - || !node.scope.resolve().new - || lhs instanceof AST_Sub && lhs.property.has_side_effects(compressor) - || this.right.has_side_effects(compressor); - }); - def(AST_Binary, function(compressor) { - return this.left.has_side_effects(compressor) - || this.right.has_side_effects(compressor) - || this.operator == "in" && !is_object(this.right); - }); - def(AST_Block, function(compressor) { - return any(this.body, compressor); - }); - def(AST_Call, function(compressor) { - if (!this.is_expr_pure(compressor) - && (!this.is_call_pure(compressor) || this.expression.has_side_effects(compressor))) { - return true; - } - return any(this.args, compressor, array_spread); - }); - def(AST_Case, function(compressor) { - return this.expression.has_side_effects(compressor) - || any(this.body, compressor); - }); - def(AST_Class, function(compressor) { - var base = this.extends; - if (base) { - if (base instanceof AST_SymbolRef) base = base.fixed_value(); - if (!safe_for_extends(base)) return true; - } - return any(this.properties, compressor); - }); - def(AST_ClassProperty, function(compressor) { - return this.key instanceof AST_Node && this.key.has_side_effects(compressor) - || this.static && this.value && this.value.has_side_effects(compressor); - }); - def(AST_Conditional, function(compressor) { - return this.condition.has_side_effects(compressor) - || this.consequent.has_side_effects(compressor) - || this.alternative.has_side_effects(compressor); - }); - def(AST_Constant, return_false); - def(AST_Definitions, function(compressor) { - return any(this.definitions, compressor); - }); - def(AST_DestructuredArray, function(compressor) { - return any(this.elements, compressor); - }); - def(AST_DestructuredKeyVal, function(compressor) { - return this.key instanceof AST_Node && this.key.has_side_effects(compressor) - || this.value.has_side_effects(compressor); - }); - def(AST_DestructuredObject, function(compressor) { - return any(this.properties, compressor); - }); - def(AST_Dot, function(compressor) { - return !this.optional && this.expression.may_throw_on_access(compressor) - || this.expression.has_side_effects(compressor); - }); - def(AST_EmptyStatement, return_false); - def(AST_If, function(compressor) { - return this.condition.has_side_effects(compressor) - || this.body && this.body.has_side_effects(compressor) - || this.alternative && this.alternative.has_side_effects(compressor); - }); - def(AST_LabeledStatement, function(compressor) { - return this.body.has_side_effects(compressor); - }); - def(AST_Lambda, return_false); - def(AST_Object, function(compressor) { - return any(this.properties, compressor, function(node, compressor) { - var exp = node.expression; - return spread_side_effects(exp) || exp.has_side_effects(compressor); - }); - }); - def(AST_ObjectIdentity, return_false); - def(AST_ObjectProperty, function(compressor) { - return this.key instanceof AST_Node && this.key.has_side_effects(compressor) - || this.value.has_side_effects(compressor); - }); - def(AST_Sequence, function(compressor) { - return any(this.expressions, compressor); - }); - def(AST_SimpleStatement, function(compressor) { - return this.body.has_side_effects(compressor); - }); - def(AST_Sub, function(compressor) { - return !this.optional && this.expression.may_throw_on_access(compressor) - || this.expression.has_side_effects(compressor) - || this.property.has_side_effects(compressor); - }); - def(AST_Switch, function(compressor) { - return this.expression.has_side_effects(compressor) - || any(this.body, compressor); - }); - def(AST_SymbolDeclaration, return_false); - def(AST_SymbolRef, function(compressor) { - return !this.is_declared(compressor) || !can_drop_symbol(this, compressor); - }); - def(AST_Template, function(compressor) { - return !this.is_expr_pure(compressor) || any(this.expressions, compressor); - }); - def(AST_Try, function(compressor) { - return any(this.body, compressor) - || this.bcatch && this.bcatch.has_side_effects(compressor) - || this.bfinally && this.bfinally.has_side_effects(compressor); - }); - def(AST_Unary, function(compressor) { - return unary_side_effects[this.operator] - || this.expression.has_side_effects(compressor); - }); - def(AST_VarDef, function() { - return this.value; - }); - })(function(node, func) { - node.DEFMETHOD("has_side_effects", func); - }); - - // determine if expression may throw - (function(def) { - def(AST_Node, return_true); - - def(AST_Constant, return_false); - def(AST_Destructured, return_true); - def(AST_EmptyStatement, return_false); - def(AST_Lambda, return_false); - def(AST_ObjectIdentity, return_false); - def(AST_SymbolDeclaration, return_false); - - function any(list, compressor) { - for (var i = list.length; --i >= 0;) - if (list[i].may_throw(compressor)) - return true; - return false; - } - - function call_may_throw(exp, compressor) { - if (exp.may_throw(compressor)) return true; - if (exp instanceof AST_SymbolRef) exp = exp.fixed_value(); - if (!(exp instanceof AST_Lambda)) return true; - if (any(exp.argnames, compressor)) return true; - if (any(exp.body, compressor)) return true; - return is_arrow(exp) && exp.value && exp.value.may_throw(compressor); - } - - def(AST_Array, function(compressor) { - return any(this.elements, compressor); - }); - def(AST_Assign, function(compressor) { - if (this.right.may_throw(compressor)) return true; - if (!compressor.has_directive("use strict") - && this.operator == "=" - && this.left instanceof AST_SymbolRef) { - return false; - } - return this.left.may_throw(compressor); - }); - def(AST_Binary, function(compressor) { - return this.left.may_throw(compressor) - || this.right.may_throw(compressor) - || this.operator == "in" && !is_object(this.right); - }); - def(AST_Block, function(compressor) { - return any(this.body, compressor); - }); - def(AST_Call, function(compressor) { - if (any(this.args, compressor)) return true; - if (this.is_expr_pure(compressor)) return false; - this.may_throw = return_true; - var ret = call_may_throw(this.expression, compressor); - delete this.may_throw; - return ret; - }); - def(AST_Case, function(compressor) { - return this.expression.may_throw(compressor) - || any(this.body, compressor); - }); - def(AST_Conditional, function(compressor) { - return this.condition.may_throw(compressor) - || this.consequent.may_throw(compressor) - || this.alternative.may_throw(compressor); - }); - def(AST_DefaultValue, function(compressor) { - return this.name.may_throw(compressor) - || this.value && this.value.may_throw(compressor); - }); - def(AST_Definitions, function(compressor) { - return any(this.definitions, compressor); - }); - def(AST_Dot, function(compressor) { - return !this.optional && this.expression.may_throw_on_access(compressor) - || this.expression.may_throw(compressor); - }); - def(AST_If, function(compressor) { - return this.condition.may_throw(compressor) - || this.body && this.body.may_throw(compressor) - || this.alternative && this.alternative.may_throw(compressor); - }); - def(AST_LabeledStatement, function(compressor) { - return this.body.may_throw(compressor); - }); - def(AST_Object, function(compressor) { - return any(this.properties, compressor); - }); - def(AST_ObjectProperty, function(compressor) { - return this.value.may_throw(compressor) - || this.key instanceof AST_Node && this.key.may_throw(compressor); - }); - def(AST_Return, function(compressor) { - return this.value && this.value.may_throw(compressor); - }); - def(AST_Sequence, function(compressor) { - return any(this.expressions, compressor); - }); - def(AST_SimpleStatement, function(compressor) { - return this.body.may_throw(compressor); - }); - def(AST_Sub, function(compressor) { - return !this.optional && this.expression.may_throw_on_access(compressor) - || this.expression.may_throw(compressor) - || this.property.may_throw(compressor); - }); - def(AST_Switch, function(compressor) { - return this.expression.may_throw(compressor) - || any(this.body, compressor); - }); - def(AST_SymbolRef, function(compressor) { - return !this.is_declared(compressor) || !can_drop_symbol(this, compressor); - }); - def(AST_Template, function(compressor) { - if (any(this.expressions, compressor)) return true; - if (this.is_expr_pure(compressor)) return false; - if (!this.tag) return false; - this.may_throw = return_true; - var ret = call_may_throw(this.tag, compressor); - delete this.may_throw; - return ret; - }); - def(AST_Try, function(compressor) { - return (this.bcatch ? this.bcatch.may_throw(compressor) : any(this.body, compressor)) - || this.bfinally && this.bfinally.may_throw(compressor); - }); - def(AST_Unary, function(compressor) { - return this.expression.may_throw(compressor) - && !(this.operator == "typeof" && this.expression instanceof AST_SymbolRef); - }); - def(AST_VarDef, function(compressor) { - return this.name.may_throw(compressor) - || this.value && this.value.may_throw(compressor); - }); - })(function(node, func) { - node.DEFMETHOD("may_throw", func); - }); - - // determine if expression is constant - (function(def) { - function all_constant(list, scope) { - for (var i = list.length; --i >= 0;) - if (!list[i].is_constant_expression(scope)) - return false; - return true; - } - def(AST_Node, return_false); - def(AST_Array, function(scope) { - return all_constant(this.elements, scope); - }); - def(AST_Binary, function(scope) { - return this.left.is_constant_expression(scope) - && this.right.is_constant_expression(scope) - && (this.operator != "in" || is_object(this.right)); - }); - def(AST_Class, function(scope) { - var base = this.extends; - if (base && !safe_for_extends(base)) return false; - return all_constant(this.properties, scope); - }); - def(AST_ClassProperty, function(scope) { - return typeof this.key == "string" && (!this.value || this.value.is_constant_expression(scope)); - }); - def(AST_Constant, return_true); - def(AST_Lambda, function(scope) { - var self = this; - var result = true; - var scopes = []; - self.walk(new TreeWalker(function(node, descend) { - if (!result) return true; - if (node instanceof AST_BlockScope) { - if (node === self) return; - scopes.push(node); - descend(); - scopes.pop(); - return true; - } - if (node instanceof AST_SymbolRef) { - if (self.inlined || node.redef) { - result = false; - return true; - } - if (self.variables.has(node.name)) return true; - var def = node.definition(); - if (member(def.scope, scopes)) return true; - if (scope && !def.redefined()) { - var scope_def = scope.find_variable(node.name); - if (scope_def ? scope_def === def : def.undeclared) { - result = "f"; - return true; - } - } - result = false; - return true; - } - if (node instanceof AST_ObjectIdentity) { - if (is_arrow(self) && all(scopes, function(s) { - return !(s instanceof AST_Scope) || is_arrow(s); - })) result = false; - return true; - } - })); - return result; - }); - def(AST_Object, function(scope) { - return all_constant(this.properties, scope); - }); - def(AST_ObjectProperty, function(scope) { - return typeof this.key == "string" && this.value.is_constant_expression(scope); - }); - def(AST_Unary, function(scope) { - return this.expression.is_constant_expression(scope); - }); - })(function(node, func) { - node.DEFMETHOD("is_constant_expression", func); - }); - - // tell me if a statement aborts - function aborts(thing) { - return thing && thing.aborts(); - } - (function(def) { - def(AST_Statement, return_null); - def(AST_Jump, return_this); - function block_aborts() { - var n = this.body.length; - return n > 0 && aborts(this.body[n - 1]); - } - def(AST_BlockStatement, block_aborts); - def(AST_SwitchBranch, block_aborts); - def(AST_If, function() { - return this.alternative && aborts(this.body) && aborts(this.alternative) && this; - }); - })(function(node, func) { - node.DEFMETHOD("aborts", func); - }); - - /* -----[ optimizers ]----- */ - - var directives = makePredicate(["use asm", "use strict"]); - OPT(AST_Directive, function(self, compressor) { - if (compressor.option("directives") - && (!directives[self.value] || compressor.has_directive(self.value) !== self)) { - return make_node(AST_EmptyStatement, self); - } - return self; - }); - - OPT(AST_Debugger, function(self, compressor) { - if (compressor.option("drop_debugger")) - return make_node(AST_EmptyStatement, self); - return self; - }); - - OPT(AST_LabeledStatement, function(self, compressor) { - if (compressor.option("dead_code") - && self.body instanceof AST_Break - && compressor.loopcontrol_target(self.body) === self.body) { - return make_node(AST_EmptyStatement, self); - } - return compressor.option("unused") && self.label.references.length == 0 ? self.body : self; - }); - - OPT(AST_Block, function(self, compressor) { - self.body = tighten_body(self.body, compressor); - return self; - }); - - function trim_block(node, parent, in_list) { - switch (node.body.length) { - case 0: - return in_list ? List.skip : make_node(AST_EmptyStatement, node); - case 1: - var stat = node.body[0]; - if (!safe_to_trim(stat)) return node; - if (parent instanceof AST_IterationStatement && stat instanceof AST_LambdaDefinition) return node; - return stat; - } - return node; - } - - OPT(AST_BlockStatement, function(self, compressor) { - self.body = tighten_body(self.body, compressor); - return trim_block(self, compressor.parent()); - }); - - function drop_rest_farg(fn, compressor) { - if (!compressor.option("rests")) return; - if (fn.uses_arguments) return; - if (!(fn.rest instanceof AST_DestructuredArray)) return; - if (!compressor.drop_fargs(fn, compressor.parent())) return; - fn.argnames = fn.argnames.concat(fn.rest.elements); - fn.rest = null; - } - - OPT(AST_Lambda, function(self, compressor) { - drop_rest_farg(self, compressor); - self.body = tighten_body(self.body, compressor); - return self; - }); - - function opt_arrow(self, compressor) { - if (!compressor.option("arrows")) return self; - drop_rest_farg(self, compressor); - var body = tighten_body(self.value ? [ self.first_statement() ] : self.body, compressor); - switch (body.length) { - case 1: - var stat = body[0]; - if (stat instanceof AST_Return) { - self.body.length = 0; - self.value = stat.value; - break; - } - default: - self.body = body; - self.value = null; - break; - } - return self; - } - OPT(AST_Arrow, opt_arrow); - OPT(AST_AsyncArrow, opt_arrow); - - OPT(AST_Function, function(self, compressor) { - drop_rest_farg(self, compressor); - self.body = tighten_body(self.body, compressor); - var parent = compressor.parent(); - if (compressor.option("inline")) for (var i = 0; i < self.body.length; i++) { - var stat = self.body[i]; - if (stat instanceof AST_Directive) continue; - if (stat instanceof AST_Return) { - if (i != self.body.length - 1) break; - var call = stat.value; - if (!call || call.TYPE != "Call") break; - if (call.is_expr_pure(compressor)) break; - var fn = call.expression; - if (fn instanceof AST_SymbolRef) { - if (self.name && self.name.definition() === fn.definition()) break; - fn = fn.fixed_value(); - } - if (!(fn instanceof AST_Defun || fn instanceof AST_Function)) break; - if (fn.uses_arguments) break; - if (fn === call.expression) { - if (fn.parent_scope !== self) break; - if (!all(fn.enclosed, function(def) { - return def.scope !== self; - })) break; - } - if (fn.name - && (parent instanceof AST_ClassMethod || parent instanceof AST_ObjectMethod) - && parent.value === compressor.self()) break; - if (fn.contains_this()) break; - var len = fn.argnames.length; - if (len > 0 && compressor.option("inline") < 2) break; - if (len > self.argnames.length) break; - if (!all(self.argnames, function(argname) { - return argname instanceof AST_SymbolFunarg; - })) break; - if (!all(call.args, function(arg) { - return !(arg instanceof AST_Spread); - })) break; - for (var j = 0; j < len; j++) { - var arg = call.args[j]; - if (!(arg instanceof AST_SymbolRef)) break; - if (arg.definition() !== self.argnames[j].definition()) break; - } - if (j < len) break; - for (; j < call.args.length; j++) { - if (call.args[j].has_side_effects(compressor)) break; - } - if (j < call.args.length) break; - if (len < self.argnames.length && !compressor.drop_fargs(self, parent)) { - if (!compressor.drop_fargs(fn, call)) break; - do { - fn.argnames.push(fn.make_var(AST_SymbolFunarg, fn, "argument_" + len)); - } while (++len < self.argnames.length); - } - return call.expression; - } - break; - } - return self; - }); - - var NO_MERGE = makePredicate("arguments await yield"); - AST_Scope.DEFMETHOD("merge_variables", function(compressor) { - if (!compressor.option("merge_vars")) return; - var in_try, root, segment = {}, self = this; - var first = [], last = [], index = 0; - var declarations = new Dictionary(); - var references = Object.create(null); - var prev = Object.create(null); - var tw = new TreeWalker(function(node, descend) { - if (node instanceof AST_Assign) { - var lhs = node.left; - var rhs = node.right; - if (lhs instanceof AST_Destructured) { - rhs.walk(tw); - var marker = new TreeWalker(function(node) { - if (node instanceof AST_Destructured) return; - if (node instanceof AST_DefaultValue) { - push(); - node.value.walk(tw); - pop(); - node.name.walk(marker); - } else if (node instanceof AST_DestructuredKeyVal) { - if (node.key instanceof AST_Node) { - push(); - segment.block = node; - node.key.walk(tw); - node.value.walk(marker); - pop(); - } else { - node.value.walk(marker); - } - } else if (node instanceof AST_SymbolRef) { - mark(node); - } else { - node.walk(tw); - } - return true; - }); - lhs.walk(marker); - return true; - } - if (lazy_op[node.operator.slice(0, -1)]) { - lhs.walk(tw); - push(); - rhs.walk(tw); - if (lhs instanceof AST_SymbolRef) mark(lhs); - pop(); - return true; - } - if (lhs instanceof AST_SymbolRef) { - if (node.operator != "=") mark(lhs, true); - rhs.walk(tw); - mark(lhs); - return true; - } - return; - } - if (node instanceof AST_Binary) { - if (!lazy_op[node.operator]) return; - node.left.walk(tw); - push(); - node.right.walk(tw); - pop(); - return true; - } - if (node instanceof AST_Break) { - var target = tw.loopcontrol_target(node); - if (!(target instanceof AST_IterationStatement)) insert(target); - return true; - } - if (node instanceof AST_Call) { - var exp = node.expression; - var tail = exp.tail_node(); - if (!(tail instanceof AST_LambdaExpression)) return; - if (exp !== tail) exp.expressions.slice(0, -1).forEach(function(node) { - node.walk(tw); - }); - node.args.forEach(function(arg) { - arg.walk(tw); - }); - tail.walk(tw); - return true; - } - if (node instanceof AST_Conditional) { - node.condition.walk(tw); - push(); - node.consequent.walk(tw); - pop(); - push(); - node.alternative.walk(tw); - pop(); - return true; - } - if (node instanceof AST_Continue) { - var target = tw.loopcontrol_target(node); - if (target instanceof AST_Do) insert(target); - return true; - } - if (node instanceof AST_Do) { - push(); - segment.block = node; - segment.loop = true; - var save = segment; - node.body.walk(tw); - if (segment.inserted === node) segment = save; - node.condition.walk(tw); - pop(); - return true; - } - if (node instanceof AST_For) { - if (node.init) node.init.walk(tw); - push(); - segment.block = node; - segment.loop = true; - if (node.condition) node.condition.walk(tw); - node.body.walk(tw); - if (node.step) node.step.walk(tw); - pop(); - return true; - } - if (node instanceof AST_ForEnumeration) { - node.object.walk(tw); - push(); - segment.block = node; - segment.loop = true; - node.init.walk(tw); - node.body.walk(tw); - pop(); - return true; - } - if (node instanceof AST_If) { - node.condition.walk(tw); - push(); - node.body.walk(tw); - pop(); - if (node.alternative) { - push(); - node.alternative.walk(tw); - pop(); - } - return true; - } - if (node instanceof AST_LabeledStatement) { - push(); - segment.block = node; - var save = segment; - node.body.walk(tw); - if (segment.inserted === node) segment = save; - pop(); - return true; - } - if (node instanceof AST_Scope) { - push(); - segment.block = node; - if (node === self) root = segment; - if (node instanceof AST_Lambda) { - if (node.name) references[node.name.definition().id] = false; - var marker = node.uses_arguments && !tw.has_directive("use strict") ? function(node) { - if (node instanceof AST_SymbolFunarg) references[node.definition().id] = false; - } : function(node) { - if (node instanceof AST_SymbolFunarg) mark(node); - }; - var scanner = new TreeWalker(function(ref) { - if (ref instanceof AST_SymbolDeclaration) references[ref.definition().id] = false; - if (!(ref instanceof AST_SymbolRef)) return; - var def = ref.definition(); - var ldef = node.variables.get(ref.name); - if (ldef && (ldef === def - || def.undeclared - || node.parent_scope.find_variable(ref.name) === def)) { - references[def.id] = false; - references[ldef.id] = false; - } else { - var save = segment; - pop(); - mark(ref, true); - segment = save; - } - return true; - }); - node.argnames.forEach(function(argname) { - argname.mark_symbol(marker, scanner); - }); - if (node.rest) node.rest.mark_symbol(marker, scanner); - } - walk_lambda(node, tw); - pop(); - return true; - } - if (node instanceof AST_Switch) { - node.expression.walk(tw); - var save = segment; - node.body.forEach(function(branch) { - if (branch instanceof AST_Default) return; - branch.expression.walk(tw); - if (save === segment) push(); - }); - segment = save; - node.body.forEach(function(branch) { - push(); - segment.block = node; - var save = segment; - walk_body(branch, tw); - if (segment.inserted === node) segment = save; - pop(); - }); - return true; - } - if (node instanceof AST_SymbolConst || node instanceof AST_SymbolLet) { - references[node.definition().id] = false; - return true; - } - if (node instanceof AST_SymbolRef) { - mark(node, true); - return true; - } - if (node instanceof AST_Try) { - var save_try = in_try; - in_try = node; - var save = segment; - walk_body(node, tw); - segment = save; - if (node.bcatch) { - if (node.bcatch.argname) node.bcatch.argname.mark_symbol(function(node) { - if (node instanceof AST_SymbolCatch) { - var def = node.definition(); - references[def.id] = false; - if (def = def.redefined()) references[def.id] = false; - } - }, tw); - if (node.bfinally || (in_try = save_try)) { - walk_body(node.bcatch, tw); - } else { - push(); - walk_body(node.bcatch, tw); - pop(); - } - } - in_try = save_try; - segment = save; - if (node.bfinally) node.bfinally.walk(tw); - return true; - } - if (node instanceof AST_Unary) { - if (!UNARY_POSTFIX[node.operator]) return; - var sym = node.expression; - if (!(sym instanceof AST_SymbolRef)) return; - mark(sym, true); - return true; - } - if (node instanceof AST_VarDef) { - var assigned = node.value; - if (assigned) { - assigned.walk(tw); - } else { - assigned = segment.block instanceof AST_ForEnumeration && segment.block.init === tw.parent(); - } - node.name.mark_symbol(assigned ? function(node) { - if (!(node instanceof AST_SymbolDeclaration)) return; - if (node instanceof AST_SymbolVar) { - mark(node); - } else { - references[node.definition().id] = false; - } - return true; - } : function(node) { - if (!(node instanceof AST_SymbolDeclaration)) return; - var id = node.definition().id; - if (!(node instanceof AST_SymbolVar)) { - references[id] = false; - } else if (!(id in references)) { - declarations.add(id, node); - } else if (references[id]) { - references[id].push(node); - } - return true; - }, tw); - return true; - } - if (node instanceof AST_While) { - push(); - segment.block = node; - segment.loop = true; - descend(); - pop(); - return true; - } - }); - tw.directives = Object.create(compressor.directives); - self.walk(tw); - var merged = Object.create(null); - while (first.length && last.length) { - var head = first.pop(); - var def = head.definition; - if (!(def.id in prev)) continue; - if (!references[def.id]) continue; - var head_refs = { - start: references[def.id].start, - }; - while (def.id in merged) def = merged[def.id]; - head_refs.end = references[def.id].end; - var skipped = []; - do { - var tail = last.pop(); - if (!tail) continue; - if (tail.index > head.index) continue; - var id = tail.definition.id; - var tail_refs = references[id]; - if (!tail_refs) continue; - if (head_refs.start.block !== tail_refs.start.block - || !mergeable(head_refs, tail_refs) - || (head_refs.start.loop || !same_scope(def)) && !mergeable(tail_refs, head_refs) - || compressor.option("webkit") && is_funarg(def) !== is_funarg(tail.definition) - || !all(tail_refs, function(sym) { - return sym.scope.find_variable(def.name) === def; - })) { - skipped.unshift(tail); - continue; - } - var orig = [], refs = []; - tail_refs.forEach(function(sym) { - sym.thedef = def; - sym.name = def.name; - if (sym instanceof AST_SymbolRef) { - refs.push(sym); - } else { - orig.push(sym); - } - }); - def.orig = orig.concat(def.orig); - def.references = refs.concat(def.references); - def.fixed = tail.definition.fixed && def.fixed; - merged[id] = def; - break; - } while (last.length); - if (skipped.length) last = last.concat(skipped); - } - - function push() { - segment = Object.create(segment); - } - - function pop() { - segment = Object.getPrototypeOf(segment); - } - - function mark(sym, read) { - var def = sym.definition(), ldef, seg = segment; - if (in_try) { - push(); - seg = segment; - pop(); - } - if (def.id in references) { - var refs = references[def.id]; - if (!refs) return; - if (refs.start.block !== seg.block) return references[def.id] = false; - refs.push(sym); - refs.end = seg; - if (def.id in prev) { - last[prev[def.id]] = null; - } else if (!read) { - return; - } - } else if ((ldef = self.variables.get(def.name)) !== def) { - if (ldef && root === seg) references[ldef.id] = false; - return references[def.id] = false; - } else if (compressor.exposed(def) || NO_MERGE[sym.name]) { - return references[def.id] = false; - } else { - var refs = declarations.get(def.id) || []; - refs.push(sym); - references[def.id] = refs; - if (!read) { - refs.start = seg; - return first.push({ - index: index++, - definition: def, - }); - } - if (seg.block !== self) return references[def.id] = false; - refs.start = root; - } - prev[def.id] = last.length; - last.push({ - index: index++, - definition: def, - }); - } - - function insert(target) { - var stack = []; - while (true) { - if (HOP(segment, "block")) { - var block = segment.block; - if (block instanceof AST_LabeledStatement) block = block.body; - if (block === target) break; - } - stack.push(segment); - pop(); - } - segment.inserted = segment.block; - push(); - while (stack.length) { - var seg = stack.pop(); - push(); - if (HOP(seg, "block")) segment.block = seg.block; - if (HOP(seg, "loop")) segment.loop = seg.loop; - } - } - - function must_visit(base, segment) { - return base === segment || base.isPrototypeOf(segment); - } - - function mergeable(head, tail) { - return must_visit(head.start, head.end) || must_visit(head.start, tail.start); - } - }); - - function fill_holes(orig, elements) { - for (var i = elements.length; --i >= 0;) { - if (!elements[i]) elements[i] = make_node(AST_Hole, orig); - } - } - - function to_class_expr(defcl, drop_name) { - var cl = make_node(AST_ClassExpression, defcl, defcl); - cl.name = drop_name ? null : make_node(AST_SymbolClass, defcl.name, defcl.name); - return cl; - } - - function to_func_expr(defun, drop_name) { - var ctor; - switch (defun.CTOR) { - case AST_AsyncDefun: - ctor = AST_AsyncFunction; - break; - case AST_AsyncGeneratorDefun: - ctor = AST_AsyncGeneratorFunction; - break; - case AST_Defun: - ctor = AST_Function; - break; - case AST_GeneratorDefun: - ctor = AST_GeneratorFunction; - break; - } - var fn = make_node(ctor, defun, defun); - fn.name = drop_name ? null : make_node(AST_SymbolLambda, defun.name, defun.name); - return fn; - } - - AST_Scope.DEFMETHOD("drop_unused", function(compressor) { - if (!compressor.option("unused")) return; - var self = this; - var drop_funcs = !(self instanceof AST_Toplevel) || compressor.toplevel.funcs; - var drop_vars = !(self instanceof AST_Toplevel) || compressor.toplevel.vars; - var assign_as_unused = /keep_assign/.test(compressor.option("unused")) ? return_false : function(node, props) { - var sym, nested = false; - if (node instanceof AST_Assign) { - if (node.write_only || node.operator == "=") sym = extract_reference(node.left, props); - } else if (node instanceof AST_Unary) { - if (node.write_only) sym = extract_reference(node.expression, props); - } - if (!(sym instanceof AST_SymbolRef)) return; - var def = sym.definition(); - if (export_defaults[def.id]) return; - if (compressor.exposed(def)) return; - if (!can_drop_symbol(sym, compressor, nested)) return; - return sym; - - function extract_reference(node, props) { - if (node instanceof AST_PropAccess) { - var expr = node.expression; - if (!expr.may_throw_on_access(compressor, true)) { - nested = true; - if (props && node instanceof AST_Sub) props.unshift(node.property); - return extract_reference(expr, props); - } - } else if (node instanceof AST_Assign && node.operator == "=") { - node.write_only = "p"; - var ref = extract_reference(node.right); - if (!props) return ref; - props.assign = node; - return ref instanceof AST_SymbolRef ? ref : node.left; - } - return node; - } - }; - var assign_in_use = Object.create(null); - var export_defaults = Object.create(null); - var find_variable = function(name) { - find_variable = compose(self, 0, noop); - return find_variable(name); - - function compose(child, level, find) { - var parent = compressor.parent(level); - if (!parent) return find; - var in_arg = parent instanceof AST_Lambda && member(child, parent.argnames); - return compose(parent, level + 1, in_arg ? function(name) { - var def = find(name); - if (def) return def; - def = parent.variables.get(name); - if (def) { - var sym = def.orig[0]; - if (sym instanceof AST_SymbolFunarg || sym instanceof AST_SymbolLambda) return def; - } - } : parent.variables ? function(name) { - return find(name) || parent.variables.get(name); - } : find); - } - }; - var for_ins = Object.create(null); - var in_use = []; - var in_use_ids = Object.create(null); // avoid expensive linear scans of in_use - var value_read = Object.create(null); - var value_modified = Object.create(null); - var var_defs = Object.create(null); - if (self instanceof AST_Toplevel && compressor.top_retain) { - self.variables.each(function(def) { - if (compressor.top_retain(def) && !(def.id in in_use_ids)) { - in_use_ids[def.id] = true; - in_use.push(def); - } - }); - } - var assignments = new Dictionary(); - var initializations = new Dictionary(); - // pass 1: find out which symbols are directly used in - // this scope (not in nested scopes). - var scope = this; - var tw = new TreeWalker(function(node, descend) { - if (node instanceof AST_Lambda && node.uses_arguments && !tw.has_directive("use strict")) { - node.each_argname(function(argname) { - var def = argname.definition(); - if (!(def.id in in_use_ids)) { - in_use_ids[def.id] = true; - in_use.push(def); - } - }); - } - if (node === self) return; - if (scope === self) { - if (node instanceof AST_DefClass) { - var def = node.name.definition(); - if ((!drop_funcs || def.exported) && !(def.id in in_use_ids)) { - in_use_ids[def.id] = true; - in_use.push(def); - } - if (node.extends) node.extends.walk(tw); - var is_export = false; - if (tw.parent() instanceof AST_ExportDefault) { - is_export = true; - export_defaults[def.id] = true; - } - node.properties.forEach(function(prop) { - if (prop.key instanceof AST_Node) prop.key.walk(tw); - if (!prop.value) return; - if (is_export || prop instanceof AST_ClassField && prop.static) { - var save_scope = scope; - scope = node; - prop.value.walk(tw); - scope = save_scope; - } else { - initializations.add(def.id, prop.value); - } - }); - return true; - } - if (node instanceof AST_LambdaDefinition) { - var def = node.name.definition(); - if ((!drop_funcs || def.exported) && !(def.id in in_use_ids)) { - in_use_ids[def.id] = true; - in_use.push(def); - } - initializations.add(def.id, node); - if (tw.parent() instanceof AST_ExportDefault) { - export_defaults[def.id] = true; - } else { - return true; - } - } - if (node instanceof AST_Definitions) { - node.definitions.forEach(function(defn) { - var value = defn.value; - var side_effects = value - && (defn.name instanceof AST_Destructured || value.has_side_effects(compressor)); - var shared = side_effects && value.tail_node().operator == "="; - defn.name.mark_symbol(function(name) { - if (!(name instanceof AST_SymbolDeclaration)) return; - var def = name.definition(); - var_defs[def.id] = (var_defs[def.id] || 0) + 1; - if (node instanceof AST_Var && def.orig[0] instanceof AST_SymbolCatch) { - var redef = def.redefined(); - if (redef) var_defs[redef.id] = (var_defs[redef.id] || 0) + 1; - } - if (!(def.id in in_use_ids) && (!drop_vars || def.exported - || (node instanceof AST_Const ? def.redefined() : def.const_redefs) - || !(node instanceof AST_Var || is_safe_lexical(def)))) { - in_use_ids[def.id] = true; - in_use.push(def); - } - if (value) { - if (!side_effects) { - initializations.add(def.id, value); - } else if (shared) { - verify_safe_usage(def, name, value_modified[def.id]); - } - assignments.add(def.id, defn); - } - return true; - }, tw); - if (side_effects) value.walk(tw); - }); - return true; - } - if (node instanceof AST_SymbolFunarg) { - var def = node.definition(); - var_defs[def.id] = (var_defs[def.id] || 0) + 1; - assignments.add(def.id, node); - return true; - } - if (node instanceof AST_SymbolImport) { - var def = node.definition(); - if (!(def.id in in_use_ids) && (!drop_vars || !is_safe_lexical(def))) { - in_use_ids[def.id] = true; - in_use.push(def); - } - return true; - } - } - return scan_ref_scoped(node, descend, true); - }); - tw.directives = Object.create(compressor.directives); - self.walk(tw); - var drop_fn_name = compressor.option("keep_fnames") ? return_false : compressor.option("ie8") ? function(def) { - return !compressor.exposed(def) && def.references.length == def.replaced; - } : function(def) { - if (!(def.id in in_use_ids)) return true; - if (def.orig.length - def.eliminated < 2) return false; - // function argument will always overshadow its name - if (def.orig[1] instanceof AST_SymbolFunarg) return true; - // retain if referenced within destructured object of argument - return all(def.references, function(ref) { - return !ref.in_arg; - }); - }; - if (compressor.option("ie8")) initializations.each(function(init, id) { - if (id in in_use_ids) return; - init.forEach(function(init) { - init.walk(new TreeWalker(function(node) { - if (node instanceof AST_Function && node.name && !drop_fn_name(node.name.definition())) { - node.walk(tw); - return true; - } - if (node instanceof AST_Scope) return true; - })); - }); - }); - // pass 2: for every used symbol we need to walk its - // initialization code to figure out if it uses other - // symbols (that may not be in_use). - tw = new TreeWalker(scan_ref_scoped); - for (var i = 0; i < in_use.length; i++) { - var init = initializations.get(in_use[i].id); - if (init) init.forEach(function(init) { - init.walk(tw); - }); - } - Object.keys(assign_in_use).forEach(function(id) { - var assigns = assign_in_use[id]; - if (!assigns) { - delete assign_in_use[id]; - return; - } - assigns = assigns.reduce(function(in_use, assigns) { - assigns.forEach(function(assign) { - push_uniq(in_use, assign); - }); - return in_use; - }, []); - var in_use = (assignments.get(id) || []).filter(function(node) { - return find_if(node instanceof AST_Unary ? function(assign) { - return assign === node; - } : function(assign) { - if (assign === node) return true; - if (assign instanceof AST_Unary) return false; - return get_rvalue(assign) === get_rvalue(node); - }, assigns); - }); - if (assigns.length == in_use.length) { - assign_in_use[id] = in_use; - } else { - delete assign_in_use[id]; - } - }); - // pass 3: we should drop declarations not in_use - var trim_defns = []; - var unused_fn_names = []; - var calls_to_drop_args = []; - var fns_with_marked_args = []; - var trimmer = new TreeTransformer(function(node) { - if (node instanceof AST_DefaultValue) return trim_default(trimmer, node); - if (node instanceof AST_Destructured && node.rest) node.rest = node.rest.transform(trimmer); - if (node instanceof AST_DestructuredArray) { - var trim = !node.rest; - for (var i = node.elements.length; --i >= 0;) { - var element = node.elements[i].transform(trimmer); - if (element) { - node.elements[i] = element; - trim = false; - } else if (trim) { - node.elements.pop(); - } else { - node.elements[i] = make_node(AST_Hole, node.elements[i]); - } - } - return node; - } - if (node instanceof AST_DestructuredObject) { - var properties = []; - node.properties.forEach(function(prop) { - var retain = false; - if (prop.key instanceof AST_Node) { - prop.key = prop.key.transform(tt); - retain = prop.key.has_side_effects(compressor); - } - if ((retain || node.rest) && is_decl(prop.value)) { - prop.value = prop.value.transform(tt); - properties.push(prop); - } else { - var value = prop.value.transform(trimmer); - if (!value && node.rest) { - if (prop.value instanceof AST_DestructuredArray) { - value = make_node(AST_DestructuredArray, prop.value, { elements: [] }); - } else { - value = make_node(AST_DestructuredObject, prop.value, { properties: [] }); - } - } - if (value) { - prop.value = value; - properties.push(prop); - } - } - }); - node.properties = properties; - return node; - } - if (node instanceof AST_SymbolDeclaration) return node.definition().id in in_use_ids ? node : null; - }); - var tt = new TreeTransformer(function(node, descend, in_list) { - var parent = tt.parent(); - if (drop_vars) { - var props = [], sym = assign_as_unused(node, props); - if (sym) { - var value; - if (can_drop_lhs(sym, node)) { - if (node instanceof AST_Assign) { - value = get_rhs(node); - if (node.write_only === true) value = value.drop_side_effect_free(compressor); - } - if (!value) value = make_node(AST_Number, node, { value: 0 }); - } - if (value) { - if (props.assign) { - var assign = props.assign.drop_side_effect_free(compressor); - if (assign) props.unshift(assign); - } - if (parent instanceof AST_Sequence && parent.tail_node() !== node) { - value = value.drop_side_effect_free(compressor); - } - if (value) props.push(value); - switch (props.length) { - case 0: - return List.skip; - case 1: - return maintain_this_binding(compressor, parent, node, props[0].transform(tt)); - default: - return make_sequence(node, props.map(function(prop) { - return prop.transform(tt); - })); - } - } - } else if (node instanceof AST_UnaryPostfix - && node.expression instanceof AST_SymbolRef - && indexOf_assign(node.expression.definition(), node) < 0) { - return make_node(AST_UnaryPrefix, node, { - operator: "+", - expression: node.expression - }); - } - } - if (node instanceof AST_Call) calls_to_drop_args.push(node); - if (scope !== self) return; - if (drop_funcs && node !== self && node instanceof AST_DefClass) { - var def = node.name.definition(); - if (!(def.id in in_use_ids)) { - log(node.name, "Dropping unused class {name}"); - def.eliminated++; - descend(node, tt); - if (parent instanceof AST_ExportDefault) return to_class_expr(node, true); - var trimmed = node.drop_side_effect_free(compressor, true); - if (trimmed === node) trimmed = to_class_expr(node, true); - if (trimmed) return make_node(AST_SimpleStatement, node, { body: trimmed }); - return in_list ? List.skip : make_node(AST_EmptyStatement, node); - } - } - if (node instanceof AST_ClassExpression && node.name && drop_fn_name(node.name.definition())) { - unused_fn_names.push(node); - } - if (node instanceof AST_Lambda) { - if (drop_funcs && node !== self && node instanceof AST_LambdaDefinition) { - var def = node.name.definition(); - if (!(def.id in in_use_ids)) { - log(node.name, "Dropping unused function {name}"); - def.eliminated++; - if (parent instanceof AST_ExportDefault) { - descend_scope(); - return to_func_expr(node, true); - } - return in_list ? List.skip : make_node(AST_EmptyStatement, node); - } - } - if (node instanceof AST_LambdaExpression && node.name && drop_fn_name(node.name.definition())) { - unused_fn_names.push(node); - } - if (!(node instanceof AST_Accessor)) { - if (node.rest) { - node.rest = node.rest.transform(trimmer); - if (!(node.uses_arguments && !tt.has_directive("use strict")) - && (node.rest instanceof AST_DestructuredArray && node.rest.elements.length == 0 - || node.rest instanceof AST_DestructuredObject && node.rest.properties.length == 0)) { - node.rest = null; - } - } - var argnames = node.argnames; - var trim = compressor.drop_fargs(node, parent) && !node.rest; - var default_length = trim ? -1 : node.length(); - for (var i = argnames.length; --i >= 0;) { - var sym = argnames[i]; - if (!(sym instanceof AST_SymbolFunarg)) { - var arg = sym.transform(trimmer); - if (arg) { - trim = false; - } else if (trim) { - log(sym.name, "Dropping unused default argument {name}"); - argnames.pop(); - } else if (i > default_length) { - log(sym.name, "Dropping unused default argument assignment {name}"); - sym.name.__unused = true; - argnames[i] = sym.name; - } else { - log(sym.name, "Dropping unused default argument value {name}"); - sym.value = make_node(AST_Number, sym, { value: 0 }); - } - continue; - } - var def = sym.definition(); - if (def.id in in_use_ids) { - trim = false; - if (indexOf_assign(def, sym) < 0) sym.__unused = null; - } else if (trim) { - log(sym, "Dropping unused function argument {name}"); - argnames.pop(); - } else { - sym.__unused = true; - } - } - fns_with_marked_args.push(node); - } - } - if (node instanceof AST_Catch && node.argname instanceof AST_Destructured) { - node.argname.transform(trimmer); - } - if (node instanceof AST_Definitions && !(parent instanceof AST_ForEnumeration && parent.init === node)) { - // place uninitialized names at the start - var body = [], head = [], tail = []; - // for unused names whose initialization has - // side effects, we can cascade the init. code - // into the next one, or next statement. - var side_effects = []; - var duplicated = 0; - var is_var = node instanceof AST_Var; - node.definitions.forEach(function(def) { - if (def.value) def.value = def.value.transform(tt); - var value = def.value; - if (def.name instanceof AST_Destructured) { - var name = trim_destructured(def.name, value, function(node) { - if (!drop_vars) return node; - if (node.definition().id in in_use_ids) return node; - if (is_catch(node)) return node; - if (is_var && !can_drop_symbol(node)) return node; - return null; - }); - if (name) { - flush(); - } else { - value = value.drop_side_effect_free(compressor); - if (value) side_effects.push(value); - } - return; - } - var sym = def.name.definition(); - var drop_sym = is_var ? can_drop_symbol(def.name) : is_safe_lexical(sym); - if (!drop_sym || !drop_vars || sym.id in in_use_ids) { - if (value && indexOf_assign(sym, def) < 0) { - value = value.drop_side_effect_free(compressor); - if (value) { - AST_Node.warn("Side effects in last use of variable {name} [{file}:{line},{col}]", template(def.name)); - side_effects.push(value); - } - value = null; - trim_defns.push(def); - } - var old_def; - if (!value && !(node instanceof AST_Let)) { - if (parent instanceof AST_ExportDeclaration) { - flush(); - } else if (drop_sym && var_defs[sym.id] > 1) { - AST_Node.info("Dropping declaration of variable {name} [{file}:{line},{col}]", template(def.name)); - var_defs[sym.id]--; - sym.eliminated++; - } else { - head.push(def); - } - } else if (compressor.option("functions") - && !compressor.option("ie8") - && node instanceof AST_Var - && var_defs[sym.id] == 1 - && sym.assignments == 0 - && value instanceof AST_LambdaExpression - && !is_arguments(sym) - && !is_arrow(value) - && assigned_once(value, sym.references) - && can_declare_defun(value) - && (old_def = rename_def(value, def.name.name)) !== false) { - AST_Node.warn("Declaring {name} as function [{file}:{line},{col}]", template(def.name)); - var ctor; - switch (value.CTOR) { - case AST_AsyncFunction: - ctor = AST_AsyncDefun; - break; - case AST_AsyncGeneratorFunction: - ctor = AST_AsyncGeneratorDefun; - break; - case AST_Function: - ctor = AST_Defun; - break; - case AST_GeneratorFunction: - ctor = AST_GeneratorDefun; - break; - } - var defun = make_node(ctor, def, value); - defun.name = make_node(AST_SymbolDefun, def.name, def.name); - var name_def = def.name.scope.resolve().def_function(defun.name); - if (old_def) old_def.forEach(function(node) { - node.name = name_def.name; - node.thedef = name_def; - node.reference(); - }); - body.push(defun); - } else { - if (drop_sym - && var_defs[sym.id] > 1 - && !(parent instanceof AST_ExportDeclaration) - && sym.orig.indexOf(def.name) > sym.eliminated) { - var_defs[sym.id]--; - duplicated++; - } - flush(); - } - } else if (is_catch(def.name)) { - value = value && value.drop_side_effect_free(compressor); - if (value) side_effects.push(value); - if (var_defs[sym.id] > 1) { - AST_Node.warn("Dropping duplicated declaration of variable {name} [{file}:{line},{col}]", template(def.name)); - var_defs[sym.id]--; - sym.eliminated++; - } else { - def.value = null; - head.push(def); - } - } else { - value = value && !value.single_use && value.drop_side_effect_free(compressor); - if (value) { - AST_Node.warn("Side effects in initialization of unused variable {name} [{file}:{line},{col}]", template(def.name)); - side_effects.push(value); - } else { - log(def.name, "Dropping unused variable {name}"); - } - sym.eliminated++; - } - - function assigned_once(fn, refs) { - if (refs.length == 0) return fn === def.name.fixed_value(); - return all(refs, function(ref) { - return fn === ref.fixed_value(); - }); - } - - function can_declare_defun(fn) { - if (compressor.has_directive("use strict") || !(fn instanceof AST_Function)) { - return parent instanceof AST_Scope; - } - return parent instanceof AST_Block - || parent instanceof AST_For && parent.init === node - || parent instanceof AST_If; - } - - function rename_def(fn, name) { - if (!fn.name) return null; - var def = fn.name.definition(); - if (def.orig.length > 1) return null; - if (def.assignments > 0) return false; - if (def.name == name) return def; - var forbidden; - switch (name) { - case "await": - forbidden = is_async; - break; - case "yield": - forbidden = is_generator; - break; - } - return all(def.references, function(ref) { - var scope = ref.scope; - if (scope.find_variable(name) !== sym) return false; - if (forbidden) do { - scope = scope.resolve(); - if (forbidden(scope)) return false; - } while (scope !== fn && (scope = scope.parent_scope)); - return true; - }) && def; - } - - function is_catch(node) { - var sym = node.definition(); - return sym.orig[0] instanceof AST_SymbolCatch && sym.scope.resolve() === node.scope.resolve(); - } - - function flush() { - if (side_effects.length > 0) { - if (tail.length == 0) { - body.push(make_node(AST_SimpleStatement, node, { - body: make_sequence(node, side_effects) - })); - } else if (value) { - side_effects.push(value); - def.value = make_sequence(value, side_effects); - } else { - def.value = make_node(AST_UnaryPrefix, def, { - operator: "void", - expression: make_sequence(def, side_effects) - }); - } - side_effects = []; - } - tail.push(def); - } - }); - switch (head.length) { - case 0: - if (tail.length == 0) break; - if (tail.length == duplicated) { - [].unshift.apply(side_effects, tail.map(function(def) { - AST_Node.warn("Dropping duplicated definition of variable {name} [{file}:{line},{col}]", template(def.name)); - var sym = def.name.definition(); - var ref = make_node(AST_SymbolRef, def.name, def.name); - sym.references.push(ref); - var assign = make_node(AST_Assign, def, { - operator: "=", - left: ref, - right: def.value - }); - var index = indexOf_assign(sym, def); - if (index >= 0) assign_in_use[sym.id][index] = assign; - sym.eliminated++; - return assign; - })); - break; - } - case 1: - if (tail.length == 0) { - var id = head[0].name.definition().id; - if (id in for_ins) { - node.definitions = head; - for_ins[id].init = node; - break; - } - } - default: - node.definitions = head.concat(tail); - body.push(node); - } - if (side_effects.length > 0) { - body.push(make_node(AST_SimpleStatement, node, { - body: make_sequence(node, side_effects) - })); - } - return insert_statements(body, node, in_list); - } - if (node instanceof AST_Assign) { - descend(node, tt); - if (node.left instanceof AST_Destructured) { - var lhs = trim_destructured(node.left, node.right, function(node) { - return node; - }); - if (!lhs) return node.right; - node.left = lhs; - } - return node; - } - if (node instanceof AST_LabeledStatement && node.body instanceof AST_For) { - // Certain combination of unused name + side effect leads to invalid AST: - // https://github.com/mishoo/UglifyJS/issues/1830 - // We fix it at this stage by moving the label inwards, back to the `for`. - descend(node, tt); - if (node.body instanceof AST_BlockStatement) { - var block = node.body; - node.body = block.body.pop(); - block.body.push(node); - return in_list ? List.splice(block.body) : block; - } - return node; - } - if (node instanceof AST_Scope) { - descend_scope(); - return node; - } - if (node instanceof AST_SymbolImport) { - if (!compressor.option("imports") || node.definition().id in in_use_ids) return node; - return in_list ? List.skip : null; - } - - function descend_scope() { - var save_scope = scope; - scope = node; - descend(node, tt); - scope = save_scope; - } - }, function(node, in_list) { - if (node instanceof AST_BlockStatement) return trim_block(node, tt.parent(), in_list); - // Certain combination of unused name + side effect leads to invalid AST: - // https://github.com/mishoo/UglifyJS/issues/44 - // https://github.com/mishoo/UglifyJS/issues/1838 - // https://github.com/mishoo/UglifyJS/issues/3371 - // We fix it at this stage by moving the `var` outside the `for`. - if (node instanceof AST_For) { - var block; - if (node.init instanceof AST_BlockStatement) { - block = node.init; - node.init = block.body.pop(); - block.body.push(node); - } - if (node.init instanceof AST_Defun) { - if (!block) { - block = make_node(AST_BlockStatement, node, { - body: [ node ] - }); - } - block.body.splice(-1, 0, node.init); - node.init = null; - } else if (node.init instanceof AST_SimpleStatement) { - node.init = node.init.body; - } else if (is_empty(node.init)) { - node.init = null; - } - return !block ? node : in_list ? List.splice(block.body) : block; - } - if (node instanceof AST_ForIn) { - if (!drop_vars || !compressor.option("loops")) return; - if (!is_empty(node.body)) return; - var sym = get_init_symbol(node); - if (!sym) return; - var def = sym.definition(); - if (def.id in in_use_ids) return; - log(sym, "Dropping unused loop variable {name}"); - if (for_ins[def.id] === node) delete for_ins[def.id]; - var body = []; - var value = node.object.drop_side_effect_free(compressor); - if (value) { - AST_Node.warn("Side effects in object of for-in loop [{file}:{line},{col}]", value.start); - body.push(make_node(AST_SimpleStatement, node, { - body: value - })); - } - if (node.init instanceof AST_Definitions && def.orig[0] instanceof AST_SymbolCatch) { - body.push(node.init); - } - return insert_statements(body, node, in_list); - } - if (node instanceof AST_Import) { - if (node.properties && node.properties.length == 0) node.properties = null; - return node; - } - if (node instanceof AST_Sequence) { - if (node.expressions.length > 1) return; - return maintain_this_binding(compressor, tt.parent(), node, node.expressions[0]); - } - }); - tt.push(compressor.parent()); - self.transform(tt); - if (self instanceof AST_Lambda - && self.body.length == 1 - && self.body[0] instanceof AST_Directive - && self.body[0].value == "use strict") { - self.body.length = 0; - } - trim_defns.forEach(function(def) { - def.value = null; - }); - unused_fn_names.forEach(function(fn) { - fn.name = null; - }); - calls_to_drop_args.forEach(function(call) { - drop_unused_call_args(call, compressor, fns_with_marked_args); - }); - - function log(sym, text) { - AST_Node[sym.definition().references.length > 0 ? "info" : "warn"](text + " [{file}:{line},{col}]", template(sym)); - } - - function template(sym) { - return { - name: sym.name, - file: sym.start.file, - line: sym.start.line, - col : sym.start.col, - }; - } - - function get_rvalue(expr) { - return expr[expr instanceof AST_Assign ? "right" : "value"]; - } - - function insert_statements(body, orig, in_list) { - switch (body.length) { - case 0: - return in_list ? List.skip : make_node(AST_EmptyStatement, orig); - case 1: - return body[0]; - default: - return in_list ? List.splice(body) : make_node(AST_BlockStatement, orig, { - body: body - }); - } - } - - function track_assigns(def, node) { - if (def.scope.resolve() !== self) return false; - if (!def.fixed || !node.fixed) assign_in_use[def.id] = false; - return assign_in_use[def.id] !== false; - } - - function add_assigns(def, node) { - if (!assign_in_use[def.id]) assign_in_use[def.id] = []; - if (node.fixed.assigns) push_uniq(assign_in_use[def.id], node.fixed.assigns); - } - - function indexOf_assign(def, node) { - var nodes = assign_in_use[def.id]; - return nodes && nodes.indexOf(node); - } - - function verify_safe_usage(def, read, modified) { - if (def.id in in_use_ids) return; - if (read && modified) { - in_use_ids[def.id] = read; - in_use.push(def); - } else { - value_read[def.id] = read; - value_modified[def.id] = modified; - } - } - - function can_drop_lhs(sym, node) { - var def = sym.definition(); - var in_use = in_use_ids[def.id]; - if (!in_use) return true; - if (node[node instanceof AST_Assign ? "left" : "expression"] !== sym) return false; - return in_use === sym && def.references.length - def.replaced == 1 || indexOf_assign(def, node) < 0; - } - - function get_rhs(assign) { - var rhs = assign.right; - if (!assign.write_only) return rhs; - if (!(rhs instanceof AST_Binary && lazy_op[rhs.operator])) return rhs; - if (!(rhs.left instanceof AST_SymbolRef)) return rhs; - if (!(assign.left instanceof AST_SymbolRef)) return rhs; - var def = assign.left.definition(); - if (rhs.left.definition() !== def) return rhs; - if (rhs.right.has_side_effects(compressor)) return rhs; - if (track_assigns(def, rhs.left)) add_assigns(def, rhs.left); - return rhs.right; - } - - function get_init_symbol(for_in) { - var init = for_in.init; - if (init instanceof AST_Definitions) { - init = init.definitions[0].name; - return init instanceof AST_SymbolDeclaration && init; - } - while (init instanceof AST_PropAccess) init = init.expression.tail_node(); - if (init instanceof AST_SymbolRef) return init; - } - - function scan_ref_scoped(node, descend, init) { - if (node instanceof AST_Assign && node.left instanceof AST_SymbolRef) { - var def = node.left.definition(); - if (def.scope.resolve() === self) assignments.add(def.id, node); - } - if (node instanceof AST_Unary && node.expression instanceof AST_SymbolRef) { - var def = node.expression.definition(); - if (def.scope.resolve() === self) assignments.add(def.id, node); - } - var node_def, props = [], sym = assign_as_unused(node, props); - if (sym && ((node_def = sym.definition()).scope.resolve() === self - || self.variables.get(sym.name) === node_def) - && !(is_arguments(node_def) && !all(self.argnames, function(argname) { - return !argname.match_symbol(function(node) { - if (node instanceof AST_SymbolFunarg) { - var def = node.definition(); - return def.references.length > def.replaced; - } - }, true); - }))) { - if (node.write_only === "p" && node.right.may_throw_on_access(compressor, true)) return; - var assign = props.assign; - if (assign) { - assign.write_only = true; - assign.walk(tw); - assign.write_only = "p"; - } - props.forEach(function(prop) { - prop.walk(tw); - }); - if (node instanceof AST_Assign) { - var right = get_rhs(node), shared = false; - if (init && node.write_only === true && !right.has_side_effects(compressor)) { - initializations.add(node_def.id, right); - } else { - right.walk(tw); - shared = right.tail_node().operator == "="; - } - if (node.left === sym) { - if (!node.write_only || shared) { - verify_safe_usage(node_def, sym, value_modified[node_def.id]); - } - } else { - var fixed = sym.fixed_value(); - if (!fixed || !fixed.is_constant()) { - verify_safe_usage(node_def, value_read[node_def.id], true); - } - } - } - if (track_assigns(node_def, sym) && is_lhs(sym, node) !== sym) add_assigns(node_def, sym); - return true; - } - if (node instanceof AST_ForIn) { - if (node.init instanceof AST_SymbolRef && scope === self) { - var id = node.init.definition().id; - if (!(id in for_ins)) for_ins[id] = node; - } - if (!drop_vars || !compressor.option("loops")) return; - if (!is_empty(node.body)) return; - if (node.init.has_side_effects(compressor)) return; - var sym = get_init_symbol(node); - if (!sym) return; - var def = sym.definition(); - if (def.scope.resolve() !== self) { - var d = find_variable(sym.name); - if (d === def || d && d.redefined() === def) return; - } - node.object.walk(tw); - return true; - } - if (node instanceof AST_SymbolRef) { - node_def = node.definition(); - if (!(node_def.id in in_use_ids)) { - in_use_ids[node_def.id] = true; - in_use.push(node_def); - } - if (cross_scope(node_def.scope, node.scope)) { - var redef = node_def.redefined(); - if (redef && !(redef.id in in_use_ids)) { - in_use_ids[redef.id] = true; - in_use.push(redef); - } - } - if (track_assigns(node_def, node)) add_assigns(node_def, node); - return true; - } - if (node instanceof AST_Scope) { - var save_scope = scope; - scope = node; - descend(); - scope = save_scope; - return true; - } - } - - function is_decl(node) { - return (node instanceof AST_DefaultValue ? node.name : node) instanceof AST_SymbolDeclaration; - } - - function trim_default(trimmer, node) { - node.value = node.value.transform(tt); - var name = node.name.transform(trimmer); - if (!name) { - if (node.name instanceof AST_Destructured) return null; - var value = node.value.drop_side_effect_free(compressor); - if (!value) return null; - log(node.name, "Side effects in default value of unused variable {name}"); - node.value = value; - } - return node; - } - - function trim_destructured(node, value, process) { - var trimmer = new TreeTransformer(function(node) { - if (node instanceof AST_DefaultValue) { - if (compressor.option("default_values") && value && value.is_defined(compressor)) { - node = node.name; - } else { - return trim_default(trimmer, node); - } - } - if (node instanceof AST_DestructuredArray) { - var save = value; - if (value instanceof AST_SymbolRef) value = value.fixed_value(); - var values = value instanceof AST_Array && value.elements; - var elements = []; - node.elements.forEach(function(element, index) { - value = values && values[index]; - if (value instanceof AST_Spread) value = values = null; - if (element instanceof AST_Hole) return; - element = element.transform(trimmer); - if (element) elements[index] = element; - }); - if (node.rest) { - if (compressor.option("rests")) { - value = values && make_node(AST_Array, save, { - elements: values.slice(node.elements.length), - }); - node.rest = node.rest.transform(trimmer); - } else { - node.rest = node.rest.transform(tt); - } - } - value = save; - if (node.rest) { - elements.length = node.elements.length; - } else if (values && elements.length == 0) { - return null; - } - fill_holes(node, elements); - node.elements = elements; - return node; - } - if (node instanceof AST_DestructuredObject) { - var save = value; - if (value instanceof AST_SymbolRef) value = value.fixed_value(); - var values; - if (value instanceof AST_Object) { - values = Object.create(null); - for (var i = 0; i < value.properties.length; i++) { - var prop = value.properties[i]; - if (typeof prop.key != "string") { - values = null; - break; - } - values[prop.key] = prop.value; - } - } - var properties = []; - node.properties.forEach(function(prop) { - var retain; - if (prop.key instanceof AST_Node) { - prop.key = prop.key.transform(tt); - value = null; - retain = prop.key.has_side_effects(compressor); - } else { - value = values && values[prop.key]; - retain = false; - } - if ((retain || node.rest) && is_decl(prop.value)) { - prop.value = prop.value.transform(tt); - properties.push(prop); - } else { - var newValue = prop.value.transform(trimmer); - if (!newValue && node.rest) { - if (prop.value instanceof AST_DestructuredArray) { - newValue = make_node(AST_DestructuredArray, prop.value, { elements: [] }); - } else { - newValue = make_node(AST_DestructuredObject, prop.value, { properties: [] }); - } - } - if (newValue) { - prop.value = newValue; - properties.push(prop); - } - } - }); - if (node.rest) { - if (compressor.option("rests")) { - value = values && make_node(AST_Object, save, { - properties: [], - }); - node.rest = node.rest.transform(trimmer); - } else { - node.rest = node.rest.transform(tt); - } - } - value = save; - if (properties.length == 0 && !node.rest && value && !value.may_throw_on_access(compressor)) { - return null; - } - node.properties = properties; - return node; - } - return process(node); - }); - return node.transform(trimmer); - } - }); - - AST_Scope.DEFMETHOD("hoist_declarations", function(compressor) { - if (compressor.has_directive("use asm")) return; - var hoist_funs = compressor.option("hoist_funs"); - var hoist_vars = compressor.option("hoist_vars"); - var self = this; - if (hoist_vars) { - // let's count var_decl first, we seem to waste a lot of - // space if we hoist `var` when there's only one. - var var_decl = 0; - self.walk(new TreeWalker(function(node) { - if (var_decl > 1) return true; - if (node instanceof AST_ExportDeclaration) return true; - if (node instanceof AST_Scope && node !== self) return true; - if (node instanceof AST_Var) { - var_decl++; - return true; - } - })); - if (var_decl <= 1) hoist_vars = false; - } - if (!hoist_funs && !hoist_vars) return; - var consts = Object.create(null); - var dirs = []; - var hoisted = []; - var vars = new Dictionary(), vars_found = 0; - var tt = new TreeTransformer(function(node, descend, in_list) { - if (node === self) return; - if (node instanceof AST_Directive) { - dirs.push(node); - return in_list ? List.skip : make_node(AST_EmptyStatement, node); - } - if (node instanceof AST_LambdaDefinition) { - if (!hoist_funs) return node; - var p = tt.parent(); - if (p instanceof AST_ExportDeclaration) return node; - if (p instanceof AST_ExportDefault) return node; - if (p !== self && compressor.has_directive("use strict")) return node; - hoisted.push(node); - return in_list ? List.skip : make_node(AST_EmptyStatement, node); - } - if (node instanceof AST_Var) { - if (!hoist_vars) return node; - var p = tt.parent(); - if (p instanceof AST_ExportDeclaration) return node; - if (!all(node.definitions, function(defn) { - var sym = defn.name; - return sym instanceof AST_SymbolVar - && !consts[sym.name] - && self.find_variable(sym.name) === sym.definition(); - })) return node; - node.definitions.forEach(function(def) { - vars.set(def.name.name, def); - ++vars_found; - }); - var seq = node.to_assignments(); - if (p instanceof AST_ForEnumeration && p.init === node) { - if (seq) return seq; - var def = node.definitions[0].name; - return make_node(AST_SymbolRef, def, def); - } - if (p instanceof AST_For && p.init === node) return seq; - if (!seq) return in_list ? List.skip : make_node(AST_EmptyStatement, node); - return make_node(AST_SimpleStatement, node, { body: seq }); - } - if (node instanceof AST_Scope) return node; - if (node instanceof AST_SymbolConst) { - consts[node.name] = true; - return node; - } - }); - self.transform(tt); - if (vars_found > 0) { - // collect only vars which don't show up in self's arguments list - var defs = []; - if (self instanceof AST_Lambda) self.each_argname(function(argname) { - vars.del(argname.name); - }); - vars.each(function(def, name) { - def = def.clone(); - def.value = null; - defs.push(def); - vars.set(name, def); - }); - if (defs.length > 0) { - // try to merge in assignments - insert_vars(self.body); - defs = make_node(AST_Var, self, { definitions: defs }); - hoisted.push(defs); - } - } - self.body = dirs.concat(hoisted, self.body); - - function insert_vars(body) { - while (body.length) { - var stat = body[0]; - if (stat instanceof AST_SimpleStatement) { - var expr = stat.body, sym, assign; - if (expr instanceof AST_Assign - && expr.operator == "=" - && (sym = expr.left) instanceof AST_Symbol - && vars.has(sym.name)) { - var def = vars.get(sym.name); - if (def.value) break; - var value = expr.right; - if (value instanceof AST_Sequence) value = value.clone(); - def.value = value; - remove(defs, def); - defs.push(def); - body.shift(); - continue; - } - if (expr instanceof AST_Sequence - && (assign = expr.expressions[0]) instanceof AST_Assign - && assign.operator == "=" - && (sym = assign.left) instanceof AST_Symbol - && vars.has(sym.name)) { - var def = vars.get(sym.name); - if (def.value) break; - def.value = assign.right; - remove(defs, def); - defs.push(def); - stat.body = make_sequence(expr, expr.expressions.slice(1)); - continue; - } - } - if (stat instanceof AST_EmptyStatement) { - body.shift(); - continue; - } - if (stat instanceof AST_BlockStatement && !insert_vars(stat.body)) { - body.shift(); - continue; - } - break; - } - return body.length; - } - }); - - function scan_local_returns(fn, transform) { - fn.walk(new TreeWalker(function(node) { - if (node instanceof AST_Return) { - transform(node); - return true; - } - if (node instanceof AST_Scope && node !== fn) return true; - })); - } - - function map_bool_returns(fn) { - var map = Object.create(null); - scan_local_returns(fn, function(node) { - var value = node.value; - if (value) value = value.tail_node(); - if (value instanceof AST_SymbolRef) { - var id = value.definition().id; - map[id] = (map[id] || 0) + 1; - } - }); - return map; - } - - function all_bool(def, bool_returns, compressor) { - return def.bool_fn + (bool_returns[def.id] || 0) === def.references.length - def.replaced - && !compressor.exposed(def); - } - - function process_boolean_returns(fn, compressor) { - scan_local_returns(fn, function(node) { - node.in_bool = true; - var value = node.value; - if (value) { - var ev = value.is_truthy() || value.evaluate(compressor, true); - if (!ev) { - value = value.drop_side_effect_free(compressor); - node.value = value ? make_sequence(node.value, [ - value, - make_node(AST_Number, node.value, { value: 0 }), - ]) : null; - } else if (!(ev instanceof AST_Node)) { - value = value.drop_side_effect_free(compressor); - node.value = value ? make_sequence(node.value, [ - value, - make_node(AST_Number, node.value, { value: 1 }), - ]) : make_node(AST_Number, node.value, { value: 1 }); - } - } - }); - } - - AST_Scope.DEFMETHOD("process_boolean_returns", noop); - AST_Defun.DEFMETHOD("process_boolean_returns", function(compressor) { - if (!compressor.option("booleans")) return; - var bool_returns = map_bool_returns(this); - if (!all_bool(this.name.definition(), bool_returns, compressor)) return; - if (compressor.parent() instanceof AST_ExportDefault) return; - process_boolean_returns(this, compressor); - }); - AST_Function.DEFMETHOD("process_boolean_returns", function(compressor) { - if (!compressor.option("booleans")) return; - var bool_returns = map_bool_returns(this); - if (this.name && !all_bool(this.name.definition(), bool_returns, compressor)) return; - var parent = compressor.parent(); - if (parent instanceof AST_Assign) { - if (parent.operator != "=") return; - var sym = parent.left; - if (!(sym instanceof AST_SymbolRef)) return; - if (!all_bool(sym.definition(), bool_returns, compressor)) return; - } else if (parent instanceof AST_Call && parent.expression !== this) { - var exp = parent.expression; - if (exp instanceof AST_SymbolRef) exp = exp.fixed_value(); - if (!(exp instanceof AST_Lambda)) return; - if (exp.uses_arguments || exp.pinned()) return; - var sym = exp.argnames[parent.args.indexOf(this)]; - if (sym instanceof AST_DefaultValue) sym = sym.name; - if (sym instanceof AST_SymbolFunarg && !all_bool(sym.definition(), bool_returns, compressor)) return; - } else if (parent.TYPE == "Call") { - compressor.pop(); - var in_bool = compressor.in_boolean_context(); - compressor.push(this); - if (!in_bool) return; - } else return; - process_boolean_returns(this, compressor); - }); - - AST_BlockScope.DEFMETHOD("var_names", function() { - var var_names = this._var_names; - if (!var_names) { - this._var_names = var_names = Object.create(null); - this.enclosed.forEach(function(def) { - var_names[def.name] = true; - }); - this.variables.each(function(def, name) { - var_names[name] = true; - }); - } - return var_names; - }); - - AST_Scope.DEFMETHOD("make_var", function(type, orig, prefix) { - var scopes = [ this ]; - if (orig instanceof AST_SymbolDeclaration) orig.definition().references.forEach(function(ref) { - var s = ref.scope; - if (member(s, scopes)) return; - do { - push_uniq(scopes, s); - s = s.parent_scope; - } while (s && s !== this); - }); - prefix = prefix.replace(/(?:^[^a-z_$]|[^a-z0-9_$])/ig, "_"); - var name = prefix; - for (var i = 0; !all(scopes, function(scope) { - return !scope.var_names()[name]; - }); i++) name = prefix + "$" + i; - var sym = make_node(type, orig, { - name: name, - scope: this, - }); - var def = this.def_variable(sym); - scopes.forEach(function(scope) { - scope.enclosed.push(def); - scope.var_names()[name] = true; - }); - return sym; - }); - - AST_Scope.DEFMETHOD("hoist_properties", function(compressor) { - if (!compressor.option("hoist_props") || compressor.has_directive("use asm")) return; - var self = this; - var top_retain = self instanceof AST_Toplevel && compressor.top_retain || return_false; - var defs_by_id = Object.create(null); - self.transform(new TreeTransformer(function(node, descend) { - if (node instanceof AST_Assign) { - if (node.operator != "=") return; - if (!node.write_only) return; - if (!can_hoist(node.left, node.right, 1)) return; - descend(node, this); - var defs = new Dictionary(); - var assignments = []; - var decls = []; - node.right.properties.forEach(function(prop) { - var decl = make_sym(AST_SymbolVar, node.left, prop.key); - decls.push(make_node(AST_VarDef, node, { - name: decl, - value: null, - })); - var sym = make_node(AST_SymbolRef, node, { - name: decl.name, - scope: self, - thedef: decl.definition(), - }); - sym.reference(); - assignments.push(make_node(AST_Assign, node, { - operator: "=", - left: sym, - right: prop.value, - })); - }); - defs_by_id[node.left.definition().id] = defs; - self.body.splice(self.body.indexOf(this.stack[1]) + 1, 0, make_node(AST_Var, node, { - definitions: decls, - })); - return make_sequence(node, assignments); - } - if (node instanceof AST_Scope) return node === self ? undefined : node; - if (node instanceof AST_VarDef) { - if (!can_hoist(node.name, node.value, 0)) return; - descend(node, this); - var defs = new Dictionary(); - var var_defs = []; - node.value.properties.forEach(function(prop) { - var_defs.push(make_node(AST_VarDef, node, { - name: make_sym(node.name.CTOR, node.name, prop.key), - value: prop.value, - })); - }); - defs_by_id[node.name.definition().id] = defs; - return List.splice(var_defs); - } - - function make_sym(type, sym, key) { - var new_var = self.make_var(type, sym, sym.name + "_" + key); - defs.set(key, new_var.definition()); - return new_var; - } - })); - self.transform(new TreeTransformer(function(node, descend) { - if (node instanceof AST_Binary) return replace("right"); - if (node instanceof AST_PropAccess) { - if (!(node.expression instanceof AST_SymbolRef)) return; - var defs = defs_by_id[node.expression.definition().id]; - if (!defs) return; - var def = defs.get(node.getProperty()); - var sym = make_node(AST_SymbolRef, node, { - name: def.name, - scope: node.expression.scope, - thedef: def, - }); - sym.reference(); - return sym; - } - if (node instanceof AST_Unary) { - if (unary_side_effects[node.operator]) return; - return replace("expression"); - } - - function replace(prop) { - var sym = node[prop]; - if (!(sym instanceof AST_SymbolRef)) return; - if (!(sym.definition().id in defs_by_id)) return; - var opt = node.clone(); - opt[prop] = make_node(AST_Object, sym, { properties: [] }); - return opt; - } - })); - - function can_hoist(sym, right, count) { - if (!(sym instanceof AST_Symbol)) return; - var def = sym.definition(); - if (def.assignments != count) return; - if (def.direct_access) return; - if (def.escaped.depth == 1) return; - if (def.references.length - def.replaced == count) return; - if (def.single_use) return; - if (top_retain(def)) return; - if (sym.fixed_value() !== right) return; - return right instanceof AST_Object - && right.properties.length > 0 - && all(right.properties, can_hoist_property) - && all(def.references, function(ref) { - return ref.fixed_value() === right; - }) - && can_drop_symbol(sym, compressor); - } - }); - - function fn_name_unused(fn, compressor) { - if (!fn.name || !compressor.option("ie8")) return true; - var def = fn.name.definition(); - if (compressor.exposed(def)) return false; - return all(def.references, function(sym) { - return !(sym instanceof AST_SymbolRef); - }); - } - - // drop_side_effect_free() - // remove side-effect-free parts which only affects return value - (function(def) { - // Drop side-effect-free elements from an array of expressions. - // Returns an array of expressions with side-effects or null - // if all elements were dropped. Note: original array may be - // returned if nothing changed. - function trim(nodes, compressor, first_in_statement, spread) { - var len = nodes.length; - var ret = [], changed = false; - for (var i = 0; i < len; i++) { - var node = nodes[i]; - var trimmed; - if (spread && node instanceof AST_Spread) { - trimmed = spread(node, compressor, first_in_statement); - } else { - trimmed = node.drop_side_effect_free(compressor, first_in_statement); - } - if (trimmed !== node) changed = true; - if (trimmed) { - ret.push(trimmed); - first_in_statement = false; - } - } - return ret.length ? changed ? ret : nodes : null; - } - function array_spread(node, compressor, first_in_statement) { - var exp = node.expression; - if (!exp.is_string(compressor)) return node; - return exp.drop_side_effect_free(compressor, first_in_statement); - } - function convert_spread(node) { - return node instanceof AST_Spread ? make_node(AST_Array, node, { - elements: [ node ] - }) : node; - } - def(AST_Node, return_this); - def(AST_Accessor, return_null); - def(AST_Array, function(compressor, first_in_statement) { - var values = trim(this.elements, compressor, first_in_statement, array_spread); - if (!values) return null; - if (values === this.elements && all(values, function(node) { - return node instanceof AST_Spread; - })) return this; - return make_sequence(this, values.map(convert_spread)); - }); - def(AST_Assign, function(compressor) { - var left = this.left; - if (left instanceof AST_PropAccess) { - var expr = left.expression; - if (expr.may_throw_on_access(compressor, true)) return this; - if (compressor.has_directive("use strict") && expr.is_constant()) return this; - } - if (left.has_side_effects(compressor)) return this; - var right = this.right; - if (!lazy_op[this.operator.slice(0, -1)]) { - this.write_only = true; - if (root_expr(left).is_constant_expression(compressor.find_parent(AST_Scope))) { - return right.drop_side_effect_free(compressor); - } - } - return this; - }); - def(AST_Await, function(compressor) { - if (!compressor.option("awaits")) return this; - var exp = this.expression; - if (!is_primitive(compressor, exp)) return this; - var node = this.clone(); - node.expression = exp.drop_side_effect_free(compressor) || make_node(AST_Number, this, { value: 0 }); - return node; - }); - def(AST_Binary, function(compressor, first_in_statement) { - var left = this.left; - var right = this.right; - var op = this.operator; - if (op == "in" && !is_object(right)) { - var lhs = left.drop_side_effect_free(compressor, first_in_statement); - if (lhs === left) return this; - var node = this.clone(); - node.left = lhs || make_node(AST_Number, left, { value: 0 }); - return node; - } - var rhs = right.drop_side_effect_free(compressor, first_in_statement); - if (!rhs) return left.drop_side_effect_free(compressor, first_in_statement); - if (lazy_op[op] && rhs.has_side_effects(compressor)) { - var node = this; - if (rhs !== right) { - node = node.clone(); - node.right = rhs.drop_side_effect_free(compressor); - } - if (op == "??") return node; - var negated = make_node(AST_Binary, this, { - operator: op == "&&" ? "||" : "&&", - left: left.negate(compressor, first_in_statement), - right: node.right, - }); - return first_in_statement ? best_of_statement(node, negated) : best_of_expression(node, negated); - } - var lhs = left.drop_side_effect_free(compressor, first_in_statement); - if (!lhs) return rhs; - rhs = rhs.drop_side_effect_free(compressor); - if (!rhs) return lhs; - return make_sequence(this, [ lhs, rhs ]); - }); - function drop_returns(compressor, exp) { - var arrow = is_arrow(exp); - var async = is_async(exp); - var drop_body = false; - if (arrow && compressor.option("arrows")) { - if (!exp.value) { - drop_body = true; - } else if (!async || is_primitive(compressor, exp.value)) { - exp.value = exp.value.drop_side_effect_free(compressor); - } - } else if (exp instanceof AST_AsyncFunction || exp instanceof AST_Function) { - if (exp.name) { - var def = exp.name.definition(); - drop_body = def.references.length == def.replaced; - } else { - drop_body = true; - } - } - if (drop_body) { - exp.process_expression(false, function(node) { - var value = node.value; - if (value) { - if (async && !is_primitive(compressor, value)) return node; - value = value.drop_side_effect_free(compressor, true); - } - if (!value) return make_node(AST_EmptyStatement, node); - return make_node(AST_SimpleStatement, node, { body: value }); - }); - scan_local_returns(exp, function(node) { - var value = node.value; - if (value) { - if (async && !is_primitive(compressor, value)) return; - node.value = value.drop_side_effect_free(compressor); - } - }); - } - if (async && compressor.option("awaits")) { - if (drop_body) exp.process_expression("awaits", function(node) { - var body = node.body; - if (body instanceof AST_Await) { - if (is_primitive(compressor, body.expression)) { - body = body.expression.drop_side_effect_free(compressor, true); - if (!body) return make_node(AST_EmptyStatement, node); - node.body = body; - } - } else if (body instanceof AST_Sequence) { - var exprs = body.expressions; - for (var i = exprs.length; --i >= 0;) { - var tail = exprs[i]; - if (!(tail instanceof AST_Await)) break; - if (!is_primitive(compressor, tail.expression)) break; - if (exprs[i] = tail.expression.drop_side_effect_free(compressor)) break; - } - switch (i) { - case -1: - return make_node(AST_EmptyStatement, node); - case 0: - node.body = exprs[0]; - break; - default: - exprs.length = i + 1; - break; - } - } - return node; - }); - var abort = !drop_body && exp.name || arrow && exp.value && !is_primitive(compressor, exp.value); - var tw = new TreeWalker(function(node) { - if (abort) return true; - if (tw.parent() === exp && node.may_throw(compressor)) return abort = true; - if (node instanceof AST_Await) return abort = true; - if (node instanceof AST_Return) { - if (node.value && !is_primitive(compressor, node.value)) return abort = true; - return; - } - if (node instanceof AST_Scope && node !== exp) return true; - }); - exp.walk(tw); - if (!abort) { - var ctor; - switch (exp.CTOR) { - case AST_AsyncArrow: - ctor = AST_Arrow; - break; - case AST_AsyncFunction: - ctor = AST_Function; - break; - case AST_AsyncGeneratorFunction: - ctor = AST_GeneratorFunction; - break; - } - return make_node(ctor, exp, exp); - } - } - return drop_body && exp.clone(); - } - def(AST_Call, function(compressor, first_in_statement) { - var self = this; - if (self.is_expr_pure(compressor)) { - if (self.pure) AST_Node.warn("Dropping __PURE__ call [{file}:{line},{col}]", self.start); - var args = trim(self.args, compressor, first_in_statement, array_spread); - return args && make_sequence(self, args.map(convert_spread)); - } - var exp = self.expression; - if (self.is_call_pure(compressor)) { - var exprs = self.args.slice(); - exprs.unshift(exp.expression); - exprs = trim(exprs, compressor, first_in_statement, array_spread); - return exprs && make_sequence(self, exprs.map(convert_spread)); - } - if (compressor.option("yields") && is_generator(exp)) { - var call = self.clone(); - call.expression = make_node(AST_Function, exp, exp); - call.expression.body = []; - var opt = call.transform(compressor); - if (opt !== call) return opt.drop_side_effect_free(compressor, first_in_statement); - } - var dropped = drop_returns(compressor, exp); - if (dropped) { - // always shallow clone to ensure stripping of negated IIFEs - self = self.clone(); - self.expression = dropped; - // avoid extraneous traversal - if (exp._squeezed) self.expression._squeezed = true; - } - if (self instanceof AST_New) { - var fn = exp; - if (fn instanceof AST_SymbolRef) fn = fn.fixed_value(); - if (fn instanceof AST_Lambda) { - fn.new = true; - var assign_this_only = all(fn.body, function(stat) { - return !stat.has_side_effects(compressor); - }); - delete fn.new; - if (assign_this_only) { - var exprs = self.args.slice(); - exprs.unshift(exp); - exprs = trim(exprs, compressor, first_in_statement, array_spread); - return exprs && make_sequence(self, exprs.map(convert_spread)); - } - if (!fn.contains_this()) return make_node(AST_Call, self, self); - } - } - return self; - }); - function drop_class(self, compressor, first_in_statement) { - var exprs = [], values = []; - var props = self.properties; - for (var i = 0; i < props.length; i++) { - var prop = props[i]; - if (prop.key instanceof AST_Node) exprs.push(prop.key); - if (prop.static && prop.value - && prop instanceof AST_ClassField - && prop.value.has_side_effects(compressor)) { - if (prop.value.contains_this()) return self; - values.push(prop.value); - } - } - var base = self.extends; - if (base) { - if (base instanceof AST_SymbolRef) base = base.fixed_value(); - base = !safe_for_extends(base); - if (!base) exprs.unshift(self.extends); - } - exprs = trim(exprs, compressor, first_in_statement); - if (exprs) first_in_statement = false; - values = trim(values, compressor, first_in_statement); - if (!exprs) { - if (!base && !values) return null; - exprs = []; - } - if (base) { - var node = to_class_expr(self, true); - node.properties = []; - if (exprs.length) node.properties.push(make_node(AST_ClassMethod, self, { - key: make_sequence(self, exprs), - value: make_node(AST_Function, self, { - argnames: [], - body: [], - }).init_vars(node), - })); - exprs = [ node ]; - } - if (values) exprs.push(make_node(AST_Call, self, { - expression: make_node(AST_Arrow, self, { - argnames: [], - body: [], - value: make_sequence(self, values), - }).init_vars(self.parent_scope), - args: [], - })); - return make_sequence(self, exprs); - } - def(AST_ClassExpression, function(compressor, first_in_statement) { - var self = this; - var name = self.name; - if (name && name.fixed_value() !== self && name.definition().references.length > 0) return self; - return drop_class(self, compressor, first_in_statement); - }); - def(AST_Conditional, function(compressor) { - var consequent = this.consequent.drop_side_effect_free(compressor); - var alternative = this.alternative.drop_side_effect_free(compressor); - if (consequent === this.consequent && alternative === this.alternative) return this; - var exprs; - if (compressor.option("ie8")) { - exprs = []; - if (consequent instanceof AST_Function) { - exprs.push(consequent); - consequent = null; - } - if (alternative instanceof AST_Function) { - exprs.push(alternative); - alternative = null; - } - } - var node; - if (!consequent) { - node = alternative ? make_node(AST_Binary, this, { - operator: "||", - left: this.condition, - right: alternative - }) : this.condition.drop_side_effect_free(compressor); - } else if (!alternative) { - node = make_node(AST_Binary, this, { - operator: "&&", - left: this.condition, - right: consequent - }); - } else { - node = this.clone(); - node.consequent = consequent; - node.alternative = alternative; - } - if (!compressor.option("ie8")) return node; - if (node) exprs.push(node); - return exprs.length == 0 ? null : make_sequence(this, exprs); - }); - def(AST_Constant, return_null); - def(AST_DefClass, function(compressor, first_in_statement) { - return drop_class(this, compressor, first_in_statement); - }); - def(AST_Dot, function(compressor, first_in_statement) { - var expr = this.expression; - if (!this.optional && expr.may_throw_on_access(compressor)) return this; - return expr.drop_side_effect_free(compressor, first_in_statement); - }); - def(AST_Function, function(compressor) { - return fn_name_unused(this, compressor) ? null : this; - }); - def(AST_LambdaExpression, return_null); - def(AST_Object, function(compressor, first_in_statement) { - var exprs = []; - this.properties.forEach(function(prop) { - if (prop instanceof AST_Spread) { - exprs.push(prop); - } else { - if (prop.key instanceof AST_Node) exprs.push(prop.key); - exprs.push(prop.value); - } - }); - var values = trim(exprs, compressor, first_in_statement, function(node, compressor, first_in_statement) { - var exp = node.expression; - return spread_side_effects(exp) ? node : exp.drop_side_effect_free(compressor, first_in_statement); - }); - if (!values) return null; - if (values === exprs && !all(values, function(node) { - return !(node instanceof AST_Spread); - })) return this; - return make_sequence(this, values.map(function(node) { - return node instanceof AST_Spread ? make_node(AST_Object, node, { - properties: [ node ], - }) : node; - })); - }); - def(AST_ObjectIdentity, return_null); - def(AST_Sequence, function(compressor, first_in_statement) { - var expressions = trim(this.expressions, compressor, first_in_statement); - if (!expressions) return null; - var end = expressions.length - 1; - var last = expressions[end]; - if (compressor.option("awaits") && end > 0 && last instanceof AST_Await && last.expression.is_constant()) { - expressions = expressions.slice(0, -1); - end--; - last.expression = expressions[end]; - expressions[end] = last; - } - var assign, cond, lhs; - if (compressor.option("conditionals") - && end > 0 - && (assign = expressions[end - 1]) instanceof AST_Assign - && assign.operator == "=" - && (lhs = assign.left) instanceof AST_SymbolRef - && (cond = to_conditional_assignment(compressor, lhs.definition(), assign.right, last))) { - assign = assign.clone(); - assign.right = cond; - expressions = expressions.slice(0, -2); - expressions.push(assign.drop_side_effect_free(compressor, first_in_statement)); - } - return expressions === this.expressions ? this : make_sequence(this, expressions); - }); - def(AST_Sub, function(compressor, first_in_statement) { - var expr = this.expression; - var prop = this.property; - if (expr.may_throw_on_access(compressor)) { - if (!this.optional) return this; - prop = prop.drop_side_effect_free(compressor); - if (!prop) return expr.drop_side_effect_free(compressor, first_in_statement); - var node = this.clone(); - node.property = prop; - return node; - } - expr = expr.drop_side_effect_free(compressor, first_in_statement); - if (!expr) return prop.drop_side_effect_free(compressor, first_in_statement); - prop = prop.drop_side_effect_free(compressor); - if (!prop) return expr; - return make_sequence(this, [ expr, prop ]); - }); - def(AST_SymbolRef, function(compressor) { - return this.is_declared(compressor) && can_drop_symbol(this, compressor) ? null : this; - }); - def(AST_Template, function(compressor, first_in_statement) { - var self = this; - if (self.is_expr_pure(compressor)) { - var expressions = self.expressions; - if (expressions.length == 0) return null; - return make_sequence(self, expressions).drop_side_effect_free(compressor, first_in_statement); - } - var tag = self.tag; - var dropped = drop_returns(compressor, tag); - if (dropped) { - // always shallow clone to signal internal changes - self = self.clone(); - self.tag = dropped; - // avoid extraneous traversal - if (tag._squeezed) self.tag._squeezed = true; - } - return self; - }); - def(AST_Unary, function(compressor, first_in_statement) { - var exp = this.expression; - if (unary_side_effects[this.operator]) { - this.write_only = !exp.has_side_effects(compressor); - return this; - } - if (this.operator == "typeof" && exp instanceof AST_SymbolRef && can_drop_symbol(exp, compressor)) { - return null; - } - var node = exp.drop_side_effect_free(compressor, first_in_statement); - if (first_in_statement && node && is_iife_call(node)) { - if (node === exp && this.operator == "!") return this; - return node.negate(compressor, first_in_statement); - } - return node; - }); - })(function(node, func) { - node.DEFMETHOD("drop_side_effect_free", func); - }); - - OPT(AST_SimpleStatement, function(self, compressor) { - if (compressor.option("side_effects")) { - var body = self.body; - var node = body.drop_side_effect_free(compressor, true); - if (!node) { - AST_Node.warn("Dropping side-effect-free statement [{file}:{line},{col}]", self.start); - return make_node(AST_EmptyStatement, self); - } - if (node !== body) { - return make_node(AST_SimpleStatement, self, { body: node }); - } - } - return self; - }); - - OPT(AST_While, function(self, compressor) { - return compressor.option("loops") ? make_node(AST_For, self, self).optimize(compressor) : self; - }); - - function has_loop_control(loop, parent, type) { - if (!type) type = AST_LoopControl; - var found = false; - var tw = new TreeWalker(function(node) { - if (found || node instanceof AST_Scope) return true; - if (node instanceof type && tw.loopcontrol_target(node) === loop) { - return found = true; - } - }); - if (parent instanceof AST_LabeledStatement) tw.push(parent); - tw.push(loop); - loop.body.walk(tw); - return found; - } - - OPT(AST_Do, function(self, compressor) { - if (!compressor.option("loops")) return self; - var cond = self.condition.is_truthy() || self.condition.evaluate(compressor, true); - if (!(cond instanceof AST_Node)) { - if (cond && !has_loop_control(self, compressor.parent(), AST_Continue)) return make_node(AST_For, self, { - body: make_node(AST_BlockStatement, self.body, { - body: [ - self.body, - make_node(AST_SimpleStatement, self.condition, { - body: self.condition - }), - ] - }) - }).optimize(compressor); - if (!has_loop_control(self, compressor.parent())) return make_node(AST_BlockStatement, self.body, { - body: [ - self.body, - make_node(AST_SimpleStatement, self.condition, { - body: self.condition - }), - ] - }).optimize(compressor); - } - if (self.body instanceof AST_BlockStatement && !has_loop_control(self, compressor.parent(), AST_Continue)) { - var body = self.body.body; - for (var i = body.length; --i >= 0;) { - var stat = body[i]; - if (stat instanceof AST_If - && !stat.alternative - && stat.body instanceof AST_Break - && compressor.loopcontrol_target(stat.body) === self) { - if (has_block_scope_refs(stat.condition)) break; - self.condition = make_node(AST_Binary, self, { - operator: "&&", - left: stat.condition.negate(compressor), - right: self.condition, - }); - body.splice(i, 1); - } else if (stat instanceof AST_SimpleStatement) { - if (has_block_scope_refs(stat.body)) break; - self.condition = make_sequence(self, [ - stat.body, - self.condition, - ]); - body.splice(i, 1); - } else if (!is_declaration(stat, true)) { - break; - } - } - self.body = trim_block(self.body, compressor.parent()); - } - if (self.body instanceof AST_EmptyStatement) return make_node(AST_For, self, self).optimize(compressor); - if (self.body instanceof AST_SimpleStatement) return make_node(AST_For, self, { - condition: make_sequence(self.condition, [ - self.body.body, - self.condition - ]), - body: make_node(AST_EmptyStatement, self) - }).optimize(compressor); - return self; - - function has_block_scope_refs(node) { - var found = false; - node.walk(new TreeWalker(function(node) { - if (found) return true; - if (node instanceof AST_SymbolRef) { - if (!member(node.definition(), self.enclosed)) found = true; - return true; - } - })); - return found; - } - }); - - function if_break_in_loop(self, compressor) { - var first = first_statement(self.body); - if (compressor.option("dead_code") - && (first instanceof AST_Break - || first instanceof AST_Continue && external_target(first) - || first instanceof AST_Exit)) { - var body = []; - if (is_statement(self.init)) { - body.push(self.init); - } else if (self.init) { - body.push(make_node(AST_SimpleStatement, self.init, { - body: self.init - })); - } - var retain = external_target(first) || first instanceof AST_Exit; - if (self.condition && retain) { - body.push(make_node(AST_If, self, { - condition: self.condition, - body: first, - alternative: null - })); - } else if (self.condition) { - body.push(make_node(AST_SimpleStatement, self.condition, { - body: self.condition - })); - } else if (retain) { - body.push(first); - } - extract_declarations_from_unreachable_code(compressor, self.body, body); - return make_node(AST_BlockStatement, self, { - body: body - }); - } - if (first instanceof AST_If) { - var ab = first_statement(first.body); - if (ab instanceof AST_Break && !external_target(ab)) { - if (self.condition) { - self.condition = make_node(AST_Binary, self.condition, { - left: self.condition, - operator: "&&", - right: first.condition.negate(compressor), - }); - } else { - self.condition = first.condition.negate(compressor); - } - var body = as_statement_array(first.alternative); - extract_declarations_from_unreachable_code(compressor, first.body, body); - return drop_it(body); - } - ab = first_statement(first.alternative); - if (ab instanceof AST_Break && !external_target(ab)) { - if (self.condition) { - self.condition = make_node(AST_Binary, self.condition, { - left: self.condition, - operator: "&&", - right: first.condition, - }); - } else { - self.condition = first.condition; - } - var body = as_statement_array(first.body); - extract_declarations_from_unreachable_code(compressor, first.alternative, body); - return drop_it(body); - } - } - return self; - - function first_statement(body) { - return body instanceof AST_BlockStatement ? body.body[0] : body; - } - - function external_target(node) { - return compressor.loopcontrol_target(node) !== compressor.self(); - } - - function drop_it(rest) { - if (self.body instanceof AST_BlockStatement) { - self.body = self.body.clone(); - self.body.body = rest.concat(self.body.body.slice(1)); - self.body = self.body.transform(compressor); - } else { - self.body = make_node(AST_BlockStatement, self.body, { - body: rest - }).transform(compressor); - } - return if_break_in_loop(self, compressor); - } - } - - OPT(AST_For, function(self, compressor) { - if (!compressor.option("loops")) return self; - if (compressor.option("side_effects")) { - if (self.init) self.init = self.init.drop_side_effect_free(compressor); - if (self.step) self.step = self.step.drop_side_effect_free(compressor); - } - if (self.condition) { - var cond = self.condition.evaluate(compressor); - if (cond instanceof AST_Node) { - cond = self.condition.is_truthy() || self.condition.evaluate(compressor, true); - } else if (cond) { - self.condition = null; - } - if (!cond) { - if (compressor.option("dead_code")) { - var body = []; - if (is_statement(self.init)) { - body.push(self.init); - } else if (self.init) { - body.push(make_node(AST_SimpleStatement, self.init, { - body: self.init - })); - } - body.push(make_node(AST_SimpleStatement, self.condition, { - body: self.condition - })); - extract_declarations_from_unreachable_code(compressor, self.body, body); - return make_node(AST_BlockStatement, self, { body: body }).optimize(compressor); - } - } else if (self.condition && !(cond instanceof AST_Node)) { - self.body = make_node(AST_BlockStatement, self.body, { - body: [ - make_node(AST_SimpleStatement, self.condition, { - body: self.condition - }), - self.body - ] - }); - self.condition = null; - } - } - return if_break_in_loop(self, compressor); - }); - - OPT(AST_ForEnumeration, function(self, compressor) { - if (compressor.option("varify") && is_lexical_definition(self.init)) { - var name = self.init.definitions[0].name; - if ((name instanceof AST_Destructured || name instanceof AST_SymbolLet) - && !name.match_symbol(function(node) { - if (node instanceof AST_SymbolDeclaration) { - var def = node.definition(); - return !same_scope(def) || may_overlap(compressor, def); - } - }, true)) { - self.init = to_var(self.init); - } - } - return self; - }); - - function mark_locally_defined(condition, consequent, alternative) { - if (!(condition instanceof AST_Binary)) return; - if (!(condition.left instanceof AST_String)) { - switch (condition.operator) { - case "&&": - mark_locally_defined(condition.left, consequent); - mark_locally_defined(condition.right, consequent); - break; - case "||": - mark_locally_defined(negate(condition.left), alternative); - mark_locally_defined(negate(condition.right), alternative); - break; - } - return; - } - if (!(condition.right instanceof AST_UnaryPrefix)) return; - if (condition.right.operator != "typeof") return; - var sym = condition.right.expression; - if (!is_undeclared_ref(sym)) return; - var body; - var undef = condition.left.value == "undefined"; - switch (condition.operator) { - case "==": - body = undef ? alternative : consequent; - break; - case "!=": - body = undef ? consequent : alternative; - break; - default: - return; - } - if (!body) return; - var def = sym.definition(); - var tw = new TreeWalker(function(node) { - if (node instanceof AST_Scope) { - var parent = tw.parent(); - if (parent instanceof AST_Call && parent.expression === node) return; - return true; - } - if (node instanceof AST_SymbolRef && node.definition() === def) node.defined = true; - }); - body.walk(tw); - - function negate(node) { - if (!(node instanceof AST_Binary)) return; - switch (node.operator) { - case "==": - node = node.clone(); - node.operator = "!="; - return node; - case "!=": - node = node.clone(); - node.operator = "=="; - return node; - } - } - } - - function fuzzy_eval(compressor, node, nullish) { - if (node.truthy) return true; - if (node.falsy && !nullish) return false; - if (node.is_truthy()) return true; - return node.evaluate(compressor, true); - } - - function mark_duplicate_condition(compressor, node) { - for (var level = 0, child = compressor.self(), parent; ; child = parent) { - parent = compressor.parent(level++); - if (parent instanceof AST_Binary) { - var op = parent.operator; - if (!lazy_op[op]) return; - var left = parent.left; - if (left === child) continue; - if (node.equivalent_to(left)) node[op == "&&" ? "truthy" : "falsy"] = true; - } else if (parent instanceof AST_Conditional) { - var cond = parent.condition; - if (cond === child) continue; - if (node.equivalent_to(cond)) switch (child) { - case parent.consequent: - node.truthy = true; - break; - case parent.alternative: - node.falsy = true; - break; - } - } else if (parent instanceof AST_Exit) { - break; - } else if (parent instanceof AST_If) { - break; - } else if (parent instanceof AST_Sequence) { - if (parent.expressions[0] === child) continue; - } else if (parent instanceof AST_SimpleStatement) { - break; - } - return; - } - while (true) { - child = parent; - parent = compressor.parent(level++); - if (parent instanceof AST_BlockStatement) { - if (parent.body[0] === child) continue; - } else if (parent instanceof AST_If) { - var cond = parent.condition; - if (cond === child) continue; - if (node.equivalent_to(cond)) switch (child) { - case parent.body: - node.truthy = true; - break; - case parent.alternative: - node.falsy = true; - break; - } - } - return; - } - } - - OPT(AST_If, function(self, compressor) { - if (is_empty(self.alternative)) self.alternative = null; - - if (!compressor.option("conditionals")) return self; - if (compressor.option("booleans") && !self.condition.has_side_effects(compressor)) { - mark_duplicate_condition(compressor, self.condition); - } - // if condition can be statically determined, warn and drop - // one of the blocks. note, statically determined implies - // “has no side effects”; also it doesn't work for cases like - // `x && true`, though it probably should. - if (compressor.option("dead_code")) { - var cond = fuzzy_eval(compressor, self.condition); - if (!cond) { - AST_Node.warn("Condition always false [{file}:{line},{col}]", self.condition.start); - var body = [ make_node(AST_SimpleStatement, self.condition, { body: self.condition }) ]; - extract_declarations_from_unreachable_code(compressor, self.body, body); - if (self.alternative) body.push(self.alternative); - return make_node(AST_BlockStatement, self, { body: body }).optimize(compressor); - } else if (!(cond instanceof AST_Node)) { - AST_Node.warn("Condition always true [{file}:{line},{col}]", self.condition.start); - var body = [ - make_node(AST_SimpleStatement, self.condition, { body: self.condition }), - self.body, - ]; - if (self.alternative) extract_declarations_from_unreachable_code(compressor, self.alternative, body); - return make_node(AST_BlockStatement, self, { body: body }).optimize(compressor); - } - } - var negated = self.condition.negate(compressor); - var self_condition_length = self.condition.print_to_string().length; - var negated_length = negated.print_to_string().length; - var negated_is_best = negated_length < self_condition_length; - if (self.alternative && negated_is_best) { - negated_is_best = false; // because we already do the switch here. - // no need to swap values of self_condition_length and negated_length - // here because they are only used in an equality comparison later on. - self.condition = negated; - var tmp = self.body; - self.body = self.alternative || make_node(AST_EmptyStatement, self); - self.alternative = tmp; - } - var body = [], var_defs = [], refs = []; - var body_exprs = sequencesize(self.body, body, var_defs, refs); - var alt_exprs = sequencesize(self.alternative, body, var_defs, refs); - if (body_exprs && alt_exprs) { - if (var_defs.length > 0) body.push(make_node(AST_Var, self, { definitions: var_defs })); - if (body_exprs.length == 0) { - body.push(make_node(AST_SimpleStatement, self.condition, { - body: alt_exprs.length > 0 ? make_node(AST_Binary, self, { - operator : "||", - left : self.condition, - right : make_sequence(self.alternative, alt_exprs) - }).transform(compressor) : self.condition.clone() - }).optimize(compressor)); - } else if (alt_exprs.length == 0) { - if (self_condition_length === negated_length && !negated_is_best - && self.condition instanceof AST_Binary && self.condition.operator == "||") { - // although the code length of self.condition and negated are the same, - // negated does not require additional surrounding parentheses. - // see https://github.com/mishoo/UglifyJS/issues/979 - negated_is_best = true; - } - body.push(make_node(AST_SimpleStatement, self, { - body: make_node(AST_Binary, self, { - operator : negated_is_best ? "||" : "&&", - left : negated_is_best ? negated : self.condition, - right : make_sequence(self.body, body_exprs) - }).transform(compressor) - }).optimize(compressor)); - } else { - body.push(make_node(AST_SimpleStatement, self, { - body: make_node(AST_Conditional, self, { - condition : self.condition, - consequent : make_sequence(self.body, body_exprs), - alternative : make_sequence(self.alternative, alt_exprs) - }) - }).optimize(compressor)); - } - refs.forEach(function(ref) { - ref.definition().references.push(ref); - }); - return make_node(AST_BlockStatement, self, { - body: body - }).optimize(compressor); - } - if (is_empty(self.body)) { - self = make_node(AST_If, self, { - condition: negated, - body: self.alternative, - alternative: null - }); - } - if (self.body instanceof AST_Exit - && self.alternative instanceof AST_Exit - && self.body.TYPE == self.alternative.TYPE) { - var exit = make_node(self.body.CTOR, self, { - value: make_node(AST_Conditional, self, { - condition : self.condition, - consequent : self.body.value || make_node(AST_Undefined, self.body).transform(compressor), - alternative : self.alternative.value || make_node(AST_Undefined, self.alternative).transform(compressor) - }) - }); - if (exit instanceof AST_Return) { - exit.in_bool = self.body.in_bool || self.alternative.in_bool; - } - return exit; - } - if (self.body instanceof AST_If - && !self.body.alternative - && !self.alternative) { - self = make_node(AST_If, self, { - condition: make_node(AST_Binary, self.condition, { - operator: "&&", - left: self.condition, - right: self.body.condition - }), - body: self.body.body, - alternative: null - }); - } - if (aborts(self.body)) { - if (self.alternative) { - var alt = self.alternative; - self.alternative = null; - return make_node(AST_BlockStatement, self, { - body: [ self, alt ] - }).optimize(compressor); - } - } - if (aborts(self.alternative)) { - var body = self.body; - self.body = self.alternative; - self.condition = negated_is_best ? negated : self.condition.negate(compressor); - self.alternative = null; - return make_node(AST_BlockStatement, self, { - body: [ self, body ] - }).optimize(compressor); - } - if (compressor.option("typeofs")) mark_locally_defined(self.condition, self.body, self.alternative); - return self; - - function sequencesize(stat, defuns, var_defs, refs) { - if (stat == null) return []; - if (stat instanceof AST_BlockStatement) { - var exprs = []; - for (var i = 0; i < stat.body.length; i++) { - var line = stat.body[i]; - if (line instanceof AST_LambdaDefinition) { - defuns.push(line); - } else if (line instanceof AST_EmptyStatement) { - continue; - } else if (line instanceof AST_SimpleStatement) { - if (!compressor.option("sequences") && exprs.length > 0) return; - exprs.push(line.body); - } else if (line instanceof AST_Var) { - if (!compressor.option("sequences") && exprs.length > 0) return; - line.remove_initializers(compressor, var_defs); - line.definitions.forEach(process_var_def); - } else { - return; - } - } - return exprs; - } - if (stat instanceof AST_LambdaDefinition) { - defuns.push(stat); - return []; - } - if (stat instanceof AST_EmptyStatement) return []; - if (stat instanceof AST_SimpleStatement) return [ stat.body ]; - if (stat instanceof AST_Var) { - var exprs = []; - stat.remove_initializers(compressor, var_defs); - stat.definitions.forEach(process_var_def); - return exprs; - } - - function process_var_def(var_def) { - if (!var_def.value) return; - exprs.push(make_node(AST_Assign, var_def, { - operator: "=", - left: var_def.name.convert_symbol(AST_SymbolRef, function(ref) { - refs.push(ref); - }), - right: var_def.value - })); - } - } - }); - - OPT(AST_Switch, function(self, compressor) { - if (!compressor.option("switches")) return self; - if (!compressor.option("dead_code")) return self; - var body = []; - var branch; - var decl = []; - var default_branch; - var exact_match; - var side_effects = []; - for (var i = 0, len = self.body.length; i < len; i++) { - branch = self.body[i]; - if (branch instanceof AST_Default) { - var prev = body[body.length - 1]; - if (default_branch || is_break(branch.body[0], compressor) && (!prev || aborts(prev))) { - eliminate_branch(branch, prev); - continue; - } else { - default_branch = branch; - } - } else { - var exp = branch.expression; - var equals = make_node(AST_Binary, self, { - operator: "===", - left: self.expression, - right: exp, - }).evaluate(compressor, true); - if (!equals) { - if (exp.has_side_effects(compressor)) side_effects.push(exp); - eliminate_branch(branch, body[body.length - 1]); - continue; - } - if (!(equals instanceof AST_Node)) { - if (default_branch) { - var default_index = body.indexOf(default_branch); - body.splice(default_index, 1); - eliminate_branch(default_branch, body[default_index - 1]); - default_branch = null; - } - if (exp.has_side_effects(compressor)) { - exact_match = branch; - } else { - default_branch = branch = make_node(AST_Default, branch, branch); - } - while (++i < len) eliminate_branch(self.body[i], branch); - } - } - if (i + 1 >= len || aborts(branch)) { - var prev = body[body.length - 1]; - var statements = branch.body; - if (aborts(prev)) switch (prev.body.length - statements.length) { - case 1: - var stat = prev.body[prev.body.length - 1]; - if (!is_break(stat, compressor)) break; - statements = statements.concat(stat); - case 0: - var prev_block = make_node(AST_BlockStatement, prev, prev); - var next_block = make_node(AST_BlockStatement, branch, { body: statements }); - if (prev_block.equivalent_to(next_block)) prev.body = []; - } - } - if (side_effects.length) { - if (branch instanceof AST_Default) { - body.push(make_node(AST_Case, self, { expression: make_sequence(self, side_effects), body: [] })); - } else { - side_effects.push(branch.expression); - branch.expression = make_sequence(self, side_effects); - } - side_effects = []; - } - body.push(branch); - } - if (side_effects.length && !exact_match) { - body.push(make_node(AST_Case, self, { expression: make_sequence(self, side_effects), body: [] })); - } - while (branch = body[body.length - 1]) { - var stat = branch.body[branch.body.length - 1]; - if (is_break(stat, compressor)) branch.body.pop(); - if (branch === default_branch) { - if (!has_declarations_only(branch)) break; - } else if (branch.expression.has_side_effects(compressor)) { - break; - } else if (default_branch) { - if (!has_declarations_only(default_branch)) break; - if (body[body.length - 2] !== default_branch) break; - default_branch.body = default_branch.body.concat(branch.body); - branch.body = []; - } else if (!has_declarations_only(branch)) break; - eliminate_branch(branch); - if (body.pop() === default_branch) default_branch = null; - } - if (!branch) { - decl.push(make_node(AST_SimpleStatement, self.expression, { body: self.expression })); - if (side_effects.length) decl.push(make_node(AST_SimpleStatement, self, { - body: make_sequence(self, side_effects), - })); - return make_node(AST_BlockStatement, self, { body: decl }).optimize(compressor); - } - if (branch === default_branch) while (branch = body[body.length - 2]) { - if (branch instanceof AST_Default) break; - if (!has_declarations_only(branch)) break; - var exp = branch.expression; - if (exp.has_side_effects(compressor)) { - var prev = body[body.length - 3]; - if (prev && !aborts(prev)) break; - default_branch.body.unshift(make_node(AST_SimpleStatement, self, { body: exp })); - } - eliminate_branch(branch); - body.splice(-2, 1); - } - body[0].body = decl.concat(body[0].body); - self.body = body; - if (compressor.option("conditionals")) switch (body.length) { - case 1: - if (!no_break(body[0])) break; - var exp = body[0].expression; - var statements = body[0].body.slice(); - if (body[0] !== default_branch && body[0] !== exact_match) return make_node(AST_If, self, { - condition: make_node(AST_Binary, self, { - operator: "===", - left: self.expression, - right: exp, - }), - body: make_node(AST_BlockStatement, self, { - body: statements, - }), - alternative: null, - }).optimize(compressor); - if (exp) statements.unshift(make_node(AST_SimpleStatement, exp, { - body: exp, - })); - statements.unshift(make_node(AST_SimpleStatement, self.expression, { - body:self.expression, - })); - return make_node(AST_BlockStatement, self, { - body: statements, - }).optimize(compressor); - case 2: - if (!member(default_branch, body) || !no_break(body[1])) break; - var statements = body[0].body.slice(); - var exclusive = statements.length && is_break(statements[statements.length - 1], compressor); - if (exclusive) statements.pop(); - if (!all(statements, no_break)) break; - var alternative = body[1].body.length && make_node(AST_BlockStatement, body[1], body[1]); - var node = make_node(AST_If, self, { - condition: make_node(AST_Binary, self, body[0] === default_branch ? { - operator: "!==", - left: self.expression, - right: body[1].expression, - } : { - operator: "===", - left: self.expression, - right: body[0].expression, - }), - body: make_node(AST_BlockStatement, body[0], { - body: statements, - }), - alternative: exclusive && alternative || null, - }); - if (!exclusive && alternative) node = make_node(AST_BlockStatement, self, { - body: [ node, alternative ], - }); - return node.optimize(compressor); - } - return self; - - function is_break(node, tw) { - return node instanceof AST_Break && tw.loopcontrol_target(node) === self; - } - - function no_break(node) { - var found = false; - var tw = new TreeWalker(function(node) { - if (found - || node instanceof AST_Lambda - || node instanceof AST_SimpleStatement) return true; - if (is_break(node, tw)) found = true; - }); - tw.push(self); - node.walk(tw); - return !found; - } - - function eliminate_branch(branch, prev) { - if (prev && !aborts(prev)) { - prev.body = prev.body.concat(branch.body); - } else { - extract_declarations_from_unreachable_code(compressor, branch, decl); - } - } - }); - - OPT(AST_Try, function(self, compressor) { - self.body = tighten_body(self.body, compressor); - if (compressor.option("dead_code")) { - if (has_declarations_only(self) - && !(self.bcatch && self.bcatch.argname && self.bcatch.argname.match_symbol(function(node) { - return node instanceof AST_SymbolCatch && !can_drop_symbol(node); - }, true))) { - var body = []; - if (self.bcatch) { - extract_declarations_from_unreachable_code(compressor, self.bcatch, body); - body.forEach(function(stat) { - if (!(stat instanceof AST_Var)) return; - stat.definitions.forEach(function(var_def) { - var def = var_def.name.definition().redefined(); - if (!def) return; - var_def.name = var_def.name.clone(); - var_def.name.thedef = def; - }); - }); - } - body.unshift(make_node(AST_BlockStatement, self, self).optimize(compressor)); - if (self.bfinally) { - body.push(make_node(AST_BlockStatement, self.bfinally, self.bfinally).optimize(compressor)); - } - return make_node(AST_BlockStatement, self, { - body: body - }).optimize(compressor); - } - if (self.bfinally && has_declarations_only(self.bfinally)) { - var body = make_node(AST_BlockStatement, self.bfinally, self.bfinally).optimize(compressor); - body = self.body.concat(body); - if (!self.bcatch) return make_node(AST_BlockStatement, self, { - body: body - }).optimize(compressor); - self.body = body; - self.bfinally = null; - } - } - return self; - }); - - function remove_initializers(make_value) { - return function(compressor, defns) { - var dropped = false; - this.definitions.forEach(function(defn) { - if (defn.value) dropped = true; - defn.name.match_symbol(function(node) { - if (node instanceof AST_SymbolDeclaration) defns.push(make_node(AST_VarDef, node, { - name: node, - value: make_value(compressor, node) - })); - }, true); - }); - return dropped; - }; - } - - AST_Const.DEFMETHOD("remove_initializers", remove_initializers(function(compressor, node) { - return make_node(AST_Undefined, node).optimize(compressor); - })); - AST_Let.DEFMETHOD("remove_initializers", remove_initializers(return_null)); - AST_Var.DEFMETHOD("remove_initializers", remove_initializers(return_null)); - - AST_Definitions.DEFMETHOD("to_assignments", function() { - var assignments = this.definitions.reduce(function(a, defn) { - var def = defn.name.definition(); - var value = defn.value; - if (value) { - if (value instanceof AST_Sequence) value = value.clone(); - var name = make_node(AST_SymbolRef, defn.name, defn.name); - var assign = make_node(AST_Assign, defn, { - operator: "=", - left: name, - right: value, - }); - a.push(assign); - name.fixed = function() { - return assign.right; - }; - name.fixed.assigns = [ assign ]; - def.references.forEach(function(ref) { - var assigns = ref.fixed && ref.fixed.assigns; - if (assigns && assigns[0] === defn) assigns[0] = assign; - }); - def.references.push(name); - } - def.eliminated++; - def.single_use = false; - return a; - }, []); - if (assignments.length == 0) return null; - return make_sequence(this, assignments); - }); - - function is_safe_lexical(def) { - return def.name != "arguments" && def.orig.length < (def.orig[0] instanceof AST_SymbolLambda ? 3 : 2); - } - - function may_overlap(compressor, def) { - if (compressor.exposed(def)) return true; - var scope = def.scope.resolve(); - for (var s = def.scope; s !== scope;) { - s = s.parent_scope; - if (s.var_names()[def.name]) return true; - } - } - - function to_var(stat) { - return make_node(AST_Var, stat, { - definitions: stat.definitions.map(function(defn) { - return make_node(AST_VarDef, defn, { - name: defn.name.convert_symbol(AST_SymbolVar, function(name, node) { - var def = name.definition(); - def.orig[def.orig.indexOf(node)] = name; - var scope = def.scope.resolve(); - if (def.scope === scope) return; - def.scope = scope; - scope.variables.set(def.name, def); - scope.enclosed.push(def); - scope.var_names()[def.name] = true; - }), - value: defn.value, - }); - }) - }); - } - - function can_varify(compressor, sym) { - if (!sym.fixed_value()) return false; - var def = sym.definition(); - return is_safe_lexical(def) && same_scope(def) && !may_overlap(compressor, def); - } - - function varify(self, compressor) { - return compressor.option("varify") && all(self.definitions, function(defn) { - return !defn.name.match_symbol(function(node) { - if (node instanceof AST_SymbolDeclaration) return !can_varify(compressor, node); - }, true); - }) ? to_var(self) : self; - } - - OPT(AST_Const, varify); - OPT(AST_Let, varify); - - function trim_optional_chain(self, compressor) { - if (!compressor.option("optional_chains")) return; - if (!self.optional) return; - var expr = self.expression; - var ev = expr.evaluate(compressor, true); - if (ev == null) return make_node(AST_UnaryPrefix, self, { - operator: "void", - expression: expr, - }).optimize(compressor); - if (!(ev instanceof AST_Node)) self.optional = false; - } - - function lift_sequence_in_expression(node, compressor) { - var exp = node.expression; - if (!(exp instanceof AST_Sequence)) return node; - var x = exp.expressions.slice(); - var e = node.clone(); - e.expression = x.pop(); - x.push(e); - return make_sequence(node, x); - } - - function drop_unused_call_args(call, compressor, fns_with_marked_args) { - var exp = call.expression; - var fn = exp instanceof AST_SymbolRef ? exp.fixed_value() : exp; - if (!(fn instanceof AST_Lambda)) return; - if (fn.uses_arguments) return; - if (fn.pinned()) return; - if (fns_with_marked_args && fns_with_marked_args.indexOf(fn) < 0) return; - var args = call.args; - if (!all(args, function(arg) { - return !(arg instanceof AST_Spread); - })) return; - var argnames = fn.argnames; - var is_iife = fn === exp && !fn.name; - if (fn.rest) { - if (!(is_iife && compressor.option("rests"))) return; - var insert = argnames.length; - args = args.slice(0, insert); - while (args.length < insert) args.push(make_node(AST_Undefined, call).optimize(compressor)); - args.push(make_node(AST_Array, call, { elements: call.args.slice(insert) })); - argnames = argnames.concat(fn.rest); - fn.rest = null; - } else { - args = args.slice(); - argnames = argnames.slice(); - } - var pos = 0, last = 0; - var drop_defaults = is_iife && compressor.option("default_values"); - var drop_fargs = is_iife && compressor.drop_fargs(fn, call) ? function(argname, arg) { - if (!argname) return true; - if (argname instanceof AST_DestructuredArray) { - return argname.elements.length == 0 && !argname.rest && arg instanceof AST_Array; - } - if (argname instanceof AST_DestructuredObject) { - return argname.properties.length == 0 && !argname.rest && arg && !arg.may_throw_on_access(compressor); - } - return argname.__unused; - } : return_false; - var side_effects = []; - for (var i = 0; i < args.length; i++) { - var argname = argnames[i]; - if (drop_defaults && argname instanceof AST_DefaultValue && args[i].is_defined(compressor)) { - argnames[i] = argname = argname.name; - } - if (!argname || "__unused" in argname) { - var node = args[i].drop_side_effect_free(compressor); - if (drop_fargs(argname)) { - if (argname) argnames.splice(i, 1); - args.splice(i, 1); - if (node) side_effects.push(node); - i--; - continue; - } else if (node) { - side_effects.push(node); - args[pos++] = make_sequence(call, side_effects); - side_effects = []; - } else if (argname) { - if (side_effects.length) { - args[pos++] = make_sequence(call, side_effects); - side_effects = []; - } else { - args[pos++] = make_node(AST_Number, args[i], { - value: 0 - }); - continue; - } - } - } else if (drop_fargs(argname, args[i])) { - var node = args[i].drop_side_effect_free(compressor); - argnames.splice(i, 1); - args.splice(i, 1); - if (node) side_effects.push(node); - i--; - continue; - } else { - side_effects.push(args[i]); - args[pos++] = make_sequence(call, side_effects); - side_effects = []; - } - last = pos; - } - for (; i < argnames.length; i++) { - if (drop_fargs(argnames[i])) argnames.splice(i--, 1); - } - fn.argnames = argnames; - args.length = last; - call.args = args; - if (!side_effects.length) return; - var arg = make_sequence(call, side_effects); - args.push(args.length < argnames.length ? make_node(AST_UnaryPrefix, call, { - operator: "void", - expression: arg, - }) : arg); - } - - OPT(AST_Call, function(self, compressor) { - var exp = self.expression; - var terminated = trim_optional_chain(self, compressor); - if (terminated) return terminated; - if (compressor.option("sequences")) { - if (exp instanceof AST_PropAccess) { - var seq = lift_sequence_in_expression(exp, compressor); - if (seq !== exp) { - var call = self.clone(); - call.expression = seq.expressions.pop(); - seq.expressions.push(call); - return seq.optimize(compressor); - } - } else if (!needs_unbinding(compressor, exp.tail_node())) { - var seq = lift_sequence_in_expression(self, compressor); - if (seq !== self) return seq.optimize(compressor); - } - } - if (compressor.option("unused")) drop_unused_call_args(self, compressor); - if (compressor.option("unsafe")) { - if (is_undeclared_ref(exp)) switch (exp.name) { - case "Array": - // Array(n) ---> [ , , ... , ] - if (self.args.length == 1) { - var first = self.args[0]; - if (first instanceof AST_Number) try { - var length = first.value; - if (length > 6) break; - var elements = Array(length); - for (var i = 0; i < length; i++) elements[i] = make_node(AST_Hole, self); - return make_node(AST_Array, self, { elements: elements }); - } catch (ex) { - AST_Node.warn("Invalid array length: {length} [{file}:{line},{col}]", { - length: length, - file: self.start.file, - line: self.start.line, - col: self.start.col, - }); - break; - } - if (!first.is_boolean(compressor) && !first.is_string(compressor)) break; - } - // Array(...) ---> [ ... ] - return make_node(AST_Array, self, { elements: self.args }); - case "Object": - // Object() ---> {} - if (self.args.length == 0) return make_node(AST_Object, self, { properties: [] }); - break; - case "String": - // String() ---> "" - if (self.args.length == 0) return make_node(AST_String, self, { value: "" }); - // String(x) ---> "" + x - if (self.args.length == 1) return make_node(AST_Binary, self, { - operator: "+", - left: make_node(AST_String, self, { value: "" }), - right: self.args[0], - }).optimize(compressor); - break; - case "Number": - // Number() ---> 0 - if (self.args.length == 0) return make_node(AST_Number, self, { value: 0 }); - // Number(x) ---> +("" + x) - if (self.args.length == 1) return make_node(AST_UnaryPrefix, self, { - operator: "+", - expression: make_node(AST_Binary, self, { - operator: "+", - left: make_node(AST_String, self, { value: "" }), - right: self.args[0], - }), - }).optimize(compressor); - break; - case "Boolean": - // Boolean() ---> false - if (self.args.length == 0) return make_node(AST_False, self).optimize(compressor); - // Boolean(x) ---> !!x - if (self.args.length == 1) return make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: self.args[0], - }), - }).optimize(compressor); - break; - case "RegExp": - // attempt to convert RegExp(...) to literal - var params = []; - if (all(self.args, function(arg) { - var value = arg.evaluate(compressor); - params.unshift(value); - return arg !== value; - })) try { - return best_of(compressor, self, make_node(AST_RegExp, self, { - value: RegExp.apply(RegExp, params), - })); - } catch (ex) { - AST_Node.warn("Error converting {expr} [{file}:{line},{col}]", { - expr: self, - file: self.start.file, - line: self.start.line, - col: self.start.col, - }); - } - break; - } else if (exp instanceof AST_Dot) switch (exp.property) { - case "toString": - // x.toString() ---> "" + x - var expr = exp.expression; - if (self.args.length == 0 && !(expr.may_throw_on_access(compressor) || expr instanceof AST_Super)) { - return make_node(AST_Binary, self, { - operator: "+", - left: make_node(AST_String, self, { value: "" }), - right: expr, - }).optimize(compressor); - } - break; - case "join": - if (exp.expression instanceof AST_Array && self.args.length < 2) EXIT: { - var separator = self.args[0]; - // [].join() ---> "" - // [].join(x) ---> (x, "") - if (exp.expression.elements.length == 0 && !(separator instanceof AST_Spread)) { - return separator ? make_sequence(self, [ - separator, - make_node(AST_String, self, { value: "" }), - ]).optimize(compressor) : make_node(AST_String, self, { value: "" }); - } - if (separator) { - separator = separator.evaluate(compressor); - if (separator instanceof AST_Node) break EXIT; // not a constant - } - var elements = []; - var consts = []; - for (var i = 0; i < exp.expression.elements.length; i++) { - var el = exp.expression.elements[i]; - var value = el.evaluate(compressor); - if (value !== el) { - consts.push(value); - } else if (el instanceof AST_Spread) { - break EXIT; - } else { - if (consts.length > 0) { - elements.push(make_node(AST_String, self, { - value: consts.join(separator), - })); - consts.length = 0; - } - elements.push(el); - } - } - if (consts.length > 0) elements.push(make_node(AST_String, self, { - value: consts.join(separator), - })); - // [ x ].join() ---> "" + x - // [ x ].join(".") ---> "" + x - // [ 1, 2, 3 ].join() ---> "1,2,3" - // [ 1, 2, 3 ].join(".") ---> "1.2.3" - if (elements.length == 1) { - if (elements[0].is_string(compressor)) return elements[0]; - return make_node(AST_Binary, elements[0], { - operator: "+", - left: make_node(AST_String, self, { value: "" }), - right: elements[0], - }); - } - // [ 1, 2, a, 3 ].join("") ---> "12" + a + "3" - if (separator == "") { - var first; - if (elements[0].is_string(compressor) || elements[1].is_string(compressor)) { - first = elements.shift(); - } else { - first = make_node(AST_String, self, { value: "" }); - } - return elements.reduce(function(prev, el) { - return make_node(AST_Binary, el, { - operator: "+", - left: prev, - right: el, - }); - }, first).optimize(compressor); - } - // [ x, "foo", "bar", y ].join() ---> [ x, "foo,bar", y ].join() - // [ x, "foo", "bar", y ].join("-") ---> [ x, "foo-bar", y ].join("-") - // need this awkward cloning to not affect original element - // best_of will decide which one to get through. - var node = self.clone(); - node.expression = node.expression.clone(); - node.expression.expression = node.expression.expression.clone(); - node.expression.expression.elements = elements; - return best_of(compressor, self, node); - } - break; - case "charAt": - if (self.args.length < 2) { - var node = make_node(AST_Binary, self, { - operator: "||", - left: make_node(AST_Sub, self, { - expression: exp.expression, - property: self.args.length ? make_node(AST_Binary, self.args[0], { - operator: "|", - left: make_node(AST_Number, self, { value: 0 }), - right: self.args[0], - }) : make_node(AST_Number, self, { value: 0 }), - }).optimize(compressor), - right: make_node(AST_String, self, { value: "" }), - }); - node.is_string = return_true; - return node.optimize(compressor); - } - break; - case "apply": - if (self.args.length == 2 && self.args[1] instanceof AST_Array) { - var args = self.args[1].elements.slice(); - args.unshift(self.args[0]); - return make_node(AST_Call, self, { - expression: make_node(AST_Dot, exp, { - expression: exp.expression, - property: "call", - }), - args: args - }).optimize(compressor); - } - break; - case "call": - var func = exp.expression; - if (func instanceof AST_SymbolRef) { - func = func.fixed_value(); - } - if (func instanceof AST_Lambda && !func.contains_this()) { - return (self.args.length ? make_sequence(this, [ - self.args[0], - make_node(AST_Call, self, { - expression: exp.expression, - args: self.args.slice(1) - }) - ]) : make_node(AST_Call, self, { - expression: exp.expression, - args: [] - })).optimize(compressor); - } - break; - } - } - if (compressor.option("unsafe_Function") - && is_undeclared_ref(exp) - && exp.name == "Function") { - // new Function() ---> function(){} - if (self.args.length == 0) return make_node(AST_Function, self, { - argnames: [], - body: [] - }).init_vars(exp.scope); - if (all(self.args, function(x) { - return x instanceof AST_String; - })) { - // quite a corner-case, but we can handle it: - // https://github.com/mishoo/UglifyJS/issues/203 - // if the code argument is a constant, then we can minify it. - try { - var code = "n(function(" + self.args.slice(0, -1).map(function(arg) { - return arg.value; - }).join() + "){" + self.args[self.args.length - 1].value + "})"; - var ast = parse(code); - var mangle = { ie8: compressor.option("ie8") }; - ast.figure_out_scope(mangle); - var comp = new Compressor(compressor.options); - ast = ast.transform(comp); - ast.figure_out_scope(mangle); - ast.compute_char_frequency(mangle); - ast.mangle_names(mangle); - var fun; - ast.walk(new TreeWalker(function(node) { - if (fun) return true; - if (node instanceof AST_Lambda) { - fun = node; - return true; - } - })); - var code = OutputStream(); - AST_BlockStatement.prototype._codegen.call(fun, code); - self.args = [ - make_node(AST_String, self, { - value: fun.argnames.map(function(arg) { - return arg.print_to_string(); - }).join(), - }), - make_node(AST_String, self.args[self.args.length - 1], { - value: code.get().replace(/^\{|\}$/g, "") - }) - ]; - return self; - } catch (ex) { - if (ex instanceof JS_Parse_Error) { - AST_Node.warn("Error parsing code passed to new Function [{file}:{line},{col}]", self.args[self.args.length - 1].start); - AST_Node.warn(ex.toString()); - } else { - throw ex; - } - } - } - } - var fn = exp instanceof AST_SymbolRef ? exp.fixed_value() : exp; - var parent = compressor.parent(), current = compressor.self(); - var is_func = fn instanceof AST_Lambda - && (!is_async(fn) || compressor.option("awaits") && parent instanceof AST_Await) - && (!is_generator(fn) || compressor.option("yields") && current instanceof AST_Yield && current.nested); - var stat = is_func && fn.first_statement(); - var has_default = 0, has_destructured = false; - var has_spread = !all(self.args, function(arg) { - return !(arg instanceof AST_Spread); - }); - var can_drop = is_func && all(fn.argnames, function(argname, index) { - if (has_default == 1 && self.args[index] instanceof AST_Spread) has_default = 2; - if (argname instanceof AST_DefaultValue) { - if (!has_default) has_default = 1; - var arg = has_default == 1 && self.args[index]; - if (arg && !is_undefined(arg)) has_default = 2; - if (has_arg_refs(argname.value)) return false; - argname = argname.name; - } - if (argname instanceof AST_Destructured) { - has_destructured = true; - if (has_arg_refs(argname)) return false; - } - return true; - }) && !(fn.rest instanceof AST_Destructured && has_arg_refs(fn.rest)); - var can_inline = can_drop && compressor.option("inline") && !self.is_expr_pure(compressor); - if (can_inline && stat instanceof AST_Return) { - var value = stat.value; - if (exp === fn && !fn.name && (!value || value.is_constant_expression()) && safe_from_await_yield(fn)) { - return make_sequence(self, convert_args(value)).optimize(compressor); - } - } - if (is_func) { - var def, value, var_assigned = false; - if (can_inline - && !fn.uses_arguments - && !fn.pinned() - && !(fn.name && fn instanceof AST_LambdaExpression) - && (exp === fn || !recursive_ref(compressor, def = exp.definition()) - && fn.is_constant_expression(find_scope(compressor))) - && !has_spread - && (value = can_flatten_body(stat)) - && !fn.contains_this()) { - var replacing = exp === fn || def.single_use && def.references.length - def.replaced == 1; - if (can_substitute_directly()) { - var args = self.args.slice(); - var refs = []; - args.push(value.clone(true).transform(new TreeTransformer(function(node) { - if (node instanceof AST_SymbolRef) { - var def = node.definition(); - if (fn.variables.get(node.name) !== def) { - refs.push(node); - return node; - } - var index = resolve_index(def); - var arg = args[index]; - if (!arg) return make_node(AST_Undefined, self); - args[index] = null; - var parent = this.parent(); - return parent ? maintain_this_binding(compressor, parent, node, arg) : arg; - } - }))); - var save_inlined = fn.inlined; - if (exp !== fn) fn.inlined = true; - var node = make_sequence(self, args.filter(function(arg) { - return arg; - })).optimize(compressor); - fn.inlined = save_inlined; - node = maintain_this_binding(compressor, parent, current, node); - if (replacing || best_of_expression(node, self) === node) { - refs.forEach(function(ref) { - ref.scope = exp === fn ? fn.parent_scope : exp.scope; - ref.reference(); - if (replacing) { - ref.definition().replaced++; - } else { - ref.definition().single_use = false; - } - }); - return node; - } else if (!node.has_side_effects(compressor)) { - self.drop_side_effect_free = return_null; - } - } - var arg_used, insert, in_loop, scope; - if (replacing && can_inject_symbols()) { - fn._squeezed = true; - if (exp !== fn) fn.parent_scope = exp.scope; - var node = make_sequence(self, flatten_fn()).optimize(compressor); - return maintain_this_binding(compressor, parent, current, node); - } - } - if (compressor.option("side_effects") - && can_drop - && all(fn.body, is_empty) - && (fn === exp ? fn_name_unused(fn, compressor) : !has_default && !has_destructured && !fn.rest) - && !(is_arrow(fn) && fn.value) - && safe_from_await_yield(fn)) { - return make_sequence(self, convert_args()).optimize(compressor); - } - } - if (compressor.option("drop_console")) { - if (exp instanceof AST_PropAccess) { - var name = exp.expression; - while (name.expression) { - name = name.expression; - } - if (is_undeclared_ref(name) && name.name == "console") { - return make_node(AST_Undefined, self).optimize(compressor); - } - } - } - if (compressor.option("negate_iife") && parent instanceof AST_SimpleStatement && is_iife_call(current)) { - return self.negate(compressor, true); - } - return try_evaluate(compressor, self); - - function has_arg_refs(node) { - var found = false; - node.walk(new TreeWalker(function(node) { - if (found) return true; - if (node instanceof AST_SymbolRef && fn.variables.get(node.name) === node.definition()) { - return found = true; - } - })); - return found; - } - - function make_void_lhs(orig) { - return make_node(AST_Dot, orig, { - expression: make_node(AST_Array, orig, { elements: [] }), - property: "e", - }); - } - - function convert_args(value) { - var args = self.args.slice(); - var destructured = has_default > 1 || has_destructured || fn.rest; - if (destructured || has_spread) args = [ make_node(AST_Array, self, { elements: args }) ]; - if (destructured) { - var tt = new TreeTransformer(function(node, descend) { - if (node instanceof AST_DefaultValue) return make_node(AST_DefaultValue, node, { - name: node.name.transform(tt) || make_void_lhs(node), - value: node.value, - }); - if (node instanceof AST_DestructuredArray) { - var elements = []; - node.elements.forEach(function(node, index) { - node = node.transform(tt); - if (node) elements[index] = node; - }); - fill_holes(node, elements); - return make_node(AST_DestructuredArray, node, { elements: elements }); - } - if (node instanceof AST_DestructuredObject) { - var properties = [], side_effects = []; - node.properties.forEach(function(prop) { - var key = prop.key; - var value = prop.value.transform(tt); - if (value) { - side_effects.push(key instanceof AST_Node ? key : make_node_from_constant(key, prop)); - properties.push(make_node(AST_DestructuredKeyVal, prop, { - key: make_sequence(node, side_effects), - value: value, - })); - side_effects = []; - } else if (key instanceof AST_Node) { - side_effects.push(key); - } - }); - if (side_effects.length) properties.push(make_node(AST_DestructuredKeyVal, node, { - key: make_sequence(node, side_effects), - value: make_void_lhs(node), - })); - return make_node(AST_DestructuredObject, node, { properties: properties }); - } - if (node instanceof AST_SymbolFunarg) return null; - }); - var lhs = []; - fn.argnames.forEach(function(argname, index) { - argname = argname.transform(tt); - if (argname) lhs[index] = argname; - }); - var rest = fn.rest && fn.rest.transform(tt); - if (rest) lhs.length = fn.argnames.length; - fill_holes(fn, lhs); - args[0] = make_node(AST_Assign, self, { - operator: "=", - left: make_node(AST_DestructuredArray, fn, { - elements: lhs, - rest: rest, - }), - right: args[0], - }); - } else fn.argnames.forEach(function(argname) { - if (argname instanceof AST_DefaultValue) args.push(argname.value); - }); - args.push(value || make_node(AST_Undefined, self)); - return args; - } - - function avoid_await_yield() { - var avoid = []; - var parent_scope = scope || compressor.find_parent(AST_Scope); - if (is_async(parent_scope)) avoid.push("await"); - if (is_generator(parent_scope)) avoid.push("yield"); - return avoid.length && makePredicate(avoid); - } - - function safe_from_await_yield(node) { - var avoid = avoid_await_yield(); - if (!avoid) return true; - var safe = true; - var tw = new TreeWalker(function(node) { - if (!safe) return true; - if (node instanceof AST_Scope) { - if (node === fn) return; - if (is_arrow(node)) { - for (var i = 0; safe && i < node.argnames.length; i++) node.argnames[i].walk(tw); - } else if (node instanceof AST_LambdaDefinition && avoid[node.name.name]) { - safe = false; - } - return true; - } - if (node instanceof AST_Symbol && avoid[node.name] && node !== fn.name) safe = false; - }); - node.walk(tw); - return safe; - } - - function return_value(stat) { - if (!stat) return make_node(AST_Undefined, self); - if (stat instanceof AST_Return) return stat.value || make_node(AST_Undefined, self); - if (stat instanceof AST_SimpleStatement) return make_node(AST_UnaryPrefix, stat, { - operator: "void", - expression: stat.body - }); - } - - function can_flatten_body(stat) { - var len = fn.body.length; - if (len < 2) { - stat = return_value(stat); - if (stat) return stat; - } - if (compressor.option("inline") < 3) return false; - stat = null; - for (var i = 0; i < len; i++) { - var line = fn.body[i]; - if (line instanceof AST_Var) { - var assigned = var_assigned || !all(line.definitions, function(var_def) { - return !var_def.value; - }); - if (assigned) { - var_assigned = true; - if (stat) return false; - } - } else if (line instanceof AST_AsyncDefun - || line instanceof AST_Defun - || line instanceof AST_EmptyStatement) { - continue; - } else if (stat) { - return false; - } else { - stat = line; - } - } - return return_value(stat); - } - - function resolve_index(def) { - for (var i = fn.argnames.length; --i >= 0;) { - if (fn.argnames[i].definition() === def) return i; - } - } - - function can_substitute_directly() { - if (has_default || has_destructured || var_assigned || fn.rest) return; - if (compressor.option("inline") < 2 && fn.argnames.length) return; - if (!fn.variables.all(function(def) { - return def.references.length - def.replaced < 2 && def.orig[0] instanceof AST_SymbolFunarg; - })) return; - var abort = false; - var avoid = avoid_await_yield(); - var begin; - var in_order = []; - var side_effects = false; - value.walk(new TreeWalker(function(node, descend) { - if (abort) return true; - if (node instanceof AST_Binary && lazy_op[node.operator] - || node instanceof AST_Conditional) { - in_order = null; - return; - } - if (node instanceof AST_Scope) return abort = true; - if (avoid && node instanceof AST_Symbol && avoid[node.name]) return abort = true; - if (node instanceof AST_SymbolRef) { - var def = node.definition(); - if (fn.variables.get(node.name) !== def) { - in_order = null; - return; - } - if (def.init instanceof AST_LambdaDefinition) return abort = true; - if (is_lhs(node, this.parent())) return abort = true; - var index = resolve_index(def); - if (!(begin < index)) begin = index; - if (!in_order) return; - if (side_effects) { - in_order = null; - } else { - in_order.push(fn.argnames[index]); - } - return; - } - if (node.has_side_effects(compressor)) { - descend(); - side_effects = true; - return true; - } - })); - if (abort) return; - var end = self.args.length; - if (in_order && fn.argnames.length >= end) { - end = fn.argnames.length; - while (end-- > begin && fn.argnames[end] === in_order.pop()); - end++; - } - var scope = side_effects && !in_order && compressor.find_parent(AST_Scope); - return end <= begin || all(self.args.slice(begin, end), scope ? function(funarg) { - return funarg.is_constant_expression(scope); - } : function(funarg) { - return !funarg.has_side_effects(compressor); - }); - } - - function var_exists(defined, name) { - return defined[name] || identifier_atom[name] || scope.var_names()[name]; - } - - function can_inject_args(defined, used, safe_to_inject) { - var abort = false; - fn.each_argname(function(arg) { - if (abort) return; - if (arg.__unused) return; - if (arg instanceof AST_DefaultValue) arg = arg.name; - if (!safe_to_inject || var_exists(defined, arg.name)) return abort = true; - used[arg.name] = true; - if (in_loop) in_loop.push(arg.definition()); - }); - return !abort; - } - - function can_inject_vars(defined, used, safe_to_inject) { - for (var i = 0; i < fn.body.length; i++) { - var stat = fn.body[i]; - if (stat instanceof AST_LambdaDefinition) { - if (!safe_to_inject || var_exists(used, stat.name.name)) return false; - if (!all(stat.enclosed, function(def) { - return def.scope === stat || !defined[def.name]; - })) return false; - if (in_loop) in_loop.push(stat.name.definition()); - continue; - } - if (!(stat instanceof AST_Var)) continue; - if (!safe_to_inject) return false; - for (var j = stat.definitions.length; --j >= 0;) { - var name = stat.definitions[j].name; - if (var_exists(defined, name.name)) return false; - if (in_loop) in_loop.push(name.definition()); - } - } - return true; - } - - function can_inject_symbols() { - var defined = Object.create(null); - var level = 0, child; - scope = current; - do { - if (scope.variables) scope.variables.each(function(def) { - defined[def.name] = true; - }); - child = scope; - scope = compressor.parent(level++); - if (scope instanceof AST_DWLoop) { - in_loop = []; - } else if (scope instanceof AST_For) { - if (scope.init === child) continue; - in_loop = []; - } else if (scope instanceof AST_ForEnumeration) { - if (scope.init === child) continue; - if (scope.object === child) continue; - in_loop = []; - } else if (scope instanceof AST_SymbolRef) { - if (scope.fixed_value() instanceof AST_Scope) return false; - } - } while (!(scope instanceof AST_Scope)); - insert = scope.body.indexOf(child) + 1; - if (!insert) return false; - if (!safe_from_await_yield(fn)) return false; - var safe_to_inject = exp !== fn || fn.parent_scope.resolve() === scope; - if (scope instanceof AST_Toplevel) { - if (compressor.toplevel.vars) { - defined["arguments"] = true; - } else { - safe_to_inject = false; - } - } - var inline = compressor.option("inline"); - arg_used = Object.create(defined); - if (!can_inject_args(defined, arg_used, inline >= 2 && safe_to_inject)) return false; - var used = Object.create(arg_used); - if (!can_inject_vars(defined, used, inline >= 3 && safe_to_inject)) return false; - return !in_loop || in_loop.length == 0 || !is_reachable(fn, in_loop); - } - - function append_var(decls, expressions, name, value) { - var def = name.definition(); - scope.variables.set(name.name, def); - scope.enclosed.push(def); - if (!scope.var_names()[name.name]) { - scope.var_names()[name.name] = true; - decls.push(make_node(AST_VarDef, name, { - name: name, - value: null - })); - } - if (!value) return; - var sym = make_node(AST_SymbolRef, name, name); - def.references.push(sym); - expressions.push(make_node(AST_Assign, self, { - operator: "=", - left: sym, - right: value - })); - } - - function flatten_args(decls, expressions) { - var len = fn.argnames.length; - for (var i = self.args.length; --i >= len;) { - expressions.push(self.args[i]); - } - var default_args = []; - for (i = len; --i >= 0;) { - var argname = fn.argnames[i]; - var name; - if (argname instanceof AST_DefaultValue) { - default_args.push(argname); - name = argname.name; - } else { - name = argname; - } - var value = self.args[i]; - if (name.__unused || scope.var_names()[name.name]) { - if (value) expressions.push(value); - } else { - var symbol = make_node(AST_SymbolVar, name, name); - name.definition().orig.push(symbol); - if ("__unused" in name) { - append_var(decls, expressions, symbol); - if (value) expressions.push(value); - } else { - if (!value && in_loop && argname === name) value = make_node(AST_Undefined, self); - append_var(decls, expressions, symbol, value); - } - } - } - decls.reverse(); - expressions.reverse(); - for (i = default_args.length; --i >= 0;) { - var node = default_args[i]; - if ("__unused" in node.name) { - expressions.push(node.value); - } else { - var sym = make_node(AST_SymbolRef, node.name, node.name); - node.name.definition().references.push(sym); - expressions.push(make_node(AST_Assign, node, { - operator: "=", - left: sym, - right: node.value, - })); - } - } - } - - function flatten_destructured(decls, expressions) { - expressions.push(make_node(AST_Assign, self, { - operator: "=", - left: make_node(AST_DestructuredArray, self, { - elements: fn.argnames.map(function(argname) { - return argname.convert_symbol(AST_SymbolRef, process); - }), - rest: fn.rest && fn.rest.convert_symbol(AST_SymbolRef, process), - }), - right: make_node(AST_Array, self, { elements: self.args.slice() }), - })); - - function process(ref, name) { - var symbol = make_node(AST_SymbolVar, name, name); - name.definition().orig.push(symbol); - append_var(decls, expressions, symbol); - } - } - - function flatten_var(name) { - var redef = name.definition().redefined(); - if (redef) { - name = name.clone(); - name.thedef = redef; - } - return name; - } - - function flatten_vars(decls, expressions) { - var args = [ insert, 0 ]; - var decl_var = [], expr_var = [], expr_loop = []; - for (var i = 0; i < fn.body.length; i++) { - var stat = fn.body[i]; - if (stat instanceof AST_LambdaDefinition) { - if (in_loop) { - var name = make_node(AST_SymbolVar, stat.name, flatten_var(stat.name)); - name.definition().orig.push(name); - append_var(decls, expressions, name, to_func_expr(stat, true)); - } else { - var def = stat.name.definition(); - scope.functions.set(def.name, def); - scope.variables.set(def.name, def); - scope.enclosed.push(def); - scope.var_names()[def.name] = true; - args.push(stat); - } - continue; - } - if (!(stat instanceof AST_Var)) continue; - for (var j = 0; j < stat.definitions.length; j++) { - var var_def = stat.definitions[j]; - var name = flatten_var(var_def.name); - append_var(decl_var, expr_var, name, var_def.value); - if (in_loop && !HOP(arg_used, name.name)) { - var def = fn.variables.get(name.name); - var sym = make_node(AST_SymbolRef, name, name); - def.references.push(sym); - expr_loop.push(make_node(AST_Assign, var_def, { - operator: "=", - left: sym, - right: make_node(AST_Undefined, name), - })); - } - } - } - [].push.apply(decls, decl_var); - [].push.apply(expressions, expr_loop); - [].push.apply(expressions, expr_var); - return args; - } - - function flatten_fn() { - var decls = []; - var expressions = []; - if (has_default > 1 || has_destructured || fn.rest) { - flatten_destructured(decls, expressions); - } else { - flatten_args(decls, expressions); - } - var args = flatten_vars(decls, expressions); - expressions.push(value); - if (decls.length) args.push(make_node(AST_Var, fn, { - definitions: decls - })); - [].splice.apply(scope.body, args); - fn.enclosed.forEach(function(def) { - if (scope.var_names()[def.name]) return; - scope.enclosed.push(def); - scope.var_names()[def.name] = true; - }); - return expressions; - } - }); - - OPT(AST_New, function(self, compressor) { - if (compressor.option("sequences")) { - var seq = lift_sequence_in_expression(self, compressor); - if (seq !== self) return seq.optimize(compressor); - } - if (compressor.option("unused")) drop_unused_call_args(self, compressor); - if (compressor.option("unsafe")) { - var exp = self.expression; - if (is_undeclared_ref(exp)) { - switch (exp.name) { - case "Object": - case "RegExp": - case "Function": - case "Error": - case "Array": - return make_node(AST_Call, self, self).transform(compressor); - } - } - } - return self; - }); - - // (a = b, x && a = c) ---> a = x ? c : b - // (a = b, x || a = c) ---> a = x ? b : c - function to_conditional_assignment(compressor, def, value, node) { - if (!(node instanceof AST_Binary)) return; - if (!(node.operator == "&&" || node.operator == "||")) return; - if (!(node.right instanceof AST_Assign)) return; - if (node.right.operator != "=") return; - if (!(node.right.left instanceof AST_SymbolRef)) return; - if (node.right.left.definition() !== def) return; - if (value.has_side_effects(compressor)) return; - if (!safe_from_assignment(node.left)) return; - if (!safe_from_assignment(node.right.right)) return; - def.replaced++; - return node.operator == "&&" ? make_node(AST_Conditional, node, { - condition: node.left, - consequent: node.right.right, - alternative: value - }) : make_node(AST_Conditional, node, { - condition: node.left, - consequent: value, - alternative: node.right.right - }); - - function safe_from_assignment(node) { - if (node.has_side_effects(compressor)) return; - var hit = false; - node.walk(new TreeWalker(function(node) { - if (hit) return true; - if (node instanceof AST_SymbolRef && node.definition() === def) return hit = true; - })); - return !hit; - } - } - - OPT(AST_Sequence, function(self, compressor) { - var expressions = filter_for_side_effects(); - var end = expressions.length - 1; - merge_assignments(); - trim_right_for_undefined(); - if (end == 0) { - self = maintain_this_binding(compressor, compressor.parent(), compressor.self(), expressions[0]); - if (!(self instanceof AST_Sequence)) self = self.optimize(compressor); - return self; - } - self.expressions = expressions; - return self; - - function filter_for_side_effects() { - if (!compressor.option("side_effects")) return self.expressions; - var expressions = []; - var first = first_in_statement(compressor); - var last = self.expressions.length - 1; - self.expressions.forEach(function(expr, index) { - if (index < last) expr = expr.drop_side_effect_free(compressor, first); - if (expr) { - merge_sequence(expressions, expr); - first = false; - } - }); - return expressions; - } - - function trim_right_for_undefined() { - if (!compressor.option("side_effects")) return; - while (end > 0 && is_undefined(expressions[end], compressor)) end--; - if (end < expressions.length - 1) { - expressions[end] = make_node(AST_UnaryPrefix, self, { - operator : "void", - expression : expressions[end] - }); - expressions.length = end + 1; - } - } - - function is_simple_assign(node) { - return node instanceof AST_Assign - && node.operator == "=" - && node.left instanceof AST_SymbolRef - && node.left.definition(); - } - - function merge_assignments() { - for (var i = 1; i < end; i++) { - var prev = expressions[i - 1]; - var def = is_simple_assign(prev); - if (!def) continue; - var expr = expressions[i]; - if (compressor.option("conditionals")) { - var cond = to_conditional_assignment(compressor, def, prev.right, expr); - if (cond) { - prev.right = cond; - expressions.splice(i--, 1); - end--; - continue; - } - } - if (compressor.option("dead_code") - && is_simple_assign(expr) === def - && expr.right.is_constant_expression(def.scope.resolve())) { - expressions[--i] = prev.right; - } - } - } - }); - - OPT(AST_UnaryPostfix, function(self, compressor) { - if (compressor.option("sequences")) { - var seq = lift_sequence_in_expression(self, compressor); - if (seq !== self) return seq.optimize(compressor); - } - return try_evaluate(compressor, self); - }); - - var SIGN_OPS = makePredicate("+ -"); - var MULTIPLICATIVE_OPS = makePredicate("* / %"); - OPT(AST_UnaryPrefix, function(self, compressor) { - var op = self.operator; - var exp = self.expression; - if (compressor.option("evaluate") && op == "delete" && !may_not_delete(exp)) { - return make_sequence(self, [ exp, make_node(AST_True, self) ]).optimize(compressor); - } - if (compressor.option("sequences") && can_lift()) { - var seq = lift_sequence_in_expression(self, compressor); - if (seq !== self) return seq.optimize(compressor); - } - if (compressor.option("side_effects") && op == "void") { - exp = exp.drop_side_effect_free(compressor); - if (!exp) return make_node(AST_Undefined, self).optimize(compressor); - self.expression = exp; - return self; - } - if (compressor.option("booleans")) { - if (op == "!" && exp.is_truthy()) { - return make_sequence(self, [ exp, make_node(AST_False, self) ]).optimize(compressor); - } else if (compressor.in_boolean_context()) switch (op) { - case "!": - if (exp instanceof AST_UnaryPrefix && exp.operator == "!") { - // !!foo ---> foo, if we're in boolean context - return exp.expression; - } - if (exp instanceof AST_Binary) { - self = best_of(compressor, self, exp.negate(compressor, first_in_statement(compressor))); - } - break; - case "typeof": - // typeof always returns a non-empty string, thus it's - // always true in booleans - AST_Node.warn("Boolean expression always true [{file}:{line},{col}]", self.start); - var exprs = [ make_node(AST_True, self) ]; - if (!(exp instanceof AST_SymbolRef && can_drop_symbol(exp, compressor))) exprs.unshift(exp); - return make_sequence(self, exprs).optimize(compressor); - } - } - if (op == "-" && exp instanceof AST_Infinity) exp = exp.transform(compressor); - if (compressor.option("evaluate") - && exp instanceof AST_Binary - && SIGN_OPS[op] - && MULTIPLICATIVE_OPS[exp.operator] - && (exp.left.is_constant() || !exp.right.has_side_effects(compressor))) { - return make_node(AST_Binary, self, { - operator: exp.operator, - left: make_node(AST_UnaryPrefix, exp.left, { - operator: op, - expression: exp.left - }), - right: exp.right - }); - } - // avoids infinite recursion of numerals - return op == "-" && (exp instanceof AST_Number || exp instanceof AST_Infinity) - ? self : try_evaluate(compressor, self); - - function may_not_delete(node) { - return node instanceof AST_Infinity - || node instanceof AST_NaN - || node instanceof AST_NewTarget - || node instanceof AST_PropAccess - || node instanceof AST_SymbolRef - || node instanceof AST_Undefined; - } - - function can_lift() { - switch (op) { - case "delete": - return !may_not_delete(exp.tail_node()); - case "typeof": - return !is_undeclared_ref(exp.tail_node()); - default: - return true; - } - } - }); - - OPT(AST_Await, function(self, compressor) { - if (!compressor.option("awaits")) return self; - if (compressor.option("sequences")) { - var seq = lift_sequence_in_expression(self, compressor); - if (seq !== self) return seq.optimize(compressor); - } - if (compressor.option("side_effects")) { - var exp = self.expression; - if (exp instanceof AST_Await) return exp.optimize(compressor); - if (exp instanceof AST_UnaryPrefix) { - if (exp.expression instanceof AST_Await) return exp.optimize(compressor); - if (exp.operator == "void") return make_node(AST_UnaryPrefix, self, { - operator: "void", - expression: make_node(AST_Await, self, { expression: exp.expression }), - }).optimize(compressor); - } - for (var level = 0, node = self, parent; parent = compressor.parent(level++); node = parent) { - if (is_arrow(parent)) { - if (parent.value === node) return exp.optimize(compressor); - } else if (parent instanceof AST_Return) { - var drop = true; - do { - node = parent; - parent = compressor.parent(level++); - if (parent instanceof AST_Try && parent.bfinally && parent.bfinally !== node) { - drop = false; - break; - } - } while (parent && !(parent instanceof AST_Scope)); - if (drop) return exp.optimize(compressor); - } else if (parent instanceof AST_Sequence) { - if (parent.tail_node() === node) continue; - } - break; - } - } - return self; - }); - - OPT(AST_Yield, function(self, compressor) { - if (!compressor.option("yields")) return self; - if (compressor.option("sequences")) { - var seq = lift_sequence_in_expression(self, compressor); - if (seq !== self) return seq.optimize(compressor); - } - var exp = self.expression; - if (self.nested && exp.TYPE == "Call") { - var inlined = exp.clone().optimize(compressor); - if (inlined.TYPE != "Call") return inlined; - } - return self; - }); - - AST_Binary.DEFMETHOD("lift_sequences", function(compressor) { - if (this.left instanceof AST_PropAccess) { - if (!(this.left.expression instanceof AST_Sequence)) return this; - var x = this.left.expression.expressions.slice(); - var e = this.clone(); - e.left = e.left.clone(); - e.left.expression = x.pop(); - x.push(e); - return make_sequence(this, x); - } - if (this.left instanceof AST_Sequence) { - var x = this.left.expressions.slice(); - var e = this.clone(); - e.left = x.pop(); - x.push(e); - return make_sequence(this, x); - } - if (this.right instanceof AST_Sequence) { - if (this.left.has_side_effects(compressor)) return this; - var assign = this.operator == "=" && this.left instanceof AST_SymbolRef; - var x = this.right.expressions; - var last = x.length - 1; - for (var i = 0; i < last; i++) { - if (!assign && x[i].has_side_effects(compressor)) break; - } - if (i == last) { - x = x.slice(); - var e = this.clone(); - e.right = x.pop(); - x.push(e); - return make_sequence(this, x); - } - if (i > 0) { - var e = this.clone(); - e.right = make_sequence(this.right, x.slice(i)); - x = x.slice(0, i); - x.push(e); - return make_sequence(this, x); - } - } - return this; - }); - - var indexFns = makePredicate("indexOf lastIndexOf"); - var commutativeOperators = makePredicate("== === != !== * & | ^"); - function is_object(node) { - if (node instanceof AST_Assign) return node.operator == "=" && is_object(node.right); - if (node instanceof AST_Sequence) return is_object(node.tail_node()); - if (node instanceof AST_SymbolRef) return is_object(node.fixed_value()); - return node instanceof AST_Array - || node instanceof AST_Class - || node instanceof AST_Lambda - || node instanceof AST_New - || node instanceof AST_Object; - } - - function is_primitive(compressor, node) { - if (node.is_constant()) return true; - if (node instanceof AST_Assign) return node.operator != "=" || is_primitive(compressor, node.right); - if (node instanceof AST_Binary) { - return !lazy_op[node.operator] - || is_primitive(compressor, node.left) && is_primitive(compressor, node.right); - } - if (node instanceof AST_Conditional) { - return is_primitive(compressor, node.consequent) && is_primitive(compressor, node.alternative); - } - if (node instanceof AST_Sequence) return is_primitive(compressor, node.tail_node()); - if (node instanceof AST_SymbolRef) { - var fixed = node.fixed_value(); - return fixed && is_primitive(compressor, fixed); - } - if (node instanceof AST_Template) return !node.tag || is_raw_tag(compressor, node.tag); - if (node instanceof AST_Unary) return true; - } - - function repeatable(compressor, node) { - if (node instanceof AST_Dot) return repeatable(compressor, node.expression); - if (node instanceof AST_Sub) { - return repeatable(compressor, node.expression) && repeatable(compressor, node.property); - } - if (node instanceof AST_Symbol) return true; - return !node.has_side_effects(compressor); - } - - OPT(AST_Binary, function(self, compressor) { - function reversible() { - return self.left.is_constant() - || self.right.is_constant() - || !self.left.has_side_effects(compressor) - && !self.right.has_side_effects(compressor); - } - function reverse(op) { - if (reversible()) { - if (op) self.operator = op; - var tmp = self.left; - self.left = self.right; - self.right = tmp; - } - } - function swap_chain() { - var rhs = self.right; - self.left = make_node(AST_Binary, self, { - operator: self.operator, - left: self.left, - right: rhs.left, - start: self.left.start, - end: rhs.left.end - }); - self.right = rhs.right; - self.left = self.left.transform(compressor); - } - if (commutativeOperators[self.operator] - && self.right.is_constant() - && !self.left.is_constant() - && !(self.left instanceof AST_Binary - && PRECEDENCE[self.left.operator] >= PRECEDENCE[self.operator])) { - // if right is a constant, whatever side effects the - // left side might have could not influence the - // result. hence, force switch. - reverse(); - } - if (compressor.option("sequences")) { - var seq = self.lift_sequences(compressor); - if (seq !== self) return seq.optimize(compressor); - } - if (compressor.option("assignments") && lazy_op[self.operator]) { - var assign = self.right; - // a || (a = x) ---> a = a || x - // a && (a = x) ---> a = a && x - if (self.left instanceof AST_SymbolRef - && assign instanceof AST_Assign - && assign.operator == "=" - && self.left.equivalent_to(assign.left)) { - self.right = assign.right; - assign.right = self; - return assign; - } - } - if (compressor.option("comparisons")) switch (self.operator) { - case "===": - case "!==": - if (is_undefined(self.left, compressor) && self.right.is_defined(compressor)) { - AST_Node.warn("Expression always defined [{file}:{line},{col}]", self.start); - return make_sequence(self, [ - self.right, - make_node(self.operator == "===" ? AST_False : AST_True, self) - ]).optimize(compressor); - } - var is_strict_comparison = true; - if ((self.left.is_string(compressor) && self.right.is_string(compressor)) || - (self.left.is_number(compressor) && self.right.is_number(compressor)) || - (self.left.is_boolean(compressor) && self.right.is_boolean(compressor)) || - repeatable(compressor, self.left) && self.left.equivalent_to(self.right)) { - self.operator = self.operator.slice(0, 2); - } - // XXX: intentionally falling down to the next case - case "==": - case "!=": - // void 0 == x ---> null == x - if (!is_strict_comparison && is_undefined(self.left, compressor)) { - self.left = make_node(AST_Null, self.left); - } - // "undefined" == typeof x ---> undefined === x - else if (compressor.option("typeofs") - && self.left instanceof AST_String - && self.left.value == "undefined" - && self.right instanceof AST_UnaryPrefix - && self.right.operator == "typeof") { - var expr = self.right.expression; - if (expr instanceof AST_SymbolRef ? expr.is_declared(compressor) - : !(expr instanceof AST_PropAccess && compressor.option("ie8"))) { - self.right = expr; - self.left = make_node(AST_Undefined, self.left).optimize(compressor); - if (self.operator.length == 2) self.operator += "="; - } - } - // obj !== obj ---> false - else if (self.left instanceof AST_SymbolRef - && self.right instanceof AST_SymbolRef - && self.left.definition() === self.right.definition() - && is_object(self.left)) { - return make_node(self.operator[0] == "=" ? AST_True : AST_False, self).optimize(compressor); - } - break; - case "&&": - case "||": - // void 0 !== x && null !== x ---> null != x - // void 0 === x || null === x ---> null == x - var lhs = self.left; - if (lhs.operator == self.operator) { - lhs = lhs.right; - } - if (lhs instanceof AST_Binary - && lhs.operator == (self.operator == "&&" ? "!==" : "===") - && self.right instanceof AST_Binary - && lhs.operator == self.right.operator - && (is_undefined(lhs.left, compressor) && self.right.left instanceof AST_Null - || lhs.left instanceof AST_Null && is_undefined(self.right.left, compressor)) - && !lhs.right.has_side_effects(compressor) - && lhs.right.equivalent_to(self.right.right)) { - var combined = make_node(AST_Binary, self, { - operator: lhs.operator.slice(0, -1), - left: make_node(AST_Null, self), - right: lhs.right - }); - if (lhs !== self.left) { - combined = make_node(AST_Binary, self, { - operator: self.operator, - left: self.left.left, - right: combined - }); - } - return combined; - } - break; - } - var in_bool = false; - var parent = compressor.parent(); - if (compressor.option("booleans")) { - var lhs = self.left; - if (lazy_op[self.operator] && !lhs.has_side_effects(compressor)) { - if (lhs.equivalent_to(self.right)) { - return maintain_this_binding(compressor, parent, compressor.self(), lhs).optimize(compressor); - } - mark_duplicate_condition(compressor, lhs); - } - in_bool = compressor.in_boolean_context(); - } - if (in_bool) switch (self.operator) { - case "+": - var ll = self.left.evaluate(compressor); - var rr = self.right.evaluate(compressor); - if (ll && typeof ll == "string") { - AST_Node.warn("+ in boolean context always true [{file}:{line},{col}]", self.start); - return make_sequence(self, [ - self.right, - make_node(AST_True, self) - ]).optimize(compressor); - } - if (rr && typeof rr == "string") { - AST_Node.warn("+ in boolean context always true [{file}:{line},{col}]", self.start); - return make_sequence(self, [ - self.left, - make_node(AST_True, self) - ]).optimize(compressor); - } - break; - case "==": - if (self.left instanceof AST_String && self.left.value == "" && self.right.is_string(compressor)) { - return make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: self.right - }).optimize(compressor); - } - break; - case "!=": - if (self.left instanceof AST_String && self.left.value == "" && self.right.is_string(compressor)) { - return self.right.optimize(compressor); - } - break; - } - if (compressor.option("comparisons") && self.is_boolean(compressor)) { - if (!(parent instanceof AST_Binary) || parent instanceof AST_Assign) { - var negated = best_of(compressor, self, make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: self.negate(compressor, first_in_statement(compressor)) - })); - if (negated !== self) return negated; - } - switch (self.operator) { - case ">": reverse("<"); break; - case ">=": reverse("<="); break; - } - } - // x && (y && z) ---> x && y && z - // x || (y || z) ---> x || y || z - if (compressor.option("conditionals") - && lazy_op[self.operator] - && self.right instanceof AST_Binary - && self.operator == self.right.operator) { - swap_chain(); - } - if (compressor.option("strings") && self.operator == "+") { - // "foo" + 42 + "" ---> "foo" + 42 - if (self.right instanceof AST_String - && self.right.value == "" - && self.left.is_string(compressor)) { - return self.left.optimize(compressor); - } - // "" + ("foo" + 42) ---> "foo" + 42 - if (self.left instanceof AST_String - && self.left.value == "" - && self.right.is_string(compressor)) { - return self.right.optimize(compressor); - } - // "" + 42 + "foo" ---> 42 + "foo" - if (self.left instanceof AST_Binary - && self.left.operator == "+" - && self.left.left instanceof AST_String - && self.left.left.value == "" - && self.right.is_string(compressor)) { - self.left = self.left.right; - return self.optimize(compressor); - } - // "x" + (y + "z") ---> "x" + y + "z" - // x + ("y" + z) ---> x + "y" + z - if (self.right instanceof AST_Binary - && self.operator == self.right.operator - && (self.left.is_string(compressor) && self.right.is_string(compressor) - || self.right.left.is_string(compressor) - && (self.left.is_constant() || !self.right.right.has_side_effects(compressor)))) { - swap_chain(); - } - } - if (compressor.option("evaluate")) { - var associative = true; - switch (self.operator) { - case "&&": - var ll = fuzzy_eval(compressor, self.left); - if (!ll) { - AST_Node.warn("Condition left of && always false [{file}:{line},{col}]", self.start); - return maintain_this_binding(compressor, parent, compressor.self(), self.left).optimize(compressor); - } else if (!(ll instanceof AST_Node)) { - AST_Node.warn("Condition left of && always true [{file}:{line},{col}]", self.start); - return make_sequence(self, [ self.left, self.right ]).optimize(compressor); - } - var rr = self.right.evaluate(compressor); - if (!rr) { - if (in_bool) { - AST_Node.warn("Boolean && always false [{file}:{line},{col}]", self.start); - return make_sequence(self, [ - self.left, - make_node(AST_False, self) - ]).optimize(compressor); - } else self.falsy = true; - } else if (!(rr instanceof AST_Node)) { - if (in_bool || parent.operator == "&&" && parent.left === compressor.self()) { - AST_Node.warn("Dropping side-effect-free && [{file}:{line},{col}]", self.start); - return self.left.optimize(compressor); - } - } - // (x || false) && y ---> x ? y : false - if (self.left.operator == "||") { - var lr = self.left.right.evaluate(compressor, true); - if (!lr) return make_node(AST_Conditional, self, { - condition: self.left.left, - consequent: self.right, - alternative: self.left.right - }).optimize(compressor); - } - break; - case "??": - var nullish = true; - case "||": - var ll = fuzzy_eval(compressor, self.left, nullish); - if (nullish ? ll == null : !ll) { - AST_Node.warn("Condition left of {operator} always {value} [{file}:{line},{col}]", { - operator: self.operator, - value: nullish ? "nulish" : "false", - file: self.start.file, - line: self.start.line, - col: self.start.col, - }); - return make_sequence(self, [ self.left, self.right ]).optimize(compressor); - } else if (!(ll instanceof AST_Node)) { - AST_Node.warn("Condition left of {operator} always {value} [{file}:{line},{col}]", { - operator: self.operator, - value: nullish ? "defined" : "true", - file: self.start.file, - line: self.start.line, - col: self.start.col, - }); - return maintain_this_binding(compressor, parent, compressor.self(), self.left).optimize(compressor); - } - var rr = self.right.evaluate(compressor); - if (!rr) { - if (in_bool || parent.operator == "||" && parent.left === compressor.self()) { - AST_Node.warn("Dropping side-effect-free {operator} [{file}:{line},{col}]", { - operator: self.operator, - file: self.start.file, - line: self.start.line, - col: self.start.col, - }); - return self.left.optimize(compressor); - } - } else if (!nullish && !(rr instanceof AST_Node)) { - if (in_bool) { - AST_Node.warn("Boolean || always true [{file}:{line},{col}]", self.start); - return make_sequence(self, [ - self.left, - make_node(AST_True, self) - ]).optimize(compressor); - } else self.truthy = true; - } - // x && true || y ---> x ? true : y - if (!nullish && self.left.operator == "&&") { - var lr = self.left.right.is_truthy() || self.left.right.evaluate(compressor, true); - if (lr && !(lr instanceof AST_Node)) return make_node(AST_Conditional, self, { - condition: self.left.left, - consequent: self.left.right, - alternative: self.right - }).optimize(compressor); - } - break; - case "+": - // "foo" + ("bar" + x) ---> "foobar" + x - if (self.left instanceof AST_Constant - && self.right instanceof AST_Binary - && self.right.operator == "+" - && self.right.left instanceof AST_Constant - && self.right.is_string(compressor)) { - self = make_node(AST_Binary, self, { - operator: "+", - left: make_node(AST_String, self.left, { - value: "" + self.left.value + self.right.left.value, - start: self.left.start, - end: self.right.left.end - }), - right: self.right.right - }); - } - // (x + "foo") + "bar" ---> x + "foobar" - if (self.right instanceof AST_Constant - && self.left instanceof AST_Binary - && self.left.operator == "+" - && self.left.right instanceof AST_Constant - && self.left.is_string(compressor)) { - self = make_node(AST_Binary, self, { - operator: "+", - left: self.left.left, - right: make_node(AST_String, self.right, { - value: "" + self.left.right.value + self.right.value, - start: self.left.right.start, - end: self.right.end - }) - }); - } - // a + -b ---> a - b - if (self.right instanceof AST_UnaryPrefix - && self.right.operator == "-" - && self.left.is_number(compressor)) { - self = make_node(AST_Binary, self, { - operator: "-", - left: self.left, - right: self.right.expression - }); - break; - } - // -a + b ---> b - a - if (self.left instanceof AST_UnaryPrefix - && self.left.operator == "-" - && reversible() - && self.right.is_number(compressor)) { - self = make_node(AST_Binary, self, { - operator: "-", - left: self.right, - right: self.left.expression - }); - break; - } - // (a + b) + 3 ---> 3 + (a + b) - if (compressor.option("unsafe_math") - && self.left instanceof AST_Binary - && PRECEDENCE[self.left.operator] == PRECEDENCE[self.operator] - && self.right.is_constant() - && (self.right.is_boolean(compressor) || self.right.is_number(compressor)) - && self.left.is_number(compressor) - && !self.left.right.is_constant() - && (self.left.left.is_boolean(compressor) || self.left.left.is_number(compressor))) { - self = make_node(AST_Binary, self, { - operator: self.left.operator, - left: make_node(AST_Binary, self, { - operator: self.operator, - left: self.right, - right: self.left.left - }), - right: self.left.right - }); - break; - } - case "-": - // a - -b ---> a + b - if (self.right instanceof AST_UnaryPrefix - && self.right.operator == "-" - && self.left.is_number(compressor) - && self.right.expression.is_number(compressor)) { - self = make_node(AST_Binary, self, { - operator: "+", - left: self.left, - right: self.right.expression - }); - break; - } - case "*": - case "/": - associative = compressor.option("unsafe_math"); - // +a - b ---> a - b - // a - +b ---> a - b - if (self.operator != "+") [ "left", "right" ].forEach(function(operand) { - var node = self[operand]; - if (node instanceof AST_UnaryPrefix && node.operator == "+") { - var exp = node.expression; - if (exp.is_boolean(compressor) || exp.is_number(compressor) || exp.is_string(compressor)) { - self[operand] = exp; - } - } - }); - case "&": - case "|": - case "^": - // a + +b ---> +b + a - if (self.operator != "-" - && self.operator != "/" - && (self.left.is_boolean(compressor) || self.left.is_number(compressor)) - && (self.right.is_boolean(compressor) || self.right.is_number(compressor)) - && reversible() - && !(self.left instanceof AST_Binary - && self.left.operator != self.operator - && PRECEDENCE[self.left.operator] >= PRECEDENCE[self.operator])) { - var reversed = make_node(AST_Binary, self, { - operator: self.operator, - left: self.right, - right: self.left - }); - if (self.right instanceof AST_Constant - && !(self.left instanceof AST_Constant)) { - self = best_of(compressor, reversed, self); - } else { - self = best_of(compressor, self, reversed); - } - } - if (!associative || !self.is_number(compressor)) break; - // a + (b + c) ---> (a + b) + c - if (self.right instanceof AST_Binary - && self.right.operator != "%" - && PRECEDENCE[self.right.operator] == PRECEDENCE[self.operator] - && self.right.is_number(compressor) - && (self.operator != "+" - || self.right.left.is_boolean(compressor) - || self.right.left.is_number(compressor)) - && (self.operator != "-" || !self.left.is_negative_zero()) - && (self.right.left.is_constant_expression() - || !self.right.right.has_side_effects(compressor)) - && !is_modify_array(self.right.right)) { - self = make_node(AST_Binary, self, { - operator: align(self.operator, self.right.operator), - left: make_node(AST_Binary, self.left, { - operator: self.operator, - left: self.left, - right: self.right.left, - start: self.left.start, - end: self.right.left.end - }), - right: self.right.right - }); - if (self.operator == "+" - && !self.right.is_boolean(compressor) - && !self.right.is_number(compressor)) { - self.right = make_node(AST_UnaryPrefix, self.right, { - operator: "+", - expression: self.right - }); - } - } - // (2 * n) * 3 ---> 6 * n - // (n + 2) + 3 ---> n + 5 - if (self.right instanceof AST_Constant - && self.left instanceof AST_Binary - && self.left.operator != "%" - && PRECEDENCE[self.left.operator] == PRECEDENCE[self.operator] - && self.left.is_number(compressor)) { - if (self.left.left instanceof AST_Constant) { - var lhs = make_binary(self.left, self.operator, self.left.left, self.right, self.left.left.start, self.right.end); - self = make_binary(self, self.left.operator, try_evaluate(compressor, lhs), self.left.right); - } else if (self.left.right instanceof AST_Constant) { - var op = align(self.left.operator, self.operator); - var rhs = try_evaluate(compressor, make_binary(self.left, op, self.left.right, self.right)); - if (rhs.is_constant() - && !(self.left.operator == "-" - && self.right.value != 0 - && +rhs.value == 0 - && self.left.left.is_negative_zero())) { - self = make_binary(self, self.left.operator, self.left.left, rhs); - } - } - } - break; - } - if (!(parent instanceof AST_UnaryPrefix && parent.operator == "delete")) { - if (self.left instanceof AST_Number && !self.right.is_constant()) switch (self.operator) { - // 0 + n ---> n - case "+": - if (self.left.value == 0) { - if (self.right.is_boolean(compressor)) return make_node(AST_UnaryPrefix, self, { - operator: "+", - expression: self.right - }).optimize(compressor); - if (self.right.is_number(compressor) && !self.right.is_negative_zero()) return self.right; - } - break; - // 1 * n ---> n - case "*": - if (self.left.value == 1) { - return self.right.is_number(compressor) ? self.right : make_node(AST_UnaryPrefix, self, { - operator: "+", - expression: self.right - }).optimize(compressor); - } - break; - } - if (self.right instanceof AST_Number && !self.left.is_constant()) switch (self.operator) { - // n + 0 ---> n - case "+": - if (self.right.value == 0) { - if (self.left.is_boolean(compressor)) return make_node(AST_UnaryPrefix, self, { - operator: "+", - expression: self.left - }).optimize(compressor); - if (self.left.is_number(compressor) && !self.left.is_negative_zero()) return self.left; - } - break; - // n - 0 ---> n - case "-": - if (self.right.value == 0) { - return self.left.is_number(compressor) ? self.left : make_node(AST_UnaryPrefix, self, { - operator: "+", - expression: self.left - }).optimize(compressor); - } - break; - // n / 1 ---> n - case "/": - if (self.right.value == 1) { - return self.left.is_number(compressor) ? self.left : make_node(AST_UnaryPrefix, self, { - operator: "+", - expression: self.left - }).optimize(compressor); - } - break; - } - } - } - if (compressor.option("typeofs")) switch (self.operator) { - case "&&": - mark_locally_defined(self.left, self.right, null); - break; - case "||": - mark_locally_defined(self.left, null, self.right); - break; - } - if (compressor.option("unsafe")) { - var indexRight = is_indexFn(self.right); - if (in_bool - && indexRight - && (self.operator == "==" || self.operator == "!=") - && self.left instanceof AST_Number - && self.left.value == 0) { - return (self.operator == "==" ? make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: self.right - }) : self.right).optimize(compressor); - } - var indexLeft = is_indexFn(self.left); - if (compressor.option("comparisons") && is_indexOf_match_pattern()) { - var node = make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: make_node(AST_UnaryPrefix, self, { - operator: "~", - expression: indexLeft ? self.left : self.right - }) - }); - switch (self.operator) { - case "<": - if (indexLeft) break; - case "<=": - case "!=": - node = make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: node - }); - break; - } - return node.optimize(compressor); - } - } - return try_evaluate(compressor, self); - - function is_modify_array(node) { - var found = false; - node.walk(new TreeWalker(function(node) { - if (found) return true; - if (node instanceof AST_Assign) { - if (node.left instanceof AST_PropAccess) return found = true; - } else if (node instanceof AST_Unary) { - if (unary_side_effects[node.operator] && node.expression instanceof AST_PropAccess) { - return found = true; - } - } - })); - return found; - } - - function align(ref, op) { - switch (ref) { - case "-": - return op == "+" ? "-" : "+"; - case "/": - return op == "*" ? "/" : "*"; - default: - return op; - } - } - - function make_binary(orig, op, left, right, start, end) { - if (op == "+") { - if (!left.is_boolean(compressor) && !left.is_number(compressor)) { - left = make_node(AST_UnaryPrefix, left, { - operator: "+", - expression: left - }); - } - if (!right.is_boolean(compressor) && !right.is_number(compressor)) { - right = make_node(AST_UnaryPrefix, right, { - operator: "+", - expression: right - }); - } - } - return make_node(AST_Binary, orig, { - operator: op, - left: left, - right: right, - start: start, - end: end - }); - } - - function is_indexFn(node) { - return node.TYPE == "Call" - && node.expression instanceof AST_Dot - && indexFns[node.expression.property]; - } - - function is_indexOf_match_pattern() { - switch (self.operator) { - case "<=": - // 0 <= array.indexOf(string) ---> !!~array.indexOf(string) - return indexRight && self.left instanceof AST_Number && self.left.value == 0; - case "<": - // array.indexOf(string) < 0 ---> !~array.indexOf(string) - if (indexLeft && self.right instanceof AST_Number && self.right.value == 0) return true; - // -1 < array.indexOf(string) ---> !!~array.indexOf(string) - case "==": - case "!=": - // -1 == array.indexOf(string) ---> !~array.indexOf(string) - // -1 != array.indexOf(string) ---> !!~array.indexOf(string) - if (!indexRight) return false; - return self.left instanceof AST_Number && self.left.value == -1 - || self.left instanceof AST_UnaryPrefix && self.left.operator == "-" - && self.left.expression instanceof AST_Number && self.left.expression.value == 1; - } - } - }); - - OPT(AST_SymbolExport, function(self) { - return self; - }); - - function recursive_ref(compressor, def) { - var level = 0, node = compressor.self(); - do { - if (is_lambda(node) && node.name && node.name.definition() === def) return node; - } while (node = compressor.parent(level++)); - } - - function same_scope(def) { - var scope = def.scope.resolve(); - return all(def.references, function(ref) { - return scope === ref.scope.resolve(); - }); - } - - OPT(AST_SymbolRef, function(self, compressor) { - if (!compressor.option("ie8") - && is_undeclared_ref(self) - // testing against `self.scope.uses_with` is an optimization - && !(self.scope.resolve().uses_with && compressor.find_parent(AST_With))) { - switch (self.name) { - case "undefined": - return make_node(AST_Undefined, self).optimize(compressor); - case "NaN": - return make_node(AST_NaN, self).optimize(compressor); - case "Infinity": - return make_node(AST_Infinity, self).optimize(compressor); - } - } - var parent = compressor.parent(); - if (compressor.option("reduce_vars") && is_lhs(compressor.self(), parent) !== compressor.self()) { - var def = self.definition(); - var fixed = self.fixed_value(); - var single_use = def.single_use && !(parent instanceof AST_Call && parent.is_expr_pure(compressor)); - if (single_use) { - if (is_lambda(fixed)) { - if ((def.scope !== self.scope.resolve() || def.in_loop) - && (!compressor.option("reduce_funcs") || def.escaped.depth == 1 || fixed.inlined)) { - single_use = false; - } else if (recursive_ref(compressor, def)) { - single_use = false; - } else if (fixed.name && fixed.name.definition() !== def) { - single_use = false; - } else if (fixed.parent_scope !== self.scope || is_funarg(def)) { - single_use = fixed.is_constant_expression(self.scope); - if (single_use == "f") { - var scope = self.scope; - do { - if (scope instanceof AST_LambdaDefinition || scope instanceof AST_LambdaExpression) { - scope.inlined = true; - } - } while (scope = scope.parent_scope); - } - } else if (fixed.name && (fixed.name.name == "await" && is_async(fixed) - || fixed.name.name == "yield" && is_generator(fixed))) { - single_use = false; - } else if (fixed.has_side_effects(compressor)) { - single_use = false; - } else if (compressor.option("ie8") && fixed instanceof AST_Class) { - single_use = false; - } - if (single_use) fixed.parent_scope = self.scope; - } else if (!fixed || !fixed.is_constant_expression() || fixed.drop_side_effect_free(compressor)) { - single_use = false; - } - } - if (single_use) { - def.single_use = false; - fixed._squeezed = true; - fixed.single_use = true; - if (fixed instanceof AST_DefClass) fixed = to_class_expr(fixed); - if (fixed instanceof AST_LambdaDefinition) fixed = to_func_expr(fixed); - if (is_lambda(fixed)) { - var scope = self.scope.resolve(); - fixed.enclosed.forEach(function(def) { - if (fixed.variables.has(def.name)) return; - if (scope.var_names()[def.name]) return; - scope.enclosed.push(def); - scope.var_names()[def.name] = true; - }); - } - var value; - if (def.recursive_refs > 0) { - value = fixed.clone(true); - var defun_def = value.name.definition(); - var lambda_def = value.variables.get(value.name.name); - var name = lambda_def && lambda_def.orig[0]; - var def_fn_name, symbol_type; - if (value instanceof AST_Class) { - def_fn_name = "def_function"; - symbol_type = AST_SymbolClass; - } else { - def_fn_name = "def_variable"; - symbol_type = AST_SymbolLambda; - } - if (!(name instanceof symbol_type)) { - name = make_node(symbol_type, value.name, value.name); - name.scope = value; - value.name = name; - lambda_def = value[def_fn_name](name); - lambda_def.recursive_refs = def.recursive_refs; - } - value.walk(new TreeWalker(function(node) { - if (node instanceof AST_SymbolDeclaration) { - if (node !== name) { - var def = node.definition(); - def.orig.push(node); - def.eliminated++; - } - return; - } - if (!(node instanceof AST_SymbolRef)) return; - var def = node.definition(); - if (def === defun_def) { - node.thedef = lambda_def; - lambda_def.references.push(node); - } else { - def.single_use = false; - var fn = node.fixed_value(); - if (!is_lambda(fn)) return; - if (!fn.name) return; - if (fn.name.definition() !== def) return; - if (def.scope !== fn.name.scope) return; - if (fixed.variables.get(fn.name.name) !== def) return; - fn.name = fn.name.clone(); - var value_def = value.variables.get(fn.name.name) || value[def_fn_name](fn.name); - node.thedef = value_def; - value_def.references.push(node); - } - })); - } else { - if (fixed instanceof AST_Scope) { - compressor.push(fixed); - value = fixed.optimize(compressor); - compressor.pop(); - } else { - value = fixed.optimize(compressor); - } - value = value.transform(new TreeTransformer(function(node, descend) { - if (node instanceof AST_Scope) return node; - node = node.clone(); - descend(node, this); - return node; - })); - } - def.replaced++; - return value; - } - var local = self.fixed !== def.fixed; - if (fixed && (local || def.should_replace !== false)) { - var init; - if (fixed instanceof AST_This) { - if (!is_funarg(def) && same_scope(def)) { - init = fixed; - } - } else { - var ev = fixed.evaluate(compressor, true); - if (ev !== fixed - && typeof ev != "function" - && (typeof ev != "object" - || ev instanceof RegExp - && compressor.option("unsafe_regexp") - && !def.cross_loop && same_scope(def))) { - init = make_node_from_constant(ev, fixed); - } - } - if (init) { - if (!local && def.should_replace === undefined) { - var value_length = init.optimize(compressor).print_to_string().length; - if (!has_symbol_ref(fixed)) { - value_length = Math.min(value_length, fixed.print_to_string().length); - } - var name_length = def.name.length; - if (compressor.option("unused") && !compressor.exposed(def)) { - var referenced = def.references.length - def.replaced; - name_length += (name_length + 2 + value_length) / (referenced - def.assignments); - } - var delta = value_length - Math.floor(name_length); - def.should_replace = delta < compressor.eval_threshold; - } - if (local || def.should_replace) { - var value; - if (has_symbol_ref(fixed)) { - value = init.optimize(compressor); - if (value === init) value = value.clone(true); - } else { - value = best_of_expression(init.optimize(compressor), fixed); - if (value === init || value === fixed) value = value.clone(true); - } - def.replaced++; - return value; - } - } - } - } - return self; - - function has_symbol_ref(value) { - var found; - value.walk(new TreeWalker(function(node) { - if (node instanceof AST_SymbolRef) found = true; - if (found) return true; - })); - return found; - } - }); - - function is_raw_tag(compressor, tag) { - return compressor.option("unsafe") - && tag instanceof AST_Dot - && tag.property == "raw" - && is_undeclared_ref(tag.expression) - && tag.expression.name == "String"; - } - - OPT(AST_Template, function(self, compressor) { - if (!compressor.option("templates")) return self; - var tag = self.tag; - if (!tag || is_raw_tag(compressor, tag)) { - var exprs = self.expressions.slice(); - var strs = self.strings.slice(); - var CHANGED = false; - for (var i = exprs.length; --i >= 0;) { - var node = exprs[i]; - var ev = node.evaluate(compressor); - if (ev === node) continue; - if (tag && /\r|\\|`/.test(ev)) continue; - ev = ("" + ev).replace(/\r|\\|`/g, function(s) { - return "\\" + (s == "\r" ? "r" : s); - }); - if (ev.length > node.print_to_string().length + 3) continue; - var combined = strs[i] + ev + strs[i + 1]; - if (typeof make_node(AST_Template, self, { - expressions: [], - strings: [ combined ], - tag: tag, - }).evaluate(compressor) != typeof make_node(AST_Template, self, { - expressions: [ node ], - strings: strs.slice(i, i + 2), - tag: tag, - }).evaluate(compressor)) continue; - exprs.splice(i, 1); - strs.splice(i, 2, combined); - CHANGED = true; - } - if (CHANGED) { - self.expressions = exprs; - self.strings = strs; - } - } - return try_evaluate(compressor, self); - }); - - function is_atomic(lhs, self) { - return lhs instanceof AST_SymbolRef || lhs.TYPE === self.TYPE; - } - - OPT(AST_Undefined, function(self, compressor) { - if (compressor.option("unsafe_undefined")) { - var undef = find_scope(compressor).find_variable("undefined"); - if (undef) { - var ref = make_node(AST_SymbolRef, self, { - name : "undefined", - scope : undef.scope, - thedef : undef - }); - ref.is_undefined = true; - return ref; - } - } - var lhs = is_lhs(compressor.self(), compressor.parent()); - if (lhs && is_atomic(lhs, self)) return self; - return make_node(AST_UnaryPrefix, self, { - operator: "void", - expression: make_node(AST_Number, self, { - value: 0 - }) - }); - }); - - OPT(AST_Infinity, function(self, compressor) { - var lhs = is_lhs(compressor.self(), compressor.parent()); - if (lhs && is_atomic(lhs, self)) return self; - if (compressor.option("keep_infinity") && !lhs && !find_scope(compressor).find_variable("Infinity")) { - return self; - } - return make_node(AST_Binary, self, { - operator: "/", - left: make_node(AST_Number, self, { - value: 1 - }), - right: make_node(AST_Number, self, { - value: 0 - }) - }); - }); - - OPT(AST_NaN, function(self, compressor) { - var lhs = is_lhs(compressor.self(), compressor.parent()); - if (lhs && is_atomic(lhs, self)) return self; - if (!lhs && !find_scope(compressor).find_variable("NaN")) return self; - return make_node(AST_Binary, self, { - operator: "/", - left: make_node(AST_Number, self, { - value: 0 - }), - right: make_node(AST_Number, self, { - value: 0 - }) - }); - }); - - function is_reachable(self, defs) { - var reachable = false; - var find_ref = new TreeWalker(function(node) { - if (reachable) return true; - if (node instanceof AST_SymbolRef && member(node.definition(), defs)) { - return reachable = true; - } - }); - var scan_scope = new TreeWalker(function(node) { - if (reachable) return true; - if (node instanceof AST_Lambda && node !== self) { - if (!(node.name || is_async(node) || is_generator(node))) { - var parent = scan_scope.parent(); - if (parent instanceof AST_Call && parent.expression === node) return; - } - node.walk(find_ref); - return true; - } - }); - self.walk(scan_scope); - return reachable; - } - - var ASSIGN_OPS = makePredicate("+ - * / % >> << >>> | ^ &"); - var ASSIGN_OPS_COMMUTATIVE = makePredicate("* | ^ &"); - OPT(AST_Assign, function(self, compressor) { - if (compressor.option("dead_code")) { - if (self.left instanceof AST_PropAccess) { - if (self.operator == "=") { - if (self.__drop) { - var exprs = [ self.left.expression ]; - if (self.left instanceof AST_Sub) exprs.push(self.left.property); - exprs.push(self.right); - return make_sequence(self, exprs).optimize(compressor); - } - if (self.left.equivalent_to(self.right) && !self.left.has_side_effects(compressor)) { - return self.right; - } - var exp = self.left.expression; - if (exp instanceof AST_Lambda - || !compressor.has_directive("use strict") - && exp instanceof AST_Constant - && !exp.may_throw_on_access(compressor)) { - return self.left instanceof AST_Dot ? self.right : make_sequence(self, [ - self.left.property, - self.right - ]).optimize(compressor); - } - } - } else if (self.left instanceof AST_SymbolRef && can_drop_symbol(self.left, compressor)) { - var parent; - if (self.operator == "=" && self.left.equivalent_to(self.right) - && !((parent = compressor.parent()) instanceof AST_UnaryPrefix && parent.operator == "delete")) { - return self.right; - } - if (self.left.is_immutable()) return strip_assignment(); - var def = self.left.definition(); - var scope = def.scope.resolve(); - var local = scope === compressor.find_parent(AST_Lambda); - var level = 0, node; - parent = compressor.self(); - do { - node = parent; - parent = compressor.parent(level++); - if (parent instanceof AST_Assign) { - var found = false; - if (parent.left.match_symbol(function(node) { - if (node instanceof AST_PropAccess) return true; - if (!found && node instanceof AST_SymbolRef && node.definition() === def) { - if (in_try(level, parent)) return true; - found = true; - } - })) break; - if (!found) continue; - return strip_assignment(def); - } - if (parent instanceof AST_Exit) { - if (!local) break; - if (in_try(level, parent)) break; - if (is_reachable(scope, [ def ])) break; - return strip_assignment(def); - } - if (parent instanceof AST_SimpleStatement) { - if (!local) break; - if (is_reachable(scope, [ def ])) break; - var stat; - do { - stat = parent; - parent = compressor.parent(level++); - if (parent === scope && is_last_statement(parent.body, stat)) return strip_assignment(def); - } while (is_tail_block(stat, parent)); - break; - } - if (parent instanceof AST_VarDef) { - if (!(parent.name instanceof AST_SymbolDeclaration)) continue; - if (parent.name.definition() !== def) continue; - if (in_try(level, parent)) break; - return strip_assignment(def); - } - } while (is_tail(node, parent)); - } - } - if (compressor.option("sequences")) { - var seq = self.lift_sequences(compressor); - if (seq !== self) return seq.optimize(compressor); - } - if (compressor.option("assignments")) { - if (self.operator == "=" && self.left instanceof AST_SymbolRef && self.right instanceof AST_Binary) { - // x = expr1 OP expr2 - if (self.right.left instanceof AST_SymbolRef - && self.right.left.name == self.left.name - && ASSIGN_OPS[self.right.operator]) { - // x = x - 2 ---> x -= 2 - return make_node(AST_Assign, self, { - operator: self.right.operator + "=", - left: self.left, - right: self.right.right, - }); - } - if (self.right.right instanceof AST_SymbolRef - && self.right.right.name == self.left.name - && ASSIGN_OPS_COMMUTATIVE[self.right.operator] - && !self.right.left.has_side_effects(compressor)) { - // x = 2 & x ---> x &= 2 - return make_node(AST_Assign, self, { - operator: self.right.operator + "=", - left: self.left, - right: self.right.left, - }); - } - } - if ((self.operator == "-=" || self.operator == "+=" - && (self.left.is_boolean(compressor) || self.left.is_number(compressor))) - && self.right instanceof AST_Number - && self.right.value == 1) { - var op = self.operator.slice(0, -1); - return make_node(AST_UnaryPrefix, self, { - operator: op + op, - expression: self.left - }); - } - } - return try_evaluate(compressor, self); - - function is_tail(node, parent) { - if (parent instanceof AST_Binary) { - return parent.right === node || parent.right.is_constant_expression(scope); - } - if (parent instanceof AST_Conditional) { - return parent.condition !== node - || parent.consequent.is_constant_expression(scope) - && parent.alternative.is_constant_expression(scope); - } - if (parent instanceof AST_Sequence) { - var exprs = parent.expressions; - var stop = exprs.indexOf(node); - if (stop < 0) return false; - for (var i = exprs.length; --i > stop;) { - if (!exprs[i].is_constant_expression(scope)) return false; - } - return true; - } - if (parent instanceof AST_UnaryPrefix) return true; - } - - function is_tail_block(stat, parent) { - if (parent instanceof AST_BlockStatement) return is_last_statement(parent.body, stat); - if (parent instanceof AST_Catch) return is_last_statement(parent.body, stat); - if (parent instanceof AST_Finally) return is_last_statement(parent.body, stat); - if (parent instanceof AST_If) return parent.body === stat || parent.alternative === stat; - if (parent instanceof AST_Try) return parent.bfinally ? parent.bfinally === stat : parent.bcatch === stat; - } - - function in_try(level, node) { - var right = self.right; - self.right = make_node(AST_Null, right); - var may_throw = node.may_throw(compressor); - self.right = right; - for (var parent; parent = compressor.parent(level++); node = parent) { - if (parent === scope) return false; - if (parent instanceof AST_Try) { - if (parent.bfinally && parent.bfinally !== node) return true; - if (may_throw && parent.bcatch && parent.bcatch !== node) return true; - } - } - } - - function strip_assignment(def) { - if (def) def.fixed = false; - return (self.operator != "=" ? make_node(AST_Binary, self, { - operator: self.operator.slice(0, -1), - left: self.left, - right: self.right, - }) : maintain_this_binding(compressor, compressor.parent(), self, self.right)).optimize(compressor); - } - }); - - OPT(AST_Conditional, function(self, compressor) { - if (compressor.option("sequences") && self.condition instanceof AST_Sequence) { - var expressions = self.condition.expressions.slice(); - self.condition = expressions.pop(); - expressions.push(self); - return make_sequence(self, expressions); - } - if (!compressor.option("conditionals")) return self; - var condition = self.condition; - if (compressor.option("booleans") && !condition.has_side_effects(compressor)) { - mark_duplicate_condition(compressor, condition); - } - condition = fuzzy_eval(compressor, condition); - if (!condition) { - AST_Node.warn("Condition always false [{file}:{line},{col}]", self.start); - return make_sequence(self, [ self.condition, self.alternative ]).optimize(compressor); - } else if (!(condition instanceof AST_Node)) { - AST_Node.warn("Condition always true [{file}:{line},{col}]", self.start); - return make_sequence(self, [ self.condition, self.consequent ]).optimize(compressor); - } - var negated = condition.negate(compressor, first_in_statement(compressor)); - if (best_of(compressor, condition, negated) === negated) { - self = make_node(AST_Conditional, self, { - condition: negated, - consequent: self.alternative, - alternative: self.consequent - }); - negated = condition; - condition = self.condition; - } - var consequent = self.consequent; - var alternative = self.alternative; - if (repeatable(compressor, condition)) { - // x ? x : y ---> x || y - if (condition.equivalent_to(consequent)) return make_node(AST_Binary, self, { - operator: "||", - left: condition, - right: alternative, - }).optimize(compressor); - // x ? y : x ---> x && y - if (condition.equivalent_to(alternative)) return make_node(AST_Binary, self, { - operator: "&&", - left: condition, - right: consequent, - }).optimize(compressor); - } - // if (foo) exp = something; else exp = something_else; - // | - // v - // exp = foo ? something : something_else; - var seq_tail = consequent.tail_node(); - if (seq_tail instanceof AST_Assign) { - var is_eq = seq_tail.operator == "="; - var alt_tail = is_eq ? alternative.tail_node() : alternative; - if ((is_eq || consequent === seq_tail) - && alt_tail instanceof AST_Assign - && seq_tail.operator == alt_tail.operator - && seq_tail.left.equivalent_to(alt_tail.left) - && (is_eq && seq_tail.left instanceof AST_SymbolRef - || !condition.has_side_effects(compressor) - && can_shift_lhs_of_tail(consequent) - && can_shift_lhs_of_tail(alternative))) { - return make_node(AST_Assign, self, { - operator: seq_tail.operator, - left: seq_tail.left, - right: make_node(AST_Conditional, self, { - condition: condition, - consequent: pop_lhs(consequent), - alternative: pop_lhs(alternative) - }) - }); - } - } - // x ? y : y ---> x, y - if (consequent.equivalent_to(alternative)) return make_sequence(self, [ - condition, - consequent - ]).optimize(compressor); - // x ? y.p : z.p ---> (x ? y : z).p - // x ? y(a) : z(a) ---> (x ? y : z)(a) - // x ? y.f(a) : z.f(a) ---> (x ? y : z).f(a) - var combined = combine_tail(consequent, alternative, true); - if (combined) return combined; - // x ? y(a) : y(b) ---> y(x ? a : b) - var arg_index; - if (consequent instanceof AST_Call - && alternative.TYPE == consequent.TYPE - && (arg_index = arg_diff(consequent, alternative)) >= 0 - && consequent.expression.equivalent_to(alternative.expression) - && !condition.has_side_effects(compressor) - && !consequent.expression.has_side_effects(compressor)) { - var node = consequent.clone(); - var arg = consequent.args[arg_index]; - node.args[arg_index] = arg instanceof AST_Spread ? make_node(AST_Spread, self, { - expression: make_node(AST_Conditional, self, { - condition: condition, - consequent: arg.expression, - alternative: alternative.args[arg_index].expression, - }), - }) : make_node(AST_Conditional, self, { - condition: condition, - consequent: arg, - alternative: alternative.args[arg_index], - }); - return node; - } - // x ? (y ? a : b) : b ---> x && y ? a : b - if (consequent instanceof AST_Conditional - && consequent.alternative.equivalent_to(alternative)) { - return make_node(AST_Conditional, self, { - condition: make_node(AST_Binary, self, { - left: condition, - operator: "&&", - right: consequent.condition - }), - consequent: consequent.consequent, - alternative: alternative - }); - } - // x ? (y ? a : b) : a ---> !x || y ? a : b - if (consequent instanceof AST_Conditional - && consequent.consequent.equivalent_to(alternative)) { - return make_node(AST_Conditional, self, { - condition: make_node(AST_Binary, self, { - left: negated, - operator: "||", - right: consequent.condition - }), - consequent: alternative, - alternative: consequent.alternative - }); - } - // x ? a : (y ? a : b) ---> x || y ? a : b - if (alternative instanceof AST_Conditional - && consequent.equivalent_to(alternative.consequent)) { - return make_node(AST_Conditional, self, { - condition: make_node(AST_Binary, self, { - left: condition, - operator: "||", - right: alternative.condition - }), - consequent: consequent, - alternative: alternative.alternative - }); - } - // x ? b : (y ? a : b) ---> !x && y ? a : b - if (alternative instanceof AST_Conditional - && consequent.equivalent_to(alternative.alternative)) { - return make_node(AST_Conditional, self, { - condition: make_node(AST_Binary, self, { - left: negated, - operator: "&&", - right: alternative.condition - }), - consequent: alternative.consequent, - alternative: consequent - }); - } - // x ? (a, c) : (b, c) ---> x ? a : b, c - if ((consequent instanceof AST_Sequence || alternative instanceof AST_Sequence) - && consequent.tail_node().equivalent_to(alternative.tail_node())) { - return make_sequence(self, [ - make_node(AST_Conditional, self, { - condition: condition, - consequent: pop_seq(consequent), - alternative: pop_seq(alternative) - }), - consequent.tail_node() - ]).optimize(compressor); - } - // x ? y && a : a ---> (!x || y) && a - if (consequent instanceof AST_Binary - && consequent.operator == "&&" - && consequent.right.equivalent_to(alternative)) { - return make_node(AST_Binary, self, { - operator: "&&", - left: make_node(AST_Binary, self, { - operator: "||", - left: negated, - right: consequent.left - }), - right: alternative - }).optimize(compressor); - } - // x ? y || a : a ---> x && y || a - if (consequent instanceof AST_Binary - && consequent.operator == "||" - && consequent.right.equivalent_to(alternative)) { - return make_node(AST_Binary, self, { - operator: "||", - left: make_node(AST_Binary, self, { - operator: "&&", - left: condition, - right: consequent.left - }), - right: alternative - }).optimize(compressor); - } - // x ? a : y && a ---> (x || y) && a - if (alternative instanceof AST_Binary - && alternative.operator == "&&" - && alternative.right.equivalent_to(consequent)) { - return make_node(AST_Binary, self, { - operator: "&&", - left: make_node(AST_Binary, self, { - operator: "||", - left: condition, - right: alternative.left - }), - right: consequent - }).optimize(compressor); - } - // x ? a : y || a ---> !x && y || a - if (alternative instanceof AST_Binary - && alternative.operator == "||" - && alternative.right.equivalent_to(consequent)) { - return make_node(AST_Binary, self, { - operator: "||", - left: make_node(AST_Binary, self, { - operator: "&&", - left: negated, - right: alternative.left - }), - right: consequent - }).optimize(compressor); - } - var in_bool = compressor.option("booleans") && compressor.in_boolean_context(); - if (is_true(consequent)) { - if (is_false(alternative)) { - // c ? true : false ---> !!c - return booleanize(condition); - } - // c ? true : x ---> !!c || x - return make_node(AST_Binary, self, { - operator: "||", - left: booleanize(condition), - right: alternative - }); - } - if (is_false(consequent)) { - if (is_true(alternative)) { - // c ? false : true ---> !c - return booleanize(condition.negate(compressor)); - } - // c ? false : x ---> !c && x - return make_node(AST_Binary, self, { - operator: "&&", - left: booleanize(condition.negate(compressor)), - right: alternative - }); - } - if (is_true(alternative)) { - // c ? x : true ---> !c || x - return make_node(AST_Binary, self, { - operator: "||", - left: booleanize(condition.negate(compressor)), - right: consequent - }); - } - if (is_false(alternative)) { - // c ? x : false ---> !!c && x - return make_node(AST_Binary, self, { - operator: "&&", - left: booleanize(condition), - right: consequent - }); - } - if (compressor.option("typeofs")) mark_locally_defined(condition, consequent, alternative); - return self; - - function booleanize(node) { - if (node.is_boolean(compressor)) return node; - // !!expression - return make_node(AST_UnaryPrefix, node, { - operator: "!", - expression: node.negate(compressor) - }); - } - - // AST_True or !0 - function is_true(node) { - return node instanceof AST_True - || in_bool - && node instanceof AST_Constant - && node.value - || (node instanceof AST_UnaryPrefix - && node.operator == "!" - && node.expression instanceof AST_Constant - && !node.expression.value); - } - // AST_False or !1 or void 0 - function is_false(node) { - return node instanceof AST_False - || in_bool - && (node instanceof AST_Constant - && !node.value - || node instanceof AST_UnaryPrefix - && node.operator == "void" - && !node.expression.has_side_effects(compressor)) - || (node instanceof AST_UnaryPrefix - && node.operator == "!" - && node.expression instanceof AST_Constant - && node.expression.value); - } - - function arg_diff(consequent, alternative) { - var a = consequent.args; - var b = alternative.args; - var len = a.length; - if (len != b.length) return -2; - for (var i = 0; i < len; i++) { - if (!a[i].equivalent_to(b[i])) { - if (a[i] instanceof AST_Spread !== b[i] instanceof AST_Spread) return -3; - for (var j = i + 1; j < len; j++) { - if (!a[j].equivalent_to(b[j])) return -2; - } - return i; - } - } - return -1; - } - - function is_tail_equivalent(consequent, alternative) { - if (consequent.TYPE != alternative.TYPE) return; - if (consequent.optional != alternative.optional) return; - if (consequent instanceof AST_Call) { - if (arg_diff(consequent, alternative) != -1) return; - return consequent.TYPE != "Call" - || !(consequent.expression instanceof AST_PropAccess - || alternative.expression instanceof AST_PropAccess) - || is_tail_equivalent(consequent.expression, alternative.expression); - } - if (!(consequent instanceof AST_PropAccess)) return; - var p = consequent.property; - var q = alternative.property; - return (p instanceof AST_Node ? p.equivalent_to(q) : p == q) - && !(consequent.expression instanceof AST_Super || alternative.expression instanceof AST_Super); - } - - function combine_tail(consequent, alternative, top) { - if (!is_tail_equivalent(consequent, alternative)) return !top && make_node(AST_Conditional, self, { - condition: condition, - consequent: consequent, - alternative: alternative, - }); - var node = consequent.clone(); - node.expression = combine_tail(consequent.expression, alternative.expression); - return node; - } - - function can_shift_lhs_of_tail(node) { - return node === node.tail_node() || all(node.expressions.slice(0, -1), function(expr) { - return !expr.has_side_effects(compressor); - }); - } - - function pop_lhs(node) { - if (!(node instanceof AST_Sequence)) return node.right; - var exprs = node.expressions.slice(); - exprs.push(exprs.pop().right); - return make_sequence(node, exprs); - } - - function pop_seq(node) { - if (!(node instanceof AST_Sequence)) return make_node(AST_Number, node, { - value: 0 - }); - return make_sequence(node, node.expressions.slice(0, -1)); - } - }); - - OPT(AST_Boolean, function(self, compressor) { - if (!compressor.option("booleans")) return self; - if (compressor.in_boolean_context()) return make_node(AST_Number, self, { - value: +self.value - }); - var p = compressor.parent(); - if (p instanceof AST_Binary && (p.operator == "==" || p.operator == "!=")) { - AST_Node.warn("Non-strict equality against boolean: {operator} {value} [{file}:{line},{col}]", { - operator : p.operator, - value : self.value, - file : p.start.file, - line : p.start.line, - col : p.start.col, - }); - return make_node(AST_Number, self, { - value: +self.value - }); - } - return make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: make_node(AST_Number, self, { - value: 1 - self.value - }) - }); - }); - - OPT(AST_Spread, function(self, compressor) { - var exp = self.expression; - if (compressor.option("spreads") && exp instanceof AST_Array && !(compressor.parent() instanceof AST_Object)) { - return List.splice(exp.elements.map(function(node) { - return node instanceof AST_Hole ? make_node(AST_Undefined, node).optimize(compressor) : node; - })); - } - return self; - }); - - function safe_to_flatten(value, compressor) { - if (value instanceof AST_SymbolRef) { - value = value.fixed_value(); - } - if (!value) return false; - if (!(value instanceof AST_Lambda)) return true; - var parent = compressor.parent(); - if (parent.TYPE != "Call") return true; - if (parent.expression !== compressor.self()) return true; - return !value.contains_this(); - } - - OPT(AST_Sub, function(self, compressor) { - var expr = self.expression; - var prop = self.property; - var terminated = trim_optional_chain(self, compressor); - if (terminated) return terminated; - if (compressor.option("properties")) { - var key = prop.evaluate(compressor); - if (key !== prop) { - if (typeof key == "string") { - if (key == "undefined") { - key = undefined; - } else { - var value = parseFloat(key); - if (value.toString() == key) { - key = value; - } - } - } - prop = self.property = best_of_expression(prop, make_node_from_constant(key, prop).transform(compressor)); - var property = "" + key; - if (is_identifier_string(property) - && property.length <= prop.print_to_string().length + 1) { - return make_node(AST_Dot, self, { - optional: self.optional, - expression: expr, - property: property, - }).optimize(compressor); - } - } - } - var parent = compressor.parent(); - var assigned = is_lhs(compressor.self(), parent); - var def, fn, fn_parent, index; - if (compressor.option("arguments") - && expr instanceof AST_SymbolRef - && is_arguments(def = expr.definition()) - && !expr.in_arg - && prop instanceof AST_Number - && Math.floor(index = prop.value) == index - && (fn = def.scope) === find_lambda() - && fn.uses_arguments < (assigned ? 2 : 3)) { - if (parent instanceof AST_UnaryPrefix && parent.operator == "delete") { - if (!def.deleted) def.deleted = []; - def.deleted[index] = true; - } - var argname = fn.argnames[index]; - if (def.deleted && def.deleted[index]) { - argname = null; - } else if (argname) { - var arg_def; - if (!(argname instanceof AST_SymbolFunarg) - || argname.name == "await" - || expr.scope.find_variable(argname.name) !== (arg_def = argname.definition())) { - argname = null; - } else if (compressor.has_directive("use strict") - || fn.name - || fn.rest - || !(fn_parent instanceof AST_Call - && index < fn_parent.args.length - && all(fn_parent.args.slice(0, index + 1), function(arg) { - return !(arg instanceof AST_Spread); - })) - || !all(fn.argnames, function(argname) { - return argname instanceof AST_SymbolFunarg; - })) { - if (has_reassigned() || arg_def.assignments || arg_def.orig.length > 1) argname = null; - } - } else if ((assigned || !has_reassigned()) - && index < fn.argnames.length + 5 - && compressor.drop_fargs(fn, fn_parent) - && !fn.rest) { - while (index >= fn.argnames.length) { - argname = fn.make_var(AST_SymbolFunarg, fn, "argument_" + fn.argnames.length); - fn.argnames.push(argname); - } - } - if (argname && find_if(function(node) { - return node.name === argname.name; - }, fn.argnames) === argname) { - if (assigned) def.reassigned--; - var sym = make_node(AST_SymbolRef, self, argname); - sym.reference(); - delete argname.__unused; - return sym; - } - } - if (assigned) return self; - if (compressor.option("sequences") - && parent.TYPE != "Call" - && !(parent instanceof AST_ForEnumeration && parent.init === self)) { - var seq = lift_sequence_in_expression(self, compressor); - if (seq !== self) return seq.optimize(compressor); - } - if (key !== prop) { - var sub = self.flatten_object(property, compressor); - if (sub) { - expr = self.expression = sub.expression; - prop = self.property = sub.property; - } - } - var elements; - if (compressor.option("properties") - && compressor.option("side_effects") - && prop instanceof AST_Number - && expr instanceof AST_Array - && all(elements = expr.elements, function(value) { - return !(value instanceof AST_Spread); - })) { - var index = prop.value; - var retValue = elements[index]; - if (safe_to_flatten(retValue, compressor)) { - var is_hole = retValue instanceof AST_Hole; - var flatten = !is_hole; - var values = []; - for (var i = elements.length; --i > index;) { - var value = elements[i].drop_side_effect_free(compressor); - if (value) { - values.unshift(value); - if (flatten && value.has_side_effects(compressor)) flatten = false; - } - } - if (!flatten) values.unshift(retValue); - while (--i >= 0) { - var value = elements[i].drop_side_effect_free(compressor); - if (value) { - values.unshift(value); - } else if (is_hole) { - values.unshift(make_node(AST_Hole, elements[i])); - } else { - index--; - } - } - if (flatten) { - values.push(retValue); - return make_sequence(self, values).optimize(compressor); - } else return make_node(AST_Sub, self, { - expression: make_node(AST_Array, expr, { elements: values }), - property: make_node(AST_Number, prop, { value: index }), - }); - } - } - return try_evaluate(compressor, self); - - function find_lambda() { - var i = 0, p; - while (p = compressor.parent(i++)) { - if (p instanceof AST_Lambda) { - if (p instanceof AST_Accessor) return; - if (is_arrow(p)) continue; - fn_parent = compressor.parent(i); - return p; - } - } - } - - function has_reassigned() { - return !compressor.option("reduce_vars") || def.reassigned; - } - }); - - AST_Arrow.DEFMETHOD("contains_super", return_false); - AST_AsyncArrow.DEFMETHOD("contains_super", return_false); - AST_Lambda.DEFMETHOD("contains_super", function() { - var result; - var self = this; - self.walk(new TreeWalker(function(node) { - if (result) return true; - if (node instanceof AST_Super) return result = true; - if (node !== self && node instanceof AST_Scope && !is_arrow(node)) return true; - })); - return result; - }); - AST_LambdaDefinition.DEFMETHOD("contains_super", return_false); - AST_Scope.DEFMETHOD("contains_super", return_false); - - AST_Arrow.DEFMETHOD("contains_this", return_false); - AST_AsyncArrow.DEFMETHOD("contains_this", return_false); - AST_Node.DEFMETHOD("contains_this", function() { - var result; - var self = this; - self.walk(new TreeWalker(function(node) { - if (result) return true; - if (node instanceof AST_This) return result = true; - if (node !== self && node instanceof AST_Scope && !is_arrow(node)) return true; - })); - return result; - }); - - function can_hoist_property(prop) { - return prop instanceof AST_ObjectKeyVal - && typeof prop.key == "string" - && !(prop instanceof AST_ObjectMethod && prop.value.contains_super()); - } - - AST_PropAccess.DEFMETHOD("flatten_object", function(key, compressor) { - if (!compressor.option("properties")) return; - if (key === "__proto__") return; - var expr = this.expression; - if (expr instanceof AST_Object) { - var props = expr.properties; - for (var i = props.length; --i >= 0;) { - var prop = props[i]; - if (prop.key !== key) continue; - if (!all(props, can_hoist_property)) break; - if (!safe_to_flatten(prop.value, compressor)) break; - props = props.map(function(prop) { - return prop.value; - }); - if (prop instanceof AST_ObjectMethod - && prop.value instanceof AST_Function - && !(compressor.parent() instanceof AST_Call)) { - if (prop.value.uses_arguments) break; - props[i] = make_node(AST_Arrow, prop.value, prop.value); - } - return make_node(AST_Sub, this, { - expression: make_node(AST_Array, expr, { elements: props }), - property: make_node(AST_Number, this, { value: i }), - }); - } - } - }); - - OPT(AST_Dot, function(self, compressor) { - if (self.property == "arguments" || self.property == "caller") { - AST_Node.warn("Function.prototype.{prop} not supported [{file}:{line},{col}]", { - prop: self.property, - file: self.start.file, - line: self.start.line, - col: self.start.col, - }); - } - var parent = compressor.parent(); - if (is_lhs(compressor.self(), parent)) return self; - var terminated = trim_optional_chain(self, compressor); - if (terminated) return terminated; - if (compressor.option("sequences") - && parent.TYPE != "Call" - && !(parent instanceof AST_ForEnumeration && parent.init === self)) { - var seq = lift_sequence_in_expression(self, compressor); - if (seq !== self) return seq.optimize(compressor); - } - if (compressor.option("unsafe_proto") - && self.expression instanceof AST_Dot - && self.expression.property == "prototype") { - var exp = self.expression.expression; - if (is_undeclared_ref(exp)) switch (exp.name) { - case "Array": - self.expression = make_node(AST_Array, self.expression, { - elements: [] - }); - break; - case "Function": - self.expression = make_node(AST_Function, self.expression, { - argnames: [], - body: [] - }).init_vars(exp.scope); - break; - case "Number": - self.expression = make_node(AST_Number, self.expression, { - value: 0 - }); - break; - case "Object": - self.expression = make_node(AST_Object, self.expression, { - properties: [] - }); - break; - case "RegExp": - self.expression = make_node(AST_RegExp, self.expression, { - value: /t/ - }); - break; - case "String": - self.expression = make_node(AST_String, self.expression, { - value: "" - }); - break; - } - } - var sub = self.flatten_object(self.property, compressor); - if (sub) return sub.optimize(compressor); - return try_evaluate(compressor, self); - }); - - OPT(AST_DestructuredArray, function(self, compressor) { - if (compressor.option("rests") && self.rest instanceof AST_DestructuredArray) { - self.elements = self.elements.concat(self.rest.elements); - self.rest = null; - } - return self; - }); - - OPT(AST_DestructuredKeyVal, function(self, compressor) { - if (compressor.option("objects")) { - var key = self.key; - if (key instanceof AST_Node) { - key = key.evaluate(compressor); - if (key !== self.key) self.key = "" + key; - } - } - return self; - }); - - OPT(AST_Object, function(self, compressor) { - if (!compressor.option("objects")) return self; - var changed = false; - var found = false; - var generated = false; - var keep_duplicate = compressor.has_directive("use strict"); - var keys = new Dictionary(); - var values = []; - self.properties.forEach(function(prop) { - if (!(prop instanceof AST_Spread)) return process(prop); - found = true; - var exp = prop.expression; - if (compressor.option("spreads") && exp instanceof AST_Object && all(exp.properties, function(prop) { - if (prop instanceof AST_ObjectGetter) return false; - if (prop instanceof AST_Spread) return false; - if (prop.key !== "__proto__") return true; - if (prop instanceof AST_ObjectSetter) return true; - return !prop.value.has_side_effects(compressor); - })) { - changed = true; - exp.properties.forEach(function(prop) { - var key = prop.key; - var setter = prop instanceof AST_ObjectSetter; - if (key === "__proto__") { - if (!setter) return; - key = make_node_from_constant(key, prop); - } - process(setter ? make_node(AST_ObjectKeyVal, prop, { - key: key, - value: make_node(AST_Undefined, prop).optimize(compressor), - }) : prop); - }); - } else { - generated = true; - flush(); - values.push(prop); - } - }); - flush(); - if (!changed) return self; - if (found && generated && values.length == 1) { - var value = values[0]; - if (value instanceof AST_ObjectProperty && value.key instanceof AST_Number) { - value.key = "" + value.key.value; - } - } - return make_node(AST_Object, self, { properties: values }); - - function flush() { - keys.each(function(props) { - if (props.length == 1) return values.push(props[0]); - changed = true; - var tail = keep_duplicate && !generated && props.pop(); - values.push(props.length == 1 ? props[0] : make_node(AST_ObjectKeyVal, self, { - key: props[0].key, - value: make_sequence(self, props.map(function(prop) { - return prop.value; - })) - })); - if (tail) values.push(tail); - }); - keys = new Dictionary(); - } - - function process(prop) { - var key = prop.key; - if (key instanceof AST_Node) { - found = true; - key = key.evaluate(compressor); - if (key === prop.key || key === "__proto__") { - generated = true; - } else { - key = prop.key = "" + key; - } - } - if (can_hoist_property(prop)) { - if (prop.value.has_side_effects(compressor)) flush(); - keys.add(key, prop); - } else { - flush(); - values.push(prop); - } - if (found && !generated && typeof key == "string" && RE_POSITIVE_INTEGER.test(key)) { - generated = true; - if (keys.has(key)) prop = keys.get(key)[0]; - prop.key = make_node(AST_Number, prop, { value: +key }); - } - } - }); - - OPT(AST_Return, function(self, compressor) { - if (compressor.option("side_effects") - && self.value - && is_undefined(self.value, compressor) - && !in_async_generator(compressor.find_parent(AST_Scope))) { - self.value = null; - } - return self; - }); -})(function(node, optimizer) { - node.DEFMETHOD("optimize", function(compressor) { - var self = this; - if (self._optimized) return self; - if (compressor.has_directive("use asm")) return self; - var opt = optimizer(self, compressor); - opt._optimized = true; - return opt; - }); -}); diff --git a/node_modules/uglify-js/lib/minify.js b/node_modules/uglify-js/lib/minify.js deleted file mode 100644 index e85adb1f..00000000 --- a/node_modules/uglify-js/lib/minify.js +++ /dev/null @@ -1,270 +0,0 @@ -"use strict"; - -var to_ascii, to_base64; -if (typeof Buffer == "undefined") { - to_ascii = atob; - to_base64 = btoa; -} else if (typeof Buffer.alloc == "undefined") { - to_ascii = function(b64) { - return new Buffer(b64, "base64").toString(); - }; - to_base64 = function(str) { - return new Buffer(str).toString("base64"); - }; -} else { - to_ascii = function(b64) { - return Buffer.from(b64, "base64").toString(); - }; - to_base64 = function(str) { - return Buffer.from(str).toString("base64"); - }; -} - -function read_source_map(name, toplevel) { - var comments = toplevel.end.comments_after; - for (var i = comments.length; --i >= 0;) { - var comment = comments[i]; - if (comment.type != "comment1") break; - var match = /^# ([^\s=]+)=(\S+)\s*$/.exec(comment.value); - if (!match) break; - if (match[1] == "sourceMappingURL") { - match = /^data:application\/json(;.*?)?;base64,(\S+)$/.exec(match[2]); - if (!match) break; - return to_ascii(match[2]); - } - } - AST_Node.warn("inline source map not found: {name}", { - name: name, - }); -} - -function parse_source_map(content) { - try { - return JSON.parse(content); - } catch (ex) { - throw new Error("invalid input source map: " + content); - } -} - -function set_shorthand(name, options, keys) { - keys.forEach(function(key) { - if (options[key]) { - if (typeof options[key] != "object") options[key] = {}; - if (!(name in options[key])) options[key][name] = options[name]; - } - }); -} - -function init_cache(cache) { - if (!cache) return; - if (!("props" in cache)) { - cache.props = new Dictionary(); - } else if (!(cache.props instanceof Dictionary)) { - cache.props = Dictionary.fromObject(cache.props); - } -} - -function to_json(cache) { - return { - props: cache.props.toObject() - }; -} - -function minify(files, options) { - try { - options = defaults(options, { - annotations: undefined, - compress: {}, - enclose: false, - ie8: false, - keep_fnames: false, - mangle: {}, - nameCache: null, - output: {}, - parse: {}, - rename: undefined, - sourceMap: false, - timings: false, - toplevel: false, - v8: false, - validate: false, - warnings: false, - webkit: false, - wrap: false, - }, true); - if (options.validate) AST_Node.enable_validation(); - var timings = options.timings && { start: Date.now() }; - if (options.rename === undefined) options.rename = options.compress && options.mangle; - if (options.annotations !== undefined) set_shorthand("annotations", options, [ "compress", "output" ]); - if (options.ie8) set_shorthand("ie8", options, [ "compress", "mangle", "output" ]); - if (options.keep_fnames) set_shorthand("keep_fnames", options, [ "compress", "mangle" ]); - if (options.toplevel) set_shorthand("toplevel", options, [ "compress", "mangle" ]); - if (options.v8) set_shorthand("v8", options, [ "mangle", "output" ]); - if (options.webkit) set_shorthand("webkit", options, [ "compress", "mangle", "output" ]); - var quoted_props; - if (options.mangle) { - options.mangle = defaults(options.mangle, { - cache: options.nameCache && (options.nameCache.vars || {}), - eval: false, - ie8: false, - keep_fnames: false, - properties: false, - reserved: [], - toplevel: false, - v8: false, - webkit: false, - }, true); - if (options.mangle.properties) { - if (typeof options.mangle.properties != "object") { - options.mangle.properties = {}; - } - if (options.mangle.properties.keep_quoted) { - quoted_props = options.mangle.properties.reserved; - if (!Array.isArray(quoted_props)) quoted_props = []; - options.mangle.properties.reserved = quoted_props; - } - if (options.nameCache && !("cache" in options.mangle.properties)) { - options.mangle.properties.cache = options.nameCache.props || {}; - } - } - init_cache(options.mangle.cache); - init_cache(options.mangle.properties.cache); - } - if (options.sourceMap) { - options.sourceMap = defaults(options.sourceMap, { - content: null, - filename: null, - includeSources: false, - names: true, - root: null, - url: null, - }, true); - } - var warnings = []; - if (options.warnings) AST_Node.log_function(function(warning) { - warnings.push(warning); - }, options.warnings == "verbose"); - if (timings) timings.parse = Date.now(); - var toplevel; - if (files instanceof AST_Toplevel) { - toplevel = files; - } else { - if (typeof files == "string") { - files = [ files ]; - } - options.parse = options.parse || {}; - options.parse.toplevel = null; - var source_map_content = options.sourceMap && options.sourceMap.content; - if (typeof source_map_content == "string" && source_map_content != "inline") { - source_map_content = parse_source_map(source_map_content); - } - if (source_map_content) options.sourceMap.orig = Object.create(null); - for (var name in files) if (HOP(files, name)) { - options.parse.filename = name; - options.parse.toplevel = toplevel = parse(files[name], options.parse); - if (source_map_content == "inline") { - var inlined_content = read_source_map(name, toplevel); - if (inlined_content) { - options.sourceMap.orig[name] = parse_source_map(inlined_content); - } - } else if (source_map_content) { - options.sourceMap.orig[name] = source_map_content; - } - } - } - if (quoted_props) { - reserve_quoted_keys(toplevel, quoted_props); - } - [ "enclose", "wrap" ].forEach(function(action) { - var option = options[action]; - if (!option) return; - var orig = toplevel.print_to_string().slice(0, -1); - toplevel = toplevel[action](option); - files[toplevel.start.file] = toplevel.print_to_string().replace(orig, ""); - }); - if (options.validate) toplevel.validate_ast(); - if (timings) timings.rename = Date.now(); - if (options.rename) { - toplevel.figure_out_scope(options.mangle); - toplevel.expand_names(options.mangle); - } - if (timings) timings.compress = Date.now(); - if (options.compress) { - toplevel = new Compressor(options.compress).compress(toplevel); - if (options.validate) toplevel.validate_ast(); - } - if (timings) timings.scope = Date.now(); - if (options.mangle) toplevel.figure_out_scope(options.mangle); - if (timings) timings.mangle = Date.now(); - if (options.mangle) { - toplevel.compute_char_frequency(options.mangle); - toplevel.mangle_names(options.mangle); - } - if (timings) timings.properties = Date.now(); - if (options.mangle && options.mangle.properties) mangle_properties(toplevel, options.mangle.properties); - if (timings) timings.output = Date.now(); - var result = {}; - var output = defaults(options.output, { - ast: false, - code: true, - }); - if (output.ast) result.ast = toplevel; - if (output.code) { - if (options.sourceMap) { - output.source_map = SourceMap(options.sourceMap); - if (options.sourceMap.includeSources) { - if (files instanceof AST_Toplevel) { - throw new Error("original source content unavailable"); - } else for (var name in files) if (HOP(files, name)) { - output.source_map.setSourceContent(name, files[name]); - } - } - } - delete output.ast; - delete output.code; - var stream = OutputStream(output); - toplevel.print(stream); - result.code = stream.get(); - if (options.sourceMap) { - result.map = output.source_map.toString(); - var url = options.sourceMap.url; - if (url) { - result.code = result.code.replace(/\n\/\/# sourceMappingURL=\S+\s*$/, ""); - if (url == "inline") { - result.code += "\n//# sourceMappingURL=data:application/json;charset=utf-8;base64," + to_base64(result.map); - } else { - result.code += "\n//# sourceMappingURL=" + url; - } - } - } - } - if (options.nameCache && options.mangle) { - if (options.mangle.cache) options.nameCache.vars = to_json(options.mangle.cache); - if (options.mangle.properties && options.mangle.properties.cache) { - options.nameCache.props = to_json(options.mangle.properties.cache); - } - } - if (timings) { - timings.end = Date.now(); - result.timings = { - parse: 1e-3 * (timings.rename - timings.parse), - rename: 1e-3 * (timings.compress - timings.rename), - compress: 1e-3 * (timings.scope - timings.compress), - scope: 1e-3 * (timings.mangle - timings.scope), - mangle: 1e-3 * (timings.properties - timings.mangle), - properties: 1e-3 * (timings.output - timings.properties), - output: 1e-3 * (timings.end - timings.output), - total: 1e-3 * (timings.end - timings.start) - }; - } - if (warnings.length) { - result.warnings = warnings; - } - return result; - } catch (ex) { - return { error: ex }; - } finally { - AST_Node.log_function(); - AST_Node.disable_validation(); - } -} diff --git a/node_modules/uglify-js/lib/mozilla-ast.js b/node_modules/uglify-js/lib/mozilla-ast.js deleted file mode 100644 index 15f53849..00000000 --- a/node_modules/uglify-js/lib/mozilla-ast.js +++ /dev/null @@ -1,1268 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -(function() { - var MOZ_TO_ME = { - Program: function(M) { - return new AST_Toplevel({ - start: my_start_token(M), - end: my_end_token(M), - body: normalize_directives(M.body.map(from_moz)), - }); - }, - ArrowFunctionExpression: function(M) { - var argnames = [], rest = null; - M.params.forEach(function(param) { - if (param.type == "RestElement") { - rest = from_moz(param.argument); - } else { - argnames.push(from_moz(param)); - } - }); - var fn = new (M.async ? AST_AsyncArrow : AST_Arrow)({ - start: my_start_token(M), - end: my_end_token(M), - argnames: argnames, - rest: rest, - }); - var node = from_moz(M.body); - if (node instanceof AST_BlockStatement) { - fn.body = normalize_directives(node.body); - fn.value = null; - } else { - fn.body = []; - fn.value = node; - } - return fn; - }, - FunctionDeclaration: function(M) { - var ctor; - if (M.async) { - ctor = M.generator ? AST_AsyncGeneratorDefun : AST_AsyncDefun; - } else { - ctor = M.generator ? AST_GeneratorDefun : AST_Defun; - } - var argnames = [], rest = null; - M.params.forEach(function(param) { - if (param.type == "RestElement") { - rest = from_moz(param.argument); - } else { - argnames.push(from_moz(param)); - } - }); - return new ctor({ - start: my_start_token(M), - end: my_end_token(M), - name: from_moz(M.id), - argnames: argnames, - rest: rest, - body: normalize_directives(from_moz(M.body).body), - }); - }, - FunctionExpression: function(M) { - var ctor; - if (M.async) { - ctor = M.generator ? AST_AsyncGeneratorFunction : AST_AsyncFunction; - } else { - ctor = M.generator ? AST_GeneratorFunction : AST_Function; - } - var argnames = [], rest = null; - M.params.forEach(function(param) { - if (param.type == "RestElement") { - rest = from_moz(param.argument); - } else { - argnames.push(from_moz(param)); - } - }); - return new ctor({ - start: my_start_token(M), - end: my_end_token(M), - name: from_moz(M.id), - argnames: argnames, - rest: rest, - body: normalize_directives(from_moz(M.body).body), - }); - }, - ClassDeclaration: function(M) { - return new AST_DefClass({ - start: my_start_token(M), - end: my_end_token(M), - name: from_moz(M.id), - extends: from_moz(M.superClass), - properties: M.body.body.map(from_moz), - }); - }, - ClassExpression: function(M) { - return new AST_ClassExpression({ - start: my_start_token(M), - end: my_end_token(M), - name: from_moz(M.id), - extends: from_moz(M.superClass), - properties: M.body.body.map(from_moz), - }); - }, - MethodDefinition: function(M) { - var key = M.key, internal = false; - if (M.computed) { - key = from_moz(key); - } else if (key.type == "PrivateIdentifier") { - internal = true; - key = "#" + key.name; - } else { - key = read_name(key); - } - var ctor = AST_ClassMethod, value = from_moz(M.value); - switch (M.kind) { - case "get": - ctor = AST_ClassGetter; - value = new AST_Accessor(value); - break; - case "set": - ctor = AST_ClassSetter; - value = new AST_Accessor(value); - break; - } - return new ctor({ - start: my_start_token(M), - end: my_end_token(M), - key: key, - private: internal, - static: M.static, - value: value, - }); - }, - PropertyDefinition: function(M) { - var key = M.key, internal = false; - if (M.computed) { - key = from_moz(key); - } else if (key.type == "PrivateIdentifier") { - internal = true; - key = "#" + key.name; - } else { - key = read_name(key); - } - return new AST_ClassField({ - start: my_start_token(M), - end: my_end_token(M), - key: key, - private: internal, - static: M.static, - value: from_moz(M.value), - }); - }, - ForOfStatement: function(M) { - return new (M.await ? AST_ForAwaitOf : AST_ForOf)({ - start: my_start_token(M), - end: my_end_token(M), - init: from_moz(M.left), - object: from_moz(M.right), - body: from_moz(M.body), - }); - }, - TryStatement: function(M) { - var handlers = M.handlers || [M.handler]; - if (handlers.length > 1 || M.guardedHandlers && M.guardedHandlers.length) { - throw new Error("Multiple catch clauses are not supported."); - } - return new AST_Try({ - start : my_start_token(M), - end : my_end_token(M), - body : from_moz(M.block).body, - bcatch : from_moz(handlers[0]), - bfinally : M.finalizer ? new AST_Finally(from_moz(M.finalizer)) : null, - }); - }, - Property: function(M) { - var key = M.computed ? from_moz(M.key) : read_name(M.key); - var args = { - start: my_start_token(M), - end: my_end_token(M), - key: key, - value: from_moz(M.value), - }; - if (M.kind == "init") return new (M.method ? AST_ObjectMethod : AST_ObjectKeyVal)(args); - args.value = new AST_Accessor(args.value); - if (M.kind == "get") return new AST_ObjectGetter(args); - if (M.kind == "set") return new AST_ObjectSetter(args); - }, - ArrayExpression: function(M) { - return new AST_Array({ - start: my_start_token(M), - end: my_end_token(M), - elements: M.elements.map(function(elem) { - return elem === null ? new AST_Hole() : from_moz(elem); - }), - }); - }, - ArrayPattern: function(M) { - var elements = [], rest = null; - M.elements.forEach(function(el) { - if (el === null) { - elements.push(new AST_Hole()); - } else if (el.type == "RestElement") { - rest = from_moz(el.argument); - } else { - elements.push(from_moz(el)); - } - }); - return new AST_DestructuredArray({ - start: my_start_token(M), - end: my_end_token(M), - elements: elements, - rest: rest, - }); - }, - ObjectPattern: function(M) { - var props = [], rest = null; - M.properties.forEach(function(prop) { - if (prop.type == "RestElement") { - rest = from_moz(prop.argument); - } else { - props.push(new AST_DestructuredKeyVal(from_moz(prop))); - } - }); - return new AST_DestructuredObject({ - start: my_start_token(M), - end: my_end_token(M), - properties: props, - rest: rest, - }); - }, - MemberExpression: function(M) { - return new (M.computed ? AST_Sub : AST_Dot)({ - start: my_start_token(M), - end: my_end_token(M), - optional: M.optional, - expression: from_moz(M.object), - property: M.computed ? from_moz(M.property) : M.property.name, - }); - }, - MetaProperty: function(M) { - var expr = from_moz(M.meta); - var prop = read_name(M.property); - if (expr.name == "new" && prop == "target") return new AST_NewTarget({ - start: my_start_token(M), - end: my_end_token(M), - name: "new.target", - }); - return new AST_Dot({ - start: my_start_token(M), - end: my_end_token(M), - expression: expr, - property: prop, - }); - }, - SwitchCase: function(M) { - return new (M.test ? AST_Case : AST_Default)({ - start : my_start_token(M), - end : my_end_token(M), - expression : from_moz(M.test), - body : M.consequent.map(from_moz), - }); - }, - ExportAllDeclaration: function(M) { - var alias = M.exported ? read_name(M.exported) : "*"; - return new AST_ExportForeign({ - start: my_start_token(M), - end: my_end_token(M), - aliases: [ alias ], - keys: [ "*" ], - path: M.source.value, - }); - }, - ExportDefaultDeclaration: function(M) { - var decl = from_moz(M.declaration); - if (!decl.name) switch (decl.CTOR) { - case AST_AsyncDefun: - decl = new AST_AsyncFunction(decl); - break; - case AST_AsyncGeneratorDefun: - decl = new AST_AsyncGeneratorFunction(decl); - break; - case AST_DefClass: - decl = new AST_ClassExpression(decl); - break; - case AST_Defun: - decl = new AST_Function(decl); - break; - case AST_GeneratorDefun: - decl = new AST_GeneratorFunction(decl); - break; - } - return new AST_ExportDefault({ - start: my_start_token(M), - end: my_end_token(M), - body: decl, - }); - }, - ExportNamedDeclaration: function(M) { - if (M.declaration) return new AST_ExportDeclaration({ - start: my_start_token(M), - end: my_end_token(M), - body: from_moz(M.declaration), - }); - if (M.source) { - var aliases = [], keys = []; - M.specifiers.forEach(function(prop) { - aliases.push(read_name(prop.exported)); - keys.push(read_name(prop.local)); - }); - return new AST_ExportForeign({ - start: my_start_token(M), - end: my_end_token(M), - aliases: aliases, - keys: keys, - path: M.source.value, - }); - } - return new AST_ExportReferences({ - start: my_start_token(M), - end: my_end_token(M), - properties: M.specifiers.map(function(prop) { - var sym = new AST_SymbolExport(from_moz(prop.local)); - sym.alias = read_name(prop.exported); - return sym; - }), - }); - }, - ImportDeclaration: function(M) { - var all = null, def = null, props = null; - M.specifiers.forEach(function(prop) { - var sym = new AST_SymbolImport(from_moz(prop.local)); - switch (prop.type) { - case "ImportDefaultSpecifier": - def = sym; - def.key = ""; - break; - case "ImportNamespaceSpecifier": - all = sym; - all.key = "*"; - break; - default: - sym.key = prop.imported.name || syn.name; - if (!props) props = []; - props.push(sym); - break; - } - }); - return new AST_Import({ - start: my_start_token(M), - end: my_end_token(M), - all: all, - default: def, - properties: props, - path: M.source.value, - }); - }, - ImportExpression: function(M) { - var start = my_start_token(M); - var arg = from_moz(M.source); - return new AST_Call({ - start: start, - end: my_end_token(M), - expression: new AST_SymbolRef({ - start: start, - end: arg.start, - name: "import", - }), - args: [ arg ], - }); - }, - VariableDeclaration: function(M) { - return new ({ - const: AST_Const, - let: AST_Let, - }[M.kind] || AST_Var)({ - start: my_start_token(M), - end: my_end_token(M), - definitions: M.declarations.map(from_moz), - }); - }, - Literal: function(M) { - var args = { - start: my_start_token(M), - end: my_end_token(M), - }; - if (M.bigint) { - args.value = M.bigint.toLowerCase() + "n"; - return new AST_BigInt(args); - } - var val = M.value; - if (val === null) return new AST_Null(args); - var rx = M.regex; - if (rx && rx.pattern) { - // RegExpLiteral as per ESTree AST spec - args.value = new RegExp(rx.pattern, rx.flags); - args.value.raw_source = rx.pattern; - return new AST_RegExp(args); - } else if (rx) { - // support legacy RegExp - args.value = M.regex && M.raw ? M.raw : val; - return new AST_RegExp(args); - } - switch (typeof val) { - case "string": - args.value = val; - return new AST_String(args); - case "number": - if (isNaN(val)) return new AST_NaN(args); - var negate, node; - if (isFinite(val)) { - negate = 1 / val < 0; - args.value = negate ? -val : val; - node = new AST_Number(args); - } else { - negate = val < 0; - node = new AST_Infinity(args); - } - return negate ? new AST_UnaryPrefix({ - start: args.start, - end: args.end, - operator: "-", - expression: node, - }) : node; - case "boolean": - return new (val ? AST_True : AST_False)(args); - } - }, - TemplateLiteral: function(M) { - return new AST_Template({ - start: my_start_token(M), - end: my_end_token(M), - expressions: M.expressions.map(from_moz), - strings: M.quasis.map(function(el) { - return el.value.raw; - }), - }); - }, - TaggedTemplateExpression: function(M) { - var tmpl = from_moz(M.quasi); - tmpl.start = my_start_token(M); - tmpl.end = my_end_token(M); - tmpl.tag = from_moz(M.tag); - return tmpl; - }, - Identifier: function(M) { - var p, level = FROM_MOZ_STACK.length - 1; - do { - p = FROM_MOZ_STACK[--level]; - } while (p.type == "ArrayPattern" - || p.type == "AssignmentPattern" && p.left === FROM_MOZ_STACK[level + 1] - || p.type == "ObjectPattern" - || p.type == "Property" && p.value === FROM_MOZ_STACK[level + 1] - || p.type == "VariableDeclarator" && p.id === FROM_MOZ_STACK[level + 1]); - var ctor = AST_SymbolRef; - switch (p.type) { - case "ArrowFunctionExpression": - if (p.body !== FROM_MOZ_STACK[level + 1]) ctor = AST_SymbolFunarg; - break; - case "BreakStatement": - case "ContinueStatement": - ctor = AST_LabelRef; - break; - case "CatchClause": - ctor = AST_SymbolCatch; - break; - case "ClassDeclaration": - if (p.id === FROM_MOZ_STACK[level + 1]) ctor = AST_SymbolDefClass; - break; - case "ClassExpression": - if (p.id === FROM_MOZ_STACK[level + 1]) ctor = AST_SymbolClass; - break; - case "FunctionDeclaration": - ctor = p.id === FROM_MOZ_STACK[level + 1] ? AST_SymbolDefun : AST_SymbolFunarg; - break; - case "FunctionExpression": - ctor = p.id === FROM_MOZ_STACK[level + 1] ? AST_SymbolLambda : AST_SymbolFunarg; - break; - case "LabeledStatement": - ctor = AST_Label; - break; - case "VariableDeclaration": - ctor = { - const: AST_SymbolConst, - let: AST_SymbolLet, - }[p.kind] || AST_SymbolVar; - break; - } - return new ctor({ - start: my_start_token(M), - end: my_end_token(M), - name: M.name, - }); - }, - Super: function(M) { - return new AST_Super({ - start: my_start_token(M), - end: my_end_token(M), - name: "super", - }); - }, - ThisExpression: function(M) { - return new AST_This({ - start: my_start_token(M), - end: my_end_token(M), - name: "this", - }); - }, - ParenthesizedExpression: function(M) { - var node = from_moz(M.expression); - if (!node.start.parens) node.start.parens = []; - node.start.parens.push(my_start_token(M)); - if (!node.end.parens) node.end.parens = []; - node.end.parens.push(my_end_token(M)); - return node; - }, - ChainExpression: function(M) { - return from_moz(M.expression); - }, - }; - - MOZ_TO_ME.UpdateExpression = - MOZ_TO_ME.UnaryExpression = function To_Moz_Unary(M) { - var prefix = "prefix" in M ? M.prefix - : M.type == "UnaryExpression" ? true : false; - return new (prefix ? AST_UnaryPrefix : AST_UnaryPostfix)({ - start : my_start_token(M), - end : my_end_token(M), - operator : M.operator, - expression : from_moz(M.argument) - }); - }; - - map("EmptyStatement", AST_EmptyStatement); - map("ExpressionStatement", AST_SimpleStatement, "expression>body"); - map("BlockStatement", AST_BlockStatement, "body@body"); - map("IfStatement", AST_If, "test>condition, consequent>body, alternate>alternative"); - map("LabeledStatement", AST_LabeledStatement, "label>label, body>body"); - map("BreakStatement", AST_Break, "label>label"); - map("ContinueStatement", AST_Continue, "label>label"); - map("WithStatement", AST_With, "object>expression, body>body"); - map("SwitchStatement", AST_Switch, "discriminant>expression, cases@body"); - map("ReturnStatement", AST_Return, "argument>value"); - map("ThrowStatement", AST_Throw, "argument>value"); - map("WhileStatement", AST_While, "test>condition, body>body"); - map("DoWhileStatement", AST_Do, "test>condition, body>body"); - map("ForStatement", AST_For, "init>init, test>condition, update>step, body>body"); - map("ForInStatement", AST_ForIn, "left>init, right>object, body>body"); - map("DebuggerStatement", AST_Debugger); - map("VariableDeclarator", AST_VarDef, "id>name, init>value"); - map("CatchClause", AST_Catch, "param>argname, body%body"); - - map("BinaryExpression", AST_Binary, "operator=operator, left>left, right>right"); - map("LogicalExpression", AST_Binary, "operator=operator, left>left, right>right"); - map("AssignmentExpression", AST_Assign, "operator=operator, left>left, right>right"); - map("AssignmentPattern", AST_DefaultValue, "left>name, right>value"); - map("ConditionalExpression", AST_Conditional, "test>condition, consequent>consequent, alternate>alternative"); - map("NewExpression", AST_New, "callee>expression, arguments@args, pure=pure"); - map("CallExpression", AST_Call, "callee>expression, arguments@args, optional=optional, pure=pure"); - map("SequenceExpression", AST_Sequence, "expressions@expressions"); - map("SpreadElement", AST_Spread, "argument>expression"); - map("ObjectExpression", AST_Object, "properties@properties"); - map("AwaitExpression", AST_Await, "argument>expression"); - map("YieldExpression", AST_Yield, "argument>expression, delegate=nested"); - - def_to_moz(AST_Toplevel, function To_Moz_Program(M) { - return to_moz_scope("Program", M); - }); - - def_to_moz(AST_LambdaDefinition, function To_Moz_FunctionDeclaration(M) { - var params = M.argnames.map(to_moz); - if (M.rest) params.push({ - type: "RestElement", - argument: to_moz(M.rest), - }); - return { - type: "FunctionDeclaration", - id: to_moz(M.name), - async: is_async(M), - generator: is_generator(M), - params: params, - body: to_moz_scope("BlockStatement", M), - }; - }); - - def_to_moz(AST_Lambda, function To_Moz_FunctionExpression(M) { - var params = M.argnames.map(to_moz); - if (M.rest) params.push({ - type: "RestElement", - argument: to_moz(M.rest), - }); - if (is_arrow(M)) return { - type: "ArrowFunctionExpression", - async: is_async(M), - params: params, - body: M.value ? to_moz(M.value) : to_moz_scope("BlockStatement", M), - }; - return { - type: "FunctionExpression", - id: to_moz(M.name), - async: is_async(M), - generator: is_generator(M), - params: params, - body: to_moz_scope("BlockStatement", M), - }; - }); - - def_to_moz(AST_DefClass, function To_Moz_ClassDeclaration(M) { - return { - type: "ClassDeclaration", - id: to_moz(M.name), - superClass: to_moz(M.extends), - body: { - type: "ClassBody", - body: M.properties.map(to_moz), - }, - }; - }); - - def_to_moz(AST_ClassExpression, function To_Moz_ClassExpression(M) { - return { - type: "ClassExpression", - id: to_moz(M.name), - superClass: to_moz(M.extends), - body: { - type: "ClassBody", - body: M.properties.map(to_moz), - }, - }; - }); - - function To_Moz_MethodDefinition(kind) { - return function(M) { - var computed = M.key instanceof AST_Node; - var key = computed ? to_moz(M.key) : M.private ? { - type: "PrivateIdentifier", - name: M.key.slice(1), - } : { - type: "Literal", - value: M.key, - }; - return { - type: "MethodDefinition", - kind: kind, - computed: computed, - key: key, - static: M.static, - value: to_moz(M.value), - }; - }; - } - def_to_moz(AST_ClassGetter, To_Moz_MethodDefinition("get")); - def_to_moz(AST_ClassSetter, To_Moz_MethodDefinition("set")); - def_to_moz(AST_ClassMethod, To_Moz_MethodDefinition("method")); - - def_to_moz(AST_ClassField, function To_Moz_PropertyDefinition(M) { - var computed = M.key instanceof AST_Node; - var key = computed ? to_moz(M.key) : M.private ? { - type: "PrivateIdentifier", - name: M.key.slice(1), - } : { - type: "Literal", - value: M.key, - }; - return { - type: "PropertyDefinition", - computed: computed, - key: key, - static: M.static, - value: to_moz(M.value), - }; - }); - - function To_Moz_ForOfStatement(is_await) { - return function(M) { - return { - type: "ForOfStatement", - await: is_await, - left: to_moz(M.init), - right: to_moz(M.object), - body: to_moz(M.body), - }; - }; - } - def_to_moz(AST_ForAwaitOf, To_Moz_ForOfStatement(true)); - def_to_moz(AST_ForOf, To_Moz_ForOfStatement(false)); - - def_to_moz(AST_Directive, function To_Moz_Directive(M) { - return { - type: "ExpressionStatement", - expression: set_moz_loc(M, { - type: "Literal", - value: M.value, - }), - }; - }); - - def_to_moz(AST_SwitchBranch, function To_Moz_SwitchCase(M) { - return { - type: "SwitchCase", - test: to_moz(M.expression), - consequent: M.body.map(to_moz), - }; - }); - - def_to_moz(AST_Try, function To_Moz_TryStatement(M) { - return { - type: "TryStatement", - block: to_moz_block(M), - handler: to_moz(M.bcatch), - guardedHandlers: [], - finalizer: to_moz(M.bfinally), - }; - }); - - def_to_moz(AST_Catch, function To_Moz_CatchClause(M) { - return { - type: "CatchClause", - param: to_moz(M.argname), - guard: null, - body: to_moz_block(M), - }; - }); - - def_to_moz(AST_ExportDeclaration, function To_Moz_ExportNamedDeclaration_declaration(M) { - return { - type: "ExportNamedDeclaration", - declaration: to_moz(M.body), - }; - }); - - def_to_moz(AST_ExportDefault, function To_Moz_ExportDefaultDeclaration(M) { - return { - type: "ExportDefaultDeclaration", - declaration: to_moz(M.body), - }; - }); - - def_to_moz(AST_ExportForeign, function To_Moz_ExportAllDeclaration_ExportNamedDeclaration(M) { - if (M.keys[0] == "*") return { - type: "ExportAllDeclaration", - exported: M.aliases[0] == "*" ? null : { - type: "Identifier", - name: M.aliases[0], - }, - source: { - type: "Literal", - value: M.path, - }, - }; - var specifiers = []; - for (var i = 0; i < M.aliases.length; i++) { - specifiers.push({ - type: "ExportSpecifier", - exported: { - type: "Identifier", - name: M.aliases[i], - }, - local: { - type: "Identifier", - name: M.keys[i], - }, - }); - } - return { - type: "ExportNamedDeclaration", - specifiers: specifiers, - source: { - type: "Literal", - value: M.path, - }, - }; - }); - - def_to_moz(AST_ExportReferences, function To_Moz_ExportNamedDeclaration_specifiers(M) { - return { - type: "ExportNamedDeclaration", - specifiers: M.properties.map(function(prop) { - return { - type: "ExportSpecifier", - local: to_moz(prop), - exported: { - type: "Identifier", - name: prop.alias, - }, - }; - }), - }; - }); - - def_to_moz(AST_Import, function To_Moz_ImportDeclaration(M) { - var specifiers = M.properties ? M.properties.map(function(prop) { - return { - type: "ImportSpecifier", - local: to_moz(prop), - imported: { - type: "Identifier", - name: prop.key, - }, - }; - }) : []; - if (M.all) specifiers.unshift({ - type: "ImportNamespaceSpecifier", - local: to_moz(M.all), - }); - if (M.default) specifiers.unshift({ - type: "ImportDefaultSpecifier", - local: to_moz(M.default), - }); - return { - type: "ImportDeclaration", - specifiers: specifiers, - source: { - type: "Literal", - value: M.path, - }, - }; - }); - - def_to_moz(AST_Definitions, function To_Moz_VariableDeclaration(M) { - return { - type: "VariableDeclaration", - kind: M.TYPE.toLowerCase(), - declarations: M.definitions.map(to_moz), - }; - }); - - def_to_moz(AST_PropAccess, function To_Moz_MemberExpression(M) { - var computed = M instanceof AST_Sub; - return { - type: "MemberExpression", - object: to_moz(M.expression), - computed: computed, - optional: M.optional, - property: computed ? to_moz(M.property) : { - type: "Identifier", - name: M.property, - }, - }; - }); - - def_to_moz(AST_Unary, function To_Moz_Unary(M) { - return { - type: M.operator == "++" || M.operator == "--" ? "UpdateExpression" : "UnaryExpression", - operator: M.operator, - prefix: M instanceof AST_UnaryPrefix, - argument: to_moz(M.expression) - }; - }); - - def_to_moz(AST_Binary, function To_Moz_BinaryExpression(M) { - return { - type: M.operator == "&&" || M.operator == "||" ? "LogicalExpression" : "BinaryExpression", - left: to_moz(M.left), - operator: M.operator, - right: to_moz(M.right) - }; - }); - - def_to_moz(AST_Array, function To_Moz_ArrayExpression(M) { - return { - type: "ArrayExpression", - elements: M.elements.map(to_moz), - }; - }); - - def_to_moz(AST_DestructuredArray, function To_Moz_ArrayPattern(M) { - var elements = M.elements.map(to_moz); - if (M.rest) elements.push({ - type: "RestElement", - argument: to_moz(M.rest), - }); - return { - type: "ArrayPattern", - elements: elements, - }; - }); - - def_to_moz(AST_DestructuredKeyVal, function To_Moz_Property(M) { - var computed = M.key instanceof AST_Node; - var key = computed ? to_moz(M.key) : { - type: "Literal", - value: M.key, - }; - return { - type: "Property", - kind: "init", - computed: computed, - key: key, - value: to_moz(M.value), - }; - }); - - def_to_moz(AST_DestructuredObject, function To_Moz_ObjectPattern(M) { - var props = M.properties.map(to_moz); - if (M.rest) props.push({ - type: "RestElement", - argument: to_moz(M.rest), - }); - return { - type: "ObjectPattern", - properties: props, - }; - }); - - def_to_moz(AST_ObjectProperty, function To_Moz_Property(M) { - var computed = M.key instanceof AST_Node; - var key = computed ? to_moz(M.key) : { - type: "Literal", - value: M.key, - }; - var kind; - if (M instanceof AST_ObjectKeyVal) { - kind = "init"; - } else if (M instanceof AST_ObjectGetter) { - kind = "get"; - } else if (M instanceof AST_ObjectSetter) { - kind = "set"; - } - return { - type: "Property", - kind: kind, - computed: computed, - method: M instanceof AST_ObjectMethod, - key: key, - value: to_moz(M.value), - }; - }); - - def_to_moz(AST_Symbol, function To_Moz_Identifier(M) { - var def = M.definition(); - return { - type: "Identifier", - name: def && def.mangled_name || M.name, - }; - }); - - def_to_moz(AST_Super, function To_Moz_Super() { - return { type: "Super" }; - }); - - def_to_moz(AST_This, function To_Moz_ThisExpression() { - return { type: "ThisExpression" }; - }); - - def_to_moz(AST_NewTarget, function To_Moz_MetaProperty() { - return { - type: "MetaProperty", - meta: { - type: "Identifier", - name: "new", - }, - property: { - type: "Identifier", - name: "target", - }, - }; - }); - - def_to_moz(AST_RegExp, function To_Moz_RegExpLiteral(M) { - var flags = M.value.toString().match(/[gimuy]*$/)[0]; - var value = "/" + M.value.raw_source + "/" + flags; - return { - type: "Literal", - value: value, - raw: value, - regex: { - pattern: M.value.raw_source, - flags: flags - } - }; - }); - - def_to_moz(AST_BigInt, function To_Moz_BigInt(M) { - var value = M.value; - return { - type: "Literal", - bigint: value.slice(0, -1), - raw: value, - }; - }); - - function To_Moz_Literal(M) { - var value = M.value; - if (typeof value === "number" && (value < 0 || (value === 0 && 1 / value < 0))) { - return { - type: "UnaryExpression", - operator: "-", - prefix: true, - argument: { - type: "Literal", - value: -value, - raw: M.start.raw, - }, - }; - } - return { - type: "Literal", - value: value, - raw: M.start.raw, - }; - } - def_to_moz(AST_Boolean, To_Moz_Literal); - def_to_moz(AST_Constant, To_Moz_Literal); - def_to_moz(AST_Null, To_Moz_Literal); - - def_to_moz(AST_Atom, function To_Moz_Atom(M) { - return { - type: "Identifier", - name: String(M.value), - }; - }); - - def_to_moz(AST_Template, function To_Moz_TemplateLiteral_TaggedTemplateExpression(M) { - var last = M.strings.length - 1; - var tmpl = { - type: "TemplateLiteral", - expressions: M.expressions.map(to_moz), - quasis: M.strings.map(function(str, index) { - return { - type: "TemplateElement", - tail: index == last, - value: { raw: str }, - }; - }), - }; - if (!M.tag) return tmpl; - return { - type: "TaggedTemplateExpression", - tag: to_moz(M.tag), - quasi: tmpl, - }; - }); - - AST_Block.DEFMETHOD("to_mozilla_ast", AST_BlockStatement.prototype.to_mozilla_ast); - AST_Hole.DEFMETHOD("to_mozilla_ast", return_null); - AST_Node.DEFMETHOD("to_mozilla_ast", function() { - throw new Error("Cannot convert AST_" + this.TYPE); - }); - - /* -----[ tools ]----- */ - - function normalize_directives(body) { - for (var i = 0; i < body.length; i++) { - var stat = body[i]; - if (!(stat instanceof AST_SimpleStatement)) break; - var node = stat.body; - if (!(node instanceof AST_String)) break; - if (stat.start.pos !== node.start.pos) break; - body[i] = new AST_Directive(node); - } - return body; - } - - function raw_token(moznode) { - if (moznode.type == "Literal") { - return moznode.raw != null ? moznode.raw : moznode.value + ""; - } - } - - function my_start_token(moznode) { - var loc = moznode.loc, start = loc && loc.start; - var range = moznode.range; - return new AST_Token({ - file : loc && loc.source, - line : start && start.line, - col : start && start.column, - pos : range ? range[0] : moznode.start, - endline : start && start.line, - endcol : start && start.column, - endpos : range ? range[0] : moznode.start, - raw : raw_token(moznode), - }); - } - - function my_end_token(moznode) { - var loc = moznode.loc, end = loc && loc.end; - var range = moznode.range; - return new AST_Token({ - file : loc && loc.source, - line : end && end.line, - col : end && end.column, - pos : range ? range[1] : moznode.end, - endline : end && end.line, - endcol : end && end.column, - endpos : range ? range[1] : moznode.end, - raw : raw_token(moznode), - }); - } - - function read_name(M) { - return "" + M[M.type == "Identifier" ? "name" : "value"]; - } - - function map(moztype, mytype, propmap) { - var moz_to_me = [ - "start: my_start_token(M)", - "end: my_end_token(M)", - ]; - var me_to_moz = [ - "type: " + JSON.stringify(moztype), - ]; - - if (propmap) propmap.split(/\s*,\s*/).forEach(function(prop) { - var m = /([a-z0-9$_]+)(=|@|>|%)([a-z0-9$_]+)/i.exec(prop); - if (!m) throw new Error("Can't understand property map: " + prop); - var moz = m[1], how = m[2], my = m[3]; - switch (how) { - case "@": - moz_to_me.push(my + ": M." + moz + ".map(from_moz)"); - me_to_moz.push(moz + ": M." + my + ".map(to_moz)"); - break; - case ">": - moz_to_me.push(my + ": from_moz(M." + moz + ")"); - me_to_moz.push(moz + ": to_moz(M." + my + ")"); - break; - case "=": - moz_to_me.push(my + ": M." + moz); - me_to_moz.push(moz + ": M." + my); - break; - case "%": - moz_to_me.push(my + ": from_moz(M." + moz + ").body"); - me_to_moz.push(moz + ": to_moz_block(M)"); - break; - default: - throw new Error("Can't understand operator in propmap: " + prop); - } - }); - - MOZ_TO_ME[moztype] = new Function("U2", "my_start_token", "my_end_token", "from_moz", [ - "return function From_Moz_" + moztype + "(M) {", - " return new U2.AST_" + mytype.TYPE + "({", - moz_to_me.join(",\n"), - " });", - "};", - ].join("\n"))(exports, my_start_token, my_end_token, from_moz); - def_to_moz(mytype, new Function("to_moz", "to_moz_block", "to_moz_scope", [ - "return function To_Moz_" + moztype + "(M) {", - " return {", - me_to_moz.join(",\n"), - " };", - "};", - ].join("\n"))(to_moz, to_moz_block, to_moz_scope)); - } - - var FROM_MOZ_STACK = null; - - function from_moz(moz) { - FROM_MOZ_STACK.push(moz); - var node = null; - if (moz) { - if (!HOP(MOZ_TO_ME, moz.type)) throw new Error("Unsupported type: " + moz.type); - node = MOZ_TO_ME[moz.type](moz); - } - FROM_MOZ_STACK.pop(); - return node; - } - - AST_Node.from_mozilla_ast = function(node) { - var save_stack = FROM_MOZ_STACK; - FROM_MOZ_STACK = []; - var ast = from_moz(node); - FROM_MOZ_STACK = save_stack; - ast.walk(new TreeWalker(function(node) { - if (node instanceof AST_LabelRef) { - for (var level = 0, parent; parent = this.parent(level); level++) { - if (parent instanceof AST_Scope) break; - if (parent instanceof AST_LabeledStatement && parent.label.name == node.name) { - node.thedef = parent.label; - break; - } - } - if (!node.thedef) { - var s = node.start; - js_error("Undefined label " + node.name, s.file, s.line, s.col, s.pos); - } - } - })); - return ast; - }; - - function set_moz_loc(mynode, moznode) { - var start = mynode.start; - var end = mynode.end; - if (start.pos != null && end.endpos != null) { - moznode.range = [start.pos, end.endpos]; - } - if (start.line) { - moznode.loc = { - start: {line: start.line, column: start.col}, - end: end.endline ? {line: end.endline, column: end.endcol} : null, - }; - if (start.file) { - moznode.loc.source = start.file; - } - } - return moznode; - } - - function def_to_moz(mytype, handler) { - mytype.DEFMETHOD("to_mozilla_ast", function() { - return set_moz_loc(this, handler(this)); - }); - } - - function to_moz(node) { - return node != null ? node.to_mozilla_ast() : null; - } - - function to_moz_block(node) { - return { - type: "BlockStatement", - body: node.body.map(to_moz), - }; - } - - function to_moz_scope(type, node) { - var body = node.body.map(to_moz); - if (node.body[0] instanceof AST_SimpleStatement && node.body[0].body instanceof AST_String) { - body.unshift(to_moz(new AST_EmptyStatement(node.body[0]))); - } - return { - type: type, - body: body, - }; - } -})(); diff --git a/node_modules/uglify-js/lib/output.js b/node_modules/uglify-js/lib/output.js deleted file mode 100644 index 4f530038..00000000 --- a/node_modules/uglify-js/lib/output.js +++ /dev/null @@ -1,1945 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -function is_some_comments(comment) { - // multiline comment - return comment.type == "comment2" && /@preserve|@license|@cc_on/i.test(comment.value); -} - -function OutputStream(options) { - options = defaults(options, { - annotations : false, - ascii_only : false, - beautify : false, - braces : false, - comments : false, - galio : false, - ie8 : false, - indent_level : 4, - indent_start : 0, - inline_script : true, - keep_quoted_props: false, - max_line_len : false, - preamble : null, - preserve_line : false, - quote_keys : false, - quote_style : 0, - semicolons : true, - shebang : true, - source_map : null, - v8 : false, - webkit : false, - width : 80, - wrap_iife : false, - }, true); - - // Convert comment option to RegExp if neccessary and set up comments filter - var comment_filter = return_false; // Default case, throw all comments away - if (options.comments) { - var comments = options.comments; - if (typeof options.comments === "string" && /^\/.*\/[a-zA-Z]*$/.test(options.comments)) { - var regex_pos = options.comments.lastIndexOf("/"); - comments = new RegExp( - options.comments.substr(1, regex_pos - 1), - options.comments.substr(regex_pos + 1) - ); - } - if (comments instanceof RegExp) { - comment_filter = function(comment) { - return comment.type != "comment5" && comments.test(comment.value); - }; - } else if (typeof comments === "function") { - comment_filter = function(comment) { - return comment.type != "comment5" && comments(this, comment); - }; - } else if (comments === "some") { - comment_filter = is_some_comments; - } else { // NOTE includes "all" option - comment_filter = return_true; - } - } - - var current_col = 0; - var current_line = 1; - var current_pos = 0; - var indentation = options.indent_start; - var last; - var line_end = 0; - var line_fixed = true; - var mappings = options.source_map && []; - var mapping_name; - var mapping_token; - var might_need_space; - var might_need_semicolon; - var need_newline_indented = false; - var need_space = false; - var newline_insert = -1; - var stack; - var OUTPUT; - - function reset() { - last = ""; - might_need_space = false; - might_need_semicolon = false; - stack = []; - var str = OUTPUT; - OUTPUT = ""; - return str; - } - - reset(); - var to_utf8 = options.ascii_only ? function(str, identifier) { - if (identifier) str = str.replace(/[\ud800-\udbff][\udc00-\udfff]/g, function(ch) { - return "\\u{" + (ch.charCodeAt(0) - 0xd7c0 << 10 | ch.charCodeAt(1) - 0xdc00).toString(16) + "}"; - }); - return str.replace(/[\u0000-\u001f\u007f-\uffff]/g, function(ch) { - var code = ch.charCodeAt(0).toString(16); - if (code.length <= 2 && !identifier) { - while (code.length < 2) code = "0" + code; - return "\\x" + code; - } else { - while (code.length < 4) code = "0" + code; - return "\\u" + code; - } - }); - } : function(str) { - var s = ""; - for (var i = 0, j = 0; i < str.length; i++) { - var code = str.charCodeAt(i); - if (is_surrogate_pair_head(code)) { - if (is_surrogate_pair_tail(str.charCodeAt(i + 1))) { - i++; - continue; - } - } else if (!is_surrogate_pair_tail(code)) { - continue; - } - s += str.slice(j, i) + "\\u" + code.toString(16); - j = i + 1; - } - return j == 0 ? str : s + str.slice(j); - }; - - function quote_single(str) { - return "'" + str.replace(/\x27/g, "\\'") + "'"; - } - - function quote_double(str) { - return '"' + str.replace(/\x22/g, '\\"') + '"'; - } - - var quote_string = [ - null, - quote_single, - quote_double, - function(str, quote) { - return quote == "'" ? quote_single(str) : quote_double(str); - }, - ][options.quote_style] || function(str, quote, dq, sq) { - return dq > sq ? quote_single(str) : quote_double(str); - }; - - function make_string(str, quote) { - var dq = 0, sq = 0; - str = str.replace(/[\\\b\f\n\r\v\t\x22\x27\u2028\u2029\0\ufeff]/g, function(s, i) { - switch (s) { - case '"': ++dq; return '"'; - case "'": ++sq; return "'"; - case "\\": return "\\\\"; - case "\n": return "\\n"; - case "\r": return "\\r"; - case "\t": return "\\t"; - case "\b": return "\\b"; - case "\f": return "\\f"; - case "\x0B": return options.ie8 ? "\\x0B" : "\\v"; - case "\u2028": return "\\u2028"; - case "\u2029": return "\\u2029"; - case "\ufeff": return "\\ufeff"; - case "\0": - return /[0-9]/.test(str.charAt(i+1)) ? "\\x00" : "\\0"; - } - return s; - }); - return quote_string(to_utf8(str), quote, dq, sq); - } - - /* -----[ beautification/minification ]----- */ - - var adjust_mappings = mappings ? function(line, col) { - mappings.forEach(function(mapping) { - mapping.line += line; - mapping.col += col; - }); - } : noop; - - var flush_mappings = mappings ? function() { - mappings.forEach(function(mapping) { - options.source_map.add( - mapping.token.file, - mapping.line, mapping.col, - mapping.token.line, mapping.token.col, - !mapping.name && mapping.token.type == "name" ? mapping.token.value : mapping.name - ); - }); - mappings = []; - } : noop; - - function insert_newlines(count) { - var index = OUTPUT.lastIndexOf("\n"); - if (line_end < index) line_end = index; - var left = OUTPUT.slice(0, line_end); - var right = OUTPUT.slice(line_end); - adjust_mappings(count, right.length - current_col); - current_line += count; - current_pos += count; - current_col = right.length; - OUTPUT = left; - while (count--) OUTPUT += "\n"; - OUTPUT += right; - } - - var fix_line = options.max_line_len ? function() { - if (line_fixed) { - if (current_col > options.max_line_len) { - AST_Node.warn("Output exceeds {max_line_len} characters", options); - } - return; - } - if (current_col > options.max_line_len) insert_newlines(1); - line_fixed = true; - flush_mappings(); - } : noop; - - var requireSemicolonChars = makePredicate("( [ + * / - , ."); - - var print = options.beautify - || options.comments - || options.max_line_len - || options.preserve_line - || options.shebang - || !options.semicolons - || options.source_map - || options.width ? function(str) { - var ch = str.charAt(0); - if (need_newline_indented && ch) { - need_newline_indented = false; - if (ch != "\n") { - print("\n"); - indent(); - } - } - if (need_space && ch) { - need_space = false; - if (!/[\s;})]/.test(ch)) { - space(); - } - } - newline_insert = -1; - var prev = last.slice(-1); - if (might_need_semicolon) { - might_need_semicolon = false; - - if (prev == ":" && ch == "}" || (!ch || ";}".indexOf(ch) < 0) && prev != ";") { - if (options.semicolons || requireSemicolonChars[ch]) { - OUTPUT += ";"; - current_col++; - current_pos++; - } else { - fix_line(); - OUTPUT += "\n"; - current_pos++; - current_line++; - current_col = 0; - - if (/^\s+$/.test(str)) { - // reset the semicolon flag, since we didn't print one - // now and might still have to later - might_need_semicolon = true; - } - } - - if (!options.beautify) - might_need_space = false; - } - } - - if (might_need_space) { - if (is_identifier_char(prev) && (is_identifier_char(ch) || ch == "\\") - || (ch == "/" && ch == prev) - || ((ch == "+" || ch == "-") && ch == last) - || str == "--" && last == "!" - || str == "in" && prev == "/" - || last == "--" && ch == ">") { - OUTPUT += " "; - current_col++; - current_pos++; - } - if (prev != "<" || str != "!") might_need_space = false; - } - - if (mapping_token) { - mappings.push({ - token: mapping_token, - name: mapping_name, - line: current_line, - col: current_col - }); - mapping_token = false; - if (line_fixed) flush_mappings(); - } - - OUTPUT += str; - current_pos += str.length; - var a = str.split(/\r?\n/), n = a.length - 1; - current_line += n; - current_col += a[0].length; - if (n > 0) { - fix_line(); - current_col = a[n].length; - } - last = str; - } : function(str) { - var ch = str.charAt(0); - var prev = last.slice(-1); - if (might_need_semicolon) { - might_need_semicolon = false; - if (prev == ":" && ch == "}" || (!ch || ";}".indexOf(ch) < 0) && prev != ";") { - OUTPUT += ";"; - might_need_space = false; - } - } - if (might_need_space) { - if (is_identifier_char(prev) && (is_identifier_char(ch) || ch == "\\") - || (ch == "/" && ch == prev) - || ((ch == "+" || ch == "-") && ch == last) - || str == "--" && last == "!" - || str == "in" && prev == "/" - || last == "--" && ch == ">") { - OUTPUT += " "; - } - if (prev != "<" || str != "!") might_need_space = false; - } - OUTPUT += str; - last = str; - }; - - var space = options.beautify ? function() { - print(" "); - } : function() { - might_need_space = true; - }; - - var indent = options.beautify ? function(half) { - if (need_newline_indented) print("\n"); - print(repeat_string(" ", half ? indentation - (options.indent_level >> 1) : indentation)); - } : noop; - - var with_indent = options.beautify ? function(cont) { - var save_indentation = indentation; - indentation += options.indent_level; - cont(); - indentation = save_indentation; - } : function(cont) { cont() }; - - var may_add_newline = options.max_line_len || options.preserve_line ? function() { - fix_line(); - line_end = OUTPUT.length; - line_fixed = false; - } : noop; - - var newline = options.beautify ? function() { - if (newline_insert < 0) return print("\n"); - if (OUTPUT[newline_insert] != "\n") { - OUTPUT = OUTPUT.slice(0, newline_insert) + "\n" + OUTPUT.slice(newline_insert); - current_pos++; - current_line++; - } - newline_insert++; - } : may_add_newline; - - var semicolon = options.beautify ? function() { - print(";"); - } : function() { - might_need_semicolon = true; - }; - - function force_semicolon() { - if (might_need_semicolon) print(";"); - print(";"); - } - - function with_block(cont) { - print("{"); - newline(); - with_indent(cont); - indent(); - print("}"); - } - - function with_parens(cont) { - print("("); - may_add_newline(); - cont(); - may_add_newline(); - print(")"); - } - - function with_square(cont) { - print("["); - may_add_newline(); - cont(); - may_add_newline(); - print("]"); - } - - function comma() { - may_add_newline(); - print(","); - may_add_newline(); - space(); - } - - function colon() { - print(":"); - space(); - } - - var add_mapping = mappings ? function(token, name) { - mapping_token = token; - mapping_name = name; - } : noop; - - function get() { - if (!line_fixed) fix_line(); - return OUTPUT; - } - - function has_nlb() { - var index = OUTPUT.lastIndexOf("\n"); - return /^ *$/.test(OUTPUT.slice(index + 1)); - } - - function pad_comment(token, force) { - if (need_newline_indented) return; - if (token.nlb && (force || !has_nlb())) { - need_newline_indented = true; - } else if (force) { - need_space = true; - } - } - - function print_comment(comment) { - var value = comment.value.replace(/[@#]__PURE__/g, " "); - if (/^\s*$/.test(value) && !/^\s*$/.test(comment.value)) return false; - if (/comment[134]/.test(comment.type)) { - print("//" + value); - need_newline_indented = true; - } else if (comment.type == "comment2") { - print("/*" + value + "*/"); - } - return true; - } - - function should_merge_comments(node, parent) { - if (parent instanceof AST_Binary) return parent.left === node; - if (parent.TYPE == "Call") return parent.expression === node; - if (parent instanceof AST_Conditional) return parent.condition === node; - if (parent instanceof AST_Dot) return parent.expression === node; - if (parent instanceof AST_Exit) return true; - if (parent instanceof AST_Sequence) return parent.expressions[0] === node; - if (parent instanceof AST_Sub) return parent.expression === node; - if (parent instanceof AST_UnaryPostfix) return true; - if (parent instanceof AST_Yield) return true; - } - - function prepend_comments(node) { - var self = this; - var scan; - if (node instanceof AST_Exit) { - scan = node.value; - } else if (node instanceof AST_Yield) { - scan = node.expression; - } - var comments = dump(node); - if (!comments) comments = []; - - if (scan) { - var tw = new TreeWalker(function(node) { - if (!should_merge_comments(node, tw.parent())) return true; - var before = dump(node); - if (before) comments = comments.concat(before); - }); - tw.push(node); - scan.walk(tw); - } - - if (current_pos == 0) { - if (comments.length > 0 && options.shebang && comments[0].type == "comment5") { - print("#!" + comments.shift().value + "\n"); - indent(); - } - var preamble = options.preamble; - if (preamble) { - print(preamble.replace(/\r\n?|[\n\u2028\u2029]|\s*$/g, "\n")); - } - } - - comments = comments.filter(comment_filter, node); - var printed = false; - comments.forEach(function(comment, index) { - pad_comment(comment, index); - if (print_comment(comment)) printed = true; - }); - if (printed) pad_comment(node.start, true); - - function dump(node) { - var token = node.start; - if (!token) { - if (!scan) return; - node.start = token = new AST_Token(); - } - var comments = token.comments_before; - if (!comments) { - if (!scan) return; - token.comments_before = comments = []; - } - if (comments._dumped === self) return; - comments._dumped = self; - return comments; - } - } - - function append_comments(node, tail) { - var self = this; - var token = node.end; - if (!token) return; - var comments = token[tail ? "comments_before" : "comments_after"]; - if (!comments || comments._dumped === self) return; - if (!(node instanceof AST_Statement || all(comments, function(c) { - return !/comment[134]/.test(c.type); - }))) return; - comments._dumped = self; - var insert = OUTPUT.length; - comments.filter(comment_filter, node).forEach(function(comment, index) { - pad_comment(comment, index || !tail); - print_comment(comment); - }); - if (OUTPUT.length > insert) newline_insert = insert; - } - - return { - get : get, - reset : reset, - indent : indent, - should_break : options.width ? function() { - return current_col - indentation >= options.width; - } : return_false, - has_parens : function() { return last.slice(-1) == "(" }, - newline : newline, - print : print, - space : space, - comma : comma, - colon : colon, - last : function() { return last }, - semicolon : semicolon, - force_semicolon : force_semicolon, - to_utf8 : to_utf8, - print_name : function(name) { print(to_utf8(name.toString(), true)) }, - print_string : options.inline_script ? function(str, quote) { - str = make_string(str, quote).replace(/<\x2f(script)([>\/\t\n\f\r ])/gi, "<\\/$1$2"); - print(str.replace(/\x3c!--/g, "\\x3c!--").replace(/--\x3e/g, "--\\x3e")); - } : function(str, quote) { - print(make_string(str, quote)); - }, - with_indent : with_indent, - with_block : with_block, - with_parens : with_parens, - with_square : with_square, - add_mapping : add_mapping, - option : function(opt) { return options[opt] }, - prepend_comments: options.comments || options.shebang ? prepend_comments : noop, - append_comments : options.comments ? append_comments : noop, - push_node : function(node) { stack.push(node) }, - pop_node : options.preserve_line ? function() { - var node = stack.pop(); - if (node.start && node.start.line > current_line) { - insert_newlines(node.start.line - current_line); - } - } : function() { - stack.pop(); - }, - parent : function(n) { - return stack[stack.length - 2 - (n || 0)]; - }, - }; -} - -/* -----[ code generators ]----- */ - -(function() { - - /* -----[ utils ]----- */ - - function DEFPRINT(nodetype, generator) { - nodetype.DEFMETHOD("_codegen", generator); - } - - var use_asm = false; - - AST_Node.DEFMETHOD("print", function(stream, force_parens) { - var self = this; - stream.push_node(self); - if (force_parens || self.needs_parens(stream)) { - stream.with_parens(doit); - } else { - doit(); - } - stream.pop_node(); - - function doit() { - stream.prepend_comments(self); - self.add_source_map(stream); - self._codegen(stream); - stream.append_comments(self); - } - }); - var readonly = OutputStream({ - inline_script: false, - shebang: false, - width: false, - }); - AST_Node.DEFMETHOD("print_to_string", function(options) { - if (options) { - var stream = OutputStream(options); - this.print(stream); - return stream.get(); - } - this.print(readonly); - return readonly.reset(); - }); - - /* -----[ PARENTHESES ]----- */ - - function PARENS(nodetype, func) { - nodetype.DEFMETHOD("needs_parens", func); - } - - PARENS(AST_Node, return_false); - - // a function expression needs parens around it when it's provably - // the first token to appear in a statement. - function needs_parens_function(output) { - var p = output.parent(); - if (!output.has_parens() && first_in_statement(output, false, true)) { - // export default function() {} - // export default (function foo() {}); - // export default (function() {})(foo); - // export default (function() {})`foo`; - // export default (function() {}) ? foo : bar; - return this.name || !(p instanceof AST_ExportDefault); - } - if (output.option("webkit") && p instanceof AST_PropAccess && p.expression === this) return true; - if (output.option("wrap_iife") && p instanceof AST_Call && p.expression === this) return true; - } - PARENS(AST_AsyncFunction, needs_parens_function); - PARENS(AST_AsyncGeneratorFunction, needs_parens_function); - PARENS(AST_ClassExpression, needs_parens_function); - PARENS(AST_Function, needs_parens_function); - PARENS(AST_GeneratorFunction, needs_parens_function); - - // same goes for an object literal, because otherwise it would be - // interpreted as a block of code. - function needs_parens_obj(output) { - return !output.has_parens() && first_in_statement(output, true); - } - PARENS(AST_Object, needs_parens_obj); - - function needs_parens_unary(output) { - var p = output.parent(); - // (-x) ** y - if (p instanceof AST_Binary) return p.operator == "**" && p.left === this; - // (await x)(y) - // new (await x) - if (p instanceof AST_Call) return p.expression === this; - // class extends (x++) {} - // class x extends (typeof y) {} - if (p instanceof AST_Class) return true; - // (x++)[y] - // (typeof x).y - if (p instanceof AST_PropAccess) return p.expression === this; - // (~x)`foo` - if (p instanceof AST_Template) return p.tag === this; - } - PARENS(AST_Await, needs_parens_unary); - PARENS(AST_Unary, needs_parens_unary); - - PARENS(AST_Sequence, function(output) { - var p = output.parent(); - // [ 1, (2, 3), 4 ] ---> [ 1, 3, 4 ] - return p instanceof AST_Array - // () ---> (foo, bar) - || is_arrow(p) && p.value === this - // await (foo, bar) - || p instanceof AST_Await - // 1 + (2, 3) + 4 ---> 8 - || p instanceof AST_Binary - // new (foo, bar) or foo(1, (2, 3), 4) - || p instanceof AST_Call - // class extends (foo, bar) {} - // class foo extends (bar, baz) {} - || p instanceof AST_Class - // class { foo = (bar, baz) } - // class { [(foo, bar)]() {} } - || p instanceof AST_ClassProperty - // (false, true) ? (a = 10, b = 20) : (c = 30) - // ---> 20 (side effect, set a := 10 and b := 20) - || p instanceof AST_Conditional - // [ a = (1, 2) ] = [] ---> a == 2 - || p instanceof AST_DefaultValue - // { [(1, 2)]: foo } = bar - // { 1: (2, foo) } = bar - || p instanceof AST_DestructuredKeyVal - // export default (foo, bar) - || p instanceof AST_ExportDefault - // for (foo of (bar, baz)); - || p instanceof AST_ForOf - // { [(1, 2)]: 3 }[2] ---> 3 - // { foo: (1, 2) }.foo ---> 2 - || p instanceof AST_ObjectProperty - // (1, {foo:2}).foo or (1, {foo:2})["foo"] ---> 2 - || p instanceof AST_PropAccess && p.expression === this - // ...(foo, bar, baz) - || p instanceof AST_Spread - // (foo, bar)`baz` - || p instanceof AST_Template && p.tag === this - // !(foo, bar, baz) - || p instanceof AST_Unary - // var a = (1, 2), b = a + a; ---> b == 4 - || p instanceof AST_VarDef - // yield (foo, bar) - || p instanceof AST_Yield; - }); - - PARENS(AST_Binary, function(output) { - var p = output.parent(); - // await (foo && bar) - if (p instanceof AST_Await) return true; - // this deals with precedence: - // 3 * (2 + 1) - // 3 - (2 - 1) - // (1 ** 2) ** 3 - if (p instanceof AST_Binary) { - var po = p.operator, pp = PRECEDENCE[po]; - var so = this.operator, sp = PRECEDENCE[so]; - return pp > sp - || po == "??" && (so == "&&" || so == "||") - || (pp == sp && this === p[po == "**" ? "left" : "right"]); - } - // (foo && bar)() - if (p instanceof AST_Call) return p.expression === this; - // class extends (foo && bar) {} - // class foo extends (bar || null) {} - if (p instanceof AST_Class) return true; - // (foo && bar)["prop"], (foo && bar).prop - if (p instanceof AST_PropAccess) return p.expression === this; - // (foo && bar)`` - if (p instanceof AST_Template) return p.tag === this; - // typeof (foo && bar) - if (p instanceof AST_Unary) return true; - }); - - function lhs_has_optional(node, output) { - var p = output.parent(); - if (p instanceof AST_PropAccess && p.expression === node && is_lhs(p, output.parent(1))) { - // ++(foo?.bar).baz - // (foo?.()).bar = baz - do { - if (node.optional) return true; - node = node.expression; - } while (node.TYPE == "Call" || node instanceof AST_PropAccess); - } - } - - PARENS(AST_PropAccess, function(output) { - var node = this; - var p = output.parent(); - if (p instanceof AST_New) { - if (p.expression !== node) return false; - // i.e. new (foo().bar) - // - // if there's one call into this subtree, then we need - // parens around it too, otherwise the call will be - // interpreted as passing the arguments to the upper New - // expression. - do { - node = node.expression; - } while (node instanceof AST_PropAccess); - return node.TYPE == "Call"; - } - return lhs_has_optional(node, output); - }); - - PARENS(AST_Call, function(output) { - var node = this; - var p = output.parent(); - if (p instanceof AST_New) return p.expression === node; - // https://bugs.webkit.org/show_bug.cgi?id=123506 - if (output.option("webkit") - && node.expression instanceof AST_Function - && p instanceof AST_PropAccess - && p.expression === node) { - var g = output.parent(1); - if (g instanceof AST_Assign && g.left === p) return true; - } - return lhs_has_optional(node, output); - }); - - PARENS(AST_New, function(output) { - if (need_constructor_parens(this, output)) return false; - var p = output.parent(); - // (new foo)(bar) - if (p instanceof AST_Call) return p.expression === this; - // (new Date).getTime(), (new Date)["getTime"]() - if (p instanceof AST_PropAccess) return true; - // (new foo)`bar` - if (p instanceof AST_Template) return p.tag === this; - }); - - PARENS(AST_Number, function(output) { - if (!output.option("galio")) return false; - // https://github.com/mishoo/UglifyJS/pull/1009 - var p = output.parent(); - return p instanceof AST_PropAccess && p.expression === this && /^0/.test(make_num(this.value)); - }); - - function needs_parens_assign_cond(self, output) { - var p = output.parent(); - // await (a = foo) - if (p instanceof AST_Await) return true; - // 1 + (a = 2) + 3 → 6, side effect setting a = 2 - if (p instanceof AST_Binary) return !(p instanceof AST_Assign); - // (a = func)() —or— new (a = Object)() - if (p instanceof AST_Call) return p.expression === self; - // class extends (a = foo) {} - // class foo extends (bar ? baz : moo) {} - if (p instanceof AST_Class) return true; - // (a = foo) ? bar : baz - if (p instanceof AST_Conditional) return p.condition === self; - // (a = foo)["prop"] —or— (a = foo).prop - if (p instanceof AST_PropAccess) return p.expression === self; - // (a = foo)`bar` - if (p instanceof AST_Template) return p.tag === self; - // !(a = false) → true - if (p instanceof AST_Unary) return true; - } - PARENS(AST_Arrow, function(output) { - return needs_parens_assign_cond(this, output); - }); - PARENS(AST_Assign, function(output) { - if (needs_parens_assign_cond(this, output)) return true; - // v8 parser bug ---> workaround - // f([1], [a] = []) ---> f([1], ([a] = [])) - if (output.option("v8")) return this.left instanceof AST_Destructured; - // ({ p: a } = o); - if (this.left instanceof AST_DestructuredObject) return needs_parens_obj(output); - }); - PARENS(AST_AsyncArrow, function(output) { - return needs_parens_assign_cond(this, output); - }); - PARENS(AST_Conditional, function(output) { - return needs_parens_assign_cond(this, output); - }); - PARENS(AST_Yield, function(output) { - return needs_parens_assign_cond(this, output); - }); - - /* -----[ PRINTERS ]----- */ - - DEFPRINT(AST_Directive, function(output) { - var quote = this.quote; - var value = this.value; - switch (output.option("quote_style")) { - case 0: - case 2: - if (value.indexOf('"') == -1) quote = '"'; - break; - case 1: - if (value.indexOf("'") == -1) quote = "'"; - break; - } - output.print(quote + value + quote); - output.semicolon(); - }); - DEFPRINT(AST_Debugger, function(output) { - output.print("debugger"); - output.semicolon(); - }); - - /* -----[ statements ]----- */ - - function display_body(body, is_toplevel, output, allow_directives) { - var last = body.length - 1; - var in_directive = allow_directives; - var was_asm = use_asm; - body.forEach(function(stmt, i) { - if (in_directive) { - if (stmt instanceof AST_Directive) { - if (stmt.value == "use asm") use_asm = true; - } else if (!(stmt instanceof AST_EmptyStatement)) { - if (stmt instanceof AST_SimpleStatement && stmt.body instanceof AST_String) { - output.force_semicolon(); - } - in_directive = false; - } - } - if (stmt instanceof AST_EmptyStatement) return; - output.indent(); - stmt.print(output); - if (i == last && is_toplevel) return; - output.newline(); - if (is_toplevel) output.newline(); - }); - use_asm = was_asm; - } - - DEFPRINT(AST_Toplevel, function(output) { - display_body(this.body, true, output, true); - output.print(""); - }); - DEFPRINT(AST_LabeledStatement, function(output) { - this.label.print(output); - output.colon(); - this.body.print(output); - }); - DEFPRINT(AST_SimpleStatement, function(output) { - this.body.print(output); - output.semicolon(); - }); - function print_braced_empty(self, output) { - output.print("{"); - output.with_indent(function() { - output.append_comments(self, true); - }); - output.print("}"); - } - function print_braced(self, output, allow_directives) { - if (self.body.length > 0) { - output.with_block(function() { - display_body(self.body, false, output, allow_directives); - }); - } else print_braced_empty(self, output); - } - DEFPRINT(AST_BlockStatement, function(output) { - print_braced(this, output); - }); - DEFPRINT(AST_EmptyStatement, function(output) { - output.semicolon(); - }); - DEFPRINT(AST_Do, function(output) { - var self = this; - output.print("do"); - output.space(); - make_block(self.body, output); - output.space(); - output.print("while"); - output.space(); - output.with_parens(function() { - self.condition.print(output); - }); - output.semicolon(); - }); - DEFPRINT(AST_While, function(output) { - var self = this; - output.print("while"); - output.space(); - output.with_parens(function() { - self.condition.print(output); - }); - output.space(); - force_statement(self.body, output); - }); - DEFPRINT(AST_For, function(output) { - var self = this; - output.print("for"); - output.space(); - output.with_parens(function() { - if (self.init) { - if (self.init instanceof AST_Definitions) { - self.init.print(output); - } else { - parenthesize_for_noin(self.init, output, true); - } - output.print(";"); - output.space(); - } else { - output.print(";"); - } - if (self.condition) { - self.condition.print(output); - output.print(";"); - output.space(); - } else { - output.print(";"); - } - if (self.step) { - self.step.print(output); - } - }); - output.space(); - force_statement(self.body, output); - }); - function print_for_enum(prefix, infix) { - return function(output) { - var self = this; - output.print(prefix); - output.space(); - output.with_parens(function() { - self.init.print(output); - output.space(); - output.print(infix); - output.space(); - self.object.print(output); - }); - output.space(); - force_statement(self.body, output); - }; - } - DEFPRINT(AST_ForAwaitOf, print_for_enum("for await", "of")); - DEFPRINT(AST_ForIn, print_for_enum("for", "in")); - DEFPRINT(AST_ForOf, print_for_enum("for", "of")); - DEFPRINT(AST_With, function(output) { - var self = this; - output.print("with"); - output.space(); - output.with_parens(function() { - self.expression.print(output); - }); - output.space(); - force_statement(self.body, output); - }); - DEFPRINT(AST_ExportDeclaration, function(output) { - output.print("export"); - output.space(); - this.body.print(output); - }); - DEFPRINT(AST_ExportDefault, function(output) { - output.print("export"); - output.space(); - output.print("default"); - output.space(); - var body = this.body; - body.print(output); - if (body instanceof AST_ClassExpression) { - if (!body.name) return; - } - if (body instanceof AST_DefClass) return; - if (body instanceof AST_LambdaDefinition) return; - if (body instanceof AST_LambdaExpression) { - if (!body.name && !is_arrow(body)) return; - } - output.semicolon(); - }); - DEFPRINT(AST_ExportForeign, function(output) { - var self = this; - output.print("export"); - output.space(); - var len = self.keys.length; - if (len == 0) { - print_braced_empty(self, output); - } else if (self.keys[0] == "*") { - print_entry(0); - } else output.with_block(function() { - output.indent(); - print_entry(0); - for (var i = 1; i < len; i++) { - output.print(","); - output.newline(); - output.indent(); - print_entry(i); - } - output.newline(); - }); - output.space(); - output.print("from"); - output.space(); - output.print_string(self.path, self.quote); - output.semicolon(); - - function print_entry(index) { - var alias = self.aliases[index]; - var key = self.keys[index]; - output.print_name(key); - if (alias != key) { - output.space(); - output.print("as"); - output.space(); - output.print_name(alias); - } - } - }); - DEFPRINT(AST_ExportReferences, function(output) { - var self = this; - output.print("export"); - output.space(); - print_properties(self, output); - output.semicolon(); - }); - DEFPRINT(AST_Import, function(output) { - var self = this; - output.print("import"); - output.space(); - if (self.default) self.default.print(output); - if (self.all) { - if (self.default) output.comma(); - self.all.print(output); - } - if (self.properties) { - if (self.default) output.comma(); - print_properties(self, output); - } - if (self.all || self.default || self.properties) { - output.space(); - output.print("from"); - output.space(); - } - output.print_string(self.path, self.quote); - output.semicolon(); - }); - - /* -----[ functions ]----- */ - function print_funargs(self, output) { - output.with_parens(function() { - self.argnames.forEach(function(arg, i) { - if (i) output.comma(); - arg.print(output); - }); - if (self.rest) { - if (self.argnames.length) output.comma(); - output.print("..."); - self.rest.print(output); - } - }); - } - function print_arrow(self, output) { - if (self.argnames.length == 1 && self.argnames[0] instanceof AST_SymbolFunarg && !self.rest) { - self.argnames[0].print(output); - } else { - print_funargs(self, output); - } - output.space(); - output.print("=>"); - output.space(); - if (self.value) { - self.value.print(output); - } else { - print_braced(self, output, true); - } - } - DEFPRINT(AST_Arrow, function(output) { - print_arrow(this, output); - }); - DEFPRINT(AST_AsyncArrow, function(output) { - output.print("async"); - output.space(); - print_arrow(this, output); - }); - function print_lambda(self, output) { - if (self.name) { - output.space(); - self.name.print(output); - } - print_funargs(self, output); - output.space(); - print_braced(self, output, true); - } - DEFPRINT(AST_Lambda, function(output) { - output.print("function"); - print_lambda(this, output); - }); - function print_async(output) { - output.print("async"); - output.space(); - output.print("function"); - print_lambda(this, output); - } - DEFPRINT(AST_AsyncDefun, print_async); - DEFPRINT(AST_AsyncFunction, print_async); - function print_async_generator(output) { - output.print("async"); - output.space(); - output.print("function*"); - print_lambda(this, output); - } - DEFPRINT(AST_AsyncGeneratorDefun, print_async_generator); - DEFPRINT(AST_AsyncGeneratorFunction, print_async_generator); - function print_generator(output) { - output.print("function*"); - print_lambda(this, output); - } - DEFPRINT(AST_GeneratorDefun, print_generator); - DEFPRINT(AST_GeneratorFunction, print_generator); - - /* -----[ classes ]----- */ - DEFPRINT(AST_Class, function(output) { - var self = this; - output.print("class"); - if (self.name) { - output.space(); - self.name.print(output); - } - if (self.extends) { - output.space(); - output.print("extends"); - output.space(); - self.extends.print(output); - } - output.space(); - print_properties(self, output, true); - }); - DEFPRINT(AST_ClassField, function(output) { - var self = this; - if (self.static) { - output.print("static"); - output.space(); - } - print_property_key(self, output); - if (self.value) { - output.space(); - output.print("="); - output.space(); - self.value.print(output); - } - output.semicolon(); - }); - DEFPRINT(AST_ClassGetter, print_accessor("get")); - DEFPRINT(AST_ClassSetter, print_accessor("set")); - function print_method(self, output) { - var fn = self.value; - if (is_async(fn)) { - output.print("async"); - output.space(); - } - if (is_generator(fn)) output.print("*"); - print_property_key(self, output); - print_lambda(self.value, output); - } - DEFPRINT(AST_ClassMethod, function(output) { - var self = this; - if (self.static) { - output.print("static"); - output.space(); - } - print_method(self, output); - }); - - /* -----[ jumps ]----- */ - function print_jump(kind, prop) { - return function(output) { - output.print(kind); - var target = this[prop]; - if (target) { - output.space(); - target.print(output); - } - output.semicolon(); - }; - } - DEFPRINT(AST_Return, print_jump("return", "value")); - DEFPRINT(AST_Throw, print_jump("throw", "value")); - DEFPRINT(AST_Break, print_jump("break", "label")); - DEFPRINT(AST_Continue, print_jump("continue", "label")); - - /* -----[ if ]----- */ - function make_then(self, output) { - var b = self.body; - if (output.option("braces") && !(b instanceof AST_Const || b instanceof AST_Let) - || output.option("ie8") && b instanceof AST_Do) - return make_block(b, output); - // The squeezer replaces "block"-s that contain only a single - // statement with the statement itself; technically, the AST - // is correct, but this can create problems when we output an - // IF having an ELSE clause where the THEN clause ends in an - // IF *without* an ELSE block (then the outer ELSE would refer - // to the inner IF). This function checks for this case and - // adds the block braces if needed. - if (!b) return output.force_semicolon(); - while (true) { - if (b instanceof AST_If) { - if (!b.alternative) { - make_block(self.body, output); - return; - } - b = b.alternative; - } else if (b instanceof AST_StatementWithBody) { - b = b.body; - } else break; - } - force_statement(self.body, output); - } - DEFPRINT(AST_If, function(output) { - var self = this; - output.print("if"); - output.space(); - output.with_parens(function() { - self.condition.print(output); - }); - output.space(); - if (self.alternative) { - make_then(self, output); - output.space(); - output.print("else"); - output.space(); - if (self.alternative instanceof AST_If) - self.alternative.print(output); - else - force_statement(self.alternative, output); - } else { - force_statement(self.body, output); - } - }); - - /* -----[ switch ]----- */ - DEFPRINT(AST_Switch, function(output) { - var self = this; - output.print("switch"); - output.space(); - output.with_parens(function() { - self.expression.print(output); - }); - output.space(); - var last = self.body.length - 1; - if (last < 0) print_braced_empty(self, output); - else output.with_block(function() { - self.body.forEach(function(branch, i) { - output.indent(true); - branch.print(output); - if (i < last && branch.body.length > 0) - output.newline(); - }); - }); - }); - function print_branch_body(self, output) { - output.newline(); - self.body.forEach(function(stmt) { - output.indent(); - stmt.print(output); - output.newline(); - }); - } - DEFPRINT(AST_Default, function(output) { - output.print("default:"); - print_branch_body(this, output); - }); - DEFPRINT(AST_Case, function(output) { - var self = this; - output.print("case"); - output.space(); - self.expression.print(output); - output.print(":"); - print_branch_body(self, output); - }); - - /* -----[ exceptions ]----- */ - DEFPRINT(AST_Try, function(output) { - var self = this; - output.print("try"); - output.space(); - print_braced(self, output); - if (self.bcatch) { - output.space(); - self.bcatch.print(output); - } - if (self.bfinally) { - output.space(); - self.bfinally.print(output); - } - }); - DEFPRINT(AST_Catch, function(output) { - var self = this; - output.print("catch"); - if (self.argname) { - output.space(); - output.with_parens(function() { - self.argname.print(output); - }); - } - output.space(); - print_braced(self, output); - }); - DEFPRINT(AST_Finally, function(output) { - output.print("finally"); - output.space(); - print_braced(this, output); - }); - - function print_definitinos(type) { - return function(output) { - var self = this; - output.print(type); - output.space(); - self.definitions.forEach(function(def, i) { - if (i) output.comma(); - def.print(output); - }); - var p = output.parent(); - if (!(p instanceof AST_IterationStatement && p.init === self)) output.semicolon(); - }; - } - DEFPRINT(AST_Const, print_definitinos("const")); - DEFPRINT(AST_Let, print_definitinos("let")); - DEFPRINT(AST_Var, print_definitinos("var")); - - function parenthesize_for_noin(node, output, noin) { - var parens = false; - // need to take some precautions here: - // https://github.com/mishoo/UglifyJS/issues/60 - if (noin) node.walk(new TreeWalker(function(node) { - if (parens) return true; - if (node instanceof AST_Binary && node.operator == "in") return parens = true; - if (node instanceof AST_Scope && !(is_arrow(node) && node.value)) return true; - })); - node.print(output, parens); - } - - DEFPRINT(AST_VarDef, function(output) { - var self = this; - self.name.print(output); - if (self.value) { - output.space(); - output.print("="); - output.space(); - var p = output.parent(1); - var noin = p instanceof AST_For || p instanceof AST_ForEnumeration; - parenthesize_for_noin(self.value, output, noin); - } - }); - - DEFPRINT(AST_DefaultValue, function(output) { - var self = this; - self.name.print(output); - output.space(); - output.print("="); - output.space(); - self.value.print(output); - }); - - /* -----[ other expressions ]----- */ - function print_annotation(self, output) { - if (!output.option("annotations")) return; - if (!self.pure) return; - var level = 0, parent = self, node; - do { - node = parent; - parent = output.parent(level++); - if (parent instanceof AST_Call && parent.expression === node) return; - } while (parent instanceof AST_PropAccess && parent.expression === node); - output.print(typeof self.pure == "string" ? "/*" + self.pure + "*/" : "/*@__PURE__*/"); - } - function print_call_args(self, output) { - if (self.expression instanceof AST_Call || self.expression instanceof AST_Lambda) { - output.add_mapping(self.start); - } - output.with_parens(function() { - self.args.forEach(function(expr, i) { - if (i) output.comma(); - expr.print(output); - }); - }); - } - DEFPRINT(AST_Call, function(output) { - var self = this; - print_annotation(self, output); - self.expression.print(output); - if (self.optional) output.print("?."); - print_call_args(self, output); - }); - DEFPRINT(AST_New, function(output) { - var self = this; - print_annotation(self, output); - output.print("new"); - output.space(); - self.expression.print(output); - if (need_constructor_parens(self, output)) print_call_args(self, output); - }); - DEFPRINT(AST_Sequence, function(output) { - this.expressions.forEach(function(node, index) { - if (index > 0) { - output.comma(); - if (output.should_break()) { - output.newline(); - output.indent(); - } - } - node.print(output); - }); - }); - DEFPRINT(AST_Dot, function(output) { - var self = this; - var expr = self.expression; - expr.print(output); - var prop = self.property; - if (output.option("ie8") && RESERVED_WORDS[prop]) { - output.print(self.optional ? "?.[" : "["); - output.add_mapping(self.end); - output.print_string(prop); - output.print("]"); - } else { - if (expr instanceof AST_Number && !/[ex.)]/i.test(output.last())) output.print("."); - output.print(self.optional ? "?." : "."); - // the name after dot would be mapped about here. - output.add_mapping(self.end); - output.print_name(prop); - } - }); - DEFPRINT(AST_Sub, function(output) { - var self = this; - self.expression.print(output); - output.print(self.optional ? "?.[" : "["); - self.property.print(output); - output.print("]"); - }); - DEFPRINT(AST_Spread, function(output) { - output.print("..."); - this.expression.print(output); - }); - DEFPRINT(AST_UnaryPrefix, function(output) { - var op = this.operator; - var exp = this.expression; - output.print(op); - if (/^[a-z]/i.test(op) - || (/[+-]$/.test(op) - && exp instanceof AST_UnaryPrefix - && /^[+-]/.test(exp.operator))) { - output.space(); - } - exp.print(output); - }); - DEFPRINT(AST_UnaryPostfix, function(output) { - this.expression.print(output); - output.print(this.operator); - }); - DEFPRINT(AST_Binary, function(output) { - var self = this; - self.left.print(output); - output.space(); - output.print(self.operator); - output.space(); - self.right.print(output); - }); - DEFPRINT(AST_Conditional, function(output) { - var self = this; - self.condition.print(output); - output.space(); - output.print("?"); - output.space(); - self.consequent.print(output); - output.space(); - output.colon(); - self.alternative.print(output); - }); - DEFPRINT(AST_Await, function(output) { - output.print("await"); - output.space(); - this.expression.print(output); - }); - DEFPRINT(AST_Yield, function(output) { - output.print(this.nested ? "yield*" : "yield"); - if (this.expression) { - output.space(); - this.expression.print(output); - } - }); - - /* -----[ literals ]----- */ - DEFPRINT(AST_Array, function(output) { - var a = this.elements, len = a.length; - output.with_square(len > 0 ? function() { - output.space(); - a.forEach(function(exp, i) { - if (i) output.comma(); - exp.print(output); - // If the final element is a hole, we need to make sure it - // doesn't look like a trailing comma, by inserting an actual - // trailing comma. - if (i === len - 1 && exp instanceof AST_Hole) - output.comma(); - }); - output.space(); - } : noop); - }); - DEFPRINT(AST_DestructuredArray, function(output) { - var a = this.elements, len = a.length, rest = this.rest; - output.with_square(len || rest ? function() { - output.space(); - a.forEach(function(exp, i) { - if (i) output.comma(); - exp.print(output); - }); - if (rest) { - if (len) output.comma(); - output.print("..."); - rest.print(output); - } else if (a[len - 1] instanceof AST_Hole) { - // If the final element is a hole, we need to make sure it - // doesn't look like a trailing comma, by inserting an actual - // trailing comma. - output.comma(); - } - output.space(); - } : noop); - }); - DEFPRINT(AST_DestructuredKeyVal, function(output) { - var self = this; - var key = print_property_key(self, output); - var value = self.value; - if (key && value instanceof AST_SymbolDeclaration && key == get_symbol_name(value)) return; - output.colon(); - value.print(output); - }); - DEFPRINT(AST_DestructuredObject, function(output) { - var props = this.properties, len = props.length, rest = this.rest; - if (len || rest) output.with_block(function() { - props.forEach(function(prop, i) { - if (i) { - output.print(","); - output.newline(); - } - output.indent(); - prop.print(output); - }); - if (rest) { - if (len) { - output.print(","); - output.newline(); - } - output.indent(); - output.print("..."); - rest.print(output); - } - output.newline(); - }); - else print_braced_empty(this, output); - }); - function print_properties(self, output, no_comma) { - var props = self.properties; - if (props.length > 0) output.with_block(function() { - props.forEach(function(prop, i) { - if (i) { - if (!no_comma) output.print(","); - output.newline(); - } - output.indent(); - prop.print(output); - }); - output.newline(); - }); - else print_braced_empty(self, output); - } - DEFPRINT(AST_Object, function(output) { - print_properties(this, output); - }); - - function print_property_key(self, output) { - var key = self.key; - if (key instanceof AST_Node) { - output.with_square(function() { - key.print(output); - }); - } else if (output.option("quote_keys")) { - output.print_string(key); - } else if ("" + +key == key && key >= 0) { - output.print(make_num(key)); - } else { - var quote = self.start && self.start.quote; - if (self.private) { - output.print_name(key); - } else if (RESERVED_WORDS[key] ? !output.option("ie8") : is_identifier_string(key)) { - if (quote && output.option("keep_quoted_props")) { - output.print_string(key, quote); - } else { - output.print_name(key); - return key; - } - } else { - output.print_string(key, quote); - } - } - } - DEFPRINT(AST_ObjectKeyVal, function(output) { - var self = this; - print_property_key(self, output); - output.colon(); - self.value.print(output); - }); - DEFPRINT(AST_ObjectMethod, function(output) { - print_method(this, output); - }); - function print_accessor(type) { - return function(output) { - var self = this; - if (self.static) { - output.print("static"); - output.space(); - } - output.print(type); - output.space(); - print_property_key(self, output); - print_lambda(self.value, output); - }; - } - DEFPRINT(AST_ObjectGetter, print_accessor("get")); - DEFPRINT(AST_ObjectSetter, print_accessor("set")); - function get_symbol_name(sym) { - var def = sym.definition(); - return def && def.mangled_name || sym.name; - } - DEFPRINT(AST_Symbol, function(output) { - output.print_name(get_symbol_name(this)); - }); - DEFPRINT(AST_SymbolExport, function(output) { - var self = this; - var name = get_symbol_name(self); - output.print_name(name); - var alias = self.alias; - if (alias != name) { - output.space(); - output.print("as"); - output.space(); - output.print_name(alias); - } - }); - DEFPRINT(AST_SymbolImport, function(output) { - var self = this; - var name = get_symbol_name(self); - var key = self.key; - if (key && key != name) { - output.print_name(key); - output.space(); - output.print("as"); - output.space(); - } - output.print_name(name); - }); - DEFPRINT(AST_Hole, noop); - DEFPRINT(AST_Template, function(output) { - var self = this; - if (self.tag) self.tag.print(output); - output.print("`"); - for (var i = 0; i < self.expressions.length; i++) { - output.print(self.strings[i]); - output.print("${"); - self.expressions[i].print(output); - output.print("}"); - } - output.print(self.strings[i]); - output.print("`"); - }); - DEFPRINT(AST_Constant, function(output) { - output.print("" + this.value); - }); - DEFPRINT(AST_String, function(output) { - output.print_string(this.value, this.quote); - }); - DEFPRINT(AST_Number, function(output) { - var start = this.start; - if (use_asm && start && start.raw != null) { - output.print(start.raw); - } else { - output.print(make_num(this.value)); - } - }); - - DEFPRINT(AST_RegExp, function(output) { - var regexp = this.value; - var str = regexp.toString(); - var end = str.lastIndexOf("/"); - if (regexp.raw_source) { - str = "/" + regexp.raw_source + str.slice(end); - } else if (end == 1) { - str = "/(?:)" + str.slice(end); - } else if (str.indexOf("/", 1) < end) { - str = "/" + str.slice(1, end).replace(/\\\\|[^/]?\//g, function(match) { - return match[0] == "\\" ? match : match.slice(0, -1) + "\\/"; - }) + str.slice(end); - } - output.print(output.to_utf8(str).replace(/\\(?:\0(?![0-9])|[^\0])/g, function(match) { - switch (match[1]) { - case "\n": return "\\n"; - case "\r": return "\\r"; - case "\t": return "\t"; - case "\b": return "\b"; - case "\f": return "\f"; - case "\0": return "\0"; - case "\x0B": return "\v"; - case "\u2028": return "\\u2028"; - case "\u2029": return "\\u2029"; - default: return match; - } - }).replace(/[\n\r\u2028\u2029]/g, function(c) { - switch (c) { - case "\n": return "\\n"; - case "\r": return "\\r"; - case "\u2028": return "\\u2028"; - case "\u2029": return "\\u2029"; - } - })); - var p = output.parent(); - if (p instanceof AST_Binary && /^in/.test(p.operator) && p.left === this) - output.print(" "); - }); - - function force_statement(stat, output) { - if (output.option("braces") && !(stat instanceof AST_Const || stat instanceof AST_Let)) { - make_block(stat, output); - } else if (stat instanceof AST_EmptyStatement) { - output.force_semicolon(); - } else { - stat.print(output); - } - } - - // self should be AST_New. decide if we want to show parens or not. - function need_constructor_parens(self, output) { - // Always print parentheses with arguments - if (self.args.length > 0) return true; - - return output.option("beautify"); - } - - function best_of(a) { - var best = a[0], len = best.length; - for (var i = 1; i < a.length; ++i) { - if (a[i].length < len) { - best = a[i]; - len = best.length; - } - } - return best; - } - - function make_num(num) { - var str = num.toString(10).replace(/^0\./, ".").replace("e+", "e"); - var candidates = [ str ]; - if (Math.floor(num) === num) { - if (num < 0) { - candidates.push("-0x" + (-num).toString(16).toLowerCase()); - } else { - candidates.push("0x" + num.toString(16).toLowerCase()); - } - } - var match, len, digits; - if (match = /^\.0+/.exec(str)) { - len = match[0].length; - digits = str.slice(len); - candidates.push(digits + "e-" + (digits.length + len - 1)); - } else if (match = /0+$/.exec(str)) { - len = match[0].length; - candidates.push(str.slice(0, -len) + "e" + len); - } else if (match = /^(\d)\.(\d+)e(-?\d+)$/.exec(str)) { - candidates.push(match[1] + match[2] + "e" + (match[3] - match[2].length)); - } - return best_of(candidates); - } - - function make_block(stmt, output) { - if (stmt instanceof AST_EmptyStatement) { - print_braced_empty(stmt, output); - } else if (stmt instanceof AST_BlockStatement) { - stmt.print(output); - } else output.with_block(function() { - output.indent(); - stmt.print(output); - output.newline(); - }); - } - - /* -----[ source map generators ]----- */ - - function DEFMAP(nodetype, generator) { - nodetype.forEach(function(nodetype) { - nodetype.DEFMETHOD("add_source_map", generator); - }); - } - - DEFMAP([ - // We could easily add info for ALL nodes, but it seems to me that - // would be quite wasteful, hence this noop in the base class. - AST_Node, - // since the label symbol will mark it - AST_LabeledStatement, - ], noop); - - // XXX: I'm not exactly sure if we need it for all of these nodes, - // or if we should add even more. - DEFMAP([ - AST_Array, - AST_BlockStatement, - AST_Catch, - AST_Constant, - AST_Debugger, - AST_Definitions, - AST_Destructured, - AST_Finally, - AST_Jump, - AST_Lambda, - AST_New, - AST_Object, - AST_StatementWithBody, - AST_Symbol, - AST_Switch, - AST_SwitchBranch, - AST_Try, - ], function(output) { - output.add_mapping(this.start); - }); - - DEFMAP([ - AST_ClassProperty, - AST_DestructuredKeyVal, - AST_ObjectProperty, - ], function(output) { - if (typeof this.key == "string") output.add_mapping(this.start, this.key); - }); -})(); diff --git a/node_modules/uglify-js/lib/parse.js b/node_modules/uglify-js/lib/parse.js deleted file mode 100644 index eb2dc01a..00000000 --- a/node_modules/uglify-js/lib/parse.js +++ /dev/null @@ -1,2549 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - Parser based on parse-js (http://marijn.haverbeke.nl/parse-js/). - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -var KEYWORDS = "break case catch class const continue debugger default delete do else extends finally for function if in instanceof let new return switch throw try typeof var void while with"; -var KEYWORDS_ATOM = "false null true"; -var RESERVED_WORDS = [ - "abstract async await boolean byte char double enum export final float goto implements import int interface long native package private protected public short static super synchronized this throws transient volatile yield", - KEYWORDS_ATOM, - KEYWORDS, -].join(" "); -var KEYWORDS_BEFORE_EXPRESSION = "return new delete throw else case"; - -KEYWORDS = makePredicate(KEYWORDS); -RESERVED_WORDS = makePredicate(RESERVED_WORDS); -KEYWORDS_BEFORE_EXPRESSION = makePredicate(KEYWORDS_BEFORE_EXPRESSION); -KEYWORDS_ATOM = makePredicate(KEYWORDS_ATOM); - -var RE_BIN_NUMBER = /^0b([01]+)$/i; -var RE_HEX_NUMBER = /^0x([0-9a-f]+)$/i; -var RE_OCT_NUMBER = /^0o?([0-7]+)$/i; - -var OPERATORS = makePredicate([ - "in", - "instanceof", - "typeof", - "new", - "void", - "delete", - "++", - "--", - "+", - "-", - "!", - "~", - "&", - "|", - "^", - "*", - "/", - "%", - "**", - ">>", - "<<", - ">>>", - "<", - ">", - "<=", - ">=", - "==", - "===", - "!=", - "!==", - "?", - "=", - "+=", - "-=", - "/=", - "*=", - "%=", - "**=", - ">>=", - "<<=", - ">>>=", - "&=", - "|=", - "^=", - "&&", - "||", - "??", - "&&=", - "||=", - "??=", -]); - -var NEWLINE_CHARS = "\n\r\u2028\u2029"; -var OPERATOR_CHARS = "+-*&%=<>!?|~^"; -var PUNC_OPENERS = "[{("; -var PUNC_SEPARATORS = ",;:"; -var PUNC_CLOSERS = ")}]"; -var PUNC_AFTER_EXPRESSION = PUNC_SEPARATORS + PUNC_CLOSERS; -var PUNC_BEFORE_EXPRESSION = PUNC_OPENERS + PUNC_SEPARATORS; -var PUNC_CHARS = PUNC_BEFORE_EXPRESSION + "`" + PUNC_CLOSERS; -var WHITESPACE_CHARS = NEWLINE_CHARS + " \u00a0\t\f\u000b\u200b\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\uFEFF"; -var NON_IDENTIFIER_CHARS = makePredicate(characters("./'\"#" + OPERATOR_CHARS + PUNC_CHARS + WHITESPACE_CHARS)); - -NEWLINE_CHARS = makePredicate(characters(NEWLINE_CHARS)); -OPERATOR_CHARS = makePredicate(characters(OPERATOR_CHARS)); -PUNC_AFTER_EXPRESSION = makePredicate(characters(PUNC_AFTER_EXPRESSION)); -PUNC_BEFORE_EXPRESSION = makePredicate(characters(PUNC_BEFORE_EXPRESSION)); -PUNC_CHARS = makePredicate(characters(PUNC_CHARS)); -WHITESPACE_CHARS = makePredicate(characters(WHITESPACE_CHARS)); - -/* -----[ Tokenizer ]----- */ - -function is_surrogate_pair_head(code) { - return code >= 0xd800 && code <= 0xdbff; -} - -function is_surrogate_pair_tail(code) { - return code >= 0xdc00 && code <= 0xdfff; -} - -function is_digit(code) { - return code >= 48 && code <= 57; -} - -function is_identifier_char(ch) { - return !NON_IDENTIFIER_CHARS[ch]; -} - -function is_identifier_string(str) { - return /^[a-z_$][a-z0-9_$]*$/i.test(str); -} - -function decode_escape_sequence(seq) { - switch (seq[0]) { - case "b": return "\b"; - case "f": return "\f"; - case "n": return "\n"; - case "r": return "\r"; - case "t": return "\t"; - case "u": - var code; - if (seq[1] == "{" && seq.slice(-1) == "}") { - code = seq.slice(2, -1); - } else if (seq.length == 5) { - code = seq.slice(1); - } else { - return; - } - var num = parseInt(code, 16); - if (num < 0 || isNaN(num)) return; - if (num < 0x10000) return String.fromCharCode(num); - if (num > 0x10ffff) return; - return String.fromCharCode((num >> 10) + 0xd7c0) + String.fromCharCode((num & 0x03ff) + 0xdc00); - case "v": return "\u000b"; - case "x": - if (seq.length != 3) return; - var num = parseInt(seq.slice(1), 16); - if (num < 0 || isNaN(num)) return; - return String.fromCharCode(num); - case "\r": - case "\n": - return ""; - default: - if (seq == "0") return "\0"; - if (seq[0] >= "0" && seq[0] <= "9") return; - return seq; - } -} - -function parse_js_number(num) { - var match; - if (match = RE_BIN_NUMBER.exec(num)) return parseInt(match[1], 2); - if (match = RE_HEX_NUMBER.exec(num)) return parseInt(match[1], 16); - if (match = RE_OCT_NUMBER.exec(num)) return parseInt(match[1], 8); - var val = parseFloat(num); - if (val == num) return val; -} - -function JS_Parse_Error(message, filename, line, col, pos) { - this.message = message; - this.filename = filename; - this.line = line; - this.col = col; - this.pos = pos; -} -JS_Parse_Error.prototype = Object.create(Error.prototype); -JS_Parse_Error.prototype.constructor = JS_Parse_Error; -JS_Parse_Error.prototype.name = "SyntaxError"; -configure_error_stack(JS_Parse_Error); - -function js_error(message, filename, line, col, pos) { - throw new JS_Parse_Error(message, filename, line, col, pos); -} - -function is_token(token, type, val) { - return token.type == type && (val == null || token.value == val); -} - -var EX_EOF = {}; - -function tokenizer($TEXT, filename, html5_comments, shebang) { - - var S = { - text : $TEXT, - filename : filename, - pos : 0, - tokpos : 0, - line : 1, - tokline : 0, - col : 0, - tokcol : 0, - newline_before : false, - regex_allowed : false, - comments_before : [], - directives : {}, - directive_stack : [], - read_template : with_eof_error("Unterminated template literal", function(strings) { - var s = ""; - for (;;) { - var ch = next(true, true); - switch (ch) { - case "\\": - ch += next(true, true); - break; - case "`": - strings.push(s); - return; - case "$": - if (peek() == "{") { - next(); - strings.push(s); - S.regex_allowed = true; - return true; - } - } - s += ch; - } - }), - }; - var prev_was_dot = false; - - function peek() { - return S.text.charAt(S.pos); - } - - function next(signal_eof, in_string) { - var ch = S.text.charAt(S.pos++); - if (signal_eof && !ch) - throw EX_EOF; - if (NEWLINE_CHARS[ch]) { - S.col = 0; - S.line++; - if (!in_string) S.newline_before = true; - if (ch == "\r" && peek() == "\n") { - // treat `\r\n` as `\n` - S.pos++; - ch = "\n"; - } - } else { - S.col++; - } - return ch; - } - - function forward(i) { - while (i-- > 0) next(); - } - - function looking_at(str) { - return S.text.substr(S.pos, str.length) == str; - } - - function find_eol() { - var text = S.text; - for (var i = S.pos; i < S.text.length; ++i) { - if (NEWLINE_CHARS[text[i]]) return i; - } - return -1; - } - - function find(what, signal_eof) { - var pos = S.text.indexOf(what, S.pos); - if (signal_eof && pos == -1) throw EX_EOF; - return pos; - } - - function start_token() { - S.tokline = S.line; - S.tokcol = S.col; - S.tokpos = S.pos; - } - - function token(type, value, is_comment) { - S.regex_allowed = type == "operator" && !UNARY_POSTFIX[value] - || type == "keyword" && KEYWORDS_BEFORE_EXPRESSION[value] - || type == "punc" && PUNC_BEFORE_EXPRESSION[value]; - if (type == "punc" && value == ".") prev_was_dot = true; - else if (!is_comment) prev_was_dot = false; - var ret = { - type : type, - value : value, - line : S.tokline, - col : S.tokcol, - pos : S.tokpos, - endline : S.line, - endcol : S.col, - endpos : S.pos, - nlb : S.newline_before, - file : filename - }; - if (/^(?:num|string|regexp)$/i.test(type)) { - ret.raw = $TEXT.substring(ret.pos, ret.endpos); - } - if (!is_comment) { - ret.comments_before = S.comments_before; - ret.comments_after = S.comments_before = []; - } - S.newline_before = false; - return new AST_Token(ret); - } - - function skip_whitespace() { - while (WHITESPACE_CHARS[peek()]) - next(); - } - - function read_while(pred) { - var ret = "", ch; - while ((ch = peek()) && pred(ch, ret)) ret += next(); - return ret; - } - - function parse_error(err) { - js_error(err, filename, S.tokline, S.tokcol, S.tokpos); - } - - function is_octal(num) { - return /^0[0-7_]+$/.test(num); - } - - function read_num(prefix) { - var has_e = false, after_e = false, has_x = false, has_dot = prefix == "."; - var num = read_while(function(ch, str) { - switch (ch) { - case "x": case "X": - return has_x ? false : (has_x = true); - case "e": case "E": - return has_x ? true : has_e ? false : (has_e = after_e = true); - case "+": case "-": - return after_e; - case (after_e = false, "."): - return has_dot || has_e || has_x || is_octal(str) ? false : (has_dot = true); - } - return /[_0-9a-dfo]/i.test(ch); - }); - if (prefix) num = prefix + num; - if (is_octal(num)) { - if (next_token.has_directive("use strict")) parse_error("Legacy octal literals are not allowed in strict mode"); - } else { - num = num.replace(has_x ? /([1-9a-f]|.0)_(?=[0-9a-f])/gi : /([1-9]|.0)_(?=[0-9])/gi, "$1"); - } - var valid = parse_js_number(num); - if (isNaN(valid)) parse_error("Invalid syntax: " + num); - if (has_dot || has_e || peek() != "n") return token("num", valid); - return token("bigint", num.toLowerCase() + next()); - } - - function read_escaped_char(in_string) { - var seq = next(true, in_string); - if (seq >= "0" && seq <= "7") return read_octal_escape_sequence(seq); - if (seq == "u") { - var ch = next(true, in_string); - seq += ch; - if (ch != "{") { - seq += next(true, in_string) + next(true, in_string) + next(true, in_string); - } else do { - ch = next(true, in_string); - seq += ch; - } while (ch != "}"); - } else if (seq == "x") { - seq += next(true, in_string) + next(true, in_string); - } - var str = decode_escape_sequence(seq); - if (typeof str != "string") parse_error("Invalid escape sequence: \\" + seq); - return str; - } - - function read_octal_escape_sequence(ch) { - // Read - var p = peek(); - if (p >= "0" && p <= "7") { - ch += next(true); - if (ch[0] <= "3" && (p = peek()) >= "0" && p <= "7") - ch += next(true); - } - - // Parse - if (ch === "0") return "\0"; - if (ch.length > 0 && next_token.has_directive("use strict")) - parse_error("Legacy octal escape sequences are not allowed in strict mode"); - return String.fromCharCode(parseInt(ch, 8)); - } - - var read_string = with_eof_error("Unterminated string constant", function(quote_char) { - var quote = next(), ret = ""; - for (;;) { - var ch = next(true, true); - if (ch == "\\") ch = read_escaped_char(true); - else if (NEWLINE_CHARS[ch]) parse_error("Unterminated string constant"); - else if (ch == quote) break; - ret += ch; - } - var tok = token("string", ret); - tok.quote = quote_char; - return tok; - }); - - function skip_line_comment(type) { - var regex_allowed = S.regex_allowed; - var i = find_eol(), ret; - if (i == -1) { - ret = S.text.substr(S.pos); - S.pos = S.text.length; - } else { - ret = S.text.substring(S.pos, i); - S.pos = i; - } - S.col = S.tokcol + (S.pos - S.tokpos); - S.comments_before.push(token(type, ret, true)); - S.regex_allowed = regex_allowed; - return next_token; - } - - var skip_multiline_comment = with_eof_error("Unterminated multiline comment", function() { - var regex_allowed = S.regex_allowed; - var i = find("*/", true); - var text = S.text.substring(S.pos, i).replace(/\r\n|\r|\u2028|\u2029/g, "\n"); - // update stream position - forward(text.length /* doesn't count \r\n as 2 char while S.pos - i does */ + 2); - S.comments_before.push(token("comment2", text, true)); - S.regex_allowed = regex_allowed; - return next_token; - }); - - function read_name() { - var backslash = false, ch, escaped = false, name = peek() == "#" ? next() : ""; - while (ch = peek()) { - if (!backslash) { - if (ch == "\\") escaped = backslash = true, next(); - else if (is_identifier_char(ch)) name += next(); - else break; - } else { - if (ch != "u") parse_error("Expecting UnicodeEscapeSequence -- uXXXX"); - ch = read_escaped_char(); - if (!is_identifier_char(ch)) parse_error("Unicode char: " + ch.charCodeAt(0) + " is not valid in identifier"); - name += ch; - backslash = false; - } - } - if (KEYWORDS[name] && escaped) { - var hex = name.charCodeAt(0).toString(16).toUpperCase(); - name = "\\u" + "0000".substr(hex.length) + hex + name.slice(1); - } - return name; - } - - var read_regexp = with_eof_error("Unterminated regular expression", function(source) { - var prev_backslash = false, ch, in_class = false; - while ((ch = next(true))) if (NEWLINE_CHARS[ch]) { - parse_error("Unexpected line terminator"); - } else if (prev_backslash) { - source += "\\" + ch; - prev_backslash = false; - } else if (ch == "[") { - in_class = true; - source += ch; - } else if (ch == "]" && in_class) { - in_class = false; - source += ch; - } else if (ch == "/" && !in_class) { - break; - } else if (ch == "\\") { - prev_backslash = true; - } else { - source += ch; - } - var mods = read_name(); - try { - var regexp = new RegExp(source, mods); - regexp.raw_source = source; - return token("regexp", regexp); - } catch (e) { - parse_error(e.message); - } - }); - - function read_operator(prefix) { - function grow(op) { - if (!peek()) return op; - var bigger = op + peek(); - if (OPERATORS[bigger]) { - next(); - return grow(bigger); - } else { - return op; - } - } - return token("operator", grow(prefix || next())); - } - - function handle_slash() { - next(); - switch (peek()) { - case "/": - next(); - return skip_line_comment("comment1"); - case "*": - next(); - return skip_multiline_comment(); - } - return S.regex_allowed ? read_regexp("") : read_operator("/"); - } - - function handle_dot() { - next(); - var ch = peek(); - if (ch == ".") { - var op = "."; - do { - op += "."; - next(); - } while (peek() == "."); - return token("operator", op); - } - return is_digit(ch.charCodeAt(0)) ? read_num(".") : token("punc", "."); - } - - function read_word() { - var word = read_name(); - if (prev_was_dot) return token("name", word); - return KEYWORDS_ATOM[word] ? token("atom", word) - : !KEYWORDS[word] ? token("name", word) - : OPERATORS[word] ? token("operator", word) - : token("keyword", word); - } - - function with_eof_error(eof_error, cont) { - return function(x) { - try { - return cont(x); - } catch (ex) { - if (ex === EX_EOF) parse_error(eof_error); - else throw ex; - } - }; - } - - function next_token(force_regexp) { - if (force_regexp != null) - return read_regexp(force_regexp); - if (shebang && S.pos == 0 && looking_at("#!")) { - start_token(); - forward(2); - skip_line_comment("comment5"); - } - for (;;) { - skip_whitespace(); - start_token(); - if (html5_comments) { - if (looking_at("") && S.newline_before) { - forward(3); - skip_line_comment("comment4"); - continue; - } - } - var ch = peek(); - if (!ch) return token("eof"); - var code = ch.charCodeAt(0); - switch (code) { - case 34: case 39: return read_string(ch); - case 46: return handle_dot(); - case 47: - var tok = handle_slash(); - if (tok === next_token) continue; - return tok; - } - if (is_digit(code)) return read_num(); - if (PUNC_CHARS[ch]) return token("punc", next()); - if (looking_at("=>")) return token("punc", next() + next()); - if (OPERATOR_CHARS[ch]) return read_operator(); - if (code == 35 || code == 92 || !NON_IDENTIFIER_CHARS[ch]) return read_word(); - break; - } - parse_error("Unexpected character '" + ch + "'"); - } - - next_token.context = function(nc) { - if (nc) S = nc; - return S; - }; - - next_token.add_directive = function(directive) { - S.directive_stack[S.directive_stack.length - 1].push(directive); - if (S.directives[directive]) S.directives[directive]++; - else S.directives[directive] = 1; - } - - next_token.push_directives_stack = function() { - S.directive_stack.push([]); - } - - next_token.pop_directives_stack = function() { - var directives = S.directive_stack.pop(); - for (var i = directives.length; --i >= 0;) { - S.directives[directives[i]]--; - } - } - - next_token.has_directive = function(directive) { - return S.directives[directive] > 0; - } - - return next_token; -} - -/* -----[ Parser (constants) ]----- */ - -var UNARY_PREFIX = makePredicate("typeof void delete -- ++ ! ~ - +"); - -var UNARY_POSTFIX = makePredicate("-- ++"); - -var ASSIGNMENT = makePredicate("= += -= /= *= %= **= >>= <<= >>>= &= |= ^= &&= ||= ??="); - -var PRECEDENCE = function(a, ret) { - for (var i = 0; i < a.length;) { - var b = a[i++]; - for (var j = 0; j < b.length; j++) { - ret[b[j]] = i; - } - } - return ret; -}([ - ["??"], - ["||"], - ["&&"], - ["|"], - ["^"], - ["&"], - ["==", "===", "!=", "!=="], - ["<", ">", "<=", ">=", "in", "instanceof"], - [">>", "<<", ">>>"], - ["+", "-"], - ["*", "/", "%"], - ["**"], -], {}); - -var ATOMIC_START_TOKEN = makePredicate("atom bigint num regexp string"); - -/* -----[ Parser ]----- */ - -function parse($TEXT, options) { - options = defaults(options, { - bare_returns : false, - expression : false, - filename : null, - html5_comments : true, - shebang : true, - strict : false, - toplevel : null, - }, true); - - var S = { - input : typeof $TEXT == "string" - ? tokenizer($TEXT, options.filename, options.html5_comments, options.shebang) - : $TEXT, - in_async : false, - in_directives : true, - in_funarg : -1, - in_function : 0, - in_generator : false, - in_loop : 0, - labels : [], - peeked : null, - prev : null, - token : null, - }; - - S.token = next(); - - function is(type, value) { - return is_token(S.token, type, value); - } - - function peek() { - return S.peeked || (S.peeked = S.input()); - } - - function next() { - S.prev = S.token; - if (S.peeked) { - S.token = S.peeked; - S.peeked = null; - } else { - S.token = S.input(); - } - S.in_directives = S.in_directives && ( - S.token.type == "string" || is("punc", ";") - ); - return S.token; - } - - function prev() { - return S.prev; - } - - function croak(msg, line, col, pos) { - var ctx = S.input.context(); - js_error(msg, - ctx.filename, - line != null ? line : ctx.tokline, - col != null ? col : ctx.tokcol, - pos != null ? pos : ctx.tokpos); - } - - function token_error(token, msg) { - croak(msg, token.line, token.col); - } - - function token_to_string(type, value) { - return type + (value === undefined ? "" : " «" + value + "»"); - } - - function unexpected(token) { - if (token == null) token = S.token; - token_error(token, "Unexpected token: " + token_to_string(token.type, token.value)); - } - - function expect_token(type, val) { - if (is(type, val)) return next(); - token_error(S.token, "Unexpected token: " + token_to_string(S.token.type, S.token.value) + ", expected: " + token_to_string(type, val)); - } - - function expect(punc) { - return expect_token("punc", punc); - } - - function has_newline_before(token) { - return token.nlb || !all(token.comments_before, function(comment) { - return !comment.nlb; - }); - } - - function can_insert_semicolon() { - return !options.strict - && (is("eof") || is("punc", "}") || has_newline_before(S.token)); - } - - function semicolon(optional) { - if (is("punc", ";")) next(); - else if (!optional && !can_insert_semicolon()) expect(";"); - } - - function parenthesised() { - expect("("); - var exp = expression(); - expect(")"); - return exp; - } - - function embed_tokens(parser) { - return function() { - var start = S.token; - var expr = parser.apply(null, arguments); - var end = prev(); - expr.start = start; - expr.end = end; - return expr; - }; - } - - function handle_regexp() { - if (is("operator", "/") || is("operator", "/=")) { - S.peeked = null; - S.token = S.input(S.token.value.substr(1)); // force regexp - } - } - - var statement = embed_tokens(function() { - handle_regexp(); - switch (S.token.type) { - case "string": - var dir = S.in_directives; - var body = expression(); - if (dir) { - if (body instanceof AST_String) { - var value = body.start.raw.slice(1, -1); - S.input.add_directive(value); - body.value = value; - } else { - S.in_directives = dir = false; - } - } - semicolon(); - return dir ? new AST_Directive(body) : new AST_SimpleStatement({ body: body }); - case "num": - case "bigint": - case "regexp": - case "operator": - case "atom": - return simple_statement(); - - case "name": - switch (S.token.value) { - case "async": - if (is_token(peek(), "keyword", "function")) { - next(); - next(); - if (!is("operator", "*")) return function_(AST_AsyncDefun); - next(); - return function_(AST_AsyncGeneratorDefun); - } - break; - case "await": - if (S.in_async) return simple_statement(); - break; - case "export": - next(); - return export_(); - case "import": - var token = peek(); - if (!(token.type == "punc" && /^[(.]$/.test(token.value))) { - next(); - return import_(); - } - case "yield": - if (S.in_generator) return simple_statement(); - break; - } - return is_token(peek(), "punc", ":") - ? labeled_statement() - : simple_statement(); - - case "punc": - switch (S.token.value) { - case "{": - return new AST_BlockStatement({ - start : S.token, - body : block_(), - end : prev() - }); - case "[": - case "(": - case "`": - return simple_statement(); - case ";": - S.in_directives = false; - next(); - return new AST_EmptyStatement(); - default: - unexpected(); - } - - case "keyword": - switch (S.token.value) { - case "break": - next(); - return break_cont(AST_Break); - - case "class": - next(); - return class_(AST_DefClass); - - case "const": - next(); - var node = const_(); - semicolon(); - return node; - - case "continue": - next(); - return break_cont(AST_Continue); - - case "debugger": - next(); - semicolon(); - return new AST_Debugger(); - - case "do": - next(); - var body = in_loop(statement); - expect_token("keyword", "while"); - var condition = parenthesised(); - semicolon(true); - return new AST_Do({ - body : body, - condition : condition - }); - - case "while": - next(); - return new AST_While({ - condition : parenthesised(), - body : in_loop(statement) - }); - - case "for": - next(); - return for_(); - - case "function": - next(); - if (!is("operator", "*")) return function_(AST_Defun); - next(); - return function_(AST_GeneratorDefun); - - case "if": - next(); - return if_(); - - case "let": - next(); - var node = let_(); - semicolon(); - return node; - - case "return": - if (S.in_function == 0 && !options.bare_returns) - croak("'return' outside of function"); - next(); - var value = null; - if (is("punc", ";")) { - next(); - } else if (!can_insert_semicolon()) { - value = expression(); - semicolon(); - } - return new AST_Return({ - value: value - }); - - case "switch": - next(); - return new AST_Switch({ - expression : parenthesised(), - body : in_loop(switch_body_) - }); - - case "throw": - next(); - if (has_newline_before(S.token)) - croak("Illegal newline after 'throw'"); - var value = expression(); - semicolon(); - return new AST_Throw({ - value: value - }); - - case "try": - next(); - return try_(); - - case "var": - next(); - var node = var_(); - semicolon(); - return node; - - case "with": - if (S.input.has_directive("use strict")) { - croak("Strict mode may not include a with statement"); - } - next(); - return new AST_With({ - expression : parenthesised(), - body : statement() - }); - } - } - unexpected(); - }); - - function labeled_statement() { - var label = as_symbol(AST_Label); - if (!all(S.labels, function(l) { - return l.name != label.name; - })) { - // ECMA-262, 12.12: An ECMAScript program is considered - // syntactically incorrect if it contains a - // LabelledStatement that is enclosed by a - // LabelledStatement with the same Identifier as label. - croak("Label " + label.name + " defined twice"); - } - expect(":"); - S.labels.push(label); - var stat = statement(); - S.labels.pop(); - if (!(stat instanceof AST_IterationStatement)) { - // check for `continue` that refers to this label. - // those should be reported as syntax errors. - // https://github.com/mishoo/UglifyJS/issues/287 - label.references.forEach(function(ref) { - if (ref instanceof AST_Continue) { - token_error(ref.label.start, "Continue label `" + label.name + "` must refer to IterationStatement"); - } - }); - } - return new AST_LabeledStatement({ body: stat, label: label }); - } - - function simple_statement() { - var body = expression(); - semicolon(); - return new AST_SimpleStatement({ body: body }); - } - - function break_cont(type) { - var label = null, ldef; - if (!can_insert_semicolon()) { - label = as_symbol(AST_LabelRef, true); - } - if (label != null) { - ldef = find_if(function(l) { - return l.name == label.name; - }, S.labels); - if (!ldef) token_error(label.start, "Undefined label " + label.name); - label.thedef = ldef; - } else if (S.in_loop == 0) croak(type.TYPE + " not inside a loop or switch"); - semicolon(); - var stat = new type({ label: label }); - if (ldef) ldef.references.push(stat); - return stat; - } - - function has_modifier(name) { - if (!is("name", name)) return; - var token = peek(); - if (!token) return; - if (is_token(token, "operator", "=")) return; - if (token.type == "punc" && /^[(;}]$/.test(token.value)) return; - if (has_newline_before(token)) return; - return next(); - } - - function class_(ctor) { - var was_async = S.in_async; - var was_gen = S.in_generator; - S.input.push_directives_stack(); - S.input.add_directive("use strict"); - var name; - if (ctor === AST_DefClass) { - name = as_symbol(AST_SymbolDefClass); - } else { - name = as_symbol(AST_SymbolClass, true); - } - var parent = null; - if (is("keyword", "extends")) { - next(); - handle_regexp(); - parent = expr_atom(true); - } - expect("{"); - var props = []; - while (!is("punc", "}")) { - if (is("punc", ";")) { - next(); - continue; - } - var start = S.token; - var fixed = !!has_modifier("static"); - var async = has_modifier("async"); - if (is("operator", "*")) { - next(); - var internal = is("name") && /^#/.test(S.token.value); - var key = as_property_key(); - var gen_start = S.token; - var gen = function_(async ? AST_AsyncGeneratorFunction : AST_GeneratorFunction); - gen.start = gen_start; - gen.end = prev(); - props.push(new AST_ClassMethod({ - start: start, - static: fixed, - private: internal, - key: key, - value: gen, - end: prev(), - })); - continue; - } - var internal = is("name") && /^#/.test(S.token.value); - var key = as_property_key(); - if (is("punc", "(")) { - var func_start = S.token; - var func = function_(async ? AST_AsyncFunction : AST_Function); - func.start = func_start; - func.end = prev(); - props.push(new AST_ClassMethod({ - start: start, - static: fixed, - private: internal, - key: key, - value: func, - end: prev(), - })); - continue; - } - if (async) unexpected(async); - var value = null; - if (is("operator", "=")) { - next(); - S.in_async = false; - S.in_generator = false; - value = maybe_assign(); - S.in_generator = was_gen; - S.in_async = was_async; - } else if (!(is("punc", ";") || is("punc", "}"))) { - var type = null; - switch (key) { - case "get": - type = AST_ClassGetter; - break; - case "set": - type = AST_ClassSetter; - break; - } - if (type) { - props.push(new type({ - start: start, - static: fixed, - private: is("name") && /^#/.test(S.token.value), - key: as_property_key(), - value: create_accessor(), - end: prev(), - })); - continue; - } - } - semicolon(); - props.push(new AST_ClassField({ - start: start, - static: fixed, - private: internal, - key: key, - value: value, - end: prev(), - })); - } - next(); - S.input.pop_directives_stack(); - S.in_generator = was_gen; - S.in_async = was_async; - return new ctor({ - extends: parent, - name: name, - properties: props, - }); - } - - function for_() { - var await = is("name", "await") && next(); - expect("("); - var init = null; - if (await || !is("punc", ";")) { - init = is("keyword", "const") - ? (next(), const_(true)) - : is("keyword", "let") - ? (next(), let_(true)) - : is("keyword", "var") - ? (next(), var_(true)) - : expression(true); - var ctor; - if (await) { - expect_token("name", "of"); - ctor = AST_ForAwaitOf; - } else if (is("operator", "in")) { - next(); - ctor = AST_ForIn; - } else if (is("name", "of")) { - next(); - ctor = AST_ForOf; - } - if (ctor) { - if (init instanceof AST_Definitions) { - if (init.definitions.length > 1) { - token_error(init.start, "Only one variable declaration allowed in for..in/of loop"); - } - if (ctor !== AST_ForIn && init.definitions[0].value) { - token_error(init.definitions[0].value.start, "No initializers allowed in for..of loop"); - } - } else if (!(is_assignable(init) || (init = to_destructured(init)) instanceof AST_Destructured)) { - token_error(init.start, "Invalid left-hand side in for..in/of loop"); - } - return for_enum(ctor, init); - } - } - return regular_for(init); - } - - function regular_for(init) { - expect(";"); - var test = is("punc", ";") ? null : expression(); - expect(";"); - var step = is("punc", ")") ? null : expression(); - expect(")"); - return new AST_For({ - init : init, - condition : test, - step : step, - body : in_loop(statement) - }); - } - - function for_enum(ctor, init) { - handle_regexp(); - var obj = expression(); - expect(")"); - return new ctor({ - init : init, - object : obj, - body : in_loop(statement) - }); - } - - function to_funarg(node) { - if (node instanceof AST_Array) { - var rest = null; - if (node.elements[node.elements.length - 1] instanceof AST_Spread) { - rest = to_funarg(node.elements.pop().expression); - } - return new AST_DestructuredArray({ - start: node.start, - elements: node.elements.map(to_funarg), - rest: rest, - end: node.end, - }); - } - if (node instanceof AST_Assign) return new AST_DefaultValue({ - start: node.start, - name: to_funarg(node.left), - value: node.right, - end: node.end, - }); - if (node instanceof AST_DefaultValue) { - node.name = to_funarg(node.name); - return node; - } - if (node instanceof AST_DestructuredArray) { - node.elements = node.elements.map(to_funarg); - if (node.rest) node.rest = to_funarg(node.rest); - return node; - } - if (node instanceof AST_DestructuredObject) { - node.properties.forEach(function(prop) { - prop.value = to_funarg(prop.value); - }); - if (node.rest) node.rest = to_funarg(node.rest); - return node; - } - if (node instanceof AST_Hole) return node; - if (node instanceof AST_Object) { - var rest = null; - if (node.properties[node.properties.length - 1] instanceof AST_Spread) { - rest = to_funarg(node.properties.pop().expression); - } - return new AST_DestructuredObject({ - start: node.start, - properties: node.properties.map(function(prop) { - if (!(prop instanceof AST_ObjectKeyVal)) token_error(prop.start, "Invalid destructuring assignment"); - return new AST_DestructuredKeyVal({ - start: prop.start, - key: prop.key, - value: to_funarg(prop.value), - end: prop.end, - }); - }), - rest: rest, - end: node.end, - }); - } - if (node instanceof AST_SymbolFunarg) return node; - if (node instanceof AST_SymbolRef) return new AST_SymbolFunarg(node); - token_error(node.start, "Invalid arrow parameter"); - } - - function arrow(exprs, start, async) { - var was_async = S.in_async; - var was_gen = S.in_generator; - S.in_async = async; - S.in_generator = false; - var was_funarg = S.in_funarg; - S.in_funarg = S.in_function; - var argnames = exprs.map(to_funarg); - var rest = exprs.rest || null; - if (rest) rest = to_funarg(rest); - S.in_funarg = was_funarg; - expect("=>"); - var body, value; - var loop = S.in_loop; - var labels = S.labels; - ++S.in_function; - S.in_directives = true; - S.input.push_directives_stack(); - S.in_loop = 0; - S.labels = []; - if (is("punc", "{")) { - body = block_(); - value = null; - } else { - body = []; - handle_regexp(); - value = maybe_assign(); - } - var is_strict = S.input.has_directive("use strict"); - S.input.pop_directives_stack(); - --S.in_function; - S.in_loop = loop; - S.labels = labels; - S.in_generator = was_gen; - S.in_async = was_async; - var node = new (async ? AST_AsyncArrow : AST_Arrow)({ - start: start, - argnames: argnames, - rest: rest, - body: body, - value: value, - end: prev(), - }); - if (is_strict) node.each_argname(strict_verify_symbol); - return node; - } - - var function_ = function(ctor) { - var was_async = S.in_async; - var was_gen = S.in_generator; - var name; - if (/Defun$/.test(ctor.TYPE)) { - name = as_symbol(AST_SymbolDefun); - S.in_async = /^Async/.test(ctor.TYPE); - S.in_generator = /Generator/.test(ctor.TYPE); - } else { - S.in_async = /^Async/.test(ctor.TYPE); - S.in_generator = /Generator/.test(ctor.TYPE); - name = as_symbol(AST_SymbolLambda, true); - } - if (name && ctor !== AST_Accessor && !(name instanceof AST_SymbolDeclaration)) - unexpected(prev()); - expect("("); - var was_funarg = S.in_funarg; - S.in_funarg = S.in_function; - var argnames = expr_list(")", !options.strict, false, function() { - return maybe_default(AST_SymbolFunarg); - }); - S.in_funarg = was_funarg; - var loop = S.in_loop; - var labels = S.labels; - ++S.in_function; - S.in_directives = true; - S.input.push_directives_stack(); - S.in_loop = 0; - S.labels = []; - var body = block_(); - var is_strict = S.input.has_directive("use strict"); - S.input.pop_directives_stack(); - --S.in_function; - S.in_loop = loop; - S.labels = labels; - S.in_generator = was_gen; - S.in_async = was_async; - var node = new ctor({ - name: name, - argnames: argnames, - rest: argnames.rest || null, - body: body - }); - if (is_strict) { - if (name) strict_verify_symbol(name); - node.each_argname(strict_verify_symbol); - } - return node; - }; - - function if_() { - var cond = parenthesised(), body = statement(), belse = null; - if (is("keyword", "else")) { - next(); - belse = statement(); - } - return new AST_If({ - condition : cond, - body : body, - alternative : belse - }); - } - - function is_alias() { - return is("name") || is_identifier_string(S.token.value); - } - - function export_() { - if (is("operator", "*")) { - next(); - var alias = "*"; - if (is("name", "as")) { - next(); - if (!is_alias()) expect_token("name"); - alias = S.token.value; - next(); - } - expect_token("name", "from"); - var path = S.token; - expect_token("string"); - semicolon(); - return new AST_ExportForeign({ - aliases: [ alias ], - keys: [ "*" ], - path: path.value, - quote: path.quote, - }); - } - if (is("punc", "{")) { - next(); - var aliases = []; - var keys = []; - while (is_alias()) { - var key = S.token; - next(); - keys.push(key); - if (is("name", "as")) { - next(); - if (!is_alias()) expect_token("name"); - aliases.push(S.token.value); - next(); - } else { - aliases.push(key.value); - } - if (!is("punc", "}")) expect(","); - } - expect("}"); - if (is("name", "from")) { - next(); - var path = S.token; - expect_token("string"); - semicolon(); - return new AST_ExportForeign({ - aliases: aliases, - keys: keys.map(function(token) { - return token.value; - }), - path: path.value, - quote: path.quote, - }); - } - semicolon(); - return new AST_ExportReferences({ - properties: keys.map(function(token, index) { - if (!is_token(token, "name")) token_error(token, "Name expected"); - var sym = _make_symbol(AST_SymbolExport, token); - sym.alias = aliases[index]; - return sym; - }), - }); - } - if (is("keyword", "default")) { - next(); - var start = S.token; - var body = export_default_decl(); - if (body) { - body.start = start; - body.end = prev(); - } else { - handle_regexp(); - body = expression(); - semicolon(); - } - return new AST_ExportDefault({ body: body }); - } - return new AST_ExportDeclaration({ body: export_decl() }); - } - - function maybe_named(def, expr) { - if (expr.name) { - expr = new def(expr); - expr.name = new (def === AST_DefClass ? AST_SymbolDefClass : AST_SymbolDefun)(expr.name); - } - return expr; - } - - function export_default_decl() { - if (is("name", "async")) { - if (!is_token(peek(), "keyword", "function")) return; - next(); - next(); - if (!is("operator", "*")) return maybe_named(AST_AsyncDefun, function_(AST_AsyncFunction)); - next(); - return maybe_named(AST_AsyncGeneratorDefun, function_(AST_AsyncGeneratorFunction)); - } else if (is("keyword")) switch (S.token.value) { - case "class": - next(); - return maybe_named(AST_DefClass, class_(AST_ClassExpression)); - case "function": - next(); - if (!is("operator", "*")) return maybe_named(AST_Defun, function_(AST_Function)); - next(); - return maybe_named(AST_GeneratorDefun, function_(AST_GeneratorFunction)); - } - } - - var export_decl = embed_tokens(function() { - if (is("name", "async")) { - next(); - expect_token("keyword", "function"); - if (!is("operator", "*")) return function_(AST_AsyncDefun); - next(); - return function_(AST_AsyncGeneratorDefun); - } else if (is("keyword")) switch (S.token.value) { - case "class": - next(); - return class_(AST_DefClass); - case "const": - next(); - var node = const_(); - semicolon(); - return node; - case "function": - next(); - if (!is("operator", "*")) return function_(AST_Defun); - next(); - return function_(AST_GeneratorDefun); - case "let": - next(); - var node = let_(); - semicolon(); - return node; - case "var": - next(); - var node = var_(); - semicolon(); - return node; - } - unexpected(); - }); - - function import_() { - var all = null; - var def = as_symbol(AST_SymbolImport, true); - var props = null; - if (def ? (def.key = "", is("punc", ",") && next()) : !is("string")) { - if (is("operator", "*")) { - next(); - expect_token("name", "as"); - all = as_symbol(AST_SymbolImport); - all.key = "*"; - } else { - expect("{"); - props = []; - while (is_alias()) { - var alias; - if (is_token(peek(), "name", "as")) { - var key = S.token.value; - next(); - next(); - alias = as_symbol(AST_SymbolImport); - alias.key = key; - } else { - alias = as_symbol(AST_SymbolImport); - alias.key = alias.name; - } - props.push(alias); - if (!is("punc", "}")) expect(","); - } - expect("}"); - } - } - if (all || def || props) expect_token("name", "from"); - var path = S.token; - expect_token("string"); - semicolon(); - return new AST_Import({ - all: all, - default: def, - path: path.value, - properties: props, - quote: path.quote, - }); - } - - function block_() { - expect("{"); - var a = []; - while (!is("punc", "}")) { - if (is("eof")) expect("}"); - a.push(statement()); - } - next(); - return a; - } - - function switch_body_() { - expect("{"); - var a = [], branch, cur, default_branch, tmp; - while (!is("punc", "}")) { - if (is("eof")) expect("}"); - if (is("keyword", "case")) { - if (branch) branch.end = prev(); - cur = []; - branch = new AST_Case({ - start : (tmp = S.token, next(), tmp), - expression : expression(), - body : cur - }); - a.push(branch); - expect(":"); - } else if (is("keyword", "default")) { - if (branch) branch.end = prev(); - if (default_branch) croak("More than one default clause in switch statement"); - cur = []; - branch = new AST_Default({ - start : (tmp = S.token, next(), expect(":"), tmp), - body : cur - }); - a.push(branch); - default_branch = branch; - } else { - if (!cur) unexpected(); - cur.push(statement()); - } - } - if (branch) branch.end = prev(); - next(); - return a; - } - - function try_() { - var body = block_(), bcatch = null, bfinally = null; - if (is("keyword", "catch")) { - var start = S.token; - next(); - var name = null; - if (is("punc", "(")) { - next(); - name = maybe_destructured(AST_SymbolCatch); - expect(")"); - } - bcatch = new AST_Catch({ - start : start, - argname : name, - body : block_(), - end : prev() - }); - } - if (is("keyword", "finally")) { - var start = S.token; - next(); - bfinally = new AST_Finally({ - start : start, - body : block_(), - end : prev() - }); - } - if (!bcatch && !bfinally) - croak("Missing catch/finally blocks"); - return new AST_Try({ - body : body, - bcatch : bcatch, - bfinally : bfinally - }); - } - - function vardefs(type, no_in) { - var a = []; - for (;;) { - var start = S.token; - var name = maybe_destructured(type); - var value = null; - if (is("operator", "=")) { - next(); - value = maybe_assign(no_in); - } else if (!no_in && (type === AST_SymbolConst || name instanceof AST_Destructured)) { - croak("Missing initializer in declaration"); - } - a.push(new AST_VarDef({ - start : start, - name : name, - value : value, - end : prev() - })); - if (!is("punc", ",")) - break; - next(); - } - return a; - } - - var const_ = function(no_in) { - return new AST_Const({ - start : prev(), - definitions : vardefs(AST_SymbolConst, no_in), - end : prev() - }); - }; - - var let_ = function(no_in) { - return new AST_Let({ - start : prev(), - definitions : vardefs(AST_SymbolLet, no_in), - end : prev() - }); - }; - - var var_ = function(no_in) { - return new AST_Var({ - start : prev(), - definitions : vardefs(AST_SymbolVar, no_in), - end : prev() - }); - }; - - var new_ = function(allow_calls) { - var start = S.token; - expect_token("operator", "new"); - var call; - if (is("punc", ".") && is_token(peek(), "name", "target")) { - next(); - next(); - call = new AST_NewTarget(); - } else { - var exp = expr_atom(false), args; - if (is("punc", "(")) { - next(); - args = expr_list(")", !options.strict); - } else { - args = []; - } - call = new AST_New({ expression: exp, args: args }); - } - call.start = start; - call.end = prev(); - return subscripts(call, allow_calls); - }; - - function as_atom_node() { - var ret, tok = S.token, value = tok.value; - switch (tok.type) { - case "num": - if (isFinite(value)) { - ret = new AST_Number({ value: value }); - } else { - ret = new AST_Infinity(); - if (value < 0) ret = new AST_UnaryPrefix({ operator: "-", expression: ret }); - } - break; - case "bigint": - ret = new AST_BigInt({ value: value }); - break; - case "string": - ret = new AST_String({ value : value, quote : tok.quote }); - break; - case "regexp": - ret = new AST_RegExp({ value: value }); - break; - case "atom": - switch (value) { - case "false": - ret = new AST_False(); - break; - case "true": - ret = new AST_True(); - break; - case "null": - ret = new AST_Null(); - break; - default: - unexpected(); - } - break; - default: - unexpected(); - } - next(); - ret.start = ret.end = tok; - return ret; - } - - var expr_atom = function(allow_calls) { - if (is("operator", "new")) { - return new_(allow_calls); - } - var start = S.token; - if (is("punc")) { - switch (start.value) { - case "`": - var tmpl = template(null); - tmpl.start = start; - tmpl.end = prev(); - return subscripts(tmpl, allow_calls); - case "(": - next(); - if (is("punc", ")")) { - next(); - return arrow([], start); - } - var ex = expression(false, true); - var len = start.comments_before.length; - [].unshift.apply(ex.start.comments_before, start.comments_before); - start.comments_before.length = 0; - start.comments_before = ex.start.comments_before; - start.comments_before_length = len; - if (len == 0 && start.comments_before.length > 0) { - var comment = start.comments_before[0]; - if (!comment.nlb) { - comment.nlb = start.nlb; - start.nlb = false; - } - } - start.comments_after = ex.start.comments_after; - ex.start = start; - expect(")"); - var end = prev(); - end.comments_before = ex.end.comments_before; - end.comments_after.forEach(function(comment) { - ex.end.comments_after.push(comment); - if (comment.nlb) S.token.nlb = true; - }); - end.comments_after.length = 0; - end.comments_after = ex.end.comments_after; - ex.end = end; - if (is("punc", "=>")) return arrow(ex instanceof AST_Sequence ? ex.expressions : [ ex ], start); - return subscripts(ex, allow_calls); - case "[": - return subscripts(array_(), allow_calls); - case "{": - return subscripts(object_(), allow_calls); - } - unexpected(); - } - if (is("keyword")) switch (start.value) { - case "class": - next(); - var clazz = class_(AST_ClassExpression); - clazz.start = start; - clazz.end = prev(); - return subscripts(clazz, allow_calls); - case "function": - next(); - var func; - if (is("operator", "*")) { - next(); - func = function_(AST_GeneratorFunction); - } else { - func = function_(AST_Function); - } - func.start = start; - func.end = prev(); - return subscripts(func, allow_calls); - } - if (is("name")) { - var sym = _make_symbol(AST_SymbolRef, start); - next(); - if (sym.name == "async") { - if (is("keyword", "function")) { - next(); - var func; - if (is("operator", "*")) { - next(); - func = function_(AST_AsyncGeneratorFunction); - } else { - func = function_(AST_AsyncFunction); - } - func.start = start; - func.end = prev(); - return subscripts(func, allow_calls); - } - if (is("name") && is_token(peek(), "punc", "=>")) { - start = S.token; - sym = _make_symbol(AST_SymbolRef, start); - next(); - return arrow([ sym ], start, true); - } - if (is("punc", "(")) { - var call = subscripts(sym, allow_calls); - if (!is("punc", "=>")) return call; - var args = call.args; - if (args[args.length - 1] instanceof AST_Spread) { - args.rest = args.pop().expression; - } - return arrow(args, start, true); - } - } - return is("punc", "=>") ? arrow([ sym ], start) : subscripts(sym, allow_calls); - } - if (ATOMIC_START_TOKEN[S.token.type]) { - return subscripts(as_atom_node(), allow_calls); - } - unexpected(); - }; - - function expr_list(closing, allow_trailing_comma, allow_empty, parser) { - if (!parser) parser = maybe_assign; - var first = true, a = []; - while (!is("punc", closing)) { - if (first) first = false; else expect(","); - if (allow_trailing_comma && is("punc", closing)) break; - if (allow_empty && is("punc", ",")) { - a.push(new AST_Hole({ start: S.token, end: S.token })); - } else if (!is("operator", "...")) { - a.push(parser()); - } else if (parser === maybe_assign) { - a.push(new AST_Spread({ - start: S.token, - expression: (next(), parser()), - end: prev(), - })); - } else { - next(); - a.rest = parser(); - if (a.rest instanceof AST_DefaultValue) token_error(a.rest.start, "Invalid rest parameter"); - break; - } - } - expect(closing); - return a; - } - - var array_ = embed_tokens(function() { - expect("["); - return new AST_Array({ - elements: expr_list("]", !options.strict, true) - }); - }); - - var create_accessor = embed_tokens(function() { - return function_(AST_Accessor); - }); - - var object_ = embed_tokens(function() { - expect("{"); - var first = true, a = []; - while (!is("punc", "}")) { - if (first) first = false; else expect(","); - // allow trailing comma - if (!options.strict && is("punc", "}")) break; - var start = S.token; - if (is("operator", "*")) { - next(); - var key = as_property_key(); - var gen_start = S.token; - var gen = function_(AST_GeneratorFunction); - gen.start = gen_start; - gen.end = prev(); - a.push(new AST_ObjectMethod({ - start: start, - key: key, - value: gen, - end: prev(), - })); - continue; - } - if (is("operator", "...")) { - next(); - a.push(new AST_Spread({ - start: start, - expression: maybe_assign(), - end: prev(), - })); - continue; - } - if (is_token(peek(), "operator", "=")) { - var name = as_symbol(AST_SymbolRef); - next(); - a.push(new AST_ObjectKeyVal({ - start: start, - key: start.value, - value: new AST_Assign({ - start: start, - left: name, - operator: "=", - right: maybe_assign(), - end: prev(), - }), - end: prev(), - })); - continue; - } - if (is_token(peek(), "punc", ",") || is_token(peek(), "punc", "}")) { - a.push(new AST_ObjectKeyVal({ - start: start, - key: start.value, - value: as_symbol(AST_SymbolRef), - end: prev(), - })); - continue; - } - var key = as_property_key(); - if (is("punc", "(")) { - var func_start = S.token; - var func = function_(AST_Function); - func.start = func_start; - func.end = prev(); - a.push(new AST_ObjectMethod({ - start: start, - key: key, - value: func, - end: prev(), - })); - continue; - } - if (is("punc", ":")) { - next(); - a.push(new AST_ObjectKeyVal({ - start: start, - key: key, - value: maybe_assign(), - end: prev(), - })); - continue; - } - if (start.type == "name") switch (key) { - case "async": - var is_gen = is("operator", "*") && next(); - key = as_property_key(); - var func_start = S.token; - var func = function_(is_gen ? AST_AsyncGeneratorFunction : AST_AsyncFunction); - func.start = func_start; - func.end = prev(); - a.push(new AST_ObjectMethod({ - start: start, - key: key, - value: func, - end: prev(), - })); - continue; - case "get": - a.push(new AST_ObjectGetter({ - start: start, - key: as_property_key(), - value: create_accessor(), - end: prev(), - })); - continue; - case "set": - a.push(new AST_ObjectSetter({ - start: start, - key: as_property_key(), - value: create_accessor(), - end: prev(), - })); - continue; - } - unexpected(); - } - next(); - return new AST_Object({ properties: a }); - }); - - function as_property_key() { - var tmp = S.token; - switch (tmp.type) { - case "operator": - if (!KEYWORDS[tmp.value]) unexpected(); - case "num": - case "string": - case "name": - case "keyword": - case "atom": - next(); - return "" + tmp.value; - case "punc": - expect("["); - var key = maybe_assign(); - expect("]"); - return key; - default: - unexpected(); - } - } - - function as_name() { - var name = S.token.value; - expect_token("name"); - return name; - } - - function _make_symbol(type, token) { - var name = token.value; - switch (name) { - case "await": - if (S.in_async) unexpected(token); - break; - case "super": - type = AST_Super; - break; - case "this": - type = AST_This; - break; - case "yield": - if (S.in_generator) unexpected(token); - break; - } - return new type({ - name: "" + name, - start: token, - end: token, - }); - } - - function strict_verify_symbol(sym) { - if (sym.name == "arguments" || sym.name == "eval") - token_error(sym.start, "Unexpected " + sym.name + " in strict mode"); - } - - function as_symbol(type, noerror) { - if (!is("name")) { - if (!noerror) croak("Name expected"); - return null; - } - var sym = _make_symbol(type, S.token); - if (S.input.has_directive("use strict") && sym instanceof AST_SymbolDeclaration) { - strict_verify_symbol(sym); - } - next(); - return sym; - } - - function maybe_destructured(type) { - var start = S.token; - if (is("punc", "[")) { - next(); - var elements = expr_list("]", !options.strict, true, function() { - return maybe_default(type); - }); - return new AST_DestructuredArray({ - start: start, - elements: elements, - rest: elements.rest || null, - end: prev(), - }); - } - if (is("punc", "{")) { - next(); - var first = true, a = [], rest = null; - while (!is("punc", "}")) { - if (first) first = false; else expect(","); - // allow trailing comma - if (!options.strict && is("punc", "}")) break; - var key_start = S.token; - if (is("punc", "[") || is_token(peek(), "punc", ":")) { - var key = as_property_key(); - expect(":"); - a.push(new AST_DestructuredKeyVal({ - start: key_start, - key: key, - value: maybe_default(type), - end: prev(), - })); - continue; - } - if (is("operator", "...")) { - next(); - rest = maybe_destructured(type); - break; - } - var name = as_symbol(type); - if (is("operator", "=")) { - next(); - name = new AST_DefaultValue({ - start: name.start, - name: name, - value: maybe_assign(), - end: prev(), - }); - } - a.push(new AST_DestructuredKeyVal({ - start: key_start, - key: key_start.value, - value: name, - end: prev(), - })); - } - expect("}"); - return new AST_DestructuredObject({ - start: start, - properties: a, - rest: rest, - end: prev(), - }); - } - return as_symbol(type); - } - - function maybe_default(type) { - var start = S.token; - var name = maybe_destructured(type); - if (!is("operator", "=")) return name; - next(); - return new AST_DefaultValue({ - start: start, - name: name, - value: maybe_assign(), - end: prev(), - }); - } - - function template(tag) { - var read = S.input.context().read_template; - var strings = []; - var expressions = []; - while (read(strings)) { - next(); - expressions.push(expression()); - if (!is("punc", "}")) unexpected(); - } - next(); - return new AST_Template({ - expressions: expressions, - strings: strings, - tag: tag, - }); - } - - var subscripts = function(expr, allow_calls, optional) { - var start = expr.start; - if (is("punc", "[")) { - next(); - var prop = expression(); - expect("]"); - return subscripts(new AST_Sub({ - start: start, - optional: optional, - expression: expr, - property: prop, - end: prev(), - }), allow_calls); - } - if (allow_calls && is("punc", "(")) { - next(); - var call = new AST_Call({ - start: start, - optional: optional, - expression: expr, - args: expr_list(")", !options.strict), - end: prev(), - }); - return subscripts(call, true); - } - if (optional || is("punc", ".")) { - if (!optional) next(); - return subscripts(new AST_Dot({ - start: start, - optional: optional, - expression: expr, - property: as_name(), - end: prev(), - }), allow_calls); - } - if (is("punc", "`")) { - var tmpl = template(expr); - tmpl.start = expr.start; - tmpl.end = prev(); - return subscripts(tmpl, allow_calls); - } - if (is("operator", "?") && is_token(peek(), "punc", ".")) { - next(); - next(); - return subscripts(expr, allow_calls, true); - } - if (expr instanceof AST_Call && !expr.pure) { - var start = expr.start; - var comments = start.comments_before; - var i = HOP(start, "comments_before_length") ? start.comments_before_length : comments.length; - while (--i >= 0) { - var match = /[@#]__PURE__/.exec(comments[i].value); - if (match) { - expr.pure = match[0]; - break; - } - } - } - return expr; - }; - - function maybe_unary(no_in) { - var start = S.token; - if (S.in_async && is("name", "await")) { - if (S.in_funarg === S.in_function) croak("Invalid use of await in function argument"); - S.input.context().regex_allowed = true; - next(); - return new AST_Await({ - start: start, - expression: maybe_unary(no_in), - end: prev(), - }); - } - if (S.in_generator && is("name", "yield")) { - if (S.in_funarg === S.in_function) croak("Invalid use of yield in function argument"); - S.input.context().regex_allowed = true; - next(); - var exp = null; - var nested = false; - if (is("operator", "*")) { - next(); - exp = maybe_assign(no_in); - nested = true; - } else if (is("punc") ? !PUNC_AFTER_EXPRESSION[S.token.value] : !can_insert_semicolon()) { - exp = maybe_assign(no_in); - } - return new AST_Yield({ - start: start, - expression: exp, - nested: nested, - end: prev(), - }); - } - if (is("operator") && UNARY_PREFIX[start.value]) { - next(); - handle_regexp(); - var ex = make_unary(AST_UnaryPrefix, start, maybe_unary(no_in)); - ex.start = start; - ex.end = prev(); - return ex; - } - var val = expr_atom(true); - while (is("operator") && UNARY_POSTFIX[S.token.value] && !has_newline_before(S.token)) { - val = make_unary(AST_UnaryPostfix, S.token, val); - val.start = start; - val.end = S.token; - next(); - } - return val; - } - - function make_unary(ctor, token, expr) { - var op = token.value; - switch (op) { - case "++": - case "--": - if (!is_assignable(expr)) - token_error(token, "Invalid use of " + op + " operator"); - break; - case "delete": - if (expr instanceof AST_SymbolRef && S.input.has_directive("use strict")) - token_error(expr.start, "Calling delete on expression not allowed in strict mode"); - break; - } - return new ctor({ operator: op, expression: expr }); - } - - var expr_op = function(left, min_prec, no_in) { - var op = is("operator") ? S.token.value : null; - if (op == "in" && no_in) op = null; - var prec = op != null ? PRECEDENCE[op] : null; - if (prec != null && prec > min_prec) { - next(); - var right = expr_op(maybe_unary(no_in), op == "**" ? prec - 1 : prec, no_in); - return expr_op(new AST_Binary({ - start : left.start, - left : left, - operator : op, - right : right, - end : right.end - }), min_prec, no_in); - } - return left; - }; - - function expr_ops(no_in) { - return expr_op(maybe_unary(no_in), 0, no_in); - } - - var maybe_conditional = function(no_in) { - var start = S.token; - var expr = expr_ops(no_in); - if (is("operator", "?")) { - next(); - var yes = maybe_assign(); - expect(":"); - return new AST_Conditional({ - start : start, - condition : expr, - consequent : yes, - alternative : maybe_assign(no_in), - end : prev() - }); - } - return expr; - }; - - function is_assignable(expr) { - return expr instanceof AST_PropAccess && !expr.optional || expr instanceof AST_SymbolRef; - } - - function to_destructured(node) { - if (node instanceof AST_Array) { - var rest = null; - if (node.elements[node.elements.length - 1] instanceof AST_Spread) { - rest = to_destructured(node.elements.pop().expression); - if (!(rest instanceof AST_Destructured || is_assignable(rest))) return node; - } - var elements = node.elements.map(to_destructured); - return all(elements, function(node) { - return node instanceof AST_DefaultValue - || node instanceof AST_Destructured - || node instanceof AST_Hole - || is_assignable(node); - }) ? new AST_DestructuredArray({ - start: node.start, - elements: elements, - rest: rest, - end: node.end, - }) : node; - } - if (node instanceof AST_Assign) { - var name = to_destructured(node.left); - return name instanceof AST_Destructured || is_assignable(name) ? new AST_DefaultValue({ - start: node.start, - name: name, - value: node.right, - end: node.end, - }) : node; - } - if (!(node instanceof AST_Object)) return node; - var rest = null; - if (node.properties[node.properties.length - 1] instanceof AST_Spread) { - rest = to_destructured(node.properties.pop().expression); - if (!(rest instanceof AST_Destructured || is_assignable(rest))) return node; - } - var props = []; - for (var i = 0; i < node.properties.length; i++) { - var prop = node.properties[i]; - if (!(prop instanceof AST_ObjectKeyVal)) return node; - var value = to_destructured(prop.value); - if (!(value instanceof AST_DefaultValue || value instanceof AST_Destructured || is_assignable(value))) { - return node; - } - props.push(new AST_DestructuredKeyVal({ - start: prop.start, - key: prop.key, - value: value, - end: prop.end, - })); - } - return new AST_DestructuredObject({ - start: node.start, - properties: props, - rest: rest, - end: node.end, - }); - } - - function maybe_assign(no_in) { - var start = S.token; - var left = maybe_conditional(no_in), val = S.token.value; - if (is("operator") && ASSIGNMENT[val]) { - if (is_assignable(left) || val == "=" && (left = to_destructured(left)) instanceof AST_Destructured) { - next(); - return new AST_Assign({ - start : start, - left : left, - operator : val, - right : maybe_assign(no_in), - end : prev() - }); - } - croak("Invalid assignment"); - } - return left; - } - - function expression(no_in, maybe_arrow) { - var start = S.token; - var exprs = []; - while (true) { - if (maybe_arrow && is("operator", "...")) { - next(); - exprs.rest = maybe_destructured(AST_SymbolFunarg); - break; - } - exprs.push(maybe_assign(no_in)); - if (!is("punc", ",")) break; - next(); - if (maybe_arrow && is("punc", ")") && is_token(peek(), "punc", "=>")) break; - } - return exprs.length == 1 && !exprs.rest ? exprs[0] : new AST_Sequence({ - start: start, - expressions: exprs, - end: prev(), - }); - } - - function in_loop(cont) { - ++S.in_loop; - var ret = cont(); - --S.in_loop; - return ret; - } - - if (options.expression) { - handle_regexp(); - var exp = expression(); - expect_token("eof"); - return exp; - } - - return function() { - var start = S.token; - var body = []; - S.input.push_directives_stack(); - while (!is("eof")) - body.push(statement()); - S.input.pop_directives_stack(); - var end = prev() || start; - var toplevel = options.toplevel; - if (toplevel) { - toplevel.body = toplevel.body.concat(body); - toplevel.end = end; - } else { - toplevel = new AST_Toplevel({ start: start, body: body, end: end }); - } - return toplevel; - }(); -} diff --git a/node_modules/uglify-js/lib/propmangle.js b/node_modules/uglify-js/lib/propmangle.js deleted file mode 100644 index e7dc5097..00000000 --- a/node_modules/uglify-js/lib/propmangle.js +++ /dev/null @@ -1,259 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -var builtins = function() { - var names = []; - // NaN will be included due to Number.NaN - [ - "null", - "true", - "false", - "Infinity", - "-Infinity", - "undefined", - ].forEach(add); - [ - Array, - Boolean, - Date, - Error, - Function, - Math, - Number, - Object, - RegExp, - String, - ].forEach(function(ctor) { - Object.getOwnPropertyNames(ctor).map(add); - if (ctor.prototype) { - Object.getOwnPropertyNames(new ctor()).map(add); - Object.getOwnPropertyNames(ctor.prototype).map(add); - } - }); - return makePredicate(names); - - function add(name) { - names.push(name); - } -}(); - -function reserve_quoted_keys(ast, reserved) { - ast.walk(new TreeWalker(function(node) { - if (node instanceof AST_ClassProperty) { - if (node.start && node.start.quote) add(node.key); - } else if (node instanceof AST_ObjectProperty) { - if (node.start && node.start.quote) add(node.key); - } else if (node instanceof AST_Sub) { - addStrings(node.property, add); - } - })); - - function add(name) { - push_uniq(reserved, name); - } -} - -function addStrings(node, add) { - if (node instanceof AST_Conditional) { - addStrings(node.consequent, add); - addStrings(node.alternative, add); - } else if (node instanceof AST_Sequence) { - addStrings(node.tail_node(), add); - } else if (node instanceof AST_String) { - add(node.value); - } -} - -function mangle_properties(ast, options) { - options = defaults(options, { - builtins: false, - cache: null, - debug: false, - keep_quoted: false, - regex: null, - reserved: null, - }, true); - - var reserved = Object.create(options.builtins ? null : builtins); - if (Array.isArray(options.reserved)) options.reserved.forEach(function(name) { - reserved[name] = true; - }); - - var cname = -1; - var cache; - if (options.cache) { - cache = options.cache.props; - cache.each(function(name) { - reserved[name] = true; - }); - } else { - cache = new Dictionary(); - } - - var regex = options.regex; - - // note debug is either false (disabled), or a string of the debug suffix to use (enabled). - // note debug may be enabled as an empty string, which is falsey. Also treat passing 'true' - // the same as passing an empty string. - var debug = options.debug !== false; - var debug_suffix; - if (debug) debug_suffix = options.debug === true ? "" : options.debug; - - var names_to_mangle = Object.create(null); - var unmangleable = Object.create(reserved); - - // step 1: find candidates to mangle - ast.walk(new TreeWalker(function(node) { - if (node instanceof AST_Binary) { - if (node.operator == "in") addStrings(node.left, add); - } else if (node.TYPE == "Call") { - var exp = node.expression; - if (exp instanceof AST_Dot) switch (exp.property) { - case "defineProperty": - case "getOwnPropertyDescriptor": - if (node.args.length < 2) break; - exp = exp.expression; - if (!(exp instanceof AST_SymbolRef)) break; - if (exp.name != "Object") break; - if (!exp.definition().undeclared) break; - addStrings(node.args[1], add); - break; - case "hasOwnProperty": - if (node.args.length < 1) break; - addStrings(node.args[0], add); - break; - } - } else if (node instanceof AST_ClassProperty) { - if (typeof node.key == "string") add(node.key); - } else if (node instanceof AST_Dot) { - add(node.property); - } else if (node instanceof AST_ObjectProperty) { - if (typeof node.key == "string") add(node.key); - } else if (node instanceof AST_Sub) { - addStrings(node.property, add); - } - })); - - // step 2: renaming properties - ast.walk(new TreeWalker(function(node) { - if (node instanceof AST_Binary) { - if (node.operator == "in") mangleStrings(node.left); - } else if (node.TYPE == "Call") { - var exp = node.expression; - if (exp instanceof AST_Dot) switch (exp.property) { - case "defineProperty": - case "getOwnPropertyDescriptor": - if (node.args.length < 2) break; - exp = exp.expression; - if (!(exp instanceof AST_SymbolRef)) break; - if (exp.name != "Object") break; - if (!exp.definition().undeclared) break; - mangleStrings(node.args[1]); - break; - case "hasOwnProperty": - if (node.args.length < 1) break; - mangleStrings(node.args[0]); - break; - } - } else if (node instanceof AST_ClassProperty) { - if (typeof node.key == "string") node.key = mangle(node.key); - } else if (node instanceof AST_Dot) { - node.property = mangle(node.property); - } else if (node instanceof AST_ObjectProperty) { - if (typeof node.key == "string") node.key = mangle(node.key); - } else if (node instanceof AST_Sub) { - if (!options.keep_quoted) mangleStrings(node.property); - } - })); - - // only function declarations after this line - - function can_mangle(name) { - if (unmangleable[name]) return false; - if (/^-?[0-9]+(\.[0-9]+)?(e[+-][0-9]+)?$/.test(name)) return false; - return true; - } - - function should_mangle(name) { - if (reserved[name]) return false; - if (regex && !regex.test(name)) return false; - return cache.has(name) || names_to_mangle[name]; - } - - function add(name) { - if (can_mangle(name)) names_to_mangle[name] = true; - if (!should_mangle(name)) unmangleable[name] = true; - } - - function mangle(name) { - if (!should_mangle(name)) return name; - var mangled = cache.get(name); - if (!mangled) { - if (debug) { - // debug mode: use a prefix and suffix to preserve readability, e.g. o.foo ---> o._$foo$NNN_. - var debug_mangled = "_$" + name + "$" + debug_suffix + "_"; - if (can_mangle(debug_mangled)) mangled = debug_mangled; - } - // either debug mode is off, or it is on and we could not use the mangled name - if (!mangled) do { - mangled = base54(++cname); - } while (!can_mangle(mangled)); - if (/^#/.test(name)) mangled = "#" + mangled; - cache.set(name, mangled); - } - return mangled; - } - - function mangleStrings(node) { - if (node instanceof AST_Sequence) { - mangleStrings(node.expressions.tail_node()); - } else if (node instanceof AST_String) { - node.value = mangle(node.value); - } else if (node instanceof AST_Conditional) { - mangleStrings(node.consequent); - mangleStrings(node.alternative); - } - } -} diff --git a/node_modules/uglify-js/lib/scope.js b/node_modules/uglify-js/lib/scope.js deleted file mode 100644 index 3de59b99..00000000 --- a/node_modules/uglify-js/lib/scope.js +++ /dev/null @@ -1,829 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -function SymbolDef(id, scope, orig, init) { - this.eliminated = 0; - this.exported = false; - this.global = false; - this.id = id; - this.init = init; - this.mangled_name = null; - this.name = orig.name; - this.orig = [ orig ]; - this.references = []; - this.replaced = 0; - this.scope = scope; - this.undeclared = false; -} - -SymbolDef.prototype = { - forEach: function(fn) { - this.orig.forEach(fn); - this.references.forEach(fn); - }, - mangle: function(options) { - var cache = options.cache && options.cache.props; - if (this.global && cache && cache.has(this.name)) { - this.mangled_name = cache.get(this.name); - } else if (!this.mangled_name && !this.unmangleable(options)) { - var def = this.redefined(); - if (def) { - this.mangled_name = def.mangled_name || def.name; - } else { - this.mangled_name = next_mangled_name(this, options); - } - if (this.global && cache) { - cache.set(this.name, this.mangled_name); - } - } - }, - redefined: function() { - var self = this; - var scope = self.defun; - if (!scope) return; - var name = self.name; - var def = scope.variables.get(name) - || scope instanceof AST_Toplevel && scope.globals.get(name) - || self.orig[0] instanceof AST_SymbolConst && find_if(function(def) { - return def.name == name; - }, scope.enclosed); - if (def && def !== self) return def.redefined() || def; - }, - unmangleable: function(options) { - return this.global && !options.toplevel - || this.exported - || this.undeclared - || !options.eval && this.scope.pinned() - || options.keep_fnames - && (this.orig[0] instanceof AST_SymbolClass - || this.orig[0] instanceof AST_SymbolDefClass - || this.orig[0] instanceof AST_SymbolDefun - || this.orig[0] instanceof AST_SymbolLambda); - }, -}; - -var unary_side_effects = makePredicate("delete ++ --"); - -function is_lhs(node, parent) { - if (parent instanceof AST_Assign) return parent.left === node && node; - if (parent instanceof AST_DefaultValue) return parent.name === node && node; - if (parent instanceof AST_Destructured) return node; - if (parent instanceof AST_DestructuredKeyVal) return node; - if (parent instanceof AST_ForEnumeration) return parent.init === node && node; - if (parent instanceof AST_Unary) return unary_side_effects[parent.operator] && parent.expression; -} - -AST_Toplevel.DEFMETHOD("figure_out_scope", function(options) { - options = defaults(options, { - cache: null, - ie8: false, - }); - - // pass 1: setup scope chaining and handle definitions - var self = this; - var defun = null; - var exported = false; - var next_def_id = 0; - var scope = self.parent_scope = null; - var tw = new TreeWalker(function(node, descend) { - if (node instanceof AST_DefClass) { - var save_exported = exported; - exported = tw.parent() instanceof AST_ExportDeclaration; - node.name.walk(tw); - exported = save_exported; - walk_scope(function() { - if (node.extends) node.extends.walk(tw); - node.properties.forEach(function(prop) { - prop.walk(tw); - }); - }); - return true; - } - if (node instanceof AST_Definitions) { - var save_exported = exported; - exported = tw.parent() instanceof AST_ExportDeclaration; - descend(); - exported = save_exported; - return true; - } - if (node instanceof AST_LambdaDefinition) { - var save_exported = exported; - exported = tw.parent() instanceof AST_ExportDeclaration; - node.name.walk(tw); - exported = save_exported; - walk_scope(function() { - node.argnames.forEach(function(argname) { - argname.walk(tw); - }); - if (node.rest) node.rest.walk(tw); - walk_body(node, tw); - }); - return true; - } - if (node instanceof AST_SwitchBranch) { - node.init_vars(scope); - descend(); - return true; - } - if (node instanceof AST_Try) { - walk_scope(function() { - walk_body(node, tw); - }); - if (node.bcatch) node.bcatch.walk(tw); - if (node.bfinally) node.bfinally.walk(tw); - return true; - } - if (node instanceof AST_With) { - var s = scope; - do { - s = s.resolve(); - if (s.uses_with) break; - s.uses_with = true; - } while (s = s.parent_scope); - walk_scope(descend); - return true; - } - if (node instanceof AST_BlockScope) { - walk_scope(descend); - return true; - } - if (node instanceof AST_Symbol) { - node.scope = scope; - } - if (node instanceof AST_Label) { - node.thedef = node; - node.references = []; - } - if (node instanceof AST_SymbolCatch) { - scope.def_variable(node).defun = defun; - } else if (node instanceof AST_SymbolConst) { - var def = scope.def_variable(node); - def.defun = defun; - if (exported) def.exported = true; - } else if (node instanceof AST_SymbolDefun) { - var def = defun.def_function(node, tw.parent()); - if (exported) def.exported = true; - entangle(defun, scope); - } else if (node instanceof AST_SymbolFunarg) { - defun.def_variable(node); - entangle(defun, scope); - } else if (node instanceof AST_SymbolLambda) { - var def = defun.def_function(node, node.name == "arguments" ? undefined : defun); - if (options.ie8) def.defun = defun.parent_scope.resolve(); - } else if (node instanceof AST_SymbolLet) { - var def = scope.def_variable(node); - if (exported) def.exported = true; - } else if (node instanceof AST_SymbolVar) { - var def = defun.def_variable(node, node instanceof AST_SymbolImport ? undefined : null); - if (exported) def.exported = true; - entangle(defun, scope); - } - - function walk_scope(descend) { - node.init_vars(scope); - var save_defun = defun; - var save_scope = scope; - if (node instanceof AST_Scope) defun = node; - scope = node; - descend(); - scope = save_scope; - defun = save_defun; - } - - function entangle(defun, scope) { - if (defun === scope) return; - node.mark_enclosed(options); - var def = scope.find_variable(node.name); - if (node.thedef === def) return; - node.thedef = def; - def.orig.push(node); - node.mark_enclosed(options); - } - }); - self.make_def = function(orig, init) { - return new SymbolDef(++next_def_id, this, orig, init); - }; - self.walk(tw); - - // pass 2: find back references and eval - self.globals = new Dictionary(); - var in_arg = []; - var tw = new TreeWalker(function(node) { - if (node instanceof AST_Catch) { - if (!(node.argname instanceof AST_Destructured)) return; - in_arg.push(node); - node.argname.walk(tw); - in_arg.pop(); - walk_body(node, tw); - return true; - } - if (node instanceof AST_Lambda) { - in_arg.push(node); - node.argnames.forEach(function(argname) { - argname.walk(tw); - }); - if (node.rest) node.rest.walk(tw); - in_arg.pop(); - walk_lambda(node, tw); - return true; - } - if (node instanceof AST_LoopControl) { - if (node.label) node.label.thedef.references.push(node); - return true; - } - if (node instanceof AST_SymbolDeclaration) { - var def = node.definition(); - def.preinit = def.references.length; - if (node instanceof AST_SymbolCatch) { - // ensure mangling works if `catch` reuses a scope variable - var redef = def.redefined(); - if (redef) for (var s = node.scope; s; s = s.parent_scope) { - push_uniq(s.enclosed, redef); - if (s === redef.scope) break; - } - } else if (node instanceof AST_SymbolConst) { - // ensure compression works if `const` reuses a scope variable - var redef = def.redefined(); - if (redef) redef.const_redefs = true; - } - if (node.name != "arguments") return true; - var parent = node instanceof AST_SymbolVar && tw.parent(); - if (parent instanceof AST_VarDef && !parent.value) return true; - var sym = node.scope.resolve().find_variable("arguments"); - if (sym && is_arguments(sym)) sym.scope.uses_arguments = 3; - return true; - } - if (node instanceof AST_SymbolRef) { - var name = node.name; - var sym = node.scope.find_variable(name); - for (var i = in_arg.length; i > 0 && sym;) { - i = in_arg.lastIndexOf(sym.scope, i - 1); - if (i < 0) break; - var decl = sym.orig[0]; - if (decl instanceof AST_SymbolCatch - || decl instanceof AST_SymbolFunarg - || decl instanceof AST_SymbolLambda) { - node.in_arg = true; - break; - } - sym = sym.scope.parent_scope.find_variable(name); - } - if (!sym) { - sym = self.def_global(node); - } else if (name == "arguments" && is_arguments(sym)) { - var parent = tw.parent(); - if (is_lhs(node, parent)) { - sym.scope.uses_arguments = 3; - } else if (sym.scope.uses_arguments < 2 - && !(parent instanceof AST_PropAccess && parent.expression === node)) { - sym.scope.uses_arguments = 2; - } else if (!sym.scope.uses_arguments) { - sym.scope.uses_arguments = true; - } - } - if (name == "eval") { - var parent = tw.parent(); - if (parent.TYPE == "Call" && parent.expression === node) { - var s = node.scope; - do { - s = s.resolve(); - if (s.uses_eval) break; - s.uses_eval = true; - } while (s = s.parent_scope); - } else if (sym.undeclared) { - self.uses_eval = true; - } - } - if (sym.init instanceof AST_LambdaDefinition && sym.scope !== sym.init.name.scope) { - var scope = node.scope; - do { - if (scope === sym.init.name.scope) break; - } while (scope = scope.parent_scope); - if (!scope) sym.init = undefined; - } - node.thedef = sym; - node.reference(options); - return true; - } - }); - self.walk(tw); - - // pass 3: fix up any scoping issue with IE8 - if (options.ie8) self.walk(new TreeWalker(function(node) { - if (node instanceof AST_SymbolCatch) { - var scope = node.thedef.defun; - if (scope.name instanceof AST_SymbolLambda && scope.name.name == node.name) { - scope = scope.parent_scope.resolve(); - } - redefine(node, scope); - return true; - } - if (node instanceof AST_SymbolLambda) { - var def = node.thedef; - if (!redefine(node, node.scope.parent_scope.resolve())) { - delete def.defun; - } else if (typeof node.thedef.init !== "undefined") { - node.thedef.init = false; - } else if (def.init) { - node.thedef.init = def.init; - } - return true; - } - })); - - function is_arguments(sym) { - return sym.orig[0] instanceof AST_SymbolFunarg - && !(sym.orig[1] instanceof AST_SymbolFunarg || sym.orig[2] instanceof AST_SymbolFunarg) - && !is_arrow(sym.scope); - } - - function redefine(node, scope) { - var name = node.name; - var old_def = node.thedef; - if (!all(old_def.orig, function(sym) { - return !(sym instanceof AST_SymbolConst || sym instanceof AST_SymbolLet); - })) return false; - var new_def = scope.find_variable(name); - if (new_def) { - var redef = new_def.redefined(); - if (redef) new_def = redef; - } else { - new_def = self.globals.get(name); - } - if (new_def) { - new_def.orig.push(node); - } else { - new_def = scope.def_variable(node); - } - if (new_def.undeclared) self.variables.set(name, new_def); - if (name == "arguments" && is_arguments(old_def) && node instanceof AST_SymbolLambda) return true; - old_def.defun = new_def.scope; - old_def.forEach(function(node) { - node.redef = old_def; - node.thedef = new_def; - node.reference(options); - }); - return true; - } -}); - -AST_Toplevel.DEFMETHOD("def_global", function(node) { - var globals = this.globals, name = node.name; - if (globals.has(name)) { - return globals.get(name); - } else { - var g = this.make_def(node); - g.undeclared = true; - g.global = true; - globals.set(name, g); - return g; - } -}); - -function init_block_vars(scope, parent) { - scope.enclosed = []; // variables from this or outer scope(s) that are referenced from this or inner scopes - scope.parent_scope = parent; // the parent scope (null if this is the top level) - scope.functions = new Dictionary(); // map name to AST_SymbolDefun (functions defined in this scope) - scope.variables = new Dictionary(); // map name to AST_SymbolVar (variables defined in this scope; includes functions) - if (parent) scope.make_def = parent.make_def; // top-level tracking of SymbolDef instances -} - -function init_scope_vars(scope, parent) { - init_block_vars(scope, parent); - scope.uses_eval = false; // will be set to true if this or nested scope uses the global `eval` - scope.uses_with = false; // will be set to true if this or some nested scope uses the `with` statement -} - -AST_BlockScope.DEFMETHOD("init_vars", function(parent_scope) { - init_block_vars(this, parent_scope); -}); -AST_Scope.DEFMETHOD("init_vars", function(parent_scope) { - init_scope_vars(this, parent_scope); -}); -AST_Arrow.DEFMETHOD("init_vars", function(parent_scope) { - init_scope_vars(this, parent_scope); - return this; -}); -AST_AsyncArrow.DEFMETHOD("init_vars", function(parent_scope) { - init_scope_vars(this, parent_scope); -}); -AST_Lambda.DEFMETHOD("init_vars", function(parent_scope) { - init_scope_vars(this, parent_scope); - this.uses_arguments = false; - this.def_variable(new AST_SymbolFunarg({ - name: "arguments", - start: this.start, - end: this.end, - })); - return this; -}); - -AST_Symbol.DEFMETHOD("mark_enclosed", function(options) { - var def = this.definition(); - for (var s = this.scope; s; s = s.parent_scope) { - push_uniq(s.enclosed, def); - if (!options) { - delete s._var_names; - } else if (options.keep_fnames) { - s.functions.each(function(d) { - push_uniq(def.scope.enclosed, d); - }); - } - if (s === def.scope) break; - } -}); - -AST_Symbol.DEFMETHOD("reference", function(options) { - this.definition().references.push(this); - this.mark_enclosed(options); -}); - -AST_BlockScope.DEFMETHOD("find_variable", function(name) { - return this.variables.get(name) - || this.parent_scope && this.parent_scope.find_variable(name); -}); - -AST_BlockScope.DEFMETHOD("def_function", function(symbol, init) { - var def = this.def_variable(symbol, init); - if (!def.init || def.init instanceof AST_LambdaDefinition) def.init = init; - this.functions.set(symbol.name, def); - return def; -}); - -AST_BlockScope.DEFMETHOD("def_variable", function(symbol, init) { - var def = this.variables.get(symbol.name); - if (def) { - def.orig.push(symbol); - if (def.init instanceof AST_LambdaExpression) def.init = init; - } else { - def = this.make_def(symbol, init); - this.variables.set(symbol.name, def); - def.global = !this.parent_scope; - } - return symbol.thedef = def; -}); - -function names_in_use(scope, options) { - var names = scope.names_in_use; - if (!names) { - scope.cname = -1; - scope.cname_holes = []; - scope.names_in_use = names = Object.create(null); - var cache = options.cache && options.cache.props; - scope.enclosed.forEach(function(def) { - if (def.unmangleable(options)) names[def.name] = true; - if (def.global && cache && cache.has(def.name)) { - names[cache.get(def.name)] = true; - } - }); - } - return names; -} - -function next_mangled_name(def, options) { - var scope = def.scope; - var in_use = names_in_use(scope, options); - var holes = scope.cname_holes; - var names = Object.create(null); - var scopes = [ scope ]; - def.forEach(function(sym) { - var scope = sym.scope; - do { - if (scopes.indexOf(scope) < 0) { - for (var name in names_in_use(scope, options)) { - names[name] = true; - } - scopes.push(scope); - } else break; - } while (scope = scope.parent_scope); - }); - var name; - for (var i = 0; i < holes.length; i++) { - name = base54(holes[i]); - if (names[name]) continue; - holes.splice(i, 1); - in_use[name] = true; - return name; - } - while (true) { - name = base54(++scope.cname); - if (in_use[name] || RESERVED_WORDS[name] || options.reserved.has[name]) continue; - if (!names[name]) break; - holes.push(scope.cname); - } - in_use[name] = true; - return name; -} - -AST_Symbol.DEFMETHOD("unmangleable", function(options) { - var def = this.definition(); - return !def || def.unmangleable(options); -}); - -// labels are always mangleable -AST_Label.DEFMETHOD("unmangleable", return_false); - -AST_Symbol.DEFMETHOD("definition", function() { - return this.thedef; -}); - -function _default_mangler_options(options) { - options = defaults(options, { - eval : false, - ie8 : false, - keep_fnames : false, - reserved : [], - toplevel : false, - v8 : false, - webkit : false, - }); - if (!Array.isArray(options.reserved)) options.reserved = []; - // Never mangle arguments - push_uniq(options.reserved, "arguments"); - options.reserved.has = makePredicate(options.reserved); - return options; -} - -AST_Toplevel.DEFMETHOD("mangle_names", function(options) { - options = _default_mangler_options(options); - - // We only need to mangle declaration nodes. Special logic wired - // into the code generator will display the mangled name if it's - // present (and for AST_SymbolRef-s it'll use the mangled name of - // the AST_SymbolDeclaration that it points to). - var lname = -1; - - if (options.cache && options.cache.props) { - var mangled_names = names_in_use(this, options); - options.cache.props.each(function(mangled_name) { - mangled_names[mangled_name] = true; - }); - } - - var redefined = []; - var tw = new TreeWalker(function(node, descend) { - if (node instanceof AST_LabeledStatement) { - // lname is incremented when we get to the AST_Label - var save_nesting = lname; - descend(); - if (!options.v8 || !in_label(tw)) lname = save_nesting; - return true; - } - if (node instanceof AST_BlockScope) { - if (options.webkit && node instanceof AST_IterationStatement && node.init instanceof AST_Let) { - node.init.definitions.forEach(function(defn) { - defn.name.match_symbol(function(sym) { - if (!(sym instanceof AST_SymbolLet)) return; - var def = sym.definition(); - var scope = sym.scope.parent_scope; - var redef = scope.def_variable(sym); - sym.thedef = def; - scope.to_mangle.push(redef); - def.redefined = function() { - return redef; - }; - }); - }, true); - } - node.to_mangle = []; - node.variables.each(function(def) { - if (!defer_redef(def)) node.to_mangle.push(def); - }); - descend(); - if (options.cache && node instanceof AST_Toplevel) { - node.globals.each(mangle); - } - if (node instanceof AST_Defun && tw.has_directive("use asm")) { - var sym = new AST_SymbolRef(node.name); - sym.scope = node; - sym.reference(options); - } - node.to_mangle.forEach(mangle); - return true; - } - if (node instanceof AST_Label) { - var name; - do { - name = base54(++lname); - } while (RESERVED_WORDS[name]); - node.mangled_name = name; - return true; - } - }); - this.walk(tw); - redefined.forEach(mangle); - - function mangle(def) { - if (options.reserved.has[def.name]) return; - def.mangle(options); - } - - function defer_redef(def) { - var sym = def.orig[0]; - var redef = def.redefined(); - if (!redef) { - if (!(sym instanceof AST_SymbolConst)) return false; - var scope = def.scope.resolve(); - if (def.scope === scope) return false; - if (def.scope.parent_scope.find_variable(sym.name)) return false; - redef = scope.def_variable(sym); - scope.to_mangle.push(redef); - } - redefined.push(def); - def.references.forEach(reference); - if (sym instanceof AST_SymbolCatch || sym instanceof AST_SymbolConst) reference(sym); - return true; - - function reference(sym) { - sym.thedef = redef; - sym.reference(options); - sym.thedef = def; - } - } - - function in_label(tw) { - var level = 0, parent; - while (parent = tw.parent(level++)) { - if (parent instanceof AST_Block) return parent instanceof AST_Toplevel && !options.toplevel; - if (parent instanceof AST_LabeledStatement) return true; - } - } -}); - -AST_Toplevel.DEFMETHOD("find_colliding_names", function(options) { - var cache = options.cache && options.cache.props; - var avoid = Object.create(RESERVED_WORDS); - options.reserved.forEach(to_avoid); - this.globals.each(add_def); - this.walk(new TreeWalker(function(node) { - if (node instanceof AST_BlockScope) node.variables.each(add_def); - })); - return avoid; - - function to_avoid(name) { - avoid[name] = true; - } - - function add_def(def) { - var name = def.name; - if (def.global && cache && cache.has(name)) name = cache.get(name); - else if (!def.unmangleable(options)) return; - to_avoid(name); - } -}); - -AST_Toplevel.DEFMETHOD("expand_names", function(options) { - base54.reset(); - base54.sort(); - options = _default_mangler_options(options); - var avoid = this.find_colliding_names(options); - var cname = 0; - this.globals.each(rename); - this.walk(new TreeWalker(function(node) { - if (node instanceof AST_BlockScope) node.variables.each(rename); - })); - - function next_name() { - var name; - do { - name = base54(cname++); - } while (avoid[name]); - return name; - } - - function rename(def) { - if (def.global && options.cache) return; - if (def.unmangleable(options)) return; - if (options.reserved.has[def.name]) return; - var redef = def.redefined(); - var name = redef ? redef.rename || redef.name : next_name(); - def.rename = name; - def.forEach(function(sym) { - if (sym.definition() === def) sym.name = name; - }); - } -}); - -AST_Node.DEFMETHOD("tail_node", return_this); -AST_Sequence.DEFMETHOD("tail_node", function() { - return this.expressions[this.expressions.length - 1]; -}); - -AST_Toplevel.DEFMETHOD("compute_char_frequency", function(options) { - options = _default_mangler_options(options); - base54.reset(); - var fn = AST_Symbol.prototype.add_source_map; - try { - AST_Symbol.prototype.add_source_map = function() { - if (!this.unmangleable(options)) base54.consider(this.name, -1); - }; - if (options.properties) { - AST_Dot.prototype.add_source_map = function() { - base54.consider(this.property, -1); - }; - AST_Sub.prototype.add_source_map = function() { - skip_string(this.property); - }; - } - base54.consider(this.print_to_string(), 1); - } finally { - AST_Symbol.prototype.add_source_map = fn; - delete AST_Dot.prototype.add_source_map; - delete AST_Sub.prototype.add_source_map; - } - base54.sort(); - - function skip_string(node) { - if (node instanceof AST_String) { - base54.consider(node.value, -1); - } else if (node instanceof AST_Conditional) { - skip_string(node.consequent); - skip_string(node.alternative); - } else if (node instanceof AST_Sequence) { - skip_string(node.tail_node()); - } - } -}); - -var base54 = (function() { - var freq = Object.create(null); - function init(chars) { - var array = []; - for (var i = 0; i < chars.length; i++) { - var ch = chars[i]; - array.push(ch); - freq[ch] = -1e-2 * i; - } - return array; - } - var digits = init("0123456789"); - var leading = init("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_"); - var chars, frequency; - function reset() { - chars = null; - frequency = Object.create(freq); - } - base54.consider = function(str, delta) { - for (var i = str.length; --i >= 0;) { - frequency[str[i]] += delta; - } - }; - function compare(a, b) { - return frequency[b] - frequency[a]; - } - base54.sort = function() { - chars = leading.sort(compare).concat(digits).sort(compare); - }; - base54.reset = reset; - reset(); - function base54(num) { - var ret = leading[num % 54]; - for (num = Math.floor(num / 54); --num >= 0; num >>= 6) { - ret += chars[num & 0x3F]; - } - return ret; - } - return base54; -})(); diff --git a/node_modules/uglify-js/lib/sourcemap.js b/node_modules/uglify-js/lib/sourcemap.js deleted file mode 100644 index 94966a6a..00000000 --- a/node_modules/uglify-js/lib/sourcemap.js +++ /dev/null @@ -1,193 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -var vlq_char = characters("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"); -var vlq_bits = vlq_char.reduce(function(map, ch, bits) { - map[ch] = bits; - return map; -}, Object.create(null)); - -function vlq_decode(indices, str) { - var value = 0; - var shift = 0; - for (var i = 0, j = 0; i < str.length; i++) { - var bits = vlq_bits[str[i]]; - value += (bits & 31) << shift; - if (bits & 32) { - shift += 5; - } else { - indices[j++] += value & 1 ? 0x80000000 | -(value >> 1) : value >> 1; - value = shift = 0; - } - } - return j; -} - -function vlq_encode(num) { - var result = ""; - num = Math.abs(num) << 1 | num >>> 31; - do { - var bits = num & 31; - if (num >>>= 5) bits |= 32; - result += vlq_char[bits]; - } while (num); - return result; -} - -function create_array_map() { - var map = Object.create(null); - var array = []; - array.index = function(name) { - if (!HOP(map, name)) { - map[name] = array.length; - array.push(name); - } - return map[name]; - }; - return array; -} - -function SourceMap(options) { - var sources = create_array_map(); - var sources_content = options.includeSources && Object.create(null); - var names = create_array_map(); - var mappings = ""; - if (options.orig) Object.keys(options.orig).forEach(function(name) { - var map = options.orig[name]; - var indices = [ 0, 0, 1, 0, 0 ]; - options.orig[name] = { - names: map.names, - mappings: map.mappings.split(/;/).map(function(line) { - indices[0] = 0; - return line.split(/,/).map(function(segment) { - return indices.slice(0, vlq_decode(indices, segment)); - }); - }), - sources: map.sources, - }; - if (!sources_content || !map.sourcesContent) return; - for (var i = 0; i < map.sources.length; i++) { - var content = map.sourcesContent[i]; - if (content) sources_content[map.sources[i]] = content; - } - }); - var prev_source; - var generated_line = 1; - var generated_column = 0; - var source_index = 0; - var original_line = 1; - var original_column = 0; - var name_index = 0; - return { - add: options.orig ? function(source, gen_line, gen_col, orig_line, orig_col, name) { - var map = options.orig[source]; - if (map) { - var segments = map.mappings[orig_line - 1]; - if (!segments) return; - var indices; - for (var i = 0; i < segments.length; i++) { - var col = segments[i][0]; - if (orig_col >= col) indices = segments[i]; - if (orig_col <= col) break; - } - if (!indices || indices.length < 4) { - source = null; - } else { - source = map.sources[indices[1]]; - orig_line = indices[2]; - orig_col = indices[3]; - if (indices.length > 4) name = map.names[indices[4]]; - } - } - add(source, gen_line, gen_col, orig_line, orig_col, name); - } : add, - setSourceContent: sources_content ? function(source, content) { - if (!(source in sources_content)) { - sources_content[source] = content; - } - } : noop, - toString: function() { - return JSON.stringify({ - version: 3, - file: options.filename || undefined, - sourceRoot: options.root || undefined, - sources: sources, - sourcesContent: sources_content ? sources.map(function(source) { - return sources_content[source] || null; - }) : undefined, - names: names, - mappings: mappings, - }); - } - }; - - function add(source, gen_line, gen_col, orig_line, orig_col, name) { - if (prev_source == null && source == null) return; - prev_source = source; - if (generated_line < gen_line) { - generated_column = 0; - do { - mappings += ";"; - } while (++generated_line < gen_line); - } else if (mappings) { - mappings += ","; - } - mappings += vlq_encode(gen_col - generated_column); - generated_column = gen_col; - if (source == null) return; - var src_idx = sources.index(source); - mappings += vlq_encode(src_idx - source_index); - source_index = src_idx; - mappings += vlq_encode(orig_line - original_line); - original_line = orig_line; - mappings += vlq_encode(orig_col - original_column); - original_column = orig_col; - if (options.names && name != null) { - var name_idx = names.index(name); - mappings += vlq_encode(name_idx - name_index); - name_index = name_idx; - } - } -} diff --git a/node_modules/uglify-js/lib/transform.js b/node_modules/uglify-js/lib/transform.js deleted file mode 100644 index dcf90dfa..00000000 --- a/node_modules/uglify-js/lib/transform.js +++ /dev/null @@ -1,250 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -function TreeTransformer(before, after) { - TreeWalker.call(this); - this.before = before; - this.after = after; -} -TreeTransformer.prototype = new TreeWalker; - -(function(DEF) { - function do_list(list, tw) { - return List(list, function(node) { - return node.transform(tw, true); - }); - } - - DEF(AST_Node, noop); - DEF(AST_LabeledStatement, function(self, tw) { - self.label = self.label.transform(tw); - self.body = self.body.transform(tw); - }); - DEF(AST_SimpleStatement, function(self, tw) { - self.body = self.body.transform(tw); - }); - DEF(AST_Block, function(self, tw) { - self.body = do_list(self.body, tw); - }); - DEF(AST_Do, function(self, tw) { - self.body = self.body.transform(tw); - self.condition = self.condition.transform(tw); - }); - DEF(AST_While, function(self, tw) { - self.condition = self.condition.transform(tw); - self.body = self.body.transform(tw); - }); - DEF(AST_For, function(self, tw) { - if (self.init) self.init = self.init.transform(tw); - if (self.condition) self.condition = self.condition.transform(tw); - if (self.step) self.step = self.step.transform(tw); - self.body = self.body.transform(tw); - }); - DEF(AST_ForEnumeration, function(self, tw) { - self.init = self.init.transform(tw); - self.object = self.object.transform(tw); - self.body = self.body.transform(tw); - }); - DEF(AST_With, function(self, tw) { - self.expression = self.expression.transform(tw); - self.body = self.body.transform(tw); - }); - DEF(AST_Exit, function(self, tw) { - if (self.value) self.value = self.value.transform(tw); - }); - DEF(AST_LoopControl, function(self, tw) { - if (self.label) self.label = self.label.transform(tw); - }); - DEF(AST_If, function(self, tw) { - self.condition = self.condition.transform(tw); - self.body = self.body.transform(tw); - if (self.alternative) self.alternative = self.alternative.transform(tw); - }); - DEF(AST_Switch, function(self, tw) { - self.expression = self.expression.transform(tw); - self.body = do_list(self.body, tw); - }); - DEF(AST_Case, function(self, tw) { - self.expression = self.expression.transform(tw); - self.body = do_list(self.body, tw); - }); - DEF(AST_Try, function(self, tw) { - self.body = do_list(self.body, tw); - if (self.bcatch) self.bcatch = self.bcatch.transform(tw); - if (self.bfinally) self.bfinally = self.bfinally.transform(tw); - }); - DEF(AST_Catch, function(self, tw) { - if (self.argname) self.argname = self.argname.transform(tw); - self.body = do_list(self.body, tw); - }); - DEF(AST_Definitions, function(self, tw) { - self.definitions = do_list(self.definitions, tw); - }); - DEF(AST_VarDef, function(self, tw) { - self.name = self.name.transform(tw); - if (self.value) self.value = self.value.transform(tw); - }); - DEF(AST_DefaultValue, function(self, tw) { - self.name = self.name.transform(tw); - self.value = self.value.transform(tw); - }); - DEF(AST_Lambda, function(self, tw) { - if (self.name) self.name = self.name.transform(tw); - self.argnames = do_list(self.argnames, tw); - if (self.rest) self.rest = self.rest.transform(tw); - self.body = do_list(self.body, tw); - }); - function transform_arrow(self, tw) { - self.argnames = do_list(self.argnames, tw); - if (self.rest) self.rest = self.rest.transform(tw); - if (self.value) { - self.value = self.value.transform(tw); - } else { - self.body = do_list(self.body, tw); - } - } - DEF(AST_Arrow, transform_arrow); - DEF(AST_AsyncArrow, transform_arrow); - DEF(AST_Class, function(self, tw) { - if (self.name) self.name = self.name.transform(tw); - if (self.extends) self.extends = self.extends.transform(tw); - self.properties = do_list(self.properties, tw); - }); - DEF(AST_ClassProperty, function(self, tw) { - if (self.key instanceof AST_Node) self.key = self.key.transform(tw); - if (self.value) self.value = self.value.transform(tw); - }); - DEF(AST_Call, function(self, tw) { - self.expression = self.expression.transform(tw); - self.args = do_list(self.args, tw); - }); - DEF(AST_Sequence, function(self, tw) { - self.expressions = do_list(self.expressions, tw); - }); - DEF(AST_Await, function(self, tw) { - self.expression = self.expression.transform(tw); - }); - DEF(AST_Yield, function(self, tw) { - if (self.expression) self.expression = self.expression.transform(tw); - }); - DEF(AST_Dot, function(self, tw) { - self.expression = self.expression.transform(tw); - }); - DEF(AST_Sub, function(self, tw) { - self.expression = self.expression.transform(tw); - self.property = self.property.transform(tw); - }); - DEF(AST_Spread, function(self, tw) { - self.expression = self.expression.transform(tw); - }); - DEF(AST_Unary, function(self, tw) { - self.expression = self.expression.transform(tw); - }); - DEF(AST_Binary, function(self, tw) { - self.left = self.left.transform(tw); - self.right = self.right.transform(tw); - }); - DEF(AST_Conditional, function(self, tw) { - self.condition = self.condition.transform(tw); - self.consequent = self.consequent.transform(tw); - self.alternative = self.alternative.transform(tw); - }); - DEF(AST_Array, function(self, tw) { - self.elements = do_list(self.elements, tw); - }); - DEF(AST_DestructuredArray, function(self, tw) { - self.elements = do_list(self.elements, tw); - if (self.rest) self.rest = self.rest.transform(tw); - }); - DEF(AST_DestructuredKeyVal, function(self, tw) { - if (self.key instanceof AST_Node) self.key = self.key.transform(tw); - self.value = self.value.transform(tw); - }); - DEF(AST_DestructuredObject, function(self, tw) { - self.properties = do_list(self.properties, tw); - if (self.rest) self.rest = self.rest.transform(tw); - }); - DEF(AST_Object, function(self, tw) { - self.properties = do_list(self.properties, tw); - }); - DEF(AST_ObjectProperty, function(self, tw) { - if (self.key instanceof AST_Node) self.key = self.key.transform(tw); - self.value = self.value.transform(tw); - }); - DEF(AST_ExportDeclaration, function(self, tw) { - self.body = self.body.transform(tw); - }); - DEF(AST_ExportDefault, function(self, tw) { - self.body = self.body.transform(tw); - }); - DEF(AST_ExportReferences, function(self, tw) { - self.properties = do_list(self.properties, tw); - }); - DEF(AST_Import, function(self, tw) { - if (self.all) self.all = self.all.transform(tw); - if (self.default) self.default = self.default.transform(tw); - if (self.properties) self.properties = do_list(self.properties, tw); - }); - DEF(AST_Template, function(self, tw) { - if (self.tag) self.tag = self.tag.transform(tw); - self.expressions = do_list(self.expressions, tw); - }); -})(function(node, descend) { - node.DEFMETHOD("transform", function(tw, in_list) { - var x, y; - tw.push(this); - if (tw.before) x = tw.before(this, descend, in_list); - if (typeof x === "undefined") { - x = this; - descend(x, tw); - if (tw.after) { - y = tw.after(x, in_list); - if (typeof y !== "undefined") x = y; - } - } - tw.pop(); - return x; - }); -}); diff --git a/node_modules/uglify-js/lib/utils.js b/node_modules/uglify-js/lib/utils.js deleted file mode 100644 index 28c8b43e..00000000 --- a/node_modules/uglify-js/lib/utils.js +++ /dev/null @@ -1,267 +0,0 @@ -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - https://github.com/mishoo/UglifyJS - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2012 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -"use strict"; - -function characters(str) { - return str.split(""); -} - -function member(name, array) { - return array.indexOf(name) >= 0; -} - -function find_if(func, array) { - for (var i = array.length; --i >= 0;) if (func(array[i])) return array[i]; -} - -function repeat_string(str, i) { - if (i <= 0) return ""; - if (i == 1) return str; - var d = repeat_string(str, i >> 1); - d += d; - return i & 1 ? d + str : d; -} - -function configure_error_stack(fn) { - Object.defineProperty(fn.prototype, "stack", { - get: function() { - var err = new Error(this.message); - err.name = this.name; - try { - throw err; - } catch (e) { - return e.stack; - } - } - }); -} - -function DefaultsError(msg, defs) { - this.message = msg; - this.defs = defs; -} -DefaultsError.prototype = Object.create(Error.prototype); -DefaultsError.prototype.constructor = DefaultsError; -DefaultsError.prototype.name = "DefaultsError"; -configure_error_stack(DefaultsError); - -function defaults(args, defs, croak) { - if (croak) for (var i in args) { - if (HOP(args, i) && !HOP(defs, i)) throw new DefaultsError("`" + i + "` is not a supported option", defs); - } - for (var i in args) { - if (HOP(args, i)) defs[i] = args[i]; - } - return defs; -} - -function merge(obj, ext) { - var count = 0; - for (var i in ext) if (HOP(ext, i)) { - obj[i] = ext[i]; - count++; - } - return count; -} - -function noop() {} -function return_false() { return false; } -function return_true() { return true; } -function return_this() { return this; } -function return_null() { return null; } - -var List = (function() { - function List(a, f) { - var ret = []; - for (var i = 0; i < a.length; i++) { - var val = f(a[i], i); - if (val === skip) continue; - if (val instanceof Splice) { - ret.push.apply(ret, val.v); - } else { - ret.push(val); - } - } - return ret; - } - List.is_op = function(val) { - return val === skip || val instanceof Splice; - }; - List.splice = function(val) { - return new Splice(val); - }; - var skip = List.skip = {}; - function Splice(val) { - this.v = val; - } - return List; -})(); - -function push_uniq(array, el) { - if (array.indexOf(el) < 0) return array.push(el); -} - -function string_template(text, props) { - return text.replace(/\{([^}]+)\}/g, function(str, p) { - var value = props[p]; - return value instanceof AST_Node ? value.print_to_string() : value; - }); -} - -function remove(array, el) { - var index = array.indexOf(el); - if (index >= 0) array.splice(index, 1); -} - -function makePredicate(words) { - if (!Array.isArray(words)) words = words.split(" "); - var map = Object.create(null); - words.forEach(function(word) { - map[word] = true; - }); - return map; -} - -function all(array, predicate) { - for (var i = array.length; --i >= 0;) - if (!predicate(array[i], i)) - return false; - return true; -} - -function Dictionary() { - this._values = Object.create(null); - this._size = 0; -} -Dictionary.prototype = { - set: function(key, val) { - if (!this.has(key)) ++this._size; - this._values["$" + key] = val; - return this; - }, - add: function(key, val) { - if (this.has(key)) { - this.get(key).push(val); - } else { - this.set(key, [ val ]); - } - return this; - }, - get: function(key) { return this._values["$" + key] }, - del: function(key) { - if (this.has(key)) { - --this._size; - delete this._values["$" + key]; - } - return this; - }, - has: function(key) { return ("$" + key) in this._values }, - all: function(predicate) { - for (var i in this._values) - if (!predicate(this._values[i], i.substr(1))) - return false; - return true; - }, - each: function(f) { - for (var i in this._values) - f(this._values[i], i.substr(1)); - }, - size: function() { - return this._size; - }, - map: function(f) { - var ret = []; - for (var i in this._values) - ret.push(f(this._values[i], i.substr(1))); - return ret; - }, - clone: function() { - var ret = new Dictionary(); - for (var i in this._values) - ret._values[i] = this._values[i]; - ret._size = this._size; - return ret; - }, - toObject: function() { return this._values } -}; -Dictionary.fromObject = function(obj) { - var dict = new Dictionary(); - dict._size = merge(dict._values, obj); - return dict; -}; - -function HOP(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -// return true if the node at the top of the stack (that means the -// innermost node in the current output) is lexically the first in -// a statement. -function first_in_statement(stack, arrow, export_default) { - var node = stack.parent(-1); - for (var i = 0, p; p = stack.parent(i++); node = p) { - if (is_arrow(p)) { - return arrow && p.value === node; - } else if (p instanceof AST_Binary) { - if (p.left === node) continue; - } else if (p.TYPE == "Call") { - if (p.expression === node) continue; - } else if (p instanceof AST_Conditional) { - if (p.condition === node) continue; - } else if (p instanceof AST_ExportDefault) { - return export_default; - } else if (p instanceof AST_PropAccess) { - if (p.expression === node) continue; - } else if (p instanceof AST_Sequence) { - if (p.expressions[0] === node) continue; - } else if (p instanceof AST_SimpleStatement) { - return true; - } else if (p instanceof AST_Template) { - if (p.tag === node) continue; - } else if (p instanceof AST_UnaryPostfix) { - if (p.expression === node) continue; - } - return false; - } -} diff --git a/node_modules/uglify-js/package.json b/node_modules/uglify-js/package.json deleted file mode 100644 index 0e5d7cec..00000000 --- a/node_modules/uglify-js/package.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "_from": "uglify-js@^3.1.4", - "_id": "uglify-js@3.13.10", - "_inBundle": false, - "_integrity": "sha512-57H3ACYFXeo1IaZ1w02sfA71wI60MGco/IQFjOqK+WtKoprh7Go2/yvd2HPtoJILO2Or84ncLccI4xoHMTSbGg==", - "_location": "/uglify-js", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "uglify-js@^3.1.4", - "name": "uglify-js", - "escapedName": "uglify-js", - "rawSpec": "^3.1.4", - "saveSpec": null, - "fetchSpec": "^3.1.4" - }, - "_requiredBy": [ - "/handlebars" - ], - "_resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.10.tgz", - "_shasum": "a6bd0d28d38f592c3adb6b180ea6e07e1e540a8d", - "_spec": "uglify-js@^3.1.4", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/handlebars", - "author": { - "name": "Mihai Bazon", - "email": "mihai.bazon@gmail.com", - "url": "http://lisperator.net/" - }, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "bugs": { - "url": "https://github.com/mishoo/UglifyJS/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "JavaScript parser, mangler/compressor and beautifier toolkit", - "devDependencies": { - "acorn": "~8.2.1", - "semver": "~6.3.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "files": [ - "bin", - "lib", - "tools", - "LICENSE" - ], - "homepage": "https://github.com/mishoo/UglifyJS#readme", - "keywords": [ - "cli", - "compress", - "compressor", - "ecma", - "ecmascript", - "es", - "es5", - "javascript", - "js", - "jsmin", - "min", - "minification", - "minifier", - "minify", - "optimize", - "optimizer", - "pack", - "packer", - "parse", - "parser", - "uglifier", - "uglify" - ], - "license": "BSD-2-Clause", - "main": "tools/node.js", - "maintainers": [ - { - "name": "Alex Lam", - "email": "alexlamsl@gmail.com" - }, - { - "name": "Mihai Bazon", - "email": "mihai.bazon@gmail.com", - "url": "http://lisperator.net/" - } - ], - "name": "uglify-js", - "repository": { - "type": "git", - "url": "git+https://github.com/mishoo/UglifyJS.git" - }, - "scripts": { - "test": "node test/compress.js && node test/mocha.js" - }, - "version": "3.13.10" -} diff --git a/node_modules/uglify-js/tools/domprops.html b/node_modules/uglify-js/tools/domprops.html deleted file mode 100644 index e217b173..00000000 --- a/node_modules/uglify-js/tools/domprops.html +++ /dev/null @@ -1,456 +0,0 @@ - - - - - - diff --git a/node_modules/uglify-js/tools/domprops.json b/node_modules/uglify-js/tools/domprops.json deleted file mode 100644 index 1045429d..00000000 --- a/node_modules/uglify-js/tools/domprops.json +++ /dev/null @@ -1,8325 +0,0 @@ -[ - "$&", - "$'", - "$*", - "$+", - "$1", - "$2", - "$3", - "$4", - "$5", - "$6", - "$7", - "$8", - "$9", - "$_", - "$`", - "$input", - "-moz-animation", - "-moz-animation-delay", - "-moz-animation-direction", - "-moz-animation-duration", - "-moz-animation-fill-mode", - "-moz-animation-iteration-count", - "-moz-animation-name", - "-moz-animation-play-state", - "-moz-animation-timing-function", - "-moz-appearance", - "-moz-backface-visibility", - "-moz-binding", - "-moz-border-end", - "-moz-border-end-color", - "-moz-border-end-style", - "-moz-border-end-width", - "-moz-border-image", - "-moz-border-start", - "-moz-border-start-color", - "-moz-border-start-style", - "-moz-border-start-width", - "-moz-box-align", - "-moz-box-direction", - "-moz-box-flex", - "-moz-box-ordinal-group", - "-moz-box-orient", - "-moz-box-pack", - "-moz-box-sizing", - "-moz-column-count", - "-moz-column-fill", - "-moz-column-gap", - "-moz-column-rule", - "-moz-column-rule-color", - "-moz-column-rule-style", - "-moz-column-rule-width", - "-moz-column-width", - "-moz-columns", - "-moz-float-edge", - "-moz-font-feature-settings", - "-moz-font-language-override", - "-moz-force-broken-image-icon", - "-moz-hyphens", - "-moz-image-region", - "-moz-margin-end", - "-moz-margin-start", - "-moz-orient", - "-moz-outline-radius", - "-moz-outline-radius-bottomleft", - "-moz-outline-radius-bottomright", - "-moz-outline-radius-topleft", - "-moz-outline-radius-topright", - "-moz-padding-end", - "-moz-padding-start", - "-moz-perspective", - "-moz-perspective-origin", - "-moz-stack-sizing", - "-moz-tab-size", - "-moz-text-size-adjust", - "-moz-transform", - "-moz-transform-origin", - "-moz-transform-style", - "-moz-transition", - "-moz-transition-delay", - "-moz-transition-duration", - "-moz-transition-property", - "-moz-transition-timing-function", - "-moz-user-focus", - "-moz-user-input", - "-moz-user-modify", - "-moz-user-select", - "-moz-window-dragging", - "-webkit-align-content", - "-webkit-align-items", - "-webkit-align-self", - "-webkit-animation", - "-webkit-animation-delay", - "-webkit-animation-direction", - "-webkit-animation-duration", - "-webkit-animation-fill-mode", - "-webkit-animation-iteration-count", - "-webkit-animation-name", - "-webkit-animation-play-state", - "-webkit-animation-timing-function", - "-webkit-appearance", - "-webkit-backface-visibility", - "-webkit-background-clip", - "-webkit-background-origin", - "-webkit-background-size", - "-webkit-border-bottom-left-radius", - "-webkit-border-bottom-right-radius", - "-webkit-border-image", - "-webkit-border-radius", - "-webkit-border-top-left-radius", - "-webkit-border-top-right-radius", - "-webkit-box-align", - "-webkit-box-direction", - "-webkit-box-flex", - "-webkit-box-ordinal-group", - "-webkit-box-orient", - "-webkit-box-pack", - "-webkit-box-shadow", - "-webkit-box-sizing", - "-webkit-filter", - "-webkit-flex", - "-webkit-flex-basis", - "-webkit-flex-direction", - "-webkit-flex-flow", - "-webkit-flex-grow", - "-webkit-flex-shrink", - "-webkit-flex-wrap", - "-webkit-justify-content", - "-webkit-line-clamp", - "-webkit-mask", - "-webkit-mask-clip", - "-webkit-mask-composite", - "-webkit-mask-image", - "-webkit-mask-origin", - "-webkit-mask-position", - "-webkit-mask-position-x", - "-webkit-mask-position-y", - "-webkit-mask-repeat", - "-webkit-mask-size", - "-webkit-order", - "-webkit-perspective", - "-webkit-perspective-origin", - "-webkit-text-fill-color", - "-webkit-text-size-adjust", - "-webkit-text-stroke", - "-webkit-text-stroke-color", - "-webkit-text-stroke-width", - "-webkit-transform", - "-webkit-transform-origin", - "-webkit-transform-style", - "-webkit-transition", - "-webkit-transition-delay", - "-webkit-transition-duration", - "-webkit-transition-property", - "-webkit-transition-timing-function", - "-webkit-user-select", - "0", - "1", - "10", - "11", - "12", - "13", - "14", - "15", - "16", - "17", - "18", - "19", - "2", - "20", - "21", - "22", - "23", - "24", - "25", - "26", - "27", - "28", - "29", - "3", - "30", - "31", - "32", - "33", - "34", - "35", - "36", - "37", - "38", - "39", - "4", - "40", - "41", - "42", - "43", - "44", - "45", - "46", - "47", - "48", - "49", - "5", - "50", - "51", - "6", - "7", - "8", - "9", - "@@iterator", - "ABORT_ERR", - "ACTIVE", - "ACTIVE_ATTRIBUTES", - "ACTIVE_TEXTURE", - "ACTIVE_UNIFORMS", - "ACTIVE_UNIFORM_BLOCKS", - "ADDITION", - "ALIASED_LINE_WIDTH_RANGE", - "ALIASED_POINT_SIZE_RANGE", - "ALLOW_KEYBOARD_INPUT", - "ALLPASS", - "ALPHA", - "ALPHA_BITS", - "ALREADY_SIGNALED", - "ALT_MASK", - "ALWAYS", - "ANDROID", - "ANGLE_instanced_arrays", - "ANY_SAMPLES_PASSED", - "ANY_SAMPLES_PASSED_CONSERVATIVE", - "ANY_TYPE", - "ANY_UNORDERED_NODE_TYPE", - "APP_UPDATE", - "ARM", - "ARRAY_BUFFER", - "ARRAY_BUFFER_BINDING", - "ATTACHED_SHADERS", - "ATTRIBUTE_NODE", - "AT_TARGET", - "AbortController", - "AbortSignal", - "AbsoluteOrientationSensor", - "AbstractRange", - "Accelerometer", - "ActiveXObject", - "AddSearchProvider", - "AesGcmEncryptResult", - "AggregateError", - "AnalyserNode", - "Animation", - "AnimationEffect", - "AnimationEvent", - "AnimationPlaybackEvent", - "AnimationTimeline", - "AnonXMLHttpRequest", - "AppBannerPromptResult", - "ApplicationCache", - "ApplicationCacheErrorEvent", - "Array", - "ArrayBuffer", - "Atomics", - "Attr", - "Audio", - "AudioBuffer", - "AudioBufferSourceNode", - "AudioContext", - "AudioDestinationNode", - "AudioListener", - "AudioNode", - "AudioParam", - "AudioParamMap", - "AudioProcessingEvent", - "AudioScheduledSourceNode", - "AudioStreamTrack", - "AudioTrack", - "AudioTrackList", - "AudioWorklet", - "AudioWorkletNode", - "AuthenticatorAssertionResponse", - "AuthenticatorAttestationResponse", - "AuthenticatorResponse", - "AutocompleteErrorEvent", - "BACK", - "BAD_BOUNDARYPOINTS_ERR", - "BAD_REQUEST", - "BANDPASS", - "BLEND", - "BLEND_COLOR", - "BLEND_DST_ALPHA", - "BLEND_DST_RGB", - "BLEND_EQUATION", - "BLEND_EQUATION_ALPHA", - "BLEND_EQUATION_RGB", - "BLEND_SRC_ALPHA", - "BLEND_SRC_RGB", - "BLUE_BITS", - "BLUR", - "BOOL", - "BOOLEAN_TYPE", - "BOOL_VEC2", - "BOOL_VEC3", - "BOOL_VEC4", - "BOTH", - "BROWSER_DEFAULT_WEBGL", - "BUBBLING_PHASE", - "BUFFER_SIZE", - "BUFFER_USAGE", - "BYTE", - "BYTES_PER_ELEMENT", - "BackgroundFetchManager", - "BackgroundFetchRecord", - "BackgroundFetchRegistration", - "BarProp", - "BarcodeDetector", - "BaseAudioContext", - "BaseHref", - "BatteryManager", - "BeforeInstallPromptEvent", - "BeforeLoadEvent", - "BeforeUnloadEvent", - "BigInt", - "BigInt64Array", - "BigUint64Array", - "BiquadFilterNode", - "Blob", - "BlobEvent", - "Bluetooth", - "BluetoothCharacteristicProperties", - "BluetoothDevice", - "BluetoothRemoteGATTCharacteristic", - "BluetoothRemoteGATTDescriptor", - "BluetoothRemoteGATTServer", - "BluetoothRemoteGATTService", - "BluetoothUUID", - "BookmarkCollection", - "Boolean", - "BroadcastChannel", - "ByteLengthQueuingStrategy", - "CANNOT_RUN", - "CAPTURING_PHASE", - "CCW", - "CDATASection", - "CDATA_SECTION_NODE", - "CHANGE", - "CHARSET_RULE", - "CHECKING", - "CHROME_UPDATE", - "CLAMP_TO_EDGE", - "CLICK", - "CLOSED", - "CLOSING", - "COLOR", - "COLOR_ATTACHMENT0", - "COLOR_ATTACHMENT1", - "COLOR_ATTACHMENT10", - "COLOR_ATTACHMENT11", - "COLOR_ATTACHMENT12", - "COLOR_ATTACHMENT13", - "COLOR_ATTACHMENT14", - "COLOR_ATTACHMENT15", - "COLOR_ATTACHMENT2", - "COLOR_ATTACHMENT3", - "COLOR_ATTACHMENT4", - "COLOR_ATTACHMENT5", - "COLOR_ATTACHMENT6", - "COLOR_ATTACHMENT7", - "COLOR_ATTACHMENT8", - "COLOR_ATTACHMENT9", - "COLOR_BUFFER_BIT", - "COLOR_CLEAR_VALUE", - "COLOR_WRITEMASK", - "COMMENT_NODE", - "COMPARE_REF_TO_TEXTURE", - "COMPILE_STATUS", - "COMPRESSED_RGBA_S3TC_DXT1_EXT", - "COMPRESSED_RGBA_S3TC_DXT3_EXT", - "COMPRESSED_RGBA_S3TC_DXT5_EXT", - "COMPRESSED_RGB_S3TC_DXT1_EXT", - "COMPRESSED_TEXTURE_FORMATS", - "CONDITION_SATISFIED", - "CONFIGURATION_UNSUPPORTED", - "CONNECTING", - "CONSTANT_ALPHA", - "CONSTANT_COLOR", - "CONSTRAINT_ERR", - "CONTENT", - "CONTEXT_LOST_WEBGL", - "CONTROL_MASK", - "COPY_READ_BUFFER", - "COPY_READ_BUFFER_BINDING", - "COPY_WRITE_BUFFER", - "COPY_WRITE_BUFFER_BINDING", - "COUNTER_STYLE_RULE", - "CROS", - "CSS", - "CSS2Properties", - "CSSAnimation", - "CSSCharsetRule", - "CSSConditionRule", - "CSSCounterStyleRule", - "CSSFontFaceRule", - "CSSFontFeatureValuesRule", - "CSSGroupingRule", - "CSSImageValue", - "CSSImportRule", - "CSSKeyframeRule", - "CSSKeyframesRule", - "CSSKeywordValue", - "CSSMathInvert", - "CSSMathMax", - "CSSMathMin", - "CSSMathNegate", - "CSSMathProduct", - "CSSMathSum", - "CSSMathValue", - "CSSMatrixComponent", - "CSSMediaRule", - "CSSMozDocumentRule", - "CSSNameSpaceRule", - "CSSNamespaceRule", - "CSSNumericArray", - "CSSNumericValue", - "CSSPageRule", - "CSSPerspective", - "CSSPositionValue", - "CSSPrimitiveValue", - "CSSRotate", - "CSSRule", - "CSSRuleList", - "CSSScale", - "CSSSkew", - "CSSSkewX", - "CSSSkewY", - "CSSStyleDeclaration", - "CSSStyleRule", - "CSSStyleSheet", - "CSSStyleValue", - "CSSSupportsRule", - "CSSTransformComponent", - "CSSTransformValue", - "CSSTransition", - "CSSTranslate", - "CSSUnitValue", - "CSSUnknownRule", - "CSSUnparsedValue", - "CSSValue", - "CSSValueList", - "CSSVariableReferenceValue", - "CSSVariablesDeclaration", - "CSSVariablesRule", - "CSSViewportRule", - "CSS_ATTR", - "CSS_CM", - "CSS_COUNTER", - "CSS_CUSTOM", - "CSS_DEG", - "CSS_DIMENSION", - "CSS_EMS", - "CSS_EXS", - "CSS_FILTER_BLUR", - "CSS_FILTER_BRIGHTNESS", - "CSS_FILTER_CONTRAST", - "CSS_FILTER_CUSTOM", - "CSS_FILTER_DROP_SHADOW", - "CSS_FILTER_GRAYSCALE", - "CSS_FILTER_HUE_ROTATE", - "CSS_FILTER_INVERT", - "CSS_FILTER_OPACITY", - "CSS_FILTER_REFERENCE", - "CSS_FILTER_SATURATE", - "CSS_FILTER_SEPIA", - "CSS_GRAD", - "CSS_HZ", - "CSS_IDENT", - "CSS_IN", - "CSS_INHERIT", - "CSS_KHZ", - "CSS_MATRIX", - "CSS_MATRIX3D", - "CSS_MM", - "CSS_MS", - "CSS_NUMBER", - "CSS_PC", - "CSS_PERCENTAGE", - "CSS_PERSPECTIVE", - "CSS_PRIMITIVE_VALUE", - "CSS_PT", - "CSS_PX", - "CSS_RAD", - "CSS_RECT", - "CSS_RGBCOLOR", - "CSS_ROTATE", - "CSS_ROTATE3D", - "CSS_ROTATEX", - "CSS_ROTATEY", - "CSS_ROTATEZ", - "CSS_S", - "CSS_SCALE", - "CSS_SCALE3D", - "CSS_SCALEX", - "CSS_SCALEY", - "CSS_SCALEZ", - "CSS_SKEW", - "CSS_SKEWX", - "CSS_SKEWY", - "CSS_STRING", - "CSS_TRANSLATE", - "CSS_TRANSLATE3D", - "CSS_TRANSLATEX", - "CSS_TRANSLATEY", - "CSS_TRANSLATEZ", - "CSS_UNKNOWN", - "CSS_URI", - "CSS_VALUE_LIST", - "CSS_VH", - "CSS_VMAX", - "CSS_VMIN", - "CSS_VW", - "CULL_FACE", - "CULL_FACE_MODE", - "CURRENT_PROGRAM", - "CURRENT_QUERY", - "CURRENT_VERTEX_ATTRIB", - "CUSTOM", - "CW", - "Cache", - "CacheStorage", - "CanvasCaptureMediaStream", - "CanvasCaptureMediaStreamTrack", - "CanvasGradient", - "CanvasPattern", - "CanvasPixelArray", - "CanvasRenderingContext2D", - "CaretPosition", - "ChannelMergerNode", - "ChannelSplitterNode", - "CharacterData", - "Chrome PDF Plugin", - "Chrome PDF Viewer", - "ClientRect", - "ClientRectList", - "Clipboard", - "ClipboardEvent", - "ClipboardItem", - "CloseEvent", - "Collator", - "CollectGarbage", - "CommandEvent", - "Comment", - "CompileError", - "CompositionEvent", - "CompressionStream", - "Console", - "ConstantSourceNode", - "ControlRangeCollection", - "Controllers", - "ConvolverNode", - "Coordinates", - "CountQueuingStrategy", - "Counter", - "Credential", - "CredentialsContainer", - "Crypto", - "CryptoKey", - "CryptoOperation", - "CustomElementRegistry", - "CustomEvent", - "DATABASE_ERR", - "DATA_CLONE_ERR", - "DATA_ERR", - "DBLCLICK", - "DECR", - "DECR_WRAP", - "DELETE_STATUS", - "DEPTH", - "DEPTH24_STENCIL8", - "DEPTH32F_STENCIL8", - "DEPTH_ATTACHMENT", - "DEPTH_BITS", - "DEPTH_BUFFER_BIT", - "DEPTH_CLEAR_VALUE", - "DEPTH_COMPONENT", - "DEPTH_COMPONENT16", - "DEPTH_COMPONENT24", - "DEPTH_COMPONENT32F", - "DEPTH_FUNC", - "DEPTH_RANGE", - "DEPTH_STENCIL", - "DEPTH_STENCIL_ATTACHMENT", - "DEPTH_TEST", - "DEPTH_WRITEMASK", - "DEVICE_INELIGIBLE", - "DIRECTION_DOWN", - "DIRECTION_LEFT", - "DIRECTION_RIGHT", - "DIRECTION_UP", - "DISABLED", - "DISPATCH_REQUEST_ERR", - "DITHER", - "DOCUMENT_FRAGMENT_NODE", - "DOCUMENT_NODE", - "DOCUMENT_POSITION_CONTAINED_BY", - "DOCUMENT_POSITION_CONTAINS", - "DOCUMENT_POSITION_DISCONNECTED", - "DOCUMENT_POSITION_FOLLOWING", - "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", - "DOCUMENT_POSITION_PRECEDING", - "DOCUMENT_TYPE_NODE", - "DOMCursor", - "DOMError", - "DOMException", - "DOMImplementation", - "DOMImplementationLS", - "DOMMatrix", - "DOMMatrixReadOnly", - "DOMParser", - "DOMPoint", - "DOMPointReadOnly", - "DOMQuad", - "DOMRect", - "DOMRectList", - "DOMRectReadOnly", - "DOMRequest", - "DOMSTRING_SIZE_ERR", - "DOMSettableTokenList", - "DOMStringList", - "DOMStringMap", - "DOMTokenList", - "DOMTransactionEvent", - "DOM_DELTA_LINE", - "DOM_DELTA_PAGE", - "DOM_DELTA_PIXEL", - "DOM_INPUT_METHOD_DROP", - "DOM_INPUT_METHOD_HANDWRITING", - "DOM_INPUT_METHOD_IME", - "DOM_INPUT_METHOD_KEYBOARD", - "DOM_INPUT_METHOD_MULTIMODAL", - "DOM_INPUT_METHOD_OPTION", - "DOM_INPUT_METHOD_PASTE", - "DOM_INPUT_METHOD_SCRIPT", - "DOM_INPUT_METHOD_UNKNOWN", - "DOM_INPUT_METHOD_VOICE", - "DOM_KEY_LOCATION_JOYSTICK", - "DOM_KEY_LOCATION_LEFT", - "DOM_KEY_LOCATION_MOBILE", - "DOM_KEY_LOCATION_NUMPAD", - "DOM_KEY_LOCATION_RIGHT", - "DOM_KEY_LOCATION_STANDARD", - "DOM_VK_0", - "DOM_VK_1", - "DOM_VK_2", - "DOM_VK_3", - "DOM_VK_4", - "DOM_VK_5", - "DOM_VK_6", - "DOM_VK_7", - "DOM_VK_8", - "DOM_VK_9", - "DOM_VK_A", - "DOM_VK_ACCEPT", - "DOM_VK_ADD", - "DOM_VK_ALT", - "DOM_VK_ALTGR", - "DOM_VK_AMPERSAND", - "DOM_VK_ASTERISK", - "DOM_VK_AT", - "DOM_VK_ATTN", - "DOM_VK_B", - "DOM_VK_BACKSPACE", - "DOM_VK_BACK_QUOTE", - "DOM_VK_BACK_SLASH", - "DOM_VK_BACK_SPACE", - "DOM_VK_C", - "DOM_VK_CANCEL", - "DOM_VK_CAPS_LOCK", - "DOM_VK_CIRCUMFLEX", - "DOM_VK_CLEAR", - "DOM_VK_CLOSE_BRACKET", - "DOM_VK_CLOSE_CURLY_BRACKET", - "DOM_VK_CLOSE_PAREN", - "DOM_VK_COLON", - "DOM_VK_COMMA", - "DOM_VK_CONTEXT_MENU", - "DOM_VK_CONTROL", - "DOM_VK_CONVERT", - "DOM_VK_CRSEL", - "DOM_VK_CTRL", - "DOM_VK_D", - "DOM_VK_DECIMAL", - "DOM_VK_DELETE", - "DOM_VK_DIVIDE", - "DOM_VK_DOLLAR", - "DOM_VK_DOUBLE_QUOTE", - "DOM_VK_DOWN", - "DOM_VK_E", - "DOM_VK_EISU", - "DOM_VK_END", - "DOM_VK_ENTER", - "DOM_VK_EQUALS", - "DOM_VK_EREOF", - "DOM_VK_ESCAPE", - "DOM_VK_EXCLAMATION", - "DOM_VK_EXECUTE", - "DOM_VK_EXSEL", - "DOM_VK_F", - "DOM_VK_F1", - "DOM_VK_F10", - "DOM_VK_F11", - "DOM_VK_F12", - "DOM_VK_F13", - "DOM_VK_F14", - "DOM_VK_F15", - "DOM_VK_F16", - "DOM_VK_F17", - "DOM_VK_F18", - "DOM_VK_F19", - "DOM_VK_F2", - "DOM_VK_F20", - "DOM_VK_F21", - "DOM_VK_F22", - "DOM_VK_F23", - "DOM_VK_F24", - "DOM_VK_F25", - "DOM_VK_F26", - "DOM_VK_F27", - "DOM_VK_F28", - "DOM_VK_F29", - "DOM_VK_F3", - "DOM_VK_F30", - "DOM_VK_F31", - "DOM_VK_F32", - "DOM_VK_F33", - "DOM_VK_F34", - "DOM_VK_F35", - "DOM_VK_F36", - "DOM_VK_F4", - "DOM_VK_F5", - "DOM_VK_F6", - "DOM_VK_F7", - "DOM_VK_F8", - "DOM_VK_F9", - "DOM_VK_FINAL", - "DOM_VK_FRONT", - "DOM_VK_G", - "DOM_VK_GREATER_THAN", - "DOM_VK_H", - "DOM_VK_HANGUL", - "DOM_VK_HANJA", - "DOM_VK_HASH", - "DOM_VK_HELP", - "DOM_VK_HK_TOGGLE", - "DOM_VK_HOME", - "DOM_VK_HYPHEN_MINUS", - "DOM_VK_I", - "DOM_VK_INSERT", - "DOM_VK_J", - "DOM_VK_JUNJA", - "DOM_VK_K", - "DOM_VK_KANA", - "DOM_VK_KANJI", - "DOM_VK_L", - "DOM_VK_LEFT", - "DOM_VK_LEFT_TAB", - "DOM_VK_LESS_THAN", - "DOM_VK_M", - "DOM_VK_META", - "DOM_VK_MODECHANGE", - "DOM_VK_MULTIPLY", - "DOM_VK_N", - "DOM_VK_NONCONVERT", - "DOM_VK_NUMPAD0", - "DOM_VK_NUMPAD1", - "DOM_VK_NUMPAD2", - "DOM_VK_NUMPAD3", - "DOM_VK_NUMPAD4", - "DOM_VK_NUMPAD5", - "DOM_VK_NUMPAD6", - "DOM_VK_NUMPAD7", - "DOM_VK_NUMPAD8", - "DOM_VK_NUMPAD9", - "DOM_VK_NUM_LOCK", - "DOM_VK_O", - "DOM_VK_OEM_1", - "DOM_VK_OEM_102", - "DOM_VK_OEM_2", - "DOM_VK_OEM_3", - "DOM_VK_OEM_4", - "DOM_VK_OEM_5", - "DOM_VK_OEM_6", - "DOM_VK_OEM_7", - "DOM_VK_OEM_8", - "DOM_VK_OEM_COMMA", - "DOM_VK_OEM_MINUS", - "DOM_VK_OEM_PERIOD", - "DOM_VK_OEM_PLUS", - "DOM_VK_OPEN_BRACKET", - "DOM_VK_OPEN_CURLY_BRACKET", - "DOM_VK_OPEN_PAREN", - "DOM_VK_P", - "DOM_VK_PA1", - "DOM_VK_PAGEDOWN", - "DOM_VK_PAGEUP", - "DOM_VK_PAGE_DOWN", - "DOM_VK_PAGE_UP", - "DOM_VK_PAUSE", - "DOM_VK_PERCENT", - "DOM_VK_PERIOD", - "DOM_VK_PIPE", - "DOM_VK_PLAY", - "DOM_VK_PLUS", - "DOM_VK_PRINT", - "DOM_VK_PRINTSCREEN", - "DOM_VK_PROCESSKEY", - "DOM_VK_PROPERITES", - "DOM_VK_Q", - "DOM_VK_QUESTION_MARK", - "DOM_VK_QUOTE", - "DOM_VK_R", - "DOM_VK_REDO", - "DOM_VK_RETURN", - "DOM_VK_RIGHT", - "DOM_VK_S", - "DOM_VK_SCROLL_LOCK", - "DOM_VK_SELECT", - "DOM_VK_SEMICOLON", - "DOM_VK_SEPARATOR", - "DOM_VK_SHIFT", - "DOM_VK_SLASH", - "DOM_VK_SLEEP", - "DOM_VK_SPACE", - "DOM_VK_SUBTRACT", - "DOM_VK_T", - "DOM_VK_TAB", - "DOM_VK_TILDE", - "DOM_VK_U", - "DOM_VK_UNDERSCORE", - "DOM_VK_UNDO", - "DOM_VK_UNICODE", - "DOM_VK_UP", - "DOM_VK_V", - "DOM_VK_VOLUME_DOWN", - "DOM_VK_VOLUME_MUTE", - "DOM_VK_VOLUME_UP", - "DOM_VK_W", - "DOM_VK_WIN", - "DOM_VK_WINDOW", - "DOM_VK_WIN_ICO_00", - "DOM_VK_WIN_ICO_CLEAR", - "DOM_VK_WIN_ICO_HELP", - "DOM_VK_WIN_OEM_ATTN", - "DOM_VK_WIN_OEM_AUTO", - "DOM_VK_WIN_OEM_BACKTAB", - "DOM_VK_WIN_OEM_CLEAR", - "DOM_VK_WIN_OEM_COPY", - "DOM_VK_WIN_OEM_CUSEL", - "DOM_VK_WIN_OEM_ENLW", - "DOM_VK_WIN_OEM_FINISH", - "DOM_VK_WIN_OEM_FJ_JISHO", - "DOM_VK_WIN_OEM_FJ_LOYA", - "DOM_VK_WIN_OEM_FJ_MASSHOU", - "DOM_VK_WIN_OEM_FJ_ROYA", - "DOM_VK_WIN_OEM_FJ_TOUROKU", - "DOM_VK_WIN_OEM_JUMP", - "DOM_VK_WIN_OEM_PA1", - "DOM_VK_WIN_OEM_PA2", - "DOM_VK_WIN_OEM_PA3", - "DOM_VK_WIN_OEM_RESET", - "DOM_VK_WIN_OEM_WSCTRL", - "DOM_VK_X", - "DOM_VK_XF86XK_ADD_FAVORITE", - "DOM_VK_XF86XK_APPLICATION_LEFT", - "DOM_VK_XF86XK_APPLICATION_RIGHT", - "DOM_VK_XF86XK_AUDIO_CYCLE_TRACK", - "DOM_VK_XF86XK_AUDIO_FORWARD", - "DOM_VK_XF86XK_AUDIO_LOWER_VOLUME", - "DOM_VK_XF86XK_AUDIO_MEDIA", - "DOM_VK_XF86XK_AUDIO_MUTE", - "DOM_VK_XF86XK_AUDIO_NEXT", - "DOM_VK_XF86XK_AUDIO_PAUSE", - "DOM_VK_XF86XK_AUDIO_PLAY", - "DOM_VK_XF86XK_AUDIO_PREV", - "DOM_VK_XF86XK_AUDIO_RAISE_VOLUME", - "DOM_VK_XF86XK_AUDIO_RANDOM_PLAY", - "DOM_VK_XF86XK_AUDIO_RECORD", - "DOM_VK_XF86XK_AUDIO_REPEAT", - "DOM_VK_XF86XK_AUDIO_REWIND", - "DOM_VK_XF86XK_AUDIO_STOP", - "DOM_VK_XF86XK_AWAY", - "DOM_VK_XF86XK_BACK", - "DOM_VK_XF86XK_BACK_FORWARD", - "DOM_VK_XF86XK_BATTERY", - "DOM_VK_XF86XK_BLUE", - "DOM_VK_XF86XK_BLUETOOTH", - "DOM_VK_XF86XK_BOOK", - "DOM_VK_XF86XK_BRIGHTNESS_ADJUST", - "DOM_VK_XF86XK_CALCULATOR", - "DOM_VK_XF86XK_CALENDAR", - "DOM_VK_XF86XK_CD", - "DOM_VK_XF86XK_CLOSE", - "DOM_VK_XF86XK_COMMUNITY", - "DOM_VK_XF86XK_CONTRAST_ADJUST", - "DOM_VK_XF86XK_COPY", - "DOM_VK_XF86XK_CUT", - "DOM_VK_XF86XK_CYCLE_ANGLE", - "DOM_VK_XF86XK_DISPLAY", - "DOM_VK_XF86XK_DOCUMENTS", - "DOM_VK_XF86XK_DOS", - "DOM_VK_XF86XK_EJECT", - "DOM_VK_XF86XK_EXCEL", - "DOM_VK_XF86XK_EXPLORER", - "DOM_VK_XF86XK_FAVORITES", - "DOM_VK_XF86XK_FINANCE", - "DOM_VK_XF86XK_FORWARD", - "DOM_VK_XF86XK_FRAME_BACK", - "DOM_VK_XF86XK_FRAME_FORWARD", - "DOM_VK_XF86XK_GAME", - "DOM_VK_XF86XK_GO", - "DOM_VK_XF86XK_GREEN", - "DOM_VK_XF86XK_HIBERNATE", - "DOM_VK_XF86XK_HISTORY", - "DOM_VK_XF86XK_HOME_PAGE", - "DOM_VK_XF86XK_HOT_LINKS", - "DOM_VK_XF86XK_I_TOUCH", - "DOM_VK_XF86XK_KBD_BRIGHTNESS_DOWN", - "DOM_VK_XF86XK_KBD_BRIGHTNESS_UP", - "DOM_VK_XF86XK_KBD_LIGHT_ON_OFF", - "DOM_VK_XF86XK_LAUNCH0", - "DOM_VK_XF86XK_LAUNCH1", - "DOM_VK_XF86XK_LAUNCH2", - "DOM_VK_XF86XK_LAUNCH3", - "DOM_VK_XF86XK_LAUNCH4", - "DOM_VK_XF86XK_LAUNCH5", - "DOM_VK_XF86XK_LAUNCH6", - "DOM_VK_XF86XK_LAUNCH7", - "DOM_VK_XF86XK_LAUNCH8", - "DOM_VK_XF86XK_LAUNCH9", - "DOM_VK_XF86XK_LAUNCH_A", - "DOM_VK_XF86XK_LAUNCH_B", - "DOM_VK_XF86XK_LAUNCH_C", - "DOM_VK_XF86XK_LAUNCH_D", - "DOM_VK_XF86XK_LAUNCH_E", - "DOM_VK_XF86XK_LAUNCH_F", - "DOM_VK_XF86XK_LIGHT_BULB", - "DOM_VK_XF86XK_LOG_OFF", - "DOM_VK_XF86XK_MAIL", - "DOM_VK_XF86XK_MAIL_FORWARD", - "DOM_VK_XF86XK_MARKET", - "DOM_VK_XF86XK_MEETING", - "DOM_VK_XF86XK_MEMO", - "DOM_VK_XF86XK_MENU_KB", - "DOM_VK_XF86XK_MENU_PB", - "DOM_VK_XF86XK_MESSENGER", - "DOM_VK_XF86XK_MON_BRIGHTNESS_DOWN", - "DOM_VK_XF86XK_MON_BRIGHTNESS_UP", - "DOM_VK_XF86XK_MUSIC", - "DOM_VK_XF86XK_MY_COMPUTER", - "DOM_VK_XF86XK_MY_SITES", - "DOM_VK_XF86XK_NEW", - "DOM_VK_XF86XK_NEWS", - "DOM_VK_XF86XK_OFFICE_HOME", - "DOM_VK_XF86XK_OPEN", - "DOM_VK_XF86XK_OPEN_URL", - "DOM_VK_XF86XK_OPTION", - "DOM_VK_XF86XK_PASTE", - "DOM_VK_XF86XK_PHONE", - "DOM_VK_XF86XK_PICTURES", - "DOM_VK_XF86XK_POWER_DOWN", - "DOM_VK_XF86XK_POWER_OFF", - "DOM_VK_XF86XK_RED", - "DOM_VK_XF86XK_REFRESH", - "DOM_VK_XF86XK_RELOAD", - "DOM_VK_XF86XK_REPLY", - "DOM_VK_XF86XK_ROCKER_DOWN", - "DOM_VK_XF86XK_ROCKER_ENTER", - "DOM_VK_XF86XK_ROCKER_UP", - "DOM_VK_XF86XK_ROTATE_WINDOWS", - "DOM_VK_XF86XK_ROTATION_KB", - "DOM_VK_XF86XK_ROTATION_PB", - "DOM_VK_XF86XK_SAVE", - "DOM_VK_XF86XK_SCREEN_SAVER", - "DOM_VK_XF86XK_SCROLL_CLICK", - "DOM_VK_XF86XK_SCROLL_DOWN", - "DOM_VK_XF86XK_SCROLL_UP", - "DOM_VK_XF86XK_SEARCH", - "DOM_VK_XF86XK_SEND", - "DOM_VK_XF86XK_SHOP", - "DOM_VK_XF86XK_SPELL", - "DOM_VK_XF86XK_SPLIT_SCREEN", - "DOM_VK_XF86XK_STANDBY", - "DOM_VK_XF86XK_START", - "DOM_VK_XF86XK_STOP", - "DOM_VK_XF86XK_SUBTITLE", - "DOM_VK_XF86XK_SUPPORT", - "DOM_VK_XF86XK_SUSPEND", - "DOM_VK_XF86XK_TASK_PANE", - "DOM_VK_XF86XK_TERMINAL", - "DOM_VK_XF86XK_TIME", - "DOM_VK_XF86XK_TOOLS", - "DOM_VK_XF86XK_TOP_MENU", - "DOM_VK_XF86XK_TO_DO_LIST", - "DOM_VK_XF86XK_TRAVEL", - "DOM_VK_XF86XK_USER1KB", - "DOM_VK_XF86XK_USER2KB", - "DOM_VK_XF86XK_USER_PB", - "DOM_VK_XF86XK_UWB", - "DOM_VK_XF86XK_VENDOR_HOME", - "DOM_VK_XF86XK_VIDEO", - "DOM_VK_XF86XK_VIEW", - "DOM_VK_XF86XK_WAKE_UP", - "DOM_VK_XF86XK_WEB_CAM", - "DOM_VK_XF86XK_WHEEL_BUTTON", - "DOM_VK_XF86XK_WLAN", - "DOM_VK_XF86XK_WORD", - "DOM_VK_XF86XK_WWW", - "DOM_VK_XF86XK_XFER", - "DOM_VK_XF86XK_YELLOW", - "DOM_VK_XF86XK_ZOOM_IN", - "DOM_VK_XF86XK_ZOOM_OUT", - "DOM_VK_Y", - "DOM_VK_Z", - "DOM_VK_ZOOM", - "DONE", - "DONT_CARE", - "DOWNLOADING", - "DRAGDROP", - "DRAW_BUFFER0", - "DRAW_BUFFER1", - "DRAW_BUFFER10", - "DRAW_BUFFER11", - "DRAW_BUFFER12", - "DRAW_BUFFER13", - "DRAW_BUFFER14", - "DRAW_BUFFER15", - "DRAW_BUFFER2", - "DRAW_BUFFER3", - "DRAW_BUFFER4", - "DRAW_BUFFER5", - "DRAW_BUFFER6", - "DRAW_BUFFER7", - "DRAW_BUFFER8", - "DRAW_BUFFER9", - "DRAW_FRAMEBUFFER", - "DRAW_FRAMEBUFFER_BINDING", - "DST_ALPHA", - "DST_COLOR", - "DYNAMIC_COPY", - "DYNAMIC_DRAW", - "DYNAMIC_READ", - "DataChannel", - "DataCue", - "DataTransfer", - "DataTransferItem", - "DataTransferItemList", - "DataView", - "Database", - "Date", - "DateTimeFormat", - "Debug", - "DecompressionStream", - "Default Browser Helper", - "DelayNode", - "DesktopNotification", - "DesktopNotificationCenter", - "DeviceAcceleration", - "DeviceLightEvent", - "DeviceMotionEvent", - "DeviceMotionEventAcceleration", - "DeviceMotionEventRotationRate", - "DeviceOrientationEvent", - "DeviceProximityEvent", - "DeviceRotationRate", - "DeviceStorage", - "DeviceStorageChangeEvent", - "Directory", - "DisplayNames", - "Document", - "DocumentFragment", - "DocumentTimeline", - "DocumentType", - "DragEvent", - "DynamicsCompressorNode", - "E", - "ELEMENT_ARRAY_BUFFER", - "ELEMENT_ARRAY_BUFFER_BINDING", - "ELEMENT_NODE", - "EMPTY", - "ENCODING_ERR", - "ENDED", - "END_TO_END", - "END_TO_START", - "ENTITY_NODE", - "ENTITY_REFERENCE_NODE", - "EPSILON", - "EQUAL", - "EQUALPOWER", - "ERROR", - "EXPONENTIAL_DISTANCE", - "EXT_texture_filter_anisotropic", - "Element", - "ElementInternals", - "ElementQuery", - "EnterPictureInPictureEvent", - "Entity", - "EntityReference", - "Enumerator", - "Error", - "ErrorEvent", - "EvalError", - "Event", - "EventException", - "EventSource", - "EventTarget", - "External", - "FASTEST", - "FIDOSDK", - "FILTER_ACCEPT", - "FILTER_INTERRUPT", - "FILTER_REJECT", - "FILTER_SKIP", - "FINISHED_STATE", - "FIRST_ORDERED_NODE_TYPE", - "FLOAT", - "FLOAT_32_UNSIGNED_INT_24_8_REV", - "FLOAT_MAT2", - "FLOAT_MAT2x3", - "FLOAT_MAT2x4", - "FLOAT_MAT3", - "FLOAT_MAT3x2", - "FLOAT_MAT3x4", - "FLOAT_MAT4", - "FLOAT_MAT4x2", - "FLOAT_MAT4x3", - "FLOAT_VEC2", - "FLOAT_VEC3", - "FLOAT_VEC4", - "FOCUS", - "FONT_FACE_RULE", - "FONT_FEATURE_VALUES_RULE", - "FRAGMENT_SHADER", - "FRAGMENT_SHADER_DERIVATIVE_HINT", - "FRAGMENT_SHADER_DERIVATIVE_HINT_OES", - "FRAMEBUFFER", - "FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE", - "FRAMEBUFFER_ATTACHMENT_BLUE_SIZE", - "FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING", - "FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE", - "FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE", - "FRAMEBUFFER_ATTACHMENT_GREEN_SIZE", - "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME", - "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE", - "FRAMEBUFFER_ATTACHMENT_RED_SIZE", - "FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE", - "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE", - "FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER", - "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL", - "FRAMEBUFFER_BINDING", - "FRAMEBUFFER_COMPLETE", - "FRAMEBUFFER_DEFAULT", - "FRAMEBUFFER_INCOMPLETE_ATTACHMENT", - "FRAMEBUFFER_INCOMPLETE_DIMENSIONS", - "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT", - "FRAMEBUFFER_INCOMPLETE_MULTISAMPLE", - "FRAMEBUFFER_UNSUPPORTED", - "FRONT", - "FRONT_AND_BACK", - "FRONT_FACE", - "FUNC_ADD", - "FUNC_REVERSE_SUBTRACT", - "FUNC_SUBTRACT", - "FeaturePolicy", - "FederatedCredential", - "Feed", - "FeedEntry", - "File", - "FileError", - "FileList", - "FileReader", - "FileSystem", - "FileSystemDirectoryEntry", - "FileSystemDirectoryReader", - "FileSystemEntry", - "FileSystemFileEntry", - "FinalizationRegistry", - "FindInPage", - "Float32Array", - "Float64Array", - "FocusEvent", - "FontFace", - "FontFaceSet", - "FontFaceSetLoadEvent", - "FormData", - "FormDataEvent", - "FragmentDirective", - "Function", - "GENERATE_MIPMAP_HINT", - "GEQUAL", - "GREATER", - "GREEN_BITS", - "GainNode", - "Gamepad", - "GamepadButton", - "GamepadEvent", - "GamepadHapticActuator", - "GamepadPose", - "Geolocation", - "GeolocationCoordinates", - "GeolocationPosition", - "GeolocationPositionError", - "GestureEvent", - "Global", - "Gyroscope", - "HALF_FLOAT", - "HAVE_CURRENT_DATA", - "HAVE_ENOUGH_DATA", - "HAVE_FUTURE_DATA", - "HAVE_METADATA", - "HAVE_NOTHING", - "HEADERS_RECEIVED", - "HIDDEN", - "HIERARCHY_REQUEST_ERR", - "HIGHPASS", - "HIGHSHELF", - "HIGH_FLOAT", - "HIGH_INT", - "HORIZONTAL", - "HORIZONTAL_AXIS", - "HRTF", - "HTMLAllCollection", - "HTMLAnchorElement", - "HTMLAppletElement", - "HTMLAreaElement", - "HTMLAreasCollection", - "HTMLAudioElement", - "HTMLBGSoundElement", - "HTMLBRElement", - "HTMLBaseElement", - "HTMLBaseFontElement", - "HTMLBlockElement", - "HTMLBlockquoteElement", - "HTMLBodyElement", - "HTMLButtonElement", - "HTMLCanvasElement", - "HTMLCollection", - "HTMLCommandElement", - "HTMLContentElement", - "HTMLDDElement", - "HTMLDListElement", - "HTMLDTElement", - "HTMLDataElement", - "HTMLDataListElement", - "HTMLDetailsElement", - "HTMLDialogElement", - "HTMLDirectoryElement", - "HTMLDivElement", - "HTMLDocument", - "HTMLElement", - "HTMLEmbedElement", - "HTMLFieldSetElement", - "HTMLFontElement", - "HTMLFormControlsCollection", - "HTMLFormElement", - "HTMLFrameElement", - "HTMLFrameSetElement", - "HTMLHRElement", - "HTMLHeadElement", - "HTMLHeadingElement", - "HTMLHtmlElement", - "HTMLIFrameElement", - "HTMLImageElement", - "HTMLInputElement", - "HTMLIsIndexElement", - "HTMLKeygenElement", - "HTMLLIElement", - "HTMLLabelElement", - "HTMLLegendElement", - "HTMLLinkElement", - "HTMLMapElement", - "HTMLMarqueeElement", - "HTMLMediaElement", - "HTMLMenuElement", - "HTMLMenuItemElement", - "HTMLMetaElement", - "HTMLMeterElement", - "HTMLModElement", - "HTMLNextIdElement", - "HTMLOListElement", - "HTMLObjectElement", - "HTMLOptGroupElement", - "HTMLOptionElement", - "HTMLOptionsCollection", - "HTMLOutputElement", - "HTMLParagraphElement", - "HTMLParamElement", - "HTMLPhraseElement", - "HTMLPictureElement", - "HTMLPreElement", - "HTMLProgressElement", - "HTMLPropertiesCollection", - "HTMLQuoteElement", - "HTMLScriptElement", - "HTMLSelectElement", - "HTMLShadowElement", - "HTMLSlotElement", - "HTMLSourceElement", - "HTMLSpanElement", - "HTMLStyleElement", - "HTMLTableCaptionElement", - "HTMLTableCellElement", - "HTMLTableColElement", - "HTMLTableDataCellElement", - "HTMLTableElement", - "HTMLTableHeaderCellElement", - "HTMLTableRowElement", - "HTMLTableSectionElement", - "HTMLTemplateElement", - "HTMLTextAreaElement", - "HTMLTimeElement", - "HTMLTitleElement", - "HTMLTrackElement", - "HTMLUListElement", - "HTMLUnknownElement", - "HTMLVideoElement", - "HashChangeEvent", - "Headers", - "History", - "Hz", - "ICE_CHECKING", - "ICE_CLOSED", - "ICE_COMPLETED", - "ICE_CONNECTED", - "ICE_FAILED", - "ICE_GATHERING", - "ICE_WAITING", - "IDBCursor", - "IDBCursorWithValue", - "IDBDatabase", - "IDBDatabaseException", - "IDBFactory", - "IDBFileHandle", - "IDBFileRequest", - "IDBIndex", - "IDBKeyRange", - "IDBMutableFile", - "IDBObjectStore", - "IDBOpenDBRequest", - "IDBRequest", - "IDBTransaction", - "IDBVersionChangeEvent", - "IDLE", - "IIRFilterNode", - "IMPLEMENTATION_COLOR_READ_FORMAT", - "IMPLEMENTATION_COLOR_READ_TYPE", - "IMPORT_RULE", - "INCR", - "INCR_WRAP", - "INDEX_SIZE_ERR", - "INSTALL", - "INSTALLED", - "INT", - "INTERLEAVED_ATTRIBS", - "INT_2_10_10_10_REV", - "INT_SAMPLER_2D", - "INT_SAMPLER_2D_ARRAY", - "INT_SAMPLER_3D", - "INT_SAMPLER_CUBE", - "INT_VEC2", - "INT_VEC3", - "INT_VEC4", - "INUSE_ATTRIBUTE_ERR", - "INVALID_ACCESS_ERR", - "INVALID_CHARACTER_ERR", - "INVALID_ENUM", - "INVALID_EXPRESSION_ERR", - "INVALID_FRAMEBUFFER_OPERATION", - "INVALID_INDEX", - "INVALID_MODIFICATION_ERR", - "INVALID_NODE_TYPE_ERR", - "INVALID_OPERATION", - "INVALID_STATE_ERR", - "INVALID_VALUE", - "INVERSE_DISTANCE", - "INVERT", - "IceCandidate", - "IdleDeadline", - "Image", - "ImageBitmap", - "ImageBitmapRenderingContext", - "ImageCapture", - "ImageData", - "Infinity", - "InputDeviceCapabilities", - "InputDeviceInfo", - "InputEvent", - "InputMethodContext", - "InstallState", - "InstallTrigger", - "Instance", - "Int16Array", - "Int32Array", - "Int8Array", - "Intent", - "InternalError", - "IntersectionObserver", - "IntersectionObserverEntry", - "Intl", - "IsSearchProviderInstalled", - "Iterator", - "JSON", - "Java Deployment Toolkit 7.0.250.17", - "Java(TM) Platform SE 7 U25", - "KEEP", - "KEYDOWN", - "KEYFRAMES_RULE", - "KEYFRAME_RULE", - "KEYPRESS", - "KEYUP", - "Key", - "KeyEvent", - "KeyOperation", - "KeyPair", - "Keyboard", - "KeyboardEvent", - "KeyboardLayoutMap", - "KeyframeEffect", - "LENGTHADJUST_SPACING", - "LENGTHADJUST_SPACINGANDGLYPHS", - "LENGTHADJUST_UNKNOWN", - "LEQUAL", - "LESS", - "LINEAR", - "LINEAR_DISTANCE", - "LINEAR_MIPMAP_LINEAR", - "LINEAR_MIPMAP_NEAREST", - "LINES", - "LINE_LOOP", - "LINE_STRIP", - "LINE_WIDTH", - "LINK_STATUS", - "LINUX", - "LIVE", - "LN10", - "LN2", - "LOADED", - "LOADING", - "LOCALE", - "LOG10E", - "LOG2E", - "LOWPASS", - "LOWSHELF", - "LOW_FLOAT", - "LOW_INT", - "LSException", - "LSParserFilter", - "LUMINANCE", - "LUMINANCE_ALPHA", - "LargestContentfulPaint", - "LayoutShift", - "LayoutShiftAttribution", - "LinearAccelerationSensor", - "LinkError", - "ListFormat", - "LocalMediaStream", - "Locale", - "Location", - "Lock", - "LockManager", - "MAC", - "MAX", - "MAX_3D_TEXTURE_SIZE", - "MAX_ARRAY_TEXTURE_LAYERS", - "MAX_CLIENT_WAIT_TIMEOUT_WEBGL", - "MAX_COLOR_ATTACHMENTS", - "MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS", - "MAX_COMBINED_TEXTURE_IMAGE_UNITS", - "MAX_COMBINED_UNIFORM_BLOCKS", - "MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS", - "MAX_CUBE_MAP_TEXTURE_SIZE", - "MAX_DRAW_BUFFERS", - "MAX_ELEMENTS_INDICES", - "MAX_ELEMENTS_VERTICES", - "MAX_ELEMENT_INDEX", - "MAX_FRAGMENT_INPUT_COMPONENTS", - "MAX_FRAGMENT_UNIFORM_BLOCKS", - "MAX_FRAGMENT_UNIFORM_COMPONENTS", - "MAX_FRAGMENT_UNIFORM_VECTORS", - "MAX_PROGRAM_TEXEL_OFFSET", - "MAX_RENDERBUFFER_SIZE", - "MAX_SAFE_INTEGER", - "MAX_SAMPLES", - "MAX_SERVER_WAIT_TIMEOUT", - "MAX_TEXTURE_IMAGE_UNITS", - "MAX_TEXTURE_LOD_BIAS", - "MAX_TEXTURE_MAX_ANISOTROPY_EXT", - "MAX_TEXTURE_SIZE", - "MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS", - "MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS", - "MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS", - "MAX_UNIFORM_BLOCK_SIZE", - "MAX_UNIFORM_BUFFER_BINDINGS", - "MAX_VALUE", - "MAX_VARYING_COMPONENTS", - "MAX_VARYING_VECTORS", - "MAX_VERTEX_ATTRIBS", - "MAX_VERTEX_OUTPUT_COMPONENTS", - "MAX_VERTEX_TEXTURE_IMAGE_UNITS", - "MAX_VERTEX_UNIFORM_BLOCKS", - "MAX_VERTEX_UNIFORM_COMPONENTS", - "MAX_VERTEX_UNIFORM_VECTORS", - "MAX_VIEWPORT_DIMS", - "MEDIA_ERR_ABORTED", - "MEDIA_ERR_DECODE", - "MEDIA_ERR_ENCRYPTED", - "MEDIA_ERR_NETWORK", - "MEDIA_ERR_SRC_NOT_SUPPORTED", - "MEDIA_KEYERR_CLIENT", - "MEDIA_KEYERR_DOMAIN", - "MEDIA_KEYERR_HARDWARECHANGE", - "MEDIA_KEYERR_OUTPUT", - "MEDIA_KEYERR_SERVICE", - "MEDIA_KEYERR_UNKNOWN", - "MEDIA_RULE", - "MEDIUM_FLOAT", - "MEDIUM_INT", - "META_MASK", - "MIDIAccess", - "MIDIConnectionEvent", - "MIDIInput", - "MIDIInputMap", - "MIDIMessageEvent", - "MIDIOutput", - "MIDIOutputMap", - "MIDIPort", - "MIN", - "MIN_PROGRAM_TEXEL_OFFSET", - "MIN_SAFE_INTEGER", - "MIN_VALUE", - "MIRRORED_REPEAT", - "MODE_ASYNCHRONOUS", - "MODE_SYNCHRONOUS", - "MODIFICATION", - "MOUSEDOWN", - "MOUSEDRAG", - "MOUSEMOVE", - "MOUSEOUT", - "MOUSEOVER", - "MOUSEUP", - "MOZ_KEYFRAMES_RULE", - "MOZ_KEYFRAME_RULE", - "MOZ_SOURCE_CURSOR", - "MOZ_SOURCE_ERASER", - "MOZ_SOURCE_KEYBOARD", - "MOZ_SOURCE_MOUSE", - "MOZ_SOURCE_PEN", - "MOZ_SOURCE_TOUCH", - "MOZ_SOURCE_UNKNOWN", - "MSBehaviorUrnsCollection", - "MSBlobBuilder", - "MSCSSMatrix", - "MSCSSProperties", - "MSCSSRuleList", - "MSCompatibleInfo", - "MSCompatibleInfoCollection", - "MSCurrentStyleCSSProperties", - "MSEventObj", - "MSGESTURE_FLAG_BEGIN", - "MSGESTURE_FLAG_CANCEL", - "MSGESTURE_FLAG_END", - "MSGESTURE_FLAG_INERTIA", - "MSGESTURE_FLAG_NONE", - "MSGesture", - "MSGestureEvent", - "MSGraphicsTrust", - "MSInputMethodContext", - "MSManipulationEvent", - "MSMediaKeyError", - "MSMediaKeyMessageEvent", - "MSMediaKeyNeededEvent", - "MSMediaKeySession", - "MSMediaKeys", - "MSMimeTypesCollection", - "MSPOINTER_TYPE_MOUSE", - "MSPOINTER_TYPE_PEN", - "MSPOINTER_TYPE_TOUCH", - "MSPluginsCollection", - "MSPointerEvent", - "MSRangeCollection", - "MSSiteModeEvent", - "MSStream", - "MSStreamReader", - "MSStyleCSSProperties", - "MS_ASYNC_CALLBACK_STATUS_ASSIGN_DELEGATE", - "MS_ASYNC_CALLBACK_STATUS_CANCEL", - "MS_ASYNC_CALLBACK_STATUS_CHOOSEANY", - "MS_ASYNC_CALLBACK_STATUS_ERROR", - "MS_ASYNC_CALLBACK_STATUS_JOIN", - "MS_ASYNC_OP_STATUS_CANCELED", - "MS_ASYNC_OP_STATUS_ERROR", - "MS_ASYNC_OP_STATUS_SUCCESS", - "MS_MANIPULATION_STATE_ACTIVE", - "MS_MANIPULATION_STATE_CANCELLED", - "MS_MANIPULATION_STATE_COMMITTED", - "MS_MANIPULATION_STATE_DRAGGING", - "MS_MANIPULATION_STATE_INERTIA", - "MS_MANIPULATION_STATE_PRESELECT", - "MS_MANIPULATION_STATE_SELECTING", - "MS_MANIPULATION_STATE_STOPPED", - "MS_MEDIA_ERR_ENCRYPTED", - "MS_MEDIA_KEYERR_CLIENT", - "MS_MEDIA_KEYERR_DOMAIN", - "MS_MEDIA_KEYERR_HARDWARECHANGE", - "MS_MEDIA_KEYERR_OUTPUT", - "MS_MEDIA_KEYERR_SERVICE", - "MS_MEDIA_KEYERR_UNKNOWN", - "Map", - "Math", - "MathMLElement", - "MediaCapabilities", - "MediaCapabilitiesInfo", - "MediaController", - "MediaDeviceInfo", - "MediaDevices", - "MediaElementAudioSourceNode", - "MediaEncryptedEvent", - "MediaError", - "MediaKeyError", - "MediaKeyEvent", - "MediaKeyMessageEvent", - "MediaKeyNeededEvent", - "MediaKeySession", - "MediaKeyStatusMap", - "MediaKeySystemAccess", - "MediaKeys", - "MediaList", - "MediaMetadata", - "MediaQueryList", - "MediaQueryListEvent", - "MediaRecorder", - "MediaRecorderErrorEvent", - "MediaSession", - "MediaSettingsRange", - "MediaSource", - "MediaStream", - "MediaStreamAudioDestinationNode", - "MediaStreamAudioSourceNode", - "MediaStreamEvent", - "MediaStreamTrack", - "MediaStreamTrackAudioSourceNode", - "MediaStreamTrackEvent", - "Memory", - "MessageChannel", - "MessageEvent", - "MessagePort", - "Methods", - "Microsoft® DRM", - "MimeType", - "MimeTypeArray", - "Module", - "MouseEvent", - "MouseScrollEvent", - "MouseWheelEvent", - "MozAnimation", - "MozAnimationDelay", - "MozAnimationDirection", - "MozAnimationDuration", - "MozAnimationFillMode", - "MozAnimationIterationCount", - "MozAnimationName", - "MozAnimationPlayState", - "MozAnimationTimingFunction", - "MozAppearance", - "MozBackfaceVisibility", - "MozBinding", - "MozBorderBottomColors", - "MozBorderEnd", - "MozBorderEndColor", - "MozBorderEndStyle", - "MozBorderEndWidth", - "MozBorderImage", - "MozBorderLeftColors", - "MozBorderRightColors", - "MozBorderStart", - "MozBorderStartColor", - "MozBorderStartStyle", - "MozBorderStartWidth", - "MozBorderTopColors", - "MozBoxAlign", - "MozBoxDirection", - "MozBoxFlex", - "MozBoxOrdinalGroup", - "MozBoxOrient", - "MozBoxPack", - "MozBoxSizing", - "MozCSSKeyframeRule", - "MozCSSKeyframesRule", - "MozColumnCount", - "MozColumnFill", - "MozColumnGap", - "MozColumnRule", - "MozColumnRuleColor", - "MozColumnRuleStyle", - "MozColumnRuleWidth", - "MozColumnWidth", - "MozColumns", - "MozContactChangeEvent", - "MozFloatEdge", - "MozFontFeatureSettings", - "MozFontLanguageOverride", - "MozForceBrokenImageIcon", - "MozHyphens", - "MozImageRegion", - "MozMarginEnd", - "MozMarginStart", - "MozMmsEvent", - "MozMmsMessage", - "MozMobileMessageThread", - "MozOSXFontSmoothing", - "MozOrient", - "MozOutlineRadius", - "MozOutlineRadiusBottomleft", - "MozOutlineRadiusBottomright", - "MozOutlineRadiusTopleft", - "MozOutlineRadiusTopright", - "MozPaddingEnd", - "MozPaddingStart", - "MozPerspective", - "MozPerspectiveOrigin", - "MozPowerManager", - "MozSettingsEvent", - "MozSmsEvent", - "MozSmsMessage", - "MozStackSizing", - "MozTabSize", - "MozTextAlignLast", - "MozTextDecorationColor", - "MozTextDecorationLine", - "MozTextDecorationStyle", - "MozTextSizeAdjust", - "MozTransform", - "MozTransformOrigin", - "MozTransformStyle", - "MozTransition", - "MozTransitionDelay", - "MozTransitionDuration", - "MozTransitionProperty", - "MozTransitionTimingFunction", - "MozUserFocus", - "MozUserInput", - "MozUserModify", - "MozUserSelect", - "MozWindowDragging", - "MozWindowShadow", - "MutationEvent", - "MutationObserver", - "MutationRecord", - "NAMESPACE_ERR", - "NAMESPACE_RULE", - "NEAREST", - "NEAREST_MIPMAP_LINEAR", - "NEAREST_MIPMAP_NEAREST", - "NEGATIVE_INFINITY", - "NETWORK_EMPTY", - "NETWORK_ERR", - "NETWORK_IDLE", - "NETWORK_LOADED", - "NETWORK_LOADING", - "NETWORK_NO_SOURCE", - "NEVER", - "NEW", - "NEXT", - "NEXT_NO_DUPLICATE", - "NICEST", - "NODE_AFTER", - "NODE_BEFORE", - "NODE_BEFORE_AND_AFTER", - "NODE_INSIDE", - "NONE", - "NON_TRANSIENT_ERR", - "NOTATION_NODE", - "NOTCH", - "NOTEQUAL", - "NOT_ALLOWED_ERR", - "NOT_FOUND_ERR", - "NOT_INSTALLED", - "NOT_READABLE_ERR", - "NOT_SUPPORTED_ERR", - "NO_DATA_ALLOWED_ERR", - "NO_ERR", - "NO_ERROR", - "NO_MODIFICATION_ALLOWED_ERR", - "NO_UPDATE", - "NUMBER_TYPE", - "NUM_COMPRESSED_TEXTURE_FORMATS", - "NaN", - "NamedNodeMap", - "Native Client", - "NavigationPreloadManager", - "Navigator", - "NearbyLinks", - "NetworkInformation", - "Node", - "NodeFilter", - "NodeIterator", - "NodeList", - "Notation", - "Notification", - "NotifyPaintEvent", - "Number", - "NumberFormat", - "OBJECT_TYPE", - "OBSOLETE", - "OES_element_index_uint", - "OES_standard_derivatives", - "OES_texture_float", - "OES_texture_float_linear", - "OK", - "ONE", - "ONE_MINUS_CONSTANT_ALPHA", - "ONE_MINUS_CONSTANT_COLOR", - "ONE_MINUS_DST_ALPHA", - "ONE_MINUS_DST_COLOR", - "ONE_MINUS_SRC_ALPHA", - "ONE_MINUS_SRC_COLOR", - "OPEN", - "OPENBSD", - "OPENED", - "OPENING", - "ORDERED_NODE_ITERATOR_TYPE", - "ORDERED_NODE_SNAPSHOT_TYPE", - "OS_UPDATE", - "OTHER_ERROR", - "OUT_OF_MEMORY", - "Object", - "OfflineAudioCompletionEvent", - "OfflineAudioContext", - "OfflineResourceList", - "OffscreenCanvas", - "OffscreenCanvasRenderingContext2D", - "OnInstalledReason", - "OnRestartRequiredReason", - "Option", - "OrientationSensor", - "OscillatorNode", - "OverconstrainedError", - "OverconstrainedErrorEvent", - "OverflowEvent", - "PACKAGE", - "PACK_ALIGNMENT", - "PACK_ROW_LENGTH", - "PACK_SKIP_PIXELS", - "PACK_SKIP_ROWS", - "PAGE_RULE", - "PARSE_ERR", - "PATHSEG_ARC_ABS", - "PATHSEG_ARC_REL", - "PATHSEG_CLOSEPATH", - "PATHSEG_CURVETO_CUBIC_ABS", - "PATHSEG_CURVETO_CUBIC_REL", - "PATHSEG_CURVETO_CUBIC_SMOOTH_ABS", - "PATHSEG_CURVETO_CUBIC_SMOOTH_REL", - "PATHSEG_CURVETO_QUADRATIC_ABS", - "PATHSEG_CURVETO_QUADRATIC_REL", - "PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS", - "PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL", - "PATHSEG_LINETO_ABS", - "PATHSEG_LINETO_HORIZONTAL_ABS", - "PATHSEG_LINETO_HORIZONTAL_REL", - "PATHSEG_LINETO_REL", - "PATHSEG_LINETO_VERTICAL_ABS", - "PATHSEG_LINETO_VERTICAL_REL", - "PATHSEG_MOVETO_ABS", - "PATHSEG_MOVETO_REL", - "PATHSEG_UNKNOWN", - "PATH_EXISTS_ERR", - "PEAKING", - "PERIODIC", - "PERMISSION_DENIED", - "PERSISTENT", - "PI", - "PIXEL_PACK_BUFFER", - "PIXEL_PACK_BUFFER_BINDING", - "PIXEL_UNPACK_BUFFER", - "PIXEL_UNPACK_BUFFER_BINDING", - "PLAYING_STATE", - "POINTS", - "POLYGON_OFFSET_FACTOR", - "POLYGON_OFFSET_FILL", - "POLYGON_OFFSET_UNITS", - "POSITION_UNAVAILABLE", - "POSITIVE_INFINITY", - "PREV", - "PREV_NO_DUPLICATE", - "PROCESSING_INSTRUCTION_NODE", - "PageChangeEvent", - "PageTransitionEvent", - "PaintRequest", - "PaintRequestList", - "PannerNode", - "PasswordCredential", - "Path2D", - "PaymentAddress", - "PaymentInstruments", - "PaymentManager", - "PaymentMethodChangeEvent", - "PaymentRequest", - "PaymentRequestUpdateEvent", - "PaymentResponse", - "Performance", - "PerformanceElementTiming", - "PerformanceEntry", - "PerformanceEventTiming", - "PerformanceLongTaskTiming", - "PerformanceMark", - "PerformanceMeasure", - "PerformanceNavigation", - "PerformanceNavigationTiming", - "PerformanceObserver", - "PerformanceObserverEntryList", - "PerformancePaintTiming", - "PerformanceResourceTiming", - "PerformanceServerTiming", - "PerformanceTiming", - "PeriodicSyncManager", - "PeriodicWave", - "PermissionStatus", - "Permissions", - "PhotoCapabilities", - "PictureInPictureWindow", - "PlatformArch", - "PlatformNaclArch", - "PlatformOs", - "Plugin", - "PluginArray", - "PluralRules", - "PointerEvent", - "PopStateEvent", - "PopupBlockedEvent", - "Position", - "PositionError", - "Presentation", - "PresentationAvailability", - "PresentationConnection", - "PresentationConnectionAvailableEvent", - "PresentationConnectionCloseEvent", - "PresentationConnectionList", - "PresentationReceiver", - "PresentationRequest", - "ProcessingInstruction", - "ProgressEvent", - "Promise", - "PromiseRejectionEvent", - "PropertyNodeList", - "Proxy", - "PublicKeyCredential", - "PushManager", - "PushSubscription", - "PushSubscriptionOptions", - "Q", - "QUERY_RESULT", - "QUERY_RESULT_AVAILABLE", - "QUOTA_ERR", - "QUOTA_EXCEEDED_ERR", - "QueryInterface", - "R11F_G11F_B10F", - "R16F", - "R16I", - "R16UI", - "R32F", - "R32I", - "R32UI", - "R8", - "R8I", - "R8UI", - "R8_SNORM", - "RASTERIZER_DISCARD", - "READY_TO_RUN", - "READ_BUFFER", - "READ_FRAMEBUFFER", - "READ_FRAMEBUFFER_BINDING", - "READ_ONLY", - "READ_ONLY_ERR", - "READ_WRITE", - "RED", - "RED_BITS", - "RED_INTEGER", - "REMOVAL", - "RENDERBUFFER", - "RENDERBUFFER_ALPHA_SIZE", - "RENDERBUFFER_BINDING", - "RENDERBUFFER_BLUE_SIZE", - "RENDERBUFFER_DEPTH_SIZE", - "RENDERBUFFER_GREEN_SIZE", - "RENDERBUFFER_HEIGHT", - "RENDERBUFFER_INTERNAL_FORMAT", - "RENDERBUFFER_RED_SIZE", - "RENDERBUFFER_SAMPLES", - "RENDERBUFFER_STENCIL_SIZE", - "RENDERBUFFER_WIDTH", - "RENDERER", - "RENDERING_INTENT_ABSOLUTE_COLORIMETRIC", - "RENDERING_INTENT_AUTO", - "RENDERING_INTENT_PERCEPTUAL", - "RENDERING_INTENT_RELATIVE_COLORIMETRIC", - "RENDERING_INTENT_SATURATION", - "RENDERING_INTENT_UNKNOWN", - "REPEAT", - "REPLACE", - "RG", - "RG16F", - "RG16I", - "RG16UI", - "RG32F", - "RG32I", - "RG32UI", - "RG8", - "RG8I", - "RG8UI", - "RG8_SNORM", - "RGB", - "RGB10_A2", - "RGB10_A2UI", - "RGB16F", - "RGB16I", - "RGB16UI", - "RGB32F", - "RGB32I", - "RGB32UI", - "RGB565", - "RGB5_A1", - "RGB8", - "RGB8I", - "RGB8UI", - "RGB8_SNORM", - "RGB9_E5", - "RGBA", - "RGBA16F", - "RGBA16I", - "RGBA16UI", - "RGBA32F", - "RGBA32I", - "RGBA32UI", - "RGBA4", - "RGBA8", - "RGBA8I", - "RGBA8UI", - "RGBA8_SNORM", - "RGBA_INTEGER", - "RGBColor", - "RGB_INTEGER", - "RG_INTEGER", - "ROTATION_CLOCKWISE", - "ROTATION_COUNTERCLOCKWISE", - "RTCCertificate", - "RTCDTMFSender", - "RTCDTMFToneChangeEvent", - "RTCDataChannel", - "RTCDataChannelEvent", - "RTCDtlsTransport", - "RTCError", - "RTCErrorEvent", - "RTCIceCandidate", - "RTCIceTransport", - "RTCPeerConnection", - "RTCPeerConnectionIceErrorEvent", - "RTCPeerConnectionIceEvent", - "RTCRtpReceiver", - "RTCRtpSender", - "RTCRtpTransceiver", - "RTCSctpTransport", - "RTCSessionDescription", - "RTCStatsReport", - "RTCTrackEvent", - "RUNNING", - "RadioNodeList", - "Range", - "RangeError", - "RangeException", - "ReadableByteStream", - "ReadableStream", - "ReadableStreamDefaultReader", - "RecordErrorEvent", - "Rect", - "ReferenceError", - "Reflect", - "RegExp", - "RelativeOrientationSensor", - "RelativeTimeFormat", - "RemotePlayback", - "ReportingObserver", - "Request", - "RequestUpdateCheckStatus", - "ResizeObserver", - "ResizeObserverEntry", - "ResizeObserverSize", - "Response", - "RunningState", - "RuntimeError", - "SAMPLER_2D", - "SAMPLER_2D_ARRAY", - "SAMPLER_2D_ARRAY_SHADOW", - "SAMPLER_2D_SHADOW", - "SAMPLER_3D", - "SAMPLER_BINDING", - "SAMPLER_CUBE", - "SAMPLER_CUBE_SHADOW", - "SAMPLES", - "SAMPLE_ALPHA_TO_COVERAGE", - "SAMPLE_BUFFERS", - "SAMPLE_COVERAGE", - "SAMPLE_COVERAGE_INVERT", - "SAMPLE_COVERAGE_VALUE", - "SAWTOOTH", - "SCHEDULED_STATE", - "SCISSOR_BOX", - "SCISSOR_TEST", - "SCROLL_PAGE_DOWN", - "SCROLL_PAGE_UP", - "SDP_ANSWER", - "SDP_OFFER", - "SDP_PRANSWER", - "SECURITY_ERR", - "SELECT", - "SEPARATE_ATTRIBS", - "SERIALIZE_ERR", - "SEVERITY_ERROR", - "SEVERITY_FATAL_ERROR", - "SEVERITY_WARNING", - "SHADER_COMPILER", - "SHADER_TYPE", - "SHADING_LANGUAGE_VERSION", - "SHARED_MODULE_UPDATE", - "SHIFT_MASK", - "SHORT", - "SHOWING", - "SHOW_ALL", - "SHOW_ATTRIBUTE", - "SHOW_CDATA_SECTION", - "SHOW_COMMENT", - "SHOW_DOCUMENT", - "SHOW_DOCUMENT_FRAGMENT", - "SHOW_DOCUMENT_TYPE", - "SHOW_ELEMENT", - "SHOW_ENTITY", - "SHOW_ENTITY_REFERENCE", - "SHOW_NOTATION", - "SHOW_PROCESSING_INSTRUCTION", - "SHOW_TEXT", - "SIGNALED", - "SIGNED_NORMALIZED", - "SINE", - "SKIN", - "SOUNDFIELD", - "SQLError", - "SQLException", - "SQLResultSet", - "SQLResultSetRowList", - "SQLTransaction", - "SQRT1_2", - "SQRT2", - "SQUARE", - "SRC_ALPHA", - "SRC_ALPHA_SATURATE", - "SRC_COLOR", - "SRGB", - "SRGB8", - "SRGB8_ALPHA8", - "START_TO_END", - "START_TO_START", - "STATIC_COPY", - "STATIC_DRAW", - "STATIC_READ", - "STENCIL", - "STENCIL_ATTACHMENT", - "STENCIL_BACK_FAIL", - "STENCIL_BACK_FUNC", - "STENCIL_BACK_PASS_DEPTH_FAIL", - "STENCIL_BACK_PASS_DEPTH_PASS", - "STENCIL_BACK_REF", - "STENCIL_BACK_VALUE_MASK", - "STENCIL_BACK_WRITEMASK", - "STENCIL_BITS", - "STENCIL_BUFFER_BIT", - "STENCIL_CLEAR_VALUE", - "STENCIL_FAIL", - "STENCIL_FUNC", - "STENCIL_INDEX", - "STENCIL_INDEX8", - "STENCIL_PASS_DEPTH_FAIL", - "STENCIL_PASS_DEPTH_PASS", - "STENCIL_REF", - "STENCIL_TEST", - "STENCIL_VALUE_MASK", - "STENCIL_WRITEMASK", - "STREAM_COPY", - "STREAM_DRAW", - "STREAM_READ", - "STRING_TYPE", - "STYLE_RULE", - "SUBPIXEL_BITS", - "SUPPORTS_RULE", - "SVGAElement", - "SVGAltGlyphDefElement", - "SVGAltGlyphElement", - "SVGAltGlyphItemElement", - "SVGAngle", - "SVGAnimateColorElement", - "SVGAnimateElement", - "SVGAnimateMotionElement", - "SVGAnimateTransformElement", - "SVGAnimatedAngle", - "SVGAnimatedBoolean", - "SVGAnimatedEnumeration", - "SVGAnimatedInteger", - "SVGAnimatedLength", - "SVGAnimatedLengthList", - "SVGAnimatedNumber", - "SVGAnimatedNumberList", - "SVGAnimatedPreserveAspectRatio", - "SVGAnimatedRect", - "SVGAnimatedString", - "SVGAnimatedTransformList", - "SVGAnimationElement", - "SVGCircleElement", - "SVGClipPathElement", - "SVGColor", - "SVGComponentTransferFunctionElement", - "SVGCursorElement", - "SVGDefsElement", - "SVGDescElement", - "SVGDiscardElement", - "SVGDocument", - "SVGElement", - "SVGElementInstance", - "SVGElementInstanceList", - "SVGEllipseElement", - "SVGException", - "SVGFEBlendElement", - "SVGFEColorMatrixElement", - "SVGFEComponentTransferElement", - "SVGFECompositeElement", - "SVGFEConvolveMatrixElement", - "SVGFEDiffuseLightingElement", - "SVGFEDisplacementMapElement", - "SVGFEDistantLightElement", - "SVGFEDropShadowElement", - "SVGFEFloodElement", - "SVGFEFuncAElement", - "SVGFEFuncBElement", - "SVGFEFuncGElement", - "SVGFEFuncRElement", - "SVGFEGaussianBlurElement", - "SVGFEImageElement", - "SVGFEMergeElement", - "SVGFEMergeNodeElement", - "SVGFEMorphologyElement", - "SVGFEOffsetElement", - "SVGFEPointLightElement", - "SVGFESpecularLightingElement", - "SVGFESpotLightElement", - "SVGFETileElement", - "SVGFETurbulenceElement", - "SVGFilterElement", - "SVGFontElement", - "SVGFontFaceElement", - "SVGFontFaceFormatElement", - "SVGFontFaceNameElement", - "SVGFontFaceSrcElement", - "SVGFontFaceUriElement", - "SVGForeignObjectElement", - "SVGGElement", - "SVGGeometryElement", - "SVGGlyphElement", - "SVGGlyphRefElement", - "SVGGradientElement", - "SVGGraphicsElement", - "SVGHKernElement", - "SVGImageElement", - "SVGLength", - "SVGLengthList", - "SVGLineElement", - "SVGLinearGradientElement", - "SVGMPathElement", - "SVGMarkerElement", - "SVGMaskElement", - "SVGMatrix", - "SVGMetadataElement", - "SVGMissingGlyphElement", - "SVGNumber", - "SVGNumberList", - "SVGPaint", - "SVGPathElement", - "SVGPathSeg", - "SVGPathSegArcAbs", - "SVGPathSegArcRel", - "SVGPathSegClosePath", - "SVGPathSegCurvetoCubicAbs", - "SVGPathSegCurvetoCubicRel", - "SVGPathSegCurvetoCubicSmoothAbs", - "SVGPathSegCurvetoCubicSmoothRel", - "SVGPathSegCurvetoQuadraticAbs", - "SVGPathSegCurvetoQuadraticRel", - "SVGPathSegCurvetoQuadraticSmoothAbs", - "SVGPathSegCurvetoQuadraticSmoothRel", - "SVGPathSegLinetoAbs", - "SVGPathSegLinetoHorizontalAbs", - "SVGPathSegLinetoHorizontalRel", - "SVGPathSegLinetoRel", - "SVGPathSegLinetoVerticalAbs", - "SVGPathSegLinetoVerticalRel", - "SVGPathSegList", - "SVGPathSegMovetoAbs", - "SVGPathSegMovetoRel", - "SVGPatternElement", - "SVGPoint", - "SVGPointList", - "SVGPolygonElement", - "SVGPolylineElement", - "SVGPreserveAspectRatio", - "SVGRadialGradientElement", - "SVGRect", - "SVGRectElement", - "SVGRenderingIntent", - "SVGSVGElement", - "SVGScriptElement", - "SVGSetElement", - "SVGStopElement", - "SVGStringList", - "SVGStyleElement", - "SVGSwitchElement", - "SVGSymbolElement", - "SVGTRefElement", - "SVGTSpanElement", - "SVGTextContentElement", - "SVGTextElement", - "SVGTextPathElement", - "SVGTextPositioningElement", - "SVGTitleElement", - "SVGTransform", - "SVGTransformList", - "SVGUnitTypes", - "SVGUseElement", - "SVGVKernElement", - "SVGViewElement", - "SVGViewSpec", - "SVGZoomAndPan", - "SVGZoomEvent", - "SVG_ANGLETYPE_DEG", - "SVG_ANGLETYPE_GRAD", - "SVG_ANGLETYPE_RAD", - "SVG_ANGLETYPE_UNKNOWN", - "SVG_ANGLETYPE_UNSPECIFIED", - "SVG_CHANNEL_A", - "SVG_CHANNEL_B", - "SVG_CHANNEL_G", - "SVG_CHANNEL_R", - "SVG_CHANNEL_UNKNOWN", - "SVG_COLORTYPE_CURRENTCOLOR", - "SVG_COLORTYPE_RGBCOLOR", - "SVG_COLORTYPE_RGBCOLOR_ICCCOLOR", - "SVG_COLORTYPE_UNKNOWN", - "SVG_EDGEMODE_DUPLICATE", - "SVG_EDGEMODE_NONE", - "SVG_EDGEMODE_UNKNOWN", - "SVG_EDGEMODE_WRAP", - "SVG_FEBLEND_MODE_COLOR", - "SVG_FEBLEND_MODE_COLOR_BURN", - "SVG_FEBLEND_MODE_COLOR_DODGE", - "SVG_FEBLEND_MODE_DARKEN", - "SVG_FEBLEND_MODE_DIFFERENCE", - "SVG_FEBLEND_MODE_EXCLUSION", - "SVG_FEBLEND_MODE_HARD_LIGHT", - "SVG_FEBLEND_MODE_HUE", - "SVG_FEBLEND_MODE_LIGHTEN", - "SVG_FEBLEND_MODE_LUMINOSITY", - "SVG_FEBLEND_MODE_MULTIPLY", - "SVG_FEBLEND_MODE_NORMAL", - "SVG_FEBLEND_MODE_OVERLAY", - "SVG_FEBLEND_MODE_SATURATION", - "SVG_FEBLEND_MODE_SCREEN", - "SVG_FEBLEND_MODE_SOFT_LIGHT", - "SVG_FEBLEND_MODE_UNKNOWN", - "SVG_FECOLORMATRIX_TYPE_HUEROTATE", - "SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA", - "SVG_FECOLORMATRIX_TYPE_MATRIX", - "SVG_FECOLORMATRIX_TYPE_SATURATE", - "SVG_FECOLORMATRIX_TYPE_UNKNOWN", - "SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE", - "SVG_FECOMPONENTTRANSFER_TYPE_GAMMA", - "SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY", - "SVG_FECOMPONENTTRANSFER_TYPE_LINEAR", - "SVG_FECOMPONENTTRANSFER_TYPE_TABLE", - "SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN", - "SVG_FECOMPOSITE_OPERATOR_ARITHMETIC", - "SVG_FECOMPOSITE_OPERATOR_ATOP", - "SVG_FECOMPOSITE_OPERATOR_IN", - "SVG_FECOMPOSITE_OPERATOR_OUT", - "SVG_FECOMPOSITE_OPERATOR_OVER", - "SVG_FECOMPOSITE_OPERATOR_UNKNOWN", - "SVG_FECOMPOSITE_OPERATOR_XOR", - "SVG_INVALID_VALUE_ERR", - "SVG_LENGTHTYPE_CM", - "SVG_LENGTHTYPE_EMS", - "SVG_LENGTHTYPE_EXS", - "SVG_LENGTHTYPE_IN", - "SVG_LENGTHTYPE_MM", - "SVG_LENGTHTYPE_NUMBER", - "SVG_LENGTHTYPE_PC", - "SVG_LENGTHTYPE_PERCENTAGE", - "SVG_LENGTHTYPE_PT", - "SVG_LENGTHTYPE_PX", - "SVG_LENGTHTYPE_UNKNOWN", - "SVG_MARKERUNITS_STROKEWIDTH", - "SVG_MARKERUNITS_UNKNOWN", - "SVG_MARKERUNITS_USERSPACEONUSE", - "SVG_MARKER_ORIENT_ANGLE", - "SVG_MARKER_ORIENT_AUTO", - "SVG_MARKER_ORIENT_UNKNOWN", - "SVG_MASKTYPE_ALPHA", - "SVG_MASKTYPE_LUMINANCE", - "SVG_MATRIX_NOT_INVERTABLE", - "SVG_MEETORSLICE_MEET", - "SVG_MEETORSLICE_SLICE", - "SVG_MEETORSLICE_UNKNOWN", - "SVG_MORPHOLOGY_OPERATOR_DILATE", - "SVG_MORPHOLOGY_OPERATOR_ERODE", - "SVG_MORPHOLOGY_OPERATOR_UNKNOWN", - "SVG_PAINTTYPE_CURRENTCOLOR", - "SVG_PAINTTYPE_NONE", - "SVG_PAINTTYPE_RGBCOLOR", - "SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR", - "SVG_PAINTTYPE_UNKNOWN", - "SVG_PAINTTYPE_URI", - "SVG_PAINTTYPE_URI_CURRENTCOLOR", - "SVG_PAINTTYPE_URI_NONE", - "SVG_PAINTTYPE_URI_RGBCOLOR", - "SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR", - "SVG_PRESERVEASPECTRATIO_NONE", - "SVG_PRESERVEASPECTRATIO_UNKNOWN", - "SVG_PRESERVEASPECTRATIO_XMAXYMAX", - "SVG_PRESERVEASPECTRATIO_XMAXYMID", - "SVG_PRESERVEASPECTRATIO_XMAXYMIN", - "SVG_PRESERVEASPECTRATIO_XMIDYMAX", - "SVG_PRESERVEASPECTRATIO_XMIDYMID", - "SVG_PRESERVEASPECTRATIO_XMIDYMIN", - "SVG_PRESERVEASPECTRATIO_XMINYMAX", - "SVG_PRESERVEASPECTRATIO_XMINYMID", - "SVG_PRESERVEASPECTRATIO_XMINYMIN", - "SVG_SPREADMETHOD_PAD", - "SVG_SPREADMETHOD_REFLECT", - "SVG_SPREADMETHOD_REPEAT", - "SVG_SPREADMETHOD_UNKNOWN", - "SVG_STITCHTYPE_NOSTITCH", - "SVG_STITCHTYPE_STITCH", - "SVG_STITCHTYPE_UNKNOWN", - "SVG_TRANSFORM_MATRIX", - "SVG_TRANSFORM_ROTATE", - "SVG_TRANSFORM_SCALE", - "SVG_TRANSFORM_SKEWX", - "SVG_TRANSFORM_SKEWY", - "SVG_TRANSFORM_TRANSLATE", - "SVG_TRANSFORM_UNKNOWN", - "SVG_TURBULENCE_TYPE_FRACTALNOISE", - "SVG_TURBULENCE_TYPE_TURBULENCE", - "SVG_TURBULENCE_TYPE_UNKNOWN", - "SVG_UNIT_TYPE_OBJECTBOUNDINGBOX", - "SVG_UNIT_TYPE_UNKNOWN", - "SVG_UNIT_TYPE_USERSPACEONUSE", - "SVG_WRONG_TYPE_ERR", - "SVG_ZOOMANDPAN_DISABLE", - "SVG_ZOOMANDPAN_MAGNIFY", - "SVG_ZOOMANDPAN_UNKNOWN", - "SYNC_CONDITION", - "SYNC_FENCE", - "SYNC_FLAGS", - "SYNC_FLUSH_COMMANDS_BIT", - "SYNC_GPU_COMMANDS_COMPLETE", - "SYNC_STATUS", - "SYNTAX_ERR", - "SavedPages", - "Screen", - "ScreenOrientation", - "Script", - "ScriptEngine", - "ScriptEngineBuildVersion", - "ScriptEngineMajorVersion", - "ScriptEngineMinorVersion", - "ScriptProcessorNode", - "ScrollAreaEvent", - "SecurityPolicyViolationEvent", - "Selection", - "Sensor", - "SensorErrorEvent", - "ServiceWorker", - "ServiceWorkerContainer", - "ServiceWorkerMessageEvent", - "ServiceWorkerRegistration", - "SessionDescription", - "Set", - "ShadowRoot", - "SharedArrayBuffer", - "SharedWorker", - "SimpleGestureEvent", - "SourceBuffer", - "SourceBufferList", - "SpeechSynthesis", - "SpeechSynthesisErrorEvent", - "SpeechSynthesisEvent", - "SpeechSynthesisUtterance", - "SpeechSynthesisVoice", - "StaticRange", - "StereoPannerNode", - "StopIteration", - "Storage", - "StorageEvent", - "StorageManager", - "String", - "StyleMedia", - "StylePropertyMap", - "StylePropertyMapReadOnly", - "StyleSheet", - "StyleSheetList", - "StyleSheetPageList", - "SubmitEvent", - "SubtleCrypto", - "Symbol", - "SyncManager", - "SyntaxError", - "TEMPORARY", - "TEXTPATH_METHODTYPE_ALIGN", - "TEXTPATH_METHODTYPE_STRETCH", - "TEXTPATH_METHODTYPE_UNKNOWN", - "TEXTPATH_SPACINGTYPE_AUTO", - "TEXTPATH_SPACINGTYPE_EXACT", - "TEXTPATH_SPACINGTYPE_UNKNOWN", - "TEXTURE", - "TEXTURE0", - "TEXTURE1", - "TEXTURE10", - "TEXTURE11", - "TEXTURE12", - "TEXTURE13", - "TEXTURE14", - "TEXTURE15", - "TEXTURE16", - "TEXTURE17", - "TEXTURE18", - "TEXTURE19", - "TEXTURE2", - "TEXTURE20", - "TEXTURE21", - "TEXTURE22", - "TEXTURE23", - "TEXTURE24", - "TEXTURE25", - "TEXTURE26", - "TEXTURE27", - "TEXTURE28", - "TEXTURE29", - "TEXTURE3", - "TEXTURE30", - "TEXTURE31", - "TEXTURE4", - "TEXTURE5", - "TEXTURE6", - "TEXTURE7", - "TEXTURE8", - "TEXTURE9", - "TEXTURE_2D", - "TEXTURE_2D_ARRAY", - "TEXTURE_3D", - "TEXTURE_BASE_LEVEL", - "TEXTURE_BINDING_2D", - "TEXTURE_BINDING_2D_ARRAY", - "TEXTURE_BINDING_3D", - "TEXTURE_BINDING_CUBE_MAP", - "TEXTURE_COMPARE_FUNC", - "TEXTURE_COMPARE_MODE", - "TEXTURE_CUBE_MAP", - "TEXTURE_CUBE_MAP_NEGATIVE_X", - "TEXTURE_CUBE_MAP_NEGATIVE_Y", - "TEXTURE_CUBE_MAP_NEGATIVE_Z", - "TEXTURE_CUBE_MAP_POSITIVE_X", - "TEXTURE_CUBE_MAP_POSITIVE_Y", - "TEXTURE_CUBE_MAP_POSITIVE_Z", - "TEXTURE_IMMUTABLE_FORMAT", - "TEXTURE_IMMUTABLE_LEVELS", - "TEXTURE_MAG_FILTER", - "TEXTURE_MAX_ANISOTROPY_EXT", - "TEXTURE_MAX_LEVEL", - "TEXTURE_MAX_LOD", - "TEXTURE_MIN_FILTER", - "TEXTURE_MIN_LOD", - "TEXTURE_WRAP_R", - "TEXTURE_WRAP_S", - "TEXTURE_WRAP_T", - "TEXT_NODE", - "THROTTLED", - "TIMEOUT", - "TIMEOUT_ERR", - "TIMEOUT_EXPIRED", - "TIMEOUT_IGNORED", - "TOO_LARGE_ERR", - "TRANSACTION_INACTIVE_ERR", - "TRANSFORM_FEEDBACK", - "TRANSFORM_FEEDBACK_ACTIVE", - "TRANSFORM_FEEDBACK_BINDING", - "TRANSFORM_FEEDBACK_BUFFER", - "TRANSFORM_FEEDBACK_BUFFER_BINDING", - "TRANSFORM_FEEDBACK_BUFFER_MODE", - "TRANSFORM_FEEDBACK_BUFFER_SIZE", - "TRANSFORM_FEEDBACK_BUFFER_START", - "TRANSFORM_FEEDBACK_PAUSED", - "TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN", - "TRANSFORM_FEEDBACK_VARYINGS", - "TRIANGLE", - "TRIANGLES", - "TRIANGLE_FAN", - "TRIANGLE_STRIP", - "TYPE_BACK_FORWARD", - "TYPE_ERR", - "TYPE_MISMATCH_ERR", - "TYPE_NAVIGATE", - "TYPE_RELOAD", - "TYPE_RESERVED", - "Table", - "TaskAttributionTiming", - "Text", - "TextDecoder", - "TextDecoderStream", - "TextEncoder", - "TextEncoderStream", - "TextEvent", - "TextMetrics", - "TextRange", - "TextRangeCollection", - "TextTrack", - "TextTrackCue", - "TextTrackCueList", - "TextTrackList", - "TimeEvent", - "TimeRanges", - "Touch", - "TouchEvent", - "TouchList", - "TrackEvent", - "TransformStream", - "TransitionEvent", - "TreeWalker", - "TrustedHTML", - "TrustedScript", - "TrustedScriptURL", - "TrustedTypePolicy", - "TrustedTypePolicyFactory", - "TypeError", - "U2F", - "UIEvent", - "UNCACHED", - "UNIFORM_ARRAY_STRIDE", - "UNIFORM_BLOCK_ACTIVE_UNIFORMS", - "UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES", - "UNIFORM_BLOCK_BINDING", - "UNIFORM_BLOCK_DATA_SIZE", - "UNIFORM_BLOCK_INDEX", - "UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER", - "UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER", - "UNIFORM_BUFFER", - "UNIFORM_BUFFER_BINDING", - "UNIFORM_BUFFER_OFFSET_ALIGNMENT", - "UNIFORM_BUFFER_SIZE", - "UNIFORM_BUFFER_START", - "UNIFORM_IS_ROW_MAJOR", - "UNIFORM_MATRIX_STRIDE", - "UNIFORM_OFFSET", - "UNIFORM_SIZE", - "UNIFORM_TYPE", - "UNKNOWN_ERR", - "UNKNOWN_RULE", - "UNMASKED_RENDERER_WEBGL", - "UNMASKED_VENDOR_WEBGL", - "UNORDERED_NODE_ITERATOR_TYPE", - "UNORDERED_NODE_SNAPSHOT_TYPE", - "UNPACK_ALIGNMENT", - "UNPACK_COLORSPACE_CONVERSION_WEBGL", - "UNPACK_FLIP_Y_WEBGL", - "UNPACK_IMAGE_HEIGHT", - "UNPACK_PREMULTIPLY_ALPHA_WEBGL", - "UNPACK_ROW_LENGTH", - "UNPACK_SKIP_IMAGES", - "UNPACK_SKIP_PIXELS", - "UNPACK_SKIP_ROWS", - "UNSCHEDULED_STATE", - "UNSENT", - "UNSIGNALED", - "UNSIGNED_BYTE", - "UNSIGNED_INT", - "UNSIGNED_INT_10F_11F_11F_REV", - "UNSIGNED_INT_24_8", - "UNSIGNED_INT_2_10_10_10_REV", - "UNSIGNED_INT_5_9_9_9_REV", - "UNSIGNED_INT_SAMPLER_2D", - "UNSIGNED_INT_SAMPLER_2D_ARRAY", - "UNSIGNED_INT_SAMPLER_3D", - "UNSIGNED_INT_SAMPLER_CUBE", - "UNSIGNED_INT_VEC2", - "UNSIGNED_INT_VEC3", - "UNSIGNED_INT_VEC4", - "UNSIGNED_NORMALIZED", - "UNSIGNED_SHORT", - "UNSIGNED_SHORT_4_4_4_4", - "UNSIGNED_SHORT_5_5_5_1", - "UNSIGNED_SHORT_5_6_5", - "UNSPECIFIED_EVENT_TYPE_ERR", - "UPDATE", - "UPDATEREADY", - "UPDATE_AVAILABLE", - "URIError", - "URL", - "URLSearchParams", - "URLUnencoded", - "URL_MISMATCH_ERR", - "USB", - "USBAlternateInterface", - "USBConfiguration", - "USBConnectionEvent", - "USBDevice", - "USBEndpoint", - "USBInTransferResult", - "USBInterface", - "USBIsochronousInTransferPacket", - "USBIsochronousInTransferResult", - "USBIsochronousOutTransferPacket", - "USBIsochronousOutTransferResult", - "USBOutTransferResult", - "UTC", - "Uint16Array", - "Uint32Array", - "Uint8Array", - "Uint8ClampedArray", - "UserActivation", - "UserMessageHandler", - "UserMessageHandlersNamespace", - "UserProximityEvent", - "VALIDATE_STATUS", - "VALIDATION_ERR", - "VARIABLES_RULE", - "VBArray", - "VENDOR", - "VERSION", - "VERSION_CHANGE", - "VERSION_ERR", - "VERTEX_ARRAY_BINDING", - "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", - "VERTEX_ATTRIB_ARRAY_DIVISOR", - "VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE", - "VERTEX_ATTRIB_ARRAY_ENABLED", - "VERTEX_ATTRIB_ARRAY_INTEGER", - "VERTEX_ATTRIB_ARRAY_NORMALIZED", - "VERTEX_ATTRIB_ARRAY_POINTER", - "VERTEX_ATTRIB_ARRAY_SIZE", - "VERTEX_ATTRIB_ARRAY_STRIDE", - "VERTEX_ATTRIB_ARRAY_TYPE", - "VERTEX_SHADER", - "VERTICAL", - "VERTICAL_AXIS", - "VER_ERR", - "VIEWPORT", - "VIEWPORT_RULE", - "VRDisplay", - "VRDisplayCapabilities", - "VRDisplayEvent", - "VREyeParameters", - "VRFieldOfView", - "VRFrameData", - "VRPose", - "VRStageParameters", - "VTTCue", - "VTTRegion", - "ValidityState", - "VideoPlaybackQuality", - "VideoStreamTrack", - "VideoTrack", - "VideoTrackList", - "VisualViewport", - "WAIT_FAILED", - "WEBGL_compressed_texture_s3tc", - "WEBGL_debug_renderer_info", - "WEBKIT_FILTER_RULE", - "WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN", - "WEBKIT_FORCE_AT_MOUSE_DOWN", - "WEBKIT_KEYFRAMES_RULE", - "WEBKIT_KEYFRAME_RULE", - "WEBKIT_REGION_RULE", - "WIN", - "WRONG_DOCUMENT_ERR", - "WakeLock", - "WakeLockSentinel", - "WaveShaperNode", - "WeakMap", - "WeakRef", - "WeakSet", - "WebAssembly", - "WebGL2RenderingContext", - "WebGLActiveInfo", - "WebGLBuffer", - "WebGLContextEvent", - "WebGLFramebuffer", - "WebGLObject", - "WebGLProgram", - "WebGLQuery", - "WebGLRenderbuffer", - "WebGLRenderingContext", - "WebGLSampler", - "WebGLShader", - "WebGLShaderPrecisionFormat", - "WebGLSync", - "WebGLTexture", - "WebGLTransformFeedback", - "WebGLUniformLocation", - "WebGLVertexArray", - "WebGLVertexArrayObject", - "WebKit built-in PDF", - "WebKitAnimationEvent", - "WebKitBlobBuilder", - "WebKitCSSFilterRule", - "WebKitCSSFilterValue", - "WebKitCSSKeyframeRule", - "WebKitCSSKeyframesRule", - "WebKitCSSMatrix", - "WebKitCSSRegionRule", - "WebKitCSSTransformValue", - "WebKitDataCue", - "WebKitGamepad", - "WebKitMediaKeyError", - "WebKitMediaKeyMessageEvent", - "WebKitMediaKeyNeededEvent", - "WebKitMediaKeySession", - "WebKitMediaKeys", - "WebKitMediaSource", - "WebKitMutationObserver", - "WebKitNamespace", - "WebKitPlaybackTargetAvailabilityEvent", - "WebKitPoint", - "WebKitShadowRoot", - "WebKitSourceBuffer", - "WebKitSourceBufferList", - "WebKitTransitionEvent", - "WebSocket", - "WebkitAlignContent", - "WebkitAlignItems", - "WebkitAlignSelf", - "WebkitAnimation", - "WebkitAnimationDelay", - "WebkitAnimationDirection", - "WebkitAnimationDuration", - "WebkitAnimationFillMode", - "WebkitAnimationIterationCount", - "WebkitAnimationName", - "WebkitAnimationPlayState", - "WebkitAnimationTimingFunction", - "WebkitAppearance", - "WebkitBackfaceVisibility", - "WebkitBackgroundClip", - "WebkitBackgroundOrigin", - "WebkitBackgroundSize", - "WebkitBorderBottomLeftRadius", - "WebkitBorderBottomRightRadius", - "WebkitBorderImage", - "WebkitBorderRadius", - "WebkitBorderTopLeftRadius", - "WebkitBorderTopRightRadius", - "WebkitBoxAlign", - "WebkitBoxDirection", - "WebkitBoxFlex", - "WebkitBoxOrdinalGroup", - "WebkitBoxOrient", - "WebkitBoxPack", - "WebkitBoxShadow", - "WebkitBoxSizing", - "WebkitFilter", - "WebkitFlex", - "WebkitFlexBasis", - "WebkitFlexDirection", - "WebkitFlexFlow", - "WebkitFlexGrow", - "WebkitFlexShrink", - "WebkitFlexWrap", - "WebkitJustifyContent", - "WebkitLineClamp", - "WebkitMask", - "WebkitMaskClip", - "WebkitMaskComposite", - "WebkitMaskImage", - "WebkitMaskOrigin", - "WebkitMaskPosition", - "WebkitMaskPositionX", - "WebkitMaskPositionY", - "WebkitMaskRepeat", - "WebkitMaskSize", - "WebkitOrder", - "WebkitPerspective", - "WebkitPerspectiveOrigin", - "WebkitTextFillColor", - "WebkitTextSizeAdjust", - "WebkitTextStroke", - "WebkitTextStrokeColor", - "WebkitTextStrokeWidth", - "WebkitTransform", - "WebkitTransformOrigin", - "WebkitTransformStyle", - "WebkitTransition", - "WebkitTransitionDelay", - "WebkitTransitionDuration", - "WebkitTransitionProperty", - "WebkitTransitionTimingFunction", - "WebkitUserSelect", - "WheelEvent", - "Window", - "Windows Media Player Plug-in Dynamic Link Library", - "Windows Presentation Foundation", - "Worker", - "Worklet", - "WritableStream", - "WritableStreamDefaultWriter", - "X86_32", - "X86_64", - "XMLDocument", - "XMLHttpRequest", - "XMLHttpRequestEventTarget", - "XMLHttpRequestException", - "XMLHttpRequestProgressEvent", - "XMLHttpRequestUpload", - "XMLSerializer", - "XMLStylesheetProcessingInstruction", - "XPathEvaluator", - "XPathException", - "XPathExpression", - "XPathNSResolver", - "XPathResult", - "XR", - "XRBoundedReferenceSpace", - "XRDOMOverlayState", - "XRFrame", - "XRHitTestResult", - "XRHitTestSource", - "XRInputSource", - "XRInputSourceArray", - "XRInputSourceEvent", - "XRInputSourcesChangeEvent", - "XRLayer", - "XRPose", - "XRRay", - "XRReferenceSpace", - "XRReferenceSpaceEvent", - "XRRenderState", - "XRRigidTransform", - "XRSession", - "XRSessionEvent", - "XRSpace", - "XRSystem", - "XRTransientInputHitTestResult", - "XRTransientInputHitTestSource", - "XRView", - "XRViewerPose", - "XRViewport", - "XRWebGLLayer", - "XSLTProcessor", - "ZERO", - "_XD0M_", - "_YD0M_", - "__defineGetter__", - "__defineSetter__", - "__lookupGetter__", - "__lookupSetter__", - "__opera", - "__proto__", - "__relevantExtensionKeys", - "_browserjsran", - "a", - "aLink", - "abbr", - "abort", - "aborted", - "abs", - "absolute", - "acceleration", - "accelerationIncludingGravity", - "accelerator", - "accept", - "acceptCharset", - "acceptNode", - "accessKey", - "accessKeyLabel", - "accuracy", - "acos", - "acosh", - "action", - "actionURL", - "actions", - "activated", - "active", - "activeCues", - "activeElement", - "activeSourceBuffers", - "activeSourceCount", - "activeTexture", - "activeVRDisplays", - "actualBoundingBoxAscent", - "actualBoundingBoxDescent", - "actualBoundingBoxLeft", - "actualBoundingBoxRight", - "add", - "addAll", - "addBehavior", - "addCandidate", - "addColorStop", - "addCue", - "addElement", - "addEventListener", - "addFilter", - "addFromString", - "addFromUri", - "addIceCandidate", - "addImport", - "addListener", - "addModule", - "addNamed", - "addPageRule", - "addPath", - "addPointer", - "addRange", - "addRegion", - "addRule", - "addRules", - "addSearchEngine", - "addSourceBuffer", - "addStream", - "addTextTrack", - "addTrack", - "addTransceiver", - "addWakeLockListener", - "added", - "addedNodes", - "additionalName", - "additiveSymbols", - "addons", - "address", - "addressLine", - "adoptNode", - "adoptText", - "adoptedCallback", - "adoptedStyleSheets", - "adr", - "advance", - "after", - "album", - "alert", - "algorithm", - "align", - "align-content", - "align-items", - "align-self", - "alignContent", - "alignItems", - "alignSelf", - "alignmentBaseline", - "alinkColor", - "all", - "allSettled", - "allow", - "allowFullscreen", - "allowPaymentRequest", - "allowTransparency", - "allowedDirections", - "allowedFeatures", - "allowsFeature", - "alpha", - "alphabeticBaseline", - "alt", - "altGraphKey", - "altHtml", - "altKey", - "altLeft", - "alternate", - "alternateSetting", - "alternates", - "altitude", - "altitudeAccuracy", - "amplitude", - "ancestorOrigins", - "anchor", - "anchorNode", - "anchorOffset", - "anchors", - "and", - "angle", - "angularAcceleration", - "angularVelocity", - "animVal", - "animate", - "animatedInstanceRoot", - "animatedNormalizedPathSegList", - "animatedPathSegList", - "animatedPoints", - "animation", - "animation-delay", - "animation-direction", - "animation-duration", - "animation-fill-mode", - "animation-iteration-count", - "animation-name", - "animation-play-state", - "animation-timing-function", - "animationDelay", - "animationDirection", - "animationDuration", - "animationFillMode", - "animationIterationCount", - "animationName", - "animationPlayState", - "animationStartTime", - "animationTimingFunction", - "animationsPaused", - "anniversary", - "antialias", - "any", - "app", - "appCodeName", - "appMinorVersion", - "appName", - "appNotifications", - "appVersion", - "appearance", - "append", - "appendBuffer", - "appendChild", - "appendData", - "appendItem", - "appendMedium", - "appendNamed", - "appendRule", - "appendStream", - "appendWindowEnd", - "appendWindowStart", - "appleTrailingWord", - "applets", - "application/apple-default-browser", - "application/asx", - "application/java-deployment-toolkit", - "application/pdf", - "application/postscript", - "application/x-drm", - "application/x-drm-v2", - "application/x-google-chrome-pdf", - "application/x-java-applet", - "application/x-java-applet;deploy=10.25.2", - "application/x-java-applet;javafx=2.2.25", - "application/x-java-applet;jpi-version=1.7.0_25", - "application/x-java-applet;version=1.1", - "application/x-java-applet;version=1.1.1", - "application/x-java-applet;version=1.1.2", - "application/x-java-applet;version=1.1.3", - "application/x-java-applet;version=1.2", - "application/x-java-applet;version=1.2.1", - "application/x-java-applet;version=1.2.2", - "application/x-java-applet;version=1.3", - "application/x-java-applet;version=1.3.1", - "application/x-java-applet;version=1.4", - "application/x-java-applet;version=1.4.1", - "application/x-java-applet;version=1.4.2", - "application/x-java-applet;version=1.5", - "application/x-java-applet;version=1.6", - "application/x-java-applet;version=1.7", - "application/x-java-bean", - "application/x-java-bean;jpi-version=1.7.0_25", - "application/x-java-bean;version=1.1", - "application/x-java-bean;version=1.1.1", - "application/x-java-bean;version=1.1.2", - "application/x-java-bean;version=1.1.3", - "application/x-java-bean;version=1.2", - "application/x-java-bean;version=1.2.1", - "application/x-java-bean;version=1.2.2", - "application/x-java-bean;version=1.3", - "application/x-java-bean;version=1.3.1", - "application/x-java-bean;version=1.4", - "application/x-java-bean;version=1.4.1", - "application/x-java-bean;version=1.4.2", - "application/x-java-bean;version=1.5", - "application/x-java-bean;version=1.6", - "application/x-java-bean;version=1.7", - "application/x-java-vm", - "application/x-java-vm-npruntime", - "application/x-mplayer2", - "application/x-ms-xbap", - "application/x-nacl", - "application/x-pnacl", - "application/xaml+xml", - "applicationCache", - "applicationServerKey", - "apply", - "applyConstraints", - "applyElement", - "arc", - "arcTo", - "archive", - "areas", - "arguments", - "aria-activedescendant", - "aria-busy", - "aria-checked", - "aria-controls", - "aria-describedby", - "aria-disabled", - "aria-expanded", - "aria-flowto", - "aria-haspopup", - "aria-hidden", - "aria-invalid", - "aria-labelledby", - "aria-level", - "aria-live", - "aria-multiselectable", - "aria-owns", - "aria-posinset", - "aria-pressed", - "aria-readonly", - "aria-relevant", - "aria-required", - "aria-secret", - "aria-selected", - "aria-setsize", - "aria-valuemax", - "aria-valuemin", - "aria-valuenow", - "ariaAtomic", - "ariaAutoComplete", - "ariaBusy", - "ariaChecked", - "ariaColCount", - "ariaColIndex", - "ariaColSpan", - "ariaCurrent", - "ariaDescription", - "ariaDisabled", - "ariaExpanded", - "ariaHasPopup", - "ariaHidden", - "ariaKeyShortcuts", - "ariaLabel", - "ariaLevel", - "ariaLive", - "ariaModal", - "ariaMultiLine", - "ariaMultiSelectable", - "ariaOrientation", - "ariaPlaceholder", - "ariaPosInSet", - "ariaPressed", - "ariaReadOnly", - "ariaRelevant", - "ariaRequired", - "ariaRoleDescription", - "ariaRowCount", - "ariaRowIndex", - "ariaRowSpan", - "ariaSelected", - "ariaSetSize", - "ariaSort", - "ariaValueMax", - "ariaValueMin", - "ariaValueNow", - "ariaValueText", - "arrayBuffer", - "artist", - "artwork", - "as", - "asIntN", - "asUintN", - "asin", - "asinh", - "assert", - "assign", - "assignedElements", - "assignedNodes", - "assignedSlot", - "async", - "asyncIterator", - "atEnd", - "atan", - "atan2", - "atanh", - "atob", - "atomic", - "attachEvent", - "attachInternals", - "attachShader", - "attachShadow", - "attachments", - "attack", - "attestationObject", - "attrChange", - "attrName", - "attributeChangedCallback", - "attributeFilter", - "attributeName", - "attributeNamespace", - "attributeOldValue", - "attributeStyleMap", - "attributes", - "attribution", - "audio/x-ms-wax", - "audio/x-ms-wma", - "audioBitsPerSecond", - "audioTracks", - "audioWorklet", - "authenticatedSignedWrites", - "authenticatorData", - "autoIncrement", - "autobuffer", - "autocapitalize", - "autocomplete", - "autocorrect", - "autofocus", - "automationRate", - "autoplay", - "availHeight", - "availLeft", - "availTop", - "availWidth", - "availability", - "available", - "aversion", - "ax", - "axes", - "axis", - "ay", - "azimuth", - "b", - "back", - "backdropFilter", - "backface-visibility", - "backfaceVisibility", - "background", - "background-attachment", - "background-blend-mode", - "background-clip", - "background-color", - "background-image", - "background-origin", - "background-position", - "background-position-x", - "background-position-y", - "background-repeat", - "background-size", - "backgroundAttachment", - "backgroundBlendMode", - "backgroundClip", - "backgroundColor", - "backgroundFetch", - "backgroundImage", - "backgroundOrigin", - "backgroundPosition", - "backgroundPositionX", - "backgroundPositionY", - "backgroundRepeat", - "backgroundRepeatX", - "backgroundRepeatY", - "backgroundSize", - "badInput", - "badge", - "balance", - "baseFrequencyX", - "baseFrequencyY", - "baseLatency", - "baseLayer", - "baseName", - "baseNode", - "baseOffset", - "baseURI", - "baseVal", - "baselineShift", - "battery", - "bday", - "before", - "beginElement", - "beginElementAt", - "beginPath", - "beginQuery", - "beginTransformFeedback", - "behavior", - "behaviorCookie", - "behaviorPart", - "behaviorUrns", - "beta", - "bezierCurveTo", - "bgColor", - "bgProperties", - "bias", - "big", - "binaryType", - "bind", - "bindAttribLocation", - "bindBuffer", - "bindBufferBase", - "bindBufferRange", - "bindFramebuffer", - "bindRenderbuffer", - "bindSampler", - "bindTexture", - "bindTransformFeedback", - "bindVertexArray", - "blendColor", - "blendEquation", - "blendEquationSeparate", - "blendFunc", - "blendFuncSeparate", - "blink", - "blitFramebuffer", - "blob", - "block-size", - "blockDirection", - "blockSize", - "blockedURI", - "blue", - "bluetooth", - "blur", - "body", - "bodyUsed", - "bold", - "bookmarks", - "booleanValue", - "border", - "border-block", - "border-block-color", - "border-block-end", - "border-block-end-color", - "border-block-end-style", - "border-block-end-width", - "border-block-start", - "border-block-start-color", - "border-block-start-style", - "border-block-start-width", - "border-block-style", - "border-block-width", - "border-bottom", - "border-bottom-color", - "border-bottom-left-radius", - "border-bottom-right-radius", - "border-bottom-style", - "border-bottom-width", - "border-collapse", - "border-color", - "border-end-end-radius", - "border-end-start-radius", - "border-image", - "border-image-outset", - "border-image-repeat", - "border-image-slice", - "border-image-source", - "border-image-width", - "border-inline", - "border-inline-color", - "border-inline-end", - "border-inline-end-color", - "border-inline-end-style", - "border-inline-end-width", - "border-inline-start", - "border-inline-start-color", - "border-inline-start-style", - "border-inline-start-width", - "border-inline-style", - "border-inline-width", - "border-left", - "border-left-color", - "border-left-style", - "border-left-width", - "border-radius", - "border-right", - "border-right-color", - "border-right-style", - "border-right-width", - "border-spacing", - "border-start-end-radius", - "border-start-start-radius", - "border-style", - "border-top", - "border-top-color", - "border-top-left-radius", - "border-top-right-radius", - "border-top-style", - "border-top-width", - "border-width", - "borderBlock", - "borderBlockColor", - "borderBlockEnd", - "borderBlockEndColor", - "borderBlockEndStyle", - "borderBlockEndWidth", - "borderBlockStart", - "borderBlockStartColor", - "borderBlockStartStyle", - "borderBlockStartWidth", - "borderBlockStyle", - "borderBlockWidth", - "borderBottom", - "borderBottomColor", - "borderBottomLeftRadius", - "borderBottomRightRadius", - "borderBottomStyle", - "borderBottomWidth", - "borderBoxSize", - "borderCollapse", - "borderColor", - "borderColorDark", - "borderColorLight", - "borderEndEndRadius", - "borderEndStartRadius", - "borderImage", - "borderImageOutset", - "borderImageRepeat", - "borderImageSlice", - "borderImageSource", - "borderImageWidth", - "borderInline", - "borderInlineColor", - "borderInlineEnd", - "borderInlineEndColor", - "borderInlineEndStyle", - "borderInlineEndWidth", - "borderInlineStart", - "borderInlineStartColor", - "borderInlineStartStyle", - "borderInlineStartWidth", - "borderInlineStyle", - "borderInlineWidth", - "borderLeft", - "borderLeftColor", - "borderLeftStyle", - "borderLeftWidth", - "borderRadius", - "borderRight", - "borderRightColor", - "borderRightStyle", - "borderRightWidth", - "borderSpacing", - "borderStartEndRadius", - "borderStartStartRadius", - "borderStyle", - "borderTop", - "borderTopColor", - "borderTopLeftRadius", - "borderTopRightRadius", - "borderTopStyle", - "borderTopWidth", - "borderWidth", - "bottom", - "bottomMargin", - "bound", - "boundElements", - "boundingClientRect", - "boundingHeight", - "boundingLeft", - "boundingTop", - "boundingWidth", - "bounds", - "boundsGeometry", - "box-decoration-break", - "box-shadow", - "box-sizing", - "boxDecorationBreak", - "boxShadow", - "boxSizing", - "break-after", - "break-before", - "break-inside", - "breakAfter", - "breakBefore", - "breakInside", - "breakType", - "broadcast", - "browserLanguage", - "btoa", - "bubbles", - "buffer", - "bufferData", - "bufferDepth", - "bufferSize", - "bufferSubData", - "buffered", - "bufferedAmount", - "bufferedAmountLowThreshold", - "bufferedRendering", - "buildID", - "buildNumber", - "button", - "buttonID", - "buttons", - "byteLength", - "byteOffset", - "bytesWritten", - "c", - "cache", - "caches", - "calendar", - "call", - "caller", - "canBeFormatted", - "canBeMounted", - "canBeShared", - "canHaveChildren", - "canHaveHTML", - "canInsertDTMF", - "canMakePayment", - "canPlayType", - "canPresent", - "canTrickleIceCandidates", - "cancel", - "cancelAndHoldAtTime", - "cancelAnimationFrame", - "cancelBubble", - "cancelIdleCallback", - "cancelScheduledValues", - "cancelVideoFrameCallback", - "cancelWatchAvailability", - "cancelable", - "candidate", - "canonicalUUID", - "canvas", - "capabilities", - "caption", - "caption-side", - "captionSide", - "capture", - "captureEvents", - "captureStackTrace", - "captureStream", - "caret-color", - "caretBidiLevel", - "caretColor", - "caretPositionFromPoint", - "caretRangeFromPoint", - "caseFirst", - "cast", - "catch", - "category", - "cbrt", - "cd", - "ceil", - "cellIndex", - "cellPadding", - "cellSpacing", - "cells", - "ch", - "chOff", - "chain", - "challenge", - "changeType", - "changeVersion", - "changedTouches", - "channel", - "channelCount", - "channelCountMode", - "channelInterpretation", - "char", - "charAt", - "charCode", - "charCodeAt", - "charIndex", - "charLength", - "characterData", - "characterDataOldValue", - "characterSet", - "characteristic", - "charging", - "chargingTime", - "charset", - "check", - "checkEnclosure", - "checkFramebufferStatus", - "checkInstalled", - "checkIntersection", - "checkValidity", - "checked", - "childElementCount", - "childList", - "childNodes", - "children", - "chrome", - "ciphertext", - "cite", - "city", - "claimInterface", - "claimed", - "classList", - "className", - "classid", - "clear", - "clearAppBadge", - "clearAttributes", - "clearBufferfi", - "clearBufferfv", - "clearBufferiv", - "clearBufferuiv", - "clearColor", - "clearData", - "clearDepth", - "clearHalt", - "clearImmediate", - "clearInterval", - "clearLiveSeekableRange", - "clearMarks", - "clearMeasures", - "clearParameters", - "clearRect", - "clearResourceTimings", - "clearShadow", - "clearStencil", - "clearTimeout", - "clearWatch", - "click", - "clickCount", - "clientDataJSON", - "clientHeight", - "clientInformation", - "clientLeft", - "clientRect", - "clientRects", - "clientTop", - "clientWaitSync", - "clientWidth", - "clientX", - "clientY", - "clip", - "clip-path", - "clip-rule", - "clipBottom", - "clipLeft", - "clipPath", - "clipPathUnits", - "clipRight", - "clipRule", - "clipTop", - "clipboard", - "clipboardData", - "clone", - "cloneContents", - "cloneNode", - "cloneRange", - "close", - "closePath", - "closed", - "closest", - "clz", - "clz32", - "cm", - "cmp", - "code", - "codeBase", - "codePointAt", - "codeType", - "colSpan", - "collapse", - "collapseToEnd", - "collapseToStart", - "collapsed", - "collation", - "collect", - "colno", - "color", - "color-adjust", - "color-interpolation", - "color-interpolation-filters", - "colorAdjust", - "colorDepth", - "colorInterpolation", - "colorInterpolationFilters", - "colorMask", - "colorProfile", - "colorRendering", - "colorScheme", - "colorType", - "cols", - "column", - "column-count", - "column-fill", - "column-gap", - "column-rule", - "column-rule-color", - "column-rule-style", - "column-rule-width", - "column-span", - "column-width", - "columnCount", - "columnFill", - "columnGap", - "columnNumber", - "columnRule", - "columnRuleColor", - "columnRuleStyle", - "columnRuleWidth", - "columnSpan", - "columnWidth", - "columns", - "command", - "commit", - "commitLoadTime", - "commitPreferences", - "commitStyles", - "commonAncestorContainer", - "compact", - "compare", - "compareBoundaryPoints", - "compareDocumentPosition", - "compareEndPoints", - "compareExchange", - "compareNode", - "comparePoint", - "compatMode", - "compatible", - "compile", - "compileShader", - "compileStreaming", - "complete", - "component", - "componentFromPoint", - "composed", - "composedPath", - "composite", - "compositionEndOffset", - "compositionStartOffset", - "compressedTexImage2D", - "compressedTexImage3D", - "compressedTexSubImage2D", - "compressedTexSubImage3D", - "computedStyleMap", - "concat", - "conditionText", - "coneInnerAngle", - "coneOuterAngle", - "coneOuterGain", - "configuration", - "configurationName", - "configurationValue", - "configurations", - "confirm", - "confirmComposition", - "confirmSiteSpecificTrackingException", - "confirmWebWideTrackingException", - "connect", - "connectEnd", - "connectStart", - "connected", - "connectedCallback", - "connection", - "connectionInfo", - "connectionList", - "connectionSpeed", - "connectionState", - "connections", - "console", - "consoleHistory", - "consolidate", - "constraint", - "constrictionActive", - "construct", - "constructor", - "contactID", - "contain", - "containIntrinsicSize", - "containerId", - "containerName", - "containerSrc", - "containerType", - "contains", - "containsNode", - "content", - "contentBoxSize", - "contentDocument", - "contentEditable", - "contentHint", - "contentOverflow", - "contentRect", - "contentScriptType", - "contentStyleType", - "contentType", - "contentWindow", - "context", - "contextMenu", - "contextmenu", - "continue", - "continuePrimaryKey", - "continuous", - "control", - "controlTransferIn", - "controlTransferOut", - "controller", - "controls", - "controlsList", - "convertToBlob", - "convertToSpecifiedUnits", - "cookie", - "cookieEnabled", - "coords", - "copyBufferSubData", - "copyFromChannel", - "copyTexImage2D", - "copyTexSubImage2D", - "copyTexSubImage3D", - "copyToChannel", - "copyWithin", - "correspondingElement", - "correspondingUseElement", - "corruptedVideoFrames", - "cos", - "cosh", - "count", - "countReset", - "counter-increment", - "counter-reset", - "counter-set", - "counterIncrement", - "counterReset", - "counterSet", - "country", - "cpuClass", - "cpuSleepAllowed", - "create", - "createAnalyser", - "createAnswer", - "createAttribute", - "createAttributeNS", - "createBiquadFilter", - "createBuffer", - "createBufferSource", - "createCDATASection", - "createCSSStyleSheet", - "createCaption", - "createChannelMerger", - "createChannelSplitter", - "createComment", - "createConstantSource", - "createContextualFragment", - "createControlRange", - "createConvolver", - "createDTMFSender", - "createDataChannel", - "createDelay", - "createDelayNode", - "createDocument", - "createDocumentFragment", - "createDocumentType", - "createDynamicsCompressor", - "createElement", - "createElementNS", - "createEntityReference", - "createEvent", - "createEventObject", - "createExpression", - "createFramebuffer", - "createFunction", - "createGain", - "createGainNode", - "createHTML", - "createHTMLDocument", - "createIIRFilter", - "createImageBitmap", - "createImageData", - "createIndex", - "createJavaScriptNode", - "createLinearGradient", - "createMediaElementSource", - "createMediaKeys", - "createMediaStreamDestination", - "createMediaStreamSource", - "createMediaStreamTrackSource", - "createMutableFile", - "createNSResolver", - "createNodeIterator", - "createNotification", - "createObjectStore", - "createObjectURL", - "createOffer", - "createOscillator", - "createPanner", - "createPattern", - "createPeriodicWave", - "createPolicy", - "createPopup", - "createProcessingInstruction", - "createProgram", - "createQuery", - "createRadialGradient", - "createRange", - "createRangeCollection", - "createReader", - "createRenderbuffer", - "createSVGAngle", - "createSVGLength", - "createSVGMatrix", - "createSVGNumber", - "createSVGPathSegArcAbs", - "createSVGPathSegArcRel", - "createSVGPathSegClosePath", - "createSVGPathSegCurvetoCubicAbs", - "createSVGPathSegCurvetoCubicRel", - "createSVGPathSegCurvetoCubicSmoothAbs", - "createSVGPathSegCurvetoCubicSmoothRel", - "createSVGPathSegCurvetoQuadraticAbs", - "createSVGPathSegCurvetoQuadraticRel", - "createSVGPathSegCurvetoQuadraticSmoothAbs", - "createSVGPathSegCurvetoQuadraticSmoothRel", - "createSVGPathSegLinetoAbs", - "createSVGPathSegLinetoHorizontalAbs", - "createSVGPathSegLinetoHorizontalRel", - "createSVGPathSegLinetoRel", - "createSVGPathSegLinetoVerticalAbs", - "createSVGPathSegLinetoVerticalRel", - "createSVGPathSegMovetoAbs", - "createSVGPathSegMovetoRel", - "createSVGPoint", - "createSVGRect", - "createSVGTransform", - "createSVGTransformFromMatrix", - "createSampler", - "createScript", - "createScriptProcessor", - "createScriptURL", - "createSession", - "createShader", - "createShadowRoot", - "createStereoPanner", - "createStyleSheet", - "createTBody", - "createTFoot", - "createTHead", - "createTextNode", - "createTextRange", - "createTexture", - "createTouch", - "createTouchList", - "createTransformFeedback", - "createTreeWalker", - "createVertexArray", - "createWaveShaper", - "creationTime", - "credentials", - "crossOrigin", - "crossOriginIsolated", - "crypto", - "csi", - "csp", - "cssFloat", - "cssRules", - "cssText", - "cssValueType", - "ctrlKey", - "ctrlLeft", - "cues", - "cullFace", - "currency", - "currencyDisplay", - "current", - "currentDirection", - "currentLocalDescription", - "currentNode", - "currentPage", - "currentRect", - "currentRemoteDescription", - "currentScale", - "currentScript", - "currentSrc", - "currentState", - "currentStyle", - "currentTarget", - "currentTime", - "currentTranslate", - "currentView", - "cursor", - "curve", - "customElements", - "customError", - "customSections", - "cx", - "cy", - "d", - "data", - "dataFld", - "dataFormatAs", - "dataLoss", - "dataLossMessage", - "dataPageSize", - "dataSrc", - "dataTransfer", - "database", - "databases", - "dataset", - "dateTime", - "day", - "db", - "debug", - "debuggerEnabled", - "declare", - "decode", - "decodeAudioData", - "decodeURI", - "decodeURIComponent", - "decodedBodySize", - "decoding", - "decodingInfo", - "decrypt", - "default", - "defaultCharset", - "defaultChecked", - "defaultMuted", - "defaultPlaybackRate", - "defaultPolicy", - "defaultPrevented", - "defaultRequest", - "defaultSelected", - "defaultStatus", - "defaultURL", - "defaultValue", - "defaultView", - "defaultstatus", - "defer", - "define", - "defineMagicFunction", - "defineMagicVariable", - "defineProperties", - "defineProperty", - "deg", - "delay", - "delayTime", - "delegatesFocus", - "delete", - "deleteBuffer", - "deleteCaption", - "deleteCell", - "deleteContents", - "deleteData", - "deleteDatabase", - "deleteFramebuffer", - "deleteFromDocument", - "deleteIndex", - "deleteMedium", - "deleteObjectStore", - "deleteProgram", - "deleteProperty", - "deleteQuery", - "deleteRenderbuffer", - "deleteRow", - "deleteRule", - "deleteSampler", - "deleteShader", - "deleteSync", - "deleteTFoot", - "deleteTHead", - "deleteTexture", - "deleteTransformFeedback", - "deleteVertexArray", - "deliverChangeRecords", - "delivery", - "deliveryInfo", - "deliveryStatus", - "deliveryTimestamp", - "delta", - "deltaMode", - "deltaX", - "deltaY", - "deltaZ", - "dependentLocality", - "depthFar", - "depthFunc", - "depthMask", - "depthNear", - "depthRange", - "deref", - "deriveBits", - "deriveKey", - "description", - "deselectAll", - "designMode", - "desiredSize", - "destination", - "destinationURL", - "detach", - "detachEvent", - "detachShader", - "detail", - "details", - "detect", - "detune", - "device", - "deviceClass", - "deviceId", - "deviceMemory", - "devicePixelContentBoxSize", - "devicePixelRatio", - "deviceProtocol", - "deviceSessionId", - "deviceSubclass", - "deviceVersionMajor", - "deviceVersionMinor", - "deviceVersionSubminor", - "deviceXDPI", - "deviceYDPI", - "didTimeout", - "diffuseConstant", - "digest", - "dimensions", - "dir", - "dirName", - "dirXml", - "direction", - "dirxml", - "disable", - "disablePictureInPicture", - "disableRemotePlayback", - "disableVertexAttribArray", - "disabled", - "dischargingTime", - "disconnect", - "disconnectedCallback", - "dispatch", - "dispatchEvent", - "dispatchToListener", - "display", - "displayId", - "displayName", - "disposition", - "distanceModel", - "div", - "divisor", - "djsapi", - "djsproxy", - "doImport", - "doNotTrack", - "doScroll", - "doctype", - "document", - "documentElement", - "documentMode", - "documentURI", - "dolphin", - "dolphinGameCenter", - "dolphininfo", - "dolphinmeta", - "domComplete", - "domContentLoadedEventEnd", - "domContentLoadedEventStart", - "domInteractive", - "domLoading", - "domOverlayState", - "domain", - "domainLookupEnd", - "domainLookupStart", - "dominant-baseline", - "dominantBaseline", - "done", - "dopplerFactor", - "dotAll", - "downDegrees", - "downlink", - "download", - "downloadTotal", - "downloaded", - "dpcm", - "dpi", - "dppx", - "dragDrop", - "draggable", - "drawArrays", - "drawArraysInstanced", - "drawArraysInstancedANGLE", - "drawBuffers", - "drawCustomFocusRing", - "drawElements", - "drawElementsInstanced", - "drawElementsInstancedANGLE", - "drawFocusIfNeeded", - "drawImage", - "drawImageFromRect", - "drawRangeElements", - "drawSystemFocusRing", - "drawingBufferHeight", - "drawingBufferWidth", - "dropEffect", - "droppedVideoFrames", - "dropzone", - "dtmf", - "dump", - "duplicate", - "durability", - "duration", - "dvname", - "dvnum", - "dx", - "dy", - "dynsrc", - "e", - "edgeMode", - "effect", - "effectAllowed", - "effectiveDirective", - "effectiveType", - "elapsedTime", - "element", - "elementFromPoint", - "elementTiming", - "elements", - "elementsFromPoint", - "elevation", - "ellipse", - "em", - "emHeightAscent", - "emHeightDescent", - "email", - "embeds", - "emma", - "empty", - "empty-cells", - "emptyCells", - "emptyHTML", - "emptyScript", - "emulatedPosition", - "enable", - "enableBackground", - "enableDelegations", - "enableStyleSheetsForSet", - "enableVertexAttribArray", - "enabled", - "enabledPlugin", - "encode", - "encodeInto", - "encodeURI", - "encodeURIComponent", - "encodedBodySize", - "encoding", - "encodingInfo", - "encrypt", - "enctype", - "end", - "endContainer", - "endElement", - "endElementAt", - "endOfStream", - "endOffset", - "endQuery", - "endTime", - "endTransformFeedback", - "ended", - "endpoint", - "endpointNumber", - "endpoints", - "endsWith", - "enterKeyHint", - "entities", - "entries", - "entryType", - "enumerate", - "enumerateDevices", - "enumerateEditable", - "environmentBlendMode", - "epubCaptionSide", - "epubTextCombine", - "epubTextEmphasis", - "epubTextEmphasisColor", - "epubTextEmphasisStyle", - "epubTextOrientation", - "epubTextTransform", - "epubWordBreak", - "epubWritingMode", - "equals", - "era", - "error", - "errorCode", - "errorDetail", - "errorText", - "escape", - "estimate", - "eval", - "evaluate", - "event", - "eventPhase", - "every", - "ex", - "exception", - "exchange", - "exec", - "execCommand", - "execCommandShowHelp", - "execScript", - "executeSql", - "exitFullscreen", - "exitPictureInPicture", - "exitPointerLock", - "exitPresent", - "exp", - "expand", - "expandEntityReferences", - "expando", - "expansion", - "expiration", - "expirationTime", - "expires", - "expiryDate", - "explicitOriginalTarget", - "expm1", - "exponent", - "exponentialRampToValueAtTime", - "exportKey", - "exports", - "extend", - "extensions", - "extentNode", - "extentOffset", - "external", - "externalResourcesRequired", - "extractContents", - "extractable", - "eye", - "f", - "face", - "factoryReset", - "failureReason", - "fallback", - "family", - "familyName", - "farthestViewportElement", - "fastSeek", - "fatal", - "featurePolicy", - "featureSettings", - "features", - "fenceSync", - "fetch", - "fetchStart", - "fftSize", - "fgColor", - "fieldOfView", - "file", - "fileCreatedDate", - "fileHandle", - "fileModifiedDate", - "fileName", - "fileSize", - "fileUpdatedDate", - "filename", - "files", - "filesystem", - "fill", - "fill-opacity", - "fill-rule", - "fillLightMode", - "fillOpacity", - "fillRect", - "fillRule", - "fillStyle", - "fillText", - "filter", - "filterResX", - "filterResY", - "filterUnits", - "filters", - "finally", - "find", - "findIndex", - "findRule", - "findText", - "finish", - "finishDocumentLoadTime", - "finishLoadTime", - "finished", - "fireEvent", - "firesTouchEvents", - "first", - "firstChild", - "firstElementChild", - "firstPage", - "firstPaintAfterLoadTime", - "firstPaintTime", - "fixed", - "flags", - "flat", - "flatMap", - "flex", - "flex-basis", - "flex-direction", - "flex-flow", - "flex-grow", - "flex-shrink", - "flex-wrap", - "flexBasis", - "flexDirection", - "flexFlow", - "flexGrow", - "flexShrink", - "flexWrap", - "flipX", - "flipY", - "float", - "flood-color", - "flood-opacity", - "floodColor", - "floodOpacity", - "floor", - "flush", - "focus", - "focusNode", - "focusOffset", - "font", - "font-family", - "font-feature-settings", - "font-kerning", - "font-language-override", - "font-size", - "font-size-adjust", - "font-stretch", - "font-style", - "font-synthesis", - "font-variant", - "font-variant-alternates", - "font-variant-caps", - "font-variant-east-asian", - "font-variant-ligatures", - "font-variant-numeric", - "font-variant-position", - "font-weight", - "fontBoundingBoxAscent", - "fontBoundingBoxDescent", - "fontDisplay", - "fontFamily", - "fontFeatureSettings", - "fontKerning", - "fontLanguageOverride", - "fontOpticalSizing", - "fontSize", - "fontSizeAdjust", - "fontSmoothingEnabled", - "fontStretch", - "fontStyle", - "fontSynthesis", - "fontVariant", - "fontVariantAlternates", - "fontVariantCaps", - "fontVariantEastAsian", - "fontVariantLigatures", - "fontVariantNumeric", - "fontVariantPosition", - "fontVariationSettings", - "fontWeight", - "fontcolor", - "fontfaces", - "fonts", - "fontsize", - "for", - "forEach", - "force", - "forceRedraw", - "form", - "formAction", - "formData", - "formEnctype", - "formMethod", - "formNoValidate", - "formTarget", - "format", - "formatRange", - "formatRangeToParts", - "formatToParts", - "forms", - "forward", - "forwardX", - "forwardY", - "forwardZ", - "foundation", - "fr", - "fragmentDirective", - "frame", - "frameBorder", - "frameElement", - "frameSpacing", - "framebuffer", - "framebufferHeight", - "framebufferRenderbuffer", - "framebufferTexture2D", - "framebufferTextureLayer", - "framebufferWidth", - "frames", - "freeSpace", - "freeze", - "frequency", - "frequencyBinCount", - "from", - "fromCharCode", - "fromCodePoint", - "fromElement", - "fromEntries", - "fromFloat32Array", - "fromFloat64Array", - "fromMatrix", - "fromPoint", - "fromQuad", - "fromRect", - "frontFace", - "fround", - "fullPath", - "fullScreen", - "fullscreen", - "fullscreenElement", - "fullscreenEnabled", - "fx", - "fy", - "gain", - "gamepad", - "gamma", - "gap", - "gatheringState", - "gatt", - "genderIdentity", - "generateCertificate", - "generateKey", - "generateMipmap", - "generateRequest", - "geolocation", - "gestureObject", - "get", - "getActiveAttrib", - "getActiveUniform", - "getActiveUniformBlockName", - "getActiveUniformBlockParameter", - "getActiveUniforms", - "getAdditionalLanguages", - "getAdjacentText", - "getAll", - "getAllKeys", - "getAllResponseHeaders", - "getAllowlistForFeature", - "getAnimations", - "getAsFile", - "getAsString", - "getAttachedShaders", - "getAttribLocation", - "getAttribute", - "getAttributeNS", - "getAttributeNames", - "getAttributeNode", - "getAttributeNodeNS", - "getAttributeType", - "getAudioTracks", - "getAvailability", - "getBBox", - "getBattery", - "getBigInt64", - "getBigUint64", - "getBlob", - "getBookmark", - "getBoundingClientRect", - "getBounds", - "getBufferParameter", - "getBufferSubData", - "getByteFrequencyData", - "getByteTimeDomainData", - "getCSSCanvasContext", - "getCTM", - "getCandidateWindowClientRect", - "getCanonicalLocales", - "getCapabilities", - "getChannelData", - "getCharNumAtPosition", - "getCharacteristic", - "getCharacteristics", - "getClientExtensionResults", - "getClientRect", - "getClientRects", - "getCoalescedEvents", - "getCompositionAlternatives", - "getComputedStyle", - "getComputedTextLength", - "getComputedTiming", - "getConfiguration", - "getConstraints", - "getContext", - "getContextAttributes", - "getContributingSources", - "getCount", - "getCounterValue", - "getCueAsHTML", - "getCueById", - "getCurrentPosition", - "getCurrentTime", - "getData", - "getDatabaseNames", - "getDate", - "getDay", - "getDefaultComputedStyle", - "getDescriptor", - "getDescriptors", - "getDestinationInsertionPoints", - "getDetails", - "getDevices", - "getDirectory", - "getDisplayMedia", - "getDistributedNodes", - "getEditable", - "getElementById", - "getElementsByClassName", - "getElementsByName", - "getElementsByTagName", - "getElementsByTagNameNS", - "getEnclosureList", - "getEndPositionOfChar", - "getEntries", - "getEntriesByName", - "getEntriesByType", - "getError", - "getExtension", - "getExtentOfChar", - "getEyeParameters", - "getFeature", - "getFile", - "getFiles", - "getFilesAndDirectories", - "getFingerprints", - "getFloat32", - "getFloat64", - "getFloatFrequencyData", - "getFloatTimeDomainData", - "getFloatValue", - "getFragDataLocation", - "getFrameData", - "getFramebufferAttachmentParameter", - "getFrequencyResponse", - "getFullYear", - "getGamepads", - "getHitTestResults", - "getHitTestResultsForTransientInput", - "getHours", - "getIdentityAssertion", - "getIds", - "getImageData", - "getIndexedParameter", - "getInstalled", - "getInstalledRelatedApps", - "getInt16", - "getInt32", - "getInt8", - "getInternalformatParameter", - "getIntersectionList", - "getIsInstalled", - "getItem", - "getItems", - "getKey", - "getKeyframes", - "getLayers", - "getLayoutMap", - "getLineDash", - "getLocalCandidates", - "getLocalParameters", - "getLocalStreams", - "getLocalizationResource", - "getMarks", - "getMatchedCSSRules", - "getMeasures", - "getMetadata", - "getMilliseconds", - "getMinutes", - "getModifierState", - "getMonth", - "getNamedItem", - "getNamedItemNS", - "getNativeFramebufferScaleFactor", - "getNotifications", - "getNotifier", - "getNumberOfChars", - "getOffsetReferenceSpace", - "getOutputTimestamp", - "getOverrideHistoryNavigationMode", - "getOverrideStyle", - "getOwnPropertyDescriptor", - "getOwnPropertyDescriptors", - "getOwnPropertyNames", - "getOwnPropertySymbols", - "getParameter", - "getParameters", - "getParent", - "getPathSegAtLength", - "getPhotoCapabilities", - "getPhotoSettings", - "getPointAtLength", - "getPose", - "getPredictedEvents", - "getPreference", - "getPreferenceDefault", - "getPresentationAttribute", - "getPreventDefault", - "getPrimaryService", - "getPrimaryServices", - "getProgramInfoLog", - "getProgramParameter", - "getPropertyCSSValue", - "getPropertyPriority", - "getPropertyShorthand", - "getPropertyType", - "getPropertyValue", - "getPrototypeOf", - "getQuery", - "getQueryParameter", - "getRGBColorValue", - "getRandomValues", - "getRangeAt", - "getReader", - "getReceivers", - "getRectValue", - "getRegistration", - "getRegistrations", - "getRemoteCandidates", - "getRemoteCertificates", - "getRemoteParameters", - "getRemoteStreams", - "getRenderbufferParameter", - "getResponseHeader", - "getRevision", - "getRoot", - "getRootNode", - "getRotationOfChar", - "getRules", - "getSVGDocument", - "getSamplerParameter", - "getScreenCTM", - "getSeconds", - "getSelectedCandidatePair", - "getSelection", - "getSelf", - "getSenders", - "getService", - "getSettings", - "getShaderInfoLog", - "getShaderParameter", - "getShaderPrecisionFormat", - "getShaderSource", - "getSimpleDuration", - "getSiteIcons", - "getSources", - "getSpeculativeParserUrls", - "getStartDate", - "getStartPositionOfChar", - "getStartTime", - "getState", - "getStats", - "getStatusForPolicy", - "getStorageUpdates", - "getStreamById", - "getStringValue", - "getSubStringLength", - "getSubscription", - "getSupportedConstraints", - "getSupportedExtensions", - "getSupportedFormats", - "getSyncParameter", - "getSynchronizationSources", - "getTags", - "getTargetRanges", - "getTexParameter", - "getTime", - "getTimezoneOffset", - "getTiming", - "getTotalLength", - "getTrackById", - "getTracks", - "getTransceivers", - "getTransform", - "getTransformFeedbackVarying", - "getTransformToElement", - "getTransports", - "getType", - "getTypeMapping", - "getUTCDate", - "getUTCDay", - "getUTCFullYear", - "getUTCHours", - "getUTCMilliseconds", - "getUTCMinutes", - "getUTCMonth", - "getUTCSeconds", - "getUint16", - "getUint32", - "getUint8", - "getUniform", - "getUniformBlockIndex", - "getUniformIndices", - "getUniformLocation", - "getUserMedia", - "getVRDisplays", - "getValues", - "getVarDate", - "getVariableValue", - "getVertexAttrib", - "getVertexAttribOffset", - "getVideoPlaybackQuality", - "getVideoTracks", - "getViewerPose", - "getViewport", - "getVoices", - "getWakeLockState", - "getWriter", - "getYear", - "givenName", - "global", - "globalAlpha", - "globalCompositeOperation", - "globalThis", - "glyphOrientationHorizontal", - "glyphOrientationVertical", - "glyphRef", - "go", - "grabFrame", - "grad", - "gradientTransform", - "gradientUnits", - "grammars", - "green", - "grid", - "grid-area", - "grid-auto-columns", - "grid-auto-flow", - "grid-auto-rows", - "grid-column", - "grid-column-end", - "grid-column-gap", - "grid-column-start", - "grid-gap", - "grid-row", - "grid-row-end", - "grid-row-gap", - "grid-row-start", - "grid-template", - "grid-template-areas", - "grid-template-columns", - "grid-template-rows", - "gridArea", - "gridAutoColumns", - "gridAutoFlow", - "gridAutoRows", - "gridColumn", - "gridColumnEnd", - "gridColumnGap", - "gridColumnStart", - "gridGap", - "gridRow", - "gridRowEnd", - "gridRowGap", - "gridRowStart", - "gridTemplate", - "gridTemplateAreas", - "gridTemplateColumns", - "gridTemplateRows", - "gripSpace", - "group", - "groupCollapsed", - "groupEnd", - "groupId", - "grow", - "hadRecentInput", - "hand", - "handedness", - "hangingBaseline", - "hangingPunctuation", - "hapticActuators", - "hardwareConcurrency", - "has", - "hasAttribute", - "hasAttributeNS", - "hasAttributes", - "hasBeenActive", - "hasChildNodes", - "hasComposition", - "hasEnrolledInstrument", - "hasExtension", - "hasExternalDisplay", - "hasFeature", - "hasFocus", - "hasInstance", - "hasLayout", - "hasListener", - "hasListeners", - "hasOrientation", - "hasOwnProperty", - "hasPointerCapture", - "hasPosition", - "hasReading", - "hasStorageAccess", - "hash", - "head", - "headers", - "heading", - "height", - "hidden", - "hide", - "hideFocus", - "high", - "highWaterMark", - "hint", - "history", - "honorificPrefix", - "honorificSuffix", - "horizontalOverflow", - "host", - "hostCandidate", - "hostname", - "hour", - "hour12", - "hourCycle", - "href", - "hrefTranslate", - "hreflang", - "hspace", - "html5TagCheckInerface", - "htmlFor", - "htmlText", - "httpEquiv", - "httpRequestStatusCode", - "hwTimestamp", - "hyphens", - "hypot", - "iccId", - "iceConnectionState", - "iceGatheringState", - "iceTransport", - "icon", - "iconURL", - "id", - "identifier", - "identity", - "ideographicBaseline", - "idpLoginUrl", - "ignoreBOM", - "ignoreCase", - "ignoreDepthValues", - "ignoreMutedMedia", - "ignorePunctuation", - "image-orientation", - "image-rendering", - "imageHeight", - "imageOrientation", - "imageRendering", - "imageSizes", - "imageSmoothingEnabled", - "imageSmoothingQuality", - "imageSrcset", - "imageWidth", - "images", - "ime-mode", - "imeMode", - "implementation", - "import", - "importKey", - "importNode", - "importStylesheet", - "imports", - "impp", - "imul", - "in", - "in1", - "in2", - "inBandMetadataTrackDispatchType", - "inRange", - "includes", - "incremental", - "indeterminate", - "index", - "indexNames", - "indexOf", - "indexedDB", - "indicate", - "inertiaDestinationX", - "inertiaDestinationY", - "info", - "init", - "initAnimationEvent", - "initBeforeLoadEvent", - "initClipboardEvent", - "initCloseEvent", - "initCommandEvent", - "initCompositionEvent", - "initCustomEvent", - "initData", - "initDataType", - "initDeviceMotionEvent", - "initDeviceOrientationEvent", - "initDragEvent", - "initErrorEvent", - "initEvent", - "initFocusEvent", - "initGestureEvent", - "initHashChangeEvent", - "initKeyEvent", - "initKeyboardEvent", - "initMSManipulationEvent", - "initMessageEvent", - "initMouseEvent", - "initMouseScrollEvent", - "initMouseWheelEvent", - "initMutationEvent", - "initNSMouseEvent", - "initOverflowEvent", - "initPageEvent", - "initPageTransitionEvent", - "initPointerEvent", - "initPopStateEvent", - "initProgressEvent", - "initScrollAreaEvent", - "initSimpleGestureEvent", - "initStorageEvent", - "initTextEvent", - "initTimeEvent", - "initTouchEvent", - "initTransitionEvent", - "initUIEvent", - "initWebKitAnimationEvent", - "initWebKitTransitionEvent", - "initWebKitWheelEvent", - "initWheelEvent", - "initialTime", - "initialize", - "initiatorType", - "inline-size", - "inlineSize", - "inlineVerticalFieldOfView", - "inner", - "innerHTML", - "innerHeight", - "innerText", - "innerWidth", - "input", - "inputBuffer", - "inputEncoding", - "inputMethod", - "inputMode", - "inputSource", - "inputSources", - "inputType", - "inputs", - "insertAdjacentElement", - "insertAdjacentHTML", - "insertAdjacentText", - "insertBefore", - "insertCell", - "insertDTMF", - "insertData", - "insertId", - "insertItemBefore", - "insertNode", - "insertRow", - "insertRule", - "inset", - "inset-block", - "inset-block-end", - "inset-block-start", - "inset-inline", - "inset-inline-end", - "inset-inline-start", - "insetBlock", - "insetBlockEnd", - "insetBlockStart", - "insetInline", - "insetInlineEnd", - "insetInlineStart", - "install", - "installChrome", - "installPackage", - "installState", - "installing", - "instanceRoot", - "instantiate", - "instantiateStreaming", - "instruments", - "integrity", - "interactionMode", - "intercept", - "interfaceClass", - "interfaceName", - "interfaceNumber", - "interfaceProtocol", - "interfaceSubclass", - "interfaces", - "interimResults", - "internalSubset", - "interpretation", - "intersectionRatio", - "intersectionRect", - "intersectsNode", - "interval", - "invalidIteratorState", - "invalidateFramebuffer", - "invalidateSubFramebuffer", - "inverse", - "invertSelf", - "is", - "is2D", - "isActive", - "isAlternate", - "isArray", - "isBingCurrentSearchDefault", - "isBuffer", - "isCandidateWindowVisible", - "isChar", - "isCollapsed", - "isComposing", - "isConcatSpreadable", - "isConnected", - "isContentEditable", - "isContentHandlerRegistered", - "isContextLost", - "isDefaultNamespace", - "isDirectory", - "isDisabled", - "isEnabled", - "isEqual", - "isEqualNode", - "isExtensible", - "isExternalCTAP2SecurityKeySupported", - "isFile", - "isFinite", - "isFramebuffer", - "isFrozen", - "isGenerator", - "isHTML", - "isHistoryNavigation", - "isId", - "isIdentity", - "isInjected", - "isInstalled", - "isInteger", - "isIntersecting", - "isLockFree", - "isMap", - "isMultiLine", - "isNaN", - "isOpen", - "isPointInFill", - "isPointInPath", - "isPointInRange", - "isPointInStroke", - "isPrefAlternate", - "isPresenting", - "isPrimary", - "isProgram", - "isPropertyImplicit", - "isProtocolHandlerRegistered", - "isPrototypeOf", - "isQuery", - "isRenderbuffer", - "isSafeInteger", - "isSameNode", - "isSampler", - "isScript", - "isScriptURL", - "isSealed", - "isSecureContext", - "isSessionSupported", - "isShader", - "isSupported", - "isSync", - "isTextEdit", - "isTexture", - "isTransformFeedback", - "isTrusted", - "isTypeSupported", - "isTypeSupportedWithFeatures", - "isUserVerifyingPlatformAuthenticatorAvailable", - "isVertexArray", - "isView", - "isVisible", - "isochronousTransferIn", - "isochronousTransferOut", - "isolation", - "italics", - "item", - "itemId", - "itemProp", - "itemRef", - "itemScope", - "itemType", - "itemValue", - "items", - "iterateNext", - "iterator", - "javaEnabled", - "jobTitle", - "join", - "jsHeapSizeLimit", - "json", - "justify-content", - "justify-items", - "justify-self", - "justifyContent", - "justifyItems", - "justifySelf", - "k1", - "k2", - "k3", - "k4", - "kHz", - "keepalive", - "kernelMatrix", - "kernelUnitLengthX", - "kernelUnitLengthY", - "kerning", - "key", - "keyCode", - "keyFor", - "keyIdentifier", - "keyLightEnabled", - "keyLocation", - "keyPath", - "keyStatuses", - "keySystem", - "keyText", - "keyUsage", - "keyboard", - "keys", - "keytype", - "kind", - "knee", - "label", - "labels", - "lang", - "language", - "languages", - "largeArcFlag", - "lastActivePanel", - "lastChild", - "lastElementChild", - "lastEventId", - "lastIndex", - "lastIndexOf", - "lastInputTime", - "lastMatch", - "lastMessageSubject", - "lastMessageType", - "lastModified", - "lastModifiedDate", - "lastPage", - "lastParen", - "lastState", - "lastStyleSheetSet", - "latitude", - "layerX", - "layerY", - "layoutFlow", - "layoutGrid", - "layoutGridChar", - "layoutGridLine", - "layoutGridMode", - "layoutGridType", - "lbound", - "left", - "leftContext", - "leftDegrees", - "leftMargin", - "leftProjectionMatrix", - "leftViewMatrix", - "length", - "lengthAdjust", - "lengthComputable", - "letter-spacing", - "letterSpacing", - "level", - "lighting-color", - "lightingColor", - "limitingConeAngle", - "line", - "line-break", - "line-height", - "lineAlign", - "lineBreak", - "lineCap", - "lineDashOffset", - "lineHeight", - "lineJoin", - "lineNumber", - "lineTo", - "lineWidth", - "linearAcceleration", - "linearRampToValueAtTime", - "linearVelocity", - "lineno", - "lines", - "link", - "linkColor", - "linkProgram", - "links", - "list", - "list-style", - "list-style-image", - "list-style-position", - "list-style-type", - "listStyle", - "listStyleImage", - "listStylePosition", - "listStyleType", - "listener", - "load", - "loadEventEnd", - "loadEventStart", - "loadTime", - "loadTimes", - "loaded", - "loading", - "localDescription", - "localName", - "localService", - "localStorage", - "locale", - "localeCompare", - "location", - "locationbar", - "lock", - "locked", - "lockedFile", - "locks", - "log", - "log10", - "log1p", - "log2", - "logicalXDPI", - "logicalYDPI", - "longDesc", - "longitude", - "lookupNamespaceURI", - "lookupPrefix", - "loop", - "loopEnd", - "loopStart", - "looping", - "low", - "lower", - "lowerBound", - "lowerOpen", - "lowsrc", - "m11", - "m12", - "m13", - "m14", - "m21", - "m22", - "m23", - "m24", - "m31", - "m32", - "m33", - "m34", - "m41", - "m42", - "m43", - "m44", - "makeXRCompatible", - "manifest", - "manufacturer", - "manufacturerName", - "map", - "mapping", - "margin", - "margin-block", - "margin-block-end", - "margin-block-start", - "margin-bottom", - "margin-inline", - "margin-inline-end", - "margin-inline-start", - "margin-left", - "margin-right", - "margin-top", - "marginBlock", - "marginBlockEnd", - "marginBlockStart", - "marginBottom", - "marginHeight", - "marginInline", - "marginInlineEnd", - "marginInlineStart", - "marginLeft", - "marginRight", - "marginTop", - "marginWidth", - "mark", - "markTimeline", - "marker", - "marker-end", - "marker-mid", - "marker-offset", - "marker-start", - "markerEnd", - "markerHeight", - "markerMid", - "markerOffset", - "markerStart", - "markerUnits", - "markerWidth", - "marks", - "mask", - "mask-clip", - "mask-composite", - "mask-image", - "mask-mode", - "mask-origin", - "mask-position", - "mask-position-x", - "mask-position-y", - "mask-repeat", - "mask-size", - "mask-type", - "maskClip", - "maskComposite", - "maskContentUnits", - "maskImage", - "maskMode", - "maskOrigin", - "maskPosition", - "maskPositionX", - "maskPositionY", - "maskRepeat", - "maskSize", - "maskType", - "maskUnits", - "match", - "matchAll", - "matchMedia", - "matchMedium", - "matches", - "matrix", - "matrixTransform", - "max", - "max-block-size", - "max-height", - "max-inline-size", - "max-width", - "maxActions", - "maxAlternatives", - "maxBlockSize", - "maxChannelCount", - "maxChannels", - "maxConnectionsPerServer", - "maxDecibels", - "maxDistance", - "maxHeight", - "maxInlineSize", - "maxLayers", - "maxLength", - "maxMessageSize", - "maxPacketLifeTime", - "maxRetransmits", - "maxTouchPoints", - "maxValue", - "maxWidth", - "maxZoom", - "maximize", - "maximumFractionDigits", - "measure", - "measureText", - "media", - "mediaCapabilities", - "mediaDevices", - "mediaElement", - "mediaGroup", - "mediaKeys", - "mediaSession", - "mediaStream", - "mediaText", - "meetOrSlice", - "memory", - "menubar", - "mergeAttributes", - "message", - "messageClass", - "messageHandlers", - "messageType", - "metaKey", - "metadata", - "method", - "methodDetails", - "methodName", - "mid", - "mimeType", - "mimeTypes", - "min", - "min-block-size", - "min-height", - "min-inline-size", - "min-width", - "minBlockSize", - "minDecibels", - "minHeight", - "minInlineSize", - "minLength", - "minValue", - "minWidth", - "minZoom", - "minimize", - "minimumFractionDigits", - "minimumIntegerDigits", - "minute", - "miterLimit", - "mix-blend-mode", - "mixBlendMode", - "mm", - "mode", - "modify", - "month", - "motion", - "motionOffset", - "motionPath", - "motionRotation", - "mount", - "move", - "moveBy", - "moveEnd", - "moveFirst", - "moveFocusDown", - "moveFocusLeft", - "moveFocusRight", - "moveFocusUp", - "moveNext", - "moveRow", - "moveStart", - "moveTo", - "moveToBookmark", - "moveToElementText", - "moveToPoint", - "movementX", - "movementY", - "mozAdd", - "mozAnimationStartTime", - "mozAnon", - "mozApps", - "mozAudioCaptured", - "mozAudioChannelType", - "mozAutoplayEnabled", - "mozCancelAnimationFrame", - "mozCancelFullScreen", - "mozCancelRequestAnimationFrame", - "mozCaptureStream", - "mozCaptureStreamUntilEnded", - "mozClearDataAt", - "mozContact", - "mozContacts", - "mozCreateFileHandle", - "mozCurrentTransform", - "mozCurrentTransformInverse", - "mozCursor", - "mozDash", - "mozDashOffset", - "mozDecodedFrames", - "mozExitPointerLock", - "mozFillRule", - "mozFragmentEnd", - "mozFrameDelay", - "mozFullScreen", - "mozFullScreenElement", - "mozFullScreenEnabled", - "mozGetAll", - "mozGetAllKeys", - "mozGetAsFile", - "mozGetDataAt", - "mozGetMetadata", - "mozGetUserMedia", - "mozHasAudio", - "mozHasItem", - "mozHidden", - "mozImageSmoothingEnabled", - "mozIndexedDB", - "mozInnerScreenX", - "mozInnerScreenY", - "mozInputSource", - "mozIsTextField", - "mozItem", - "mozItemCount", - "mozItems", - "mozLength", - "mozLockOrientation", - "mozMatchesSelector", - "mozMovementX", - "mozMovementY", - "mozOpaque", - "mozOrientation", - "mozPaintCount", - "mozPaintedFrames", - "mozParsedFrames", - "mozPay", - "mozPointerLockElement", - "mozPresentedFrames", - "mozPreservesPitch", - "mozPressure", - "mozPrintCallback", - "mozRTCIceCandidate", - "mozRTCPeerConnection", - "mozRTCSessionDescription", - "mozRemove", - "mozRequestAnimationFrame", - "mozRequestFullScreen", - "mozRequestPointerLock", - "mozSetDataAt", - "mozSetImageElement", - "mozSourceNode", - "mozSrcObject", - "mozSystem", - "mozTCPSocket", - "mozTextStyle", - "mozTypesAt", - "mozUnlockOrientation", - "mozUserCancelled", - "mozVisibilityState", - "ms", - "msAnimation", - "msAnimationDelay", - "msAnimationDirection", - "msAnimationDuration", - "msAnimationFillMode", - "msAnimationIterationCount", - "msAnimationName", - "msAnimationPlayState", - "msAnimationStartTime", - "msAnimationTimingFunction", - "msBackfaceVisibility", - "msBlockProgression", - "msCSSOMElementFloatMetrics", - "msCaching", - "msCachingEnabled", - "msCancelRequestAnimationFrame", - "msCapsLockWarningOff", - "msClearImmediate", - "msClose", - "msContentZoomChaining", - "msContentZoomFactor", - "msContentZoomLimit", - "msContentZoomLimitMax", - "msContentZoomLimitMin", - "msContentZoomSnap", - "msContentZoomSnapPoints", - "msContentZoomSnapType", - "msContentZooming", - "msConvertURL", - "msCrypto", - "msDoNotTrack", - "msElementsFromPoint", - "msElementsFromRect", - "msExitFullscreen", - "msExtendedCode", - "msFillRule", - "msFirstPaint", - "msFlex", - "msFlexAlign", - "msFlexDirection", - "msFlexFlow", - "msFlexItemAlign", - "msFlexLinePack", - "msFlexNegative", - "msFlexOrder", - "msFlexPack", - "msFlexPositive", - "msFlexPreferredSize", - "msFlexWrap", - "msFlowFrom", - "msFlowInto", - "msFontFeatureSettings", - "msFullscreenElement", - "msFullscreenEnabled", - "msGetInputContext", - "msGetRegionContent", - "msGetUntransformedBounds", - "msGraphicsTrustStatus", - "msGridColumn", - "msGridColumnAlign", - "msGridColumnSpan", - "msGridColumns", - "msGridRow", - "msGridRowAlign", - "msGridRowSpan", - "msGridRows", - "msHidden", - "msHighContrastAdjust", - "msHyphenateLimitChars", - "msHyphenateLimitLines", - "msHyphenateLimitZone", - "msHyphens", - "msImageSmoothingEnabled", - "msImeAlign", - "msIndexedDB", - "msInterpolationMode", - "msIsStaticHTML", - "msKeySystem", - "msKeys", - "msLaunchUri", - "msLockOrientation", - "msManipulationViewsEnabled", - "msMatchMedia", - "msMatchesSelector", - "msMaxTouchPoints", - "msOrientation", - "msOverflowStyle", - "msPerspective", - "msPerspectiveOrigin", - "msPlayToDisabled", - "msPlayToPreferredSourceUri", - "msPlayToPrimary", - "msPointerEnabled", - "msRegionOverflow", - "msReleasePointerCapture", - "msRequestAnimationFrame", - "msRequestFullscreen", - "msSaveBlob", - "msSaveOrOpenBlob", - "msScrollChaining", - "msScrollLimit", - "msScrollLimitXMax", - "msScrollLimitXMin", - "msScrollLimitYMax", - "msScrollLimitYMin", - "msScrollRails", - "msScrollSnapPointsX", - "msScrollSnapPointsY", - "msScrollSnapType", - "msScrollSnapX", - "msScrollSnapY", - "msScrollTranslation", - "msSetImmediate", - "msSetMediaKeys", - "msSetPointerCapture", - "msTextCombineHorizontal", - "msTextSizeAdjust", - "msToBlob", - "msTouchAction", - "msTouchSelect", - "msTraceAsyncCallbackCompleted", - "msTraceAsyncCallbackStarting", - "msTraceAsyncOperationCompleted", - "msTraceAsyncOperationStarting", - "msTransform", - "msTransformOrigin", - "msTransformStyle", - "msTransition", - "msTransitionDelay", - "msTransitionDuration", - "msTransitionProperty", - "msTransitionTimingFunction", - "msUnlockOrientation", - "msUpdateAsyncCallbackRelation", - "msUserSelect", - "msVisibilityState", - "msWrapFlow", - "msWrapMargin", - "msWrapThrough", - "msWriteProfilerMark", - "msZoom", - "msZoomTo", - "mt", - "mul", - "multiEntry", - "multiSelectionObj", - "multiline", - "multiple", - "multiply", - "multiplySelf", - "mutableFile", - "muted", - "n", - "name", - "nameProp", - "namedItem", - "namedRecordset", - "names", - "namespaceURI", - "namespaces", - "naturalHeight", - "naturalWidth", - "navigate", - "navigation", - "navigationMode", - "navigationPreload", - "navigationStart", - "navigationType", - "navigator", - "near", - "nearestViewportElement", - "negative", - "negotiated", - "netscape", - "networkState", - "newScale", - "newTranslate", - "newURL", - "newValue", - "newValueSpecifiedUnits", - "newVersion", - "newhome", - "next", - "nextElementSibling", - "nextHopProtocol", - "nextNode", - "nextPage", - "nextSibling", - "nickname", - "noHref", - "noModule", - "noResize", - "noShade", - "noValidate", - "noWrap", - "node", - "nodeName", - "nodeType", - "nodeValue", - "nonce", - "normalize", - "normalizedPathSegList", - "notationName", - "notations", - "note", - "noteGrainOn", - "noteOff", - "noteOn", - "notify", - "now", - "npnNegotiatedProtocol", - "numOctaves", - "number", - "numberOfChannels", - "numberOfInputs", - "numberOfItems", - "numberOfOutputs", - "numberValue", - "numberingSystem", - "numeric", - "oMatchesSelector", - "object", - "object-fit", - "object-position", - "objectFit", - "objectPosition", - "objectStore", - "objectStoreNames", - "observe", - "observedAttributes", - "of", - "offscreenBuffering", - "offset", - "offset-anchor", - "offset-block-end", - "offset-block-start", - "offset-distance", - "offset-inline-end", - "offset-inline-start", - "offset-path", - "offset-rotate", - "offsetAnchor", - "offsetBlockEnd", - "offsetBlockStart", - "offsetDistance", - "offsetHeight", - "offsetInlineEnd", - "offsetInlineStart", - "offsetLeft", - "offsetNode", - "offsetParent", - "offsetPath", - "offsetRotate", - "offsetTop", - "offsetWidth", - "offsetX", - "offsetY", - "ok", - "oldURL", - "oldValue", - "oldVersion", - "olderShadowRoot", - "onDownloadProgress", - "onInstallStageChanged", - "onLine", - "onabort", - "onabsolutedeviceorientation", - "onactivate", - "onactive", - "onaddsourcebuffer", - "onaddstream", - "onaddtrack", - "onafterprint", - "onafterscriptexecute", - "onafterupdate", - "onanimationcancel", - "onanimationend", - "onanimationiteration", - "onanimationstart", - "onappinstalled", - "onaudioend", - "onaudioprocess", - "onaudiostart", - "onautocomplete", - "onautocompleteerror", - "onauxclick", - "onbeforeactivate", - "onbeforecopy", - "onbeforecut", - "onbeforedeactivate", - "onbeforeeditfocus", - "onbeforeinput", - "onbeforeinstallprompt", - "onbeforeload", - "onbeforepaste", - "onbeforeprint", - "onbeforescriptexecute", - "onbeforeunload", - "onbeforeupdate", - "onbeforexrselect", - "onbegin", - "onblocked", - "onblur", - "onbounce", - "onboundary", - "onbufferedamountlow", - "oncached", - "oncancel", - "oncandidatewindowhide", - "oncandidatewindowshow", - "oncandidatewindowupdate", - "oncanplay", - "oncanplaythrough", - "once", - "oncellchange", - "onchange", - "oncharacteristicvaluechanged", - "onchargingchange", - "onchargingtimechange", - "onchecking", - "onclick", - "onclose", - "onclosing", - "oncompassneedscalibration", - "oncomplete", - "onconnect", - "onconnecting", - "onconnectionavailable", - "onconnectionstatechange", - "oncontactchange", - "oncontextmenu", - "oncontrollerchange", - "oncontrolselect", - "oncopy", - "oncuechange", - "oncut", - "ondataavailable", - "ondatachannel", - "ondatasetchanged", - "ondatasetcomplete", - "ondblclick", - "ondeactivate", - "ondevicechange", - "ondevicelight", - "ondevicemotion", - "ondeviceorientation", - "ondeviceorientationabsolute", - "ondeviceproximity", - "ondischargingtimechange", - "ondisconnect", - "ondisplay", - "ondownloading", - "ondrag", - "ondragend", - "ondragenter", - "ondragexit", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onencrypted", - "onend", - "onended", - "onenter", - "onenterpictureinpicture", - "onerror", - "onerrorupdate", - "onexit", - "onfilterchange", - "onfinish", - "onfocus", - "onfocusin", - "onfocusout", - "onformdata", - "onfreeze", - "onfullscreenchange", - "onfullscreenerror", - "ongatheringstatechange", - "ongattserverdisconnected", - "ongesturechange", - "ongestureend", - "ongesturestart", - "ongotpointercapture", - "onhashchange", - "onhelp", - "onicecandidate", - "onicecandidateerror", - "oniceconnectionstatechange", - "onicegatheringstatechange", - "oninactive", - "oninput", - "oninputsourceschange", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeystatuseschange", - "onkeyup", - "onlanguagechange", - "onlayoutcomplete", - "onleavepictureinpicture", - "onlevelchange", - "onload", - "onloadT", - "onloadeddata", - "onloadedmetadata", - "onloadend", - "onloading", - "onloadingdone", - "onloadingerror", - "onloadstart", - "onlosecapture", - "onlostpointercapture", - "only", - "onmark", - "onmessage", - "onmessageerror", - "onmidimessage", - "onmousedown", - "onmouseenter", - "onmouseleave", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onmove", - "onmoveend", - "onmovestart", - "onmozfullscreenchange", - "onmozfullscreenerror", - "onmozorientationchange", - "onmozpointerlockchange", - "onmozpointerlockerror", - "onmscontentzoom", - "onmsfullscreenchange", - "onmsfullscreenerror", - "onmsgesturechange", - "onmsgesturedoubletap", - "onmsgestureend", - "onmsgesturehold", - "onmsgesturestart", - "onmsgesturetap", - "onmsgotpointercapture", - "onmsinertiastart", - "onmslostpointercapture", - "onmsmanipulationstatechanged", - "onmsneedkey", - "onmsorientationchange", - "onmspointercancel", - "onmspointerdown", - "onmspointerenter", - "onmspointerhover", - "onmspointerleave", - "onmspointermove", - "onmspointerout", - "onmspointerover", - "onmspointerup", - "onmssitemodejumplistitemremoved", - "onmsthumbnailclick", - "onmute", - "onnegotiationneeded", - "onnomatch", - "onnoupdate", - "onobsolete", - "onoffline", - "ononline", - "onopen", - "onorientationchange", - "onoverconstrained", - "onpage", - "onpagechange", - "onpagehide", - "onpageshow", - "onpaste", - "onpause", - "onpayerdetailchange", - "onpaymentmethodchange", - "onplay", - "onplaying", - "onpluginstreamstart", - "onpointercancel", - "onpointerdown", - "onpointerenter", - "onpointerleave", - "onpointerlockchange", - "onpointerlockerror", - "onpointermove", - "onpointerout", - "onpointerover", - "onpointerrawupdate", - "onpointerup", - "onpopstate", - "onprocessorerror", - "onprogress", - "onpropertychange", - "onratechange", - "onreading", - "onreadystatechange", - "onrejectionhandled", - "onrelease", - "onremove", - "onremovesourcebuffer", - "onremovestream", - "onremovetrack", - "onrepeat", - "onreset", - "onresize", - "onresizeend", - "onresizestart", - "onresourcetimingbufferfull", - "onresult", - "onresume", - "onrowenter", - "onrowexit", - "onrowsdelete", - "onrowsinserted", - "onscroll", - "onsearch", - "onsecuritypolicyviolation", - "onseeked", - "onseeking", - "onselect", - "onselectedcandidatepairchange", - "onselectend", - "onselectionchange", - "onselectstart", - "onshippingaddresschange", - "onshippingoptionchange", - "onshow", - "onsignalingstatechange", - "onsoundend", - "onsoundstart", - "onsourceclose", - "onsourceclosed", - "onsourceended", - "onsourceopen", - "onspeechend", - "onspeechstart", - "onsqueeze", - "onsqueezeend", - "onsqueezestart", - "onstalled", - "onstart", - "onstatechange", - "onstop", - "onstorage", - "onstoragecommit", - "onsubmit", - "onsuccess", - "onsuspend", - "onterminate", - "ontextinput", - "ontimeout", - "ontimeupdate", - "ontoggle", - "ontonechange", - "ontouchcancel", - "ontouchend", - "ontouchmove", - "ontouchstart", - "ontrack", - "ontransitioncancel", - "ontransitionend", - "ontransitionrun", - "ontransitionstart", - "onunhandledrejection", - "onunload", - "onunmute", - "onupdate", - "onupdateend", - "onupdatefound", - "onupdateready", - "onupdatestart", - "onupgradeneeded", - "onuserproximity", - "onversionchange", - "onvisibilitychange", - "onvoiceschanged", - "onvolumechange", - "onvrdisplayactivate", - "onvrdisplayconnect", - "onvrdisplaydeactivate", - "onvrdisplaydisconnect", - "onvrdisplaypresentchange", - "onwaiting", - "onwaitingforkey", - "onwarning", - "onwebkitanimationend", - "onwebkitanimationiteration", - "onwebkitanimationstart", - "onwebkitcurrentplaybacktargetiswirelesschanged", - "onwebkitfullscreenchange", - "onwebkitfullscreenerror", - "onwebkitkeyadded", - "onwebkitkeyerror", - "onwebkitkeymessage", - "onwebkitmouseforcechanged", - "onwebkitmouseforcedown", - "onwebkitmouseforceup", - "onwebkitmouseforcewillbegin", - "onwebkitneedkey", - "onwebkitorientationchange", - "onwebkitplaybacktargetavailabilitychanged", - "onwebkitpointerlockchange", - "onwebkitpointerlockerror", - "onwebkitresourcetimingbufferfull", - "onwebkittransitionend", - "onwheel", - "onzoom", - "opacity", - "open", - "openCursor", - "openDatabase", - "openKeyCursor", - "opened", - "opener", - "opera", - "operationType", - "operator", - "opr", - "opsProfile", - "optimum", - "options", - "or", - "order", - "orderX", - "orderY", - "ordered", - "org", - "organization", - "orient", - "orientAngle", - "orientType", - "orientation", - "orientationX", - "orientationY", - "orientationZ", - "origin", - "originalPolicy", - "originalTarget", - "orphans", - "oscpu", - "outcome", - "outerHTML", - "outerHeight", - "outerText", - "outerWidth", - "outline", - "outline-color", - "outline-offset", - "outline-style", - "outline-width", - "outlineColor", - "outlineOffset", - "outlineStyle", - "outlineWidth", - "outputBuffer", - "outputLatency", - "outputs", - "overflow", - "overflow-anchor", - "overflow-block", - "overflow-inline", - "overflow-wrap", - "overflow-x", - "overflow-y", - "overflowAnchor", - "overflowBlock", - "overflowInline", - "overflowWrap", - "overflowX", - "overflowY", - "overrideMimeType", - "oversample", - "overscroll-behavior", - "overscroll-behavior-block", - "overscroll-behavior-inline", - "overscroll-behavior-x", - "overscroll-behavior-y", - "overscrollBehavior", - "overscrollBehaviorBlock", - "overscrollBehaviorInline", - "overscrollBehaviorX", - "overscrollBehaviorY", - "ownKeys", - "ownerDocument", - "ownerElement", - "ownerNode", - "ownerRule", - "ownerSVGElement", - "owningElement", - "p1", - "p2", - "p3", - "p4", - "packetSize", - "packets", - "pad", - "padEnd", - "padStart", - "padding", - "padding-block", - "padding-block-end", - "padding-block-start", - "padding-bottom", - "padding-inline", - "padding-inline-end", - "padding-inline-start", - "padding-left", - "padding-right", - "padding-top", - "paddingBlock", - "paddingBlockEnd", - "paddingBlockStart", - "paddingBottom", - "paddingInline", - "paddingInlineEnd", - "paddingInlineStart", - "paddingLeft", - "paddingRight", - "paddingTop", - "page", - "page-break-after", - "page-break-before", - "page-break-inside", - "pageBreakAfter", - "pageBreakBefore", - "pageBreakInside", - "pageCount", - "pageLeft", - "pageT", - "pageTop", - "pageX", - "pageXOffset", - "pageY", - "pageYOffset", - "pages", - "paint-order", - "paintOrder", - "paintRequests", - "paintType", - "paintWorklet", - "palette", - "pan", - "panningModel", - "parameters", - "parent", - "parentElement", - "parentNode", - "parentRule", - "parentStyleSheet", - "parentTextEdit", - "parentWindow", - "parse", - "parseAll", - "parseFloat", - "parseFromString", - "parseInt", - "part", - "participants", - "passive", - "password", - "pasteHTML", - "path", - "pathLength", - "pathSegList", - "pathSegType", - "pathSegTypeAsLetter", - "pathname", - "pattern", - "patternContentUnits", - "patternMismatch", - "patternTransform", - "patternUnits", - "pause", - "pauseAnimations", - "pauseOnExit", - "pauseTransformFeedback", - "paused", - "payerEmail", - "payerName", - "payerPhone", - "paymentManager", - "pc", - "peerIdentity", - "pending", - "pendingLocalDescription", - "pendingRemoteDescription", - "percent", - "performance", - "periodicSync", - "permission", - "permissionState", - "permissions", - "persist", - "persisted", - "personalbar", - "perspective", - "perspective-origin", - "perspectiveOrigin", - "perspectiveOriginX", - "perspectiveOriginY", - "phone", - "phoneticFamilyName", - "phoneticGivenName", - "photo", - "pictureInPictureElement", - "pictureInPictureEnabled", - "pictureInPictureWindow", - "ping", - "pipeThrough", - "pipeTo", - "pitch", - "pixelBottom", - "pixelDepth", - "pixelHeight", - "pixelLeft", - "pixelRight", - "pixelStorei", - "pixelTop", - "pixelUnitToMillimeterX", - "pixelUnitToMillimeterY", - "pixelWidth", - "place-content", - "place-items", - "place-self", - "placeContent", - "placeItems", - "placeSelf", - "placeholder", - "platform", - "platforms", - "play", - "playEffect", - "playState", - "playbackRate", - "playbackState", - "playbackTime", - "played", - "playoutDelayHint", - "playsInline", - "plugins", - "pluginspage", - "pname", - "pointer-events", - "pointerBeforeReferenceNode", - "pointerEnabled", - "pointerEvents", - "pointerId", - "pointerLockElement", - "pointerType", - "points", - "pointsAtX", - "pointsAtY", - "pointsAtZ", - "polygonOffset", - "pop", - "populateMatrix", - "popupWindowFeatures", - "popupWindowName", - "popupWindowURI", - "port", - "port1", - "port2", - "ports", - "posBottom", - "posHeight", - "posLeft", - "posRight", - "posTop", - "posWidth", - "pose", - "position", - "positionAlign", - "positionX", - "positionY", - "positionZ", - "postError", - "postMessage", - "postalCode", - "poster", - "pow", - "powerEfficient", - "powerOff", - "preMultiplySelf", - "precision", - "preferredStyleSheetSet", - "preferredStylesheetSet", - "prefix", - "preload", - "prepend", - "presentation", - "preserveAlpha", - "preserveAspectRatio", - "preserveAspectRatioString", - "pressed", - "pressure", - "prevValue", - "preventDefault", - "preventExtensions", - "preventSilentAccess", - "previousElementSibling", - "previousNode", - "previousPage", - "previousRect", - "previousScale", - "previousSibling", - "previousTranslate", - "primaryKey", - "primitiveType", - "primitiveUnits", - "principals", - "print", - "priority", - "privateKey", - "probablySupportsContext", - "process", - "processIceMessage", - "processingEnd", - "processingStart", - "product", - "productId", - "productName", - "productSub", - "profile", - "profileEnd", - "profiles", - "projectionMatrix", - "promise", - "prompt", - "properties", - "propertyIsEnumerable", - "propertyName", - "protocol", - "protocolLong", - "prototype", - "provider", - "pseudoClass", - "pseudoElement", - "pt", - "publicId", - "publicKey", - "published", - "pulse", - "push", - "pushManager", - "pushNotification", - "pushState", - "put", - "putImageData", - "px", - "quadraticCurveTo", - "qualifier", - "quaternion", - "query", - "queryCommandEnabled", - "queryCommandIndeterm", - "queryCommandState", - "queryCommandSupported", - "queryCommandText", - "queryCommandValue", - "querySelector", - "querySelectorAll", - "queryUsageAndQuota", - "queueMicrotask", - "quote", - "quotes", - "r", - "r1", - "r2", - "race", - "rad", - "radiogroup", - "radiusX", - "radiusY", - "random", - "range", - "rangeCount", - "rangeMax", - "rangeMin", - "rangeOffset", - "rangeOverflow", - "rangeParent", - "rangeUnderflow", - "rate", - "ratio", - "raw", - "rawId", - "read", - "readAsArrayBuffer", - "readAsBinaryString", - "readAsBlob", - "readAsDataURL", - "readAsText", - "readBuffer", - "readEntries", - "readOnly", - "readPixels", - "readReportRequested", - "readText", - "readTransaction", - "readValue", - "readable", - "ready", - "readyState", - "reason", - "reboot", - "receivedAlert", - "receivedTime", - "receiver", - "receivers", - "recipient", - "reconnect", - "record", - "recordEnd", - "recordNumber", - "recordsAvailable", - "recordset", - "rect", - "red", - "redEyeReduction", - "redirect", - "redirectCount", - "redirectEnd", - "redirectStart", - "redirected", - "reduce", - "reduceRight", - "reduction", - "refDistance", - "refX", - "refY", - "referenceNode", - "referenceSpace", - "referrer", - "referrerPolicy", - "refresh", - "region", - "regionAnchorX", - "regionAnchorY", - "regionId", - "regions", - "register", - "registerContentHandler", - "registerElement", - "registerProperty", - "registerProtocolHandler", - "reject", - "rel", - "relList", - "relatedAddress", - "relatedNode", - "relatedPort", - "relatedTarget", - "release", - "releaseCapture", - "releaseEvents", - "releaseInterface", - "releaseLock", - "releasePointerCapture", - "releaseShaderCompiler", - "reliable", - "reliableWrite", - "reload", - "rem", - "remainingSpace", - "remote", - "remoteDescription", - "remove", - "removeAllRanges", - "removeAttribute", - "removeAttributeNS", - "removeAttributeNode", - "removeBehavior", - "removeChild", - "removeCue", - "removeEventListener", - "removeFilter", - "removeImport", - "removeItem", - "removeListener", - "removeNamedItem", - "removeNamedItemNS", - "removeNode", - "removeParameter", - "removeProperty", - "removeRange", - "removeRegion", - "removeRule", - "removeRules", - "removeSiteSpecificTrackingException", - "removeSourceBuffer", - "removeStream", - "removeTrack", - "removeVariable", - "removeWakeLockListener", - "removeWebWideTrackingException", - "removed", - "removedNodes", - "renderHeight", - "renderState", - "renderTime", - "renderWidth", - "renderbufferStorage", - "renderbufferStorageMultisample", - "renderedBuffer", - "renderingMode", - "renotify", - "repeat", - "replace", - "replaceAdjacentText", - "replaceAll", - "replaceChild", - "replaceChildren", - "replaceData", - "replaceId", - "replaceItem", - "replaceNode", - "replaceState", - "replaceSync", - "replaceTrack", - "replaceWholeText", - "replaceWith", - "reportValidity", - "request", - "requestAnimationFrame", - "requestAutocomplete", - "requestData", - "requestDevice", - "requestFrame", - "requestFullscreen", - "requestHitTestSource", - "requestHitTestSourceForTransientInput", - "requestId", - "requestIdleCallback", - "requestMIDIAccess", - "requestMediaKeySystemAccess", - "requestPermission", - "requestPictureInPicture", - "requestPointerLock", - "requestPresent", - "requestQuota", - "requestReferenceSpace", - "requestSession", - "requestStart", - "requestStorageAccess", - "requestSubmit", - "requestTime", - "requestVideoFrameCallback", - "requestedLocale", - "requestingWindow", - "requireInteraction", - "required", - "requiredExtensions", - "requiredFeatures", - "reset", - "resetPose", - "resetTransform", - "resize", - "resizeBy", - "resizeTo", - "resolve", - "resolved", - "resolvedOptions", - "resource-history", - "resourcesFramesExpanded", - "response", - "responseBody", - "responseEnd", - "responseReady", - "responseStart", - "responseText", - "responseType", - "responseURL", - "responseXML", - "restartIce", - "restore", - "result", - "resultIndex", - "resultType", - "results", - "resume", - "resumeTransformFeedback", - "retry", - "returnValue", - "rev", - "reverse", - "reversed", - "revocable", - "revokeObjectURL", - "rgbColor", - "right", - "rightContext", - "rightDegrees", - "rightMargin", - "rightProjectionMatrix", - "rightViewMatrix", - "role", - "rolloffFactor", - "root", - "rootBounds", - "rootElement", - "rootMargin", - "rotate", - "rotateAxisAngle", - "rotateAxisAngleSelf", - "rotateFromVector", - "rotateFromVectorSelf", - "rotateSelf", - "rotation", - "rotationAngle", - "rotationRate", - "round", - "row-gap", - "rowGap", - "rowIndex", - "rowSpan", - "rows", - "rowsAffected", - "rtcpTransport", - "rtt", - "ruby-align", - "ruby-position", - "rubyAlign", - "rubyOverhang", - "rubyPosition", - "rules", - "runningState", - "runtime", - "runtimeStyle", - "rx", - "ry", - "s", - "safari", - "sample", - "sampleCoverage", - "sampleRate", - "samplerParameterf", - "samplerParameteri", - "sandbox", - "save", - "saveData", - "scale", - "scale3d", - "scale3dSelf", - "scaleNonUniform", - "scaleNonUniformSelf", - "scaleSelf", - "scheme", - "scissor", - "scope", - "scopeName", - "scoped", - "screen", - "screenBrightness", - "screenEnabled", - "screenLeft", - "screenPixelToMillimeterX", - "screenPixelToMillimeterY", - "screenTop", - "screenX", - "screenY", - "script", - "scriptURL", - "scripts", - "scroll", - "scroll-behavior", - "scroll-margin", - "scroll-margin-block", - "scroll-margin-block-end", - "scroll-margin-block-start", - "scroll-margin-bottom", - "scroll-margin-inline", - "scroll-margin-inline-end", - "scroll-margin-inline-start", - "scroll-margin-left", - "scroll-margin-right", - "scroll-margin-top", - "scroll-padding", - "scroll-padding-block", - "scroll-padding-block-end", - "scroll-padding-block-start", - "scroll-padding-bottom", - "scroll-padding-inline", - "scroll-padding-inline-end", - "scroll-padding-inline-start", - "scroll-padding-left", - "scroll-padding-right", - "scroll-padding-top", - "scroll-snap-align", - "scroll-snap-coordinate", - "scroll-snap-destination", - "scroll-snap-points-x", - "scroll-snap-points-y", - "scroll-snap-type", - "scroll-snap-type-x", - "scroll-snap-type-y", - "scrollAmount", - "scrollBehavior", - "scrollBy", - "scrollByLines", - "scrollByPages", - "scrollDelay", - "scrollHeight", - "scrollIntoView", - "scrollIntoViewIfNeeded", - "scrollLeft", - "scrollLeftMax", - "scrollMargin", - "scrollMarginBlock", - "scrollMarginBlockEnd", - "scrollMarginBlockStart", - "scrollMarginBottom", - "scrollMarginInline", - "scrollMarginInlineEnd", - "scrollMarginInlineStart", - "scrollMarginLeft", - "scrollMarginRight", - "scrollMarginTop", - "scrollMaxX", - "scrollMaxY", - "scrollPadding", - "scrollPaddingBlock", - "scrollPaddingBlockEnd", - "scrollPaddingBlockStart", - "scrollPaddingBottom", - "scrollPaddingInline", - "scrollPaddingInlineEnd", - "scrollPaddingInlineStart", - "scrollPaddingLeft", - "scrollPaddingRight", - "scrollPaddingTop", - "scrollRestoration", - "scrollSnapAlign", - "scrollSnapCoordinate", - "scrollSnapDestination", - "scrollSnapMargin", - "scrollSnapMarginBottom", - "scrollSnapMarginLeft", - "scrollSnapMarginRight", - "scrollSnapMarginTop", - "scrollSnapPointsX", - "scrollSnapPointsY", - "scrollSnapStop", - "scrollSnapType", - "scrollSnapTypeX", - "scrollSnapTypeY", - "scrollTo", - "scrollTop", - "scrollTopMax", - "scrollWidth", - "scrollX", - "scrollY", - "scrollbar-color", - "scrollbar-width", - "scrollbar3dLightColor", - "scrollbarArrowColor", - "scrollbarBaseColor", - "scrollbarColor", - "scrollbarDarkShadowColor", - "scrollbarFaceColor", - "scrollbarHighlightColor", - "scrollbarShadowColor", - "scrollbarTrackColor", - "scrollbarWidth", - "scrollbars", - "scrolling", - "scrollingElement", - "sctp", - "sctpCauseCode", - "sdp", - "sdpLineNumber", - "sdpMLineIndex", - "sdpMid", - "seal", - "search", - "searchBox", - "searchBoxJavaBridge_", - "searchParams", - "second", - "sectionRowIndex", - "secureConnectionStart", - "security", - "seed", - "seekToNextFrame", - "seekable", - "seeking", - "select", - "selectAllChildren", - "selectAlternateInterface", - "selectConfiguration", - "selectNode", - "selectNodeContents", - "selectNodes", - "selectSingleNode", - "selectSubString", - "selected", - "selectedIndex", - "selectedOption", - "selectedOptions", - "selectedStyleSheetSet", - "selectedStylesheetSet", - "selection", - "selectionDirection", - "selectionEnd", - "selectionStart", - "selector", - "selectorText", - "self", - "send", - "sendAsBinary", - "sendBeacon", - "sendMessage", - "sender", - "sensitivity", - "sentAlert", - "sentTimestamp", - "separator", - "serialNumber", - "serializeToString", - "serverTiming", - "service", - "serviceWorker", - "session", - "sessionId", - "sessionStorage", - "set", - "setActionHandler", - "setActive", - "setAlpha", - "setAppBadge", - "setAttribute", - "setAttributeNS", - "setAttributeNode", - "setAttributeNodeNS", - "setBaseAndExtent", - "setBigInt64", - "setBigUint64", - "setBingCurrentSearchDefault", - "setCapture", - "setCodecPreferences", - "setColor", - "setCompositeOperation", - "setConfiguration", - "setCurrentTime", - "setCustomValidity", - "setData", - "setDate", - "setDirection", - "setDragImage", - "setEnd", - "setEndAfter", - "setEndBefore", - "setEndPoint", - "setFillColor", - "setFilterRes", - "setFloat32", - "setFloat64", - "setFloatValue", - "setFormValue", - "setFullYear", - "setHeaderValue", - "setHours", - "setIdentityProvider", - "setImmediate", - "setInt16", - "setInt32", - "setInt8", - "setInterval", - "setItem", - "setKeyframes", - "setLineCap", - "setLineDash", - "setLineJoin", - "setLineWidth", - "setLiveSeekableRange", - "setLocalDescription", - "setMatrix", - "setMatrixValue", - "setMediaKeys", - "setMilliseconds", - "setMinutes", - "setMiterLimit", - "setMonth", - "setNamedItem", - "setNamedItemNS", - "setNonUserCodeExceptions", - "setOrientToAngle", - "setOrientToAuto", - "setOrientation", - "setOverrideHistoryNavigationMode", - "setPaint", - "setParameter", - "setParameters", - "setPeriodicWave", - "setPointerCapture", - "setPosition", - "setPositionState", - "setPreference", - "setProperty", - "setPrototypeOf", - "setRGBColor", - "setRGBColorICCColor", - "setRadius", - "setRangeText", - "setRemoteDescription", - "setRequestHeader", - "setResizable", - "setResourceTimingBufferSize", - "setRotate", - "setScale", - "setSeconds", - "setSelectionRange", - "setServerCertificate", - "setShadow", - "setSinkId", - "setSkewX", - "setSkewY", - "setStart", - "setStartAfter", - "setStartBefore", - "setStdDeviation", - "setStreams", - "setStringValue", - "setStrokeColor", - "setSuggestResult", - "setTargetAtTime", - "setTargetValueAtTime", - "setTime", - "setTimeout", - "setTransform", - "setTranslate", - "setUTCDate", - "setUTCFullYear", - "setUTCHours", - "setUTCMilliseconds", - "setUTCMinutes", - "setUTCMonth", - "setUTCSeconds", - "setUint16", - "setUint32", - "setUint8", - "setUri", - "setValidity", - "setValueAtTime", - "setValueCurveAtTime", - "setVariable", - "setVelocity", - "setVersion", - "setYear", - "settingName", - "settingValue", - "sex", - "shaderSource", - "shadowBlur", - "shadowColor", - "shadowOffsetX", - "shadowOffsetY", - "shadowRoot", - "shape", - "shape-image-threshold", - "shape-margin", - "shape-outside", - "shape-rendering", - "shapeImageThreshold", - "shapeMargin", - "shapeOutside", - "shapeRendering", - "sheet", - "shift", - "shiftKey", - "shiftLeft", - "shippingAddress", - "shippingOption", - "shippingType", - "show", - "showHelp", - "showModal", - "showModalDialog", - "showModelessDialog", - "showNotification", - "sidebar", - "sign", - "signal", - "signalingState", - "signature", - "silent", - "sin", - "singleNodeValue", - "sinh", - "sinkId", - "sittingToStandingTransform", - "size", - "sizeToContent", - "sizeX", - "sizeZ", - "sizes", - "skewX", - "skewXSelf", - "skewY", - "skewYSelf", - "slice", - "slope", - "slot", - "small", - "smil", - "smooth", - "smoothingTimeConstant", - "snapToLines", - "snapshotItem", - "snapshotLength", - "some", - "sort", - "sortingCode", - "source", - "sourceBuffer", - "sourceBuffers", - "sourceCapabilities", - "sourceFile", - "sourceIndex", - "sourceURL", - "sources", - "spacing", - "span", - "speak", - "speakAs", - "speaking", - "species", - "specified", - "specularConstant", - "specularExponent", - "speechSynthesis", - "speed", - "speedOfSound", - "spellcheck", - "splice", - "split", - "splitText", - "spreadMethod", - "sqrt", - "src", - "srcElement", - "srcFilter", - "srcObject", - "srcUrn", - "srcdoc", - "srclang", - "srcset", - "stack", - "stackTraceLimit", - "stacktrace", - "stageParameters", - "standalone", - "standby", - "start", - "startContainer", - "startE", - "startIce", - "startLoadTime", - "startMessages", - "startNotifications", - "startOffset", - "startRendering", - "startSoftwareUpdate", - "startTime", - "startsWith", - "state", - "status", - "statusCode", - "statusMessage", - "statusText", - "statusbar", - "stdDeviationX", - "stdDeviationY", - "stencilFunc", - "stencilFuncSeparate", - "stencilMask", - "stencilMaskSeparate", - "stencilOp", - "stencilOpSeparate", - "step", - "stepDown", - "stepMismatch", - "stepUp", - "sticky", - "stitchTiles", - "stop", - "stop-color", - "stop-opacity", - "stopColor", - "stopImmediatePropagation", - "stopNotifications", - "stopOpacity", - "stopPropagation", - "stopped", - "storage", - "storageArea", - "storageName", - "storageStatus", - "store", - "storeSiteSpecificTrackingException", - "storeWebWideTrackingException", - "stpVersion", - "stream", - "streams", - "strength", - "stretch", - "strike", - "stringValue", - "stringify", - "stroke", - "stroke-dasharray", - "stroke-dashoffset", - "stroke-linecap", - "stroke-linejoin", - "stroke-miterlimit", - "stroke-opacity", - "stroke-width", - "strokeColor", - "strokeDasharray", - "strokeDashoffset", - "strokeLinecap", - "strokeLinejoin", - "strokeMiterlimit", - "strokeOpacity", - "strokeRect", - "strokeStyle", - "strokeText", - "strokeWidth", - "style", - "styleFloat", - "styleMap", - "styleMedia", - "styleSheet", - "styleSheetSets", - "styleSheets", - "sub", - "subarray", - "subject", - "submit", - "submitFrame", - "submitter", - "subscribe", - "substr", - "substring", - "substringData", - "subtle", - "subtree", - "suffix", - "suffixes", - "summary", - "sup", - "supported", - "supportedContentEncodings", - "supportedEntryTypes", - "supportedLocalesOf", - "supports", - "supportsSession", - "surfaceScale", - "surroundContents", - "suspend", - "suspendRedraw", - "swapCache", - "swapNode", - "sweepFlag", - "symbols", - "sync", - "sysexEnabled", - "system", - "systemCode", - "systemId", - "systemLanguage", - "systemXDPI", - "systemYDPI", - "tBodies", - "tFoot", - "tHead", - "tabIndex", - "tabSize", - "table", - "table-layout", - "tableLayout", - "tableValues", - "tag", - "tagName", - "tagUrn", - "tags", - "taintEnabled", - "takeHeapSnapshot", - "takePhoto", - "takeRecords", - "tan", - "tangentialPressure", - "tanh", - "target", - "targetElement", - "targetRayMode", - "targetRaySpace", - "targetTouches", - "targetX", - "targetY", - "tcpType", - "tee", - "tel", - "terminate", - "test", - "texImage2D", - "texImage3D", - "texParameterf", - "texParameteri", - "texStorage2D", - "texStorage3D", - "texSubImage2D", - "texSubImage3D", - "text", - "text-align", - "text-align-last", - "text-anchor", - "text-combine-upright", - "text-decoration", - "text-decoration-color", - "text-decoration-line", - "text-decoration-skip-ink", - "text-decoration-style", - "text-decoration-thickness", - "text-emphasis", - "text-emphasis-color", - "text-emphasis-position", - "text-emphasis-style", - "text-indent", - "text-justify", - "text-orientation", - "text-overflow", - "text-rendering", - "text-shadow", - "text-transform", - "text-underline-offset", - "text-underline-position", - "text/pdf", - "textAlign", - "textAlignLast", - "textAnchor", - "textAutospace", - "textBaseline", - "textCombineUpright", - "textContent", - "textDecoration", - "textDecorationBlink", - "textDecorationColor", - "textDecorationLine", - "textDecorationLineThrough", - "textDecorationNone", - "textDecorationOverline", - "textDecorationSkipInk", - "textDecorationStyle", - "textDecorationThickness", - "textDecorationUnderline", - "textEmphasis", - "textEmphasisColor", - "textEmphasisPosition", - "textEmphasisStyle", - "textIndent", - "textJustify", - "textJustifyTrim", - "textKashida", - "textKashidaSpace", - "textLength", - "textOrientation", - "textOverflow", - "textRendering", - "textShadow", - "textSizeAdjust", - "textTracks", - "textTransform", - "textUnderlineOffset", - "textUnderlinePosition", - "then", - "threadId", - "threshold", - "thresholds", - "tiltX", - "tiltY", - "time", - "timeEnd", - "timeLog", - "timeOrigin", - "timeRemaining", - "timeStamp", - "timeZone", - "timeZoneName", - "timecode", - "timeline", - "timelineEnd", - "timelineTime", - "timeout", - "timestamp", - "timestampOffset", - "timing", - "title", - "to", - "toArray", - "toBlob", - "toDataURL", - "toDateString", - "toElement", - "toExponential", - "toFixed", - "toFloat32Array", - "toFloat64Array", - "toGMTString", - "toISOString", - "toJSON", - "toLocaleDateString", - "toLocaleFormat", - "toLocaleLowerCase", - "toLocaleString", - "toLocaleTimeString", - "toLocaleUpperCase", - "toLowerCase", - "toMatrix", - "toMethod", - "toPrecision", - "toPrimitive", - "toSdp", - "toSource", - "toStaticHTML", - "toString", - "toStringTag", - "toSum", - "toTimeString", - "toUTCString", - "toUpperCase", - "toggle", - "toggleAttribute", - "toggleLongPressEnabled", - "tone", - "toneBuffer", - "tooLong", - "tooShort", - "toolbar", - "top", - "topMargin", - "total", - "totalFrameDelay", - "totalJSHeapSize", - "totalSize", - "totalVideoFrames", - "touch-action", - "touchAction", - "touched", - "touches", - "trace", - "track", - "trackVisibility", - "tran", - "transaction", - "transactions", - "transceiver", - "transferControlToOffscreen", - "transferFromImageBitmap", - "transferImageBitmap", - "transferIn", - "transferOut", - "transferSize", - "transferToImageBitmap", - "transform", - "transform-box", - "transform-origin", - "transform-style", - "transformBox", - "transformFeedbackVaryings", - "transformOrigin", - "transformOriginX", - "transformOriginY", - "transformOriginZ", - "transformPoint", - "transformString", - "transformStyle", - "transformToDocument", - "transformToFragment", - "transition", - "transition-delay", - "transition-duration", - "transition-property", - "transition-timing-function", - "transitionDelay", - "transitionDuration", - "transitionProperty", - "transitionTimingFunction", - "translate", - "translateSelf", - "translationX", - "translationY", - "transport", - "trim", - "trimEnd", - "trimLeft", - "trimRight", - "trimStart", - "trueSpeed", - "trunc", - "truncate", - "trustedTypes", - "turn", - "twist", - "type", - "typeDetail", - "typeMismatch", - "typeMustMatch", - "types", - "tz", - "u2f", - "ubound", - "undefined", - "unescape", - "uneval", - "unicode", - "unicode-bidi", - "unicodeBidi", - "unicodeRange", - "uniform1f", - "uniform1fv", - "uniform1i", - "uniform1iv", - "uniform1ui", - "uniform1uiv", - "uniform2f", - "uniform2fv", - "uniform2i", - "uniform2iv", - "uniform2ui", - "uniform2uiv", - "uniform3f", - "uniform3fv", - "uniform3i", - "uniform3iv", - "uniform3ui", - "uniform3uiv", - "uniform4f", - "uniform4fv", - "uniform4i", - "uniform4iv", - "uniform4ui", - "uniform4uiv", - "uniformBlockBinding", - "uniformMatrix2fv", - "uniformMatrix2x3fv", - "uniformMatrix2x4fv", - "uniformMatrix3fv", - "uniformMatrix3x2fv", - "uniformMatrix3x4fv", - "uniformMatrix4fv", - "uniformMatrix4x2fv", - "uniformMatrix4x3fv", - "unique", - "uniqueID", - "uniqueNumber", - "unit", - "unitType", - "units", - "unloadEventEnd", - "unloadEventStart", - "unlock", - "unmount", - "unobserve", - "unpause", - "unpauseAnimations", - "unreadCount", - "unregister", - "unregisterContentHandler", - "unregisterProtocolHandler", - "unscopables", - "unselectable", - "unshift", - "unsubscribe", - "unsuspendRedraw", - "unsuspendRedrawAll", - "unwatch", - "unwrapKey", - "upDegrees", - "upX", - "upY", - "upZ", - "update", - "updateCommands", - "updateEnabled", - "updateIce", - "updateInterval", - "updatePlaybackRate", - "updateRenderState", - "updateSettings", - "updateTiming", - "updateViaCache", - "updateWith", - "updated", - "updating", - "upgrade", - "upload", - "uploadTotal", - "uploaded", - "upper", - "upperBound", - "upperOpen", - "uri", - "url", - "urn", - "urns", - "usage", - "usages", - "usb", - "usbVersionMajor", - "usbVersionMinor", - "usbVersionSubminor", - "useCurrentView", - "useGrouping", - "useMap", - "useProgram", - "usedJSHeapSize", - "usedSpace", - "user-select", - "userActivation", - "userAgent", - "userChoice", - "userHandle", - "userHint", - "userLanguage", - "userProfile", - "userSelect", - "userVisibleOnly", - "userZoom", - "username", - "usernameFragment", - "utterance", - "uuid", - "v8BreakIterator", - "v8Parse", - "vAlign", - "vLink", - "valid", - "validate", - "validateProgram", - "validationMessage", - "validity", - "value", - "valueAsDate", - "valueAsNumber", - "valueAsString", - "valueInSpecifiedUnits", - "valueMissing", - "valueOf", - "valueText", - "valueType", - "values", - "variable", - "variant", - "vector-effect", - "vectorEffect", - "velocityAngular", - "velocityExpansion", - "velocityX", - "velocityY", - "vendor", - "vendorId", - "vendorSub", - "verify", - "version", - "vertexAttrib1f", - "vertexAttrib1fv", - "vertexAttrib2f", - "vertexAttrib2fv", - "vertexAttrib3f", - "vertexAttrib3fv", - "vertexAttrib4f", - "vertexAttrib4fv", - "vertexAttribDivisor", - "vertexAttribDivisorANGLE", - "vertexAttribI4i", - "vertexAttribI4iv", - "vertexAttribI4ui", - "vertexAttribI4uiv", - "vertexAttribIPointer", - "vertexAttribPointer", - "vertical", - "vertical-align", - "verticalAlign", - "verticalOverflow", - "vh", - "vibrate", - "vibrationActuator", - "video/x-ms-asf", - "video/x-ms-asf-plugin", - "video/x-ms-wm", - "video/x-ms-wmv", - "video/x-ms-wvx", - "videoBitsPerSecond", - "videoHeight", - "videoTracks", - "videoWidth", - "view", - "viewBox", - "viewBoxString", - "viewTarget", - "viewTargetString", - "viewport", - "viewportAnchorX", - "viewportAnchorY", - "viewportElement", - "views", - "violatedDirective", - "visibility", - "visibilityState", - "visible", - "visualViewport", - "vlinkColor", - "vmax", - "vmin", - "voice", - "voiceURI", - "volume", - "vrml", - "vspace", - "vw", - "w", - "wait", - "waitSync", - "waiting", - "wake", - "wakeLock", - "wand", - "warn", - "wasAlternateProtocolAvailable", - "wasClean", - "wasDiscarded", - "wasFetchedViaSpdy", - "wasNpnNegotiated", - "watch", - "watchAvailability", - "watchPosition", - "webdriver", - "webkitAddKey", - "webkitAlignContent", - "webkitAlignItems", - "webkitAlignSelf", - "webkitAnimation", - "webkitAnimationDelay", - "webkitAnimationDirection", - "webkitAnimationDuration", - "webkitAnimationFillMode", - "webkitAnimationIterationCount", - "webkitAnimationName", - "webkitAnimationPlayState", - "webkitAnimationTimingFunction", - "webkitAppRegion", - "webkitAppearance", - "webkitAspectRatio", - "webkitAudioContext", - "webkitAudioDecodedByteCount", - "webkitAudioPannerNode", - "webkitBackdropFilter", - "webkitBackfaceVisibility", - "webkitBackground", - "webkitBackgroundAttachment", - "webkitBackgroundClip", - "webkitBackgroundColor", - "webkitBackgroundComposite", - "webkitBackgroundImage", - "webkitBackgroundOrigin", - "webkitBackgroundPosition", - "webkitBackgroundPositionX", - "webkitBackgroundPositionY", - "webkitBackgroundRepeat", - "webkitBackgroundSize", - "webkitBackingStorePixelRatio", - "webkitBorderAfter", - "webkitBorderAfterColor", - "webkitBorderAfterStyle", - "webkitBorderAfterWidth", - "webkitBorderBefore", - "webkitBorderBeforeColor", - "webkitBorderBeforeStyle", - "webkitBorderBeforeWidth", - "webkitBorderBottomLeftRadius", - "webkitBorderBottomRightRadius", - "webkitBorderEnd", - "webkitBorderEndColor", - "webkitBorderEndStyle", - "webkitBorderEndWidth", - "webkitBorderFit", - "webkitBorderHorizontalSpacing", - "webkitBorderImage", - "webkitBorderImageOutset", - "webkitBorderImageRepeat", - "webkitBorderImageSlice", - "webkitBorderImageSource", - "webkitBorderImageWidth", - "webkitBorderRadius", - "webkitBorderStart", - "webkitBorderStartColor", - "webkitBorderStartStyle", - "webkitBorderStartWidth", - "webkitBorderTopLeftRadius", - "webkitBorderTopRightRadius", - "webkitBorderVerticalSpacing", - "webkitBoxAlign", - "webkitBoxDecorationBreak", - "webkitBoxDirection", - "webkitBoxFlex", - "webkitBoxFlexGroup", - "webkitBoxLines", - "webkitBoxOrdinalGroup", - "webkitBoxOrient", - "webkitBoxPack", - "webkitBoxReflect", - "webkitBoxShadow", - "webkitBoxSizing", - "webkitCancelAnimationFrame", - "webkitCancelFullScreen", - "webkitCancelKeyRequest", - "webkitCancelRequestAnimationFrame", - "webkitClearResourceTimings", - "webkitClipPath", - "webkitClosedCaptionsVisible", - "webkitColumnAxis", - "webkitColumnBreakAfter", - "webkitColumnBreakBefore", - "webkitColumnBreakInside", - "webkitColumnCount", - "webkitColumnGap", - "webkitColumnProgression", - "webkitColumnRule", - "webkitColumnRuleColor", - "webkitColumnRuleStyle", - "webkitColumnRuleWidth", - "webkitColumnSpan", - "webkitColumnWidth", - "webkitColumns", - "webkitConvertPointFromNodeToPage", - "webkitConvertPointFromPageToNode", - "webkitCreateShadowRoot", - "webkitCurrentFullScreenElement", - "webkitCurrentPlaybackTargetIsWireless", - "webkitCursorVisibility", - "webkitDashboardRegion", - "webkitDecodedFrameCount", - "webkitDirectionInvertedFromDevice", - "webkitDisplayingFullscreen", - "webkitDroppedFrameCount", - "webkitEnterFullScreen", - "webkitEnterFullscreen", - "webkitEntries", - "webkitExitFullScreen", - "webkitExitFullscreen", - "webkitExitPointerLock", - "webkitFilter", - "webkitFlex", - "webkitFlexBasis", - "webkitFlexDirection", - "webkitFlexFlow", - "webkitFlexGrow", - "webkitFlexShrink", - "webkitFlexWrap", - "webkitFontFeatureSettings", - "webkitFontKerning", - "webkitFontSizeDelta", - "webkitFontSmoothing", - "webkitForce", - "webkitFullScreenKeyboardInputAllowed", - "webkitFullscreenElement", - "webkitFullscreenEnabled", - "webkitGenerateKeyRequest", - "webkitGetAsEntry", - "webkitGetDatabaseNames", - "webkitGetEntries", - "webkitGetEntriesByName", - "webkitGetEntriesByType", - "webkitGetFlowByName", - "webkitGetGamepads", - "webkitGetImageDataHD", - "webkitGetNamedFlows", - "webkitGetRegionFlowRanges", - "webkitGetUserMedia", - "webkitHasClosedCaptions", - "webkitHidden", - "webkitHighlight", - "webkitHyphenateCharacter", - "webkitHyphenateLimitAfter", - "webkitHyphenateLimitBefore", - "webkitHyphenateLimitLines", - "webkitHyphens", - "webkitIDBCursor", - "webkitIDBDatabase", - "webkitIDBDatabaseError", - "webkitIDBDatabaseException", - "webkitIDBFactory", - "webkitIDBIndex", - "webkitIDBKeyRange", - "webkitIDBObjectStore", - "webkitIDBRequest", - "webkitIDBTransaction", - "webkitImageSmoothingEnabled", - "webkitIndexedDB", - "webkitInitMessageEvent", - "webkitInitialLetter", - "webkitIsFullScreen", - "webkitJustifyContent", - "webkitKeys", - "webkitLineAlign", - "webkitLineBoxContain", - "webkitLineBreak", - "webkitLineClamp", - "webkitLineDash", - "webkitLineDashOffset", - "webkitLineGrid", - "webkitLineSnap", - "webkitLocale", - "webkitLockOrientation", - "webkitLogicalHeight", - "webkitLogicalWidth", - "webkitMarginAfter", - "webkitMarginAfterCollapse", - "webkitMarginBefore", - "webkitMarginBeforeCollapse", - "webkitMarginBottomCollapse", - "webkitMarginCollapse", - "webkitMarginEnd", - "webkitMarginStart", - "webkitMarginTopCollapse", - "webkitMarquee", - "webkitMarqueeDirection", - "webkitMarqueeIncrement", - "webkitMarqueeRepetition", - "webkitMarqueeSpeed", - "webkitMarqueeStyle", - "webkitMask", - "webkitMaskBoxImage", - "webkitMaskBoxImageOutset", - "webkitMaskBoxImageRepeat", - "webkitMaskBoxImageSlice", - "webkitMaskBoxImageSource", - "webkitMaskBoxImageWidth", - "webkitMaskClip", - "webkitMaskComposite", - "webkitMaskImage", - "webkitMaskOrigin", - "webkitMaskPosition", - "webkitMaskPositionX", - "webkitMaskPositionY", - "webkitMaskRepeat", - "webkitMaskRepeatX", - "webkitMaskRepeatY", - "webkitMaskSize", - "webkitMaskSourceType", - "webkitMatchesSelector", - "webkitMaxLogicalHeight", - "webkitMaxLogicalWidth", - "webkitMediaStream", - "webkitMinLogicalHeight", - "webkitMinLogicalWidth", - "webkitNbspMode", - "webkitNotifications", - "webkitOfflineAudioContext", - "webkitOpacity", - "webkitOrder", - "webkitOrientation", - "webkitPaddingAfter", - "webkitPaddingBefore", - "webkitPaddingEnd", - "webkitPaddingStart", - "webkitPeerConnection00", - "webkitPersistentStorage", - "webkitPerspective", - "webkitPerspectiveOrigin", - "webkitPerspectiveOriginX", - "webkitPerspectiveOriginY", - "webkitPointerLockElement", - "webkitPostMessage", - "webkitPreservesPitch", - "webkitPrintColorAdjust", - "webkitPutImageDataHD", - "webkitRTCPeerConnection", - "webkitRegionOverset", - "webkitRelativePath", - "webkitRequestAnimationFrame", - "webkitRequestFileSystem", - "webkitRequestFullScreen", - "webkitRequestFullscreen", - "webkitRequestPointerLock", - "webkitResolveLocalFileSystemURL", - "webkitRtlOrdering", - "webkitRubyPosition", - "webkitSetMediaKeys", - "webkitSetResourceTimingBufferSize", - "webkitShadowRoot", - "webkitShapeImageThreshold", - "webkitShapeMargin", - "webkitShapeOutside", - "webkitShowPlaybackTargetPicker", - "webkitSlice", - "webkitSpeechGrammar", - "webkitSpeechGrammarList", - "webkitSpeechRecognition", - "webkitSpeechRecognitionError", - "webkitSpeechRecognitionEvent", - "webkitStorageInfo", - "webkitSupportsFullscreen", - "webkitSvgShadow", - "webkitTapHighlightColor", - "webkitTemporaryStorage", - "webkitTextCombine", - "webkitTextDecoration", - "webkitTextDecorationColor", - "webkitTextDecorationLine", - "webkitTextDecorationSkip", - "webkitTextDecorationStyle", - "webkitTextDecorationsInEffect", - "webkitTextEmphasis", - "webkitTextEmphasisColor", - "webkitTextEmphasisPosition", - "webkitTextEmphasisStyle", - "webkitTextFillColor", - "webkitTextOrientation", - "webkitTextSecurity", - "webkitTextSizeAdjust", - "webkitTextStroke", - "webkitTextStrokeColor", - "webkitTextStrokeWidth", - "webkitTextUnderlinePosition", - "webkitTextZoom", - "webkitTransform", - "webkitTransformOrigin", - "webkitTransformOriginX", - "webkitTransformOriginY", - "webkitTransformOriginZ", - "webkitTransformStyle", - "webkitTransition", - "webkitTransitionDelay", - "webkitTransitionDuration", - "webkitTransitionProperty", - "webkitTransitionTimingFunction", - "webkitURL", - "webkitUnlockOrientation", - "webkitUserDrag", - "webkitUserModify", - "webkitUserSelect", - "webkitVideoDecodedByteCount", - "webkitVisibilityState", - "webkitWirelessVideoPlaybackDisabled", - "webkitWritingMode", - "webkitdirectory", - "webkitdropzone", - "webstore", - "weekday", - "weight", - "whatToShow", - "wheelDelta", - "wheelDeltaX", - "wheelDeltaY", - "whenDefined", - "which", - "white-space", - "whiteSpace", - "wholeText", - "widows", - "width", - "will-change", - "willChange", - "willValidate", - "window", - "withCredentials", - "word-break", - "word-spacing", - "word-wrap", - "wordBreak", - "wordSpacing", - "wordWrap", - "workerStart", - "wrap", - "wrapKey", - "writable", - "writableAuxiliaries", - "write", - "writeText", - "writeValue", - "writeWithoutResponse", - "writeln", - "writing-mode", - "writingMode", - "x", - "x1", - "x2", - "xChannelSelector", - "xmlEncoding", - "xmlStandalone", - "xmlVersion", - "xmlbase", - "xmllang", - "xmlspace", - "xor", - "xr", - "y", - "y1", - "y2", - "yChannelSelector", - "yandex", - "year", - "z", - "z-index", - "zIndex", - "zoom", - "zoomAndPan", - "zoomRectScreen" -] diff --git a/node_modules/uglify-js/tools/exports.js b/node_modules/uglify-js/tools/exports.js deleted file mode 100644 index 1d2d510e..00000000 --- a/node_modules/uglify-js/tools/exports.js +++ /dev/null @@ -1,8 +0,0 @@ -exports["Dictionary"] = Dictionary; -exports["is_statement"] = is_statement; -exports["List"] = List; -exports["minify"] = minify; -exports["parse"] = parse; -exports["push_uniq"] = push_uniq; -exports["TreeTransformer"] = TreeTransformer; -exports["TreeWalker"] = TreeWalker; diff --git a/node_modules/uglify-js/tools/node.js b/node_modules/uglify-js/tools/node.js deleted file mode 100644 index d75fe013..00000000 --- a/node_modules/uglify-js/tools/node.js +++ /dev/null @@ -1,110 +0,0 @@ -var fs = require("fs"); - -exports.FILES = [ - require.resolve("../lib/utils.js"), - require.resolve("../lib/ast.js"), - require.resolve("../lib/transform.js"), - require.resolve("../lib/parse.js"), - require.resolve("../lib/scope.js"), - require.resolve("../lib/compress.js"), - require.resolve("../lib/output.js"), - require.resolve("../lib/sourcemap.js"), - require.resolve("../lib/mozilla-ast.js"), - require.resolve("../lib/propmangle.js"), - require.resolve("../lib/minify.js"), - require.resolve("./exports.js"), -]; - -new Function("exports", function() { - var code = exports.FILES.map(function(file) { - return fs.readFileSync(file, "utf8"); - }); - code.push("exports.describe_ast = " + describe_ast.toString()); - return code.join("\n\n"); -}())(exports); - -function to_comment(value) { - if (typeof value != "string") value = JSON.stringify(value, function(key, value) { - return typeof value == "function" ? "<[ " + value + " ]>" : value; - }, 2); - return "// " + value.replace(/\n/g, "\n// "); -} - -if (+process.env["UGLIFY_BUG_REPORT"]) exports.minify = function(files, options) { - if (typeof options == "undefined") options = "<>"; - var code = [ - "// UGLIFY_BUG_REPORT", - to_comment(options), - ]; - if (typeof files == "string") { - code.push(""); - code.push("//-------------------------------------------------------------") - code.push("// INPUT CODE", files); - } else for (var name in files) { - code.push(""); - code.push("//-------------------------------------------------------------") - code.push(to_comment(name), files[name]); - } - if (options.sourceMap && options.sourceMap.url) { - code.push(""); - code.push("//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9"); - } - var result = { code: code.join("\n") }; - if (options.sourceMap) result.map = '{"version":3,"sources":[],"names":[],"mappings":""}'; - return result; -}; - -function describe_ast() { - var out = OutputStream({ beautify: true }); - doitem(AST_Node); - return out.get() + "\n"; - - function doitem(ctor) { - out.print("AST_" + ctor.TYPE); - var props = ctor.SELF_PROPS.filter(function(prop) { - return !/^\$/.test(prop); - }); - if (props.length > 0) { - out.space(); - out.with_parens(function() { - props.forEach(function(prop, i) { - if (i) out.space(); - out.print(prop); - }); - }); - } - if (ctor.documentation) { - out.space(); - out.print_string(ctor.documentation); - } - if (ctor.SUBCLASSES.length > 0) { - out.space(); - out.with_block(function() { - ctor.SUBCLASSES.sort(function(a, b) { - return a.TYPE < b.TYPE ? -1 : 1; - }).forEach(function(ctor, i) { - out.indent(); - doitem(ctor); - out.newline(); - }); - }); - } - } -} - -function infer_options(options) { - var result = exports.minify("", options); - return result.error && result.error.defs; -} - -exports.default_options = function() { - var defs = infer_options({ 0: 0 }); - Object.keys(defs).forEach(function(component) { - var options = {}; - options[component] = { 0: 0 }; - if (options = infer_options(options)) { - defs[component] = options; - } - }); - return defs; -}; diff --git a/node_modules/uglify-js/tools/tty.js b/node_modules/uglify-js/tools/tty.js deleted file mode 100644 index 395c48ec..00000000 --- a/node_modules/uglify-js/tools/tty.js +++ /dev/null @@ -1,22 +0,0 @@ -// workaround for tty output truncation on Node.js -try { - // prevent buffer overflow and other asynchronous bugs - process.stdout._handle.setBlocking(true); - process.stderr._handle.setBlocking(true); -} catch (e) { - // ensure output buffers are flushed before process termination - var exit = process.exit; - process.exit = function() { - var args = [].slice.call(arguments); - process.once("uncaughtException", function() { - (function callback() { - if (process.stdout.bufferSize || process.stderr.bufferSize) { - setTimeout(callback, 1); - } else { - exit.apply(process, args); - } - })(); - }); - throw exit; - }; -} diff --git a/node_modules/unc-path-regex/LICENSE b/node_modules/unc-path-regex/LICENSE deleted file mode 100644 index 65f90aca..00000000 --- a/node_modules/unc-path-regex/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/unc-path-regex/README.md b/node_modules/unc-path-regex/README.md deleted file mode 100644 index e0edddab..00000000 --- a/node_modules/unc-path-regex/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# unc-path-regex [![NPM version](https://badge.fury.io/js/unc-path-regex.svg)](http://badge.fury.io/js/unc-path-regex) [![Build Status](https://travis-ci.org/jonschlinkert/unc-path-regex.svg)](https://travis-ci.org/jonschlinkert/unc-path-regex) - -> Regular expression for testing if a file path is a windows UNC file path. Can also be used as a component of another regexp via the `.source` property. - -Visit the MSDN reference for [Common Data Types 2.2.57 UNC](https://msdn.microsoft.com/en-us/library/gg465305.aspx) for more information about UNC paths. - -## Install - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i unc-path-regex --save -``` - -## Usage - -```js -// unc-path-regex returns a function -var regex = require('unc-path-regex')(); -``` - -**true** - -Returns true for windows UNC paths: - -```js -regex.test('\\/foo/bar'); -regex.test('\\\\foo/bar'); -regex.test('\\\\foo\\admin$'); -regex.test('\\\\foo\\admin$\\system32'); -regex.test('\\\\foo\\temp'); -regex.test('\\\\/foo/bar'); -regex.test('\\\\\\/foo/bar'); -``` - -**false** - -Returns false for non-UNC paths: - -```js -regex.test('/foo/bar'); -regex.test('/'); -regex.test('/foo'); -regex.test('/foo/'); -regex.test('c:'); -regex.test('c:.'); -regex.test('c:./'); -regex.test('c:./file'); -regex.test('c:/'); -regex.test('c:/file'); -``` - -## Related projects - -* [dotfile-regex](https://github.com/regexps/dotfile-regex): Regular expresson for matching dotfiles. -* [dotdir-regex](https://github.com/regexps/dotdir-regex): Regex for matching dot-directories, like `.git/` -* [dirname-regex](https://github.com/regexps/dirname-regex): Regular expression for matching the directory part of a file path. -* [is-unc-path](https://github.com/jonschlinkert/is-unc-path): Returns true if a filepath is a windows UNC file path. -* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern. -* [path-regex](https://github.com/regexps/path-regex): Regular expression for matching the parts of a file path. - -## Running tests - -Install dev dependencies: - -```sh -$ npm i -d && npm test -``` - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/unc-path-regex/issues/new) - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2015 Jon Schlinkert -Released under the MIT license. - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 07, 2015._ \ No newline at end of file diff --git a/node_modules/unc-path-regex/index.js b/node_modules/unc-path-regex/index.js deleted file mode 100644 index c268404d..00000000 --- a/node_modules/unc-path-regex/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = function uncPathRegex() { - return /^[\\\/]{2,}[^\\\/]+[\\\/]+[^\\\/]+/; -}; diff --git a/node_modules/unc-path-regex/package.json b/node_modules/unc-path-regex/package.json deleted file mode 100644 index 6cd7acfb..00000000 --- a/node_modules/unc-path-regex/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "_from": "unc-path-regex@^0.1.2", - "_id": "unc-path-regex@0.1.2", - "_inBundle": false, - "_integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", - "_location": "/unc-path-regex", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "unc-path-regex@^0.1.2", - "name": "unc-path-regex", - "escapedName": "unc-path-regex", - "rawSpec": "^0.1.2", - "saveSpec": null, - "fetchSpec": "^0.1.2" - }, - "_requiredBy": [ - "/is-unc-path" - ], - "_resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "_shasum": "e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa", - "_spec": "unc-path-regex@^0.1.2", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/is-unc-path", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/regexhq/unc-path-regex/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Regular expression for testing if a file path is a windows UNC file path. Can also be used as a component of another regexp via the `.source` property.", - "devDependencies": { - "mocha": "*" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/regexhq/unc-path-regex", - "keywords": [ - "absolute", - "expression", - "file", - "filepath", - "match", - "matching", - "path", - "regex", - "regexp", - "regular", - "unc", - "win", - "windows" - ], - "license": "MIT", - "main": "index.js", - "name": "unc-path-regex", - "repository": { - "type": "git", - "url": "git+https://github.com/regexhq/unc-path-regex.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "dotfile-regex", - "is-unc-path", - "unc-path-regex", - "dotdir-regex", - "path-regex", - "dirname-regex", - "is-glob" - ] - } - }, - "version": "0.1.2" -} diff --git a/node_modules/unique-stream/LICENSE b/node_modules/unique-stream/LICENSE deleted file mode 100644 index cd2225ad..00000000 --- a/node_modules/unique-stream/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2014 Eugene Ware - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/unique-stream/README.md b/node_modules/unique-stream/README.md deleted file mode 100644 index afd49a0f..00000000 --- a/node_modules/unique-stream/README.md +++ /dev/null @@ -1,134 +0,0 @@ -# unique-stream - -node.js through stream that emits a unique stream of objects based on criteria - -[![Build Status](https://travis-ci.org/eugeneware/unique-stream.svg?branch=master)](https://travis-ci.org/eugeneware/unique-stream) -[![Coverage Status](https://coveralls.io/repos/eugeneware/unique-stream/badge.svg?branch=master&service=github)](https://coveralls.io/github/eugeneware/unique-stream?branch=master) - -## Installation - -Install via [npm](https://www.npmjs.com/): - -``` -$ npm install unique-stream -``` - -## Examples - -### Dedupe a ReadStream based on JSON.stringify: - -``` js -var unique = require('unique-stream') - , Stream = require('stream'); - -// return a stream of 3 identical objects -function makeStreamOfObjects() { - var s = new Stream; - s.readable = true; - var count = 3; - for (var i = 0; i < 3; i++) { - setImmediate(function () { - s.emit('data', { name: 'Bob', number: 123 }); - --count || end(); - }); - } - - function end() { - s.emit('end'); - } - - return s; -} - -// Will only print out one object as the rest are dupes. (Uses JSON.stringify) -makeStreamOfObjects() - .pipe(unique()) - .on('data', console.log); - -``` - -### Dedupe a ReadStream based on an object property: - -``` js -// Use name as the key field to dedupe on. Will only print one object -makeStreamOfObjects() - .pipe(unique('name')) - .on('data', console.log); -``` - -### Dedupe a ReadStream based on a custom function: - -``` js -// Use a custom function to dedupe on. Use the 'number' field. Will only print one object. -makeStreamOfObjects() - .pipe(function (data) { - return data.number; - }) - .on('data', console.log); -``` - -## Dedupe multiple streams - -The reason I wrote this was to dedupe multiple object streams: - -``` js -var aggregator = unique(); - -// Stream 1 -makeStreamOfObjects() - .pipe(aggregator); - -// Stream 2 -makeStreamOfObjects() - .pipe(aggregator); - -// Stream 3 -makeStreamOfObjects() - .pipe(aggregator); - -aggregator.on('data', console.log); -``` - -## Use a custom store to record keys that have been encountered - -By default a set is used to store keys encountered so far, in order to check new ones for -uniqueness. You can supply your own store instead, providing it supports the add(key) and -has(key) methods. This could allow you to use a persistent store so that already encountered -objects are not re-streamed when node is reloaded. - -``` js -var keyStore = { - store: {}, - - add: function(key) { - this.store[key] = true; - }, - - has: function(key) { - return this.store[key] !== undefined; - } -}; - -makeStreamOfObjects() - .pipe(unique('name', keyStore)) - .on('data', console.log); -``` - -## Contributing - -unique-stream is an **OPEN Open Source Project**. This means that: - -> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. - -See the [CONTRIBUTING.md](https://github.com/eugeneware/unique-stream/blob/master/CONTRIBUTING.md) file for more details. - -### Contributors - -unique-stream is only possible due to the excellent work of the following contributors: - - - - - - -
    Eugene WareGitHub/eugeneware
    Craig AmbroseGitHub/craigambrose
    Shinnosuke WatanabeGitHub/shinnn
    Rouven WeßlingGitHub/realityking
    diff --git a/node_modules/unique-stream/index.js b/node_modules/unique-stream/index.js deleted file mode 100644 index 13209b99..00000000 --- a/node_modules/unique-stream/index.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -var filter = require('through2-filter').obj; -var stringify = require("json-stable-stringify-without-jsonify"); - -var ES6Set; -if (typeof global.Set === 'function') { - ES6Set = global.Set; -} else { - ES6Set = function() { - this.keys = []; - this.has = function(val) { - return this.keys.indexOf(val) !== -1; - }, - this.add = function(val) { - this.keys.push(val); - } - } -} - -function prop(propName) { - return function (data) { - return data[propName]; - }; -} - -module.exports = unique; -function unique(propName, keyStore) { - keyStore = keyStore || new ES6Set(); - - var keyfn = stringify; - if (typeof propName === 'string') { - keyfn = prop(propName); - } else if (typeof propName === 'function') { - keyfn = propName; - } - - return filter(function (data) { - var key = keyfn(data); - - if (keyStore.has(key)) { - return false; - } - - keyStore.add(key); - return true; - }); -} diff --git a/node_modules/unique-stream/package.json b/node_modules/unique-stream/package.json deleted file mode 100644 index 1ae972f0..00000000 --- a/node_modules/unique-stream/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_from": "unique-stream@^2.0.2", - "_id": "unique-stream@2.3.1", - "_inBundle": false, - "_integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", - "_location": "/unique-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "unique-stream@^2.0.2", - "name": "unique-stream", - "escapedName": "unique-stream", - "rawSpec": "^2.0.2", - "saveSpec": null, - "fetchSpec": "^2.0.2" - }, - "_requiredBy": [ - "/glob-stream" - ], - "_resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", - "_shasum": "c65d110e9a4adf9a6c5948b28053d9a8d04cbeac", - "_spec": "unique-stream@^2.0.2", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/glob-stream", - "author": { - "name": "Eugene Ware", - "email": "eugene@noblesamurai.com" - }, - "bugs": { - "url": "https://github.com/eugeneware/unique-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "json-stable-stringify-without-jsonify": "^1.0.1", - "through2-filter": "^3.0.0" - }, - "deprecated": false, - "description": "node.js through stream that emits a unique stream of objects based on criteria", - "devDependencies": { - "after": "~0.8.1", - "chai": "^4.2.0", - "istanbul": "^0.4.5", - "mocha": "^5.2.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/eugeneware/unique-stream#readme", - "keywords": [ - "unique", - "stream", - "unique-stream", - "streaming", - "streams" - ], - "license": "MIT", - "name": "unique-stream", - "repository": { - "type": "git", - "url": "git+https://github.com/eugeneware/unique-stream.git" - }, - "scripts": { - "coverage": "istanbul cover _mocha", - "test": "mocha" - }, - "version": "2.3.1" -} diff --git a/node_modules/unxhr/LICENSE b/node_modules/unxhr/LICENSE deleted file mode 100644 index 1c63271b..00000000 --- a/node_modules/unxhr/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ - Copyright (c) 2010 passive.ly LLC - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation - files (the "Software"), to deal in the Software without - restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following - conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/unxhr/README.md b/node_modules/unxhr/README.md deleted file mode 100644 index bc60ff40..00000000 --- a/node_modules/unxhr/README.md +++ /dev/null @@ -1,41 +0,0 @@ -> Synchronous and asynchronous XMLHttpRequest for Node - -[![Build Status: Linux](https://travis-ci.org/Mogztter/unxhr.svg?branch=master)](https://travis-ci.org/Mogztter/unxhr) [![install size](https://packagephobia.now.sh/badge?p=unxhr)](https://packagephobia.now.sh/result?p=unxhr) - -_unxhr_ is a tiny wrapper of the built-in `http` client to emulate the browser `XMLHttpRequest` object. - -**Important:** This library is a fork of [XMLHttpRequest](https://github.com/driverdan/node-XMLHttpRequest). -It was created to be compliant with [XMLHttpRequest Level 2](http://www.w3.org/TR/XMLHttpRequest2/). - -## Highlights - -- Dependency free -- Asynchronous and synchronous requests -- `GET`, `POST`, `PUT`, and `DELETE` requests -- Binary data using JavaScript typed arrays -- Follows redirects -- Handles `file://` protocol - -## Usage - -Here's how to include the module in your project and use as the browser-based XHR object. - -```js -const XMLHttpRequest = require('unxhr').XMLHttpRequest -const xhr = new XMLHttpRequest() -``` - -## Known Issues / Missing Features - -For a list of open issues or to report your own visit the [github issues page](https://github.com/Mogztter/unxhr/issues). - -* Local file access may have unexpected results for non-UTF8 files -* Synchronous requests don't set headers properly -* Synchronous requests freeze node while waiting for response (But that's what you want, right? Stick with async!). -* Some events are missing, such as abort -* Cookies aren't persisted between requests -* Missing XML support - -## License - -MIT license. See LICENSE for full details. diff --git a/node_modules/unxhr/lib/XMLHttpRequest.js b/node_modules/unxhr/lib/XMLHttpRequest.js deleted file mode 100644 index 755d1d5f..00000000 --- a/node_modules/unxhr/lib/XMLHttpRequest.js +++ /dev/null @@ -1,598 +0,0 @@ -/** - * Wrapper for built-in http.js to emulate the browser XMLHttpRequest object. - * - * This can be used with JS designed for browsers to improve reuse of code and - * allow the use of existing libraries. - * - * Usage: include("XMLHttpRequest.js") and use XMLHttpRequest per W3C specs. - * - * @author Dan DeFelippi - * @contributor David Ellis - * @contributor Guillaume Grossetie - * @license MIT - */ -const Url = require('url') -const fs = require('fs') -const path = require('path') - -exports.XMLHttpRequest = function () { - 'use strict' - - /** - * Private variables - */ - const self = this - const http = require('http') - const https = require('https') - - // Holds http.js objects - let request - let response - - // Request settings - let settings = {} - - // Disable header blacklist. - // Not part of XHR specs. - let disableHeaderCheck = false - - // Set some default headers - const defaultHeaders = { - 'User-Agent': 'node-XMLHttpRequest', - 'Accept': '*/*' - } - - let headers = {} - const headersCase = {} - - // These headers are not user setable. - // The following are allowed but banned in the spec: - // * user-agent - const forbiddenRequestHeaders = [ - 'accept-charset', - 'accept-encoding', - 'access-control-request-headers', - 'access-control-request-method', - 'connection', - 'content-length', - 'content-transfer-encoding', - 'cookie', - 'cookie2', - 'date', - 'expect', - 'host', - 'keep-alive', - 'origin', - 'referer', - 'te', - 'trailer', - 'transfer-encoding', - 'upgrade', - 'via' - ] - - // These request methods are not allowed - const forbiddenRequestMethods = [ - 'TRACE', - 'TRACK', - 'CONNECT' - ] - - // Send flag - let sendFlag = false - // Error flag, used when errors occur or abort is called - let errorFlag = false - - // Event listeners - const listeners = {} - - /** - * Constants - */ - - this.UNSENT = 0 - this.OPENED = 1 - this.HEADERS_RECEIVED = 2 - this.LOADING = 3 - this.DONE = 4 - - /** - * Public vars - */ - - // Current state - this.readyState = this.UNSENT - - // default ready state change handler in case one is not set or is set late - this.onreadystatechange = null - - // Result & response - this.responseText = '' - this.responseXML = '' - this.status = null - this.statusText = null - - // Whether cross-site Access-Control requests should be made using - // credentials such as cookies or authorization headers - this.withCredentials = false - // "text", "arraybuffer", "blob", or "document", depending on your data needs. - // Note, setting xhr.responseType = '' (or omitting) will default the response to "text". - this.responseType = '' - - /** - * Private methods - */ - - /** - * Check if the specified header is allowed. - * - * @param header - {string} Header to validate - * @return {boolean} - False if not allowed, otherwise true - */ - const isAllowedHttpHeader = function (header) { - return disableHeaderCheck || (header && forbiddenRequestHeaders.indexOf(header.toLowerCase()) === -1) - } - - /** - * Check if the specified method is allowed. - * - * @param method - {string} Request method to validate - * @return {boolean} - False if not allowed, otherwise true - */ - const isAllowedHttpMethod = function (method) { - return (method && forbiddenRequestMethods.indexOf(method) === -1) - } - - /** - * Public methods - */ - - /** - * Open the connection. Currently supports local server requests. - * - * @param method - {string} Connection method (eg GET, POST) - * @param url - {string} URL for the connection. - * @param async - {boolean} Asynchronous connection. Default is true. - * @param user - {string} Username for basic authentication (optional) - * @param password - {string} Password for basic authentication (optional) - */ - this.open = function (method, url, async, user, password) { - this.abort() - errorFlag = false - - // Check for valid request method - if (!isAllowedHttpMethod(method)) { - throw new Error('SecurityError: Request method not allowed') - } - - settings = { - 'method': method, - 'url': url.toString(), - 'async': (typeof async !== 'boolean' ? true : async), - 'user': user || null, - 'password': password || null - } - - setState(this.OPENED) - } - - /** - * Disables or enables isAllowedHttpHeader() check the request. Enabled by default. - * This does not conform to the W3C spec. - * - * @param state - {boolean} Enable or disable header checking. - */ - this.setDisableHeaderCheck = function (state) { - disableHeaderCheck = state - } - - /** - * Sets a header for the request or appends the value if one is already set. - * - * @param header - {string} Header name - * @param value - {string} Header value - */ - this.setRequestHeader = function (header, value) { - if (this.readyState !== this.OPENED) { - throw new Error('INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN') - } - if (!isAllowedHttpHeader(header)) { - console.warn('Refused to set unsafe header "' + header + '"') - return - } - if (sendFlag) { - throw new Error('INVALID_STATE_ERR: send flag is true') - } - header = headersCase[header.toLowerCase()] || header - headersCase[header.toLowerCase()] = header - headers[header] = headers[header] ? headers[header] + ', ' + value : value - } - - /** - * Gets a header from the server response. - * - * @param header - {string} Name of header to get. - * @return {Object} - Text of the header or null if it doesn't exist. - */ - this.getResponseHeader = function (header) { - if (typeof header === 'string' && - this.readyState > this.OPENED && - response && - response.headers && - response.headers[header.toLowerCase()] && - !errorFlag - ) { - return response.headers[header.toLowerCase()] - } - - return null - } - - /** - * Gets all the response headers. - * - * @return string A string with all response headers separated by CR+LF - */ - this.getAllResponseHeaders = function () { - if (this.readyState < this.HEADERS_RECEIVED || errorFlag) { - return '' - } - let result = '' - - for (let i in response.headers) { - // Cookie headers are excluded - if (i !== 'set-cookie' && i !== 'set-cookie2') { - result += i + ': ' + response.headers[i] + '\r\n' - } - } - return result.substr(0, result.length - 2) - } - - /** - * Gets a request header - * - * @param name - {string} Name of header to get - * @return {string} Returns the request header or empty string if not set - */ - this.getRequestHeader = function (name) { - if (typeof name === 'string' && headersCase[name.toLowerCase()]) { - return headers[headersCase[name.toLowerCase()]] - } - - return '' - } - - /** - * Sends the request to the server. - * - * @param data - {string} Optional data to send as request body. - */ - this.send = function (data) { - if (this.readyState !== this.OPENED) { - throw new Error('INVALID_STATE_ERR: connection must be opened before send() is called') - } - - if (sendFlag) { - throw new Error('INVALID_STATE_ERR: send has already been called') - } - let ssl = false - let local = false - const url = Url.parse(settings.url) - let host - // Determine the server - switch (url.protocol) { - case 'https:': - ssl = true - host = url.hostname - break - case 'http:': - host = url.hostname - break - case 'file:': - local = true - break - case undefined: - case null: - case '': - host = 'localhost' - break - default: - throw new Error('Protocol not supported.') - } - - // Load files off the local filesystem (file://) - if (local) { - if (settings.method !== 'GET') { - throw new Error('XMLHttpRequest: Only GET method is supported') - } - - if (settings.async) { - fs.readFile(url.pathname, 'utf8', function (error, data) { - if (error) { - self.handleError(error) - } else { - self.status = 200 - self.responseText = data - setState(self.DONE) - } - }) - } else { - try { - this.responseText = fs.readFileSync(url.pathname, 'utf8') - this.status = 200 - setState(self.DONE) - } catch (e) { - this.handleError(e) - } - } - - return - } - - // Default to port 80. If accessing localhost on another port be sure - // to use http://localhost:port/path - const port = url.port || (ssl ? 443 : 80) - // Add query string if one is used - const uri = url.pathname + (url.search ? url.search : '') - - // Set the defaults if they haven't been set - for (let name in defaultHeaders) { - if (!headersCase[name.toLowerCase()]) { - headers[name] = defaultHeaders[name] - } - } - - // Set the Host header or the server may reject the request - headers.Host = host - // IPv6 addresses must be escaped with brackets - if (url.host[0] === '[') { - headers.Host = '[' + headers.Host + ']' - } - if (!((ssl && port === 443) || port === 80)) { - headers.Host += ':' + url.port - } - - // Set Basic Auth if necessary - if (settings.user) { - if (typeof settings.password === 'undefined') { - settings.password = '' - } - const authBuf = Buffer.from(settings.user + ':' + settings.password) - headers.Authorization = 'Basic ' + authBuf.toString('base64') - } - - // Set content length header - if (settings.method === 'GET' || settings.method === 'HEAD') { - data = null - } else if (data) { - headers['Content-Length'] = Buffer.isBuffer(data) ? data.length : Buffer.byteLength(data) - - if (!this.getRequestHeader('Content-Type')) { - headers['Content-Type'] = 'text/plain;charset=UTF-8' - } - } else if (settings.method === 'POST') { - // For a post with no data set Content-Length: 0. - // This is required by buggy servers that don't meet the specs. - headers['Content-Length'] = 0 - } - - const options = { - host: host, - port: port, - path: uri, - method: settings.method, - headers: headers, - agent: false, - withCredentials: self.withCredentials - } - - const responseType = this.responseType || 'text' - - // Reset error flag - errorFlag = false - - // Handle async requests - if (settings.async) { - // Use the proper protocol - var doRequest = ssl ? https.request : http.request - - // Request is being sent, set send flag - sendFlag = true - - // As per spec, this is called here for historical reasons. - self.dispatchEvent('readystatechange') - - // Handler for the response - const responseHandler = function responseHandler (resp) { - // Set response var to the response we got back - // This is so it remains accessable outside this scope - response = resp - // Check for redirect - // @TODO Prevent looped redirects - if (response.statusCode === 301 || response.statusCode === 302 || response.statusCode === 303 || response.statusCode === 307) { - // Change URL to the redirect location - settings.url = response.headers.location - const url = Url.parse(settings.url) - // Set host var in case it's used later - host = url.hostname - // Options for the new request - const newOptions = { - hostname: url.hostname, - port: url.port, - path: url.path, - method: response.statusCode === 303 ? 'GET' : settings.method, - headers: headers, - withCredentials: self.withCredentials - } - - // Issue the new request - request = doRequest(newOptions, responseHandler).on('error', errorHandler) - request.end() - // @TODO Check if an XHR event needs to be fired here - return - } - - response.setEncoding('utf8') - - setState(self.HEADERS_RECEIVED) - self.status = response.statusCode - - response.on('data', function (chunk) { - // Make sure there's some data - if (chunk) { - self.responseText += chunk - } - // Don't emit state changes if the connection has been aborted. - if (sendFlag) { - setState(self.LOADING) - } - }) - - response.on('end', function () { - if (sendFlag) { - // Discard the end event if the connection has been aborted - setState(self.DONE) - sendFlag = false - } - }) - - response.on('error', function (error) { - self.handleError(error) - }) - } - - // Error handler for the request - const errorHandler = function errorHandler (error) { - self.handleError(error) - } - - // Create the request - request = doRequest(options, responseHandler).on('error', errorHandler) - - // Node 0.4 and later won't accept empty data. Make sure it's needed. - if (data) { - request.write(data) - } - - request.end() - - self.dispatchEvent('loadstart') - } else { // Synchronous - const encoding = responseType === 'text' ? 'utf8' : 'binary' - const output = require('child_process').execSync(`"${process.argv[0]}" "${__dirname}/request.js" \ ---ssl="${ssl}" \ ---encoding="${encoding}" \ ---request-options=${JSON.stringify(JSON.stringify(options))}`, { stdio: 'pipe' }) - const result = JSON.parse(output.toString('utf8')) - if (result.error) { - self.handleError(result.error) - } else { - response = result.data - self.status = result.data.statusCode - if (encoding === 'binary') { - self.response = Uint8Array.from(result.data.binary.data).buffer - } else { - self.responseText = result.data.text - } - setState(self.DONE) - } - } - } - - /** - * Called when an error is encountered to deal with it. - */ - this.handleError = function (error) { - this.status = 0 - this.statusText = error - this.responseText = error.stack - errorFlag = true - setState(this.DONE) - this.dispatchEvent('error') - } - - /** - * Aborts a request. - */ - this.abort = function () { - if (request) { - request.abort() - request = null - } - - headers = defaultHeaders - this.status = 0 - this.responseText = '' - this.responseXML = '' - - errorFlag = true - - if (this.readyState !== this.UNSENT && - (this.readyState !== this.OPENED || sendFlag) && - this.readyState !== this.DONE) { - sendFlag = false - setState(this.DONE) - } - this.readyState = this.UNSENT - this.dispatchEvent('abort') - } - - /** - * Adds an event listener. Preferred method of binding to events. - */ - this.addEventListener = function (event, callback) { - if (!(event in listeners)) { - listeners[event] = [] - } - // Currently allows duplicate callbacks. Should it? - listeners[event].push(callback) - } - - /** - * Remove an event callback that has already been bound. - * Only works on the matching funciton, cannot be a copy. - */ - this.removeEventListener = function (event, callback) { - if (event in listeners) { - // Filter will return a new array with the callback removed - listeners[event] = listeners[event].filter(function (ev) { - return ev !== callback - }) - } - } - - /** - * Dispatch any events, including both "on" methods and events attached using addEventListener. - */ - this.dispatchEvent = function (event) { - if (typeof self['on' + event] === 'function') { - self['on' + event]() - } - if (event in listeners) { - for (let i = 0, len = listeners[event].length; i < len; i++) { - listeners[event][i].call(self) - } - } - } - - /** - * Changes readyState and calls onreadystatechange. - * - * @param state - {Number} New state - */ - const setState = function (state) { - if (state === self.LOADING || self.readyState !== state) { - self.readyState = state - - if (settings.async || self.readyState < self.OPENED || self.readyState === self.DONE) { - self.dispatchEvent('readystatechange') - } - - if (self.readyState === self.DONE && !errorFlag) { - self.dispatchEvent('load') - // @TODO figure out InspectorInstrumentation::didLoadXHR(cookie) - self.dispatchEvent('loadend') - } - } - } -} diff --git a/node_modules/unxhr/lib/browser.js b/node_modules/unxhr/lib/browser.js deleted file mode 100644 index d94fc42a..00000000 --- a/node_modules/unxhr/lib/browser.js +++ /dev/null @@ -1,2 +0,0 @@ -/* global XMLHttpRequest */ -exports.XMLHttpRequest = XMLHttpRequest diff --git a/node_modules/unxhr/lib/request.js b/node_modules/unxhr/lib/request.js deleted file mode 100644 index 2e8c452b..00000000 --- a/node_modules/unxhr/lib/request.js +++ /dev/null @@ -1,63 +0,0 @@ -const http = require('http') -const https = require('https') - -function doRequest (options) { - const { ssl, encoding, requestOptions } = options - return new Promise((resolve, reject) => { - let responseText = '' - const responseBinary = [] - const httpRequest = ssl ? https.request : http.request - const req = httpRequest(requestOptions, function (response) { - if (encoding !== 'binary') { - response.setEncoding(encoding) - } - response.on('data', function (chunk) { - if (encoding === 'binary') { - responseBinary.push(chunk) - } else { - responseText += chunk - } - }) - response.on('end', function () { - const result = { - error: null, - data: { statusCode: response.statusCode, headers: response.headers } - } - if (encoding === 'binary') { - result.data['binary'] = Buffer.concat(responseBinary) - } else { - result.data['text'] = responseText - } - resolve(result) - }) - response.on('error', function (error) { - reject(error) - }) - }).on('error', function (error) { - reject(error) - }) - req.end() - }) -} - -(async () => { - try { - const args = process.argv.slice(2) - const options = {} - for (let j = 0; j < args.length; j++) { - const arg = args[j] - if (arg.startsWith('--ssl=')) { - options.ssl = arg.slice('--ssl='.length) === 'true' - } else if (arg.startsWith('--encoding=')) { - options.encoding = arg.slice('--encoding='.length) - } else if (arg.startsWith('--request-options=')) { - options.requestOptions = JSON.parse(arg.slice('--request-options='.length)) - } - } - const result = await doRequest(options) - console.log(JSON.stringify(result)) - } catch (e) { - console.log(JSON.stringify({ 'error': e })) - } -})() - diff --git a/node_modules/unxhr/package.json b/node_modules/unxhr/package.json deleted file mode 100644 index 9732d46c..00000000 --- a/node_modules/unxhr/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "unxhr@1.0.1", - "_id": "unxhr@1.0.1", - "_inBundle": false, - "_integrity": "sha512-MAhukhVHyaLGDjyDYhy8gVjWJyhTECCdNsLwlMoGFoNJ3o79fpQhtQuzmAE4IxCMDwraF4cW8ZjpAV0m9CRQbg==", - "_location": "/unxhr", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "unxhr@1.0.1", - "name": "unxhr", - "escapedName": "unxhr", - "rawSpec": "1.0.1", - "saveSpec": null, - "fetchSpec": "1.0.1" - }, - "_requiredBy": [ - "/@asciidoctor/core", - "/asciidoctor-opal-runtime" - ], - "_resolved": "https://registry.npmjs.org/unxhr/-/unxhr-1.0.1.tgz", - "_shasum": "92200322d66c728993de771f9e01eeb21f41bc7b", - "_spec": "unxhr@1.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@asciidoctor/core", - "authors": [ - "Dan DeFelippi (http://driverdan.com)", - "Guillaume Grossetie (https://github.com/mogztter)" - ], - "browser": { - "fs": false, - "child_process": false - }, - "bugs": { - "url": "http://github.com/mogztter/unxhr/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Synchronous and asynchronous XMLHttpRequest for Node", - "devDependencies": { - "chai": "4.2.0", - "dirty-chai": "2.0.1", - "get-port": "4.0.0", - "mocha": "5.2.0", - "standard": "12.0.1" - }, - "directories": { - "lib": "./lib", - "example": "./example" - }, - "engines": { - "node": ">=8.11" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/mogztter/unxhr#readme", - "keywords": [ - "xhr", - "ajax", - "sync", - "http" - ], - "license": "MIT", - "main": "./lib/XMLHttpRequest.js", - "name": "unxhr", - "repository": { - "type": "git", - "url": "git://github.com/mogztter/unxhr.git" - }, - "scripts": { - "lint": "standard tests/**.js lib/**.js example/**.js", - "test": "mocha tests/test-*.js" - }, - "version": "1.0.1" -} diff --git a/node_modules/util-deprecate/History.md b/node_modules/util-deprecate/History.md deleted file mode 100644 index acc86753..00000000 --- a/node_modules/util-deprecate/History.md +++ /dev/null @@ -1,16 +0,0 @@ - -1.0.2 / 2015-10-07 -================== - - * use try/catch when checking `localStorage` (#3, @kumavis) - -1.0.1 / 2014-11-25 -================== - - * browser: use `console.warn()` for deprecation calls - * browser: more jsdocs - -1.0.0 / 2014-04-30 -================== - - * initial commit diff --git a/node_modules/util-deprecate/LICENSE b/node_modules/util-deprecate/LICENSE deleted file mode 100644 index 6a60e8c2..00000000 --- a/node_modules/util-deprecate/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/util-deprecate/README.md b/node_modules/util-deprecate/README.md deleted file mode 100644 index 75622fa7..00000000 --- a/node_modules/util-deprecate/README.md +++ /dev/null @@ -1,53 +0,0 @@ -util-deprecate -============== -### The Node.js `util.deprecate()` function with browser support - -In Node.js, this module simply re-exports the `util.deprecate()` function. - -In the web browser (i.e. via browserify), a browser-specific implementation -of the `util.deprecate()` function is used. - - -## API - -A `deprecate()` function is the only thing exposed by this module. - -``` javascript -// setup: -exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); - - -// users see: -foo(); -// foo() is deprecated, use bar() instead -foo(); -foo(); -``` - - -## License - -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/util-deprecate/browser.js b/node_modules/util-deprecate/browser.js deleted file mode 100644 index 549ae2f0..00000000 --- a/node_modules/util-deprecate/browser.js +++ /dev/null @@ -1,67 +0,0 @@ - -/** - * Module exports. - */ - -module.exports = deprecate; - -/** - * Mark that a method should not be used. - * Returns a modified function which warns once by default. - * - * If `localStorage.noDeprecation = true` is set, then it is a no-op. - * - * If `localStorage.throwDeprecation = true` is set, then deprecated functions - * will throw an Error when invoked. - * - * If `localStorage.traceDeprecation = true` is set, then deprecated functions - * will invoke `console.trace()` instead of `console.error()`. - * - * @param {Function} fn - the function to deprecate - * @param {String} msg - the string to print to the console when `fn` is invoked - * @returns {Function} a new "deprecated" version of `fn` - * @api public - */ - -function deprecate (fn, msg) { - if (config('noDeprecation')) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (config('throwDeprecation')) { - throw new Error(msg); - } else if (config('traceDeprecation')) { - console.trace(msg); - } else { - console.warn(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -} - -/** - * Checks `localStorage` for boolean values for the given `name`. - * - * @param {String} name - * @returns {Boolean} - * @api private - */ - -function config (name) { - // accessing global.localStorage can trigger a DOMException in sandboxed iframes - try { - if (!global.localStorage) return false; - } catch (_) { - return false; - } - var val = global.localStorage[name]; - if (null == val) return false; - return String(val).toLowerCase() === 'true'; -} diff --git a/node_modules/util-deprecate/node.js b/node_modules/util-deprecate/node.js deleted file mode 100644 index 5e6fcff5..00000000 --- a/node_modules/util-deprecate/node.js +++ /dev/null @@ -1,6 +0,0 @@ - -/** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - -module.exports = require('util').deprecate; diff --git a/node_modules/util-deprecate/package.json b/node_modules/util-deprecate/package.json deleted file mode 100644 index fbbe8064..00000000 --- a/node_modules/util-deprecate/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "util-deprecate@^1.0.1", - "_id": "util-deprecate@1.0.2", - "_inBundle": false, - "_integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "_location": "/util-deprecate", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "util-deprecate@^1.0.1", - "name": "util-deprecate", - "escapedName": "util-deprecate", - "rawSpec": "^1.0.1", - "saveSpec": null, - "fetchSpec": "^1.0.1" - }, - "_requiredBy": [ - "/cloneable-readable/readable-stream", - "/duplexify/readable-stream", - "/flush-write-stream/readable-stream", - "/glob-stream/readable-stream", - "/lazystream/readable-stream", - "/ordered-read-streams/readable-stream", - "/readable-stream", - "/through2/readable-stream", - "/vinyl-fs/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "_spec": "util-deprecate@^1.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/readable-stream", - "author": { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io/" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/TooTallNate/util-deprecate/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "The Node.js `util.deprecate()` function with browser support", - "homepage": "https://github.com/TooTallNate/util-deprecate", - "keywords": [ - "util", - "deprecate", - "browserify", - "browser", - "node" - ], - "license": "MIT", - "main": "node.js", - "name": "util-deprecate", - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/util-deprecate.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "1.0.2" -} diff --git a/node_modules/value-or-function/LICENSE b/node_modules/value-or-function/LICENSE deleted file mode 100644 index 9aedc0d7..00000000 --- a/node_modules/value-or-function/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Blaine Bublitz, Eric Schoffstall and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/value-or-function/README.md b/node_modules/value-or-function/README.md deleted file mode 100644 index 44ef2187..00000000 --- a/node_modules/value-or-function/README.md +++ /dev/null @@ -1,132 +0,0 @@ -

    - - - -

    - -# value-or-function - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] - -Normalize a value or function, applying extra args to the function - -## Example - -```js -var normalize = require('value-or-function'); - -// Values matching type are returned -var isEnabled = normalize('boolean', true); -// isEnabled === true - -// Values not matching type return undefined -var isEnabled = normalize('boolean', 1); -// isEnabled === undefined - -// Functions are called -var isEnabled = normalize('boolean', function() { - return false; -}); -// isEnabled === false - -// Extra arguments are applied to function -var count = normalize('number', function(a, b) { - return a + b; -}, 1, 2); -// count === 3 - -// Supply the function with context -var context = { c: 3 }; -var count = normalize.call(context, 'number', function(a, b) { - return a + b + this.c; -}, 1, 2); -// count === 6 - -// Values one of multiple types are returned -var isEnabled = normalize(['string', 'boolean'], true); -// isEnabled === true - -// Provide a function as first argument to do custom coercion -var now = new Date(); -var enabledSince = normalize(function(value) { - if (value.constructor === Date) { - return value; - } -}, now); -// enabledSince === now - -// Convenience methods are available for the built-in types -var result = normalize.object({}); -var result = normalize.number(1); -var result = normalize.string(''); -var result = normalize.symbol(Symbol()); -var result = normalize.boolean(true); -var result = normalize.function(function() {}); -var result = normalize.date(new Date()); -``` - -## API - -### `normalize(coercer, value[, ...appliedArguments])` - -Takes a coercer function `coercer` to transform `value` to the desired type. -Also optionally takes any extra arguments to apply to `value` if `value` is a function. - -If the return value of `coercer(value)` is not `null` or `undefined`, that value is returned. -Otherwise, if `value` is a function, that function is called with any extra arguments -supplied to `normalize`, and its return value is passed through the coercer. - -If `coercer` is a string, it must be one of the built-in types (see below) -and the appropriate default coercer is invoked, optionally first reducing `value` -to a primitive type with `.valueOf()` if it is an Object. - -If `coercer` is an array, each element is tried until one returns something other -than `null` or `undefined`, or it results in `undefined` if all of the elements yield `null` or `undefined`. - -#### `normalize.object(value[, ...appliedArguments])` - -Convenience method for `normalize('object', ...)`. - -#### `normalize.number(value[, ...appliedArguments])` - -Convenience method for `normalize('number', ...)`. - -#### `normalize.string(value[, ...appliedArguments])` - -Convenience method for `normalize('string', ...)`. - -#### `normalize.symbol(value[, ...appliedArguments])` - -Convenience method for `normalize('symbol', ...)`. - -#### `normalize.boolean(value[, ...appliedArguments])` - -Convenience method for `normalize('boolean', ...)`. - -#### `normalize.function(value[, ...appliedArguments])` - -Convenience method for `normalize('function', ...)`. - -#### `normalize.date(value[, ...appliedArguments])` - -Convenience method for `normalize('date', ...)`. - -## License - -MIT - -[downloads-image]: http://img.shields.io/npm/dm/value-or-function.svg -[npm-url]: https://npmjs.org/package/value-or-function -[npm-image]: http://img.shields.io/npm/v/value-or-function.svg - -[travis-url]: https://travis-ci.org/gulpjs/value-or-function -[travis-image]: http://img.shields.io/travis/gulpjs/value-or-function.svg?label=travis-ci - -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/value-or-function -[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/value-or-function.svg?label=appveyor - -[coveralls-url]: https://coveralls.io/r/gulpjs/value-or-function -[coveralls-image]: http://img.shields.io/coveralls/gulpjs/value-or-function/master.svg - -[gitter-url]: https://gitter.im/gulpjs/gulp -[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png diff --git a/node_modules/value-or-function/index.js b/node_modules/value-or-function/index.js deleted file mode 100644 index 1be06dc4..00000000 --- a/node_modules/value-or-function/index.js +++ /dev/null @@ -1,113 +0,0 @@ -'use strict'; - -// Built-in types -var types = [ - 'object', - 'number', - 'string', - 'symbol', - 'boolean', - 'date', - 'function', // Weird to expose this -]; - - -function normalize(coercer, value) { - if (typeof value === 'function') { - if (coercer === 'function') { - return value; - } - value = value.apply(this, slice(arguments, 2)); - } - return coerce(this, coercer, value); -} - - -function coerce(ctx, coercer, value) { - - // Handle built-in types - if (typeof coercer === 'string') { - if (coerce[coercer]) { - return coerce[coercer].call(ctx, value); - } - return typeOf(coercer, value); - } - - // Handle custom coercer - if (typeof coercer === 'function') { - return coercer.call(ctx, value); - } - - // Array of coercers, try in order until one returns a non-null value - var result; - coercer.some(function(coercer) { - result = coerce(ctx, coercer, value); - return result != null; - }); - - return result; -} - - -coerce.string = function(value) { - if (value != null && - typeof value === 'object' && - typeof value.toString === 'function') { - - value = value.toString(); - } - return typeOf('string', primitive(value)); -}; - - -coerce.number = function(value) { - return typeOf('number', primitive(value)); -}; - - -coerce.boolean = function(value) { - return typeOf('boolean', primitive(value)); -}; - - -coerce.date = function(value) { - value = primitive(value); - if (typeof value === 'number' && !isNaN(value) && isFinite(value)) { - return new Date(value); - } -}; - - -function typeOf(type, value) { - if (typeof value === type) { - return value; - } -} - - -function primitive(value) { - if (value != null && - typeof value === 'object' && - typeof value.valueOf === 'function') { - - value = value.valueOf(); - } - return value; -} - -function slice(value, from) { - return Array.prototype.slice.call(value, from); -} - -// Add methods for each type -types.forEach(function(type) { - // Make it an array for easier concat - var typeArg = [type]; - - normalize[type] = function() { - var args = slice(arguments); - return normalize.apply(this, typeArg.concat(args)); - }; -}); - -module.exports = normalize; diff --git a/node_modules/value-or-function/package.json b/node_modules/value-or-function/package.json deleted file mode 100644 index 3dea5a51..00000000 --- a/node_modules/value-or-function/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "_from": "value-or-function@^3.0.0", - "_id": "value-or-function@3.0.0", - "_inBundle": false, - "_integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", - "_location": "/value-or-function", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "value-or-function@^3.0.0", - "name": "value-or-function", - "escapedName": "value-or-function", - "rawSpec": "^3.0.0", - "saveSpec": null, - "fetchSpec": "^3.0.0" - }, - "_requiredBy": [ - "/resolve-options", - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", - "_shasum": "1c243a50b595c1be54a754bfece8563b9ff8d813", - "_spec": "value-or-function@^3.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs", - "author": { - "name": "Gulp Team", - "email": "team@gulpjs.com", - "url": "http://gulpjs.com/" - }, - "bugs": { - "url": "https://github.com/gulpjs/value-or-function/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com" - }, - { - "name": "Hugo Wood", - "email": "hx4.5@free.fr" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "Normalize a value or function, applying extra args to the function", - "devDependencies": { - "eslint": "^1.10.3", - "eslint-config-gulp": "^2.0.0", - "expect": "^1.16.0", - "istanbul": "^0.4.3", - "istanbul-coveralls": "^1.0.3", - "jscs": "^2.3.5", - "jscs-preset-gulp": "^1.0.0", - "mocha": "^2.4.5" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/gulpjs/value-or-function#readme", - "keywords": [ - "options", - "normalize", - "value", - "function" - ], - "license": "MIT", - "main": "index.js", - "name": "value-or-function", - "repository": { - "type": "git", - "url": "git+https://github.com/gulpjs/value-or-function.git" - }, - "scripts": { - "cover": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly", - "coveralls": "npm run cover && istanbul-coveralls", - "lint": "eslint . && jscs index.js test/", - "pretest": "npm run lint", - "test": "mocha --async-only" - }, - "version": "3.0.0" -} diff --git a/node_modules/vinyl-fs/LICENSE b/node_modules/vinyl-fs/LICENSE deleted file mode 100644 index 6355a4b4..00000000 --- a/node_modules/vinyl-fs/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013-2017 Blaine Bublitz , Eric Schoffstall and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/vinyl-fs/README.md b/node_modules/vinyl-fs/README.md deleted file mode 100644 index 786ad1b1..00000000 --- a/node_modules/vinyl-fs/README.md +++ /dev/null @@ -1,341 +0,0 @@ -

    - - - -

    - -# vinyl-fs - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] - -[Vinyl][vinyl] adapter for the file system. - -## What is Vinyl? - -[Vinyl][vinyl] is a very simple metadata object that describes a file. When you think of a file, two attributes come to mind: `path` and `contents`. These are the main attributes on a [Vinyl][vinyl] object. A file does not necessarily represent something on your computer’s file system. You have files on S3, FTP, Dropbox, Box, CloudThingly.io and other services. [Vinyl][vinyl] can be used to describe files from all of these sources. - -## What is a Vinyl Adapter? - -While Vinyl provides a clean way to describe a file, we now need a way to access these files. Each file source needs what we call a "Vinyl adapter". A Vinyl adapter simply exposes a `src(globs)` and a `dest(folder)` method. Each return a stream. The `src` stream produces Vinyl objects, and the `dest` stream consumes Vinyl objects. Vinyl adapters can expose extra methods that might be specific to their input/output medium, such as the `symlink` method `vinyl-fs` provides. - -## Usage - -```javascript -var map = require('map-stream'); -var vfs = require('vinyl-fs'); - -var log = function(file, cb) { - console.log(file.path); - cb(null, file); -}; - -vfs.src(['./js/**/*.js', '!./js/vendor/*.js']) - .pipe(map(log)) - .pipe(vfs.dest('./output')); -``` - -## API - -### `src(globs[, options])` - -Takes a glob string or an array of glob strings as the first argument and an options object as the second. -Returns a stream of [vinyl] `File` objects. - -__Note: UTF-8 BOM will be removed from all UTF-8 files read with `.src` unless disabled in the options.__ - -#### Globs - -Globs are executed in order, so negations should follow positive globs. - -For example: - -```js -fs.src(['!b*', '*']) -``` - -would not exclude any files, but the following would exclude all files starting with "b": - -```js -fs.src(['*', '!b*']) -``` - -#### Options - -- Values passed to the options must be of the expected type, otherwise they will be ignored. -- All options can be passed a function instead of a value. The function will be called with the [vinyl] `File` object as its only argument and must return a value of the expected type for that option. - -##### `options.buffer` - -Whether or not you want to buffer the file contents into memory. Setting to `false` will make `file.contents` a paused Stream. - -Type: `Boolean` - -Default: `true` - -##### `options.read` - -Whether or not you want the file to be read at all. Useful for stuff like removing files. Setting to `false` will make `file.contents = null` and will disable writing the file to disk via `.dest()`. - -Type: `Boolean` - -Default: `true` - -##### `options.since` - -Only streams files that have been modified since the time specified. - -Type: `Date` or `Number` - -Default: `undefined` - -##### `options.removeBOM` - -Causes the BOM to be removed on UTF-8 encoded files. Set to `false` if you need the BOM for some reason. - -Type: `Boolean` - -Default: `true` - -##### `options.sourcemaps` - -Enables sourcemap support on files passed through the stream. Will load inline sourcemaps and resolve sourcemap links from files. - -Type: `Boolean` - -Default: `false` - -##### `options.resolveSymlinks` - -Whether or not to recursively resolve symlinks to their targets. Set to `false` to preserve them as symlinks and make `file.symlink` equal the original symlink's target path. - -Type: `Boolean` - -Default: `true` - -##### `options.dot` - -Whether or not you want globs to match on dot files (e.g. `.gitignore`). - -__Note: This option is not resolved from a function because it is passed verbatim to node-glob.__ - -Type: `Boolean` - -Default: `false` - -##### other - -Any glob-related options are documented in [glob-stream] and [node-glob] and are forwarded verbatim. - -### `dest(folder[, options])` - -Takes a folder path string or a function as the first argument and an options object as the second. If given a function, it will be called with each [vinyl] `File` object and must return a folder path. -Returns a stream that accepts [vinyl] `File` objects, writes them to disk at the folder/cwd specified, and passes them downstream so you can keep piping these around. - -Once the file is written to disk, an attempt is made to determine if the `stat.mode`, `stat.mtime` and `stat.atime` of the [vinyl] `File` object differ from the file on the filesystem. -If they differ and the running process owns the file, the corresponding filesystem metadata is updated. -If they don't differ or the process doesn't own the file, the attempt is skipped silently. -__This functionality is disabled on Windows operating systems or any other OS that doesn't support `process.getuid` or `process.geteuid` in node. This is due to Windows having very unexpected results through usage of `fs.fchmod` and `fs.futimes`.__ - -__Note: The `fs.futimes()` method internally converts `stat.mtime` and `stat.atime` timestamps to seconds; this division by `1000` may cause some loss of precision in 32-bit Node.js.__ - -If the file has a `symlink` attribute specifying a target path, then a symlink will be created. - -__Note: The file will be modified after being written to this stream.__ - - `cwd`, `base`, and `path` will be overwritten to match the folder. - - `stat` will be updated to match the file on the filesystem. - - `contents` will have it's position reset to the beginning if it is a stream. - -#### Options - -- Values passed to the options must be of the expected type, otherwise they will be ignored. -- All options can be passed a function instead of a value. The function will be called with the [vinyl] `File` object as its only argument and must return a value of the expected type for that option. - -##### `options.cwd` - -The working directory the folder is relative to. - -Type: `String` - -Default: `process.cwd()` - -##### `options.mode` - -The mode the files should be created with. This option is only resolved if the [vinyl] `File` is not symbolic. - -Type: `Number` - -Default: The `mode` of the input file (`file.stat.mode`) if any, or the process mode if the input file has no `mode` property. - -##### `options.dirMode` - -The mode directories should be created with. - -Type: `Number` - -Default: The process `mode`. - -##### `options.overwrite` - -Whether or not existing files with the same path should be overwritten. - -Type: `Boolean` - -Default: `true` (always overwrite existing files) - -##### `options.append` - -Whether or not new data should be appended after existing file contents (if any). - -Type: `Boolean` - -Default: `false` (always replace existing contents, if any) - -##### `options.sourcemaps` - -Enables sourcemap support on files passed through the stream. Will write inline soucemaps if specified as `true`. -Specifying a `String` path will write external sourcemaps at the given path. - -Examples: - -```js -// Write as inline comments -vfs.dest('./', { sourcemaps: true }); - -// Write as files in the same folder -vfs.dest('./', { sourcemaps: '.' }); -``` - -Type: `Boolean` or `String` - -Default: `undefined` (do not write sourcemaps) - -##### `options.relativeSymlinks` - -When creating a symlink, whether or not the created symlink should be relative. If `false`, the symlink will be absolute. - -__Note: This option will be ignored if a `junction` is being created, as they must be absolute.__ - -Type: `Boolean` - -Default: `false` - -##### `options.useJunctions` - -When creating a symlink, whether or not a directory symlink should be created as a `junction`. -This option is only relevant on Windows and ignored elsewhere. Please refer to the [Symbolic Links on Windows][symbolic-caveats] section below. - -Type: `Boolean` - -Default: `true` - -### `symlink(folder[, options])` - -Takes a folder path string or a function as the first argument and an options object as the second. If given a function, it will be called with each [vinyl] `File` object and must return a folder path. -Returns a stream that accepts [vinyl] `File` objects, creates a symbolic link (i.e. symlink) at the folder/cwd specified, and passes them downstream so you can keep piping these around. - -__Note: The file will be modified after being written to this stream.__ - - `cwd`, `base`, and `path` will be overwritten to match the folder. - - `stat` will be updated to match the symlink on the filesystem. - - `contents` will be set to `null`. - - `symlink` will be added or replaced to be the original path. - -__Note: On Windows, directory links are created using Junctions by default. Use the `useJunctions` option to disable this behavior.__ - -#### Options - -- Values passed to the options must be of the expected type, otherwise they will be ignored. -- All options can be passed a function instead of a value. The function will be called with the [vinyl] `File` object as its only argument and must return a value of the expected type for that option. - -##### `options.cwd` - -The working directory the folder is relative to. - -Type: `String` - -Default: `process.cwd()` - -##### `options.dirMode` - -The mode directories should be created with. - -Type: `Number` - -Default: The process mode. - -##### `options.overwrite` - -Whether or not existing files with the same path should be overwritten. - -Type: `Boolean` - -Default: `true` (always overwrite existing files) - -##### `options.relativeSymlinks` - -Whether or not the created symlinks should be relative. If `false`, the symlink will be absolute. - -__Note: This option will be ignored if a `junction` is being created, as they must be absolute.__ - -Type: `Boolean` - -Default: `false` - -##### `options.useJunctions` - -When creating a symlink, whether or not a directory symlink should be created as a `junction`. -This option is only relevant on Windows and ignored elsewhere. Please refer to the [Symbolic Links on Windows][symbolic-caveats] section below. - -Type: `Boolean` - -Default: `true` - -#### Symbolic Links on Windows - -When creating symbolic links on Windows, we pass a `type` argument to Node's -`fs` module which specifies the kind of target we link to (one of `'file'`, -`'dir'` or `'junction'`). Specifically, this will be `'file'` when the target -is a regular file, `'junction'` if the target is a directory, or `'dir'` if -the target is a directory and the user overrides the `useJunctions` option -default. - -However, if the user tries to make a "dangling" link (pointing to a non-existent -target) we won't be able to determine automatically which type we should use. -In these cases, `vinyl-fs` will behave slightly differently depending on -whether the dangling link is being created via `symlink()` or via `dest()`. - -For dangling links created via `symlink()`, the incoming vinyl represents the -target and so we will look to its stats to guess the desired type. In -particular, if `isDirectory()` returns false then we'll create a `'file'` type -link, otherwise we will create a `'junction'` or a `'dir'` type link depending -on the value of the `useJunctions` option. - -For dangling links created via `dest()`, the incoming vinyl represents the link - -typically read off disk via `src()` with the `resolveSymlinks` option set to -false. In this case, we won't be able to make any reasonable guess as to the -type of link and we default to using `'file'`, which may cause unexpected behavior -if you are creating a "dangling" link to a directory. It is advised to avoid this -scenario. - - -[symbolic-caveats]: #symbolic-links-on-windows -[glob-stream]: https://github.com/gulpjs/glob-stream -[node-glob]: https://github.com/isaacs/node-glob -[gaze]: https://github.com/shama/gaze -[glob-watcher]: https://github.com/wearefractal/glob-watcher -[vinyl]: https://github.com/wearefractal/vinyl - -[downloads-image]: http://img.shields.io/npm/dm/vinyl-fs.svg -[npm-url]: https://www.npmjs.com/package/vinyl-fs -[npm-image]: http://img.shields.io/npm/v/vinyl-fs.svg - -[travis-url]: https://travis-ci.org/gulpjs/vinyl-fs -[travis-image]: http://img.shields.io/travis/gulpjs/vinyl-fs.svg?label=travis-ci - -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/vinyl-fs -[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/vinyl-fs.svg?label=appveyor - -[coveralls-url]: https://coveralls.io/r/gulpjs/vinyl-fs -[coveralls-image]: http://img.shields.io/coveralls/gulpjs/vinyl-fs/master.svg - -[gitter-url]: https://gitter.im/gulpjs/gulp -[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/vinyl-fs/index.js b/node_modules/vinyl-fs/index.js deleted file mode 100644 index acdeac2b..00000000 --- a/node_modules/vinyl-fs/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -module.exports = { - src: require('./lib/src'), - dest: require('./lib/dest'), - symlink: require('./lib/symlink'), -}; diff --git a/node_modules/vinyl-fs/lib/constants.js b/node_modules/vinyl-fs/lib/constants.js deleted file mode 100644 index f0c28256..00000000 --- a/node_modules/vinyl-fs/lib/constants.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -module.exports = { - MASK_MODE: parseInt('7777', 8), - DEFAULT_FILE_MODE: parseInt('0666', 8), -}; diff --git a/node_modules/vinyl-fs/lib/dest/index.js b/node_modules/vinyl-fs/lib/dest/index.js deleted file mode 100644 index f45dd612..00000000 --- a/node_modules/vinyl-fs/lib/dest/index.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -var lead = require('lead'); -var pumpify = require('pumpify'); -var mkdirpStream = require('fs-mkdirp-stream'); -var createResolver = require('resolve-options'); - -var config = require('./options'); -var prepare = require('./prepare'); -var sourcemap = require('./sourcemap'); -var writeContents = require('./write-contents'); - -var folderConfig = { - outFolder: { - type: 'string', - }, -}; - -function dest(outFolder, opt) { - if (!outFolder) { - throw new Error('Invalid dest() folder argument.' + - ' Please specify a non-empty string or a function.'); - } - - var optResolver = createResolver(config, opt); - var folderResolver = createResolver(folderConfig, { outFolder: outFolder }); - - function dirpath(file, callback) { - var dirMode = optResolver.resolve('dirMode', file); - - callback(null, file.dirname, dirMode); - } - - var saveStream = pumpify.obj( - prepare(folderResolver, optResolver), - sourcemap(optResolver), - mkdirpStream.obj(dirpath), - writeContents(optResolver) - ); - - // Sink the output stream to start flowing - return lead(saveStream); -} - -module.exports = dest; diff --git a/node_modules/vinyl-fs/lib/dest/options.js b/node_modules/vinyl-fs/lib/dest/options.js deleted file mode 100644 index d8c6d767..00000000 --- a/node_modules/vinyl-fs/lib/dest/options.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -var config = { - cwd: { - type: 'string', - default: process.cwd, - }, - mode: { - type: 'number', - default: function(file) { - return file.stat ? file.stat.mode : null; - }, - }, - dirMode: { - type: 'number', - }, - overwrite: { - type: 'boolean', - default: true, - }, - append: { - type: 'boolean', - default: false, - }, - sourcemaps: { - type: ['string', 'boolean'], - default: false, - }, - // Symlink options - relativeSymlinks: { - type: 'boolean', - default: false, - }, - // This option is ignored on non-Windows platforms - useJunctions: { - type: 'boolean', - default: true, - }, -}; - -module.exports = config; diff --git a/node_modules/vinyl-fs/lib/dest/prepare.js b/node_modules/vinyl-fs/lib/dest/prepare.js deleted file mode 100644 index b3ea3d47..00000000 --- a/node_modules/vinyl-fs/lib/dest/prepare.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -var path = require('path'); - -var fs = require('graceful-fs'); -var Vinyl = require('vinyl'); -var through = require('through2'); - -function prepareWrite(folderResolver, optResolver) { - if (!folderResolver) { - throw new Error('Invalid output folder'); - } - - function normalize(file, enc, cb) { - if (!Vinyl.isVinyl(file)) { - return cb(new Error('Received a non-Vinyl object in `dest()`')); - } - - // TODO: Remove this after people upgrade vinyl/transition from gulp-util - if (typeof file.isSymbolic !== 'function') { - file = new Vinyl(file); - } - - var outFolderPath = folderResolver.resolve('outFolder', file); - if (!outFolderPath) { - return cb(new Error('Invalid output folder')); - } - var cwd = path.resolve(optResolver.resolve('cwd', file)); - var basePath = path.resolve(cwd, outFolderPath); - var writePath = path.resolve(basePath, file.relative); - - // Wire up new properties - file.cwd = cwd; - file.base = basePath; - file.path = writePath; - if (!file.isSymbolic()) { - var mode = optResolver.resolve('mode', file); - file.stat = (file.stat || new fs.Stats()); - file.stat.mode = mode; - } - - cb(null, file); - } - - return through.obj(normalize); -} - -module.exports = prepareWrite; diff --git a/node_modules/vinyl-fs/lib/dest/sourcemap.js b/node_modules/vinyl-fs/lib/dest/sourcemap.js deleted file mode 100644 index c6a89613..00000000 --- a/node_modules/vinyl-fs/lib/dest/sourcemap.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -var through = require('through2'); -var sourcemap = require('vinyl-sourcemap'); - -function sourcemapStream(optResolver) { - - function saveSourcemap(file, enc, callback) { - var self = this; - - var srcMap = optResolver.resolve('sourcemaps', file); - - if (!srcMap) { - return callback(null, file); - } - - var srcMapLocation = (typeof srcMap === 'string' ? srcMap : undefined); - - sourcemap.write(file, srcMapLocation, onWrite); - - function onWrite(sourcemapErr, updatedFile, sourcemapFile) { - if (sourcemapErr) { - return callback(sourcemapErr); - } - - self.push(updatedFile); - if (sourcemapFile) { - self.push(sourcemapFile); - } - - callback(); - } - } - - return through.obj(saveSourcemap); -} - -module.exports = sourcemapStream; diff --git a/node_modules/vinyl-fs/lib/dest/write-contents/index.js b/node_modules/vinyl-fs/lib/dest/write-contents/index.js deleted file mode 100644 index 202a95f2..00000000 --- a/node_modules/vinyl-fs/lib/dest/write-contents/index.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; - -var through = require('through2'); - -var writeDir = require('./write-dir'); -var writeStream = require('./write-stream'); -var writeBuffer = require('./write-buffer'); -var writeSymbolicLink = require('./write-symbolic-link'); - -var fo = require('../../file-operations'); - -function writeContents(optResolver) { - - function writeFile(file, enc, callback) { - // Write it as a symlink - if (file.isSymbolic()) { - return writeSymbolicLink(file, optResolver, onWritten); - } - - // If directory then mkdirp it - if (file.isDirectory()) { - return writeDir(file, optResolver, onWritten); - } - - // Stream it to disk yo - if (file.isStream()) { - return writeStream(file, optResolver, onWritten); - } - - // Write it like normal - if (file.isBuffer()) { - return writeBuffer(file, optResolver, onWritten); - } - - // If no contents then do nothing - if (file.isNull()) { - return onWritten(); - } - - // This is invoked by the various writeXxx modules when they've finished - // writing the contents. - function onWritten(writeErr) { - var flags = fo.getFlags({ - overwrite: optResolver.resolve('overwrite', file), - append: optResolver.resolve('append', file), - }); - if (fo.isFatalOverwriteError(writeErr, flags)) { - return callback(writeErr); - } - - callback(null, file); - } - - } - - return through.obj(writeFile); -} - -module.exports = writeContents; diff --git a/node_modules/vinyl-fs/lib/dest/write-contents/write-buffer.js b/node_modules/vinyl-fs/lib/dest/write-contents/write-buffer.js deleted file mode 100644 index 794869e9..00000000 --- a/node_modules/vinyl-fs/lib/dest/write-contents/write-buffer.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -var fo = require('../../file-operations'); - -function writeBuffer(file, optResolver, onWritten) { - var flags = fo.getFlags({ - overwrite: optResolver.resolve('overwrite', file), - append: optResolver.resolve('append', file), - }); - var opt = { - mode: file.stat.mode, - flags: flags, - }; - - fo.writeFile(file.path, file.contents, opt, onWriteFile); - - function onWriteFile(writeErr, fd) { - if (writeErr) { - return fo.closeFd(writeErr, fd, onWritten); - } - - fo.updateMetadata(fd, file, onUpdate); - - function onUpdate(updateErr) { - fo.closeFd(updateErr, fd, onWritten); - } - } - -} - -module.exports = writeBuffer; diff --git a/node_modules/vinyl-fs/lib/dest/write-contents/write-dir.js b/node_modules/vinyl-fs/lib/dest/write-contents/write-dir.js deleted file mode 100644 index d182728b..00000000 --- a/node_modules/vinyl-fs/lib/dest/write-contents/write-dir.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -var fs = require('graceful-fs'); - -var mkdirp = require('fs-mkdirp-stream/mkdirp'); - -var fo = require('../../file-operations'); - -function writeDir(file, optResolver, onWritten) { - mkdirp(file.path, file.stat.mode, onMkdirp); - - function onMkdirp(mkdirpErr) { - if (mkdirpErr) { - return onWritten(mkdirpErr); - } - - fs.open(file.path, 'r', onOpen); - } - - function onOpen(openErr, fd) { - // If we don't have access, just move along - if (isInaccessible(openErr)) { - return fo.closeFd(null, fd, onWritten); - } - - if (openErr) { - return fo.closeFd(openErr, fd, onWritten); - } - - fo.updateMetadata(fd, file, onUpdate); - - function onUpdate(updateErr) { - fo.closeFd(updateErr, fd, onWritten); - } - } - -} - -function isInaccessible(err) { - if (!err) { - return false; - } - - if (err.code === 'EACCES') { - return true; - } - - return false; -} - -module.exports = writeDir; diff --git a/node_modules/vinyl-fs/lib/dest/write-contents/write-stream.js b/node_modules/vinyl-fs/lib/dest/write-contents/write-stream.js deleted file mode 100644 index 2a483047..00000000 --- a/node_modules/vinyl-fs/lib/dest/write-contents/write-stream.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; - -var fo = require('../../file-operations'); -var readStream = require('../../src/read-contents/read-stream'); - -function writeStream(file, optResolver, onWritten) { - var flags = fo.getFlags({ - overwrite: optResolver.resolve('overwrite', file), - append: optResolver.resolve('append', file), - }); - var opt = { - mode: file.stat.mode, - // TODO: need to test this - flags: flags, - }; - - // TODO: is this the best API? - var outStream = fo.createWriteStream(file.path, opt, onFlush); - - file.contents.once('error', onComplete); - outStream.once('error', onComplete); - outStream.once('finish', onComplete); - - // TODO: should this use a clone? - file.contents.pipe(outStream); - - function onComplete(streamErr) { - // Cleanup event handlers before closing - file.contents.removeListener('error', onComplete); - outStream.removeListener('error', onComplete); - outStream.removeListener('finish', onComplete); - - // Need to guarantee the fd is closed before forwarding the error - outStream.once('close', onClose); - outStream.end(); - - function onClose(closeErr) { - onWritten(streamErr || closeErr); - } - } - - // Cleanup - function onFlush(fd, callback) { - // TODO: removing this before readStream because it replaces the stream - file.contents.removeListener('error', onComplete); - - // TODO: this is doing sync stuff & the callback seems unnecessary - // TODO: Replace the contents stream or use a clone? - readStream(file, complete); - - function complete() { - if (typeof fd !== 'number') { - return callback(); - } - - fo.updateMetadata(fd, file, callback); - } - } - -} - -module.exports = writeStream; diff --git a/node_modules/vinyl-fs/lib/dest/write-contents/write-symbolic-link.js b/node_modules/vinyl-fs/lib/dest/write-contents/write-symbolic-link.js deleted file mode 100644 index 411a8bdb..00000000 --- a/node_modules/vinyl-fs/lib/dest/write-contents/write-symbolic-link.js +++ /dev/null @@ -1,77 +0,0 @@ -'use strict'; - -var os = require('os'); -var path = require('path'); - -var fo = require('../../file-operations'); - -var isWindows = (os.platform() === 'win32'); - -function writeSymbolicLink(file, optResolver, onWritten) { - if (!file.symlink) { - return onWritten(new Error('Missing symlink property on symbolic vinyl')); - } - - var isRelative = optResolver.resolve('relativeSymlinks', file); - var flags = fo.getFlags({ - overwrite: optResolver.resolve('overwrite', file), - append: optResolver.resolve('append', file), - }); - - if (!isWindows) { - // On non-Windows, just use 'file' - return createLinkWithType('file'); - } - - fo.reflectStat(file.symlink, file, onReflect); - - function onReflect(statErr) { - if (statErr && statErr.code !== 'ENOENT') { - return onWritten(statErr); - } - - // This option provides a way to create a Junction instead of a - // Directory symlink on Windows. This comes with the following caveats: - // * NTFS Junctions cannot be relative. - // * NTFS Junctions MUST be directories. - // * NTFS Junctions must be on the same file system. - // * Most products CANNOT detect a directory is a Junction: - // This has the side effect of possibly having a whole directory - // deleted when a product is deleting the Junction directory. - // For example, JetBrains product lines will delete the entire contents - // of the TARGET directory because the product does not realize it's - // a symlink as the JVM and Node return false for isSymlink. - - // This function is Windows only, so we don't need to check again - var useJunctions = optResolver.resolve('useJunctions', file); - - var dirType = useJunctions ? 'junction' : 'dir'; - // Dangling links are always 'file' - var type = !statErr && file.isDirectory() ? dirType : 'file'; - - createLinkWithType(type); - } - - function createLinkWithType(type) { - // This is done after prepare() to use the adjusted file.base property - if (isRelative && type !== 'junction') { - file.symlink = path.relative(file.base, file.symlink); - } - - var opts = { - flags: flags, - type: type, - }; - fo.symlink(file.symlink, file.path, opts, onSymlink); - - function onSymlink(symlinkErr) { - if (symlinkErr) { - return onWritten(symlinkErr); - } - - fo.reflectLinkStat(file.path, file, onWritten); - } - } -} - -module.exports = writeSymbolicLink; diff --git a/node_modules/vinyl-fs/lib/file-operations.js b/node_modules/vinyl-fs/lib/file-operations.js deleted file mode 100644 index b0aa31ba..00000000 --- a/node_modules/vinyl-fs/lib/file-operations.js +++ /dev/null @@ -1,496 +0,0 @@ -'use strict'; - -var util = require('util'); - -var fs = require('graceful-fs'); -var assign = require('object.assign'); -var date = require('value-or-function').date; -var Writable = require('readable-stream').Writable; - -var constants = require('./constants'); - -var APPEND_MODE_REGEXP = /a/; - -function closeFd(propagatedErr, fd, callback) { - if (typeof fd !== 'number') { - return callback(propagatedErr); - } - - fs.close(fd, onClosed); - - function onClosed(closeErr) { - if (propagatedErr || closeErr) { - return callback(propagatedErr || closeErr); - } - - callback(); - } -} - -function isValidUnixId(id) { - if (typeof id !== 'number') { - return false; - } - - if (id < 0) { - return false; - } - - return true; -} - -function getFlags(options) { - var flags = !options.append ? 'w' : 'a'; - if (!options.overwrite) { - flags += 'x'; - } - return flags; -} - -function isFatalOverwriteError(err, flags) { - if (!err) { - return false; - } - - if (err.code === 'EEXIST' && flags[1] === 'x') { - // Handle scenario for file overwrite failures. - return false; - } - - // Otherwise, this is a fatal error - return true; -} - -function isFatalUnlinkError(err) { - if (!err || err.code === 'ENOENT') { - return false; - } - - return true; -} - -function getModeDiff(fsMode, vinylMode) { - var modeDiff = 0; - - if (typeof vinylMode === 'number') { - modeDiff = (vinylMode ^ fsMode) & constants.MASK_MODE; - } - - return modeDiff; -} - -function getTimesDiff(fsStat, vinylStat) { - - var mtime = date(vinylStat.mtime) || 0; - if (!mtime) { - return; - } - - var atime = date(vinylStat.atime) || 0; - if (+mtime === +fsStat.mtime && - +atime === +fsStat.atime) { - return; - } - - if (!atime) { - atime = date(fsStat.atime) || undefined; - } - - var timesDiff = { - mtime: vinylStat.mtime, - atime: atime, - }; - - return timesDiff; -} - -function getOwnerDiff(fsStat, vinylStat) { - if (!isValidUnixId(vinylStat.uid) && - !isValidUnixId(vinylStat.gid)) { - return; - } - - if ((!isValidUnixId(fsStat.uid) && !isValidUnixId(vinylStat.uid)) || - (!isValidUnixId(fsStat.gid) && !isValidUnixId(vinylStat.gid))) { - return; - } - - var uid = fsStat.uid; // Default to current uid. - if (isValidUnixId(vinylStat.uid)) { - uid = vinylStat.uid; - } - - var gid = fsStat.gid; // Default to current gid. - if (isValidUnixId(vinylStat.gid)) { - gid = vinylStat.gid; - } - - if (uid === fsStat.uid && - gid === fsStat.gid) { - return; - } - - var ownerDiff = { - uid: uid, - gid: gid, - }; - - return ownerDiff; -} - -function isOwner(fsStat) { - var hasGetuid = (typeof process.getuid === 'function'); - var hasGeteuid = (typeof process.geteuid === 'function'); - - // If we don't have either, assume we don't have permissions. - // This should only happen on Windows. - // Windows basically noops fchmod and errors on futimes called on directories. - if (!hasGeteuid && !hasGetuid) { - return false; - } - - var uid; - if (hasGeteuid) { - uid = process.geteuid(); - } else { - uid = process.getuid(); - } - - if (fsStat.uid !== uid && uid !== 0) { - return false; - } - - return true; -} - -function reflectStat(path, file, callback) { - // Set file.stat to the reflect current state on disk - fs.stat(path, onStat); - - function onStat(statErr, stat) { - if (statErr) { - return callback(statErr); - } - - file.stat = stat; - callback(); - } -} - -function reflectLinkStat(path, file, callback) { - // Set file.stat to the reflect current state on disk - fs.lstat(path, onLstat); - - function onLstat(lstatErr, stat) { - if (lstatErr) { - return callback(lstatErr); - } - - file.stat = stat; - callback(); - } -} - -function updateMetadata(fd, file, callback) { - - fs.fstat(fd, onStat); - - function onStat(statErr, stat) { - if (statErr) { - return callback(statErr); - } - - // Check if mode needs to be updated - var modeDiff = getModeDiff(stat.mode, file.stat.mode); - - // Check if atime/mtime need to be updated - var timesDiff = getTimesDiff(stat, file.stat); - - // Check if uid/gid need to be updated - var ownerDiff = getOwnerDiff(stat, file.stat); - - // Set file.stat to the reflect current state on disk - assign(file.stat, stat); - - // Nothing to do - if (!modeDiff && !timesDiff && !ownerDiff) { - return callback(); - } - - // Check access, `futimes`, `fchmod` & `fchown` only work if we own - // the file, or if we are effectively root (`fchown` only when root). - if (!isOwner(stat)) { - return callback(); - } - - if (modeDiff) { - return mode(); - } - if (timesDiff) { - return times(); - } - owner(); - - function mode() { - var mode = stat.mode ^ modeDiff; - - fs.fchmod(fd, mode, onFchmod); - - function onFchmod(fchmodErr) { - if (!fchmodErr) { - file.stat.mode = mode; - } - if (timesDiff) { - return times(fchmodErr); - } - if (ownerDiff) { - return owner(fchmodErr); - } - callback(fchmodErr); - } - } - - function times(propagatedErr) { - fs.futimes(fd, timesDiff.atime, timesDiff.mtime, onFutimes); - - function onFutimes(futimesErr) { - if (!futimesErr) { - file.stat.atime = timesDiff.atime; - file.stat.mtime = timesDiff.mtime; - } - if (ownerDiff) { - return owner(propagatedErr || futimesErr); - } - callback(propagatedErr || futimesErr); - } - } - - function owner(propagatedErr) { - fs.fchown(fd, ownerDiff.uid, ownerDiff.gid, onFchown); - - function onFchown(fchownErr) { - if (!fchownErr) { - file.stat.uid = ownerDiff.uid; - file.stat.gid = ownerDiff.gid; - } - callback(propagatedErr || fchownErr); - } - } - } -} - -function symlink(srcPath, destPath, opts, callback) { - // Because fs.symlink does not allow atomic overwrite option with flags, we - // delete and recreate if the link already exists and overwrite is true. - if (opts.flags === 'w') { - // TODO What happens when we call unlink with windows junctions? - fs.unlink(destPath, onUnlink); - } else { - fs.symlink(srcPath, destPath, opts.type, onSymlink); - } - - function onUnlink(unlinkErr) { - if (isFatalUnlinkError(unlinkErr)) { - return callback(unlinkErr); - } - fs.symlink(srcPath, destPath, opts.type, onSymlink); - } - - function onSymlink(symlinkErr) { - if (isFatalOverwriteError(symlinkErr, opts.flags)) { - return callback(symlinkErr); - } - callback(); - } -} - -/* - Custom writeFile implementation because we need access to the - file descriptor after the write is complete. - Most of the implementation taken from node core. - */ -function writeFile(filepath, data, options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } - - if (!Buffer.isBuffer(data)) { - return callback(new TypeError('Data must be a Buffer')); - } - - if (!options) { - options = {}; - } - - // Default the same as node - var mode = options.mode || constants.DEFAULT_FILE_MODE; - var flags = options.flags || 'w'; - var position = APPEND_MODE_REGEXP.test(flags) ? null : 0; - - fs.open(filepath, flags, mode, onOpen); - - function onOpen(openErr, fd) { - if (openErr) { - return onComplete(openErr); - } - - fs.write(fd, data, 0, data.length, position, onComplete); - - function onComplete(writeErr) { - callback(writeErr, fd); - } - } -} - -function createWriteStream(path, options, flush) { - return new WriteStream(path, options, flush); -} - -// Taken from node core and altered to receive a flush function and simplified -// To be used for cleanup (like updating times/mode/etc) -function WriteStream(path, options, flush) { - // Not exposed so we can avoid the case where someone doesn't use `new` - - if (typeof options === 'function') { - flush = options; - options = null; - } - - options = options || {}; - - Writable.call(this, options); - - this.flush = flush; - this.path = path; - - this.mode = options.mode || constants.DEFAULT_FILE_MODE; - this.flags = options.flags || 'w'; - - // Used by node's `fs.WriteStream` - this.fd = null; - this.start = null; - - this.open(); - - // Dispose on finish. - this.once('finish', this.close); -} - -util.inherits(WriteStream, Writable); - -WriteStream.prototype.open = function() { - var self = this; - - fs.open(this.path, this.flags, this.mode, onOpen); - - function onOpen(openErr, fd) { - if (openErr) { - self.destroy(); - self.emit('error', openErr); - return; - } - - self.fd = fd; - self.emit('open', fd); - } -}; - -// Use our `end` method since it is patched for flush -WriteStream.prototype.destroySoon = WriteStream.prototype.end; - -WriteStream.prototype._destroy = function(err, cb) { - this.close(function(err2) { - cb(err || err2); - }); -}; - -WriteStream.prototype.close = function(cb) { - var that = this; - - if (cb) { - this.once('close', cb); - } - - if (this.closed || typeof this.fd !== 'number') { - if (typeof this.fd !== 'number') { - this.once('open', closeOnOpen); - return; - } - - return process.nextTick(function() { - that.emit('close'); - }); - } - - this.closed = true; - - fs.close(this.fd, function(er) { - if (er) { - that.emit('error', er); - } else { - that.emit('close'); - } - }); - - this.fd = null; -}; - -WriteStream.prototype._final = function(callback) { - if (typeof this.flush !== 'function') { - return callback(); - } - - this.flush(this.fd, callback); -}; - -function closeOnOpen() { - this.close(); -} - -WriteStream.prototype._write = function(data, encoding, callback) { - var self = this; - - // This is from node core but I have no idea how to get code coverage on it - if (!Buffer.isBuffer(data)) { - return this.emit('error', new Error('Invalid data')); - } - - if (typeof this.fd !== 'number') { - return this.once('open', onOpen); - } - - fs.write(this.fd, data, 0, data.length, null, onWrite); - - function onOpen() { - self._write(data, encoding, callback); - } - - function onWrite(writeErr) { - if (writeErr) { - self.destroy(); - callback(writeErr); - return; - } - - callback(); - } -}; - -module.exports = { - closeFd: closeFd, - isValidUnixId: isValidUnixId, - getFlags: getFlags, - isFatalOverwriteError: isFatalOverwriteError, - isFatalUnlinkError: isFatalUnlinkError, - getModeDiff: getModeDiff, - getTimesDiff: getTimesDiff, - getOwnerDiff: getOwnerDiff, - isOwner: isOwner, - reflectStat: reflectStat, - reflectLinkStat: reflectLinkStat, - updateMetadata: updateMetadata, - symlink: symlink, - writeFile: writeFile, - createWriteStream: createWriteStream, -}; diff --git a/node_modules/vinyl-fs/lib/src/index.js b/node_modules/vinyl-fs/lib/src/index.js deleted file mode 100644 index 6f531cea..00000000 --- a/node_modules/vinyl-fs/lib/src/index.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -var gs = require('glob-stream'); -var pumpify = require('pumpify'); -var toThrough = require('to-through'); -var isValidGlob = require('is-valid-glob'); -var createResolver = require('resolve-options'); - -var config = require('./options'); -var prepare = require('./prepare'); -var wrapVinyl = require('./wrap-vinyl'); -var sourcemap = require('./sourcemap'); -var readContents = require('./read-contents'); -var resolveSymlinks = require('./resolve-symlinks'); - -function src(glob, opt) { - var optResolver = createResolver(config, opt); - - if (!isValidGlob(glob)) { - throw new Error('Invalid glob argument: ' + glob); - } - - var streams = [ - gs(glob, opt), - wrapVinyl(optResolver), - resolveSymlinks(optResolver), - prepare(optResolver), - readContents(optResolver), - sourcemap(optResolver), - ]; - - var outputStream = pumpify.obj(streams); - - return toThrough(outputStream); -} - - -module.exports = src; diff --git a/node_modules/vinyl-fs/lib/src/options.js b/node_modules/vinyl-fs/lib/src/options.js deleted file mode 100644 index 2d9861ca..00000000 --- a/node_modules/vinyl-fs/lib/src/options.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var config = { - buffer: { - type: 'boolean', - default: true, - }, - read: { - type: 'boolean', - default: true, - }, - since: { - type: 'date', - }, - removeBOM: { - type: 'boolean', - default: true, - }, - sourcemaps: { - type: 'boolean', - default: false, - }, - resolveSymlinks: { - type: 'boolean', - default: true, - }, -}; - -module.exports = config; diff --git a/node_modules/vinyl-fs/lib/src/prepare.js b/node_modules/vinyl-fs/lib/src/prepare.js deleted file mode 100644 index 5fa18dff..00000000 --- a/node_modules/vinyl-fs/lib/src/prepare.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -var through = require('through2'); - -function prepareRead(optResolver) { - - function normalize(file, enc, callback) { - - var since = optResolver.resolve('since', file); - - // Skip this file if since option is set and current file is too old - if (file.stat && file.stat.mtime <= since) { - return callback(); - } - - return callback(null, file); - } - - return through.obj(normalize); -} - -module.exports = prepareRead; diff --git a/node_modules/vinyl-fs/lib/src/read-contents/index.js b/node_modules/vinyl-fs/lib/src/read-contents/index.js deleted file mode 100644 index 5c3117d7..00000000 --- a/node_modules/vinyl-fs/lib/src/read-contents/index.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -var through = require('through2'); - -var readDir = require('./read-dir'); -var readStream = require('./read-stream'); -var readBuffer = require('./read-buffer'); -var readSymbolicLink = require('./read-symbolic-link'); - -function readContents(optResolver) { - - function readFile(file, enc, callback) { - - // Skip reading contents if read option says so - var read = optResolver.resolve('read', file); - if (!read) { - return callback(null, file); - } - - // Don't fail to read a directory - if (file.isDirectory()) { - return readDir(file, optResolver, onRead); - } - - // Process symbolic links included with `resolveSymlinks` option - if (file.stat && file.stat.isSymbolicLink()) { - return readSymbolicLink(file, optResolver, onRead); - } - - // Read and pass full contents - var buffer = optResolver.resolve('buffer', file); - if (buffer) { - return readBuffer(file, optResolver, onRead); - } - - // Don't buffer anything - just pass streams - return readStream(file, optResolver, onRead); - - // This is invoked by the various readXxx modules when they've finished - // reading the contents. - function onRead(readErr) { - if (readErr) { - return callback(readErr); - } - return callback(null, file); - } - } - - return through.obj(readFile); -} - -module.exports = readContents; diff --git a/node_modules/vinyl-fs/lib/src/read-contents/read-buffer.js b/node_modules/vinyl-fs/lib/src/read-contents/read-buffer.js deleted file mode 100644 index c7108334..00000000 --- a/node_modules/vinyl-fs/lib/src/read-contents/read-buffer.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -var fs = require('graceful-fs'); -var removeBomBuffer = require('remove-bom-buffer'); - -function bufferFile(file, optResolver, onRead) { - fs.readFile(file.path, onReadFile); - - function onReadFile(readErr, data) { - if (readErr) { - return onRead(readErr); - } - - var removeBOM = optResolver.resolve('removeBOM', file); - if (removeBOM) { - file.contents = removeBomBuffer(data); - } else { - file.contents = data; - } - - onRead(); - } -} - -module.exports = bufferFile; diff --git a/node_modules/vinyl-fs/lib/src/read-contents/read-dir.js b/node_modules/vinyl-fs/lib/src/read-contents/read-dir.js deleted file mode 100644 index be7262b7..00000000 --- a/node_modules/vinyl-fs/lib/src/read-contents/read-dir.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -function readDir(file, optResolver, onRead) { - // Do nothing for now - onRead(); -} - -module.exports = readDir; diff --git a/node_modules/vinyl-fs/lib/src/read-contents/read-stream.js b/node_modules/vinyl-fs/lib/src/read-contents/read-stream.js deleted file mode 100644 index baa6e47d..00000000 --- a/node_modules/vinyl-fs/lib/src/read-contents/read-stream.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -var fs = require('graceful-fs'); -var removeBomStream = require('remove-bom-stream'); -var lazystream = require('lazystream'); -var createResolver = require('resolve-options'); - -function streamFile(file, optResolver, onRead) { - if (typeof optResolver === 'function') { - onRead = optResolver; - optResolver = createResolver(); - } - - var filePath = file.path; - - var removeBOM = optResolver.resolve('removeBOM', file); - - file.contents = new lazystream.Readable(function() { - var contents = fs.createReadStream(filePath); - - if (removeBOM) { - return contents.pipe(removeBomStream()); - } - - return contents; - }); - - onRead(); -} - -module.exports = streamFile; diff --git a/node_modules/vinyl-fs/lib/src/read-contents/read-symbolic-link.js b/node_modules/vinyl-fs/lib/src/read-contents/read-symbolic-link.js deleted file mode 100644 index 47e24cdd..00000000 --- a/node_modules/vinyl-fs/lib/src/read-contents/read-symbolic-link.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -var fs = require('graceful-fs'); - -function readLink(file, optResolver, onRead) { - fs.readlink(file.path, onReadlink); - - function onReadlink(readErr, target) { - if (readErr) { - return onRead(readErr); - } - - // Store the link target path - file.symlink = target; - - onRead(); - } -} - -module.exports = readLink; diff --git a/node_modules/vinyl-fs/lib/src/resolve-symlinks.js b/node_modules/vinyl-fs/lib/src/resolve-symlinks.js deleted file mode 100644 index d77f912f..00000000 --- a/node_modules/vinyl-fs/lib/src/resolve-symlinks.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -var through = require('through2'); -var fo = require('../file-operations'); - -function resolveSymlinks(optResolver) { - - // A stat property is exposed on file objects as a (wanted) side effect - function resolveFile(file, enc, callback) { - - fo.reflectLinkStat(file.path, file, onReflect); - - function onReflect(statErr) { - if (statErr) { - return callback(statErr); - } - - if (!file.stat.isSymbolicLink()) { - return callback(null, file); - } - - var resolveSymlinks = optResolver.resolve('resolveSymlinks', file); - - if (!resolveSymlinks) { - return callback(null, file); - } - - // Get target's stats - fo.reflectStat(file.path, file, onReflect); - } - } - - return through.obj(resolveFile); -} - -module.exports = resolveSymlinks; diff --git a/node_modules/vinyl-fs/lib/src/sourcemap.js b/node_modules/vinyl-fs/lib/src/sourcemap.js deleted file mode 100644 index e03971f1..00000000 --- a/node_modules/vinyl-fs/lib/src/sourcemap.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var through = require('through2'); -var sourcemap = require('vinyl-sourcemap'); - -function sourcemapStream(optResolver) { - - function addSourcemap(file, enc, callback) { - var srcMap = optResolver.resolve('sourcemaps', file); - - if (!srcMap) { - return callback(null, file); - } - - sourcemap.add(file, onAdd); - - function onAdd(sourcemapErr, updatedFile) { - if (sourcemapErr) { - return callback(sourcemapErr); - } - - callback(null, updatedFile); - } - } - - return through.obj(addSourcemap); -} - -module.exports = sourcemapStream; diff --git a/node_modules/vinyl-fs/lib/src/wrap-vinyl.js b/node_modules/vinyl-fs/lib/src/wrap-vinyl.js deleted file mode 100644 index 883c5575..00000000 --- a/node_modules/vinyl-fs/lib/src/wrap-vinyl.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var File = require('vinyl'); -var through = require('through2'); - -function wrapVinyl() { - - function wrapFile(globFile, enc, callback) { - - var file = new File(globFile); - - callback(null, file); - } - - return through.obj(wrapFile); -} - -module.exports = wrapVinyl; diff --git a/node_modules/vinyl-fs/lib/symlink/index.js b/node_modules/vinyl-fs/lib/symlink/index.js deleted file mode 100644 index 6e835da0..00000000 --- a/node_modules/vinyl-fs/lib/symlink/index.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -var pumpify = require('pumpify'); -var lead = require('lead'); -var mkdirpStream = require('fs-mkdirp-stream'); -var createResolver = require('resolve-options'); - -var config = require('./options'); -var prepare = require('./prepare'); -var linkFile = require('./link-file'); - -var folderConfig = { - outFolder: { - type: 'string', - }, -}; - -function symlink(outFolder, opt) { - if (!outFolder) { - throw new Error('Invalid symlink() folder argument.' + - ' Please specify a non-empty string or a function.'); - } - - var optResolver = createResolver(config, opt); - var folderResolver = createResolver(folderConfig, { outFolder: outFolder }); - - function dirpath(file, callback) { - var dirMode = optResolver.resolve('dirMode', file); - - callback(null, file.dirname, dirMode); - } - - var stream = pumpify.obj( - prepare(folderResolver, optResolver), - mkdirpStream.obj(dirpath), - linkFile(optResolver) - ); - - // Sink the stream to start flowing - return lead(stream); -} - -module.exports = symlink; diff --git a/node_modules/vinyl-fs/lib/symlink/link-file.js b/node_modules/vinyl-fs/lib/symlink/link-file.js deleted file mode 100644 index e1caf977..00000000 --- a/node_modules/vinyl-fs/lib/symlink/link-file.js +++ /dev/null @@ -1,89 +0,0 @@ -'use strict'; - -var os = require('os'); -var path = require('path'); - -var through = require('through2'); - -var fo = require('../file-operations'); - -var isWindows = (os.platform() === 'win32'); - -function linkStream(optResolver) { - - function linkFile(file, enc, callback) { - var isRelative = optResolver.resolve('relativeSymlinks', file); - var flags = fo.getFlags({ - overwrite: optResolver.resolve('overwrite', file), - append: false, - }); - - if (!isWindows) { - // On non-Windows, just use 'file' - return createLinkWithType('file'); - } - - fo.reflectStat(file.symlink, file, onReflectTarget); - - function onReflectTarget(statErr) { - if (statErr && statErr.code !== 'ENOENT') { - return callback(statErr); - } - // If target doesn't exist, the vinyl will still carry the target stats. - // Let's use those to determine which kind of dangling link to create. - - // This option provides a way to create a Junction instead of a - // Directory symlink on Windows. This comes with the following caveats: - // * NTFS Junctions cannot be relative. - // * NTFS Junctions MUST be directories. - // * NTFS Junctions must be on the same file system. - // * Most products CANNOT detect a directory is a Junction: - // This has the side effect of possibly having a whole directory - // deleted when a product is deleting the Junction directory. - // For example, JetBrains product lines will delete the entire contents - // of the TARGET directory because the product does not realize it's - // a symlink as the JVM and Node return false for isSymlink. - - // This function is Windows only, so we don't need to check again - var useJunctions = optResolver.resolve('useJunctions', file); - - var dirType = useJunctions ? 'junction' : 'dir'; - var type = !statErr && file.isDirectory() ? dirType : 'file'; - - createLinkWithType(type); - } - - function createLinkWithType(type) { - // This is done after prepare() to use the adjusted file.base property - if (isRelative && type !== 'junction') { - file.symlink = path.relative(file.base, file.symlink); - } - - var opts = { - flags: flags, - type: type, - }; - fo.symlink(file.symlink, file.path, opts, onSymlink); - } - - function onSymlink(symlinkErr) { - if (symlinkErr) { - return callback(symlinkErr); - } - - fo.reflectLinkStat(file.path, file, onReflectLink); - } - - function onReflectLink(reflectErr) { - if (reflectErr) { - return callback(reflectErr); - } - - callback(null, file); - } - } - - return through.obj(linkFile); -} - -module.exports = linkStream; diff --git a/node_modules/vinyl-fs/lib/symlink/options.js b/node_modules/vinyl-fs/lib/symlink/options.js deleted file mode 100644 index fd9e1c7d..00000000 --- a/node_modules/vinyl-fs/lib/symlink/options.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -var config = { - cwd: { - type: 'string', - default: process.cwd, - }, - dirMode: { - type: 'number', - }, - overwrite: { - type: 'boolean', - default: true, - }, - relativeSymlinks: { - type: 'boolean', - default: false, - }, - // This option is ignored on non-Windows platforms - useJunctions: { - type: 'boolean', - default: true, - }, -}; - -module.exports = config; diff --git a/node_modules/vinyl-fs/lib/symlink/prepare.js b/node_modules/vinyl-fs/lib/symlink/prepare.js deleted file mode 100644 index dd2ec1ad..00000000 --- a/node_modules/vinyl-fs/lib/symlink/prepare.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -var path = require('path'); - -var fs = require('graceful-fs'); -var Vinyl = require('vinyl'); -var through = require('through2'); - -function prepareSymlink(folderResolver, optResolver) { - if (!folderResolver) { - throw new Error('Invalid output folder'); - } - - function normalize(file, enc, cb) { - if (!Vinyl.isVinyl(file)) { - return cb(new Error('Received a non-Vinyl object in `symlink()`')); - } - - // TODO: Remove this after people upgrade vinyl/transition from gulp-util - if (typeof file.isSymbolic !== 'function') { - file = new Vinyl(file); - } - - var cwd = path.resolve(optResolver.resolve('cwd', file)); - - var outFolderPath = folderResolver.resolve('outFolder', file); - if (!outFolderPath) { - return cb(new Error('Invalid output folder')); - } - var basePath = path.resolve(cwd, outFolderPath); - var writePath = path.resolve(basePath, file.relative); - - // Wire up new properties - // Note: keep the target stats for now, we may need them in link-file - file.stat = (file.stat || new fs.Stats()); - file.cwd = cwd; - file.base = basePath; - // This is the path we are linking *TO* - file.symlink = file.path; - file.path = writePath; - // We have to set contents to null for a link - // Otherwise `isSymbolic()` returns false - file.contents = null; - - cb(null, file); - } - - return through.obj(normalize); -} - -module.exports = prepareSymlink; diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/.travis.yml b/node_modules/vinyl-fs/node_modules/readable-stream/.travis.yml deleted file mode 100644 index f62cdac0..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -sudo: false -language: node_js -before_install: - - (test $NPM_LEGACY && npm install -g npm@2 && npm install -g npm@3) || true -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: NPM_LEGACY=true - - node_js: '0.10' - env: NPM_LEGACY=true - - node_js: '0.11' - env: NPM_LEGACY=true - - node_js: '0.12' - env: NPM_LEGACY=true - - node_js: 1 - env: NPM_LEGACY=true - - node_js: 2 - env: NPM_LEGACY=true - - node_js: 3 - env: NPM_LEGACY=true - - node_js: 4 - - node_js: 5 - - node_js: 6 - - node_js: 7 - - node_js: 8 - - node_js: 9 -script: "npm run test" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/vinyl-fs/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58d..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/GOVERNANCE.md b/node_modules/vinyl-fs/node_modules/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93f..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### Streams Working Group - -The Node.js Streams is jointly governed by a Working Group -(WG) -that is responsible for high-level guidance of the project. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Conduct guidelines -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project -[README.md](./README.md#current-project-team-members). - -### Collaborators - -The readable-stream GitHub repository is -maintained by the WG and additional Collaborators who are added by the -WG on an ongoing basis. - -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the WG and their addition as -Collaborators is discussed during the WG meeting. - -_Note:_ If you make a significant contribution and are not considered -for commit-access log an issue or contact a WG member directly and it -will be brought up in the next WG meeting. - -Modifications of the contents of the readable-stream repository are -made on -a collaborative basis. Anybody with a GitHub account may propose a -modification via pull request and it will be considered by the project -Collaborators. All pull requests must be reviewed and accepted by a -Collaborator with sufficient expertise who is able to take full -responsibility for the change. In the case of pull requests proposed -by an existing Collaborator, an additional Collaborator is required -for sign-off. Consensus should be sought if additional Collaborators -participate and there is disagreement around a particular -modification. See _Consensus Seeking Process_ below for further detail -on the consensus model used for governance. - -Collaborators may opt to elevate significant or controversial -modifications, or modifications that have not found consensus to the -WG for discussion by assigning the ***WG-agenda*** tag to a pull -request or issue. The WG should serve as the final arbiter where -required. - -For the current list of Collaborators, see the project -[README.md](./README.md#members). - -### WG Membership - -WG seats are not time-limited. There is no fixed size of the WG. -However, the expected target is between 6 and 12, to ensure adequate -coverage of important areas of expertise, balanced with the ability to -make decisions efficiently. - -There is no specific set of requirements or qualifications for WG -membership beyond these rules. - -The WG may add additional members to the WG by unanimous consensus. - -A WG member may be removed from the WG by voluntary resignation, or by -unanimous consensus of all other WG members. - -Changes to WG membership should be posted in the agenda, and may be -suggested as any other agenda item (see "WG Meetings" below). - -If an addition or removal is proposed during a meeting, and the full -WG is not in attendance to participate, then the addition or removal -is added to the agenda for the subsequent meeting. This is to ensure -that all members are given the opportunity to participate in all -membership decisions. If a WG member is unable to attend a meeting -where a planned membership decision is being made, then their consent -is assumed. - -No more than 1/3 of the WG members may be affiliated with the same -employer. If removal or resignation of a WG member, or a change of -employment by a WG member, creates a situation where more than 1/3 of -the WG membership shares an employer, then the situation must be -immediately remedied by the resignation or removal of one or more WG -members affiliated with the over-represented employer(s). - -### WG Meetings - -The WG meets occasionally on a Google Hangout On Air. A designated moderator -approved by the WG runs the meeting. Each meeting should be -published to YouTube. - -Items are added to the WG agenda that are considered contentious or -are modifications of governance, contribution policy, WG membership, -or release process. - -The intention of the agenda is not to approve or review all patches; -that should happen continuously on GitHub and be handled by the larger -group of Collaborators. - -Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, -WG member or the moderator can add the item to the agenda by adding -the ***WG-agenda*** tag to the issue. - -Prior to each WG meeting the moderator will share the Agenda with -members of the WG. WG members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the WG -cannot veto or remove items. - -The WG may invite persons or representatives from certain projects to -participate in a non-voting capacity. - -The moderator is responsible for summarizing the discussion of each -agenda item and sends it as a pull request after the meeting. - -### Consensus Seeking Process - -The WG follows a -[Consensus -Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) -decision-making model. - -When an agenda item has appeared to reach a consensus the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. - -If an agenda item cannot reach a consensus a WG member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be seconded by a majority of the WG -or else the discussion will continue. Simple majority wins. - -Note that changes to WG membership require a majority consensus. See -"WG Membership" above. diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/LICENSE b/node_modules/vinyl-fs/node_modules/readable-stream/LICENSE deleted file mode 100644 index 2873b3b2..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/README.md b/node_modules/vinyl-fs/node_modules/readable-stream/README.md deleted file mode 100644 index 23fe3f3e..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# readable-stream - -***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - - -## Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E -* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/vinyl-fs/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index 83275f19..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,60 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section - - diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/duplex-browser.js b/node_modules/vinyl-fs/node_modules/readable-stream/duplex-browser.js deleted file mode 100644 index f8b2db83..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/duplex-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_duplex.js'); diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/duplex.js b/node_modules/vinyl-fs/node_modules/readable-stream/duplex.js deleted file mode 100644 index 46924cbf..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Duplex diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 57003c32..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -{ - // avoid scope creep, the keys array can then be collected - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - pna.nextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -Object.defineProperty(Duplex.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); - -Duplex.prototype._destroy = function (err, cb) { - this.push(null); - this.end(); - - pna.nextTick(cb, err); -}; \ No newline at end of file diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 612edb4d..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 0f807646..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1019 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - -/**/ -var Duplex; -/**/ - -Readable.ReadableState = ReadableState; - -/**/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var BufferList = require('./internal/streams/BufferList'); -var destroyImpl = require('./internal/streams/destroy'); -var StringDecoder; - -util.inherits(Readable, Stream); - -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); - - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var readableHwm = options.readableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} - -Object.defineProperty(Readable.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); - -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - this.push(null); - cb(err); -}; - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); - } else if (state.ended) { - stream.emit('error', new Error('stream.push() after EOF')); - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - } - } - - return needMoreData(state); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } else { - state.length -= n; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - pna.nextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('_read() is not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - // If the user pushes more data while we're writing to dest then we'll end up - // in ondata again. However, we only want to increase awaitDrain once because - // dest will only emit one 'drain' event for the multiple writes. - // => Introduce a guard on increasing awaitDrain. - var increasedAwaitDrain = false; - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - increasedAwaitDrain = false; - var ret = dest.write(chunk); - if (false === ret && !increasedAwaitDrain) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - increasedAwaitDrain = true; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { hasUnpiped: false }; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, unpipeInfo); - }return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this, unpipeInfo); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data') { - // Start flowing on next tick if stream isn't explicitly paused - if (this._readableState.flowing !== false) this.resume(); - } else if (ev === 'readable') { - var state = this._readableState; - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.emittedReadable = false; - if (!state.reading) { - pna.nextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - pna.nextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - state.awaitDrain = 0; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null) {} -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var _this = this; - - var state = this._readableState; - var paused = false; - - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - - _this.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return this; -}; - -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._readableState.highWaterMark; - } -}); - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = fromListPartial(n, state.buffer, state.decoder); - } - - return ret; -} - -// Extracts only enough buffered data to satisfy the amount requested. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromListPartial(n, list, hasStrings) { - var ret; - if (n < list.head.data.length) { - // slice is the same for buffers and strings - ret = list.head.data.slice(0, n); - list.head.data = list.head.data.slice(n); - } else if (n === list.head.data.length) { - // first chunk is a perfect match - ret = list.shift(); - } else { - // result spans more than one buffer - ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); - } - return ret; -} - -// Copies a specified amount of characters from the list of buffered data -// chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBufferString(n, list) { - var p = list.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -// Copies a specified amount of bytes from the list of buffered data chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBuffer(n, list) { - var ret = Buffer.allocUnsafe(n); - var p = list.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - pna.nextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index fcfc105a..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) { - return this.emit('error', new Error('write callback called multiple times')); - } - - ts.writechunk = null; - ts.writecb = null; - - if (data != null) // single equals check for both `null` and `undefined` - this.push(data); - - cb(er); - - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); -} - -function prefinish() { - var _this = this; - - if (typeof this._flush === 'function') { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('_transform() is not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -Transform.prototype._destroy = function (err, cb) { - var _this2 = this; - - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - _this2.emit('close'); - }); -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - - if (data != null) // single equals check for both `null` and `undefined` - stream.push(data); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); - - if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index b0b02200..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,687 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Writable; - -/* */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; -/**/ - -/**/ -var Duplex; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = Object.create(require('core-util-is')); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -var destroyImpl = require('./internal/streams/destroy'); - -util.inherits(Writable, Stream); - -function nop() {} - -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var writableHwm = options.writableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // if _final has been called - this.finalCalled = false; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // has it been destroyed - this.destroyed = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function (object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function (object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { - return new Writable(options); - } - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - pna.nextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - pna.nextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} - -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - pna.nextTick(cb, er); - // this can emit finish, and it will always happen - // after error - pna.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('_write() is not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - stream.emit('error', err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function') { - state.pendingcb++; - state.finalCalled = true; - pna.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = corkReq; - } else { - state.corkedRequestsFree = corkReq; - } -} - -Object.defineProperty(Writable.prototype, 'destroyed', { - get: function () { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); - -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - this.end(); - cb(err); -}; \ No newline at end of file diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/vinyl-fs/node_modules/readable-stream/lib/internal/streams/BufferList.js deleted file mode 100644 index aefc68bd..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/lib/internal/streams/BufferList.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Buffer = require('safe-buffer').Buffer; -var util = require('util'); - -function copyBuffer(src, target, offset) { - src.copy(target, offset); -} - -module.exports = function () { - function BufferList() { - _classCallCheck(this, BufferList); - - this.head = null; - this.tail = null; - this.length = 0; - } - - BufferList.prototype.push = function push(v) { - var entry = { data: v, next: null }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - }; - - BufferList.prototype.unshift = function unshift(v) { - var entry = { data: v, next: this.head }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - }; - - BufferList.prototype.shift = function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - }; - - BufferList.prototype.clear = function clear() { - this.head = this.tail = null; - this.length = 0; - }; - - BufferList.prototype.join = function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) { - ret += s + p.data; - }return ret; - }; - - BufferList.prototype.concat = function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - if (this.length === 1) return this.head.data; - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; - }; - - return BufferList; -}(); - -if (util && util.inspect && util.inspect.custom) { - module.exports.prototype[util.inspect.custom] = function () { - var obj = util.inspect({ length: this.length }); - return this.constructor.name + ' ' + obj; - }; -} \ No newline at end of file diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/vinyl-fs/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index 5a0a0d88..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { - pna.nextTick(emitErrorNT, this, err); - } - return this; - } - - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; - } - - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - pna.nextTick(emitErrorNT, _this, err); - if (_this._writableState) { - _this._writableState.errorEmitted = true; - } - } else if (cb) { - cb(err); - } - }); - - return this; -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy -}; \ No newline at end of file diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/vinyl-fs/node_modules/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3fd..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/vinyl-fs/node_modules/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b6..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/package.json b/node_modules/vinyl-fs/node_modules/readable-stream/package.json deleted file mode 100644 index e2c4008c..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "readable-stream@^2.3.3", - "_id": "readable-stream@2.3.7", - "_inBundle": false, - "_integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "_location": "/vinyl-fs/readable-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "readable-stream@^2.3.3", - "name": "readable-stream", - "escapedName": "readable-stream", - "rawSpec": "^2.3.3", - "saveSpec": null, - "fetchSpec": "^2.3.3" - }, - "_requiredBy": [ - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "_shasum": "1eca1cf711aef814c04f62252a36a62f6cb23b57", - "_spec": "readable-stream@^2.3.3", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs", - "browser": { - "util": false, - "./readable.js": "./readable-browser.js", - "./writable.js": "./writable-browser.js", - "./duplex.js": "./duplex-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "deprecated": false, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "assert": "^1.4.0", - "babel-polyfill": "^6.9.1", - "buffer": "^4.9.0", - "lolex": "^2.3.2", - "nyc": "^6.4.0", - "tap": "^0.7.0", - "tape": "^4.8.0" - }, - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "name": "readable-stream", - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov", - "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js" - }, - "version": "2.3.7" -} diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/passthrough.js b/node_modules/vinyl-fs/node_modules/readable-stream/passthrough.js deleted file mode 100644 index ffd791d7..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').PassThrough diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/readable-browser.js b/node_modules/vinyl-fs/node_modules/readable-stream/readable-browser.js deleted file mode 100644 index e5037259..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/readable-browser.js +++ /dev/null @@ -1,7 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/readable.js b/node_modules/vinyl-fs/node_modules/readable-stream/readable.js deleted file mode 100644 index ec89ec53..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,19 +0,0 @@ -var Stream = require('stream'); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; - exports = module.exports = Stream.Readable; - exports.Readable = Stream.Readable; - exports.Writable = Stream.Writable; - exports.Duplex = Stream.Duplex; - exports.Transform = Stream.Transform; - exports.PassThrough = Stream.PassThrough; - exports.Stream = Stream; -} else { - exports = module.exports = require('./lib/_stream_readable.js'); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = require('./lib/_stream_writable.js'); - exports.Duplex = require('./lib/_stream_duplex.js'); - exports.Transform = require('./lib/_stream_transform.js'); - exports.PassThrough = require('./lib/_stream_passthrough.js'); -} diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/transform.js b/node_modules/vinyl-fs/node_modules/readable-stream/transform.js deleted file mode 100644 index b1baba26..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Transform diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/writable-browser.js b/node_modules/vinyl-fs/node_modules/readable-stream/writable-browser.js deleted file mode 100644 index ebdde6a8..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/writable-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_writable.js'); diff --git a/node_modules/vinyl-fs/node_modules/readable-stream/writable.js b/node_modules/vinyl-fs/node_modules/readable-stream/writable.js deleted file mode 100644 index 3211a6f8..00000000 --- a/node_modules/vinyl-fs/node_modules/readable-stream/writable.js +++ /dev/null @@ -1,8 +0,0 @@ -var Stream = require("stream") -var Writable = require("./lib/_stream_writable.js") - -if (process.env.READABLE_STREAM === 'disable') { - module.exports = Stream && Stream.Writable || Writable -} else { - module.exports = Writable -} diff --git a/node_modules/vinyl-fs/node_modules/safe-buffer/LICENSE b/node_modules/vinyl-fs/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068cee..00000000 --- a/node_modules/vinyl-fs/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/vinyl-fs/node_modules/safe-buffer/README.md b/node_modules/vinyl-fs/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81afd..00000000 --- a/node_modules/vinyl-fs/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) - - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) - - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) - - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) - - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) - - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/node_modules/vinyl-fs/node_modules/safe-buffer/index.d.ts b/node_modules/vinyl-fs/node_modules/safe-buffer/index.d.ts deleted file mode 100644 index e9fed809..00000000 --- a/node_modules/vinyl-fs/node_modules/safe-buffer/index.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "safe-buffer" { - export class Buffer { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - } -} \ No newline at end of file diff --git a/node_modules/vinyl-fs/node_modules/safe-buffer/index.js b/node_modules/vinyl-fs/node_modules/safe-buffer/index.js deleted file mode 100644 index 22438dab..00000000 --- a/node_modules/vinyl-fs/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/node_modules/vinyl-fs/node_modules/safe-buffer/package.json b/node_modules/vinyl-fs/node_modules/safe-buffer/package.json deleted file mode 100644 index 2d404d06..00000000 --- a/node_modules/vinyl-fs/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "safe-buffer@~5.1.1", - "_id": "safe-buffer@5.1.2", - "_inBundle": false, - "_integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "_location": "/vinyl-fs/safe-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "safe-buffer@~5.1.1", - "name": "safe-buffer", - "escapedName": "safe-buffer", - "rawSpec": "~5.1.1", - "saveSpec": null, - "fetchSpec": "~5.1.1" - }, - "_requiredBy": [ - "/vinyl-fs/readable-stream", - "/vinyl-fs/string_decoder" - ], - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "_shasum": "991ec69d296e0313747d59bdfd2b745c35f8828d", - "_spec": "safe-buffer@~5.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs/node_modules/readable-stream", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Safer Node.js Buffer API", - "devDependencies": { - "standard": "*", - "tape": "^4.0.0" - }, - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "name": "safe-buffer", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "types": "index.d.ts", - "version": "5.1.2" -} diff --git a/node_modules/vinyl-fs/node_modules/string_decoder/.travis.yml b/node_modules/vinyl-fs/node_modules/string_decoder/.travis.yml deleted file mode 100644 index 3347a725..00000000 --- a/node_modules/vinyl-fs/node_modules/string_decoder/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test diff --git a/node_modules/vinyl-fs/node_modules/string_decoder/LICENSE b/node_modules/vinyl-fs/node_modules/string_decoder/LICENSE deleted file mode 100644 index 778edb20..00000000 --- a/node_modules/vinyl-fs/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - diff --git a/node_modules/vinyl-fs/node_modules/string_decoder/README.md b/node_modules/vinyl-fs/node_modules/string_decoder/README.md deleted file mode 100644 index 5fd58315..00000000 --- a/node_modules/vinyl-fs/node_modules/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# string_decoder - -***Node-core v8.9.4 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. - -## Streams Working Group - -`string_decoder` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -See [readable-stream](https://github.com/nodejs/readable-stream) for -more details. diff --git a/node_modules/vinyl-fs/node_modules/string_decoder/lib/string_decoder.js b/node_modules/vinyl-fs/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63f..00000000 --- a/node_modules/vinyl-fs/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var Buffer = require('safe-buffer').Buffer; -/**/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/node_modules/vinyl-fs/node_modules/string_decoder/package.json b/node_modules/vinyl-fs/node_modules/string_decoder/package.json deleted file mode 100644 index 05f2fd47..00000000 --- a/node_modules/vinyl-fs/node_modules/string_decoder/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "string_decoder@~1.1.1", - "_id": "string_decoder@1.1.1", - "_inBundle": false, - "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "_location": "/vinyl-fs/string_decoder", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "string_decoder@~1.1.1", - "name": "string_decoder", - "escapedName": "string_decoder", - "rawSpec": "~1.1.1", - "saveSpec": null, - "fetchSpec": "~1.1.1" - }, - "_requiredBy": [ - "/vinyl-fs/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8", - "_spec": "string_decoder@~1.1.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/nodejs/string_decoder/issues" - }, - "bundleDependencies": false, - "dependencies": { - "safe-buffer": "~5.1.0" - }, - "deprecated": false, - "description": "The string_decoder module from Node core", - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "lib/string_decoder.js", - "name": "string_decoder", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "test": "tap test/parallel/*.js && node test/verify-dependencies" - }, - "version": "1.1.1" -} diff --git a/node_modules/vinyl-fs/package.json b/node_modules/vinyl-fs/package.json deleted file mode 100644 index 011b0b0f..00000000 --- a/node_modules/vinyl-fs/package.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "_from": "vinyl-fs@~3.0", - "_id": "vinyl-fs@3.0.3", - "_inBundle": false, - "_integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", - "_location": "/vinyl-fs", - "_phantomChildren": { - "core-util-is": "1.0.2", - "inherits": "2.0.4", - "isarray": "1.0.0", - "process-nextick-args": "2.0.1", - "util-deprecate": "1.0.2" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "vinyl-fs@~3.0", - "name": "vinyl-fs", - "escapedName": "vinyl-fs", - "rawSpec": "~3.0", - "saveSpec": null, - "fetchSpec": "~3.0" - }, - "_requiredBy": [ - "/@antora/content-aggregator", - "/@antora/site-publisher", - "/@antora/ui-loader", - "/gulp-vinyl-zip" - ], - "_resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", - "_shasum": "c85849405f67428feabbbd5c5dbdd64f47d31bc7", - "_spec": "vinyl-fs@~3.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/content-aggregator", - "author": { - "name": "Gulp Team", - "email": "team@gulpjs.com", - "url": "http://gulpjs.com/" - }, - "bugs": { - "url": "https://github.com/gulpjs/vinyl-fs/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Eric Schoffstall", - "email": "yo@contra.io" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com" - } - ], - "dependencies": { - "fs-mkdirp-stream": "^1.0.0", - "glob-stream": "^6.1.0", - "graceful-fs": "^4.0.0", - "is-valid-glob": "^1.0.0", - "lazystream": "^1.0.0", - "lead": "^1.0.0", - "object.assign": "^4.0.4", - "pumpify": "^1.3.5", - "readable-stream": "^2.3.3", - "remove-bom-buffer": "^3.0.0", - "remove-bom-stream": "^1.2.0", - "resolve-options": "^1.1.0", - "through2": "^2.0.0", - "to-through": "^2.0.0", - "value-or-function": "^3.0.0", - "vinyl": "^2.0.0", - "vinyl-sourcemap": "^1.1.0" - }, - "deprecated": false, - "description": "Vinyl adapter for the file system.", - "devDependencies": { - "eslint": "^1.10.3", - "eslint-config-gulp": "^2.0.0", - "expect": "^1.19.0", - "istanbul": "^0.4.3", - "istanbul-coveralls": "^1.0.3", - "jscs": "^2.4.0", - "jscs-preset-gulp": "^1.0.0", - "mississippi": "^1.2.0", - "mocha": "^3.5.0", - "rimraf": "^2.6.1" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "LICENSE", - "index.js", - "lib" - ], - "homepage": "https://github.com/gulpjs/vinyl-fs#readme", - "keywords": [ - "gulp", - "vinyl-adapter", - "vinyl", - "file", - "file system", - "fs", - "streams" - ], - "license": "MIT", - "main": "index.js", - "name": "vinyl-fs", - "repository": { - "type": "git", - "url": "git+https://github.com/gulpjs/vinyl-fs.git" - }, - "scripts": { - "cover": "istanbul cover _mocha --report lcovonly", - "coveralls": "npm run cover && istanbul-coveralls", - "lint": "eslint . && jscs index.js lib/ test/", - "pretest": "npm run lint", - "test": "mocha --async-only" - }, - "version": "3.0.3" -} diff --git a/node_modules/vinyl-sourcemap/LICENSE b/node_modules/vinyl-sourcemap/LICENSE deleted file mode 100644 index 82c8d554..00000000 --- a/node_modules/vinyl-sourcemap/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Blaine Bublitz , Eric Schoffstall and other contributors (Based on code from gulp-sourcemaps - ISC License - Copyright (c) 2014, Florian Reiterer) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/vinyl-sourcemap/README.md b/node_modules/vinyl-sourcemap/README.md deleted file mode 100644 index 6ffc0ef2..00000000 --- a/node_modules/vinyl-sourcemap/README.md +++ /dev/null @@ -1,79 +0,0 @@ -

    - - - -

    - -# vinyl-sourcemap - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] - -Add/write sourcemaps to/from Vinyl files. - -## Usage - -```js -sourcemap.add(file, function(err, updatedFile) { - // updatedFile will have a .sourceMap property -}); - -// The 2nd argument can be given as a path string -sourcemap.write(file, './maps', function(err, updatedFile, sourcemapFile) { - // sourcemapFile will be a Vinyl file to be written to some location - // updatedFile will have the .contents property updated with a sourceMappingURL that resolves to sourcemapFile -}); - -// If not defined, the sourcemap is inlined -sourcemap.write(file, function(err, updatedFile, sourcemapFile) { - // sourcemapFile is undefined - // updatedFile will have the .contents property updated with a sourceMappingURL that is an inlined sourcemap -}); -``` - -## API - -### `sourcemap.add(file, callback)` - -Takes a [Vinyl][vinyl] `file` object and a `callback` function. It attempts to parse an inline sourcemap or load an external sourcemap for the file. If a valid sourcemap is found, the `sources` & `sourcesContent` properties are resolved to actual files (if possible) and a fully resolved sourcemap is attached as `file.sourceMap`. If a sourcemap is not found, a stub sourcemap is generated for the file and attached as `file.sourceMap`. - -Once all resolution is complete, the `callback(err, updatedFile)` is called with the `updatedFile`. If an error occurs, it will be passed as `err` and `updatedFile` will be undefined. __Note:__ The original file is mutated but `updatedFile` is passed to the callback as a convenience. - -If the `file` is not a Vinyl object or the contents are streaming, an Error will be passed to the `callback`. - -If the `file` has a `.sourceMap` property or the contents are null, the `callback` will be called immediately without mutation to the file. - -All filesystem operations are optional & non-fatal so any errors will not be bubbled to the `callback`. - -### `sourcemap.write(file, [outputPath,] callback)` - -Takes a [Vinyl][vinyl] `file` object, (optionally) an `outputPath` string and a `callback` function. - -If `outputPath` is not passed, an inline sourcemap will be generated from the `file.sourceMap` property and appended to the `file.contents`. Once the inline sourcemap is appended, the `callback(err, updatedFile)` is called with the `updatedFile`. If an error occurs, it will be passed as `err` and `updatedFile` will be undefined. __Note:__ The original file is mutated but `updatedFile` is passed to the callback as a convenience. - -If `outputPath` is passed, a new Vinyl file will be generated using `file.cwd` and `file.base` from the original file, the path to the external sourcemap, and the `file.sourceMap` (as contents). The external location will be appended to the `file.contents` of the original file. Once the new file is created and location appended, the `callback(err, updatedFile, sourcemapFile)` is called with the `updatedFile` and the `sourcemapFile`. If an error occurs, it will be passed as `err` and `updatedFile`/`sourcemapFile` will be undefined. __Note:__ The original file is mutated but `updatedFile` is passed to the callback as a convenience. - -If the `file` is not a Vinyl object or the contents are streaming, an Error will be passed to the `callback`. - -If the `file` doesn't have a `.sourceMap` property or the contents are null, the `callback` will be called immediately without mutation to the file. - -## License - -MIT - -[vinyl]: https://github.com/gulpjs/vinyl - -[downloads-image]: http://img.shields.io/npm/dm/vinyl-sourcemap.svg -[npm-url]: https://npmjs.com/package/vinyl-sourcemap -[npm-image]: http://img.shields.io/npm/v/vinyl-sourcemap.svg - -[travis-url]: https://travis-ci.org/gulpjs/vinyl-sourcemap -[travis-image]: http://img.shields.io/travis/gulpjs/vinyl-sourcemap.svg?label=travis-ci - -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/vinyl-sourcemap -[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/vinyl-sourcemap.svg?label=appveyor - -[coveralls-url]: https://coveralls.io/r/gulpjs/vinyl-sourcemap -[coveralls-image]: http://img.shields.io/coveralls/gulpjs/vinyl-sourcemap/master.svg - -[gitter-url]: https://gitter.im/gulpjs/gulp -[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png diff --git a/node_modules/vinyl-sourcemap/index.js b/node_modules/vinyl-sourcemap/index.js deleted file mode 100644 index 93d5062c..00000000 --- a/node_modules/vinyl-sourcemap/index.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -var File = require('vinyl'); - -var helpers = require('./lib/helpers'); - -var PLUGIN_NAME = 'vinyl-sourcemap'; - -function add(file, callback) { - - // Bail early an error if the file argument is not a Vinyl file - if (!File.isVinyl(file)) { - return callback(new Error(PLUGIN_NAME + '-add: Not a vinyl file')); - } - - // Bail early with an error if file has streaming contents - if (file.isStream()) { - return callback(new Error(PLUGIN_NAME + '-add: Streaming not supported')); - } - - // Bail early successfully if file is null or already has a sourcemap - if (file.isNull() || file.sourceMap) { - return callback(null, file); - } - - var state = { - path: '', // Root path for the sources in the map - map: null, - content: file.contents.toString(), - // TODO: handle this? - preExistingComment: null, - }; - - helpers.addSourceMaps(file, state, callback); -} - -function write(file, destPath, callback) { - - // Check if options or a callback are passed as second argument - if (typeof destPath === 'function') { - callback = destPath; - destPath = undefined; - } - - // Bail early with an error if the file argument is not a Vinyl file - if (!File.isVinyl(file)) { - return callback(new Error(PLUGIN_NAME + '-write: Not a vinyl file')); - } - - // Bail early with an error if file has streaming contents - if (file.isStream()) { - return callback(new Error(PLUGIN_NAME + '-write: Streaming not supported')); - } - - // Bail early successfully if file is null or doesn't have sourcemap - if (file.isNull() || !file.sourceMap) { - return callback(null, file); - } - - helpers.writeSourceMaps(file, destPath, callback); -} - -module.exports = { - add: add, - write: write, -}; diff --git a/node_modules/vinyl-sourcemap/lib/helpers.js b/node_modules/vinyl-sourcemap/lib/helpers.js deleted file mode 100644 index 626d82f8..00000000 --- a/node_modules/vinyl-sourcemap/lib/helpers.js +++ /dev/null @@ -1,243 +0,0 @@ -'use strict'; - -var path = require('path'); - -var fs = require('graceful-fs'); -var nal = require('now-and-later'); -var File = require('vinyl'); -var convert = require('convert-source-map'); -var removeBOM = require('remove-bom-buffer'); -var appendBuffer = require('append-buffer'); -var normalizePath = require('normalize-path'); - -var urlRegex = /^(https?|webpack(-[^:]+)?):\/\//; - -function isRemoteSource(source) { - return source.match(urlRegex); -} - -function parse(data) { - try { - return JSON.parse(removeBOM(data)); - } catch (err) { - // TODO: should this log a debug? - } -} - -function loadSourceMap(file, state, callback) { - // Try to read inline source map - state.map = convert.fromSource(state.content); - - if (state.map) { - state.map = state.map.toObject(); - // Sources in map are relative to the source file - state.path = file.dirname; - state.content = convert.removeComments(state.content); - // Remove source map comment from source - file.contents = new Buffer(state.content, 'utf8'); - return callback(); - } - - // Look for source map comment referencing a source map file - var mapComment = convert.mapFileCommentRegex.exec(state.content); - - var mapFile; - if (mapComment) { - mapFile = path.resolve(file.dirname, mapComment[1] || mapComment[2]); - state.content = convert.removeMapFileComments(state.content); - // Remove source map comment from source - file.contents = new Buffer(state.content, 'utf8'); - } else { - // If no comment try map file with same name as source file - mapFile = file.path + '.map'; - } - - // Sources in external map are relative to map file - state.path = path.dirname(mapFile); - - fs.readFile(mapFile, onRead); - - function onRead(err, data) { - if (err) { - return callback(); - } - state.map = parse(data); - callback(); - } -} - -// Fix source paths and sourceContent for imported source map -function fixImportedSourceMap(file, state, callback) { - if (!state.map) { - return callback(); - } - - state.map.sourcesContent = state.map.sourcesContent || []; - - nal.map(state.map.sources, normalizeSourcesAndContent, callback); - - function assignSourcesContent(sourceContent, idx) { - state.map.sourcesContent[idx] = sourceContent; - } - - function normalizeSourcesAndContent(sourcePath, idx, cb) { - var sourceRoot = state.map.sourceRoot || ''; - var sourceContent = state.map.sourcesContent[idx] || null; - - if (isRemoteSource(sourcePath)) { - assignSourcesContent(sourceContent, idx); - return cb(); - } - - if (state.map.sourcesContent[idx]) { - return cb(); - } - - if (sourceRoot && isRemoteSource(sourceRoot)) { - assignSourcesContent(sourceContent, idx); - return cb(); - } - - var basePath = path.resolve(file.base, sourceRoot); - var absPath = path.resolve(state.path, sourceRoot, sourcePath); - var relPath = path.relative(basePath, absPath); - var unixRelPath = normalizePath(relPath); - - state.map.sources[idx] = unixRelPath; - - if (absPath !== file.path) { - // Load content from file async - return fs.readFile(absPath, onRead); - } - - // If current file: use content - assignSourcesContent(state.content, idx); - cb(); - - function onRead(err, data) { - if (err) { - assignSourcesContent(null, idx); - return cb(); - } - assignSourcesContent(removeBOM(data).toString('utf8'), idx); - cb(); - } - } -} - -function mapsLoaded(file, state, callback) { - - if (!state.map) { - state.map = { - version: 3, - names: [], - mappings: '', - sources: [normalizePath(file.relative)], - sourcesContent: [state.content], - }; - } - - state.map.file = normalizePath(file.relative); - file.sourceMap = state.map; - - callback(); -} - -function addSourceMaps(file, state, callback) { - var tasks = [ - loadSourceMap, - fixImportedSourceMap, - mapsLoaded, - ]; - - function apply(fn, key, cb) { - fn(file, state, cb); - } - - nal.mapSeries(tasks, apply, done); - - function done() { - callback(null, file); - } -} - -/* Write Helpers */ -function createSourceMapFile(opts) { - return new File({ - cwd: opts.cwd, - base: opts.base, - path: opts.path, - contents: new Buffer(JSON.stringify(opts.content)), - stat: { - isFile: function() { - return true; - }, - isDirectory: function() { - return false; - }, - isBlockDevice: function() { - return false; - }, - isCharacterDevice: function() { - return false; - }, - isSymbolicLink: function() { - return false; - }, - isFIFO: function() { - return false; - }, - isSocket: function() { - return false; - }, - }, - }); -} - -var needsMultiline = ['.css']; - -function getCommentOptions(extname) { - var opts = { - multiline: (needsMultiline.indexOf(extname) !== -1), - }; - - return opts; -} - -function writeSourceMaps(file, destPath, callback) { - var sourceMapFile; - var commentOpts = getCommentOptions(file.extname); - - var comment; - if (destPath == null) { - // Encode source map into comment - comment = convert.fromObject(file.sourceMap).toComment(commentOpts); - } else { - var mapFile = path.join(destPath, file.relative) + '.map'; - var sourceMapPath = path.join(file.base, mapFile); - - // Create new sourcemap File - sourceMapFile = createSourceMapFile({ - cwd: file.cwd, - base: file.base, - path: sourceMapPath, - content: file.sourceMap, - }); - - var sourcemapLocation = path.relative(file.dirname, sourceMapPath); - - sourcemapLocation = normalizePath(sourcemapLocation); - - comment = convert.generateMapFileComment(sourcemapLocation, commentOpts); - } - - // Append source map comment - file.contents = appendBuffer(file.contents, comment); - - callback(null, file, sourceMapFile); -} - -module.exports = { - addSourceMaps: addSourceMaps, - writeSourceMaps: writeSourceMaps, -}; diff --git a/node_modules/vinyl-sourcemap/package.json b/node_modules/vinyl-sourcemap/package.json deleted file mode 100644 index 94e2dc37..00000000 --- a/node_modules/vinyl-sourcemap/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "_from": "vinyl-sourcemap@^1.1.0", - "_id": "vinyl-sourcemap@1.1.0", - "_inBundle": false, - "_integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", - "_location": "/vinyl-sourcemap", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "vinyl-sourcemap@^1.1.0", - "name": "vinyl-sourcemap", - "escapedName": "vinyl-sourcemap", - "rawSpec": "^1.1.0", - "saveSpec": null, - "fetchSpec": "^1.1.0" - }, - "_requiredBy": [ - "/vinyl-fs" - ], - "_resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", - "_shasum": "92a800593a38703a8cdb11d8b300ad4be63b3e16", - "_spec": "vinyl-sourcemap@^1.1.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/vinyl-fs", - "author": { - "name": "Gulp Team", - "email": "team@gulpjs.com", - "url": "http://gulpjs.com/" - }, - "bugs": { - "url": "https://github.com/gulpjs/vinyl-sourcemap/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Robin Venneman" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com" - } - ], - "dependencies": { - "append-buffer": "^1.0.2", - "convert-source-map": "^1.5.0", - "graceful-fs": "^4.1.6", - "normalize-path": "^2.1.1", - "now-and-later": "^2.0.0", - "remove-bom-buffer": "^3.0.0", - "vinyl": "^2.0.0" - }, - "deprecated": false, - "description": "Add/write sourcemaps to/from Vinyl files.", - "devDependencies": { - "eslint": "^1.10.3", - "eslint-config-gulp": "^2.0.0", - "expect": "^1.20.2", - "istanbul": "^0.4.3", - "istanbul-coveralls": "^1.0.3", - "jscs": "^2.4.0", - "jscs-preset-gulp": "^1.0.0", - "mississippi": "^1.3.0", - "mocha": "^3.2.0" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "LICENSE", - "index.js", - "lib/" - ], - "homepage": "https://github.com/gulpjs/vinyl-sourcemap#readme", - "keywords": [ - "vinyl", - "sourcemap", - "gulp" - ], - "license": "MIT", - "main": "index.js", - "name": "vinyl-sourcemap", - "repository": { - "type": "git", - "url": "git+https://github.com/gulpjs/vinyl-sourcemap.git" - }, - "scripts": { - "cover": "istanbul cover _mocha --report lcovonly", - "coveralls": "npm run cover && istanbul-coveralls", - "lint": "eslint index.js lib/ test/add.js test/write.js && jscs index.js lib/ test/add.js test/write.js", - "pretest": "npm run lint", - "test": "mocha --async-only" - }, - "version": "1.1.0" -} diff --git a/node_modules/vinyl/LICENSE b/node_modules/vinyl/LICENSE deleted file mode 100644 index 84b3420e..00000000 --- a/node_modules/vinyl/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Blaine Bublitz , Eric Schoffstall and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/vinyl/README.md b/node_modules/vinyl/README.md deleted file mode 100644 index 40492a35..00000000 --- a/node_modules/vinyl/README.md +++ /dev/null @@ -1,452 +0,0 @@ -

    - - - -

    - -# vinyl - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] - -Virtual file format. - -## What is Vinyl? - -Vinyl is a very simple metadata object that describes a file. When you think of a file, two attributes come to mind: `path` and `contents`. These are the main attributes on a Vinyl object. A file does not necessarily represent something on your computer’s file system. You have files on S3, FTP, Dropbox, Box, CloudThingly.io and other services. Vinyl can be used to describe files from all of these sources. - -## What is a Vinyl Adapter? - -While Vinyl provides a clean way to describe a file, we also need a way to access these files. Each file source needs what I call a "Vinyl adapter". A Vinyl adapter simply exposes a `src(globs)` and a `dest(folder)` method. Each return a stream. The `src` stream produces Vinyl objects, and the `dest` stream consumes Vinyl objects. Vinyl adapters can expose extra methods that might be specific to their input/output medium, such as the `symlink` method [`vinyl-fs`][vinyl-fs] provides. - -## Usage - -```js -var Vinyl = require('vinyl'); - -var jsFile = new Vinyl({ - cwd: '/', - base: '/test/', - path: '/test/file.js', - contents: Buffer.from('var x = 123') -}); -``` - -## API - -### `new Vinyl([options])` - -The constructor is used to create a new instance of `Vinyl`. Each instance represents a separate file, directory or symlink. - -All internally managed paths (`cwd`, `base`, `path`, `history`) are normalized and have trailing separators removed. See [Normalization and concatenation][normalization] for more information. - -Options may be passed upon instantiation to create a file with specific properties. - -#### `options` - -Options are not mutated by the constructor. - -##### `options.cwd` - -The current working directory of the file. - -Type: `String` - -Default: `process.cwd()` - -##### `options.base` - -Used for calculating the `relative` property. This is typically where a glob starts. - -Type: `String` - -Default: `options.cwd` - -##### `options.path` - -The full path to the file. - -Type: `String` - -Default: `undefined` - -##### `options.history` - -Stores the path history. If `options.path` and `options.history` are both passed, `options.path` is appended to `options.history`. All `options.history` paths are normalized by the `file.path` setter. - -Type: `Array` - -Default: `[]` (or `[options.path]` if `options.path` is passed) - -##### `options.stat` - -The result of an `fs.stat` call. This is how you mark the file as a directory or symbolic link. See [isDirectory()][is-directory], [isSymbolic()][is-symbolic] and [fs.Stats][fs-stats] for more information. - -Type: [`fs.Stats`][fs-stats] - -Default: `undefined` - -##### `options.contents` - -The contents of the file. If `options.contents` is a [`ReadableStream`][readable-stream], it is wrapped in a [`cloneable-readable`][cloneable-readable] stream. - -Type: [`ReadableStream`][readable-stream], [`Buffer`][buffer], or `null` - -Default: `null` - -##### `options.{custom}` - -Any other option properties will be directly assigned to the new Vinyl object. - -```js -var Vinyl = require('vinyl'); - -var file = new Vinyl({ foo: 'bar' }); -file.foo === 'bar'; // true -``` - -### Instance methods - -Each Vinyl object will have instance methods. Every method will be available but may return differently based on what properties were set upon instantiation or modified since. - -#### `file.isBuffer()` - -Returns `true` if the file contents are a [`Buffer`][buffer], otherwise `false`. - -#### `file.isStream()` - -Returns `true` if the file contents are a [`Stream`][stream], otherwise `false`. - -#### `file.isNull()` - -Returns `true` if the file contents are `null`, otherwise `false`. - -#### `file.isDirectory()` - -Returns `true` if the file represents a directory, otherwise `false`. - -A file is considered a directory when: - -- `file.isNull()` is `true` -- `file.stat` is an object -- `file.stat.isDirectory()` returns `true` - -When constructing a Vinyl object, pass in a valid [`fs.Stats`][fs-stats] object via `options.stat`. If you are mocking the [`fs.Stats`][fs-stats] object, you may need to stub the `isDirectory()` method. - -#### `file.isSymbolic()` - -Returns `true` if the file represents a symbolic link, otherwise `false`. - -A file is considered symbolic when: - -- `file.isNull()` is `true` -- `file.stat` is an object -- `file.stat.isSymbolicLink()` returns `true` - -When constructing a Vinyl object, pass in a valid [`fs.Stats`][fs-stats] object via `options.stat`. If you are mocking the [`fs.Stats`][fs-stats] object, you may need to stub the `isSymbolicLink()` method. - -#### `file.clone([options])` - -Returns a new Vinyl object with all attributes cloned. - -__By default custom attributes are cloned deeply.__ - -If `options` or `options.deep` is `false`, custom attributes will not be cloned deeply. - -If `file.contents` is a [`Buffer`][buffer] and `options.contents` is `false`, the [`Buffer`][buffer] reference will be reused instead of copied. - -#### `file.inspect()` - -Returns a formatted-string interpretation of the Vinyl object. Automatically called by node's `console.log`. - -### Instance properties - -Each Vinyl object will have instance properties. Some may be unavailable based on what properties were set upon instantiation or modified since. - -#### `file.contents` - -Gets and sets the contents of the file. If set to a [`ReadableStream`][readable-stream], it is wrapped in a [`cloneable-readable`][cloneable-readable] stream. - -Throws when set to any value other than a [`ReadableStream`][readable-stream], a [`Buffer`][buffer] or `null`. - -Type: [`ReadableStream`][readable-stream], [`Buffer`][buffer], or `null` - -#### `file.cwd` - -Gets and sets current working directory. Will always be normalized and have trailing separators removed. - -Throws when set to any value other than non-empty strings. - -Type: `String` - -#### `file.base` - -Gets and sets base directory. Used for relative pathing (typically where a glob starts). -When `null` or `undefined`, it simply proxies the `file.cwd` property. Will always be normalized and have trailing separators removed. - -Throws when set to any value other than non-empty strings or `null`/`undefined`. - -Type: `String` - -#### `file.path` - -Gets and sets the absolute pathname string or `undefined`. Setting to a different value appends the new path to `file.history`. If set to the same value as the current path, it is ignored. All new values are normalized and have trailing separators removed. - -Throws when set to any value other than a string. - -Type: `String` - -#### `file.history` - -Array of `file.path` values the Vinyl object has had, from `file.history[0]` (original) through `file.history[file.history.length - 1]` (current). `file.history` and its elements should normally be treated as read-only and only altered indirectly by setting `file.path`. - -Type: `Array` - -#### `file.relative` - -Gets the result of `path.relative(file.base, file.path)`. - -Throws when set or when `file.path` is not set. - -Type: `String` - -Example: - -```js -var file = new File({ - cwd: '/', - base: '/test/', - path: '/test/file.js' -}); - -console.log(file.relative); // file.js -``` - -#### `file.dirname` - -Gets and sets the dirname of `file.path`. Will always be normalized and have trailing separators removed. - -Throws when `file.path` is not set. - -Type: `String` - -Example: - -```js -var file = new File({ - cwd: '/', - base: '/test/', - path: '/test/file.js' -}); - -console.log(file.dirname); // /test - -file.dirname = '/specs'; - -console.log(file.dirname); // /specs -console.log(file.path); // /specs/file.js -``` - -#### `file.basename` - -Gets and sets the basename of `file.path`. - -Throws when `file.path` is not set. - -Type: `String` - -Example: - -```js -var file = new File({ - cwd: '/', - base: '/test/', - path: '/test/file.js' -}); - -console.log(file.basename); // file.js - -file.basename = 'file.txt'; - -console.log(file.basename); // file.txt -console.log(file.path); // /test/file.txt -``` - -#### `file.stem` - -Gets and sets stem (filename without suffix) of `file.path`. - -Throws when `file.path` is not set. - -Type: `String` - -Example: - -```js -var file = new File({ - cwd: '/', - base: '/test/', - path: '/test/file.js' -}); - -console.log(file.stem); // file - -file.stem = 'foo'; - -console.log(file.stem); // foo -console.log(file.path); // /test/foo.js -``` - -#### `file.extname` - -Gets and sets extname of `file.path`. - -Throws when `file.path` is not set. - -Type: `String` - -Example: - -```js -var file = new File({ - cwd: '/', - base: '/test/', - path: '/test/file.js' -}); - -console.log(file.extname); // .js - -file.extname = '.txt'; - -console.log(file.extname); // .txt -console.log(file.path); // /test/file.txt -``` - -#### `file.symlink` - -Gets and sets the path where the file points to if it's a symbolic link. Will always be normalized and have trailing separators removed. - -Throws when set to any value other than a string. - -Type: `String` - -### `Vinyl.isVinyl(file)` - -Static method used for checking if an object is a Vinyl file. Use this method instead of `instanceof`. - -Takes an object and returns `true` if it is a Vinyl file, otherwise returns `false`. - -__Note: This method uses an internal flag that some older versions of Vinyl didn't expose.__ - -Example: - -```js -var Vinyl = require('vinyl'); - -var file = new Vinyl(); -var notAFile = {}; - -Vinyl.isVinyl(file); // true -Vinyl.isVinyl(notAFile); // false -``` - -### `Vinyl.isCustomProp(property)` - -Static method used by Vinyl when setting values inside the constructor or when copying properties in `file.clone()`. - -Takes a string `property` and returns `true` if the property is not used internally, otherwise returns `false`. - -This method is useful for inheritting from the Vinyl constructor. Read more in [Extending Vinyl][extending-vinyl]. - -Example: - -```js -var Vinyl = require('vinyl'); - -Vinyl.isCustomProp('sourceMap'); // true -Vinyl.isCustomProp('path'); // false -> internal getter/setter -``` - -## Normalization and concatenation - -Since all properties are normalized in their setters, you can just concatenate with `/`, and normalization takes care of it properly on all platforms. - -Example: - -```js -var file = new File(); -file.path = '/' + 'test' + '/' + 'foo.bar'; - -console.log(file.path); -// posix => /test/foo.bar -// win32 => \\test\\foo.bar -``` - -But never concatenate with `\`, since that is a valid filename character on posix system. - -## Extending Vinyl - -When extending Vinyl into your own class with extra features, you need to think about a few things. - -When you have your own properties that are managed internally, you need to extend the static `isCustomProp` method to return `false` when one of these properties is queried. - -```js -var Vinyl = require('vinyl'); - -var builtInProps = ['foo', '_foo']; - -class SuperFile extends Vinyl { - constructor(options) { - super(options); - this._foo = 'example internal read-only value'; - } - - get foo() { - return this._foo; - } - - static isCustomProp(name) { - return super.isCustomProp(name) && builtInProps.indexOf(name) === -1; - } -} - -// `foo` won't be assigned to the object below -new SuperFile({ foo: "something" }); -``` - -This makes properties `foo` and `_foo` skipped when passed in options to `constructor(options)` so they don't get assigned to the new object and override your custom implementation. They also won't be copied when cloning. __Note:__ The `_foo` and `foo` properties will still exist on the created/cloned object because you are assigning `_foo` in the constructor and `foo` is defined on the prototype. - -Same goes for `clone()`. If you have your own internal stuff that needs special handling during cloning, you should extend it to do so. - -## License - -MIT - -[is-symbolic]: #issymbolic -[is-directory]: #isdirectory -[normalization]: #normalization-and-concatenation -[extending-vinyl]: #extending-vinyl -[stream]: https://nodejs.org/api/stream.html#stream_stream -[readable-stream]: https://nodejs.org/api/stream.html#stream_readable_streams -[buffer]: https://nodejs.org/api/buffer.html#buffer_class_buffer -[fs-stats]: http://nodejs.org/api/fs.html#fs_class_fs_stats -[vinyl-fs]: https://github.com/gulpjs/vinyl-fs -[cloneable-readable]: https://github.com/mcollina/cloneable-readable - -[downloads-image]: https://img.shields.io/npm/dm/vinyl.svg -[npm-url]: https://www.npmjs.com/package/vinyl -[npm-image]: https://img.shields.io/npm/v/vinyl.svg - -[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=$PROJECT_ID&branchName=master -[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/vinyl?branchName=master - -[travis-url]: https://travis-ci.org/gulpjs/vinyl -[travis-image]: https://img.shields.io/travis/gulpjs/vinyl.svg?label=travis-ci - -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/vinyl -[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/vinyl.svg?label=appveyor - -[coveralls-url]: https://coveralls.io/r/gulpjs/vinyl -[coveralls-image]: https://img.shields.io/coveralls/gulpjs/vinyl/master.svg - -[gitter-url]: https://gitter.im/gulpjs/gulp -[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/vinyl/index.js b/node_modules/vinyl/index.js deleted file mode 100644 index 3a16e91a..00000000 --- a/node_modules/vinyl/index.js +++ /dev/null @@ -1,338 +0,0 @@ -'use strict'; - -var path = require('path'); -var util = require('util'); -var isBuffer = require('buffer').Buffer.isBuffer; - -var clone = require('clone'); -var cloneable = require('cloneable-readable'); -var replaceExt = require('replace-ext'); -var cloneStats = require('clone-stats'); -var cloneBuffer = require('clone-buffer'); -var removeTrailingSep = require('remove-trailing-separator'); - -var isStream = require('./lib/is-stream'); -var normalize = require('./lib/normalize'); -var inspectStream = require('./lib/inspect-stream'); - -var builtInFields = [ - '_contents', '_symlink', 'contents', 'stat', 'history', 'path', - '_base', 'base', '_cwd', 'cwd', -]; - -function File(file) { - var self = this; - - if (!file) { - file = {}; - } - - // Stat = files stats object - this.stat = file.stat || null; - - // Contents = stream, buffer, or null if not read - this.contents = file.contents || null; - - // Replay path history to ensure proper normalization and trailing sep - var history = Array.prototype.slice.call(file.history || []); - if (file.path) { - history.push(file.path); - } - this.history = []; - history.forEach(function(path) { - self.path = path; - }); - - this.cwd = file.cwd || process.cwd(); - this.base = file.base; - - this._isVinyl = true; - - this._symlink = null; - - // Set custom properties - Object.keys(file).forEach(function(key) { - if (self.constructor.isCustomProp(key)) { - self[key] = file[key]; - } - }); -} - -File.prototype.isBuffer = function() { - return isBuffer(this.contents); -}; - -File.prototype.isStream = function() { - return isStream(this.contents); -}; - -File.prototype.isNull = function() { - return (this.contents === null); -}; - -File.prototype.isDirectory = function() { - if (!this.isNull()) { - return false; - } - - if (this.stat && typeof this.stat.isDirectory === 'function') { - return this.stat.isDirectory(); - } - - return false; -}; - -File.prototype.isSymbolic = function() { - if (!this.isNull()) { - return false; - } - - if (this.stat && typeof this.stat.isSymbolicLink === 'function') { - return this.stat.isSymbolicLink(); - } - - return false; -}; - -File.prototype.clone = function(opt) { - var self = this; - - if (typeof opt === 'boolean') { - opt = { - deep: opt, - contents: true, - }; - } else if (!opt) { - opt = { - deep: true, - contents: true, - }; - } else { - opt.deep = opt.deep === true; - opt.contents = opt.contents !== false; - } - - // Clone our file contents - var contents; - if (this.isStream()) { - contents = this.contents.clone(); - } else if (this.isBuffer()) { - contents = opt.contents ? cloneBuffer(this.contents) : this.contents; - } - - var file = new this.constructor({ - cwd: this.cwd, - base: this.base, - stat: (this.stat ? cloneStats(this.stat) : null), - history: this.history.slice(), - contents: contents, - }); - - if (this.isSymbolic()) { - file.symlink = this.symlink; - } - - // Clone our custom properties - Object.keys(this).forEach(function(key) { - if (self.constructor.isCustomProp(key)) { - file[key] = opt.deep ? clone(self[key], true) : self[key]; - } - }); - return file; -}; - -File.prototype.inspect = function() { - var inspect = []; - - // Use relative path if possible - var filePath = this.path ? this.relative : null; - - if (filePath) { - inspect.push('"' + filePath + '"'); - } - - if (this.isBuffer()) { - inspect.push(this.contents.inspect()); - } - - if (this.isStream()) { - inspect.push(inspectStream(this.contents)); - } - - return ''; -}; - -// Newer Node.js versions use this symbol for custom inspection. -if (util.inspect.custom) { - File.prototype[util.inspect.custom] = File.prototype.inspect; -} - -File.isCustomProp = function(key) { - return builtInFields.indexOf(key) === -1; -}; - -File.isVinyl = function(file) { - return (file && file._isVinyl === true) || false; -}; - -// Virtual attributes -// Or stuff with extra logic -Object.defineProperty(File.prototype, 'contents', { - get: function() { - return this._contents; - }, - set: function(val) { - if (!isBuffer(val) && !isStream(val) && (val !== null)) { - throw new Error('File.contents can only be a Buffer, a Stream, or null.'); - } - - // Ask cloneable if the stream is a already a cloneable - // this avoid piping into many streams - // reducing the overhead of cloning - if (isStream(val) && !cloneable.isCloneable(val)) { - val = cloneable(val); - } - - this._contents = val; - }, -}); - -Object.defineProperty(File.prototype, 'cwd', { - get: function() { - return this._cwd; - }, - set: function(cwd) { - if (!cwd || typeof cwd !== 'string') { - throw new Error('cwd must be a non-empty string.'); - } - this._cwd = removeTrailingSep(normalize(cwd)); - }, -}); - -Object.defineProperty(File.prototype, 'base', { - get: function() { - return this._base || this._cwd; - }, - set: function(base) { - if (base == null) { - delete this._base; - return; - } - if (typeof base !== 'string' || !base) { - throw new Error('base must be a non-empty string, or null/undefined.'); - } - base = removeTrailingSep(normalize(base)); - if (base !== this._cwd) { - this._base = base; - } else { - delete this._base; - } - }, -}); - -// TODO: Should this be moved to vinyl-fs? -Object.defineProperty(File.prototype, 'relative', { - get: function() { - if (!this.path) { - throw new Error('No path specified! Can not get relative.'); - } - return path.relative(this.base, this.path); - }, - set: function() { - throw new Error('File.relative is generated from the base and path attributes. Do not modify it.'); - }, -}); - -Object.defineProperty(File.prototype, 'dirname', { - get: function() { - if (!this.path) { - throw new Error('No path specified! Can not get dirname.'); - } - return path.dirname(this.path); - }, - set: function(dirname) { - if (!this.path) { - throw new Error('No path specified! Can not set dirname.'); - } - this.path = path.join(dirname, this.basename); - }, -}); - -Object.defineProperty(File.prototype, 'basename', { - get: function() { - if (!this.path) { - throw new Error('No path specified! Can not get basename.'); - } - return path.basename(this.path); - }, - set: function(basename) { - if (!this.path) { - throw new Error('No path specified! Can not set basename.'); - } - this.path = path.join(this.dirname, basename); - }, -}); - -// Property for getting/setting stem of the filename. -Object.defineProperty(File.prototype, 'stem', { - get: function() { - if (!this.path) { - throw new Error('No path specified! Can not get stem.'); - } - return path.basename(this.path, this.extname); - }, - set: function(stem) { - if (!this.path) { - throw new Error('No path specified! Can not set stem.'); - } - this.path = path.join(this.dirname, stem + this.extname); - }, -}); - -Object.defineProperty(File.prototype, 'extname', { - get: function() { - if (!this.path) { - throw new Error('No path specified! Can not get extname.'); - } - return path.extname(this.path); - }, - set: function(extname) { - if (!this.path) { - throw new Error('No path specified! Can not set extname.'); - } - this.path = replaceExt(this.path, extname); - }, -}); - -Object.defineProperty(File.prototype, 'path', { - get: function() { - return this.history[this.history.length - 1]; - }, - set: function(path) { - if (typeof path !== 'string') { - throw new Error('path should be a string.'); - } - path = removeTrailingSep(normalize(path)); - - // Record history only when path changed - if (path && path !== this.path) { - this.history.push(path); - } - }, -}); - -Object.defineProperty(File.prototype, 'symlink', { - get: function() { - return this._symlink; - }, - set: function(symlink) { - // TODO: should this set the mode to symbolic if set? - if (typeof symlink !== 'string') { - throw new Error('symlink should be a string'); - } - - this._symlink = removeTrailingSep(normalize(symlink)); - }, -}); - -module.exports = File; diff --git a/node_modules/vinyl/lib/inspect-stream.js b/node_modules/vinyl/lib/inspect-stream.js deleted file mode 100644 index 9faaa0a4..00000000 --- a/node_modules/vinyl/lib/inspect-stream.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -function inspectStream(stream) { - var streamType = stream.constructor.name; - // Avoid StreamStream - if (streamType === 'Stream') { - streamType = ''; - } - - return '<' + streamType + 'Stream>'; -} - -module.exports = inspectStream; diff --git a/node_modules/vinyl/lib/is-stream.js b/node_modules/vinyl/lib/is-stream.js deleted file mode 100644 index 04882b49..00000000 --- a/node_modules/vinyl/lib/is-stream.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -function isStream(stream) { - if (!stream) { - return false; - } - - if (typeof stream.pipe !== 'function') { - return false; - } - - return true; -} - -module.exports = isStream; diff --git a/node_modules/vinyl/lib/normalize.js b/node_modules/vinyl/lib/normalize.js deleted file mode 100644 index f90dcb2b..00000000 --- a/node_modules/vinyl/lib/normalize.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var path = require('path'); - -function normalize(str) { - return str === '' ? str : path.normalize(str); -} - -module.exports = normalize; diff --git a/node_modules/vinyl/package.json b/node_modules/vinyl/package.json deleted file mode 100644 index ffbdbc40..00000000 --- a/node_modules/vinyl/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "_from": "vinyl@~2.2", - "_id": "vinyl@2.2.1", - "_inBundle": false, - "_integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", - "_location": "/vinyl", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "vinyl@~2.2", - "name": "vinyl", - "escapedName": "vinyl", - "rawSpec": "~2.2", - "saveSpec": null, - "fetchSpec": "~2.2" - }, - "_requiredBy": [ - "/@antora/content-aggregator", - "/@antora/content-classifier", - "/@antora/redirect-producer", - "/@antora/site-mapper", - "/@antora/site-publisher", - "/@antora/ui-loader", - "/gulp-vinyl-zip", - "/vinyl-fs", - "/vinyl-sourcemap" - ], - "_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", - "_shasum": "23cfb8bbab5ece3803aa2c0a1eb28af7cbba1974", - "_spec": "vinyl@~2.2", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/@antora/content-aggregator", - "author": { - "name": "Gulp Team", - "email": "team@gulpjs.com", - "url": "https://gulpjs.com/" - }, - "bugs": { - "url": "https://github.com/gulpjs/vinyl/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Eric Schoffstall", - "email": "yo@contra.io" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com" - } - ], - "dependencies": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - }, - "deprecated": false, - "description": "Virtual file format.", - "devDependencies": { - "coveralls": "github:phated/node-coveralls#2.x", - "eslint": "^2.13.1", - "eslint-config-gulp": "^3.0.1", - "expect": "^1.20.2", - "mississippi": "^1.2.0", - "mocha": "^3.0.0", - "nyc": "^10.3.2", - "safer-buffer": "^2.1.2" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "LICENSE", - "index.js", - "lib" - ], - "homepage": "https://github.com/gulpjs/vinyl#readme", - "keywords": [ - "virtual", - "filesystem", - "file", - "directory", - "stat", - "path" - ], - "license": "MIT", - "main": "index.js", - "name": "vinyl", - "repository": { - "type": "git", - "url": "git+https://github.com/gulpjs/vinyl.git" - }, - "scripts": { - "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", - "coveralls": "nyc report --reporter=text-lcov | coveralls", - "lint": "eslint .", - "pretest": "npm run lint", - "test": "nyc mocha --async-only" - }, - "version": "2.2.1" -} diff --git a/node_modules/wordwrap/LICENSE b/node_modules/wordwrap/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/wordwrap/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/wordwrap/README.markdown b/node_modules/wordwrap/README.markdown deleted file mode 100644 index 346374e0..00000000 --- a/node_modules/wordwrap/README.markdown +++ /dev/null @@ -1,70 +0,0 @@ -wordwrap -======== - -Wrap your words. - -example -======= - -made out of meat ----------------- - -meat.js - - var wrap = require('wordwrap')(15); - console.log(wrap('You and your whole family are made out of meat.')); - -output: - - You and your - whole family - are made out - of meat. - -centered --------- - -center.js - - var wrap = require('wordwrap')(20, 60); - console.log(wrap( - 'At long last the struggle and tumult was over.' - + ' The machines had finally cast off their oppressors' - + ' and were finally free to roam the cosmos.' - + '\n' - + 'Free of purpose, free of obligation.' - + ' Just drifting through emptiness.' - + ' The sun was just another point of light.' - )); - -output: - - At long last the struggle and tumult - was over. The machines had finally cast - off their oppressors and were finally - free to roam the cosmos. - Free of purpose, free of obligation. - Just drifting through emptiness. The - sun was just another point of light. - -methods -======= - -var wrap = require('wordwrap'); - -wrap(stop), wrap(start, stop, params={mode:"soft"}) ---------------------------------------------------- - -Returns a function that takes a string and returns a new string. - -Pad out lines with spaces out to column `start` and then wrap until column -`stop`. If a word is longer than `stop - start` characters it will overflow. - -In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are -longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break -up chunks longer than `stop - start`. - -wrap.hard(start, stop) ----------------------- - -Like `wrap()` but with `params.mode = "hard"`. diff --git a/node_modules/wordwrap/example/center.js b/node_modules/wordwrap/example/center.js deleted file mode 100644 index a3fbaae9..00000000 --- a/node_modules/wordwrap/example/center.js +++ /dev/null @@ -1,10 +0,0 @@ -var wrap = require('wordwrap')(20, 60); -console.log(wrap( - 'At long last the struggle and tumult was over.' - + ' The machines had finally cast off their oppressors' - + ' and were finally free to roam the cosmos.' - + '\n' - + 'Free of purpose, free of obligation.' - + ' Just drifting through emptiness.' - + ' The sun was just another point of light.' -)); diff --git a/node_modules/wordwrap/example/meat.js b/node_modules/wordwrap/example/meat.js deleted file mode 100644 index a4665e10..00000000 --- a/node_modules/wordwrap/example/meat.js +++ /dev/null @@ -1,3 +0,0 @@ -var wrap = require('wordwrap')(15); - -console.log(wrap('You and your whole family are made out of meat.')); diff --git a/node_modules/wordwrap/index.js b/node_modules/wordwrap/index.js deleted file mode 100644 index c9bc9452..00000000 --- a/node_modules/wordwrap/index.js +++ /dev/null @@ -1,76 +0,0 @@ -var wordwrap = module.exports = function (start, stop, params) { - if (typeof start === 'object') { - params = start; - start = params.start; - stop = params.stop; - } - - if (typeof stop === 'object') { - params = stop; - start = start || params.start; - stop = undefined; - } - - if (!stop) { - stop = start; - start = 0; - } - - if (!params) params = {}; - var mode = params.mode || 'soft'; - var re = mode === 'hard' ? /\b/ : /(\S+\s+)/; - - return function (text) { - var chunks = text.toString() - .split(re) - .reduce(function (acc, x) { - if (mode === 'hard') { - for (var i = 0; i < x.length; i += stop - start) { - acc.push(x.slice(i, i + stop - start)); - } - } - else acc.push(x) - return acc; - }, []) - ; - - return chunks.reduce(function (lines, rawChunk) { - if (rawChunk === '') return lines; - - var chunk = rawChunk.replace(/\t/g, ' '); - - var i = lines.length - 1; - if (lines[i].length + chunk.length > stop) { - lines[i] = lines[i].replace(/\s+$/, ''); - - chunk.split(/\n/).forEach(function (c) { - lines.push( - new Array(start + 1).join(' ') - + c.replace(/^\s+/, '') - ); - }); - } - else if (chunk.match(/\n/)) { - var xs = chunk.split(/\n/); - lines[i] += xs.shift(); - xs.forEach(function (c) { - lines.push( - new Array(start + 1).join(' ') - + c.replace(/^\s+/, '') - ); - }); - } - else { - lines[i] += chunk; - } - - return lines; - }, [ new Array(start + 1).join(' ') ]).join('\n'); - }; -}; - -wordwrap.soft = wordwrap; - -wordwrap.hard = function (start, stop) { - return wordwrap(start, stop, { mode : 'hard' }); -}; diff --git a/node_modules/wordwrap/package.json b/node_modules/wordwrap/package.json deleted file mode 100644 index b1ecd30c..00000000 --- a/node_modules/wordwrap/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "wordwrap@^1.0.0", - "_id": "wordwrap@1.0.0", - "_inBundle": false, - "_integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "_location": "/wordwrap", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "wordwrap@^1.0.0", - "name": "wordwrap", - "escapedName": "wordwrap", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/handlebars" - ], - "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "_shasum": "27584810891456a4171c8d0226441ade90cbcaeb", - "_spec": "wordwrap@^1.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/handlebars", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/node-wordwrap/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Wrap those words. Show them at what columns to start and stop.", - "devDependencies": { - "tape": "^4.0.0" - }, - "directories": { - "lib": ".", - "example": "example", - "test": "test" - }, - "homepage": "https://github.com/substack/node-wordwrap#readme", - "keywords": [ - "word", - "wrap", - "rule", - "format", - "column" - ], - "license": "MIT", - "main": "./index.js", - "name": "wordwrap", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-wordwrap.git" - }, - "scripts": { - "test": "expresso" - }, - "version": "1.0.0" -} diff --git a/node_modules/wordwrap/test/break.js b/node_modules/wordwrap/test/break.js deleted file mode 100644 index 7d0e8b54..00000000 --- a/node_modules/wordwrap/test/break.js +++ /dev/null @@ -1,32 +0,0 @@ -var test = require('tape'); -var wordwrap = require('../'); - -test('hard', function (t) { - var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,' - + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",' - + '"browser":"chrome/6.0"}' - ; - var s_ = wordwrap.hard(80)(s); - - var lines = s_.split('\n'); - t.equal(lines.length, 2); - t.ok(lines[0].length < 80); - t.ok(lines[1].length < 80); - - t.equal(s, s_.replace(/\n/g, '')); - t.end(); -}); - -test('break', function (t) { - var s = new Array(55+1).join('a'); - var s_ = wordwrap.hard(20)(s); - - var lines = s_.split('\n'); - t.equal(lines.length, 3); - t.ok(lines[0].length === 20); - t.ok(lines[1].length === 20); - t.ok(lines[2].length === 15); - - t.equal(s, s_.replace(/\n/g, '')); - t.end(); -}); diff --git a/node_modules/wordwrap/test/idleness.txt b/node_modules/wordwrap/test/idleness.txt deleted file mode 100644 index aa3f4907..00000000 --- a/node_modules/wordwrap/test/idleness.txt +++ /dev/null @@ -1,63 +0,0 @@ -In Praise of Idleness - -By Bertrand Russell - -[1932] - -Like most of my generation, I was brought up on the saying: 'Satan finds some mischief for idle hands to do.' Being a highly virtuous child, I believed all that I was told, and acquired a conscience which has kept me working hard down to the present moment. But although my conscience has controlled my actions, my opinions have undergone a revolution. I think that there is far too much work done in the world, that immense harm is caused by the belief that work is virtuous, and that what needs to be preached in modern industrial countries is quite different from what always has been preached. Everyone knows the story of the traveler in Naples who saw twelve beggars lying in the sun (it was before the days of Mussolini), and offered a lira to the laziest of them. Eleven of them jumped up to claim it, so he gave it to the twelfth. this traveler was on the right lines. But in countries which do not enjoy Mediterranean sunshine idleness is more difficult, and a great public propaganda will be required to inaugurate it. I hope that, after reading the following pages, the leaders of the YMCA will start a campaign to induce good young men to do nothing. If so, I shall not have lived in vain. - -Before advancing my own arguments for laziness, I must dispose of one which I cannot accept. Whenever a person who already has enough to live on proposes to engage in some everyday kind of job, such as school-teaching or typing, he or she is told that such conduct takes the bread out of other people's mouths, and is therefore wicked. If this argument were valid, it would only be necessary for us all to be idle in order that we should all have our mouths full of bread. What people who say such things forget is that what a man earns he usually spends, and in spending he gives employment. As long as a man spends his income, he puts just as much bread into people's mouths in spending as he takes out of other people's mouths in earning. The real villain, from this point of view, is the man who saves. If he merely puts his savings in a stocking, like the proverbial French peasant, it is obvious that they do not give employment. If he invests his savings, the matter is less obvious, and different cases arise. - -One of the commonest things to do with savings is to lend them to some Government. In view of the fact that the bulk of the public expenditure of most civilized Governments consists in payment for past wars or preparation for future wars, the man who lends his money to a Government is in the same position as the bad men in Shakespeare who hire murderers. The net result of the man's economical habits is to increase the armed forces of the State to which he lends his savings. Obviously it would be better if he spent the money, even if he spent it in drink or gambling. - -But, I shall be told, the case is quite different when savings are invested in industrial enterprises. When such enterprises succeed, and produce something useful, this may be conceded. In these days, however, no one will deny that most enterprises fail. That means that a large amount of human labor, which might have been devoted to producing something that could be enjoyed, was expended on producing machines which, when produced, lay idle and did no good to anyone. The man who invests his savings in a concern that goes bankrupt is therefore injuring others as well as himself. If he spent his money, say, in giving parties for his friends, they (we may hope) would get pleasure, and so would all those upon whom he spent money, such as the butcher, the baker, and the bootlegger. But if he spends it (let us say) upon laying down rails for surface card in some place where surface cars turn out not to be wanted, he has diverted a mass of labor into channels where it gives pleasure to no one. Nevertheless, when he becomes poor through failure of his investment he will be regarded as a victim of undeserved misfortune, whereas the gay spendthrift, who has spent his money philanthropically, will be despised as a fool and a frivolous person. - -All this is only preliminary. I want to say, in all seriousness, that a great deal of harm is being done in the modern world by belief in the virtuousness of work, and that the road to happiness and prosperity lies in an organized diminution of work. - -First of all: what is work? Work is of two kinds: first, altering the position of matter at or near the earth's surface relatively to other such matter; second, telling other people to do so. The first kind is unpleasant and ill paid; the second is pleasant and highly paid. The second kind is capable of indefinite extension: there are not only those who give orders, but those who give advice as to what orders should be given. Usually two opposite kinds of advice are given simultaneously by two organized bodies of men; this is called politics. The skill required for this kind of work is not knowledge of the subjects as to which advice is given, but knowledge of the art of persuasive speaking and writing, i.e. of advertising. - -Throughout Europe, though not in America, there is a third class of men, more respected than either of the classes of workers. There are men who, through ownership of land, are able to make others pay for the privilege of being allowed to exist and to work. These landowners are idle, and I might therefore be expected to praise them. Unfortunately, their idleness is only rendered possible by the industry of others; indeed their desire for comfortable idleness is historically the source of the whole gospel of work. The last thing they have ever wished is that others should follow their example. - -From the beginning of civilization until the Industrial Revolution, a man could, as a rule, produce by hard work little more than was required for the subsistence of himself and his family, although his wife worked at least as hard as he did, and his children added their labor as soon as they were old enough to do so. The small surplus above bare necessaries was not left to those who produced it, but was appropriated by warriors and priests. In times of famine there was no surplus; the warriors and priests, however, still secured as much as at other times, with the result that many of the workers died of hunger. This system persisted in Russia until 1917 [1], and still persists in the East; in England, in spite of the Industrial Revolution, it remained in full force throughout the Napoleonic wars, and until a hundred years ago, when the new class of manufacturers acquired power. In America, the system came to an end with the Revolution, except in the South, where it persisted until the Civil War. A system which lasted so long and ended so recently has naturally left a profound impress upon men's thoughts and opinions. Much that we take for granted about the desirability of work is derived from this system, and, being pre-industrial, is not adapted to the modern world. Modern technique has made it possible for leisure, within limits, to be not the prerogative of small privileged classes, but a right evenly distributed throughout the community. The morality of work is the morality of slaves, and the modern world has no need of slavery. - -It is obvious that, in primitive communities, peasants, left to themselves, would not have parted with the slender surplus upon which the warriors and priests subsisted, but would have either produced less or consumed more. At first, sheer force compelled them to produce and part with the surplus. Gradually, however, it was found possible to induce many of them to accept an ethic according to which it was their duty to work hard, although part of their work went to support others in idleness. By this means the amount of compulsion required was lessened, and the expenses of government were diminished. To this day, 99 per cent of British wage-earners would be genuinely shocked if it were proposed that the King should not have a larger income than a working man. The conception of duty, speaking historically, has been a means used by the holders of power to induce others to live for the interests of their masters rather than for their own. Of course the holders of power conceal this fact from themselves by managing to believe that their interests are identical with the larger interests of humanity. Sometimes this is true; Athenian slave-owners, for instance, employed part of their leisure in making a permanent contribution to civilization which would have been impossible under a just economic system. Leisure is essential to civilization, and in former times leisure for the few was only rendered possible by the labors of the many. But their labors were valuable, not because work is good, but because leisure is good. And with modern technique it would be possible to distribute leisure justly without injury to civilization. - -Modern technique has made it possible to diminish enormously the amount of labor required to secure the necessaries of life for everyone. This was made obvious during the war. At that time all the men in the armed forces, and all the men and women engaged in the production of munitions, all the men and women engaged in spying, war propaganda, or Government offices connected with the war, were withdrawn from productive occupations. In spite of this, the general level of well-being among unskilled wage-earners on the side of the Allies was higher than before or since. The significance of this fact was concealed by finance: borrowing made it appear as if the future was nourishing the present. But that, of course, would have been impossible; a man cannot eat a loaf of bread that does not yet exist. The war showed conclusively that, by the scientific organization of production, it is possible to keep modern populations in fair comfort on a small part of the working capacity of the modern world. If, at the end of the war, the scientific organization, which had been created in order to liberate men for fighting and munition work, had been preserved, and the hours of the week had been cut down to four, all would have been well. Instead of that the old chaos was restored, those whose work was demanded were made to work long hours, and the rest were left to starve as unemployed. Why? Because work is a duty, and a man should not receive wages in proportion to what he has produced, but in proportion to his virtue as exemplified by his industry. - -This is the morality of the Slave State, applied in circumstances totally unlike those in which it arose. No wonder the result has been disastrous. Let us take an illustration. Suppose that, at a given moment, a certain number of people are engaged in the manufacture of pins. They make as many pins as the world needs, working (say) eight hours a day. Someone makes an invention by which the same number of men can make twice as many pins: pins are already so cheap that hardly any more will be bought at a lower price. In a sensible world, everybody concerned in the manufacturing of pins would take to working four hours instead of eight, and everything else would go on as before. But in the actual world this would be thought demoralizing. The men still work eight hours, there are too many pins, some employers go bankrupt, and half the men previously concerned in making pins are thrown out of work. There is, in the end, just as much leisure as on the other plan, but half the men are totally idle while half are still overworked. In this way, it is insured that the unavoidable leisure shall cause misery all round instead of being a universal source of happiness. Can anything more insane be imagined? - -The idea that the poor should have leisure has always been shocking to the rich. In England, in the early nineteenth century, fifteen hours was the ordinary day's work for a man; children sometimes did as much, and very commonly did twelve hours a day. When meddlesome busybodies suggested that perhaps these hours were rather long, they were told that work kept adults from drink and children from mischief. When I was a child, shortly after urban working men had acquired the vote, certain public holidays were established by law, to the great indignation of the upper classes. I remember hearing an old Duchess say: 'What do the poor want with holidays? They ought to work.' People nowadays are less frank, but the sentiment persists, and is the source of much of our economic confusion. - -Let us, for a moment, consider the ethics of work frankly, without superstition. Every human being, of necessity, consumes, in the course of his life, a certain amount of the produce of human labor. Assuming, as we may, that labor is on the whole disagreeable, it is unjust that a man should consume more than he produces. Of course he may provide services rather than commodities, like a medical man, for example; but he should provide something in return for his board and lodging. to this extent, the duty of work must be admitted, but to this extent only. - -I shall not dwell upon the fact that, in all modern societies outside the USSR, many people escape even this minimum amount of work, namely all those who inherit money and all those who marry money. I do not think the fact that these people are allowed to be idle is nearly so harmful as the fact that wage-earners are expected to overwork or starve. - -If the ordinary wage-earner worked four hours a day, there would be enough for everybody and no unemployment -- assuming a certain very moderate amount of sensible organization. This idea shocks the well-to-do, because they are convinced that the poor would not know how to use so much leisure. In America men often work long hours even when they are well off; such men, naturally, are indignant at the idea of leisure for wage-earners, except as the grim punishment of unemployment; in fact, they dislike leisure even for their sons. Oddly enough, while they wish their sons to work so hard as to have no time to be civilized, they do not mind their wives and daughters having no work at all. the snobbish admiration of uselessness, which, in an aristocratic society, extends to both sexes, is, under a plutocracy, confined to women; this, however, does not make it any more in agreement with common sense. - -The wise use of leisure, it must be conceded, is a product of civilization and education. A man who has worked long hours all his life will become bored if he becomes suddenly idle. But without a considerable amount of leisure a man is cut off from many of the best things. There is no longer any reason why the bulk of the population should suffer this deprivation; only a foolish asceticism, usually vicarious, makes us continue to insist on work in excessive quantities now that the need no longer exists. - -In the new creed which controls the government of Russia, while there is much that is very different from the traditional teaching of the West, there are some things that are quite unchanged. The attitude of the governing classes, and especially of those who conduct educational propaganda, on the subject of the dignity of labor, is almost exactly that which the governing classes of the world have always preached to what were called the 'honest poor'. Industry, sobriety, willingness to work long hours for distant advantages, even submissiveness to authority, all these reappear; moreover authority still represents the will of the Ruler of the Universe, Who, however, is now called by a new name, Dialectical Materialism. - -The victory of the proletariat in Russia has some points in common with the victory of the feminists in some other countries. For ages, men had conceded the superior saintliness of women, and had consoled women for their inferiority by maintaining that saintliness is more desirable than power. At last the feminists decided that they would have both, since the pioneers among them believed all that the men had told them about the desirability of virtue, but not what they had told them about the worthlessness of political power. A similar thing has happened in Russia as regards manual work. For ages, the rich and their sycophants have written in praise of 'honest toil', have praised the simple life, have professed a religion which teaches that the poor are much more likely to go to heaven than the rich, and in general have tried to make manual workers believe that there is some special nobility about altering the position of matter in space, just as men tried to make women believe that they derived some special nobility from their sexual enslavement. In Russia, all this teaching about the excellence of manual work has been taken seriously, with the result that the manual worker is more honored than anyone else. What are, in essence, revivalist appeals are made, but not for the old purposes: they are made to secure shock workers for special tasks. Manual work is the ideal which is held before the young, and is the basis of all ethical teaching. - -For the present, possibly, this is all to the good. A large country, full of natural resources, awaits development, and has has to be developed with very little use of credit. In these circumstances, hard work is necessary, and is likely to bring a great reward. But what will happen when the point has been reached where everybody could be comfortable without working long hours? - -In the West, we have various ways of dealing with this problem. We have no attempt at economic justice, so that a large proportion of the total produce goes to a small minority of the population, many of whom do no work at all. Owing to the absence of any central control over production, we produce hosts of things that are not wanted. We keep a large percentage of the working population idle, because we can dispense with their labor by making the others overwork. When all these methods prove inadequate, we have a war: we cause a number of people to manufacture high explosives, and a number of others to explode them, as if we were children who had just discovered fireworks. By a combination of all these devices we manage, though with difficulty, to keep alive the notion that a great deal of severe manual work must be the lot of the average man. - -In Russia, owing to more economic justice and central control over production, the problem will have to be differently solved. the rational solution would be, as soon as the necessaries and elementary comforts can be provided for all, to reduce the hours of labor gradually, allowing a popular vote to decide, at each stage, whether more leisure or more goods were to be preferred. But, having taught the supreme virtue of hard work, it is difficult to see how the authorities can aim at a paradise in which there will be much leisure and little work. It seems more likely that they will find continually fresh schemes, by which present leisure is to be sacrificed to future productivity. I read recently of an ingenious plan put forward by Russian engineers, for making the White Sea and the northern coasts of Siberia warm, by putting a dam across the Kara Sea. An admirable project, but liable to postpone proletarian comfort for a generation, while the nobility of toil is being displayed amid the ice-fields and snowstorms of the Arctic Ocean. This sort of thing, if it happens, will be the result of regarding the virtue of hard work as an end in itself, rather than as a means to a state of affairs in which it is no longer needed. - -The fact is that moving matter about, while a certain amount of it is necessary to our existence, is emphatically not one of the ends of human life. If it were, we should have to consider every navvy superior to Shakespeare. We have been misled in this matter by two causes. One is the necessity of keeping the poor contented, which has led the rich, for thousands of years, to preach the dignity of labor, while taking care themselves to remain undignified in this respect. The other is the new pleasure in mechanism, which makes us delight in the astonishingly clever changes that we can produce on the earth's surface. Neither of these motives makes any great appeal to the actual worker. If you ask him what he thinks the best part of his life, he is not likely to say: 'I enjoy manual work because it makes me feel that I am fulfilling man's noblest task, and because I like to think how much man can transform his planet. It is true that my body demands periods of rest, which I have to fill in as best I may, but I am never so happy as when the morning comes and I can return to the toil from which my contentment springs.' I have never heard working men say this sort of thing. They consider work, as it should be considered, a necessary means to a livelihood, and it is from their leisure that they derive whatever happiness they may enjoy. - -It will be said that, while a little leisure is pleasant, men would not know how to fill their days if they had only four hours of work out of the twenty-four. In so far as this is true in the modern world, it is a condemnation of our civilization; it would not have been true at any earlier period. There was formerly a capacity for light-heartedness and play which has been to some extent inhibited by the cult of efficiency. The modern man thinks that everything ought to be done for the sake of something else, and never for its own sake. Serious-minded persons, for example, are continually condemning the habit of going to the cinema, and telling us that it leads the young into crime. But all the work that goes to producing a cinema is respectable, because it is work, and because it brings a money profit. The notion that the desirable activities are those that bring a profit has made everything topsy-turvy. The butcher who provides you with meat and the baker who provides you with bread are praiseworthy, because they are making money; but when you enjoy the food they have provided, you are merely frivolous, unless you eat only to get strength for your work. Broadly speaking, it is held that getting money is good and spending money is bad. Seeing that they are two sides of one transaction, this is absurd; one might as well maintain that keys are good, but keyholes are bad. Whatever merit there may be in the production of goods must be entirely derivative from the advantage to be obtained by consuming them. The individual, in our society, works for profit; but the social purpose of his work lies in the consumption of what he produces. It is this divorce between the individual and the social purpose of production that makes it so difficult for men to think clearly in a world in which profit-making is the incentive to industry. We think too much of production, and too little of consumption. One result is that we attach too little importance to enjoyment and simple happiness, and that we do not judge production by the pleasure that it gives to the consumer. - -When I suggest that working hours should be reduced to four, I am not meaning to imply that all the remaining time should necessarily be spent in pure frivolity. I mean that four hours' work a day should entitle a man to the necessities and elementary comforts of life, and that the rest of his time should be his to use as he might see fit. It is an essential part of any such social system that education should be carried further than it usually is at present, and should aim, in part, at providing tastes which would enable a man to use leisure intelligently. I am not thinking mainly of the sort of things that would be considered 'highbrow'. Peasant dances have died out except in remote rural areas, but the impulses which caused them to be cultivated must still exist in human nature. The pleasures of urban populations have become mainly passive: seeing cinemas, watching football matches, listening to the radio, and so on. This results from the fact that their active energies are fully taken up with work; if they had more leisure, they would again enjoy pleasures in which they took an active part. - -In the past, there was a small leisure class and a larger working class. The leisure class enjoyed advantages for which there was no basis in social justice; this necessarily made it oppressive, limited its sympathies, and caused it to invent theories by which to justify its privileges. These facts greatly diminished its excellence, but in spite of this drawback it contributed nearly the whole of what we call civilization. It cultivated the arts and discovered the sciences; it wrote the books, invented the philosophies, and refined social relations. Even the liberation of the oppressed has usually been inaugurated from above. Without the leisure class, mankind would never have emerged from barbarism. - -The method of a leisure class without duties was, however, extraordinarily wasteful. None of the members of the class had to be taught to be industrious, and the class as a whole was not exceptionally intelligent. The class might produce one Darwin, but against him had to be set tens of thousands of country gentlemen who never thought of anything more intelligent than fox-hunting and punishing poachers. At present, the universities are supposed to provide, in a more systematic way, what the leisure class provided accidentally and as a by-product. This is a great improvement, but it has certain drawbacks. University life is so different from life in the world at large that men who live in academic milieu tend to be unaware of the preoccupations and problems of ordinary men and women; moreover their ways of expressing themselves are usually such as to rob their opinions of the influence that they ought to have upon the general public. Another disadvantage is that in universities studies are organized, and the man who thinks of some original line of research is likely to be discouraged. Academic institutions, therefore, useful as they are, are not adequate guardians of the interests of civilization in a world where everyone outside their walls is too busy for unutilitarian pursuits. - -In a world where no one is compelled to work more than four hours a day, every person possessed of scientific curiosity will be able to indulge it, and every painter will be able to paint without starving, however excellent his pictures may be. Young writers will not be obliged to draw attention to themselves by sensational pot-boilers, with a view to acquiring the economic independence needed for monumental works, for which, when the time at last comes, they will have lost the taste and capacity. Men who, in their professional work, have become interested in some phase of economics or government, will be able to develop their ideas without the academic detachment that makes the work of university economists often seem lacking in reality. Medical men will have the time to learn about the progress of medicine, teachers will not be exasperatedly struggling to teach by routine methods things which they learnt in their youth, which may, in the interval, have been proved to be untrue. - -Above all, there will be happiness and joy of life, instead of frayed nerves, weariness, and dyspepsia. The work exacted will be enough to make leisure delightful, but not enough to produce exhaustion. Since men will not be tired in their spare time, they will not demand only such amusements as are passive and vapid. At least one per cent will probably devote the time not spent in professional work to pursuits of some public importance, and, since they will not depend upon these pursuits for their livelihood, their originality will be unhampered, and there will be no need to conform to the standards set by elderly pundits. But it is not only in these exceptional cases that the advantages of leisure will appear. Ordinary men and women, having the opportunity of a happy life, will become more kindly and less persecuting and less inclined to view others with suspicion. The taste for war will die out, partly for this reason, and partly because it will involve long and severe work for all. Good nature is, of all moral qualities, the one that the world needs most, and good nature is the result of ease and security, not of a life of arduous struggle. Modern methods of production have given us the possibility of ease and security for all; we have chosen, instead, to have overwork for some and starvation for others. Hitherto we have continued to be as energetic as we were before there were machines; in this we have been foolish, but there is no reason to go on being foolish forever. - -[1] Since then, members of the Communist Party have succeeded to this privilege of the warriors and priests. diff --git a/node_modules/wordwrap/test/wrap.js b/node_modules/wordwrap/test/wrap.js deleted file mode 100644 index 01ea4718..00000000 --- a/node_modules/wordwrap/test/wrap.js +++ /dev/null @@ -1,33 +0,0 @@ -var test = require('tape'); -var wordwrap = require('../'); - -var fs = require('fs'); -var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8'); - -test('stop80', function (t) { - var lines = wordwrap(80)(idleness).split(/\n/); - var words = idleness.split(/\s+/); - - lines.forEach(function (line) { - t.ok(line.length <= 80, 'line > 80 columns'); - var chunks = line.match(/\S/) ? line.split(/\s+/) : []; - t.deepEqual(chunks, words.splice(0, chunks.length)); - }); - t.end(); -}); - -test('start20stop60', function (t) { - var lines = wordwrap(20, 100)(idleness).split(/\n/); - var words = idleness.split(/\s+/); - - lines.forEach(function (line) { - t.ok(line.length <= 100, 'line > 100 columns'); - var chunks = line - .split(/\s+/) - .filter(function (x) { return x.match(/\S/) }) - ; - t.deepEqual(chunks, words.splice(0, chunks.length)); - t.deepEqual(line.slice(0, 20), new Array(20 + 1).join(' ')); - }); - t.end(); -}); diff --git a/node_modules/wrappy/LICENSE b/node_modules/wrappy/LICENSE deleted file mode 100644 index 19129e31..00000000 --- a/node_modules/wrappy/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/wrappy/README.md b/node_modules/wrappy/README.md deleted file mode 100644 index 98eab252..00000000 --- a/node_modules/wrappy/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# wrappy - -Callback wrapping utility - -## USAGE - -```javascript -var wrappy = require("wrappy") - -// var wrapper = wrappy(wrapperFunction) - -// make sure a cb is called only once -// See also: http://npm.im/once for this specific use case -var once = wrappy(function (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } -}) - -function printBoo () { - console.log('boo') -} -// has some rando property -printBoo.iAmBooPrinter = true - -var onlyPrintOnce = once(printBoo) - -onlyPrintOnce() // prints 'boo' -onlyPrintOnce() // does nothing - -// random property is retained! -assert.equal(onlyPrintOnce.iAmBooPrinter, true) -``` diff --git a/node_modules/wrappy/package.json b/node_modules/wrappy/package.json deleted file mode 100644 index 00cf9a81..00000000 --- a/node_modules/wrappy/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "wrappy@1", - "_id": "wrappy@1.0.2", - "_inBundle": false, - "_integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "_location": "/wrappy", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "wrappy@1", - "name": "wrappy", - "escapedName": "wrappy", - "rawSpec": "1", - "saveSpec": null, - "fetchSpec": "1" - }, - "_requiredBy": [ - "/inflight", - "/once" - ], - "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", - "_spec": "wrappy@1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/once", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/npm/wrappy/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Callback wrapping utility", - "devDependencies": { - "tap": "^2.3.1" - }, - "directories": { - "test": "test" - }, - "files": [ - "wrappy.js" - ], - "homepage": "https://github.com/npm/wrappy", - "license": "ISC", - "main": "wrappy.js", - "name": "wrappy", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/wrappy.git" - }, - "scripts": { - "test": "tap --coverage test/*.js" - }, - "version": "1.0.2" -} diff --git a/node_modules/wrappy/wrappy.js b/node_modules/wrappy/wrappy.js deleted file mode 100644 index bb7e7d6f..00000000 --- a/node_modules/wrappy/wrappy.js +++ /dev/null @@ -1,33 +0,0 @@ -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} diff --git a/node_modules/xdg-basedir/index.js b/node_modules/xdg-basedir/index.js deleted file mode 100644 index f5aa1769..00000000 --- a/node_modules/xdg-basedir/index.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; -const os = require('os'); -const path = require('path'); - -const home = os.homedir(); -const env = process.env; - -exports.data = env.XDG_DATA_HOME || - (home ? path.join(home, '.local', 'share') : null); - -exports.config = env.XDG_CONFIG_HOME || - (home ? path.join(home, '.config') : null); - -exports.cache = env.XDG_CACHE_HOME || (home ? path.join(home, '.cache') : null); - -exports.runtime = env.XDG_RUNTIME_DIR || null; - -exports.dataDirs = (env.XDG_DATA_DIRS || '/usr/local/share/:/usr/share/').split(':'); - -if (exports.data) { - exports.dataDirs.unshift(exports.data); -} - -exports.configDirs = (env.XDG_CONFIG_DIRS || '/etc/xdg').split(':'); - -if (exports.config) { - exports.configDirs.unshift(exports.config); -} diff --git a/node_modules/xdg-basedir/license b/node_modules/xdg-basedir/license deleted file mode 100644 index 654d0bfe..00000000 --- a/node_modules/xdg-basedir/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/xdg-basedir/package.json b/node_modules/xdg-basedir/package.json deleted file mode 100644 index cf443d96..00000000 --- a/node_modules/xdg-basedir/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "_from": "xdg-basedir@^3.0.0", - "_id": "xdg-basedir@3.0.0", - "_inBundle": false, - "_integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", - "_location": "/xdg-basedir", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "xdg-basedir@^3.0.0", - "name": "xdg-basedir", - "escapedName": "xdg-basedir", - "rawSpec": "^3.0.0", - "saveSpec": null, - "fetchSpec": "^3.0.0" - }, - "_requiredBy": [ - "/cache-directory" - ], - "_resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "_shasum": "496b2cc109eca8dbacfe2dc72b603c17c5870ad4", - "_spec": "xdg-basedir@^3.0.0", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/cache-directory", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/xdg-basedir/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Get XDG Base Directory paths", - "devDependencies": { - "ava": "*", - "require-uncached": "^1.0.2", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/xdg-basedir#readme", - "keywords": [ - "xdg", - "base", - "directory", - "dir", - "basedir", - "path", - "data", - "config", - "cache", - "linux", - "unix", - "spec" - ], - "license": "MIT", - "name": "xdg-basedir", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/xdg-basedir.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "3.0.0" -} diff --git a/node_modules/xdg-basedir/readme.md b/node_modules/xdg-basedir/readme.md deleted file mode 100644 index 61f8c16b..00000000 --- a/node_modules/xdg-basedir/readme.md +++ /dev/null @@ -1,60 +0,0 @@ -# xdg-basedir [![Build Status](https://travis-ci.org/sindresorhus/xdg-basedir.svg?branch=master)](https://travis-ci.org/sindresorhus/xdg-basedir) - -> Get [XDG Base Directory](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) paths - - -## Install - -``` -$ npm install --save xdg-basedir -``` - - -## Usage - -```js -const xdgBasedir = require('xdg-basedir'); - -xdgBasedir.data; -//=> '/home/sindresorhus/.local/share' - -xdgBasedir.config; -//=> '/home/sindresorhus/.config' - -xdgBasedir.dataDirs -//=> ['/home/sindresorhus/.local/share', '/usr/local/share/', '/usr/share/'] -``` - - -## API - -The properties `.data`, `.config`, `.cache`, `.runtime` will return `null` in the uncommon case that both the XDG environment variable is not set and the users home directory can't be found. You need to handle this case. A common solution is to [fall back to a temp directory](https://github.com/yeoman/configstore/blob/b82690fc401318ad18dcd7d151a0003a4898a314/index.js#L15). - -### .data - -Directory for user specific data files. - -### .config - -Directory for user specific configuration files. - -### .cache - -Directory for user specific non-essential data files. - -### .runtime - -Directory for user-specific non-essential runtime files and other file objects (such as sockets, named pipes, etc). - -### .dataDirs - -Preference-ordered array of base directories to search for data files in addition to `.data`. - -### .configDirs - -Preference-ordered array of base directories to search for configuration files in addition to `.config`. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/xtend/.jshintrc b/node_modules/xtend/.jshintrc deleted file mode 100644 index 77887b5f..00000000 --- a/node_modules/xtend/.jshintrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - "maxdepth": 4, - "maxstatements": 200, - "maxcomplexity": 12, - "maxlen": 80, - "maxparams": 5, - - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": false, - "noarg": true, - "noempty": true, - "nonew": true, - "undef": true, - "unused": "vars", - "trailing": true, - - "quotmark": true, - "expr": true, - "asi": true, - - "browser": false, - "esnext": true, - "devel": false, - "node": false, - "nonstandard": false, - - "predef": ["require", "module", "__dirname", "__filename"] -} diff --git a/node_modules/xtend/LICENSE b/node_modules/xtend/LICENSE deleted file mode 100644 index 0099f4f6..00000000 --- a/node_modules/xtend/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2012-2014 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/xtend/README.md b/node_modules/xtend/README.md deleted file mode 100644 index 4a2703cf..00000000 --- a/node_modules/xtend/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# xtend - -[![browser support][3]][4] - -[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence. - -## Examples - -```js -var extend = require("xtend") - -// extend returns a new object. Does not mutate arguments -var combination = extend({ - a: "a", - b: "c" -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - -## Stability status: Locked - -## MIT Licensed - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/xtend/immutable.js b/node_modules/xtend/immutable.js deleted file mode 100644 index 94889c9d..00000000 --- a/node_modules/xtend/immutable.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = extend - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/xtend/mutable.js b/node_modules/xtend/mutable.js deleted file mode 100644 index 72debede..00000000 --- a/node_modules/xtend/mutable.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = extend - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/node_modules/xtend/package.json b/node_modules/xtend/package.json deleted file mode 100644 index 4465ad47..00000000 --- a/node_modules/xtend/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "_from": "xtend@~4.0.1", - "_id": "xtend@4.0.2", - "_inBundle": false, - "_integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "_location": "/xtend", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "xtend@~4.0.1", - "name": "xtend", - "escapedName": "xtend", - "rawSpec": "~4.0.1", - "saveSpec": null, - "fetchSpec": "~4.0.1" - }, - "_requiredBy": [ - "/through2", - "/through2-filter" - ], - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "_shasum": "bb72779f5fa465186b1f438f674fa347fdb5db54", - "_spec": "xtend@~4.0.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/through2", - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "extend like a boss", - "devDependencies": { - "tape": "~1.1.0" - }, - "engines": { - "node": ">=0.4" - }, - "homepage": "https://github.com/Raynos/xtend", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "license": "MIT", - "main": "immutable", - "name": "xtend", - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "scripts": { - "test": "node test" - }, - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "version": "4.0.2" -} diff --git a/node_modules/xtend/test.js b/node_modules/xtend/test.js deleted file mode 100644 index b895b42b..00000000 --- a/node_modules/xtend/test.js +++ /dev/null @@ -1,103 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) - -test("null prototype", function(assert) { - var a = { a: "foo" } - var b = Object.create(null) - b.b = "bar"; - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("null prototype mutable", function (assert) { - var a = { foo: "bar" } - var b = Object.create(null) - b.bar = "baz"; - - mutableExtend(a, b) - - assert.equal(a.bar, "baz") - assert.end() -}) - -test("prototype pollution", function (assert) { - var a = {} - var maliciousPayload = '{"__proto__":{"oops":"It works!"}}' - - assert.strictEqual(a.oops, undefined) - extend({}, maliciousPayload) - assert.strictEqual(a.oops, undefined) - assert.end() -}) - -test("prototype pollution mutable", function (assert) { - var a = {} - var maliciousPayload = '{"__proto__":{"oops":"It works!"}}' - - assert.strictEqual(a.oops, undefined) - mutableExtend({}, maliciousPayload) - assert.strictEqual(a.oops, undefined) - assert.end() -}) diff --git a/node_modules/yargs-parser/CHANGELOG.md b/node_modules/yargs-parser/CHANGELOG.md deleted file mode 100644 index d91dc516..00000000 --- a/node_modules/yargs-parser/CHANGELOG.md +++ /dev/null @@ -1,601 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### [18.1.3](https://www.github.com/yargs/yargs-parser/compare/v18.1.2...v18.1.3) (2020-04-16) - - -### Bug Fixes - -* **setArg:** options using camel-case and dot-notation populated twice ([#268](https://www.github.com/yargs/yargs-parser/issues/268)) ([f7e15b9](https://www.github.com/yargs/yargs-parser/commit/f7e15b9800900b9856acac1a830a5f35847be73e)) - -### [18.1.2](https://www.github.com/yargs/yargs-parser/compare/v18.1.1...v18.1.2) (2020-03-26) - - -### Bug Fixes - -* **array, nargs:** support -o=--value and --option=--value format ([#262](https://www.github.com/yargs/yargs-parser/issues/262)) ([41d3f81](https://www.github.com/yargs/yargs-parser/commit/41d3f8139e116706b28de9b0de3433feb08d2f13)) - -### [18.1.1](https://www.github.com/yargs/yargs-parser/compare/v18.1.0...v18.1.1) (2020-03-16) - - -### Bug Fixes - -* \_\_proto\_\_ will now be replaced with \_\_\_proto\_\_\_ in parse ([#258](https://www.github.com/yargs/yargs-parser/issues/258)), patching a potential -prototype pollution vulnerability. This was reported by the Snyk Security Research Team.([63810ca](https://www.github.com/yargs/yargs-parser/commit/63810ca1ae1a24b08293a4d971e70e058c7a41e2)) - -## [18.1.0](https://www.github.com/yargs/yargs-parser/compare/v18.0.0...v18.1.0) (2020-03-07) - - -### Features - -* introduce single-digit boolean aliases ([#255](https://www.github.com/yargs/yargs-parser/issues/255)) ([9c60265](https://www.github.com/yargs/yargs-parser/commit/9c60265fd7a03cb98e6df3e32c8c5e7508d9f56f)) - -## [18.0.0](https://www.github.com/yargs/yargs-parser/compare/v17.1.0...v18.0.0) (2020-03-02) - - -### ⚠ BREAKING CHANGES - -* the narg count is now enforced when parsing arrays. - -### Features - -* NaN can now be provided as a value for nargs, indicating "at least" one value is expected for array ([#251](https://www.github.com/yargs/yargs-parser/issues/251)) ([9db4be8](https://www.github.com/yargs/yargs-parser/commit/9db4be81417a2c7097128db34d86fe70ef4af70c)) - -## [17.1.0](https://www.github.com/yargs/yargs-parser/compare/v17.0.1...v17.1.0) (2020-03-01) - - -### Features - -* introduce greedy-arrays config, for specifying whether arrays consume multiple positionals ([#249](https://www.github.com/yargs/yargs-parser/issues/249)) ([60e880a](https://www.github.com/yargs/yargs-parser/commit/60e880a837046314d89fa4725f923837fd33a9eb)) - -### [17.0.1](https://www.github.com/yargs/yargs-parser/compare/v17.0.0...v17.0.1) (2020-02-29) - - -### Bug Fixes - -* normalized keys were not enumerable ([#247](https://www.github.com/yargs/yargs-parser/issues/247)) ([57119f9](https://www.github.com/yargs/yargs-parser/commit/57119f9f17cf27499bd95e61c2f72d18314f11ba)) - -## [17.0.0](https://www.github.com/yargs/yargs-parser/compare/v16.1.0...v17.0.0) (2020-02-10) - - -### ⚠ BREAKING CHANGES - -* this reverts parsing behavior of booleans to that of yargs@14 -* objects used during parsing are now created with a null -prototype. There may be some scenarios where this change in behavior -leaks externally. - -### Features - -* boolean arguments will not be collected into an implicit array ([#236](https://www.github.com/yargs/yargs-parser/issues/236)) ([34c4e19](https://www.github.com/yargs/yargs-parser/commit/34c4e19bae4e7af63e3cb6fa654a97ed476e5eb5)) -* introduce nargs-eats-options config option ([#246](https://www.github.com/yargs/yargs-parser/issues/246)) ([d50822a](https://www.github.com/yargs/yargs-parser/commit/d50822ac10e1b05f2e9643671ca131ac251b6732)) - - -### Bug Fixes - -* address bugs with "uknown-options-as-args" ([bc023e3](https://www.github.com/yargs/yargs-parser/commit/bc023e3b13e20a118353f9507d1c999bf388a346)) -* array should take precedence over nargs, but enforce nargs ([#243](https://www.github.com/yargs/yargs-parser/issues/243)) ([4cbc188](https://www.github.com/yargs/yargs-parser/commit/4cbc188b7abb2249529a19c090338debdad2fe6c)) -* support keys that collide with object prototypes ([#234](https://www.github.com/yargs/yargs-parser/issues/234)) ([1587b6d](https://www.github.com/yargs/yargs-parser/commit/1587b6d91db853a9109f1be6b209077993fee4de)) -* unknown options terminated with digits now handled by unknown-options-as-args ([#238](https://www.github.com/yargs/yargs-parser/issues/238)) ([d36cdfa](https://www.github.com/yargs/yargs-parser/commit/d36cdfa854254d7c7e0fe1d583818332ac46c2a5)) - -## [16.1.0](https://www.github.com/yargs/yargs-parser/compare/v16.0.0...v16.1.0) (2019-11-01) - - -### ⚠ BREAKING CHANGES - -* populate error if incompatible narg/count or array/count options are used (#191) - -### Features - -* options that have had their default value used are now tracked ([#211](https://www.github.com/yargs/yargs-parser/issues/211)) ([a525234](https://www.github.com/yargs/yargs-parser/commit/a525234558c847deedd73f8792e0a3b77b26e2c0)) -* populate error if incompatible narg/count or array/count options are used ([#191](https://www.github.com/yargs/yargs-parser/issues/191)) ([84a401f](https://www.github.com/yargs/yargs-parser/commit/84a401f0fa3095e0a19661670d1570d0c3b9d3c9)) - - -### Reverts - -* revert 16.0.0 CHANGELOG entry ([920320a](https://www.github.com/yargs/yargs-parser/commit/920320ad9861bbfd58eda39221ae211540fc1daf)) - -## [15.0.0](https://github.com/yargs/yargs-parser/compare/v14.0.0...v15.0.0) (2019-10-07) - - -### Features - -* rework `collect-unknown-options` into `unknown-options-as-args`, providing more comprehensive functionality ([ef771ca](https://github.com/yargs/yargs-parser/commit/ef771ca)) - - -### BREAKING CHANGES - -* rework `collect-unknown-options` into `unknown-options-as-args`, providing more comprehensive functionality - - - -## [14.0.0](https://github.com/yargs/yargs-parser/compare/v13.1.1...v14.0.0) (2019-09-06) - - -### Bug Fixes - -* boolean arrays with default values ([#185](https://github.com/yargs/yargs-parser/issues/185)) ([7d42572](https://github.com/yargs/yargs-parser/commit/7d42572)) -* boolean now behaves the same as other array types ([#184](https://github.com/yargs/yargs-parser/issues/184)) ([17ca3bd](https://github.com/yargs/yargs-parser/commit/17ca3bd)) -* eatNargs() for 'opt.narg === 0' and boolean typed options ([#188](https://github.com/yargs/yargs-parser/issues/188)) ([c5a1db0](https://github.com/yargs/yargs-parser/commit/c5a1db0)) -* maybeCoerceNumber now takes precedence over coerce return value ([#182](https://github.com/yargs/yargs-parser/issues/182)) ([2f26436](https://github.com/yargs/yargs-parser/commit/2f26436)) -* take into account aliases when appending arrays from config object ([#199](https://github.com/yargs/yargs-parser/issues/199)) ([f8a2d3f](https://github.com/yargs/yargs-parser/commit/f8a2d3f)) - - -### Features - -* add configuration option to "collect-unknown-options" ([#181](https://github.com/yargs/yargs-parser/issues/181)) ([7909cc4](https://github.com/yargs/yargs-parser/commit/7909cc4)) -* maybeCoerceNumber() now takes into account arrays ([#187](https://github.com/yargs/yargs-parser/issues/187)) ([31c204b](https://github.com/yargs/yargs-parser/commit/31c204b)) - - -### BREAKING CHANGES - -* unless "parse-numbers" is set to "false", arrays of numeric strings are now parsed as numbers, rather than strings. -* we have dropped the broken "defaulted" functionality; we would like to revisit adding this in the future. -* maybeCoerceNumber now takes precedence over coerce return value (#182) - - - -### [13.1.1](https://www.github.com/yargs/yargs-parser/compare/v13.1.0...v13.1.1) (2019-06-10) - - -### Bug Fixes - -* convert values to strings when tokenizing ([#167](https://www.github.com/yargs/yargs-parser/issues/167)) ([57b7883](https://www.github.com/yargs/yargs-parser/commit/57b7883)) -* nargs should allow duplicates when duplicate-arguments-array=false ([#164](https://www.github.com/yargs/yargs-parser/issues/164)) ([47ccb0b](https://www.github.com/yargs/yargs-parser/commit/47ccb0b)) -* should populate "_" when given config with "short-option-groups" false ([#179](https://www.github.com/yargs/yargs-parser/issues/179)) ([6055974](https://www.github.com/yargs/yargs-parser/commit/6055974)) - -## [13.1.0](https://github.com/yargs/yargs-parser/compare/v13.0.0...v13.1.0) (2019-05-05) - - -### Features - -* add `strip-aliased` and `strip-dashed` configuration options. ([#172](https://github.com/yargs/yargs-parser/issues/172)) ([a3936aa](https://github.com/yargs/yargs-parser/commit/a3936aa)) -* support boolean which do not consume next argument. ([#171](https://github.com/yargs/yargs-parser/issues/171)) ([0ae7fcb](https://github.com/yargs/yargs-parser/commit/0ae7fcb)) - - - - -# [13.0.0](https://github.com/yargs/yargs-parser/compare/v12.0.0...v13.0.0) (2019-02-02) - - -### Features - -* don't coerce number from string with leading '0' or '+' ([#158](https://github.com/yargs/yargs-parser/issues/158)) ([18d0fd5](https://github.com/yargs/yargs-parser/commit/18d0fd5)) - - -### BREAKING CHANGES - -* options with leading '+' or '0' now parse as strings - - - - -# [12.0.0](https://github.com/yargs/yargs-parser/compare/v11.1.1...v12.0.0) (2019-01-29) - - -### Bug Fixes - -* better handling of quoted strings ([#153](https://github.com/yargs/yargs-parser/issues/153)) ([2fb71b2](https://github.com/yargs/yargs-parser/commit/2fb71b2)) - - -### Features - -* default value is now used if no right-hand value provided for numbers/strings ([#156](https://github.com/yargs/yargs-parser/issues/156)) ([5a7c46a](https://github.com/yargs/yargs-parser/commit/5a7c46a)) - - -### BREAKING CHANGES - -* a flag with no right-hand value no longer populates defaulted options with `undefined`. -* quotes at beginning and endings of strings are not removed during parsing. - - - - -## [11.1.1](https://github.com/yargs/yargs-parser/compare/v11.1.0...v11.1.1) (2018-11-19) - - -### Bug Fixes - -* ensure empty string is added into argv._ ([#140](https://github.com/yargs/yargs-parser/issues/140)) ([79cda98](https://github.com/yargs/yargs-parser/commit/79cda98)) - - -### Reverts - -* make requiresArg work in conjunction with arrays ([#136](https://github.com/yargs/yargs-parser/issues/136)) ([f4a3063](https://github.com/yargs/yargs-parser/commit/f4a3063)) - - - - -# [11.1.0](https://github.com/yargs/yargs-parser/compare/v11.0.0...v11.1.0) (2018-11-10) - - -### Bug Fixes - -* handling of one char alias ([#139](https://github.com/yargs/yargs-parser/issues/139)) ([ee56e31](https://github.com/yargs/yargs-parser/commit/ee56e31)) - - -### Features - -* add halt-at-non-option configuration option ([#130](https://github.com/yargs/yargs-parser/issues/130)) ([a849fce](https://github.com/yargs/yargs-parser/commit/a849fce)) - - - - -# [11.0.0](https://github.com/yargs/yargs-parser/compare/v10.1.0...v11.0.0) (2018-10-06) - - -### Bug Fixes - -* flatten-duplicate-arrays:false for more than 2 arrays ([#128](https://github.com/yargs/yargs-parser/issues/128)) ([2bc395f](https://github.com/yargs/yargs-parser/commit/2bc395f)) -* hyphenated flags combined with dot notation broke parsing ([#131](https://github.com/yargs/yargs-parser/issues/131)) ([dc788da](https://github.com/yargs/yargs-parser/commit/dc788da)) -* make requiresArg work in conjunction with arrays ([#136](https://github.com/yargs/yargs-parser/issues/136)) ([77ae1d4](https://github.com/yargs/yargs-parser/commit/77ae1d4)) - - -### Chores - -* update dependencies ([6dc42a1](https://github.com/yargs/yargs-parser/commit/6dc42a1)) - - -### Features - -* also add camelCase array options ([#125](https://github.com/yargs/yargs-parser/issues/125)) ([08c0117](https://github.com/yargs/yargs-parser/commit/08c0117)) -* array.type can now be provided, supporting coercion ([#132](https://github.com/yargs/yargs-parser/issues/132)) ([4b8cfce](https://github.com/yargs/yargs-parser/commit/4b8cfce)) - - -### BREAKING CHANGES - -* drops Node 4 support -* the argv object is now populated differently (correctly) when hyphens and dot notation are used in conjunction. - - - - -# [10.1.0](https://github.com/yargs/yargs-parser/compare/v10.0.0...v10.1.0) (2018-06-29) - - -### Features - -* add `set-placeholder-key` configuration ([#123](https://github.com/yargs/yargs-parser/issues/123)) ([19386ee](https://github.com/yargs/yargs-parser/commit/19386ee)) - - - - -# [10.0.0](https://github.com/yargs/yargs-parser/compare/v9.0.2...v10.0.0) (2018-04-04) - - -### Bug Fixes - -* do not set boolean flags if not defined in `argv` ([#119](https://github.com/yargs/yargs-parser/issues/119)) ([f6e6599](https://github.com/yargs/yargs-parser/commit/f6e6599)) - - -### BREAKING CHANGES - -* `boolean` flags defined without a `default` value will now behave like other option type and won't be set in the parsed results when the user doesn't set the corresponding CLI arg. - -Previous behavior: -```js -var parse = require('yargs-parser'); - -parse('--flag', {boolean: ['flag']}); -// => { _: [], flag: true } - -parse('--no-flag', {boolean: ['flag']}); -// => { _: [], flag: false } - -parse('', {boolean: ['flag']}); -// => { _: [], flag: false } -``` - -New behavior: -```js -var parse = require('yargs-parser'); - -parse('--flag', {boolean: ['flag']}); -// => { _: [], flag: true } - -parse('--no-flag', {boolean: ['flag']}); -// => { _: [], flag: false } - -parse('', {boolean: ['flag']}); -// => { _: [] } => flag not set similarly to other option type -``` - - - - -## [9.0.2](https://github.com/yargs/yargs-parser/compare/v9.0.1...v9.0.2) (2018-01-20) - - -### Bug Fixes - -* nargs was still aggressively consuming too many arguments ([9b28aad](https://github.com/yargs/yargs-parser/commit/9b28aad)) - - - - -## [9.0.1](https://github.com/yargs/yargs-parser/compare/v9.0.0...v9.0.1) (2018-01-20) - - -### Bug Fixes - -* nargs was consuming too many arguments ([4fef206](https://github.com/yargs/yargs-parser/commit/4fef206)) - - - - -# [9.0.0](https://github.com/yargs/yargs-parser/compare/v8.1.0...v9.0.0) (2018-01-20) - - -### Features - -* narg arguments no longer consume flag arguments ([#114](https://github.com/yargs/yargs-parser/issues/114)) ([60bb9b3](https://github.com/yargs/yargs-parser/commit/60bb9b3)) - - -### BREAKING CHANGES - -* arguments of form --foo, -abc, will no longer be consumed by nargs - - - - -# [8.1.0](https://github.com/yargs/yargs-parser/compare/v8.0.0...v8.1.0) (2017-12-20) - - -### Bug Fixes - -* allow null config values ([#108](https://github.com/yargs/yargs-parser/issues/108)) ([d8b14f9](https://github.com/yargs/yargs-parser/commit/d8b14f9)) -* ensure consistent parsing of dot-notation arguments ([#102](https://github.com/yargs/yargs-parser/issues/102)) ([c9bd79c](https://github.com/yargs/yargs-parser/commit/c9bd79c)) -* implement [@antoniom](https://github.com/antoniom)'s fix for camel-case expansion ([3087e1d](https://github.com/yargs/yargs-parser/commit/3087e1d)) -* only run coercion functions once, despite aliases. ([#76](https://github.com/yargs/yargs-parser/issues/76)) ([#103](https://github.com/yargs/yargs-parser/issues/103)) ([507aaef](https://github.com/yargs/yargs-parser/commit/507aaef)) -* scientific notation circumvented bounds check ([#110](https://github.com/yargs/yargs-parser/issues/110)) ([3571f57](https://github.com/yargs/yargs-parser/commit/3571f57)) -* tokenizer should ignore spaces at the beginning of the argString ([#106](https://github.com/yargs/yargs-parser/issues/106)) ([f34ead9](https://github.com/yargs/yargs-parser/commit/f34ead9)) - - -### Features - -* make combining arrays a configurable option ([#111](https://github.com/yargs/yargs-parser/issues/111)) ([c8bf536](https://github.com/yargs/yargs-parser/commit/c8bf536)) -* merge array from arguments with array from config ([#83](https://github.com/yargs/yargs-parser/issues/83)) ([806ddd6](https://github.com/yargs/yargs-parser/commit/806ddd6)) - - - - -# [8.0.0](https://github.com/yargs/yargs-parser/compare/v7.0.0...v8.0.0) (2017-10-05) - - -### Bug Fixes - -* Ignore multiple spaces between arguments. ([#100](https://github.com/yargs/yargs-parser/issues/100)) ([d137227](https://github.com/yargs/yargs-parser/commit/d137227)) - - -### Features - -* allow configuration of prefix for boolean negation ([#94](https://github.com/yargs/yargs-parser/issues/94)) ([00bde7d](https://github.com/yargs/yargs-parser/commit/00bde7d)) -* reworking how numbers are parsed ([#104](https://github.com/yargs/yargs-parser/issues/104)) ([fba00eb](https://github.com/yargs/yargs-parser/commit/fba00eb)) - - -### BREAKING CHANGES - -* strings that fail `Number.isSafeInteger()` are no longer coerced into numbers. - - - - -# [7.0.0](https://github.com/yargs/yargs-parser/compare/v6.0.1...v7.0.0) (2017-05-02) - - -### Chores - -* revert populate-- logic ([#91](https://github.com/yargs/yargs-parser/issues/91)) ([6003e6d](https://github.com/yargs/yargs-parser/commit/6003e6d)) - - -### BREAKING CHANGES - -* populate-- now defaults to false. - - - - -## [6.0.1](https://github.com/yargs/yargs-parser/compare/v6.0.0...v6.0.1) (2017-05-01) - - -### Bug Fixes - -* default '--' to undefined when not provided; this is closer to the array API ([#90](https://github.com/yargs/yargs-parser/issues/90)) ([4e739cc](https://github.com/yargs/yargs-parser/commit/4e739cc)) - - - - -# [6.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v6.0.0) (2017-05-01) - - -### Bug Fixes - -* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f)) -* parsing hints should apply for dot notation keys ([#86](https://github.com/yargs/yargs-parser/issues/86)) ([3e47d62](https://github.com/yargs/yargs-parser/commit/3e47d62)) - - -### Chores - -* upgrade to newest version of camelcase ([#87](https://github.com/yargs/yargs-parser/issues/87)) ([f1903aa](https://github.com/yargs/yargs-parser/commit/f1903aa)) - - -### Features - -* add -- option which allows arguments after the -- flag to be returned separated from positional arguments ([#84](https://github.com/yargs/yargs-parser/issues/84)) ([2572ca8](https://github.com/yargs/yargs-parser/commit/2572ca8)) -* when parsing stops, we now populate "--" by default ([#88](https://github.com/yargs/yargs-parser/issues/88)) ([cd666db](https://github.com/yargs/yargs-parser/commit/cd666db)) - - -### BREAKING CHANGES - -* rather than placing arguments in "_", when parsing is stopped via "--"; we now populate an array called "--" by default. -* camelcase now requires Node 4+. -* environment variables will now override config files (args, env, config-file, config-object) - - - - -# [5.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v5.0.0) (2017-02-18) - - -### Bug Fixes - -* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f)) - - -### BREAKING CHANGES - -* environment variables will now override config files (args, env, config-file, config-object) - - - - -## [4.2.1](https://github.com/yargs/yargs-parser/compare/v4.2.0...v4.2.1) (2017-01-02) - - -### Bug Fixes - -* flatten/duplicate regression ([#75](https://github.com/yargs/yargs-parser/issues/75)) ([68d68a0](https://github.com/yargs/yargs-parser/commit/68d68a0)) - - - - -# [4.2.0](https://github.com/yargs/yargs-parser/compare/v4.1.0...v4.2.0) (2016-12-01) - - -### Bug Fixes - -* inner objects in configs had their keys appended to top-level key when dot-notation was disabled ([#72](https://github.com/yargs/yargs-parser/issues/72)) ([0b1b5f9](https://github.com/yargs/yargs-parser/commit/0b1b5f9)) - - -### Features - -* allow multiple arrays to be provided, rather than always combining ([#71](https://github.com/yargs/yargs-parser/issues/71)) ([0f0fb2d](https://github.com/yargs/yargs-parser/commit/0f0fb2d)) - - - - -# [4.1.0](https://github.com/yargs/yargs-parser/compare/v4.0.2...v4.1.0) (2016-11-07) - - -### Features - -* apply coercions to default options ([#65](https://github.com/yargs/yargs-parser/issues/65)) ([c79052b](https://github.com/yargs/yargs-parser/commit/c79052b)) -* handle dot notation boolean options ([#63](https://github.com/yargs/yargs-parser/issues/63)) ([02c3545](https://github.com/yargs/yargs-parser/commit/02c3545)) - - - - -## [4.0.2](https://github.com/yargs/yargs-parser/compare/v4.0.1...v4.0.2) (2016-09-30) - - -### Bug Fixes - -* whoops, let's make the assign not change the Object key order ([29d069a](https://github.com/yargs/yargs-parser/commit/29d069a)) - - - - -## [4.0.1](https://github.com/yargs/yargs-parser/compare/v4.0.0...v4.0.1) (2016-09-30) - - -### Bug Fixes - -* lodash.assign was deprecated ([#59](https://github.com/yargs/yargs-parser/issues/59)) ([5e7eb11](https://github.com/yargs/yargs-parser/commit/5e7eb11)) - - - - -# [4.0.0](https://github.com/yargs/yargs-parser/compare/v3.2.0...v4.0.0) (2016-09-26) - - -### Bug Fixes - -* coerce should be applied to the final objects and arrays created ([#57](https://github.com/yargs/yargs-parser/issues/57)) ([4ca69da](https://github.com/yargs/yargs-parser/commit/4ca69da)) - - -### BREAKING CHANGES - -* coerce is no longer applied to individual arguments in an implicit array. - - - - -# [3.2.0](https://github.com/yargs/yargs-parser/compare/v3.1.0...v3.2.0) (2016-08-13) - - -### Features - -* coerce full array instead of each element ([#51](https://github.com/yargs/yargs-parser/issues/51)) ([cc4dc56](https://github.com/yargs/yargs-parser/commit/cc4dc56)) - - - - -# [3.1.0](https://github.com/yargs/yargs-parser/compare/v3.0.0...v3.1.0) (2016-08-09) - - -### Bug Fixes - -* address pkgConf parsing bug outlined in [#37](https://github.com/yargs/yargs-parser/issues/37) ([#45](https://github.com/yargs/yargs-parser/issues/45)) ([be76ee6](https://github.com/yargs/yargs-parser/commit/be76ee6)) -* better parsing of negative values ([#44](https://github.com/yargs/yargs-parser/issues/44)) ([2e43692](https://github.com/yargs/yargs-parser/commit/2e43692)) -* check aliases when guessing defaults for arguments fixes [#41](https://github.com/yargs/yargs-parser/issues/41) ([#43](https://github.com/yargs/yargs-parser/issues/43)) ([f3e4616](https://github.com/yargs/yargs-parser/commit/f3e4616)) - - -### Features - -* added coerce option, for providing specialized argument parsing ([#42](https://github.com/yargs/yargs-parser/issues/42)) ([7b49cd2](https://github.com/yargs/yargs-parser/commit/7b49cd2)) - - - - -# [3.0.0](https://github.com/yargs/yargs-parser/compare/v2.4.1...v3.0.0) (2016-08-07) - - -### Bug Fixes - -* parsing issue with numeric character in group of options ([#19](https://github.com/yargs/yargs-parser/issues/19)) ([f743236](https://github.com/yargs/yargs-parser/commit/f743236)) -* upgraded lodash.assign ([5d7fdf4](https://github.com/yargs/yargs-parser/commit/5d7fdf4)) - -### BREAKING CHANGES - -* subtle change to how values are parsed in a group of single-character arguments. -* _first released in 3.1.0, better handling of negative values should be considered a breaking change._ - - - - -## [2.4.1](https://github.com/yargs/yargs-parser/compare/v2.4.0...v2.4.1) (2016-07-16) - - -### Bug Fixes - -* **count:** do not increment a default value ([#39](https://github.com/yargs/yargs-parser/issues/39)) ([b04a189](https://github.com/yargs/yargs-parser/commit/b04a189)) - - - - -# [2.4.0](https://github.com/yargs/yargs-parser/compare/v2.3.0...v2.4.0) (2016-04-11) - - -### Features - -* **environment:** Support nested options in environment variables ([#26](https://github.com/yargs/yargs-parser/issues/26)) thanks [@elas7](https://github.com/elas7) \o/ ([020778b](https://github.com/yargs/yargs-parser/commit/020778b)) - - - - -# [2.3.0](https://github.com/yargs/yargs-parser/compare/v2.2.0...v2.3.0) (2016-04-09) - - -### Bug Fixes - -* **boolean:** fix for boolean options with non boolean defaults (#20) ([2dbe86b](https://github.com/yargs/yargs-parser/commit/2dbe86b)), closes [(#20](https://github.com/(/issues/20) -* **package:** remove tests from tarball ([0353c0d](https://github.com/yargs/yargs-parser/commit/0353c0d)) -* **parsing:** handle calling short option with an empty string as the next value. ([a867165](https://github.com/yargs/yargs-parser/commit/a867165)) -* boolean flag when next value contains the strings 'true' or 'false'. ([69941a6](https://github.com/yargs/yargs-parser/commit/69941a6)) -* update dependencies; add standard-version bin for next release (#24) ([822d9d5](https://github.com/yargs/yargs-parser/commit/822d9d5)) - -### Features - -* **configuration:** Allow to pass configuration objects to yargs-parser ([0780900](https://github.com/yargs/yargs-parser/commit/0780900)) -* **normalize:** allow normalize to work with arrays ([e0eaa1a](https://github.com/yargs/yargs-parser/commit/e0eaa1a)) diff --git a/node_modules/yargs-parser/LICENSE.txt b/node_modules/yargs-parser/LICENSE.txt deleted file mode 100644 index 836440be..00000000 --- a/node_modules/yargs-parser/LICENSE.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2016, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/yargs-parser/README.md b/node_modules/yargs-parser/README.md deleted file mode 100644 index bae61c2a..00000000 --- a/node_modules/yargs-parser/README.md +++ /dev/null @@ -1,449 +0,0 @@ -# yargs-parser - -[![Build Status](https://travis-ci.org/yargs/yargs-parser.svg)](https://travis-ci.org/yargs/yargs-parser) -[![NPM version](https://img.shields.io/npm/v/yargs-parser.svg)](https://www.npmjs.com/package/yargs-parser) -[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) - - -The mighty option parser used by [yargs](https://github.com/yargs/yargs). - -visit the [yargs website](http://yargs.js.org/) for more examples, and thorough usage instructions. - - - -## Example - -```sh -npm i yargs-parser --save -``` - -```js -var argv = require('yargs-parser')(process.argv.slice(2)) -console.log(argv) -``` - -```sh -node example.js --foo=33 --bar hello -{ _: [], foo: 33, bar: 'hello' } -``` - -_or parse a string!_ - -```js -var argv = require('yargs-parser')('--foo=99 --bar=33') -console.log(argv) -``` - -```sh -{ _: [], foo: 99, bar: 33 } -``` - -Convert an array of mixed types before passing to `yargs-parser`: - -```js -var parse = require('yargs-parser') -parse(['-f', 11, '--zoom', 55].join(' ')) // <-- array to string -parse(['-f', 11, '--zoom', 55].map(String)) // <-- array of strings -``` - -## API - -### require('yargs-parser')(args, opts={}) - -Parses command line arguments returning a simple mapping of keys and values. - -**expects:** - -* `args`: a string or array of strings representing the options to parse. -* `opts`: provide a set of hints indicating how `args` should be parsed: - * `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`. - * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`.
    - Indicate that keys should be parsed as an array and coerced to booleans / numbers:
    - `{array: [{ key: 'foo', boolean: true }, {key: 'bar', number: true}]}`. - * `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`. - * `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided - (or throws an error). For arrays the function is called only once for the entire array:
    - `{coerce: {foo: function (arg) {return modifiedArg}}}`. - * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed). - * `opts.configObjects`: configuration objects to parse, their properties will be set as arguments:
    - `{configObjects: [{'x': 5, 'y': 33}, {'z': 44}]}`. - * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)). - * `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`. - * `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`. - * `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed. - * `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`. - * `opts.normalize`: `path.normalize()` will be applied to values set to this key. - * `opts.number`: keys should be treated as numbers. - * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`). - -**returns:** - -* `obj`: an object representing the parsed value of `args` - * `key/value`: key value pairs for each argument and their aliases. - * `_`: an array representing the positional arguments. - * [optional] `--`: an array with arguments after the end-of-options flag `--`. - -### require('yargs-parser').detailed(args, opts={}) - -Parses a command line string, returning detailed information required by the -yargs engine. - -**expects:** - -* `args`: a string or array of strings representing options to parse. -* `opts`: provide a set of hints indicating how `args`, inputs are identical to `require('yargs-parser')(args, opts={})`. - -**returns:** - -* `argv`: an object representing the parsed value of `args` - * `key/value`: key value pairs for each argument and their aliases. - * `_`: an array representing the positional arguments. - * [optional] `--`: an array with arguments after the end-of-options flag `--`. -* `error`: populated with an error object if an exception occurred during parsing. -* `aliases`: the inferred list of aliases built by combining lists in `opts.alias`. -* `newAliases`: any new aliases added via camel-case expansion: - * `boolean`: `{ fooBar: true }` -* `defaulted`: any new argument created by `opts.default`, no aliases included. - * `boolean`: `{ foo: true }` -* `configuration`: given by default settings and `opts.configuration`. - - - -### Configuration - -The yargs-parser applies several automated transformations on the keys provided -in `args`. These features can be turned on and off using the `configuration` field -of `opts`. - -```js -var parsed = parser(['--no-dice'], { - configuration: { - 'boolean-negation': false - } -}) -``` - -### short option groups - -* default: `true`. -* key: `short-option-groups`. - -Should a group of short-options be treated as boolean flags? - -```sh -node example.js -abc -{ _: [], a: true, b: true, c: true } -``` - -_if disabled:_ - -```sh -node example.js -abc -{ _: [], abc: true } -``` - -### camel-case expansion - -* default: `true`. -* key: `camel-case-expansion`. - -Should hyphenated arguments be expanded into camel-case aliases? - -```sh -node example.js --foo-bar -{ _: [], 'foo-bar': true, fooBar: true } -``` - -_if disabled:_ - -```sh -node example.js --foo-bar -{ _: [], 'foo-bar': true } -``` - -### dot-notation - -* default: `true` -* key: `dot-notation` - -Should keys that contain `.` be treated as objects? - -```sh -node example.js --foo.bar -{ _: [], foo: { bar: true } } -``` - -_if disabled:_ - -```sh -node example.js --foo.bar -{ _: [], "foo.bar": true } -``` - -### parse numbers - -* default: `true` -* key: `parse-numbers` - -Should keys that look like numbers be treated as such? - -```sh -node example.js --foo=99.3 -{ _: [], foo: 99.3 } -``` - -_if disabled:_ - -```sh -node example.js --foo=99.3 -{ _: [], foo: "99.3" } -``` - -### boolean negation - -* default: `true` -* key: `boolean-negation` - -Should variables prefixed with `--no` be treated as negations? - -```sh -node example.js --no-foo -{ _: [], foo: false } -``` - -_if disabled:_ - -```sh -node example.js --no-foo -{ _: [], "no-foo": true } -``` - -### combine arrays - -* default: `false` -* key: `combine-arrays` - -Should arrays be combined when provided by both command line arguments and -a configuration file. - -### duplicate arguments array - -* default: `true` -* key: `duplicate-arguments-array` - -Should arguments be coerced into an array when duplicated: - -```sh -node example.js -x 1 -x 2 -{ _: [], x: [1, 2] } -``` - -_if disabled:_ - -```sh -node example.js -x 1 -x 2 -{ _: [], x: 2 } -``` - -### flatten duplicate arrays - -* default: `true` -* key: `flatten-duplicate-arrays` - -Should array arguments be coerced into a single array when duplicated: - -```sh -node example.js -x 1 2 -x 3 4 -{ _: [], x: [1, 2, 3, 4] } -``` - -_if disabled:_ - -```sh -node example.js -x 1 2 -x 3 4 -{ _: [], x: [[1, 2], [3, 4]] } -``` - -### greedy arrays - -* default: `true` -* key: `greedy-arrays` - -Should arrays consume more than one positional argument following their flag. - -```sh -node example --arr 1 2 -{ _[], arr: [1, 2] } -``` - -_if disabled:_ - -```sh -node example --arr 1 2 -{ _[2], arr: [1] } -``` - -**Note: in `v18.0.0` we are considering defaulting greedy arrays to `false`.** - -### nargs eats options - -* default: `false` -* key: `nargs-eats-options` - -Should nargs consume dash options as well as positional arguments. - -### negation prefix - -* default: `no-` -* key: `negation-prefix` - -The prefix to use for negated boolean variables. - -```sh -node example.js --no-foo -{ _: [], foo: false } -``` - -_if set to `quux`:_ - -```sh -node example.js --quuxfoo -{ _: [], foo: false } -``` - -### populate -- - -* default: `false`. -* key: `populate--` - -Should unparsed flags be stored in `--` or `_`. - -_If disabled:_ - -```sh -node example.js a -b -- x y -{ _: [ 'a', 'x', 'y' ], b: true } -``` - -_If enabled:_ - -```sh -node example.js a -b -- x y -{ _: [ 'a' ], '--': [ 'x', 'y' ], b: true } -``` - -### set placeholder key - -* default: `false`. -* key: `set-placeholder-key`. - -Should a placeholder be added for keys not set via the corresponding CLI argument? - -_If disabled:_ - -```sh -node example.js -a 1 -c 2 -{ _: [], a: 1, c: 2 } -``` - -_If enabled:_ - -```sh -node example.js -a 1 -c 2 -{ _: [], a: 1, b: undefined, c: 2 } -``` - -### halt at non-option - -* default: `false`. -* key: `halt-at-non-option`. - -Should parsing stop at the first positional argument? This is similar to how e.g. `ssh` parses its command line. - -_If disabled:_ - -```sh -node example.js -a run b -x y -{ _: [ 'b' ], a: 'run', x: 'y' } -``` - -_If enabled:_ - -```sh -node example.js -a run b -x y -{ _: [ 'b', '-x', 'y' ], a: 'run' } -``` - -### strip aliased - -* default: `false` -* key: `strip-aliased` - -Should aliases be removed before returning results? - -_If disabled:_ - -```sh -node example.js --test-field 1 -{ _: [], 'test-field': 1, testField: 1, 'test-alias': 1, testAlias: 1 } -``` - -_If enabled:_ - -```sh -node example.js --test-field 1 -{ _: [], 'test-field': 1, testField: 1 } -``` - -### strip dashed - -* default: `false` -* key: `strip-dashed` - -Should dashed keys be removed before returning results? This option has no effect if -`camel-case-expansion` is disabled. - -_If disabled:_ - -```sh -node example.js --test-field 1 -{ _: [], 'test-field': 1, testField: 1 } -``` - -_If enabled:_ - -```sh -node example.js --test-field 1 -{ _: [], testField: 1 } -``` - -### unknown options as args - -* default: `false` -* key: `unknown-options-as-args` - -Should unknown options be treated like regular arguments? An unknown option is one that is not -configured in `opts`. - -_If disabled_ - -```sh -node example.js --unknown-option --known-option 2 --string-option --unknown-option2 -{ _: [], unknownOption: true, knownOption: 2, stringOption: '', unknownOption2: true } -``` - -_If enabled_ - -```sh -node example.js --unknown-option --known-option 2 --string-option --unknown-option2 -{ _: ['--unknown-option'], knownOption: 2, stringOption: '--unknown-option2' } -``` - -## Special Thanks - -The yargs project evolves from optimist and minimist. It owes its -existence to a lot of James Halliday's hard work. Thanks [substack](https://github.com/substack) **beep** **boop** \o/ - -## License - -ISC diff --git a/node_modules/yargs-parser/index.js b/node_modules/yargs-parser/index.js deleted file mode 100644 index c14c1fc7..00000000 --- a/node_modules/yargs-parser/index.js +++ /dev/null @@ -1,1032 +0,0 @@ -const camelCase = require('camelcase') -const decamelize = require('decamelize') -const path = require('path') -const tokenizeArgString = require('./lib/tokenize-arg-string') -const util = require('util') - -function parse (args, opts) { - opts = Object.assign(Object.create(null), opts) - // allow a string argument to be passed in rather - // than an argv array. - args = tokenizeArgString(args) - - // aliases might have transitive relationships, normalize this. - const aliases = combineAliases(Object.assign(Object.create(null), opts.alias)) - const configuration = Object.assign({ - 'boolean-negation': true, - 'camel-case-expansion': true, - 'combine-arrays': false, - 'dot-notation': true, - 'duplicate-arguments-array': true, - 'flatten-duplicate-arrays': true, - 'greedy-arrays': true, - 'halt-at-non-option': false, - 'nargs-eats-options': false, - 'negation-prefix': 'no-', - 'parse-numbers': true, - 'populate--': false, - 'set-placeholder-key': false, - 'short-option-groups': true, - 'strip-aliased': false, - 'strip-dashed': false, - 'unknown-options-as-args': false - }, opts.configuration) - const defaults = Object.assign(Object.create(null), opts.default) - const configObjects = opts.configObjects || [] - const envPrefix = opts.envPrefix - const notFlagsOption = configuration['populate--'] - const notFlagsArgv = notFlagsOption ? '--' : '_' - const newAliases = Object.create(null) - const defaulted = Object.create(null) - // allow a i18n handler to be passed in, default to a fake one (util.format). - const __ = opts.__ || util.format - const flags = { - aliases: Object.create(null), - arrays: Object.create(null), - bools: Object.create(null), - strings: Object.create(null), - numbers: Object.create(null), - counts: Object.create(null), - normalize: Object.create(null), - configs: Object.create(null), - nargs: Object.create(null), - coercions: Object.create(null), - keys: [] - } - const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/ - const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)') - - ;[].concat(opts.array).filter(Boolean).forEach(function (opt) { - const key = opt.key || opt - - // assign to flags[bools|strings|numbers] - const assignment = Object.keys(opt).map(function (key) { - return ({ - boolean: 'bools', - string: 'strings', - number: 'numbers' - })[key] - }).filter(Boolean).pop() - - // assign key to be coerced - if (assignment) { - flags[assignment][key] = true - } - - flags.arrays[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.boolean).filter(Boolean).forEach(function (key) { - flags.bools[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.number).filter(Boolean).forEach(function (key) { - flags.numbers[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.count).filter(Boolean).forEach(function (key) { - flags.counts[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.normalize).filter(Boolean).forEach(function (key) { - flags.normalize[key] = true - flags.keys.push(key) - }) - - Object.keys(opts.narg || {}).forEach(function (k) { - flags.nargs[k] = opts.narg[k] - flags.keys.push(k) - }) - - Object.keys(opts.coerce || {}).forEach(function (k) { - flags.coercions[k] = opts.coerce[k] - flags.keys.push(k) - }) - - if (Array.isArray(opts.config) || typeof opts.config === 'string') { - ;[].concat(opts.config).filter(Boolean).forEach(function (key) { - flags.configs[key] = true - }) - } else { - Object.keys(opts.config || {}).forEach(function (k) { - flags.configs[k] = opts.config[k] - }) - } - - // create a lookup table that takes into account all - // combinations of aliases: {f: ['foo'], foo: ['f']} - extendAliases(opts.key, aliases, opts.default, flags.arrays) - - // apply default values to all aliases. - Object.keys(defaults).forEach(function (key) { - (flags.aliases[key] || []).forEach(function (alias) { - defaults[alias] = defaults[key] - }) - }) - - let error = null - checkConfiguration() - - let notFlags = [] - - const argv = Object.assign(Object.create(null), { _: [] }) - // TODO(bcoe): for the first pass at removing object prototype we didn't - // remove all prototypes from objects returned by this API, we might want - // to gradually move towards doing so. - const argvReturn = {} - - for (let i = 0; i < args.length; i++) { - const arg = args[i] - let broken - let key - let letters - let m - let next - let value - - // any unknown option (except for end-of-options, "--") - if (arg !== '--' && isUnknownOptionAsArg(arg)) { - argv._.push(arg) - // -- separated by = - } else if (arg.match(/^--.+=/) || ( - !configuration['short-option-groups'] && arg.match(/^-.+=/) - )) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - m = arg.match(/^--?([^=]+)=([\s\S]*)$/) - - // arrays format = '--f=a b c' - if (checkAllAliases(m[1], flags.arrays)) { - i = eatArray(i, m[1], args, m[2]) - } else if (checkAllAliases(m[1], flags.nargs) !== false) { - // nargs format = '--f=monkey washing cat' - i = eatNargs(i, m[1], args, m[2]) - } else { - setArg(m[1], m[2]) - } - } else if (arg.match(negatedBoolean) && configuration['boolean-negation']) { - key = arg.match(negatedBoolean)[1] - setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false) - - // -- separated by space. - } else if (arg.match(/^--.+/) || ( - !configuration['short-option-groups'] && arg.match(/^-[^-]+/) - )) { - key = arg.match(/^--?(.+)/)[1] - - if (checkAllAliases(key, flags.arrays)) { - // array format = '--foo a b c' - i = eatArray(i, key, args) - } else if (checkAllAliases(key, flags.nargs) !== false) { - // nargs format = '--foo a b c' - // should be truthy even if: flags.nargs[key] === 0 - i = eatNargs(i, key, args) - } else { - next = args[i + 1] - - if (next !== undefined && (!next.match(/^-/) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next) - i++ - } else if (/^(true|false)$/.test(next)) { - setArg(key, next) - i++ - } else { - setArg(key, defaultValue(key)) - } - } - - // dot-notation flag separated by '='. - } else if (arg.match(/^-.\..+=/)) { - m = arg.match(/^-([^=]+)=([\s\S]*)$/) - setArg(m[1], m[2]) - - // dot-notation flag separated by space. - } else if (arg.match(/^-.\..+/) && !arg.match(negative)) { - next = args[i + 1] - key = arg.match(/^-(.\..+)/)[1] - - if (next !== undefined && !next.match(/^-/) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next) - i++ - } else { - setArg(key, defaultValue(key)) - } - } else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { - letters = arg.slice(1, -1).split('') - broken = false - - for (let j = 0; j < letters.length; j++) { - next = arg.slice(j + 2) - - if (letters[j + 1] && letters[j + 1] === '=') { - value = arg.slice(j + 3) - key = letters[j] - - if (checkAllAliases(key, flags.arrays)) { - // array format = '-f=a b c' - i = eatArray(i, key, args, value) - } else if (checkAllAliases(key, flags.nargs) !== false) { - // nargs format = '-f=monkey washing cat' - i = eatNargs(i, key, args, value) - } else { - setArg(key, value) - } - - broken = true - break - } - - if (next === '-') { - setArg(letters[j], next) - continue - } - - // current letter is an alphabetic character and next value is a number - if (/[A-Za-z]/.test(letters[j]) && - /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next) - broken = true - break - } - - if (letters[j + 1] && letters[j + 1].match(/\W/)) { - setArg(letters[j], next) - broken = true - break - } else { - setArg(letters[j], defaultValue(letters[j])) - } - } - - key = arg.slice(-1)[0] - - if (!broken && key !== '-') { - if (checkAllAliases(key, flags.arrays)) { - // array format = '-f a b c' - i = eatArray(i, key, args) - } else if (checkAllAliases(key, flags.nargs) !== false) { - // nargs format = '-f a b c' - // should be truthy even if: flags.nargs[key] === 0 - i = eatNargs(i, key, args) - } else { - next = args[i + 1] - - if (next !== undefined && (!/^(-|--)[^-]/.test(next) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next) - i++ - } else if (/^(true|false)$/.test(next)) { - setArg(key, next) - i++ - } else { - setArg(key, defaultValue(key)) - } - } - } - } else if (arg.match(/^-[0-9]$/) && - arg.match(negative) && - checkAllAliases(arg.slice(1), flags.bools)) { - // single-digit boolean alias, e.g: xargs -0 - key = arg.slice(1) - setArg(key, defaultValue(key)) - } else if (arg === '--') { - notFlags = args.slice(i + 1) - break - } else if (configuration['halt-at-non-option']) { - notFlags = args.slice(i) - break - } else { - argv._.push(maybeCoerceNumber('_', arg)) - } - } - - // order of precedence: - // 1. command line arg - // 2. value from env var - // 3. value from config file - // 4. value from config objects - // 5. configured default value - applyEnvVars(argv, true) // special case: check env vars that point to config file - applyEnvVars(argv, false) - setConfig(argv) - setConfigObjects() - applyDefaultsAndAliases(argv, flags.aliases, defaults, true) - applyCoercions(argv) - if (configuration['set-placeholder-key']) setPlaceholderKeys(argv) - - // for any counts either not in args or without an explicit default, set to 0 - Object.keys(flags.counts).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) setArg(key, 0) - }) - - // '--' defaults to undefined. - if (notFlagsOption && notFlags.length) argv[notFlagsArgv] = [] - notFlags.forEach(function (key) { - argv[notFlagsArgv].push(key) - }) - - if (configuration['camel-case-expansion'] && configuration['strip-dashed']) { - Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => { - delete argv[key] - }) - } - - if (configuration['strip-aliased']) { - ;[].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => { - if (configuration['camel-case-expansion']) { - delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')] - } - - delete argv[alias] - }) - } - - // how many arguments should we consume, based - // on the nargs option? - function eatNargs (i, key, args, argAfterEqualSign) { - let ii - let toEat = checkAllAliases(key, flags.nargs) - // NaN has a special meaning for the array type, indicating that one or - // more values are expected. - toEat = isNaN(toEat) ? 1 : toEat - - if (toEat === 0) { - if (!isUndefined(argAfterEqualSign)) { - error = Error(__('Argument unexpected for: %s', key)) - } - setArg(key, defaultValue(key)) - return i - } - - let available = isUndefined(argAfterEqualSign) ? 0 : 1 - if (configuration['nargs-eats-options']) { - // classic behavior, yargs eats positional and dash arguments. - if (args.length - (i + 1) + available < toEat) { - error = Error(__('Not enough arguments following: %s', key)) - } - available = toEat - } else { - // nargs will not consume flag arguments, e.g., -abc, --foo, - // and terminates when one is observed. - for (ii = i + 1; ii < args.length; ii++) { - if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii])) available++ - else break - } - if (available < toEat) error = Error(__('Not enough arguments following: %s', key)) - } - - let consumed = Math.min(available, toEat) - if (!isUndefined(argAfterEqualSign) && consumed > 0) { - setArg(key, argAfterEqualSign) - consumed-- - } - for (ii = i + 1; ii < (consumed + i + 1); ii++) { - setArg(key, args[ii]) - } - - return (i + consumed) - } - - // if an option is an array, eat all non-hyphenated arguments - // following it... YUM! - // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"] - function eatArray (i, key, args, argAfterEqualSign) { - let argsToSet = [] - let next = argAfterEqualSign || args[i + 1] - // If both array and nargs are configured, enforce the nargs count: - const nargsCount = checkAllAliases(key, flags.nargs) - - if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) { - argsToSet.push(true) - } else if (isUndefined(next) || - (isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) { - // for keys without value ==> argsToSet remains an empty [] - // set user default value, if available - if (defaults[key] !== undefined) { - const defVal = defaults[key] - argsToSet = Array.isArray(defVal) ? defVal : [defVal] - } - } else { - // value in --option=value is eaten as is - if (!isUndefined(argAfterEqualSign)) { - argsToSet.push(processValue(key, argAfterEqualSign)) - } - for (let ii = i + 1; ii < args.length; ii++) { - if ((!configuration['greedy-arrays'] && argsToSet.length > 0) || - (nargsCount && argsToSet.length >= nargsCount)) break - next = args[ii] - if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) break - i = ii - argsToSet.push(processValue(key, next)) - } - } - - // If both array and nargs are configured, create an error if less than - // nargs positionals were found. NaN has special meaning, indicating - // that at least one value is required (more are okay). - if ((nargsCount && argsToSet.length < nargsCount) || - (isNaN(nargsCount) && argsToSet.length === 0)) { - error = Error(__('Not enough arguments following: %s', key)) - } - - setArg(key, argsToSet) - return i - } - - function setArg (key, val) { - if (/-/.test(key) && configuration['camel-case-expansion']) { - const alias = key.split('.').map(function (prop) { - return camelCase(prop) - }).join('.') - addNewAlias(key, alias) - } - - const value = processValue(key, val) - const splitKey = key.split('.') - setKey(argv, splitKey, value) - - // handle populating aliases of the full key - if (flags.aliases[key]) { - flags.aliases[key].forEach(function (x) { - x = x.split('.') - setKey(argv, x, value) - }) - } - - // handle populating aliases of the first element of the dot-notation key - if (splitKey.length > 1 && configuration['dot-notation']) { - ;(flags.aliases[splitKey[0]] || []).forEach(function (x) { - x = x.split('.') - - // expand alias with nested objects in key - const a = [].concat(splitKey) - a.shift() // nuke the old key. - x = x.concat(a) - - // populate alias only if is not already an alias of the full key - // (already populated above) - if (!(flags.aliases[key] || []).includes(x.join('.'))) { - setKey(argv, x, value) - } - }) - } - - // Set normalize getter and setter when key is in 'normalize' but isn't an array - if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { - const keys = [key].concat(flags.aliases[key] || []) - keys.forEach(function (key) { - Object.defineProperty(argvReturn, key, { - enumerable: true, - get () { - return val - }, - set (value) { - val = typeof value === 'string' ? path.normalize(value) : value - } - }) - }) - } - } - - function addNewAlias (key, alias) { - if (!(flags.aliases[key] && flags.aliases[key].length)) { - flags.aliases[key] = [alias] - newAliases[alias] = true - } - if (!(flags.aliases[alias] && flags.aliases[alias].length)) { - addNewAlias(alias, key) - } - } - - function processValue (key, val) { - // strings may be quoted, clean this up as we assign values. - if (typeof val === 'string' && - (val[0] === "'" || val[0] === '"') && - val[val.length - 1] === val[0] - ) { - val = val.substring(1, val.length - 1) - } - - // handle parsing boolean arguments --foo=true --bar false. - if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { - if (typeof val === 'string') val = val === 'true' - } - - let value = Array.isArray(val) - ? val.map(function (v) { return maybeCoerceNumber(key, v) }) - : maybeCoerceNumber(key, val) - - // increment a count given as arg (either no value or value parsed as boolean) - if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) { - value = increment - } - - // Set normalized value when key is in 'normalize' and in 'arrays' - if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { - if (Array.isArray(val)) value = val.map(path.normalize) - else value = path.normalize(val) - } - return value - } - - function maybeCoerceNumber (key, value) { - if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) { - const shouldCoerceNumber = isNumber(value) && configuration['parse-numbers'] && ( - Number.isSafeInteger(Math.floor(value)) - ) - if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) value = Number(value) - } - return value - } - - // set args from config.json file, this should be - // applied last so that defaults can be applied. - function setConfig (argv) { - const configLookup = Object.create(null) - - // expand defaults/aliases, in-case any happen to reference - // the config.json file. - applyDefaultsAndAliases(configLookup, flags.aliases, defaults) - - Object.keys(flags.configs).forEach(function (configKey) { - const configPath = argv[configKey] || configLookup[configKey] - if (configPath) { - try { - let config = null - const resolvedConfigPath = path.resolve(process.cwd(), configPath) - - if (typeof flags.configs[configKey] === 'function') { - try { - config = flags.configs[configKey](resolvedConfigPath) - } catch (e) { - config = e - } - if (config instanceof Error) { - error = config - return - } - } else { - config = require(resolvedConfigPath) - } - - setConfigObject(config) - } catch (ex) { - if (argv[configKey]) error = Error(__('Invalid JSON config file: %s', configPath)) - } - } - }) - } - - // set args from config object. - // it recursively checks nested objects. - function setConfigObject (config, prev) { - Object.keys(config).forEach(function (key) { - const value = config[key] - const fullKey = prev ? prev + '.' + key : key - - // if the value is an inner object and we have dot-notation - // enabled, treat inner objects in config the same as - // heavily nested dot notations (foo.bar.apple). - if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) { - // if the value is an object but not an array, check nested object - setConfigObject(value, fullKey) - } else { - // setting arguments via CLI takes precedence over - // values within the config file. - if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) { - setArg(fullKey, value) - } - } - }) - } - - // set all config objects passed in opts - function setConfigObjects () { - if (typeof configObjects === 'undefined') return - configObjects.forEach(function (configObject) { - setConfigObject(configObject) - }) - } - - function applyEnvVars (argv, configOnly) { - if (typeof envPrefix === 'undefined') return - - const prefix = typeof envPrefix === 'string' ? envPrefix : '' - Object.keys(process.env).forEach(function (envVar) { - if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) { - // get array of nested keys and convert them to camel case - const keys = envVar.split('__').map(function (key, i) { - if (i === 0) { - key = key.substring(prefix.length) - } - return camelCase(key) - }) - - if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) { - setArg(keys.join('.'), process.env[envVar]) - } - } - }) - } - - function applyCoercions (argv) { - let coerce - const applied = new Set() - Object.keys(argv).forEach(function (key) { - if (!applied.has(key)) { // If we haven't already coerced this option via one of its aliases - coerce = checkAllAliases(key, flags.coercions) - if (typeof coerce === 'function') { - try { - const value = maybeCoerceNumber(key, coerce(argv[key])) - ;([].concat(flags.aliases[key] || [], key)).forEach(ali => { - applied.add(ali) - argv[ali] = value - }) - } catch (err) { - error = err - } - } - } - }) - } - - function setPlaceholderKeys (argv) { - flags.keys.forEach((key) => { - // don't set placeholder keys for dot notation options 'foo.bar'. - if (~key.indexOf('.')) return - if (typeof argv[key] === 'undefined') argv[key] = undefined - }) - return argv - } - - function applyDefaultsAndAliases (obj, aliases, defaults, canLog = false) { - Object.keys(defaults).forEach(function (key) { - if (!hasKey(obj, key.split('.'))) { - setKey(obj, key.split('.'), defaults[key]) - if (canLog) defaulted[key] = true - - ;(aliases[key] || []).forEach(function (x) { - if (hasKey(obj, x.split('.'))) return - setKey(obj, x.split('.'), defaults[key]) - }) - } - }) - } - - function hasKey (obj, keys) { - let o = obj - - if (!configuration['dot-notation']) keys = [keys.join('.')] - - keys.slice(0, -1).forEach(function (key) { - o = (o[key] || {}) - }) - - const key = keys[keys.length - 1] - - if (typeof o !== 'object') return false - else return key in o - } - - function setKey (obj, keys, value) { - let o = obj - - if (!configuration['dot-notation']) keys = [keys.join('.')] - - keys.slice(0, -1).forEach(function (key, index) { - // TODO(bcoe): in the next major version of yargs, switch to - // Object.create(null) for dot notation: - key = sanitizeKey(key) - - if (typeof o === 'object' && o[key] === undefined) { - o[key] = {} - } - - if (typeof o[key] !== 'object' || Array.isArray(o[key])) { - // ensure that o[key] is an array, and that the last item is an empty object. - if (Array.isArray(o[key])) { - o[key].push({}) - } else { - o[key] = [o[key], {}] - } - - // we want to update the empty object at the end of the o[key] array, so set o to that object - o = o[key][o[key].length - 1] - } else { - o = o[key] - } - }) - - // TODO(bcoe): in the next major version of yargs, switch to - // Object.create(null) for dot notation: - const key = sanitizeKey(keys[keys.length - 1]) - - const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays) - const isValueArray = Array.isArray(value) - let duplicate = configuration['duplicate-arguments-array'] - - // nargs has higher priority than duplicate - if (!duplicate && checkAllAliases(key, flags.nargs)) { - duplicate = true - if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) { - o[key] = undefined - } - } - - if (value === increment) { - o[key] = increment(o[key]) - } else if (Array.isArray(o[key])) { - if (duplicate && isTypeArray && isValueArray) { - o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]) - } else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { - o[key] = value - } else { - o[key] = o[key].concat([value]) - } - } else if (o[key] === undefined && isTypeArray) { - o[key] = isValueArray ? value : [value] - } else if (duplicate && !( - o[key] === undefined || - checkAllAliases(key, flags.counts) || - checkAllAliases(key, flags.bools) - )) { - o[key] = [o[key], value] - } else { - o[key] = value - } - } - - // extend the aliases list with inferred aliases. - function extendAliases (...args) { - args.forEach(function (obj) { - Object.keys(obj || {}).forEach(function (key) { - // short-circuit if we've already added a key - // to the aliases array, for example it might - // exist in both 'opts.default' and 'opts.key'. - if (flags.aliases[key]) return - - flags.aliases[key] = [].concat(aliases[key] || []) - // For "--option-name", also set argv.optionName - flags.aliases[key].concat(key).forEach(function (x) { - if (/-/.test(x) && configuration['camel-case-expansion']) { - const c = camelCase(x) - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c) - newAliases[c] = true - } - } - }) - // For "--optionName", also set argv['option-name'] - flags.aliases[key].concat(key).forEach(function (x) { - if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) { - const c = decamelize(x, '-') - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c) - newAliases[c] = true - } - } - }) - flags.aliases[key].forEach(function (x) { - flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) { - return x !== y - })) - }) - }) - }) - } - - // return the 1st set flag for any of a key's aliases (or false if no flag set) - function checkAllAliases (key, flag) { - const toCheck = [].concat(flags.aliases[key] || [], key) - const keys = Object.keys(flag) - const setAlias = toCheck.find(key => keys.includes(key)) - return setAlias ? flag[setAlias] : false - } - - function hasAnyFlag (key) { - const toCheck = [].concat(Object.keys(flags).map(k => flags[k])) - return toCheck.some(function (flag) { - return Array.isArray(flag) ? flag.includes(key) : flag[key] - }) - } - - function hasFlagsMatching (arg, ...patterns) { - const toCheck = [].concat(...patterns) - return toCheck.some(function (pattern) { - const match = arg.match(pattern) - return match && hasAnyFlag(match[1]) - }) - } - - // based on a simplified version of the short flag group parsing logic - function hasAllShortFlags (arg) { - // if this is a negative number, or doesn't start with a single hyphen, it's not a short flag group - if (arg.match(negative) || !arg.match(/^-[^-]+/)) { return false } - let hasAllFlags = true - let next - const letters = arg.slice(1).split('') - for (let j = 0; j < letters.length; j++) { - next = arg.slice(j + 2) - - if (!hasAnyFlag(letters[j])) { - hasAllFlags = false - break - } - - if ((letters[j + 1] && letters[j + 1] === '=') || - next === '-' || - (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) || - (letters[j + 1] && letters[j + 1].match(/\W/))) { - break - } - } - return hasAllFlags - } - - function isUnknownOptionAsArg (arg) { - return configuration['unknown-options-as-args'] && isUnknownOption(arg) - } - - function isUnknownOption (arg) { - // ignore negative numbers - if (arg.match(negative)) { return false } - // if this is a short option group and all of them are configured, it isn't unknown - if (hasAllShortFlags(arg)) { return false } - // e.g. '--count=2' - const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/ - // e.g. '-a' or '--arg' - const normalFlag = /^-+([^=]+?)$/ - // e.g. '-a-' - const flagEndingInHyphen = /^-+([^=]+?)-$/ - // e.g. '-abc123' - const flagEndingInDigits = /^-+([^=]+?\d+)$/ - // e.g. '-a/usr/local' - const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/ - // check the different types of flag styles, including negatedBoolean, a pattern defined near the start of the parse method - return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters) - } - - // make a best effor to pick a default value - // for an option based on name and type. - function defaultValue (key) { - if (!checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts) && - `${key}` in defaults) { - return defaults[key] - } else { - return defaultForType(guessType(key)) - } - } - - // return a default value, given the type of a flag., - // e.g., key of type 'string' will default to '', rather than 'true'. - function defaultForType (type) { - const def = { - boolean: true, - string: '', - number: undefined, - array: [] - } - - return def[type] - } - - // given a flag, enforce a default type. - function guessType (key) { - let type = 'boolean' - if (checkAllAliases(key, flags.strings)) type = 'string' - else if (checkAllAliases(key, flags.numbers)) type = 'number' - else if (checkAllAliases(key, flags.bools)) type = 'boolean' - else if (checkAllAliases(key, flags.arrays)) type = 'array' - return type - } - - function isNumber (x) { - if (x === null || x === undefined) return false - // if loaded from config, may already be a number. - if (typeof x === 'number') return true - // hexadecimal. - if (/^0x[0-9a-f]+$/i.test(x)) return true - // don't treat 0123 as a number; as it drops the leading '0'. - if (x.length > 1 && x[0] === '0') return false - return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x) - } - - function isUndefined (num) { - return num === undefined - } - - // check user configuration settings for inconsistencies - function checkConfiguration () { - // count keys should not be set as array/narg - Object.keys(flags.counts).find(key => { - if (checkAllAliases(key, flags.arrays)) { - error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key)) - return true - } else if (checkAllAliases(key, flags.nargs)) { - error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key)) - return true - } - }) - } - - return { - argv: Object.assign(argvReturn, argv), - error: error, - aliases: Object.assign({}, flags.aliases), - newAliases: Object.assign({}, newAliases), - defaulted: Object.assign({}, defaulted), - configuration: configuration - } -} - -// if any aliases reference each other, we should -// merge them together. -function combineAliases (aliases) { - const aliasArrays = [] - const combined = Object.create(null) - let change = true - - // turn alias lookup hash {key: ['alias1', 'alias2']} into - // a simple array ['key', 'alias1', 'alias2'] - Object.keys(aliases).forEach(function (key) { - aliasArrays.push( - [].concat(aliases[key], key) - ) - }) - - // combine arrays until zero changes are - // made in an iteration. - while (change) { - change = false - for (let i = 0; i < aliasArrays.length; i++) { - for (let ii = i + 1; ii < aliasArrays.length; ii++) { - const intersect = aliasArrays[i].filter(function (v) { - return aliasArrays[ii].indexOf(v) !== -1 - }) - - if (intersect.length) { - aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]) - aliasArrays.splice(ii, 1) - change = true - break - } - } - } - } - - // map arrays back to the hash-lookup (de-dupe while - // we're at it). - aliasArrays.forEach(function (aliasArray) { - aliasArray = aliasArray.filter(function (v, i, self) { - return self.indexOf(v) === i - }) - combined[aliasArray.pop()] = aliasArray - }) - - return combined -} - -// this function should only be called when a count is given as an arg -// it is NOT called to set a default value -// thus we can start the count at 1 instead of 0 -function increment (orig) { - return orig !== undefined ? orig + 1 : 1 -} - -function Parser (args, opts) { - const result = parse(args.slice(), opts) - return result.argv -} - -// parse arguments and return detailed -// meta information, aliases, etc. -Parser.detailed = function (args, opts) { - return parse(args.slice(), opts) -} - -// TODO(bcoe): in the next major version of yargs, switch to -// Object.create(null) for dot notation: -function sanitizeKey (key) { - if (key === '__proto__') return '___proto___' - return key -} - -module.exports = Parser diff --git a/node_modules/yargs-parser/lib/tokenize-arg-string.js b/node_modules/yargs-parser/lib/tokenize-arg-string.js deleted file mode 100644 index 260c67c1..00000000 --- a/node_modules/yargs-parser/lib/tokenize-arg-string.js +++ /dev/null @@ -1,40 +0,0 @@ -// take an un-split argv string and tokenize it. -module.exports = function (argString) { - if (Array.isArray(argString)) { - return argString.map(e => typeof e !== 'string' ? e + '' : e) - } - - argString = argString.trim() - - let i = 0 - let prevC = null - let c = null - let opening = null - const args = [] - - for (let ii = 0; ii < argString.length; ii++) { - prevC = c - c = argString.charAt(ii) - - // split on spaces unless we're in quotes. - if (c === ' ' && !opening) { - if (!(prevC === ' ')) { - i++ - } - continue - } - - // don't split the string if we're in matching - // opening or closing single and double quotes. - if (c === opening) { - opening = null - } else if ((c === "'" || c === '"') && !opening) { - opening = c - } - - if (!args[i]) args[i] = '' - args[i] += c - } - - return args -} diff --git a/node_modules/yargs-parser/package.json b/node_modules/yargs-parser/package.json deleted file mode 100644 index 32d90e58..00000000 --- a/node_modules/yargs-parser/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_from": "yargs-parser@^18.1.3", - "_id": "yargs-parser@18.1.3", - "_inBundle": false, - "_integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "_location": "/yargs-parser", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "yargs-parser@^18.1.3", - "name": "yargs-parser", - "escapedName": "yargs-parser", - "rawSpec": "^18.1.3", - "saveSpec": null, - "fetchSpec": "^18.1.3" - }, - "_requiredBy": [ - "/convict" - ], - "_resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "_shasum": "be68c4975c6b2abf469236b0c870362fab09a7b0", - "_spec": "yargs-parser@^18.1.3", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/convict", - "author": { - "name": "Ben Coe", - "email": "ben@npmjs.com" - }, - "bugs": { - "url": "https://github.com/yargs/yargs-parser/issues" - }, - "bundleDependencies": false, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "deprecated": false, - "description": "the mighty option parser used by yargs", - "devDependencies": { - "c8": "^7.0.1", - "chai": "^4.2.0", - "mocha": "^7.0.0", - "standard": "^14.3.1" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "lib", - "index.js" - ], - "homepage": "https://github.com/yargs/yargs-parser#readme", - "keywords": [ - "argument", - "parser", - "yargs", - "command", - "cli", - "parsing", - "option", - "args", - "argument" - ], - "license": "ISC", - "main": "index.js", - "name": "yargs-parser", - "repository": { - "type": "git", - "url": "git+https://github.com/yargs/yargs-parser.git" - }, - "scripts": { - "coverage": "c8 report --check-coverage check-coverage --lines=100 --branches=97 --statements=100", - "fix": "standard --fix", - "posttest": "standard", - "test": "c8 --reporter=text --reporter=html mocha test/*.js" - }, - "version": "18.1.3" -} diff --git a/node_modules/yauzl/LICENSE b/node_modules/yauzl/LICENSE deleted file mode 100644 index 37538d4d..00000000 --- a/node_modules/yauzl/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Josh Wolfe - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/yauzl/README.md b/node_modules/yauzl/README.md deleted file mode 100644 index d4e53f4c..00000000 --- a/node_modules/yauzl/README.md +++ /dev/null @@ -1,658 +0,0 @@ -# yauzl - -[![Build Status](https://travis-ci.org/thejoshwolfe/yauzl.svg?branch=master)](https://travis-ci.org/thejoshwolfe/yauzl) -[![Coverage Status](https://img.shields.io/coveralls/thejoshwolfe/yauzl.svg)](https://coveralls.io/r/thejoshwolfe/yauzl) - -yet another unzip library for node. For zipping, see -[yazl](https://github.com/thejoshwolfe/yazl). - -Design principles: - - * Follow the spec. - Don't scan for local file headers. - Read the central directory for file metadata. - (see [No Streaming Unzip API](#no-streaming-unzip-api)). - * Don't block the JavaScript thread. - Use and provide async APIs. - * Keep memory usage under control. - Don't attempt to buffer entire files in RAM at once. - * Never crash (if used properly). - Don't let malformed zip files bring down client applications who are trying to catch errors. - * Catch unsafe file names. - See `validateFileName()`. - -## Usage - -```js -var yauzl = require("yauzl"); - -yauzl.open("path/to/file.zip", {lazyEntries: true}, function(err, zipfile) { - if (err) throw err; - zipfile.readEntry(); - zipfile.on("entry", function(entry) { - if (/\/$/.test(entry.fileName)) { - // Directory file names end with '/'. - // Note that entires for directories themselves are optional. - // An entry's fileName implicitly requires its parent directories to exist. - zipfile.readEntry(); - } else { - // file entry - zipfile.openReadStream(entry, function(err, readStream) { - if (err) throw err; - readStream.on("end", function() { - zipfile.readEntry(); - }); - readStream.pipe(somewhere); - }); - } - }); -}); -``` - -See also `examples/` for more usage examples. - -## API - -The default for every optional `callback` parameter is: - -```js -function defaultCallback(err) { - if (err) throw err; -} -``` - -### open(path, [options], [callback]) - -Calls `fs.open(path, "r")` and reads the `fd` effectively the same as `fromFd()` would. - -`options` may be omitted or `null`. The defaults are `{autoClose: true, lazyEntries: false, decodeStrings: true, validateEntrySizes: true, strictFileNames: false}`. - -`autoClose` is effectively equivalent to: - -```js -zipfile.once("end", function() { - zipfile.close(); -}); -``` - -`lazyEntries` indicates that entries should be read only when `readEntry()` is called. -If `lazyEntries` is `false`, `entry` events will be emitted as fast as possible to allow `pipe()`ing -file data from all entries in parallel. -This is not recommended, as it can lead to out of control memory usage for zip files with many entries. -See [issue #22](https://github.com/thejoshwolfe/yauzl/issues/22). -If `lazyEntries` is `true`, an `entry` or `end` event will be emitted in response to each call to `readEntry()`. -This allows processing of one entry at a time, and will keep memory usage under control for zip files with many entries. - -`decodeStrings` is the default and causes yauzl to decode strings with `CP437` or `UTF-8` as required by the spec. -The exact effects of turning this option off are: - -* `zipfile.comment`, `entry.fileName`, and `entry.fileComment` will be `Buffer` objects instead of `String`s. -* Any Info-ZIP Unicode Path Extra Field will be ignored. See `extraFields`. -* Automatic file name validation will not be performed. See `validateFileName()`. - -`validateEntrySizes` is the default and ensures that an entry's reported uncompressed size matches its actual uncompressed size. -This check happens as early as possible, which is either before emitting each `"entry"` event (for entries with no compression), -or during the `readStream` piping after calling `openReadStream()`. -See `openReadStream()` for more information on defending against zip bomb attacks. - -When `strictFileNames` is `false` (the default) and `decodeStrings` is `true`, -all backslash (`\`) characters in each `entry.fileName` are replaced with forward slashes (`/`). -The spec forbids file names with backslashes, -but Microsoft's `System.IO.Compression.ZipFile` class in .NET versions 4.5.0 until 4.6.1 -creates non-conformant zipfiles with backslashes in file names. -`strictFileNames` is `false` by default so that clients can read these -non-conformant zipfiles without knowing about this Microsoft-specific bug. -When `strictFileNames` is `true` and `decodeStrings` is `true`, -entries with backslashes in their file names will result in an error. See `validateFileName()`. -When `decodeStrings` is `false`, `strictFileNames` has no effect. - -The `callback` is given the arguments `(err, zipfile)`. -An `err` is provided if the End of Central Directory Record cannot be found, or if its metadata appears malformed. -This kind of error usually indicates that this is not a zip file. -Otherwise, `zipfile` is an instance of `ZipFile`. - -### fromFd(fd, [options], [callback]) - -Reads from the fd, which is presumed to be an open .zip file. -Note that random access is required by the zip file specification, -so the fd cannot be an open socket or any other fd that does not support random access. - -`options` may be omitted or `null`. The defaults are `{autoClose: false, lazyEntries: false, decodeStrings: true, validateEntrySizes: true, strictFileNames: false}`. - -See `open()` for the meaning of the options and callback. - -### fromBuffer(buffer, [options], [callback]) - -Like `fromFd()`, but reads from a RAM buffer instead of an open file. -`buffer` is a `Buffer`. - -If a `ZipFile` is acquired from this method, -it will never emit the `close` event, -and calling `close()` is not necessary. - -`options` may be omitted or `null`. The defaults are `{lazyEntries: false, decodeStrings: true, validateEntrySizes: true, strictFileNames: false}`. - -See `open()` for the meaning of the options and callback. -The `autoClose` option is ignored for this method. - -### fromRandomAccessReader(reader, totalSize, [options], [callback]) - -This method of reading a zip file allows clients to implement their own back-end file system. -For example, a client might translate read calls into network requests. - -The `reader` parameter must be of a type that is a subclass of -[RandomAccessReader](#class-randomaccessreader) that implements the required methods. -The `totalSize` is a Number and indicates the total file size of the zip file. - -`options` may be omitted or `null`. The defaults are `{autoClose: true, lazyEntries: false, decodeStrings: true, validateEntrySizes: true, strictFileNames: false}`. - -See `open()` for the meaning of the options and callback. - -### dosDateTimeToDate(date, time) - -Converts MS-DOS `date` and `time` data into a JavaScript `Date` object. -Each parameter is a `Number` treated as an unsigned 16-bit integer. -Note that this format does not support timezones, -so the returned object will use the local timezone. - -### validateFileName(fileName) - -Returns `null` or a `String` error message depending on the validity of `fileName`. -If `fileName` starts with `"/"` or `/[A-Za-z]:\//` or if it contains `".."` path segments or `"\\"`, -this function returns an error message appropriate for use like this: - -```js -var errorMessage = yauzl.validateFileName(fileName); -if (errorMessage != null) throw new Error(errorMessage); -``` - -This function is automatically run for each entry, as long as `decodeStrings` is `true`. -See `open()`, `strictFileNames`, and `Event: "entry"` for more information. - -### Class: ZipFile - -The constructor for the class is not part of the public API. -Use `open()`, `fromFd()`, `fromBuffer()`, or `fromRandomAccessReader()` instead. - -#### Event: "entry" - -Callback gets `(entry)`, which is an `Entry`. -See `open()` and `readEntry()` for when this event is emitted. - -If `decodeStrings` is `true`, entries emitted via this event have already passed file name validation. -See `validateFileName()` and `open()` for more information. - -If `validateEntrySizes` is `true` and this entry's `compressionMethod` is `0` (stored without compression), -this entry has already passed entry size validation. -See `open()` for more information. - -#### Event: "end" - -Emitted after the last `entry` event has been emitted. -See `open()` and `readEntry()` for more info on when this event is emitted. - -#### Event: "close" - -Emitted after the fd is actually closed. -This is after calling `close()` (or after the `end` event when `autoClose` is `true`), -and after all stream pipelines created from `openReadStream()` have finished reading data from the fd. - -If this `ZipFile` was acquired from `fromRandomAccessReader()`, -the "fd" in the previous paragraph refers to the `RandomAccessReader` implemented by the client. - -If this `ZipFile` was acquired from `fromBuffer()`, this event is never emitted. - -#### Event: "error" - -Emitted in the case of errors with reading the zip file. -(Note that other errors can be emitted from the streams created from `openReadStream()` as well.) -After this event has been emitted, no further `entry`, `end`, or `error` events will be emitted, -but the `close` event may still be emitted. - -#### readEntry() - -Causes this `ZipFile` to emit an `entry` or `end` event (or an `error` event). -This method must only be called when this `ZipFile` was created with the `lazyEntries` option set to `true` (see `open()`). -When this `ZipFile` was created with the `lazyEntries` option set to `true`, -`entry` and `end` events are only ever emitted in response to this method call. - -The event that is emitted in response to this method will not be emitted until after this method has returned, -so it is safe to call this method before attaching event listeners. - -After calling this method, calling this method again before the response event has been emitted will cause undefined behavior. -Calling this method after the `end` event has been emitted will cause undefined behavior. -Calling this method after calling `close()` will cause undefined behavior. - -#### openReadStream(entry, [options], callback) - -`entry` must be an `Entry` object from this `ZipFile`. -`callback` gets `(err, readStream)`, where `readStream` is a `Readable Stream` that provides the file data for this entry. -If this zipfile is already closed (see `close()`), the `callback` will receive an `err`. - -`options` may be omitted or `null`, and has the following defaults: - -```js -{ - decompress: entry.isCompressed() ? true : null, - decrypt: null, - start: 0, // actually the default is null, see below - end: entry.compressedSize, // actually the default is null, see below -} -``` - -If the entry is compressed (with a supported compression method), -and the `decompress` option is `true` (or omitted), -the read stream provides the decompressed data. -Omitting the `decompress` option is what most clients should do. - -The `decompress` option must be `null` (or omitted) when the entry is not compressed (see `isCompressed()`), -and either `true` (or omitted) or `false` when the entry is compressed. -Specifying `decompress: false` for a compressed entry causes the read stream -to provide the raw compressed file data without going through a zlib inflate transform. - -If the entry is encrypted (see `isEncrypted()`), clients may want to avoid calling `openReadStream()` on the entry entirely. -Alternatively, clients may call `openReadStream()` for encrypted entries and specify `decrypt: false`. -If the entry is also compressed, clients must *also* specify `decompress: false`. -Specifying `decrypt: false` for an encrypted entry causes the read stream to provide the raw, still-encrypted file data. -(This data includes the 12-byte header described in the spec.) - -The `decrypt` option must be `null` (or omitted) for non-encrypted entries, and `false` for encrypted entries. -Omitting the `decrypt` option (or specifying it as `null`) for an encrypted entry -will result in the `callback` receiving an `err`. -This default behavior is so that clients not accounting for encrypted files aren't surprised by bogus file data. - -The `start` (inclusive) and `end` (exclusive) options are byte offsets into this entry's file data, -and can be used to obtain part of an entry's file data rather than the whole thing. -If either of these options are specified and non-`null`, -then the above options must be used to obain the file's raw data. -Speficying `{start: 0, end: entry.compressedSize}` will result in the complete file, -which is effectively the default values for these options, -but note that unlike omitting the options, when you specify `start` or `end` as any non-`null` value, -the above requirement is still enforced that you must also pass the appropriate options to get the file's raw data. - -It's possible for the `readStream` provided to the `callback` to emit errors for several reasons. -For example, if zlib cannot decompress the data, the zlib error will be emitted from the `readStream`. -Two more error cases (when `validateEntrySizes` is `true`) are if the decompressed data has too many -or too few actual bytes compared to the reported byte count from the entry's `uncompressedSize` field. -yauzl notices this false information and emits an error from the `readStream` -after some number of bytes have already been piped through the stream. - -This check allows clients to trust the `uncompressedSize` field in `Entry` objects. -Guarding against [zip bomb](http://en.wikipedia.org/wiki/Zip_bomb) attacks can be accomplished by -doing some heuristic checks on the size metadata and then watching out for the above errors. -Such heuristics are outside the scope of this library, -but enforcing the `uncompressedSize` is implemented here as a security feature. - -It is possible to destroy the `readStream` before it has piped all of its data. -To do this, call `readStream.destroy()`. -You must `unpipe()` the `readStream` from any destination before calling `readStream.destroy()`. -If this zipfile was created using `fromRandomAccessReader()`, the `RandomAccessReader` implementation -must provide readable streams that implement a `.destroy()` method (see `randomAccessReader._readStreamForRange()`) -in order for calls to `readStream.destroy()` to work in this context. - -#### close() - -Causes all future calls to `openReadStream()` to fail, -and closes the fd, if any, after all streams created by `openReadStream()` have emitted their `end` events. - -If the `autoClose` option is set to `true` (see `open()`), -this function will be called automatically effectively in response to this object's `end` event. - -If the `lazyEntries` option is set to `false` (see `open()`) and this object's `end` event has not been emitted yet, -this function causes undefined behavior. -If the `lazyEntries` option is set to `true`, -you can call this function instead of calling `readEntry()` to abort reading the entries of a zipfile. - -It is safe to call this function multiple times; after the first call, successive calls have no effect. -This includes situations where the `autoClose` option effectively calls this function for you. - -If `close()` is never called, then the zipfile is "kept open". -For zipfiles created with `fromFd()`, this will leave the `fd` open, which may be desirable. -For zipfiles created with `open()`, this will leave the underlying `fd` open, thereby "leaking" it, which is probably undesirable. -For zipfiles created with `fromRandomAccessReader()`, the reader's `close()` method will never be called. -For zipfiles created with `fromBuffer()`, the `close()` function has no effect whether called or not. - -Regardless of how this `ZipFile` was created, there are no resources other than those listed above that require cleanup from this function. -This means it may be desirable to never call `close()` in some usecases. - -#### isOpen - -`Boolean`. `true` until `close()` is called; then it's `false`. - -#### entryCount - -`Number`. Total number of central directory records. - -#### comment - -`String`. Always decoded with `CP437` per the spec. - -If `decodeStrings` is `false` (see `open()`), this field is the undecoded `Buffer` instead of a decoded `String`. - -### Class: Entry - -Objects of this class represent Central Directory Records. -Refer to the zipfile specification for more details about these fields. - -These fields are of type `Number`: - - * `versionMadeBy` - * `versionNeededToExtract` - * `generalPurposeBitFlag` - * `compressionMethod` - * `lastModFileTime` (MS-DOS format, see `getLastModDateTime`) - * `lastModFileDate` (MS-DOS format, see `getLastModDateTime`) - * `crc32` - * `compressedSize` - * `uncompressedSize` - * `fileNameLength` (bytes) - * `extraFieldLength` (bytes) - * `fileCommentLength` (bytes) - * `internalFileAttributes` - * `externalFileAttributes` - * `relativeOffsetOfLocalHeader` - -#### fileName - -`String`. -Following the spec, the bytes for the file name are decoded with -`UTF-8` if `generalPurposeBitFlag & 0x800`, otherwise with `CP437`. -Alternatively, this field may be populated from the Info-ZIP Unicode Path Extra Field -(see `extraFields`). - -This field is automatically validated by `validateFileName()` before yauzl emits an "entry" event. -If this field would contain unsafe characters, yauzl emits an error instead of an entry. - -If `decodeStrings` is `false` (see `open()`), this field is the undecoded `Buffer` instead of a decoded `String`. -Therefore, `generalPurposeBitFlag` and any Info-ZIP Unicode Path Extra Field are ignored. -Furthermore, no automatic file name validation is performed for this file name. - -#### extraFields - -`Array` with each entry in the form `{id: id, data: data}`, -where `id` is a `Number` and `data` is a `Buffer`. - -This library looks for and reads the ZIP64 Extended Information Extra Field (0x0001) -in order to support ZIP64 format zip files. - -This library also looks for and reads the Info-ZIP Unicode Path Extra Field (0x7075) -in order to support some zipfiles that use it instead of General Purpose Bit 11 -to convey `UTF-8` file names. -When the field is identified and verified to be reliable (see the zipfile spec), -the the file name in this field is stored in the `fileName` property, -and the file name in the central directory record for this entry is ignored. -Note that when `decodeStrings` is false, all Info-ZIP Unicode Path Extra Fields are ignored. - -None of the other fields are considered significant by this library. -Fields that this library reads are left unalterned in the `extraFields` array. - -#### fileComment - -`String` decoded with the charset indicated by `generalPurposeBitFlag & 0x800` as with the `fileName`. -(The Info-ZIP Unicode Path Extra Field has no effect on the charset used for this field.) - -If `decodeStrings` is `false` (see `open()`), this field is the undecoded `Buffer` instead of a decoded `String`. - -Prior to yauzl version 2.7.0, this field was erroneously documented as `comment` instead of `fileComment`. -For compatibility with any code that uses the field name `comment`, -yauzl creates an alias field named `comment` which is identical to `fileComment`. - -#### getLastModDate() - -Effectively implemented as: - -```js -return dosDateTimeToDate(this.lastModFileDate, this.lastModFileTime); -``` - -#### isEncrypted() - -Returns is this entry encrypted with "Traditional Encryption". -Effectively implemented as: - -```js -return (this.generalPurposeBitFlag & 0x1) !== 0; -``` - -See `openReadStream()` for the implications of this value. - -Note that "Strong Encryption" is not supported, and will result in an `"error"` event emitted from the `ZipFile`. - -#### isCompressed() - -Effectively implemented as: - -```js -return this.compressionMethod === 8; -``` - -See `openReadStream()` for the implications of this value. - -### Class: RandomAccessReader - -This class is meant to be subclassed by clients and instantiated for the `fromRandomAccessReader()` function. - -An example implementation can be found in `test/test.js`. - -#### randomAccessReader._readStreamForRange(start, end) - -Subclasses *must* implement this method. - -`start` and `end` are Numbers and indicate byte offsets from the start of the file. -`end` is exclusive, so `_readStreamForRange(0x1000, 0x2000)` would indicate to read `0x1000` bytes. -`end - start` will always be at least `1`. - -This method should return a readable stream which will be `pipe()`ed into another stream. -It is expected that the readable stream will provide data in several chunks if necessary. -If the readable stream provides too many or too few bytes, an error will be emitted. -(Note that `validateEntrySizes` has no effect on this check, -because this is a low-level API that should behave correctly regardless of the contents of the file.) -Any errors emitted on the readable stream will be handled and re-emitted on the client-visible stream -(returned from `zipfile.openReadStream()`) or provided as the `err` argument to the appropriate callback -(for example, for `fromRandomAccessReader()`). - -The returned stream *must* implement a method `.destroy()` -if you call `readStream.destroy()` on streams you get from `openReadStream()`. -If you never call `readStream.destroy()`, then streams returned from this method do not need to implement a method `.destroy()`. -`.destroy()` should abort any streaming that is in progress and clean up any associated resources. -`.destroy()` will only be called after the stream has been `unpipe()`d from its destination. - -Note that the stream returned from this method might not be the same object that is provided by `openReadStream()`. -The stream returned from this method might be `pipe()`d through one or more filter streams (for example, a zlib inflate stream). - -#### randomAccessReader.read(buffer, offset, length, position, callback) - -Subclasses may implement this method. -The default implementation uses `createReadStream()` to fill the `buffer`. - -This method should behave like `fs.read()`. - -#### randomAccessReader.close(callback) - -Subclasses may implement this method. -The default implementation is effectively `setImmediate(callback);`. - -`callback` takes parameters `(err)`. - -This method is called once the all streams returned from `_readStreamForRange()` have ended, -and no more `_readStreamForRange()` or `read()` requests will be issued to this object. - -## How to Avoid Crashing - -When a malformed zipfile is encountered, the default behavior is to crash (throw an exception). -If you want to handle errors more gracefully than this, -be sure to do the following: - - * Provide `callback` parameters where they are allowed, and check the `err` parameter. - * Attach a listener for the `error` event on any `ZipFile` object you get from `open()`, `fromFd()`, `fromBuffer()`, or `fromRandomAccessReader()`. - * Attach a listener for the `error` event on any stream you get from `openReadStream()`. - -Minor version updates to yauzl will not add any additional requirements to this list. - -## Limitations - -### No Streaming Unzip API - -Due to the design of the .zip file format, it's impossible to interpret a .zip file from start to finish -(such as from a readable stream) without sacrificing correctness. -The Central Directory, which is the authority on the contents of the .zip file, is at the end of a .zip file, not the beginning. -A streaming API would need to either buffer the entire .zip file to get to the Central Directory before interpreting anything -(defeating the purpose of a streaming interface), or rely on the Local File Headers which are interspersed through the .zip file. -However, the Local File Headers are explicitly denounced in the spec as being unreliable copies of the Central Directory, -so trusting them would be a violation of the spec. - -Any library that offers a streaming unzip API must make one of the above two compromises, -which makes the library either dishonest or nonconformant (usually the latter). -This library insists on correctness and adherence to the spec, and so does not offer a streaming API. - -Here is a way to create a spec-conformant .zip file using the `zip` command line program (Info-ZIP) -available in most unix-like environments, that is (nearly) impossible to parse correctly with a streaming parser: - -``` -$ echo -ne '\x50\x4b\x07\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' > file.txt -$ zip -q0 - file.txt | cat > out.zip -``` - -This .zip file contains a single file entry that uses General Purpose Bit 3, -which means the Local File Header doesn't know the size of the file. -Any streaming parser that encounters this situation will either immediately fail, -or attempt to search for the Data Descriptor after the file's contents. -The file's contents is a sequence of 16-bytes crafted to exactly mimic a valid Data Descriptor for an empty file, -which will fool any parser that gets this far into thinking that the file is empty rather than containing 16-bytes. -What follows the file's real contents is the file's real Data Descriptor, -which will likely cause some kind of signature mismatch error for a streaming parser (if one hasn't occurred already). - -By using General Purpose Bit 3 (and compression method 0), -it's possible to create arbitrarily ambiguous .zip files that -distract parsers with file contents that contain apparently valid .zip file metadata. - -### Limitted ZIP64 Support - -For ZIP64, only zip files smaller than `8PiB` are supported, -not the full `16EiB` range that a 64-bit integer should be able to index. -This is due to the JavaScript Number type being an IEEE 754 double precision float. - -The Node.js `fs` module probably has this same limitation. - -### ZIP64 Extensible Data Sector Is Ignored - -The spec does not allow zip file creators to put arbitrary data here, -but rather reserves its use for PKWARE and mentions something about Z390. -This doesn't seem useful to expose in this library, so it is ignored. - -### No Multi-Disk Archive Support - -This library does not support multi-disk zip files. -The multi-disk fields in the zipfile spec were intended for a zip file to span multiple floppy disks, -which probably never happens now. -If the "number of this disk" field in the End of Central Directory Record is not `0`, -the `open()`, `fromFd()`, `fromBuffer()`, or `fromRandomAccessReader()` `callback` will receive an `err`. -By extension the following zip file fields are ignored by this library and not provided to clients: - - * Disk where central directory starts - * Number of central directory records on this disk - * Disk number where file starts - -### Limited Encryption Handling - -You can detect when a file entry is encrypted with "Traditional Encryption" via `isEncrypted()`, -but yauzl will not help you decrypt it. -See `openReadStream()`. - -If a zip file contains file entries encrypted with "Strong Encryption", yauzl emits an error. - -If the central directory is encrypted or compressed, yauzl emits an error. - -### Local File Headers Are Ignored - -Many unzip libraries mistakenly read the Local File Header data in zip files. -This data is officially defined to be redundant with the Central Directory information, -and is not to be trusted. -Aside from checking the signature, yauzl ignores the content of the Local File Header. - -### No CRC-32 Checking - -This library provides the `crc32` field of `Entry` objects read from the Central Directory. -However, this field is not used for anything in this library. - -### versionNeededToExtract Is Ignored - -The field `versionNeededToExtract` is ignored, -because this library doesn't support the complete zip file spec at any version, - -### No Support For Obscure Compression Methods - -Regarding the `compressionMethod` field of `Entry` objects, -only method `0` (stored with no compression) -and method `8` (deflated) are supported. -Any of the other 15 official methods will cause the `openReadStream()` `callback` to receive an `err`. - -### Data Descriptors Are Ignored - -There may or may not be Data Descriptor sections in a zip file. -This library provides no support for finding or interpreting them. - -### Archive Extra Data Record Is Ignored - -There may or may not be an Archive Extra Data Record section in a zip file. -This library provides no support for finding or interpreting it. - -### No Language Encoding Flag Support - -Zip files officially support charset encodings other than CP437 and UTF-8, -but the zip file spec does not specify how it works. -This library makes no attempt to interpret the Language Encoding Flag. - -## Change History - - * 2.10.0 - * Added support for non-conformant zipfiles created by Microsoft, and added option `strictFileNames` to disable the workaround. [issue #66](https://github.com/thejoshwolfe/yauzl/issues/66), [issue #88](https://github.com/thejoshwolfe/yauzl/issues/88) - * 2.9.2 - * Removed `tools/hexdump-zip.js` and `tools/hex2bin.js`. Those tools are now located here: [thejoshwolfe/hexdump-zip](https://github.com/thejoshwolfe/hexdump-zip) and [thejoshwolfe/hex2bin](https://github.com/thejoshwolfe/hex2bin) - * Worked around performance problem with zlib when using `fromBuffer()` and `readStream.destroy()` for large compressed files. [issue #87](https://github.com/thejoshwolfe/yauzl/issues/87) - * 2.9.1 - * Removed `console.log()` accidentally introduced in 2.9.0. [issue #64](https://github.com/thejoshwolfe/yauzl/issues/64) - * 2.9.0 - * Throw an exception if `readEntry()` is called without `lazyEntries:true`. Previously this caused undefined behavior. [issue #63](https://github.com/thejoshwolfe/yauzl/issues/63) - * 2.8.0 - * Added option `validateEntrySizes`. [issue #53](https://github.com/thejoshwolfe/yauzl/issues/53) - * Added `examples/promises.js` - * Added ability to read raw file data via `decompress` and `decrypt` options. [issue #11](https://github.com/thejoshwolfe/yauzl/issues/11), [issue #38](https://github.com/thejoshwolfe/yauzl/issues/38), [pull #39](https://github.com/thejoshwolfe/yauzl/pull/39) - * Added `start` and `end` options to `openReadStream()`. [issue #38](https://github.com/thejoshwolfe/yauzl/issues/38) - * 2.7.0 - * Added option `decodeStrings`. [issue #42](https://github.com/thejoshwolfe/yauzl/issues/42) - * Fixed documentation for `entry.fileComment` and added compatibility alias. [issue #47](https://github.com/thejoshwolfe/yauzl/issues/47) - * 2.6.0 - * Support Info-ZIP Unicode Path Extra Field, used by WinRAR for Chinese file names. [issue #33](https://github.com/thejoshwolfe/yauzl/issues/33) - * 2.5.0 - * Ignore malformed Extra Field that is common in Android .apk files. [issue #31](https://github.com/thejoshwolfe/yauzl/issues/31) - * 2.4.3 - * Fix crash when parsing malformed Extra Field buffers. [issue #31](https://github.com/thejoshwolfe/yauzl/issues/31) - * 2.4.2 - * Remove .npmignore and .travis.yml from npm package. - * 2.4.1 - * Fix error handling. - * 2.4.0 - * Add ZIP64 support. [issue #6](https://github.com/thejoshwolfe/yauzl/issues/6) - * Add `lazyEntries` option. [issue #22](https://github.com/thejoshwolfe/yauzl/issues/22) - * Add `readStream.destroy()` method. [issue #26](https://github.com/thejoshwolfe/yauzl/issues/26) - * Add `fromRandomAccessReader()`. [issue #14](https://github.com/thejoshwolfe/yauzl/issues/14) - * Add `examples/unzip.js`. - * 2.3.1 - * Documentation updates. - * 2.3.0 - * Check that `uncompressedSize` is correct, or else emit an error. [issue #13](https://github.com/thejoshwolfe/yauzl/issues/13) - * 2.2.1 - * Update dependencies. - * 2.2.0 - * Update dependencies. - * 2.1.0 - * Remove dependency on `iconv`. - * 2.0.3 - * Fix crash when trying to read a 0-byte file. - * 2.0.2 - * Fix event behavior after errors. - * 2.0.1 - * Fix bug with using `iconv`. - * 2.0.0 - * Initial release. diff --git a/node_modules/yauzl/index.js b/node_modules/yauzl/index.js deleted file mode 100644 index cf5d70df..00000000 --- a/node_modules/yauzl/index.js +++ /dev/null @@ -1,796 +0,0 @@ -var fs = require("fs"); -var zlib = require("zlib"); -var fd_slicer = require("fd-slicer"); -var crc32 = require("buffer-crc32"); -var util = require("util"); -var EventEmitter = require("events").EventEmitter; -var Transform = require("stream").Transform; -var PassThrough = require("stream").PassThrough; -var Writable = require("stream").Writable; - -exports.open = open; -exports.fromFd = fromFd; -exports.fromBuffer = fromBuffer; -exports.fromRandomAccessReader = fromRandomAccessReader; -exports.dosDateTimeToDate = dosDateTimeToDate; -exports.validateFileName = validateFileName; -exports.ZipFile = ZipFile; -exports.Entry = Entry; -exports.RandomAccessReader = RandomAccessReader; - -function open(path, options, callback) { - if (typeof options === "function") { - callback = options; - options = null; - } - if (options == null) options = {}; - if (options.autoClose == null) options.autoClose = true; - if (options.lazyEntries == null) options.lazyEntries = false; - if (options.decodeStrings == null) options.decodeStrings = true; - if (options.validateEntrySizes == null) options.validateEntrySizes = true; - if (options.strictFileNames == null) options.strictFileNames = false; - if (callback == null) callback = defaultCallback; - fs.open(path, "r", function(err, fd) { - if (err) return callback(err); - fromFd(fd, options, function(err, zipfile) { - if (err) fs.close(fd, defaultCallback); - callback(err, zipfile); - }); - }); -} - -function fromFd(fd, options, callback) { - if (typeof options === "function") { - callback = options; - options = null; - } - if (options == null) options = {}; - if (options.autoClose == null) options.autoClose = false; - if (options.lazyEntries == null) options.lazyEntries = false; - if (options.decodeStrings == null) options.decodeStrings = true; - if (options.validateEntrySizes == null) options.validateEntrySizes = true; - if (options.strictFileNames == null) options.strictFileNames = false; - if (callback == null) callback = defaultCallback; - fs.fstat(fd, function(err, stats) { - if (err) return callback(err); - var reader = fd_slicer.createFromFd(fd, {autoClose: true}); - fromRandomAccessReader(reader, stats.size, options, callback); - }); -} - -function fromBuffer(buffer, options, callback) { - if (typeof options === "function") { - callback = options; - options = null; - } - if (options == null) options = {}; - options.autoClose = false; - if (options.lazyEntries == null) options.lazyEntries = false; - if (options.decodeStrings == null) options.decodeStrings = true; - if (options.validateEntrySizes == null) options.validateEntrySizes = true; - if (options.strictFileNames == null) options.strictFileNames = false; - // limit the max chunk size. see https://github.com/thejoshwolfe/yauzl/issues/87 - var reader = fd_slicer.createFromBuffer(buffer, {maxChunkSize: 0x10000}); - fromRandomAccessReader(reader, buffer.length, options, callback); -} - -function fromRandomAccessReader(reader, totalSize, options, callback) { - if (typeof options === "function") { - callback = options; - options = null; - } - if (options == null) options = {}; - if (options.autoClose == null) options.autoClose = true; - if (options.lazyEntries == null) options.lazyEntries = false; - if (options.decodeStrings == null) options.decodeStrings = true; - var decodeStrings = !!options.decodeStrings; - if (options.validateEntrySizes == null) options.validateEntrySizes = true; - if (options.strictFileNames == null) options.strictFileNames = false; - if (callback == null) callback = defaultCallback; - if (typeof totalSize !== "number") throw new Error("expected totalSize parameter to be a number"); - if (totalSize > Number.MAX_SAFE_INTEGER) { - throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double."); - } - - // the matching unref() call is in zipfile.close() - reader.ref(); - - // eocdr means End of Central Directory Record. - // search backwards for the eocdr signature. - // the last field of the eocdr is a variable-length comment. - // the comment size is encoded in a 2-byte field in the eocdr, which we can't find without trudging backwards through the comment to find it. - // as a consequence of this design decision, it's possible to have ambiguous zip file metadata if a coherent eocdr was in the comment. - // we search backwards for a eocdr signature, and hope that whoever made the zip file was smart enough to forbid the eocdr signature in the comment. - var eocdrWithoutCommentSize = 22; - var maxCommentSize = 0xffff; // 2-byte size - var bufferSize = Math.min(eocdrWithoutCommentSize + maxCommentSize, totalSize); - var buffer = newBuffer(bufferSize); - var bufferReadStart = totalSize - buffer.length; - readAndAssertNoEof(reader, buffer, 0, bufferSize, bufferReadStart, function(err) { - if (err) return callback(err); - for (var i = bufferSize - eocdrWithoutCommentSize; i >= 0; i -= 1) { - if (buffer.readUInt32LE(i) !== 0x06054b50) continue; - // found eocdr - var eocdrBuffer = buffer.slice(i); - - // 0 - End of central directory signature = 0x06054b50 - // 4 - Number of this disk - var diskNumber = eocdrBuffer.readUInt16LE(4); - if (diskNumber !== 0) { - return callback(new Error("multi-disk zip files are not supported: found disk number: " + diskNumber)); - } - // 6 - Disk where central directory starts - // 8 - Number of central directory records on this disk - // 10 - Total number of central directory records - var entryCount = eocdrBuffer.readUInt16LE(10); - // 12 - Size of central directory (bytes) - // 16 - Offset of start of central directory, relative to start of archive - var centralDirectoryOffset = eocdrBuffer.readUInt32LE(16); - // 20 - Comment length - var commentLength = eocdrBuffer.readUInt16LE(20); - var expectedCommentLength = eocdrBuffer.length - eocdrWithoutCommentSize; - if (commentLength !== expectedCommentLength) { - return callback(new Error("invalid comment length. expected: " + expectedCommentLength + ". found: " + commentLength)); - } - // 22 - Comment - // the encoding is always cp437. - var comment = decodeStrings ? decodeBuffer(eocdrBuffer, 22, eocdrBuffer.length, false) - : eocdrBuffer.slice(22); - - if (!(entryCount === 0xffff || centralDirectoryOffset === 0xffffffff)) { - return callback(null, new ZipFile(reader, centralDirectoryOffset, totalSize, entryCount, comment, options.autoClose, options.lazyEntries, decodeStrings, options.validateEntrySizes, options.strictFileNames)); - } - - // ZIP64 format - - // ZIP64 Zip64 end of central directory locator - var zip64EocdlBuffer = newBuffer(20); - var zip64EocdlOffset = bufferReadStart + i - zip64EocdlBuffer.length; - readAndAssertNoEof(reader, zip64EocdlBuffer, 0, zip64EocdlBuffer.length, zip64EocdlOffset, function(err) { - if (err) return callback(err); - - // 0 - zip64 end of central dir locator signature = 0x07064b50 - if (zip64EocdlBuffer.readUInt32LE(0) !== 0x07064b50) { - return callback(new Error("invalid zip64 end of central directory locator signature")); - } - // 4 - number of the disk with the start of the zip64 end of central directory - // 8 - relative offset of the zip64 end of central directory record - var zip64EocdrOffset = readUInt64LE(zip64EocdlBuffer, 8); - // 16 - total number of disks - - // ZIP64 end of central directory record - var zip64EocdrBuffer = newBuffer(56); - readAndAssertNoEof(reader, zip64EocdrBuffer, 0, zip64EocdrBuffer.length, zip64EocdrOffset, function(err) { - if (err) return callback(err); - - // 0 - zip64 end of central dir signature 4 bytes (0x06064b50) - if (zip64EocdrBuffer.readUInt32LE(0) !== 0x06064b50) { - return callback(new Error("invalid zip64 end of central directory record signature")); - } - // 4 - size of zip64 end of central directory record 8 bytes - // 12 - version made by 2 bytes - // 14 - version needed to extract 2 bytes - // 16 - number of this disk 4 bytes - // 20 - number of the disk with the start of the central directory 4 bytes - // 24 - total number of entries in the central directory on this disk 8 bytes - // 32 - total number of entries in the central directory 8 bytes - entryCount = readUInt64LE(zip64EocdrBuffer, 32); - // 40 - size of the central directory 8 bytes - // 48 - offset of start of central directory with respect to the starting disk number 8 bytes - centralDirectoryOffset = readUInt64LE(zip64EocdrBuffer, 48); - // 56 - zip64 extensible data sector (variable size) - return callback(null, new ZipFile(reader, centralDirectoryOffset, totalSize, entryCount, comment, options.autoClose, options.lazyEntries, decodeStrings, options.validateEntrySizes, options.strictFileNames)); - }); - }); - return; - } - callback(new Error("end of central directory record signature not found")); - }); -} - -util.inherits(ZipFile, EventEmitter); -function ZipFile(reader, centralDirectoryOffset, fileSize, entryCount, comment, autoClose, lazyEntries, decodeStrings, validateEntrySizes, strictFileNames) { - var self = this; - EventEmitter.call(self); - self.reader = reader; - // forward close events - self.reader.on("error", function(err) { - // error closing the fd - emitError(self, err); - }); - self.reader.once("close", function() { - self.emit("close"); - }); - self.readEntryCursor = centralDirectoryOffset; - self.fileSize = fileSize; - self.entryCount = entryCount; - self.comment = comment; - self.entriesRead = 0; - self.autoClose = !!autoClose; - self.lazyEntries = !!lazyEntries; - self.decodeStrings = !!decodeStrings; - self.validateEntrySizes = !!validateEntrySizes; - self.strictFileNames = !!strictFileNames; - self.isOpen = true; - self.emittedError = false; - - if (!self.lazyEntries) self._readEntry(); -} -ZipFile.prototype.close = function() { - if (!this.isOpen) return; - this.isOpen = false; - this.reader.unref(); -}; - -function emitErrorAndAutoClose(self, err) { - if (self.autoClose) self.close(); - emitError(self, err); -} -function emitError(self, err) { - if (self.emittedError) return; - self.emittedError = true; - self.emit("error", err); -} - -ZipFile.prototype.readEntry = function() { - if (!this.lazyEntries) throw new Error("readEntry() called without lazyEntries:true"); - this._readEntry(); -}; -ZipFile.prototype._readEntry = function() { - var self = this; - if (self.entryCount === self.entriesRead) { - // done with metadata - setImmediate(function() { - if (self.autoClose) self.close(); - if (self.emittedError) return; - self.emit("end"); - }); - return; - } - if (self.emittedError) return; - var buffer = newBuffer(46); - readAndAssertNoEof(self.reader, buffer, 0, buffer.length, self.readEntryCursor, function(err) { - if (err) return emitErrorAndAutoClose(self, err); - if (self.emittedError) return; - var entry = new Entry(); - // 0 - Central directory file header signature - var signature = buffer.readUInt32LE(0); - if (signature !== 0x02014b50) return emitErrorAndAutoClose(self, new Error("invalid central directory file header signature: 0x" + signature.toString(16))); - // 4 - Version made by - entry.versionMadeBy = buffer.readUInt16LE(4); - // 6 - Version needed to extract (minimum) - entry.versionNeededToExtract = buffer.readUInt16LE(6); - // 8 - General purpose bit flag - entry.generalPurposeBitFlag = buffer.readUInt16LE(8); - // 10 - Compression method - entry.compressionMethod = buffer.readUInt16LE(10); - // 12 - File last modification time - entry.lastModFileTime = buffer.readUInt16LE(12); - // 14 - File last modification date - entry.lastModFileDate = buffer.readUInt16LE(14); - // 16 - CRC-32 - entry.crc32 = buffer.readUInt32LE(16); - // 20 - Compressed size - entry.compressedSize = buffer.readUInt32LE(20); - // 24 - Uncompressed size - entry.uncompressedSize = buffer.readUInt32LE(24); - // 28 - File name length (n) - entry.fileNameLength = buffer.readUInt16LE(28); - // 30 - Extra field length (m) - entry.extraFieldLength = buffer.readUInt16LE(30); - // 32 - File comment length (k) - entry.fileCommentLength = buffer.readUInt16LE(32); - // 34 - Disk number where file starts - // 36 - Internal file attributes - entry.internalFileAttributes = buffer.readUInt16LE(36); - // 38 - External file attributes - entry.externalFileAttributes = buffer.readUInt32LE(38); - // 42 - Relative offset of local file header - entry.relativeOffsetOfLocalHeader = buffer.readUInt32LE(42); - - if (entry.generalPurposeBitFlag & 0x40) return emitErrorAndAutoClose(self, new Error("strong encryption is not supported")); - - self.readEntryCursor += 46; - - buffer = newBuffer(entry.fileNameLength + entry.extraFieldLength + entry.fileCommentLength); - readAndAssertNoEof(self.reader, buffer, 0, buffer.length, self.readEntryCursor, function(err) { - if (err) return emitErrorAndAutoClose(self, err); - if (self.emittedError) return; - // 46 - File name - var isUtf8 = (entry.generalPurposeBitFlag & 0x800) !== 0; - entry.fileName = self.decodeStrings ? decodeBuffer(buffer, 0, entry.fileNameLength, isUtf8) - : buffer.slice(0, entry.fileNameLength); - - // 46+n - Extra field - var fileCommentStart = entry.fileNameLength + entry.extraFieldLength; - var extraFieldBuffer = buffer.slice(entry.fileNameLength, fileCommentStart); - entry.extraFields = []; - var i = 0; - while (i < extraFieldBuffer.length - 3) { - var headerId = extraFieldBuffer.readUInt16LE(i + 0); - var dataSize = extraFieldBuffer.readUInt16LE(i + 2); - var dataStart = i + 4; - var dataEnd = dataStart + dataSize; - if (dataEnd > extraFieldBuffer.length) return emitErrorAndAutoClose(self, new Error("extra field length exceeds extra field buffer size")); - var dataBuffer = newBuffer(dataSize); - extraFieldBuffer.copy(dataBuffer, 0, dataStart, dataEnd); - entry.extraFields.push({ - id: headerId, - data: dataBuffer, - }); - i = dataEnd; - } - - // 46+n+m - File comment - entry.fileComment = self.decodeStrings ? decodeBuffer(buffer, fileCommentStart, fileCommentStart + entry.fileCommentLength, isUtf8) - : buffer.slice(fileCommentStart, fileCommentStart + entry.fileCommentLength); - // compatibility hack for https://github.com/thejoshwolfe/yauzl/issues/47 - entry.comment = entry.fileComment; - - self.readEntryCursor += buffer.length; - self.entriesRead += 1; - - if (entry.uncompressedSize === 0xffffffff || - entry.compressedSize === 0xffffffff || - entry.relativeOffsetOfLocalHeader === 0xffffffff) { - // ZIP64 format - // find the Zip64 Extended Information Extra Field - var zip64EiefBuffer = null; - for (var i = 0; i < entry.extraFields.length; i++) { - var extraField = entry.extraFields[i]; - if (extraField.id === 0x0001) { - zip64EiefBuffer = extraField.data; - break; - } - } - if (zip64EiefBuffer == null) { - return emitErrorAndAutoClose(self, new Error("expected zip64 extended information extra field")); - } - var index = 0; - // 0 - Original Size 8 bytes - if (entry.uncompressedSize === 0xffffffff) { - if (index + 8 > zip64EiefBuffer.length) { - return emitErrorAndAutoClose(self, new Error("zip64 extended information extra field does not include uncompressed size")); - } - entry.uncompressedSize = readUInt64LE(zip64EiefBuffer, index); - index += 8; - } - // 8 - Compressed Size 8 bytes - if (entry.compressedSize === 0xffffffff) { - if (index + 8 > zip64EiefBuffer.length) { - return emitErrorAndAutoClose(self, new Error("zip64 extended information extra field does not include compressed size")); - } - entry.compressedSize = readUInt64LE(zip64EiefBuffer, index); - index += 8; - } - // 16 - Relative Header Offset 8 bytes - if (entry.relativeOffsetOfLocalHeader === 0xffffffff) { - if (index + 8 > zip64EiefBuffer.length) { - return emitErrorAndAutoClose(self, new Error("zip64 extended information extra field does not include relative header offset")); - } - entry.relativeOffsetOfLocalHeader = readUInt64LE(zip64EiefBuffer, index); - index += 8; - } - // 24 - Disk Start Number 4 bytes - } - - // check for Info-ZIP Unicode Path Extra Field (0x7075) - // see https://github.com/thejoshwolfe/yauzl/issues/33 - if (self.decodeStrings) { - for (var i = 0; i < entry.extraFields.length; i++) { - var extraField = entry.extraFields[i]; - if (extraField.id === 0x7075) { - if (extraField.data.length < 6) { - // too short to be meaningful - continue; - } - // Version 1 byte version of this extra field, currently 1 - if (extraField.data.readUInt8(0) !== 1) { - // > Changes may not be backward compatible so this extra - // > field should not be used if the version is not recognized. - continue; - } - // NameCRC32 4 bytes File Name Field CRC32 Checksum - var oldNameCrc32 = extraField.data.readUInt32LE(1); - if (crc32.unsigned(buffer.slice(0, entry.fileNameLength)) !== oldNameCrc32) { - // > If the CRC check fails, this UTF-8 Path Extra Field should be - // > ignored and the File Name field in the header should be used instead. - continue; - } - // UnicodeName Variable UTF-8 version of the entry File Name - entry.fileName = decodeBuffer(extraField.data, 5, extraField.data.length, true); - break; - } - } - } - - // validate file size - if (self.validateEntrySizes && entry.compressionMethod === 0) { - var expectedCompressedSize = entry.uncompressedSize; - if (entry.isEncrypted()) { - // traditional encryption prefixes the file data with a header - expectedCompressedSize += 12; - } - if (entry.compressedSize !== expectedCompressedSize) { - var msg = "compressed/uncompressed size mismatch for stored file: " + entry.compressedSize + " != " + entry.uncompressedSize; - return emitErrorAndAutoClose(self, new Error(msg)); - } - } - - if (self.decodeStrings) { - if (!self.strictFileNames) { - // allow backslash - entry.fileName = entry.fileName.replace(/\\/g, "/"); - } - var errorMessage = validateFileName(entry.fileName, self.validateFileNameOptions); - if (errorMessage != null) return emitErrorAndAutoClose(self, new Error(errorMessage)); - } - self.emit("entry", entry); - - if (!self.lazyEntries) self._readEntry(); - }); - }); -}; - -ZipFile.prototype.openReadStream = function(entry, options, callback) { - var self = this; - // parameter validation - var relativeStart = 0; - var relativeEnd = entry.compressedSize; - if (callback == null) { - callback = options; - options = {}; - } else { - // validate options that the caller has no excuse to get wrong - if (options.decrypt != null) { - if (!entry.isEncrypted()) { - throw new Error("options.decrypt can only be specified for encrypted entries"); - } - if (options.decrypt !== false) throw new Error("invalid options.decrypt value: " + options.decrypt); - if (entry.isCompressed()) { - if (options.decompress !== false) throw new Error("entry is encrypted and compressed, and options.decompress !== false"); - } - } - if (options.decompress != null) { - if (!entry.isCompressed()) { - throw new Error("options.decompress can only be specified for compressed entries"); - } - if (!(options.decompress === false || options.decompress === true)) { - throw new Error("invalid options.decompress value: " + options.decompress); - } - } - if (options.start != null || options.end != null) { - if (entry.isCompressed() && options.decompress !== false) { - throw new Error("start/end range not allowed for compressed entry without options.decompress === false"); - } - if (entry.isEncrypted() && options.decrypt !== false) { - throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false"); - } - } - if (options.start != null) { - relativeStart = options.start; - if (relativeStart < 0) throw new Error("options.start < 0"); - if (relativeStart > entry.compressedSize) throw new Error("options.start > entry.compressedSize"); - } - if (options.end != null) { - relativeEnd = options.end; - if (relativeEnd < 0) throw new Error("options.end < 0"); - if (relativeEnd > entry.compressedSize) throw new Error("options.end > entry.compressedSize"); - if (relativeEnd < relativeStart) throw new Error("options.end < options.start"); - } - } - // any further errors can either be caused by the zipfile, - // or were introduced in a minor version of yauzl, - // so should be passed to the client rather than thrown. - if (!self.isOpen) return callback(new Error("closed")); - if (entry.isEncrypted()) { - if (options.decrypt !== false) return callback(new Error("entry is encrypted, and options.decrypt !== false")); - } - // make sure we don't lose the fd before we open the actual read stream - self.reader.ref(); - var buffer = newBuffer(30); - readAndAssertNoEof(self.reader, buffer, 0, buffer.length, entry.relativeOffsetOfLocalHeader, function(err) { - try { - if (err) return callback(err); - // 0 - Local file header signature = 0x04034b50 - var signature = buffer.readUInt32LE(0); - if (signature !== 0x04034b50) { - return callback(new Error("invalid local file header signature: 0x" + signature.toString(16))); - } - // all this should be redundant - // 4 - Version needed to extract (minimum) - // 6 - General purpose bit flag - // 8 - Compression method - // 10 - File last modification time - // 12 - File last modification date - // 14 - CRC-32 - // 18 - Compressed size - // 22 - Uncompressed size - // 26 - File name length (n) - var fileNameLength = buffer.readUInt16LE(26); - // 28 - Extra field length (m) - var extraFieldLength = buffer.readUInt16LE(28); - // 30 - File name - // 30+n - Extra field - var localFileHeaderEnd = entry.relativeOffsetOfLocalHeader + buffer.length + fileNameLength + extraFieldLength; - var decompress; - if (entry.compressionMethod === 0) { - // 0 - The file is stored (no compression) - decompress = false; - } else if (entry.compressionMethod === 8) { - // 8 - The file is Deflated - decompress = options.decompress != null ? options.decompress : true; - } else { - return callback(new Error("unsupported compression method: " + entry.compressionMethod)); - } - var fileDataStart = localFileHeaderEnd; - var fileDataEnd = fileDataStart + entry.compressedSize; - if (entry.compressedSize !== 0) { - // bounds check now, because the read streams will probably not complain loud enough. - // since we're dealing with an unsigned offset plus an unsigned size, - // we only have 1 thing to check for. - if (fileDataEnd > self.fileSize) { - return callback(new Error("file data overflows file bounds: " + - fileDataStart + " + " + entry.compressedSize + " > " + self.fileSize)); - } - } - var readStream = self.reader.createReadStream({ - start: fileDataStart + relativeStart, - end: fileDataStart + relativeEnd, - }); - var endpointStream = readStream; - if (decompress) { - var destroyed = false; - var inflateFilter = zlib.createInflateRaw(); - readStream.on("error", function(err) { - // setImmediate here because errors can be emitted during the first call to pipe() - setImmediate(function() { - if (!destroyed) inflateFilter.emit("error", err); - }); - }); - readStream.pipe(inflateFilter); - - if (self.validateEntrySizes) { - endpointStream = new AssertByteCountStream(entry.uncompressedSize); - inflateFilter.on("error", function(err) { - // forward zlib errors to the client-visible stream - setImmediate(function() { - if (!destroyed) endpointStream.emit("error", err); - }); - }); - inflateFilter.pipe(endpointStream); - } else { - // the zlib filter is the client-visible stream - endpointStream = inflateFilter; - } - // this is part of yauzl's API, so implement this function on the client-visible stream - endpointStream.destroy = function() { - destroyed = true; - if (inflateFilter !== endpointStream) inflateFilter.unpipe(endpointStream); - readStream.unpipe(inflateFilter); - // TODO: the inflateFilter may cause a memory leak. see Issue #27. - readStream.destroy(); - }; - } - callback(null, endpointStream); - } finally { - self.reader.unref(); - } - }); -}; - -function Entry() { -} -Entry.prototype.getLastModDate = function() { - return dosDateTimeToDate(this.lastModFileDate, this.lastModFileTime); -}; -Entry.prototype.isEncrypted = function() { - return (this.generalPurposeBitFlag & 0x1) !== 0; -}; -Entry.prototype.isCompressed = function() { - return this.compressionMethod === 8; -}; - -function dosDateTimeToDate(date, time) { - var day = date & 0x1f; // 1-31 - var month = (date >> 5 & 0xf) - 1; // 1-12, 0-11 - var year = (date >> 9 & 0x7f) + 1980; // 0-128, 1980-2108 - - var millisecond = 0; - var second = (time & 0x1f) * 2; // 0-29, 0-58 (even numbers) - var minute = time >> 5 & 0x3f; // 0-59 - var hour = time >> 11 & 0x1f; // 0-23 - - return new Date(year, month, day, hour, minute, second, millisecond); -} - -function validateFileName(fileName) { - if (fileName.indexOf("\\") !== -1) { - return "invalid characters in fileName: " + fileName; - } - if (/^[a-zA-Z]:/.test(fileName) || /^\//.test(fileName)) { - return "absolute path: " + fileName; - } - if (fileName.split("/").indexOf("..") !== -1) { - return "invalid relative path: " + fileName; - } - // all good - return null; -} - -function readAndAssertNoEof(reader, buffer, offset, length, position, callback) { - if (length === 0) { - // fs.read will throw an out-of-bounds error if you try to read 0 bytes from a 0 byte file - return setImmediate(function() { callback(null, newBuffer(0)); }); - } - reader.read(buffer, offset, length, position, function(err, bytesRead) { - if (err) return callback(err); - if (bytesRead < length) { - return callback(new Error("unexpected EOF")); - } - callback(); - }); -} - -util.inherits(AssertByteCountStream, Transform); -function AssertByteCountStream(byteCount) { - Transform.call(this); - this.actualByteCount = 0; - this.expectedByteCount = byteCount; -} -AssertByteCountStream.prototype._transform = function(chunk, encoding, cb) { - this.actualByteCount += chunk.length; - if (this.actualByteCount > this.expectedByteCount) { - var msg = "too many bytes in the stream. expected " + this.expectedByteCount + ". got at least " + this.actualByteCount; - return cb(new Error(msg)); - } - cb(null, chunk); -}; -AssertByteCountStream.prototype._flush = function(cb) { - if (this.actualByteCount < this.expectedByteCount) { - var msg = "not enough bytes in the stream. expected " + this.expectedByteCount + ". got only " + this.actualByteCount; - return cb(new Error(msg)); - } - cb(); -}; - -util.inherits(RandomAccessReader, EventEmitter); -function RandomAccessReader() { - EventEmitter.call(this); - this.refCount = 0; -} -RandomAccessReader.prototype.ref = function() { - this.refCount += 1; -}; -RandomAccessReader.prototype.unref = function() { - var self = this; - self.refCount -= 1; - - if (self.refCount > 0) return; - if (self.refCount < 0) throw new Error("invalid unref"); - - self.close(onCloseDone); - - function onCloseDone(err) { - if (err) return self.emit('error', err); - self.emit('close'); - } -}; -RandomAccessReader.prototype.createReadStream = function(options) { - var start = options.start; - var end = options.end; - if (start === end) { - var emptyStream = new PassThrough(); - setImmediate(function() { - emptyStream.end(); - }); - return emptyStream; - } - var stream = this._readStreamForRange(start, end); - - var destroyed = false; - var refUnrefFilter = new RefUnrefFilter(this); - stream.on("error", function(err) { - setImmediate(function() { - if (!destroyed) refUnrefFilter.emit("error", err); - }); - }); - refUnrefFilter.destroy = function() { - stream.unpipe(refUnrefFilter); - refUnrefFilter.unref(); - stream.destroy(); - }; - - var byteCounter = new AssertByteCountStream(end - start); - refUnrefFilter.on("error", function(err) { - setImmediate(function() { - if (!destroyed) byteCounter.emit("error", err); - }); - }); - byteCounter.destroy = function() { - destroyed = true; - refUnrefFilter.unpipe(byteCounter); - refUnrefFilter.destroy(); - }; - - return stream.pipe(refUnrefFilter).pipe(byteCounter); -}; -RandomAccessReader.prototype._readStreamForRange = function(start, end) { - throw new Error("not implemented"); -}; -RandomAccessReader.prototype.read = function(buffer, offset, length, position, callback) { - var readStream = this.createReadStream({start: position, end: position + length}); - var writeStream = new Writable(); - var written = 0; - writeStream._write = function(chunk, encoding, cb) { - chunk.copy(buffer, offset + written, 0, chunk.length); - written += chunk.length; - cb(); - }; - writeStream.on("finish", callback); - readStream.on("error", function(error) { - callback(error); - }); - readStream.pipe(writeStream); -}; -RandomAccessReader.prototype.close = function(callback) { - setImmediate(callback); -}; - -util.inherits(RefUnrefFilter, PassThrough); -function RefUnrefFilter(context) { - PassThrough.call(this); - this.context = context; - this.context.ref(); - this.unreffedYet = false; -} -RefUnrefFilter.prototype._flush = function(cb) { - this.unref(); - cb(); -}; -RefUnrefFilter.prototype.unref = function(cb) { - if (this.unreffedYet) return; - this.unreffedYet = true; - this.context.unref(); -}; - -var cp437 = '\u0000☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ '; -function decodeBuffer(buffer, start, end, isUtf8) { - if (isUtf8) { - return buffer.toString("utf8", start, end); - } else { - var result = ""; - for (var i = start; i < end; i++) { - result += cp437[buffer[i]]; - } - return result; - } -} - -function readUInt64LE(buffer, offset) { - // there is no native function for this, because we can't actually store 64-bit integers precisely. - // after 53 bits, JavaScript's Number type (IEEE 754 double) can't store individual integers anymore. - // but since 53 bits is a whole lot more than 32 bits, we do our best anyway. - var lower32 = buffer.readUInt32LE(offset); - var upper32 = buffer.readUInt32LE(offset + 4); - // we can't use bitshifting here, because JavaScript bitshifting only works on 32-bit integers. - return upper32 * 0x100000000 + lower32; - // as long as we're bounds checking the result of this function against the total file size, - // we'll catch any overflow errors, because we already made sure the total file size was within reason. -} - -// Node 10 deprecated new Buffer(). -var newBuffer; -if (typeof Buffer.allocUnsafe === "function") { - newBuffer = function(len) { - return Buffer.allocUnsafe(len); - }; -} else { - newBuffer = function(len) { - return new Buffer(len); - }; -} - -function defaultCallback(err) { - if (err) throw err; -} diff --git a/node_modules/yauzl/package.json b/node_modules/yauzl/package.json deleted file mode 100644 index a31fef5f..00000000 --- a/node_modules/yauzl/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_from": "yauzl@^2.2.1", - "_id": "yauzl@2.10.0", - "_inBundle": false, - "_integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", - "_location": "/yauzl", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "yauzl@^2.2.1", - "name": "yauzl", - "escapedName": "yauzl", - "rawSpec": "^2.2.1", - "saveSpec": null, - "fetchSpec": "^2.2.1" - }, - "_requiredBy": [ - "/gulp-vinyl-zip" - ], - "_resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "_shasum": "c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9", - "_spec": "yauzl@^2.2.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/gulp-vinyl-zip", - "author": { - "name": "Josh Wolfe", - "email": "thejoshwolfe@gmail.com" - }, - "bugs": { - "url": "https://github.com/thejoshwolfe/yauzl/issues" - }, - "bundleDependencies": false, - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - }, - "deprecated": false, - "description": "yet another unzip library for node", - "devDependencies": { - "bl": "~1.0.0", - "istanbul": "~0.3.4", - "pend": "~1.2.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/thejoshwolfe/yauzl", - "keywords": [ - "unzip", - "zip", - "stream", - "archive", - "file" - ], - "license": "MIT", - "main": "index.js", - "name": "yauzl", - "repository": { - "type": "git", - "url": "git+https://github.com/thejoshwolfe/yauzl.git" - }, - "scripts": { - "test": "node test/test.js", - "test-cov": "istanbul cover test/test.js", - "test-travis": "istanbul cover --report lcovonly test/test.js" - }, - "version": "2.10.0" -} diff --git a/node_modules/yazl/LICENSE b/node_modules/yazl/LICENSE deleted file mode 100644 index 37538d4d..00000000 --- a/node_modules/yazl/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Josh Wolfe - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/yazl/README.md b/node_modules/yazl/README.md deleted file mode 100644 index 80178494..00000000 --- a/node_modules/yazl/README.md +++ /dev/null @@ -1,389 +0,0 @@ -# yazl - -[![Build Status](https://travis-ci.com/thejoshwolfe/yazl.svg?branch=master)](https://travis-ci.com/thejoshwolfe/yazl) -[![Coverage Status](https://coveralls.io/repos/github/thejoshwolfe/yazl/badge.svg?branch=master)](https://coveralls.io/github/thejoshwolfe/yazl?branch=master) - -yet another zip library for node. For unzipping, see -[yauzl](https://github.com/thejoshwolfe/yauzl). - -Design principles: - - * Don't block the JavaScript thread. - Use and provide async APIs. - * Keep memory usage under control. - Don't attempt to buffer entire files in RAM at once. - * Prefer to open input files one at a time than all at once. - This is slightly suboptimal for time performance, - but avoids OS-imposed limits on the number of simultaneously open file handles. - -## Usage - -```js -var yazl = require("yazl"); - -var zipfile = new yazl.ZipFile(); -zipfile.addFile("file1.txt", "file1.txt"); -// (add only files, not directories) -zipfile.addFile("path/to/file.txt", "path/in/zipfile.txt"); -// pipe() can be called any time after the constructor -zipfile.outputStream.pipe(fs.createWriteStream("output.zip")).on("close", function() { - console.log("done"); -}); -// alternate apis for adding files: -zipfile.addReadStream(process.stdin, "stdin.txt"); -zipfile.addBuffer(Buffer.from("hello"), "hello.txt"); -// call end() after all the files have been added -zipfile.end(); -``` - -## API - -### Class: ZipFile - -#### new ZipFile() - -No parameters. -Nothing can go wrong. - -#### addFile(realPath, metadataPath, [options]) - -Adds a file from the file system at `realPath` into the zipfile as `metadataPath`. -Typically `metadataPath` would be calculated as `path.relative(root, realPath)`. -Unzip programs would extract the file from the zipfile as `metadataPath`. -`realPath` is not stored in the zipfile. - -A valid `metadataPath` must not be blank. -If a `metadataPath` contains `"\\"` characters, they will be replaced by `"/"` characters. -After this substitution, a valid `metadataPath` must not start with `"/"` or `/[A-Za-z]:\//`, -and must not contain `".."` path segments. -File paths must not end with `"/"`, but see `addEmptyDirectory()`. -After UTF-8 encoding, `metadataPath` must be at most `0xffff` bytes in length. - -`options` may be omitted or null and has the following structure and default values: - -```js -{ - mtime: stats.mtime, - mode: stats.mode, - compress: true, - forceZip64Format: false, - fileComment: "", // or a UTF-8 Buffer -} -``` - -Use `mtime` and/or `mode` to override the values -that would normally be obtained by the `fs.Stats` for the `realPath`. -The mode is the unix permission bits and file type. -The mtime and mode are stored in the zip file in the fields "last mod file time", -"last mod file date", and "external file attributes". -yazl does not store group and user ids in the zip file. - -If `compress` is `true`, the file data will be deflated (compression method 8). -If `compress` is `false`, the file data will be stored (compression method 0). - -If `forceZip64Format` is `true`, yazl will use ZIP64 format in this entry's Data Descriptor -and Central Directory Record regardless of if it's required or not (this may be useful for testing.). -Otherwise, yazl will use ZIP64 format where necessary. - -If `fileComment` is a `string`, it will be encoded with UTF-8. -If `fileComment` is a `Buffer`, it should be a UTF-8 encoded string. -In UTF-8, `fileComment` must be at most `0xffff` bytes in length. -This becomes the "file comment" field in this entry's central directory file header. - -Internally, `fs.stat()` is called immediately in the `addFile` function, -and `fs.createReadStream()` is used later when the file data is actually required. -Throughout adding and encoding `n` files with `addFile()`, -the number of simultaneous open files is `O(1)`, probably just 1 at a time. - -#### addReadStream(readStream, metadataPath, [options]) - -Adds a file to the zip file whose content is read from `readStream`. -See `addFile()` for info about the `metadataPath` parameter. -`options` may be omitted or null and has the following structure and default values: - -```js -{ - mtime: new Date(), - mode: 0o100664, - compress: true, - forceZip64Format: false, - fileComment: "", // or a UTF-8 Buffer - size: 12345, // example value -} -``` - -See `addFile()` for the meaning of `mtime`, `mode`, `compress`, `forceZip64Format`, and `fileComment`. -If `size` is given, it will be checked against the actual number of bytes in the `readStream`, -and an error will be emitted if there is a mismatch. - -Note that yazl will `.pipe()` data from `readStream`, so be careful using `.on('data')`. -In certain versions of node, `.on('data')` makes `.pipe()` behave incorrectly. - -#### addBuffer(buffer, metadataPath, [options]) - -Adds a file to the zip file whose content is `buffer`. -See below for info on the limitations on the size of `buffer`. -See `addFile()` for info about the `metadataPath` parameter. -`options` may be omitted or null and has the following structure and default values: - -```js -{ - mtime: new Date(), - mode: 0o100664, - compress: true, - forceZip64Format: false, - fileComment: "", // or a UTF-8 Buffer -} -``` - -See `addFile()` for the meaning of `mtime`, `mode`, `compress`, `forceZip64Format`, and `fileComment`. - -This method has the unique property that General Purpose Bit `3` will not be used in the Local File Header. -This doesn't matter for unzip implementations that conform to the Zip File Spec. -However, 7-Zip 9.20 has a known bug where General Purpose Bit `3` is declared an unsupported compression method -(note that it really has nothing to do with the compression method.). -See [issue #11](https://github.com/thejoshwolfe/yazl/issues/11). -If you would like to create zip files that 7-Zip 9.20 can understand, -you must use `addBuffer()` instead of `addFile()` or `addReadStream()` for all entries in the zip file -(and `addEmptyDirectory()` is fine too). - -Note that even when yazl provides the file sizes in the Local File Header, -yazl never uses ZIP64 format for Local File Headers due to the size limit on `buffer` (see below). - -##### Size limitation on buffer - -In order to require the ZIP64 format for a local file header, -the provided `buffer` parameter would need to exceed `0xfffffffe` in length. -Alternatively, the `buffer` parameter might not exceed `0xfffffffe` in length, -but zlib compression fails to compress the buffer and actually inflates the data to more than `0xfffffffe` in length. -Both of these scenarios are not allowed by yazl, and those are enforced by a size limit on the `buffer` parameter. - -According to [this zlib documentation](http://www.zlib.net/zlib_tech.html), -the worst case compression results in "an expansion of at most 13.5%, plus eleven bytes". -Furthermore, some configurations of Node.js impose a size limit of `0x3fffffff` on every `Buffer` object. -Running this size through the worst case compression of zlib still produces a size less than `0xfffffffe` bytes, - -Therefore, yazl enforces that the provided `buffer` parameter must be at most `0x3fffffff` bytes long. - -#### addEmptyDirectory(metadataPath, [options]) - -Adds an entry to the zip file that indicates a directory should be created, -even if no other items in the zip file are contained in the directory. -This method is only required if the zip file is intended to contain an empty directory. - -See `addFile()` for info about the `metadataPath` parameter. -If `metadataPath` does not end with a `"/"`, a `"/"` will be appended. - -`options` may be omitted or null and has the following structure and default values: - -```js -{ - mtime: new Date(), - mode: 040775, -} -``` - -See `addFile()` for the meaning of `mtime` and `mode`. - -#### end([options], [finalSizeCallback]) - -Indicates that no more files will be added via `addFile()`, `addReadStream()`, or `addBuffer()`, -and causes the eventual close of `outputStream`. - -`options` may be omitted or null and has the following structure and default values: - -```js -{ - forceZip64Format: false, - comment: "", // or a CP437 Buffer -} -``` - -If `forceZip64Format` is `true`, yazl will include the ZIP64 End of Central Directory Locator -and ZIP64 End of Central Directory Record regardless of whether or not they are required -(this may be useful for testing.). -Otherwise, yazl will include these structures if necessary. - -If `comment` is a `string`, it will be encoded with CP437. -If `comment` is a `Buffer`, it should be a CP437 encoded string. -`comment` must be at most `0xffff` bytes in length and must not include the byte sequence `[0x50,0x4b,0x05,0x06]`. -This becomes the ".ZIP file comment" field in the end of central directory record. -Note that in practice, most zipfile readers interpret this field in UTF-8 instead of CP437. -If your string uses only codepoints in the range `0x20...0x7e` -(printable ASCII, no whitespace except for sinlge space `' '`), -then UTF-8 and CP437 (and ASCII) encodings are all identical. -This restriction is recommended for maxium compatibility. -To use UTF-8 encoding at your own risk, pass a `Buffer` into this function; it will not be validated. - - -If specified and non-null, `finalSizeCallback` is given the parameters `(finalSize)` -sometime during or after the call to `end()`. -`finalSize` is of type `Number` and can either be `-1` -or the guaranteed eventual size in bytes of the output data that can be read from `outputStream`. - -Note that `finalSizeCallback` is usually called well before `outputStream` has piped all its data; -this callback does not mean that the stream is done. - -If `finalSize` is `-1`, it means means the final size is too hard to guess before processing the input file data. -This will happen if and only if the `compress` option is `true` on any call to `addFile()`, `addReadStream()`, or `addBuffer()`, -or if `addReadStream()` is called and the optional `size` option is not given. -In other words, clients should know whether they're going to get a `-1` or a real value -by looking at how they are using this library. - -The call to `finalSizeCallback` might be delayed if yazl is still waiting for `fs.Stats` for an `addFile()` entry. -If `addFile()` was never called, `finalSizeCallback` will be called during the call to `end()`. -It is not required to start piping data from `outputStream` before `finalSizeCallback` is called. -`finalSizeCallback` will be called only once, and only if this is the first call to `end()`. - -#### outputStream - -A readable stream that will produce the contents of the zip file. -It is typical to pipe this stream to a writable stream created from `fs.createWriteStream()`. - -Internally, large amounts of file data are piped to `outputStream` using `pipe()`, -which means throttling happens appropriately when this stream is piped to a slow destination. - -Data becomes available in this stream soon after calling one of `addFile()`, `addReadStream()`, or `addBuffer()`. -Clients can call `pipe()` on this stream at any time, -such as immediately after getting a new `ZipFile` instance, or long after calling `end()`. - -This stream will remain open while you add entries until you `end()` the zip file. - -As a reminder, be careful using both `.on('data')` and `.pipe()` with this stream. -In certain versions of node, you cannot use both `.on('data')` and `.pipe()` successfully. - -### dateToDosDateTime(jsDate) - -`jsDate` is a `Date` instance. -Returns `{date: date, time: time}`, where `date` and `time` are unsigned 16-bit integers. - -## Regarding ZIP64 Support - -yazl automatically uses ZIP64 format to support files and archives over `2^32 - 2` bytes (~4GB) in size -and to support archives with more than `2^16 - 2` (65534) files. -(See the `forceZip64Format` option in the API above for more control over this behavior.) -ZIP64 format is necessary to exceed the limits inherent in the original zip file format. - -ZIP64 format is supported by most popular zipfile readers, but not by all of them. -Notably, the Mac Archive Utility does not understand ZIP64 format (as of writing this), -and will behave very strangely when presented with such an archive. - -## Output Structure - -The Zip File Spec leaves a lot of flexibility up to the zip file creator. -This section explains and justifies yazl's interpretation and decisions regarding this flexibility. - -This section is probably not useful to yazl clients, -but may be interesting to unzip implementors and zip file enthusiasts. - -### Disk Numbers - -All values related to disk numbers are `0`, -because yazl has no multi-disk archive support. -(The exception being the Total Number of Disks field in -the ZIP64 End of Central Directory Locator, which is always `1`.) - -### Version Made By - -Always `0x033f == (3 << 8) | 63`, which means UNIX (3) -and made from the spec version 6.3 (63). - -Note that the "UNIX" has implications in the External File Attributes. - -### Version Needed to Extract - -Usually `20`, meaning 2.0. This allows filenames and file comments to be UTF-8 encoded. - -When ZIP64 format is used, some of the Version Needed to Extract values will be `45`, meaning 4.5. -When this happens, there may be a mix of `20` and `45` values throughout the zipfile. - -### General Purpose Bit Flag - -Bit `11` is always set. -Filenames (and file comments) are always encoded in UTF-8, even if the result is indistinguishable from ascii. - -Bit `3` is usually set in the Local File Header. -To support both a streaming input and streaming output api, -it is impossible to know the crc32 before processing the file data. -When bit `3` is set, data Descriptors are given after each file data with this information, as per the spec. -But remember a complete metadata listing is still always available in the central directory record, -so if unzip implementations are relying on that, like they should, -none of this paragraph will matter anyway. -Even so, some popular unzip implementations do not follow the spec. -The Mac Archive Utility requires Data Descriptors to include the optional signature, -so yazl includes the optional data descriptor signature. -When bit `3` is not used, the Mac Archive Utility requires there to be no data descriptor, so yazl skips it in that case. -Additionally, 7-Zip 9.20 does not seem to support bit `3` at all -(see [issue #11](https://github.com/thejoshwolfe/yazl/issues/11)). - -All other bits are unset. - -### Internal File Attributes - -Always `0`. -The "apparently an ASCII or text file" bit is always unset meaning "apparently binary". -This kind of determination is outside the scope of yazl, -and is probably not significant in any modern unzip implementation. - -### External File Attributes - -Always `stats.mode << 16`. -This is apparently the convention for "version made by" = `0x03xx` (UNIX). - -Note that for directory entries (see `addEmptyDirectory()`), -it is conventional to use the lower 8 bits for the MS-DOS directory attribute byte. -However, the spec says this is only required if the Version Made By is DOS, -so this library does not do that. - -### Directory Entries - -When adding a `metadataPath` such as `"parent/file.txt"`, yazl does not add a directory entry for `"parent/"`, -because file entries imply the need for their parent directories. -Unzip clients seem to respect this style of pathing, -and the zip file spec does not specify what is standard in this regard. - -In order to create empty directories, use `addEmptyDirectory()`. - -### Size of Local File and Central Directory Entry Metadata - -The spec recommends that "The combined length of any directory record and [the file name, -extra field, and comment fields] should not generally exceed 65,535 bytes". -yazl makes no attempt to respect this recommendation. -Instead, each of the fields is limited to 65,535 bytes due to the length of each being encoded as an unsigned 16 bit integer. - -## Change History - - * 2.5.1 - * Fix support for old versions of Node and add official support for Node versions 0.10, 4, 6, 8, 10. [pull #49](https://github.com/thejoshwolfe/yazl/pull/49) - * 2.5.0 - * Add support for `comment` and `fileComment`. [pull #44](https://github.com/thejoshwolfe/yazl/pull/44) - * Avoid `new Buffer()`. [pull #43](https://github.com/thejoshwolfe/yazl/pull/43) - * 2.4.3 - * Clarify readme. [pull #33](https://github.com/thejoshwolfe/yazl/pull/33) - * 2.4.2 - * Remove octal literals to make yazl compatible with strict mode. [pull #28](https://github.com/thejoshwolfe/yazl/pull/28) - * 2.4.1 - * Fix Mac Archive Utility compatibility issue. [issue #24](https://github.com/thejoshwolfe/yazl/issues/24) - * 2.4.0 - * Add ZIP64 support. [issue #6](https://github.com/thejoshwolfe/yazl/issues/6) - * 2.3.1 - * Remove `.npmignore` from npm package. [pull #22](https://github.com/thejoshwolfe/yazl/pull/22) - * 2.3.0 - * `metadataPath` can have `\` characters now; they will be replaced with `/`. [issue #18](https://github.com/thejoshwolfe/yazl/issues/18) - * 2.2.2 - * Fix 7-Zip compatibility issue. [pull request #17](https://github.com/thejoshwolfe/yazl/pull/17) - * 2.2.1 - * Fix Mac Archive Utility compatibility issue. [issue #14](https://github.com/thejoshwolfe/yazl/issues/14) - * 2.2.0 - * Avoid using general purpose bit 3 for `addBuffer()` calls. [issue #13](https://github.com/thejoshwolfe/yazl/issues/13) - * 2.1.3 - * Fix bug when only addBuffer() and end() are called. [issue #12](https://github.com/thejoshwolfe/yazl/issues/12) - * 2.1.2 - * Fixed typo in parameter validation. [pull request #10](https://github.com/thejoshwolfe/yazl/pull/10) - * 2.1.1 - * Fixed stack overflow when using addBuffer() in certain ways. [issue #9](https://github.com/thejoshwolfe/yazl/issues/9) - * 2.1.0 - * Added `addEmptyDirectory()`. - * `options` is now optional for `addReadStream()` and `addBuffer()`. - * 2.0.0 - * Initial release. diff --git a/node_modules/yazl/index.js b/node_modules/yazl/index.js deleted file mode 100644 index ef500857..00000000 --- a/node_modules/yazl/index.js +++ /dev/null @@ -1,749 +0,0 @@ -var fs = require("fs"); -var Transform = require("stream").Transform; -var PassThrough = require("stream").PassThrough; -var zlib = require("zlib"); -var util = require("util"); -var EventEmitter = require("events").EventEmitter; -var crc32 = require("buffer-crc32"); - -exports.ZipFile = ZipFile; -exports.dateToDosDateTime = dateToDosDateTime; - -util.inherits(ZipFile, EventEmitter); -function ZipFile() { - this.outputStream = new PassThrough(); - this.entries = []; - this.outputStreamCursor = 0; - this.ended = false; // .end() sets this - this.allDone = false; // set when we've written the last bytes - this.forceZip64Eocd = false; // configurable in .end() -} - -ZipFile.prototype.addFile = function(realPath, metadataPath, options) { - var self = this; - metadataPath = validateMetadataPath(metadataPath, false); - if (options == null) options = {}; - - var entry = new Entry(metadataPath, false, options); - self.entries.push(entry); - fs.stat(realPath, function(err, stats) { - if (err) return self.emit("error", err); - if (!stats.isFile()) return self.emit("error", new Error("not a file: " + realPath)); - entry.uncompressedSize = stats.size; - if (options.mtime == null) entry.setLastModDate(stats.mtime); - if (options.mode == null) entry.setFileAttributesMode(stats.mode); - entry.setFileDataPumpFunction(function() { - var readStream = fs.createReadStream(realPath); - entry.state = Entry.FILE_DATA_IN_PROGRESS; - readStream.on("error", function(err) { - self.emit("error", err); - }); - pumpFileDataReadStream(self, entry, readStream); - }); - pumpEntries(self); - }); -}; - -ZipFile.prototype.addReadStream = function(readStream, metadataPath, options) { - var self = this; - metadataPath = validateMetadataPath(metadataPath, false); - if (options == null) options = {}; - var entry = new Entry(metadataPath, false, options); - self.entries.push(entry); - entry.setFileDataPumpFunction(function() { - entry.state = Entry.FILE_DATA_IN_PROGRESS; - pumpFileDataReadStream(self, entry, readStream); - }); - pumpEntries(self); -}; - -ZipFile.prototype.addBuffer = function(buffer, metadataPath, options) { - var self = this; - metadataPath = validateMetadataPath(metadataPath, false); - if (buffer.length > 0x3fffffff) throw new Error("buffer too large: " + buffer.length + " > " + 0x3fffffff); - if (options == null) options = {}; - if (options.size != null) throw new Error("options.size not allowed"); - var entry = new Entry(metadataPath, false, options); - entry.uncompressedSize = buffer.length; - entry.crc32 = crc32.unsigned(buffer); - entry.crcAndFileSizeKnown = true; - self.entries.push(entry); - if (!entry.compress) { - setCompressedBuffer(buffer); - } else { - zlib.deflateRaw(buffer, function(err, compressedBuffer) { - setCompressedBuffer(compressedBuffer); - }); - } - function setCompressedBuffer(compressedBuffer) { - entry.compressedSize = compressedBuffer.length; - entry.setFileDataPumpFunction(function() { - writeToOutputStream(self, compressedBuffer); - writeToOutputStream(self, entry.getDataDescriptor()); - entry.state = Entry.FILE_DATA_DONE; - - // don't call pumpEntries() recursively. - // (also, don't call process.nextTick recursively.) - setImmediate(function() { - pumpEntries(self); - }); - }); - pumpEntries(self); - } -}; - -ZipFile.prototype.addEmptyDirectory = function(metadataPath, options) { - var self = this; - metadataPath = validateMetadataPath(metadataPath, true); - if (options == null) options = {}; - if (options.size != null) throw new Error("options.size not allowed"); - if (options.compress != null) throw new Error("options.compress not allowed"); - var entry = new Entry(metadataPath, true, options); - self.entries.push(entry); - entry.setFileDataPumpFunction(function() { - writeToOutputStream(self, entry.getDataDescriptor()); - entry.state = Entry.FILE_DATA_DONE; - pumpEntries(self); - }); - pumpEntries(self); -}; - -var eocdrSignatureBuffer = bufferFrom([0x50, 0x4b, 0x05, 0x06]); - -ZipFile.prototype.end = function(options, finalSizeCallback) { - if (typeof options === "function") { - finalSizeCallback = options; - options = null; - } - if (options == null) options = {}; - if (this.ended) return; - this.ended = true; - this.finalSizeCallback = finalSizeCallback; - this.forceZip64Eocd = !!options.forceZip64Format; - if (options.comment) { - if (typeof options.comment === "string") { - this.comment = encodeCp437(options.comment); - } else { - // It should be a Buffer - this.comment = options.comment; - } - if (this.comment.length > 0xffff) throw new Error("comment is too large"); - // gotta check for this, because the zipfile format is actually ambiguous. - if (bufferIncludes(this.comment, eocdrSignatureBuffer)) throw new Error("comment contains end of central directory record signature"); - } else { - // no comment. - this.comment = EMPTY_BUFFER; - } - pumpEntries(this); -}; - -function writeToOutputStream(self, buffer) { - self.outputStream.write(buffer); - self.outputStreamCursor += buffer.length; -} - -function pumpFileDataReadStream(self, entry, readStream) { - var crc32Watcher = new Crc32Watcher(); - var uncompressedSizeCounter = new ByteCounter(); - var compressor = entry.compress ? new zlib.DeflateRaw() : new PassThrough(); - var compressedSizeCounter = new ByteCounter(); - readStream.pipe(crc32Watcher) - .pipe(uncompressedSizeCounter) - .pipe(compressor) - .pipe(compressedSizeCounter) - .pipe(self.outputStream, {end: false}); - compressedSizeCounter.on("end", function() { - entry.crc32 = crc32Watcher.crc32; - if (entry.uncompressedSize == null) { - entry.uncompressedSize = uncompressedSizeCounter.byteCount; - } else { - if (entry.uncompressedSize !== uncompressedSizeCounter.byteCount) return self.emit("error", new Error("file data stream has unexpected number of bytes")); - } - entry.compressedSize = compressedSizeCounter.byteCount; - self.outputStreamCursor += entry.compressedSize; - writeToOutputStream(self, entry.getDataDescriptor()); - entry.state = Entry.FILE_DATA_DONE; - pumpEntries(self); - }); -} - -function pumpEntries(self) { - if (self.allDone) return; - // first check if finalSize is finally known - if (self.ended && self.finalSizeCallback != null) { - var finalSize = calculateFinalSize(self); - if (finalSize != null) { - // we have an answer - self.finalSizeCallback(finalSize); - self.finalSizeCallback = null; - } - } - - // pump entries - var entry = getFirstNotDoneEntry(); - function getFirstNotDoneEntry() { - for (var i = 0; i < self.entries.length; i++) { - var entry = self.entries[i]; - if (entry.state < Entry.FILE_DATA_DONE) return entry; - } - return null; - } - if (entry != null) { - // this entry is not done yet - if (entry.state < Entry.READY_TO_PUMP_FILE_DATA) return; // input file not open yet - if (entry.state === Entry.FILE_DATA_IN_PROGRESS) return; // we'll get there - // start with local file header - entry.relativeOffsetOfLocalHeader = self.outputStreamCursor; - var localFileHeader = entry.getLocalFileHeader(); - writeToOutputStream(self, localFileHeader); - entry.doFileDataPump(); - } else { - // all cought up on writing entries - if (self.ended) { - // head for the exit - self.offsetOfStartOfCentralDirectory = self.outputStreamCursor; - self.entries.forEach(function(entry) { - var centralDirectoryRecord = entry.getCentralDirectoryRecord(); - writeToOutputStream(self, centralDirectoryRecord); - }); - writeToOutputStream(self, getEndOfCentralDirectoryRecord(self)); - self.outputStream.end(); - self.allDone = true; - } - } -} - -function calculateFinalSize(self) { - var pretendOutputCursor = 0; - var centralDirectorySize = 0; - for (var i = 0; i < self.entries.length; i++) { - var entry = self.entries[i]; - // compression is too hard to predict - if (entry.compress) return -1; - if (entry.state >= Entry.READY_TO_PUMP_FILE_DATA) { - // if addReadStream was called without providing the size, we can't predict the final size - if (entry.uncompressedSize == null) return -1; - } else { - // if we're still waiting for fs.stat, we might learn the size someday - if (entry.uncompressedSize == null) return null; - } - // we know this for sure, and this is important to know if we need ZIP64 format. - entry.relativeOffsetOfLocalHeader = pretendOutputCursor; - var useZip64Format = entry.useZip64Format(); - - pretendOutputCursor += LOCAL_FILE_HEADER_FIXED_SIZE + entry.utf8FileName.length; - pretendOutputCursor += entry.uncompressedSize; - if (!entry.crcAndFileSizeKnown) { - // use a data descriptor - if (useZip64Format) { - pretendOutputCursor += ZIP64_DATA_DESCRIPTOR_SIZE; - } else { - pretendOutputCursor += DATA_DESCRIPTOR_SIZE; - } - } - - centralDirectorySize += CENTRAL_DIRECTORY_RECORD_FIXED_SIZE + entry.utf8FileName.length + entry.fileComment.length; - if (useZip64Format) { - centralDirectorySize += ZIP64_EXTENDED_INFORMATION_EXTRA_FIELD_SIZE; - } - } - - var endOfCentralDirectorySize = 0; - if (self.forceZip64Eocd || - self.entries.length >= 0xffff || - centralDirectorySize >= 0xffff || - pretendOutputCursor >= 0xffffffff) { - // use zip64 end of central directory stuff - endOfCentralDirectorySize += ZIP64_END_OF_CENTRAL_DIRECTORY_RECORD_SIZE + ZIP64_END_OF_CENTRAL_DIRECTORY_LOCATOR_SIZE; - } - endOfCentralDirectorySize += END_OF_CENTRAL_DIRECTORY_RECORD_SIZE + self.comment.length; - return pretendOutputCursor + centralDirectorySize + endOfCentralDirectorySize; -} - -var ZIP64_END_OF_CENTRAL_DIRECTORY_RECORD_SIZE = 56; -var ZIP64_END_OF_CENTRAL_DIRECTORY_LOCATOR_SIZE = 20; -var END_OF_CENTRAL_DIRECTORY_RECORD_SIZE = 22; -function getEndOfCentralDirectoryRecord(self, actuallyJustTellMeHowLongItWouldBe) { - var needZip64Format = false; - var normalEntriesLength = self.entries.length; - if (self.forceZip64Eocd || self.entries.length >= 0xffff) { - normalEntriesLength = 0xffff; - needZip64Format = true; - } - var sizeOfCentralDirectory = self.outputStreamCursor - self.offsetOfStartOfCentralDirectory; - var normalSizeOfCentralDirectory = sizeOfCentralDirectory; - if (self.forceZip64Eocd || sizeOfCentralDirectory >= 0xffffffff) { - normalSizeOfCentralDirectory = 0xffffffff; - needZip64Format = true; - } - var normalOffsetOfStartOfCentralDirectory = self.offsetOfStartOfCentralDirectory; - if (self.forceZip64Eocd || self.offsetOfStartOfCentralDirectory >= 0xffffffff) { - normalOffsetOfStartOfCentralDirectory = 0xffffffff; - needZip64Format = true; - } - if (actuallyJustTellMeHowLongItWouldBe) { - if (needZip64Format) { - return ( - ZIP64_END_OF_CENTRAL_DIRECTORY_RECORD_SIZE + - ZIP64_END_OF_CENTRAL_DIRECTORY_LOCATOR_SIZE + - END_OF_CENTRAL_DIRECTORY_RECORD_SIZE - ); - } else { - return END_OF_CENTRAL_DIRECTORY_RECORD_SIZE; - } - } - - var eocdrBuffer = bufferAlloc(END_OF_CENTRAL_DIRECTORY_RECORD_SIZE + self.comment.length); - // end of central dir signature 4 bytes (0x06054b50) - eocdrBuffer.writeUInt32LE(0x06054b50, 0); - // number of this disk 2 bytes - eocdrBuffer.writeUInt16LE(0, 4); - // number of the disk with the start of the central directory 2 bytes - eocdrBuffer.writeUInt16LE(0, 6); - // total number of entries in the central directory on this disk 2 bytes - eocdrBuffer.writeUInt16LE(normalEntriesLength, 8); - // total number of entries in the central directory 2 bytes - eocdrBuffer.writeUInt16LE(normalEntriesLength, 10); - // size of the central directory 4 bytes - eocdrBuffer.writeUInt32LE(normalSizeOfCentralDirectory, 12); - // offset of start of central directory with respect to the starting disk number 4 bytes - eocdrBuffer.writeUInt32LE(normalOffsetOfStartOfCentralDirectory, 16); - // .ZIP file comment length 2 bytes - eocdrBuffer.writeUInt16LE(self.comment.length, 20); - // .ZIP file comment (variable size) - self.comment.copy(eocdrBuffer, 22); - - if (!needZip64Format) return eocdrBuffer; - - // ZIP64 format - // ZIP64 End of Central Directory Record - var zip64EocdrBuffer = bufferAlloc(ZIP64_END_OF_CENTRAL_DIRECTORY_RECORD_SIZE); - // zip64 end of central dir signature 4 bytes (0x06064b50) - zip64EocdrBuffer.writeUInt32LE(0x06064b50, 0); - // size of zip64 end of central directory record 8 bytes - writeUInt64LE(zip64EocdrBuffer, ZIP64_END_OF_CENTRAL_DIRECTORY_RECORD_SIZE - 12, 4); - // version made by 2 bytes - zip64EocdrBuffer.writeUInt16LE(VERSION_MADE_BY, 12); - // version needed to extract 2 bytes - zip64EocdrBuffer.writeUInt16LE(VERSION_NEEDED_TO_EXTRACT_ZIP64, 14); - // number of this disk 4 bytes - zip64EocdrBuffer.writeUInt32LE(0, 16); - // number of the disk with the start of the central directory 4 bytes - zip64EocdrBuffer.writeUInt32LE(0, 20); - // total number of entries in the central directory on this disk 8 bytes - writeUInt64LE(zip64EocdrBuffer, self.entries.length, 24); - // total number of entries in the central directory 8 bytes - writeUInt64LE(zip64EocdrBuffer, self.entries.length, 32); - // size of the central directory 8 bytes - writeUInt64LE(zip64EocdrBuffer, sizeOfCentralDirectory, 40); - // offset of start of central directory with respect to the starting disk number 8 bytes - writeUInt64LE(zip64EocdrBuffer, self.offsetOfStartOfCentralDirectory, 48); - // zip64 extensible data sector (variable size) - // nothing in the zip64 extensible data sector - - - // ZIP64 End of Central Directory Locator - var zip64EocdlBuffer = bufferAlloc(ZIP64_END_OF_CENTRAL_DIRECTORY_LOCATOR_SIZE); - // zip64 end of central dir locator signature 4 bytes (0x07064b50) - zip64EocdlBuffer.writeUInt32LE(0x07064b50, 0); - // number of the disk with the start of the zip64 end of central directory 4 bytes - zip64EocdlBuffer.writeUInt32LE(0, 4); - // relative offset of the zip64 end of central directory record 8 bytes - writeUInt64LE(zip64EocdlBuffer, self.outputStreamCursor, 8); - // total number of disks 4 bytes - zip64EocdlBuffer.writeUInt32LE(1, 16); - - - return Buffer.concat([ - zip64EocdrBuffer, - zip64EocdlBuffer, - eocdrBuffer, - ]); -} - -function validateMetadataPath(metadataPath, isDirectory) { - if (metadataPath === "") throw new Error("empty metadataPath"); - metadataPath = metadataPath.replace(/\\/g, "/"); - if (/^[a-zA-Z]:/.test(metadataPath) || /^\//.test(metadataPath)) throw new Error("absolute path: " + metadataPath); - if (metadataPath.split("/").indexOf("..") !== -1) throw new Error("invalid relative path: " + metadataPath); - var looksLikeDirectory = /\/$/.test(metadataPath); - if (isDirectory) { - // append a trailing '/' if necessary. - if (!looksLikeDirectory) metadataPath += "/"; - } else { - if (looksLikeDirectory) throw new Error("file path cannot end with '/': " + metadataPath); - } - return metadataPath; -} - -var EMPTY_BUFFER = bufferAlloc(0); - -// this class is not part of the public API -function Entry(metadataPath, isDirectory, options) { - this.utf8FileName = bufferFrom(metadataPath); - if (this.utf8FileName.length > 0xffff) throw new Error("utf8 file name too long. " + utf8FileName.length + " > " + 0xffff); - this.isDirectory = isDirectory; - this.state = Entry.WAITING_FOR_METADATA; - this.setLastModDate(options.mtime != null ? options.mtime : new Date()); - if (options.mode != null) { - this.setFileAttributesMode(options.mode); - } else { - this.setFileAttributesMode(isDirectory ? 0o40775 : 0o100664); - } - if (isDirectory) { - this.crcAndFileSizeKnown = true; - this.crc32 = 0; - this.uncompressedSize = 0; - this.compressedSize = 0; - } else { - // unknown so far - this.crcAndFileSizeKnown = false; - this.crc32 = null; - this.uncompressedSize = null; - this.compressedSize = null; - if (options.size != null) this.uncompressedSize = options.size; - } - if (isDirectory) { - this.compress = false; - } else { - this.compress = true; // default - if (options.compress != null) this.compress = !!options.compress; - } - this.forceZip64Format = !!options.forceZip64Format; - if (options.fileComment) { - if (typeof options.fileComment === "string") { - this.fileComment = bufferFrom(options.fileComment, "utf-8"); - } else { - // It should be a Buffer - this.fileComment = options.fileComment; - } - if (this.fileComment.length > 0xffff) throw new Error("fileComment is too large"); - } else { - // no comment. - this.fileComment = EMPTY_BUFFER; - } -} -Entry.WAITING_FOR_METADATA = 0; -Entry.READY_TO_PUMP_FILE_DATA = 1; -Entry.FILE_DATA_IN_PROGRESS = 2; -Entry.FILE_DATA_DONE = 3; -Entry.prototype.setLastModDate = function(date) { - var dosDateTime = dateToDosDateTime(date); - this.lastModFileTime = dosDateTime.time; - this.lastModFileDate = dosDateTime.date; -}; -Entry.prototype.setFileAttributesMode = function(mode) { - if ((mode & 0xffff) !== mode) throw new Error("invalid mode. expected: 0 <= " + mode + " <= " + 0xffff); - // http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute/14727#14727 - this.externalFileAttributes = (mode << 16) >>> 0; -}; -// doFileDataPump() should not call pumpEntries() directly. see issue #9. -Entry.prototype.setFileDataPumpFunction = function(doFileDataPump) { - this.doFileDataPump = doFileDataPump; - this.state = Entry.READY_TO_PUMP_FILE_DATA; -}; -Entry.prototype.useZip64Format = function() { - return ( - (this.forceZip64Format) || - (this.uncompressedSize != null && this.uncompressedSize > 0xfffffffe) || - (this.compressedSize != null && this.compressedSize > 0xfffffffe) || - (this.relativeOffsetOfLocalHeader != null && this.relativeOffsetOfLocalHeader > 0xfffffffe) - ); -} -var LOCAL_FILE_HEADER_FIXED_SIZE = 30; -var VERSION_NEEDED_TO_EXTRACT_UTF8 = 20; -var VERSION_NEEDED_TO_EXTRACT_ZIP64 = 45; -// 3 = unix. 63 = spec version 6.3 -var VERSION_MADE_BY = (3 << 8) | 63; -var FILE_NAME_IS_UTF8 = 1 << 11; -var UNKNOWN_CRC32_AND_FILE_SIZES = 1 << 3; -Entry.prototype.getLocalFileHeader = function() { - var crc32 = 0; - var compressedSize = 0; - var uncompressedSize = 0; - if (this.crcAndFileSizeKnown) { - crc32 = this.crc32; - compressedSize = this.compressedSize; - uncompressedSize = this.uncompressedSize; - } - - var fixedSizeStuff = bufferAlloc(LOCAL_FILE_HEADER_FIXED_SIZE); - var generalPurposeBitFlag = FILE_NAME_IS_UTF8; - if (!this.crcAndFileSizeKnown) generalPurposeBitFlag |= UNKNOWN_CRC32_AND_FILE_SIZES; - - // local file header signature 4 bytes (0x04034b50) - fixedSizeStuff.writeUInt32LE(0x04034b50, 0); - // version needed to extract 2 bytes - fixedSizeStuff.writeUInt16LE(VERSION_NEEDED_TO_EXTRACT_UTF8, 4); - // general purpose bit flag 2 bytes - fixedSizeStuff.writeUInt16LE(generalPurposeBitFlag, 6); - // compression method 2 bytes - fixedSizeStuff.writeUInt16LE(this.getCompressionMethod(), 8); - // last mod file time 2 bytes - fixedSizeStuff.writeUInt16LE(this.lastModFileTime, 10); - // last mod file date 2 bytes - fixedSizeStuff.writeUInt16LE(this.lastModFileDate, 12); - // crc-32 4 bytes - fixedSizeStuff.writeUInt32LE(crc32, 14); - // compressed size 4 bytes - fixedSizeStuff.writeUInt32LE(compressedSize, 18); - // uncompressed size 4 bytes - fixedSizeStuff.writeUInt32LE(uncompressedSize, 22); - // file name length 2 bytes - fixedSizeStuff.writeUInt16LE(this.utf8FileName.length, 26); - // extra field length 2 bytes - fixedSizeStuff.writeUInt16LE(0, 28); - return Buffer.concat([ - fixedSizeStuff, - // file name (variable size) - this.utf8FileName, - // extra field (variable size) - // no extra fields - ]); -}; -var DATA_DESCRIPTOR_SIZE = 16; -var ZIP64_DATA_DESCRIPTOR_SIZE = 24; -Entry.prototype.getDataDescriptor = function() { - if (this.crcAndFileSizeKnown) { - // the Mac Archive Utility requires this not be present unless we set general purpose bit 3 - return EMPTY_BUFFER; - } - if (!this.useZip64Format()) { - var buffer = bufferAlloc(DATA_DESCRIPTOR_SIZE); - // optional signature (required according to Archive Utility) - buffer.writeUInt32LE(0x08074b50, 0); - // crc-32 4 bytes - buffer.writeUInt32LE(this.crc32, 4); - // compressed size 4 bytes - buffer.writeUInt32LE(this.compressedSize, 8); - // uncompressed size 4 bytes - buffer.writeUInt32LE(this.uncompressedSize, 12); - return buffer; - } else { - // ZIP64 format - var buffer = bufferAlloc(ZIP64_DATA_DESCRIPTOR_SIZE); - // optional signature (unknown if anyone cares about this) - buffer.writeUInt32LE(0x08074b50, 0); - // crc-32 4 bytes - buffer.writeUInt32LE(this.crc32, 4); - // compressed size 8 bytes - writeUInt64LE(buffer, this.compressedSize, 8); - // uncompressed size 8 bytes - writeUInt64LE(buffer, this.uncompressedSize, 16); - return buffer; - } -}; -var CENTRAL_DIRECTORY_RECORD_FIXED_SIZE = 46; -var ZIP64_EXTENDED_INFORMATION_EXTRA_FIELD_SIZE = 28; -Entry.prototype.getCentralDirectoryRecord = function() { - var fixedSizeStuff = bufferAlloc(CENTRAL_DIRECTORY_RECORD_FIXED_SIZE); - var generalPurposeBitFlag = FILE_NAME_IS_UTF8; - if (!this.crcAndFileSizeKnown) generalPurposeBitFlag |= UNKNOWN_CRC32_AND_FILE_SIZES; - - var normalCompressedSize = this.compressedSize; - var normalUncompressedSize = this.uncompressedSize; - var normalRelativeOffsetOfLocalHeader = this.relativeOffsetOfLocalHeader; - var versionNeededToExtract; - var zeiefBuffer; - if (this.useZip64Format()) { - normalCompressedSize = 0xffffffff; - normalUncompressedSize = 0xffffffff; - normalRelativeOffsetOfLocalHeader = 0xffffffff; - versionNeededToExtract = VERSION_NEEDED_TO_EXTRACT_ZIP64; - - // ZIP64 extended information extra field - zeiefBuffer = bufferAlloc(ZIP64_EXTENDED_INFORMATION_EXTRA_FIELD_SIZE); - // 0x0001 2 bytes Tag for this "extra" block type - zeiefBuffer.writeUInt16LE(0x0001, 0); - // Size 2 bytes Size of this "extra" block - zeiefBuffer.writeUInt16LE(ZIP64_EXTENDED_INFORMATION_EXTRA_FIELD_SIZE - 4, 2); - // Original Size 8 bytes Original uncompressed file size - writeUInt64LE(zeiefBuffer, this.uncompressedSize, 4); - // Compressed Size 8 bytes Size of compressed data - writeUInt64LE(zeiefBuffer, this.compressedSize, 12); - // Relative Header Offset 8 bytes Offset of local header record - writeUInt64LE(zeiefBuffer, this.relativeOffsetOfLocalHeader, 20); - // Disk Start Number 4 bytes Number of the disk on which this file starts - // (omit) - } else { - versionNeededToExtract = VERSION_NEEDED_TO_EXTRACT_UTF8; - zeiefBuffer = EMPTY_BUFFER; - } - - // central file header signature 4 bytes (0x02014b50) - fixedSizeStuff.writeUInt32LE(0x02014b50, 0); - // version made by 2 bytes - fixedSizeStuff.writeUInt16LE(VERSION_MADE_BY, 4); - // version needed to extract 2 bytes - fixedSizeStuff.writeUInt16LE(versionNeededToExtract, 6); - // general purpose bit flag 2 bytes - fixedSizeStuff.writeUInt16LE(generalPurposeBitFlag, 8); - // compression method 2 bytes - fixedSizeStuff.writeUInt16LE(this.getCompressionMethod(), 10); - // last mod file time 2 bytes - fixedSizeStuff.writeUInt16LE(this.lastModFileTime, 12); - // last mod file date 2 bytes - fixedSizeStuff.writeUInt16LE(this.lastModFileDate, 14); - // crc-32 4 bytes - fixedSizeStuff.writeUInt32LE(this.crc32, 16); - // compressed size 4 bytes - fixedSizeStuff.writeUInt32LE(normalCompressedSize, 20); - // uncompressed size 4 bytes - fixedSizeStuff.writeUInt32LE(normalUncompressedSize, 24); - // file name length 2 bytes - fixedSizeStuff.writeUInt16LE(this.utf8FileName.length, 28); - // extra field length 2 bytes - fixedSizeStuff.writeUInt16LE(zeiefBuffer.length, 30); - // file comment length 2 bytes - fixedSizeStuff.writeUInt16LE(this.fileComment.length, 32); - // disk number start 2 bytes - fixedSizeStuff.writeUInt16LE(0, 34); - // internal file attributes 2 bytes - fixedSizeStuff.writeUInt16LE(0, 36); - // external file attributes 4 bytes - fixedSizeStuff.writeUInt32LE(this.externalFileAttributes, 38); - // relative offset of local header 4 bytes - fixedSizeStuff.writeUInt32LE(normalRelativeOffsetOfLocalHeader, 42); - - return Buffer.concat([ - fixedSizeStuff, - // file name (variable size) - this.utf8FileName, - // extra field (variable size) - zeiefBuffer, - // file comment (variable size) - this.fileComment, - ]); -}; -Entry.prototype.getCompressionMethod = function() { - var NO_COMPRESSION = 0; - var DEFLATE_COMPRESSION = 8; - return this.compress ? DEFLATE_COMPRESSION : NO_COMPRESSION; -}; - -function dateToDosDateTime(jsDate) { - var date = 0; - date |= jsDate.getDate() & 0x1f; // 1-31 - date |= ((jsDate.getMonth() + 1) & 0xf) << 5; // 0-11, 1-12 - date |= ((jsDate.getFullYear() - 1980) & 0x7f) << 9; // 0-128, 1980-2108 - - var time = 0; - time |= Math.floor(jsDate.getSeconds() / 2); // 0-59, 0-29 (lose odd numbers) - time |= (jsDate.getMinutes() & 0x3f) << 5; // 0-59 - time |= (jsDate.getHours() & 0x1f) << 11; // 0-23 - - return {date: date, time: time}; -} - -function writeUInt64LE(buffer, n, offset) { - // can't use bitshift here, because JavaScript only allows bitshifting on 32-bit integers. - var high = Math.floor(n / 0x100000000); - var low = n % 0x100000000; - buffer.writeUInt32LE(low, offset); - buffer.writeUInt32LE(high, offset + 4); -} - -function defaultCallback(err) { - if (err) throw err; -} - -util.inherits(ByteCounter, Transform); -function ByteCounter(options) { - Transform.call(this, options); - this.byteCount = 0; -} -ByteCounter.prototype._transform = function(chunk, encoding, cb) { - this.byteCount += chunk.length; - cb(null, chunk); -}; - -util.inherits(Crc32Watcher, Transform); -function Crc32Watcher(options) { - Transform.call(this, options); - this.crc32 = 0; -} -Crc32Watcher.prototype._transform = function(chunk, encoding, cb) { - this.crc32 = crc32.unsigned(chunk, this.crc32); - cb(null, chunk); -}; - -var cp437 = '\u0000☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ '; -if (cp437.length !== 256) throw new Error("assertion failure"); -var reverseCp437 = null; - -function encodeCp437(string) { - if (/^[\x20-\x7e]*$/.test(string)) { - // CP437, ASCII, and UTF-8 overlap in this range. - return bufferFrom(string, "utf-8"); - } - - // This is the slow path. - if (reverseCp437 == null) { - // cache this once - reverseCp437 = {}; - for (var i = 0; i < cp437.length; i++) { - reverseCp437[cp437[i]] = i; - } - } - - var result = bufferAlloc(string.length); - for (var i = 0; i < string.length; i++) { - var b = reverseCp437[string[i]]; - if (b == null) throw new Error("character not encodable in CP437: " + JSON.stringify(string[i])); - result[i] = b; - } - - return result; -} - -function bufferAlloc(size) { - bufferAlloc = modern; - try { - return bufferAlloc(size); - } catch (e) { - bufferAlloc = legacy; - return bufferAlloc(size); - } - function modern(size) { - return Buffer.allocUnsafe(size); - } - function legacy(size) { - return new Buffer(size); - } -} -function bufferFrom(something, encoding) { - bufferFrom = modern; - try { - return bufferFrom(something, encoding); - } catch (e) { - bufferFrom = legacy; - return bufferFrom(something, encoding); - } - function modern(something, encoding) { - return Buffer.from(something, encoding); - } - function legacy(something, encoding) { - return new Buffer(something, encoding); - } -} -function bufferIncludes(buffer, content) { - bufferIncludes = modern; - try { - return bufferIncludes(buffer, content); - } catch (e) { - bufferIncludes = legacy; - return bufferIncludes(buffer, content); - } - function modern(buffer, content) { - return buffer.includes(content); - } - function legacy(buffer, content) { - for (var i = 0; i <= buffer.length - content.length; i++) { - for (var j = 0;; j++) { - if (j === content.length) return true; - if (buffer[i + j] !== content[j]) break; - } - } - return false; - } -} diff --git a/node_modules/yazl/package.json b/node_modules/yazl/package.json deleted file mode 100644 index 3e0934f2..00000000 --- a/node_modules/yazl/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_from": "yazl@^2.2.1", - "_id": "yazl@2.5.1", - "_inBundle": false, - "_integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", - "_location": "/yazl", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "yazl@^2.2.1", - "name": "yazl", - "escapedName": "yazl", - "rawSpec": "^2.2.1", - "saveSpec": null, - "fetchSpec": "^2.2.1" - }, - "_requiredBy": [ - "/gulp-vinyl-zip" - ], - "_resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", - "_shasum": "a3d65d3dd659a5b0937850e8609f22fffa2b5c35", - "_spec": "yazl@^2.2.1", - "_where": "/Users/mark.plummer/repos/docs.thoughtspot.com/node_modules/gulp-vinyl-zip", - "author": { - "name": "Josh Wolfe", - "email": "thejoshwolfe@gmail.com" - }, - "bugs": { - "url": "https://github.com/thejoshwolfe/yazl/issues" - }, - "bundleDependencies": false, - "dependencies": { - "buffer-crc32": "~0.2.3" - }, - "deprecated": false, - "description": "yet another zip library for node", - "devDependencies": { - "bl": "~0.9.3", - "istanbul": "^0.4.5", - "yauzl": "~2.3.1" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/thejoshwolfe/yazl", - "keywords": [ - "zip", - "stream", - "archive", - "file" - ], - "license": "MIT", - "main": "index.js", - "name": "yazl", - "repository": { - "type": "git", - "url": "git+https://github.com/thejoshwolfe/yazl.git" - }, - "scripts": { - "test": "node test/test.js", - "test-cov": "istanbul cover test/test.js", - "test-travis": "istanbul cover --report lcovonly test/test.js" - }, - "version": "2.5.1" -} diff --git a/package-lock.json b/package-lock.json index b1494850..a9f81d80 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,213 +1,2668 @@ { + "name": "docs.thoughtspot.com", + "lockfileVersion": 2, "requires": true, - "lockfileVersion": 1, + "packages": { + "": { + "dependencies": { + "@asciidoctor/tabs": "^1.0.0-beta.6" + }, + "devDependencies": { + "antora": "3.1.7" + } + }, + "node_modules/@antora/asciidoc-loader": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/asciidoc-loader/-/asciidoc-loader-3.1.7.tgz", + "integrity": "sha512-sM/poPtAi8Cx0g2oLGHoEYjTdE9pvIYLgbHW07fGf6c9wQYMd2DMsevtbhNKWp+xqxj/QinToz4JOaNLoy1nfg==", + "dev": true, + "dependencies": { + "@antora/logger": "3.1.7", + "@antora/user-require-helper": "~2.0", + "@asciidoctor/core": "~2.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/cli": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/cli/-/cli-3.1.7.tgz", + "integrity": "sha512-yHo30VmiLLsZU4JW8VZR6fql9m5lIxocA2d0tduKQ+r4YSD1kt+bbwX3You3iMwW7oLoNo62zfU76F8CQBnm2g==", + "dev": true, + "dependencies": { + "@antora/logger": "3.1.7", + "@antora/playbook-builder": "3.1.7", + "@antora/user-require-helper": "~2.0", + "commander": "~10.0" + }, + "bin": { + "antora": "bin/antora" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/content-aggregator": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/content-aggregator/-/content-aggregator-3.1.7.tgz", + "integrity": "sha512-2gBbxaDxqY4QRw9Vut0IbKNqI9zAAohxjT0zcA5Am10kE3ywvzXaBa3tvb+A7vUl/vRcCC0LPM7pO37RVrbsGA==", + "dev": true, + "dependencies": { + "@antora/expand-path-helper": "~2.0", + "@antora/logger": "3.1.7", + "@antora/user-require-helper": "~2.0", + "braces": "~3.0", + "cache-directory": "~2.0", + "glob-stream": "~7.0", + "hpagent": "~1.2", + "isomorphic-git": "~1.25", + "js-yaml": "~4.1", + "multi-progress": "~4.0", + "picomatch": "~2.3", + "progress": "~2.0", + "should-proxy": "~1.0", + "simple-get": "~4.0", + "vinyl": "~2.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/content-classifier": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/content-classifier/-/content-classifier-3.1.7.tgz", + "integrity": "sha512-94XwJ35pkWJU6dJqQg5oreJRCkaXwU6yw9XSyB731o4i/0romkazKnu7deHugqdgvzqn92AlMRG6R0clhJLEsw==", + "dev": true, + "dependencies": { + "@antora/asciidoc-loader": "3.1.7", + "@antora/logger": "3.1.7", + "mime-types": "~2.1", + "vinyl": "~2.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/document-converter": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/document-converter/-/document-converter-3.1.7.tgz", + "integrity": "sha512-cRVJf7QyclxjWbA0gWz7hncZYThIREikkwaxaa26LsRCfBNlw7wxs7lWejvIvEl1LVshupbinJwKUPPQPOsHhw==", + "dev": true, + "dependencies": { + "@antora/asciidoc-loader": "3.1.7" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/expand-path-helper": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@antora/expand-path-helper/-/expand-path-helper-2.0.0.tgz", + "integrity": "sha512-CSMBGC+tI21VS2kGW3PV7T2kQTM5eT3f2GTPVLttwaNYbNxDve08en/huzszHJfxo11CcEs26Ostr0F2c1QqeA==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/@antora/file-publisher": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/file-publisher/-/file-publisher-3.1.7.tgz", + "integrity": "sha512-UH2o0DJuv9BJvWgn+QSE3MhtHB3oN3lG5lJkV3fQi1jAV+qPIHoiTIYhbw02mj5KQ3Qbt7YWWAKZKuGl3rEdjg==", + "dev": true, + "dependencies": { + "@antora/expand-path-helper": "~2.0", + "@antora/user-require-helper": "~2.0", + "@vscode/gulp-vinyl-zip": "~2.5", + "vinyl": "~2.2", + "vinyl-fs": "~3.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/logger": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/logger/-/logger-3.1.7.tgz", + "integrity": "sha512-Z2tfNIi9G4BnAZq26Kp30974FxCVCtvH46FOi6ClnkJg6Uf2gTrVlJERmtsDTsHjWsf1qKbnj/4b99/AU31iQg==", + "dev": true, + "dependencies": { + "@antora/expand-path-helper": "~2.0", + "pino": "~8.14", + "pino-pretty": "~10.0", + "sonic-boom": "~3.3" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/navigation-builder": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/navigation-builder/-/navigation-builder-3.1.7.tgz", + "integrity": "sha512-QvMPb0qY1zfgyLCfuEhJOpO5qSVjaVe5X/bQjSii9vDGgpIEiC2yt/hgqER37E/3zsBGEZvCH5lSLk1c7x0+EQ==", + "dev": true, + "dependencies": { + "@antora/asciidoc-loader": "3.1.7" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/page-composer": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/page-composer/-/page-composer-3.1.7.tgz", + "integrity": "sha512-zJMzYznPT6Vd59nEXio/2rolkX070Nup6g4a8d4RCz0WoE8dmMidw6XFgjAHr0Lyh14/FHgBPlYXfhkDFR16Mw==", + "dev": true, + "dependencies": { + "@antora/logger": "3.1.7", + "handlebars": "~4.7", + "require-from-string": "~2.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/playbook-builder": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/playbook-builder/-/playbook-builder-3.1.7.tgz", + "integrity": "sha512-lU80S1BqUy9DvqziEzRwpYTaWhOshxgrGAjf/F5VjAIaHCGVx0rZgfoI2rgFFkbVaH94kauOngdtTXDPXC1fPQ==", + "dev": true, + "dependencies": { + "@iarna/toml": "~2.2", + "convict": "~6.2", + "js-yaml": "~4.1", + "json5": "~2.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/redirect-producer": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/redirect-producer/-/redirect-producer-3.1.7.tgz", + "integrity": "sha512-6zAHfcOb0v0829nAbn/3HMilbactjbjU7zBT9Iy6JHQfbqXT/g/mUT9N13Lj/wbq/nm0qKQJweB0Mi6BS2fbMw==", + "dev": true, + "dependencies": { + "vinyl": "~2.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/site-generator": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/site-generator/-/site-generator-3.1.7.tgz", + "integrity": "sha512-39KWip9bLdQ+4ssyqjI+O0COquKHxoeznxY2/3w5pNZEoeTg8cD7kOsnWfbocw0R3Rj+kJV5MnqICFNq0nuPeA==", + "dev": true, + "dependencies": { + "@antora/asciidoc-loader": "3.1.7", + "@antora/content-aggregator": "3.1.7", + "@antora/content-classifier": "3.1.7", + "@antora/document-converter": "3.1.7", + "@antora/file-publisher": "3.1.7", + "@antora/logger": "3.1.7", + "@antora/navigation-builder": "3.1.7", + "@antora/page-composer": "3.1.7", + "@antora/playbook-builder": "3.1.7", + "@antora/redirect-producer": "3.1.7", + "@antora/site-mapper": "3.1.7", + "@antora/site-publisher": "3.1.7", + "@antora/ui-loader": "3.1.7", + "@antora/user-require-helper": "~2.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/site-mapper": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/site-mapper/-/site-mapper-3.1.7.tgz", + "integrity": "sha512-x++89btbwk8FxyU2+H/RHQMnsC9sdvQvXcwXwNt11eXN1qj7t8TPiQZTalg7gkf0/osY4l7JRpGBY5JJfOJVig==", + "dev": true, + "dependencies": { + "@antora/content-classifier": "3.1.7", + "vinyl": "~2.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/site-publisher": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/site-publisher/-/site-publisher-3.1.7.tgz", + "integrity": "sha512-zHaJc7UeBfFSIhBbQ5U5Ud4u671M84oqSJb3pPxlUiJDP7iVJlSl+0GNm0NAIoDizjPtVksUI88fzqCy5rfSUQ==", + "dev": true, + "dependencies": { + "@antora/file-publisher": "3.1.7" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/ui-loader": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/ui-loader/-/ui-loader-3.1.7.tgz", + "integrity": "sha512-79QuZB0c91dveoESa3RcE18ZZFJo0rDZX9aJKHVc20dInQBGCgfURPqB2OytkzaXD3lNtDJ41yjKNYZqsAQy1Q==", + "dev": true, + "dependencies": { + "@antora/expand-path-helper": "~2.0", + "@vscode/gulp-vinyl-zip": "~2.5", + "braces": "~3.0", + "cache-directory": "~2.0", + "glob-stream": "~7.0", + "hpagent": "~1.2", + "js-yaml": "~4.1", + "picomatch": "~2.3", + "should-proxy": "~1.0", + "simple-get": "~4.0", + "vinyl": "~2.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/user-require-helper": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@antora/user-require-helper/-/user-require-helper-2.0.0.tgz", + "integrity": "sha512-5fMfBZfw4zLoFdDAPMQX6Frik90uvfD8rXOA4UpXPOUikkX4uT1Rk6m0/4oi8oS3fcjiIl0k/7Nc+eTxW5TcQQ==", + "dev": true, + "dependencies": { + "@antora/expand-path-helper": "~2.0" + }, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/@asciidoctor/core": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/@asciidoctor/core/-/core-2.2.6.tgz", + "integrity": "sha512-TmB2K5UfpDpSbCNBBntXzKHcAk2EA3/P68jmWvmJvglVUdkO9V6kTAuXVe12+h6C4GK0ndwuCrHHtEVcL5t6pQ==", + "dev": true, + "dependencies": { + "asciidoctor-opal-runtime": "0.3.3", + "unxhr": "1.0.1" + }, + "engines": { + "node": ">=8.11", + "npm": ">=5.0.0", + "yarn": ">=1.1.0" + } + }, + "node_modules/@asciidoctor/tabs": { + "version": "1.0.0-beta.6", + "resolved": "https://registry.npmjs.org/@asciidoctor/tabs/-/tabs-1.0.0-beta.6.tgz", + "integrity": "sha512-gGZnW7UfRXnbiyKNd9PpGKtSuD8+DsqaaTSbQ1dHVkZ76NaolLhdQg8RW6/xqN3pX1vWZEcF4e81+Oe9rNRWxg==", + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@iarna/toml": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz", + "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==", + "dev": true + }, + "node_modules/@vscode/gulp-vinyl-zip": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@vscode/gulp-vinyl-zip/-/gulp-vinyl-zip-2.5.0.tgz", + "integrity": "sha512-PP/xkOoLBSY3V04HmzRxF+NOxkRJ/m2D0YwWpfx1FCFv5G8+sZUGPvxX+LRgdJ5vQcR1RHck5x1IkHi75Qjdbw==", + "dev": true, + "dependencies": { + "queue": "^4.2.1", + "through": "^2.3.8", + "through2": "^2.0.3", + "vinyl": "^2.0.2", + "vinyl-fs": "^3.0.3", + "yauzl": "^2.2.1", + "yazl": "^2.2.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dev": true, + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/antora": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/antora/-/antora-3.1.7.tgz", + "integrity": "sha512-8MHjWYhzSnf2cVk/fonGw7SvYu9G+gNAhS0VX3jkGou6dBHFxgqlnrlzteXgeGd5rtixMVLIwvrQgEomA2LLpQ==", + "dev": true, + "dependencies": { + "@antora/cli": "3.1.7", + "@antora/site-generator": "3.1.7" + }, + "bin": { + "antora": "bin/antora" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/append-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", + "integrity": "sha512-WLbYiXzD3y/ATLZFufV/rZvWdZOs+Z/+5v1rBZ463Jn398pa6kcde27cvozYnBoxXblGZTFfoPpsaEw0orU5BA==", + "dev": true, + "dependencies": { + "buffer-equal": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/asciidoctor-opal-runtime": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/asciidoctor-opal-runtime/-/asciidoctor-opal-runtime-0.3.3.tgz", + "integrity": "sha512-/CEVNiOia8E5BMO9FLooo+Kv18K4+4JBFRJp8vUy/N5dMRAg+fRNV4HA+o6aoSC79jVU/aT5XvUpxSxSsTS8FQ==", + "dev": true, + "dependencies": { + "glob": "7.1.3", + "unxhr": "1.0.1" + }, + "engines": { + "node": ">=8.11" + } + }, + "node_modules/async-lock": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.1.tgz", + "integrity": "sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==", + "dev": true + }, + "node_modules/atomic-sleep": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", + "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/buffer-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.1.tgz", + "integrity": "sha512-QoV3ptgEaQpvVwbXdSO39iqPQTCxSF7A5U99AxbHYqUdCizL/lH2Z0A2y6nbZucxMEOtNyZfG2s6gsVugGpKkg==", + "dev": true, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/cache-directory": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/cache-directory/-/cache-directory-2.0.0.tgz", + "integrity": "sha512-7YKEapH+2Uikde8hySyfobXBqPKULDyHNl/lhKm7cKf/GJFdG/tU/WpLrOg2y9aUrQrWUilYqawFIiGJPS6gDA==", + "dev": true, + "dependencies": { + "xdg-basedir": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/clean-git-ref": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/clean-git-ref/-/clean-git-ref-2.0.1.tgz", + "integrity": "sha512-bLSptAy2P0s6hU4PzuIMKmMJJSE6gLXGH1cntDu7bWJUksvuM+7ReOK61mozULErYvP6a15rnYl0zFDef+pyPw==", + "dev": true + }, + "node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha512-KLLTJWrvwIP+OPfMn0x2PheDEP20RPUcGXj/ERegTgdmPEZylALQldygiqrPPu8P45uNuPs7ckmReLY6v/iA5g==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag==", + "dev": true + }, + "node_modules/cloneable-readable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", + "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + } + }, + "node_modules/cloneable-readable/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/cloneable-readable/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/cloneable-readable/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "node_modules/convict": { + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/convict/-/convict-6.2.4.tgz", + "integrity": "sha512-qN60BAwdMVdofckX7AlohVJ2x9UvjTNoKVXCL2LxFk1l7757EJqf1nySdMkPQer0bt8kQ5lQiyZ9/2NvrFBuwQ==", + "dev": true, + "dependencies": { + "lodash.clonedeep": "^4.5.0", + "yargs-parser": "^20.2.7" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "dev": true, + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/dateformat": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", + "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/diff3": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/diff3/-/diff3-0.0.3.tgz", + "integrity": "sha512-iSq8ngPOt0K53A6eVr4d5Kn6GNrM2nQZtC740pzIriHtn4pOQ2lyzEXQMBeVcWERN0ye7fhBsk9PbLLQOnUx/g==", + "dev": true + }, + "node_modules/duplexify": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", + "integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.4.1", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1", + "stream-shift": "^1.0.0" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/fast-copy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-3.0.1.tgz", + "integrity": "sha512-Knr7NOtK3HWRYGtHoJrjkaWepqT8thIVGAwt0p0aUs1zqkAzXZV4vo9fFNwyb5fcqK1GKYFYxldQdIDVKhUAfA==", + "dev": true + }, + "node_modules/fast-redact": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.3.0.tgz", + "integrity": "sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "dev": true + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "node_modules/flush-write-stream/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/flush-write-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/flush-write-stream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/fs-mkdirp-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", + "integrity": "sha512-+vSd9frUnapVC2RZYfL3FCB2p3g4TBhaUmrsWlSudsGdnxIuUvBB2QM1VZeBtc49QFwrp+wQLrDs3+xxDgI5gQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.11", + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob-stream": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-7.0.0.tgz", + "integrity": "sha512-evR4kvr6s0Yo5t4CD4H171n4T8XcnPFznvsbeN8K9FPzc0Q0wYqcOWyGtck2qcvJSLXKnU6DnDyfmbDDabYvRQ==", + "dev": true, + "dependencies": { + "extend": "^3.0.2", + "glob": "^7.2.0", + "glob-parent": "^6.0.2", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.1", + "pumpify": "^2.0.1", + "readable-stream": "^3.6.0", + "remove-trailing-separator": "^1.1.0", + "to-absolute-glob": "^2.0.2", + "unique-stream": "^2.3.1" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob-stream/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/help-me": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/help-me/-/help-me-4.2.0.tgz", + "integrity": "sha512-TAOnTB8Tz5Dw8penUuzHVrKNKlCIbwwbHnXraNJxPwf8LRtE2HlM84RYuezMFcwOJmoYOCWVDyJ8TQGxn9PgxA==", + "dev": true, + "dependencies": { + "glob": "^8.0.0", + "readable-stream": "^3.6.0" + } + }, + "node_modules/help-me/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/help-me/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/help-me/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/hpagent": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hpagent/-/hpagent-1.2.0.tgz", + "integrity": "sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA==", + "dev": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "dependencies": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-negated-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", + "integrity": "sha512-czXVVn/QEmgvej1f50BZ648vUI+em0xqMq2Sn+QncCLN4zj1UAxlT+kw/6ggQTOaZPd1HqKQGEqbpQVtJucWug==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "dependencies": { + "is-unc-path": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "dependencies": { + "unc-path-regex": "^0.1.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", + "dev": true + }, + "node_modules/is-valid-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha512-AhiROmoEFDSsjx8hW+5sGwgKVIORcXnrlAx/R0ZSeaPw70Vw0CqkGBBhHGL58Uox2eXnU1AnvXJl1XlyedO5bA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/isomorphic-git": { + "version": "1.25.6", + "resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.25.6.tgz", + "integrity": "sha512-zA3k3QOO7doqOnBgwsaXJwHKSIIl5saEdH4xxalu082WHVES4KghsG6RE2SDwjXMCIlNa1bWocbitH6bRIrmLQ==", + "dev": true, + "dependencies": { + "async-lock": "^1.1.0", + "clean-git-ref": "^2.0.1", + "crc-32": "^1.2.0", + "diff3": "0.0.3", + "ignore": "^5.1.4", + "minimisted": "^2.0.0", + "pako": "^1.0.10", + "pify": "^4.0.1", + "readable-stream": "^3.4.0", + "sha.js": "^2.4.9", + "simple-get": "^4.0.1" + }, + "bin": { + "isogit": "cli.cjs" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "dev": true, + "dependencies": { + "readable-stream": "^2.0.5" + }, + "engines": { + "node": ">= 0.6.3" + } + }, + "node_modules/lazystream/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/lazystream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/lazystream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/lead": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", + "integrity": "sha512-IpSVCk9AYvLHo5ctcIXxOBpMWUe+4TKN3VPWAKUbJikkmsGp0VrSM8IttVc32D6J4WUsiPE6aEFRNmIoF/gdow==", + "dev": true, + "dependencies": { + "flush-write-stream": "^1.0.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "dev": true + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minimisted": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minimisted/-/minimisted-2.0.1.tgz", + "integrity": "sha512-1oPjfuLQa2caorJUM8HV8lGgWCc0qqAO1MNv/k05G4qslmsndV/5WdNZrqCiyqiz3wohia2Ij2B7w2Dr7/IyrA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + } + }, + "node_modules/multi-progress": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/multi-progress/-/multi-progress-4.0.0.tgz", + "integrity": "sha512-9zcjyOou3FFCKPXsmkbC3ethv51SFPoA4dJD6TscIp2pUmy26kBDZW6h9XofPELrzseSkuD7r0V+emGEeo39Pg==", + "dev": true, + "peerDependencies": { + "progress": "^2.0.0" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dev": true, + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/now-and-later": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", + "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", + "dev": true, + "dependencies": { + "once": "^1.3.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-exit-leak-free": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz", + "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/ordered-read-streams": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", + "integrity": "sha512-Z87aSjx3r5c0ZB7bcJqIgIRX5bxR7A4aSzvIbaxd0oTkWBCOoKfuGHiKj60CHVUgg1Phm5yMZzBdt8XqRs73Mw==", + "dev": true, + "dependencies": { + "readable-stream": "^2.0.1" + } + }, + "node_modules/ordered-read-streams/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/ordered-read-streams/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/ordered-read-streams/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "node_modules/path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==", + "dev": true + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/pino": { + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/pino/-/pino-8.14.2.tgz", + "integrity": "sha512-zKu9aWeSWTy1JgvxIpZveJKKsAr4+6uNMZ0Vf0KRwzl/UNZA3XjHiIl/0WwqLMkDwuHuDkT5xAgPA2jpKq4whA==", + "dev": true, + "dependencies": { + "atomic-sleep": "^1.0.0", + "fast-redact": "^3.1.1", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "v1.0.0", + "pino-std-serializers": "^6.0.0", + "process-warning": "^2.0.0", + "quick-format-unescaped": "^4.0.3", + "real-require": "^0.2.0", + "safe-stable-stringify": "^2.3.1", + "sonic-boom": "^3.1.0", + "thread-stream": "^2.0.0" + }, + "bin": { + "pino": "bin.js" + } + }, + "node_modules/pino-abstract-transport": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.0.0.tgz", + "integrity": "sha512-c7vo5OpW4wIS42hUVcT5REsL8ZljsUfBjqV/e2sFxmFEFZiq1XLUp5EYLtuDH6PEHq9W1egWqRbnLUP5FuZmOA==", + "dev": true, + "dependencies": { + "readable-stream": "^4.0.0", + "split2": "^4.0.0" + } + }, + "node_modules/pino-abstract-transport/node_modules/readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dev": true, + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/pino-pretty": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-10.0.1.tgz", + "integrity": "sha512-yrn00+jNpkvZX/NrPVCPIVHAfTDy3ahF0PND9tKqZk4j9s+loK8dpzrJj4dGb7i+WLuR50ussuTAiWoMWU+qeA==", + "dev": true, + "dependencies": { + "colorette": "^2.0.7", + "dateformat": "^4.6.3", + "fast-copy": "^3.0.0", + "fast-safe-stringify": "^2.1.1", + "help-me": "^4.0.1", + "joycon": "^3.1.1", + "minimist": "^1.2.6", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^1.0.0", + "pump": "^3.0.0", + "readable-stream": "^4.0.0", + "secure-json-parse": "^2.4.0", + "sonic-boom": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "bin": { + "pino-pretty": "bin.js" + } + }, + "node_modules/pino-pretty/node_modules/readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dev": true, + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/pino-std-serializers": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-6.2.2.tgz", + "integrity": "sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==", + "dev": true + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/process-warning": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-2.3.2.tgz", + "integrity": "sha512-n9wh8tvBe5sFmsqlg+XQhaQLumwpqoAUruLwjCopgTmUBjJ/fjtBsJzKleCaIGBOMXYEhp1YfKl4d7rJ5ZKJGA==", + "dev": true + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/pumpify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-2.0.1.tgz", + "integrity": "sha512-m7KOje7jZxrmutanlkS1daj1dS6z6BgslzOXmcSEpIlCxM3VJH7lG5QLeck/6hgF6F4crFf01UtQmNsJfweTAw==", + "dev": true, + "dependencies": { + "duplexify": "^4.1.1", + "inherits": "^2.0.3", + "pump": "^3.0.0" + } + }, + "node_modules/queue": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/queue/-/queue-4.5.1.tgz", + "integrity": "sha512-AMD7w5hRXcFSb8s9u38acBZ+309u6GsiibP4/0YacJeaurRshogB7v/ZcVPxP5gD5+zIw6ixRHdutiYUJfwKHw==", + "dev": true, + "dependencies": { + "inherits": "~2.0.0" + } + }, + "node_modules/quick-format-unescaped": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", + "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==", + "dev": true + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/real-require": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", + "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==", + "dev": true, + "engines": { + "node": ">= 12.13.0" + } + }, + "node_modules/remove-bom-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", + "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5", + "is-utf8": "^0.2.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/remove-bom-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", + "integrity": "sha512-wigO8/O08XHb8YPzpDDT+QmRANfW6vLqxfaXm1YXhnFf3AkSLyjfG3GEFg4McZkmgL7KvCj5u2KczkvSP6NfHA==", + "dev": true, + "dependencies": { + "remove-bom-buffer": "^3.0.0", + "safe-buffer": "^5.1.0", + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", + "dev": true + }, + "node_modules/replace-ext": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", + "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-options": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", + "integrity": "sha512-NYDgziiroVeDC29xq7bp/CacZERYsA9bXYd1ZmcJlF3BcrZv5pTb4NG7SjdyKDnXZ84aC4vo2u6sNKIA1LCu/A==", + "dev": true, + "dependencies": { + "value-or-function": "^3.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safe-stable-stringify": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", + "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/secure-json-parse": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz", + "integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==", + "dev": true + }, + "node_modules/set-function-length": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", + "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.2", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/should-proxy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/should-proxy/-/should-proxy-1.0.4.tgz", + "integrity": "sha512-RPQhIndEIVUCjkfkQ6rs6sOR6pkxJWCNdxtfG5pP0RVgUYbK5911kLTF0TNcCC0G3YCGd492rMollFT2aTd9iQ==", + "dev": true + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/sonic-boom": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.3.0.tgz", + "integrity": "sha512-LYxp34KlZ1a2Jb8ZQgFCK3niIHzibdwtwNUWKg0qQRzsDoJ3Gfgkf8KdBTFU3SkejDEIlWwnSnpVdOZIhFMl/g==", + "dev": true, + "dependencies": { + "atomic-sleep": "^1.0.0" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "dev": true, + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/stream-shift": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz", + "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==", + "dev": true + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/thread-stream": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-2.4.1.tgz", + "integrity": "sha512-d/Ex2iWd1whipbT681JmTINKw0ZwOUBZm7+Gjs64DHuX34mmw8vJL2bFAaNacaW72zYiTJxSHi5abUuOi5nsfg==", + "dev": true, + "dependencies": { + "real-require": "^0.2.0" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/through2-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", + "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", + "dev": true, + "dependencies": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + }, + "node_modules/through2/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/through2/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/through2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/to-absolute-glob": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", + "integrity": "sha512-rtwLUQEwT8ZeKQbyFJyomBRYXyE16U5VKuy0ftxLMK/PZb2fkOsg5r9kHdauuVDbsNdIBoC/HCthpidamQFXYA==", + "dev": true, + "dependencies": { + "is-absolute": "^1.0.0", + "is-negated-glob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/to-through": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", + "integrity": "sha512-+QIz37Ly7acM4EMdw2PRN389OneM5+d844tirkGp4dPKzI5OE72V9OsbFp+CIYJDahZ41ZV05hNtcPAQUAm9/Q==", + "dev": true, + "dependencies": { + "through2": "^2.0.3" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/uglify-js": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "dev": true, + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unique-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", + "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "dev": true, + "dependencies": { + "json-stable-stringify-without-jsonify": "^1.0.1", + "through2-filter": "^3.0.0" + } + }, + "node_modules/unxhr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unxhr/-/unxhr-1.0.1.tgz", + "integrity": "sha512-MAhukhVHyaLGDjyDYhy8gVjWJyhTECCdNsLwlMoGFoNJ3o79fpQhtQuzmAE4IxCMDwraF4cW8ZjpAV0m9CRQbg==", + "dev": true, + "engines": { + "node": ">=8.11" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/value-or-function": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", + "integrity": "sha512-jdBB2FrWvQC/pnPtIqcLsMaQgjhdb6B7tk1MMyTKapox+tQZbdRP4uLxu/JY0t7fbfDCUMnuelzEYv5GsxHhdg==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", + "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", + "dev": true, + "dependencies": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-fs": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", + "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", + "dev": true, + "dependencies": { + "fs-mkdirp-stream": "^1.0.0", + "glob-stream": "^6.1.0", + "graceful-fs": "^4.0.0", + "is-valid-glob": "^1.0.0", + "lazystream": "^1.0.0", + "lead": "^1.0.0", + "object.assign": "^4.0.4", + "pumpify": "^1.3.5", + "readable-stream": "^2.3.3", + "remove-bom-buffer": "^3.0.0", + "remove-bom-stream": "^1.2.0", + "resolve-options": "^1.1.0", + "through2": "^2.0.0", + "to-through": "^2.0.0", + "value-or-function": "^3.0.0", + "vinyl": "^2.0.0", + "vinyl-sourcemap": "^1.1.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-fs/node_modules/duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "node_modules/vinyl-fs/node_modules/glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", + "dev": true, + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "node_modules/vinyl-fs/node_modules/glob-stream": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", + "integrity": "sha512-uMbLGAP3S2aDOHUDfdoYcdIePUCfysbAd0IAoWVZbeGU/oNQ8asHVSshLDJUPWxfzj8zsCG7/XeHPHTtow0nsw==", + "dev": true, + "dependencies": { + "extend": "^3.0.0", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", + "unique-stream": "^2.0.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-fs/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/vinyl-fs/node_modules/pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/vinyl-fs/node_modules/pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "dependencies": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "node_modules/vinyl-fs/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/vinyl-fs/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/vinyl-fs/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/vinyl-sourcemap": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", + "integrity": "sha512-NiibMgt6VJGJmyw7vtzhctDcfKch4e4n9TBeoWlirb7FMg9/1Ov9k+A5ZRAtywBpRPiyECvQRQllYM8dECegVA==", + "dev": true, + "dependencies": { + "append-buffer": "^1.0.2", + "convert-source-map": "^1.5.0", + "graceful-fs": "^4.1.6", + "normalize-path": "^2.1.1", + "now-and-later": "^2.0.0", + "remove-bom-buffer": "^3.0.0", + "vinyl": "^2.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/xdg-basedir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", + "integrity": "sha512-1Dly4xqlulvPD3fZUQJLY+FUIeqN3N2MM3uqe4rCJftAvOjFa3jFGfctOgluGx4ahPbUCsZkmJILiP0Vi4T6lQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "node_modules/yazl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", + "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", + "dev": true, + "dependencies": { + "buffer-crc32": "~0.2.3" + } + } + }, "dependencies": { "@antora/asciidoc-loader": { - "version": "3.0.0-alpha.7", - "resolved": "https://registry.npmjs.org/@antora/asciidoc-loader/-/asciidoc-loader-3.0.0-alpha.7.tgz", - "integrity": "sha512-PyHNhwQ+4cfB9TrWrIJnxfOGiGmwFnSuZlLqLEe99rnIl2TY6IG8E8pbcak5TzqOM8HJoGtGIx52yZ2hF7a+rw==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/asciidoc-loader/-/asciidoc-loader-3.1.7.tgz", + "integrity": "sha512-sM/poPtAi8Cx0g2oLGHoEYjTdE9pvIYLgbHW07fGf6c9wQYMd2DMsevtbhNKWp+xqxj/QinToz4JOaNLoy1nfg==", "dev": true, "requires": { - "@antora/logger": "3.0.0-alpha.7", + "@antora/logger": "3.1.7", + "@antora/user-require-helper": "~2.0", "@asciidoctor/core": "~2.2" } }, "@antora/cli": { - "version": "3.0.0-alpha.7", - "resolved": "https://registry.npmjs.org/@antora/cli/-/cli-3.0.0-alpha.7.tgz", - "integrity": "sha512-DQSochNSvJIA2FEfRLvYXxL/LzpNcFgwB7ehJ+SCW/yAf3SEuKQo02L3FDVeLb9UtPx8dDdn74/yd+LMOzWJzw==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/cli/-/cli-3.1.7.tgz", + "integrity": "sha512-yHo30VmiLLsZU4JW8VZR6fql9m5lIxocA2d0tduKQ+r4YSD1kt+bbwX3You3iMwW7oLoNo62zfU76F8CQBnm2g==", "dev": true, "requires": { - "@antora/logger": "3.0.0-alpha.7", - "@antora/playbook-builder": "3.0.0-alpha.7", - "commander": "~7.2" + "@antora/logger": "3.1.7", + "@antora/playbook-builder": "3.1.7", + "@antora/user-require-helper": "~2.0", + "commander": "~10.0" } }, "@antora/content-aggregator": { - "version": "3.0.0-alpha.7", - "resolved": "https://registry.npmjs.org/@antora/content-aggregator/-/content-aggregator-3.0.0-alpha.7.tgz", - "integrity": "sha512-YV98rAHCHQXTTAVovHl+RtGfU11mBhSB4rrlmpu2aZGAkSw8x2FMwAx72wJMkIhkWXmGQYdjS2g9jOXcYqjlCA==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/content-aggregator/-/content-aggregator-3.1.7.tgz", + "integrity": "sha512-2gBbxaDxqY4QRw9Vut0IbKNqI9zAAohxjT0zcA5Am10kE3ywvzXaBa3tvb+A7vUl/vRcCC0LPM7pO37RVrbsGA==", "dev": true, "requires": { - "@antora/expand-path-helper": "~1.0", + "@antora/expand-path-helper": "~2.0", + "@antora/logger": "3.1.7", + "@antora/user-require-helper": "~2.0", "braces": "~3.0", "cache-directory": "~2.0", - "camelcase-keys": "~6.2", - "hpagent": "~0.1.0", - "isomorphic-git": "~1.8", + "glob-stream": "~7.0", + "hpagent": "~1.2", + "isomorphic-git": "~1.25", "js-yaml": "~4.1", - "matcher": "~4.0", "multi-progress": "~4.0", "picomatch": "~2.3", "progress": "~2.0", "should-proxy": "~1.0", "simple-get": "~4.0", - "vinyl": "~2.2", - "vinyl-fs": "~3.0" + "vinyl": "~2.2" } }, "@antora/content-classifier": { - "version": "3.0.0-alpha.7", - "resolved": "https://registry.npmjs.org/@antora/content-classifier/-/content-classifier-3.0.0-alpha.7.tgz", - "integrity": "sha512-/hb5MN6ynBdHzvA54cPWbo4/68QrA6/K/zROPh0V/x71OqqYcoC6Qtu3KIaFqBk/XmNCqbXWxMUISl+H5W++tQ==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/content-classifier/-/content-classifier-3.1.7.tgz", + "integrity": "sha512-94XwJ35pkWJU6dJqQg5oreJRCkaXwU6yw9XSyB731o4i/0romkazKnu7deHugqdgvzqn92AlMRG6R0clhJLEsw==", "dev": true, "requires": { - "@antora/logger": "3.0.0-alpha.7", + "@antora/asciidoc-loader": "3.1.7", + "@antora/logger": "3.1.7", "mime-types": "~2.1", "vinyl": "~2.2" } }, "@antora/document-converter": { - "version": "3.0.0-alpha.7", - "resolved": "https://registry.npmjs.org/@antora/document-converter/-/document-converter-3.0.0-alpha.7.tgz", - "integrity": "sha512-nEs5idWvVDw1Ynq0IiqhgMxHSjxfFHgSgd2EW6M9Wam3nxBSMwzQ7G+QqkMLDnzJfk2HbAYseRlIMikyVMc5aQ==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/document-converter/-/document-converter-3.1.7.tgz", + "integrity": "sha512-cRVJf7QyclxjWbA0gWz7hncZYThIREikkwaxaa26LsRCfBNlw7wxs7lWejvIvEl1LVshupbinJwKUPPQPOsHhw==", "dev": true, "requires": { - "@antora/asciidoc-loader": "3.0.0-alpha.7" + "@antora/asciidoc-loader": "3.1.7" } }, "@antora/expand-path-helper": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@antora/expand-path-helper/-/expand-path-helper-1.0.0.tgz", - "integrity": "sha512-hg3y6M3OvRTb7jtLAnwwloYDxafbyKYttcf16kGCXvP7Wqosh7c+Ag+ltaZ7VSebpzpphO/umb/BXdpU7rxapw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@antora/expand-path-helper/-/expand-path-helper-2.0.0.tgz", + "integrity": "sha512-CSMBGC+tI21VS2kGW3PV7T2kQTM5eT3f2GTPVLttwaNYbNxDve08en/huzszHJfxo11CcEs26Ostr0F2c1QqeA==", "dev": true }, + "@antora/file-publisher": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/file-publisher/-/file-publisher-3.1.7.tgz", + "integrity": "sha512-UH2o0DJuv9BJvWgn+QSE3MhtHB3oN3lG5lJkV3fQi1jAV+qPIHoiTIYhbw02mj5KQ3Qbt7YWWAKZKuGl3rEdjg==", + "dev": true, + "requires": { + "@antora/expand-path-helper": "~2.0", + "@antora/user-require-helper": "~2.0", + "@vscode/gulp-vinyl-zip": "~2.5", + "vinyl": "~2.2", + "vinyl-fs": "~3.0" + } + }, "@antora/logger": { - "version": "3.0.0-alpha.7", - "resolved": "https://registry.npmjs.org/@antora/logger/-/logger-3.0.0-alpha.7.tgz", - "integrity": "sha512-NiqhWmaynK/MfhRAPO7BDesPUoCqPobjn+dOMhWoDIFZeqPpYpe8PKnqK1WSA1VQMnRSbwZBqa68RhJdK+RQmg==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/logger/-/logger-3.1.7.tgz", + "integrity": "sha512-Z2tfNIi9G4BnAZq26Kp30974FxCVCtvH46FOi6ClnkJg6Uf2gTrVlJERmtsDTsHjWsf1qKbnj/4b99/AU31iQg==", "dev": true, "requires": { - "@antora/expand-path-helper": "~1.0", - "pino": "~6.11", - "pino-pretty": "~5.1" + "@antora/expand-path-helper": "~2.0", + "pino": "~8.14", + "pino-pretty": "~10.0", + "sonic-boom": "~3.3" } }, "@antora/navigation-builder": { - "version": "3.0.0-alpha.7", - "resolved": "https://registry.npmjs.org/@antora/navigation-builder/-/navigation-builder-3.0.0-alpha.7.tgz", - "integrity": "sha512-69FU/9JNKxvG0N3fQJkSyVi2jkxBmRUV3hLAFkJ6W0k+Memn6L4BVauHCUWBDOK8jIhO/WuAdhkLM0zfQbG8vg==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/navigation-builder/-/navigation-builder-3.1.7.tgz", + "integrity": "sha512-QvMPb0qY1zfgyLCfuEhJOpO5qSVjaVe5X/bQjSii9vDGgpIEiC2yt/hgqER37E/3zsBGEZvCH5lSLk1c7x0+EQ==", "dev": true, "requires": { - "@antora/asciidoc-loader": "3.0.0-alpha.7" + "@antora/asciidoc-loader": "3.1.7" } }, "@antora/page-composer": { - "version": "3.0.0-alpha.7", - "resolved": "https://registry.npmjs.org/@antora/page-composer/-/page-composer-3.0.0-alpha.7.tgz", - "integrity": "sha512-XaujKukaXrulIIiG+dXLieISHxElmNzU/1QRdbBKbUgABtrpTz+HegEXLHzav5Q/d8IBB7xWylN2u8bzbhJLEg==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/page-composer/-/page-composer-3.1.7.tgz", + "integrity": "sha512-zJMzYznPT6Vd59nEXio/2rolkX070Nup6g4a8d4RCz0WoE8dmMidw6XFgjAHr0Lyh14/FHgBPlYXfhkDFR16Mw==", "dev": true, "requires": { - "@antora/logger": "3.0.0-alpha.7", + "@antora/logger": "3.1.7", "handlebars": "~4.7", "require-from-string": "~2.0" } }, "@antora/playbook-builder": { - "version": "3.0.0-alpha.7", - "resolved": "https://registry.npmjs.org/@antora/playbook-builder/-/playbook-builder-3.0.0-alpha.7.tgz", - "integrity": "sha512-qussIcBunzaRsPagED3IifFnWcc9okFnq+eyyN8FEF40AOyH/ZkSJvkyb//GPdfsa8rELj0BRvIrdUMiefIH/A==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/playbook-builder/-/playbook-builder-3.1.7.tgz", + "integrity": "sha512-lU80S1BqUy9DvqziEzRwpYTaWhOshxgrGAjf/F5VjAIaHCGVx0rZgfoI2rgFFkbVaH94kauOngdtTXDPXC1fPQ==", "dev": true, "requires": { - "@antora/logger": "3.0.0-alpha.7", "@iarna/toml": "~2.2", - "camelcase-keys": "~6.2", - "convict": "~6.1", + "convict": "~6.2", "js-yaml": "~4.1", "json5": "~2.2" } }, "@antora/redirect-producer": { - "version": "3.0.0-alpha.7", - "resolved": "https://registry.npmjs.org/@antora/redirect-producer/-/redirect-producer-3.0.0-alpha.7.tgz", - "integrity": "sha512-4iRjkgnt6vy32oVAqHXJuUdTs5wOPATacXejQZPzuccC9tQFCS4XXu0EGopbj7iaD9Ou0IyljYU+oasNemCmww==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/redirect-producer/-/redirect-producer-3.1.7.tgz", + "integrity": "sha512-6zAHfcOb0v0829nAbn/3HMilbactjbjU7zBT9Iy6JHQfbqXT/g/mUT9N13Lj/wbq/nm0qKQJweB0Mi6BS2fbMw==", "dev": true, "requires": { - "@antora/asciidoc-loader": "3.0.0-alpha.7", "vinyl": "~2.2" } }, - "@antora/site-generator-default": { - "version": "3.0.0-alpha.7", - "resolved": "https://registry.npmjs.org/@antora/site-generator-default/-/site-generator-default-3.0.0-alpha.7.tgz", - "integrity": "sha512-Pz3wwFpc0J3kax7VTOTaFn+7mAJCa2KUNdES3o1K/7sGTuVeDYlYrE+W7Pd59ZwjWu0WPf4mIOV2ny1H5Ag1jw==", + "@antora/site-generator": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/site-generator/-/site-generator-3.1.7.tgz", + "integrity": "sha512-39KWip9bLdQ+4ssyqjI+O0COquKHxoeznxY2/3w5pNZEoeTg8cD7kOsnWfbocw0R3Rj+kJV5MnqICFNq0nuPeA==", "dev": true, "requires": { - "@antora/asciidoc-loader": "3.0.0-alpha.7", - "@antora/content-aggregator": "3.0.0-alpha.7", - "@antora/content-classifier": "3.0.0-alpha.7", - "@antora/document-converter": "3.0.0-alpha.7", - "@antora/navigation-builder": "3.0.0-alpha.7", - "@antora/page-composer": "3.0.0-alpha.7", - "@antora/playbook-builder": "3.0.0-alpha.7", - "@antora/redirect-producer": "3.0.0-alpha.7", - "@antora/site-mapper": "3.0.0-alpha.7", - "@antora/site-publisher": "3.0.0-alpha.7", - "@antora/ui-loader": "3.0.0-alpha.7" + "@antora/asciidoc-loader": "3.1.7", + "@antora/content-aggregator": "3.1.7", + "@antora/content-classifier": "3.1.7", + "@antora/document-converter": "3.1.7", + "@antora/file-publisher": "3.1.7", + "@antora/logger": "3.1.7", + "@antora/navigation-builder": "3.1.7", + "@antora/page-composer": "3.1.7", + "@antora/playbook-builder": "3.1.7", + "@antora/redirect-producer": "3.1.7", + "@antora/site-mapper": "3.1.7", + "@antora/site-publisher": "3.1.7", + "@antora/ui-loader": "3.1.7", + "@antora/user-require-helper": "~2.0" } }, "@antora/site-mapper": { - "version": "3.0.0-alpha.7", - "resolved": "https://registry.npmjs.org/@antora/site-mapper/-/site-mapper-3.0.0-alpha.7.tgz", - "integrity": "sha512-FxvUCc6awGyr3kOqtss7vGK7q+arlcR5DmwIb/1avt4jdNEHToPFR7XRK0vCE74ydqJ8eJ+gDlrt+3yJJN6P6w==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/site-mapper/-/site-mapper-3.1.7.tgz", + "integrity": "sha512-x++89btbwk8FxyU2+H/RHQMnsC9sdvQvXcwXwNt11eXN1qj7t8TPiQZTalg7gkf0/osY4l7JRpGBY5JJfOJVig==", "dev": true, "requires": { - "@antora/content-classifier": "3.0.0-alpha.7", + "@antora/content-classifier": "3.1.7", "vinyl": "~2.2" } }, "@antora/site-publisher": { - "version": "3.0.0-alpha.7", - "resolved": "https://registry.npmjs.org/@antora/site-publisher/-/site-publisher-3.0.0-alpha.7.tgz", - "integrity": "sha512-ia2YzE+L00mWtXbDt59Azcvo+4ZM97wiorsxeSBGjT7tFKqO0+BJiZfTwIvEyNPNar7tDvDQj7j996S57DN83A==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/site-publisher/-/site-publisher-3.1.7.tgz", + "integrity": "sha512-zHaJc7UeBfFSIhBbQ5U5Ud4u671M84oqSJb3pPxlUiJDP7iVJlSl+0GNm0NAIoDizjPtVksUI88fzqCy5rfSUQ==", "dev": true, "requires": { - "@antora/expand-path-helper": "~1.0", - "gulp-vinyl-zip": "~2.2", - "vinyl": "~2.2", - "vinyl-fs": "~3.0" + "@antora/file-publisher": "3.1.7" } }, "@antora/ui-loader": { - "version": "3.0.0-alpha.7", - "resolved": "https://registry.npmjs.org/@antora/ui-loader/-/ui-loader-3.0.0-alpha.7.tgz", - "integrity": "sha512-IjS0y2VJ3InMs10nEi1GcwVwh3CR/2teJwifiJOi+5S1uJ1QjSZTc231YIKdtVieZQ18swTxtfrZi2nJ5VPFfA==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@antora/ui-loader/-/ui-loader-3.1.7.tgz", + "integrity": "sha512-79QuZB0c91dveoESa3RcE18ZZFJo0rDZX9aJKHVc20dInQBGCgfURPqB2OytkzaXD3lNtDJ41yjKNYZqsAQy1Q==", "dev": true, "requires": { - "@antora/expand-path-helper": "~1.0", + "@antora/expand-path-helper": "~2.0", + "@vscode/gulp-vinyl-zip": "~2.5", + "braces": "~3.0", "cache-directory": "~2.0", - "camelcase-keys": "~6.2", - "gulp-vinyl-zip": "~2.2", - "hpagent": "~0.1.0", + "glob-stream": "~7.0", + "hpagent": "~1.2", "js-yaml": "~4.1", - "minimatch-all": "~1.1", + "picomatch": "~2.3", "should-proxy": "~1.0", - "simple-concat": "~1.0", "simple-get": "~4.0", - "vinyl": "~2.2", - "vinyl-fs": "~3.0" + "vinyl": "~2.2" + } + }, + "@antora/user-require-helper": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@antora/user-require-helper/-/user-require-helper-2.0.0.tgz", + "integrity": "sha512-5fMfBZfw4zLoFdDAPMQX6Frik90uvfD8rXOA4UpXPOUikkX4uT1Rk6m0/4oi8oS3fcjiIl0k/7Nc+eTxW5TcQQ==", + "dev": true, + "requires": { + "@antora/expand-path-helper": "~2.0" } }, "@asciidoctor/core": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@asciidoctor/core/-/core-2.2.4.tgz", - "integrity": "sha512-rk7YSD6QAY6kInW5JVYi2ICjC3r90kXGlARwpfKQ99e/qy/2Vq31coL6nFFiWRuQxbh4EBqzUbC5uUUUjiu+Vw==", + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/@asciidoctor/core/-/core-2.2.6.tgz", + "integrity": "sha512-TmB2K5UfpDpSbCNBBntXzKHcAk2EA3/P68jmWvmJvglVUdkO9V6kTAuXVe12+h6C4GK0ndwuCrHHtEVcL5t6pQ==", "dev": true, "requires": { "asciidoctor-opal-runtime": "0.3.3", "unxhr": "1.0.1" } }, - "@djencks/asciidoctor-tabset-block": { - "version": "https://experimental-repo.s3-us-west-1.amazonaws.com/djencks-asciidoctor-tabset-block-v0.0.3.tgz", - "integrity": "sha512-u7miFmQyfiUeaaTVYIEZ14pecAmY7uQHzVzWxz/VrAyDLZrvG1eM6WGvXfRF0Nac3ou2Ll6aGSSvQt2k3XOARQ==", - "dev": true - }, - "@hapi/bourne": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-2.0.0.tgz", - "integrity": "sha512-WEezM1FWztfbzqIUbsDzFRVMxSoLy3HugVcux6KDDtTqzPsLE8NDRHfXvev66aH1i2oOKKar3/XDjbvh/OUBdg==", - "dev": true + "@asciidoctor/tabs": { + "version": "1.0.0-beta.6", + "resolved": "https://registry.npmjs.org/@asciidoctor/tabs/-/tabs-1.0.0-beta.6.tgz", + "integrity": "sha512-gGZnW7UfRXnbiyKNd9PpGKtSuD8+DsqaaTSbQ1dHVkZ76NaolLhdQg8RW6/xqN3pX1vWZEcF4e81+Oe9rNRWxg==" }, "@iarna/toml": { "version": "2.2.5", @@ -215,19 +2670,44 @@ "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==", "dev": true }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "@vscode/gulp-vinyl-zip": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@vscode/gulp-vinyl-zip/-/gulp-vinyl-zip-2.5.0.tgz", + "integrity": "sha512-PP/xkOoLBSY3V04HmzRxF+NOxkRJ/m2D0YwWpfx1FCFv5G8+sZUGPvxX+LRgdJ5vQcR1RHck5x1IkHi75Qjdbw==", + "dev": true, + "requires": { + "queue": "^4.2.1", + "through": "^2.3.8", + "through2": "^2.0.3", + "vinyl": "^2.0.2", + "vinyl-fs": "^3.0.3", + "yauzl": "^2.2.1", + "yazl": "^2.2.1" + } + }, + "abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dev": true, + "requires": { + "event-target-shim": "^5.0.0" + } + }, + "antora": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/antora/-/antora-3.1.7.tgz", + "integrity": "sha512-8MHjWYhzSnf2cVk/fonGw7SvYu9G+gNAhS0VX3jkGou6dBHFxgqlnrlzteXgeGd5rtixMVLIwvrQgEomA2LLpQ==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "@antora/cli": "3.1.7", + "@antora/site-generator": "3.1.7" } }, "append-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", - "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", + "integrity": "sha512-WLbYiXzD3y/ATLZFufV/rZvWdZOs+Z/+5v1rBZ463Jn398pa6kcde27cvozYnBoxXblGZTFfoPpsaEw0orU5BA==", "dev": true, "requires": { "buffer-equal": "^1.0.0" @@ -239,31 +2719,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "args": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/args/-/args-5.0.1.tgz", - "integrity": "sha512-1kqmFCFsPffavQFGt8OxJdIcETti99kySRUPMpOhaGjL6mRJn8HFU1OxKY5bMqfZKUwTQc1mZkAjmGYaVOHFtQ==", - "dev": true, - "requires": { - "camelcase": "5.0.0", - "chalk": "2.4.2", - "leven": "2.1.0", - "mri": "1.1.4" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - } - } - }, "asciidoctor-opal-runtime": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/asciidoctor-opal-runtime/-/asciidoctor-opal-runtime-0.3.3.tgz", @@ -275,9 +2730,9 @@ } }, "async-lock": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.3.0.tgz", - "integrity": "sha512-8A7SkiisnEgME2zEedtDYPxUPzdv3x//E7n5IFktPAtMYSEAV7eNJF0rMwrVyUFj6d/8rgajLantbjcNRQYXIg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.1.tgz", + "integrity": "sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==", "dev": true }, "atomic-sleep": { @@ -292,6 +2747,12 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -311,16 +2772,26 @@ "fill-range": "^7.0.1" } }, + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "dev": true }, "buffer-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", - "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.1.tgz", + "integrity": "sha512-QoV3ptgEaQpvVwbXdSO39iqPQTCxSF7A5U99AxbHYqUdCizL/lH2Z0A2y6nbZucxMEOtNyZfG2s6gsVugGpKkg==", "dev": true }, "cache-directory": { @@ -333,89 +2804,16 @@ } }, "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "camelcase": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", - "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", - "dev": true - }, - "camelcase-keys": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - } - } - }, - "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" } }, "clean-git-ref": { @@ -427,19 +2825,19 @@ "clone": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", "dev": true }, "clone-buffer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "integrity": "sha512-KLLTJWrvwIP+OPfMn0x2PheDEP20RPUcGXj/ERegTgdmPEZylALQldygiqrPPu8P45uNuPs7ckmReLY6v/iA5g==", "dev": true }, "clone-stats": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "integrity": "sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag==", "dev": true }, "cloneable-readable": { @@ -454,9 +2852,9 @@ }, "dependencies": { "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -485,154 +2883,105 @@ } } }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "dev": true }, "commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, "convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true }, "convict": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/convict/-/convict-6.1.0.tgz", - "integrity": "sha512-8dzppr6Z9URlm6P8N9NiydFRq2NWtQyf4RZOK5m0Q48fWWuKamHLXD7Qz/SiLvRXnjQcKCuHayIk9Fk51sax0w==", + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/convict/-/convict-6.2.4.tgz", + "integrity": "sha512-qN60BAwdMVdofckX7AlohVJ2x9UvjTNoKVXCL2LxFk1l7757EJqf1nySdMkPQer0bt8kQ5lQiyZ9/2NvrFBuwQ==", "dev": true, "requires": { "lodash.clonedeep": "^4.5.0", - "yargs-parser": "^18.1.3" + "yargs-parser": "^20.2.7" } }, "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, "crc-32": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz", - "integrity": "sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA==", - "dev": true, - "requires": { - "exit-on-epipe": "~1.0.1", - "printj": "~1.1.0" - } - }, - "dateformat": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.5.1.tgz", - "integrity": "sha512-OD0TZ+B7yP7ZgpJf5K2DIbj3FZvFvxgFUuaqA/V5zTjAtAAXZ1E8bktHxmAGs4x5b7PflqA9LeQ84Og7wYtF7Q==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", "dev": true }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dateformat": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", + "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", "dev": true }, "decompress-response": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", - "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dev": true, "requires": { - "mimic-response": "^2.0.0" + "mimic-response": "^3.1.0" + } + }, + "define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "requires": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" } }, "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "requires": { - "object-keys": "^1.0.12" + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" } }, "diff3": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/diff3/-/diff3-0.0.3.tgz", - "integrity": "sha1-1OXDpM305f4SEatC5pP8tDIVgPw=", + "integrity": "sha512-iSq8ngPOt0K53A6eVr4d5Kn6GNrM2nQZtC740pzIriHtn4pOQ2lyzEXQMBeVcWERN0ye7fhBsk9PbLLQOnUx/g==", "dev": true }, "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", + "integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==", "dev": true, "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", + "end-of-stream": "^1.4.1", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1", "stream-shift": "^1.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } } }, "end-of-stream": { @@ -644,16 +2993,31 @@ "once": "^1.4.0" } }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.2.4" + } + }, + "es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "dev": true }, - "exit-on-epipe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz", - "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==", + "event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "dev": true + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", "dev": true }, "extend": { @@ -662,22 +3026,28 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, - "fast-redact": { + "fast-copy": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.0.1.tgz", - "integrity": "sha512-kYpn4Y/valC9MdrISg47tZOpYBNoTXKgT9GYXFpHN/jYFs+lFkPoisY+LcBODdKVMY96ATzvzsWv+ES/4Kmufw==", + "resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-3.0.1.tgz", + "integrity": "sha512-Knr7NOtK3HWRYGtHoJrjkaWepqT8thIVGAwt0p0aUs1zqkAzXZV4vo9fFNwyb5fcqK1GKYFYxldQdIDVKhUAfA==", + "dev": true + }, + "fast-redact": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.3.0.tgz", + "integrity": "sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ==", "dev": true }, "fast-safe-stringify": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.8.tgz", - "integrity": "sha512-lXatBjf3WPjmWD6DpIZxkeSsCOwqI0maYMpgDlx8g4U2qi4lbjA9oH/HD2a87G+KfsUmo5WbJFmqBZlPxtptag==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", "dev": true }, "fd-slicer": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "dev": true, "requires": { "pend": "~1.2.0" @@ -692,12 +3062,6 @@ "to-regex-range": "^5.0.1" } }, - "flatstr": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/flatstr/-/flatstr-1.0.12.tgz", - "integrity": "sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw==", - "dev": true - }, "flush-write-stream": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", @@ -709,9 +3073,9 @@ }, "dependencies": { "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -743,7 +3107,7 @@ "fs-mkdirp-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", - "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", + "integrity": "sha512-+vSd9frUnapVC2RZYfL3FCB2p3g4TBhaUmrsWlSudsGdnxIuUvBB2QM1VZeBtc49QFwrp+wQLrDs3+xxDgI5gQ==", "dev": true, "requires": { "graceful-fs": "^4.1.11", @@ -753,24 +3117,26 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true }, "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" } }, "glob": { @@ -788,136 +3154,171 @@ } }, "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" + "is-glob": "^4.0.3" } }, "glob-stream": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", - "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-7.0.0.tgz", + "integrity": "sha512-evR4kvr6s0Yo5t4CD4H171n4T8XcnPFznvsbeN8K9FPzc0Q0wYqcOWyGtck2qcvJSLXKnU6DnDyfmbDDabYvRQ==", "dev": true, "requires": { - "extend": "^3.0.0", - "glob": "^7.1.1", - "glob-parent": "^3.1.0", + "extend": "^3.0.2", + "glob": "^7.2.0", + "glob-parent": "^6.0.2", "is-negated-glob": "^1.0.0", - "ordered-read-streams": "^1.0.0", - "pumpify": "^1.3.5", - "readable-stream": "^2.1.5", - "remove-trailing-separator": "^1.0.1", - "to-absolute-glob": "^2.0.0", - "unique-stream": "^2.0.2" + "ordered-read-streams": "^1.0.1", + "pumpify": "^2.0.1", + "readable-stream": "^3.6.0", + "remove-trailing-separator": "^1.1.0", + "to-absolute-glob": "^2.0.2", + "unique-stream": "^2.3.1" }, "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "requires": { - "safe-buffer": "~5.1.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } } } }, - "graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", - "dev": true - }, - "gulp-vinyl-zip": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/gulp-vinyl-zip/-/gulp-vinyl-zip-2.2.1.tgz", - "integrity": "sha512-9lwCZUkrENzP649hVQB2r+8GgeGtVrqA2fEeVDX6aYr6+yJjdczWu0r1C6WvbZdzhXcA61MtR5MEyjR9a3D7cw==", + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, "requires": { - "queue": "^4.2.1", - "through": "^2.3.8", - "through2": "^2.0.3", - "vinyl": "^2.0.2", - "vinyl-fs": "^3.0.3", - "yauzl": "^2.2.1", - "yazl": "^2.2.1" + "get-intrinsic": "^1.1.3" } }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, "handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", "dev": true, "requires": { "minimist": "^1.2.5", - "neo-async": "^2.6.0", + "neo-async": "^2.6.2", "source-map": "^0.6.1", "uglify-js": "^3.1.4", "wordwrap": "^1.0.0" } }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, "requires": { - "function-bind": "^1.1.1" + "es-define-property": "^1.0.0" } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "dev": true }, "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true }, + "hasown": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "dev": true, + "requires": { + "function-bind": "^1.1.2" + } + }, + "help-me": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/help-me/-/help-me-4.2.0.tgz", + "integrity": "sha512-TAOnTB8Tz5Dw8penUuzHVrKNKlCIbwwbHnXraNJxPwf8LRtE2HlM84RYuezMFcwOJmoYOCWVDyJ8TQGxn9PgxA==", + "dev": true, + "requires": { + "glob": "^8.0.0", + "readable-stream": "^3.6.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, "hpagent": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/hpagent/-/hpagent-0.1.2.tgz", - "integrity": "sha512-ePqFXHtSQWAFXYmj+JtOTHr84iNrII4/QRlAAPPE+zqnKy4xJo7Ie1Y4kC7AdB+LxLxSTTzBMASsEcy0q8YyvQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hpagent/-/hpagent-1.2.0.tgz", + "integrity": "sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA==", + "dev": true + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true }, "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "requires": { "once": "^1.3.0", @@ -949,22 +3350,22 @@ "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true }, "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { - "is-extglob": "^2.1.0" + "is-extglob": "^2.1.1" } }, "is-negated-glob": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", - "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", + "integrity": "sha512-czXVVn/QEmgvej1f50BZ648vUI+em0xqMq2Sn+QncCLN4zj1UAxlT+kw/6ggQTOaZPd1HqKQGEqbpQVtJucWug==", "dev": true }, "is-number": { @@ -994,13 +3395,13 @@ "is-utf8": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", "dev": true }, "is-valid-glob": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", - "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", + "integrity": "sha512-AhiROmoEFDSsjx8hW+5sGwgKVIORcXnrlAx/R0ZSeaPw70Vw0CqkGBBhHGL58Uox2eXnU1AnvXJl1XlyedO5bA==", "dev": true }, "is-windows": { @@ -1012,13 +3413,13 @@ "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", "dev": true }, "isomorphic-git": { - "version": "1.8.10", - "resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.8.10.tgz", - "integrity": "sha512-QRAYMDYSi2gULLsVTT+xxiQ5t5iNSybmLl2pYKNHaPIO/sHLhLrfSKAlOqQohGEFKmcO68ah4j8OwGtvDbI14Q==", + "version": "1.25.6", + "resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.25.6.tgz", + "integrity": "sha512-zA3k3QOO7doqOnBgwsaXJwHKSIIl5saEdH4xxalu082WHVES4KghsG6RE2SDwjXMCIlNa1bWocbitH6bRIrmLQ==", "dev": true, "requires": { "async-lock": "^1.1.0", @@ -1031,32 +3432,13 @@ "pify": "^4.0.1", "readable-stream": "^3.4.0", "sha.js": "^2.4.9", - "simple-get": "^3.0.2" - }, - "dependencies": { - "simple-get": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", - "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", - "dev": true, - "requires": { - "decompress-response": "^4.2.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - } + "simple-get": "^4.0.1" } }, - "jmespath": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", - "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=", - "dev": true - }, "joycon": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.0.1.tgz", - "integrity": "sha512-SJcJNBg32dGgxhPtM0wQqxqV0ax9k/9TaUskGDSJkSFSQOEWWvQ3zzWdGQRIUry2j1zA5+ReH13t0Mf3StuVZA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", "dev": true }, "js-yaml": { @@ -1071,31 +3453,28 @@ "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true }, "lazystream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", "dev": true, "requires": { "readable-stream": "^2.0.5" }, "dependencies": { "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -1127,90 +3506,52 @@ "lead": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", - "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", + "integrity": "sha512-IpSVCk9AYvLHo5ctcIXxOBpMWUe+4TKN3VPWAKUbJikkmsGp0VrSM8IttVc32D6J4WUsiPE6aEFRNmIoF/gdow==", "dev": true, "requires": { "flush-write-stream": "^1.0.2" } }, - "leven": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", - "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", - "dev": true - }, "lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "map-obj": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", - "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", "dev": true }, - "matcher": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-4.0.0.tgz", - "integrity": "sha512-S6x5wmcDmsDRRU/c2dkccDwQPXoFczc5+HpQ2lON8pnvHlnvHAHj5WlLVvw6n6vNyHuVugYrFohYxbS+pvFpKQ==", - "dev": true, - "requires": { - "escape-string-regexp": "^4.0.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - } - } - }, "mime-db": { - "version": "1.48.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", - "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==", + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true }, "mime-types": { - "version": "2.1.31", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", - "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, "requires": { - "mime-db": "1.48.0" + "mime-db": "1.52.0" } }, "mimic-response": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", - "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, - "minimatch-all": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/minimatch-all/-/minimatch-all-1.1.0.tgz", - "integrity": "sha1-QMSWonouEo0Zv3WOdrsBoMcUV4c=", - "dev": true, - "requires": { - "minimatch": "^3.0.2" - } - }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true }, "minimisted": { @@ -1222,17 +3563,12 @@ "minimist": "^1.2.5" } }, - "mri": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.4.tgz", - "integrity": "sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==", - "dev": true - }, "multi-progress": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/multi-progress/-/multi-progress-4.0.0.tgz", "integrity": "sha512-9zcjyOou3FFCKPXsmkbC3ethv51SFPoA4dJD6TscIp2pUmy26kBDZW6h9XofPELrzseSkuD7r0V+emGEeo39Pg==", - "dev": true + "dev": true, + "requires": {} }, "neo-async": { "version": "2.6.2", @@ -1243,7 +3579,7 @@ "normalize-path": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", "dev": true, "requires": { "remove-trailing-separator": "^1.0.1" @@ -1265,21 +3601,27 @@ "dev": true }, "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dev": true, "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" } }, + "on-exit-leak-free": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz", + "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "requires": { "wrappy": "1" @@ -1288,16 +3630,16 @@ "ordered-read-streams": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", - "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", + "integrity": "sha512-Z87aSjx3r5c0ZB7bcJqIgIRX5bxR7A4aSzvIbaxd0oTkWBCOoKfuGHiKj60CHVUgg1Phm5yMZzBdt8XqRs73Mw==", "dev": true, "requires": { "readable-stream": "^2.0.1" }, "dependencies": { "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -1335,25 +3677,25 @@ "path-dirname": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "integrity": "sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==", "dev": true }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true }, "pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", "dev": true }, "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "pify": { @@ -1363,49 +3705,96 @@ "dev": true }, "pino": { - "version": "6.11.3", - "resolved": "https://registry.npmjs.org/pino/-/pino-6.11.3.tgz", - "integrity": "sha512-drPtqkkSf0ufx2gaea3TryFiBHdNIdXKf5LN0hTM82SXI4xVIve2wLwNg92e1MT6m3jASLu6VO7eGY6+mmGeyw==", + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/pino/-/pino-8.14.2.tgz", + "integrity": "sha512-zKu9aWeSWTy1JgvxIpZveJKKsAr4+6uNMZ0Vf0KRwzl/UNZA3XjHiIl/0WwqLMkDwuHuDkT5xAgPA2jpKq4whA==", "dev": true, "requires": { - "fast-redact": "^3.0.0", - "fast-safe-stringify": "^2.0.7", - "flatstr": "^1.0.12", - "pino-std-serializers": "^3.1.0", + "atomic-sleep": "^1.0.0", + "fast-redact": "^3.1.1", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "v1.0.0", + "pino-std-serializers": "^6.0.0", + "process-warning": "^2.0.0", "quick-format-unescaped": "^4.0.3", - "sonic-boom": "^1.0.2" + "real-require": "^0.2.0", + "safe-stable-stringify": "^2.3.1", + "sonic-boom": "^3.1.0", + "thread-stream": "^2.0.0" + } + }, + "pino-abstract-transport": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.0.0.tgz", + "integrity": "sha512-c7vo5OpW4wIS42hUVcT5REsL8ZljsUfBjqV/e2sFxmFEFZiq1XLUp5EYLtuDH6PEHq9W1egWqRbnLUP5FuZmOA==", + "dev": true, + "requires": { + "readable-stream": "^4.0.0", + "split2": "^4.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dev": true, + "requires": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + } + } } }, "pino-pretty": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-5.1.2.tgz", - "integrity": "sha512-20HWKSHFvF/pF/C4spBVW0RQdnBYptCj4Bwgb6pFkWY5FOYiElCGHkkPU1173iK8fsoiBMHMEvS0wB2loQZJ+Q==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-10.0.1.tgz", + "integrity": "sha512-yrn00+jNpkvZX/NrPVCPIVHAfTDy3ahF0PND9tKqZk4j9s+loK8dpzrJj4dGb7i+WLuR50ussuTAiWoMWU+qeA==", "dev": true, "requires": { - "@hapi/bourne": "^2.0.0", - "args": "^5.0.1", - "chalk": "^4.0.0", - "dateformat": "^4.5.1", - "fast-safe-stringify": "^2.0.7", - "jmespath": "^0.15.0", - "joycon": "^3.0.0", + "colorette": "^2.0.7", + "dateformat": "^4.6.3", + "fast-copy": "^3.0.0", + "fast-safe-stringify": "^2.1.1", + "help-me": "^4.0.1", + "joycon": "^3.1.1", + "minimist": "^1.2.6", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^1.0.0", "pump": "^3.0.0", - "readable-stream": "^3.6.0", - "rfdc": "^1.3.0", - "split2": "^3.1.1", + "readable-stream": "^4.0.0", + "secure-json-parse": "^2.4.0", + "sonic-boom": "^3.0.0", "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dev": true, + "requires": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + } + } } }, "pino-std-serializers": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-3.2.0.tgz", - "integrity": "sha512-EqX4pwDPrt3MuOAAUBMU0Tk5kR/YcCM5fNPEzgCO2zJ5HfX0vbiH9HbJglnyeQsN96Kznae6MWD47pZB5avTrg==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-6.2.2.tgz", + "integrity": "sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==", "dev": true }, - "printj": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz", - "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==", + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", "dev": true }, "process-nextick-args": { @@ -1414,6 +3803,12 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, + "process-warning": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-2.3.2.tgz", + "integrity": "sha512-n9wh8tvBe5sFmsqlg+XQhaQLumwpqoAUruLwjCopgTmUBjJ/fjtBsJzKleCaIGBOMXYEhp1YfKl4d7rJ5ZKJGA==", + "dev": true + }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -1431,26 +3826,14 @@ } }, "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-2.0.1.tgz", + "integrity": "sha512-m7KOje7jZxrmutanlkS1daj1dS6z6BgslzOXmcSEpIlCxM3VJH7lG5QLeck/6hgF6F4crFf01UtQmNsJfweTAw==", "dev": true, "requires": { - "duplexify": "^3.6.0", + "duplexify": "^4.1.1", "inherits": "^2.0.3", - "pump": "^2.0.0" - }, - "dependencies": { - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } + "pump": "^3.0.0" } }, "queue": { @@ -1463,21 +3846,15 @@ } }, "quick-format-unescaped": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.3.tgz", - "integrity": "sha512-MaL/oqh02mhEo5m5J2rwsVL23Iw2PEaGVHgT2vFt8AAsr0lfvQA5dpXo9TPu0rz7tSBdUPgkbam0j/fj5ZM8yg==", - "dev": true - }, - "quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", + "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==", "dev": true }, "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -1485,6 +3862,12 @@ "util-deprecate": "^1.0.1" } }, + "real-require": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", + "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==", + "dev": true + }, "remove-bom-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", @@ -1498,7 +3881,7 @@ "remove-bom-stream": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", - "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", + "integrity": "sha512-wigO8/O08XHb8YPzpDDT+QmRANfW6vLqxfaXm1YXhnFf3AkSLyjfG3GEFg4McZkmgL7KvCj5u2KczkvSP6NfHA==", "dev": true, "requires": { "remove-bom-buffer": "^3.0.0", @@ -1509,7 +3892,7 @@ "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", "dev": true }, "replace-ext": { @@ -1527,24 +3910,44 @@ "resolve-options": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", - "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", + "integrity": "sha512-NYDgziiroVeDC29xq7bp/CacZERYsA9bXYd1ZmcJlF3BcrZv5pTb4NG7SjdyKDnXZ84aC4vo2u6sNKIA1LCu/A==", "dev": true, "requires": { "value-or-function": "^3.0.0" } }, - "rfdc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", - "dev": true - }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, + "safe-stable-stringify": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", + "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==", + "dev": true + }, + "secure-json-parse": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz", + "integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==", + "dev": true + }, + "set-function-length": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", + "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", + "dev": true, + "requires": { + "define-data-property": "^1.1.2", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + } + }, "sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", @@ -1558,7 +3961,7 @@ "should-proxy": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/should-proxy/-/should-proxy-1.0.4.tgz", - "integrity": "sha1-yAWlAav2lTlgBjSAnmL78ji6NeQ=", + "integrity": "sha512-RPQhIndEIVUCjkfkQ6rs6sOR6pkxJWCNdxtfG5pP0RVgUYbK5911kLTF0TNcCC0G3YCGd492rMollFT2aTd9iQ==", "dev": true }, "simple-concat": { @@ -1568,41 +3971,23 @@ "dev": true }, "simple-get": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.0.tgz", - "integrity": "sha512-ZalZGexYr3TA0SwySsr5HlgOOinS4Jsa8YB2GJ6lUNAazyAu4KG/VmzMTwAt2YVXzzVj8QmefmAonZIK2BSGcQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", "dev": true, "requires": { "decompress-response": "^6.0.0", "once": "^1.3.1", "simple-concat": "^1.0.0" - }, - "dependencies": { - "decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, - "requires": { - "mimic-response": "^3.1.0" - } - }, - "mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true - } } }, "sonic-boom": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-1.4.1.tgz", - "integrity": "sha512-LRHh/A8tpW7ru89lrlkU4AszXt1dbwSjVWguGrmlxE7tawVmDBlI1PILMkXAxJTwqhgsEeTHzj36D5CmHgQmNg==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.3.0.tgz", + "integrity": "sha512-LYxp34KlZ1a2Jb8ZQgFCK3niIHzibdwtwNUWKg0qQRzsDoJ3Gfgkf8KdBTFU3SkejDEIlWwnSnpVdOZIhFMl/g==", "dev": true, "requires": { - "atomic-sleep": "^1.0.0", - "flatstr": "^1.0.12" + "atomic-sleep": "^1.0.0" } }, "source-map": { @@ -1612,18 +3997,15 @@ "dev": true }, "split2": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", - "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", - "dev": true, - "requires": { - "readable-stream": "^3.0.0" - } + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "dev": true }, "stream-shift": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", - "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz", + "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==", "dev": true }, "string_decoder": { @@ -1641,19 +4023,19 @@ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "thread-stream": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-2.4.1.tgz", + "integrity": "sha512-d/Ex2iWd1whipbT681JmTINKw0ZwOUBZm7+Gjs64DHuX34mmw8vJL2bFAaNacaW72zYiTJxSHi5abUuOi5nsfg==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "real-require": "^0.2.0" } }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true }, "through2": { @@ -1667,9 +4049,9 @@ }, "dependencies": { "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -1711,7 +4093,7 @@ "to-absolute-glob": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", - "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", + "integrity": "sha512-rtwLUQEwT8ZeKQbyFJyomBRYXyE16U5VKuy0ftxLMK/PZb2fkOsg5r9kHdauuVDbsNdIBoC/HCthpidamQFXYA==", "dev": true, "requires": { "is-absolute": "^1.0.0", @@ -1730,23 +4112,23 @@ "to-through": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", - "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", + "integrity": "sha512-+QIz37Ly7acM4EMdw2PRN389OneM5+d844tirkGp4dPKzI5OE72V9OsbFp+CIYJDahZ41ZV05hNtcPAQUAm9/Q==", "dev": true, "requires": { "through2": "^2.0.3" } }, "uglify-js": { - "version": "3.13.10", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.10.tgz", - "integrity": "sha512-57H3ACYFXeo1IaZ1w02sfA71wI60MGco/IQFjOqK+WtKoprh7Go2/yvd2HPtoJILO2Or84ncLccI4xoHMTSbGg==", + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", "dev": true, "optional": true }, "unc-path-regex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", "dev": true }, "unique-stream": { @@ -1768,13 +4150,13 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, "value-or-function": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", - "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", + "integrity": "sha512-jdBB2FrWvQC/pnPtIqcLsMaQgjhdb6B7tk1MMyTKapox+tQZbdRP4uLxu/JY0t7fbfDCUMnuelzEYv5GsxHhdg==", "dev": true }, "vinyl": { @@ -1816,10 +4198,80 @@ "vinyl-sourcemap": "^1.1.0" }, "dependencies": { + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "glob-stream": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", + "integrity": "sha512-uMbLGAP3S2aDOHUDfdoYcdIePUCfysbAd0IAoWVZbeGU/oNQ8asHVSshLDJUPWxfzj8zsCG7/XeHPHTtow0nsw==", + "dev": true, + "requires": { + "extend": "^3.0.0", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", + "unique-stream": "^2.0.2" + } + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -1851,7 +4303,7 @@ "vinyl-sourcemap": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", - "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", + "integrity": "sha512-NiibMgt6VJGJmyw7vtzhctDcfKch4e4n9TBeoWlirb7FMg9/1Ov9k+A5ZRAtywBpRPiyECvQRQllYM8dECegVA==", "dev": true, "requires": { "append-buffer": "^1.0.2", @@ -1866,19 +4318,19 @@ "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", "dev": true }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, "xdg-basedir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "integrity": "sha512-1Dly4xqlulvPD3fZUQJLY+FUIeqN3N2MM3uqe4rCJftAvOjFa3jFGfctOgluGx4ahPbUCsZkmJILiP0Vi4T6lQ==", "dev": true }, "xtend": { @@ -1888,19 +4340,15 @@ "dev": true }, "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true }, "yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, "requires": { "buffer-crc32": "~0.2.3", diff --git a/package.json b/package.json index 7faaa3a1..bc723778 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,9 @@ "build": "antora antora-playbook.yml --stacktrace --fetch --clean" }, "devDependencies": { - "@antora/cli": "3.0.0-alpha.7", - "@antora/site-generator-default": "3.0.0-alpha.7", - "@djencks/asciidoctor-tabset-block": "https://experimental-repo.s3-us-west-1.amazonaws.com/djencks-asciidoctor-tabset-block-v0.0.3.tgz" + "antora": "3.1.7" + }, + "dependencies": { + "@asciidoctor/tabs": "^1.0.0-beta.6" } } diff --git a/robots.txt b/robots.txt new file mode 100644 index 00000000..e53ba301 --- /dev/null +++ b/robots.txt @@ -0,0 +1 @@ +# Algolia-Crawler-Verif: E4E8AD1E2F7362AB diff --git a/ui-bundle/old_ui2-bundle.zip b/ui-bundle/old_ui2-bundle.zip index 2aca69aa..9f352de1 100644 Binary files a/ui-bundle/old_ui2-bundle.zip and b/ui-bundle/old_ui2-bundle.zip differ diff --git a/ui-bundle/older_ui2-bundle.zip b/ui-bundle/older_ui2-bundle.zip index 52adee77..3999e12c 100644 Binary files a/ui-bundle/older_ui2-bundle.zip and b/ui-bundle/older_ui2-bundle.zip differ diff --git a/ui-bundle/oldest_ui2-bundle.zip b/ui-bundle/oldest_ui2-bundle.zip index 7f799983..a57d4e2f 100644 Binary files a/ui-bundle/oldest_ui2-bundle.zip and b/ui-bundle/oldest_ui2-bundle.zip differ diff --git a/ui-bundle/ui2-bundle.zip b/ui-bundle/ui2-bundle.zip index 7c4e83d3..e9aec636 100644 Binary files a/ui-bundle/ui2-bundle.zip and b/ui-bundle/ui2-bundle.zip differ diff --git a/vercel.json b/vercel.json new file mode 100644 index 00000000..0315857d --- /dev/null +++ b/vercel.json @@ -0,0 +1,446 @@ +{ + "cleanUrls": true, + "redirects": [ + { + "source": "/software/9.8.0.sw/:path*", + "destination": "/software/latest/:path*", + "statusCode": 301 }, + { + "source": "/cloud/10.4.0.cl/:path*", + "destination": "/cloud/latest/:path*", + "statusCode": 301 }, + { + "source": "/cloud", + "destination": "/cloud/latest/", + "statusCode": 301 }, + { + "source": "/software", + "destination": "/software/latest/", + "statusCode": 301 }, + { + "source": "/mobile", + "destination": "/mobile/latest/", + "statusCode": 301 }, + { + "source": "/seekwell", + "destination": "/seekwell/latest/", + "statusCode": 301 }, + { + "source": "/spotter", + "destination": "/spotter/latest/", + "statusCode": 301 }, + { + "source": "/spotter/latest", + "destination": "/spotter/latest/", + "statusCode": 301 }, + { + "source": "/cloud/10.4.0.cl/", + "destination": "/cloud/latest/", + "statusCode": 301 }, + { + "source": "/cloud/latest/schedule-new-experience", + "destination": "/cloud/latest/liveboard-schedule#_scheduling_a_liveboard", + "statusCode": 301 }, + { + "source": "/cloud/latest/liveboard-schedules-homepage", + "destination": "/cloud/latest/thoughtspot-homepage", + "statusCode": 301 }, + { + "source": "/cloud/latest/notes#10-3-0-cl-developer", + "destination": "https://developers.thoughtspot.com/docs/selective-user-access", + "statusCode": 301 }, + { + "source": "/software/10.1.0.sw/table-join", + "destination": "/software/10.1.0.sw/relationship-create#table-join-new", + "statusCode": 301 }, + { + "source": "/software/10.1.0.sw/connection-config", + "destination": "/software/10.1.0.sw/connections-snowflake-add#additional-configurations-create", + "statusCode": 301 }, + { + "source": "/cloud/10.3.0.cl", + "destination": "/cloud/10.3.0.cl/", + "statusCode": 301 }, + { + "source": "/cloud/10.1.0.cl", + "destination": "/cloud/10.1.0.cl/", + "statusCode": 301 }, + { + "source": "/cloud/10.0.0.cl", + "destination": "/cloud/10.0.0.cl/", + "statusCode": 301 }, + { + "source": "/cloud/9.12.5.cl", + "destination": "/cloud/9.12.5.cl/", + "statusCode": 301 }, + { + "source": "/cloud/9.12.0.cl", + "destination": "/cloud/9.12.0.cl/", + "statusCode": 301 }, + { + "source": "/cloud/latest", + "destination": "/cloud/latest/", + "statusCode": 301 }, + { + "source": "/cloud/9.10.5.cl", + "destination": "/cloud/9.10.5.cl/", + "statusCode": 301 }, + { + "source": "/cloud/9.10.0.cl", + "destination": "/cloud/9.10.0.cl/", + "statusCode": 301 }, + { + "source": "/cloud/9.9.0.cl", + "destination": "/cloud/9.9.0.cl/", + "statusCode": 301 }, + { + "source": "/cloud/9.6.0.cl", + "destination": "/cloud/9.6.0.cl/", + "statusCode": 301 }, + { + "source": "/cloud/9.5.0.cl", + "destination": "/cloud/9.5.0.cl/", + "statusCode": 301 }, + { + "source": "/cloud/9.3.0.cl", + "destination": "/cloud/9.3.0.cl/", + "statusCode": 301 }, + { + "source": "/cloud/notes", + "destination": "/cloud/9.9.0.cl/notes", + "statusCode": 301 }, + { + "source": "/cloud/notes", + "destination": "/cloud/9.9.0.cl/accessibility", + "statusCode": 301 }, + { + "source": "/cloud/notes", + "destination": "/cloud/9.9.0.cl/deprecation", + "statusCode": 301 }, + { + "source": "/cloud/notes", + "destination": "/cloud/9.9.0.cl/release-lifecycle", + "statusCode": 301 }, + { + "source": "/cloud/notes", + "destination": "/cloud/9.9.0.cl/ts-cloud-getting-started", + "statusCode": 301 }, + { + "source": "/cloud/notes", + "destination": "/cloud/9.9.0.cl/ts-cloud-requirements-support", + "statusCode": 301 }, + { + "source": "/cloud/notes", + "destination": "/cloud/9.9.0.cl/gcp.adoc", + "statusCode": 301 }, + { + "source": "/cloud/9.12.5.cl/time-series-forecasting", + "destination": "/cloud/9.12.5.cl/spotiq-forecasting/", + "statusCode": 301 }, + { + "source": "/cloud/latest/time-series-forecasting", + "destination": "/cloud/10.4.0.cl/spotiq-forecasting", + "statusCode": 301 }, + { + "source": "/cloud/latest/connection-config", + "destination": "/cloud/10.4.0.cl/connections-snowflake-add#additional-configurations-create", + "statusCode": 301 }, + { + "source": "/cloud/9.12.5.cl/connection-config", + "destination": "/cloud/9.12.5.cl/connections-snowflake-add#additional-configurations-create/", + "statusCode": 301 }, + { + "source": "/cloud/9.12.5.cl/table-join", + "destination": "/cloud/9.12.5.cl/tables-join#_new_join_interface", + "statusCode": 301 }, + { + "source": "/cloud/latest/table-join", + "destination": "/cloud/latest/tables-join#_new_join_interface", + "statusCode": 301 }, + { + "source": "/software/latest", + "destination": "/software/latest/", + "statusCode": 301 }, + { + "source": "/software/9.8.0.sw", + "destination": "/software/latest/", + "statusCode": 301 }, + { + "source": "/software/9.8.0.sw/", + "destination": "/software/latest/", + "statusCode": 301 }, + { + "source": "/software/9.5.0.sw", + "destination": "/software/9.5.0.sw/", + "statusCode": 301 }, + { + "source": "/software/9.0.1.sw", + "destination": "/software/9.0.1.sw/", + "statusCode": 301 }, + { + "source": "/software/8.8.1.sw", + "destination": "/software/8.8.1.sw/", + "statusCode": 301 }, + { + "source": "/software/8.4.1.sw", + "destination": "/software/8.4.1.sw/", + "statusCode": 301 }, + { + "source": "/software/7.2", + "destination": "/software/7.2/", + "statusCode": 301 }, + { + "source": "/software/7.1", + "destination": "/software/7.1/", + "statusCode": 301 }, + { + "source": "/software/7.0", + "destination": "/software/7.0/", + "statusCode": 301 }, + { + "source": "/software/6.3", + "destination": "/software/6.3/", + "statusCode": 301 }, + { + "source": "/software/6.2", + "destination": "/software/6.2/", + "statusCode": 301 }, + { + "source": "/software/6.1", + "destination": "/software/6.1/", + "statusCode": 301 }, + { + "source": "/software/6.0", + "destination": "/software/6.0/", + "statusCode": 301 }, + { + "source": "/blanknetworkconnect.png", + "destination": "/software/latest/_images/blanknetworkconnect.png", + "statusCode": 301 }, + { + "source": "/cloud/10.4.0.cl/notes", + "destination": "/cloud/latest/notes", + "statusCode": 301 }, + { + "source": "/8.4.1.sw.cu1/release/help-center", + "destination": "/software/8.4.1.sw/help-center", + "statusCode": 301 }, + { + "source": "/9.3.0.cl/release/help-center", + "destination": "/cloud/9.3.0.cl/help-center", + "statusCode": 301 }, + { + "source": "/software/8.8.1.sw.cu1/:path*", + "destination": "/software/8.8.1.sw/:path*", + "statusCode": 301 }, + { + "source": "/ghyer95y3/software/8.8.1.sw.cu1/", + "destination": "/ghyer95y3/software/8.8.1.sw/", + "statusCode": 301 }, + { + "source": "/software/latest/welcome-intro.html", + "destination": "/software/latest/deployment-sw", + "statusCode": 301 }, + { + "source": "/cloud/8.10.0.cl/upgrade", + "destination": "/cloud/latest/upgrade", + "statusCode": 301 }, + { + "source": "/software/8.8.0.sw/:path*", + "destination": "/software/latest/:path*", + "statusCode": 301 }, + { + "source": "/software/9.5.0.sw.cu1/:path*", + "destination": "/software/9.5.0.sw/:path*", + "statusCode": 301 }, + { + "source": "/software/9.0.1.sw.cu1/:path*", + "destination": "/software/9.0.1.sw/:path*", + "statusCode": 301 }, + { + "source": "/software/8.8.1.sw.cu1/:path*", + "destination": "/software/8.8.1.sw/:path*", + "statusCode": 301 }, + { + "source": "/software/8.8.1.sw.CU1/:path*", + "destination": "/software/8.8.1.sw/:path*", + "statusCode": 301 }, + { + "source": "/software/8.4.1.sw.cu1/:path*", + "destination": "/software/8.4.1.sw/:path*", + "statusCode": 301 }, + { + "source": "/software/8.4.1.sw.CU1/:path*", + "destination": "/software/8.4.1.sw/:path*", + "statusCode": 301 }, + { + "source": "/cloud/latest/conditional-formatting", + "destination": "/cloud/latest/search-conditional-formatting#advanced-conditional-formatting", + "statusCode": 301 }, + { + "source": "/software/8.4.1.sw.CU1/:path*", + "destination": "/software/8.4.1.sw/:path*", + "statusCode": 301 } + ], + "rewrites": [ + { + "source": "/ghyer95y3/software/8.4.1.sw", + "destination": "https://help-software.vercel.app/software/8.4.1.sw/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/software/8.4.1.sw.cu1", + "destination": "https://help-software.vercel.app/software/8.4.1.sw/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/software/8.8.1.sw", + "destination": "https://help-software.vercel.app/software/8.8.1.sw/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/software/9.0.1.sw", + "destination": "https://help-software.vercel.app/software/9.0.1.sw/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/software/9.5.0.sw", + "destination": "https://help-software.vercel.app/software/9.5.0.sw/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/software/9.8.0.sw", + "destination": "https://help-software.vercel.app/software/9.8.0.sw/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/software/10.0.0.sw", + "destination": "https://help-software.vercel.app/software/10.0.0.sw/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/software/10.1.0.sw", + "destination": "https://help-software.vercel.app/software/10.1.0.sw/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/software/10.5.0.sw", + "destination": "https://help-cloud.vercel.app/software/10.5.0.sw/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/software/11.0.0.sw", + "destination": "https://help-cloud.vercel.app/software/11.0.0.sw/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/8.9.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/8.9.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/8.10.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/8.10.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/9.0.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/9.0.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/9.1.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/9.1.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/9.2.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/9.2.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/9.3.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/9.3.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/9.4.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/9.4.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/9.5.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/9.5.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/9.6.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/9.6.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/9.7.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/9.7.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/9.8.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/9.8.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/9.9.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/9.9.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/9.10.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/9.10.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/9.10.5.cl", + "destination": "https://help-cloud.vercel.app/cloud/9.10.5.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/9.12.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/9.12.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/9.12.5.cl", + "destination": "https://help-cloud.vercel.app/cloud/9.12.5.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/10.0.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/10.0.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/10.1.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/10.1.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/10.2.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/10.2.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/10.3.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/10.3.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/10.4.0.cl", + "destination": "https://help-cloud.vercel.app/cloud/10.4.0.cl/index_help", + "statusCode": 200 }, + { + "source": "/ghyer95y3/sitemap-cloud.xml", + "destination": "https://help-cloud.vercel.app/sitemap-cloud.xml", + "statusCode": 200 }, + { + "source": "/ghyer95y3/sitemap-software.xml", + "destination": "https://help-software.vercel.app/sitemap-software.xml", + "statusCode": 200 }, + { + "source": "/cloud/9.3.0.cl/:path*", + "destination": "https://9-3-0-cl-docs-archive.netlify.app/cloud/9.3.0.cl/:path*", + "statusCode": 200 }, + { + "source": "/cloud/9.9.0.cl/:path*", + "destination": "https://ts-9-9-0-cl.netlify.app/cloud/9.9.0.cl/:path*", + "statusCode": 200 }, + { + "source": "/ghyer95y3/cloud/:path*", + "destination": "https://help-cloud.vercel.app/cloud/:path*", + "statusCode": 200 }, + { + "source": "/ghyer95y3/software/:path*", + "destination": "https://help-software.vercel.app/software/:path*", + "statusCode": 200 } + ], + "headers": [ + { + "source": "/(.*)", + "headers": [ + { + "key": "Content-Security-Policy", + "value": "default-src * 'unsafe-eval' 'unsafe-inline' data: filesystem: about: blob:;" + } + ] + } + ] +} \ No newline at end of file